@weasel-js/theme 1.6.1 → 1.7.1
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/NOTICE +2 -1
- package/dist/{chunk-C3S4A65R.js → chunk-AN5JVL2S.js} +2 -2
- package/dist/chunk-AN5JVL2S.js.map +1 -0
- package/dist/{chunk-4EIPTWJA.js → chunk-CKB2MZRY.js} +289 -225
- package/dist/chunk-CKB2MZRY.js.map +1 -0
- package/dist/{chunk-EINHFDWI.js → chunk-Z675UQ26.js} +2 -2
- package/dist/{chunk-EINHFDWI.js.map → chunk-Z675UQ26.js.map} +1 -1
- package/dist/{definition-DLdTdFWs.d.ts → definition-ChUj0lSz.d.ts} +195 -157
- package/dist/engine.d.ts +52 -5
- package/dist/engine.js +10 -4
- package/dist/engine.js.map +1 -1
- package/dist/faces.css +9 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +34 -32
- package/dist/index.js.map +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +3 -3
- package/dist/tokens.css +55 -35
- package/fonts/README.md +24 -3
- package/fonts/oswald-tabular-digits.woff2 +0 -0
- package/package.json +2 -2
- package/dist/chunk-4EIPTWJA.js.map +0 -1
- package/dist/chunk-C3S4A65R.js.map +0 -1
|
@@ -8,5 +8,5 @@ function overrideKey(axes, selection) {
|
|
|
8
8
|
var ALPHA_EXT = "com.weasel.alpha";
|
|
9
9
|
|
|
10
10
|
export { ALPHA_EXT, AXES_EXT, overrideKey };
|
|
11
|
-
//# sourceMappingURL=chunk-
|
|
12
|
-
//# sourceMappingURL=chunk-
|
|
11
|
+
//# sourceMappingURL=chunk-Z675UQ26.js.map
|
|
12
|
+
//# sourceMappingURL=chunk-Z675UQ26.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/dtcg/axesExtension.ts","../src/dtcg/types.ts"],"names":[],"mappings":";AAGO,IAAM,QAAA,GAAW;AAwBjB,SAAS,WAAA,CAAY,MAAgB,SAAA,EAA8B;AACxE,EAAA,OAAO,MAAA,CAAO,IAAA,CAAK,IAAI,CAAA,CACpB,MAAA,CAAO,CAAC,CAAA,KAAM,SAAA,CAAU,CAAC,CAAA,KAAM,MAAA,IAAa,SAAA,CAAU,CAAC,CAAA,KAAM,IAAA,CAAK,CAAC,CAAA,CAAE,OAAO,CAAA,CAC5E,GAAA,CAAI,CAAC,MAAM,CAAA,EAAG,CAAC,CAAA,CAAA,EAAI,SAAA,CAAU,CAAC,CAAC,CAAA,CAAE,CAAA,CACjC,KAAK,GAAG,CAAA;AACb;;;AC/BO,IAAM,SAAA,GAAY","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["../src/dtcg/axesExtension.ts","../src/dtcg/types.ts"],"names":[],"mappings":";AAGO,IAAM,QAAA,GAAW;AAwBjB,SAAS,WAAA,CAAY,MAAgB,SAAA,EAA8B;AACxE,EAAA,OAAO,MAAA,CAAO,IAAA,CAAK,IAAI,CAAA,CACpB,MAAA,CAAO,CAAC,CAAA,KAAM,SAAA,CAAU,CAAC,CAAA,KAAM,MAAA,IAAa,SAAA,CAAU,CAAC,CAAA,KAAM,IAAA,CAAK,CAAC,CAAA,CAAE,OAAO,CAAA,CAC5E,GAAA,CAAI,CAAC,MAAM,CAAA,EAAG,CAAC,CAAA,CAAA,EAAI,SAAA,CAAU,CAAC,CAAC,CAAA,CAAE,CAAA,CACjC,KAAK,GAAG,CAAA;AACb;;;AC/BO,IAAM,SAAA,GAAY","file":"chunk-Z675UQ26.js","sourcesContent":["import type { AxisDefs, Selection } from '../axes.ts';\n\n/** The `$extensions` key on a DTCG export's root that carries every axis besides mode. */\nexport const AXES_EXT = 'com.weasel.axes';\n\n/** The token groups of one layer: plain values, and values per mode. */\nexport interface DtcgLayer {\n readonly primitives: Record<string, Record<string, unknown>>;\n readonly modes: Record<string, Record<string, Record<string, unknown>>>;\n}\n\n/**\n * What `toDTCG` writes under `$extensions[\"com.weasel.axes\"]`.\n *\n * - `axes`: every axis the theme resolves with, mode included.\n * - `varies`: token name → the non-mode axes its value depends on.\n * - `overrides`: a layer per combination of non-default values, keyed like\n * `selectionKey` but naming only the axes off their default\n * (`density=compact`, `contrast=high,density=roomy` in axis order).\n */\nexport interface DtcgAxesExtension {\n readonly axes: AxisDefs;\n readonly varies: Record<string, readonly string[]>;\n readonly overrides: Record<string, DtcgLayer>;\n}\n\n/** The override key for a selection: its non-default values, axes in declaration order. `''` is the plain groups. */\nexport function overrideKey(axes: AxisDefs, selection: Selection): string {\n return Object.keys(axes)\n .filter((a) => selection[a] !== undefined && selection[a] !== axes[a].default)\n .map((a) => `${a}=${selection[a]}`)\n .join(',');\n}\n","/** The one `$extensions` key this kit defines. */\nexport const ALPHA_EXT = 'com.weasel.alpha';\n\n/** A token's value as authored: a string (which may be a `{ref}`), a number, or a list of those, such as a font stack. */\nexport type TokenValue = string | number | readonly (string | number)[];\n\n/**\n * A single design token as authored, before aliases are resolved: a DTCG-shaped\n * `{ type, value }` pair where `value` may still be a `{ref}` to another token.\n */\nexport interface RawToken {\n readonly type: string;\n readonly value: TokenValue;\n /** Render the referenced color at this alpha, 0–1. */\n readonly alpha?: number | undefined;\n readonly description?: string | undefined;\n}\n\n/** A token graph flattened to one level, keyed by token name (no `--wzl-`\n * prefix). Still unresolved — see `ResolvedTokenMap` for the output side. */\nexport type FlatTokens = Record<string, RawToken>;\n\n/** A resolved theme: every token name mapped to its final CSS-ready string.\n * Named ...Map, not ...Tokens, to stay distinct from hud's public `ResolvedTokens`. */\nexport type ResolvedTokenMap = Record<string, string>;\n"]}
|