react-semaphor 0.1.555 → 0.1.556

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 (97) hide show
  1. package/dist/analytics-protocol/index.js +10 -10
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/assistant-protocol/index.js +5 -5
  4. package/dist/brand-studio/index.js +438 -455
  5. package/dist/briefings/index.js +6 -6
  6. package/dist/chunks/{analytics-base-schemas-BKs3flFS.js → analytics-base-schemas-BUFUoO6G.js} +2 -2
  7. package/dist/chunks/{assistant-chat-8NZP6m-u.js → assistant-chat-C7Acww1T.js} +15 -15
  8. package/dist/chunks/{bookmark-state-BAeGKd3s.js → bookmark-state-7iZErWnR.js} +3 -3
  9. package/dist/chunks/comparison-window-caption-BseG5aOZ.js +1221 -0
  10. package/dist/chunks/{context-BerEBuFR.js → context-DVy4HOU0.js} +1 -1
  11. package/dist/chunks/{custom-visual-inputs-Gw-Ggg3O.js → custom-visual-inputs-ChuKjx27.js} +31 -33
  12. package/dist/chunks/{dashboard-Ds68ckO3.js → dashboard-BU6rE5kV.js} +1 -1
  13. package/dist/chunks/{dashboard-briefing-launcher-DlTr-VGc.js → dashboard-briefing-launcher-qrYd2zkN.js} +15 -15
  14. package/dist/chunks/{dashboard-controls-oNXJZN6x.js → dashboard-controls-BsapXI2H.js} +14 -14
  15. package/dist/chunks/{dashboard-json-CW7Q_efH.js → dashboard-json-CJqPqYnI.js} +5 -5
  16. package/dist/chunks/{document-dashboard-inputs-C21mL3ib.js → document-dashboard-inputs-BNSprf5_.js} +12 -12
  17. package/dist/chunks/{edit-dashboard-visual-BnnT_oKR.js → edit-dashboard-visual-CjAdV-WG.js} +4603 -4687
  18. package/dist/chunks/{filter-reach-copy-DlNPHbE-.js → filter-reach-copy-BTrqtFkh.js} +917 -987
  19. package/dist/chunks/{filter-value-text-DMrpj4h9.js → filter-value-text-CJTJDCym.js} +4 -4
  20. package/dist/chunks/{global-date-filter-utils-7OboTgrM.js → global-date-filter-utils-CTVf3dG3.js} +2904 -3102
  21. package/dist/chunks/{index-B2k6KtUN.js → index-B_vIRa-q.js} +12 -19
  22. package/dist/chunks/{index-CtoK1Lgu.js → index-dIV-Gdsb.js} +159 -161
  23. package/dist/chunks/{matrix-analytical-definition-DPVGg1mU.js → matrix-analytical-definition-Cg0ioFGQ.js} +21 -21
  24. package/dist/chunks/{matrix-card-D9bsdAye.js → matrix-card-yYibXSw1.js} +3 -3
  25. package/dist/chunks/{matrix-formatter-K2OVPJQI.js → matrix-formatter-C2kjsCDf.js} +44 -44
  26. package/dist/chunks/{matrix-member-presentation-DRWcJ8Mi.js → matrix-member-presentation-DEEauKXC.js} +1 -1
  27. package/dist/chunks/{matrix-operation-contract--lMaLlpV.js → matrix-operation-contract-C1G6AJNh.js} +33 -33
  28. package/dist/chunks/{metric-comparison-CYIt2F5X.js → metric-comparison-BfcmwxM1.js} +4 -4
  29. package/dist/chunks/{model-change-B0rAK-5w.js → model-change-CJEj3ZD6.js} +1 -1
  30. package/dist/chunks/pivot-result-contract-expectations-fKBHFPfz.js +56 -0
  31. package/dist/chunks/pivot-result-identity-CWi5WrrY.js +77 -0
  32. package/dist/chunks/{raw-temporal-contract-WuXA8jBP.js → raw-temporal-contract-CjHaUIsE.js} +1 -1
  33. package/dist/chunks/{raw-temporal-presentation-CivONfcO.js → raw-temporal-presentation-DWzLIHc3.js} +8 -8
  34. package/dist/chunks/{report-preferences-dialog-D_KyuEFx.js → report-preferences-dialog-D_wrbIQt.js} +17 -17
  35. package/dist/chunks/{report-runtime-context-BaIKSaja.js → report-runtime-context-BgM-iNWB.js} +2 -2
  36. package/dist/chunks/{resolve-dashboard-input-context-CIm9A8_j.js → resolve-dashboard-input-context-Df8V5QHW.js} +1415 -1567
  37. package/dist/chunks/{saved-dashboard-context-akb9JfOL.js → saved-dashboard-context-VvXI6r03.js} +9 -9
  38. package/dist/chunks/{selection-reducer-yw_JgICP.js → selection-reducer-By4CSmEF.js} +1 -1
  39. package/dist/chunks/{semaphor-ready-indicator-Ba7dwP5_.js → semaphor-ready-indicator-fejZmdq9.js} +49593 -56071
  40. package/dist/chunks/{shelf-drop-preview-context-5rg3pJHW.js → shelf-drop-preview-context-BuTCXe-S.js} +7 -7
  41. package/dist/chunks/{source-entity-resolution-CGymm5td.js → source-entity-resolution-B46EZIzX.js} +1 -1
  42. package/dist/chunks/{switch-B-UTI6v-.js → switch-Bq92UGId.js} +3 -3
  43. package/dist/chunks/{table-export-sheet-CgO6gaSM.js → table-export-sheet-noKl8-en.js} +1 -1
  44. package/dist/chunks/{table-settings-DOT_Bv1m.js → table-settings-PpINOzw8.js} +3 -3
  45. package/dist/chunks/{temporal-bucket-C4rqmwaQ.js → temporal-bucket-DzyadxVY.js} +53 -53
  46. package/dist/chunks/temporal-input-presentation-CJWS4d0L.js +879 -0
  47. package/dist/chunks/{token-types-DYECHYGH.js → token-types--0bgRCaO.js} +1 -1
  48. package/dist/chunks/{use-create-flow-overlay-state-BHNs0wl7.js → use-create-flow-overlay-state-Cz-ve64t.js} +7 -7
  49. package/dist/chunks/{validators-ClKLGDGZ.js → validators-CZo_H4E6.js} +305 -307
  50. package/dist/dashboard/index.js +2 -2
  51. package/dist/dashboard-authoring/index.js +60 -60
  52. package/dist/data-app-sdk/index.js +6 -6
  53. package/dist/data-app-sdk-adapters/index.js +3 -3
  54. package/dist/data-app-sdk-validation/index.js +6 -6
  55. package/dist/format-utils/index.js +207 -223
  56. package/dist/index.js +96 -97
  57. package/dist/layouts/index.js +1 -1
  58. package/dist/pdf-export-policy/index.js +9 -11
  59. package/dist/report-runtime-context/index.js +2 -2
  60. package/dist/style.css +1 -1
  61. package/dist/surfboard/index.js +2 -2
  62. package/dist/types/brand-studio/brand-studio-draft.d.ts +0 -3
  63. package/dist/types/brand-studio/index.d.ts +1 -1
  64. package/dist/types/components/visual/data-table/types/data-table.d.ts +0 -1
  65. package/dist/types/components/visual/shared/utils/table-column-order.d.ts +0 -6
  66. package/dist/types/index.js +27 -28
  67. package/dist/types/lib/api/exports-api.d.ts +1 -1
  68. package/dist/types/lib/charts/table-chart-types.d.ts +1 -1
  69. package/dist/types/lib/charts/types.d.ts +2 -2
  70. package/dist/types/lib/dashboard-viewer/export-table-view.d.ts +0 -3
  71. package/dist/types/lib/document/document-edits.d.ts +1 -1
  72. package/dist/types/lib/document/document-section-kinds.d.ts +2 -4
  73. package/dist/types/lib/document/document-table-data-policy.d.ts +1 -2
  74. package/dist/types/lib/formatters/grouped-temporal-activation.d.ts +3 -3
  75. package/dist/types/lib/formatters/grouped-temporal-presentation.d.ts +0 -6
  76. package/dist/types/lib/query-context/card-server-request.d.ts +0 -1
  77. package/dist/types/lib/table-formatting/table-formatting-types.d.ts +1 -1
  78. package/dist/types/lib/types/common-types.d.ts +0 -7
  79. package/dist/types/lib/types/explorer-types.d.ts +1 -14
  80. package/dist/types/lib/utils/card-config-utils.d.ts +11 -1
  81. package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +1 -2
  82. package/dist/types/shared/dashboard-authoring/legacy-table-routing.d.ts +9 -4
  83. package/dist/types/shared/format-utils/grouped-table-presentation.d.ts +0 -14
  84. package/dist/types/shared/format-utils/index.d.ts +0 -2
  85. package/dist/types/shared/format-utils/pdf-export-policy.d.ts +1 -1
  86. package/dist/types/shared/format-utils/pivot-result-contract-expectations.d.ts +2 -20
  87. package/dist/types/shared/format-utils/pivot-result-identity.d.ts +0 -20
  88. package/dist/types/shared/format-utils/table-export/prepare-table-export.d.ts +0 -1
  89. package/dist/types/shared/format-utils/table-export/table-export-result.d.ts +0 -4
  90. package/package.json +2 -2
  91. package/dist/chunks/comparison-window-caption-C2WNTlxK.js +0 -1433
  92. package/dist/chunks/pivot-header-presentation-CX4fkRuG.js +0 -42
  93. package/dist/chunks/pivot-result-identity-BHJGZwIc.js +0 -94
  94. package/dist/chunks/pivot-result-lifecycle-BygCpOhk.js +0 -1238
  95. package/dist/types/components/visual/pivot-table/types.d.ts +0 -80
  96. package/dist/types/shared/format-utils/aggregate-table-row-presentation.d.ts +0 -85
  97. package/dist/types/shared/format-utils/pivot-result-lifecycle.d.ts +0 -55
@@ -1,28 +1,28 @@
1
- import { jsxs as d, jsx as r, Fragment as le } from "react/jsx-runtime";
2
- import m from "react";
3
- import { P as ge, a as be, B as C, b as fe, C as De, R as me, L as se, S as ue, c as je, T as Ie, d as Je, e as V, f as Le, g as M, h as $e, i as _e, j as Ue, k as Ve, l as E, m as K, n as Q, o as ee, I as he, p as re, q as oe, r as ke, s as xe, t as ye, u as ve, v as Ce, w as Me } from "../chunks/switch-B-UTI6v-.js";
4
- import { A as Ge, p as We } from "../chunks/color-CJvdlFM_.js";
1
+ import { jsxs as d, jsx as r, Fragment as de } from "react/jsx-runtime";
2
+ import b from "react";
3
+ import { P as ue, a as pe, B as C, b as be, C as ze, R as ge, L as ce, S as ie, c as De, T as je, d as Ie, e as L, f as Je, g as $, h as Le, i as $e, j as _e, k as Ue, l as T, m as X, n as Y, o as q, I as fe, p as Z, q as K, r as me, s as he, t as ke, u as xe, v as ye, w as Ve } from "../chunks/switch-Bq92UGId.js";
4
+ import { A as Me, p as Ge } from "../chunks/color-CJvdlFM_.js";
5
5
  import "../chunks/index-CuHybtft.js";
