From 0bbe78164e097f563dd61b89e60229c38351f2d1 Mon Sep 17 00:00:00 2001 From: Jerry Thomas Date: Wed, 28 May 2025 13:43:30 -0500 Subject: [PATCH 1/2] chore: release v1.0.0-next.121 --- package.json | 2 +- packages/actions/package.json | 2 +- packages/bits-ui/package.json | 2 +- packages/chart/package.json | 2 +- packages/cli/package.json | 2 +- packages/core/package.json | 2 +- packages/data/package.json | 2 +- packages/helpers/package.json | 2 +- packages/icons/package.json | 2 +- packages/input/package.json | 2 +- packages/states/package.json | 2 +- packages/themes/package.json | 2 +- packages/tutorial/package.json | 2 +- packages/ui/package.json | 2 +- pnpm-lock.yaml | 107 ++++++++++++++++++++++++++++++++- sites/learn/package.json | 2 +- sites/quick-start/package.json | 2 +- 17 files changed, 122 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index 87e3fc24..93948241 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rokkit", - "version": "1.0.0-next.120", + "version": "1.0.0-next.121", "module": "src/index.js", "type": "module", "npm": { diff --git a/packages/actions/package.json b/packages/actions/package.json index a5001ec9..8cc4e7c4 100644 --- a/packages/actions/package.json +++ b/packages/actions/package.json @@ -1,6 +1,6 @@ { "name": "@rokkit/actions", - "version": "1.0.0-next.120", + "version": "1.0.0-next.121", "description": "Contains generic actions that can be used in various components.", "author": "Jerry Thomas ", "license": "MIT", diff --git a/packages/bits-ui/package.json b/packages/bits-ui/package.json index 11dacc81..1fc2c755 100644 --- a/packages/bits-ui/package.json +++ b/packages/bits-ui/package.json @@ -1,6 +1,6 @@ { "name": "@rokkit/bits-ui", - "version": "1.0.0-next.120", + "version": "1.0.0-next.121", "type": "module", "description": "Data-driven UI components based on bits-ui", "author": "Jerry Thomas ", diff --git a/packages/chart/package.json b/packages/chart/package.json index 6826cecc..a64ebddf 100644 --- a/packages/chart/package.json +++ b/packages/chart/package.json @@ -1,6 +1,6 @@ { "name": "@rokkit/chart", - "version": "1.0.0-next.120", + "version": "1.0.0-next.121", "type": "module", "description": "Data-driven chart components", "author": "Jerry Thomas ", diff --git a/packages/cli/package.json b/packages/cli/package.json index d65c0feb..31cbeff8 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@rokkit/cli", - "version": "1.0.0-next.120", + "version": "1.0.0-next.121", "description": "Command line utilities for icon bundling and conversion.", "author": "Jerry Thomas ", "license": "MIT", diff --git a/packages/core/package.json b/packages/core/package.json index efe820ad..edf30619 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@rokkit/core", - "version": "1.0.0-next.120", + "version": "1.0.0-next.121", "description": "Contains core utility functions and classes that can be used in various components.", "author": "Jerry Thomas ", "license": "MIT", diff --git a/packages/data/package.json b/packages/data/package.json index 11f8c142..b4fe469b 100644 --- a/packages/data/package.json +++ b/packages/data/package.json @@ -1,6 +1,6 @@ { "name": "@rokkit/data", - "version": "1.0.0-next.120", + "version": "1.0.0-next.121", "description": "Contains generic data manipulation functions that can be used in various components.", "author": "Jerry Thomas ", "license": "MIT", diff --git a/packages/helpers/package.json b/packages/helpers/package.json index 541437aa..4cc03ac6 100644 --- a/packages/helpers/package.json +++ b/packages/helpers/package.json @@ -1,6 +1,6 @@ { "name": "@rokkit/helpers", - "version": "1.0.0-next.120", + "version": "1.0.0-next.121", "description": "Custom matchers for vitest, mocks and simulators for testing.", "publishConfig": { "access": "public" diff --git a/packages/icons/package.json b/packages/icons/package.json index cdd7245f..1038843a 100644 --- a/packages/icons/package.json +++ b/packages/icons/package.json @@ -1,6 +1,6 @@ { "name": "@rokkit/icons", - "version": "1.0.0-next.120", + "version": "1.0.0-next.121", "author": "Jerry Thomas ", "exports": { "./package.json": "./package.json", diff --git a/packages/input/package.json b/packages/input/package.json index 47816dd4..140354a8 100644 --- a/packages/input/package.json +++ b/packages/input/package.json @@ -1,6 +1,6 @@ { "name": "@rokkit/input", - "version": "1.0.0-next.120", + "version": "1.0.0-next.121", "module": "src/index.js", "author": "Jerry Thomas ", "license": "MIT", diff --git a/packages/states/package.json b/packages/states/package.json index 23297f4a..f549d986 100644 --- a/packages/states/package.json +++ b/packages/states/package.json @@ -1,6 +1,6 @@ { "name": "@rokkit/states", - "version": "1.0.0-next.120", + "version": "1.0.0-next.121", "description": "Contains generic data manipulation functions that can be used in various components.", "author": "Jerry Thomas ", "license": "MIT", diff --git a/packages/themes/package.json b/packages/themes/package.json index 0fa3430c..3a39e930 100644 --- a/packages/themes/package.json +++ b/packages/themes/package.json @@ -1,6 +1,6 @@ { "name": "@rokkit/themes", - "version": "1.0.0-next.120", + "version": "1.0.0-next.121", "description": "Themes for use with rokkit components.", "author": "Jerry Thomas ", "license": "MIT", diff --git a/packages/tutorial/package.json b/packages/tutorial/package.json index 6377e1c6..30849b24 100644 --- a/packages/tutorial/package.json +++ b/packages/tutorial/package.json @@ -1,6 +1,6 @@ { "name": "@rokkit/tutorial", - "version": "1.0.0-next.120", + "version": "1.0.0-next.121", "description": "Utilities for building tutorials.", "publishConfig": { "access": "public" diff --git a/packages/ui/package.json b/packages/ui/package.json index cbab7a60..f08b1bf6 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -1,6 +1,6 @@ { "name": "@rokkit/ui", - "version": "1.0.0-next.120", + "version": "1.0.0-next.121", "description": "Data driven UI components, improving DX", "author": "Jerry Thomas ", "license": "MIT", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cacced7e..d6d6485a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -92,6 +92,57 @@ importers: specifier: ^0.30.1 version: 0.30.1 + packages/chart: + dependencies: + '@rokkit/core': + specifier: workspace:latest + version: link:../core + '@rokkit/data': + specifier: workspace:latest + version: link:../data + '@rokkit/states': + specifier: workspace:latest + version: link:../states + bits-ui: + specifier: ^1.4.6 + version: 1.4.8(svelte@5.28.6) + d3-array: + specifier: ^3.2.4 + version: 3.2.4 + d3-axis: + specifier: ^3.0.0 + version: 3.0.0 + d3-scale: + specifier: ^4.0.2 + version: 4.0.2 + d3-scale-chromatic: + specifier: ^3.1.0 + version: 3.1.0 + d3-selection: + specifier: ^3.0.0 + version: 3.0.0 + d3-transition: + specifier: ^3.0.1 + version: 3.0.1(d3-selection@3.0.0) + ramda: + specifier: ^0.30.1 + version: 0.30.1 + + packages/chart/src: + dependencies: + '@rokkit/core': + specifier: workspace:latest + version: link:../../core + '@rokkit/states': + specifier: workspace:latest + version: link:../../states + bits-ui: + specifier: ^1.4.6 + version: 1.4.8(svelte@5.28.6) + ramda: + specifier: ^0.30.1 + version: 0.30.1 + packages/cli: dependencies: '@iconify/tools': @@ -304,7 +355,7 @@ importers: version: link:../../packages/actions '@rokkit/bits-ui': specifier: workspace:latest - version: link:../../packages/bits-ui + version: link:../../packages/chart/src '@rokkit/core': specifier: workspace:latest version: link:../../packages/core @@ -1958,6 +2009,10 @@ packages: resolution: {integrity: sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==} engines: {node: '>=12'} + d3-axis@3.0.0: + resolution: {integrity: sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw==} + engines: {node: '>=12'} + d3-collection@1.0.7: resolution: {integrity: sha512-ii0/r5f4sjKNTfh84Di+DpztYwqKhEyUlKoPrzUFfeSkWxjW49xU2QzO9qrPrNkpdI0XJkfzvmTu8V2Zylln6A==} @@ -1965,6 +2020,14 @@ packages: resolution: {integrity: sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==} engines: {node: '>=12'} + d3-dispatch@3.0.1: + resolution: {integrity: sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==} + engines: {node: '>=12'} + + d3-ease@3.0.1: + resolution: {integrity: sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==} + engines: {node: '>=12'} + d3-format@3.1.0: resolution: {integrity: sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==} engines: {node: '>=12'} @@ -1973,10 +2036,18 @@ packages: resolution: {integrity: sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==} engines: {node: '>=12'} + d3-scale-chromatic@3.1.0: + resolution: {integrity: sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ==} + engines: {node: '>=12'} + d3-scale@4.0.2: resolution: {integrity: sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==} engines: {node: '>=12'} + d3-selection@3.0.0: + resolution: {integrity: sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==} + engines: {node: '>=12'} + d3-time-format@4.1.0: resolution: {integrity: sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==} engines: {node: '>=12'} @@ -1985,6 +2056,16 @@ packages: resolution: {integrity: sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==} engines: {node: '>=12'} + d3-timer@3.0.1: + resolution: {integrity: sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==} + engines: {node: '>=12'} + + d3-transition@3.0.1: + resolution: {integrity: sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==} + engines: {node: '>=12'} + peerDependencies: + d3-selection: 2 - 3 + data-urls@3.0.2: resolution: {integrity: sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==} engines: {node: '>=12'} @@ -5484,16 +5565,27 @@ snapshots: dependencies: internmap: 2.0.3 + d3-axis@3.0.0: {} + d3-collection@1.0.7: {} d3-color@3.1.0: {} + d3-dispatch@3.0.1: {} + + d3-ease@3.0.1: {} + d3-format@3.1.0: {} d3-interpolate@3.0.1: dependencies: d3-color: 3.1.0 + d3-scale-chromatic@3.1.0: + dependencies: + d3-color: 3.1.0 + d3-interpolate: 3.0.1 + d3-scale@4.0.2: dependencies: d3-array: 3.2.4 @@ -5502,6 +5594,8 @@ snapshots: d3-time: 3.1.0 d3-time-format: 4.1.0 + d3-selection@3.0.0: {} + d3-time-format@4.1.0: dependencies: d3-time: 3.1.0 @@ -5510,6 +5604,17 @@ snapshots: dependencies: d3-array: 3.2.4 + d3-timer@3.0.1: {} + + d3-transition@3.0.1(d3-selection@3.0.0): + dependencies: + d3-color: 3.1.0 + d3-dispatch: 3.0.1 + d3-ease: 3.0.1 + d3-interpolate: 3.0.1 + d3-selection: 3.0.0 + d3-timer: 3.0.1 + data-urls@3.0.2: dependencies: abab: 2.0.6 diff --git a/sites/learn/package.json b/sites/learn/package.json index 5bb39713..9c76c8dd 100644 --- a/sites/learn/package.json +++ b/sites/learn/package.json @@ -1,7 +1,7 @@ { "name": "@rokkit/learn", "private": true, - "version": "1.0.0-next.120", + "version": "1.0.0-next.121", "type": "module", "npm": { "publish": false diff --git a/sites/quick-start/package.json b/sites/quick-start/package.json index 60331df7..b1580889 100644 --- a/sites/quick-start/package.json +++ b/sites/quick-start/package.json @@ -1,7 +1,7 @@ { "name": "quick-start", "private": true, - "version": "1.0.0-next.120", + "version": "1.0.0-next.121", "type": "module", "npm": { "publish": false From ee488fb879dbb112fae3d309ceaadfd4af9759e6 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Thu, 29 May 2025 00:05:58 +0000 Subject: [PATCH 2/2] style: format code with Prettier This commit fixes the style issues introduced in 0bbe781 according to the output from Prettier. Details: None --- .rules/guidelines/coding.md | 6 + .rules/guidelines/javascript.md | 1 + .rules/guidelines/svelte.md | 2 + .rules/llms.md | 8 +- packages/chart/README.md | 13 +- packages/chart/spec/brewing/axes.spec.js | 456 +++++++++--------- .../chart/spec/brewing/dimensions.spec.js | 174 +++---- packages/chart/spec/brewing/scales.spec.js | 305 ++++++------ packages/chart/src/index.js | 26 +- packages/chart/src/lib/brewing/axes.svelte.js | 242 +++++----- packages/chart/src/lib/brewing/bars.svelte.js | 140 +++--- .../src/lib/brewing/dimensions.svelte.js | 48 +- .../chart/src/lib/brewing/index.svelte.js | 396 ++++++++------- .../chart/src/lib/brewing/legends.svelte.js | 103 ++-- .../chart/src/lib/brewing/scales.svelte.js | 127 +++-- packages/chart/src/lib/brewing/types.js | 4 +- packages/chart/src/lib/context.js | 224 +++++---- packages/chart/src/lib/scales.svelte.js | 167 +++---- packages/chart/src/lib/utils.js | 142 +++--- 19 files changed, 1288 insertions(+), 1296 deletions(-) diff --git a/.rules/guidelines/coding.md b/.rules/guidelines/coding.md index 42562b5b..88660cc5 100644 --- a/.rules/guidelines/coding.md +++ b/.rules/guidelines/coding.md @@ -1,12 +1,14 @@ Guidelines for Approaching Code Tasks ## Initial Assessment Phase + - **Always seek clarification** on requirements before proceeding - **Ask targeted questions** to uncover unstated assumptions or edge cases - **Establish success criteria** - how will we know when the task is complete? - **Identify potential constraints** (performance, compatibility, security) ## Planning Phase + - **Analyze the existing codebase** and provide a clear understanding of relevant components - **Present an implementation strategy** with a step-by-step approach - **Break down complex tasks** into smaller, manageable units of work @@ -14,6 +16,7 @@ Guidelines for Approaching Code Tasks - **Identify potential risks** and discuss mitigation strategies ## Implementation Phase + - **Start with a minimal working foundation** that demonstrates core functionality - **Implement features incrementally**, validating each step before proceeding - **Keep changes focused** with a small surface area to simplify debugging @@ -21,13 +24,16 @@ Guidelines for Approaching Code Tasks - **Seek feedback** at logical checkpoints during implementation ## Refinement Phase + - **Review the implementation** against the original requirements - **Test edge cases** explicitly - **Optimize only after functionality is correct** and only where necessary - **Consider maintenance implications** of the implementation ## Rationale + This structured approach prevents several common issues: + - It avoids wasted effort implementing misunderstood requirements - It makes debugging simpler by isolating changes - It provides clear checkpoints for validation diff --git a/.rules/guidelines/javascript.md b/.rules/guidelines/javascript.md index c9b6bd73..4ed0cc18 100644 --- a/.rules/guidelines/javascript.md +++ b/.rules/guidelines/javascript.md @@ -22,3 +22,4 @@ project/ │ ├── index.spec.js │ └── utils.spec.js └── README.md +``` diff --git a/.rules/guidelines/svelte.md b/.rules/guidelines/svelte.md index 2d57e590..eb6c6690 100644 --- a/.rules/guidelines/svelte.md +++ b/.rules/guidelines/svelte.md @@ -8,6 +8,7 @@ - E2E tests should follow the page object pattern ## Svelte 5 + {{[Svelte & Svelte Kit Distilled](https://svelte-llm.khromov.se/svelte-complete-distilled)}} {{[svelte 5 documentation](https://svelte.dev/docs/svelte/llms.txt)}} @@ -114,6 +115,7 @@ To pass a snippet to another component: {/snippet} ``` + Both of these options work in a similar way ### Important: What NOT to do diff --git a/.rules/llms.md b/.rules/llms.md index 04d6449e..ab146dec 100644 --- a/.rules/llms.md +++ b/.rules/llms.md @@ -16,11 +16,10 @@ First, carefully review the following guidelines: {{[SVELTE_5_GUIDELINES](./guidelines/svelte.md)}} - - Now, follow these instructions to implement Svelte 5 components and structure the project: 1. Component Implementation: + - Use Svelte 5 runes mode for all component code. - Implement state management using $state, $derived, and $effect runes. - Use $props() for component properties. @@ -29,20 +28,24 @@ Now, follow these instructions to implement Svelte 5 components and structure th - Consider reduced motion in your implementations. 2. Project Structure: + - Use SvelteKit for the application structure. - Organize your project following the provided directory structure. - Use .svelte.js extension for files using runes in the source code. - Use .spec.svelte.js extension for test files using runes. 3. Styling: + - Use UnoCSS for all styling in the project. 4. Testing: + - Implement unit tests using vitest. - Implement end-to-end (e2e) tests using Playwright. - Follow the page object pattern for e2e tests. 5. Event Handling: + - Treat event handlers as properties in Svelte 5. - Use onclick instead of on:click for event binding. - Pass callback props to components instead of using event forwarding. @@ -54,6 +57,7 @@ Now, follow these instructions to implement Svelte 5 components and structure th When implementing components or structuring the project, provide your code inside tags. For explanations or comments, use tags. Your final output should include: + 1. A brief overview of the implemented components or project structure. 2. The actual implementation or structure in tags. 3. Explanations for your choices in tags. diff --git a/packages/chart/README.md b/packages/chart/README.md index 7a5bf139..e63ea413 100644 --- a/packages/chart/README.md +++ b/packages/chart/README.md @@ -18,7 +18,7 @@ The chart package provides a set of composable components that can be combined t