react-semaphor 0.1.302 → 0.1.304

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 (56) hide show
  1. package/dist/appearance/index.cjs +1 -1
  2. package/dist/appearance/index.js +1 -1
  3. package/dist/brand-studio/index.cjs +5 -5
  4. package/dist/brand-studio/index.js +334 -385
  5. package/dist/chunks/common-types-C6cAQgyh.js +9 -0
  6. package/dist/chunks/common-types-nBuCd3u2.js +1 -0
  7. package/dist/chunks/{dashboard-controls-CZuC_QjN.js → dashboard-controls-CyFZfGaN.js} +800 -776
  8. package/dist/chunks/dashboard-controls-DCZnUFI0.js +47 -0
  9. package/dist/chunks/{dashboard-filter-controls-button-kfb_T18o.js → dashboard-filter-controls-button-DI7XUgZK.js} +142 -142
  10. package/dist/chunks/{dashboard-filter-controls-button-2I1ltWQ9.js → dashboard-filter-controls-button-YQZ-oeN5.js} +3 -3
  11. package/dist/chunks/{dashboard-json-Df6v2Jem.js → dashboard-json-C6R2qixD.js} +3 -3
  12. package/dist/chunks/{dashboard-json-C3v6rBdp.js → dashboard-json-Z8jz16Yj.js} +1 -1
  13. package/dist/chunks/{dashboard-summary-settings-dialog-DKAaWq-G.js → dashboard-summary-settings-dialog-BlD77h63.js} +2 -2
  14. package/dist/chunks/{dashboard-summary-settings-dialog-BBALEHJQ.js → dashboard-summary-settings-dialog-DJyY-PB9.js} +1 -1
  15. package/dist/chunks/{edit-dashboard-visual-CGBYahAK.js → edit-dashboard-visual-CNGc1zcN.js} +33 -33
  16. package/dist/chunks/{edit-dashboard-visual-D8L0cl_U.js → edit-dashboard-visual-CfRJXwDR.js} +167 -168
  17. package/dist/chunks/{index-uRJmUpof.js → index-CJdxSyQq.js} +679 -656
  18. package/dist/chunks/index-D2vz3gvd.js +1360 -0
  19. package/dist/chunks/index-DRlMUglg.js +4 -0
  20. package/dist/chunks/{index-BmoR3VQT.js → index-GHhvGdF9.js} +42745 -40322
  21. package/dist/chunks/{palette-326-dgn0.js → palette-BqJlrRto.js} +7 -2
  22. package/dist/chunks/{palette-jd7xiGTg.js → palette-DD-i7bNS.js} +23 -3
  23. package/dist/chunks/{resource-management-panel-C_c-BwrC.js → resource-management-panel-7Y4ITzGH.js} +65 -65
  24. package/dist/chunks/{resource-management-panel-DrcEEARD.js → resource-management-panel-Bdus73Iu.js} +1 -1
  25. package/dist/chunks/{rotate-ccw-BugHcM1w.js → rotate-ccw-CdGW8Rxm.js} +1 -1
  26. package/dist/chunks/{rotate-ccw-yFwqBFJZ.js → rotate-ccw-X8MbX_hF.js} +1 -1
  27. package/dist/chunks/{save-CaybXtdd.js → save-CFBIhbHD.js} +1 -1
  28. package/dist/chunks/{save-DU0FXUlM.js → save-j-clxFtx.js} +1 -1
  29. package/dist/chunks/{switch-CZtMtqEj.js → switch-BFhVVwh9.js} +4285 -3275
  30. package/dist/chunks/switch-BH17qlxH.js +163 -0
  31. package/dist/chunks/use-create-flow-overlay-state-CSytlf2H.js +16 -0
  32. package/dist/chunks/{use-create-flow-overlay-state-84Xe8VrP.js → use-create-flow-overlay-state-CllZvyvE.js} +318 -316
  33. package/dist/chunks/{use-visual-utils-lp5DfmvL.js → use-visual-utils-CDO4kVX5.js} +1 -1
  34. package/dist/chunks/{use-visual-utils-z3ifg6Fd.js → use-visual-utils-CyjLzcDG.js} +2 -2
  35. package/dist/dashboard/index.cjs +1 -1
  36. package/dist/dashboard/index.js +5 -5
  37. package/dist/index.cjs +1 -1
  38. package/dist/index.js +61 -60
  39. package/dist/style.css +1 -1
  40. package/dist/surfboard/index.cjs +1 -1
  41. package/dist/surfboard/index.js +6 -6
  42. package/dist/types/dashboard.d.ts +168 -0
  43. package/dist/types/index.cjs +1 -1
  44. package/dist/types/index.js +8 -11
  45. package/dist/types/main.d.ts +195 -2
  46. package/dist/types/shared.d.ts +120 -0
  47. package/dist/types/surfboard.d.ts +168 -0
  48. package/dist/types/types.d.ts +168 -0
  49. package/package.json +1 -1
  50. package/dist/chunks/braces-CpOcaBNm.js +0 -6
  51. package/dist/chunks/braces-TYclg8Hl.js +0 -23
  52. package/dist/chunks/dashboard-controls-BkuB9TQX.js +0 -47
  53. package/dist/chunks/index-Cxb9UUro.js +0 -4
  54. package/dist/chunks/index-eM6MU4q_.js +0 -1361
  55. package/dist/chunks/switch-AmoR1YIA.js +0 -163
  56. package/dist/chunks/use-create-flow-overlay-state-CiKVJGWF.js +0 -16
@@ -1,17 +1,17 @@
1
- import { jsxs as d, jsx as r, Fragment as se } from "react/jsx-runtime";
1
+ import { jsxs as d, jsx as r, Fragment as ce } from "react/jsx-runtime";
2
2
  import m from "react";
3
- import { c as $, a as Q, P as ge, b as fe, B as C, d as me, U as Je, C as De, f as le, X as je, p as ce, e as Le, T as Ue, q as $e, r as G, s as Ve, t as W, v as Me, w as _e, x as Ge, y as We, L as z, z as ee, A as re, D as ae, E as he, F as oe, I as U, g as ye, h as xe, i as ke, j as ve, k as Ce, S as He } from "../chunks/switch-CZtMtqEj.js";
4
- import { r as Xe, v as Ye, A as qe, p as Ze } from "../chunks/index-uRJmUpof.js";
5
- import { P as H } from "../chunks/palette-jd7xiGTg.js";
6
- import { R as Ne } from "../chunks/rotate-ccw-yFwqBFJZ.js";
7
- import { S as Ke } from "../chunks/save-DU0FXUlM.js";
3
+ import { c as $, a as K, P as ge, b as be, B as C, d as fe, U as De, C as Ie, f as le, X as je, p as se, e as Je, T as Le, q as $e, r as G, s as _e, t as M, v as Ue, w as Ve, x as Ge, y as Me, L as E, z as Q, A as ee, D as re, E as me, F as oe, I as ae, g as he, h as xe, i as ye, j as ke, k as ve, S as We } from "../chunks/switch-BFhVVwh9.js";
4
+ import { r as He, v as Xe, A as Ye, a as qe, p as Ze } from "../chunks/index-CJdxSyQq.js";
5
+ import { P as W, B as Ke } from "../chunks/palette-DD-i7bNS.js";
6
+ import { R as Ce } from "../chunks/rotate-ccw-X8MbX_hF.js";
7
+ import { S as Qe } from "../chunks/save-j-clxFtx.js";
8
8
  /**
9
9
  * @license lucide-react v0.453.0 - ISC
10
10
  *
11
11
  * This source code is licensed under the ISC license.
12
12
  * See the LICENSE file in the root directory of this source tree.
13
13
  */
