@imfusion/web-ui 0.6.4-dev.8.g41d03f2f → 0.6.4-dev.84.gbfc0d437

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.
Files changed (139) hide show
  1. package/README.md +19 -55
  2. package/dist/assets/vendors/base-ui.d.ts +2 -3
  3. package/dist/breakpoints/min-width.d.ts +3 -7
  4. package/dist/breakpoints/registry.d.ts +3 -9
  5. package/dist/{code-Ce8uiPsv.js → code-D2lwxHgd.js} +15 -15
  6. package/dist/codegen/gen-breakpoints-css.d.ts +0 -4
  7. package/dist/codegen/gen-token-css.d.ts +0 -2
  8. package/dist/components/app-shell/app-shell.d.ts +7 -11
  9. package/dist/components/button/button.d.ts +7 -12
  10. package/dist/components/callout/callout.d.ts +11 -18
  11. package/dist/components/card/card.d.ts +11 -10
  12. package/dist/components/checkbox/checkbox.d.ts +2 -38
  13. package/dist/components/chip/chip.cva.d.ts +2 -4
  14. package/dist/components/chip/chip.d.ts +1 -1
  15. package/dist/components/code/code.d.ts +2 -2
  16. package/dist/components/collapsible/collapsible.d.ts +4 -35
  17. package/dist/components/copy-button/copy-button.d.ts +1 -1
  18. package/dist/components/drawer/drawer.d.ts +17 -100
  19. package/dist/components/field/field.d.ts +7 -67
  20. package/dist/components/fieldset/fieldset.d.ts +2 -15
  21. package/dist/components/icon/icon.d.ts +2 -2
  22. package/dist/components/input/input.d.ts +2 -8
  23. package/dist/components/logo/imfusion/imfusion.d.ts +2 -5
  24. package/dist/components/logo/imfusion/marks.d.ts +10 -0
  25. package/dist/components/logo/logo.d.ts +3 -3
  26. package/dist/components/navigation-menu/subs/flyout-link.d.ts +5 -19
  27. package/dist/components/navigation-menu/subs/inline-submenu.d.ts +2 -4
  28. package/dist/components/navigation-menu/subs/link.d.ts +6 -23
  29. package/dist/components/navigation-menu/subs/overlay.d.ts +6 -51
  30. package/dist/components/navigation-menu/subs/shared.d.ts +4 -14
  31. package/dist/components/navigation-menu/subs/structure.d.ts +7 -29
  32. package/dist/components/navigation-menu/subs/trigger.d.ts +11 -20
  33. package/dist/components/number-field/index.d.ts +2 -0
  34. package/dist/components/number-field/number-field.d.ts +72 -0
  35. package/dist/components/number-field/number-field.meta.d.ts +2 -0
  36. package/dist/components/popover/popover.d.ts +23 -98
  37. package/dist/components/row/row.d.ts +1 -1
  38. package/dist/components/select/select.d.ts +26 -189
  39. package/dist/components/separator/separator.d.ts +5 -4
  40. package/dist/components/slider/slider.d.ts +7 -77
  41. package/dist/components/spinner/spinner.d.ts +13 -8
  42. package/dist/components/stack/stack.d.ts +3 -4
  43. package/dist/components/switch/switch.d.ts +2 -31
  44. package/dist/components/table/table.d.ts +10 -18
  45. package/dist/components/tabs/tabs.d.ts +18 -52
  46. package/dist/components/toast/toast.d.ts +16 -103
  47. package/dist/components/toggle/toggle.d.ts +3 -21
  48. package/dist/components/toggle-group/toggle-group.d.ts +3 -20
  49. package/dist/components/tooltip/tooltip.d.ts +26 -85
  50. package/dist/components/typo/typo.d.ts +25 -25
  51. package/dist/docgen/gen-docgen.utils.d.ts +3 -4
  52. package/dist/hooks/use-color-scheme.d.ts +5 -11
  53. package/dist/hooks/use-media-query.d.ts +2 -7
  54. package/dist/{icons-Cy1HAosO.js → icons-CaGCCwG-.js} +7 -7
  55. package/dist/icons.js +1 -1
  56. package/dist/index.d.ts +1 -0
  57. package/dist/index.js +1486 -1368
  58. package/dist/integrations/code-highlight/highlighter.d.ts +1 -56
  59. package/dist/integrations/code-highlight.js +41 -189
  60. package/dist/integrations/image-display-options/image-display-options-view.utils.d.ts +0 -1
  61. package/dist/integrations/image-display-options.js +54 -54
  62. package/dist/llms/evals/runner/affected.d.ts +2 -0
  63. package/dist/llms/evals/runner/benchmark.d.ts +12 -0
  64. package/dist/llms/evals/runner/compare.d.ts +2 -0
  65. package/dist/llms/evals/runner/config.d.ts +29 -0
  66. package/dist/llms/evals/runner/evidence.d.ts +7 -0
  67. package/dist/llms/evals/runner/execute.d.ts +32 -0
  68. package/dist/llms/evals/runner/grade.d.ts +10 -0
  69. package/dist/llms/evals/runner/report-md.d.ts +2 -0
  70. package/dist/llms/evals/runner/report.d.ts +4 -0
  71. package/dist/llms/evals/runner/run.d.ts +2 -0
  72. package/dist/llms/evals/runner/scenario.d.ts +3 -0
  73. package/dist/llms/evals/runner/types.d.ts +140 -0
  74. package/dist/llms/evals/runner/workspace.d.ts +2 -0
  75. package/dist/llms/evals/runner/write-generated.d.ts +1 -0
  76. package/dist/provider/web-ui-provider.d.ts +4 -1
  77. package/dist/style.css +1 -1
  78. package/dist/{tabs-DIe1Utiy.js → tabs-By5ir2pt.js} +162 -159
  79. package/dist/tokens/apply.d.ts +4 -9
  80. package/dist/tokens/control-registry.d.ts +3 -6
  81. package/dist/tokens/types.d.ts +7 -24
  82. package/dist/tokens/use-token-controls.d.ts +3 -12
  83. package/dist/types/meta.d.ts +15 -32
  84. package/dist/utils/index.d.ts +1 -0
  85. package/dist/utils/resolve-state-props.d.ts +4 -0
  86. package/dist/vite/brand-assets.d.ts +3 -0
  87. package/dist/vite/index.d.ts +2 -0
  88. package/dist/vite/readable-css-module-names.d.ts +11 -0
  89. package/dist/vite.js +55 -0
  90. package/dist/web-ui-cli.js +322 -0
  91. package/docs/user-guide/AgentTooling.mdx +127 -0
  92. package/docs/user-guide/BrandAssets.mdx +102 -0
  93. package/docs/user-guide/Changelog.mdx +23 -0
  94. package/docs/user-guide/GettingStarted.mdx +70 -0
  95. package/docs/user-guide/HowItsBuilt.mdx +113 -0
  96. package/docs/user-guide/Tokens.mdx +87 -0
  97. package/docs/user-guide/UsagePatterns.mdx +122 -0
  98. package/package.json +27 -22
  99. package/src/assets/public/favicon/apple-touch-icon.png +0 -0
  100. package/src/assets/public/favicon/favicon-16.png +0 -0
  101. package/src/assets/public/favicon/favicon-32.png +0 -0
  102. package/src/assets/public/favicon/favicon.ico +0 -0
  103. package/src/assets/public/favicon/favicon.svg +7 -0
  104. package/src/assets/public/favicon/icon-192.png +0 -0
  105. package/src/assets/public/favicon/icon-512.png +0 -0
  106. package/src/assets/public/favicon/og-image.png +0 -0
  107. package/src/assets/public/spinner/imfusion-spinner-black.webp +0 -0
  108. package/src/assets/public/spinner/imfusion-spinner-blue.webp +0 -0
  109. package/src/assets/public/spinner/imfusion-spinner-white.webp +0 -0
  110. package/src/docgen/doc.gen.json +3255 -603
  111. package/src/llms/install-templates/AGENTS.md +4 -4
  112. package/src/llms/install-templates/hooks/baseline-staleness.sh +9 -2
  113. package/src/llms/llms.gen.txt +7 -1
  114. package/src/llms/skills/imf-web-ui/SKILL.md +44 -21
  115. package/src/llms/skills/imf-web-ui-audit/SKILL.md +25 -11
  116. package/src/llms/skills/imf-web-ui-components/SKILL.md +4 -1
  117. package/src/llms/skills/imf-web-ui-conventions/SKILL.md +2 -2
  118. package/src/llms/skills/imf-web-ui-conventions/templates/AUDIT_CHECKLIST.md +0 -1
  119. package/src/llms/skills/imf-web-ui-conventions/templates/REPORT.md +21 -2
  120. package/src/llms/skills/imf-web-ui-conventions/topics/agent-tooling.md +15 -10
  121. package/src/llms/skills/imf-web-ui-conventions/topics/assets.md +7 -4
  122. package/src/llms/skills/imf-web-ui-conventions/topics/data.md +3 -1
  123. package/src/llms/skills/imf-web-ui-conventions/topics/docs-structure.md +2 -2
  124. package/src/llms/skills/imf-web-ui-conventions/topics/git.md +4 -2
  125. package/src/llms/skills/imf-web-ui-conventions/topics/library-setup.md +10 -1
  126. package/src/llms/skills/imf-web-ui-conventions/topics/styling.md +2 -2
  127. package/src/llms/skills/imf-web-ui-conventions/topics/tokens.md +4 -2
  128. package/src/llms/skills/imf-web-ui-conventions/topics/tooling.md +13 -11
  129. package/src/llms/skills/imf-web-ui-setup/SKILL.md +17 -9
  130. package/src/llms/skills/imf-web-ui-update/SKILL.md +36 -14
  131. package/src/llms/skills/imf-web-ui-ux/SKILL.md +5 -3
  132. package/src/llms/tokens.gen.json +71 -7
  133. package/bin/install.js +0 -446
  134. package/dist/build/vite-css-module-names/index.d.ts +0 -20
  135. package/dist/build/vite-css-module-names.js +0 -17
  136. package/dist/components/spinner/spinner.geometry.d.ts +0 -37
  137. package/dist/integrations/code-highlight/languages/cmake.d.ts +0 -1
  138. package/dist/integrations/code-highlight/languages/cpp.d.ts +0 -1
  139. /package/dist/{meta-CySnRuVp.js → meta-j-7HGrWv.js} +0 -0
