react-semaphor 0.1.507 → 0.1.508
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 +56 -0
- package/dist/analytics-protocol/index.cjs +1 -1
- package/dist/analytics-protocol/index.js +194 -172
- package/dist/appearance/index.cjs +1 -1
- package/dist/appearance/index.js +1 -1
- package/dist/appearance-runtime/index.cjs +1 -1
- package/dist/appearance-runtime/index.js +1 -1
- package/dist/brand-studio/index.cjs +2 -2
- package/dist/brand-studio/index.js +139 -119
- package/dist/briefings/index.cjs +1 -1
- package/dist/briefings/index.js +3 -3
- package/dist/chunks/appearance-context-DzqCdhB4.cjs +1 -0
- package/dist/chunks/{appearance-context-XviHOhWJ.js → appearance-context-VJdrKi7r.js} +2 -1
- package/dist/chunks/{appearance-runtime-provider-D0xVQWnH.js → appearance-runtime-provider-CC4HT2Gi.js} +2 -2
- package/dist/chunks/{appearance-runtime-provider-Ca8rxO86.cjs → appearance-runtime-provider-D5pkvgE4.cjs} +1 -1
- package/dist/chunks/calculated-field-identity-BiTGmnST.cjs +1 -0
- package/dist/chunks/calculated-field-identity-CJL54uFx.js +1373 -0
- package/dist/chunks/{constants-NUleP4DY.js → card-config-utils-Bq1enstT.js} +260 -260
- package/dist/chunks/card-config-utils-CMO4_zVs.cjs +1 -0
- package/dist/chunks/{dashboard-briefing-launcher-DXTpU85p.js → dashboard-briefing-launcher-B9l0ZAbv.js} +12 -12
- package/dist/chunks/{dashboard-briefing-launcher-C8nDSDnV.cjs → dashboard-briefing-launcher-C4zsM3Hd.cjs} +1 -1
- package/dist/chunks/{dashboard-controls-CyL0yimg.js → dashboard-controls-BCQv4xWM.js} +16 -14
- package/dist/chunks/dashboard-controls-CWwllVOe.cjs +52 -0
- package/dist/chunks/{dashboard-json-5Jr3RudV.js → dashboard-json-BtU_q_0A.js} +9 -9
- package/dist/chunks/dashboard-json-DVj2xLsH.cjs +1 -0
- package/dist/chunks/edit-dashboard-visual-CO2IVBOq.cjs +172 -0
- package/dist/chunks/{edit-dashboard-visual-C7X-um9g.js → edit-dashboard-visual-RgFUx-py.js} +1986 -1990
- package/dist/chunks/{editor-action-buttons-CcDm8nA5.cjs → editor-action-buttons-BE8Fby6n.cjs} +2 -2
- package/dist/chunks/{editor-action-buttons-C5Wja_J4.js → editor-action-buttons-D-MaqTIs.js} +6 -6
- package/dist/chunks/field-aggregations-DUb0NU6c.js +1229 -0
- package/dist/chunks/field-aggregations-jSi77h9Z.cjs +1 -0
- package/dist/chunks/{field-dependencies-DVl2p1Nm.js → field-dependencies-Cl97kkHy.js} +30 -34
- package/dist/chunks/{field-dependencies-r_U0CGQ-.cjs → field-dependencies-DIab72rQ.cjs} +1 -1
- package/dist/chunks/{index-BVr4fcCB.js → index-0pdaQ9e1.js} +5 -5
- package/dist/chunks/index-BaIrLSBb.cjs +1422 -0
- package/dist/chunks/{index-De2QNsqV.js → index-ByiS9sB4.js} +45343 -43665
- package/dist/chunks/{index-C9KXfCkC.js → index-CLIro-EG.js} +3 -0
- package/dist/chunks/index-Cx3qmRUB.cjs +1 -0
- package/dist/chunks/{index-BlYf8gNa.cjs → index-DhlVxvyI.cjs} +1 -1
- package/dist/chunks/{matrix-card-DACDwdTq.js → matrix-card-CnKQpnsj.js} +1 -1
- package/dist/chunks/{matrix-card-CRXcmAjp.cjs → matrix-card-U4c72doZ.cjs} +1 -1
- package/dist/chunks/{matrix-control-sources-ClQzIk7E.js → matrix-control-sources-CRRdP03Q.js} +165 -134
- package/dist/chunks/matrix-control-sources-FjxGIbqk.cjs +1 -0
- package/dist/chunks/{matrix-formatter-7GLTcBuy.cjs → matrix-formatter-CveLJo6S.cjs} +1 -1
- package/dist/chunks/{matrix-formatter-xsq7n_e6.js → matrix-formatter-ZVS5QOuq.js} +2 -2
- package/dist/chunks/matrix-member-presentation-CFHjdrxT.cjs +1 -0
- package/dist/chunks/matrix-member-presentation-CzGZJd3a.js +182 -0
- package/dist/chunks/matrix-operation-contract-DoiWTUbT.cjs +1 -0
- package/dist/chunks/matrix-operation-contract-xL8IhFzp.js +1802 -0
- package/dist/chunks/{pivot-header-presentation-3wqWChFd.cjs → pivot-header-presentation-Cxz8-06f.cjs} +1 -1
- package/dist/chunks/{pivot-header-presentation-D44ODZGn.js → pivot-header-presentation-DVylCBHB.js} +2 -2
- package/dist/chunks/{pivot-result-lifecycle-DZ0ZSMoM.cjs → pivot-result-lifecycle-BiERyXnS.cjs} +1 -1
- package/dist/chunks/{pivot-result-lifecycle-BSmqVkVG.js → pivot-result-lifecycle-CmjpW7qG.js} +1 -1
- package/dist/chunks/{report-preferences-dialog-xADifRXs.js → report-preferences-dialog-BbkXcnnn.js} +4 -4
- package/dist/chunks/report-preferences-dialog-C9rpWgQZ.cjs +1 -0
- package/dist/chunks/{search-BHsQIWBV.js → selection-reducer-B94WgZ9V.js} +55 -11
- package/dist/chunks/selection-reducer-CGKKsaPa.cjs +26 -0
- package/dist/chunks/{semantic-format-BhIL1PXP.cjs → semantic-format-BzH69TRq.cjs} +1 -1
- package/dist/chunks/{semantic-format-C3amkGmY.js → semantic-format-CBlRO8Aw.js} +1 -1
- package/dist/chunks/{switch-DHGiC0aU.js → switch-CD4uGTZI.js} +7450 -7694
- package/dist/chunks/switch-iC1x2dcE.cjs +134 -0
- package/dist/chunks/token-types-Ahh5u4iT.cjs +1 -0
- package/dist/chunks/token-types-CPde8_LG.js +8 -0
- package/dist/chunks/{update-policy-Cc9h57pA.cjs → update-policy-COjFudhl.cjs} +1 -1
- package/dist/chunks/{update-policy-eTcz52jO.js → update-policy-D9q1Tz8k.js} +1 -1
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.cjs +3 -3
- package/dist/dashboard-authoring/index.js +734 -622
- package/dist/data-app-builder/index.cjs +1 -1
- package/dist/data-app-builder/index.js +3 -3
- package/dist/data-app-codegen/index.cjs +1 -1
- package/dist/data-app-codegen/index.js +2 -2
- package/dist/data-app-codegen-node/index.cjs +94 -92
- package/dist/data-app-codegen-node/index.js +337 -333
- package/dist/data-app-sdk/index.cjs +9 -9
- package/dist/data-app-sdk/index.js +1091 -969
- package/dist/data-app-sdk-adapters/index.cjs +1 -1
- package/dist/data-app-sdk-adapters/index.js +104 -96
- package/dist/data-app-sdk-validation/index.cjs +1 -1
- package/dist/data-app-sdk-validation/index.js +2 -2
- package/dist/format-utils/index.cjs +1 -1
- package/dist/format-utils/index.js +8 -8
- package/dist/index.cjs +1 -1
- package/dist/index.js +15 -15
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/brand-studio/brand-studio-draft.d.ts +3 -1
- package/dist/types/components/dashboard/card-selection-pill.d.ts +5 -0
- package/dist/types/components/dashboard/dashboard-container.d.ts +1 -1
- package/dist/types/components/dashboard/drill-breadcrumb.d.ts +1 -0
- package/dist/types/components/dashboard/drill-navigation-controls.d.ts +3 -3
- package/dist/types/components/interactions/applied-filters-display.d.ts +6 -1
- package/dist/types/components/interactions/click-to-filter-review-dialog.d.ts +21 -0
- package/dist/types/components/interactions/dashboard-drill-host.d.ts +13 -0
- package/dist/types/components/interactions/filter-badge-tooltip.d.ts +4 -4
- package/dist/types/components/interactions/insight-modal.d.ts +4 -14
- package/dist/types/components/interactions/insight-viewer.d.ts +7 -19
- package/dist/types/components/interactions/interactions-sheet.d.ts +6 -0
- package/dist/types/components/interactions/panels/click-to-filter-panel.d.ts +20 -0
- package/dist/types/components/interactions/reusable/interaction-selection-popover.d.ts +2 -2
- package/dist/types/components/interactions/sheet/action-editor.d.ts +17 -0
- package/dist/types/components/interactions/sheet/action-meta.d.ts +45 -0
- package/dist/types/components/interactions/sheet/action-picker.d.ts +7 -0
- package/dist/types/components/interactions/sheet/click-outcome-preview.d.ts +10 -0
- package/dist/types/components/interactions/sheet/interactions-home.d.ts +28 -0
- package/dist/types/components/interactions/sheet/sheet-parts.d.ts +37 -0
- package/dist/types/components/surfboard/filter/dashboard-filter-mapping-panel.d.ts +28 -1
- package/dist/types/components/surfboard/filter/selection-chip.d.ts +11 -0
- package/dist/types/components/surfboard/filter/selection-filter-section.d.ts +4 -0
- package/dist/types/components/surfboard/filter/use-dashboard-filter-mapping-popover.d.ts +3 -0
- package/dist/types/components/ui/resizable.d.ts +1 -1
- package/dist/types/components/visual/matrix-table/matrix-interaction-actions.d.ts +13 -1
- package/dist/types/components/visual/matrix-table/matrix-selection-click.d.ts +6 -0
- package/dist/types/data-app-sdk/adapters.d.ts +3 -2
- package/dist/types/data-app-sdk/builders.d.ts +2 -1
- package/dist/types/data-app-sdk/contracts.d.ts +44 -2
- package/dist/types/data-app-sdk/index.d.ts +1 -0
- package/dist/types/data-app-sdk/query-request.d.ts +7 -2
- package/dist/types/data-app-sdk/selection.d.ts +2 -0
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.js +24 -23
- package/dist/types/lib/appearance/types.d.ts +3 -1
- package/dist/types/lib/briefings/briefing-attachment-model.d.ts +0 -2
- package/dist/types/lib/contexts/interactions-popover-context.d.ts +1 -8
- package/dist/types/lib/dashboard/click-to-filter-card-references.d.ts +23 -0
- package/dist/types/lib/dashboard-inputs/build-normalized-dashboard-inputs.d.ts +16 -2
- package/dist/types/lib/dashboard-inputs/build-selection-dashboard-inputs.d.ts +31 -0
- package/dist/types/lib/dashboard-inputs/click-to-filter-emitted-fields.d.ts +17 -0
- package/dist/types/lib/dashboard-inputs/click-to-filter-mapping-draft.d.ts +99 -0
- package/dist/types/lib/dashboard-inputs/click-to-filter-sheet-reach.d.ts +12 -0
- package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-authoring.d.ts +18 -1
- package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-candidate-metadata.d.ts +4 -1
- package/dist/types/lib/dashboard-inputs/dashboard-input-scope.d.ts +10 -0
- package/dist/types/lib/dashboard-inputs/dashboard-input-snapshot.d.ts +8 -1
- package/dist/types/lib/dashboard-inputs/index.d.ts +1 -0
- package/dist/types/lib/dashboard-inputs/resolve-dashboard-input-context.d.ts +18 -7
- package/dist/types/lib/dashboard-inputs/resolve-field-date-comparison-coverage.d.ts +5 -2
- package/dist/types/lib/dashboard-inputs/resolve-selection-input.d.ts +77 -0
- package/dist/types/lib/dashboard-inputs/selection-targets.d.ts +26 -0
- package/dist/types/lib/dashboard-inputs/transient-input-context.d.ts +102 -0
- package/dist/types/lib/dashboard-navigation/build-carried-click-context.d.ts +50 -0
- package/dist/types/lib/dashboard-navigation/describe-carried-context.d.ts +11 -0
- package/dist/types/lib/dashboard-navigation/index.d.ts +1 -0
- package/dist/types/lib/dashboard-navigation/navigation-state.d.ts +120 -0
- package/dist/types/lib/dashboard-navigation/run-one-off-drill.d.ts +11 -0
- package/dist/types/lib/dashboard-navigation/use-transient-contexts.d.ts +17 -0
- package/dist/types/lib/dashboard-view-state/card-view-state.d.ts +48 -0
- package/dist/types/lib/dashboard-view-state/drill-path.d.ts +20 -0
- package/dist/types/lib/dashboard-view-state/index.d.ts +2 -0
- package/dist/types/lib/download-pdf.d.ts +0 -3
- package/dist/types/lib/formatters/metric-formatting.d.ts +1 -1
- package/dist/types/lib/hooks/ai/dashboard-context.d.ts +15 -8
- package/dist/types/lib/hooks/chartjs/use-chart-blur.d.ts +10 -2
- package/dist/types/lib/hooks/interactions/{use-event-engine.d.ts → use-drill-actions.d.ts} +28 -7
- package/dist/types/lib/hooks/selection/use-active-selections.d.ts +15 -0
- package/dist/types/lib/hooks/selection/use-click-to-filter-mapping-draft.d.ts +20 -0
- package/dist/types/lib/hooks/selection/use-selection-click.d.ts +34 -0
- package/dist/types/lib/hooks/selection/use-selection-gestures.d.ts +38 -0
- package/dist/types/lib/hooks/selection/use-table-row-selection.d.ts +46 -0
- package/dist/types/lib/hooks/use-dashboard-card.d.ts +0 -2
- package/dist/types/lib/hooks/use-dashboard-filter-mapping-candidates.d.ts +18 -0
- package/dist/types/lib/hooks/use-dashboard-frame-query.d.ts +0 -1
- package/dist/types/lib/hooks/use-dashboard.d.ts +1 -3
- package/dist/types/lib/hooks/use-interactions-popover.d.ts +1 -8
- package/dist/types/lib/hooks/use-resolved-card-config.d.ts +6 -0
- package/dist/types/lib/interactions/click-outcome.d.ts +25 -0
- package/dist/types/lib/interactions/get-click-context-from-chartjs.d.ts +3 -1
- package/dist/types/lib/interactions/get-click-context-from-matrix.d.ts +1 -1
- package/dist/types/lib/interactions/get-click-context-from-table.d.ts +7 -0
- package/dist/types/lib/interactions/interaction-utils.d.ts +17 -1
- package/dist/types/lib/matrix-table/build-matrix-drill-to-detail.d.ts +15 -0
- package/dist/types/lib/matrix-table/matrix-card-interactions.d.ts +14 -3
- package/dist/types/lib/query-context/build-card-query-context.d.ts +19 -8
- package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +5 -3
- package/dist/types/lib/query-context/build-dashboard-frame-base-query-contexts.d.ts +12 -4
- package/dist/types/lib/query-context/compile-selection-filters.d.ts +5 -0
- package/dist/types/lib/query-context/dashboard-filter-mapping-resolution.d.ts +46 -0
- package/dist/types/lib/query-context/filter-group-utils.d.ts +3 -0
- package/dist/types/lib/query-context/resolve-runtime-card-filters.d.ts +29 -0
- package/dist/types/lib/selection/click-to-filter-authoring-support.d.ts +9 -0
- package/dist/types/lib/selection/selection-from-click-context.d.ts +41 -0
- package/dist/types/lib/selection/selection-labels.d.ts +3 -0
- package/dist/types/lib/selection/selection-notices.d.ts +9 -0
- package/dist/types/lib/selection/selection-reducer.d.ts +46 -0
- package/dist/types/lib/stores/dashboard-store.d.ts +62 -17
- package/dist/types/lib/stores/editor-store.d.ts +1 -2
- package/dist/types/lib/stores/index.d.ts +0 -2
- package/dist/types/lib/types/common-types.d.ts +60 -6
- package/dist/types/lib/types/explorer-types.d.ts +1 -22
- package/dist/types/lib/types/interaction-types.d.ts +6 -198
- package/dist/types/lib/utils/calculate-context-aware-filters.d.ts +21 -12
- package/dist/types/lib/utils/card-utils.d.ts +11 -0
- package/dist/types/lib/utils/date-hierarchy-utils.d.ts +3 -1
- package/dist/types/lib/utils/drag-and-drop-utils.d.ts +1 -1
- package/dist/types/lib/utils/interaction-icons.d.ts +1 -1
- package/dist/types/shared/analytics-protocol/execution-input-schemas.d.ts +32 -32
- package/dist/types/shared/analytics-protocol/index.d.ts +2 -0
- package/dist/types/shared/analytics-protocol/selection-contract.d.ts +100 -0
- package/dist/types/shared/analytics-protocol/selection-filter-compiler.d.ts +12 -0
- package/dist/types/shared/dashboard-authoring/apply-group-by-override.d.ts +19 -0
- package/dist/types/shared/dashboard-authoring/click-to-filter-settings.d.ts +88 -0
- package/dist/types/shared/dashboard-authoring/contracts.d.ts +8 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +3 -0
- package/dist/types/shared/dashboard-authoring/linked-click-to-filter-overrides.d.ts +32 -0
- package/dist/types/shared/format-utils/matrix-continuation.d.ts +3 -3
- package/package.json +1 -1
- package/src/data-app-sdk/README.md +58 -1
- package/dist/chunks/appearance-context-tNjvTJj3.cjs +0 -1
- package/dist/chunks/calculated-field-identity-BTpUqfEu.js +0 -1276
- package/dist/chunks/calculated-field-identity-rMuXuzEY.cjs +0 -1
- package/dist/chunks/constants-vtu7_IUo.cjs +0 -1
- package/dist/chunks/dashboard-controls-DlxeddZN.cjs +0 -52
- package/dist/chunks/dashboard-json-DhS4yJfc.cjs +0 -1
- package/dist/chunks/edit-dashboard-visual-X3OCnivL.cjs +0 -172
- package/dist/chunks/field-aggregations-BU_3gHKR.js +0 -957
- package/dist/chunks/field-aggregations-CDCamEsQ.cjs +0 -1
- package/dist/chunks/index-C8XCKzB6.cjs +0 -1
- package/dist/chunks/index-DSa6RSdg.cjs +0 -1417
- package/dist/chunks/matrix-control-sources-CeC5EMyq.cjs +0 -1
- package/dist/chunks/matrix-member-presentation-E2B4k3ws.cjs +0 -1
- package/dist/chunks/matrix-member-presentation-qiHxv67e.js +0 -105
- package/dist/chunks/matrix-operation-contract-Cqy4EW2H.js +0 -1638
- package/dist/chunks/matrix-operation-contract-D9dLX-Wr.cjs +0 -1
- package/dist/chunks/report-preferences-dialog-7Vsc_fsG.cjs +0 -1
- package/dist/chunks/search-BqqhaMx9.cjs +0 -26
- package/dist/chunks/switch-BytP6QY8.cjs +0 -139
- package/dist/types/components/interactions/configuration-popover.d.ts +0 -1
- package/dist/types/components/interactions/interaction-card.d.ts +0 -59
- package/dist/types/components/interactions/interaction-event-handler.d.ts +0 -11
- package/dist/types/components/interactions/interactions-list.d.ts +0 -50
- package/dist/types/components/interactions/panels/cross-filter-panel.d.ts +0 -24
- package/dist/types/components/interactions/panels/inline-drill-panel.d.ts +0 -24
- package/dist/types/components/interactions/selectors/action-selector.d.ts +0 -31
- package/dist/types/components/interactions/selectors/trigger-selector.d.ts +0 -38
- package/dist/types/components/surfboard/filter/click-filter-section.d.ts +0 -5
- package/dist/types/lib/interactions/build-interaction-event.d.ts +0 -25
- package/dist/types/lib/interactions/convert-click-filters-to-filter-group.d.ts +0 -10
- package/dist/types/lib/interactions/execute-interaction-event.d.ts +0 -80
- package/dist/types/lib/interactions/field-utils.d.ts +0 -11
- package/dist/types/lib/interactions/handle-chart-click.d.ts +0 -75
- package/dist/types/lib/interactions/linked-interaction-utils.d.ts +0 -14
- package/dist/types/lib/interactions/source-card-filter-utils.d.ts +0 -9
- package/dist/types/lib/stores/drill-actions.d.ts +0 -139
- package/dist/types/lib/stores/interaction-store.d.ts +0 -113
- package/dist/types/lib/stores/pointer-interaction-store.d.ts +0 -18
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsxs as d, jsx as r, Fragment as ce } from "react/jsx-runtime";
|
|
2
2
|
import m from "react";
|
|
3
|
-
import { c as q, P as ge, a as be, B as C, b as fe, U as De, C as Ie, R as me, L as le, S as se, d as
|
|
3
|
+
import { c as q, P as ge, a as be, B as C, b as fe, U as De, C as Ie, R as me, L as le, S as se, d as je, T as Je, F as Le, G as U, H as $e, I as M, J as _e, K as Ve, M as Ue, N as Me, O as E, Q as K, V as Q, W as ee, X as he, Y as re, Z as oe, _ as ke, $ as xe, a0 as ye, a1 as ve, a2 as Ce, a3 as Ge } from "../chunks/switch-CD4uGTZI.js";
|
|
4
4
|
import { A as We, p as He } from "../chunks/color-CJvdlFM_.js";
|
|
5
5
|
import { c as ae, X as Xe } from "../chunks/x-CXDkqdur.js";
|
|
6
|
-
import "../chunks/
|
|
6
|
+
import "../chunks/card-config-utils-Bq1enstT.js";
|
|
7
7
|
import "../chunks/validators-BDYzZFgs.js";
|
|
8
|
-
import "../chunks/matrix-operation-contract-
|
|
8
|
+
import "../chunks/matrix-operation-contract-xL8IhFzp.js";
|
|
9
9
|
import "../value-format-preferences/index.js";
|
|
10
|
-
import { r as Ye, v as Ze, A as qe } from "../chunks/index-
|
|
10
|
+
import { r as Ye, v as Ze, A as qe } from "../chunks/index-CLIro-EG.js";
|
|
11
11
|
import { P as G } from "../chunks/palette-Cp1hqZtm.js";
|
|
12
12
|
import { B as Ke } from "../chunks/braces-8TRlDwDw.js";
|
|
13
13
|
import { S as Qe } from "../chunks/save-DgMfP0j8.js";
|
|
@@ -71,6 +71,7 @@ const ar = ae("Pipette", [
|
|
|
71
71
|
primaryForeground: "#ffffff",
|
|
72
72
|
accent: "#f4f4f5",
|
|
73
73
|
accentForeground: "#18181b",
|
|
74
|
+
selection: "#2563eb",
|
|
74
75
|
card: "#ffffff",
|
|
75
76
|
cardForeground: "#18181b",
|
|
76
77
|
chartPalette: [
|
|
@@ -92,6 +93,7 @@ const ar = ae("Pipette", [
|
|
|
92
93
|
primaryForeground: "#09090b",
|
|
93
94
|
accent: "#27272a",
|
|
94
95
|
accentForeground: "#fafafa",
|
|
96
|
+
selection: "#5090f7",
|
|
95
97
|
card: "#09090b",
|
|
96
98
|
cardForeground: "#fafafa",
|
|
97
99
|
chartPalette: [
|
|
@@ -120,6 +122,7 @@ const ar = ae("Pipette", [
|
|
|
120
122
|
primaryForeground: "#ffffff",
|
|
121
123
|
accent: "#dbeafe",
|
|
122
124
|
accentForeground: "#1e3a8a",
|
|
125
|
+
selection: "#2563eb",
|
|
123
126
|
card: "#ffffff",
|
|
124
127
|
cardForeground: "#0f172a",
|
|
125
128
|
chartPalette: [
|
|
@@ -141,6 +144,7 @@ const ar = ae("Pipette", [
|
|
|
141
144
|
primaryForeground: "#020617",
|
|
142
145
|
accent: "#1e3a8a",
|
|
143
146
|
accentForeground: "#dbeafe",
|
|
147
|
+
selection: "#60a5fa",
|
|
144
148
|
card: "#0f172a",
|
|
145
149
|
cardForeground: "#e2e8f0",
|
|
146
150
|
chartPalette: [
|
|
@@ -169,6 +173,7 @@ const ar = ae("Pipette", [
|
|
|
169
173
|
primaryForeground: "#ffffff",
|
|
170
174
|
accent: "#d1fae5",
|
|
171
175
|
accentForeground: "#064e3b",
|
|
176
|
+
selection: "#047857",
|
|
172
177
|
card: "#ffffff",
|
|
173
178
|
cardForeground: "#10231d",
|
|
174
179
|
chartPalette: [
|
|
@@ -190,6 +195,7 @@ const ar = ae("Pipette", [
|
|
|
190
195
|
primaryForeground: "#071511",
|
|
191
196
|
accent: "#064e3b",
|
|
192
197
|
accentForeground: "#d1fae5",
|
|
198
|
+
selection: "#34d399",
|
|
193
199
|
card: "#0b1d17",
|
|
194
200
|
cardForeground: "#e7f4ef",
|
|
195
201
|
chartPalette: [
|
|
@@ -203,11 +209,25 @@ const ar = ae("Pipette", [
|
|
|
203
209
|
}
|
|
204
210
|
}
|
|
205
211
|
];
|
|
206
|
-
function
|
|
212
|
+
function J(e) {
|
|
207
213
|
const n = Ye({
|
|
208
214
|
organizationAppearance: e ?? void 0
|
|
209
215
|
});
|
|
210
|
-
return
|
|
216
|
+
return nr(
|
|
217
|
+
dr(O(n))
|
|
218
|
+
);
|
|
219
|
+
}
|
|
220
|
+
function nr(e) {
|
|
221
|
+
for (const n of Object.values(e.schemes))
|
|
222
|
+
for (const t of [
|
|
223
|
+
n.components.table,
|
|
224
|
+
n.components.aggregateTable,
|
|
225
|
+
n.components.pivotTable
|
|
226
|
+
]) {
|
|
227
|
+
const c = t == null ? void 0 : t.row;
|
|
228
|
+
c != null && c.selectedBackground && c.selectedBackground === c.hoverBackground && delete c.selectedBackground;
|
|
229
|
+
}
|
|
230
|
+
return e;
|
|
211
231
|
}
|
|
212
232
|
function L(e) {
|
|
213
233
|
const n = O({
|
|
@@ -216,24 +236,24 @@ function L(e) {
|
|
|
216
236
|
schemes: e.schemes
|
|
217
237
|
}), t = Ze(n);
|
|
218
238
|
if (!t.success) {
|
|
219
|
-
const
|
|
239
|
+
const c = t.issues[0];
|
|
220
240
|
throw new Error(
|
|
221
|
-
`Invalid Brand Studio appearance at ${
|
|
241
|
+
`Invalid Brand Studio appearance at ${c.path}: ${c.message}`
|
|
222
242
|
);
|
|
223
243
|
}
|
|
224
244
|
return t.value;
|
|
225
245
|
}
|
|
226
|
-
function
|
|
227
|
-
const t = Ne.find((
|
|
246
|
+
function tr(e, n) {
|
|
247
|
+
const t = Ne.find((l) => l.id === n);
|
|
228
248
|
if (!t)
|
|
229
249
|
return e;
|
|
230
|
-
const
|
|
231
|
-
return ue(
|
|
250
|
+
const c = O(e);
|
|
251
|
+
return ue(c.schemes.light, t.light), ue(c.schemes.dark, t.dark), c;
|
|
232
252
|
}
|
|
233
253
|
function ue(e, n) {
|
|
234
|
-
e.tokens.color.background = n.background, e.tokens.color.foreground = n.foreground, e.tokens.color.muted = n.muted, e.tokens.color.mutedForeground = n.mutedForeground, e.tokens.color.border = n.border, e.tokens.color.input = n.border, e.tokens.color.primary = n.primary, e.tokens.color.primaryForeground = n.primaryForeground, e.tokens.color.accent = n.accent, e.tokens.color.accentForeground = n.accentForeground, e.tokens.color.card = n.card, e.tokens.color.cardForeground = n.cardForeground, e.components.dashboard.background = n.background, e.components.dashboard.foreground = n.foreground, e.components.dashboard.borderColor = n.border, e.components.card.background = n.card, e.components.card.foreground = n.cardForeground, e.components.card.borderColor = n.border, e.components.interactive.toolbarBackground = n.background, e.components.interactive.background = n.card, e.components.interactive.foreground = n.foreground, e.components.interactive.borderColor = n.border, e.components.chart.palette = [...n.chartPalette], e.components.chart.background = n.card, e.components.chart.foreground = n.foreground, e.components.chart.gridColor = n.border, e.components.chart.axisColor = n.mutedForeground, e.components.table.container.background = n.card, e.components.table.container.borderColor = n.border, e.components.table.header.background = n.muted, e.components.table.header.foreground = n.mutedForeground, e.components.table.header.dividerColor = n.border, e.components.table.row.dividerColor = n.border, e.components.table.row.zebraBackground = n.muted, e.components.table.pagination.background = n.card, e.components.table.pagination.foreground = n.foreground, e.components.table.pagination.borderColor = n.border,
|
|
254
|
+
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, u(e, "aggregateTable"), u(e, "pivotTable");
|
|
235
255
|
}
|
|
236
|
-
function
|
|
256
|
+
function u(e, n) {
|
|
237
257
|
e.components[n] = O(e.components.table);
|
|
238
258
|
}
|
|
239
259
|
function pe(e, n, t) {
|
|
@@ -242,25 +262,25 @@ function pe(e, n, t) {
|
|
|
242
262
|
e.components.dashboard.background = t, e.components.interactive.toolbarBackground = t;
|
|
243
263
|
break;
|
|
244
264
|
case "foreground":
|
|
245
|
-
e.components.dashboard.foreground = t, e.components.interactive.foreground = t, e.components.pagination.foreground = t, e.components.chart.foreground = t, e.components.table.pagination.foreground = t, e.components.table.subtotal.foreground = t, e.components.table.grandTotal.foreground = t,
|
|
265
|
+
e.components.dashboard.foreground = t, e.components.interactive.foreground = t, e.components.pagination.foreground = t, e.components.chart.foreground = t, e.components.table.pagination.foreground = t, e.components.table.subtotal.foreground = t, e.components.table.grandTotal.foreground = t, u(e, "aggregateTable"), u(e, "pivotTable");
|
|
246
266
|
break;
|
|
247
267
|
case "card":
|
|
248
|
-
e.components.card.background = t, e.components.interactive.background = t, e.components.pagination.background = t, e.components.chart.background = t, e.components.table.container.background = t, e.components.table.pagination.background = t,
|
|
268
|
+
e.components.card.background = t, e.components.interactive.background = t, e.components.pagination.background = t, e.components.chart.background = t, e.components.table.container.background = t, e.components.table.pagination.background = t, u(e, "aggregateTable"), u(e, "pivotTable");
|
|
249
269
|
break;
|
|
250
270
|
case "cardForeground":
|
|
251
271
|
e.components.card.foreground = t;
|
|
252
272
|
break;
|
|
253
273
|
case "muted":
|
|
254
|
-
e.components.table.header.background = t, e.components.table.row.zebraBackground = t, e.components.table.subtotal.background = t, e.components.table.grandTotal.background = t,
|
|
274
|
+
e.components.table.header.background = t, e.components.table.row.zebraBackground = t, e.components.table.subtotal.background = t, e.components.table.grandTotal.background = t, u(e, "aggregateTable"), u(e, "pivotTable");
|
|
255
275
|
break;
|
|
256
276
|
case "mutedForeground":
|
|
257
|
-
e.components.table.header.foreground = t, e.components.chart.axisColor = t,
|
|
277
|
+
e.components.table.header.foreground = t, e.components.chart.axisColor = t, u(e, "aggregateTable"), u(e, "pivotTable");
|
|
258
278
|
break;
|
|
259
279
|
case "border":
|
|
260
|
-
e.tokens.color.input = t, e.components.dashboard.borderColor = t, e.components.card.borderColor = t, e.components.interactive.borderColor = t, e.components.pagination.borderColor = t, e.components.chart.gridColor = t, e.components.table.container.borderColor = t, e.components.table.header.dividerColor = t, e.components.table.row.dividerColor = t, e.components.table.grandTotal.borderColor = t, e.components.table.pagination.borderColor = t,
|
|
280
|
+
e.tokens.color.input = t, e.components.dashboard.borderColor = t, e.components.card.borderColor = t, e.components.interactive.borderColor = t, e.components.pagination.borderColor = t, e.components.chart.gridColor = t, e.components.table.container.borderColor = t, e.components.table.header.dividerColor = t, e.components.table.row.dividerColor = t, e.components.table.grandTotal.borderColor = t, e.components.table.pagination.borderColor = t, u(e, "aggregateTable"), u(e, "pivotTable");
|
|
261
281
|
break;
|
|
262
282
|
case "accent":
|
|
263
|
-
e.components.table.row.hoverBackground = t,
|
|
283
|
+
e.components.table.row.hoverBackground = t, u(e, "aggregateTable"), u(e, "pivotTable");
|
|
264
284
|
break;
|
|
265
285
|
}
|
|
266
286
|
}
|
|
@@ -273,28 +293,28 @@ function W(e, n, t) {
|
|
|
273
293
|
e.components.card.borderRadius = t;
|
|
274
294
|
break;
|
|
275
295
|
case "table":
|
|
276
|
-
e.components.table.container.borderRadius = t,
|
|
296
|
+
e.components.table.container.borderRadius = t, u(e, "aggregateTable"), u(e, "pivotTable");
|
|
277
297
|
break;
|
|
278
298
|
}
|
|
279
299
|
}
|
|
280
|
-
function
|
|
300
|
+
function dr(e) {
|
|
281
301
|
var n, t;
|
|
282
|
-
for (const
|
|
283
|
-
const
|
|
302
|
+
for (const c of ["light", "dark"]) {
|
|
303
|
+
const l = e.schemes[c], s = l.tokens, i = s.color, y = (n = l.components) == null ? void 0 : n.aggregateTable, x = (t = l.components) == null ? void 0 : t.pivotTable, S = {
|
|
284
304
|
fontFamily: "",
|
|
285
305
|
headingFontFamily: "",
|
|
286
306
|
monoFontFamily: "",
|
|
287
307
|
baseFontSize: 14,
|
|
288
308
|
density: "comfortable"
|
|
289
309
|
};
|
|
290
|
-
|
|
310
|
+
s.typography = { ...S, ...s.typography };
|
|
291
311
|
const f = {
|
|
292
312
|
control: 5,
|
|
293
313
|
card: 5,
|
|
294
314
|
table: 5,
|
|
295
315
|
badge: 999
|
|
296
316
|
};
|
|
297
|
-
|
|
317
|
+
s.radius = { ...f, ...s.radius };
|
|
298
318
|
const g = {
|
|
299
319
|
dashboardPadding: 16,
|
|
300
320
|
gridGap: 12,
|
|
@@ -303,34 +323,34 @@ function tr(e) {
|
|
|
303
323
|
tableCellX: 12,
|
|
304
324
|
tableCellY: 8
|
|
305
325
|
};
|
|
306
|
-
|
|
326
|
+
s.spacing = { ...g, ...s.spacing };
|
|
307
327
|
const T = {
|
|
308
328
|
card: "none",
|
|
309
329
|
popover: "0 12px 32px rgba(15, 23, 42, 0.14)",
|
|
310
330
|
focusRing: "0 0 0 2px rgba(37, 99, 235, 0.35)"
|
|
311
331
|
};
|
|
312
|
-
|
|
332
|
+
s.shadow = { ...T, ...s.shadow };
|
|
313
333
|
const F = {
|
|
314
334
|
dashboard: {
|
|
315
335
|
background: i.background,
|
|
316
336
|
foreground: i.foreground,
|
|
317
337
|
borderColor: i.border,
|
|
318
|
-
padding:
|
|
338
|
+
padding: s.spacing.dashboardPadding
|
|
319
339
|
},
|
|
320
340
|
card: {
|
|
321
341
|
background: i.card,
|
|
322
342
|
foreground: i.cardForeground,
|
|
323
343
|
borderColor: i.border,
|
|
324
|
-
borderRadius:
|
|
325
|
-
padding:
|
|
326
|
-
shadow:
|
|
344
|
+
borderRadius: s.radius.card,
|
|
345
|
+
padding: s.spacing.cardPadding,
|
|
346
|
+
shadow: s.shadow.card
|
|
327
347
|
},
|
|
328
348
|
interactive: {
|
|
329
349
|
toolbarBackground: i.background,
|
|
330
350
|
background: i.card,
|
|
331
351
|
foreground: i.foreground,
|
|
332
352
|
borderColor: i.border,
|
|
333
|
-
borderRadius:
|
|
353
|
+
borderRadius: s.radius.control
|
|
334
354
|
},
|
|
335
355
|
chart: {
|
|
336
356
|
palette: [],
|
|
@@ -339,17 +359,17 @@ function tr(e) {
|
|
|
339
359
|
gridColor: i.border,
|
|
340
360
|
axisColor: i.mutedForeground
|
|
341
361
|
},
|
|
342
|
-
table: B(i,
|
|
343
|
-
aggregateTable: B(i,
|
|
344
|
-
pivotTable: B(i,
|
|
362
|
+
table: B(i, s),
|
|
363
|
+
aggregateTable: B(i, s),
|
|
364
|
+
pivotTable: B(i, s),
|
|
345
365
|
pagination: {
|
|
346
366
|
background: i.card,
|
|
347
367
|
foreground: i.foreground,
|
|
348
368
|
borderColor: i.border,
|
|
349
|
-
borderRadius:
|
|
369
|
+
borderRadius: s.radius.control
|
|
350
370
|
}
|
|
351
371
|
};
|
|
352
|
-
|
|
372
|
+
l.components = { ...F, ...l.components };
|
|
353
373
|
const $ = {
|
|
354
374
|
palette: [],
|
|
355
375
|
background: i.card,
|
|
@@ -357,16 +377,16 @@ function tr(e) {
|
|
|
357
377
|
gridColor: i.border,
|
|
358
378
|
axisColor: i.mutedForeground
|
|
359
379
|
};
|
|
360
|
-
|
|
361
|
-
...B(i,
|
|
362
|
-
...
|
|
363
|
-
},
|
|
364
|
-
...B(i,
|
|
380
|
+
l.components.chart = { ...$, ...l.components.chart }, l.components.table = {
|
|
381
|
+
...B(i, s),
|
|
382
|
+
...l.components.table
|
|
383
|
+
}, l.components.aggregateTable = y ? {
|
|
384
|
+
...B(i, s),
|
|
365
385
|
...y
|
|
366
|
-
} : O(
|
|
367
|
-
...B(i,
|
|
386
|
+
} : O(l.components.table), l.components.pivotTable = x ? {
|
|
387
|
+
...B(i, s),
|
|
368
388
|
...x
|
|
369
|
-
} : O(
|
|
389
|
+
} : O(l.components.table);
|
|
370
390
|
}
|
|
371
391
|
return e;
|
|
372
392
|
}
|
|
@@ -392,8 +412,7 @@ function B(e, n) {
|
|
|
392
412
|
dividerColor: e.border,
|
|
393
413
|
zebra: !1,
|
|
394
414
|
zebraBackground: e.muted,
|
|
395
|
-
hoverBackground: e.accent
|
|
396
|
-
selectedBackground: e.accent
|
|
415
|
+
hoverBackground: e.accent
|
|
397
416
|
},
|
|
398
417
|
cell: {
|
|
399
418
|
paddingX: n.spacing.tableCellX,
|
|
@@ -422,7 +441,7 @@ function B(e, n) {
|
|
|
422
441
|
function O(e) {
|
|
423
442
|
return JSON.parse(JSON.stringify(e));
|
|
424
443
|
}
|
|
425
|
-
const
|
|
444
|
+
const ir = [
|
|
426
445
|
["background", "Canvas"],
|
|
427
446
|
["foreground", "Text"],
|
|
428
447
|
["card", "Card"],
|
|
@@ -431,6 +450,7 @@ const dr = [
|
|
|
431
450
|
["primaryForeground", "Primary text"],
|
|
432
451
|
["accent", "Accent"],
|
|
433
452
|
["accentForeground", "Accent text"],
|
|
453
|
+
["selection", "Selection"],
|
|
434
454
|
["muted", "Muted"],
|
|
435
455
|
["mutedForeground", "Muted text"],
|
|
436
456
|
["border", "Border"],
|
|
@@ -438,7 +458,7 @@ const dr = [
|
|
|
438
458
|
["negative", "Negative"],
|
|
439
459
|
["warning", "Warning"],
|
|
440
460
|
["info", "Info"]
|
|
441
|
-
],
|
|
461
|
+
], cr = [0, 1, 2, 3, 4, 5], H = We, lr = [
|
|
442
462
|
"#ffffff",
|
|
443
463
|
"#f8fafc",
|
|
444
464
|
"#f4f4f5",
|
|
@@ -452,13 +472,13 @@ const dr = [
|
|
|
452
472
|
"#dc2626",
|
|
453
473
|
"#7c3aed"
|
|
454
474
|
];
|
|
455
|
-
function
|
|
475
|
+
function Br({
|
|
456
476
|
appearance: e,
|
|
457
477
|
previewTitle: n,
|
|
458
478
|
isLoading: t = !1,
|
|
459
|
-
isSaving:
|
|
460
|
-
error:
|
|
461
|
-
className:
|
|
479
|
+
isSaving: c = !1,
|
|
480
|
+
error: l = null,
|
|
481
|
+
className: s,
|
|
462
482
|
onDraftChange: i,
|
|
463
483
|
onSave: y,
|
|
464
484
|
onClearConfig: x,
|
|
@@ -466,15 +486,15 @@ function Pr({
|
|
|
466
486
|
}) {
|
|
467
487
|
const [f, g] = m.useState(null), [T, F] = m.useState("light"), [$, z] = m.useState(!1), [we, R] = m.useState(
|
|
468
488
|
"idle"
|
|
469
|
-
), [ne, Se] = m.useState(!1), [D, _] = m.useState(""), [I, h] = m.useState(null), te = m.useRef(null),
|
|
489
|
+
), [ne, Se] = m.useState(!1), [D, _] = m.useState(""), [I, h] = m.useState(null), te = m.useRef(null), j = m.useRef(i), A = m.useRef(!1);
|
|
470
490
|
m.useEffect(() => {
|
|
471
|
-
|
|
491
|
+
j.current = i;
|
|
472
492
|
}, [i]), m.useEffect(() => {
|
|
473
493
|
if (e === void 0) {
|
|
474
494
|
A.current = !0, g(null);
|
|
475
495
|
return;
|
|
476
496
|
}
|
|
477
|
-
const o =
|
|
497
|
+
const o = J(e);
|
|
478
498
|
A.current = !0, g(o), F("light"), h(null);
|
|
479
499
|
}, [e]), m.useEffect(() => {
|
|
480
500
|
var o;
|
|
@@ -485,7 +505,7 @@ function Pr({
|
|
|
485
505
|
}
|
|
486
506
|
try {
|
|
487
507
|
const a = L(f);
|
|
488
|
-
(o =
|
|
508
|
+
(o = j.current) == null || o.call(j, a), h(null);
|
|
489
509
|
} catch (a) {
|
|
490
510
|
h(
|
|
491
511
|
a instanceof Error ? a.message : "Appearance is invalid"
|
|
@@ -493,13 +513,13 @@ function Pr({
|
|
|
493
513
|
}
|
|
494
514
|
}
|
|
495
515
|
}, [f]);
|
|
496
|
-
const p = f == null ? void 0 : f.schemes[T], V =
|
|
497
|
-
() => p ?
|
|
516
|
+
const p = f == null ? void 0 : f.schemes[T], V = c || $, Te = m.useMemo(
|
|
517
|
+
() => p ? pr(p.tokens.radius.control) : void 0,
|
|
498
518
|
[p]
|
|
499
519
|
), Fe = (o) => {
|
|
500
520
|
g((a) => {
|
|
501
521
|
if (!a) return a;
|
|
502
|
-
const k =
|
|
522
|
+
const k = gr(a);
|
|
503
523
|
return o(k), k;
|
|
504
524
|
});
|
|
505
525
|
}, b = (o) => {
|
|
@@ -524,13 +544,13 @@ function Pr({
|
|
|
524
544
|
z(!1);
|
|
525
545
|
}
|
|
526
546
|
}, Be = () => {
|
|
527
|
-
const o =
|
|
547
|
+
const o = J(null);
|
|
528
548
|
R("idle"), g(o);
|
|
529
549
|
}, Oe = async () => {
|
|
530
550
|
if (x) {
|
|
531
551
|
z(!0), h(null), R("idle");
|
|
532
552
|
try {
|
|
533
|
-
await x(), A.current = !0, g(
|
|
553
|
+
await x(), A.current = !0, g(J(null)), F("light");
|
|
534
554
|
} catch (o) {
|
|
535
555
|
h(
|
|
536
556
|
o instanceof Error ? o.message : "Unable to clear organization appearance"
|
|
@@ -559,7 +579,7 @@ function Pr({
|
|
|
559
579
|
);
|
|
560
580
|
}
|
|
561
581
|
}, ie = (o) => {
|
|
562
|
-
const a = JSON.parse(o), k =
|
|
582
|
+
const a = JSON.parse(o), k = J(a), P = L(k);
|
|
563
583
|
R("idle"), F("light"), g(k), _(JSON.stringify(P, null, 2));
|
|
564
584
|
}, Ee = () => {
|
|
565
585
|
try {
|
|
@@ -574,7 +594,7 @@ function Pr({
|
|
|
574
594
|
const a = (k = o.target.files) == null ? void 0 : k[0];
|
|
575
595
|
if (o.target.value = "", !!a)
|
|
576
596
|
try {
|
|
577
|
-
ie(await
|
|
597
|
+
ie(await br(a));
|
|
578
598
|
} catch (P) {
|
|
579
599
|
h(
|
|
580
600
|
P instanceof Error ? P.message : "Uploaded file must be a valid brand spec"
|
|
@@ -586,7 +606,7 @@ function Pr({
|
|
|
586
606
|
{
|
|
587
607
|
className: q(
|
|
588
608
|
"flex min-h-0 flex-1 flex-col bg-background text-foreground",
|
|
589
|
-
|
|
609
|
+
s
|
|
590
610
|
),
|
|
591
611
|
style: Te,
|
|
592
612
|
children: [
|
|
@@ -742,7 +762,7 @@ function Pr({
|
|
|
742
762
|
/* @__PURE__ */ r(se, { className: "h-3.5 w-3.5 text-destructive" }),
|
|
743
763
|
"Preview keeps the last valid draft"
|
|
744
764
|
] }) : /* @__PURE__ */ d(ce, { children: [
|
|
745
|
-
/* @__PURE__ */ r(
|
|
765
|
+
/* @__PURE__ */ r(je, { className: "h-3.5 w-3.5 text-emerald-500" }),
|
|
746
766
|
"Draft is applied to the live dashboard preview"
|
|
747
767
|
] }) }),
|
|
748
768
|
/* @__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(
|
|
@@ -760,7 +780,7 @@ function Pr({
|
|
|
760
780
|
)) })
|
|
761
781
|
] }),
|
|
762
782
|
I && /* @__PURE__ */ r("div", { className: "border-b border-destructive/20 bg-destructive/5 px-4 py-2 text-[12px] text-destructive", children: I }),
|
|
763
|
-
t ? /* @__PURE__ */ r("div", { className: "flex flex-1 items-center justify-center", children: /* @__PURE__ */ r(le, { className: "h-4 w-4 animate-spin text-muted-foreground" }) }) :
|
|
783
|
+
t ? /* @__PURE__ */ r("div", { className: "flex flex-1 items-center justify-center", children: /* @__PURE__ */ r(le, { className: "h-4 w-4 animate-spin text-muted-foreground" }) }) : l ? /* @__PURE__ */ r("div", { className: "p-4 text-[13px] text-muted-foreground", children: l }) : f && p ? /* @__PURE__ */ d(Je, { defaultValue: "style", className: "flex min-h-0 flex-1 flex-col", children: [
|
|
764
784
|
/* @__PURE__ */ r("div", { className: "shrink-0 px-4 pt-3", children: /* @__PURE__ */ d(Le, { variant: "underline", className: "w-full gap-5", children: [
|
|
765
785
|
/* @__PURE__ */ r(U, { value: "style", children: "Style" }),
|
|
766
786
|
/* @__PURE__ */ r(U, { value: "surfaces", children: "Surfaces" }),
|
|
@@ -780,7 +800,7 @@ function Pr({
|
|
|
780
800
|
type: "button",
|
|
781
801
|
className: "flex items-center gap-3 rounded-control border border-border/70 px-3 py-2 text-left hover:bg-muted/60",
|
|
782
802
|
onClick: () => {
|
|
783
|
-
const a =
|
|
803
|
+
const a = tr(f, o.id);
|
|
784
804
|
g(a);
|
|
785
805
|
},
|
|
786
806
|
children: [
|
|
@@ -816,7 +836,7 @@ function Pr({
|
|
|
816
836
|
icon: G,
|
|
817
837
|
title: "Color",
|
|
818
838
|
description: `Editing the ${T} scheme.`,
|
|
819
|
-
children: /* @__PURE__ */ r("div", { className: "grid grid-cols-2 gap-2", children:
|
|
839
|
+
children: /* @__PURE__ */ r("div", { className: "grid grid-cols-2 gap-2", children: ir.map(([o, a]) => /* @__PURE__ */ r(
|
|
820
840
|
v,
|
|
821
841
|
{
|
|
822
842
|
label: a,
|
|
@@ -837,7 +857,7 @@ function Pr({
|
|
|
837
857
|
description: "Fonts and density used by dashboard and workflow chrome.",
|
|
838
858
|
children: [
|
|
839
859
|
/* @__PURE__ */ r(
|
|
840
|
-
|
|
860
|
+
sr,
|
|
841
861
|
{
|
|
842
862
|
value: p.tokens.typography.fontFamily,
|
|
843
863
|
onChange: (o) => b((a) => {
|
|
@@ -869,7 +889,7 @@ function Pr({
|
|
|
869
889
|
["spacious", "Spacious"]
|
|
870
890
|
],
|
|
871
891
|
onChange: (o) => b((a) => {
|
|
872
|
-
a.tokens.typography.density = o, a.components.table.density = a.tokens.typography.density,
|
|
892
|
+
a.tokens.typography.density = o, a.components.table.density = a.tokens.typography.density, u(a, "aggregateTable"), u(a, "pivotTable");
|
|
873
893
|
})
|
|
874
894
|
}
|
|
875
895
|
)
|
|
@@ -1034,7 +1054,7 @@ function Pr({
|
|
|
1034
1054
|
title: "Charts",
|
|
1035
1055
|
description: "Palette and semantic chart text/grid colors.",
|
|
1036
1056
|
children: [
|
|
1037
|
-
/* @__PURE__ */ r("div", { className: "grid grid-cols-3 gap-2", children:
|
|
1057
|
+
/* @__PURE__ */ r("div", { className: "grid grid-cols-3 gap-2", children: cr.map((o) => /* @__PURE__ */ r(
|
|
1038
1058
|
v,
|
|
1039
1059
|
{
|
|
1040
1060
|
label: `Series ${o + 1}`,
|
|
@@ -1089,7 +1109,7 @@ function Pr({
|
|
|
1089
1109
|
["spacious", "Spacious"]
|
|
1090
1110
|
],
|
|
1091
1111
|
onChange: (o) => b((a) => {
|
|
1092
|
-
a.components.table.density = o,
|
|
1112
|
+
a.components.table.density = o, u(a, "aggregateTable"), u(a, "pivotTable");
|
|
1093
1113
|
})
|
|
1094
1114
|
}
|
|
1095
1115
|
),
|
|
@@ -1103,7 +1123,7 @@ function Pr({
|
|
|
1103
1123
|
["wrap", "Wrap"]
|
|
1104
1124
|
],
|
|
1105
1125
|
onChange: (o) => b((a) => {
|
|
1106
|
-
a.components.table.cell.wrap = o,
|
|
1126
|
+
a.components.table.cell.wrap = o, u(a, "aggregateTable"), u(a, "pivotTable");
|
|
1107
1127
|
})
|
|
1108
1128
|
}
|
|
1109
1129
|
)
|
|
@@ -1115,7 +1135,7 @@ function Pr({
|
|
|
1115
1135
|
label: "Header",
|
|
1116
1136
|
value: p.components.table.header.background,
|
|
1117
1137
|
onChange: (o) => b((a) => {
|
|
1118
|
-
a.components.table.header.background = o,
|
|
1138
|
+
a.components.table.header.background = o, u(a, "aggregateTable"), u(a, "pivotTable");
|
|
1119
1139
|
})
|
|
1120
1140
|
}
|
|
1121
1141
|
),
|
|
@@ -1125,7 +1145,7 @@ function Pr({
|
|
|
1125
1145
|
label: "Divider",
|
|
1126
1146
|
value: p.components.table.row.dividerColor,
|
|
1127
1147
|
onChange: (o) => b((a) => {
|
|
1128
|
-
a.components.table.row.dividerColor = o, a.components.table.header.dividerColor = o,
|
|
1148
|
+
a.components.table.row.dividerColor = o, a.components.table.header.dividerColor = o, u(a, "aggregateTable"), u(a, "pivotTable");
|
|
1129
1149
|
})
|
|
1130
1150
|
}
|
|
1131
1151
|
)
|
|
@@ -1136,7 +1156,7 @@ function Pr({
|
|
|
1136
1156
|
label: "Zebra rows",
|
|
1137
1157
|
checked: p.components.table.row.zebra,
|
|
1138
1158
|
onCheckedChange: (o) => b((a) => {
|
|
1139
|
-
a.components.table.row.zebra = o,
|
|
1159
|
+
a.components.table.row.zebra = o, u(a, "aggregateTable"), u(a, "pivotTable");
|
|
1140
1160
|
})
|
|
1141
1161
|
}
|
|
1142
1162
|
),
|
|
@@ -1146,7 +1166,7 @@ function Pr({
|
|
|
1146
1166
|
label: "Sticky headers",
|
|
1147
1167
|
checked: p.components.table.header.sticky,
|
|
1148
1168
|
onCheckedChange: (o) => b((a) => {
|
|
1149
|
-
a.components.table.header.sticky = o,
|
|
1169
|
+
a.components.table.header.sticky = o, u(a, "aggregateTable"), u(a, "pivotTable");
|
|
1150
1170
|
})
|
|
1151
1171
|
}
|
|
1152
1172
|
),
|
|
@@ -1156,7 +1176,7 @@ function Pr({
|
|
|
1156
1176
|
label: "Uppercase headers",
|
|
1157
1177
|
checked: p.components.table.header.uppercase,
|
|
1158
1178
|
onCheckedChange: (o) => b((a) => {
|
|
1159
|
-
a.components.table.header.uppercase = o,
|
|
1179
|
+
a.components.table.header.uppercase = o, u(a, "aggregateTable"), u(a, "pivotTable");
|
|
1160
1180
|
})
|
|
1161
1181
|
}
|
|
1162
1182
|
)
|
|
@@ -1174,7 +1194,7 @@ function N({
|
|
|
1174
1194
|
icon: e,
|
|
1175
1195
|
title: n,
|
|
1176
1196
|
description: t,
|
|
1177
|
-
children:
|
|
1197
|
+
children: c
|
|
1178
1198
|
}) {
|
|
1179
1199
|
return /* @__PURE__ */ d("section", { className: "mb-6 last:mb-0", children: [
|
|
1180
1200
|
/* @__PURE__ */ d("div", { className: "mb-3 flex items-start gap-2", children: [
|
|
@@ -1184,16 +1204,16 @@ function N({
|
|
|
1184
1204
|
/* @__PURE__ */ r("p", { className: "mt-0.5 text-[12px] leading-4 text-muted-foreground", children: t })
|
|
1185
1205
|
] })
|
|
1186
1206
|
] }),
|
|
1187
|
-
/* @__PURE__ */ r("div", { className: "space-y-2", children:
|
|
1207
|
+
/* @__PURE__ */ r("div", { className: "space-y-2", children: c }),
|
|
1188
1208
|
/* @__PURE__ */ r(Me, { className: "mt-5 bg-border/60" })
|
|
1189
1209
|
] });
|
|
1190
1210
|
}
|
|
1191
|
-
function
|
|
1211
|
+
function sr({
|
|
1192
1212
|
value: e,
|
|
1193
1213
|
onChange: n
|
|
1194
1214
|
}) {
|
|
1195
|
-
var
|
|
1196
|
-
const t = (
|
|
1215
|
+
var c;
|
|
1216
|
+
const t = (c = H.find((l) => l.value === e)) == null ? void 0 : c.id;
|
|
1197
1217
|
return /* @__PURE__ */ d("div", { children: [
|
|
1198
1218
|
/* @__PURE__ */ r(E, { className: "mb-1 block text-[11px] font-normal text-muted-foreground", children: "Font family" }),
|
|
1199
1219
|
/* @__PURE__ */ d("div", { className: "grid grid-cols-[minmax(0,1fr)_150px] gap-2", children: [
|
|
@@ -1201,15 +1221,15 @@ function lr({
|
|
|
1201
1221
|
ke,
|
|
1202
1222
|
{
|
|
1203
1223
|
value: t,
|
|
1204
|
-
onValueChange: (
|
|
1205
|
-
const
|
|
1206
|
-
(i) => i.id ===
|
|
1224
|
+
onValueChange: (l) => {
|
|
1225
|
+
const s = H.find(
|
|
1226
|
+
(i) => i.id === l
|
|
1207
1227
|
);
|
|
1208
|
-
|
|
1228
|
+
s && n(s.value);
|
|
1209
1229
|
},
|
|
1210
1230
|
children: [
|
|
1211
1231
|
/* @__PURE__ */ r(xe, { size: "xs", "aria-label": "Font family preset", children: /* @__PURE__ */ r(ye, { placeholder: "Select font" }) }),
|
|
1212
|
-
/* @__PURE__ */ r(ve, { children: H.map((
|
|
1232
|
+
/* @__PURE__ */ r(ve, { children: H.map((l) => /* @__PURE__ */ r(Ce, { value: l.id, children: l.label }, l.id)) })
|
|
1213
1233
|
]
|
|
1214
1234
|
}
|
|
1215
1235
|
),
|
|
@@ -1228,10 +1248,10 @@ function v({
|
|
|
1228
1248
|
label: e,
|
|
1229
1249
|
tooltip: n,
|
|
1230
1250
|
value: t,
|
|
1231
|
-
onChange:
|
|
1251
|
+
onChange: c
|
|
1232
1252
|
}) {
|
|
1233
|
-
const [
|
|
1234
|
-
|
|
1253
|
+
const [l, s] = m.useState(!1), [i, y] = m.useState(t), x = ur(t), S = t !== i, f = (g) => {
|
|
1254
|
+
s(g), g && y(t);
|
|
1235
1255
|
};
|
|
1236
1256
|
return /* @__PURE__ */ d("div", { className: "block", children: [
|
|
1237
1257
|
/* @__PURE__ */ d("div", { className: "mb-1 flex items-center gap-1", children: [
|
|
@@ -1250,7 +1270,7 @@ function v({
|
|
|
1250
1270
|
] }) }) : null
|
|
1251
1271
|
] }),
|
|
1252
1272
|
/* @__PURE__ */ d("div", { className: "flex h-7 items-center overflow-hidden rounded-control border border-input bg-background", children: [
|
|
1253
|
-
/* @__PURE__ */ d(ge, { open:
|
|
1273
|
+
/* @__PURE__ */ d(ge, { open: l, onOpenChange: f, children: [
|
|
1254
1274
|
/* @__PURE__ */ r(be, { asChild: !0, children: /* @__PURE__ */ r(
|
|
1255
1275
|
"button",
|
|
1256
1276
|
{
|
|
@@ -1281,7 +1301,7 @@ function v({
|
|
|
1281
1301
|
"aria-label": `${e} native color picker`,
|
|
1282
1302
|
type: "color",
|
|
1283
1303
|
value: x,
|
|
1284
|
-
onChange: (g) =>
|
|
1304
|
+
onChange: (g) => c(g.target.value),
|
|
1285
1305
|
className: "absolute inset-0 h-full w-full cursor-pointer opacity-0"
|
|
1286
1306
|
}
|
|
1287
1307
|
),
|
|
@@ -1300,7 +1320,7 @@ function v({
|
|
|
1300
1320
|
"aria-label": `Reset ${e} color to previous value`,
|
|
1301
1321
|
disabled: !S,
|
|
1302
1322
|
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",
|
|
1303
|
-
onClick: () =>
|
|
1323
|
+
onClick: () => c(i),
|
|
1304
1324
|
children: /* @__PURE__ */ r(me, { className: "h-3 w-3" })
|
|
1305
1325
|
}
|
|
1306
1326
|
) }),
|
|
@@ -1313,13 +1333,13 @@ function v({
|
|
|
1313
1333
|
size: "xs",
|
|
1314
1334
|
"aria-label": `${e} popover color value`,
|
|
1315
1335
|
value: t,
|
|
1316
|
-
onChange: (g) =>
|
|
1336
|
+
onChange: (g) => c(g.target.value),
|
|
1317
1337
|
className: "font-mono"
|
|
1318
1338
|
}
|
|
1319
1339
|
)
|
|
1320
1340
|
] })
|
|
1321
1341
|
] }),
|
|
1322
|
-
/* @__PURE__ */ r("div", { className: "mt-2 grid grid-cols-6 gap-1", children:
|
|
1342
|
+
/* @__PURE__ */ r("div", { className: "mt-2 grid grid-cols-6 gap-1", children: lr.map((g) => /* @__PURE__ */ r(
|
|
1323
1343
|
"button",
|
|
1324
1344
|
{
|
|
1325
1345
|
type: "button",
|
|
@@ -1329,7 +1349,7 @@ function v({
|
|
|
1329
1349
|
t.toLowerCase() === g && "ring-2 ring-ring"
|
|
1330
1350
|
),
|
|
1331
1351
|
style: { backgroundColor: g },
|
|
1332
|
-
onClick: () =>
|
|
1352
|
+
onClick: () => c(g)
|
|
1333
1353
|
},
|
|
1334
1354
|
g
|
|
1335
1355
|
)) })
|
|
@@ -1343,14 +1363,14 @@ function v({
|
|
|
1343
1363
|
size: "xs",
|
|
1344
1364
|
"aria-label": `${e} color value`,
|
|
1345
1365
|
value: t,
|
|
1346
|
-
onChange: (g) =>
|
|
1366
|
+
onChange: (g) => c(g.target.value),
|
|
1347
1367
|
className: "h-full border-0 px-2 font-mono shadow-none focus-visible:border-0"
|
|
1348
1368
|
}
|
|
1349
1369
|
)
|
|
1350
1370
|
] })
|
|
1351
1371
|
] });
|
|
1352
1372
|
}
|
|
1353
|
-
function
|
|
1373
|
+
function ur(e) {
|
|
1354
1374
|
const n = He(e);
|
|
1355
1375
|
return n ? `#${X(n.r)}${X(n.g)}${X(n.b)}` : "#000000";
|
|
1356
1376
|
}
|
|
@@ -1361,9 +1381,9 @@ function w({
|
|
|
1361
1381
|
label: e,
|
|
1362
1382
|
tooltip: n,
|
|
1363
1383
|
value: t,
|
|
1364
|
-
min:
|
|
1365
|
-
max:
|
|
1366
|
-
onChange:
|
|
1384
|
+
min: c,
|
|
1385
|
+
max: l,
|
|
1386
|
+
onChange: s
|
|
1367
1387
|
}) {
|
|
1368
1388
|
const i = m.useId();
|
|
1369
1389
|
return /* @__PURE__ */ d("div", { className: "block", children: [
|
|
@@ -1395,12 +1415,12 @@ function w({
|
|
|
1395
1415
|
id: i,
|
|
1396
1416
|
size: "xs",
|
|
1397
1417
|
type: "number",
|
|
1398
|
-
min:
|
|
1399
|
-
max:
|
|
1418
|
+
min: c,
|
|
1419
|
+
max: l,
|
|
1400
1420
|
value: t,
|
|
1401
1421
|
onChange: (y) => {
|
|
1402
1422
|
const x = Number(y.target.value);
|
|
1403
|
-
Number.isNaN(x) ||
|
|
1423
|
+
Number.isNaN(x) || s(x);
|
|
1404
1424
|
}
|
|
1405
1425
|
}
|
|
1406
1426
|
)
|
|
@@ -1410,13 +1430,13 @@ function Y({
|
|
|
1410
1430
|
label: e,
|
|
1411
1431
|
value: n,
|
|
1412
1432
|
options: t,
|
|
1413
|
-
onChange:
|
|
1433
|
+
onChange: c
|
|
1414
1434
|
}) {
|
|
1415
1435
|
return /* @__PURE__ */ d("div", { children: [
|
|
1416
1436
|
/* @__PURE__ */ r(E, { className: "mb-1 block text-[11px] font-normal text-muted-foreground", children: e }),
|
|
1417
|
-
/* @__PURE__ */ d(ke, { value: n, onValueChange:
|
|
1437
|
+
/* @__PURE__ */ d(ke, { value: n, onValueChange: c, children: [
|
|
1418
1438
|
/* @__PURE__ */ r(xe, { size: "xs", children: /* @__PURE__ */ r(ye, {}) }),
|
|
1419
|
-
/* @__PURE__ */ r(ve, { children: t.map(([
|
|
1439
|
+
/* @__PURE__ */ r(ve, { children: t.map(([l, s]) => /* @__PURE__ */ r(Ce, { value: l, children: s }, l)) })
|
|
1420
1440
|
] })
|
|
1421
1441
|
] });
|
|
1422
1442
|
}
|
|
@@ -1430,27 +1450,27 @@ function Z({
|
|
|
1430
1450
|
/* @__PURE__ */ r(Ge, { size: "xs", checked: n, onCheckedChange: t })
|
|
1431
1451
|
] });
|
|
1432
1452
|
}
|
|
1433
|
-
function
|
|
1453
|
+
function pr(e) {
|
|
1434
1454
|
const n = `${Number((e / 16).toFixed(4))}rem`;
|
|
1435
1455
|
return {
|
|
1436
1456
|
"--semaphor-radius": n,
|
|
1437
1457
|
"--semaphor-control-radius": n
|
|
1438
1458
|
};
|
|
1439
1459
|
}
|
|
1440
|
-
function
|
|
1460
|
+
function gr(e) {
|
|
1441
1461
|
return JSON.parse(JSON.stringify(e));
|
|
1442
1462
|
}
|
|
1443
|
-
function
|
|
1463
|
+
function br(e) {
|
|
1444
1464
|
return typeof e.text == "function" ? e.text() : new Promise((n, t) => {
|
|
1445
|
-
const
|
|
1446
|
-
|
|
1465
|
+
const c = new FileReader();
|
|
1466
|
+
c.onload = () => n(String(c.result ?? "")), c.onerror = () => t(c.error ?? new Error("Unable to read file")), c.readAsText(e);
|
|
1447
1467
|
});
|
|
1448
1468
|
}
|
|
1449
1469
|
export {
|
|
1450
1470
|
Ne as BRAND_STUDIO_PRESETS,
|
|
1451
|
-
|
|
1452
|
-
|
|
1471
|
+
Br as BrandStudioEditor,
|
|
1472
|
+
tr as applyBrandStudioPreset,
|
|
1453
1473
|
L as buildAppearanceSpecFromDraft,
|
|
1454
|
-
|
|
1455
|
-
|
|
1474
|
+
J as createBrandStudioDraft,
|
|
1475
|
+
u as mirrorTableAppearance
|
|
1456
1476
|
};
|