@graphysdk/react-renderer 1.8.1-beta.1787762226666 → 1.8.1-beta.1787827928296

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,17 +1,17 @@
1
- import { $ as It, D as _t, Dt as ae, Et as kt, G as Dt, O as $t, Ot as te, Q as Ht, T as xt, Tt as Mt, W as Pt, X as Lt, _t as ce, a as Kt, bt as Ot, ct as Bt, dt as K, ft as le, gt as At, ht as de, i as Yt, it as jt, lt as Ft, m as Ut, mt as A, n as Wt, pt as Vt, r as Xt, rt as Qt, s as zt, t as ue, vt as Jt, w as Zt, yt as er } from "./history-chords-3TY7-Dku.js";
2
- import { m as rr, t as me } from "./dev.utils-Bvss_b2-.js";
3
- import { COMPILER_STAGE_KEYS as Y, Geom as ge, GraphCompilationSession as he, areEditTargetsEqual as pe, buildDiagnostic as W, createAnchorResolver as fe, createCompiler as ve, createGraphyBuilder as ye, findAnnotation as be, isCompilerCachingEnabled as Se, resolveDefinition as Ee, setCompilerCachingEnabled as Te } from "@graphysdk/viz-engine";
1
+ import { A as It, At as ae, D as _t, E as wt, K as Dt, Ot as $t, Q as xt, St as Ht, _t as ce, a as Mt, at as Pt, bt as Lt, dt as Kt, et as At, gt as O, h as Bt, ht as Ot, i as jt, jt as te, k as Yt, kt as Ft, mt as de, n as Ut, ot as Wt, pt as K, q as Vt, r as Qt, s as Xt, t as le, tt as zt, ut as Jt, vt as Zt, xt as er, yt as ue } from "./history-chords-BCo5Hd7M.js";
2
+ import { m as rr, t as me } from "./dev.utils-t0mzc-gy.js";
3
+ import { COMPILER_STAGE_KEYS as j, Geom as ge, GraphCompilationSession as he, areEditTargetsEqual as pe, buildDiagnostic as W, createAnchorResolver as fe, createCompiler as ve, createGraphyBuilder as ye, findAnnotation as be, isCompilerCachingEnabled as Se, resolveDefinition as Ee, setCompilerCachingEnabled as Te } from "@graphysdk/viz-engine";
4
4
  import { Component as Ce, useCallback as f, useEffect as $, useId as Ne, useImperativeHandle as Re, useMemo as P, useRef as V, useState as T, useSyncExternalStore as qe } from "react";
5
5
  import { Fragment as Ge, jsx as c, jsxs as v } from "react/jsx-runtime";
6
- import { useStore as X } from "zustand";
7
- import { createStore as j } from "zustand/vanilla";
8
- import we from "clsx";
6
+ import { useStore as Q } from "zustand";
7
+ import { createStore as Y } from "zustand/vanilla";
8
+ import ke from "clsx";
9
9
  import './index.css';function B(e) {
10
10
  for (const t of e) (t.severity === "error" ? console.error : console.warn)(`[graphy] ${t.code}: ${t.message}`, t);
11
11
  }
12
12
  var Ie = "_1a5iqpb0", _e = "_1a5iqpb1";
