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

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,5 +1,5 @@
1
- import { $n as De, $t as qe, An as ee, Bn as Cr, Bt as Lr, Dn as Ge, En as F, Fn as K, G as Dr, Gn as _e, Gt as qr, Hn as ke, I as _r, In as U, Jn as Re, K as kr, Kt as $r, L as Hr, Ln as xr, Lt as Mr, Mn as $e, Nn as Or, O as Ar, On as Br, Ot as Fr, Pn as He, Qn as Kr, Qt as xe, R as Ur, Tn as zr, Tt as Wr, U as Yr, Un as Me, Ut as jr, Vn as Oe, W as Vr, Wn as Xr, Xn as Qr, Yn as Jr, Yt as J, Zn as Zr, _n as en, _t as tn, a as rn, cn as Ae, dn as nn, en as sn, er as Be, fn as on, gt as an, ht as cn, i as ln, in as dn, ir as Z, jn as Ie, jt as un, kn as Fe, kt as mn, l as hn, ln as Ke, n as gn, nn as te, nr as Ue, pn as fn, qn as ze, qt as pn, r as vn, rn as We, sn as yn, t as Ye, tn as Sn, tr as oe, un as bn, wn as Tn, xn as En, y as Gn, yt as Rn, zn as In } from "./history-chords-DCCD82Ej.js";
2
- import { COMPILER_STAGE_KEYS as ie, DEFAULT_LOCALE as je, Geom as Ve, GraphCompilationSession as Xe, areEditTargetsEqual as Qe, buildDiagnostic as de, buildPointSymbolPath as Je, canonicalizeLocale as Ze, createAnchorResolver as et, createCompiler as tt, createDataLabelPlacementResolver as rt, createSpecBuilder as nt, createStyleResolver as we, findAnnotation as st, findIntlLocale as ot, findLayerById as ue, foldGeomCornerRadii as it, isCompilerCachingEnabled as at, isGeometricSymbol as ae, isImageSymbol as ct, resolveDefinition as lt, resolveGeomCornerRadiusPx as me, setCompilerCachingEnabled as dt, toPercent as X } from "@graphysdk/viz-engine";
1
+ import { $n as Pr, A as Dr, An as Lr, At as qr, B as _r, Cn as kr, Dn as $r, Dt as Hr, En as xr, Fn as Mr, G as Ar, Gn as Le, Gt as Or, Hn as Br, Ht as Fr, In as qe, J as Kr, Jt as zr, K as Ur, Kn as Wr, Ln as F, Mn as ee, Nn as Ge, Nt as Yr, On as K, Pn as _e, Qn as jr, R as Vr, Rn as z, Un as ke, Vn as Xr, Wn as $e, Xn as Re, Yn as He, Yt as Jr, Zn as Qr, Zt as Q, _t as Zr, a as en, an as xe, dn as Me, en as Ae, er as tn, fn as rn, hn as nn, i as sn, in as te, ir as Oe, jn as Be, jt as on, kn as Ne, l as an, ln as cn, mn as ln, n as dn, nn as un, nr as Fe, on as mn, or as Z, pn as hn, q as gn, qn as Ke, qt as fn, r as pn, rn as vn, rr as oe, t as ze, tn as Ue, tr as We, un as Ye, vt as yn, xt as Sn, y as bn, yn as Tn, yt as En, z as Gn, zn as Rn, zt as Nn } from "./history-chords-L-9s4-lq.js";
2
+ import { COMPILER_STAGE_KEYS as ie, DEFAULT_LOCALE as je, Geom as Ve, GraphCompilationSession as Xe, areEditTargetsEqual as Je, buildDiagnostic as de, buildPointSymbolPath as Qe, canonicalizeLocale as Ze, createAnchorResolver as et, createCompiler as tt, createDataLabelPlacementResolver as rt, createSpecBuilder as nt, createStyleResolver as Ie, findAnnotation as st, findIntlLocale as ot, findLayerById as ue, foldGeomCornerRadii as it, isCompilerCachingEnabled as at, isGeometricSymbol as ae, isImageSymbol as ct, resolveDefinition as lt, resolveGeomCornerRadiusPx as me, setCompilerCachingEnabled as dt, toPercent as X } from "@graphysdk/viz-engine";
3
3
  import { Component as ut, useCallback as f, useEffect as _, useId as mt, useImperativeHandle as ht, useMemo as H, useRef as he, useState as S, useSyncExternalStore as gt } from "react";
4
4
  import { Fragment as ft, jsx as c, jsxs as v } from "react/jsx-runtime";
5
5
  import { useStore as se } from "zustand";
@@ -65,24 +65,24 @@ var Gt = class extends ut {
65
65
  const { forcedErrors: t, children: r } = this.props;
66
66
  return t && t.length > 0 ? /* @__PURE__ */ c(ge, { errors: t }) : r;
67
67
  }
