@graphysdk/react-renderer 1.9.0-beta.1789123116058 → 1.9.0-beta.1789367356750

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,14 +1,14 @@
1
- import { Ct as Dt, Ft as $t, It as le, Lt as ne, M as xt, Nt as Ht, O as Mt, Pt as Lt, Rt as A, St as ue, Tt as Pt, X as Bt, Y as Kt, _ as Ot, _t as me, a as At, bt as he, ct as jt, gt as K, i as Ft, it as Ut, j as Yt, jt as Wt, k as Vt, lt as Xt, mt as Qt, n as zt, pt as Jt, r as Zt, rt as er, s as tr, t as ge, tt as rr, vt as nr, wt as sr, xt as or, yt as j } from "./history-chords-C0iZZ2MJ.js";
2
- import { n as ar } from "./theme.contract.css-pudzI2o1.js";
3
- import { COMPILER_STAGE_KEYS as F, Geom as pe, GraphCompilationSession as fe, areEditTargetsEqual as ve, buildDiagnostic as V, createAnchorResolver as ye, createCompiler as be, createGraphyBuilder as Se, createStyleResolver as Ee, findAnnotation as Ce, findLayerById as X, isCompilerCachingEnabled as Te, resolveDefinition as Ne, setCompilerCachingEnabled as Re, toPercent as L } from "@graphysdk/viz-engine";
4
- import { Component as qe, useCallback as f, useEffect as x, useId as Ie, useImperativeHandle as ke, useMemo as $, useRef as Q, useState as C, useSyncExternalStore as Ge } from "react";
1
+ import { A as Dt, Bt as ne, Ct as le, Dt as $t, Et as xt, It as Ht, Lt as Mt, M as Pt, N as Lt, Ot as Bt, Pt as Ot, Rt as Kt, St as U, Tt as ue, Vt as A, X as At, Z as Ut, _ as jt, _t as Ft, a as Yt, at as Vt, bt as me, dt as Wt, ft as Xt, gt as zt, i as Qt, it as Zt, k as Jt, lt as er, n as tr, nt as rr, r as nr, s as sr, t as he, wt as or, xt as ir, yt as O, zt as ge } from "./history-chords-y2ex4E08.js";
2
+ import { n as cr } from "./theme.contract.css-pudzI2o1.js";
3
+ import { COMPILER_STAGE_KEYS as j, Geom as pe, GraphCompilationSession as fe, areEditTargetsEqual as ve, buildDiagnostic as W, createAnchorResolver as ye, createCompiler as be, createGraphyBuilder as Se, createStyleResolver as Ee, findAnnotation as Ce, findLayerById as X, isCompilerCachingEnabled as Te, resolveDefinition as Ne, setCompilerCachingEnabled as Re, toPercent as P } from "@graphysdk/viz-engine";
4
+ import { Component as qe, useCallback as f, useEffect as x, useId as Ie, useImperativeHandle as Ge, useMemo as $, useRef as z, useState as C, useSyncExternalStore as ke } from "react";
5
5
  import { Fragment as we, jsx as d, jsxs as v } from "react/jsx-runtime";
6
- import { useStore as z } from "zustand";
7
- import { createStore as U } from "zustand/vanilla";
6
+ import { useStore as Q } from "zustand";
7
+ import { createStore as F } from "zustand/vanilla";
8
8
  import _e from "clsx";
9
9
  import './index.css';var De = "_1a5iqpb0", $e = "_1a5iqpb1";
10
10
  var xe = "_1a5iqpb3", He = "_1a5iqpb4", Me = "_1a5iqpb5";
11
- var J = ({ errors: e }) => {
11
+ var Z = ({ errors: e }) => {
12
12
  const [t, ...r] = e;
13
13
  return /* @__PURE__ */ v("div", {
14
14
  role: "alert",
@@ -18,14 +18,14 @@ var J = ({ errors: e }) => {
18
18
  className: $e,
19
19
  children: "This chart could not be rendered."
20
20
  }),
21
- t && /* @__PURE__ */ d(Z, { diagnostic: t }),
21
+ t && /* @__PURE__ */ d(J, { diagnostic: t }),
22
22
  r.length > 0 && /* @__PURE__ */ d("ul", {
23
23
  className: "_1a5iqpb2",
24
- children: r.map((n, o) => /* @__PURE__ */ d("li", { children: /* @__PURE__ */ d(Z, { diagnostic: n }) }, `${n.code}-${o}`))
24
+ children: r.map((n, o) => /* @__PURE__ */ d("li", { children: /* @__PURE__ */ d(J, { diagnostic: n }) }, `${n.code}-${o}`))
25
25
  })
26
26
  ]
27
27
  });
