react-semaphor 0.1.603 → 0.1.604
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/activity/index.js +1 -73
- package/dist/analytics-protocol/index.js +1 -1491
- package/dist/appearance/index.js +1 -12
- package/dist/appearance-runtime/index.js +1 -5
- package/dist/assistant-context/index.js +1 -11
- package/dist/assistant-protocol/index.js +1 -152
- package/dist/brand-studio/index.js +4 -1594
- package/dist/briefings/index.js +1 -70
- package/dist/chunks/add-to-dashboard-DeHEBEqG.js +12 -0
- package/dist/chunks/analytics-base-schemas-BREc5WGv.js +1 -0
- package/dist/chunks/appearance-context-BqBZrijL.js +1 -0
- package/dist/chunks/appearance-runtime-provider-DmbCrOOG.js +1 -0
- package/dist/chunks/applied-constraints-CinevlKD.js +1 -0
- package/dist/chunks/assistant-chat-CjYrwVDa.js +56 -0
- package/dist/chunks/attribution-BEFSsbNn.js +1 -0
- package/dist/chunks/availability-3AIOf6Z-.js +1 -0
- package/dist/chunks/bookmark-impact-C89zBLq3.js +1 -0
- package/dist/chunks/bookmark-state-69YYnRql.js +1 -0
- package/dist/chunks/brand-DCaZyRt6.js +1 -0
- package/dist/chunks/card-filter-builder-CTp6RAz1.js +17 -0
- package/dist/chunks/column-bands-DwxbZ6UI.js +1 -0
- package/dist/chunks/comparison-window-caption-C312mn3s.js +1 -0
- package/dist/chunks/context-ALdccLHw.js +2 -0
- package/dist/chunks/conversation-JMK2kyTK.js +1 -0
- package/dist/chunks/dashboard-BX28ld6s.js +1 -0
- package/dist/chunks/dashboard-briefing-launcher-qo7GH4EO.js +37 -0
- package/dist/chunks/dashboard-controls-DhRjB7MA.js +42 -0
- package/dist/chunks/dashboard-json-9cHzhSjC.js +1 -0
- package/dist/chunks/dates-D-KP8G-z.js +1 -0
- package/dist/chunks/edit-DEAK0UZo.js +1 -0
- package/dist/chunks/edit-dashboard-visual-Duq_QkB_.js +93 -0
- package/dist/chunks/export-file-format-B-wQNHIn.js +4 -0
- package/dist/chunks/filter-line-CwQrqORc.js +1 -0
- package/dist/chunks/filter-reach-preview-gixPFlZj.js +1 -0
- package/dist/chunks/filter-value-text-B3tXakhd.js +1 -0
- package/dist/chunks/index-B-VF1ogs.js +1 -0
- package/dist/chunks/index-BE1DfxNs.js +1 -0
- package/dist/chunks/index-DViPGDFj.js +1 -0
- package/dist/chunks/layout-grid-BWtlgw0T.js +6 -0
- package/dist/chunks/matrix-analytical-definition-CtFqWyCK.js +1 -0
- package/dist/chunks/matrix-member-presentation-Q0MCJ-YK.js +1 -0
- package/dist/chunks/matrix-operation-contract-D1RC1bfi.js +1 -0
- package/dist/chunks/metric-comparison-DEZYXROZ.js +1 -0
- package/dist/chunks/normalize-dashboard-for-dirty-check-ILKfqgL3.js +1 -0
- package/dist/chunks/paintbrush-BjS3SbrH.js +6 -0
- package/dist/chunks/palette-BzC-CGOc.js +6 -0
- package/dist/chunks/pickers-DuBrUht0.js +1 -0
- package/dist/chunks/pivot-result-contract-expectations-DTQAgr4n.js +1 -0
- package/dist/chunks/pivot-result-identity-DTNCB--h.js +1 -0
- package/dist/chunks/raw-temporal-value-DeyEhL0S.js +1 -0
- package/dist/chunks/rendered-file-BbvwaU6z.js +1 -0
- package/dist/chunks/report-preferences-dialog-B_gUmCzG.js +1 -0
- package/dist/chunks/report-runtime-context-BWzIHCKK.js +1 -0
- package/dist/chunks/resolve-dashboard-input-context-B-TtRqxu.js +8 -0
- package/dist/chunks/resolver-AN9ChBfZ.js +1 -0
- package/dist/chunks/save-DdFUZcbi.js +6 -0
- package/dist/chunks/saved-dashboard-context-BAJ5tWiq.js +1 -0
- package/dist/chunks/schema-MC0cQSAb.js +4 -0
- package/dist/chunks/selection-filter-compiler-CCoCD25M.js +1 -0
- package/dist/chunks/semaphor-ready-indicator-DzjorP3t.js +999 -0
- package/dist/chunks/set-DuJfGkbY.js +1 -0
- package/dist/chunks/shelf-drop-preview-context-BlLJ5RsT.js +6 -0
- package/dist/chunks/stored-dashboard-Ctcpkllg.js +1 -0
- package/dist/chunks/style-sheet-parts-BRGt9O05.js +178 -0
- package/dist/chunks/table-export-sheet-rC5pKmXg.js +2 -0
- package/dist/chunks/token-types-Bj9iMy0w.js +1 -0
- package/dist/chunks/validators-CqV3Yka1.js +1 -0
- package/dist/chunks/variable-draft-DJrfUyhv.js +1 -0
- package/dist/chunks/visual-choice-DgEFfkE-.js +1 -0
- package/dist/dashboard/index.js +1 -7
- package/dist/dashboard-authoring/index.js +1 -4614
- package/dist/format-utils/index.js +1 -425
- package/dist/index.js +1 -554
- package/dist/layouts/index.js +1 -7
- package/dist/live-channel/index.js +1 -124
- package/dist/pdf-export-policy/index.js +1 -92
- package/dist/pdf-table-layout/index.js +1 -993
- package/dist/report-runtime-context/index.js +1 -9
- package/dist/shared/index.js +1 -6
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +1 -9
- package/dist/types/index.js +1 -88
- package/dist/types/lib/filter-values/build-card-filter-definition.d.ts +32 -0
- package/dist/types/lib/query-context/dashboard-filter-mapping-resolution.d.ts +9 -0
- package/dist/types/lib/stores/explorer-actions.d.ts +7 -6
- package/dist/types/lib/types/semantic-types.d.ts +6 -10
- package/dist/types/lib/utils/field-state-calculator.d.ts +7 -19
- package/dist/types/shared/dashboard-authoring/calculations/definition.d.ts +13 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/card-base.d.ts +125 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/card-field-folders.d.ts +55 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/card-joins.d.ts +114 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/card-prune.d.ts +12 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/filter-field-catalog.d.ts +60 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/filter-field-folders.d.ts +132 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/index.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/join-reach.d.ts +42 -0
- package/dist/types/shared/dashboard-authoring/card-field-places.d.ts +28 -0
- package/dist/types/shared/dashboard-authoring/field-folders/field-folders.d.ts +115 -0
- package/dist/types/shared/dashboard-authoring/field-folders/index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/filter-reach-decision.d.ts +11 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +6 -1
- package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/see-records/result.d.ts +7 -22
- package/dist/usage-events/index.js +1 -285
- package/dist/value-format-preferences/index.js +1 -635
- package/package.json +4 -1
- package/dist/chunks/add-to-dashboard-CFF-wFU-.js +0 -291
- package/dist/chunks/analytics-base-schemas-DsUh5Q3C.js +0 -680
- package/dist/chunks/appearance-context-BwBp25ZG.js +0 -162
- package/dist/chunks/appearance-runtime-provider-BRHYELkC.js +0 -80
- package/dist/chunks/applied-constraints-DU-wndZ7.js +0 -47
- package/dist/chunks/assistant-chat-B6hNQI1t.js +0 -6115
- package/dist/chunks/attribution-BvoKvhcj.js +0 -32
- package/dist/chunks/availability-Bp5Gfu1I.js +0 -44
- package/dist/chunks/bookmark-impact-Ba2PLcGp.js +0 -76
- package/dist/chunks/bookmark-state-n7AaNzR_.js +0 -1667
- package/dist/chunks/brand-BoUV0iHF.js +0 -54
- package/dist/chunks/card-filter-builder-Y22HizVx.js +0 -4069
- package/dist/chunks/column-bands-RdM-kjDe.js +0 -47
- package/dist/chunks/comparison-window-caption-Ck2TIbnR.js +0 -741
- package/dist/chunks/context-UCQ7sere.js +0 -369
- package/dist/chunks/conversation-sQiWYUOb.js +0 -16
- package/dist/chunks/dashboard-BghI99oY.js +0 -14
- package/dist/chunks/dashboard-briefing-launcher-DtBAnGiH.js +0 -4875
- package/dist/chunks/dashboard-controls-CtFXlyjV.js +0 -2290
- package/dist/chunks/dashboard-json-DfGBUtCd.js +0 -66
- package/dist/chunks/dates-BnrXF4bb.js +0 -185
- package/dist/chunks/edit-9df1zOWe.js +0 -226
- package/dist/chunks/edit-dashboard-visual-oxt3x1wb.js +0 -18397
- package/dist/chunks/export-file-format-C-tJsxsf.js +0 -111
- package/dist/chunks/filter-line-Cy5YYqRL.js +0 -703
- package/dist/chunks/filter-reach-copy-CE_ZX147.js +0 -5111
- package/dist/chunks/filter-value-text-fWvSDwkl.js +0 -153
- package/dist/chunks/index-BVKzKl5d.js +0 -90
- package/dist/chunks/index-CV_Kzou0.js +0 -595
- package/dist/chunks/index-D5rxbtS4.js +0 -2795
- package/dist/chunks/layout-grid-9LndRoLa.js +0 -16
- package/dist/chunks/matrix-analytical-definition-CCp48UCw.js +0 -1233
- package/dist/chunks/matrix-member-presentation-zNehruXR.js +0 -391
- package/dist/chunks/matrix-operation-contract-DPBj69D8.js +0 -1413
- package/dist/chunks/metric-comparison-B0FR-Q8I.js +0 -600
- package/dist/chunks/normalize-dashboard-for-dirty-check-XKgH3GFX.js +0 -119
- package/dist/chunks/paintbrush-58FQYY-y.js +0 -27
- package/dist/chunks/palette-Be62Tkoa.js +0 -23
- package/dist/chunks/pickers-DkqmtnTL.js +0 -2403
- package/dist/chunks/pivot-result-contract-expectations-BYqAmG9n.js +0 -5092
- package/dist/chunks/pivot-result-identity-CAP4--iq.js +0 -77
- package/dist/chunks/raw-temporal-value-Dg_MTFF7.js +0 -3778
- package/dist/chunks/rendered-file-D8xEuVVx.js +0 -108
- package/dist/chunks/report-preferences-dialog-uJp9GBTM.js +0 -1651
- package/dist/chunks/report-runtime-context-c77_KF9v.js +0 -388
- package/dist/chunks/resolve-dashboard-input-context-Rtl1ffmE.js +0 -25324
- package/dist/chunks/resolver-DG_tfEpt.js +0 -156
- package/dist/chunks/save-C5A0JnEV.js +0 -21
- package/dist/chunks/saved-dashboard-context-tcyTU8jm.js +0 -618
- package/dist/chunks/schema-C9NPiIru.js +0 -2568
- package/dist/chunks/selection-filter-compiler-DNijjI5y.js +0 -150
- package/dist/chunks/semaphor-ready-indicator-FBvunj6S.js +0 -145603
- package/dist/chunks/shelf-drop-preview-context-QKStrcK9.js +0 -2466
- package/dist/chunks/stored-dashboard-CHozcAY9.js +0 -4075
- package/dist/chunks/style-sheet-parts-CDCG-8Ej.js +0 -8681
- package/dist/chunks/table-export-sheet-ZFIvs6Sj.js +0 -949
- package/dist/chunks/token-types-XbM6QByy.js +0 -8
- package/dist/chunks/upload-H15d7uHK.js +0 -15
- package/dist/chunks/validators-Baf3VIf5.js +0 -3686
- package/dist/chunks/variable-draft-C2y8Jp6Z.js +0 -242
- package/dist/chunks/visual-choice-DDfHfHvY.js +0 -172
|
@@ -1,162 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,80 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
const d = /* @__PURE__ */ new Set([
|
|
2
|
-
"dataset_not_reachable",
|
|
3
|
-
"field_not_resolvable",
|
|
4
|
-
"missing_metadata",
|
|
5
|
-
"unsupported_calculated_filter",
|
|
6
|
-
"relationship_unsupported",
|
|
7
|
-
"relationship_missing",
|
|
8
|
-
"relationship_ambiguous"
|
|
9
|
-
]);
|
|
10
|
-
function n(t) {
|
|
11
|
-
return !!t && typeof t == "object" && !Array.isArray(t);
|
|
12
|
-
}
|
|
13
|
-
function a(t) {
|
|
14
|
-
if (!(!n(t) || typeof t.name != "string"))
|
|
15
|
-
return { name: t.name, ...typeof t.label == "string" ? { label: t.label } : {} };
|
|
16
|
-
}
|
|
17
|
-
function f(t) {
|
|
18
|
-
if (!n(t)) return;
|
|
19
|
-
const r = t.relationshipIds;
|
|
20
|
-
if (!Array.isArray(r) || !r.length || !r.every((s) => typeof s == "string" && s) || t.direction !== "to_one" && t.direction !== "to_many") return;
|
|
21
|
-
const e = Array.isArray(t.datasets) ? t.datasets.map(a) : [];
|
|
22
|
-
if (e.some((s) => !s)) return;
|
|
23
|
-
const i = a(t.matchingDataset), o = a(t.base);
|
|
24
|
-
return {
|
|
25
|
-
relationshipIds: [...r],
|
|
26
|
-
...o ? { base: o } : {},
|
|
27
|
-
datasets: e,
|
|
28
|
-
direction: t.direction,
|
|
29
|
-
...i ? { matchingDataset: i } : {}
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
function c(t) {
|
|
33
|
-
if (!n(t) || !Array.isArray(t.filterReach)) return [];
|
|
34
|
-
const r = [];
|
|
35
|
-
for (const e of t.filterReach)
|
|
36
|
-
if (!(!n(e) || typeof e.filterId != "string" || !e.filterId))
|
|
37
|
-
if (e.status === "applied") {
|
|
38
|
-
const i = e.through === void 0 ? void 0 : f(e.through);
|
|
39
|
-
if (e.through !== void 0 && !i) continue;
|
|
40
|
-
r.push({ filterId: e.filterId, status: "applied", ...i ? { through: i } : {} });
|
|
41
|
-
} else e.status === "skipped" && typeof e.reason == "string" && d.has(e.reason) ? r.push({ filterId: e.filterId, status: "skipped", reason: e.reason }) : e.status === "blocked" && typeof e.message == "string" && r.push({ filterId: e.filterId, status: "blocked", message: e.message });
|
|
42
|
-
return r;
|
|
43
|
-
}
|
|
44
|
-
export {
|
|
45
|
-
c as a,
|
|
46
|
-
f as r
|
|
47
|
-
};
|