@graphysdk/react-renderer 1.9.0-beta.1795522569988 → 1.9.0-beta.1795524651682

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.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const s=require("./history-chords-BqwgaEQK.cjs");let m=require("@graphysdk/viz-engine"),u=require("react"),i=require("react/jsx-runtime"),W=require("zustand"),Q=require("zustand/vanilla"),Y=require("clsx");Y=s.__toESM(Y,1);var Se="_1a5iqpb0",ye="_1a5iqpb1";var Ge="_1a5iqpb3",be="_1a5iqpb4",xe="_1a5iqpb5";var X=({errors:e})=>{const[t,...r]=e;return(0,i.jsxs)("div",{role:"alert",className:Se,children:[(0,i.jsx)("strong",{className:ye,children:"This chart could not be rendered."}),t&&(0,i.jsx)(Z,{diagnostic:t}),r.length>0&&(0,i.jsx)("ul",{className:"_1a5iqpb2",children:r.map((n,o)=>(0,i.jsx)("li",{children:(0,i.jsx)(Z,{diagnostic:n})},`${n.code}-${o}`))})]})},Z=({diagnostic:e})=>(0,i.jsxs)("div",{className:Ge,children:[(0,i.jsx)("span",{className:be,children:e.code}),(0,i.jsx)("p",{className:xe,children:e.message}),e.suggestion&&(0,i.jsx)("p",{className:"_1a5iqpb6",children:e.suggestion})]});function Te(e=[],t=[]){return e.length===t.length&&e.every((r,n)=>Object.is(r,t[n]))}var ae=class extends u.Component{constructor(...e){super(...e),this.state={caughtDiagnostic:null}}static getDerivedStateFromError(e){return{caughtDiagnostic:(0,m.buildDiagnostic)(e)}}componentDidCatch(e,t){const r=(0,m.buildDiagnostic)(e);s.logDiagnostics([r]),this.props.onError?.([r]),console.error("Chart render component stack:",t.componentStack)}componentDidUpdate(e){this.state.caughtDiagnostic&&!Te(e.resetKeys,this.props.resetKeys)&&this.setState({caughtDiagnostic:null})}render(){const{caughtDiagnostic:e}=this.state;if(e)return(0,i.jsx)(X,{errors:[e]});const{forcedErrors:t,children:r}=this.props;return t&&t.length>0?(0,i.jsx)(X,{errors:t}):r}},ce=e=>typeof e=="object"&&"geom"in e&&"render"in e,le=e=>{const t=(0,m.resolveDefinition)(e);return t instanceof m.Geom?t:null},ue=(e,t)=>{const r=e.filter(n=>Ee(n,t));return r.length===e.length?e:r},Ee=(e,t)=>e.kind==="annotation"?(0,m.findAnnotation)(t.annotations,e.id)!==null:e.kind==="observations"||e.kind==="layer"&&e.layerId!==void 0?(0,m.findLayerById)(t.layers,e.layerId)!==void 0:!0,ee=[],Re=()=>(0,Q.createStore)(e=>({selection:ee,setSelection:t=>e(r=>Pe(r.selection,t)?r:{selection:t}),clearSelection:()=>e(t=>t.selection.length===0?t:{selection:ee})})),Pe=(e,t)=>e===t?!0:e.length!==t.length?!1:e.every((r,n)=>{const o=t[n];return o!==void 0&&(0,m.areEditTargetsEqual)(r,o)}),Ce=5,je=e=>{if(!s.IS_DEV)return{emit:()=>{},subscribe:()=>De,getLastTrigger:()=>null,getLastCompile:()=>null,getCacheStats:()=>e.getCacheStats()};const t=new Set;let r=null;return{emit:n=>{const o=e.getLastCompile();if(o){r=n;for(const c of t)c(n,o)}},subscribe:n=>(t.add(n),()=>{t.delete(n)}),getLastTrigger:()=>r,getLastCompile:()=>e.getLastCompile(),getCacheStats:()=>e.getCacheStats()}},Ie=()=>(0,Q.createStore)(e=>({lastCompile:null,history:[],nextId:1,lastSnapshot:null,recordCompile:(t,r)=>e(n=>{if(n.lastSnapshot===r)return n;const o={id:n.nextId,label:we(t),stages:r.stages,stageDurationsMs:r.stageDurationsMs,durationMs:r.durationMs};return{lastCompile:o,history:Ne(n.history,o,Ce),nextId:n.nextId+1,lastSnapshot:r}})})),De=()=>{},we=e=>{switch(e.kind){case"init":return"init";case"spec":return"spec change";case"data":return"data change";case"command":return e.command.metadata.description}},Ne=(e,t,r)=>{const n=e.length>=r?e.length-(r-1):0;return[...e.slice(n),t]};function te(e){const t=e.filter(ce),r=new Set([...Object.keys(s.BUILT_IN_GEOM_RENDERERS),...t.map(d=>d.geom)]),n=[],o=new Set;for(const d of e){const h=le(d);h===null||r.has(h.type)||o.has(h.type)||(o.add(h.type),n.push({kind:"userInput",severity:"error",code:"MISSING_GEOM_RENDERER",message:`Custom geom '${h.type}' is registered but has no renderer.`,context:{requested:h.type,kind:"geom-renderer"},suggestion:`Add a render half for it: \`defineGeomRenderer(${h.type}Geom, { coord, render })\`, then include it in \`plugins\`.`}))}const c=new Map;for(const d of t){if("definition"in d)continue;const h=`${d.geom}|${d.coord}`,f=c.get(h);f?f.count+=1:c.set(h,{geom:d.geom,coord:d.coord,count:1})}const l=[];for(const{geom:d,coord:h,count:f}of c.values())f<2||l.push({kind:"userInput",severity:"warning",code:"DUPLICATE_REGISTERED_TYPE",message:`Multiple render-only overrides register ('${d}', '${h}') (${f} entries); the last in the array wins.`,context:{requested:`${d}@${h}`,kind:"geom-renderer"},suggestion:`Keep a single render-only override for ('${d}', '${h}').`});return l.push(...Oe(e)),{errors:n,warnings:l}}function Le(e,t){const{coordSystem:r,layers:n}=e,o=new Set,c=[];for(const l of n)t(l.geom,r.type)!==null||o.has(l.geom)||(o.add(l.geom),c.push({kind:"userInput",severity:"warning",code:"MISSING_GEOM_RENDERER",message:`No renderer for geom '${l.geom}' under ${r.type} coords; the layer is not painted.`,context:{requested:l.geom,kind:"geom-renderer"},suggestion:`Register a renderer for ('${l.geom}', '${r.type}') via \`defineGeomRenderer\`.`}));return c}function ke(e,t){const{coordSystem:r,layers:n}=e,o=new Set,c=[];for(const l of n){if(l.interactive===!1||l.spatialKind!=="renderHitTest"||o.has(l.geom))continue;const d=t(l.geom,r.type);d===null||d.hitTest||s.isLiveRender(d)||(o.add(l.geom),c.push({kind:"userInput",severity:"warning",code:"MISSING_RENDER_HIT_TEST",message:`Geom '${l.geom}' declares spatialKind 'renderHitTest' but its renderer provides no hit-test; the layer has no hover.`,context:{requested:l.geom,kind:"geom-renderer"},suggestion:`Add a \`hitTest\` factory (precomputed geometry) or a live render (\`{ fn, options: { live: true } }\`, live simulation) to the renderer for ('${l.geom}', '${r.type}').`}))}return c}function _e(e){const t=new Set,r=[];for(const n of e.layers){const o=n.identityKey;n.interactive!==!1&&(n.spatialKind!=="renderHitTest"||typeof o!="object"||t.has(n.geom)||n.data.hasVariable(o.variable)||(t.add(n.geom),r.push({kind:"userInput",severity:"warning",code:"RENDER_HIT_TEST_IDENTITY",message:`Geom '${n.geom}' keys its identity on '${o.variable}', a column its compile output does not emit; its hover lookup is empty.`,context:{requested:n.geom,kind:"geom-renderer"},suggestion:`Emit the '${o.variable}' column from the geom's \`compile()\`, or point \`identityKey\` at a column it does emit.`})))}return r}function qe(e,t){const{coordSystem:r,layers:n}=e,o=new Set,c=[];for(const l of n){if(l.interactive===!1||l.spatialKind!=="renderHitTest"||o.has(l.geom))continue;const d=t(l.geom,r.type);d===null||!d.hitTest||!s.isLiveRender(d)||(o.add(l.geom),c.push({kind:"userInput",severity:"warning",code:"CONFLICTING_RENDER_HIT_TEST",message:`Geom '${l.geom}' declares both a \`hitTest\` factory and a live render; these are alternatives, so only the live render is used.`,context:{requested:l.geom,kind:"geom-renderer"},suggestion:"Keep one: a `hitTest` factory for precomputed geometry, OR a live render (`{ fn, options: { live: true } }`) for a live simulation."}))}return c}function He(e,t){const r=new Set,n=[];for(const o of e.layers)o.interactive!==!1&&(o.spatialKind!=="renderHitTest"||r.has(o.geom)||t.hasCapability(o.geom)||(r.add(o.geom),n.push({kind:"userInput",severity:"warning",code:"MISSING_ANCHOR_CAPABILITY",message:`Geom '${o.geom}' declares no \`resolveAnchorPosition\`; its observations cannot be annotated, so the editor overlay paints no creation trigger on them.`,context:{requested:o.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 n}function Me(e,t){const{coordSystem:r,layers:n}=e,o=new Set,c=[];for(const l of n){if(l.interactive===!1||l.spatialKind==="renderHitTest"||o.has(l.geom))continue;const d=t(l.geom,r.type);d===null||!s.isLiveRender(d)||(o.add(l.geom),c.push({kind:"userInput",severity:"warning",code:"LIVE_RENDER_REQUIRES_RENDER_HIT_TEST",message:`Geom '${l.geom}' declares a live render but its layer's spatialKind is '${l.spatialKind}', not 'renderHitTest'; its push-path hover resolves to nothing.`,context:{requested:l.geom,kind:"geom-renderer"},suggestion:"Have the geom's manifest yield spatialKind 'renderHitTest' so the scene layer carries the `byKey` index the live render's `pushHover` resolves against."}))}return c}function Ae(e,t){let r;return e.layers.flatMap((n,o)=>s.isLiveRender(t(n.geom,e.coordSystem.type))?$e(n)?(r??=(0,m.createStyleResolver)().readers(e),(r.geom(n).get("overpaint",void 0,"hovered")?.length??0)===0?[]:[{kind:"userInput",severity:"warning",code:"INVALID_STYLE_RULE",message:`Style 'overpaint' in state 'hovered' is not supported on live geom '${n.geom}' (layer '${n.id}'); it is ignored.`,context:{param:"overpaint",layerIndex:o,requested:n.geom},suggestion:"Remove the hovered overpaint, or paint the hover treatment in the geom's live render."}]):[]:[])}var $e=e=>[e.styles.defaults,e.styles.overrides].some(t=>t.some(r=>r.state==="hovered"&&(r.declarations.overpaint?.length??0)>0));function Oe(e){const t=new Set,r=[];for(const n of e){const o=le(n);o===null||t.has(o.type)||o.dataLabelCoordTypes.length===0||o.getDataLabelPlacements!==void 0||(t.add(o.type),r.push({kind:"userInput",severity:"warning",code:"MISSING_DATA_LABEL_PLACEMENT",message:`Geom '${o.type}' declares \`dataLabelCoordTypes\` but implements no \`getDataLabelPlacements\`; its layers paint no data labels.`,context:{requested:o.type,kind:"geom-renderer"},suggestion:"Implement `getDataLabelPlacements(context)` on the geom, or drop `dataLabelCoordTypes` so the compiler warns the author off the flag."}))}return r}var Be=e=>(0,Q.createStore)(t=>({scene:e,setScene:r=>t(n=>n.scene===r?n:{scene:r})})),Fe=({spec:e,data:t,colorScheme:r,plugins:n,theme:o,resolveRenderer:c,anchorResolver:l,onSpecChange:d,onError:h,onWarnings:f})=>{const S=s.useLatestRef(d),D=s.useLatestRef(h),P=s.useLatestRef(f),[{session:v,compileBus:p,findGeom:b}]=(0,u.useState)(()=>{const a=(0,m.createCompiler)({plugins:n,theme:o});return{session:new m.GraphCompilationSession(a),compileBus:je(a),findGeom:g=>a.findGeom(g)}}),[y]=(0,u.useState)(()=>{const a=te(n??[]),g=te(o?.plugins??[]);return{errors:[...g.errors,...a.errors],warnings:[...g.warnings,...a.warnings]}}),w=(0,u.useRef)(null),[E]=(0,u.useState)(Ke),x=(0,u.useRef)(null),C=(0,u.useCallback)(a=>y.errors.length===0?a:[...y.errors,...a??[]],[y]),N=(0,u.useCallback)(a=>{if(!a.ok)return a.errors;if(x.current)x.current.getState().setScene(a.scene);else{const g=Be(a.scene);g.subscribe(E.notify),x.current=g,E.notify()}return null},[E]),[R,q]=(0,u.useState)(()=>{const a=v.compile({spec:e,data:t,colorScheme:r});return w.current=a,C(N(a))}),j=(0,u.useCallback)(a=>a.ok?[...a.warnings,...Le(a.scene,c),...ke(a.scene,c),..._e(a.scene),...qe(a.scene,c),...Me(a.scene,c),...Ae(a.scene,c),...He(a.scene,l)]:a.warnings,[c,l]),G=(0,u.useCallback)(a=>{a.length!==0&&(s.logDiagnostics(a),D.current?.(a))},[D]),I=(0,u.useCallback)(a=>{a.length!==0&&(s.logDiagnostics(a),P.current?.(a))},[P]);(0,u.useEffect)(()=>{const a=w.current;a&&(G([...y.errors,...a.ok?[]:a.errors]),I([...y.warnings,...j(a)]),a.ok&&p.emit({kind:"init"}))},[p,G,I,y,j]),(0,u.useEffect)(()=>{const a=v.update({spec:e,data:t,colorScheme:r});if(!a)return;a.committedSpec&&S.current?.(a.committedSpec);const g=N(a.result);q(C(g)),g&&G(g),I(j(a.result)),g||p.emit({kind:a.hasSpecChange?"spec":"data"})},[e,t,r,v,p,N,G,I,C,j,S]);const H=(0,u.useCallback)(a=>{q(g=>g===null?g:C(null)),I(j(a))},[C,I,j]),M=(0,u.useCallback)(a=>{a.scene&&x.current?.getState().setScene(a.scene),a.result&&H(a.result),a.command&&p.emit({kind:"command",command:a.command}),a.spec&&S.current?.(a.spec),a.errors&&G([...a.errors])},[H,p,S,G]),T=(0,u.useCallback)(a=>{for(const g of a)M(g);return a.some(g=>!!g.scene)},[M]),L=(0,u.useCallback)((a,g)=>{T(v.applyCommand(a,g))},[v,T]),B=(0,u.useCallback)(()=>{T(v.commit())},[v,T]),A=(0,u.useCallback)(()=>T(v.undo()),[v,T]),$=(0,u.useCallback)(()=>T(v.redo()),[v,T]),V=(0,u.useCallback)(a=>{const g=v.preview(a).find(z=>z.scene)?.scene;return g?(x.current?.getState().setScene(g),!0):!1},[v]),F=(0,u.useCallback)(()=>{const a=v.scene;a&&x.current?.getState().setScene(a)},[v]),k=(0,u.useMemo)(()=>({stack:v.history,undo:A,redo:$}),[v,A,$]),K=(0,u.useCallback)(()=>x.current?.getState().scene??null,[]);return{store:x.current,dispatch:L,commit:B,paintPreview:V,clearPreview:F,history:k,subscribe:E.subscribe,getScene:K,compileBus:p,compileErrors:R,findGeom:b}},Ke=()=>{const e=new Set;return{subscribe:t=>(e.add(t),()=>{e.delete(t)}),notify:()=>e.forEach(t=>t())}},ze=["cartesian","polar"],de=({data:e,spec:t,plugins:r=[],theme:n,glyphs:o,formattingLocale:c,handleRef:l,onSpecChange:d,onError:h,onWarnings:f,colorScheme:S="light",mode:D=s.GRAPH_MODES.readonly,children:P})=>{const v=s.resolveGraphMode(D),p=We(c,f),[b]=(0,u.useState)(()=>n),[y]=(0,u.useState)(()=>s.mergeGlyphs(n?.glyphs,o)),w=b?.colorScheme??S,[E]=(0,u.useState)(()=>s.createGeomRendererResolver([...b?.plugins??[],...r].filter(ce)));Ve(E,y);const x=(0,u.useId)(),[C]=(0,u.useState)(()=>(0,m.createAnchorResolver)(r)),[N]=(0,u.useState)(()=>(0,m.createDataLabelPlacementResolver)(r)),[R]=(0,u.useState)(()=>Re()),[q]=(0,u.useState)(()=>s.createTargetBoundaryStore()),j=(0,u.useMemo)(()=>(0,m.createStyleResolver)({colorScheme:w}),[w]),{store:G,dispatch:I,commit:H,paintPreview:M,clearPreview:T,history:L,subscribe:B,getScene:A,compileBus:$,compileErrors:V,findGeom:F}=Fe({spec:t,data:e,colorScheme:w,plugins:r,theme:b,resolveRenderer:E,anchorResolver:C,onSpecChange:d,onError:h,onWarnings:f});(0,u.useEffect)(()=>{if(G)return G.subscribe((a,g)=>{if(a.scene.spec===g.scene.spec)return;const{selection:z,setSelection:ve}=R.getState();z.length!==0&&ve(ue(z,a.scene.spec))})},[G,R]);const k=(0,u.useMemo)(()=>({dispatch:I,commit:H,paintPreview:M,clearPreview:T}),[I,H,M,T]);(0,u.useImperativeHandle)(l,()=>({commands:k,undo:L.undo,redo:L.redo,subscribe:B,getScene:A,formattingLocale:p,getSelection:()=>R.getState().selection,setSelection:a=>R.getState().setSelection(a),subscribeSelection:R.subscribe,canPlaceDataLabels:N.hasCapability,canFormatDataLabelsAsPercentages:N.hasPercentageFormat,getGlyphs:()=>y,getPointSymbols:a=>E("point",a)?.symbols}),[k,L,B,A,p,R,N,y,E]);const K=(0,u.useMemo)(()=>G?{chartId:x,store:G,selectionStore:R,targetBoundaryStore:q,commands:k,history:L,formattingLocale:p,compileBus:$,colorScheme:w,mode:v,styleResolver:j,anchorResolver:C,findGeom:F}:null,[x,G,R,q,k,L,p,$,w,v,j,C,F]);return(0,i.jsx)(ae,{forcedErrors:V,onError:h,resetKeys:[t,e],children:K?(0,i.jsx)(s.GraphContext.Provider,{value:K,children:(0,i.jsx)(s.GeomRendererResolverProvider,{value:E,children:(0,i.jsx)(s.DataLabelPlacementResolverProvider,{value:N,children:(0,i.jsx)(s.GeomShapesProvider,{shapes:b?.shapes,children:(0,i.jsx)(s.GlyphRegistryProvider,{glyphs:y,children:P})})})})}):null})},Ue=(e,t)=>(e??[]).filter(r=>!(0,m.isGeometricSymbol)(r)&&!t.has(r)),Ve=(e,t)=>{(0,u.useEffect)(()=>{if(!s.IS_DEV)return;const r=new Set(t.map(({name:n})=>n));for(const n of ze)for(const o of Ue(e("point",n)?.symbols,r))console.warn(`[graphy] The ${n} point renderer lists "${o}", but no glyph has that name. The shape menu offers it, and SymbolFigure draws the first listed symbol in its place.`)},[e,t])},We=(e,t)=>{const r=s.useLatestRef(t);return(0,u.useEffect)(()=>{if(e===void 0||(0,m.findIntlLocale)(e)!==void 0)return;const n=[{severity:"warning",kind:"userInput",code:"INVALID_FORMATTING_LOCALE",message:`formattingLocale '${e}' is not a tag Intl can format in, so the chart formats in ${m.DEFAULT_LOCALE}.`}];s.logDiagnostics(n),r.current?.(n)},[e,r]),e===void 0?void 0:(0,m.canonicalizeLocale)(e)};function Ye({theme:e,glyphs:t,...r}={}){const n=(0,m.createSpecBuilder)(r);return{...n,GraphProvider:c=>(0,i.jsx)(de,{...c,plugins:n.plugins,theme:e,glyphs:t})}}var _=(e,t)=>{if(typeof e=="number")return Number.isFinite(e)?e:null;if(!e.endsWith("%"))return null;const r=Number.parseFloat(e);return Number.isFinite(r)?r/100*t:null},Xe=({x:e,y:t,width:r,height:n},o)=>{const c=_(e,o.width),l=_(t,o.height),d=_(r,o.width),h=_(n,o.height);return c===null||l===null||d===null||h===null?null:{x:c,y:l,width:d,height:h}},me=({animateTransitions:e,cx:t,cy:r,r:n,effects:o,...c})=>{const l=s.toGeomEffectsStyle(o);return e?(0,i.jsx)(s.AnimatedCircle,{animate:{cx:t,cy:r,r:n},style:l,...c}):(0,i.jsx)("circle",{cx:t,cy:r,r:n,style:l,...c})},he=({animateTransitions:e,x1:t,y1:r,x2:n,y2:o,effects:c,...l})=>{const d=s.toGeomEffectsStyle(c);return e?(0,i.jsx)(s.AnimatedLine,{animate:{x1:t,y1:r,x2:n,y2:o},style:d,...l}):(0,i.jsx)("line",{x1:t,y1:r,x2:n,y2:o,style:d,...l})},ge=({animateTransitions:e,x:t,y:r,width:n,height:o,rx:c,ry:l,effects:d,...h})=>{const f=s.toGeomEffectsStyle(d);if(!e)return(0,i.jsx)("rect",{x:t,y:r,width:n,height:o,rx:c,ry:l,style:f,...h});const S={x:t,y:r,width:n,height:o};return(0,i.jsx)(s.AnimatedRect,{animate:c===void 0||l===void 0?S:{...S,rx:c,ry:l},style:f,...h})},pe=({animateTransitions:e,d:t,source:r,effects:n,...o})=>{const c=s.toGeomEffectsStyle(n);return e?(0,i.jsx)(tt,{d:t,source:r,style:c,...o}):(0,i.jsx)("path",{d:t,style:c,...o})},Qe=e=>{const{Circle:t}=s.useGeomShapes(),{animateTransitions:r}=s.useGraphAnimation(),{symbol:n,...o}=e,c={...o,animateTransitions:r};return n!==void 0&&n!=="circle"?(0,i.jsx)("g",{style:s.toGeomEffectsStyle(e.effects),"data-testid":e["data-testid"],children:(0,i.jsx)(s.PointSymbol,{symbol:n,cx:re(e.cx),cy:re(e.cy),size:e.r*2,fill:e.fill??"currentColor",fillOpacity:e.fillOpacity,opacity:e.opacity,stroke:e.stroke,strokeOpacity:e.strokeOpacity,strokeWidth:e.strokeWidth,motion:r?{transition:s.DEFAULT_SPRING_TRANSITION,intro:!1,fadesIn:!1}:null})}):t===void 0?me(c):(0,i.jsx)(s.GeomShapesProvider,{children:(0,i.jsx)(t,{...c})})},Je=e=>{const{Line:t}=s.useGeomShapes(),{animateTransitions:r}=s.useGraphAnimation(),n={...e,animateTransitions:r};return t===void 0?he(n):(0,i.jsx)(s.GeomShapesProvider,{children:(0,i.jsx)(t,{...n})})},Ze=({cornerRadius:e,...t})=>{const{Rect:r}=s.useGeomShapes(),n=s.useGeomViewport()?.size??null,o=s.useGeomPixelsPerUnit(),{animateTransitions:c}=s.useGraphAnimation(),l={...t,animateTransitions:c,...rt(e,t,n,o)};return r===void 0?ge(l):(0,i.jsx)(s.GeomShapesProvider,{children:(0,i.jsx)(r,{...l})})},et=e=>{const{Path:t}=s.useGeomShapes(),{animateTransitions:r}=s.useGraphAnimation(),n={...e,animateTransitions:r};return t===void 0?pe(n):(0,i.jsx)(s.GeomShapesProvider,{children:(0,i.jsx)(t,{...n})})},re=e=>typeof e=="number"?`${e}px`:e,tt=({d:e,source:t,...r})=>(0,i.jsx)(s.AnimatedPath,{d:s.useSvgPathMorph(e,s.DEFAULT_SPRING_TRANSITION,t),...r}),rt=(e,t,r,n)=>{if(e===void 0)return{};const o=(0,m.foldGeomCornerRadii)(e);if(o===void 0)return{};const c=nt(t,r,n);if(c===null)return o==="full"?{}:se((0,m.resolveGeomCornerRadiusPx)({cornerRadius:o}),n);const l=Math.min((0,m.resolveGeomCornerRadiusPx)({cornerRadius:o,box:c}),Math.min(c.width,c.height)/2);return se(l,n)},nt=(e,t,r)=>{const n=ne(e.width,t?.width,r.x),o=ne(e.height,t?.height,r.y);return n===null||o===null?null:{width:n,height:o}},ne=(e,t,r)=>{if(typeof e=="number")return Number.isFinite(e)?Math.abs(e)*r:null;if(t===void 0)return null;const n=_(e,t);return n===null?null:Math.abs(n)},se=(e,t)=>t.x<=0||t.y<=0?{rx:0,ry:0}:{rx:e/t.x,ry:e/t.y},st=({symbol:e,size:t,fill:r,fillOpacity:n,stroke:o,strokeOpacity:c,strokeWidth:l})=>{const d=s.useGlyphRegistry(),h=s.useGeomRendererResolver(),f=s.useSceneSelector(P=>P.coordSystem.type),S=ot(e,h("point",f)?.symbols??[],d),D={size:t,fill:r,fillOpacity:n,stroke:o,strokeOpacity:c,strokeWidth:l};return(0,m.isGeometricSymbol)(S)?(0,i.jsx)("path",{d:(0,m.buildPointSymbolPath)(S,t),fill:r,fillOpacity:n,stroke:o,strokeOpacity:c,strokeWidth:l,strokeLinejoin:"round"}):(0,i.jsx)(s.GlyphMark,{symbol:S,glyphs:d,...D})},ot=(e,t,r)=>(0,m.isImageSymbol)(e)||t.includes(e)||!(0,m.isGeometricSymbol)(e)&&r.has(e)?e:t[0]??"circle",it=({children:e,...t})=>{const r=s.useGeomViewport()?.size??null;return(0,i.jsx)("svg",{viewBox:"0 0 1 1",preserveAspectRatio:"none",width:"100%",height:"100%",pointerEvents:"none",...t,children:(0,i.jsx)(s.GeomViewportProvider,{size:r,space:"unit",children:e})})},at=({box:e,children:t})=>{const r=s.useGeomViewportSize(),n=r===null?null:r.width*(e.x1-e.x0),o=r===null?null:r.height*(e.y1-e.y0),c=(0,u.useMemo)(()=>n===null||o===null?null:{width:n,height:o},[n,o]);return(0,i.jsx)("svg",{x:(0,m.toPercent)(e.x0),y:(0,m.toPercent)(e.y0),width:(0,m.toPercent)(e.x1-e.x0),height:(0,m.toPercent)(e.y1-e.y0),overflow:"hidden",pointerEvents:"none",children:(0,i.jsx)(s.GeomViewportProvider,{size:c,children:t})})},ct="drqe3u0",lt="drqe3u1",ut="drqe3u2",dt="drqe3u3",O="drqe3u4",mt="drqe3u5",ht="drqe3u6",gt="drqe3u7",U="drqe3u8",pt="drqe3u9",ft="drqe3ua";var vt="drqe3uc",St="drqe3ud",yt="drqe3ue",Gt="drqe3uf";var bt="drqe3uh",xt="drqe3ui",oe={enabled:"drqe3uk drqe3uj",disabled:"drqe3ul drqe3uj"},ie={ran:"drqe3un drqe3um",dim:"drqe3uo drqe3um"},fe={ran:"drqe3uq drqe3up",cached:"drqe3ur drqe3up",untouched:"drqe3us drqe3up"},Tt=({width:e=440,style:t,className:r}={})=>{const{compileBus:n}=s.useGraphContext(),[o]=(0,u.useState)(()=>Ie()),[c,l]=(0,u.useState)(!1),[d,h]=(0,u.useState)(m.isCompilerCachingEnabled);(0,u.useEffect)(()=>{const{recordCompile:p}=o.getState(),b=n.getLastTrigger(),y=n.getLastCompile();return b&&y&&p(b,y),n.subscribe(p)},[o,n]);const f=(0,W.useStore)(o,p=>p.lastCompile),S=(0,W.useStore)(o,p=>p.history),D=n.getCacheStats(),P=f===null&&S.length===0,v=()=>{h(p=>{const b=!p;return(0,m.setCompilerCachingEnabled)(b),b})};return(0,i.jsxs)("div",{className:(0,Y.default)(ft,r),style:{width:e,...t},children:[(0,i.jsxs)("div",{className:ct,children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:lt,children:"compile cache"}),(0,i.jsx)("div",{className:yt,children:P?"production: stats disabled":f?`last: ${f.label} · ${J(f.durationMs)}`:"awaiting first compile…"})]}),(0,i.jsx)("button",{type:"button",onClick:()=>l(p=>!p),className:Gt,children:c?"▾":"▴"})]}),!c&&(0,i.jsxs)("div",{className:"drqe3ub",children:[(0,i.jsxs)("button",{type:"button",onClick:v,className:d?oe.enabled:oe.disabled,"aria-pressed":d,children:["cache ",d?"enabled":"disabled"]}),(0,i.jsx)("span",{className:"drqe3ug",children:"next compile reflects this toggle"})]}),!c&&!P&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Et,{delta:f?.stages,durations:f?.stageDurationsMs,cumulative:D}),(0,i.jsx)(Rt,{entries:S})]})]})},Et=({delta:e,durations:t,cumulative:r})=>(0,i.jsxs)("table",{className:ut,children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{className:bt,children:[(0,i.jsx)("th",{className:dt,children:"stage"}),(0,i.jsx)("th",{className:O,children:"time"}),(0,i.jsx)("th",{className:O,children:"Δ miss"}),(0,i.jsx)("th",{className:O,children:"Δ hit"}),(0,i.jsx)("th",{className:O,children:"total miss"}),(0,i.jsx)("th",{className:O,children:"total hit"})]})}),(0,i.jsx)("tbody",{children:m.COMPILER_STAGE_KEYS.map(n=>{const o=e?.[n],c=Pt(o);return(0,i.jsxs)("tr",{className:vt,children:[(0,i.jsxs)("td",{className:mt,children:[(0,i.jsx)("span",{className:fe[c],"aria-hidden":!0})," ",n]}),(0,i.jsx)("td",{className:U,children:t===void 0||c==="untouched"?"—":J(t[n])}),(0,i.jsx)("td",{className:c==="ran"?ie.ran:ie.dim,children:o?.misses??0}),(0,i.jsx)("td",{className:U,children:o?.hits??0}),(0,i.jsx)("td",{className:U,children:r[n].misses}),(0,i.jsx)("td",{className:U,children:r[n].hits})]},n)})})]}),Rt=({entries:e})=>e.length===0?null:(0,i.jsxs)("div",{className:St,children:[(0,i.jsx)("div",{className:xt,children:"recent compiles"}),e.map(t=>{const r=Ct(t.stages,c=>c.misses>0),n=m.COMPILER_STAGE_KEYS.length,o=r===0?"cached":"ran";return(0,i.jsxs)("div",{className:ht,children:[(0,i.jsx)("span",{className:fe[o],"aria-hidden":!0}),(0,i.jsx)("span",{className:gt,title:t.label,children:t.label}),(0,i.jsxs)("span",{className:pt,children:[r,"/",n," ran · ",J(t.durationMs)]})]},t.id)})]}),Pt=e=>!e||e.hits===0&&e.misses===0?"untouched":e.misses>0?"ran":"cached",Ct=(e,t)=>{let r=0;for(const n of m.COMPILER_STAGE_KEYS)t(e[n])&&(r+=1);return r},J=e=>e<.1?"<0.1ms":e>=10?`${e.toFixed(0)}ms`:`${e.toFixed(2)}ms`,jt=()=>{const{history:e}=s.useGraphContext(),{stack:t,undo:r,redo:n}=e,o=(0,u.useCallback)(d=>t.subscribe(d),[t]),c=(0,u.useCallback)(()=>t.getSnapshot(),[t]),l=(0,u.useSyncExternalStore)(o,c,c);return(0,u.useMemo)(()=>({...l,undo:r,redo:n}),[l,r,n])},It=new Set(["button","checkbox","color","file","hidden","image","radio","range","reset","submit"]),Dt=(e,t={})=>{const{target:r,enabled:n=!0}=t;(0,u.useEffect)(()=>{const o=wt(r);if(!n||!o)return;const c=l=>{if(!Nt(l)||l.defaultPrevented||Lt(l.target))return;const d=s.resolveHistoryStep(l);if(!d)return;const h=e.current;h&&(d==="undo"?h.undo():h.redo())&&l.preventDefault()};return o.addEventListener("keydown",c),()=>o.removeEventListener("keydown",c)},[e,r,n])},wt=e=>e===void 0?window:e!==null&&"current"in e?e.current:e,Nt=e=>"key"in e,Lt=e=>e instanceof HTMLInputElement?!It.has(e.type):e instanceof HTMLElement?e.isContentEditable||e.tagName==="TEXTAREA":!1,kt=()=>{const{targetBoundaryStore:e}=s.useGraphContext();return(0,W.useStore)(e,t=>t.boundary)};exports.CanvasTextMeasurer=s.CanvasTextMeasurer;exports.DefaultFooter=s.DefaultFooter;exports.DefaultGeomCircle=me;exports.DefaultGeomLine=he;exports.DefaultGeomPath=pe;exports.DefaultGeomRect=ge;exports.DefaultGrid=s.DefaultGrid;exports.DefaultHeader=s.DefaultHeader;exports.DefaultSwatch=s.DefaultSwatch;exports.DefaultTooltip=s.DefaultTooltip;exports.DevToolsPanel=Tt;exports.GRAPH_MODES=s.GRAPH_MODES;exports.GeomCircle=Qe;exports.GeomLine=Je;exports.GeomOverpaint=s.GeomOverpaint;exports.GeomPanelSizeProvider=s.GeomPanelSizeProvider;exports.GeomPath=et;exports.GeomRect=Ze;exports.GraphErrorBoundary=ae;exports.GraphErrorPanel=X;exports.GraphProvider=de;exports.GraphRenderer=s.GraphRenderer;exports.GraphyBadge=s.GraphyBadge;exports.HoverProvider=s.HoverProvider;exports.IntlProvider=s.ChartIntlProvider;exports.IntroFade=s.IntroFade;exports.IntroWipeClip=s.IntroWipeClip;exports.SymbolFigure=st;exports.TextMeasurerProvider=s.TextMeasurerProvider;exports.ThemeProvider=s.ThemeProvider;exports.UnitBoxSvg=at;exports.UnitSpaceSvg=it;exports.buildDotsEditOutlineShapes=s.buildDotsEditOutlineShapes;exports.createGraphyKit=Ye;exports.darkTheme=s.darkTheme;exports.defineGeomRenderer=s.defineGeomRenderer;exports.defineGlyph=s.defineGlyph;exports.getBuiltInEditOutlineShapes=s.getBuiltInEditOutlineShapes;exports.lightTheme=s.lightTheme;exports.lightenCss=s.lightenCss;exports.pruneSelection=ue;exports.readPositionPixels=_;exports.readRectPixels=Xe;exports.resolveGraphyBadgeVariant=s.resolveGraphyBadgeVariant;exports.resolvePathStroke=s.resolvePathStroke;exports.scalePointToPanel=s.scalePointToPanel;exports.stampAxisEditTarget=s.stampAxisEditTarget;exports.stampGridEditTarget=s.stampGridEditTarget;exports.stampLegendEditTarget=s.stampLegendEditTarget;exports.useElementScreenRect=s.useElementScreenRect;exports.useFormattingLocale=s.useFormattingLocale;exports.useGeomHitTest=s.useGeomHitTest;exports.useGeomHover=s.useGeomHover;exports.useGeomPanelSize=s.useGeomPanelSize;exports.useGeomReaderTree=s.useGeomReaderTree;exports.useGeomStyleReader=s.useGeomStyleReader;exports.useGeomViewportSize=s.useGeomViewportSize;exports.useGraphAnimation=s.useGraphAnimation;exports.useGraphCommands=s.useGraphCommands;exports.useGraphHandle=s.useGraphHandle;exports.useGraphHistory=jt;exports.useGraphHistoryShortcuts=Dt;exports.useGraphLocale=s.useGraphLocale;exports.useGraphSelection=s.useGraphSelection;exports.useGuidesTakePress=s.useGuidesTakePress;exports.useHandleScene=s.useHandleScene;exports.useHoverState=s.useHoverState;exports.usePaintDefs=s.usePaintDefs;exports.useResolvedStyle=s.useResolvedStyle;exports.useSceneSelector=s.useSceneSelector;exports.useStyleReaderTree=s.useStyleReaderTree;exports.useStyleResolver=s.useStyleResolver;exports.useTargetBoundary=kt;exports.useTextMeasurer=s.useTextMeasurer;exports.vars=s.vars;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const s=require("./history-chords-ZSpvXOeV.cjs");let m=require("@graphysdk/viz-engine"),u=require("react"),i=require("react/jsx-runtime"),W=require("zustand"),Q=require("zustand/vanilla"),Y=require("clsx");Y=s.__toESM(Y,1);var Se="_1a5iqpb0",ye="_1a5iqpb1";var Ge="_1a5iqpb3",be="_1a5iqpb4",xe="_1a5iqpb5";var X=({errors:e})=>{const[t,...r]=e;return(0,i.jsxs)("div",{role:"alert",className:Se,children:[(0,i.jsx)("strong",{className:ye,children:"This chart could not be rendered."}),t&&(0,i.jsx)(Z,{diagnostic:t}),r.length>0&&(0,i.jsx)("ul",{className:"_1a5iqpb2",children:r.map((n,o)=>(0,i.jsx)("li",{children:(0,i.jsx)(Z,{diagnostic:n})},`${n.code}-${o}`))})]})},Z=({diagnostic:e})=>(0,i.jsxs)("div",{className:Ge,children:[(0,i.jsx)("span",{className:be,children:e.code}),(0,i.jsx)("p",{className:xe,children:e.message}),e.suggestion&&(0,i.jsx)("p",{className:"_1a5iqpb6",children:e.suggestion})]});function Te(e=[],t=[]){return e.length===t.length&&e.every((r,n)=>Object.is(r,t[n]))}var ae=class extends u.Component{constructor(...e){super(...e),this.state={caughtDiagnostic:null}}static getDerivedStateFromError(e){return{caughtDiagnostic:(0,m.buildDiagnostic)(e)}}componentDidCatch(e,t){const r=(0,m.buildDiagnostic)(e);s.logDiagnostics([r]),this.props.onError?.([r]),console.error("Chart render component stack:",t.componentStack)}componentDidUpdate(e){this.state.caughtDiagnostic&&!Te(e.resetKeys,this.props.resetKeys)&&this.setState({caughtDiagnostic:null})}render(){const{caughtDiagnostic:e}=this.state;if(e)return(0,i.jsx)(X,{errors:[e]});const{forcedErrors:t,children:r}=this.props;return t&&t.length>0?(0,i.jsx)(X,{errors:t}):r}},ce=e=>typeof e=="object"&&"geom"in e&&"render"in e,le=e=>{const t=(0,m.resolveDefinition)(e);return t instanceof m.Geom?t:null},ue=(e,t)=>{const r=e.filter(n=>Ee(n,t));return r.length===e.length?e:r},Ee=(e,t)=>e.kind==="annotation"?(0,m.findAnnotation)(t.annotations,e.id)!==null:e.kind==="observations"||e.kind==="layer"&&e.layerId!==void 0?(0,m.findLayerById)(t.layers,e.layerId)!==void 0:!0,ee=[],Re=()=>(0,Q.createStore)(e=>({selection:ee,setSelection:t=>e(r=>Pe(r.selection,t)?r:{selection:t}),clearSelection:()=>e(t=>t.selection.length===0?t:{selection:ee})})),Pe=(e,t)=>e===t?!0:e.length!==t.length?!1:e.every((r,n)=>{const o=t[n];return o!==void 0&&(0,m.areEditTargetsEqual)(r,o)}),Ce=5,je=e=>{if(!s.IS_DEV)return{emit:()=>{},subscribe:()=>De,getLastTrigger:()=>null,getLastCompile:()=>null,getCacheStats:()=>e.getCacheStats()};const t=new Set;let r=null;return{emit:n=>{const o=e.getLastCompile();if(o){r=n;for(const c of t)c(n,o)}},subscribe:n=>(t.add(n),()=>{t.delete(n)}),getLastTrigger:()=>r,getLastCompile:()=>e.getLastCompile(),getCacheStats:()=>e.getCacheStats()}},Ie=()=>(0,Q.createStore)(e=>({lastCompile:null,history:[],nextId:1,lastSnapshot:null,recordCompile:(t,r)=>e(n=>{if(n.lastSnapshot===r)return n;const o={id:n.nextId,label:we(t),stages:r.stages,stageDurationsMs:r.stageDurationsMs,durationMs:r.durationMs};return{lastCompile:o,history:Ne(n.history,o,Ce),nextId:n.nextId+1,lastSnapshot:r}})})),De=()=>{},we=e=>{switch(e.kind){case"init":return"init";case"spec":return"spec change";case"data":return"data change";case"command":return e.command.metadata.description}},Ne=(e,t,r)=>{const n=e.length>=r?e.length-(r-1):0;return[...e.slice(n),t]};function te(e){const t=e.filter(ce),r=new Set([...Object.keys(s.BUILT_IN_GEOM_RENDERERS),...t.map(d=>d.geom)]),n=[],o=new Set;for(const d of e){const h=le(d);h===null||r.has(h.type)||o.has(h.type)||(o.add(h.type),n.push({kind:"userInput",severity:"error",code:"MISSING_GEOM_RENDERER",message:`Custom geom '${h.type}' is registered but has no renderer.`,context:{requested:h.type,kind:"geom-renderer"},suggestion:`Add a render half for it: \`defineGeomRenderer(${h.type}Geom, { coord, render })\`, then include it in \`plugins\`.`}))}const c=new Map;for(const d of t){if("definition"in d)continue;const h=`${d.geom}|${d.coord}`,f=c.get(h);f?f.count+=1:c.set(h,{geom:d.geom,coord:d.coord,count:1})}const l=[];for(const{geom:d,coord:h,count:f}of c.values())f<2||l.push({kind:"userInput",severity:"warning",code:"DUPLICATE_REGISTERED_TYPE",message:`Multiple render-only overrides register ('${d}', '${h}') (${f} entries); the last in the array wins.`,context:{requested:`${d}@${h}`,kind:"geom-renderer"},suggestion:`Keep a single render-only override for ('${d}', '${h}').`});return l.push(...Oe(e)),{errors:n,warnings:l}}function Le(e,t){const{coordSystem:r,layers:n}=e,o=new Set,c=[];for(const l of n)t(l.geom,r.type)!==null||o.has(l.geom)||(o.add(l.geom),c.push({kind:"userInput",severity:"warning",code:"MISSING_GEOM_RENDERER",message:`No renderer for geom '${l.geom}' under ${r.type} coords; the layer is not painted.`,context:{requested:l.geom,kind:"geom-renderer"},suggestion:`Register a renderer for ('${l.geom}', '${r.type}') via \`defineGeomRenderer\`.`}));return c}function ke(e,t){const{coordSystem:r,layers:n}=e,o=new Set,c=[];for(const l of n){if(l.interactive===!1||l.spatialKind!=="renderHitTest"||o.has(l.geom))continue;const d=t(l.geom,r.type);d===null||d.hitTest||s.isLiveRender(d)||(o.add(l.geom),c.push({kind:"userInput",severity:"warning",code:"MISSING_RENDER_HIT_TEST",message:`Geom '${l.geom}' declares spatialKind 'renderHitTest' but its renderer provides no hit-test; the layer has no hover.`,context:{requested:l.geom,kind:"geom-renderer"},suggestion:`Add a \`hitTest\` factory (precomputed geometry) or a live render (\`{ fn, options: { live: true } }\`, live simulation) to the renderer for ('${l.geom}', '${r.type}').`}))}return c}function _e(e){const t=new Set,r=[];for(const n of e.layers){const o=n.identityKey;n.interactive!==!1&&(n.spatialKind!=="renderHitTest"||typeof o!="object"||t.has(n.geom)||n.data.hasVariable(o.variable)||(t.add(n.geom),r.push({kind:"userInput",severity:"warning",code:"RENDER_HIT_TEST_IDENTITY",message:`Geom '${n.geom}' keys its identity on '${o.variable}', a column its compile output does not emit; its hover lookup is empty.`,context:{requested:n.geom,kind:"geom-renderer"},suggestion:`Emit the '${o.variable}' column from the geom's \`compile()\`, or point \`identityKey\` at a column it does emit.`})))}return r}function qe(e,t){const{coordSystem:r,layers:n}=e,o=new Set,c=[];for(const l of n){if(l.interactive===!1||l.spatialKind!=="renderHitTest"||o.has(l.geom))continue;const d=t(l.geom,r.type);d===null||!d.hitTest||!s.isLiveRender(d)||(o.add(l.geom),c.push({kind:"userInput",severity:"warning",code:"CONFLICTING_RENDER_HIT_TEST",message:`Geom '${l.geom}' declares both a \`hitTest\` factory and a live render; these are alternatives, so only the live render is used.`,context:{requested:l.geom,kind:"geom-renderer"},suggestion:"Keep one: a `hitTest` factory for precomputed geometry, OR a live render (`{ fn, options: { live: true } }`) for a live simulation."}))}return c}function He(e,t){const r=new Set,n=[];for(const o of e.layers)o.interactive!==!1&&(o.spatialKind!=="renderHitTest"||r.has(o.geom)||t.hasCapability(o.geom)||(r.add(o.geom),n.push({kind:"userInput",severity:"warning",code:"MISSING_ANCHOR_CAPABILITY",message:`Geom '${o.geom}' declares no \`resolveAnchorPosition\`; its observations cannot be annotated, so the editor overlay paints no creation trigger on them.`,context:{requested:o.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 n}function Me(e,t){const{coordSystem:r,layers:n}=e,o=new Set,c=[];for(const l of n){if(l.interactive===!1||l.spatialKind==="renderHitTest"||o.has(l.geom))continue;const d=t(l.geom,r.type);d===null||!s.isLiveRender(d)||(o.add(l.geom),c.push({kind:"userInput",severity:"warning",code:"LIVE_RENDER_REQUIRES_RENDER_HIT_TEST",message:`Geom '${l.geom}' declares a live render but its layer's spatialKind is '${l.spatialKind}', not 'renderHitTest'; its push-path hover resolves to nothing.`,context:{requested:l.geom,kind:"geom-renderer"},suggestion:"Have the geom's manifest yield spatialKind 'renderHitTest' so the scene layer carries the `byKey` index the live render's `pushHover` resolves against."}))}return c}function Ae(e,t){let r;return e.layers.flatMap((n,o)=>s.isLiveRender(t(n.geom,e.coordSystem.type))?$e(n)?(r??=(0,m.createStyleResolver)().readers(e),(r.geom(n).get("overpaint",void 0,"hovered")?.length??0)===0?[]:[{kind:"userInput",severity:"warning",code:"INVALID_STYLE_RULE",message:`Style 'overpaint' in state 'hovered' is not supported on live geom '${n.geom}' (layer '${n.id}'); it is ignored.`,context:{param:"overpaint",layerIndex:o,requested:n.geom},suggestion:"Remove the hovered overpaint, or paint the hover treatment in the geom's live render."}]):[]:[])}var $e=e=>[e.styles.defaults,e.styles.overrides].some(t=>t.some(r=>r.state==="hovered"&&(r.declarations.overpaint?.length??0)>0));function Oe(e){const t=new Set,r=[];for(const n of e){const o=le(n);o===null||t.has(o.type)||o.dataLabelCoordTypes.length===0||o.getDataLabelPlacements!==void 0||(t.add(o.type),r.push({kind:"userInput",severity:"warning",code:"MISSING_DATA_LABEL_PLACEMENT",message:`Geom '${o.type}' declares \`dataLabelCoordTypes\` but implements no \`getDataLabelPlacements\`; its layers paint no data labels.`,context:{requested:o.type,kind:"geom-renderer"},suggestion:"Implement `getDataLabelPlacements(context)` on the geom, or drop `dataLabelCoordTypes` so the compiler warns the author off the flag."}))}return r}var Be=e=>(0,Q.createStore)(t=>({scene:e,setScene:r=>t(n=>n.scene===r?n:{scene:r})})),Fe=({spec:e,data:t,colorScheme:r,plugins:n,theme:o,resolveRenderer:c,anchorResolver:l,onSpecChange:d,onError:h,onWarnings:f})=>{const S=s.useLatestRef(d),D=s.useLatestRef(h),P=s.useLatestRef(f),[{session:v,compileBus:p,findGeom:b}]=(0,u.useState)(()=>{const a=(0,m.createCompiler)({plugins:n,theme:o});return{session:new m.GraphCompilationSession(a),compileBus:je(a),findGeom:g=>a.findGeom(g)}}),[y]=(0,u.useState)(()=>{const a=te(n??[]),g=te(o?.plugins??[]);return{errors:[...g.errors,...a.errors],warnings:[...g.warnings,...a.warnings]}}),w=(0,u.useRef)(null),[E]=(0,u.useState)(Ke),x=(0,u.useRef)(null),C=(0,u.useCallback)(a=>y.errors.length===0?a:[...y.errors,...a??[]],[y]),N=(0,u.useCallback)(a=>{if(!a.ok)return a.errors;if(x.current)x.current.getState().setScene(a.scene);else{const g=Be(a.scene);g.subscribe(E.notify),x.current=g,E.notify()}return null},[E]),[R,q]=(0,u.useState)(()=>{const a=v.compile({spec:e,data:t,colorScheme:r});return w.current=a,C(N(a))}),j=(0,u.useCallback)(a=>a.ok?[...a.warnings,...Le(a.scene,c),...ke(a.scene,c),..._e(a.scene),...qe(a.scene,c),...Me(a.scene,c),...Ae(a.scene,c),...He(a.scene,l)]:a.warnings,[c,l]),G=(0,u.useCallback)(a=>{a.length!==0&&(s.logDiagnostics(a),D.current?.(a))},[D]),I=(0,u.useCallback)(a=>{a.length!==0&&(s.logDiagnostics(a),P.current?.(a))},[P]);(0,u.useEffect)(()=>{const a=w.current;a&&(G([...y.errors,...a.ok?[]:a.errors]),I([...y.warnings,...j(a)]),a.ok&&p.emit({kind:"init"}))},[p,G,I,y,j]),(0,u.useEffect)(()=>{const a=v.update({spec:e,data:t,colorScheme:r});if(!a)return;a.committedSpec&&S.current?.(a.committedSpec);const g=N(a.result);q(C(g)),g&&G(g),I(j(a.result)),g||p.emit({kind:a.hasSpecChange?"spec":"data"})},[e,t,r,v,p,N,G,I,C,j,S]);const H=(0,u.useCallback)(a=>{q(g=>g===null?g:C(null)),I(j(a))},[C,I,j]),M=(0,u.useCallback)(a=>{a.scene&&x.current?.getState().setScene(a.scene),a.result&&H(a.result),a.command&&p.emit({kind:"command",command:a.command}),a.spec&&S.current?.(a.spec),a.errors&&G([...a.errors])},[H,p,S,G]),T=(0,u.useCallback)(a=>{for(const g of a)M(g);return a.some(g=>!!g.scene)},[M]),L=(0,u.useCallback)((a,g)=>{T(v.applyCommand(a,g))},[v,T]),B=(0,u.useCallback)(()=>{T(v.commit())},[v,T]),A=(0,u.useCallback)(()=>T(v.undo()),[v,T]),$=(0,u.useCallback)(()=>T(v.redo()),[v,T]),V=(0,u.useCallback)(a=>{const g=v.preview(a).find(z=>z.scene)?.scene;return g?(x.current?.getState().setScene(g),!0):!1},[v]),F=(0,u.useCallback)(()=>{const a=v.scene;a&&x.current?.getState().setScene(a)},[v]),k=(0,u.useMemo)(()=>({stack:v.history,undo:A,redo:$}),[v,A,$]),K=(0,u.useCallback)(()=>x.current?.getState().scene??null,[]);return{store:x.current,dispatch:L,commit:B,paintPreview:V,clearPreview:F,history:k,subscribe:E.subscribe,getScene:K,compileBus:p,compileErrors:R,findGeom:b}},Ke=()=>{const e=new Set;return{subscribe:t=>(e.add(t),()=>{e.delete(t)}),notify:()=>e.forEach(t=>t())}},ze=["cartesian","polar"],de=({data:e,spec:t,plugins:r=[],theme:n,glyphs:o,formattingLocale:c,handleRef:l,onSpecChange:d,onError:h,onWarnings:f,colorScheme:S="light",mode:D=s.GRAPH_MODES.readonly,children:P})=>{const v=s.resolveGraphMode(D),p=We(c,f),[b]=(0,u.useState)(()=>n),[y]=(0,u.useState)(()=>s.mergeGlyphs(n?.glyphs,o)),w=b?.colorScheme??S,[E]=(0,u.useState)(()=>s.createGeomRendererResolver([...b?.plugins??[],...r].filter(ce)));Ve(E,y);const x=(0,u.useId)(),[C]=(0,u.useState)(()=>(0,m.createAnchorResolver)(r)),[N]=(0,u.useState)(()=>(0,m.createDataLabelPlacementResolver)(r)),[R]=(0,u.useState)(()=>Re()),[q]=(0,u.useState)(()=>s.createTargetBoundaryStore()),j=(0,u.useMemo)(()=>(0,m.createStyleResolver)({colorScheme:w}),[w]),{store:G,dispatch:I,commit:H,paintPreview:M,clearPreview:T,history:L,subscribe:B,getScene:A,compileBus:$,compileErrors:V,findGeom:F}=Fe({spec:t,data:e,colorScheme:w,plugins:r,theme:b,resolveRenderer:E,anchorResolver:C,onSpecChange:d,onError:h,onWarnings:f});(0,u.useEffect)(()=>{if(G)return G.subscribe((a,g)=>{if(a.scene.spec===g.scene.spec)return;const{selection:z,setSelection:ve}=R.getState();z.length!==0&&ve(ue(z,a.scene.spec))})},[G,R]);const k=(0,u.useMemo)(()=>({dispatch:I,commit:H,paintPreview:M,clearPreview:T}),[I,H,M,T]);(0,u.useImperativeHandle)(l,()=>({commands:k,undo:L.undo,redo:L.redo,subscribe:B,getScene:A,formattingLocale:p,getSelection:()=>R.getState().selection,setSelection:a=>R.getState().setSelection(a),subscribeSelection:R.subscribe,canPlaceDataLabels:N.hasCapability,canFormatDataLabelsAsPercentages:N.hasPercentageFormat,getGlyphs:()=>y,getPointSymbols:a=>E("point",a)?.symbols}),[k,L,B,A,p,R,N,y,E]);const K=(0,u.useMemo)(()=>G?{chartId:x,store:G,selectionStore:R,targetBoundaryStore:q,commands:k,history:L,formattingLocale:p,compileBus:$,colorScheme:w,mode:v,styleResolver:j,anchorResolver:C,findGeom:F}:null,[x,G,R,q,k,L,p,$,w,v,j,C,F]);return(0,i.jsx)(ae,{forcedErrors:V,onError:h,resetKeys:[t,e],children:K?(0,i.jsx)(s.GraphContext.Provider,{value:K,children:(0,i.jsx)(s.GeomRendererResolverProvider,{value:E,children:(0,i.jsx)(s.DataLabelPlacementResolverProvider,{value:N,children:(0,i.jsx)(s.GeomShapesProvider,{shapes:b?.shapes,children:(0,i.jsx)(s.GlyphRegistryProvider,{glyphs:y,children:P})})})})}):null})},Ue=(e,t)=>(e??[]).filter(r=>!(0,m.isGeometricSymbol)(r)&&!t.has(r)),Ve=(e,t)=>{(0,u.useEffect)(()=>{if(!s.IS_DEV)return;const r=new Set(t.map(({name:n})=>n));for(const n of ze)for(const o of Ue(e("point",n)?.symbols,r))console.warn(`[graphy] The ${n} point renderer lists "${o}", but no glyph has that name. The shape menu offers it, and SymbolFigure draws the first listed symbol in its place.`)},[e,t])},We=(e,t)=>{const r=s.useLatestRef(t);return(0,u.useEffect)(()=>{if(e===void 0||(0,m.findIntlLocale)(e)!==void 0)return;const n=[{severity:"warning",kind:"userInput",code:"INVALID_FORMATTING_LOCALE",message:`formattingLocale '${e}' is not a tag Intl can format in, so the chart formats in ${m.DEFAULT_LOCALE}.`}];s.logDiagnostics(n),r.current?.(n)},[e,r]),e===void 0?void 0:(0,m.canonicalizeLocale)(e)};function Ye({theme:e,glyphs:t,...r}={}){const n=(0,m.createSpecBuilder)(r);return{...n,GraphProvider:c=>(0,i.jsx)(de,{...c,plugins:n.plugins,theme:e,glyphs:t})}}var _=(e,t)=>{if(typeof e=="number")return Number.isFinite(e)?e:null;if(!e.endsWith("%"))return null;const r=Number.parseFloat(e);return Number.isFinite(r)?r/100*t:null},Xe=({x:e,y:t,width:r,height:n},o)=>{const c=_(e,o.width),l=_(t,o.height),d=_(r,o.width),h=_(n,o.height);return c===null||l===null||d===null||h===null?null:{x:c,y:l,width:d,height:h}},me=({animateTransitions:e,cx:t,cy:r,r:n,effects:o,...c})=>{const l=s.toGeomEffectsStyle(o);return e?(0,i.jsx)(s.AnimatedCircle,{animate:{cx:t,cy:r,r:n},style:l,...c}):(0,i.jsx)("circle",{cx:t,cy:r,r:n,style:l,...c})},he=({animateTransitions:e,x1:t,y1:r,x2:n,y2:o,effects:c,...l})=>{const d=s.toGeomEffectsStyle(c);return e?(0,i.jsx)(s.AnimatedLine,{animate:{x1:t,y1:r,x2:n,y2:o},style:d,...l}):(0,i.jsx)("line",{x1:t,y1:r,x2:n,y2:o,style:d,...l})},ge=({animateTransitions:e,x:t,y:r,width:n,height:o,rx:c,ry:l,effects:d,...h})=>{const f=s.toGeomEffectsStyle(d);if(!e)return(0,i.jsx)("rect",{x:t,y:r,width:n,height:o,rx:c,ry:l,style:f,...h});const S={x:t,y:r,width:n,height:o};return(0,i.jsx)(s.AnimatedRect,{animate:c===void 0||l===void 0?S:{...S,rx:c,ry:l},style:f,...h})},pe=({animateTransitions:e,d:t,source:r,effects:n,...o})=>{const c=s.toGeomEffectsStyle(n);return e?(0,i.jsx)(tt,{d:t,source:r,style:c,...o}):(0,i.jsx)("path",{d:t,style:c,...o})},Qe=e=>{const{Circle:t}=s.useGeomShapes(),{animateTransitions:r}=s.useGraphAnimation(),{symbol:n,...o}=e,c={...o,animateTransitions:r};return n!==void 0&&n!=="circle"?(0,i.jsx)("g",{style:s.toGeomEffectsStyle(e.effects),"data-testid":e["data-testid"],children:(0,i.jsx)(s.PointSymbol,{symbol:n,cx:re(e.cx),cy:re(e.cy),size:e.r*2,fill:e.fill??"currentColor",fillOpacity:e.fillOpacity,opacity:e.opacity,stroke:e.stroke,strokeOpacity:e.strokeOpacity,strokeWidth:e.strokeWidth,motion:r?{transition:s.DEFAULT_SPRING_TRANSITION,intro:!1,fadesIn:!1}:null})}):t===void 0?me(c):(0,i.jsx)(s.GeomShapesProvider,{children:(0,i.jsx)(t,{...c})})},Je=e=>{const{Line:t}=s.useGeomShapes(),{animateTransitions:r}=s.useGraphAnimation(),n={...e,animateTransitions:r};return t===void 0?he(n):(0,i.jsx)(s.GeomShapesProvider,{children:(0,i.jsx)(t,{...n})})},Ze=({cornerRadius:e,...t})=>{const{Rect:r}=s.useGeomShapes(),n=s.useGeomViewport()?.size??null,o=s.useGeomPixelsPerUnit(),{animateTransitions:c}=s.useGraphAnimation(),l={...t,animateTransitions:c,...rt(e,t,n,o)};return r===void 0?ge(l):(0,i.jsx)(s.GeomShapesProvider,{children:(0,i.jsx)(r,{...l})})},et=e=>{const{Path:t}=s.useGeomShapes(),{animateTransitions:r}=s.useGraphAnimation(),n={...e,animateTransitions:r};return t===void 0?pe(n):(0,i.jsx)(s.GeomShapesProvider,{children:(0,i.jsx)(t,{...n})})},re=e=>typeof e=="number"?`${e}px`:e,tt=({d:e,source:t,...r})=>(0,i.jsx)(s.AnimatedPath,{d:s.useSvgPathMorph(e,s.DEFAULT_SPRING_TRANSITION,t),...r}),rt=(e,t,r,n)=>{if(e===void 0)return{};const o=(0,m.foldGeomCornerRadii)(e);if(o===void 0)return{};const c=nt(t,r,n);if(c===null)return o==="full"?{}:se((0,m.resolveGeomCornerRadiusPx)({cornerRadius:o}),n);const l=Math.min((0,m.resolveGeomCornerRadiusPx)({cornerRadius:o,box:c}),Math.min(c.width,c.height)/2);return se(l,n)},nt=(e,t,r)=>{const n=ne(e.width,t?.width,r.x),o=ne(e.height,t?.height,r.y);return n===null||o===null?null:{width:n,height:o}},ne=(e,t,r)=>{if(typeof e=="number")return Number.isFinite(e)?Math.abs(e)*r:null;if(t===void 0)return null;const n=_(e,t);return n===null?null:Math.abs(n)},se=(e,t)=>t.x<=0||t.y<=0?{rx:0,ry:0}:{rx:e/t.x,ry:e/t.y},st=({symbol:e,size:t,fill:r,fillOpacity:n,stroke:o,strokeOpacity:c,strokeWidth:l})=>{const d=s.useGlyphRegistry(),h=s.useGeomRendererResolver(),f=s.useSceneSelector(P=>P.coordSystem.type),S=ot(e,h("point",f)?.symbols??[],d),D={size:t,fill:r,fillOpacity:n,stroke:o,strokeOpacity:c,strokeWidth:l};return(0,m.isGeometricSymbol)(S)?(0,i.jsx)("path",{d:(0,m.buildPointSymbolPath)(S,t),fill:r,fillOpacity:n,stroke:o,strokeOpacity:c,strokeWidth:l,strokeLinejoin:"round"}):(0,i.jsx)(s.GlyphMark,{symbol:S,glyphs:d,...D})},ot=(e,t,r)=>(0,m.isImageSymbol)(e)||t.includes(e)||!(0,m.isGeometricSymbol)(e)&&r.has(e)?e:t[0]??"circle",it=({children:e,...t})=>{const r=s.useGeomViewport()?.size??null;return(0,i.jsx)("svg",{viewBox:"0 0 1 1",preserveAspectRatio:"none",width:"100%",height:"100%",pointerEvents:"none",...t,children:(0,i.jsx)(s.GeomViewportProvider,{size:r,space:"unit",children:e})})},at=({box:e,children:t})=>{const r=s.useGeomViewportSize(),n=r===null?null:r.width*(e.x1-e.x0),o=r===null?null:r.height*(e.y1-e.y0),c=(0,u.useMemo)(()=>n===null||o===null?null:{width:n,height:o},[n,o]);return(0,i.jsx)("svg",{x:(0,m.toPercent)(e.x0),y:(0,m.toPercent)(e.y0),width:(0,m.toPercent)(e.x1-e.x0),height:(0,m.toPercent)(e.y1-e.y0),overflow:"hidden",pointerEvents:"none",children:(0,i.jsx)(s.GeomViewportProvider,{size:c,children:t})})},ct="drqe3u0",lt="drqe3u1",ut="drqe3u2",dt="drqe3u3",O="drqe3u4",mt="drqe3u5",ht="drqe3u6",gt="drqe3u7",U="drqe3u8",pt="drqe3u9",ft="drqe3ua";var vt="drqe3uc",St="drqe3ud",yt="drqe3ue",Gt="drqe3uf";var bt="drqe3uh",xt="drqe3ui",oe={enabled:"drqe3uk drqe3uj",disabled:"drqe3ul drqe3uj"},ie={ran:"drqe3un drqe3um",dim:"drqe3uo drqe3um"},fe={ran:"drqe3uq drqe3up",cached:"drqe3ur drqe3up",untouched:"drqe3us drqe3up"},Tt=({width:e=440,style:t,className:r}={})=>{const{compileBus:n}=s.useGraphContext(),[o]=(0,u.useState)(()=>Ie()),[c,l]=(0,u.useState)(!1),[d,h]=(0,u.useState)(m.isCompilerCachingEnabled);(0,u.useEffect)(()=>{const{recordCompile:p}=o.getState(),b=n.getLastTrigger(),y=n.getLastCompile();return b&&y&&p(b,y),n.subscribe(p)},[o,n]);const f=(0,W.useStore)(o,p=>p.lastCompile),S=(0,W.useStore)(o,p=>p.history),D=n.getCacheStats(),P=f===null&&S.length===0,v=()=>{h(p=>{const b=!p;return(0,m.setCompilerCachingEnabled)(b),b})};return(0,i.jsxs)("div",{className:(0,Y.default)(ft,r),style:{width:e,...t},children:[(0,i.jsxs)("div",{className:ct,children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:lt,children:"compile cache"}),(0,i.jsx)("div",{className:yt,children:P?"production: stats disabled":f?`last: ${f.label} · ${J(f.durationMs)}`:"awaiting first compile…"})]}),(0,i.jsx)("button",{type:"button",onClick:()=>l(p=>!p),className:Gt,children:c?"▾":"▴"})]}),!c&&(0,i.jsxs)("div",{className:"drqe3ub",children:[(0,i.jsxs)("button",{type:"button",onClick:v,className:d?oe.enabled:oe.disabled,"aria-pressed":d,children:["cache ",d?"enabled":"disabled"]}),(0,i.jsx)("span",{className:"drqe3ug",children:"next compile reflects this toggle"})]}),!c&&!P&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Et,{delta:f?.stages,durations:f?.stageDurationsMs,cumulative:D}),(0,i.jsx)(Rt,{entries:S})]})]})},Et=({delta:e,durations:t,cumulative:r})=>(0,i.jsxs)("table",{className:ut,children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{className:bt,children:[(0,i.jsx)("th",{className:dt,children:"stage"}),(0,i.jsx)("th",{className:O,children:"time"}),(0,i.jsx)("th",{className:O,children:"Δ miss"}),(0,i.jsx)("th",{className:O,children:"Δ hit"}),(0,i.jsx)("th",{className:O,children:"total miss"}),(0,i.jsx)("th",{className:O,children:"total hit"})]})}),(0,i.jsx)("tbody",{children:m.COMPILER_STAGE_KEYS.map(n=>{const o=e?.[n],c=Pt(o);return(0,i.jsxs)("tr",{className:vt,children:[(0,i.jsxs)("td",{className:mt,children:[(0,i.jsx)("span",{className:fe[c],"aria-hidden":!0})," ",n]}),(0,i.jsx)("td",{className:U,children:t===void 0||c==="untouched"?"—":J(t[n])}),(0,i.jsx)("td",{className:c==="ran"?ie.ran:ie.dim,children:o?.misses??0}),(0,i.jsx)("td",{className:U,children:o?.hits??0}),(0,i.jsx)("td",{className:U,children:r[n].misses}),(0,i.jsx)("td",{className:U,children:r[n].hits})]},n)})})]}),Rt=({entries:e})=>e.length===0?null:(0,i.jsxs)("div",{className:St,children:[(0,i.jsx)("div",{className:xt,children:"recent compiles"}),e.map(t=>{const r=Ct(t.stages,c=>c.misses>0),n=m.COMPILER_STAGE_KEYS.length,o=r===0?"cached":"ran";return(0,i.jsxs)("div",{className:ht,children:[(0,i.jsx)("span",{className:fe[o],"aria-hidden":!0}),(0,i.jsx)("span",{className:gt,title:t.label,children:t.label}),(0,i.jsxs)("span",{className:pt,children:[r,"/",n," ran · ",J(t.durationMs)]})]},t.id)})]}),Pt=e=>!e||e.hits===0&&e.misses===0?"untouched":e.misses>0?"ran":"cached",Ct=(e,t)=>{let r=0;for(const n of m.COMPILER_STAGE_KEYS)t(e[n])&&(r+=1);return r},J=e=>e<.1?"<0.1ms":e>=10?`${e.toFixed(0)}ms`:`${e.toFixed(2)}ms`,jt=()=>{const{history:e}=s.useGraphContext(),{stack:t,undo:r,redo:n}=e,o=(0,u.useCallback)(d=>t.subscribe(d),[t]),c=(0,u.useCallback)(()=>t.getSnapshot(),[t]),l=(0,u.useSyncExternalStore)(o,c,c);return(0,u.useMemo)(()=>({...l,undo:r,redo:n}),[l,r,n])},It=new Set(["button","checkbox","color","file","hidden","image","radio","range","reset","submit"]),Dt=(e,t={})=>{const{target:r,enabled:n=!0}=t;(0,u.useEffect)(()=>{const o=wt(r);if(!n||!o)return;const c=l=>{if(!Nt(l)||l.defaultPrevented||Lt(l.target))return;const d=s.resolveHistoryStep(l);if(!d)return;const h=e.current;h&&(d==="undo"?h.undo():h.redo())&&l.preventDefault()};return o.addEventListener("keydown",c),()=>o.removeEventListener("keydown",c)},[e,r,n])},wt=e=>e===void 0?window:e!==null&&"current"in e?e.current:e,Nt=e=>"key"in e,Lt=e=>e instanceof HTMLInputElement?!It.has(e.type):e instanceof HTMLElement?e.isContentEditable||e.tagName==="TEXTAREA":!1,kt=()=>{const{targetBoundaryStore:e}=s.useGraphContext();return(0,W.useStore)(e,t=>t.boundary)};exports.CanvasTextMeasurer=s.CanvasTextMeasurer;exports.DefaultFooter=s.DefaultFooter;exports.DefaultGeomCircle=me;exports.DefaultGeomLine=he;exports.DefaultGeomPath=pe;exports.DefaultGeomRect=ge;exports.DefaultGrid=s.DefaultGrid;exports.DefaultHeader=s.DefaultHeader;exports.DefaultSwatch=s.DefaultSwatch;exports.DefaultTooltip=s.DefaultTooltip;exports.DevToolsPanel=Tt;exports.GRAPH_MODES=s.GRAPH_MODES;exports.GeomCircle=Qe;exports.GeomLine=Je;exports.GeomOverpaint=s.GeomOverpaint;exports.GeomPanelSizeProvider=s.GeomPanelSizeProvider;exports.GeomPath=et;exports.GeomRect=Ze;exports.GraphErrorBoundary=ae;exports.GraphErrorPanel=X;exports.GraphProvider=de;exports.GraphRenderer=s.GraphRenderer;exports.GraphyBadge=s.GraphyBadge;exports.HoverProvider=s.HoverProvider;exports.IntlProvider=s.ChartIntlProvider;exports.IntroFade=s.IntroFade;exports.IntroWipeClip=s.IntroWipeClip;exports.SymbolFigure=st;exports.TextMeasurerProvider=s.TextMeasurerProvider;exports.ThemeProvider=s.ThemeProvider;exports.UnitBoxSvg=at;exports.UnitSpaceSvg=it;exports.buildDotsEditOutlineShapes=s.buildDotsEditOutlineShapes;exports.createGraphyKit=Ye;exports.darkTheme=s.darkTheme;exports.defineGeomRenderer=s.defineGeomRenderer;exports.defineGlyph=s.defineGlyph;exports.getBuiltInEditOutlineShapes=s.getBuiltInEditOutlineShapes;exports.lightTheme=s.lightTheme;exports.lightenCss=s.lightenCss;exports.pruneSelection=ue;exports.readPositionPixels=_;exports.readRectPixels=Xe;exports.resolveGraphyBadgeVariant=s.resolveGraphyBadgeVariant;exports.resolvePathStroke=s.resolvePathStroke;exports.scalePointToPanel=s.scalePointToPanel;exports.stampAxisEditTarget=s.stampAxisEditTarget;exports.stampGridEditTarget=s.stampGridEditTarget;exports.stampLegendEditTarget=s.stampLegendEditTarget;exports.useElementScreenRect=s.useElementScreenRect;exports.useFormattingLocale=s.useFormattingLocale;exports.useGeomHitTest=s.useGeomHitTest;exports.useGeomHover=s.useGeomHover;exports.useGeomPanelSize=s.useGeomPanelSize;exports.useGeomReaderTree=s.useGeomReaderTree;exports.useGeomStyleReader=s.useGeomStyleReader;exports.useGeomViewportSize=s.useGeomViewportSize;exports.useGraphAnimation=s.useGraphAnimation;exports.useGraphCommands=s.useGraphCommands;exports.useGraphHandle=s.useGraphHandle;exports.useGraphHistory=jt;exports.useGraphHistoryShortcuts=Dt;exports.useGraphLocale=s.useGraphLocale;exports.useGraphSelection=s.useGraphSelection;exports.useGuidesTakePress=s.useGuidesTakePress;exports.useHandleScene=s.useHandleScene;exports.useHoverState=s.useHoverState;exports.usePaintDefs=s.usePaintDefs;exports.useResolvedStyle=s.useResolvedStyle;exports.useSceneSelector=s.useSceneSelector;exports.useStyleReaderTree=s.useStyleReaderTree;exports.useStyleResolver=s.useStyleResolver;exports.useTargetBoundary=kt;exports.useTextMeasurer=s.useTextMeasurer;exports.vars=s.vars;
package/dist/index.mjs CHANGED
@@ -1,12 +1,12 @@
1
- import { $ as Hr, $n as qe, Bn as _e, C as xr, Ct as Mr, Et as Ar, Fn as Or, Ft as Br, Gn as Fr, H as Kr, In as ke, It as Ur, Jn as zr, Jt as Wr, Ln as ee, Mn as Yr, Mt as Vr, N as jr, Nn as U, On as Xr, Pn as Ge, Qn as Jr, Rn as Re, Rt as Qr, Sn as Zr, Tt as en, U as tn, Un as rn, V as nn, Vn as te, Wn as z, Wt as sn, Xn as $e, Xt as on, Y as an, Yn as He, Yt as cn, Zn as xe, _n as ln, _r as Me, a as dn, an as Ae, ar as Oe, cn as re, cr as Ie, dr as un, en as Be, et as mn, fn as hn, fr as gn, gn as pn, hn as fn, hr as oe, i as vn, in as Fe, ir as Ke, jn as yn, l as Sn, ln as Ue, lr as bn, mn as ze, mr as We, n as Tn, nn as Ye, nr as Ne, on as En, or as Ve, pn as je, pr as Xe, qn as Gn, qt as Rn, r as In, rr as Je, sn as Nn, sr as Q, t as Qe, tr as Ze, tt as wn, un as Pn, ur as Cn, vn as Ln, wt as Dn, yr as Z, zn as et } from "./history-chords-B5QdrBXE.js";
2
- import { COMPILER_STAGE_KEYS as ae, DEFAULT_LOCALE as tt, Geom as rt, GraphCompilationSession as nt, areEditTargetsEqual as st, buildDiagnostic as de, buildPointSymbolPath as ot, canonicalizeLocale as at, createAnchorResolver as it, createCompiler as ct, createDataLabelPlacementResolver as lt, createSpecBuilder as dt, createStyleResolver as we, findAnnotation as ut, findIntlLocale as mt, findLayerById as ue, foldGeomCornerRadii as ht, isCompilerCachingEnabled as gt, isGeometricSymbol as ie, isImageSymbol as pt, resolveDefinition as ft, resolveGeomCornerRadiusPx as me, setCompilerCachingEnabled as vt, toPercent as X } from "@graphysdk/viz-engine";
1
+ import { $ as Hr, $n as qe, Bn as _e, Ct as xr, Et as Mr, Fn as Ar, Ft as Or, Gn as Br, H as Fr, In as ke, It as Kr, Jn as Ur, Jt as zr, Ln as ee, Mn as Wr, Mt as Yr, N as Vr, Nn as U, On as jr, Pn as Ge, Qn as Xr, Rn as Re, Rt as Jr, Sn as Qr, Tt as Zr, U as en, Un as tn, V as rn, Vn as te, Wn as z, Wt as nn, Xn as $e, Xt as sn, Y as on, Yn as He, Yt as an, Zn as xe, _n as cn, _r as Me, a as ln, an as Ae, ar as Oe, cn as re, cr as we, dr as dn, en as Be, et as un, fn as mn, fr as hn, gn, hn as pn, hr as oe, i as fn, in as Fe, ir as Ke, jn as vn, l as yn, ln as Ue, lr as Sn, mn as ze, mr as We, n as bn, nn as Ye, nr as Ie, on as Tn, or as Ve, pn as je, pr as Xe, qn as En, qt as Gn, r as Rn, rr as Je, sn as wn, sr as Q, t as Qe, tr as Ze, tt as In, un as Nn, ur as Pn, vn as Cn, w as Ln, wt as Dn, yr as Z, zn as et } from "./history-chords-oyGjKaN7.js";
2
+ import { COMPILER_STAGE_KEYS as ae, DEFAULT_LOCALE as tt, Geom as rt, GraphCompilationSession as nt, areEditTargetsEqual as st, buildDiagnostic as de, buildPointSymbolPath as ot, canonicalizeLocale as at, createAnchorResolver as it, createCompiler as ct, createDataLabelPlacementResolver as lt, createSpecBuilder as dt, createStyleResolver as Ne, findAnnotation as ut, findIntlLocale as mt, findLayerById as ue, foldGeomCornerRadii as ht, isCompilerCachingEnabled as gt, isGeometricSymbol as ie, isImageSymbol as pt, resolveDefinition as ft, resolveGeomCornerRadiusPx as me, setCompilerCachingEnabled as vt, toPercent as X } from "@graphysdk/viz-engine";
3
3
  import { Component as yt, useCallback as p, useEffect as k, useId as St, useImperativeHandle as bt, useMemo as H, useRef as he, useState as S, useSyncExternalStore as Tt } from "react";
