@weasel-js/theme 0.8.0 → 1.0.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/dist/index.js CHANGED
@@ -1,160 +1,5 @@
1
- // src/generated/themes.ts
2
- var THEMES = {
3
- "weasel": {
4
- name: "weasel",
5
- defaultMode: "dark",
6
- modes: {
7
- "dark": {
8
- "--wzl-gray-50": "#f5f5f6",
9
- "--wzl-gray-100": "#e6e7e9",
10
- "--wzl-gray-200": "#c9cbcf",
11
- "--wzl-gray-300": "#9ea1a8",
12
- "--wzl-gray-400": "#6f737b",
13
- "--wzl-gray-500": "#4d5058",
14
- "--wzl-gray-600": "#383b42",
15
- "--wzl-gray-700": "#25272c",
16
- "--wzl-gray-800": "#181a1e",
17
- "--wzl-gray-900": "#0e0f12",
18
- "--wzl-accent-soft": "#1d1454",
19
- "--wzl-accent-base": "#2e1f7a",
20
- "--wzl-accent-strong": "#5841b8",
21
- "--wzl-danger-base": "#d94a3f",
22
- "--wzl-warning-base": "#d99a3f",
23
- "--wzl-success-base": "#2ec27e",
24
- "--wzl-fg-on-accent": "#f5f5f6",
25
- "--wzl-fg": "#e6e7e9",
26
- "--wzl-line-subtle": "rgba(230, 231, 233, 0.1)",
27
- "--wzl-line": "rgba(230, 231, 233, 0.2)",
28
- "--wzl-line-strong": "rgba(230, 231, 233, 0.4)",
29
- "--wzl-curve-color": "#5841b8",
30
- "--wzl-accent": "#2e1f7a",
31
- "--wzl-accent-hover": "#5841b8",
32
- "--wzl-danger": "#d94a3f",
33
- "--wzl-warning": "#d99a3f",
34
- "--wzl-success": "#2ec27e",
35
- "--wzl-focus-ring": "#5841b8",
36
- "--wzl-glass-tint": "#2e1f7a",
37
- "--wzl-text": "#e6e7e9",
38
- "--wzl-fg-muted": "#9ea1a8",
39
- "--wzl-text-muted": "#9ea1a8",
40
- "--wzl-surface": "#181a1e",
41
- "--wzl-bg": "#181a1e",
42
- "--wzl-muted": "#9ea1a8",
43
- "--wzl-panel-bg": "#181a1e",
44
- "--wzl-border": "#25272c",
45
- "--wzl-panel-border": "#25272c",
46
- "--wzl-surface-sunken": "#0e0f12",
47
- "--wzl-input-bg": "#0e0f12",
48
- "--wzl-track-bg": "#0e0f12",
49
- "--wzl-track-border": "#25272c",
50
- "--wzl-thumb-fill": "#9ea1a8",
51
- "--wzl-border-strong": "#383b42",
52
- "--wzl-thumb-border": "#383b42",
53
- "--wzl-surface-raised": "#25272c",
54
- "--wzl-button-fill": "#25272c",
55
- "--wzl-button-fill-hover": "rgba(230, 231, 233, 0.1)",
56
- "--wzl-button-fill-pressed": "rgba(230, 231, 233, 0.18)",
57
- "--wzl-button-text": "#e6e7e9",
58
- "--wzl-radius-sm": "3px",
59
- "--wzl-radius-md": "5px",
60
- "--wzl-border-w": "1px",
61
- "--wzl-line-width": "2px",
62
- "--wzl-curve-width": "3px",
63
- "--wzl-tb-height": "28px",
64
- "--wzl-motion-fast": "120ms",
65
- "--wzl-motion-medium": "240ms",
66
- "--wzl-ease-in-cubic": "cubic-bezier(0.32, 0, 0.67, 0)",
67
- "--wzl-ease-out-cubic": "cubic-bezier(0.33, 1, 0.68, 1)",
68
- "--wzl-ease-in-out-cubic": "cubic-bezier(0.65, 0, 0.35, 1)",
69
- "--wzl-ease-out-back": "cubic-bezier(0.34, 1.56, 0.64, 1)",
70
- "--wzl-font-ui": "Oswald, 'Helvetica Neue Condensed', 'Arial Narrow', system-ui, sans-serif",
71
- "--wzl-font-display": "Oswald, 'Helvetica Neue Condensed', 'Arial Narrow', system-ui, sans-serif",
72
- "--wzl-font-body": "Inter, system-ui, -apple-system, 'Segoe UI', sans-serif",
73
- "--wzl-font-mono": "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace",
74
- "--wzl-font-weight-light": "200",
75
- "--wzl-font-weight-normal": "300",
76
- "--wzl-font-weight-bold": "400",
77
- "--wzl-fg-subtle": "#6f737b",
78
- "--wzl-accent-fg": "#5841b8",
79
- "--wzl-thumb-text": "#0e0f12"
80
- },
81
- "light": {
82
- "--wzl-gray-50": "#f5f5f6",
83
- "--wzl-gray-100": "#e6e7e9",
84
- "--wzl-gray-200": "#c9cbcf",
85
- "--wzl-gray-300": "#9ea1a8",
86
- "--wzl-gray-400": "#6f737b",
87
- "--wzl-gray-500": "#4d5058",
88
- "--wzl-gray-600": "#383b42",
89
- "--wzl-gray-700": "#25272c",
90
- "--wzl-gray-800": "#181a1e",
91
- "--wzl-gray-900": "#0e0f12",
92
- "--wzl-accent-soft": "#1d1454",
93
- "--wzl-accent-base": "#2e1f7a",
94
- "--wzl-accent-strong": "#5841b8",
95
- "--wzl-danger-base": "#d94a3f",
96
- "--wzl-warning-base": "#d99a3f",
97
- "--wzl-success-base": "#2ec27e",
98
- "--wzl-fg-on-accent": "#f5f5f6",
99
- "--wzl-fg": "#0e0f12",
100
- "--wzl-line-subtle": "rgba(14, 15, 18, 0.1)",
101
- "--wzl-line": "rgba(14, 15, 18, 0.2)",
102
- "--wzl-line-strong": "rgba(14, 15, 18, 0.4)",
103
- "--wzl-curve-color": "#5841b8",
104
- "--wzl-accent": "#2e1f7a",
105
- "--wzl-accent-hover": "#5841b8",
106
- "--wzl-danger": "#d94a3f",
107
- "--wzl-warning": "#d99a3f",
108
- "--wzl-success": "#2ec27e",
109
- "--wzl-focus-ring": "#5841b8",
110
- "--wzl-glass-tint": "#2e1f7a",
111
- "--wzl-text": "#0e0f12",
112
- "--wzl-fg-muted": "#383b42",
113
- "--wzl-text-muted": "#383b42",
114
- "--wzl-surface": "#f5f5f6",
115
- "--wzl-bg": "#f5f5f6",
116
- "--wzl-muted": "#383b42",
117
- "--wzl-panel-bg": "#f5f5f6",
118
- "--wzl-border": "#c9cbcf",
119
- "--wzl-panel-border": "#c9cbcf",
120
- "--wzl-surface-sunken": "#c9cbcf",
121
- "--wzl-input-bg": "#c9cbcf",
122
- "--wzl-track-bg": "#c9cbcf",
123
- "--wzl-track-border": "#c9cbcf",
124
- "--wzl-thumb-fill": "#383b42",
125
- "--wzl-border-strong": "#9ea1a8",
126
- "--wzl-thumb-border": "#9ea1a8",
127
- "--wzl-surface-raised": "#e6e7e9",
128
- "--wzl-button-fill": "#e6e7e9",
129
- "--wzl-button-fill-hover": "rgba(14, 15, 18, 0.1)",
130
- "--wzl-button-fill-pressed": "rgba(14, 15, 18, 0.18)",
131
- "--wzl-button-text": "#0e0f12",
132
- "--wzl-radius-sm": "3px",
133
- "--wzl-radius-md": "5px",
134
- "--wzl-border-w": "1px",
135
- "--wzl-line-width": "2px",
136
- "--wzl-curve-width": "3px",
137
- "--wzl-tb-height": "28px",
138
- "--wzl-motion-fast": "120ms",
139
- "--wzl-motion-medium": "240ms",
140
- "--wzl-ease-in-cubic": "cubic-bezier(0.32, 0, 0.67, 0)",
141
- "--wzl-ease-out-cubic": "cubic-bezier(0.33, 1, 0.68, 1)",
142
- "--wzl-ease-in-out-cubic": "cubic-bezier(0.65, 0, 0.35, 1)",
143
- "--wzl-ease-out-back": "cubic-bezier(0.34, 1.56, 0.64, 1)",
144
- "--wzl-font-ui": "Oswald, 'Helvetica Neue Condensed', 'Arial Narrow', system-ui, sans-serif",
145
- "--wzl-font-display": "Oswald, 'Helvetica Neue Condensed', 'Arial Narrow', system-ui, sans-serif",
146
- "--wzl-font-body": "Inter, system-ui, -apple-system, 'Segoe UI', sans-serif",
147
- "--wzl-font-mono": "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace",
148
- "--wzl-font-weight-light": "200",
149
- "--wzl-font-weight-normal": "300",
150
- "--wzl-font-weight-bold": "400",
151
- "--wzl-fg-subtle": "#4d5058",
152
- "--wzl-accent-fg": "#2e1f7a",
153
- "--wzl-thumb-text": "#f5f5f6"
154
- }
155
- }
156
- }
157
- };
1
+ import { weaselTheme } from './chunk-RATE4LL3.js';
2
+ export { THEMES, THEME_SOURCES, applyTheme, defineTheme, resolveTheme, weaselTheme } from './chunk-RATE4LL3.js';
158
3
 
