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

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,6 +1,6 @@
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";
1
+ import { $ as zr, $n as $e, An as Vr, Ar as se, Cn as He, Cr as jr, Dn as Me, Dr as xe, En as Yr, Er as Xr, Ft as Qr, Gn as Jr, H as Zr, Hn as en, In as tn, It as rn, Jn as Ne, Kn as nn, Kt as sn, Lt as on, Mn as an, Mr as Ae, Nr as Oe, On as Be, Or as Ke, P as cn, Pr as ce, Pt as ln, Q as dn, Qn as Pe, Sn as ee, Sr as Ce, Tr as un, U as mn, Ut as hn, W as gn, X as pn, Xn as Fe, Yn as fn, Yt as vn, Zn as te, _r as Ue, a as yn, an as Sn, ar as bn, bn as Gn, br as We, cr as Tn, dn as ze, dr as Ve, er as je, et as En, fn as Ye, fr as Rn, gn as Xe, gr as Le, hr as Qe, i as wn, in as In, ir as W, jn as Nn, jr as he, kn as Pn, l as Cn, lr as Je, mn as Ze, n as Ln, on as Dn, pn as et, pr as tt, qn as z, qt as _n, r as qn, rr as kn, sn as $n, sr as Hn, t as rt, tn as Mn, tr as re, ur as nt, vn as st, vr as ot, w as xn, wn as An, wr as On, xn as Bn, xr as oe, yn as it, yr as at } from "./history-chords-DsyzK0E1.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 Gt, isCompilerCachingEnabled as Tt, 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 Pt, useMemo as x, useRef as ve, useState as v, useSyncExternalStore as Ct } from "react";
4
4
  import { Fragment as Lt, jsx as c, jsxs as y } from "react/jsx-runtime";
5
5
  import { useStore as ie } from "zustand";
6
6
  import { createStore as ue } from "zustand/vanilla";
@@ -44,10 +44,10 @@ var ye = ({ errors: e }) => {
44
44
  })
45
45
  ]
46
46
  });
