@luxalgo/vela-ui 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) hide show
  1. package/CHANGELOG.md +153 -132
  2. package/LICENSE +201 -201
  3. package/NOTICE +28 -28
  4. package/README.md +86 -86
  5. package/cli/engine.mjs +282 -282
  6. package/cli/index.mjs +154 -154
  7. package/dist/callout-bubble.js +2 -2
  8. package/dist/checkbox.js +2 -2
  9. package/dist/{chunk-KKS6NEGI.js → chunk-BWSOMG3G.js} +1 -1
  10. package/dist/chunk-GUIYFQ27.js +30 -0
  11. package/dist/{chunk-B2EZB5ZG.js → chunk-KUWTI2PE.js} +2 -2
  12. package/dist/{chunk-WWHNUKSZ.js → chunk-QGWAN3EP.js} +2 -2
  13. package/dist/{chunk-TBXUF5YX.js → chunk-RH53NQGE.js} +18 -4
  14. package/dist/{chunk-IOOYDSSK.js → chunk-SKFAYTDK.js} +1 -1
  15. package/dist/{chunk-OQXFQMZM.js → chunk-TGJNHUYV.js} +2 -2
  16. package/dist/{chunk-UEO6W37Z.js → chunk-VC7SVSDK.js} +1 -1
  17. package/dist/{chunk-OJ2SEMN6.js → chunk-YT2BSP7O.js} +1 -1
  18. package/dist/collapsible.js +1 -1
  19. package/dist/color-picker.js +4 -4
  20. package/dist/context-menu.js +3 -3
  21. package/dist/dialog.js +3 -3
  22. package/dist/donut.d.ts +1 -1
  23. package/dist/drawer.js +1 -1
  24. package/dist/dropdown-menu.js +3 -3
  25. package/dist/field.js +8 -8
  26. package/dist/{stat.d.ts → figure.d.ts} +9 -9
  27. package/dist/figure.js +41 -0
  28. package/dist/glyph-select.js +3 -3
  29. package/dist/index.d.ts +2 -2
  30. package/dist/index.js +1 -1
  31. package/dist/manifest.json +74 -74
  32. package/dist/number-input.js +2 -2
  33. package/dist/popover.js +2 -2
  34. package/dist/select.d.ts +1 -1
  35. package/dist/select.js +4 -4
  36. package/dist/slider.js +1 -1
  37. package/dist/sort-button.js +1 -1
  38. package/dist/switch.js +1 -1
  39. package/dist/tabs.js +1 -1
  40. package/dist/{theme-Ct-q58xz.d.ts → theme-TefB8vtl.d.ts} +2 -2
  41. package/dist/theme.d.ts +2 -2
  42. package/dist/theme.js +1 -1
  43. package/dist/theme.schema.json +30 -30
  44. package/dist/toast.d.ts +2 -2
  45. package/dist/toast.js +1 -1
  46. package/dist/toggle-group.js +1 -1
  47. package/dist/tooltip.js +1 -1
  48. package/dist/zag.d.ts +11 -2
  49. package/dist/zag.js +1 -1
  50. package/docs/theming.md +217 -217
  51. package/docs/what-to-change.md +20 -20
  52. package/docs/writing-a-component.md +250 -250
  53. package/llms.txt +3 -3
  54. package/package.json +90 -90
  55. package/registry/badge.ts +119 -119
  56. package/registry/bar-chart.ts +215 -215
  57. package/registry/button.ts +387 -387
  58. package/registry/callout-bubble.ts +347 -347
  59. package/registry/card.ts +379 -379
  60. package/registry/checkbox.ts +234 -234
  61. package/registry/collapsible.ts +271 -271
  62. package/registry/color-picker.ts +582 -582
  63. package/registry/context-menu.ts +208 -208
  64. package/registry/data-table.ts +215 -215
  65. package/registry/date-picker.ts +483 -483
  66. package/registry/dialog.ts +551 -551
  67. package/registry/donut.ts +145 -145
  68. package/registry/drawer.ts +636 -636
  69. package/registry/dropdown-menu.ts +762 -762
  70. package/registry/empty.ts +91 -91
  71. package/registry/field.ts +584 -584
  72. package/registry/{stat.ts → figure.ts} +96 -96
  73. package/registry/glyph-select.ts +268 -268
  74. package/registry/hover-card.ts +222 -222
  75. package/registry/input-group.ts +229 -229
  76. package/registry/input.ts +181 -181
  77. package/registry/item.ts +376 -376
  78. package/registry/kbd.ts +64 -64
  79. package/registry/line-chart.ts +218 -218
  80. package/registry/month-grid.ts +328 -328
  81. package/registry/number-input.ts +443 -443
  82. package/registry/popover.ts +368 -368
  83. package/registry/scatter-chart.ts +221 -221
  84. package/registry/select.ts +620 -620
  85. package/registry/slider.ts +259 -259
  86. package/registry/sort-button.ts +189 -189
  87. package/registry/sparkline.ts +114 -114
  88. package/registry/switch.ts +205 -205
  89. package/registry/tabs.ts +426 -426
  90. package/registry/text-area.ts +186 -186
  91. package/registry/toast.ts +965 -965
  92. package/registry/toggle-group.ts +295 -295
  93. package/registry/tooltip.ts +156 -156
  94. package/registry/treemap.ts +847 -847
  95. package/skills/theming-vela-ui/SKILL.md +137 -137
  96. package/skills/using-vela-ui-components/SKILL.md +139 -139
  97. package/skills/writing-vela-ui-components/SKILL.md +163 -163
  98. package/src/components/badge.ts +119 -119
  99. package/src/components/bar-chart.ts +215 -215
  100. package/src/components/button.ts +387 -387
  101. package/src/components/callout-bubble.ts +347 -347
  102. package/src/components/card.ts +379 -379
  103. package/src/components/checkbox.ts +234 -234
  104. package/src/components/collapsible.ts +271 -271
  105. package/src/components/color-picker.ts +582 -582
  106. package/src/components/context-menu.ts +208 -208
  107. package/src/components/data-table.ts +215 -215
  108. package/src/components/date-picker.ts +483 -483
  109. package/src/components/dialog.ts +551 -551
  110. package/src/components/donut.ts +145 -145
  111. package/src/components/drawer.ts +636 -636
  112. package/src/components/dropdown-menu.ts +762 -762
  113. package/src/components/empty.ts +91 -91
  114. package/src/components/field.ts +584 -584
  115. package/src/components/{stat.ts → figure.ts} +96 -96
  116. package/src/components/glyph-select.ts +268 -268
  117. package/src/components/hover-card.ts +222 -222
  118. package/src/components/input-group.ts +229 -229
  119. package/src/components/input.ts +181 -181
  120. package/src/components/item.ts +376 -376
  121. package/src/components/kbd.ts +64 -64
  122. package/src/components/line-chart.ts +218 -218
  123. package/src/components/month-grid.ts +328 -328
  124. package/src/components/number-input.ts +443 -443
  125. package/src/components/popover.ts +368 -368
  126. package/src/components/scatter-chart.ts +221 -221
  127. package/src/components/select.ts +620 -620
  128. package/src/components/slider.ts +259 -259
  129. package/src/components/sort-button.ts +189 -189
  130. package/src/components/sparkline.ts +114 -114
  131. package/src/components/switch.ts +205 -205
  132. package/src/components/tabs.ts +426 -426
  133. package/src/components/text-area.ts +186 -186
  134. package/src/components/toast.ts +965 -965
  135. package/src/components/toggle-group.ts +295 -295
  136. package/src/components/tooltip.ts +156 -156
  137. package/src/components/treemap.ts +847 -847
  138. package/src/index.ts +24 -24
  139. package/src/lib/calendar.ts +117 -117
  140. package/src/lib/chart.ts +72 -72
  141. package/src/lib/color.ts +89 -89
  142. package/src/lib/component-index.ts +163 -163
  143. package/src/lib/css.ts +48 -48
  144. package/src/lib/define.ts +45 -45
  145. package/src/lib/dispose.ts +36 -36
  146. package/src/lib/h.ts +55 -55
  147. package/src/lib/headless.ts +16 -16
  148. package/src/lib/i18n.ts +30 -30
  149. package/src/lib/icons.ts +244 -244
  150. package/src/lib/kit-text.ts +26 -26
  151. package/src/lib/page.ts +24 -24
  152. package/src/lib/palette.ts +81 -81
  153. package/src/lib/placement.ts +188 -188
  154. package/src/lib/scope.ts +135 -135
  155. package/src/lib/styles.ts +53 -53
  156. package/src/lib/surface-events.ts +31 -31
  157. package/src/lib/surface-exit.ts +87 -87
  158. package/src/lib/t.ts +68 -68
  159. package/src/lib/theme.ts +684 -670
  160. package/src/lib/tokens.ts +110 -110
  161. package/src/lib/variants.ts +32 -32
  162. package/src/lib/zag.ts +61 -46
  163. package/stylelint/index.mjs +60 -60
  164. package/stylelint/lint.mjs +81 -81
  165. package/stylelint/plugin.mjs +115 -115
  166. package/dist/chunk-P4MTEMT7.js +0 -23
  167. package/dist/stat.js +0 -41