6
- import "../chunks/validators-ClKLGDGZ.js";
7
- import "../chunks/matrix-operation-contract--lMaLlpV.js";
8
- import "../chunks/analytics-base-schemas-BKs3flFS.js";
6
+ import "../chunks/validators-CZo_H4E6.js";
7
+ import "../chunks/matrix-operation-contract-C1G6AJNh.js";
8
+ import "../chunks/analytics-base-schemas-BUFUoO6G.js";
9
9
  import "zod";
10
10
  import "../value-format-preferences/index.js";
11
- import { c as ae } from "../chunks/_commonjsHelpers-DimLPMtv.js";
12
- import { r as He, v as Xe, A as Ye } from "../chunks/index-CLIro-EG.js";
13
- import { P as G } from "../chunks/palette-D10o_yYX.js";
14
- import { B as qe } from "../chunks/braces-o9UiRQes.js";
15
- import { c as ne, X as Ze } from "../chunks/x-4f5U2XwU.js";
16
- import { U as Ke } from "../chunks/upload-BFX7apKV.js";
17
- import { S as Qe } from "../chunks/save-CfJpQQ68.js";
18
- import { L as er } from "../chunks/layout-grid-Bgzth8vd.js";
11
+ import { c as Q } from "../chunks/_commonjsHelpers-DimLPMtv.js";
12
+ import { r as We, v as He, A as Xe } from "../chunks/index-CLIro-EG.js";
13
+ import { P as _ } from "../chunks/palette-D10o_yYX.js";
14
+ import { B as Ye } from "../chunks/braces-o9UiRQes.js";
15
+ import { c as ee, X as qe } from "../chunks/x-4f5U2XwU.js";
16
+ import { U as Ze } from "../chunks/upload-BFX7apKV.js";
17
+ import { S as Ke } from "../chunks/save-CfJpQQ68.js";
18
+ import { L as Qe } from "../chunks/layout-grid-Bgzth8vd.js";
19
19
  /**
20
20
  * @license lucide-react v0.453.0 - ISC
21
21
  *
22
22
  * This source code is licensed under the ISC license.
23
23
  * See the LICENSE file in the root directory of this source tree.
24
24
  */
