react-semaphor 0.1.449 → 0.1.454
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics-protocol/index.cjs +1 -1
- package/dist/analytics-protocol/index.js +119 -112
- package/dist/appearance/index.cjs +1 -1
- package/dist/appearance/index.js +1 -1
- package/dist/brand-studio/index.cjs +4 -4
- package/dist/brand-studio/index.js +15 -13
- package/dist/briefings/index.cjs +1 -1
- package/dist/briefings/index.js +39 -2131
- package/dist/chunks/{analyze-result-contract-T-0Ntzys.js → analyze-result-contract-BbRJ-C06.js} +1 -1
- package/dist/chunks/{analyze-result-contract-BHb7sUUW.cjs → analyze-result-contract-LPDNldic.cjs} +1 -1
- package/dist/chunks/canonical-result-keys-BA0HCP4e.cjs +1 -0
- package/dist/chunks/canonical-result-keys-D6avdjpA.js +467 -0
- package/dist/chunks/color-CJvdlFM_.js +2162 -0
- package/dist/chunks/color-CyB5o13F.cjs +4 -0
- package/dist/chunks/{common-types-CQ6SHfLk.cjs → common-types-C57kJ59w.cjs} +1 -1
- package/dist/chunks/{common-types-B7Jk3Rtj.js → common-types-H51FLKB7.js} +1 -1
- package/dist/chunks/contracts-CoCOpd_i.js +11 -0
- package/dist/chunks/contracts-CtB2VONT.cjs +1 -0
- package/dist/chunks/dashboard-briefing-launcher-Dwj1i7lr.cjs +26 -0
- package/dist/chunks/{dashboard-briefing-launcher-DCHiEkLE.js → dashboard-briefing-launcher-SYroFdae.js} +86 -84
- package/dist/chunks/{dashboard-controls-DwRFCcHV.js → dashboard-controls-1LpeU2sz.js} +15 -13
- package/dist/chunks/{dashboard-controls-CaFioayc.cjs → dashboard-controls-CpFoh7-A.cjs} +1 -1
- package/dist/chunks/dashboard-date-comparison-definition-Ces4alFm.cjs +1 -0
- package/dist/chunks/{dashboard-date-comparison-definition-Ba-clViK.js → dashboard-date-comparison-definition-DC3ekV2S.js} +1 -1
- package/dist/chunks/{dashboard-json-WoILbfTe.js → dashboard-json-D-T-sQxU.js} +25 -23
- package/dist/chunks/dashboard-json-DwSQopc_.cjs +1 -0
- package/dist/chunks/edit-dashboard-visual-BEmoQAET.cjs +172 -0
- package/dist/chunks/{edit-dashboard-visual-ciFhxqaI.js → edit-dashboard-visual-DqxUq4Bs.js} +6925 -6947
- package/dist/chunks/editor-action-buttons-18r2xwei.cjs +16 -0
- package/dist/chunks/{editor-action-buttons-BPo_45pM.js → editor-action-buttons-B2l3WIRC.js} +41 -39
- package/dist/chunks/format-types-CFHQoIuk.js +1350 -0
- package/dist/chunks/format-types-PSZZ7hG8.cjs +1 -0
- package/dist/chunks/index-Bn5wlkHt.cjs +4 -0
- package/dist/chunks/index-ByFbacH7.cjs +1 -0
- package/dist/chunks/index-CACdoqu3.js +318 -0
- package/dist/chunks/index-CLB_NGZ8.cjs +1392 -0
- package/dist/chunks/index-Ca784dpx.js +3714 -0
- package/dist/chunks/{index-CPuawpXJ.js → index-DAoS4BNU.js} +48514 -48484
- package/dist/chunks/index-DSKR3nKn.js +421 -0
- package/dist/chunks/index-F25jnH0p.cjs +1 -0
- package/dist/chunks/matrix-result-contract-CofATICL.js +437 -0
- package/dist/chunks/matrix-result-contract-zamd9euI.cjs +1 -0
- package/dist/chunks/pivot-header-presentation-DhyQXxKq.cjs +4 -0
- package/dist/chunks/pivot-header-presentation-ckYOQ4aZ.js +557 -0
- package/dist/chunks/{pivot-result-identity-CDLRT-YG.cjs → pivot-result-identity-Bb4EixVN.cjs} +1 -1
- package/dist/chunks/{pivot-result-identity-CwJWpKI7.js → pivot-result-identity-DU1v-5Xk.js} +1 -1
- package/dist/chunks/pivot-result-lifecycle-DmcF1ris.cjs +1 -0
- package/dist/chunks/pivot-result-lifecycle-sjzIOpvp.js +1641 -0
- package/dist/chunks/raw-temporal-contract-BtjH_G-d.cjs +1 -0
- package/dist/chunks/raw-temporal-contract-CxncLze5.js +64 -0
- package/dist/chunks/report-preferences-dialog-BgSvlDXa.cjs +1 -0
- package/dist/chunks/report-preferences-dialog-DDc2WUa0.js +723 -0
- package/dist/chunks/{report-runtime-context-C8LZFsqV.cjs → report-runtime-context-DqxS4wbi.cjs} +1 -1
- package/dist/chunks/{report-runtime-context-bCy3CVzK.js → report-runtime-context-SM6YO61_.js} +5 -5
- package/dist/chunks/saved-temporal-bucket-format-CFfWXRl9.cjs +1 -0
- package/dist/chunks/saved-temporal-bucket-format-SGAV0ivR.js +922 -0
- package/dist/chunks/{switch-BXet-Sno.js → switch-BeZW-HnS.js} +4350 -5249
- package/dist/chunks/switch-D-CCcfhc.cjs +138 -0
- package/dist/chunks/temporal-bucket-5UYEotyQ.js +810 -0
- package/dist/chunks/temporal-bucket-DHY1y9lq.cjs +1 -0
- package/dist/chunks/temporal-bucket-authoring-K1kE6R_z.js +222 -0
- package/dist/chunks/temporal-bucket-authoring-o3Emn05L.cjs +1 -0
- package/dist/chunks/{temporal-bucket-contract-ChDBWX8I.cjs → temporal-bucket-contract-D2-93DGr.cjs} +1 -1
- package/dist/chunks/{temporal-bucket-contract-_F6vNhhH.js → temporal-bucket-contract-D5d-xEl3.js} +1 -1
- package/dist/chunks/{token-types-BdQ8kHBm.cjs → token-types-D7CaaI80.cjs} +1 -1
- package/dist/chunks/{token-types-BHR58aTy.js → token-types-GbxRUozo.js} +1 -1
- package/dist/chunks/{update-policy-BxvYMYz0.cjs → update-policy-BmiOd0PB.cjs} +1 -1
- package/dist/chunks/{update-policy-g0rCQ9BM.js → update-policy-hednMF-0.js} +1 -1
- package/dist/chunks/validators-BDYprKI9.cjs +1 -0
- package/dist/chunks/{validators-Cs74WVie.js → validators-DEmd8Sin.js} +1561 -1197
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.cjs +3 -3
- package/dist/dashboard-authoring/index.js +35 -32
- package/dist/data-app-builder/index.cjs +1 -1
- package/dist/data-app-builder/index.js +2 -2
- 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 +1 -1
- package/dist/data-app-codegen-node/index.js +3 -3
- package/dist/data-app-sdk/index.cjs +1 -1
- package/dist/data-app-sdk/index.js +78 -77
- package/dist/data-app-sdk-adapters/index.cjs +1 -1
- package/dist/data-app-sdk-adapters/index.js +29 -30
- package/dist/data-app-sdk-validation/index.cjs +1 -1
- package/dist/data-app-sdk-validation/index.js +21 -21
- package/dist/format-utils/index.cjs +3 -3
- package/dist/format-utils/index.js +156 -140
- package/dist/index.cjs +1 -1
- package/dist/index.js +157 -155
- package/dist/report-runtime-context/index.cjs +1 -1
- package/dist/report-runtime-context/index.js +2 -2
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +3 -3
- package/dist/types/analytics-protocol.d.ts +81 -11
- package/dist/types/briefings.d.ts +727 -19
- package/dist/types/dashboard-assistant.d.ts +37 -17
- package/dist/types/dashboard-authoring.d.ts +61 -14
- package/dist/types/dashboard.d.ts +137 -12
- package/dist/types/data-app-builder.d.ts +28 -2
- package/dist/types/data-app-codegen-node.d.ts +29 -3
- package/dist/types/data-app-codegen.d.ts +29 -3
- package/dist/types/data-app-sdk-adapters.d.ts +28 -2
- package/dist/types/data-app-sdk-validation.d.ts +51 -7
- package/dist/types/data-app-sdk.d.ts +55 -10
- package/dist/types/format-utils.d.ts +190 -3
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.js +4 -4
- package/dist/types/main.d.ts +128 -33
- package/dist/types/shared.d.ts +14 -12
- package/dist/types/surfboard.d.ts +138 -13
- package/dist/types/types.d.ts +117 -23
- package/dist/types/value-format-preferences.d.ts +3 -0
- package/package.json +2 -1
- package/dist/chunks/card-config-utils-15sRtebL.cjs +0 -1
- package/dist/chunks/card-config-utils-BYZ5MJOh.js +0 -16
- package/dist/chunks/catalog-field-grounding-Bnx-3tE0.cjs +0 -1
- package/dist/chunks/catalog-field-grounding-S2jKwKGD.js +0 -100
- package/dist/chunks/dashboard-briefing-launcher-DDgDr2s3.cjs +0 -26
- package/dist/chunks/dashboard-date-comparison-definition-DZq0htjG.cjs +0 -1
- package/dist/chunks/dashboard-input-contract-DSt8dGzP.js +0 -18
- package/dist/chunks/dashboard-input-contract-DV3cshjz.cjs +0 -1
- package/dist/chunks/dashboard-json-CYtvwtvj.cjs +0 -1
- package/dist/chunks/edit-dashboard-visual-DwKcvlsF.cjs +0 -177
- package/dist/chunks/editor-action-buttons-BVmsk0Aj.cjs +0 -16
- package/dist/chunks/format-types-CSv0V7mm.cjs +0 -1
- package/dist/chunks/format-types-DZGgYj39.js +0 -1663
- package/dist/chunks/index-CJdxSyQq.js +0 -2578
- package/dist/chunks/index-DPv8_Ild.cjs +0 -1395
- package/dist/chunks/index-DRlMUglg.cjs +0 -4
- package/dist/chunks/metric-comparison-97zHGEx5.js +0 -387
- package/dist/chunks/metric-comparison-CUAJ8n4y.cjs +0 -1
- package/dist/chunks/pivot-result-lifecycle-BBabQ_da.js +0 -914
- package/dist/chunks/pivot-result-lifecycle-DPc0ANwk.cjs +0 -4
- package/dist/chunks/presentation-execution-BLfPTGX_.js +0 -637
- package/dist/chunks/presentation-execution-BTV-Q43g.cjs +0 -1
- package/dist/chunks/report-preferences-dialog-D9ZCGh9l.js +0 -691
- package/dist/chunks/report-preferences-dialog-DaqTEcac.cjs +0 -1
- package/dist/chunks/switch-Cjk6G06r.cjs +0 -138
- package/dist/chunks/temporal-bucket-BnPxGrAi.js +0 -446
- package/dist/chunks/temporal-bucket-authoring-CPTwHzvs.cjs +0 -1
- package/dist/chunks/temporal-bucket-authoring-CgOuakGW.js +0 -205
- package/dist/chunks/temporal-bucket-pMnV-4Nj.cjs +0 -1
- package/dist/chunks/temporal-result-owner-6peubmhU.js +0 -443
- package/dist/chunks/temporal-result-owner-f6-i65Fb.cjs +0 -1
- package/dist/chunks/validators-9D4KBqKD.cjs +0 -1
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
import { b as y, d as A, S as F, p as N } from "./color-CJvdlFM_.js";
|
|
2
|
+
const S = [
|
|
3
|
+
"#3b82f6",
|
|
4
|
+
"#10b981",
|
|
5
|
+
"#f59e0b",
|
|
6
|
+
"#ef4444",
|
|
7
|
+
"#8b5cf6",
|
|
8
|
+
"#06b6d4",
|
|
9
|
+
"#84cc16",
|
|
10
|
+
"#f97316"
|
|
11
|
+
], R = {
|
|
12
|
+
version: 1,
|
|
13
|
+
mode: "system",
|
|
14
|
+
schemes: {
|
|
15
|
+
light: {
|
|
16
|
+
tokens: {
|
|
17
|
+
color: {
|
|
18
|
+
background: "hsl(0 0% 100%)",
|
|
19
|
+
foreground: "hsl(240 5.9% 10%)",
|
|
20
|
+
muted: "hsl(0 0% 98%)",
|
|
21
|
+
mutedForeground: "hsl(240 3.8% 46.1%)",
|
|
22
|
+
border: "hsl(240 5.9% 90%)",
|
|
23
|
+
input: "hsl(240 5.9% 90%)",
|
|
24
|
+
primary: "hsl(240 5.9% 10%)",
|
|
25
|
+
primaryForeground: "hsl(0 0% 98%)",
|
|
26
|
+
accent: "hsl(240 4.8% 95.9%)",
|
|
27
|
+
accentForeground: "hsl(240 5.9% 10%)",
|
|
28
|
+
card: "hsl(0 0% 100%)",
|
|
29
|
+
cardForeground: "hsl(240 5.9% 10%)",
|
|
30
|
+
positive: "#16a34a",
|
|
31
|
+
negative: "#dc2626",
|
|
32
|
+
warning: "#d97706",
|
|
33
|
+
info: "#0284c7",
|
|
34
|
+
destructive: "hsl(0 72.2% 50.6%)",
|
|
35
|
+
destructiveForeground: "hsl(0 0% 98%)"
|
|
36
|
+
},
|
|
37
|
+
typography: {
|
|
38
|
+
fontFamily: F,
|
|
39
|
+
headingFontFamily: A,
|
|
40
|
+
monoFontFamily: y,
|
|
41
|
+
baseFontSize: 14,
|
|
42
|
+
density: "comfortable"
|
|
43
|
+
},
|
|
44
|
+
radius: {
|
|
45
|
+
control: 5,
|
|
46
|
+
card: 5,
|
|
47
|
+
table: 5,
|
|
48
|
+
badge: 999
|
|
49
|
+
},
|
|
50
|
+
spacing: {
|
|
51
|
+
dashboardPadding: 16,
|
|
52
|
+
gridGap: 12,
|
|
53
|
+
cardPadding: 16,
|
|
54
|
+
controlGap: 8,
|
|
55
|
+
tableCellX: 12,
|
|
56
|
+
tableCellY: 8
|
|
57
|
+
},
|
|
58
|
+
shadow: {
|
|
59
|
+
card: "0 1px 2px rgba(15, 23, 42, 0.08)",
|
|
60
|
+
popover: "0 12px 32px rgba(15, 23, 42, 0.14)",
|
|
61
|
+
focusRing: "0 0 0 2px rgba(37, 99, 235, 0.35)"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
components: {
|
|
65
|
+
chart: {
|
|
66
|
+
palette: S
|
|
67
|
+
},
|
|
68
|
+
table: {
|
|
69
|
+
density: "compact"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
dark: {
|
|
74
|
+
tokens: {
|
|
75
|
+
color: {
|
|
76
|
+
background: "hsl(240 10% 3.9%)",
|
|
77
|
+
foreground: "hsl(0 0% 93%)",
|
|
78
|
+
muted: "hsl(240 5.9% 10%)",
|
|
79
|
+
mutedForeground: "hsl(240 5% 64.9%)",
|
|
80
|
+
border: "hsl(240 3.7% 15.9%)",
|
|
81
|
+
input: "hsl(240 3.7% 15.9%)",
|
|
82
|
+
primary: "hsl(0 0% 98%)",
|
|
83
|
+
primaryForeground: "hsl(240 5.9% 10%)",
|
|
84
|
+
accent: "hsl(240 3.7% 15.9%)",
|
|
85
|
+
accentForeground: "hsl(0 0% 93%)",
|
|
86
|
+
card: "hsl(240 10% 3.9%)",
|
|
87
|
+
cardForeground: "hsl(0 0% 93%)",
|
|
88
|
+
positive: "#22c55e",
|
|
89
|
+
negative: "#f87171",
|
|
90
|
+
warning: "#fbbf24",
|
|
91
|
+
info: "#38bdf8",
|
|
92
|
+
destructive: "hsl(0 62.8% 30.6%)",
|
|
93
|
+
destructiveForeground: "hsl(0 0% 93%)"
|
|
94
|
+
},
|
|
95
|
+
typography: {
|
|
96
|
+
fontFamily: F,
|
|
97
|
+
headingFontFamily: A,
|
|
98
|
+
monoFontFamily: y,
|
|
99
|
+
baseFontSize: 14,
|
|
100
|
+
density: "comfortable"
|
|
101
|
+
},
|
|
102
|
+
radius: {
|
|
103
|
+
control: 5,
|
|
104
|
+
card: 5,
|
|
105
|
+
table: 5,
|
|
106
|
+
badge: 999
|
|
107
|
+
},
|
|
108
|
+
spacing: {
|
|
109
|
+
dashboardPadding: 16,
|
|
110
|
+
gridGap: 12,
|
|
111
|
+
cardPadding: 16,
|
|
112
|
+
controlGap: 8,
|
|
113
|
+
tableCellX: 12,
|
|
114
|
+
tableCellY: 8
|
|
115
|
+
},
|
|
116
|
+
shadow: {
|
|
117
|
+
card: "0 1px 2px rgba(0, 0, 0, 0.3)",
|
|
118
|
+
popover: "0 12px 32px rgba(0, 0, 0, 0.45)",
|
|
119
|
+
focusRing: "0 0 0 2px rgba(96, 165, 250, 0.35)"
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
components: {
|
|
123
|
+
chart: {
|
|
124
|
+
palette: S
|
|
125
|
+
},
|
|
126
|
+
table: {
|
|
127
|
+
density: "compact"
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}, _ = E(
|
|
133
|
+
R
|
|
134
|
+
);
|
|
135
|
+
function E(e) {
|
|
136
|
+
if (typeof e != "object" || e === null || Object.isFrozen(e))
|
|
137
|
+
return e;
|
|
138
|
+
Object.freeze(e);
|
|
139
|
+
for (const o of Object.values(e))
|
|
140
|
+
E(o);
|
|
141
|
+
return e;
|
|
142
|
+
}
|
|
143
|
+
const k = 1, j = /* @__PURE__ */ new Set(["light", "dark", "system"]), T = /* @__PURE__ */ new Set([
|
|
144
|
+
"compact",
|
|
145
|
+
"comfortable",
|
|
146
|
+
"spacious"
|
|
147
|
+
]), M = Object.fromEntries(
|
|
148
|
+
[
|
|
149
|
+
"background",
|
|
150
|
+
"foreground",
|
|
151
|
+
"muted",
|
|
152
|
+
"mutedForeground",
|
|
153
|
+
"border",
|
|
154
|
+
"input",
|
|
155
|
+
"primary",
|
|
156
|
+
"primaryForeground",
|
|
157
|
+
"accent",
|
|
158
|
+
"accentForeground",
|
|
159
|
+
"card",
|
|
160
|
+
"cardForeground",
|
|
161
|
+
"positive",
|
|
162
|
+
"negative",
|
|
163
|
+
"warning",
|
|
164
|
+
"info",
|
|
165
|
+
"destructive",
|
|
166
|
+
"destructiveForeground"
|
|
167
|
+
].map((e) => [e, n])
|
|
168
|
+
), z = {
|
|
169
|
+
fontFamily: d,
|
|
170
|
+
headingFontFamily: d,
|
|
171
|
+
monoFontFamily: d,
|
|
172
|
+
baseFontSize: p,
|
|
173
|
+
density: P
|
|
174
|
+
}, L = {
|
|
175
|
+
control: c,
|
|
176
|
+
card: c,
|
|
177
|
+
table: c,
|
|
178
|
+
badge: c
|
|
179
|
+
}, I = {
|
|
180
|
+
dashboardPadding: c,
|
|
181
|
+
gridGap: c,
|
|
182
|
+
cardPadding: c,
|
|
183
|
+
controlGap: c,
|
|
184
|
+
tableCellX: c,
|
|
185
|
+
tableCellY: c
|
|
186
|
+
}, V = {
|
|
187
|
+
card: d,
|
|
188
|
+
popover: d,
|
|
189
|
+
focusRing: d
|
|
190
|
+
}, u = {
|
|
191
|
+
background: n,
|
|
192
|
+
foreground: n,
|
|
193
|
+
borderColor: n,
|
|
194
|
+
borderRadius: c,
|
|
195
|
+
shadow: d,
|
|
196
|
+
padding: c
|
|
197
|
+
}, $ = {
|
|
198
|
+
...u,
|
|
199
|
+
toolbarBackground: n
|
|
200
|
+
}, D = {
|
|
201
|
+
palette: Q,
|
|
202
|
+
background: n,
|
|
203
|
+
foreground: n,
|
|
204
|
+
gridColor: n,
|
|
205
|
+
axisColor: n
|
|
206
|
+
}, Y = {
|
|
207
|
+
background: n,
|
|
208
|
+
borderColor: n,
|
|
209
|
+
borderRadius: c,
|
|
210
|
+
shadow: d
|
|
211
|
+
}, f = {
|
|
212
|
+
density: P,
|
|
213
|
+
container: t(Y),
|
|
214
|
+
header: t({
|
|
215
|
+
background: n,
|
|
216
|
+
foreground: n,
|
|
217
|
+
dividerColor: n,
|
|
218
|
+
fontWeight: p,
|
|
219
|
+
uppercase: g,
|
|
220
|
+
sticky: g
|
|
221
|
+
}),
|
|
222
|
+
row: t({
|
|
223
|
+
height: p,
|
|
224
|
+
dividerColor: n,
|
|
225
|
+
zebra: g,
|
|
226
|
+
zebraBackground: n,
|
|
227
|
+
hoverBackground: n,
|
|
228
|
+
selectedBackground: n
|
|
229
|
+
}),
|
|
230
|
+
cell: t({
|
|
231
|
+
paddingX: c,
|
|
232
|
+
paddingY: c,
|
|
233
|
+
verticalAlign: J,
|
|
234
|
+
wrap: K
|
|
235
|
+
}),
|
|
236
|
+
subtotal: t({
|
|
237
|
+
background: n,
|
|
238
|
+
foreground: n,
|
|
239
|
+
fontWeight: p
|
|
240
|
+
}),
|
|
241
|
+
grandTotal: t({
|
|
242
|
+
background: n,
|
|
243
|
+
foreground: n,
|
|
244
|
+
fontWeight: p,
|
|
245
|
+
borderColor: n
|
|
246
|
+
}),
|
|
247
|
+
pagination: t({
|
|
248
|
+
background: n,
|
|
249
|
+
foreground: n,
|
|
250
|
+
borderColor: n
|
|
251
|
+
})
|
|
252
|
+
}, G = {
|
|
253
|
+
color: t(M),
|
|
254
|
+
typography: t(z),
|
|
255
|
+
radius: t(L),
|
|
256
|
+
spacing: t(I),
|
|
257
|
+
shadow: t(V)
|
|
258
|
+
}, H = {
|
|
259
|
+
dashboard: t(u),
|
|
260
|
+
card: t(u),
|
|
261
|
+
interactive: t($),
|
|
262
|
+
chart: t(D),
|
|
263
|
+
table: t(f),
|
|
264
|
+
pivotTable: t(f),
|
|
265
|
+
aggregateTable: t(f),
|
|
266
|
+
pagination: t(u)
|
|
267
|
+
}, v = {
|
|
268
|
+
tokens: t(G),
|
|
269
|
+
components: t(H)
|
|
270
|
+
}, U = {
|
|
271
|
+
light: t(v),
|
|
272
|
+
dark: t(v)
|
|
273
|
+
}, B = {
|
|
274
|
+
version: X,
|
|
275
|
+
mode: q,
|
|
276
|
+
schemes: t(U)
|
|
277
|
+
};
|
|
278
|
+
function W(e) {
|
|
279
|
+
const o = [];
|
|
280
|
+
return t(B)(e, "$", o), O(e) && !("version" in e) && i(o, "$.version", "invalid_version", "version must be 1"), o.length > 0 ? { success: !1, issues: o } : {
|
|
281
|
+
success: !0,
|
|
282
|
+
value: e,
|
|
283
|
+
issues: []
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
function C(e) {
|
|
287
|
+
const o = W(e);
|
|
288
|
+
if (o.success) return;
|
|
289
|
+
const r = o.issues[0];
|
|
290
|
+
throw new Error(
|
|
291
|
+
`Invalid AppearanceSpec at ${r.path}: ${r.message}`
|
|
292
|
+
);
|
|
293
|
+
}
|
|
294
|
+
function t(e) {
|
|
295
|
+
return (o, r, a) => {
|
|
296
|
+
if (!O(o)) {
|
|
297
|
+
i(a, r, "invalid_type", "expected an object");
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
for (const s of Object.keys(o)) {
|
|
301
|
+
const m = e[s], h = `${r}.${s}`;
|
|
302
|
+
if (!m) {
|
|
303
|
+
i(a, h, "unsupported_field", "field is not supported in AppearanceSpec V1");
|
|
304
|
+
continue;
|
|
305
|
+
}
|
|
306
|
+
m(o[s], h, a);
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
function X(e, o, r) {
|
|
311
|
+
e !== k && i(r, o, "invalid_version", "version must be 1");
|
|
312
|
+
}
|
|
313
|
+
function q(e, o, r) {
|
|
314
|
+
(typeof e != "string" || !j.has(e)) && i(r, o, "invalid_value", "mode must be light, dark, or system");
|
|
315
|
+
}
|
|
316
|
+
function P(e, o, r) {
|
|
317
|
+
(typeof e != "string" || !T.has(e)) && i(r, o, "invalid_value", "density must be compact, comfortable, or spacious");
|
|
318
|
+
}
|
|
319
|
+
function J(e, o, r) {
|
|
320
|
+
e !== "top" && e !== "middle" && e !== "bottom" && i(r, o, "invalid_value", "verticalAlign must be top, middle, or bottom");
|
|
321
|
+
}
|
|
322
|
+
function K(e, o, r) {
|
|
323
|
+
e !== "wrap" && e !== "nowrap" && i(r, o, "invalid_value", "wrap must be wrap or nowrap");
|
|
324
|
+
}
|
|
325
|
+
function g(e, o, r) {
|
|
326
|
+
typeof e != "boolean" && i(r, o, "invalid_type", "expected a boolean");
|
|
327
|
+
}
|
|
328
|
+
function n(e, o, r) {
|
|
329
|
+
if (typeof e != "string" || e.trim() === "") {
|
|
330
|
+
i(r, o, "invalid_type", "color must be a non-empty string");
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
333
|
+
N(e) || i(r, o, "invalid_color", "color must be a valid opaque CSS color");
|
|
334
|
+
}
|
|
335
|
+
function Q(e, o, r) {
|
|
336
|
+
if (!Array.isArray(e)) {
|
|
337
|
+
i(r, o, "invalid_type", "expected an array of colors");
|
|
338
|
+
return;
|
|
339
|
+
}
|
|
340
|
+
if (e.length === 0) {
|
|
341
|
+
i(r, o, "invalid_value", "palette must contain at least one color");
|
|
342
|
+
return;
|
|
343
|
+
}
|
|
344
|
+
e.forEach((a, s) => n(a, `${o}[${s}]`, r));
|
|
345
|
+
}
|
|
346
|
+
function d(e, o, r) {
|
|
347
|
+
(typeof e != "string" || e.trim() === "") && i(r, o, "invalid_type", "expected a non-empty string");
|
|
348
|
+
}
|
|
349
|
+
function p(e, o, r) {
|
|
350
|
+
(typeof e != "number" || !Number.isFinite(e) || e <= 0) && i(r, o, "invalid_value", "expected a positive number");
|
|
351
|
+
}
|
|
352
|
+
function c(e, o, r) {
|
|
353
|
+
(typeof e != "number" || !Number.isFinite(e) || e < 0) && i(r, o, "invalid_value", "expected a non-negative number");
|
|
354
|
+
}
|
|
355
|
+
function i(e, o, r, a) {
|
|
356
|
+
e.push({ path: o, code: r, message: a });
|
|
357
|
+
}
|
|
358
|
+
function O(e) {
|
|
359
|
+
if (typeof e != "object" || e === null || Array.isArray(e))
|
|
360
|
+
return !1;
|
|
361
|
+
const o = Object.getPrototypeOf(e);
|
|
362
|
+
return o === Object.prototype || o === null;
|
|
363
|
+
}
|
|
364
|
+
function Z(e, o = _) {
|
|
365
|
+
return C(e), w(o, e);
|
|
366
|
+
}
|
|
367
|
+
function ee(e, o) {
|
|
368
|
+
return C(o), w(e, o);
|
|
369
|
+
}
|
|
370
|
+
function w(e, o) {
|
|
371
|
+
return x(e, o);
|
|
372
|
+
}
|
|
373
|
+
function x(e, o) {
|
|
374
|
+
if (o === void 0) return l(e);
|
|
375
|
+
if (Array.isArray(e) || Array.isArray(o))
|
|
376
|
+
return l(o);
|
|
377
|
+
if (b(e) && b(o)) {
|
|
378
|
+
const r = l(e);
|
|
379
|
+
for (const [a, s] of Object.entries(o)) {
|
|
380
|
+
if (a === "version") {
|
|
381
|
+
r[a] = s;
|
|
382
|
+
continue;
|
|
383
|
+
}
|
|
384
|
+
r[a] = a in r ? x(r[a], s) : l(s);
|
|
385
|
+
}
|
|
386
|
+
return r;
|
|
387
|
+
}
|
|
388
|
+
return l(o);
|
|
389
|
+
}
|
|
390
|
+
function l(e) {
|
|
391
|
+
return Array.isArray(e) ? e.map((o) => l(o)) : b(e) ? Object.fromEntries(
|
|
392
|
+
Object.entries(e).map(([o, r]) => [o, l(r)])
|
|
393
|
+
) : e;
|
|
394
|
+
}
|
|
395
|
+
function b(e) {
|
|
396
|
+
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
397
|
+
}
|
|
398
|
+
function re(e = {}) {
|
|
399
|
+
const o = e.defaults ?? _;
|
|
400
|
+
let r = Z(
|
|
401
|
+
{ version: k },
|
|
402
|
+
o
|
|
403
|
+
);
|
|
404
|
+
for (const a of [
|
|
405
|
+
e.organizationAppearance,
|
|
406
|
+
e.tokenAppearance,
|
|
407
|
+
e.reactAppearance
|
|
408
|
+
])
|
|
409
|
+
a && (r = ee(r, a));
|
|
410
|
+
return r;
|
|
411
|
+
}
|
|
412
|
+
export {
|
|
413
|
+
k as A,
|
|
414
|
+
_ as S,
|
|
415
|
+
S as a,
|
|
416
|
+
C as b,
|
|
417
|
+
ee as m,
|
|
418
|
+
Z as n,
|
|
419
|
+
re as r,
|
|
420
|
+
W as v
|
|
421
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function F(e,t){const n=b(t);return"formatToParts"in n?$(n,e):A(n,e)}const _={year:0,month:1,day:2,hour:3,minute:4,second:5};function $(e,t){try{const n=e.formatToParts(t),r=[];for(let i=0;i<n.length;i++){const a=_[n[i].type];a!==void 0&&(r[a]=parseInt(n[i].value,10))}return r}catch(n){if(n instanceof RangeError)return[NaN];throw n}}function A(e,t){const n=e.format(t),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[parseInt(r[3],10),parseInt(r[1],10),parseInt(r[2],10),parseInt(r[4],10),parseInt(r[5],10),parseInt(r[6],10)]}const f={},I=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),S=I==="06/25/2014, 00:00:00"||I==="06/25/2014 00:00:00";function b(e){return f[e]||(f[e]=S?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),f[e]}function T(e,t,n,r,i,a,o){const u=new Date(0);return u.setUTCFullYear(e,t,n),u.setUTCHours(r,i,a,o),u}const w=36e5,L=6e4,D={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Y(e,t,n){if(!e)return 0;let r=D.timezoneZ.exec(e);if(r)return 0;let i,a;if(r=D.timezoneHH.exec(e),r)return i=parseInt(r[1],10),g(i)?-(i*w):NaN;if(r=D.timezoneHHMM.exec(e),r){i=parseInt(r[2],10);const o=parseInt(r[3],10);return g(i,o)?(a=Math.abs(i)*w+o*L,r[1]==="+"?-a:a):NaN}if(E(e)){t=new Date(t||Date.now());const o=n?t:Z(t),u=m(o,e);return-(n?u:z(t,u,e))}return NaN}function Z(e){return T(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function m(e,t){const n=F(e,t),r=T(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime();let i=e.getTime();const a=i%1e3;return i-=a>=0?a:1e3+a,r-i}function z(e,t,n){let i=e.getTime()-t;const a=m(new Date(i),n);if(t===a)return t;i-=a-t;const o=m(new Date(i),n);return a===o?a:Math.max(a,o)}function g(e,t){return-23<=e&&e<=23&&(t==null||0<=t&&t<=59)}const M={};function E(e){if(M[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),M[e]=!0,!0}catch{return!1}}function h(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+e-+t}const U=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,N=36e5,H=6e4,P=2,s={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:U};function p(e,t={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(e===null)return new Date(NaN);const n=t.additionalDigits==null?P:Number(t.additionalDigits);if(n!==2&&n!==1&&n!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]")return new Date(e.getTime());if(typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]")return new Date(e);if(Object.prototype.toString.call(e)!=="[object String]")return new Date(NaN);const r=W(e),{year:i,restDateString:a}=k(r.date,n),o=v(a,i);if(o===null||isNaN(o.getTime()))return new Date(NaN);if(o){const u=o.getTime();let c=0,l;if(r.time&&(c=j(r.time),c===null||isNaN(c)))return new Date(NaN);if(r.timeZone||t.timeZone){if(l=Y(r.timeZone||t.timeZone,new Date(u+c)),isNaN(l))return new Date(NaN)}else l=h(new Date(u+c)),l=h(new Date(u+c+l));return new Date(u+c+l)}else return new Date(NaN)}function W(e){const t={};let n=s.dateTimePattern.exec(e),r;if(n?(t.date=n[1],r=n[3]):(n=s.datePattern.exec(e),n?(t.date=n[1],r=n[2]):(t.date=null,r=e)),r){const i=s.timeZone.exec(r);i?(t.time=r.replace(i[1],""),t.timeZone=i[1].trim()):t.time=r}return t}function k(e,t){if(e){const n=s.YYY[t],r=s.YYYYY[t];let i=s.YYYY.exec(e)||r.exec(e);if(i){const a=i[1];return{year:parseInt(a,10),restDateString:e.slice(a.length)}}if(i=s.YY.exec(e)||n.exec(e),i){const a=i[1];return{year:parseInt(a,10)*100,restDateString:e.slice(a.length)}}}return{year:null}}function v(e,t){if(t===null)return null;let n,r,i;if(!e||!e.length)return n=new Date(0),n.setUTCFullYear(t),n;let a=s.MM.exec(e);if(a)return n=new Date(0),r=parseInt(a[1],10)-1,C(t,r)?(n.setUTCFullYear(t,r),n):new Date(NaN);if(a=s.DDD.exec(e),a){n=new Date(0);const o=parseInt(a[1],10);return q(t,o)?(n.setUTCFullYear(t,0,o),n):new Date(NaN)}if(a=s.MMDD.exec(e),a){n=new Date(0),r=parseInt(a[1],10)-1;const o=parseInt(a[2],10);return C(t,r,o)?(n.setUTCFullYear(t,r,o),n):new Date(NaN)}if(a=s.Www.exec(e),a)return i=parseInt(a[1],10)-1,O(i)?x(t,i):new Date(NaN);if(a=s.WwwD.exec(e),a){i=parseInt(a[1],10)-1;const o=parseInt(a[2],10)-1;return O(i,o)?x(t,i,o):new Date(NaN)}return null}function j(e){let t,n,r=s.HH.exec(e);if(r)return t=parseFloat(r[1].replace(",",".")),d(t)?t%24*N:NaN;if(r=s.HHMM.exec(e),r)return t=parseInt(r[1],10),n=parseFloat(r[2].replace(",",".")),d(t,n)?t%24*N+n*H:NaN;if(r=s.HHMMSS.exec(e),r){t=parseInt(r[1],10),n=parseInt(r[2],10);const i=parseFloat(r[3].replace(",","."));return d(t,n,i)?t%24*N+n*H+i*1e3:NaN}return null}function x(e,t,n){t=t||0,n=n||0;const r=new Date(0);r.setUTCFullYear(e,0,4);const i=r.getUTCDay()||7,a=t*7+n+1-i;return r.setUTCDate(r.getUTCDate()+a),r}const R=[31,28,31,30,31,30,31,31,30,31,30,31],G=[31,29,31,30,31,30,31,31,30,31,30,31];function y(e){return e%400===0||e%4===0&&e%100!==0}function C(e,t,n){if(t<0||t>11)return!1;if(n!=null){if(n<1)return!1;const r=y(e);if(r&&n>G[t]||!r&&n>R[t])return!1}return!0}function q(e,t){if(t<1)return!1;const n=y(e);return!(n&&t>366||!n&&t>365)}function O(e,t){return!(e<0||e>52||t!=null&&(t<0||t>6))}function d(e,t,n){return!(e<0||e>=25||t!=null&&(t<0||t>=60)||n!=null&&(n<0||n>=60))}function J(e,t,n){if(typeof e=="string"&&!e.match(U))return p(e,{...n,timeZone:t});e=p(e,n);const r=T(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()).getTime(),i=Y(t,new Date(r));return new Date(r+i)}exports.fromZonedTime=J;exports.toDate=p;exports.tzParseTimezone=Y;
|