@graphysdk/react-renderer 1.9.0-beta.1789558511894 → 1.9.0-beta.1789573335651

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 { A as Dt, At as $t, Bt as Ht, Ct as le, Dt as ue, Et as xt, Ht as he, It as Mt, M as Pt, N as Lt, Ot as Bt, Rt as Ot, St as U, Ut as ne, Vt as At, Wt as K, X as Kt, Z as Ut, _ as jt, _t as Ft, a as Yt, at as Wt, bt as ge, dt as Vt, ft as Xt, gt as zt, i as Qt, it as Zt, k as Jt, kt as er, lt as tr, n as rr, nt as nr, r as sr, s as or, t as me, xt as ir, yt as O, zt as ar } from "./history-chords-D--YHD4z.js";
2
- import { n as dr } from "./theme.contract.css-DaZ5UPN0.js";
3
- import { COMPILER_STAGE_KEYS as j, Geom as pe, GraphCompilationSession as fe, areEditTargetsEqual as ve, buildDiagnostic as V, createAnchorResolver as ye, createCompiler as Se, createGraphyBuilder as be, createStyleResolver as Ee, findAnnotation as Re, findLayerById as X, isCompilerCachingEnabled as Te, resolveDefinition as Ne, setCompilerCachingEnabled as Ce, toPercent as P } from "@graphysdk/viz-engine";
4
- import { Component as qe, useCallback as f, useEffect as H, useId as Ie, useImperativeHandle as ke, useMemo as $, useRef as z, useState as R, useSyncExternalStore as Ge } from "react";
5
- import { Fragment as _e, jsx as d, jsxs as v } from "react/jsx-runtime";
1
+ import { $ as Dt, At as le, C as $t, Ct as ue, Et as he, F as Ht, Gt as me, Ht as xt, I as Mt, Kt as ne, M as Pt, Mt as Lt, N as Bt, Nt as Kt, St as K, Tt as U, Ut as Ot, Vt as At, Wt as Ut, a as jt, at as Ft, bt as Yt, c as Wt, ct as Vt, et as Xt, ft as zt, ht as Qt, i as Jt, jt as Zt, kt as er, mt as tr, n as rr, qt as A, r as nr, s as sr, st as or, t as ge, v as ir, wt as ar, yt as cr, zt as dr } from "./history-chords-FqjF3hMF.js";
2
+ import { n as ur } from "./theme.contract.css-DaZ5UPN0.js";
3
+ import { COMPILER_STAGE_KEYS as j, Geom as pe, GraphCompilationSession as fe, areEditTargetsEqual as ve, buildDiagnostic as V, createAnchorResolver as ye, createCompiler as Se, createGraphyBuilder as be, createStyleResolver as Ee, findAnnotation as Te, findLayerById as X, isCompilerCachingEnabled as Ne, resolveDefinition as Re, setCompilerCachingEnabled as Ce, toPercent as P } from "@graphysdk/viz-engine";
4
+ import { Component as qe, useCallback as f, useEffect as H, useId as Ge, useImperativeHandle as Ie, useMemo as $, useRef as z, useState as T, useSyncExternalStore as ke } from "react";
5
+ import { Fragment as we, jsx as d, jsxs as v } from "react/jsx-runtime";
6
6
  import { useStore as Q } from "zustand";
7
7
  import { createStore as F } from "zustand/vanilla";
8
- import we from "clsx";
8
+ import _e from "clsx";
9
9
  import './index.css';var De = "_1a5iqpb0", $e = "_1a5iqpb1";
10
10
  var He = "_1a5iqpb3", xe = "_1a5iqpb4", Me = "_1a5iqpb5";
