@graphysdk/react-renderer 1.9.0-beta.1794569506652 → 1.9.0-beta.1794586691328

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,21 +1,21 @@
1
- import { $n as Pr, A as Dr, An as Lr, At as qr, B as _r, Cn as kr, Dn as $r, Dt as Hr, En as xr, Fn as Mr, G as Ar, Gn as Le, Gt as Or, Hn as Br, Ht as Fr, In as qe, J as Kr, Jt as zr, K as Ur, Kn as Wr, Ln as F, Mn as ee, Nn as Ge, Nt as Yr, On as K, Pn as _e, Qn as jr, R as Vr, Rn as z, Un as ke, Vn as Xr, Wn as $e, Xn as Re, Yn as He, Yt as Jr, Zn as Qr, Zt as Q, _t as Zr, a as en, an as xe, dn as Me, en as Ae, er as tn, fn as rn, hn as nn, i as sn, in as te, ir as Oe, jn as Be, jt as on, kn as Ne, l as an, ln as cn, mn as ln, n as dn, nn as un, nr as Fe, on as mn, or as Z, pn as hn, q as gn, qn as Ke, qt as fn, r as pn, rn as vn, rr as oe, t as ze, tn as Ue, tr as We, un as Ye, vt as yn, xt as Sn, y as bn, yn as Tn, yt as En, z as Gn, zn as Rn, zt as Nn } from "./history-chords-L-9s4-lq.js";
2
- import { COMPILER_STAGE_KEYS as ie, DEFAULT_LOCALE as je, Geom as Ve, GraphCompilationSession as Xe, areEditTargetsEqual as Je, buildDiagnostic as de, buildPointSymbolPath as Qe, canonicalizeLocale as Ze, createAnchorResolver as et, createCompiler as tt, createDataLabelPlacementResolver as rt, createSpecBuilder as nt, createStyleResolver as Ie, findAnnotation as st, findIntlLocale as ot, findLayerById as ue, foldGeomCornerRadii as it, isCompilerCachingEnabled as at, isGeometricSymbol as ae, isImageSymbol as ct, resolveDefinition as lt, resolveGeomCornerRadiusPx as me, setCompilerCachingEnabled as dt, toPercent as X } from "@graphysdk/viz-engine";
3
- import { Component as ut, useCallback as f, useEffect as _, useId as mt, useImperativeHandle as ht, useMemo as H, useRef as he, useState as S, useSyncExternalStore as gt } from "react";
1
+ import { $n as Dr, $t as qe, A as Lr, An as ke, At as qr, B as kr, Dn as F, En as _r, Et as $r, Fn as _e, G as Hr, Gn as $e, Hn as xr, In as K, J as Mr, Jt as Ar, K as Or, Kn as Br, Kt as Fr, Ln as ee, Mn as Re, Mt as Kr, Nn as He, On as Ie, Pn as zr, Qn as Ur, R as Wr, Rn as z, Rt as Vr, Sn as Yr, Tn as jr, Un as xe, Vn as Xr, Vt as Jr, Wn as Me, Wt as Qr, Xn as Ne, Xt as Q, Yn as Ae, Zn as Zr, _t as en, a as tn, an as rn, bt as nn, cn as sn, dn as on, en as Oe, er as an, fn as cn, i as ln, in as Be, ir as Fe, jn as te, kn as dn, kt as un, l as mn, ln as Ke, mn as hn, n as gn, nn as pn, nr as ze, or as Z, pn as fn, q as vn, qn as Ue, qt as yn, r as Sn, rn as re, rr as ie, t as We, tn as bn, tr as Ve, un as Ye, vn as Tn, vt as En, y as Gn, yt as Rn, z as In, zn as Nn } from "./history-chords-D6QY_KYF.js";
2
+ import { COMPILER_STAGE_KEYS as ae, DEFAULT_LOCALE as je, Geom as Xe, GraphCompilationSession as Je, areEditTargetsEqual as Qe, buildDiagnostic as ue, buildPointSymbolPath as Ze, canonicalizeLocale as et, createAnchorResolver as tt, createCompiler as rt, createDataLabelPlacementResolver as nt, createSpecBuilder as st, createStyleResolver as we, findAnnotation as ot, findIntlLocale as it, findLayerById as me, foldGeomCornerRadii as at, isCompilerCachingEnabled as ct, isGeometricSymbol as ce, isImageSymbol as lt, resolveDefinition as dt, resolveGeomCornerRadiusPx as he, setCompilerCachingEnabled as ut, toPercent as X } from "@graphysdk/viz-engine";
3
+ import { Component as mt, useCallback as p, useEffect as k, useId as ht, useImperativeHandle as gt, useMemo as H, useRef as ge, useState as S, useSyncExternalStore as pt } from "react";
4
4
  import { Fragment as ft, jsx as c, jsxs as v } from "react/jsx-runtime";