25
- const rr = ne("Ban", [
25
+ const er = ee("Ban", [
26
26
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
27
27
  ["path", { d: "m4.9 4.9 14.2 14.2", key: "1m5liu" }]
28
28
  ]);
@@ -32,7 +32,7 @@ const rr = ne("Ban", [
32
32
  * This source code is licensed under the ISC license.
33
33
  * See the LICENSE file in the root directory of this source tree.
34
34
  */
35
- const or = ne("Clipboard", [
35
+ const rr = ee("Clipboard", [
36
36
  ["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
37
37
  [
38
38
  "path",
@@ -48,7 +48,7 @@ const or = ne("Clipboard", [
48
48
  * This source code is licensed under the ISC license.
49
49
  * See the LICENSE file in the root directory of this source tree.
50
50
  */
51
- const ar = ne("Pipette", [
51
+ const or = ee("Pipette", [
52
52
  ["path", { d: "m2 22 1-1h3l9-9", key: "1sre89" }],
53
53
  ["path", { d: "M3 21v-3l9-9", key: "hpe2y6" }],
54
54
  [
@@ -58,7 +58,7 @@ const ar = ne("Pipette", [
58
58
  key: "196du1"
59
59
  }
60
60
  ]
61
- ]), Ne = [
61
+ ]), Ce = [
62
62
  {
63
63
  id: "semaphor",
64
64
  name: "Semaphor",
@@ -213,113 +213,105 @@ const ar = ne("Pipette", [
213
213
  }
214
214
  }
215
215
  ];
216
- function J(e) {
217
- const n = He({
216
+ function D(e) {
217
+ const a = We({
218
218
  organizationAppearance: e ?? void 0
219
219
  });
220
- return nr(
221
- dr(O(n))
220
+ return ar(
221
+ tr(re(a))
222
222
  );
223
223
  }
224
- function nr(e) {
225
- for (const n of Object.values(e.schemes))
226
- for (const t of [
227
- n.components.table,
228
- n.components.aggregateTable,
229
- n.components.pivotTable
230
- ]) {
231
- const c = t == null ? void 0 : t.row;
232
- c != null && c.selectedBackground && c.selectedBackground === c.hoverBackground && delete c.selectedBackground;
233
- }
224
+ function ar(e) {
225
+ var a;
226
+ for (const n of Object.values(e.schemes)) {
227
+ const c = (a = n.components.table) == null ? void 0 : a.row;
228
+ c != null && c.selectedBackground && c.selectedBackground === c.hoverBackground && delete c.selectedBackground;
229
+ }
234
230
  return e;
235
231
  }
236
- function L(e) {
237
- const n = O({
238
- version: Ye,
232
+ function j(e) {
233
+ const a = re({
234
+ version: Xe,
239
235
  mode: e.mode,
240
236
  schemes: e.schemes
241
- }), t = Xe(n);
242
- if (!t.success) {
243
- const c = t.issues[0];
237
+ }), n = He(a);
238
+ if (!n.success) {
239
+ const c = n.issues[0];
244
240
  throw new Error(
245
241
  `Invalid Brand Studio appearance at ${c.path}: ${c.message}`
246
242
  );
247
243
  }
248
- return t.value;
244
+ return n.value;
249
245
  }
250
- function tr(e, n) {
251
- const t = Ne.find((l) => l.id === n);
252
- if (!t)
246
+ function nr(e, a) {
247
+ const n = Ce.find((i) => i.id === a);
248
+ if (!n)
253
249
  return e;
254
- const c = O(e);
255
- return pe(c.schemes.light, t.light), pe(c.schemes.dark, t.dark), c;
256
- }
257
- function pe(e, n) {
258
- 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.selection = n.selection, 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, p(e, "aggregateTable"), p(e, "pivotTable");
250
+ const c = re(e);
251
+ return se(c.schemes.light, n.light), se(c.schemes.dark, n.dark), c;
259
252
  }
260
- function p(e, n) {
261
- e.components[n] = O(e.components.table);
253
+ function se(e, a) {
254
+ e.tokens.color.background = a.background, e.tokens.color.foreground = a.foreground, e.tokens.color.muted = a.muted, e.tokens.color.mutedForeground = a.mutedForeground, e.tokens.color.border = a.border, e.tokens.color.input = a.border, e.tokens.color.primary = a.primary, e.tokens.color.primaryForeground = a.primaryForeground, e.tokens.color.accent = a.accent, e.tokens.color.accentForeground = a.accentForeground, e.tokens.color.selection = a.selection, e.tokens.color.card = a.card, e.tokens.color.cardForeground = a.cardForeground, e.components.dashboard.background = a.background, e.components.dashboard.foreground = a.foreground, e.components.dashboard.borderColor = a.border, e.components.card.background = a.card, e.components.card.foreground = a.cardForeground, e.components.card.borderColor = a.border, e.components.interactive.toolbarBackground = a.background, e.components.interactive.background = a.card, e.components.interactive.foreground = a.foreground, e.components.interactive.borderColor = a.border, e.components.chart.palette = [...a.chartPalette], e.components.chart.background = a.card, e.components.chart.foreground = a.foreground, e.components.chart.gridColor = a.border, e.components.chart.axisColor = a.mutedForeground, e.components.table.container.background = a.card, e.components.table.container.borderColor = a.border, e.components.table.header.background = a.muted, e.components.table.header.foreground = a.mutedForeground, e.components.table.header.dividerColor = a.border, e.components.table.row.dividerColor = a.border, e.components.table.row.zebraBackground = a.muted, e.components.table.pagination.background = a.card, e.components.table.pagination.foreground = a.foreground, e.components.table.pagination.borderColor = a.border;
262
255
  }
263
- function W(e, n, t) {
264
- switch (e.tokens.color[n] = t, n) {
256
+ function U(e, a, n) {
257
+ switch (e.tokens.color[a] = n, a) {
265
258
  case "background":
266
- e.components.dashboard.background = t, e.components.interactive.toolbarBackground = t;
259
+ e.components.dashboard.background = n, e.components.interactive.toolbarBackground = n;
267
260
  break;
268
261
  case "foreground":
269
- 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, p(e, "aggregateTable"), p(e, "pivotTable");
262
+ e.components.dashboard.foreground = n, e.components.interactive.foreground = n, e.components.pagination.foreground = n, e.components.chart.foreground = n, e.components.table.pagination.foreground = n, e.components.table.subtotal.foreground = n, e.components.table.grandTotal.foreground = n;
270
263
  break;
271
264
  case "card":
272
- 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, p(e, "aggregateTable"), p(e, "pivotTable");
265
+ e.components.card.background = n, e.components.interactive.background = n, e.components.pagination.background = n, e.components.chart.background = n, e.components.table.container.background = n, e.components.table.pagination.background = n;
273
266
  break;
274
267
  case "cardForeground":
275
- e.components.card.foreground = t;
268
+ e.components.card.foreground = n;
276
269
  break;
277
270
  case "muted":
278
- e.components.table.header.background = t, e.components.table.row.zebraBackground = t, e.components.table.subtotal.background = t, e.components.table.grandTotal.background = t, p(e, "aggregateTable"), p(e, "pivotTable");
271
+ e.components.table.header.background = n, e.components.table.row.zebraBackground = n, e.components.table.subtotal.background = n, e.components.table.grandTotal.background = n;
279
272
  break;
280
273
  case "mutedForeground":
281
- e.components.table.header.foreground = t, e.components.chart.axisColor = t, p(e, "aggregateTable"), p(e, "pivotTable");
274
+ e.components.table.header.foreground = n, e.components.chart.axisColor = n;
282
275
  break;
283
276
  case "border":
284
- 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, p(e, "aggregateTable"), p(e, "pivotTable");
277
+ e.tokens.color.input = n, e.components.dashboard.borderColor = n, e.components.card.borderColor = n, e.components.interactive.borderColor = n, e.components.pagination.borderColor = n, e.components.chart.gridColor = n, e.components.table.container.borderColor = n, e.components.table.header.dividerColor = n, e.components.table.row.dividerColor = n, e.components.table.grandTotal.borderColor = n, e.components.table.pagination.borderColor = n;
285
278
  break;
286
279
  case "accent":
287
- e.components.table.row.hoverBackground = t, p(e, "aggregateTable"), p(e, "pivotTable");
280
+ e.components.table.row.hoverBackground = n;
288
281
  break;
289
282
  }
290
283
  }
291
- function H(e, n, t) {
292
- switch (e.tokens.radius[n] = t, n) {
284
+ function V(e, a, n) {
285
+ switch (e.tokens.radius[a] = n, a) {
293
286
  case "control":
294
- e.components.interactive.borderRadius = t, e.components.pagination.borderRadius = t;
287
+ e.components.interactive.borderRadius = n, e.components.pagination.borderRadius = n;
295
288
  break;
296
289
  case "card":
297
- e.components.card.borderRadius = t;
290
+ e.components.card.borderRadius = n;
298
291
  break;
299
292
  case "table":
300
- e.components.table.container.borderRadius = t, p(e, "aggregateTable"), p(e, "pivotTable");
293
+ e.components.table.container.borderRadius = n;
301
294
  break;
302
295
  }
303
296
  }
304
- function dr(e) {
305
- var n, t;
306
- for (const c of ["light", "dark"]) {
307
- const l = e.schemes[c], s = l.tokens, i = s.color, v = (n = l.components) == null ? void 0 : n.aggregateTable, x = (t = l.components) == null ? void 0 : t.pivotTable, S = {
297
+ function tr(e) {
298
+ for (const a of ["light", "dark"]) {
299
+ const n = e.schemes[a], c = n.tokens, i = c.color, f = {
308
300
  fontFamily: "",
309
301
  headingFontFamily: "",
310
302
  monoFontFamily: "",
311
303
  baseFontSize: 14,
312
304
  density: "comfortable"
313
305
  };
314
- s.typography = { ...S, ...s.typography };
315
- const f = {
306
+ c.typography = { ...f, ...c.typography };
307
+ const g = {
316
308
  control: 5,
317
309
  card: 5,
318
310
  table: 5,
319
311
  badge: 999
320
312
  };
321
- s.radius = { ...f, ...s.radius };
322
- const b = {
313
+ c.radius = { ...g, ...c.radius };
314
+ const y = {
323
315
  dashboardPadding: 16,
324
316
  gridGap: 12,
325
317
  cardPadding: 16,
@@ -327,34 +319,34 @@ function dr(e) {
327
319
  tableCellX: 12,
328
320
  tableCellY: 8
329
321
  };
330
- s.spacing = { ...b, ...s.spacing };
331
- const T = {
322
+ c.spacing = { ...y, ...c.spacing };
323
+ const x = {
332
324
  card: "none",
333
325
  popover: "0 12px 32px rgba(15, 23, 42, 0.14)",
334
326
  focusRing: "0 0 0 2px rgba(37, 99, 235, 0.35)"
335
327
  };
336
- s.shadow = { ...T, ...s.shadow };
337
- const F = {
328
+ c.shadow = { ...x, ...c.shadow };
329
+ const w = {
338
330
  dashboard: {
339
331
  background: i.background,
340
332
  foreground: i.foreground,
341
333
  borderColor: i.border,
342
- padding: s.spacing.dashboardPadding
334
+ padding: c.spacing.dashboardPadding
343
335
  },
344
336
  card: {
345
337
  background: i.card,
346
338
  foreground: i.cardForeground,
347
339
  borderColor: i.border,
348
- borderRadius: s.radius.card,
349
- padding: s.spacing.cardPadding,
350
- shadow: s.shadow.card
340
+ borderRadius: c.radius.card,
341
+ padding: c.spacing.cardPadding,
342
+ shadow: c.shadow.card
351
343
  },
352
344
  interactive: {
353
345
  toolbarBackground: i.background,
354
346
  background: i.card,
355
347
  foreground: i.foreground,
356
348
  borderColor: i.border,
357
- borderRadius: s.radius.control
349
+ borderRadius: c.radius.control
358
350
  },
359
351
  chart: {
360
352
  palette: [],
@@ -363,45 +355,37 @@ function dr(e) {
363
355
  gridColor: i.border,
364
356
  axisColor: i.mutedForeground
365
357
  },
366
- table: B(i, s),
367
- aggregateTable: B(i, s),
368
- pivotTable: B(i, s),
358
+ table: le(i, c),
369
359
  pagination: {
370
360
  background: i.card,
371
361
  foreground: i.foreground,
372
362
  borderColor: i.border,
373
- borderRadius: s.radius.control
363
+ borderRadius: c.radius.control
374
364
  }
375
365
  };
376
- l.components = { ...F, ...l.components };
377
- const $ = {
366
+ n.components = { ...w, ...n.components };
367
+ const p = {
378
368
  palette: [],
379
369
  background: i.card,
380
370
  foreground: i.foreground,
381
371
  gridColor: i.border,
382
372
  axisColor: i.mutedForeground
383
373
  };
384
- l.components.chart = { ...$, ...l.components.chart }, l.components.table = {
385
- ...B(i, s),
386
- ...l.components.table
387
- }, l.components.aggregateTable = v ? {
388
- ...B(i, s),
389
- ...v
390
- } : O(l.components.table), l.components.pivotTable = x ? {
391
- ...B(i, s),
392
- ...x
393
- } : O(l.components.table);
374
+ n.components.chart = { ...p, ...n.components.chart }, n.components.table = {
375
+ ...le(i, c),
376
+ ...n.components.table
377
+ };
394
378
  }
395
379
  return e;
396
380
  }
397
- function B(e, n) {
381
+ function le(e, a) {
398
382
  return {
399
- density: n.typography.density,
383
+ density: a.typography.density,
400
384
  container: {
401
385
  background: e.card,
402
386
  borderColor: e.border,
403
- borderRadius: n.radius.table,
404
- shadow: n.shadow.card
387
+ borderRadius: a.radius.table,
388
+ shadow: a.shadow.card
405
389
  },
406
390
  header: {
407
391
  background: e.muted,
@@ -419,8 +403,8 @@ function B(e, n) {
419
403
  hoverBackground: e.accent
420
404
  },
421
405
  cell: {
422
- paddingX: n.spacing.tableCellX,
423
- paddingY: n.spacing.tableCellY,
406
+ paddingX: a.spacing.tableCellX,
407
+ paddingY: a.spacing.tableCellY,
424
408
  verticalAlign: "middle",
425
409
  wrap: "nowrap"
426
410
  },
@@ -442,10 +426,10 @@ function B(e, n) {
442
426
  }
443
427
  };
444
428
  }
445
- function O(e) {
429
+ function re(e) {
446
430
  return JSON.parse(JSON.stringify(e));
447
431
  }
448
- const ir = [
432
+ const dr = [
449
433
  ["background", "Canvas"],
450
434
  ["foreground", "Text"],
451
435
  ["card", "Card"],
@@ -461,7 +445,7 @@ const ir = [
461
445
  ["negative", "Negative"],
462
446
  ["warning", "Warning"],
463
447
  ["info", "Info"]
464
- ], cr = [0, 1, 2, 3, 4, 5], X = Ge, lr = [
448
+ ], cr = [0, 1, 2, 3, 4, 5], M = Me, ir = [
465
449
  "#ffffff",
466
450
  "#f8fafc",
467
451
  "#f4f4f5",
@@ -475,165 +459,165 @@ const ir = [
475
459
  "#dc2626",
476
460
  "#7c3aed"
477
461
  ];
478
- function Er({
462
+ function Ar({
479
463
  appearance: e,
480
- previewTitle: n,
481
- isLoading: t = !1,
464
+ previewTitle: a,
465
+ isLoading: n = !1,
482
466
  isSaving: c = !1,
483
- error: l = null,
484
- className: s,
485
- onDraftChange: i,
486
- onSave: v,
467
+ error: i = null,
468
+ className: f,
469
+ onDraftChange: g,
470
+ onSave: y,
487
471
  onClearConfig: x,
488
- onCancel: S
472
+ onCancel: w
489
473
  }) {
490
- const [f, b] = m.useState(null), [T, F] = m.useState("light"), [$, z] = m.useState(!1), [we, R] = m.useState(
474
+ const [p, u] = b.useState(null), [B, O] = b.useState("light"), [ve, R] = b.useState(!1), [Ne, F] = b.useState(
491
475
  "idle"
492
- ), [te, Se] = m.useState(!1), [D, _] = m.useState(""), [j, h] = m.useState(null), de = m.useRef(null), I = m.useRef(i), A = m.useRef(!1);
493
- m.useEffect(() => {
494
- I.current = i;
495
- }, [i]), m.useEffect(() => {
476
+ ), [oe, we] = b.useState(!1), [A, I] = b.useState(""), [E, m] = b.useState(null), ae = b.useRef(null), z = b.useRef(g), P = b.useRef(!1);
477
+ b.useEffect(() => {
478
+ z.current = g;
479
+ }, [g]), b.useEffect(() => {
496
480
  if (e === void 0) {
497
- A.current = !0, b(null);
481
+ P.current = !0, u(null);
498
482
  return;
499
483
  }
500
- const o = J(e);
501
- A.current = !0, b(o), F("light"), h(null);
502
- }, [e]), m.useEffect(() => {
484
+ const o = D(e);
485
+ P.current = !0, u(o), O("light"), m(null);
486
+ }, [e]), b.useEffect(() => {
503
487
  var o;
504
- if (f) {
505
- if (A.current) {
506
- A.current = !1;
488
+ if (p) {
489
+ if (P.current) {
490
+ P.current = !1;
507
491
  return;
508
492
  }
509
493
  try {
510
- const a = L(f);
511
- (o = I.current) == null || o.call(I, a), h(null);
512
- } catch (a) {
513
- h(
514
- a instanceof Error ? a.message : "Appearance is invalid"
494
+ const t = j(p);
495
+ (o = z.current) == null || o.call(z, t), m(null);
496
+ } catch (t) {
497
+ m(
498
+ t instanceof Error ? t.message : "Appearance is invalid"
515
499
  );
516
500
  }
517
501
  }
518
- }, [f]);
519
- const u = f == null ? void 0 : f.schemes[T], U = c || $, Te = m.useMemo(
520
- () => u ? pr(u.tokens.radius.control) : void 0,
521
- [u]
502
+ }, [p]);
503
+ const s = p == null ? void 0 : p.schemes[B], J = c || ve, Se = b.useMemo(
504
+ () => s ? ur(s.tokens.radius.control) : void 0,
505
+ [s]
522
506
  ), Fe = (o) => {
523
- b((a) => {
524
- if (!a) return a;
525
- const k = gr(a);
526
- return o(k), k;
507
+ u((t) => {
508
+ if (!t) return t;
509
+ const h = pr(t);
510
+ return o(h), h;
527
511
  });
528
- }, g = (o) => {
529
- Fe((a) => {
530
- o(a.schemes[T]);
512
+ }, l = (o) => {
513
+ Fe((t) => {
514
+ o(t.schemes[B]);
531
515
  });
532
516
  }, Pe = async () => {
533
- if (!f || !v) return;
517
+ if (!p || !y) return;
534
518
  let o;
535
519
  try {
536
- o = L(f);
537
- } catch (a) {
538
- h(
539
- a instanceof Error ? a.message : "Appearance is invalid"
520
+ o = j(p);
521
+ } catch (t) {
522
+ m(
523
+ t instanceof Error ? t.message : "Appearance is invalid"
540
524
  );
541
525
  return;
542
526
  }
543
- z(!0);
527
+ R(!0);
544
528
  try {
545
- await v(o);
529
+ await y(o);
546
530
  } finally {
547
- z(!1);
531
+ R(!1);
548
532
  }
549
- }, Be = () => {
550
- const o = J(null);
551
- R("idle"), b(o);
552
- }, Oe = async () => {
533
+ }, Te = () => {
534
+ const o = D(null);
535
+ F("idle"), u(o);
536
+ }, Be = async () => {
553
537
  if (x) {
554
- z(!0), h(null), R("idle");
538
+ R(!0), m(null), F("idle");
555
539
  try {
556
- await x(), A.current = !0, b(J(null)), F("light");
540
+ await x(), P.current = !0, u(D(null)), O("light");
557
541
  } catch (o) {
558
- h(
542
+ m(
559
543
  o instanceof Error ? o.message : "Unable to clear organization appearance"
560
544
  );
561
545
  } finally {
562
- z(!1);
546
+ R(!1);
563
547
  }
564
548
  }
565
- }, ie = m.useCallback(() => f ? JSON.stringify(L(f), null, 2) : "", [f]), Re = (o) => {
566
- if (Se(o), o)
549
+ }, ne = b.useCallback(() => p ? JSON.stringify(j(p), null, 2) : "", [p]), Oe = (o) => {
550
+ if (we(o), o)
567
551
  try {
568
- _(ie()), h(null);
569
- } catch (a) {
570
- h(
571
- a instanceof Error ? a.message : "Appearance is invalid"
552
+ I(ne()), m(null);
553
+ } catch (t) {
554
+ m(
555
+ t instanceof Error ? t.message : "Appearance is invalid"
572
556
  );
573
557
  }
574
- }, Ae = async () => {
575
- if (f)
558
+ }, Re = async () => {
559
+ if (p)
576
560
  try {
577
- const o = te && D ? D : ie();
578
- await navigator.clipboard.writeText(o), h(null), R("copied");
561
+ const o = oe && A ? A : ne();
562
+ await navigator.clipboard.writeText(o), m(null), F("copied");
579
563
  } catch (o) {
580
- h(
564
+ m(
581
565
  o instanceof Error ? o.message : "Unable to copy brand spec"
582
566
  );
583
567
  }
584
- }, ce = (o) => {
585
- const a = JSON.parse(o), k = J(a), P = L(k);
586
- R("idle"), F("light"), b(k), _(JSON.stringify(P, null, 2));
587
- }, Ee = () => {
568
+ }, te = (o) => {
569
+ const t = JSON.parse(o), h = D(t), S = j(h);
570
+ F("idle"), O("light"), u(h), I(JSON.stringify(S, null, 2));
571
+ }, Ae = () => {
588
572
  try {
589
- ce(D);
573
+ te(A);
590
574
  } catch (o) {
591
- h(
575
+ m(
592
576
  o instanceof Error ? o.message : "Brand spec must be valid JSON"
593
577
  );
594
578
  }
595
- }, ze = async (o) => {
596
- var k;
597
- const a = (k = o.target.files) == null ? void 0 : k[0];
598
- if (o.target.value = "", !!a)
579
+ }, Ee = async (o) => {
580
+ var h;
581
+ const t = (h = o.target.files) == null ? void 0 : h[0];
582
+ if (o.target.value = "", !!t)
599
583
  try {
600
- ce(await br(a));
601
- } catch (P) {
602
- h(
603
- P instanceof Error ? P.message : "Uploaded file must be a valid brand spec"
584
+ te(await br(t));
585
+ } catch (S) {
586
+ m(
587
+ S instanceof Error ? S.message : "Uploaded file must be a valid brand spec"
604
588
  );
605
589
  }
606
590
  };
607
591
  return /* @__PURE__ */ d(
608
592
  "div",
609
593
  {
610
- className: ae(
594
+ className: Q(
611
595
  "flex min-h-0 flex-1 flex-col bg-background text-foreground",
612
- s
596
+ f
613
597
  ),
614
- style: Te,
598
+ style: Se,
615
599
  children: [
616
600
  /* @__PURE__ */ d("header", { className: "flex h-11 shrink-0 items-start gap-3 border-b border-border/60 px-4 pt-2", children: [
617
- /* @__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(G, { className: "h-3.5 w-3.5" }) }),
601
+ /* @__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(_, { className: "h-3.5 w-3.5" }) }),
618
602
  /* @__PURE__ */ d("div", { className: "min-w-0 flex-1", children: [
619
603
  /* @__PURE__ */ r("h2", { className: "truncate text-[13px] font-semibold leading-tight", children: "Brand Studio" }),
620
604
  /* @__PURE__ */ d("p", { className: "truncate text-[11px] leading-tight text-muted-foreground", children: [
621
605
  "Previewing ",
622
- n || "current dashboard"
606
+ a || "current dashboard"
623
607
  ] })
624
608
  ] }),
625
609
  /* @__PURE__ */ d(
626
- ge,
610
+ ue,
627
611
  {
628
- open: te,
629
- onOpenChange: Re,
612
+ open: oe,
613
+ onOpenChange: Oe,
630
614
  children: [
631
- /* @__PURE__ */ r(be, { asChild: !0, children: /* @__PURE__ */ d(C, { type: "button", size: "xs", variant: "ghost", disabled: !f, children: [
632
- /* @__PURE__ */ r(qe, { className: "h-3.5 w-3.5" }),
615
+ /* @__PURE__ */ r(pe, { asChild: !0, children: /* @__PURE__ */ d(C, { type: "button", size: "xs", variant: "ghost", disabled: !p, children: [
616
+ /* @__PURE__ */ r(Ye, { className: "h-3.5 w-3.5" }),
633
617
  "Brand Spec"
634
618
  ] }) }),
635
619
  /* @__PURE__ */ d(
636
- fe,
620
+ be,
637
621
  {
638
622
  align: "end",
639
623
  sideOffset: 6,
@@ -651,10 +635,10 @@ function Er({
651
635
  type: "button",
652
636
  size: "xs",
653
637
  variant: "ghost",
654
- onClick: Ae,
638
+ onClick: Re,
655
639
  children: [
656
- /* @__PURE__ */ r(or, { className: "h-3.5 w-3.5" }),
657
- we === "copied" ? "Copied" : "Copy"
640
+ /* @__PURE__ */ r(rr, { className: "h-3.5 w-3.5" }),
641
+ Ne === "copied" ? "Copied" : "Copy"
658
642
  ]
659
643
  }
660
644
  ),
@@ -666,24 +650,24 @@ function Er({
666
650
  variant: "ghost",
667
651
  onClick: () => {
668
652
  var o;
669
- return (o = de.current) == null ? void 0 : o.click();
653
+ return (o = ae.current) == null ? void 0 : o.click();
670
654
  },
671
655
  children: [
672
- /* @__PURE__ */ r(Ke, { className: "h-3.5 w-3.5" }),
656
+ /* @__PURE__ */ r(Ze, { className: "h-3.5 w-3.5" }),
673
657
  "Upload"
674
658
  ]
675
659
  }
676
660
  ),
677
- /* @__PURE__ */ r(C, { type: "button", size: "xs", onClick: Ee, children: "Apply" })
661
+ /* @__PURE__ */ r(C, { type: "button", size: "xs", onClick: Ae, children: "Apply" })
678
662
  ] })
679
663
  ] }),
680
664
  /* @__PURE__ */ r("div", { className: "h-[320px] overflow-hidden rounded-control border border-input", children: /* @__PURE__ */ r(
681
- De,
665
+ ze,
682
666
  {
683
667
  ariaLabel: "Brand spec",
684
- value: D,
668
+ value: A,
685
669
  onValueChange: (o) => {
686
- _(o), R("idle");
670
+ I(o), F("idle");
687
671
  },
688
672
  language: "json",
689
673
  embedded: !0,
@@ -700,12 +684,12 @@ function Er({
700
684
  /* @__PURE__ */ r(
701
685
  "input",
702
686
  {
703
- ref: de,
687
+ ref: ae,
704
688
  "aria-label": "Upload brand spec",
705
689
  type: "file",
706
690
  accept: "application/json,.json",
707
691
  className: "sr-only",
708
- onChange: ze
692
+ onChange: Ee
709
693
  }
710
694
  ),
711
695
  /* @__PURE__ */ d(
@@ -714,10 +698,10 @@ function Er({
714
698
  type: "button",
715
699
  size: "xs",
716
700
  variant: "ghost",
717
- onClick: Be,
718
- disabled: !f,
701
+ onClick: Te,
702
+ disabled: !p,
719
703
  children: [
720
- /* @__PURE__ */ r(me, { className: "h-3.5 w-3.5" }),
704
+ /* @__PURE__ */ r(ge, { className: "h-3.5 w-3.5" }),
721
705
  "Reset"
722
706
  ]
723
707
  }
@@ -728,10 +712,10 @@ function Er({
728
712
  type: "button",
729
713
  size: "xs",
730
714
  variant: "ghost",
731
- onClick: Oe,
732
- disabled: U,
715
+ onClick: Be,
716
+ disabled: J,
733
717
  children: [
734
- /* @__PURE__ */ r(rr, { className: "h-3.5 w-3.5" }),
718
+ /* @__PURE__ */ r(er, { className: "h-3.5 w-3.5" }),
735
719
  "No config"
736
720
  ]
737
721
  }
@@ -742,69 +726,69 @@ function Er({
742
726
  type: "button",
743
727
  size: "xs",
744
728
  onClick: Pe,
745
- disabled: !f || U || !!j || !v,
729
+ disabled: !p || J || !!E || !y,
746
730
  children: [
747
- U ? /* @__PURE__ */ r(se, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ r(Qe, { className: "h-3.5 w-3.5" }),
731
+ J ? /* @__PURE__ */ r(ce, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ r(Ke, { className: "h-3.5 w-3.5" }),
748
732
  "Save"
749
733
  ]
750
734
  }
751
735
  ),
752
- S && /* @__PURE__ */ r(
736
+ w && /* @__PURE__ */ r(
753
737
  "button",
754
738
  {
755
739
  type: "button",
756
740
  "aria-label": "Close Brand Studio",
757
741
  className: "flex h-7 w-7 items-center justify-center rounded-control text-muted-foreground hover:bg-muted hover:text-foreground",
758
- onClick: S,
759
- children: /* @__PURE__ */ r(Ze, { className: "h-3.5 w-3.5" })
742
+ onClick: w,
743
+ children: /* @__PURE__ */ r(qe, { className: "h-3.5 w-3.5" })
760
744
  }
761
745
  )
762
746
  ] }),
763
747
  /* @__PURE__ */ d("div", { className: "flex shrink-0 items-center justify-between border-b border-border/60 px-4 py-2", children: [
764
- /* @__PURE__ */ r("div", { className: "flex items-center gap-2 text-[12px] text-muted-foreground", children: j ? /* @__PURE__ */ d(le, { children: [
765
- /* @__PURE__ */ r(ue, { className: "h-3.5 w-3.5 text-destructive" }),
748
+ /* @__PURE__ */ r("div", { className: "flex items-center gap-2 text-[12px] text-muted-foreground", children: E ? /* @__PURE__ */ d(de, { children: [
749
+ /* @__PURE__ */ r(ie, { className: "h-3.5 w-3.5 text-destructive" }),
766
750
  "Preview keeps the last valid draft"
767
- ] }) : /* @__PURE__ */ d(le, { children: [
768
- /* @__PURE__ */ r(je, { className: "h-3.5 w-3.5 text-emerald-500" }),
751
+ ] }) : /* @__PURE__ */ d(de, { children: [
752
+ /* @__PURE__ */ r(De, { className: "h-3.5 w-3.5 text-emerald-500" }),
769
753
  "Draft is applied to the live dashboard preview"
770
754
  ] }) }),
771
755
  /* @__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(
772
756
  "button",
773
757
  {
774
758
  type: "button",
775
- className: ae(
759
+ className: Q(
776
760
  "h-full px-2.5 text-[12px] capitalize transition-colors",
777
- T === o ? "bg-muted text-foreground" : "text-muted-foreground hover:text-foreground"
761
+ B === o ? "bg-muted text-foreground" : "text-muted-foreground hover:text-foreground"
778
762
  ),
779
- onClick: () => F(o),
763
+ onClick: () => O(o),
780
764
  children: o
781
765
  },
782
766
  o
783
767
  )) })
784
768
  ] }),
785
- j && /* @__PURE__ */ r("div", { className: "border-b border-destructive/20 bg-destructive/5 px-4 py-2 text-[12px] text-destructive", children: j }),
786
- t ? /* @__PURE__ */ r("div", { className: "flex flex-1 items-center justify-center", children: /* @__PURE__ */ r(se, { className: "h-4 w-4 animate-spin text-muted-foreground" }) }) : l ? /* @__PURE__ */ r("div", { className: "p-4 text-[13px] text-muted-foreground", children: l }) : f && u ? /* @__PURE__ */ d(Ie, { defaultValue: "style", className: "flex min-h-0 flex-1 flex-col", children: [
787
- /* @__PURE__ */ r("div", { className: "shrink-0 px-4 pt-3", children: /* @__PURE__ */ d(Je, { variant: "underline", className: "w-full gap-5", children: [
788
- /* @__PURE__ */ r(V, { value: "style", children: "Style" }),
789
- /* @__PURE__ */ r(V, { value: "surfaces", children: "Surfaces" }),
790
- /* @__PURE__ */ r(V, { value: "data", children: "Data" })
769
+ E && /* @__PURE__ */ r("div", { className: "border-b border-destructive/20 bg-destructive/5 px-4 py-2 text-[12px] text-destructive", children: E }),
770
+ n ? /* @__PURE__ */ r("div", { className: "flex flex-1 items-center justify-center", children: /* @__PURE__ */ r(ce, { className: "h-4 w-4 animate-spin text-muted-foreground" }) }) : i ? /* @__PURE__ */ r("div", { className: "p-4 text-[13px] text-muted-foreground", children: i }) : p && s ? /* @__PURE__ */ d(je, { defaultValue: "style", className: "flex min-h-0 flex-1 flex-col", children: [
771
+ /* @__PURE__ */ r("div", { className: "shrink-0 px-4 pt-3", children: /* @__PURE__ */ d(Ie, { variant: "underline", className: "w-full gap-5", children: [
772
+ /* @__PURE__ */ r(L, { value: "style", children: "Style" }),
773
+ /* @__PURE__ */ r(L, { value: "surfaces", children: "Surfaces" }),
774
+ /* @__PURE__ */ r(L, { value: "data", children: "Data" })
791
775
  ] }) }),
792
- /* @__PURE__ */ d(Le, { className: "min-h-0 flex-1", children: [
793
- /* @__PURE__ */ d(M, { value: "style", className: "m-0 p-4", children: [
776
+ /* @__PURE__ */ d(Je, { className: "min-h-0 flex-1", children: [
777
+ /* @__PURE__ */ d($, { value: "style", className: "m-0 p-4", children: [
794
778
  /* @__PURE__ */ r(
795
- N,
779
+ v,
796
780
  {
797
- icon: G,
781
+ icon: _,
798
782
  title: "Presets",
799
783
  description: "Start from a full light and dark appearance.",
800
- children: /* @__PURE__ */ r("div", { className: "grid grid-cols-1 gap-2", children: Ne.map((o) => /* @__PURE__ */ d(
784
+ children: /* @__PURE__ */ r("div", { className: "grid grid-cols-1 gap-2", children: Ce.map((o) => /* @__PURE__ */ d(
801
785
  "button",
802
786
  {
803
787
  type: "button",
804
788
  className: "flex items-center gap-3 rounded-control border border-border/70 px-3 py-2 text-left hover:bg-muted/60",
805
789
  onClick: () => {
806
- const a = tr(f, o.id);
807
- b(a);
790
+ const t = nr(p, o.id);
791
+ u(t);
808
792
  },
809
793
  children: [
810
794
  /* @__PURE__ */ d("div", { className: "flex h-7 w-10 overflow-hidden rounded-control border border-border/70", children: [
@@ -834,18 +818,18 @@ function Er({
834
818
  }
835
819
  ),
836
820
  /* @__PURE__ */ r(
837
- N,
821
+ v,
838
822
  {
839
- icon: G,
823
+ icon: _,
840
824
  title: "Color",
841
- description: `Editing the ${T} scheme.`,
842
- children: /* @__PURE__ */ r("div", { className: "grid grid-cols-2 gap-2", children: ir.map(([o, a]) => /* @__PURE__ */ r(
843
- y,
825
+ description: `Editing the ${B} scheme.`,
826
+ children: /* @__PURE__ */ r("div", { className: "grid grid-cols-2 gap-2", children: dr.map(([o, t]) => /* @__PURE__ */ r(
827
+ k,
844
828
  {
845
- label: a,
846
- value: u.tokens.color[o],
847
- onChange: (k) => g((P) => {
848
- W(P, o, k);
829
+ label: t,
830
+ value: s.tokens.color[o],
831
+ onChange: (h) => l((S) => {
832
+ U(S, o, h);
849
833
  })
850
834
  },
851
835
  o
@@ -853,46 +837,46 @@ function Er({
853
837
  }
854
838
  ),
855
839
  /* @__PURE__ */ d(
856
- N,
840
+ v,
857
841
  {
858
- icon: $e,
842
+ icon: Le,
859
843
  title: "Typography",
860
844
  description: "Fonts and density used by dashboard and workflow chrome.",
861
845
  children: [
862
846
  /* @__PURE__ */ r(
863
847
  sr,
864
848
  {
865
- value: u.tokens.typography.fontFamily,
866
- onChange: (o) => g((a) => {
867
- a.tokens.typography.fontFamily = o, a.tokens.typography.headingFontFamily = o;
849
+ value: s.tokens.typography.fontFamily,
850
+ onChange: (o) => l((t) => {
851
+ t.tokens.typography.fontFamily = o, t.tokens.typography.headingFontFamily = o;
868
852
  })
869
853
  }
870
854
  ),
871
855
  /* @__PURE__ */ d("div", { className: "grid grid-cols-2 gap-2", children: [
872
856
  /* @__PURE__ */ r(
873
- w,
857
+ N,
874
858
  {
875
859
  label: "Base size",
876
- value: u.tokens.typography.baseFontSize,
860
+ value: s.tokens.typography.baseFontSize,
877
861
  min: 11,
878
862
  max: 18,
879
- onChange: (o) => g((a) => {
880
- a.tokens.typography.baseFontSize = o;
863
+ onChange: (o) => l((t) => {
864
+ t.tokens.typography.baseFontSize = o;
881
865
  })
882
866
  }
883
867
  ),
884
868
  /* @__PURE__ */ r(
885
- q,
869
+ W,
886
870
  {
887
871
  label: "Density",
888
- value: u.tokens.typography.density,
872
+ value: s.tokens.typography.density,
889
873
  options: [
890
874
  ["compact", "Compact"],
891
875
  ["comfortable", "Comfortable"],
892
876
  ["spacious", "Spacious"]
893
877
  ],
894
- onChange: (o) => g((a) => {
895
- a.tokens.typography.density = o, a.components.table.density = a.tokens.typography.density, p(a, "aggregateTable"), p(a, "pivotTable");
878
+ onChange: (o) => l((t) => {
879
+ t.tokens.typography.density = o, t.components.table.density = t.tokens.typography.density;
896
880
  })
897
881
  }
898
882
  )
@@ -901,92 +885,92 @@ function Er({
901
885
  }
902
886
  )
903
887
  ] }),
904
- /* @__PURE__ */ d(M, { value: "surfaces", className: "m-0 p-4", children: [
888
+ /* @__PURE__ */ d($, { value: "surfaces", className: "m-0 p-4", children: [
905
889
  /* @__PURE__ */ d(
906
- N,
890
+ v,
907
891
  {
908
- icon: er,
892
+ icon: Qe,
909
893
  title: "Layout",
910
894
  description: "Canvas, grid, and card rhythm for embedded dashboards.",
911
895
  children: [
912
896
  /* @__PURE__ */ d("div", { className: "grid grid-cols-3 gap-2", children: [
913
897
  /* @__PURE__ */ r(
914
- w,
898
+ N,
915
899
  {
916
900
  label: "Canvas pad",
917
901
  tooltip: "Outer padding around the dashboard canvas before cards begin.",
918
- value: u.tokens.spacing.dashboardPadding,
902
+ value: s.tokens.spacing.dashboardPadding,
919
903
  min: 0,
920
904
  max: 48,
921
- onChange: (o) => g((a) => {
922
- a.tokens.spacing.dashboardPadding = o, a.components.dashboard.padding = o;
905
+ onChange: (o) => l((t) => {
906
+ t.tokens.spacing.dashboardPadding = o, t.components.dashboard.padding = o;
923
907
  })
924
908
  }
925
909
  ),
926
910
  /* @__PURE__ */ r(
927
- w,
911
+ N,
928
912
  {
929
913
  label: "Grid gap",
930
914
  tooltip: "Spacing between dashboard cards in the grid.",
931
- value: u.tokens.spacing.gridGap,
915
+ value: s.tokens.spacing.gridGap,
932
916
  min: 0,
933
917
  max: 32,
934
- onChange: (o) => g((a) => {
935
- a.tokens.spacing.gridGap = o;
918
+ onChange: (o) => l((t) => {
919
+ t.tokens.spacing.gridGap = o;
936
920
  })
937
921
  }
938
922
  ),
939
923
  /* @__PURE__ */ r(
940
- w,
924
+ N,
941
925
  {
942
926
  label: "Card pad",
943
927
  tooltip: "Inner padding inside card/widget frames around titles, controls, and visual content.",
944
- value: u.tokens.spacing.cardPadding,
928
+ value: s.tokens.spacing.cardPadding,
945
929
  min: 0,
946
930
  max: 32,
947
- onChange: (o) => g((a) => {
948
- a.tokens.spacing.cardPadding = o, a.components.card.padding = o;
931
+ onChange: (o) => l((t) => {
932
+ t.tokens.spacing.cardPadding = o, t.components.card.padding = o;
949
933
  })
950
934
  }
951
935
  )
952
936
  ] }),
953
937
  /* @__PURE__ */ d("div", { className: "grid grid-cols-3 gap-2", children: [
954
938
  /* @__PURE__ */ r(
955
- w,
939
+ N,
956
940
  {
957
941
  label: "Control radius",
958
942
  tooltip: "Corner radius for buttons, inputs, selects, checkboxes, segmented controls, and similar interactive controls.",
959
- value: u.tokens.radius.control,
943
+ value: s.tokens.radius.control,
960
944
  min: 0,
961
945
  max: 12,
962
- onChange: (o) => g((a) => {
963
- H(a, "control", o);
946
+ onChange: (o) => l((t) => {
947
+ V(t, "control", o);
964
948
  })
965
949
  }
966
950
  ),
967
951
  /* @__PURE__ */ r(
968
- w,
952
+ N,
969
953
  {
970
954
  label: "Card/widget radius",
971
955
  tooltip: "Corner radius for dashboard card frames and widget containers.",
972
- value: u.tokens.radius.card,
956
+ value: s.tokens.radius.card,
973
957
  min: 0,
974
958
  max: 12,
975
- onChange: (o) => g((a) => {
976
- H(a, "card", o);
959
+ onChange: (o) => l((t) => {
960
+ V(t, "card", o);
977
961
  })
978
962
  }
979
963
  ),
980
964
  /* @__PURE__ */ r(
981
- w,
965
+ N,
982
966
  {
983
967
  label: "Table radius",
984
968
  tooltip: "Corner radius for table containers, table chrome, and table pagination surfaces.",
985
- value: u.tokens.radius.table,
969
+ value: s.tokens.radius.table,
986
970
  min: 0,
987
971
  max: 12,
988
- onChange: (o) => g((a) => {
989
- H(a, "table", o);
972
+ onChange: (o) => l((t) => {
973
+ V(t, "table", o);
990
974
  })
991
975
  }
992
976
  )
@@ -995,53 +979,53 @@ function Er({
995
979
  }
996
980
  ),
997
981
  /* @__PURE__ */ r(
998
- N,
982
+ v,
999
983
  {
1000
- icon: ue,
984
+ icon: ie,
1001
985
  title: "Filters and Controls",
1002
986
  description: "Dashboard filter/control toolbar, chip states, menus, and settings panels.",
1003
987
  children: /* @__PURE__ */ d("div", { className: "grid grid-cols-2 gap-2", children: [
1004
988
  /* @__PURE__ */ r(
1005
- y,
989
+ k,
1006
990
  {
1007
991
  label: "Toolbar background",
1008
992
  tooltip: "Background color for the dashboard filter/control toolbar strip. This is separate from chip state colors.",
1009
- value: u.components.interactive.toolbarBackground || u.tokens.color.background,
1010
- onChange: (o) => g((a) => {
1011
- a.components.interactive.toolbarBackground = o;
993
+ value: s.components.interactive.toolbarBackground || s.tokens.color.background,
994
+ onChange: (o) => l((t) => {
995
+ t.components.interactive.toolbarBackground = o;
1012
996
  })
1013
997
  }
1014
998
  ),
1015
999
  /* @__PURE__ */ r(
1016
- y,
1000
+ k,
1017
1001
  {
1018
1002
  label: "Default state",
1019
1003
  tooltip: "Unselected filter/control chips plus the base surface for their menus, dialogs, and pagination fallback.",
1020
- value: u.components.interactive.background || u.tokens.color.card,
1021
- onChange: (o) => g((a) => {
1022
- a.components.interactive.background = o, a.components.pagination.background = o;
1004
+ value: s.components.interactive.background || s.tokens.color.card,
1005
+ onChange: (o) => l((t) => {
1006
+ t.components.interactive.background = o, t.components.pagination.background = o;
1023
1007
  })
1024
1008
  }
1025
1009
  ),
1026
1010
  /* @__PURE__ */ r(
1027
- y,
1011
+ k,
1028
1012
  {
1029
1013
  label: "Border",
1030
1014
  tooltip: "Border color for filter/control chips, runtime inputs, settings panels, and related popover chrome.",
1031
- value: u.components.interactive.borderColor || u.tokens.color.border,
1032
- onChange: (o) => g((a) => {
1033
- a.components.interactive.borderColor = o, a.components.pagination.borderColor = o;
1015
+ value: s.components.interactive.borderColor || s.tokens.color.border,
1016
+ onChange: (o) => l((t) => {
1017
+ t.components.interactive.borderColor = o, t.components.pagination.borderColor = o;
1034
1018
  })
1035
1019
  }
1036
1020
  ),
1037
1021
  /* @__PURE__ */ r(
1038
- y,
1022
+ k,
1039
1023
  {
1040
1024
  label: "Selected state",
1041
1025
  tooltip: "Selected filter/control chips and hover feedback. This keeps a lighter default state and a stronger selected state.",
1042
- value: u.tokens.color.accent,
1043
- onChange: (o) => g((a) => {
1044
- W(a, "accent", o);
1026
+ value: s.tokens.color.accent,
1027
+ onChange: (o) => l((t) => {
1028
+ U(t, "accent", o);
1045
1029
  })
1046
1030
  }
1047
1031
  )
@@ -1049,43 +1033,43 @@ function Er({
1049
1033
  }
1050
1034
  )
1051
1035
  ] }),
1052
- /* @__PURE__ */ d(M, { value: "data", className: "m-0 p-4", children: [
1036
+ /* @__PURE__ */ d($, { value: "data", className: "m-0 p-4", children: [
1053
1037
  /* @__PURE__ */ d(
1054
- N,
1038
+ v,
1055
1039
  {
1056
- icon: _e,
1040
+ icon: $e,
1057
1041
  title: "Charts",
1058
1042
  description: "Palette and semantic chart text/grid colors.",
1059
1043
  children: [
1060
1044
  /* @__PURE__ */ r("div", { className: "grid grid-cols-3 gap-2", children: cr.map((o) => /* @__PURE__ */ r(
1061
- y,
1045
+ k,
1062
1046
  {
1063
1047
  label: `Series ${o + 1}`,
1064
- value: u.components.chart.palette[o] || "#000000",
1065
- onChange: (a) => g((k) => {
1066
- k.components.chart.palette[o] = a;
1048
+ value: s.components.chart.palette[o] || "#000000",
1049
+ onChange: (t) => l((h) => {
1050
+ h.components.chart.palette[o] = t;
1067
1051
  })
1068
1052
  },
1069
1053
  o
1070
1054
  )) }),
1071
1055
  /* @__PURE__ */ d("div", { className: "grid grid-cols-2 gap-2", children: [
1072
1056
  /* @__PURE__ */ r(
1073
- y,
1057
+ k,
1074
1058
  {
1075
1059
  label: "Grid",
1076
- value: u.components.chart.gridColor,
1077
- onChange: (o) => g((a) => {
1078
- a.components.chart.gridColor = o;
1060
+ value: s.components.chart.gridColor,
1061
+ onChange: (o) => l((t) => {
1062
+ t.components.chart.gridColor = o;
1079
1063
  })
1080
1064
  }
1081
1065
  ),
1082
1066
  /* @__PURE__ */ r(
1083
- y,
1067
+ k,
1084
1068
  {
1085
1069
  label: "Axis",
1086
- value: u.components.chart.axisColor,
1087
- onChange: (o) => g((a) => {
1088
- a.components.chart.axisColor = o;
1070
+ value: s.components.chart.axisColor,
1071
+ onChange: (o) => l((t) => {
1072
+ t.components.chart.axisColor = o;
1089
1073
  })
1090
1074
  }
1091
1075
  )
@@ -1094,102 +1078,102 @@ function Er({
1094
1078
  }
1095
1079
  ),
1096
1080
  /* @__PURE__ */ d(
1097
- N,
1081
+ v,
1098
1082
  {
1099
- icon: Ue,
1083
+ icon: _e,
1100
1084
  title: "Tables",
1101
- description: "Flat, aggregate, and pivot tables share this V1 table appearance.",
1085
+ description: "All tables share this appearance.",
1102
1086
  children: [
1103
1087
  /* @__PURE__ */ d("div", { className: "grid grid-cols-2 gap-2", children: [
1104
1088
  /* @__PURE__ */ r(
1105
- q,
1089
+ W,
1106
1090
  {
1107
1091
  label: "Density",
1108
- value: u.components.table.density,
1092
+ value: s.components.table.density,
1109
1093
  options: [
1110
1094
  ["compact", "Compact"],
1111
1095
  ["comfortable", "Comfortable"],
1112
1096
  ["spacious", "Spacious"]
1113
1097
  ],
1114
- onChange: (o) => g((a) => {
1115
- a.components.table.density = o, p(a, "aggregateTable"), p(a, "pivotTable");
1098
+ onChange: (o) => l((t) => {
1099
+ t.components.table.density = o;
1116
1100
  })
1117
1101
  }
1118
1102
  ),
1119
1103
  /* @__PURE__ */ r(
1120
- q,
1104
+ W,
1121
1105
  {
1122
1106
  label: "Cell wrap",
1123
- value: u.components.table.cell.wrap,
1107
+ value: s.components.table.cell.wrap,
1124
1108
  options: [
1125
1109
  ["nowrap", "No wrap"],
1126
1110
  ["wrap", "Wrap"]
1127
1111
  ],
1128
- onChange: (o) => g((a) => {
1129
- a.components.table.cell.wrap = o, p(a, "aggregateTable"), p(a, "pivotTable");
1112
+ onChange: (o) => l((t) => {
1113
+ t.components.table.cell.wrap = o;
1130
1114
  })
1131
1115
  }
1132
1116
  )
1133
1117
  ] }),
1134
1118
  /* @__PURE__ */ d("div", { className: "grid grid-cols-2 gap-2", children: [
1135
1119
  /* @__PURE__ */ r(
1136
- y,
1120
+ k,
1137
1121
  {
1138
1122
  label: "Header",
1139
- value: u.components.table.header.background,
1140
- onChange: (o) => g((a) => {
1141
- a.components.table.header.background = o, p(a, "aggregateTable"), p(a, "pivotTable");
1123
+ value: s.components.table.header.background,
1124
+ onChange: (o) => l((t) => {
1125
+ t.components.table.header.background = o;
1142
1126
  })
1143
1127
  }
1144
1128
  ),
1145
1129
  /* @__PURE__ */ r(
1146
- y,
1130
+ k,
1147
1131
  {
1148
1132
  label: "Divider",
1149
- value: u.components.table.row.dividerColor,
1150
- onChange: (o) => g((a) => {
1151
- a.components.table.row.dividerColor = o, a.components.table.header.dividerColor = o, p(a, "aggregateTable"), p(a, "pivotTable");
1133
+ value: s.components.table.row.dividerColor,
1134
+ onChange: (o) => l((t) => {
1135
+ t.components.table.row.dividerColor = o, t.components.table.header.dividerColor = o;
1152
1136
  })
1153
1137
  }
1154
1138
  ),
1155
1139
  /* @__PURE__ */ r(
1156
- y,
1140
+ k,
1157
1141
  {
1158
1142
  label: "Selection",
1159
- value: u.tokens.color.selection,
1160
- onChange: (o) => g((a) => {
1161
- W(a, "selection", o);
1143
+ value: s.tokens.color.selection,
1144
+ onChange: (o) => l((t) => {
1145
+ U(t, "selection", o);
1162
1146
  })
1163
1147
  }
1164
1148
  )
1165
1149
  ] }),
1166
1150
  /* @__PURE__ */ r(
1167
- Z,
1151
+ H,
1168
1152
  {
1169
1153
  label: "Zebra rows",
1170
- checked: u.components.table.row.zebra,
1171
- onCheckedChange: (o) => g((a) => {
1172
- a.components.table.row.zebra = o, p(a, "aggregateTable"), p(a, "pivotTable");
1154
+ checked: s.components.table.row.zebra,
1155
+ onCheckedChange: (o) => l((t) => {
1156
+ t.components.table.row.zebra = o;
1173
1157
  })
1174
1158
  }
1175
1159
  ),
1176
1160
  /* @__PURE__ */ r(
1177
- Z,
1161
+ H,
1178
1162
  {
1179
1163
  label: "Sticky headers",
1180
- checked: u.components.table.header.sticky,
1181
- onCheckedChange: (o) => g((a) => {
1182
- a.components.table.header.sticky = o, p(a, "aggregateTable"), p(a, "pivotTable");
1164
+ checked: s.components.table.header.sticky,
1165
+ onCheckedChange: (o) => l((t) => {
1166
+ t.components.table.header.sticky = o;
1183
1167
  })
1184
1168
  }
1185
1169
  ),
1186
1170
  /* @__PURE__ */ r(
1187
- Z,
1171
+ H,
1188
1172
  {
1189
1173
  label: "Uppercase headers",
1190
- checked: u.components.table.header.uppercase,
1191
- onCheckedChange: (o) => g((a) => {
1192
- a.components.table.header.uppercase = o, p(a, "aggregateTable"), p(a, "pivotTable");
1174
+ checked: s.components.table.header.uppercase,
1175
+ onCheckedChange: (o) => l((t) => {
1176
+ t.components.table.header.uppercase = o;
1193
1177
  })
1194
1178
  }
1195
1179
  )
@@ -1203,46 +1187,46 @@ function Er({
1203
1187
  }
1204
1188
  );
1205
1189
  }
1206
- function N({
1190
+ function v({
1207
1191
  icon: e,
1208
- title: n,
1209
- description: t,
1192
+ title: a,
1193
+ description: n,
1210
1194
  children: c
1211
1195
  }) {
1212
1196
  return /* @__PURE__ */ d("section", { className: "mb-6 last:mb-0", children: [
1213
1197
  /* @__PURE__ */ d("div", { className: "mb-3 flex items-start gap-2", children: [
1214
1198
  /* @__PURE__ */ r("div", { className: "mt-0.5 flex h-5 w-5 items-center justify-center rounded-control border border-border/70", children: /* @__PURE__ */ r(e, { className: "h-3 w-3 text-muted-foreground" }) }),
1215
1199
  /* @__PURE__ */ d("div", { className: "min-w-0", children: [
1216
- /* @__PURE__ */ r("h3", { className: "text-[13px] font-semibold", children: n }),
1217
- /* @__PURE__ */ r("p", { className: "mt-0.5 text-[12px] leading-4 text-muted-foreground", children: t })
1200
+ /* @__PURE__ */ r("h3", { className: "text-[13px] font-semibold", children: a }),
1201
+ /* @__PURE__ */ r("p", { className: "mt-0.5 text-[12px] leading-4 text-muted-foreground", children: n })
1218
1202
  ] })
1219
1203
  ] }),
1220
1204
  /* @__PURE__ */ r("div", { className: "space-y-2", children: c }),
1221
- /* @__PURE__ */ r(Ve, { className: "mt-5 bg-border/60" })
1205
+ /* @__PURE__ */ r(Ue, { className: "mt-5 bg-border/60" })
1222
1206
  ] });
1223
1207
  }
1224
1208
  function sr({
1225
1209
  value: e,
1226
- onChange: n
1210
+ onChange: a
1227
1211
  }) {
1228
1212
  var c;
1229
- const t = (c = X.find((l) => l.value === e)) == null ? void 0 : c.id;
1213
+ const n = (c = M.find((i) => i.value === e)) == null ? void 0 : c.id;
1230
1214
  return /* @__PURE__ */ d("div", { children: [
1231
- /* @__PURE__ */ r(E, { className: "mb-1 block text-[11px] font-normal text-muted-foreground", children: "Font family" }),
1215
+ /* @__PURE__ */ r(T, { className: "mb-1 block text-[11px] font-normal text-muted-foreground", children: "Font family" }),
1232
1216
  /* @__PURE__ */ d("div", { className: "grid grid-cols-[minmax(0,1fr)_150px] gap-2", children: [
1233
1217
  /* @__PURE__ */ d(
1234
- ke,
1218
+ me,
1235
1219
  {
1236
- value: t,
1237
- onValueChange: (l) => {
1238
- const s = X.find(
1239
- (i) => i.id === l
1220
+ value: n,
1221
+ onValueChange: (i) => {
1222
+ const f = M.find(
1223
+ (g) => g.id === i
1240
1224
  );
1241
- s && n(s.value);
1225
+ f && a(f.value);
1242
1226
  },
1243
1227
  children: [
1244
- /* @__PURE__ */ r(xe, { size: "xs", "aria-label": "Font family preset", children: /* @__PURE__ */ r(ye, { placeholder: "Select font" }) }),
1245
- /* @__PURE__ */ r(ve, { children: X.map((l) => /* @__PURE__ */ r(Ce, { value: l.id, children: l.label }, l.id)) })
1228
+ /* @__PURE__ */ r(he, { size: "xs", "aria-label": "Font family preset", children: /* @__PURE__ */ r(ke, { placeholder: "Select font" }) }),
1229
+ /* @__PURE__ */ r(xe, { children: M.map((i) => /* @__PURE__ */ r(ye, { value: i.id, children: i.label }, i.id)) })
1246
1230
  ]
1247
1231
  }
1248
1232
  ),
@@ -1257,45 +1241,45 @@ function sr({
1257
1241
  ] })
1258
1242
  ] });
1259
1243
  }
1260
- function y({
1244
+ function k({
1261
1245
  label: e,
1262
- tooltip: n,
1263
- value: t,
1246
+ tooltip: a,
1247
+ value: n,
1264
1248
  onChange: c
1265
1249
  }) {
1266
- const [l, s] = m.useState(!1), [i, v] = m.useState(t), x = ur(t), S = t !== i, f = (b) => {
1267
- s(b), b && v(t);
1250
+ const [i, f] = b.useState(!1), [g, y] = b.useState(n), x = lr(n), w = n !== g, p = (u) => {
1251
+ f(u), u && y(n);
1268
1252
  };
1269
1253
  return /* @__PURE__ */ d("div", { className: "block", children: [
1270
1254
  /* @__PURE__ */ d("div", { className: "mb-1 flex items-center gap-1", children: [
1271
- /* @__PURE__ */ r(E, { className: "text-[11px] font-normal text-muted-foreground", children: e }),
1272
- n ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ d(Q, { children: [
1273
- /* @__PURE__ */ r(ee, { asChild: !0, children: /* @__PURE__ */ r(
1255
+ /* @__PURE__ */ r(T, { className: "text-[11px] font-normal text-muted-foreground", children: e }),
1256
+ a ? /* @__PURE__ */ r(X, { children: /* @__PURE__ */ d(Y, { children: [
1257
+ /* @__PURE__ */ r(q, { asChild: !0, children: /* @__PURE__ */ r(
1274
1258
  "button",
1275
1259
  {
1276
1260
  type: "button",
1277
1261
  "aria-label": `${e} details`,
1278
1262
  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",
1279
- children: /* @__PURE__ */ r(he, { className: "h-3 w-3" })
1263
+ children: /* @__PURE__ */ r(fe, { className: "h-3 w-3" })
1280
1264
  }
1281
1265
  ) }),
1282
- /* @__PURE__ */ r(re, { side: "top", className: "max-w-64", children: n })
1266
+ /* @__PURE__ */ r(Z, { side: "top", className: "max-w-64", children: a })
1283
1267
  ] }) }) : null
1284
1268
  ] }),
1285
1269
  /* @__PURE__ */ d("div", { className: "flex h-7 items-center overflow-hidden rounded-control border border-input bg-background", children: [
1286
- /* @__PURE__ */ d(ge, { open: l, onOpenChange: f, children: [
1287
- /* @__PURE__ */ r(be, { asChild: !0, children: /* @__PURE__ */ r(
1270
+ /* @__PURE__ */ d(ue, { open: i, onOpenChange: p, children: [
1271
+ /* @__PURE__ */ r(pe, { asChild: !0, children: /* @__PURE__ */ r(
1288
1272
  "button",
1289
1273
  {
1290
1274
  type: "button",
1291
1275
  "aria-label": `Open ${e} color picker`,
1292
1276
  className: "ml-1 flex h-5 w-5 shrink-0 items-center justify-center rounded-control border border-border/70",
1293
- style: { backgroundColor: t },
1277
+ style: { backgroundColor: n },
1294
1278
  children: /* @__PURE__ */ r("span", { className: "sr-only", children: e })
1295
1279
  }
1296
1280
  ) }),
1297
1281
  /* @__PURE__ */ d(
1298
- fe,
1282
+ be,
1299
1283
  {
1300
1284
  align: "start",
1301
1285
  sideOffset: 6,
@@ -1306,7 +1290,7 @@ function y({
1306
1290
  "label",
1307
1291
  {
1308
1292
  className: "relative flex h-16 w-16 shrink-0 cursor-pointer items-center justify-center overflow-hidden rounded-control border border-border/70",
1309
- style: { backgroundColor: t },
1293
+ style: { backgroundColor: n },
1310
1294
  children: [
1311
1295
  /* @__PURE__ */ r(
1312
1296
  "input",
@@ -1314,176 +1298,175 @@ function y({
1314
1298
  "aria-label": `${e} native color picker`,
1315
1299
  type: "color",
1316
1300
  value: x,
1317
- onChange: (b) => c(b.target.value),
1301
+ onChange: (u) => c(u.target.value),
1318
1302
  className: "absolute inset-0 h-full w-full cursor-pointer opacity-0"
1319
1303
  }
1320
1304
  ),
1321
- /* @__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" }) })
1305
+ /* @__PURE__ */ r("span", { className: "rounded-control bg-black/45 p-1 text-white shadow-sm", children: /* @__PURE__ */ r(or, { className: "h-3.5 w-3.5" }) })
1322
1306
  ]
1323
1307
  }
1324
1308
  ),
1325
1309
  /* @__PURE__ */ d("div", { className: "min-w-0 flex-1", children: [
1326
1310
  /* @__PURE__ */ d("div", { className: "mb-1 flex items-center justify-between gap-2", children: [
1327
- /* @__PURE__ */ r(E, { className: "block text-[11px] font-normal text-muted-foreground", children: "Color value" }),
1328
- /* @__PURE__ */ r(K, { children: /* @__PURE__ */ d(Q, { children: [
1329
- /* @__PURE__ */ r(ee, { asChild: !0, children: /* @__PURE__ */ r(
1311
+ /* @__PURE__ */ r(T, { className: "block text-[11px] font-normal text-muted-foreground", children: "Color value" }),
1312
+ /* @__PURE__ */ r(X, { children: /* @__PURE__ */ d(Y, { children: [
1313
+ /* @__PURE__ */ r(q, { asChild: !0, children: /* @__PURE__ */ r(
1330
1314
  "button",
1331
1315
  {
1332
1316
  type: "button",
1333
1317
  "aria-label": `Reset ${e} color to previous value`,
1334
- disabled: !S,
1318
+ disabled: !w,
1335
1319
  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",
1336
- onClick: () => c(i),
1337
- children: /* @__PURE__ */ r(me, { className: "h-3 w-3" })
1320
+ onClick: () => c(g),
1321
+ children: /* @__PURE__ */ r(ge, { className: "h-3 w-3" })
1338
1322
  }
1339
1323
  ) }),
1340
- /* @__PURE__ */ r(re, { side: "top", children: "Reset to previous value" })
1324
+ /* @__PURE__ */ r(Z, { side: "top", children: "Reset to previous value" })
1341
1325
  ] }) })
1342
1326
  ] }),
1343
1327
  /* @__PURE__ */ r(
1344
- oe,
1328
+ K,
1345
1329
  {
1346
1330
  size: "xs",
1347
1331
  "aria-label": `${e} popover color value`,
1348
- value: t,
1349
- onChange: (b) => c(b.target.value),
1332
+ value: n,
1333
+ onChange: (u) => c(u.target.value),
1350
1334
  className: "font-mono"
1351
1335
  }
1352
1336
  )
1353
1337
  ] })
1354
1338
  ] }),
1355
- /* @__PURE__ */ r("div", { className: "mt-2 grid grid-cols-6 gap-1", children: lr.map((b) => /* @__PURE__ */ r(
1339
+ /* @__PURE__ */ r("div", { className: "mt-2 grid grid-cols-6 gap-1", children: ir.map((u) => /* @__PURE__ */ r(
1356
1340
  "button",
1357
1341
  {
1358
1342
  type: "button",
1359
- "aria-label": `Set ${e} to ${b}`,
1360
- className: ae(
1343
+ "aria-label": `Set ${e} to ${u}`,
1344
+ className: Q(
1361
1345
  "h-6 rounded-control border border-border/70 shadow-sm",
1362
- t.toLowerCase() === b && "ring-2 ring-ring"
1346
+ n.toLowerCase() === u && "ring-2 ring-ring"
1363
1347
  ),
1364
- style: { backgroundColor: b },
1365
- onClick: () => c(b)
1348
+ style: { backgroundColor: u },
1349
+ onClick: () => c(u)
1366
1350
  },
1367
- b
1351
+ u
1368
1352
  )) })
1369
1353
  ]
1370
1354
  }
1371
1355
  )
1372
1356
  ] }),
1373
1357
  /* @__PURE__ */ r(
1374
- oe,
1358
+ K,
1375
1359
  {
1376
1360
  size: "xs",
1377
1361
  "aria-label": `${e} color value`,
1378
- value: t,
1379
- onChange: (b) => c(b.target.value),
1362
+ value: n,
1363
+ onChange: (u) => c(u.target.value),
1380
1364
  className: "h-full border-0 px-2 font-mono shadow-none focus-visible:border-0"
1381
1365
  }
1382
1366
  )
1383
1367
  ] })
1384
1368
  ] });
1385
1369
  }
1386
- function ur(e) {
1387
- const n = We(e);
1388
- return n ? `#${Y(n.r)}${Y(n.g)}${Y(n.b)}` : "#000000";
1370
+ function lr(e) {
1371
+ const a = Ge(e);
1372
+ return a ? `#${G(a.r)}${G(a.g)}${G(a.b)}` : "#000000";
1389
1373
  }
1390
- function Y(e) {
1374
+ function G(e) {
1391
1375
  return Math.round(e).toString(16).padStart(2, "0");
1392
1376
  }
1393
- function w({
1377
+ function N({
1394
1378
  label: e,
1395
- tooltip: n,
1396
- value: t,
1379
+ tooltip: a,
1380
+ value: n,
1397
1381
  min: c,
1398
- max: l,
1399
- onChange: s
1382
+ max: i,
1383
+ onChange: f
1400
1384
  }) {
1401
- const i = m.useId();
1385
+ const g = b.useId();
1402
1386
  return /* @__PURE__ */ d("div", { className: "block", children: [
1403
1387
  /* @__PURE__ */ d("div", { className: "mb-1 flex items-center gap-1", children: [
1404
1388
  /* @__PURE__ */ r(
1405
- E,
1389
+ T,
1406
1390
  {
1407
- htmlFor: i,
1391
+ htmlFor: g,
1408
1392
  className: "text-[11px] font-normal text-muted-foreground",
1409
1393
  children: e
1410
1394
  }
1411
1395
  ),
1412
- n ? /* @__PURE__ */ r(K, { children: /* @__PURE__ */ d(Q, { children: [
1413
- /* @__PURE__ */ r(ee, { asChild: !0, children: /* @__PURE__ */ r(
1396
+ a ? /* @__PURE__ */ r(X, { children: /* @__PURE__ */ d(Y, { children: [
1397
+ /* @__PURE__ */ r(q, { asChild: !0, children: /* @__PURE__ */ r(
1414
1398
  "button",
1415
1399
  {
1416
1400
  type: "button",
1417
1401
  "aria-label": `${e} details`,
1418
1402
  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",
1419
- children: /* @__PURE__ */ r(he, { className: "h-3 w-3" })
1403
+ children: /* @__PURE__ */ r(fe, { className: "h-3 w-3" })
1420
1404
  }
1421
1405
  ) }),
1422
- /* @__PURE__ */ r(re, { side: "top", className: "max-w-56", children: n })
1406
+ /* @__PURE__ */ r(Z, { side: "top", className: "max-w-56", children: a })
1423
1407
  ] }) }) : null
1424
1408
  ] }),
1425
1409
  /* @__PURE__ */ r(
1426
- oe,
1410
+ K,
1427
1411
  {
1428
- id: i,
1412
+ id: g,
1429
1413
  size: "xs",
1430
1414
  type: "number",
1431
1415
  min: c,
1432
- max: l,
1433
- value: t,
1434
- onChange: (v) => {
1435
- const x = Number(v.target.value);
1436
- Number.isNaN(x) || s(x);
1416
+ max: i,
1417
+ value: n,
1418
+ onChange: (y) => {
1419
+ const x = Number(y.target.value);
1420
+ Number.isNaN(x) || f(x);
1437
1421
  }
1438
1422
  }
1439
1423
  )
1440
1424
  ] });
1441
1425
  }
1442
- function q({
1426
+ function W({
1443
1427
  label: e,
1444
- value: n,
1445
- options: t,
1428
+ value: a,
1429
+ options: n,
1446
1430
  onChange: c
1447
1431
  }) {
1448
1432
  return /* @__PURE__ */ d("div", { children: [
1449
- /* @__PURE__ */ r(E, { className: "mb-1 block text-[11px] font-normal text-muted-foreground", children: e }),
1450
- /* @__PURE__ */ d(ke, { value: n, onValueChange: c, children: [
1451
- /* @__PURE__ */ r(xe, { size: "xs", children: /* @__PURE__ */ r(ye, {}) }),
1452
- /* @__PURE__ */ r(ve, { children: t.map(([l, s]) => /* @__PURE__ */ r(Ce, { value: l, children: s }, l)) })
1433
+ /* @__PURE__ */ r(T, { className: "mb-1 block text-[11px] font-normal text-muted-foreground", children: e }),
1434
+ /* @__PURE__ */ d(me, { value: a, onValueChange: c, children: [
1435
+ /* @__PURE__ */ r(he, { size: "xs", children: /* @__PURE__ */ r(ke, {}) }),
1436
+ /* @__PURE__ */ r(xe, { children: n.map(([i, f]) => /* @__PURE__ */ r(ye, { value: i, children: f }, i)) })
1453
1437
  ] })
1454
1438
  ] });
1455
1439
  }
1456
- function Z({
1440
+ function H({
1457
1441
  label: e,
1458
- checked: n,
1459
- onCheckedChange: t
1442
+ checked: a,
1443
+ onCheckedChange: n
1460
1444
  }) {
1461
1445
  return /* @__PURE__ */ d("div", { className: "flex h-8 items-center justify-between rounded-control border border-border/60 px-2", children: [
1462
1446
  /* @__PURE__ */ r("span", { className: "text-[12px]", children: e }),
1463
- /* @__PURE__ */ r(Me, { size: "xs", checked: n, onCheckedChange: t })
1447
+ /* @__PURE__ */ r(Ve, { size: "xs", checked: a, onCheckedChange: n })
1464
1448
  ] });
1465
1449
  }
1466
- function pr(e) {
1467
- const n = `${Number((e / 16).toFixed(4))}rem`;
1450
+ function ur(e) {
1451
+ const a = `${Number((e / 16).toFixed(4))}rem`;
1468
1452
  return {
1469
- "--semaphor-radius": n,
1470
- "--semaphor-control-radius": n
1453
+ "--semaphor-radius": a,
1454
+ "--semaphor-control-radius": a
1471
1455
  };
1472
1456
  }
1473
- function gr(e) {
1457
+ function pr(e) {
1474
1458
  return JSON.parse(JSON.stringify(e));
1475
1459
  }
1476
1460
  function br(e) {
1477
- return typeof e.text == "function" ? e.text() : new Promise((n, t) => {
1461
+ return typeof e.text == "function" ? e.text() : new Promise((a, n) => {
1478
1462
  const c = new FileReader();
1479
- c.onload = () => n(String(c.result ?? "")), c.onerror = () => t(c.error ?? new Error("Unable to read file")), c.readAsText(e);
1463
+ c.onload = () => a(String(c.result ?? "")), c.onerror = () => n(c.error ?? new Error("Unable to read file")), c.readAsText(e);
1480
1464
  });
1481
1465
  }
1482
1466
  export {
1483
- Ne as BRAND_STUDIO_PRESETS,
1484
- Er as BrandStudioEditor,
1485
- tr as applyBrandStudioPreset,
1486
- L as buildAppearanceSpecFromDraft,
1487
- J as createBrandStudioDraft,
1488
- p as mirrorTableAppearance
1467
+ Ce as BRAND_STUDIO_PRESETS,
1468
+ Ar as BrandStudioEditor,
1469
+ nr as applyBrandStudioPreset,
1470
+ j as buildAppearanceSpecFromDraft,
1471
+ D as createBrandStudioDraft
1489
1472
  };