@@ -7,7 +7,17 @@ import { Switch as a } from "@base-ui/react/switch";
7
7
  import { Toggle as o } from "@base-ui/react/toggle";
8
8
  import { ToggleGroup as s } from "@base-ui/react/toggle-group";
9
9
  import { Tabs as c } from "@base-ui/react/tabs";
10
- var l = {
10
+ //#region src/utils/resolve-state-props.ts
11
+ function l(e, t) {
12
+ return e instanceof Function ? e(t) : e;
13
+ }
14
+ function u(e, t) {
15
+ return l(e, t);
16
+ }
17
+ function d(e, t) {
18
+ return l(e, t);
19
+ }
20
+ var f = {
11
21
  control: "imf-ui-slider-module-control",
12
22
  indicator: "imf-ui-slider-module-indicator",
13
23
  label: "imf-ui-slider-module-label",
@@ -15,21 +25,21 @@ var l = {
15
25
  thumb: "imf-ui-slider-module-thumb",
16
26
  track: "imf-ui-slider-module-track",
17
27
  value: "imf-ui-slider-module-value"
18
- }, u = /* @__PURE__ */ e({
19
- Control: () => x,
20
- Indicator: () => C,
21
- Label: () => y,
22
- Root: () => v,
23
- Thumb: () => w,
24
- Track: () => S,
25
- Value: () => b
26
- }), d = t(l.root), f = t(l.label), p = t(l.value), m = t(l.control), h = t(l.track), g = t(l.indicator), _ = t(l.thumb);
27
- function v({ value: e, defaultValue: t, onValueChange: r, onValueCommitted: a, min: o = 0, max: s = 100, step: c = 1, largeStep: l = 10, minStepsBetweenValues: u = 0, disabled: f = !1, orientation: p = "horizontal", name: m, form: h, locale: g, thumbAlignment: _ = "edge", thumbCollisionBehavior: v = "push", format: y, className: b, ...x }) {
28
+ }, p = /* @__PURE__ */ e({
29
+ Control: () => C,
30
+ Indicator: () => T,
31
+ Label: () => x,
32
+ Root: () => b,
33
+ Thumb: () => E,
34
+ Track: () => w,
35
+ Value: () => S
36
+ }), ee = t(f.root), m = t(f.label), h = t(f.value), g = t(f.control), _ = t(f.track), v = t(f.indicator), y = t(f.thumb);
37
+ function b({ value: e, defaultValue: t, onValueChange: r, onValueCommitted: a, min: o = 0, max: s = 100, step: c = 1, largeStep: l = 10, minStepsBetweenValues: d = 0, disabled: f = !1, orientation: p = "horizontal", name: m, form: h, locale: g, thumbAlignment: _ = "edge", thumbCollisionBehavior: v = "push", format: y, ...b }) {
28
38
  return /* @__PURE__ */ n(i.Root, {
29
- ...x,
39
+ ...b,
30
40
  "data-imf-ui-component": "Slider.Root",
31
41
  "data-orientation": p,
32
- className: (e) => d({ className: typeof b == "function" ? b(e) : b }),
42
+ className: (e) => ee({ className: u(b.className, e) }),
33
43
  value: e,
34
44
  defaultValue: t,
35
45
  onValueChange: r,
@@ -38,7 +48,7 @@ function v({ value: e, defaultValue: t, onValueChange: r, onValueCommitted: a, m
38
48
  max: s,
39
49
  step: c,
40
50
  largeStep: l,
41
- minStepsBetweenValues: u,
51
+ minStepsBetweenValues: d,
42
52
  disabled: f,
43
53
  orientation: p,
44
54
  name: m,
@@ -46,124 +56,119 @@ function v({ value: e, defaultValue: t, onValueChange: r, onValueCommitted: a, m
46
56
  locale: g,
47
57
  thumbAlignment: _,
48
58
  thumbCollisionBehavior: v,
49
- format: y,
50
- children: x.children
59
+ format: y
51
60
  });
52
61
  }
53
- v.displayName = "Slider.Root";
54
- function y({ className: e, ...t }) {
62
+ b.displayName = "Slider.Root";
63
+ function x(e) {
55
64
  return /* @__PURE__ */ n(i.Label, {
56
- ...t,
65
+ ...e,
57
66
  "data-imf-ui-component": "Slider.Label",
58
- className: (t) => f({ className: typeof e == "function" ? e(t) : e }),
59
- children: t.children
67
+ className: (t) => m({ className: u(e.className, t) })
60
68
  });
61
69
  }
62
- y.displayName = "Slider.Label";
63
- function b({ className: e, children: t, ...r }) {
70
+ x.displayName = "Slider.Label";
71
+ function S({ children: e, ...t }) {
64
72
  return /* @__PURE__ */ n(i.Value, {
65
- ...r,
73
+ ...t,
66
74
  "data-imf-ui-component": "Slider.Value",
67
- className: (t) => p({ className: typeof e == "function" ? e(t) : e }),
68
- children: t
75
+ className: (e) => h({ className: u(t.className, e) }),
76
+ children: e
69
77
  });
70
78
  }
71
- b.displayName = "Slider.Value";
72
- function x({ className: e, ...t }) {
79
+ S.displayName = "Slider.Value";
80
+ function C(e) {
73
81
  return /* @__PURE__ */ n(i.Control, {
74
- ...t,
82
+ ...e,
75
83
  "data-imf-ui-component": "Slider.Control",
76
- className: (t) => m({ className: typeof e == "function" ? e(t) : e }),
77
- children: t.children
84
+ className: (t) => g({ className: u(e.className, t) })
78
85
  });
79
86
  }
80
- x.displayName = "Slider.Control";
81
- function S({ className: e, ...t }) {
87
+ C.displayName = "Slider.Control";
88
+ function w(e) {
82
89
  return /* @__PURE__ */ n(i.Track, {
83
- ...t,
90
+ ...e,
84
91
  "data-imf-ui-component": "Slider.Track",
85
- className: (t) => h({ className: typeof e == "function" ? e(t) : e }),
86
- children: t.children
92
+ className: (t) => _({ className: u(e.className, t) })
87
93
  });
88
94
  }
89
- S.displayName = "Slider.Track";
90
- function C({ className: e, ...t }) {
95
+ w.displayName = "Slider.Track";
96
+ function T(e) {
91
97
  return /* @__PURE__ */ n(i.Indicator, {
92
- ...t,
98
+ ...e,
93
99
  "data-imf-ui-component": "Slider.Indicator",
94
- className: (t) => g({ className: typeof e == "function" ? e(t) : e })
100
+ className: (t) => v({ className: u(e.className, t) })
95
101
  });
96
102
  }
97
- C.displayName = "Slider.Indicator";
98
- function w({ index: e, className: t, ...r }) {
103
+ T.displayName = "Slider.Indicator";
104
+ function E({ index: e, ...t }) {
99
105
  return /* @__PURE__ */ n(i.Thumb, {
100
- ...r,
106
+ ...t,
101
107
  "data-imf-ui-component": "Slider.Thumb",
102
- className: (e) => _({ className: typeof t == "function" ? t(e) : t }),
108
+ className: (e) => y({ className: u(t.className, e) }),
103
109
  index: e
104
110
  });
105
111
  }
106
- w.displayName = "Slider.Thumb";
107
- var T = {
112
+ E.displayName = "Slider.Thumb";
113
+ var D = {
108
114
  root: "imf-ui-switch-module-root",
109
115
  thumb: "imf-ui-switch-module-thumb"
110
- }, E = /* @__PURE__ */ e({
111
- Root: () => O,
112
- Thumb: () => k
113
- }), D = t(T.root), ee = t(T.thumb);
114
- function O({ className: e, ...t }) {
116
+ }, te = /* @__PURE__ */ e({
117
+ Root: () => A,
118
+ Thumb: () => j
119
+ }), O = t(D.root), k = t(D.thumb);
120
+ function A(e) {
115
121
  return /* @__PURE__ */ n(a.Root, {
116
- ...t,
122
+ ...e,
117
123
  "data-imf-ui-component": "Switch.Root",
118
- className: (t) => D({ className: typeof e == "function" ? e(t) : e }),
119
- children: t.children
124
+ className: (t) => O({ className: u(e.className, t) })
120
125
  });
121
126
  }
122
- O.displayName = "Switch.Root";
123
- function k({ className: e, ...t }) {
127
+ A.displayName = "Switch.Root";
128
+ function j(e) {
124
129
  return /* @__PURE__ */ n(a.Thumb, {
125
- ...t,
130
+ ...e,
126
131
  "data-imf-ui-component": "Switch.Thumb",
127
- className: (t) => ee({ className: typeof e == "function" ? e(t) : e })
132
+ className: (t) => k({ className: u(e.className, t) })
128
133
  });
129
134
  }
130
- k.displayName = "Switch.Thumb";
135
+ j.displayName = "Switch.Thumb";
131
136
  //#endregion
132
137
  //#region src/components/toggle/toggle.tsx
133
- var A = t({ root: "imf-ui-toggle-module-root" }.root), j = 2;
134
- function M(e) {
138
+ var M = t({ root: "imf-ui-toggle-module-root" }.root), N = 2;
139
+ function P(e) {
135
140
  let t = 0;
136
141
  return r.forEach(e, (e) => {
137
- typeof e == "string" || typeof e == "number" ? t += String(e).trim().length : e != null && typeof e != "boolean" && (t += j);
142
+ typeof e == "string" || typeof e == "number" ? t += String(e).trim().length : e != null && typeof e != "boolean" && (t += N);
138
143
  }), t;
139
144
  }
140
- function N({ className: e, style: t, children: r, ...i }) {
141
- let a = {
142
- "--glyph-count": M(r),
143
- "--max-glyphs": j
145
+ function F({ style: e, children: t, ...r }) {
146
+ let i = {
147
+ "--glyph-count": P(t),
148
+ "--max-glyphs": N
144
149
  };
145
150
  return /* @__PURE__ */ n(o, {
146
- ...i,
151
+ ...r,
147
152
  "data-imf-ui-component": "Toggle",
148
- style: (e) => ({
149
- ...a,
150
- ...typeof t == "function" ? t(e) : t
153
+ style: (t) => ({
154
+ ...i,
155
+ ...d(e, t)
151
156
  }),
152
- className: (t) => A({ className: typeof e == "function" ? e(t) : e }),
153
- children: r
157
+ className: (e) => M({ className: u(r.className, e) }),
158
+ children: t
154
159
  });
155
160
  }
156
161
  //#endregion
157
162
  //#region src/components/toggle-group/toggle-group.tsx
158
- var te = t({ root: "imf-ui-toggle-group-module-root" }.root);
159
- function ne({ className: e, ...t }) {
163
+ var I = t({ root: "imf-ui-toggle-group-module-root" }.root);
164
+ function L(e) {
160
165
  return /* @__PURE__ */ n(s, {
161
- ...t,
166
+ ...e,
162
167
  "data-imf-ui-component": "ToggleGroup",
163
- className: (t) => te({ className: typeof e == "function" ? e(t) : e })
168
+ className: (t) => I({ className: u(e.className, t) })
164
169
  });
165
170
  }
166
- var P = {
171
+ var R = {
167
172
  alignCenter: "imf-ui-row-module-alignCenter",
168
173
  alignEnd: "imf-ui-row-module-alignEnd",
169
174
  alignStart: "imf-ui-row-module-alignStart",
@@ -186,53 +191,52 @@ var P = {
186
191
  justifyStart: "imf-ui-row-module-justifyStart",
187
192
  root: "imf-ui-row-module-root",
188
193
  wrap: "imf-ui-row-module-wrap"
189
- }, F = t(P.root, { variants: {
194
+ }, z = t(R.root, { variants: {
190
195
  gap: {
191
- 1: P.gap1,
192
- 2: P.gap2,
193
- 3: P.gap3,
194
- 4: P.gap4,
195
- 5: P.gap5,
196
- 6: P.gap6,
197
- 7: P.gap7,
198
- 8: P.gap8,
199
- 9: P.gap9,
200
- 10: P.gap10
196
+ 1: R.gap1,
197
+ 2: R.gap2,
198
+ 3: R.gap3,
199
+ 4: R.gap4,
200
+ 5: R.gap5,
201
+ 6: R.gap6,
202
+ 7: R.gap7,
203
+ 8: R.gap8,
204
+ 9: R.gap9,
205
+ 10: R.gap10
201
206
  },
202
207
  align: {
203
- start: P.alignStart,
204
- center: P.alignCenter,
205
- end: P.alignEnd,
206
- stretch: P.alignStretch
208
+ start: R.alignStart,
209
+ center: R.alignCenter,
210
+ end: R.alignEnd,
211
+ stretch: R.alignStretch
207
212
  },
208
213
  justify: {
209
- start: P.justifyStart,
210
- center: P.justifyCenter,
211
- end: P.justifyEnd,
212
- between: P.justifyBetween,
213
- around: P.justifyAround,
214
- evenly: P.justifyEvenly
214
+ start: R.justifyStart,
215
+ center: R.justifyCenter,
216
+ end: R.justifyEnd,
217
+ between: R.justifyBetween,
218
+ around: R.justifyAround,
219
+ evenly: R.justifyEvenly
215
220
  },
216
221
  wrap: {
217
- true: P.wrap,
222
+ true: R.wrap,
218
223
  false: null
219
224
  }
220
225
  } });
221
- function I({ gap: e = "2", align: t = "stretch", justify: r = "start", wrap: i = !1, className: a, ...o }) {
226
+ function B({ gap: e = "2", align: t = "stretch", justify: r = "start", wrap: i = !1, ...a }) {
222
227
  return /* @__PURE__ */ n("div", {
223
- ...o,
228
+ ...a,
224
229
  "data-imf-ui-component": "Row",
225
- className: F({
230
+ className: z({
226
231
  gap: e,
227
232
  align: t,
228
233
  justify: r,
229
234
  wrap: i,
230
- className: a
231
- }),
232
- children: o.children
235
+ className: a.className
236
+ })
233
237
  });
234
238
  }
235
- var L = {
239
+ var V = {
236
240
  alignCenter: "imf-ui-stack-module-alignCenter",
237
241
  alignEnd: "imf-ui-stack-module-alignEnd",
238
242
  alignStart: "imf-ui-stack-module-alignStart",
@@ -255,49 +259,48 @@ var L = {
255
259
  justifyEvenly: "imf-ui-stack-module-justifyEvenly",
256
260
  justifyStart: "imf-ui-stack-module-justifyStart",
257
261
  root: "imf-ui-stack-module-root"
258
- }, R = t(L.root, { variants: {
262
+ }, H = t(V.root, { variants: {
259
263
  gap: {
260
- 0: L.gap0,
261
- 1: L.gap1,
262
- 2: L.gap2,
263
- 3: L.gap3,
264
- 4: L.gap4,
265
- 5: L.gap5,
266
- 6: L.gap6,
267
- 7: L.gap7,
268
- 8: L.gap8,
269
- 9: L.gap9,
270
- 10: L.gap10
264
+ 0: V.gap0,
265
+ 1: V.gap1,
266
+ 2: V.gap2,
267
+ 3: V.gap3,
268
+ 4: V.gap4,
269
+ 5: V.gap5,
270
+ 6: V.gap6,
271
+ 7: V.gap7,
272
+ 8: V.gap8,
273
+ 9: V.gap9,
274
+ 10: V.gap10
271
275
  },
272
276
  align: {
273
- start: L.alignStart,
274
- center: L.alignCenter,
275
- end: L.alignEnd,
276
- stretch: L.alignStretch
277
+ start: V.alignStart,
278
+ center: V.alignCenter,
279
+ end: V.alignEnd,
280
+ stretch: V.alignStretch
277
281
  },
278
282
  justify: {
279
- start: L.justifyStart,
280
- center: L.justifyCenter,
281
- end: L.justifyEnd,
282
- between: L.justifyBetween,
283
- around: L.justifyAround,
284
- evenly: L.justifyEvenly
283
+ start: V.justifyStart,
284
+ center: V.justifyCenter,
285
+ end: V.justifyEnd,
286
+ between: V.justifyBetween,
287
+ around: V.justifyAround,
288
+ evenly: V.justifyEvenly
285
289
  }
286
290
  } });
287
- function z({ gap: e = "4", align: t = "stretch", justify: r = "start", className: i, ...a }) {
291
+ function U({ gap: e = "4", align: t = "stretch", justify: r = "start", ...i }) {
288
292
  return /* @__PURE__ */ n("div", {
289
- ...a,
293
+ ...i,
290
294
  "data-imf-ui-component": "Stack",
291
- className: R({
295
+ className: H({
292
296
  gap: e,
293
297
  align: t,
294
298
  justify: r,
295
- className: i
296
- }),
297
- children: a.children
299
+ className: i.className
300
+ })
298
301
  });
299
302
  }
300
- var B = {
303
+ var W = {
301
304
  indicator: "imf-ui-tabs-module-indicator",
302
305
  list: "imf-ui-tabs-module-list",
303
306
  listFill: "imf-ui-tabs-module-listFill",
@@ -305,67 +308,67 @@ var B = {
305
308
  panelViewport: "imf-ui-tabs-module-panelViewport",
306
309
  root: "imf-ui-tabs-module-root",
307
310
  tab: "imf-ui-tabs-module-tab"
308
- }, V = /* @__PURE__ */ e({
311
+ }, G = /* @__PURE__ */ e({
309
312
  Indicator: () => Z,
310
313
  List: () => Y,
311
314
  Panel: () => $,
312
315
  PanelViewport: () => Q,
313
316
  Root: () => J,
314
317
  Tab: () => X
315
- }), H = t(B.list, { variants: { fill: {
316
- true: B.listFill,
318
+ }), K = t(W.list, { variants: { fill: {
319
+ true: W.listFill,
317
320
  false: null
318
- } } }), U = t(B.root), W = t(B.tab), G = t(B.indicator), K = t(B.panelViewport), q = t(B.panel);
319
- function J({ className: e, ...t }) {
321
+ } } }), q = t(W.root), ne = t(W.tab), re = t(W.indicator), ie = t(W.panelViewport), ae = t(W.panel);
322
+ function J(e) {
320
323
  return /* @__PURE__ */ n(c.Root, {
321
- ...t,
324
+ ...e,
322
325
  "data-imf-ui-component": "Tabs.Root",
323
- className: (t) => U({ className: typeof e == "function" ? e(t) : e })
326
+ className: (t) => q({ className: u(e.className, t) })
324
327
  });
325
328
  }
326
329
  J.displayName = "Tabs.Root";
327
- function Y({ fill: e = !1, className: t, ...r }) {
330
+ function Y({ fill: e = !1, ...t }) {
328
331
  return /* @__PURE__ */ n(c.List, {
329
- ...r,
332
+ ...t,
330
333
  "data-imf-ui-component": "Tabs.List",
331
- className: (n) => H({
334
+ className: (n) => K({
332
335
  fill: e,
333
- className: typeof t == "function" ? t(n) : t
336
+ className: u(t.className, n)
334
337
  })
335
338
  });
336
339
  }
337
340
  Y.displayName = "Tabs.List";
338
- function X({ className: e, ...t }) {
341
+ function X(e) {
339
342
  return /* @__PURE__ */ n(c.Tab, {
340
- ...t,
343
+ ...e,
341
344
  "data-imf-ui-component": "Tabs.Tab",
342
- className: (t) => W({ className: typeof e == "function" ? e(t) : e })
345
+ className: (t) => ne({ className: u(e.className, t) })
343
346
  });
344
347
  }
345
348
  X.displayName = "Tabs.Tab";
346
- function Z({ className: e, ...t }) {
349
+ function Z(e) {
347
350
  return /* @__PURE__ */ n(c.Indicator, {
348
- ...t,
351
+ ...e,
349
352
  "data-imf-ui-component": "Tabs.Indicator",
350
- className: (t) => G({ className: typeof e == "function" ? e(t) : e })
353
+ className: (t) => re({ className: u(e.className, t) })
351
354
  });
352
355
  }
353
356
  Z.displayName = "Tabs.Indicator";
354
- function Q({ className: e, ...t }) {
357
+ function Q(e) {
355
358
  return /* @__PURE__ */ n("div", {
356
- ...t,
359
+ ...e,
357
360
  "data-imf-ui-component": "Tabs.PanelViewport",
358
- className: K({ className: e })
361
+ className: ie({ className: e.className })
359
362
  });
360
363
  }
361
364
  Q.displayName = "Tabs.PanelViewport";
362
- function $({ className: e, ...t }) {
365
+ function $(e) {
363
366
  return /* @__PURE__ */ n(c.Panel, {
364
- ...t,
367
+ ...e,
365
368
  "data-imf-ui-component": "Tabs.Panel",
366
- className: (t) => q({ className: typeof e == "function" ? e(t) : e })
369
+ className: (t) => ae({ className: u(e.className, t) })
367
370
  });
368
371
  }
369
372
  $.displayName = "Tabs.Panel";
370
373
  //#endregion
371
- export { u as S, y as _, J as a, S as b, z as c, N as d, O as f, C as g, x as h, Q as i, I as l, E as m, Y as n, X as o, k as p, $ as r, V as s, Z as t, ne as u, v, b as x, w as y };
374
+ export { u as C, p as S, x as _, J as a, w as b, U as c, F as d, A as f, T as g, C as h, Q as i, B as l, te as m, Y as n, X as o, j as p, $ as r, G as s, Z as t, L as u, b as v, S as x, E as y };
@@ -5,12 +5,8 @@ import { TokenOverrides } from './types';
5
5
  * Pure token-application layer — no React, no router, no DOM ownership beyond the one imperative
6
6
  * writer ({@link applyTokenOverrides}). The stateful, persistence-agnostic hook is `useTokenControls`.
7
7
  */
8
- /** Flatten a possibly scheme-keyed numeric value to the active scheme. */
9
8
  export declare function resolveScheme(field: number | Record<ColorScheme, number>, scheme: ColorScheme): number;
10
- /**
11
- * A control resolved to the active scheme — the panel-facing view. Slider controls carry numeric
12
- * bounds; select controls carry options.
13
- */
9
+ /** A control resolved to the active scheme — the panel-facing view of a token control. */
14
10
  export type ResolvedControl = {
15
11
  id: TokenId;
16
12
  cssVar: string;
@@ -47,9 +43,8 @@ export declare function resolve(control: TokenControl, scheme: ColorScheme): Res
47
43
  */
48
44
  export declare function deriveAll(live: TokenOverrides): TokenOverrides;
49
45
  /**
50
- * Imperative core — reconcile `documentElement`'s inline custom properties to `overrides`. Sets
51
- * present vars, removes every registry var absent from `overrides` (both `-light`/`-dark`), so reset
52
- * and scheme switches leave nothing stale. This is the one DOM writer; `useTokenControls` calls it in
53
- * a layout effect, and hosts (Storybook, consumers) can call it directly.
46
+ * Reconciles `documentElement`'s inline custom properties to `overrides`: sets present vars, removes
47
+ * every registry var absent from `overrides` (both `-light`/`-dark`), so reset and scheme switches
48
+ * leave nothing stale. This is the one DOM writer.
54
49
  */
55
50
  export declare function applyTokenOverrides(overrides: TokenOverrides, root?: HTMLElement): void;
@@ -1,10 +1,7 @@
1
1
  import { TokenControl } from './token-registry';
2
2
  /**
3
- * The control registry — every {@link TokenControl}, i.e. every token that has a live adjuster. Each
4
- * entry spreads its token's data (including `label`/`description`) from `TOKEN_REGISTRY` and adds
5
- * only the control-specific metadata its UI needs.
6
- *
7
- * Not every token appears here: the semantic font aliases (`font-family-heading` / `-body` / `-ui`
8
- * / `-code`) are `var()` indirections with no direct control, so they have no entry.
3
+ * Every {@link TokenControl}: a token with a live adjuster, spreading its data from
4
+ * `TOKEN_REGISTRY`. Semantic font aliases (`font-family-heading`/`-body`/`-ui`/`-code`) are
5
+ * `var()` indirections with no direct control, so they have no entry here.
9
6
  */
10
7
  export declare const TOKEN_CONTROLS: readonly TokenControl[];
@@ -1,13 +1,5 @@
1
1
  import { ColorScheme } from '../types/theme';
2
- /**
3
- * A **token** is a CSS custom property under `--imf-ui-` carrying a design value; every token lives
4
- * in `TOKEN_REGISTRY`. A **TokenControl** is a live adjuster *bound to* a token, not a kind of token —
5
- * it carries the token's own fields plus the control's `id`. Not every token has a control.
6
- *
7
- * The shapes below are generic over the id type to avoid an import cycle with the registry that
8
- * defines the concrete `TokenId` union. Import `Token` / `TokenControl` from `./token-registry` (bound
9
- * to the concrete id), not from here directly.
10
- */
2
+ /** Import `Token` / `TokenControl` from `./token-registry`, not from here directly. */
11
3
  /** A continuous or per-scheme numeric value (slider tokens) or a fixed string (select tokens). */
12
4
  export type TokenValue = number | string | Record<ColorScheme, number>;
13
5
  /** A numeric value that may be resolved per color scheme (min / max / default on slider controls). */
@@ -15,14 +7,9 @@ export type NumericTokenValue = number | Record<ColorScheme, number>;
15
7
  /** Grouping for panel layout. */
16
8
  export type TokenGroup = "brand" | "surface" | "primary" | "status" | "accent" | "shadow" | "shape" | "font";
17
9
  /**
18
- * The canonical token id vocabulary — **hand-authored** (not derived from the registry). This is the
19
- * source of truth for what a `--imf-ui-*` token may be called, so:
20
- * - the registry definition site gets autocomplete and rejects typos (`TOKEN_REGISTRY` is a
21
- * `Record<TokenId, Token>`, so every key and every `id` is checked against it);
22
- * - every `id` / `derivedFrom` on a control is checked against it.
23
- *
24
- * Adding or renaming a token is a deliberate two-step edit: this union **and** `TOKEN_REGISTRY`. The
25
- * `token-registry.test.ts` "union ↔ registry agree" test fails loudly if the two drift.
10
+ * Hand-authored, not derived from the registry. This is the source of truth for valid `--imf-ui-*` token ids.
11
+ * Adding or renaming a token requires updating this union and `TOKEN_REGISTRY` together;
12
+ * `token-registry.test.ts` fails if the two drift.
26
13
  */
27
14
  export type TokenId = "color-brand-luma" | "color-brand-chroma" | "color-brand-hue" | "color-surface-bg-luma" | "color-surface-fg-luma" | "color-surface-chroma" | "color-surface-main-hue" | "color-surface-support-hue" | "color-surface-minor-hue" | "color-primary-bg-luma" | "color-primary-fg-luma" | "color-primary-chroma" | "color-primary-hue" | "color-status-bg-luma" | "color-status-fg-luma" | "color-status-chroma" | "color-status-positive-hue" | "color-status-negative-hue" | "color-status-warning-hue" | "color-status-info-hue" | "color-accent-1-bg-luma" | "color-accent-1-fg-luma" | "color-accent-1-chroma" | "color-accent-1-hue" | "color-accent-2-bg-luma" | "color-accent-2-fg-luma" | "color-accent-2-chroma" | "color-accent-2-hue" | "color-accent-3-bg-luma" | "color-accent-3-fg-luma" | "color-accent-3-chroma" | "color-accent-3-hue" | "shadow-angle" | "shadow-hardness" | "shadow-spread" | "shadow-intensity" | "corner-radius" | "font-family-sans" | "font-family-mono" | "font-family-heading" | "font-family-body" | "font-family-ui" | "font-family-code";
28
15
  /**
@@ -43,13 +30,9 @@ export interface Token {
43
30
  description: string;
44
31
  }
45
32
  /**
46
- * A live adjuster bound to a token — the token's own fields plus kind-specific control metadata.
47
- * Discriminated on `kind`:
48
- * - `slider` — a continuous numeric control (min/max/step); may derive from another token.
49
- * - `select` — a discrete choice from an enumerated option list (e.g. font stacks).
50
- *
51
- * The finer constraint — slider ↔ numeric token, select ↔ string token — is a runtime/test guard, not
52
- * encoded here (encoding it would add cryptic type machinery for little gain).
33
+ * A live adjuster bound to a token, carrying the token's own fields plus kind-specific control metadata.
34
+ * The finer constraint (slider ↔ numeric token, select ↔ string token) is enforced by a
35
+ * runtime/test guard, not encoded in the type; that would add cryptic generics for little gain.
53
36
  */
54
37
  export type TokenControl = Token & ({
55
38
  kind: "slider";
@@ -14,18 +14,9 @@ export interface UseTokenControlsResult {
14
14
  reset: () => void;
15
15
  }
16
16
  /**
17
- * The persistence-agnostic token editor. It derives effective values, resolves each control for the
18
- * active `scheme`, mirrors the effective map onto `documentElement`, and exposes mutators that
19
- * commit through the injected `overrides`/`onChange` pair.
20
- *
21
- * `useTokenControls` owns *no* persistence — the host decides where `overrides` lives and how writes
22
- * are debounced, then passes the current map and a commit callback in on every render.
23
- *
24
- * **Contract — synchronous read-back:** each mutator builds its next map by spreading the current
25
- * `overrides`. If the host debounces persistence, it must still surface each committed map as
26
- * `overrides` *synchronously* (e.g. a `useState` working copy) so back-to-back `setControl` calls in
27
- * one tick don't clobber each other. A host that only reflects the committed map after an async
28
- * round trip will drop rapid successive edits.
17
+ * Owns no persistence — the host supplies `overrides`/`onChange`. Contract: each mutator spreads the
18
+ * current `overrides`, so the host must surface each committed map back synchronously (e.g. a
19
+ * `useState` working copy) or back-to-back calls in one tick will clobber each other.
29
20
  */
30
21
  export declare function useTokenControls({ overrides, onChange, scheme }: {
31
22
  /** Current overrides, keyed by full CSS custom property name. Must update synchronously on commit. */