@graphysdk/react-renderer 1.8.1-beta.1787147748310 → 1.8.1-beta.1787150640613
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/dev.css +1 -0
- package/dist/dev.utils-C5lJv1aB.cjs +2 -0
- package/dist/{dev.utils-D48tAvQu.js → dev.utils-CrfRPKW8.js} +1 -1
- package/dist/editable.cjs +1 -1
- package/dist/editable.mjs +2 -2
- package/dist/graph-config.cjs +1 -1
- package/dist/graph-config.mjs +1 -1
- package/dist/{history-chords-Cye-wytm.cjs → history-chords-CF5Tv94Y.cjs} +1 -1
- package/dist/{history-chords-BmpXYFU5.js → history-chords-PI3m_N9n.js} +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +2 -2
- package/package.json +2 -2
- package/dist/dev.utils-BgbO6kNj.cjs +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as Yo, c as Ko, d as Hr, f as jo, i as zo, l as Gr, m as f, n as Wr, o as Xo, r as qo, s as Vr, t as Jo, u as Zo } from "./dev.utils-
|
|
1
|
+
import { a as Yo, c as Ko, d as Hr, f as jo, i as zo, l as Gr, m as f, n as Wr, o as Xo, r as qo, s as Vr, t as Jo, u as Zo } from "./dev.utils-CrfRPKW8.js";
|
|
2
2
|
import { ANNOTATION_TOOLTIP_MARKER_GAP as _o, AXIS_KEYS as Tt, CachedTextMeasurer as ir, DATA_LABEL_POSITIONS as $o, DATA_LABEL_ROLES as ea, DEFAULT_GEOM_COLOR as Ur, DEFAULT_HOVER_AFFORDANCE_COLOR as Mt, GROUP_VARIABLES as ce, HeuristicTextMeasurer as ta, HoverEngine as ra, InternalError as na, LayoutCompiler as oa, POLAR_RIM_LABEL_GAP_PX as aa, RESTING_HOVER_STATE as tt, TAU as sr, alignUnitFractions as Qr, areAnchorsEqual as ia, areEditMenuTriggersEqual as sa, areEndpointsComparable as lr, arePointerRegionListsEqual as la, buildAverageLineSymbols as ca, buildCalloutHitRegions as da, buildColumnKey as Ft, buildDataLabelsContent as ua, buildFontString as ha, buildLayerIntroPlan as va, buildLayerYValueFormatter as ga, buildPinnedNumberValueFormatter as fa, buildPolarBarArcPath as fe, buildSliceGroupKey as Dt, buildTooltipContent as pa, computeArrow as ma, computeDifferenceArrow as Aa, computeDirectLabelsLayout as ya, computeLineBoxHeight as Yr, computePanelBorderPaths as xa, computePanelBorderSizes as ba, countLayerGeoms as wa, createAreaPathGenerators as Kr, createHeadlineItemRows as jr, createLineFillAreaGenerator as Sa, createLinePathGenerator as zr, createSegmentYReader as ka, createStableKeyGenerator as te, createStyleResolver as Ot, findAnnotation as Ra, findPointerRegion as cr, formatHeadline as Ea, formatLegends as Ca, formatRuleValue as Pa, getAestheticFromScaleAestheticKey as ke, getAlpha as Xr, getAngleExtent as Ht, getBarRectBounds as De, getBoundingRect as qr, getChromeDashArray as Gt, getDashArray as Re, getDifferenceArrowDimensions as Ba, getDifferenceArrowLabelBox as Ia, getGroup as it, getHoverGuideLineProps as La, getHoverGuideRectProps as Na, getPolarHoverGuideArcProps as Ta, getRadiusExtent as st, getRuleDashPattern as Ma, getRuleLabelTextColor as Fa, getSize as Da, getStackRole as Oa, getUnionExtent as Ha, getX as K, getXMax as Ga, getY as $, getYMax as Jr, isAnnotationMovable as Wa, isDefined as Zr, isFullTurnSweep as _r, isSafeUrl as Wt, orderPointerRegions as Va, placeCallouts as Ua, polarToUnit as Qa, positionToAngle as Ya, prepareAreaObservations as $r, prepareLineObservations as en, resolveArrowColor as Ka, resolveAxisLabelStyle as ja, resolveBarBorderRadiusPx as tn, resolveBarBorderTreatment as Oe, resolveBarCornerRadiiPx as za, resolveDataLabelStyle as Xa, resolveDeferredAnchors as qa, resolveGraphChromeStyle as rn, resolveGridLineStyle as St, resolveHeadlinePlacement as Ja, resolvePanelBorderStyle as nn, resolvePolarBarCornerRadiusUnit as on, resolveRuleLabelStyle as Za, resolveTickLabelStyle as _a, resolveTickLineStyle as $a, toFontSpec as He, toPanelCursor as ei, toPercent as S, toViewBoxX as an, toViewBoxY as sn, truncateToWidth as ti } from "@graphysdk/viz-engine";
|
|
3
3
|
import { Fragment as Vt, createContext as H, memo as re, useCallback as se, useContext as T, useEffect as N, useId as W, useMemo as x, useRef as B, useState as O, useSyncExternalStore as ri } from "react";
|
|
4
4
|
import { Fragment as E, jsx as i, jsxs as b } from "react/jsx-runtime";
|
|
@@ -24,7 +24,7 @@ import './history-chords.css';var dr = Object.defineProperty, ui = (e, t) => {
|
|
|
24
24
|
});
|
|
25
25
|
return t || dr(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
26
26
|
};
|
|
27
|
-
typeof window < "u" && (window.__GRAPHY_SDK__ ??= {}, window.__GRAPHY_SDK__.reactRenderer = "1.8.1-beta.
|
|
27
|
+
typeof window < "u" && (window.__GRAPHY_SDK__ ??= {}, window.__GRAPHY_SDK__.reactRenderer = "1.8.1-beta.1787150640613");
|
|
28
28
|
var hn = H(null), z = () => {
|
|
29
29
|
const e = T(hn);
|
|
30
30
|
if (!e) throw new Error("useGraph* hooks must be used inside a <GraphProvider>");
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const l=require("./history-chords-Cye-wytm.cjs"),z=require("./dev.utils-BgbO6kNj.cjs");let y=require("@graphysdk/viz-engine"),c=require("react"),i=require("react/jsx-runtime"),Y=require("zustand"),O=require("zustand/vanilla"),P=require("clsx");P=l.__toESM(P,1);function L(e){for(const t of e)(t.severity==="error"?console.error:console.warn)(`[graphy] ${t.code}: ${t.message}`,t)}var ne="_1a5iqpb0",oe="_1a5iqpb1";var ie="_1a5iqpb3",ae="_1a5iqpb4",ce="_1a5iqpb5";var K=({errors:e})=>{const[t,...r]=e;return(0,i.jsxs)("div",{role:"alert",className:ne,children:[(0,i.jsx)("strong",{className:oe,children:"This chart could not be rendered."}),t&&(0,i.jsx)(U,{diagnostic:t}),r.length>0&&(0,i.jsx)("ul",{className:"_1a5iqpb2",children:r.map((s,n)=>(0,i.jsx)("li",{children:(0,i.jsx)(U,{diagnostic:s})},`${s.code}-${n}`))})]})},U=({diagnostic:e})=>(0,i.jsxs)("div",{className:ie,children:[(0,i.jsx)("span",{className:ae,children:e.code}),(0,i.jsx)("p",{className:ce,children:e.message}),e.suggestion&&(0,i.jsx)("p",{className:"_1a5iqpb6",children:e.suggestion})]});function le(e=[],t=[]){return e.length===t.length&&e.every((r,s)=>Object.is(r,t[s]))}var X=class extends c.Component{constructor(...e){super(...e),this.state={caughtDiagnostic:null}}static getDerivedStateFromError(e){return{caughtDiagnostic:(0,y.buildDiagnostic)(e)}}componentDidCatch(e,t){const r=(0,y.buildDiagnostic)(e);L([r]),this.props.onError?.([r]),console.error("Chart render component stack:",t.componentStack)}componentDidUpdate(e){this.state.caughtDiagnostic&&!le(e.resetKeys,this.props.resetKeys)&&this.setState({caughtDiagnostic:null})}render(){const{caughtDiagnostic:e}=this.state;if(e)return(0,i.jsx)(K,{errors:[e]});const{forcedErrors:t,children:r}=this.props;return t&&t.length>0?(0,i.jsx)(K,{errors:t}):r}},Q=e=>typeof e=="object"&&"geom"in e&&"render"in e,de=e=>{const t=(0,y.resolveDefinition)(e);return t instanceof y.Geom?t:null},J=(e,t)=>{const r=e.filter(s=>ue(s,t));return r.length===e.length?e:r},ue=(e,t)=>e.kind!=="annotation"?!0:(0,y.findAnnotation)(t.annotations,e.id)!==null,F=[],me=()=>(0,O.createStore)(e=>({selection:F,setSelection:t=>e(r=>he(r.selection,t)?r:{selection:t}),clearSelection:()=>e(t=>t.selection.length===0?t:{selection:F})})),he=(e,t)=>e===t?!0:e.length!==t.length?!1:e.every((r,s)=>{const n=t[s];return n!==void 0&&(0,y.areEditTargetsEqual)(r,n)}),ge=5,pe=e=>{if(!z.IS_DEV)return{emit:()=>{},subscribe:()=>ve,getLastTrigger:()=>null,getLastCompile:()=>null,getCacheStats:()=>e.getCacheStats()};const t=new Set;let r=null;return{emit:s=>{const n=e.getLastCompile();if(n){r=s;for(const u of t)u(s,n)}},subscribe:s=>(t.add(s),()=>{t.delete(s)}),getLastTrigger:()=>r,getLastCompile:()=>e.getLastCompile(),getCacheStats:()=>e.getCacheStats()}},fe=()=>(0,O.createStore)(e=>({lastCompile:null,history:[],nextId:1,lastSnapshot:null,recordCompile:(t,r)=>e(s=>{if(s.lastSnapshot===r)return s;const n={id:s.nextId,label:ye(t),stages:r.stages,durationMs:r.durationMs};return{lastCompile:n,history:Se(s.history,n,ge),nextId:s.nextId+1,lastSnapshot:r}})})),ve=()=>{},ye=e=>{switch(e.kind){case"init":return"init";case"input":return"input change";case"data":return"data change";case"command":return e.command.metadata.description}},Se=(e,t,r)=>{const s=e.length>=r?e.length-(r-1):0;return[...e.slice(s),t]};function be(e){const t=e.filter(Q),r=new Set([...Object.keys(l.BUILT_IN_GEOM_RENDERERS),...t.map(d=>d.geom)]),s=[],n=new Set;for(const d of e){const m=de(d);m===null||r.has(m.type)||n.has(m.type)||(n.add(m.type),s.push({kind:"user-input",severity:"error",code:"MISSING_GEOM_RENDERER",message:`Custom geom '${m.type}' is registered but has no renderer.`,context:{requested:m.type,kind:"geom-renderer"},suggestion:`Add a render half for it: \`defineGeomRenderer(${m.type}Geom, { coord, render })\`, then include it in \`plugins\`.`}))}const u=new Map;for(const d of t){if("definition"in d)continue;const m=`${d.geom}|${d.coord}`,g=u.get(m);g?g.count+=1:u.set(m,{geom:d.geom,coord:d.coord,count:1})}const a=[];for(const{geom:d,coord:m,count:g}of u.values())g<2||a.push({kind:"user-input",severity:"warning",code:"DUPLICATE_REGISTERED_TYPE",message:`Multiple render-only overrides register ('${d}', '${m}') (${g} entries); the last in the array wins.`,context:{requested:`${d}@${m}`,kind:"geom-renderer"},suggestion:`Keep a single render-only override for ('${d}', '${m}').`});return{errors:s,warnings:a}}function Ee(e,t){const{coordSystem:r,layers:s}=e,n=new Set,u=[];for(const a of s)t(a.geom,r.type)!==null||n.has(a.geom)||(n.add(a.geom),u.push({kind:"user-input",severity:"warning",code:"MISSING_GEOM_RENDERER",message:`No renderer for geom '${a.geom}' under ${r.type} coords; the layer is not painted.`,context:{requested:a.geom,kind:"geom-renderer"},suggestion:`Register a renderer for ('${a.geom}', '${r.type}') via \`defineGeomRenderer\`.`}));return u}function Ce(e,t){const{coordSystem:r,layers:s}=e,n=new Set,u=[];for(const a of s){if(a.interactive===!1||a.spatialKind!=="render-hit-test"||n.has(a.geom))continue;const d=t(a.geom,r.type);d===null||d.hitTest||l.isOverlayHosted(d)||(n.add(a.geom),u.push({kind:"user-input",severity:"warning",code:"MISSING_RENDER_HIT_TEST",message:`Geom '${a.geom}' declares spatialKind 'render-hit-test' but its renderer provides no hit-test; the layer has no hover.`,context:{requested:a.geom,kind:"geom-renderer"},suggestion:`Add a \`hitTest\` factory (precomputed geometry) or an overlay render (\`{ fn, options: { overlay: true } }\`, live simulation) to the renderer for ('${a.geom}', '${r.type}').`}))}return u}function xe(e){const t=new Set,r=[];for(const s of e.layers){const n=s.identityKey;s.interactive!==!1&&(s.spatialKind!=="render-hit-test"||typeof n!="object"||t.has(s.geom)||s.data.hasVariable(n.variable)||(t.add(s.geom),r.push({kind:"user-input",severity:"warning",code:"RENDER_HIT_TEST_IDENTITY",message:`Geom '${s.geom}' keys its identity on '${n.variable}', a column its compile output does not emit; its hover lookup is empty.`,context:{requested:s.geom,kind:"geom-renderer"},suggestion:`Emit the '${n.variable}' column from the geom's \`compile()\`, or point \`identityKey\` at a column it does emit.`})))}return r}function Te(e,t){const{coordSystem:r,layers:s}=e,n=new Set,u=[];for(const a of s){if(a.interactive===!1||a.spatialKind!=="render-hit-test"||n.has(a.geom))continue;const d=t(a.geom,r.type);d===null||!d.hitTest||!l.isOverlayHosted(d)||(n.add(a.geom),u.push({kind:"user-input",severity:"warning",code:"CONFLICTING_RENDER_HIT_TEST",message:`Geom '${a.geom}' declares both a \`hitTest\` factory and an overlay render; these are alternatives, so only the overlay is used.`,context:{requested:a.geom,kind:"geom-renderer"},suggestion:"Keep one: a `hitTest` factory for precomputed geometry, OR an overlay render (`{ fn, options: { overlay: true } }`) for a live simulation."}))}return u}function Re(e,t){const r=new Set,s=[];for(const n of e.layers)n.interactive!==!1&&(n.spatialKind!=="render-hit-test"||r.has(n.geom)||t.hasCapability(n.geom)||(r.add(n.geom),s.push({kind:"user-input",severity:"warning",code:"MISSING_ANCHOR_CAPABILITY",message:`Geom '${n.geom}' declares no \`resolveAnchorPosition\`; its observations cannot be annotated, so the editor overlay paints no creation trigger on them.`,context:{requested:n.geom,kind:"geom-renderer"},suggestion:"Implement `resolveAnchorPosition(observation, context)` on the geom, returning the normalised panel position an annotation on that observation belongs at."})));return s}function qe(e,t){const{coordSystem:r,layers:s}=e,n=new Set,u=[];for(const a of s){if(a.interactive===!1||a.spatialKind==="render-hit-test"||n.has(a.geom))continue;const d=t(a.geom,r.type);d===null||!l.isOverlayHosted(d)||(n.add(a.geom),u.push({kind:"user-input",severity:"warning",code:"OVERLAY_REQUIRES_RENDER_HIT_TEST",message:`Geom '${a.geom}' declares an overlay render but its layer's spatialKind is '${a.spatialKind}', not 'render-hit-test'; the overlay's push-path hover resolves to nothing.`,context:{requested:a.geom,kind:"geom-renderer"},suggestion:"Have the geom's manifest yield spatialKind 'render-hit-test' so the compiled layer carries the `byKey` index the overlay's `pushHover` resolves against."}))}return u}var Ge=e=>(0,O.createStore)(t=>({compiled:e,setCompiled:r=>t(s=>s.compiled===r?s:{compiled:r})})),ke=({input:e,data:t,customPalettes:r,plugins:s,resolveRenderer:n,anchorResolver:u,onChange:a,onError:d,onWarnings:m})=>{const g=l.useLatestRef(a),q=l.useLatestRef(d),j=l.useLatestRef(m),[{session:p,compileBus:b}]=(0,c.useState)(()=>{const o=(0,y.createCompiler)({plugins:s});return{session:new y.GraphCompilationSession(o),compileBus:pe(o)}}),[h]=(0,c.useState)(()=>be(s??[])),f=(0,c.useRef)(null),[S]=(0,c.useState)(Ne),x=(0,c.useRef)(null),G=(0,c.useCallback)(o=>h.errors.length===0?o:[...h.errors,...o??[]],[h]),T=(0,c.useCallback)(o=>{if(!o.ok)return o.errors;if(x.current)x.current.getState().setCompiled(o.compiled);else{const v=Ge(o.compiled);v.subscribe(S.notify),x.current=v,S.notify()}return null},[S]),[I,_]=(0,c.useState)(()=>{const o=p.compile({input:e,data:t,customPalettes:r});return f.current=o,G(T(o))}),R=(0,c.useCallback)(o=>o.ok?[...o.warnings,...Ee(o.compiled,n),...Ce(o.compiled,n),...xe(o.compiled),...Te(o.compiled,n),...qe(o.compiled,n),...Re(o.compiled,u)]:o.warnings,[n,u]),k=(0,c.useCallback)(o=>{o.length!==0&&(L(o),q.current?.(o))},[q]),E=(0,c.useCallback)(o=>{o.length!==0&&(L(o),j.current?.(o))},[j]);(0,c.useEffect)(()=>{const o=f.current;o&&(k([...h.errors,...o.ok?[]:o.errors]),E([...h.warnings,...R(o)]),o.ok&&b.emit({kind:"init"}))},[b,k,E,h,R]),(0,c.useEffect)(()=>{const o=p.update({input:e,data:t,customPalettes:r});if(!o)return;o.sealedInput&&g.current?.(o.sealedInput);const v=T(o.result);_(G(v)),v&&k(v),E(R(o.result)),v||b.emit({kind:o.inputChanged?"input":"data"})},[e,t,r,p,b,T,k,E,G,R,g]);const D=(0,c.useCallback)(o=>{_(v=>v===null?v:G(null)),E(R(o))},[G,E,R]),N=(0,c.useCallback)(o=>{o.compiled&&x.current?.getState().setCompiled(o.compiled),o.result&&D(o.result),o.command&&b.emit({kind:"command",command:o.command}),o.input&&g.current?.(o.input),o.errors&&k([...o.errors])},[D,b,g,k]),C=(0,c.useCallback)(o=>{for(const v of o)N(v);return o.some(v=>!!v.compiled)},[N]),w=(0,c.useCallback)((o,v)=>{C(p.applyCommand(o,v))},[p,C]),M=(0,c.useCallback)(()=>{C(p.seal())},[p,C]),B=(0,c.useCallback)(()=>C(p.undo()),[p,C]),A=(0,c.useCallback)(()=>C(p.redo()),[p,C]),re=(0,c.useMemo)(()=>({stack:p.history,undo:B,redo:A}),[p,B,A]),se=(0,c.useCallback)(()=>x.current?.getState().compiled??null,[]);return{store:x.current,dispatch:w,seal:M,history:re,subscribe:S.subscribe,getCompiled:se,compileBus:b,compileErrors:I}},Ne=()=>{const e=new Set;return{subscribe:t=>(e.add(t),()=>{e.delete(t)}),notify:()=>e.forEach(t=>t())}},je={},Z=({data:e,input:t,plugins:r=[],formattingLocale:s,handleRef:n,onChange:u,onError:a,onWarnings:d,customPalettes:m,colorScheme:g="light",themeOverrides:q=je,children:j})=>{const[p]=(0,c.useState)(()=>l.createGeomRendererResolver(r.filter(Q))),b=(0,c.useId)(),[h]=(0,c.useState)(()=>(0,y.createAnchorResolver)(r)),[f]=(0,c.useState)(()=>me()),{store:S,dispatch:x,seal:G,history:T,subscribe:I,getCompiled:_,compileBus:R,compileErrors:k}=ke({input:t,data:e,customPalettes:m,plugins:r,resolveRenderer:p,anchorResolver:h,onChange:u,onError:a,onWarnings:d});(0,c.useEffect)(()=>{if(S)return S.subscribe((N,C)=>{if(N.compiled.spec===C.compiled.spec)return;const{selection:w,setSelection:M}=f.getState();w.length!==0&&M(J(w,N.compiled.spec))})},[S,f]);const E=(0,c.useMemo)(()=>({dispatch:x,seal:G}),[x,G]);(0,c.useImperativeHandle)(n,()=>({commands:E,undo:T.undo,redo:T.redo,subscribe:I,getCompiled:_,getSelection:()=>f.getState().selection,setSelection:N=>f.getState().setSelection(N),subscribeSelection:f.subscribe}),[E,T,I,_,f]);const D=(0,c.useMemo)(()=>S?{chartId:b,store:S,selectionStore:f,commands:E,history:T,formattingLocale:s,compileBus:R,colorScheme:g,themeOverrides:q,anchorResolver:h}:null,[b,S,f,E,T,s,R,g,q,h]);return(0,i.jsx)(X,{forcedErrors:k,onError:a,resetKeys:[t,e],children:D?(0,i.jsx)(l.GraphContext.Provider,{value:D,children:(0,i.jsx)(l.GeomRendererResolverProvider,{value:p,children:j})}):null})};function _e(e){const t=(0,y.createGraphyBuilder)(e);return{...t,GraphProvider:s=>(0,i.jsx)(Z,{...s,plugins:t.plugins})}}var De=({children:e,...t})=>(0,i.jsx)("svg",{viewBox:"0 0 1 1",preserveAspectRatio:"none",width:"100%",height:"100%",pointerEvents:"none",...t,children:e}),Ie="drqe3u0",we="drqe3u1",He="drqe3u2",Me="drqe3u3",H="drqe3u4",$e="drqe3u5",Pe="drqe3u6",Le="drqe3u7",$="drqe3u8",Ke="drqe3u9",Oe="drqe3ua";var Be="drqe3uc",Ae="drqe3ud",Ye="drqe3ue",Ue="drqe3uf";var Fe="drqe3uh",Ve="drqe3ui",V={enabled:"drqe3uk drqe3uj",disabled:"drqe3ul drqe3uj"},W={ran:"drqe3un drqe3um",dim:"drqe3uo drqe3um"},ee={ran:"drqe3uq drqe3up",cached:"drqe3ur drqe3up",untouched:"drqe3us drqe3up"},We=({width:e=380,style:t,className:r}={})=>{const{compileBus:s}=l.useGraphContext(),[n]=(0,c.useState)(()=>fe()),[u,a]=(0,c.useState)(!1),[d,m]=(0,c.useState)(y.isCompilerCachingEnabled);(0,c.useEffect)(()=>{const{recordCompile:h}=n.getState(),f=s.getLastTrigger(),S=s.getLastCompile();return f&&S&&h(f,S),s.subscribe(h)},[n,s]);const g=(0,Y.useStore)(n,h=>h.lastCompile),q=(0,Y.useStore)(n,h=>h.history),j=s.getCacheStats(),p=g===null&&q.length===0,b=()=>{m(h=>{const f=!h;return(0,y.setCompilerCachingEnabled)(f),f})};return(0,i.jsxs)("div",{className:(0,P.default)(Oe,r),style:{width:e,...t},children:[(0,i.jsxs)("div",{className:Ie,children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:we,children:"compile cache"}),(0,i.jsx)("div",{className:Ye,children:p?"production: stats disabled":g?`last: ${g.label} · ${te(g.durationMs)}`:"awaiting first compile…"})]}),(0,i.jsx)("button",{type:"button",onClick:()=>a(h=>!h),className:Ue,children:u?"▾":"▴"})]}),!u&&(0,i.jsxs)("div",{className:"drqe3ub",children:[(0,i.jsxs)("button",{type:"button",onClick:b,className:d?V.enabled:V.disabled,"aria-pressed":d,children:["cache ",d?"enabled":"disabled"]}),(0,i.jsx)("span",{className:"drqe3ug",children:"next compile reflects this toggle"})]}),!u&&!p&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ze,{delta:g?.stages,cumulative:j}),(0,i.jsx)(Xe,{entries:q})]})]})},ze=({delta:e,cumulative:t})=>(0,i.jsxs)("table",{className:He,children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{className:Fe,children:[(0,i.jsx)("th",{className:Me,children:"stage"}),(0,i.jsx)("th",{className:H,children:"Δ miss"}),(0,i.jsx)("th",{className:H,children:"Δ hit"}),(0,i.jsx)("th",{className:H,children:"total miss"}),(0,i.jsx)("th",{className:H,children:"total hit"})]})}),(0,i.jsx)("tbody",{children:y.COMPILER_STAGE_KEYS.map(r=>{const s=e?.[r],n=Qe(s);return(0,i.jsxs)("tr",{className:Be,children:[(0,i.jsxs)("td",{className:$e,children:[(0,i.jsx)("span",{className:ee[n],"aria-hidden":!0})," ",r]}),(0,i.jsx)("td",{className:n==="ran"?W.ran:W.dim,children:s?.misses??0}),(0,i.jsx)("td",{className:$,children:s?.hits??0}),(0,i.jsx)("td",{className:$,children:t[r].misses}),(0,i.jsx)("td",{className:$,children:t[r].hits})]},r)})})]}),Xe=({entries:e})=>e.length===0?null:(0,i.jsxs)("div",{className:Ae,children:[(0,i.jsx)("div",{className:Ve,children:"recent compiles"}),e.map(t=>{const r=Je(t.stages,u=>u.misses>0),s=y.COMPILER_STAGE_KEYS.length,n=r===0?"cached":"ran";return(0,i.jsxs)("div",{className:Pe,children:[(0,i.jsx)("span",{className:ee[n],"aria-hidden":!0}),(0,i.jsx)("span",{className:Le,title:t.label,children:t.label}),(0,i.jsxs)("span",{className:Ke,children:[r,"/",s," ran · ",te(t.durationMs)]})]},t.id)})]}),Qe=e=>!e||e.hits===0&&e.misses===0?"untouched":e.misses>0?"ran":"cached",Je=(e,t)=>{let r=0;for(const s of y.COMPILER_STAGE_KEYS)t(e[s])&&(r+=1);return r},te=e=>e>=10?`${e.toFixed(0)}ms`:`${e.toFixed(2)}ms`,Ze=()=>{const{history:e}=l.useGraphContext(),{stack:t,undo:r,redo:s}=e,n=(0,c.useCallback)(d=>t.subscribe(d),[t]),u=(0,c.useCallback)(()=>t.getSnapshot(),[t]),a=(0,c.useSyncExternalStore)(n,u,u);return(0,c.useMemo)(()=>({...a,undo:r,redo:s}),[a,r,s])},et=new Set(["button","checkbox","color","file","hidden","image","radio","range","reset","submit"]),tt=(e,t={})=>{const{target:r,enabled:s=!0}=t;(0,c.useEffect)(()=>{const n=rt(r);if(!s||!n)return;const u=a=>{if(!st(a)||a.defaultPrevented||nt(a.target))return;const d=l.resolveHistoryStep(a);if(!d)return;const m=e.current;m&&(d==="undo"?m.undo():m.redo())&&a.preventDefault()};return n.addEventListener("keydown",u),()=>n.removeEventListener("keydown",u)},[e,r,s])},rt=e=>e===void 0?window:e!==null&&"current"in e?e.current:e,st=e=>"key"in e,nt=e=>e instanceof HTMLInputElement?!et.has(e.type):e instanceof HTMLElement?e.isContentEditable||e.tagName==="TEXTAREA":!1;exports.BrandMark=l.BrandMark;exports.CanvasTextMeasurer=l.CanvasTextMeasurer;exports.DefaultFooter=l.DefaultFooter;exports.DefaultGrid=l.DefaultGrid;exports.DefaultHeader=l.DefaultHeader;exports.DefaultSwatch=l.DefaultSwatch;exports.DefaultTooltip=l.DefaultTooltip;exports.DevToolsPanel=We;exports.GraphErrorBoundary=X;exports.GraphErrorPanel=K;exports.GraphProvider=Z;exports.GraphRenderer=l.GraphRenderer;exports.HoverProvider=l.HoverProvider;exports.TextMeasurerProvider=l.TextMeasurerProvider;exports.ThemeProvider=l.ThemeProvider;exports.UnitSpaceSvg=De;exports.createGraphyKit=_e;exports.darkTheme=l.darkTheme;exports.defineGeomRenderer=l.defineGeomRenderer;exports.lightTheme=l.lightTheme;exports.lightenCss=l.lightenCss;exports.pruneSelection=J;exports.resolveBrandMarkVisual=l.resolveBrandMarkVisual;exports.useCompiledSelector=l.useCompiledSelector;exports.useElementScreenRect=l.useElementScreenRect;exports.useGeomHitTest=l.useGeomHitTest;exports.useGeomHover=l.useGeomHover;exports.useGraphCommands=l.useGraphCommands;exports.useGraphHandle=l.useGraphHandle;exports.useGraphHistory=Ze;exports.useGraphHistoryShortcuts=tt;exports.useGraphSelection=l.useGraphSelection;exports.useHandleCompiled=l.useHandleCompiled;exports.useHoverState=l.useHoverState;exports.useTextMeasurer=l.useTextMeasurer;exports.vars=z.vars;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const l=require("./history-chords-CF5Tv94Y.cjs"),z=require("./dev.utils-C5lJv1aB.cjs");let y=require("@graphysdk/viz-engine"),c=require("react"),i=require("react/jsx-runtime"),Y=require("zustand"),O=require("zustand/vanilla"),P=require("clsx");P=l.__toESM(P,1);function L(e){for(const t of e)(t.severity==="error"?console.error:console.warn)(`[graphy] ${t.code}: ${t.message}`,t)}var ne="_1a5iqpb0",oe="_1a5iqpb1";var ie="_1a5iqpb3",ae="_1a5iqpb4",ce="_1a5iqpb5";var K=({errors:e})=>{const[t,...r]=e;return(0,i.jsxs)("div",{role:"alert",className:ne,children:[(0,i.jsx)("strong",{className:oe,children:"This chart could not be rendered."}),t&&(0,i.jsx)(U,{diagnostic:t}),r.length>0&&(0,i.jsx)("ul",{className:"_1a5iqpb2",children:r.map((s,n)=>(0,i.jsx)("li",{children:(0,i.jsx)(U,{diagnostic:s})},`${s.code}-${n}`))})]})},U=({diagnostic:e})=>(0,i.jsxs)("div",{className:ie,children:[(0,i.jsx)("span",{className:ae,children:e.code}),(0,i.jsx)("p",{className:ce,children:e.message}),e.suggestion&&(0,i.jsx)("p",{className:"_1a5iqpb6",children:e.suggestion})]});function le(e=[],t=[]){return e.length===t.length&&e.every((r,s)=>Object.is(r,t[s]))}var X=class extends c.Component{constructor(...e){super(...e),this.state={caughtDiagnostic:null}}static getDerivedStateFromError(e){return{caughtDiagnostic:(0,y.buildDiagnostic)(e)}}componentDidCatch(e,t){const r=(0,y.buildDiagnostic)(e);L([r]),this.props.onError?.([r]),console.error("Chart render component stack:",t.componentStack)}componentDidUpdate(e){this.state.caughtDiagnostic&&!le(e.resetKeys,this.props.resetKeys)&&this.setState({caughtDiagnostic:null})}render(){const{caughtDiagnostic:e}=this.state;if(e)return(0,i.jsx)(K,{errors:[e]});const{forcedErrors:t,children:r}=this.props;return t&&t.length>0?(0,i.jsx)(K,{errors:t}):r}},Q=e=>typeof e=="object"&&"geom"in e&&"render"in e,de=e=>{const t=(0,y.resolveDefinition)(e);return t instanceof y.Geom?t:null},J=(e,t)=>{const r=e.filter(s=>ue(s,t));return r.length===e.length?e:r},ue=(e,t)=>e.kind!=="annotation"?!0:(0,y.findAnnotation)(t.annotations,e.id)!==null,F=[],me=()=>(0,O.createStore)(e=>({selection:F,setSelection:t=>e(r=>he(r.selection,t)?r:{selection:t}),clearSelection:()=>e(t=>t.selection.length===0?t:{selection:F})})),he=(e,t)=>e===t?!0:e.length!==t.length?!1:e.every((r,s)=>{const n=t[s];return n!==void 0&&(0,y.areEditTargetsEqual)(r,n)}),ge=5,pe=e=>{if(!z.IS_DEV)return{emit:()=>{},subscribe:()=>ve,getLastTrigger:()=>null,getLastCompile:()=>null,getCacheStats:()=>e.getCacheStats()};const t=new Set;let r=null;return{emit:s=>{const n=e.getLastCompile();if(n){r=s;for(const u of t)u(s,n)}},subscribe:s=>(t.add(s),()=>{t.delete(s)}),getLastTrigger:()=>r,getLastCompile:()=>e.getLastCompile(),getCacheStats:()=>e.getCacheStats()}},fe=()=>(0,O.createStore)(e=>({lastCompile:null,history:[],nextId:1,lastSnapshot:null,recordCompile:(t,r)=>e(s=>{if(s.lastSnapshot===r)return s;const n={id:s.nextId,label:ye(t),stages:r.stages,durationMs:r.durationMs};return{lastCompile:n,history:Se(s.history,n,ge),nextId:s.nextId+1,lastSnapshot:r}})})),ve=()=>{},ye=e=>{switch(e.kind){case"init":return"init";case"input":return"input change";case"data":return"data change";case"command":return e.command.metadata.description}},Se=(e,t,r)=>{const s=e.length>=r?e.length-(r-1):0;return[...e.slice(s),t]};function be(e){const t=e.filter(Q),r=new Set([...Object.keys(l.BUILT_IN_GEOM_RENDERERS),...t.map(d=>d.geom)]),s=[],n=new Set;for(const d of e){const m=de(d);m===null||r.has(m.type)||n.has(m.type)||(n.add(m.type),s.push({kind:"user-input",severity:"error",code:"MISSING_GEOM_RENDERER",message:`Custom geom '${m.type}' is registered but has no renderer.`,context:{requested:m.type,kind:"geom-renderer"},suggestion:`Add a render half for it: \`defineGeomRenderer(${m.type}Geom, { coord, render })\`, then include it in \`plugins\`.`}))}const u=new Map;for(const d of t){if("definition"in d)continue;const m=`${d.geom}|${d.coord}`,g=u.get(m);g?g.count+=1:u.set(m,{geom:d.geom,coord:d.coord,count:1})}const a=[];for(const{geom:d,coord:m,count:g}of u.values())g<2||a.push({kind:"user-input",severity:"warning",code:"DUPLICATE_REGISTERED_TYPE",message:`Multiple render-only overrides register ('${d}', '${m}') (${g} entries); the last in the array wins.`,context:{requested:`${d}@${m}`,kind:"geom-renderer"},suggestion:`Keep a single render-only override for ('${d}', '${m}').`});return{errors:s,warnings:a}}function Ee(e,t){const{coordSystem:r,layers:s}=e,n=new Set,u=[];for(const a of s)t(a.geom,r.type)!==null||n.has(a.geom)||(n.add(a.geom),u.push({kind:"user-input",severity:"warning",code:"MISSING_GEOM_RENDERER",message:`No renderer for geom '${a.geom}' under ${r.type} coords; the layer is not painted.`,context:{requested:a.geom,kind:"geom-renderer"},suggestion:`Register a renderer for ('${a.geom}', '${r.type}') via \`defineGeomRenderer\`.`}));return u}function Ce(e,t){const{coordSystem:r,layers:s}=e,n=new Set,u=[];for(const a of s){if(a.interactive===!1||a.spatialKind!=="render-hit-test"||n.has(a.geom))continue;const d=t(a.geom,r.type);d===null||d.hitTest||l.isOverlayHosted(d)||(n.add(a.geom),u.push({kind:"user-input",severity:"warning",code:"MISSING_RENDER_HIT_TEST",message:`Geom '${a.geom}' declares spatialKind 'render-hit-test' but its renderer provides no hit-test; the layer has no hover.`,context:{requested:a.geom,kind:"geom-renderer"},suggestion:`Add a \`hitTest\` factory (precomputed geometry) or an overlay render (\`{ fn, options: { overlay: true } }\`, live simulation) to the renderer for ('${a.geom}', '${r.type}').`}))}return u}function xe(e){const t=new Set,r=[];for(const s of e.layers){const n=s.identityKey;s.interactive!==!1&&(s.spatialKind!=="render-hit-test"||typeof n!="object"||t.has(s.geom)||s.data.hasVariable(n.variable)||(t.add(s.geom),r.push({kind:"user-input",severity:"warning",code:"RENDER_HIT_TEST_IDENTITY",message:`Geom '${s.geom}' keys its identity on '${n.variable}', a column its compile output does not emit; its hover lookup is empty.`,context:{requested:s.geom,kind:"geom-renderer"},suggestion:`Emit the '${n.variable}' column from the geom's \`compile()\`, or point \`identityKey\` at a column it does emit.`})))}return r}function Te(e,t){const{coordSystem:r,layers:s}=e,n=new Set,u=[];for(const a of s){if(a.interactive===!1||a.spatialKind!=="render-hit-test"||n.has(a.geom))continue;const d=t(a.geom,r.type);d===null||!d.hitTest||!l.isOverlayHosted(d)||(n.add(a.geom),u.push({kind:"user-input",severity:"warning",code:"CONFLICTING_RENDER_HIT_TEST",message:`Geom '${a.geom}' declares both a \`hitTest\` factory and an overlay render; these are alternatives, so only the overlay is used.`,context:{requested:a.geom,kind:"geom-renderer"},suggestion:"Keep one: a `hitTest` factory for precomputed geometry, OR an overlay render (`{ fn, options: { overlay: true } }`) for a live simulation."}))}return u}function Re(e,t){const r=new Set,s=[];for(const n of e.layers)n.interactive!==!1&&(n.spatialKind!=="render-hit-test"||r.has(n.geom)||t.hasCapability(n.geom)||(r.add(n.geom),s.push({kind:"user-input",severity:"warning",code:"MISSING_ANCHOR_CAPABILITY",message:`Geom '${n.geom}' declares no \`resolveAnchorPosition\`; its observations cannot be annotated, so the editor overlay paints no creation trigger on them.`,context:{requested:n.geom,kind:"geom-renderer"},suggestion:"Implement `resolveAnchorPosition(observation, context)` on the geom, returning the normalised panel position an annotation on that observation belongs at."})));return s}function qe(e,t){const{coordSystem:r,layers:s}=e,n=new Set,u=[];for(const a of s){if(a.interactive===!1||a.spatialKind==="render-hit-test"||n.has(a.geom))continue;const d=t(a.geom,r.type);d===null||!l.isOverlayHosted(d)||(n.add(a.geom),u.push({kind:"user-input",severity:"warning",code:"OVERLAY_REQUIRES_RENDER_HIT_TEST",message:`Geom '${a.geom}' declares an overlay render but its layer's spatialKind is '${a.spatialKind}', not 'render-hit-test'; the overlay's push-path hover resolves to nothing.`,context:{requested:a.geom,kind:"geom-renderer"},suggestion:"Have the geom's manifest yield spatialKind 'render-hit-test' so the compiled layer carries the `byKey` index the overlay's `pushHover` resolves against."}))}return u}var Ge=e=>(0,O.createStore)(t=>({compiled:e,setCompiled:r=>t(s=>s.compiled===r?s:{compiled:r})})),ke=({input:e,data:t,customPalettes:r,plugins:s,resolveRenderer:n,anchorResolver:u,onChange:a,onError:d,onWarnings:m})=>{const g=l.useLatestRef(a),q=l.useLatestRef(d),j=l.useLatestRef(m),[{session:p,compileBus:b}]=(0,c.useState)(()=>{const o=(0,y.createCompiler)({plugins:s});return{session:new y.GraphCompilationSession(o),compileBus:pe(o)}}),[h]=(0,c.useState)(()=>be(s??[])),f=(0,c.useRef)(null),[S]=(0,c.useState)(Ne),x=(0,c.useRef)(null),G=(0,c.useCallback)(o=>h.errors.length===0?o:[...h.errors,...o??[]],[h]),T=(0,c.useCallback)(o=>{if(!o.ok)return o.errors;if(x.current)x.current.getState().setCompiled(o.compiled);else{const v=Ge(o.compiled);v.subscribe(S.notify),x.current=v,S.notify()}return null},[S]),[I,_]=(0,c.useState)(()=>{const o=p.compile({input:e,data:t,customPalettes:r});return f.current=o,G(T(o))}),R=(0,c.useCallback)(o=>o.ok?[...o.warnings,...Ee(o.compiled,n),...Ce(o.compiled,n),...xe(o.compiled),...Te(o.compiled,n),...qe(o.compiled,n),...Re(o.compiled,u)]:o.warnings,[n,u]),k=(0,c.useCallback)(o=>{o.length!==0&&(L(o),q.current?.(o))},[q]),E=(0,c.useCallback)(o=>{o.length!==0&&(L(o),j.current?.(o))},[j]);(0,c.useEffect)(()=>{const o=f.current;o&&(k([...h.errors,...o.ok?[]:o.errors]),E([...h.warnings,...R(o)]),o.ok&&b.emit({kind:"init"}))},[b,k,E,h,R]),(0,c.useEffect)(()=>{const o=p.update({input:e,data:t,customPalettes:r});if(!o)return;o.sealedInput&&g.current?.(o.sealedInput);const v=T(o.result);_(G(v)),v&&k(v),E(R(o.result)),v||b.emit({kind:o.inputChanged?"input":"data"})},[e,t,r,p,b,T,k,E,G,R,g]);const D=(0,c.useCallback)(o=>{_(v=>v===null?v:G(null)),E(R(o))},[G,E,R]),N=(0,c.useCallback)(o=>{o.compiled&&x.current?.getState().setCompiled(o.compiled),o.result&&D(o.result),o.command&&b.emit({kind:"command",command:o.command}),o.input&&g.current?.(o.input),o.errors&&k([...o.errors])},[D,b,g,k]),C=(0,c.useCallback)(o=>{for(const v of o)N(v);return o.some(v=>!!v.compiled)},[N]),w=(0,c.useCallback)((o,v)=>{C(p.applyCommand(o,v))},[p,C]),M=(0,c.useCallback)(()=>{C(p.seal())},[p,C]),B=(0,c.useCallback)(()=>C(p.undo()),[p,C]),A=(0,c.useCallback)(()=>C(p.redo()),[p,C]),re=(0,c.useMemo)(()=>({stack:p.history,undo:B,redo:A}),[p,B,A]),se=(0,c.useCallback)(()=>x.current?.getState().compiled??null,[]);return{store:x.current,dispatch:w,seal:M,history:re,subscribe:S.subscribe,getCompiled:se,compileBus:b,compileErrors:I}},Ne=()=>{const e=new Set;return{subscribe:t=>(e.add(t),()=>{e.delete(t)}),notify:()=>e.forEach(t=>t())}},je={},Z=({data:e,input:t,plugins:r=[],formattingLocale:s,handleRef:n,onChange:u,onError:a,onWarnings:d,customPalettes:m,colorScheme:g="light",themeOverrides:q=je,children:j})=>{const[p]=(0,c.useState)(()=>l.createGeomRendererResolver(r.filter(Q))),b=(0,c.useId)(),[h]=(0,c.useState)(()=>(0,y.createAnchorResolver)(r)),[f]=(0,c.useState)(()=>me()),{store:S,dispatch:x,seal:G,history:T,subscribe:I,getCompiled:_,compileBus:R,compileErrors:k}=ke({input:t,data:e,customPalettes:m,plugins:r,resolveRenderer:p,anchorResolver:h,onChange:u,onError:a,onWarnings:d});(0,c.useEffect)(()=>{if(S)return S.subscribe((N,C)=>{if(N.compiled.spec===C.compiled.spec)return;const{selection:w,setSelection:M}=f.getState();w.length!==0&&M(J(w,N.compiled.spec))})},[S,f]);const E=(0,c.useMemo)(()=>({dispatch:x,seal:G}),[x,G]);(0,c.useImperativeHandle)(n,()=>({commands:E,undo:T.undo,redo:T.redo,subscribe:I,getCompiled:_,getSelection:()=>f.getState().selection,setSelection:N=>f.getState().setSelection(N),subscribeSelection:f.subscribe}),[E,T,I,_,f]);const D=(0,c.useMemo)(()=>S?{chartId:b,store:S,selectionStore:f,commands:E,history:T,formattingLocale:s,compileBus:R,colorScheme:g,themeOverrides:q,anchorResolver:h}:null,[b,S,f,E,T,s,R,g,q,h]);return(0,i.jsx)(X,{forcedErrors:k,onError:a,resetKeys:[t,e],children:D?(0,i.jsx)(l.GraphContext.Provider,{value:D,children:(0,i.jsx)(l.GeomRendererResolverProvider,{value:p,children:j})}):null})};function _e(e){const t=(0,y.createGraphyBuilder)(e);return{...t,GraphProvider:s=>(0,i.jsx)(Z,{...s,plugins:t.plugins})}}var De=({children:e,...t})=>(0,i.jsx)("svg",{viewBox:"0 0 1 1",preserveAspectRatio:"none",width:"100%",height:"100%",pointerEvents:"none",...t,children:e}),Ie="drqe3u0",we="drqe3u1",He="drqe3u2",Me="drqe3u3",H="drqe3u4",$e="drqe3u5",Pe="drqe3u6",Le="drqe3u7",$="drqe3u8",Ke="drqe3u9",Oe="drqe3ua";var Be="drqe3uc",Ae="drqe3ud",Ye="drqe3ue",Ue="drqe3uf";var Fe="drqe3uh",Ve="drqe3ui",V={enabled:"drqe3uk drqe3uj",disabled:"drqe3ul drqe3uj"},W={ran:"drqe3un drqe3um",dim:"drqe3uo drqe3um"},ee={ran:"drqe3uq drqe3up",cached:"drqe3ur drqe3up",untouched:"drqe3us drqe3up"},We=({width:e=380,style:t,className:r}={})=>{const{compileBus:s}=l.useGraphContext(),[n]=(0,c.useState)(()=>fe()),[u,a]=(0,c.useState)(!1),[d,m]=(0,c.useState)(y.isCompilerCachingEnabled);(0,c.useEffect)(()=>{const{recordCompile:h}=n.getState(),f=s.getLastTrigger(),S=s.getLastCompile();return f&&S&&h(f,S),s.subscribe(h)},[n,s]);const g=(0,Y.useStore)(n,h=>h.lastCompile),q=(0,Y.useStore)(n,h=>h.history),j=s.getCacheStats(),p=g===null&&q.length===0,b=()=>{m(h=>{const f=!h;return(0,y.setCompilerCachingEnabled)(f),f})};return(0,i.jsxs)("div",{className:(0,P.default)(Oe,r),style:{width:e,...t},children:[(0,i.jsxs)("div",{className:Ie,children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:we,children:"compile cache"}),(0,i.jsx)("div",{className:Ye,children:p?"production: stats disabled":g?`last: ${g.label} · ${te(g.durationMs)}`:"awaiting first compile…"})]}),(0,i.jsx)("button",{type:"button",onClick:()=>a(h=>!h),className:Ue,children:u?"▾":"▴"})]}),!u&&(0,i.jsxs)("div",{className:"drqe3ub",children:[(0,i.jsxs)("button",{type:"button",onClick:b,className:d?V.enabled:V.disabled,"aria-pressed":d,children:["cache ",d?"enabled":"disabled"]}),(0,i.jsx)("span",{className:"drqe3ug",children:"next compile reflects this toggle"})]}),!u&&!p&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ze,{delta:g?.stages,cumulative:j}),(0,i.jsx)(Xe,{entries:q})]})]})},ze=({delta:e,cumulative:t})=>(0,i.jsxs)("table",{className:He,children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{className:Fe,children:[(0,i.jsx)("th",{className:Me,children:"stage"}),(0,i.jsx)("th",{className:H,children:"Δ miss"}),(0,i.jsx)("th",{className:H,children:"Δ hit"}),(0,i.jsx)("th",{className:H,children:"total miss"}),(0,i.jsx)("th",{className:H,children:"total hit"})]})}),(0,i.jsx)("tbody",{children:y.COMPILER_STAGE_KEYS.map(r=>{const s=e?.[r],n=Qe(s);return(0,i.jsxs)("tr",{className:Be,children:[(0,i.jsxs)("td",{className:$e,children:[(0,i.jsx)("span",{className:ee[n],"aria-hidden":!0})," ",r]}),(0,i.jsx)("td",{className:n==="ran"?W.ran:W.dim,children:s?.misses??0}),(0,i.jsx)("td",{className:$,children:s?.hits??0}),(0,i.jsx)("td",{className:$,children:t[r].misses}),(0,i.jsx)("td",{className:$,children:t[r].hits})]},r)})})]}),Xe=({entries:e})=>e.length===0?null:(0,i.jsxs)("div",{className:Ae,children:[(0,i.jsx)("div",{className:Ve,children:"recent compiles"}),e.map(t=>{const r=Je(t.stages,u=>u.misses>0),s=y.COMPILER_STAGE_KEYS.length,n=r===0?"cached":"ran";return(0,i.jsxs)("div",{className:Pe,children:[(0,i.jsx)("span",{className:ee[n],"aria-hidden":!0}),(0,i.jsx)("span",{className:Le,title:t.label,children:t.label}),(0,i.jsxs)("span",{className:Ke,children:[r,"/",s," ran · ",te(t.durationMs)]})]},t.id)})]}),Qe=e=>!e||e.hits===0&&e.misses===0?"untouched":e.misses>0?"ran":"cached",Je=(e,t)=>{let r=0;for(const s of y.COMPILER_STAGE_KEYS)t(e[s])&&(r+=1);return r},te=e=>e>=10?`${e.toFixed(0)}ms`:`${e.toFixed(2)}ms`,Ze=()=>{const{history:e}=l.useGraphContext(),{stack:t,undo:r,redo:s}=e,n=(0,c.useCallback)(d=>t.subscribe(d),[t]),u=(0,c.useCallback)(()=>t.getSnapshot(),[t]),a=(0,c.useSyncExternalStore)(n,u,u);return(0,c.useMemo)(()=>({...a,undo:r,redo:s}),[a,r,s])},et=new Set(["button","checkbox","color","file","hidden","image","radio","range","reset","submit"]),tt=(e,t={})=>{const{target:r,enabled:s=!0}=t;(0,c.useEffect)(()=>{const n=rt(r);if(!s||!n)return;const u=a=>{if(!st(a)||a.defaultPrevented||nt(a.target))return;const d=l.resolveHistoryStep(a);if(!d)return;const m=e.current;m&&(d==="undo"?m.undo():m.redo())&&a.preventDefault()};return n.addEventListener("keydown",u),()=>n.removeEventListener("keydown",u)},[e,r,s])},rt=e=>e===void 0?window:e!==null&&"current"in e?e.current:e,st=e=>"key"in e,nt=e=>e instanceof HTMLInputElement?!et.has(e.type):e instanceof HTMLElement?e.isContentEditable||e.tagName==="TEXTAREA":!1;exports.BrandMark=l.BrandMark;exports.CanvasTextMeasurer=l.CanvasTextMeasurer;exports.DefaultFooter=l.DefaultFooter;exports.DefaultGrid=l.DefaultGrid;exports.DefaultHeader=l.DefaultHeader;exports.DefaultSwatch=l.DefaultSwatch;exports.DefaultTooltip=l.DefaultTooltip;exports.DevToolsPanel=We;exports.GraphErrorBoundary=X;exports.GraphErrorPanel=K;exports.GraphProvider=Z;exports.GraphRenderer=l.GraphRenderer;exports.HoverProvider=l.HoverProvider;exports.TextMeasurerProvider=l.TextMeasurerProvider;exports.ThemeProvider=l.ThemeProvider;exports.UnitSpaceSvg=De;exports.createGraphyKit=_e;exports.darkTheme=l.darkTheme;exports.defineGeomRenderer=l.defineGeomRenderer;exports.lightTheme=l.lightTheme;exports.lightenCss=l.lightenCss;exports.pruneSelection=J;exports.resolveBrandMarkVisual=l.resolveBrandMarkVisual;exports.useCompiledSelector=l.useCompiledSelector;exports.useElementScreenRect=l.useElementScreenRect;exports.useGeomHitTest=l.useGeomHitTest;exports.useGeomHover=l.useGeomHover;exports.useGraphCommands=l.useGraphCommands;exports.useGraphHandle=l.useGraphHandle;exports.useGraphHistory=Ze;exports.useGraphHistoryShortcuts=tt;exports.useGraphSelection=l.useGraphSelection;exports.useHandleCompiled=l.useHandleCompiled;exports.useHoverState=l.useHoverState;exports.useTextMeasurer=l.useTextMeasurer;exports.vars=z.vars;
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as wt, At as te, D as It, Dt as _t, G as Dt, O as $t, Ot as Ht, Q as xt, T as Mt, W as Pt, X as Lt, _t as ae, a as Kt, bt as Ot, ct as Bt, dt as K, ft as ce, gt as At, ht as le, i as Yt, it as jt, kt as de, lt as Ft, m as Ut, mt as A, n as Wt, pt as Vt, r as Xt, rt as Qt, s as zt, t as ue, vt as Jt, w as Zt, yt as er } from "./history-chords-
|
|
2
|
-
import { m as rr, t as me } from "./dev.utils-
|
|
1
|
+
import { $ as wt, At as te, D as It, Dt as _t, G as Dt, O as $t, Ot as Ht, Q as xt, T as Mt, W as Pt, X as Lt, _t as ae, a as Kt, bt as Ot, ct as Bt, dt as K, ft as ce, gt as At, ht as le, i as Yt, it as jt, kt as de, lt as Ft, m as Ut, mt as A, n as Wt, pt as Vt, r as Xt, rt as Qt, s as zt, t as ue, vt as Jt, w as Zt, yt as er } from "./history-chords-PI3m_N9n.js";
|
|
2
|
+
import { m as rr, t as me } from "./dev.utils-CrfRPKW8.js";
|
|
3
3
|
import { COMPILER_STAGE_KEYS as Y, Geom as ge, GraphCompilationSession as he, areEditTargetsEqual as pe, buildDiagnostic as W, createAnchorResolver as fe, createCompiler as ve, createGraphyBuilder as ye, findAnnotation as be, isCompilerCachingEnabled as Se, resolveDefinition as Ee, setCompilerCachingEnabled as Te } from "@graphysdk/viz-engine";
|
|
4
4
|
import { Component as Ce, useCallback as f, useEffect as $, useId as Ne, useImperativeHandle as Re, useMemo as P, useRef as V, useState as T, useSyncExternalStore as qe } from "react";
|
|
5
5
|
import { Fragment as Ge, jsx as c, jsxs as v } from "react/jsx-runtime";
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"visualization",
|
|
12
12
|
"renderer"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.8.1-beta.
|
|
14
|
+
"version": "1.8.1-beta.1787150640613",
|
|
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.8.1-beta.
|
|
58
|
+
"@graphysdk/viz-engine": "1.8.1-beta.1787150640613"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
61
|
"@tiptap/core": "^3.0.0",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
let d=require("@graphysdk/viz-engine");var m=["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)",gridLineColor:"var(--graphy-grid-line-color)",axisTickColor:"var(--graphy-axis-tick-color)",originLineColor:"var(--graphy-origin-line-color)",legendBackground:"var(--graphy-legend-background)",legendBorderColor:"var(--graphy-legend-border-color)",legendFocusOutlineColor:"var(--graphy-legend-focus-outline-color)",legendTextColor:"var(--graphy-legend-text-color)",dimmedSeriesLabelTextColor:"var(--graphy-dimmed-series-label-text-color)",dimmedSeriesLabelLineColor:"var(--graphy-dimmed-series-label-line-color)",trendNegativeColor:"var(--graphy-trend-negative-color)",trendPositiveColor:"var(--graphy-trend-positive-color)",trendNeutralColor:"var(--graphy-trend-neutral-color)",defaultAnnotationArrowStroke:"var(--graphy-default-annotation-arrow-stroke)",defaultAnnotationShapeFill:"var(--graphy-default-annotation-shape-fill)",arrowAnnotationStickerOutlineColor:"var(--graphy-arrow-annotation-sticker-outline-color)",arrowAnnotationStickerOutlineColorInverse:"var(--graphy-arrow-annotation-sticker-outline-color-inverse)",annotationFrameBorderColor:"var(--graphy-annotation-frame-border-color)",editMenuTriggerIconColor:"var(--graphy-edit-menu-trigger-icon-color)",heatmapEmptyTileBackground:"var(--graphy-heatmap-empty-tile-background)",gridLineWidth:"var(--graphy-grid-line-width)",tooltipBorderRadius:"var(--graphy-tooltip-border-radius)",tooltipBorderWidth:"var(--graphy-tooltip-border-width)",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)",legendItemGap:"var(--graphy-legend-item-gap)",legendSwatchGap:"var(--graphy-legend-swatch-gap)",legendSwatchWidth:"var(--graphy-legend-swatch-width)",legendSwatchHeight:"var(--graphy-legend-swatch-height)",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)",headlineItemGap:"var(--graphy-headline-item-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)",tooltipHeadingTextColor:"var(--graphy-tooltip-heading-text-color)",tooltipLabelTextColor:"var(--graphy-tooltip-label-text-color)",tooltipValueTextColor:"var(--graphy-tooltip-value-text-color)",tooltipPrimaryRowColor:"var(--graphy-tooltip-primary-row-color)",hoverGuideLineColor:"var(--graphy-hover-guide-line-color)",hoverGuideFillColor:"var(--graphy-hover-guide-fill-color)",fontFamilyDefault:"var(--graphy-font-family-default)",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)",fontWeightBlack:"var(--graphy-font-weight-black)",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)",fontSeriesLabel:"var(--graphy-font-series-label)",fontTooltipLabel:"var(--graphy-font-tooltip-label)",fontTooltipHeading:"var(--graphy-font-tooltip-heading)",fontTooltipFooter:"var(--graphy-font-tooltip-footer)",fontJumboTooltipLabel:"var(--graphy-font-jumbo-tooltip-label)",fontJumboTooltip:"var(--graphy-font-jumbo-tooltip)",fontMiniTooltipLabel:"var(--graphy-font-mini-tooltip-label)",fontMiniTooltipFooter:"var(--graphy-font-mini-tooltip-footer)",fontTooltipCaption:"var(--graphy-font-tooltip-caption)",fontTooltipCaptionSmall:"var(--graphy-font-tooltip-caption-small)",fontTrendTag:"var(--graphy-font-trend-tag)",fontTrendTagSmall:"var(--graphy-font-trend-tag-small)",fontPieLabel:"var(--graphy-font-pie-label)",fontPieChartTotal:"var(--graphy-font-pie-chart-total)",fontDifferenceArrowSmall:"var(--graphy-font-difference-arrow-small)",fontDifferenceArrowMedium:"var(--graphy-font-difference-arrow-medium)",fontDifferenceArrowLarge:"var(--graphy-font-difference-arrow-large)",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)"},v=`var(--typography-chart-font-family, ${e.fontFamilyDefault})`,y=`'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'`,c=y,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,black:d.NAMED_WEIGHTS.black},r={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},n={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=v,p=`var(--typography-chart-heading-font-family, ${e.fontFamilyHeading})`,S=i=>i in f,s=(i,o)=>{const g=f[i],h=t(o.weight?.toString()??e[g.weight],o.size===void 0?e[g.size]:`${o.size.value}${o.size.unit}`,o.lineHeight?.toString()??e[g.lineHeight],o.family??u);return o.style===void 0||o.style==="normal"?h:`${o.style} ${h}`},a=i=>`${i}em`,b={textScale:"1",fontFamilyDefault:y,fontFamilyHeading:c,fontWeightRegular:l.regular.toString(),fontWeightMedium:l.medium.toString(),fontWeightSemibold:l.semibold.toString(),fontWeightBold:l.bold.toString(),fontWeightExtraBold:l.extraBold.toString(),fontWeightBlack:l.black.toString(),fontSizeXxs:a(r.xxs),fontSizeXs:a(r.xs),fontSizeSm:a(r.sm),fontSizeMd:a(r.md),fontSizeLg:a(r.lg),fontSizeXl:a(r.xl),fontLineHeightXxs:n.xxs.toString(),fontLineHeightXs:n.xs.toString(),fontLineHeightSm:n.sm.toString(),fontLineHeightMd:n.md.toString(),fontLineHeightLg:n.lg.toString(),fontLineHeightXl:n.xl.toString()},L={fontSizeEditorBody:a(r.editorBody),fontSizeHeadingSm:a(r.headingSm),fontSizeHeadingMd:a(r.headingMd),fontSizeHeadingLg:a(r.headingLg),fontLineHeightEditorBody:n.editorBody.toString(),fontLineHeightHeadingSm:n.headingSm.toString(),fontLineHeightHeadingMd:n.headingMd.toString(),fontLineHeightHeadingLg:n.headingLg.toString()},t=(i,o,g,h=u)=>`${i} ${o}/${g} ${h}`,H=({weight:i,size:o,lineHeight:g})=>t(e[i],e[o],e[g]),M={fontLegendLabel:H(f.fontLegendLabel),fontSeriesLabel:t(e.fontWeightSemibold,e.fontSizeSm,e.fontLineHeightSm),fontTooltipLabel:t(e.fontWeightMedium,e.fontSizeMd,e.fontLineHeightMd),fontTooltipHeading:t(e.fontWeightMedium,e.fontSizeSm,e.fontLineHeightSm),fontTooltipFooter:t(e.fontWeightRegular,e.fontSizeSm,e.fontLineHeightSm),fontJumboTooltipLabel:t(e.fontWeightRegular,e.fontSizeSm,e.fontLineHeightSm),fontJumboTooltip:t(e.fontWeightMedium,e.fontSizeHeadingMd,e.fontLineHeightHeadingMd),fontMiniTooltipLabel:t(e.fontWeightMedium,e.fontSizeSm,e.fontLineHeightSm),fontMiniTooltipFooter:t(e.fontWeightRegular,e.fontSizeSm,e.fontLineHeightSm),fontTooltipCaption:t(e.fontWeightMedium,e.fontSizeSm,e.fontLineHeightSm),fontTooltipCaptionSmall:t(e.fontWeightMedium,e.fontSizeXxs,e.fontLineHeightXxs),fontUITooltip:t(e.fontWeightMedium,e.fontSizeMd,e.fontLineHeightMd),fontUITooltipSecondary:t(e.fontWeightMedium,e.fontSizeSm,e.fontLineHeightSm),fontTrendTag:t(e.fontWeightMedium,e.fontSizeMd,e.fontLineHeightMd),fontTrendTagSmall:t(e.fontWeightMedium,e.fontSizeXs,e.fontLineHeightXs),fontPieLabel:t(e.fontWeightMedium,e.fontSizeXs,e.fontLineHeightXs),fontPieChartTotal:t(e.fontWeightBold,e.fontSizeHeadingLg,e.fontLineHeightHeadingLg),fontDifferenceArrowSmall:t(e.fontWeightMedium,e.fontSizeSm,e.fontLineHeightSm),fontDifferenceArrowMedium:t(e.fontWeightMedium,e.fontSizeLg,e.fontLineHeightLg),fontDifferenceArrowLarge:t(e.fontWeightSemibold,e.fontSizeXl,e.fontLineHeightXl),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,p),fontTextEditorH2:t(e.fontWeightBold,e.fontSizeHeadingMd,e.fontLineHeightHeadingMd,p),fontTextEditorH3:t(e.fontWeightSemibold,e.fontSizeHeadingSm,e.fontLineHeightHeadingSm,p),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)},T=process.env.NODE_ENV!=="production";Object.defineProperty(exports,"CANVAS_COLOR_KEYS",{enumerable:!0,get:function(){return m}});Object.defineProperty(exports,"CHART_FONT_FAMILY",{enumerable:!0,get:function(){return v}});Object.defineProperty(exports,"DEFAULT_FONT_FAMILY",{enumerable:!0,get:function(){return y}});Object.defineProperty(exports,"FONT_LINE_HEIGHT",{enumerable:!0,get:function(){return n}});Object.defineProperty(exports,"FONT_SIZE_EM",{enumerable:!0,get:function(){return r}});Object.defineProperty(exports,"FONT_WEIGHT",{enumerable:!0,get:function(){return l}});Object.defineProperty(exports,"IS_DEV",{enumerable:!0,get:function(){return T}});Object.defineProperty(exports,"MEASURED_ELEMENT_FONT_DEFINITIONS",{enumerable:!0,get:function(){return f}});Object.defineProperty(exports,"baseTypographyTokens",{enumerable:!0,get:function(){return b}});Object.defineProperty(exports,"buildFontShorthand",{enumerable:!0,get:function(){return s}});Object.defineProperty(exports,"elementTypographyTokens",{enumerable:!0,get:function(){return M}});Object.defineProperty(exports,"isMeasuredFontTokenKey",{enumerable:!0,get:function(){return S}});Object.defineProperty(exports,"semanticTypographyTokens",{enumerable:!0,get:function(){return L}});Object.defineProperty(exports,"vars",{enumerable:!0,get:function(){return e}});
|