@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.
Files changed (33) hide show
  1. package/README.md +9 -8
  2. package/dist/cursor-canvas.cjs +1 -1
  3. package/dist/cursor-canvas.js +702 -746
  4. package/dist/host-tokens-Cjzmp0z_.cjs +1 -0
  5. package/dist/host-tokens-Dh2BFFjv.js +412 -0
  6. package/dist/runtime/index.d.ts +5 -7
  7. package/dist/runtime.cjs +5 -1
  8. package/dist/runtime.js +109 -14
  9. package/package.json +22 -13
  10. package/src/vendor/canvas/SKILL.md +113 -0
  11. package/src/vendor/canvas-sdk/callout-tone-icons.d.ts +10 -0
  12. package/src/vendor/canvas-sdk/canvas-tokens.d.ts +259 -0
  13. package/src/vendor/canvas-sdk/chart-primitives.d.ts +272 -0
  14. package/src/vendor/canvas-sdk/collapsible-section.d.ts +66 -0
  15. package/src/vendor/canvas-sdk/dag-layout.d.ts +101 -0
  16. package/src/vendor/canvas-sdk/diff-view.d.ts +129 -0
  17. package/src/vendor/canvas-sdk/form-primitives.d.ts +194 -0
  18. package/src/vendor/canvas-sdk/hooks.d.ts +173 -0
  19. package/src/vendor/canvas-sdk/index.d.ts +65 -0
  20. package/src/vendor/canvas-sdk/internal/canvas-action-dispatch.d.ts +17 -0
  21. package/src/vendor/canvas-sdk/manifest.json +5 -0
  22. package/src/vendor/canvas-sdk/swatch.d.ts +39 -0
  23. package/src/vendor/canvas-sdk/theme.d.ts +107 -0
  24. package/src/vendor/canvas-sdk/todo-list.d.ts +48 -0
  25. package/src/vendor/canvas-sdk/ui-primitives.d.ts +569 -0
  26. package/src/vendor/canvas-sdk/usage-bar.d.ts +55 -0
  27. package/dist/shim/charts.d.ts +0 -66
  28. package/dist/shim/cursor-canvas.d.ts +0 -278
  29. package/dist/shim/dag.d.ts +0 -55
  30. package/dist/shim/diff.d.ts +0 -23
  31. package/dist/shim/theme.d.ts +0 -323
  32. package/dist/shim/todo.d.ts +0 -22
  33. package/dist/shim/use-tokens.d.ts +0 -6
