semiotic 3.8.9 → 3.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (502) hide show
  1. package/README.md +55 -81
  2. package/agent-skill/semiotic-charts/SKILL.md +11 -2
  3. package/ai/behaviorContracts.cjs +33 -3
  4. package/ai/cli.js +53 -2
  5. package/ai/componentMetadata.cjs +15 -0
  6. package/ai/dist/mcp-server.js +1530 -611
  7. package/ai/examples.md +48 -42
  8. package/{CLAUDE.md → ai/reference.md} +43 -22
  9. package/ai/schema.json +10603 -986
  10. package/ai/surface-manifest.json +643 -2
  11. package/ai/system-prompt.md +83 -130
  12. package/dist/c-3BLJEQNG.min.js +1 -0
  13. package/dist/c-3KZD6AXJ.min.js +1 -0
  14. package/dist/c-4TWEX5HG.min.js +1 -0
  15. package/dist/c-52TEGIUJ.min.js +1 -0
  16. package/dist/c-5YCIX3VZ.min.js +1 -0
  17. package/dist/c-6FEKTA3U.min.js +1 -0
  18. package/dist/c-6O5EVOPH.min.js +1 -0
  19. package/dist/c-74HEEZGK.min.js +1 -0
  20. package/dist/c-AKAF6JAD.min.js +1 -0
  21. package/dist/c-BBKITSXB.min.js +1 -0
  22. package/dist/c-BWNB6USU.min.js +1 -0
  23. package/dist/c-C25ENHIK.min.js +1 -0
  24. package/dist/c-CDR5AO3R.min.js +1 -0
  25. package/dist/c-COHXCW3Q.min.js +1 -0
  26. package/dist/{chunk-scatterplotMatrixBrushOverlay-SDIZSN66.module.min.js → c-DADXPJXV.min.js} +0 -1
  27. package/dist/c-E3JFRRMI.min.js +1 -0
  28. package/dist/c-EBFPQHHO.min.js +1 -0
  29. package/dist/c-G36WS6LN.min.js +1 -0
  30. package/dist/c-GIKRQI4X.min.js +1 -0
  31. package/dist/c-GPYOFETM.min.js +1 -0
  32. package/dist/c-IDUHYYSI.min.js +1 -0
  33. package/dist/{chunk-chunk-FQPKOAIH.module.min.js → c-IUHFPMHD.min.js} +0 -1
  34. package/dist/c-J5G56TUH.min.js +1 -0
  35. package/dist/c-JAZ73J32.min.js +1 -0
  36. package/dist/c-KG3NXHAL.min.js +1 -0
  37. package/dist/c-KII3PLZE.min.js +1 -0
  38. package/dist/c-LIXGXMNS.min.js +1 -0
  39. package/dist/c-LVEY6D6B.min.js +1 -0
  40. package/dist/c-M4Y3BHFR.min.js +1 -0
  41. package/dist/c-MAIICR2Z.min.js +1 -0
  42. package/dist/c-MG5DM6VE.min.js +1 -0
  43. package/dist/{chunk-minimapBrushOverlay-JU57U7NM.module.min.js → c-MNF2S4AA.min.js} +0 -1
  44. package/dist/c-MT3WBK7M.min.js +1 -0
  45. package/dist/c-NY3JWV2K.min.js +1 -0
  46. package/dist/c-O6U6K4CW.min.js +1 -0
  47. package/dist/c-OCI56QF2.min.js +1 -0
  48. package/dist/c-OQ7M4AGV.min.js +1 -0
  49. package/dist/c-OXYMVK7Q.min.js +1 -0
  50. package/dist/c-PPWDL5ZI.min.js +1 -0
  51. package/dist/c-QHF5YON3.min.js +1 -0
  52. package/dist/c-RR3GO5SW.min.js +1 -0
  53. package/dist/{chunk-chunk-J5QD4RAM.module.min.js → c-RSVIHIQ4.min.js} +0 -1
  54. package/dist/{chunk-chunk-EMO5NUGE.module.min.js → c-S2BXNNJN.min.js} +0 -1
  55. package/dist/{chunk-chunk-YCQYG6J5.module.min.js → c-SLGMUBUL.min.js} +0 -1
  56. package/dist/c-SUILCHWU.min.js +1 -0
  57. package/dist/c-TZW3JGJ5.min.js +1 -0
  58. package/dist/c-US5ZFT6E.min.js +1 -0
  59. package/dist/{chunk-chunk-RZH7VZYS.module.min.js → c-USFMFKIH.min.js} +0 -1
  60. package/dist/c-UUKVD4WB.min.js +1 -0
  61. package/dist/{chunk-chunk-SV4XAZ3Q.module.min.js → c-VGW3VG3I.min.js} +0 -1
  62. package/dist/c-W3CE4A4S.min.js +1 -0
  63. package/dist/{chunk-chunk-2NVFEB7P.module.min.js → c-WJCD5EUY.min.js} +0 -1
  64. package/dist/{chunk-chunk-2JGJ5GUG.module.min.js → c-X5UBGU2V.min.js} +0 -1
  65. package/dist/c-YDAY2WFR.min.js +1 -0
  66. package/dist/c-ZOWWU34K.min.js +1 -0
  67. package/dist/components/AccessibleNavTree.d.ts +1 -1
  68. package/dist/components/CategoryColors.d.ts +1 -1
  69. package/dist/components/GradientLegend.d.ts +14 -0
  70. package/dist/components/Legend.d.ts +2 -7
  71. package/dist/components/LinkedCharts.d.ts +1 -1
  72. package/dist/components/MobileAnnotationCalloutList.d.ts +1 -1
  73. package/dist/components/ObservationReadout.d.ts +45 -0
  74. package/dist/components/ThemeProvider.d.ts +4 -4
  75. package/dist/components/Tooltip/FlippingTooltip.d.ts +5 -7
  76. package/dist/components/Tooltip/Tooltip.d.ts +30 -5
  77. package/dist/components/Tooltip/tooltipChrome.d.ts +43 -0
  78. package/dist/components/ai/chartCapabilityTypes.d.ts +86 -2
  79. package/dist/components/ai/chartClinic.d.ts +2 -0
  80. package/dist/components/ai/deriveProfileFields.d.ts +40 -0
  81. package/dist/components/ai/evaluateChart.d.ts +85 -0
  82. package/dist/components/ai/fieldPolicy.d.ts +7 -0
  83. package/dist/components/ai/fieldRoles.d.ts +24 -0
  84. package/dist/components/ai/generativeChart.d.ts +18 -2
  85. package/dist/components/ai/inferIntent.d.ts +26 -2
  86. package/dist/components/ai/intents.d.ts +35 -0
  87. package/dist/components/ai/navigationTree.d.ts +2 -2
  88. package/dist/components/ai/observedSceneAudit.d.ts +2 -1
  89. package/dist/components/ai/profileData.d.ts +11 -0
  90. package/dist/components/ai/repairChartConfig.d.ts +2 -3
  91. package/dist/components/ai/semanticEvidence.d.ts +4 -0
  92. package/dist/components/ai/semanticViability.d.ts +11 -0
  93. package/dist/components/ai/semanticViabilityRegistry.d.ts +5 -0
  94. package/dist/components/ai/streamingTypes.d.ts +4 -0
  95. package/dist/components/ai/suggestCharts.d.ts +5 -6
  96. package/dist/components/ai/suggestDashboard.d.ts +2 -3
  97. package/dist/components/ai/suggestStreamCharts.d.ts +1 -1
  98. package/dist/components/ai/suggestStretchCharts.d.ts +2 -3
  99. package/dist/components/ai/suggestionPropContracts.d.ts +20 -0
  100. package/dist/components/ai/variantDiscovery.d.ts +3 -1
  101. package/dist/components/charts/custom/NetworkCustomChart.d.ts +3 -0
  102. package/dist/components/charts/custom/OrdinalCustomChart.d.ts +3 -0
  103. package/dist/components/charts/custom/XYCustomChart.d.ts +1 -1
  104. package/dist/components/charts/geo/ChoroplethMap.d.ts +3 -1
  105. package/dist/components/charts/geo/DistanceCartogram.d.ts +2 -7
  106. package/dist/components/charts/geo/cartogramOverlay.d.ts +28 -0
  107. package/dist/components/charts/index.d.ts +4 -3
  108. package/dist/components/charts/network/ProcessSankey.d.ts +2 -136
  109. package/dist/components/charts/network/ProcessSankeyProps.d.ts +139 -0
  110. package/dist/components/charts/network/Treemap.d.ts +2 -1
  111. package/dist/components/charts/network/processSankey/boundaryHubOrdering.d.ts +23 -0
  112. package/dist/components/charts/network/processSankey/layoutGeometry.d.ts +2 -0
  113. package/dist/components/charts/network/processSankey/ordering.d.ts +3 -41
  114. package/dist/components/charts/network/processSankey/orderingTypes.d.ts +32 -0
  115. package/dist/components/charts/network/processSankey/packing.d.ts +1 -1
  116. package/dist/components/charts/network/processSankey/packingCache.d.ts +1 -1
  117. package/dist/components/charts/network/processSankey/packingOptimization.d.ts +72 -0
  118. package/dist/components/charts/ordinal/BarChart.d.ts +4 -3
  119. package/dist/components/charts/ordinal/FunnelChart.d.ts +2 -0
  120. package/dist/components/charts/ordinal/GroupedBarChart.d.ts +3 -2
  121. package/dist/components/charts/ordinal/StackedBarChart.d.ts +4 -3
  122. package/dist/components/charts/ordinal/SwimlaneChart.d.ts +2 -2
  123. package/dist/components/charts/physics/GaltonBoardChart.d.ts +2 -9
  124. package/dist/components/charts/physics/GauntletChart.d.ts +10 -41
  125. package/dist/components/charts/physics/ProcessFlowChart.d.ts +1 -1
  126. package/dist/components/charts/physics/chainReactionAccessibleTable.d.ts +9 -0
  127. package/dist/components/charts/physics/chainReactionRuntime.d.ts +2 -1
  128. package/dist/components/charts/physics/chainReactionTypes.d.ts +5 -1
  129. package/dist/components/charts/physics/crucibleBodyRenderers.d.ts +2 -2
  130. package/dist/components/charts/physics/crucibleClone.d.ts +6 -0
  131. package/dist/components/charts/physics/crucibleEffects.d.ts +1 -2
  132. package/dist/components/charts/physics/crucibleRecord.d.ts +7 -0
  133. package/dist/components/charts/physics/gauntletChrome.d.ts +4 -4
  134. package/dist/components/charts/physics/gauntletPhysics.d.ts +1 -0
  135. package/dist/components/charts/physics/gauntletPublic.d.ts +4 -0
  136. package/dist/components/charts/physics/packetFlowOverlay.d.ts +7 -0
  137. package/dist/components/charts/physics/physicsChartLayout.d.ts +8 -0
  138. package/dist/components/charts/physics/physicsChartShared.d.ts +3 -1
  139. package/dist/components/charts/physics/physicsChartUtils.d.ts +1 -1
  140. package/dist/components/charts/physics/physicsHocUtils.d.ts +25 -12
  141. package/dist/components/charts/physics/physicsProjectionOverlays.d.ts +24 -0
  142. package/dist/components/charts/physics/processFlowOverlays.d.ts +9 -0
  143. package/dist/components/charts/realtime/RealtimeHeatmap.d.ts +15 -12
  144. package/dist/components/charts/realtime/RealtimeHistogram.d.ts +10 -7
  145. package/dist/components/charts/realtime/RealtimeLineChart.d.ts +35 -14
  146. package/dist/components/charts/realtime/RealtimeSwarmChart.d.ts +21 -14
  147. package/dist/components/charts/realtime/RealtimeWaterfallChart.d.ts +20 -13
  148. package/dist/components/charts/realtime/aggregate.d.ts +4 -1
  149. package/dist/components/charts/realtime/eventTime.d.ts +4 -0
  150. package/dist/components/charts/realtime/realtimeChartRuntime.d.ts +27 -0
  151. package/dist/components/charts/realtime/realtimeChartTypes.d.ts +30 -0
  152. package/dist/components/charts/realtime/useRealtimeCategoryColors.d.ts +30 -0
  153. package/dist/components/charts/shared/FrameTextAnnotationSVG.d.ts +10 -0
  154. package/dist/components/charts/shared/annotationActivation.d.ts +3 -7
  155. package/dist/components/charts/shared/annotationBandFill.d.ts +6 -0
  156. package/dist/components/charts/shared/annotationDispatch.d.ts +31 -0
  157. package/dist/components/charts/shared/annotationIdentity.d.ts +8 -0
  158. package/dist/components/charts/shared/annotationRules.d.ts +1 -15
  159. package/dist/components/charts/shared/boundedCategoryRegistry.d.ts +8 -0
  160. package/dist/components/charts/shared/chainReactionChartSpec.d.ts +3 -0
  161. package/dist/components/charts/shared/chartMode.d.ts +3 -2
  162. package/dist/components/charts/shared/chartSpecCore.d.ts +1 -0
  163. package/dist/components/charts/shared/frameTextAnnotation.d.ts +63 -0
  164. package/dist/components/charts/shared/gradient.d.ts +16 -0
  165. package/dist/components/charts/shared/hatchFill.d.ts +15 -0
  166. package/dist/components/charts/shared/hooks.d.ts +4 -4
  167. package/dist/components/charts/shared/legendUtils.d.ts +1 -0
  168. package/dist/components/charts/shared/streamPropsHelpers.d.ts +2 -1
  169. package/dist/components/charts/shared/styleRules.d.ts +9 -2
  170. package/dist/components/charts/shared/styleRulesWireSchema.d.ts +353 -0
  171. package/dist/components/charts/shared/types.d.ts +18 -9
  172. package/dist/components/charts/shared/useChartLegend.d.ts +43 -9
  173. package/dist/components/charts/shared/useChartSetup.d.ts +3 -1
  174. package/dist/components/charts/shared/useCustomChartSetup.d.ts +5 -2
  175. package/dist/components/charts/shared/useNetworkChartSetup.d.ts +5 -1
  176. package/dist/components/charts/shared/useOrdinalBrush.d.ts +3 -3
  177. package/dist/components/charts/shared/useStreamingLegend.d.ts +6 -1
  178. package/dist/components/charts/value/types.d.ts +1 -1
  179. package/dist/components/charts/xy/BubbleChart.d.ts +1 -1
  180. package/dist/components/charts/xy/BumpChart.capability.d.ts +14 -1
  181. package/dist/components/charts/xy/BumpChart.d.ts +13 -73
  182. package/dist/components/charts/xy/BumpChart.semanticViability.d.ts +5 -0
  183. package/dist/components/charts/xy/CandlestickChart.d.ts +2 -2
  184. package/dist/components/charts/xy/LineChart.d.ts +2 -2
  185. package/dist/components/charts/xy/Scatterplot.d.ts +1 -1
  186. package/dist/components/charts/xy/bumpData.d.ts +44 -0
  187. package/dist/components/charts/xy/bumpIdentity.d.ts +2 -0
  188. package/dist/components/charts/xy/bumpLayout.d.ts +45 -0
  189. package/dist/components/charts/xy/bumpTooltip.d.ts +20 -0
  190. package/dist/components/legendLayout.d.ts +131 -4
  191. package/dist/components/realtime/ReorderBuffer.d.ts +2 -0
  192. package/dist/components/realtime/types.d.ts +10 -1
  193. package/dist/components/recipes/balanceSnapshotsToFlows.d.ts +42 -0
  194. package/dist/components/recipes/directedReachability.d.ts +14 -0
  195. package/dist/components/recipes/gofishDisplayListFixtures.generated.d.ts +6 -6
  196. package/dist/components/recipes/gridObservatory.d.ts +1 -1
  197. package/dist/components/recipes/networkAnalysis.d.ts +1 -18
  198. package/dist/components/recipes/physics.d.ts +7 -4
  199. package/dist/components/recipes/processPhysics.d.ts +0 -1
  200. package/dist/components/recipes/waffle.d.ts +7 -4
  201. package/dist/components/semiotic-ai-core.d.ts +13 -4
  202. package/dist/components/semiotic-ai-observations.d.ts +3 -0
  203. package/dist/components/semiotic-ai.d.ts +16 -9
  204. package/dist/components/semiotic-client-shared.d.ts +10 -0
  205. package/dist/components/semiotic-experimental.d.ts +1 -1
  206. package/dist/components/semiotic-geo.d.ts +4 -1
  207. package/dist/components/semiotic-network.d.ts +7 -4
  208. package/dist/components/semiotic-ordinal.d.ts +4 -1
  209. package/dist/components/semiotic-physics.d.ts +11 -4
  210. package/dist/components/semiotic-realtime-core.d.ts +11 -4
  211. package/dist/components/semiotic-realtime-react.d.ts +4 -3
  212. package/dist/components/semiotic-realtime.d.ts +3 -1
  213. package/dist/components/semiotic-recipes-core.d.ts +7 -5
  214. package/dist/components/semiotic-server-edge.d.ts +3 -2
  215. package/dist/components/semiotic-server.d.ts +3 -2
  216. package/dist/components/semiotic-themes-core.d.ts +5 -48
  217. package/dist/components/semiotic-utils-core.d.ts +10 -5
  218. package/dist/components/semiotic-utils-react.d.ts +2 -0
  219. package/dist/components/semiotic-utils.d.ts +1 -1
  220. package/dist/components/semiotic-xy.d.ts +4 -1
  221. package/dist/components/semiotic.d.ts +68 -26
  222. package/dist/components/server/animatedGif.d.ts +1 -1
  223. package/dist/components/server/renderEvidence.d.ts +25 -2
  224. package/dist/components/server/renderToStaticSVG.d.ts +15 -7
  225. package/dist/components/server/serverChartConfigShared.d.ts +8 -1
  226. package/dist/components/server/serverChartConfigs.d.ts +1 -0
  227. package/dist/components/server/serverChartConfigsNetwork.d.ts +3 -3
  228. package/dist/components/server/serverChartConfigsNetworkChord.d.ts +2 -0
  229. package/dist/components/server/serverChartConfigsNetworkForce.d.ts +2 -0
  230. package/dist/components/server/serverChartConfigsNetworkHierarchy.d.ts +3 -0
  231. package/dist/components/server/serverChartConfigsXY.d.ts +3 -3
  232. package/dist/components/server/serverChartConfigsXYBubble.d.ts +5 -0
  233. package/dist/components/server/serverChartConfigsXYBump.d.ts +7 -0
  234. package/dist/components/server/serverChartConfigsXYScatter.d.ts +5 -0
  235. package/dist/components/server/staticAnnotationFallbacks.d.ts +10 -0
  236. package/dist/components/server/staticAnnotations.d.ts +28 -1
  237. package/dist/components/server/staticAxisTickLabel.d.ts +13 -0
  238. package/dist/components/server/staticLegend.d.ts +1 -1
  239. package/dist/components/server/staticLegendMargin.d.ts +41 -0
  240. package/dist/components/server/staticOrdinal.d.ts +8 -2
  241. package/dist/components/server/staticPhysics.d.ts +13 -1
  242. package/dist/components/server/staticPhysicsChrome.d.ts +20 -0
  243. package/dist/components/server/staticRawLegend.d.ts +15 -0
  244. package/dist/components/server/staticSVGChrome.d.ts +16 -55
  245. package/dist/components/server/staticXYAxes.d.ts +27 -0
  246. package/dist/components/server/staticXYAxisTicks.d.ts +39 -0
  247. package/dist/components/server/staticXYGrid.d.ts +11 -0
  248. package/dist/components/server/themeResolver.d.ts +5 -1
  249. package/dist/components/store/ThemeStore.d.ts +2 -98
  250. package/dist/components/store/designTokens.d.ts +1 -1
  251. package/dist/components/store/themeCSSVariables.d.ts +10 -0
  252. package/dist/components/store/themeCore.d.ts +91 -0
  253. package/dist/components/store/themePresets.d.ts +81 -0
  254. package/dist/components/store/themeSerialization.d.ts +2 -1
  255. package/dist/components/stream/AccessibleDataTable.d.ts +12 -14
  256. package/dist/components/stream/AccessibleTablePortalImpl.d.ts +6 -0
  257. package/dist/components/stream/GeoTileRenderer.d.ts +2 -0
  258. package/dist/components/stream/NetworkCanvasHitTester.d.ts +3 -1
  259. package/dist/components/stream/NetworkSSRFrame.d.ts +2 -1
  260. package/dist/components/stream/NetworkSVGOverlay.d.ts +3 -31
  261. package/dist/components/stream/OrdinalCanvasHitTester.d.ts +2 -0
  262. package/dist/components/stream/SVGChartTitle.d.ts +9 -0
  263. package/dist/components/stream/SVGOverlay.d.ts +1 -21
  264. package/dist/components/stream/SVGUnderlay.d.ts +24 -0
  265. package/dist/components/stream/SceneToSVG.d.ts +1 -1
  266. package/dist/components/stream/StreamGeoFrame.d.ts +1 -1
  267. package/dist/components/stream/StreamOrdinalFrame.d.ts +1 -1
  268. package/dist/components/stream/StreamXYFrame.d.ts +1 -1
  269. package/dist/components/stream/accessibleDataRows.d.ts +11 -0
  270. package/dist/components/stream/accessibleDataTableModel.d.ts +40 -0
  271. package/dist/components/stream/accessibleTableTypes.d.ts +11 -0
  272. package/dist/components/stream/axisTickUtils.d.ts +19 -0
  273. package/dist/components/stream/canvasBackground.d.ts +10 -0
  274. package/dist/components/stream/canvasSetup.d.ts +9 -0
  275. package/dist/components/stream/frameCursorInteraction.d.ts +25 -0
  276. package/dist/components/stream/frameDefaultMargins.d.ts +37 -0
  277. package/dist/components/stream/frameGraphics.d.ts +18 -0
  278. package/dist/components/stream/frameGraphicsSubscription.d.ts +26 -0
  279. package/dist/components/stream/frameLegendOptions.d.ts +18 -0
  280. package/dist/components/stream/geoFrameCursorInteraction.d.ts +9 -0
  281. package/dist/components/stream/geoFrameHelpers.d.ts +29 -1
  282. package/dist/components/stream/geoTypes.d.ts +10 -11
  283. package/dist/components/stream/hitTarget.d.ts +61 -2
  284. package/dist/components/stream/moduleWorkerSession.d.ts +6 -0
  285. package/dist/components/stream/networkAnnotationAnchors.d.ts +37 -0
  286. package/dist/components/stream/networkCustomLayout.d.ts +2 -2
  287. package/dist/components/stream/networkFrameCursorInteraction.d.ts +12 -0
  288. package/dist/components/stream/networkFrameInteraction.d.ts +2 -0
  289. package/dist/components/stream/networkFramePaint.d.ts +7 -0
  290. package/dist/components/stream/networkPipelineConfig.d.ts +1 -1
  291. package/dist/components/stream/networkTypes.d.ts +30 -32
  292. package/dist/components/stream/normalizeXYData.d.ts +7 -0
  293. package/dist/components/stream/ordinalFrameCursorInteraction.d.ts +7 -0
  294. package/dist/components/stream/ordinalFrameInteraction.d.ts +29 -0
  295. package/dist/components/stream/ordinalSceneSVG.d.ts +10 -0
  296. package/dist/components/stream/ordinalTypes.d.ts +10 -4
  297. package/dist/components/stream/physics/PhysicsBodySpatialIndex.d.ts +9 -1
  298. package/dist/components/stream/physics/PhysicsCanvasTheme.d.ts +25 -0
  299. package/dist/components/stream/physics/PhysicsControllers.d.ts +0 -3
  300. package/dist/components/stream/physics/PhysicsPipelineStore.d.ts +4 -1
  301. package/dist/components/stream/physics/PhysicsSVGOverlay.d.ts +3 -24
  302. package/dist/components/stream/physics/PhysicsSettledSVG.d.ts +9 -21
  303. package/dist/components/stream/physics/PhysicsSettledSVGElement.d.ts +37 -0
  304. package/dist/components/stream/physics/PhysicsSettledScene.d.ts +7 -3
  305. package/dist/components/stream/physics/StreamPhysicsFrame.d.ts +1 -1
  306. package/dist/components/stream/physics/StreamPhysicsTypes.d.ts +23 -4
  307. package/dist/components/stream/physics/physicsAnnotationContext.d.ts +19 -0
  308. package/dist/components/stream/physics/physicsBodyCanvas.d.ts +4 -0
  309. package/dist/components/stream/physics/physicsSettledChrome.d.ts +7 -0
  310. package/dist/components/stream/physics/usePhysicsCanvasPointer.d.ts +32 -0
  311. package/dist/components/stream/physics/usePhysicsSemanticNavigation.d.ts +36 -0
  312. package/dist/components/stream/pipelineConfig.d.ts +6 -17
  313. package/dist/components/stream/pipelineDomainResolution.d.ts +1 -1
  314. package/dist/components/stream/renderBackend.d.ts +2 -0
  315. package/dist/components/stream/renderers/canvasRenderHelpers.d.ts +13 -2
  316. package/dist/components/stream/renderers/resolveCSSColor.d.ts +7 -0
  317. package/dist/components/stream/responsiveSize.d.ts +17 -0
  318. package/dist/components/stream/sceneCursor.d.ts +41 -0
  319. package/dist/components/stream/sceneRevisionDiagnostics.d.ts +1 -1
  320. package/dist/components/stream/svgOverlayUtils.d.ts +22 -1
  321. package/dist/components/stream/types.d.ts +25 -12
  322. package/dist/components/stream/useCanvasFrameHost.d.ts +3 -1
  323. package/dist/components/stream/useFrame.d.ts +24 -1
  324. package/dist/components/stream/useResponsiveSize.d.ts +6 -1
  325. package/dist/components/stream/useStalenessCheck.d.ts +1 -1
  326. package/dist/components/stream/xyFrameAxisTypes.d.ts +15 -4
  327. package/dist/components/stream/xyFrameCursorInteraction.d.ts +6 -0
  328. package/dist/components/stream/xySceneBuilders/swarmScene.d.ts +1 -1
  329. package/dist/components/stream/xySceneBuilders/types.d.ts +6 -26
  330. package/dist/components/types/legendTypes.d.ts +6 -0
  331. package/dist/components/types/marginType.d.ts +7 -8
  332. package/dist/controls.min.js +1 -1
  333. package/dist/controls.module.min.js +1 -1
  334. package/dist/forceLayoutWorker.js +1 -1
  335. package/dist/geo.min.js +1 -1
  336. package/dist/geo.module.min.js +1 -1
  337. package/dist/network.min.js +1 -1
  338. package/dist/network.module.min.js +1 -1
  339. package/dist/ordinal.min.js +1 -1
  340. package/dist/ordinal.module.min.js +1 -1
  341. package/dist/physics-matter.module.min.js +1 -1
  342. package/dist/physics-rapier.module.min.js +1 -1
  343. package/dist/physics.min.js +1 -1
  344. package/dist/physics.module.min.js +1 -1
  345. package/dist/physicsWorker.js +1 -1
  346. package/dist/processSankeyLayoutWorker.js +1 -1
  347. package/dist/realtime.min.js +1 -1
  348. package/dist/realtime.module.min.js +1 -1
  349. package/dist/rough.min.js +1 -1
  350. package/dist/rough.module.min.js +1 -1
  351. package/dist/semiotic-ai-core.d.ts +13 -4
  352. package/dist/semiotic-ai-core.min.js +1 -1
  353. package/dist/semiotic-ai-core.module.min.js +1 -1
  354. package/dist/semiotic-ai.d.ts +16 -9
  355. package/dist/semiotic-ai.min.js +1 -1
  356. package/dist/semiotic-ai.module.min.js +1 -1
  357. package/dist/semiotic-client-cjs-shared.min.js +1 -0
  358. package/dist/semiotic-client-glyph.module.min.js +2 -0
  359. package/dist/semiotic-client-responsive.module.min.js +2 -0
  360. package/dist/semiotic-client-shared.module.min.js +2 -0
  361. package/dist/semiotic-custom-layout-selection-cjs-shared.min.js +2 -0
  362. package/dist/semiotic-data.min.js +1 -1
  363. package/dist/semiotic-data.module.min.js +1 -1
  364. package/dist/semiotic-experimental-auxiliary.module.min.js +2 -0
  365. package/dist/semiotic-experimental-node-auxiliary.module.min.js +2 -0
  366. package/dist/semiotic-experimental-node.module.min.js +2 -0
  367. package/dist/semiotic-experimental-react-shared.module.min.js +2 -0
  368. package/dist/semiotic-experimental-vacp.min.js +1 -1
  369. package/dist/semiotic-experimental-vacp.module.min.js +1 -1
  370. package/dist/semiotic-experimental.d.ts +1 -1
  371. package/dist/semiotic-experimental.min.js +1 -1
  372. package/dist/semiotic-experimental.module.min.js +1 -1
  373. package/dist/semiotic-geo.d.ts +4 -1
  374. package/dist/semiotic-network.d.ts +7 -4
  375. package/dist/semiotic-ordinal.d.ts +4 -1
  376. package/dist/semiotic-physics.d.ts +11 -4
  377. package/dist/semiotic-realtime-core.d.ts +11 -4
  378. package/dist/semiotic-realtime-core.min.js +2 -1
  379. package/dist/semiotic-realtime-core.module.min.js +2 -1
  380. package/dist/semiotic-realtime-react.d.ts +4 -3
  381. package/dist/semiotic-realtime-react.min.js +1 -1
  382. package/dist/semiotic-realtime-react.module.min.js +1 -1
  383. package/dist/semiotic-realtime.d.ts +3 -1
  384. package/dist/semiotic-recipes-core-cjs-base.min.js +1 -0
  385. package/dist/semiotic-recipes-core.d.ts +7 -5
  386. package/dist/semiotic-recipes-core.min.js +9 -1
  387. package/dist/semiotic-recipes-core.module.min.js +1 -1
  388. package/dist/semiotic-recipes-geo-cjs.min.js +1 -0
  389. package/dist/semiotic-recipes-react.min.js +1 -1
  390. package/dist/semiotic-recipes-react.module.min.js +1 -1
  391. package/dist/semiotic-recipes.min.js +7 -1
  392. package/dist/semiotic-recipes.module.min.js +2 -1
  393. package/dist/semiotic-server-edge-node.module.min.js +1 -0
  394. package/dist/semiotic-server-edge.d.ts +3 -2
  395. package/dist/semiotic-server-edge.min.js +1 -1
  396. package/dist/semiotic-server-edge.module.min.js +1 -1
  397. package/dist/semiotic-server-node.min.js +1 -1
  398. package/dist/semiotic-server-node.module.min.js +1 -1
  399. package/dist/semiotic-server.d.ts +3 -2
  400. package/dist/semiotic-themes-core.d.ts +5 -48
  401. package/dist/semiotic-themes-core.min.js +1 -1
  402. package/dist/semiotic-themes-core.module.min.js +1 -1
  403. package/dist/semiotic-themes-react.min.js +1 -1
  404. package/dist/semiotic-themes-react.module.min.js +1 -1
  405. package/dist/semiotic-themes.min.js +1 -1
  406. package/dist/semiotic-themes.module.min.js +1 -1
  407. package/dist/semiotic-utils-core.d.ts +10 -5
  408. package/dist/semiotic-utils-core.min.js +1 -1
  409. package/dist/semiotic-utils-core.module.min.js +1 -1
  410. package/dist/semiotic-utils-react.d.ts +2 -0
  411. package/dist/semiotic-utils-react.min.js +1 -1
  412. package/dist/semiotic-utils-react.module.min.js +1 -1
  413. package/dist/semiotic-utils.d.ts +1 -1
  414. package/dist/semiotic-utils.min.js +2 -1
  415. package/dist/semiotic-utils.module.min.js +2 -1
  416. package/dist/semiotic-value.min.js +1 -1
  417. package/dist/semiotic-value.module.min.js +1 -1
  418. package/dist/semiotic-xy.d.ts +4 -1
  419. package/dist/semiotic.d.ts +68 -26
  420. package/dist/semiotic.min.js +1 -1
  421. package/dist/semiotic.module.min.js +1 -1
  422. package/dist/server.min.js +1 -1
  423. package/dist/server.module.min.js +1 -1
  424. package/dist/xy.min.js +1 -1
  425. package/dist/xy.module.min.js +1 -1
  426. package/package.json +53 -19
  427. package/dist/__tests__/scenarios/mcpProtocolTypes.d.ts +0 -20
  428. package/dist/chunk-OrdinalBrushOverlay-PXHQYDB2.module.min.js +0 -2
  429. package/dist/chunk-XYBrushOverlay-ECZJJLAJ.module.min.js +0 -1
  430. package/dist/chunk-XYBrushOverlay-EP2SV3UI.module.min.js +0 -2
  431. package/dist/chunk-chartContainerDataAudit-IQ3NBN3Q.module.min.js +0 -2
  432. package/dist/chunk-chunk-2B3AIKUZ.module.min.js +0 -2
  433. package/dist/chunk-chunk-2CXCXRB4.module.min.js +0 -1
  434. package/dist/chunk-chunk-2X3FJCME.module.min.js +0 -1
  435. package/dist/chunk-chunk-2ZHHWZQM.module.min.js +0 -2
  436. package/dist/chunk-chunk-4ITOQRXM.module.min.js +0 -2
  437. package/dist/chunk-chunk-5UKL5W76.module.min.js +0 -2
  438. package/dist/chunk-chunk-5VVNW5AZ.module.min.js +0 -1
  439. package/dist/chunk-chunk-5ZON5NMV.module.min.js +0 -2
  440. package/dist/chunk-chunk-66PCWJUG.module.min.js +0 -1
  441. package/dist/chunk-chunk-6S3YGYW7.module.min.js +0 -1
  442. package/dist/chunk-chunk-6V5VQVCT.module.min.js +0 -2
  443. package/dist/chunk-chunk-7C5EDZ3Z.module.min.js +0 -2
  444. package/dist/chunk-chunk-A3I4HBD5.module.min.js +0 -1
  445. package/dist/chunk-chunk-ACLDBMRH.module.min.js +0 -2
  446. package/dist/chunk-chunk-AFQHURLO.module.min.js +0 -2
  447. package/dist/chunk-chunk-DDB4TLQG.module.min.js +0 -2
  448. package/dist/chunk-chunk-DTH3SUOU.module.min.js +0 -2
  449. package/dist/chunk-chunk-DTSNLGRK.module.min.js +0 -2
  450. package/dist/chunk-chunk-DVCWU7MT.module.min.js +0 -2
  451. package/dist/chunk-chunk-FEPXDKJP.module.min.js +0 -1
  452. package/dist/chunk-chunk-FJ76HWQZ.module.min.js +0 -1
  453. package/dist/chunk-chunk-FSIHAW6L.module.min.js +0 -2
  454. package/dist/chunk-chunk-G2RGVEYY.module.min.js +0 -2
  455. package/dist/chunk-chunk-G75OPF5N.module.min.js +0 -2
  456. package/dist/chunk-chunk-HADHLMY5.module.min.js +0 -1
  457. package/dist/chunk-chunk-HAJVODLO.module.min.js +0 -2
  458. package/dist/chunk-chunk-HBFA4NN6.module.min.js +0 -1
  459. package/dist/chunk-chunk-HIV7AW2V.module.min.js +0 -2
  460. package/dist/chunk-chunk-IY7RYD4S.module.min.js +0 -1
  461. package/dist/chunk-chunk-J3QOW4OE.module.min.js +0 -0
  462. package/dist/chunk-chunk-J3XWETBJ.module.min.js +0 -2
  463. package/dist/chunk-chunk-JZAMMSQQ.module.min.js +0 -2
  464. package/dist/chunk-chunk-KTWEBFMX.module.min.js +0 -2
  465. package/dist/chunk-chunk-LSJUXBMF.module.min.js +0 -1
  466. package/dist/chunk-chunk-MXMRXSCI.module.min.js +0 -2
  467. package/dist/chunk-chunk-MXVBXFKW.module.min.js +0 -2
  468. package/dist/chunk-chunk-NWIGA3UK.module.min.js +0 -1
  469. package/dist/chunk-chunk-OFAP623Y.module.min.js +0 -2
  470. package/dist/chunk-chunk-OHLRAEQZ.module.min.js +0 -2
  471. package/dist/chunk-chunk-OZK46A5U.module.min.js +0 -1
  472. package/dist/chunk-chunk-PMR47KRY.module.min.js +0 -2
  473. package/dist/chunk-chunk-PRNXOCYZ.module.min.js +0 -2
  474. package/dist/chunk-chunk-Q2YADC2V.module.min.js +0 -2
  475. package/dist/chunk-chunk-RLKZVJMQ.module.min.js +0 -2
  476. package/dist/chunk-chunk-ROP4HI7H.module.min.js +0 -2
  477. package/dist/chunk-chunk-SK2TQMG4.module.min.js +0 -2
  478. package/dist/chunk-chunk-SKLYXNYW.module.min.js +0 -2
  479. package/dist/chunk-chunk-TCMHJWFJ.module.min.js +0 -1
  480. package/dist/chunk-chunk-TSCFL235.module.min.js +0 -1
  481. package/dist/chunk-chunk-U4NZCU5T.module.min.js +0 -2
  482. package/dist/chunk-chunk-U66USBWU.module.min.js +0 -1
  483. package/dist/chunk-chunk-UOQRPGPK.module.min.js +0 -2
  484. package/dist/chunk-chunk-VKL6DI43.module.min.js +0 -2
  485. package/dist/chunk-chunk-W62673ZE.module.min.js +0 -1
  486. package/dist/chunk-chunk-WFHZHWT7.module.min.js +0 -1
  487. package/dist/chunk-chunk-XCC25CZZ.module.min.js +0 -2
  488. package/dist/chunk-chunk-XECNOUZY.module.min.js +0 -2
  489. package/dist/chunk-chunk-XYZDTYAF.module.min.js +0 -2
  490. package/dist/chunk-chunk-YHNZCPOZ.module.min.js +0 -2
  491. package/dist/chunk-chunk-YWZB3KPI.module.min.js +0 -2
  492. package/dist/chunk-statisticalOverlays-HMYYSGPE.module.min.js +0 -2
  493. package/dist/components/stream/test-utils/frameScheduler.d.ts +0 -12
  494. package/dist/components/stream/test-utils/revisionConsumption.d.ts +0 -13
  495. package/dist/test-utils/canvasMock.d.ts +0 -86
  496. package/dist/test-utils/capturedFrameProps.d.ts +0 -67
  497. package/dist/test-utils/frameMock.d.ts +0 -81
  498. package/dist/test-utils/ordinalFixtures.d.ts +0 -48
  499. /package/dist/{chunk-chunk-JJ2OOIET.module.min.js → c-GGISSW5E.min.js} +0 -0
  500. /package/dist/{chunk-chunk-SIRIJ3DY.module.min.js → c-N4G2L7ID.min.js} +0 -0
  501. /package/dist/{chunk-chunk-CA3YDW6F.module.min.js → c-S6U5CGT5.min.js} +0 -0
  502. /package/dist/components/recipes/{mobileAnnotationStrategy.d.ts → mobileAnnotationBehavior.d.ts} +0 -0
