semiotic 3.10.1 → 3.10.3
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/README.md +64 -63
- package/ai/artifact-surface-inventory.json +4 -1
- package/ai/behaviorContracts.cjs +1 -1
- package/ai/dist/mcp-server.js +25 -24
- package/ai/examples.md +28 -0
- package/ai/reference.md +9 -4
- package/ai/schema.json +121 -5
- package/ai/surface-manifest.json +3 -2
- package/ai/system-prompt.md +1 -1
- package/ai/task-packets/compare-category-totals.json +7 -53
- package/ai/task-packets/compare-category-totals.md +4 -4
- package/ai/task-packets/correct-published-chart.json +7 -53
- package/ai/task-packets/correct-published-chart.md +4 -4
- package/ai/task-packets/index.json +9 -9
- package/ai/task-packets/update-live-chart.json +8 -54
- package/ai/task-packets/update-live-chart.md +4 -4
- package/dist/c-27DCB5T6.min.js +18 -0
- package/dist/c-2MONF2P6.min.js +1 -0
- package/dist/c-3AGX252H.min.js +1 -0
- package/dist/c-3B6JZEZT.min.js +1 -0
- package/dist/c-3BYZXCX3.min.js +4 -0
- package/dist/c-3DIPZJDO.min.js +1 -0
- package/dist/c-3FOUMWLR.min.js +1 -0
- package/dist/c-3NA6I656.min.js +2 -0
- package/dist/c-3OFVBWQY.min.js +1 -0
- package/dist/{c-QA3HMQJP.min.js → c-3PFVJFBK.min.js} +1 -1
- package/dist/c-3PPO7ZJF.min.js +4 -0
- package/dist/c-3YEW2PK6.min.js +1 -0
- package/dist/c-43XNOQNQ.min.js +391 -0
- package/dist/c-4JKDJUYD.min.js +1 -0
- package/dist/c-4LKK5YWB.min.js +1 -0
- package/dist/c-4V3CD337.min.js +1 -0
- package/dist/c-4XLHPQTP.min.js +1 -0
- package/dist/c-5NYONM6V.min.js +5 -0
- package/dist/c-5PIKBUMF.min.js +1 -0
- package/dist/c-6IVBV5NO.min.js +1 -0
- package/dist/c-7APWCEPL.min.js +1 -0
- package/dist/{c-ORLEBW72.min.js → c-7FKPPCGN.min.js} +1 -1
- package/dist/c-ABMGCCLT.min.js +1 -0
- package/dist/c-AINGQGUN.min.js +1 -0
- package/dist/c-AXJ2QI3F.min.js +1 -0
- package/dist/c-BQYD7T4E.min.js +1 -0
- package/dist/{c-V4XMSLC3.min.js → c-BYJJ7EMG.min.js} +1 -1
- package/dist/c-C4SXYFXL.min.js +1 -0
- package/dist/c-CLDCKFBE.min.js +1 -0
- package/dist/c-CLJCJSFU.min.js +1 -0
- package/dist/c-CLLCX3PT.min.js +2 -0
- package/dist/c-CO4NDAD6.min.js +51 -0
- package/dist/c-ECHBKW7U.min.js +1 -0
- package/dist/c-EPJWM2UT.min.js +1 -0
- package/dist/c-FD2BXSRG.min.js +1 -0
- package/dist/c-FHNY57SO.min.js +209 -0
- package/dist/c-FMCUQ6JX.min.js +1 -0
- package/dist/c-FOTTQHOO.min.js +1 -0
- package/dist/c-FU7A5KSY.min.js +1 -0
- package/dist/c-GHN6IR4Y.min.js +1 -0
- package/dist/{c-J6DVC236.min.js → c-GK263BF4.min.js} +1 -1
- package/dist/c-GSCO3FWL.min.js +1 -0
- package/dist/c-GYLOSK7M.min.js +1 -0
- package/dist/c-HK4OSLZA.min.js +1 -0
- package/dist/c-HLGTD5SJ.min.js +1 -0
- package/dist/c-HNHKIMIV.min.js +61 -0
- package/dist/{c-D6HAAPTX.min.js → c-IBRLFKWA.min.js} +1 -1
- package/dist/c-IIV73MUW.min.js +1 -0
- package/dist/c-IJCZGUG6.min.js +31 -0
- package/dist/c-ISA6IJ6V.min.js +41 -0
- package/dist/c-JC76YAHB.min.js +33 -0
- package/dist/c-JJKRER47.min.js +1 -0
- package/dist/c-JO6AYCU4.min.js +1 -0
- package/dist/c-JOPGDP6N.min.js +1 -0
- package/dist/c-JWHPG6S2.min.js +1 -0
- package/dist/c-JXVYIXTV.min.js +1 -0
- package/dist/c-K2ZIYDI3.min.js +1 -0
- package/dist/c-K37JAIWA.min.js +4 -0
- package/dist/c-KXH7LFIL.min.js +26 -0
- package/dist/c-M43PK7K4.min.js +1 -0
- package/dist/c-MTX2AO5S.min.js +1 -0
- package/dist/c-N5WT7TXG.min.js +1 -0
- package/dist/c-NATWERHZ.min.js +1 -0
- package/dist/{c-42PLDTX7.min.js → c-O53GOO7H.min.js} +1 -1
- package/dist/c-OVQB75PE.min.js +1 -0
- package/dist/c-P3SKRNZN.min.js +1 -0
- package/dist/c-P5NXQWIM.min.js +1 -0
- package/dist/c-P7BQMVQQ.min.js +1 -0
- package/dist/{c-GNTXRXRN.min.js → c-PDQHLOKU.min.js} +1 -1
- package/dist/c-PITYSOPK.min.js +1 -0
- package/dist/c-QPO24R7Q.min.js +1 -0
- package/dist/c-QXLDCATV.min.js +1 -0
- package/dist/c-R2HUSWKB.min.js +1 -0
- package/dist/{c-HYW2XA4Q.min.js → c-RHDOOQ4X.min.js} +1 -1
- package/dist/c-RZPP5ERV.min.js +1 -0
- package/dist/c-SAP5KY6R.min.js +9 -0
- package/dist/{c-WUWXGQYA.min.js → c-SJIB5RNI.min.js} +1 -1
- package/dist/c-SQNEVNWT.min.js +1 -0
- package/dist/c-STHZWF3D.min.js +1 -0
- package/dist/c-TIDKVMMZ.min.js +1 -0
- package/dist/c-TIMGODBG.min.js +1 -0
- package/dist/c-TR7OHUAO.min.js +2 -0
- package/dist/c-TVKZC4BY.min.js +1 -0
- package/dist/c-U5XVLSHN.min.js +1 -0
- package/dist/c-U6NLVFN4.min.js +1 -0
- package/dist/{c-VJTDST2R.min.js → c-UBHICVSC.min.js} +1 -1
- package/dist/c-UMGHCBH5.min.js +114 -0
- package/dist/c-UOPPO26M.min.js +1 -0
- package/dist/c-UUDAON4Z.min.js +1 -0
- package/dist/c-V32TPPY2.min.js +1 -0
- package/dist/c-V5KFJWQQ.min.js +1 -0
- package/dist/c-VEMCBQZZ.min.js +100 -0
- package/dist/{c-P65V6HLO.min.js → c-VN557BQE.min.js} +1 -1
- package/dist/c-WD2RL76M.min.js +116 -0
- package/dist/c-Y342FJ6K.min.js +1 -0
- package/dist/c-YL7HJL5J.min.js +1 -0
- package/dist/c-YM6CT4LJ.min.js +1 -0
- package/dist/{c-MVR3RWF3.min.js → c-YMFUIO54.min.js} +1 -1
- package/dist/c-YQVOKPKR.min.js +1 -0
- package/dist/c-YRJ3BJQZ.min.js +1 -0
- package/dist/c-YT5KPVNP.min.js +1 -0
- package/dist/c-Z6GRGS53.min.js +1 -0
- package/dist/c-ZVOFLE2P.min.js +46 -0
- package/dist/components/CategoryColors.d.ts +7 -0
- package/dist/components/LinkedCharts.d.ts +2 -1
- package/dist/components/ai/audienceProfile.d.ts +18 -1
- package/dist/components/ai/describeChart.d.ts +5 -1
- package/dist/components/ai/intentManifest.d.ts +16 -0
- package/dist/components/ai/intentRegistry.d.ts +12 -0
- package/dist/components/ai/intents.d.ts +6 -6
- package/dist/components/ai/streamSchema.d.ts +19 -0
- package/dist/components/ai/streamingTypes.d.ts +57 -11
- package/dist/components/ai/suggestCharts.d.ts +1 -1
- package/dist/components/ai/suggestStreamCharts.d.ts +43 -8
- package/dist/components/ai/suggestStreamDashboard.d.ts +35 -0
- package/dist/components/ai/variantDiscovery.d.ts +1 -1
- package/dist/components/charts/ordinal/BarChart.streamCapability.d.ts +2 -0
- package/dist/components/charts/ordinal/DonutChart.streamCapability.d.ts +2 -0
- package/dist/components/charts/ordinal/GroupedBarChart.streamCapability.d.ts +2 -0
- package/dist/components/charts/ordinal/PieChart.streamCapability.d.ts +2 -0
- package/dist/components/charts/ordinal/StackedBarChart.streamCapability.d.ts +2 -0
- package/dist/components/charts/realtime/RealtimeAccumulator.d.ts +14 -0
- package/dist/components/charts/realtime/RealtimeHeatmap.d.ts +6 -5
- package/dist/components/charts/realtime/RealtimeHistogram.d.ts +5 -1
- package/dist/components/charts/realtime/RealtimeLineChart.d.ts +2 -161
- package/dist/components/charts/realtime/RealtimeLineChart.types.d.ts +175 -0
- package/dist/components/charts/realtime/RealtimeSwarmChart.d.ts +6 -5
- package/dist/components/charts/realtime/RealtimeWaterfallChart.d.ts +6 -5
- package/dist/components/charts/realtime/aggregate.d.ts +11 -1
- package/dist/components/charts/realtime/resolveWindowSize.d.ts +1 -1
- package/dist/components/charts/shared/DirectLabelLayer.d.ts +25 -0
- package/dist/components/charts/shared/directLabels.d.ts +12 -0
- package/dist/components/charts/shared/knownChartComponents.d.ts +4 -1
- package/dist/components/charts/shared/lineSeriesSsr.d.ts +0 -12
- package/dist/components/charts/shared/useChartSetup.d.ts +3 -1
- package/dist/components/charts/shared/useNetworkChartSetup.d.ts +1 -1
- package/dist/components/charts/value/BigNumber.streamCapability.d.ts +2 -0
- package/dist/components/charts/value/GaugeChart.streamCapability.d.ts +2 -0
- package/dist/components/charts/xy/BubbleChart.d.ts +4 -1
- package/dist/components/charts/xy/ConnectedScatterplot.d.ts +4 -1
- package/dist/components/charts/xy/LineChart.d.ts +4 -1
- package/dist/components/charts/xy/Scatterplot.d.ts +7 -0
- package/dist/components/data/transforms.d.ts +1 -0
- package/dist/components/realtime/HyperLogLog.d.ts +19 -0
- package/dist/components/realtime/ReorderBuffer.d.ts +2 -2
- package/dist/components/realtime/TDigest.d.ts +22 -0
- package/dist/components/realtime/WindowAccumulator.d.ts +22 -5
- package/dist/components/realtime/applyChangelog.d.ts +38 -0
- package/dist/components/realtime/minHeap.d.ts +3 -0
- package/dist/components/recipes/atlas/flowCircuitChartProps.d.ts +1 -1
- package/dist/components/recipes/layout1d.d.ts +2 -20
- package/dist/components/recipes/minGapPlacement.d.ts +20 -0
- package/dist/components/semiotic-ai-core.d.ts +8 -3
- package/dist/components/semiotic-ai-stream.d.ts +10 -0
- package/dist/components/semiotic-ai.d.ts +4 -6
- package/dist/components/semiotic-realtime-core.d.ts +6 -2
- package/dist/components/semiotic-stream-types.d.ts +14 -0
- package/dist/components/semiotic-xy.d.ts +1 -0
- package/dist/components/semiotic.d.ts +3 -11
- package/dist/components/server/encodeSvgFramesToGif.d.ts +2 -0
- package/dist/components/server/rasterizeSVG.d.ts +2 -0
- package/dist/components/server/registerServerXYPlugins.d.ts +2 -0
- package/dist/components/server/renderEvidence.d.ts +4 -0
- package/dist/components/server/serverChartConfigs.d.ts +5 -0
- package/dist/components/server/serverChartConfigsRealtime.d.ts +6 -0
- package/dist/components/server/serverRealtimeCategoryColors.d.ts +3 -0
- package/dist/components/server/staticAnnotations.d.ts +9 -0
- package/dist/components/stream/SceneGraph.d.ts +3 -3
- package/dist/components/stream/StalenessBadge.d.ts +5 -2
- package/dist/components/stream/pipelinePathJoin.d.ts +27 -0
- package/dist/components/stream/pipelineTransitionTypes.d.ts +43 -0
- package/dist/components/stream/pipelineTransitions.d.ts +5 -35
- package/dist/components/stream/seriesGeometry.d.ts +2 -1
- package/dist/components/stream/streamEncodingTypes.d.ts +9 -0
- package/dist/components/stream/types.d.ts +25 -2
- package/dist/components/text/axisLabelAssessment.d.ts +15 -0
- package/dist/components/text/browserAxisLabelAssessment.d.ts +1 -0
- package/dist/components/text/browserLabelMeasurement.d.ts +3 -0
- package/dist/components/text/labelMeasurement.d.ts +19 -0
- package/dist/components/text/labelPlacement.d.ts +71 -0
- package/dist/components/text/useAxisLabelAssessment.d.ts +6 -0
- package/dist/components/text/useLabelMeasurer.d.ts +3 -0
- package/dist/controls.module.min.js +71 -1
- package/dist/geo.min.js +231 -1
- package/dist/geo.module.min.js +31 -1
- package/dist/network.module.min.js +1 -1
- package/dist/ordinal.module.min.js +1 -1
- package/dist/physics-matter.module.min.js +1 -1
- package/dist/physics-rapier.module.min.js +1 -1
- package/dist/physics.module.min.js +1 -1
- package/dist/physicsWorker.js +1 -1
- package/dist/rough.min.js +2 -1
- package/dist/rough.module.min.js +2 -1
- package/dist/semiotic-access.module.min.js +1 -1
- package/dist/semiotic-ai-artifact-policy-constants.module.min.js +1 -1
- package/dist/semiotic-ai-core.d.ts +8 -3
- package/dist/semiotic-ai-core.min.js +4 -1
- package/dist/semiotic-ai-core.module.min.js +4 -1
- package/dist/semiotic-ai-hash-primitives.module.min.js +1 -1
- package/dist/semiotic-ai.d.ts +4 -6
- package/dist/semiotic-ai.module.min.js +14 -1
- package/dist/semiotic-artifact-react.min.js +269 -1
- package/dist/semiotic-artifact-react.module.min.js +137 -1
- package/dist/semiotic-artifact.min.js +3 -1
- package/dist/semiotic-artifact.module.min.js +3 -1
- package/dist/semiotic-atlas-core.min.js +2 -1
- package/dist/semiotic-atlas-core.module.min.js +1 -1
- package/dist/semiotic-atlas-selection.module.min.js +1 -1
- package/dist/semiotic-atlas.module.min.js +11 -1
- package/dist/semiotic-client-cjs-shared.min.js +1530 -1
- package/dist/semiotic-client-glyph.module.min.js +3 -1
- package/dist/semiotic-client-responsive.module.min.js +1 -1
- package/dist/semiotic-client-shared.module.min.js +1 -1
- package/dist/semiotic-custom-layout-selection-cjs-shared.min.js +2 -1
- package/dist/semiotic-data.min.js +1 -1
- package/dist/semiotic-data.module.min.js +1 -1
- package/dist/semiotic-evidence.min.js +3 -1
- package/dist/semiotic-evidence.module.min.js +3 -1
- package/dist/semiotic-experimental-auxiliary.module.min.js +8 -1
- package/dist/semiotic-experimental-node-auxiliary.module.min.js +8 -1
- package/dist/semiotic-experimental-react-shared.module.min.js +1 -1
- package/dist/semiotic-experimental-vacp.min.js +1 -1
- package/dist/semiotic-experimental-vacp.module.min.js +1 -1
- package/dist/semiotic-line.module.min.js +1 -1
- package/dist/semiotic-realtime-core.d.ts +6 -2
- package/dist/semiotic-realtime-core.module.min.js +1 -1
- package/dist/semiotic-realtime-react.module.min.js +1 -1
- package/dist/semiotic-recipes-core-cjs-base.min.js +160 -1
- package/dist/semiotic-recipes-core.module.min.js +72 -1
- package/dist/semiotic-recipes-geo-cjs.min.js +1 -1
- package/dist/semiotic-recipes-react.min.js +3 -1
- package/dist/semiotic-server-edge-node.module.min.js +391 -1
- package/dist/semiotic-server-edge.min.js +651 -1
- package/dist/semiotic-server-edge.module.min.js +372 -1
- package/dist/semiotic-server-node.min.js +651 -1
- package/dist/semiotic-server-node.module.min.js +1 -1
- package/dist/semiotic-text.min.js +1 -1
- package/dist/semiotic-text.module.min.js +1 -1
- package/dist/semiotic-themes-core.min.js +1 -1
- package/dist/semiotic-themes-core.module.min.js +1 -1
- package/dist/semiotic-themes.min.js +1 -1
- package/dist/semiotic-themes.module.min.js +1 -1
- package/dist/semiotic-utils-core.min.js +11 -1
- package/dist/semiotic-utils-core.module.min.js +8 -1
- package/dist/semiotic-value.module.min.js +15 -1
- package/dist/semiotic-xy.d.ts +1 -0
- package/dist/semiotic.d.ts +3 -11
- package/dist/semiotic.module.min.js +10 -1
- package/dist/server.min.js +651 -1
- package/dist/server.module.min.js +1 -1
- package/dist/xy.module.min.js +1 -1
- package/package.json +8 -7
- package/dist/c-2N7IU2NY.min.js +0 -1
- package/dist/c-2RL2QPZJ.min.js +0 -1
- package/dist/c-2WK7YJLL.min.js +0 -1
- package/dist/c-45CQWZZ6.min.js +0 -1
- package/dist/c-4BRHKVKV.min.js +0 -1
- package/dist/c-7242NXSG.min.js +0 -1
- package/dist/c-7DVPSB5C.min.js +0 -1
- package/dist/c-7EGHJU2F.min.js +0 -1
- package/dist/c-A7OGOFSL.min.js +0 -1
- package/dist/c-AFBSWT77.min.js +0 -1
- package/dist/c-AH5HWZWS.min.js +0 -1
- package/dist/c-AJ7EC32V.min.js +0 -1
- package/dist/c-AQADQNY7.min.js +0 -1
- package/dist/c-ATM475SA.min.js +0 -1
- package/dist/c-AVO3Q7T7.min.js +0 -1
- package/dist/c-B7GW7IHJ.min.js +0 -1
- package/dist/c-BNFJMDHN.min.js +0 -1
- package/dist/c-BOHCQILI.min.js +0 -1
- package/dist/c-C3TZLTZK.min.js +0 -1
- package/dist/c-CGQAQWBV.min.js +0 -1
- package/dist/c-CPV4N35K.min.js +0 -1
- package/dist/c-DIPEYUOW.min.js +0 -1
- package/dist/c-E4JDJH4I.min.js +0 -1
- package/dist/c-E72OTUZU.min.js +0 -1
- package/dist/c-E7I2L7CU.min.js +0 -1
- package/dist/c-ELDWAO2V.min.js +0 -1
- package/dist/c-EUBTECGM.min.js +0 -1
- package/dist/c-EUMPMDCS.min.js +0 -1
- package/dist/c-EZZT2WAE.min.js +0 -1
- package/dist/c-FHBVFCQB.min.js +0 -1
- package/dist/c-G4HCO2IQ.min.js +0 -1
- package/dist/c-G5VIJEOK.min.js +0 -1
- package/dist/c-GHVOXAYH.min.js +0 -1
- package/dist/c-GXV3C3MO.min.js +0 -1
- package/dist/c-HHTK2R75.min.js +0 -1
- package/dist/c-HLLFJYTY.min.js +0 -1
- package/dist/c-HP4ZFM47.min.js +0 -1
- package/dist/c-HPOYKCCG.min.js +0 -1
- package/dist/c-HYDTS5OP.min.js +0 -1
- package/dist/c-I4QJ6YLM.min.js +0 -1
- package/dist/c-IK33LNZ6.min.js +0 -1
- package/dist/c-IK3PZHRY.min.js +0 -1
- package/dist/c-JIMJF6F6.min.js +0 -1
- package/dist/c-JUKIWTBJ.min.js +0 -1
- package/dist/c-KKPMHAZC.min.js +0 -1
- package/dist/c-L6WNDBHV.min.js +0 -1
- package/dist/c-LDEX5OFW.min.js +0 -1
- package/dist/c-LESEUVC5.min.js +0 -1
- package/dist/c-LYQMZMZQ.min.js +0 -1
- package/dist/c-MB6CV5NC.min.js +0 -1
- package/dist/c-MOKJOIPE.min.js +0 -1
- package/dist/c-N3FXLRNT.min.js +0 -1
- package/dist/c-N5NPTJVJ.min.js +0 -1
- package/dist/c-NHBL4J67.min.js +0 -1
- package/dist/c-ODG6TFSY.min.js +0 -1
- package/dist/c-PRIKOLTE.min.js +0 -1
- package/dist/c-PSKKFZNP.min.js +0 -1
- package/dist/c-PSNI6KAZ.min.js +0 -1
- package/dist/c-QAVFOEUY.min.js +0 -1
- package/dist/c-R2P4RR7Q.min.js +0 -1
- package/dist/c-RFC7UAG7.min.js +0 -1
- package/dist/c-S3AZX5PP.min.js +0 -1
- package/dist/c-SGAURYHG.min.js +0 -1
- package/dist/c-SJMWU6UX.min.js +0 -1
- package/dist/c-STIIGQOD.min.js +0 -1
- package/dist/c-T2ASIJVZ.min.js +0 -1
- package/dist/c-T2V7O2LO.min.js +0 -1
- package/dist/c-TKG2NP7G.min.js +0 -1
- package/dist/c-TX3THUTO.min.js +0 -1
- package/dist/c-TX7XJM3Z.min.js +0 -1
- package/dist/c-UC7SIU2W.min.js +0 -1
- package/dist/c-UMXSJIOV.min.js +0 -1
- package/dist/c-VRSXMLYF.min.js +0 -1
- package/dist/c-VSLWSAN2.min.js +0 -1
- package/dist/c-VXLOLYTO.min.js +0 -1
- package/dist/c-W4ZUKSEQ.min.js +0 -1
- package/dist/c-WCBRPILW.min.js +0 -1
- package/dist/c-WGHT7OCY.min.js +0 -1
- package/dist/c-WWCW3APR.min.js +0 -1
- package/dist/c-XSB27XPS.min.js +0 -1
- package/dist/c-Y6PYUMFU.min.js +0 -1
- package/dist/c-YDECTEUW.min.js +0 -1
- package/dist/c-YF3YKVQI.min.js +0 -1
- package/dist/c-YLZIV3VS.min.js +0 -1
- package/dist/c-ZIVPFTOC.min.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a as e,b as a,c as s,d as r,e as t,f as n,g as i,h as d,i as o,j as S,k as c,l as m,m as G,n as h,o as T,p as V,q as g}from"./c-43XNOQNQ.min.js";export{G as generateFrameSVGs,h as generateFrameSequence,T as generatePhysicsFrameSVGs,o as renderChart,S as renderChartWithEvidence,m as renderDashboard,i as renderGeoToStaticSVG,n as renderNetworkToStaticSVG,t as renderOrdinalToStaticSVG,g as renderPhysicsToAnimatedGif,V as renderToAnimatedGif,c as renderToImage,s as renderToStaticSVG,r as renderXYToStaticSVG,e as resolveTheme,d as serializeSvgPrecision,a as themeStyles};
|
package/dist/xy.module.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{
|
|
2
|
+
import{a as s,b as a,e as i}from"./c-GSCO3FWL.min.js";import{a as t}from"./c-BQYD7T4E.min.js";import{a as m,b as r,c as o,e,f as n,g as p,h as c,i as j,j as l,k as C,l as h,m as T,o as u,p as S,q as P,r as F}from"./c-CO4NDAD6.min.js";import"./c-27DCB5T6.min.js";import{e as L}from"./c-PITYSOPK.min.js";import"./c-PDQHLOKU.min.js";import"./c-YL7HJL5J.min.js";import"./c-IBRLFKWA.min.js";import"./c-FMCUQ6JX.min.js";import"./c-GK263BF4.min.js";import"./c-AXJ2QI3F.min.js";import"./c-CLDCKFBE.min.js";import{d as M}from"./c-HNHKIMIV.min.js";import"./c-VN557BQE.min.js";import"./c-MTX2AO5S.min.js";import"./c-R2HUSWKB.min.js";import"./c-7FKPPCGN.min.js";import"./c-STHZWF3D.min.js";import"./c-TVKZC4BY.min.js";import"./c-GYLOSK7M.min.js";import"./c-UUDAON4Z.min.js";import"./c-SQNEVNWT.min.js";import"./c-QPO24R7Q.min.js";import"./c-HK4OSLZA.min.js";import"./c-JOPGDP6N.min.js";import"./c-NATWERHZ.min.js";import"./c-P5NXQWIM.min.js";import"./c-BYJJ7EMG.min.js";import"./c-TIDKVMMZ.min.js";import"./c-TIMGODBG.min.js";import"./c-3AGX252H.min.js";import"./c-QXLDCATV.min.js";import"./c-U5XVLSHN.min.js";import"./c-SAP5KY6R.min.js";import"./c-V5KFJWQQ.min.js";import{b as B}from"./c-CLLCX3PT.min.js";import{Aa as D,Oa as R,Ob as A,Pa as K,Pb as X,Rb as H,Sb as N,Tb as Y,Ua as O,Ub as V,qb as b,rb as f,za as I}from"./c-UMGHCBH5.min.js";import"./c-Y342FJ6K.min.js";import{d as Q,e as U,r as J,s as G,t as W,u as d}from"./c-3BYZXCX3.min.js";import"./c-JXVYIXTV.min.js";import"./c-5NYONM6V.min.js";import"./c-U6NLVFN4.min.js";import"./c-3PFVJFBK.min.js";export{p as AreaChart,C as BubbleChart,n as BumpChart,P as CandlestickChart,r as ConnectedScatterplot,s as DEFAULT_HIT_RADIUS,c as DifferenceChart,l as Heatmap,L as LineChart,T as MinimapChart,S as MultiAxisLineChart,K as MultiLineTooltip,O as MultiPointTooltip,u as QuadrantChart,m as Scatterplot,h as ScatterplotMatrix,j as StackedAreaChart,M as StreamXYFrame,R as Tooltip,I as TooltipRoot,F as WaterfallChart,o as XYCustomChart,V as composeStyleRules,U as glyphExtent,Q as glyphPlacement,G as hatchFillId,W as hatchPatternDef,a as hitTargetPoint,i as hitTargetRect,J as isHatchFill,A as makeRuleValueResolver,X as makeXYRuleContext,D as markTooltipChrome,H as matchesThreshold,e as rankBumpData,t as registerBuiltInXYPlugins,f as resolveResponsiveRules,Y as resolveStyleRules,d as resolveSvgFill,b as responsiveRuleMatches,N as ruleMatches,B as useCustomLayoutSelection};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "semiotic",
|
|
3
|
-
"version": "3.10.
|
|
3
|
+
"version": "3.10.3",
|
|
4
4
|
"mcpName": "io.github.nteract/semiotic",
|
|
5
5
|
"description": "Verified generative visualization for React and agents, with deterministic chart validation, repair, rendering evidence, and MCP.",
|
|
6
6
|
"main": "dist/semiotic.min.js",
|
|
@@ -366,6 +366,7 @@
|
|
|
366
366
|
"docs:api:json": "typedoc --gitRevision \"v$npm_package_version\" --json docs/public/api/api.json && node scripts/generate-component-descriptions.mjs",
|
|
367
367
|
"docs:descriptions:json": "node scripts/generate-component-descriptions.mjs",
|
|
368
368
|
"typescript": "tsc --noEmit",
|
|
369
|
+
"pretypescript:tests": "npm run build:declarations",
|
|
369
370
|
"typescript:tests": "node scripts/check-test-types.mjs",
|
|
370
371
|
"typescript:tests:raw": "tsc -p tsconfig.tests.json --noEmit --pretty false",
|
|
371
372
|
"typescript:mcp": "tsc -p tsconfig.mcp.json --noEmit",
|
|
@@ -460,8 +461,8 @@
|
|
|
460
461
|
"check:readme-dashboard": "npx tsx scripts/generate-readme-dashboard.tsx --check",
|
|
461
462
|
"check:release-version-alignment": "node scripts/check-release-version-alignment.mjs",
|
|
462
463
|
"check:typedoc": "typedoc --emit none",
|
|
463
|
-
"release:check": "npm run
|
|
464
|
-
"prepublishOnly": "npm run
|
|
464
|
+
"release:check": "npm run check:release-version-alignment && npm run check:playwright-alignment && npm run lint && npm run check:file-size && npm run typescript && npm run typescript:tests && npm run typescript:mcp && npm run test:examples:source && npm run check:mcp-bundle && npm run build:mcp && npm run test:coverage && npm run test:artifact-cli:from-dist && npm run test:protected-doc-boundaries && npm run test:release-infrastructure && npm run check:chart-specs && npm run check:artifact-contract && npm run check:ai-schema && npm run check:capabilities && npm run check:capability-coverage && npm run check:docs-coverage && npm run check:docs-example-integrity && npm run check:docs-prop-tables && npm run check:docs-playground-controls && npm run check:llms && npm run check:blog-entries && npm run check:ai-reference-coverage && npm run check:context7 && npm run check:mcp-registry && npm run test:mcp-registry-live && npm run check:surface && npm run check:ai-surface && npm run check:agent-skill && npm run check:ai-tasks && npm run test:adoption-evals && npm run check:adoption-evals && npm run check:ai-contracts && npm run check:ai-instructions && npm run check:ssr && npm run check:test-quality && npm run check:jsdoc-coverage && npm run check:ai-examples-coverage && npm run check:typedoc && npm run check:website-build && npm run check:package-surface && npm run check:api-surface && npm run check:api-compat && npm run check:protected-doc-boundaries && npm run check:readme-dashboard && npm run check:bundle-sizes && npm run size && npm run check:pack && npm pack --dry-run",
|
|
465
|
+
"prepublishOnly": "npm run check:release-version-alignment && npm run check:playwright-alignment && npm run lint && npm run check:file-size && npm run typescript && npm run typescript:tests && npm run typescript:mcp && npm run test:examples:source && npm run check:mcp-bundle && npm run build:mcp && npm run test:coverage && npm run test:artifact-cli:from-dist && npm run test:protected-doc-boundaries && npm run test:release-infrastructure && npm run check:chart-specs && npm run check:artifact-contract && npm run check:ai-schema && npm run check:capabilities && npm run check:capability-coverage && npm run check:docs-coverage && npm run check:docs-example-integrity && npm run check:docs-prop-tables && npm run check:llms && npm run check:blog-entries && npm run check:ai-reference-coverage && npm run check:context7 && npm run check:mcp-registry && npm run test:mcp-registry-live && npm run check:surface && npm run check:ai-surface && npm run check:agent-skill && npm run check:ai-tasks && npm run check:ai-contracts && npm run check:ai-instructions && npm run check:ssr && npm run check:test-quality && npm run check:jsdoc-coverage && npm run check:ai-examples-coverage && npm run check:typedoc && rm -rf dist && npm run check:website-build && npm run check:package-surface && npm run check:api-surface && npm run check:api-compat && npm run check:protected-doc-boundaries && npm run check:readme-dashboard && npm run check:bundle-sizes && npm run size",
|
|
465
466
|
"check:router-alignment": "node scripts/check-router-alignment.mjs",
|
|
466
467
|
"docs:ai-tasks": "node scripts/generate-ai-task-packets.mjs",
|
|
467
468
|
"check:ai-tasks": "node --test scripts/ai-task-packets.test.mjs && node scripts/generate-ai-task-packets.mjs --check",
|
|
@@ -504,8 +505,8 @@
|
|
|
504
505
|
],
|
|
505
506
|
"license": "Apache-2.0",
|
|
506
507
|
"devDependencies": {
|
|
507
|
-
"@chenglou/pretext": "0.0.9",
|
|
508
508
|
"@axe-core/playwright": "^4.12.1",
|
|
509
|
+
"@chenglou/pretext": "0.0.9",
|
|
509
510
|
"@eslint/compat": "^2.1.0",
|
|
510
511
|
"@eslint/js": "^9.39.5",
|
|
511
512
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
@@ -534,8 +535,8 @@
|
|
|
534
535
|
"@typescript-eslint/eslint-plugin": "^8.63.0",
|
|
535
536
|
"@typescript-eslint/parser": "^8.63.0",
|
|
536
537
|
"@vitejs/plugin-react": "^6.1.1",
|
|
537
|
-
"@vitest/coverage-v8": "
|
|
538
|
-
"@vitest/ui": "
|
|
538
|
+
"@vitest/coverage-v8": "4.1.11",
|
|
539
|
+
"@vitest/ui": "4.1.11",
|
|
539
540
|
"ajv": "^8.20.0",
|
|
540
541
|
"d3-dsv": "^3.0.1",
|
|
541
542
|
"d3-flextree-v4": "^1.0.1",
|
|
@@ -565,7 +566,7 @@
|
|
|
565
566
|
"typescript": "~6.0.3",
|
|
566
567
|
"typescript-eslint": "^8.63.0",
|
|
567
568
|
"vite": "^8.1.4",
|
|
568
|
-
"vitest": "
|
|
569
|
+
"vitest": "4.1.11",
|
|
569
570
|
"world-atlas": "^2.0.2"
|
|
570
571
|
},
|
|
571
572
|
"peerDependencies": {
|
package/dist/c-2N7IU2NY.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function t(t){return c.has(t)?e:r}var o={top:50,right:40,bottom:60,left:70},r={top:20,right:80,bottom:20,left:80},e={top:40,right:40,bottom:40,left:40},c=new Set(["chord","force","circlepack","orbit"]);export{o as AXIS_FRAME_DEFAULT_MARGIN,t as networkFrameDefaultMargin};
|
package/dist/c-2RL2QPZJ.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{registerBuiltInXYPlugins as m}from"./c-WWCW3APR.min.js";import"./c-WCBRPILW.min.js";import"./c-E72OTUZU.min.js";import"./c-G5VIJEOK.min.js";import"./c-LESEUVC5.min.js";import"./c-R2P4RR7Q.min.js";import"./c-SJMWU6UX.min.js";import"./c-AVO3Q7T7.min.js";import"./c-TKG2NP7G.min.js";import"./c-MOKJOIPE.min.js";import"./c-PSKKFZNP.min.js";import"./c-KKPMHAZC.min.js";import"./c-YLZIV3VS.min.js";import"./c-W4ZUKSEQ.min.js";import"./c-CPV4N35K.min.js";import"./c-T2V7O2LO.min.js";import"./c-MB6CV5NC.min.js";export{m as registerBuiltInXYPlugins};
|
package/dist/c-2WK7YJLL.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e,t){if("function"==typeof e)return t=>+e(t);let a=e||t;return e=>+e[a]}function t(e,t){if("function"==typeof e)return e;let a=e||t;return e=>e[a]}function a(e,t){return he.has(e)||de.has(e)||"SwimlaneChart"===e||"GaugeChart"===e?{measure:t.valueAccessor,measureFallback:"value",dimension:t.categoryAccessor??t.stepAccessor,dimensionFallback:"category"}:{measure:t.yAccessor??t.valueAccessor,measureFallback:"y",dimension:t.xAccessor,dimensionFallback:"x"}}function r(e){for(let t of["lineBy","areaBy","stackBy","groupBy","colorBy"]){let a=e[t];if("string"==typeof a&&a)return a}}function n(e,t){return null==e?"—":e instanceof Date?e.toISOString().slice(0,10):"number"==typeof e?t(e):e+""}function l(e,t={}){let a=!0===t.showRetractedAnnotations,r=!0===t.showSupersededAnnotations,n=new Set;for(let t of e){let e=t?.lifecycle?.supersedes;e&&"retracted"!==t?.lifecycle?.status&&n.add(e)}return e.filter(e=>{if("retracted"===e?.lifecycle?.status&&!a)return!1;let t=e?.provenance?.stableId;return!(t&&n.has(t)&&!r)})}function i(){let e=globalThis;return e[fe]||(e[fe]={recipes:new Map,capabilities:new Map,layouts:new Map}),e[fe]}function o(e){return i().recipes.get(e)}function s(e){let t=i().layouts.get(e)?.identity;return t?{...t}:void 0}function c(e){return"string"==typeof e?o(e):e&&"object"==typeof e&&"string"==typeof e.id?e:void 0}function u(e){return"string"==typeof e?e:e.id??e.name}function h(e){return e.layoutConfig&&"object"==typeof e.layoutConfig?e.layoutConfig:{}}function d(e){return Array.isArray(e.data)?e.data:Array.isArray(e.nodes)?e.nodes:Array.isArray(e.points)?e.points:Array.isArray(e.areas)?e.areas:[]}function m(e,t,a){return a??c(t.recipe)??c(t.recipeId)??o(e)}function f(e,t,a=[]){let r=e.accessor?t[e.accessor]:void 0;if("string"==typeof r&&r)return r;if(e.field)return e.field;let n=a.find(e=>e&&"object"==typeof e);if(!n)return;let l=Object.entries(n).filter(([e,t])=>!e.startsWith("_")&&null!=t);return"quantitative"===e.semanticType?l.find(([,e])=>"number"==typeof e)?.[0]:"identifier"===e.semanticType?["id","key","name"].find(e=>e in n):l.find(([,e])=>"string"==typeof e)?.[0]}function p(e,t){return e.dataRoles.find(e=>e.role===t)}function g(e,t){return e.dataRoles.find(e=>t.includes(e.semanticType))}function $(e,t,a,r,n,l={}){let i={...l};if(t)for(let[e,a]of Object.entries(t))i[e]=a;for(let e of a.dataRoles){let a=f(e,r,n),l=t&&a?t[a]:a;void 0!==l&&(i[e.role]=l)}return e.replace(/\{([^}]+)\}/g,(e,t)=>{let a=i[t];return null==a?`{${t}}`:a+""})}function b(e,t,a){return"function"==typeof a?a(e,t):e[a]}function v(e){if(e instanceof Date){let t=e.getTime();return Number.isFinite(t)?t:null}let t="number"==typeof e?e:"string"==typeof e&&e.trim()?Number(e):NaN;return Number.isFinite(t)?t:null}function y(e){let t=e>>>0;return()=>{t+=1831565813;let e=t;return e=Math.imul(e^e>>>15,1|e),e^=e+Math.imul(e^e>>>7,61|e),((e^e>>>14)>>>0)/4294967296}}function w(e,t,a=0){let r=new Set(e.filter(e=>null!=e.id).map(e=>e.id+"")),n=new Map;for(let l of e){let e=null==l.id?`${t}-${a++}`:l.id+"";for(;null==l.id&&r.has(e);)e=`${t}-${a++}`;r.add(e),n.set(e,null==l.id?{...l,id:e}:l)}return{seed:e,rows:Array.from(n.values()),nextId:a}}function C(e={}){let t=(e.categories?.length?e.categories:["Intake","Review","Build","Ship"]).map(e=>(e+"").trim()).filter(Boolean),a=t.length?t:["Intake"],r=Math.max(a.length,Math.round(e.count??Math.max(48,12*a.length))),n=function(e){let t=v(e);return null!=t&&t>0?t:1}(e.unitValue),l=y(e.seed??1),i=e.idPrefix??"mechanical-pile",o=a.map(()=>.65+.9*l()),s=o.reduce((e,t)=>e+t,0)||1,c=r-a.length,u=o.map(e=>e/s*c),h=u.map(e=>1+Math.floor(e)),d=r-h.reduce((e,t)=>e+t,0),m=u.map((e,t)=>({index:t,fraction:e-Math.floor(e)})).sort((e,t)=>t.fraction-e.fraction);for(let e=0;d>0;e=(e+1)%m.length)h[m[e].index]+=1,d-=1;return a.map((e,t)=>({id:`${i}-${t}`,category:e,value:h[t]*n,mechanical:!0,unitCount:h[t],unitValue:n,share:h[t]/r}))}function k(e,t){let a=e/t,r=Math.round(a);return Math.ceil(r>0&&Number.EPSILON*a*4>=Math.abs(a-r)?r:a)}function A(e,t){let a="mechanical"===(t.simulationMode??t.mode)&&("GaltonBoardChart"===e||"UnitPileChart"===e);if(!Array.isArray(t.data)&&!a)return null;let r=Array.isArray(t.data)?t.data:[],n=Math.max(2,Math.round(v(t.bins)??21)),l=Math.max(1,Math.round(v(t.pegRows)??n-1));if(a&&(r="GaltonBoardChart"===e?function(e){let t=Math.max(2,Math.round(e.bins)),a=Math.max(1,Math.round(e.pegRows??t-1)),r=Math.max(1,Math.round(e.count??Math.max(64,4*t))),n=(o=Number.isFinite(e.branchProbability)?e.branchProbability??.5:.5,Math.max(0,Math.min(1,o))),l=y(e.seed??1),i=e.idPrefix??"mechanical";var o;return Array.from({length:r},(e,t)=>{let r=0;for(let e=0;a>e;e+=1)l()<n&&(r+=1);let o=a/2;return{id:`${i}-${t}`,value:r,mechanical:!0,pegRows:a,branchProbability:n,pathRights:r,side:o>r?"left":r>o?"right":"center"}})}({bins:n,count:t.mechanicalCount,pegRows:l,branchProbability:t.branchProbability,seed:t.seed}):C({count:t.mechanicalCount,categories:t.mechanicalCategories,unitValue:t.unitValue,seed:t.seed})),r=w(r,"UnitPileChart"===e?"pile":"GaltonBoardChart"===e?"galton":"EventDropChart"===e?"event":"collision-swarm").rows,"UnitPileChart"===e){let e=new Map,n=t.valueAccessor??(a?"value":void 0);return r.forEach((a,r)=>{let l=(b(a,r,t.categoryAccessor??"category")??"unknown")+"",i=n?v(b(a,r,n)):1;e.set(l,(e.get(l)??0)+Math.max(0,i??0))}),{generated:a,rows:Array.from(e,([e,t])=>({label:e,value:t}))}}if("GaltonBoardChart"===e){let e=r.map((e,a)=>v(b(e,a,t.valueAccessor??"value"))).filter(e=>null!=e),i=a?[0,l]:function(e){if(!e)return;let t=v(e[0]),a=v(e[1]);return null!=t&&null!=a?t>a?[a,t]:[t,a]:void 0}(t.valueExtent),o=i?.[0]??(e.length?Math.min(...e):0),s=i?.[1]??(e.length?Math.max(...e):1),c=o===s?1:s-o,u=Array.from({length:n},(e,t)=>({label:t+1+"",value:0}));for(let t of e)u[Math.max(0,Math.min(n-1,Math.floor((t-o)/c*n)))].value+=1;return{generated:a,rows:u}}if("CollisionSwarmChart"===e){let e=new Map;return r.forEach((a,r)=>{if(null==v(b(a,r,t.xAccessor??"x")))return;let n=t.groupAccessor?(b(a,r,t.groupAccessor)??"All")+"":"All";e.set(n,(e.get(n)??0)+1)}),{generated:a,rows:Array.from(e,([e,t])=>({label:e,value:t}))}}if("EventDropChart"===e){let e=v(t.windows?.size??10);if(null==e||0>=e)return null;let{events:n}=function(e){let{windowSize:t,watermark:a,watermarkAtArrivalAccessor:r}=e;if(!Number.isFinite(t)||0>=t)throw new RangeError("EventDrop windows.size must be a finite positive number");let{rows:n}=w(e.data,"event"),l=n.flatMap((t,a)=>{let r=v(b(t,a,e.timeAccessor));return null==r?[]:[{datum:t,index:a,eventTime:r,arrivalTime:v(b(t,a,e.arrivalAccessor))??r,watermarkAtArrival:0,late:!1}]}),i="function"==typeof a?null:v(a?.value),o="function"==typeof a?t:v(a?.delay)??t,s=-1/0,c=-1/0;for(let e of l.slice().sort((e,t)=>e.arrivalTime-t.arrivalTime||e.index-t.index)){s=Math.max(s,e.eventTime);let n="function"==typeof a?v(a(s)):s-o;c=i??Math.max(c,n??s-t);let l=r?v(b(e.datum,e.index,r)):null;e.watermarkAtArrival=l??c,e.late=e.watermarkAtArrival>=(Math.floor(e.eventTime/t)+1)*t}return{events:l,watermarkValue:l.length?c:i??-o}}({data:r,timeAccessor:t.timeAccessor??"time",arrivalAccessor:t.arrivalAccessor??"arrivalTime",windowSize:e,watermark:t.watermark,watermarkAtArrivalAccessor:t.watermarkAtArrivalAccessor}),l=n.map(e=>e.eventTime),i=l.length?Math.min(...l):0,o=l.length?Math.max(...l):i+e,s=Math.min(v(t.timeExtent?.[0])??i,i),c=Math.max(v(t.timeExtent?.[1])??o,o),u=Math.floor(s/e)*e,h=Math.max(1,Math.ceil((c-u+e)/e)),d=Array.from({length:h},(t,a)=>({label:`${u+a*e}-${u+(a+1)*e}`,value:0,secondary:0,secondaryLabel:"late"}));for(let t of n){let a=d[Math.max(0,Math.min(h-1,Math.floor((t.eventTime-u)/e)))];t.late?a.secondary+=1:a.value+=1}return{generated:a,rows:d}}return null}function x(e){let t="number"==typeof e?e:"string"==typeof e?Number(e):NaN;return Number.isFinite(t)?t:void 0}function M(e,t){let a=e.physics&&"object"==typeof e.physics?e.physics:null,r=e.settledProjection&&"object"==typeof e.settledProjection?e.settledProjection:null,l=[e.settledProjectionRows,e.projectionRows,r?.rows,a?.settledProjectionRows,a?.projectionRows,a?.settledProjection&&"object"==typeof a.settledProjection?a.settledProjection.rows:void 0].find(e=>Array.isArray(e));return Array.isArray(l)?l.map((e,a)=>{if(!e||"object"!=typeof e)return null;let r=e,l=x(r.count??r.value??r.total??r.bodies??r.events);if(null==l)return null;let i=r.label??r.id??r.name??"container "+(a+1),o=x(r.secondary??r.secondaryCount),s=x(r.observed??r.observedCount);return{label:n(i,t),count:l,...null!=o?{secondary:o}:{},..."string"==typeof r.secondaryLabel&&r.secondaryLabel?{secondaryLabel:r.secondaryLabel}:{},...null!=s?{observed:s}:{}}}).filter(e=>null!=e):null}function S(e,t){return 1!==e&&"body"===t?"bodies":1===e?t:t+"s"}function L(e){return pe[e]||e.replace(/([a-z])([A-Z])/g,"$1 $2").toLowerCase()+" chart"}function F(e,t){let a=function(e){if(e){if("fits"in e||"buildProps"in e){let t=e,a={};for(let[e,r]of Object.entries(t.intentScores))"number"==typeof r&&Number.isFinite(r)&&(a[e]=r);return{family:t.family,intentScores:Object.keys(a).length?a:void 0}}return e}}(t);if(a?.act)return a.act;if(a?.intentScores){let e=function(e){let t,a=0;for(let[r,n]of Object.entries(e))if("number"==typeof n&&n>0){if(n>a){t=r,a=n;continue}if(n===a&&void 0!==t){let e=we.indexOf(r),a=we.indexOf(t);-1!==e&&(-1===a||a>e)&&(t=r)}}return t}(a.intentScores);if(e&&ve[e]&&(a.intentScores[e]??0)>=3)return ve[e]}return a?.family?ye[a.family]:function(e){return"BumpChart"===e?"ranking":de.has(e)||"StackedAreaChart"===e?"apportioning":be.has(e)?"relating":he.has(e)?"comparing":me.has(e)?"characterizing":ue.has(e)?"tracking":ge.has(e)?"tracing":"BigNumber"===e?"presenting":void 0}(e)}function P(e){let t=e.annotations;return!!Array.isArray(t)&&t.some(e=>{if(!e||"object"!=typeof e)return!1;let t=e;if("string"!=typeof t.type||!ke.has(t.type))return!1;let a=t.provenance;return!(!a||"object"!=typeof a)&&(Ae.has(a.authorKind)||xe.has(a.source)||Me.has(a.basis))})}function j(e="en"){let t,a;try{t=new Intl.NumberFormat(e,{notation:"compact",maximumFractionDigits:1}),a=new Intl.NumberFormat(e,{maximumFractionDigits:2})}catch{t=new Intl.NumberFormat("en",{notation:"compact",maximumFractionDigits:1}),a=new Intl.NumberFormat("en",{maximumFractionDigits:2})}return e=>Number.isFinite(e)?1e4>Math.abs(e)?a.format(e):t.format(e):e+""}function N(e){let t=Se["string"==typeof e.type?e.type:"annotation"]||"an annotation",a=function(e){let t=e.provenance&&"object"==typeof e.provenance?e.provenance:null,a=t?.authorKind??t?.source??t?.basis;return"watcher"===a?"a watcher-flagged ":"agent"===a||"ai"===a||"llm-inference"===a?"an AI-suggested ":""}(e),r=a?a+t.replace(/^an? /,""):t,n="string"==typeof e.label?e.label:"string"==typeof e.title?e.title:void 0;return n?`${r} labeled "${n}"`:r}function T(e){let t=Array.isArray(e.annotations)?e.annotations:null;if(!t||0===t.length)return;let a=l(t.filter(e=>!!e&&"object"==typeof e));if(0===a.length)return;let r=a.map(N),n=r.slice(0,5),i=r.length-n.length,o=function(e){return e.length>1?2===e.length?`${e[0]} and ${e[1]}`:`${e.slice(0,-1).join(", ")}, and ${e[e.length-1]}`:e[0]??""}(n)+(i>0?`, and ${i} more`:""),s=a.length;return`The author has marked ${1===s?"one feature":s+" features"} on this chart: ${o}.`}function D(l,i,o={}){let s=void 0!==o.levels,c=new Set(o.levels??["l1","l2","l3"]);!s&&(o.capability||P(i))&&c.add("l4");let p=m(l,i,o.recipe);if(p){let e=["l1","l2","l3","l4"].filter(e=>c.has(e));!s&&!e.includes("l4")&&e.push("l4");let t=function(e,t,a={}){let r=d(t),n=h(t),l=a.locale??"en",i=("function"==typeof e.description?e.description({data:r,config:n,locale:l}):void 0)?.levels??function(e,t,a,r){let n=g(e,["nominal","ordinal"]),l=g(e,["quantitative"]),i=n?f(n,a,t):void 0,o=l?f(l,a,t):void 0,s=n?.role??i??"category",c=l?.role??o??"value",h=e.encodings??[],d=h.length?h.slice(0,3).map(e=>e.meaning.replace(/\.$/,"")).join("; "):`${s} and ${c} are mapped through the recipe's declared visual semantics`,{number:m,percent:p}=function(e){try{return{number:new Intl.NumberFormat(e,{maximumFractionDigits:2}),percent:new Intl.NumberFormat(e,{style:"percent",maximumFractionDigits:1})}}catch{return{number:new Intl.NumberFormat("en",{maximumFractionDigits:2}),percent:new Intl.NumberFormat("en",{style:"percent",maximumFractionDigits:1})}}}(r),$=new Map;if(i&&o)for(let e of t){let t=(e[i]??"Uncategorized")+"",a=Number(e[o]);Number.isFinite(a)&&$.set(t,($.get(t)??0)+a)}let b=[...$].sort((e,t)=>t[1]-e[1]),v=b.reduce((e,[,t])=>e+t,0),y=b[0],w=b[1],C=v>0?((y?.[1]??0)+(w?.[1]??0))/v:0,k=e.intents.map(e=>({id:u(e),strength:"string"==typeof e?void 0:e.strength})).sort((e,t)=>"primary"===e.strength?-1:"primary"===t.strength?1:0)[0]?.id,A=e.audience?.primary??e.audienceFit?.find(e=>"strong"===e.fit)?.audience;return{l1:`A ${e.name.toLowerCase()} encodes ${s} and ${c}. ${x=d,x&&x.charAt(0).toUpperCase()+x.slice(1)}.`,l2:b.length>0?`${b.length} categories total ${m.format(v)}. ${y[0]} accounts for ${m.format(y[1])}${v>0?` (${p.format(y[1]/v)})`:""}${w?`, followed by ${w[0]} at ${m.format(w[1])}`:""}.`:`${t.length} data ${1===t.length?"item is":"items are"} represented.`,l3:2>b.length?y?y[0]+" is the only represented category.":"No quantitative pattern can be derived from the available data.":.5>C?`The total is distributed across ${b.length} categories without the first two forming a majority.`:`Most of the total is concentrated in ${y[0]} and ${w[0]}, which together account for ${p.format(C)}.`,l4:`The chart is intended for ${k??"explanation"}${A?` with a ${A} audience`:""}: ${e.designContract.whyCustom}`};var x}(e,r,n,l),o=a.levels??["l1","l2","l3","l4"],s={};for(let e of o)i[e]&&(s[e]=i[e]);let c=["l1","l2","l3","l4"].map(e=>s[e]).filter(e=>!!e).join(" "),m=a.includeCaveats?[...e.reception?.risks??[],...e.caveats??[],...(e.designContract.misuse??[]).map(e=>"Misuse: "+e)]:void 0;return{text:c,levels:s,...m?.length?{caveats:m}:{}}}(p,i,{levels:e,locale:o.locale,audience:o.audience,includeCaveats:o.includeCaveats}),a=T(i);return{...t,text:a?`${a} ${t.text}`.trim():t.text,...a?{annotations:a}:{}}}let $=j(o.locale??"en"),b=L(l),v=Array.isArray(i.data)?i.data:null,y=r(i),w=$e.has(l)?M(i,$):null,C=$e.has(l)&&null===w?A(l,i):null,{measure:k,measureFallback:x,dimension:N,dimensionFallback:D}=a(l,i),I="string"==typeof k&&k?k:x,E="string"==typeof N&&N?N:D,G={};if($e.has(l)&&function(e,t,a,r,n,l,i=null){let o=function(e){return"EventDropChart"===e?"time window":"GaltonBoardChart"===e?"bin":"CollisionSwarmChart"===e?"group lane":"PacketFlowChart"===e?"flow node":"CrucibleChart"===e?"result group":"container"}(e),s=i&&"EventDropChart"===e?"accepted event":function(e){return"EventDropChart"===e?"event":"GaltonBoardChart"===e?"sample":"CollisionSwarmChart"===e?"point":"PacketFlowChart"===e?"packet":"CrucibleChart"===e?"settled item":"UnitPileChart"===e?"unit":"body"}(e),c=i?i.generated?"The generated sample projection":"The source projection":"The settled projection";if(n.has("l1")&&(r.l1=function(e,t){return"EventDropChart"===e?"An event-drop physics chart that collapses moving events into a settled projection by event-time window.":"GaltonBoardChart"===e?"A Galton board chart that collapses falling samples into a settled histogram projection.":"UnitPileChart"===e?"A physics pile chart that collapses moving bodies into a settled bar-style projection by container.":"CollisionSwarmChart"===e?"A collision swarm chart that separates overlapping points while preserving their quantitative axis position.":"PacketFlowChart"===e?"A physical flow chart that keeps authored routes visible while packet bodies show throughput and proximity events.":"CrucibleChart"===e?"A crucible physics chart that replays authored phases and events into declared products and outlets; the settled ledger, not collisions, determines the result.":`A ${t} whose accessible reading is the settled projection rather than individual trajectories.`}(e,t)),!n.has("l2")&&!n.has("l3"))return;if(!a||0===a.length)return void(n.has("l2")&&(r.l2=i?"No valid source records are available.":"No settled projection is loaded yet."));let u=a.reduce((e,t)=>e+t.count,0),h=a.filter(e=>e.count>0).sort((e,t)=>t.count-e.count),d=h[0]??a.slice().sort((e,t)=>t.count-e.count)[0];if(!d)return;let m=a.reduce((e,t)=>e+(t.secondary??0),0),f=a.find(e=>e.secondaryLabel)?.secondaryLabel??"secondary";if(n.has("l2"))if(i&&"EventDropChart"===e)r.l2=`${c} classifies ${l(u+m)} ${S(u+m,"event")} across ${a.length} ${S(a.length,o)}: ${l(u)} accepted and ${l(m)} late.`;else if(0===h.length)r.l2=`${c} contains ${l(u)} ${S(u,s)} across ${a.length} ${S(a.length,o)}; no ${S(2,o)} are non-empty yet.`;else{let e=m>0?` ${l(m)} ${S(m,s)} ${1===m?"is":"are"} marked ${f}.`:"";r.l2=`${c} contains ${l(u)} ${S(u,s)} across ${a.length} ${S(a.length,o)}; ${h.length} ${S(h.length,o)} ${1===h.length?"is":"are"} non-empty. The largest ${o} is ${d.label} with ${l(d.count)} ${S(d.count,s)}.${e}`}if(n.has("l3")&&u>0&&h.length>0){let e=h.find(e=>e!==d),t=function(e,t){if(0>=t)return"0%";let a=e/t*100;return(10>a?Math.round(10*a)/10:Math.round(a))+"%"}(d.count,u);r.l3=e?`${c} is most concentrated in ${d.label}, which holds ${l(d.count)} ${S(d.count,s)} (${t}); ${e.label} follows with ${l(e.count)} ${S(e.count,s)}.`:`${c} is concentrated in ${d.label}, which holds all ${l(d.count)} ${S(d.count,s)}.`}}(l,b,w??(C?M({projectionRows:C.rows},$):null),G,c,$,C),c.has("l1")&&!$e.has(l))if("BumpChart"===l)G.l1=`A ${b} ranking ${y??"series"} by ${I} across ${E}.`;else if(ue.has(l)||he.has(l))G.l1=`A ${b} of ${I} by ${E}`+(y?`, split by ${y}.`:".");else if(de.has(l))G.l1=`A ${b} showing ${I} across ${E} categories.`;else if(me.has(l))G.l1=`A ${b} of the distribution of ${I}`+(y?` by ${y}.`:".");else if(ge.has(l)){let e=Array.isArray(i.nodes)?i.nodes.length:void 0,t=Array.isArray(i.edges)?i.edges.length:void 0,a=[null!=e?`${e} ${R(e,"node")}`:null,null!=t?`${t} ${R(t,"edge")}`:null].filter(Boolean);G.l1=`A ${b}${a.length?" with "+a.join(" and "):""}.`}else if("BigNumber"===l){let e="string"==typeof i.label?i.label:I;G.l1=`A single value${e?" for "+e:""}.`}else G.l1=`A ${b}.`;let z=ue.has(l)||"BumpChart"===l||he.has(l)||de.has(l)||me.has(l),O=null;if((c.has("l2")||c.has("l3")||c.has("l4"))&&z&&v&&v.length>0&&(O=function(e,t,a,r){let l=0,i=0,o=1/0,s=-1/0,c=null,u=null,h=0,d=0,m=null,f=null,p=NaN,g=NaN;for(let a of e){let e=t(a);Number.isFinite(e)&&(0===l&&(p=e,m=a),g=e,f=a,o>e&&(o=e,c=a,h=l),e>s&&(s=e,u=a,d=l),l++,i+=e)}return 0===l?null:{count:l,min:o,max:s,mean:i/l,minLabel:n(null!=c?a(c):null,r),maxLabel:n(null!=u?a(u):null,r),first:p,last:g,firstLabel:n(null!=m?a(m):null,r),lastLabel:n(null!=f?a(f):null,r),minIndex:h,maxIndex:d}}(v,e(k,x),t(N,D),$)),c.has("l2")&&z&&(v&&0!==v.length?O&&(G.l2=de.has(l)?`${O.count} segments totaling ${$(function(e){return e.mean*e.count}(O))}. Largest is ${O.maxLabel} at ${$(O.max)}; smallest is ${O.minLabel} at ${$(O.min)}.`:`${I} ranges from ${$(O.min)} (${O.minLabel}) to ${$(O.max)} (${O.maxLabel}), with a mean of ${$(O.mean)} across ${O.count} points.`):G.l2="No data is loaded yet."),c.has("l3")&&O&&!y&&ue.has(l)?G.l3=function(e,t,a){let{first:r,last:n,min:l,max:i,maxLabel:o,minLabel:s,firstLabel:c,lastLabel:u,minIndex:h,maxIndex:d,count:m}=e,f=i-l,p=n-r;if(0===f)return`${B(t)} is constant at ${a(r)} across the series.`;if(.04>f/(Math.abs(e.mean)||1))return`${B(t)} ends roughly where it started (${a(r)} at ${c} to ${a(n)} at ${u}), ranging between ${a(l)} and ${a(i)}.`;let g=d>0&&m-1>d,$=h>0&&m-1>h,b=(i-Math.max(r,n))/f,v=(Math.min(r,n)-l)/f;return g&&b>.15?`Overall ${t} climbs to a peak of ${a(i)} (${o}), then falls to ${a(n)} (${u}).`:$&&v>.15?`Overall ${t} drops to a low of ${a(l)} (${s}), then recovers to ${a(n)} (${u}).`:.05>Math.abs(p)/f?`${B(t)} ends roughly where it started (${a(r)} at ${c} to ${a(n)} at ${u}), ranging between ${a(l)} and ${a(i)}.`:p>0?d===m-1?`Overall ${t} rises from ${a(r)} (${c}) to a peak of ${a(n)} (${u}).`:`Overall ${t} rises from ${a(r)} (${c}) to ${a(n)} (${u}), after peaking at ${a(i)} (${o}).`:h===m-1?`Overall ${t} falls from ${a(r)} (${c}) to a low of ${a(n)} (${u}).`:`Overall ${t} falls from ${a(r)} (${c}) to ${a(n)} (${u}), after dipping to ${a(l)} (${s}).`}(O,I,$):c.has("l3")&&O&&!y&&he.has(l)&&(G.l3=`The highest ${E} is ${O.maxLabel} and the lowest is ${O.minLabel}.`),c.has("l4")){let e=P(i)?"alerting":F(l,o.capability);e&&(G.l4=function(e,t,a,r,n,l,i,o){let s,c,u=Ce[e],h=/^[aeiou]/i.test(u)?"an":"a";switch(e){case"locating":s="This is a map",c="read values by location";break;case"presenting":s="This is a single-value display",c=`read ${"string"==typeof a.label&&a.label?a.label:n} as the headline number`;break;case"tracing":s=`This is ${h} ${u} chart`,c="follow the movement between states";break;case"nesting":s=`This is ${h} ${u} chart`,c="read it for nested structure and how children sum into their parents";break;case"relating":s=`This is ${h} ${u} chart`,c=`read it for whether ${l} and ${n} move together`;break;default:s=`This is ${h} ${u} chart`,c=function(e,t,a,r,n,l){if(!t)switch(e){case"alerting":return"watch for points that break from the rest";case"tracking":return"read it for the overall direction of "+a;case"comparing":return`compare ${a} across ${r}`;case"ranking":return"read it top to bottom by "+a;case"apportioning":return`read each ${r}'s share of the whole`;case"characterizing":return"read it for the spread and shape of "+a;default:return"read the highlighted features"}switch(e){case"alerting":return function(e,t,a){if(he.has(a)||de.has(a))return`${e.maxLabel} stands out at ${t(e.max)} — check it first`;let{first:r,last:n,min:l,max:i,minLabel:o,maxLabel:s,lastLabel:c,minIndex:u,maxIndex:h,count:d}=e,m=i-l;if(m>0){let e=h>0&&d-1>h,a=u>0&&d-1>u,f=(i-Math.max(r,n))/m,p=(Math.min(r,n)-l)/m;if(e&&f>.15)return`the peak of ${t(i)} at ${s} is the point to investigate`;if(a&&p>.15)return`the dip to ${t(l)} at ${o} is the point to investigate`;if(n>=i)return`the climb to ${t(n)} at ${c} warrants a closer look`;if(l>=n)return`the drop to ${t(n)} at ${c} warrants a closer look`}return`the extremes — ${s} (${t(i)}) and ${o} (${t(l)}) — are the points to check`}(t,n,l);case"tracking":return`read it for the trajectory of ${a}, which ${function(e){let t=e.max-e.min,a=e.last-e.first;return 0===t||.05>Math.abs(a)/t?"holds roughly steady":a>0?"rises":"falls"}(t)} from ${n(t.first)} (${t.firstLabel}) to ${n(t.last)} (${t.lastLabel})`;case"comparing":return`compare ${a} across ${r}; ${t.maxLabel} leads at ${n(t.max)}`;case"ranking":return`read it top to bottom by ${a}; ${t.maxLabel} ranks highest at ${n(t.max)}`;case"apportioning":{let e=t.mean*t.count,a=e>0?Math.round(t.max/e*100):null;return`read each ${r}'s share of the ${n(e)} total; ${t.maxLabel} is the largest at ${n(t.max)}${null!=a?` (${a}%)`:""}`}case"characterizing":return`read it for the spread of ${a}, from ${n(t.min)} to ${n(t.max)}`;default:return"read the highlighted features"}}(e,r,n,l,i,t)}return`${s}; ${c}.${function(e,t){if(!t)return"";let a=t.familiarity?.[e];return"number"!=typeof a||a>2?"":` This ${L(e)} may be unfamiliar${t.name?` to ${t.name.toLowerCase()} readers`:""} — lean on this description.`}(t,o)}`}(e,l,i,y?null:O,I,E,$,o.audience))}let U=["l1","l2","l3","l4"].filter(e=>c.has(e)&&G[e]).map(e=>G[e]).join(" "),H=T(i);return{text:H?`${H} ${U}`.trim():U,levels:G,...H?{annotations:H}:{}}}function B(e){return e.length?e[0].toUpperCase()+e.slice(1):e}function R(e,t){return 1!==e&&"body"===t?"bodies":1===e?t:t+"s"}function I(e){return((e??"unknown")+"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"unknown"}function E(e,t,a){return"function"==typeof t?t(e):e["string"==typeof t&&t?t:a]}function G(e,t="—"){return null==e||""===e?t:"object"==typeof e?G(e.id??e.name??e.label,t):e+""}function z(e){if(null==e||""===e)return;let t="number"==typeof e?e:Number(e);return Number.isFinite(t)?t:void 0}function O(e){return G(e,"unknown").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"unknown"}function U(e,t){let a=E(e,t,"children");return Array.isArray(a)?a:[]}function H(e,t,a){return`${e} ${1===e?t:a}`}function V(e,t){return 0===e.numericLeaves?"":e.numericLeaves===e.leaves?", leaf total "+t(e.leafTotal):`, known leaf total ${t(e.leafTotal)} across ${H(e.numericLeaves,"valued leaf","valued leaves")}`}function q(e){return"TreeDiagram"===e?"tree":"Treemap"===e?"treemap":"CirclePack"===e?"circle-packing":"orbit"}function Q(e,t,a){return"function"==typeof t?t(e):e["string"==typeof t&&t?t:a]}function W(e,t="—"){return null==e||""===e?t:"object"==typeof e?W(e.id??e.name??e.label,t):e+""}function K(e){if(null==e||""===e)return;let t="number"==typeof e?e:Number(e);return Number.isFinite(t)?t:void 0}function X(e){return W(e,"unknown").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"unknown"}function Z(e){let t=[];return(e.linkedHover||e.selection||e.linkedBrush)&&t.push("Use linked highlighting to compare related locations."),(e.enableHover||e.tooltip)&&t.push("Hover or focus a mark for its details."),t.length>0?" "+t.join(" "):""}function _(e,t,a){let r=Q(e,t,a);if(void 0!==r)return r;let n=e.properties;return n&&"object"==typeof n?Q(n,t,a):void 0}function J(e,t,a){return W(_(e,t,"id")??_(e,"name","name")??_(e,"NAME","NAME")??_(e,"label","label"),a)}function Y(e){let t=0,a=1/0,r=-1/0,n=0;for(let l of e)null!=l.value&&(t+=1,a=Math.min(a,l.value),r=Math.max(r,l.value),n+=l.value);return 0===t?null:{count:t,min:a,max:r,total:n,average:n/t}}function ee(e,t){let a=Y(e);return a?`range ${t(a.min)} to ${t(a.max)}, average ${t(a.average)}, total ${t(a.total)}`:"no numeric values"}function te(e,t,a,r){let n=function(e){if(Array.isArray(e))return e;if(!e||"object"!=typeof e)return[];let t=e;return Array.isArray(t.features)?t.features:"Feature"===t.type?[t]:[]}(t.areas),l="FlowMap"===e&&Array.isArray(t.nodes)?t.nodes:Array.isArray(t.points)?t.points:[],i=Array.isArray(t.flows)?t.flows:[],o=Array.isArray(t.lines)?t.lines:[],s=t.valueAccessor??t.sizeBy??t.costAccessor??"value",c=t.pointIdAccessor??t.nodeIdAccessor??"id",u=("ChoroplethMap"===e?n:l).map((a,r)=>({datum:a,index:r,label:J(a,"ChoroplethMap"===e?t.idAccessor:c,`${"ChoroplethMap"===e?"region":"location"} ${r+1}`),value:K(_(a,s,"value"))})),h=u.filter(e=>null!=e.value),d={id:"root",role:"chart",level:1,label:`${"ChoroplethMap"===e?`A choropleth map with ${n.length} regions.${h.length>0?` Values are available for ${h.length} of ${n.length} regions; ${ee(h,r)}.`:" No regions have numeric values."}`:"FlowMap"===e?`A flow map with ${i.length} flows and ${l.length} locations.`:"DistanceCartogram"===e?`A distance cartogram with ${l.length} locations and ${o.length} routes.`:`A proportional-symbol map with ${l.length} locations.`}${Z(t)}`,children:[]};if("ChoroplethMap"===e)d.children=function(e,t,a){let r,n=e.filter(e=>null!=e.value).sort((e,t)=>t.value-e.value||e.index-t.index),l=new Map,i=0;for(let[e,t]of n.entries())r!==t.value&&(i=e+1,r=t.value),l.set(t.index,i);let o=0;return function(e){let t=e.filter(e=>null!=e.value),a=e.filter(e=>null==e.value),r=[],n=Y(t);if(n)if(n.min===n.max)r.push({id:"equal",label:"Equal values",rows:t});else{let e=n.min+(n.max-n.min)/3,a=n.min+2*(n.max-n.min)/3,l=t.filter(e=>e.value>=a),i=t.filter(t=>t.value>=e&&a>t.value),o=t.filter(t=>e>t.value);l.length>0&&r.push({id:"highest",label:"Highest values",rows:l}),i.length>0&&r.push({id:"middle",label:"Middle values",rows:i}),o.length>0&&r.push({id:"lowest",label:"Lowest values",rows:o})}return a.length>0&&r.push({id:"missing",label:"No numeric value",rows:a}),r}(e).map(e=>{let r=e.rows.slice(0,Math.max(0,t-o));o+=r.length;let i=r.map(e=>{let t=l.get(e.index),r=null==t||2>n.length?"":`, rank ${t} of ${n.length}`;return{id:`geo-${X(e.label)}-${e.index}`,role:"datum",level:3,label:null==e.value?e.label+": no numeric value.":`${e.label}: ${a(e.value)}${r}.`,...null==e.value?{}:{value:e.value},datum:e.datum}}),s=e.rows.length-r.length;return s>0&&i.push({id:`geo-${e.id}-more`,role:"datum",level:3,label:`${s} more ${1===s?"region":"regions"} in ${e.label.toLowerCase()} not shown; navigation is capped at ${t}.`}),{id:"regions-"+e.id,role:"series",level:2,label:`${e.label}: ${e.rows.length} ${1===e.rows.length?"region":"regions"}, ${ee(e.rows,a)}.`,children:i}})}(u,a,r);else if(u.length>0){let e=u.slice(0,a).map(e=>({id:`geo-${X(e.label)}-${e.index}`,role:"datum",level:3,label:`${e.label}${null==e.value?"":": "+r(e.value)}.`,...null==e.value?{}:{value:e.value},datum:e.datum}));u.length>a&&e.push({id:"geo-more",role:"datum",level:3,label:`…and ${u.length-a} more locations.`}),d.children?.push({id:"locations",role:"series",level:2,label:`Locations: ${u.length} marks.`,children:e})}let m="FlowMap"===e?i:o;if(m.length>0){let e=m.slice(0,a).map((e,t)=>{let a=W(e.source,"unknown"),n=W(e.target,"unknown"),l=K(Q(e,s,"value"));return{id:`route-${X(a)}-${X(n)}-${t}`,role:"datum",level:3,label:`${a} to ${n}${null==l?"":": "+r(l)}.`,...null==l?{}:{value:l},datum:e}});d.children?.push({id:"routes",role:"series",level:2,label:`Routes: ${m.length} ${1===m.length?"route":"routes"}.`,children:e})}return d}function ae(e,t={},a={}){return!!m(e,t,a.recipe)||Le.has(e)||Fe.has(e)||Pe.has(e)||ue.has(e)||he.has(e)||de.has(e)||me.has(e)}function re(e,t,a){return"function"==typeof t?t(e):e["string"==typeof t&&t?t:a]}function ne(e,t="—"){return null==e||""===e?t:"object"==typeof e?ne(e.id??e.name??e.label,t):e+""}function le(e){if(null==e||""===e)return;let t="number"==typeof e?e:Number(e);return Number.isFinite(t)?t:void 0}function ie(e){return ne(e,"unknown").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"unknown"}function oe(e,t){let a=[];return(e.linkedHover||e.selection||e.linkedBrush)&&a.push("network"===t?"Use linked highlighting to trace related marks.":"Use linked highlighting to compare related locations."),(e.enableHover||e.tooltip)&&a.push("Hover or focus a mark for its details."),a.length>0?" "+a.join(" "):""}function se(e,t){t&&e.children?.push(t)}function ce(i,o,s={}){let c=s.locale??"en",u=Math.max(1,s.maxLeaves??200),b=j(c),v=m(i,o,s.recipe);if(v)return function(e,t,a={}){let r=d(t),n=h(t),l=Math.max(1,a.maxLeaves??200);if("function"==typeof e.navigation)return e.navigation({data:r,config:n,locale:a.locale??"en"});let i=(y=e.navigation)&&"object"==typeof y?e.navigation:void 0,o=(i?.groupByRole?p(e,i.groupByRole):void 0)??(i?.groupBy?.[0]?p(e,i.groupBy[0])??e.dataRoles.find(e=>e.field===i.groupBy?.[0]):void 0)??g(e,["nominal","ordinal"]),s=o?f(o,n,r):void 0,c=(i?.idRole?p(e,i.idRole):void 0)??g(e,["identifier"]),u=c?f(c,n,r):void 0,m={id:"root",role:"chart",label:i?.summaryTemplate?$(i.summaryTemplate,void 0,e,n,r,{count:r.length}):`${e.name}: ${r.length} ${1===r.length?"item":"items"} represented.`,level:1,children:[]},b=0,v=(t,a,l)=>{let o=u?t[u]:void 0,s=i?.itemLabelTemplate?$(i.itemLabelTemplate,t,e,n,r,{count:r.length}):function(e,t,a,r){let n=g(t,["nominal","ordinal"]),l=t.dataRoles.filter(e=>"quantitative"===e.semanticType),i=n?f(n,a,r):void 0,o=[];i&&null!=e[i]&&o.push(e[i]+"");for(let t of l){let n=f(t,a,r);n&&null!=e[n]&&o.push(`${t.role}: ${e[n]+""}`)}return o.length>0?o.join(", "):"Data item"}(t,e,n,r);return{id:"datum-"+I(o??a),role:"datum",label:s,level:l,datum:t}};var y;if(s){let e=new Map;for(let t of r){let a=(t[s]??"Uncategorized")+"",r=e.get(a);r?r.push(t):e.set(a,[t])}m.children=[...e].map(([e,t],a)=>{let r=t.slice(0,Math.max(0,l-b));b+=r.length;let n=r.map((e,t)=>v(e,1e5*a+t,3));return t.length>r.length&&n.push({id:"more-"+I(e),role:"datum",label:`…and ${t.length-r.length} more items`,level:3}),{id:"group-"+I(e),role:"series",label:`${e}: ${t.length} ${1===t.length?"item":"items"}.`,level:2,children:n}})}else{let e=r.slice(0,l);m.children=e.map((e,t)=>v(e,t,2)),r.length>e.length&&m.children.push({id:"more",role:"datum",label:`…and ${r.length-e.length} more items`,level:2})}return m}(v,o,{maxLeaves:u,locale:c});let y={id:"root",role:"chart",label:D(i,o,{locale:c}).text||"Chart.",level:1,children:[]},w=function(e,t){let a=Array.isArray(e.annotations)?e.annotations:null;if(!a)return null;let r=l(a.filter(e=>!!e&&"object"==typeof e));if(0===r.length)return null;let n=0,i=r.slice(0,t).map(e=>{let t=e.lifecycle?.status,a=t&&"accepted"!==t?` (${t})`:"";return{id:"annotation-"+n++,role:"annotation",level:3,label:`${r=N(e),r&&r.charAt(0).toUpperCase()+r.slice(1)}${a}.`,datum:e};var r});r.length>t&&i.push({id:"annotation-"+n++,role:"annotation",level:3,label:`…and ${r.length-t} more annotations.`});let o=r.length;return{id:"annotations",role:"annotation",level:2,label:`Annotations: ${1===o?"one marked feature":o+" marked features"}.`,children:i}}(o,u);if(Le.has(i)){let e=function(e,t,a,r){let n=Array.isArray(t.nodes)?t.nodes:[],l=Array.isArray(t.edges)?t.edges:Array.isArray(t.flows)?t.flows:[],i=t.nodeIdAccessor??t.nodeIDAccessor,o=t.sourceAccessor??"source",s=t.targetAccessor??"target",c=t.valueAccessor??"value",u=e=>ne(re(e,i,"id"),"unknown"),h=(e,t)=>ne(re(e,t,""),"unknown"),d=new Set;for(let e of l)d.add(h(e,o)),d.add(h(e,s));let m=n.length>0?n:[...d].map(e=>({id:e})),f=new Map;for(let e of m)f.set(u(e),{links:0,value:0});for(let e of l){let t=h(e,o),a=h(e,s),r=le(re(e,c,"value"))??0;for(let e of[t,a]){let t=f.get(e)??{links:0,value:0};t.links+=1,t.value+=r,f.set(e,t)}}let p={id:"root",role:"chart",level:1,label:`A ${"SankeyDiagram"===e||"ProcessSankey"===e?"flow diagram":"ChordDiagram"===e?"chord diagram":"network graph"} with ${m.length} nodes and ${l.length} links.${oe(t,"network")}`,children:[]},g=0,$=new Map,b=t.colorBy??"group";for(let e of m){let t=ne(re(e,b,"group"),"Ungrouped"),a=$.get(t);a?a.push(e):$.set(t,[e])}let v=[...$].map(([e,t],n)=>{let l=[];for(let[e,i]of t.entries()){if(g>=a)break;g+=1;let t=u(i),o=f.get(t)??{links:0,value:0},s=o.value>0?`, ${r(o.value)} total flow`:"";l.push({id:`node-${n}-${e}-${ie(t)}`,role:"datum",level:3,label:`${t}: ${o.links} ${1===o.links?"link":"links"}${s}.`,value:o.value>0?o.value:void 0,datum:i})}return{id:`nodes-${n}-${ie(e)}`,role:"series",level:2,label:`${e}: ${t.length} ${1===t.length?"node":"nodes"}.`,children:l}});v.length>0&&p.children?.push(...v);let y=l.slice(0,a).map((e,t)=>{let a=h(e,o),n=h(e,s),l=le(re(e,c,"value"));return{id:`link-${ie(a)}-${ie(n)}-${t}`,role:"datum",level:3,label:`${a} to ${n}${null==l?"":": "+r(l)}.`,value:l,datum:e}});return l.length>a&&y.push({id:"links-more",role:"datum",level:3,label:`…and ${l.length-a} more links.`,value:void 0}),y.length>0&&p.children?.push({id:"links",role:"series",level:2,label:`Links: ${l.length} ${1===l.length?"connection":"connections"}.`,children:y}),p}(i,o,u,b);return se(e,w),e}if(Fe.has(i)){let e=function(e,t,a,r){let n=t.data&&"object"==typeof t.data?t.data:null,l=t.childrenAccessor??"children",i=t.valueAccessor??"value",o=t.nodeLabel??t.nodeIdAccessor,s=new WeakMap,c=new WeakSet,u=e=>{let t=s.get(e);if(t)return t;if(c.has(e))return{descendants:0,depth:0,leaves:0,numericLeaves:0,leafTotal:0};c.add(e);let a,r=U(e,l);if(0===r.length){let t=z(E(e,i,"value"));a={descendants:0,depth:1,leaves:1,numericLeaves:null==t?0:1,leafTotal:t??0}}else a=r.reduce((e,t)=>{let a=u(t);return{descendants:e.descendants+1+a.descendants,depth:Math.max(e.depth,a.depth+1),leaves:e.leaves+a.leaves,numericLeaves:e.numericLeaves+a.numericLeaves,leafTotal:e.leafTotal+a.leafTotal}},{descendants:0,depth:1,leaves:0,numericLeaves:0,leafTotal:0});return c.delete(e),s.set(e,a),a},h=0,d=(e,t,n,s)=>{let c=G(E(e,o,"name"),"item "+n);if(s.has(e))return{id:`hierarchy-${O(n)}-cycle`,role:"datum",level:t,label:`Repeated hierarchy reference to ${c}; branch omitted.`};let m=U(e,l),f=u(e);if(0===m.length){if(h>=a)return null;h+=1;let l=z(E(e,i,"value"));return{id:`hierarchy-${O(n)}-${O(c)}`,role:"datum",level:t,label:`${c}${null==l?"":": "+r(l)}.`,...null==l?{}:{value:l},datum:e}}let p=new Set(s);p.add(e);let g=[],$=0;for(let[e,r]of m.entries()){if(h>=a){$+=u(r).leaves;continue}let l=d(r,t+1,`${n}-${e}`,p);l&&g.push(l)}return $>0&&g.push({id:`hierarchy-${O(n)}-more`,role:"datum",level:t+1,label:`${H($,"more leaf","more leaves")} in ${c} not shown; navigation is capped at ${a}.`}),{id:`hierarchy-${O(n)}-${O(c)}`,role:"series",level:t,label:`${c}: ${H(m.length,"direct child","direct children")}, ${H(f.descendants,"total descendant","total descendants")}, ${H(f.leaves,"leaf","leaves")}${V(f,r)}.`,datum:e,children:g}},m=n?u(n):null,f={id:"root",role:"chart",level:1,label:n?`A ${q(e)} chart with ${H(m.leaves,"leaf","leaves")} and ${H(m.descendants,"total descendant","total descendants")} across ${H(m.depth,"hierarchy level","hierarchy levels")}${V(m,r)}.`:"A hierarchy chart with no hierarchy data loaded.",children:[]};if(n){let e=d(n,2,"root",new Set);if(e){let t=G(E(n,o,"name"),"");f.children="series"===e.role&&""===t?e.children:[e]}}return f}(i,o,u,b);return se(e,w),e}if(Pe.has(i)){let e=te(i,o,u,b);return se(e,w),e}let C=Array.isArray(o.data)?o.data:null,k=ae(i,o,s);if(!C||0===C.length||!k)return w&&(y.children=[w]),y;let{measure:A,measureFallback:x,dimension:M,dimensionFallback:S}=a(i,o),L=e(A,x),F=t(M,S),P="string"==typeof A&&A?A:x,T="string"==typeof M&&M?M:S,B=r(o),R=0,Q=e=>`${e}-${R++}`,W=(e,t)=>{let a=e.slice(0,u).map(e=>((e,t)=>{let a=L(e),r=n(F(e),b);return{id:Q("datum"),role:"datum",level:t,label:`${r}: ${Number.isFinite(a)?b(a):"—"}`,value:Number.isFinite(a)?a:void 0,datum:e}})(e,t));return e.length>u&&a.push({id:Q("more"),role:"datum",level:t,label:`…and ${e.length-u} more points`}),a},K=[];if(ue.has(i)||he.has(i)){let e=1/0,t=-1/0,a=1/0,r=-1/0,l=[],o=!0;for(let n of C){let i=L(n);Number.isFinite(i)&&(e>i&&(e=i),i>t&&(t=i));let s=F(n);l.push(s),"number"==typeof s&&Number.isFinite(s)?(a>s&&(a=s),s>r&&(r=s)):o=!1}let s=new Set,c=[];for(let e of l){let t=e+"";s.has(t)||(s.add(t),c.push(e))}let u=o?`${b(a)} to ${b(r)}`:`${n(c[0],b)} to ${n(c[c.length-1],b)} (${he.has(i)?c.length+" categories":C.length+" points"})`;K.push({id:Q("axis"),role:"axis",level:2,label:`${he.has(i)?"Category axis":"X axis"}: ${T}, ${u}.`}),t>=e&&K.push({id:Q("axis"),role:"axis",level:2,label:`Value axis: ${P}, ${b(e)} to ${b(t)}.`})}if(B){let e=t(B,B),a=new Map;for(let t of C){let r=(e(t)??"—")+"",n=a.get(r);n?n.push(t):a.set(r,[t])}let r=[];for(let[e,t]of a){let a=D(i,{...o,data:t},{levels:["l2","l3"],locale:c}).text;r.push({id:Q("series"),role:"series",level:2,label:`Series ${e}: ${a}`,children:W(t,3)})}y.children=[...K,...r]}else y.children=[...K,...W(C,2)];return w&&y.children.push(w),y}var ue=new Set(["LineChart","AreaChart","StackedAreaChart","DifferenceChart","Scatterplot","BubbleChart","ConnectedScatterplot","QuadrantChart","MultiAxisLineChart","MinimapChart"]),he=new Set(["BarChart","StackedBarChart","GroupedBarChart","DotPlot"]),de=new Set(["PieChart","DonutChart","FunnelChart"]),me=new Set(["Histogram","BoxPlot","ViolinPlot","RidgelinePlot","SwarmPlot"]),fe=Symbol.for("semiotic.chartRecipeRegistry"),pe={LineChart:"line chart",AreaChart:"area chart",StackedAreaChart:"stacked area chart",DifferenceChart:"difference chart",Scatterplot:"scatter plot",BubbleChart:"bubble chart",ConnectedScatterplot:"connected scatter plot",QuadrantChart:"quadrant chart",MultiAxisLineChart:"dual-axis line chart",CandlestickChart:"candlestick chart",BumpChart:"bump chart",Heatmap:"heatmap",MinimapChart:"line chart",BarChart:"bar chart",StackedBarChart:"stacked bar chart",GroupedBarChart:"grouped bar chart",DotPlot:"dot plot",Histogram:"histogram",BoxPlot:"box plot",ViolinPlot:"violin plot",RidgelinePlot:"ridgeline plot",SwarmPlot:"swarm plot",PieChart:"pie chart",DonutChart:"donut chart",FunnelChart:"funnel chart",GaugeChart:"gauge",LikertChart:"Likert chart",SwimlaneChart:"swimlane chart",ForceDirectedGraph:"network graph",SankeyDiagram:"Sankey diagram",ProcessSankey:"temporal Sankey diagram",ChordDiagram:"chord diagram",TreeDiagram:"tree diagram",Treemap:"treemap",CirclePack:"circle-packing chart",OrbitDiagram:"orbit diagram",ChoroplethMap:"choropleth map",ProportionalSymbolMap:"proportional-symbol map",FlowMap:"flow map",DistanceCartogram:"distance cartogram",BigNumber:"single value",StreamPhysicsFrame:"physics stream frame",EventDropChart:"event-drop physics chart",GaltonBoardChart:"Galton board chart",UnitPileChart:"physics pile chart",CollisionSwarmChart:"collision swarm chart",PacketFlowChart:"physical flow chart",ProcessFlowChart:"process flow physics chart",CrucibleChart:"crucible physics chart",PhysicsCustomChart:"custom physics chart"},ge=new Set(["ForceDirectedGraph","SankeyDiagram","ProcessSankey","ChordDiagram"]),$e=new Set(["StreamPhysicsFrame","EventDropChart","GaltonBoardChart","UnitPileChart","CollisionSwarmChart","PacketFlowChart","ProcessFlowChart","GauntletChart","CrucibleChart","PhysicsCustomChart"]),be=new Set(["Scatterplot","BubbleChart","ConnectedScatterplot","QuadrantChart","ScatterplotMatrix"]),ve={"outlier-detection":"alerting","change-detection":"alerting",trend:"tracking","composition-over-time":"apportioning","compare-series":"comparing","compare-categories":"comparing",rank:"ranking","part-to-whole":"apportioning",distribution:"characterizing",correlation:"relating",flow:"tracing",hierarchy:"nesting",geo:"locating"},ye={"time-series":"tracking",categorical:"comparing",distribution:"characterizing",relationship:"relating",flow:"tracing",network:"tracing",hierarchy:"nesting",geo:"locating",realtime:"tracking",value:"presenting",custom:"presenting"},we=["trend","compare-series","compare-categories","rank","part-to-whole","distribution","correlation","flow","hierarchy","geo","composition-over-time","change-detection","outlier-detection"],Ce={alerting:"alerting",tracking:"trend",comparing:"comparison",ranking:"ranking",apportioning:"composition",characterizing:"distribution",relating:"correlation",tracing:"flow",nesting:"hierarchy",locating:"locator",presenting:"single-value"},ke=new Set(["y-threshold","x-threshold","band","x-band","callout","label"]),Ae=new Set(["system","agent","watcher"]),xe=new Set(["ai","agent","system","computed","dbt","great-expectations"]),Me=new Set(["rule","statistical-test","llm-inference","computed"]),Se={"y-threshold":"a threshold line","x-threshold":"a threshold line",band:"a highlighted band","x-band":"a highlighted band",label:"a label",callout:"a callout","callout-circle":"a callout","callout-rect":"a callout",text:"a text note",bracket:"a bracket",enclose:"an enclosure","rect-enclose":"an enclosure",highlight:"a highlight",widget:"a widget",trend:"a trend line",envelope:"an envelope","anomaly-band":"an anomaly band",forecast:"a forecast","category-highlight":"a category highlight"},Le=new Set(["ForceDirectedGraph","SankeyDiagram","ProcessSankey","ChordDiagram"]),Fe=new Set(["TreeDiagram","Treemap","CirclePack","OrbitDiagram"]),Pe=new Set(["ChoroplethMap","ProportionalSymbolMap","FlowMap","DistanceCartogram"]);export{o as getChartRecipe,s as getRecipeLayoutIdentity,c as resolveChartRecipe,u as recipeIntentId,v as finiteNumber,w as createPhysicsSourceState,C as generatePhysicsPileMechanicalSamples,k as physicsPileUnitCount,F as resolveCommunicativeAct,D as describeChart,ae as supportsStructuredNavigation,ce as buildNavigationTree};
|