11
- var Z = ({ errors: e }) => {
11
+ var J = ({ errors: e }) => {
12
12
  const [t, ...r] = e;
13
13
  return /* @__PURE__ */ v("div", {
14
14
  role: "alert",
@@ -18,14 +18,14 @@ var Z = ({ errors: e }) => {
18
18
  className: $e,
19
19
  children: "This chart could not be rendered."
20
20
  }),
21
- t && /* @__PURE__ */ d(J, { diagnostic: t }),
21
+ t && /* @__PURE__ */ d(Z, { 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(J, { diagnostic: n }) }, `${n.code}-${o}`))
24
+ children: r.map((n, o) => /* @__PURE__ */ d("li", { children: /* @__PURE__ */ d(Z, { diagnostic: n }) }, `${n.code}-${o}`))
25
25
  })
26
26
  ]
27
27
  });
28
- }, J = ({ diagnostic: e }) => /* @__PURE__ */ v("div", {
28
+ }, Z = ({ diagnostic: e }) => /* @__PURE__ */ v("div", {
29
29
  className: He,
30
30
  children: [
31
31
  /* @__PURE__ */ d("span", {
@@ -54,24 +54,24 @@ var Le = class extends qe {
54
54
  }
55
55
  componentDidCatch(e, t) {
56
56
  const r = V(e);
57
- K([r]), this.props.onError?.([r]), console.error("Chart render component stack:", t.componentStack);
57
+ A([r]), this.props.onError?.([r]), console.error("Chart render component stack:", t.componentStack);
58
58
  }
59
59
  componentDidUpdate(e) {
60
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(Z, { errors: [e] });
64
+ if (e) return /* @__PURE__ */ d(J, { errors: [e] });
65
65
  const { forcedErrors: t, children: r } = this.props;
66
- return t && t.length > 0 ? /* @__PURE__ */ d(Z, { errors: t }) : r;
66
+ return t && t.length > 0 ? /* @__PURE__ */ d(J, { errors: t }) : r;
67
67
  }
68
68
  }, se = (e) => typeof e == "object" && "geom" in e && "render" in e, Be = (e) => {
69
- const t = Ne(e);
69
+ const t = Re(e);
70
70
  return t instanceof pe ? t : null;
71
- }, Oe = (e, t) => {
72
- const r = e.filter((n) => Ae(n, t));
71
+ }, Ke = (e, t) => {
72
+ const r = e.filter((n) => Oe(n, t));
73
73
  return r.length === e.length ? e : r;
74
- }, Ae = (e, t) => e.kind === "annotation" ? Re(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 = [], Ke = () => F((e) => ({
74
+ }, Oe = (e, t) => e.kind === "annotation" ? Te(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
76
  setSelection: (t) => e((r) => Ue(r.selection, t) ? r : { selection: t }),
77
77
  clearSelection: () => e((t) => t.selection.length === 0 ? t : { selection: ee })
@@ -141,7 +141,7 @@ var Le = class extends qe {
141
141
  return [...e.slice(n), t];
142
142
  };
143
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();
144
+ const t = e.filter(se), r = /* @__PURE__ */ new Set([...Object.keys(he), ...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 Qe(e) {
184
184
  warnings: i
185
185
  };
186
186
  }
187
- function Ze(e, t) {
187
+ function Je(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,7 +200,7 @@ function Ze(e, t) {
200
200
  }));
201
201
  return a;
202
202
  }
203
- function Je(e, t) {
203
+ function Ze(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;
@@ -295,113 +295,113 @@ var st = (e) => F((t) => ({
295
295
  scene: e,
296
296
  setScene: (r) => t((n) => n.scene === r ? n : { scene: r })
297
297
  })), ot = ({ input: e, data: t, customPalettes: r, colorScheme: n, plugins: o, resolveRenderer: a, anchorResolver: i, onChange: c, onError: u, onWarnings: h }) => {
298
- const T = O(c), k = O(u), q = O(h), [{ session: g, compileBus: l }] = R(() => {
298
+ const N = K(c), I = K(u), q = K(h), [{ session: m, compileBus: l }] = T(() => {
299
299
  const s = Se({ plugins: o });
300
300
  return {
301
301
  session: new fe(s),
302
302
  compileBus: Ye(s)
303
303
  };
304
- }), [p] = R(() => Qe(o ?? [])), y = z(null), [G] = R(it), N = z(null), S = f((s) => p.errors.length === 0 ? s : [...p.errors, ...s ?? []], [p]), w = f((s) => {
304
+ }), [p] = T(() => Qe(o ?? [])), y = z(null), [k] = T(it), R = z(null), S = f((s) => p.errors.length === 0 ? s : [...p.errors, ...s ?? []], [p]), _ = f((s) => {
305
305
  if (!s.ok) return s.errors;
306
- if (N.current) N.current.getState().setScene(s.scene);
306
+ if (R.current) R.current.getState().setScene(s.scene);
307
307
  else {
308
- const m = st(s.scene);
309
- m.subscribe(G.notify), N.current = m, G.notify();
308
+ const g = st(s.scene);
309
+ g.subscribe(k.notify), R.current = g, k.notify();
310
310
  }
311
311
  return null;
312
- }, [G]), [x, D] = R(() => {
313
- const s = g.compile({
312
+ }, [k]), [x, D] = T(() => {
313
+ const s = m.compile({
314
314
  input: e,
315
315
  data: t,
316
316
  customPalettes: r,
317
317
  colorScheme: n
318
318
  });
319
- return y.current = s, S(w(s));
320
- }), I = f((s) => s.ok ? [
319
+ return y.current = s, S(_(s));
320
+ }), G = f((s) => s.ok ? [
321
321
  ...s.warnings,
322
- ...Ze(s.scene, a),
323
322
  ...Je(s.scene, a),
323
+ ...Ze(s.scene, a),
324
324
  ...et(s.scene),
325
325
  ...tt(s.scene, a),
326
326
  ...nt(s.scene, a),
327
327
  ...rt(s.scene, i)
328
328
  ] : s.warnings, [a, i]), b = f((s) => {
329
- s.length !== 0 && (K(s), k.current?.(s));
330
- }, [k]), C = f((s) => {
331
- s.length !== 0 && (K(s), q.current?.(s));
329
+ s.length !== 0 && (A(s), I.current?.(s));
330
+ }, [I]), C = f((s) => {
331
+ s.length !== 0 && (A(s), q.current?.(s));
332
332
  }, [q]);
333
333
  H(() => {
334
334
  const s = y.current;
335
- s && (b([...p.errors, ...s.ok ? [] : s.errors]), C([...p.warnings, ...I(s)]), s.ok && l.emit({ kind: "init" }));
335
+ s && (b([...p.errors, ...s.ok ? [] : s.errors]), C([...p.warnings, ...G(s)]), s.ok && l.emit({ kind: "init" }));
336
336
  }, [
337
337
  l,
338
338
  b,
339
339
  C,
340
340
  p,
341
- I
341
+ G
342
342
  ]), H(() => {
343
- const s = g.update({
343
+ const s = m.update({
344
344
  input: e,
345
345
  data: t,
346
346
  customPalettes: r,
347
347
  colorScheme: n
348
348
  });
349
349
  if (!s) return;
350
- s.sealedInput && T.current?.(s.sealedInput);
351
- const m = w(s.result);
352
- D(S(m)), m && b(m), C(I(s.result)), m || l.emit({ kind: s.inputChanged ? "input" : "data" });
350
+ s.sealedInput && N.current?.(s.sealedInput);
351
+ const g = _(s.result);
352
+ D(S(g)), g && b(g), C(G(s.result)), g || l.emit({ kind: s.inputChanged ? "input" : "data" });
353
353
  }, [
354
354
  e,
355
355
  t,
356
356
  r,
357
357
  n,
358
- g,
358
+ m,
359
359
  l,
360
- w,
360
+ _,
361
361
  b,
362
362
  C,
363
363
  S,
364
- I,
365
- T
364
+ G,
365
+ N
366
366
  ]);
367
- const _ = f((s) => {
368
- D((m) => m === null ? m : S(null)), C(I(s));
367
+ const w = f((s) => {
368
+ D((g) => g === null ? g : S(null)), C(G(s));
369
369
  }, [
370
370
  S,
371
371
  C,
372
- I
372
+ G
373
373
  ]), M = f((s) => {
374
- s.scene && N.current?.getState().setScene(s.scene), s.result && _(s.result), s.command && l.emit({
374
+ s.scene && R.current?.getState().setScene(s.scene), s.result && w(s.result), s.command && l.emit({
375
375
  kind: "command",
376
376
  command: s.command
377
- }), s.input && T.current?.(s.input), s.errors && b([...s.errors]);
377
+ }), s.input && N.current?.(s.input), s.errors && b([...s.errors]);
378
378
  }, [
379
- _,
379
+ w,
380
380
  l,
381
- T,
381
+ N,
382
382
  b
383
383
  ]), E = f((s) => {
384
- for (const m of s) M(m);
385
- return s.some((m) => !!m.scene);
386
- }, [M]), B = f((s, m) => {
387
- E(g.applyCommand(s, m));
388
- }, [g, E]), ae = f(() => {
389
- E(g.seal());
390
- }, [g, E]), Y = f(() => E(g.undo()), [g, E]), W = f(() => E(g.redo()), [g, E]), ce = $(() => ({
391
- stack: g.history,
384
+ for (const g of s) M(g);
385
+ return s.some((g) => !!g.scene);
386
+ }, [M]), B = f((s, g) => {
387
+ E(m.applyCommand(s, g));
388
+ }, [m, E]), ae = f(() => {
389
+ E(m.seal());
390
+ }, [m, E]), Y = f(() => E(m.undo()), [m, E]), W = f(() => E(m.redo()), [m, E]), ce = $(() => ({
391
+ stack: m.history,
392
392
  undo: Y,
393
393
  redo: W
394
394
  }), [
395
- g,
395
+ m,
396
396
  Y,
397
397
  W
398
- ]), de = f(() => N.current?.getState().scene ?? null, []);
398
+ ]), de = f(() => R.current?.getState().scene ?? null, []);
399
399
  return {
400
- store: N.current,
400
+ store: R.current,
401
401
  dispatch: B,
402
402
  seal: ae,
403
403
  history: ce,
404
- subscribe: G.subscribe,
404
+ subscribe: k.subscribe,
405
405
  getScene: de,
406
406
  compileBus: l,
407
407
  compileErrors: x
@@ -414,44 +414,44 @@ var st = (e) => F((t) => ({
414
414
  }),
415
415
  notify: () => e.forEach((t) => t())
416
416
  };
417
- }, at = ({ data: e, input: t, plugins: r = [], formattingLocale: n, handleRef: o, onChange: a, onError: i, onWarnings: c, customPalettes: u, colorScheme: h = "light", children: T }) => {
418
- const [k] = R(() => ge(r.filter(se))), q = Ie(), [g] = R(() => ye(r)), [l] = R(() => Ke()), p = $(() => Ee({ colorScheme: h }), [h]), { store: y, dispatch: G, seal: N, history: S, subscribe: w, getScene: x, compileBus: D, compileErrors: I } = ot({
417
+ }, at = ({ data: e, input: t, plugins: r = [], formattingLocale: n, handleRef: o, onChange: a, onError: i, onWarnings: c, customPalettes: u, colorScheme: h = "light", children: N }) => {
418
+ const [I] = T(() => ue(r.filter(se))), q = Ge(), [m] = T(() => ye(r)), [l] = T(() => Ae()), p = $(() => Ee({ colorScheme: h }), [h]), { store: y, dispatch: k, seal: R, history: S, subscribe: _, getScene: x, compileBus: D, compileErrors: G } = ot({
419
419
  input: t,
420
420
  data: e,
421
421
  customPalettes: u,
422
422
  colorScheme: h,
423
423
  plugins: r,
424
- resolveRenderer: k,
425
- anchorResolver: g,
424
+ resolveRenderer: I,
425
+ anchorResolver: m,
426
426
  onChange: a,
427
427
  onError: i,
428
428
  onWarnings: c
429
429
  });
430
430
  H(() => {
431
431
  if (y)
432
- return y.subscribe((_, M) => {
433
- if (_.scene.spec === M.scene.spec) return;
432
+ return y.subscribe((w, M) => {
433
+ if (w.scene.spec === M.scene.spec) return;
434
434
  const { selection: E, setSelection: B } = l.getState();
435
- E.length !== 0 && B(Oe(E, _.scene.spec));
435
+ E.length !== 0 && B(Ke(E, w.scene.spec));
436
436
  });
437
437
  }, [y, l]);
438
438
  const b = $(() => ({
439
- dispatch: G,
440
- seal: N
441
- }), [G, N]);
442
- ke(o, () => ({
439
+ dispatch: k,
440
+ seal: R
441
+ }), [k, R]);
442
+ Ie(o, () => ({
443
443
  commands: b,
444
444
  undo: S.undo,
445
445
  redo: S.redo,
446
- subscribe: w,
446
+ subscribe: _,
447
447
  getScene: x,
448
448
  getSelection: () => l.getState().selection,
449
- setSelection: (_) => l.getState().setSelection(_),
449
+ setSelection: (w) => l.getState().setSelection(w),
450
450
  subscribeSelection: l.subscribe
451
451
  }), [
452
452
  b,
453
453
  S,
454
- w,
454
+ _,
455
455
  x,
456
456
  l
457
457
  ]);
@@ -465,7 +465,7 @@ var st = (e) => F((t) => ({
465
465
  compileBus: D,
466
466
  colorScheme: h,
467
467
  styleResolver: p,
468
- anchorResolver: g
468
+ anchorResolver: m
469
469
  } : null, [
470
470
  q,
471
471
  y,
@@ -476,22 +476,22 @@ var st = (e) => F((t) => ({
476
476
  D,
477
477
  h,
478
478
  p,
479
- g
479
+ m
480
480
  ]);
481
481
  return /* @__PURE__ */ d(Le, {
482
- forcedErrors: I,
482
+ forcedErrors: G,
483
483
  onError: i,
484
484
  resetKeys: [t, e],
485
- children: C ? /* @__PURE__ */ d(he.Provider, {
485
+ children: C ? /* @__PURE__ */ d(me.Provider, {
486
486
  value: C,
487
- children: /* @__PURE__ */ d(ue, {
488
- value: k,
489
- children: T
487
+ children: /* @__PURE__ */ d(le, {
488
+ value: I,
489
+ children: N
490
490
  })
491
491
  }) : null
492
492
  });
493
493
  };
494
- function fr(e) {
494
+ function yr(e) {
495
495
  const t = be(e);
496
496
  return {
497
497
  ...t,
@@ -501,7 +501,7 @@ function fr(e) {
501
501
  })
502
502
  };
503
503
  }
504
- var vr = ({ children: e, ...t }) => /* @__PURE__ */ d("svg", {
504
+ var Sr = ({ children: e, ...t }) => /* @__PURE__ */ d("svg", {
505
505
  viewBox: "0 0 1 1",
506
506
  preserveAspectRatio: "none",
507
507
  width: "100%",
@@ -509,7 +509,7 @@ var vr = ({ children: e, ...t }) => /* @__PURE__ */ d("svg", {
509
509
  pointerEvents: "none",
510
510
  ...t,
511
511
  children: e
512
- }), yr = ({ box: e, children: t }) => /* @__PURE__ */ d("svg", {
512
+ }), br = ({ box: e, children: t }) => /* @__PURE__ */ d("svg", {
513
513
  x: P(e.x0),
514
514
  y: P(e.y0),
515
515
  width: P(e.x1 - e.x0),
@@ -517,9 +517,9 @@ var vr = ({ children: e, ...t }) => /* @__PURE__ */ d("svg", {
517
517
  overflow: "hidden",
518
518
  pointerEvents: "none",
519
519
  children: t
520
- }), ct = "drqe3u0", dt = "drqe3u1", lt = "drqe3u2", ut = "drqe3u3", L = "drqe3u4", ht = "drqe3u5", gt = "drqe3u6", mt = "drqe3u7", A = "drqe3u8", pt = "drqe3u9", ft = "drqe3ua";
520
+ }), ct = "drqe3u0", dt = "drqe3u1", lt = "drqe3u2", ut = "drqe3u3", L = "drqe3u4", ht = "drqe3u5", mt = "drqe3u6", gt = "drqe3u7", O = "drqe3u8", pt = "drqe3u9", ft = "drqe3ua";
521
521
  var vt = "drqe3uc", yt = "drqe3ud", St = "drqe3ue", bt = "drqe3uf";
522
- var Et = "drqe3uh", Rt = "drqe3ui", te = {
522
+ var Et = "drqe3uh", Tt = "drqe3ui", te = {
523
523
  enabled: "drqe3uk drqe3uj",
524
524
  disabled: "drqe3ul drqe3uj"
525
525
  }, re = {
@@ -529,20 +529,20 @@ var Et = "drqe3uh", Rt = "drqe3ui", te = {
529
529
  ran: "drqe3uq drqe3up",
530
530
  cached: "drqe3ur drqe3up",
531
531
  untouched: "drqe3us drqe3up"
532
- }, Sr = ({ width: e = 380, style: t, className: r } = {}) => {
533
- const { compileBus: n } = ne(), [o] = R(() => We()), [a, i] = R(!1), [c, u] = R(Te);
532
+ }, Er = ({ width: e = 380, style: t, className: r } = {}) => {
533
+ const { compileBus: n } = ne(), [o] = T(() => We()), [a, i] = T(!1), [c, u] = T(Ne);
534
534
  H(() => {
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 h = Q(o, (l) => l.lastCompile), T = Q(o, (l) => l.history), k = n.getCacheStats(), q = h === null && T.length === 0, g = () => {
538
+ const h = Q(o, (l) => l.lastCompile), N = Q(o, (l) => l.history), I = n.getCacheStats(), q = h === null && N.length === 0, m = () => {
539
539
  u((l) => {
540
540
  const p = !l;
541
541
  return Ce(p), p;
542
542
  });
543
543
  };
544
544
  return /* @__PURE__ */ v("div", {
545
- className: we(ft, r),
545
+ className: _e(ft, r),
546
546
  style: {
547
547
  width: e,
548
548
  ...t
@@ -567,7 +567,7 @@ var Et = "drqe3uh", Rt = "drqe3ui", te = {
567
567
  className: "drqe3ub",
568
568
  children: [/* @__PURE__ */ v("button", {
569
569
  type: "button",
570
- onClick: g,
570
+ onClick: m,
571
571
  className: c ? te.enabled : te.disabled,
572
572
  "aria-pressed": c,
573
573
  children: ["cache ", c ? "enabled" : "disabled"]
@@ -576,13 +576,13 @@ var Et = "drqe3uh", Rt = "drqe3ui", te = {
576
576
  children: "next compile reflects this toggle"
577
577
  })]
578
578
  }),
579
- !a && !q && /* @__PURE__ */ v(_e, { children: [/* @__PURE__ */ d(Tt, {
579
+ !a && !q && /* @__PURE__ */ v(we, { children: [/* @__PURE__ */ d(Nt, {
580
580
  delta: h?.stages,
581
- cumulative: k
582
- }), /* @__PURE__ */ d(Nt, { entries: T })] })
581
+ cumulative: I
582
+ }), /* @__PURE__ */ d(Rt, { entries: N })] })
583
583
  ]
584
584
  });
585
- }, Tt = ({ delta: e, cumulative: t }) => /* @__PURE__ */ v("table", {
585
+ }, Nt = ({ delta: e, cumulative: t }) => /* @__PURE__ */ v("table", {
586
586
  className: lt,
587
587
  children: [/* @__PURE__ */ d("thead", { children: /* @__PURE__ */ v("tr", {
588
588
  className: Et,
@@ -629,36 +629,36 @@ var Et = "drqe3uh", Rt = "drqe3ui", te = {
629
629
  children: n?.misses ?? 0
630
630
  }),
631
631
  /* @__PURE__ */ d("td", {
632
- className: A,
632
+ className: O,
633
633
  children: n?.hits ?? 0
634
634
  }),
635
635
  /* @__PURE__ */ d("td", {
636
- className: A,
636
+ className: O,
637
637
  children: t[r].misses
638
638
  }),
639
639
  /* @__PURE__ */ d("td", {
640
- className: A,
640
+ className: O,
641
641
  children: t[r].hits
642
642
  })
643
643
  ]
644
644
  }, r);
645
645
  }) })]
646
- }), Nt = ({ entries: e }) => e.length === 0 ? null : /* @__PURE__ */ v("div", {
646
+ }), Rt = ({ entries: e }) => e.length === 0 ? null : /* @__PURE__ */ v("div", {
647
647
  className: yt,
648
648
  children: [/* @__PURE__ */ d("div", {
649
- className: Rt,
649
+ className: Tt,
650
650
  children: "recent compiles"
651
651
  }), e.map((t) => {
652
652
  const r = qt(t.stages, (a) => a.misses > 0), n = j.length;
653
653
  return /* @__PURE__ */ v("div", {
654
- className: gt,
654
+ className: mt,
655
655
  children: [
656
656
  /* @__PURE__ */ d("span", {
657
657
  className: oe[r === 0 ? "cached" : "ran"],
658
658
  "aria-hidden": !0
659
659
  }),
660
660
  /* @__PURE__ */ d("span", {
661
- className: mt,
661
+ className: gt,
662
662
  title: t.label,
663
663
  children: t.label
664
664
  }),
@@ -679,8 +679,8 @@ var Et = "drqe3uh", Rt = "drqe3ui", te = {
679
679
  let r = 0;
680
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`, 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 = Ge(o, a, a);
682
+ }, ie = (e) => e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`, Tr = () => {
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,
@@ -690,7 +690,7 @@ var Et = "drqe3uh", Rt = "drqe3ui", te = {
690
690
  r,
691
691
  n
692
692
  ]);
693
- }, It = /* @__PURE__ */ new Set([
693
+ }, Gt = /* @__PURE__ */ new Set([
694
694
  "button",
695
695
  "checkbox",
696
696
  "color",
@@ -701,14 +701,14 @@ var Et = "drqe3uh", Rt = "drqe3ui", te = {
701
701
  "range",
702
702
  "reset",
703
703
  "submit"
704
- ]), Er = (e, t = {}) => {
704
+ ]), Nr = (e, t = {}) => {
705
705
  const { target: r, enabled: n = !0 } = t;
706
706
  H(() => {
707
- const o = kt(r);
707
+ const o = It(r);
708
708
  if (!n || !o) return;
709
709
  const a = (i) => {
710
- if (!Gt(i) || i.defaultPrevented || _t(i.target)) return;
711
- const c = me(i);
710
+ if (!kt(i) || i.defaultPrevented || wt(i.target)) return;
711
+ const c = ge(i);
712
712
  if (!c) return;
713
713
  const u = e.current;
714
714
  u && (c === "undo" ? u.undo() : u.redo()) && i.preventDefault();
@@ -719,47 +719,49 @@ var Et = "drqe3uh", Rt = "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, _t = (e) => e instanceof HTMLInputElement ? !It.has(e.type) : e instanceof HTMLElement ? e.isContentEditable || e.tagName === "TEXTAREA" : !1;
722
+ }, It = (e) => e === void 0 ? window : e !== null && "current" in e ? e.current : e, kt = (e) => "key" in e, wt = (e) => e instanceof HTMLInputElement ? !Gt.has(e.type) : e instanceof HTMLElement ? e.isContentEditable || e.tagName === "TEXTAREA" : !1;
723
723
  export {
724
- Pt as BrandMark,
725
- $t as CanvasTextMeasurer,
726
- Dt as DefaultFooter,
727
- or as DefaultGrid,
728
- Jt as DefaultHeader,
729
- xt as DefaultSwatch,
730
- Kt as DefaultTooltip,
731
- Sr as DevToolsPanel,
732
- tr as GRAPH_MODES,
724
+ Ht as BrandMark,
725
+ Kt as CanvasTextMeasurer,
726
+ Bt as DefaultFooter,
727
+ sr as DefaultGrid,
728
+ Pt as DefaultHeader,
729
+ er as DefaultSwatch,
730
+ Dt as DefaultTooltip,
731
+ Er as DevToolsPanel,
732
+ zt as GRAPH_MODES,
733
733
  Le as GraphErrorBoundary,
734
- Z as GraphErrorPanel,
734
+ J as GraphErrorPanel,
735
735
  at as GraphProvider,
736
- Yt as GraphRenderer,
737
- Ft as HoverProvider,
738
- Bt as TextMeasurerProvider,
739
- nr as ThemeProvider,
740
- yr as UnitBoxSvg,
741
- vr as UnitSpaceSvg,
742
- fr as createGraphyKit,
743
- Zt as darkTheme,
744
- ir as defineGeomRenderer,
745
- Wt as lightTheme,
746
- Mt as lightenCss,
747
- Oe as pruneSelection,
748
- Lt as resolveBrandMarkVisual,
749
- Xt as useElementScreenRect,
750
- zt as useGeomHitTest,
751
- Vt as useGeomHover,
736
+ jt as GraphRenderer,
737
+ Yt as HoverProvider,
738
+ Zt as TextMeasurerProvider,
739
+ Ft as ThemeProvider,
740
+ br as UnitBoxSvg,
741
+ Sr as UnitSpaceSvg,
742
+ yr as createGraphyKit,
743
+ or as darkTheme,
744
+ ar as defineGeomRenderer,
745
+ Vt as lightTheme,
746
+ dr as lightenCss,
747
+ Ke as pruneSelection,
748
+ Mt as resolveBrandMarkVisual,
749
+ $t as stampGridEditTarget,
750
+ Qt as useElementScreenRect,
751
+ cr as useGeomHitTest,
752
+ tr as useGeomHover,
752
753
  rr as useGraphCommands,
753
- Qt as useGraphHandle,
754
- br as useGraphHistory,
755
- Er as useGraphHistoryShortcuts,
756
- jt as useGraphSelection,
757
- sr as useHandleScene,
758
- Ut as useHoverState,
759
- At as useSceneSelector,
760
- Ot as useStyleReaderTree,
761
- ar as useStyleReaders,
762
- Ht as useStyleResolver,
763
- er as useTextMeasurer,
764
- dr as vars
754
+ Jt as useGraphHandle,
755
+ Tr as useGraphHistory,
756
+ Nr as useGraphHistoryShortcuts,
757
+ ir as useGraphSelection,
758
+ Wt as useGuidesTakePress,
759
+ nr as useHandleScene,
760
+ Xt as useHoverState,
761
+ Ut as useSceneSelector,
762
+ At as useStyleReaderTree,
763
+ xt as useStyleReaders,
764
+ Ot as useStyleResolver,
765
+ Lt as useTextMeasurer,
766
+ ur as vars
765
767
  };
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "visualization",
12
12
  "renderer"
13
13
  ],
14
- "version": "1.9.0-beta.1789558511894",
14
+ "version": "1.9.0-beta.1789573335651",
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.1789558511894"
58
+ "@graphysdk/viz-engine": "1.9.0-beta.1789573335651"
59
59
  },
60
60
  "peerDependencies": {
61
61
  "@tiptap/core": "^3.0.0",