28
- }, Z = ({ diagnostic: e }) => /* @__PURE__ */ v("div", {
28
+ }, J = ({ diagnostic: e }) => /* @__PURE__ */ v("div", {
29
29
  className: xe,
30
30
  children: [
31
31
  /* @__PURE__ */ d("span", {
@@ -42,47 +42,47 @@ var J = ({ errors: e }) => {
42
42
  })
43
43
  ]
44
44
  });
45
- function Le(e = [], t = []) {
45
+ function Pe(e = [], t = []) {
46
46
  return e.length === t.length && e.every((r, n) => Object.is(r, t[n]));
47
47
  }
48
- var Pe = class extends qe {
48
+ var Le = class extends qe {
49
49
  constructor(...e) {
50
50
  super(...e), this.state = { caughtDiagnostic: null };
51
51
  }
52
52
  static getDerivedStateFromError(e) {
53
- return { caughtDiagnostic: V(e) };
53
+ return { caughtDiagnostic: W(e) };
54
54
  }
55
55
  componentDidCatch(e, t) {
56
- const r = V(e);
56
+ const r = W(e);
57
57
  A([r]), this.props.onError?.([r]), console.error("Chart render component stack:", t.componentStack);
58
58
  }
59
59
  componentDidUpdate(e) {
60
- this.state.caughtDiagnostic && !Le(e.resetKeys, this.props.resetKeys) && this.setState({ caughtDiagnostic: null });
60
+ this.state.caughtDiagnostic && !Pe(e.resetKeys, this.props.resetKeys) && this.setState({ caughtDiagnostic: null });
61
61
  }
62
62
  render() {
63
63
  const { caughtDiagnostic: e } = this.state;
64
- if (e) return /* @__PURE__ */ d(J, { errors: [e] });
64
+ if (e) return /* @__PURE__ */ d(Z, { errors: [e] });
65
65
  const { forcedErrors: t, children: r } = this.props;
66
- return t && t.length > 0 ? /* @__PURE__ */ d(J, { errors: t }) : r;
66
+ return t && t.length > 0 ? /* @__PURE__ */ d(Z, { errors: t }) : r;
67
67
  }
68
68
  }, se = (e) => typeof e == "object" && "geom" in e && "render" in e, Be = (e) => {
69
69
  const t = Ne(e);
70
70
  return t instanceof pe ? t : null;
71
- }, Ke = (e, t) => {
72
- const r = e.filter((n) => Oe(n, t));
71
+ }, Oe = (e, t) => {
72
+ const r = e.filter((n) => Ke(n, t));
73
73
  return r.length === e.length ? e : r;
74
- }, Oe = (e, t) => e.kind === "annotation" ? Ce(t.annotations, e.id) !== null : e.kind === "observations" ? X(t.layers, e.layerId) !== void 0 : e.kind === "layer" && e.layerId !== void 0 ? X(t.layers, e.layerId) !== void 0 : !0, ee = [], Ae = () => U((e) => ({
74
+ }, Ke = (e, t) => e.kind === "annotation" ? Ce(t.annotations, e.id) !== null : e.kind === "observations" ? X(t.layers, e.layerId) !== void 0 : e.kind === "layer" && e.layerId !== void 0 ? X(t.layers, e.layerId) !== void 0 : !0, ee = [], Ae = () => F((e) => ({
75
75
  selection: ee,
76
- setSelection: (t) => e((r) => je(r.selection, t) ? r : { selection: t }),
76
+ setSelection: (t) => e((r) => Ue(r.selection, t) ? r : { selection: t }),
77
77
  clearSelection: () => e((t) => t.selection.length === 0 ? t : { selection: ee })
78
- })), je = (e, t) => e === t ? !0 : e.length !== t.length ? !1 : e.every((r, n) => {
78
+ })), Ue = (e, t) => e === t ? !0 : e.length !== t.length ? !1 : e.every((r, n) => {
79
79
  const o = t[n];
80
80
  return o !== void 0 && ve(r, o);
81
- }), Fe = process.env.NODE_ENV !== "production", Ue = 5, Ye = (e) => {
82
- if (!Fe) return {
81
+ }), je = process.env.NODE_ENV !== "production", Fe = 5, Ye = (e) => {
82
+ if (!je) return {
83
83
  emit: () => {
84
84
  },
85
- subscribe: () => Ve,
85
+ subscribe: () => We,
86
86
  getLastTrigger: () => null,
87
87
  getLastCompile: () => null,
88
88
  getCacheStats: () => e.getCacheStats()
@@ -104,7 +104,7 @@ var Pe = class extends qe {
104
104
  getLastCompile: () => e.getLastCompile(),
105
105
  getCacheStats: () => e.getCacheStats()
106
106
  };
107
- }, We = () => U((e) => ({
107
+ }, Ve = () => F((e) => ({
108
108
  lastCompile: null,
109
109
  history: [],
110
110
  nextId: 1,
@@ -119,12 +119,12 @@ var Pe = class extends qe {
119
119
  };
120
120
  return {
121
121
  lastCompile: o,
122
- history: Qe(n.history, o, Ue),
122
+ history: ze(n.history, o, Fe),
123
123
  nextId: n.nextId + 1,
124
124
  lastSnapshot: r
125
125
  };
126
126
  })
127
- })), Ve = () => {
127
+ })), We = () => {
128
128
  }, Xe = (e) => {
129
129
  switch (e.kind) {
130
130
  case "init":
@@ -136,12 +136,12 @@ var Pe = class extends qe {
136
136
  case "command":
137
137
  return e.command.metadata.description;
138
138
  }
139
- }, Qe = (e, t, r) => {
139
+ }, ze = (e, t, r) => {
140
140
  const n = e.length >= r ? e.length - (r - 1) : 0;
141
141
  return [...e.slice(n), t];
142
142
  };
143
- function ze(e) {
144
- const t = e.filter(se), r = /* @__PURE__ */ new Set([...Object.keys(he), ...t.map((c) => c.geom)]), n = [], o = /* @__PURE__ */ new Set();
143
+ function Qe(e) {
144
+ const t = e.filter(se), r = /* @__PURE__ */ new Set([...Object.keys(le), ...t.map((c) => c.geom)]), n = [], o = /* @__PURE__ */ new Set();
145
145
  for (const c of e) {
146
146
  const u = Be(c);
147
147
  u === null || r.has(u.type) || o.has(u.type) || (o.add(u.type), n.push({
@@ -184,7 +184,7 @@ function ze(e) {
184
184
  warnings: i
185
185
  };
186
186
  }
187
- function Je(e, t) {
187
+ function Ze(e, t) {
188
188
  const { coordSystem: r, layers: n } = e, o = /* @__PURE__ */ new Set(), a = [];
189
189
  for (const i of n)
190
190
  t(i.geom, r.type) !== null || o.has(i.geom) || (o.add(i.geom), a.push({
@@ -200,12 +200,12 @@ function Je(e, t) {
200
200
  }));
201
201
  return a;
202
202
  }
203
- function Ze(e, t) {
203
+ function Je(e, t) {
204
204
  const { coordSystem: r, layers: n } = e, o = /* @__PURE__ */ new Set(), a = [];
205
205
  for (const i of n) {
206
206
  if (i.interactive === !1 || i.spatialKind !== "render-hit-test" || o.has(i.geom)) continue;
207
207
  const c = t(i.geom, r.type);
208
- c === null || c.hitTest || j(c) || (o.add(i.geom), a.push({
208
+ c === null || c.hitTest || U(c) || (o.add(i.geom), a.push({
209
209
  kind: "user-input",
210
210
  severity: "warning",
211
211
  code: "MISSING_RENDER_HIT_TEST",
@@ -242,7 +242,7 @@ function tt(e, t) {
242
242
  for (const i of n) {
243
243
  if (i.interactive === !1 || i.spatialKind !== "render-hit-test" || o.has(i.geom)) continue;
244
244
  const c = t(i.geom, r.type);
245
- c === null || !c.hitTest || !j(c) || (o.add(i.geom), a.push({
245
+ c === null || !c.hitTest || !U(c) || (o.add(i.geom), a.push({
246
246
  kind: "user-input",
247
247
  severity: "warning",
248
248
  code: "CONFLICTING_RENDER_HIT_TEST",
@@ -277,7 +277,7 @@ function nt(e, t) {
277
277
  for (const i of n) {
278
278
  if (i.interactive === !1 || i.spatialKind === "render-hit-test" || o.has(i.geom)) continue;
279
279
  const c = t(i.geom, r.type);
280
- c === null || !j(c) || (o.add(i.geom), a.push({
280
+ c === null || !U(c) || (o.add(i.geom), a.push({
281
281
  kind: "user-input",
282
282
  severity: "warning",
283
283
  code: "OVERLAY_REQUIRES_RENDER_HIT_TEST",
@@ -291,25 +291,25 @@ function nt(e, t) {
291
291
  }
292
292
  return a;
293
293
  }
294
- var st = (e) => U((t) => ({
294
+ var st = (e) => F((t) => ({
295
295
  compiled: e,
296
296
  setCompiled: (r) => t((n) => n.compiled === r ? n : { compiled: r })
297
297
  })), ot = ({ input: e, data: t, customPalettes: r, colorScheme: n, plugins: o, resolveRenderer: a, anchorResolver: i, onChange: c, onError: u, onWarnings: m }) => {
298
- const T = K(c), k = K(u), q = K(m), [{ session: h, compileBus: l }] = C(() => {
298
+ const T = O(c), G = O(u), q = O(m), [{ session: h, compileBus: l }] = C(() => {
299
299
  const s = be({ plugins: o });
300
300
  return {
301
301
  session: new fe(s),
302
302
  compileBus: Ye(s)
303
303
  };
304
- }), [p] = C(() => ze(o ?? [])), y = Q(null), [G] = C(it), N = Q(null), b = f((s) => p.errors.length === 0 ? s : [...p.errors, ...s ?? []], [p]), _ = f((s) => {
304
+ }), [p] = C(() => Qe(o ?? [])), y = z(null), [k] = C(it), N = z(null), b = f((s) => p.errors.length === 0 ? s : [...p.errors, ...s ?? []], [p]), _ = f((s) => {
305
305
  if (!s.ok) return s.errors;
306
306
  if (N.current) N.current.getState().setCompiled(s.compiled);
307
307
  else {
308
308
  const g = st(s.compiled);
309
- g.subscribe(G.notify), N.current = g, G.notify();
309
+ g.subscribe(k.notify), N.current = g, k.notify();
310
310
  }
311
311
  return null;
312
- }, [G]), [H, D] = C(() => {
312
+ }, [k]), [H, D] = C(() => {
313
313
  const s = h.compile({
314
314
  input: e,
315
315
  data: t,
@@ -319,15 +319,15 @@ var st = (e) => U((t) => ({
319
319
  return y.current = s, b(_(s));
320
320
  }), I = f((s) => s.ok ? [
321
321
  ...s.warnings,
322
- ...Je(s.compiled, a),
323
322
  ...Ze(s.compiled, a),
323
+ ...Je(s.compiled, a),
324
324
  ...et(s.compiled),
325
325
  ...tt(s.compiled, a),
326
326
  ...nt(s.compiled, a),
327
327
  ...rt(s.compiled, i)
328
328
  ] : s.warnings, [a, i]), S = f((s) => {
329
- s.length !== 0 && (A(s), k.current?.(s));
330
- }, [k]), R = f((s) => {
329
+ s.length !== 0 && (A(s), G.current?.(s));
330
+ }, [G]), R = f((s) => {
331
331
  s.length !== 0 && (A(s), q.current?.(s));
332
332
  }, [q]);
333
333
  x(() => {
@@ -387,21 +387,21 @@ var st = (e) => U((t) => ({
387
387
  E(h.applyCommand(s, g));
388
388
  }, [h, E]), ae = f(() => {
389
389
  E(h.seal());
390
- }, [h, E]), Y = f(() => E(h.undo()), [h, E]), W = f(() => E(h.redo()), [h, E]), ce = $(() => ({
390
+ }, [h, E]), Y = f(() => E(h.undo()), [h, E]), V = f(() => E(h.redo()), [h, E]), ce = $(() => ({
391
391
  stack: h.history,
392
392
  undo: Y,
393
- redo: W
393
+ redo: V
394
394
  }), [
395
395
  h,
396
396
  Y,
397
- W
397
+ V
398
398
  ]), de = f(() => N.current?.getState().compiled ?? null, []);
399
399
  return {
400
400
  store: N.current,
401
401
  dispatch: B,
402
402
  seal: ae,
403
403
  history: ce,
404
- subscribe: G.subscribe,
404
+ subscribe: k.subscribe,
405
405
  getCompiled: de,
406
406
  compileBus: l,
407
407
  compileErrors: H
@@ -415,13 +415,13 @@ var st = (e) => U((t) => ({
415
415
  notify: () => e.forEach((t) => t())
416
416
  };
417
417
  }, at = ({ data: e, input: t, plugins: r = [], formattingLocale: n, handleRef: o, onChange: a, onError: i, onWarnings: c, customPalettes: u, colorScheme: m = "light", children: T }) => {
418
- const [k] = C(() => me(r.filter(se))), q = Ie(), [h] = C(() => ye(r)), [l] = C(() => Ae()), p = $(() => Ee({ colorScheme: m }), [m]), { store: y, dispatch: G, seal: N, history: b, subscribe: _, getCompiled: H, compileBus: D, compileErrors: I } = ot({
418
+ const [G] = C(() => me(r.filter(se))), q = Ie(), [h] = C(() => ye(r)), [l] = C(() => Ae()), p = $(() => Ee({ colorScheme: m }), [m]), { store: y, dispatch: k, seal: N, history: b, subscribe: _, getCompiled: H, compileBus: D, compileErrors: I } = ot({
419
419
  input: t,
420
420
  data: e,
421
421
  customPalettes: u,
422
422
  colorScheme: m,
423
423
  plugins: r,
424
- resolveRenderer: k,
424
+ resolveRenderer: G,
425
425
  anchorResolver: h,
426
426
  onChange: a,
427
427
  onError: i,
@@ -432,14 +432,14 @@ var st = (e) => U((t) => ({
432
432
  return y.subscribe((w, M) => {
433
433
  if (w.compiled.spec === M.compiled.spec) return;
434
434
  const { selection: E, setSelection: B } = l.getState();
435
- E.length !== 0 && B(Ke(E, w.compiled.spec));
435
+ E.length !== 0 && B(Oe(E, w.compiled.spec));
436
436
  });
437
437
  }, [y, l]);
438
438
  const S = $(() => ({
439
- dispatch: G,
439
+ dispatch: k,
440
440
  seal: N
441
- }), [G, N]);
442
- ke(o, () => ({
441
+ }), [k, N]);
442
+ Ge(o, () => ({
443
443
  commands: S,
444
444
  undo: b.undo,
445
445
  redo: b.redo,
@@ -478,20 +478,20 @@ var st = (e) => U((t) => ({
478
478
  p,
479
479
  h
480
480
  ]);
481
- return /* @__PURE__ */ d(Pe, {
481
+ return /* @__PURE__ */ d(Le, {
482
482
  forcedErrors: I,
483
483
  onError: i,
484
484
  resetKeys: [t, e],
485
- children: R ? /* @__PURE__ */ d(le.Provider, {
485
+ children: R ? /* @__PURE__ */ d(ge.Provider, {
486
486
  value: R,
487
487
  children: /* @__PURE__ */ d(ue, {
488
- value: k,
488
+ value: G,
489
489
  children: T
490
490
  })
491
491
  }) : null
492
492
  });
493
493
  };
494
- function gr(e) {
494
+ function pr(e) {
495
495
  const t = Se(e);
496
496
  return {
497
497
  ...t,
@@ -501,7 +501,7 @@ function gr(e) {
501
501
  })
502
502
  };
503
503
  }
504
- var pr = ({ children: e, ...t }) => /* @__PURE__ */ d("svg", {
504
+ var fr = ({ children: e, ...t }) => /* @__PURE__ */ d("svg", {
505
505
  viewBox: "0 0 1 1",
506
506
  preserveAspectRatio: "none",
507
507
  width: "100%",
@@ -509,15 +509,15 @@ var pr = ({ children: e, ...t }) => /* @__PURE__ */ d("svg", {
509
509
  pointerEvents: "none",
510
510
  ...t,
511
511
  children: e
512
- }), fr = ({ box: e, children: t }) => /* @__PURE__ */ d("svg", {
513
- x: L(e.x0),
514
- y: L(e.y0),
515
- width: L(e.x1 - e.x0),
516
- height: L(e.y1 - e.y0),
512
+ }), vr = ({ box: e, children: t }) => /* @__PURE__ */ d("svg", {
513
+ x: P(e.x0),
514
+ y: P(e.y0),
515
+ width: P(e.x1 - e.x0),
516
+ height: P(e.y1 - e.y0),
517
517
  overflow: "hidden",
518
518
  pointerEvents: "none",
519
519
  children: t
520
- }), ct = "drqe3u0", dt = "drqe3u1", lt = "drqe3u2", ut = "drqe3u3", P = "drqe3u4", mt = "drqe3u5", ht = "drqe3u6", gt = "drqe3u7", O = "drqe3u8", pt = "drqe3u9", ft = "drqe3ua";
520
+ }), ct = "drqe3u0", dt = "drqe3u1", lt = "drqe3u2", ut = "drqe3u3", L = "drqe3u4", mt = "drqe3u5", ht = "drqe3u6", gt = "drqe3u7", K = "drqe3u8", pt = "drqe3u9", ft = "drqe3ua";
521
521
  var vt = "drqe3uc", yt = "drqe3ud", bt = "drqe3ue", St = "drqe3uf";
522
522
  var Et = "drqe3uh", Ct = "drqe3ui", te = {
523
523
  enabled: "drqe3uk drqe3uj",
@@ -529,13 +529,13 @@ var Et = "drqe3uh", Ct = "drqe3ui", te = {
529
529
  ran: "drqe3uq drqe3up",
530
530
  cached: "drqe3ur drqe3up",
531
531
  untouched: "drqe3us drqe3up"
532
- }, vr = ({ width: e = 380, style: t, className: r } = {}) => {
533
- const { compileBus: n } = ne(), [o] = C(() => We()), [a, i] = C(!1), [c, u] = C(Te);
532
+ }, yr = ({ width: e = 380, style: t, className: r } = {}) => {
533
+ const { compileBus: n } = ne(), [o] = C(() => Ve()), [a, i] = C(!1), [c, u] = C(Te);
534
534
  x(() => {
535
535
  const { recordCompile: l } = o.getState(), p = n.getLastTrigger(), y = n.getLastCompile();
536
536
  return p && y && l(p, y), n.subscribe(l);
537
537
  }, [o, n]);
538
- const m = z(o, (l) => l.lastCompile), T = z(o, (l) => l.history), k = n.getCacheStats(), q = m === null && T.length === 0, h = () => {
538
+ const m = Q(o, (l) => l.lastCompile), T = Q(o, (l) => l.history), G = n.getCacheStats(), q = m === null && T.length === 0, h = () => {
539
539
  u((l) => {
540
540
  const p = !l;
541
541
  return Re(p), p;
@@ -578,7 +578,7 @@ var Et = "drqe3uh", Ct = "drqe3ui", te = {
578
578
  }),
579
579
  !a && !q && /* @__PURE__ */ v(we, { children: [/* @__PURE__ */ d(Tt, {
580
580
  delta: m?.stages,
581
- cumulative: k
581
+ cumulative: G
582
582
  }), /* @__PURE__ */ d(Nt, { entries: T })] })
583
583
  ]
584
584
  });
@@ -592,23 +592,23 @@ var Et = "drqe3uh", Ct = "drqe3ui", te = {
592
592
  children: "stage"
593
593
  }),
594
594
  /* @__PURE__ */ d("th", {
595
- className: P,
595
+ className: L,
596
596
  children: "Δ miss"
597
597
  }),
598
598
  /* @__PURE__ */ d("th", {
599
- className: P,
599
+ className: L,
600
600
  children: "Δ hit"
601
601
  }),
602
602
  /* @__PURE__ */ d("th", {
603
- className: P,
603
+ className: L,
604
604
  children: "total miss"
605
605
  }),
606
606
  /* @__PURE__ */ d("th", {
607
- className: P,
607
+ className: L,
608
608
  children: "total hit"
609
609
  })
610
610
  ]
611
- }) }), /* @__PURE__ */ d("tbody", { children: F.map((r) => {
611
+ }) }), /* @__PURE__ */ d("tbody", { children: j.map((r) => {
612
612
  const n = e?.[r], o = Rt(n);
613
613
  return /* @__PURE__ */ v("tr", {
614
614
  className: vt,
@@ -629,15 +629,15 @@ var Et = "drqe3uh", Ct = "drqe3ui", te = {
629
629
  children: n?.misses ?? 0
630
630
  }),
631
631
  /* @__PURE__ */ d("td", {
632
- className: O,
632
+ className: K,
633
633
  children: n?.hits ?? 0
634
634
  }),
635
635
  /* @__PURE__ */ d("td", {
636
- className: O,
636
+ className: K,
637
637
  children: t[r].misses
638
638
  }),
639
639
  /* @__PURE__ */ d("td", {
640
- className: O,
640
+ className: K,
641
641
  children: t[r].hits
642
642
  })
643
643
  ]
@@ -649,7 +649,7 @@ var Et = "drqe3uh", Ct = "drqe3ui", te = {
649
649
  className: Ct,
650
650
  children: "recent compiles"
651
651
  }), e.map((t) => {
652
- const r = qt(t.stages, (a) => a.misses > 0), n = F.length;
652
+ const r = qt(t.stages, (a) => a.misses > 0), n = j.length;
653
653
  return /* @__PURE__ */ v("div", {
654
654
  className: ht,
655
655
  children: [
@@ -677,10 +677,10 @@ var Et = "drqe3uh", Ct = "drqe3ui", te = {
677
677
  })]
678
678
  }), Rt = (e) => !e || e.hits === 0 && e.misses === 0 ? "untouched" : e.misses > 0 ? "ran" : "cached", qt = (e, t) => {
679
679
  let r = 0;
680
- for (const n of F) t(e[n]) && (r += 1);
680
+ for (const n of j) t(e[n]) && (r += 1);
681
681
  return r;
682
- }, ie = (e) => e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`, yr = () => {
683
- const { history: e } = ne(), { stack: t, undo: r, redo: n } = e, o = f((c) => t.subscribe(c), [t]), a = f(() => t.getSnapshot(), [t]), i = Ge(o, a, a);
682
+ }, ie = (e) => e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`, br = () => {
683
+ const { history: e } = ne(), { stack: t, undo: r, redo: n } = e, o = f((c) => t.subscribe(c), [t]), a = f(() => t.getSnapshot(), [t]), i = ke(o, a, a);
684
684
  return $(() => ({
685
685
  ...i,
686
686
  undo: r,
@@ -701,14 +701,14 @@ var Et = "drqe3uh", Ct = "drqe3ui", te = {
701
701
  "range",
702
702
  "reset",
703
703
  "submit"
704
- ]), br = (e, t = {}) => {
704
+ ]), Sr = (e, t = {}) => {
705
705
  const { target: r, enabled: n = !0 } = t;
706
706
  x(() => {
707
- const o = kt(r);
707
+ const o = Gt(r);
708
708
  if (!n || !o) return;
709
709
  const a = (i) => {
710
- if (!Gt(i) || i.defaultPrevented || wt(i.target)) return;
711
- const c = ge(i);
710
+ if (!kt(i) || i.defaultPrevented || wt(i.target)) return;
711
+ const c = he(i);
712
712
  if (!c) return;
713
713
  const u = e.current;
714
714
  u && (c === "undo" ? u.undo() : u.redo()) && i.preventDefault();
@@ -719,45 +719,46 @@ var Et = "drqe3uh", Ct = "drqe3ui", te = {
719
719
  r,
720
720
  n
721
721
  ]);
722
- }, kt = (e) => e === void 0 ? window : e !== null && "current" in e ? e.current : e, Gt = (e) => "key" in e, wt = (e) => e instanceof HTMLInputElement ? !It.has(e.type) : e instanceof HTMLElement ? e.isContentEditable || e.tagName === "TEXTAREA" : !1;
722
+ }, Gt = (e) => e === void 0 ? window : e !== null && "current" in e ? e.current : e, kt = (e) => "key" in e, wt = (e) => e instanceof HTMLInputElement ? !It.has(e.type) : e instanceof HTMLElement ? e.isContentEditable || e.tagName === "TEXTAREA" : !1;
723
723
  export {
724
- Yt as BrandMark,
725
- Pt as CanvasTextMeasurer,
726
- Vt as DefaultFooter,
727
- tr as DefaultGrid,
728
- Mt as DefaultHeader,
724
+ Pt as BrandMark,
725
+ Bt as CanvasTextMeasurer,
726
+ Dt as DefaultFooter,
727
+ sr as DefaultGrid,
728
+ Jt as DefaultHeader,
729
729
  or as DefaultSwatch,
730
- Kt as DefaultTooltip,
731
- vr as DevToolsPanel,
732
- Pe as GraphErrorBoundary,
733
- J as GraphErrorPanel,
730
+ At as DefaultTooltip,
731
+ yr as DevToolsPanel,
732
+ er as GRAPH_MODES,
733
+ Le as GraphErrorBoundary,
734
+ Z as GraphErrorPanel,
734
735
  at as GraphProvider,
735
- At as GraphRenderer,
736
- Qt as HoverProvider,
737
- Dt as TextMeasurerProvider,
736
+ Yt as GraphRenderer,
737
+ Ft as HoverProvider,
738
+ xt as TextMeasurerProvider,
738
739
  rr as ThemeProvider,
739
- fr as UnitBoxSvg,
740
- pr as UnitSpaceSvg,
741
- gr as createGraphyKit,
742
- er as darkTheme,
743
- nr as defineGeomRenderer,
744
- Ut as lightTheme,
745
- Wt as lightenCss,
746
- Ke as pruneSelection,
747
- xt as resolveBrandMarkVisual,
748
- $t as useCompiledSelector,
740
+ vr as UnitBoxSvg,
741
+ fr as UnitSpaceSvg,
742
+ pr as createGraphyKit,
743
+ Zt as darkTheme,
744
+ ir as defineGeomRenderer,
745
+ Vt as lightTheme,
746
+ Ot as lightenCss,
747
+ Oe as pruneSelection,
748
+ Lt as resolveBrandMarkVisual,
749
+ Kt as useCompiledSelector,
749
750
  Xt as useElementScreenRect,
750
- Jt as useGeomHitTest,
751
- jt as useGeomHover,
752
- zt as useGraphCommands,
753
- Ft as useGraphHandle,
754
- yr as useGraphHistory,
755
- br as useGraphHistoryShortcuts,
756
- Ot as useGraphSelection,
757
- Zt as useHandleCompiled,
758
- Bt as useHoverState,
751
+ zt as useGeomHitTest,
752
+ Wt as useGeomHover,
753
+ tr as useGraphCommands,
754
+ Qt as useGraphHandle,
755
+ br as useGraphHistory,
756
+ Sr as useGraphHistoryShortcuts,
757
+ jt as useGraphSelection,
758
+ nr as useHandleCompiled,
759
+ Ut as useHoverState,
759
760
  Ht as useStyleReaders,
760
- Lt as useStyleResolver,
761
- sr as useTextMeasurer,
762
- ar as vars
761
+ Mt as useStyleResolver,
762
+ $t as useTextMeasurer,
763
+ cr as vars
763
764
  };
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "visualization",
12
12
  "renderer"
13
13
  ],
14
- "version": "1.9.0-beta.1789123116058",
14
+ "version": "1.9.0-beta.1789367356750",
15
15
  "type": "module",
16
16
  "sideEffects": [
17
17
  "**/*.css.ts",
@@ -55,7 +55,7 @@
55
55
  "react-colorful": "^5.6.1",
56
56
  "react-intl": "^8.1.3",
57
57
  "zustand": "^5.0.12",
58
- "@graphysdk/viz-engine": "1.9.0-beta.1789123116058"
58
+ "@graphysdk/viz-engine": "1.9.0-beta.1789367356750"
59
59
  },
60
60
  "peerDependencies": {
61
61
  "@tiptap/core": "^3.0.0",