@phcdevworks/spectre-tokens 2.1.1 → 2.2.0

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/README.md CHANGED
@@ -18,8 +18,8 @@ translate those contracts for specific frameworks and runtimes.
18
18
  ## Key capabilities
19
19
 
20
20
  - Uses `tokens/` as the source of truth for design-token data
21
- - Generates JavaScript, TypeScript, Tailwind, and CSS outputs from shared token
22
- sources
21
+ - Generates JavaScript, TypeScript, CSS, and Tailwind theme exports from shared
22
+ token sources
23
23
  - Defines semantic token contracts for surfaces, text, components, buttons,
24
24
  forms, and modes
25
25
  - Exposes primitives and semantic roles for downstream packages and compatible
@@ -80,8 +80,8 @@ access is appropriate.
80
80
 
81
81
  - Visual language expressed as token data in `tokens/`
82
82
  - Semantic roles and token contracts consumed downstream
83
- - Generated token outputs for JavaScript, TypeScript, Tailwind, and CSS
84
- variables
83
+ - Generated token outputs for JavaScript, TypeScript, CSS variables, and
84
+ Tailwind theme exports
85
85
  - Theme and mode definitions used by downstream consumers
86
86
 
87
87
  ### Token model
@@ -109,6 +109,10 @@ The generated token object includes these namespaces:
109
109
  - `component`
110
110
  - `modes`
111
111
 
112
+ The exported runtime token object is a flattened string-based tree generated
113
+ from `tokens/`. Source-only wrapper fields such as `value` and `metadata` are
114
+ internal generation details and are not part of the public package contract.
115
+
112
116
  ### Themes and modes
113
117
 
114
118
  The package includes mode-aware semantic tokens under `modes`, with `default`
@@ -181,7 +185,7 @@ Regenerate package outputs:
181
185
  npm run build
182
186
  ```
183
187
 
184
- Run validation checks:
188
+ Run the full validation and release gate:
185
189
 
186
190
  ```bash
187
191
  npm run check
@@ -195,6 +199,10 @@ Key source areas:
195
199
  - `scripts/` for build and validation scripts
196
200
  - `example/` for usage examples
197
201
 
202
+ The files in `example/` are illustrative token demos only. They help explain
203
+ the token contract, but they are not the package contract itself and should not
204
+ be treated as downstream UI primitives.
205
+
198
206
  ## Contributing
199
207
 
200
208
  PHCDevworks maintains this package as part of the Spectre system.
@@ -204,7 +212,9 @@ When contributing:
204
212
  - treat `tokens/` as the source of truth
205
213
  - keep generated outputs derived from source data
206
214
  - avoid breaking token contracts without an intentional major-version change
207
- - run `npm run build` and `npm run check` before opening a pull request
215
+ - run `npm run build` to regenerate outputs when sources change
216
+ - run `npm run check` as the full validation gate before opening a pull request
217
+ - do not modify locked semantic color families without explicit approval
208
218
 
209
219
  See [CONTRIBUTING.md](CONTRIBUTING.md) for the full workflow.
210
220