@graphysdk/react-renderer 1.9.0-beta.1789669748378 → 1.9.0-beta.1789721177023

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 { 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 ge, n as nr, nt as sr, qt as or, r as ir, rt as ar, s as cr, t as he, ut as dr, vt as lr, z as ur } from "./history-chords-CK8rnZmj.js";
2
- import { n as gr } from "./theme.contract.css-AyXDNf0F.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, createSpecBuilder 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";
1
+ import { At as le, B as _t, Bt as $t, D as xt, Dt as Ht, Et as Mt, F as Pt, H as Lt, It as Bt, Lt as ue, Mt as U, N as At, Nt as me, P as Ot, St as Kt, U as Ut, Vt as jt, _ as Ft, a as Yt, an as se, en as Vt, ft as Wt, ht as zt, i as Xt, in as ge, jt as Qt, kt as O, mt as Jt, n as Zt, nn as er, on as K, ot as tr, qt as rr, r as nr, rn as sr, s as or, st as ir, t as he, tn as ar, xt as cr, yt as dr, z as lr, zt as ur } from "./history-chords-LSbpNIBh.js";
2
+ import { n as gr } from "./theme.contract.css-DRIwwcHW.js";
3
+ import { COMPILER_STAGE_KEYS as j, Geom as pe, GraphCompilationSession as fe, areEditTargetsEqual as ve, buildDiagnostic as z, createAnchorResolver as ye, createCompiler as Se, createSpecBuilder as be, createStyleResolver as Ee, findAnnotation as Te, findLayerById as X, 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 H, useId as Ge, useImperativeHandle as ke, useMemo as x, useRef as Q, useState as T, useSyncExternalStore as Ie } from "react";
5
+ import { Fragment as De, 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
8
  import we from "clsx";
9
- import './index.css';var De = "_1a5iqpb0", $e = "_1a5iqpb1";
10
- var He = "_1a5iqpb3", xe = "_1a5iqpb4", Me = "_1a5iqpb5";
9
+ import './index.css';var _e = "_1a5iqpb0", $e = "_1a5iqpb1";
10
+ var xe = "_1a5iqpb3", He = "_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: De,
15
+ className: _e,
16
16
  children: [
17
17
  /* @__PURE__ */ c("strong", {
18
18
  className: $e,
@@ -26,10 +26,10 @@ var Z = ({ errors: e }) => {
26
26
  ]
27
27
  });
28
28
  }, ee = ({ diagnostic: e }) => /* @__PURE__ */ v("div", {
29
- className: He,
29
+ className: xe,
30
30
  children: [
31
31
  /* @__PURE__ */ c("span", {
32
- className: xe,
32
+ className: He,
33
33
  children: e.code
34
34
  }),
35
35
  /* @__PURE__ */ c("p", {
@@ -50,10 +50,10 @@ var Le = class extends Ce {
50
50
  super(...e), this.state = { caughtDiagnostic: null };
51
51
  }
52
52
  static getDerivedStateFromError(e) {
53
- return { caughtDiagnostic: X(e) };
53
+ return { caughtDiagnostic: z(e) };
54
54
  }
55
55
  componentDidCatch(e, t) {
56
- const n = X(e);
56
+ const n = z(e);
57
57
  K([n]), this.props.onError?.([n]), console.error("Chart render component stack:", t.componentStack);
58
58
  }
59
59
  componentDidUpdate(e) {
@@ -68,21 +68,21 @@ var Le = class extends Ce {
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
- }, Oe = (e, t) => {
72
- const n = e.filter((r) => Ae(r, t));
71
+ }, Ae = (e, t) => {
72
+ const n = e.filter((r) => Oe(r, t));
73
73
  return n.length === e.length ? e : n;
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) => ({
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, te = [], Ke = () => F((e) => ({
75
75
  selection: te,
76
- setSelection: (t) => e((n) => Fe(n.selection, t) ? n : { selection: t }),
76
+ setSelection: (t) => e((n) => Ue(n.selection, t) ? n : { selection: t }),
77
77
  clearSelection: () => e((t) => t.selection.length === 0 ? t : { selection: te })
78
- })), Fe = (e, t) => e === t ? !0 : e.length !== t.length ? !1 : e.every((n, r) => {
78
+ })), Ue = (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", Ue = 5, Ye = (e) => {
81
+ }), je = process.env.NODE_ENV !== "production", Fe = 5, Ye = (e) => {
82
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 Le = class extends Ce {
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,
@@ -113,20 +113,20 @@ var Le = class extends Ce {
113
113
  if (r.lastSnapshot === n) return r;
114
114
  const o = {
115
115
  id: r.nextId,
116
- label: Xe(t),
116
+ label: ze(t),
117
117
  stages: n.stages,
118
118
  stageDurationsMs: n.stageDurationsMs,
119
119
  durationMs: n.durationMs
120
120
  };
121
121
  return {
122
122
  lastCompile: o,
123
- history: ze(r.history, o, Ue),
123
+ history: Xe(r.history, o, Fe),
124
124
  nextId: r.nextId + 1,
125
125
  lastSnapshot: n
126
126
  };
127
127
  })
128
- })), Ve = () => {
129
- }, Xe = (e) => {
128
+ })), We = () => {
129
+ }, ze = (e) => {
130
130
  switch (e.kind) {
131
131
  case "init":
132
132
  return "init";
@@ -137,12 +137,12 @@ var Le = class extends Ce {
137
137
  case "command":
138
138
  return e.command.metadata.description;
139
139
  }
140
- }, ze = (e, t, n) => {
140
+ }, Xe = (e, t, n) => {
141
141
  const r = e.length >= n ? e.length - (n - 1) : 0;
142
142
  return [...e.slice(r), t];
143
143
  };
144
- function Je(e) {
145
- const t = e.filter(oe), n = /* @__PURE__ */ new Set([...Object.keys(ge), ...t.map((d) => d.geom)]), r = [], o = /* @__PURE__ */ new Set();
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();
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 Je(e) {
185
185
  warnings: i
186
186
  };
187
187
  }
188
- function Qe(e, t) {
188
+ function Je(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 || F(d) || (o.add(i.geom), a.push({
209
+ d === null || d.hitTest || U(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 || !F(d) || (o.add(i.geom), a.push({
246
+ d === null || !d.hitTest || !U(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 || !F(d) || (o.add(i.geom), a.push({
281
+ d === null || !U(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) => U((t) => ({
295
+ var st = (e) => F((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 = A(d), k = A(u), C = A(m), [{ session: g, compileBus: l }] = T(() => {
299
+ const N = O(d), k = O(u), C = O(m), [{ session: g, 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(() => 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) => {
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]), 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,7 +310,7 @@ var st = (e) => U((t) => ({
310
310
  h.subscribe(I.notify), R.current = h, I.notify();
311
311
  }
312
312
  return null;
313
- }, [I]), [M, D] = T(() => {
313
+ }, [I]), [M, _] = T(() => {
314
314
  const s = g.compile({
315
315
  spec: e,
316
316
  data: t,
@@ -320,7 +320,7 @@ var st = (e) => U((t) => ({
320
320
  return y.current = s, S(w(s));
321
321
  }), G = f((s) => s.ok ? [
322
322
  ...s.warnings,
323
- ...Qe(s.scene, a),
323
+ ...Je(s.scene, a),
324
324
  ...Ze(s.scene, a),
325
325
  ...et(s.scene),
326
326
  ...tt(s.scene, a),
@@ -331,7 +331,7 @@ var st = (e) => U((t) => ({
331
331
  }, [k]), q = f((s) => {
332
332
  s.length !== 0 && (K(s), C.current?.(s));
333
333
  }, [C]);
334
- x(() => {
334
+ H(() => {
335
335
  const s = y.current;
336
336
  s && (b([...p.errors, ...s.ok ? [] : s.errors]), q([...p.warnings, ...G(s)]), s.ok && l.emit({ kind: "init" }));
337
337
  }, [
@@ -340,7 +340,7 @@ var st = (e) => U((t) => ({
340
340
  q,
341
341
  p,
342
342
  G
343
- ]), x(() => {
343
+ ]), H(() => {
344
344
  const s = g.update({
345
345
  spec: e,
346
346
  data: t,
@@ -350,7 +350,7 @@ var st = (e) => U((t) => ({
350
350
  if (!s) return;
351
351
  s.committedSpec && N.current?.(s.committedSpec);
352
352
  const h = w(s.result);
353
- D(S(h)), h && b(h), q(G(s.result)), h || l.emit({ kind: s.specChanged ? "spec" : "data" });
353
+ _(S(h)), h && b(h), q(G(s.result)), h || l.emit({ kind: s.specChanged ? "spec" : "data" });
354
354
  }, [
355
355
  e,
356
356
  t,
@@ -365,41 +365,41 @@ var st = (e) => U((t) => ({
365
365
  G,
366
366
  N
367
367
  ]);
368
- const _ = f((s) => {
369
- D((h) => h === null ? h : S(null)), q(G(s));
368
+ const D = f((s) => {
369
+ _((h) => h === null ? h : S(null)), q(G(s));
370
370
  }, [
371
371
  S,
372
372
  q,
373
373
  G
374
374
  ]), P = f((s) => {
375
- s.scene && R.current?.getState().setScene(s.scene), s.result && _(s.result), s.command && l.emit({
375
+ s.scene && R.current?.getState().setScene(s.scene), s.result && D(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
- _,
380
+ D,
381
381
  l,
382
382
  N,
383
383
  b
384
384
  ]), E = f((s) => {
385
385
  for (const h of s) P(h);
386
386
  return s.some((h) => !!h.scene);
387
- }, [P]), O = f((s, h) => {
387
+ }, [P]), A = f((s, h) => {
388
388
  E(g.applyCommand(s, h));
389
389
  }, [g, E]), ae = f(() => {
390
390
  E(g.commit());
391
- }, [g, E]), W = f(() => E(g.undo()), [g, E]), V = f(() => E(g.redo()), [g, E]), ce = H(() => ({
391
+ }, [g, E]), V = f(() => E(g.undo()), [g, E]), W = f(() => E(g.redo()), [g, E]), ce = x(() => ({
392
392
  stack: g.history,
393
- undo: W,
394
- redo: V
393
+ undo: V,
394
+ redo: W
395
395
  }), [
396
396
  g,
397
- W,
398
- V
397
+ V,
398
+ W
399
399
  ]), de = f(() => R.current?.getState().scene ?? null, []);
400
400
  return {
401
401
  store: R.current,
402
- dispatch: O,
402
+ dispatch: A,
403
403
  commit: ae,
404
404
  history: ce,
405
405
  subscribe: I.subscribe,
@@ -416,7 +416,7 @@ var st = (e) => U((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(() => le(n.filter(oe))), C = Ge(), [g] = 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({
419
+ const [k] = T(() => le(n.filter(oe))), C = Ge(), [g] = T(() => ye(n)), [l] = T(() => Ke()), p = x(() => Ee({ colorScheme: m }), [m]), { store: y, dispatch: I, commit: R, history: S, subscribe: w, getScene: M, compileBus: _, compileErrors: G } = ot({
420
420
  spec: t,
421
421
  data: e,
422
422
  customPalettes: u,
@@ -428,15 +428,15 @@ var st = (e) => U((t) => ({
428
428
  onError: i,
429
429
  onWarnings: d
430
430
  });
431
- x(() => {
431
+ H(() => {
432
432
  if (y)
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));
433
+ return y.subscribe((D, P) => {
434
+ if (D.scene.spec === P.scene.spec) return;
435
+ const { selection: E, setSelection: A } = l.getState();
436
+ E.length !== 0 && A(Ae(E, D.scene.spec));
437
437
  });
438
438
  }, [y, l]);
439
- const b = H(() => ({
439
+ const b = x(() => ({
440
440
  dispatch: I,
441
441
  commit: R
442
442
  }), [I, R]);
@@ -447,7 +447,7 @@ var st = (e) => U((t) => ({
447
447
  subscribe: w,
448
448
  getScene: M,
449
449
  getSelection: () => l.getState().selection,
450
- setSelection: (_) => l.getState().setSelection(_),
450
+ setSelection: (D) => l.getState().setSelection(D),
451
451
  subscribeSelection: l.subscribe
452
452
  }), [
453
453
  b,
@@ -456,14 +456,14 @@ var st = (e) => U((t) => ({
456
456
  M,
457
457
  l
458
458
  ]);
459
- const q = H(() => y ? {
459
+ const q = x(() => y ? {
460
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: D,
466
+ compileBus: _,
467
467
  colorScheme: m,
468
468
  styleResolver: p,
469
469
  anchorResolver: g
@@ -474,7 +474,7 @@ var st = (e) => U((t) => ({
474
474
  b,
475
475
  S,
476
476
  r,
477
- D,
477
+ _,
478
478
  m,
479
479
  p,
480
480
  g
@@ -483,9 +483,9 @@ var st = (e) => U((t) => ({
483
483
  forcedErrors: G,
484
484
  onError: i,
485
485
  resetKeys: [t, e],
486
- children: q ? /* @__PURE__ */ c(ue.Provider, {
486
+ children: q ? /* @__PURE__ */ c(ge.Provider, {
487
487
  value: q,
488
- children: /* @__PURE__ */ c(me, {
488
+ children: /* @__PURE__ */ c(ue, {
489
489
  value: k,
490
490
  children: N
491
491
  })
@@ -531,12 +531,12 @@ var Et = "drqe3uh", Tt = "drqe3ui", re = {
531
531
  cached: "drqe3ur drqe3up",
532
532
  untouched: "drqe3us drqe3up"
533
533
  }, Nr = ({ width: e = 440, style: t, className: n } = {}) => {
534
- const { compileBus: r } = se(), [o] = T(() => We()), [a, i] = T(!1), [d, u] = T(Ne);
535
- x(() => {
534
+ const { compileBus: r } = se(), [o] = T(() => Ve()), [a, i] = T(!1), [d, u] = T(Ne);
535
+ H(() => {
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 = Q(o, (l) => l.lastCompile), N = Q(o, (l) => l.history), k = r.getCacheStats(), C = m === null && N.length === 0, g = () => {
539
+ const m = J(o, (l) => l.lastCompile), N = J(o, (l) => l.history), k = r.getCacheStats(), C = m === null && N.length === 0, g = () => {
540
540
  u((l) => {
541
541
  const p = !l;
542
542
  return qe(p), p;
@@ -577,7 +577,7 @@ var Et = "drqe3uh", Tt = "drqe3ui", re = {
577
577
  children: "next compile reflects this toggle"
578
578
  })]
579
579
  }),
580
- !a && !C && /* @__PURE__ */ v(_e, { children: [/* @__PURE__ */ c(Nt, {
580
+ !a && !C && /* @__PURE__ */ v(De, { children: [/* @__PURE__ */ c(Nt, {
581
581
  delta: m?.stages,
582
582
  durations: m?.stageDurationsMs,
583
583
  cumulative: k
@@ -691,7 +691,7 @@ var Et = "drqe3uh", Tt = "drqe3ui", re = {
691
691
  return n;
692
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
- return H(() => ({
694
+ return x(() => ({
695
695
  ...i,
696
696
  undo: n,
697
697
  redo: r
@@ -713,11 +713,11 @@ var Et = "drqe3uh", Tt = "drqe3ui", re = {
713
713
  "submit"
714
714
  ]), qr = (e, t = {}) => {
715
715
  const { target: n, enabled: r = !0 } = t;
716
- x(() => {
716
+ H(() => {
717
717
  const o = kt(n);
718
718
  if (!r || !o) return;
719
719
  const a = (i) => {
720
- if (!It(i) || i.defaultPrevented || _t(i.target)) return;
720
+ if (!It(i) || i.defaultPrevented || Dt(i.target)) return;
721
721
  const d = he(i);
722
722
  if (!d) return;
723
723
  const u = e.current;
@@ -729,51 +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, _t = (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, Dt = (e) => e instanceof HTMLInputElement ? !Gt.has(e.type) : e instanceof HTMLElement ? e.isContentEditable || e.tagName === "TEXTAREA" : !1;
733
733
  export {
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,
734
+ Lt as BrandMark,
735
+ jt as CanvasTextMeasurer,
736
+ _t as DefaultFooter,
737
+ or as DefaultGrid,
738
+ lr as DefaultHeader,
739
+ Bt as DefaultSwatch,
740
+ tr as DefaultTooltip,
741
741
  Nr as DevToolsPanel,
742
- er as GRAPH_MODES,
742
+ dr as GRAPH_MODES,
743
743
  Le as GraphErrorBoundary,
744
744
  Z as GraphErrorPanel,
745
745
  at as GraphProvider,
746
- Jt as GraphRenderer,
747
- $t as HoverProvider,
748
- Ut as TextMeasurerProvider,
749
- Qt as ThemeProvider,
746
+ Yt as GraphRenderer,
747
+ Ht as HoverProvider,
748
+ ur as TextMeasurerProvider,
749
+ Wt as ThemeProvider,
750
750
  Tr as UnitBoxSvg,
751
751
  Er as UnitSpaceSvg,
752
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,
753
+ Jt as darkTheme,
754
+ Qt as defineGeomRenderer,
755
+ zt as lightTheme,
756
+ rr as lightenCss,
757
+ Ae as pruneSelection,
758
+ Ut as resolveBrandMarkVisual,
759
+ At as stampAxisEditTarget,
760
+ Ot as stampGridEditTarget,
761
+ Pt as stampLegendEditTarget,
762
+ Kt as useElementScreenRect,
763
+ Mt as useGeomHitTest,
764
+ cr as useGeomHover,
765
+ Zt as useGraphCommands,
766
+ Xt as useGraphHandle,
767
767
  Rr as useGraphHistory,
768
768
  qr as useGraphHistoryShortcuts,
769
- Xt as useGraphSelection,
769
+ Ft as useGraphSelection,
770
770
  xt as useGuidesTakePress,
771
- ir as useHandleScene,
772
- ar as useHoverState,
773
- or as useSceneSelector,
771
+ nr as useHandleScene,
772
+ ir as useHoverState,
773
+ sr as useSceneSelector,
774
774
  Vt as useStyleReaderTree,
775
- Lt as useStyleReaders,
776
- Kt as useStyleResolver,
777
- Pt as useTextMeasurer,
775
+ ar as useStyleReaders,
776
+ er as useStyleResolver,
777
+ $t as useTextMeasurer,
778
778
  gr as vars
779
779
  };
@@ -1,4 +1,4 @@
1
- import './theme.contract.css';var a = [
1
+ var a = [
2
2
  "canvasDefault",
3
3
  "canvasBlue",
4
4
  "canvasCyan",
@@ -0,0 +1 @@
1
+ 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)",annotationOutlineColor:"var(--graphy-annotation-outline-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.1789669748378",
14
+ "version": "1.9.0-beta.1789721177023",
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.1789669748378"
58
+ "@graphysdk/viz-engine": "1.9.0-beta.1789721177023"
59
59
  },
60
60
  "peerDependencies": {
61
61
  "@tiptap/core": "^3.0.0",
@@ -174,6 +174,7 @@
174
174
  "scripts": {
175
175
  "build": "vite build",
176
176
  "test": "vitest run",
177
+ "bench": "vitest bench --run",
177
178
  "test:watch": "TZ=utc vitest",
178
179
  "lint": "eslint . --max-warnings 0",
179
180
  "lint:fix": "eslint . --fix",