@graphysdk/react-renderer 1.9.0-beta.1795606078423 → 1.9.0-beta.1795686990387

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