semiotic 3.8.6 → 3.8.8

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 (302) hide show
  1. package/CLAUDE.md +34 -8
  2. package/README.md +93 -56
  3. package/ai/behaviorContracts.cjs +86 -1
  4. package/ai/componentMetadata.cjs +4 -9
  5. package/ai/dist/mcp-server.js +125 -12
  6. package/ai/examples.md +154 -7
  7. package/ai/schema.json +1742 -156
  8. package/ai/surface-manifest.json +12 -10
  9. package/ai/system-prompt.md +9 -3
  10. package/dist/{chunk-chartContainerDataAudit-FEOD5GTQ.module.min.js → chunk-chartContainerDataAudit-IQ3NBN3Q.module.min.js} +1 -1
  11. package/dist/chunk-chunk-2B3AIKUZ.module.min.js +2 -0
  12. package/dist/chunk-chunk-2NVFEB7P.module.min.js +2 -0
  13. package/dist/chunk-chunk-3GCILWPB.module.min.js +2 -0
  14. package/dist/chunk-chunk-46KRGJQP.module.min.js +1 -0
  15. package/dist/{chunk-chunk-G7WFWHAD.module.min.js → chunk-chunk-4ITOQRXM.module.min.js} +1 -1
  16. package/dist/chunk-chunk-4MLLQUGW.module.min.js +2 -0
  17. package/dist/chunk-chunk-57RBPDBQ.module.min.js +2 -0
  18. package/dist/chunk-chunk-5VVNW5AZ.module.min.js +1 -0
  19. package/dist/chunk-chunk-66PCWJUG.module.min.js +1 -0
  20. package/dist/chunk-chunk-6V5VQVCT.module.min.js +2 -0
  21. package/dist/chunk-chunk-7LE56WAE.module.min.js +2 -0
  22. package/dist/chunk-chunk-7T25U75Z.module.min.js +2 -0
  23. package/dist/chunk-chunk-AF53TBSN.module.min.js +2 -0
  24. package/dist/chunk-chunk-BTZYH2IE.module.min.js +1 -0
  25. package/dist/chunk-chunk-BWV55BZK.module.min.js +2 -0
  26. package/dist/chunk-chunk-BZNOAHJV.module.min.js +2 -0
  27. package/dist/chunk-chunk-CD6PVVS3.module.min.js +2 -0
  28. package/dist/chunk-chunk-DTSNLGRK.module.min.js +2 -0
  29. package/dist/chunk-chunk-FC3NZWYR.module.min.js +2 -0
  30. package/dist/chunk-chunk-FEPXDKJP.module.min.js +1 -0
  31. package/dist/chunk-chunk-FJ76HWQZ.module.min.js +1 -0
  32. package/dist/chunk-chunk-FQPKOAIH.module.min.js +2 -0
  33. package/dist/chunk-chunk-FRGBMTZR.module.min.js +1 -0
  34. package/dist/chunk-chunk-G75OPF5N.module.min.js +2 -0
  35. package/dist/chunk-chunk-H5IFO6CU.module.min.js +2 -0
  36. package/dist/chunk-chunk-HADHLMY5.module.min.js +1 -0
  37. package/dist/chunk-chunk-HBFA4NN6.module.min.js +1 -0
  38. package/dist/chunk-chunk-HCNDE26Q.module.min.js +2 -0
  39. package/dist/chunk-chunk-J5QD4RAM.module.min.js +2 -0
  40. package/dist/chunk-chunk-JJ4BSUYL.module.min.js +2 -0
  41. package/dist/chunk-chunk-JRHXQGEV.module.min.js +2 -0
  42. package/dist/chunk-chunk-L6FFYGYS.module.min.js +1 -0
  43. package/dist/chunk-chunk-LJDH3WV3.module.min.js +2 -0
  44. package/dist/chunk-chunk-LSJUXBMF.module.min.js +1 -0
  45. package/dist/chunk-chunk-N3Q33XCB.module.min.js +2 -0
  46. package/dist/chunk-chunk-NWIGA3UK.module.min.js +1 -0
  47. package/dist/chunk-chunk-OG3TTJGJ.module.min.js +2 -0
  48. package/dist/{chunk-chunk-XEVJDUTH.module.min.js → chunk-chunk-OZK46A5U.module.min.js} +1 -1
  49. package/dist/chunk-chunk-PMR47KRY.module.min.js +2 -0
  50. package/dist/chunk-chunk-QQJNG23C.module.min.js +2 -0
  51. package/dist/chunk-chunk-RGJ6TKAH.module.min.js +2 -0
  52. package/dist/{chunk-chunk-RA7JCG7D.module.min.js → chunk-chunk-SFLUSZ73.module.min.js} +1 -1
  53. package/dist/chunk-chunk-SV4XAZ3Q.module.min.js +1 -0
  54. package/dist/chunk-chunk-TCMHJWFJ.module.min.js +1 -0
  55. package/dist/chunk-chunk-TSCFL235.module.min.js +1 -0
  56. package/dist/{chunk-chunk-XP3OHHFX.module.min.js → chunk-chunk-UEZ6SHW5.module.min.js} +1 -1
  57. package/dist/chunk-chunk-UOQRPGPK.module.min.js +2 -0
  58. package/dist/chunk-chunk-VUWYT7DY.module.min.js +2 -0
  59. package/dist/{chunk-chunk-GFTVACTO.module.min.js → chunk-chunk-W5HWGQMD.module.min.js} +1 -1
  60. package/dist/chunk-chunk-WFHZHWT7.module.min.js +1 -0
  61. package/dist/chunk-chunk-WGROBM3I.module.min.js +2 -0
  62. package/dist/chunk-chunk-WSDJFBKX.module.min.js +2 -0
  63. package/dist/chunk-statisticalOverlays-HMYYSGPE.module.min.js +2 -0
  64. package/dist/components/ai/SemioticVACPBridge.d.ts +22 -0
  65. package/dist/components/ai/chartCapabilities.d.ts +4 -3
  66. package/dist/components/ai/conversationArc.d.ts +2 -176
  67. package/dist/components/ai/conversationArcTypes.d.ts +202 -0
  68. package/dist/components/ai/readerGrounding.d.ts +12 -0
  69. package/dist/components/ai/vacpAdapter.d.ts +13 -0
  70. package/dist/components/ai/vacpAdapterActions.d.ts +2 -0
  71. package/dist/components/ai/vacpAdapterModel.d.ts +7 -0
  72. package/dist/components/ai/vacpAdapterRuntime.d.ts +26 -0
  73. package/dist/components/ai/vacpAdapterState.d.ts +3 -0
  74. package/dist/components/ai/vacpAdapterTypes.d.ts +169 -0
  75. package/dist/components/ai/vacpTypes.d.ts +160 -0
  76. package/dist/components/charts/index.d.ts +6 -6
  77. package/dist/components/charts/network/ProcessSankey.d.ts +105 -74
  78. package/dist/components/charts/network/processSankey/accessors.d.ts +7 -0
  79. package/dist/components/charts/network/processSankey/algorithm.d.ts +14 -193
  80. package/dist/components/charts/network/processSankey/axisChrome.d.ts +31 -0
  81. package/dist/components/charts/network/processSankey/bandPaths.d.ts +45 -0
  82. package/dist/components/charts/network/processSankey/buildScenes.d.ts +41 -3
  83. package/dist/components/charts/network/processSankey/fixtures.d.ts +17 -0
  84. package/dist/components/charts/network/processSankey/frameMargins.d.ts +11 -0
  85. package/dist/components/charts/network/processSankey/groupBonding.d.ts +13 -0
  86. package/dist/components/charts/network/processSankey/inventoryAtTime.d.ts +41 -0
  87. package/dist/components/charts/network/processSankey/labelPlacement.d.ts +34 -0
  88. package/dist/components/charts/network/processSankey/layoutGeometry.d.ts +47 -0
  89. package/dist/components/charts/network/processSankey/layoutOrchestrator.d.ts +44 -0
  90. package/dist/components/charts/network/processSankey/layoutQualityProduct.d.ts +27 -0
  91. package/dist/components/charts/network/processSankey/massSimulation.d.ts +16 -0
  92. package/dist/components/charts/network/processSankey/ordering.d.ts +55 -0
  93. package/dist/components/charts/network/processSankey/orderingBond.d.ts +33 -0
  94. package/dist/components/charts/network/processSankey/orientation.d.ts +5 -0
  95. package/dist/components/charts/network/processSankey/packing.d.ts +8 -0
  96. package/dist/components/charts/network/processSankey/packingCache.d.ts +23 -0
  97. package/dist/components/charts/network/processSankey/processSankeyLayoutAsync.d.ts +27 -0
  98. package/dist/components/charts/network/processSankey/processSankeyLayoutWorkerClient.d.ts +72 -0
  99. package/dist/components/charts/network/processSankey/processSankeyTooltip.d.ts +26 -0
  100. package/dist/components/charts/network/processSankey/processSankeyTypes.d.ts +163 -0
  101. package/dist/components/charts/network/processSankey/ribbonInputs.d.ts +26 -2
  102. package/dist/components/charts/network/processSankey/ribbonRunway.d.ts +45 -0
  103. package/dist/components/charts/network/processSankey/streamingLayout.d.ts +23 -0
  104. package/dist/components/charts/network/processSankey/time.d.ts +11 -0
  105. package/dist/components/charts/network/processSankey/useProcessSankeyPush.d.ts +29 -0
  106. package/dist/components/charts/network/processSankey/useProcessSankeyScenes.d.ts +26 -0
  107. package/dist/components/charts/network/processSankey/validation.d.ts +33 -0
  108. package/dist/components/charts/physics/ChainReactionChart.capability.d.ts +9 -0
  109. package/dist/components/charts/physics/ChainReactionChart.d.ts +29 -0
  110. package/dist/components/charts/physics/CollisionSwarmChart.d.ts +1 -1
  111. package/dist/components/charts/physics/EventDropChart.d.ts +7 -2
  112. package/dist/components/charts/physics/GaltonBoardChart.d.ts +1 -1
  113. package/dist/components/charts/physics/{PhysicsPileChart.capability.d.ts → PacketFlowChart.capability.d.ts} +1 -1
  114. package/dist/components/charts/physics/{PhysicalFlowChart.d.ts → PacketFlowChart.d.ts} +22 -6
  115. package/dist/components/charts/physics/PhysicsCustomChart.d.ts +1 -1
  116. package/dist/components/charts/physics/ProcessFlowChart.d.ts +7 -4
  117. package/dist/components/charts/physics/{PhysicalFlowChart.capability.d.ts → UnitPileChart.capability.d.ts} +1 -1
  118. package/dist/components/charts/physics/{PhysicsPileChart.d.ts → UnitPileChart.d.ts} +19 -6
  119. package/dist/components/charts/physics/crucibleChartProps.d.ts +1 -1
  120. package/dist/components/charts/physics/crucibleChartUtils.d.ts +9 -0
  121. package/dist/components/charts/physics/gauntletChartProps.d.ts +6 -1
  122. package/dist/components/charts/physics/gauntletTerminal.d.ts +61 -0
  123. package/dist/components/charts/physics/packetFlowSemantics.d.ts +6 -0
  124. package/dist/components/charts/physics/physicsHocUtils.d.ts +45 -2
  125. package/dist/components/charts/shared/auditAccessibilityStyles.d.ts +9 -0
  126. package/dist/components/charts/shared/chartFamilySets.d.ts +1 -0
  127. package/dist/components/charts/shared/formatUtils.d.ts +12 -1
  128. package/dist/components/charts/shared/hatchFill.d.ts +2 -0
  129. package/dist/components/charts/shared/hooks.d.ts +1 -1
  130. package/dist/components/charts/shared/knownChartComponents.d.ts +1 -1
  131. package/dist/components/charts/shared/leastSquaresRegression.d.ts +31 -0
  132. package/dist/components/charts/shared/styleRules.d.ts +5 -1
  133. package/dist/components/charts/shared/useChartLegend.d.ts +14 -1
  134. package/dist/components/charts/shared/useChartSetup.d.ts +8 -1
  135. package/dist/components/charts/shared/validateProps.d.ts +2 -2
  136. package/dist/components/charts/shared/withChartWrapper.d.ts +0 -6
  137. package/dist/components/data/numericFieldProfiler.d.ts +2 -0
  138. package/dist/components/data/portability/capabilityBinding.d.ts +41 -0
  139. package/dist/components/data/portability/index.d.ts +2 -0
  140. package/dist/components/legendLayout.d.ts +56 -0
  141. package/dist/components/recipes/geographicDotGrid.d.ts +82 -0
  142. package/dist/components/recipes/geographicGrid.d.ts +100 -0
  143. package/dist/components/recipes/layout1d.d.ts +68 -0
  144. package/dist/components/recipes/physics.d.ts +2 -0
  145. package/dist/components/recipes/physicsStageGeography.d.ts +137 -0
  146. package/dist/components/semiotic-ai.d.ts +4 -3
  147. package/dist/components/semiotic-experimental-vacp.d.ts +11 -0
  148. package/dist/components/semiotic-experimental.d.ts +6 -3
  149. package/dist/components/semiotic-geo.d.ts +4 -0
  150. package/dist/components/semiotic-network.d.ts +2 -2
  151. package/dist/components/semiotic-physics.d.ts +9 -6
  152. package/dist/components/semiotic-recipes-core.d.ts +8 -1
  153. package/dist/components/semiotic.d.ts +2 -0
  154. package/dist/components/server/renderEvidence.d.ts +1 -1
  155. package/dist/components/server/renderToStaticSVG.d.ts +2 -1
  156. package/dist/components/server/serverChartConfigHeatmap.d.ts +6 -0
  157. package/dist/components/server/serverChartConfigNetworkStyles.d.ts +12 -0
  158. package/dist/components/server/serverChartConfigShared.d.ts +16 -0
  159. package/dist/components/server/serverChartConfigs.d.ts +2 -2
  160. package/dist/components/server/serverChartConfigsPhysics.d.ts +2 -2
  161. package/dist/components/server/serverChartConfigsXY.d.ts +0 -1
  162. package/dist/components/server/staticLegend.d.ts +6 -0
  163. package/dist/components/server/staticSVGChrome.d.ts +12 -3
  164. package/dist/components/server/staticValue.d.ts +8 -0
  165. package/dist/components/store/createStore.d.ts +2 -0
  166. package/dist/components/stream/OrdinalPipelineStore.d.ts +3 -0
  167. package/dist/components/stream/PipelineStore.d.ts +5 -0
  168. package/dist/components/stream/accessorUtils.d.ts +21 -0
  169. package/dist/components/stream/frameKeyboardNavigation.d.ts +3 -2
  170. package/dist/components/stream/geoPipelineConfig.d.ts +10 -0
  171. package/dist/components/stream/layouts/forceLayoutWorkerClient.d.ts +3 -8
  172. package/dist/components/stream/layouts/index.d.ts +1 -1
  173. package/dist/components/stream/legendRenderer.d.ts +8 -0
  174. package/dist/components/stream/moduleWorkerSession.d.ts +67 -0
  175. package/dist/components/stream/networkTypes.d.ts +2 -0
  176. package/dist/components/stream/ordinalSceneBuilders/sceneBuilderMap.d.ts +2 -1
  177. package/dist/components/stream/physics/PhysicsEvidence.d.ts +37 -0
  178. package/dist/components/stream/physics/PhysicsKernel.d.ts +9 -0
  179. package/dist/components/stream/physics/PhysicsPipelineStore.d.ts +9 -0
  180. package/dist/components/stream/physics/PhysicsSettledScene.d.ts +5 -0
  181. package/dist/components/stream/physics/physicsFramePipelineConfig.d.ts +19 -0
  182. package/dist/components/stream/physics/physicsPipelineSettle.d.ts +52 -0
  183. package/dist/components/stream/physics/physicsRegionRuntime.d.ts +23 -0
  184. package/dist/components/stream/pipelineIntroCancellation.d.ts +6 -0
  185. package/dist/components/stream/pipelineTransitions.d.ts +15 -1
  186. package/dist/components/stream/renderers/canvasRenderHelpers.d.ts +16 -4
  187. package/dist/components/stream/renderers/symbolCanvasRenderer.d.ts +4 -0
  188. package/dist/components/stream/symbolPath.d.ts +8 -0
  189. package/dist/components/stream/types.d.ts +4 -0
  190. package/dist/components/stream/useCanvasFrameHost.d.ts +6 -0
  191. package/dist/components/stream/useSemanticFrameInteractions.d.ts +12 -3
  192. package/dist/components/stream/xyFrameAxisTypes.d.ts +4 -0
  193. package/dist/components/types/legendTypes.d.ts +17 -1
  194. package/dist/controls.min.js +1 -1
  195. package/dist/controls.module.min.js +1 -1
  196. package/dist/forceLayoutWorker.js +1 -1
  197. package/dist/geo.min.js +1 -1
  198. package/dist/geo.module.min.js +1 -1
  199. package/dist/network.min.js +1 -1
  200. package/dist/network.module.min.js +1 -1
  201. package/dist/ordinal.min.js +1 -1
  202. package/dist/ordinal.module.min.js +1 -1
  203. package/dist/physics.min.js +1 -1
  204. package/dist/physics.module.min.js +1 -1
  205. package/dist/physicsWorker.js +1 -1
  206. package/dist/processSankeyLayoutWorker.js +1 -0
  207. package/dist/realtime.min.js +1 -1
  208. package/dist/realtime.module.min.js +1 -1
  209. package/dist/semiotic-ai-core.min.js +1 -1
  210. package/dist/semiotic-ai-core.module.min.js +1 -1
  211. package/dist/semiotic-ai.d.ts +4 -3
  212. package/dist/semiotic-ai.min.js +1 -1
  213. package/dist/semiotic-ai.module.min.js +1 -1
  214. package/dist/semiotic-data.module.min.js +1 -1
  215. package/dist/semiotic-experimental-vacp.d.ts +11 -0
  216. package/dist/semiotic-experimental-vacp.min.js +1 -0
  217. package/dist/semiotic-experimental-vacp.module.min.js +1 -0
  218. package/dist/semiotic-experimental.d.ts +6 -3
  219. package/dist/semiotic-experimental.min.js +2 -1
  220. package/dist/semiotic-experimental.module.min.js +2 -1
  221. package/dist/semiotic-geo.d.ts +4 -0
  222. package/dist/semiotic-network.d.ts +2 -2
  223. package/dist/semiotic-physics.d.ts +9 -6
  224. package/dist/semiotic-realtime-core.min.js +1 -1
  225. package/dist/semiotic-realtime-core.module.min.js +1 -1
  226. package/dist/semiotic-recipes-core.d.ts +8 -1
  227. package/dist/semiotic-recipes-core.min.js +1 -1
  228. package/dist/semiotic-recipes-core.module.min.js +1 -1
  229. package/dist/semiotic-recipes.min.js +1 -1
  230. package/dist/semiotic-recipes.module.min.js +1 -1
  231. package/dist/semiotic-server-edge.min.js +1 -1
  232. package/dist/semiotic-server-edge.module.min.js +1 -1
  233. package/dist/semiotic-server-node.min.js +1 -1
  234. package/dist/semiotic-server-node.module.min.js +1 -1
  235. package/dist/semiotic-themes-core.module.min.js +1 -1
  236. package/dist/semiotic-themes-react.module.min.js +1 -1
  237. package/dist/semiotic-themes.module.min.js +1 -1
  238. package/dist/semiotic-utils-core.min.js +1 -1
  239. package/dist/semiotic-utils-core.module.min.js +1 -1
  240. package/dist/semiotic-utils-react.module.min.js +1 -1
  241. package/dist/semiotic-utils.min.js +1 -1
  242. package/dist/semiotic-utils.module.min.js +1 -1
  243. package/dist/semiotic-value.min.js +1 -1
  244. package/dist/semiotic-value.module.min.js +1 -1
  245. package/dist/semiotic.d.ts +2 -0
  246. package/dist/semiotic.min.js +1 -1
  247. package/dist/semiotic.module.min.js +1 -1
  248. package/dist/server.min.js +1 -1
  249. package/dist/server.module.min.js +1 -1
  250. package/dist/xy.min.js +1 -1
  251. package/dist/xy.module.min.js +1 -1
  252. package/package.json +21 -4
  253. package/spec/README.md +94 -2
  254. package/spec/bindings/README.md +14 -3
  255. package/spec/v0.1/examples/annotation-provenance-reviewed-revision.json +27 -0
  256. package/spec/v0.1/examples/annotation-provenance-watcher-threshold.json +21 -0
  257. package/spec/v0.1/examples/audience-profile-executive-review.json +24 -0
  258. package/spec/v0.1/examples/audience-profile-incident-operators.json +42 -0
  259. package/spec/v0.1/examples/chart-capability-bar-comparison.json +48 -0
  260. package/spec/v0.1/examples/chart-capability-service-flow.json +54 -0
  261. package/dist/chunk-chunk-2CHN2TA3.module.min.js +0 -1
  262. package/dist/chunk-chunk-3NGIKFD6.module.min.js +0 -1
  263. package/dist/chunk-chunk-3SHB24AG.module.min.js +0 -1
  264. package/dist/chunk-chunk-4MMOOYTX.module.min.js +0 -2
  265. package/dist/chunk-chunk-5RKXZQ2P.module.min.js +0 -1
  266. package/dist/chunk-chunk-75OTQSXS.module.min.js +0 -1
  267. package/dist/chunk-chunk-7ALTGHK6.module.min.js +0 -1
  268. package/dist/chunk-chunk-A5GRQUOF.module.min.js +0 -1
  269. package/dist/chunk-chunk-AAF5LZAU.module.min.js +0 -2
  270. package/dist/chunk-chunk-ARZGA4LJ.module.min.js +0 -2
  271. package/dist/chunk-chunk-C4YA6TDR.module.min.js +0 -1
  272. package/dist/chunk-chunk-CAFLML4L.module.min.js +0 -2
  273. package/dist/chunk-chunk-CO5KQMGH.module.min.js +0 -1
  274. package/dist/chunk-chunk-DSNGDNJY.module.min.js +0 -1
  275. package/dist/chunk-chunk-FHBN7OEB.module.min.js +0 -2
  276. package/dist/chunk-chunk-GMQ5AYTD.module.min.js +0 -1
  277. package/dist/chunk-chunk-IP2UE74X.module.min.js +0 -1
  278. package/dist/chunk-chunk-ITDWLZXV.module.min.js +0 -2
  279. package/dist/chunk-chunk-JCG72SGW.module.min.js +0 -2
  280. package/dist/chunk-chunk-LPSPATPC.module.min.js +0 -1
  281. package/dist/chunk-chunk-OM6NWS4H.module.min.js +0 -2
  282. package/dist/chunk-chunk-PRDGLMJT.module.min.js +0 -2
  283. package/dist/chunk-chunk-PX5YQGDP.module.min.js +0 -2
  284. package/dist/chunk-chunk-Q2BS46W2.module.min.js +0 -2
  285. package/dist/chunk-chunk-QSQVBIJA.module.min.js +0 -1
  286. package/dist/chunk-chunk-RCF52Z42.module.min.js +0 -2
  287. package/dist/chunk-chunk-RNUHEXZA.module.min.js +0 -2
  288. package/dist/chunk-chunk-ROZWKEUG.module.min.js +0 -1
  289. package/dist/chunk-chunk-SMVD3EQJ.module.min.js +0 -2
  290. package/dist/chunk-chunk-T2FKJD4O.module.min.js +0 -2
  291. package/dist/chunk-chunk-UDREYOLV.module.min.js +0 -1
  292. package/dist/chunk-chunk-VOWE3SAP.module.min.js +0 -2
  293. package/dist/chunk-chunk-VQPNBUSW.module.min.js +0 -2
  294. package/dist/chunk-chunk-WAWCIHFJ.module.min.js +0 -1
  295. package/dist/chunk-chunk-WCX6U47H.module.min.js +0 -2
  296. package/dist/chunk-chunk-WYARAXHR.module.min.js +0 -2
  297. package/dist/chunk-chunk-XV3KGYTR.module.min.js +0 -2
  298. package/dist/chunk-chunk-YC2IVEPX.module.min.js +0 -1
  299. package/dist/chunk-chunk-ZOAQDIJO.module.min.js +0 -1
  300. package/dist/chunk-chunk-ZXIXAPRE.module.min.js +0 -2
  301. package/dist/chunk-statisticalOverlays-6MVAK5RW.module.min.js +0 -2
  302. package/dist/components/stream/renderers/networkSymbolRenderer.d.ts +0 -2
