semiotic 2.0.2 → 3.0.0-beta.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 (359) hide show
  1. package/CLAUDE.md +530 -0
  2. package/README.md +190 -37
  3. package/ai/cli.js +48 -0
  4. package/ai/dist/ai/componentRegistry.js +45 -0
  5. package/ai/dist/ai/mcp-server.js +99 -0
  6. package/ai/dist/ai/renderHOCToSVG.js +77 -0
  7. package/ai/dist/src/components/Annotation.js +358 -0
  8. package/ai/dist/src/components/AnnotationLayer/AnnotationLayer.js +369 -0
  9. package/ai/dist/src/components/Axis/Axis.js +373 -0
  10. package/ai/dist/src/components/Axis/axisTitle.js +14 -0
  11. package/ai/dist/src/components/Axis/index.js +7 -0
  12. package/ai/dist/src/components/Axis/summaryGraphic.js +37 -0
  13. package/ai/dist/src/components/Brush.js +84 -0
  14. package/ai/dist/src/components/DividedLine.js +65 -0
  15. package/ai/dist/src/components/FacetController.js +259 -0
  16. package/ai/dist/src/components/Frame.js +139 -0
  17. package/ai/dist/src/components/InteractionLayer.js +328 -0
  18. package/ai/dist/src/components/Legend.js +140 -0
  19. package/ai/dist/src/components/MiniMap.js +75 -0
  20. package/ai/dist/src/components/MinimapXYFrame.js +99 -0
  21. package/ai/dist/src/components/NetworkFrame.js +335 -0
  22. package/ai/dist/src/components/OrdinalFrame.js +437 -0
  23. package/ai/dist/src/components/ResponsiveFrame.js +68 -0
  24. package/ai/dist/src/components/ResponsiveMinimapXYFrame.js +11 -0
  25. package/ai/dist/src/components/ResponsiveNetworkFrame.js +11 -0
  26. package/ai/dist/src/components/ResponsiveOrdinalFrame.js +11 -0
  27. package/ai/dist/src/components/ResponsiveXYFrame.js +10 -0
  28. package/ai/dist/src/components/SparkFrame.js +113 -0
  29. package/ai/dist/src/components/SparkNetworkFrame.js +11 -0
  30. package/ai/dist/src/components/SparkOrdinalFrame.js +11 -0
  31. package/ai/dist/src/components/SparkXYFrame.js +11 -0
  32. package/ai/dist/src/components/Tooltip/Tooltip.js +304 -0
  33. package/ai/dist/src/components/TooltipPositioner/index.js +132 -0
  34. package/ai/dist/src/components/VisualizationLayer.js +395 -0
  35. package/ai/dist/src/components/XYFrame.js +524 -0
  36. package/ai/dist/src/components/annotationLayerBehavior/annotationHandling.js +73 -0
  37. package/ai/dist/src/components/annotationLayerBehavior/d3labeler.js +254 -0
  38. package/ai/dist/src/components/annotationRules/baseRules.js +150 -0
  39. package/ai/dist/src/components/annotationRules/networkframeRules.js +198 -0
  40. package/ai/dist/src/components/annotationRules/orframeRules.js +695 -0
  41. package/ai/dist/src/components/annotationRules/xyframeRules.js +299 -0
  42. package/ai/dist/src/components/batchWork.js +35 -0
  43. package/ai/dist/src/components/charts/index.js +96 -0
  44. package/ai/dist/src/components/charts/network/ChordDiagram.js +245 -0
  45. package/ai/dist/src/components/charts/network/CirclePack.js +177 -0
  46. package/ai/dist/src/components/charts/network/ForceDirectedGraph.js +248 -0
  47. package/ai/dist/src/components/charts/network/SankeyDiagram.js +305 -0
  48. package/ai/dist/src/components/charts/network/TreeDiagram.js +268 -0
  49. package/ai/dist/src/components/charts/network/Treemap.js +177 -0
  50. package/ai/dist/src/components/charts/ordinal/BarChart.js +191 -0
  51. package/ai/dist/src/components/charts/ordinal/BoxPlot.js +235 -0
  52. package/ai/dist/src/components/charts/ordinal/DonutChart.js +178 -0
  53. package/ai/dist/src/components/charts/ordinal/DotPlot.js +194 -0
  54. package/ai/dist/src/components/charts/ordinal/GroupedBarChart.js +194 -0
  55. package/ai/dist/src/components/charts/ordinal/PieChart.js +155 -0
  56. package/ai/dist/src/components/charts/ordinal/StackedBarChart.js +213 -0
  57. package/ai/dist/src/components/charts/ordinal/SwarmPlot.js +219 -0
  58. package/ai/dist/src/components/charts/realtime/RealtimeBarChart.js +91 -0
  59. package/ai/dist/src/components/charts/realtime/RealtimeLineChart.js +73 -0
  60. package/ai/dist/src/components/charts/realtime/RealtimeSwarmChart.js +85 -0
  61. package/ai/dist/src/components/charts/realtime/RealtimeWaterfallChart.js +86 -0
  62. package/ai/dist/src/components/charts/shared/ChartError.js +72 -0
  63. package/ai/dist/src/components/charts/shared/colorUtils.js +138 -0
  64. package/ai/dist/src/components/charts/shared/formatUtils.js +176 -0
  65. package/ai/dist/src/components/charts/shared/hooks.js +49 -0
  66. package/ai/dist/src/components/charts/shared/legendUtils.js +57 -0
  67. package/ai/dist/src/components/charts/shared/types.js +2 -0
  68. package/ai/dist/src/components/charts/shared/validateChartData.js +82 -0
  69. package/ai/dist/src/components/charts/shared/validateProps.js +640 -0
  70. package/ai/dist/src/components/charts/xy/AreaChart.js +220 -0
  71. package/ai/dist/src/components/charts/xy/BubbleChart.js +222 -0
  72. package/ai/dist/src/components/charts/xy/Heatmap.js +230 -0
  73. package/ai/dist/src/components/charts/xy/LineChart.js +302 -0
  74. package/ai/dist/src/components/charts/xy/Scatterplot.js +136 -0
  75. package/ai/dist/src/components/charts/xy/StackedAreaChart.js +220 -0
  76. package/ai/dist/src/components/constants/coordinateNames.js +11 -0
  77. package/ai/dist/src/components/constants/frame_props.js +251 -0
  78. package/ai/dist/src/components/constants/jsx.js +71 -0
  79. package/ai/dist/src/components/data/dataFunctions.js +473 -0
  80. package/ai/dist/src/components/data/multiAccessorUtils.js +14 -0
  81. package/ai/dist/src/components/data/networkPipelineCache.js +43 -0
  82. package/ai/dist/src/components/data/ordinalPipelineCache.js +53 -0
  83. package/ai/dist/src/components/data/unflowedFunctions.js +5 -0
  84. package/ai/dist/src/components/data/xyPipelineCache.js +49 -0
  85. package/ai/dist/src/components/generic_utilities/functions.js +5 -0
  86. package/ai/dist/src/components/index.js +145 -0
  87. package/ai/dist/src/components/interactionLayerBehavior/InteractionCanvas.js +128 -0
  88. package/ai/dist/src/components/processing/InteractionItems.js +223 -0
  89. package/ai/dist/src/components/processing/hierarchyUtils.js +104 -0
  90. package/ai/dist/src/components/processing/layouts/chordLayout.js +58 -0
  91. package/ai/dist/src/components/processing/layouts/forceLayout.js +142 -0
  92. package/ai/dist/src/components/processing/layouts/hierarchyLayout.js +31 -0
  93. package/ai/dist/src/components/processing/layouts/index.js +32 -0
  94. package/ai/dist/src/components/processing/layouts/sankeyLayout.js +96 -0
  95. package/ai/dist/src/components/processing/layouts/simpleLayouts.js +34 -0
  96. package/ai/dist/src/components/processing/layouts/types.js +2 -0
  97. package/ai/dist/src/components/processing/network.js +771 -0
  98. package/ai/dist/src/components/processing/networkDefaults.js +39 -0
  99. package/ai/dist/src/components/processing/networkLayoutHelpers.js +98 -0
  100. package/ai/dist/src/components/processing/ordinal.js +889 -0
  101. package/ai/dist/src/components/processing/ordinalConstants.js +23 -0
  102. package/ai/dist/src/components/processing/ordinalOverlays.js +88 -0
  103. package/ai/dist/src/components/processing/ordinalRenderPipeline.js +196 -0
  104. package/ai/dist/src/components/processing/xyDrawing.js +484 -0
  105. package/ai/dist/src/components/realtime/BinAccumulator.js +36 -0
  106. package/ai/dist/src/components/realtime/IncrementalExtent.js +55 -0
  107. package/ai/dist/src/components/realtime/RealtimeFrame.js +710 -0
  108. package/ai/dist/src/components/realtime/RingBuffer.js +104 -0
  109. package/ai/dist/src/components/realtime/renderers/barRenderer.js +133 -0
  110. package/ai/dist/src/components/realtime/renderers/candlestickRenderer.js +7 -0
  111. package/ai/dist/src/components/realtime/renderers/lineRenderer.js +164 -0
  112. package/ai/dist/src/components/realtime/renderers/swarmRenderer.js +91 -0
  113. package/ai/dist/src/components/realtime/renderers/types.js +2 -0
  114. package/ai/dist/src/components/realtime/renderers/waterfallRenderer.js +163 -0
  115. package/ai/dist/src/components/realtime/types.js +2 -0
  116. package/ai/dist/src/components/semiotic-ai.js +66 -0
  117. package/ai/dist/src/components/semiotic-network.js +30 -0
  118. package/ai/dist/src/components/semiotic-ordinal.js +28 -0
  119. package/ai/dist/src/components/semiotic-realtime.js +37 -0
  120. package/ai/dist/src/components/semiotic-server.js +8 -0
  121. package/ai/dist/src/components/semiotic-xy.js +41 -0
  122. package/ai/dist/src/components/semiotic.js +101 -0
  123. package/ai/dist/src/components/server/renderToStaticSVG.js +392 -0
  124. package/ai/dist/src/components/store/TooltipStore.js +13 -0
  125. package/ai/dist/src/components/store/createStore.js +77 -0
  126. package/ai/dist/src/components/svg/SvgHelper.js +308 -0
  127. package/ai/dist/src/components/svg/areaDrawing.js +312 -0
  128. package/ai/dist/src/components/svg/boxplotRenderer.js +441 -0
  129. package/ai/dist/src/components/svg/bucketizedRenderer.js +677 -0
  130. package/ai/dist/src/components/svg/ckbinsRenderer.js +92 -0
  131. package/ai/dist/src/components/svg/ckmeans.js +238 -0
  132. package/ai/dist/src/components/svg/contourLayout.js +73 -0
  133. package/ai/dist/src/components/svg/contourRenderer.js +53 -0
  134. package/ai/dist/src/components/svg/edgeGenerators.js +181 -0
  135. package/ai/dist/src/components/svg/frameFunctions.js +579 -0
  136. package/ai/dist/src/components/svg/graphAlgorithms.js +138 -0
  137. package/ai/dist/src/components/svg/hexbinLayout.js +163 -0
  138. package/ai/dist/src/components/svg/lineDrawing.js +427 -0
  139. package/ai/dist/src/components/svg/networkDrawing.js +207 -0
  140. package/ai/dist/src/components/svg/nodeGenerators.js +131 -0
  141. package/ai/dist/src/components/svg/pieceDrawing.js +110 -0
  142. package/ai/dist/src/components/svg/pieceLayouts.js +588 -0
  143. package/ai/dist/src/components/svg/sankeyLinks.js +143 -0
  144. package/ai/dist/src/components/svg/summaryAxis.js +48 -0
  145. package/ai/dist/src/components/svg/summaryLayouts.js +202 -0
  146. package/ai/dist/src/components/svg/swarmLayout.js +128 -0
  147. package/ai/dist/src/components/types/annotationTypes.js +2 -0
  148. package/ai/dist/src/components/types/canvasTypes.js +2 -0
  149. package/ai/dist/src/components/types/generalTypes.js +2 -0
  150. package/ai/dist/src/components/types/interactionTypes.js +2 -0
  151. package/ai/dist/src/components/types/legendTypes.js +2 -0
  152. package/ai/dist/src/components/types/networkTypes.js +2 -0
  153. package/ai/dist/src/components/types/ordinalTypes.js +2 -0
  154. package/ai/dist/src/components/types/xyTypes.js +2 -0
  155. package/ai/dist/src/components/useBoundingRect.js +24 -0
  156. package/ai/dist/src/components/useDerivedStateFromProps.js +25 -0
  157. package/ai/dist/src/components/useLegacyUnmountCallback.js +21 -0
  158. package/ai/dist/src/components/visualizationLayerBehavior/axis.js +249 -0
  159. package/ai/dist/src/components/visualizationLayerBehavior/general.js +435 -0
  160. package/ai/dist/src/setupTests.js +4 -0
  161. package/ai/examples.md +394 -0
  162. package/ai/schema.json +1178 -0
  163. package/ai/system-prompt.md +38 -0
  164. package/dist/Annotation.d.ts +3 -0
  165. package/dist/AnnotationLayer/AnnotationLayer.d.ts +25 -0
  166. package/dist/Axis/Axis.d.ts +7 -0
  167. package/dist/Axis/axisTitle.d.ts +10 -0
  168. package/dist/Axis/index.d.ts +2 -0
  169. package/dist/Axis/summaryGraphic.d.ts +17 -0
  170. package/dist/Brush.d.ts +12 -0
  171. package/dist/DividedLine.d.ts +16 -0
  172. package/dist/FacetController.d.ts +12 -0
  173. package/dist/Frame.d.ts +2 -0
  174. package/dist/InteractionLayer.d.ts +3 -0
  175. package/dist/Legend.d.ts +3 -0
  176. package/dist/MiniMap.d.ts +14 -0
  177. package/dist/MinimapXYFrame.d.ts +10 -0
  178. package/dist/NetworkFrame.d.ts +8 -0
  179. package/dist/OrdinalFrame.d.ts +8 -0
  180. package/dist/ResponsiveFrame.d.ts +22 -0
  181. package/dist/ResponsiveMinimapXYFrame.d.ts +3 -0
  182. package/dist/ResponsiveNetworkFrame.d.ts +3 -0
  183. package/dist/ResponsiveOrdinalFrame.d.ts +3 -0
  184. package/dist/ResponsiveXYFrame.d.ts +3 -0
  185. package/dist/SparkFrame.d.ts +14 -0
  186. package/dist/SparkNetworkFrame.d.ts +5 -0
  187. package/dist/SparkOrdinalFrame.d.ts +5 -0
  188. package/dist/SparkXYFrame.d.ts +5 -0
  189. package/dist/Tooltip/Tooltip.d.ts +141 -0
  190. package/dist/TooltipPositioner/index.d.ts +7 -0
  191. package/dist/VisualizationLayer.d.ts +33 -0
  192. package/dist/XYFrame.d.ts +8 -0
  193. package/dist/annotationLayerBehavior/annotationHandling.d.ts +19 -0
  194. package/dist/annotationLayerBehavior/d3labeler.d.ts +9 -0
  195. package/dist/annotationRules/baseRules.d.ts +25 -0
  196. package/dist/annotationRules/networkframeRules.d.ts +48 -0
  197. package/dist/annotationRules/orframeRules.d.ts +103 -0
  198. package/dist/annotationRules/xyframeRules.d.ts +117 -0
  199. package/dist/batchWork.d.ts +6 -0
  200. package/dist/charts/index.d.ts +62 -0
  201. package/dist/charts/network/ChordDiagram.d.ts +181 -0
  202. package/dist/charts/network/CirclePack.d.ts +103 -0
  203. package/dist/charts/network/ForceDirectedGraph.d.ts +192 -0
  204. package/dist/charts/network/SankeyDiagram.d.ts +195 -0
  205. package/dist/charts/network/TreeDiagram.d.ts +200 -0
  206. package/dist/charts/network/Treemap.d.ts +98 -0
  207. package/dist/charts/ordinal/BarChart.d.ts +119 -0
  208. package/dist/charts/ordinal/BoxPlot.d.ts +125 -0
  209. package/dist/charts/ordinal/DonutChart.d.ts +95 -0
  210. package/dist/charts/ordinal/DotPlot.d.ts +128 -0
  211. package/dist/charts/ordinal/GroupedBarChart.d.ts +113 -0
  212. package/dist/charts/ordinal/PieChart.d.ts +83 -0
  213. package/dist/charts/ordinal/StackedBarChart.d.ts +119 -0
  214. package/dist/charts/ordinal/SwarmPlot.d.ts +137 -0
  215. package/dist/charts/realtime/RealtimeBarChart.d.ts +102 -0
  216. package/dist/charts/realtime/RealtimeLineChart.d.ts +78 -0
  217. package/dist/charts/realtime/RealtimeSwarmChart.d.ts +88 -0
  218. package/dist/charts/realtime/RealtimeWaterfallChart.d.ts +85 -0
  219. package/dist/charts/shared/ChartError.d.ts +19 -0
  220. package/dist/charts/shared/colorUtils.d.ts +62 -0
  221. package/dist/charts/shared/formatUtils.d.ts +82 -0
  222. package/dist/charts/shared/hooks.d.ts +20 -0
  223. package/dist/charts/shared/legendUtils.d.ts +32 -0
  224. package/dist/charts/shared/types.d.ts +58 -0
  225. package/dist/charts/shared/validateChartData.d.ts +41 -0
  226. package/dist/charts/shared/validateProps.d.ts +18 -0
  227. package/dist/charts/xy/AreaChart.d.ts +127 -0
  228. package/dist/charts/xy/BubbleChart.d.ts +157 -0
  229. package/dist/charts/xy/Heatmap.d.ts +153 -0
  230. package/dist/charts/xy/LineChart.d.ts +193 -0
  231. package/dist/charts/xy/Scatterplot.d.ts +50 -0
  232. package/dist/charts/xy/StackedAreaChart.d.ts +131 -0
  233. package/dist/constants/coordinateNames.d.ts +8 -0
  234. package/dist/constants/frame_props.d.ts +13 -0
  235. package/dist/constants/jsx.d.ts +19 -0
  236. package/dist/data/dataFunctions.d.ts +45 -0
  237. package/dist/data/multiAccessorUtils.d.ts +1 -0
  238. package/dist/data/networkPipelineCache.d.ts +27 -0
  239. package/dist/data/ordinalPipelineCache.d.ts +33 -0
  240. package/dist/data/unflowedFunctions.d.ts +1 -0
  241. package/dist/data/xyPipelineCache.d.ts +35 -0
  242. package/dist/generic_utilities/functions.d.ts +1 -0
  243. package/dist/index.d.ts +133 -0
  244. package/dist/interactionLayerBehavior/InteractionCanvas.d.ts +20 -0
  245. package/dist/network.js +8520 -0
  246. package/dist/network.js.map +1 -0
  247. package/dist/network.min.js +1 -0
  248. package/dist/network.module.js +8484 -0
  249. package/dist/network.module.js.map +1 -0
  250. package/dist/network.module.min.js +1 -0
  251. package/dist/ordinal.js +9276 -0
  252. package/dist/ordinal.js.map +1 -0
  253. package/dist/ordinal.min.js +1 -0
  254. package/dist/ordinal.module.js +9242 -0
  255. package/dist/ordinal.module.js.map +1 -0
  256. package/dist/ordinal.module.min.js +1 -0
  257. package/dist/processing/InteractionItems.d.ts +13 -0
  258. package/dist/processing/hierarchyUtils.d.ts +16 -0
  259. package/dist/processing/layouts/chordLayout.d.ts +2 -0
  260. package/dist/processing/layouts/forceLayout.d.ts +3 -0
  261. package/dist/processing/layouts/hierarchyLayout.d.ts +10 -0
  262. package/dist/processing/layouts/index.d.ts +8 -0
  263. package/dist/processing/layouts/sankeyLayout.d.ts +8 -0
  264. package/dist/processing/layouts/simpleLayouts.d.ts +7 -0
  265. package/dist/processing/layouts/types.d.ts +17 -0
  266. package/dist/processing/network.d.ts +111 -0
  267. package/dist/processing/networkDefaults.d.ts +36 -0
  268. package/dist/processing/networkLayoutHelpers.d.ts +54 -0
  269. package/dist/processing/ordinal.d.ts +102 -0
  270. package/dist/processing/ordinalConstants.d.ts +33 -0
  271. package/dist/processing/ordinalOverlays.d.ts +33 -0
  272. package/dist/processing/ordinalRenderPipeline.d.ts +148 -0
  273. package/dist/processing/xyDrawing.d.ts +140 -0
  274. package/dist/realtime/BinAccumulator.d.ts +8 -0
  275. package/dist/realtime/IncrementalExtent.d.ts +13 -0
  276. package/dist/realtime/RealtimeFrame.d.ts +4 -0
  277. package/dist/realtime/RingBuffer.d.ts +19 -0
  278. package/dist/realtime/renderers/barRenderer.d.ts +2 -0
  279. package/dist/realtime/renderers/candlestickRenderer.d.ts +2 -0
  280. package/dist/realtime/renderers/lineRenderer.d.ts +2 -0
  281. package/dist/realtime/renderers/swarmRenderer.d.ts +2 -0
  282. package/dist/realtime/renderers/types.d.ts +9 -0
  283. package/dist/realtime/renderers/waterfallRenderer.d.ts +3 -0
  284. package/dist/realtime/types.d.ts +113 -0
  285. package/dist/realtime.js +1598 -0
  286. package/dist/realtime.js.map +1 -0
  287. package/dist/realtime.min.js +1 -0
  288. package/dist/realtime.module.js +1566 -0
  289. package/dist/realtime.module.js.map +1 -0
  290. package/dist/realtime.module.min.js +1 -0
  291. package/dist/semiotic-ai.d.ts +28 -0
  292. package/dist/semiotic-ai.js +18722 -0
  293. package/dist/semiotic-ai.js.map +1 -0
  294. package/dist/semiotic-ai.min.js +1 -0
  295. package/dist/semiotic-ai.module.js +18668 -0
  296. package/dist/semiotic-ai.module.js.map +1 -0
  297. package/dist/semiotic-ai.module.min.js +1 -0
  298. package/dist/semiotic-network.d.ts +19 -0
  299. package/dist/semiotic-ordinal.d.ts +18 -0
  300. package/dist/semiotic-realtime.d.ts +23 -0
  301. package/dist/semiotic-server.d.ts +1 -0
  302. package/dist/semiotic-xy.d.ts +24 -0
  303. package/dist/semiotic.d.ts +51 -0
  304. package/dist/semiotic.js +18723 -12996
  305. package/dist/semiotic.js.map +1 -0
  306. package/dist/semiotic.min.js +1 -0
  307. package/dist/semiotic.module.js +18666 -12965
  308. package/dist/semiotic.module.js.map +1 -0
  309. package/dist/semiotic.module.min.js +1 -0
  310. package/dist/server/renderToStaticSVG.d.ts +9 -0
  311. package/dist/server.js +8360 -0
  312. package/dist/server.js.map +1 -0
  313. package/dist/server.min.js +1 -0
  314. package/dist/server.module.js +8331 -0
  315. package/dist/server.module.js.map +1 -0
  316. package/dist/server.module.min.js +1 -0
  317. package/dist/store/TooltipStore.d.ts +2 -0
  318. package/dist/store/createStore.d.ts +1 -0
  319. package/dist/svg/SvgHelper.d.ts +33 -0
  320. package/dist/svg/areaDrawing.d.ts +21 -0
  321. package/dist/svg/boxplotRenderer.d.ts +15 -0
  322. package/dist/svg/bucketizedRenderer.d.ts +16 -0
  323. package/dist/svg/ckbinsRenderer.d.ts +20 -0
  324. package/dist/svg/ckmeans.d.ts +69 -0
  325. package/dist/svg/contourLayout.d.ts +6 -0
  326. package/dist/svg/contourRenderer.d.ts +12 -0
  327. package/dist/svg/edgeGenerators.d.ts +51 -0
  328. package/dist/svg/frameFunctions.d.ts +108 -0
  329. package/dist/svg/graphAlgorithms.d.ts +14 -0
  330. package/dist/svg/hexbinLayout.d.ts +7 -0
  331. package/dist/svg/lineDrawing.d.ts +99 -0
  332. package/dist/svg/networkDrawing.d.ts +16 -0
  333. package/dist/svg/nodeGenerators.d.ts +58 -0
  334. package/dist/svg/pieceDrawing.d.ts +12 -0
  335. package/dist/svg/pieceLayouts.d.ts +53 -0
  336. package/dist/svg/sankeyLinks.d.ts +3 -0
  337. package/dist/svg/summaryAxis.d.ts +6 -0
  338. package/dist/svg/summaryLayouts.d.ts +53 -0
  339. package/dist/svg/swarmLayout.d.ts +13 -0
  340. package/dist/types/annotationTypes.d.ts +135 -0
  341. package/dist/types/canvasTypes.d.ts +9 -0
  342. package/dist/types/generalTypes.d.ts +238 -0
  343. package/dist/types/interactionTypes.d.ts +72 -0
  344. package/dist/types/legendTypes.d.ts +20 -0
  345. package/dist/types/networkTypes.d.ts +175 -0
  346. package/dist/types/ordinalTypes.d.ts +112 -0
  347. package/dist/types/xyTypes.d.ts +115 -0
  348. package/dist/useBoundingRect.d.ts +2 -0
  349. package/dist/useDerivedStateFromProps.d.ts +1 -0
  350. package/dist/useLegacyUnmountCallback.d.ts +2 -0
  351. package/dist/visualizationLayerBehavior/axis.d.ts +36 -0
  352. package/dist/visualizationLayerBehavior/general.d.ts +80 -0
  353. package/dist/xy.js +7944 -0
  354. package/dist/xy.js.map +1 -0
  355. package/dist/xy.min.js +1 -0
  356. package/dist/xy.module.js +7903 -0
  357. package/dist/xy.module.js.map +1 -0
  358. package/dist/xy.module.min.js +1 -0
  359. package/package.json +116 -65
