@graphysdk/react-renderer 1.9.0-beta.1789633145847 → 1.9.0-beta.1789643389031

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,18 +1,18 @@
1
- import { $ as _t, At as le, C as $t, Ct as ue, Et as me, F as Ht, Gt as he, Ht as Mt, I as xt, Kt as se, M as Pt, Mt as Lt, N as Bt, Nt as Kt, St as O, 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-Bu0I5FG1.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 X, createAnchorResolver as ye, createCompiler as Se, createGraphyBuilder as be, createStyleResolver as Ee, findAnnotation as Te, findLayerById as z, isCompilerCachingEnabled as Ne, resolveDefinition as Re, setCompilerCachingEnabled as Ce, toPercent as L } from "@graphysdk/viz-engine";
4
- import { Component as qe, useCallback as f, useEffect as M, useId as Ge, useImperativeHandle as ke, useMemo as H, useRef as Q, useState as T, useSyncExternalStore as Ie } from "react";
5
- import { Fragment as we, jsx as c, jsxs as v } from "react/jsx-runtime";
6
- import { useStore as J } from "zustand";
7
- import { createStore as F } from "zustand/vanilla";
8
- import De from "clsx";
9
- import './index.css';var _e = "_1a5iqpb0", $e = "_1a5iqpb1";
10
- var He = "_1a5iqpb3", Me = "_1a5iqpb4", xe = "_1a5iqpb5";
1
+ import { A as Dt, Ct as $t, Dt as Ht, E as xt, Et as le, F as Mt, Ft as Pt, Gt as Lt, Ht as Bt, I as Ot, It as At, Jt as ue, Kt, M as Ft, Mt as jt, Nt as me, Ot as F, Pt as Ut, R as Yt, St as Wt, Tt as A, Wt as Vt, Xt as K, Yt as se, _ as Xt, _t as zt, a as Jt, ct as Qt, dt as Zt, ht as er, i as tr, j as rr, kt as he, n as nr, nt as sr, qt as or, r as ir, rt as ar, s as cr, t as ge, ut as dr, vt as lr, z as ur } from "./history-chords-BEesSXz6.js";
2
+ import { n as hr } from "./theme.contract.css-DaZ5UPN0.js";
3
+ import { COMPILER_STAGE_KEYS as j, Geom as pe, GraphCompilationSession as fe, areEditTargetsEqual as ve, buildDiagnostic as X, createAnchorResolver as ye, createCompiler as Se, createGraphyBuilder as be, createStyleResolver as Ee, findAnnotation as Te, findLayerById as z, isCompilerCachingEnabled as Ne, resolveDefinition as Re, setCompilerCachingEnabled as qe, toPercent as L } from "@graphysdk/viz-engine";
4
+ import { Component as Ce, useCallback as f, useEffect as x, useId as Ge, useImperativeHandle as ke, useMemo as H, useRef as J, useState as T, useSyncExternalStore as Ie } from "react";
5
+ import { Fragment as _e, jsx as c, jsxs as v } from "react/jsx-runtime";
6
+ import { useStore as Q } from "zustand";
7
+ import { createStore as U } from "zustand/vanilla";
8
+ import we from "clsx";
9
+ import './index.css';var De = "_1a5iqpb0", $e = "_1a5iqpb1";
10
+ var He = "_1a5iqpb3", xe = "_1a5iqpb4", Me = "_1a5iqpb5";
11
11
  var Z = ({ errors: e }) => {
12
12
  const [t, ...n] = e;
13
13
  return /* @__PURE__ */ v("div", {
14
14
  role: "alert",
15
- className: _e,
15
+ className: De,
16
16
  children: [
17
17
  /* @__PURE__ */ c("strong", {
18
18
  className: $e,
@@ -29,11 +29,11 @@ var Z = ({ errors: e }) => {
29
29
  className: He,
30
30
  children: [
31
31
  /* @__PURE__ */ c("span", {
32
- className: Me,
32
+ className: xe,
33
33
  children: e.code
34
34
  }),
35
35
  /* @__PURE__ */ c("p", {
36
- className: xe,
36
+ className: Me,
37
37
  children: e.message
38
38
  }),
39
39
  e.suggestion && /* @__PURE__ */ c("p", {
@@ -45,7 +45,7 @@ var Z = ({ errors: e }) => {
45
45
  function Pe(e = [], t = []) {
46
46
  return e.length === t.length && e.every((n, r) => Object.is(n, t[r]));
47
47
  }
48
- var Le = class extends qe {
48
+ var Le = class extends Ce {
49
49
  constructor(...e) {
50
50
  super(...e), this.state = { caughtDiagnostic: null };
51
51
  }
@@ -54,7 +54,7 @@ var Le = class extends qe {
54
54
  }
55
55
  componentDidCatch(e, t) {
56
56
  const n = X(e);
57
- A([n]), this.props.onError?.([n]), console.error("Chart render component stack:", t.componentStack);
57
+ K([n]), this.props.onError?.([n]), 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 });
@@ -68,17 +68,17 @@ var Le = class extends qe {
68
68
  }, oe = (e) => typeof e == "object" && "geom" in e && "render" in e, Be = (e) => {
69
69
  const t = Re(e);
70
70
  return t instanceof pe ? t : null;
71
- }, Ke = (e, t) => {
72
- const n = e.filter((r) => Oe(r, t));
71
+ }, Oe = (e, t) => {
72
+ const n = e.filter((r) => Ae(r, t));
73
73
  return n.length === e.length ? e : n;
74
- }, Oe = (e, t) => e.kind === "annotation" ? Te(t.annotations, e.id) !== null : e.kind === "observations" ? z(t.layers, e.layerId) !== void 0 : e.kind === "layer" && e.layerId !== void 0 ? z(t.layers, e.layerId) !== void 0 : !0, te = [], Ae = () => F((e) => ({
74
+ }, Ae = (e, t) => e.kind === "annotation" ? Te(t.annotations, e.id) !== null : e.kind === "observations" ? z(t.layers, e.layerId) !== void 0 : e.kind === "layer" && e.layerId !== void 0 ? z(t.layers, e.layerId) !== void 0 : !0, te = [], Ke = () => U((e) => ({
75
75
  selection: te,
76
- setSelection: (t) => e((n) => Ue(n.selection, t) ? n : { selection: t }),
76
+ setSelection: (t) => e((n) => Fe(n.selection, t) ? n : { selection: t }),
77
77
  clearSelection: () => e((t) => t.selection.length === 0 ? t : { selection: te })
78
- })), Ue = (e, t) => e === t ? !0 : e.length !== t.length ? !1 : e.every((n, r) => {
78
+ })), Fe = (e, t) => e === t ? !0 : e.length !== t.length ? !1 : e.every((n, r) => {
79
79
  const o = t[r];
80
80
  return o !== void 0 && ve(n, o);
81
- }), je = process.env.NODE_ENV !== "production", Fe = 5, Ye = (e) => {
81
+ }), je = process.env.NODE_ENV !== "production", Ue = 5, Ye = (e) => {
82
82
  if (!je) return {
83
83
  emit: () => {
84
84
  },
@@ -104,7 +104,7 @@ var Le = class extends qe {
104
104
  getLastCompile: () => e.getLastCompile(),
105
105
  getCacheStats: () => e.getCacheStats()
106
106
  };
107
- }, We = () => F((e) => ({
107
+ }, We = () => U((e) => ({
108
108
  lastCompile: null,
109
109
  history: [],
110
110
  nextId: 1,
@@ -120,7 +120,7 @@ var Le = class extends qe {
120
120
  };
121
121
  return {
122
122
  lastCompile: o,
123
- history: ze(r.history, o, Fe),
123
+ history: ze(r.history, o, Ue),
124
124
  nextId: r.nextId + 1,
125
125
  lastSnapshot: n
126
126
  };
@@ -141,8 +141,8 @@ var Le = class extends qe {
141
141
  const r = e.length >= n ? e.length - (n - 1) : 0;
142
142
  return [...e.slice(r), t];
143
143
  };
144
- function Qe(e) {
145
- const t = e.filter(oe), n = /* @__PURE__ */ new Set([...Object.keys(me), ...t.map((d) => d.geom)]), r = [], o = /* @__PURE__ */ new Set();
144
+ function Je(e) {
145
+ const t = e.filter(oe), n = /* @__PURE__ */ new Set([...Object.keys(he), ...t.map((d) => d.geom)]), r = [], o = /* @__PURE__ */ new Set();
146
146
  for (const d of e) {
147
147
  const u = Be(d);
148
148
  u === null || n.has(u.type) || o.has(u.type) || (o.add(u.type), r.push({
@@ -185,7 +185,7 @@ function Qe(e) {
185
185
  warnings: i
186
186
  };
187
187
  }
188
- function Je(e, t) {
188
+ function Qe(e, t) {
189
189
  const { coordSystem: n, layers: r } = e, o = /* @__PURE__ */ new Set(), a = [];
190
190
  for (const i of r)
191
191
  t(i.geom, n.type) !== null || o.has(i.geom) || (o.add(i.geom), a.push({
@@ -206,7 +206,7 @@ function Ze(e, t) {
206
206
  for (const i of r) {
207
207
  if (i.interactive === !1 || i.spatialKind !== "render-hit-test" || o.has(i.geom)) continue;
208
208
  const d = t(i.geom, n.type);
209
- d === null || d.hitTest || U(d) || (o.add(i.geom), a.push({
209
+ d === null || d.hitTest || F(d) || (o.add(i.geom), a.push({
210
210
  kind: "user-input",
211
211
  severity: "warning",
212
212
  code: "MISSING_RENDER_HIT_TEST",
@@ -243,7 +243,7 @@ function tt(e, t) {
243
243
  for (const i of r) {
244
244
  if (i.interactive === !1 || i.spatialKind !== "render-hit-test" || o.has(i.geom)) continue;
245
245
  const d = t(i.geom, n.type);
246
- d === null || !d.hitTest || !U(d) || (o.add(i.geom), a.push({
246
+ d === null || !d.hitTest || !F(d) || (o.add(i.geom), a.push({
247
247
  kind: "user-input",
248
248
  severity: "warning",
249
249
  code: "CONFLICTING_RENDER_HIT_TEST",
@@ -278,7 +278,7 @@ function nt(e, t) {
278
278
  for (const i of r) {
279
279
  if (i.interactive === !1 || i.spatialKind === "render-hit-test" || o.has(i.geom)) continue;
280
280
  const d = t(i.geom, n.type);
281
- d === null || !U(d) || (o.add(i.geom), a.push({
281
+ d === null || !F(d) || (o.add(i.geom), a.push({
282
282
  kind: "user-input",
283
283
  severity: "warning",
284
284
  code: "OVERLAY_REQUIRES_RENDER_HIT_TEST",
@@ -292,17 +292,17 @@ function nt(e, t) {
292
292
  }
293
293
  return a;
294
294
  }
295
- var st = (e) => F((t) => ({
295
+ var st = (e) => U((t) => ({
296
296
  scene: e,
297
297
  setScene: (n) => t((r) => r.scene === n ? r : { scene: n })
298
298
  })), ot = ({ spec: e, data: t, customPalettes: n, colorScheme: r, plugins: o, resolveRenderer: a, anchorResolver: i, onSpecChange: d, onError: u, onWarnings: m }) => {
299
- const N = O(d), k = O(u), q = O(m), [{ session: h, compileBus: l }] = T(() => {
299
+ const N = A(d), k = A(u), C = A(m), [{ session: h, compileBus: l }] = T(() => {
300
300
  const s = Se({ plugins: o });
301
301
  return {
302
302
  session: new fe(s),
303
303
  compileBus: Ye(s)
304
304
  };
305
- }), [p] = T(() => Qe(o ?? [])), y = Q(null), [I] = T(it), R = Q(null), S = f((s) => p.errors.length === 0 ? s : [...p.errors, ...s ?? []], [p]), D = f((s) => {
305
+ }), [p] = T(() => Je(o ?? [])), y = J(null), [I] = T(it), R = J(null), S = f((s) => p.errors.length === 0 ? s : [...p.errors, ...s ?? []], [p]), w = f((s) => {
306
306
  if (!s.ok) return s.errors;
307
307
  if (R.current) R.current.getState().setScene(s.scene);
308
308
  else {
@@ -310,37 +310,37 @@ var st = (e) => F((t) => ({
310
310
  g.subscribe(I.notify), R.current = g, I.notify();
311
311
  }
312
312
  return null;
313
- }, [I]), [x, _] = T(() => {
313
+ }, [I]), [M, D] = T(() => {
314
314
  const s = h.compile({
315
315
  spec: e,
316
316
  data: t,
317
317
  customPalettes: n,
318
318
  colorScheme: r
319
319
  });
320
- return y.current = s, S(D(s));
320
+ return y.current = s, S(w(s));
321
321
  }), G = f((s) => s.ok ? [
322
322
  ...s.warnings,
323
- ...Je(s.scene, a),
323
+ ...Qe(s.scene, a),
324
324
  ...Ze(s.scene, a),
325
325
  ...et(s.scene),
326
326
  ...tt(s.scene, a),
327
327
  ...nt(s.scene, a),
328
328
  ...rt(s.scene, i)
329
329
  ] : s.warnings, [a, i]), b = f((s) => {
330
- s.length !== 0 && (A(s), k.current?.(s));
331
- }, [k]), C = f((s) => {
332
- s.length !== 0 && (A(s), q.current?.(s));
333
- }, [q]);
334
- M(() => {
330
+ s.length !== 0 && (K(s), k.current?.(s));
331
+ }, [k]), q = f((s) => {
332
+ s.length !== 0 && (K(s), C.current?.(s));
333
+ }, [C]);
334
+ x(() => {
335
335
  const s = y.current;
336
- s && (b([...p.errors, ...s.ok ? [] : s.errors]), C([...p.warnings, ...G(s)]), s.ok && l.emit({ kind: "init" }));
336
+ s && (b([...p.errors, ...s.ok ? [] : s.errors]), q([...p.warnings, ...G(s)]), s.ok && l.emit({ kind: "init" }));
337
337
  }, [
338
338
  l,
339
339
  b,
340
- C,
340
+ q,
341
341
  p,
342
342
  G
343
- ]), M(() => {
343
+ ]), x(() => {
344
344
  const s = h.update({
345
345
  spec: e,
346
346
  data: t,
@@ -349,8 +349,8 @@ var st = (e) => F((t) => ({
349
349
  });
350
350
  if (!s) return;
351
351
  s.committedSpec && N.current?.(s.committedSpec);
352
- const g = D(s.result);
353
- _(S(g)), g && b(g), C(G(s.result)), g || l.emit({ kind: s.specChanged ? "spec" : "data" });
352
+ const g = w(s.result);
353
+ D(S(g)), g && b(g), q(G(s.result)), g || l.emit({ kind: s.specChanged ? "spec" : "data" });
354
354
  }, [
355
355
  e,
356
356
  t,
@@ -358,33 +358,33 @@ var st = (e) => F((t) => ({
358
358
  r,
359
359
  h,
360
360
  l,
361
- D,
361
+ w,
362
362
  b,
363
- C,
363
+ q,
364
364
  S,
365
365
  G,
366
366
  N
367
367
  ]);
368
- const w = f((s) => {
369
- _((g) => g === null ? g : S(null)), C(G(s));
368
+ const _ = f((s) => {
369
+ D((g) => g === null ? g : S(null)), q(G(s));
370
370
  }, [
371
371
  S,
372
- C,
372
+ q,
373
373
  G
374
374
  ]), P = f((s) => {
375
- s.scene && R.current?.getState().setScene(s.scene), s.result && w(s.result), s.command && l.emit({
375
+ s.scene && R.current?.getState().setScene(s.scene), s.result && _(s.result), s.command && l.emit({
376
376
  kind: "command",
377
377
  command: s.command
378
378
  }), s.spec && N.current?.(s.spec), s.errors && b([...s.errors]);
379
379
  }, [
380
- w,
380
+ _,
381
381
  l,
382
382
  N,
383
383
  b
384
384
  ]), E = f((s) => {
385
385
  for (const g of s) P(g);
386
386
  return s.some((g) => !!g.scene);
387
- }, [P]), K = f((s, g) => {
387
+ }, [P]), O = f((s, g) => {
388
388
  E(h.applyCommand(s, g));
389
389
  }, [h, E]), ae = f(() => {
390
390
  E(h.commit());
@@ -399,13 +399,13 @@ var st = (e) => F((t) => ({
399
399
  ]), de = f(() => R.current?.getState().scene ?? null, []);
400
400
  return {
401
401
  store: R.current,
402
- dispatch: K,
402
+ dispatch: O,
403
403
  commit: ae,
404
404
  history: ce,
405
405
  subscribe: I.subscribe,
406
406
  getScene: de,
407
407
  compileBus: l,
408
- compileErrors: x
408
+ compileErrors: M
409
409
  };
410
410
  }, it = () => {
411
411
  const e = /* @__PURE__ */ new Set();
@@ -416,7 +416,7 @@ var st = (e) => F((t) => ({
416
416
  notify: () => e.forEach((t) => t())
417
417
  };
418
418
  }, at = ({ data: e, spec: t, plugins: n = [], formattingLocale: r, handleRef: o, onSpecChange: a, onError: i, onWarnings: d, customPalettes: u, colorScheme: m = "light", children: N }) => {
419
- const [k] = T(() => ue(n.filter(oe))), q = Ge(), [h] = T(() => ye(n)), [l] = T(() => Ae()), p = H(() => Ee({ colorScheme: m }), [m]), { store: y, dispatch: I, commit: R, history: S, subscribe: D, getScene: x, compileBus: _, compileErrors: G } = ot({
419
+ const [k] = T(() => le(n.filter(oe))), C = Ge(), [h] = T(() => ye(n)), [l] = T(() => Ke()), p = H(() => Ee({ colorScheme: m }), [m]), { store: y, dispatch: I, commit: R, history: S, subscribe: w, getScene: M, compileBus: D, compileErrors: G } = ot({
420
420
  spec: t,
421
421
  data: e,
422
422
  customPalettes: u,
@@ -428,12 +428,12 @@ var st = (e) => F((t) => ({
428
428
  onError: i,
429
429
  onWarnings: d
430
430
  });
431
- M(() => {
431
+ x(() => {
432
432
  if (y)
433
- return y.subscribe((w, P) => {
434
- if (w.scene.spec === P.scene.spec) return;
435
- const { selection: E, setSelection: K } = l.getState();
436
- E.length !== 0 && K(Ke(E, w.scene.spec));
433
+ return y.subscribe((_, P) => {
434
+ if (_.scene.spec === P.scene.spec) return;
435
+ const { selection: E, setSelection: O } = l.getState();
436
+ E.length !== 0 && O(Oe(E, _.scene.spec));
437
437
  });
438
438
  }, [y, l]);
439
439
  const b = H(() => ({
@@ -444,37 +444,37 @@ var st = (e) => F((t) => ({
444
444
  commands: b,
445
445
  undo: S.undo,
446
446
  redo: S.redo,
447
- subscribe: D,
448
- getScene: x,
447
+ subscribe: w,
448
+ getScene: M,
449
449
  getSelection: () => l.getState().selection,
450
- setSelection: (w) => l.getState().setSelection(w),
450
+ setSelection: (_) => l.getState().setSelection(_),
451
451
  subscribeSelection: l.subscribe
452
452
  }), [
453
453
  b,
454
454
  S,
455
- D,
456
- x,
455
+ w,
456
+ M,
457
457
  l
458
458
  ]);
459
- const C = H(() => y ? {
460
- chartId: q,
459
+ const q = H(() => y ? {
460
+ chartId: C,
461
461
  store: y,
462
462
  selectionStore: l,
463
463
  commands: b,
464
464
  history: S,
465
465
  formattingLocale: r,
466
- compileBus: _,
466
+ compileBus: D,
467
467
  colorScheme: m,
468
468
  styleResolver: p,
469
469
  anchorResolver: h
470
470
  } : null, [
471
- q,
471
+ C,
472
472
  y,
473
473
  l,
474
474
  b,
475
475
  S,
476
476
  r,
477
- _,
477
+ D,
478
478
  m,
479
479
  p,
480
480
  h
@@ -483,16 +483,16 @@ var st = (e) => F((t) => ({
483
483
  forcedErrors: G,
484
484
  onError: i,
485
485
  resetKeys: [t, e],
486
- children: C ? /* @__PURE__ */ c(he.Provider, {
487
- value: C,
488
- children: /* @__PURE__ */ c(le, {
486
+ children: q ? /* @__PURE__ */ c(ue.Provider, {
487
+ value: q,
488
+ children: /* @__PURE__ */ c(me, {
489
489
  value: k,
490
490
  children: N
491
491
  })
492
492
  }) : null
493
493
  });
494
494
  };
495
- function yr(e) {
495
+ function br(e) {
496
496
  const t = be(e);
497
497
  return {
498
498
  ...t,
@@ -502,7 +502,7 @@ function yr(e) {
502
502
  })
503
503
  };
504
504
  }
505
- var Sr = ({ children: e, ...t }) => /* @__PURE__ */ c("svg", {
505
+ var Er = ({ children: e, ...t }) => /* @__PURE__ */ c("svg", {
506
506
  viewBox: "0 0 1 1",
507
507
  preserveAspectRatio: "none",
508
508
  width: "100%",
@@ -510,7 +510,7 @@ var Sr = ({ children: e, ...t }) => /* @__PURE__ */ c("svg", {
510
510
  pointerEvents: "none",
511
511
  ...t,
512
512
  children: e
513
- }), br = ({ box: e, children: t }) => /* @__PURE__ */ c("svg", {
513
+ }), Tr = ({ box: e, children: t }) => /* @__PURE__ */ c("svg", {
514
514
  x: L(e.x0),
515
515
  y: L(e.y0),
516
516
  width: L(e.x1 - e.x0),
@@ -530,20 +530,20 @@ var Et = "drqe3uh", Tt = "drqe3ui", re = {
530
530
  ran: "drqe3uq drqe3up",
531
531
  cached: "drqe3ur drqe3up",
532
532
  untouched: "drqe3us drqe3up"
533
- }, Er = ({ width: e = 440, style: t, className: n } = {}) => {
533
+ }, Nr = ({ width: e = 440, style: t, className: n } = {}) => {
534
534
  const { compileBus: r } = se(), [o] = T(() => We()), [a, i] = T(!1), [d, u] = T(Ne);
535
- M(() => {
535
+ x(() => {
536
536
  const { recordCompile: l } = o.getState(), p = r.getLastTrigger(), y = r.getLastCompile();
537
537
  return p && y && l(p, y), r.subscribe(l);
538
538
  }, [o, r]);
539
- const m = J(o, (l) => l.lastCompile), N = J(o, (l) => l.history), k = r.getCacheStats(), q = m === null && N.length === 0, h = () => {
539
+ const m = Q(o, (l) => l.lastCompile), N = Q(o, (l) => l.history), k = r.getCacheStats(), C = m === null && N.length === 0, h = () => {
540
540
  u((l) => {
541
541
  const p = !l;
542
- return Ce(p), p;
542
+ return qe(p), p;
543
543
  });
544
544
  };
545
545
  return /* @__PURE__ */ v("div", {
546
- className: De(ft, n),
546
+ className: we(ft, n),
547
547
  style: {
548
548
  width: e,
549
549
  ...t
@@ -556,7 +556,7 @@ var Et = "drqe3uh", Tt = "drqe3ui", re = {
556
556
  children: "compile cache"
557
557
  }), /* @__PURE__ */ c("div", {
558
558
  className: St,
559
- children: q ? "production: stats disabled" : m ? `last: ${m.label} · ${Y(m.durationMs)}` : "awaiting first compile…"
559
+ children: C ? "production: stats disabled" : m ? `last: ${m.label} · ${Y(m.durationMs)}` : "awaiting first compile…"
560
560
  })] }), /* @__PURE__ */ c("button", {
561
561
  type: "button",
562
562
  onClick: () => i((l) => !l),
@@ -577,7 +577,7 @@ var Et = "drqe3uh", Tt = "drqe3ui", re = {
577
577
  children: "next compile reflects this toggle"
578
578
  })]
579
579
  }),
580
- !a && !q && /* @__PURE__ */ v(we, { children: [/* @__PURE__ */ c(Nt, {
580
+ !a && !C && /* @__PURE__ */ v(_e, { children: [/* @__PURE__ */ c(Nt, {
581
581
  delta: m?.stages,
582
582
  durations: m?.stageDurationsMs,
583
583
  cumulative: k
@@ -615,7 +615,7 @@ var Et = "drqe3uh", Tt = "drqe3ui", re = {
615
615
  })
616
616
  ]
617
617
  }) }), /* @__PURE__ */ c("tbody", { children: j.map((r) => {
618
- const o = e?.[r], a = Ct(o);
618
+ const o = e?.[r], a = qt(o);
619
619
  return /* @__PURE__ */ v("tr", {
620
620
  className: vt,
621
621
  children: [
@@ -659,7 +659,7 @@ var Et = "drqe3uh", Tt = "drqe3ui", re = {
659
659
  className: Tt,
660
660
  children: "recent compiles"
661
661
  }), e.map((t) => {
662
- const n = qt(t.stages, (a) => a.misses > 0), r = j.length;
662
+ const n = Ct(t.stages, (a) => a.misses > 0), r = j.length;
663
663
  return /* @__PURE__ */ v("div", {
664
664
  className: ht,
665
665
  children: [
@@ -685,11 +685,11 @@ var Et = "drqe3uh", Tt = "drqe3ui", re = {
685
685
  ]
686
686
  }, t.id);
687
687
  })]
688
- }), Ct = (e) => !e || e.hits === 0 && e.misses === 0 ? "untouched" : e.misses > 0 ? "ran" : "cached", qt = (e, t) => {
688
+ }), qt = (e) => !e || e.hits === 0 && e.misses === 0 ? "untouched" : e.misses > 0 ? "ran" : "cached", Ct = (e, t) => {
689
689
  let n = 0;
690
690
  for (const r of j) t(e[r]) && (n += 1);
691
691
  return n;
692
- }, Y = (e) => e < 0.1 ? "<0.1ms" : e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`, Tr = () => {
692
+ }, Y = (e) => e < 0.1 ? "<0.1ms" : e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`, Rr = () => {
693
693
  const { history: e } = se(), { stack: t, undo: n, redo: r } = e, o = f((d) => t.subscribe(d), [t]), a = f(() => t.getSnapshot(), [t]), i = Ie(o, a, a);
694
694
  return H(() => ({
695
695
  ...i,
@@ -711,13 +711,13 @@ var Et = "drqe3uh", Tt = "drqe3ui", re = {
711
711
  "range",
712
712
  "reset",
713
713
  "submit"
714
- ]), Nr = (e, t = {}) => {
714
+ ]), qr = (e, t = {}) => {
715
715
  const { target: n, enabled: r = !0 } = t;
716
- M(() => {
716
+ x(() => {
717
717
  const o = kt(n);
718
718
  if (!r || !o) return;
719
719
  const a = (i) => {
720
- if (!It(i) || i.defaultPrevented || wt(i.target)) return;
720
+ if (!It(i) || i.defaultPrevented || _t(i.target)) return;
721
721
  const d = ge(i);
722
722
  if (!d) return;
723
723
  const u = e.current;
@@ -729,49 +729,51 @@ var Et = "drqe3uh", Tt = "drqe3ui", re = {
729
729
  n,
730
730
  r
731
731
  ]);
732
- }, kt = (e) => e === void 0 ? window : e !== null && "current" in e ? e.current : e, It = (e) => "key" in e, wt = (e) => e instanceof HTMLInputElement ? !Gt.has(e.type) : e instanceof HTMLElement ? e.isContentEditable || e.tagName === "TEXTAREA" : !1;
732
+ }, kt = (e) => e === void 0 ? window : e !== null && "current" in e ? e.current : e, It = (e) => "key" in e, _t = (e) => e instanceof HTMLInputElement ? !Gt.has(e.type) : e instanceof HTMLElement ? e.isContentEditable || e.tagName === "TEXTAREA" : !1;
733
733
  export {
734
- Ht as BrandMark,
735
- Kt as CanvasTextMeasurer,
736
- Bt as DefaultFooter,
737
- sr as DefaultGrid,
738
- Pt as DefaultHeader,
739
- er as DefaultSwatch,
740
- _t as DefaultTooltip,
741
- Er as DevToolsPanel,
742
- zt as GRAPH_MODES,
734
+ Yt as BrandMark,
735
+ At as CanvasTextMeasurer,
736
+ Ot as DefaultFooter,
737
+ cr as DefaultGrid,
738
+ Mt as DefaultHeader,
739
+ jt as DefaultSwatch,
740
+ sr as DefaultTooltip,
741
+ Nr as DevToolsPanel,
742
+ er as GRAPH_MODES,
743
743
  Le as GraphErrorBoundary,
744
744
  Z as GraphErrorPanel,
745
745
  at as GraphProvider,
746
- jt as GraphRenderer,
747
- Yt as HoverProvider,
748
- Zt as TextMeasurerProvider,
749
- Ft as ThemeProvider,
750
- br as UnitBoxSvg,
751
- Sr as UnitSpaceSvg,
752
- yr as createGraphyKit,
753
- or as darkTheme,
754
- ar as defineGeomRenderer,
755
- Vt as lightTheme,
756
- dr as lightenCss,
757
- Ke as pruneSelection,
758
- xt as resolveBrandMarkVisual,
759
- $t as stampGridEditTarget,
760
- Qt as useElementScreenRect,
761
- cr as useGeomHitTest,
762
- tr as useGeomHover,
763
- rr as useGraphCommands,
764
- Jt as useGraphHandle,
765
- Tr as useGraphHistory,
766
- Nr as useGraphHistoryShortcuts,
767
- ir as useGraphSelection,
768
- Wt as useGuidesTakePress,
769
- nr as useHandleScene,
770
- Xt as useHoverState,
771
- Ut as useSceneSelector,
772
- At as useStyleReaderTree,
773
- Mt as useStyleReaders,
774
- Ot as useStyleResolver,
775
- Lt as useTextMeasurer,
776
- ur as vars
746
+ Jt as GraphRenderer,
747
+ $t as HoverProvider,
748
+ Ut as TextMeasurerProvider,
749
+ Qt as ThemeProvider,
750
+ Tr as UnitBoxSvg,
751
+ Er as UnitSpaceSvg,
752
+ br as createGraphyKit,
753
+ dr as darkTheme,
754
+ Ht as defineGeomRenderer,
755
+ Zt as lightTheme,
756
+ Bt as lightenCss,
757
+ Oe as pruneSelection,
758
+ ur as resolveBrandMarkVisual,
759
+ Dt as stampAxisEditTarget,
760
+ rr as stampGridEditTarget,
761
+ Ft as stampLegendEditTarget,
762
+ lr as useElementScreenRect,
763
+ Wt as useGeomHitTest,
764
+ zt as useGeomHover,
765
+ nr as useGraphCommands,
766
+ tr as useGraphHandle,
767
+ Rr as useGraphHistory,
768
+ qr as useGraphHistoryShortcuts,
769
+ Xt as useGraphSelection,
770
+ xt as useGuidesTakePress,
771
+ ir as useHandleScene,
772
+ ar as useHoverState,
773
+ or as useSceneSelector,
774
+ Vt as useStyleReaderTree,
775
+ Lt as useStyleReaders,
776
+ Kt as useStyleResolver,
777
+ Pt as useTextMeasurer,
778
+ hr as vars
777
779
  };
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "visualization",
12
12
  "renderer"
13
13
  ],
14
- "version": "1.9.0-beta.1789633145847",
14
+ "version": "1.9.0-beta.1789643389031",
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.1789633145847"
58
+ "@graphysdk/viz-engine": "1.9.0-beta.1789643389031"
59
59
  },
60
60
  "peerDependencies": {
61
61
  "@tiptap/core": "^3.0.0",