13
- var ke = "_1a5iqpb3", De = "_1a5iqpb4", $e = "_1a5iqpb5";
14
- var Q = ({ errors: e }) => {
13
+ var we = "_1a5iqpb3", De = "_1a5iqpb4", $e = "_1a5iqpb5";
14
+ var X = ({ errors: e }) => {
15
15
  const [t, ...r] = e;
16
16
  return /* @__PURE__ */ v("div", {
17
17
  role: "alert",
@@ -29,7 +29,7 @@ var Q = ({ errors: e }) => {
29
29
  ]
30
30
  });
31
31
  }, z = ({ diagnostic: e }) => /* @__PURE__ */ v("div", {
32
- className: ke,
32
+ className: we,
33
33
  children: [
34
34
  /* @__PURE__ */ c("span", {
35
35
  className: De,
@@ -45,10 +45,10 @@ var Q = ({ errors: e }) => {
45
45
  })
46
46
  ]
47
47
  });
48
- function He(e = [], t = []) {
48
+ function xe(e = [], t = []) {
49
49
  return e.length === t.length && e.every((r, n) => Object.is(r, t[n]));
50
50
  }
51
- var xe = class extends Ce {
51
+ var He = class extends Ce {
52
52
  constructor(...e) {
53
53
  super(...e), this.state = { caughtDiagnostic: null };
54
54
  }
@@ -60,13 +60,13 @@ var xe = class extends Ce {
60
60
  B([r]), this.props.onError?.([r]), console.error("Chart render component stack:", t.componentStack);
61
61
  }
62
62
  componentDidUpdate(e) {
63
- this.state.caughtDiagnostic && !He(e.resetKeys, this.props.resetKeys) && this.setState({ caughtDiagnostic: null });
63
+ this.state.caughtDiagnostic && !xe(e.resetKeys, this.props.resetKeys) && this.setState({ caughtDiagnostic: null });
64
64
  }
65
65
  render() {
66
66
  const { caughtDiagnostic: e } = this.state;
67
- if (e) return /* @__PURE__ */ c(Q, { errors: [e] });
67
+ if (e) return /* @__PURE__ */ c(X, { errors: [e] });
68
68
  const { forcedErrors: t, children: r } = this.props;
69
- return t && t.length > 0 ? /* @__PURE__ */ c(Q, { errors: t }) : r;
69
+ return t && t.length > 0 ? /* @__PURE__ */ c(X, { errors: t }) : r;
70
70
  }
71
71
  }, re = (e) => typeof e == "object" && "geom" in e && "render" in e, Me = (e) => {
72
72
  const t = Ee(e);
@@ -74,18 +74,18 @@ var xe = class extends Ce {
74
74
  }, Pe = (e, t) => {
75
75
  const r = e.filter((n) => Le(n, t));
76
76
  return r.length === e.length ? e : r;
77
- }, Le = (e, t) => e.kind !== "annotation" ? !0 : be(t.annotations, e.id) !== null, J = [], Ke = () => j((e) => ({
77
+ }, Le = (e, t) => e.kind !== "annotation" ? !0 : be(t.annotations, e.id) !== null, J = [], Ke = () => Y((e) => ({
78
78
  selection: J,
79
- setSelection: (t) => e((r) => Oe(r.selection, t) ? r : { selection: t }),
79
+ setSelection: (t) => e((r) => Ae(r.selection, t) ? r : { selection: t }),
80
80
  clearSelection: () => e((t) => t.selection.length === 0 ? t : { selection: J })
81
- })), Oe = (e, t) => e === t ? !0 : e.length !== t.length ? !1 : e.every((r, n) => {
81
+ })), Ae = (e, t) => e === t ? !0 : e.length !== t.length ? !1 : e.every((r, n) => {
82
82
  const o = t[n];
83
83
  return o !== void 0 && pe(r, o);
84
- }), Be = 5, Ae = (e) => {
84
+ }), Be = 5, Oe = (e) => {
85
85
  if (!me) return {
86
86
  emit: () => {
87
87
  },
88
- subscribe: () => je,
88
+ subscribe: () => Ye,
89
89
  getLastTrigger: () => null,
90
90
  getLastCompile: () => null,
91
91
  getCacheStats: () => e.getCacheStats()
@@ -97,7 +97,7 @@ var xe = class extends Ce {
97
97
  const o = e.getLastCompile();
98
98
  if (o) {
99
99
  r = n;
100
- for (const l of t) l(n, o);
100
+ for (const d of t) d(n, o);
101
101
  }
102
102
  },
103
103
  subscribe: (n) => (t.add(n), () => {
@@ -107,7 +107,7 @@ var xe = class extends Ce {
107
107
  getLastCompile: () => e.getLastCompile(),
108
108
  getCacheStats: () => e.getCacheStats()
109
109
  };
110
- }, Ye = () => j((e) => ({
110
+ }, je = () => Y((e) => ({
111
111
  lastCompile: null,
112
112
  history: [],
113
113
  nextId: 1,
@@ -127,7 +127,7 @@ var xe = class extends Ce {
127
127
  lastSnapshot: r
128
128
  };
129
129
  })
130
- })), je = () => {
130
+ })), Ye = () => {
131
131
  }, Fe = (e) => {
132
132
  switch (e.kind) {
133
133
  case "init":
@@ -144,43 +144,43 @@ var xe = class extends Ce {
144
144
  return [...e.slice(n), t];
145
145
  };
146
146
  function We(e) {
147
- const t = e.filter(re), r = /* @__PURE__ */ new Set([...Object.keys(de), ...t.map((a) => a.geom)]), n = [], o = /* @__PURE__ */ new Set();
147
+ const t = e.filter(re), r = /* @__PURE__ */ new Set([...Object.keys(ce), ...t.map((a) => a.geom)]), n = [], o = /* @__PURE__ */ new Set();
148
148
  for (const a of e) {
149
- const d = Me(a);
150
- d === null || r.has(d.type) || o.has(d.type) || (o.add(d.type), n.push({
149
+ const l = Me(a);
150
+ l === null || r.has(l.type) || o.has(l.type) || (o.add(l.type), n.push({
151
151
  kind: "user-input",
152
152
  severity: "error",
153
153
  code: "MISSING_GEOM_RENDERER",
154
- message: `Custom geom '${d.type}' is registered but has no renderer.`,
154
+ message: `Custom geom '${l.type}' is registered but has no renderer.`,
155
155
  context: {
156
- requested: d.type,
156
+ requested: l.type,
157
157
  kind: "geom-renderer"
158
158
  },
159
- suggestion: `Add a render half for it: \`defineGeomRenderer(${d.type}Geom, { coord, render })\`, then include it in \`plugins\`.`
159
+ suggestion: `Add a render half for it: \`defineGeomRenderer(${l.type}Geom, { coord, render })\`, then include it in \`plugins\`.`
160
160
  }));
161
161
  }
162
- const l = /* @__PURE__ */ new Map();
162
+ const d = /* @__PURE__ */ new Map();
163
163
  for (const a of t) {
164
164
  if ("definition" in a) continue;
165
- const d = `${a.geom}|${a.coord}`, m = l.get(d);
166
- m ? m.count += 1 : l.set(d, {
165
+ const l = `${a.geom}|${a.coord}`, m = d.get(l);
166
+ m ? m.count += 1 : d.set(l, {
167
167
  geom: a.geom,
168
168
  coord: a.coord,
169
169
  count: 1
170
170
  });
171
171
  }
172
172
  const i = [];
173
- for (const { geom: a, coord: d, count: m } of l.values())
173
+ for (const { geom: a, coord: l, count: m } of d.values())
174
174
  m < 2 || i.push({
175
175
  kind: "user-input",
176
176
  severity: "warning",
177
177
  code: "DUPLICATE_REGISTERED_TYPE",
178
- message: `Multiple render-only overrides register ('${a}', '${d}') (${m} entries); the last in the array wins.`,
178
+ message: `Multiple render-only overrides register ('${a}', '${l}') (${m} entries); the last in the array wins.`,
179
179
  context: {
180
- requested: `${a}@${d}`,
180
+ requested: `${a}@${l}`,
181
181
  kind: "geom-renderer"
182
182
  },
183
- suggestion: `Keep a single render-only override for ('${a}', '${d}').`
183
+ suggestion: `Keep a single render-only override for ('${a}', '${l}').`
184
184
  });
185
185
  return {
186
186
  errors: n,
@@ -188,9 +188,9 @@ function We(e) {
188
188
  };
189
189
  }
190
190
  function Ve(e, t) {
191
- const { coordSystem: r, layers: n } = e, o = /* @__PURE__ */ new Set(), l = [];
191
+ const { coordSystem: r, layers: n } = e, o = /* @__PURE__ */ new Set(), d = [];
192
192
  for (const i of n)
193
- t(i.geom, r.type) !== null || o.has(i.geom) || (o.add(i.geom), l.push({
193
+ t(i.geom, r.type) !== null || o.has(i.geom) || (o.add(i.geom), d.push({
194
194
  kind: "user-input",
195
195
  severity: "warning",
196
196
  code: "MISSING_GEOM_RENDERER",
@@ -201,14 +201,14 @@ function Ve(e, t) {
201
201
  },
202
202
  suggestion: `Register a renderer for ('${i.geom}', '${r.type}') via \`defineGeomRenderer\`.`
203
203
  }));
204
- return l;
204
+ return d;
205
205
  }
206
- function Xe(e, t) {
207
- const { coordSystem: r, layers: n } = e, o = /* @__PURE__ */ new Set(), l = [];
206
+ function Qe(e, t) {
207
+ const { coordSystem: r, layers: n } = e, o = /* @__PURE__ */ new Set(), d = [];
208
208
  for (const i of n) {
209
209
  if (i.interactive === !1 || i.spatialKind !== "render-hit-test" || o.has(i.geom)) continue;
210
210
  const a = t(i.geom, r.type);
211
- a === null || a.hitTest || A(a) || (o.add(i.geom), l.push({
211
+ a === null || a.hitTest || O(a) || (o.add(i.geom), d.push({
212
212
  kind: "user-input",
213
213
  severity: "warning",
214
214
  code: "MISSING_RENDER_HIT_TEST",
@@ -220,9 +220,9 @@ function Xe(e, t) {
220
220
  suggestion: `Add a \`hitTest\` factory (precomputed geometry) or an overlay render (\`{ fn, options: { overlay: true } }\`, live simulation) to the renderer for ('${i.geom}', '${r.type}').`
221
221
  }));
222
222
  }
223
- return l;
223
+ return d;
224
224
  }
225
- function Qe(e) {
225
+ function Xe(e) {
226
226
  const t = /* @__PURE__ */ new Set(), r = [];
227
227
  for (const n of e.layers) {
228
228
  const o = n.identityKey;
@@ -241,11 +241,11 @@ function Qe(e) {
241
241
  return r;
242
242
  }
243
243
  function ze(e, t) {
244
- const { coordSystem: r, layers: n } = e, o = /* @__PURE__ */ new Set(), l = [];
244
+ const { coordSystem: r, layers: n } = e, o = /* @__PURE__ */ new Set(), d = [];
245
245
  for (const i of n) {
246
246
  if (i.interactive === !1 || i.spatialKind !== "render-hit-test" || o.has(i.geom)) continue;
247
247
  const a = t(i.geom, r.type);
248
- a === null || !a.hitTest || !A(a) || (o.add(i.geom), l.push({
248
+ a === null || !a.hitTest || !O(a) || (o.add(i.geom), d.push({
249
249
  kind: "user-input",
250
250
  severity: "warning",
251
251
  code: "CONFLICTING_RENDER_HIT_TEST",
@@ -257,7 +257,7 @@ function ze(e, t) {
257
257
  suggestion: "Keep one: a `hitTest` factory for precomputed geometry, OR an overlay render (`{ fn, options: { overlay: true } }`) for a live simulation."
258
258
  }));
259
259
  }
260
- return l;
260
+ return d;
261
261
  }
262
262
  function Je(e, t) {
263
263
  const r = /* @__PURE__ */ new Set(), n = [];
@@ -276,11 +276,11 @@ function Je(e, t) {
276
276
  return n;
277
277
  }
278
278
  function Ze(e, t) {
279
- const { coordSystem: r, layers: n } = e, o = /* @__PURE__ */ new Set(), l = [];
279
+ const { coordSystem: r, layers: n } = e, o = /* @__PURE__ */ new Set(), d = [];
280
280
  for (const i of n) {
281
281
  if (i.interactive === !1 || i.spatialKind === "render-hit-test" || o.has(i.geom)) continue;
282
282
  const a = t(i.geom, r.type);
283
- a === null || !A(a) || (o.add(i.geom), l.push({
283
+ a === null || !O(a) || (o.add(i.geom), d.push({
284
284
  kind: "user-input",
285
285
  severity: "warning",
286
286
  code: "OVERLAY_REQUIRES_RENDER_HIT_TEST",
@@ -292,17 +292,17 @@ function Ze(e, t) {
292
292
  suggestion: "Have the geom's manifest yield spatialKind 'render-hit-test' so the compiled layer carries the `byKey` index the overlay's `pushHover` resolves against."
293
293
  }));
294
294
  }
295
- return l;
295
+ return d;
296
296
  }
297
- var et = (e) => j((t) => ({
297
+ var et = (e) => Y((t) => ({
298
298
  compiled: e,
299
299
  setCompiled: (r) => t((n) => n.compiled === r ? n : { compiled: r })
300
- })), tt = ({ input: e, data: t, customPalettes: r, plugins: n, resolveRenderer: o, anchorResolver: l, onChange: i, onError: a, onWarnings: d }) => {
301
- const m = K(i), q = K(a), _ = K(d), [{ session: g, compileBus: b }] = T(() => {
300
+ })), tt = ({ input: e, data: t, customPalettes: r, plugins: n, resolveRenderer: o, anchorResolver: d, onChange: i, onError: a, onWarnings: l }) => {
301
+ const m = K(i), q = K(a), _ = K(l), [{ session: g, compileBus: b }] = T(() => {
302
302
  const s = ve({ plugins: n });
303
303
  return {
304
304
  session: new he(s),
305
- compileBus: Ae(s)
305
+ compileBus: Oe(s)
306
306
  };
307
307
  }), [u] = T(() => We(n ?? [])), h = V(null), [y] = T(rt), C = V(null), G = f((s) => u.errors.length === 0 ? s : [...u.errors, ...s ?? []], [u]), N = f((s) => {
308
308
  if (!s.ok) return s.errors;
@@ -312,7 +312,7 @@ var et = (e) => j((t) => ({
312
312
  p.subscribe(y.notify), C.current = p, y.notify();
313
313
  }
314
314
  return null;
315
- }, [y]), [H, k] = T(() => {
315
+ }, [y]), [x, w] = T(() => {
316
316
  const s = g.compile({
317
317
  input: e,
318
318
  data: t,
@@ -322,22 +322,22 @@ var et = (e) => j((t) => ({
322
322
  }), R = f((s) => s.ok ? [
323
323
  ...s.warnings,
324
324
  ...Ve(s.compiled, o),
325
- ...Xe(s.compiled, o),
326
- ...Qe(s.compiled),
325
+ ...Qe(s.compiled, o),
326
+ ...Xe(s.compiled),
327
327
  ...ze(s.compiled, o),
328
328
  ...Ze(s.compiled, o),
329
- ...Je(s.compiled, l)
330
- ] : s.warnings, [o, l]), w = f((s) => {
329
+ ...Je(s.compiled, d)
330
+ ] : s.warnings, [o, d]), k = f((s) => {
331
331
  s.length !== 0 && (B(s), q.current?.(s));
332
332
  }, [q]), S = f((s) => {
333
333
  s.length !== 0 && (B(s), _.current?.(s));
334
334
  }, [_]);
335
335
  $(() => {
336
336
  const s = h.current;
337
- s && (w([...u.errors, ...s.ok ? [] : s.errors]), S([...u.warnings, ...R(s)]), s.ok && b.emit({ kind: "init" }));
337
+ s && (k([...u.errors, ...s.ok ? [] : s.errors]), S([...u.warnings, ...R(s)]), s.ok && b.emit({ kind: "init" }));
338
338
  }, [
339
339
  b,
340
- w,
340
+ k,
341
341
  S,
342
342
  u,
343
343
  R
@@ -350,7 +350,7 @@ var et = (e) => j((t) => ({
350
350
  if (!s) return;
351
351
  s.sealedInput && m.current?.(s.sealedInput);
352
352
  const p = N(s.result);
353
- k(G(p)), p && w(p), S(R(s.result)), p || b.emit({ kind: s.inputChanged ? "input" : "data" });
353
+ w(G(p)), p && k(p), S(R(s.result)), p || b.emit({ kind: s.inputChanged ? "input" : "data" });
354
354
  }, [
355
355
  e,
356
356
  t,
@@ -358,14 +358,14 @@ var et = (e) => j((t) => ({
358
358
  g,
359
359
  b,
360
360
  N,
361
- w,
361
+ k,
362
362
  S,
363
363
  G,
364
364
  R,
365
365
  m
366
366
  ]);
367
367
  const D = f((s) => {
368
- k((p) => p === null ? p : G(null)), S(R(s));
368
+ w((p) => p === null ? p : G(null)), S(R(s));
369
369
  }, [
370
370
  G,
371
371
  S,
@@ -374,16 +374,16 @@ var et = (e) => j((t) => ({
374
374
  s.compiled && C.current?.getState().setCompiled(s.compiled), s.result && D(s.result), s.command && b.emit({
375
375
  kind: "command",
376
376
  command: s.command
377
- }), s.input && m.current?.(s.input), s.errors && w([...s.errors]);
377
+ }), s.input && m.current?.(s.input), s.errors && k([...s.errors]);
378
378
  }, [
379
379
  D,
380
380
  b,
381
381
  m,
382
- w
382
+ k
383
383
  ]), E = f((s) => {
384
384
  for (const p of s) I(p);
385
385
  return s.some((p) => !!p.compiled);
386
- }, [I]), x = f((s, p) => {
386
+ }, [I]), H = f((s, p) => {
387
387
  E(g.applyCommand(s, p));
388
388
  }, [g, E]), L = f(() => {
389
389
  E(g.seal());
@@ -398,13 +398,13 @@ var et = (e) => j((t) => ({
398
398
  ]), ie = f(() => C.current?.getState().compiled ?? null, []);
399
399
  return {
400
400
  store: C.current,
401
- dispatch: x,
401
+ dispatch: H,
402
402
  seal: L,
403
403
  history: oe,
404
404
  subscribe: y.subscribe,
405
405
  getCompiled: ie,
406
406
  compileBus: b,
407
- compileErrors: H
407
+ compileErrors: x
408
408
  };
409
409
  }, rt = () => {
410
410
  const e = /* @__PURE__ */ new Set();
@@ -414,15 +414,15 @@ var et = (e) => j((t) => ({
414
414
  }),
415
415
  notify: () => e.forEach((t) => t())
416
416
  };
417
- }, nt = {}, st = ({ data: e, input: t, plugins: r = [], formattingLocale: n, handleRef: o, onChange: l, onError: i, onWarnings: a, customPalettes: d, colorScheme: m = "light", themeOverrides: q = nt, children: _ }) => {
418
- const [g] = T(() => le(r.filter(re))), b = Ne(), [u] = T(() => fe(r)), [h] = T(() => Ke()), { store: y, dispatch: C, seal: G, history: N, subscribe: H, getCompiled: k, compileBus: R, compileErrors: w } = tt({
417
+ }, nt = {}, st = ({ data: e, input: t, plugins: r = [], formattingLocale: n, handleRef: o, onChange: d, onError: i, onWarnings: a, customPalettes: l, colorScheme: m = "light", themeOverrides: q = nt, children: _ }) => {
418
+ const [g] = T(() => de(r.filter(re))), b = Ne(), [u] = T(() => fe(r)), [h] = T(() => Ke()), { store: y, dispatch: C, seal: G, history: N, subscribe: x, getCompiled: w, compileBus: R, compileErrors: k } = tt({
419
419
  input: t,
420
420
  data: e,
421
- customPalettes: d,
421
+ customPalettes: l,
422
422
  plugins: r,
423
423
  resolveRenderer: g,
424
424
  anchorResolver: u,
425
- onChange: l,
425
+ onChange: d,
426
426
  onError: i,
427
427
  onWarnings: a
428
428
  });
@@ -430,8 +430,8 @@ var et = (e) => j((t) => ({
430
430
  if (y)
431
431
  return y.subscribe((I, E) => {
432
432
  if (I.compiled.spec === E.compiled.spec) return;
433
- const { selection: x, setSelection: L } = h.getState();
434
- x.length !== 0 && L(Pe(x, I.compiled.spec));
433
+ const { selection: H, setSelection: L } = h.getState();
434
+ H.length !== 0 && L(Pe(H, I.compiled.spec));
435
435
  });
436
436
  }, [y, h]);
437
437
  const S = P(() => ({
@@ -442,16 +442,16 @@ var et = (e) => j((t) => ({
442
442
  commands: S,
443
443
  undo: N.undo,
444
444
  redo: N.redo,
445
- subscribe: H,
446
- getCompiled: k,
445
+ subscribe: x,
446
+ getCompiled: w,
447
447
  getSelection: () => h.getState().selection,
448
448
  setSelection: (I) => h.getState().setSelection(I),
449
449
  subscribeSelection: h.subscribe
450
450
  }), [
451
451
  S,
452
452
  N,
453
- H,
454
- k,
453
+ x,
454
+ w,
455
455
  h
456
456
  ]);
457
457
  const D = P(() => y ? {
@@ -477,20 +477,20 @@ var et = (e) => j((t) => ({
477
477
  q,
478
478
  u
479
479
  ]);
480
- return /* @__PURE__ */ c(xe, {
481
- forcedErrors: w,
480
+ return /* @__PURE__ */ c(He, {
481
+ forcedErrors: k,
482
482
  onError: i,
483
483
  resetKeys: [t, e],
484
484
  children: D ? /* @__PURE__ */ c(ae.Provider, {
485
485
  value: D,
486
- children: /* @__PURE__ */ c(ce, {
486
+ children: /* @__PURE__ */ c(ue, {
487
487
  value: g,
488
488
  children: _
489
489
  })
490
490
  }) : null
491
491
  });
492
492
  };
493
- function lr(e) {
493
+ function dr(e) {
494
494
  const t = ye(e);
495
495
  return {
496
496
  ...t,
@@ -500,7 +500,7 @@ function lr(e) {
500
500
  })
501
501
  };
502
502
  }
503
- var dr = ({ children: e, ...t }) => /* @__PURE__ */ c("svg", {
503
+ var lr = ({ children: e, ...t }) => /* @__PURE__ */ c("svg", {
504
504
  viewBox: "0 0 1 1",
505
505
  preserveAspectRatio: "none",
506
506
  width: "100%",
@@ -508,7 +508,7 @@ var dr = ({ children: e, ...t }) => /* @__PURE__ */ c("svg", {
508
508
  pointerEvents: "none",
509
509
  ...t,
510
510
  children: e
511
- }), ot = "drqe3u0", it = "drqe3u1", at = "drqe3u2", ct = "drqe3u3", M = "drqe3u4", lt = "drqe3u5", dt = "drqe3u6", ut = "drqe3u7", O = "drqe3u8", mt = "drqe3u9", gt = "drqe3ua";
511
+ }), ot = "drqe3u0", it = "drqe3u1", at = "drqe3u2", ct = "drqe3u3", M = "drqe3u4", dt = "drqe3u5", lt = "drqe3u6", ut = "drqe3u7", A = "drqe3u8", mt = "drqe3u9", gt = "drqe3ua";
512
512
  var ht = "drqe3uc", pt = "drqe3ud", ft = "drqe3ue", vt = "drqe3uf";
513
513
  var yt = "drqe3uh", bt = "drqe3ui", Z = {
514
514
  enabled: "drqe3uk drqe3uj",
@@ -521,19 +521,19 @@ var yt = "drqe3uh", bt = "drqe3ui", Z = {
521
521
  cached: "drqe3ur drqe3up",
522
522
  untouched: "drqe3us drqe3up"
523
523
  }, ur = ({ width: e = 380, style: t, className: r } = {}) => {
524
- const { compileBus: n } = te(), [o] = T(() => Ye()), [l, i] = T(!1), [a, d] = T(Se);
524
+ const { compileBus: n } = te(), [o] = T(() => je()), [d, i] = T(!1), [a, l] = T(Se);
525
525
  $(() => {
526
526
  const { recordCompile: u } = o.getState(), h = n.getLastTrigger(), y = n.getLastCompile();
527
527
  return h && y && u(h, y), n.subscribe(u);
528
528
  }, [o, n]);
529
- const m = X(o, (u) => u.lastCompile), q = X(o, (u) => u.history), _ = n.getCacheStats(), g = m === null && q.length === 0, b = () => {
530
- d((u) => {
529
+ const m = Q(o, (u) => u.lastCompile), q = Q(o, (u) => u.history), _ = n.getCacheStats(), g = m === null && q.length === 0, b = () => {
530
+ l((u) => {
531
531
  const h = !u;
532
532
  return Te(h), h;
533
533
  });
534
534
  };
535
535
  return /* @__PURE__ */ v("div", {
536
- className: we(gt, r),
536
+ className: ke(gt, r),
537
537
  style: {
538
538
  width: e,
539
539
  ...t
@@ -551,10 +551,10 @@ var yt = "drqe3uh", bt = "drqe3ui", Z = {
551
551
  type: "button",
552
552
  onClick: () => i((u) => !u),
553
553
  className: vt,
554
- children: l ? "▾" : "▴"
554
+ children: d ? "▾" : "▴"
555
555
  })]
556
556
  }),
557
- !l && /* @__PURE__ */ v("div", {
557
+ !d && /* @__PURE__ */ v("div", {
558
558
  className: "drqe3ub",
559
559
  children: [/* @__PURE__ */ v("button", {
560
560
  type: "button",
@@ -567,7 +567,7 @@ var yt = "drqe3uh", bt = "drqe3ui", Z = {
567
567
  children: "next compile reflects this toggle"
568
568
  })]
569
569
  }),
570
- !l && !g && /* @__PURE__ */ v(Ge, { children: [/* @__PURE__ */ c(St, {
570
+ !d && !g && /* @__PURE__ */ v(Ge, { children: [/* @__PURE__ */ c(St, {
571
571
  delta: m?.stages,
572
572
  cumulative: _
573
573
  }), /* @__PURE__ */ c(Et, { entries: q })] })
@@ -599,13 +599,13 @@ var yt = "drqe3uh", bt = "drqe3ui", Z = {
599
599
  children: "total hit"
600
600
  })
601
601
  ]
602
- }) }), /* @__PURE__ */ c("tbody", { children: Y.map((r) => {
602
+ }) }), /* @__PURE__ */ c("tbody", { children: j.map((r) => {
603
603
  const n = e?.[r], o = Tt(n);
604
604
  return /* @__PURE__ */ v("tr", {
605
605
  className: ht,
606
606
  children: [
607
607
  /* @__PURE__ */ v("td", {
608
- className: lt,
608
+ className: dt,
609
609
  children: [
610
610
  /* @__PURE__ */ c("span", {
611
611
  className: ne[o],
@@ -620,15 +620,15 @@ var yt = "drqe3uh", bt = "drqe3ui", Z = {
620
620
  children: n?.misses ?? 0
621
621
  }),
622
622
  /* @__PURE__ */ c("td", {
623
- className: O,
623
+ className: A,
624
624
  children: n?.hits ?? 0
625
625
  }),
626
626
  /* @__PURE__ */ c("td", {
627
- className: O,
627
+ className: A,
628
628
  children: t[r].misses
629
629
  }),
630
630
  /* @__PURE__ */ c("td", {
631
- className: O,
631
+ className: A,
632
632
  children: t[r].hits
633
633
  })
634
634
  ]
@@ -640,9 +640,9 @@ var yt = "drqe3uh", bt = "drqe3ui", Z = {
640
640
  className: bt,
641
641
  children: "recent compiles"
642
642
  }), e.map((t) => {
643
- const r = Ct(t.stages, (l) => l.misses > 0), n = Y.length;
643
+ const r = Ct(t.stages, (d) => d.misses > 0), n = j.length;
644
644
  return /* @__PURE__ */ v("div", {
645
- className: dt,
645
+ className: lt,
646
646
  children: [
647
647
  /* @__PURE__ */ c("span", {
648
648
  className: ne[r === 0 ? "cached" : "ran"],
@@ -668,10 +668,10 @@ var yt = "drqe3uh", bt = "drqe3ui", Z = {
668
668
  })]
669
669
  }), Tt = (e) => !e || e.hits === 0 && e.misses === 0 ? "untouched" : e.misses > 0 ? "ran" : "cached", Ct = (e, t) => {
670
670
  let r = 0;
671
- for (const n of Y) t(e[n]) && (r += 1);
671
+ for (const n of j) t(e[n]) && (r += 1);
672
672
  return r;
673
673
  }, se = (e) => e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`, mr = () => {
674
- const { history: e } = te(), { stack: t, undo: r, redo: n } = e, o = f((a) => t.subscribe(a), [t]), l = f(() => t.getSnapshot(), [t]), i = qe(o, l, l);
674
+ const { history: e } = te(), { stack: t, undo: r, redo: n } = e, o = f((a) => t.subscribe(a), [t]), d = f(() => t.getSnapshot(), [t]), i = qe(o, d, d);
675
675
  return P(() => ({
676
676
  ...i,
677
677
  undo: r,
@@ -697,14 +697,14 @@ var yt = "drqe3uh", bt = "drqe3ui", Z = {
697
697
  $(() => {
698
698
  const o = Rt(r);
699
699
  if (!n || !o) return;
700
- const l = (i) => {
700
+ const d = (i) => {
701
701
  if (!qt(i) || i.defaultPrevented || Gt(i.target)) return;
702
- const a = ue(i);
702
+ const a = le(i);
703
703
  if (!a) return;
704
- const d = e.current;
705
- d && (a === "undo" ? d.undo() : d.redo()) && i.preventDefault();
704
+ const l = e.current;
705
+ l && (a === "undo" ? l.undo() : l.redo()) && i.preventDefault();
706
706
  };
707
- return o.addEventListener("keydown", l), () => o.removeEventListener("keydown", l);
707
+ return o.addEventListener("keydown", d), () => o.removeEventListener("keydown", d);
708
708
  }, [
709
709
  e,
710
710
  r,
@@ -712,40 +712,40 @@ var yt = "drqe3uh", bt = "drqe3ui", Z = {
712
712
  ]);
713
713
  }, Rt = (e) => e === void 0 ? window : e !== null && "current" in e ? e.current : e, qt = (e) => "key" in e, Gt = (e) => e instanceof HTMLInputElement ? !Nt.has(e.type) : e instanceof HTMLElement ? e.isContentEditable || e.tagName === "TEXTAREA" : !1;
714
714
  export {
715
- _t as BrandMark,
716
- Ot as CanvasTextMeasurer,
717
- xt as DefaultFooter,
718
- zt as DefaultGrid,
719
- Zt as DefaultHeader,
720
- At as DefaultSwatch,
721
- Pt as DefaultTooltip,
715
+ Yt as BrandMark,
716
+ Ht as CanvasTextMeasurer,
717
+ _t as DefaultFooter,
718
+ Xt as DefaultGrid,
719
+ wt as DefaultHeader,
720
+ Zt as DefaultSwatch,
721
+ Dt as DefaultTooltip,
722
722
  ur as DevToolsPanel,
723
- xe as GraphErrorBoundary,
724
- Q as GraphErrorPanel,
723
+ He as GraphErrorBoundary,
724
+ X as GraphErrorPanel,
725
725
  st as GraphProvider,
726
- Kt as GraphRenderer,
727
- Ft as HoverProvider,
728
- Jt as TextMeasurerProvider,
729
- Lt as ThemeProvider,
730
- dr as UnitSpaceSvg,
731
- lr as createGraphyKit,
732
- Ht as darkTheme,
733
- Vt as defineGeomRenderer,
734
- It as lightTheme,
735
- Mt as lightenCss,
726
+ Mt as GraphRenderer,
727
+ Kt as HoverProvider,
728
+ Lt as TextMeasurerProvider,
729
+ xt as ThemeProvider,
730
+ lr as UnitSpaceSvg,
731
+ dr as createGraphyKit,
732
+ At as darkTheme,
733
+ Ot as defineGeomRenderer,
734
+ zt as lightTheme,
735
+ $t as lightenCss,
736
736
  Pe as pruneSelection,
737
- $t as resolveBrandMarkVisual,
738
- kt as useCompiledSelector,
739
- jt as useElementScreenRect,
740
- Bt as useGeomHitTest,
741
- Qt as useGeomHover,
742
- Wt as useGraphCommands,
743
- Yt as useGraphHandle,
737
+ It as resolveBrandMarkVisual,
738
+ Ft as useCompiledSelector,
739
+ Wt as useElementScreenRect,
740
+ Jt as useGeomHitTest,
741
+ Pt as useGeomHover,
742
+ Ut as useGraphCommands,
743
+ jt as useGraphHandle,
744
744
  mr as useGraphHistory,
745
745
  gr as useGraphHistoryShortcuts,
746
- Ut as useGraphSelection,
747
- Xt as useHandleCompiled,
748
- Dt as useHoverState,
746
+ Bt as useGraphSelection,
747
+ Qt as useHandleCompiled,
748
+ Vt as useHoverState,
749
749
  er as useTextMeasurer,
750
750
  rr as vars
751
751
  };