@monospaced/set-tokens 0.0.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 ADDED
@@ -0,0 +1,26 @@
1
+ # @monospaced/set-tokens
2
+
3
+ Set tokens as data: DTCG-shaped JSON artifacts and JSON Schema. For docs sites, MCP, agents, and downstream tooling.
4
+
5
+ ## Usage
6
+
7
+ ```js
8
+ import mnsp from "@monospaced/set-tokens/mnsp";
9
+ import wrfr from "@monospaced/set-tokens/wrfr";
10
+ import base from "@monospaced/set-tokens/base";
11
+ import schema from "@monospaced/set-tokens/schemas/v1";
12
+ ```
13
+
14
+ ## Output shape
15
+
16
+ Each artifact is token-centric with overlay-only context variation:
17
+
18
+ - **Constant tokens**: `$value` only.
19
+ - **Single-axis variation**: `$value` + `varyingModifiers: [axis]` + `by<Axis>: { <axisValue>: { $value, ... } }`.
20
+ - **Multi-axis variation**: `$value` + `varyingModifiers: [a, b]` + `byContext: { "a=v1,b=v2": { $value } }` — keys list only the varying axes.
21
+
22
+ DTCG-defined fields keep the `$` prefix (`$value`, `$type`, `$description`, `$extensions`); Set-defined fields are bare-named (`layer`, `varyingModifiers`, `byTheme`, `byContext`, …).
23
+
24
+ ## Schema
25
+
26
+ The JSON Schema (draft-2020-12) describes the envelope, per-token shape, and overlay maps. Validate consumer JSON with any draft-2020-12-aware validator (e.g. ajv).