semiotic 3.8.9 → 3.9.1

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.
Files changed (502) hide show
  1. package/README.md +55 -81
  2. package/agent-skill/semiotic-charts/SKILL.md +11 -2
  3. package/ai/behaviorContracts.cjs +33 -3
  4. package/ai/cli.js +53 -2
  5. package/ai/componentMetadata.cjs +15 -0
  6. package/ai/dist/mcp-server.js +1530 -611
  7. package/ai/examples.md +48 -42
  8. package/{CLAUDE.md → ai/reference.md} +43 -22
  9. package/ai/schema.json +10603 -986
  10. package/ai/surface-manifest.json +643 -2
  11. package/ai/system-prompt.md +83 -130
  12. package/dist/c-3BLJEQNG.min.js +1 -0
  13. package/dist/c-3KZD6AXJ.min.js +1 -0
  14. package/dist/c-4TWEX5HG.min.js +1 -0
  15. package/dist/c-52TEGIUJ.min.js +1 -0
  16. package/dist/c-5YCIX3VZ.min.js +1 -0
  17. package/dist/c-6FEKTA3U.min.js +1 -0
  18. package/dist/c-6O5EVOPH.min.js +1 -0
  19. package/dist/c-74HEEZGK.min.js +1 -0
  20. package/dist/c-AKAF6JAD.min.js +1 -0
  21. package/dist/c-BBKITSXB.min.js +1 -0
  22. package/dist/c-BWNB6USU.min.js +1 -0
  23. package/dist/c-C25ENHIK.min.js +1 -0
  24. package/dist/c-CDR5AO3R.min.js +1 -0
  25. package/dist/c-COHXCW3Q.min.js +1 -0
  26. package/dist/{chunk-scatterplotMatrixBrushOverlay-SDIZSN66.module.min.js → c-DADXPJXV.min.js} +0 -1
  27. package/dist/c-E3JFRRMI.min.js +1 -0
  28. package/dist/c-EBFPQHHO.min.js +1 -0
  29. package/dist/c-G36WS6LN.min.js +1 -0
  30. package/dist/c-GIKRQI4X.min.js +1 -0
  31. package/dist/c-GPYOFETM.min.js +1 -0
  32. package/dist/c-IDUHYYSI.min.js +1 -0
  33. package/dist/{chunk-chunk-FQPKOAIH.module.min.js → c-IUHFPMHD.min.js} +0 -1
  34. package/dist/c-J5G56TUH.min.js +1 -0
  35. package/dist/c-JAZ73J32.min.js +1 -0
  36. package/dist/c-KG3NXHAL.min.js +1 -0
  37. package/dist/c-KII3PLZE.min.js +1 -0
  38. package/dist/c-LIXGXMNS.min.js +1 -0
  39. package/dist/c-LVEY6D6B.min.js +1 -0
  40. package/dist/c-M4Y3BHFR.min.js +1 -0
  41. package/dist/c-MAIICR2Z.min.js +1 -0
  42. package/dist/c-MG5DM6VE.min.js +1 -0
  43. package/dist/{chunk-minimapBrushOverlay-JU57U7NM.module.min.js → c-MNF2S4AA.min.js} +0 -1
  44. package/dist/c-MT3WBK7M.min.js +1 -0
  45. package/dist/c-NY3JWV2K.min.js +1 -0
  46. package/dist/c-O6U6K4CW.min.js +1 -0
  47. package/dist/c-OCI56QF2.min.js +1 -0
  48. package/dist/c-OQ7M4AGV.min.js +1 -0
  49. package/dist/c-OXYMVK7Q.min.js +1 -0
  50. package/dist/c-PPWDL5ZI.min.js +1 -0
  51. package/dist/c-QHF5YON3.min.js +1 -0
  52. package/dist/c-RR3GO5SW.min.js +1 -0
  53. package/dist/{chunk-chunk-J5QD4RAM.module.min.js → c-RSVIHIQ4.min.js} +0 -1
  54. package/dist/{chunk-chunk-EMO5NUGE.module.min.js → c-S2BXNNJN.min.js} +0 -1
  55. package/dist/{chunk-chunk-YCQYG6J5.module.min.js → c-SLGMUBUL.min.js} +0 -1
  56. package/dist/c-SUILCHWU.min.js +1 -0
  57. package/dist/c-TZW3JGJ5.min.js +1 -0
  58. package/dist/c-US5ZFT6E.min.js +1 -0
  59. package/dist/{chunk-chunk-RZH7VZYS.module.min.js → c-USFMFKIH.min.js} +0 -1
  60. package/dist/c-UUKVD4WB.min.js +1 -0
  61. package/dist/{chunk-chunk-SV4XAZ3Q.module.min.js → c-VGW3VG3I.min.js} +0 -1
  62. package/dist/c-W3CE4A4S.min.js +1 -0
  63. package/dist/{chunk-chunk-2NVFEB7P.module.min.js → c-WJCD5EUY.min.js} +0 -1
  64. package/dist/{chunk-chunk-2JGJ5GUG.module.min.js → c-X5UBGU2V.min.js} +0 -1
  65. package/dist/c-YDAY2WFR.min.js +1 -0
  66. package/dist/c-ZOWWU34K.min.js +1 -0
  67. package/dist/components/AccessibleNavTree.d.ts +1 -1
  68. package/dist/components/CategoryColors.d.ts +1 -1
  69. package/dist/components/GradientLegend.d.ts +14 -0
  70. package/dist/components/Legend.d.ts +2 -7
  71. package/dist/components/LinkedCharts.d.ts +1 -1
  72. package/dist/components/MobileAnnotationCalloutList.d.ts +1 -1
  73. package/dist/components/ObservationReadout.d.ts +45 -0
  74. package/dist/components/ThemeProvider.d.ts +4 -4
  75. package/dist/components/Tooltip/FlippingTooltip.d.ts +5 -7
  76. package/dist/components/Tooltip/Tooltip.d.ts +30 -5
  77. package/dist/components/Tooltip/tooltipChrome.d.ts +43 -0
  78. package/dist/components/ai/chartCapabilityTypes.d.ts +86 -2
  79. package/dist/components/ai/chartClinic.d.ts +2 -0
  80. package/dist/components/ai/deriveProfileFields.d.ts +40 -0
  81. package/dist/components/ai/evaluateChart.d.ts +85 -0
  82. package/dist/components/ai/fieldPolicy.d.ts +7 -0
  83. package/dist/components/ai/fieldRoles.d.ts +24 -0
  84. package/dist/components/ai/generativeChart.d.ts +18 -2
  85. package/dist/components/ai/inferIntent.d.ts +26 -2
  86. package/dist/components/ai/intents.d.ts +35 -0
  87. package/dist/components/ai/navigationTree.d.ts +2 -2
  88. package/dist/components/ai/observedSceneAudit.d.ts +2 -1
  89. package/dist/components/ai/profileData.d.ts +11 -0
  90. package/dist/components/ai/repairChartConfig.d.ts +2 -3
  91. package/dist/components/ai/semanticEvidence.d.ts +4 -0
  92. package/dist/components/ai/semanticViability.d.ts +11 -0
  93. package/dist/components/ai/semanticViabilityRegistry.d.ts +5 -0
  94. package/dist/components/ai/streamingTypes.d.ts +4 -0
  95. package/dist/components/ai/suggestCharts.d.ts +5 -6
  96. package/dist/components/ai/suggestDashboard.d.ts +2 -3
  97. package/dist/components/ai/suggestStreamCharts.d.ts +1 -1
  98. package/dist/components/ai/suggestStretchCharts.d.ts +2 -3
  99. package/dist/components/ai/suggestionPropContracts.d.ts +20 -0
  100. package/dist/components/ai/variantDiscovery.d.ts +3 -1
  101. package/dist/components/charts/custom/NetworkCustomChart.d.ts +3 -0
  102. package/dist/components/charts/custom/OrdinalCustomChart.d.ts +3 -0
  103. package/dist/components/charts/custom/XYCustomChart.d.ts +1 -1
  104. package/dist/components/charts/geo/ChoroplethMap.d.ts +3 -1
  105. package/dist/components/charts/geo/DistanceCartogram.d.ts +2 -7
  106. package/dist/components/charts/geo/cartogramOverlay.d.ts +28 -0
  107. package/dist/components/charts/index.d.ts +4 -3
  108. package/dist/components/charts/network/ProcessSankey.d.ts +2 -136
  109. package/dist/components/charts/network/ProcessSankeyProps.d.ts +139 -0
  110. package/dist/components/charts/network/Treemap.d.ts +2 -1
  111. package/dist/components/charts/network/processSankey/boundaryHubOrdering.d.ts +23 -0
  112. package/dist/components/charts/network/processSankey/layoutGeometry.d.ts +2 -0
  113. package/dist/components/charts/network/processSankey/ordering.d.ts +3 -41
  114. package/dist/components/charts/network/processSankey/orderingTypes.d.ts +32 -0
  115. package/dist/components/charts/network/processSankey/packing.d.ts +1 -1
  116. package/dist/components/charts/network/processSankey/packingCache.d.ts +1 -1
  117. package/dist/components/charts/network/processSankey/packingOptimization.d.ts +72 -0
  118. package/dist/components/charts/ordinal/BarChart.d.ts +4 -3
  119. package/dist/components/charts/ordinal/FunnelChart.d.ts +2 -0
  120. package/dist/components/charts/ordinal/GroupedBarChart.d.ts +3 -2
  121. package/dist/components/charts/ordinal/StackedBarChart.d.ts +4 -3
  122. package/dist/components/charts/ordinal/SwimlaneChart.d.ts +2 -2
  123. package/dist/components/charts/physics/GaltonBoardChart.d.ts +2 -9
  124. package/dist/components/charts/physics/GauntletChart.d.ts +10 -41
  125. package/dist/components/charts/physics/ProcessFlowChart.d.ts +1 -1
  126. package/dist/components/charts/physics/chainReactionAccessibleTable.d.ts +9 -0
  127. package/dist/components/charts/physics/chainReactionRuntime.d.ts +2 -1
  128. package/dist/components/charts/physics/chainReactionTypes.d.ts +5 -1
  129. package/dist/components/charts/physics/crucibleBodyRenderers.d.ts +2 -2
  130. package/dist/components/charts/physics/crucibleClone.d.ts +6 -0
  131. package/dist/components/charts/physics/crucibleEffects.d.ts +1 -2
  132. package/dist/components/charts/physics/crucibleRecord.d.ts +7 -0
  133. package/dist/components/charts/physics/gauntletChrome.d.ts +4 -4
  134. package/dist/components/charts/physics/gauntletPhysics.d.ts +1 -0
  135. package/dist/components/charts/physics/gauntletPublic.d.ts +4 -0
  136. package/dist/components/charts/physics/packetFlowOverlay.d.ts +7 -0
  137. package/dist/components/charts/physics/physicsChartLayout.d.ts +8 -0
  138. package/dist/components/charts/physics/physicsChartShared.d.ts +3 -1
  139. package/dist/components/charts/physics/physicsChartUtils.d.ts +1 -1
  140. package/dist/components/charts/physics/physicsHocUtils.d.ts +25 -12
  141. package/dist/components/charts/physics/physicsProjectionOverlays.d.ts +24 -0
  142. package/dist/components/charts/physics/processFlowOverlays.d.ts +9 -0
  143. package/dist/components/charts/realtime/RealtimeHeatmap.d.ts +15 -12
  144. package/dist/components/charts/realtime/RealtimeHistogram.d.ts +10 -7
  145. package/dist/components/charts/realtime/RealtimeLineChart.d.ts +35 -14
  146. package/dist/components/charts/realtime/RealtimeSwarmChart.d.ts +21 -14
  147. package/dist/components/charts/realtime/RealtimeWaterfallChart.d.ts +20 -13
  148. package/dist/components/charts/realtime/aggregate.d.ts +4 -1
  149. package/dist/components/charts/realtime/eventTime.d.ts +4 -0
  150. package/dist/components/charts/realtime/realtimeChartRuntime.d.ts +27 -0
  151. package/dist/components/charts/realtime/realtimeChartTypes.d.ts +30 -0
  152. package/dist/components/charts/realtime/useRealtimeCategoryColors.d.ts +30 -0
  153. package/dist/components/charts/shared/FrameTextAnnotationSVG.d.ts +10 -0
  154. package/dist/components/charts/shared/annotationActivation.d.ts +3 -7
  155. package/dist/components/charts/shared/annotationBandFill.d.ts +6 -0
  156. package/dist/components/charts/shared/annotationDispatch.d.ts +31 -0
  157. package/dist/components/charts/shared/annotationIdentity.d.ts +8 -0
  158. package/dist/components/charts/shared/annotationRules.d.ts +1 -15
  159. package/dist/components/charts/shared/boundedCategoryRegistry.d.ts +8 -0
  160. package/dist/components/charts/shared/chainReactionChartSpec.d.ts +3 -0
  161. package/dist/components/charts/shared/chartMode.d.ts +3 -2
  162. package/dist/components/charts/shared/chartSpecCore.d.ts +1 -0
  163. package/dist/components/charts/shared/frameTextAnnotation.d.ts +63 -0
  164. package/dist/components/charts/shared/gradient.d.ts +16 -0
  165. package/dist/components/charts/shared/hatchFill.d.ts +15 -0
  166. package/dist/components/charts/shared/hooks.d.ts +4 -4
  167. package/dist/components/charts/shared/legendUtils.d.ts +1 -0
  168. package/dist/components/charts/shared/streamPropsHelpers.d.ts +2 -1
  169. package/dist/components/charts/shared/styleRules.d.ts +9 -2
  170. package/dist/components/charts/shared/styleRulesWireSchema.d.ts +353 -0
  171. package/dist/components/charts/shared/types.d.ts +18 -9
  172. package/dist/components/charts/shared/useChartLegend.d.ts +43 -9
  173. package/dist/components/charts/shared/useChartSetup.d.ts +3 -1
  174. package/dist/components/charts/shared/useCustomChartSetup.d.ts +5 -2
  175. package/dist/components/charts/shared/useNetworkChartSetup.d.ts +5 -1
  176. package/dist/components/charts/shared/useOrdinalBrush.d.ts +3 -3
  177. package/dist/components/charts/shared/useStreamingLegend.d.ts +6 -1
  178. package/dist/components/charts/value/types.d.ts +1 -1
  179. package/dist/components/charts/xy/BubbleChart.d.ts +1 -1
  180. package/dist/components/charts/xy/BumpChart.capability.d.ts +14 -1
  181. package/dist/components/charts/xy/BumpChart.d.ts +13 -73
  182. package/dist/components/charts/xy/BumpChart.semanticViability.d.ts +5 -0
  183. package/dist/components/charts/xy/CandlestickChart.d.ts +2 -2
  184. package/dist/components/charts/xy/LineChart.d.ts +2 -2
  185. package/dist/components/charts/xy/Scatterplot.d.ts +1 -1
  186. package/dist/components/charts/xy/bumpData.d.ts +44 -0
  187. package/dist/components/charts/xy/bumpIdentity.d.ts +2 -0
  188. package/dist/components/charts/xy/bumpLayout.d.ts +45 -0
  189. package/dist/components/charts/xy/bumpTooltip.d.ts +20 -0
  190. package/dist/components/legendLayout.d.ts +131 -4
  191. package/dist/components/realtime/ReorderBuffer.d.ts +2 -0
  192. package/dist/components/realtime/types.d.ts +10 -1
  193. package/dist/components/recipes/balanceSnapshotsToFlows.d.ts +42 -0
  194. package/dist/components/recipes/directedReachability.d.ts +14 -0
  195. package/dist/components/recipes/gofishDisplayListFixtures.generated.d.ts +6 -6
  196. package/dist/components/recipes/gridObservatory.d.ts +1 -1
  197. package/dist/components/recipes/networkAnalysis.d.ts +1 -18
  198. package/dist/components/recipes/physics.d.ts +7 -4
  199. package/dist/components/recipes/processPhysics.d.ts +0 -1
  200. package/dist/components/recipes/waffle.d.ts +7 -4
  201. package/dist/components/semiotic-ai-core.d.ts +13 -4
  202. package/dist/components/semiotic-ai-observations.d.ts +3 -0
  203. package/dist/components/semiotic-ai.d.ts +16 -9
  204. package/dist/components/semiotic-client-shared.d.ts +10 -0
  205. package/dist/components/semiotic-experimental.d.ts +1 -1
  206. package/dist/components/semiotic-geo.d.ts +4 -1
  207. package/dist/components/semiotic-network.d.ts +7 -4
  208. package/dist/components/semiotic-ordinal.d.ts +4 -1
  209. package/dist/components/semiotic-physics.d.ts +11 -4
  210. package/dist/components/semiotic-realtime-core.d.ts +11 -4
  211. package/dist/components/semiotic-realtime-react.d.ts +4 -3
  212. package/dist/components/semiotic-realtime.d.ts +3 -1
  213. package/dist/components/semiotic-recipes-core.d.ts +7 -5
  214. package/dist/components/semiotic-server-edge.d.ts +3 -2
  215. package/dist/components/semiotic-server.d.ts +3 -2
  216. package/dist/components/semiotic-themes-core.d.ts +5 -48
  217. package/dist/components/semiotic-utils-core.d.ts +10 -5
  218. package/dist/components/semiotic-utils-react.d.ts +2 -0
  219. package/dist/components/semiotic-utils.d.ts +1 -1
  220. package/dist/components/semiotic-xy.d.ts +4 -1
  221. package/dist/components/semiotic.d.ts +68 -26
  222. package/dist/components/server/animatedGif.d.ts +1 -1
  223. package/dist/components/server/renderEvidence.d.ts +25 -2
  224. package/dist/components/server/renderToStaticSVG.d.ts +15 -7
  225. package/dist/components/server/serverChartConfigShared.d.ts +8 -1
  226. package/dist/components/server/serverChartConfigs.d.ts +1 -0
  227. package/dist/components/server/serverChartConfigsNetwork.d.ts +3 -3
  228. package/dist/components/server/serverChartConfigsNetworkChord.d.ts +2 -0
  229. package/dist/components/server/serverChartConfigsNetworkForce.d.ts +2 -0
  230. package/dist/components/server/serverChartConfigsNetworkHierarchy.d.ts +3 -0
  231. package/dist/components/server/serverChartConfigsXY.d.ts +3 -3
  232. package/dist/components/server/serverChartConfigsXYBubble.d.ts +5 -0
  233. package/dist/components/server/serverChartConfigsXYBump.d.ts +7 -0
  234. package/dist/components/server/serverChartConfigsXYScatter.d.ts +5 -0
  235. package/dist/components/server/staticAnnotationFallbacks.d.ts +10 -0
  236. package/dist/components/server/staticAnnotations.d.ts +28 -1
  237. package/dist/components/server/staticAxisTickLabel.d.ts +13 -0
  238. package/dist/components/server/staticLegend.d.ts +1 -1
  239. package/dist/components/server/staticLegendMargin.d.ts +41 -0
  240. package/dist/components/server/staticOrdinal.d.ts +8 -2
  241. package/dist/components/server/staticPhysics.d.ts +13 -1
  242. package/dist/components/server/staticPhysicsChrome.d.ts +20 -0
  243. package/dist/components/server/staticRawLegend.d.ts +15 -0
  244. package/dist/components/server/staticSVGChrome.d.ts +16 -55
  245. package/dist/components/server/staticXYAxes.d.ts +27 -0
  246. package/dist/components/server/staticXYAxisTicks.d.ts +39 -0
  247. package/dist/components/server/staticXYGrid.d.ts +11 -0
  248. package/dist/components/server/themeResolver.d.ts +5 -1
  249. package/dist/components/store/ThemeStore.d.ts +2 -98
  250. package/dist/components/store/designTokens.d.ts +1 -1
  251. package/dist/components/store/themeCSSVariables.d.ts +10 -0
  252. package/dist/components/store/themeCore.d.ts +91 -0
  253. package/dist/components/store/themePresets.d.ts +81 -0
  254. package/dist/components/store/themeSerialization.d.ts +2 -1
  255. package/dist/components/stream/AccessibleDataTable.d.ts +12 -14
  256. package/dist/components/stream/AccessibleTablePortalImpl.d.ts +6 -0
  257. package/dist/components/stream/GeoTileRenderer.d.ts +2 -0
  258. package/dist/components/stream/NetworkCanvasHitTester.d.ts +3 -1
  259. package/dist/components/stream/NetworkSSRFrame.d.ts +2 -1
  260. package/dist/components/stream/NetworkSVGOverlay.d.ts +3 -31
  261. package/dist/components/stream/OrdinalCanvasHitTester.d.ts +2 -0
  262. package/dist/components/stream/SVGChartTitle.d.ts +9 -0
  263. package/dist/components/stream/SVGOverlay.d.ts +1 -21
  264. package/dist/components/stream/SVGUnderlay.d.ts +24 -0
  265. package/dist/components/stream/SceneToSVG.d.ts +1 -1
  266. package/dist/components/stream/StreamGeoFrame.d.ts +1 -1
  267. package/dist/components/stream/StreamOrdinalFrame.d.ts +1 -1
  268. package/dist/components/stream/StreamXYFrame.d.ts +1 -1
  269. package/dist/components/stream/accessibleDataRows.d.ts +11 -0
  270. package/dist/components/stream/accessibleDataTableModel.d.ts +40 -0
  271. package/dist/components/stream/accessibleTableTypes.d.ts +11 -0
  272. package/dist/components/stream/axisTickUtils.d.ts +19 -0
  273. package/dist/components/stream/canvasBackground.d.ts +10 -0
  274. package/dist/components/stream/canvasSetup.d.ts +9 -0
  275. package/dist/components/stream/frameCursorInteraction.d.ts +25 -0
  276. package/dist/components/stream/frameDefaultMargins.d.ts +37 -0
  277. package/dist/components/stream/frameGraphics.d.ts +18 -0
  278. package/dist/components/stream/frameGraphicsSubscription.d.ts +26 -0
  279. package/dist/components/stream/frameLegendOptions.d.ts +18 -0
  280. package/dist/components/stream/geoFrameCursorInteraction.d.ts +9 -0
  281. package/dist/components/stream/geoFrameHelpers.d.ts +29 -1
  282. package/dist/components/stream/geoTypes.d.ts +10 -11
  283. package/dist/components/stream/hitTarget.d.ts +61 -2
  284. package/dist/components/stream/moduleWorkerSession.d.ts +6 -0
  285. package/dist/components/stream/networkAnnotationAnchors.d.ts +37 -0
  286. package/dist/components/stream/networkCustomLayout.d.ts +2 -2
  287. package/dist/components/stream/networkFrameCursorInteraction.d.ts +12 -0
  288. package/dist/components/stream/networkFrameInteraction.d.ts +2 -0
  289. package/dist/components/stream/networkFramePaint.d.ts +7 -0
  290. package/dist/components/stream/networkPipelineConfig.d.ts +1 -1
  291. package/dist/components/stream/networkTypes.d.ts +30 -32
  292. package/dist/components/stream/normalizeXYData.d.ts +7 -0
  293. package/dist/components/stream/ordinalFrameCursorInteraction.d.ts +7 -0
  294. package/dist/components/stream/ordinalFrameInteraction.d.ts +29 -0
  295. package/dist/components/stream/ordinalSceneSVG.d.ts +10 -0
  296. package/dist/components/stream/ordinalTypes.d.ts +10 -4
  297. package/dist/components/stream/physics/PhysicsBodySpatialIndex.d.ts +9 -1
  298. package/dist/components/stream/physics/PhysicsCanvasTheme.d.ts +25 -0
  299. package/dist/components/stream/physics/PhysicsControllers.d.ts +0 -3
  300. package/dist/components/stream/physics/PhysicsPipelineStore.d.ts +4 -1
  301. package/dist/components/stream/physics/PhysicsSVGOverlay.d.ts +3 -24
  302. package/dist/components/stream/physics/PhysicsSettledSVG.d.ts +9 -21
  303. package/dist/components/stream/physics/PhysicsSettledSVGElement.d.ts +37 -0
  304. package/dist/components/stream/physics/PhysicsSettledScene.d.ts +7 -3
  305. package/dist/components/stream/physics/StreamPhysicsFrame.d.ts +1 -1
  306. package/dist/components/stream/physics/StreamPhysicsTypes.d.ts +23 -4
  307. package/dist/components/stream/physics/physicsAnnotationContext.d.ts +19 -0
  308. package/dist/components/stream/physics/physicsBodyCanvas.d.ts +4 -0
  309. package/dist/components/stream/physics/physicsSettledChrome.d.ts +7 -0
  310. package/dist/components/stream/physics/usePhysicsCanvasPointer.d.ts +32 -0
  311. package/dist/components/stream/physics/usePhysicsSemanticNavigation.d.ts +36 -0
  312. package/dist/components/stream/pipelineConfig.d.ts +6 -17
  313. package/dist/components/stream/pipelineDomainResolution.d.ts +1 -1
  314. package/dist/components/stream/renderBackend.d.ts +2 -0
  315. package/dist/components/stream/renderers/canvasRenderHelpers.d.ts +13 -2
  316. package/dist/components/stream/renderers/resolveCSSColor.d.ts +7 -0
  317. package/dist/components/stream/responsiveSize.d.ts +17 -0
  318. package/dist/components/stream/sceneCursor.d.ts +41 -0
  319. package/dist/components/stream/sceneRevisionDiagnostics.d.ts +1 -1
  320. package/dist/components/stream/svgOverlayUtils.d.ts +22 -1
  321. package/dist/components/stream/types.d.ts +25 -12
  322. package/dist/components/stream/useCanvasFrameHost.d.ts +3 -1
  323. package/dist/components/stream/useFrame.d.ts +24 -1
  324. package/dist/components/stream/useResponsiveSize.d.ts +6 -1
  325. package/dist/components/stream/useStalenessCheck.d.ts +1 -1
  326. package/dist/components/stream/xyFrameAxisTypes.d.ts +15 -4
  327. package/dist/components/stream/xyFrameCursorInteraction.d.ts +6 -0
  328. package/dist/components/stream/xySceneBuilders/swarmScene.d.ts +1 -1
  329. package/dist/components/stream/xySceneBuilders/types.d.ts +6 -26
  330. package/dist/components/types/legendTypes.d.ts +6 -0
  331. package/dist/components/types/marginType.d.ts +7 -8
  332. package/dist/controls.min.js +1 -1
  333. package/dist/controls.module.min.js +1 -1
  334. package/dist/forceLayoutWorker.js +1 -1
  335. package/dist/geo.min.js +1 -1
  336. package/dist/geo.module.min.js +1 -1
  337. package/dist/network.min.js +1 -1
  338. package/dist/network.module.min.js +1 -1
  339. package/dist/ordinal.min.js +1 -1
  340. package/dist/ordinal.module.min.js +1 -1
  341. package/dist/physics-matter.module.min.js +1 -1
  342. package/dist/physics-rapier.module.min.js +1 -1
  343. package/dist/physics.min.js +1 -1
  344. package/dist/physics.module.min.js +1 -1
  345. package/dist/physicsWorker.js +1 -1
  346. package/dist/processSankeyLayoutWorker.js +1 -1
  347. package/dist/realtime.min.js +1 -1
  348. package/dist/realtime.module.min.js +1 -1
  349. package/dist/rough.min.js +1 -1
  350. package/dist/rough.module.min.js +1 -1
  351. package/dist/semiotic-ai-core.d.ts +13 -4
  352. package/dist/semiotic-ai-core.min.js +1 -1
  353. package/dist/semiotic-ai-core.module.min.js +1 -1
  354. package/dist/semiotic-ai.d.ts +16 -9
  355. package/dist/semiotic-ai.min.js +1 -1
  356. package/dist/semiotic-ai.module.min.js +1 -1
  357. package/dist/semiotic-client-cjs-shared.min.js +1 -0
  358. package/dist/semiotic-client-glyph.module.min.js +2 -0
  359. package/dist/semiotic-client-responsive.module.min.js +2 -0
  360. package/dist/semiotic-client-shared.module.min.js +2 -0
  361. package/dist/semiotic-custom-layout-selection-cjs-shared.min.js +2 -0
  362. package/dist/semiotic-data.min.js +1 -1
  363. package/dist/semiotic-data.module.min.js +1 -1
  364. package/dist/semiotic-experimental-auxiliary.module.min.js +2 -0
  365. package/dist/semiotic-experimental-node-auxiliary.module.min.js +2 -0
  366. package/dist/semiotic-experimental-node.module.min.js +2 -0
  367. package/dist/semiotic-experimental-react-shared.module.min.js +2 -0
  368. package/dist/semiotic-experimental-vacp.min.js +1 -1
  369. package/dist/semiotic-experimental-vacp.module.min.js +1 -1
  370. package/dist/semiotic-experimental.d.ts +1 -1
  371. package/dist/semiotic-experimental.min.js +1 -1
  372. package/dist/semiotic-experimental.module.min.js +1 -1
  373. package/dist/semiotic-geo.d.ts +4 -1
  374. package/dist/semiotic-network.d.ts +7 -4
  375. package/dist/semiotic-ordinal.d.ts +4 -1
  376. package/dist/semiotic-physics.d.ts +11 -4
  377. package/dist/semiotic-realtime-core.d.ts +11 -4
  378. package/dist/semiotic-realtime-core.min.js +2 -1
  379. package/dist/semiotic-realtime-core.module.min.js +2 -1
  380. package/dist/semiotic-realtime-react.d.ts +4 -3
  381. package/dist/semiotic-realtime-react.min.js +1 -1
  382. package/dist/semiotic-realtime-react.module.min.js +1 -1
  383. package/dist/semiotic-realtime.d.ts +3 -1
  384. package/dist/semiotic-recipes-core-cjs-base.min.js +1 -0
  385. package/dist/semiotic-recipes-core.d.ts +7 -5
  386. package/dist/semiotic-recipes-core.min.js +9 -1
  387. package/dist/semiotic-recipes-core.module.min.js +1 -1
  388. package/dist/semiotic-recipes-geo-cjs.min.js +1 -0
  389. package/dist/semiotic-recipes-react.min.js +1 -1
  390. package/dist/semiotic-recipes-react.module.min.js +1 -1
  391. package/dist/semiotic-recipes.min.js +7 -1
  392. package/dist/semiotic-recipes.module.min.js +2 -1
  393. package/dist/semiotic-server-edge-node.module.min.js +1 -0
  394. package/dist/semiotic-server-edge.d.ts +3 -2
  395. package/dist/semiotic-server-edge.min.js +1 -1
  396. package/dist/semiotic-server-edge.module.min.js +1 -1
  397. package/dist/semiotic-server-node.min.js +1 -1
  398. package/dist/semiotic-server-node.module.min.js +1 -1
  399. package/dist/semiotic-server.d.ts +3 -2
  400. package/dist/semiotic-themes-core.d.ts +5 -48
  401. package/dist/semiotic-themes-core.min.js +1 -1
  402. package/dist/semiotic-themes-core.module.min.js +1 -1
  403. package/dist/semiotic-themes-react.min.js +1 -1
  404. package/dist/semiotic-themes-react.module.min.js +1 -1
  405. package/dist/semiotic-themes.min.js +1 -1
  406. package/dist/semiotic-themes.module.min.js +1 -1
  407. package/dist/semiotic-utils-core.d.ts +10 -5
  408. package/dist/semiotic-utils-core.min.js +1 -1
  409. package/dist/semiotic-utils-core.module.min.js +1 -1
  410. package/dist/semiotic-utils-react.d.ts +2 -0
  411. package/dist/semiotic-utils-react.min.js +1 -1
  412. package/dist/semiotic-utils-react.module.min.js +1 -1
  413. package/dist/semiotic-utils.d.ts +1 -1
  414. package/dist/semiotic-utils.min.js +2 -1
  415. package/dist/semiotic-utils.module.min.js +2 -1
  416. package/dist/semiotic-value.min.js +1 -1
  417. package/dist/semiotic-value.module.min.js +1 -1
  418. package/dist/semiotic-xy.d.ts +4 -1
  419. package/dist/semiotic.d.ts +68 -26
  420. package/dist/semiotic.min.js +1 -1
  421. package/dist/semiotic.module.min.js +1 -1
  422. package/dist/server.min.js +1 -1
  423. package/dist/server.module.min.js +1 -1
  424. package/dist/xy.min.js +1 -1
  425. package/dist/xy.module.min.js +1 -1
  426. package/package.json +53 -19
  427. package/dist/__tests__/scenarios/mcpProtocolTypes.d.ts +0 -20
  428. package/dist/chunk-OrdinalBrushOverlay-PXHQYDB2.module.min.js +0 -2
  429. package/dist/chunk-XYBrushOverlay-ECZJJLAJ.module.min.js +0 -1
  430. package/dist/chunk-XYBrushOverlay-EP2SV3UI.module.min.js +0 -2
  431. package/dist/chunk-chartContainerDataAudit-IQ3NBN3Q.module.min.js +0 -2
  432. package/dist/chunk-chunk-2B3AIKUZ.module.min.js +0 -2
  433. package/dist/chunk-chunk-2CXCXRB4.module.min.js +0 -1
  434. package/dist/chunk-chunk-2X3FJCME.module.min.js +0 -1
  435. package/dist/chunk-chunk-2ZHHWZQM.module.min.js +0 -2
  436. package/dist/chunk-chunk-4ITOQRXM.module.min.js +0 -2
  437. package/dist/chunk-chunk-5UKL5W76.module.min.js +0 -2
  438. package/dist/chunk-chunk-5VVNW5AZ.module.min.js +0 -1
  439. package/dist/chunk-chunk-5ZON5NMV.module.min.js +0 -2
  440. package/dist/chunk-chunk-66PCWJUG.module.min.js +0 -1
  441. package/dist/chunk-chunk-6S3YGYW7.module.min.js +0 -1
  442. package/dist/chunk-chunk-6V5VQVCT.module.min.js +0 -2
  443. package/dist/chunk-chunk-7C5EDZ3Z.module.min.js +0 -2
  444. package/dist/chunk-chunk-A3I4HBD5.module.min.js +0 -1
  445. package/dist/chunk-chunk-ACLDBMRH.module.min.js +0 -2
  446. package/dist/chunk-chunk-AFQHURLO.module.min.js +0 -2
  447. package/dist/chunk-chunk-DDB4TLQG.module.min.js +0 -2
  448. package/dist/chunk-chunk-DTH3SUOU.module.min.js +0 -2
  449. package/dist/chunk-chunk-DTSNLGRK.module.min.js +0 -2
  450. package/dist/chunk-chunk-DVCWU7MT.module.min.js +0 -2
  451. package/dist/chunk-chunk-FEPXDKJP.module.min.js +0 -1
  452. package/dist/chunk-chunk-FJ76HWQZ.module.min.js +0 -1
  453. package/dist/chunk-chunk-FSIHAW6L.module.min.js +0 -2
  454. package/dist/chunk-chunk-G2RGVEYY.module.min.js +0 -2
  455. package/dist/chunk-chunk-G75OPF5N.module.min.js +0 -2
  456. package/dist/chunk-chunk-HADHLMY5.module.min.js +0 -1
  457. package/dist/chunk-chunk-HAJVODLO.module.min.js +0 -2
  458. package/dist/chunk-chunk-HBFA4NN6.module.min.js +0 -1
  459. package/dist/chunk-chunk-HIV7AW2V.module.min.js +0 -2
  460. package/dist/chunk-chunk-IY7RYD4S.module.min.js +0 -1
  461. package/dist/chunk-chunk-J3QOW4OE.module.min.js +0 -0
  462. package/dist/chunk-chunk-J3XWETBJ.module.min.js +0 -2
  463. package/dist/chunk-chunk-JZAMMSQQ.module.min.js +0 -2
  464. package/dist/chunk-chunk-KTWEBFMX.module.min.js +0 -2
  465. package/dist/chunk-chunk-LSJUXBMF.module.min.js +0 -1
  466. package/dist/chunk-chunk-MXMRXSCI.module.min.js +0 -2
  467. package/dist/chunk-chunk-MXVBXFKW.module.min.js +0 -2
  468. package/dist/chunk-chunk-NWIGA3UK.module.min.js +0 -1
  469. package/dist/chunk-chunk-OFAP623Y.module.min.js +0 -2
  470. package/dist/chunk-chunk-OHLRAEQZ.module.min.js +0 -2
  471. package/dist/chunk-chunk-OZK46A5U.module.min.js +0 -1
  472. package/dist/chunk-chunk-PMR47KRY.module.min.js +0 -2
  473. package/dist/chunk-chunk-PRNXOCYZ.module.min.js +0 -2
  474. package/dist/chunk-chunk-Q2YADC2V.module.min.js +0 -2
  475. package/dist/chunk-chunk-RLKZVJMQ.module.min.js +0 -2
  476. package/dist/chunk-chunk-ROP4HI7H.module.min.js +0 -2
  477. package/dist/chunk-chunk-SK2TQMG4.module.min.js +0 -2
  478. package/dist/chunk-chunk-SKLYXNYW.module.min.js +0 -2
  479. package/dist/chunk-chunk-TCMHJWFJ.module.min.js +0 -1
  480. package/dist/chunk-chunk-TSCFL235.module.min.js +0 -1
  481. package/dist/chunk-chunk-U4NZCU5T.module.min.js +0 -2
  482. package/dist/chunk-chunk-U66USBWU.module.min.js +0 -1
  483. package/dist/chunk-chunk-UOQRPGPK.module.min.js +0 -2
  484. package/dist/chunk-chunk-VKL6DI43.module.min.js +0 -2
  485. package/dist/chunk-chunk-W62673ZE.module.min.js +0 -1
  486. package/dist/chunk-chunk-WFHZHWT7.module.min.js +0 -1
  487. package/dist/chunk-chunk-XCC25CZZ.module.min.js +0 -2
  488. package/dist/chunk-chunk-XECNOUZY.module.min.js +0 -2
  489. package/dist/chunk-chunk-XYZDTYAF.module.min.js +0 -2
  490. package/dist/chunk-chunk-YHNZCPOZ.module.min.js +0 -2
  491. package/dist/chunk-chunk-YWZB3KPI.module.min.js +0 -2
  492. package/dist/chunk-statisticalOverlays-HMYYSGPE.module.min.js +0 -2
  493. package/dist/components/stream/test-utils/frameScheduler.d.ts +0 -12
  494. package/dist/components/stream/test-utils/revisionConsumption.d.ts +0 -13
  495. package/dist/test-utils/canvasMock.d.ts +0 -86
  496. package/dist/test-utils/capturedFrameProps.d.ts +0 -67
  497. package/dist/test-utils/frameMock.d.ts +0 -81
  498. package/dist/test-utils/ordinalFixtures.d.ts +0 -48
  499. /package/dist/{chunk-chunk-JJ2OOIET.module.min.js → c-GGISSW5E.min.js} +0 -0
  500. /package/dist/{chunk-chunk-SIRIJ3DY.module.min.js → c-N4G2L7ID.min.js} +0 -0
  501. /package/dist/{chunk-chunk-CA3YDW6F.module.min.js → c-S6U5CGT5.min.js} +0 -0
  502. /package/dist/components/recipes/{mobileAnnotationStrategy.d.ts → mobileAnnotationBehavior.d.ts} +0 -0
