@flesler/cursor-canvas-web 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -3
- package/dist/cursor-canvas.cjs +1 -1
- package/dist/cursor-canvas.js +318 -271
- package/dist/shim/charts.d.ts +7 -3
- package/dist/shim/cursor-canvas.d.ts +2 -2
- package/dist/shim/theme.d.ts +4 -0
- package/package.json +14 -6
package/dist/cursor-canvas.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as i, jsxs as g } from "react/jsx-runtime";
|
|
2
|
-
import { useComputedColorScheme as xe, Button as ve, Alert as Ee, Card as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { useEffect as
|
|
5
|
-
import { BarChart as
|
|
6
|
-
const
|
|
2
|
+
import { useComputedColorScheme as xe, Button as ve, Alert as Ee, Card as ke, Checkbox as be, Divider as Ce, Title as W, ActionIcon as Fe, Badge as Se, Group as Ae, Select as Be, Stack as we, Text as $, Table as E, Textarea as Te, TextInput as Le, Switch as De } from "@mantine/core";
|
|
3
|
+
import { useState as P, createContext as Me, useCallback as G, useContext as ae } from "react";
|
|
4
|
+
import { useEffect as Xt, useMemo as Yt, useRef as Vt, useState as Jt } from "react";
|
|
5
|
+
import { BarChart as Pe, AreaChart as He, LineChart as ze, DonutChart as Re, PieChart as $e } from "@mantine/charts";
|
|
6
|
+
const j = {
|
|
7
7
|
foreground: "#E4E4E4EB",
|
|
8
8
|
foregroundSecondary: "#E4E4E48D",
|
|
9
9
|
foregroundTertiary: "#E4E4E45E",
|
|
@@ -29,7 +29,7 @@ const oe = {
|
|
|
29
29
|
diffRemovedLine: "#B8004933",
|
|
30
30
|
diffStripAdded: "#3FA2668F",
|
|
31
31
|
diffStripRemoved: "#FC6B838F"
|
|
32
|
-
},
|
|
32
|
+
}, N = {
|
|
33
33
|
foreground: "#141414F0",
|
|
34
34
|
foregroundSecondary: "#141414BD",
|
|
35
35
|
foregroundTertiary: "#1414148A",
|
|
@@ -55,7 +55,27 @@ const oe = {
|
|
|
55
55
|
diffRemovedLine: "#CF2D5614",
|
|
56
56
|
diffStripAdded: "#1F8A65CC",
|
|
57
57
|
diffStripRemoved: "#CF2D56CC"
|
|
58
|
-
},
|
|
58
|
+
}, Ie = {
|
|
59
|
+
accent: "#1084FE",
|
|
60
|
+
buttonBackground: "#1084FE",
|
|
61
|
+
buttonForeground: "#070707",
|
|
62
|
+
buttonHoverBackground: "#459FFE",
|
|
63
|
+
link: "#80BEFE",
|
|
64
|
+
strokeFocused: "#1084FE"
|
|
65
|
+
}, We = {
|
|
66
|
+
accent: "#0C64C1",
|
|
67
|
+
buttonBackground: "#0C64C1",
|
|
68
|
+
buttonForeground: "#FAFAFA",
|
|
69
|
+
buttonHoverBackground: "#1084FE",
|
|
70
|
+
link: "#0C64C1",
|
|
71
|
+
strokeFocused: "#0C64C1"
|
|
72
|
+
}, at = {
|
|
73
|
+
...j,
|
|
74
|
+
...Ie
|
|
75
|
+
}, it = {
|
|
76
|
+
...N,
|
|
77
|
+
...We
|
|
78
|
+
}, O = {
|
|
59
79
|
gray: "#8888A8E0",
|
|
60
80
|
purple: "#7B64B8F0",
|
|
61
81
|
green: "#1F8A65E8",
|
|
@@ -117,13 +137,13 @@ function ce(e, t) {
|
|
|
117
137
|
category: t
|
|
118
138
|
};
|
|
119
139
|
}
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
),
|
|
124
|
-
|
|
140
|
+
const Ge = ce(
|
|
141
|
+
j,
|
|
142
|
+
O
|
|
143
|
+
), je = ce(
|
|
144
|
+
N,
|
|
125
145
|
ie
|
|
126
|
-
),
|
|
146
|
+
), ct = O, ne = [
|
|
127
147
|
"blue",
|
|
128
148
|
"purple",
|
|
129
149
|
"green",
|
|
@@ -133,7 +153,7 @@ const Ie = ce(
|
|
|
133
153
|
"orange",
|
|
134
154
|
"red",
|
|
135
155
|
"gray"
|
|
136
|
-
],
|
|
156
|
+
], Ne = {
|
|
137
157
|
green: "#1F8A65E8",
|
|
138
158
|
darkGreen: "#0D855AE0",
|
|
139
159
|
lightGreen: "#52B896E0",
|
|
@@ -154,13 +174,13 @@ const Ie = ce(
|
|
|
154
174
|
vibrantTeal: "#2A9A8AE0",
|
|
155
175
|
muted: "#8888A8E0",
|
|
156
176
|
neutralLine: "#888899D0"
|
|
157
|
-
},
|
|
177
|
+
}, Oe = {
|
|
158
178
|
h1: { fontSize: "24px", lineHeight: "30px", fontWeight: 590 },
|
|
159
179
|
h2: { fontSize: "18px", lineHeight: "24px", fontWeight: 590 },
|
|
160
180
|
h3: { fontSize: "16px", lineHeight: "22px", fontWeight: 590 },
|
|
161
181
|
body: { fontSize: "14px", lineHeight: "20px", fontWeight: 400 },
|
|
162
182
|
small: { fontSize: "12px", lineHeight: "16px", fontWeight: 400 }
|
|
163
|
-
},
|
|
183
|
+
}, _e = {
|
|
164
184
|
"0.5": 2,
|
|
165
185
|
1: 4,
|
|
166
186
|
"1.5": 6,
|
|
@@ -176,7 +196,7 @@ const Ie = ce(
|
|
|
176
196
|
8: 32,
|
|
177
197
|
9: 36,
|
|
178
198
|
10: 40
|
|
179
|
-
},
|
|
199
|
+
}, qe = {
|
|
180
200
|
none: 0,
|
|
181
201
|
xs: 2,
|
|
182
202
|
sm: 4,
|
|
@@ -197,7 +217,7 @@ const Ie = ce(
|
|
|
197
217
|
"#7DCAB0E0",
|
|
198
218
|
"#8888A8E0",
|
|
199
219
|
"#2A9A8AE0"
|
|
200
|
-
],
|
|
220
|
+
], k = {
|
|
201
221
|
success: "#1F8A65",
|
|
202
222
|
danger: "#CF2D56",
|
|
203
223
|
warning: "#E8A33D",
|
|
@@ -206,7 +226,7 @@ const Ie = ce(
|
|
|
206
226
|
added: "#1F8A65",
|
|
207
227
|
deleted: "#CF2D56",
|
|
208
228
|
renamed: "#5A6CC0"
|
|
209
|
-
},
|
|
229
|
+
}, _ = {
|
|
210
230
|
success: "green",
|
|
211
231
|
danger: "red",
|
|
212
232
|
warning: "orange",
|
|
@@ -216,30 +236,30 @@ const Ie = ce(
|
|
|
216
236
|
deleted: "red",
|
|
217
237
|
renamed: "indigo"
|
|
218
238
|
};
|
|
219
|
-
function
|
|
220
|
-
const t = e === "dark" ?
|
|
239
|
+
function Qe(e) {
|
|
240
|
+
const t = e === "dark" ? Ge : je;
|
|
221
241
|
return {
|
|
222
242
|
...t,
|
|
223
243
|
kind: e,
|
|
224
244
|
tokens: t,
|
|
225
|
-
palette: e === "dark" ?
|
|
226
|
-
category: e === "dark" ?
|
|
245
|
+
palette: e === "dark" ? j : N,
|
|
246
|
+
category: e === "dark" ? O : ie,
|
|
227
247
|
// Back-compat: real IDE canvases read these on useHostTheme(); public hooks.d.ts
|
|
228
248
|
// is sometimes narrower — see COMPAT.md (not a second theme API version).
|
|
229
|
-
chart: { palette:
|
|
230
|
-
radius:
|
|
231
|
-
typography:
|
|
232
|
-
spacing:
|
|
249
|
+
chart: { palette: Ne, sequence: I },
|
|
250
|
+
radius: qe,
|
|
251
|
+
typography: Oe,
|
|
252
|
+
spacing: _e
|
|
233
253
|
};
|
|
234
254
|
}
|
|
235
|
-
function
|
|
255
|
+
function F() {
|
|
236
256
|
const e = xe("light");
|
|
237
|
-
return
|
|
257
|
+
return Qe(e === "dark" ? "dark" : "light");
|
|
238
258
|
}
|
|
239
259
|
function se(e, t) {
|
|
240
|
-
return e ?
|
|
260
|
+
return e ? k[e] : I[t % I.length];
|
|
241
261
|
}
|
|
242
|
-
function
|
|
262
|
+
function de(e, t) {
|
|
243
263
|
return e.map((r, a) => {
|
|
244
264
|
const c = { category: r };
|
|
245
265
|
for (const n of t)
|
|
@@ -247,7 +267,7 @@ function le(e, t) {
|
|
|
247
267
|
return c;
|
|
248
268
|
});
|
|
249
269
|
}
|
|
250
|
-
function
|
|
270
|
+
function le(e) {
|
|
251
271
|
return e.map((t, r) => ({
|
|
252
272
|
name: t.name,
|
|
253
273
|
color: se(t.tone, r)
|
|
@@ -257,16 +277,16 @@ function ue(e, t) {
|
|
|
257
277
|
if (!(!e && !t))
|
|
258
278
|
return (r) => `${t ?? ""}${r}${e ?? ""}`;
|
|
259
279
|
}
|
|
260
|
-
function
|
|
280
|
+
function Ke(e, t) {
|
|
261
281
|
if (e != null && e.length)
|
|
262
282
|
return e.map((r) => ({
|
|
263
283
|
...t ? { x: r.value } : { y: r.value },
|
|
264
284
|
label: r.label,
|
|
265
|
-
color: r.tone ?
|
|
285
|
+
color: r.tone ? k[r.tone] : k.neutral
|
|
266
286
|
}));
|
|
267
287
|
}
|
|
268
288
|
function fe(e) {
|
|
269
|
-
const t =
|
|
289
|
+
const t = Ke(e.referenceLines, !!e.horizontal);
|
|
270
290
|
if (e.stacked || e.normalized)
|
|
271
291
|
return { referenceLines: t };
|
|
272
292
|
const r = e.beginAtZero !== !1, a = [
|
|
@@ -275,26 +295,26 @@ function fe(e) {
|
|
|
275
295
|
];
|
|
276
296
|
return e.horizontal ? { xAxisProps: { domain: a }, referenceLines: t } : { yAxisProps: { domain: a }, referenceLines: t };
|
|
277
297
|
}
|
|
278
|
-
function
|
|
298
|
+
function Xe(e, t, r) {
|
|
279
299
|
return e !== void 0 ? e : t.length === 1 && r.length <= 8;
|
|
280
300
|
}
|
|
281
|
-
function
|
|
301
|
+
function st({
|
|
282
302
|
categories: e,
|
|
283
303
|
series: t,
|
|
284
304
|
height: r = 240,
|
|
285
305
|
fill: a,
|
|
286
306
|
valueSuffix: c,
|
|
287
307
|
valuePrefix: n,
|
|
288
|
-
showValues:
|
|
308
|
+
showValues: d,
|
|
289
309
|
showHoverGuide: u = !0,
|
|
290
|
-
beginAtZero:
|
|
310
|
+
beginAtZero: l,
|
|
291
311
|
yMin: s,
|
|
292
312
|
yMax: f,
|
|
293
313
|
referenceLines: y,
|
|
294
314
|
style: x
|
|
295
315
|
}) {
|
|
296
|
-
const v =
|
|
297
|
-
beginAtZero:
|
|
316
|
+
const v = de(e, t), B = le(t), b = fe({
|
|
317
|
+
beginAtZero: l,
|
|
298
318
|
yMin: s,
|
|
299
319
|
yMax: f,
|
|
300
320
|
referenceLines: y,
|
|
@@ -307,30 +327,30 @@ function ot({
|
|
|
307
327
|
curveType: "monotone",
|
|
308
328
|
withLegend: t.length > 1,
|
|
309
329
|
valueFormatter: ue(c, n),
|
|
310
|
-
withPointLabels:
|
|
330
|
+
withPointLabels: d ?? e.length <= 20,
|
|
311
331
|
tooltipProps: u ? void 0 : { cursor: !1 },
|
|
312
|
-
...
|
|
332
|
+
...b,
|
|
313
333
|
style: x
|
|
314
334
|
};
|
|
315
|
-
return a ? /* @__PURE__ */ i(
|
|
335
|
+
return a ? /* @__PURE__ */ i(He, { ...C }) : /* @__PURE__ */ i(ze, { ...C });
|
|
316
336
|
}
|
|
317
|
-
function
|
|
337
|
+
function dt({
|
|
318
338
|
categories: e,
|
|
319
339
|
series: t,
|
|
320
340
|
height: r = 240,
|
|
321
341
|
stacked: a,
|
|
322
342
|
horizontal: c,
|
|
323
343
|
normalized: n,
|
|
324
|
-
valueSuffix:
|
|
344
|
+
valueSuffix: d,
|
|
325
345
|
valuePrefix: u,
|
|
326
|
-
showValues:
|
|
346
|
+
showValues: l,
|
|
327
347
|
beginAtZero: s,
|
|
328
348
|
yMin: f,
|
|
329
349
|
yMax: y,
|
|
330
350
|
referenceLines: x,
|
|
331
351
|
style: v
|
|
332
352
|
}) {
|
|
333
|
-
const B =
|
|
353
|
+
const B = de(e, t), b = n ? "percent" : a ? "stacked" : "default", C = fe({
|
|
334
354
|
beginAtZero: s,
|
|
335
355
|
yMin: f,
|
|
336
356
|
yMax: y,
|
|
@@ -338,102 +358,127 @@ function at({
|
|
|
338
358
|
horizontal: c,
|
|
339
359
|
stacked: a,
|
|
340
360
|
normalized: n
|
|
341
|
-
}), w = !a && !n &&
|
|
361
|
+
}), w = !a && !n && Xe(l, t, e);
|
|
342
362
|
return /* @__PURE__ */ i(
|
|
343
|
-
|
|
363
|
+
Pe,
|
|
344
364
|
{
|
|
345
365
|
h: r,
|
|
346
366
|
data: B,
|
|
347
367
|
dataKey: "category",
|
|
348
|
-
series:
|
|
349
|
-
type:
|
|
368
|
+
series: le(t),
|
|
369
|
+
type: b,
|
|
350
370
|
orientation: c ? "vertical" : "horizontal",
|
|
351
371
|
withLegend: t.length > 1,
|
|
352
|
-
valueFormatter: ue(
|
|
372
|
+
valueFormatter: ue(d, u),
|
|
353
373
|
withBarValueLabel: w,
|
|
354
374
|
...C,
|
|
355
375
|
style: v
|
|
356
376
|
}
|
|
357
377
|
);
|
|
358
378
|
}
|
|
359
|
-
function
|
|
360
|
-
const
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
379
|
+
function lt({ data: e, size: t = 200, donut: r, style: a }) {
|
|
380
|
+
const c = e.map((d, u) => ({
|
|
381
|
+
name: d.label,
|
|
382
|
+
value: d.value,
|
|
383
|
+
color: se(d.tone, u)
|
|
384
|
+
}));
|
|
385
|
+
return /* @__PURE__ */ i(
|
|
386
|
+
"div",
|
|
387
|
+
{
|
|
388
|
+
style: {
|
|
389
|
+
width: "100%",
|
|
390
|
+
height: t,
|
|
391
|
+
minHeight: t,
|
|
392
|
+
display: "flex",
|
|
393
|
+
alignItems: "center",
|
|
394
|
+
justifyContent: "center"
|
|
395
|
+
},
|
|
396
|
+
children: r ? /* @__PURE__ */ i(
|
|
397
|
+
Re,
|
|
398
|
+
{
|
|
399
|
+
data: c,
|
|
400
|
+
size: t,
|
|
401
|
+
withTooltip: !0,
|
|
402
|
+
style: a
|
|
403
|
+
}
|
|
404
|
+
) : /* @__PURE__ */ i(
|
|
405
|
+
$e,
|
|
406
|
+
{
|
|
407
|
+
data: c,
|
|
408
|
+
size: t,
|
|
409
|
+
withTooltip: !0,
|
|
410
|
+
withLabelsLine: !1,
|
|
411
|
+
style: a
|
|
412
|
+
}
|
|
413
|
+
)
|
|
414
|
+
}
|
|
415
|
+
);
|
|
371
416
|
}
|
|
372
|
-
function
|
|
417
|
+
function ut(e) {
|
|
373
418
|
const {
|
|
374
419
|
nodes: t,
|
|
375
420
|
edges: r,
|
|
376
421
|
direction: a = "vertical",
|
|
377
422
|
nodeWidth: c = 160,
|
|
378
423
|
nodeHeight: n = 40,
|
|
379
|
-
rankGap:
|
|
424
|
+
rankGap: d = 64,
|
|
380
425
|
nodeGap: u = 48,
|
|
381
|
-
padding:
|
|
426
|
+
padding: l = 24
|
|
382
427
|
} = e, s = t.map((o) => o.id), f = new Set(s), y = /* @__PURE__ */ new Map();
|
|
383
428
|
for (const o of s) y.set(o, []);
|
|
384
429
|
for (const o of r)
|
|
385
430
|
f.has(o.from) && f.has(o.to) && y.get(o.from).push(o.to);
|
|
386
|
-
const x = 0, v = 1, B = 2,
|
|
387
|
-
|
|
431
|
+
const x = 0, v = 1, B = 2, b = new Map(s.map((o) => [o, x])), C = /* @__PURE__ */ new Set(), w = (o, h) => `${o}\0${h}`, Q = (o) => {
|
|
432
|
+
b.set(o, v);
|
|
388
433
|
for (const h of y.get(o) ?? []) {
|
|
389
|
-
const p =
|
|
390
|
-
p === v ? C.add(w(o, h)) : p === x &&
|
|
434
|
+
const p = b.get(h);
|
|
435
|
+
p === v ? C.add(w(o, h)) : p === x && Q(h);
|
|
391
436
|
}
|
|
392
|
-
|
|
437
|
+
b.set(o, B);
|
|
393
438
|
};
|
|
394
|
-
for (const o of s)
|
|
439
|
+
for (const o of s) b.get(o) === x && Q(o);
|
|
395
440
|
const ge = r.filter(
|
|
396
441
|
(o) => f.has(o.from) && f.has(o.to) && !C.has(w(o.from, o.to))
|
|
397
|
-
),
|
|
442
|
+
), S = new Map(s.map((o) => [o, 0])), K = new Map(s.map((o) => [o, []]));
|
|
398
443
|
for (const o of ge)
|
|
399
|
-
|
|
400
|
-
const T = new Map(s.map((o) => [o, 0])),
|
|
401
|
-
for (;
|
|
402
|
-
const o =
|
|
403
|
-
for (const p of
|
|
404
|
-
T.set(p, Math.max(T.get(p), h + 1)),
|
|
444
|
+
K.get(o.from).push(o.to), S.set(o.to, (S.get(o.to) ?? 0) + 1);
|
|
445
|
+
const T = new Map(s.map((o) => [o, 0])), H = s.filter((o) => (S.get(o) ?? 0) === 0);
|
|
446
|
+
for (; H.length > 0; ) {
|
|
447
|
+
const o = H.shift(), h = T.get(o);
|
|
448
|
+
for (const p of K.get(o))
|
|
449
|
+
T.set(p, Math.max(T.get(p), h + 1)), S.set(p, S.get(p) - 1), S.get(p) === 0 && H.push(p);
|
|
405
450
|
}
|
|
406
451
|
const A = /* @__PURE__ */ new Map();
|
|
407
452
|
for (const o of s) {
|
|
408
453
|
const h = T.get(o);
|
|
409
454
|
A.has(h) || A.set(h, []), A.get(h).push(o);
|
|
410
455
|
}
|
|
411
|
-
const L = [...A.keys()].sort((o, h) => o - h), m = a === "vertical",
|
|
456
|
+
const L = [...A.keys()].sort((o, h) => o - h), m = a === "vertical", X = (o) => o * (m ? c : n) + Math.max(0, o - 1) * u, Y = Math.max(
|
|
412
457
|
0,
|
|
413
|
-
...L.map((o) =>
|
|
414
|
-
), D = /* @__PURE__ */ new Map(),
|
|
458
|
+
...L.map((o) => X(A.get(o).length))
|
|
459
|
+
), D = /* @__PURE__ */ new Map(), V = [];
|
|
415
460
|
L.forEach((o, h) => {
|
|
416
|
-
const p = A.get(o),
|
|
417
|
-
p.forEach((
|
|
418
|
-
const
|
|
419
|
-
D.set(
|
|
420
|
-
}),
|
|
461
|
+
const p = A.get(o), z = X(p.length), R = l + (Y - z) / 2, M = l + h * ((m ? n : c) + d);
|
|
462
|
+
p.forEach((ee, te) => {
|
|
463
|
+
const re = R + te * ((m ? c : n) + u), ye = m ? re : M, me = m ? M : re;
|
|
464
|
+
D.set(ee, { id: ee, x: ye, y: me, rank: o, order: te });
|
|
465
|
+
}), V.push({
|
|
421
466
|
rank: o,
|
|
422
|
-
x: m ?
|
|
423
|
-
y: m ? M :
|
|
424
|
-
width: m ?
|
|
425
|
-
height: m ? n :
|
|
467
|
+
x: m ? R : M,
|
|
468
|
+
y: m ? M : R,
|
|
469
|
+
width: m ? z : c,
|
|
470
|
+
height: m ? n : z,
|
|
426
471
|
nodeIds: p
|
|
427
472
|
});
|
|
428
473
|
});
|
|
429
|
-
const
|
|
474
|
+
const J = (o, h) => o ? m ? {
|
|
430
475
|
x: o.x + c / 2,
|
|
431
476
|
y: h === "source" ? o.y + n : o.y
|
|
432
477
|
} : {
|
|
433
478
|
x: h === "source" ? o.x + c : o.x,
|
|
434
479
|
y: o.y + n / 2
|
|
435
480
|
} : { x: 0, y: 0 }, pe = r.filter((o) => f.has(o.from) && f.has(o.to)).map((o) => {
|
|
436
|
-
const h =
|
|
481
|
+
const h = J(D.get(o.from), "source"), p = J(D.get(o.to), "target");
|
|
437
482
|
return {
|
|
438
483
|
from: o.from,
|
|
439
484
|
to: o.to,
|
|
@@ -443,17 +488,17 @@ function ct(e) {
|
|
|
443
488
|
targetY: p.y,
|
|
444
489
|
isBackEdge: C.has(w(o.from, o.to))
|
|
445
490
|
};
|
|
446
|
-
}),
|
|
491
|
+
}), U = l * 2 + L.length * (m ? n : c) + Math.max(0, L.length - 1) * d, Z = l * 2 + Y;
|
|
447
492
|
return {
|
|
448
493
|
nodes: [...D.values()],
|
|
449
494
|
edges: pe,
|
|
450
|
-
ranks:
|
|
495
|
+
ranks: V,
|
|
451
496
|
direction: a,
|
|
452
|
-
width: m ?
|
|
453
|
-
height: m ?
|
|
497
|
+
width: m ? Z : U,
|
|
498
|
+
height: m ? U : Z
|
|
454
499
|
};
|
|
455
500
|
}
|
|
456
|
-
function
|
|
501
|
+
function ft({
|
|
457
502
|
additions: e = 0,
|
|
458
503
|
deletions: t = 0,
|
|
459
504
|
style: r
|
|
@@ -470,11 +515,11 @@ function st({
|
|
|
470
515
|
...r
|
|
471
516
|
},
|
|
472
517
|
children: [
|
|
473
|
-
e > 0 && /* @__PURE__ */ g("span", { style: { color:
|
|
518
|
+
e > 0 && /* @__PURE__ */ g("span", { style: { color: k.added }, children: [
|
|
474
519
|
"+",
|
|
475
520
|
e
|
|
476
521
|
] }),
|
|
477
|
-
t > 0 && /* @__PURE__ */ g("span", { style: { color:
|
|
522
|
+
t > 0 && /* @__PURE__ */ g("span", { style: { color: k.deleted }, children: [
|
|
478
523
|
"-",
|
|
479
524
|
t
|
|
480
525
|
] })
|
|
@@ -482,19 +527,19 @@ function st({
|
|
|
482
527
|
}
|
|
483
528
|
);
|
|
484
529
|
}
|
|
485
|
-
const
|
|
530
|
+
const Ye = {
|
|
486
531
|
added: "+",
|
|
487
532
|
removed: "-",
|
|
488
533
|
unchanged: " "
|
|
489
534
|
};
|
|
490
|
-
function
|
|
535
|
+
function ht({
|
|
491
536
|
lines: e,
|
|
492
537
|
showLineNumbers: t = !0,
|
|
493
538
|
coloredLineNumbers: r = !0,
|
|
494
539
|
showAccentStrip: a = !0,
|
|
495
540
|
style: c
|
|
496
541
|
}) {
|
|
497
|
-
const n =
|
|
542
|
+
const n = F(), d = (s) => s === "added" ? n.diff.insertedLine : s === "removed" ? n.diff.removedLine : "transparent", u = (s) => s === "added" ? n.diff.stripAdded : s === "removed" ? n.diff.stripRemoved : "transparent", l = (s) => r && s === "added" ? k.added : r && s === "removed" ? k.deleted : n.text.tertiary;
|
|
498
543
|
return /* @__PURE__ */ i(
|
|
499
544
|
"div",
|
|
500
545
|
{
|
|
@@ -512,7 +557,7 @@ function lt({
|
|
|
512
557
|
style: {
|
|
513
558
|
display: "flex",
|
|
514
559
|
alignItems: "stretch",
|
|
515
|
-
background:
|
|
560
|
+
background: d(s.type),
|
|
516
561
|
borderLeft: a ? `3px solid ${u(s.type)}` : void 0
|
|
517
562
|
},
|
|
518
563
|
children: [
|
|
@@ -525,7 +570,7 @@ function lt({
|
|
|
525
570
|
textAlign: "right",
|
|
526
571
|
paddingRight: 10,
|
|
527
572
|
userSelect: "none",
|
|
528
|
-
color:
|
|
573
|
+
color: l(s.type)
|
|
529
574
|
},
|
|
530
575
|
children: s.lineNumber ?? ""
|
|
531
576
|
}
|
|
@@ -538,9 +583,9 @@ function lt({
|
|
|
538
583
|
width: 14,
|
|
539
584
|
textAlign: "center",
|
|
540
585
|
userSelect: "none",
|
|
541
|
-
color:
|
|
586
|
+
color: l(s.type)
|
|
542
587
|
},
|
|
543
|
-
children:
|
|
588
|
+
children: Ye[s.type]
|
|
544
589
|
}
|
|
545
590
|
),
|
|
546
591
|
/* @__PURE__ */ i(
|
|
@@ -562,8 +607,8 @@ function lt({
|
|
|
562
607
|
}
|
|
563
608
|
);
|
|
564
609
|
}
|
|
565
|
-
function
|
|
566
|
-
const t =
|
|
610
|
+
function Ve({ status: e }) {
|
|
611
|
+
const t = F(), r = e === "completed" ? k.success : e === "in_progress" ? t.accent.primary : e === "cancelled" ? k.danger : t.text.tertiary;
|
|
567
612
|
return /* @__PURE__ */ g(
|
|
568
613
|
"svg",
|
|
569
614
|
{
|
|
@@ -599,15 +644,15 @@ function Xe({ status: e }) {
|
|
|
599
644
|
}
|
|
600
645
|
);
|
|
601
646
|
}
|
|
602
|
-
function
|
|
647
|
+
function Je({
|
|
603
648
|
todos: e,
|
|
604
649
|
dimmedTodoIds: t,
|
|
605
650
|
onTodoClick: r,
|
|
606
651
|
style: a
|
|
607
652
|
}) {
|
|
608
|
-
const c =
|
|
653
|
+
const c = F();
|
|
609
654
|
return e.length === 0 ? null : /* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", ...a }, children: e.map((n) => {
|
|
610
|
-
const
|
|
655
|
+
const d = t == null ? void 0 : t.has(n.id);
|
|
611
656
|
return /* @__PURE__ */ g(
|
|
612
657
|
"button",
|
|
613
658
|
{
|
|
@@ -626,10 +671,10 @@ function Ye({
|
|
|
626
671
|
color: c.text.primary,
|
|
627
672
|
fontSize: 14,
|
|
628
673
|
lineHeight: "20px",
|
|
629
|
-
opacity:
|
|
674
|
+
opacity: d ? 0.45 : 1
|
|
630
675
|
},
|
|
631
676
|
children: [
|
|
632
|
-
/* @__PURE__ */ i(
|
|
677
|
+
/* @__PURE__ */ i(Ve, { status: n.status }),
|
|
633
678
|
/* @__PURE__ */ i(
|
|
634
679
|
"span",
|
|
635
680
|
{
|
|
@@ -646,16 +691,16 @@ function Ye({
|
|
|
646
691
|
);
|
|
647
692
|
}) });
|
|
648
693
|
}
|
|
649
|
-
function
|
|
694
|
+
function gt({
|
|
650
695
|
todos: e,
|
|
651
696
|
dimmedTodoIds: t,
|
|
652
697
|
defaultExpanded: r = !1,
|
|
653
698
|
onTodoClick: a,
|
|
654
699
|
style: c
|
|
655
700
|
}) {
|
|
656
|
-
const n =
|
|
701
|
+
const n = F(), [d, u] = P(r);
|
|
657
702
|
if (e.length === 0) return null;
|
|
658
|
-
const
|
|
703
|
+
const l = e.filter((s) => s.status === "completed").length;
|
|
659
704
|
return /* @__PURE__ */ g(
|
|
660
705
|
"div",
|
|
661
706
|
{
|
|
@@ -693,7 +738,7 @@ function dt({
|
|
|
693
738
|
viewBox: "0 0 12 12",
|
|
694
739
|
fill: "none",
|
|
695
740
|
style: {
|
|
696
|
-
transform:
|
|
741
|
+
transform: d ? "rotate(90deg)" : "none",
|
|
697
742
|
transition: "transform 120ms"
|
|
698
743
|
},
|
|
699
744
|
"aria-hidden": !0,
|
|
@@ -712,7 +757,7 @@ function dt({
|
|
|
712
757
|
/* @__PURE__ */ i("span", { children: "Todos" }),
|
|
713
758
|
/* @__PURE__ */ i("span", { style: { flex: 1 } }),
|
|
714
759
|
/* @__PURE__ */ g("span", { children: [
|
|
715
|
-
|
|
760
|
+
l,
|
|
716
761
|
" of ",
|
|
717
762
|
e.length,
|
|
718
763
|
" Done"
|
|
@@ -720,8 +765,8 @@ function dt({
|
|
|
720
765
|
]
|
|
721
766
|
}
|
|
722
767
|
),
|
|
723
|
-
|
|
724
|
-
|
|
768
|
+
d && /* @__PURE__ */ i("div", { style: { padding: 6 }, children: /* @__PURE__ */ i(
|
|
769
|
+
Je,
|
|
725
770
|
{
|
|
726
771
|
todos: e,
|
|
727
772
|
dimmedTodoIds: t,
|
|
@@ -732,77 +777,77 @@ function dt({
|
|
|
732
777
|
}
|
|
733
778
|
);
|
|
734
779
|
}
|
|
735
|
-
function
|
|
736
|
-
const r = `canvas:${e}`, [a, c] =
|
|
780
|
+
function pt(e, t) {
|
|
781
|
+
const r = `canvas:${e}`, [a, c] = P(() => {
|
|
737
782
|
if (typeof localStorage > "u") return t;
|
|
738
783
|
try {
|
|
739
|
-
const
|
|
740
|
-
return
|
|
784
|
+
const d = localStorage.getItem(r);
|
|
785
|
+
return d === null ? t : JSON.parse(d);
|
|
741
786
|
} catch {
|
|
742
787
|
return t;
|
|
743
788
|
}
|
|
744
789
|
}), n = G(
|
|
745
|
-
(
|
|
790
|
+
(d) => {
|
|
746
791
|
c((u) => {
|
|
747
|
-
const
|
|
792
|
+
const l = typeof d == "function" ? d(u) : d;
|
|
748
793
|
try {
|
|
749
|
-
localStorage == null || localStorage.setItem(r, JSON.stringify(
|
|
794
|
+
localStorage == null || localStorage.setItem(r, JSON.stringify(l));
|
|
750
795
|
} catch {
|
|
751
796
|
}
|
|
752
|
-
return
|
|
797
|
+
return l;
|
|
753
798
|
});
|
|
754
799
|
},
|
|
755
800
|
[r]
|
|
756
801
|
);
|
|
757
802
|
return [a, n];
|
|
758
803
|
}
|
|
759
|
-
function
|
|
804
|
+
function yt() {
|
|
760
805
|
return G((e) => {
|
|
761
806
|
}, []);
|
|
762
807
|
}
|
|
763
|
-
function
|
|
808
|
+
function mt(e, t) {
|
|
764
809
|
return { ...e, ...t };
|
|
765
810
|
}
|
|
766
|
-
function
|
|
811
|
+
function xt({ children: e, style: t }) {
|
|
767
812
|
return /* @__PURE__ */ i(W, { order: 1, fz: 24, lh: "30px", style: t, children: e });
|
|
768
813
|
}
|
|
769
|
-
function
|
|
814
|
+
function vt({ children: e, style: t }) {
|
|
770
815
|
return /* @__PURE__ */ i(W, { order: 2, fz: 18, lh: "24px", style: t, children: e });
|
|
771
816
|
}
|
|
772
|
-
function
|
|
817
|
+
function Et({ children: e, style: t }) {
|
|
773
818
|
return /* @__PURE__ */ i(W, { order: 3, fz: 16, lh: "22px", style: t, children: e });
|
|
774
819
|
}
|
|
775
|
-
const
|
|
820
|
+
const Ue = {
|
|
776
821
|
normal: 400,
|
|
777
822
|
medium: 500,
|
|
778
823
|
semibold: 600,
|
|
779
824
|
bold: 700
|
|
780
825
|
};
|
|
781
|
-
function
|
|
826
|
+
function kt({
|
|
782
827
|
children: e,
|
|
783
828
|
tone: t = "primary",
|
|
784
829
|
size: r = "body",
|
|
785
830
|
as: a = "p",
|
|
786
831
|
weight: c = "normal",
|
|
787
832
|
italic: n,
|
|
788
|
-
truncate:
|
|
833
|
+
truncate: d,
|
|
789
834
|
style: u
|
|
790
835
|
}) {
|
|
791
|
-
const
|
|
836
|
+
const l = F();
|
|
792
837
|
return /* @__PURE__ */ i(
|
|
793
|
-
|
|
838
|
+
$,
|
|
794
839
|
{
|
|
795
840
|
component: a,
|
|
796
841
|
size: r === "small" ? "xs" : "sm",
|
|
797
|
-
fw:
|
|
798
|
-
c: t === "primary" ? void 0 :
|
|
799
|
-
truncate:
|
|
842
|
+
fw: Ue[c],
|
|
843
|
+
c: t === "primary" ? void 0 : l.text[t],
|
|
844
|
+
truncate: d,
|
|
800
845
|
style: { fontStyle: n ? "italic" : void 0, ...u },
|
|
801
846
|
children: e
|
|
802
847
|
}
|
|
803
848
|
);
|
|
804
849
|
}
|
|
805
|
-
function
|
|
850
|
+
function bt({ children: e, style: t }) {
|
|
806
851
|
return /* @__PURE__ */ i(
|
|
807
852
|
"code",
|
|
808
853
|
{
|
|
@@ -818,7 +863,7 @@ function xt({ children: e, style: t }) {
|
|
|
818
863
|
}
|
|
819
864
|
);
|
|
820
865
|
}
|
|
821
|
-
function
|
|
866
|
+
function Ct({ children: e, href: t, style: r }) {
|
|
822
867
|
return /* @__PURE__ */ i(
|
|
823
868
|
"a",
|
|
824
869
|
{
|
|
@@ -830,17 +875,17 @@ function vt({ children: e, href: t, style: r }) {
|
|
|
830
875
|
}
|
|
831
876
|
);
|
|
832
877
|
}
|
|
833
|
-
function
|
|
878
|
+
function Ft({ children: e, gap: t, style: r }) {
|
|
834
879
|
return /* @__PURE__ */ i(we, { gap: t, style: r, children: e });
|
|
835
880
|
}
|
|
836
|
-
const
|
|
881
|
+
const oe = {
|
|
837
882
|
start: "flex-start",
|
|
838
883
|
center: "center",
|
|
839
884
|
end: "flex-end",
|
|
840
885
|
stretch: "stretch",
|
|
841
886
|
"space-between": "space-between"
|
|
842
887
|
};
|
|
843
|
-
function
|
|
888
|
+
function St({
|
|
844
889
|
children: e,
|
|
845
890
|
gap: t,
|
|
846
891
|
align: r = "center",
|
|
@@ -852,18 +897,18 @@ function bt({
|
|
|
852
897
|
Ae,
|
|
853
898
|
{
|
|
854
899
|
gap: t,
|
|
855
|
-
align:
|
|
856
|
-
justify:
|
|
900
|
+
align: oe[r],
|
|
901
|
+
justify: oe[a],
|
|
857
902
|
wrap: c ? "wrap" : "nowrap",
|
|
858
903
|
style: n,
|
|
859
904
|
children: e
|
|
860
905
|
}
|
|
861
906
|
);
|
|
862
907
|
}
|
|
863
|
-
function
|
|
908
|
+
function At() {
|
|
864
909
|
return /* @__PURE__ */ i("div", { style: { flex: 1 } });
|
|
865
910
|
}
|
|
866
|
-
function
|
|
911
|
+
function Bt({ children: e, columns: t, gap: r = 16, align: a, style: c }) {
|
|
867
912
|
const n = typeof t == "number" ? `repeat(${t}, minmax(0, 1fr))` : t;
|
|
868
913
|
return /* @__PURE__ */ i(
|
|
869
914
|
"div",
|
|
@@ -879,41 +924,41 @@ function Ct({ children: e, columns: t, gap: r = 16, align: a, style: c }) {
|
|
|
879
924
|
}
|
|
880
925
|
);
|
|
881
926
|
}
|
|
882
|
-
function
|
|
927
|
+
function wt({ style: e }) {
|
|
883
928
|
return /* @__PURE__ */ i(Ce, { style: e });
|
|
884
929
|
}
|
|
885
|
-
const
|
|
930
|
+
const q = Me({
|
|
886
931
|
collapsible: !1,
|
|
887
932
|
open: !0,
|
|
888
933
|
toggle: () => {
|
|
889
934
|
}
|
|
890
935
|
});
|
|
891
|
-
function
|
|
936
|
+
function Tt({
|
|
892
937
|
children: e,
|
|
893
938
|
variant: t = "default",
|
|
894
939
|
collapsible: r = !1,
|
|
895
940
|
defaultOpen: a = !0,
|
|
896
941
|
open: c,
|
|
897
942
|
onOpenChange: n,
|
|
898
|
-
style:
|
|
943
|
+
style: d
|
|
899
944
|
}) {
|
|
900
|
-
const [u,
|
|
945
|
+
const [u, l] = P(a), s = c ?? u, f = G(() => {
|
|
901
946
|
const y = !s;
|
|
902
|
-
c === void 0 &&
|
|
947
|
+
c === void 0 && l(y), n == null || n(y);
|
|
903
948
|
}, [s, c, n]);
|
|
904
949
|
return /* @__PURE__ */ i(
|
|
905
|
-
|
|
950
|
+
ke,
|
|
906
951
|
{
|
|
907
952
|
withBorder: t !== "borderless",
|
|
908
953
|
radius: "md",
|
|
909
954
|
padding: 0,
|
|
910
|
-
style:
|
|
911
|
-
children: /* @__PURE__ */ i(
|
|
955
|
+
style: d,
|
|
956
|
+
children: /* @__PURE__ */ i(q.Provider, { value: { collapsible: r, open: s, toggle: f }, children: e })
|
|
912
957
|
}
|
|
913
958
|
);
|
|
914
959
|
}
|
|
915
|
-
function
|
|
916
|
-
const { collapsible: a, open: c, toggle: n } =
|
|
960
|
+
function Lt({ children: e, trailing: t, style: r }) {
|
|
961
|
+
const { collapsible: a, open: c, toggle: n } = ae(q);
|
|
917
962
|
return /* @__PURE__ */ g(
|
|
918
963
|
"div",
|
|
919
964
|
{
|
|
@@ -942,8 +987,8 @@ function At({ children: e, trailing: t, style: r }) {
|
|
|
942
987
|
}
|
|
943
988
|
);
|
|
944
989
|
}
|
|
945
|
-
function
|
|
946
|
-
const { collapsible: r, open: a } =
|
|
990
|
+
function Dt({ children: e, style: t }) {
|
|
991
|
+
const { collapsible: r, open: a } = ae(q);
|
|
947
992
|
return r && !a ? null : /* @__PURE__ */ i("div", { style: { padding: 14, ...t }, children: e });
|
|
948
993
|
}
|
|
949
994
|
function he({ expanded: e }) {
|
|
@@ -972,44 +1017,44 @@ function he({ expanded: e }) {
|
|
|
972
1017
|
}
|
|
973
1018
|
);
|
|
974
1019
|
}
|
|
975
|
-
function
|
|
1020
|
+
function Mt({ value: e, label: t, tone: r, style: a }) {
|
|
976
1021
|
return /* @__PURE__ */ g("div", { style: a, children: [
|
|
977
1022
|
/* @__PURE__ */ i(
|
|
978
|
-
|
|
1023
|
+
$,
|
|
979
1024
|
{
|
|
980
1025
|
fz: 22,
|
|
981
1026
|
fw: 700,
|
|
982
1027
|
lh: 1.2,
|
|
983
|
-
c: r ? `${
|
|
1028
|
+
c: r ? `${_[r]}.6` : void 0,
|
|
984
1029
|
children: e
|
|
985
1030
|
}
|
|
986
1031
|
),
|
|
987
|
-
/* @__PURE__ */ i(
|
|
1032
|
+
/* @__PURE__ */ i($, { fz: 12, c: "dimmed", children: t })
|
|
988
1033
|
] });
|
|
989
1034
|
}
|
|
990
|
-
function
|
|
1035
|
+
function Pt({
|
|
991
1036
|
children: e,
|
|
992
1037
|
active: t,
|
|
993
1038
|
tone: r = "neutral",
|
|
994
1039
|
size: a = "md",
|
|
995
1040
|
leadingContent: c,
|
|
996
1041
|
keyboardHint: n,
|
|
997
|
-
title:
|
|
1042
|
+
title: d,
|
|
998
1043
|
style: u,
|
|
999
|
-
onClick:
|
|
1044
|
+
onClick: l
|
|
1000
1045
|
}) {
|
|
1001
1046
|
return /* @__PURE__ */ i(
|
|
1002
|
-
|
|
1047
|
+
Se,
|
|
1003
1048
|
{
|
|
1004
|
-
color:
|
|
1049
|
+
color: _[r],
|
|
1005
1050
|
variant: t ? "filled" : "light",
|
|
1006
1051
|
size: a === "sm" ? "sm" : "md",
|
|
1007
1052
|
leftSection: c,
|
|
1008
1053
|
rightSection: n,
|
|
1009
|
-
title:
|
|
1010
|
-
onClick:
|
|
1054
|
+
title: d,
|
|
1055
|
+
onClick: l,
|
|
1011
1056
|
style: {
|
|
1012
|
-
cursor:
|
|
1057
|
+
cursor: l ? "pointer" : void 0,
|
|
1013
1058
|
textTransform: "none",
|
|
1014
1059
|
...u
|
|
1015
1060
|
},
|
|
@@ -1017,7 +1062,7 @@ function Tt({
|
|
|
1017
1062
|
}
|
|
1018
1063
|
);
|
|
1019
1064
|
}
|
|
1020
|
-
function
|
|
1065
|
+
function Ht({
|
|
1021
1066
|
children: e,
|
|
1022
1067
|
tone: t = "neutral",
|
|
1023
1068
|
title: r,
|
|
@@ -1027,7 +1072,7 @@ function Lt({
|
|
|
1027
1072
|
return /* @__PURE__ */ i(
|
|
1028
1073
|
Ee,
|
|
1029
1074
|
{
|
|
1030
|
-
color:
|
|
1075
|
+
color: _[t],
|
|
1031
1076
|
title: r,
|
|
1032
1077
|
icon: a,
|
|
1033
1078
|
variant: "light",
|
|
@@ -1036,23 +1081,23 @@ function Lt({
|
|
|
1036
1081
|
}
|
|
1037
1082
|
);
|
|
1038
1083
|
}
|
|
1039
|
-
const
|
|
1084
|
+
const Ze = {
|
|
1040
1085
|
success: "rgba(31,138,101,0.12)",
|
|
1041
1086
|
danger: "rgba(207,45,86,0.12)",
|
|
1042
1087
|
warning: "rgba(232,163,61,0.14)",
|
|
1043
1088
|
info: "rgba(46,121,181,0.12)",
|
|
1044
1089
|
neutral: "rgba(136,136,168,0.12)"
|
|
1045
1090
|
};
|
|
1046
|
-
function
|
|
1091
|
+
function zt({
|
|
1047
1092
|
headers: e,
|
|
1048
1093
|
rows: t,
|
|
1049
1094
|
columnAlign: r,
|
|
1050
1095
|
rowTone: a,
|
|
1051
1096
|
framed: c = !0,
|
|
1052
1097
|
striped: n,
|
|
1053
|
-
stickyHeader:
|
|
1098
|
+
stickyHeader: d,
|
|
1054
1099
|
style: u,
|
|
1055
|
-
emptyMessage:
|
|
1100
|
+
emptyMessage: l
|
|
1056
1101
|
}) {
|
|
1057
1102
|
return /* @__PURE__ */ g(
|
|
1058
1103
|
E,
|
|
@@ -1060,17 +1105,17 @@ function Dt({
|
|
|
1060
1105
|
withTableBorder: c,
|
|
1061
1106
|
withColumnBorders: !1,
|
|
1062
1107
|
striped: n,
|
|
1063
|
-
stickyHeader:
|
|
1108
|
+
stickyHeader: d,
|
|
1064
1109
|
highlightOnHover: !0,
|
|
1065
1110
|
style: u,
|
|
1066
1111
|
children: [
|
|
1067
1112
|
/* @__PURE__ */ i(E.Thead, { children: /* @__PURE__ */ i(E.Tr, { children: e.map((s, f) => /* @__PURE__ */ i(E.Th, { ta: (r == null ? void 0 : r[f]) ?? "left", children: s }, f)) }) }),
|
|
1068
|
-
/* @__PURE__ */ i(E.Tbody, { children: t.length === 0 ? /* @__PURE__ */ i(E.Tr, { children: /* @__PURE__ */ i(E.Td, { colSpan: e.length, ta: "center", c: "dimmed", children:
|
|
1113
|
+
/* @__PURE__ */ i(E.Tbody, { children: t.length === 0 ? /* @__PURE__ */ i(E.Tr, { children: /* @__PURE__ */ i(E.Td, { colSpan: e.length, ta: "center", c: "dimmed", children: l ?? "No data" }) }) : t.map((s, f) => {
|
|
1069
1114
|
const y = a == null ? void 0 : a[f];
|
|
1070
1115
|
return /* @__PURE__ */ i(
|
|
1071
1116
|
E.Tr,
|
|
1072
1117
|
{
|
|
1073
|
-
style: y ? { background:
|
|
1118
|
+
style: y ? { background: Ze[y] } : void 0,
|
|
1074
1119
|
children: e.map((x, v) => /* @__PURE__ */ i(
|
|
1075
1120
|
E.Td,
|
|
1076
1121
|
{
|
|
@@ -1087,12 +1132,12 @@ function Dt({
|
|
|
1087
1132
|
}
|
|
1088
1133
|
);
|
|
1089
1134
|
}
|
|
1090
|
-
const
|
|
1135
|
+
const et = {
|
|
1091
1136
|
primary: "filled",
|
|
1092
1137
|
secondary: "default",
|
|
1093
1138
|
ghost: "subtle"
|
|
1094
1139
|
};
|
|
1095
|
-
function
|
|
1140
|
+
function Rt({
|
|
1096
1141
|
children: e,
|
|
1097
1142
|
variant: t = "secondary",
|
|
1098
1143
|
disabled: r,
|
|
@@ -1103,7 +1148,7 @@ function Mt({
|
|
|
1103
1148
|
return /* @__PURE__ */ i(
|
|
1104
1149
|
ve,
|
|
1105
1150
|
{
|
|
1106
|
-
variant:
|
|
1151
|
+
variant: et[t],
|
|
1107
1152
|
size: "xs",
|
|
1108
1153
|
disabled: r,
|
|
1109
1154
|
type: a,
|
|
@@ -1113,17 +1158,17 @@ function Mt({
|
|
|
1113
1158
|
}
|
|
1114
1159
|
);
|
|
1115
1160
|
}
|
|
1116
|
-
function
|
|
1161
|
+
function $t({
|
|
1117
1162
|
children: e,
|
|
1118
1163
|
onClick: t,
|
|
1119
1164
|
disabled: r,
|
|
1120
1165
|
title: a,
|
|
1121
1166
|
variant: c = "default",
|
|
1122
1167
|
size: n = "md",
|
|
1123
|
-
style:
|
|
1168
|
+
style: d
|
|
1124
1169
|
}) {
|
|
1125
1170
|
return /* @__PURE__ */ i(
|
|
1126
|
-
|
|
1171
|
+
Fe,
|
|
1127
1172
|
{
|
|
1128
1173
|
variant: c === "circle" ? "light" : "subtle",
|
|
1129
1174
|
radius: c === "circle" ? "xl" : "sm",
|
|
@@ -1133,12 +1178,12 @@ function zt({
|
|
|
1133
1178
|
title: a,
|
|
1134
1179
|
"aria-label": a,
|
|
1135
1180
|
onClick: t,
|
|
1136
|
-
style:
|
|
1181
|
+
style: d,
|
|
1137
1182
|
children: e
|
|
1138
1183
|
}
|
|
1139
1184
|
);
|
|
1140
1185
|
}
|
|
1141
|
-
function
|
|
1186
|
+
function It({
|
|
1142
1187
|
value: e,
|
|
1143
1188
|
onChange: t,
|
|
1144
1189
|
options: r,
|
|
@@ -1154,14 +1199,14 @@ function Pt({
|
|
|
1154
1199
|
placeholder: a,
|
|
1155
1200
|
disabled: c,
|
|
1156
1201
|
allowDeselect: !1,
|
|
1157
|
-
onChange: (
|
|
1158
|
-
|
|
1202
|
+
onChange: (d) => {
|
|
1203
|
+
d !== null && (t == null || t(d));
|
|
1159
1204
|
},
|
|
1160
1205
|
style: n
|
|
1161
1206
|
}
|
|
1162
1207
|
);
|
|
1163
1208
|
}
|
|
1164
|
-
function
|
|
1209
|
+
function Wt({
|
|
1165
1210
|
checked: e,
|
|
1166
1211
|
onChange: t,
|
|
1167
1212
|
disabled: r,
|
|
@@ -1169,7 +1214,7 @@ function Rt({
|
|
|
1169
1214
|
style: c
|
|
1170
1215
|
}) {
|
|
1171
1216
|
return /* @__PURE__ */ i(
|
|
1172
|
-
|
|
1217
|
+
be,
|
|
1173
1218
|
{
|
|
1174
1219
|
checked: e,
|
|
1175
1220
|
disabled: r,
|
|
@@ -1179,7 +1224,7 @@ function Rt({
|
|
|
1179
1224
|
}
|
|
1180
1225
|
);
|
|
1181
1226
|
}
|
|
1182
|
-
function
|
|
1227
|
+
function Gt({
|
|
1183
1228
|
checked: e,
|
|
1184
1229
|
onChange: t,
|
|
1185
1230
|
disabled: r,
|
|
@@ -1197,7 +1242,7 @@ function $t({
|
|
|
1197
1242
|
}
|
|
1198
1243
|
);
|
|
1199
1244
|
}
|
|
1200
|
-
function
|
|
1245
|
+
function jt({
|
|
1201
1246
|
value: e,
|
|
1202
1247
|
onChange: t,
|
|
1203
1248
|
placeholder: r,
|
|
@@ -1212,12 +1257,12 @@ function Ht({
|
|
|
1212
1257
|
placeholder: r,
|
|
1213
1258
|
disabled: a,
|
|
1214
1259
|
type: c,
|
|
1215
|
-
onChange: (
|
|
1260
|
+
onChange: (d) => t == null ? void 0 : t(d.currentTarget.value),
|
|
1216
1261
|
style: n
|
|
1217
1262
|
}
|
|
1218
1263
|
);
|
|
1219
1264
|
}
|
|
1220
|
-
function
|
|
1265
|
+
function Nt({
|
|
1221
1266
|
value: e,
|
|
1222
1267
|
onChange: t,
|
|
1223
1268
|
placeholder: r,
|
|
@@ -1233,13 +1278,13 @@ function It({
|
|
|
1233
1278
|
disabled: a,
|
|
1234
1279
|
autosize: !0,
|
|
1235
1280
|
minRows: c,
|
|
1236
|
-
onChange: (
|
|
1281
|
+
onChange: (d) => t == null ? void 0 : t(d.currentTarget.value),
|
|
1237
1282
|
style: n
|
|
1238
1283
|
}
|
|
1239
1284
|
);
|
|
1240
1285
|
}
|
|
1241
|
-
function
|
|
1242
|
-
const r =
|
|
1286
|
+
function Ot({ color: e, style: t }) {
|
|
1287
|
+
const r = F();
|
|
1243
1288
|
return /* @__PURE__ */ i(
|
|
1244
1289
|
"span",
|
|
1245
1290
|
{
|
|
@@ -1255,17 +1300,17 @@ function Wt({ color: e, style: t }) {
|
|
|
1255
1300
|
}
|
|
1256
1301
|
);
|
|
1257
1302
|
}
|
|
1258
|
-
function
|
|
1303
|
+
function _t({
|
|
1259
1304
|
segments: e,
|
|
1260
1305
|
total: t,
|
|
1261
1306
|
topLeftLabel: r,
|
|
1262
1307
|
topRightLabel: a,
|
|
1263
1308
|
style: c
|
|
1264
1309
|
}) {
|
|
1265
|
-
const n =
|
|
1310
|
+
const n = F(), d = t > 0 ? t : 1, u = e.reduce(
|
|
1266
1311
|
(s, f) => s + (Number.isFinite(f.value) && f.value > 0 ? f.value : 0),
|
|
1267
1312
|
0
|
|
1268
|
-
),
|
|
1313
|
+
), l = Math.max(0, d - u);
|
|
1269
1314
|
return /* @__PURE__ */ g("div", { style: c, children: [
|
|
1270
1315
|
(r != null || a != null) && /* @__PURE__ */ g(
|
|
1271
1316
|
"div",
|
|
@@ -1285,12 +1330,12 @@ function Gt({
|
|
|
1285
1330
|
),
|
|
1286
1331
|
/* @__PURE__ */ g("div", { style: { display: "flex", gap: 2, height: 8 }, children: [
|
|
1287
1332
|
e.map((s, f) => {
|
|
1288
|
-
const y = Number.isFinite(s.value) && s.value > 0 ? s.value : 0, x = n.category[s.color ??
|
|
1333
|
+
const y = Number.isFinite(s.value) && s.value > 0 ? s.value : 0, x = n.category[s.color ?? ne[f % ne.length]];
|
|
1289
1334
|
return /* @__PURE__ */ i(
|
|
1290
1335
|
"div",
|
|
1291
1336
|
{
|
|
1292
1337
|
style: {
|
|
1293
|
-
width: `${y /
|
|
1338
|
+
width: `${y / d * 100}%`,
|
|
1294
1339
|
background: x,
|
|
1295
1340
|
borderRadius: 3
|
|
1296
1341
|
}
|
|
@@ -1298,11 +1343,11 @@ function Gt({
|
|
|
1298
1343
|
s.id
|
|
1299
1344
|
);
|
|
1300
1345
|
}),
|
|
1301
|
-
|
|
1346
|
+
l > 0 && /* @__PURE__ */ i(
|
|
1302
1347
|
"div",
|
|
1303
1348
|
{
|
|
1304
1349
|
style: {
|
|
1305
|
-
width: `${
|
|
1350
|
+
width: `${l / d * 100}%`,
|
|
1306
1351
|
background: n.fill.tertiary,
|
|
1307
1352
|
borderRadius: 3
|
|
1308
1353
|
}
|
|
@@ -1311,17 +1356,17 @@ function Gt({
|
|
|
1311
1356
|
] })
|
|
1312
1357
|
] });
|
|
1313
1358
|
}
|
|
1314
|
-
function
|
|
1359
|
+
function qt({
|
|
1315
1360
|
title: e,
|
|
1316
1361
|
leading: t,
|
|
1317
1362
|
count: r,
|
|
1318
1363
|
trailing: a,
|
|
1319
1364
|
children: c,
|
|
1320
1365
|
defaultOpen: n = !1,
|
|
1321
|
-
style:
|
|
1366
|
+
style: d
|
|
1322
1367
|
}) {
|
|
1323
|
-
const u =
|
|
1324
|
-
return /* @__PURE__ */ g("div", { style:
|
|
1368
|
+
const u = F(), [l, s] = P(n);
|
|
1369
|
+
return /* @__PURE__ */ g("div", { style: d, children: [
|
|
1325
1370
|
/* @__PURE__ */ g(
|
|
1326
1371
|
"div",
|
|
1327
1372
|
{
|
|
@@ -1337,7 +1382,7 @@ function Nt({
|
|
|
1337
1382
|
fontSize: 14
|
|
1338
1383
|
},
|
|
1339
1384
|
children: [
|
|
1340
|
-
/* @__PURE__ */ i(he, { expanded:
|
|
1385
|
+
/* @__PURE__ */ i(he, { expanded: l }),
|
|
1341
1386
|
t,
|
|
1342
1387
|
/* @__PURE__ */ i("span", { style: { fontWeight: 500 }, children: e }),
|
|
1343
1388
|
r != null && /* @__PURE__ */ i("span", { style: { color: u.text.tertiary, fontSize: 12 }, children: r }),
|
|
@@ -1346,61 +1391,63 @@ function Nt({
|
|
|
1346
1391
|
]
|
|
1347
1392
|
}
|
|
1348
1393
|
),
|
|
1349
|
-
|
|
1394
|
+
l && /* @__PURE__ */ i("div", { style: { paddingLeft: 18, paddingBottom: 4 }, children: c })
|
|
1350
1395
|
] });
|
|
1351
1396
|
}
|
|
1352
1397
|
export {
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1398
|
+
dt as BarChart,
|
|
1399
|
+
Rt as Button,
|
|
1400
|
+
Ht as Callout,
|
|
1401
|
+
Tt as Card,
|
|
1402
|
+
Dt as CardBody,
|
|
1403
|
+
Lt as CardHeader,
|
|
1404
|
+
Wt as Checkbox,
|
|
1405
|
+
bt as Code,
|
|
1406
|
+
qt as CollapsibleSection,
|
|
1407
|
+
ft as DiffStats,
|
|
1408
|
+
ht as DiffView,
|
|
1409
|
+
wt as Divider,
|
|
1410
|
+
Bt as Grid,
|
|
1411
|
+
xt as H1,
|
|
1412
|
+
vt as H2,
|
|
1413
|
+
Et as H3,
|
|
1414
|
+
$t as IconButton,
|
|
1415
|
+
st as LineChart,
|
|
1416
|
+
Ct as Link,
|
|
1417
|
+
lt as PieChart,
|
|
1418
|
+
Pt as Pill,
|
|
1419
|
+
St as Row,
|
|
1420
|
+
It as Select,
|
|
1421
|
+
At as Spacer,
|
|
1422
|
+
Ft as Stack,
|
|
1423
|
+
Mt as Stat,
|
|
1424
|
+
Ot as Swatch,
|
|
1425
|
+
zt as Table,
|
|
1426
|
+
kt as Text,
|
|
1427
|
+
Nt as TextArea,
|
|
1428
|
+
jt as TextInput,
|
|
1429
|
+
Je as TodoList,
|
|
1430
|
+
gt as TodoListCard,
|
|
1431
|
+
Gt as Toggle,
|
|
1432
|
+
_t as UsageBar,
|
|
1433
|
+
j as canvasPaletteDark,
|
|
1434
|
+
at as canvasPaletteGrokDark,
|
|
1435
|
+
it as canvasPaletteGrokLight,
|
|
1436
|
+
N as canvasPaletteLight,
|
|
1437
|
+
Ge as canvasTokens,
|
|
1438
|
+
je as canvasTokensLight,
|
|
1439
|
+
O as categoryPaletteDark,
|
|
1393
1440
|
ie as categoryPaletteLight,
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1441
|
+
ct as colorPalette,
|
|
1442
|
+
ut as computeDAGLayout,
|
|
1443
|
+
mt as mergeStyle,
|
|
1444
|
+
de as reshapeLineChartData,
|
|
1445
|
+
ne as usageColorSequence,
|
|
1446
|
+
yt as useCanvasAction,
|
|
1447
|
+
pt as useCanvasState,
|
|
1448
|
+
Xt as useEffect,
|
|
1449
|
+
F as useHostTheme,
|
|
1450
|
+
Yt as useMemo,
|
|
1451
|
+
Vt as useRef,
|
|
1452
|
+
Jt as useState
|
|
1406
1453
|
};
|