package/cli/index.mjs CHANGED
@@ -1,154 +1,154 @@
1
- #!/usr/bin/env node
2
- // vela-ui: add a component to a project, copy its source for a variant of your own, see what
3
- // changed upstream since, and check the project.
4
- import { spawnSync } from 'node:child_process';
5
- import { join, relative, resolve } from 'node:path';
6
- import { createInterface } from 'node:readline/promises';
7
- import { pathToFileURL } from 'node:url';
8
- import { parseArgs } from 'node:util';
9
- import * as engine from './engine.mjs';
10
-
11
- const USAGE = `Usage: vela-ui <command> [options]
12
-
13
- list the components
14
- add <component> make ${engine.PACKAGE} a direct dependency and print the import
15
- add <component> --source copy the component's source, for a variant of your own
16
- --as <name> the copy's component name (default: app-<component>)
17
- --force overwrite an existing copy
18
- diff <copy> what changed upstream since the copy was made
19
- --accept record that the copy has taken those changes in
20
- check one copy of the package, no copy behind it, the theme file valid
21
-
22
- --cwd <path> the project (default: the current folder)
23
- --from <path> read the catalog from a checkout instead of this package
24
- --agents add the note for coding agents to AGENTS.md without asking
25
- --no-install print the install command instead of running it`;
26
-
27
- const say = (text = '') => process.stdout.write(`${text}\n`);
28
- const fail = (text) => {
29
- process.stderr.write(`vela-ui: ${text}\n`);
30
- process.exit(1);
31
- };
32
-
33
- let parsed;
34
- try {
35
- parsed = parseArgs({
36
- allowPositionals: true,
37
- options: {
38
- source: { type: 'boolean' },
39
- as: { type: 'string' },
40
- force: { type: 'boolean' },
41
- accept: { type: 'boolean' },
42
- from: { type: 'string' },
43
- cwd: { type: 'string' },
44
- agents: { type: 'boolean' },
45
- 'no-install': { type: 'boolean' },
46
- help: { type: 'boolean', short: 'h' },
47
- },
48
- });
49
- } catch (e) {
50
- fail(`${e.message}\n\n${USAGE}`);
51
- }
52
- const { values, positionals } = parsed;
53
- const [command, name] = positionals;
54
- if (!command || values.help) {
55
- say(USAGE);
56
- process.exit(command || values.help ? 0 : 1);
57
- }
58
-
59
- const cwd = resolve(values.cwd ?? process.cwd());
60
- let catalog;
61
- try {
62
- catalog = engine.readCatalog(values.from);
63
- } catch (e) {
64
- fail(e.message);
65
- }
66
-
67
- async function offerAgentsNote() {
68
- if (engine.hasAgentsBlock(cwd)) return;
69
- let yes = values.agents === true;
70
- if (!yes && process.stdin.isTTY) {
71
- const rl = createInterface({ input: process.stdin, output: process.stdout });
72
- const answer = await rl.question('Add a note to AGENTS.md pointing coding agents at the kit\'s reference? [Y/n] ');
73
- rl.close();
74
- yes = !/^n/i.test(answer.trim());
75
- }
76
- if (yes) {
77
- engine.writeAgentsBlock(cwd);
78
- say('Added the note to AGENTS.md.');
79
- } else if (!process.stdin.isTTY) say('Tip: `vela-ui add <component> --agents` adds a note to AGENTS.md pointing coding agents at the kit\'s reference.');
80
- }
81
-
82
- function ensureDependency() {
83
- if (engine.isDirectDependency(cwd)) return;
84
- const cmd = engine.installCommand(engine.detectPackageManager(cwd), `${engine.PACKAGE}@^${catalog.version}`);
85
- if (values['no-install']) {
86
- say(`${engine.PACKAGE} is not a dependency of this project yet: ${cmd}`);
87
- return;
88
- }
89
- say(`$ ${cmd}`);
90
- const run = spawnSync(cmd, { cwd, stdio: 'inherit', shell: true });
91
- if (run.status !== 0) fail(`the install failed (${cmd}).`);
92
- }
93
-
94
- switch (command) {
95
- case 'list': {
96
- for (const c of catalog.manifest.components) say(`${c.name.padEnd(16)} ${c.factory ?? ''}`.trimEnd());
97
- break;
98
- }
99
- case 'add': {
100
- if (!name) fail('add needs a component: `vela-ui list` shows them.');
101
- const item = engine.findItem(catalog, name);
102
- if (!item) fail(`no component "${name}" in ${engine.PACKAGE} ${catalog.version}: \`vela-ui list\` shows them.`);
103
- ensureDependency();
104
- const factory = item.factory ?? item.exports[0];
105
- if (values.source) {
106
- const as = values.as ?? `app-${item.component ?? item.name}`;
107
- if (!/^[a-z][a-z0-9-]*$/.test(as)) fail(`--as takes a lowercase name with dashes ("${as}").`);
108
- let file;
109
- try {
110
- ({ file } = engine.copyItem({ cwd, catalog, item, as, force: values.force }));
111
- } catch (e) {
112
- fail(e.message);
113
- }
114
- const alias = engine.readConfig(cwd).aliases?.ui;
115
- const from = alias?.startsWith('#') ? `${alias}/${as}` : `./${relative(cwd, file).split('\\').join('/').replace(/\.ts$/, '')}`;
116
- say(`Copied ${item.name} to ${relative(cwd, file)}, as the component "${as}" (its parts are data-slot="${as}…").`);
117
- say(`Vela and the plugins keep rendering the package's ${item.name}.`);
118
- say();
119
- say(`import { ${factory} } from '${from}';`);
120
- } else {
121
- say(item.example ?? `import { ${factory} } from '${item.import}';`);
122
- }
123
- await offerAgentsNote();
124
- break;
125
- }
126
- case 'diff': {
127
- if (!name) fail('diff needs a copy: the names are in vela-ui.lock.json.');
128
- try {
129
- const { entry, diff } = engine.upstreamDiff({ cwd, catalog, as: name });
130
- if (!diff) say(`${name}: no change upstream since ${entry.version}.`);
131
- else {
132
- say(`${name}: ${entry.item}, ${entry.version} -> ${catalog.version} (- upstream when copied, + upstream now)\n`);
133
- say(diff);
134
- }
135
- if (values.accept) {
136
- engine.acceptUpstream({ cwd, catalog, as: name });
137
- say(`\nRecorded ${name} as up to date with ${catalog.version}.`);
138
- }
139
- } catch (e) {
140
- fail(e.message);
141
- }
142
- break;
143
- }
144
- case 'check': {
145
- const { checkTheme } = await import(pathToFileURL(join(catalog.root, 'dist/theme.js')).href);
146
- const findings = engine.checkProject({ cwd, catalog, checkTheme });
147
- if (!findings.length) say('vela-ui check: all good.');
148
- for (const f of findings) say(`${f.level === 'error' ? 'error' : 'warn '} ${f.text}`);
149
- process.exit(findings.some((f) => f.level === 'error') ? 1 : 0);
150
- break;
151
- }
152
- default:
153
- fail(`unknown command "${command}".\n\n${USAGE}`);
154
- }
1
+ #!/usr/bin/env node
2
+ // vela-ui: add a component to a project, copy its source for a variant of your own, see what
3
+ // changed upstream since, and check the project.
4
+ import { spawnSync } from 'node:child_process';
5
+ import { join, relative, resolve } from 'node:path';
6
+ import { createInterface } from 'node:readline/promises';
7
+ import { pathToFileURL } from 'node:url';
8
+ import { parseArgs } from 'node:util';
9
+ import * as engine from './engine.mjs';
10
+
11
+ const USAGE = `Usage: vela-ui <command> [options]
12
+
13
+ list the components
14
+ add <component> make ${engine.PACKAGE} a direct dependency and print the import
15
+ add <component> --source copy the component's source, for a variant of your own
16
+ --as <name> the copy's component name (default: app-<component>)
17
+ --force overwrite an existing copy
18
+ diff <copy> what changed upstream since the copy was made
19
+ --accept record that the copy has taken those changes in
20
+ check one copy of the package, no copy behind it, the theme file valid
21
+
22
+ --cwd <path> the project (default: the current folder)
23
+ --from <path> read the catalog from a checkout instead of this package
24
+ --agents add the note for coding agents to AGENTS.md without asking
25
+ --no-install print the install command instead of running it`;
26
+
27
+ const say = (text = '') => process.stdout.write(`${text}\n`);
28
+ const fail = (text) => {
29
+ process.stderr.write(`vela-ui: ${text}\n`);
30
+ process.exit(1);
31
+ };
32
+
33
+ let parsed;
34
+ try {
35
+ parsed = parseArgs({
36
+ allowPositionals: true,
37
+ options: {
38
+ source: { type: 'boolean' },
39
+ as: { type: 'string' },
40
+ force: { type: 'boolean' },
41
+ accept: { type: 'boolean' },
42
+ from: { type: 'string' },
43
+ cwd: { type: 'string' },
44
+ agents: { type: 'boolean' },
45
+ 'no-install': { type: 'boolean' },
46
+ help: { type: 'boolean', short: 'h' },
47
+ },
48
+ });
49
+ } catch (e) {
50
+ fail(`${e.message}\n\n${USAGE}`);
51
+ }
52
+ const { values, positionals } = parsed;
53
+ const [command, name] = positionals;
54
+ if (!command || values.help) {
55
+ say(USAGE);
56
+ process.exit(command || values.help ? 0 : 1);
57
+ }
58
+
59
+ const cwd = resolve(values.cwd ?? process.cwd());
60
+ let catalog;
61
+ try {
62
+ catalog = engine.readCatalog(values.from);
63
+ } catch (e) {
64
+ fail(e.message);
65
+ }
66
+
67
+ async function offerAgentsNote() {
68
+ if (engine.hasAgentsBlock(cwd)) return;
69
+ let yes = values.agents === true;
70
+ if (!yes && process.stdin.isTTY) {
71
+ const rl = createInterface({ input: process.stdin, output: process.stdout });
72
+ const answer = await rl.question('Add a note to AGENTS.md pointing coding agents at the kit\'s reference? [Y/n] ');
73
+ rl.close();
74
+ yes = !/^n/i.test(answer.trim());
75
+ }
76
+ if (yes) {
77
+ engine.writeAgentsBlock(cwd);
78
+ say('Added the note to AGENTS.md.');
79
+ } else if (!process.stdin.isTTY) say('Tip: `vela-ui add <component> --agents` adds a note to AGENTS.md pointing coding agents at the kit\'s reference.');
80
+ }
81
+
82
+ function ensureDependency() {
83
+ if (engine.isDirectDependency(cwd)) return;
84
+ const cmd = engine.installCommand(engine.detectPackageManager(cwd), `${engine.PACKAGE}@^${catalog.version}`);
85
+ if (values['no-install']) {
86
+ say(`${engine.PACKAGE} is not a dependency of this project yet: ${cmd}`);
87
+ return;
88
+ }
89
+ say(`$ ${cmd}`);
90
+ const run = spawnSync(cmd, { cwd, stdio: 'inherit', shell: true });
91
+ if (run.status !== 0) fail(`the install failed (${cmd}).`);
92
+ }
93
+
94
+ switch (command) {
95
+ case 'list': {
96
+ for (const c of catalog.manifest.components) say(`${c.name.padEnd(16)} ${c.factory ?? ''}`.trimEnd());
97
+ break;
98
+ }
99
+ case 'add': {
100
+ if (!name) fail('add needs a component: `vela-ui list` shows them.');
101
+ const item = engine.findItem(catalog, name);
102
+ if (!item) fail(`no component "${name}" in ${engine.PACKAGE} ${catalog.version}: \`vela-ui list\` shows them.`);
103
+ ensureDependency();
104
+ const factory = item.factory ?? item.exports[0];
105
+ if (values.source) {
106
+ const as = values.as ?? `app-${item.component ?? item.name}`;
107
+ if (!/^[a-z][a-z0-9-]*$/.test(as)) fail(`--as takes a lowercase name with dashes ("${as}").`);
108
+ let file;
109
+ try {
110
+ ({ file } = engine.copyItem({ cwd, catalog, item, as, force: values.force }));
111
+ } catch (e) {
112
+ fail(e.message);
113
+ }
114
+ const alias = engine.readConfig(cwd).aliases?.ui;
115
+ const from = alias?.startsWith('#') ? `${alias}/${as}` : `./${relative(cwd, file).split('\\').join('/').replace(/\.ts$/, '')}`;
116
+ say(`Copied ${item.name} to ${relative(cwd, file)}, as the component "${as}" (its parts are data-slot="${as}…").`);
117
+ say(`Vela and the plugins keep rendering the package's ${item.name}.`);
118
+ say();
119
+ say(`import { ${factory} } from '${from}';`);
120
+ } else {
121
+ say(item.example ?? `import { ${factory} } from '${item.import}';`);
122
+ }
123
+ await offerAgentsNote();
124
+ break;
125
+ }
126
+ case 'diff': {
127
+ if (!name) fail('diff needs a copy: the names are in vela-ui.lock.json.');
128
+ try {
129
+ const { entry, diff } = engine.upstreamDiff({ cwd, catalog, as: name });
130
+ if (!diff) say(`${name}: no change upstream since ${entry.version}.`);
131
+ else {
132
+ say(`${name}: ${entry.item}, ${entry.version} -> ${catalog.version} (- upstream when copied, + upstream now)\n`);
133
+ say(diff);
134
+ }
135
+ if (values.accept) {
136
+ engine.acceptUpstream({ cwd, catalog, as: name });
137
+ say(`\nRecorded ${name} as up to date with ${catalog.version}.`);
138
+ }
139
+ } catch (e) {
140
+ fail(e.message);
141
+ }
142
+ break;
143
+ }
144
+ case 'check': {
145
+ const { checkTheme } = await import(pathToFileURL(join(catalog.root, 'dist/theme.js')).href);
146
+ const findings = engine.checkProject({ cwd, catalog, checkTheme });
147
+ if (!findings.length) say('vela-ui check: all good.');
148
+ for (const f of findings) say(`${f.level === 'error' ? 'error' : 'warn '} ${f.text}`);
149
+ process.exit(findings.some((f) => f.level === 'error') ? 1 : 0);
150
+ break;
151
+ }
152
+ default:
153
+ fail(`unknown command "${command}".\n\n${USAGE}`);
154
+ }
@@ -1,7 +1,7 @@
1
- import { Popover } from './chunk-KKS6NEGI.js';
1
+ import { Popover } from './chunk-BWSOMG3G.js';
2
2
  import './chunk-J2QJATCD.js';
