@graphysdk/react-renderer 1.9.0-beta.1789377729015 → 1.9.0-beta.1789480282040

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,7 +1,7 @@
1
- import { A as Dt, At as $t, Bt as Ht, Ct as le, Dt as ue, Et as xt, Ht as ne, It as Mt, M as Pt, N as Lt, Ot as Bt, Rt as Ot, St as U, Ut as K, Vt as me, X as At, Z as Kt, _ as Ut, _t as jt, a as Ft, at as Yt, bt as he, dt as Vt, ft as Wt, gt as Xt, i as zt, it as Qt, k as Zt, kt as Jt, lt as er, n as tr, nt as rr, r as nr, s as sr, t as ge, xt as or, yt as O, zt as ir } from "./history-chords-BKKMZ3CW.js";
2
- import { n as cr } from "./theme.contract.css-Rb-GELRv.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 Ne, resolveDefinition as Re, setCompilerCachingEnabled as Te, 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 C, useSyncExternalStore as Ge } from "react";
1
+ import { A as Dt, At as $t, Bt as Ht, Ct as le, Dt as ue, Et as xt, Ht as ne, It as Mt, M as Pt, N as Lt, Ot as Bt, Rt as Ot, St as U, Ut as K, Vt as he, X as At, Z as Kt, _ as Ut, _t as jt, a as Ft, at as Yt, bt as ge, dt as Vt, ft as Wt, gt as Xt, i as zt, it as Qt, k as Zt, kt as Jt, lt as er, n as tr, nt as rr, r as nr, s as sr, t as me, xt as or, yt as O, zt as ir } from "./history-chords-B2TZO9S_.js";
2
+ import { n as cr } from "./theme.contract.css-DaZ5UPN0.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 Se, createGraphyBuilder as be, createStyleResolver as Ee, findAnnotation as Ne, findLayerById as X, isCompilerCachingEnabled as Re, resolveDefinition as Te, 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 N, useSyncExternalStore as Ge } from "react";
5
5
  import { Fragment as _e, 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";
@@ -66,12 +66,12 @@ var Le = class extends qe {
66
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
- const t = Re(e);
69
+ const t = Te(e);
70
70
  return t instanceof pe ? t : null;
71
71
  }, Oe = (e, t) => {
72
72
  const r = e.filter((n) => Ae(n, t));
73
73
  return r.length === e.length ? e : r;
74
- }, Ae = (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 = [], Ke = () => F((e) => ({
74
+ }, Ae = (e, t) => e.kind === "annotation" ? Ne(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) => ({
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 })
@@ -159,20 +159,20 @@ function Qe(e) {
159
159
  const a = /* @__PURE__ */ new Map();
160
160
  for (const c of t) {
161
161
  if ("definition" in c) continue;
162
- const u = `${c.geom}|${c.coord}`, m = a.get(u);
163
- m ? m.count += 1 : a.set(u, {
162
+ const u = `${c.geom}|${c.coord}`, h = a.get(u);
163
+ h ? h.count += 1 : a.set(u, {
164
164
  geom: c.geom,
165
165
  coord: c.coord,
166
166
  count: 1
167
167
  });
168
168
  }
169
169
  const i = [];
170
- for (const { geom: c, coord: u, count: m } of a.values())
171
- m < 2 || i.push({
170
+ for (const { geom: c, coord: u, count: h } of a.values())
171
+ h < 2 || i.push({
172
172
  kind: "user-input",
173
173
  severity: "warning",
174
174
  code: "DUPLICATE_REGISTERED_TYPE",
175
- message: `Multiple render-only overrides register ('${c}', '${u}') (${m} entries); the last in the array wins.`,
175
+ message: `Multiple render-only overrides register ('${c}', '${u}') (${h} entries); the last in the array wins.`,
176
176
  context: {
177
177
  requested: `${c}@${u}`,
178
178
  kind: "geom-renderer"
@@ -286,123 +286,123 @@ function nt(e, t) {
286
286
  requested: i.geom,
287
287
  kind: "geom-renderer"
288
288
  },
289
- suggestion: "Have the geom's manifest yield spatialKind 'render-hit-test' so the compiled layer carries the `byKey` index the overlay's `pushHover` resolves against."
289
+ suggestion: "Have the geom's manifest yield spatialKind 'render-hit-test' so the scene layer carries the `byKey` index the overlay's `pushHover` resolves against."
290
290
  }));
291
291
  }
292
292
  return a;
293
293
  }
294
294
  var st = (e) => F((t) => ({
295
- compiled: e,
296
- setCompiled: (r) => t((n) => n.compiled === r ? n : { compiled: r })
297
- })), ot = ({ input: e, data: t, customPalettes: r, colorScheme: n, plugins: o, resolveRenderer: a, anchorResolver: i, onChange: c, onError: u, onWarnings: m }) => {
298
- const N = O(c), k = O(u), q = O(m), [{ session: h, compileBus: l }] = C(() => {
299
- const s = be({ plugins: o });
295
+ scene: e,
296
+ setScene: (r) => t((n) => n.scene === r ? n : { scene: r })
297
+ })), ot = ({ input: e, data: t, customPalettes: r, colorScheme: n, plugins: o, resolveRenderer: a, anchorResolver: i, onChange: c, onError: u, onWarnings: h }) => {
298
+ const R = O(c), k = O(u), q = O(h), [{ session: g, compileBus: l }] = N(() => {
299
+ const s = Se({ plugins: o });
300
300
  return {
301
301
  session: new fe(s),
302
302
  compileBus: Ye(s)
303
303
  };
304
- }), [p] = C(() => Qe(o ?? [])), y = z(null), [G] = C(it), R = z(null), b = f((s) => p.errors.length === 0 ? s : [...p.errors, ...s ?? []], [p]), w = f((s) => {
304
+ }), [p] = N(() => Qe(o ?? [])), y = z(null), [G] = N(it), T = z(null), S = f((s) => p.errors.length === 0 ? s : [...p.errors, ...s ?? []], [p]), w = f((s) => {
305
305
  if (!s.ok) return s.errors;
306
- if (R.current) R.current.getState().setCompiled(s.compiled);
306
+ if (T.current) T.current.getState().setScene(s.scene);
307
307
  else {
308
- const g = st(s.compiled);
309
- g.subscribe(G.notify), R.current = g, G.notify();
308
+ const m = st(s.scene);
309
+ m.subscribe(G.notify), T.current = m, G.notify();
310
310
  }
311
311
  return null;
312
- }, [G]), [x, D] = C(() => {
313
- const s = h.compile({
312
+ }, [G]), [x, D] = N(() => {
313
+ const s = g.compile({
314
314
  input: e,
315
315
  data: t,
316
316
  customPalettes: r,
317
317
  colorScheme: n
318
318
  });
319
- return y.current = s, b(w(s));
319
+ return y.current = s, S(w(s));
320
320
  }), I = f((s) => s.ok ? [
321
321
  ...s.warnings,
322
- ...Ze(s.compiled, a),
323
- ...Je(s.compiled, a),
324
- ...et(s.compiled),
325
- ...tt(s.compiled, a),
326
- ...nt(s.compiled, a),
327
- ...rt(s.compiled, i)
328
- ] : s.warnings, [a, i]), S = f((s) => {
322
+ ...Ze(s.scene, a),
323
+ ...Je(s.scene, a),
324
+ ...et(s.scene),
325
+ ...tt(s.scene, a),
326
+ ...nt(s.scene, a),
327
+ ...rt(s.scene, i)
328
+ ] : s.warnings, [a, i]), b = f((s) => {
329
329
  s.length !== 0 && (K(s), k.current?.(s));
330
- }, [k]), T = f((s) => {
330
+ }, [k]), C = f((s) => {
331
331
  s.length !== 0 && (K(s), q.current?.(s));
332
332
  }, [q]);
333
333
  H(() => {
334
334
  const s = y.current;
335
- s && (S([...p.errors, ...s.ok ? [] : s.errors]), T([...p.warnings, ...I(s)]), s.ok && l.emit({ kind: "init" }));
335
+ s && (b([...p.errors, ...s.ok ? [] : s.errors]), C([...p.warnings, ...I(s)]), s.ok && l.emit({ kind: "init" }));
336
336
  }, [
337
337
  l,
338
- S,
339
- T,
338
+ b,
339
+ C,
340
340
  p,
341
341
  I
342
342
  ]), H(() => {
343
- const s = h.update({
343
+ const s = g.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 && N.current?.(s.sealedInput);
351
- const g = w(s.result);
352
- D(b(g)), g && S(g), T(I(s.result)), g || l.emit({ kind: s.inputChanged ? "input" : "data" });
350
+ s.sealedInput && R.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" });
353
353
  }, [
354
354
  e,
355
355
  t,
356
356
  r,
357
357
  n,
358
- h,
358
+ g,
359
359
  l,
360
360
  w,
361
- S,
362
- T,
363
361
  b,
362
+ C,
363
+ S,
364
364
  I,
365
- N
365
+ R
366
366
  ]);
367
367
  const _ = f((s) => {
368
- D((g) => g === null ? g : b(null)), T(I(s));
368
+ D((m) => m === null ? m : S(null)), C(I(s));
369
369
  }, [
370
- b,
371
- T,
370
+ S,
371
+ C,
372
372
  I
373
373
  ]), M = f((s) => {
374
- s.compiled && R.current?.getState().setCompiled(s.compiled), s.result && _(s.result), s.command && l.emit({
374
+ s.scene && T.current?.getState().setScene(s.scene), s.result && _(s.result), s.command && l.emit({
375
375
  kind: "command",
376
376
  command: s.command
377
- }), s.input && N.current?.(s.input), s.errors && S([...s.errors]);
377
+ }), s.input && R.current?.(s.input), s.errors && b([...s.errors]);
378
378
  }, [
379
379
  _,
380
380
  l,
381
- N,
382
- S
381
+ R,
382
+ b
383
383
  ]), E = f((s) => {
384
- for (const g of s) M(g);
385
- return s.some((g) => !!g.compiled);
386
- }, [M]), B = f((s, g) => {
387
- E(h.applyCommand(s, g));
388
- }, [h, E]), ae = f(() => {
389
- E(h.seal());
390
- }, [h, E]), Y = f(() => E(h.undo()), [h, E]), V = f(() => E(h.redo()), [h, E]), ce = $(() => ({
391
- stack: h.history,
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]), V = f(() => E(g.redo()), [g, E]), ce = $(() => ({
391
+ stack: g.history,
392
392
  undo: Y,
393
393
  redo: V
394
394
  }), [
395
- h,
395
+ g,
396
396
  Y,
397
397
  V
398
- ]), de = f(() => R.current?.getState().compiled ?? null, []);
398
+ ]), de = f(() => T.current?.getState().scene ?? null, []);
399
399
  return {
400
- store: R.current,
400
+ store: T.current,
401
401
  dispatch: B,
402
402
  seal: ae,
403
403
  history: ce,
404
404
  subscribe: G.subscribe,
405
- getCompiled: de,
405
+ getScene: de,
406
406
  compileBus: l,
407
407
  compileErrors: x
408
408
  };
@@ -414,15 +414,15 @@ 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: m = "light", children: N }) => {
418
- const [k] = C(() => he(r.filter(se))), q = Ie(), [h] = C(() => ye(r)), [l] = C(() => Ke()), p = $(() => Ee({ colorScheme: m }), [m]), { store: y, dispatch: G, seal: R, history: b, subscribe: w, getCompiled: 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: R }) => {
418
+ const [k] = N(() => ge(r.filter(se))), q = Ie(), [g] = N(() => ye(r)), [l] = N(() => Ke()), p = $(() => Ee({ colorScheme: h }), [h]), { store: y, dispatch: G, seal: T, history: S, subscribe: w, getScene: x, compileBus: D, compileErrors: I } = ot({
419
419
  input: t,
420
420
  data: e,
421
421
  customPalettes: u,
422
- colorScheme: m,
422
+ colorScheme: h,
423
423
  plugins: r,
424
424
  resolveRenderer: k,
425
- anchorResolver: h,
425
+ anchorResolver: g,
426
426
  onChange: a,
427
427
  onError: i,
428
428
  onWarnings: c
@@ -430,69 +430,69 @@ var st = (e) => F((t) => ({
430
430
  H(() => {
431
431
  if (y)
432
432
  return y.subscribe((_, M) => {
433
- if (_.compiled.spec === M.compiled.spec) return;
433
+ if (_.scene.spec === M.scene.spec) return;
434
434
  const { selection: E, setSelection: B } = l.getState();
435
- E.length !== 0 && B(Oe(E, _.compiled.spec));
435
+ E.length !== 0 && B(Oe(E, _.scene.spec));
436
436
  });
437
437
  }, [y, l]);
438
- const S = $(() => ({
438
+ const b = $(() => ({
439
439
  dispatch: G,
440
- seal: R
441
- }), [G, R]);
440
+ seal: T
441
+ }), [G, T]);
442
442
  ke(o, () => ({
443
- commands: S,
444
- undo: b.undo,
445
- redo: b.redo,
443
+ commands: b,
444
+ undo: S.undo,
445
+ redo: S.redo,
446
446
  subscribe: w,
447
- getCompiled: x,
447
+ getScene: x,
448
448
  getSelection: () => l.getState().selection,
449
449
  setSelection: (_) => l.getState().setSelection(_),
450
450
  subscribeSelection: l.subscribe
451
451
  }), [
452
- S,
453
452
  b,
453
+ S,
454
454
  w,
455
455
  x,
456
456
  l
457
457
  ]);
458
- const T = $(() => y ? {
458
+ const C = $(() => y ? {
459
459
  chartId: q,
460
460
  store: y,
461
461
  selectionStore: l,
462
- commands: S,
463
- history: b,
462
+ commands: b,
463
+ history: S,
464
464
  formattingLocale: n,
465
465
  compileBus: D,
466
- colorScheme: m,
466
+ colorScheme: h,
467
467
  styleResolver: p,
468
- anchorResolver: h
468
+ anchorResolver: g
469
469
  } : null, [
470
470
  q,
471
471
  y,
472
472
  l,
473
- S,
474
473
  b,
474
+ S,
475
475
  n,
476
476
  D,
477
- m,
477
+ h,
478
478
  p,
479
- h
479
+ g
480
480
  ]);
481
481
  return /* @__PURE__ */ d(Le, {
482
482
  forcedErrors: I,
483
483
  onError: i,
484
484
  resetKeys: [t, e],
485
- children: T ? /* @__PURE__ */ d(me.Provider, {
486
- value: T,
485
+ children: C ? /* @__PURE__ */ d(he.Provider, {
486
+ value: C,
487
487
  children: /* @__PURE__ */ d(ue, {
488
488
  value: k,
489
- children: N
489
+ children: R
490
490
  })
491
491
  }) : null
492
492
  });
493
493
  };
494
494
  function pr(e) {
495
- const t = Se(e);
495
+ const t = be(e);
496
496
  return {
497
497
  ...t,
498
498
  GraphProvider: (n) => /* @__PURE__ */ d(at, {
@@ -517,9 +517,9 @@ var fr = ({ 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", mt = "drqe3u5", ht = "drqe3u6", gt = "drqe3u7", A = "drqe3u8", pt = "drqe3u9", ft = "drqe3ua";
521
- var vt = "drqe3uc", yt = "drqe3ud", bt = "drqe3ue", St = "drqe3uf";
522
- var Et = "drqe3uh", Ct = "drqe3ui", te = {
520
+ }), ct = "drqe3u0", dt = "drqe3u1", lt = "drqe3u2", ut = "drqe3u3", L = "drqe3u4", ht = "drqe3u5", gt = "drqe3u6", mt = "drqe3u7", A = "drqe3u8", pt = "drqe3u9", ft = "drqe3ua";
521
+ var vt = "drqe3uc", yt = "drqe3ud", St = "drqe3ue", bt = "drqe3uf";
522
+ var Et = "drqe3uh", Nt = "drqe3ui", te = {
523
523
  enabled: "drqe3uk drqe3uj",
524
524
  disabled: "drqe3ul drqe3uj"
525
525
  }, re = {
@@ -530,15 +530,15 @@ var Et = "drqe3uh", Ct = "drqe3ui", te = {
530
530
  cached: "drqe3ur drqe3up",
531
531
  untouched: "drqe3us drqe3up"
532
532
  }, yr = ({ width: e = 380, style: t, className: r } = {}) => {
533
- const { compileBus: n } = ne(), [o] = C(() => Ve()), [a, i] = C(!1), [c, u] = C(Ne);
533
+ const { compileBus: n } = ne(), [o] = N(() => Ve()), [a, i] = N(!1), [c, u] = N(Re);
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 m = Q(o, (l) => l.lastCompile), N = Q(o, (l) => l.history), k = n.getCacheStats(), q = m === null && N.length === 0, h = () => {
538
+ const h = Q(o, (l) => l.lastCompile), R = Q(o, (l) => l.history), k = n.getCacheStats(), q = h === null && R.length === 0, g = () => {
539
539
  u((l) => {
540
540
  const p = !l;
541
- return Te(p), p;
541
+ return Ce(p), p;
542
542
  });
543
543
  };
544
544
  return /* @__PURE__ */ v("div", {
@@ -554,12 +554,12 @@ var Et = "drqe3uh", Ct = "drqe3ui", te = {
554
554
  className: dt,
555
555
  children: "compile cache"
556
556
  }), /* @__PURE__ */ d("div", {
557
- className: bt,
558
- children: q ? "production: stats disabled" : m ? `last: ${m.label} · ${ie(m.durationMs)}` : "awaiting first compile…"
557
+ className: St,
558
+ children: q ? "production: stats disabled" : h ? `last: ${h.label} · ${ie(h.durationMs)}` : "awaiting first compile…"
559
559
  })] }), /* @__PURE__ */ d("button", {
560
560
  type: "button",
561
561
  onClick: () => i((l) => !l),
562
- className: St,
562
+ className: bt,
563
563
  children: a ? "▾" : "▴"
564
564
  })]
565
565
  }),
@@ -567,7 +567,7 @@ var Et = "drqe3uh", Ct = "drqe3ui", te = {
567
567
  className: "drqe3ub",
568
568
  children: [/* @__PURE__ */ v("button", {
569
569
  type: "button",
570
- onClick: h,
570
+ onClick: g,
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", Ct = "drqe3ui", te = {
576
576
  children: "next compile reflects this toggle"
577
577
  })]
578
578
  }),
579
- !a && !q && /* @__PURE__ */ v(_e, { children: [/* @__PURE__ */ d(Nt, {
580
- delta: m?.stages,
579
+ !a && !q && /* @__PURE__ */ v(_e, { children: [/* @__PURE__ */ d(Rt, {
580
+ delta: h?.stages,
581
581
  cumulative: k
582
- }), /* @__PURE__ */ d(Rt, { entries: N })] })
582
+ }), /* @__PURE__ */ d(Tt, { entries: R })] })
583
583
  ]
584
584
  });
585
- }, Nt = ({ delta: e, cumulative: t }) => /* @__PURE__ */ v("table", {
585
+ }, Rt = ({ 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,
@@ -609,12 +609,12 @@ var Et = "drqe3uh", Ct = "drqe3ui", te = {
609
609
  })
610
610
  ]
611
611
  }) }), /* @__PURE__ */ d("tbody", { children: j.map((r) => {
612
- const n = e?.[r], o = Tt(n);
612
+ const n = e?.[r], o = Ct(n);
613
613
  return /* @__PURE__ */ v("tr", {
614
614
  className: vt,
615
615
  children: [
616
616
  /* @__PURE__ */ v("td", {
617
- className: mt,
617
+ className: ht,
618
618
  children: [
619
619
  /* @__PURE__ */ d("span", {
620
620
  className: oe[o],
@@ -643,22 +643,22 @@ var Et = "drqe3uh", Ct = "drqe3ui", te = {
643
643
  ]
644
644
  }, r);
645
645
  }) })]
646
- }), Rt = ({ entries: e }) => e.length === 0 ? null : /* @__PURE__ */ v("div", {
646
+ }), Tt = ({ entries: e }) => e.length === 0 ? null : /* @__PURE__ */ v("div", {
647
647
  className: yt,
648
648
  children: [/* @__PURE__ */ d("div", {
649
- className: Ct,
649
+ className: Nt,
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: ht,
654
+ className: gt,
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: gt,
661
+ className: mt,
662
662
  title: t.label,
663
663
  children: t.label
664
664
  }),
@@ -675,11 +675,11 @@ var Et = "drqe3uh", Ct = "drqe3ui", te = {
675
675
  ]
676
676
  }, t.id);
677
677
  })]
678
- }), Tt = (e) => !e || e.hits === 0 && e.misses === 0 ? "untouched" : e.misses > 0 ? "ran" : "cached", qt = (e, t) => {
678
+ }), Ct = (e) => !e || e.hits === 0 && e.misses === 0 ? "untouched" : e.misses > 0 ? "ran" : "cached", qt = (e, t) => {
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 = () => {
682
+ }, ie = (e) => e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`, Sr = () => {
683
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);
684
684
  return $(() => ({
685
685
  ...i,
@@ -701,14 +701,14 @@ var Et = "drqe3uh", Ct = "drqe3ui", te = {
701
701
  "range",
702
702
  "reset",
703
703
  "submit"
704
- ]), Sr = (e, t = {}) => {
704
+ ]), br = (e, t = {}) => {
705
705
  const { target: r, enabled: n = !0 } = t;
706
706
  H(() => {
707
707
  const o = kt(r);
708
708
  if (!n || !o) return;
709
709
  const a = (i) => {
710
710
  if (!Gt(i) || i.defaultPrevented || _t(i.target)) return;
711
- const c = ge(i);
711
+ const c = me(i);
712
712
  if (!c) return;
713
713
  const u = e.current;
714
714
  u && (c === "undo" ? u.undo() : u.redo()) && i.preventDefault();
@@ -746,17 +746,17 @@ export {
746
746
  Mt as lightenCss,
747
747
  Oe as pruneSelection,
748
748
  Lt as resolveBrandMarkVisual,
749
- Ht as useCompiledSelector,
750
749
  Wt as useElementScreenRect,
751
750
  Xt as useGeomHitTest,
752
751
  Vt as useGeomHover,
753
752
  tr as useGraphCommands,
754
753
  zt as useGraphHandle,
755
- br as useGraphHistory,
756
- Sr as useGraphHistoryShortcuts,
754
+ Sr as useGraphHistory,
755
+ br as useGraphHistoryShortcuts,
757
756
  Ut as useGraphSelection,
758
- nr as useHandleCompiled,
757
+ nr as useHandleScene,
759
758
  Kt as useHoverState,
759
+ Ht as useSceneSelector,
760
760
  Ot as useStyleReaders,
761
761
  ir as useStyleResolver,
762
762
  Jt as useTextMeasurer,
@@ -0,0 +1 @@
1
+
@@ -1,4 +1,4 @@
1
- var a = [
1
+ import './theme.contract.css';var a = [
2
2
  "canvasDefault",
3
3
  "canvasBlue",
4
4
  "canvasCyan",
@@ -14,17 +14,17 @@ var a = [
14
14
  white: "var(--graphy-white)",
15
15
  black: "var(--graphy-black)",
16
16
  transparent: "var(--graphy-transparent)",
17
- grey100: "var(--graphy-grey-100)",
18
- grey95: "var(--graphy-grey-95)",
19
- grey90: "var(--graphy-grey-90)",
20
- grey85: "var(--graphy-grey-85)",
21
- grey80: "var(--graphy-grey-80)",
22
- grey75: "var(--graphy-grey-75)",
23
- grey70: "var(--graphy-grey-70)",
24
- grey60: "var(--graphy-grey-60)",
25
- grey50: "var(--graphy-grey-50)",
26
- grey0: "var(--graphy-grey-0)",
27
- greyGradient80: "var(--graphy-grey-gradient-80)",
17
+ gray100: "var(--graphy-gray-100)",
18
+ gray95: "var(--graphy-gray-95)",
19
+ gray90: "var(--graphy-gray-90)",
20
+ gray85: "var(--graphy-gray-85)",
21
+ gray80: "var(--graphy-gray-80)",
22
+ gray75: "var(--graphy-gray-75)",
23
+ gray70: "var(--graphy-gray-70)",
24
+ gray60: "var(--graphy-gray-60)",
25
+ gray50: "var(--graphy-gray-50)",
26
+ gray0: "var(--graphy-gray-0)",
27
+ grayGradient80: "var(--graphy-gray-gradient-80)",
28
28
  green60: "var(--graphy-green-60)",
29
29
  green50: "var(--graphy-green-50)",
30
30
  red60: "var(--graphy-red-60)",
@@ -0,0 +1 @@
1
+ require('./theme.contract.css');var a=["canvasDefault","canvasBlue","canvasCyan","canvasGreen","canvasYellow","canvasOrange","canvasRed","canvasPink","canvasPurple","canvasGray","canvasInverse"],r={white:"var(--graphy-white)",black:"var(--graphy-black)",transparent:"var(--graphy-transparent)",gray100:"var(--graphy-gray-100)",gray95:"var(--graphy-gray-95)",gray90:"var(--graphy-gray-90)",gray85:"var(--graphy-gray-85)",gray80:"var(--graphy-gray-80)",gray75:"var(--graphy-gray-75)",gray70:"var(--graphy-gray-70)",gray60:"var(--graphy-gray-60)",gray50:"var(--graphy-gray-50)",gray0:"var(--graphy-gray-0)",grayGradient80:"var(--graphy-gray-gradient-80)",green60:"var(--graphy-green-60)",green50:"var(--graphy-green-50)",red60:"var(--graphy-red-60)",red50:"var(--graphy-red-50)",amber70:"var(--graphy-amber-70)",amber50:"var(--graphy-amber-50)",amber40:"var(--graphy-amber-40)",amber30:"var(--graphy-amber-30)",blue80:"var(--graphy-blue-80)",blue60:"var(--graphy-blue-60)",purple50:"var(--graphy-purple-50)",purple30:"var(--graphy-purple-30)",brand:"var(--graphy-brand)",success:"var(--graphy-success)",warning:"var(--graphy-warning)",alert:"var(--graphy-alert)",textPrimary:"var(--graphy-text-primary)",textSecondary:"var(--graphy-text-secondary)",textDisabled:"var(--graphy-text-disabled)",iconPrimary:"var(--graphy-icon-primary)",iconSecondary:"var(--graphy-icon-secondary)",iconStickerBackground:"var(--graphy-icon-sticker-background)",border100:"var(--graphy-border-100)",border50:"var(--graphy-border-50)",border10:"var(--graphy-border-10)",sunkenBackground:"var(--graphy-sunken-background)",defaultBackground:"var(--graphy-default-background)",raisedBackground:"var(--graphy-raised-background)",overlayBackground:"var(--graphy-overlay-background)",overlayBorderGradient:"var(--graphy-overlay-border-gradient)",graphBackground:"var(--graphy-graph-background)",legendFocusOutlineColor:"var(--graphy-legend-focus-outline-color)",annotationFrameBorderColor:"var(--graphy-annotation-frame-border-color)",editMenuTriggerIconColor:"var(--graphy-edit-menu-trigger-icon-color)",tooltipRowGap:"var(--graphy-tooltip-row-gap)",editorControlHeight:"var(--graphy-editor-control-height)",legendSwatchGap:"var(--graphy-legend-swatch-gap)",headlineRowGap:"var(--graphy-headline-row-gap)",canvasDefault:"var(--graphy-canvas-default)",canvasBlue:"var(--graphy-canvas-blue)",canvasCyan:"var(--graphy-canvas-cyan)",canvasGreen:"var(--graphy-canvas-green)",canvasYellow:"var(--graphy-canvas-yellow)",canvasOrange:"var(--graphy-canvas-orange)",canvasRed:"var(--graphy-canvas-red)",canvasPink:"var(--graphy-canvas-pink)",canvasPurple:"var(--graphy-canvas-purple)",canvasGray:"var(--graphy-canvas-gray)",canvasInverse:"var(--graphy-canvas-inverse)",elevationXs:"var(--graphy-elevation-xs)",elevationSm:"var(--graphy-elevation-sm)",elevationMd:"var(--graphy-elevation-md)",elevationLg:"var(--graphy-elevation-lg)",radiiXs:"var(--graphy-radii-xs)",radiiSm:"var(--graphy-radii-sm)",radiiMd:"var(--graphy-radii-md)",radiiLg:"var(--graphy-radii-lg)",spaceXxs:"var(--graphy-space-xxs)",spaceXs:"var(--graphy-space-xs)",spaceSm:"var(--graphy-space-sm)",spaceMd:"var(--graphy-space-md)",spaceLg:"var(--graphy-space-lg)",spaceXl:"var(--graphy-space-xl)",zIndexToolbar:"var(--graphy-z-index-toolbar)",zIndexToolbarTooltip:"var(--graphy-z-index-toolbar-tooltip)",zIndexToolbarPopover:"var(--graphy-z-index-toolbar-popover)",zIndexEditorPopover:"var(--graphy-z-index-editor-popover)",toolbarBackgroundColor:"var(--graphy-toolbar-background-color)",toolbarButtonBackgroundColor:"var(--graphy-toolbar-button-background-color)",toolbarButtonBackgroundColorHovered:"var(--graphy-toolbar-button-background-color-hovered)",toolbarButtonBackgroundColorSelected:"var(--graphy-toolbar-button-background-color-selected)",toolbarSeparatorColor:"var(--graphy-toolbar-separator-color)",fontFamily:"var(--graphy-font-family)",fontFamilyHeading:"var(--graphy-font-family-heading)",fontWeightRegular:"var(--graphy-font-weight-regular)",fontWeightMedium:"var(--graphy-font-weight-medium)",fontWeightSemibold:"var(--graphy-font-weight-semibold)",fontWeightBold:"var(--graphy-font-weight-bold)",fontWeightExtraBold:"var(--graphy-font-weight-extra-bold)",textScale:"var(--graphy-text-scale)",fontSizeXxs:"var(--graphy-font-size-xxs)",fontSizeXs:"var(--graphy-font-size-xs)",fontSizeSm:"var(--graphy-font-size-sm)",fontSizeMd:"var(--graphy-font-size-md)",fontSizeLg:"var(--graphy-font-size-lg)",fontSizeXl:"var(--graphy-font-size-xl)",fontLineHeightXxs:"var(--graphy-font-line-height-xxs)",fontLineHeightXs:"var(--graphy-font-line-height-xs)",fontLineHeightSm:"var(--graphy-font-line-height-sm)",fontLineHeightMd:"var(--graphy-font-line-height-md)",fontLineHeightLg:"var(--graphy-font-line-height-lg)",fontLineHeightXl:"var(--graphy-font-line-height-xl)",fontSizeEditorBody:"var(--graphy-font-size-editor-body)",fontSizeHeadingSm:"var(--graphy-font-size-heading-sm)",fontSizeHeadingMd:"var(--graphy-font-size-heading-md)",fontSizeHeadingLg:"var(--graphy-font-size-heading-lg)",fontLineHeightEditorBody:"var(--graphy-font-line-height-editor-body)",fontLineHeightHeadingSm:"var(--graphy-font-line-height-heading-sm)",fontLineHeightHeadingMd:"var(--graphy-font-line-height-heading-md)",fontLineHeightHeadingLg:"var(--graphy-font-line-height-heading-lg)",fontButton:"var(--graphy-font-button)",fontInput:"var(--graphy-font-input)",fontInputLabel:"var(--graphy-font-input-label)",fontSelectLabel:"var(--graphy-font-select-label)",fontSelectDescription:"var(--graphy-font-select-description)",fontColorSelectLabel:"var(--graphy-font-color-select-label)",fontMenuTitle:"var(--graphy-font-menu-title)",fontMenuGroupTitle:"var(--graphy-font-menu-group-title)",fontMenuItemLabel:"var(--graphy-font-menu-item-label)",fontMenuItemLabelSecondary:"var(--graphy-font-menu-item-label-secondary)",fontUITooltip:"var(--graphy-font-uitooltip)",fontUITooltipSecondary:"var(--graphy-font-uitooltip-secondary)",fontErrorBoundaryTitle:"var(--graphy-font-error-boundary-title)",fontErrorBoundaryMessage:"var(--graphy-font-error-boundary-message)",fontTableCell:"var(--graphy-font-table-cell)",fontTableHeaderCell:"var(--graphy-font-table-header-cell)",fontSourceLabel:"var(--graphy-font-source-label)",fontSourceLink:"var(--graphy-font-source-link)",fontTextEditorH1:"var(--graphy-font-text-editor-h1)",fontTextEditorH2:"var(--graphy-font-text-editor-h2)",fontTextEditorH3:"var(--graphy-font-text-editor-h3)",fontTextEditorH6:"var(--graphy-font-text-editor-h6)",fontTextEditorBody:"var(--graphy-font-text-editor-body)",fontTextEditorLink:"var(--graphy-font-text-editor-link)",fontHighlightModeTitle:"var(--graphy-font-highlight-mode-title)",fontHighlightModeSubtitle:"var(--graphy-font-highlight-mode-subtitle)",fontEditorControlLabel:"var(--graphy-font-editor-control-label)",fontEditorControlValue:"var(--graphy-font-editor-control-value)",fontEditorSectionTitle:"var(--graphy-font-editor-section-title)",fontEditorCaption:"var(--graphy-font-editor-caption)"};Object.defineProperty(exports,"CANVAS_COLOR_KEYS",{enumerable:!0,get:function(){return a}});Object.defineProperty(exports,"vars",{enumerable:!0,get:function(){return r}});
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "visualization",
12
12
  "renderer"
13
13
  ],
14
- "version": "1.9.0-beta.1789377729015",
14
+ "version": "1.9.0-beta.1789480282040",
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.1789377729015"
58
+ "@graphysdk/viz-engine": "1.9.0-beta.1789480282040"
59
59
  },
60
60
  "peerDependencies": {
61
61
  "@tiptap/core": "^3.0.0",
@@ -1 +0,0 @@
1
- var r=["canvasDefault","canvasBlue","canvasCyan","canvasGreen","canvasYellow","canvasOrange","canvasRed","canvasPink","canvasPurple","canvasGray","canvasInverse"],a={white:"var(--graphy-white)",black:"var(--graphy-black)",transparent:"var(--graphy-transparent)",grey100:"var(--graphy-grey-100)",grey95:"var(--graphy-grey-95)",grey90:"var(--graphy-grey-90)",grey85:"var(--graphy-grey-85)",grey80:"var(--graphy-grey-80)",grey75:"var(--graphy-grey-75)",grey70:"var(--graphy-grey-70)",grey60:"var(--graphy-grey-60)",grey50:"var(--graphy-grey-50)",grey0:"var(--graphy-grey-0)",greyGradient80:"var(--graphy-grey-gradient-80)",green60:"var(--graphy-green-60)",green50:"var(--graphy-green-50)",red60:"var(--graphy-red-60)",red50:"var(--graphy-red-50)",amber70:"var(--graphy-amber-70)",amber50:"var(--graphy-amber-50)",amber40:"var(--graphy-amber-40)",amber30:"var(--graphy-amber-30)",blue80:"var(--graphy-blue-80)",blue60:"var(--graphy-blue-60)",purple50:"var(--graphy-purple-50)",purple30:"var(--graphy-purple-30)",brand:"var(--graphy-brand)",success:"var(--graphy-success)",warning:"var(--graphy-warning)",alert:"var(--graphy-alert)",textPrimary:"var(--graphy-text-primary)",textSecondary:"var(--graphy-text-secondary)",textDisabled:"var(--graphy-text-disabled)",iconPrimary:"var(--graphy-icon-primary)",iconSecondary:"var(--graphy-icon-secondary)",iconStickerBackground:"var(--graphy-icon-sticker-background)",border100:"var(--graphy-border-100)",border50:"var(--graphy-border-50)",border10:"var(--graphy-border-10)",sunkenBackground:"var(--graphy-sunken-background)",defaultBackground:"var(--graphy-default-background)",raisedBackground:"var(--graphy-raised-background)",overlayBackground:"var(--graphy-overlay-background)",overlayBorderGradient:"var(--graphy-overlay-border-gradient)",graphBackground:"var(--graphy-graph-background)",legendFocusOutlineColor:"var(--graphy-legend-focus-outline-color)",annotationFrameBorderColor:"var(--graphy-annotation-frame-border-color)",editMenuTriggerIconColor:"var(--graphy-edit-menu-trigger-icon-color)",tooltipRowGap:"var(--graphy-tooltip-row-gap)",editorControlHeight:"var(--graphy-editor-control-height)",legendSwatchGap:"var(--graphy-legend-swatch-gap)",headlineRowGap:"var(--graphy-headline-row-gap)",canvasDefault:"var(--graphy-canvas-default)",canvasBlue:"var(--graphy-canvas-blue)",canvasCyan:"var(--graphy-canvas-cyan)",canvasGreen:"var(--graphy-canvas-green)",canvasYellow:"var(--graphy-canvas-yellow)",canvasOrange:"var(--graphy-canvas-orange)",canvasRed:"var(--graphy-canvas-red)",canvasPink:"var(--graphy-canvas-pink)",canvasPurple:"var(--graphy-canvas-purple)",canvasGray:"var(--graphy-canvas-gray)",canvasInverse:"var(--graphy-canvas-inverse)",elevationXs:"var(--graphy-elevation-xs)",elevationSm:"var(--graphy-elevation-sm)",elevationMd:"var(--graphy-elevation-md)",elevationLg:"var(--graphy-elevation-lg)",radiiXs:"var(--graphy-radii-xs)",radiiSm:"var(--graphy-radii-sm)",radiiMd:"var(--graphy-radii-md)",radiiLg:"var(--graphy-radii-lg)",spaceXxs:"var(--graphy-space-xxs)",spaceXs:"var(--graphy-space-xs)",spaceSm:"var(--graphy-space-sm)",spaceMd:"var(--graphy-space-md)",spaceLg:"var(--graphy-space-lg)",spaceXl:"var(--graphy-space-xl)",zIndexToolbar:"var(--graphy-z-index-toolbar)",zIndexToolbarTooltip:"var(--graphy-z-index-toolbar-tooltip)",zIndexToolbarPopover:"var(--graphy-z-index-toolbar-popover)",zIndexEditorPopover:"var(--graphy-z-index-editor-popover)",toolbarBackgroundColor:"var(--graphy-toolbar-background-color)",toolbarButtonBackgroundColor:"var(--graphy-toolbar-button-background-color)",toolbarButtonBackgroundColorHovered:"var(--graphy-toolbar-button-background-color-hovered)",toolbarButtonBackgroundColorSelected:"var(--graphy-toolbar-button-background-color-selected)",toolbarSeparatorColor:"var(--graphy-toolbar-separator-color)",fontFamily:"var(--graphy-font-family)",fontFamilyHeading:"var(--graphy-font-family-heading)",fontWeightRegular:"var(--graphy-font-weight-regular)",fontWeightMedium:"var(--graphy-font-weight-medium)",fontWeightSemibold:"var(--graphy-font-weight-semibold)",fontWeightBold:"var(--graphy-font-weight-bold)",fontWeightExtraBold:"var(--graphy-font-weight-extra-bold)",textScale:"var(--graphy-text-scale)",fontSizeXxs:"var(--graphy-font-size-xxs)",fontSizeXs:"var(--graphy-font-size-xs)",fontSizeSm:"var(--graphy-font-size-sm)",fontSizeMd:"var(--graphy-font-size-md)",fontSizeLg:"var(--graphy-font-size-lg)",fontSizeXl:"var(--graphy-font-size-xl)",fontLineHeightXxs:"var(--graphy-font-line-height-xxs)",fontLineHeightXs:"var(--graphy-font-line-height-xs)",fontLineHeightSm:"var(--graphy-font-line-height-sm)",fontLineHeightMd:"var(--graphy-font-line-height-md)",fontLineHeightLg:"var(--graphy-font-line-height-lg)",fontLineHeightXl:"var(--graphy-font-line-height-xl)",fontSizeEditorBody:"var(--graphy-font-size-editor-body)",fontSizeHeadingSm:"var(--graphy-font-size-heading-sm)",fontSizeHeadingMd:"var(--graphy-font-size-heading-md)",fontSizeHeadingLg:"var(--graphy-font-size-heading-lg)",fontLineHeightEditorBody:"var(--graphy-font-line-height-editor-body)",fontLineHeightHeadingSm:"var(--graphy-font-line-height-heading-sm)",fontLineHeightHeadingMd:"var(--graphy-font-line-height-heading-md)",fontLineHeightHeadingLg:"var(--graphy-font-line-height-heading-lg)",fontButton:"var(--graphy-font-button)",fontInput:"var(--graphy-font-input)",fontInputLabel:"var(--graphy-font-input-label)",fontSelectLabel:"var(--graphy-font-select-label)",fontSelectDescription:"var(--graphy-font-select-description)",fontColorSelectLabel:"var(--graphy-font-color-select-label)",fontMenuTitle:"var(--graphy-font-menu-title)",fontMenuGroupTitle:"var(--graphy-font-menu-group-title)",fontMenuItemLabel:"var(--graphy-font-menu-item-label)",fontMenuItemLabelSecondary:"var(--graphy-font-menu-item-label-secondary)",fontUITooltip:"var(--graphy-font-uitooltip)",fontUITooltipSecondary:"var(--graphy-font-uitooltip-secondary)",fontErrorBoundaryTitle:"var(--graphy-font-error-boundary-title)",fontErrorBoundaryMessage:"var(--graphy-font-error-boundary-message)",fontTableCell:"var(--graphy-font-table-cell)",fontTableHeaderCell:"var(--graphy-font-table-header-cell)",fontSourceLabel:"var(--graphy-font-source-label)",fontSourceLink:"var(--graphy-font-source-link)",fontTextEditorH1:"var(--graphy-font-text-editor-h1)",fontTextEditorH2:"var(--graphy-font-text-editor-h2)",fontTextEditorH3:"var(--graphy-font-text-editor-h3)",fontTextEditorH6:"var(--graphy-font-text-editor-h6)",fontTextEditorBody:"var(--graphy-font-text-editor-body)",fontTextEditorLink:"var(--graphy-font-text-editor-link)",fontHighlightModeTitle:"var(--graphy-font-highlight-mode-title)",fontHighlightModeSubtitle:"var(--graphy-font-highlight-mode-subtitle)",fontEditorControlLabel:"var(--graphy-font-editor-control-label)",fontEditorControlValue:"var(--graphy-font-editor-control-value)",fontEditorSectionTitle:"var(--graphy-font-editor-section-title)",fontEditorCaption:"var(--graphy-font-editor-caption)"};Object.defineProperty(exports,"CANVAS_COLOR_KEYS",{enumerable:!0,get:function(){return r}});Object.defineProperty(exports,"vars",{enumerable:!0,get:function(){return a}});