68
- }, Ne = (e) => typeof e == "object" && "geom" in e && "render" in e, Pe = (e) => {
68
+ }, we = (e) => typeof e == "object" && "geom" in e && "render" in e, Ce = (e) => {
69
69
  const t = lt(e);
70
70
  return t instanceof Ve ? t : null;
71
71
  }, Rt = (e, t) => {
72
- const r = e.filter((n) => It(n, t));
72
+ const r = e.filter((n) => Nt(n, t));
73
73
  return r.length === e.length ? e : r;
74
- }, It = (e, t) => e.kind === "annotation" ? st(t.annotations, e.id) !== null : e.kind === "observations" ? ue(t.layers, e.layerId) !== void 0 : e.kind === "layer" && e.layerId !== void 0 ? ue(t.layers, e.layerId) !== void 0 : !0, pe = [], wt = () => ce((e) => ({
74
+ }, Nt = (e, t) => e.kind === "annotation" ? st(t.annotations, e.id) !== null : e.kind === "observations" ? ue(t.layers, e.layerId) !== void 0 : e.kind === "layer" && e.layerId !== void 0 ? ue(t.layers, e.layerId) !== void 0 : !0, pe = [], It = () => ce((e) => ({
75
75
  selection: pe,
76
- setSelection: (t) => e((r) => Nt(r.selection, t) ? r : { selection: t }),
76
+ setSelection: (t) => e((r) => wt(r.selection, t) ? r : { selection: t }),
77
77
  clearSelection: () => e((t) => t.selection.length === 0 ? t : { selection: pe })
78
- })), Nt = (e, t) => e === t ? !0 : e.length !== t.length ? !1 : e.every((r, n) => {
78
+ })), wt = (e, t) => e === t ? !0 : e.length !== t.length ? !1 : e.every((r, n) => {
79
79
  const s = t[n];
80
- return s !== void 0 && Qe(r, s);
81
- }), Pt = 5, Ct = (e) => {
80
+ return s !== void 0 && Je(r, s);
81
+ }), Ct = 5, Pt = (e) => {
82
82
  if (!Re) return {
83
83
  emit: () => {
84
84
  },
85
- subscribe: () => Dt,
85
+ subscribe: () => Lt,
86
86
  getLastTrigger: () => null,
87
87
  getLastCompile: () => null,
88
88
  getCacheStats: () => e.getCacheStats()
@@ -104,7 +104,7 @@ var Gt = class extends ut {
104
104
  getLastCompile: () => e.getLastCompile(),
105
105
  getCacheStats: () => e.getCacheStats()
106
106
  };
107
- }, Lt = () => ce((e) => ({
107
+ }, Dt = () => ce((e) => ({
108
108
  lastCompile: null,
109
109
  history: [],
110
110
  nextId: 1,
@@ -120,12 +120,12 @@ var Gt = class extends ut {
120
120
  };
121
121
  return {
122
122
  lastCompile: s,
123
- history: _t(n.history, s, Pt),
123
+ history: _t(n.history, s, Ct),
124
124
  nextId: n.nextId + 1,
125
125
  lastSnapshot: r
126
126
  };
127
127
  })
128
- })), Dt = () => {
128
+ })), Lt = () => {
129
129
  }, qt = (e) => {
130
130
  switch (e.kind) {
131
131
  case "init":
@@ -142,9 +142,9 @@ var Gt = class extends ut {
142
142
  return [...e.slice(n), t];
143
143
  };
144
144
  function ve(e) {
145
- const t = e.filter(Ne), r = /* @__PURE__ */ new Set([...Object.keys(We), ...t.map((l) => l.geom)]), n = [], s = /* @__PURE__ */ new Set();
145
+ const t = e.filter(we), r = /* @__PURE__ */ new Set([...Object.keys(xe), ...t.map((l) => l.geom)]), n = [], s = /* @__PURE__ */ new Set();
146
146
  for (const l of e) {
147
- const d = Pe(l);
147
+ const d = Ce(l);
148
148
  d === null || r.has(d.type) || s.has(d.type) || (s.add(d.type), n.push({
149
149
  kind: "userInput",
150
150
  severity: "error",
@@ -273,7 +273,7 @@ function Mt(e, t) {
273
273
  })));
274
274
  return n;
275
275
  }
276
- function Ot(e, t) {
276
+ function At(e, t) {
277
277
  const { coordSystem: r, layers: n } = e, s = /* @__PURE__ */ new Set(), i = [];
278
278
  for (const a of n) {
279
279
  if (a.interactive === !1 || a.spatialKind === "renderHitTest" || s.has(a.geom)) continue;
@@ -292,9 +292,9 @@ function Ot(e, t) {
292
292
  }
293
293
  return i;
294
294
  }
295
- function At(e, t) {
295
+ function Ot(e, t) {
296
296
  let r;
297
- return e.layers.flatMap((n, s) => te(t(n.geom, e.coordSystem.type)) ? Bt(n) ? (r ??= we().readers(e), (r.geom(n).get("overpaint", void 0, "hovered")?.length ?? 0) === 0 ? [] : [{
297
+ return e.layers.flatMap((n, s) => te(t(n.geom, e.coordSystem.type)) ? Bt(n) ? (r ??= Ie().readers(e), (r.geom(n).get("overpaint", void 0, "hovered")?.length ?? 0) === 0 ? [] : [{
298
298
  kind: "userInput",
299
299
  severity: "warning",
300
300
  code: "INVALID_STYLE_RULE",
@@ -311,7 +311,7 @@ var Bt = (e) => [e.styles.defaults, e.styles.overrides].some((t) => t.some((r) =
311
311
  function Ft(e) {
312
312
  const t = /* @__PURE__ */ new Set(), r = [];
313
313
  for (const n of e) {
314
- const s = Pe(n);
314
+ const s = Ce(n);
315
315
  s === null || t.has(s.type) || s.dataLabelCoordTypes.length === 0 || s.getDataLabelPlacements !== void 0 || (t.add(s.type), r.push({
316
316
  kind: "userInput",
317
317
  severity: "warning",
@@ -329,15 +329,15 @@ function Ft(e) {
329
329
  var Kt = (e) => ce((t) => ({
330
330
  scene: e,
331
331
  setScene: (r) => t((n) => n.scene === r ? n : { scene: r })
332
- })), Ut = ({ spec: e, data: t, colorScheme: r, plugins: n, theme: s, resolveRenderer: i, anchorResolver: a, onSpecChange: l, onError: d, onWarnings: g }) => {
333
- const b = J(l), C = J(d), G = J(g), [{ session: m, compileBus: h, findGeom: T }] = S(() => {
332
+ })), zt = ({ spec: e, data: t, colorScheme: r, plugins: n, theme: s, resolveRenderer: i, anchorResolver: a, onSpecChange: l, onError: d, onWarnings: g }) => {
333
+ const b = Q(l), P = Q(d), G = Q(g), [{ session: m, compileBus: h, findGeom: T }] = S(() => {
334
334
  const o = tt({
335
335
  plugins: n,
336
336
  theme: s
337
337
  });
338
338
  return {
339
339
  session: new Xe(o),
340
- compileBus: Ct(o),
340
+ compileBus: Pt(o),
341
341
  findGeom: (u) => o.findGeom(u)
342
342
  };
343
343
  }), [p] = S(() => {
@@ -346,44 +346,44 @@ var Kt = (e) => ce((t) => ({
346
346
  errors: [...u.errors, ...o.errors],
347
347
  warnings: [...u.warnings, ...o.warnings]
348
348
  };
349
- }), x = he(null), [L] = S(zt), E = he(null), y = f((o) => p.errors.length === 0 ? o : [...p.errors, ...o ?? []], [p]), k = f((o) => {
349
+ }), x = he(null), [D] = S(Ut), E = he(null), y = f((o) => p.errors.length === 0 ? o : [...p.errors, ...o ?? []], [p]), k = f((o) => {
350
350
  if (!o.ok) return o.errors;
351
351
  if (E.current) E.current.getState().setScene(o.scene);
352
352
  else {
353
353
  const u = Kt(o.scene);
354
- u.subscribe(L.notify), E.current = u, L.notify();
354
+ u.subscribe(D.notify), E.current = u, D.notify();
355
355
  }
356
356
  return null;
357
- }, [L]), [z, I] = S(() => {
357
+ }, [D]), [U, N] = S(() => {
358
358
  const o = m.compile({
359
359
  spec: e,
360
360
  data: t,
361
361
  colorScheme: r
362
362
  });
363
363
  return x.current = o, y(k(o));
364
- }), w = f((o) => o.ok ? [
364
+ }), I = f((o) => o.ok ? [
365
365
  ...o.warnings,
366
366
  ...kt(o.scene, i),
367
367
  ...$t(o.scene, i),
368
368
  ...Ht(o.scene),
369
369
  ...xt(o.scene, i),
370
- ...Ot(o.scene, i),
371
370
  ...At(o.scene, i),
371
+ ...Ot(o.scene, i),
372
372
  ...Mt(o.scene, a)
373
- ] : o.warnings, [i, a]), N = f((o) => {
374
- o.length !== 0 && (Z(o), C.current?.(o));
375
- }, [C]), P = f((o) => {
373
+ ] : o.warnings, [i, a]), w = f((o) => {
374
+ o.length !== 0 && (Z(o), P.current?.(o));
375
+ }, [P]), C = f((o) => {
376
376
  o.length !== 0 && (Z(o), G.current?.(o));
377
377
  }, [G]);
378
378
  _(() => {
379
379
  const o = x.current;
380
- o && (N([...p.errors, ...o.ok ? [] : o.errors]), P([...p.warnings, ...w(o)]), o.ok && h.emit({ kind: "init" }));
380
+ o && (w([...p.errors, ...o.ok ? [] : o.errors]), C([...p.warnings, ...I(o)]), o.ok && h.emit({ kind: "init" }));
381
381
  }, [
382
382
  h,
383
- N,
384
- P,
383
+ w,
384
+ C,
385
385
  p,
386
- w
386
+ I
387
387
  ]), _(() => {
388
388
  const o = m.update({
389
389
  spec: e,
@@ -393,7 +393,7 @@ var Kt = (e) => ce((t) => ({
393
393
  if (!o) return;
394
394
  o.committedSpec && b.current?.(o.committedSpec);
395
395
  const u = k(o.result);
396
- I(y(u)), u && N(u), P(w(o.result)), u || h.emit({ kind: o.hasSpecChange ? "spec" : "data" });
396
+ N(y(u)), u && w(u), C(I(o.result)), u || h.emit({ kind: o.hasSpecChange ? "spec" : "data" });
397
397
  }, [
398
398
  e,
399
399
  t,
@@ -401,37 +401,37 @@ var Kt = (e) => ce((t) => ({
401
401
  m,
402
402
  h,
403
403
  k,
404
- N,
405
- P,
406
- y,
407
404
  w,
405
+ C,
406
+ y,
407
+ I,
408
408
  b
409
409
  ]);
410
410
  const M = f((o) => {
411
- I((u) => u === null ? u : y(null)), P(w(o));
411
+ N((u) => u === null ? u : y(null)), C(I(o));
412
412
  }, [
413
413
  y,
414
- P,
415
- w
416
- ]), D = f((o) => {
414
+ C,
415
+ I
416
+ ]), L = f((o) => {
417
417
  o.scene && E.current?.getState().setScene(o.scene), o.result && M(o.result), o.command && h.emit({
418
418
  kind: "command",
419
419
  command: o.command
420
- }), o.spec && b.current?.(o.spec), o.errors && N([...o.errors]);
420
+ }), o.spec && b.current?.(o.spec), o.errors && w([...o.errors]);
421
421
  }, [
422
422
  M,
423
423
  h,
424
424
  b,
425
- N
425
+ w
426
426
  ]), R = f((o) => {
427
- for (const u of o) D(u);
427
+ for (const u of o) L(u);
428
428
  return o.some((u) => !!u.scene);
429
- }, [D]), W = f((o, u) => {
429
+ }, [L]), W = f((o, u) => {
430
430
  R(m.applyCommand(o, u));
431
431
  }, [m, R]), Y = f(() => {
432
432
  R(m.commit());
433
- }, [m, R]), j = f(() => R(m.undo()), [m, R]), O = f(() => R(m.redo()), [m, R]), $ = f((o) => {
434
- const u = m.preview(o).find((Le) => Le.scene)?.scene;
433
+ }, [m, R]), j = f(() => R(m.undo()), [m, R]), A = f(() => R(m.redo()), [m, R]), $ = f((o) => {
434
+ const u = m.preview(o).find((De) => De.scene)?.scene;
435
435
  return u ? (E.current?.getState().setScene(u), !0) : !1;
436
436
  }, [m]), V = f(() => {
437
437
  const o = m.scene;
@@ -439,11 +439,11 @@ var Kt = (e) => ce((t) => ({
439
439
  }, [m]), q = H(() => ({
440
440
  stack: m.history,
441
441
  undo: j,
442
- redo: O
442
+ redo: A
443
443
  }), [
444
444
  m,
445
445
  j,
446
- O
446
+ A
447
447
  ]), ne = f(() => E.current?.getState().scene ?? null, []);
448
448
  return {
449
449
  store: E.current,
@@ -452,13 +452,13 @@ var Kt = (e) => ce((t) => ({
452
452
  paintPreview: $,
453
453
  clearPreview: V,
454
454
  history: q,
455
- subscribe: L.subscribe,
455
+ subscribe: D.subscribe,
456
456
  getScene: ne,
457
457
  compileBus: h,
458
- compileErrors: z,
458
+ compileErrors: U,
459
459
  findGeom: T
460
460
  };
461
- }, zt = () => {
461
+ }, Ut = () => {
462
462
  const e = /* @__PURE__ */ new Set();
463
463
  return {
464
464
  subscribe: (t) => (e.add(t), () => {
@@ -466,44 +466,44 @@ var Kt = (e) => ce((t) => ({
466
466
  }),
467
467
  notify: () => e.forEach((t) => t())
468
468
  };
469
- }, Wt = ["cartesian", "polar"], Yt = ({ data: e, spec: t, plugins: r = [], theme: n, glyphs: s, formattingLocale: i, handleRef: a, onSpecChange: l, onError: d, onWarnings: g, colorScheme: b = "light", children: C }) => {
470
- const G = Xt(i, g), [m] = S(() => n), [h] = S(() => _e(n?.glyphs, s)), T = m?.colorScheme ?? b, [p] = S(() => qe([...m?.plugins ?? [], ...r].filter(Ne)));
469
+ }, Wt = ["cartesian", "polar"], Yt = ({ data: e, spec: t, plugins: r = [], theme: n, glyphs: s, formattingLocale: i, handleRef: a, onSpecChange: l, onError: d, onWarnings: g, colorScheme: b = "light", children: P }) => {
470
+ const G = Xt(i, g), [m] = S(() => n), [h] = S(() => Ke(n?.glyphs, s)), T = m?.colorScheme ?? b, [p] = S(() => Ue([...m?.plugins ?? [], ...r].filter(we)));
471
471
  Vt(p, h);
472
- const x = mt(), [L] = S(() => et(r)), [E] = S(() => rt(r)), [y] = S(() => wt()), [k] = S(() => xe()), z = H(() => we({ colorScheme: T }), [T]), { store: I, dispatch: w, commit: N, paintPreview: P, clearPreview: M, history: D, subscribe: R, getScene: W, compileBus: Y, compileErrors: j, findGeom: O } = Ut({
472
+ const x = mt(), [D] = S(() => et(r)), [E] = S(() => rt(r)), [y] = S(() => It()), [k] = S(() => Ae()), U = H(() => Ie({ colorScheme: T }), [T]), { store: N, dispatch: I, commit: w, paintPreview: C, clearPreview: M, history: L, subscribe: R, getScene: W, compileBus: Y, compileErrors: j, findGeom: A } = zt({
473
473
  spec: t,
474
474
  data: e,
475
475
  colorScheme: T,
476
476
  plugins: r,
477
477
  theme: m,
478
478
  resolveRenderer: p,
479
- anchorResolver: L,
479
+ anchorResolver: D,
480
480
  onSpecChange: l,
481
481
  onError: d,
482
482
  onWarnings: g
483
483
  });
484
484
  _(() => {
485
- if (I)
486
- return I.subscribe((q, ne) => {
485
+ if (N)
486
+ return N.subscribe((q, ne) => {
487
487
  if (q.scene.spec === ne.scene.spec) return;
488
488
  const { selection: o, setSelection: u } = y.getState();
489
489
  o.length !== 0 && u(Rt(o, q.scene.spec));
490
490
  });
491
- }, [I, y]);
491
+ }, [N, y]);
492
492
  const $ = H(() => ({
493
- dispatch: w,
494
- commit: N,
495
- paintPreview: P,
493
+ dispatch: I,
494
+ commit: w,
495
+ paintPreview: C,
496
496
  clearPreview: M
497
497
  }), [
498
+ I,
498
499
  w,
499
- N,
500
- P,
500
+ C,
501
501
  M
502
502
  ]);
503
503
  ht(a, () => ({
504
504
  commands: $,
505
- undo: D.undo,
506
- redo: D.redo,
505
+ undo: L.undo,
506
+ redo: L.redo,
507
507
  subscribe: R,
508
508
  getScene: W,
509
509
  formattingLocale: G,
@@ -516,7 +516,7 @@ var Kt = (e) => ce((t) => ({
516
516
  getPointSymbols: (q) => p("point", q)?.symbols
517
517
  }), [
518
518
  $,
519
- D,
519
+ L,
520
520
  R,
521
521
  W,
522
522
  G,
@@ -525,48 +525,48 @@ var Kt = (e) => ce((t) => ({
525
525
  h,
526
526
  p
527
527
  ]);
528
- const V = H(() => I ? {
528
+ const V = H(() => N ? {
529
529
  chartId: x,
530
- store: I,
530
+ store: N,
531
531
  selectionStore: y,
532
532
  targetBoundaryStore: k,
533
533
  commands: $,
534
- history: D,
534
+ history: L,
535
535
  formattingLocale: G,
536
536
  compileBus: Y,
537
537
  colorScheme: T,
538
- styleResolver: z,
539
- anchorResolver: L,
540
- findGeom: O
538
+ styleResolver: U,
539
+ anchorResolver: D,
540
+ findGeom: A
541
541
  } : null, [
542
542
  x,
543
- I,
543
+ N,
544
544
  y,
545
545
  k,
546
546
  $,
547
- D,
547
+ L,
548
548
  G,
549
549
  Y,
550
550
  T,
551
- z,
552
- L,
553
- O
551
+ U,
552
+ D,
553
+ A
554
554
  ]);
555
555
  return /* @__PURE__ */ c(Gt, {
556
556
  forcedErrors: j,
557
557
  onError: d,
558
558
  resetKeys: [t, e],
559
- children: V ? /* @__PURE__ */ c(Be.Provider, {
559
+ children: V ? /* @__PURE__ */ c(Fe.Provider, {
560
560
  value: V,
561
- children: /* @__PURE__ */ c(Ae, {
561
+ children: /* @__PURE__ */ c(Ye, {
562
562
  value: p,
563
- children: /* @__PURE__ */ c(Ue, {
563
+ children: /* @__PURE__ */ c(Oe, {
564
564
  value: E,
565
- children: /* @__PURE__ */ c(F, {
565
+ children: /* @__PURE__ */ c(K, {
566
566
  shapes: m?.shapes,
567
- children: /* @__PURE__ */ c(Me, {
567
+ children: /* @__PURE__ */ c(Le, {
568
568
  glyphs: h,
569
- children: C
569
+ children: P
570
570
  })
571
571
  })
572
572
  })
@@ -580,7 +580,7 @@ var Kt = (e) => ce((t) => ({
580
580
  for (const n of Wt) for (const s of jt(e("point", n)?.symbols, r)) console.warn(`[graphy] The ${n} point renderer lists "${s}", but no glyph has that name. The shape menu offers it, and SymbolFigure draws the first listed symbol in its place.`);
581
581
  }, [e, t]);
582
582
  }, Xt = (e, t) => {
583
- const r = J(t);
583
+ const r = Q(t);
584
584
  return _(() => {
585
585
  if (e === void 0 || ot(e) !== void 0) return;
586
586
  const n = [{
@@ -617,8 +617,8 @@ var B = (e, t) => {
617
617
  width: l,
618
618
  height: d
619
619
  };
620
- }, Qt = ({ animateTransitions: e, cx: t, cy: r, r: n, effects: s, ...i }) => {
621
- const a = U(s);
620
+ }, Jt = ({ animateTransitions: e, cx: t, cy: r, r: n, effects: s, ...i }) => {
621
+ const a = z(s);
622
622
  return e ? /* @__PURE__ */ c(re.circle, {
623
623
  initial: !1,
624
624
  animate: {
@@ -626,7 +626,7 @@ var B = (e, t) => {
626
626
  cy: r,
627
627
  r: n
628
628
  },
629
- transition: K,
629
+ transition: F,
630
630
  style: a,
631
631
  ...i
632
632
  }) : /* @__PURE__ */ c("circle", {
@@ -636,8 +636,8 @@ var B = (e, t) => {
636
636
  style: a,
637
637
  ...i
638
638
  });
639
- }, Jt = ({ animateTransitions: e, x1: t, y1: r, x2: n, y2: s, effects: i, ...a }) => {
640
- const l = U(i);
639
+ }, Qt = ({ animateTransitions: e, x1: t, y1: r, x2: n, y2: s, effects: i, ...a }) => {
640
+ const l = z(i);
641
641
  return e ? /* @__PURE__ */ c(re.line, {
642
642
  initial: !1,
643
643
  animate: {
@@ -646,7 +646,7 @@ var B = (e, t) => {
646
646
  x2: n,
647
647
  y2: s
648
648
  },
649
- transition: K,
649
+ transition: F,
650
650
  style: l,
651
651
  ...a
652
652
  }) : /* @__PURE__ */ c("line", {
@@ -658,7 +658,7 @@ var B = (e, t) => {
658
658
  ...a
659
659
  });
660
660
  }, Zt = ({ animateTransitions: e, x: t, y: r, width: n, height: s, rx: i, ry: a, effects: l, ...d }) => {
661
- const g = U(l);
661
+ const g = z(l);
662
662
  return e ? /* @__PURE__ */ c(re.rect, {
663
663
  initial: !1,
664
664
  animate: {
@@ -671,7 +671,7 @@ var B = (e, t) => {
671
671
  ry: a
672
672
  } : {}
673
673
  },
674
- transition: K,
674
+ transition: F,
675
675
  style: g,
676
676
  ...d
677
677
  }) : /* @__PURE__ */ c("rect", {
@@ -685,7 +685,7 @@ var B = (e, t) => {
685
685
  ...d
686
686
  });
687
687
  }, er = ({ animateTransitions: e, d: t, source: r, effects: n, ...s }) => {
688
- const i = U(n);
688
+ const i = z(n);
689
689
  return e ? /* @__PURE__ */ c(tr, {
690
690
  d: t,
691
691
  source: r,
@@ -699,9 +699,9 @@ var B = (e, t) => {
699
699
  }, $n = (e) => {
700
700
  const { Circle: t } = ee(), { symbol: r, ...n } = e;
701
701
  return r !== void 0 && r !== "circle" ? /* @__PURE__ */ c("g", {
702
- style: U(e.effects),
702
+ style: z(e.effects),
703
703
  "data-testid": e["data-testid"],
704
- children: /* @__PURE__ */ c(Oe, {
704
+ children: /* @__PURE__ */ c(ke, {
705
705
  symbol: r,
706
706
  cx: ye(e.cx),
707
707
  cy: ye(e.cy),
@@ -713,26 +713,26 @@ var B = (e, t) => {
713
713
  strokeOpacity: e.strokeOpacity,
714
714
  strokeWidth: e.strokeWidth,
715
715
  motion: e.animateTransitions ? {
716
- transition: K,
716
+ transition: F,
717
717
  intro: !1,
718
718
  fadesIn: !1
719
719
  } : null
720
720
  })
721
- }) : t === void 0 ? Qt(n) : /* @__PURE__ */ c(F, { children: /* @__PURE__ */ c(t, { ...n }) });
721
+ }) : t === void 0 ? Jt(n) : /* @__PURE__ */ c(K, { children: /* @__PURE__ */ c(t, { ...n }) });
722
722
  }, Hn = (e) => {
723
723
  const { Line: t } = ee();
724
- return t === void 0 ? Jt(e) : /* @__PURE__ */ c(F, { children: /* @__PURE__ */ c(t, { ...e }) });
724
+ return t === void 0 ? Qt(e) : /* @__PURE__ */ c(K, { children: /* @__PURE__ */ c(t, { ...e }) });
725
725
  }, xn = ({ cornerRadius: e, ...t }) => {
726
- const { Rect: r } = ee(), n = Ie()?.size ?? null, s = Fe(), i = {
726
+ const { Rect: r } = ee(), n = Ge()?.size ?? null, s = Be(), i = {
727
727
  ...t,
728
728
  ...rr(e, t, n, s)
729
729
  };
730
- return r === void 0 ? Zt(i) : /* @__PURE__ */ c(F, { children: /* @__PURE__ */ c(r, { ...i }) });
730
+ return r === void 0 ? Zt(i) : /* @__PURE__ */ c(K, { children: /* @__PURE__ */ c(r, { ...i }) });
731
731
  }, Mn = (e) => {
732
732
  const { Path: t } = ee();
733
- return t === void 0 ? er(e) : /* @__PURE__ */ c(F, { children: /* @__PURE__ */ c(t, { ...e }) });
733
+ return t === void 0 ? er(e) : /* @__PURE__ */ c(K, { children: /* @__PURE__ */ c(t, { ...e }) });
734
734
  }, ye = (e) => typeof e == "number" ? `${e}px` : e, tr = ({ d: e, source: t, ...r }) => {
735
- const n = He(e, K, t);
735
+ const n = qe(e, F, t);
736
736
  return /* @__PURE__ */ c(re.path, {
737
737
  d: n,
738
738
  ...r
@@ -766,8 +766,8 @@ var B = (e, t) => {
766
766
  } : {
767
767
  rx: e / t.x,
768
768
  ry: e / t.y
769
- }, On = ({ symbol: e, size: t, fill: r, fillOpacity: n, stroke: s, strokeOpacity: i, strokeWidth: a }) => {
770
- const l = ze(), d = Ke(), g = De((G) => G.coordSystem.type), b = sr(e, d("point", g)?.symbols ?? [], l), C = {
769
+ }, An = ({ symbol: e, size: t, fill: r, fillOpacity: n, stroke: s, strokeOpacity: i, strokeWidth: a }) => {
770
+ const l = He(), d = Me(), g = We((G) => G.coordSystem.type), b = sr(e, d("point", g)?.symbols ?? [], l), P = {
771
771
  size: t,
772
772
  fill: r,
773
773
  fillOpacity: n,
@@ -776,20 +776,20 @@ var B = (e, t) => {
776
776
  strokeWidth: a
777
777
  };
778
778
  return ae(b) ? /* @__PURE__ */ c("path", {
779
- d: Je(b, t),
779
+ d: Qe(b, t),
780
780
  fill: r,
781
781
  fillOpacity: n,
782
782
  stroke: s,
783
783
  strokeOpacity: i,
784
784
  strokeWidth: a,
785
785
  strokeLinejoin: "round"
786
- }) : /* @__PURE__ */ c(ke, {
786
+ }) : /* @__PURE__ */ c($e, {
787
787
  symbol: b,
788
788
  glyphs: l,
789
- ...C
789
+ ...P
790
790
  });
791
- }, sr = (e, t, r) => ct(e) || t.includes(e) || !ae(e) && r.has(e) ? e : t[0] ?? "circle", An = ({ children: e, ...t }) => {
792
- const r = Ie()?.size ?? null;
791
+ }, sr = (e, t, r) => ct(e) || t.includes(e) || !ae(e) && r.has(e) ? e : t[0] ?? "circle", On = ({ children: e, ...t }) => {
792
+ const r = Ge()?.size ?? null;
793
793
  return /* @__PURE__ */ c("svg", {
794
794
  viewBox: "0 0 1 1",
795
795
  preserveAspectRatio: "none",
@@ -797,14 +797,14 @@ var B = (e, t) => {
797
797
  height: "100%",
798
798
  pointerEvents: "none",
799
799
  ...t,
800
- children: /* @__PURE__ */ c(Ge, {
800
+ children: /* @__PURE__ */ c(Ne, {
801
801
  size: r,
802
802
  space: "unit",
803
803
  children: e
804
804
  })
805
805
  });
806
806
  }, Bn = ({ box: e, children: t }) => {
807
- const r = $e(), n = r === null ? null : r.width * (e.x1 - e.x0), s = r === null ? null : r.height * (e.y1 - e.y0), i = H(() => n === null || s === null ? null : {
807
+ const r = _e(), n = r === null ? null : r.width * (e.x1 - e.x0), s = r === null ? null : r.height * (e.y1 - e.y0), i = H(() => n === null || s === null ? null : {
808
808
  width: n,
809
809
  height: s
810
810
  }, [n, s]);
@@ -815,12 +815,12 @@ var B = (e, t) => {
815
815
  height: X(e.y1 - e.y0),
816
816
  overflow: "hidden",
817
817
  pointerEvents: "none",
818
- children: /* @__PURE__ */ c(Ge, {
818
+ children: /* @__PURE__ */ c(Ne, {
819
819
  size: i,
820
820
  children: t
821
821
  })
822
822
  });
823
- }, or = "drqe3u0", ir = "drqe3u1", ar = "drqe3u2", cr = "drqe3u3", A = "drqe3u4", lr = "drqe3u5", dr = "drqe3u6", ur = "drqe3u7", Q = "drqe3u8", mr = "drqe3u9", hr = "drqe3ua";
823
+ }, or = "drqe3u0", ir = "drqe3u1", ar = "drqe3u2", cr = "drqe3u3", O = "drqe3u4", lr = "drqe3u5", dr = "drqe3u6", ur = "drqe3u7", J = "drqe3u8", mr = "drqe3u9", hr = "drqe3ua";
824
824
  var gr = "drqe3uc", fr = "drqe3ud", pr = "drqe3ue", vr = "drqe3uf";
825
825
  var yr = "drqe3uh", Sr = "drqe3ui", Te = {
826
826
  enabled: "drqe3uk drqe3uj",
@@ -828,17 +828,17 @@ var yr = "drqe3uh", Sr = "drqe3ui", Te = {
828
828
  }, Ee = {
829
829
  ran: "drqe3un drqe3um",
830
830
  dim: "drqe3uo drqe3um"
831
- }, Ce = {
831
+ }, Pe = {
832
832
  ran: "drqe3uq drqe3up",
833
833
  cached: "drqe3ur drqe3up",
834
834
  untouched: "drqe3us drqe3up"
835
835
  }, Fn = ({ width: e = 440, style: t, className: r } = {}) => {
836
- const { compileBus: n } = oe(), [s] = S(() => Lt()), [i, a] = S(!1), [l, d] = S(at);
836
+ const { compileBus: n } = oe(), [s] = S(() => Dt()), [i, a] = S(!1), [l, d] = S(at);
837
837
  _(() => {
838
838
  const { recordCompile: h } = s.getState(), T = n.getLastTrigger(), p = n.getLastCompile();
839
839
  return T && p && h(T, p), n.subscribe(h);
840
840
  }, [s, n]);
841
- const g = se(s, (h) => h.lastCompile), b = se(s, (h) => h.history), C = n.getCacheStats(), G = g === null && b.length === 0, m = () => {
841
+ const g = se(s, (h) => h.lastCompile), b = se(s, (h) => h.history), P = n.getCacheStats(), G = g === null && b.length === 0, m = () => {
842
842
  d((h) => {
843
843
  const T = !h;
844
844
  return dt(T), T;
@@ -882,7 +882,7 @@ var yr = "drqe3uh", Sr = "drqe3ui", Te = {
882
882
  !i && !G && /* @__PURE__ */ v(ft, { children: [/* @__PURE__ */ c(br, {
883
883
  delta: g?.stages,
884
884
  durations: g?.stageDurationsMs,
885
- cumulative: C
885
+ cumulative: P
886
886
  }), /* @__PURE__ */ c(Tr, { entries: b })] })
887
887
  ]
888
888
  });
@@ -896,23 +896,23 @@ var yr = "drqe3uh", Sr = "drqe3ui", Te = {
896
896
  children: "stage"
897
897
  }),
898
898
  /* @__PURE__ */ c("th", {
899
- className: A,
899
+ className: O,
900
900
  children: "time"
901
901
  }),
902
902
  /* @__PURE__ */ c("th", {
903
- className: A,
903
+ className: O,
904
904
  children: "Δ miss"
905
905
  }),
906
906
  /* @__PURE__ */ c("th", {
907
- className: A,
907
+ className: O,
908
908
  children: "Δ hit"
909
909
  }),
910
910
  /* @__PURE__ */ c("th", {
911
- className: A,
911
+ className: O,
912
912
  children: "total miss"
913
913
  }),
914
914
  /* @__PURE__ */ c("th", {
915
- className: A,
915
+ className: O,
916
916
  children: "total hit"
917
917
  })
918
918
  ]
@@ -925,7 +925,7 @@ var yr = "drqe3uh", Sr = "drqe3ui", Te = {
925
925
  className: lr,
926
926
  children: [
927
927
  /* @__PURE__ */ c("span", {
928
- className: Ce[i],
928
+ className: Pe[i],
929
929
  "aria-hidden": !0
930
930
  }),
931
931
  " ",
@@ -933,7 +933,7 @@ var yr = "drqe3uh", Sr = "drqe3ui", Te = {
933
933
  ]
934
934
  }),
935
935
  /* @__PURE__ */ c("td", {
936
- className: Q,
936
+ className: J,
937
937
  children: t === void 0 || i === "untouched" ? "—" : le(t[n])
938
938
  }),
939
939
  /* @__PURE__ */ c("td", {
@@ -941,15 +941,15 @@ var yr = "drqe3uh", Sr = "drqe3ui", Te = {
941
941
  children: s?.misses ?? 0
942
942
  }),
943
943
  /* @__PURE__ */ c("td", {
944
- className: Q,
944
+ className: J,
945
945
  children: s?.hits ?? 0
946
946
  }),
947
947
  /* @__PURE__ */ c("td", {
948
- className: Q,
948
+ className: J,
949
949
  children: r[n].misses
950
950
  }),
951
951
  /* @__PURE__ */ c("td", {
952
- className: Q,
952
+ className: J,
953
953
  children: r[n].hits
954
954
  })
955
955
  ]
@@ -966,7 +966,7 @@ var yr = "drqe3uh", Sr = "drqe3ui", Te = {
966
966
  className: dr,
967
967
  children: [
968
968
  /* @__PURE__ */ c("span", {
969
- className: Ce[r === 0 ? "cached" : "ran"],
969
+ className: Pe[r === 0 ? "cached" : "ran"],
970
970
  "aria-hidden": !0
971
971
  }),
972
972
  /* @__PURE__ */ c("span", {
@@ -1013,14 +1013,14 @@ var yr = "drqe3uh", Sr = "drqe3ui", Te = {
1013
1013
  "range",
1014
1014
  "reset",
1015
1015
  "submit"
1016
- ]), Un = (e, t = {}) => {
1016
+ ]), zn = (e, t = {}) => {
1017
1017
  const { target: r, enabled: n = !0 } = t;
1018
1018
  _(() => {
1019
- const s = Ir(r);
1019
+ const s = Nr(r);
1020
1020
  if (!n || !s) return;
1021
1021
  const i = (a) => {
1022
- if (!wr(a) || a.defaultPrevented || Nr(a.target)) return;
1023
- const l = Ye(a);
1022
+ if (!Ir(a) || a.defaultPrevented || wr(a.target)) return;
1023
+ const l = ze(a);
1024
1024
  if (!l) return;
1025
1025
  const d = e.current;
1026
1026
  d && (l === "undo" ? d.undo() : d.redo()) && a.preventDefault();
@@ -1031,83 +1031,83 @@ var yr = "drqe3uh", Sr = "drqe3ui", Te = {
1031
1031
  r,
1032
1032
  n
1033
1033
  ]);
1034
- }, Ir = (e) => e === void 0 ? window : e !== null && "current" in e ? e.current : e, wr = (e) => "key" in e, Nr = (e) => e instanceof HTMLInputElement ? !Rr.has(e.type) : e instanceof HTMLElement ? e.isContentEditable || e.tagName === "TEXTAREA" : !1, zn = () => {
1034
+ }, Nr = (e) => e === void 0 ? window : e !== null && "current" in e ? e.current : e, Ir = (e) => "key" in e, wr = (e) => e instanceof HTMLInputElement ? !Rr.has(e.type) : e instanceof HTMLElement ? e.isContentEditable || e.tagName === "TEXTAREA" : !1, Un = () => {
1035
1035
  const { targetBoundaryStore: e } = oe();
1036
1036
  return se(e, (t) => t.boundary);
1037
1037
  };
1038
1038
  export {
1039
- on as CanvasTextMeasurer,
1040
- Vr as DefaultFooter,
1041
- Qt as DefaultGeomCircle,
1042
- Jt as DefaultGeomLine,
1039
+ ln as CanvasTextMeasurer,
1040
+ Ur as DefaultFooter,
1041
+ Jt as DefaultGeomCircle,
1042
+ Qt as DefaultGeomLine,
1043
1043
  er as DefaultGeomPath,
1044
1044
  Zt as DefaultGeomRect,
1045
- hn as DefaultGrid,
1046
- Yr as DefaultHeader,
1047
- yn as DefaultSwatch,
1048
- tn as DefaultTooltip,
1045
+ an as DefaultGrid,
1046
+ Ar as DefaultHeader,
1047
+ cn as DefaultSwatch,
1048
+ En as DefaultTooltip,
1049
1049
  Fn as DevToolsPanel,
1050
- jr as GRAPH_MODES,
1050
+ Or as GRAPH_MODES,
1051
1051
  $n as GeomCircle,
1052
1052
  Hn as GeomLine,
1053
- qr as GeomOverpaint,
1054
- zr as GeomPanelSizeProvider,
1053
+ fn as GeomOverpaint,
1054
+ $r as GeomPanelSizeProvider,
1055
1055
  Mn as GeomPath,
1056
1056
  xn as GeomRect,
1057
1057
  Gt as GraphErrorBoundary,
1058
1058
  ge as GraphErrorPanel,
1059
1059
  Yt as GraphProvider,
1060
- rn as GraphRenderer,
1061
- Dr as GraphyBadge,
1062
- pn as HoverProvider,
1063
- un as IntlProvider,
1064
- dn as IntroFade,
1065
- Or as IntroWipeClip,
1066
- On as SymbolFigure,
1067
- bn as TextMeasurerProvider,
1068
- Wr as ThemeProvider,
1060
+ en as GraphRenderer,
1061
+ gn as GraphyBadge,
1062
+ Jr as HoverProvider,
1063
+ Yr as IntlProvider,
1064
+ mn as IntroFade,
1065
+ Mr as IntroWipeClip,
1066
+ An as SymbolFigure,
1067
+ rn as TextMeasurerProvider,
1068
+ Hr as ThemeProvider,
1069
1069
  Bn as UnitBoxSvg,
1070
- An as UnitSpaceSvg,
1071
- In as buildDotsEditOutlineShapes,
1070
+ On as UnitSpaceSvg,
1071
+ Xr as buildDotsEditOutlineShapes,
1072
1072
  _n as createGraphyKit,
1073
- Fr as darkTheme,
1074
- sn as defineGeomRenderer,
1075
- Xr as defineGlyph,
1076
- Sn as getBuiltInEditOutlineShapes,
1077
- mn as lightTheme,
1078
- en as lightenCss,
1073
+ qr as darkTheme,
1074
+ un as defineGeomRenderer,
1075
+ Wr as defineGlyph,
1076
+ vn as getBuiltInEditOutlineShapes,
1077
+ on as lightTheme,
1078
+ Tn as lightenCss,
1079
1079
  Rt as pruneSelection,
1080
1080
  B as readPositionPixels,
1081
1081
  kn as readRectPixels,
1082
- kr as resolveGraphyBadgeVariant,
1083
- xr as resolvePathStroke,
1084
- Cr as scalePointToPanel,
1085
- _r as stampAxisEditTarget,
1086
- Hr as stampGridEditTarget,
1087
- Ur as stampLegendEditTarget,
1088
- Mr as useElementScreenRect,
1089
- cn as useFormattingLocale,
1090
- $r as useGeomHitTest,
1091
- Lr as useGeomHover,
1092
- Br as useGeomPanelSize,
1093
- Jr as useGeomReaderTree,
1094
- Qr as useGeomStyleReader,
1095
- $e as useGeomViewportSize,
1096
- gn as useGraphCommands,
1097
- ln as useGraphHandle,
1082
+ Kr as resolveGraphyBadgeVariant,
1083
+ Rn as resolvePathStroke,
1084
+ Br as scalePointToPanel,
1085
+ Vr as stampAxisEditTarget,
1086
+ Gn as stampGridEditTarget,
1087
+ _r as stampLegendEditTarget,
1088
+ Nn as useElementScreenRect,
1089
+ Zr as useFormattingLocale,
1090
+ zr as useGeomHitTest,
1091
+ Fr as useGeomHover,
1092
+ Lr as useGeomPanelSize,
1093
+ Qr as useGeomReaderTree,
1094
+ jr as useGeomStyleReader,
1095
+ _e as useGeomViewportSize,
1096
+ dn as useGraphCommands,
1097
+ sn as useGraphHandle,
1098
1098
  Kn as useGraphHistory,
1099
- Un as useGraphHistoryShortcuts,
1100
- an as useGraphLocale,
1101
- Gn as useGraphSelection,
1102
- Ar as useGuidesTakePress,
1103
- vn as useHandleScene,
1104
- Rn as useHoverState,
1105
- Tn as usePaintDefs,
1106
- fn as useResolvedStyle,
1107
- De as useSceneSelector,
1108
- Zr as useStyleReaderTree,
1109
- Kr as useStyleResolver,
1110
- zn as useTargetBoundary,
1111
- nn as useTextMeasurer,
1112
- En as vars
1099
+ zn as useGraphHistoryShortcuts,
1100
+ yn as useGraphLocale,
1101
+ bn as useGraphSelection,
1102
+ Dr as useGuidesTakePress,
1103
+ pn as useHandleScene,
1104
+ Sn as useHoverState,
1105
+ xr as usePaintDefs,
1106
+ nn as useResolvedStyle,
1107
+ We as useSceneSelector,
1108
+ Pr as useStyleReaderTree,
1109
+ tn as useStyleResolver,
1110
+ Un as useTargetBoundary,
1111
+ hn as useTextMeasurer,
1112
+ kr as vars
1113
1113
  };