14
- const Qe = $("Ban", [
14
+ const er = $("Ban", [
15
15
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
16
16
  ["path", { d: "m4.9 4.9 14.2 14.2", key: "1m5liu" }]
17
17
  ]);
@@ -21,7 +21,7 @@ const Qe = $("Ban", [
21
21
  * This source code is licensed under the ISC license.
22
22
  * See the LICENSE file in the root directory of this source tree.
23
23
  */
24
- const ue = $("Clipboard", [
24
+ const rr = $("Clipboard", [
25
25
  ["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
26
26
  [
27
27
  "path",
@@ -37,7 +37,7 @@ const ue = $("Clipboard", [
37
37
  * This source code is licensed under the ISC license.
38
38
  * See the LICENSE file in the root directory of this source tree.
39
39
  */
40
- const er = $("LayoutGrid", [
40
+ const or = $("LayoutGrid", [
41
41
  ["rect", { width: "7", height: "7", x: "3", y: "3", rx: "1", key: "1g98yp" }],
42
42
  ["rect", { width: "7", height: "7", x: "14", y: "3", rx: "1", key: "6d4xhi" }],
43
43
  ["rect", { width: "7", height: "7", x: "14", y: "14", rx: "1", key: "nxv5o0" }],
@@ -49,7 +49,7 @@ const er = $("LayoutGrid", [
49
49
  * This source code is licensed under the ISC license.
50
50
  * See the LICENSE file in the root directory of this source tree.
51
51
  */
52
- const rr = $("Pipette", [
52
+ const ar = $("Pipette", [
53
53
  ["path", { d: "m2 22 1-1h3l9-9", key: "1sre89" }],
54
54
  ["path", { d: "M3 21v-3l9-9", key: "hpe2y6" }],
55
55
  [
@@ -59,7 +59,7 @@ const rr = $("Pipette", [
59
59
  key: "196du1"
60
60
  }
61
61
  ]
62
- ]), Se = [
62
+ ]), Ne = [
63
63
  {
64
64
  id: "semaphor",
65
65
  name: "Semaphor",
@@ -208,18 +208,18 @@ const rr = $("Pipette", [
208
208
  }
209
209
  }
210
210
  ];
211
- function j(e) {
212
- const n = Xe({
211
+ function J(e) {
212
+ const n = He({
213
213
  organizationAppearance: e ?? void 0
214
214
  });
215
- return or(O(n));
215
+ return tr(R(n));
216
216
  }
217
217
  function L(e) {
218
- const n = O({
219
- version: qe,
218
+ const n = R({
219
+ version: Ye,
220
220
  mode: e.mode,
221
221
  schemes: e.schemes
222
- }), t = Ye(n);
222
+ }), t = Xe(n);
223
223
  if (!t.success) {
224
224
  const u = t.issues[0];
225
225
  throw new Error(
@@ -228,48 +228,48 @@ function L(e) {
228
228
  }
229
229
  return t.value;
230
230
  }
231
- function ar(e, n) {
232
- const t = Se.find((s) => s.id === n);
231
+ function nr(e, n) {
232
+ const t = Ne.find((c) => c.id === n);
233
233
  if (!t)
234
234
  return e;
235
- const u = O(e);
236
- return pe(u.schemes.light, t.light), pe(u.schemes.dark, t.dark), u;
235
+ const u = R(e);
236
+ return ue(u.schemes.light, t.light), ue(u.schemes.dark, t.dark), u;
237
237
  }
238
- function pe(e, n) {
239
- e.tokens.color.background = n.background, e.tokens.color.foreground = n.foreground, e.tokens.color.muted = n.muted, e.tokens.color.mutedForeground = n.mutedForeground, e.tokens.color.border = n.border, e.tokens.color.input = n.border, e.tokens.color.primary = n.primary, e.tokens.color.primaryForeground = n.primaryForeground, e.tokens.color.accent = n.accent, e.tokens.color.accentForeground = n.accentForeground, e.tokens.color.card = n.card, e.tokens.color.cardForeground = n.cardForeground, e.components.dashboard.background = n.background, e.components.dashboard.foreground = n.foreground, e.components.dashboard.borderColor = n.border, e.components.card.background = n.card, e.components.card.foreground = n.cardForeground, e.components.card.borderColor = n.border, e.components.interactive.toolbarBackground = n.background, e.components.interactive.background = n.card, e.components.interactive.foreground = n.foreground, e.components.interactive.borderColor = n.border, e.components.chart.palette = [...n.chartPalette], e.components.chart.background = n.card, e.components.chart.foreground = n.foreground, e.components.chart.gridColor = n.border, e.components.chart.axisColor = n.mutedForeground, e.components.table.container.background = n.card, e.components.table.container.borderColor = n.border, e.components.table.header.background = n.muted, e.components.table.header.foreground = n.mutedForeground, e.components.table.header.dividerColor = n.border, e.components.table.row.dividerColor = n.border, e.components.table.row.zebraBackground = n.muted, e.components.table.pagination.background = n.card, e.components.table.pagination.foreground = n.foreground, e.components.table.pagination.borderColor = n.border, c(e, "aggregateTable"), c(e, "pivotTable");
238
+ function ue(e, n) {
239
+ e.tokens.color.background = n.background, e.tokens.color.foreground = n.foreground, e.tokens.color.muted = n.muted, e.tokens.color.mutedForeground = n.mutedForeground, e.tokens.color.border = n.border, e.tokens.color.input = n.border, e.tokens.color.primary = n.primary, e.tokens.color.primaryForeground = n.primaryForeground, e.tokens.color.accent = n.accent, e.tokens.color.accentForeground = n.accentForeground, e.tokens.color.card = n.card, e.tokens.color.cardForeground = n.cardForeground, e.components.dashboard.background = n.background, e.components.dashboard.foreground = n.foreground, e.components.dashboard.borderColor = n.border, e.components.card.background = n.card, e.components.card.foreground = n.cardForeground, e.components.card.borderColor = n.border, e.components.interactive.toolbarBackground = n.background, e.components.interactive.background = n.card, e.components.interactive.foreground = n.foreground, e.components.interactive.borderColor = n.border, e.components.chart.palette = [...n.chartPalette], e.components.chart.background = n.card, e.components.chart.foreground = n.foreground, e.components.chart.gridColor = n.border, e.components.chart.axisColor = n.mutedForeground, e.components.table.container.background = n.card, e.components.table.container.borderColor = n.border, e.components.table.header.background = n.muted, e.components.table.header.foreground = n.mutedForeground, e.components.table.header.dividerColor = n.border, e.components.table.row.dividerColor = n.border, e.components.table.row.zebraBackground = n.muted, e.components.table.pagination.background = n.card, e.components.table.pagination.foreground = n.foreground, e.components.table.pagination.borderColor = n.border, s(e, "aggregateTable"), s(e, "pivotTable");
240
240
  }
241
- function c(e, n) {
242
- e.components[n] = O(e.components.table);
241
+ function s(e, n) {
242
+ e.components[n] = R(e.components.table);
243
243
  }
244
- function be(e, n, t) {
244
+ function pe(e, n, t) {
245
245
  switch (e.tokens.color[n] = t, n) {
246
246
  case "background":
247
247
  e.components.dashboard.background = t, e.components.interactive.toolbarBackground = t;
248
248
  break;
249
249
  case "foreground":
250
- e.components.dashboard.foreground = t, e.components.interactive.foreground = t, e.components.pagination.foreground = t, e.components.chart.foreground = t, e.components.table.pagination.foreground = t, e.components.table.subtotal.foreground = t, e.components.table.grandTotal.foreground = t, c(e, "aggregateTable"), c(e, "pivotTable");
250
+ e.components.dashboard.foreground = t, e.components.interactive.foreground = t, e.components.pagination.foreground = t, e.components.chart.foreground = t, e.components.table.pagination.foreground = t, e.components.table.subtotal.foreground = t, e.components.table.grandTotal.foreground = t, s(e, "aggregateTable"), s(e, "pivotTable");
251
251
  break;
252
252
  case "card":
253
- e.components.card.background = t, e.components.interactive.background = t, e.components.pagination.background = t, e.components.chart.background = t, e.components.table.container.background = t, e.components.table.pagination.background = t, c(e, "aggregateTable"), c(e, "pivotTable");
253
+ e.components.card.background = t, e.components.interactive.background = t, e.components.pagination.background = t, e.components.chart.background = t, e.components.table.container.background = t, e.components.table.pagination.background = t, s(e, "aggregateTable"), s(e, "pivotTable");
254
254
  break;
255
255
  case "cardForeground":
256
256
  e.components.card.foreground = t;
257
257
  break;
258
258
  case "muted":
259
- e.components.table.header.background = t, e.components.table.row.zebraBackground = t, e.components.table.subtotal.background = t, e.components.table.grandTotal.background = t, c(e, "aggregateTable"), c(e, "pivotTable");
259
+ e.components.table.header.background = t, e.components.table.row.zebraBackground = t, e.components.table.subtotal.background = t, e.components.table.grandTotal.background = t, s(e, "aggregateTable"), s(e, "pivotTable");
260
260
  break;
261
261
  case "mutedForeground":
262
- e.components.table.header.foreground = t, e.components.chart.axisColor = t, c(e, "aggregateTable"), c(e, "pivotTable");
262
+ e.components.table.header.foreground = t, e.components.chart.axisColor = t, s(e, "aggregateTable"), s(e, "pivotTable");
263
263
  break;
264
264
  case "border":
265
- e.tokens.color.input = t, e.components.dashboard.borderColor = t, e.components.card.borderColor = t, e.components.interactive.borderColor = t, e.components.pagination.borderColor = t, e.components.chart.gridColor = t, e.components.table.container.borderColor = t, e.components.table.header.dividerColor = t, e.components.table.row.dividerColor = t, e.components.table.grandTotal.borderColor = t, e.components.table.pagination.borderColor = t, c(e, "aggregateTable"), c(e, "pivotTable");
265
+ e.tokens.color.input = t, e.components.dashboard.borderColor = t, e.components.card.borderColor = t, e.components.interactive.borderColor = t, e.components.pagination.borderColor = t, e.components.chart.gridColor = t, e.components.table.container.borderColor = t, e.components.table.header.dividerColor = t, e.components.table.row.dividerColor = t, e.components.table.grandTotal.borderColor = t, e.components.table.pagination.borderColor = t, s(e, "aggregateTable"), s(e, "pivotTable");
266
266
  break;
267
267
  case "accent":
268
- e.components.table.row.hoverBackground = t, e.components.table.row.selectedBackground = t, c(e, "aggregateTable"), c(e, "pivotTable");
268
+ e.components.table.row.hoverBackground = t, e.components.table.row.selectedBackground = t, s(e, "aggregateTable"), s(e, "pivotTable");
269
269
  break;
270
270
  }
271
271
  }
272
- function X(e, n, t) {
272
+ function H(e, n, t) {
273
273
  switch (e.tokens.radius[n] = t, n) {
274
274
  case "control":
275
275
  e.components.interactive.borderRadius = t, e.components.pagination.borderRadius = t;
@@ -278,21 +278,21 @@ function X(e, n, t) {
278
278
  e.components.card.borderRadius = t;
279
279
  break;
280
280
  case "table":
281
- e.components.table.container.borderRadius = t, c(e, "aggregateTable"), c(e, "pivotTable");
281
+ e.components.table.container.borderRadius = t, s(e, "aggregateTable"), s(e, "pivotTable");
282
282
  break;
283
283
  }
284
284
  }
285
- function or(e) {
285
+ function tr(e) {
286
286
  var n, t;
287
287
  for (const u of ["light", "dark"]) {
288
- const s = e.schemes[u], l = s.tokens, i = l.color, k = (n = s.components) == null ? void 0 : n.aggregateTable, x = (t = s.components) == null ? void 0 : t.pivotTable, A = {
288
+ const c = e.schemes[u], l = c.tokens, i = l.color, k = (n = c.components) == null ? void 0 : n.aggregateTable, y = (t = c.components) == null ? void 0 : t.pivotTable, S = {
289
289
  fontFamily: "",
290
290
  headingFontFamily: "",
291
291
  monoFontFamily: "",
292
292
  baseFontSize: 14,
293
293
  density: "comfortable"
294
294
  };
295
- l.typography = { ...A, ...l.typography };
295
+ l.typography = { ...S, ...l.typography };
296
296
  const f = {
297
297
  control: 5,
298
298
  card: 5,
@@ -300,7 +300,7 @@ function or(e) {
300
300
  badge: 999
301
301
  };
302
302
  l.radius = { ...f, ...l.radius };
303
- const b = {
303
+ const g = {
304
304
  dashboardPadding: 16,
305
305
  gridGap: 12,
306
306
  cardPadding: 16,
@@ -308,14 +308,14 @@ function or(e) {
308
308
  tableCellX: 12,
309
309
  tableCellY: 8
310
310
  };
311
- l.spacing = { ...b, ...l.spacing };
312
- const w = {
311
+ l.spacing = { ...g, ...l.spacing };
312
+ const T = {
313
313
  card: "none",
314
314
  popover: "0 12px 32px rgba(15, 23, 42, 0.14)",
315
315
  focusRing: "0 0 0 2px rgba(37, 99, 235, 0.35)"
316
316
  };
317
- l.shadow = { ...w, ...l.shadow };
318
- const T = {
317
+ l.shadow = { ...T, ...l.shadow };
318
+ const F = {
319
319
  dashboard: {
320
320
  background: i.background,
321
321
  foreground: i.foreground,
@@ -344,9 +344,9 @@ function or(e) {
344
344
  gridColor: i.border,
345
345
  axisColor: i.mutedForeground
346
346
  },
347
- table: P(i, l),
348
- aggregateTable: P(i, l),
349
- pivotTable: P(i, l),
347
+ table: B(i, l),
348
+ aggregateTable: B(i, l),
349
+ pivotTable: B(i, l),
350
350
  pagination: {
351
351
  background: i.card,
352
352
  foreground: i.foreground,
@@ -354,28 +354,28 @@ function or(e) {
354
354
  borderRadius: l.radius.control
355
355
  }
356
356
  };
357
- s.components = { ...T, ...s.components };
358
- const V = {
357
+ c.components = { ...F, ...c.components };
358
+ const _ = {
359
359
  palette: [],
360
360
  background: i.card,
361
361
  foreground: i.foreground,
362
362
  gridColor: i.border,
363
363
  axisColor: i.mutedForeground
364
364
  };
365
- s.components.chart = { ...V, ...s.components.chart }, s.components.table = {
366
- ...P(i, l),
367
- ...s.components.table
368
- }, s.components.aggregateTable = k ? {
369
- ...P(i, l),
365
+ c.components.chart = { ..._, ...c.components.chart }, c.components.table = {
366
+ ...B(i, l),
367
+ ...c.components.table
368
+ }, c.components.aggregateTable = k ? {
369
+ ...B(i, l),
370
370
  ...k
371
- } : O(s.components.table), s.components.pivotTable = x ? {
372
- ...P(i, l),
373
- ...x
374
- } : O(s.components.table);
371
+ } : R(c.components.table), c.components.pivotTable = y ? {
372
+ ...B(i, l),
373
+ ...y
374
+ } : R(c.components.table);
375
375
  }
376
376
  return e;
377
377
  }
378
- function P(e, n) {
378
+ function B(e, n) {
379
379
  return {
380
380
  density: n.typography.density,
381
381
  container: {
@@ -424,10 +424,10 @@ function P(e, n) {
424
424
  }
425
425
  };
426
426
  }
427
- function O(e) {
427
+ function R(e) {
428
428
  return JSON.parse(JSON.stringify(e));
429
429
  }
430
- const nr = [
430
+ const dr = [
431
431
  ["background", "Canvas"],
432
432
  ["foreground", "Text"],
433
433
  ["card", "Card"],
@@ -443,48 +443,7 @@ const nr = [
443
443
  ["negative", "Negative"],
444
444
  ["warning", "Warning"],
445
445
  ["info", "Info"]
446
- ], tr = [0, 1, 2, 3, 4, 5], Y = [
447
- {
448
- id: "semaphor",
449
- label: "Semaphor / Inter",
450
- value: 'Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'
451
- },
452
- {
453
- id: "system",
454
- label: "System UI",
455
- value: 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'
456
- },
457
- {
458
- id: "aptos",
459
- label: "Aptos",
460
- value: 'Aptos, "Segoe UI", ui-sans-serif, system-ui, sans-serif'
461
- },
462
- {
463
- id: "ibm-plex-sans",
464
- label: "IBM Plex Sans",
465
- value: '"IBM Plex Sans", Inter, ui-sans-serif, system-ui, sans-serif'
466
- },
467
- {
468
- id: "roboto",
469
- label: "Roboto",
470
- value: "Roboto, Arial, ui-sans-serif, system-ui, sans-serif"
471
- },
472
- {
473
- id: "open-sans",
474
- label: "Open Sans",
475
- value: '"Open Sans", Arial, ui-sans-serif, system-ui, sans-serif'
476
- },
477
- {
478
- id: "source-sans",
479
- label: "Source Sans 3",
480
- value: '"Source Sans 3", Arial, ui-sans-serif, system-ui, sans-serif'
481
- },
482
- {
483
- id: "custom",
484
- label: "Custom stack",
485
- value: ""
486
- }
487
- ], dr = [
446
+ ], ir = [0, 1, 2, 3, 4, 5], X = qe, cr = [
488
447
  "#ffffff",
489
448
  "#f8fafc",
490
449
  "#f4f4f5",
@@ -498,149 +457,149 @@ const nr = [
498
457
  "#dc2626",
499
458
  "#7c3aed"
500
459
  ];
501
- function xr({
460
+ function vr({
502
461
  appearance: e,
503
462
  previewTitle: n,
504
463
  isLoading: t = !1,
505
464
  isSaving: u = !1,
506
- error: s = null,
465
+ error: c = null,
507
466
  className: l,
508
467
  onDraftChange: i,
509
468
  onSave: k,
510
- onClearConfig: x,
511
- onCancel: A
469
+ onClearConfig: y,
470
+ onCancel: S
512
471
  }) {
513
- const [f, b] = m.useState(null), [w, T] = m.useState("light"), [V, I] = m.useState(!1), [we, B] = m.useState(
472
+ const [f, g] = m.useState(null), [T, F] = m.useState("light"), [_, z] = m.useState(!1), [we, O] = m.useState(
514
473
  "idle"
515
- ), [ne, Te] = m.useState(!1), [E, M] = m.useState(""), [J, h] = m.useState(null), te = m.useRef(null), D = m.useRef(i), R = m.useRef(!1);
474
+ ), [ne, Se] = m.useState(!1), [D, U] = m.useState(""), [I, h] = m.useState(null), te = m.useRef(null), j = m.useRef(i), A = m.useRef(!1);
516
475
  m.useEffect(() => {
517
- D.current = i;
476
+ j.current = i;
518
477
  }, [i]), m.useEffect(() => {
519
478
  if (e === void 0) {
520
- R.current = !0, b(null);
479
+ A.current = !0, g(null);
521
480
  return;
522
481
  }
523
- const a = j(e);
524
- R.current = !0, b(a), T("light"), h(null);
482
+ const o = J(e);
483
+ A.current = !0, g(o), F("light"), h(null);
525
484
  }, [e]), m.useEffect(() => {
526
- var a;
485
+ var o;
527
486
  if (f) {
528
- if (R.current) {
529
- R.current = !1;
487
+ if (A.current) {
488
+ A.current = !1;
530
489
  return;
531
490
  }
532
491
  try {
533
- const o = L(f);
534
- (a = D.current) == null || a.call(D, o), h(null);
535
- } catch (o) {
492
+ const a = L(f);
493
+ (o = j.current) == null || o.call(j, a), h(null);
494
+ } catch (a) {
536
495
  h(
537
- o instanceof Error ? o.message : "Appearance is invalid"
496
+ a instanceof Error ? a.message : "Appearance is invalid"
538
497
  );
539
498
  }
540
499
  }
541
500
  }, [f]);
542
- const p = f == null ? void 0 : f.schemes[w], _ = u || V, Fe = m.useMemo(
543
- () => p ? lr(p.tokens.radius.control) : void 0,
501
+ const p = f == null ? void 0 : f.schemes[T], V = u || _, Te = m.useMemo(
502
+ () => p ? ur(p.tokens.radius.control) : void 0,
544
503
  [p]
545
- ), Pe = (a) => {
546
- b((o) => {
547
- if (!o) return o;
548
- const y = cr(o);
549
- return a(y), y;
504
+ ), Fe = (o) => {
505
+ g((a) => {
506
+ if (!a) return a;
507
+ const x = pr(a);
508
+ return o(x), x;
550
509
  });
551
- }, g = (a) => {
552
- Pe((o) => {
553
- a(o.schemes[w]);
510
+ }, b = (o) => {
511
+ Fe((a) => {
512
+ o(a.schemes[T]);
554
513
  });
555
- }, Oe = async () => {
514
+ }, Pe = async () => {
556
515
  if (!f || !k) return;
557
- let a;
516
+ let o;
558
517
  try {
559
- a = L(f);
560
- } catch (o) {
518
+ o = L(f);
519
+ } catch (a) {
561
520
  h(
562
- o instanceof Error ? o.message : "Appearance is invalid"
521
+ a instanceof Error ? a.message : "Appearance is invalid"
563
522
  );
564
523
  return;
565
524
  }
566
- I(!0);
525
+ z(!0);
567
526
  try {
568
- await k(a);
527
+ await k(o);
569
528
  } finally {
570
- I(!1);
529
+ z(!1);
571
530
  }
572
- }, Ae = () => {
573
- const a = j(null);
574
- B("idle"), b(a);
575
- }, Be = async () => {
576
- if (x) {
577
- I(!0), h(null), B("idle");
531
+ }, Be = () => {
532
+ const o = J(null);
533
+ O("idle"), g(o);
534
+ }, Re = async () => {
535
+ if (y) {
536
+ z(!0), h(null), O("idle");
578
537
  try {
579
- await x(), R.current = !0, b(j(null)), T("light");
580
- } catch (a) {
538
+ await y(), A.current = !0, g(J(null)), F("light");
539
+ } catch (o) {
581
540
  h(
582
- a instanceof Error ? a.message : "Unable to clear organization appearance"
541
+ o instanceof Error ? o.message : "Unable to clear organization appearance"
583
542
  );
584
543
  } finally {
585
- I(!1);
544
+ z(!1);
586
545
  }
587
546
  }
588
- }, de = m.useCallback(() => f ? JSON.stringify(L(f), null, 2) : "", [f]), Re = (a) => {
589
- if (Te(a), a)
547
+ }, de = m.useCallback(() => f ? JSON.stringify(L(f), null, 2) : "", [f]), Oe = (o) => {
548
+ if (Se(o), o)
590
549
  try {
591
- M(de()), h(null);
592
- } catch (o) {
550
+ U(de()), h(null);
551
+ } catch (a) {
593
552
  h(
594
- o instanceof Error ? o.message : "Appearance is invalid"
553
+ a instanceof Error ? a.message : "Appearance is invalid"
595
554
  );
596
555
  }
597
- }, ze = async () => {
556
+ }, Ae = async () => {
598
557
  if (f)
599
558
  try {
600
- const a = ne && E ? E : de();
601
- await navigator.clipboard.writeText(a), h(null), B("copied");
602
- } catch (a) {
559
+ const o = ne && D ? D : de();
560
+ await navigator.clipboard.writeText(o), h(null), O("copied");
561
+ } catch (o) {
603
562
  h(
604
- a instanceof Error ? a.message : "Unable to copy appearance JSON"
563
+ o instanceof Error ? o.message : "Unable to copy brand spec"
605
564
  );
606
565
  }
607
- }, ie = (a) => {
608
- const o = JSON.parse(a), y = j(o), F = L(y);
609
- B("idle"), T("light"), b(y), M(JSON.stringify(F, null, 2));
610
- }, Ie = () => {
566
+ }, ie = (o) => {
567
+ const a = JSON.parse(o), x = J(a), P = L(x);
568
+ O("idle"), F("light"), g(x), U(JSON.stringify(P, null, 2));
569
+ }, Ee = () => {
611
570
  try {
612
- ie(E);
613
- } catch (a) {
571
+ ie(D);
572
+ } catch (o) {
614
573
  h(
615
- a instanceof Error ? a.message : "JSON must be a valid AppearanceSpec"
574
+ o instanceof Error ? o.message : "Brand spec must be valid JSON"
616
575
  );
617
576
  }
618
- }, Ee = async (a) => {
619
- var y;
620
- const o = (y = a.target.files) == null ? void 0 : y[0];
621
- if (a.target.value = "", !!o)
577
+ }, ze = async (o) => {
578
+ var x;
579
+ const a = (x = o.target.files) == null ? void 0 : x[0];
580
+ if (o.target.value = "", !!a)
622
581
  try {
623
- ie(await ur(o));
624
- } catch (F) {
582
+ ie(await gr(a));
583
+ } catch (P) {
625
584
  h(
626
- F instanceof Error ? F.message : "Uploaded file must be valid AppearanceSpec JSON"
585
+ P instanceof Error ? P.message : "Uploaded file must be a valid brand spec"
627
586
  );
628
587
  }
629
588
  };
630
589
  return /* @__PURE__ */ d(
631
590
  "div",
632
591
  {
633
- className: Q(
592
+ className: K(
634
593
  "flex min-h-0 flex-1 flex-col bg-background text-foreground",
635
594
  l
636
595
  ),
637
- style: Fe,
596
+ style: Te,
638
597
  children: [
639
- /* @__PURE__ */ d("header", { className: "flex h-12 shrink-0 items-center gap-3 border-b border-border/60 px-4", children: [
640
- /* @__PURE__ */ r("div", { className: "flex h-6 w-6 items-center justify-center rounded-control border border-border/70", children: /* @__PURE__ */ r(H, { className: "h-3.5 w-3.5" }) }),
598
+ /* @__PURE__ */ d("header", { className: "flex h-11 shrink-0 items-start gap-3 border-b border-border/60 px-4 pt-2", children: [
599
+ /* @__PURE__ */ r("div", { className: "mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-control border border-border/70", children: /* @__PURE__ */ r(W, { className: "h-3.5 w-3.5" }) }),
641
600
  /* @__PURE__ */ d("div", { className: "min-w-0 flex-1", children: [
642
- /* @__PURE__ */ r("h2", { className: "truncate text-[13px] font-semibold", children: "Brand Studio" }),
643
- /* @__PURE__ */ d("p", { className: "truncate text-[11px] text-muted-foreground", children: [
601
+ /* @__PURE__ */ r("h2", { className: "truncate text-[13px] font-semibold leading-tight", children: "Brand Studio" }),
602
+ /* @__PURE__ */ d("p", { className: "truncate text-[11px] leading-tight text-muted-foreground", children: [
644
603
  "Previewing ",
645
604
  n || "current dashboard"
646
605
  ] })
@@ -649,14 +608,14 @@ function xr({
649
608
  ge,
650
609
  {
651
610
  open: ne,
652
- onOpenChange: Re,
611
+ onOpenChange: Oe,
653
612
  children: [
654
- /* @__PURE__ */ r(fe, { asChild: !0, children: /* @__PURE__ */ d(C, { type: "button", size: "xs", variant: "ghost", disabled: !f, children: [
655
- /* @__PURE__ */ r(ue, { className: "h-3.5 w-3.5" }),
656
- "JSON"
613
+ /* @__PURE__ */ r(be, { asChild: !0, children: /* @__PURE__ */ d(C, { type: "button", size: "xs", variant: "ghost", disabled: !f, children: [
614
+ /* @__PURE__ */ r(Ke, { className: "h-3.5 w-3.5" }),
615
+ "Brand Spec"
657
616
  ] }) }),
658
617
  /* @__PURE__ */ d(
659
- me,
618
+ fe,
660
619
  {
661
620
  align: "end",
662
621
  sideOffset: 6,
@@ -664,8 +623,8 @@ function xr({
664
623
  children: [
665
624
  /* @__PURE__ */ d("div", { className: "mb-2 flex items-center justify-between gap-2", children: [
666
625
  /* @__PURE__ */ d("div", { className: "min-w-0", children: [
667
- /* @__PURE__ */ r("div", { className: "text-[12px] font-medium", children: "AppearanceSpec JSON" }),
668
- /* @__PURE__ */ r("div", { className: "text-[11px] text-muted-foreground", children: "Edit, apply, copy, or upload the active spec." })
626
+ /* @__PURE__ */ r("div", { className: "text-[12px] font-medium", children: "Brand spec" }),
627
+ /* @__PURE__ */ r("div", { className: "text-[11px] text-muted-foreground", children: "Edit, apply, copy, or upload your brand spec." })
669
628
  ] }),
670
629
  /* @__PURE__ */ d("div", { className: "flex shrink-0 items-center gap-1", children: [
671
630
  /* @__PURE__ */ d(
@@ -674,9 +633,9 @@ function xr({
674
633
  type: "button",
675
634
  size: "xs",
676
635
  variant: "ghost",
677
- onClick: ze,
636
+ onClick: Ae,
678
637
  children: [
679
- /* @__PURE__ */ r(ue, { className: "h-3.5 w-3.5" }),
638
+ /* @__PURE__ */ r(rr, { className: "h-3.5 w-3.5" }),
680
639
  we === "copied" ? "Copied" : "Copy"
681
640
  ]
682
641
  }
@@ -688,25 +647,25 @@ function xr({
688
647
  size: "xs",
689
648
  variant: "ghost",
690
649
  onClick: () => {
691
- var a;
692
- return (a = te.current) == null ? void 0 : a.click();
650
+ var o;
651
+ return (o = te.current) == null ? void 0 : o.click();
693
652
  },
694
653
  children: [
695
- /* @__PURE__ */ r(Je, { className: "h-3.5 w-3.5" }),
654
+ /* @__PURE__ */ r(De, { className: "h-3.5 w-3.5" }),
696
655
  "Upload"
697
656
  ]
698
657
  }
699
658
  ),
700
- /* @__PURE__ */ r(C, { type: "button", size: "xs", onClick: Ie, children: "Apply" })
659
+ /* @__PURE__ */ r(C, { type: "button", size: "xs", onClick: Ee, children: "Apply" })
701
660
  ] })
702
661
  ] }),
703
662
  /* @__PURE__ */ r("div", { className: "h-[320px] overflow-hidden rounded-control border border-input", children: /* @__PURE__ */ r(
704
- De,
663
+ Ie,
705
664
  {
706
- ariaLabel: "AppearanceSpec JSON",
707
- value: E,
708
- onValueChange: (a) => {
709
- M(a), B("idle");
665
+ ariaLabel: "Brand spec",
666
+ value: D,
667
+ onValueChange: (o) => {
668
+ U(o), O("idle");
710
669
  },
711
670
  language: "json",
712
671
  embedded: !0,
@@ -724,11 +683,11 @@ function xr({
724
683
  "input",
725
684
  {
726
685
  ref: te,
727
- "aria-label": "Upload AppearanceSpec JSON",
686
+ "aria-label": "Upload brand spec",
728
687
  type: "file",
729
688
  accept: "application/json,.json",
730
689
  className: "sr-only",
731
- onChange: Ee
690
+ onChange: ze
732
691
  }
733
692
  ),
734
693
  /* @__PURE__ */ d(
@@ -737,24 +696,24 @@ function xr({
737
696
  type: "button",
738
697
  size: "xs",
739
698
  variant: "ghost",
740
- onClick: Ae,
699
+ onClick: Be,
741
700
  disabled: !f,
742
701
  children: [
743
- /* @__PURE__ */ r(Ne, { className: "h-3.5 w-3.5" }),
702
+ /* @__PURE__ */ r(Ce, { className: "h-3.5 w-3.5" }),
744
703
  "Reset"
745
704
  ]
746
705
  }
747
706
  ),
748
- x && /* @__PURE__ */ d(
707
+ y && /* @__PURE__ */ d(
749
708
  C,
750
709
  {
751
710
  type: "button",
752
711
  size: "xs",
753
712
  variant: "ghost",
754
- onClick: Be,
755
- disabled: _,
713
+ onClick: Re,
714
+ disabled: V,
756
715
  children: [
757
- /* @__PURE__ */ r(Qe, { className: "h-3.5 w-3.5" }),
716
+ /* @__PURE__ */ r(er, { className: "h-3.5 w-3.5" }),
758
717
  "No config"
759
718
  ]
760
719
  }
@@ -764,70 +723,70 @@ function xr({
764
723
  {
765
724
  type: "button",
766
725
  size: "xs",
767
- onClick: Oe,
768
- disabled: !f || _ || !!J || !k,
726
+ onClick: Pe,
727
+ disabled: !f || V || !!I || !k,
769
728
  children: [
770
- _ ? /* @__PURE__ */ r(le, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ r(Ke, { className: "h-3.5 w-3.5" }),
729
+ V ? /* @__PURE__ */ r(le, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ r(Qe, { className: "h-3.5 w-3.5" }),
771
730
  "Save"
772
731
  ]
773
732
  }
774
733
  ),
775
- /* @__PURE__ */ r(
734
+ S && /* @__PURE__ */ r(
776
735
  "button",
777
736
  {
778
737
  type: "button",
779
738
  "aria-label": "Close Brand Studio",
780
739
  className: "flex h-7 w-7 items-center justify-center rounded-control text-muted-foreground hover:bg-muted hover:text-foreground",
781
- onClick: A,
740
+ onClick: S,
782
741
  children: /* @__PURE__ */ r(je, { className: "h-3.5 w-3.5" })
783
742
  }
784
743
  )
785
744
  ] }),
786
745
  /* @__PURE__ */ d("div", { className: "flex shrink-0 items-center justify-between border-b border-border/60 px-4 py-2", children: [
787
- /* @__PURE__ */ r("div", { className: "flex items-center gap-2 text-[12px] text-muted-foreground", children: J ? /* @__PURE__ */ d(se, { children: [
788
- /* @__PURE__ */ r(ce, { className: "h-3.5 w-3.5 text-destructive" }),
746
+ /* @__PURE__ */ r("div", { className: "flex items-center gap-2 text-[12px] text-muted-foreground", children: I ? /* @__PURE__ */ d(ce, { children: [
747
+ /* @__PURE__ */ r(se, { className: "h-3.5 w-3.5 text-destructive" }),
789
748
  "Preview keeps the last valid draft"
790
- ] }) : /* @__PURE__ */ d(se, { children: [
791
- /* @__PURE__ */ r(Le, { className: "h-3.5 w-3.5 text-emerald-500" }),
749
+ ] }) : /* @__PURE__ */ d(ce, { children: [
750
+ /* @__PURE__ */ r(Je, { className: "h-3.5 w-3.5 text-emerald-500" }),
792
751
  "Draft is applied to the live dashboard preview"
793
752
  ] }) }),
794
- /* @__PURE__ */ r("div", { className: "inline-flex h-7 items-center overflow-hidden rounded-control border border-border/70", children: ["light", "dark"].map((a) => /* @__PURE__ */ r(
753
+ /* @__PURE__ */ r("div", { className: "inline-flex h-7 items-center overflow-hidden rounded-control border border-border/70", children: ["light", "dark"].map((o) => /* @__PURE__ */ r(
795
754
  "button",
796
755
  {
797
756
  type: "button",
798
- className: Q(
757
+ className: K(
799
758
  "h-full px-2.5 text-[12px] capitalize transition-colors",
800
- w === a ? "bg-muted text-foreground" : "text-muted-foreground hover:text-foreground"
759
+ T === o ? "bg-muted text-foreground" : "text-muted-foreground hover:text-foreground"
801
760
  ),
802
- onClick: () => T(a),
803
- children: a
761
+ onClick: () => F(o),
762
+ children: o
804
763
  },
805
- a
764
+ o
806
765
  )) })
807
766
  ] }),
808
- J && /* @__PURE__ */ r("div", { className: "border-b border-destructive/20 bg-destructive/5 px-4 py-2 text-[12px] text-destructive", children: J }),
809
- t ? /* @__PURE__ */ r("div", { className: "flex flex-1 items-center justify-center", children: /* @__PURE__ */ r(le, { className: "h-4 w-4 animate-spin text-muted-foreground" }) }) : s ? /* @__PURE__ */ r("div", { className: "p-4 text-[13px] text-muted-foreground", children: s }) : f && p ? /* @__PURE__ */ d(Ue, { defaultValue: "style", className: "flex min-h-0 flex-1 flex-col", children: [
767
+ I && /* @__PURE__ */ r("div", { className: "border-b border-destructive/20 bg-destructive/5 px-4 py-2 text-[12px] text-destructive", children: I }),
768
+ t ? /* @__PURE__ */ r("div", { className: "flex flex-1 items-center justify-center", children: /* @__PURE__ */ r(le, { className: "h-4 w-4 animate-spin text-muted-foreground" }) }) : c ? /* @__PURE__ */ r("div", { className: "p-4 text-[13px] text-muted-foreground", children: c }) : f && p ? /* @__PURE__ */ d(Le, { defaultValue: "style", className: "flex min-h-0 flex-1 flex-col", children: [
810
769
  /* @__PURE__ */ r("div", { className: "shrink-0 px-4 pt-3", children: /* @__PURE__ */ d($e, { variant: "underline", className: "w-full gap-5", children: [
811
770
  /* @__PURE__ */ r(G, { value: "style", children: "Style" }),
812
771
  /* @__PURE__ */ r(G, { value: "surfaces", children: "Surfaces" }),
813
772
  /* @__PURE__ */ r(G, { value: "data", children: "Data" })
814
773
  ] }) }),
815
- /* @__PURE__ */ d(Ve, { className: "min-h-0 flex-1", children: [
816
- /* @__PURE__ */ d(W, { value: "style", className: "m-0 p-4", children: [
774
+ /* @__PURE__ */ d(_e, { className: "min-h-0 flex-1", children: [
775
+ /* @__PURE__ */ d(M, { value: "style", className: "m-0 p-4", children: [
817
776
  /* @__PURE__ */ r(
818
777
  N,
819
778
  {
820
- icon: H,
779
+ icon: W,
821
780
  title: "Presets",
822
781
  description: "Start from a full light and dark appearance.",
823
- children: /* @__PURE__ */ r("div", { className: "grid grid-cols-1 gap-2", children: Se.map((a) => /* @__PURE__ */ d(
782
+ children: /* @__PURE__ */ r("div", { className: "grid grid-cols-1 gap-2", children: Ne.map((o) => /* @__PURE__ */ d(
824
783
  "button",
825
784
  {
826
785
  type: "button",
827
786
  className: "flex items-center gap-3 rounded-control border border-border/70 px-3 py-2 text-left hover:bg-muted/60",
828
787
  onClick: () => {
829
- const o = ar(f, a.id);
830
- b(o);
788
+ const a = nr(f, o.id);
789
+ g(a);
831
790
  },
832
791
  children: [
833
792
  /* @__PURE__ */ d("div", { className: "flex h-7 w-10 overflow-hidden rounded-control border border-border/70", children: [
@@ -835,77 +794,77 @@ function xr({
835
794
  "span",
836
795
  {
837
796
  className: "h-full flex-1",
838
- style: { backgroundColor: a.primary }
797
+ style: { backgroundColor: o.primary }
839
798
  }
840
799
  ),
841
800
  /* @__PURE__ */ r(
842
801
  "span",
843
802
  {
844
803
  className: "h-full flex-1",
845
- style: { backgroundColor: a.accent }
804
+ style: { backgroundColor: o.accent }
846
805
  }
847
806
  )
848
807
  ] }),
849
808
  /* @__PURE__ */ d("span", { className: "min-w-0 flex-1", children: [
850
- /* @__PURE__ */ r("span", { className: "block text-[13px] font-medium", children: a.name }),
851
- /* @__PURE__ */ r("span", { className: "block truncate text-[12px] text-muted-foreground", children: a.description })
809
+ /* @__PURE__ */ r("span", { className: "block text-[13px] font-medium", children: o.name }),
810
+ /* @__PURE__ */ r("span", { className: "block truncate text-[12px] text-muted-foreground", children: o.description })
852
811
  ] })
853
812
  ]
854
813
  },
855
- a.id
814
+ o.id
856
815
  )) })
857
816
  }
858
817
  ),
859
818
  /* @__PURE__ */ r(
860
819
  N,
861
820
  {
862
- icon: H,
821
+ icon: W,
863
822
  title: "Color",
864
- description: `Editing the ${w} scheme.`,
865
- children: /* @__PURE__ */ r("div", { className: "grid grid-cols-2 gap-2", children: nr.map(([a, o]) => /* @__PURE__ */ r(
823
+ description: `Editing the ${T} scheme.`,
824
+ children: /* @__PURE__ */ r("div", { className: "grid grid-cols-2 gap-2", children: dr.map(([o, a]) => /* @__PURE__ */ r(
866
825
  v,
867
826
  {
868
- label: o,
869
- value: p.tokens.color[a],
870
- onChange: (y) => g((F) => {
871
- be(F, a, y);
827
+ label: a,
828
+ value: p.tokens.color[o],
829
+ onChange: (x) => b((P) => {
830
+ pe(P, o, x);
872
831
  })
873
832
  },
874
- a
833
+ o
875
834
  )) })
876
835
  }
877
836
  ),
878
837
  /* @__PURE__ */ d(
879
838
  N,
880
839
  {
881
- icon: Me,
840
+ icon: Ue,
882
841
  title: "Typography",
883
842
  description: "Fonts and density used by dashboard and workflow chrome.",
884
843
  children: [
885
844
  /* @__PURE__ */ r(
886
- ir,
845
+ lr,
887
846
  {
888
847
  value: p.tokens.typography.fontFamily,
889
- onChange: (a) => g((o) => {
890
- o.tokens.typography.fontFamily = a, o.tokens.typography.headingFontFamily = a;
848
+ onChange: (o) => b((a) => {
849
+ a.tokens.typography.fontFamily = o, a.tokens.typography.headingFontFamily = o;
891
850
  })
892
851
  }
893
852
  ),
894
853
  /* @__PURE__ */ d("div", { className: "grid grid-cols-2 gap-2", children: [
895
854
  /* @__PURE__ */ r(
896
- S,
855
+ w,
897
856
  {
898
857
  label: "Base size",
899
858
  value: p.tokens.typography.baseFontSize,
900
859
  min: 11,
901
860
  max: 18,
902
- onChange: (a) => g((o) => {
903
- o.tokens.typography.baseFontSize = a;
861
+ onChange: (o) => b((a) => {
862
+ a.tokens.typography.baseFontSize = o;
904
863
  })
905
864
  }
906
865
  ),
907
866
  /* @__PURE__ */ r(
908
- Z,
867
+ q,
909
868
  {
910
869
  label: "Density",
911
870
  value: p.tokens.typography.density,
@@ -914,8 +873,8 @@ function xr({
914
873
  ["comfortable", "Comfortable"],
915
874
  ["spacious", "Spacious"]
916
875
  ],
917
- onChange: (a) => g((o) => {
918
- o.tokens.typography.density = a, o.components.table.density = o.tokens.typography.density, c(o, "aggregateTable"), c(o, "pivotTable");
876
+ onChange: (o) => b((a) => {
877
+ a.tokens.typography.density = o, a.components.table.density = a.tokens.typography.density, s(a, "aggregateTable"), s(a, "pivotTable");
919
878
  })
920
879
  }
921
880
  )
@@ -924,92 +883,92 @@ function xr({
924
883
  }
925
884
  )
926
885
  ] }),
927
- /* @__PURE__ */ d(W, { value: "surfaces", className: "m-0 p-4", children: [
886
+ /* @__PURE__ */ d(M, { value: "surfaces", className: "m-0 p-4", children: [
928
887
  /* @__PURE__ */ d(
929
888
  N,
930
889
  {
931
- icon: er,
890
+ icon: or,
932
891
  title: "Layout",
933
892
  description: "Canvas, grid, and card rhythm for embedded dashboards.",
934
893
  children: [
935
894
  /* @__PURE__ */ d("div", { className: "grid grid-cols-3 gap-2", children: [
936
895
  /* @__PURE__ */ r(
937
- S,
896
+ w,
938
897
  {
939
898
  label: "Canvas pad",
940
899
  tooltip: "Outer padding around the dashboard canvas before cards begin.",
941
900
  value: p.tokens.spacing.dashboardPadding,
942
901
  min: 0,
943
902
  max: 48,
944
- onChange: (a) => g((o) => {
945
- o.tokens.spacing.dashboardPadding = a, o.components.dashboard.padding = a;
903
+ onChange: (o) => b((a) => {
904
+ a.tokens.spacing.dashboardPadding = o, a.components.dashboard.padding = o;
946
905
  })
947
906
  }
948
907
  ),
949
908
  /* @__PURE__ */ r(
950
- S,
909
+ w,
951
910
  {
952
911
  label: "Grid gap",
953
912
  tooltip: "Spacing between dashboard cards in the grid.",
954
913
  value: p.tokens.spacing.gridGap,
955
914
  min: 0,
956
915
  max: 32,
957
- onChange: (a) => g((o) => {
958
- o.tokens.spacing.gridGap = a;
916
+ onChange: (o) => b((a) => {
917
+ a.tokens.spacing.gridGap = o;
959
918
  })
960
919
  }
961
920
  ),
962
921
  /* @__PURE__ */ r(
963
- S,
922
+ w,
964
923
  {
965
924
  label: "Card pad",
966
925
  tooltip: "Inner padding inside card/widget frames around titles, controls, and visual content.",
967
926
  value: p.tokens.spacing.cardPadding,
968
927
  min: 0,
969
928
  max: 32,
970
- onChange: (a) => g((o) => {
971
- o.tokens.spacing.cardPadding = a, o.components.card.padding = a;
929
+ onChange: (o) => b((a) => {
930
+ a.tokens.spacing.cardPadding = o, a.components.card.padding = o;
972
931
  })
973
932
  }
974
933
  )
975
934
  ] }),
976
935
  /* @__PURE__ */ d("div", { className: "grid grid-cols-3 gap-2", children: [
977
936
  /* @__PURE__ */ r(
978
- S,
937
+ w,
979
938
  {
980
939
  label: "Control radius",
981
940
  tooltip: "Corner radius for buttons, inputs, selects, checkboxes, segmented controls, and similar interactive controls.",
982
941
  value: p.tokens.radius.control,
983
942
  min: 0,
984
943
  max: 12,
985
- onChange: (a) => g((o) => {
986
- X(o, "control", a);
944
+ onChange: (o) => b((a) => {
945
+ H(a, "control", o);
987
946
  })
988
947
  }
989
948
  ),
990
949
  /* @__PURE__ */ r(
991
- S,
950
+ w,
992
951
  {
993
952
  label: "Card/widget radius",
994
953
  tooltip: "Corner radius for dashboard card frames and widget containers.",
995
954
  value: p.tokens.radius.card,
996
955
  min: 0,
997
956
  max: 12,
998
- onChange: (a) => g((o) => {
999
- X(o, "card", a);
957
+ onChange: (o) => b((a) => {
958
+ H(a, "card", o);
1000
959
  })
1001
960
  }
1002
961
  ),
1003
962
  /* @__PURE__ */ r(
1004
- S,
963
+ w,
1005
964
  {
1006
965
  label: "Table radius",
1007
966
  tooltip: "Corner radius for table containers, table chrome, and table pagination surfaces.",
1008
967
  value: p.tokens.radius.table,
1009
968
  min: 0,
1010
969
  max: 12,
1011
- onChange: (a) => g((o) => {
1012
- X(o, "table", a);
970
+ onChange: (o) => b((a) => {
971
+ H(a, "table", o);
1013
972
  })
1014
973
  }
1015
974
  )
@@ -1020,7 +979,7 @@ function xr({
1020
979
  /* @__PURE__ */ r(
1021
980
  N,
1022
981
  {
1023
- icon: ce,
982
+ icon: se,
1024
983
  title: "Filters and Controls",
1025
984
  description: "Dashboard filter/control toolbar, chip states, menus, and settings panels.",
1026
985
  children: /* @__PURE__ */ d("div", { className: "grid grid-cols-2 gap-2", children: [
@@ -1030,8 +989,8 @@ function xr({
1030
989
  label: "Toolbar background",
1031
990
  tooltip: "Background color for the dashboard filter/control toolbar strip. This is separate from chip state colors.",
1032
991
  value: p.components.interactive.toolbarBackground || p.tokens.color.background,
1033
- onChange: (a) => g((o) => {
1034
- o.components.interactive.toolbarBackground = a;
992
+ onChange: (o) => b((a) => {
993
+ a.components.interactive.toolbarBackground = o;
1035
994
  })
1036
995
  }
1037
996
  ),
@@ -1041,8 +1000,8 @@ function xr({
1041
1000
  label: "Default state",
1042
1001
  tooltip: "Unselected filter/control chips plus the base surface for their menus, dialogs, and pagination fallback.",
1043
1002
  value: p.components.interactive.background || p.tokens.color.card,
1044
- onChange: (a) => g((o) => {
1045
- o.components.interactive.background = a, o.components.pagination.background = a;
1003
+ onChange: (o) => b((a) => {
1004
+ a.components.interactive.background = o, a.components.pagination.background = o;
1046
1005
  })
1047
1006
  }
1048
1007
  ),
@@ -1052,8 +1011,8 @@ function xr({
1052
1011
  label: "Border",
1053
1012
  tooltip: "Border color for filter/control chips, runtime inputs, settings panels, and related popover chrome.",
1054
1013
  value: p.components.interactive.borderColor || p.tokens.color.border,
1055
- onChange: (a) => g((o) => {
1056
- o.components.interactive.borderColor = a, o.components.pagination.borderColor = a;
1014
+ onChange: (o) => b((a) => {
1015
+ a.components.interactive.borderColor = o, a.components.pagination.borderColor = o;
1057
1016
  })
1058
1017
  }
1059
1018
  ),
@@ -1063,8 +1022,8 @@ function xr({
1063
1022
  label: "Selected state",
1064
1023
  tooltip: "Selected filter/control chips and hover feedback. This keeps a lighter default state and a stronger selected state.",
1065
1024
  value: p.tokens.color.accent,
1066
- onChange: (a) => g((o) => {
1067
- be(o, "accent", a);
1025
+ onChange: (o) => b((a) => {
1026
+ pe(a, "accent", o);
1068
1027
  })
1069
1028
  }
1070
1029
  )
@@ -1072,24 +1031,24 @@ function xr({
1072
1031
  }
1073
1032
  )
1074
1033
  ] }),
1075
- /* @__PURE__ */ d(W, { value: "data", className: "m-0 p-4", children: [
1034
+ /* @__PURE__ */ d(M, { value: "data", className: "m-0 p-4", children: [
1076
1035
  /* @__PURE__ */ d(
1077
1036
  N,
1078
1037
  {
1079
- icon: _e,
1038
+ icon: Ve,
1080
1039
  title: "Charts",
1081
1040
  description: "Palette and semantic chart text/grid colors.",
1082
1041
  children: [
1083
- /* @__PURE__ */ r("div", { className: "grid grid-cols-3 gap-2", children: tr.map((a) => /* @__PURE__ */ r(
1042
+ /* @__PURE__ */ r("div", { className: "grid grid-cols-3 gap-2", children: ir.map((o) => /* @__PURE__ */ r(
1084
1043
  v,
1085
1044
  {
1086
- label: `Series ${a + 1}`,
1087
- value: p.components.chart.palette[a] || "#000000",
1088
- onChange: (o) => g((y) => {
1089
- y.components.chart.palette[a] = o;
1045
+ label: `Series ${o + 1}`,
1046
+ value: p.components.chart.palette[o] || "#000000",
1047
+ onChange: (a) => b((x) => {
1048
+ x.components.chart.palette[o] = a;
1090
1049
  })
1091
1050
  },
1092
- a
1051
+ o
1093
1052
  )) }),
1094
1053
  /* @__PURE__ */ d("div", { className: "grid grid-cols-2 gap-2", children: [
1095
1054
  /* @__PURE__ */ r(
@@ -1097,8 +1056,8 @@ function xr({
1097
1056
  {
1098
1057
  label: "Grid",
1099
1058
  value: p.components.chart.gridColor,
1100
- onChange: (a) => g((o) => {
1101
- o.components.chart.gridColor = a;
1059
+ onChange: (o) => b((a) => {
1060
+ a.components.chart.gridColor = o;
1102
1061
  })
1103
1062
  }
1104
1063
  ),
@@ -1107,8 +1066,8 @@ function xr({
1107
1066
  {
1108
1067
  label: "Axis",
1109
1068
  value: p.components.chart.axisColor,
1110
- onChange: (a) => g((o) => {
1111
- o.components.chart.axisColor = a;
1069
+ onChange: (o) => b((a) => {
1070
+ a.components.chart.axisColor = o;
1112
1071
  })
1113
1072
  }
1114
1073
  )
@@ -1125,7 +1084,7 @@ function xr({
1125
1084
  children: [
1126
1085
  /* @__PURE__ */ d("div", { className: "grid grid-cols-2 gap-2", children: [
1127
1086
  /* @__PURE__ */ r(
1128
- Z,
1087
+ q,
1129
1088
  {
1130
1089
  label: "Density",
1131
1090
  value: p.components.table.density,
@@ -1134,13 +1093,13 @@ function xr({
1134
1093
  ["comfortable", "Comfortable"],
1135
1094
  ["spacious", "Spacious"]
1136
1095
  ],
1137
- onChange: (a) => g((o) => {
1138
- o.components.table.density = a, c(o, "aggregateTable"), c(o, "pivotTable");
1096
+ onChange: (o) => b((a) => {
1097
+ a.components.table.density = o, s(a, "aggregateTable"), s(a, "pivotTable");
1139
1098
  })
1140
1099
  }
1141
1100
  ),
1142
1101
  /* @__PURE__ */ r(
1143
- Z,
1102
+ q,
1144
1103
  {
1145
1104
  label: "Cell wrap",
1146
1105
  value: p.components.table.cell.wrap,
@@ -1148,8 +1107,8 @@ function xr({
1148
1107
  ["nowrap", "No wrap"],
1149
1108
  ["wrap", "Wrap"]
1150
1109
  ],
1151
- onChange: (a) => g((o) => {
1152
- o.components.table.cell.wrap = a, c(o, "aggregateTable"), c(o, "pivotTable");
1110
+ onChange: (o) => b((a) => {
1111
+ a.components.table.cell.wrap = o, s(a, "aggregateTable"), s(a, "pivotTable");
1153
1112
  })
1154
1113
  }
1155
1114
  )
@@ -1160,8 +1119,8 @@ function xr({
1160
1119
  {
1161
1120
  label: "Header",
1162
1121
  value: p.components.table.header.background,
1163
- onChange: (a) => g((o) => {
1164
- o.components.table.header.background = a, c(o, "aggregateTable"), c(o, "pivotTable");
1122
+ onChange: (o) => b((a) => {
1123
+ a.components.table.header.background = o, s(a, "aggregateTable"), s(a, "pivotTable");
1165
1124
  })
1166
1125
  }
1167
1126
  ),
@@ -1170,39 +1129,39 @@ function xr({
1170
1129
  {
1171
1130
  label: "Divider",
1172
1131
  value: p.components.table.row.dividerColor,
1173
- onChange: (a) => g((o) => {
1174
- o.components.table.row.dividerColor = a, o.components.table.header.dividerColor = a, c(o, "aggregateTable"), c(o, "pivotTable");
1132
+ onChange: (o) => b((a) => {
1133
+ a.components.table.row.dividerColor = o, a.components.table.header.dividerColor = o, s(a, "aggregateTable"), s(a, "pivotTable");
1175
1134
  })
1176
1135
  }
1177
1136
  )
1178
1137
  ] }),
1179
1138
  /* @__PURE__ */ r(
1180
- K,
1139
+ Z,
1181
1140
  {
1182
1141
  label: "Zebra rows",
1183
1142
  checked: p.components.table.row.zebra,
1184
- onCheckedChange: (a) => g((o) => {
1185
- o.components.table.row.zebra = a, c(o, "aggregateTable"), c(o, "pivotTable");
1143
+ onCheckedChange: (o) => b((a) => {
1144
+ a.components.table.row.zebra = o, s(a, "aggregateTable"), s(a, "pivotTable");
1186
1145
  })
1187
1146
  }
1188
1147
  ),
1189
1148
  /* @__PURE__ */ r(
1190
- K,
1149
+ Z,
1191
1150
  {
1192
1151
  label: "Sticky headers",
1193
1152
  checked: p.components.table.header.sticky,
1194
- onCheckedChange: (a) => g((o) => {
1195
- o.components.table.header.sticky = a, c(o, "aggregateTable"), c(o, "pivotTable");
1153
+ onCheckedChange: (o) => b((a) => {
1154
+ a.components.table.header.sticky = o, s(a, "aggregateTable"), s(a, "pivotTable");
1196
1155
  })
1197
1156
  }
1198
1157
  ),
1199
1158
  /* @__PURE__ */ r(
1200
- K,
1159
+ Z,
1201
1160
  {
1202
1161
  label: "Uppercase headers",
1203
1162
  checked: p.components.table.header.uppercase,
1204
- onCheckedChange: (a) => g((o) => {
1205
- o.components.table.header.uppercase = a, c(o, "aggregateTable"), c(o, "pivotTable");
1163
+ onCheckedChange: (o) => b((a) => {
1164
+ a.components.table.header.uppercase = o, s(a, "aggregateTable"), s(a, "pivotTable");
1206
1165
  })
1207
1166
  }
1208
1167
  )
@@ -1231,31 +1190,31 @@ function N({
1231
1190
  ] })
1232
1191
  ] }),
1233
1192
  /* @__PURE__ */ r("div", { className: "space-y-2", children: u }),
1234
- /* @__PURE__ */ r(We, { className: "mt-5 bg-border/60" })
1193
+ /* @__PURE__ */ r(Me, { className: "mt-5 bg-border/60" })
1235
1194
  ] });
1236
1195
  }
1237
- function ir({
1196
+ function lr({
1238
1197
  value: e,
1239
1198
  onChange: n
1240
1199
  }) {
1241
1200
  var u;
1242
- const t = ((u = Y.find((s) => s.value === e)) == null ? void 0 : u.id) ?? "custom";
1201
+ const t = (u = X.find((c) => c.value === e)) == null ? void 0 : u.id;
1243
1202
  return /* @__PURE__ */ d("div", { children: [
1244
- /* @__PURE__ */ r(z, { className: "mb-1 block text-[11px] font-normal text-muted-foreground", children: "Font family" }),
1203
+ /* @__PURE__ */ r(E, { className: "mb-1 block text-[11px] font-normal text-muted-foreground", children: "Font family" }),
1245
1204
  /* @__PURE__ */ d("div", { className: "grid grid-cols-[minmax(0,1fr)_150px] gap-2", children: [
1246
1205
  /* @__PURE__ */ d(
1247
- ye,
1206
+ he,
1248
1207
  {
1249
1208
  value: t,
1250
- onValueChange: (s) => {
1251
- const l = Y.find(
1252
- (i) => i.id === s
1209
+ onValueChange: (c) => {
1210
+ const l = X.find(
1211
+ (i) => i.id === c
1253
1212
  );
1254
- !l || l.id === "custom" || n(l.value);
1213
+ l && n(l.value);
1255
1214
  },
1256
1215
  children: [
1257
- /* @__PURE__ */ r(xe, { size: "xs", "aria-label": "Font family preset", children: /* @__PURE__ */ r(ke, {}) }),
1258
- /* @__PURE__ */ r(ve, { children: Y.map((s) => /* @__PURE__ */ r(Ce, { value: s.id, children: s.label }, s.id)) })
1216
+ /* @__PURE__ */ r(xe, { size: "xs", "aria-label": "Font family preset", children: /* @__PURE__ */ r(ye, { placeholder: "Select font" }) }),
1217
+ /* @__PURE__ */ r(ke, { children: X.map((c) => /* @__PURE__ */ r(ve, { value: c.id, children: c.label }, c.id)) })
1259
1218
  ]
1260
1219
  }
1261
1220
  ),
@@ -1267,17 +1226,7 @@ function ir({
1267
1226
  children: "Aa 123"
1268
1227
  }
1269
1228
  )
1270
- ] }),
1271
- /* @__PURE__ */ r(
1272
- U,
1273
- {
1274
- size: "xs",
1275
- "aria-label": "Custom font family",
1276
- value: e,
1277
- onChange: (s) => n(s.target.value),
1278
- className: "mt-2 font-mono"
1279
- }
1280
- )
1229
+ ] })
1281
1230
  ] });
1282
1231
  }
1283
1232
  function v({
@@ -1286,28 +1235,28 @@ function v({
1286
1235
  value: t,
1287
1236
  onChange: u
1288
1237
  }) {
1289
- const [s, l] = m.useState(!1), [i, k] = m.useState(t), x = sr(t), A = t !== i, f = (b) => {
1290
- l(b), b && k(t);
1238
+ const [c, l] = m.useState(!1), [i, k] = m.useState(t), y = sr(t), S = t !== i, f = (g) => {
1239
+ l(g), g && k(t);
1291
1240
  };
1292
1241
  return /* @__PURE__ */ d("div", { className: "block", children: [
1293
1242
  /* @__PURE__ */ d("div", { className: "mb-1 flex items-center gap-1", children: [
1294
- /* @__PURE__ */ r(z, { className: "text-[11px] font-normal text-muted-foreground", children: e }),
1295
- n ? /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ d(re, { children: [
1296
- /* @__PURE__ */ r(ae, { asChild: !0, children: /* @__PURE__ */ r(
1243
+ /* @__PURE__ */ r(E, { className: "text-[11px] font-normal text-muted-foreground", children: e }),
1244
+ n ? /* @__PURE__ */ r(Q, { children: /* @__PURE__ */ d(ee, { children: [
1245
+ /* @__PURE__ */ r(re, { asChild: !0, children: /* @__PURE__ */ r(
1297
1246
  "button",
1298
1247
  {
1299
1248
  type: "button",
1300
1249
  "aria-label": `${e} details`,
1301
1250
  className: "inline-flex h-3.5 w-3.5 items-center justify-center rounded-control text-muted-foreground/70 transition-colors hover:bg-muted hover:text-foreground",
1302
- children: /* @__PURE__ */ r(he, { className: "h-3 w-3" })
1251
+ children: /* @__PURE__ */ r(me, { className: "h-3 w-3" })
1303
1252
  }
1304
1253
  ) }),
1305
1254
  /* @__PURE__ */ r(oe, { side: "top", className: "max-w-64", children: n })
1306
1255
  ] }) }) : null
1307
1256
  ] }),
1308
1257
  /* @__PURE__ */ d("div", { className: "flex h-7 items-center overflow-hidden rounded-control border border-input bg-background", children: [
1309
- /* @__PURE__ */ d(ge, { open: s, onOpenChange: f, children: [
1310
- /* @__PURE__ */ r(fe, { asChild: !0, children: /* @__PURE__ */ r(
1258
+ /* @__PURE__ */ d(ge, { open: c, onOpenChange: f, children: [
1259
+ /* @__PURE__ */ r(be, { asChild: !0, children: /* @__PURE__ */ r(
1311
1260
  "button",
1312
1261
  {
1313
1262
  type: "button",
@@ -1318,7 +1267,7 @@ function v({
1318
1267
  }
1319
1268
  ) }),
1320
1269
  /* @__PURE__ */ d(
1321
- me,
1270
+ fe,
1322
1271
  {
1323
1272
  align: "start",
1324
1273
  sideOffset: 6,
@@ -1336,70 +1285,70 @@ function v({
1336
1285
  {
1337
1286
  "aria-label": `${e} native color picker`,
1338
1287
  type: "color",
1339
- value: x,
1340
- onChange: (b) => u(b.target.value),
1288
+ value: y,
1289
+ onChange: (g) => u(g.target.value),
1341
1290
  className: "absolute inset-0 h-full w-full cursor-pointer opacity-0"
1342
1291
  }
1343
1292
  ),
1344
- /* @__PURE__ */ r("span", { className: "rounded-control bg-black/45 p-1 text-white shadow-sm", children: /* @__PURE__ */ r(rr, { className: "h-3.5 w-3.5" }) })
1293
+ /* @__PURE__ */ r("span", { className: "rounded-control bg-black/45 p-1 text-white shadow-sm", children: /* @__PURE__ */ r(ar, { className: "h-3.5 w-3.5" }) })
1345
1294
  ]
1346
1295
  }
1347
1296
  ),
1348
1297
  /* @__PURE__ */ d("div", { className: "min-w-0 flex-1", children: [
1349
1298
  /* @__PURE__ */ d("div", { className: "mb-1 flex items-center justify-between gap-2", children: [
1350
- /* @__PURE__ */ r(z, { className: "block text-[11px] font-normal text-muted-foreground", children: "Color value" }),
1351
- /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ d(re, { children: [
1352
- /* @__PURE__ */ r(ae, { asChild: !0, children: /* @__PURE__ */ r(
1299
+ /* @__PURE__ */ r(E, { className: "block text-[11px] font-normal text-muted-foreground", children: "Color value" }),
1300
+ /* @__PURE__ */ r(Q, { children: /* @__PURE__ */ d(ee, { children: [
1301
+ /* @__PURE__ */ r(re, { asChild: !0, children: /* @__PURE__ */ r(
1353
1302
  "button",
1354
1303
  {
1355
1304
  type: "button",
1356
1305
  "aria-label": `Reset ${e} color to previous value`,
1357
- disabled: !A,
1306
+ disabled: !S,
1358
1307
  className: "inline-flex h-5 w-5 items-center justify-center rounded-control text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:pointer-events-none disabled:opacity-35",
1359
1308
  onClick: () => u(i),
1360
- children: /* @__PURE__ */ r(Ne, { className: "h-3 w-3" })
1309
+ children: /* @__PURE__ */ r(Ce, { className: "h-3 w-3" })
1361
1310
  }
1362
1311
  ) }),
1363
1312
  /* @__PURE__ */ r(oe, { side: "top", children: "Reset to previous value" })
1364
1313
  ] }) })
1365
1314
  ] }),
1366
1315
  /* @__PURE__ */ r(
1367
- U,
1316
+ ae,
1368
1317
  {
1369
1318
  size: "xs",
1370
1319
  "aria-label": `${e} popover color value`,
1371
1320
  value: t,
1372
- onChange: (b) => u(b.target.value),
1321
+ onChange: (g) => u(g.target.value),
1373
1322
  className: "font-mono"
1374
1323
  }
1375
1324
  )
1376
1325
  ] })
1377
1326
  ] }),
1378
- /* @__PURE__ */ r("div", { className: "mt-2 grid grid-cols-6 gap-1", children: dr.map((b) => /* @__PURE__ */ r(
1327
+ /* @__PURE__ */ r("div", { className: "mt-2 grid grid-cols-6 gap-1", children: cr.map((g) => /* @__PURE__ */ r(
1379
1328
  "button",
1380
1329
  {
1381
1330
  type: "button",
1382
- "aria-label": `Set ${e} to ${b}`,
1383
- className: Q(
1331
+ "aria-label": `Set ${e} to ${g}`,
1332
+ className: K(
1384
1333
  "h-6 rounded-control border border-border/70 shadow-sm",
1385
- t.toLowerCase() === b && "ring-2 ring-ring"
1334
+ t.toLowerCase() === g && "ring-2 ring-ring"
1386
1335
  ),
1387
- style: { backgroundColor: b },
1388
- onClick: () => u(b)
1336
+ style: { backgroundColor: g },
1337
+ onClick: () => u(g)
1389
1338
  },
1390
- b
1339
+ g
1391
1340
  )) })
1392
1341
  ]
1393
1342
  }
1394
1343
  )
1395
1344
  ] }),
1396
1345
  /* @__PURE__ */ r(
1397
- U,
1346
+ ae,
1398
1347
  {
1399
1348
  size: "xs",
1400
1349
  "aria-label": `${e} color value`,
1401
1350
  value: t,
1402
- onChange: (b) => u(b.target.value),
1351
+ onChange: (g) => u(g.target.value),
1403
1352
  className: "h-full border-0 px-2 font-mono shadow-none focus-visible:border-0"
1404
1353
  }
1405
1354
  )
@@ -1408,105 +1357,105 @@ function v({
1408
1357
  }
1409
1358
  function sr(e) {
1410
1359
  const n = Ze(e);
1411
- return n ? `#${q(n.r)}${q(n.g)}${q(n.b)}` : "#000000";
1360
+ return n ? `#${Y(n.r)}${Y(n.g)}${Y(n.b)}` : "#000000";
1412
1361
  }
1413
- function q(e) {
1362
+ function Y(e) {
1414
1363
  return Math.round(e).toString(16).padStart(2, "0");
1415
1364
  }
1416
- function S({
1365
+ function w({
1417
1366
  label: e,
1418
1367
  tooltip: n,
1419
1368
  value: t,
1420
1369
  min: u,
1421
- max: s,
1370
+ max: c,
1422
1371
  onChange: l
1423
1372
  }) {
1424
1373
  const i = m.useId();
1425
1374
  return /* @__PURE__ */ d("div", { className: "block", children: [
1426
1375
  /* @__PURE__ */ d("div", { className: "mb-1 flex items-center gap-1", children: [
1427
1376
  /* @__PURE__ */ r(
1428
- z,
1377
+ E,
1429
1378
  {
1430
1379
  htmlFor: i,
1431
1380
  className: "text-[11px] font-normal text-muted-foreground",
1432
1381
  children: e
1433
1382
  }
1434
1383
  ),
1435
- n ? /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ d(re, { children: [
1436
- /* @__PURE__ */ r(ae, { asChild: !0, children: /* @__PURE__ */ r(
1384
+ n ? /* @__PURE__ */ r(Q, { children: /* @__PURE__ */ d(ee, { children: [
1385
+ /* @__PURE__ */ r(re, { asChild: !0, children: /* @__PURE__ */ r(
1437
1386
  "button",
1438
1387
  {
1439
1388
  type: "button",
1440
1389
  "aria-label": `${e} details`,
1441
1390
  className: "inline-flex h-3.5 w-3.5 items-center justify-center rounded-control text-muted-foreground/70 transition-colors hover:bg-muted hover:text-foreground",
1442
- children: /* @__PURE__ */ r(he, { className: "h-3 w-3" })
1391
+ children: /* @__PURE__ */ r(me, { className: "h-3 w-3" })
1443
1392
  }
1444
1393
  ) }),
1445
1394
  /* @__PURE__ */ r(oe, { side: "top", className: "max-w-56", children: n })
1446
1395
  ] }) }) : null
1447
1396
  ] }),
1448
1397
  /* @__PURE__ */ r(
1449
- U,
1398
+ ae,
1450
1399
  {
1451
1400
  id: i,
1452
1401
  size: "xs",
1453
1402
  type: "number",
1454
1403
  min: u,
1455
- max: s,
1404
+ max: c,
1456
1405
  value: t,
1457
1406
  onChange: (k) => {
1458
- const x = Number(k.target.value);
1459
- Number.isNaN(x) || l(x);
1407
+ const y = Number(k.target.value);
1408
+ Number.isNaN(y) || l(y);
1460
1409
  }
1461
1410
  }
1462
1411
  )
1463
1412
  ] });
1464
1413
  }
1465
- function Z({
1414
+ function q({
1466
1415
  label: e,
1467
1416
  value: n,
1468
1417
  options: t,
1469
1418
  onChange: u
1470
1419
  }) {
1471
1420
  return /* @__PURE__ */ d("div", { children: [
1472
- /* @__PURE__ */ r(z, { className: "mb-1 block text-[11px] font-normal text-muted-foreground", children: e }),
1473
- /* @__PURE__ */ d(ye, { value: n, onValueChange: u, children: [
1474
- /* @__PURE__ */ r(xe, { size: "xs", children: /* @__PURE__ */ r(ke, {}) }),
1475
- /* @__PURE__ */ r(ve, { children: t.map(([s, l]) => /* @__PURE__ */ r(Ce, { value: s, children: l }, s)) })
1421
+ /* @__PURE__ */ r(E, { className: "mb-1 block text-[11px] font-normal text-muted-foreground", children: e }),
1422
+ /* @__PURE__ */ d(he, { value: n, onValueChange: u, children: [
1423
+ /* @__PURE__ */ r(xe, { size: "xs", children: /* @__PURE__ */ r(ye, {}) }),
1424
+ /* @__PURE__ */ r(ke, { children: t.map(([c, l]) => /* @__PURE__ */ r(ve, { value: c, children: l }, c)) })
1476
1425
  ] })
1477
1426
  ] });
1478
1427
  }
1479
- function K({
1428
+ function Z({
1480
1429
  label: e,
1481
1430
  checked: n,
1482
1431
  onCheckedChange: t
1483
1432
  }) {
1484
1433
  return /* @__PURE__ */ d("div", { className: "flex h-8 items-center justify-between rounded-control border border-border/60 px-2", children: [
1485
1434
  /* @__PURE__ */ r("span", { className: "text-[12px]", children: e }),
1486
- /* @__PURE__ */ r(He, { size: "xs", checked: n, onCheckedChange: t })
1435
+ /* @__PURE__ */ r(We, { size: "xs", checked: n, onCheckedChange: t })
1487
1436
  ] });
1488
1437
  }
1489
- function lr(e) {
1438
+ function ur(e) {
1490
1439
  const n = `${Number((e / 16).toFixed(4))}rem`;
1491
1440
  return {
1492
1441
  "--semaphor-radius": n,
1493
1442
  "--semaphor-control-radius": n
1494
1443
  };
1495
1444
  }
1496
- function cr(e) {
1445
+ function pr(e) {
1497
1446
  return JSON.parse(JSON.stringify(e));
1498
1447
  }
1499
- function ur(e) {
1448
+ function gr(e) {
1500
1449
  return typeof e.text == "function" ? e.text() : new Promise((n, t) => {
1501
1450
  const u = new FileReader();
1502
1451
  u.onload = () => n(String(u.result ?? "")), u.onerror = () => t(u.error ?? new Error("Unable to read file")), u.readAsText(e);
1503
1452
  });
1504
1453
  }
1505
1454
  export {
1506
- Se as BRAND_STUDIO_PRESETS,
1507
- xr as BrandStudioEditor,
1508
- ar as applyBrandStudioPreset,
1455
+ Ne as BRAND_STUDIO_PRESETS,
1456
+ vr as BrandStudioEditor,
1457
+ nr as applyBrandStudioPreset,
1509
1458
  L as buildAppearanceSpecFromDraft,
1510
- j as createBrandStudioDraft,
1511
- c as mirrorTableAppearance
1459
+ J as createBrandStudioDraft,
1460
+ s as mirrorTableAppearance
1512
1461
  };