react-semaphor 0.1.568 → 0.1.570
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/README.md +0 -7
- package/dist/analytics-protocol/index.js +434 -454
- package/dist/appearance/index.js +6 -3
- package/dist/appearance-runtime/index.js +1 -1
- package/dist/assistant-context/index.js +1 -1
- package/dist/brand-studio/index.js +572 -436
- package/dist/briefings/index.js +4 -4
- package/dist/chunks/appearance-context-BwBp25ZG.js +162 -0
- package/dist/chunks/appearance-runtime-provider-BRHYELkC.js +80 -0
- package/dist/chunks/assistant-chat-B-Ddyy8b.js +5940 -0
- package/dist/chunks/{bookmark-impact-CJ-65omV.js → bookmark-impact-DCYD-6Fr.js} +2 -2
- package/dist/chunks/{bookmark-state-Du3s13_V.js → bookmark-state-CflS88gq.js} +251 -250
- package/dist/chunks/brand-B4BdpAB_.js +54 -0
- package/dist/chunks/{card-filter-builder-BBuB99GZ.js → card-filter-builder-0VvKmRst.js} +992 -991
- package/dist/chunks/{comparison-window-caption-CMLb3mut.js → comparison-window-caption-PtcDWvkN.js} +252 -253
- package/dist/chunks/{dashboard-YnWZC4dK.js → dashboard-DxGIr1vZ.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-BF89TU2h.js → dashboard-briefing-launcher-B-quOOOQ.js} +253 -253
- package/dist/chunks/{dashboard-controls-atHc1EjP.js → dashboard-controls-Caodx80b.js} +288 -285
- package/dist/chunks/dashboard-json-Ct-AGDHF.js +66 -0
- package/dist/chunks/{dates-CKO05ino.js → dates-B9mL8BHE.js} +16 -15
- package/dist/chunks/edit-Bpdh_P_a.js +226 -0
- package/dist/chunks/{edit-dashboard-visual-DdmTfn-J.js → edit-dashboard-visual-DeDTuYB5.js} +2257 -2270
- package/dist/chunks/{filter-reach-copy-jZGzK_IH.js → filter-reach-copy-BSY33ro5.js} +1440 -1301
- package/dist/chunks/filter-value-text-DvvSNlho.js +146 -0
- package/dist/chunks/index-BVKzKl5d.js +90 -0
- package/dist/chunks/{index-RNaTnE3m.js → index-CV_Kzou0.js} +233 -223
- package/dist/chunks/{index-CPNZW0mu.js → index-y3HUzRNk.js} +76 -77
- package/dist/chunks/{layout-grid-0hIlqEtk.js → layout-grid-8rR-LPTk.js} +1 -1
- package/dist/chunks/{list-filter-DkgoCeBm.js → list-filter-C1-uTgjR.js} +1 -1
- package/dist/chunks/matrix-analytical-definition-dkS8szLM.js +1253 -0
- package/dist/chunks/matrix-member-presentation-DRa-9e6Q.js +169 -0
- package/dist/chunks/{matrix-operation-contract-Eb6elidS.js → matrix-operation-contract-DCVinw1o.js} +122 -122
- package/dist/chunks/{metric-comparison-ChXUFaZu.js → metric-comparison-n9NsIa-2.js} +175 -128
- package/dist/chunks/paintbrush-aR17Z3C9.js +27 -0
- package/dist/chunks/{palette-4vf2BEEg.js → palette-a5FCZKFI.js} +1 -1
- package/dist/chunks/{_commonjsHelpers-DimLPMtv.js → pickers-DkqmtnTL.js} +352 -290
- package/dist/chunks/pivot-result-contract-expectations-C-HnUKYe.js +55 -0
- package/dist/chunks/{pivot-result-identity-BlbLrqaC.js → pivot-result-identity-B89X5xjb.js} +1 -1
- package/dist/chunks/raw-temporal-value-DdT0s47W.js +159 -0
- package/dist/chunks/{report-preferences-dialog-Mbd-I0wV.js → report-preferences-dialog-Yvhv3WX2.js} +95 -97
- package/dist/chunks/{report-runtime-context-DnA_PiKo.js → report-runtime-context-BhPzLTbS.js} +1 -1
- package/dist/chunks/{resolve-dashboard-input-context-Du0fjN3h.js → resolve-dashboard-input-context-Lkbwycwe.js} +5491 -5683
- package/dist/chunks/resolver-DG_tfEpt.js +156 -0
- package/dist/chunks/{save-D6pHmSSP.js → save-D985VvYp.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-y8N6RvjS.js → saved-dashboard-context-DC_TEd6y.js} +6 -6
- package/dist/chunks/schema-C9NPiIru.js +2568 -0
- package/dist/chunks/{semaphor-ready-indicator-BSEdUq40.js → semaphor-ready-indicator-ByFvqHEO.js} +35916 -36001
- package/dist/chunks/{shelf-drop-preview-context-D7QqPl36.js → shelf-drop-preview-context-CjoVaK6J.js} +64 -66
- package/dist/chunks/{stored-dashboard-d3xQYxBD.js → stored-dashboard-C0hekXiI.js} +332 -333
- package/dist/chunks/{code-editor-DJNOsgJH.js → style-sheet-parts-C7qGZuH1.js} +2402 -2040
- package/dist/chunks/{table-export-sheet--DUKWk6o.js → table-export-sheet-CP8zSOhj.js} +1 -1
- package/dist/chunks/{temporal-input-presentation--2r9BLr0.js → temporal-input-presentation-CqbJjIuu.js} +18 -18
- package/dist/chunks/{token-types-C8JymO8s.js → token-types-iKMplaBL.js} +1 -1
- package/dist/chunks/{upload-Cf3wXZT8.js → upload-CiGNKJ_0.js} +1 -1
- package/dist/chunks/validators-B8fpdinG.js +3651 -0
- package/dist/chunks/{variable-draft-DOX03R4A.js → variable-draft-9-huI1h4.js} +4 -4
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +1888 -1826
- package/dist/format-utils/index.js +230 -231
- package/dist/index.js +349 -353
- package/dist/layouts/index.js +1 -1
- package/dist/report-runtime-context/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/appearance/index.d.ts +1 -0
- package/dist/types/brand-studio/brand-studio-draft.d.ts +7 -0
- package/dist/types/brand-studio/index.d.ts +1 -1
- package/dist/types/components/briefings/briefing-author/run-model.d.ts +1 -2
- package/dist/types/components/providers/appearance-runtime-provider.d.ts +4 -1
- package/dist/types/components/sharing-and-management/hooks/use-resource-management.d.ts +0 -2
- package/dist/types/components/sharing-and-management/utils/types.d.ts +0 -72
- package/dist/types/components/surfboard/filter/types.d.ts +5 -4
- package/dist/types/components/ui-custom/date-range-presets.d.ts +1 -17
- package/dist/types/components/visual/data-table/hooks/use-data-table-logic.d.ts +0 -1
- package/dist/types/components/visual/data-table/types/data-table.d.ts +0 -9
- package/dist/types/components/visual/data-table/utils/pagination-utils.d.ts +0 -19
- package/dist/types/components/visual/shared/utils/table-column-order.d.ts +0 -1
- package/dist/types/index.js +9 -9
- package/dist/types/lib/appearance/aliases.d.ts +42 -0
- package/dist/types/lib/appearance/compiler.d.ts +6 -0
- package/dist/types/lib/appearance/defaults.d.ts +6 -0
- package/dist/types/lib/appearance/index.d.ts +2 -0
- package/dist/types/lib/appearance/normalize-organization.d.ts +17 -0
- package/dist/types/lib/appearance/resolver.d.ts +2 -2
- package/dist/types/lib/appearance/types.d.ts +38 -1
- package/dist/types/lib/charts/types.d.ts +6 -2
- package/dist/types/lib/dashboard/semantic-dataset-references.d.ts +0 -1
- package/dist/types/lib/dashboard-inputs/dashboard-input-values.d.ts +0 -2
- package/dist/types/lib/dashboard-variables/types.d.ts +1 -6
- package/dist/types/lib/download-pdf.d.ts +0 -1
- package/dist/types/lib/hooks/use-dashboard.d.ts +3 -4
- package/dist/types/lib/hooks/use-date-filter.d.ts +3 -3
- package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +1 -1
- package/dist/types/lib/stores/dashboard-store.d.ts +15 -6
- package/dist/types/lib/stores/editor-store.d.ts +0 -1
- package/dist/types/lib/stores/table-actions.d.ts +0 -1
- package/dist/types/lib/table-formatting/table-formatting-css.d.ts +0 -5
- package/dist/types/lib/types/common-types.d.ts +3 -2
- package/dist/types/lib/types/explorer-types.d.ts +2 -2
- package/dist/types/lib/types/index.d.ts +1 -1
- package/dist/types/lib/types/summary-types.d.ts +0 -5
- package/dist/types/lib/utils/card-definition.d.ts +7 -7
- package/dist/types/shared/analytics-protocol/agent-time-window.d.ts +84 -0
- package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +4 -4
- package/dist/types/shared/analytics-protocol/applied-constraints.d.ts +2 -2
- package/dist/types/shared/analytics-protocol/contracts.d.ts +8 -17
- package/dist/types/shared/analytics-protocol/execution-input-schemas.d.ts +10 -10
- package/dist/types/shared/analytics-protocol/fixtures.d.ts +3 -2
- package/dist/types/shared/analytics-protocol/index.d.ts +2 -4
- package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +72 -72
- package/dist/types/shared/analytics-protocol/relative-date/describe.d.ts +18 -0
- package/dist/types/shared/analytics-protocol/relative-date/index.d.ts +7 -0
- package/dist/types/shared/analytics-protocol/relative-date/limits.d.ts +3 -0
- package/dist/types/shared/analytics-protocol/relative-date/presets.d.ts +11 -0
- package/dist/types/shared/analytics-protocol/relative-date/resolve.d.ts +49 -0
- package/dist/types/shared/analytics-protocol/relative-date/schemas.d.ts +76 -0
- package/dist/types/shared/analytics-protocol/relative-date/traits.d.ts +51 -0
- package/dist/types/shared/analytics-protocol/relative-date/window.d.ts +111 -0
- package/dist/types/shared/analytics-protocol/selection-contract.d.ts +1 -1
- package/dist/types/shared/assistant-protocol/context.d.ts +30 -30
- package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +0 -2
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +344 -1772
- package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +4 -1
- package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +8 -4
- package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +9 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +104 -104
- package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +20 -20
- package/dist/types/shared/dashboard-authoring/dashboard-style/bounds.d.ts +17 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/brand.d.ts +20 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/edit-words.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/edit.d.ts +19 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/index.d.ts +15 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/layers.d.ts +19 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/legacy.d.ts +21 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/parse.d.ts +18 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/pickers.d.ts +12 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/types.d.ts +122 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/view.d.ts +10 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +11 -0
- package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +23 -0
- package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +10 -2
- package/dist/types/shared/format-utils/filter-detail.d.ts +2 -8
- package/dist/types/shared/format-utils/filter-line.d.ts +2 -2
- package/dist/types/shared/format-utils/matrix-continuation.d.ts +10 -10
- package/dist/types/shared/temporal/index.d.ts +0 -2
- package/dist/types/shared/temporal/temporal-parity-fixtures.d.ts +2 -2
- package/package.json +7 -26
- package/DATA_APP_SDK.md +0 -339
- package/dist/chunks/appearance-context-DEYtWinQ.js +0 -126
- package/dist/chunks/appearance-runtime-provider-B-M8gwlZ.js +0 -81
- package/dist/chunks/assistant-chat-BN5I8KuN.js +0 -8849
- package/dist/chunks/color-CJvdlFM_.js +0 -2162
- package/dist/chunks/dashboard-json-Cxp3inxd.js +0 -68
- package/dist/chunks/filter-value-text-7zhmth1S.js +0 -163
- package/dist/chunks/index-CLIro-EG.js +0 -425
- package/dist/chunks/index-CuHybtft.js +0 -51
- package/dist/chunks/matrix-analytical-definition-C9xB_T84.js +0 -717
- package/dist/chunks/matrix-card-BSUeSXpD.js +0 -42
- package/dist/chunks/matrix-member-presentation-DZNgQpUq.js +0 -105
- package/dist/chunks/operators-B3zZoskU.js +0 -66
- package/dist/chunks/pivot-result-contract-expectations-Ddh1rNz5.js +0 -56
- package/dist/chunks/raw-temporal-value-Bqz8wc7L.js +0 -242
- package/dist/chunks/selection-reducer-OaJ-N5uN.js +0 -46
- package/dist/chunks/source-entity-resolution-DF6GulDn.js +0 -607
- package/dist/chunks/validators-wtjw0aw6.js +0 -3332
- package/dist/data-app-sdk/index.js +0 -1412
- package/dist/data-app-sdk-adapters/index.js +0 -361
- package/dist/data-app-sdk-validation/index.js +0 -1031
- package/dist/types/components/sharing-and-management/utils/group-types.d.ts +0 -105
- package/dist/types/data-app-sdk/adapters.d.ts +0 -35
- package/dist/types/data-app-sdk/builders.d.ts +0 -62
- package/dist/types/data-app-sdk/contracts.d.ts +0 -419
- package/dist/types/data-app-sdk/executor.d.ts +0 -5
- package/dist/types/data-app-sdk/field-catalog-validation.d.ts +0 -29
- package/dist/types/data-app-sdk/hooks.d.ts +0 -11
- package/dist/types/data-app-sdk/index.d.ts +0 -9
- package/dist/types/data-app-sdk/provider.d.ts +0 -8
- package/dist/types/data-app-sdk/relationship-aware-field-policy.d.ts +0 -21
- package/dist/types/data-app-sdk/selection.d.ts +0 -2
- package/dist/types/data-app-sdk/validation.d.ts +0 -58
- package/dist/types/data-app-sdk-adapters.d.ts +0 -2
- package/dist/types/data-app-sdk-validation.d.ts +0 -2
- package/dist/types/data-app-sdk.d.ts +0 -2
- package/dist/types/shared/analytics-protocol/relative-date-filter.d.ts +0 -68
- package/dist/types/shared/analytics-protocol/relative-date-label.d.ts +0 -20
- package/dist/types/shared/analytics-protocol/time-window-schema.d.ts +0 -314
- package/dist/types/shared/analytics-protocol/time-window.d.ts +0 -52
- package/dist/types/shared/temporal/relative-date.d.ts +0 -21
- package/dist/types/shared/temporal/time-window-periods.d.ts +0 -21
- package/src/data-app-sdk/README.md +0 -402
package/dist/briefings/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "../chunks/temporal-input-presentation
|
|
2
|
-
import "../chunks/validators-
|
|
1
|
+
import "../chunks/temporal-input-presentation-CqbJjIuu.js";
|
|
2
|
+
import "../chunks/validators-B8fpdinG.js";
|
|
3
3
|
import "../chunks/export-file-format-C-tJsxsf.js";
|
|
4
4
|
import "zod";
|
|
5
|
-
import "../chunks/matrix-operation-contract-
|
|
5
|
+
import "../chunks/matrix-operation-contract-DCVinw1o.js";
|
|
6
6
|
import "../chunks/analytics-base-schemas-BaIQrEzX.js";
|
|
7
7
|
import "../value-format-preferences/index.js";
|
|
8
|
-
import { A as g, J as l, a2 as B, F as m, a4 as E, z as c, B as I, E as T, K as d, C, D as u, M as A, Z as h, i as p, _ as D, $ as _, a5 as b, n as F, l as S, m as R, P as N, k as y, R as M, f as O, e as G, S as v, u as x, q as L, c as U, d as V, I as z, H, h as J, b as P, a as q, a6 as X, g as K, a0 as Q, V as Y, a3 as j, W as k, G as W, a1 as Z, r as $, j as w, X as ee, Y as ie, o as ae, L as re, Q as te, O as se, p as ne, s as oe, t as fe, N as ge, T as le, U as Be } from "../chunks/index-
|
|
8
|
+
import { A as g, J as l, a2 as B, F as m, a4 as E, z as c, B as I, E as T, K as d, C, D as u, M as A, Z as h, i as p, _ as D, $ as _, a5 as b, n as F, l as S, m as R, P as N, k as y, R as M, f as O, e as G, S as v, u as x, q as L, c as U, d as V, I as z, H, h as J, b as P, a as q, a6 as X, g as K, a0 as Q, V as Y, a3 as j, W as k, G as W, a1 as Z, r as $, j as w, X as ee, Y as ie, o as ae, L as re, Q as te, O as se, p as ne, s as oe, t as fe, N as ge, T as le, U as Be } from "../chunks/index-y3HUzRNk.js";
|
|
9
9
|
export {
|
|
10
10
|
g as BRIEFING_ARTIFACT_FORMATS,
|
|
11
11
|
l as BRIEFING_ATTACHMENT_FORMATS,
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { createContext as A, useContext as g } from "react";
|
|
2
|
+
import { S, c as C, a as E } from "./schema-C9NPiIru.js";
|
|
3
|
+
import { b as R } from "./resolver-DG_tfEpt.js";
|
|
4
|
+
const _ = {
|
|
5
|
+
background: "--semaphor-background",
|
|
6
|
+
foreground: "--semaphor-foreground",
|
|
7
|
+
muted: "--semaphor-muted",
|
|
8
|
+
mutedForeground: "--semaphor-muted-foreground",
|
|
9
|
+
border: "--semaphor-border",
|
|
10
|
+
input: "--semaphor-input",
|
|
11
|
+
primary: "--semaphor-primary",
|
|
12
|
+
primaryForeground: "--semaphor-primary-foreground",
|
|
13
|
+
accent: "--semaphor-accent",
|
|
14
|
+
accentForeground: "--semaphor-accent-foreground",
|
|
15
|
+
selection: "--semaphor-selection",
|
|
16
|
+
card: "--semaphor-card",
|
|
17
|
+
cardForeground: "--semaphor-card-foreground",
|
|
18
|
+
positive: "--semaphor-positive",
|
|
19
|
+
negative: "--semaphor-negative",
|
|
20
|
+
warning: "--semaphor-warning",
|
|
21
|
+
info: "--semaphor-info",
|
|
22
|
+
destructive: "--semaphor-destructive",
|
|
23
|
+
destructiveForeground: "--semaphor-destructive-foreground"
|
|
24
|
+
}, x = {
|
|
25
|
+
light: {
|
|
26
|
+
"--semaphor-code-string": "158 64% 22%",
|
|
27
|
+
"--semaphor-code-number": "158 64% 22%",
|
|
28
|
+
"--semaphor-code-boolean": "158 64% 22%",
|
|
29
|
+
"--semaphor-code-fn": "217 91% 40%",
|
|
30
|
+
"--semaphor-code-keyword": "263 70% 42%"
|
|
31
|
+
},
|
|
32
|
+
dark: {
|
|
33
|
+
"--semaphor-code-string": "158 64% 52%",
|
|
34
|
+
"--semaphor-code-number": "158 64% 52%",
|
|
35
|
+
"--semaphor-code-boolean": "158 64% 52%",
|
|
36
|
+
"--semaphor-code-fn": "213 94% 68%",
|
|
37
|
+
"--semaphor-code-keyword": "264 89% 74%"
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
function k(o) {
|
|
41
|
+
var a, c, i, d;
|
|
42
|
+
const e = o.defaults ?? S, r = o.mode ?? v(o.spec.mode, o.systemMode), n = b(o.spec.schemes[r] ?? e.schemes[r]), t = ((a = n.tokens) == null ? void 0 : a.color) ?? {}, m = {
|
|
43
|
+
...x[r]
|
|
44
|
+
};
|
|
45
|
+
for (const [f, u] of Object.entries(_)) {
|
|
46
|
+
const p = t[f];
|
|
47
|
+
if (!p) continue;
|
|
48
|
+
const h = C(p);
|
|
49
|
+
if (!h)
|
|
50
|
+
throw new Error(`Invalid compiled appearance color for ${f}`);
|
|
51
|
+
m[u] = h;
|
|
52
|
+
}
|
|
53
|
+
z(m, (c = n.tokens) == null ? void 0 : c.radius), w(m, (i = n.tokens) == null ? void 0 : i.typography);
|
|
54
|
+
const s = O(n, e.schemes[r], r);
|
|
55
|
+
return {
|
|
56
|
+
mode: r,
|
|
57
|
+
scheme: n,
|
|
58
|
+
cssVariables: m,
|
|
59
|
+
colorValues: t,
|
|
60
|
+
chartPalette: s.palette,
|
|
61
|
+
chartTheme: s,
|
|
62
|
+
table: (d = n.components) == null ? void 0 : d.table
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
const P = {
|
|
66
|
+
light: { background: "#fff", title: "#000", body: "#000", footer: "#999", border: "rgb(128,131,139)", cornerRadius: 4 },
|
|
67
|
+
dark: { background: "#000", title: "#fff", body: "#fff", footer: "#999", border: "rgb(128,131,139)", cornerRadius: 2 }
|
|
68
|
+
}, T = 2;
|
|
69
|
+
function O(o, e, r) {
|
|
70
|
+
var a, c, i, d, f, u, p;
|
|
71
|
+
const n = (a = o.components) == null ? void 0 : a.chart, t = (c = o.tokens) == null ? void 0 : c.typography, m = (i = e.tokens) == null ? void 0 : i.typography, s = (t == null ? void 0 : t.baseFontSize) ?? (m == null ? void 0 : m.baseFontSize) ?? 14;
|
|
72
|
+
return {
|
|
73
|
+
mode: r,
|
|
74
|
+
palette: (n == null ? void 0 : n.palette) ?? ((f = (d = e.components) == null ? void 0 : d.chart) == null ? void 0 : f.palette) ?? E,
|
|
75
|
+
font: {
|
|
76
|
+
family: (t == null ? void 0 : t.fontFamily) ?? (m == null ? void 0 : m.fontFamily) ?? "",
|
|
77
|
+
size: s - T
|
|
78
|
+
},
|
|
79
|
+
gridColor: n == null ? void 0 : n.gridColor,
|
|
80
|
+
axisColor: (n == null ? void 0 : n.axisColor) ?? (n == null ? void 0 : n.foreground),
|
|
81
|
+
legendColor: n == null ? void 0 : n.foreground,
|
|
82
|
+
tooltip: P[r],
|
|
83
|
+
barRadius: (n == null ? void 0 : n.barRadius) ?? ((p = (u = e.components) == null ? void 0 : u.chart) == null ? void 0 : p.barRadius) ?? 0
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
function w(o, e) {
|
|
87
|
+
e != null && e.fontFamily && (o["--semaphor-font-family"] = e.fontFamily), e != null && e.headingFontFamily && (o["--semaphor-heading-font-family"] = e.headingFontFamily), e != null && e.monoFontFamily && (o["--semaphor-mono-font-family"] = e.monoFontFamily), (e == null ? void 0 : e.baseFontSize) !== void 0 && (o["--semaphor-font-size"] = `${e.baseFontSize}px`);
|
|
88
|
+
}
|
|
89
|
+
function z(o, e) {
|
|
90
|
+
o["--semaphor-brand"] = o["--semaphor-primary"] ?? o["--semaphor-foreground"], o["--semaphor-secondary"] = o["--semaphor-accent"] ?? o["--semaphor-muted"], o["--semaphor-secondary-foreground"] = o["--semaphor-accent-foreground"] ?? o["--semaphor-foreground"], o["--semaphor-popover"] = o["--semaphor-card"] ?? o["--semaphor-background"], o["--semaphor-popover-foreground"] = o["--semaphor-card-foreground"] ?? o["--semaphor-foreground"], o["--semaphor-ring"] = o["--semaphor-primary"] ?? o["--semaphor-foreground"];
|
|
91
|
+
const r = F((e == null ? void 0 : e.control) ?? 5), n = F((e == null ? void 0 : e.card) ?? (e == null ? void 0 : e.control) ?? 5);
|
|
92
|
+
o["--semaphor-radius"] = r, o["--semaphor-control-radius"] = r, o["--semaphor-card-radius"] = n;
|
|
93
|
+
}
|
|
94
|
+
const l = {
|
|
95
|
+
none: "none",
|
|
96
|
+
subtle: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
|
|
97
|
+
raised: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)"
|
|
98
|
+
};
|
|
99
|
+
function b(o, e, r) {
|
|
100
|
+
return typeof o == "string" ? (e === "shadow" || r === "shadow") && o in l ? l[o] : o : typeof o != "object" || o === null || Array.isArray(o) ? o : Object.fromEntries(
|
|
101
|
+
Object.entries(o).map(([n, t]) => [n, b(t, n, e)])
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
function F(o) {
|
|
105
|
+
return `${Number((o / 16).toFixed(4))}rem`;
|
|
106
|
+
}
|
|
107
|
+
function v(o, e = "light") {
|
|
108
|
+
return o === "system" ? e : o;
|
|
109
|
+
}
|
|
110
|
+
const H = k({
|
|
111
|
+
spec: R(),
|
|
112
|
+
mode: "light"
|
|
113
|
+
}), D = A(
|
|
114
|
+
L(
|
|
115
|
+
"semaphor-default-appearance",
|
|
116
|
+
H
|
|
117
|
+
)
|
|
118
|
+
);
|
|
119
|
+
function I() {
|
|
120
|
+
return g(D);
|
|
121
|
+
}
|
|
122
|
+
function L(o, e, r = {}) {
|
|
123
|
+
return {
|
|
124
|
+
instanceId: o,
|
|
125
|
+
compiledAppearance: e,
|
|
126
|
+
layers: r,
|
|
127
|
+
scopeProps: M(o, e),
|
|
128
|
+
portalSnapshot: {
|
|
129
|
+
instanceId: o,
|
|
130
|
+
compiledAppearance: e
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
function M(o, e) {
|
|
135
|
+
return {
|
|
136
|
+
className: e.mode,
|
|
137
|
+
style: N(e),
|
|
138
|
+
"data-semaphor-theme": e.mode,
|
|
139
|
+
"data-semaphor-appearance-instance": o
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
function N(o) {
|
|
143
|
+
var m, s;
|
|
144
|
+
const e = {
|
|
145
|
+
colorScheme: o.mode
|
|
146
|
+
};
|
|
147
|
+
o.cssVariables["--semaphor-font-family"] && (e.fontFamily = "var(--semaphor-font-family)");
|
|
148
|
+
const n = (m = o.scheme.tokens) == null ? void 0 : m.typography, t = (s = S.schemes[o.mode].tokens) == null ? void 0 : s.typography;
|
|
149
|
+
(n == null ? void 0 : n.baseFontSize) !== void 0 && n.baseFontSize !== (t == null ? void 0 : t.baseFontSize) && (e.fontSize = n.baseFontSize);
|
|
150
|
+
for (const [a, c] of Object.entries(
|
|
151
|
+
o.cssVariables
|
|
152
|
+
))
|
|
153
|
+
e[a] = c;
|
|
154
|
+
return e;
|
|
155
|
+
}
|
|
156
|
+
export {
|
|
157
|
+
D as A,
|
|
158
|
+
L as a,
|
|
159
|
+
l as b,
|
|
160
|
+
k as c,
|
|
161
|
+
I as u
|
|
162
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as M, useId as v, useMemo as c, useContext as A, useState as T, useEffect as x } from "react";
|
|
3
|
+
import { c as I, a as g, A as k } from "./appearance-context-BwBp25ZG.js";
|
|
4
|
+
import { b as C } from "./resolver-DG_tfEpt.js";
|
|
5
|
+
const L = {
|
|
6
|
+
theme: "system",
|
|
7
|
+
setTheme: () => null
|
|
8
|
+
}, E = M(L);
|
|
9
|
+
function P(e, n = "system") {
|
|
10
|
+
return S(e) ? e : n;
|
|
11
|
+
}
|
|
12
|
+
function S(e) {
|
|
13
|
+
return e === "light" || e === "dark" || e === "system";
|
|
14
|
+
}
|
|
15
|
+
function q(e) {
|
|
16
|
+
return /* @__PURE__ */ l(z, { ...e });
|
|
17
|
+
}
|
|
18
|
+
function z({
|
|
19
|
+
appearance: e,
|
|
20
|
+
organizationAppearance: n,
|
|
21
|
+
dashboardStyle: a,
|
|
22
|
+
tokenAppearance: i,
|
|
23
|
+
reactAppearance: t,
|
|
24
|
+
resolvedAppearance: r,
|
|
25
|
+
systemMode: o,
|
|
26
|
+
children: m
|
|
27
|
+
}) {
|
|
28
|
+
const s = v(), u = c(() => R(s), [s]), { theme: w } = A(E), p = V(w), d = c(
|
|
29
|
+
() => ({
|
|
30
|
+
organizationAppearance: n,
|
|
31
|
+
dashboardStyle: a,
|
|
32
|
+
tokenAppearance: i,
|
|
33
|
+
reactAppearance: t ?? e
|
|
34
|
+
}),
|
|
35
|
+
[e, a, n, t, i]
|
|
36
|
+
), f = c(
|
|
37
|
+
() => r ?? C(d),
|
|
38
|
+
[d, r]
|
|
39
|
+
), h = c(
|
|
40
|
+
() => I({
|
|
41
|
+
spec: f,
|
|
42
|
+
systemMode: o ?? p
|
|
43
|
+
}),
|
|
44
|
+
[f, p, o]
|
|
45
|
+
), y = c(
|
|
46
|
+
() => g(u, h, d),
|
|
47
|
+
[h, u, d]
|
|
48
|
+
);
|
|
49
|
+
return /* @__PURE__ */ l(k.Provider, { value: y, children: m });
|
|
50
|
+
}
|
|
51
|
+
function R(e) {
|
|
52
|
+
return `semaphor-appearance-${e.replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
53
|
+
}
|
|
54
|
+
function V(e) {
|
|
55
|
+
const n = P(e), [a, i] = T(
|
|
56
|
+
() => j()
|
|
57
|
+
);
|
|
58
|
+
return x(() => {
|
|
59
|
+
var o, m;
|
|
60
|
+
if (n !== "system" || typeof window > "u") return;
|
|
61
|
+
const t = (o = window.matchMedia) == null ? void 0 : o.call(window, "(prefers-color-scheme: dark)");
|
|
62
|
+
if (!t) return;
|
|
63
|
+
const r = () => {
|
|
64
|
+
i(t.matches ? "dark" : "light");
|
|
65
|
+
};
|
|
66
|
+
return r(), typeof t.addEventListener == "function" ? (t.addEventListener("change", r), () => t.removeEventListener("change", r)) : ((m = t.addListener) == null || m.call(t, r), () => {
|
|
67
|
+
var s;
|
|
68
|
+
return (s = t.removeListener) == null ? void 0 : s.call(t, r);
|
|
69
|
+
});
|
|
70
|
+
}, [n]), n === "system" ? a : n;
|
|
71
|
+
}
|
|
72
|
+
function j() {
|
|
73
|
+
return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
74
|
+
}
|
|
75
|
+
export {
|
|
76
|
+
q as A,
|
|
77
|
+
z as I,
|
|
78
|
+
E as T,
|
|
79
|
+
P as n
|
|
80
|
+
};
|