package/ai/schema.json ADDED
@@ -0,0 +1,1178 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "name": "semiotic",
4
+ "version": "3.0.0",
5
+ "description": "React data visualization library for charts, networks, and beyond",
6
+ "tools": [
7
+ {
8
+ "type": "function",
9
+ "function": {
10
+ "name": "LineChart",
11
+ "description": "Line traces with curve interpolation, area fill, and point markers. Use for time series, trends, and continuous data.",
12
+ "parameters": {
13
+ "type": "object",
14
+ "properties": {
15
+ "data": {
16
+ "type": "array",
17
+ "items": { "type": "object" },
18
+ "description": "Array of data objects"
19
+ },
20
+ "xAccessor": {
21
+ "type": "string",
22
+ "description": "Key or accessor function for x-axis values",
23
+ "default": "x"
24
+ },
25
+ "yAccessor": {
26
+ "type": "string",
27
+ "description": "Key or accessor function for y-axis values",
28
+ "default": "y"
29
+ },
30
+ "lineBy": {
31
+ "type": "string",
32
+ "description": "Key to group data into separate lines"
33
+ },
34
+ "lineDataAccessor": {
35
+ "type": "string",
36
+ "description": "Key for the coordinates array within each line object",
37
+ "default": "coordinates"
38
+ },
39
+ "colorBy": {
40
+ "type": "string",
41
+ "description": "Key to determine color encoding per line/group"
42
+ },
43
+ "colorScheme": {
44
+ "type": ["string", "array"],
45
+ "description": "Named d3 color scheme or array of color strings",
46
+ "default": "category10"
47
+ },
48
+ "curve": {
49
+ "type": "string",
50
+ "enum": ["linear", "monotoneX", "monotoneY", "step", "stepAfter", "stepBefore", "basis", "cardinal", "catmullRom"],
51
+ "description": "Curve interpolation method",
52
+ "default": "linear"
53
+ },
54
+ "lineWidth": {
55
+ "type": "number",
56
+ "description": "Stroke width of the line",
57
+ "default": 2
58
+ },
59
+ "showPoints": {
60
+ "type": "boolean",
61
+ "description": "Show data point markers on the line",
62
+ "default": false
63
+ },
64
+ "pointRadius": {
65
+ "type": "number",
66
+ "description": "Radius of point markers when showPoints is true",
67
+ "default": 3
68
+ },
69
+ "fillArea": {
70
+ "type": "boolean",
71
+ "description": "Fill the area under the line",
72
+ "default": false
73
+ },
74
+ "areaOpacity": {
75
+ "type": "number",
76
+ "description": "Opacity of the filled area (0-1)",
77
+ "default": 0.3
78
+ },
79
+ "xLabel": {
80
+ "type": "string",
81
+ "description": "Label for the x-axis"
82
+ },
83
+ "yLabel": {
84
+ "type": "string",
85
+ "description": "Label for the y-axis"
86
+ },
87
+ "title": {
88
+ "type": "string",
89
+ "description": "Chart title"
90
+ },
91
+ "width": {
92
+ "type": "number",
93
+ "description": "Chart width in pixels",
94
+ "default": 600
95
+ },
96
+ "height": {
97
+ "type": "number",
98
+ "description": "Chart height in pixels",
99
+ "default": 400
100
+ },
101
+ "enableHover": {
102
+ "type": "boolean",
103
+ "description": "Enable hover interactions",
104
+ "default": true
105
+ },
106
+ "showLegend": {
107
+ "type": "boolean",
108
+ "description": "Show color legend"
109
+ },
110
+ "showGrid": {
111
+ "type": "boolean",
112
+ "description": "Show grid lines",
113
+ "default": false
114
+ },
115
+ "margin": {
116
+ "type": "object",
117
+ "description": "Chart margins {top, right, bottom, left}"
118
+ },
119
+ "className": {
120
+ "type": "string",
121
+ "description": "CSS class name"
122
+ }
123
+ },
124
+ "required": ["data"]
125
+ }
126
+ }
127
+ },
128
+ {
129
+ "type": "function",
130
+ "function": {
131
+ "name": "AreaChart",
132
+ "description": "Filled area chart with optional stroke line. Use for showing volume or magnitude over time.",
133
+ "parameters": {
134
+ "type": "object",
135
+ "properties": {
136
+ "data": {
137
+ "type": "array",
138
+ "items": { "type": "object" },
139
+ "description": "Array of data objects"
140
+ },
141
+ "xAccessor": {
142
+ "type": "string",
143
+ "description": "Key for x-axis values",
144
+ "default": "x"
145
+ },
146
+ "yAccessor": {
147
+ "type": "string",
148
+ "description": "Key for y-axis values",
149
+ "default": "y"
150
+ },
151
+ "areaBy": {
152
+ "type": "string",
153
+ "description": "Key to group data into separate areas"
154
+ },
155
+ "lineDataAccessor": {
156
+ "type": "string",
157
+ "description": "Key for the coordinates array within each area object",
158
+ "default": "coordinates"
159
+ },
160
+ "colorBy": {
161
+ "type": "string",
162
+ "description": "Key to determine color encoding"
163
+ },
164
+ "colorScheme": {
165
+ "type": ["string", "array"],
166
+ "description": "Named d3 color scheme or array of color strings",
167
+ "default": "category10"
168
+ },
169
+ "curve": {
170
+ "type": "string",
171
+ "enum": ["linear", "monotoneX", "monotoneY", "step", "stepAfter", "stepBefore", "basis", "cardinal", "catmullRom"],
172
+ "default": "monotoneX"
173
+ },
174
+ "areaOpacity": {
175
+ "type": "number",
176
+ "description": "Area fill opacity (0-1)",
177
+ "default": 0.7
178
+ },
179
+ "showLine": {
180
+ "type": "boolean",
181
+ "description": "Show stroke line on top of area",
182
+ "default": true
183
+ },
184
+ "lineWidth": {
185
+ "type": "number",
186
+ "default": 2
187
+ },
188
+ "xLabel": { "type": "string" },
189
+ "yLabel": { "type": "string" },
190
+ "title": { "type": "string" },
191
+ "width": { "type": "number", "default": 600 },
192
+ "height": { "type": "number", "default": 400 },
193
+ "enableHover": { "type": "boolean", "default": true },
194
+ "showLegend": { "type": "boolean" },
195
+ "showGrid": { "type": "boolean", "default": false },
196
+ "margin": { "type": "object" },
197
+ "className": { "type": "string" }
198
+ },
199
+ "required": ["data"]
200
+ }
201
+ }
202
+ },
203
+ {
204
+ "type": "function",
205
+ "function": {
206
+ "name": "StackedAreaChart",
207
+ "description": "Stacked area chart with optional normalization to 100%. Use for part-to-whole trends over time.",
208
+ "parameters": {
209
+ "type": "object",
210
+ "properties": {
211
+ "data": {
212
+ "type": "array",
213
+ "items": { "type": "object" },
214
+ "description": "Array of data objects"
215
+ },
216
+ "xAccessor": { "type": "string", "default": "x" },
217
+ "yAccessor": { "type": "string", "default": "y" },
218
+ "areaBy": {
219
+ "type": "string",
220
+ "description": "Key to group data into stacked areas"
221
+ },
222
+ "lineDataAccessor": { "type": "string", "default": "coordinates" },
223
+ "colorBy": { "type": "string" },
224
+ "colorScheme": { "type": ["string", "array"], "default": "category10" },
225
+ "curve": {
226
+ "type": "string",
227
+ "enum": ["linear", "monotoneX", "monotoneY", "step", "stepAfter", "stepBefore", "basis", "cardinal", "catmullRom"],
228
+ "default": "monotoneX"
229
+ },
230
+ "areaOpacity": { "type": "number", "default": 0.7 },
231
+ "showLine": { "type": "boolean", "default": true },
232
+ "lineWidth": { "type": "number", "default": 2 },
233
+ "normalize": {
234
+ "type": "boolean",
235
+ "description": "Normalize stacks to 100%",
236
+ "default": false
237
+ },
238
+ "xLabel": { "type": "string" },
239
+ "yLabel": { "type": "string" },
240
+ "title": { "type": "string" },
241
+ "width": { "type": "number", "default": 600 },
242
+ "height": { "type": "number", "default": 400 },
243
+ "enableHover": { "type": "boolean", "default": true },
244
+ "showLegend": { "type": "boolean" },
245
+ "showGrid": { "type": "boolean", "default": false },
246
+ "margin": { "type": "object" },
247
+ "className": { "type": "string" }
248
+ },
249
+ "required": ["data"]
250
+ }
251
+ }
252
+ },
253
+ {
254
+ "type": "function",
255
+ "function": {
256
+ "name": "Scatterplot",
257
+ "description": "Individual data points plotted by x/y position with optional size and color encoding.",
258
+ "parameters": {
259
+ "type": "object",
260
+ "properties": {
261
+ "data": {
262
+ "type": "array",
263
+ "items": { "type": "object" },
264
+ "description": "Array of data objects"
265
+ },
266
+ "xAccessor": { "type": "string", "default": "x" },
267
+ "yAccessor": { "type": "string", "default": "y" },
268
+ "colorBy": { "type": "string", "description": "Key to determine point color" },
269
+ "colorScheme": { "type": ["string", "array"], "default": "category10" },
270
+ "sizeBy": {
271
+ "type": "string",
272
+ "description": "Key for variable point sizing"
273
+ },
274
+ "sizeRange": {
275
+ "type": "array",
276
+ "items": { "type": "number" },
277
+ "description": "Min and max radius for sizeBy scaling",
278
+ "default": [3, 15]
279
+ },
280
+ "pointRadius": { "type": "number", "description": "Fixed point radius", "default": 5 },
281
+ "pointOpacity": { "type": "number", "default": 0.8 },
282
+ "xLabel": { "type": "string" },
283
+ "yLabel": { "type": "string" },
284
+ "title": { "type": "string" },
285
+ "width": { "type": "number", "default": 600 },
286
+ "height": { "type": "number", "default": 400 },
287
+ "enableHover": { "type": "boolean", "default": true },
288
+ "showLegend": { "type": "boolean" },
289
+ "showGrid": { "type": "boolean", "default": false },
290
+ "margin": { "type": "object" },
291
+ "className": { "type": "string" }
292
+ },
293
+ "required": ["data"]
294
+ }
295
+ }
296
+ },
297
+ {
298
+ "type": "function",
299
+ "function": {
300
+ "name": "BubbleChart",
301
+ "description": "Scatterplot with required size dimension for three-variable comparison. Bubble area encodes a numeric value.",
302
+ "parameters": {
303
+ "type": "object",
304
+ "properties": {
305
+ "data": {
306
+ "type": "array",
307
+ "items": { "type": "object" },
308
+ "description": "Array of data objects"
309
+ },
310
+ "sizeBy": {
311
+ "type": "string",
312
+ "description": "Key for bubble size (required)"
313
+ },
314
+ "xAccessor": { "type": "string", "default": "x" },
315
+ "yAccessor": { "type": "string", "default": "y" },
316
+ "sizeRange": {
317
+ "type": "array",
318
+ "items": { "type": "number" },
319
+ "default": [5, 40]
320
+ },
321
+ "colorBy": { "type": "string" },
322
+ "colorScheme": { "type": ["string", "array"], "default": "category10" },
323
+ "bubbleOpacity": { "type": "number", "default": 0.6 },
324
+ "bubbleStrokeWidth": { "type": "number", "default": 1 },
325
+ "bubbleStrokeColor": { "type": "string", "default": "white" },
326
+ "xLabel": { "type": "string" },
327
+ "yLabel": { "type": "string" },
328
+ "title": { "type": "string" },
329
+ "width": { "type": "number", "default": 600 },
330
+ "height": { "type": "number", "default": 400 },
331
+ "enableHover": { "type": "boolean", "default": true },
332
+ "showLegend": { "type": "boolean" },
333
+ "showGrid": { "type": "boolean", "default": false },
334
+ "margin": { "type": "object" },
335
+ "className": { "type": "string" }
336
+ },
337
+ "required": ["data", "sizeBy"]
338
+ }
339
+ }
340
+ },
341
+ {
342
+ "type": "function",
343
+ "function": {
344
+ "name": "Heatmap",
345
+ "description": "Grid/matrix visualization with color-encoded cell values. Use for correlation matrices, time-frequency analysis.",
346
+ "parameters": {
347
+ "type": "object",
348
+ "properties": {
349
+ "data": {
350
+ "type": "array",
351
+ "items": { "type": "object" },
352
+ "description": "Array of data objects with x, y, and value"
353
+ },
354
+ "xAccessor": { "type": "string", "default": "x" },
355
+ "yAccessor": { "type": "string", "default": "y" },
356
+ "valueAccessor": {
357
+ "type": "string",
358
+ "description": "Key for the cell value",
359
+ "default": "value"
360
+ },
361
+ "colorScheme": {
362
+ "type": "string",
363
+ "enum": ["blues", "reds", "greens", "viridis", "custom"],
364
+ "default": "blues"
365
+ },
366
+ "showValues": {
367
+ "type": "boolean",
368
+ "description": "Display numeric values in cells",
369
+ "default": false
370
+ },
371
+ "cellBorderColor": { "type": "string", "default": "#fff" },
372
+ "cellBorderWidth": { "type": "number", "default": 1 },
373
+ "xLabel": { "type": "string" },
374
+ "yLabel": { "type": "string" },
375
+ "title": { "type": "string" },
376
+ "width": { "type": "number", "default": 600 },
377
+ "height": { "type": "number", "default": 400 },
378
+ "enableHover": { "type": "boolean", "default": true },
379
+ "margin": { "type": "object" },
380
+ "className": { "type": "string" }
381
+ },
382
+ "required": ["data"]
383
+ }
384
+ }
385
+ },
386
+ {
387
+ "type": "function",
388
+ "function": {
389
+ "name": "BarChart",
390
+ "description": "Vertical or horizontal bars for categorical comparisons.",
391
+ "parameters": {
392
+ "type": "object",
393
+ "properties": {
394
+ "data": {
395
+ "type": "array",
396
+ "items": { "type": "object" },
397
+ "description": "Array of data objects"
398
+ },
399
+ "categoryAccessor": {
400
+ "type": "string",
401
+ "description": "Key for category labels",
402
+ "default": "category"
403
+ },
404
+ "valueAccessor": {
405
+ "type": "string",
406
+ "description": "Key for bar values",
407
+ "default": "value"
408
+ },
409
+ "orientation": {
410
+ "type": "string",
411
+ "enum": ["vertical", "horizontal"],
412
+ "default": "vertical"
413
+ },
414
+ "colorBy": { "type": "string" },
415
+ "colorScheme": { "type": ["string", "array"], "default": "category10" },
416
+ "sort": {
417
+ "type": ["boolean", "string"],
418
+ "description": "Sort bars: false, true, 'asc', 'desc', or comparator function",
419
+ "default": false
420
+ },
421
+ "barPadding": { "type": "number", "default": 5 },
422
+ "categoryLabel": { "type": "string" },
423
+ "valueLabel": { "type": "string" },
424
+ "title": { "type": "string" },
425
+ "width": { "type": "number", "default": 600 },
426
+ "height": { "type": "number", "default": 400 },
427
+ "enableHover": { "type": "boolean", "default": true },
428
+ "showLegend": { "type": "boolean" },
429
+ "showGrid": { "type": "boolean", "default": false },
430
+ "margin": { "type": "object" },
431
+ "className": { "type": "string" }
432
+ },
433
+ "required": ["data"]
434
+ }
435
+ }
436
+ },
437
+ {
438
+ "type": "function",
439
+ "function": {
440
+ "name": "StackedBarChart",
441
+ "description": "Stacked bars for part-to-whole comparisons across categories. Requires stackBy to define the stacking dimension.",
442
+ "parameters": {
443
+ "type": "object",
444
+ "properties": {
445
+ "data": {
446
+ "type": "array",
447
+ "items": { "type": "object" },
448
+ "description": "Array of data objects"
449
+ },
450
+ "stackBy": {
451
+ "type": "string",
452
+ "description": "Key to define the stacking dimension (required)"
453
+ },
454
+ "categoryAccessor": { "type": "string", "default": "category" },
455
+ "valueAccessor": { "type": "string", "default": "value" },
456
+ "orientation": {
457
+ "type": "string",
458
+ "enum": ["vertical", "horizontal"],
459
+ "default": "vertical"
460
+ },
461
+ "colorBy": { "type": "string" },
462
+ "colorScheme": { "type": ["string", "array"], "default": "category10" },
463
+ "normalize": {
464
+ "type": "boolean",
465
+ "description": "Normalize stacks to 100%",
466
+ "default": false
467
+ },
468
+ "barPadding": { "type": "number", "default": 5 },
469
+ "categoryLabel": { "type": "string" },
470
+ "valueLabel": { "type": "string" },
471
+ "title": { "type": "string" },
472
+ "width": { "type": "number", "default": 600 },
473
+ "height": { "type": "number", "default": 400 },
474
+ "enableHover": { "type": "boolean", "default": true },
475
+ "showLegend": { "type": "boolean", "default": true },
476
+ "showGrid": { "type": "boolean", "default": false },
477
+ "margin": { "type": "object" },
478
+ "className": { "type": "string" }
479
+ },
480
+ "required": ["data", "stackBy"]
481
+ }
482
+ }
483
+ },
484
+ {
485
+ "type": "function",
486
+ "function": {
487
+ "name": "GroupedBarChart",
488
+ "description": "Side-by-side bars for comparing sub-categories within categories. Requires groupBy to define grouping.",
489
+ "parameters": {
490
+ "type": "object",
491
+ "properties": {
492
+ "data": {
493
+ "type": "array",
494
+ "items": { "type": "object" },
495
+ "description": "Array of data objects"
496
+ },
497
+ "groupBy": {
498
+ "type": "string",
499
+ "description": "Key to define the grouping dimension (required)"
500
+ },
501
+ "categoryAccessor": { "type": "string", "default": "category" },
502
+ "valueAccessor": { "type": "string", "default": "value" },
503
+ "orientation": {
504
+ "type": "string",
505
+ "enum": ["vertical", "horizontal"],
506
+ "default": "vertical"
507
+ },
508
+ "colorBy": { "type": "string" },
509
+ "colorScheme": { "type": ["string", "array"], "default": "category10" },
510
+ "barPadding": { "type": "number", "default": 5 },
511
+ "categoryLabel": { "type": "string" },
512
+ "valueLabel": { "type": "string" },
513
+ "title": { "type": "string" },
514
+ "width": { "type": "number", "default": 600 },
515
+ "height": { "type": "number", "default": 400 },
516
+ "enableHover": { "type": "boolean", "default": true },
517
+ "showLegend": { "type": "boolean", "default": true },
518
+ "showGrid": { "type": "boolean", "default": false },
519
+ "margin": { "type": "object" },
520
+ "className": { "type": "string" }
521
+ },
522
+ "required": ["data", "groupBy"]
523
+ }
524
+ }
525
+ },
526
+ {
527
+ "type": "function",
528
+ "function": {
529
+ "name": "SwarmPlot",
530
+ "description": "Beeswarm/jittered dot plot showing individual data points within categories. Good for distributions.",
531
+ "parameters": {
532
+ "type": "object",
533
+ "properties": {
534
+ "data": {
535
+ "type": "array",
536
+ "items": { "type": "object" },
537
+ "description": "Array of data objects"
538
+ },
539
+ "categoryAccessor": { "type": "string", "default": "category" },
540
+ "valueAccessor": { "type": "string", "default": "value" },
541
+ "orientation": {
542
+ "type": "string",
543
+ "enum": ["vertical", "horizontal"],
544
+ "default": "vertical"
545
+ },
546
+ "colorBy": { "type": "string" },
547
+ "colorScheme": { "type": ["string", "array"], "default": "category10" },
548
+ "sizeBy": { "type": "string", "description": "Key for variable point sizing" },
549
+ "sizeRange": {
550
+ "type": "array",
551
+ "items": { "type": "number" },
552
+ "default": [3, 8]
553
+ },
554
+ "pointRadius": { "type": "number", "default": 4 },
555
+ "pointOpacity": { "type": "number", "default": 0.7 },
556
+ "categoryPadding": { "type": "number", "default": 20 },
557
+ "categoryLabel": { "type": "string" },
558
+ "valueLabel": { "type": "string" },
559
+ "title": { "type": "string" },
560
+ "width": { "type": "number", "default": 600 },
561
+ "height": { "type": "number", "default": 400 },
562
+ "enableHover": { "type": "boolean", "default": true },
563
+ "showLegend": { "type": "boolean" },
564
+ "showGrid": { "type": "boolean", "default": false },
565
+ "margin": { "type": "object" },
566
+ "className": { "type": "string" }
567
+ },
568
+ "required": ["data"]
569
+ }
570
+ }
571
+ },
572
+ {
573
+ "type": "function",
574
+ "function": {
575
+ "name": "BoxPlot",
576
+ "description": "Box-and-whisker plots showing statistical distribution (median, quartiles, outliers) per category.",
577
+ "parameters": {
578
+ "type": "object",
579
+ "properties": {
580
+ "data": {
581
+ "type": "array",
582
+ "items": { "type": "object" },
583
+ "description": "Array of data objects"
584
+ },
585
+ "categoryAccessor": { "type": "string", "default": "category" },
586
+ "valueAccessor": { "type": "string", "default": "value" },
587
+ "orientation": {
588
+ "type": "string",
589
+ "enum": ["vertical", "horizontal"],
590
+ "default": "vertical"
591
+ },
592
+ "colorBy": { "type": "string" },
593
+ "colorScheme": { "type": ["string", "array"], "default": "category10" },
594
+ "showOutliers": {
595
+ "type": "boolean",
596
+ "description": "Show outlier points",
597
+ "default": true
598
+ },
599
+ "outlierRadius": { "type": "number", "default": 3 },
600
+ "categoryPadding": { "type": "number", "default": 20 },
601
+ "categoryLabel": { "type": "string" },
602
+ "valueLabel": { "type": "string" },
603
+ "title": { "type": "string" },
604
+ "width": { "type": "number", "default": 600 },
605
+ "height": { "type": "number", "default": 400 },
606
+ "enableHover": { "type": "boolean", "default": true },
607
+ "showLegend": { "type": "boolean" },
608
+ "showGrid": { "type": "boolean", "default": false },
609
+ "margin": { "type": "object" },
610
+ "className": { "type": "string" }
611
+ },
612
+ "required": ["data"]
613
+ }
614
+ }
615
+ },
616
+ {
617
+ "type": "function",
618
+ "function": {
619
+ "name": "DotPlot",
620
+ "description": "Cleveland-style dot plot for comparing values across categories. Sorted by default.",
621
+ "parameters": {
622
+ "type": "object",
623
+ "properties": {
624
+ "data": {
625
+ "type": "array",
626
+ "items": { "type": "object" },
627
+ "description": "Array of data objects"
628
+ },
629
+ "categoryAccessor": { "type": "string", "default": "category" },
630
+ "valueAccessor": { "type": "string", "default": "value" },
631
+ "orientation": {
632
+ "type": "string",
633
+ "enum": ["vertical", "horizontal"],
634
+ "default": "horizontal"
635
+ },
636
+ "colorBy": { "type": "string" },
637
+ "colorScheme": { "type": ["string", "array"], "default": "category10" },
638
+ "sort": {
639
+ "type": ["boolean", "string"],
640
+ "description": "Sort dots: true, false, 'asc', 'desc'",
641
+ "default": true
642
+ },
643
+ "dotRadius": { "type": "number", "default": 5 },
644
+ "categoryPadding": { "type": "number", "default": 10 },
645
+ "categoryLabel": { "type": "string" },
646
+ "valueLabel": { "type": "string" },
647
+ "title": { "type": "string" },
648
+ "width": { "type": "number", "default": 600 },
649
+ "height": { "type": "number", "default": 400 },
650
+ "enableHover": { "type": "boolean", "default": true },
651
+ "showLegend": { "type": "boolean" },
652
+ "showGrid": { "type": "boolean", "default": true },
653
+ "margin": { "type": "object" },
654
+ "className": { "type": "string" }
655
+ },
656
+ "required": ["data"]
657
+ }
658
+ }
659
+ },
660
+ {
661
+ "type": "function",
662
+ "function": {
663
+ "name": "PieChart",
664
+ "description": "Proportional slices in a circle for part-to-whole relationships.",
665
+ "parameters": {
666
+ "type": "object",
667
+ "properties": {
668
+ "data": {
669
+ "type": "array",
670
+ "items": { "type": "object" },
671
+ "description": "Array of data objects"
672
+ },
673
+ "categoryAccessor": { "type": "string", "default": "category" },
674
+ "valueAccessor": { "type": "string", "default": "value" },
675
+ "colorBy": { "type": "string" },
676
+ "colorScheme": { "type": ["string", "array"], "default": "category10" },
677
+ "startAngle": {
678
+ "type": "number",
679
+ "description": "Starting angle in radians",
680
+ "default": 0
681
+ },
682
+ "slicePadding": { "type": "number", "default": 2 },
683
+ "title": { "type": "string" },
684
+ "width": { "type": "number", "default": 400 },
685
+ "height": { "type": "number", "default": 400 },
686
+ "enableHover": { "type": "boolean", "default": true },
687
+ "showLegend": { "type": "boolean", "default": true },
688
+ "margin": { "type": "object" },
689
+ "className": { "type": "string" }
690
+ },
691
+ "required": ["data"]
692
+ }
693
+ }
694
+ },
695
+ {
696
+ "type": "function",
697
+ "function": {
698
+ "name": "DonutChart",
699
+ "description": "Pie chart with a hole in the center. Supports center content like summary statistics.",
700
+ "parameters": {
701
+ "type": "object",
702
+ "properties": {
703
+ "data": {
704
+ "type": "array",
705
+ "items": { "type": "object" },
706
+ "description": "Array of data objects"
707
+ },
708
+ "categoryAccessor": { "type": "string", "default": "category" },
709
+ "valueAccessor": { "type": "string", "default": "value" },
710
+ "innerRadius": {
711
+ "type": "number",
712
+ "description": "Inner radius of the donut hole in pixels",
713
+ "default": 60
714
+ },
715
+ "centerContent": {
716
+ "type": "string",
717
+ "description": "React node to render in the center of the donut (accepts string key or JSX)"
718
+ },
719
+ "colorBy": { "type": "string" },
720
+ "colorScheme": { "type": ["string", "array"], "default": "category10" },
721
+ "startAngle": { "type": "number", "default": 0 },
722
+ "slicePadding": { "type": "number", "default": 2 },
723
+ "title": { "type": "string" },
724
+ "width": { "type": "number", "default": 400 },
725
+ "height": { "type": "number", "default": 400 },
726
+ "enableHover": { "type": "boolean", "default": true },
727
+ "showLegend": { "type": "boolean", "default": true },
728
+ "margin": { "type": "object" },
729
+ "className": { "type": "string" }
730
+ },
731
+ "required": ["data"]
732
+ }
733
+ }
734
+ },
735
+ {
736
+ "type": "function",
737
+ "function": {
738
+ "name": "ForceDirectedGraph",
739
+ "description": "Physics-based node-link diagram. Use for relationships, social networks, knowledge graphs.",
740
+ "parameters": {
741
+ "type": "object",
742
+ "properties": {
743
+ "nodes": {
744
+ "type": "array",
745
+ "items": { "type": "object" },
746
+ "description": "Array of node objects"
747
+ },
748
+ "edges": {
749
+ "type": "array",
750
+ "items": { "type": "object" },
751
+ "description": "Array of edge objects with source and target"
752
+ },
753
+ "nodeIDAccessor": {
754
+ "type": "string",
755
+ "description": "Key for node unique identifier",
756
+ "default": "id"
757
+ },
758
+ "sourceAccessor": {
759
+ "type": "string",
760
+ "description": "Key for edge source node ID",
761
+ "default": "source"
762
+ },
763
+ "targetAccessor": {
764
+ "type": "string",
765
+ "description": "Key for edge target node ID",
766
+ "default": "target"
767
+ },
768
+ "nodeLabel": {
769
+ "type": "string",
770
+ "description": "Key or accessor for node labels"
771
+ },
772
+ "colorBy": { "type": "string" },
773
+ "colorScheme": { "type": ["string", "array"], "default": "category10" },
774
+ "nodeSize": {
775
+ "type": ["number", "string"],
776
+ "description": "Fixed node radius or key for variable sizing",
777
+ "default": 8
778
+ },
779
+ "nodeSizeRange": {
780
+ "type": "array",
781
+ "items": { "type": "number" },
782
+ "default": [5, 20]
783
+ },
784
+ "edgeWidth": {
785
+ "type": ["number", "string"],
786
+ "description": "Fixed edge width or key for variable width",
787
+ "default": 1
788
+ },
789
+ "edgeColor": { "type": "string", "default": "#999" },
790
+ "edgeOpacity": { "type": "number", "default": 0.6 },
791
+ "iterations": {
792
+ "type": "number",
793
+ "description": "Force simulation iterations",
794
+ "default": 300
795
+ },
796
+ "forceStrength": { "type": "number", "default": 0.1 },
797
+ "showLabels": { "type": "boolean", "default": false },
798
+ "title": { "type": "string" },
799
+ "width": { "type": "number", "default": 600 },
800
+ "height": { "type": "number", "default": 600 },
801
+ "enableHover": { "type": "boolean", "default": true },
802
+ "showLegend": { "type": "boolean", "default": true },
803
+ "margin": { "type": "object" },
804
+ "className": { "type": "string" }
805
+ },
806
+ "required": ["nodes", "edges"]
807
+ }
808
+ }
809
+ },
810
+ {
811
+ "type": "function",
812
+ "function": {
813
+ "name": "SankeyDiagram",
814
+ "description": "Flow diagram showing weighted connections between nodes. Use for flows, budgets, process mapping.",
815
+ "parameters": {
816
+ "type": "object",
817
+ "properties": {
818
+ "edges": {
819
+ "type": "array",
820
+ "items": { "type": "object" },
821
+ "description": "Array of edge objects with source, target, and value"
822
+ },
823
+ "nodes": {
824
+ "type": "array",
825
+ "items": { "type": "object" },
826
+ "description": "Optional array of node objects (auto-derived from edges if omitted)"
827
+ },
828
+ "sourceAccessor": { "type": "string", "default": "source" },
829
+ "targetAccessor": { "type": "string", "default": "target" },
830
+ "valueAccessor": {
831
+ "type": "string",
832
+ "description": "Key for edge flow value",
833
+ "default": "value"
834
+ },
835
+ "nodeIdAccessor": { "type": "string", "default": "id" },
836
+ "colorBy": { "type": "string" },
837
+ "colorScheme": { "type": ["string", "array"], "default": "category10" },
838
+ "edgeColorBy": {
839
+ "type": "string",
840
+ "enum": ["source", "target", "gradient"],
841
+ "description": "How to color edges",
842
+ "default": "source"
843
+ },
844
+ "orientation": {
845
+ "type": "string",
846
+ "enum": ["horizontal", "vertical"],
847
+ "default": "horizontal"
848
+ },
849
+ "nodeAlign": {
850
+ "type": "string",
851
+ "enum": ["justify", "left", "right", "center"],
852
+ "default": "justify"
853
+ },
854
+ "nodePaddingRatio": { "type": "number", "default": 0.05 },
855
+ "nodeWidth": { "type": "number", "default": 15 },
856
+ "nodeLabel": { "type": "string", "description": "Key for node labels" },
857
+ "showLabels": { "type": "boolean", "default": true },
858
+ "edgeOpacity": { "type": "number", "default": 0.5 },
859
+ "title": { "type": "string" },
860
+ "width": { "type": "number", "default": 800 },
861
+ "height": { "type": "number", "default": 600 },
862
+ "enableHover": { "type": "boolean", "default": true },
863
+ "margin": { "type": "object" },
864
+ "className": { "type": "string" }
865
+ },
866
+ "required": ["edges"]
867
+ }
868
+ }
869
+ },
870
+ {
871
+ "type": "function",
872
+ "function": {
873
+ "name": "ChordDiagram",
874
+ "description": "Circular diagram showing inter-relationships and flow volumes between groups.",
875
+ "parameters": {
876
+ "type": "object",
877
+ "properties": {
878
+ "edges": {
879
+ "type": "array",
880
+ "items": { "type": "object" },
881
+ "description": "Array of edge objects with source, target, and value"
882
+ },
883
+ "nodes": {
884
+ "type": "array",
885
+ "items": { "type": "object" },
886
+ "description": "Optional array of node objects"
887
+ },
888
+ "sourceAccessor": { "type": "string", "default": "source" },
889
+ "targetAccessor": { "type": "string", "default": "target" },
890
+ "valueAccessor": { "type": "string", "default": "value" },
891
+ "nodeIdAccessor": { "type": "string", "default": "id" },
892
+ "colorBy": { "type": "string" },
893
+ "colorScheme": { "type": ["string", "array"], "default": "category10" },
894
+ "edgeColorBy": {
895
+ "type": "string",
896
+ "enum": ["source", "target"],
897
+ "default": "source"
898
+ },
899
+ "padAngle": { "type": "number", "default": 0.01 },
900
+ "groupWidth": { "type": "number", "default": 20 },
901
+ "nodeLabel": { "type": "string" },
902
+ "showLabels": { "type": "boolean", "default": true },
903
+ "edgeOpacity": { "type": "number", "default": 0.5 },
904
+ "title": { "type": "string" },
905
+ "width": { "type": "number", "default": 600 },
906
+ "height": { "type": "number", "default": 600 },
907
+ "enableHover": { "type": "boolean", "default": true },
908
+ "margin": { "type": "object" },
909
+ "className": { "type": "string" }
910
+ },
911
+ "required": ["edges"]
912
+ }
913
+ }
914
+ },
915
+ {
916
+ "type": "function",
917
+ "function": {
918
+ "name": "TreeDiagram",
919
+ "description": "Hierarchical tree layout. Supports tree, cluster, partition, and radial orientations. Data is a single root node with children.",
920
+ "parameters": {
921
+ "type": "object",
922
+ "properties": {
923
+ "data": {
924
+ "type": "object",
925
+ "description": "Root node object with nested children"
926
+ },
927
+ "layout": {
928
+ "type": "string",
929
+ "enum": ["tree", "cluster", "partition", "treemap", "circlepack"],
930
+ "default": "tree"
931
+ },
932
+ "orientation": {
933
+ "type": "string",
934
+ "enum": ["vertical", "horizontal", "radial"],
935
+ "default": "vertical"
936
+ },
937
+ "childrenAccessor": {
938
+ "type": "string",
939
+ "description": "Key for the children array in each node",
940
+ "default": "children"
941
+ },
942
+ "valueAccessor": { "type": "string", "default": "value" },
943
+ "nodeIdAccessor": { "type": "string", "default": "name" },
944
+ "colorBy": { "type": "string" },
945
+ "colorScheme": { "type": ["string", "array"], "default": "category10" },
946
+ "colorByDepth": {
947
+ "type": "boolean",
948
+ "description": "Color nodes by their depth in the hierarchy",
949
+ "default": false
950
+ },
951
+ "edgeStyle": {
952
+ "type": "string",
953
+ "enum": ["line", "curve"],
954
+ "default": "curve"
955
+ },
956
+ "nodeLabel": { "type": "string" },
957
+ "showLabels": { "type": "boolean", "default": true },
958
+ "nodeSize": { "type": "number", "default": 5 },
959
+ "title": { "type": "string" },
960
+ "width": { "type": "number", "default": 600 },
961
+ "height": { "type": "number", "default": 600 },
962
+ "enableHover": { "type": "boolean", "default": true },
963
+ "margin": { "type": "object" },
964
+ "className": { "type": "string" }
965
+ },
966
+ "required": ["data"]
967
+ }
968
+ }
969
+ },
970
+ {
971
+ "type": "function",
972
+ "function": {
973
+ "name": "Treemap",
974
+ "description": "Space-filling rectangular hierarchy visualization. Data is a single root node with nested children.",
975
+ "parameters": {
976
+ "type": "object",
977
+ "properties": {
978
+ "data": {
979
+ "type": "object",
980
+ "description": "Root node object with nested children"
981
+ },
982
+ "childrenAccessor": { "type": "string", "default": "children" },
983
+ "valueAccessor": { "type": "string", "default": "value" },
984
+ "nodeIdAccessor": { "type": "string", "default": "name" },
985
+ "colorBy": { "type": "string" },
986
+ "colorScheme": { "type": ["string", "array"], "default": "category10" },
987
+ "colorByDepth": { "type": "boolean", "default": false },
988
+ "showLabels": { "type": "boolean", "default": true },
989
+ "nodeLabel": { "type": "string" },
990
+ "title": { "type": "string" },
991
+ "width": { "type": "number", "default": 600 },
992
+ "height": { "type": "number", "default": 600 },
993
+ "enableHover": { "type": "boolean", "default": true },
994
+ "margin": { "type": "object" },
995
+ "className": { "type": "string" }
996
+ },
997
+ "required": ["data"]
998
+ }
999
+ }
1000
+ },
1001
+ {
1002
+ "type": "function",
1003
+ "function": {
1004
+ "name": "CirclePack",
1005
+ "description": "Nested circles representing hierarchical data. Data is a single root node with nested children.",
1006
+ "parameters": {
1007
+ "type": "object",
1008
+ "properties": {
1009
+ "data": {
1010
+ "type": "object",
1011
+ "description": "Root node object with nested children"
1012
+ },
1013
+ "childrenAccessor": { "type": "string", "default": "children" },
1014
+ "valueAccessor": { "type": "string", "default": "value" },
1015
+ "nodeIdAccessor": { "type": "string", "default": "name" },
1016
+ "colorBy": { "type": "string" },
1017
+ "colorScheme": { "type": ["string", "array"], "default": "category10" },
1018
+ "colorByDepth": { "type": "boolean", "default": false },
1019
+ "showLabels": { "type": "boolean", "default": true },
1020
+ "nodeLabel": { "type": "string" },
1021
+ "circleOpacity": { "type": "number", "default": 0.7 },
1022
+ "title": { "type": "string" },
1023
+ "width": { "type": "number", "default": 600 },
1024
+ "height": { "type": "number", "default": 600 },
1025
+ "enableHover": { "type": "boolean", "default": true },
1026
+ "margin": { "type": "object" },
1027
+ "className": { "type": "string" }
1028
+ },
1029
+ "required": ["data"]
1030
+ }
1031
+ }
1032
+ },
1033
+ {
1034
+ "type": "function",
1035
+ "function": {
1036
+ "name": "RealtimeLineChart",
1037
+ "description": "Streaming line chart rendered on canvas. Uses ref-based push API for high-frequency data.",
1038
+ "parameters": {
1039
+ "type": "object",
1040
+ "properties": {
1041
+ "size": {
1042
+ "type": "array",
1043
+ "items": { "type": "number" },
1044
+ "description": "[width, height] in pixels",
1045
+ "default": [500, 300]
1046
+ },
1047
+ "timeAccessor": { "type": "string", "description": "Key for time/x values" },
1048
+ "valueAccessor": { "type": "string", "description": "Key for y values" },
1049
+ "windowSize": {
1050
+ "type": "number",
1051
+ "description": "Number of data points visible",
1052
+ "default": 200
1053
+ },
1054
+ "windowMode": {
1055
+ "type": "string",
1056
+ "enum": ["sliding", "stepping"],
1057
+ "default": "sliding"
1058
+ },
1059
+ "arrowOfTime": {
1060
+ "type": "string",
1061
+ "enum": ["left", "right"],
1062
+ "default": "right"
1063
+ },
1064
+ "stroke": { "type": "string", "default": "#007bff" },
1065
+ "strokeWidth": { "type": "number", "default": 2 },
1066
+ "showAxes": { "type": "boolean", "default": true },
1067
+ "background": { "type": "string" },
1068
+ "margin": { "type": "object" },
1069
+ "className": { "type": "string" }
1070
+ },
1071
+ "required": []
1072
+ }
1073
+ }
1074
+ },
1075
+ {
1076
+ "type": "function",
1077
+ "function": {
1078
+ "name": "RealtimeBarChart",
1079
+ "description": "Streaming bar chart with binned aggregation. Uses ref-based push API.",
1080
+ "parameters": {
1081
+ "type": "object",
1082
+ "properties": {
1083
+ "binSize": {
1084
+ "type": "number",
1085
+ "description": "Time bin size in milliseconds (required)"
1086
+ },
1087
+ "size": {
1088
+ "type": "array",
1089
+ "items": { "type": "number" },
1090
+ "default": [500, 300]
1091
+ },
1092
+ "timeAccessor": { "type": "string" },
1093
+ "valueAccessor": { "type": "string" },
1094
+ "categoryAccessor": { "type": "string", "description": "Key for category grouping" },
1095
+ "colors": { "type": "object", "description": "Map of category to color string" },
1096
+ "windowSize": { "type": "number", "default": 200 },
1097
+ "windowMode": { "type": "string", "enum": ["sliding", "stepping"], "default": "sliding" },
1098
+ "arrowOfTime": { "type": "string", "enum": ["left", "right"], "default": "right" },
1099
+ "fill": { "type": "string" },
1100
+ "stroke": { "type": "string" },
1101
+ "gap": { "type": "number" },
1102
+ "showAxes": { "type": "boolean", "default": true },
1103
+ "background": { "type": "string" },
1104
+ "margin": { "type": "object" },
1105
+ "className": { "type": "string" }
1106
+ },
1107
+ "required": ["binSize"]
1108
+ }
1109
+ }
1110
+ },
1111
+ {
1112
+ "type": "function",
1113
+ "function": {
1114
+ "name": "RealtimeSwarmChart",
1115
+ "description": "Streaming swarm/scatter chart showing individual data points over time.",
1116
+ "parameters": {
1117
+ "type": "object",
1118
+ "properties": {
1119
+ "size": {
1120
+ "type": "array",
1121
+ "items": { "type": "number" },
1122
+ "default": [500, 300]
1123
+ },
1124
+ "timeAccessor": { "type": "string" },
1125
+ "valueAccessor": { "type": "string" },
1126
+ "categoryAccessor": { "type": "string" },
1127
+ "colors": { "type": "object" },
1128
+ "windowSize": { "type": "number", "default": 200 },
1129
+ "windowMode": { "type": "string", "enum": ["sliding", "stepping"], "default": "sliding" },
1130
+ "arrowOfTime": { "type": "string", "enum": ["left", "right"], "default": "right" },
1131
+ "radius": { "type": "number" },
1132
+ "fill": { "type": "string" },
1133
+ "opacity": { "type": "number" },
1134
+ "stroke": { "type": "string" },
1135
+ "showAxes": { "type": "boolean", "default": true },
1136
+ "background": { "type": "string" },
1137
+ "margin": { "type": "object" },
1138
+ "className": { "type": "string" }
1139
+ },
1140
+ "required": []
1141
+ }
1142
+ }
1143
+ },
1144
+ {
1145
+ "type": "function",
1146
+ "function": {
1147
+ "name": "RealtimeWaterfallChart",
1148
+ "description": "Streaming waterfall chart showing positive/negative changes over time.",
1149
+ "parameters": {
1150
+ "type": "object",
1151
+ "properties": {
1152
+ "size": {
1153
+ "type": "array",
1154
+ "items": { "type": "number" },
1155
+ "default": [500, 300]
1156
+ },
1157
+ "timeAccessor": { "type": "string" },
1158
+ "valueAccessor": { "type": "string" },
1159
+ "windowSize": { "type": "number", "default": 200 },
1160
+ "windowMode": { "type": "string", "enum": ["sliding", "stepping"], "default": "sliding" },
1161
+ "arrowOfTime": { "type": "string", "enum": ["left", "right"], "default": "right" },
1162
+ "positiveColor": { "type": "string" },
1163
+ "negativeColor": { "type": "string" },
1164
+ "connectorStroke": { "type": "string" },
1165
+ "connectorWidth": { "type": "number" },
1166
+ "gap": { "type": "number" },
1167
+ "stroke": { "type": "string" },
1168
+ "showAxes": { "type": "boolean", "default": true },
1169
+ "background": { "type": "string" },
1170
+ "margin": { "type": "object" },
1171
+ "className": { "type": "string" }
1172
+ },
1173
+ "required": []
1174
+ }
1175
+ }
1176
+ }
1177
+ ]
1178
+ }