@flesler/cursor-canvas-web 1.4.0 → 1.5.1
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/cursor-canvas-web.css +1 -0
- package/dist/cursor-canvas.cjs +1 -1
- package/dist/cursor-canvas.js +584 -612
- package/dist/pie-donut-DNbA0GeH.cjs +1 -0
- package/dist/pie-donut-qRBFP0tT.js +63 -0
- package/package.json +6 -2
- package/src/runtime/index.tsx +64 -0
- package/src/shim/__tests__/barChart.test.ts +61 -0
- package/src/shim/__tests__/canvas.smoke.test.tsx +209 -0
- package/src/shim/__tests__/category-theme.test.tsx +58 -0
- package/src/shim/__tests__/chartLegendOrder.test.tsx +34 -0
- package/src/shim/__tests__/dag.test.ts +49 -0
- package/src/shim/__tests__/host-tokens.test.ts +106 -0
- package/src/shim/__tests__/lineChart.test.ts +28 -0
- package/src/shim/__tests__/useCanvasState.test.tsx +35 -0
- package/src/shim/__tests__/useHostTheme.test.tsx +43 -0
- package/src/shim/__tests__/valueAxis.test.ts +39 -0
- package/src/shim/bar-chart.tsx +78 -0
- package/src/shim/canvas-hooks.tsx +57 -0
- package/src/shim/canvas-mantine-root.tsx +129 -0
- package/src/shim/chart-shared.tsx +259 -0
- package/src/shim/cursor-canvas.tsx +136 -0
- package/src/shim/dag.ts +179 -0
- package/src/shim/diff.tsx +161 -0
- package/src/shim/host-tokens.ts +614 -0
- package/src/shim/line-chart.tsx +65 -0
- package/src/shim/pie-chart.tsx +127 -0
- package/src/shim/pie-donut.tsx +79 -0
- package/src/shim/theme.ts +77 -0
- package/src/shim/todo.tsx +184 -0
- package/src/shim/ui/actions.tsx +58 -0
- package/src/shim/ui/card-context.tsx +11 -0
- package/src/shim/ui/card.tsx +79 -0
- package/src/shim/ui/chevron.tsx +23 -0
- package/src/shim/ui/display.tsx +83 -0
- package/src/shim/ui/form.tsx +102 -0
- package/src/shim/ui/layout.tsx +67 -0
- package/src/shim/ui/rich.tsx +136 -0
- package/src/shim/ui/table.tsx +71 -0
- package/src/shim/ui/typography.tsx +129 -0
- package/src/shim/use-tokens.ts +13 -0
- package/src/superset/chart-extra.d.ts +11 -11
- package/src/superset/index.d.ts +4 -4
package/dist/cursor-canvas.js
CHANGED
|
@@ -1,11 +1,42 @@
|
|
|
1
|
+
import { useCallback as O, useState as I, Suspense as be, lazy as Se, createContext as ae, useContext as W } from "react";
|
|
2
|
+
import { useEffect as rn, useMemo as on, useRef as an, useState as sn } from "react";
|
|
1
3
|
import { jsx as i, jsxs as y } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
import { BarChart as Ce, AreaChart as ke, LineChart as we, ChartLegend as Le, PieChart as Te } from "@mantine/charts";
|
|
5
|
+
import { useComputedColorScheme as Pe, Button as Ae, ActionIcon as Me, Card as Be, Alert as $e, Badge as De, Text as z, Checkbox as Ie, Select as Ee, Textarea as Fe, TextInput as Re, Switch as _e, Divider as Ne, Group as He, Stack as ze, Table as T, Title as G } from "@mantine/core";
|
|
6
|
+
import { r as Oe, u as ne } from "./host-tokens-Bt6GPXN1.js";
|
|
7
|
+
import { c as cn, a as dn, b as un, d as fn, e as hn, f as pn, g as yn, h as gn, i as mn } from "./host-tokens-Bt6GPXN1.js";
|
|
8
|
+
function mt(t, e) {
|
|
9
|
+
const n = `canvas:${t}`, [r, o] = I(() => {
|
|
10
|
+
if (typeof localStorage > "u") return e;
|
|
11
|
+
try {
|
|
12
|
+
const c = localStorage.getItem(n);
|
|
13
|
+
return c === null ? e : JSON.parse(c);
|
|
14
|
+
} catch {
|
|
15
|
+
return e;
|
|
16
|
+
}
|
|
17
|
+
}), a = O(
|
|
18
|
+
(c) => {
|
|
19
|
+
o((f) => {
|
|
20
|
+
const d = typeof c == "function" ? c(f) : c;
|
|
21
|
+
try {
|
|
22
|
+
localStorage == null || localStorage.setItem(n, JSON.stringify(d));
|
|
23
|
+
} catch {
|
|
24
|
+
}
|
|
25
|
+
return d;
|
|
26
|
+
});
|
|
27
|
+
},
|
|
28
|
+
[n]
|
|
29
|
+
);
|
|
30
|
+
return [r, a];
|
|
31
|
+
}
|
|
32
|
+
function xt() {
|
|
33
|
+
return O((t) => {
|
|
34
|
+
}, []);
|
|
35
|
+
}
|
|
36
|
+
function vt(t, e) {
|
|
37
|
+
return { ...t, ...e };
|
|
38
|
+
}
|
|
39
|
+
const k = {
|
|
9
40
|
success: "#1F8A65",
|
|
10
41
|
danger: "#CF2D56",
|
|
11
42
|
warning: "#E8A33D",
|
|
@@ -25,24 +56,27 @@ const C = {
|
|
|
25
56
|
renamed: "indigo"
|
|
26
57
|
};
|
|
27
58
|
function g() {
|
|
28
|
-
const e =
|
|
29
|
-
return
|
|
59
|
+
const e = Pe("light") === "dark" ? "dark" : "light";
|
|
60
|
+
return Oe(e);
|
|
30
61
|
}
|
|
31
62
|
const se = {
|
|
32
63
|
verticalAlign: "bottom",
|
|
33
|
-
align: "center"
|
|
64
|
+
align: "center",
|
|
65
|
+
itemSorter: null
|
|
34
66
|
}, le = {
|
|
67
|
+
itemSorter: null
|
|
68
|
+
}, ce = {
|
|
35
69
|
legend: { justifyContent: "center" }
|
|
36
70
|
};
|
|
37
71
|
function j() {
|
|
38
72
|
const e = g().chart.sequence;
|
|
39
|
-
return (n, r) => n ?
|
|
73
|
+
return (n, r) => n ? k[n] : e[r % e.length];
|
|
40
74
|
}
|
|
41
|
-
function
|
|
75
|
+
function de() {
|
|
42
76
|
const e = g().text.primary;
|
|
43
77
|
return { textColor: e, barLabelColor: e };
|
|
44
78
|
}
|
|
45
|
-
function
|
|
79
|
+
function ue(t, e) {
|
|
46
80
|
return t.map((n, r) => {
|
|
47
81
|
const o = { category: n };
|
|
48
82
|
for (const a of e)
|
|
@@ -50,27 +84,27 @@ function de(t, e) {
|
|
|
50
84
|
return o;
|
|
51
85
|
});
|
|
52
86
|
}
|
|
53
|
-
function
|
|
87
|
+
function fe(t, e) {
|
|
54
88
|
return t.map((n, r) => ({
|
|
55
89
|
name: n.name,
|
|
56
90
|
color: e(n.tone, r)
|
|
57
91
|
}));
|
|
58
92
|
}
|
|
59
|
-
function
|
|
93
|
+
function he(t, e) {
|
|
60
94
|
return (n) => `${e ?? ""}${n}${t ?? ""}`;
|
|
61
95
|
}
|
|
62
|
-
function
|
|
96
|
+
function We(t, e) {
|
|
63
97
|
if (t != null && t.length)
|
|
64
98
|
return t.map((n) => ({
|
|
65
99
|
...e ? { x: n.value } : { y: n.value },
|
|
66
100
|
label: n.label,
|
|
67
|
-
color: n.tone ?
|
|
101
|
+
color: n.tone ? k[n.tone] : k.neutral
|
|
68
102
|
}));
|
|
69
103
|
}
|
|
70
|
-
const
|
|
71
|
-
function
|
|
104
|
+
const Ge = /* @__PURE__ */ new Set(["log", "symlog", "pow", "sqrt"]);
|
|
105
|
+
function je(t) {
|
|
72
106
|
const { scale: e } = t;
|
|
73
|
-
return typeof e != "string" || !
|
|
107
|
+
return typeof e != "string" || !Ge.has(e) ? t : {
|
|
74
108
|
...t,
|
|
75
109
|
type: t.type ?? "number",
|
|
76
110
|
allowDataOverflow: t.allowDataOverflow ?? !0,
|
|
@@ -78,35 +112,35 @@ function Ge(t) {
|
|
|
78
112
|
domain: t.domain ?? [1, "dataMax"]
|
|
79
113
|
};
|
|
80
114
|
}
|
|
81
|
-
function
|
|
82
|
-
const e =
|
|
115
|
+
function pe(t) {
|
|
116
|
+
const e = We(t.referenceLines, !!t.horizontal);
|
|
83
117
|
let n;
|
|
84
118
|
if (!t.stacked && !t.normalized) {
|
|
85
119
|
const a = t.beginAtZero !== !1;
|
|
86
120
|
n = [t.yMin ?? (a ? 0 : "auto"), t.yMax ?? "auto"];
|
|
87
121
|
}
|
|
88
|
-
const r = t.valueAxis ?
|
|
122
|
+
const r = t.valueAxis ? je(t.valueAxis) : void 0;
|
|
89
123
|
if (!n && !r)
|
|
90
124
|
return { referenceLines: e };
|
|
91
125
|
const o = { ...n && { domain: n }, ...r };
|
|
92
126
|
return t.horizontal ? { xAxisProps: o, referenceLines: e } : { yAxisProps: o, referenceLines: e };
|
|
93
127
|
}
|
|
94
|
-
function
|
|
128
|
+
function Ke(t, e, n) {
|
|
95
129
|
return t !== void 0 ? t : e.length === 1 && n.length <= 8;
|
|
96
130
|
}
|
|
97
|
-
function
|
|
131
|
+
function Ve(t, e, n) {
|
|
98
132
|
return e.length !== 1 || e[0].tone ? t : t.map((r, o) => ({
|
|
99
133
|
...r,
|
|
100
134
|
color: n(void 0, o)
|
|
101
135
|
}));
|
|
102
136
|
}
|
|
103
|
-
const
|
|
104
|
-
function
|
|
105
|
-
return t.length <= e ? t : `${t.slice(0, e - 1)}…`;
|
|
137
|
+
const Xe = 96, Ye = 6.5;
|
|
138
|
+
function qe(t, e) {
|
|
139
|
+
return t.length <= e ? t : `${t.slice(0, Math.max(0, e - 1))}…`;
|
|
106
140
|
}
|
|
107
|
-
function
|
|
108
|
-
var
|
|
109
|
-
const n = typeof e.x == "number" ? e.x : Number(e.x) || 0, r = typeof e.y == "number" ? e.y : Number(e.y) || 0, o = String(((
|
|
141
|
+
function Ze(t, e) {
|
|
142
|
+
var c;
|
|
143
|
+
const n = typeof e.x == "number" ? e.x : Number(e.x) || 0, r = typeof e.y == "number" ? e.y : Number(e.y) || 0, o = String(((c = e.payload) == null ? void 0 : c.value) ?? ""), a = qe(o, t);
|
|
110
144
|
return /* @__PURE__ */ i("g", { transform: `translate(${n},${r})`, children: /* @__PURE__ */ y(
|
|
111
145
|
"text",
|
|
112
146
|
{
|
|
@@ -123,95 +157,49 @@ function Ye(t, e) {
|
|
|
123
157
|
}
|
|
124
158
|
) });
|
|
125
159
|
}
|
|
126
|
-
function
|
|
160
|
+
function ye(t) {
|
|
127
161
|
return {
|
|
128
162
|
fontWeight: 700,
|
|
129
163
|
fill: t
|
|
130
164
|
};
|
|
131
165
|
}
|
|
132
|
-
function
|
|
166
|
+
function Je(t) {
|
|
133
167
|
return {
|
|
134
|
-
...
|
|
168
|
+
...ye(t),
|
|
135
169
|
position: "right"
|
|
136
170
|
};
|
|
137
171
|
}
|
|
138
|
-
function
|
|
139
|
-
const n = Math.floor(t /
|
|
172
|
+
function Ue(t = Xe, e = !1) {
|
|
173
|
+
const n = Math.floor(t / Ye);
|
|
140
174
|
return {
|
|
141
175
|
yAxisProps: {
|
|
142
|
-
tick: (r) =>
|
|
176
|
+
tick: (r) => Ze(n, r),
|
|
143
177
|
width: t
|
|
144
178
|
},
|
|
145
179
|
barChartProps: {
|
|
146
180
|
margin: { right: e ? 48 : 32 }
|
|
147
181
|
},
|
|
148
|
-
/** Value-axis grid only; Mantine's default `x` draws a line per category row. */
|
|
149
182
|
gridAxis: "y"
|
|
150
183
|
};
|
|
151
184
|
}
|
|
152
|
-
function
|
|
185
|
+
function Qe() {
|
|
153
186
|
return {
|
|
154
187
|
barChartProps: {
|
|
155
188
|
margin: { top: 22 }
|
|
156
189
|
}
|
|
157
190
|
};
|
|
158
191
|
}
|
|
159
|
-
function
|
|
160
|
-
categories: t,
|
|
161
|
-
series: e,
|
|
162
|
-
height: n = 240,
|
|
163
|
-
fill: r,
|
|
164
|
-
valueSuffix: o,
|
|
165
|
-
valuePrefix: a,
|
|
166
|
-
showValues: l,
|
|
167
|
-
showHoverGuide: f = !0,
|
|
168
|
-
beginAtZero: d,
|
|
169
|
-
yMin: c,
|
|
170
|
-
yMax: u,
|
|
171
|
-
referenceLines: m,
|
|
172
|
-
style: v,
|
|
173
|
-
extra: h,
|
|
174
|
-
smooth: b
|
|
175
|
-
}) {
|
|
176
|
-
const w = (h == null ? void 0 : h.smooth) ?? b, L = j(), P = ce(), B = de(t, e), $ = ue(e, L), S = !!(r && (h != null && h.stacked)), A = he({
|
|
177
|
-
beginAtZero: d,
|
|
178
|
-
yMin: c,
|
|
179
|
-
yMax: u,
|
|
180
|
-
referenceLines: m,
|
|
181
|
-
horizontal: !1,
|
|
182
|
-
stacked: S,
|
|
183
|
-
valueAxis: h == null ? void 0 : h.valueAxis
|
|
184
|
-
}), M = {
|
|
185
|
-
h: n,
|
|
186
|
-
data: B,
|
|
187
|
-
dataKey: "category",
|
|
188
|
-
series: $,
|
|
189
|
-
curveType: w ? "monotone" : "linear",
|
|
190
|
-
withLegend: e.length > 1,
|
|
191
|
-
legendProps: se,
|
|
192
|
-
valueFormatter: fe(o, a),
|
|
193
|
-
withPointLabels: l ?? t.length <= 20,
|
|
194
|
-
tooltipProps: f ? void 0 : { cursor: !1 },
|
|
195
|
-
styles: {
|
|
196
|
-
...le,
|
|
197
|
-
legendItemName: { color: P.textColor }
|
|
198
|
-
},
|
|
199
|
-
...A,
|
|
200
|
-
style: v
|
|
201
|
-
};
|
|
202
|
-
return r ? /* @__PURE__ */ i(Ie, { ...M, type: S ? "stacked" : "default" }) : /* @__PURE__ */ i(Ne, { ...M });
|
|
203
|
-
}
|
|
204
|
-
function gt({
|
|
192
|
+
function bt({
|
|
205
193
|
categories: t,
|
|
206
194
|
series: e,
|
|
207
195
|
height: n = 240,
|
|
208
196
|
stacked: r,
|
|
209
197
|
horizontal: o,
|
|
210
198
|
normalized: a,
|
|
211
|
-
valueSuffix:
|
|
199
|
+
valueSuffix: c,
|
|
212
200
|
valuePrefix: f,
|
|
213
201
|
showValues: d,
|
|
214
|
-
beginAtZero:
|
|
202
|
+
beginAtZero: l,
|
|
215
203
|
yMin: u,
|
|
216
204
|
yMax: m,
|
|
217
205
|
referenceLines: v,
|
|
@@ -219,12 +207,12 @@ function gt({
|
|
|
219
207
|
extra: b
|
|
220
208
|
}) {
|
|
221
209
|
var A;
|
|
222
|
-
const w = j(), L =
|
|
223
|
-
|
|
210
|
+
const w = j(), L = de(), P = Ve(
|
|
211
|
+
ue(t, e),
|
|
224
212
|
e,
|
|
225
213
|
w
|
|
226
|
-
), B = a ? "percent" : r ? "stacked" : "default",
|
|
227
|
-
beginAtZero:
|
|
214
|
+
), B = a ? "percent" : r ? "stacked" : "default", D = pe({
|
|
215
|
+
beginAtZero: l,
|
|
228
216
|
yMin: u,
|
|
229
217
|
yMax: m,
|
|
230
218
|
referenceLines: v,
|
|
@@ -232,44 +220,92 @@ function gt({
|
|
|
232
220
|
stacked: r,
|
|
233
221
|
normalized: a,
|
|
234
222
|
valueAxis: b == null ? void 0 : b.valueAxis
|
|
235
|
-
}), S = !r && !a &&
|
|
223
|
+
}), S = !r && !a && Ke(d, e, t);
|
|
236
224
|
return /* @__PURE__ */ i(
|
|
237
|
-
|
|
225
|
+
Ce,
|
|
238
226
|
{
|
|
239
227
|
h: n,
|
|
240
228
|
data: P,
|
|
241
229
|
dataKey: "category",
|
|
242
|
-
series:
|
|
230
|
+
series: fe(e, w),
|
|
243
231
|
type: B,
|
|
244
232
|
orientation: o ? "vertical" : "horizontal",
|
|
245
233
|
withLegend: e.length > 1,
|
|
246
234
|
legendProps: se,
|
|
247
|
-
|
|
235
|
+
tooltipProps: le,
|
|
236
|
+
valueFormatter: he(c, f),
|
|
248
237
|
withBarValueLabel: S,
|
|
249
238
|
...S ? {
|
|
250
|
-
valueLabelProps: o ?
|
|
239
|
+
valueLabelProps: o ? Je(L.barLabelColor) : ye(L.barLabelColor)
|
|
251
240
|
} : {},
|
|
252
|
-
...o ?
|
|
241
|
+
...o ? Ue((A = b == null ? void 0 : b.categoryAxis) == null ? void 0 : A.width, S) : S ? Qe() : {},
|
|
253
242
|
styles: {
|
|
254
|
-
...
|
|
243
|
+
...ce,
|
|
255
244
|
legendItemName: { color: L.textColor }
|
|
256
245
|
},
|
|
257
|
-
|
|
246
|
+
...D,
|
|
258
247
|
style: h
|
|
259
248
|
}
|
|
260
249
|
);
|
|
261
250
|
}
|
|
262
|
-
|
|
263
|
-
|
|
251
|
+
function St({
|
|
252
|
+
categories: t,
|
|
253
|
+
series: e,
|
|
254
|
+
height: n = 240,
|
|
255
|
+
fill: r,
|
|
256
|
+
valueSuffix: o,
|
|
257
|
+
valuePrefix: a,
|
|
258
|
+
showValues: c,
|
|
259
|
+
showHoverGuide: f = !0,
|
|
260
|
+
beginAtZero: d,
|
|
261
|
+
yMin: l,
|
|
262
|
+
yMax: u,
|
|
263
|
+
referenceLines: m,
|
|
264
|
+
style: v,
|
|
265
|
+
extra: h,
|
|
266
|
+
smooth: b
|
|
267
|
+
}) {
|
|
268
|
+
const w = (h == null ? void 0 : h.smooth) ?? b, L = j(), P = de(), B = ue(t, e), D = fe(e, L), S = !!(r && (h != null && h.stacked)), A = pe({
|
|
269
|
+
beginAtZero: d,
|
|
270
|
+
yMin: l,
|
|
271
|
+
yMax: u,
|
|
272
|
+
referenceLines: m,
|
|
273
|
+
horizontal: !1,
|
|
274
|
+
stacked: S,
|
|
275
|
+
valueAxis: h == null ? void 0 : h.valueAxis
|
|
276
|
+
}), M = {
|
|
277
|
+
h: n,
|
|
278
|
+
data: B,
|
|
279
|
+
dataKey: "category",
|
|
280
|
+
series: D,
|
|
281
|
+
curveType: w ? "monotone" : "linear",
|
|
282
|
+
withLegend: e.length > 1,
|
|
283
|
+
legendProps: se,
|
|
284
|
+
valueFormatter: he(o, a),
|
|
285
|
+
withPointLabels: c ?? t.length <= 20,
|
|
286
|
+
tooltipProps: {
|
|
287
|
+
...le,
|
|
288
|
+
...!f && { cursor: !1 }
|
|
289
|
+
},
|
|
290
|
+
styles: {
|
|
291
|
+
...ce,
|
|
292
|
+
legendItemName: { color: P.textColor }
|
|
293
|
+
},
|
|
294
|
+
...A,
|
|
295
|
+
style: v
|
|
296
|
+
};
|
|
297
|
+
return r ? /* @__PURE__ */ i(ke, { ...M, type: S ? "stacked" : "default" }) : /* @__PURE__ */ i(we, { ...M });
|
|
298
|
+
}
|
|
299
|
+
const et = Se(
|
|
300
|
+
() => import("./pie-donut-qRBFP0tT.js").then((t) => ({ default: t.PieDonutChart }))
|
|
301
|
+
), tt = 180, nt = 540;
|
|
302
|
+
function rt(t, e) {
|
|
264
303
|
if (e <= 0)
|
|
265
304
|
return "0%";
|
|
266
305
|
const n = t / e * 100;
|
|
267
306
|
return n < 10 && Math.abs(n - Math.round(n)) > 0.05 ? `${n.toFixed(1)}%` : `${Math.round(n)}%`;
|
|
268
307
|
}
|
|
269
|
-
function
|
|
270
|
-
return Math.max(28, Math.round(t * 0.22));
|
|
271
|
-
}
|
|
272
|
-
function nt(t) {
|
|
308
|
+
function ot(t) {
|
|
273
309
|
return t.map((e) => ({
|
|
274
310
|
dataKey: e.name,
|
|
275
311
|
value: e.name,
|
|
@@ -277,65 +313,32 @@ function nt(t) {
|
|
|
277
313
|
type: "circle"
|
|
278
314
|
}));
|
|
279
315
|
}
|
|
280
|
-
function
|
|
316
|
+
function at(t, e) {
|
|
281
317
|
return t.map((n) => ({
|
|
282
318
|
name: n.name,
|
|
283
319
|
color: n.color,
|
|
284
|
-
label: `${n.name} ${
|
|
320
|
+
label: `${n.name} ${rt(n.value, e)}`
|
|
285
321
|
}));
|
|
286
322
|
}
|
|
287
|
-
function
|
|
288
|
-
|
|
289
|
-
family: e,
|
|
290
|
-
primary: n,
|
|
291
|
-
subtitle: r
|
|
292
|
-
}) {
|
|
293
|
-
return /* @__PURE__ */ y(
|
|
294
|
-
"text",
|
|
295
|
-
{
|
|
296
|
-
x: "50%",
|
|
297
|
-
y: "50%",
|
|
298
|
-
textAnchor: "middle",
|
|
299
|
-
dominantBaseline: "central",
|
|
300
|
-
fontFamily: e,
|
|
301
|
-
children: [
|
|
302
|
-
/* @__PURE__ */ i("tspan", { x: "50%", dy: "-0.4em", fontSize: 20, fontWeight: 600, fill: n, children: t }),
|
|
303
|
-
/* @__PURE__ */ i("tspan", { x: "50%", dy: "1.55em", fontSize: 16, fontWeight: 500, fill: r, children: "Total" })
|
|
304
|
-
]
|
|
305
|
-
}
|
|
306
|
-
);
|
|
307
|
-
}
|
|
308
|
-
function xt({ data: t, size: e = 200, donut: n, style: r }) {
|
|
309
|
-
const [o, a] = E(null), l = g(), f = j(), d = t.map((h, b) => ({
|
|
323
|
+
function Ct({ data: t, size: e = 200, donut: n, style: r }) {
|
|
324
|
+
const [o, a] = I(null), c = g(), f = j(), d = t.map((h, b) => ({
|
|
310
325
|
name: h.label,
|
|
311
326
|
value: h.value,
|
|
312
327
|
color: f(h.tone, b)
|
|
313
|
-
})),
|
|
314
|
-
startAngle:
|
|
315
|
-
endAngle:
|
|
328
|
+
})), l = d.reduce((h, b) => h + b.value, 0), u = {
|
|
329
|
+
startAngle: tt,
|
|
330
|
+
endAngle: nt
|
|
316
331
|
}, m = (h) => ({
|
|
317
332
|
opacity: o === null || o === h ? 1 : 0.35
|
|
318
|
-
}), v = n ? /* @__PURE__ */ i(
|
|
319
|
-
|
|
333
|
+
}), v = n ? /* @__PURE__ */ i(be, { fallback: null, children: /* @__PURE__ */ i(
|
|
334
|
+
et,
|
|
320
335
|
{
|
|
321
336
|
data: d,
|
|
322
337
|
size: e,
|
|
323
|
-
|
|
324
|
-
withTooltip: !0,
|
|
325
|
-
cellProps: (h) => m(h.name),
|
|
326
|
-
...u,
|
|
327
|
-
children: /* @__PURE__ */ i(
|
|
328
|
-
ot,
|
|
329
|
-
{
|
|
330
|
-
total: c,
|
|
331
|
-
family: l.typography.fontFamily,
|
|
332
|
-
primary: l.text.primary,
|
|
333
|
-
subtitle: l.text.secondary
|
|
334
|
-
}
|
|
335
|
-
)
|
|
338
|
+
highlighted: o
|
|
336
339
|
}
|
|
337
|
-
) : /* @__PURE__ */ i(
|
|
338
|
-
|
|
340
|
+
) }) : /* @__PURE__ */ i(
|
|
341
|
+
Te,
|
|
339
342
|
{
|
|
340
343
|
data: d,
|
|
341
344
|
size: e,
|
|
@@ -371,10 +374,10 @@ function xt({ data: t, size: e = 200, donut: n, style: r }) {
|
|
|
371
374
|
}
|
|
372
375
|
),
|
|
373
376
|
/* @__PURE__ */ i(
|
|
374
|
-
|
|
377
|
+
Le,
|
|
375
378
|
{
|
|
376
|
-
payload:
|
|
377
|
-
series:
|
|
379
|
+
payload: ot(d),
|
|
380
|
+
series: at(d, l),
|
|
378
381
|
legendPosition: "bottom",
|
|
379
382
|
centered: !0,
|
|
380
383
|
onHighlight: a,
|
|
@@ -384,10 +387,10 @@ function xt({ data: t, size: e = 200, donut: n, style: r }) {
|
|
|
384
387
|
legend: {
|
|
385
388
|
justifyContent: "center",
|
|
386
389
|
gap: 12,
|
|
387
|
-
color:
|
|
390
|
+
color: c.text.primary
|
|
388
391
|
},
|
|
389
392
|
legendItemName: {
|
|
390
|
-
color:
|
|
393
|
+
color: c.text.primary
|
|
391
394
|
}
|
|
392
395
|
}
|
|
393
396
|
}
|
|
@@ -396,21 +399,21 @@ function xt({ data: t, size: e = 200, donut: n, style: r }) {
|
|
|
396
399
|
}
|
|
397
400
|
);
|
|
398
401
|
}
|
|
399
|
-
function
|
|
402
|
+
function kt(t) {
|
|
400
403
|
const {
|
|
401
404
|
nodes: e,
|
|
402
405
|
edges: n,
|
|
403
406
|
direction: r = "vertical",
|
|
404
407
|
nodeWidth: o = 160,
|
|
405
408
|
nodeHeight: a = 40,
|
|
406
|
-
rankGap:
|
|
409
|
+
rankGap: c = 64,
|
|
407
410
|
nodeGap: f = 48,
|
|
408
411
|
padding: d = 24
|
|
409
|
-
} = t,
|
|
410
|
-
for (const s of
|
|
412
|
+
} = t, l = e.map((s) => s.id), u = new Set(l), m = /* @__PURE__ */ new Map();
|
|
413
|
+
for (const s of l) m.set(s, []);
|
|
411
414
|
for (const s of n)
|
|
412
415
|
u.has(s.from) && u.has(s.to) && m.get(s.from).push(s.to);
|
|
413
|
-
const v = 0, h = 1, b = 2, w = new Map(
|
|
416
|
+
const v = 0, h = 1, b = 2, w = new Map(l.map((s) => [s, v])), L = /* @__PURE__ */ new Set(), P = (s, p) => `${s}\0${p}`, B = (s) => {
|
|
414
417
|
w.set(s, h);
|
|
415
418
|
for (const p of m.get(s) ?? []) {
|
|
416
419
|
const x = w.get(p);
|
|
@@ -418,49 +421,49 @@ function vt(t) {
|
|
|
418
421
|
}
|
|
419
422
|
w.set(s, b);
|
|
420
423
|
};
|
|
421
|
-
for (const s of
|
|
422
|
-
const
|
|
424
|
+
for (const s of l) w.get(s) === v && B(s);
|
|
425
|
+
const D = n.filter(
|
|
423
426
|
(s) => u.has(s.from) && u.has(s.to) && !L.has(P(s.from, s.to))
|
|
424
|
-
), S = new Map(
|
|
425
|
-
for (const s of
|
|
427
|
+
), S = new Map(l.map((s) => [s, 0])), A = new Map(l.map((s) => [s, []]));
|
|
428
|
+
for (const s of D)
|
|
426
429
|
A.get(s.from).push(s.to), S.set(s.to, (S.get(s.to) ?? 0) + 1);
|
|
427
|
-
const M = new Map(
|
|
428
|
-
for (;
|
|
429
|
-
const s =
|
|
430
|
+
const M = new Map(l.map((s) => [s, 0])), _ = l.filter((s) => (S.get(s) ?? 0) === 0);
|
|
431
|
+
for (; _.length > 0; ) {
|
|
432
|
+
const s = _.shift(), p = M.get(s);
|
|
430
433
|
for (const x of A.get(s))
|
|
431
|
-
M.set(x, Math.max(M.get(x), p + 1)), S.set(x, S.get(x) - 1), S.get(x) === 0 &&
|
|
434
|
+
M.set(x, Math.max(M.get(x), p + 1)), S.set(x, S.get(x) - 1), S.get(x) === 0 && _.push(x);
|
|
432
435
|
}
|
|
433
|
-
const
|
|
434
|
-
for (const s of
|
|
436
|
+
const $ = /* @__PURE__ */ new Map();
|
|
437
|
+
for (const s of l) {
|
|
435
438
|
const p = M.get(s);
|
|
436
|
-
|
|
439
|
+
$.has(p) || $.set(p, []), $.get(p).push(s);
|
|
437
440
|
}
|
|
438
|
-
const
|
|
441
|
+
const E = [...$.keys()].sort((s, p) => s - p), C = r === "vertical", X = (s) => s * (C ? o : a) + Math.max(0, s - 1) * f, Y = Math.max(
|
|
439
442
|
0,
|
|
440
|
-
...
|
|
441
|
-
),
|
|
442
|
-
|
|
443
|
-
const x =
|
|
443
|
+
...E.map((s) => X($.get(s).length))
|
|
444
|
+
), F = /* @__PURE__ */ new Map(), q = [];
|
|
445
|
+
E.forEach((s, p) => {
|
|
446
|
+
const x = $.get(s), N = X(x.length), H = d + (Y - N) / 2, R = d + p * ((C ? a : o) + c);
|
|
444
447
|
x.forEach((Q, ee) => {
|
|
445
|
-
const te =
|
|
446
|
-
|
|
448
|
+
const te = H + ee * ((C ? o : a) + f), xe = C ? te : R, ve = C ? R : te;
|
|
449
|
+
F.set(Q, { id: Q, x: xe, y: ve, rank: s, order: ee });
|
|
447
450
|
}), q.push({
|
|
448
451
|
rank: s,
|
|
449
|
-
x:
|
|
450
|
-
y:
|
|
451
|
-
width:
|
|
452
|
-
height:
|
|
452
|
+
x: C ? H : R,
|
|
453
|
+
y: C ? R : H,
|
|
454
|
+
width: C ? N : o,
|
|
455
|
+
height: C ? a : N,
|
|
453
456
|
nodeIds: x
|
|
454
457
|
});
|
|
455
458
|
});
|
|
456
|
-
const Z = (s, p) => s ?
|
|
459
|
+
const Z = (s, p) => s ? C ? {
|
|
457
460
|
x: s.x + o / 2,
|
|
458
461
|
y: p === "source" ? s.y + a : s.y
|
|
459
462
|
} : {
|
|
460
463
|
x: p === "source" ? s.x + o : s.x,
|
|
461
464
|
y: s.y + a / 2
|
|
462
465
|
} : { x: 0, y: 0 }, me = n.filter((s) => u.has(s.from) && u.has(s.to)).map((s) => {
|
|
463
|
-
const p = Z(
|
|
466
|
+
const p = Z(F.get(s.from), "source"), x = Z(F.get(s.to), "target");
|
|
464
467
|
return {
|
|
465
468
|
from: s.from,
|
|
466
469
|
to: s.to,
|
|
@@ -470,17 +473,17 @@ function vt(t) {
|
|
|
470
473
|
targetY: x.y,
|
|
471
474
|
isBackEdge: L.has(P(s.from, s.to))
|
|
472
475
|
};
|
|
473
|
-
}), J = d * 2 +
|
|
476
|
+
}), J = d * 2 + E.length * (C ? a : o) + Math.max(0, E.length - 1) * c, U = d * 2 + Y;
|
|
474
477
|
return {
|
|
475
|
-
nodes: [...
|
|
478
|
+
nodes: [...F.values()],
|
|
476
479
|
edges: me,
|
|
477
480
|
ranks: q,
|
|
478
481
|
direction: r,
|
|
479
|
-
width:
|
|
480
|
-
height:
|
|
482
|
+
width: C ? U : J,
|
|
483
|
+
height: C ? J : U
|
|
481
484
|
};
|
|
482
485
|
}
|
|
483
|
-
function
|
|
486
|
+
function wt({
|
|
484
487
|
additions: t = 0,
|
|
485
488
|
deletions: e = 0,
|
|
486
489
|
style: n
|
|
@@ -497,11 +500,11 @@ function bt({
|
|
|
497
500
|
...n
|
|
498
501
|
},
|
|
499
502
|
children: [
|
|
500
|
-
t > 0 && /* @__PURE__ */ y("span", { style: { color:
|
|
503
|
+
t > 0 && /* @__PURE__ */ y("span", { style: { color: k.added }, children: [
|
|
501
504
|
"+",
|
|
502
505
|
t
|
|
503
506
|
] }),
|
|
504
|
-
e > 0 && /* @__PURE__ */ y("span", { style: { color:
|
|
507
|
+
e > 0 && /* @__PURE__ */ y("span", { style: { color: k.deleted }, children: [
|
|
505
508
|
"-",
|
|
506
509
|
e
|
|
507
510
|
] })
|
|
@@ -509,19 +512,19 @@ function bt({
|
|
|
509
512
|
}
|
|
510
513
|
);
|
|
511
514
|
}
|
|
512
|
-
const
|
|
515
|
+
const it = {
|
|
513
516
|
added: "+",
|
|
514
517
|
removed: "-",
|
|
515
518
|
unchanged: " "
|
|
516
519
|
};
|
|
517
|
-
function
|
|
520
|
+
function Lt({
|
|
518
521
|
lines: t,
|
|
519
522
|
showLineNumbers: e = !0,
|
|
520
523
|
coloredLineNumbers: n = !0,
|
|
521
524
|
showAccentStrip: r = !0,
|
|
522
525
|
style: o
|
|
523
526
|
}) {
|
|
524
|
-
const a = g(),
|
|
527
|
+
const a = g(), c = (l) => l === "added" ? a.diff.insertedLine : l === "removed" ? a.diff.removedLine : "transparent", f = (l) => l === "added" ? a.diff.stripAdded : l === "removed" ? a.diff.stripRemoved : "transparent", d = (l) => n && l === "added" ? k.added : n && l === "removed" ? k.deleted : a.text.tertiary;
|
|
525
528
|
return /* @__PURE__ */ i(
|
|
526
529
|
"div",
|
|
527
530
|
{
|
|
@@ -533,14 +536,14 @@ function St({
|
|
|
533
536
|
overflowX: "auto",
|
|
534
537
|
...o
|
|
535
538
|
},
|
|
536
|
-
children: t.map((
|
|
539
|
+
children: t.map((l, u) => /* @__PURE__ */ y(
|
|
537
540
|
"div",
|
|
538
541
|
{
|
|
539
542
|
style: {
|
|
540
543
|
display: "flex",
|
|
541
544
|
alignItems: "stretch",
|
|
542
|
-
background: l
|
|
543
|
-
borderLeft: r ? `3px solid ${f(
|
|
545
|
+
background: c(l.type),
|
|
546
|
+
borderLeft: r ? `3px solid ${f(l.type)}` : void 0
|
|
544
547
|
},
|
|
545
548
|
children: [
|
|
546
549
|
e && /* @__PURE__ */ i(
|
|
@@ -552,9 +555,9 @@ function St({
|
|
|
552
555
|
textAlign: "right",
|
|
553
556
|
paddingRight: 10,
|
|
554
557
|
userSelect: "none",
|
|
555
|
-
color: d(
|
|
558
|
+
color: d(l.type)
|
|
556
559
|
},
|
|
557
|
-
children:
|
|
560
|
+
children: l.lineNumber ?? ""
|
|
558
561
|
}
|
|
559
562
|
),
|
|
560
563
|
/* @__PURE__ */ i(
|
|
@@ -565,9 +568,9 @@ function St({
|
|
|
565
568
|
width: 14,
|
|
566
569
|
textAlign: "center",
|
|
567
570
|
userSelect: "none",
|
|
568
|
-
color: d(
|
|
571
|
+
color: d(l.type)
|
|
569
572
|
},
|
|
570
|
-
children:
|
|
573
|
+
children: it[l.type]
|
|
571
574
|
}
|
|
572
575
|
),
|
|
573
576
|
/* @__PURE__ */ i(
|
|
@@ -579,7 +582,7 @@ function St({
|
|
|
579
582
|
whiteSpace: "pre",
|
|
580
583
|
fontFamily: "inherit"
|
|
581
584
|
},
|
|
582
|
-
children:
|
|
585
|
+
children: l.content
|
|
583
586
|
}
|
|
584
587
|
)
|
|
585
588
|
]
|
|
@@ -589,8 +592,8 @@ function St({
|
|
|
589
592
|
}
|
|
590
593
|
);
|
|
591
594
|
}
|
|
592
|
-
function
|
|
593
|
-
const e = g(), n = t === "completed" ?
|
|
595
|
+
function st({ status: t }) {
|
|
596
|
+
const e = g(), n = t === "completed" ? k.success : t === "in_progress" ? e.accent.primary : t === "cancelled" ? k.danger : e.text.tertiary;
|
|
594
597
|
return /* @__PURE__ */ y(
|
|
595
598
|
"svg",
|
|
596
599
|
{
|
|
@@ -626,7 +629,7 @@ function it({ status: t }) {
|
|
|
626
629
|
}
|
|
627
630
|
);
|
|
628
631
|
}
|
|
629
|
-
function
|
|
632
|
+
function lt({
|
|
630
633
|
todos: t,
|
|
631
634
|
dimmedTodoIds: e,
|
|
632
635
|
onTodoClick: n,
|
|
@@ -634,7 +637,7 @@ function st({
|
|
|
634
637
|
}) {
|
|
635
638
|
const o = g();
|
|
636
639
|
return t.length === 0 ? null : /* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", ...r }, children: t.map((a) => {
|
|
637
|
-
const
|
|
640
|
+
const c = e == null ? void 0 : e.has(a.id);
|
|
638
641
|
return /* @__PURE__ */ y(
|
|
639
642
|
"button",
|
|
640
643
|
{
|
|
@@ -653,10 +656,10 @@ function st({
|
|
|
653
656
|
color: o.text.primary,
|
|
654
657
|
fontSize: 14,
|
|
655
658
|
lineHeight: "20px",
|
|
656
|
-
opacity:
|
|
659
|
+
opacity: c ? 0.45 : 1
|
|
657
660
|
},
|
|
658
661
|
children: [
|
|
659
|
-
/* @__PURE__ */ i(
|
|
662
|
+
/* @__PURE__ */ i(st, { status: a.status }),
|
|
660
663
|
/* @__PURE__ */ i(
|
|
661
664
|
"span",
|
|
662
665
|
{
|
|
@@ -673,16 +676,16 @@ function st({
|
|
|
673
676
|
);
|
|
674
677
|
}) });
|
|
675
678
|
}
|
|
676
|
-
function
|
|
679
|
+
function Tt({
|
|
677
680
|
todos: t,
|
|
678
681
|
dimmedTodoIds: e,
|
|
679
682
|
defaultExpanded: n = !1,
|
|
680
683
|
onTodoClick: r,
|
|
681
684
|
style: o
|
|
682
685
|
}) {
|
|
683
|
-
const a = g(), [
|
|
686
|
+
const a = g(), [c, f] = I(n);
|
|
684
687
|
if (t.length === 0) return null;
|
|
685
|
-
const d = t.filter((
|
|
688
|
+
const d = t.filter((l) => l.status === "completed").length;
|
|
686
689
|
return /* @__PURE__ */ y(
|
|
687
690
|
"div",
|
|
688
691
|
{
|
|
@@ -697,7 +700,7 @@ function kt({
|
|
|
697
700
|
"button",
|
|
698
701
|
{
|
|
699
702
|
type: "button",
|
|
700
|
-
onClick: () => f((
|
|
703
|
+
onClick: () => f((l) => !l),
|
|
701
704
|
style: {
|
|
702
705
|
display: "flex",
|
|
703
706
|
alignItems: "center",
|
|
@@ -720,7 +723,7 @@ function kt({
|
|
|
720
723
|
viewBox: "0 0 12 12",
|
|
721
724
|
fill: "none",
|
|
722
725
|
style: {
|
|
723
|
-
transform:
|
|
726
|
+
transform: c ? "rotate(90deg)" : "none",
|
|
724
727
|
transition: "transform 120ms"
|
|
725
728
|
},
|
|
726
729
|
"aria-hidden": !0,
|
|
@@ -747,8 +750,8 @@ function kt({
|
|
|
747
750
|
]
|
|
748
751
|
}
|
|
749
752
|
),
|
|
750
|
-
|
|
751
|
-
|
|
753
|
+
c && /* @__PURE__ */ i("div", { style: { padding: 6 }, children: /* @__PURE__ */ i(
|
|
754
|
+
lt,
|
|
752
755
|
{
|
|
753
756
|
todos: t,
|
|
754
757
|
dimmedTodoIds: e,
|
|
@@ -759,201 +762,105 @@ function kt({
|
|
|
759
762
|
}
|
|
760
763
|
);
|
|
761
764
|
}
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
765
|
+
const ct = {
|
|
766
|
+
primary: "filled",
|
|
767
|
+
secondary: "default",
|
|
768
|
+
ghost: "subtle"
|
|
769
|
+
};
|
|
770
|
+
function Pt({
|
|
771
|
+
children: t,
|
|
772
|
+
variant: e = "secondary",
|
|
773
|
+
disabled: n,
|
|
774
|
+
type: r = "button",
|
|
775
|
+
style: o,
|
|
776
|
+
onClick: a
|
|
777
|
+
}) {
|
|
778
|
+
return /* @__PURE__ */ i(
|
|
779
|
+
Ae,
|
|
780
|
+
{
|
|
781
|
+
variant: ct[e],
|
|
782
|
+
color: e === "primary" ? "accent" : void 0,
|
|
783
|
+
size: "xs",
|
|
784
|
+
disabled: n,
|
|
785
|
+
type: r,
|
|
786
|
+
onClick: a,
|
|
787
|
+
style: o,
|
|
788
|
+
children: t
|
|
770
789
|
}
|
|
771
|
-
}), a = G(
|
|
772
|
-
(l) => {
|
|
773
|
-
o((f) => {
|
|
774
|
-
const d = typeof l == "function" ? l(f) : l;
|
|
775
|
-
try {
|
|
776
|
-
localStorage == null || localStorage.setItem(n, JSON.stringify(d));
|
|
777
|
-
} catch {
|
|
778
|
-
}
|
|
779
|
-
return d;
|
|
780
|
-
});
|
|
781
|
-
},
|
|
782
|
-
[n]
|
|
783
790
|
);
|
|
784
|
-
return [r, a];
|
|
785
|
-
}
|
|
786
|
-
function wt() {
|
|
787
|
-
return G((t) => {
|
|
788
|
-
}, []);
|
|
789
|
-
}
|
|
790
|
-
function Lt(t, e) {
|
|
791
|
-
return { ...t, ...e };
|
|
792
|
-
}
|
|
793
|
-
function K(t, e, n) {
|
|
794
|
-
const r = t.typography[e];
|
|
795
|
-
return {
|
|
796
|
-
fontFamily: t.typography.fontFamily,
|
|
797
|
-
fontSize: r.fontSize,
|
|
798
|
-
lineHeight: r.lineHeight,
|
|
799
|
-
fontWeight: r.fontWeight,
|
|
800
|
-
color: t.text.primary,
|
|
801
|
-
margin: 0,
|
|
802
|
-
...n
|
|
803
|
-
};
|
|
804
791
|
}
|
|
805
|
-
function
|
|
806
|
-
const n = g();
|
|
807
|
-
return /* @__PURE__ */ i(W, { order: 1, style: K(n, "h1", e), children: t });
|
|
808
|
-
}
|
|
809
|
-
function Pt({ children: t, style: e }) {
|
|
810
|
-
const n = g();
|
|
811
|
-
return /* @__PURE__ */ i(W, { order: 2, style: K(n, "h2", e), children: t });
|
|
812
|
-
}
|
|
813
|
-
function At({ children: t, style: e }) {
|
|
814
|
-
const n = g();
|
|
815
|
-
return /* @__PURE__ */ i(W, { order: 3, style: K(n, "h3", e), children: t });
|
|
816
|
-
}
|
|
817
|
-
const lt = {
|
|
818
|
-
normal: 400,
|
|
819
|
-
medium: 500,
|
|
820
|
-
semibold: 600,
|
|
821
|
-
bold: 700
|
|
822
|
-
}, re = ae(!1);
|
|
823
|
-
function Mt({
|
|
792
|
+
function At({
|
|
824
793
|
children: t,
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
style: f
|
|
794
|
+
onClick: e,
|
|
795
|
+
disabled: n,
|
|
796
|
+
title: r,
|
|
797
|
+
variant: o = "default",
|
|
798
|
+
size: a = "md",
|
|
799
|
+
style: c
|
|
832
800
|
}) {
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
H,
|
|
801
|
+
return /* @__PURE__ */ i(
|
|
802
|
+
Me,
|
|
836
803
|
{
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
fontFamily: d.typography.fontFamily,
|
|
847
|
-
...f
|
|
848
|
-
},
|
|
804
|
+
variant: o === "circle" ? "light" : "subtle",
|
|
805
|
+
radius: o === "circle" ? "xl" : "sm",
|
|
806
|
+
size: a === "sm" ? "sm" : "md",
|
|
807
|
+
color: "gray",
|
|
808
|
+
disabled: n,
|
|
809
|
+
title: r,
|
|
810
|
+
"aria-label": r,
|
|
811
|
+
onClick: e,
|
|
812
|
+
style: c,
|
|
849
813
|
children: t
|
|
850
814
|
}
|
|
851
|
-
)
|
|
815
|
+
);
|
|
852
816
|
}
|
|
853
|
-
|
|
854
|
-
|
|
817
|
+
const K = ae({
|
|
818
|
+
collapsible: !1,
|
|
819
|
+
open: !0,
|
|
820
|
+
toggle: () => {
|
|
821
|
+
}
|
|
822
|
+
});
|
|
823
|
+
function ge({ expanded: t }) {
|
|
855
824
|
return /* @__PURE__ */ i(
|
|
856
|
-
"
|
|
825
|
+
"svg",
|
|
857
826
|
{
|
|
827
|
+
width: 12,
|
|
828
|
+
height: 12,
|
|
829
|
+
viewBox: "0 0 12 12",
|
|
830
|
+
fill: "none",
|
|
858
831
|
style: {
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
color: n.text.primary,
|
|
862
|
-
background: n.fill.secondary,
|
|
863
|
-
borderRadius: n.radius.sm,
|
|
864
|
-
padding: "1px 4px",
|
|
865
|
-
...e
|
|
832
|
+
transform: t ? "rotate(90deg)" : "none",
|
|
833
|
+
transition: "transform 120ms"
|
|
866
834
|
},
|
|
867
|
-
|
|
835
|
+
"aria-hidden": !0,
|
|
836
|
+
children: /* @__PURE__ */ i(
|
|
837
|
+
"path",
|
|
838
|
+
{
|
|
839
|
+
d: "M4 2.5L8 6l-4 3.5",
|
|
840
|
+
stroke: "currentColor",
|
|
841
|
+
strokeWidth: 1.4,
|
|
842
|
+
strokeLinecap: "round",
|
|
843
|
+
strokeLinejoin: "round"
|
|
844
|
+
}
|
|
845
|
+
)
|
|
868
846
|
}
|
|
869
847
|
);
|
|
870
848
|
}
|
|
871
|
-
function
|
|
872
|
-
const r = g();
|
|
873
|
-
return /* @__PURE__ */ i(
|
|
874
|
-
"a",
|
|
875
|
-
{
|
|
876
|
-
href: e,
|
|
877
|
-
target: "_blank",
|
|
878
|
-
rel: "noreferrer",
|
|
879
|
-
style: { color: r.text.link, ...n },
|
|
880
|
-
children: t
|
|
881
|
-
}
|
|
882
|
-
);
|
|
883
|
-
}
|
|
884
|
-
function $t({ children: t, gap: e, style: n }) {
|
|
885
|
-
return /* @__PURE__ */ i(Me, { gap: e, style: n, children: t });
|
|
886
|
-
}
|
|
887
|
-
const oe = {
|
|
888
|
-
start: "flex-start",
|
|
889
|
-
center: "center",
|
|
890
|
-
end: "flex-end",
|
|
891
|
-
stretch: "stretch",
|
|
892
|
-
"space-between": "space-between"
|
|
893
|
-
};
|
|
894
|
-
function Et({
|
|
895
|
-
children: t,
|
|
896
|
-
gap: e,
|
|
897
|
-
align: n = "center",
|
|
898
|
-
justify: r = "start",
|
|
899
|
-
wrap: o = !1,
|
|
900
|
-
style: a
|
|
901
|
-
}) {
|
|
902
|
-
return /* @__PURE__ */ i(
|
|
903
|
-
Pe,
|
|
904
|
-
{
|
|
905
|
-
gap: e,
|
|
906
|
-
align: oe[n],
|
|
907
|
-
justify: oe[r],
|
|
908
|
-
wrap: o ? "wrap" : "nowrap",
|
|
909
|
-
style: a,
|
|
910
|
-
children: t
|
|
911
|
-
}
|
|
912
|
-
);
|
|
913
|
-
}
|
|
914
|
-
function Ft() {
|
|
915
|
-
return /* @__PURE__ */ i("div", { style: { flex: 1 } });
|
|
916
|
-
}
|
|
917
|
-
function It({ children: t, columns: e, gap: n = 16, align: r, style: o }) {
|
|
918
|
-
const a = typeof e == "number" ? `repeat(${e}, minmax(0, 1fr))` : e;
|
|
919
|
-
return /* @__PURE__ */ i(
|
|
920
|
-
"div",
|
|
921
|
-
{
|
|
922
|
-
style: {
|
|
923
|
-
display: "grid",
|
|
924
|
-
gridTemplateColumns: a,
|
|
925
|
-
gap: n,
|
|
926
|
-
alignItems: r,
|
|
927
|
-
...o
|
|
928
|
-
},
|
|
929
|
-
children: t
|
|
930
|
-
}
|
|
931
|
-
);
|
|
932
|
-
}
|
|
933
|
-
function Nt({ style: t }) {
|
|
934
|
-
return /* @__PURE__ */ i(we, { style: t });
|
|
935
|
-
}
|
|
936
|
-
const V = ae({
|
|
937
|
-
collapsible: !1,
|
|
938
|
-
open: !0,
|
|
939
|
-
toggle: () => {
|
|
940
|
-
}
|
|
941
|
-
});
|
|
942
|
-
function Rt({
|
|
849
|
+
function Mt({
|
|
943
850
|
children: t,
|
|
944
851
|
variant: e = "default",
|
|
945
852
|
collapsible: n = !1,
|
|
946
853
|
defaultOpen: r = !0,
|
|
947
854
|
open: o,
|
|
948
855
|
onOpenChange: a,
|
|
949
|
-
style:
|
|
856
|
+
style: c
|
|
950
857
|
}) {
|
|
951
|
-
const f = g(), [d,
|
|
858
|
+
const f = g(), [d, l] = I(r), u = o ?? d, m = O(() => {
|
|
952
859
|
const v = !u;
|
|
953
|
-
o === void 0 &&
|
|
860
|
+
o === void 0 && l(v), a == null || a(v);
|
|
954
861
|
}, [u, o, a]);
|
|
955
862
|
return /* @__PURE__ */ i(
|
|
956
|
-
|
|
863
|
+
Be,
|
|
957
864
|
{
|
|
958
865
|
withBorder: e !== "borderless",
|
|
959
866
|
radius: f.radius.md,
|
|
@@ -961,18 +868,18 @@ function Rt({
|
|
|
961
868
|
style: {
|
|
962
869
|
background: f.bg.elevated,
|
|
963
870
|
borderColor: f.stroke.secondary,
|
|
964
|
-
...
|
|
871
|
+
...c
|
|
965
872
|
},
|
|
966
|
-
children: /* @__PURE__ */ i(
|
|
873
|
+
children: /* @__PURE__ */ i(K.Provider, { value: { collapsible: n, open: u, toggle: m }, children: t })
|
|
967
874
|
}
|
|
968
875
|
);
|
|
969
876
|
}
|
|
970
|
-
function
|
|
971
|
-
const r = g(), { collapsible: o, open: a, toggle:
|
|
877
|
+
function Bt({ children: t, trailing: e, style: n }) {
|
|
878
|
+
const r = g(), { collapsible: o, open: a, toggle: c } = W(K);
|
|
972
879
|
return /* @__PURE__ */ y(
|
|
973
880
|
"div",
|
|
974
881
|
{
|
|
975
|
-
onClick: o ?
|
|
882
|
+
onClick: o ? c : void 0,
|
|
976
883
|
style: {
|
|
977
884
|
display: "flex",
|
|
978
885
|
alignItems: "center",
|
|
@@ -990,7 +897,7 @@ function _t({ children: t, trailing: e, style: n }) {
|
|
|
990
897
|
},
|
|
991
898
|
children: [
|
|
992
899
|
/* @__PURE__ */ y("span", { style: { display: "inline-flex", alignItems: "center", gap: 6 }, children: [
|
|
993
|
-
o && /* @__PURE__ */ i(
|
|
900
|
+
o && /* @__PURE__ */ i(ge, { expanded: a }),
|
|
994
901
|
t
|
|
995
902
|
] }),
|
|
996
903
|
e != null && /* @__PURE__ */ i("span", { children: e })
|
|
@@ -998,54 +905,28 @@ function _t({ children: t, trailing: e, style: n }) {
|
|
|
998
905
|
}
|
|
999
906
|
);
|
|
1000
907
|
}
|
|
1001
|
-
function
|
|
1002
|
-
const { collapsible: n, open: r } =
|
|
908
|
+
function $t({ children: t, style: e }) {
|
|
909
|
+
const { collapsible: n, open: r } = W(K);
|
|
1003
910
|
return n && !r ? null : /* @__PURE__ */ i("div", { style: { padding: 14, ...e }, children: t });
|
|
1004
911
|
}
|
|
1005
|
-
function
|
|
1006
|
-
return /* @__PURE__ */ i(
|
|
1007
|
-
"svg",
|
|
1008
|
-
{
|
|
1009
|
-
width: 12,
|
|
1010
|
-
height: 12,
|
|
1011
|
-
viewBox: "0 0 12 12",
|
|
1012
|
-
fill: "none",
|
|
1013
|
-
style: {
|
|
1014
|
-
transform: t ? "rotate(90deg)" : "none",
|
|
1015
|
-
transition: "transform 120ms"
|
|
1016
|
-
},
|
|
1017
|
-
"aria-hidden": !0,
|
|
1018
|
-
children: /* @__PURE__ */ i(
|
|
1019
|
-
"path",
|
|
1020
|
-
{
|
|
1021
|
-
d: "M4 2.5L8 6l-4 3.5",
|
|
1022
|
-
stroke: "currentColor",
|
|
1023
|
-
strokeWidth: 1.4,
|
|
1024
|
-
strokeLinecap: "round",
|
|
1025
|
-
strokeLinejoin: "round"
|
|
1026
|
-
}
|
|
1027
|
-
)
|
|
1028
|
-
}
|
|
1029
|
-
);
|
|
1030
|
-
}
|
|
1031
|
-
function Ht({ value: t, label: e, tone: n, style: r }) {
|
|
912
|
+
function Dt({ value: t, label: e, tone: n, style: r }) {
|
|
1032
913
|
const o = g();
|
|
1033
914
|
return /* @__PURE__ */ y("div", { style: r, children: [
|
|
1034
915
|
/* @__PURE__ */ i(
|
|
1035
|
-
|
|
916
|
+
z,
|
|
1036
917
|
{
|
|
1037
918
|
fz: 22,
|
|
1038
919
|
fw: 700,
|
|
1039
920
|
lh: 1.2,
|
|
1040
921
|
style: {
|
|
1041
|
-
color: n ?
|
|
922
|
+
color: n ? k[n] : o.text.primary,
|
|
1042
923
|
fontFamily: o.typography.fontFamily
|
|
1043
924
|
},
|
|
1044
925
|
children: t
|
|
1045
926
|
}
|
|
1046
927
|
),
|
|
1047
928
|
/* @__PURE__ */ i(
|
|
1048
|
-
|
|
929
|
+
z,
|
|
1049
930
|
{
|
|
1050
931
|
fz: 12,
|
|
1051
932
|
style: {
|
|
@@ -1057,26 +938,26 @@ function Ht({ value: t, label: e, tone: n, style: r }) {
|
|
|
1057
938
|
)
|
|
1058
939
|
] });
|
|
1059
940
|
}
|
|
1060
|
-
function
|
|
941
|
+
function It({
|
|
1061
942
|
children: t,
|
|
1062
943
|
active: e,
|
|
1063
944
|
tone: n = "neutral",
|
|
1064
945
|
size: r = "md",
|
|
1065
946
|
leadingContent: o,
|
|
1066
947
|
keyboardHint: a,
|
|
1067
|
-
title:
|
|
948
|
+
title: c,
|
|
1068
949
|
style: f,
|
|
1069
950
|
onClick: d
|
|
1070
951
|
}) {
|
|
1071
952
|
return /* @__PURE__ */ i(
|
|
1072
|
-
|
|
953
|
+
De,
|
|
1073
954
|
{
|
|
1074
955
|
color: ie[n],
|
|
1075
956
|
variant: e ? "filled" : "light",
|
|
1076
957
|
size: r === "sm" ? "sm" : "md",
|
|
1077
958
|
leftSection: o,
|
|
1078
959
|
rightSection: a,
|
|
1079
|
-
title:
|
|
960
|
+
title: c,
|
|
1080
961
|
onClick: d,
|
|
1081
962
|
style: {
|
|
1082
963
|
cursor: d ? "pointer" : void 0,
|
|
@@ -1087,7 +968,7 @@ function Wt({
|
|
|
1087
968
|
}
|
|
1088
969
|
);
|
|
1089
970
|
}
|
|
1090
|
-
function
|
|
971
|
+
function Et({
|
|
1091
972
|
children: t,
|
|
1092
973
|
tone: e = "neutral",
|
|
1093
974
|
title: n,
|
|
@@ -1095,7 +976,7 @@ function Gt({
|
|
|
1095
976
|
style: o
|
|
1096
977
|
}) {
|
|
1097
978
|
return /* @__PURE__ */ i(
|
|
1098
|
-
|
|
979
|
+
$e,
|
|
1099
980
|
{
|
|
1100
981
|
color: ie[e],
|
|
1101
982
|
title: n,
|
|
@@ -1106,110 +987,7 @@ function Gt({
|
|
|
1106
987
|
}
|
|
1107
988
|
);
|
|
1108
989
|
}
|
|
1109
|
-
|
|
1110
|
-
success: "rgba(31,138,101,0.12)",
|
|
1111
|
-
danger: "rgba(207,45,86,0.12)",
|
|
1112
|
-
warning: "rgba(232,163,61,0.14)",
|
|
1113
|
-
info: "rgba(46,121,181,0.12)",
|
|
1114
|
-
neutral: "rgba(136,136,168,0.12)"
|
|
1115
|
-
};
|
|
1116
|
-
function Ot({
|
|
1117
|
-
headers: t,
|
|
1118
|
-
rows: e,
|
|
1119
|
-
columnAlign: n,
|
|
1120
|
-
rowTone: r,
|
|
1121
|
-
framed: o = !0,
|
|
1122
|
-
striped: a,
|
|
1123
|
-
stickyHeader: l,
|
|
1124
|
-
style: f,
|
|
1125
|
-
emptyMessage: d
|
|
1126
|
-
}) {
|
|
1127
|
-
return /* @__PURE__ */ y(
|
|
1128
|
-
T,
|
|
1129
|
-
{
|
|
1130
|
-
withTableBorder: o,
|
|
1131
|
-
withColumnBorders: !1,
|
|
1132
|
-
striped: a,
|
|
1133
|
-
stickyHeader: l,
|
|
1134
|
-
highlightOnHover: !0,
|
|
1135
|
-
style: f,
|
|
1136
|
-
children: [
|
|
1137
|
-
/* @__PURE__ */ i(T.Thead, { children: /* @__PURE__ */ i(T.Tr, { children: t.map((c, u) => /* @__PURE__ */ i(T.Th, { ta: (n == null ? void 0 : n[u]) ?? "left", children: c }, u)) }) }),
|
|
1138
|
-
/* @__PURE__ */ i(T.Tbody, { children: e.length === 0 ? /* @__PURE__ */ i(T.Tr, { children: /* @__PURE__ */ i(T.Td, { colSpan: t.length, ta: "center", c: "dimmed", children: d ?? "No data" }) }) : e.map((c, u) => {
|
|
1139
|
-
const m = r == null ? void 0 : r[u];
|
|
1140
|
-
return /* @__PURE__ */ i(
|
|
1141
|
-
T.Tr,
|
|
1142
|
-
{
|
|
1143
|
-
style: m ? { background: ct[m] } : void 0,
|
|
1144
|
-
children: t.map((v, h) => /* @__PURE__ */ i(
|
|
1145
|
-
T.Td,
|
|
1146
|
-
{
|
|
1147
|
-
ta: (n == null ? void 0 : n[h]) ?? "left",
|
|
1148
|
-
children: c[h]
|
|
1149
|
-
},
|
|
1150
|
-
h
|
|
1151
|
-
))
|
|
1152
|
-
},
|
|
1153
|
-
u
|
|
1154
|
-
);
|
|
1155
|
-
}) })
|
|
1156
|
-
]
|
|
1157
|
-
}
|
|
1158
|
-
);
|
|
1159
|
-
}
|
|
1160
|
-
const dt = {
|
|
1161
|
-
primary: "filled",
|
|
1162
|
-
secondary: "default",
|
|
1163
|
-
ghost: "subtle"
|
|
1164
|
-
};
|
|
1165
|
-
function jt({
|
|
1166
|
-
children: t,
|
|
1167
|
-
variant: e = "secondary",
|
|
1168
|
-
disabled: n,
|
|
1169
|
-
type: r = "button",
|
|
1170
|
-
style: o,
|
|
1171
|
-
onClick: a
|
|
1172
|
-
}) {
|
|
1173
|
-
return /* @__PURE__ */ i(
|
|
1174
|
-
be,
|
|
1175
|
-
{
|
|
1176
|
-
variant: dt[e],
|
|
1177
|
-
color: e === "primary" ? "accent" : void 0,
|
|
1178
|
-
size: "xs",
|
|
1179
|
-
disabled: n,
|
|
1180
|
-
type: r,
|
|
1181
|
-
onClick: a,
|
|
1182
|
-
style: o,
|
|
1183
|
-
children: t
|
|
1184
|
-
}
|
|
1185
|
-
);
|
|
1186
|
-
}
|
|
1187
|
-
function Kt({
|
|
1188
|
-
children: t,
|
|
1189
|
-
onClick: e,
|
|
1190
|
-
disabled: n,
|
|
1191
|
-
title: r,
|
|
1192
|
-
variant: o = "default",
|
|
1193
|
-
size: a = "md",
|
|
1194
|
-
style: l
|
|
1195
|
-
}) {
|
|
1196
|
-
return /* @__PURE__ */ i(
|
|
1197
|
-
Le,
|
|
1198
|
-
{
|
|
1199
|
-
variant: o === "circle" ? "light" : "subtle",
|
|
1200
|
-
radius: o === "circle" ? "xl" : "sm",
|
|
1201
|
-
size: a === "sm" ? "sm" : "md",
|
|
1202
|
-
color: "gray",
|
|
1203
|
-
disabled: n,
|
|
1204
|
-
title: r,
|
|
1205
|
-
"aria-label": r,
|
|
1206
|
-
onClick: e,
|
|
1207
|
-
style: l,
|
|
1208
|
-
children: t
|
|
1209
|
-
}
|
|
1210
|
-
);
|
|
1211
|
-
}
|
|
1212
|
-
function Vt({
|
|
990
|
+
function Ft({
|
|
1213
991
|
value: t,
|
|
1214
992
|
onChange: e,
|
|
1215
993
|
options: n,
|
|
@@ -1218,21 +996,21 @@ function Vt({
|
|
|
1218
996
|
style: a
|
|
1219
997
|
}) {
|
|
1220
998
|
return /* @__PURE__ */ i(
|
|
1221
|
-
|
|
999
|
+
Ee,
|
|
1222
1000
|
{
|
|
1223
1001
|
value: t,
|
|
1224
1002
|
data: n,
|
|
1225
1003
|
placeholder: r,
|
|
1226
1004
|
disabled: o,
|
|
1227
1005
|
allowDeselect: !1,
|
|
1228
|
-
onChange: (
|
|
1229
|
-
|
|
1006
|
+
onChange: (c) => {
|
|
1007
|
+
c !== null && (e == null || e(c));
|
|
1230
1008
|
},
|
|
1231
1009
|
style: a
|
|
1232
1010
|
}
|
|
1233
1011
|
);
|
|
1234
1012
|
}
|
|
1235
|
-
function
|
|
1013
|
+
function Rt({
|
|
1236
1014
|
checked: t,
|
|
1237
1015
|
onChange: e,
|
|
1238
1016
|
disabled: n,
|
|
@@ -1240,7 +1018,7 @@ function Xt({
|
|
|
1240
1018
|
style: o
|
|
1241
1019
|
}) {
|
|
1242
1020
|
return /* @__PURE__ */ i(
|
|
1243
|
-
|
|
1021
|
+
Ie,
|
|
1244
1022
|
{
|
|
1245
1023
|
checked: t,
|
|
1246
1024
|
disabled: n,
|
|
@@ -1250,7 +1028,7 @@ function Xt({
|
|
|
1250
1028
|
}
|
|
1251
1029
|
);
|
|
1252
1030
|
}
|
|
1253
|
-
function
|
|
1031
|
+
function _t({
|
|
1254
1032
|
checked: t,
|
|
1255
1033
|
onChange: e,
|
|
1256
1034
|
disabled: n,
|
|
@@ -1258,7 +1036,7 @@ function Yt({
|
|
|
1258
1036
|
style: o
|
|
1259
1037
|
}) {
|
|
1260
1038
|
return /* @__PURE__ */ i(
|
|
1261
|
-
|
|
1039
|
+
_e,
|
|
1262
1040
|
{
|
|
1263
1041
|
checked: t,
|
|
1264
1042
|
disabled: n,
|
|
@@ -1268,7 +1046,7 @@ function Yt({
|
|
|
1268
1046
|
}
|
|
1269
1047
|
);
|
|
1270
1048
|
}
|
|
1271
|
-
function
|
|
1049
|
+
function Nt({
|
|
1272
1050
|
value: t,
|
|
1273
1051
|
onChange: e,
|
|
1274
1052
|
placeholder: n,
|
|
@@ -1277,18 +1055,18 @@ function qt({
|
|
|
1277
1055
|
style: a
|
|
1278
1056
|
}) {
|
|
1279
1057
|
return /* @__PURE__ */ i(
|
|
1280
|
-
|
|
1058
|
+
Re,
|
|
1281
1059
|
{
|
|
1282
1060
|
value: t,
|
|
1283
1061
|
placeholder: n,
|
|
1284
1062
|
disabled: r,
|
|
1285
1063
|
type: o,
|
|
1286
|
-
onChange: (
|
|
1064
|
+
onChange: (c) => e == null ? void 0 : e(c.currentTarget.value),
|
|
1287
1065
|
style: a
|
|
1288
1066
|
}
|
|
1289
1067
|
);
|
|
1290
1068
|
}
|
|
1291
|
-
function
|
|
1069
|
+
function Ht({
|
|
1292
1070
|
value: t,
|
|
1293
1071
|
onChange: e,
|
|
1294
1072
|
placeholder: n,
|
|
@@ -1297,19 +1075,71 @@ function Zt({
|
|
|
1297
1075
|
style: a
|
|
1298
1076
|
}) {
|
|
1299
1077
|
return /* @__PURE__ */ i(
|
|
1300
|
-
|
|
1078
|
+
Fe,
|
|
1301
1079
|
{
|
|
1302
1080
|
value: t,
|
|
1303
1081
|
placeholder: n,
|
|
1304
1082
|
disabled: r,
|
|
1305
1083
|
autosize: !0,
|
|
1306
1084
|
minRows: o,
|
|
1307
|
-
onChange: (
|
|
1085
|
+
onChange: (c) => e == null ? void 0 : e(c.currentTarget.value),
|
|
1308
1086
|
style: a
|
|
1309
1087
|
}
|
|
1310
1088
|
);
|
|
1311
1089
|
}
|
|
1312
|
-
function
|
|
1090
|
+
function zt({ children: t, gap: e, style: n }) {
|
|
1091
|
+
return /* @__PURE__ */ i(ze, { gap: e, style: n, children: t });
|
|
1092
|
+
}
|
|
1093
|
+
const re = {
|
|
1094
|
+
start: "flex-start",
|
|
1095
|
+
center: "center",
|
|
1096
|
+
end: "flex-end",
|
|
1097
|
+
stretch: "stretch",
|
|
1098
|
+
"space-between": "space-between"
|
|
1099
|
+
};
|
|
1100
|
+
function Ot({
|
|
1101
|
+
children: t,
|
|
1102
|
+
gap: e,
|
|
1103
|
+
align: n = "center",
|
|
1104
|
+
justify: r = "start",
|
|
1105
|
+
wrap: o = !1,
|
|
1106
|
+
style: a
|
|
1107
|
+
}) {
|
|
1108
|
+
return /* @__PURE__ */ i(
|
|
1109
|
+
He,
|
|
1110
|
+
{
|
|
1111
|
+
gap: e,
|
|
1112
|
+
align: re[n],
|
|
1113
|
+
justify: re[r],
|
|
1114
|
+
wrap: o ? "wrap" : "nowrap",
|
|
1115
|
+
style: a,
|
|
1116
|
+
children: t
|
|
1117
|
+
}
|
|
1118
|
+
);
|
|
1119
|
+
}
|
|
1120
|
+
function Wt() {
|
|
1121
|
+
return /* @__PURE__ */ i("div", { style: { flex: 1 } });
|
|
1122
|
+
}
|
|
1123
|
+
function Gt({ children: t, columns: e, gap: n = 16, align: r, style: o }) {
|
|
1124
|
+
const a = typeof e == "number" ? `repeat(${e}, minmax(0, 1fr))` : e;
|
|
1125
|
+
return /* @__PURE__ */ i(
|
|
1126
|
+
"div",
|
|
1127
|
+
{
|
|
1128
|
+
style: {
|
|
1129
|
+
display: "grid",
|
|
1130
|
+
gridTemplateColumns: a,
|
|
1131
|
+
gap: n,
|
|
1132
|
+
alignItems: r,
|
|
1133
|
+
...o
|
|
1134
|
+
},
|
|
1135
|
+
children: t
|
|
1136
|
+
}
|
|
1137
|
+
);
|
|
1138
|
+
}
|
|
1139
|
+
function jt({ style: t }) {
|
|
1140
|
+
return /* @__PURE__ */ i(Ne, { style: t });
|
|
1141
|
+
}
|
|
1142
|
+
function Kt({ color: t, style: e }) {
|
|
1313
1143
|
const n = g();
|
|
1314
1144
|
return /* @__PURE__ */ i(
|
|
1315
1145
|
"span",
|
|
@@ -1326,17 +1156,17 @@ function Jt({ color: t, style: e }) {
|
|
|
1326
1156
|
}
|
|
1327
1157
|
);
|
|
1328
1158
|
}
|
|
1329
|
-
function
|
|
1159
|
+
function Vt({
|
|
1330
1160
|
segments: t,
|
|
1331
1161
|
total: e,
|
|
1332
1162
|
topLeftLabel: n,
|
|
1333
1163
|
topRightLabel: r,
|
|
1334
1164
|
style: o
|
|
1335
1165
|
}) {
|
|
1336
|
-
const a = g(),
|
|
1337
|
-
(
|
|
1166
|
+
const a = g(), c = e > 0 ? e : 1, f = t.reduce(
|
|
1167
|
+
(l, u) => l + (Number.isFinite(u.value) && u.value > 0 ? u.value : 0),
|
|
1338
1168
|
0
|
|
1339
|
-
), d = Math.max(0,
|
|
1169
|
+
), d = Math.max(0, c - f);
|
|
1340
1170
|
return /* @__PURE__ */ y("div", { style: o, children: [
|
|
1341
1171
|
(n != null || r != null) && /* @__PURE__ */ y(
|
|
1342
1172
|
"div",
|
|
@@ -1355,25 +1185,25 @@ function Ut({
|
|
|
1355
1185
|
}
|
|
1356
1186
|
),
|
|
1357
1187
|
/* @__PURE__ */ y("div", { style: { display: "flex", gap: 2, height: 8 }, children: [
|
|
1358
|
-
t.map((
|
|
1359
|
-
const m = Number.isFinite(
|
|
1188
|
+
t.map((l, u) => {
|
|
1189
|
+
const m = Number.isFinite(l.value) && l.value > 0 ? l.value : 0, v = a.category[l.color ?? ne[u % ne.length]];
|
|
1360
1190
|
return /* @__PURE__ */ i(
|
|
1361
1191
|
"div",
|
|
1362
1192
|
{
|
|
1363
1193
|
style: {
|
|
1364
|
-
width: `${m /
|
|
1194
|
+
width: `${m / c * 100}%`,
|
|
1365
1195
|
background: v,
|
|
1366
1196
|
borderRadius: 3
|
|
1367
1197
|
}
|
|
1368
1198
|
},
|
|
1369
|
-
|
|
1199
|
+
l.id
|
|
1370
1200
|
);
|
|
1371
1201
|
}),
|
|
1372
1202
|
d > 0 && /* @__PURE__ */ i(
|
|
1373
1203
|
"div",
|
|
1374
1204
|
{
|
|
1375
1205
|
style: {
|
|
1376
|
-
width: `${d /
|
|
1206
|
+
width: `${d / c * 100}%`,
|
|
1377
1207
|
background: a.fill.tertiary,
|
|
1378
1208
|
borderRadius: 3
|
|
1379
1209
|
}
|
|
@@ -1382,21 +1212,21 @@ function Ut({
|
|
|
1382
1212
|
] })
|
|
1383
1213
|
] });
|
|
1384
1214
|
}
|
|
1385
|
-
function
|
|
1215
|
+
function Xt({
|
|
1386
1216
|
title: t,
|
|
1387
1217
|
leading: e,
|
|
1388
1218
|
count: n,
|
|
1389
1219
|
trailing: r,
|
|
1390
1220
|
children: o,
|
|
1391
1221
|
defaultOpen: a = !1,
|
|
1392
|
-
style:
|
|
1222
|
+
style: c
|
|
1393
1223
|
}) {
|
|
1394
|
-
const f = g(), [d,
|
|
1395
|
-
return /* @__PURE__ */ y("div", { style:
|
|
1224
|
+
const f = g(), [d, l] = I(a);
|
|
1225
|
+
return /* @__PURE__ */ y("div", { style: c, children: [
|
|
1396
1226
|
/* @__PURE__ */ y(
|
|
1397
1227
|
"div",
|
|
1398
1228
|
{
|
|
1399
|
-
onClick: () =>
|
|
1229
|
+
onClick: () => l((u) => !u),
|
|
1400
1230
|
style: {
|
|
1401
1231
|
display: "flex",
|
|
1402
1232
|
alignItems: "center",
|
|
@@ -1408,7 +1238,7 @@ function Qt({
|
|
|
1408
1238
|
fontSize: 14
|
|
1409
1239
|
},
|
|
1410
1240
|
children: [
|
|
1411
|
-
/* @__PURE__ */ i(
|
|
1241
|
+
/* @__PURE__ */ i(ge, { expanded: d }),
|
|
1412
1242
|
e,
|
|
1413
1243
|
/* @__PURE__ */ i("span", { style: { fontWeight: 500 }, children: t }),
|
|
1414
1244
|
n != null && /* @__PURE__ */ i("span", { style: { color: f.text.tertiary, fontSize: 12 }, children: n }),
|
|
@@ -1420,59 +1250,201 @@ function Qt({
|
|
|
1420
1250
|
d && /* @__PURE__ */ i("div", { style: { paddingLeft: 18, paddingBottom: 4 }, children: o })
|
|
1421
1251
|
] });
|
|
1422
1252
|
}
|
|
1253
|
+
const dt = {
|
|
1254
|
+
success: "rgba(31,138,101,0.12)",
|
|
1255
|
+
danger: "rgba(207,45,86,0.12)",
|
|
1256
|
+
warning: "rgba(232,163,61,0.14)",
|
|
1257
|
+
info: "rgba(46,121,181,0.12)",
|
|
1258
|
+
neutral: "rgba(136,136,168,0.12)"
|
|
1259
|
+
};
|
|
1260
|
+
function Yt({
|
|
1261
|
+
headers: t,
|
|
1262
|
+
rows: e,
|
|
1263
|
+
columnAlign: n,
|
|
1264
|
+
rowTone: r,
|
|
1265
|
+
framed: o = !0,
|
|
1266
|
+
striped: a,
|
|
1267
|
+
stickyHeader: c,
|
|
1268
|
+
style: f,
|
|
1269
|
+
emptyMessage: d
|
|
1270
|
+
}) {
|
|
1271
|
+
return /* @__PURE__ */ y(
|
|
1272
|
+
T,
|
|
1273
|
+
{
|
|
1274
|
+
withTableBorder: o,
|
|
1275
|
+
withColumnBorders: !1,
|
|
1276
|
+
striped: a,
|
|
1277
|
+
stickyHeader: c,
|
|
1278
|
+
highlightOnHover: !0,
|
|
1279
|
+
style: f,
|
|
1280
|
+
children: [
|
|
1281
|
+
/* @__PURE__ */ i(T.Thead, { children: /* @__PURE__ */ i(T.Tr, { children: t.map((l, u) => /* @__PURE__ */ i(T.Th, { ta: (n == null ? void 0 : n[u]) ?? "left", children: l }, u)) }) }),
|
|
1282
|
+
/* @__PURE__ */ i(T.Tbody, { children: e.length === 0 ? /* @__PURE__ */ i(T.Tr, { children: /* @__PURE__ */ i(T.Td, { colSpan: t.length, ta: "center", c: "dimmed", children: d ?? "No data" }) }) : e.map((l, u) => {
|
|
1283
|
+
const m = r == null ? void 0 : r[u];
|
|
1284
|
+
return /* @__PURE__ */ i(
|
|
1285
|
+
T.Tr,
|
|
1286
|
+
{
|
|
1287
|
+
style: m ? { background: dt[m] } : void 0,
|
|
1288
|
+
children: t.map((v, h) => /* @__PURE__ */ i(
|
|
1289
|
+
T.Td,
|
|
1290
|
+
{
|
|
1291
|
+
ta: (n == null ? void 0 : n[h]) ?? "left",
|
|
1292
|
+
children: l[h]
|
|
1293
|
+
},
|
|
1294
|
+
h
|
|
1295
|
+
))
|
|
1296
|
+
},
|
|
1297
|
+
u
|
|
1298
|
+
);
|
|
1299
|
+
}) })
|
|
1300
|
+
]
|
|
1301
|
+
}
|
|
1302
|
+
);
|
|
1303
|
+
}
|
|
1304
|
+
function V(t, e, n) {
|
|
1305
|
+
const r = t.typography[e];
|
|
1306
|
+
return {
|
|
1307
|
+
fontFamily: t.typography.fontFamily,
|
|
1308
|
+
fontSize: r.fontSize,
|
|
1309
|
+
lineHeight: r.lineHeight,
|
|
1310
|
+
fontWeight: r.fontWeight,
|
|
1311
|
+
color: t.text.primary,
|
|
1312
|
+
margin: 0,
|
|
1313
|
+
...n
|
|
1314
|
+
};
|
|
1315
|
+
}
|
|
1316
|
+
function qt({ children: t, style: e }) {
|
|
1317
|
+
const n = g();
|
|
1318
|
+
return /* @__PURE__ */ i(G, { order: 1, style: V(n, "h1", e), children: t });
|
|
1319
|
+
}
|
|
1320
|
+
function Zt({ children: t, style: e }) {
|
|
1321
|
+
const n = g();
|
|
1322
|
+
return /* @__PURE__ */ i(G, { order: 2, style: V(n, "h2", e), children: t });
|
|
1323
|
+
}
|
|
1324
|
+
function Jt({ children: t, style: e }) {
|
|
1325
|
+
const n = g();
|
|
1326
|
+
return /* @__PURE__ */ i(G, { order: 3, style: V(n, "h3", e), children: t });
|
|
1327
|
+
}
|
|
1328
|
+
const ut = {
|
|
1329
|
+
normal: 400,
|
|
1330
|
+
medium: 500,
|
|
1331
|
+
semibold: 600,
|
|
1332
|
+
bold: 700
|
|
1333
|
+
}, oe = ae(!1);
|
|
1334
|
+
function Ut({
|
|
1335
|
+
children: t,
|
|
1336
|
+
tone: e = "primary",
|
|
1337
|
+
size: n = "body",
|
|
1338
|
+
as: r = "p",
|
|
1339
|
+
weight: o = "normal",
|
|
1340
|
+
italic: a,
|
|
1341
|
+
truncate: c,
|
|
1342
|
+
style: f
|
|
1343
|
+
}) {
|
|
1344
|
+
const d = g(), u = W(oe) && r === "p" ? "span" : r, m = r === "p";
|
|
1345
|
+
return /* @__PURE__ */ i(oe.Provider, { value: !0, children: /* @__PURE__ */ i(
|
|
1346
|
+
z,
|
|
1347
|
+
{
|
|
1348
|
+
component: u,
|
|
1349
|
+
size: n === "small" ? "xs" : "sm",
|
|
1350
|
+
fw: ut[o],
|
|
1351
|
+
c: e === "primary" ? void 0 : d.text[e],
|
|
1352
|
+
truncate: c,
|
|
1353
|
+
style: {
|
|
1354
|
+
fontStyle: a ? "italic" : void 0,
|
|
1355
|
+
...e === "primary" ? { color: d.text.primary } : void 0,
|
|
1356
|
+
...m && u === "span" ? { display: "block" } : void 0,
|
|
1357
|
+
fontFamily: d.typography.fontFamily,
|
|
1358
|
+
...f
|
|
1359
|
+
},
|
|
1360
|
+
children: t
|
|
1361
|
+
}
|
|
1362
|
+
) });
|
|
1363
|
+
}
|
|
1364
|
+
function Qt({ children: t, style: e }) {
|
|
1365
|
+
const n = g();
|
|
1366
|
+
return /* @__PURE__ */ i(
|
|
1367
|
+
"code",
|
|
1368
|
+
{
|
|
1369
|
+
style: {
|
|
1370
|
+
fontFamily: 'ui-monospace, SFMono-Regular, Menlo, Monaco, "Cascadia Code", monospace',
|
|
1371
|
+
fontSize: "0.92em",
|
|
1372
|
+
color: n.text.primary,
|
|
1373
|
+
background: n.fill.secondary,
|
|
1374
|
+
borderRadius: n.radius.sm,
|
|
1375
|
+
padding: "1px 4px",
|
|
1376
|
+
...e
|
|
1377
|
+
},
|
|
1378
|
+
children: t
|
|
1379
|
+
}
|
|
1380
|
+
);
|
|
1381
|
+
}
|
|
1382
|
+
function en({ children: t, href: e, style: n }) {
|
|
1383
|
+
const r = g();
|
|
1384
|
+
return /* @__PURE__ */ i(
|
|
1385
|
+
"a",
|
|
1386
|
+
{
|
|
1387
|
+
href: e,
|
|
1388
|
+
target: "_blank",
|
|
1389
|
+
rel: "noreferrer",
|
|
1390
|
+
style: { color: r.text.link, ...n },
|
|
1391
|
+
children: t
|
|
1392
|
+
}
|
|
1393
|
+
);
|
|
1394
|
+
}
|
|
1423
1395
|
export {
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1396
|
+
bt as BarChart,
|
|
1397
|
+
Pt as Button,
|
|
1398
|
+
Et as Callout,
|
|
1399
|
+
Mt as Card,
|
|
1400
|
+
$t as CardBody,
|
|
1401
|
+
Bt as CardHeader,
|
|
1402
|
+
Rt as Checkbox,
|
|
1403
|
+
Qt as Code,
|
|
1404
|
+
Xt as CollapsibleSection,
|
|
1405
|
+
wt as DiffStats,
|
|
1406
|
+
Lt as DiffView,
|
|
1407
|
+
jt as Divider,
|
|
1408
|
+
Gt as Grid,
|
|
1409
|
+
qt as H1,
|
|
1410
|
+
Zt as H2,
|
|
1411
|
+
Jt as H3,
|
|
1412
|
+
At as IconButton,
|
|
1413
|
+
St as LineChart,
|
|
1414
|
+
en as Link,
|
|
1415
|
+
Ct as PieChart,
|
|
1416
|
+
It as Pill,
|
|
1417
|
+
Ot as Row,
|
|
1418
|
+
Ft as Select,
|
|
1419
|
+
Wt as Spacer,
|
|
1420
|
+
zt as Stack,
|
|
1421
|
+
Dt as Stat,
|
|
1422
|
+
Kt as Swatch,
|
|
1423
|
+
Yt as Table,
|
|
1424
|
+
Ut as Text,
|
|
1425
|
+
Ht as TextArea,
|
|
1426
|
+
Nt as TextInput,
|
|
1427
|
+
lt as TodoList,
|
|
1428
|
+
Tt as TodoListCard,
|
|
1429
|
+
_t as Toggle,
|
|
1430
|
+
Vt as UsageBar,
|
|
1431
|
+
cn as canvasPaletteDark,
|
|
1432
|
+
dn as canvasPaletteGrokDark,
|
|
1433
|
+
un as canvasPaletteGrokLight,
|
|
1434
|
+
fn as canvasPaletteLight,
|
|
1435
|
+
hn as canvasTokens,
|
|
1436
|
+
pn as canvasTokensLight,
|
|
1437
|
+
yn as categoryPaletteDark,
|
|
1438
|
+
gn as categoryPaletteLight,
|
|
1467
1439
|
mn as colorPalette,
|
|
1468
|
-
|
|
1469
|
-
|
|
1440
|
+
kt as computeDAGLayout,
|
|
1441
|
+
vt as mergeStyle,
|
|
1470
1442
|
ne as usageColorSequence,
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1443
|
+
xt as useCanvasAction,
|
|
1444
|
+
mt as useCanvasState,
|
|
1445
|
+
rn as useEffect,
|
|
1474
1446
|
g as useHostTheme,
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1447
|
+
on as useMemo,
|
|
1448
|
+
an as useRef,
|
|
1449
|
+
sn as useState
|
|
1478
1450
|
};
|