@@ -1,144 +1,95 @@
1
1
  # Semiotic — React Data Visualization
2
2
 
3
- <!-- semiotic-bundle-sizes:start -->
4
- <!-- Auto-generated by scripts/sync-bundle-sizes.mjs — do not edit by hand. -->
5
- **Use sub-path imports** — `semiotic/xy` (146KB gz), `semiotic/ordinal` (122KB gz), `semiotic/network` (146KB gz), `semiotic/geo` (104KB gz), `semiotic/realtime` (155KB gz), `semiotic/realtime/core` (146KB gz), `semiotic/realtime/react` (1KB gz), `semiotic/server` (226KB gz), `semiotic/server/node` (226KB gz), `semiotic/server/edge` (241KB gz), `semiotic/utils` (86KB gz), `semiotic/utils/core` (84KB gz), `semiotic/utils/react` (6KB gz), `semiotic/recipes` (90KB gz), `semiotic/recipes/core` (89KB gz), `semiotic/recipes/react` (2KB gz), `semiotic/themes` (7KB gz), `semiotic/themes/core` (7KB gz), `semiotic/themes/react` (6KB gz), `semiotic/data` (4KB gz), `semiotic/value` (8KB gz), `semiotic/physics` (161KB gz), `semiotic/physics/matter` (1KB gz), `semiotic/physics/rapier` (1KB gz), `semiotic/ai` (507KB gz), `semiotic/ai/core` (81KB gz), `semiotic/controls` (12KB gz), `semiotic/rough` (4KB gz). Full `semiotic` is 410KB gz.
6
- <!-- semiotic-bundle-sizes:end -->
7
-
8
- ## Flat Array Data (`data: object[]`)
9
- - **LineChart** — `xAccessor`, `yAccessor`, `lineBy` (multi-line), `curve`
10
- - **AreaChart** — `xAccessor`, `yAccessor`, `areaBy`, `areaOpacity`
11
- - **StackedAreaChart** — `xAccessor`, `yAccessor`, **`areaBy`** (required, groups flat data into stacked areas), `colorBy`, `normalize`. Data must be a flat array. Do NOT use `lineBy` or `lineDataAccessor`.
12
- - **Scatterplot** — `xAccessor`, `yAccessor`, `colorBy`, `sizeBy`
13
- - **BubbleChart** — `xAccessor`, `yAccessor`, **`sizeBy`** (required), `sizeRange`
14
- - **ConnectedScatterplot** — `xAccessor`, `yAccessor`, `orderAccessor` (sequencing field), `pointRadius`
15
- - **Heatmap** — `xAccessor`, `yAccessor`, `valueAccessor`, `colorScheme` ("blues"|"reds"|"greens"|"viridis")
16
- - **BarChart** — `categoryAccessor`, `valueAccessor`, `orientation`, `sort`
17
- - **StackedBarChart** — `categoryAccessor`, `valueAccessor`, **`stackBy`** (required), `normalize`
18
- - **GroupedBarChart** — `categoryAccessor`, `valueAccessor`, **`groupBy`** (required)
19
- - **SwarmPlot** — `categoryAccessor`, `valueAccessor`, `pointRadius`
20
- - **BoxPlot** — `categoryAccessor`, `valueAccessor`, `showOutliers`
21
- - **Histogram** — `categoryAccessor` (optional, defaults to `"category"` — omit for single-group), `valueAccessor`, `bins` (default 25), `relative`
22
- - **ViolinPlot** — `categoryAccessor`, `valueAccessor`, `bins`, `curve`, `showIQR`
23
- - **DotPlot** — `categoryAccessor`, `valueAccessor`, `sort`, `dotRadius`
24
- - **PieChart** — `categoryAccessor`, `valueAccessor`
25
- - **DonutChart** — `categoryAccessor`, `valueAccessor`, `innerRadius`, `centerContent` (ReactNode, e.g. `<div>50%</div>`)
26
-
27
- All ordinal HOCs (except Pie/Donut) support `categoryFormat` — a function `(label, index?) => string` for custom tick label formatting (truncation, abbreviation).
28
-
29
- ## Hierarchical Data (`data: { children: [...] }`)
30
- - **TreeDiagram** — `childrenAccessor`, `nodeIdAccessor`, `layout` ("tree"|"cluster"|"partition"), `orientation`
31
- - **Treemap** — `childrenAccessor`, `valueAccessor`, `nodeIdAccessor`, `colorByDepth`
32
- - **CirclePack** — `childrenAccessor`, `valueAccessor`, `nodeIdAccessor`, `colorByDepth`
33
- - **OrbitDiagram** — animated radial/orbital hierarchy (use this, not TreeDiagram, for animated orbiting nodes). `childrenAccessor`, `nodeIdAccessor`, `orbitMode` ("flat"|"solar"|"atomic"|number[]), `speed`, `animated`. For static radial trees use `TreeDiagram layout="radial"`.
34
-
35
- ## Network Data (`nodes: object[]`, `edges: object[]`)
36
- - **ForceDirectedGraph** — **`nodes`**, **`edges`** (both required), `nodeIDAccessor`, `sourceAccessor`, `targetAccessor`, `colorBy`, `nodeSize` (number|string|fn), `nodeSizeRange`, `edgeWidth`, `edgeOpacity`, `iterations`, `forceStrength`, `layoutExecution` (`auto`|`worker`|`sync`), `showLabels`, `nodeLabel`, `tooltip`, `showLegend`
37
- - **SankeyDiagram** — **`edges`** (required), `sourceAccessor`, `targetAccessor`, `valueAccessor`
38
- - **ChordDiagram** — **`edges`** (required), `sourceAccessor`, `targetAccessor`, `valueAccessor`
39
-
40
- **Important**: Always use these HOC components for network charts unless you need sophisticated control they don't expose. `StreamNetworkFrame` is a low-level escape hatch — its callbacks receive internal wrapper objects (`RealtimeNode`), not your raw data.
41
-
42
- ## Realtime (ref-based push API, canvas)
43
-
44
- **IMPORTANT**: All pushed data must include a time field (default: `"time"`). Set `timeAccessor` if your field is named differently. Without a valid time field, charts silently render blank.
45
-
46
- Sizing: all Realtime HOCs accept both `size={[600, 400]}` (tuple) and `width={600} height={400}`.
47
-
48
- - **RealtimeLineChart** — `ref.current.push(datum)`, **`timeAccessor`** ("time"), **`valueAccessor`** ("value"), `windowSize`
49
- - **RealtimeHistogram** — **`binSize`** (required), **`timeAccessor`** ("time"), **`valueAccessor`** ("value"). Time field required even though this is a distribution — it's used for windowing.
50
- - **RealtimeSwarmChart** — **`timeAccessor`** ("time"), **`valueAccessor`** ("value"), `categoryAccessor`
51
- - **RealtimeWaterfallChart** — **`timeAccessor`** ("time"), **`valueAccessor`** ("value"), `positiveColor`, `negativeColor`
52
- - **RealtimeHeatmap** — **`timeAccessor`** ("time"), **`valueAccessor`** ("value"), `heatmapXBins`, `heatmapYBins`, `aggregation`. Both must match your data fields.
53
- - **StreamNetworkFrame** (`chartType="sankey"`) — push **individual edges**: `ref.current.push({ source, target, value })`. Use `ref.current.pushMany([...edges])` for batches. Do NOT push full edge snapshots. Props: `sourceAccessor`, `targetAccessor`, `valueAccessor`, `showParticles` (boolean), `particleStyle` (`{ radius, opacity, speedMultiplier, maxPerEdge, colorBy }`) (import from `semiotic`)
54
-
55
- Pushed data shape: `{ time: Date.now(), value: 42 }` for line/waterfall/heatmap, add `category` for histogram/swarm.
56
-
57
- ## Physics (`semiotic/physics`)
58
-
59
- Use only when motion maps to the data semantics; the settled projection is what readers should use for the chart. Import from `semiotic/physics`.
60
-
61
- - **GaltonBoardChart** — `data`, `valueAccessor` ("value"), `bins`, `mode` ("sample"|"mechanical"), `pegRows`, `mechanicalCount`, `branchProbability`, `colorBy`, `seed`, `size`. Distribution/sampling drop that settles into bins; mechanical mode can generate a seeded no-data demonstration.
62
- - **EventDropChart** — `data`, `timeAccessor` ("time"), `arrivalAccessor` ("arrivalTime"), `windows={{size}}`, `watermark={{delay}}`, `timeScale`, `colorBy`, `size`. Event-time arrival replay and late/watermark windows.
63
- - **UnitPileChart** — `data`, `categoryAccessor` ("category"), `valueAccessor` ("value"), `mode` ("sample"|"mechanical"), `mechanicalCount`, `mechanicalCategories`, `unitValue`, `colorBy`, `showProjection`, `size`. Unitized category piles; mechanical mode can generate a seeded no-data capacity sketch; default projection overlay keeps exact totals readable; raise `unitValue` for large values.
64
- - **CollisionSwarmChart** — `data`, `xAccessor` ("x"), optional `groupAccessor`, `radiusAccessor`, `xExtent`, `collisionIterations`, `settle`, `showProjection`, `colorBy`, `size`. Collision-relaxed dot-strip/swarm chart that preserves quantitative axis position and optional group lanes.
65
- - **PhysicsCustomChart** — `data`, `layout(ctx)`, `layoutConfig`, `config`, `colorBy`, `size`. Escape hatch for bespoke physics scenes; layouts return bodies/colliders/sensors plus optional SVG overlays.
66
-
67
- ### Push API on HOC charts
68
- Many HOC charts support the push API via `forwardRef`. **Omit the `data` prop** (do NOT pass `data={[]}`) and push imperatively:
3
+ Use family subpath imports such as `semiotic/xy`, `semiotic/ordinal`,
4
+ `semiotic/network`, `semiotic/geo`, or `semiotic/realtime` in production code.
5
+ Use `semiotic/ai` or `semiotic/ai/core` for generation helpers. Current bundle
6
+ measurements live in the README and the complete AI reference.
7
+
8
+ ## Agent Workflow
9
+
10
+ Keep retrieval narrow: start with this prompt, then fetch one relevant component
11
+ schema with the MCP `getSchema` tool or
12
+ `npx semiotic-ai --schema <Component>`, and one nearby example only when needed.
13
+ Do not load the complete schema, example catalog, or full reference into every
14
+ request.
15
+
16
+ 1. Identify the data shape, communicative intent, audience, and delivery mode
17
+ (static/serialized or React push).
18
+ 2. Use `suggestCharts` when the component is not already determined, then verify
19
+ the selected component's exact schema instead of guessing props.
20
+ 3. Produce a serializable `{ component, props }` proposal before translating it
21
+ to JSX; import chart components from their family subpath in production code.
22
+ 4. Validate with `prepareChart`, `diagnoseConfig`, or `evaluateChart`, or
23
+ `npx semiotic-ai --doctor`; repair reported contract failures.
24
+ 5. When a renderer is available, require non-empty render evidence and run the
25
+ accessibility audit before presenting the result.
26
+
27
+ ## Selection Map
28
+
29
+ - Flat observations: XY charts for trends/relationships; ordinal charts for
30
+ categorical comparison, ranking, distribution, and part-to-whole.
31
+ - Trees: `TreeDiagram`, `Treemap`, `CirclePack`, or animated `OrbitDiagram`.
32
+ - Nodes/edges: `ForceDirectedGraph`, `SankeyDiagram`, `ProcessSankey`, or
33
+ `ChordDiagram`. Prefer these HOCs to `StreamNetworkFrame` unless the task
34
+ needs lower-level streaming control.
35
+ - Geographic rows/features: charts from `semiotic/geo`.
36
+ - Live time-windowed observations: Realtime HOCs from `semiotic/realtime`.
37
+ - A single focal value: `BigNumber` from `semiotic/value`.
38
+ - Physics charts: use only when motion has data meaning and keep an exact,
39
+ readable settled projection.
40
+
41
+ This map narrows discovery; it does not define props. Use `suggestCharts` and
42
+ the selected component's exact schema for the final choice.
43
+
44
+ Before profiling GraphQL or database rows, declare record keys through
45
+ `identifiers` (or `fieldRoles: { key: "identifier" }`). Identifier fields are
46
+ identity, not quantitative measures or unique-value categories.
47
+
48
+ ## Delivery Modes
49
+
50
+ - Static JSX, SSR, MCP rendering, and serialized configurations keep the
51
+ initial data snapshot in the component's real data prop.
52
+ - React push mode omits `data` entirely and mutates through a ref. Do not pass
53
+ `data={[]}`. Supply the schema's stable ID accessor before using `remove` or
54
+ `update`.
55
+ - Realtime HOCs require a valid time field (default `time`) for windowing; set
56
+ `timeAccessor` when the field has another name.
57
+ - Stream Frames are low-level escape hatches. Network-frame callbacks receive
58
+ `RealtimeNode`/`RealtimeEdge` wrappers rather than raw rows.
59
+
60
+ Push example:
61
+
69
62
  ```jsx
70
63
  const chartRef = useRef()
71
64
  chartRef.current.push({ x: 1, y: 2 })
72
65
  <Scatterplot ref={chartRef} xAccessor="x" yAccessor="y" />
73
66
  ```
