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

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,6 +1,6 @@
1
- import { A as Dt, Ct as $t, Dt as Ht, E as xt, Et as le, F as Mt, Ft as Pt, Gt as Lt, Ht as Bt, I as Ot, It as At, Jt as ue, Kt, M as Ft, Mt as jt, Nt as me, Ot as F, Pt as Ut, R as Yt, St as Wt, Tt as A, Wt as Vt, Xt as K, Yt as se, _ as Xt, _t as zt, a as Jt, ct as Qt, dt as Zt, ht as er, i as tr, j as rr, kt as he, n as nr, nt as sr, qt as or, r as ir, rt as ar, s as cr, t as ge, ut as dr, vt as lr, z as ur } from "./history-chords-BEesSXz6.js";
2
- import { n as hr } from "./theme.contract.css-DaZ5UPN0.js";
3
- import { COMPILER_STAGE_KEYS as j, Geom as pe, GraphCompilationSession as fe, areEditTargetsEqual as ve, buildDiagnostic as X, createAnchorResolver as ye, createCompiler as Se, createGraphyBuilder as be, createStyleResolver as Ee, findAnnotation as Te, findLayerById as z, isCompilerCachingEnabled as Ne, resolveDefinition as Re, setCompilerCachingEnabled as qe, toPercent as L } from "@graphysdk/viz-engine";
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
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
5
  import { Fragment as _e, jsx as c, jsxs as v } from "react/jsx-runtime";
6
6
  import { useStore as Q } from "zustand";
@@ -142,7 +142,7 @@ var Le = class extends Ce {
142
142
  return [...e.slice(r), t];
143
143
  };
