@flesler/cursor-canvas-web 1.1.0 → 1.1.2

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