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