3
3
  import './chunk-S7USVSYP.js';
4
- import './chunk-TBXUF5YX.js';
4
+ import './chunk-RH53NQGE.js';
5
5
  import './chunk-TAKSIV57.js';
6
6
  import './chunk-MMTMOV6R.js';
7
7
  import './chunk-3Q32K4PE.js';
package/dist/checkbox.js CHANGED
@@ -1,6 +1,6 @@
1
- export { Checkbox, checkboxController, checkboxDef, checkboxVariants, createCheckbox } from './chunk-IOOYDSSK.js';
1
+ export { Checkbox, checkboxController, checkboxDef, checkboxVariants, createCheckbox } from './chunk-SKFAYTDK.js';
2
2
  import './chunk-A72NWYNP.js';
3
- import './chunk-P4MTEMT7.js';
3
+ import './chunk-GUIYFQ27.js';
4
4
  import './chunk-C3PXY2SW.js';
5
5
  import './chunk-LZWZV2ZS.js';
6
6
  import './chunk-Q6WTDVH6.js';
@@ -1,6 +1,6 @@
1
1
  import { announceSurface } from './chunk-J2QJATCD.js';
2
2
  import { holdForExit } from './chunk-S7USVSYP.js';
3
- import { floatingLayerHost, ensureUIHost } from './chunk-TBXUF5YX.js';
3
+ import { floatingLayerHost, ensureUIHost } from './chunk-RH53NQGE.js';
4
4
  import { viewportRect, insetRect, intersectRects, placePopover } from './chunk-3Q32K4PE.js';
