@flesler/cursor-canvas-web 1.1.0 → 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.
@@ -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 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
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,33 +24,42 @@ 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 g() {
28
+ const t = me("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 = g().chart.sequence;
33
39
  return (r, n) => r ? k[r] : t[n % t.length];
34
40
  }
35
- function ot(e, t) {
41
+ function ce() {
42
+ const t = g().text.primary;
43
+ return { textColor: t, barLabelColor: t };
44
+ }
45
+ function le(e, t) {
36
46
  return e.map((r, n) => {
37
- const i = { category: r };
47
+ const a = { category: r };
38
48
  for (const o of t)
39
- i[o.name] = o.data[n] ?? 0;
40
- return i;
49
+ a[o.name] = o.data[n] ?? 0;
50
+ return a;
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,347 @@ 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 _e(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 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({
75
131
  categories: e,
76
132
  series: t,
77
133
  height: r = 240,
78
134
  fill: n,
79
- valueSuffix: i,
135
+ valueSuffix: a,
80
136
  valuePrefix: o,
81
137
  showValues: l,
82
- showHoverGuide: u = !0,
138
+ showHoverGuide: f = !0,
83
139
  beginAtZero: d,
84
140
  yMin: c,
85
- yMax: f,
141
+ yMax: u,
86
142
  referenceLines: m,
87
- style: x
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 = ce(), T = le(e, t), P = de(t, C), M = fe({
90
147
  beginAtZero: d,
91
148
  yMin: c,
92
- yMax: f,
149
+ yMax: u,
93
150
  referenceLines: m,
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),
159
+ legendProps: ie,
160
+ valueFormatter: ue(a, o),
103
161
  withPointLabels: l ?? e.length <= 20,
104
- tooltipProps: u ? void 0 : { cursor: !1 },
105
- ...T,
106
- style: x
162
+ tooltipProps: f ? void 0 : { cursor: !1 },
163
+ styles: {
164
+ ...se,
165
+ legendItemName: { color: S.textColor }
166
+ },
167
+ ...S,
168
+ ...M,
169
+ style: v
107
170
  };
108
- return n ? /* @__PURE__ */ s($t, { ...C }) : /* @__PURE__ */ s(zt, { ...C });
171
+ return n ? /* @__PURE__ */ i(De, { ...L }) : /* @__PURE__ */ i(Ie, { ...L });
109
172
  }
110
- function Vt({
173
+ function dt({
111
174
  categories: e,
112
175
  series: t,
113
176
  height: r = 240,
114
177
  stacked: n,
115
- horizontal: i,
178
+ horizontal: a,
116
179
  normalized: o,
117
180
  valueSuffix: l,
118
- valuePrefix: u,
181
+ valuePrefix: f,
119
182
  showValues: d,
120
183
  beginAtZero: c,
121
- yMin: f,
184
+ yMin: u,
122
185
  yMax: m,
123
- referenceLines: x,
124
- style: b
186
+ referenceLines: v,
187
+ style: h
125
188
  }) {
126
- const B = G(), w = ot(e, t), T = o ? "percent" : n ? "stacked" : "default", C = st({
189
+ const C = G(), S = ce(), T = le(e, t), P = o ? "percent" : n ? "stacked" : "default", M = fe({
127
190
  beginAtZero: c,
128
- yMin: f,
191
+ yMin: u,
129
192
  yMax: m,
130
- referenceLines: x,
131
- horizontal: i,
193
+ referenceLines: v,
194
+ horizontal: a,
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 && _e(d, t, e);
198
+ return /* @__PURE__ */ i(
199
+ Ee,
137
200
  {
138
201
  h: r,
139
- data: w,
202
+ data: T,
140
203
  dataKey: "category",
141
- series: at(t, B),
142
- type: T,
143
- orientation: i ? "vertical" : "horizontal",
204
+ series: de(t, C),
205
+ type: P,
206
+ orientation: a ? "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(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
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"
157
239
  }));
158
- return /* @__PURE__ */ s(
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(
159
281
  "div",
160
282
  {
161
283
  style: {
162
284
  width: "100%",
163
- height: t,
164
- minHeight: t,
165
285
  display: "flex",
286
+ flexDirection: "column",
166
287
  alignItems: "center",
167
- justifyContent: "center"
288
+ ...n
168
289
  },
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
- )
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
+ ]
179
328
  }
180
329
  );
181
330
  }
182
- function Jt(e) {
331
+ function ft(e) {
183
332
  const {
184
333
  nodes: t,
185
334
  edges: r,
186
335
  direction: n = "vertical",
187
- nodeWidth: i = 160,
336
+ nodeWidth: a = 160,
188
337
  nodeHeight: o = 40,
189
338
  rankGap: l = 64,
190
- nodeGap: u = 48,
339
+ nodeGap: f = 48,
191
340
  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);
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);
201
350
  }
202
- w.set(a, B);
351
+ S.set(s, C);
203
352
  };
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);
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);
215
364
  }
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);
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);
220
369
  }
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(
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(
222
371
  0,
223
- ...z.map((a) => K(M.get(a).length))
372
+ ...E.map((s) => X($.get(s).length))
224
373
  ), 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 });
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 });
230
379
  }), 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
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
237
386
  });
238
387
  });
