semiotic 3.8.0 → 3.8.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 (234) hide show
  1. package/CLAUDE.md +12 -9
  2. package/README.md +39 -39
  3. package/ai/dist/mcp-server.js +98 -17
  4. package/ai/schema.json +1 -1
  5. package/ai/surface-manifest.json +3 -2
  6. package/ai/system-prompt.md +3 -2
  7. package/dist/__tests__/scenarios/mcpProtocolTypes.d.ts +20 -0
  8. package/dist/components/AccessibleNavTree.d.ts +7 -1
  9. package/dist/components/ai/chartClinicMetadata.generated.d.ts +15 -0
  10. package/dist/components/ai/useNavigationSync.d.ts +17 -2
  11. package/dist/components/chartContainerMobile.d.ts +9 -0
  12. package/dist/components/charts/geo/ChoroplethMap.d.ts +19 -2
  13. package/dist/components/charts/geo/DistanceCartogram.d.ts +14 -2
  14. package/dist/components/charts/geo/FlowMap.d.ts +10 -6
  15. package/dist/components/charts/geo/ProportionalSymbolMap.d.ts +14 -2
  16. package/dist/components/charts/index.d.ts +6 -0
  17. package/dist/components/charts/network/ChordDiagram.d.ts +9 -1
  18. package/dist/components/charts/network/ForceDirectedGraph.d.ts +11 -0
  19. package/dist/components/charts/network/SankeyDiagram.d.ts +9 -1
  20. package/dist/components/charts/ordinal/BarChart.d.ts +21 -0
  21. package/dist/components/charts/ordinal/GroupedBarChart.d.ts +11 -0
  22. package/dist/components/charts/ordinal/StackedBarChart.d.ts +11 -0
  23. package/dist/components/charts/physics/CollisionSwarmChart.d.ts +7 -0
  24. package/dist/components/charts/physics/EventDropChart.d.ts +7 -0
  25. package/dist/components/charts/physics/GaltonBoardChart.d.ts +8 -0
  26. package/dist/components/charts/physics/PhysicsCustomChart.d.ts +4 -25
  27. package/dist/components/charts/physics/PhysicsPileChart.d.ts +7 -0
  28. package/dist/components/charts/physics/physicsChartShared.d.ts +17 -1
  29. package/dist/components/charts/physics/physicsCustomLayout.d.ts +32 -0
  30. package/dist/components/charts/shared/AnnotationLabel.d.ts +88 -0
  31. package/dist/components/charts/shared/annotationActivation.d.ts +35 -0
  32. package/dist/components/charts/shared/annotationLabelLayout.d.ts +5 -0
  33. package/dist/components/charts/shared/annotationRules.d.ts +2 -1
  34. package/dist/components/charts/shared/chartSelectionUtils.d.ts +4 -0
  35. package/dist/components/charts/shared/chartSpecCore.d.ts +3 -3
  36. package/dist/components/charts/shared/datumTypes.d.ts +2 -0
  37. package/dist/components/charts/shared/diagnoseAnnotationChecks.d.ts +2 -0
  38. package/dist/components/charts/shared/formatUtils.d.ts +3 -3
  39. package/dist/components/charts/shared/hatchFill.d.ts +87 -0
  40. package/dist/components/charts/shared/hooks.d.ts +7 -6
  41. package/dist/components/charts/shared/knownChartComponents.d.ts +9 -0
  42. package/dist/components/charts/shared/leastSquaresRegression.d.ts +16 -0
  43. package/dist/components/charts/shared/mergeShapeStyle.d.ts +3 -2
  44. package/dist/components/charts/shared/semanticInteractions.d.ts +42 -0
  45. package/dist/components/charts/shared/sparseArray.d.ts +1 -1
  46. package/dist/components/charts/shared/streamPropsHelpers.d.ts +6 -4
  47. package/dist/components/charts/shared/styleRules.d.ts +205 -0
  48. package/dist/components/charts/shared/tooltipUtils.d.ts +22 -9
  49. package/dist/components/charts/shared/types.d.ts +9 -6
  50. package/dist/components/charts/shared/useAreaSeriesSetup.d.ts +16 -2
  51. package/dist/components/charts/shared/useChartSetup.d.ts +2 -2
  52. package/dist/components/charts/shared/useCustomChartSetup.d.ts +3 -0
  53. package/dist/components/charts/shared/useFrameImperativeHandle.d.ts +1 -2
  54. package/dist/components/charts/shared/useLikertAggregation.d.ts +4 -4
  55. package/dist/components/charts/shared/useOrdinalBrush.d.ts +2 -1
  56. package/dist/components/charts/shared/useOrdinalPieceStyle.d.ts +24 -1
  57. package/dist/components/charts/shared/useStreamingLegend.d.ts +1 -1
  58. package/dist/components/charts/shared/useXYLineStyle.d.ts +10 -0
  59. package/dist/components/charts/shared/useXYPointStyle.d.ts +19 -1
  60. package/dist/components/charts/shared/validateChartData.d.ts +7 -5
  61. package/dist/components/charts/shared/validationMap.d.ts +11 -2
  62. package/dist/components/charts/shared/validationMap.generated.d.ts +6 -0
  63. package/dist/components/charts/shared/withChartWrapper.d.ts +4 -3
  64. package/dist/components/charts/value/targetPresentation.d.ts +22 -0
  65. package/dist/components/charts/value/types.d.ts +5 -6
  66. package/dist/components/charts/xy/AreaChart.d.ts +8 -0
  67. package/dist/components/charts/xy/BubbleChart.d.ts +9 -0
  68. package/dist/components/charts/xy/ConnectedScatterplot.d.ts +7 -0
  69. package/dist/components/charts/xy/DifferenceChart.d.ts +1 -52
  70. package/dist/components/charts/xy/Heatmap.d.ts +2 -2
  71. package/dist/components/charts/xy/LineChart.d.ts +11 -0
  72. package/dist/components/charts/xy/QuadrantChart.d.ts +7 -0
  73. package/dist/components/charts/xy/Scatterplot.d.ts +10 -0
  74. package/dist/components/charts/xy/StackedAreaChart.d.ts +7 -0
  75. package/dist/components/charts/xy/differenceSegments.d.ts +49 -0
  76. package/dist/components/charts/xy/scatterplotMatrixInteractionTypes.d.ts +12 -0
  77. package/dist/components/controls/SentenceFilter.d.ts +97 -0
  78. package/dist/components/data/fromVegaLite.d.ts +19 -9
  79. package/dist/components/rough/createRoughRenderMode.d.ts +46 -0
  80. package/dist/components/semiotic-ai.d.ts +3 -1
  81. package/dist/components/semiotic-controls.d.ts +2 -0
  82. package/dist/components/semiotic-geo.d.ts +4 -0
  83. package/dist/components/semiotic-network.d.ts +4 -0
  84. package/dist/components/semiotic-ordinal.d.ts +6 -0
  85. package/dist/components/semiotic-physics.d.ts +4 -0
  86. package/dist/components/semiotic-rough.d.ts +4 -0
  87. package/dist/components/semiotic-utils-core.d.ts +4 -0
  88. package/dist/components/semiotic-xy.d.ts +4 -0
  89. package/dist/components/semiotic.d.ts +9 -1
  90. package/dist/components/server/optionalImageTypes.d.ts +37 -0
  91. package/dist/components/server/serverChartConfigShared.d.ts +9 -5
  92. package/dist/components/server/serverChartConfigs.d.ts +4 -4
  93. package/dist/components/server/staticAnnotations.d.ts +6 -3
  94. package/dist/components/server/staticLegend.d.ts +1 -1
  95. package/dist/components/server/staticNetwork.d.ts +4 -4
  96. package/dist/components/server/staticSVGChrome.d.ts +2 -2
  97. package/dist/components/store/ObservationStore.d.ts +21 -1
  98. package/dist/components/stream/AccessibleDataTable.d.ts +4 -10
  99. package/dist/components/stream/AriaLiveTooltip.d.ts +9 -0
  100. package/dist/components/stream/CanvasHitTester.d.ts +4 -4
  101. package/dist/components/stream/DataSourceAdapter.d.ts +1 -1
  102. package/dist/components/stream/FrameRuntime.d.ts +57 -0
  103. package/dist/components/stream/GeoParticlePool.d.ts +1 -1
  104. package/dist/components/stream/GeoPipelineStore.d.ts +43 -12
  105. package/dist/components/stream/GeoSVGOverlay.d.ts +64 -0
  106. package/dist/components/stream/NetworkCanvasHitTester.d.ts +2 -1
  107. package/dist/components/stream/NetworkPipelineStore.d.ts +24 -21
  108. package/dist/components/stream/NetworkSSRFrame.d.ts +17 -0
  109. package/dist/components/stream/NetworkSVGOverlay.d.ts +6 -0
  110. package/dist/components/stream/OrdinalCanvasHitTester.d.ts +2 -2
  111. package/dist/components/stream/OrdinalPipelineStore.d.ts +13 -13
  112. package/dist/components/stream/OrdinalSVGOverlay.d.ts +9 -1
  113. package/dist/components/stream/OrdinalStyleResolver.d.ts +12 -0
  114. package/dist/components/stream/ParticlePool.d.ts +1 -1
  115. package/dist/components/stream/PipelineStore.d.ts +12 -16
  116. package/dist/components/stream/SVGOverlay.d.ts +6 -0
  117. package/dist/components/stream/SceneGraph.d.ts +3 -3
  118. package/dist/components/stream/accessorUtils.d.ts +2 -2
  119. package/dist/components/stream/annotationAccessorResolver.d.ts +2 -2
  120. package/dist/components/stream/frameGraphics.d.ts +4 -0
  121. package/dist/components/stream/frameKeyboardNavigation.d.ts +45 -0
  122. package/dist/components/stream/geoPipelineHelpers.d.ts +3 -3
  123. package/dist/components/stream/geoPipelineUpdateResults.d.ts +34 -0
  124. package/dist/components/stream/geoSceneBuilder.d.ts +16 -0
  125. package/dist/components/stream/geoTypes.d.ts +48 -15
  126. package/dist/components/stream/hitTestUtils.d.ts +2 -2
  127. package/dist/components/stream/hoverUtils.d.ts +4 -2
  128. package/dist/components/stream/layouts/forceLayoutWorkerClient.d.ts +1 -0
  129. package/dist/components/stream/layouts/hierarchyUtils.d.ts +2 -2
  130. package/dist/components/stream/networkCustomLayoutRunner.d.ts +23 -0
  131. package/dist/components/stream/networkCustomRestyle.d.ts +15 -0
  132. package/dist/components/stream/networkFrameAnimation.d.ts +7 -0
  133. package/dist/components/stream/networkFrameHandleTypes.d.ts +39 -0
  134. package/dist/components/stream/networkFrameObservations.d.ts +15 -0
  135. package/dist/components/stream/networkFramePaint.d.ts +11 -2
  136. package/dist/components/stream/networkInteractionTypes.d.ts +26 -0
  137. package/dist/components/stream/networkPipelineConfig.d.ts +2 -2
  138. package/dist/components/stream/networkPipelineUpdateResults.d.ts +38 -0
  139. package/dist/components/stream/networkTypes.d.ts +37 -56
  140. package/dist/components/stream/ordinalCanvasRenderers.d.ts +2 -2
  141. package/dist/components/stream/ordinalPipelineUpdateResults.d.ts +20 -1
  142. package/dist/components/stream/ordinalSceneBuilders/types.d.ts +2 -2
  143. package/dist/components/stream/ordinalTypes.d.ts +30 -3
  144. package/dist/components/stream/physics/PhysicsPipelineStore.d.ts +2 -0
  145. package/dist/components/stream/physics/PhysicsSVGOverlay.d.ts +6 -0
  146. package/dist/components/stream/physics/StreamPhysicsTypes.d.ts +21 -6
  147. package/dist/components/stream/physics/physicsFrameObservations.d.ts +19 -0
  148. package/dist/components/stream/physics/physicsFrameSetup.d.ts +4 -0
  149. package/dist/components/stream/physics/physicsPipelineUpdateResults.d.ts +19 -1
  150. package/dist/components/stream/physics/usePhysicsFrameLifecyclePolicy.d.ts +3 -1
  151. package/dist/components/stream/pipelineConfig.d.ts +4 -2
  152. package/dist/components/stream/pipelineDecay.d.ts +2 -2
  153. package/dist/components/stream/pipelinePulse.d.ts +2 -2
  154. package/dist/components/stream/pipelineStoreUpdateResults.d.ts +23 -2
  155. package/dist/components/stream/pipelineTransitions.d.ts +1 -1
  156. package/dist/components/stream/pipelineUpdateContract.d.ts +7 -0
  157. package/dist/components/stream/pipelineUpdateStore.d.ts +21 -0
  158. package/dist/components/stream/renderBackend.d.ts +27 -0
  159. package/dist/components/stream/renderers/canvasRenderHelpers.d.ts +15 -1
  160. package/dist/components/stream/renderers/geoCanvasRenderer.d.ts +3 -2
  161. package/dist/components/stream/renderers/networkParticleRenderer.d.ts +1 -1
  162. package/dist/components/stream/sceneRenderBackendTypes.d.ts +28 -0
  163. package/dist/components/stream/sceneRevisionDiagnostics.d.ts +31 -4
  164. package/dist/components/stream/streamSemanticTypes.d.ts +16 -0
  165. package/dist/components/stream/streamThemeTypes.d.ts +14 -0
  166. package/dist/components/stream/svgOverlayUtils.d.ts +10 -0
  167. package/dist/components/stream/test-utils/frameScheduler.d.ts +12 -0
  168. package/dist/components/stream/test-utils/revisionConsumption.d.ts +13 -0
  169. package/dist/components/stream/titleLayout.d.ts +31 -0
  170. package/dist/components/stream/types.d.ts +30 -65
  171. package/dist/components/stream/useCanvasFrameHost.d.ts +71 -0
  172. package/dist/components/stream/useFrame.d.ts +23 -0
  173. package/dist/components/stream/useLegendCategoryEmission.d.ts +3 -3
  174. package/dist/components/stream/useSemanticFrameInteractions.d.ts +22 -0
  175. package/dist/components/stream/useUpdateResultSnapshot.d.ts +7 -0
  176. package/dist/components/stream/xyFrameAxisTypes.d.ts +50 -0
  177. package/dist/components/stream/xySceneBuilders/types.d.ts +6 -5
  178. package/dist/controls.min.js +1 -1
  179. package/dist/controls.module.min.js +1 -1
  180. package/dist/forceLayoutWorker.js +1 -1
  181. package/dist/geo.min.js +1 -1
  182. package/dist/geo.module.min.js +1 -1
  183. package/dist/network.min.js +1 -1
  184. package/dist/network.module.min.js +1 -1
  185. package/dist/ordinal.min.js +1 -1
  186. package/dist/ordinal.module.min.js +1 -1
  187. package/dist/physics.min.js +1 -1
  188. package/dist/physics.module.min.js +1 -1
  189. package/dist/physicsWorker.js +1 -1
  190. package/dist/realtime.min.js +1 -1
  191. package/dist/realtime.module.min.js +1 -1
  192. package/dist/rough.min.js +1 -0
  193. package/dist/rough.module.min.js +1 -0
  194. package/dist/semiotic-ai-core.min.js +1 -1
  195. package/dist/semiotic-ai-core.module.min.js +1 -1
  196. package/dist/semiotic-ai.d.ts +3 -1
  197. package/dist/semiotic-ai.min.js +1 -1
  198. package/dist/semiotic-ai.module.min.js +1 -1
  199. package/dist/semiotic-controls.d.ts +2 -0
  200. package/dist/semiotic-data.min.js +1 -1
  201. package/dist/semiotic-data.module.min.js +1 -1
  202. package/dist/semiotic-experimental.min.js +1 -1
  203. package/dist/semiotic-experimental.module.min.js +1 -1
  204. package/dist/semiotic-geo.d.ts +4 -0
  205. package/dist/semiotic-network.d.ts +4 -0
  206. package/dist/semiotic-ordinal.d.ts +6 -0
  207. package/dist/semiotic-physics.d.ts +4 -0
  208. package/dist/semiotic-realtime-core.min.js +1 -1
  209. package/dist/semiotic-realtime-core.module.min.js +1 -1
  210. package/dist/semiotic-realtime-react.min.js +1 -1
  211. package/dist/semiotic-realtime-react.module.min.js +1 -1
  212. package/dist/semiotic-rough.d.ts +4 -0
  213. package/dist/semiotic-server-edge.min.js +1 -1
  214. package/dist/semiotic-server-edge.module.min.js +1 -1
  215. package/dist/semiotic-server-node.min.js +1 -1
  216. package/dist/semiotic-server-node.module.min.js +1 -1
  217. package/dist/semiotic-utils-core.d.ts +4 -0
  218. package/dist/semiotic-utils-core.min.js +1 -1
  219. package/dist/semiotic-utils-core.module.min.js +1 -1
  220. package/dist/semiotic-utils.min.js +1 -1
  221. package/dist/semiotic-utils.module.min.js +1 -1
  222. package/dist/semiotic-value.min.js +1 -1
  223. package/dist/semiotic-value.module.min.js +1 -1
  224. package/dist/semiotic-xy.d.ts +4 -0
  225. package/dist/semiotic.d.ts +9 -1
  226. package/dist/semiotic.min.js +1 -1
  227. package/dist/semiotic.module.min.js +1 -1
  228. package/dist/server.min.js +1 -1
  229. package/dist/server.module.min.js +1 -1
  230. package/dist/test-utils/capturedFrameProps.d.ts +67 -0
  231. package/dist/test-utils/frameMock.d.ts +12 -9
  232. package/dist/xy.min.js +1 -1
  233. package/dist/xy.module.min.js +1 -1
  234. package/package.json +26 -7