47
- function xt(e = [], t = []) {
47
+ function Mt(e = [], t = []) {
48
48
  return e.length === t.length && e.every((r, n) => Object.is(r, t[n]));
49
49
  }
50
- var Mt = class extends It {
50
+ var xt = class extends It {
51
51
  constructor(...e) {
52
52
  super(...e), this.state = { caughtDiagnostic: null };
53
53
  }
@@ -59,7 +59,7 @@ var Mt = class extends It {
59
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 && !xt(e.resetKeys, this.props.resetKeys) && this.setState({ caughtDiagnostic: null });
62
+ this.state.caughtDiagnostic && !Mt(e.resetKeys, this.props.resetKeys) && this.setState({ caughtDiagnostic: null });
63
63
  }
64
64
  render() {
65
65
  const { caughtDiagnostic: e } = this.state;
@@ -75,7 +75,7 @@ var Mt = class extends It {
75
75
  if (e.position === "none") return t;
76
76
  for (const r of e.drawn)
77
77
  if (!(!r.hidesGroups || r.display !== "pill"))
78
- for (const n of r.items) t.add(Tt(r, n));
78
+ for (const n of r.items) t.add(Gt(r, n));
79
79
  return t;
80
80
  }, Ot = (e, t) => {
81
81
  const r = e.filter((n) => Bt(n, t));
@@ -122,20 +122,20 @@ var Mt = class extends It {
122
122
  if (n.lastSnapshot === r) return n;
123
123
  const s = {
124
124
  id: n.nextId,
125
- label: Yt(t),
125
+ label: jt(t),
126
126
  stages: r.stages,
127
127
  stageDurationsMs: r.stageDurationsMs,
128
128
  durationMs: r.durationMs
129
129
  };
130
130
  return {
131
131
  lastCompile: s,
132
- history: jt(n.history, s, Ut),
132
+ history: Yt(n.history, s, Ut),
133
133
  nextId: n.nextId + 1,
134
134
  lastSnapshot: r
135
135
  };
136
136
  })
137
137
  })), Vt = () => {
138
- }, Yt = (e) => {
138
+ }, jt = (e) => {
139
139
  switch (e.kind) {
140
140
  case "init":
141
141
  return "init";
@@ -146,12 +146,12 @@ var Mt = class extends It {
146
146
  case "command":
147
147
  return e.command.metadata.description;
148
148
  }
149
- }, jt = (e, t, r) => {
149
+ }, Yt = (e, t, r) => {
150
150
  const n = e.length >= r ? e.length - (r - 1) : 0;
151
151
  return [...e.slice(n), t];
152
152
  };
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();
153
+ function Ge(e) {
154
+ const t = e.filter(_e), r = /* @__PURE__ */ new Set([...Object.keys(He), ...t.map((l) => l.geom)]), n = [], s = /* @__PURE__ */ new Set();
155
155
  for (const l of e) {
156
156
  const d = qe(l);
157
157
  d === null || r.has(d.type) || s.has(d.type) || (s.add(d.type), n.push({
@@ -194,7 +194,7 @@ function Te(e) {
194
194
  warnings: i
195
195
  };
196
196
  }
197
- function Qt(e, t) {
197
+ function Xt(e, t) {
198
198
  const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(), a = [];
199
199
  for (const i of n)
200
200
  t(i.geom, r.type) !== null || s.has(i.geom) || (s.add(i.geom), a.push({
@@ -210,12 +210,12 @@ function Qt(e, t) {
210
210
  }));
211
211
  return a;
212
212
  }
213
- function Xt(e, t) {
213
+ function Qt(e, t) {
214
214
  const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(), a = [];
215
215
  for (const i of n) {
216
216
  if (i.interactive === !1 || i.spatialKind !== "renderHitTest" || s.has(i.geom)) continue;
217
217
  const l = t(i.geom, r.type);
218
- l === null || l.hitTest || re(l) || (s.add(i.geom), a.push({
218
+ l === null || l.hitTest || ee(l) || (s.add(i.geom), a.push({
219
219
  kind: "userInput",
220
220
  severity: "warning",
221
221
  code: "MISSING_RENDER_HIT_TEST",
@@ -252,7 +252,7 @@ function Zt(e, t) {
252
252
  for (const i of n) {
253
253
  if (i.interactive === !1 || i.spatialKind !== "renderHitTest" || s.has(i.geom)) continue;
254
254
  const l = t(i.geom, r.type);
255
- l === null || !l.hitTest || !re(l) || (s.add(i.geom), a.push({
255
+ l === null || !l.hitTest || !ee(l) || (s.add(i.geom), a.push({
256
256
  kind: "userInput",
257
257
  severity: "warning",
258
258
  code: "CONFLICTING_RENDER_HIT_TEST",
@@ -287,7 +287,7 @@ function tr(e, t) {
287
287
  for (const i of n) {
288
288
  if (i.interactive === !1 || i.spatialKind === "renderHitTest" || s.has(i.geom)) continue;
289
289
  const l = t(i.geom, r.type);
290
- l === null || !re(l) || (s.add(i.geom), a.push({
290
+ l === null || !ee(l) || (s.add(i.geom), a.push({
291
291
  kind: "userInput",
292
292
  severity: "warning",
293
293
  code: "LIVE_RENDER_REQUIRES_RENDER_HIT_TEST",
@@ -303,7 +303,7 @@ function tr(e, t) {
303
303
  }
304
304
  function rr(e, t) {
305
305
  let r;
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 ? [] : [{
306
+ return e.layers.flatMap((n, s) => ee(t(n.geom, e.coordSystem.type)) ? nr(n) ? (r ??= De().readers(e), (r.geom(n).get("overpaint", void 0, "hovered")?.length ?? 0) === 0 ? [] : [{
307
307
  kind: "userInput",
308
308
  severity: "warning",
309
309
  code: "INVALID_STYLE_RULE",
@@ -339,8 +339,8 @@ var or = (e) => ue((t) => ({
339
339
  scene: e,
340
340
  setScene: (r) => t((n) => n.scene === r ? n : { scene: r })
341
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);
342
+ const G = oe(d), I = oe(g), C = oe(S), [h] = v(() => Ae(ae, (o) => {
343
+ C.current?.(o);
344
344
  })), [{ session: m, compileBus: p, findGeom: V }] = v(() => {
345
345
  const o = pt({
346
346
  plugins: s,
@@ -352,17 +352,17 @@ var or = (e) => ue((t) => ({
352
352
  findGeom: (u) => o.findGeom(u)
353
353
  };
354
354
  }), [w] = v(() => {
355
- const o = Te(s ?? []), u = Te(a?.plugins ?? []);
355
+ const o = Ge(s ?? []), u = Ge(a?.plugins ?? []);
356
356
  return {
357
357
  errors: [...u.errors, ...o.errors],
358
358
  warnings: [...u.warnings, ...o.warnings]
359
359
  };
360
- }), k = ve(null), [b] = v(ar), G = ve(null), L = f((o) => w.errors.length === 0 ? o : [...w.errors, ...o ?? []], [w]), $ = f((o) => {
360
+ }), k = ve(null), [b] = v(ar), T = ve(null), L = f((o) => w.errors.length === 0 ? o : [...w.errors, ...o ?? []], [w]), $ = f((o) => {
361
361
  if (!o.ok) return o.errors;
362
- if (G.current) G.current.getState().setScene(o.scene);
362
+ if (T.current) T.current.getState().setScene(o.scene);
363
363
  else {
364
364
  const u = or(o.scene);
365
- u.subscribe(b.notify), G.current = u, b.notify();
365
+ u.subscribe(b.notify), T.current = u, b.notify();
366
366
  }
367
367
  return null;
368
368
  }, [b]), [E, A] = v(() => {
@@ -375,22 +375,22 @@ var or = (e) => ue((t) => ({
375
375
  return k.current = o, L($(o));
376
376
  }), N = f((o) => o.ok ? [
377
377
  ...o.warnings,
378
- ...Qt(o.scene, i),
379
378
  ...Xt(o.scene, i),
379
+ ...Qt(o.scene, i),
380
380
  ...Jt(o.scene),
381
381
  ...Zt(o.scene, i),
382
382
  ...tr(o.scene, i),
383
383
  ...rr(o.scene, i),
384
384
  ...er(o.scene, l)
385
- ] : o.warnings, [i, l]), C = f((o) => {
385
+ ] : o.warnings, [i, l]), P = f((o) => {
386
386
  o.length !== 0 && (ae(o), I.current?.(o));
387
387
  }, [I]);
388
388
  q(() => {
389
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" }));
390
+ o && (P([...w.errors, ...o.ok ? [] : o.errors]), h(se, [...w.warnings, ...N(o)]), o.ok && p.emit({ kind: "init" }));
391
391
  }, [
392
392
  p,
393
- C,
393
+ P,
394
394
  h,
395
395
  w,
396
396
  N
@@ -402,9 +402,9 @@ var or = (e) => ue((t) => ({
402
402
  hiddenGroups: n
403
403
  });
404
404
  if (!o) return;
405
- o.committedSpec && T.current?.(o.committedSpec);
405
+ o.committedSpec && G.current?.(o.committedSpec);
406
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" });
407
+ A(L(u)), u && P(u), h(se, N(o.result)), u || p.emit({ kind: o.hasSpecChange ? "spec" : "data" });
408
408
  }, [
409
409
  e,
410
410
  t,
@@ -413,59 +413,59 @@ var or = (e) => ue((t) => ({
413
413
  m,
414
414
  p,
415
415
  $,
416
- C,
416
+ P,
417
417
  h,
418
418
  L,
419
419
  N,
420
- T
420
+ G
421
421
  ]);
422
422
  const O = f((o) => {
423
- A((u) => u === null ? u : L(null)), h(oe, N(o));
423
+ A((u) => u === null ? u : L(null)), h(se, N(o));
424
424
  }, [
425
425
  L,
426
426
  h,
427
427
  N
428
428
  ]), D = f((o) => {
429
- o.scene && G.current?.getState().setScene(o.scene), o.result && O(o.result), o.command && p.emit({
429
+ o.scene && T.current?.getState().setScene(o.scene), o.result && O(o.result), o.command && p.emit({
430
430
  kind: "command",
431
431
  command: o.command
432
- }), o.spec && T.current?.(o.spec), o.errors && C([...o.errors]);
432
+ }), o.spec && G.current?.(o.spec), o.errors && P([...o.errors]);
433
433
  }, [
434
434
  O,
435
435
  p,
436
- T,
437
- C
436
+ G,
437
+ P
438
438
  ]), R = f((o) => {
439
439
  for (const u of o) D(u);
440
440
  return o.some((u) => !!u.scene);
441
- }, [D]), Y = f((o, u) => {
441
+ }, [D]), j = f((o, u) => {
442
442
  R(m.applyCommand(o, u));
443
- }, [m, R]), j = f(() => {
443
+ }, [m, R]), Y = f(() => {
444
444
  R(m.commit());
445
- }, [m, R]), Q = f(() => R(m.undo()), [m, R]), B = f(() => R(m.redo()), [m, R]), K = f((o) => {
445
+ }, [m, R]), X = f(() => R(m.undo()), [m, R]), B = f(() => R(m.redo()), [m, R]), K = f((o) => {
446
446
  const u = m.preview(o).find((_) => _.scene)?.scene;
447
- return u ? (G.current?.getState().setScene(u), !0) : !1;
447
+ return u ? (T.current?.getState().setScene(u), !0) : !1;
448
448
  }, [m]), H = f(() => {
449
449
  const o = m.scene;
450
- o && G.current?.getState().setScene(o);
451
- }, [m]), x = M(() => ({
450
+ o && T.current?.getState().setScene(o);
451
+ }, [m]), M = x(() => ({
452
452
  stack: m.history,
453
- undo: Q,
453
+ undo: X,
454
454
  redo: B
455
455
  }), [
456
456
  m,
457
- Q,
457
+ X,
458
458
  B
459
- ]), X = f(() => G.current?.getState().scene ?? null, []);
459
+ ]), Q = f(() => T.current?.getState().scene ?? null, []);
460
460
  return {
461
- store: G.current,
462
- dispatch: Y,
463
- commit: j,
461
+ store: T.current,
462
+ dispatch: j,
463
+ commit: Y,
464
464
  paintPreview: K,
465
465
  clearPreview: H,
466
- history: x,
466
+ history: M,
467
467
  subscribe: b.subscribe,
468
- getScene: X,
468
+ getScene: Q,
469
469
  compileBus: p,
470
470
  compileErrors: E,
471
471
  findGeom: V,
@@ -479,25 +479,25 @@ var or = (e) => ue((t) => ({
479
479
  }),
480
480
  notify: () => e.forEach((t) => t())
481
481
  };
482
- }, cr = ["cartesian", "polar"], lr = ({ mode: e = ot.readonly, ...t }) => {
483
- const r = ze(e);
484
- return /* @__PURE__ */ c(rt, {
482
+ }, cr = ["cartesian", "polar"], lr = ({ mode: e = Xe.readonly, ...t }) => {
483
+ const r = st(e);
484
+ return /* @__PURE__ */ c(et, {
485
485
  mode: r,
486
486
  children: /* @__PURE__ */ c(dr, {
487
487
  ...t,
488
488
  mode: r
489
489
  })
490
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)));
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: G, children: I }) => {
492
+ const [C] = v(() => n), [h] = v(() => tt(n?.glyphs, s)), m = C?.colorScheme ?? S, [p] = v(() => it([...C?.plugins ?? [], ...r].filter(_e)));
493
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({
494
+ const V = Nt(), [w] = v(() => gt(r)), [k] = v(() => ft(r)), [b] = v(() => Kt()), [T] = v(() => ze()), L = x(() => De({ colorScheme: m }), [m]), $ = Ze(), { store: E, dispatch: A, commit: N, paintPreview: P, clearPreview: O, history: D, subscribe: R, getScene: j, compileBus: Y, compileErrors: X, findGeom: B, reportWarningSource: K } = ir({
495
495
  spec: t,
496
496
  data: e,
497
497
  colorScheme: m,
498
- hiddenGroups: Xe(),
498
+ hiddenGroups: Ye(),
499
499
  plugins: r,
500
- theme: P,
500
+ theme: C,
501
501
  resolveRenderer: p,
502
502
  anchorResolver: w,
503
503
  onSpecChange: l,
@@ -521,23 +521,23 @@ var or = (e) => ue((t) => ({
521
521
  u.scene.guides.legends !== _.scene.guides.legends && o(u.scene.guides.legends);
522
522
  });
523
523
  }, [E, $]);
524
- const x = M(() => ({
524
+ const M = x(() => ({
525
525
  dispatch: A,
526
526
  commit: N,
527
- paintPreview: C,
527
+ paintPreview: P,
528
528
  clearPreview: O
529
529
  }), [
530
530
  A,
531
531
  N,
532
- C,
532
+ P,
533
533
  O
534
534
  ]);
535
- Ct(i, () => ({
536
- commands: x,
535
+ Pt(i, () => ({
536
+ commands: M,
537
537
  undo: D.undo,
538
538
  redo: D.redo,
539
539
  subscribe: R,
540
- getScene: Y,
540
+ getScene: j,
541
541
  formattingLocale: H,
542
542
  getSelection: () => b.getState().selection,
543
543
  setSelection: (o) => b.getState().setSelection(o),
@@ -547,27 +547,27 @@ var or = (e) => ue((t) => ({
547
547
  getGlyphs: () => h,
548
548
  getPointSymbols: (o) => p("point", o)?.symbols
549
549
  }), [
550
- x,
550
+ M,
551
551
  D,
552
552
  R,
553
- Y,
553
+ j,
554
554
  H,
555
555
  b,
556
556
  k,
557
557
  h,
558
558
  p
559
559
  ]);
560
- const X = M(() => E ? {
560
+ const Q = x(() => E ? {
561
561
  chartId: V,
562
562
  store: E,
563
563
  selectionStore: b,
564
- targetBoundaryStore: G,
565
- commands: x,
564
+ targetBoundaryStore: T,
565
+ commands: M,
566
566
  history: D,
567
567
  formattingLocale: H,
568
- compileBus: j,
568
+ compileBus: Y,
569
569
  colorScheme: m,
570
- mode: T,
570
+ mode: G,
571
571
  styleResolver: L,
572
572
  anchorResolver: w,
573
573
  findGeom: B,
@@ -576,31 +576,31 @@ var or = (e) => ue((t) => ({
576
576
  V,
577
577
  E,
578
578
  b,
579
- G,
580
- x,
579
+ T,
580
+ M,
581
581
  D,
582
582
  H,
583
- j,
583
+ Y,
584
584
  m,
585
- T,
585
+ G,
586
586
  L,
587
587
  w,
588
588
  B,
589
589
  K
590
590
  ]);
591
- return /* @__PURE__ */ c(Mt, {
592
- forcedErrors: Q,
591
+ return /* @__PURE__ */ c(xt, {
592
+ forcedErrors: X,
593
593
  onError: d,
594
594
  resetKeys: [t, e],
595
- children: X ? /* @__PURE__ */ c($e.Provider, {
596
- value: X,
597
- children: /* @__PURE__ */ c(it, {
595
+ children: Q ? /* @__PURE__ */ c(Oe.Provider, {
596
+ value: Q,
597
+ children: /* @__PURE__ */ c(Me, {
598
598
  value: p,
599
- children: /* @__PURE__ */ c(Ae, {
599
+ children: /* @__PURE__ */ c(Ke, {
600
600
  value: k,
601
601
  children: /* @__PURE__ */ c(z, {
602
- shapes: P?.shapes,
603
- children: /* @__PURE__ */ c(Fe, {
602
+ shapes: C?.shapes,
603
+ children: /* @__PURE__ */ c(Ve, {
604
604
  glyphs: h,
605
605
  children: I
606
606
  })
@@ -627,7 +627,7 @@ var or = (e) => ue((t) => ({
627
627
  message: `formattingLocale '${e}' is not a tag Intl can format in, so the chart formats in ${ct}.`
628
628
  }]);
629
629
  }, [e, t]), e === void 0 ? void 0 : ht(e));
630
- function Yn({ theme: e, glyphs: t, ...r } = {}) {
630
+ function jn({ theme: e, glyphs: t, ...r } = {}) {
631
631
  const n = vt(r);
632
632
  return {
633
633
  ...n,
@@ -644,7 +644,7 @@ var U = (e, t) => {
644
644
  if (!e.endsWith("%")) return null;
645
645
  const r = Number.parseFloat(e);
646
646
  return Number.isFinite(r) ? r / 100 * t : null;
647
- }, jn = ({ x: e, y: t, width: r, height: n }, s) => {
647
+ }, Yn = ({ x: e, y: t, width: r, height: n }, s) => {
648
648
  const a = U(e, s.width), i = U(t, s.height), l = U(r, s.width), d = U(n, s.height);
649
649
  return a === null || i === null || l === null || d === null ? null : {
650
650
  x: a,
@@ -654,7 +654,7 @@ var U = (e, t) => {
654
654
  };
655
655
  }, gr = ({ animateTransitions: e, cx: t, cy: r, r: n, effects: s, ...a }) => {
656
656
  const i = W(s);
657
- return e ? /* @__PURE__ */ c(We, {
657
+ return e ? /* @__PURE__ */ c(Ue, {
658
658
  animate: {
659
659
  cx: t,
660
660
  cy: r,
@@ -671,7 +671,7 @@ var U = (e, t) => {
671
671
  });
672
672
  }, pr = ({ animateTransitions: e, x1: t, y1: r, x2: n, y2: s, effects: a, ...i }) => {
673
673
  const l = W(a);
674
- return e ? /* @__PURE__ */ c(Ve, {
674
+ return e ? /* @__PURE__ */ c(ot, {
675
675
  animate: {
676
676
  x1: t,
677
677
  y1: r,
@@ -706,7 +706,7 @@ var U = (e, t) => {
706
706
  width: n,
707
707
  height: s
708
708
  };
709
- return /* @__PURE__ */ c(Qe, {
709
+ return /* @__PURE__ */ c(We, {
710
710
  animate: a === void 0 || i === void 0 ? S : {
711
711
  ...S,
712
712
  rx: a,
@@ -727,18 +727,18 @@ var U = (e, t) => {
727
727
  style: a,
728
728
  ...s
729
729
  });
730
- }, Qn = (e) => {
731
- const { Circle: t } = ee(), { animateTransitions: r } = te(), { symbol: n, ...s } = e, a = {
730
+ }, Xn = (e) => {
731
+ const { Circle: t } = te(), { animateTransitions: r } = re(), { symbol: n, ...s } = e, a = {
732
732
  ...s,
733
733
  animateTransitions: r
734
734
  };
735
735
  return n !== void 0 && n !== "circle" ? /* @__PURE__ */ c("g", {
736
736
  style: W(e.effects),
737
737
  "data-testid": e["data-testid"],
738
- children: /* @__PURE__ */ c(tt, {
738
+ children: /* @__PURE__ */ c(Je, {
739
739
  symbol: n,
740
- cx: Ge(e.cx),
741
- cy: Ge(e.cy),
740
+ cx: Te(e.cx),
741
+ cy: Te(e.cy),
742
742
  size: e.r * 2,
743
743
  fill: e.fill ?? "currentColor",
744
744
  fillOpacity: e.fillOpacity,
@@ -747,33 +747,33 @@ var U = (e, t) => {
747
747
  strokeOpacity: e.strokeOpacity,
748
748
  strokeWidth: e.strokeWidth,
749
749
  motion: r ? {
750
- transition: Pe,
750
+ transition: Ce,
751
751
  intro: !1,
752
752
  fadesIn: !1
753
753
  } : null
754
754
  })
755
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 = {
756
+ }, Qn = (e) => {
757
+ const { Line: t } = te(), { animateTransitions: r } = re(), n = {
758
758
  ...e,
759
759
  animateTransitions: r
760
760
  };
761
761
  return t === void 0 ? pr(n) : /* @__PURE__ */ c(z, { children: /* @__PURE__ */ c(t, { ...n }) });
762
762
  }, Jn = ({ cornerRadius: e, ...t }) => {
763
- const { Rect: r } = ee(), n = Ce()?.size ?? null, s = Oe(), { animateTransitions: a } = te(), i = {
763
+ const { Rect: r } = te(), n = Pe()?.size ?? null, s = Fe(), { animateTransitions: a } = re(), i = {
764
764
  ...t,
765
765
  animateTransitions: a,
766
766
  ...Sr(e, t, n, s)
767
767
  };
768
768
  return r === void 0 ? fr(i) : /* @__PURE__ */ c(z, { children: /* @__PURE__ */ c(r, { ...i }) });
769
769
  }, Zn = (e) => {
770
- const { Path: t } = ee(), { animateTransitions: r } = te(), n = {
770
+ const { Path: t } = te(), { animateTransitions: r } = re(), n = {
771
771
  ...e,
772
772
  animateTransitions: r
773
773
  };
774
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),
775
+ }, Te = (e) => typeof e == "number" ? `${e}px` : e, yr = ({ d: e, source: t, ...r }) => /* @__PURE__ */ c(at, {
776
+ d: je(e, Ce, t),
777
777
  ...r
778
778
  }), Sr = (e, t, r, n) => {
779
779
  if (e === void 0) return {};
@@ -805,7 +805,7 @@ var U = (e, t) => {
805
805
  rx: e / t.x,
806
806
  ry: e / t.y
807
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 = {
808
+ const l = Qe(), d = Be(), g = xe((I) => I.coordSystem.type), S = Gr(e, d("point", g)?.symbols ?? [], l), G = {
809
809
  size: t,
810
810
  fill: r,
811
811
  fillOpacity: n,
@@ -821,13 +821,13 @@ var U = (e, t) => {
821
821
  strokeOpacity: a,
822
822
  strokeWidth: i,
823
823
  strokeLinejoin: "round"
824
- }) : /* @__PURE__ */ c(Ye, {
824
+ }) : /* @__PURE__ */ c(nt, {
825
825
  symbol: S,
826
826
  glyphs: l,
827
- ...T
827
+ ...G
828
828
  });
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;
829
+ }, Gr = (e, t, r) => Et(e) || t.includes(e) || !de(e) && r.has(e) ? e : t[0] ?? "circle", ts = ({ children: e, ...t }) => {
830
+ const r = Pe()?.size ?? null;
831
831
  return /* @__PURE__ */ c("svg", {
832
832
  viewBox: "0 0 1 1",
833
833
  preserveAspectRatio: "none",
@@ -842,7 +842,7 @@ var U = (e, t) => {
842
842
  })
843
843
  });
844
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 : {
845
+ const r = $e(), n = r === null ? null : r.width * (e.x1 - e.x0), s = r === null ? null : r.height * (e.y1 - e.y0), a = x(() => n === null || s === null ? null : {
846
846
  width: n,
847
847
  height: s
848
848
  }, [n, s]);
@@ -858,7 +858,7 @@ var U = (e, t) => {
858
858
  children: t
859
859
  })
860
860
  });
861
- }, Gr = "drqe3u0", Er = "drqe3u1", Rr = "drqe3u2", wr = "drqe3u3", F = "drqe3u4", Ir = "drqe3u5", Nr = "drqe3u6", Cr = "drqe3u7", Z = "drqe3u8", Pr = "drqe3u9", Lr = "drqe3ua";
861
+ }, Tr = "drqe3u0", Er = "drqe3u1", Rr = "drqe3u2", wr = "drqe3u3", F = "drqe3u4", Ir = "drqe3u5", Nr = "drqe3u6", Pr = "drqe3u7", Z = "drqe3u8", Cr = "drqe3u9", Lr = "drqe3ua";
862
862
  var Dr = "drqe3uc", _r = "drqe3ud", qr = "drqe3ue", kr = "drqe3uf";
863
863
  var $r = "drqe3uh", Hr = "drqe3ui", we = {
864
864
  enabled: "drqe3uk drqe3uj",
@@ -871,12 +871,12 @@ var $r = "drqe3uh", Hr = "drqe3ui", we = {
871
871
  cached: "drqe3ur drqe3up",
872
872
  untouched: "drqe3us drqe3up"
873
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);
874
+ const { compileBus: n } = ce(), [s] = v(() => zt()), [a, i] = v(!1), [l, d] = v(Tt);
875
875
  q(() => {
876
876
  const { recordCompile: h } = s.getState(), m = n.getLastTrigger(), p = n.getLastCompile();
877
877
  return m && p && h(m, p), n.subscribe(h);
878
878
  }, [s, n]);
879
- const g = ie(s, (h) => h.lastCompile), S = ie(s, (h) => h.history), T = n.getCacheStats(), I = g === null && S.length === 0, P = () => {
879
+ const g = ie(s, (h) => h.lastCompile), S = ie(s, (h) => h.history), G = n.getCacheStats(), I = g === null && S.length === 0, C = () => {
880
880
  d((h) => {
881
881
  const m = !h;
882
882
  return wt(m), m;
@@ -890,7 +890,7 @@ var $r = "drqe3uh", Hr = "drqe3ui", we = {
890
890
  },
891
891
  children: [
892
892
  /* @__PURE__ */ y("div", {
893
- className: Gr,
893
+ className: Tr,
894
894
  children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ c("div", {
895
895
  className: Er,
896
896
  children: "compile cache"
@@ -908,7 +908,7 @@ var $r = "drqe3uh", Hr = "drqe3ui", we = {
908
908
  className: "drqe3ub",
909
909
  children: [/* @__PURE__ */ y("button", {
910
910
  type: "button",
911
- onClick: P,
911
+ onClick: C,
912
912
  className: l ? we.enabled : we.disabled,
913
913
  "aria-pressed": l,
914
914
  children: ["cache ", l ? "enabled" : "disabled"]
@@ -917,14 +917,14 @@ var $r = "drqe3uh", Hr = "drqe3ui", we = {
917
917
  children: "next compile reflects this toggle"
918
918
  })]
919
919
  }),
920
- !a && !I && /* @__PURE__ */ y(Lt, { children: [/* @__PURE__ */ c(xr, {
920
+ !a && !I && /* @__PURE__ */ y(Lt, { children: [/* @__PURE__ */ c(Mr, {
921
921
  delta: g?.stages,
922
922
  durations: g?.stageDurationsMs,
923
- cumulative: T
924
- }), /* @__PURE__ */ c(Mr, { entries: S })] })
923
+ cumulative: G
924
+ }), /* @__PURE__ */ c(xr, { entries: S })] })
925
925
  ]
926
926
  });
927
- }, xr = ({ delta: e, durations: t, cumulative: r }) => /* @__PURE__ */ y("table", {
927
+ }, Mr = ({ delta: e, durations: t, cumulative: r }) => /* @__PURE__ */ y("table", {
928
928
  className: Rr,
929
929
  children: [/* @__PURE__ */ c("thead", { children: /* @__PURE__ */ y("tr", {
930
930
  className: $r,
@@ -993,7 +993,7 @@ var $r = "drqe3uh", Hr = "drqe3ui", we = {
993
993
  ]
994
994
  }, n);
995
995
  }) })]
996
- }), Mr = ({ entries: e }) => e.length === 0 ? null : /* @__PURE__ */ y("div", {
996
+ }), xr = ({ entries: e }) => e.length === 0 ? null : /* @__PURE__ */ y("div", {
997
997
  className: _r,
998
998
  children: [/* @__PURE__ */ c("div", {
999
999
  className: Hr,
@@ -1008,12 +1008,12 @@ var $r = "drqe3uh", Hr = "drqe3ui", we = {
1008
1008
  "aria-hidden": !0
1009
1009
  }),
1010
1010
  /* @__PURE__ */ c("span", {
1011
- className: Cr,
1011
+ className: Pr,
1012
1012
  title: t.label,
1013
1013
  children: t.label
1014
1014
  }),
1015
1015
  /* @__PURE__ */ y("span", {
1016
- className: Pr,
1016
+ className: Cr,
1017
1017
  children: [
1018
1018
  r,
1019
1019
  "/",
@@ -1030,8 +1030,8 @@ var $r = "drqe3uh", Hr = "drqe3ui", we = {
1030
1030
  for (const n of le) t(e[n]) && (r += 1);
1031
1031
  return r;
1032
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(() => ({
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 = Ct(s, a, a);
1034
+ return x(() => ({
1035
1035
  ...i,
1036
1036
  undo: r,
1037
1037
  redo: n
@@ -1058,7 +1058,7 @@ var $r = "drqe3uh", Hr = "drqe3ui", we = {
1058
1058
  if (!n || !s) return;
1059
1059
  const a = (i) => {
1060
1060
  if (!Fr(i) || i.defaultPrevented || Ur(i.target)) return;
1061
- const l = st(i);
1061
+ const l = rt(i);
1062
1062
  if (!l) return;
1063
1063
  const d = e.current;
1064
1064
  d && (l === "undo" ? d.undo() : d.redo()) && i.preventDefault();
@@ -1074,79 +1074,79 @@ var $r = "drqe3uh", Hr = "drqe3ui", we = {
1074
1074
  return ie(e, (t) => t.boundary);
1075
1075
  };
1076
1076
  export {
1077
- an as CanvasTextMeasurer,
1078
- Tn as DefaultFooter,
1077
+ Nn as CanvasTextMeasurer,
1078
+ dn as DefaultFooter,
1079
1079
  gr as DefaultGeomCircle,
1080
1080
  pr as DefaultGeomLine,
1081
1081
  vr as DefaultGeomPath,
1082
1082
  fr as DefaultGeomRect,
1083
- In as DefaultGrid,
1084
- hn as DefaultHeader,
1085
- yn as DefaultSwatch,
1086
- jr as DefaultTooltip,
1083
+ Cn as DefaultGrid,
1084
+ pn as DefaultHeader,
1085
+ Yr as DefaultSwatch,
1086
+ rn as DefaultTooltip,
1087
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,
1088
+ Xe as GRAPH_MODES,
1089
+ Xn as GeomCircle,
1090
+ Qn as GeomLine,
1091
+ Sn as GeomOverpaint,
1092
+ nn as GeomPanelSizeProvider,
1093
1093
  Zn as GeomPath,
1094
1094
  Jn as GeomRect,
1095
- Mt as GraphErrorBoundary,
1095
+ xt as GraphErrorBoundary,
1096
1096
  ye as GraphErrorPanel,
1097
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,
1098
+ yn as GraphRenderer,
1099
+ zr as GraphyBadge,
1100
+ $n as HoverProvider,
1101
+ vn as IntlProvider,
1102
+ An as IntroFade,
1103
+ Jr as IntroWipeClip,
1104
1104
  es as SymbolFigure,
1105
- Jr as TextMeasurerProvider,
1106
- rn as ThemeProvider,
1105
+ Pn as TextMeasurerProvider,
1106
+ hn as ThemeProvider,
1107
1107
  rs as UnitBoxSvg,
1108
1108
  ts as UnitSpaceSvg,
1109
- kn as buildDotsEditOutlineShapes,
1110
- Yn as createGraphyKit,
1111
- Xr as darkTheme,
1112
- Nn as defineGeomRenderer,
1113
- Dn as defineGlyph,
1114
- Gn as getBuiltInEditOutlineShapes,
1115
- un as lightTheme,
1116
- Yr as lightenCss,
1109
+ Hn as buildDotsEditOutlineShapes,
1110
+ jn as createGraphyKit,
1111
+ sn as darkTheme,
1112
+ Gn as defineGeomRenderer,
1113
+ Rn as defineGlyph,
1114
+ Bn as getBuiltInEditOutlineShapes,
1115
+ _n as lightTheme,
1116
+ tn as lightenCss,
1117
1117
  Ot as pruneSelection,
1118
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,
1135
- Cn as useGraphCommands,
1136
- En as useGraphHandle,
1119
+ Yn as readRectPixels,
1120
+ En as resolveGraphyBadgeVariant,
1121
+ bn as resolvePathStroke,
1122
+ Tn as scalePointToPanel,
1123
+ Zr as stampAxisEditTarget,
1124
+ mn as stampGridEditTarget,
1125
+ gn as stampLegendEditTarget,
1126
+ Mn as useElementScreenRect,
1127
+ ln as useFormattingLocale,
1128
+ Dn as useGeomHitTest,
1129
+ In as useGeomHover,
1130
+ fn as useGeomPanelSize,
1131
+ jr as useGeomReaderTree,
1132
+ On as useGeomStyleReader,
1133
+ $e as useGeomViewportSize,
1134
+ re as useGraphAnimation,
1135
+ Ln as useGraphCommands,
1136
+ wn as useGraphHandle,
1137
1137
  ss as useGraphHistory,
1138
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,
1139
+ Qr as useGraphLocale,
1140
+ xn as useGraphSelection,
1141
+ cn as useGuidesTakePress,
1142
+ qn as useHandleScene,
1143
+ on as useHoverState,
1144
+ kn as usePaintDefs,
1145
+ an as useResolvedStyle,
1146
+ xe as useSceneSelector,
1147
+ un as useStyleReaderTree,
1148
+ Xr as useStyleResolver,
1149
1149
  is as useTargetBoundary,
1150
- An as useTextMeasurer,
1151
- tn as vars
1150
+ Vr as useTextMeasurer,
1151
+ en as vars
1152
1152
  };