@@ -7,12 +7,12 @@
7
7
  "src/components/semiotic-ai.ts",
8
8
  "ai/mcp-server.ts"
9
9
  ],
10
- "version": "3.8.6",
10
+ "version": "3.8.8",
11
11
  "components": {
12
- "schema": 56,
13
- "aiChartExports": 53,
14
- "mcpRenderable": 50,
15
- "browserOnly": 6,
12
+ "schema": 57,
13
+ "aiChartExports": 54,
14
+ "mcpRenderable": 52,
15
+ "browserOnly": 5,
16
16
  "categories": {
17
17
  "xy": [
18
18
  "AreaChart",
@@ -72,14 +72,15 @@
72
72
  "TemporalHistogram"
73
73
  ],
74
74
  "physics": [
75
+ "ChainReactionChart",
75
76
  "CollisionSwarmChart",
76
77
  "CrucibleChart",
77
78
  "EventDropChart",
78
79
  "GaltonBoardChart",
79
80
  "GauntletChart",
80
- "PhysicalFlowChart",
81
- "PhysicsPileChart",
82
- "ProcessFlowChart"
81
+ "PacketFlowChart",
82
+ "ProcessFlowChart",
83
+ "UnitPileChart"
83
84
  ],
84
85
  "value": [
85
86
  "BigNumber"
@@ -93,6 +94,7 @@
93
94
  "BubbleChart",
94
95
  "BumpChart",
95
96
  "CandlestickChart",
97
+ "ChainReactionChart",
96
98
  "ChordDiagram",
97
99
  "CirclePack",
98
100
  "CollisionSwarmChart",
@@ -115,9 +117,8 @@
115
117
  "MinimapChart",
116
118
  "MultiAxisLineChart",
117
119
  "OrbitDiagram",
118
- "PhysicalFlowChart",
120
+ "PacketFlowChart",
119
121
  "PhysicsCustomChart",
120
- "PhysicsPileChart",
121
122
  "PieChart",
122
123
  "ProcessFlowChart",
123
124
  "ProcessSankey",
@@ -138,6 +139,7 @@
138
139
  "TemporalHistogram",
139
140
  "TreeDiagram",
140
141
  "Treemap",
142
+ "UnitPileChart",
141
143
  "ViolinPlot"
142
144
  ],
143
145
  "geoExcludedFromAIExports": [
@@ -2,7 +2,7 @@
2
2
 
3
3
  <!-- semiotic-bundle-sizes:start -->
4
4
  <!-- Auto-generated by scripts/sync-bundle-sizes.mjs — do not edit by hand. -->
5
- **Use sub-path imports** — `semiotic/xy` (143KB gz), `semiotic/ordinal` (119KB gz), `semiotic/network` (125KB gz), `semiotic/geo` (98KB gz), `semiotic/realtime` (152KB gz), `semiotic/realtime/core` (146KB gz), `semiotic/realtime/react` (1KB gz), `semiotic/server` (207KB gz), `semiotic/server/node` (207KB gz), `semiotic/server/edge` (226KB gz), `semiotic/utils` (83KB gz), `semiotic/utils/core` (81KB gz), `semiotic/utils/react` (6KB gz), `semiotic/recipes` (84KB gz), `semiotic/recipes/core` (83KB 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` (154KB gz), `semiotic/physics/matter` (1KB gz), `semiotic/physics/rapier` (1KB gz), `semiotic/ai` (468KB gz), `semiotic/ai/core` (78KB gz), `semiotic/controls` (12KB gz), `semiotic/rough` (4KB gz). Full `semiotic` is 382KB gz.
5
+ **Use sub-path imports** — `semiotic/xy` (145KB gz), `semiotic/ordinal` (121KB gz), `semiotic/network` (145KB gz), `semiotic/geo` (104KB gz), `semiotic/realtime` (154KB gz), `semiotic/realtime/core` (144KB gz), `semiotic/realtime/react` (1KB gz), `semiotic/server` (224KB gz), `semiotic/server/node` (224KB gz), `semiotic/server/edge` (240KB gz), `semiotic/utils` (85KB gz), `semiotic/utils/core` (84KB gz), `semiotic/utils/react` (6KB gz), `semiotic/recipes` (89KB 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` (505KB gz), `semiotic/ai/core` (81KB gz), `semiotic/controls` (12KB gz), `semiotic/rough` (4KB gz). Full `semiotic` is 407KB gz.
6
6
  <!-- semiotic-bundle-sizes:end -->
7
7
 
8
8
  ## Flat Array Data (`data: object[]`)
@@ -60,7 +60,7 @@ Use only when motion maps to the data semantics; the settled projection is what
60
60
 
61
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
62
  - **EventDropChart** — `data`, `timeAccessor` ("time"), `arrivalAccessor` ("arrivalTime"), `windows={{size}}`, `watermark={{delay}}`, `timeScale`, `colorBy`, `size`. Event-time arrival replay and late/watermark windows.
63
- - **PhysicsPileChart** — `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.
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
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
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
66
 
@@ -150,10 +150,16 @@ These rules are generated from `ai/behaviorContracts.cjs` and are consumed by `s
150
150
  - **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
151
  - **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
152
  - **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.
153
- Required combinations: StackedAreaChart: static data + areaBy; push areaBy. Stacked areas need a flat data array plus areaBy to identify the stacked series. BubbleChart: static data + sizeBy; push sizeBy. Bubbles need sizeBy in addition to x/y accessors so radius encodes data rather than a constant point size. StackedBarChart: static data + stackBy; push stackBy. Stacked bars need stackBy to split each category into stack segments. GroupedBarChart: static data + groupBy; push groupBy. Grouped bars need groupBy to split each category into side-by-side bars. SwimlaneChart: static data + subcategoryAccessor; push subcategoryAccessor. Swimlanes need subcategoryAccessor; colorBy defaults to the same field when not provided. GaugeChart: static value; push not supported. GaugeChart is value-only. thresholds, min, max, sweep, and arcWidth are optional. ForceDirectedGraph: static nodes + edges; push nodes + edges. ForceDirectedGraph schema/rendering requires nodes and edges. If an agent infers nodes from edge endpoints, it must materialize a nodes array before returning code.
153
+ Required combinations: StackedAreaChart: static data + areaBy; push areaBy. Stacked areas need a flat data array plus areaBy to identify the stacked series. BubbleChart: static data + sizeBy; push sizeBy. Bubbles need sizeBy in addition to x/y accessors so radius encodes data rather than a constant point size. StackedBarChart: static data + stackBy; push stackBy. Stacked bars need stackBy to split each category into stack segments. GroupedBarChart: static data + groupBy; push groupBy. Grouped bars need groupBy to split each category into side-by-side bars. SwimlaneChart: static data + subcategoryAccessor; push subcategoryAccessor. Swimlanes need subcategoryAccessor; colorBy defaults to the same field when not provided. GaugeChart: static value; push not supported. GaugeChart is value-only. Its thresholds use { value, color, label? }; BigNumber thresholds use the distinct { at, level, color?, label? } vocabulary. ForceDirectedGraph: static nodes + edges; push nodes + edges. ForceDirectedGraph schema/rendering requires nodes and edges. If an agent infers nodes from edge endpoints, it must materialize a nodes array before returning code.
154
154
  - **Push mode omits data** (`streaming.push-mode-data`): HOC push mode is selected by omitting the data prop entirely. Passing data={[]} is static empty data and can clear/reinitialize the frame on render.
155
+ - **Serialized proposals keep the initial snapshot** (`streaming.serialized-proposal-snapshot`): A JSON component/props proposal for MCP, SSR, or evaluation is a static snapshot even when the request mentions future pushes. Keep the supplied initial rows in the component's real data prop and do not invent pushRows, pushRequirement, ref, or method props.
155
156
  - **Ref mutations need stable IDs** (`streaming.ref-mutations-require-id-accessors`): push() and pushMany() can append without IDs, but remove(id) and update(id, updater) require a stable ID accessor: pointIdAccessor for XY/realtime charts, dataIdAccessor for ordinal charts, and nodeIDAccessor/edgeIdAccessor for network operations.
156
157
  - **renderChart uses static props only** (`rendering.renderchart-static-props`): MCP renderChart and semiotic/server renderChart render a single static SVG/PNG snapshot. Browser-only realtime components and future ref pushes are not renderable through that path.
158
+ - **Axis formatters are React callbacks** (`serialization.formatters-are-react-callbacks`): xFormat, yFormat, categoryFormat, and valueFormat are callback props, not d3 format strings or axis-title strings. They are intentionally absent from JSON/MCP schemas and string values fail validation.
159
+ - **Value components do not inherit chart-HOC props** (`value.bignumber-wire-contract`): BigNumber is a value component, not a chart HOC, so it does not inherit the common chart-HOC prop list. It uses label as its visible heading and supports description and summary; title and accessibleTable are invalid. Its percent format expects a ratio such as 0.97 and renders it as 97%.
160
+ - **Proportional symbol maps use geographic props** (`geo.proportional-symbol-wire-shape`): ProportionalSymbolMap reads point rows from points, longitude from xAccessor (default lon), latitude from yAccessor (default lat), and radius from sizeBy. sizeRange is the two-number pixel-radius range.
161
+ - **Physics charts separate chart mode from simulation input** (`physics.sample-and-mechanical-inputs`): Sample simulations use data plus the chart's accessors. Seeded no-data demonstrations use simulationMode="mechanical" (legacy mode="mechanical" remains accepted); mode otherwise carries chart display modes such as primary or sparkline.
162
+ - **Physics push methods ingest source records** (`physics.push-uses-source-records`): Physics HOC refs push source records through the chart's accessors. pushRows and dataIdAccessor are not component props; stable source id fields are retained on spawned bodies without an invented accessor.
157
163
 
158
164
  <!-- semiotic-behavior-contracts:end -->
159
165
 
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{auditData as r,toDataAuditNotifications as o}from"./chunk-chunk-Q2BS46W2.module.min.js";import"./chunk-chunk-ZXIXAPRE.module.min.js";function n(n,t){if(!t||!n?.component||!n.props)return[];const c="object"==typeof t?t:{};try{const t=r(n.component,n.props,void 0,{checkOutliers:c.checkOutliers});return o(t,{max:c.max,errorsOnly:c.errorsOnly})}catch{return[]}}export{n as buildChartDataAuditNotifications};
2
+ import{auditData as r,toDataAuditNotifications as o}from"./chunk-chunk-2B3AIKUZ.module.min.js";import"./chunk-chunk-6V5VQVCT.module.min.js";function n(n,t){if(!t||!n?.component||!n.props)return[];const c="object"==typeof t?t:{};try{const t=r(n.component,n.props,void 0,{checkOutliers:c.checkOutliers});return o(t,{max:c.max,errorsOnly:c.errorsOnly})}catch{return[]}}export{n as buildChartDataAuditNotifications};
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{parseDateLikeString as e}from"./chunk-chunk-6V5VQVCT.module.min.js";function o(e,o){const s={numbers:[],missing:0,nonFinite:0,nonNumeric:0,zero:0,negative:0,fractional:0};for(const n of e){const e=n?.[o];if(null==e||""===e){s.missing++;continue}let t;if("number"==typeof e)t=e;else if("string"==typeof e){const o=e.trim();if(""===o){s.missing++;continue}const n=Number(o);Number.isNaN(n)?/^[+-]?nan$/i.test(o)&&(t=n):t=n}void 0!==t?Number.isFinite(t)?(s.numbers.push(t),0===t&&s.zero++,0>t&&s.negative++,Number.isInteger(t)||s.fractional++):s.nonFinite++:s.nonNumeric++}return s}function s(e,o){if(0===e.length)return;const s=(e.length-1)*o,n=Math.floor(s),t=Math.ceil(s);if(n===t)return e[n];const r=s-n;return e[n]*(1-r)+e[t]*r}function n(e,n={}){if(!Array.isArray(e)||0===e.length)return{};const t=new Set;for(const o of e)if(o&&"object"==typeof o)for(const e of Object.keys(o))t.add(e);const r={};for(const i of t){const t=o(e,i);let a=1/0,c=-1/0;for(const e of t.numbers)a>e&&(a=e),e>c&&(c=e);const l=!1===n.quantiles?void 0:[...t.numbers].sort((e,o)=>e-o);r[i]={field:i,observedCount:e.length-t.missing,finiteCount:t.numbers.length,missingCount:t.missing,nonFiniteCount:t.nonFinite,nonNumericCount:t.nonNumeric,zeroCount:t.zero,negativeCount:t.negative,fractionalCount:t.fractional,...t.numbers.length>0?{min:a,...l?{q1:s(l,.25),median:s(l,.5),q3:s(l,.75)}:{},max:c}:{}}}return r}function t(e){const o=[`${e.component}: ${e.ok?"✓ numerically safe":"✗ numeric hazards found"}`,`${e.rowCount} rows · ${e.summary.fieldsChecked} numeric fields · ${e.summary.errors} errors · ${e.summary.warnings} warnings`];for(const s of e.diagnoses)o.push(`${"error"===s.severity?"ERROR":"WARN"} ${s.code}${s.field?` [${s.field}]`:""}: ${s.message}`),s.fix&&o.push(" Fix: "+s.fix);return o.join("\n")}function r(e){return e.code.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function i(e,o={}){const s=Number.isFinite(o.max)?Math.max(0,Math.floor(o.max)):6,n=e.diagnoses.map((e,o)=>({item:e,diagnosisIndex:o})).filter(({item:e})=>!o.errorsOnly||"error"===e.severity),t=n.slice(0,s).map(({item:e,diagnosisIndex:o})=>({id:`data-audit:${e.code}:${e.role??"chart"}:${e.field??"chart"}:${o}`,level:e.severity,title:e.field?`${r(e)} · ${e.field}`:r(e),message:e.fix?`${e.message} ${e.fix}`:e.message,source:"Semiotic data audit",dismissible:!0}));return n.length>s&&t.push({id:"data-audit:overflow:chart",level:n.slice(s).some(({item:e})=>"error"===e.severity)?"error":"warning",title:`${n.length-s} more numeric finding${n.length-s===1?"":"s"}`,message:"Run auditData() or diagnoseConfig() to inspect the complete report.",source:"Semiotic data audit",dismissible:!0}),t}function a(e,o){const s=e.nestedDataAccessorProp?o[e.nestedDataAccessorProp]:void 0;return"string"==typeof s?s:e.defaultNestedDataAccessor}function c(e,o,s){const n=e.dataProp??"data",t=o[n],r=s??(Array.isArray(t)?t:[]),i=a(e,o);if(!i)return{dataProp:n,rows:r};const c=[];let l=!1;for(const e of r){const o=e?.[i];if(Array.isArray(o)){l=!0;for(const e of o)e&&"object"==typeof e&&c.push(e)}}return{dataProp:n,rows:l?c:r}}var l=[{role:"x",accessor:"xAccessor",defaultAccessor:"x",temporalValues:"date-like",domain:!0},{role:"y",accessor:"yAccessor",defaultAccessor:"y",domain:!0}],u={fields:l},f=[{...l[0],nestedDataAccessorProp:"lineDataAccessor",defaultNestedDataAccessor:"coordinates"},{...l[1],nestedDataAccessorProp:"lineDataAccessor",defaultNestedDataAccessor:"coordinates",allowMissing:!0}],g={fields:f},d={role:"value",accessor:"valueAccessor",defaultAccessor:"value"},m={...d,domain:!0},h={fields:[{...d,requirements:["finite","non-negative"]}],aggregates:[{kind:"positive-total",role:"value"}]},p={fields:[d],aggregates:[{kind:"normalized-total",role:"value",groupAccessor:"categoryAccessor",defaultGroupAccessor:"category",whenProp:"normalize"}]},v={fields:f,aggregates:[{kind:"normalized-total",role:"y",groupAccessor:"xAccessor",defaultGroupAccessor:"x",whenProp:"normalize"}]},w={fields:[...l,{role:"size",accessor:"sizeBy",requirements:["finite","non-negative"]}]},y={fields:[...l,{role:"size",accessor:"sizeBy",requirements:["finite","non-negative"]}]},A={fields:[d]},b={fields:[{...d,dataProp:"edges",requirements:["finite","non-negative"],missingValue:1}]},$={LineChart:g,AreaChart:g,BumpChart:g,Scatterplot:y,ConnectedScatterplot:u,QuadrantChart:y,MinimapChart:g,BubbleChart:w,StackedAreaChart:v,DifferenceChart:{fields:[{role:"x",accessor:"xAccessor",defaultAccessor:"x",temporalValues:"date",domain:!0},{role:"value",accessor:"seriesAAccessor",defaultAccessor:"a"},{role:"value",accessor:"seriesBAccessor",defaultAccessor:"b"}]},CandlestickChart:{fields:[{role:"x",accessor:"xAccessor",defaultAccessor:"x",temporalValues:"date-like",domain:!0},{role:"high",accessor:"highAccessor",defaultAccessor:"high",requirements:["finite"]},{role:"low",accessor:"lowAccessor",defaultAccessor:"low",requirements:["finite"]},{role:"open",accessor:"openAccessor",whenProps:["openAccessor","closeAccessor"],requirements:["finite"]},{role:"close",accessor:"closeAccessor",whenProps:["openAccessor","closeAccessor"],requirements:["finite"]}]},Heatmap:A,BarChart:{fields:[d]},GroupedBarChart:{fields:[d]},StackedBarChart:p,DotPlot:{fields:[m]},Histogram:{fields:[m]},BoxPlot:{fields:[m]},SwarmPlot:{fields:[m,{role:"size",accessor:"sizeBy",requirements:["finite","non-negative"]}]},ViolinPlot:{fields:[m]},RidgelinePlot:{fields:[m]},PieChart:h,DonutChart:h,FunnelChart:h,SankeyDiagram:b,ChordDiagram:b,ProportionalSymbolMap:{fields:[{role:"x",accessor:"xAccessor",defaultAccessor:"lon",dataProp:"points",requirements:["finite"]},{role:"y",accessor:"yAccessor",defaultAccessor:"lat",dataProp:"points",requirements:["finite"]},{role:"size",accessor:"sizeBy",dataProp:"points",requirements:["finite","non-negative"]}]}},R=Symbol.for("semiotic.numericContractRegistry");function N(){const e=globalThis;return e[R]??(e[R]={contracts:new Map}),e[R]}function x(e,o){o?N().contracts.set(e,o):N().contracts.delete(e)}function z(e){N().contracts.delete(e)}var E={xAccessor:"x",yAccessor:"y",valueAccessor:"value",sizeBy:"size",sizeAccessor:"size",radiusAccessor:"size",countAccessor:"count",amountAccessor:"value",highAccessor:"high",lowAccessor:"low",openAccessor:"open",closeAccessor:"close",lowerAccessor:"lower",upperAccessor:"upper",positiveAccessor:"value",negativeAccessor:"value",progressAccessor:"value",confidenceAccessor:"value",costAccessor:"value",throughputAccessor:"value"};function P(e,o,s){return"function"==typeof e?e(o,s):o[e]}function I(o,s){if("number"==typeof o)return Number.isFinite(o)?o:null;if(o instanceof Date){const e=o.getTime();return s&&Number.isFinite(e)?e:null}if("string"==typeof o){const n=o.trim(),t=Number(n);if(n&&Number.isFinite(t))return t;if("date-like"===s){const o=e(n);return Number.isFinite(o)?o:null}}return null}function C(e){return"number"==typeof e&&!Number.isFinite(e)}function _(e,o,s,n,t){const r={field:s,numbers:[],finiteRows:[],missingRows:[],nonFiniteRows:[],nonNumericRows:[],accessorErrorRows:[],zeroRows:[],negativeRows:[],fractionalRows:[]};for(let s=0;e.length>s;s++){let i;try{i=P(o,e[s],s)}catch{r.accessorErrorRows.push(s);continue}if(null==i||""===i){if(void 0!==t){r.numbers.push(t),r.finiteRows.push(s),0===t&&r.zeroRows.push(s),0>t&&r.negativeRows.push(s),Number.isInteger(t)||r.fractionalRows.push(s);continue}r.missingRows.push(s);continue}const a=I(i,n);null!=a?(r.numbers.push(a),r.finiteRows.push(s),0===a&&r.zeroRows.push(s),0>a&&r.negativeRows.push(s),Number.isInteger(a)||r.fractionalRows.push(s)):C(i)?r.nonFiniteRows.push(s):r.nonNumericRows.push(s)}return r}function S(e,o){const s=new Set(e.requirements??["finite"]);return s.add("finite"),("x"===e.role&&"log"===o.xScaleType||"y"===e.role&&"log"===o.yScaleType)&&s.add("positive"),[...s]}function T(e){return e.slice(0,5)}function M(e){return{domain:"data",...e}}function O(e,o){const n=[],{observation:t,contract:r,accessorLabel:i,requirements:a}=e,c={field:i,role:r.role},l=[...t.nonFiniteRows,...t.nonNumericRows,...t.accessorErrorRows].sort((e,o)=>e-o);if(0===t.numbers.length)return n.push(M({severity:"error",code:"DEGENERATE_EXTENT",message:`${r.accessor}="${i}" produces no finite numeric values; the chart cannot resolve its ${r.role} input.`,fix:`Ensure ${i} contains finite numbers${"x"===r.role?" (or valid dates for a time scale)":""}.`,...c,...l.length>0?{rows:T(l),count:l.length}:{}})),n;t.nonFiniteRows.length>0&&n.push(M({severity:"error",code:"NON_FINITE_VALUE",message:`${i} contains ${t.nonFiniteRows.length} NaN or infinite value${1===t.nonFiniteRows.length?"":"s"}; scale and layout math require finite numbers.`,fix:`Filter or replace NaN/Infinity in ${i} before rendering.`,...c,rows:T(t.nonFiniteRows),count:t.nonFiniteRows.length})),!r.allowMissing&&t.missingRows.length>0&&n.push(M({severity:"error",code:"MISSING_NUMERIC_VALUE",message:`${i} is missing for ${t.missingRows.length} row${1===t.missingRows.length?"":"s"}; the ${r.role} role requires an explicit numeric value.`,fix:`Fill or filter missing ${i} values before rendering.`,...c,rows:T(t.missingRows),count:t.missingRows.length}));const u=[...t.nonNumericRows,...t.accessorErrorRows].sort((e,o)=>e-o);if(u.length>0&&n.push(M({severity:"error",code:"NON_NUMERIC_VALUE",message:`${i} produces ${u.length} non-numeric value${1===u.length?"":"s"} for the ${r.role} role.`,fix:`Bind ${r.accessor} to a numeric field or return finite numbers from the accessor.`,...c,rows:T(u),count:u.length})),r.domain&&t.numbers.length>=2){const[e,o]=function(e){let o=1/0,s=-1/0;for(const n of e)o>n&&(o=n),n>s&&(s=n);return[o,s]}(t.numbers);e===o&&n.push(M({severity:"warning",code:"ZERO_SPAN_DOMAIN",message:`${i} is constant at ${e}; its ${r.role} scale has a zero-span data domain.`,fix:`Provide varying ${r.role} values, set an explicit extent around ${e}, or use a single-value display.`,...c,rows:T(t.finiteRows),count:t.finiteRows.length}))}if(a.includes("positive")){const o=t.numbers.map((e,o)=>({number:e,row:t.finiteRows[o]})).filter(({number:e})=>0>=e).map(({row:e})=>e);if(o.length>0){const s=e.logScale;n.push(M({severity:"error",code:s?"LOG_NON_POSITIVE":"NON_POSITIVE_VALUE",message:`${i} contains ${o.length} non-positive value${1===o.length?"":"s"}, which ${s?"cannot be represented on a log scale":"violate the positive-value contract"}.`,fix:s?"Remove or transform values ≤ 0, or use a linear/symlog scale.":"Provide values greater than zero.",...c,rows:T(o),count:o.length}))}}if(a.includes("non-negative")&&t.negativeRows.length>0&&n.push(M({severity:"error",code:"size"===r.role?"NEGATIVE_SIZE":"NEGATIVE_VALUE",message:`${i} contains ${t.negativeRows.length} negative ${r.role} value${1===t.negativeRows.length?"":"s"}; the chart maps this role to non-negative geometry.`,fix:"Use a non-negative measure, clamp intentionally, or encode sign with position/color instead.",...c,rows:T(t.negativeRows),count:t.negativeRows.length})),a.includes("integer")){const e=[...new Set([...t.negativeRows,...t.zeroRows,...t.fractionalRows])].sort((e,o)=>e-o);e.length>0&&n.push(M({severity:"error",code:"INVALID_COUNT",message:`${i} contains ${e.length} value${1===e.length?"":"s"} that are not positive integers.`,fix:"Counts must be integers ≥ 1; aggregate, round intentionally, or use a continuous-value encoding.",...c,rows:T(e),count:e.length}))}if(a.includes("unit-interval")){const e=t.numbers.map((e,o)=>({number:e,row:t.finiteRows[o]})).filter(({number:e})=>0>e||e>1).map(({row:e})=>e);e.length>0&&n.push(M({severity:"error",code:"OUTSIDE_UNIT_INTERVAL",message:`${i} contains ${e.length} value${1===e.length?"":"s"} outside [0, 1].`,fix:`Normalize ${i} to [0, 1] before using it as ${r.role}.`,...c,rows:T(e),count:e.length}))}if(o&&r.domain){const o=function(e){const o=e.observation.numbers.map((o,s)=>({value:o,row:e.observation.finiteRows[s]})).sort((e,o)=>e.value-o.value);if(8>o.length)return[];const n=o.map(e=>e.value),t=s(n,.25),r=s(n,.75),i=s(n,.5),a=r-t;if(a>0){const e=t-10*a,s=r+10*a;return o.filter(o=>e>o.value||o.value>s).map(e=>e.row)}const c=100*Math.max(1,Math.abs(i));return o.filter(e=>Math.abs(e.value-i)>c).map(e=>e.row)}(e);o.length>0&&n.push(M({severity:"warning",code:"OUTLIER_DOMINATED_DOMAIN",message:`${i} has ${o.length} extreme value${1===o.length?"":"s"} beyond the 10×IQR guardrail; the main distribution may collapse visually.`,fix:"Verify the extreme values, then consider a log scale, robust extent, inset, or explicit annotation rather than silently clipping them.",...c,rows:T(o),count:o.length}))}return n}function k(e,o,s){if(!e)return"__all__";try{return P(e,o,s)+""}catch{return"__accessor_error__"}}function D(e,o,s){if(e.whenProp&&!0!==s[e.whenProp])return[];const n=o.find(o=>o.contract.role===e.role);if(!n||0===n.observation.numbers.length)return[];const t=e.groupAccessor?s[e.groupAccessor]:void 0,r="string"==typeof t||"function"==typeof t?t:e.defaultGroupAccessor,i=new Map;for(let e=0;n.rows.length>e;e++){let o;try{o=P(n.accessor,n.rows[e],e)}catch{continue}const s=I(o,void 0);if(null==s)continue;const t=k(r,n.rows[e],e),a=i.get(t)??{sum:0,magnitude:0,positive:!1,negative:!1,rows:[],negativeRows:[]};a.sum+=s,a.magnitude+=Math.abs(s),a.positive||(a.positive=s>0),a.negative||(a.negative=0>s),a.rows.push(e),0>s&&a.negativeRows.push(e),i.set(t,a)}const a=[],c=[],l=[],u=[],f=[],g=[];for(const[o,s]of i)("positive-total"===e.kind&&0>=s.sum||"normalized-total"===e.kind&&Number.EPSILON*Math.max(1,s.magnitude)*10>=Math.abs(s.sum))&&(a.push(o),u.push(...s.rows)),"normalized-total"===e.kind&&s.positive&&s.negative&&(c.push(o),f.push(...s.rows)),"normalized-total"===e.kind&&s.negative&&(l.push(o),g.push(...s.negativeRows));const d=[];return a.length>0&&d.push(M({severity:"error",code:"normalized-total"===e.kind?"ZERO_NORMALIZED_TOTAL":"NON_POSITIVE_TOTAL",message:"normalized-total"===e.kind?`${a.length} normalization group${1===a.length?" has":"s have"} a zero total, so division would be undefined.`:"The part-to-whole total is not positive, so meaningful shares cannot be computed.",fix:"normalized-total"===e.kind?"Remove empty/zero-sum groups or disable normalization.":"Provide at least one positive value and ensure the total is greater than zero.",field:n.accessorLabel,role:e.role,rows:T([...new Set(u)].sort((e,o)=>e-o)),count:a.length})),l.length>0&&d.push(M({severity:"error",code:"NEGATIVE_NORMALIZED_VALUE",message:`${l.length} normalization group${1===l.length?" contains":"s contain"} negative contributions, so conventional percentage shares are not defined.`,fix:"Use non-negative contributions, a diverging stack, or disable normalization.",field:n.accessorLabel,role:e.role,rows:T([...new Set(g)].sort((e,o)=>e-o)),count:g.length})),c.length>0&&d.push(M({severity:"warning",code:"MIXED_SIGN_NORMALIZATION",message:`${c.length} normalization group${1===c.length?" mixes":"s mix"} positive and negative contributions; percentage shares may be unstable or misleading.`,fix:"Separate positive and negative contributions, use diverging stacks, or disable normalization.",field:n.accessorLabel,role:e.role,rows:T([...new Set(f)].sort((e,o)=>e-o)),count:c.length})),d}function V(e,o,s,n={}){const t=n.contracts??function(e){return N().contracts.get(e)??$[e]}(e)??function(e){const o=[];for(const[s,n]of Object.entries(E))"string"!=typeof e[s]&&"function"!=typeof e[s]||o.push({role:n,accessor:s,..."size"===n?{requirements:["finite","non-negative"]}:{},..."x"===n||"y"===n?{domain:!0}:{}});return o.length>0?{fields:o}:void 0}(o);if(!t)return{component:e,ok:!0,rowCount:s?.length??(Array.isArray(o.data)?o.data.length:0),summary:{fieldsChecked:0,errors:0,warnings:0},contracts:[],diagnoses:[]};const r=function(e,o,s){const n=[],t=new Set;for(const r of e.fields){if(r.whenProps?.some(e=>null==o[e]))continue;const e=o[r.accessor],i="string"==typeof e||"function"==typeof e?e:r.defaultAccessor;if("string"!=typeof i&&"function"!=typeof i)continue;const{dataProp:a,rows:l}=c(r,o,s);if(0===l.length)continue;const u="string"==typeof i?i:r.accessor+"()",f=`${a}:${r.role}:${u}`;if(t.has(f))continue;t.add(f);const g=r.temporalValues??("time"===r.role||"x"===r.role&&"time"===o.xScaleType?"date-like":void 0),d="x"===r.role&&"log"===o.xScaleType||"y"===r.role&&"log"===o.yScaleType,m=S(r,o);n.push({contract:r,accessor:i,accessorLabel:u,dataProp:a,rows:l,requirements:m,logScale:d,observation:_(l,i,u,g,r.missingValue)})}return n}(t,o,s),i=[],l=!1!==n.checkOutliers;for(const e of function(e,o,s){const n=new Set;for(const t of e.fields){const e=t.dataProp??"data",r=s??o[e];if(!Array.isArray(r))continue;if(0===r.length){n.add(e);continue}const i=a(t,o);if(!i)continue;const c=r.map(e=>e?.[i]).filter(Array.isArray);c.length>0&&c.every(e=>0===e.length)&&n.add(`${e}.${i}`)}return[...n]}(t,o,s))i.push(M({severity:"error",code:"EMPTY_DATA",message:e+" is an explicitly empty array; there are no numeric inputs to render.",fix:`Provide at least one valid row, render an intentional empty state, or omit ${e} when using the ref push API.`,count:0,rows:[]}));const u=new Set(r.filter(e=>e.contract.domain&&1===e.rows.length).map(e=>e.dataProp));for(const e of u)i.push(M({severity:"warning",code:"SINGLE_ROW_DOMAIN",message:e+" has one row; a quantitative scale cannot establish variation from a single observation.",fix:"Provide at least two observations or use a single-value display such as BigNumber.",count:1,rows:[0]}));for(const e of r)i.push(...O(e,l));for(const e of t.aggregates??[])i.push(...D(e,r,o));const f=i.filter(e=>"error"===e.severity).length,g=i.length-f;return{component:e,ok:0===f,rowCount:r.reduce((e,o)=>Math.max(e,o.rows.length),s?.length??(Array.isArray(o.data)?o.data.length:0)),summary:{fieldsChecked:r.length,errors:f,warnings:g},contracts:r.map(e=>({role:e.contract.role,accessor:e.accessorLabel,dataProp:e.dataProp,requirements:e.requirements,allowMissing:!0===e.contract.allowMissing,...void 0!==e.contract.missingValue?{missingValue:e.contract.missingValue}:{},domain:!0===e.contract.domain})),diagnoses:i}}export{$ as BUILT_IN_NUMERIC_CONTRACTS,x as registerNumericContracts,z as unregisterNumericContracts,n as profileNumericFields,t as formatDataAudit,i as toDataAuditNotifications,V as auditData};
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ function t(t){let n=1/0,o=-1/0;for(const e of t)n>e&&(n=e),e>o&&(o=e);return[n,o]}function n(t,n=1/0){let o=n;for(const n of t)o>n&&(o=n);return o}function o(t,n=-1/0){let o=n;for(const n of t)n>o&&(o=n);return o}function e(t){return Math.round(100*t)/100}function r(t){const n=[0,0,0,0];let o=0;for(const[e,r]of t)null!==r&&(o++,n[0]+=e,n[1]+=r,n[2]+=e*e,n[3]+=e*r);const r=o*n[2]-n[0]*n[0],u=0===r?0:e((o*n[3]-n[0]*n[1])/r),f=e(n[1]/o-u*n[0]/o);return{points:t.map(([t])=>[e(t),e(u*t+f)]),equation:[u,f]}}function u(t,n=2){const o=[],r=[],u=n+1;for(let n=0;u>n;n++){let e=0;for(const[o,r]of t)null!==r&&(e+=o**n*r);o.push(e);const f=[];for(let o=0;u>o;o++){let e=0;for(const[r,u]of t)null!==u&&(e+=r**(n+o));f.push(e)}r.push(f)}r.push(o);const f=function(t,n){const o=t,e=t.length-1,r=[n];for(let t=0;e>t;t++){let n=t;for(let r=t+1;e>r;r++)Math.abs(o[t][r])>Math.abs(o[t][n])&&(n=r);for(let r=t;e+1>r;r++){const e=o[r][t];o[r][t]=o[r][n],o[r][n]=e}for(let n=t+1;e>n;n++)for(let r=e;r>=t;r--)o[r][n]-=o[r][t]*o[t][n]/o[t][t]}for(let t=e-1;t>=0;t--){let n=0;for(let u=t+1;e>u;u++)n+=o[u][t]*r[u];r[t]=(o[e][t]-n)/o[t][t]}return r}(r,u).map(e);return{points:t.map(([t])=>[e(t),e(f.reduce((n,o,e)=>n+o*t**e,0))]),equation:[...f].reverse()}}function f(t){const n=t.length;let o=0,e=0,r=0,u=0;for(const[n,f]of t)o+=n,e+=f,r+=n*n,u+=n*f;const f=n*r-o*o;if(1e-12>Math.abs(f))return null;const c=(n*u-o*e)/f,s=(e-c*o)/n;return t=>s+c*t}function c(t,n){const o=t.length,e=t.map(([t,o])=>o-n(t)).reduce((t,n)=>t+n*n,0),r=Math.sqrt(e/Math.max(o-2,1)),u=t.reduce((t,n)=>t+n[0],0)/o,f=t.reduce((t,n)=>t+(n[0]-u)**2,0);return{se:r,meanX:u,ssX:f}}function s(t){return.99>t?.95>t?.9>t?1:1.645:1.96:2.576}export{t as getMinMax,n as getMin,o as getMax,r as linearRegression,u as polynomialRegression,f as fitLinearForForecast,c as forecastIntervalStats,s as confidenceZScore};