@flesler/cursor-canvas-web 1.0.1 → 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/dist/cursor-canvas.cjs +1 -1
- package/dist/cursor-canvas.js +293 -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 +5 -3
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 P, createContext as Me, useCallback as G, useContext as
|
|
4
|
-
import { useEffect as
|
|
5
|
-
import { BarChart as Pe, AreaChart 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,
|
|
@@ -303,34 +323,34 @@ function ot({
|
|
|
303
323
|
h: r,
|
|
304
324
|
data: v,
|
|
305
325
|
dataKey: "category",
|
|
306
|
-
series:
|
|
326
|
+
series: B,
|
|
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
|
|
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,29 +358,29 @@ function at({
|
|
|
338
358
|
horizontal: c,
|
|
339
359
|
stacked: a,
|
|
340
360
|
normalized: n
|
|
341
|
-
}),
|
|
361
|
+
}), w = !a && !n && Xe(l, t, e);
|
|
342
362
|
return /* @__PURE__ */ i(
|
|
343
363
|
Pe,
|
|
344
364
|
{
|
|
345
365
|
h: r,
|
|
346
|
-
data:
|
|
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(
|
|
353
|
-
withBarValueLabel:
|
|
372
|
+
valueFormatter: ue(d, u),
|
|
373
|
+
withBarValueLabel: w,
|
|
354
374
|
...C,
|
|
355
375
|
style: v
|
|
356
376
|
}
|
|
357
377
|
);
|
|
358
378
|
}
|
|
359
|
-
function
|
|
360
|
-
const c = e.map((
|
|
361
|
-
name:
|
|
362
|
-
value:
|
|
363
|
-
color: se(
|
|
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)
|
|
364
384
|
}));
|
|
365
385
|
return /* @__PURE__ */ i(
|
|
366
386
|
"div",
|
|
@@ -374,7 +394,7 @@ function it({ data: e, size: t = 200, donut: r, style: a }) {
|
|
|
374
394
|
justifyContent: "center"
|
|
375
395
|
},
|
|
376
396
|
children: r ? /* @__PURE__ */ i(
|
|
377
|
-
|
|
397
|
+
Re,
|
|
378
398
|
{
|
|
379
399
|
data: c,
|
|
380
400
|
size: t,
|
|
@@ -382,7 +402,7 @@ function it({ data: e, size: t = 200, donut: r, style: a }) {
|
|
|
382
402
|
style: a
|
|
383
403
|
}
|
|
384
404
|
) : /* @__PURE__ */ i(
|
|
385
|
-
|
|
405
|
+
$e,
|
|
386
406
|
{
|
|
387
407
|
data: c,
|
|
388
408
|
size: t,
|
|
@@ -394,71 +414,71 @@ function it({ data: e, size: t = 200, donut: r, style: a }) {
|
|
|
394
414
|
}
|
|
395
415
|
);
|
|
396
416
|
}
|
|
397
|
-
function
|
|
417
|
+
function ut(e) {
|
|
398
418
|
const {
|
|
399
419
|
nodes: t,
|
|
400
420
|
edges: r,
|
|
401
421
|
direction: a = "vertical",
|
|
402
422
|
nodeWidth: c = 160,
|
|
403
423
|
nodeHeight: n = 40,
|
|
404
|
-
rankGap:
|
|
424
|
+
rankGap: d = 64,
|
|
405
425
|
nodeGap: u = 48,
|
|
406
|
-
padding:
|
|
426
|
+
padding: l = 24
|
|
407
427
|
} = e, s = t.map((o) => o.id), f = new Set(s), y = /* @__PURE__ */ new Map();
|
|
408
428
|
for (const o of s) y.set(o, []);
|
|
409
429
|
for (const o of r)
|
|
410
430
|
f.has(o.from) && f.has(o.to) && y.get(o.from).push(o.to);
|
|
411
|
-
const x = 0, v = 1,
|
|
412
|
-
|
|
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);
|
|
413
433
|
for (const h of y.get(o) ?? []) {
|
|
414
|
-
const p =
|
|
415
|
-
p === v ? C.add(
|
|
434
|
+
const p = b.get(h);
|
|
435
|
+
p === v ? C.add(w(o, h)) : p === x && Q(h);
|
|
416
436
|
}
|
|
417
|
-
|
|
437
|
+
b.set(o, B);
|
|
418
438
|
};
|
|
419
|
-
for (const o of s)
|
|
439
|
+
for (const o of s) b.get(o) === x && Q(o);
|
|
420
440
|
const ge = r.filter(
|
|
421
|
-
(o) => f.has(o.from) && f.has(o.to) && !C.has(
|
|
422
|
-
),
|
|
441
|
+
(o) => f.has(o.from) && f.has(o.to) && !C.has(w(o.from, o.to))
|
|
442
|
+
), S = new Map(s.map((o) => [o, 0])), K = new Map(s.map((o) => [o, []]));
|
|
423
443
|
for (const o of ge)
|
|
424
|
-
|
|
425
|
-
const T = new Map(s.map((o) => [o, 0])),
|
|
426
|
-
for (;
|
|
427
|
-
const o =
|
|
428
|
-
for (const p of
|
|
429
|
-
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);
|
|
430
450
|
}
|
|
431
451
|
const A = /* @__PURE__ */ new Map();
|
|
432
452
|
for (const o of s) {
|
|
433
453
|
const h = T.get(o);
|
|
434
454
|
A.has(h) || A.set(h, []), A.get(h).push(o);
|
|
435
455
|
}
|
|
436
|
-
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(
|
|
437
457
|
0,
|
|
438
|
-
...L.map((o) =>
|
|
439
|
-
), D = /* @__PURE__ */ new Map(),
|
|
458
|
+
...L.map((o) => X(A.get(o).length))
|
|
459
|
+
), D = /* @__PURE__ */ new Map(), V = [];
|
|
440
460
|
L.forEach((o, h) => {
|
|
441
|
-
const p = A.get(o),
|
|
442
|
-
p.forEach((
|
|
443
|
-
const
|
|
444
|
-
D.set(
|
|
445
|
-
}),
|
|
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({
|
|
446
466
|
rank: o,
|
|
447
|
-
x: m ?
|
|
448
|
-
y: m ? M :
|
|
449
|
-
width: m ?
|
|
450
|
-
height: m ? n :
|
|
467
|
+
x: m ? R : M,
|
|
468
|
+
y: m ? M : R,
|
|
469
|
+
width: m ? z : c,
|
|
470
|
+
height: m ? n : z,
|
|
451
471
|
nodeIds: p
|
|
452
472
|
});
|
|
453
473
|
});
|
|
454
|
-
const
|
|
474
|
+
const J = (o, h) => o ? m ? {
|
|
455
475
|
x: o.x + c / 2,
|
|
456
476
|
y: h === "source" ? o.y + n : o.y
|
|
457
477
|
} : {
|
|
458
478
|
x: h === "source" ? o.x + c : o.x,
|
|
459
479
|
y: o.y + n / 2
|
|
460
480
|
} : { x: 0, y: 0 }, pe = r.filter((o) => f.has(o.from) && f.has(o.to)).map((o) => {
|
|
461
|
-
const h =
|
|
481
|
+
const h = J(D.get(o.from), "source"), p = J(D.get(o.to), "target");
|
|
462
482
|
return {
|
|
463
483
|
from: o.from,
|
|
464
484
|
to: o.to,
|
|
@@ -466,19 +486,19 @@ function ct(e) {
|
|
|
466
486
|
sourceY: h.y,
|
|
467
487
|
targetX: p.x,
|
|
468
488
|
targetY: p.y,
|
|
469
|
-
isBackEdge: C.has(
|
|
489
|
+
isBackEdge: C.has(w(o.from, o.to))
|
|
470
490
|
};
|
|
471
|
-
}),
|
|
491
|
+
}), U = l * 2 + L.length * (m ? n : c) + Math.max(0, L.length - 1) * d, Z = l * 2 + Y;
|
|
472
492
|
return {
|
|
473
493
|
nodes: [...D.values()],
|
|
474
494
|
edges: pe,
|
|
475
|
-
ranks:
|
|
495
|
+
ranks: V,
|
|
476
496
|
direction: a,
|
|
477
|
-
width: m ?
|
|
478
|
-
height: m ?
|
|
497
|
+
width: m ? Z : U,
|
|
498
|
+
height: m ? U : Z
|
|
479
499
|
};
|
|
480
500
|
}
|
|
481
|
-
function
|
|
501
|
+
function ft({
|
|
482
502
|
additions: e = 0,
|
|
483
503
|
deletions: t = 0,
|
|
484
504
|
style: r
|
|
@@ -495,11 +515,11 @@ function st({
|
|
|
495
515
|
...r
|
|
496
516
|
},
|
|
497
517
|
children: [
|
|
498
|
-
e > 0 && /* @__PURE__ */ g("span", { style: { color:
|
|
518
|
+
e > 0 && /* @__PURE__ */ g("span", { style: { color: k.added }, children: [
|
|
499
519
|
"+",
|
|
500
520
|
e
|
|
501
521
|
] }),
|
|
502
|
-
t > 0 && /* @__PURE__ */ g("span", { style: { color:
|
|
522
|
+
t > 0 && /* @__PURE__ */ g("span", { style: { color: k.deleted }, children: [
|
|
503
523
|
"-",
|
|
504
524
|
t
|
|
505
525
|
] })
|
|
@@ -507,19 +527,19 @@ function st({
|
|
|
507
527
|
}
|
|
508
528
|
);
|
|
509
529
|
}
|
|
510
|
-
const
|
|
530
|
+
const Ye = {
|
|
511
531
|
added: "+",
|
|
512
532
|
removed: "-",
|
|
513
533
|
unchanged: " "
|
|
514
534
|
};
|
|
515
|
-
function
|
|
535
|
+
function ht({
|
|
516
536
|
lines: e,
|
|
517
537
|
showLineNumbers: t = !0,
|
|
518
538
|
coloredLineNumbers: r = !0,
|
|
519
539
|
showAccentStrip: a = !0,
|
|
520
540
|
style: c
|
|
521
541
|
}) {
|
|
522
|
-
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;
|
|
523
543
|
return /* @__PURE__ */ i(
|
|
524
544
|
"div",
|
|
525
545
|
{
|
|
@@ -537,7 +557,7 @@ function lt({
|
|
|
537
557
|
style: {
|
|
538
558
|
display: "flex",
|
|
539
559
|
alignItems: "stretch",
|
|
540
|
-
background:
|
|
560
|
+
background: d(s.type),
|
|
541
561
|
borderLeft: a ? `3px solid ${u(s.type)}` : void 0
|
|
542
562
|
},
|
|
543
563
|
children: [
|
|
@@ -550,7 +570,7 @@ function lt({
|
|
|
550
570
|
textAlign: "right",
|
|
551
571
|
paddingRight: 10,
|
|
552
572
|
userSelect: "none",
|
|
553
|
-
color:
|
|
573
|
+
color: l(s.type)
|
|
554
574
|
},
|
|
555
575
|
children: s.lineNumber ?? ""
|
|
556
576
|
}
|
|
@@ -563,9 +583,9 @@ function lt({
|
|
|
563
583
|
width: 14,
|
|
564
584
|
textAlign: "center",
|
|
565
585
|
userSelect: "none",
|
|
566
|
-
color:
|
|
586
|
+
color: l(s.type)
|
|
567
587
|
},
|
|
568
|
-
children:
|
|
588
|
+
children: Ye[s.type]
|
|
569
589
|
}
|
|
570
590
|
),
|
|
571
591
|
/* @__PURE__ */ i(
|
|
@@ -587,8 +607,8 @@ function lt({
|
|
|
587
607
|
}
|
|
588
608
|
);
|
|
589
609
|
}
|
|
590
|
-
function
|
|
591
|
-
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;
|
|
592
612
|
return /* @__PURE__ */ g(
|
|
593
613
|
"svg",
|
|
594
614
|
{
|
|
@@ -624,15 +644,15 @@ function Xe({ status: e }) {
|
|
|
624
644
|
}
|
|
625
645
|
);
|
|
626
646
|
}
|
|
627
|
-
function
|
|
647
|
+
function Je({
|
|
628
648
|
todos: e,
|
|
629
649
|
dimmedTodoIds: t,
|
|
630
650
|
onTodoClick: r,
|
|
631
651
|
style: a
|
|
632
652
|
}) {
|
|
633
|
-
const c =
|
|
653
|
+
const c = F();
|
|
634
654
|
return e.length === 0 ? null : /* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", ...a }, children: e.map((n) => {
|
|
635
|
-
const
|
|
655
|
+
const d = t == null ? void 0 : t.has(n.id);
|
|
636
656
|
return /* @__PURE__ */ g(
|
|
637
657
|
"button",
|
|
638
658
|
{
|
|
@@ -651,10 +671,10 @@ function Ye({
|
|
|
651
671
|
color: c.text.primary,
|
|
652
672
|
fontSize: 14,
|
|
653
673
|
lineHeight: "20px",
|
|
654
|
-
opacity:
|
|
674
|
+
opacity: d ? 0.45 : 1
|
|
655
675
|
},
|
|
656
676
|
children: [
|
|
657
|
-
/* @__PURE__ */ i(
|
|
677
|
+
/* @__PURE__ */ i(Ve, { status: n.status }),
|
|
658
678
|
/* @__PURE__ */ i(
|
|
659
679
|
"span",
|
|
660
680
|
{
|
|
@@ -671,16 +691,16 @@ function Ye({
|
|
|
671
691
|
);
|
|
672
692
|
}) });
|
|
673
693
|
}
|
|
674
|
-
function
|
|
694
|
+
function gt({
|
|
675
695
|
todos: e,
|
|
676
696
|
dimmedTodoIds: t,
|
|
677
697
|
defaultExpanded: r = !1,
|
|
678
698
|
onTodoClick: a,
|
|
679
699
|
style: c
|
|
680
700
|
}) {
|
|
681
|
-
const n =
|
|
701
|
+
const n = F(), [d, u] = P(r);
|
|
682
702
|
if (e.length === 0) return null;
|
|
683
|
-
const
|
|
703
|
+
const l = e.filter((s) => s.status === "completed").length;
|
|
684
704
|
return /* @__PURE__ */ g(
|
|
685
705
|
"div",
|
|
686
706
|
{
|
|
@@ -718,7 +738,7 @@ function dt({
|
|
|
718
738
|
viewBox: "0 0 12 12",
|
|
719
739
|
fill: "none",
|
|
720
740
|
style: {
|
|
721
|
-
transform:
|
|
741
|
+
transform: d ? "rotate(90deg)" : "none",
|
|
722
742
|
transition: "transform 120ms"
|
|
723
743
|
},
|
|
724
744
|
"aria-hidden": !0,
|
|
@@ -737,7 +757,7 @@ function dt({
|
|
|
737
757
|
/* @__PURE__ */ i("span", { children: "Todos" }),
|
|
738
758
|
/* @__PURE__ */ i("span", { style: { flex: 1 } }),
|
|
739
759
|
/* @__PURE__ */ g("span", { children: [
|
|
740
|
-
|
|
760
|
+
l,
|
|
741
761
|
" of ",
|
|
742
762
|
e.length,
|
|
743
763
|
" Done"
|
|
@@ -745,8 +765,8 @@ function dt({
|
|
|
745
765
|
]
|
|
746
766
|
}
|
|
747
767
|
),
|
|
748
|
-
|
|
749
|
-
|
|
768
|
+
d && /* @__PURE__ */ i("div", { style: { padding: 6 }, children: /* @__PURE__ */ i(
|
|
769
|
+
Je,
|
|
750
770
|
{
|
|
751
771
|
todos: e,
|
|
752
772
|
dimmedTodoIds: t,
|
|
@@ -757,77 +777,77 @@ function dt({
|
|
|
757
777
|
}
|
|
758
778
|
);
|
|
759
779
|
}
|
|
760
|
-
function
|
|
780
|
+
function pt(e, t) {
|
|
761
781
|
const r = `canvas:${e}`, [a, c] = P(() => {
|
|
762
782
|
if (typeof localStorage > "u") return t;
|
|
763
783
|
try {
|
|
764
|
-
const
|
|
765
|
-
return
|
|
784
|
+
const d = localStorage.getItem(r);
|
|
785
|
+
return d === null ? t : JSON.parse(d);
|
|
766
786
|
} catch {
|
|
767
787
|
return t;
|
|
768
788
|
}
|
|
769
789
|
}), n = G(
|
|
770
|
-
(
|
|
790
|
+
(d) => {
|
|
771
791
|
c((u) => {
|
|
772
|
-
const
|
|
792
|
+
const l = typeof d == "function" ? d(u) : d;
|
|
773
793
|
try {
|
|
774
|
-
localStorage == null || localStorage.setItem(r, JSON.stringify(
|
|
794
|
+
localStorage == null || localStorage.setItem(r, JSON.stringify(l));
|
|
775
795
|
} catch {
|
|
776
796
|
}
|
|
777
|
-
return
|
|
797
|
+
return l;
|
|
778
798
|
});
|
|
779
799
|
},
|
|
780
800
|
[r]
|
|
781
801
|
);
|
|
782
802
|
return [a, n];
|
|
783
803
|
}
|
|
784
|
-
function
|
|
804
|
+
function yt() {
|
|
785
805
|
return G((e) => {
|
|
786
806
|
}, []);
|
|
787
807
|
}
|
|
788
|
-
function
|
|
808
|
+
function mt(e, t) {
|
|
789
809
|
return { ...e, ...t };
|
|
790
810
|
}
|
|
791
|
-
function
|
|
811
|
+
function xt({ children: e, style: t }) {
|
|
792
812
|
return /* @__PURE__ */ i(W, { order: 1, fz: 24, lh: "30px", style: t, children: e });
|
|
793
813
|
}
|
|
794
|
-
function
|
|
814
|
+
function vt({ children: e, style: t }) {
|
|
795
815
|
return /* @__PURE__ */ i(W, { order: 2, fz: 18, lh: "24px", style: t, children: e });
|
|
796
816
|
}
|
|
797
|
-
function
|
|
817
|
+
function Et({ children: e, style: t }) {
|
|
798
818
|
return /* @__PURE__ */ i(W, { order: 3, fz: 16, lh: "22px", style: t, children: e });
|
|
799
819
|
}
|
|
800
|
-
const
|
|
820
|
+
const Ue = {
|
|
801
821
|
normal: 400,
|
|
802
822
|
medium: 500,
|
|
803
823
|
semibold: 600,
|
|
804
824
|
bold: 700
|
|
805
825
|
};
|
|
806
|
-
function
|
|
826
|
+
function kt({
|
|
807
827
|
children: e,
|
|
808
828
|
tone: t = "primary",
|
|
809
829
|
size: r = "body",
|
|
810
830
|
as: a = "p",
|
|
811
831
|
weight: c = "normal",
|
|
812
832
|
italic: n,
|
|
813
|
-
truncate:
|
|
833
|
+
truncate: d,
|
|
814
834
|
style: u
|
|
815
835
|
}) {
|
|
816
|
-
const
|
|
836
|
+
const l = F();
|
|
817
837
|
return /* @__PURE__ */ i(
|
|
818
|
-
|
|
838
|
+
$,
|
|
819
839
|
{
|
|
820
840
|
component: a,
|
|
821
841
|
size: r === "small" ? "xs" : "sm",
|
|
822
|
-
fw:
|
|
823
|
-
c: t === "primary" ? void 0 :
|
|
824
|
-
truncate:
|
|
842
|
+
fw: Ue[c],
|
|
843
|
+
c: t === "primary" ? void 0 : l.text[t],
|
|
844
|
+
truncate: d,
|
|
825
845
|
style: { fontStyle: n ? "italic" : void 0, ...u },
|
|
826
846
|
children: e
|
|
827
847
|
}
|
|
828
848
|
);
|
|
829
849
|
}
|
|
830
|
-
function
|
|
850
|
+
function bt({ children: e, style: t }) {
|
|
831
851
|
return /* @__PURE__ */ i(
|
|
832
852
|
"code",
|
|
833
853
|
{
|
|
@@ -843,7 +863,7 @@ function xt({ children: e, style: t }) {
|
|
|
843
863
|
}
|
|
844
864
|
);
|
|
845
865
|
}
|
|
846
|
-
function
|
|
866
|
+
function Ct({ children: e, href: t, style: r }) {
|
|
847
867
|
return /* @__PURE__ */ i(
|
|
848
868
|
"a",
|
|
849
869
|
{
|
|
@@ -855,17 +875,17 @@ function vt({ children: e, href: t, style: r }) {
|
|
|
855
875
|
}
|
|
856
876
|
);
|
|
857
877
|
}
|
|
858
|
-
function
|
|
859
|
-
return /* @__PURE__ */ i(
|
|
878
|
+
function Ft({ children: e, gap: t, style: r }) {
|
|
879
|
+
return /* @__PURE__ */ i(we, { gap: t, style: r, children: e });
|
|
860
880
|
}
|
|
861
|
-
const
|
|
881
|
+
const oe = {
|
|
862
882
|
start: "flex-start",
|
|
863
883
|
center: "center",
|
|
864
884
|
end: "flex-end",
|
|
865
885
|
stretch: "stretch",
|
|
866
886
|
"space-between": "space-between"
|
|
867
887
|
};
|
|
868
|
-
function
|
|
888
|
+
function St({
|
|
869
889
|
children: e,
|
|
870
890
|
gap: t,
|
|
871
891
|
align: r = "center",
|
|
@@ -877,18 +897,18 @@ function bt({
|
|
|
877
897
|
Ae,
|
|
878
898
|
{
|
|
879
899
|
gap: t,
|
|
880
|
-
align:
|
|
881
|
-
justify:
|
|
900
|
+
align: oe[r],
|
|
901
|
+
justify: oe[a],
|
|
882
902
|
wrap: c ? "wrap" : "nowrap",
|
|
883
903
|
style: n,
|
|
884
904
|
children: e
|
|
885
905
|
}
|
|
886
906
|
);
|
|
887
907
|
}
|
|
888
|
-
function
|
|
908
|
+
function At() {
|
|
889
909
|
return /* @__PURE__ */ i("div", { style: { flex: 1 } });
|
|
890
910
|
}
|
|
891
|
-
function
|
|
911
|
+
function Bt({ children: e, columns: t, gap: r = 16, align: a, style: c }) {
|
|
892
912
|
const n = typeof t == "number" ? `repeat(${t}, minmax(0, 1fr))` : t;
|
|
893
913
|
return /* @__PURE__ */ i(
|
|
894
914
|
"div",
|
|
@@ -904,41 +924,41 @@ function Ct({ children: e, columns: t, gap: r = 16, align: a, style: c }) {
|
|
|
904
924
|
}
|
|
905
925
|
);
|
|
906
926
|
}
|
|
907
|
-
function
|
|
927
|
+
function wt({ style: e }) {
|
|
908
928
|
return /* @__PURE__ */ i(Ce, { style: e });
|
|
909
929
|
}
|
|
910
|
-
const
|
|
930
|
+
const q = Me({
|
|
911
931
|
collapsible: !1,
|
|
912
932
|
open: !0,
|
|
913
933
|
toggle: () => {
|
|
914
934
|
}
|
|
915
935
|
});
|
|
916
|
-
function
|
|
936
|
+
function Tt({
|
|
917
937
|
children: e,
|
|
918
938
|
variant: t = "default",
|
|
919
939
|
collapsible: r = !1,
|
|
920
940
|
defaultOpen: a = !0,
|
|
921
941
|
open: c,
|
|
922
942
|
onOpenChange: n,
|
|
923
|
-
style:
|
|
943
|
+
style: d
|
|
924
944
|
}) {
|
|
925
|
-
const [u,
|
|
945
|
+
const [u, l] = P(a), s = c ?? u, f = G(() => {
|
|
926
946
|
const y = !s;
|
|
927
|
-
c === void 0 &&
|
|
947
|
+
c === void 0 && l(y), n == null || n(y);
|
|
928
948
|
}, [s, c, n]);
|
|
929
949
|
return /* @__PURE__ */ i(
|
|
930
|
-
|
|
950
|
+
ke,
|
|
931
951
|
{
|
|
932
952
|
withBorder: t !== "borderless",
|
|
933
953
|
radius: "md",
|
|
934
954
|
padding: 0,
|
|
935
|
-
style:
|
|
936
|
-
children: /* @__PURE__ */ i(
|
|
955
|
+
style: d,
|
|
956
|
+
children: /* @__PURE__ */ i(q.Provider, { value: { collapsible: r, open: s, toggle: f }, children: e })
|
|
937
957
|
}
|
|
938
958
|
);
|
|
939
959
|
}
|
|
940
|
-
function
|
|
941
|
-
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);
|
|
942
962
|
return /* @__PURE__ */ g(
|
|
943
963
|
"div",
|
|
944
964
|
{
|
|
@@ -967,8 +987,8 @@ function At({ children: e, trailing: t, style: r }) {
|
|
|
967
987
|
}
|
|
968
988
|
);
|
|
969
989
|
}
|
|
970
|
-
function
|
|
971
|
-
const { collapsible: r, open: a } =
|
|
990
|
+
function Dt({ children: e, style: t }) {
|
|
991
|
+
const { collapsible: r, open: a } = ae(q);
|
|
972
992
|
return r && !a ? null : /* @__PURE__ */ i("div", { style: { padding: 14, ...t }, children: e });
|
|
973
993
|
}
|
|
974
994
|
function he({ expanded: e }) {
|
|
@@ -997,44 +1017,44 @@ function he({ expanded: e }) {
|
|
|
997
1017
|
}
|
|
998
1018
|
);
|
|
999
1019
|
}
|
|
1000
|
-
function
|
|
1020
|
+
function Mt({ value: e, label: t, tone: r, style: a }) {
|
|
1001
1021
|
return /* @__PURE__ */ g("div", { style: a, children: [
|
|
1002
1022
|
/* @__PURE__ */ i(
|
|
1003
|
-
|
|
1023
|
+
$,
|
|
1004
1024
|
{
|
|
1005
1025
|
fz: 22,
|
|
1006
1026
|
fw: 700,
|
|
1007
1027
|
lh: 1.2,
|
|
1008
|
-
c: r ? `${
|
|
1028
|
+
c: r ? `${_[r]}.6` : void 0,
|
|
1009
1029
|
children: e
|
|
1010
1030
|
}
|
|
1011
1031
|
),
|
|
1012
|
-
/* @__PURE__ */ i(
|
|
1032
|
+
/* @__PURE__ */ i($, { fz: 12, c: "dimmed", children: t })
|
|
1013
1033
|
] });
|
|
1014
1034
|
}
|
|
1015
|
-
function
|
|
1035
|
+
function Pt({
|
|
1016
1036
|
children: e,
|
|
1017
1037
|
active: t,
|
|
1018
1038
|
tone: r = "neutral",
|
|
1019
1039
|
size: a = "md",
|
|
1020
1040
|
leadingContent: c,
|
|
1021
1041
|
keyboardHint: n,
|
|
1022
|
-
title:
|
|
1042
|
+
title: d,
|
|
1023
1043
|
style: u,
|
|
1024
|
-
onClick:
|
|
1044
|
+
onClick: l
|
|
1025
1045
|
}) {
|
|
1026
1046
|
return /* @__PURE__ */ i(
|
|
1027
|
-
|
|
1047
|
+
Se,
|
|
1028
1048
|
{
|
|
1029
|
-
color:
|
|
1049
|
+
color: _[r],
|
|
1030
1050
|
variant: t ? "filled" : "light",
|
|
1031
1051
|
size: a === "sm" ? "sm" : "md",
|
|
1032
1052
|
leftSection: c,
|
|
1033
1053
|
rightSection: n,
|
|
1034
|
-
title:
|
|
1035
|
-
onClick:
|
|
1054
|
+
title: d,
|
|
1055
|
+
onClick: l,
|
|
1036
1056
|
style: {
|
|
1037
|
-
cursor:
|
|
1057
|
+
cursor: l ? "pointer" : void 0,
|
|
1038
1058
|
textTransform: "none",
|
|
1039
1059
|
...u
|
|
1040
1060
|
},
|
|
@@ -1042,7 +1062,7 @@ function Tt({
|
|
|
1042
1062
|
}
|
|
1043
1063
|
);
|
|
1044
1064
|
}
|
|
1045
|
-
function
|
|
1065
|
+
function Ht({
|
|
1046
1066
|
children: e,
|
|
1047
1067
|
tone: t = "neutral",
|
|
1048
1068
|
title: r,
|
|
@@ -1052,7 +1072,7 @@ function Lt({
|
|
|
1052
1072
|
return /* @__PURE__ */ i(
|
|
1053
1073
|
Ee,
|
|
1054
1074
|
{
|
|
1055
|
-
color:
|
|
1075
|
+
color: _[t],
|
|
1056
1076
|
title: r,
|
|
1057
1077
|
icon: a,
|
|
1058
1078
|
variant: "light",
|
|
@@ -1061,23 +1081,23 @@ function Lt({
|
|
|
1061
1081
|
}
|
|
1062
1082
|
);
|
|
1063
1083
|
}
|
|
1064
|
-
const
|
|
1084
|
+
const Ze = {
|
|
1065
1085
|
success: "rgba(31,138,101,0.12)",
|
|
1066
1086
|
danger: "rgba(207,45,86,0.12)",
|
|
1067
1087
|
warning: "rgba(232,163,61,0.14)",
|
|
1068
1088
|
info: "rgba(46,121,181,0.12)",
|
|
1069
1089
|
neutral: "rgba(136,136,168,0.12)"
|
|
1070
1090
|
};
|
|
1071
|
-
function
|
|
1091
|
+
function zt({
|
|
1072
1092
|
headers: e,
|
|
1073
1093
|
rows: t,
|
|
1074
1094
|
columnAlign: r,
|
|
1075
1095
|
rowTone: a,
|
|
1076
1096
|
framed: c = !0,
|
|
1077
1097
|
striped: n,
|
|
1078
|
-
stickyHeader:
|
|
1098
|
+
stickyHeader: d,
|
|
1079
1099
|
style: u,
|
|
1080
|
-
emptyMessage:
|
|
1100
|
+
emptyMessage: l
|
|
1081
1101
|
}) {
|
|
1082
1102
|
return /* @__PURE__ */ g(
|
|
1083
1103
|
E,
|
|
@@ -1085,17 +1105,17 @@ function Dt({
|
|
|
1085
1105
|
withTableBorder: c,
|
|
1086
1106
|
withColumnBorders: !1,
|
|
1087
1107
|
striped: n,
|
|
1088
|
-
stickyHeader:
|
|
1108
|
+
stickyHeader: d,
|
|
1089
1109
|
highlightOnHover: !0,
|
|
1090
1110
|
style: u,
|
|
1091
1111
|
children: [
|
|
1092
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)) }) }),
|
|
1093
|
-
/* @__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) => {
|
|
1094
1114
|
const y = a == null ? void 0 : a[f];
|
|
1095
1115
|
return /* @__PURE__ */ i(
|
|
1096
1116
|
E.Tr,
|
|
1097
1117
|
{
|
|
1098
|
-
style: y ? { background:
|
|
1118
|
+
style: y ? { background: Ze[y] } : void 0,
|
|
1099
1119
|
children: e.map((x, v) => /* @__PURE__ */ i(
|
|
1100
1120
|
E.Td,
|
|
1101
1121
|
{
|
|
@@ -1112,12 +1132,12 @@ function Dt({
|
|
|
1112
1132
|
}
|
|
1113
1133
|
);
|
|
1114
1134
|
}
|
|
1115
|
-
const
|
|
1135
|
+
const et = {
|
|
1116
1136
|
primary: "filled",
|
|
1117
1137
|
secondary: "default",
|
|
1118
1138
|
ghost: "subtle"
|
|
1119
1139
|
};
|
|
1120
|
-
function
|
|
1140
|
+
function Rt({
|
|
1121
1141
|
children: e,
|
|
1122
1142
|
variant: t = "secondary",
|
|
1123
1143
|
disabled: r,
|
|
@@ -1128,7 +1148,7 @@ function Mt({
|
|
|
1128
1148
|
return /* @__PURE__ */ i(
|
|
1129
1149
|
ve,
|
|
1130
1150
|
{
|
|
1131
|
-
variant:
|
|
1151
|
+
variant: et[t],
|
|
1132
1152
|
size: "xs",
|
|
1133
1153
|
disabled: r,
|
|
1134
1154
|
type: a,
|
|
@@ -1138,17 +1158,17 @@ function Mt({
|
|
|
1138
1158
|
}
|
|
1139
1159
|
);
|
|
1140
1160
|
}
|
|
1141
|
-
function
|
|
1161
|
+
function $t({
|
|
1142
1162
|
children: e,
|
|
1143
1163
|
onClick: t,
|
|
1144
1164
|
disabled: r,
|
|
1145
1165
|
title: a,
|
|
1146
1166
|
variant: c = "default",
|
|
1147
1167
|
size: n = "md",
|
|
1148
|
-
style:
|
|
1168
|
+
style: d
|
|
1149
1169
|
}) {
|
|
1150
1170
|
return /* @__PURE__ */ i(
|
|
1151
|
-
|
|
1171
|
+
Fe,
|
|
1152
1172
|
{
|
|
1153
1173
|
variant: c === "circle" ? "light" : "subtle",
|
|
1154
1174
|
radius: c === "circle" ? "xl" : "sm",
|
|
@@ -1158,12 +1178,12 @@ function Pt({
|
|
|
1158
1178
|
title: a,
|
|
1159
1179
|
"aria-label": a,
|
|
1160
1180
|
onClick: t,
|
|
1161
|
-
style:
|
|
1181
|
+
style: d,
|
|
1162
1182
|
children: e
|
|
1163
1183
|
}
|
|
1164
1184
|
);
|
|
1165
1185
|
}
|
|
1166
|
-
function
|
|
1186
|
+
function It({
|
|
1167
1187
|
value: e,
|
|
1168
1188
|
onChange: t,
|
|
1169
1189
|
options: r,
|
|
@@ -1172,21 +1192,21 @@ function zt({
|
|
|
1172
1192
|
style: n
|
|
1173
1193
|
}) {
|
|
1174
1194
|
return /* @__PURE__ */ i(
|
|
1175
|
-
|
|
1195
|
+
Be,
|
|
1176
1196
|
{
|
|
1177
1197
|
value: e,
|
|
1178
1198
|
data: r,
|
|
1179
1199
|
placeholder: a,
|
|
1180
1200
|
disabled: c,
|
|
1181
1201
|
allowDeselect: !1,
|
|
1182
|
-
onChange: (
|
|
1183
|
-
|
|
1202
|
+
onChange: (d) => {
|
|
1203
|
+
d !== null && (t == null || t(d));
|
|
1184
1204
|
},
|
|
1185
1205
|
style: n
|
|
1186
1206
|
}
|
|
1187
1207
|
);
|
|
1188
1208
|
}
|
|
1189
|
-
function
|
|
1209
|
+
function Wt({
|
|
1190
1210
|
checked: e,
|
|
1191
1211
|
onChange: t,
|
|
1192
1212
|
disabled: r,
|
|
@@ -1194,7 +1214,7 @@ function Rt({
|
|
|
1194
1214
|
style: c
|
|
1195
1215
|
}) {
|
|
1196
1216
|
return /* @__PURE__ */ i(
|
|
1197
|
-
|
|
1217
|
+
be,
|
|
1198
1218
|
{
|
|
1199
1219
|
checked: e,
|
|
1200
1220
|
disabled: r,
|
|
@@ -1204,7 +1224,7 @@ function Rt({
|
|
|
1204
1224
|
}
|
|
1205
1225
|
);
|
|
1206
1226
|
}
|
|
1207
|
-
function
|
|
1227
|
+
function Gt({
|
|
1208
1228
|
checked: e,
|
|
1209
1229
|
onChange: t,
|
|
1210
1230
|
disabled: r,
|
|
@@ -1222,7 +1242,7 @@ function $t({
|
|
|
1222
1242
|
}
|
|
1223
1243
|
);
|
|
1224
1244
|
}
|
|
1225
|
-
function
|
|
1245
|
+
function jt({
|
|
1226
1246
|
value: e,
|
|
1227
1247
|
onChange: t,
|
|
1228
1248
|
placeholder: r,
|
|
@@ -1237,12 +1257,12 @@ function Ht({
|
|
|
1237
1257
|
placeholder: r,
|
|
1238
1258
|
disabled: a,
|
|
1239
1259
|
type: c,
|
|
1240
|
-
onChange: (
|
|
1260
|
+
onChange: (d) => t == null ? void 0 : t(d.currentTarget.value),
|
|
1241
1261
|
style: n
|
|
1242
1262
|
}
|
|
1243
1263
|
);
|
|
1244
1264
|
}
|
|
1245
|
-
function
|
|
1265
|
+
function Nt({
|
|
1246
1266
|
value: e,
|
|
1247
1267
|
onChange: t,
|
|
1248
1268
|
placeholder: r,
|
|
@@ -1258,13 +1278,13 @@ function It({
|
|
|
1258
1278
|
disabled: a,
|
|
1259
1279
|
autosize: !0,
|
|
1260
1280
|
minRows: c,
|
|
1261
|
-
onChange: (
|
|
1281
|
+
onChange: (d) => t == null ? void 0 : t(d.currentTarget.value),
|
|
1262
1282
|
style: n
|
|
1263
1283
|
}
|
|
1264
1284
|
);
|
|
1265
1285
|
}
|
|
1266
|
-
function
|
|
1267
|
-
const r =
|
|
1286
|
+
function Ot({ color: e, style: t }) {
|
|
1287
|
+
const r = F();
|
|
1268
1288
|
return /* @__PURE__ */ i(
|
|
1269
1289
|
"span",
|
|
1270
1290
|
{
|
|
@@ -1280,17 +1300,17 @@ function Wt({ color: e, style: t }) {
|
|
|
1280
1300
|
}
|
|
1281
1301
|
);
|
|
1282
1302
|
}
|
|
1283
|
-
function
|
|
1303
|
+
function _t({
|
|
1284
1304
|
segments: e,
|
|
1285
1305
|
total: t,
|
|
1286
1306
|
topLeftLabel: r,
|
|
1287
1307
|
topRightLabel: a,
|
|
1288
1308
|
style: c
|
|
1289
1309
|
}) {
|
|
1290
|
-
const n =
|
|
1310
|
+
const n = F(), d = t > 0 ? t : 1, u = e.reduce(
|
|
1291
1311
|
(s, f) => s + (Number.isFinite(f.value) && f.value > 0 ? f.value : 0),
|
|
1292
1312
|
0
|
|
1293
|
-
),
|
|
1313
|
+
), l = Math.max(0, d - u);
|
|
1294
1314
|
return /* @__PURE__ */ g("div", { style: c, children: [
|
|
1295
1315
|
(r != null || a != null) && /* @__PURE__ */ g(
|
|
1296
1316
|
"div",
|
|
@@ -1310,12 +1330,12 @@ function Gt({
|
|
|
1310
1330
|
),
|
|
1311
1331
|
/* @__PURE__ */ g("div", { style: { display: "flex", gap: 2, height: 8 }, children: [
|
|
1312
1332
|
e.map((s, f) => {
|
|
1313
|
-
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]];
|
|
1314
1334
|
return /* @__PURE__ */ i(
|
|
1315
1335
|
"div",
|
|
1316
1336
|
{
|
|
1317
1337
|
style: {
|
|
1318
|
-
width: `${y /
|
|
1338
|
+
width: `${y / d * 100}%`,
|
|
1319
1339
|
background: x,
|
|
1320
1340
|
borderRadius: 3
|
|
1321
1341
|
}
|
|
@@ -1323,11 +1343,11 @@ function Gt({
|
|
|
1323
1343
|
s.id
|
|
1324
1344
|
);
|
|
1325
1345
|
}),
|
|
1326
|
-
|
|
1346
|
+
l > 0 && /* @__PURE__ */ i(
|
|
1327
1347
|
"div",
|
|
1328
1348
|
{
|
|
1329
1349
|
style: {
|
|
1330
|
-
width: `${
|
|
1350
|
+
width: `${l / d * 100}%`,
|
|
1331
1351
|
background: n.fill.tertiary,
|
|
1332
1352
|
borderRadius: 3
|
|
1333
1353
|
}
|
|
@@ -1336,17 +1356,17 @@ function Gt({
|
|
|
1336
1356
|
] })
|
|
1337
1357
|
] });
|
|
1338
1358
|
}
|
|
1339
|
-
function
|
|
1359
|
+
function qt({
|
|
1340
1360
|
title: e,
|
|
1341
1361
|
leading: t,
|
|
1342
1362
|
count: r,
|
|
1343
1363
|
trailing: a,
|
|
1344
1364
|
children: c,
|
|
1345
1365
|
defaultOpen: n = !1,
|
|
1346
|
-
style:
|
|
1366
|
+
style: d
|
|
1347
1367
|
}) {
|
|
1348
|
-
const u =
|
|
1349
|
-
return /* @__PURE__ */ g("div", { style:
|
|
1368
|
+
const u = F(), [l, s] = P(n);
|
|
1369
|
+
return /* @__PURE__ */ g("div", { style: d, children: [
|
|
1350
1370
|
/* @__PURE__ */ g(
|
|
1351
1371
|
"div",
|
|
1352
1372
|
{
|
|
@@ -1362,7 +1382,7 @@ function jt({
|
|
|
1362
1382
|
fontSize: 14
|
|
1363
1383
|
},
|
|
1364
1384
|
children: [
|
|
1365
|
-
/* @__PURE__ */ i(he, { expanded:
|
|
1385
|
+
/* @__PURE__ */ i(he, { expanded: l }),
|
|
1366
1386
|
t,
|
|
1367
1387
|
/* @__PURE__ */ i("span", { style: { fontWeight: 500 }, children: e }),
|
|
1368
1388
|
r != null && /* @__PURE__ */ i("span", { style: { color: u.text.tertiary, fontSize: 12 }, children: r }),
|
|
@@ -1371,61 +1391,63 @@ function jt({
|
|
|
1371
1391
|
]
|
|
1372
1392
|
}
|
|
1373
1393
|
),
|
|
1374
|
-
|
|
1394
|
+
l && /* @__PURE__ */ i("div", { style: { paddingLeft: 18, paddingBottom: 4 }, children: c })
|
|
1375
1395
|
] });
|
|
1376
1396
|
}
|
|
1377
1397
|
export {
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
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,
|
|
1418
1440
|
ie as categoryPaletteLight,
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
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
|
|
1431
1453
|
};
|