@graphysdk/react-renderer 1.9.0-beta.1789034907363 → 1.9.0-beta.1789110926690

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,21 +1,21 @@
1
- import { Ct as Dt, Ft as le, It as ne, Lt as A, M as $t, Mt as xt, Nt as Ht, O as Mt, Pt as Lt, St as ue, Tt as Pt, X as Bt, Y as Kt, _ as Ot, _t as me, a as At, bt as he, ct as jt, gt as K, i as Ft, it as Ut, j as Yt, jt as Wt, k as Vt, lt as Xt, mt as Qt, n as zt, pt as Jt, r as Zt, rt as er, s as tr, t as ge, tt as rr, vt as nr, wt as sr, xt as or, yt as j } from "./history-chords-XaZhRBsb.js";
2
- import { d as ar, t as pe } from "./dev.utils-DT-z_GBs.js";
3
- import { COMPILER_STAGE_KEYS as F, Geom as fe, GraphCompilationSession as ve, areEditTargetsEqual as ye, buildDiagnostic as V, createAnchorResolver as be, createCompiler as Se, createGraphyBuilder as Ee, createStyleResolver as Ce, 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 Ie, useCallback as f, useEffect as x, useId as ke, useImperativeHandle as Ge, useMemo as $, useRef as Q, useState as C, useSyncExternalStore as we } from "react";
5
- import { Fragment as _e, jsx as d, jsxs as v } from "react/jsx-runtime";
1
+ import { Ct as Dt, Ft as $t, It as le, Lt as ne, M as xt, Nt as Ht, O as Mt, Pt as Lt, Rt as A, St as ue, Tt as Pt, X as Bt, Y as Kt, _ as Ot, _t as me, a as At, bt as he, ct as jt, gt as K, i as Ft, it as Ut, j as Yt, jt as Wt, k as Vt, lt as Xt, mt as Qt, n as zt, pt as Jt, r as Zt, rt as er, s as tr, t as ge, tt as rr, vt as nr, wt as sr, xt as or, yt as j } from "./history-chords-BLPhwLjz.js";
2
+ import { n as ar } from "./theme.contract.css-Rb-GELRv.js";
3
+ import { COMPILER_STAGE_KEYS as F, Geom as pe, GraphCompilationSession as fe, areEditTargetsEqual as ve, buildDiagnostic as V, createAnchorResolver as ye, createCompiler as be, createGraphyBuilder as Se, createStyleResolver as Ee, findAnnotation as Ce, findLayerById as X, isCompilerCachingEnabled as Te, resolveDefinition as Ne, setCompilerCachingEnabled as Re, toPercent as L } from "@graphysdk/viz-engine";
4
+ import { Component as qe, useCallback as f, useEffect as x, useId as Ie, useImperativeHandle as ke, useMemo as $, useRef as Q, useState as C, useSyncExternalStore as Ge } from "react";
5
+ import { Fragment as we, jsx as d, jsxs as v } from "react/jsx-runtime";
6
6
  import { useStore as z } from "zustand";
7
7
  import { createStore as U } from "zustand/vanilla";