5
5
  import { disposeWithin } from './chunk-A72NWYNP.js';
6
6
  import { h } from './chunk-Q6WTDVH6.js';
@@ -0,0 +1,30 @@
1
+ import { pageUid } from './chunk-X66RJAIS.js';
2
+ import { spreadProps as spreadProps$1, VanillaMachine } from '@zag-js/vanilla';
3
+ export { normalizeProps } from '@zag-js/vanilla';
4
+
5
+ function spreadProps(...[node, attrs, machineId]) {
6
+ const style = attrs["style"];
7
+ if (style === null || typeof style !== "object") return spreadProps$1(node, attrs, machineId);
8
+ const set = {};
9
+ for (const [key, value] of Object.entries(style)) if (value != null) set[key] = value;
10
+ return spreadProps$1(node, { ...attrs, style: set }, machineId);
11
+ }
12
+ function runMachine(machine, props, render) {
13
+ const m = new VanillaMachine(machine, props);
14
+ const unsub = m.subscribe(render);
15
+ m.start();
16
+ render(m.service);
17
+ return {
18
+ service: m.service,
19
+ flush: () => render(m.service),
20
+ stop: () => {
21
+ unsub();
22
+ m.stop();
23
+ }
24
+ };
25
+ }
26
+ function nextUid(prefix) {
27
+ return pageUid(prefix);
28
+ }
29
+
30
+ export { nextUid, runMachine, spreadProps };
@@ -2,9 +2,9 @@ import { kitTranslator } from './chunk-FVH6L7FM.js';
2
2
  import { msg, textOf } from './chunk-FN2BUFNM.js';
