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