@waggylabs/yumekit 0.4.4 → 0.5.0-beta.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CONTRIBUTING.md CHANGED
@@ -85,13 +85,41 @@ if (this.querySelector('[slot="icon"]')) { ... }
85
85
 
86
86
  ### New component checklist
87
87
 
88
- Every new component requireschanges to the following: `README.md`, `CHANGELOG.md`, `reference.md`, `SKILL.md`, `react.d.ts`, `variables.css`, `.figma/variables.json`, entry in `llm.txt`, and a `y-*.stories.js` stories file.
88
+ Every new component requires changes to the following: `README.md`, `CHANGELOG.md`, `reference.md`, `SKILL.md`, `react.d.ts`, its token sets under `tokens/` (see [Design Tokens](#design-tokens)), entry in `llm.txt`, and a `y-*.stories.js` stories file.
89
89
 
90
90
  ### Testing
91
91
 
92
92
  - Tests co-locate with the component source file.
93
93
  - Use `sinon.createSandbox()` at the `describe` level with `afterEach(() => sandbox.restore())`.
94
94
 
95
+ ## Design Tokens
96
+
97
+ Tokens are the source of truth for the visual design system. The JSON under `tokens/` drives the generated CSS under `styles/`.
98
+
99
+ ### Layout
100
+
101
+ - `tokens/core/colors.json` — palette primitives (neutral, red, blue, etc.)
102
+ - `tokens/core/numerics.json` — border / spacing / radii / sizing / font-size primitives
103
+ - `tokens/core/components.json` — component dimensional tokens (widths, sizes, gaps)
104
+ - `tokens/themes/{name}.json` — per-theme semantic tokens and component color overrides
105
+ - `tokens/$themes.json` — Tokens Studio theme manifest
106
+ - `tokens/$metadata.json` — token-set order
107
+
108
+ ### Building CSS
109
+
110
+ Run `npm run build:tokens` to regenerate all files under `styles/`. The full `npm run build` runs this first before bundling, and `prepublishOnly` invokes `build`, so published packages always reflect the current tokens.
111
+
112
+ Generated outputs:
113
+
114
+ - `styles/variables.css` — palette + numerics + component dims + the default theme (Blue Light)
115
+ - `styles/{slug}.css` — per-theme override files (one per Themes entry in the manifest)
116
+
117
+ The generated CSS is committed so consumers can use the library without running the build.
118
+
119
+ ### Figma sync
120
+
121
+ Use the [Tokens Studio for Figma](https://tokens.studio/) plugin pointed at this repo's `tokens/` directory to keep Figma Variables in sync with code.
122
+
95
123
  ## AI Assistance
96
124
 
97
125
  AI tools can be helpful for brainstorming and prototyping, but they are not a substitute for human judgment and expertise.