@graphysdk/react-renderer 1.9.0-beta.1795524651682 → 1.9.0-beta.1795532892391

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