@@ -0,0 +1,26 @@
1
+ import type { ReactNode } from "react";
2
+ import type { Datum } from "../charts/shared/datumTypes";
3
+ import type { SemanticClickBehavior, SemanticHoverBehavior } from "../charts/shared/semanticInteractions";
4
+ import type { OnAnnotationActivateCallback } from "../charts/shared/annotationActivation";
5
+ import type { AnnotationContext, HoverData } from "../realtime/types";
6
+ import type { AutoPlaceAnnotations } from "../recipes/annotationLayout";
7
+ import type { OnObservationCallback } from "../store/ObservationStore";
8
+ /** Interaction and annotation callbacks shared by every network chart layout. */
9
+ export interface StreamNetworkInteractionProps<Node, Edge> {
10
+ enableHover?: boolean;
11
+ tooltipContent?: (d: HoverData) => ReactNode;
12
+ customHoverBehavior?: SemanticHoverBehavior<HoverData>;
13
+ customClickBehavior?: SemanticClickBehavior<HoverData>;
14
+ /** Observation callback — emits hover/click events to the ObservationStore and this callback. */
15
+ onObservation?: OnObservationCallback;
16
+ /** @internal HOC observation callback forwarded only to annotation widgets. */
17
+ annotationObservationCallback?: OnObservationCallback;
18
+ /** Chart instance identifier for observation filtering. */
19
+ chartId?: string;
20
+ onTopologyChange?: (nodes: Node[], edges: Edge[]) => void;
21
+ annotations?: Datum[];
22
+ /** Observe activation of widget annotations without replacing widget behavior. */
23
+ onAnnotationActivate?: OnAnnotationActivateCallback;
24
+ autoPlaceAnnotations?: AutoPlaceAnnotations;
25
+ svgAnnotationRules?: (annotation: Datum, index: number, context: AnnotationContext) => ReactNode;
26
+ }
@@ -5,7 +5,7 @@
5
5
  import type { SemioticTheme } from "../store/ThemeStore";
