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.
- package/DATA_APP_SDK.md +6 -29
- package/dist/analytics-protocol/index.js +20 -21
- package/dist/assistant-context/index.js +1 -1
- package/dist/assistant-protocol/index.js +5 -5
- package/dist/brand-studio/index.js +426 -444
- package/dist/briefings/index.js +56 -57
- package/dist/chunks/{analytics-base-schemas-BKs3flFS.js → analytics-base-schemas-BUFUoO6G.js} +2 -2
- package/dist/chunks/{assistant-chat-8NZP6m-u.js → assistant-chat-WMTpYirZ.js} +79 -81
- package/dist/chunks/{bookmark-state-BAeGKd3s.js → bookmark-state-PjQpxbG7.js} +3 -3
- package/dist/chunks/{braces-o9UiRQes.js → braces-BOErQVyi.js} +1 -1
- package/dist/chunks/comparison-window-caption-Dc7BaCMz.js +1218 -0
- package/dist/chunks/{context-BerEBuFR.js → context-DVy4HOU0.js} +1 -1
- package/dist/chunks/{custom-visual-inputs-Gw-Ggg3O.js → custom-visual-inputs-CxYI-gFa.js} +31 -33
- package/dist/chunks/{dashboard-Ds68ckO3.js → dashboard-4D8Vy4pL.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-DlTr-VGc.js → dashboard-briefing-launcher-C4EmOfxs.js} +149 -151
- package/dist/chunks/{dashboard-controls-oNXJZN6x.js → dashboard-controls-DBWykmvL.js} +171 -173
- package/dist/chunks/{dashboard-json-CW7Q_efH.js → dashboard-json-DiX-p0F7.js} +21 -22
- package/dist/chunks/{document-dashboard-inputs-C21mL3ib.js → document-dashboard-inputs-DP5hquBR.js} +32 -32
- package/dist/chunks/{edit-dashboard-visual-BnnT_oKR.js → edit-dashboard-visual-n1jLV_7V.js} +5842 -5955
- package/dist/chunks/{filter-reach-copy-DlNPHbE-.js → filter-reach-copy-BB9iakLA.js} +915 -986
- package/dist/chunks/{filter-value-text-DMrpj4h9.js → filter-value-text-CUBpotVN.js} +5 -5
- package/dist/chunks/{global-date-filter-utils-7OboTgrM.js → global-date-filter-utils-Cc5tqkoW.js} +2908 -3112
- package/dist/chunks/{index-B2k6KtUN.js → index-CgjhzkKM.js} +72 -80
- package/dist/chunks/{index-CtoK1Lgu.js → index-dIV-Gdsb.js} +159 -161
- package/dist/chunks/{layout-grid-Bgzth8vd.js → layout-grid-CcNklCwL.js} +1 -1
- package/dist/chunks/{list-filter-DsaTbM3J.js → list-filter-Ds_4UTpD.js} +1 -1
- package/dist/chunks/{matrix-analytical-definition-DPVGg1mU.js → matrix-analytical-definition-4GTUDheD.js} +22 -22
- package/dist/chunks/{matrix-card-D9bsdAye.js → matrix-card-fS_4O7zA.js} +3 -3
- package/dist/chunks/{matrix-member-presentation-DRWcJ8Mi.js → matrix-member-presentation-Dj7HaAHC.js} +1 -1
- package/dist/chunks/{matrix-operation-contract--lMaLlpV.js → matrix-operation-contract-CpgLZ7E5.js} +52 -52
- package/dist/chunks/{metric-comparison-CYIt2F5X.js → metric-comparison-C8LY7GG5.js} +4 -4
- package/dist/chunks/{model-change-B0rAK-5w.js → model-change-CJEj3ZD6.js} +1 -1
- package/dist/chunks/{palette-D10o_yYX.js → palette-DMkIhagj.js} +1 -1
- package/dist/chunks/{matrix-formatter-K2OVPJQI.js → pivot-result-contract-expectations-DMk-mKhG.js} +451 -402
- package/dist/chunks/pivot-result-identity-CrQ54Xbj.js +77 -0
- package/dist/chunks/{raw-temporal-presentation-CivONfcO.js → raw-temporal-presentation-DdEpgPRB.js} +25 -26
- package/dist/chunks/report-preferences-dialog-CFg5VFLk.js +2109 -0
- package/dist/chunks/{report-runtime-context-BaIKSaja.js → report-runtime-context-CohdtiMg.js} +2 -2
- package/dist/chunks/{resolve-dashboard-input-context-CIm9A8_j.js → resolve-dashboard-input-context-Djl3kCFL.js} +1396 -1550
- package/dist/chunks/{save-CfJpQQ68.js → save-D1EpMcwT.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-akb9JfOL.js → saved-dashboard-context-umlQFevH.js} +9 -9
- package/dist/chunks/selection-reducer-_d6aKJnj.js +46 -0
- package/dist/chunks/{semaphor-ready-indicator-Ba7dwP5_.js → semaphor-ready-indicator-4cOp6sla.js} +54479 -63899
- package/dist/chunks/{shelf-drop-preview-context-5rg3pJHW.js → shelf-drop-preview-context-DAtRuvR7.js} +7 -7
- package/dist/chunks/{source-entity-resolution-CGymm5td.js → source-entity-resolution-DXW1HpKf.js} +1 -1
- package/dist/chunks/{switch-B-UTI6v-.js → switch-9CJt5EF_.js} +1431 -1342
- package/dist/chunks/{table-export-sheet-CgO6gaSM.js → table-export-sheet-CTCTA_bd.js} +1 -1
- package/dist/chunks/{table-settings-DOT_Bv1m.js → table-settings-DF1gdVQR.js} +3 -3
- package/dist/chunks/temporal-input-presentation-DoSniQj1.js +2939 -0
- package/dist/chunks/{token-types-DYECHYGH.js → token-types-DFyLflLY.js} +1 -1
- package/dist/chunks/{upload-BFX7apKV.js → upload-LSNKpt0w.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-BHNs0wl7.js → use-create-flow-overlay-state-esyMT9vU.js} +125 -127
- package/dist/chunks/{validators-ClKLGDGZ.js → validators-hmfNNQz8.js} +305 -307
- package/dist/chunks/zoned-wall-clock-E35Frf9v.js +191 -0
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +168 -169
- package/dist/data-app-sdk/index.js +789 -4154
- package/dist/data-app-sdk-adapters/index.js +3 -3
- package/dist/data-app-sdk-validation/index.js +6 -6
- package/dist/format-utils/index.js +234 -253
- package/dist/index.js +233 -235
- package/dist/layouts/index.js +1 -1
- package/dist/pdf-export-policy/index.js +9 -11
- package/dist/report-runtime-context/index.js +2 -2
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/brand-studio/brand-studio-draft.d.ts +0 -3
- package/dist/types/brand-studio/index.d.ts +1 -1
- package/dist/types/components/visual/data-table/types/data-table.d.ts +0 -1
- package/dist/types/components/visual/shared/utils/table-column-order.d.ts +0 -6
- package/dist/types/data-app-sdk/contracts.d.ts +0 -146
- package/dist/types/data-app-sdk/index.d.ts +0 -2
- package/dist/types/index.js +27 -28
- package/dist/types/lib/api/exports-api.d.ts +1 -1
- package/dist/types/lib/charts/table-chart-types.d.ts +1 -1
- package/dist/types/lib/charts/types.d.ts +2 -2
- package/dist/types/lib/dashboard-viewer/export-table-view.d.ts +0 -3
- package/dist/types/lib/document/document-edits.d.ts +1 -1
- package/dist/types/lib/document/document-section-kinds.d.ts +2 -4
- package/dist/types/lib/document/document-table-data-policy.d.ts +1 -2
- package/dist/types/lib/formatters/grouped-temporal-activation.d.ts +3 -3
- package/dist/types/lib/formatters/grouped-temporal-presentation.d.ts +0 -6
- package/dist/types/lib/query-context/card-server-request.d.ts +0 -1
- package/dist/types/lib/table-formatting/table-formatting-types.d.ts +1 -1
- package/dist/types/lib/types/common-types.d.ts +0 -7
- package/dist/types/lib/types/explorer-types.d.ts +1 -14
- package/dist/types/lib/utils/card-config-utils.d.ts +11 -1
- package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +1 -2
- package/dist/types/shared/dashboard-authoring/filter-model/filter-definitions.d.ts +1 -7
- package/dist/types/shared/dashboard-authoring/legacy-table-routing.d.ts +9 -4
- package/dist/types/shared/format-utils/grouped-table-presentation.d.ts +0 -14
- package/dist/types/shared/format-utils/index.d.ts +0 -2
- package/dist/types/shared/format-utils/pdf-export-policy.d.ts +1 -1
- package/dist/types/shared/format-utils/pivot-result-contract-expectations.d.ts +2 -20
- package/dist/types/shared/format-utils/pivot-result-identity.d.ts +0 -20
- package/dist/types/shared/format-utils/table-export/prepare-table-export.d.ts +0 -1
- package/dist/types/shared/format-utils/table-export/table-export-result.d.ts +0 -4
- package/package.json +2 -4
- package/src/data-app-sdk/README.md +7 -31
- package/dist/chunks/comparison-window-caption-C2WNTlxK.js +0 -1433
- package/dist/chunks/pivot-header-presentation-CX4fkRuG.js +0 -42
- package/dist/chunks/pivot-result-identity-BHJGZwIc.js +0 -94
- package/dist/chunks/pivot-result-lifecycle-BygCpOhk.js +0 -1238
- package/dist/chunks/raw-temporal-contract-WuXA8jBP.js +0 -64
- package/dist/chunks/report-preferences-dialog-D_KyuEFx.js +0 -2261
- package/dist/chunks/selection-reducer-yw_JgICP.js +0 -111
- package/dist/chunks/temporal-bucket-C4rqmwaQ.js +0 -2071
- package/dist/chunks/x-4f5U2XwU.js +0 -100
- package/dist/chunks/zoned-wall-clock-MulfA26h.js +0 -129
- package/dist/types/components/visual/pivot-table/types.d.ts +0 -80
- package/dist/types/data-app-sdk/devtools/index.d.ts +0 -49
- package/dist/types/data-app-sdk/devtools.d.ts +0 -1
- package/dist/types/shared/format-utils/aggregate-table-row-presentation.d.ts +0 -85
- 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
|
|
2
|
-
import
|
|
3
|
-
import { P as
|
|
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-
|
|
7
|
-
import "../chunks/matrix-operation-contract
|
|
8
|
-
import "../chunks/analytics-base-schemas-
|
|
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
|
|
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
|
|
14
|
-
import { B as qe } from "../chunks/braces-
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
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
|
|
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
|
|
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
|
|
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
|
-
]),
|
|
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
|
|
217
|
-
const
|
|
215
|
+
function D(e) {
|
|
216
|
+
const a = He({
|
|
218
217
|
organizationAppearance: e ?? void 0
|
|
219
218
|
});
|
|
220
|
-
return
|
|
221
|
-
|
|
219
|
+
return ar(
|
|
220
|
+
tr(re(a))
|
|
222
221
|
);
|
|
223
222
|
}
|
|
224
|
-
function
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
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
|
|
237
|
-
const
|
|
231
|
+
function j(e) {
|
|
232
|
+
const a = re({
|
|
238
233
|
version: Ye,
|
|
239
234
|
mode: e.mode,
|
|
240
235
|
schemes: e.schemes
|
|
241
|
-
}),
|
|
242
|
-
if (!
|
|
243
|
-
const c =
|
|
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
|
|
243
|
+
return n.value;
|
|
249
244
|
}
|
|
250
|
-
function
|
|
251
|
-
const
|
|
252
|
-
if (!
|
|
245
|
+
function nr(e, a) {
|
|
246
|
+
const n = Ce.find((i) => i.id === a);
|
|
247
|
+
if (!n)
|
|
253
248
|
return e;
|
|
254
|
-
const c =
|
|
255
|
-
return
|
|
249
|
+
const c = re(e);
|
|
250
|
+
return se(c.schemes.light, n.light), se(c.schemes.dark, n.dark), c;
|
|
256
251
|
}
|
|
257
|
-
function
|
|
258
|
-
e.tokens.color.background =
|
|
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
|
|
261
|
-
e.
|
|
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 =
|
|
258
|
+
e.components.dashboard.background = n, e.components.interactive.toolbarBackground = n;
|
|
267
259
|
break;
|
|
268
260
|
case "foreground":
|
|
269
|
-
e.components.dashboard.foreground =
|
|
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 =
|
|
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 =
|
|
267
|
+
e.components.card.foreground = n;
|
|
276
268
|
break;
|
|
277
269
|
case "muted":
|
|
278
|
-
e.components.table.header.background =
|
|
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 =
|
|
273
|
+
e.components.table.header.foreground = n, e.components.chart.axisColor = n;
|
|
282
274
|
break;
|
|
283
275
|
case "border":
|
|
284
|
-
e.tokens.color.input =
|
|
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 =
|
|
279
|
+
e.components.table.row.hoverBackground = n;
|
|
288
280
|
break;
|
|
289
281
|
}
|
|
290
282
|
}
|
|
291
|
-
function
|
|
292
|
-
switch (e.tokens.radius[
|
|
283
|
+
function V(e, a, n) {
|
|
284
|
+
switch (e.tokens.radius[a] = n, a) {
|
|
293
285
|
case "control":
|
|
294
|
-
e.components.interactive.borderRadius =
|
|
286
|
+
e.components.interactive.borderRadius = n, e.components.pagination.borderRadius = n;
|
|
295
287
|
break;
|
|
296
288
|
case "card":
|
|
297
|
-
e.components.card.borderRadius =
|
|
289
|
+
e.components.card.borderRadius = n;
|
|
298
290
|
break;
|
|
299
291
|
case "table":
|
|
300
|
-
e.components.table.container.borderRadius =
|
|
292
|
+
e.components.table.container.borderRadius = n;
|
|
301
293
|
break;
|
|
302
294
|
}
|
|
303
295
|
}
|
|
304
|
-
function
|
|
305
|
-
|
|
306
|
-
|
|
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
|
-
|
|
315
|
-
const
|
|
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
|
-
|
|
322
|
-
const
|
|
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
|
-
|
|
331
|
-
const
|
|
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
|
-
|
|
337
|
-
const
|
|
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:
|
|
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:
|
|
349
|
-
padding:
|
|
350
|
-
shadow:
|
|
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:
|
|
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:
|
|
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:
|
|
362
|
+
borderRadius: c.radius.control
|
|
374
363
|
}
|
|
375
364
|
};
|
|
376
|
-
|
|
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
|
-
|
|
385
|
-
...
|
|
386
|
-
...
|
|
387
|
-
}
|
|
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
|
|
380
|
+
function le(e, a) {
|
|
398
381
|
return {
|
|
399
|
-
density:
|
|
382
|
+
density: a.typography.density,
|
|
400
383
|
container: {
|
|
401
384
|
background: e.card,
|
|
402
385
|
borderColor: e.border,
|
|
403
|
-
borderRadius:
|
|
404
|
-
shadow:
|
|
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:
|
|
423
|
-
paddingY:
|
|
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
|
|
428
|
+
function re(e) {
|
|
446
429
|
return JSON.parse(JSON.stringify(e));
|
|
447
430
|
}
|
|
448
|
-
const
|
|
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],
|
|
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
|
|
461
|
+
function Rr({
|
|
479
462
|
appearance: e,
|
|
480
|
-
previewTitle:
|
|
481
|
-
isLoading:
|
|
463
|
+
previewTitle: a,
|
|
464
|
+
isLoading: n = !1,
|
|
482
465
|
isSaving: c = !1,
|
|
483
|
-
error:
|
|
484
|
-
className:
|
|
485
|
-
onDraftChange:
|
|
486
|
-
onSave:
|
|
466
|
+
error: i = null,
|
|
467
|
+
className: f,
|
|
468
|
+
onDraftChange: g,
|
|
469
|
+
onSave: y,
|
|
487
470
|
onClearConfig: x,
|
|
488
|
-
onCancel:
|
|
471
|
+
onCancel: w
|
|
489
472
|
}) {
|
|
490
|
-
const [
|
|
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
|
-
), [
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
}, [
|
|
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
|
-
|
|
480
|
+
P.current = !0, u(null);
|
|
498
481
|
return;
|
|
499
482
|
}
|
|
500
|
-
const o =
|
|
501
|
-
|
|
502
|
-
}, [e]),
|
|
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 (
|
|
505
|
-
if (
|
|
506
|
-
|
|
487
|
+
if (p) {
|
|
488
|
+
if (P.current) {
|
|
489
|
+
P.current = !1;
|
|
507
490
|
return;
|
|
508
491
|
}
|
|
509
492
|
try {
|
|
510
|
-
const
|
|
511
|
-
(o =
|
|
512
|
-
} catch (
|
|
513
|
-
|
|
514
|
-
|
|
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
|
-
}, [
|
|
519
|
-
const
|
|
520
|
-
() =>
|
|
521
|
-
[
|
|
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
|
-
|
|
524
|
-
if (!
|
|
525
|
-
const
|
|
526
|
-
return o(
|
|
506
|
+
u((t) => {
|
|
507
|
+
if (!t) return t;
|
|
508
|
+
const h = pr(t);
|
|
509
|
+
return o(h), h;
|
|
527
510
|
});
|
|
528
|
-
},
|
|
529
|
-
Fe((
|
|
530
|
-
o(
|
|
511
|
+
}, l = (o) => {
|
|
512
|
+
Fe((t) => {
|
|
513
|
+
o(t.schemes[B]);
|
|
531
514
|
});
|
|
532
515
|
}, Pe = async () => {
|
|
533
|
-
if (!
|
|
516
|
+
if (!p || !y) return;
|
|
534
517
|
let o;
|
|
535
518
|
try {
|
|
536
|
-
o =
|
|
537
|
-
} catch (
|
|
538
|
-
|
|
539
|
-
|
|
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
|
-
|
|
526
|
+
R(!0);
|
|
544
527
|
try {
|
|
545
|
-
await
|
|
528
|
+
await y(o);
|
|
546
529
|
} finally {
|
|
547
|
-
|
|
530
|
+
R(!1);
|
|
548
531
|
}
|
|
549
|
-
},
|
|
550
|
-
const o =
|
|
551
|
-
|
|
552
|
-
},
|
|
532
|
+
}, Te = () => {
|
|
533
|
+
const o = D(null);
|
|
534
|
+
F("idle"), u(o);
|
|
535
|
+
}, Be = async () => {
|
|
553
536
|
if (x) {
|
|
554
|
-
|
|
537
|
+
R(!0), m(null), F("idle");
|
|
555
538
|
try {
|
|
556
|
-
await x(),
|
|
539
|
+
await x(), P.current = !0, u(D(null)), O("light");
|
|
557
540
|
} catch (o) {
|
|
558
|
-
|
|
541
|
+
m(
|
|
559
542
|
o instanceof Error ? o.message : "Unable to clear organization appearance"
|
|
560
543
|
);
|
|
561
544
|
} finally {
|
|
562
|
-
|
|
545
|
+
R(!1);
|
|
563
546
|
}
|
|
564
547
|
}
|
|
565
|
-
},
|
|
566
|
-
if (
|
|
548
|
+
}, ne = b.useCallback(() => p ? JSON.stringify(j(p), null, 2) : "", [p]), Oe = (o) => {
|
|
549
|
+
if (we(o), o)
|
|
567
550
|
try {
|
|
568
|
-
|
|
569
|
-
} catch (
|
|
570
|
-
|
|
571
|
-
|
|
551
|
+
I(ne()), m(null);
|
|
552
|
+
} catch (t) {
|
|
553
|
+
m(
|
|
554
|
+
t instanceof Error ? t.message : "Appearance is invalid"
|
|
572
555
|
);
|
|
573
556
|
}
|
|
574
|
-
},
|
|
575
|
-
if (
|
|
557
|
+
}, Re = async () => {
|
|
558
|
+
if (p)
|
|
576
559
|
try {
|
|
577
|
-
const o =
|
|
578
|
-
await navigator.clipboard.writeText(o),
|
|
560
|
+
const o = oe && A ? A : ne();
|
|
561
|
+
await navigator.clipboard.writeText(o), m(null), F("copied");
|
|
579
562
|
} catch (o) {
|
|
580
|
-
|
|
563
|
+
m(
|
|
581
564
|
o instanceof Error ? o.message : "Unable to copy brand spec"
|
|
582
565
|
);
|
|
583
566
|
}
|
|
584
|
-
},
|
|
585
|
-
const
|
|
586
|
-
|
|
587
|
-
},
|
|
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
|
-
|
|
572
|
+
te(A);
|
|
590
573
|
} catch (o) {
|
|
591
|
-
|
|
574
|
+
m(
|
|
592
575
|
o instanceof Error ? o.message : "Brand spec must be valid JSON"
|
|
593
576
|
);
|
|
594
577
|
}
|
|
595
|
-
},
|
|
596
|
-
var
|
|
597
|
-
const
|
|
598
|
-
if (o.target.value = "", !!
|
|
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
|
-
|
|
601
|
-
} catch (
|
|
602
|
-
|
|
603
|
-
|
|
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:
|
|
593
|
+
className: Q(
|
|
611
594
|
"flex min-h-0 flex-1 flex-col bg-background text-foreground",
|
|
612
|
-
|
|
595
|
+
f
|
|
613
596
|
),
|
|
614
|
-
style:
|
|
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(
|
|
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
|
-
|
|
605
|
+
a || "current dashboard"
|
|
623
606
|
] })
|
|
624
607
|
] }),
|
|
625
608
|
/* @__PURE__ */ d(
|
|
626
|
-
|
|
609
|
+
ue,
|
|
627
610
|
{
|
|
628
|
-
open:
|
|
629
|
-
onOpenChange:
|
|
611
|
+
open: oe,
|
|
612
|
+
onOpenChange: Oe,
|
|
630
613
|
children: [
|
|
631
|
-
/* @__PURE__ */ r(
|
|
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
|
-
|
|
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:
|
|
637
|
+
onClick: Re,
|
|
655
638
|
children: [
|
|
656
|
-
/* @__PURE__ */ r(
|
|
657
|
-
|
|
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 =
|
|
652
|
+
return (o = ae.current) == null ? void 0 : o.click();
|
|
670
653
|
},
|
|
671
654
|
children: [
|
|
672
|
-
/* @__PURE__ */ r(
|
|
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:
|
|
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
|
-
|
|
664
|
+
ze,
|
|
682
665
|
{
|
|
683
666
|
ariaLabel: "Brand spec",
|
|
684
|
-
value:
|
|
667
|
+
value: A,
|
|
685
668
|
onValueChange: (o) => {
|
|
686
|
-
|
|
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:
|
|
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:
|
|
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:
|
|
718
|
-
disabled: !
|
|
700
|
+
onClick: Te,
|
|
701
|
+
disabled: !p,
|
|
719
702
|
children: [
|
|
720
|
-
/* @__PURE__ */ r(
|
|
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:
|
|
732
|
-
disabled:
|
|
714
|
+
onClick: Be,
|
|
715
|
+
disabled: J,
|
|
733
716
|
children: [
|
|
734
|
-
/* @__PURE__ */ r(
|
|
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: !
|
|
728
|
+
disabled: !p || J || !!E || !y,
|
|
746
729
|
children: [
|
|
747
|
-
|
|
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
|
-
|
|
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:
|
|
759
|
-
children: /* @__PURE__ */ r(
|
|
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:
|
|
765
|
-
/* @__PURE__ */ r(
|
|
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(
|
|
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:
|
|
758
|
+
className: Q(
|
|
776
759
|
"h-full px-2.5 text-[12px] capitalize transition-colors",
|
|
777
|
-
|
|
760
|
+
B === o ? "bg-muted text-foreground" : "text-muted-foreground hover:text-foreground"
|
|
778
761
|
),
|
|
779
|
-
onClick: () =>
|
|
762
|
+
onClick: () => O(o),
|
|
780
763
|
children: o
|
|
781
764
|
},
|
|
782
765
|
o
|
|
783
766
|
)) })
|
|
784
767
|
] }),
|
|
785
|
-
|
|
786
|
-
|
|
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(
|
|
789
|
-
/* @__PURE__ */ r(
|
|
790
|
-
/* @__PURE__ */ r(
|
|
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(
|
|
776
|
+
/* @__PURE__ */ d($, { value: "style", className: "m-0 p-4", children: [
|
|
794
777
|
/* @__PURE__ */ r(
|
|
795
|
-
|
|
778
|
+
v,
|
|
796
779
|
{
|
|
797
|
-
icon:
|
|
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:
|
|
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
|
|
807
|
-
|
|
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
|
-
|
|
820
|
+
v,
|
|
838
821
|
{
|
|
839
|
-
icon:
|
|
822
|
+
icon: _,
|
|
840
823
|
title: "Color",
|
|
841
|
-
description: `Editing the ${
|
|
842
|
-
children: /* @__PURE__ */ r("div", { className: "grid grid-cols-2 gap-2", children:
|
|
843
|
-
|
|
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:
|
|
846
|
-
value:
|
|
847
|
-
onChange: (
|
|
848
|
-
|
|
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
|
-
|
|
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:
|
|
866
|
-
onChange: (o) =>
|
|
867
|
-
|
|
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
|
-
|
|
856
|
+
N,
|
|
874
857
|
{
|
|
875
858
|
label: "Base size",
|
|
876
|
-
value:
|
|
859
|
+
value: s.tokens.typography.baseFontSize,
|
|
877
860
|
min: 11,
|
|
878
861
|
max: 18,
|
|
879
|
-
onChange: (o) =>
|
|
880
|
-
|
|
862
|
+
onChange: (o) => l((t) => {
|
|
863
|
+
t.tokens.typography.baseFontSize = o;
|
|
881
864
|
})
|
|
882
865
|
}
|
|
883
866
|
),
|
|
884
867
|
/* @__PURE__ */ r(
|
|
885
|
-
|
|
868
|
+
W,
|
|
886
869
|
{
|
|
887
870
|
label: "Density",
|
|
888
|
-
value:
|
|
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) =>
|
|
895
|
-
|
|
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(
|
|
887
|
+
/* @__PURE__ */ d($, { value: "surfaces", className: "m-0 p-4", children: [
|
|
905
888
|
/* @__PURE__ */ d(
|
|
906
|
-
|
|
889
|
+
v,
|
|
907
890
|
{
|
|
908
|
-
icon:
|
|
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
|
-
|
|
897
|
+
N,
|
|
915
898
|
{
|
|
916
899
|
label: "Canvas pad",
|
|
917
900
|
tooltip: "Outer padding around the dashboard canvas before cards begin.",
|
|
918
|
-
value:
|
|
901
|
+
value: s.tokens.spacing.dashboardPadding,
|
|
919
902
|
min: 0,
|
|
920
903
|
max: 48,
|
|
921
|
-
onChange: (o) =>
|
|
922
|
-
|
|
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
|
-
|
|
910
|
+
N,
|
|
928
911
|
{
|
|
929
912
|
label: "Grid gap",
|
|
930
913
|
tooltip: "Spacing between dashboard cards in the grid.",
|
|
931
|
-
value:
|
|
914
|
+
value: s.tokens.spacing.gridGap,
|
|
932
915
|
min: 0,
|
|
933
916
|
max: 32,
|
|
934
|
-
onChange: (o) =>
|
|
935
|
-
|
|
917
|
+
onChange: (o) => l((t) => {
|
|
918
|
+
t.tokens.spacing.gridGap = o;
|
|
936
919
|
})
|
|
937
920
|
}
|
|
938
921
|
),
|
|
939
922
|
/* @__PURE__ */ r(
|
|
940
|
-
|
|
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:
|
|
927
|
+
value: s.tokens.spacing.cardPadding,
|
|
945
928
|
min: 0,
|
|
946
929
|
max: 32,
|
|
947
|
-
onChange: (o) =>
|
|
948
|
-
|
|
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
|
-
|
|
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:
|
|
942
|
+
value: s.tokens.radius.control,
|
|
960
943
|
min: 0,
|
|
961
944
|
max: 12,
|
|
962
|
-
onChange: (o) =>
|
|
963
|
-
|
|
945
|
+
onChange: (o) => l((t) => {
|
|
946
|
+
V(t, "control", o);
|
|
964
947
|
})
|
|
965
948
|
}
|
|
966
949
|
),
|
|
967
950
|
/* @__PURE__ */ r(
|
|
968
|
-
|
|
951
|
+
N,
|
|
969
952
|
{
|
|
970
953
|
label: "Card/widget radius",
|
|
971
954
|
tooltip: "Corner radius for dashboard card frames and widget containers.",
|
|
972
|
-
value:
|
|
955
|
+
value: s.tokens.radius.card,
|
|
973
956
|
min: 0,
|
|
974
957
|
max: 12,
|
|
975
|
-
onChange: (o) =>
|
|
976
|
-
|
|
958
|
+
onChange: (o) => l((t) => {
|
|
959
|
+
V(t, "card", o);
|
|
977
960
|
})
|
|
978
961
|
}
|
|
979
962
|
),
|
|
980
963
|
/* @__PURE__ */ r(
|
|
981
|
-
|
|
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:
|
|
968
|
+
value: s.tokens.radius.table,
|
|
986
969
|
min: 0,
|
|
987
970
|
max: 12,
|
|
988
|
-
onChange: (o) =>
|
|
989
|
-
|
|
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
|
-
|
|
981
|
+
v,
|
|
999
982
|
{
|
|
1000
|
-
icon:
|
|
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
|
-
|
|
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:
|
|
1010
|
-
onChange: (o) =>
|
|
1011
|
-
|
|
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
|
-
|
|
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:
|
|
1021
|
-
onChange: (o) =>
|
|
1022
|
-
|
|
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
|
-
|
|
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:
|
|
1032
|
-
onChange: (o) =>
|
|
1033
|
-
|
|
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
|
-
|
|
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:
|
|
1043
|
-
onChange: (o) =>
|
|
1044
|
-
|
|
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(
|
|
1035
|
+
/* @__PURE__ */ d($, { value: "data", className: "m-0 p-4", children: [
|
|
1053
1036
|
/* @__PURE__ */ d(
|
|
1054
|
-
|
|
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
|
-
|
|
1044
|
+
k,
|
|
1062
1045
|
{
|
|
1063
1046
|
label: `Series ${o + 1}`,
|
|
1064
|
-
value:
|
|
1065
|
-
onChange: (
|
|
1066
|
-
|
|
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
|
-
|
|
1056
|
+
k,
|
|
1074
1057
|
{
|
|
1075
1058
|
label: "Grid",
|
|
1076
|
-
value:
|
|
1077
|
-
onChange: (o) =>
|
|
1078
|
-
|
|
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
|
-
|
|
1066
|
+
k,
|
|
1084
1067
|
{
|
|
1085
1068
|
label: "Axis",
|
|
1086
|
-
value:
|
|
1087
|
-
onChange: (o) =>
|
|
1088
|
-
|
|
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
|
-
|
|
1080
|
+
v,
|
|
1098
1081
|
{
|
|
1099
1082
|
icon: Ue,
|
|
1100
1083
|
title: "Tables",
|
|
1101
|
-
description: "
|
|
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
|
-
|
|
1088
|
+
W,
|
|
1106
1089
|
{
|
|
1107
1090
|
label: "Density",
|
|
1108
|
-
value:
|
|
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) =>
|
|
1115
|
-
|
|
1097
|
+
onChange: (o) => l((t) => {
|
|
1098
|
+
t.components.table.density = o;
|
|
1116
1099
|
})
|
|
1117
1100
|
}
|
|
1118
1101
|
),
|
|
1119
1102
|
/* @__PURE__ */ r(
|
|
1120
|
-
|
|
1103
|
+
W,
|
|
1121
1104
|
{
|
|
1122
1105
|
label: "Cell wrap",
|
|
1123
|
-
value:
|
|
1106
|
+
value: s.components.table.cell.wrap,
|
|
1124
1107
|
options: [
|
|
1125
1108
|
["nowrap", "No wrap"],
|
|
1126
1109
|
["wrap", "Wrap"]
|
|
1127
1110
|
],
|
|
1128
|
-
onChange: (o) =>
|
|
1129
|
-
|
|
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
|
-
|
|
1119
|
+
k,
|
|
1137
1120
|
{
|
|
1138
1121
|
label: "Header",
|
|
1139
|
-
value:
|
|
1140
|
-
onChange: (o) =>
|
|
1141
|
-
|
|
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
|
-
|
|
1129
|
+
k,
|
|
1147
1130
|
{
|
|
1148
1131
|
label: "Divider",
|
|
1149
|
-
value:
|
|
1150
|
-
onChange: (o) =>
|
|
1151
|
-
|
|
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
|
-
|
|
1139
|
+
k,
|
|
1157
1140
|
{
|
|
1158
1141
|
label: "Selection",
|
|
1159
|
-
value:
|
|
1160
|
-
onChange: (o) =>
|
|
1161
|
-
|
|
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
|
-
|
|
1150
|
+
H,
|
|
1168
1151
|
{
|
|
1169
1152
|
label: "Zebra rows",
|
|
1170
|
-
checked:
|
|
1171
|
-
onCheckedChange: (o) =>
|
|
1172
|
-
|
|
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
|
-
|
|
1160
|
+
H,
|
|
1178
1161
|
{
|
|
1179
1162
|
label: "Sticky headers",
|
|
1180
|
-
checked:
|
|
1181
|
-
onCheckedChange: (o) =>
|
|
1182
|
-
|
|
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
|
-
|
|
1170
|
+
H,
|
|
1188
1171
|
{
|
|
1189
1172
|
label: "Uppercase headers",
|
|
1190
|
-
checked:
|
|
1191
|
-
onCheckedChange: (o) =>
|
|
1192
|
-
|
|
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
|
|
1189
|
+
function v({
|
|
1207
1190
|
icon: e,
|
|
1208
|
-
title:
|
|
1209
|
-
description:
|
|
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:
|
|
1217
|
-
/* @__PURE__ */ r("p", { className: "mt-0.5 text-[12px] leading-4 text-muted-foreground", children:
|
|
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:
|
|
1209
|
+
onChange: a
|
|
1227
1210
|
}) {
|
|
1228
1211
|
var c;
|
|
1229
|
-
const
|
|
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(
|
|
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
|
-
|
|
1217
|
+
me,
|
|
1235
1218
|
{
|
|
1236
|
-
value:
|
|
1237
|
-
onValueChange: (
|
|
1238
|
-
const
|
|
1239
|
-
(
|
|
1219
|
+
value: n,
|
|
1220
|
+
onValueChange: (i) => {
|
|
1221
|
+
const f = M.find(
|
|
1222
|
+
(g) => g.id === i
|
|
1240
1223
|
);
|
|
1241
|
-
|
|
1224
|
+
f && a(f.value);
|
|
1242
1225
|
},
|
|
1243
1226
|
children: [
|
|
1244
|
-
/* @__PURE__ */ r(
|
|
1245
|
-
/* @__PURE__ */ r(
|
|
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
|
|
1243
|
+
function k({
|
|
1261
1244
|
label: e,
|
|
1262
|
-
tooltip:
|
|
1263
|
-
value:
|
|
1245
|
+
tooltip: a,
|
|
1246
|
+
value: n,
|
|
1264
1247
|
onChange: c
|
|
1265
1248
|
}) {
|
|
1266
|
-
const [
|
|
1267
|
-
|
|
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(
|
|
1272
|
-
|
|
1273
|
-
/* @__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(
|
|
1262
|
+
children: /* @__PURE__ */ r(fe, { className: "h-3 w-3" })
|
|
1280
1263
|
}
|
|
1281
1264
|
) }),
|
|
1282
|
-
/* @__PURE__ */ r(
|
|
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(
|
|
1287
|
-
/* @__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:
|
|
1276
|
+
style: { backgroundColor: n },
|
|
1294
1277
|
children: /* @__PURE__ */ r("span", { className: "sr-only", children: e })
|
|
1295
1278
|
}
|
|
1296
1279
|
) }),
|
|
1297
1280
|
/* @__PURE__ */ d(
|
|
1298
|
-
|
|
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:
|
|
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: (
|
|
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(
|
|
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(
|
|
1328
|
-
/* @__PURE__ */ r(
|
|
1329
|
-
/* @__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: !
|
|
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(
|
|
1337
|
-
children: /* @__PURE__ */ r(
|
|
1319
|
+
onClick: () => c(g),
|
|
1320
|
+
children: /* @__PURE__ */ r(ge, { className: "h-3 w-3" })
|
|
1338
1321
|
}
|
|
1339
1322
|
) }),
|
|
1340
|
-
/* @__PURE__ */ r(
|
|
1323
|
+
/* @__PURE__ */ r(Z, { side: "top", children: "Reset to previous value" })
|
|
1341
1324
|
] }) })
|
|
1342
1325
|
] }),
|
|
1343
1326
|
/* @__PURE__ */ r(
|
|
1344
|
-
|
|
1327
|
+
K,
|
|
1345
1328
|
{
|
|
1346
1329
|
size: "xs",
|
|
1347
1330
|
"aria-label": `${e} popover color value`,
|
|
1348
|
-
value:
|
|
1349
|
-
onChange: (
|
|
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:
|
|
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 ${
|
|
1360
|
-
className:
|
|
1342
|
+
"aria-label": `Set ${e} to ${u}`,
|
|
1343
|
+
className: Q(
|
|
1361
1344
|
"h-6 rounded-control border border-border/70 shadow-sm",
|
|
1362
|
-
|
|
1345
|
+
n.toLowerCase() === u && "ring-2 ring-ring"
|
|
1363
1346
|
),
|
|
1364
|
-
style: { backgroundColor:
|
|
1365
|
-
onClick: () => c(
|
|
1347
|
+
style: { backgroundColor: u },
|
|
1348
|
+
onClick: () => c(u)
|
|
1366
1349
|
},
|
|
1367
|
-
|
|
1350
|
+
u
|
|
1368
1351
|
)) })
|
|
1369
1352
|
]
|
|
1370
1353
|
}
|
|
1371
1354
|
)
|
|
1372
1355
|
] }),
|
|
1373
1356
|
/* @__PURE__ */ r(
|
|
1374
|
-
|
|
1357
|
+
K,
|
|
1375
1358
|
{
|
|
1376
1359
|
size: "xs",
|
|
1377
1360
|
"aria-label": `${e} color value`,
|
|
1378
|
-
value:
|
|
1379
|
-
onChange: (
|
|
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
|
|
1387
|
-
const
|
|
1388
|
-
return
|
|
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
|
|
1373
|
+
function G(e) {
|
|
1391
1374
|
return Math.round(e).toString(16).padStart(2, "0");
|
|
1392
1375
|
}
|
|
1393
|
-
function
|
|
1376
|
+
function N({
|
|
1394
1377
|
label: e,
|
|
1395
|
-
tooltip:
|
|
1396
|
-
value:
|
|
1378
|
+
tooltip: a,
|
|
1379
|
+
value: n,
|
|
1397
1380
|
min: c,
|
|
1398
|
-
max:
|
|
1399
|
-
onChange:
|
|
1381
|
+
max: i,
|
|
1382
|
+
onChange: f
|
|
1400
1383
|
}) {
|
|
1401
|
-
const
|
|
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
|
-
|
|
1388
|
+
T,
|
|
1406
1389
|
{
|
|
1407
|
-
htmlFor:
|
|
1390
|
+
htmlFor: g,
|
|
1408
1391
|
className: "text-[11px] font-normal text-muted-foreground",
|
|
1409
1392
|
children: e
|
|
1410
1393
|
}
|
|
1411
1394
|
),
|
|
1412
|
-
|
|
1413
|
-
/* @__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(
|
|
1402
|
+
children: /* @__PURE__ */ r(fe, { className: "h-3 w-3" })
|
|
1420
1403
|
}
|
|
1421
1404
|
) }),
|
|
1422
|
-
/* @__PURE__ */ r(
|
|
1405
|
+
/* @__PURE__ */ r(Z, { side: "top", className: "max-w-56", children: a })
|
|
1423
1406
|
] }) }) : null
|
|
1424
1407
|
] }),
|
|
1425
1408
|
/* @__PURE__ */ r(
|
|
1426
|
-
|
|
1409
|
+
K,
|
|
1427
1410
|
{
|
|
1428
|
-
id:
|
|
1411
|
+
id: g,
|
|
1429
1412
|
size: "xs",
|
|
1430
1413
|
type: "number",
|
|
1431
1414
|
min: c,
|
|
1432
|
-
max:
|
|
1433
|
-
value:
|
|
1434
|
-
onChange: (
|
|
1435
|
-
const x = Number(
|
|
1436
|
-
Number.isNaN(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
|
|
1425
|
+
function W({
|
|
1443
1426
|
label: e,
|
|
1444
|
-
value:
|
|
1445
|
-
options:
|
|
1427
|
+
value: a,
|
|
1428
|
+
options: n,
|
|
1446
1429
|
onChange: c
|
|
1447
1430
|
}) {
|
|
1448
1431
|
return /* @__PURE__ */ d("div", { children: [
|
|
1449
|
-
/* @__PURE__ */ r(
|
|
1450
|
-
/* @__PURE__ */ d(
|
|
1451
|
-
/* @__PURE__ */ r(
|
|
1452
|
-
/* @__PURE__ */ r(
|
|
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
|
|
1439
|
+
function H({
|
|
1457
1440
|
label: e,
|
|
1458
|
-
checked:
|
|
1459
|
-
onCheckedChange:
|
|
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:
|
|
1446
|
+
/* @__PURE__ */ r(Me, { size: "xs", checked: a, onCheckedChange: n })
|
|
1464
1447
|
] });
|
|
1465
1448
|
}
|
|
1466
|
-
function
|
|
1467
|
-
const
|
|
1449
|
+
function ur(e) {
|
|
1450
|
+
const a = `${Number((e / 16).toFixed(4))}rem`;
|
|
1468
1451
|
return {
|
|
1469
|
-
"--semaphor-radius":
|
|
1470
|
-
"--semaphor-control-radius":
|
|
1452
|
+
"--semaphor-radius": a,
|
|
1453
|
+
"--semaphor-control-radius": a
|
|
1471
1454
|
};
|
|
1472
1455
|
}
|
|
1473
|
-
function
|
|
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((
|
|
1460
|
+
return typeof e.text == "function" ? e.text() : new Promise((a, n) => {
|
|
1478
1461
|
const c = new FileReader();
|
|
1479
|
-
c.onload = () =>
|
|
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
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
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
|
};
|