144
144
  function Je(e) {
145
- const t = e.filter(oe), n = /* @__PURE__ */ new Set([...Object.keys(he), ...t.map((d) => d.geom)]), r = [], o = /* @__PURE__ */ new Set();
145
+ const t = e.filter(oe), n = /* @__PURE__ */ new Set([...Object.keys(ge), ...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({
@@ -296,7 +296,7 @@ var st = (e) => U((t) => ({
296
296
  scene: e,
297
297
  setScene: (n) => t((r) => r.scene === n ? r : { scene: n })
298
298
  })), ot = ({ spec: e, data: t, customPalettes: n, colorScheme: r, plugins: o, resolveRenderer: a, anchorResolver: i, onSpecChange: d, onError: u, onWarnings: m }) => {
299
- const N = A(d), k = A(u), C = A(m), [{ session: h, compileBus: l }] = T(() => {
299
+ const N = A(d), k = A(u), C = A(m), [{ session: g, compileBus: l }] = T(() => {
300
300
  const s = Se({ plugins: o });
301
301
  return {
302
302
  session: new fe(s),
@@ -306,12 +306,12 @@ var st = (e) => U((t) => ({
306
306
  if (!s.ok) return s.errors;
307
307
  if (R.current) R.current.getState().setScene(s.scene);
308
308
  else {
309
- const g = st(s.scene);
310
- g.subscribe(I.notify), R.current = g, I.notify();
309
+ const h = st(s.scene);
310
+ h.subscribe(I.notify), R.current = h, I.notify();
311
311
  }
312
312
  return null;
313
313
  }, [I]), [M, D] = T(() => {
314
- const s = h.compile({
314
+ const s = g.compile({
315
315
  spec: e,
316
316
  data: t,
317
317
  customPalettes: n,
@@ -341,7 +341,7 @@ var st = (e) => U((t) => ({
341
341
  p,
342
342
  G
343
343
  ]), x(() => {
344
- const s = h.update({
344
+ const s = g.update({
345
345
  spec: e,
346
346
  data: t,
347
347
  customPalettes: n,
@@ -349,14 +349,14 @@ var st = (e) => U((t) => ({
349
349
  });
350
350
  if (!s) return;
351
351
  s.committedSpec && N.current?.(s.committedSpec);
352
- const g = w(s.result);
353
- D(S(g)), g && b(g), q(G(s.result)), g || l.emit({ kind: s.specChanged ? "spec" : "data" });
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" });
354
354
  }, [
355
355
  e,
356
356
  t,
357
357
  n,
358
358
  r,
359
- h,
359
+ g,
360
360
  l,
361
361
  w,
362
362
  b,
@@ -366,7 +366,7 @@ var st = (e) => U((t) => ({
366
366
  N
367
367
  ]);
368
368
  const _ = f((s) => {
369
- D((g) => g === null ? g : S(null)), q(G(s));
369
+ D((h) => h === null ? h : S(null)), q(G(s));
370
370
  }, [
371
371
  S,
372
372
  q,
@@ -382,18 +382,18 @@ var st = (e) => U((t) => ({
382
382
  N,
383
383
  b
384
384
  ]), E = f((s) => {
385
- for (const g of s) P(g);
386
- return s.some((g) => !!g.scene);
387
- }, [P]), O = f((s, g) => {
388
- E(h.applyCommand(s, g));
389
- }, [h, E]), ae = f(() => {
390
- E(h.commit());
391
- }, [h, E]), W = f(() => E(h.undo()), [h, E]), V = f(() => E(h.redo()), [h, E]), ce = H(() => ({
392
- stack: h.history,
385
+ for (const h of s) P(h);
386
+ return s.some((h) => !!h.scene);
387
+ }, [P]), O = f((s, h) => {
388
+ E(g.applyCommand(s, h));
389
+ }, [g, E]), ae = f(() => {
390
+ E(g.commit());
391
+ }, [g, E]), W = f(() => E(g.undo()), [g, E]), V = f(() => E(g.redo()), [g, E]), ce = H(() => ({
392
+ stack: g.history,
393
393
  undo: W,
394
394
  redo: V
395
395
  }), [
396
- h,
396
+ g,
397
397
  W,
398
398
  V
399
399
  ]), de = f(() => R.current?.getState().scene ?? null, []);
@@ -416,14 +416,14 @@ 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(), [h] = T(() => ye(n)), [l] = T(() => Ke()), p = H(() => Ee({ colorScheme: m }), [m]), { store: y, dispatch: I, commit: R, history: S, subscribe: w, getScene: M, compileBus: D, compileErrors: G } = ot({
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({
420
420
  spec: t,
421
421
  data: e,
422
422
  customPalettes: u,
423
423
  colorScheme: m,
424
424
  plugins: n,
425
425
  resolveRenderer: k,
426
- anchorResolver: h,
426
+ anchorResolver: g,
427
427
  onSpecChange: a,
428
428
  onError: i,
429
429
  onWarnings: d
@@ -466,7 +466,7 @@ var st = (e) => U((t) => ({
466
466
  compileBus: D,
467
467
  colorScheme: m,
468
468
  styleResolver: p,
469
- anchorResolver: h
469
+ anchorResolver: g
470
470
  } : null, [
471
471
  C,
472
472
  y,
@@ -477,7 +477,7 @@ var st = (e) => U((t) => ({
477
477
  D,
478
478
  m,
479
479
  p,
480
- h
480
+ g
481
481
  ]);
482
482
  return /* @__PURE__ */ c(Le, {
483
483
  forcedErrors: G,
@@ -518,7 +518,7 @@ var Er = ({ children: e, ...t }) => /* @__PURE__ */ c("svg", {
518
518
  overflow: "hidden",
519
519
  pointerEvents: "none",
520
520
  children: t
521
- }), ct = "drqe3u0", dt = "drqe3u1", lt = "drqe3u2", ut = "drqe3u3", $ = "drqe3u4", mt = "drqe3u5", ht = "drqe3u6", gt = "drqe3u7", B = "drqe3u8", pt = "drqe3u9", ft = "drqe3ua";
521
+ }), ct = "drqe3u0", dt = "drqe3u1", lt = "drqe3u2", ut = "drqe3u3", $ = "drqe3u4", mt = "drqe3u5", gt = "drqe3u6", ht = "drqe3u7", B = "drqe3u8", pt = "drqe3u9", ft = "drqe3ua";
522
522
  var vt = "drqe3uc", yt = "drqe3ud", St = "drqe3ue", bt = "drqe3uf";
523
523
  var Et = "drqe3uh", Tt = "drqe3ui", re = {
524
524
  enabled: "drqe3uk drqe3uj",
@@ -536,7 +536,7 @@ var Et = "drqe3uh", Tt = "drqe3ui", re = {
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, h = () => {
539
+ const m = Q(o, (l) => l.lastCompile), N = Q(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;
@@ -568,7 +568,7 @@ var Et = "drqe3uh", Tt = "drqe3ui", re = {
568
568
  className: "drqe3ub",
569
569
  children: [/* @__PURE__ */ v("button", {
570
570
  type: "button",
571
- onClick: h,
571
+ onClick: g,
572
572
  className: d ? re.enabled : re.disabled,
573
573
  "aria-pressed": d,
574
574
  children: ["cache ", d ? "enabled" : "disabled"]
@@ -661,14 +661,14 @@ var Et = "drqe3uh", Tt = "drqe3ui", re = {
661
661
  }), e.map((t) => {
662
662
  const n = Ct(t.stages, (a) => a.misses > 0), r = j.length;
663
663
  return /* @__PURE__ */ v("div", {
664
- className: ht,
664
+ className: gt,
665
665
  children: [
666
666
  /* @__PURE__ */ c("span", {
667
667
  className: ie[n === 0 ? "cached" : "ran"],
668
668
  "aria-hidden": !0
669
669
  }),
670
670
  /* @__PURE__ */ c("span", {
671
- className: gt,
671
+ className: ht,
672
672
  title: t.label,
673
673
  children: t.label
674
674
  }),
@@ -718,7 +718,7 @@ var Et = "drqe3uh", Tt = "drqe3ui", re = {
718
718
  if (!r || !o) return;
719
719
  const a = (i) => {
720
720
  if (!It(i) || i.defaultPrevented || _t(i.target)) return;
721
- const d = ge(i);
721
+ const d = he(i);
722
722
  if (!d) return;
723
723
  const u = e.current;
724
724
  u && (d === "undo" ? u.undo() : u.redo()) && i.preventDefault();
@@ -775,5 +775,5 @@ export {
775
775
  Lt as useStyleReaders,
776
776
  Kt as useStyleResolver,
777
777
  Pt as useTextMeasurer,
778
- hr as vars
778
+ gr as vars
779
779
  };
@@ -57,7 +57,7 @@ import './theme.contract.css';var a = [
57
57
  overlayBorderGradient: "var(--graphy-overlay-border-gradient)",
58
58
  graphBackground: "var(--graphy-graph-background)",
59
59
  legendFocusOutlineColor: "var(--graphy-legend-focus-outline-color)",
60
- annotationFrameBorderColor: "var(--graphy-annotation-frame-border-color)",
60
+ annotationOutlineColor: "var(--graphy-annotation-outline-color)",
61
61
  editMenuTriggerIconColor: "var(--graphy-edit-menu-trigger-icon-color)",
62
62
  tooltipRowGap: "var(--graphy-tooltip-row-gap)",
63
63
  editorControlHeight: "var(--graphy-editor-control-height)",
@@ -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)",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.1789643389031",
14
+ "version": "1.9.0-beta.1789669748378",
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.1789643389031"
58
+ "@graphysdk/viz-engine": "1.9.0-beta.1789669748378"
59
59
  },
60
60
  "peerDependencies": {
61
61
  "@tiptap/core": "^3.0.0",