@flesler/cursor-canvas-web 1.1.1 → 1.2.0

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