5
- import { useStore as se } from "zustand";
6
- import { motion as re } from "motion/react";
7
- import { createStore as ce } from "zustand/vanilla";
8
- import pt from "clsx";
9
- import './index.css';var vt = "_1a5iqpb0", yt = "_1a5iqpb1";
10
- var St = "_1a5iqpb3", bt = "_1a5iqpb4", Tt = "_1a5iqpb5";
11
- var ge = ({ errors: e }) => {
5
+ import { useStore as oe } from "zustand";
6
+ import { motion as ne } from "motion/react";
7
+ import { createStore as le } from "zustand/vanilla";
8
+ import vt from "clsx";
9
+ import './index.css';var yt = "_1a5iqpb0", St = "_1a5iqpb1";
10
+ var bt = "_1a5iqpb3", Tt = "_1a5iqpb4", Et = "_1a5iqpb5";
11
+ var pe = ({ errors: e }) => {
12
12
  const [t, ...r] = e;
13
13
  return /* @__PURE__ */ v("div", {
14
14
  role: "alert",
15
- className: vt,
15
+ className: yt,
16
16
  children: [
17
17
  /* @__PURE__ */ c("strong", {
18
- className: yt,
18
+ className: St,
19
19
  children: "This chart could not be rendered."
20
20
  }),
21
21
  t && /* @__PURE__ */ c(fe, { diagnostic: t }),
@@ -26,14 +26,14 @@ var ge = ({ errors: e }) => {
26
26
  ]
27
27
  });
28
28
  }, fe = ({ diagnostic: e }) => /* @__PURE__ */ v("div", {
29
- className: St,
29
+ className: bt,
30
30
  children: [
31
31
  /* @__PURE__ */ c("span", {
32
- className: bt,
32
+ className: Tt,
33
33
  children: e.code
34
34
  }),
35
35
  /* @__PURE__ */ c("p", {
36
- className: Tt,
36
+ className: Et,
37
37
  children: e.message
38
38
  }),
39
39
  e.suggestion && /* @__PURE__ */ c("p", {
@@ -42,47 +42,47 @@ var ge = ({ errors: e }) => {
42
42
  })
43
43
  ]
44
44
  });
45
- function Et(e = [], t = []) {
45
+ function Gt(e = [], t = []) {
46
46
  return e.length === t.length && e.every((r, n) => Object.is(r, t[n]));
47
47
  }
48
- var Gt = class extends ut {
48
+ var Rt = class extends mt {
49
49
  constructor(...e) {
50
50
  super(...e), this.state = { caughtDiagnostic: null };
51
51
  }
52
52
  static getDerivedStateFromError(e) {
53
- return { caughtDiagnostic: de(e) };
53
+ return { caughtDiagnostic: ue(e) };
54
54
  }
55
55
  componentDidCatch(e, t) {
56
- const r = de(e);
56
+ const r = ue(e);
57
57
  Z([r]), this.props.onError?.([r]), console.error("Chart render component stack:", t.componentStack);
58
58
  }
59
59
  componentDidUpdate(e) {
60
- this.state.caughtDiagnostic && !Et(e.resetKeys, this.props.resetKeys) && this.setState({ caughtDiagnostic: null });
60
+ this.state.caughtDiagnostic && !Gt(e.resetKeys, this.props.resetKeys) && this.setState({ caughtDiagnostic: null });
61
61
  }
62
62
  render() {
63
63
  const { caughtDiagnostic: e } = this.state;
64
- if (e) return /* @__PURE__ */ c(ge, { errors: [e] });
64
+ if (e) return /* @__PURE__ */ c(pe, { errors: [e] });
65
65
  const { forcedErrors: t, children: r } = this.props;
66
- return t && t.length > 0 ? /* @__PURE__ */ c(ge, { errors: t }) : r;
66
+ return t && t.length > 0 ? /* @__PURE__ */ c(pe, { errors: t }) : r;
67
67
  }
68
- }, we = (e) => typeof e == "object" && "geom" in e && "render" in e, Ce = (e) => {
69
- const t = lt(e);
70
- return t instanceof Ve ? t : null;
71
- }, Rt = (e, t) => {
68
+ }, Pe = (e) => typeof e == "object" && "geom" in e && "render" in e, Ce = (e) => {
69
+ const t = dt(e);
70
+ return t instanceof Xe ? t : null;
71
+ }, It = (e, t) => {
72
72
  const r = e.filter((n) => Nt(n, t));
73
73
  return r.length === e.length ? e : r;
74
- }, Nt = (e, t) => e.kind === "annotation" ? st(t.annotations, e.id) !== null : e.kind === "observations" ? ue(t.layers, e.layerId) !== void 0 : e.kind === "layer" && e.layerId !== void 0 ? ue(t.layers, e.layerId) !== void 0 : !0, pe = [], It = () => ce((e) => ({
75
- selection: pe,
76
- setSelection: (t) => e((r) => wt(r.selection, t) ? r : { selection: t }),
77
- clearSelection: () => e((t) => t.selection.length === 0 ? t : { selection: pe })
78
- })), wt = (e, t) => e === t ? !0 : e.length !== t.length ? !1 : e.every((r, n) => {
74
+ }, Nt = (e, t) => e.kind === "annotation" ? ot(t.annotations, e.id) !== null : e.kind === "observations" ? me(t.layers, e.layerId) !== void 0 : e.kind === "layer" && e.layerId !== void 0 ? me(t.layers, e.layerId) !== void 0 : !0, ve = [], wt = () => le((e) => ({
75
+ selection: ve,
76
+ setSelection: (t) => e((r) => Pt(r.selection, t) ? r : { selection: t }),
77
+ clearSelection: () => e((t) => t.selection.length === 0 ? t : { selection: ve })
78
+ })), Pt = (e, t) => e === t ? !0 : e.length !== t.length ? !1 : e.every((r, n) => {
79
79
  const s = t[n];
80
- return s !== void 0 && Je(r, s);
81
- }), Ct = 5, Pt = (e) => {
82
- if (!Re) return {
80
+ return s !== void 0 && Qe(r, s);
81
+ }), Ct = 5, Dt = (e) => {
82
+ if (!Ne) return {
83
83
  emit: () => {
84
84
  },
85
- subscribe: () => Lt,
85
+ subscribe: () => qt,
86
86
  getLastTrigger: () => null,
87
87
  getLastCompile: () => null,
88
88
  getCacheStats: () => e.getCacheStats()
@@ -104,7 +104,7 @@ var Gt = class extends ut {
104
104
  getLastCompile: () => e.getLastCompile(),
105
105
  getCacheStats: () => e.getCacheStats()
106
106
  };
107
- }, Dt = () => ce((e) => ({
107
+ }, Lt = () => le((e) => ({
108
108
  lastCompile: null,
109
109
  history: [],
110
110
  nextId: 1,
@@ -113,7 +113,7 @@ var Gt = class extends ut {
113
113
  if (n.lastSnapshot === r) return n;
114
114
  const s = {
115
115
  id: n.nextId,
116
- label: qt(t),
116
+ label: kt(t),
117
117
  stages: r.stages,
118
118
  stageDurationsMs: r.stageDurationsMs,
119
119
  durationMs: r.durationMs
@@ -125,8 +125,8 @@ var Gt = class extends ut {
125
125
  lastSnapshot: r
126
126
  };
127
127
  })
128
- })), Lt = () => {
129
- }, qt = (e) => {
128
+ })), qt = () => {
129
+ }, kt = (e) => {
130
130
  switch (e.kind) {
131
131
  case "init":
132
132
  return "init";
@@ -141,8 +141,8 @@ var Gt = class extends ut {
141
141
  const n = e.length >= r ? e.length - (r - 1) : 0;
142
142
  return [...e.slice(n), t];
143
143
  };
144
- function ve(e) {
145
- const t = e.filter(we), r = /* @__PURE__ */ new Set([...Object.keys(xe), ...t.map((l) => l.geom)]), n = [], s = /* @__PURE__ */ new Set();
144
+ function ye(e) {
145
+ const t = e.filter(Pe), r = /* @__PURE__ */ new Set([...Object.keys(Be), ...t.map((l) => l.geom)]), n = [], s = /* @__PURE__ */ new Set();
146
146
  for (const l of e) {
147
147
  const d = Ce(l);
148
148
  d === null || r.has(d.type) || s.has(d.type) || (s.add(d.type), n.push({
@@ -180,12 +180,12 @@ function ve(e) {
180
180
  },
181
181
  suggestion: `Keep a single render-only override for ('${l}', '${d}').`
182
182
  });
183
- return a.push(...Ft(e)), {
183
+ return a.push(...Kt(e)), {
184
184
  errors: n,
185
185
  warnings: a
186
186
  };
187
187
  }
188
- function kt(e, t) {
188
+ function $t(e, t) {
189
189
  const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(), i = [];
190
190
  for (const a of n)
191
191
  t(a.geom, r.type) !== null || s.has(a.geom) || (s.add(a.geom), i.push({
@@ -201,12 +201,12 @@ function kt(e, t) {
201
201
  }));
202
202
  return i;
203
203
  }
204
- function $t(e, t) {
204
+ function Ht(e, t) {
205
205
  const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(), i = [];
206
206
  for (const a of n) {
207
207
  if (a.interactive === !1 || a.spatialKind !== "renderHitTest" || s.has(a.geom)) continue;
208
208
  const l = t(a.geom, r.type);
209
- l === null || l.hitTest || te(l) || (s.add(a.geom), i.push({
209
+ l === null || l.hitTest || re(l) || (s.add(a.geom), i.push({
210
210
  kind: "userInput",
211
211
  severity: "warning",
212
212
  code: "MISSING_RENDER_HIT_TEST",
@@ -220,7 +220,7 @@ function $t(e, t) {
220
220
  }
221
221
  return i;
222
222
  }
223
- function Ht(e) {
223
+ function xt(e) {
224
224
  const t = /* @__PURE__ */ new Set(), r = [];
225
225
  for (const n of e.layers) {
226
226
  const s = n.identityKey;
@@ -238,12 +238,12 @@ function Ht(e) {
238
238
  }
239
239
  return r;
240
240
  }
241
- function xt(e, t) {
241
+ function Mt(e, t) {
242
242
  const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(), i = [];
243
243
  for (const a of n) {
244
244
  if (a.interactive === !1 || a.spatialKind !== "renderHitTest" || s.has(a.geom)) continue;
245
245
  const l = t(a.geom, r.type);
246
- l === null || !l.hitTest || !te(l) || (s.add(a.geom), i.push({
246
+ l === null || !l.hitTest || !re(l) || (s.add(a.geom), i.push({
247
247
  kind: "userInput",
248
248
  severity: "warning",
249
249
  code: "CONFLICTING_RENDER_HIT_TEST",
@@ -257,7 +257,7 @@ function xt(e, t) {
257
257
  }
258
258
  return i;
259
259
  }
260
- function Mt(e, t) {
260
+ function At(e, t) {
261
261
  const r = /* @__PURE__ */ new Set(), n = [];
262
262
  for (const s of e.layers)
263
263
  s.interactive !== !1 && (s.spatialKind !== "renderHitTest" || r.has(s.geom) || t.hasCapability(s.geom) || (r.add(s.geom), n.push({
@@ -273,12 +273,12 @@ function Mt(e, t) {
273
273
  })));
274
274
  return n;
275
275
  }
276
- function At(e, t) {
276
+ function Ot(e, t) {
277
277
  const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(), i = [];
278
278
  for (const a of n) {
279
279
  if (a.interactive === !1 || a.spatialKind === "renderHitTest" || s.has(a.geom)) continue;
280
280
  const l = t(a.geom, r.type);
281
- l === null || !te(l) || (s.add(a.geom), i.push({
281
+ l === null || !re(l) || (s.add(a.geom), i.push({
282
282
  kind: "userInput",
283
283
  severity: "warning",
284
284
  code: "LIVE_RENDER_REQUIRES_RENDER_HIT_TEST",
@@ -292,9 +292,9 @@ function At(e, t) {
292
292
  }
293
293
  return i;
294
294
  }
295
- function Ot(e, t) {
295
+ function Bt(e, t) {
296
296
  let r;
297
- return e.layers.flatMap((n, s) => te(t(n.geom, e.coordSystem.type)) ? Bt(n) ? (r ??= Ie().readers(e), (r.geom(n).get("overpaint", void 0, "hovered")?.length ?? 0) === 0 ? [] : [{
297
+ return e.layers.flatMap((n, s) => re(t(n.geom, e.coordSystem.type)) ? Ft(n) ? (r ??= we().readers(e), (r.geom(n).get("overpaint", void 0, "hovered")?.length ?? 0) === 0 ? [] : [{
298
298
  kind: "userInput",
299
299
  severity: "warning",
300
300
  code: "INVALID_STYLE_RULE",
@@ -307,8 +307,8 @@ function Ot(e, t) {
307
307
  suggestion: "Remove the hovered overpaint, or paint the hover treatment in the geom's live render."
308
308
  }]) : [] : []);
309
309
  }
310
- var Bt = (e) => [e.styles.defaults, e.styles.overrides].some((t) => t.some((r) => r.state === "hovered" && (r.declarations.overpaint?.length ?? 0) > 0));
311
- function Ft(e) {
310
+ var Ft = (e) => [e.styles.defaults, e.styles.overrides].some((t) => t.some((r) => r.state === "hovered" && (r.declarations.overpaint?.length ?? 0) > 0));
311
+ function Kt(e) {
312
312
  const t = /* @__PURE__ */ new Set(), r = [];
313
313
  for (const n of e) {
314
314
  const s = Ce(n);
@@ -326,65 +326,65 @@ function Ft(e) {
326
326
  }
327
327
  return r;
328
328
  }
329
- var Kt = (e) => ce((t) => ({
329
+ var zt = (e) => le((t) => ({
330
330
  scene: e,
331
331
  setScene: (r) => t((n) => n.scene === r ? n : { scene: r })
332
- })), zt = ({ spec: e, data: t, colorScheme: r, plugins: n, theme: s, resolveRenderer: i, anchorResolver: a, onSpecChange: l, onError: d, onWarnings: g }) => {
333
- const b = Q(l), P = Q(d), G = Q(g), [{ session: m, compileBus: h, findGeom: T }] = S(() => {
334
- const o = tt({
332
+ })), Ut = ({ spec: e, data: t, colorScheme: r, plugins: n, theme: s, resolveRenderer: i, anchorResolver: a, onSpecChange: l, onError: d, onWarnings: g }) => {
333
+ const b = Q(l), C = Q(d), G = Q(g), [{ session: m, compileBus: h, findGeom: T }] = S(() => {
334
+ const o = rt({
335
335
  plugins: n,
336
336
  theme: s
337
337
  });
338
338
  return {
339
- session: new Xe(o),
340
- compileBus: Pt(o),
339
+ session: new Je(o),
340
+ compileBus: Dt(o),
341
341
  findGeom: (u) => o.findGeom(u)
342
342
  };
343
- }), [p] = S(() => {
344
- const o = ve(n ?? []), u = ve(s?.plugins ?? []);
343
+ }), [f] = S(() => {
344
+ const o = ye(n ?? []), u = ye(s?.plugins ?? []);
345
345
  return {
346
346
  errors: [...u.errors, ...o.errors],
347
347
  warnings: [...u.warnings, ...o.warnings]
348
348
  };
349
- }), x = he(null), [D] = S(Ut), E = he(null), y = f((o) => p.errors.length === 0 ? o : [...p.errors, ...o ?? []], [p]), k = f((o) => {
349
+ }), x = ge(null), [D] = S(Wt), E = ge(null), y = p((o) => f.errors.length === 0 ? o : [...f.errors, ...o ?? []], [f]), _ = p((o) => {
350
350
  if (!o.ok) return o.errors;
351
351
  if (E.current) E.current.getState().setScene(o.scene);
352
352
  else {
353
- const u = Kt(o.scene);
353
+ const u = zt(o.scene);
354
354
  u.subscribe(D.notify), E.current = u, D.notify();
355
355
  }
356
356
  return null;
357
- }, [D]), [U, N] = S(() => {
357
+ }, [D]), [U, I] = S(() => {
358
358
  const o = m.compile({
359
359
  spec: e,
360
360
  data: t,
361
361
  colorScheme: r
362
362
  });
363
- return x.current = o, y(k(o));
364
- }), I = f((o) => o.ok ? [
363
+ return x.current = o, y(_(o));
364
+ }), N = p((o) => o.ok ? [
365
365
  ...o.warnings,
366
- ...kt(o.scene, i),
367
366
  ...$t(o.scene, i),
368
- ...Ht(o.scene),
369
- ...xt(o.scene, i),
370
- ...At(o.scene, i),
367
+ ...Ht(o.scene, i),
368
+ ...xt(o.scene),
369
+ ...Mt(o.scene, i),
371
370
  ...Ot(o.scene, i),
372
- ...Mt(o.scene, a)
373
- ] : o.warnings, [i, a]), w = f((o) => {
374
- o.length !== 0 && (Z(o), P.current?.(o));
375
- }, [P]), C = f((o) => {
371
+ ...Bt(o.scene, i),
372
+ ...At(o.scene, a)
373
+ ] : o.warnings, [i, a]), w = p((o) => {
374
+ o.length !== 0 && (Z(o), C.current?.(o));
375
+ }, [C]), P = p((o) => {
376
376
  o.length !== 0 && (Z(o), G.current?.(o));
377
377
  }, [G]);
378
- _(() => {
378
+ k(() => {
379
379
  const o = x.current;
380
- o && (w([...p.errors, ...o.ok ? [] : o.errors]), C([...p.warnings, ...I(o)]), o.ok && h.emit({ kind: "init" }));
380
+ o && (w([...f.errors, ...o.ok ? [] : o.errors]), P([...f.warnings, ...N(o)]), o.ok && h.emit({ kind: "init" }));
381
381
  }, [
382
382
  h,
383
383
  w,
384
- C,
385
- p,
386
- I
387
- ]), _(() => {
384
+ P,
385
+ f,
386
+ N
387
+ ]), k(() => {
388
388
  const o = m.update({
389
389
  spec: e,
390
390
  data: t,
@@ -392,28 +392,28 @@ var Kt = (e) => ce((t) => ({
392
392
  });
393
393
  if (!o) return;
394
394
  o.committedSpec && b.current?.(o.committedSpec);
395
- const u = k(o.result);
396
- N(y(u)), u && w(u), C(I(o.result)), u || h.emit({ kind: o.hasSpecChange ? "spec" : "data" });
395
+ const u = _(o.result);
396
+ I(y(u)), u && w(u), P(N(o.result)), u || h.emit({ kind: o.hasSpecChange ? "spec" : "data" });
397
397
  }, [
398
398
  e,
399
399
  t,
400
400
  r,
401
401
  m,
402
402
  h,
403
- k,
403
+ _,
404
404
  w,
405
- C,
405
+ P,
406
406
  y,
407
- I,
407
+ N,
408
408
  b
409
409
  ]);
410
- const M = f((o) => {
411
- N((u) => u === null ? u : y(null)), C(I(o));
410
+ const M = p((o) => {
411
+ I((u) => u === null ? u : y(null)), P(N(o));
412
412
  }, [
413
413
  y,
414
- C,
415
- I
416
- ]), L = f((o) => {
414
+ P,
415
+ N
416
+ ]), L = p((o) => {
417
417
  o.scene && E.current?.getState().setScene(o.scene), o.result && M(o.result), o.command && h.emit({
418
418
  kind: "command",
419
419
  command: o.command
@@ -423,42 +423,42 @@ var Kt = (e) => ce((t) => ({
423
423
  h,
424
424
  b,
425
425
  w
426
- ]), R = f((o) => {
426
+ ]), R = p((o) => {
427
427
  for (const u of o) L(u);
428
428
  return o.some((u) => !!u.scene);
429
- }, [L]), W = f((o, u) => {
429
+ }, [L]), W = p((o, u) => {
430
430
  R(m.applyCommand(o, u));
431
- }, [m, R]), Y = f(() => {
431
+ }, [m, R]), V = p(() => {
432
432
  R(m.commit());
433
- }, [m, R]), j = f(() => R(m.undo()), [m, R]), A = f(() => R(m.redo()), [m, R]), $ = f((o) => {
434
- const u = m.preview(o).find((De) => De.scene)?.scene;
433
+ }, [m, R]), Y = p(() => R(m.undo()), [m, R]), A = p(() => R(m.redo()), [m, R]), $ = p((o) => {
434
+ const u = m.preview(o).find((Le) => Le.scene)?.scene;
435
435
  return u ? (E.current?.getState().setScene(u), !0) : !1;
436
- }, [m]), V = f(() => {
436
+ }, [m]), j = p(() => {
437
437
  const o = m.scene;
438
438
  o && E.current?.getState().setScene(o);
439
439
  }, [m]), q = H(() => ({
440
440
  stack: m.history,
441
- undo: j,
441
+ undo: Y,
442
442
  redo: A
443
443
  }), [
444
444
  m,
445
- j,
445
+ Y,
446
446
  A
447
- ]), ne = f(() => E.current?.getState().scene ?? null, []);
447
+ ]), se = p(() => E.current?.getState().scene ?? null, []);
448
448
  return {
449
449
  store: E.current,
450
450
  dispatch: W,
451
- commit: Y,
451
+ commit: V,
452
452
  paintPreview: $,
453
- clearPreview: V,
453
+ clearPreview: j,
454
454
  history: q,
455
455
  subscribe: D.subscribe,
456
- getScene: ne,
456
+ getScene: se,
457
457
  compileBus: h,
458
458
  compileErrors: U,
459
459
  findGeom: T
460
460
  };
461
- }, Ut = () => {
461
+ }, Wt = () => {
462
462
  const e = /* @__PURE__ */ new Set();
463
463
  return {
464
464
  subscribe: (t) => (e.add(t), () => {
@@ -466,41 +466,41 @@ var Kt = (e) => ce((t) => ({
466
466
  }),
467
467
  notify: () => e.forEach((t) => t())
468
468
  };
469
- }, Wt = ["cartesian", "polar"], Yt = ({ data: e, spec: t, plugins: r = [], theme: n, glyphs: s, formattingLocale: i, handleRef: a, onSpecChange: l, onError: d, onWarnings: g, colorScheme: b = "light", children: P }) => {
470
- const G = Xt(i, g), [m] = S(() => n), [h] = S(() => Ke(n?.glyphs, s)), T = m?.colorScheme ?? b, [p] = S(() => Ue([...m?.plugins ?? [], ...r].filter(we)));
471
- Vt(p, h);
472
- const x = mt(), [D] = S(() => et(r)), [E] = S(() => rt(r)), [y] = S(() => It()), [k] = S(() => Ae()), U = H(() => Ie({ colorScheme: T }), [T]), { store: N, dispatch: I, commit: w, paintPreview: C, clearPreview: M, history: L, subscribe: R, getScene: W, compileBus: Y, compileErrors: j, findGeom: A } = zt({
469
+ }, Vt = ["cartesian", "polar"], Yt = ({ data: e, spec: t, plugins: r = [], theme: n, glyphs: s, formattingLocale: i, handleRef: a, onSpecChange: l, onError: d, onWarnings: g, colorScheme: b = "light", children: C }) => {
470
+ const G = Jt(i, g), [m] = S(() => n), [h] = S(() => Ue(n?.glyphs, s)), T = m?.colorScheme ?? b, [f] = S(() => Oe([...m?.plugins ?? [], ...r].filter(Pe)));
471
+ Xt(f, h);
472
+ const x = ht(), [D] = S(() => tt(r)), [E] = S(() => nt(r)), [y] = S(() => wt()), [_] = S(() => qe()), U = H(() => we({ colorScheme: T }), [T]), { store: I, dispatch: N, commit: w, paintPreview: P, clearPreview: M, history: L, subscribe: R, getScene: W, compileBus: V, compileErrors: Y, findGeom: A } = Ut({
473
473
  spec: t,
474
474
  data: e,
475
475
  colorScheme: T,
476
476
  plugins: r,
477
477
  theme: m,
478
- resolveRenderer: p,
478
+ resolveRenderer: f,
479
479
  anchorResolver: D,
480
480
  onSpecChange: l,
481
481
  onError: d,
482
482
  onWarnings: g
483
483
  });
484
- _(() => {
485
- if (N)
486
- return N.subscribe((q, ne) => {
487
- if (q.scene.spec === ne.scene.spec) return;
484
+ k(() => {
485
+ if (I)
486
+ return I.subscribe((q, se) => {
487
+ if (q.scene.spec === se.scene.spec) return;
488
488
  const { selection: o, setSelection: u } = y.getState();
489
- o.length !== 0 && u(Rt(o, q.scene.spec));
489
+ o.length !== 0 && u(It(o, q.scene.spec));
490
490
  });
491
- }, [N, y]);
491
+ }, [I, y]);
492
492
  const $ = H(() => ({
493
- dispatch: I,
493
+ dispatch: N,
494
494
  commit: w,
495
- paintPreview: C,
495
+ paintPreview: P,
496
496
  clearPreview: M
497
497
  }), [
498
- I,
498
+ N,
499
499
  w,
500
- C,
500
+ P,
501
501
  M
502
502
  ]);
503
- ht(a, () => ({
503
+ gt(a, () => ({
504
504
  commands: $,
505
505
  undo: L.undo,
506
506
  redo: L.redo,
@@ -513,7 +513,7 @@ var Kt = (e) => ce((t) => ({
513
513
  canPlaceDataLabels: E.hasCapability,
514
514
  canFormatDataLabelsAsPercentages: E.hasPercentageFormat,
515
515
  getGlyphs: () => h,
516
- getPointSymbols: (q) => p("point", q)?.symbols
516
+ getPointSymbols: (q) => f("point", q)?.symbols
517
517
  }), [
518
518
  $,
519
519
  L,
@@ -523,66 +523,66 @@ var Kt = (e) => ce((t) => ({
523
523
  y,
524
524
  E,
525
525
  h,
526
- p
526
+ f
527
527
  ]);
528
- const V = H(() => N ? {
528
+ const j = H(() => I ? {
529
529
  chartId: x,
530
- store: N,
530
+ store: I,
531
531
  selectionStore: y,
532
- targetBoundaryStore: k,
532
+ targetBoundaryStore: _,
533
533
  commands: $,
534
534
  history: L,
535
535
  formattingLocale: G,
536
- compileBus: Y,
536
+ compileBus: V,
537
537
  colorScheme: T,
538
538
  styleResolver: U,
539
539
  anchorResolver: D,
540
540
  findGeom: A
541
541
  } : null, [
542
542
  x,
543
- N,
543
+ I,
544
544
  y,
545
- k,
545
+ _,
546
546
  $,
547
547
  L,
548
548
  G,
549
- Y,
549
+ V,
550
550
  T,
551
551
  U,
552
552
  D,
553
553
  A
554
554
  ]);
555
- return /* @__PURE__ */ c(Gt, {
556
- forcedErrors: j,
555
+ return /* @__PURE__ */ c(Rt, {
556
+ forcedErrors: Y,
557
557
  onError: d,
558
558
  resetKeys: [t, e],
559
- children: V ? /* @__PURE__ */ c(Fe.Provider, {
560
- value: V,
561
- children: /* @__PURE__ */ c(Ye, {
562
- value: p,
563
- children: /* @__PURE__ */ c(Oe, {
559
+ children: j ? /* @__PURE__ */ c(ze.Provider, {
560
+ value: j,
561
+ children: /* @__PURE__ */ c(Ke, {
562
+ value: f,
563
+ children: /* @__PURE__ */ c(Fe, {
564
564
  value: E,
565
- children: /* @__PURE__ */ c(K, {
565
+ children: /* @__PURE__ */ c(F, {
566
566
  shapes: m?.shapes,
567
- children: /* @__PURE__ */ c(Le, {
567
+ children: /* @__PURE__ */ c($e, {
568
568
  glyphs: h,
569
- children: P
569
+ children: C
570
570
  })
571
571
  })
572
572
  })
573
573
  })
574
574
  }) : null
575
575
  });
576
- }, jt = (e, t) => (e ?? []).filter((r) => !ae(r) && !t.has(r)), Vt = (e, t) => {
577
- _(() => {
578
- if (!Re) return;
576
+ }, jt = (e, t) => (e ?? []).filter((r) => !ce(r) && !t.has(r)), Xt = (e, t) => {
577
+ k(() => {
578
+ if (!Ne) return;
579
579
  const r = new Set(t.map(({ name: n }) => n));
580
- for (const n of Wt) for (const s of jt(e("point", n)?.symbols, r)) console.warn(`[graphy] The ${n} point renderer lists "${s}", but no glyph has that name. The shape menu offers it, and SymbolFigure draws the first listed symbol in its place.`);
580
+ for (const n of Vt) for (const s of jt(e("point", n)?.symbols, r)) console.warn(`[graphy] The ${n} point renderer lists "${s}", but no glyph has that name. The shape menu offers it, and SymbolFigure draws the first listed symbol in its place.`);
581
581
  }, [e, t]);
582
- }, Xt = (e, t) => {
582
+ }, Jt = (e, t) => {
583
583
  const r = Q(t);
584
- return _(() => {
585
- if (e === void 0 || ot(e) !== void 0) return;
584
+ return k(() => {
585
+ if (e === void 0 || it(e) !== void 0) return;
586
586
  const n = [{
587
587
  severity: "warning",
588
588
  kind: "userInput",
@@ -590,10 +590,10 @@ var Kt = (e) => ce((t) => ({
590
590
  message: `formattingLocale '${e}' is not a tag Intl can format in, so the chart formats in ${je}.`
591
591
  }];
592
592
  Z(n), r.current?.(n);
593
- }, [e, r]), e === void 0 ? void 0 : Ze(e);
593
+ }, [e, r]), e === void 0 ? void 0 : et(e);
594
594
  };
595
595
  function _n({ theme: e, glyphs: t, ...r } = {}) {
596
- const n = nt(r);
596
+ const n = st(r);
597
597
  return {
598
598
  ...n,
599
599
  GraphProvider: (i) => /* @__PURE__ */ c(Yt, {
@@ -609,7 +609,7 @@ var B = (e, t) => {
609
609
  if (!e.endsWith("%")) return null;
610
610
  const r = Number.parseFloat(e);
611
611
  return Number.isFinite(r) ? r / 100 * t : null;
612
- }, kn = ({ x: e, y: t, width: r, height: n }, s) => {
612
+ }, $n = ({ x: e, y: t, width: r, height: n }, s) => {
613
613
  const i = B(e, s.width), a = B(t, s.height), l = B(r, s.width), d = B(n, s.height);
614
614
  return i === null || a === null || l === null || d === null ? null : {
615
615
  x: i,
@@ -617,16 +617,16 @@ var B = (e, t) => {
617
617
  width: l,
618
618
  height: d
619
619
  };
620
- }, Jt = ({ animateTransitions: e, cx: t, cy: r, r: n, effects: s, ...i }) => {
620
+ }, Qt = ({ animateTransitions: e, cx: t, cy: r, r: n, effects: s, ...i }) => {
621
621
  const a = z(s);
622
- return e ? /* @__PURE__ */ c(re.circle, {
622
+ return e ? /* @__PURE__ */ c(ne.circle, {
623
623
  initial: !1,
624
624
  animate: {
625
625
  cx: t,
626
626
  cy: r,
627
627
  r: n
628
628
  },
629
- transition: F,
629
+ transition: K,
630
630
  style: a,
631
631
  ...i
632
632
  }) : /* @__PURE__ */ c("circle", {
@@ -636,9 +636,9 @@ var B = (e, t) => {
636
636
  style: a,
637
637
  ...i
638
638
  });
639
- }, Qt = ({ animateTransitions: e, x1: t, y1: r, x2: n, y2: s, effects: i, ...a }) => {
639
+ }, Zt = ({ animateTransitions: e, x1: t, y1: r, x2: n, y2: s, effects: i, ...a }) => {
640
640
  const l = z(i);
641
- return e ? /* @__PURE__ */ c(re.line, {
641
+ return e ? /* @__PURE__ */ c(ne.line, {
642
642
  initial: !1,
643
643
  animate: {
644
644
  x1: t,
@@ -646,7 +646,7 @@ var B = (e, t) => {
646
646
  x2: n,
647
647
  y2: s
648
648
  },
649
- transition: F,
649
+ transition: K,
650
650
  style: l,
651
651
  ...a
652
652
  }) : /* @__PURE__ */ c("line", {
@@ -657,9 +657,9 @@ var B = (e, t) => {
657
657
  style: l,
658
658
  ...a
659
659
  });
660
- }, Zt = ({ animateTransitions: e, x: t, y: r, width: n, height: s, rx: i, ry: a, effects: l, ...d }) => {
660
+ }, er = ({ animateTransitions: e, x: t, y: r, width: n, height: s, rx: i, ry: a, effects: l, ...d }) => {
661
661
  const g = z(l);
662
- return e ? /* @__PURE__ */ c(re.rect, {
662
+ return e ? /* @__PURE__ */ c(ne.rect, {
663
663
  initial: !1,
664
664
  animate: {
665
665
  attrX: t,
@@ -671,7 +671,7 @@ var B = (e, t) => {
671
671
  ry: a
672
672
  } : {}
673
673
  },
674
- transition: F,
674
+ transition: K,
675
675
  style: g,
676
676
  ...d
677
677
  }) : /* @__PURE__ */ c("rect", {
@@ -684,9 +684,9 @@ var B = (e, t) => {
684
684
  style: g,
685
685
  ...d
686
686
  });
687
- }, er = ({ animateTransitions: e, d: t, source: r, effects: n, ...s }) => {
687
+ }, tr = ({ animateTransitions: e, d: t, source: r, effects: n, ...s }) => {
688
688
  const i = z(n);
689
- return e ? /* @__PURE__ */ c(tr, {
689
+ return e ? /* @__PURE__ */ c(rr, {
690
690
  d: t,
691
691
  source: r,
692
692
  style: i,
@@ -696,15 +696,18 @@ var B = (e, t) => {
696
696
  style: i,
697
697
  ...s
698
698
  });
699
- }, $n = (e) => {
700
- const { Circle: t } = ee(), { symbol: r, ...n } = e;
701
- return r !== void 0 && r !== "circle" ? /* @__PURE__ */ c("g", {
699
+ }, Hn = (e) => {
700
+ const { Circle: t } = te(), { animateTransitions: r } = ee(), { symbol: n, ...s } = e, i = {
701
+ ...s,
702
+ animateTransitions: r
703
+ };
704
+ return n !== void 0 && n !== "circle" ? /* @__PURE__ */ c("g", {
702
705
  style: z(e.effects),
703
706
  "data-testid": e["data-testid"],
704
- children: /* @__PURE__ */ c(ke, {
705
- symbol: r,
706
- cx: ye(e.cx),
707
- cy: ye(e.cy),
707
+ children: /* @__PURE__ */ c(xe, {
708
+ symbol: n,
709
+ cx: Se(e.cx),
710
+ cy: Se(e.cy),
708
711
  size: e.r * 2,
709
712
  fill: e.fill ?? "currentColor",
710
713
  fillOpacity: e.fillOpacity,
@@ -712,62 +715,69 @@ var B = (e, t) => {
712
715
  stroke: e.stroke,
713
716
  strokeOpacity: e.strokeOpacity,
714
717
  strokeWidth: e.strokeWidth,
715
- motion: e.animateTransitions ? {
716
- transition: F,
718
+ motion: r ? {
719
+ transition: K,
717
720
  intro: !1,
718
721
  fadesIn: !1
719
722
  } : null
720
723
  })
721
- }) : t === void 0 ? Jt(n) : /* @__PURE__ */ c(K, { children: /* @__PURE__ */ c(t, { ...n }) });
722
- }, Hn = (e) => {
723
- const { Line: t } = ee();
724
- return t === void 0 ? Qt(e) : /* @__PURE__ */ c(K, { children: /* @__PURE__ */ c(t, { ...e }) });
725
- }, xn = ({ cornerRadius: e, ...t }) => {
726
- const { Rect: r } = ee(), n = Ge()?.size ?? null, s = Be(), i = {
724
+ }) : t === void 0 ? Qt(i) : /* @__PURE__ */ c(F, { children: /* @__PURE__ */ c(t, { ...i }) });
725
+ }, xn = (e) => {
726
+ const { Line: t } = te(), { animateTransitions: r } = ee(), n = {
727
+ ...e,
728
+ animateTransitions: r
729
+ };
730
+ return t === void 0 ? Zt(n) : /* @__PURE__ */ c(F, { children: /* @__PURE__ */ c(t, { ...n }) });
731
+ }, Mn = ({ cornerRadius: e, ...t }) => {
732
+ const { Rect: r } = te(), n = Re()?.size ?? null, s = ke(), { animateTransitions: i } = ee(), a = {
727
733
  ...t,
728
- ...rr(e, t, n, s)
734
+ animateTransitions: i,
735
+ ...nr(e, t, n, s)
729
736
  };
730
- return r === void 0 ? Zt(i) : /* @__PURE__ */ c(K, { children: /* @__PURE__ */ c(r, { ...i }) });
731
- }, Mn = (e) => {
732
- const { Path: t } = ee();
733
- return t === void 0 ? er(e) : /* @__PURE__ */ c(K, { children: /* @__PURE__ */ c(t, { ...e }) });
734
- }, ye = (e) => typeof e == "number" ? `${e}px` : e, tr = ({ d: e, source: t, ...r }) => {
735
- const n = qe(e, F, t);
736
- return /* @__PURE__ */ c(re.path, {
737
+ return r === void 0 ? er(a) : /* @__PURE__ */ c(F, { children: /* @__PURE__ */ c(r, { ...a }) });
738
+ }, An = (e) => {
739
+ const { Path: t } = te(), { animateTransitions: r } = ee(), n = {
740
+ ...e,
741
+ animateTransitions: r
742
+ };
743
+ return t === void 0 ? tr(n) : /* @__PURE__ */ c(F, { children: /* @__PURE__ */ c(t, { ...n }) });
744
+ }, Se = (e) => typeof e == "number" ? `${e}px` : e, rr = ({ d: e, source: t, ...r }) => {
745
+ const n = _e(e, K, t);
746
+ return /* @__PURE__ */ c(ne.path, {
737
747
  d: n,
738
748
  ...r
739
749
  });
740
- }, rr = (e, t, r, n) => {
750
+ }, nr = (e, t, r, n) => {
741
751
  if (e === void 0) return {};
742
- const s = it(e);
752
+ const s = at(e);
743
753
  if (s === void 0) return {};
744
- const i = nr(t, r, n);
754
+ const i = sr(t, r, n);
745
755
  if (i === null)
746
- return s === "full" ? {} : be(me({ cornerRadius: s }), n);
747
- const a = Math.min(me({
756
+ return s === "full" ? {} : Te(he({ cornerRadius: s }), n);
757
+ const a = Math.min(he({
748
758
  cornerRadius: s,
749
759
  box: i
750
760
  }), Math.min(i.width, i.height) / 2);
751
- return be(a, n);
752
- }, nr = (e, t, r) => {
753
- const n = Se(e.width, t?.width, r.x), s = Se(e.height, t?.height, r.y);
761
+ return Te(a, n);
762
+ }, sr = (e, t, r) => {
763
+ const n = be(e.width, t?.width, r.x), s = be(e.height, t?.height, r.y);
754
764
  return n === null || s === null ? null : {
755
765
  width: n,
756
766
  height: s
757
767
  };
758
- }, Se = (e, t, r) => {
768
+ }, be = (e, t, r) => {
759
769
  if (typeof e == "number") return Number.isFinite(e) ? Math.abs(e) * r : null;
760
770
  if (t === void 0) return null;
761
771
  const n = B(e, t);
762
772
  return n === null ? null : Math.abs(n);
763
- }, be = (e, t) => t.x <= 0 || t.y <= 0 ? {
773
+ }, Te = (e, t) => t.x <= 0 || t.y <= 0 ? {
764
774
  rx: 0,
765
775
  ry: 0
766
776
  } : {
767
777
  rx: e / t.x,
768
778
  ry: e / t.y
769
- }, An = ({ symbol: e, size: t, fill: r, fillOpacity: n, stroke: s, strokeOpacity: i, strokeWidth: a }) => {
770
- const l = He(), d = Me(), g = We((G) => G.coordSystem.type), b = sr(e, d("point", g)?.symbols ?? [], l), P = {
779
+ }, On = ({ symbol: e, size: t, fill: r, fillOpacity: n, stroke: s, strokeOpacity: i, strokeWidth: a }) => {
780
+ const l = Ae(), d = Ye(), g = Ve((G) => G.coordSystem.type), b = or(e, d("point", g)?.symbols ?? [], l), C = {
771
781
  size: t,
772
782
  fill: r,
773
783
  fillOpacity: n,
@@ -775,21 +785,21 @@ var B = (e, t) => {
775
785
  strokeOpacity: i,
776
786
  strokeWidth: a
777
787
  };
778
- return ae(b) ? /* @__PURE__ */ c("path", {
779
- d: Qe(b, t),
788
+ return ce(b) ? /* @__PURE__ */ c("path", {
789
+ d: Ze(b, t),
780
790
  fill: r,
781
791
  fillOpacity: n,
782
792
  stroke: s,
783
793
  strokeOpacity: i,
784
794
  strokeWidth: a,
785
795
  strokeLinejoin: "round"
786
- }) : /* @__PURE__ */ c($e, {
796
+ }) : /* @__PURE__ */ c(Me, {
787
797
  symbol: b,
788
798
  glyphs: l,
789
- ...P
799
+ ...C
790
800
  });
791
- }, sr = (e, t, r) => ct(e) || t.includes(e) || !ae(e) && r.has(e) ? e : t[0] ?? "circle", On = ({ children: e, ...t }) => {
792
- const r = Ge()?.size ?? null;
801
+ }, or = (e, t, r) => lt(e) || t.includes(e) || !ce(e) && r.has(e) ? e : t[0] ?? "circle", Bn = ({ children: e, ...t }) => {
802
+ const r = Re()?.size ?? null;
793
803
  return /* @__PURE__ */ c("svg", {
794
804
  viewBox: "0 0 1 1",
795
805
  preserveAspectRatio: "none",
@@ -797,14 +807,14 @@ var B = (e, t) => {
797
807
  height: "100%",
798
808
  pointerEvents: "none",
799
809
  ...t,
800
- children: /* @__PURE__ */ c(Ne, {
810
+ children: /* @__PURE__ */ c(Ie, {
801
811
  size: r,
802
812
  space: "unit",
803
813
  children: e
804
814
  })
805
815
  });
806
- }, Bn = ({ box: e, children: t }) => {
807
- const r = _e(), n = r === null ? null : r.width * (e.x1 - e.x0), s = r === null ? null : r.height * (e.y1 - e.y0), i = H(() => n === null || s === null ? null : {
816
+ }, Fn = ({ box: e, children: t }) => {
817
+ const r = He(), n = r === null ? null : r.width * (e.x1 - e.x0), s = r === null ? null : r.height * (e.y1 - e.y0), i = H(() => n === null || s === null ? null : {
808
818
  width: n,
809
819
  height: s
810
820
  }, [n, s]);
@@ -815,54 +825,54 @@ var B = (e, t) => {
815
825
  height: X(e.y1 - e.y0),
816
826
  overflow: "hidden",
817
827
  pointerEvents: "none",
818
- children: /* @__PURE__ */ c(Ne, {
828
+ children: /* @__PURE__ */ c(Ie, {
819
829
  size: i,
820
830
  children: t
821
831
  })
822
832
  });
823
- }, or = "drqe3u0", ir = "drqe3u1", ar = "drqe3u2", cr = "drqe3u3", O = "drqe3u4", lr = "drqe3u5", dr = "drqe3u6", ur = "drqe3u7", J = "drqe3u8", mr = "drqe3u9", hr = "drqe3ua";
824
- var gr = "drqe3uc", fr = "drqe3ud", pr = "drqe3ue", vr = "drqe3uf";
825
- var yr = "drqe3uh", Sr = "drqe3ui", Te = {
833
+ }, ir = "drqe3u0", ar = "drqe3u1", cr = "drqe3u2", lr = "drqe3u3", O = "drqe3u4", dr = "drqe3u5", ur = "drqe3u6", mr = "drqe3u7", J = "drqe3u8", hr = "drqe3u9", gr = "drqe3ua";
834
+ var pr = "drqe3uc", fr = "drqe3ud", vr = "drqe3ue", yr = "drqe3uf";
835
+ var Sr = "drqe3uh", br = "drqe3ui", Ee = {
826
836
  enabled: "drqe3uk drqe3uj",
827
837
  disabled: "drqe3ul drqe3uj"
828
- }, Ee = {
838
+ }, Ge = {
829
839
  ran: "drqe3un drqe3um",
830
840
  dim: "drqe3uo drqe3um"
831
- }, Pe = {
841
+ }, De = {
832
842
  ran: "drqe3uq drqe3up",
833
843
  cached: "drqe3ur drqe3up",
834
844
  untouched: "drqe3us drqe3up"
835
- }, Fn = ({ width: e = 440, style: t, className: r } = {}) => {
836
- const { compileBus: n } = oe(), [s] = S(() => Dt()), [i, a] = S(!1), [l, d] = S(at);
837
- _(() => {
838
- const { recordCompile: h } = s.getState(), T = n.getLastTrigger(), p = n.getLastCompile();
839
- return T && p && h(T, p), n.subscribe(h);
845
+ }, Kn = ({ width: e = 440, style: t, className: r } = {}) => {
846
+ const { compileBus: n } = ie(), [s] = S(() => Lt()), [i, a] = S(!1), [l, d] = S(ct);
847
+ k(() => {
848
+ const { recordCompile: h } = s.getState(), T = n.getLastTrigger(), f = n.getLastCompile();
849
+ return T && f && h(T, f), n.subscribe(h);
840
850
  }, [s, n]);
841
- const g = se(s, (h) => h.lastCompile), b = se(s, (h) => h.history), P = n.getCacheStats(), G = g === null && b.length === 0, m = () => {
851
+ const g = oe(s, (h) => h.lastCompile), b = oe(s, (h) => h.history), C = n.getCacheStats(), G = g === null && b.length === 0, m = () => {
842
852
  d((h) => {
843
853
  const T = !h;
844
- return dt(T), T;
854
+ return ut(T), T;
845
855
  });
846
856
  };
847
857
  return /* @__PURE__ */ v("div", {
848
- className: pt(hr, r),
858
+ className: vt(gr, r),
849
859
  style: {
850
860
  width: e,
851
861
  ...t
852
862
  },
853
863
  children: [
854
864
  /* @__PURE__ */ v("div", {
855
- className: or,
865
+ className: ir,
856
866
  children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ c("div", {
857
- className: ir,
867
+ className: ar,
858
868
  children: "compile cache"
859
869
  }), /* @__PURE__ */ c("div", {
860
- className: pr,
861
- children: G ? "production: stats disabled" : g ? `last: ${g.label} · ${le(g.durationMs)}` : "awaiting first compile…"
870
+ className: vr,
871
+ children: G ? "production: stats disabled" : g ? `last: ${g.label} · ${de(g.durationMs)}` : "awaiting first compile…"
862
872
  })] }), /* @__PURE__ */ c("button", {
863
873
  type: "button",
864
874
  onClick: () => a((h) => !h),
865
- className: vr,
875
+ className: yr,
866
876
  children: i ? "▾" : "▴"
867
877
  })]
868
878
  }),
@@ -871,7 +881,7 @@ var yr = "drqe3uh", Sr = "drqe3ui", Te = {
871
881
  children: [/* @__PURE__ */ v("button", {
872
882
  type: "button",
873
883
  onClick: m,
874
- className: l ? Te.enabled : Te.disabled,
884
+ className: l ? Ee.enabled : Ee.disabled,
875
885
  "aria-pressed": l,
876
886
  children: ["cache ", l ? "enabled" : "disabled"]
877
887
  }), /* @__PURE__ */ c("span", {
@@ -879,20 +889,20 @@ var yr = "drqe3uh", Sr = "drqe3ui", Te = {
879
889
  children: "next compile reflects this toggle"
880
890
  })]
881
891
  }),
882
- !i && !G && /* @__PURE__ */ v(ft, { children: [/* @__PURE__ */ c(br, {
892
+ !i && !G && /* @__PURE__ */ v(ft, { children: [/* @__PURE__ */ c(Tr, {
883
893
  delta: g?.stages,
884
894
  durations: g?.stageDurationsMs,
885
- cumulative: P
886
- }), /* @__PURE__ */ c(Tr, { entries: b })] })
895
+ cumulative: C
896
+ }), /* @__PURE__ */ c(Er, { entries: b })] })
887
897
  ]
888
898
  });
889
- }, br = ({ delta: e, durations: t, cumulative: r }) => /* @__PURE__ */ v("table", {
890
- className: ar,
899
+ }, Tr = ({ delta: e, durations: t, cumulative: r }) => /* @__PURE__ */ v("table", {
900
+ className: cr,
891
901
  children: [/* @__PURE__ */ c("thead", { children: /* @__PURE__ */ v("tr", {
892
- className: yr,
902
+ className: Sr,
893
903
  children: [
894
904
  /* @__PURE__ */ c("th", {
895
- className: cr,
905
+ className: lr,
896
906
  children: "stage"
897
907
  }),
898
908
  /* @__PURE__ */ c("th", {
@@ -916,16 +926,16 @@ var yr = "drqe3uh", Sr = "drqe3ui", Te = {
916
926
  children: "total hit"
917
927
  })
918
928
  ]
919
- }) }), /* @__PURE__ */ c("tbody", { children: ie.map((n) => {
920
- const s = e?.[n], i = Er(s);
929
+ }) }), /* @__PURE__ */ c("tbody", { children: ae.map((n) => {
930
+ const s = e?.[n], i = Gr(s);
921
931
  return /* @__PURE__ */ v("tr", {
922
- className: gr,
932
+ className: pr,
923
933
  children: [
924
934
  /* @__PURE__ */ v("td", {
925
- className: lr,
935
+ className: dr,
926
936
  children: [
927
937
  /* @__PURE__ */ c("span", {
928
- className: Pe[i],
938
+ className: De[i],
929
939
  "aria-hidden": !0
930
940
  }),
931
941
  " ",
@@ -934,10 +944,10 @@ var yr = "drqe3uh", Sr = "drqe3ui", Te = {
934
944
  }),
935
945
  /* @__PURE__ */ c("td", {
936
946
  className: J,
937
- children: t === void 0 || i === "untouched" ? "—" : le(t[n])
947
+ children: t === void 0 || i === "untouched" ? "—" : de(t[n])
938
948
  }),
939
949
  /* @__PURE__ */ c("td", {
940
- className: i === "ran" ? Ee.ran : Ee.dim,
950
+ className: i === "ran" ? Ge.ran : Ge.dim,
941
951
  children: s?.misses ?? 0
942
952
  }),
943
953
  /* @__PURE__ */ c("td", {
@@ -955,44 +965,44 @@ var yr = "drqe3uh", Sr = "drqe3ui", Te = {
955
965
  ]
956
966
  }, n);
957
967
  }) })]
958
- }), Tr = ({ entries: e }) => e.length === 0 ? null : /* @__PURE__ */ v("div", {
968
+ }), Er = ({ entries: e }) => e.length === 0 ? null : /* @__PURE__ */ v("div", {
959
969
  className: fr,
960
970
  children: [/* @__PURE__ */ c("div", {
961
- className: Sr,
971
+ className: br,
962
972
  children: "recent compiles"
963
973
  }), e.map((t) => {
964
- const r = Gr(t.stages, (i) => i.misses > 0), n = ie.length;
974
+ const r = Rr(t.stages, (i) => i.misses > 0), n = ae.length;
965
975
  return /* @__PURE__ */ v("div", {
966
- className: dr,
976
+ className: ur,
967
977
  children: [
968
978
  /* @__PURE__ */ c("span", {
969
- className: Pe[r === 0 ? "cached" : "ran"],
979
+ className: De[r === 0 ? "cached" : "ran"],
970
980
  "aria-hidden": !0
971
981
  }),
972
982
  /* @__PURE__ */ c("span", {
973
- className: ur,
983
+ className: mr,
974
984
  title: t.label,
975
985
  children: t.label
976
986
  }),
977
987
  /* @__PURE__ */ v("span", {
978
- className: mr,
988
+ className: hr,
979
989
  children: [
980
990
  r,
981
991
  "/",
982
992
  n,
983
993
  " ran · ",
984
- le(t.durationMs)
994
+ de(t.durationMs)
985
995
  ]
986
996
  })
987
997
  ]
988
998
  }, t.id);
989
999
  })]
990
- }), Er = (e) => !e || e.hits === 0 && e.misses === 0 ? "untouched" : e.misses > 0 ? "ran" : "cached", Gr = (e, t) => {
1000
+ }), Gr = (e) => !e || e.hits === 0 && e.misses === 0 ? "untouched" : e.misses > 0 ? "ran" : "cached", Rr = (e, t) => {
991
1001
  let r = 0;
992
- for (const n of ie) t(e[n]) && (r += 1);
1002
+ for (const n of ae) t(e[n]) && (r += 1);
993
1003
  return r;
994
- }, le = (e) => e < 0.1 ? "<0.1ms" : e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`, Kn = () => {
995
- const { history: e } = oe(), { stack: t, undo: r, redo: n } = e, s = f((l) => t.subscribe(l), [t]), i = f(() => t.getSnapshot(), [t]), a = gt(s, i, i);
1004
+ }, de = (e) => e < 0.1 ? "<0.1ms" : e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`, zn = () => {
1005
+ const { history: e } = ie(), { stack: t, undo: r, redo: n } = e, s = p((l) => t.subscribe(l), [t]), i = p(() => t.getSnapshot(), [t]), a = pt(s, i, i);
996
1006
  return H(() => ({
997
1007
  ...a,
998
1008
  undo: r,
@@ -1002,7 +1012,7 @@ var yr = "drqe3uh", Sr = "drqe3ui", Te = {
1002
1012
  r,
1003
1013
  n
1004
1014
  ]);
1005
- }, Rr = /* @__PURE__ */ new Set([
1015
+ }, Ir = /* @__PURE__ */ new Set([
1006
1016
  "button",
1007
1017
  "checkbox",
1008
1018
  "color",
@@ -1013,14 +1023,14 @@ var yr = "drqe3uh", Sr = "drqe3ui", Te = {
1013
1023
  "range",
1014
1024
  "reset",
1015
1025
  "submit"
1016
- ]), zn = (e, t = {}) => {
1026
+ ]), Un = (e, t = {}) => {
1017
1027
  const { target: r, enabled: n = !0 } = t;
1018
- _(() => {
1028
+ k(() => {
1019
1029
  const s = Nr(r);
1020
1030
  if (!n || !s) return;
1021
1031
  const i = (a) => {
1022
- if (!Ir(a) || a.defaultPrevented || wr(a.target)) return;
1023
- const l = ze(a);
1032
+ if (!wr(a) || a.defaultPrevented || Pr(a.target)) return;
1033
+ const l = We(a);
1024
1034
  if (!l) return;
1025
1035
  const d = e.current;
1026
1036
  d && (l === "undo" ? d.undo() : d.redo()) && a.preventDefault();
@@ -1031,83 +1041,84 @@ var yr = "drqe3uh", Sr = "drqe3ui", Te = {
1031
1041
  r,
1032
1042
  n
1033
1043
  ]);
1034
- }, Nr = (e) => e === void 0 ? window : e !== null && "current" in e ? e.current : e, Ir = (e) => "key" in e, wr = (e) => e instanceof HTMLInputElement ? !Rr.has(e.type) : e instanceof HTMLElement ? e.isContentEditable || e.tagName === "TEXTAREA" : !1, Un = () => {
1035
- const { targetBoundaryStore: e } = oe();
1036
- return se(e, (t) => t.boundary);
1044
+ }, Nr = (e) => e === void 0 ? window : e !== null && "current" in e ? e.current : e, wr = (e) => "key" in e, Pr = (e) => e instanceof HTMLInputElement ? !Ir.has(e.type) : e instanceof HTMLElement ? e.isContentEditable || e.tagName === "TEXTAREA" : !1, Wn = () => {
1045
+ const { targetBoundaryStore: e } = ie();
1046
+ return oe(e, (t) => t.boundary);
1037
1047
  };
1038
1048
  export {
1039
- ln as CanvasTextMeasurer,
1040
- Ur as DefaultFooter,
1041
- Jt as DefaultGeomCircle,
1042
- Qt as DefaultGeomLine,
1043
- er as DefaultGeomPath,
1044
- Zt as DefaultGeomRect,
1045
- an as DefaultGrid,
1046
- Ar as DefaultHeader,
1047
- cn as DefaultSwatch,
1048
- En as DefaultTooltip,
1049
- Fn as DevToolsPanel,
1050
- Or as GRAPH_MODES,
1051
- $n as GeomCircle,
1052
- Hn as GeomLine,
1053
- fn as GeomOverpaint,
1054
- $r as GeomPanelSizeProvider,
1055
- Mn as GeomPath,
1056
- xn as GeomRect,
1057
- Gt as GraphErrorBoundary,
1058
- ge as GraphErrorPanel,
1049
+ fn as CanvasTextMeasurer,
1050
+ Or as DefaultFooter,
1051
+ Qt as DefaultGeomCircle,
1052
+ Zt as DefaultGeomLine,
1053
+ tr as DefaultGeomPath,
1054
+ er as DefaultGeomRect,
1055
+ mn as DefaultGrid,
1056
+ Hr as DefaultHeader,
1057
+ sn as DefaultSwatch,
1058
+ Rn as DefaultTooltip,
1059
+ Kn as DevToolsPanel,
1060
+ Qr as GRAPH_MODES,
1061
+ Hn as GeomCircle,
1062
+ xn as GeomLine,
1063
+ Fr as GeomOverpaint,
1064
+ _r as GeomPanelSizeProvider,
1065
+ An as GeomPath,
1066
+ Mn as GeomRect,
1067
+ Rt as GraphErrorBoundary,
1068
+ pe as GraphErrorPanel,
1059
1069
  Yt as GraphProvider,
1060
- en as GraphRenderer,
1061
- gn as GraphyBadge,
1062
- Jr as HoverProvider,
1063
- Yr as IntlProvider,
1064
- mn as IntroFade,
1065
- Mr as IntroWipeClip,
1066
- An as SymbolFigure,
1067
- rn as TextMeasurerProvider,
1068
- Hr as ThemeProvider,
1069
- Bn as UnitBoxSvg,
1070
- On as UnitSpaceSvg,
1070
+ tn as GraphRenderer,
1071
+ vn as GraphyBadge,
1072
+ Ar as HoverProvider,
1073
+ Kr as IntlProvider,
1074
+ rn as IntroFade,
1075
+ zr as IntroWipeClip,
1076
+ On as SymbolFigure,
1077
+ on as TextMeasurerProvider,
1078
+ $r as ThemeProvider,
1079
+ Fn as UnitBoxSvg,
1080
+ Bn as UnitSpaceSvg,
1071
1081
  Xr as buildDotsEditOutlineShapes,
1072
1082
  _n as createGraphyKit,
1073
- qr as darkTheme,
1074
- un as defineGeomRenderer,
1075
- Wr as defineGlyph,
1076
- vn as getBuiltInEditOutlineShapes,
1077
- on as lightTheme,
1083
+ un as darkTheme,
1084
+ bn as defineGeomRenderer,
1085
+ Br as defineGlyph,
1086
+ pn as getBuiltInEditOutlineShapes,
1087
+ qr as lightTheme,
1078
1088
  Tn as lightenCss,
1079
- Rt as pruneSelection,
1089
+ It as pruneSelection,
1080
1090
  B as readPositionPixels,
1081
- kn as readRectPixels,
1082
- Kr as resolveGraphyBadgeVariant,
1083
- Rn as resolvePathStroke,
1084
- Br as scalePointToPanel,
1085
- Vr as stampAxisEditTarget,
1086
- Gn as stampGridEditTarget,
1087
- _r as stampLegendEditTarget,
1088
- Nn as useElementScreenRect,
1089
- Zr as useFormattingLocale,
1090
- zr as useGeomHitTest,
1091
- Fr as useGeomHover,
1092
- Lr as useGeomPanelSize,
1093
- Qr as useGeomReaderTree,
1094
- jr as useGeomStyleReader,
1095
- _e as useGeomViewportSize,
1096
- dn as useGraphCommands,
1097
- sn as useGraphHandle,
1098
- Kn as useGraphHistory,
1099
- zn as useGraphHistoryShortcuts,
1100
- yn as useGraphLocale,
1101
- bn as useGraphSelection,
1102
- Dr as useGuidesTakePress,
1103
- pn as useHandleScene,
1104
- Sn as useHoverState,
1105
- xr as usePaintDefs,
1106
- nn as useResolvedStyle,
1107
- We as useSceneSelector,
1108
- Pr as useStyleReaderTree,
1109
- tn as useStyleResolver,
1110
- Un as useTargetBoundary,
1111
- hn as useTextMeasurer,
1112
- kr as vars
1091
+ $n as readRectPixels,
1092
+ Mr as resolveGraphyBadgeVariant,
1093
+ Nn as resolvePathStroke,
1094
+ xr as scalePointToPanel,
1095
+ Wr as stampAxisEditTarget,
1096
+ In as stampGridEditTarget,
1097
+ kr as stampLegendEditTarget,
1098
+ Vr as useElementScreenRect,
1099
+ en as useFormattingLocale,
1100
+ yn as useGeomHitTest,
1101
+ Jr as useGeomHover,
1102
+ dn as useGeomPanelSize,
1103
+ Zr as useGeomReaderTree,
1104
+ Ur as useGeomStyleReader,
1105
+ He as useGeomViewportSize,
1106
+ ee as useGraphAnimation,
1107
+ gn as useGraphCommands,
1108
+ ln as useGraphHandle,
1109
+ zn as useGraphHistory,
1110
+ Un as useGraphHistoryShortcuts,
1111
+ En as useGraphLocale,
1112
+ Gn as useGraphSelection,
1113
+ Lr as useGuidesTakePress,
1114
+ Sn as useHandleScene,
1115
+ nn as useHoverState,
1116
+ jr as usePaintDefs,
1117
+ hn as useResolvedStyle,
1118
+ Ve as useSceneSelector,
1119
+ Dr as useStyleReaderTree,
1120
+ an as useStyleResolver,
1121
+ Wn as useTargetBoundary,
1122
+ cn as useTextMeasurer,
1123
+ Yr as vars
1113
1124
  };