239
- const V = (a, h) => a ? v ? {
240
- x: a.x + i / 2,
241
- y: h === "source" ? a.y + o : a.y
388
+ const V = (s, p) => s ? b ? {
389
+ x: s.x + a / 2,
390
+ y: p === "source" ? s.y + o : s.y
242
391
  } : {
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");
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");
247
396
  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))
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))
255
404
  };
256
- }), Y = d * 2 + z.length * (v ? o : i) + Math.max(0, z.length - 1) * l, J = d * 2 + X;
405
+ }), Z = d * 2 + E.length * (b ? o : a) + Math.max(0, E.length - 1) * l, J = d * 2 + Y;
257
406
  return {
258
407
  nodes: [...D.values()],
259
- edges: dt,
408
+ edges: pe,
260
409
  ranks: q,
261
410
  direction: n,
262
- width: v ? J : Y,
263
- height: v ? Y : J
411
+ width: b ? J : Z,
412
+ height: b ? Z : J
264
413
  };
265
414
  }
266
- function Ut({
415
+ function ht({
267
416
  additions: e = 0,
268
417
  deletions: t = 0,
269
418
  style: r
270
419
  }) {
271
- return e === 0 && t === 0 ? null : /* @__PURE__ */ p(
420
+ return e === 0 && t === 0 ? null : /* @__PURE__ */ y(
272
421
  "span",
273
422
  {
274
423
  style: {
@@ -280,11 +429,11 @@ function Ut({
280
429
  ...r
281
430
  },
282
431
  children: [
283
- e > 0 && /* @__PURE__ */ p("span", { style: { color: k.added }, children: [
432
+ e > 0 && /* @__PURE__ */ y("span", { style: { color: k.added }, children: [
284
433
  "+",
285
434
  e
286
435
  ] }),
287
- t > 0 && /* @__PURE__ */ p("span", { style: { color: k.deleted }, children: [
436
+ t > 0 && /* @__PURE__ */ y("span", { style: { color: k.deleted }, children: [
288
437
  "-",
289
438
  t
290
439
  ] })
@@ -292,20 +441,20 @@ function Ut({
292
441
  }
293
442
  );
294
443
  }
295
- const Rt = {
444
+ const Ue = {
296
445
  added: "+",
297
446
  removed: "-",
298
447
  unchanged: " "
299
448
  };
300
- function Zt({
449
+ function pt({
301
450
  lines: e,
302
451
  showLineNumbers: t = !0,
303
452
  coloredLineNumbers: r = !0,
304
453
  showAccentStrip: n = !0,
305
- style: i
454
+ style: a
306
455
  }) {
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(
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;
457
+ return /* @__PURE__ */ i(
309
458
  "div",
310
459
  {
311
460
  style: {
@@ -314,19 +463,19 @@ function Zt({
314
463
  lineHeight: "18px",
315
464
  color: o.text.primary,
316
465
  overflowX: "auto",
317
- ...i
466
+ ...a
318
467
  },
319
- children: e.map((c, f) => /* @__PURE__ */ p(
468
+ children: e.map((c, u) => /* @__PURE__ */ y(
320
469
  "div",
321
470
  {
322
471
  style: {
323
472
  display: "flex",
324
473
  alignItems: "stretch",
325
474
  background: l(c.type),
326
- borderLeft: n ? `3px solid ${u(c.type)}` : void 0
475
+ borderLeft: n ? `3px solid ${f(c.type)}` : void 0
327
476
  },
328
477
  children: [
329
- t && /* @__PURE__ */ s(
478
+ t && /* @__PURE__ */ i(
330
479
  "span",
331
480
  {
332
481
  style: {
@@ -340,7 +489,7 @@ function Zt({
340
489
  children: c.lineNumber ?? ""
341
490
  }
342
491
  ),
343
- /* @__PURE__ */ s(
492
+ /* @__PURE__ */ i(
344
493
  "span",
345
494
  {
346
495
  style: {
@@ -350,10 +499,10 @@ function Zt({
350
499
  userSelect: "none",
351
500
  color: d(c.type)
352
501
  },
353
- children: Rt[c.type]
502
+ children: Ue[c.type]
354
503
  }
355
504
  ),
356
- /* @__PURE__ */ s(
505
+ /* @__PURE__ */ i(
357
506
  "pre",
358
507
  {
359
508
  style: {
@@ -367,14 +516,14 @@ function Zt({
367
516
  )
368
517
  ]
369
518
  },
370
- f
519
+ u
371
520
  ))
372
521
  }
373
522
  );
374
523
  }
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(
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(
378
527
  "svg",
379
528
  {
380
529
  width: 14,
@@ -384,8 +533,8 @@ function Wt({ status: e }) {
384
533
  style: { flex: "0 0 auto", marginTop: 3 },
385
534
  "aria-hidden": !0,
386
535
  children: [
387
- /* @__PURE__ */ s("circle", { cx: 7, cy: 7, r: 6, stroke: r, strokeWidth: 1.4 }),
388
- e === "completed" && /* @__PURE__ */ s(
536
+ /* @__PURE__ */ i("circle", { cx: 7, cy: 7, r: 6, stroke: r, strokeWidth: 1.4 }),
537
+ e === "completed" && /* @__PURE__ */ i(
389
538
  "path",
390
539
  {
391
540
  d: "M4 7.2l2 2 4-4.4",
@@ -395,8 +544,8 @@ function Wt({ status: e }) {
395
544
  strokeLinejoin: "round"
396
545
  }
397
546
  ),
398
- e === "in_progress" && /* @__PURE__ */ s("circle", { cx: 7, cy: 7, r: 3, fill: r }),
399
- e === "cancelled" && /* @__PURE__ */ s(
547
+ e === "in_progress" && /* @__PURE__ */ i("circle", { cx: 7, cy: 7, r: 3, fill: r }),
548
+ e === "cancelled" && /* @__PURE__ */ i(
400
549
  "path",
401
550
  {
402
551
  d: "M4.8 4.8l4.4 4.4M9.2 4.8l-4.4 4.4",
@@ -409,16 +558,16 @@ function Wt({ status: e }) {
409
558
  }
410
559
  );
411
560
  }
412
- function Ht({
561
+ function et({
413
562
  todos: e,
414
563
  dimmedTodoIds: t,
415
564
  onTodoClick: r,
416
565
  style: n
417
566
  }) {
418
- const i = y();
419
- return e.length === 0 ? null : /* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", ...n }, children: e.map((o) => {
567
+ const a = g();
568
+ return e.length === 0 ? null : /* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", ...n }, children: e.map((o) => {
420
569
  const l = t == null ? void 0 : t.has(o.id);
421
- return /* @__PURE__ */ p(
570
+ return /* @__PURE__ */ y(
422
571
  "button",
423
572
  {
424
573
  type: "button",
@@ -433,19 +582,19 @@ function Ht({
433
582
  background: "transparent",
434
583
  border: "none",
435
584
  cursor: r ? "pointer" : "default",
436
- color: i.text.primary,
585
+ color: a.text.primary,
437
586
  fontSize: 14,
438
587
  lineHeight: "20px",
439
588
  opacity: l ? 0.45 : 1
440
589
  },
441
590
  children: [
442
- /* @__PURE__ */ s(Wt, { status: o.status }),
443
- /* @__PURE__ */ s(
591
+ /* @__PURE__ */ i(Qe, { status: o.status }),
592
+ /* @__PURE__ */ i(
444
593
  "span",
445
594
  {
446
595
  style: {
447
596
  textDecoration: o.status === "cancelled" ? "line-through" : void 0,
448
- color: o.status === "cancelled" ? i.text.tertiary : void 0
597
+ color: o.status === "cancelled" ? a.text.tertiary : void 0
449
598
  },
450
599
  children: o.content
451
600
  }
@@ -456,38 +605,38 @@ function Ht({
456
605
  );
457
606
  }) });
458
607
  }
459
- function Qt({
608
+ function yt({
460
609
  todos: e,
461
610
  dimmedTodoIds: t,
462
611
  defaultExpanded: r = !1,
463
612
  onTodoClick: n,
464
- style: i
613
+ style: a
465
614
  }) {
466
- const o = y(), [l, u] = I(r);
615
+ const o = g(), [l, f] = B(r);
467
616
  if (e.length === 0) return null;
468
617
  const d = e.filter((c) => c.status === "completed").length;
469
- return /* @__PURE__ */ p(
618
+ return /* @__PURE__ */ y(
470
619
  "div",
471
620
  {
472
621
  style: {
473
622
  border: `1px solid ${o.stroke.primary}`,
474
623
  borderRadius: 6,
475
624
  overflow: "hidden",
476
- ...i
625
+ ...a
477
626
  },
478
627
  children: [
479
- /* @__PURE__ */ p(
628
+ /* @__PURE__ */ y(
480
629
  "button",
481
630
  {
482
631
  type: "button",
483
- onClick: () => u((c) => !c),
632
+ onClick: () => f((c) => !c),
484
633
  style: {
485
634
  display: "flex",
486
635
  alignItems: "center",
487
636
  gap: 8,
488
637
  width: "100%",
489
638
  padding: "6px 10px",
490
- background: "transparent",
639
+ background: o.fill.secondary,
491
640
  border: "none",
492
641
  cursor: "pointer",
493
642
  color: o.text.secondary,
@@ -495,7 +644,7 @@ function Qt({
495
644
  fontWeight: 600
496
645
  },
497
646
  children: [
498
- /* @__PURE__ */ s(
647
+ /* @__PURE__ */ i(
499
648
  "svg",
500
649
  {
501
650
  width: 12,
@@ -507,7 +656,7 @@ function Qt({
507
656
  transition: "transform 120ms"
508
657
  },
509
658
  "aria-hidden": !0,
510
- children: /* @__PURE__ */ s(
659
+ children: /* @__PURE__ */ i(
511
660
  "path",
512
661
  {
513
662
  d: "M4 2.5L8 6l-4 3.5",
@@ -519,9 +668,9 @@ function Qt({
519
668
  )
520
669
  }
521
670
  ),
522
- /* @__PURE__ */ s("span", { children: "Todos" }),
523
- /* @__PURE__ */ s("span", { style: { flex: 1 } }),
524
- /* @__PURE__ */ p("span", { children: [
671
+ /* @__PURE__ */ i("span", { children: "Todos" }),
672
+ /* @__PURE__ */ i("span", { style: { flex: 1 } }),
673
+ /* @__PURE__ */ y("span", { children: [
525
674
  d,
526
675
  " of ",
527
676
  e.length,
@@ -530,8 +679,8 @@ function Qt({
530
679
  ]
531
680
  }
532
681
  ),
533
- l && /* @__PURE__ */ s("div", { style: { padding: 6 }, children: /* @__PURE__ */ s(
534
- Ht,
682
+ l && /* @__PURE__ */ i("div", { style: { padding: 6 }, children: /* @__PURE__ */ i(
683
+ et,
535
684
  {
536
685
  todos: e,
537
686
  dimmedTodoIds: t,
@@ -542,8 +691,8 @@ function Qt({
542
691
  }
543
692
  );
544
693
  }
545
- function te(e, t) {
546
- const r = `canvas:${e}`, [n, i] = I(() => {
694
+ function gt(e, t) {
695
+ const r = `canvas:${e}`, [n, a] = B(() => {
547
696
  if (typeof localStorage > "u") return t;
548
697
  try {
549
698
  const l = localStorage.getItem(r);
@@ -551,10 +700,10 @@ function te(e, t) {
551
700
  } catch {
552
701
  return t;
553
702
  }
554
- }), o = j(
703
+ }), o = W(
555
704
  (l) => {
556
- i((u) => {
557
- const d = typeof l == "function" ? l(u) : l;
705
+ a((f) => {
706
+ const d = typeof l == "function" ? l(f) : l;
558
707
  try {
559
708
  localStorage == null || localStorage.setItem(r, JSON.stringify(d));
560
709
  } catch {
@@ -566,14 +715,14 @@ function te(e, t) {
566
715
  );
567
716
  return [n, o];
568
717
  }
569
- function ee() {
570
- return j((e) => {
718
+ function mt() {
719
+ return W((e) => {
571
720
  }, []);
572
721
  }
573
- function re(e, t) {
722
+ function xt(e, t) {
574
723
  return { ...e, ...t };
575
724
  }
576
- function N(e, t, r) {
725
+ function j(e, t, r) {
577
726
  const n = e.typography[t];
578
727
  return {
579
728
  fontFamily: e.typography.fontFamily,
@@ -585,56 +734,56 @@ function N(e, t, r) {
585
734
  ...r
586
735
  };
587
736
  }
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 });
737
+ function vt({ children: e, style: t }) {
738
+ const r = g();
739
+ return /* @__PURE__ */ i(_, { order: 1, style: j(r, "h1", t), children: e });
591
740
  }
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 });
741
+ function bt({ children: e, style: t }) {
742
+ const r = g();
743
+ return /* @__PURE__ */ i(_, { order: 2, style: j(r, "h2", t), children: e });
595
744
  }
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 });
745
+ function St({ children: e, style: t }) {
746
+ const r = g();
747
+ return /* @__PURE__ */ i(_, { order: 3, style: j(r, "h3", t), children: e });
599
748
  }
600
- const Et = {
749
+ const tt = {
601
750
  normal: 400,
602
751
  medium: 500,
603
752
  semibold: 600,
604
753
  bold: 700
605
754
  };
606
- function ie({
755
+ function kt({
607
756
  children: e,
608
757
  tone: t = "primary",
609
758
  size: r = "body",
610
759
  as: n = "p",
611
- weight: i = "normal",
760
+ weight: a = "normal",
612
761
  italic: o,
613
762
  truncate: l,
614
- style: u
763
+ style: f
615
764
  }) {
616
- const d = y();
617
- return /* @__PURE__ */ s(
765
+ const d = g();
766
+ return /* @__PURE__ */ i(
618
767
  H,
619
768
  {
620
769
  component: n,
621
770
  size: r === "small" ? "xs" : "sm",
622
- fw: Et[i],
771
+ fw: tt[a],
623
772
  c: t === "primary" ? void 0 : d.text[t],
624
773
  truncate: l,
625
774
  style: {
626
775
  fontStyle: o ? "italic" : void 0,
627
776
  ...t === "primary" ? { color: d.text.primary } : void 0,
628
777
  fontFamily: d.typography.fontFamily,
629
- ...u
778
+ ...f
630
779
  },
631
780
  children: e
632
781
  }
633
782
  );
634
783
  }
635
- function se({ children: e, style: t }) {
636
- const r = y();
637
- return /* @__PURE__ */ s(
784
+ function Ct({ children: e, style: t }) {
785
+ const r = g();
786
+ return /* @__PURE__ */ i(
638
787
  "code",
639
788
  {
640
789
  style: {
@@ -650,9 +799,9 @@ function se({ children: e, style: t }) {
650
799
  }
651
800
  );
652
801
  }
653
- function ce({ children: e, href: t, style: r }) {
654
- const n = y();
655
- return /* @__PURE__ */ s(
802
+ function wt({ children: e, href: t, style: r }) {
803
+ const n = g();
804
+ return /* @__PURE__ */ i(
656
805
  "a",
657
806
  {
658
807
  href: t,
@@ -663,42 +812,42 @@ function ce({ children: e, href: t, style: r }) {
663
812
  }
664
813
  );
665
814
  }
666
- function le({ children: e, gap: t, style: r }) {
667
- return /* @__PURE__ */ s(wt, { 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 });
668
817
  }
669
- const et = {
818
+ const ne = {
670
819
  start: "flex-start",
671
820
  center: "center",
672
821
  end: "flex-end",
673
822
  stretch: "stretch",
674
823
  "space-between": "space-between"
675
824
  };
676
- function de({
825
+ function Tt({
677
826
  children: e,
678
827
  gap: t,
679
828
  align: r = "center",
680
829
  justify: n = "start",
681
- wrap: i = !1,
830
+ wrap: a = !1,
682
831
  style: o
683
832
  }) {
684
- return /* @__PURE__ */ s(
685
- kt,
833
+ return /* @__PURE__ */ i(
834
+ Le,
686
835
  {
687
836
  gap: t,
688
- align: et[r],
689
- justify: et[n],
690
- wrap: i ? "wrap" : "nowrap",
837
+ align: ne[r],
838
+ justify: ne[n],
839
+ wrap: a ? "wrap" : "nowrap",
691
840
  style: o,
692
841
  children: e
693
842
  }
694
843
  );
695
844
  }
696
- function ue() {
697
- return /* @__PURE__ */ s("div", { style: { flex: 1 } });
845
+ function Pt() {
846
+ return /* @__PURE__ */ i("div", { style: { flex: 1 } });
698
847
  }
699
- function fe({ children: e, columns: t, gap: r = 16, align: n, style: i }) {
848
+ function Mt({ children: e, columns: t, gap: r = 16, align: n, style: a }) {
700
849
  const o = typeof t == "number" ? `repeat(${t}, minmax(0, 1fr))` : t;
701
- return /* @__PURE__ */ s(
850
+ return /* @__PURE__ */ i(
702
851
  "div",
703
852
  {
704
853
  style: {
@@ -706,55 +855,55 @@ function fe({ children: e, columns: t, gap: r = 16, align: n, style: i }) {
706
855
  gridTemplateColumns: o,
707
856
  gap: r,
708
857
  alignItems: n,
709
- ...i
858
+ ...a
710
859
  },
711
860
  children: e
712
861
  }
713
862
  );
714
863
  }
715
- function he({ style: e }) {
716
- return /* @__PURE__ */ s(xt, { style: e });
864
+ function At({ style: e }) {
865
+ return /* @__PURE__ */ i(ke, { style: e });
717
866
  }
718
- const O = Mt({
867
+ const O = Be({
719
868
  collapsible: !1,
720
869
  open: !0,
721
870
  toggle: () => {
722
871
  }
723
872
  });
724
- function pe({
873
+ function $t({
725
874
  children: e,
726
875
  variant: t = "default",
727
876
  collapsible: r = !1,
728
877
  defaultOpen: n = !0,
729
- open: i,
878
+ open: a,
730
879
  onOpenChange: o,
731
880
  style: l
732
881
  }) {
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,
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]);
886
+ return /* @__PURE__ */ i(
887
+ be,
739
888
  {
740
889
  withBorder: t !== "borderless",
741
- radius: u.radius.md,
890
+ radius: f.radius.md,
742
891
  padding: 0,
743
892
  style: {
744
- background: u.bg.elevated,
745
- borderColor: u.stroke.secondary,
893
+ background: f.bg.elevated,
894
+ borderColor: f.stroke.secondary,
746
895
  ...l
747
896
  },
748
- children: /* @__PURE__ */ s(O.Provider, { value: { collapsible: r, open: f, toggle: m }, children: e })
897
+ children: /* @__PURE__ */ i(O.Provider, { value: { collapsible: r, open: u, toggle: m }, children: e })
749
898
  }
750
899
  );
751
900
  }
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(
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(
755
904
  "div",
756
905
  {
757
- onClick: i ? l : void 0,
906
+ onClick: a ? l : void 0,
758
907
  style: {
759
908
  display: "flex",
760
909
  alignItems: "center",
@@ -764,28 +913,28 @@ function ye({ children: e, trailing: t, style: r }) {
764
913
  borderBottom: `1px solid ${n.stroke.secondary}`,
765
914
  fontSize: n.typography.small.fontSize,
766
915
  fontWeight: n.typography.h3.fontWeight,
767
- color: n.text.tertiary,
916
+ color: n.text.primary,
768
917
  fontFamily: n.typography.fontFamily,
769
- cursor: i ? "pointer" : void 0,
770
- userSelect: i ? "none" : void 0,
918
+ cursor: a ? "pointer" : void 0,
919
+ userSelect: a ? "none" : void 0,
771
920
  ...r
772
921
  },
773
922
  children: [
774
- /* @__PURE__ */ p("span", { style: { display: "inline-flex", alignItems: "center", gap: 6 }, children: [
775
- i && /* @__PURE__ */ s(ct, { expanded: o }),
923
+ /* @__PURE__ */ y("span", { style: { display: "inline-flex", alignItems: "center", gap: 6 }, children: [
924
+ a && /* @__PURE__ */ i(he, { expanded: o }),
776
925
  e
777
926
  ] }),
778
- t != null && /* @__PURE__ */ s("span", { children: t })
927
+ t != null && /* @__PURE__ */ i("span", { children: t })
779
928
  ]
780
929
  }
781
930
  );
782
931
  }
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 });
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 });
786
935
  }
787
- function ct({ expanded: e }) {
788
- return /* @__PURE__ */ s(
936
+ function he({ expanded: e }) {
937
+ return /* @__PURE__ */ i(
789
938
  "svg",
790
939
  {
791
940
  width: 12,
@@ -797,7 +946,7 @@ function ct({ expanded: e }) {
797
946
  transition: "transform 120ms"
798
947
  },
799
948
  "aria-hidden": !0,
800
- children: /* @__PURE__ */ s(
949
+ children: /* @__PURE__ */ i(
801
950
  "path",
802
951
  {
803
952
  d: "M4 2.5L8 6l-4 3.5",
@@ -810,176 +959,176 @@ function ct({ expanded: e }) {
810
959
  }
811
960
  );
812
961
  }
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(
962
+ function Et({ value: e, label: t, tone: r, style: n }) {
963
+ const a = g();
964
+ return /* @__PURE__ */ y("div", { style: n, children: [
965
+ /* @__PURE__ */ i(
817
966
  H,
818
967
  {
819
968
  fz: 22,
820
969
  fw: 700,
821
970
  lh: 1.2,
822
971
  style: {
823
- color: r ? k[r] : i.text.primary,
824
- fontFamily: i.typography.fontFamily
972
+ color: r ? k[r] : a.text.primary,
973
+ fontFamily: a.typography.fontFamily
825
974
  },
826
975
  children: e
827
976
  }
828
977
  ),
829
- /* @__PURE__ */ s(
978
+ /* @__PURE__ */ i(
830
979
  H,
831
980
  {
832
981
  fz: 12,
833
982
  style: {
834
- color: i.text.tertiary,
835
- fontFamily: i.typography.fontFamily
983
+ color: a.text.tertiary,
984
+ fontFamily: a.typography.fontFamily
836
985
  },
837
986
  children: t
838
987
  }
839
988
  )
840
989
  ] });
841
990
  }
842
- function xe({
991
+ function Dt({
843
992
  children: e,
844
993
  active: t,
845
994
  tone: r = "neutral",
846
995
  size: n = "md",
847
- leadingContent: i,
996
+ leadingContent: a,
848
997
  keyboardHint: o,
849
998
  title: l,
850
- style: u,
999
+ style: f,
851
1000
  onClick: d
852
1001
  }) {
853
- return /* @__PURE__ */ s(
854
- bt,
1002
+ return /* @__PURE__ */ i(
1003
+ we,
855
1004
  {
856
- color: nt[r],
1005
+ color: ae[r],
857
1006
  variant: t ? "filled" : "light",
858
1007
  size: n === "sm" ? "sm" : "md",
859
- leftSection: i,
1008
+ leftSection: a,
860
1009
  rightSection: o,
861
1010
  title: l,
862
1011
  onClick: d,
863
1012
  style: {
864
1013
  cursor: d ? "pointer" : void 0,
865
1014
  textTransform: "none",
866
- ...u
1015
+ ...f
867
1016
  },
868
1017
  children: e
869
1018
  }
870
1019
  );
871
1020
  }
872
- function ve({
1021
+ function It({
873
1022
  children: e,
874
1023
  tone: t = "neutral",
875
1024
  title: r,
876
1025
  icon: n,
877
- style: i
1026
+ style: a
878
1027
  }) {
879
- return /* @__PURE__ */ s(
880
- yt,
1028
+ return /* @__PURE__ */ i(
1029
+ ve,
881
1030
  {
882
- color: nt[t],
1031
+ color: ae[t],
883
1032
  title: r,
884
1033
  icon: n,
885
1034
  variant: "light",
886
- style: i,
1035
+ style: a,
887
1036
  children: e
888
1037
  }
889
1038
  );
890
1039
  }
891
- const jt = {
1040
+ const rt = {
892
1041
  success: "rgba(31,138,101,0.12)",
893
1042
  danger: "rgba(207,45,86,0.12)",
894
1043
  warning: "rgba(232,163,61,0.14)",
895
1044
  info: "rgba(46,121,181,0.12)",
896
1045
  neutral: "rgba(136,136,168,0.12)"
897
1046
  };
898
- function be({
1047
+ function Nt({
899
1048
  headers: e,
900
1049
  rows: t,
901
1050
  columnAlign: r,
902
1051
  rowTone: n,
903
- framed: i = !0,
1052
+ framed: a = !0,
904
1053
  striped: o,
905
1054
  stickyHeader: l,
906
- style: u,
1055
+ style: f,
907
1056
  emptyMessage: d
908
1057
  }) {
909
- return /* @__PURE__ */ p(
910
- S,
1058
+ return /* @__PURE__ */ y(
1059
+ w,
911
1060
  {
912
- withTableBorder: i,
1061
+ withTableBorder: a,
913
1062
  withColumnBorders: !1,
914
1063
  striped: o,
915
1064
  stickyHeader: l,
916
1065
  highlightOnHover: !0,
917
- style: u,
1066
+ style: f,
918
1067
  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,
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];
1071
+ return /* @__PURE__ */ i(
1072
+ w.Tr,
924
1073
  {
925
- style: m ? { background: jt[m] } : void 0,
926
- children: e.map((x, b) => /* @__PURE__ */ s(
927
- S.Td,
1074
+ style: m ? { background: rt[m] } : void 0,
1075
+ children: e.map((v, h) => /* @__PURE__ */ i(
1076
+ w.Td,
928
1077
  {
929
- ta: (r == null ? void 0 : r[b]) ?? "left",
930
- children: c[b]
1078
+ ta: (r == null ? void 0 : r[h]) ?? "left",
1079
+ children: c[h]
931
1080
  },
932
- b
1081
+ h
933
1082
  ))
934
1083
  },
935
- f
1084
+ u
936
1085
  );
937
1086
  }) })
938
1087
  ]
939
1088
  }
940
1089
  );
941
1090
  }
942
- const Gt = {
1091
+ const nt = {
943
1092
  primary: "filled",
944
1093
  secondary: "default",
945
1094
  ghost: "subtle"
946
1095
  };
947
- function ke({
1096
+ function Rt({
948
1097
  children: e,
949
1098
  variant: t = "secondary",
950
1099
  disabled: r,
951
1100
  type: n = "button",
952
- style: i,
1101
+ style: a,
953
1102
  onClick: o
954
1103
  }) {
955
- return /* @__PURE__ */ s(
956
- pt,
1104
+ return /* @__PURE__ */ i(
1105
+ xe,
957
1106
  {
958
- variant: Gt[t],
1107
+ variant: nt[t],
959
1108
  color: t === "primary" ? "accent" : void 0,
960
1109
  size: "xs",
961
1110
  disabled: r,
962
1111
  type: n,
963
1112
  onClick: o,
964
- style: i,
1113
+ style: a,
965
1114
  children: e
966
1115
  }
967
1116
  );
968
1117
  }
969
- function Se({
1118
+ function zt({
970
1119
  children: e,
971
1120
  onClick: t,
972
1121
  disabled: r,
973
1122
  title: n,
974
- variant: i = "default",
1123
+ variant: a = "default",
975
1124
  size: o = "md",
976
1125
  style: l
977
1126
  }) {
978
- return /* @__PURE__ */ s(
979
- vt,
1127
+ return /* @__PURE__ */ i(
1128
+ Ce,
980
1129
  {
981
- variant: i === "circle" ? "light" : "subtle",
982
- radius: i === "circle" ? "xl" : "sm",
1130
+ variant: a === "circle" ? "light" : "subtle",
1131
+ radius: a === "circle" ? "xl" : "sm",
983
1132
  size: o === "sm" ? "sm" : "md",
984
1133
  color: "gray",
985
1134
  disabled: r,
@@ -991,21 +1140,21 @@ function Se({
991
1140
  }
992
1141
  );
993
1142
  }
994
- function we({
1143
+ function Ht({
995
1144
  value: e,
996
1145
  onChange: t,
997
1146
  options: r,
998
1147
  placeholder: n,
999
- disabled: i,
1148
+ disabled: a,
1000
1149
  style: o
1001
1150
  }) {
1002
- return /* @__PURE__ */ s(
1003
- St,
1151
+ return /* @__PURE__ */ i(
1152
+ Te,
1004
1153
  {
1005
1154
  value: e,
1006
1155
  data: r,
1007
1156
  placeholder: n,
1008
- disabled: i,
1157
+ disabled: a,
1009
1158
  allowDeselect: !1,
1010
1159
  onChange: (l) => {
1011
1160
  l !== null && (t == null || t(l));
@@ -1014,86 +1163,86 @@ function we({
1014
1163
  }
1015
1164
  );
1016
1165
  }
1017
- function Ce({
1166
+ function _t({
1018
1167
  checked: e,
1019
1168
  onChange: t,
1020
1169
  disabled: r,
1021
1170
  label: n,
1022
- style: i
1171
+ style: a
1023
1172
  }) {
1024
- return /* @__PURE__ */ s(
1025
- mt,
1173
+ return /* @__PURE__ */ i(
1174
+ Se,
1026
1175
  {
1027
1176
  checked: e,
1028
1177
  disabled: r,
1029
1178
  label: n,
1030
1179
  onChange: (o) => t == null ? void 0 : t(o.currentTarget.checked),
1031
- style: i
1180
+ style: a
1032
1181
  }
1033
1182
  );
1034
1183
  }
1035
- function Te({
1184
+ function Wt({
1036
1185
  checked: e,
1037
1186
  onChange: t,
1038
1187
  disabled: r,
1039
1188
  size: n = "sm",
1040
- style: i
1189
+ style: a
1041
1190
  }) {
1042
- return /* @__PURE__ */ s(
1043
- Lt,
1191
+ return /* @__PURE__ */ i(
1192
+ $e,
1044
1193
  {
1045
1194
  checked: e,
1046
1195
  disabled: r,
1047
1196
  size: n === "sm" ? "sm" : "md",
1048
1197
  onChange: (o) => t == null ? void 0 : t(o.currentTarget.checked),
1049
- style: i
1198
+ style: a
1050
1199
  }
1051
1200
  );
1052
1201
  }
1053
- function Le({
1202
+ function Gt({
1054
1203
  value: e,
1055
1204
  onChange: t,
1056
1205
  placeholder: r,
1057
1206
  disabled: n,
1058
- type: i,
1207
+ type: a,
1059
1208
  style: o
1060
1209
  }) {
1061
- return /* @__PURE__ */ s(
1062
- Tt,
1210
+ return /* @__PURE__ */ i(
1211
+ Ae,
1063
1212
  {
1064
1213
  value: e,
1065
1214
  placeholder: r,
1066
1215
  disabled: n,
1067
- type: i,
1216
+ type: a,
1068
1217
  onChange: (l) => t == null ? void 0 : t(l.currentTarget.value),
1069
1218
  style: o
1070
1219
  }
1071
1220
  );
1072
1221
  }
1073
- function Me({
1222
+ function jt({
1074
1223
  value: e,
1075
1224
  onChange: t,
1076
1225
  placeholder: r,
1077
1226
  disabled: n,
1078
- rows: i = 3,
1227
+ rows: a = 3,
1079
1228
  style: o
1080
1229
  }) {
1081
- return /* @__PURE__ */ s(
1082
- Ct,
1230
+ return /* @__PURE__ */ i(
1231
+ Me,
1083
1232
  {
1084
1233
  value: e,
1085
1234
  placeholder: r,
1086
1235
  disabled: n,
1087
1236
  autosize: !0,
1088
- minRows: i,
1237
+ minRows: a,
1089
1238
  onChange: (l) => t == null ? void 0 : t(l.currentTarget.value),
1090
1239
  style: o
1091
1240
  }
1092
1241
  );
1093
1242
  }
1094
- function Be({ color: e, style: t }) {
1095
- const r = y();
1096
- return /* @__PURE__ */ s(
1243
+ function Ot({ color: e, style: t }) {
1244
+ const r = g();
1245
+ return /* @__PURE__ */ i(
1097
1246
  "span",
1098
1247
  {
1099
1248
  style: {
@@ -1108,19 +1257,19 @@ function Be({ color: e, style: t }) {
1108
1257
  }
1109
1258
  );
1110
1259
  }
1111
- function Fe({
1260
+ function Kt({
1112
1261
  segments: e,
1113
1262
  total: t,
1114
1263
  topLeftLabel: r,
1115
1264
  topRightLabel: n,
1116
- style: i
1265
+ style: a
1117
1266
  }) {
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),
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),
1120
1269
  0
1121
- ), d = Math.max(0, l - u);
1122
- return /* @__PURE__ */ p("div", { style: i, children: [
1123
- (r != null || n != null) && /* @__PURE__ */ p(
1270
+ ), d = Math.max(0, l - f);
1271
+ return /* @__PURE__ */ y("div", { style: a, children: [
1272
+ (r != null || n != null) && /* @__PURE__ */ y(
1124
1273
  "div",
1125
1274
  {
1126
1275
  style: {
@@ -1131,27 +1280,27 @@ function Fe({
1131
1280
  marginBottom: 6
1132
1281
  },
1133
1282
  children: [
1134
- /* @__PURE__ */ s("span", { children: r }),
1135
- /* @__PURE__ */ s("span", { children: n })
1283
+ /* @__PURE__ */ i("span", { children: r }),
1284
+ /* @__PURE__ */ i("span", { children: n })
1136
1285
  ]
1137
1286
  }
1138
1287
  ),
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(
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]];
1291
+ return /* @__PURE__ */ i(
1143
1292
  "div",
1144
1293
  {
1145
1294
  style: {
1146
1295
  width: `${m / l * 100}%`,
1147
- background: x,
1296
+ background: v,
1148
1297
  borderRadius: 3
1149
1298
  }
1150
1299
  },
1151
1300
  c.id
1152
1301
  );
1153
1302
  }),
1154
- d > 0 && /* @__PURE__ */ s(
1303
+ d > 0 && /* @__PURE__ */ i(
1155
1304
  "div",
1156
1305
  {
1157
1306
  style: {
@@ -1164,21 +1313,21 @@ function Fe({
1164
1313
  ] })
1165
1314
  ] });
1166
1315
  }
1167
- function $e({
1316
+ function Xt({
1168
1317
  title: e,
1169
1318
  leading: t,
1170
1319
  count: r,
1171
1320
  trailing: n,
1172
- children: i,
1321
+ children: a,
1173
1322
  defaultOpen: o = !1,
1174
1323
  style: l
1175
1324
  }) {
1176
- const u = y(), [d, c] = I(o);
1177
- return /* @__PURE__ */ p("div", { style: l, children: [
1178
- /* @__PURE__ */ p(
1325
+ const f = g(), [d, c] = B(o);
1326
+ return /* @__PURE__ */ y("div", { style: l, children: [
1327
+ /* @__PURE__ */ y(
1179
1328
  "div",
1180
1329
  {
1181
- onClick: () => c((f) => !f),
1330
+ onClick: () => c((u) => !u),
1182
1331
  style: {
1183
1332
  display: "flex",
1184
1333
  alignItems: "center",
@@ -1186,75 +1335,75 @@ function $e({
1186
1335
  padding: "4px 0",
1187
1336
  cursor: "pointer",
1188
1337
  userSelect: "none",
1189
- color: u.text.primary,
1338
+ color: f.text.primary,
1190
1339
  fontSize: 14
1191
1340
  },
1192
1341
  children: [
1193
- /* @__PURE__ */ s(ct, { expanded: d }),
1342
+ /* @__PURE__ */ i(he, { expanded: d }),
1194
1343
  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 })
1344
+ /* @__PURE__ */ i("span", { style: { fontWeight: 500 }, children: e }),
1345
+ r != null && /* @__PURE__ */ i("span", { style: { color: f.text.tertiary, fontSize: 12 }, children: r }),
1346
+ /* @__PURE__ */ i("span", { style: { flex: 1 } }),
1347
+ n != null && /* @__PURE__ */ i("span", { style: { color: f.text.tertiary }, children: n })
1199
1348
  ]
1200
1349
  }
1201
1350
  ),
1202
- d && /* @__PURE__ */ s("div", { style: { paddingLeft: 18, paddingBottom: 4 }, children: i })
1351
+ d && /* @__PURE__ */ i("div", { style: { paddingLeft: 18, paddingBottom: 4 }, children: a })
1203
1352
  ] });
1204
1353
  }
1205
1354
  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
1355
+ dt as BarChart,
1356
+ Rt as Button,
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,
1381
+ Ot as Swatch,
1382
+ Nt as Table,
1383
+ kt as Text,
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
1260
1409
  };