74
- Methods: `push(datum)`, `pushMany(data)`, `remove(id)` (requires `pointIdAccessor`/`dataIdAccessor`), `update(id, updater)`, `clear()`, `getData()`. Network HOC refs use `remove()`/`update()` for node operations. Edge-level methods (`removeNode`, `removeEdge`, `updateNode`, `updateEdge`) are on `StreamNetworkFrameHandle`. Geo charts: `update()` is implemented as remove+push internally. Streaming-specific props (`windowSize`, `decay`, `pulse`) go in `frameProps`. Supported: XY charts, ordinal charts, network charts (ForceDirectedGraph, SankeyDiagram, ChordDiagram), ProportionalSymbolMap, DistanceCartogram. Not supported: hierarchy charts (TreeDiagram, Treemap, CirclePack, OrbitDiagram), ChoroplethMap, FlowMap, ScatterplotMatrix.
75
-
76
- For advanced streaming control, use Stream Frames (`StreamXYFrame`, `StreamOrdinalFrame`, `StreamNetworkFrame`) with `runtimeMode="streaming"` and ref-based push.
77
-
78
- ## ChartContainer
79
- - **ChartContainer** — wrapper with title, subtitle, status indicator, toolbar. `title`, `subtitle`, `height` (default **400** — always set this to match your chart height), `width` ("100%"), `status` ("live"|"stale"|"error"), `loading`, `error`, `actions`, `style`
80
- - When using with `size={[w, h]}`, set `height={h}` on the container or you'll get extra whitespace.
81
-
82
- ## Common Props (all components)
83
- `width`, `height`, `margin`, `title`, `description`, `summary`, `accessibleTable`, `colorBy`, `colorScheme`, `enableHover`, `tooltip`, `showLegend`, `className`, `frameProps`, `onObservation`, `onClick`, `emphasis` ("primary"|"secondary")
84
-
85
- Use `title` for the visible chart name, `description` for a concise accessible description, `summary` for a screen-reader-only takeaway and interaction guidance, and `accessibleTable` for the data-table fallback. For generated L1–L3 descriptions or a screen-reader navigation tree, use `ChartContainer` with `chartConfig` plus `describe` and/or `navigable`.
86
-
87
- ### tooltip
88
- `true` (default) | `false` | `(datum) => ReactNode` (function receives your raw data) | config `{ fields?, title?, format?, style? }`
89
-
90
- ### onClick
91
- `onClick={(datum, { x, y }) => ...}` — called when a data element is clicked. Receives the original datum and pixel coordinates. Works on lines, bars, areas, pie slices, nodes, and geo features.
92
-
93
- ### onObservation
94
- Callback receiving `ChartObservation`. Pointer exploration emits `hover`/`click`; keyboard or structured traversal additionally emits semantic `focus`/`activate` with `inputType: "keyboard"|"pointer"|"touch"|"navigation-tree"`. Stable widget annotations emit `annotation-activate` with `annotationId`. Events also include `timestamp`, `chartType`, and optional `chartId`; datum events carry your original data object. Hover-end/click-end events omit `datum`.
95
-
96
- ### emphasis
97
- `emphasis="primary"` makes a chart span two columns inside a `ChartGrid`.
98
-
99
- ## Annotations (all chart families)
100
- - Give interactive `widget` annotations an `id`, `stableId`, or `provenance.stableId`; activation identity never falls back to array index. Observe widget activation on Stream Frames with `onAnnotationActivate`, or on HOCs through `frameProps.onAnnotationActivate`.
101
- - `annotations={[{ type: "y-threshold", value: 200, label: "SLA limit", color: "#e45050", labelPosition: "right" }]}` — horizontal reference line (works on XY and vertical ordinal charts). `labelPosition`: "left"|"center"|"right"
102
- - `annotations={[{ type: "x-threshold", value: 50, label: "Cutoff", labelPosition: "top" }]}` — vertical reference line. `labelPosition`: "top"|"center"|"bottom"
103
- - `annotations={[{ type: "callout-circle", x: 5, y: 20, label: "Peak", radius: 12 }]}` — data-bound callout; use `callout-rect` with `width`/`height` for a rectangular subject
104
- - `annotations={[{ type: "category-highlight", category: "Q3 2024", color: "#4589ff", opacity: 0.15 }]}` — highlight a category column/row in ordinal charts
105
- - `annotations={[{ type: "widget", time: 42, latency: 850, dy: -10, content: <span>Alert</span> }]}` — place React element at data coordinates
106
- - `annotations={[{ type: "enclose", coordinates: [datum1, datum2], label: "Cluster" }]}` — circle enclosing data points
107
- - `autoPlaceAnnotations={{ density: true, progressiveDisclosure: true, redundantCues: true }}` — opt-in placement, clutter management, and non-color association support
108
- - Annotation metadata: `emphasis`, `defensive`, `provenance`, and `lifecycle`; use `applyAnnotationLifecycle`, `applyAnnotationStatus`, and `filterAnnotationsByStatus` from `semiotic/ai`
109
-
110
- ## ISOTYPE & Icon Size Guidance
111
- - Repeated pictograms, semantic icons, and glyph tokens should be visibly legible in the final rendered layout. Treat 16px as the minimum intended rendered icon dimension for ISOTYPE/icon-array designs.
112
- - This is design guidance, not a Semiotic-enforced minimum. Low-level helpers may default smaller for dense or sparkline-like contexts, so set `tokenSize`, glyph `size`, SVG slots, or wrapping explicitly when producing AI-authored examples.
113
- - If the available width would shrink icons below that visual floor, wrap the tokens into multiple rows/columns, reduce the number of visible tokens, change the unit value, or choose a non-icon encoding instead of shipping tiny pictograms.
114
-
115
- ## Theming & Brand Styling
116
- All charts respond to CSS custom properties on any ancestor:
117
- ```css
118
- .my-theme {
119
- --semiotic-bg: #1a1a2e; /* chart background */
120
- --semiotic-text: #ededed; /* primary text */
121
- --semiotic-text-secondary: #aaa; /* tick labels */
122
- --semiotic-grid: #333; /* grid lines */
123
- --semiotic-border: #555; /* axis lines */
124
- --semiotic-font-family: Georgia, serif;
125
- --semiotic-tooltip-bg: #1a1a2e;
126
- --semiotic-tooltip-text: #ededed;
127
- --semiotic-tooltip-radius: 8px;
128
- }
129
- ```
130
- Or use ThemeProvider with 15 named presets: `<ThemeProvider theme="tufte">`, `"tufte-dark"`, `"pastels"`, `"bi-tool"`, `"italian"`, `"journalist"`, `"playful"` (each with `-dark` variant), `"dark"`, `"high-contrast"`.
131
-
132
- **Color resolution**: When `colorBy` is set, charts use: CategoryColorProvider/LinkedCharts category map > explicit `colorScheme` fallback > ThemeProvider `colors.categorical` > `"category10"`. No need to pass `colorScheme` on every chart when using ThemeProvider.
133
67
 