@@ -1,223 +1,11 @@
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 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
- foreground: "#E4E4E4EB",
8
- foregroundSecondary: "#E4E4E48D",
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 Qe(e) {
240
- const t = e === "dark" ? Ge : je;
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
- function F() {
256
- const e = xe("light");
257
- return Qe(e === "dark" ? "dark" : "light");
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 se(e, t) {
260
- return e ? k[e] : I[t % I.length];
41
+ function ce() {
42
+ const t = g().text.primary;
43
+ return { textColor: t, barLabelColor: t };
261
44
  }
262
- function de(e, t) {
263
- return e.map((r, a) => {
264
- const c = { category: r };
265
- for (const n of t)
266
- c[n.name] = n.data[a] ?? 0;
267
- return c;
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 le(e) {
271
- return e.map((t, r) => ({
272
- name: t.name,
273
- color: se(t.tone, r)
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
- if (!(!e && !t))
278
- return (r) => `${t ?? ""}${r}${e ?? ""}`;
60
+ return (r) => `${t ?? ""}${r}${e ?? ""}`;
279
61
  }
280
- function Ke(e, t) {
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 = Ke(e.referenceLines, !!e.horizontal);
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, a = [
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: a }, referenceLines: t } : { yAxisProps: { domain: a }, referenceLines: t };
78
+ return e.horizontal ? { xAxisProps: { domain: n }, referenceLines: t } : { yAxisProps: { domain: n }, referenceLines: t };
297
79
  }
298
- function Xe(e, t, r) {
80
+ function _e(e, t, r) {
299
81
  return e !== void 0 ? e : t.length === 1 && r.length <= 8;
300
82
  }
301
- function st({
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: a,
306
- valueSuffix: c,
307
- valuePrefix: n,
308
- showValues: d,
309
- showHoverGuide: u = !0,
310
- beginAtZero: l,
311
- yMin: s,
312
- yMax: f,
313
- referenceLines: y,
314
- style: x
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 v = de(e, t), B = le(t), b = fe({
317
- beginAtZero: l,
318
- yMin: s,
319
- yMax: f,
320
- referenceLines: y,
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
- }), C = {
152
+ }), L = {
323
153
  h: r,
324
- data: v,
154
+ data: T,
325
155
  dataKey: "category",
326
- series: B,
327
- curveType: "monotone",
156
+ series: P,
157
+ curveType: h ? "monotone" : "linear",
328
158
  withLegend: t.length > 1,
329
- valueFormatter: ue(c, n),
330
- withPointLabels: d ?? e.length <= 20,
331
- tooltipProps: u ? void 0 : { cursor: !1 },
332
- ...b,
333
- style: x
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 a ? /* @__PURE__ */ i(He, { ...C }) : /* @__PURE__ */ i(ze, { ...C });
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: a,
342
- horizontal: c,
343
- normalized: n,
344
- valueSuffix: d,
345
- valuePrefix: u,
346
- showValues: l,
347
- beginAtZero: s,
348
- yMin: f,
349
- yMax: y,
350
- referenceLines: x,
351
- style: v
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 B = de(e, t), b = n ? "percent" : a ? "stacked" : "default", C = fe({
354
- beginAtZero: s,
355
- yMin: f,
356
- yMax: y,
357
- referenceLines: x,
358
- horizontal: c,
359
- stacked: a,
360
- normalized: n
361
- }), w = !a && !n && Xe(l, t, e);
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
- Pe,
199
+ Ee,
364
200
  {
365
201
  h: r,
366
- data: B,
202
+ data: T,
367
203
  dataKey: "category",
368
- series: le(t),
369
- type: b,
370
- orientation: c ? "vertical" : "horizontal",
204
+ series: de(t, C),
205
+ type: P,
206
+ orientation: a ? "vertical" : "horizontal",
371
207
  withLegend: t.length > 1,
372
- valueFormatter: ue(d, u),
373
- withBarValueLabel: w,
374
- ...C,
375
- style: v
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
- 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)
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
- return /* @__PURE__ */ i(
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
- justifyContent: "center"
288
+ ...n
395
289
  },
396
- children: r ? /* @__PURE__ */ i(
397
- Re,
398
- {
399
- data: c,
400
- size: t,
401
- withTooltip: !0,
402
- style: a
403
- }
404
- ) : /* @__PURE__ */ i(
405
- $e,
406
- {
407
- data: c,
408
- size: t,
409
- withTooltip: !0,
410
- withLabelsLine: !1,
411
- style: a
412
- }
413
- )
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 ut(e) {
331
+ function ft(e) {
418
332
  const {
419
333
  nodes: t,
420
334
  edges: r,
421
- direction: a = "vertical",
422
- nodeWidth: c = 160,
423
- nodeHeight: n = 40,
424
- rankGap: d = 64,
425
- nodeGap: u = 48,
426
- padding: l = 24
427
- } = e, s = t.map((o) => o.id), f = new Set(s), y = /* @__PURE__ */ new Map();
428
- for (const o of s) y.set(o, []);
429
- for (const o of r)
430
- f.has(o.from) && f.has(o.to) && y.get(o.from).push(o.to);
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);
433
- for (const h of y.get(o) ?? []) {
434
- const p = b.get(h);
435
- p === v ? C.add(w(o, h)) : p === x && Q(h);
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
- b.set(o, B);
351
+ S.set(s, C);
438
352
  };
439
- for (const o of s) b.get(o) === x && Q(o);
440
- const ge = r.filter(
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, []]));
443
- for (const o of ge)
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);
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 A = /* @__PURE__ */ new Map();
452
- for (const o of s) {
453
- const h = T.get(o);
454
- A.has(h) || A.set(h, []), A.get(h).push(o);
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 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(
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
- ...L.map((o) => X(A.get(o).length))
459
- ), D = /* @__PURE__ */ new Map(), V = [];
460
- L.forEach((o, h) => {
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({
466
- rank: o,
467
- x: m ? R : M,
468
- y: m ? M : R,
469
- width: m ? z : c,
470
- height: m ? n : z,
471
- nodeIds: p
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 J = (o, h) => o ? m ? {
475
- x: o.x + c / 2,
476
- y: h === "source" ? o.y + n : o.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: h === "source" ? o.x + c : o.x,
479
- y: o.y + n / 2
480
- } : { x: 0, y: 0 }, pe = r.filter((o) => f.has(o.from) && f.has(o.to)).map((o) => {
481
- const h = J(D.get(o.from), "source"), p = J(D.get(o.to), "target");
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: o.from,
484
- to: o.to,
485
- sourceX: h.x,
486
- sourceY: h.y,
487
- targetX: p.x,
488
- targetY: p.y,
489
- isBackEdge: C.has(w(o.from, o.to))
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
- }), U = l * 2 + L.length * (m ? n : c) + Math.max(0, L.length - 1) * d, Z = l * 2 + Y;
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: V,
496
- direction: a,
497
- width: m ? Z : U,
498
- height: m ? U : Z
409
+ ranks: q,
410
+ direction: n,
411
+ width: b ? J : Z,
412
+ height: b ? Z : J
499
413
  };
500
414
  }
501
- function ft({
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__ */ g(
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__ */ g("span", { style: { color: k.added }, children: [
432
+ e > 0 && /* @__PURE__ */ y("span", { style: { color: k.added }, children: [
519
433
  "+",
520
434
  e
521
435
  ] }),
522
- t > 0 && /* @__PURE__ */ g("span", { style: { color: k.deleted }, children: [
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 Ye = {
444
+ const Ue = {
531
445
  added: "+",
532
446
  removed: "-",
533
447
  unchanged: " "
534
448
  };
535
- function ht({
449
+ function pt({
536
450
  lines: e,
537
451
  showLineNumbers: t = !0,
538
452
  coloredLineNumbers: r = !0,
539
- showAccentStrip: a = !0,
540
- style: c
453
+ showAccentStrip: n = !0,
454
+ style: a
541
455
  }) {
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;
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: n.text.primary,
464
+ color: o.text.primary,
551
465
  overflowX: "auto",
552
- ...c
466
+ ...a
553
467
  },
554
- children: e.map((s, f) => /* @__PURE__ */ g(
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: d(s.type),
561
- borderLeft: a ? `3px solid ${u(s.type)}` : void 0
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: l(s.type)
487
+ color: d(c.type)
574
488
  },
575
- children: s.lineNumber ?? ""
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: l(s.type)
500
+ color: d(c.type)
587
501
  },
588
- children: Ye[s.type]
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: s.content
514
+ children: c.content
601
515
  }
602
516
  )
603
517
  ]
604
518
  },
605
- f
519
+ u
606
520
  ))
607
521
  }
608
522
  );
609
523
  }
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;
612
- return /* @__PURE__ */ g(
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 Je({
561
+ function et({
648
562
  todos: e,
649
563
  dimmedTodoIds: t,
650
564
  onTodoClick: r,
651
- style: a
565
+ style: n
652
566
  }) {
653
- const c = F();
654
- return e.length === 0 ? null : /* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", ...a }, children: e.map((n) => {
655
- const d = t == null ? void 0 : t.has(n.id);
656
- return /* @__PURE__ */ g(
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(n),
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: c.text.primary,
585
+ color: a.text.primary,
672
586
  fontSize: 14,
673
587
  lineHeight: "20px",
674
- opacity: d ? 0.45 : 1
588
+ opacity: l ? 0.45 : 1
675
589
  },
676
590
  children: [
677
- /* @__PURE__ */ i(Ve, { status: n.status }),
591
+ /* @__PURE__ */ i(Qe, { status: o.status }),
678
592
  /* @__PURE__ */ i(
679
593
  "span",
680
594
  {
681
595
  style: {
682
- textDecoration: n.status === "cancelled" ? "line-through" : void 0,
683
- color: n.status === "cancelled" ? c.text.tertiary : void 0
596
+ textDecoration: o.status === "cancelled" ? "line-through" : void 0,
597
+ color: o.status === "cancelled" ? a.text.tertiary : void 0
684
598
  },
685
- children: n.content
599
+ children: o.content
686
600
  }
687
601
  )
688
602
  ]
689
603
  },
690
- n.id
604
+ o.id
691
605
  );
692
606
  }) });
693
607
  }
694
- function gt({
608
+ function yt({
695
609
  todos: e,
696
610
  dimmedTodoIds: t,
697
611
  defaultExpanded: r = !1,
698
- onTodoClick: a,
699
- style: c
612
+ onTodoClick: n,
613
+ style: a
700
614
  }) {
701
- const n = F(), [d, u] = P(r);
615
+ const o = g(), [l, f] = B(r);
702
616
  if (e.length === 0) return null;
703
- const l = e.filter((s) => s.status === "completed").length;
704
- return /* @__PURE__ */ g(
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 ${n.stroke.primary}`,
622
+ border: `1px solid ${o.stroke.primary}`,
709
623
  borderRadius: 6,
710
624
  overflow: "hidden",
711
- ...c
625
+ ...a
712
626
  },
713
627
  children: [
714
- /* @__PURE__ */ g(
628
+ /* @__PURE__ */ y(
715
629
  "button",
716
630
  {
717
631
  type: "button",
718
- onClick: () => u((s) => !s),
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: "transparent",
639
+ background: o.fill.secondary,
726
640
  border: "none",
727
641
  cursor: "pointer",
728
- color: n.text.secondary,
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: d ? "rotate(90deg)" : "none",
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__ */ g("span", { children: [
760
- l,
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
- d && /* @__PURE__ */ i("div", { style: { padding: 6 }, children: /* @__PURE__ */ i(
769
- Je,
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: a
687
+ onTodoClick: n
774
688
  }
775
689
  ) })
776
690
  ]
777
691
  }
778
692
  );
779
693
  }
780
- function pt(e, t) {
781
- const r = `canvas:${e}`, [a, c] = P(() => {
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 d = localStorage.getItem(r);
785
- return d === null ? t : JSON.parse(d);
698
+ const l = localStorage.getItem(r);
699
+ return l === null ? t : JSON.parse(l);
786
700
  } catch {
787
701
  return t;
788
702
  }
789
- }), n = G(
790
- (d) => {
791
- c((u) => {
792
- const l = typeof d == "function" ? d(u) : d;
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(l));
708
+ localStorage == null || localStorage.setItem(r, JSON.stringify(d));
795
709
  } catch {
796
710
  }
797
- return l;
711
+ return d;
798
712
  });
799
713
  },
800
714
  [r]
801
715
  );
802
- return [a, n];
716
+ return [n, o];
803
717
  }
804
- function yt() {
805
- return G((e) => {
718
+ function mt() {
719
+ return W((e) => {
806
720
  }, []);
807
721
  }
808
- function mt(e, t) {
722
+ function xt(e, t) {
809
723
  return { ...e, ...t };
810
724
  }
811
- function xt({ children: e, style: t }) {
812
- return /* @__PURE__ */ i(W, { order: 1, fz: 24, lh: "30px", style: t, children: e });
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
- return /* @__PURE__ */ i(W, { order: 2, fz: 18, lh: "24px", style: t, children: e });
738
+ const r = g();
739
+ return /* @__PURE__ */ i(_, { order: 1, style: j(r, "h1", t), children: e });
816
740
  }
817
- function Et({ children: e, style: t }) {
818
- return /* @__PURE__ */ i(W, { order: 3, fz: 16, lh: "22px", style: t, children: e });
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
- const Ue = {
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: a = "p",
831
- weight: c = "normal",
832
- italic: n,
833
- truncate: d,
834
- style: u
759
+ as: n = "p",
760
+ weight: a = "normal",
761
+ italic: o,
762
+ truncate: l,
763
+ style: f
835
764
  }) {
836
- const l = F();
765
+ const d = g();
837
766
  return /* @__PURE__ */ i(
838
- $,
767
+ H,
839
768
  {
840
- component: a,
769
+ component: n,
841
770
  size: r === "small" ? "xs" : "sm",
842
- fw: Ue[c],
843
- c: t === "primary" ? void 0 : l.text[t],
844
- truncate: d,
845
- style: { fontStyle: n ? "italic" : void 0, ...u },
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 bt({ children: e, style: t }) {
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
- background: "var(--mantine-color-default-hover)",
858
- borderRadius: 4,
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 Ct({ children: e, href: t, style: r }) {
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: "var(--mantine-color-anchor)", ...r },
810
+ style: { color: n.text.link, ...r },
874
811
  children: e
875
812
  }
876
813
  );
877
814
  }
878
- function Ft({ children: e, gap: t, style: r }) {
879
- return /* @__PURE__ */ i(we, { gap: t, style: r, children: e });
815
+ function Lt({ children: e, gap: t, style: r }) {
816
+ return /* @__PURE__ */ i(Pe, { gap: t, style: r, children: e });
880
817
  }
881
- const oe = {
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 St({
825
+ function Tt({
889
826
  children: e,
890
827
  gap: t,
891
828
  align: r = "center",
892
- justify: a = "start",
893
- wrap: c = !1,
894
- style: n
829
+ justify: n = "start",
830
+ wrap: a = !1,
831
+ style: o
895
832
  }) {
896
833
  return /* @__PURE__ */ i(
897
- Ae,
834
+ Le,
898
835
  {
899
836
  gap: t,
900
- align: oe[r],
901
- justify: oe[a],
902
- wrap: c ? "wrap" : "nowrap",
903
- style: n,
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 At() {
845
+ function Pt() {
909
846
  return /* @__PURE__ */ i("div", { style: { flex: 1 } });
910
847
  }
911
- function Bt({ children: e, columns: t, gap: r = 16, align: a, style: c }) {
912
- const n = typeof t == "number" ? `repeat(${t}, minmax(0, 1fr))` : t;
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: n,
855
+ gridTemplateColumns: o,
919
856
  gap: r,
920
- alignItems: a,
921
- ...c
857
+ alignItems: n,
858
+ ...a
922
859
  },
923
860
  children: e
924
861
  }
925
862
  );
926
863
  }
927
- function wt({ style: e }) {
928
- return /* @__PURE__ */ i(Ce, { style: e });
864
+ function At({ style: e }) {
865
+ return /* @__PURE__ */ i(ke, { style: e });
929
866
  }
930
- const q = Me({
867
+ const O = Be({
931
868
  collapsible: !1,
932
869
  open: !0,
933
870
  toggle: () => {
934
871
  }
935
872
  });
936
- function Tt({
873
+ function $t({
937
874
  children: e,
938
875
  variant: t = "default",
939
876
  collapsible: r = !1,
940
- defaultOpen: a = !0,
941
- open: c,
942
- onOpenChange: n,
943
- style: d
877
+ defaultOpen: n = !0,
878
+ open: a,
879
+ onOpenChange: o,
880
+ style: l
944
881
  }) {
945
- const [u, l] = P(a), s = c ?? u, f = G(() => {
946
- const y = !s;
947
- c === void 0 && l(y), n == null || n(y);
948
- }, [s, c, n]);
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
- ke,
887
+ be,
951
888
  {
952
889
  withBorder: t !== "borderless",
953
- radius: "md",
890
+ radius: f.radius.md,
954
891
  padding: 0,
955
- style: d,
956
- children: /* @__PURE__ */ i(q.Provider, { value: { collapsible: r, open: s, toggle: f }, children: e })
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 Lt({ children: e, trailing: t, style: r }) {
961
- const { collapsible: a, open: c, toggle: n } = ae(q);
962
- return /* @__PURE__ */ g(
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 ? n : void 0,
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: "1px solid var(--mantine-color-default-border)",
973
- fontSize: 12,
974
- fontWeight: 600,
975
- color: "var(--mantine-color-dimmed)",
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__ */ g("span", { style: { display: "inline-flex", alignItems: "center", gap: 6 }, children: [
982
- a && /* @__PURE__ */ i(he, { expanded: c }),
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 Dt({ children: e, style: t }) {
991
- const { collapsible: r, open: a } = ae(q);
992
- return r && !a ? null : /* @__PURE__ */ i("div", { style: { padding: 14, ...t }, children: e });
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 Mt({ value: e, label: t, tone: r, style: a }) {
1021
- return /* @__PURE__ */ g("div", { style: a, children: [
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
- c: r ? `${_[r]}.6` : void 0,
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($, { fz: 12, c: "dimmed", children: t })
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 Pt({
991
+ function Dt({
1036
992
  children: e,
1037
993
  active: t,
1038
994
  tone: r = "neutral",
1039
- size: a = "md",
1040
- leadingContent: c,
1041
- keyboardHint: n,
1042
- title: d,
1043
- style: u,
1044
- onClick: l
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
- Se,
1003
+ we,
1048
1004
  {
1049
- color: _[r],
1005
+ color: ae[r],
1050
1006
  variant: t ? "filled" : "light",
1051
- size: a === "sm" ? "sm" : "md",
1052
- leftSection: c,
1053
- rightSection: n,
1054
- title: d,
1055
- onClick: l,
1007
+ size: n === "sm" ? "sm" : "md",
1008
+ leftSection: a,
1009
+ rightSection: o,
1010
+ title: l,
1011
+ onClick: d,
1056
1012
  style: {
1057
- cursor: l ? "pointer" : void 0,
1013
+ cursor: d ? "pointer" : void 0,
1058
1014
  textTransform: "none",
1059
- ...u
1015
+ ...f
1060
1016
  },
1061
1017
  children: e
1062
1018
  }
1063
1019
  );
1064
1020
  }
1065
- function Ht({
1021
+ function It({
1066
1022
  children: e,
1067
1023
  tone: t = "neutral",
1068
1024
  title: r,
1069
- icon: a,
1070
- style: c
1025
+ icon: n,
1026
+ style: a
1071
1027
  }) {
1072
1028
  return /* @__PURE__ */ i(
1073
- Ee,
1029
+ ve,
1074
1030
  {
1075
- color: _[t],
1031
+ color: ae[t],
1076
1032
  title: r,
1077
- icon: a,
1033
+ icon: n,
1078
1034
  variant: "light",
1079
- style: c,
1035
+ style: a,
1080
1036
  children: e
1081
1037
  }
1082
1038
  );
1083
1039
  }
1084
- const Ze = {
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 zt({
1047
+ function Nt({
1092
1048
  headers: e,
1093
1049
  rows: t,
1094
1050
  columnAlign: r,
1095
- rowTone: a,
1096
- framed: c = !0,
1097
- striped: n,
1098
- stickyHeader: d,
1099
- style: u,
1100
- emptyMessage: l
1051
+ rowTone: n,
1052
+ framed: a = !0,
1053
+ striped: o,
1054
+ stickyHeader: l,
1055
+ style: f,
1056
+ emptyMessage: d
1101
1057
  }) {
1102
- return /* @__PURE__ */ g(
1103
- E,
1058
+ return /* @__PURE__ */ y(
1059
+ w,
1104
1060
  {
1105
- withTableBorder: c,
1061
+ withTableBorder: a,
1106
1062
  withColumnBorders: !1,
1107
- striped: n,
1108
- stickyHeader: d,
1063
+ striped: o,
1064
+ stickyHeader: l,
1109
1065
  highlightOnHover: !0,
1110
- style: u,
1066
+ style: f,
1111
1067
  children: [
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)) }) }),
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) => {
1114
- const y = a == null ? void 0 : a[f];
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
- E.Tr,
1072
+ w.Tr,
1117
1073
  {
1118
- style: y ? { background: Ze[y] } : void 0,
1119
- children: e.map((x, v) => /* @__PURE__ */ i(
1120
- E.Td,
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[v]) ?? "left",
1123
- children: s[v]
1078
+ ta: (r == null ? void 0 : r[h]) ?? "left",
1079
+ children: c[h]
1124
1080
  },
1125
- v
1081
+ h
1126
1082
  ))
1127
1083
  },
1128
- f
1084
+ u
1129
1085
  );
1130
1086
  }) })
1131
1087
  ]
1132
1088
  }
1133
1089
  );
1134
1090
  }
1135
- const et = {
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: a = "button",
1145
- style: c,
1146
- onClick: n
1100
+ type: n = "button",
1101
+ style: a,
1102
+ onClick: o
1147
1103
  }) {
1148
1104
  return /* @__PURE__ */ i(
1149
- ve,
1105
+ xe,
1150
1106
  {
1151
- variant: et[t],
1107
+ variant: nt[t],
1108
+ color: t === "primary" ? "accent" : void 0,
1152
1109
  size: "xs",
1153
1110
  disabled: r,
1154
- type: a,
1155
- onClick: n,
1156
- style: c,
1111
+ type: n,
1112
+ onClick: o,
1113
+ style: a,
1157
1114
  children: e
1158
1115
  }
1159
1116
  );
1160
1117
  }
1161
- function $t({
1118
+ function zt({
1162
1119
  children: e,
1163
1120
  onClick: t,
1164
1121
  disabled: r,
1165
- title: a,
1166
- variant: c = "default",
1167
- size: n = "md",
1168
- style: d
1122
+ title: n,
1123
+ variant: a = "default",
1124
+ size: o = "md",
1125
+ style: l
1169
1126
  }) {
1170
1127
  return /* @__PURE__ */ i(
1171
- Fe,
1128
+ Ce,
1172
1129
  {
1173
- variant: c === "circle" ? "light" : "subtle",
1174
- radius: c === "circle" ? "xl" : "sm",
1175
- size: n === "sm" ? "sm" : "md",
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: a,
1179
- "aria-label": a,
1135
+ title: n,
1136
+ "aria-label": n,
1180
1137
  onClick: t,
1181
- style: d,
1138
+ style: l,
1182
1139
  children: e
1183
1140
  }
1184
1141
  );
1185
1142
  }
1186
- function It({
1143
+ function Ht({
1187
1144
  value: e,
1188
1145
  onChange: t,
1189
1146
  options: r,
1190
- placeholder: a,
1191
- disabled: c,
1192
- style: n
1147
+ placeholder: n,
1148
+ disabled: a,
1149
+ style: o
1193
1150
  }) {
1194
1151
  return /* @__PURE__ */ i(
1195
- Be,
1152
+ Te,
1196
1153
  {
1197
1154
  value: e,
1198
1155
  data: r,
1199
- placeholder: a,
1200
- disabled: c,
1156
+ placeholder: n,
1157
+ disabled: a,
1201
1158
  allowDeselect: !1,
1202
- onChange: (d) => {
1203
- d !== null && (t == null || t(d));
1159
+ onChange: (l) => {
1160
+ l !== null && (t == null || t(l));
1204
1161
  },
1205
- style: n
1162
+ style: o
1206
1163
  }
1207
1164
  );
1208
1165
  }
1209
- function Wt({
1166
+ function _t({
1210
1167
  checked: e,
1211
1168
  onChange: t,
1212
1169
  disabled: r,
1213
- label: a,
1214
- style: c
1170
+ label: n,
1171
+ style: a
1215
1172
  }) {
1216
1173
  return /* @__PURE__ */ i(
1217
- be,
1174
+ Se,
1218
1175
  {
1219
1176
  checked: e,
1220
1177
  disabled: r,
1221
- label: a,
1222
- onChange: (n) => t == null ? void 0 : t(n.currentTarget.checked),
1223
- style: c
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 Gt({
1184
+ function Wt({
1228
1185
  checked: e,
1229
1186
  onChange: t,
1230
1187
  disabled: r,
1231
- size: a = "sm",
1232
- style: c
1188
+ size: n = "sm",
1189
+ style: a
1233
1190
  }) {
1234
1191
  return /* @__PURE__ */ i(
1235
- De,
1192
+ $e,
1236
1193
  {
1237
1194
  checked: e,
1238
1195
  disabled: r,
1239
- size: a === "sm" ? "sm" : "md",
1240
- onChange: (n) => t == null ? void 0 : t(n.currentTarget.checked),
1241
- style: c
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 jt({
1202
+ function Gt({
1246
1203
  value: e,
1247
1204
  onChange: t,
1248
1205
  placeholder: r,
1249
- disabled: a,
1250
- type: c,
1251
- style: n
1206
+ disabled: n,
1207
+ type: a,
1208
+ style: o
1252
1209
  }) {
1253
1210
  return /* @__PURE__ */ i(
1254
- Le,
1211
+ Ae,
1255
1212
  {
1256
1213
  value: e,
1257
1214
  placeholder: r,
1258
- disabled: a,
1259
- type: c,
1260
- onChange: (d) => t == null ? void 0 : t(d.currentTarget.value),
1261
- style: n
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 Nt({
1222
+ function jt({
1266
1223
  value: e,
1267
1224
  onChange: t,
1268
1225
  placeholder: r,
1269
- disabled: a,
1270
- rows: c = 3,
1271
- style: n
1226
+ disabled: n,
1227
+ rows: a = 3,
1228
+ style: o
1272
1229
  }) {
1273
1230
  return /* @__PURE__ */ i(
1274
- Te,
1231
+ Me,
1275
1232
  {
1276
1233
  value: e,
1277
1234
  placeholder: r,
1278
- disabled: a,
1235
+ disabled: n,
1279
1236
  autosize: !0,
1280
- minRows: c,
1281
- onChange: (d) => t == null ? void 0 : t(d.currentTarget.value),
1282
- style: n
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 = F();
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 _t({
1260
+ function Kt({
1304
1261
  segments: e,
1305
1262
  total: t,
1306
1263
  topLeftLabel: r,
1307
- topRightLabel: a,
1308
- style: c
1264
+ topRightLabel: n,
1265
+ style: a
1309
1266
  }) {
1310
- const n = F(), d = t > 0 ? t : 1, u = e.reduce(
1311
- (s, f) => s + (Number.isFinite(f.value) && f.value > 0 ? f.value : 0),
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
- ), l = Math.max(0, d - u);
1314
- return /* @__PURE__ */ g("div", { style: c, children: [
1315
- (r != null || a != null) && /* @__PURE__ */ g(
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: n.text.secondary,
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: a })
1284
+ /* @__PURE__ */ i("span", { children: n })
1328
1285
  ]
1329
1286
  }
1330
1287
  ),
1331
- /* @__PURE__ */ g("div", { style: { display: "flex", gap: 2, height: 8 }, children: [
1332
- e.map((s, f) => {
1333
- const y = Number.isFinite(s.value) && s.value > 0 ? s.value : 0, x = n.category[s.color ?? ne[f % ne.length]];
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: `${y / d * 100}%`,
1339
- background: x,
1295
+ width: `${m / l * 100}%`,
1296
+ background: v,
1340
1297
  borderRadius: 3
1341
1298
  }
1342
1299
  },
1343
- s.id
1300
+ c.id
1344
1301
  );
1345
1302
  }),
1346
- l > 0 && /* @__PURE__ */ i(
1303
+ d > 0 && /* @__PURE__ */ i(
1347
1304
  "div",
1348
1305
  {
1349
1306
  style: {
1350
- width: `${l / d * 100}%`,
1351
- background: n.fill.tertiary,
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 qt({
1316
+ function Xt({
1360
1317
  title: e,
1361
1318
  leading: t,
1362
1319
  count: r,
1363
- trailing: a,
1364
- children: c,
1365
- defaultOpen: n = !1,
1366
- style: d
1320
+ trailing: n,
1321
+ children: a,
1322
+ defaultOpen: o = !1,
1323
+ style: l
1367
1324
  }) {
1368
- const u = F(), [l, s] = P(n);
1369
- return /* @__PURE__ */ g("div", { style: d, children: [
1370
- /* @__PURE__ */ g(
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: () => s((f) => !f),
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: u.text.primary,
1338
+ color: f.text.primary,
1382
1339
  fontSize: 14
1383
1340
  },
1384
1341
  children: [
1385
- /* @__PURE__ */ i(he, { expanded: l }),
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: u.text.tertiary, fontSize: 12 }, children: r }),
1345
+ r != null && /* @__PURE__ */ i("span", { style: { color: f.text.tertiary, fontSize: 12 }, children: r }),
1389
1346
  /* @__PURE__ */ i("span", { style: { flex: 1 } }),
1390
- a != null && /* @__PURE__ */ i("span", { style: { color: u.text.tertiary }, children: a })
1347
+ n != null && /* @__PURE__ */ i("span", { style: { color: f.text.tertiary }, children: n })
1391
1348
  ]
1392
1349
  }
1393
1350
  ),
1394
- l && /* @__PURE__ */ i("div", { style: { paddingLeft: 18, paddingBottom: 4 }, children: c })
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
- 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,
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
- zt as Table,
1382
+ Nt as Table,
1426
1383
  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,
1440
- ie as categoryPaletteLight,
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
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
  };