react-semaphor 0.1.555 → 0.1.557

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