@@ -1,2 +0,0 @@
1
- "use client";
2
- import{darkenColor as t,lightenColor as n}from"./chunk-chunk-2JGJ5GUG.module.min.js";import{confidenceZScore as o,fitLinearForForecast as e,forecastIntervalStats as r,getMax as a,getMinMax as s}from"./chunk-chunk-2NVFEB7P.module.min.js";var i="__forecastSegment",l="__forecastOpacity";function c(t,n,o,e){const r=n.uncertaintyOpacity,a=n.confidenceAccessor;if(!r&&!a)return;const i="object"==typeof r?r:{},c=i.min??.15,f=i.max??1;if(a){const n="function"==typeof a?a:t=>t[a];for(const o of t){const t=n(o);null!=t&&Number.isFinite(t)&&(o[l]=c+Math.max(0,Math.min(1,t))*(f-c))}return}const u=t.map(t=>{const n=o(t),r=e(t);return null!=n&&null!=r&&Number.isFinite(n)&&Number.isFinite(r)?Math.abs(n-r):NaN}),p=u.filter(t=>Number.isFinite(t));if(0===p.length)return;const[h,y]=s(p),d=y-h;t.forEach((t,n)=>{const o=u[n];Number.isFinite(o)&&(t[l]=f-(d>0?(o-h)/d:0)*(f-c))})}function f(t,n){return"function"==typeof n?n(t):!!t[n]}function u(t){return[{type:"anomaly-band",threshold:t.threshold??2,showBand:!1!==t.showBand,fill:t.bandColor||"#6366f1",fillOpacity:t.bandOpacity??.1,anomalyColor:t.anomalyColor||"#ef4444",anomalyRadius:t.anomalyRadius??6,label:t.label}]}function p(t,n,s,l,u){return(p=l).isTraining||p.isForecast||p.isAnomaly||p.upperBounds||p.lowerBounds?function(t,n,o,e,r){const{isTraining:a,isForecast:s,isAnomaly:l,upperBounds:u,lowerBounds:p,color:h="#6366f1",bandOpacity:y=.15,anomalyColor:d="#ef4444",anomalyRadius:m=6,label:b}=e,g=t.map(t=>{let n="observed";return s&&f(t,s)?n="forecast":a&&f(t,a)&&(n="training"),{...t,[i]:n}}),k=e._groupBy,_=[];if(k){const t=new Map;for(const n of g){const o=n[k]??"__default";t.has(o)||t.set(o,[]),t.get(o).push(n)}const n=[];for(const[,o]of t)for(let t=0;o.length-1>t;t++)o[t][i]!==o[t+1][i]&&(n.push({...o[t+1],[i]:o[t][i]}),n.push({...o[t],[i]:o[t+1][i]}));_.push(...g,...n)}else for(let t=0;g.length>t;t++)_.push(g[t]),g.length-1>t&&g[t][i]!==g[t+1][i]&&(_.push({...g[t+1],[i]:g[t][i]}),_.push({...g[t],[i]:g[t+1][i]}));if(e.trainUnderline){const t=[];for(const n of _)"training"===n[i]&&t.push({...n,[i]:"training-base"});_.unshift(...t)}const O=[];if(u&&p){const t="string"==typeof u?u:"__envUpper",n="string"==typeof p?p:"__envLower";if("function"==typeof u||"function"==typeof p)for(const o of _)"function"==typeof u&&(o[t]=u(o)),"function"==typeof p&&(o[n]=p(o));O.push({type:"envelope",upperAccessor:t,lowerAccessor:n,fill:h,fillOpacity:y,label:b})}if(e.uncertaintyOpacity||e.confidenceAccessor){const t=u?"function"==typeof u?u:t=>t[u]:()=>{},n=p?"function"==typeof p?p:t=>t[p]:()=>{};c(_.filter(t=>"forecast"===t[i]),e,t,n)}if(l){const t=e.anomalyStyle,n={type:"highlight",filter:t=>f(t,l)};t?(n.style=t,n.r=m):"function"==typeof d?(n.style=t=>{const n=d(t);return{stroke:n,strokeWidth:1.5,fill:n,fillOpacity:.7}},n.r=m):(n.color=d,n.r=m,n.style={stroke:d,strokeWidth:1.5,fill:d,fillOpacity:.7}),O.push(n)}return r&&O.push({type:"anomaly-band",threshold:r.threshold??2,showBand:!1!==r.showBand,fill:r.bandColor||"#6366f1",fillOpacity:r.bandOpacity??.1,anomalyColor:r.anomalyColor||"#ef4444",anomalyRadius:r.anomalyRadius??6,label:r.label}),{processedData:_,annotations:O}}(t,0,0,l,u):function(t,n,s,l,f){const{trainEnd:u,steps:p=10,confidence:h=.95,color:y="#6366f1",bandOpacity:d=.15,label:m}=l;if(null==u)return{processedData:t,annotations:[]};const b=[],g=[];for(const o of t)o[n]>u?g.push({...o,[i]:"observed"}):b.push({...o,[i]:"training"});const k=b.map(t=>[t[n],t[s]]).filter(t=>null!=t[0]&&null!=t[1]&&isFinite(t[0])&&isFinite(t[1])).sort((t,n)=>t[0]-n[0]),_=[],O=[];if(k.length>=3){const f=k.length,u=e(k);if(u){const{se:e,meanX:b,ssX:g}=r(k,u),w=o(h),B=t.map(t=>t[n]).filter(t=>null!=t&&isFinite(t)),F=a(B),v=k.length>1?(k[f-1][0]-k[0][0])/(f-1):1;for(let t=1;p>=t;t++){const o=F+t*v,r=u(o),a=e*Math.sqrt(1+1/f+(g>0?(o-b)**2/g:0))*w;O.push({[n]:o,[s]:r,[i]:"forecast",__forecastUpper:r+a,__forecastLower:r-a})}c(O,l,t=>t.__forecastUpper,t=>t.__forecastLower),_.push({type:"envelope",upperAccessor:"__forecastUpper",lowerAccessor:"__forecastLower",fill:y,fillOpacity:d,label:m})}}_.push({type:"x-threshold",x:u,color:"#94a3b8",strokeWidth:1,strokeDasharray:"4,2",label:"Train / Forecast"}),f&&_.push({type:"anomaly-band",threshold:f.threshold??2,showBand:!1!==f.showBand,fill:f.bandColor||"#6366f1",fillOpacity:f.bandOpacity??.1,anomalyColor:f.anomalyColor||"#ef4444",anomalyRadius:f.anomalyRadius??6,label:f.label});const w=[];if(w.push(...b),b.length>0&&g.length>0&&w.push({...b[b.length-1],[i]:"observed"}),w.push(...g),O.length>0){const t=g.length>0?g[g.length-1]:b[b.length-1];t&&w.push({...t,[i]:"forecast"}),w.push(...O)}return{processedData:w,annotations:_}}(t,n,s,l,u);var p}function h(o,e){const r=e.trainDasharray??"8,4",a=e.forecastDasharray??"4,4",s=e.color||"#6366f1",c=e.trainOpacity,f=e.forecastOpacity,u=e.trainStroke,p=e.trainLinecap,h=e.trainUnderline;return e=>{const y=o(e),d=e[i];if("training"===d){let n=y.stroke;return"darken"===u?n=t(y.stroke||"#666",.5):u&&(n=u),{...y,stroke:n,strokeDasharray:r,...p&&{strokeLinecap:p},...null!=c&&{strokeOpacity:c}}}if("training-base"===d){let t=y.stroke||"#666";return"lighten"===h&&(t=n(t,.4)),{...y,stroke:t,strokeDasharray:void 0}}if("forecast"===d){const t=e[l],n=null!=t?t:f;return{...y,stroke:s,strokeDasharray:a,...null!=n&&{strokeOpacity:n}}}return y}}export{l as FORECAST_OPACITY_FIELD,i as SEGMENT_FIELD,u as buildAnomalyAnnotations,p as buildForecast,h as createSegmentLineStyle,t as darkenColor,n as lightenColor,c as stampForecastOpacity};
@@ -1,12 +0,0 @@
1
- import type { FrameScheduler } from "../useFrame";
2
- /**
3
- * Deterministic rAF scheduler for frame tests. It deliberately permits zero
4
- * as the first handle so tests cannot rely on truthiness for pending work.
5
- */
6
- export declare function createFrameScheduler(firstHandle?: number): {
7
- scheduler: FrameScheduler;
8
- requestedHandles: number[];
9
- cancelledHandles: number[];
10
- readonly pendingCount: number;
11
- flush(timestamp?: number): void;
12
- };
@@ -1,13 +0,0 @@
1
- import { SceneRevisionDiagnostics, type SceneRevisionCheck } from "../sceneRevisionDiagnostics";
2
- import type { UpdateResult } from "../pipelineUpdateContract";
3
- export interface UnconsumedSceneRevisionProbe {
4
- diagnostics: SceneRevisionDiagnostics;
5
- initial: SceneRevisionCheck;
6
- later: SceneRevisionCheck;
7
- }
8
- /**
9
- * Assert the contract that a later style/state result cannot conceal scene
10
- * work that a host has not consumed. Callers finish the probe with
11
- * `diagnostics.afterCompute(probe.later, false, false)` and assert its warning.
12
- */
13
- export declare function assertUnconsumedSceneRevisionSurvivesLaterUpdate(initialResult: UpdateResult, laterResult: UpdateResult, hostName?: string): UnconsumedSceneRevisionProbe;
@@ -1,86 +0,0 @@
1
- /**
2
- * Mock 2D canvas rendering context — structurally a `Partial<CanvasRenderingContext2D>`
3
- * with method spies, plus a few extra stub fields. Typed as a loose stringy
4
- * bag because vitest's `vi.fn()` return type doesn't line up with
5
- * `CanvasRenderingContext2D`'s method signatures and tests inspect the spies
6
- * directly via `ctx.fillRect.mock.calls` etc.
7
- */
8
- export type CanvasContextMock = Record<string, unknown>;
9
- /**
10
- * Creates a mock 2D canvas rendering context with all commonly used
11
- * methods stubbed as vi.fn() and properties set to sensible defaults.
12
- *
13
- * This is the single canonical canvas mock for the entire test suite.
14
- * Import from "../../test-utils/canvasMock" (or appropriate relative path).
15
- */
16
- export declare function createMockCanvasContext(): CanvasContextMock;
17
- /**
18
- * Record style state at the moment each draw op fires.
19
- *
20
- * Counting `ctx.fill` / `ctx.stroke` calls is brittle — a refactor that
21
- * batches two paths into one stroke changes the count without changing
22
- * what's visible. This helper instead captures the style state (`fillStyle`,
23
- * `strokeStyle`, `globalAlpha`, `lineWidth`) at each draw call, so tests
24
- * can assert on *what was drawn with what appearance* rather than on how
25
- * many primitives the renderer emitted to get there.
26
- *
27
- * Usage:
28
- * const ctx = createMockCanvasContext()
29
- * const ops = recordCanvasOps(ctx)
30
- * someRenderer(ctx, nodes, ...)
31
- * expect(ops.fillStyles).toEqual(["#e41a1c", "rgba(255,255,0,0.5)"])
32
- */
33
- export interface CanvasOpLog {
34
- fillStyles: string[];
35
- strokeStyles: string[];
36
- fillAlphas: number[];
37
- strokeAlphas: number[];
38
- /** `lineWidth` at the moment each stroke fired — useful for pulse /
39
- * emphasis renderers that vary stroke weight by intensity. */
40
- strokeLineWidths: number[];
41
- }
42
- export declare function recordCanvasOps(ctx: CanvasContextMock): CanvasOpLog;
43
- /**
44
- * rAF stubbing flavor:
45
- *
46
- * - `true` — synchronous fire: the rAF callback runs immediately when
47
- * scheduled. Default. Right for most tests that just want a paint
48
- * to happen before assertions, but recurses indefinitely for
49
- * components that re-schedule rAF inside the callback (force
50
- * simulations, continuous render loops).
51
- *
52
- * - `false` — leave jsdom's default rAF in place (setTimeout-backed,
53
- * ~16ms). Right for tests that exercise the actual rAF cadence and
54
- * use `waitFor` to settle. Pairs with force-simulation specs.
55
- *
56
- * - `"noop"` — install a stub that returns an id but never fires the
57
- * callback. Right for "observe initial state" regression tests that
58
- * want a single mount-time render and nothing else (the frame
59
- * regression suites that spy on `updateConfig` use this).
60
- *
61
- * - `"microtask"` — fire the callback on a `Promise.resolve().then(...)`
62
- * microtask. Right for tests where synchronous fire would recurse
63
- * `scheduleRender` but jsdom's setTimeout cadence introduces
64
- * undesirable latency (StrictMode double-mount tests use this).
65
- */
66
- export type StubRafMode = boolean | "noop" | "microtask";
67
- export interface SetupCanvasMockOptions {
68
- stubRaf?: StubRafMode;
69
- }
70
- /**
71
- * Sets up the canvas getContext mock on HTMLCanvasElement.prototype, the
72
- * Path2D global, and (optionally) synchronous rAF/cAF stubs.
73
- *
74
- * @returns A cleanup function that restores the mocked globals.
75
- *
76
- * @example
77
- * ```ts
78
- * let cleanup: () => void
79
- * beforeEach(() => { cleanup = setupCanvasMock() }) // sync rAF (default)
80
- * beforeEach(() => { cleanup = setupCanvasMock({ stubRaf: false }) }) // jsdom rAF (force-sim specs)
81
- * beforeEach(() => { cleanup = setupCanvasMock({ stubRaf: "noop" }) }) // never fires (mount-only regression)
82
- * beforeEach(() => { cleanup = setupCanvasMock({ stubRaf: "microtask" }) }) // Promise.resolve fire (StrictMode)
83
- * afterEach(() => { cleanup() })
84
- * ```
85
- */
86
- export declare function setupCanvasMock(options?: SetupCanvasMockOptions): () => void;
@@ -1,67 +0,0 @@
1
- import type { ReactNode } from "react";
2
- import type { Datum } from "../components/charts/shared/datumTypes";
3
- import type { StreamXYFrameProps, Style } from "../components/stream/types";
4
- import type { StreamOrdinalFrameProps } from "../components/stream/ordinalTypes";
5
- import type { StreamNetworkFrameProps } from "../components/stream/networkTypes";
6
- import type { StreamGeoFrameProps } from "../components/stream/geoTypes";
7
- type CapturedStyleResult = Required<Style> & {
8
- pointerEvents: string;
9
- };
10
- type CapturedStyle = (datum: Datum, group?: string) => CapturedStyleResult;
11
- type CapturedNumberAccessor = (datum: Datum) => number;
12
- type CapturedValueAccessor = (datum: Datum) => number | string | Date;
13
- type CapturedStringAccessor = (datum: Datum) => string;
14
- type CapturedTooltip = (datum: Datum) => ReactNode;
15
- interface CapturedLegendItem {
16
- label: ReactNode;
17
- value?: string | number;
18
- color?: string;
19
- }
20
- interface CapturedLegend {
21
- legendGroups: Array<{
22
- label?: ReactNode;
23
- items: CapturedLegendItem[];
24
- styleFn: CapturedStyle;
25
- }>;
26
- }
27
- interface CapturedNetworkLayoutConfig {
28
- bands: Array<Datum & {
29
- id: string;
30
- }>;
31
- ribbons: Datum[];
32
- }
33
- export type CapturedXYFrameProps = Omit<Required<StreamXYFrameProps>, "lineStyle" | "pointStyle" | "tooltipContent" | "legend" | "xAccessor" | "yAccessor" | "groupAccessor"> & {
34
- lineStyle: CapturedStyle;
35
- pointStyle: CapturedStyle;
36
- tooltipContent: CapturedTooltip;
37
- legend: CapturedLegend;
38
- xAccessor: CapturedValueAccessor;
39
- yAccessor: CapturedNumberAccessor;
40
- groupAccessor: CapturedStringAccessor;
41
- };
42
- export type CapturedOrdinalFrameProps = Omit<Required<StreamOrdinalFrameProps>, "pieceStyle" | "summaryStyle" | "tooltipContent" | "legend" | "oAccessor" | "rAccessor"> & {
43
- pieceStyle: CapturedStyle;
44
- summaryStyle: CapturedStyle;
45
- tooltipContent: CapturedTooltip;
46
- legend: CapturedLegend;
47
- oAccessor: CapturedStringAccessor;
48
- rAccessor: CapturedNumberAccessor;
49
- };
50
- export type CapturedNetworkFrameProps = Omit<Required<StreamNetworkFrameProps>, "nodeStyle" | "edgeStyle" | "hierarchySum" | "nodeLabel" | "layoutConfig"> & {
51
- nodeStyle: CapturedStyle;
52
- edgeStyle: CapturedStyle;
53
- hierarchySum: CapturedNumberAccessor;
54
- nodeLabel: CapturedStringAccessor;
55
- layoutConfig: CapturedNetworkLayoutConfig;
56
- };
57
- export type CapturedGeoFrameProps = Omit<Required<StreamGeoFrameProps>, "areaStyle" | "lineStyle" | "pointStyle" | "xAccessor" | "yAccessor" | "tooltipContent" | "legend" | "foregroundGraphics"> & {
58
- areaStyle: CapturedStyle;
59
- lineStyle: CapturedStyle;
60
- pointStyle: CapturedStyle;
61
- xAccessor: CapturedNumberAccessor;
62
- yAccessor: CapturedNumberAccessor;
63
- tooltipContent: CapturedTooltip;
64
- legend: CapturedLegend;
65
- foregroundGraphics: ReactNode;
66
- };
67
- export {};
@@ -1,81 +0,0 @@
1
- import * as React from "react";
2
- import type { StreamXYFrameProps } from "../components/stream/types";
3
- import type { StreamOrdinalFrameProps } from "../components/stream/ordinalTypes";
4
- import type { StreamNetworkFrameProps } from "../components/stream/networkTypes";
5
- /**
6
- * Creates a vi.mock factory for a Stream Frame module that captures
7
- * the props passed to the frame component.
8
- *
9
- * The mock renders a simple div with the appropriate CSS class and
10
- * an inner <svg /> element, matching the real frame's DOM structure.
11
- *
12
- * @param className - The CSS class the mock div should use
13
- * (e.g., "stream-ordinal-frame", "stream-network-frame", "stream-xy-frame").
14
- * @returns An object with:
15
- * - `factory` — the mock module factory to pass to `vi.mock(path, factory)`
16
- * - `getLastProps()` — returns the most recent props passed to the frame
17
- * - `reset()` — clears captured props (call in beforeEach)
18
- */
19
- export declare function createFrameMock<TProps extends object>(className: string): {
20
- factory: () => {
21
- __esModule: boolean;
22
- default: (props: TProps) => React.DetailedReactHTMLElement<{
23
- className: string;
24
- }, HTMLElement>;
25
- };
26
- getLastProps: () => TProps;
27
- reset: () => void;
28
- };
29
- /**
30
- * Pre-built mock for StreamOrdinalFrame.
31
- *
32
- * Usage:
33
- * ```ts
34
- * import { ordinalFrameMock } from "../../test-utils/frameMock"
35
- *
36
- * vi.mock("../../stream/StreamOrdinalFrame", ordinalFrameMock.factory)
37
- *
38
- * beforeEach(() => ordinalFrameMock.reset())
39
- *
40
- * it("passes correct props", () => {
41
- * render(<BarChart data={data} />)
42
- * expect(ordinalFrameMock.getLastProps().chartType).toBe("bar")
43
- * })
44
- * ```
45
- */
46
- export declare const ordinalFrameMock: {
47
- factory: () => {
48
- __esModule: boolean;
49
- default: (props: StreamOrdinalFrameProps<import("../components/stream/networkColorAccessors").Datum>) => React.DetailedReactHTMLElement<{
50
- className: string;
51
- }, HTMLElement>;
52
- };
53
- getLastProps: () => StreamOrdinalFrameProps<import("../components/stream/networkColorAccessors").Datum>;
54
- reset: () => void;
55
- };
56
- /**
57
- * Pre-built mock for StreamNetworkFrame.
58
- */
59
- export declare const networkFrameMock: {
60
- factory: () => {
61
- __esModule: boolean;
62
- default: (props: StreamNetworkFrameProps<import("../components/stream/networkColorAccessors").Datum>) => React.DetailedReactHTMLElement<{
63
- className: string;
64
- }, HTMLElement>;
65
- };
66
- getLastProps: () => StreamNetworkFrameProps<import("../components/stream/networkColorAccessors").Datum>;
67
- reset: () => void;
68
- };
69
- /**
70
- * Pre-built mock for StreamXYFrame.
71
- */
72
- export declare const xyFrameMock: {
73
- factory: () => {
74
- __esModule: boolean;
75
- default: (props: StreamXYFrameProps<import("../components/stream/networkColorAccessors").Datum>) => React.DetailedReactHTMLElement<{
76
- className: string;
77
- }, HTMLElement>;
78
- };
79
- getLastProps: () => StreamXYFrameProps<import("../components/stream/networkColorAccessors").Datum>;
80
- reset: () => void;
81
- };
@@ -1,48 +0,0 @@
1
- /**
2
- * Shared sample datasets for ordinal HOC chart tests (BarChart,
3
- * StackedBarChart, GroupedBarChart). Previously defined locally in each
4
- * test file with slight variations; this module is the single source of
5
- * truth so shape changes (new fields, accessor renames) flow through every
6
- * consumer at once.
7
- */
8
- export interface BarDatum {
9
- category: string;
10
- value: number;
11
- }
12
- /** 3-point baseline used by most BarChart rendering tests. */
13
- export declare const BAR_SAMPLE: readonly BarDatum[];
14
- /** Smaller 2-point variant for initial-render / update-on-change tests. */
15
- export declare const BAR_INITIAL: readonly BarDatum[];
16
- /** Extended 3-point variant for "data changed" rerender tests. */
17
- export declare const BAR_EXTENDED: readonly BarDatum[];
18
- export interface NamedCountDatum {
19
- name: string;
20
- count: number;
21
- }
22
- /** `{name, count}` shape for verifying `categoryAccessor` / `valueAccessor` overrides. */
23
- export declare const NAMED_COUNT_DATA: readonly NamedCountDatum[];
24
- export interface ColoredBarDatum {
25
- category: string;
26
- value: number;
27
- type: string;
28
- }
29
- /** Used for `colorBy="type"` legend-behavior tests. */
30
- export declare const BAR_COLORED: readonly ColoredBarDatum[];
31
- export interface StackedBarDatum {
32
- category: string;
33
- product: string;
34
- value: number;
35
- }
36
- /**
37
- * Used by both StackedBarChart and GroupedBarChart tests — same shape, same
38
- * values; the only difference is whether the consumer passes `stackBy` or
39
- * `groupBy`. Two categories × two products so stacking/grouping behavior is
40
- * observable from the scene.
41
- */
42
- export declare const STACKED_SAMPLE: readonly StackedBarDatum[];
43
- export interface GroupSeriesDatum {
44
- group: string;
45
- series: string;
46
- count: number;
47
- }
48
- export declare const GROUP_SERIES_CUSTOM: readonly GroupSeriesDatum[];