@graphysdk/react-renderer 1.9.0-beta.1791444651663 → 1.9.0-beta.1791458483540

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,14 +1,13 @@
1
- import { A as er, B as tr, Bt as rr, Dt as nr, Et as sr, Ft as Y, Gt as or, I as ar, It as be, Kt as ir, L as cr, Lt as lr, M as dr, Mt as Ee, Nt as Te, Pt as ur, St as mr, Ut as hr, Vt as Re, Wt as gr, Zt as pr, a as fr, an as vr, cn as yr, dn as Sr, dt as br, fn as Er, gn as Ne, h as Tr, hn as ee, i as Rr, in as V, it as Nr, j as Cr, kt as Q, ln as Gr, mn as Ce, mt as Dr, n as qr, nn as Ir, ot as wr, pn as Pr, pt as _r, r as kr, rn as Ge, rt as Lr, s as $r, sn as Mr, t as De, tn as xr, un as Hr, vn as Z, w as Ar, xt as Br, yt as Or, z as Kr } from "./history-chords-CatQPvcI.js";
2
- import { n as Ur } from "./theme.contract.css-oFmndjcI.js";
3
- import { COMPILER_STAGE_KEYS as te, Geom as qe, GraphCompilationSession as Ie, areEditTargetsEqual as we, buildDiagnostic as se, createAnchorResolver as Pe, createCompiler as _e, createDataLabelPlacementResolver as ke, createSpecBuilder as Le, createStyleResolver as he, findAnnotation as $e, findLayerById as oe, isCompilerCachingEnabled as Me, resolveDefinition as xe, setCompilerCachingEnabled as He, toPercent as U } from "@graphysdk/viz-engine";
1
+ import { A as er, At as z, B as tr, Ct as rr, Dt as nr, Ft as sr, Gt as or, Ht as be, It as Y, Kt as ar, L as ir, Lt as Ee, M as cr, Nt as Te, Ot as lr, Pt as Re, Qt as dr, R as ur, Rt as mr, St as hr, V as gr, Vt as pr, Wt as fr, _n as Ne, a as vr, an as yr, at as Sr, bt as br, cn as Er, dn as Tr, fn as Rr, ft as Nr, gn as Cr, h as Gr, hn as Dr, ht as qr, i as Ir, in as wr, it as _r, j as Pr, mn as kr, mt as Lr, n as $r, on as Ce, pn as Mr, qt as xr, r as Hr, s as Ar, sn as V, st as Br, t as Ge, tn as Or, un as Kr, vn as ee, w as Fr, xn as J, yn as De } from "./history-chords-CL6SNEjw.js";
2
+ import { COMPILER_STAGE_KEYS as te, Geom as qe, GraphCompilationSession as Ie, areEditTargetsEqual as we, buildDiagnostic as se, createAnchorResolver as _e, createCompiler as Pe, createDataLabelPlacementResolver as ke, createSpecBuilder as Le, createStyleResolver as he, findAnnotation as $e, findLayerById as oe, isCompilerCachingEnabled as Me, resolveDefinition as xe, setCompilerCachingEnabled as He, toPercent as U } from "@graphysdk/viz-engine";
4
3
  import { Component as Ae, createContext as Be, useCallback as p, useContext as Oe, useEffect as H, useId as Ke, useImperativeHandle as Fe, useMemo as x, useRef as ae, useState as b, useSyncExternalStore as Ue } from "react";
5
4
  import { Fragment as je, jsx as a, jsxs as f } from "react/jsx-runtime";
6
- import { useStore as J } from "zustand";
5
+ import { useStore as Z } from "zustand";
7
6
  import { motion as W } from "motion/react";
8
7
  import { createStore as re } from "zustand/vanilla";
9
8
  import Ye from "clsx";
10
9
  import './index.css';var Ve = "_1a5iqpb0", We = "_1a5iqpb1";