6
6
  import type { NetworkPipelineConfig } from "./networkTypes";
7
7
  import type { StreamNetworkFrameProps } from "./networkTypes";
8
- export type NetworkPipelineConfigSources = Pick<StreamNetworkFrameProps, "chartType" | "nodeIDAccessor" | "sourceAccessor" | "targetAccessor" | "valueAccessor" | "edgeIdAccessor" | "childrenAccessor" | "hierarchySum" | "orientation" | "nodeAlign" | "nodePaddingRatio" | "nodeWidth" | "iterations" | "forceStrength" | "padAngle" | "groupWidth" | "sortGroups" | "edgeSort" | "treeOrientation" | "edgeType" | "padding" | "paddingTop" | "nodeStyle" | "edgeStyle" | "nodeLabel" | "showLabels" | "labelMode" | "colorBy" | "colorScheme" | "edgeColorBy" | "edgeOpacity" | "colorByDepth" | "nodeSize" | "nodeSizeRange" | "decay" | "pulse" | "transition" | "staleness" | "thresholds" | "orbitMode" | "orbitSize" | "orbitSpeed" | "orbitRevolution" | "orbitRevolutionStyle" | "orbitEccentricity" | "orbitShowRings" | "orbitAnimated" | "customNetworkLayout" | "onLayoutError" | "layoutConfig"> & {
8
+ export type NetworkPipelineConfigSources = Pick<StreamNetworkFrameProps, "chartType" | "nodeIDAccessor" | "sourceAccessor" | "targetAccessor" | "valueAccessor" | "edgeIdAccessor" | "childrenAccessor" | "hierarchySum" | "orientation" | "nodeAlign" | "nodePaddingRatio" | "nodeWidth" | "iterations" | "forceStrength" | "padAngle" | "groupWidth" | "sortGroups" | "edgeSort" | "treeOrientation" | "edgeType" | "padding" | "paddingTop" | "nodeStyle" | "edgeStyle" | "nodeLabel" | "showLabels" | "labelMode" | "colorBy" | "colorScheme" | "edgeColorBy" | "edgeOpacity" | "colorByDepth" | "nodeSize" | "nodeSizeRange" | "decay" | "pulse" | "transition" | "staleness" | "thresholds" | "orbitMode" | "orbitSize" | "orbitSpeed" | "orbitRevolution" | "orbitRevolutionStyle" | "orbitEccentricity" | "orbitShowRings" | "orbitAnimated" | "clock" | "random" | "seed" | "customNetworkLayout" | "onLayoutError" | "layoutConfig"> & {
9
9
  tensionConfig: NetworkPipelineConfig["tensionConfig"];
10
10
  showParticles: boolean;
11
11
  particleStyle: NetworkPipelineConfig["particleStyle"];
@@ -14,7 +14,7 @@ export type NetworkPipelineConfigSources = Pick<StreamNetworkFrameProps, "chartT
14
14
  };
15
15
  export declare function buildNetworkPipelineConfig(sources: NetworkPipelineConfigSources): NetworkPipelineConfig;
16
16
  /** Fields that force re-ingest / re-layout when changed. */
17
- export type NetworkLayoutConfigSignature = Pick<NetworkPipelineConfigSources, "chartType" | "nodeIDAccessor" | "sourceAccessor" | "targetAccessor" | "valueAccessor" | "edgeIdAccessor" | "childrenAccessor" | "hierarchySum" | "orientation" | "nodeAlign" | "nodePaddingRatio" | "nodeWidth" | "iterations" | "forceStrength" | "padAngle" | "groupWidth" | "sortGroups" | "edgeSort" | "treeOrientation" | "edgeType" | "padding" | "paddingTop" | "tensionConfig" | "customNetworkLayout"> & {
17
+ export type NetworkLayoutConfigSignature = Pick<NetworkPipelineConfigSources, "chartType" | "nodeIDAccessor" | "sourceAccessor" | "targetAccessor" | "valueAccessor" | "edgeIdAccessor" | "childrenAccessor" | "hierarchySum" | "orientation" | "nodeAlign" | "nodePaddingRatio" | "nodeWidth" | "iterations" | "forceStrength" | "padAngle" | "groupWidth" | "sortGroups" | "edgeSort" | "treeOrientation" | "edgeType" | "padding" | "paddingTop" | "random" | "seed" | "tensionConfig" | "customNetworkLayout"> & {
18
18
  orbitMode?: NetworkPipelineConfigSources["orbitMode"];
19
19
  orbitSize?: NetworkPipelineConfigSources["orbitSize"];
20
20
  orbitEccentricity?: NetworkPipelineConfigSources["orbitEccentricity"];
@@ -0,0 +1,38 @@
1
+ import { type ChangeSet, type Invalidation, type UpdateResult } from "./pipelineUpdateContract";
2
+ /**
3
+ * The retained topology is unchanged by most config updates. The distinction
4
+ * is public here because callers must not mistake a config patch for a new
5
+ * ingest: only accessor/chart-type patches need the retained raw graph
6
+ * re-derived before the declared layout work runs.
7
+ */
8
+ export type NetworkRetainedDataEffect = "preserve" | "rebuild";
9
+ export interface NetworkConfigPatchDependency {
10
+ readonly retainedData: NetworkRetainedDataEffect;
11
+ readonly invalidations: readonly Invalidation[];
12
+ }
13
+ /**
14
+ * Network's config dependency table. It is deliberately key-level rather
15
+ * than a single conservative fallback so an integration can inspect whether
16
+ * a patch rebuilds retained topology, relays out marks, repaints styles, or
17
+ * only changes future work. Unknown future keys retain the safe layout
18
+ * fallback below until they receive an explicit entry.
19
+ */
20
+ export declare const NETWORK_CONFIG_PATCH_DEPENDENCIES: Readonly<Record<string, NetworkConfigPatchDependency>>;
21
+ export interface NetworkConfigPatchClassification {
22
+ readonly retainedData: NetworkRetainedDataEffect;
23
+ readonly invalidations: ReadonlySet<Invalidation>;
24
+ }
25
+ /** Union the declared effects for a patch after its effective keys are known. */
26
+ export declare function classifyNetworkConfigPatch(keys: readonly string[]): NetworkConfigPatchClassification;
27
+ type DataChangeKind = Extract<ChangeSet["kind"], "ingest" | "replace" | "remove" | "update" | "clear">;
28
+ /** Result bookkeeping and explicit config-patch dependency policy for Network. */
29
+ export declare class NetworkPipelineUpdateResults {
30
+ private tracker;
31
+ get last(): UpdateResult;
32
+ subscribe(listener: () => void): () => void;
33
+ recordData(kind: DataChangeKind, count?: number): UpdateResult;
34
+ recordNoop(kind: DataChangeKind | "restyle"): UpdateResult;
35
+ recordRestyle(hasCustomRestyle: boolean): UpdateResult;
36
+ recordConfig(keys: readonly string[]): UpdateResult;
37
+ }
38
+ export {};
@@ -1,13 +1,17 @@
1
1
  import type { ReactNode } from "react";
2
- import type { OnObservationCallback } from "../store/ObservationStore";
3
- import type { HoverData, AnnotationContext } from "../realtime/types";
2
+ import type { HoverData } from "../realtime/types";
3
+ import type { Datum } from "../charts/shared/datumTypes";
4
+ type NetworkDatumComparator = {
5
+ bivarianceHack(a: Datum, b: Datum): number;
6
+ }["bivarianceHack"];
7
+ type NetworkGroupComparator = (a: number, b: number) => number;
4
8
  import type { LegendGroup, LegendLayout } from "../types/legendTypes";
5
- import type { Style, DecayConfig, PulseConfig, TransitionConfig, StalenessConfig, ThemeSemanticColors, SceneDatum, SceneAccessibilityMetadata } from "./types";
9
+ import type { Style, DecayConfig, PulseConfig, TransitionConfig, StalenessConfig, ThemeSemanticColors, SceneDatum, SceneAccessibilityMetadata, SceneRenderMode } from "./types";
6
10
  import type { AnimateProp } from "./pipelineTransitionUtils";
7
- import type { Datum } from "../charts/shared/datumTypes";
8
- import type { AutoPlaceAnnotations } from "../recipes/annotationLayout";
9
11
  import type { NetworkSymbolName } from "./symbolPath";
10
12
  import type { GlyphDef } from "./glyphDef";
13
+ import type { StreamNetworkFrameHandle } from "./networkFrameHandleTypes";
14
+ import type { StreamNetworkInteractionProps } from "./networkInteractionTypes";
11
15
  export interface TensionConfig {
12
16
  weightChange: number;
13
17
  newEdge: number;
@@ -184,6 +188,8 @@ export interface RealtimeNetworkFrameProps {
184
188
  tensionConfig?: Partial<TensionConfig>;
185
189
  showParticles?: boolean;
186
190
  particleStyle?: ParticleStyle;
191
+ /** Optional scene paint backend. Exact node and edge geometry remains interactive. */
192
+ renderMode?: SceneRenderMode<NetworkSceneNode | NetworkSceneEdge>;
187
193
  colorBy?: string | ((d: RealtimeNode) => string);
188
194
  colorScheme?: string | string[] | Record<string, string>;
189
195
  edgeColorBy?: "source" | "target" | ((d: RealtimeEdge) => string);
@@ -445,6 +451,12 @@ export interface ThresholdAlertConfig {
445
451
  }
446
452
  export interface NetworkPipelineConfig {
447
453
  chartType: NetworkChartType;
454
+ /** Frame-owned logical clock for ingest, live encodings, and transitions. */
455
+ clock?: import("./FrameRuntime").FrameClock;
456
+ /** Frame-local random source used by synchronous force layout. */
457
+ random?: import("./FrameRuntime").FrameRandom;
458
+ /** Serializable deterministic seed, including the force-worker protocol. */
459
+ seed?: number;
448
460
  nodeIDAccessor?: string | ((d: Datum) => string);
449
461
  sourceAccessor?: string | ((d: Datum) => string);
450
462
  targetAccessor?: string | ((d: Datum) => string);
@@ -457,14 +469,14 @@ export interface NetworkPipelineConfig {
457
469
  nodeAlign?: "justify" | "left" | "right" | "center";
458
470
  nodePaddingRatio?: number;
459
471
  nodeWidth?: number;
460
- edgeSort?: (a: unknown, b: unknown) => number;
472
+ edgeSort?: NetworkDatumComparator;
461
473
  iterations?: number;
462
474
  forceStrength?: number;
463
475
  /** @internal Skip simulation after worker-computed positions are applied. */
464
476
  __skipForceSimulation?: boolean;
465
477
  padAngle?: number;
466
478
  groupWidth?: number;
467
- sortGroups?: (a: unknown, b: unknown) => number;
479
+ sortGroups?: NetworkGroupComparator;
468
480
  treeOrientation?: "vertical" | "horizontal" | "radial";
469
481
  edgeType?: "line" | "curve";
470
482
  padding?: number;
@@ -541,7 +553,7 @@ export interface NetworkPipelineConfig {
541
553
  * `buildScene` (re-emitting dimmed marks) without a re-ingest or re-layout. */
542
554
  layoutSelection?: import("./networkCustomLayout").NetworkLayoutSelection | null;
543
555
  }
544
- export interface StreamNetworkFrameProps<T = Datum> {
556
+ export interface StreamNetworkFrameProps<T = Datum> extends StreamNetworkInteractionProps<RealtimeNode, RealtimeEdge> {
545
557
  chartType: NetworkChartType;
546
558
  nodes?: T[];
547
559
  edges?: T[] | T;
@@ -570,8 +582,10 @@ export interface StreamNetworkFrameProps<T = Datum> {
570
582
  onLayoutStateChange?: (state: "pending" | "ready" | "error") => void;
571
583
  padAngle?: number;
572
584
  groupWidth?: number;
573
- sortGroups?: (a: unknown, b: unknown) => number;
574
- edgeSort?: (a: unknown, b: unknown) => number;
585
+ sortGroups?: NetworkGroupComparator;
586
+ edgeSort?: NetworkDatumComparator;
587
+ /** Optional scene paint backend. Exact node and edge geometry remains interactive. */
588
+ renderMode?: SceneRenderMode<NetworkSceneNode | NetworkSceneEdge>;
575
589
  treeOrientation?: "vertical" | "horizontal" | "radial";
576
590
  edgeType?: "line" | "curve";
577
591
  padding?: number;
@@ -602,18 +616,6 @@ export interface StreamNetworkFrameProps<T = Datum> {
602
616
  };
603
617
  className?: string;
604
618
  background?: string;
605
- enableHover?: boolean;
606
- tooltipContent?: (d: HoverData) => ReactNode;
607
- customHoverBehavior?: (d: HoverData | null) => void;
608
- customClickBehavior?: (d: HoverData | null) => void;
609
- /** Observation callback — emits hover/click events to the ObservationStore and this callback */
610
- onObservation?: OnObservationCallback;
611
- /** Chart instance identifier for observation filtering */
612
- chartId?: string;
613
- onTopologyChange?: (nodes: RealtimeNode[], edges: RealtimeEdge[]) => void;
614
- annotations?: Datum[];
615
- autoPlaceAnnotations?: AutoPlaceAnnotations;
616
- svgAnnotationRules?: (annotation: Datum, index: number, context: AnnotationContext) => ReactNode;
617
619
  legend?: ReactNode | {
618
620
  legendGroups: LegendGroup[];
619
621
  };
@@ -638,6 +640,18 @@ export interface StreamNetworkFrameProps<T = Datum> {
638
640
  * Set `{ intro: false }` to disable the intro animation. */
639
641
  animate?: AnimateProp;
640
642
  staleness?: StalenessConfig;
643
+ /** Optional rAF seam for deterministic host scheduling. */
644
+ frameScheduler?: import("./useFrame").FrameScheduler;
645
+ /** Monotonic wall-clock seam used to derive logical frame time. */
646
+ clock?: import("./FrameRuntime").FrameClock;
647
+ /** Injectable random source for force layout and particles. */
648
+ random?: import("./FrameRuntime").FrameRandom;
649
+ /** Serializable deterministic random seed. Ignored when `random` is supplied. */
650
+ seed?: number;
651
+ /** Freeze logical animation time and cancel queued work while paused. */
652
+ paused?: boolean;
653
+ /** Freeze logical animation time while the document is hidden. Defaults to true. */
654
+ suspendWhenHidden?: boolean;
641
655
  thresholds?: ThresholdAlertConfig;
642
656
  orbitMode?: "flat" | "solar" | "atomic" | number[];
643
657
  orbitSize?: number | ((node: Datum) => number);
@@ -666,38 +680,5 @@ export interface StreamNetworkFrameProps<T = Datum> {
666
680
  * `selection` / `linkedHover` wiring; render-only (no re-ingest on change). */
667
681
  layoutSelection?: import("./networkCustomLayout").NetworkLayoutSelection | null;
668
682
  }
669
- export interface StreamNetworkFrameHandle {
670
- push(edge: EdgePush): void;
671
- pushMany(edges: EdgePush[]): void;
672
- /** Remove a node by ID. Also removes connected edges. */
673
- removeNode(id: string): boolean;
674
- /** Remove edges by source+target, or by edge ID when edgeIdAccessor is configured. */
675
- removeEdge(sourceIdOrEdgeId: string, targetId?: string): boolean;
676
- /** Update a node's data by ID. Returns previous data. */
677
- updateNode(id: string, updater: (data: Datum) => Datum): Datum | null;
678
- /** Update all edges between source+target. Returns array of previous data. */
679
- updateEdge(sourceId: string, targetId: string, updater: (data: Datum) => Datum): Datum[];
680
- clear(): void;
681
- getTopology(): {
682
- nodes: RealtimeNode[];
683
- edges: RealtimeEdge[];
684
- };
685
- getTopologyDiff(): {
686
- addedNodes: string[];
687
- removedNodes: string[];
688
- addedEdges: string[];
689
- removedEdges: string[];
690
- };
691
- relayout(): void;
692
- getTension(): number;
693
- /** The most recent custom layout result (sceneNodes/sceneEdges/overlays as
694
- * returned by `customNetworkLayout`) — host readback so pages that need the
695
- * computed placement don't re-run the layout. Null before the first layout
696
- * or when no custom layout is configured. A failed retry retains the prior
697
- * good result; inspect `getLayoutFailure()` to distinguish recovery. */
698
- getCustomLayout(): import("./networkCustomLayout").NetworkLayoutResult | null;
699
- /** The latest custom-layout failure, if any. Cleared by a successful layout,
700
- * removing the custom layout, or `clear()`. */
701
- getLayoutFailure(): import("./customLayoutFailure").CustomLayoutFailureDiagnostic | null;
702
- }
683
+ export type { StreamNetworkFrameHandle } from "./networkFrameHandleTypes";
703
684
  export type NetworkRendererFn = (ctx: CanvasRenderingContext2D, nodes: NetworkSceneNode[], edges: NetworkSceneEdge[], size: [number, number]) => void;
@@ -2,6 +2,6 @@
2
2
  * Chart-type → canvas renderer dispatch for StreamOrdinalFrame.
3
3
  * Connectors are always included when the chart type builds them into the scene.
4
4
  */
5
- import type { OrdinalChartType } from "./ordinalTypes";
6
- export type OrdinalAnyRendererFn = (ctx: CanvasRenderingContext2D, nodes: any[], scales: any, layout: any) => void;
5
+ import type { OrdinalChartType, OrdinalRendererFn } from "./ordinalTypes";
6
+ export type OrdinalAnyRendererFn = OrdinalRendererFn;
7
7
  export declare const ORDINAL_CANVAS_RENDERERS: Record<OrdinalChartType, OrdinalAnyRendererFn[]>;
@@ -1,9 +1,28 @@
1
- import { type ChangeSet, type UpdateResult } from "./pipelineUpdateContract";
1
+ import { type ChangeSet, type Invalidation, type UpdateResult } from "./pipelineUpdateContract";
2
+ /** Whether a config patch re-derives retained ordinal data resources. */
3
+ export type OrdinalRetainedDataEffect = "preserve" | "rebuild";
4
+ export interface OrdinalConfigPatchDependency {
5
+ readonly retainedData: OrdinalRetainedDataEffect;
6
+ readonly invalidations: readonly Invalidation[];
7
+ }
8
+ /**
9
+ * Ordinal's key-level patch policy. Category/value/order accessors re-derive
10
+ * retained categorical state. Layout, style, and future-only controls expose
11
+ * distinct revision effects instead of the previous blanket scene rebuild.
12
+ */
13
+ export declare const ORDINAL_CONFIG_PATCH_DEPENDENCIES: Readonly<Record<string, OrdinalConfigPatchDependency>>;
14
+ export interface OrdinalConfigPatchClassification {
15
+ readonly retainedData: OrdinalRetainedDataEffect;
16
+ readonly invalidations: ReadonlySet<Invalidation>;
17
+ }
18
+ /** Union the declared effects for a patch after its effective keys are known. */
19
+ export declare function classifyOrdinalConfigPatch(keys: readonly string[]): OrdinalConfigPatchClassification;
2
20
  type DataChangeKind = Extract<ChangeSet["kind"], "ingest" | "replace" | "remove" | "update" | "clear">;
3
21
  /** Result bookkeeping and invalidation policy for the Ordinal store pilot. */
4
22
  export declare class OrdinalPipelineUpdateResults {
5
23
  private tracker;
6
24
  get last(): UpdateResult;
25
+ subscribe(listener: () => void): () => void;
7
26
  recordData(kind: DataChangeKind, count?: number): UpdateResult;
8
27
  recordNoop(kind: DataChangeKind | "restyle"): UpdateResult;
9
28
  recordRestyle(hasCustomRestyle: boolean): UpdateResult;
@@ -16,8 +16,8 @@ export interface OrdinalSceneContext {
16
16
  getO: (d: Datum) => string;
17
17
  multiScales: ScaleLinear<number, number>[];
18
18
  rAccessors: ((d: Datum) => number)[];
19
- resolvePieceStyle: (d: any, category?: string) => Style;
20
- resolveSummaryStyle: (d: any, category?: string) => Style;
19
+ resolvePieceStyle: (d: Datum | null, category?: string) => Style;
20
+ resolveSummaryStyle: (d: Datum | null, category?: string) => Style;
21
21
  /** For timeline: resolve rAccessor as [start, end] */
22
22
  getRawRange: (d: Datum) => [number, number] | null;
23
23
  }
@@ -3,10 +3,13 @@ import type { ScaleLinear, ScaleBand } from "d3-scale";
3
3
  import type { WindowMode, HoverAnnotationConfig, HoverData, AnnotationContext } from "../realtime/types";
4
4
  import type { AutoPlaceAnnotations } from "../recipes/annotationLayout";
5
5
  import type { SymbolName } from "./symbolPath";
6
- import type { Style, SceneDatum, DecayConfig, PulseConfig, TransitionConfig, StalenessConfig, ThemeSemanticColors, FrameGraphicsProp, SceneAccessibilityMetadata } from "./types";
6
+ import type { Style, SceneDatum, DecayConfig, PulseConfig, TransitionConfig, StalenessConfig, ThemeSemanticColors, FrameGraphicsProp, SceneAccessibilityMetadata, SceneRenderMode } from "./types";
7
7
  import type { AnimateProp } from "./pipelineTransitionUtils";
8
8
  import type { GradientLegendConfig, LegendGroup, LegendLayout } from "../types/legendTypes";
9
9
  import type { Datum } from "../charts/shared/datumTypes";
10
+ import type { OnObservationCallback } from "../store/ObservationStore";
11
+ import type { SemanticClickBehavior, SemanticHoverBehavior } from "../charts/shared/semanticInteractions";
12
+ import type { OnAnnotationActivateCallback } from "../charts/shared/annotationActivation";
10
13
  export type OrdinalChartType = "bar" | "clusterbar" | "point" | "swarm" | "pie" | "donut" | "boxplot" | "violin" | "histogram" | "ridgeline" | "timeline" | "funnel" | "bar-funnel" | "swimlane" | "custom";
11
14
  export interface OrdinalScales {
12
15
  o: ScaleBand<string>;
@@ -280,6 +283,8 @@ export interface OrdinalPipelineConfig {
280
283
  /** Whether to animate elements on first render (bars grow from baseline, wedges sweep in) */
281
284
  introAnimation?: boolean;
282
285
  staleness?: StalenessConfig;
286
+ /** Frame-owned logical clock for ingest, pulse, staleness, and transitions. */
287
+ clock?: import("./FrameRuntime").FrameClock;
283
288
  /** When provided, replaces chart-type dispatch in scene building.
284
289
  * Receives an OrdinalLayoutContext (scales, dimensions, theme,
285
290
  * resolveColor) and returns scene nodes plus optional overlays. */
@@ -384,6 +389,8 @@ export interface StreamOrdinalFrameProps<T = Datum> {
384
389
  * it's a band scale, not a continuous one. Ignored when explicit
385
390
  * `rTickValues` are provided — caller has hand-picked positions. */
386
391
  axisExtent?: import("../charts/shared/axisExtent").AxisExtentMode;
392
+ /** Optional scene paint backend. Exact scene geometry remains interactive. */
393
+ renderMode?: SceneRenderMode<OrdinalSceneNode>;
387
394
  pieceStyle?: (d: Datum, category?: string) => Style;
388
395
  summaryStyle?: (d: Datum, category?: string) => Style;
389
396
  colorScheme?: string | string[] | Record<string, string>;
@@ -409,9 +416,17 @@ export interface StreamOrdinalFrameProps<T = Datum> {
409
416
  enableHover?: boolean;
410
417
  hoverAnnotation?: boolean | HoverAnnotationConfig;
411
418
  tooltipContent?: (d: HoverData) => ReactNode;
412
- customHoverBehavior?: (d: HoverData | null) => void;
413
- customClickBehavior?: (d: HoverData | null) => void;
419
+ customHoverBehavior?: SemanticHoverBehavior<HoverData>;
420
+ customClickBehavior?: SemanticClickBehavior<HoverData>;
421
+ /** Structured interaction observations, including semantic focus/activate. */
422
+ onObservation?: OnObservationCallback;
423
+ /** @internal HOC observation callback forwarded only to annotation widgets. */
424
+ annotationObservationCallback?: OnObservationCallback;
425
+ /** Chart instance identifier included in observation events. */
426
+ chartId?: string;
414
427
  annotations?: Datum[];
428
+ /** Observe activation of widget annotations without replacing widget behavior. */
429
+ onAnnotationActivate?: OnAnnotationActivateCallback;
415
430
  autoPlaceAnnotations?: AutoPlaceAnnotations;
416
431
  svgAnnotationRules?: (annotation: Datum, index: number, context: AnnotationContext) => ReactNode;
417
432
  showGrid?: boolean;
@@ -460,6 +475,18 @@ export interface StreamOrdinalFrameProps<T = Datum> {
460
475
  * Set `{ intro: false }` to disable the intro animation. */
461
476
  animate?: AnimateProp;
462
477
  staleness?: StalenessConfig;
478
+ /** Optional rAF seam for deterministic host scheduling. */
479
+ frameScheduler?: import("./useFrame").FrameScheduler;
480
+ /** Monotonic wall-clock seam used to derive logical frame time. */
481
+ clock?: import("./FrameRuntime").FrameClock;
482
+ /** Injectable frame-local random source. Ordinal rendering currently has no stochastic layout. */
483
+ random?: import("./FrameRuntime").FrameRandom;
484
+ /** Serializable deterministic random seed for future ordinal stochastic work. */
485
+ seed?: number;
486
+ /** Freeze logical animation time and cancel queued work while paused. */
487
+ paused?: boolean;
488
+ /** Freeze logical animation time while the document is hidden. Defaults to true. */
489
+ suspendWhenHidden?: boolean;
463
490
  /** Render a visually-hidden data table from the scene graph for screen readers */
464
491
  accessibleTable?: boolean;
465
492
  /** Accessible description overriding the auto-generated aria-label on the chart container */
@@ -56,6 +56,8 @@ export declare class PhysicsPipelineStore {
56
56
  recordObservation(record: PhysicsObservationRecord): PhysicsObservationEvent;
57
57
  /** Most recent explicit update result for a revision-aware host or tool. */
58
58
  getLastUpdateResult(): UpdateResult;
59
+ getUpdateSnapshot(): UpdateResult;
60
+ subscribeUpdateResult(listener: () => void): () => void;
59
61
  version(): number;
60
62
  setPaused(paused: boolean): void;
61
63
  setVisible(visible: boolean): void;
@@ -10,6 +10,8 @@ import type { LegendGroup, GradientLegendConfig, LegendLayout } from "../../type
10
10
  import { type AutoPlaceAnnotations } from "../../recipes/annotationLayout";
11
11
  import type { AnnotationContext } from "../../realtime/types";
12
12
  import type { PhysicsBodyState } from "./PhysicsKernel";
13
+ import type { OnObservationCallback } from "../../store/ObservationStore";
14
+ import { type OnAnnotationActivateCallback } from "../../charts/shared/annotationActivation";
13
15
  export type PhysicsAnnotationAnchorNode = {
14
16
  pointId?: string;
15
17
  x: number;
@@ -47,6 +49,10 @@ export interface PhysicsSVGOverlayProps {
47
49
  /** Live body anchors for pointId / bodyId annotations. */
48
50
  pointNodes?: PhysicsAnnotationAnchorNode[];
49
51
  annotations?: Datum[];
52
+ onAnnotationActivate?: OnAnnotationActivateCallback;
53
+ onObservation?: OnObservationCallback;
54
+ chartId?: string;
55
+ chartType?: string;
50
56
  autoPlaceAnnotations?: AutoPlaceAnnotations;
51
57
  svgAnnotationRules?: (annotation: Datum, index: number, context: AnnotationContext) => ReactNode;
52
58
  /** Optional foreground SVG already composed into the frame stack. */
@@ -157,7 +157,7 @@ export type StreamPhysicsBodyForce = StreamPhysicsRegionVector | ((context: Stre
157
157
  export interface PhysicsHoverData {
158
158
  __semioticHoverData: true;
159
159
  body: PhysicsBodyState;
160
- data: unknown;
160
+ data: Datum | PhysicsBodyState;
161
161
  id: string;
162
162
  type: "body";
163
163
  x: number;
@@ -183,6 +183,17 @@ export interface StreamPhysicsFrameProps {
183
183
  * deterministic clock for replayable tests or evidence capture.
184
184
  */
185
185
  clock?: () => number;
186
+ /**
187
+ * Host-level random seam for frame-local visual work. It deliberately does
188
+ * not replace the physics kernel's deterministic random source.
189
+ */
190
+ random?: () => number;
191
+ /**
192
+ * Serializable deterministic seed for frame-local work and, when
193
+ * `config.kernel.seed` is omitted, the built-in physics kernel. An explicit
194
+ * kernel seed always wins so existing simulation snapshots remain stable.
195
+ */
196
+ seed?: number;
186
197
  bodySemanticItemLimit?: number;
187
198
  bodySemanticItems?: boolean | PhysicsBodySemanticItemAccessor;
188
199
  bodySemanticUpdateMs?: number;
@@ -230,6 +241,8 @@ export interface StreamPhysicsFrameProps {
230
241
  * `physics: "barrier"|"sensor"` also feed colliders via PhysicsAnnotations.
231
242
  */
232
243
  annotations?: Datum[];
244
+ /** Observe activation of widget annotations without replacing widget behavior. */
245
+ onAnnotationActivate?: import("../../charts/shared/annotationActivation").OnAnnotationActivateCallback;
233
246
  autoPlaceAnnotations?: AutoPlaceAnnotations;
234
247
  svgAnnotationRules?: (annotation: Datum, index: number, context: AnnotationContext) => React.ReactNode;
235
248
  legend?: React.ReactNode | {
@@ -257,11 +270,13 @@ export interface StreamPhysicsFrameProps {
257
270
  * Click on a body (or empty canvas when null). Prefer this over
258
271
  * `onBodyPointerDown` when you only need the Semiotic click contract.
259
272
  */
260
- onClick?: (datum: unknown | null, event: {
261
- x: number;
262
- y: number;
263
- body: PhysicsBodyState | null;
264
- }) => void;
273
+ onClick?: {
274
+ bivarianceHack(datum: Datum | null, event: {
275
+ x: number;
276
+ y: number;
277
+ body: PhysicsBodyState | null;
278
+ }): void;
279
+ }["bivarianceHack"];
265
280
  onRegionEvent?: (event: StreamPhysicsRegionEvent) => void;
266
281
  onSimulationExecutionChange?: (state: StreamPhysicsExecutionState) => void;
267
282
  onBodyPointerDown?: (body: PhysicsBodyState | null, event: React.PointerEvent<HTMLCanvasElement>) => void;
@@ -0,0 +1,19 @@
1
+ import type { ObservationInputType, OnObservationCallback } from "../../store/ObservationStore";
2
+ interface CurrentRef<T> {
3
+ current: T;
4
+ }
5
+ export type PhysicsFrameObservationType = "hover" | "hover-end" | "click" | "click-end" | "focus" | "activate";
6
+ export interface PhysicsFrameObservationPayload {
7
+ datum?: unknown;
8
+ x?: number;
9
+ y?: number;
10
+ inputType?: ObservationInputType;
11
+ }
12
+ interface PhysicsFrameObservationOptions {
13
+ onObservationRef: CurrentRef<OnObservationCallback | undefined>;
14
+ chartIdRef: CurrentRef<string | undefined>;
15
+ wallClockRef: CurrentRef<() => number>;
16
+ }
17
+ /** Builds a stable emitter while reading the frame's latest callback and clock refs. */
18
+ export declare function usePhysicsFrameObservationEmitter({ onObservationRef, chartIdRef, wallClockRef }: PhysicsFrameObservationOptions): (type: PhysicsFrameObservationType, payload?: PhysicsFrameObservationPayload) => void;
19
+ export {};
@@ -0,0 +1,4 @@
1
+ import { PhysicsPipelineStore, type PhysicsPipelineConfig, type PhysicsQueuedSpawn, type PhysicsSpawnPacingOptions } from "./PhysicsPipelineStore";
2
+ /** Create the retained simulation store and seed its initial queued bodies. */
3
+ export declare function createPhysicsFrameStore(config: PhysicsPipelineConfig | undefined, initialSpawns: PhysicsQueuedSpawn[] | undefined, initialSpawnPacing: PhysicsSpawnPacingOptions | undefined): PhysicsPipelineStore;
4
+ export declare function defaultPhysicsFrameClock(): number;
@@ -3,7 +3,25 @@ import type { PhysicsPipelineConfig } from "./PhysicsPipelineTypes";
3
3
  import type { Invalidation } from "../pipelineUpdateContract";
4
4
  export declare const PHYSICS_BODY_INVALIDATIONS: readonly Invalidation[];
5
5
  export declare const PHYSICS_MOTION_INVALIDATIONS: readonly Invalidation[];
6
- export declare const PHYSICS_CONFIG_INVALIDATIONS: readonly Invalidation[];
7
6
  export declare const PHYSICS_STATE_INVALIDATIONS: readonly Invalidation[];
7
+ /** Whether a config patch rebuilds Physics' retained simulation resource. */
8
+ export type PhysicsRetainedDataEffect = "preserve" | "rebuild";
9
+ export interface PhysicsConfigPatchDependency {
10
+ readonly retainedData: PhysicsRetainedDataEffect;
11
+ readonly invalidations: readonly Invalidation[];
12
+ }
13
+ /**
14
+ * Physics config changes either rebuild the retained engine, affect the next
15
+ * simulated geometry, alter capacity presentation, or only change future
16
+ * stepping/observation behavior. This keeps direct store consumers from
17
+ * treating every physics option as a full scene-layout update.
18
+ */
19
+ export declare const PHYSICS_CONFIG_PATCH_DEPENDENCIES: Readonly<Record<string, PhysicsConfigPatchDependency>>;
20
+ export interface PhysicsConfigPatchClassification {
21
+ readonly retainedData: PhysicsRetainedDataEffect;
22
+ readonly invalidations: ReadonlySet<Invalidation>;
23
+ }
24
+ /** Union the declared effects for a patch after its effective keys are known. */
25
+ export declare function classifyPhysicsConfigPatch(keys: readonly string[]): PhysicsConfigPatchClassification;
8
26
  export declare function physicsKernelOptionsEqual(a: PhysicsKernelOptions | undefined, b: PhysicsKernelOptions | undefined): boolean;
9
27
  export declare function changedPhysicsConfigKeys(config: PhysicsPipelineConfig, previous: PhysicsPipelineConfig): string[];
@@ -1,9 +1,11 @@
1
1
  import { type MutableRefObject, type RefObject } from "react";
2
+ import type { FrameRuntime } from "../FrameRuntime";
2
3
  import type { PhysicsPipelineStore } from "./PhysicsPipelineStore";
3
4
  import type { PhysicsWorkerCommand } from "./PhysicsWorkerProtocol";
4
5
  export declare function isPhysicsDocumentVisible(): boolean;
5
6
  interface PhysicsFrameLifecyclePolicyInput {
6
7
  cancelRender: () => void;
8
+ frameRuntime: FrameRuntime;
7
9
  lastFrameTimeRef: MutableRefObject<number | null>;
8
10
  paused: boolean;
9
11
  postWorkerCommand: (command: PhysicsWorkerCommand, notifyTick?: boolean) => void;
@@ -12,5 +14,5 @@ interface PhysicsFrameLifecyclePolicyInput {
12
14
  suspendWhenHidden: boolean;
13
15
  }
14
16
  /** Keep pause and page-visibility scheduling policy consistent for physics frames. */
15
- export declare function usePhysicsFrameLifecyclePolicy({ cancelRender, lastFrameTimeRef, paused, postWorkerCommand, requestRender, storeRef, suspendWhenHidden }: PhysicsFrameLifecyclePolicyInput): void;
17
+ export declare function usePhysicsFrameLifecyclePolicy({ cancelRender, frameRuntime, lastFrameTimeRef, paused, postWorkerCommand, requestRender, storeRef, suspendWhenHidden }: PhysicsFrameLifecyclePolicyInput): void;
16
18
  export {};
@@ -11,6 +11,8 @@ import type { MarginType } from "../types/marginType";
11
11
  export interface PipelineConfig {
12
12
  chartType: StreamChartType;
13
13
  runtimeMode?: "streaming" | "bounded";
14
+ /** Optional monotonic clock owned by a frame runtime or embedding host. */
15
+ clock?: () => number;
14
16
  windowSize: number;
15
17
  windowMode: WindowMode;
16
18
  arrowOfTime: ArrowOfTime;
@@ -71,7 +73,7 @@ export interface PipelineConfig {
71
73
  /** Internal: set by PipelineStore when open/close accessors are both missing */
72
74
  candlestickRangeMode?: boolean;
73
75
  boundsAccessor?: string | ((d: Datum) => CoercibleNumber);
74
- boundsStyle?: any;
76
+ boundsStyle?: Style | ((d: Datum, group?: string) => Style);
75
77
  y0Accessor?: string | ((d: Datum) => CoercibleNumber);
76
78
  band?: BandConfig | BandConfig[];
77
79
  gradientFill?: {
@@ -90,7 +92,7 @@ export interface PipelineConfig {
90
92
  color: string;
91
93
  }>;
92
94
  };
93
- lineStyle?: any;
95
+ lineStyle?: Style | ((d: Datum, group?: string) => Style);
94
96
  pointStyle?: (d: Datum) => Style & {
95
97
  r?: number;
96
98
  };
@@ -1,4 +1,4 @@
1
- import type { Datum } from "../charts/shared/datumTypes";
1
+ import type { Datum, DatumValue } from "../charts/shared/datumTypes";
2
2
  /**
3
3
  * Shared decay encoding utilities for all pipeline stores.
4
4
  *
@@ -37,4 +37,4 @@ export declare function buildDatumIndexMap(data: readonly Datum[]): Map<Datum, n
37
37
  *
38
38
  * @param indexMap Optional prebuilt datum→index map (see {@link buildDatumIndexMap}).
39
39
  */
40
- export declare function applyDecay(decay: DecayConfig, nodes: SceneNode[], data: Datum[], indexMap?: Map<any, number>): void;
40
+ export declare function applyDecay(decay: DecayConfig, nodes: SceneNode[], data: Datum[], indexMap?: Map<DatumValue, number>): void;
@@ -1,4 +1,4 @@
1
- import type { Datum } from "../charts/shared/datumTypes";
1
+ import type { Datum, DatumValue } from "../charts/shared/datumTypes";
2
2
  /**
3
3
  * Pulse encoding for XY pipeline scene nodes.
4
4
  *
@@ -21,7 +21,7 @@ export declare function computePulseIntensity(pulse: PulseConfig, insertTime: nu
21
21
  * @param indexMap Optional prebuilt datum→index map so a scene pass that
22
22
  * also runs decay can share one O(n) walk of the buffer.
23
23
  */
24
- export declare function applyPulse(pulse: PulseConfig, nodes: SceneNode[], data: Datum[], timestampBuffer: RingBuffer<number>, indexMap?: Map<any, number>, now?: number): boolean;
24
+ export declare function applyPulse(pulse: PulseConfig, nodes: SceneNode[], data: Datum[], timestampBuffer: RingBuffer<number>, indexMap?: Map<DatumValue, number>, now?: number): boolean;
25
25
  /**
26
26
  * Update the pulse-owned fields for a node that the pipeline has matched to
27
27
  * source data. Keeping this narrow is important for custom layouts: nodes
@@ -1,12 +1,33 @@
1
- import { type ChangeSet, type UpdateResult } from "./pipelineUpdateContract";
1
+ import { type ChangeSet, type Invalidation, type UpdateResult } from "./pipelineUpdateContract";
2
+ /** Whether a config patch re-derives retained XY data resources. */
3
+ export type XYRetainedDataEffect = "preserve" | "rebuild";
4
+ export interface XYConfigPatchDependency {
5
+ readonly retainedData: XYRetainedDataEffect;
6
+ readonly invalidations: readonly Invalidation[];
7
+ }
8
+ /**
9
+ * XY's explicit config-patch dependency table. Accessor and chart-mode
10
+ * changes re-derive retained data; scale/layout keys preserve data while
11
+ * rebuilding derived scene state; styling and overlays repaint their own
12
+ * layers. Mount-only and future-work keys intentionally have no immediate
13
+ * revision effect.
14
+ */
15
+ export declare const XY_CONFIG_PATCH_DEPENDENCIES: Readonly<Record<string, XYConfigPatchDependency>>;
16
+ export interface XYConfigPatchClassification {
17
+ readonly retainedData: XYRetainedDataEffect;
18
+ readonly invalidations: ReadonlySet<Invalidation>;
19
+ }
20
+ /** Union the declared effects for a patch after its effective keys are known. */
21
+ export declare function classifyXYConfigPatch(keys: readonly string[]): XYConfigPatchClassification;
2
22
  type DataChangeKind = Extract<ChangeSet["kind"], "ingest" | "replace" | "remove" | "update" | "clear">;
3
23
  /** Result bookkeeping and invalidation policy for the XY PipelineStore pilot. */
4
24
  export declare class PipelineStoreUpdateResults {
5
25
  private tracker;
6
26
  get last(): UpdateResult;
27
+ subscribe(listener: () => void): () => void;
7
28
  recordData(kind: DataChangeKind, count?: number): UpdateResult;
8
29
  recordNoop(kind: DataChangeKind | "restyle"): UpdateResult;
9
30
  recordRestyle(hasCustomRestyle: boolean): UpdateResult;
10
- recordConfig(keys: readonly string[], requiresRebuild: boolean, extentAccessorChanged: boolean): UpdateResult;
31
+ recordConfig(keys: readonly string[]): UpdateResult;
11
32
  }
12
33
  export {};