3
3
  import { announceSurface } from './chunk-J2QJATCD.js';
4
4
  import { holdForExit } from './chunk-S7USVSYP.js';
5
- import { floatingLayerHost } from './chunk-TBXUF5YX.js';
5
+ import { floatingLayerHost } from './chunk-RH53NQGE.js';
6
6
  import { zagPositioning, splitPlacement } from './chunk-3Q32K4PE.js';
7
- import { normalizeProps, nextUid, runMachine, spreadProps } from './chunk-P4MTEMT7.js';
7
+ import { normalizeProps, nextUid, runMachine, spreadProps } from './chunk-GUIYFQ27.js';
8
8
  import { iconEl } from './chunk-C3PXY2SW.js';
9
9
  import { addSlot } from './chunk-Q6WTDVH6.js';
10
10
  import { t } from './chunk-6QCILIT2.js';
@@ -1,6 +1,6 @@
1
- import { openPopoverTrigger, closeOpenPopovers, Popover } from './chunk-KKS6NEGI.js';
1
+ import { openPopoverTrigger, closeOpenPopovers, Popover } from './chunk-BWSOMG3G.js';
2
2
  import { ownTeardown } from './chunk-A72NWYNP.js';
3
- import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-P4MTEMT7.js';
3
+ import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-GUIYFQ27.js';
4
4
  import { iconEl } from './chunk-C3PXY2SW.js';