11
- var Xe = "_1a5iqpb3", ze = "_1a5iqpb4", Qe = "_1a5iqpb5";
10
+ var Xe = "_1a5iqpb3", Qe = "_1a5iqpb4", ze = "_1a5iqpb5";
12
11
  var ie = ({ errors: e }) => {
13
12
  const [t, ...r] = e;
14
13
  return /* @__PURE__ */ f("div", {
@@ -30,11 +29,11 @@ var ie = ({ errors: e }) => {
30
29
  className: Xe,
31
30
  children: [
32
31
  /* @__PURE__ */ a("span", {
33
- className: ze,
32
+ className: Qe,
34
33
  children: e.code
35
34
  }),
36
35
  /* @__PURE__ */ a("p", {
37
- className: Qe,
36
+ className: ze,
38
37
  children: e.message
39
38
  }),
40
39
  e.suggestion && /* @__PURE__ */ a("p", {
@@ -43,10 +42,10 @@ var ie = ({ errors: e }) => {
43
42
  })
44
43
  ]
45
44
  });
46
- function Ze(e = [], t = []) {
45
+ function Je(e = [], t = []) {
47
46
  return e.length === t.length && e.every((r, n) => Object.is(r, t[n]));
48
47
  }
49
- var Je = class extends Ae {
48
+ var Ze = class extends Ae {
50
49
  constructor(...e) {
51
50
  super(...e), this.state = { caughtDiagnostic: null };
52
51
  }
@@ -55,10 +54,10 @@ var Je = class extends Ae {
55
54
  }
56
55
  componentDidCatch(e, t) {
57
56
  const r = se(e);
58
- Z([r]), this.props.onError?.([r]), console.error("Chart render component stack:", t.componentStack);
57
+ J([r]), this.props.onError?.([r]), console.error("Chart render component stack:", t.componentStack);
59
58
  }
60
59
  componentDidUpdate(e) {
61
- this.state.caughtDiagnostic && !Ze(e.resetKeys, this.props.resetKeys) && this.setState({ caughtDiagnostic: null });
60
+ this.state.caughtDiagnostic && !Je(e.resetKeys, this.props.resetKeys) && this.setState({ caughtDiagnostic: null });
62
61
  }
63
62
  render() {
64
63
  const { caughtDiagnostic: e } = this.state;
@@ -161,7 +160,7 @@ function ut(e, t) {
161
160
  }] : []) : [] : []);
162
161
  }
163
162
  function de(e) {
164
- const t = e.filter(fe), r = /* @__PURE__ */ new Set([...Object.keys(be), ...t.map((l) => l.geom)]), n = [], s = /* @__PURE__ */ new Set();
163
+ const t = e.filter(fe), r = /* @__PURE__ */ new Set([...Object.keys(Ee), ...t.map((l) => l.geom)]), n = [], s = /* @__PURE__ */ new Set();
165
164
  for (const l of e) {
166
165
  const u = ve(l);
167
166
  u === null || r.has(u.type) || s.has(u.type) || (s.add(u.type), n.push({
@@ -339,9 +338,9 @@ function bt(e) {
339
338
  var Et = (e) => re((t) => ({
340
339
  scene: e,
341
340
  setScene: (r) => t((n) => n.scene === r ? n : { scene: r })
342
- })), Tt = ({ spec: e, data: t, customPalettes: r, colorScheme: n, plugins: s, theme: c, resolveRenderer: i, anchorResolver: l, onSpecChange: u, onError: h, onWarnings: P }) => {
343
- const q = Q(u), T = Q(h), R = Q(P), [{ session: d, compileBus: g }] = b(() => {
344
- const o = _e({
341
+ })), Tt = ({ spec: e, data: t, customPalettes: r, colorScheme: n, plugins: s, theme: c, resolveRenderer: i, anchorResolver: l, onSpecChange: u, onError: h, onWarnings: _ }) => {
342
+ const q = z(u), T = z(h), R = z(_), [{ session: d, compileBus: g }] = b(() => {
343
+ const o = Pe({
345
344
  plugins: s,
346
345
  theme: c
347
346
  });
@@ -381,9 +380,9 @@ var Et = (e) => re((t) => ({
381
380
  ...ut(o.scene, i),
382
381
  ...ft(o.scene, l)
383
382
  ] : o.warnings, [i, l]), G = p((o) => {
384
- o.length !== 0 && (Z(o), T.current?.(o));
383
+ o.length !== 0 && (J(o), T.current?.(o));
385
384
  }, [T]), D = p((o) => {
386
- o.length !== 0 && (Z(o), R.current?.(o));
385
+ o.length !== 0 && (J(o), R.current?.(o));
387
386
  }, [R]);
388
387
  H(() => {
389
388
  const o = w.current;
@@ -440,9 +439,9 @@ var Et = (e) => re((t) => ({
440
439
  return o.some((m) => !!m.scene);
441
440
  }, [O]), K = p((o, m) => {
442
441
  S(d.applyCommand(o, m));
443
- }, [d, S]), _ = p(() => {
442
+ }, [d, S]), P = p(() => {
444
443
  S(d.commit());
445
- }, [d, S]), F = p(() => S(d.undo()), [d, S]), $ = p(() => S(d.redo()), [d, S]), z = x(() => ({
444
+ }, [d, S]), F = p(() => S(d.undo()), [d, S]), $ = p(() => S(d.redo()), [d, S]), Q = x(() => ({
446
445
  stack: d.history,
447
446
  undo: F,
448
447
  redo: $
@@ -454,8 +453,8 @@ var Et = (e) => re((t) => ({
454
453
  return {
455
454
  store: C.current,
456
455
  dispatch: K,
457
- commit: _,
458
- history: z,
456
+ commit: P,
457
+ history: Q,
459
458
  subscribe: y.subscribe,
460
459
  getScene: Se,
461
460
  compileBus: g,
@@ -469,8 +468,8 @@ var Et = (e) => re((t) => ({
469
468
  }),
470
469
  notify: () => e.forEach((t) => t())
471
470
  };
472
- }, Nt = ({ data: e, spec: t, plugins: r = [], theme: n, formattingLocale: s, handleRef: c, onSpecChange: i, onError: l, onWarnings: u, customPalettes: h, colorScheme: P = "light", children: q }) => {
473
- const [T] = b(() => n), R = T?.colorScheme ?? P, [d] = b(() => Te([...T?.plugins ?? [], ...r].filter(fe))), g = Ke(), [v] = b(() => Pe(r)), [w] = b(() => ke(r)), [y] = b(() => rt()), [C] = b(() => Ee()), I = x(() => he({ colorScheme: R }), [R]), { store: N, dispatch: B, commit: k, history: E, subscribe: G, getScene: D, compileBus: L, compileErrors: O } = Tt({
471
+ }, Nt = ({ data: e, spec: t, plugins: r = [], theme: n, formattingLocale: s, handleRef: c, onSpecChange: i, onError: l, onWarnings: u, customPalettes: h, colorScheme: _ = "light", children: q }) => {
472
+ const [T] = b(() => n), R = T?.colorScheme ?? _, [d] = b(() => Re([...T?.plugins ?? [], ...r].filter(fe))), g = Ke(), [v] = b(() => _e(r)), [w] = b(() => ke(r)), [y] = b(() => rt()), [C] = b(() => Te()), I = x(() => he({ colorScheme: R }), [R]), { store: N, dispatch: B, commit: k, history: E, subscribe: G, getScene: D, compileBus: L, compileErrors: O } = Tt({
474
473
  spec: t,
475
474
  data: e,
476
475
  customPalettes: h,
@@ -485,10 +484,10 @@ var Et = (e) => re((t) => ({
485
484
  });
486
485
  H(() => {
487
486
  if (N)
488
- return N.subscribe((_, F) => {
489
- if (_.scene.spec === F.scene.spec) return;
490
- const { selection: $, setSelection: z } = y.getState();
491
- $.length !== 0 && z(et($, _.scene.spec));
487
+ return N.subscribe((P, F) => {
488
+ if (P.scene.spec === F.scene.spec) return;
489
+ const { selection: $, setSelection: Q } = y.getState();
490
+ $.length !== 0 && Q(et($, P.scene.spec));
492
491
  });
493
492
  }, [N, y]);
494
493
  const S = x(() => ({
@@ -502,7 +501,7 @@ var Et = (e) => re((t) => ({
502
501
  subscribe: G,
503
502
  getScene: D,
504
503
  getSelection: () => y.getState().selection,
505
- setSelection: (_) => y.getState().setSelection(_),
504
+ setSelection: (P) => y.getState().setSelection(P),
506
505
  subscribeSelection: y.subscribe,
507
506
  canPlaceDataLabels: w.hasCapability,
508
507
  canFormatDataLabelsAsPercentages: w.hasPercentageFormat
@@ -539,15 +538,15 @@ var Et = (e) => re((t) => ({
539
538
  I,
540
539
  v
541
540
  ]);
542
- return /* @__PURE__ */ a(Je, {
541
+ return /* @__PURE__ */ a(Ze, {
543
542
  forcedErrors: O,
544
543
  onError: l,
545
544
  resetKeys: [t, e],
546
- children: K ? /* @__PURE__ */ a(Ce.Provider, {
545
+ children: K ? /* @__PURE__ */ a(Ne.Provider, {
547
546
  value: K,
548
- children: /* @__PURE__ */ a(Re, {
547
+ children: /* @__PURE__ */ a(be, {
549
548
  value: d,
550
- children: /* @__PURE__ */ a(Ne, {
549
+ children: /* @__PURE__ */ a(De, {
551
550
  value: w,
552
551
  children: /* @__PURE__ */ a(A, {
553
552
  shapes: T?.shapes,
@@ -558,7 +557,7 @@ var Et = (e) => re((t) => ({
558
557
  }) : null
559
558
  });
560
559
  };
561
- function Zr({ theme: e, ...t } = {}) {
560
+ function zr({ theme: e, ...t } = {}) {
562
561
  const r = Le(t);
563
562
  return {
564
563
  ...r,
@@ -625,22 +624,22 @@ var Ct = ({ shouldAnimateTransitions: e, cx: t, cy: r, r: n, ...s }) => e ? /* @
625
624
  }), Jr = (e) => {
626
625
  const { Circle: t } = X();
627
626
  return t === void 0 ? Ct(e) : /* @__PURE__ */ a(A, { children: /* @__PURE__ */ a(t, { ...e }) });
628
- }, en = (e) => {
627
+ }, Zr = (e) => {
629
628
  const { Line: t } = X();
630
629
  return t === void 0 ? Gt(e) : /* @__PURE__ */ a(A, { children: /* @__PURE__ */ a(t, { ...e }) });
631
- }, tn = (e) => {
630
+ }, en = (e) => {
632
631
  const { Rect: t } = X();
633
632
  return t === void 0 ? Dt(e) : /* @__PURE__ */ a(A, { children: /* @__PURE__ */ a(t, { ...e }) });
634
- }, rn = (e) => {
633
+ }, tn = (e) => {
635
634
  const { Path: t } = X();
636
635
  return t === void 0 ? qt(e) : /* @__PURE__ */ a(A, { children: /* @__PURE__ */ a(t, { ...e }) });
637
636
  }, It = ({ d: e, source: t, ...r }) => {
638
- const n = Ge(e, V, t);
637
+ const n = Ce(e, V, t);
639
638
  return /* @__PURE__ */ a(W.path, {
640
639
  d: n,
641
640
  ...r
642
641
  });
643
- }, nn = ({ children: e, ...t }) => /* @__PURE__ */ a("svg", {
642
+ }, rn = ({ children: e, ...t }) => /* @__PURE__ */ a("svg", {
644
643
  viewBox: "0 0 1 1",
645
644
  preserveAspectRatio: "none",
646
645
  width: "100%",
@@ -648,7 +647,7 @@ var Ct = ({ shouldAnimateTransitions: e, cx: t, cy: r, r: n, ...s }) => e ? /* @
648
647
  pointerEvents: "none",
649
648
  ...t,
650
649
  children: e
651
- }), sn = ({ box: e, children: t }) => /* @__PURE__ */ a("svg", {
650
+ }), nn = ({ box: e, children: t }) => /* @__PURE__ */ a("svg", {
652
651
  x: U(e.x0),
653
652
  y: U(e.y0),
654
653
  width: U(e.x1 - e.x0),
@@ -656,7 +655,7 @@ var Ct = ({ shouldAnimateTransitions: e, cx: t, cy: r, r: n, ...s }) => e ? /* @
656
655
  overflow: "hidden",
657
656
  pointerEvents: "none",
658
657
  children: t
659
- }), wt = "drqe3u0", Pt = "drqe3u1", _t = "drqe3u2", kt = "drqe3u3", M = "drqe3u4", Lt = "drqe3u5", $t = "drqe3u6", Mt = "drqe3u7", j = "drqe3u8", xt = "drqe3u9", Ht = "drqe3ua";
658
+ }), wt = "drqe3u0", _t = "drqe3u1", Pt = "drqe3u2", kt = "drqe3u3", M = "drqe3u4", Lt = "drqe3u5", $t = "drqe3u6", Mt = "drqe3u7", j = "drqe3u8", xt = "drqe3u9", Ht = "drqe3ua";
660
659
  var At = "drqe3uc", Bt = "drqe3ud", Ot = "drqe3ue", Kt = "drqe3uf";
661
660
  var Ft = "drqe3uh", Ut = "drqe3ui", ue = {
662
661
  enabled: "drqe3uk drqe3uj",
@@ -668,13 +667,13 @@ var Ft = "drqe3uh", Ut = "drqe3ui", ue = {
668
667
  ran: "drqe3uq drqe3up",
669
668
  cached: "drqe3ur drqe3up",
670
669
  untouched: "drqe3us drqe3up"
671
- }, on = ({ width: e = 440, style: t, className: r } = {}) => {
670
+ }, sn = ({ width: e = 440, style: t, className: r } = {}) => {
672
671
  const { compileBus: n } = ee(), [s] = b(() => it()), [c, i] = b(!1), [l, u] = b(Me);
673
672
  H(() => {
674
673
  const { recordCompile: d } = s.getState(), g = n.getLastTrigger(), v = n.getLastCompile();
675
674
  return g && v && d(g, v), n.subscribe(d);
676
675
  }, [s, n]);
677
- const h = J(s, (d) => d.lastCompile), P = J(s, (d) => d.history), q = n.getCacheStats(), T = h === null && P.length === 0, R = () => {
676
+ const h = Z(s, (d) => d.lastCompile), _ = Z(s, (d) => d.history), q = n.getCacheStats(), T = h === null && _.length === 0, R = () => {
678
677
  u((d) => {
679
678
  const g = !d;
680
679
  return He(g), g;
@@ -690,7 +689,7 @@ var Ft = "drqe3uh", Ut = "drqe3ui", ue = {
690
689
  /* @__PURE__ */ f("div", {
691
690
  className: wt,
692
691
  children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ a("div", {
693
- className: Pt,
692
+ className: _t,
694
693
  children: "compile cache"
695
694
  }), /* @__PURE__ */ a("div", {
696
695
  className: Ot,
@@ -719,11 +718,11 @@ var Ft = "drqe3uh", Ut = "drqe3ui", ue = {
719
718
  delta: h?.stages,
720
719
  durations: h?.stageDurationsMs,
721
720
  cumulative: q
722
- }), /* @__PURE__ */ a(Yt, { entries: P })] })
721
+ }), /* @__PURE__ */ a(Yt, { entries: _ })] })
723
722
  ]
724
723
  });
725
724
  }, jt = ({ delta: e, durations: t, cumulative: r }) => /* @__PURE__ */ f("table", {
726
- className: _t,
725
+ className: Pt,
727
726
  children: [/* @__PURE__ */ a("thead", { children: /* @__PURE__ */ f("tr", {
728
727
  className: Ft,
729
728
  children: [
@@ -827,7 +826,7 @@ var Ft = "drqe3uh", Ut = "drqe3ui", ue = {
827
826
  let r = 0;
828
827
  for (const n of te) t(e[n]) && (r += 1);
829
828
  return r;
830
- }, ne = (e) => e < 0.1 ? "<0.1ms" : e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`, an = () => {
829
+ }, ne = (e) => e < 0.1 ? "<0.1ms" : e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`, on = () => {
831
830
  const { history: e } = ee(), { stack: t, undo: r, redo: n } = e, s = p((l) => t.subscribe(l), [t]), c = p(() => t.getSnapshot(), [t]), i = Ue(s, c, c);
832
831
  return x(() => ({
833
832
  ...i,
@@ -849,14 +848,14 @@ var Ft = "drqe3uh", Ut = "drqe3ui", ue = {
849
848
  "range",
850
849
  "reset",
851
850
  "submit"
852
- ]), cn = (e, t = {}) => {
851
+ ]), an = (e, t = {}) => {
853
852
  const { target: r, enabled: n = !0 } = t;
854
853
  H(() => {
855
- const s = zt(r);
854
+ const s = Qt(r);
856
855
  if (!n || !s) return;
857
856
  const c = (i) => {
858
- if (!Qt(i) || i.defaultPrevented || Zt(i.target)) return;
859
- const l = De(i);
857
+ if (!zt(i) || i.defaultPrevented || Jt(i.target)) return;
858
+ const l = Ge(i);
860
859
  if (!l) return;
861
860
  const u = e.current;
862
861
  u && (l === "undo" ? u.undo() : u.redo()) && i.preventDefault();
@@ -867,72 +866,72 @@ var Ft = "drqe3uh", Ut = "drqe3ui", ue = {
867
866
  r,
868
867
  n
869
868
  ]);
870
- }, zt = (e) => e === void 0 ? window : e !== null && "current" in e ? e.current : e, Qt = (e) => "key" in e, Zt = (e) => e instanceof HTMLInputElement ? !Xt.has(e.type) : e instanceof HTMLElement ? e.isContentEditable || e.tagName === "TEXTAREA" : !1, ln = () => {
869
+ }, Qt = (e) => e === void 0 ? window : e !== null && "current" in e ? e.current : e, zt = (e) => "key" in e, Jt = (e) => e instanceof HTMLInputElement ? !Xt.has(e.type) : e instanceof HTMLElement ? e.isContentEditable || e.tagName === "TEXTAREA" : !1, cn = () => {
871
870
  const { targetBoundaryStore: e } = ee();
872
- return J(e, (t) => t.boundary);
871
+ return Z(e, (t) => t.boundary);
873
872
  };
874
873
  export {
875
- Kr as BrandMark,
876
- or as CanvasTextMeasurer,
877
- cr as DefaultFooter,
874
+ tr as BrandMark,
875
+ ar as CanvasTextMeasurer,
876
+ ur as DefaultFooter,
878
877
  Ct as DefaultGeomCircle,
879
878
  Gt as DefaultGeomLine,
880
879
  qt as DefaultGeomPath,
881
880
  Dt as DefaultGeomRect,
882
- $r as DefaultGrid,
883
- ar as DefaultHeader,
884
- rr as DefaultSwatch,
885
- Nr as DefaultTooltip,
886
- on as DevToolsPanel,
887
- Or as GRAPH_MODES,
881
+ Ar as DefaultGrid,
882
+ ir as DefaultHeader,
883
+ pr as DefaultSwatch,
884
+ Sr as DefaultTooltip,
885
+ sn as DevToolsPanel,
886
+ br as GRAPH_MODES,
888
887
  Jr as GeomCircle,
889
- en as GeomLine,
890
- rn as GeomPath,
891
- tn as GeomRect,
892
- Je as GraphErrorBoundary,
888
+ Zr as GeomLine,
889
+ tn as GeomPath,
890
+ en as GeomRect,
891
+ Ze as GraphErrorBoundary,
893
892
  ie as GraphErrorPanel,
894
893
  Nt as GraphProvider,
895
- fr as GraphRenderer,
896
- nr as HoverProvider,
897
- lr as IntroFade,
898
- Ir as IntroWipeClip,
899
- hr as TextMeasurerProvider,
900
- br as ThemeProvider,
901
- sn as UnitBoxSvg,
902
- nn as UnitSpaceSvg,
903
- vr as buildDotsEditOutlineShapes,
904
- Zr as createGraphyKit,
905
- _r as darkTheme,
906
- ur as defineGeomRenderer,
907
- Dr as lightTheme,
908
- pr as lightenCss,
909
- yr as projectPointCartesian,
894
+ vr as GraphRenderer,
895
+ lr as HoverProvider,
896
+ mr as IntroFade,
897
+ yr as IntroWipeClip,
898
+ fr as TextMeasurerProvider,
899
+ Nr as ThemeProvider,
900
+ nn as UnitBoxSvg,
901
+ rn as UnitSpaceSvg,
902
+ Er as buildDotsEditOutlineShapes,
903
+ zr as createGraphyKit,
904
+ Lr as darkTheme,
905
+ sr as defineGeomRenderer,
906
+ qr as lightTheme,
907
+ dr as lightenCss,
908
+ Tr as projectPointCartesian,
910
909
  et as pruneSelection,
911
- tr as resolveBrandMarkVisual,
912
- Mr as scalePointToPanel,
910
+ gr as resolveBrandMarkVisual,
911
+ Kr as scalePointToPanel,
913
912
  er as stampAxisEditTarget,
914
- Cr as stampGridEditTarget,
915
- dr as stampLegendEditTarget,
916
- mr as useElementScreenRect,
917
- sr as useGeomHitTest,
918
- Br as useGeomHover,
919
- Gr as useGeomReaderTree,
920
- Hr as useGeomStyleReader,
921
- qr as useGraphCommands,
922
- Rr as useGraphHandle,
923
- an as useGraphHistory,
924
- cn as useGraphHistoryShortcuts,
925
- Lr as useGraphLocale,
926
- Tr as useGraphSelection,
927
- Ar as useGuidesTakePress,
928
- kr as useHandleScene,
929
- wr as useHoverState,
930
- xr as usePaintDefs,
931
- ir as useResolvedStyle,
932
- Pr as useSceneSelector,
933
- Sr as useStyleReaderTree,
934
- Er as useStyleResolver,
935
- ln as useTargetBoundary,
936
- gr as useTextMeasurer,
937
- Ur as vars
913
+ Pr as stampGridEditTarget,
914
+ cr as stampLegendEditTarget,
915
+ rr as useElementScreenRect,
916
+ nr as useGeomHitTest,
917
+ hr as useGeomHover,
918
+ Rr as useGeomReaderTree,
919
+ Mr as useGeomStyleReader,
920
+ $r as useGraphCommands,
921
+ Ir as useGraphHandle,
922
+ on as useGraphHistory,
923
+ an as useGraphHistoryShortcuts,
924
+ _r as useGraphLocale,
925
+ Gr as useGraphSelection,
926
+ Fr as useGuidesTakePress,
927
+ Hr as useHandleScene,
928
+ Br as useHoverState,
929
+ wr as usePaintDefs,
930
+ xr as useResolvedStyle,
931
+ Cr as useSceneSelector,
932
+ kr as useStyleReaderTree,
933
+ Dr as useStyleResolver,
934
+ cn as useTargetBoundary,
935
+ or as useTextMeasurer,
936
+ Or as vars
938
937
  };
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "visualization",
12
12
  "renderer"
13
13
  ],
14
- "version": "1.9.0-beta.1791444651663",
14
+ "version": "1.9.0-beta.1791458483540",
15
15
  "type": "module",
16
16
  "sideEffects": [
17
17
  "**/*.css.ts",
@@ -31,11 +31,6 @@
31
31
  "import": "./dist/index.mjs",
32
32
  "require": "./dist/index.cjs"
33
33
  },
34
- "./graph-config": {
35
- "types": "./dist/graph-config.d.ts",
36
- "import": "./dist/graph-config.mjs",
37
- "require": "./dist/graph-config.cjs"
38
- },
39
34
  "./editable": {
40
35
  "types": "./dist/editable.d.ts",
41
36
  "import": "./dist/editable.mjs",
@@ -55,7 +50,7 @@
55
50
  "react-colorful": "^5.6.1",
56
51
  "react-intl": "^8.1.3",
57
52
  "zustand": "^5.0.12",
58
- "@graphysdk/viz-engine": "1.9.0-beta.1791444651663"
53
+ "@graphysdk/viz-engine": "1.9.0-beta.1791458483540"
59
54
  },
60
55
  "peerDependencies": {
61
56
  "@tiptap/core": "^3.0.0",
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./theme.contract.css-WAhjj7zh.cjs");require("@graphysdk/viz-engine/graph-config");var c=e=>{const r={};for(const[t,n]of Object.entries(e.themeOverrides??{}))typeof n!="string"||!i(t)||(r[t]=n);return r},i=e=>Object.hasOwn(o.vars,e);exports.convertGraphConfigTheme=c;
@@ -1,170 +0,0 @@
1
- import { GraphConfig } from '@graphysdk/viz-engine/graph-config';
2
-
3
- /**
4
- * Converts a `GraphConfig`'s `themeOverrides` — untyped JSON — to the renderer's typed
5
- * {@link ThemeOverrides}. Only keys still on the theme contract pass through; leftover stylesheet
6
- * keys (`legendBackground`, `tooltipBackground`, …) are ignored because `convertTextStyles`
7
- * already lifts them onto `style.legendItem` / `style.tooltip`. The data half, including the
8
- * `appearance.textStyle` fonts (resolved against `ctx.fontList` into graph and heading style
9
- * entries), goes through viz-engine's `convertGraphConfig`.
10
- */
11
- export declare const convertGraphConfigTheme: (config: GraphConfig) => ThemeOverrides;
12
-
13
- /**
14
- * A partial set of token values layered over a base theme — the shape of leftover chrome
15
- * overrides. Every token takes its CSS string value.
16
- */
17
- declare type ThemeOverrides = Partial<ThemeValues>;
18
-
19
- /** Every theme token mapped to its resolved CSS string value. */
20
- declare type ThemeValues = Record<keyof typeof vars, string>;
21
-
22
- /** CSS custom-property references for every theme token; read at paint sites as `vars.textPrimary`, etc. */
23
- declare const vars: {
24
- white: `var(--${string})`;
25
- black: `var(--${string})`;
26
- transparent: `var(--${string})`;
27
- gray100: `var(--${string})`;
28
- gray95: `var(--${string})`;
29
- gray90: `var(--${string})`;
30
- gray85: `var(--${string})`;
31
- gray80: `var(--${string})`;
32
- gray75: `var(--${string})`;
33
- gray70: `var(--${string})`;
34
- gray60: `var(--${string})`;
35
- gray50: `var(--${string})`;
36
- gray0: `var(--${string})`;
37
- grayGradient80: `var(--${string})`;
38
- green60: `var(--${string})`;
39
- green50: `var(--${string})`;
40
- red60: `var(--${string})`;
41
- red50: `var(--${string})`;
42
- amber70: `var(--${string})`;
43
- amber50: `var(--${string})`;
44
- amber40: `var(--${string})`;
45
- amber30: `var(--${string})`;
46
- blue80: `var(--${string})`;
47
- blue60: `var(--${string})`;
48
- purple50: `var(--${string})`;
49
- purple30: `var(--${string})`;
50
- brand: `var(--${string})`;
51
- success: `var(--${string})`;
52
- warning: `var(--${string})`;
53
- alert: `var(--${string})`;
54
- textPrimary: `var(--${string})`;
55
- textSecondary: `var(--${string})`;
56
- textDisabled: `var(--${string})`;
57
- iconPrimary: `var(--${string})`;
58
- iconSecondary: `var(--${string})`;
59
- iconStickerBackground: `var(--${string})`;
60
- border100: `var(--${string})`;
61
- border50: `var(--${string})`;
62
- border10: `var(--${string})`;
63
- sunkenBackground: `var(--${string})`;
64
- defaultBackground: `var(--${string})`;
65
- raisedBackground: `var(--${string})`;
66
- overlayBackground: `var(--${string})`;
67
- overlayBorderGradient: `var(--${string})`;
68
- graphBackground: `var(--${string})`;
69
- annotationOutlineColor: `var(--${string})`;
70
- editMenuTriggerIconColor: `var(--${string})`;
71
- editorDefaultAccent: `var(--${string})`;
72
- editorDefaultSurface: `var(--${string})`;
73
- editorDefaultText: `var(--${string})`;
74
- editorDefaultShadow: `var(--${string})`;
75
- editorControlHeight: `var(--${string})`;
76
- canvasDefault: `var(--${string})`;
77
- canvasBlue: `var(--${string})`;
78
- canvasCyan: `var(--${string})`;
79
- canvasGreen: `var(--${string})`;
80
- canvasYellow: `var(--${string})`;
81
- canvasOrange: `var(--${string})`;
82
- canvasRed: `var(--${string})`;
83
- canvasPink: `var(--${string})`;
84
- canvasPurple: `var(--${string})`;
85
- canvasGray: `var(--${string})`;
86
- canvasInverse: `var(--${string})`;
87
- elevationXs: `var(--${string})`;
88
- elevationSm: `var(--${string})`;
89
- elevationMd: `var(--${string})`;
90
- elevationLg: `var(--${string})`;
91
- radiiXs: `var(--${string})`;
92
- radiiSm: `var(--${string})`;
93
- radiiMd: `var(--${string})`;
94
- radiiLg: `var(--${string})`;
95
- spaceXxs: `var(--${string})`;
96
- spaceXs: `var(--${string})`;
97
- spaceSm: `var(--${string})`;
98
- spaceMd: `var(--${string})`;
99
- spaceLg: `var(--${string})`;
100
- spaceXl: `var(--${string})`;
101
- zIndexToolbar: `var(--${string})`;
102
- zIndexToolbarTooltip: `var(--${string})`;
103
- zIndexToolbarPopover: `var(--${string})`;
104
- zIndexEditorPopover: `var(--${string})`;
105
- toolbarBackgroundColor: `var(--${string})`;
106
- toolbarButtonBackgroundColor: `var(--${string})`;
107
- toolbarButtonBackgroundColorHovered: `var(--${string})`;
108
- toolbarButtonBackgroundColorSelected: `var(--${string})`;
109
- toolbarSeparatorColor: `var(--${string})`;
110
- fontFamily: `var(--${string})`;
111
- fontFamilyHeading: `var(--${string})`;
112
- fontWeightRegular: `var(--${string})`;
113
- fontWeightMedium: `var(--${string})`;
114
- fontWeightSemibold: `var(--${string})`;
115
- fontWeightBold: `var(--${string})`;
116
- fontWeightExtraBold: `var(--${string})`;
117
- textScale: `var(--${string})`;
118
- fontSizeXxs: `var(--${string})`;
119
- fontSizeXs: `var(--${string})`;
120
- fontSizeSm: `var(--${string})`;
121
- fontSizeMd: `var(--${string})`;
122
- fontSizeLg: `var(--${string})`;
123
- fontSizeXl: `var(--${string})`;
124
- fontLineHeightXxs: `var(--${string})`;
125
- fontLineHeightXs: `var(--${string})`;
126
- fontLineHeightSm: `var(--${string})`;
127
- fontLineHeightMd: `var(--${string})`;
128
- fontLineHeightLg: `var(--${string})`;
129
- fontLineHeightXl: `var(--${string})`;
130
- fontSizeEditorBody: `var(--${string})`;
131
- fontSizeHeadingSm: `var(--${string})`;
132
- fontSizeHeadingMd: `var(--${string})`;
133
- fontSizeHeadingLg: `var(--${string})`;
134
- fontLineHeightEditorBody: `var(--${string})`;
135
- fontLineHeightHeadingSm: `var(--${string})`;
136
- fontLineHeightHeadingMd: `var(--${string})`;
137
- fontLineHeightHeadingLg: `var(--${string})`;
138
- fontButton: `var(--${string})`;
139
- fontInput: `var(--${string})`;
140
- fontInputLabel: `var(--${string})`;
141
- fontSelectLabel: `var(--${string})`;
142
- fontSelectDescription: `var(--${string})`;
143
- fontColorSelectLabel: `var(--${string})`;
144
- fontMenuTitle: `var(--${string})`;
145
- fontMenuGroupTitle: `var(--${string})`;
146
- fontMenuItemLabel: `var(--${string})`;
147
- fontMenuItemLabelSecondary: `var(--${string})`;
148
- fontUITooltip: `var(--${string})`;
149
- fontUITooltipSecondary: `var(--${string})`;
150
- fontErrorBoundaryTitle: `var(--${string})`;
151
- fontErrorBoundaryMessage: `var(--${string})`;
152
- fontTableCell: `var(--${string})`;
153
- fontTableHeaderCell: `var(--${string})`;
154
- fontSourceLabel: `var(--${string})`;
155
- fontSourceLink: `var(--${string})`;
156
- fontTextEditorH1: `var(--${string})`;
157
- fontTextEditorH2: `var(--${string})`;
158
- fontTextEditorH3: `var(--${string})`;
159
- fontTextEditorH6: `var(--${string})`;
160
- fontTextEditorBody: `var(--${string})`;
161
- fontTextEditorLink: `var(--${string})`;
162
- fontHighlightModeTitle: `var(--${string})`;
163
- fontHighlightModeSubtitle: `var(--${string})`;
164
- fontEditorControlLabel: `var(--${string})`;
165
- fontEditorControlValue: `var(--${string})`;
166
- fontEditorSectionTitle: `var(--${string})`;
167
- fontEditorCaption: `var(--${string})`;
168
- };
169
-
170
- export { }
@@ -1,11 +0,0 @@
1
- import { n } from "./theme.contract.css-oFmndjcI.js";
2
- import "@graphysdk/viz-engine/graph-config";
3
- var c = (e) => {
4
- const r = {};
5
- for (const [t, o] of Object.entries(e.themeOverrides ?? {}))
6
- typeof o != "string" || !i(t) || (r[t] = o);
7
- return r;
8
- }, i = (e) => Object.hasOwn(n, e);
9
- export {
10
- c as convertGraphConfigTheme
11
- };