4
4
  import { Fragment as Et, jsx as c, jsxs as v } from "react/jsx-runtime";
5
5
  import { useStore as se } from "zustand";
6
6
  import { createStore as ce } from "zustand/vanilla";
7
7
  import Gt from "clsx";
8
- import './index.css';var Rt = "_1a5iqpb0", It = "_1a5iqpb1";
9
- var Nt = "_1a5iqpb3", wt = "_1a5iqpb4", Pt = "_1a5iqpb5";
8
+ import './index.css';var Rt = "_1a5iqpb0", wt = "_1a5iqpb1";
9
+ var It = "_1a5iqpb3", Nt = "_1a5iqpb4", Pt = "_1a5iqpb5";
10
10
  var ge = ({ errors: e }) => {
11
11
  const [t, ...r] = e;
12
12
  return /* @__PURE__ */ v("div", {
@@ -14,7 +14,7 @@ var ge = ({ errors: e }) => {
14
14
  className: Rt,
15
15
  children: [
16
16
  /* @__PURE__ */ c("strong", {
17
- className: It,
17
+ className: wt,
18
18
  children: "This chart could not be rendered."
19
19
  }),
20
20
  t && /* @__PURE__ */ c(pe, { diagnostic: t }),
@@ -25,10 +25,10 @@ var ge = ({ errors: e }) => {
25
25
  ]
26
26
  });
27
27
  }, pe = ({ diagnostic: e }) => /* @__PURE__ */ v("div", {
28
- className: Nt,
28
+ className: It,
29
29
  children: [
30
30
  /* @__PURE__ */ c("span", {
31
- className: wt,
31
+ className: Nt,
32
32
  children: e.code
33
33
  }),
34
34
  /* @__PURE__ */ c("p", {
@@ -78,7 +78,7 @@ var Lt = class extends yt {
78
78
  const s = t[n];
79
79
  return s !== void 0 && st(r, s);
80
80
  }), $t = 5, Ht = (e) => {
81
- if (!Ne) return {
81
+ if (!Ie) return {
82
82
  emit: () => {
83
83
  },
84
84
  subscribe: () => Mt,
@@ -293,7 +293,7 @@ function Wt(e, t) {
293
293
  }
294
294
  function Yt(e, t) {
295
295
  let r;
296
- return e.layers.flatMap((n, s) => re(t(n.geom, e.coordSystem.type)) ? Vt(n) ? (r ??= we().readers(e), (r.geom(n).get("overpaint", void 0, "hovered")?.length ?? 0) === 0 ? [] : [{
296
+ return e.layers.flatMap((n, s) => re(t(n.geom, e.coordSystem.type)) ? Vt(n) ? (r ??= Ne().readers(e), (r.geom(n).get("overpaint", void 0, "hovered")?.length ?? 0) === 0 ? [] : [{
297
297
  kind: "userInput",
298
298
  severity: "warning",
299
299
  code: "INVALID_STYLE_RULE",
@@ -329,7 +329,7 @@ var Xt = (e) => ce((t) => ({
329
329
  scene: e,
330
330
  setScene: (r) => t((n) => n.scene === r ? n : { scene: r })
331
331
  })), Jt = ({ spec: e, data: t, colorScheme: r, plugins: n, theme: s, resolveRenderer: a, anchorResolver: i, onSpecChange: l, onError: d, onWarnings: h }) => {
332
- const f = Q(l), L = Q(d), N = Q(h), [{ session: g, compileBus: m, findGeom: T }] = S(() => {
332
+ const f = Q(l), L = Q(d), I = Q(h), [{ session: g, compileBus: m, findGeom: T }] = S(() => {
333
333
  const o = ct({
334
334
  plugins: n,
335
335
  theme: s
@@ -345,7 +345,7 @@ var Xt = (e) => ce((t) => ({
345
345
  errors: [...u.errors, ...o.errors],
346
346
  warnings: [...u.warnings, ...o.warnings]
347
347
  };
348
- }), D = he(null), [R] = S(Qt), E = he(null), w = p((o) => y.errors.length === 0 ? o : [...y.errors, ...o ?? []], [y]), q = p((o) => {
348
+ }), D = he(null), [R] = S(Qt), E = he(null), N = p((o) => y.errors.length === 0 ? o : [...y.errors, ...o ?? []], [y]), q = p((o) => {
349
349
  if (!o.ok) return o.errors;
350
350
  if (E.current) E.current.getState().setScene(o.scene);
351
351
  else {
@@ -353,13 +353,13 @@ var Xt = (e) => ce((t) => ({
353
353
  u.subscribe(R.notify), E.current = u, R.notify();
354
354
  }
355
355
  return null;
356
- }, [R]), [I, x] = S(() => {
356
+ }, [R]), [w, x] = S(() => {
357
357
  const o = g.compile({
358
358
  spec: e,
359
359
  data: t,
360
360
  colorScheme: r
361
361
  });
362
- return D.current = o, w(q(o));
362
+ return D.current = o, N(q(o));
363
363
  }), P = p((o) => o.ok ? [
364
364
  ...o.warnings,
365
365
  ...Bt(o.scene, a),
@@ -372,8 +372,8 @@ var Xt = (e) => ce((t) => ({
372
372
  ] : o.warnings, [a, i]), b = p((o) => {
373
373
  o.length !== 0 && (Z(o), L.current?.(o));
374
374
  }, [L]), C = p((o) => {
375
- o.length !== 0 && (Z(o), N.current?.(o));
376
- }, [N]);
375
+ o.length !== 0 && (Z(o), I.current?.(o));
376
+ }, [I]);
377
377
  k(() => {
378
378
  const o = D.current;
379
379
  o && (b([...y.errors, ...o.ok ? [] : o.errors]), C([...y.warnings, ...P(o)]), o.ok && m.emit({ kind: "init" }));
@@ -392,7 +392,7 @@ var Xt = (e) => ce((t) => ({
392
392
  if (!o) return;
393
393
  o.committedSpec && f.current?.(o.committedSpec);
394
394
  const u = q(o.result);
395
- x(w(u)), u && b(u), C(P(o.result)), u || m.emit({ kind: o.hasSpecChange ? "spec" : "data" });
395
+ x(N(u)), u && b(u), C(P(o.result)), u || m.emit({ kind: o.hasSpecChange ? "spec" : "data" });
396
396
  }, [
397
397
  e,
398
398
  t,
@@ -402,14 +402,14 @@ var Xt = (e) => ce((t) => ({
402
402
  q,
403
403
  b,
404
404
  C,
405
- w,
405
+ N,
406
406
  P,
407
407
  f
408
408
  ]);
409
409
  const M = p((o) => {
410
- x((u) => u === null ? u : w(null)), C(P(o));
410
+ x((u) => u === null ? u : N(null)), C(P(o));
411
411
  }, [
412
- w,
412
+ N,
413
413
  C,
414
414
  P
415
415
  ]), A = p((o) => {
@@ -454,7 +454,7 @@ var Xt = (e) => ce((t) => ({
454
454
  subscribe: R.subscribe,
455
455
  getScene: V,
456
456
  compileBus: m,
457
- compileErrors: I,
457
+ compileErrors: w,
458
458
  findGeom: T
459
459
  };
460
460
  }, Qt = () => {
@@ -465,17 +465,17 @@ var Xt = (e) => ce((t) => ({
465
465
  }),
466
466
  notify: () => e.forEach((t) => t())
467
467
  };
468
- }, Zt = ["cartesian", "polar"], er = ({ data: e, spec: t, plugins: r = [], theme: n, glyphs: s, formattingLocale: a, handleRef: i, onSpecChange: l, onError: d, onWarnings: h, colorScheme: f = "light", mode: L = Ye.readonly, children: N }) => {
468
+ }, Zt = ["cartesian", "polar"], er = ({ data: e, spec: t, plugins: r = [], theme: n, glyphs: s, formattingLocale: a, handleRef: i, onSpecChange: l, onError: d, onWarnings: h, colorScheme: f = "light", mode: L = Ye.readonly, children: I }) => {
469
469
  const g = Fe(L), m = nr(a, h), [T] = S(() => n), [y] = S(() => qe(n?.glyphs, s)), D = T?.colorScheme ?? f, [R] = S(() => Ae([...T?.plugins ?? [], ...r].filter(Pe)));
470
470
  rr(R, y);
471
- const E = St(), [w] = S(() => it(r)), [q] = S(() => lt(r)), [I] = S(() => _t()), [x] = S(() => Be()), P = H(() => we({ colorScheme: D }), [D]), { store: b, dispatch: C, commit: M, paintPreview: A, clearPreview: G, history: _, subscribe: W, getScene: O, compileBus: B, compileErrors: ne, findGeom: Y } = Jt({
471
+ const E = St(), [N] = S(() => it(r)), [q] = S(() => lt(r)), [w] = S(() => _t()), [x] = S(() => Be()), P = H(() => Ne({ colorScheme: D }), [D]), { store: b, dispatch: C, commit: M, paintPreview: A, clearPreview: G, history: _, subscribe: W, getScene: O, compileBus: B, compileErrors: ne, findGeom: Y } = Jt({
472
472
  spec: t,
473
473
  data: e,
474
474
  colorScheme: D,
475
475
  plugins: r,
476
476
  theme: T,
477
477
  resolveRenderer: R,
478
- anchorResolver: w,
478
+ anchorResolver: N,
479
479
  onSpecChange: l,
480
480
  onError: d,
481
481
  onWarnings: h
@@ -484,10 +484,10 @@ var Xt = (e) => ce((t) => ({
484
484
  if (b)
485
485
  return b.subscribe((o, u) => {
486
486
  if (o.scene.spec === u.scene.spec) return;
487
- const { selection: j, setSelection: De } = I.getState();
487
+ const { selection: j, setSelection: De } = w.getState();
488
488
  j.length !== 0 && De(Dt(j, o.scene.spec));
489
489
  });
490
- }, [b, I]);
490
+ }, [b, w]);
491
491
  const $ = H(() => ({
492
492
  dispatch: C,
493
493
  commit: M,
@@ -506,9 +506,9 @@ var Xt = (e) => ce((t) => ({
506
506
  subscribe: W,
507
507
  getScene: O,
508
508
  formattingLocale: m,
509
- getSelection: () => I.getState().selection,
510
- setSelection: (o) => I.getState().setSelection(o),
511
- subscribeSelection: I.subscribe,
509
+ getSelection: () => w.getState().selection,
510
+ setSelection: (o) => w.getState().setSelection(o),
511
+ subscribeSelection: w.subscribe,
512
512
  canPlaceDataLabels: q.hasCapability,
513
513
  canFormatDataLabelsAsPercentages: q.hasPercentageFormat,
514
514
  getGlyphs: () => y,
@@ -519,7 +519,7 @@ var Xt = (e) => ce((t) => ({
519
519
  W,
520
520
  O,
521
521
  m,
522
- I,
522
+ w,
523
523
  q,
524
524
  y,
525
525
  R
@@ -527,7 +527,7 @@ var Xt = (e) => ce((t) => ({
527
527
  const V = H(() => b ? {
528
528
  chartId: E,
529
529
  store: b,
530
- selectionStore: I,
530
+ selectionStore: w,
531
531
  targetBoundaryStore: x,
532
532
  commands: $,
533
533
  history: _,
@@ -536,12 +536,12 @@ var Xt = (e) => ce((t) => ({
536
536
  colorScheme: D,
537
537
  mode: g,
538
538
  styleResolver: P,
539
- anchorResolver: w,
539
+ anchorResolver: N,
540
540
  findGeom: Y
541
541
  } : null, [
542
542
  E,
543
543
  b,
544
- I,
544
+ w,
545
545
  x,
546
546
  $,
547
547
  _,
@@ -550,7 +550,7 @@ var Xt = (e) => ce((t) => ({
550
550
  D,
551
551
  g,
552
552
  P,
553
- w,
553
+ N,
554
554
  Y
555
555
  ]);
556
556
  return /* @__PURE__ */ c(Lt, {
@@ -567,7 +567,7 @@ var Xt = (e) => ce((t) => ({
567
567
  shapes: T?.shapes,
568
568
  children: /* @__PURE__ */ c(xe, {
569
569
  glyphs: y,
570
- children: N
570
+ children: I
571
571
  })
572
572
  })
573
573
  })
@@ -576,7 +576,7 @@ var Xt = (e) => ce((t) => ({
576
576
  });
577
577
  }, tr = (e, t) => (e ?? []).filter((r) => !ie(r) && !t.has(r)), rr = (e, t) => {
578
578
  k(() => {
579
- if (!Ne) return;
579
+ if (!Ie) return;
580
580
  const r = new Set(t.map(({ name: n }) => n));
581
581
  for (const n of Zt) for (const s of tr(e("point", n)?.symbols, r)) console.warn(`[graphy] The ${n} point renderer lists "${s}", but no glyph has that name. The shape menu offers it, and SymbolFigure draws the first listed symbol in its place.`);
582
582
  }, [e, t]);
@@ -713,7 +713,7 @@ var K = (e, t) => {
713
713
  strokeOpacity: e.strokeOpacity,
714
714
  strokeWidth: e.strokeWidth,
715
715
  motion: r ? {
716
- transition: Ie,
716
+ transition: we,
717
717
  intro: !1,
718
718
  fadesIn: !1
719
719
  } : null
@@ -739,7 +739,7 @@ var K = (e, t) => {
739
739
  };
740
740
  return t === void 0 ? ir(n) : /* @__PURE__ */ c(U, { children: /* @__PURE__ */ c(t, { ...n }) });
741
741
  }, ye = (e) => typeof e == "number" ? `${e}px` : e, cr = ({ d: e, source: t, ...r }) => /* @__PURE__ */ c(Oe, {
742
- d: _e(e, Ie, t),
742
+ d: _e(e, we, t),
743
743
  ...r
744
744
  }), lr = (e, t, r, n) => {
745
745
  if (e === void 0) return {};
@@ -771,7 +771,7 @@ var K = (e, t) => {
771
771
  rx: e / t.x,
772
772
  ry: e / t.y
773
773
  }, Un = ({ symbol: e, size: t, fill: r, fillOpacity: n, stroke: s, strokeOpacity: a, strokeWidth: i }) => {
774
- const l = Ze(), d = ze(), h = Xe((N) => N.coordSystem.type), f = ur(e, d("point", h)?.symbols ?? [], l), L = {
774
+ const l = Ze(), d = ze(), h = Xe((I) => I.coordSystem.type), f = ur(e, d("point", h)?.symbols ?? [], l), L = {
775
775
  size: t,
776
776
  fill: r,
777
777
  fillOpacity: n,
@@ -826,7 +826,7 @@ var K = (e, t) => {
826
826
  });
827
827
  }, mr = "drqe3u0", hr = "drqe3u1", gr = "drqe3u2", pr = "drqe3u3", F = "drqe3u4", fr = "drqe3u5", vr = "drqe3u6", yr = "drqe3u7", J = "drqe3u8", Sr = "drqe3u9", br = "drqe3ua";
828
828
  var Tr = "drqe3uc", Er = "drqe3ud", Gr = "drqe3ue", Rr = "drqe3uf";
829
- var Ir = "drqe3uh", Nr = "drqe3ui", Te = {
829
+ var wr = "drqe3uh", Ir = "drqe3ui", Te = {
830
830
  enabled: "drqe3uk drqe3uj",
831
831
  disabled: "drqe3ul drqe3uj"
832
832
  }, Ee = {
@@ -842,7 +842,7 @@ var Ir = "drqe3uh", Nr = "drqe3ui", Te = {
842
842
  const { recordCompile: m } = s.getState(), T = n.getLastTrigger(), y = n.getLastCompile();
843
843
  return T && y && m(T, y), n.subscribe(m);
844
844
  }, [s, n]);
845
- const h = se(s, (m) => m.lastCompile), f = se(s, (m) => m.history), L = n.getCacheStats(), N = h === null && f.length === 0, g = () => {
845
+ const h = se(s, (m) => m.lastCompile), f = se(s, (m) => m.history), L = n.getCacheStats(), I = h === null && f.length === 0, g = () => {
846
846
  d((m) => {
847
847
  const T = !m;
848
848
  return vt(T), T;
@@ -862,7 +862,7 @@ var Ir = "drqe3uh", Nr = "drqe3ui", Te = {
862
862
  children: "compile cache"
863
863
  }), /* @__PURE__ */ c("div", {
864
864
  className: Gr,
865
- children: N ? "production: stats disabled" : h ? `last: ${h.label} · ${le(h.durationMs)}` : "awaiting first compile…"
865
+ children: I ? "production: stats disabled" : h ? `last: ${h.label} · ${le(h.durationMs)}` : "awaiting first compile…"
866
866
  })] }), /* @__PURE__ */ c("button", {
867
867
  type: "button",
868
868
  onClick: () => i((m) => !m),
@@ -883,17 +883,17 @@ var Ir = "drqe3uh", Nr = "drqe3ui", Te = {
883
883
  children: "next compile reflects this toggle"
884
884
  })]
885
885
  }),
886
- !a && !N && /* @__PURE__ */ v(Et, { children: [/* @__PURE__ */ c(wr, {
886
+ !a && !I && /* @__PURE__ */ v(Et, { children: [/* @__PURE__ */ c(Nr, {
887
887
  delta: h?.stages,
888
888
  durations: h?.stageDurationsMs,
889
889
  cumulative: L
890
890
  }), /* @__PURE__ */ c(Pr, { entries: f })] })
891
891
  ]
892
892
  });
893
- }, wr = ({ delta: e, durations: t, cumulative: r }) => /* @__PURE__ */ v("table", {
893
+ }, Nr = ({ delta: e, durations: t, cumulative: r }) => /* @__PURE__ */ v("table", {
894
894
  className: gr,
895
895
  children: [/* @__PURE__ */ c("thead", { children: /* @__PURE__ */ v("tr", {
896
- className: Ir,
896
+ className: wr,
897
897
  children: [
898
898
  /* @__PURE__ */ c("th", {
899
899
  className: pr,
@@ -962,7 +962,7 @@ var Ir = "drqe3uh", Nr = "drqe3ui", Te = {
962
962
  }), Pr = ({ entries: e }) => e.length === 0 ? null : /* @__PURE__ */ v("div", {
963
963
  className: Er,
964
964
  children: [/* @__PURE__ */ c("div", {
965
- className: Nr,
965
+ className: Ir,
966
966
  children: "recent compiles"
967
967
  }), e.map((t) => {
968
968
  const r = Lr(t.stages, (a) => a.misses > 0), n = ae.length;
@@ -1040,79 +1040,79 @@ var Ir = "drqe3uh", Nr = "drqe3ui", Te = {
1040
1040
  return se(e, (t) => t.boundary);
1041
1041
  };
1042
1042
  export {
1043
- ln as CanvasTextMeasurer,
1043
+ cn as CanvasTextMeasurer,
1044
1044
  Hr as DefaultFooter,
1045
1045
  sr as DefaultGeomCircle,
1046
1046
  or as DefaultGeomLine,
1047
1047
  ir as DefaultGeomPath,
1048
1048
  ar as DefaultGeomRect,
1049
- Sn as DefaultGrid,
1050
- an as DefaultHeader,
1051
- hn as DefaultSwatch,
1052
- en as DefaultTooltip,
1049
+ yn as DefaultGrid,
1050
+ on as DefaultHeader,
1051
+ mn as DefaultSwatch,
1052
+ Zr as DefaultTooltip,
1053
1053
  Yn as DevToolsPanel,
1054
1054
  Ye as GRAPH_MODES,
1055
1055
  On as GeomCircle,
1056
1056
  Bn as GeomLine,
1057
- Wr as GeomOverpaint,
1058
- Yr as GeomPanelSizeProvider,
1057
+ zr as GeomOverpaint,
1058
+ Wr as GeomPanelSizeProvider,
1059
1059
  Kn as GeomPath,
1060
1060
  Fn as GeomRect,
1061
1061
  Lt as GraphErrorBoundary,
1062
1062
  ge as GraphErrorPanel,
1063
1063
  er as GraphProvider,
1064
- dn as GraphRenderer,
1065
- mn as GraphyBadge,
1066
- on as HoverProvider,
1067
- Qr as IntlProvider,
1068
- Pn as IntroFade,
1069
- yn as IntroWipeClip,
1064
+ ln as GraphRenderer,
1065
+ un as GraphyBadge,
1066
+ sn as HoverProvider,
1067
+ Jr as IntlProvider,
1068
+ Nn as IntroFade,
1069
+ vn as IntroWipeClip,
1070
1070
  Un as SymbolFigure,
1071
- fn as TextMeasurerProvider,
1072
- Vr as ThemeProvider,
1071
+ pn as TextMeasurerProvider,
1072
+ Yr as ThemeProvider,
1073
1073
  Wn as UnitBoxSvg,
1074
1074
  zn as UnitSpaceSvg,
1075
- Gn as buildDotsEditOutlineShapes,
1075
+ En as buildDotsEditOutlineShapes,
1076
1076
  Mn as createGraphyKit,
1077
- Br as darkTheme,
1078
- En as defineGeomRenderer,
1079
- Jr as defineGlyph,
1080
- Nn as getBuiltInEditOutlineShapes,
1081
- Ur as lightTheme,
1082
- Zr as lightenCss,
1077
+ Or as darkTheme,
1078
+ Tn as defineGeomRenderer,
1079
+ Xr as defineGlyph,
1080
+ wn as getBuiltInEditOutlineShapes,
1081
+ Kr as lightTheme,
1082
+ Qr as lightenCss,
1083
1083
  Dt as pruneSelection,
1084
1084
  K as readPositionPixels,
1085
1085
  An as readRectPixels,
1086
- wn as resolveGraphyBadgeVariant,
1087
- Fr as resolvePathStroke,
1088
- zr as scalePointToPanel,
1089
- nn as stampAxisEditTarget,
1090
- Kr as stampGridEditTarget,
1091
- tn as stampLegendEditTarget,
1092
- sn as useElementScreenRect,
1093
- Mr as useFormattingLocale,
1094
- cn as useGeomHitTest,
1095
- Rn as useGeomHover,
1096
- Or as useGeomPanelSize,
1097
- bn as useGeomReaderTree,
1098
- Cn as useGeomStyleReader,
1086
+ In as resolveGraphyBadgeVariant,
1087
+ Br as resolvePathStroke,
1088
+ Ur as scalePointToPanel,
1089
+ rn as stampAxisEditTarget,
1090
+ Fr as stampGridEditTarget,
1091
+ en as stampLegendEditTarget,
1092
+ nn as useElementScreenRect,
1093
+ xr as useFormattingLocale,
1094
+ an as useGeomHitTest,
1095
+ Gn as useGeomHover,
1096
+ Ar as useGeomPanelSize,
1097
+ Sn as useGeomReaderTree,
1098
+ Pn as useGeomStyleReader,
1099
1099
  et as useGeomViewportSize,
1100
1100
  te as useGraphAnimation,
1101
- Tn as useGraphCommands,
1102
- vn as useGraphHandle,
1101
+ bn as useGraphCommands,
1102
+ fn as useGraphHandle,
1103
1103
  Vn as useGraphHistory,
1104
1104
  jn as useGraphHistoryShortcuts,
1105
1105
  Dn as useGraphLocale,
1106
- xr as useGraphSelection,
1107
- jr as useGuidesTakePress,
1108
- In as useHandleScene,
1109
- Ar as useHoverState,
1110
- rn as usePaintDefs,
1111
- Ln as useResolvedStyle,
1106
+ Ln as useGraphSelection,
1107
+ Vr as useGuidesTakePress,
1108
+ Rn as useHandleScene,
1109
+ Mr as useHoverState,
1110
+ tn as usePaintDefs,
1111
+ Cn as useResolvedStyle,
1112
1112
  Xe as useSceneSelector,
1113
- un as useStyleReaderTree,
1114
- gn as useStyleResolver,
1113
+ dn as useStyleReaderTree,
1114
+ hn as useStyleResolver,
1115
1115
  Xn as useTargetBoundary,
1116
- pn as useTextMeasurer,
1117
- Xr as vars
1116
+ gn as useTextMeasurer,
1117
+ jr as vars
1118
1118
  };