5
5
  import { variants } from './chunk-LZWZV2ZS.js';
6
6
  import { addSlot, h } from './chunk-Q6WTDVH6.js';
@@ -71,6 +71,10 @@ var KIT_COMPONENTS = {
71
71
  parts: ["grid", "row", "span", "label", "cell", "bool", "stacked", "stacked-head", "inline", "inline-item", "toggle-label", "section", "sep"],
72
72
  settings: []
73
73
  },
74
+ figure: {
75
+ parts: ["root", "label", "value", "sub"],
76
+ settings: []
77
+ },
74
78
  "glyph-select": {
75
79
  parts: ["root", "value", "icon", "content", "item"],
76
80
  settings: ["radius", "content-radius", "focus-ring"]
@@ -131,10 +135,6 @@ var KIT_COMPONENTS = {
131
135
  parts: ["root", "area", "baseline", "line"],
132
136
  settings: ["stroke-width"]
133
137
  },
134
- stat: {
135
- parts: ["root", "label", "value", "sub"],
136
- settings: []
137
- },
138
138
  switch: {
139
139
  parts: ["root", "control", "thumb"],
140
140
  settings: ["width", "height", "thumb-size", "width-sm", "height-sm", "thumb-size-sm"]
@@ -539,6 +539,20 @@ ${STATIC_DECLS}
539
539
  @supports not selector(::-webkit-scrollbar) {
540
540
  :where(.vela-ui, .vela-ui-layer, .vela-ui *, .vela-ui-layer *) { scrollbar-width: thin; scrollbar-color: var(--vela-scroll) transparent; }
541
541
  }
542
+ /* A search field's clear cross in the theme's ink: Chromium and Safari otherwise draw their own,
543
+ blue on some systems. */
544
+ :where(.vela-ui, .vela-ui-layer) :where(input[type='search'])::-webkit-search-cancel-button {
545
+ -webkit-appearance: none;
546
+ appearance: none;
547
+ flex: none;
548
+ width: 12px;
549
+ height: 12px;
550
+ margin-inline-start: 4px;
551
+ cursor: pointer;
552
+ background-color: var(--vela-fg-bright);
553
+ -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 2.5l7 7m0-7l-7 7' stroke='%23000' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
554
+ mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 2.5l7 7m0-7l-7 7' stroke='%23000' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
555
+ }
542
556
  }
543
557
  .vela-ui, .vela-ui-layer {
544
558
  font-family: var(--vela-font, -apple-system, system-ui, sans-serif);
@@ -1,5 +1,5 @@
1
1
  import { ownTeardown } from './chunk-A72NWYNP.js';
2
- import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-P4MTEMT7.js';
2
+ import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-GUIYFQ27.js';
3
3
  import { iconEl } from './chunk-C3PXY2SW.js';
4
4
  import { variants } from './chunk-LZWZV2ZS.js';
5
5
  import { h } from './chunk-Q6WTDVH6.js';
@@ -1,9 +1,9 @@
1
1
  import { kitTranslator } from './chunk-FVH6L7FM.js';
2
2
  import { msg, textOf } from './chunk-FN2BUFNM.js';
3
- import { openPopoverTrigger, closeOpenPopovers, Popover } from './chunk-KKS6NEGI.js';
3
+ import { openPopoverTrigger, closeOpenPopovers, Popover } from './chunk-BWSOMG3G.js';
4
4
  import { ACCENT_BRIGHT, ACCENT, BULLISH, BEARISH, WARNING, NEUTRAL } from './chunk-MMTMOV6R.js';
5
5
  import { ownTeardown, disposeWithin } from './chunk-A72NWYNP.js';
6
- import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-P4MTEMT7.js';
6
+ import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-GUIYFQ27.js';
7
7
  import { h } from './chunk-Q6WTDVH6.js';
8
8
  import { t } from './chunk-6QCILIT2.js';
9
9
  import { defineComponent } from './chunk-VMCR3S2A.js';
@@ -1,7 +1,7 @@
1
1
  import { kitTranslator } from './chunk-FVH6L7FM.js';
2
2
  import { msg, textOf } from './chunk-FN2BUFNM.js';
3
3
  import { ownTeardown } from './chunk-A72NWYNP.js';
4
- import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-P4MTEMT7.js';
4
+ import { nextUid, runMachine, normalizeProps, spreadProps } from './chunk-GUIYFQ27.js';
5
5
  import { iconEl } from './chunk-C3PXY2SW.js';
6
6
  import { variants } from './chunk-LZWZV2ZS.js';
7
7
  import { h } from './chunk-Q6WTDVH6.js';
@@ -1,4 +1,4 @@
1
- import { openPopoverTrigger, closeOpenPopovers, Popover } from './chunk-KKS6NEGI.js';
1
+ import { openPopoverTrigger, closeOpenPopovers, Popover } from './chunk-BWSOMG3G.js';
2
2
  import { iconEl } from './chunk-C3PXY2SW.js';
3
3
  import { h } from './chunk-Q6WTDVH6.js';
4
4
  import { t } from './chunk-6QCILIT2.js';
@@ -1,4 +1,4 @@
1
- import { nextUid } from './chunk-P4MTEMT7.js';
1
+ import { nextUid } from './chunk-GUIYFQ27.js';
2
2
  import { iconEl } from './chunk-C3PXY2SW.js';
3
3
  import { variants } from './chunk-LZWZV2ZS.js';
4
4
  import { h } from './chunk-Q6WTDVH6.js';
@@ -1,15 +1,15 @@
1
- export { ColorField, blendOver, buildColorPicker, buildPalette, closeColorPopover, colorField, colorPickerController, colorPickerDef, combineColor, createColorField, hslHex, splitColor, transparencyChecker } from './chunk-OQXFQMZM.js';
1
+ export { ColorField, blendOver, buildColorPicker, buildPalette, closeColorPopover, colorField, colorPickerController, colorPickerDef, combineColor, createColorField, hslHex, splitColor, transparencyChecker } from './chunk-TGJNHUYV.js';
2
2
  import './chunk-FVH6L7FM.js';
3
3
  import './chunk-FN2BUFNM.js';
4
- import './chunk-KKS6NEGI.js';
4
+ import './chunk-BWSOMG3G.js';
5
5
  import './chunk-J2QJATCD.js';
6
6
  import './chunk-S7USVSYP.js';
7
- import './chunk-TBXUF5YX.js';
7
+ import './chunk-RH53NQGE.js';
8
8
  import './chunk-TAKSIV57.js';
9
9
  import './chunk-MMTMOV6R.js';
10
10
  import './chunk-3Q32K4PE.js';
11
11
  import './chunk-A72NWYNP.js';
12
- import './chunk-P4MTEMT7.js';
12
+ import './chunk-GUIYFQ27.js';
13
13
  import './chunk-Q6WTDVH6.js';
14
14
  import './chunk-6QCILIT2.js';
15
15
  import './chunk-VMCR3S2A.js';
@@ -1,14 +1,14 @@
1
- import { DropdownMenu } from './chunk-B2EZB5ZG.js';
1
+ import { DropdownMenu } from './chunk-KUWTI2PE.js';
2
2
  import { kitTranslator } from './chunk-FVH6L7FM.js';
3
3
  import './chunk-FN2BUFNM.js';
4
4
  import './chunk-J2QJATCD.js';
5
5
  import './chunk-S7USVSYP.js';
6
- import './chunk-TBXUF5YX.js';
6
+ import './chunk-RH53NQGE.js';
7
7
  import './chunk-TAKSIV57.js';
8
8
  import './chunk-MMTMOV6R.js';
9
9
  import './chunk-3Q32K4PE.js';
10
10
  import { ownTeardown } from './chunk-A72NWYNP.js';
11
- import './chunk-P4MTEMT7.js';
11
+ import './chunk-GUIYFQ27.js';
12
12
  import './chunk-C3PXY2SW.js';
13
13
  import './chunk-Q6WTDVH6.js';
14
14
  import './chunk-6QCILIT2.js';
package/dist/dialog.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import { kitTranslator } from './chunk-FVH6L7FM.js';
2
2
  import { msg, textOf } from './chunk-FN2BUFNM.js';
3
- import { isPopoverOpen, eventDismissedPopover, closeOpenPopovers } from './chunk-KKS6NEGI.js';
3
+ import { isPopoverOpen, eventDismissedPopover, closeOpenPopovers } from './chunk-BWSOMG3G.js';
4
4
  import { announceSurface } from './chunk-J2QJATCD.js';
5
5
  import { holdForExit } from './chunk-S7USVSYP.js';
6
- import './chunk-TBXUF5YX.js';
6
+ import './chunk-RH53NQGE.js';
7
7
  import './chunk-TAKSIV57.js';
8
8
  import './chunk-MMTMOV6R.js';
9
9
  import './chunk-3Q32K4PE.js';
10
10
  import { disposeWithin } from './chunk-A72NWYNP.js';
11
- import { normalizeProps, nextUid, runMachine, spreadProps } from './chunk-P4MTEMT7.js';
11
+ import { normalizeProps, nextUid, runMachine, spreadProps } from './chunk-GUIYFQ27.js';
12
12
  import { iconEl } from './chunk-C3PXY2SW.js';
13
13
  import './chunk-Q6WTDVH6.js';
14
14
  import { t } from './chunk-6QCILIT2.js';
package/dist/donut.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { C as ComponentDef } from './define-D5u3F5Dj.js';
2
2
  import './t.js';
3
3
 
4
- declare const donutDef: ComponentDef<"donut", "caption" | "figure" | "label" | "legend" | "track" | "root" | "swatch" | "value" | "ring" | "segment" | "item", "swatch-radius">;
4
+ declare const donutDef: ComponentDef<"donut", "caption" | "figure" | "label" | "legend" | "track" | "root" | "value" | "swatch" | "ring" | "segment" | "item", "swatch-radius">;
5
5
  interface DonutSegment {
6
6
  value: number;
7
7
  label: string;
package/dist/drawer.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { announceSurface } from './chunk-J2QJATCD.js';
2
2
  import { holdForExit } from './chunk-S7USVSYP.js';
3
3
  import { disposeWithin } from './chunk-A72NWYNP.js';
4
- import { normalizeProps, nextUid, runMachine, spreadProps } from './chunk-P4MTEMT7.js';
4
+ import { normalizeProps, nextUid, runMachine, spreadProps } from './chunk-GUIYFQ27.js';
5
5
  import { t } from './chunk-6QCILIT2.js';
6
6
  import { defineComponent } from './chunk-VMCR3S2A.js';
7
7
  import { defineStyles, css } from './chunk-XBEL4K33.js';
@@ -1,13 +1,13 @@
1
- export { DropdownMenu, createDropdownMenu, dropdownMenuController, dropdownMenuDef } from './chunk-B2EZB5ZG.js';
1
+ export { DropdownMenu, createDropdownMenu, dropdownMenuController, dropdownMenuDef } from './chunk-KUWTI2PE.js';
2
2
  import './chunk-FVH6L7FM.js';
3
3
  import './chunk-FN2BUFNM.js';
4
4
  import './chunk-J2QJATCD.js';
5
5
  import './chunk-S7USVSYP.js';
6
- import './chunk-TBXUF5YX.js';
6
+ import './chunk-RH53NQGE.js';
7
7
  import './chunk-TAKSIV57.js';
8
8
  import './chunk-MMTMOV6R.js';
9
9
  import './chunk-3Q32K4PE.js';
10
- import './chunk-P4MTEMT7.js';
10
+ import './chunk-GUIYFQ27.js';
11
11
  import './chunk-C3PXY2SW.js';
12
12
  import './chunk-Q6WTDVH6.js';
13
13
  import './chunk-6QCILIT2.js';
package/dist/field.js CHANGED
@@ -1,21 +1,21 @@
1
1
  import { TextArea } from './chunk-ALAHGSLC.js';
2
- import { NumberInput } from './chunk-UEO6W37Z.js';
3
- import { Select } from './chunk-WWHNUKSZ.js';
4
- import { widthField } from './chunk-OJ2SEMN6.js';
2
+ import { NumberInput } from './chunk-VC7SVSDK.js';
3
+ import { Select } from './chunk-QGWAN3EP.js';
4
+ import { widthField } from './chunk-YT2BSP7O.js';
5
5
  import { Input } from './chunk-5BJV5FY5.js';
6
- import { ColorField } from './chunk-OQXFQMZM.js';
6
+ import { ColorField } from './chunk-TGJNHUYV.js';
7
7
  import './chunk-FVH6L7FM.js';
8
8
  import './chunk-FN2BUFNM.js';
9
- import './chunk-KKS6NEGI.js';
9
+ import './chunk-BWSOMG3G.js';
10
10
  import './chunk-J2QJATCD.js';
11
11
  import './chunk-S7USVSYP.js';
12
- import './chunk-TBXUF5YX.js';
12
+ import './chunk-RH53NQGE.js';
13
13
  import './chunk-TAKSIV57.js';
14
14
  import './chunk-MMTMOV6R.js';
15
15
  import './chunk-3Q32K4PE.js';
16
- import { Checkbox } from './chunk-IOOYDSSK.js';
16
+ import { Checkbox } from './chunk-SKFAYTDK.js';
17
17
  import { disposeWithin } from './chunk-A72NWYNP.js';
18
- import './chunk-P4MTEMT7.js';
18
+ import './chunk-GUIYFQ27.js';
19
19
  import './chunk-C3PXY2SW.js';
20
20
  import './chunk-LZWZV2ZS.js';
21
21
  import './chunk-Q6WTDVH6.js';