8
- import De from "clsx";
9
- import './index.css';var $e = "_1a5iqpb0", xe = "_1a5iqpb1";
10
- var He = "_1a5iqpb3", Me = "_1a5iqpb4", Le = "_1a5iqpb5";
8
+ import _e from "clsx";
9
+ import './index.css';var De = "_1a5iqpb0", $e = "_1a5iqpb1";
10
+ var xe = "_1a5iqpb3", He = "_1a5iqpb4", Me = "_1a5iqpb5";
11
11
  var J = ({ errors: e }) => {
12
12
  const [t, ...r] = e;
13
13
  return /* @__PURE__ */ v("div", {
14
14
  role: "alert",
15
- className: $e,
15
+ className: De,
16
16
  children: [
17
17
  /* @__PURE__ */ d("strong", {
18
- className: xe,
18
+ className: $e,
19
19
  children: "This chart could not be rendered."
20
20
  }),
21
21
  t && /* @__PURE__ */ d(Z, { diagnostic: t }),
@@ -26,14 +26,14 @@ var J = ({ errors: e }) => {
26
26
  ]
27
27
  });
28
28
  }, Z = ({ diagnostic: e }) => /* @__PURE__ */ v("div", {
29
- className: He,
29
+ className: xe,
30
30
  children: [
31
31
  /* @__PURE__ */ d("span", {
32
- className: Me,
32
+ className: He,
33
33
  children: e.code
34
34
  }),
35
35
  /* @__PURE__ */ d("p", {
36
- className: Le,
36
+ className: Me,
37
37
  children: e.message
38
38
  }),
39
39
  e.suggestion && /* @__PURE__ */ d("p", {
@@ -42,10 +42,10 @@ var J = ({ errors: e }) => {
42
42
  })
43
43
  ]
44
44
  });
45
- function Pe(e = [], t = []) {
45
+ function Le(e = [], t = []) {
46
46
  return e.length === t.length && e.every((r, n) => Object.is(r, t[n]));
47
47
  }
48
- var Be = class extends Ie {
48
+ var Pe = class extends qe {
49
49
  constructor(...e) {
50
50
  super(...e), this.state = { caughtDiagnostic: null };
51
51
  }
@@ -57,7 +57,7 @@ var Be = class extends Ie {
57
57
  A([r]), this.props.onError?.([r]), console.error("Chart render component stack:", t.componentStack);
58
58
  }
59
59
  componentDidUpdate(e) {
60
- this.state.caughtDiagnostic && !Pe(e.resetKeys, this.props.resetKeys) && this.setState({ caughtDiagnostic: null });
60
+ this.state.caughtDiagnostic && !Le(e.resetKeys, this.props.resetKeys) && this.setState({ caughtDiagnostic: null });
61
61
  }
62
62
  render() {
63
63
  const { caughtDiagnostic: e } = this.state;
@@ -65,21 +65,21 @@ var Be = class extends Ie {
65
65
  const { forcedErrors: t, children: r } = this.props;
66
66
  return t && t.length > 0 ? /* @__PURE__ */ d(J, { errors: t }) : r;
67
67
  }
68
- }, se = (e) => typeof e == "object" && "geom" in e && "render" in e, Ke = (e) => {
69
- const t = Re(e);
70
- return t instanceof fe ? t : null;
71
- }, Oe = (e, t) => {
72
- const r = e.filter((n) => Ae(n, t));
68
+ }, se = (e) => typeof e == "object" && "geom" in e && "render" in e, Be = (e) => {
69
+ const t = Ne(e);
70
+ return t instanceof pe ? t : null;
71
+ }, Ke = (e, t) => {
72
+ const r = e.filter((n) => Oe(n, t));
73
73
  return r.length === e.length ? e : r;
74
- }, Ae = (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, ee = [], je = () => U((e) => ({
74
+ }, Oe = (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 = [], Ae = () => U((e) => ({
75
75
  selection: ee,
76
- setSelection: (t) => e((r) => Fe(r.selection, t) ? r : { selection: t }),
76
+ setSelection: (t) => e((r) => je(r.selection, t) ? r : { selection: t }),
77
77
  clearSelection: () => e((t) => t.selection.length === 0 ? t : { selection: ee })
78
- })), Fe = (e, t) => e === t ? !0 : e.length !== t.length ? !1 : e.every((r, n) => {
78
+ })), je = (e, t) => e === t ? !0 : e.length !== t.length ? !1 : e.every((r, n) => {
79
79
  const o = t[n];
80
- return o !== void 0 && ye(r, o);
81
- }), Ue = 5, Ye = (e) => {
82
- if (!pe) return {
80
+ return o !== void 0 && ve(r, o);
81
+ }), Fe = process.env.NODE_ENV !== "production", Ue = 5, Ye = (e) => {
82
+ if (!Fe) return {
83
83
  emit: () => {
84
84
  },
85
85
  subscribe: () => Ve,
@@ -143,7 +143,7 @@ var Be = class extends Ie {
143
143
  function ze(e) {
144
144
  const t = e.filter(se), r = /* @__PURE__ */ new Set([...Object.keys(he), ...t.map((c) => c.geom)]), n = [], o = /* @__PURE__ */ new Set();
145
145
  for (const c of e) {
146
- const u = Ke(c);
146
+ const u = Be(c);
147
147
  u === null || r.has(u.type) || o.has(u.type) || (o.add(u.type), n.push({
148
148
  kind: "user-input",
149
149
  severity: "error",
@@ -296,9 +296,9 @@ var st = (e) => U((t) => ({
296
296
  setCompiled: (r) => t((n) => n.compiled === r ? n : { compiled: r })
297
297
  })), ot = ({ input: e, data: t, customPalettes: r, colorScheme: n, plugins: o, resolveRenderer: a, anchorResolver: i, onChange: c, onError: u, onWarnings: m }) => {
298
298
  const T = K(c), k = K(u), q = K(m), [{ session: h, compileBus: l }] = C(() => {
299
- const s = Se({ plugins: o });
299
+ const s = be({ plugins: o });
300
300
  return {
301
- session: new ve(s),
301
+ session: new fe(s),
302
302
  compileBus: Ye(s)
303
303
  };
304
304
  }), [p] = C(() => ze(o ?? [])), y = Q(null), [G] = C(it), N = Q(null), b = f((s) => p.errors.length === 0 ? s : [...p.errors, ...s ?? []], [p]), _ = f((s) => {
@@ -415,7 +415,7 @@ var st = (e) => U((t) => ({
415
415
  notify: () => e.forEach((t) => t())
416
416
  };
417
417
  }, at = ({ data: e, input: t, plugins: r = [], formattingLocale: n, handleRef: o, onChange: a, onError: i, onWarnings: c, customPalettes: u, colorScheme: m = "light", children: T }) => {
418
- const [k] = C(() => me(r.filter(se))), q = ke(), [h] = C(() => be(r)), [l] = C(() => je()), p = $(() => Ce({ colorScheme: m }), [m]), { store: y, dispatch: G, seal: N, history: b, subscribe: _, getCompiled: H, compileBus: D, compileErrors: I } = ot({
418
+ const [k] = C(() => me(r.filter(se))), q = Ie(), [h] = C(() => ye(r)), [l] = C(() => Ae()), p = $(() => Ee({ colorScheme: m }), [m]), { store: y, dispatch: G, seal: N, history: b, subscribe: _, getCompiled: H, compileBus: D, compileErrors: I } = ot({
419
419
  input: t,
420
420
  data: e,
421
421
  customPalettes: u,
@@ -432,14 +432,14 @@ var st = (e) => U((t) => ({
432
432
  return y.subscribe((w, M) => {
433
433
  if (w.compiled.spec === M.compiled.spec) return;
434
434
  const { selection: E, setSelection: B } = l.getState();
435
- E.length !== 0 && B(Oe(E, w.compiled.spec));
435
+ E.length !== 0 && B(Ke(E, w.compiled.spec));
436
436
  });
437
437
  }, [y, l]);
438
438
  const S = $(() => ({
439
439
  dispatch: G,
440
440
  seal: N
441
441
  }), [G, N]);
442
- Ge(o, () => ({
442
+ ke(o, () => ({
443
443
  commands: S,
444
444
  undo: b.undo,
445
445
  redo: b.redo,
@@ -478,7 +478,7 @@ var st = (e) => U((t) => ({
478
478
  p,
479
479
  h
480
480
  ]);
481
- return /* @__PURE__ */ d(Be, {
481
+ return /* @__PURE__ */ d(Pe, {
482
482
  forcedErrors: I,
483
483
  onError: i,
484
484
  resetKeys: [t, e],
@@ -492,7 +492,7 @@ var st = (e) => U((t) => ({
492
492
  });
493
493
  };
494
494
  function gr(e) {
495
- const t = Ee(e);
495
+ const t = Se(e);
496
496
  return {
497
497
  ...t,
498
498
  GraphProvider: (n) => /* @__PURE__ */ d(at, {
@@ -530,7 +530,7 @@ var Et = "drqe3uh", Ct = "drqe3ui", te = {
530
530
  cached: "drqe3ur drqe3up",
531
531
  untouched: "drqe3us drqe3up"
532
532
  }, vr = ({ width: e = 380, style: t, className: r } = {}) => {
533
- const { compileBus: n } = ne(), [o] = C(() => We()), [a, i] = C(!1), [c, u] = C(Ne);
533
+ const { compileBus: n } = ne(), [o] = C(() => We()), [a, i] = C(!1), [c, u] = C(Te);
534
534
  x(() => {
535
535
  const { recordCompile: l } = o.getState(), p = n.getLastTrigger(), y = n.getLastCompile();
536
536
  return p && y && l(p, y), n.subscribe(l);
@@ -538,11 +538,11 @@ var Et = "drqe3uh", Ct = "drqe3ui", te = {
538
538
  const m = z(o, (l) => l.lastCompile), T = z(o, (l) => l.history), k = n.getCacheStats(), q = m === null && T.length === 0, h = () => {
539
539
  u((l) => {
540
540
  const p = !l;
541
- return qe(p), p;
541
+ return Re(p), p;
542
542
  });
543
543
  };
544
544
  return /* @__PURE__ */ v("div", {
545
- className: De(ft, r),
545
+ className: _e(ft, r),
546
546
  style: {
547
547
  width: e,
548
548
  ...t
@@ -576,7 +576,7 @@ 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(Tt, {
579
+ !a && !q && /* @__PURE__ */ v(we, { children: [/* @__PURE__ */ d(Tt, {
580
580
  delta: m?.stages,
581
581
  cumulative: k
582
582
  }), /* @__PURE__ */ d(Nt, { entries: T })] })
@@ -680,7 +680,7 @@ var Et = "drqe3uh", Ct = "drqe3ui", te = {
680
680
  for (const n of F) t(e[n]) && (r += 1);
681
681
  return r;
682
682
  }, ie = (e) => e >= 10 ? `${e.toFixed(0)}ms` : `${e.toFixed(2)}ms`, yr = () => {
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 = we(o, a, a);
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,
686
686
  undo: r,
@@ -729,7 +729,7 @@ export {
729
729
  or as DefaultSwatch,
730
730
  Kt as DefaultTooltip,
731
731
  vr as DevToolsPanel,
732
- Be as GraphErrorBoundary,
732
+ Pe as GraphErrorBoundary,
733
733
  J as GraphErrorPanel,
734
734
  at as GraphProvider,
735
735
  At as GraphRenderer,
@@ -743,9 +743,9 @@ export {
743
743
  nr as defineGeomRenderer,
744
744
  Ut as lightTheme,
745
745
  Wt as lightenCss,
746
- Oe as pruneSelection,
747
- $t as resolveBrandMarkVisual,
748
- Lt as useCompiledSelector,
746
+ Ke as pruneSelection,
747
+ xt as resolveBrandMarkVisual,
748
+ $t as useCompiledSelector,
749
749
  Xt as useElementScreenRect,
750
750
  Jt as useGeomHitTest,
751
751
  jt as useGeomHover,
@@ -756,8 +756,8 @@ export {
756
756
  Ot as useGraphSelection,
757
757
  Zt as useHandleCompiled,
758
758
  Bt as useHoverState,
759
- xt as useStyleReaders,
760
- Ht as useStyleResolver,
759
+ Ht as useStyleReaders,
760
+ Lt as useStyleResolver,
761
761
  sr as useTextMeasurer,
762
762
  ar as vars
763
763
  };
@@ -0,0 +1 @@
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}});
@@ -1,5 +1,4 @@
1
- import { NAMED_WEIGHTS as d } from "@graphysdk/viz-engine";
2
- import './dev.css';var S = [
1
+ var a = [
3
2
  "canvasDefault",
4
3
  "canvasBlue",
5
4
  "canvasCyan",
@@ -11,7 +10,7 @@ import './dev.css';var S = [
11
10
  "canvasPurple",
12
11
  "canvasGray",
13
12
  "canvasInverse"
14
- ], e = {
13
+ ], r = {
15
14
  white: "var(--graphy-white)",
16
15
  black: "var(--graphy-black)",
17
16
  transparent: "var(--graphy-transparent)",
@@ -57,22 +56,12 @@ import './dev.css';var S = [
57
56
  overlayBackground: "var(--graphy-overlay-background)",
58
57
  overlayBorderGradient: "var(--graphy-overlay-border-gradient)",
59
58
  graphBackground: "var(--graphy-graph-background)",
60
- legendBackground: "var(--graphy-legend-background)",
61
- legendBorderColor: "var(--graphy-legend-border-color)",
62
59
  legendFocusOutlineColor: "var(--graphy-legend-focus-outline-color)",
63
- legendTextColor: "var(--graphy-legend-text-color)",
64
60
  annotationFrameBorderColor: "var(--graphy-annotation-frame-border-color)",
65
61
  editMenuTriggerIconColor: "var(--graphy-edit-menu-trigger-icon-color)",
66
- tooltipBorderRadius: "var(--graphy-tooltip-border-radius)",
67
- tooltipPaddingBlock: "var(--graphy-tooltip-padding-block)",
68
- tooltipPaddingInline: "var(--graphy-tooltip-padding-inline)",
69
62
  tooltipRowGap: "var(--graphy-tooltip-row-gap)",
70
- tooltipShadow: "var(--graphy-tooltip-shadow)",
71
63
  editorControlHeight: "var(--graphy-editor-control-height)",
72
64
  legendSwatchGap: "var(--graphy-legend-swatch-gap)",
73
- legendPillPaddingInline: "var(--graphy-legend-pill-padding-inline)",
74
- legendPillPaddingBlock: "var(--graphy-legend-pill-padding-block)",
75
- legendPillBorderWidth: "var(--graphy-legend-pill-border-width)",
76
65
  headlineRowGap: "var(--graphy-headline-row-gap)",
77
66
  canvasDefault: "var(--graphy-canvas-default)",
78
67
  canvasBlue: "var(--graphy-canvas-blue)",
@@ -108,8 +97,6 @@ import './dev.css';var S = [
108
97
  toolbarButtonBackgroundColorHovered: "var(--graphy-toolbar-button-background-color-hovered)",
109
98
  toolbarButtonBackgroundColorSelected: "var(--graphy-toolbar-button-background-color-selected)",
110
99
  toolbarSeparatorColor: "var(--graphy-toolbar-separator-color)",
111
- tooltipBackground: "var(--graphy-tooltip-background)",
112
- tooltipBorderColor: "var(--graphy-tooltip-border-color)",
113
100
  fontFamily: "var(--graphy-font-family)",
114
101
  fontFamilyHeading: "var(--graphy-font-family-heading)",
115
102
  fontWeightRegular: "var(--graphy-font-weight-regular)",
@@ -138,7 +125,6 @@ import './dev.css';var S = [
138
125
  fontLineHeightHeadingSm: "var(--graphy-font-line-height-heading-sm)",
139
126
  fontLineHeightHeadingMd: "var(--graphy-font-line-height-heading-md)",
140
127
  fontLineHeightHeadingLg: "var(--graphy-font-line-height-heading-lg)",
141
- fontLegendLabel: "var(--graphy-font-legend-label)",
142
128
  fontButton: "var(--graphy-font-button)",
143
129
  fontInput: "var(--graphy-font-input)",
144
130
  fontInputLabel: "var(--graphy-font-input-label)",
@@ -169,115 +155,8 @@ import './dev.css';var S = [
169
155
  fontEditorControlValue: "var(--graphy-font-editor-control-value)",
170
156
  fontEditorSectionTitle: "var(--graphy-font-editor-section-title)",
171
157
  fontEditorCaption: "var(--graphy-font-editor-caption)"
172
- }, p = `"Stack Sans Text", 'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI', 'Roboto', 'Oxygen-Sans', 'Ubuntu',
173
- 'Cantarell', 'Helvetica Neue', 'NotoSansArabic', 'NotoSansJP', 'NotoSansSC', 'NotoSansKR', 'NotoSerifKR', sans-serif, 'Apple Color Emoji', 'NotoColorEmoji'`, y = p, l = {
174
- regular: d.regular,
175
- medium: d.medium,
176
- semibold: d.semiBold,
177
- bold: d.bold,
178
- extraBold: d.extraBold
179
- }, o = {
180
- xxs: 1,
181
- xs: 1.1,
182
- sm: 1.2,
183
- md: 1.4,
184
- lg: 1.6,
185
- xl: 2,
186
- editorBody: 1.5,
187
- headingSm: 1.8,
188
- headingMd: 2.2,
189
- headingLg: 2.8
190
- }, r = {
191
- xxs: 1,
192
- xs: 1,
193
- sm: 1.3,
194
- md: 1.43,
195
- lg: 1,
196
- xl: 1,
197
- editorBody: 1.47,
198
- headingSm: 1.25,
199
- headingMd: 1.41,
200
- headingLg: 1.29
201
- }, f = { fontLegendLabel: {
202
- weight: "fontWeightMedium",
203
- size: "fontSizeSm",
204
- lineHeight: "fontLineHeightSm"
205
- } }, m = (i) => i in f, c = (i, a) => {
206
- const g = f[i], h = t(a.weight?.toString() ?? e[g.weight], a.size === void 0 ? e[g.size] : `${a.size.value}${a.size.unit}`, a.lineHeight?.toString() ?? e[g.lineHeight], a.family ?? e.fontFamily);
207
- return a.style === void 0 || a.style === "normal" ? h : `${a.style} ${h}`;
208
- }, n = (i) => `${i}em`, u = {
209
- textScale: "1",
210
- fontFamily: p,
211
- fontFamilyHeading: y,
212
- fontWeightRegular: l.regular.toString(),
213
- fontWeightMedium: l.medium.toString(),
214
- fontWeightSemibold: l.semibold.toString(),
215
- fontWeightBold: l.bold.toString(),
216
- fontWeightExtraBold: l.extraBold.toString(),
217
- fontSizeXxs: n(o.xxs),
218
- fontSizeXs: n(o.xs),
219
- fontSizeSm: n(o.sm),
220
- fontSizeMd: n(o.md),
221
- fontSizeLg: n(o.lg),
222
- fontSizeXl: n(o.xl),
223
- fontLineHeightXxs: r.xxs.toString(),
224
- fontLineHeightXs: r.xs.toString(),
225
- fontLineHeightSm: r.sm.toString(),
226
- fontLineHeightMd: r.md.toString(),
227
- fontLineHeightLg: r.lg.toString(),
228
- fontLineHeightXl: r.xl.toString()
229
- }, b = {
230
- fontSizeEditorBody: n(o.editorBody),
231
- fontSizeHeadingSm: n(o.headingSm),
232
- fontSizeHeadingMd: n(o.headingMd),
233
- fontSizeHeadingLg: n(o.headingLg),
234
- fontLineHeightEditorBody: r.editorBody.toString(),
235
- fontLineHeightHeadingSm: r.headingSm.toString(),
236
- fontLineHeightHeadingMd: r.headingMd.toString(),
237
- fontLineHeightHeadingLg: r.headingLg.toString()
238
- }, t = (i, a, g, h = e.fontFamily) => `${i} ${a}/${g} ${h}`, v = ({ weight: i, size: a, lineHeight: g }) => t(e[i], e[a], e[g]), H = {
239
- fontLegendLabel: v(f.fontLegendLabel),
240
- fontUITooltip: t(e.fontWeightMedium, e.fontSizeMd, e.fontLineHeightMd),
241
- fontUITooltipSecondary: t(e.fontWeightMedium, e.fontSizeSm, e.fontLineHeightSm),
242
- fontButton: t(e.fontWeightMedium, e.fontSizeMd, e.fontLineHeightMd),
243
- fontInput: t(e.fontWeightMedium, e.fontSizeMd, e.fontLineHeightMd),
244
- fontInputLabel: t(e.fontWeightMedium, e.fontSizeXxs, e.fontLineHeightXxs),
245
- fontSelectLabel: t(e.fontWeightMedium, e.fontSizeMd, e.fontLineHeightMd),
246
- fontSelectDescription: t(e.fontWeightMedium, e.fontSizeSm, e.fontLineHeightSm),
247
- fontColorSelectLabel: t(e.fontWeightMedium, e.fontSizeSm, e.fontLineHeightSm),
248
- fontMenuTitle: t(e.fontWeightSemibold, e.fontSizeMd, e.fontLineHeightMd),
249
- fontMenuGroupTitle: t(e.fontWeightMedium, e.fontSizeSm, e.fontLineHeightSm),
250
- fontMenuItemLabel: t(e.fontWeightMedium, e.fontSizeMd, e.fontLineHeightMd),
251
- fontMenuItemLabelSecondary: t(e.fontWeightMedium, e.fontSizeSm, e.fontLineHeightSm),
252
- fontErrorBoundaryTitle: t(e.fontWeightSemibold, e.fontSizeHeadingSm, e.fontLineHeightHeadingSm),
253
- fontErrorBoundaryMessage: t(e.fontWeightMedium, e.fontSizeMd, e.fontLineHeightMd),
254
- fontTableCell: t(e.fontWeightMedium, e.fontSizeMd, e.fontLineHeightMd),
255
- fontTableHeaderCell: t(e.fontWeightSemibold, e.fontSizeSm, e.fontLineHeightSm),
256
- fontSourceLabel: t(e.fontWeightMedium, e.fontSizeSm, e.fontLineHeightSm),
257
- fontSourceLink: t(e.fontWeightRegular, e.fontSizeSm, e.fontLineHeightSm),
258
- fontTextEditorH1: t(e.fontWeightBold, e.fontSizeHeadingLg, e.fontLineHeightHeadingLg, e.fontFamilyHeading),
259
- fontTextEditorH2: t(e.fontWeightBold, e.fontSizeHeadingMd, e.fontLineHeightHeadingMd, e.fontFamilyHeading),
260
- fontTextEditorH3: t(e.fontWeightSemibold, e.fontSizeHeadingSm, e.fontLineHeightHeadingSm, e.fontFamilyHeading),
261
- fontTextEditorH6: t(e.fontWeightMedium, e.fontSizeSm, e.fontLineHeightSm),
262
- fontTextEditorBody: t(e.fontWeightMedium, e.fontSizeEditorBody, e.fontLineHeightEditorBody),
263
- fontTextEditorLink: t(e.fontWeightRegular, e.fontSizeMd, e.fontLineHeightMd),
264
- fontHighlightModeTitle: t(e.fontWeightBold, e.fontSizeMd, e.fontLineHeightMd),
265
- fontHighlightModeSubtitle: t(e.fontWeightMedium, e.fontSizeSm, e.fontLineHeightSm),
266
- fontEditorControlLabel: t(e.fontWeightMedium, e.fontSizeSm, e.fontLineHeightSm),
267
- fontEditorControlValue: t(e.fontWeightMedium, e.fontSizeSm, e.fontLineHeightSm),
268
- fontEditorSectionTitle: t(e.fontWeightSemibold, e.fontSizeSm, e.fontLineHeightSm),
269
- fontEditorCaption: t(e.fontWeightMedium, e.fontSizeXxs, e.fontLineHeightXxs)
270
- }, L = process.env.NODE_ENV !== "production";
158
+ };
271
159
  export {
272
- u as a,
273
- m as c,
274
- e as d,
275
- f as i,
276
- b as l,
277
- p as n,
278
- c as o,
279
- r,
280
- H as s,
281
- L as t,
282
- S as u
160
+ r as n,
161
+ a as t
283
162
  };
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "visualization",
12
12
  "renderer"
13
13
  ],
14
- "version": "1.9.0-beta.1789034907363",
14
+ "version": "1.9.0-beta.1789110926690",
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.1789034907363"
58
+ "@graphysdk/viz-engine": "1.9.0-beta.1789110926690"
59
59
  },
60
60
  "peerDependencies": {
61
61
  "@tiptap/core": "^3.0.0",
package/dist/dev.css DELETED
@@ -1 +0,0 @@
1
-
@@ -1,2 +0,0 @@
1
- require('./dev.css');let d=require("@graphysdk/viz-engine");var y=["canvasDefault","canvasBlue","canvasCyan","canvasGreen","canvasYellow","canvasOrange","canvasRed","canvasPink","canvasPurple","canvasGray","canvasInverse"],e={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)",legendBackground:"var(--graphy-legend-background)",legendBorderColor:"var(--graphy-legend-border-color)",legendFocusOutlineColor:"var(--graphy-legend-focus-outline-color)",legendTextColor:"var(--graphy-legend-text-color)",annotationFrameBorderColor:"var(--graphy-annotation-frame-border-color)",editMenuTriggerIconColor:"var(--graphy-edit-menu-trigger-icon-color)",tooltipBorderRadius:"var(--graphy-tooltip-border-radius)",tooltipPaddingBlock:"var(--graphy-tooltip-padding-block)",tooltipPaddingInline:"var(--graphy-tooltip-padding-inline)",tooltipRowGap:"var(--graphy-tooltip-row-gap)",tooltipShadow:"var(--graphy-tooltip-shadow)",editorControlHeight:"var(--graphy-editor-control-height)",legendSwatchGap:"var(--graphy-legend-swatch-gap)",legendPillPaddingInline:"var(--graphy-legend-pill-padding-inline)",legendPillPaddingBlock:"var(--graphy-legend-pill-padding-block)",legendPillBorderWidth:"var(--graphy-legend-pill-border-width)",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)",tooltipBackground:"var(--graphy-tooltip-background)",tooltipBorderColor:"var(--graphy-tooltip-border-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)",fontLegendLabel:"var(--graphy-font-legend-label)",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)"},p=`"Stack Sans Text", 'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI', 'Roboto', 'Oxygen-Sans', 'Ubuntu',
2
- 'Cantarell', 'Helvetica Neue', 'NotoSansArabic', 'NotoSansJP', 'NotoSansSC', 'NotoSansKR', 'NotoSerifKR', sans-serif, 'Apple Color Emoji', 'NotoColorEmoji'`,v=p,l={regular:d.NAMED_WEIGHTS.regular,medium:d.NAMED_WEIGHTS.medium,semibold:d.NAMED_WEIGHTS.semiBold,bold:d.NAMED_WEIGHTS.bold,extraBold:d.NAMED_WEIGHTS.extraBold},n={xxs:1,xs:1.1,sm:1.2,md:1.4,lg:1.6,xl:2,editorBody:1.5,headingSm:1.8,headingMd:2.2,headingLg:2.8},o={xxs:1,xs:1,sm:1.3,md:1.43,lg:1,xl:1,editorBody:1.47,headingSm:1.25,headingMd:1.41,headingLg:1.29},f={fontLegendLabel:{weight:"fontWeightMedium",size:"fontSizeSm",lineHeight:"fontLineHeightSm"}},u=i=>i in f,s=(i,r)=>{const g=f[i],h=t(r.weight?.toString()??e[g.weight],r.size===void 0?e[g.size]:`${r.size.value}${r.size.unit}`,r.lineHeight?.toString()??e[g.lineHeight],r.family??e.fontFamily);return r.style===void 0||r.style==="normal"?h:`${r.style} ${h}`},a=i=>`${i}em`,c={textScale:"1",fontFamily:p,fontFamilyHeading:v,fontWeightRegular:l.regular.toString(),fontWeightMedium:l.medium.toString(),fontWeightSemibold:l.semibold.toString(),fontWeightBold:l.bold.toString(),fontWeightExtraBold:l.extraBold.toString(),fontSizeXxs:a(n.xxs),fontSizeXs:a(n.xs),fontSizeSm:a(n.sm),fontSizeMd:a(n.md),fontSizeLg:a(n.lg),fontSizeXl:a(n.xl),fontLineHeightXxs:o.xxs.toString(),fontLineHeightXs:o.xs.toString(),fontLineHeightSm:o.sm.toString(),fontLineHeightMd:o.md.toString(),fontLineHeightLg:o.lg.toString(),fontLineHeightXl:o.xl.toString()},S={fontSizeEditorBody:a(n.editorBody),fontSizeHeadingSm:a(n.headingSm),fontSizeHeadingMd:a(n.headingMd),fontSizeHeadingLg:a(n.headingLg),fontLineHeightEditorBody:o.editorBody.toString(),fontLineHeightHeadingSm:o.headingSm.toString(),fontLineHeightHeadingMd:o.headingMd.toString(),fontLineHeightHeadingLg:o.headingLg.toString()},t=(i,r,g,h=e.fontFamily)=>`${i} ${r}/${g} ${h}`,m=({weight:i,size:r,lineHeight:g})=>t(e[i],e[r],e[g]),b={fontLegendLabel:m(f.fontLegendLabel),fontUITooltip:t(e.fontWeightMedium,e.fontSizeMd,e.fontLineHeightMd),fontUITooltipSecondary:t(e.fontWeightMedium,e.fontSizeSm,e.fontLineHeightSm),fontButton:t(e.fontWeightMedium,e.fontSizeMd,e.fontLineHeightMd),fontInput:t(e.fontWeightMedium,e.fontSizeMd,e.fontLineHeightMd),fontInputLabel:t(e.fontWeightMedium,e.fontSizeXxs,e.fontLineHeightXxs),fontSelectLabel:t(e.fontWeightMedium,e.fontSizeMd,e.fontLineHeightMd),fontSelectDescription:t(e.fontWeightMedium,e.fontSizeSm,e.fontLineHeightSm),fontColorSelectLabel:t(e.fontWeightMedium,e.fontSizeSm,e.fontLineHeightSm),fontMenuTitle:t(e.fontWeightSemibold,e.fontSizeMd,e.fontLineHeightMd),fontMenuGroupTitle:t(e.fontWeightMedium,e.fontSizeSm,e.fontLineHeightSm),fontMenuItemLabel:t(e.fontWeightMedium,e.fontSizeMd,e.fontLineHeightMd),fontMenuItemLabelSecondary:t(e.fontWeightMedium,e.fontSizeSm,e.fontLineHeightSm),fontErrorBoundaryTitle:t(e.fontWeightSemibold,e.fontSizeHeadingSm,e.fontLineHeightHeadingSm),fontErrorBoundaryMessage:t(e.fontWeightMedium,e.fontSizeMd,e.fontLineHeightMd),fontTableCell:t(e.fontWeightMedium,e.fontSizeMd,e.fontLineHeightMd),fontTableHeaderCell:t(e.fontWeightSemibold,e.fontSizeSm,e.fontLineHeightSm),fontSourceLabel:t(e.fontWeightMedium,e.fontSizeSm,e.fontLineHeightSm),fontSourceLink:t(e.fontWeightRegular,e.fontSizeSm,e.fontLineHeightSm),fontTextEditorH1:t(e.fontWeightBold,e.fontSizeHeadingLg,e.fontLineHeightHeadingLg,e.fontFamilyHeading),fontTextEditorH2:t(e.fontWeightBold,e.fontSizeHeadingMd,e.fontLineHeightHeadingMd,e.fontFamilyHeading),fontTextEditorH3:t(e.fontWeightSemibold,e.fontSizeHeadingSm,e.fontLineHeightHeadingSm,e.fontFamilyHeading),fontTextEditorH6:t(e.fontWeightMedium,e.fontSizeSm,e.fontLineHeightSm),fontTextEditorBody:t(e.fontWeightMedium,e.fontSizeEditorBody,e.fontLineHeightEditorBody),fontTextEditorLink:t(e.fontWeightRegular,e.fontSizeMd,e.fontLineHeightMd),fontHighlightModeTitle:t(e.fontWeightBold,e.fontSizeMd,e.fontLineHeightMd),fontHighlightModeSubtitle:t(e.fontWeightMedium,e.fontSizeSm,e.fontLineHeightSm),fontEditorControlLabel:t(e.fontWeightMedium,e.fontSizeSm,e.fontLineHeightSm),fontEditorControlValue:t(e.fontWeightMedium,e.fontSizeSm,e.fontLineHeightSm),fontEditorSectionTitle:t(e.fontWeightSemibold,e.fontSizeSm,e.fontLineHeightSm),fontEditorCaption:t(e.fontWeightMedium,e.fontSizeXxs,e.fontLineHeightXxs)},H=process.env.NODE_ENV!=="production";Object.defineProperty(exports,"CANVAS_COLOR_KEYS",{enumerable:!0,get:function(){return y}});Object.defineProperty(exports,"DEFAULT_FONT_FAMILY",{enumerable:!0,get:function(){return p}});Object.defineProperty(exports,"FONT_LINE_HEIGHT",{enumerable:!0,get:function(){return o}});Object.defineProperty(exports,"IS_DEV",{enumerable:!0,get:function(){return H}});Object.defineProperty(exports,"MEASURED_ELEMENT_FONT_DEFINITIONS",{enumerable:!0,get:function(){return f}});Object.defineProperty(exports,"baseTypographyTokens",{enumerable:!0,get:function(){return c}});Object.defineProperty(exports,"buildFontShorthand",{enumerable:!0,get:function(){return s}});Object.defineProperty(exports,"elementTypographyTokens",{enumerable:!0,get:function(){return b}});Object.defineProperty(exports,"isMeasuredFontTokenKey",{enumerable:!0,get:function(){return u}});Object.defineProperty(exports,"semanticTypographyTokens",{enumerable:!0,get:function(){return S}});Object.defineProperty(exports,"vars",{enumerable:!0,get:function(){return e}});