159
4
  // src/generated/manifest.ts
160
5
  var TOKEN_MANIFEST = [
@@ -186,27 +31,37 @@ var TOKEN_MANIFEST = [
186
31
  { name: "--wzl-success", type: "color", group: "success", defaultValue: "#2ec27e", description: "" },
187
32
  { name: "--wzl-focus-ring", type: "color", group: "focus", defaultValue: "#5841b8", description: "" },
188
33
  { name: "--wzl-glass-tint", type: "color", group: "glass", defaultValue: "#2e1f7a", description: "Frosted-glass tint. Components compose it as color-mix(in srgb, var(--wzl-glass-tint) 78%, transparent) with backdrop-filter: blur(3px)." },
189
- { name: "--wzl-text", type: "color", group: "text", defaultValue: "#e6e7e9", description: "" },
190
- { name: "--wzl-text-muted", type: "color", group: "text", defaultValue: "#9ea1a8", description: "" },
191
- { name: "--wzl-bg", type: "color", group: "bg", defaultValue: "#181a1e", description: "" },
192
- { name: "--wzl-muted", type: "color", group: "muted", defaultValue: "#9ea1a8", description: "" },
193
- { name: "--wzl-panel-bg", type: "color", group: "panel", defaultValue: "#181a1e", description: "" },
194
- { name: "--wzl-panel-border", type: "color", group: "panel", defaultValue: "#25272c", description: "" },
195
- { name: "--wzl-input-bg", type: "color", group: "input", defaultValue: "#0e0f12", description: "" },
196
- { name: "--wzl-track-bg", type: "color", group: "track", defaultValue: "#0e0f12", description: "" },
197
- { name: "--wzl-track-border", type: "color", group: "track", defaultValue: "#25272c", description: "" },
198
- { name: "--wzl-thumb-fill", type: "color", group: "thumb", defaultValue: "#9ea1a8", description: "" },
199
- { name: "--wzl-thumb-border", type: "color", group: "thumb", defaultValue: "#383b42", description: "" },
200
- { name: "--wzl-button-fill", type: "color", group: "button", defaultValue: "#25272c", description: "" },
201
- { name: "--wzl-button-fill-hover", type: "color", group: "button", defaultValue: "rgba(230, 231, 233, 0.1)", description: "" },
202
- { name: "--wzl-button-fill-pressed", type: "color", group: "button", defaultValue: "rgba(230, 231, 233, 0.18)", description: "" },
203
- { name: "--wzl-button-text", type: "color", group: "button", defaultValue: "#e6e7e9", description: "" },
34
+ { name: "--wzl-surface-hover", type: "color", group: "surface", defaultValue: "rgba(230, 231, 233, 0.1)", description: "Hover wash over a raised surface. Same formula as line-subtle, different job \u2014 do not collapse them." },
35
+ { name: "--wzl-surface-pressed", type: "color", group: "surface", defaultValue: "rgba(230, 231, 233, 0.18)", description: "Pressed wash over a raised surface." },
36
+ { name: "--wzl-swatch-green", type: "color", group: "swatch", defaultValue: "#2fdd18", description: "First of ten categorical spot colors for plotting, status and data viz. Ordered \u2014 take them in sequence. Mode-invariant on purpose: a series keeps its color when the mode flips." },
37
+ { name: "--wzl-swatch-pink", type: "color", group: "swatch", defaultValue: "#ff5885", description: "" },
38
+ { name: "--wzl-swatch-cyan", type: "color", group: "swatch", defaultValue: "#00dfff", description: "" },
39
+ { name: "--wzl-swatch-gold", type: "color", group: "swatch", defaultValue: "#dcb700", description: "" },
40
+ { name: "--wzl-swatch-amber", type: "color", group: "swatch", defaultValue: "#ff8c00", description: "" },
41
+ { name: "--wzl-swatch-violet", type: "color", group: "swatch", defaultValue: "#a497ff", description: "" },
42
+ { name: "--wzl-swatch-mint", type: "color", group: "swatch", defaultValue: "#00e7af", description: "" },
43
+ { name: "--wzl-swatch-sky", type: "color", group: "swatch", defaultValue: "#00b8ff", description: "" },
44
+ { name: "--wzl-swatch-orange", type: "color", group: "swatch", defaultValue: "#ff6b00", description: "" },
45
+ { name: "--wzl-swatch-magenta", type: "color", group: "swatch", defaultValue: "#ff6eff", description: "" },
204
46
  { name: "--wzl-radius-sm", type: "dimension", group: "radius", defaultValue: "3px", description: "" },
205
47
  { name: "--wzl-radius-md", type: "dimension", group: "radius", defaultValue: "5px", description: "" },
206
48
  { name: "--wzl-border-w", type: "dimension", group: "border", defaultValue: "1px", description: "" },
207
49
  { name: "--wzl-line-width", type: "dimension", group: "line", defaultValue: "2px", description: "Structural lines \u2014 gridlines, dividers, axes." },
208
50
  { name: "--wzl-curve-width", type: "dimension", group: "curve", defaultValue: "3px", description: "Drawn data curves. Heavier than structural lines so data reads as primary content." },
209
51
  { name: "--wzl-tb-height", type: "dimension", group: "tb", defaultValue: "28px", description: "Height of a horizontal toolbar strip (ActionsBar, OptionsBar, ToggleBar, ToolOptionsBar)." },
52
+ { name: "--wzl-radius-lg", type: "dimension", group: "radius", defaultValue: "14px", description: "" },
53
+ { name: "--wzl-control-h", type: "dimension", group: "control", defaultValue: "28px", description: "Height of an interactive control \u2014 button, input, select. Distinct from tb-height, which sizes the strip a row of them sits in." },
54
+ { name: "--wzl-glass-blur", type: "dimension", group: "glass", defaultValue: "3px", description: "Backdrop blur radius for frosted surfaces. Pairs with glass-tint." },
55
+ { name: "--wzl-font-size", type: "dimension", group: "font", defaultValue: "13px", description: "" },
56
+ { name: "--wzl-font-size-sm", type: "dimension", group: "font", defaultValue: "11px", description: "" },
57
+ { name: "--wzl-space-xs", type: "dimension", group: "space", defaultValue: "4px", description: "" },
58
+ { name: "--wzl-space-sm", type: "dimension", group: "space", defaultValue: "8px", description: "" },
59
+ { name: "--wzl-space-md", type: "dimension", group: "space", defaultValue: "12px", description: "" },
60
+ { name: "--wzl-space-lg", type: "dimension", group: "space", defaultValue: "16px", description: "" },
61
+ { name: "--wzl-z-toolbar", type: "number", group: "z", defaultValue: "10", description: "" },
62
+ { name: "--wzl-z-overlay", type: "number", group: "z", defaultValue: "20", description: "" },
63
+ { name: "--wzl-z-modal", type: "number", group: "z", defaultValue: "30", description: "" },
64
+ { name: "--wzl-backdrop", type: "gradient", group: "backdrop", defaultValue: "none", description: "Layered backdrop fill for a page or lab root. `none` here; a theme with a signature background sets it." },
210
65
  { name: "--wzl-motion-fast", type: "duration", group: "motion", defaultValue: "120ms", description: "Micro-interactions \u2014 hover, focus, pressed." },
211
66
  { name: "--wzl-motion-medium", type: "duration", group: "motion", defaultValue: "240ms", description: "Entrances and exits \u2014 toasts, popovers, panels." },
212
67
  { name: "--wzl-ease-in-cubic", type: "cubicBezier", group: "ease", defaultValue: "cubic-bezier(0.32, 0, 0.67, 0)", description: "" },
@@ -219,6 +74,7 @@ var TOKEN_MANIFEST = [
219
74
  { name: "--wzl-font-mono", type: "fontFamily", group: "font", defaultValue: "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace", description: "" },
220
75
  { name: "--wzl-font-weight-light", type: "fontWeight", group: "font", defaultValue: "200", description: "" },
221
76
  { name: "--wzl-font-weight-normal", type: "fontWeight", group: "font", defaultValue: "300", description: "" },
77
+ { name: "--wzl-font-weight-medium", type: "fontWeight", group: "font", defaultValue: "350", description: "" },
222
78
  { name: "--wzl-font-weight-bold", type: "fontWeight", group: "font", defaultValue: "400", description: "" },
223
79
  { name: "--wzl-surface", type: "color", group: "surface", defaultValue: "#181a1e", description: "" },
224
80
  { name: "--wzl-surface-raised", type: "color", group: "surface", defaultValue: "#25272c", description: "" },
@@ -229,12 +85,63 @@ var TOKEN_MANIFEST = [
229
85
  { name: "--wzl-border", type: "color", group: "border", defaultValue: "#25272c", description: "" },
230
86
  { name: "--wzl-border-strong", type: "color", group: "border", defaultValue: "#383b42", description: "" },
231
87
  { name: "--wzl-accent-fg", type: "color", group: "accent", defaultValue: "#5841b8", description: "Accent for foreground use \u2014 text, icons, selected labels drawn on a surface. accent is a fill; the midnight base is too dim to read as text on dark surfaces." },
232
- { name: "--wzl-thumb-text", type: "color", group: "thumb", defaultValue: "#0e0f12", description: "" }
88
+ { name: "--wzl-fg-inverse", type: "color", group: "fg", defaultValue: "#0e0f12", description: "Text drawn on a filled foreground-colored element (e.g. a slider thumb). Flips with the mode, so it is a semantic, not an alias to a primitive." }
233
89
  ];
234
90
 
235
- // src/index.ts
236
- var DEFAULT_TOKENS = THEMES.weasel.modes[THEMES.weasel.defaultMode];
91
+ // src/dtcg/types.ts
92
+ var ALPHA_EXT = "com.weasel.alpha";
93
+
94
+ // src/dtcg/flatten.ts
95
+ var isToken = (v) => typeof v === "object" && v !== null && "$value" in v;
96
+ function flattenTokens(doc) {
97
+ const out = {};
98
+ for (const [groupName, group] of Object.entries(doc)) {
99
+ if (groupName.startsWith("$")) continue;
100
+ if (typeof group !== "object" || group === null) continue;
101
+ const g = group;
102
+ const groupType = g.$type;
103
+ for (const [leaf, node] of Object.entries(g)) {
104
+ if (leaf.startsWith("$")) continue;
105
+ if (!isToken(node)) continue;
106
+ const type = node.$type ?? groupType;
107
+ if (!type) {
108
+ throw new Error(`Token "${leaf}" has no $type and its group "${groupName}" declares none`);
109
+ }
110
+ if (leaf in out) {
111
+ throw new Error(`Duplicate token name "${leaf}" \u2014 leaf keys must be unique across type groups`);
112
+ }
113
+ const alphaRaw = node.$extensions?.[ALPHA_EXT];
114
+ const token = {
115
+ type,
116
+ value: node.$value,
117
+ alpha: typeof alphaRaw === "number" ? alphaRaw : void 0,
118
+ description: node.$description
119
+ };
120
+ out[leaf] = token;
121
+ }
122
+ }
123
+ return out;
124
+ }
125
+
126
+ // src/loadDTCG.ts
127
+ function loadDTCG(doc) {
128
+ if (typeof doc.name !== "string" || doc.name === "") {
129
+ throw new Error('DTCG document needs a string "name"');
130
+ }
131
+ const modes = {};
132
+ for (const [mode, body] of Object.entries(doc.modes ?? {})) {
133
+ modes[mode] = flattenTokens(body);
134
+ }
135
+ const base = doc.extends === void 0 ? weaselTheme : doc.extends;
136
+ return {
137
+ name: doc.name,
138
+ extends: base,
139
+ defaultMode: typeof doc.defaultMode === "string" ? doc.defaultMode : base?.defaultMode ?? "dark",
140
+ tokens: flattenTokens(doc.primitives ?? {}),
141
+ modes
142
+ };
143
+ }
237
144
 
238
- export { DEFAULT_TOKENS, THEMES, TOKEN_MANIFEST };
145
+ export { TOKEN_MANIFEST, loadDTCG };
239
146
  //# sourceMappingURL=index.js.map
240
147
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/generated/themes.ts","../src/generated/manifest.ts","../src/index.ts"],"names":[],"mappings":";AAkFO,IAAM,MAAA,GAAS;AAAA,EACpB,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,QAAA;AAAA,IACN,WAAA,EAAa,MAAA;AAAA,IACb,KAAA,EAAO;AAAA,MACP,M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OAAO,SAAA,EAAW,YAAA,EAAc,SAAA,EAAW,WAAA,EAAa,EAAA,EAAG;AAAA,EAC1G,EAAE,IAAA,EAAM,UAAA,EAAY,IAAA,EAAM,OAAA,EAAS,OAAO,IAAA,EAAM,YAAA,EAAc,SAAA,EAAW,WAAA,EAAa,EAAA,EAAG;AAAA,EACzF,EAAE,IAAA,EAAM,gBAAA,EAAkB,IAAA,EAAM,OAAA,EAAS,OAAO,IAAA,EAAM,YAAA,EAAc,SAAA,EAAW,WAAA,EAAa,EAAA,EAAG;AAAA,EAC/F,EAAE,IAAA,EAAM,iBAAA,EAAmB,IAAA,EAAM,OAAA,EAAS,OAAO,IAAA,EAAM,YAAA,EAAc,SAAA,EAAW,WAAA,EAAa,EAAA,EAAG;AAAA,EAChG,EAAE,IAAA,EAAM,cAAA,EAAgB,IAAA,EAAM,OAAA,EAAS,OAAO,QAAA,EAAU,YAAA,EAAc,SAAA,EAAW,WAAA,EAAa,EAAA,EAAG;AAAA,EACjG,EAAE,IAAA,EAAM,qBAAA,EAAuB,IAAA,EAAM,OAAA,EAAS,OAAO,QAAA,EAAU,YAAA,EAAc,SAAA,EAAW,WAAA,EAAa,EAAA,EAAG;AAAA,EACxG,EAAE,IAAA,EAAM,iBAAA,EAAmB,IAAA,EAAM,OAAA,EAAS,OAAO,QAAA,EAAU,YAAA,EAAc,SAAA,EAAW,WAAA,EAAa,oKAAA,EAAgK;AAAA,EACjQ,EAAE,IAAA,EAAM,kBAAA,EAAoB,IAAA,EAAM,OAAA,EAAS,OAAO,OAAA,EAAS,YAAA,EAAc,SAAA,EAAW,WAAA,EAAa,EAAA;AACnG;;;ACxEO,IAAM,iBAAiB,MAAA,CAAO,MAAA,CAAO,KAAA,CAAM,MAAA,CAAO,OAAO,WAAW","file":"index.js","sourcesContent":["// GENERATED by packages/theme/scripts/build-tokens.ts — do not edit.\n\nexport type TokenName =\n | '--wzl-accent'\n | '--wzl-accent-base'\n | '--wzl-accent-fg'\n | '--wzl-accent-hover'\n | '--wzl-accent-soft'\n | '--wzl-accent-strong'\n | '--wzl-bg'\n | '--wzl-border'\n | '--wzl-border-strong'\n | '--wzl-border-w'\n | '--wzl-button-fill'\n | '--wzl-button-fill-hover'\n | '--wzl-button-fill-pressed'\n | '--wzl-button-text'\n | '--wzl-curve-color'\n | '--wzl-curve-width'\n | '--wzl-danger'\n | '--wzl-danger-base'\n | '--wzl-ease-in-cubic'\n | '--wzl-ease-in-out-cubic'\n | '--wzl-ease-out-back'\n | '--wzl-ease-out-cubic'\n | '--wzl-fg'\n | '--wzl-fg-muted'\n | '--wzl-fg-on-accent'\n | '--wzl-fg-subtle'\n | '--wzl-focus-ring'\n | '--wzl-font-body'\n | '--wzl-font-display'\n | '--wzl-font-mono'\n | '--wzl-font-ui'\n | '--wzl-font-weight-bold'\n | '--wzl-font-weight-light'\n | '--wzl-font-weight-normal'\n | '--wzl-glass-tint'\n | '--wzl-gray-100'\n | '--wzl-gray-200'\n | '--wzl-gray-300'\n | '--wzl-gray-400'\n | '--wzl-gray-50'\n | '--wzl-gray-500'\n | '--wzl-gray-600'\n | '--wzl-gray-700'\n | '--wzl-gray-800'\n | '--wzl-gray-900'\n | '--wzl-input-bg'\n | '--wzl-line'\n | '--wzl-line-strong'\n | '--wzl-line-subtle'\n | '--wzl-line-width'\n | '--wzl-motion-fast'\n | '--wzl-motion-medium'\n | '--wzl-muted'\n | '--wzl-panel-bg'\n | '--wzl-panel-border'\n | '--wzl-radius-md'\n | '--wzl-radius-sm'\n | '--wzl-success'\n | '--wzl-success-base'\n | '--wzl-surface'\n | '--wzl-surface-raised'\n | '--wzl-surface-sunken'\n | '--wzl-tb-height'\n | '--wzl-text'\n | '--wzl-text-muted'\n | '--wzl-thumb-border'\n | '--wzl-thumb-fill'\n | '--wzl-thumb-text'\n | '--wzl-track-bg'\n | '--wzl-track-border'\n | '--wzl-warning'\n | '--wzl-warning-base';\n\nexport interface GeneratedTheme {\n readonly name: string;\n readonly defaultMode: string;\n readonly modes: Readonly<Record<string, Readonly<Record<TokenName, string>>>>;\n}\n\nexport const THEMES = {\n \"weasel\": {\n name: \"weasel\",\n defaultMode: \"dark\",\n modes: {\n \"dark\": {\n '--wzl-gray-50': \"#f5f5f6\",\n '--wzl-gray-100': \"#e6e7e9\",\n '--wzl-gray-200': \"#c9cbcf\",\n '--wzl-gray-300': \"#9ea1a8\",\n '--wzl-gray-400': \"#6f737b\",\n '--wzl-gray-500': \"#4d5058\",\n '--wzl-gray-600': \"#383b42\",\n '--wzl-gray-700': \"#25272c\",\n '--wzl-gray-800': \"#181a1e\",\n '--wzl-gray-900': \"#0e0f12\",\n '--wzl-accent-soft': \"#1d1454\",\n '--wzl-accent-base': \"#2e1f7a\",\n '--wzl-accent-strong': \"#5841b8\",\n '--wzl-danger-base': \"#d94a3f\",\n '--wzl-warning-base': \"#d99a3f\",\n '--wzl-success-base': \"#2ec27e\",\n '--wzl-fg-on-accent': \"#f5f5f6\",\n '--wzl-fg': \"#e6e7e9\",\n '--wzl-line-subtle': \"rgba(230, 231, 233, 0.1)\",\n '--wzl-line': \"rgba(230, 231, 233, 0.2)\",\n '--wzl-line-strong': \"rgba(230, 231, 233, 0.4)\",\n '--wzl-curve-color': \"#5841b8\",\n '--wzl-accent': \"#2e1f7a\",\n '--wzl-accent-hover': \"#5841b8\",\n '--wzl-danger': \"#d94a3f\",\n '--wzl-warning': \"#d99a3f\",\n '--wzl-success': \"#2ec27e\",\n '--wzl-focus-ring': \"#5841b8\",\n '--wzl-glass-tint': \"#2e1f7a\",\n '--wzl-text': \"#e6e7e9\",\n '--wzl-fg-muted': \"#9ea1a8\",\n '--wzl-text-muted': \"#9ea1a8\",\n '--wzl-surface': \"#181a1e\",\n '--wzl-bg': \"#181a1e\",\n '--wzl-muted': \"#9ea1a8\",\n '--wzl-panel-bg': \"#181a1e\",\n '--wzl-border': \"#25272c\",\n '--wzl-panel-border': \"#25272c\",\n '--wzl-surface-sunken': \"#0e0f12\",\n '--wzl-input-bg': \"#0e0f12\",\n '--wzl-track-bg': \"#0e0f12\",\n '--wzl-track-border': \"#25272c\",\n '--wzl-thumb-fill': \"#9ea1a8\",\n '--wzl-border-strong': \"#383b42\",\n '--wzl-thumb-border': \"#383b42\",\n '--wzl-surface-raised': \"#25272c\",\n '--wzl-button-fill': \"#25272c\",\n '--wzl-button-fill-hover': \"rgba(230, 231, 233, 0.1)\",\n '--wzl-button-fill-pressed': \"rgba(230, 231, 233, 0.18)\",\n '--wzl-button-text': \"#e6e7e9\",\n '--wzl-radius-sm': \"3px\",\n '--wzl-radius-md': \"5px\",\n '--wzl-border-w': \"1px\",\n '--wzl-line-width': \"2px\",\n '--wzl-curve-width': \"3px\",\n '--wzl-tb-height': \"28px\",\n '--wzl-motion-fast': \"120ms\",\n '--wzl-motion-medium': \"240ms\",\n '--wzl-ease-in-cubic': \"cubic-bezier(0.32, 0, 0.67, 0)\",\n '--wzl-ease-out-cubic': \"cubic-bezier(0.33, 1, 0.68, 1)\",\n '--wzl-ease-in-out-cubic': \"cubic-bezier(0.65, 0, 0.35, 1)\",\n '--wzl-ease-out-back': \"cubic-bezier(0.34, 1.56, 0.64, 1)\",\n '--wzl-font-ui': \"Oswald, 'Helvetica Neue Condensed', 'Arial Narrow', system-ui, sans-serif\",\n '--wzl-font-display': \"Oswald, 'Helvetica Neue Condensed', 'Arial Narrow', system-ui, sans-serif\",\n '--wzl-font-body': \"Inter, system-ui, -apple-system, 'Segoe UI', sans-serif\",\n '--wzl-font-mono': \"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace\",\n '--wzl-font-weight-light': \"200\",\n '--wzl-font-weight-normal': \"300\",\n '--wzl-font-weight-bold': \"400\",\n '--wzl-fg-subtle': \"#6f737b\",\n '--wzl-accent-fg': \"#5841b8\",\n '--wzl-thumb-text': \"#0e0f12\",\n },\n \"light\": {\n '--wzl-gray-50': \"#f5f5f6\",\n '--wzl-gray-100': \"#e6e7e9\",\n '--wzl-gray-200': \"#c9cbcf\",\n '--wzl-gray-300': \"#9ea1a8\",\n '--wzl-gray-400': \"#6f737b\",\n '--wzl-gray-500': \"#4d5058\",\n '--wzl-gray-600': \"#383b42\",\n '--wzl-gray-700': \"#25272c\",\n '--wzl-gray-800': \"#181a1e\",\n '--wzl-gray-900': \"#0e0f12\",\n '--wzl-accent-soft': \"#1d1454\",\n '--wzl-accent-base': \"#2e1f7a\",\n '--wzl-accent-strong': \"#5841b8\",\n '--wzl-danger-base': \"#d94a3f\",\n '--wzl-warning-base': \"#d99a3f\",\n '--wzl-success-base': \"#2ec27e\",\n '--wzl-fg-on-accent': \"#f5f5f6\",\n '--wzl-fg': \"#0e0f12\",\n '--wzl-line-subtle': \"rgba(14, 15, 18, 0.1)\",\n '--wzl-line': \"rgba(14, 15, 18, 0.2)\",\n '--wzl-line-strong': \"rgba(14, 15, 18, 0.4)\",\n '--wzl-curve-color': \"#5841b8\",\n '--wzl-accent': \"#2e1f7a\",\n '--wzl-accent-hover': \"#5841b8\",\n '--wzl-danger': \"#d94a3f\",\n '--wzl-warning': \"#d99a3f\",\n '--wzl-success': \"#2ec27e\",\n '--wzl-focus-ring': \"#5841b8\",\n '--wzl-glass-tint': \"#2e1f7a\",\n '--wzl-text': \"#0e0f12\",\n '--wzl-fg-muted': \"#383b42\",\n '--wzl-text-muted': \"#383b42\",\n '--wzl-surface': \"#f5f5f6\",\n '--wzl-bg': \"#f5f5f6\",\n '--wzl-muted': \"#383b42\",\n '--wzl-panel-bg': \"#f5f5f6\",\n '--wzl-border': \"#c9cbcf\",\n '--wzl-panel-border': \"#c9cbcf\",\n '--wzl-surface-sunken': \"#c9cbcf\",\n '--wzl-input-bg': \"#c9cbcf\",\n '--wzl-track-bg': \"#c9cbcf\",\n '--wzl-track-border': \"#c9cbcf\",\n '--wzl-thumb-fill': \"#383b42\",\n '--wzl-border-strong': \"#9ea1a8\",\n '--wzl-thumb-border': \"#9ea1a8\",\n '--wzl-surface-raised': \"#e6e7e9\",\n '--wzl-button-fill': \"#e6e7e9\",\n '--wzl-button-fill-hover': \"rgba(14, 15, 18, 0.1)\",\n '--wzl-button-fill-pressed': \"rgba(14, 15, 18, 0.18)\",\n '--wzl-button-text': \"#0e0f12\",\n '--wzl-radius-sm': \"3px\",\n '--wzl-radius-md': \"5px\",\n '--wzl-border-w': \"1px\",\n '--wzl-line-width': \"2px\",\n '--wzl-curve-width': \"3px\",\n '--wzl-tb-height': \"28px\",\n '--wzl-motion-fast': \"120ms\",\n '--wzl-motion-medium': \"240ms\",\n '--wzl-ease-in-cubic': \"cubic-bezier(0.32, 0, 0.67, 0)\",\n '--wzl-ease-out-cubic': \"cubic-bezier(0.33, 1, 0.68, 1)\",\n '--wzl-ease-in-out-cubic': \"cubic-bezier(0.65, 0, 0.35, 1)\",\n '--wzl-ease-out-back': \"cubic-bezier(0.34, 1.56, 0.64, 1)\",\n '--wzl-font-ui': \"Oswald, 'Helvetica Neue Condensed', 'Arial Narrow', system-ui, sans-serif\",\n '--wzl-font-display': \"Oswald, 'Helvetica Neue Condensed', 'Arial Narrow', system-ui, sans-serif\",\n '--wzl-font-body': \"Inter, system-ui, -apple-system, 'Segoe UI', sans-serif\",\n '--wzl-font-mono': \"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace\",\n '--wzl-font-weight-light': \"200\",\n '--wzl-font-weight-normal': \"300\",\n '--wzl-font-weight-bold': \"400\",\n '--wzl-fg-subtle': \"#4d5058\",\n '--wzl-accent-fg': \"#2e1f7a\",\n '--wzl-thumb-text': \"#f5f5f6\",\n },\n },\n },\n} as const satisfies Record<string, GeneratedTheme>;\n","// GENERATED by packages/theme/scripts/build-tokens.ts — do not edit.\n\nexport interface TokenManifestEntry {\n readonly name: string;\n readonly type: string;\n readonly group: string;\n readonly defaultValue: string;\n readonly description: string;\n}\n\nexport const TOKEN_MANIFEST: readonly TokenManifestEntry[] = [\n { name: '--wzl-gray-50', type: \"color\", group: \"gray\", defaultValue: \"#f5f5f6\", description: \"\" },\n { name: '--wzl-gray-100', type: \"color\", group: \"gray\", defaultValue: \"#e6e7e9\", description: \"\" },\n { name: '--wzl-gray-200', type: \"color\", group: \"gray\", defaultValue: \"#c9cbcf\", description: \"\" },\n { name: '--wzl-gray-300', type: \"color\", group: \"gray\", defaultValue: \"#9ea1a8\", description: \"\" },\n { name: '--wzl-gray-400', type: \"color\", group: \"gray\", defaultValue: \"#6f737b\", description: \"\" },\n { name: '--wzl-gray-500', type: \"color\", group: \"gray\", defaultValue: \"#4d5058\", description: \"\" },\n { name: '--wzl-gray-600', type: \"color\", group: \"gray\", defaultValue: \"#383b42\", description: \"\" },\n { name: '--wzl-gray-700', type: \"color\", group: \"gray\", defaultValue: \"#25272c\", description: \"\" },\n { name: '--wzl-gray-800', type: \"color\", group: \"gray\", defaultValue: \"#181a1e\", description: \"\" },\n { name: '--wzl-gray-900', type: \"color\", group: \"gray\", defaultValue: \"#0e0f12\", description: \"\" },\n { name: '--wzl-accent-soft', type: \"color\", group: \"accent\", defaultValue: \"#1d1454\", description: \"\" },\n { name: '--wzl-accent-base', type: \"color\", group: \"accent\", defaultValue: \"#2e1f7a\", description: \"Midnight blue-violet. Deep and saturated; anchors primary actions on light and dark surfaces alike.\" },\n { name: '--wzl-accent-strong', type: \"color\", group: \"accent\", defaultValue: \"#5841b8\", description: \"\" },\n { name: '--wzl-danger-base', type: \"color\", group: \"danger\", defaultValue: \"#d94a3f\", description: \"\" },\n { name: '--wzl-warning-base', type: \"color\", group: \"warning\", defaultValue: \"#d99a3f\", description: \"\" },\n { name: '--wzl-success-base', type: \"color\", group: \"success\", defaultValue: \"#2ec27e\", description: \"\" },\n { name: '--wzl-fg-on-accent', type: \"color\", group: \"fg\", defaultValue: \"#f5f5f6\", description: \"\" },\n { name: '--wzl-line-subtle', type: \"color\", group: \"line\", defaultValue: \"rgba(230, 231, 233, 0.1)\", description: \"Barely-there separators (table rows).\" },\n { name: '--wzl-line', type: \"color\", group: \"line\", defaultValue: \"rgba(230, 231, 233, 0.2)\", description: \"Primary gridlines on sunken surfaces.\" },\n { name: '--wzl-line-strong', type: \"color\", group: \"line\", defaultValue: \"rgba(230, 231, 233, 0.4)\", description: \"Axes and emphasized dividers.\" },\n { name: '--wzl-curve-color', type: \"color\", group: \"curve\", defaultValue: \"#5841b8\", description: \"Drawn data curves. Routes through the bright accent because accent-base is too dim on sunken surfaces.\" },\n { name: '--wzl-accent', type: \"color\", group: \"accent\", defaultValue: \"#2e1f7a\", description: \"\" },\n { name: '--wzl-accent-hover', type: \"color\", group: \"accent\", defaultValue: \"#5841b8\", description: \"\" },\n { name: '--wzl-danger', type: \"color\", group: \"danger\", defaultValue: \"#d94a3f\", description: \"\" },\n { name: '--wzl-warning', type: \"color\", group: \"warning\", defaultValue: \"#d99a3f\", description: \"\" },\n { name: '--wzl-success', type: \"color\", group: \"success\", defaultValue: \"#2ec27e\", description: \"\" },\n { name: '--wzl-focus-ring', type: \"color\", group: \"focus\", defaultValue: \"#5841b8\", description: \"\" },\n { name: '--wzl-glass-tint', type: \"color\", group: \"glass\", defaultValue: \"#2e1f7a\", description: \"Frosted-glass tint. Components compose it as color-mix(in srgb, var(--wzl-glass-tint) 78%, transparent) with backdrop-filter: blur(3px).\" },\n { name: '--wzl-text', type: \"color\", group: \"text\", defaultValue: \"#e6e7e9\", description: \"\" },\n { name: '--wzl-text-muted', type: \"color\", group: \"text\", defaultValue: \"#9ea1a8\", description: \"\" },\n { name: '--wzl-bg', type: \"color\", group: \"bg\", defaultValue: \"#181a1e\", description: \"\" },\n { name: '--wzl-muted', type: \"color\", group: \"muted\", defaultValue: \"#9ea1a8\", description: \"\" },\n { name: '--wzl-panel-bg', type: \"color\", group: \"panel\", defaultValue: \"#181a1e\", description: \"\" },\n { name: '--wzl-panel-border', type: \"color\", group: \"panel\", defaultValue: \"#25272c\", description: \"\" },\n { name: '--wzl-input-bg', type: \"color\", group: \"input\", defaultValue: \"#0e0f12\", description: \"\" },\n { name: '--wzl-track-bg', type: \"color\", group: \"track\", defaultValue: \"#0e0f12\", description: \"\" },\n { name: '--wzl-track-border', type: \"color\", group: \"track\", defaultValue: \"#25272c\", description: \"\" },\n { name: '--wzl-thumb-fill', type: \"color\", group: \"thumb\", defaultValue: \"#9ea1a8\", description: \"\" },\n { name: '--wzl-thumb-border', type: \"color\", group: \"thumb\", defaultValue: \"#383b42\", description: \"\" },\n { name: '--wzl-button-fill', type: \"color\", group: \"button\", defaultValue: \"#25272c\", description: \"\" },\n { name: '--wzl-button-fill-hover', type: \"color\", group: \"button\", defaultValue: \"rgba(230, 231, 233, 0.1)\", description: \"\" },\n { name: '--wzl-button-fill-pressed', type: \"color\", group: \"button\", defaultValue: \"rgba(230, 231, 233, 0.18)\", description: \"\" },\n { name: '--wzl-button-text', type: \"color\", group: \"button\", defaultValue: \"#e6e7e9\", description: \"\" },\n { name: '--wzl-radius-sm', type: \"dimension\", group: \"radius\", defaultValue: \"3px\", description: \"\" },\n { name: '--wzl-radius-md', type: \"dimension\", group: \"radius\", defaultValue: \"5px\", description: \"\" },\n { name: '--wzl-border-w', type: \"dimension\", group: \"border\", defaultValue: \"1px\", description: \"\" },\n { name: '--wzl-line-width', type: \"dimension\", group: \"line\", defaultValue: \"2px\", description: \"Structural lines — gridlines, dividers, axes.\" },\n { name: '--wzl-curve-width', type: \"dimension\", group: \"curve\", defaultValue: \"3px\", description: \"Drawn data curves. Heavier than structural lines so data reads as primary content.\" },\n { name: '--wzl-tb-height', type: \"dimension\", group: \"tb\", defaultValue: \"28px\", description: \"Height of a horizontal toolbar strip (ActionsBar, OptionsBar, ToggleBar, ToolOptionsBar).\" },\n { name: '--wzl-motion-fast', type: \"duration\", group: \"motion\", defaultValue: \"120ms\", description: \"Micro-interactions — hover, focus, pressed.\" },\n { name: '--wzl-motion-medium', type: \"duration\", group: \"motion\", defaultValue: \"240ms\", description: \"Entrances and exits — toasts, popovers, panels.\" },\n { name: '--wzl-ease-in-cubic', type: \"cubicBezier\", group: \"ease\", defaultValue: \"cubic-bezier(0.32, 0, 0.67, 0)\", description: \"\" },\n { name: '--wzl-ease-out-cubic', type: \"cubicBezier\", group: \"ease\", defaultValue: \"cubic-bezier(0.33, 1, 0.68, 1)\", description: \"\" },\n { name: '--wzl-ease-in-out-cubic', type: \"cubicBezier\", group: \"ease\", defaultValue: \"cubic-bezier(0.65, 0, 0.35, 1)\", description: \"\" },\n { name: '--wzl-ease-out-back', type: \"cubicBezier\", group: \"ease\", defaultValue: \"cubic-bezier(0.34, 1.56, 0.64, 1)\", description: \"\" },\n { name: '--wzl-font-ui', type: \"fontFamily\", group: \"font\", defaultValue: \"Oswald, 'Helvetica Neue Condensed', 'Arial Narrow', system-ui, sans-serif\", description: \"Condensed UI/display face. The heavier cuts get blocky at any size, so the weight tokens stay in the 200-400 range.\" },\n { name: '--wzl-font-display', type: \"fontFamily\", group: \"font\", defaultValue: \"Oswald, 'Helvetica Neue Condensed', 'Arial Narrow', system-ui, sans-serif\", description: \"\" },\n { name: '--wzl-font-body', type: \"fontFamily\", group: \"font\", defaultValue: \"Inter, system-ui, -apple-system, 'Segoe UI', sans-serif\", description: \"\" },\n { name: '--wzl-font-mono', type: \"fontFamily\", group: \"font\", defaultValue: \"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace\", description: \"\" },\n { name: '--wzl-font-weight-light', type: \"fontWeight\", group: \"font\", defaultValue: \"200\", description: \"\" },\n { name: '--wzl-font-weight-normal', type: \"fontWeight\", group: \"font\", defaultValue: \"300\", description: \"\" },\n { name: '--wzl-font-weight-bold', type: \"fontWeight\", group: \"font\", defaultValue: \"400\", description: \"\" },\n { name: '--wzl-surface', type: \"color\", group: \"surface\", defaultValue: \"#181a1e\", description: \"\" },\n { name: '--wzl-surface-raised', type: \"color\", group: \"surface\", defaultValue: \"#25272c\", description: \"\" },\n { name: '--wzl-surface-sunken', type: \"color\", group: \"surface\", defaultValue: \"#0e0f12\", description: \"\" },\n { name: '--wzl-fg', type: \"color\", group: \"fg\", defaultValue: \"#e6e7e9\", description: \"\" },\n { name: '--wzl-fg-muted', type: \"color\", group: \"fg\", defaultValue: \"#9ea1a8\", description: \"\" },\n { name: '--wzl-fg-subtle', type: \"color\", group: \"fg\", defaultValue: \"#6f737b\", description: \"\" },\n { name: '--wzl-border', type: \"color\", group: \"border\", defaultValue: \"#25272c\", description: \"\" },\n { name: '--wzl-border-strong', type: \"color\", group: \"border\", defaultValue: \"#383b42\", description: \"\" },\n { name: '--wzl-accent-fg', type: \"color\", group: \"accent\", defaultValue: \"#5841b8\", description: \"Accent for foreground use — text, icons, selected labels drawn on a surface. accent is a fill; the midnight base is too dim to read as text on dark surfaces.\" },\n { name: '--wzl-thumb-text', type: \"color\", group: \"thumb\", defaultValue: \"#0e0f12\", description: \"\" },\n];\n","export { THEMES, type TokenName, type GeneratedTheme } from './generated/themes';\nexport { TOKEN_MANIFEST, type TokenManifestEntry } from './generated/manifest';\n\nimport { THEMES } from './generated/themes';\n\n/**\n * Default token values for the built-in theme's default mode.\n *\n * Retained under its original name because `@weasel-js/hud` reads it as a\n * boot-window fallback. Plan B replaces that consumer with a resolved theme.\n */\nexport const DEFAULT_TOKENS = THEMES.weasel.modes[THEMES.weasel.defaultMode];\n"]}
1
+ {"version":3,"sources":["../src/generated/manifest.ts","../src/dtcg/types.ts","../src/dtcg/flatten.ts","../src/loadDTCG.ts"],"names":[],"mappings":";;;;AAUO,IAAM,cAAA,GAAgD;AAAA,EAC3D,EAAE,IAAA,EAAM,eAAA,EAAiB,IAAA,EAAM,OAAA,EAAS,OAAO,MAAA,EAAQ,YAAA,EAAc,SAAA,EAAW,WAAA,EAAa,EAAA,EAAG;AAAA,EAChG,EAAE,IAAA,EAAM,gBAAA,EAAkB,IAAA,EAAM,OAAA,EAAS,OAAO,MAAA,EAAQ,YAAA,EAAc,SAAA,EAAW,WAAA,EAAa,EAAA,EAAG;AAAA,EACjG,EAAE,IAAA,EAAM,gBAAA,EAAkB,IAAA,EAAM,OAAA,EAAS,OAAO,MAAA,EAAQ,YAAA,EAAc,SAAA,EAAW,WAAA,EAAa,EAAA,EAAG;AAAA,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,EACF;AAEA,EAAA,OAAO,GAAA;AACT;;;ACtCO,SAAS,SAAS,GAAA,EAA0B;AACjD,EAAA,IAAI,OAAO,GAAA,CAAI,IAAA,KAAS,QAAA,IAAY,GAAA,CAAI,SAAS,EAAA,EAAI;AACnD,IAAA,MAAM,IAAI,MAAM,qCAAqC,CAAA;AAAA,EACvD;AACA,EAAA,MAAM,QAAoC,EAAC;AAC3C,EAAA,KAAA,MAAW,CAAC,IAAA,EAAM,IAAI,CAAA,IAAK,MAAA,CAAO,QAAQ,GAAA,CAAI,KAAA,IAAS,EAAE,CAAA,EAAG;AAC1D,IAAA,KAAA,CAAM,IAAI,CAAA,GAAI,aAAA,CAAc,IAAI,CAAA;AAAA,EAClC;AACA,EAAA,MAAM,IAAA,GAAO,GAAA,CAAI,OAAA,KAAY,MAAA,GAAY,cAAc,GAAA,CAAI,OAAA;AAC3D,EAAA,OAAO;AAAA,IACL,MAAM,GAAA,CAAI,IAAA;AAAA,IACV,OAAA,EAAS,IAAA;AAAA,IACT,WAAA,EACE,OAAO,GAAA,CAAI,WAAA,KAAgB,WAAW,GAAA,CAAI,WAAA,GAAe,MAAM,WAAA,IAAe,MAAA;AAAA,IAChF,MAAA,EAAQ,aAAA,CAAc,GAAA,CAAI,UAAA,IAAc,EAAE,CAAA;AAAA,IAC1C;AAAA,GACF;AACF","file":"index.js","sourcesContent":["// GENERATED by packages/theme/scripts/build-tokens.ts — do not edit.\n\nexport interface TokenManifestEntry {\n readonly name: string;\n readonly type: string;\n readonly group: string;\n readonly defaultValue: string;\n readonly description: string;\n}\n\nexport const TOKEN_MANIFEST: readonly TokenManifestEntry[] = [\n { name: '--wzl-gray-50', type: \"color\", group: \"gray\", defaultValue: \"#f5f5f6\", description: \"\" },\n { name: '--wzl-gray-100', type: \"color\", group: \"gray\", defaultValue: \"#e6e7e9\", description: \"\" },\n { name: '--wzl-gray-200', type: \"color\", group: \"gray\", defaultValue: \"#c9cbcf\", description: \"\" },\n { name: '--wzl-gray-300', type: \"color\", group: \"gray\", defaultValue: \"#9ea1a8\", description: \"\" },\n { name: '--wzl-gray-400', type: \"color\", group: \"gray\", defaultValue: \"#6f737b\", description: \"\" },\n { name: '--wzl-gray-500', type: \"color\", group: \"gray\", defaultValue: \"#4d5058\", description: \"\" },\n { name: '--wzl-gray-600', type: \"color\", group: \"gray\", defaultValue: \"#383b42\", description: \"\" },\n { name: '--wzl-gray-700', type: \"color\", group: \"gray\", defaultValue: \"#25272c\", description: \"\" },\n { name: '--wzl-gray-800', type: \"color\", group: \"gray\", defaultValue: \"#181a1e\", description: \"\" },\n { name: '--wzl-gray-900', type: \"color\", group: \"gray\", defaultValue: \"#0e0f12\", description: \"\" },\n { name: '--wzl-accent-soft', type: \"color\", group: \"accent\", defaultValue: \"#1d1454\", description: \"\" },\n { name: '--wzl-accent-base', type: \"color\", group: \"accent\", defaultValue: \"#2e1f7a\", description: \"Midnight blue-violet. Deep and saturated; anchors primary actions on light and dark surfaces alike.\" },\n { name: '--wzl-accent-strong', type: \"color\", group: \"accent\", defaultValue: \"#5841b8\", description: \"\" },\n { name: '--wzl-danger-base', type: \"color\", group: \"danger\", defaultValue: \"#d94a3f\", description: \"\" },\n { name: '--wzl-warning-base', type: \"color\", group: \"warning\", defaultValue: \"#d99a3f\", description: \"\" },\n { name: '--wzl-success-base', type: \"color\", group: \"success\", defaultValue: \"#2ec27e\", description: \"\" },\n { name: '--wzl-fg-on-accent', type: \"color\", group: \"fg\", defaultValue: \"#f5f5f6\", description: \"\" },\n { name: '--wzl-line-subtle', type: \"color\", group: \"line\", defaultValue: \"rgba(230, 231, 233, 0.1)\", description: \"Barely-there separators (table rows).\" },\n { name: '--wzl-line', type: \"color\", group: \"line\", defaultValue: \"rgba(230, 231, 233, 0.2)\", description: \"Primary gridlines on sunken surfaces.\" },\n { name: '--wzl-line-strong', type: \"color\", group: \"line\", defaultValue: \"rgba(230, 231, 233, 0.4)\", description: \"Axes and emphasized dividers.\" },\n { name: '--wzl-curve-color', type: \"color\", group: \"curve\", defaultValue: \"#5841b8\", description: \"Drawn data curves. Routes through the bright accent because accent-base is too dim on sunken surfaces.\" },\n { name: '--wzl-accent', type: \"color\", group: \"accent\", defaultValue: \"#2e1f7a\", description: \"\" },\n { name: '--wzl-accent-hover', type: \"color\", group: \"accent\", defaultValue: \"#5841b8\", description: \"\" },\n { name: '--wzl-danger', type: \"color\", group: \"danger\", defaultValue: \"#d94a3f\", description: \"\" },\n { name: '--wzl-warning', type: \"color\", group: \"warning\", defaultValue: \"#d99a3f\", description: \"\" },\n { name: '--wzl-success', type: \"color\", group: \"success\", defaultValue: \"#2ec27e\", description: \"\" },\n { name: '--wzl-focus-ring', type: \"color\", group: \"focus\", defaultValue: \"#5841b8\", description: \"\" },\n { name: '--wzl-glass-tint', type: \"color\", group: \"glass\", defaultValue: \"#2e1f7a\", description: \"Frosted-glass tint. Components compose it as color-mix(in srgb, var(--wzl-glass-tint) 78%, transparent) with backdrop-filter: blur(3px).\" },\n { name: '--wzl-surface-hover', type: \"color\", group: \"surface\", defaultValue: \"rgba(230, 231, 233, 0.1)\", description: \"Hover wash over a raised surface. Same formula as line-subtle, different job — do not collapse them.\" },\n { name: '--wzl-surface-pressed', type: \"color\", group: \"surface\", defaultValue: \"rgba(230, 231, 233, 0.18)\", description: \"Pressed wash over a raised surface.\" },\n { name: '--wzl-swatch-green', type: \"color\", group: \"swatch\", defaultValue: \"#2fdd18\", description: \"First of ten categorical spot colors for plotting, status and data viz. Ordered — take them in sequence. Mode-invariant on purpose: a series keeps its color when the mode flips.\" },\n { name: '--wzl-swatch-pink', type: \"color\", group: \"swatch\", defaultValue: \"#ff5885\", description: \"\" },\n { name: '--wzl-swatch-cyan', type: \"color\", group: \"swatch\", defaultValue: \"#00dfff\", description: \"\" },\n { name: '--wzl-swatch-gold', type: \"color\", group: \"swatch\", defaultValue: \"#dcb700\", description: \"\" },\n { name: '--wzl-swatch-amber', type: \"color\", group: \"swatch\", defaultValue: \"#ff8c00\", description: \"\" },\n { name: '--wzl-swatch-violet', type: \"color\", group: \"swatch\", defaultValue: \"#a497ff\", description: \"\" },\n { name: '--wzl-swatch-mint', type: \"color\", group: \"swatch\", defaultValue: \"#00e7af\", description: \"\" },\n { name: '--wzl-swatch-sky', type: \"color\", group: \"swatch\", defaultValue: \"#00b8ff\", description: \"\" },\n { name: '--wzl-swatch-orange', type: \"color\", group: \"swatch\", defaultValue: \"#ff6b00\", description: \"\" },\n { name: '--wzl-swatch-magenta', type: \"color\", group: \"swatch\", defaultValue: \"#ff6eff\", description: \"\" },\n { name: '--wzl-radius-sm', type: \"dimension\", group: \"radius\", defaultValue: \"3px\", description: \"\" },\n { name: '--wzl-radius-md', type: \"dimension\", group: \"radius\", defaultValue: \"5px\", description: \"\" },\n { name: '--wzl-border-w', type: \"dimension\", group: \"border\", defaultValue: \"1px\", description: \"\" },\n { name: '--wzl-line-width', type: \"dimension\", group: \"line\", defaultValue: \"2px\", description: \"Structural lines — gridlines, dividers, axes.\" },\n { name: '--wzl-curve-width', type: \"dimension\", group: \"curve\", defaultValue: \"3px\", description: \"Drawn data curves. Heavier than structural lines so data reads as primary content.\" },\n { name: '--wzl-tb-height', type: \"dimension\", group: \"tb\", defaultValue: \"28px\", description: \"Height of a horizontal toolbar strip (ActionsBar, OptionsBar, ToggleBar, ToolOptionsBar).\" },\n { name: '--wzl-radius-lg', type: \"dimension\", group: \"radius\", defaultValue: \"14px\", description: \"\" },\n { name: '--wzl-control-h', type: \"dimension\", group: \"control\", defaultValue: \"28px\", description: \"Height of an interactive control — button, input, select. Distinct from tb-height, which sizes the strip a row of them sits in.\" },\n { name: '--wzl-glass-blur', type: \"dimension\", group: \"glass\", defaultValue: \"3px\", description: \"Backdrop blur radius for frosted surfaces. Pairs with glass-tint.\" },\n { name: '--wzl-font-size', type: \"dimension\", group: \"font\", defaultValue: \"13px\", description: \"\" },\n { name: '--wzl-font-size-sm', type: \"dimension\", group: \"font\", defaultValue: \"11px\", description: \"\" },\n { name: '--wzl-space-xs', type: \"dimension\", group: \"space\", defaultValue: \"4px\", description: \"\" },\n { name: '--wzl-space-sm', type: \"dimension\", group: \"space\", defaultValue: \"8px\", description: \"\" },\n { name: '--wzl-space-md', type: \"dimension\", group: \"space\", defaultValue: \"12px\", description: \"\" },\n { name: '--wzl-space-lg', type: \"dimension\", group: \"space\", defaultValue: \"16px\", description: \"\" },\n { name: '--wzl-z-toolbar', type: \"number\", group: \"z\", defaultValue: \"10\", description: \"\" },\n { name: '--wzl-z-overlay', type: \"number\", group: \"z\", defaultValue: \"20\", description: \"\" },\n { name: '--wzl-z-modal', type: \"number\", group: \"z\", defaultValue: \"30\", description: \"\" },\n { name: '--wzl-backdrop', type: \"gradient\", group: \"backdrop\", defaultValue: \"none\", description: \"Layered backdrop fill for a page or lab root. `none` here; a theme with a signature background sets it.\" },\n { name: '--wzl-motion-fast', type: \"duration\", group: \"motion\", defaultValue: \"120ms\", description: \"Micro-interactions — hover, focus, pressed.\" },\n { name: '--wzl-motion-medium', type: \"duration\", group: \"motion\", defaultValue: \"240ms\", description: \"Entrances and exits — toasts, popovers, panels.\" },\n { name: '--wzl-ease-in-cubic', type: \"cubicBezier\", group: \"ease\", defaultValue: \"cubic-bezier(0.32, 0, 0.67, 0)\", description: \"\" },\n { name: '--wzl-ease-out-cubic', type: \"cubicBezier\", group: \"ease\", defaultValue: \"cubic-bezier(0.33, 1, 0.68, 1)\", description: \"\" },\n { name: '--wzl-ease-in-out-cubic', type: \"cubicBezier\", group: \"ease\", defaultValue: \"cubic-bezier(0.65, 0, 0.35, 1)\", description: \"\" },\n { name: '--wzl-ease-out-back', type: \"cubicBezier\", group: \"ease\", defaultValue: \"cubic-bezier(0.34, 1.56, 0.64, 1)\", description: \"\" },\n { name: '--wzl-font-ui', type: \"fontFamily\", group: \"font\", defaultValue: \"Oswald, 'Helvetica Neue Condensed', 'Arial Narrow', system-ui, sans-serif\", description: \"Condensed UI/display face. The heavier cuts get blocky at any size, so the weight tokens stay in the 200-400 range.\" },\n { name: '--wzl-font-display', type: \"fontFamily\", group: \"font\", defaultValue: \"Oswald, 'Helvetica Neue Condensed', 'Arial Narrow', system-ui, sans-serif\", description: \"\" },\n { name: '--wzl-font-body', type: \"fontFamily\", group: \"font\", defaultValue: \"Inter, system-ui, -apple-system, 'Segoe UI', sans-serif\", description: \"\" },\n { name: '--wzl-font-mono', type: \"fontFamily\", group: \"font\", defaultValue: \"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace\", description: \"\" },\n { name: '--wzl-font-weight-light', type: \"fontWeight\", group: \"font\", defaultValue: \"200\", description: \"\" },\n { name: '--wzl-font-weight-normal', type: \"fontWeight\", group: \"font\", defaultValue: \"300\", description: \"\" },\n { name: '--wzl-font-weight-medium', type: \"fontWeight\", group: \"font\", defaultValue: \"350\", description: \"\" },\n { name: '--wzl-font-weight-bold', type: \"fontWeight\", group: \"font\", defaultValue: \"400\", description: \"\" },\n { name: '--wzl-surface', type: \"color\", group: \"surface\", defaultValue: \"#181a1e\", description: \"\" },\n { name: '--wzl-surface-raised', type: \"color\", group: \"surface\", defaultValue: \"#25272c\", description: \"\" },\n { name: '--wzl-surface-sunken', type: \"color\", group: \"surface\", defaultValue: \"#0e0f12\", description: \"\" },\n { name: '--wzl-fg', type: \"color\", group: \"fg\", defaultValue: \"#e6e7e9\", description: \"\" },\n { name: '--wzl-fg-muted', type: \"color\", group: \"fg\", defaultValue: \"#9ea1a8\", description: \"\" },\n { name: '--wzl-fg-subtle', type: \"color\", group: \"fg\", defaultValue: \"#6f737b\", description: \"\" },\n { name: '--wzl-border', type: \"color\", group: \"border\", defaultValue: \"#25272c\", description: \"\" },\n { name: '--wzl-border-strong', type: \"color\", group: \"border\", defaultValue: \"#383b42\", description: \"\" },\n { name: '--wzl-accent-fg', type: \"color\", group: \"accent\", defaultValue: \"#5841b8\", description: \"Accent for foreground use — text, icons, selected labels drawn on a surface. accent is a fill; the midnight base is too dim to read as text on dark surfaces.\" },\n { name: '--wzl-fg-inverse', type: \"color\", group: \"fg\", defaultValue: \"#0e0f12\", description: \"Text drawn on a filled foreground-colored element (e.g. a slider thumb). Flips with the mode, so it is a semantic, not an alias to a primitive.\" },\n];\n","/** The one `$extensions` key this kit defines. */\nexport const ALPHA_EXT = 'com.weasel.alpha';\n\nexport type TokenValue = string | number | readonly (string | number)[];\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\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","import { ALPHA_EXT, type FlatTokens, type RawToken, type TokenValue } from './types';\n\ninterface DtcgToken {\n $value: TokenValue;\n $type?: string;\n $description?: string;\n $extensions?: Record<string, unknown>;\n}\n\nconst isToken = (v: unknown): v is DtcgToken =>\n typeof v === 'object' && v !== null && '$value' in v;\n\n/**\n * Collapse a DTCG document into flat token names.\n *\n * Groups exist only to carry `$type`; they contribute nothing to the name, so\n * `color.fg-muted` becomes `fg-muted` and in turn `--wzl-fg-muted`. This shape\n * is forced by the token set: `--wzl-accent` and `--wzl-accent-base` are both\n * real tokens, and DTCG forbids a token that is also a group.\n */\nexport function flattenTokens(doc: Record<string, unknown>): FlatTokens {\n const out: FlatTokens = {};\n\n for (const [groupName, group] of Object.entries(doc)) {\n if (groupName.startsWith('$')) continue;\n if (typeof group !== 'object' || group === null) continue;\n\n const g = group as Record<string, unknown> & { $type?: string };\n const groupType = g.$type;\n\n for (const [leaf, node] of Object.entries(g)) {\n if (leaf.startsWith('$')) continue;\n if (!isToken(node)) continue;\n\n const type = node.$type ?? groupType;\n if (!type) {\n throw new Error(`Token \"${leaf}\" has no $type and its group \"${groupName}\" declares none`);\n }\n if (leaf in out) {\n throw new Error(`Duplicate token name \"${leaf}\" — leaf keys must be unique across type groups`);\n }\n\n const alphaRaw = node.$extensions?.[ALPHA_EXT];\n const token: RawToken = {\n type,\n value: node.$value,\n alpha: typeof alphaRaw === 'number' ? alphaRaw : undefined,\n description: node.$description,\n };\n out[leaf] = token;\n }\n }\n\n return out;\n}\n","import { flattenTokens } from './dtcg/flatten';\nimport type { FlatTokens } from './dtcg/types';\nimport { weaselTheme, type Theme } from './theme';\n\ninterface DtcgDocument {\n name?: unknown;\n defaultMode?: unknown;\n extends?: Theme | null;\n primitives?: Record<string, unknown>;\n modes?: Record<string, Record<string, unknown>>;\n}\n\n/**\n * Build a `Theme` from a DTCG document — the interchange path, for tokens\n * exported by a design tool rather than authored in TS.\n */\nexport function loadDTCG(doc: DtcgDocument): Theme {\n if (typeof doc.name !== 'string' || doc.name === '') {\n throw new Error('DTCG document needs a string \"name\"');\n }\n const modes: Record<string, FlatTokens> = {};\n for (const [mode, body] of Object.entries(doc.modes ?? {})) {\n modes[mode] = flattenTokens(body);\n }\n const base = doc.extends === undefined ? weaselTheme : doc.extends;\n return {\n name: doc.name,\n extends: base,\n defaultMode:\n typeof doc.defaultMode === 'string' ? doc.defaultMode : (base?.defaultMode ?? 'dark'),\n tokens: flattenTokens(doc.primitives ?? {}),\n modes,\n };\n}\n"]}
@@ -0,0 +1,38 @@
1
+ import React from 'react';
2
+ import { T as Theme, a as ResolvedTheme } from './resolveTheme-Bl6riwGu.js';
3
+
4
+ interface ThemeContextValue {
5
+ readonly theme: Theme;
6
+ readonly mode: string;
7
+ readonly resolved: ResolvedTheme;
8
+ }
9
+ interface ThemeProviderProps {
10
+ readonly theme?: Theme;
11
+ readonly mode?: string;
12
+ /** Applied to the wrapper element, so it can be the layout element too. */
13
+ readonly className?: string;
14
+ readonly style?: React.CSSProperties;
15
+ readonly children: React.ReactNode;
16
+ }
17
+ /**
18
+ * Applies a theme to a wrapper element and publishes the resolved record.
19
+ *
20
+ * Consumers that draw outside the DOM (the WebGL HUD) read `resolved` and
21
+ * never touch `getComputedStyle`.
22
+ *
23
+ * The wrapper is a real element in the layout. Pass `className` rather than
24
+ * nesting your own div inside — an anonymous div between a flex parent and
25
+ * its child breaks percentage heights.
26
+ */
27
+ declare function ThemeProvider({ theme, mode, className, style, children, }: ThemeProviderProps): React.ReactElement;
28
+ declare function useTheme(): ThemeContextValue;
29
+ /**
30
+ * The theme if one is provided, `null` otherwise.
31
+ *
32
+ * For kit internals that should follow a theme when the app supplies one but
33
+ * must still work in an app that never mounted a provider — `useHud` is the
34
+ * motivating case.
35
+ */
36
+ declare function useThemeOptional(): ThemeContextValue | null;
37
+
38
+ export { type ThemeContextValue, ThemeProvider, type ThemeProviderProps, useTheme, useThemeOptional };
package/dist/react.js ADDED
@@ -0,0 +1,45 @@
1
+ import { weaselTheme, resolveTheme, applyTheme } from './chunk-RATE4LL3.js';
2
+ import { createContext, useRef, useMemo, useLayoutEffect, useContext } from 'react';
3
+ import { jsx } from 'react/jsx-runtime';
4
+
5
+ var ThemeContext = createContext(null);
6
+ function ThemeProvider({
7
+ theme = weaselTheme,
8
+ mode,
9
+ className,
10
+ style,
11
+ children
12
+ }) {
13
+ const ref = useRef(null);
14
+ const effectiveMode = mode ?? theme.defaultMode;
15
+ const value = useMemo(
16
+ () => ({ theme, mode: effectiveMode, resolved: resolveTheme(theme, effectiveMode) }),
17
+ [theme, effectiveMode]
18
+ );
19
+ useLayoutEffect(() => {
20
+ if (ref.current) applyTheme(ref.current, theme, effectiveMode);
21
+ }, [theme, effectiveMode]);
22
+ return /* @__PURE__ */ jsx(ThemeContext.Provider, { value, children: /* @__PURE__ */ jsx(
23
+ "div",
24
+ {
25
+ ref,
26
+ className,
27
+ style,
28
+ "data-wzl-theme": theme.name,
29
+ "data-wzl-mode": effectiveMode,
30
+ children
31
+ }
32
+ ) });
33
+ }
34
+ function useTheme() {
35
+ const ctx = useContext(ThemeContext);
36
+ if (!ctx) throw new Error("useTheme must be used inside a <ThemeProvider>");
37
+ return ctx;
38
+ }
39
+ function useThemeOptional() {
40
+ return useContext(ThemeContext);
41
+ }
42
+
43
+ export { ThemeProvider, useTheme, useThemeOptional };
44
+ //# sourceMappingURL=react.js.map
45
+ //# sourceMappingURL=react.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/react.tsx"],"names":[],"mappings":";;;;AAWA,IAAM,YAAA,GAAe,cAAwC,IAAI,CAAA;AAqB1D,SAAS,aAAA,CAAc;AAAA,EAC5B,KAAA,GAAQ,WAAA;AAAA,EACR,IAAA;AAAA,EACA,SAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAAA,EAA2C;AACzC,EAAA,MAAM,GAAA,GAAM,OAAuB,IAAI,CAAA;AACvC,EAAA,MAAM,aAAA,GAAgB,QAAQ,KAAA,CAAM,WAAA;AAEpC,EAAA,MAAM,KAAA,GAAQ,OAAA;AAAA,IACZ,OAAO,EAAE,KAAA,EAAO,IAAA,EAAM,eAAe,QAAA,EAAU,YAAA,CAAa,KAAA,EAAO,aAAa,CAAA,EAAE,CAAA;AAAA,IAClF,CAAC,OAAO,aAAa;AAAA,GACvB;AAEA,EAAA,eAAA,CAAgB,MAAM;AACpB,IAAA,IAAI,IAAI,OAAA,EAAS,UAAA,CAAW,GAAA,CAAI,OAAA,EAAS,OAAO,aAAa,CAAA;AAAA,EAC/D,CAAA,EAAG,CAAC,KAAA,EAAO,aAAa,CAAC,CAAA;AAEzB,EAAA,uBACE,GAAA,CAAC,YAAA,CAAa,QAAA,EAAb,EAAsB,KAAA,EACrB,QAAA,kBAAA,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,SAAA;AAAA,MACA,KAAA;AAAA,MACA,kBAAgB,KAAA,CAAM,IAAA;AAAA,MACtB,eAAA,EAAe,aAAA;AAAA,MAEd;AAAA;AAAA,GACH,EACF,CAAA;AAEJ;AAEO,SAAS,QAAA,GAA8B;AAC5C,EAAA,MAAM,GAAA,GAAM,WAAW,YAAY,CAAA;AACnC,EAAA,IAAI,CAAC,GAAA,EAAK,MAAM,IAAI,MAAM,gDAAgD,CAAA;AAC1E,EAAA,OAAO,GAAA;AACT;AASO,SAAS,gBAAA,GAA6C;AAC3D,EAAA,OAAO,WAAW,YAAY,CAAA;AAChC","file":"react.js","sourcesContent":["import React, { createContext, useContext, useMemo, useRef, useLayoutEffect } from 'react';\nimport { applyTheme } from './applyTheme';\nimport { resolveTheme, type ResolvedTheme } from './resolveTheme';\nimport { weaselTheme, type Theme } from './theme';\n\nexport interface ThemeContextValue {\n readonly theme: Theme;\n readonly mode: string;\n readonly resolved: ResolvedTheme;\n}\n\nconst ThemeContext = createContext<ThemeContextValue | null>(null);\n\nexport interface ThemeProviderProps {\n readonly theme?: Theme;\n readonly mode?: string;\n /** Applied to the wrapper element, so it can be the layout element too. */\n readonly className?: string;\n readonly style?: React.CSSProperties;\n readonly children: React.ReactNode;\n}\n\n/**\n * Applies a theme to a wrapper element and publishes the resolved record.\n *\n * Consumers that draw outside the DOM (the WebGL HUD) read `resolved` and\n * never touch `getComputedStyle`.\n *\n * The wrapper is a real element in the layout. Pass `className` rather than\n * nesting your own div inside — an anonymous div between a flex parent and\n * its child breaks percentage heights.\n */\nexport function ThemeProvider({\n theme = weaselTheme,\n mode,\n className,\n style,\n children,\n}: ThemeProviderProps): React.ReactElement {\n const ref = useRef<HTMLDivElement>(null);\n const effectiveMode = mode ?? theme.defaultMode;\n\n const value = useMemo<ThemeContextValue>(\n () => ({ theme, mode: effectiveMode, resolved: resolveTheme(theme, effectiveMode) }),\n [theme, effectiveMode],\n );\n\n useLayoutEffect(() => {\n if (ref.current) applyTheme(ref.current, theme, effectiveMode);\n }, [theme, effectiveMode]);\n\n return (\n <ThemeContext.Provider value={value}>\n <div\n ref={ref}\n className={className}\n style={style}\n data-wzl-theme={theme.name}\n data-wzl-mode={effectiveMode}\n >\n {children}\n </div>\n </ThemeContext.Provider>\n );\n}\n\nexport function useTheme(): ThemeContextValue {\n const ctx = useContext(ThemeContext);\n if (!ctx) throw new Error('useTheme must be used inside a <ThemeProvider>');\n return ctx;\n}\n\n/**\n * The theme if one is provided, `null` otherwise.\n *\n * For kit internals that should follow a theme when the app supplies one but\n * must still work in an app that never mounted a provider — `useHud` is the\n * motivating case.\n */\nexport function useThemeOptional(): ThemeContextValue | null {\n return useContext(ThemeContext);\n}\n"]}