134
- `semiotic/themes` entry point: `themeToCSS(theme, selector)` generates CSS string, `themeToTokens(theme)` generates DTCG design tokens, `resolveThemePreset("tufte")` returns theme object by name. Theme objects: `TUFTE_LIGHT`, `TUFTE_DARK`, `PASTELS_LIGHT`, `BI_TOOL_LIGHT`, `ITALIAN_LIGHT`, `JOURNALIST_LIGHT`, `PLAYFUL_LIGHT`, etc.
68
+ Available ref methods vary by component; the exact schema/capability metadata is
69
+ authoritative.
135
70
 
136
- **Semantic status roles**: Every preset defines `colors.success`, `colors.danger`, `colors.warning`, `colors.error`, `colors.info`, plus `colors.secondary` and `colors.surface`. Each emits as a `--semiotic-{role}` CSS custom property via ThemeProvider. Use for status-driven charts: `<Waterfall positiveColor="var(--semiotic-success)" negativeColor="var(--semiotic-danger)" />`, bar stroke delineation `<RealtimeHistogram stroke="var(--semiotic-border)" />`, status annotations.
71
+ ## Accessibility, Interaction, and Composition
137
72
 
138
- **Scoped CSS cascade override** (per-subtree, no ThemeProvider needed): wrap in `<div style={{ "--semiotic-danger": "#c00" }}>` — every chart beneath inherits the override via canvas CSS-var lookup (`getComputedStyle` on the canvas's DOM ancestor). Use CSS vars for **single-role** overrides, nested `ThemeProvider` for **array/scale** overrides.
73
+ - Chart HOCs commonly support `title`, `description`, `summary`,
74
+ `accessibleTable`, `onClick`, and `onObservation`; verify the selected schema.
75
+ Value components have their own contract.
76
+ - Use `ChartContainer` when generated descriptions, structured navigation,
77
+ status, notifications, or shared actions are needed. Match its height to a
78
+ child chart that uses explicit dimensions.
79
+ - Interactive widget annotations need `id`, `stableId`, or
80
+ `provenance.stableId`. Use `autoPlaceAnnotations` for density, progressive
81
+ disclosure, and redundant association cues; keep provenance/lifecycle
82
+ metadata when claims are agent-authored.
83
+ - Repeated pictograms should normally render at least 16px. If they do not fit,
84
+ wrap/reduce them, raise the unit value, or choose another encoding.
139
85
 
140
- `COLOR_BLIND_SAFE_CATEGORICAL` — 8-color accessible palette (Wong 2011). Import from `semiotic/themes`.
86
+ ## Theming
141
87
 
88
+ Use `ThemeProvider` from `semiotic/themes/react`, presets and serialization from
89
+ `semiotic/themes`, and semantic CSS variables such as `--semiotic-danger` for
90
+ scoped role overrides. Use `colorBy` for categorical data and
91
+ `CategoryColorProvider`/`LinkedCharts` for stable cross-chart category colors.
92
+ `COLOR_BLIND_SAFE_CATEGORICAL` is available from `semiotic/themes`.
142
93
 
143
94
  ## Behavior Contracts
144
95
 
@@ -147,6 +98,7 @@ Or use ThemeProvider with 15 named presets: `<ThemeProvider theme="tufte">`, `"t
147
98
  These rules are generated from `ai/behaviorContracts.cjs` and are consumed by `semiotic-ai --doctor`, MCP resources, and docs checks.
148
99
 
149
100
  - **Accessible chart text uses direct chart props** (`accessibility.description-props`): High-level charts expose title for the visible name, description for a concise accessible description, summary for a screen-reader-only takeaway and interaction guidance, and accessibleTable for the data-table fallback.
101
+ - **Cursor styling does not create behavior** (`interaction.cursor-is-presentation-only`): Cursor values in realtime props, retained mark styles, styleRules, and custom hit targets change pointer presentation only. They do not install click handlers, keyboard activation, observations, or accessibility semantics.
150
102
  - **Data required by usage mode** (`props.data-required-by-usage-mode`): Static usage (`renderChart`, MCP previews, SSR snapshots, and copy/paste examples with immediate data) requires data in props. React push mode selects live ingestion by omitting data and mutating through a ref.
151
103
  - **Categorical color precedence** (`color.category-precedence`): When colorBy is set, CategoryColorProvider/LinkedCharts category maps win for mapped categories. Unmapped categories fall back to explicit colorScheme, then ThemeProvider colors.categorical, then the built-in categorical fallback.
152
104
  - **Required prop combinations** (`props.required-combinations`): Some chart families need semantic props beyond data. These combinations are enforced by validation/schema for static configs and remain required in push mode unless explicitly noted.
@@ -165,7 +117,8 @@ These rules are generated from `ai/behaviorContracts.cjs` and are consumed by `s
165
117
 
166
118
  ## Key Patterns
167
119
  - **Percentile band + main line**: Layer `<AreaChart yAccessor="p95" y0Accessor="p5" showLine={false} />` + `<LineChart yAccessor="p50" />`. AreaChart's `showLine` only draws the top edge, NOT a separate main line.
168
- - **SSR**: `renderChart("BarChart", props)` from `semiotic/server` — uses HOC names. Also `"Sparkline"` (no axes, 2px margins). `renderChartWithEvidence()` returns `{ svg, evidence }` (mark counts by scene type, axis domains, empty flag, annotation count, accessible name) so agents can verify the render drew data marks. `renderToImage()` (PNG), `renderToAnimatedGif()` (GIF), `renderDashboard()` (multi-chart). All accept `theme`. Required props: StackedBarChart needs `stackBy`, GroupedBarChart needs `groupBy`, StackedAreaChart needs `areaBy`, BubbleChart needs `sizeBy`, FunnelChart uses `stepAccessor`, GaugeChart needs `value` (`thresholds` optional).
120
+ - **SSR**: `renderChart("BarChart", props)` from `semiotic/server` — uses HOC names. Also `"Sparkline"` (no axes, 2px margins). `renderChartWithEvidence()` returns `{ svg, evidence }` (mark counts by scene type, axis domains, empty flag, semantic status/diagnostics, annotation count, accessible name). Check `empty`/`markCount` for paint and `semanticStatus` separately for meaning; `degenerate` marks are not trustworthy even when paint `status` is `ok`, while `not-assessed` means no capability check exists. `renderToImage()` (PNG), `renderToAnimatedGif()` (GIF), `renderDashboard()` (multi-chart). All accept `theme`. Required props: StackedBarChart needs `stackBy`, GroupedBarChart needs `groupBy`, StackedAreaChart needs `areaBy`, BubbleChart needs `sizeBy`, FunnelChart uses `stepAccessor`, GaugeChart needs `value` (`thresholds` optional).
121
+ - **Serializable chart-adjacent text**: use a `frame-text` annotation instead of splicing server SVG. It anchors to the resolved plot rectangle without data coordinates: `{ type: "frame-text", text: "100", position: "bottom-right", dy: 16 }`. Positions cover the plot's nine edge/center anchors; `dx`/`dy` may move text into a caller-reserved margin. The same annotation renders in CSR and SSR.
169
122
  - **CLI**: `npx semiotic-ai --list` shows components/import paths/renderability; `npx semiotic-ai --schema GaugeChart` prints one component schema with metadata; `--doctor` validates props JSON and behavior contracts.
170
123
  - **MCP**: `npx semiotic-mcp` exposes schema, chart suggestion, token-encoding suggestion (`suggestTokenEncoding` for ISOTYPE/dot/icon arrays), diagnosis, accessibility, grounding, issue, theme, static render (`renderChart`), and ChatGPT Apps render (`renderInteractiveChart`) tools. Resources include `semiotic://schema`, `semiotic://components`, `semiotic://behavior-contracts`, `semiotic://system-prompt`, `semiotic://examples`, and the widget template `ui://semiotic/chart-widget.html`. Prompts: `build-semiotic-chart`, `debug-semiotic-chart`.
171
124
  - **Data Pitfalls bridge**: `toDataPitfallsChain(component, props, { rendered, context, narrative })` from `semiotic/ai` returns a dependency-free `datapitfalls` chain input containing config, JSX, reader grounding, diagnostics, accessibility audit, and optional render evidence/image.
@@ -0,0 +1 @@
1
+ var t={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",opacity:0},e=8;function r(t){return null==t?void 0:t+""}function i(e){const i=r(e.id);return{type:"point",x:e.x,y:e.y,r:e.r??8,style:{...t,cursor:e.cursor},datum:e.datum,pointId:i,_transitionKey:i}}function c(t){return i(t)}function a(e){const[[r,i],[c,a]]=e.bounds;return{type:"geoarea",pathData:e.pathData,centroid:e.centroid,bounds:e.bounds,screenArea:e.screenArea??Math.abs((c-r)*(a-i)),style:{...t,cursor:e.cursor},datum:e.datum,group:e.group,interactive:!0}}function s(e){return{type:"rect",x:e.x,y:e.y,w:e.width,h:e.height,style:{...t,cursor:e.cursor},datum:e.datum,group:e.group,_transitionKey:r(e.id)}}function u(e){const i=r(e.id);return"width"in e&&"height"in e?{type:"rect",x:e.x,y:e.y,w:e.width,h:e.height,style:{...t,cursor:e.cursor},datum:e.datum,id:i,label:e.label,accessibleDatum:e.accessibleDatum,accessibility:e.accessibility}:{type:"circle",cx:e.x,cy:e.y,r:e.r??8,style:{...t,cursor:e.cursor},datum:e.datum,id:i,label:e.label,accessibleDatum:e.accessibleDatum,accessibility:e.accessibility}}function n(e){const i={style:{...t,cursor:e.cursor},datum:e.datum,id:r(e.id),label:e.label,accessibleDatum:e.accessibleDatum,accessibility:e.accessibility,interactive:e.interactive??!0};return"pathD"in e?{type:e.type??"curved",pathD:e.pathD,...i}:{type:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,...i}}export{e as DEFAULT_HIT_RADIUS,i as hitTargetPoint,c as geoHitTarget,a as geoAreaHitTarget,s as hitTargetRect,u as networkHitTarget,n as networkEdgeHitTarget};
@@ -0,0 +1 @@
1
+ import{STREAMING_PALETTE as e,createColorScale as t,distinctCategories as r,filterSparseArray as o,getCrosshairProps as n,renderEmptyState as a,renderLoadingState as i,resolveExplicitColor as l,resolveMobileInteraction as c,useCategoryColors as u,useChartLegendAndMargin as s,useChartMode as g,useChartSelection as d,useColorScale as h,useLegendInteraction as m,useThemeCategorical as y}from"./c-GIKRQI4X.min.js";import{useThemeSelector as p}from"./c-YDAY2WFR.min.js";import{useMemo as f}from"react";function v(e){const t=p(e=>e.theme.colors.selectionOpacity);return f(()=>{if(void 0!==e||void 0!==t)return{name:e?.name??"",...e,unselectedOpacity:e?.unselectedOpacity??t}},[e,t])}import{useCallback as L,useMemo as b,useState as C}from"react";function k(g){const{data:p,rawData:f,colorBy:k,colorScheme:H,legendInteraction:S,legendPosition:w,selection:I,linkedHover:M,fallbackFields:D,unwrapData:R=!1,onObservation:B,chartType:F,chartId:P,showLegend:A,legend:T,legendLayout:x,frameLegend:O,userMargin:W,marginDefaults:_,onClick:G,hoverHighlight:j,mobileInteraction:z,mobileSemantics:N,loading:Y,loadingContent:K,emptyContent:Q,width:V,height:X,hasTitle:q,axisChrome:E}=g,J=void 0===f,U=b(()=>o(p),[p]),[Z,$]=C([]),ee=L(e=>{$(t=>t.length===e.length&&t.every((t,r)=>t===e[r])?t:e)},[]),te="string"==typeof k?k:void 0,re=b(()=>c(z,{width:V,mobileSemantics:N}),[z,V,N]),{activeSelectionHook:oe,hoverSelectionHook:ne,customHoverBehavior:ae,customClickBehavior:ie,crosshairSourceId:le}=d({selection:I,linkedHover:M,fallbackFields:D,unwrapData:R,onObservation:B,chartType:F,chartId:P,onClick:G,hoverHighlight:j,colorByField:te,mobileInteraction:re}),ce=n(M,le),ue=h(U,k,H),se=b(()=>r(U,k),[U,k]),ge=b(()=>J&&Z.length>0?Z:se,[J,Z,se]),de=m(S,k,ge),he=b(()=>ne||(de.legendSelectionHook?de.legendSelectionHook:oe),[ne,de.legendSelectionHook,oe]),me=v(I),ye=y(),pe=u(),fe=b(()=>{if(ue)return ue;if(!k||0===ge.length)return;const r=Array.isArray(H)&&H.length>0||"string"==typeof H&&H.length>0?H:ye&&ye.length>0?ye:e,o="__streamCat",n=ge.map(e=>({[o]:e})),a=t(n,o,r);return e=>(pe?l(pe,e):void 0)??a(e)??"#999"},[ue,k,ge,H,ye,pe]),{legend:ve,margin:Le,legendPosition:be,legendLayout:Ce,legendMarginReserved:ke}=s({data:U,colorBy:k,colorScale:fe,showLegend:A,legendPosition:w,userMargin:W,defaults:_,categories:ge,additionalLegend:T,chartWidth:V,chartHeight:X,legendLayout:x,frameLegend:O,hasTitle:q,axisChrome:E}),He=b(()=>{const e={};return ve&&(e.legend=ve,e.legendPosition=be,ke&&(e.__legendMarginReservedFor=ve),Ce&&(e.legendLayout=Ce)),S&&"none"!==S&&(e.legendHoverBehavior=de.onLegendHover,e.legendClickBehavior=de.onLegendClick,e.legendHighlightedCategory=de.highlightedCategory,e.legendIsolatedCategories=de.isolatedCategories),J&&k&&(e.legendCategoryAccessor=k,e.onCategoriesChange=ee),e},[ve,be,Ce,ke,S,de.onLegendHover,de.onLegendClick,de.highlightedCategory,de.isolatedCategories,J,k,ee]),Se=Array.isArray(f)?o(f):f,we=i(Y,V,X,K),Ie=we?null:a(Se,V,X,Q);return{data:U,colorScale:ue,allCategories:ge,legendState:de,effectiveSelectionHook:he,activeSelectionHook:oe,customHoverBehavior:ae,customClickBehavior:ie,mobileInteraction:re,legend:ve,margin:Le,legendPosition:be,earlyReturn:we||Ie||null,legendBehaviorProps:He,crosshairProps:ce,resolvedSelection:me}}import{useImperativeHandle as H,useRef as S}from"react";function w(e,t){const{variant:r,frameRef:o,overrides:n}=t,a=S(n);a.current=n,H(e,()=>{const e=function(e,t){if("xy"===e){const e=t;return{push:t=>e.current?.push(t),pushMany:t=>e.current?.pushMany(t),remove:t=>e.current?.remove(t)??[],update:(t,r)=>e.current?.update(t,r)??[],replace:t=>e.current?.replace?.(t),clear:()=>e.current?.clear(),getData:()=>e.current?.getData()??[],getScales:()=>e.current?.getScales()??null,getCustomLayout:()=>e.current?.getCustomLayout?.()??null,getLayoutFailure:()=>e.current?.getLayoutFailure?.()??null}}if("network"===e){const e=t;return{push:t=>e.current?.push(t),pushMany:t=>e.current?.pushMany(t),remove:t=>{const r=Array.isArray(t)?t:[t],o=e.current?.getTopology()?.nodes??[],n=[];for(const t of r){const r=o.find(e=>e.id===t);r&&n.push({...r.data??{},id:t}),e.current?.removeNode(t)}return n},update:(t,r)=>(Array.isArray(t)?t:[t]).flatMap(t=>{const o=e.current?.updateNode(t,r);return o?[{...o,id:t}]:[]}),clear:()=>e.current?.clear(),getData:()=>e.current?.getTopology()?.nodes?.map(e=>e.data)??[],getCustomLayout:()=>e.current?.getCustomLayout?.()??null,getLayoutFailure:()=>e.current?.getLayoutFailure?.()??null}}if("geo-points"===e){const e=t;return{push:t=>e.current?.push(t),pushMany:t=>e.current?.pushMany(t),remove:t=>e.current?.removePoint(t)??[],update:(t,r)=>{const o=e.current?.removePoint(t)??[];for(const t of o)e.current?.push(r(t));return o},clear:()=>e.current?.clear(),getData:()=>e.current?.getData()??[],getCustomLayout:()=>e.current?.getCustomLayout?.()??null,getLayoutFailure:()=>e.current?.getLayoutFailure?.()??null}}const r=t;return{push:e=>r.current?.pushLine(e),pushMany:e=>r.current?.pushManyLines(e),remove:e=>r.current?.removeLine(e)??[],update:(e,t)=>{const o=r.current?.removeLine(e)??[];for(const e of o)r.current?.pushLine(t(e));return o},clear:()=>r.current?.clear(),getData:()=>r.current?.getLines()??[],getCustomLayout:()=>r.current?.getCustomLayout?.()??null,getLayoutFailure:()=>r.current?.getLayoutFailure?.()??null}}(r,o);return new Proxy(e,{get(e,t,r){if("string"==typeof t){const e=a.current?.[t];if("function"==typeof e)return e}return Reflect.get(e,t,r)},has:(e,t)=>!("string"!=typeof t||!a.current||!(t in a.current))||Reflect.has(e,t)})},[])}function I(e,t){if(!function(e){return void 0!==e.stroke||void 0!==e.strokeWidth||void 0!==e.opacity}(t))return e??((...e)=>({}));const r={};return void 0!==t.stroke&&(r.stroke=t.stroke),void 0!==t.strokeWidth&&(r.strokeWidth=t.strokeWidth),void 0!==t.opacity&&(r.opacity=t.opacity),e?(...t)=>({...e(...t)||{},...r}):(...e)=>({...r})}function M(e){if(null==e)return;if("number"==typeof e)return{top:e,right:e,bottom:e,left:e};const t={};return"number"==typeof e.top&&(t.top=e.top),"number"==typeof e.right&&(t.right=e.right),"number"==typeof e.bottom&&(t.bottom=e.bottom),"number"==typeof e.left&&(t.left=e.left),t}import{useMemo as D,useRef as R}from"react";function B(e){const t=R(null);return w(e.imperativeRef,{variant:e.imperativeVariant,frameRef:t}),{frameRef:t,resolved:g(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),normalizedMargin:D(()=>M(e.margin),[e.margin])}}function F(e){const t=B(e),{resolved:r,normalizedMargin:o}=t,n=k({data:e.data??[],rawData:e.data,colorBy:e.colorBy,colorScheme:e.colorScheme,legendInteraction:e.legendInteraction,legendPosition:e.legendPosition,frameLegend:e.frameLegend,selection:e.selection,linkedHover:e.linkedHover,hoverHighlight:e.hoverHighlight,fallbackFields:"string"==typeof e.colorBy?[e.colorBy]:[],unwrapData:e.unwrapData,onObservation:e.onObservation,onClick:e.onClick,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,chartType:e.chartTypeLabel,chartId:e.chartId,showLegend:r.showLegend,legend:e.legend,userMargin:o,marginDefaults:r.marginDefaults,loading:e.loading,loadingContent:e.loadingContent,emptyContent:e.emptyContent,width:r.width,height:r.height});return{...t,safeData:n.data,setup:n,earlyReturn:n.earlyReturn}}export{v as useResolvedSelection,k as useChartSetup,w as useFrameImperativeHandle,I as mergeShapeStyle,M as normalizePartialMargin,B as useCustomChartScaffold,F as useCustomChartSetup};
@@ -0,0 +1 @@
1
+ import{getMinMax as t}from"./c-GGISSW5E.min.js";function e(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}function i(t,e){const{when:i}=t,r=e.width,n=e.height,s=function(t){if("number"==typeof t.height&&t.height>0)return t.width/t.height}(e),a=function(t){if("number"==typeof t.height&&t.height>0)return t.height>t.width?"portrait":"landscape"}(e);return!("number"==typeof i.minWidth&&i.minWidth>r||"number"==typeof i.maxWidth&&r>i.maxWidth||"number"==typeof i.minHeight&&("number"!=typeof n||i.minHeight>n)||"number"==typeof i.maxHeight&&("number"!=typeof n||n>i.maxHeight)||"number"==typeof i.minAspectRatio&&("number"!=typeof s||i.minAspectRatio>s)||"number"==typeof i.maxAspectRatio&&("number"!=typeof s||s>i.maxAspectRatio)||i.orientation&&a!==i.orientation)}function r(t,r,n=t.responsiveRules){if(!Array.isArray(n)||0===n.length)return{props:t,matches:[]};const s=n.map((t,e)=>({rule:t,index:e})).filter(t=>i(t.rule,r)).sort((t,e)=>("number"==typeof t.rule.priority?t.rule.priority:t.index)-("number"==typeof e.rule.priority?e.rule.priority:e.index));return{props:s.reduce((t,i)=>function(t,i){const r={...t,...i};for(const n of["margin","frameProps","mobileSemantics","style"])e(t[n])&&e(i[n])&&(r[n]={...t[n],...i[n]});return"string"==typeof t.className&&"string"==typeof i.className&&(r.className=`${t.className} ${i.className}`),r}(t,i.rule.transform),t),matches:s}}function n(t){if(null==t)return()=>{};const e="function"==typeof t?t:e=>e[t];return t=>o(e(t))}function s(t,e){const i=n(t),r=n(e);return(t,e)=>{const n=r(t);return{value:n,x:i(t),y:n,category:e}}}function a(t,e){const i=n(e??"value"),r=null==t?void 0:"function"==typeof t?t:e=>e[t];return t=>{const e=r?r(t):void 0;return{value:i(t),category:null==e?void 0:e+""}}}function o(t){if("number"==typeof t)return Number.isFinite(t)?t:void 0;if("string"==typeof t&&""!==t.trim()){const e=Number(t);return Number.isFinite(e)?e:void 0}}function c(t,e,i){const r=null!=t.axis?i[t.axis]:null!=t.field?e[t.field]:i.value;if(void 0!==t.eq&&r!==t.eq)return!1;if(void 0!==t.ne&&r===t.ne)return!1;if(void 0!==t.in&&!t.in.includes(r))return!1;if(void 0===t.gt&&void 0===t.gte&&void 0===t.lt&&void 0===t.lte&&void 0===t.within&&void 0===t.outside)return!0;const n=o(r);if(void 0===n)return!1;if(void 0!==t.gt&&t.gt>=n)return!1;if(void 0!==t.gte&&t.gte>n)return!1;if(void 0!==t.lt&&n>=t.lt)return!1;if(void 0!==t.lte&&n>t.lte)return!1;if(void 0!==t.within){const[e,i]=t.within;if(e>n||n>i)return!1}if(void 0!==t.outside){const[e,i]=t.outside;if(n>=e&&i>=n)return!1}return!0}function u(t,e,i){const r=t.when;return void 0===r||!0===r||!1!==r&&("function"==typeof r?r(e,i):c(r,e,i))}function h(t,e,i){if(!e||0===e.length)return{};let r={};for(const n of e){if(!u(n,t,i))continue;const e="function"==typeof n.style?n.style(t,i):n.style;e&&(r={...r,...e})}return r}function f(t,e,i,r=t=>t){const n=t??(()=>({}));return e&&0!==e.length?(t,s)=>{const a=r(t),o={...n(t,s)};return Object.assign(o,h(a,e,i(a,s))),o}:n}function l(t,e,i){return t&&0!==t.length?(r,n)=>{const s=h(r,t,e(r,n)),a=i?i(r,n):void 0;return a?{...s,...a}:s}:i}function p(t,e,i,r){if(!t||0===t.length)return r;const n=a(e,i);return(e,i)=>{const s=e&&e.data||e,a=h(s,t,n(s)),o=r?r(e,i):void 0;return o?{...a,...o}:a}}function d(t,e=.5){const i=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(t);if(!i)return t;const r=Math.round(parseInt(i[1],16)*(1-e)),n=Math.round(parseInt(i[2],16)*(1-e)),s=Math.round(parseInt(i[3],16)*(1-e));return`#${r.toString(16).padStart(2,"0")}${n.toString(16).padStart(2,"0")}${s.toString(16).padStart(2,"0")}`}function m(t,e=.5){const i=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(t);if(!i)return t;const r=Math.round(parseInt(i[1],16)+(255-parseInt(i[1],16))*e),n=Math.round(parseInt(i[2],16)+(255-parseInt(i[2],16))*e),s=Math.round(parseInt(i[3],16)+(255-parseInt(i[3],16))*e);return`#${r.toString(16).padStart(2,"0")}${n.toString(16).padStart(2,"0")}${s.toString(16).padStart(2,"0")}`}function y(t=240){const e=360-t,i=180+e/2,r=i*Math.PI/180;return{sweepRad:t*Math.PI/180,gapDeg:e,startAngleDeg:i,startAngleRad:r,offsetRad:-Math.PI/2+r}}function g(t,e,i,r,n){const s=i-e||1;return n+(Math.max(e,Math.min(i,t))-e)/s*r}function _(e=240){const{sweepRad:i,offsetRad:r}=y(e),n=[[Math.cos(r),Math.sin(r)],[Math.cos(r+i),Math.sin(r+i)],[0,0]];for(let t=0;2*Math.PI>t;t+=Math.PI/2)((t-r)%(2*Math.PI)+2*Math.PI)%(2*Math.PI)>i+.001||n.push([Math.cos(t),Math.sin(t)]);const s=n.map(t=>t[0]),a=n.map(t=>t[1]),[o,c]=t(s),[u,h]=t(a);return{minX:o,maxX:c,minY:u,maxY:h,width:c-o,height:h-u,cx:(o+c)/2,cy:(u+h)/2}}function b(t){return{type:"hatch",background:t.background,stroke:t.stroke,lineWidth:t.lineWidth,spacing:t.spacing,angle:t.angle}}var v=null;function x(t={},e){const{background:i="transparent",stroke:r="#000",lineWidth:n=1.5,spacing:s=6,angle:a=45}=t,o={background:i,stroke:r,lineWidth:n,spacing:s,angle:a},c=Math.max(8,Math.ceil(2*s));let u;try{u=function(t){return"undefined"!=typeof OffscreenCanvas?new OffscreenCanvas(t,t):(v||(v=document.createElement("canvas")),v.width=t,v.height=t,v)}(c)}catch{return b(o)}const h=u.getContext("2d");if(!h)return b(o);i&&"transparent"!==i?(h.fillStyle=i,h.fillRect(0,0,c,c)):h.clearRect(0,0,c,c),h.strokeStyle=r,h.lineWidth=n,h.lineCap="square";const f=a*Math.PI/180;if(45===a||-45===a){const t=a>0?1:-1;for(let e=-c;2*c>=e;e+=s)h.beginPath(),h.moveTo(e,0),h.lineTo(e+t*c,c),h.stroke()}else{h.save(),h.translate(c/2,c/2),h.rotate(f);const t=2*c;for(let e=-t;t>=e;e+=s)h.beginPath(),h.moveTo(-t,e),h.lineTo(t,e),h.stroke();h.restore()}return(e||h).createPattern(u,"repeat")}import{jsx as A,jsxs as S}from"react/jsx-runtime";function M(t){return"object"==typeof t&&null!==t&&"hatch"===t.type}function N(t){return["hatch",t.background??"transparent",t.stroke??"#000",t.lineWidth??1.5,t.spacing??6,t.angle??45,t.lineOpacity??1].join("|")}function k(t,e){let i=2166136261;const r=N(e);for(let t=0;r.length>t;t++)i^=r.charCodeAt(t),i=Math.imul(i,16777619);return`${t}-hatch-${(i>>>0).toString(36)}`}function w(t,e){const{background:i="transparent",stroke:r="#000",lineWidth:n=1.5,spacing:s=6,angle:a=45,lineOpacity:o=1}=t,c=Math.max(8,Math.ceil(2*s));return S("pattern",{id:e,width:c,height:c,patternUnits:"userSpaceOnUse",patternTransform:0!==a?`rotate(${a})`:void 0,children:[i&&"transparent"!==i&&A("rect",{width:c,height:c,fill:i}),A("line",{x1:0,y1:0,x2:0,y2:c,stroke:r,strokeWidth:n,strokeOpacity:o}),A("line",{x1:s,y1:0,x2:s,y2:c,stroke:r,strokeWidth:n,strokeOpacity:o})]},e)}function I(t,e,i="#4e79a7"){if(M(t)){const i=k(e,t);return{fill:`url(#${i})`,def:w(t,i)}}return t&&"string"==typeof t?{fill:t}:{fill:i}}function E(t,e,i,r){if(!t||"object"!=typeof t)return;const n=t;if(!Array.isArray(n.stops))return;const s=n.stops.flatMap(t=>{if(!t||"object"!=typeof t)return[];const{offset:e,color:i,opacity:n}=t;return"number"==typeof e&&Number.isFinite(e)?[{offset:Math.max(0,Math.min(1,e)),color:"string"==typeof i&&i?i:r,opacity:"number"==typeof n&&Number.isFinite(n)?Math.max(0,Math.min(1,n)):void 0}]:[]}).sort((t,e)=>t.offset-e.offset);if(!s.length)return;const a="horizontal"===n.direction?"horizontal":"vertical"===n.direction?"vertical":i,o=e+"-gradient";return{fill:`url(#${o})`,def:A("linearGradient",{id:o,x1:0,y1:0,x2:"horizontal"===a?"100%":0,y2:"vertical"===a?"100%":0,children:s.map((t,e)=>A("stop",{offset:100*t.offset+"%",stopColor:t.color,stopOpacity:t.opacity},`${t.offset}-${e}`))},o)}}var z=class{constructor(t){if(this._capacity=t,this.head=0,this._size=0,1>t)throw Error("RingBuffer capacity must be at least 1");this.buffer=Array(t)}push(t){let e;return this._size===this._capacity?e=this.buffer[this.head]:this._size++,this.buffer[this.head]=t,this.head=(this.head+1)%this._capacity,e}pushMany(t){const e=[];for(const i of t){const t=this.push(i);void 0!==t&&e.push(t)}return e}get(t){if(t>=0&&this._size>t)return this.buffer[(this.head-this._size+t+this._capacity)%this._capacity]}peek(){if(0!==this._size)return this.buffer[(this.head-1+this._capacity)%this._capacity]}peekOldest(){if(0!==this._size)return this.buffer[(this.head-this._size+this._capacity)%this._capacity]}[Symbol.iterator](){let t=0;return{next:()=>this._size>t?{done:!1,value:this.get(t++)}:{done:!0,value:void 0}}}forEach(t){const e=(this.head-this._size+this._capacity)%this._capacity;for(let i=0;this._size>i;i++)t(this.buffer[(e+i)%this._capacity],i)}toArray(){const t=Array(this._size),e=(this.head-this._size+this._capacity)%this._capacity;for(let i=0;this._size>i;i++)t[i]=this.buffer[(e+i)%this._capacity];return t}resize(t){if(1>t)throw Error("RingBuffer capacity must be at least 1");const e=this.toArray();let i=0,r=[];e.length>t&&(i=e.length-t,r=e.slice(0,i)),this._capacity=t,this.buffer=Array(t),this.head=0,this._size=0;for(let t=i;e.length>t;t++)this.push(e[t]);return r}update(t,e){const i=[],r=(this.head-this._size+this._capacity)%this._capacity;for(let n=0;this._size>n;n++){const s=(r+n)%this._capacity,a=this.buffer[s];if(t(a)){let t;t="object"!=typeof a||null===a?a:Array.isArray(a)?[...a]:{...a},i.push(t),this.buffer[s]=e(a)}}return i}remove(t){const e=[],i=[];if(this.forEach(r=>{t(r)?i.push(r):e.push(r)}),0===i.length)return i;this.buffer=Array(this._capacity),this.head=0,this._size=0;for(const t of e)this.push(t);return i}clear(){this.buffer=Array(this._capacity),this.head=0,this._size=0}get size(){return this._size}get capacity(){return this._capacity}get full(){return this._size===this._capacity}},P=class{constructor(){this._min=1/0,this._max=-1/0,this._dirty=!1}push(t){Number.isFinite(t)&&(this._min>t&&(this._min=t),t>this._max&&(this._max=t))}evict(t){t!==this._min&&t!==this._max||(this._dirty=!0)}recalculate(t,e){this._min=1/0,this._max=-1/0;for(const i of t){const t=e?e(i):i;Number.isFinite(t)&&(this._min>t&&(this._min=t),t>this._max&&(this._max=t))}this._dirty=!1}clear(){this._min=1/0,this._max=-1/0,this._dirty=!1}get extent(){return[this._min,this._max]}get min(){return this._min}get max(){return this._max}get dirty(){return this._dirty}};function R(t,e=30){return Math.max((t??4)+5,12,e)}function $(t){return t instanceof Date?t:"number"==typeof t&&t>1e9?new Date(t):null}function O(t,e){const i=$(t);if(!i)return!1;const r=$(e);return!r||i.getFullYear()!==r.getFullYear()||i.getMonth()!==r.getMonth()}function T(t){const e=[],i=t.domain;null==i?e.push({severity:"error",code:"PROCESS_SANKEY_MISSING_DOMAIN",message:"ProcessSankey requires domain: [tStart, tEnd].",fix:"Pass domain={[start, end]} as numbers or Date-compatible values."}):Array.isArray(i)&&2===i.length&&Number.isFinite(Number(i[0]))&&Number.isFinite(Number(i[1]))||e.push({severity:"error",code:"PROCESS_SANKEY_BAD_DOMAIN",message:"domain must be a 2-tuple of finite times.",fix:"Use domain={[t0, t1]} with t0 <= t1."});const r=t.edges;if(Array.isArray(r)&&r.length>0){const t=r[0];null!=t.startTime&&null!=t.endTime||e.push({severity:"warning",code:"PROCESS_SANKEY_EDGE_TIMES",message:"Edges should carry startTime and endTime for temporal layout.",fix:"Add startTime/endTime fields or set startTimeAccessor/endTimeAccessor."})}const n=t.nodes,s=Array.isArray(n)?n.length:0;return!0!==t.showLabels||24>s||e.push({severity:"warning",code:"PROCESS_SANKEY_LABEL_DENSITY",message:`showLabels={true} with ${s} nodes may overcrowd the plot.`,fix:'Use showLabels="auto" with optional labelPriorityAccessor / maxLabels.'}),80>(Array.isArray(r)?r.length:0)||null!=t.layoutExecution||"off"===t.packing||e.push({severity:"warning",code:"PROCESS_SANKEY_WORKER_HINT",message:"Dense ProcessSankey layouts benefit from worker packing/order.",fix:'layoutExecution defaults to "auto"; set layoutExecution="worker" or raise layoutWorkerThreshold deliberately.'}),e}var W=/^\d{4}-\d{1,2}$/;function D(t){const e=t.trim();if(!e||!Number.isNaN(Number(e)))return NaN;const i=W.test(e)?e+"-01":e;if(i===e&&10>e.length)return NaN;const r=Date.parse(i);return Number.isFinite(r)?r:NaN}function C(t){return t instanceof Date?t.getTime():"string"==typeof t?D(t):+t}function F(t){const e=t.provenance,i=t.id??t.stableId??e?.stableId;return null==i||""===i?void 0:i+""}export{i as responsiveRuleMatches,r as resolveResponsiveRules,n as makeRuleValueResolver,s as makeXYRuleContext,a as makeNodeRuleContext,c as matchesThreshold,u as ruleMatches,h as resolveStyleRules,f as composeStyleRules,l as makeStyleRuleStyleFn,p as styleRulesToNodeStyle,d as darkenColor,m as lightenColor,y as sweepToAngles,g as valueToAngle,_ as computeArcBoundingBox,T as diagnoseProcessSankeyProps,x as createHatchPattern,M as isHatchFill,N as hatchFillKey,k as hatchFillId,w as hatchPatternDef,I as resolveSvgFill,E as resolveAnnotationGradient,z as RingBuffer,P as IncrementalExtent,D as parseDateLikeString,C as coerceDateLikeValue,F as annotationStableId,R as getHitRadius,O as isTimeLandmark};
@@ -0,0 +1 @@
1
+ import{useBrushAccessibility as r}from"./c-USFMFKIH.min.js";import{useRef as t,useEffect as e}from"react";import{select as n}from"d3-selection";import{brushX as c,brushY as u}from"d3-brush";import{jsx as l,jsxs as i}from"react/jsx-runtime";function o({width:o,height:s,totalWidth:a,totalHeight:h,margin:m,scales:d,onBrush:f}){const p=t(null),v=t(null),b=t(f);b.current=f;const g=t(d);g.current=d;const M=t(!1),x=t(null),w="horizontal"===d?.projection,y=t(w);y.current=w;const j=r({label:"Ordinal value range brush",onAction:r=>{const t=g.current,e=v.current;if(!t||!e||!p.current)return;const c=n(p.current).select(".brush-g");if("clear"===r.type)return M.current=!0,c.call(e.move,null),M.current=!1,x.current=null,void b.current(null);if(("left"===r.direction||"right"===r.direction)!=!!y.current)return;const u=t.r.domain(),[l,i]=[Math.min(...u),Math.max(...u)],o=(i-l)/20,s=x.current?.r??[l+.4*(i-l),l+.6*(i-l)],a="left"===r.direction||"down"===r.direction?-1:1;let[h,m]=s;if(r.resize)0>a?h=Math.max(l,h-o):m=Math.min(i,m+o);else{const r=m-h;h=Math.max(l,Math.min(i-r,h+a*o)),m=h+r}const d={r:[h,m]};M.current=!0,c.call(e.move,y.current?[t.r(h),t.r(m)]:[t.r(m),t.r(h)]),M.current=!1,x.current=d,b.current(d)}});return e(()=>{if(!p.current)return;const r=n(p.current).select(".brush-g"),t=w?c():u();return t.extent([[0,0],[o,s]]),t.on("brush end",r=>{if(M.current)return;const t=g.current;if(!t)return;if(!r.selection)return x.current=null,void b.current(null);const[e,n]=r.selection;let c;c=y.current?[t.r.invert(e),t.r.invert(n)]:[t.r.invert(n),t.r.invert(e)];const u={r:c};x.current=u,b.current(u)}),r.call(t),v.current=t,r.select(".selection").attr("fill","steelblue").attr("fill-opacity",.15).attr("stroke","steelblue").attr("stroke-width",1),()=>{t.on("brush end",null),v.current=null}},[o,s,w]),e(()=>{if(!d||!v.current||!x.current)return;if(!p.current)return;const r=x.current,t=n(p.current).select(".brush-g"),e=d.r(r.r[0]),c=d.r(r.r[1]);w?(M.current=!0,t.call(v.current.move,[e,c]),M.current=!1):(M.current=!0,t.call(v.current.move,[c,e]),M.current=!1)},[d,w]),i("svg",{ref:p,width:a,height:h,...j.svgProps,style:{position:"absolute",top:0,left:0,pointerEvents:"none"},children:[l("title",{children:j.svgProps["aria-label"]}),l("desc",{id:j.descriptionId,children:j.description}),l("g",{className:"brush-g",transform:`translate(${m.left},${m.top})`,style:{pointerEvents:"all"}})]})}export{o as OrdinalBrushOverlay};