semiotic 3.3.1 → 3.4.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 (204) hide show
  1. package/CLAUDE.md +25 -6
  2. package/README.md +1 -1
  3. package/ai/dist/mcp-server.js +104 -9
  4. package/ai/schema.json +42 -1
  5. package/ai/system-prompt.md +4 -0
  6. package/dist/components/Annotation.d.ts +42 -2
  7. package/dist/components/CategoryColors.d.ts +1 -1
  8. package/dist/components/ChartGrid.d.ts +1 -1
  9. package/dist/components/ContextLayout.d.ts +1 -1
  10. package/dist/components/DataSummaryContext.d.ts +1 -1
  11. package/dist/components/DetailsPanel.d.ts +3 -2
  12. package/dist/components/Legend.d.ts +2 -3
  13. package/dist/components/LinkedCharts.d.ts +9 -1
  14. package/dist/components/ThemeProvider.d.ts +1 -1
  15. package/dist/components/Tooltip/FlippingTooltip.d.ts +1 -1
  16. package/dist/components/Tooltip/Tooltip.d.ts +4 -3
  17. package/dist/components/charts/geo/ChoroplethMap.d.ts +4 -4
  18. package/dist/components/charts/geo/DistanceCartogram.d.ts +5 -4
  19. package/dist/components/charts/geo/FlowMap.d.ts +4 -4
  20. package/dist/components/charts/geo/ProportionalSymbolMap.d.ts +4 -3
  21. package/dist/components/charts/index.d.ts +3 -1
  22. package/dist/components/charts/network/ChordDiagram.d.ts +4 -3
  23. package/dist/components/charts/network/CirclePack.d.ts +3 -3
  24. package/dist/components/charts/network/ForceDirectedGraph.d.ts +3 -2
  25. package/dist/components/charts/network/OrbitDiagram.d.ts +6 -5
  26. package/dist/components/charts/network/SankeyDiagram.d.ts +4 -3
  27. package/dist/components/charts/network/TreeDiagram.d.ts +3 -3
  28. package/dist/components/charts/network/Treemap.d.ts +3 -3
  29. package/dist/components/charts/ordinal/BarChart.d.ts +30 -4
  30. package/dist/components/charts/ordinal/BoxPlot.d.ts +4 -3
  31. package/dist/components/charts/ordinal/DonutChart.d.ts +4 -3
  32. package/dist/components/charts/ordinal/DotPlot.d.ts +13 -4
  33. package/dist/components/charts/ordinal/FunnelChart.d.ts +4 -3
  34. package/dist/components/charts/ordinal/GaugeChart.d.ts +2 -1
  35. package/dist/components/charts/ordinal/GroupedBarChart.d.ts +6 -5
  36. package/dist/components/charts/ordinal/Histogram.d.ts +4 -3
  37. package/dist/components/charts/ordinal/LikertChart.d.ts +8 -4
  38. package/dist/components/charts/ordinal/PieChart.d.ts +4 -3
  39. package/dist/components/charts/ordinal/RidgelinePlot.d.ts +4 -3
  40. package/dist/components/charts/ordinal/StackedBarChart.d.ts +6 -5
  41. package/dist/components/charts/ordinal/SwarmPlot.d.ts +4 -3
  42. package/dist/components/charts/ordinal/SwimlaneChart.d.ts +4 -3
  43. package/dist/components/charts/ordinal/ViolinPlot.d.ts +4 -3
  44. package/dist/components/charts/realtime/RealtimeHeatmap.d.ts +7 -6
  45. package/dist/components/charts/realtime/RealtimeHistogram.d.ts +10 -7
  46. package/dist/components/charts/realtime/RealtimeLineChart.d.ts +9 -6
  47. package/dist/components/charts/realtime/RealtimeSwarmChart.d.ts +7 -6
  48. package/dist/components/charts/realtime/RealtimeWaterfallChart.d.ts +9 -6
  49. package/dist/components/charts/shared/ChartError.d.ts +1 -2
  50. package/dist/components/charts/shared/annotationResolvers.d.ts +4 -3
  51. package/dist/components/charts/shared/annotationRules.d.ts +2 -1
  52. package/dist/components/charts/shared/colorUtils.d.ts +4 -3
  53. package/dist/components/charts/shared/datumTypes.d.ts +20 -0
  54. package/dist/components/charts/shared/diagnoseConfig.d.ts +2 -7
  55. package/dist/components/charts/shared/formatUtils.d.ts +4 -2
  56. package/dist/components/charts/shared/hooks.d.ts +41 -24
  57. package/dist/components/charts/shared/legendUtils.d.ts +3 -2
  58. package/dist/components/charts/shared/mergeShapeStyle.d.ts +43 -0
  59. package/dist/components/charts/shared/networkUtils.d.ts +7 -6
  60. package/dist/components/charts/shared/selectionUtils.d.ts +14 -11
  61. package/dist/components/charts/shared/statisticalOverlays.d.ts +14 -26
  62. package/dist/components/charts/shared/statisticalOverlaysLazy.d.ts +2 -2
  63. package/dist/components/charts/shared/statsTooltip.d.ts +3 -2
  64. package/dist/components/charts/shared/tooltipUtils.d.ts +20 -7
  65. package/dist/components/charts/shared/types.d.ts +27 -19
  66. package/dist/components/charts/shared/useChartSetup.d.ts +15 -6
  67. package/dist/components/charts/shared/useLikertAggregation.d.ts +18 -7
  68. package/dist/components/charts/shared/useOrdinalStreaming.d.ts +3 -2
  69. package/dist/components/charts/shared/useResolvedSelection.d.ts +2 -0
  70. package/dist/components/charts/shared/useStreamingLegend.d.ts +2 -1
  71. package/dist/components/charts/shared/validateChartData.d.ts +2 -1
  72. package/dist/components/charts/shared/validateProps.d.ts +2 -8
  73. package/dist/components/charts/shared/withChartWrapper.d.ts +1 -1
  74. package/dist/components/charts/xy/AreaChart.d.ts +4 -3
  75. package/dist/components/charts/xy/BubbleChart.d.ts +4 -3
  76. package/dist/components/charts/xy/CandlestickChart.d.ts +47 -0
  77. package/dist/components/charts/xy/ConnectedScatterplot.d.ts +4 -3
  78. package/dist/components/charts/xy/Heatmap.d.ts +12 -7
  79. package/dist/components/charts/xy/LineChart.d.ts +4 -3
  80. package/dist/components/charts/xy/MinimapChart.d.ts +4 -4
  81. package/dist/components/charts/xy/MultiAxisLineChart.d.ts +5 -4
  82. package/dist/components/charts/xy/QuadrantChart.d.ts +4 -3
  83. package/dist/components/charts/xy/Scatterplot.d.ts +4 -3
  84. package/dist/components/charts/xy/ScatterplotMatrix.d.ts +3 -3
  85. package/dist/components/charts/xy/StackedAreaChart.d.ts +4 -3
  86. package/dist/components/data/transforms.d.ts +8 -7
  87. package/dist/components/export/chartConfig.d.ts +4 -3
  88. package/dist/components/geo/mergeData.d.ts +2 -1
  89. package/dist/components/realtime/BinAccumulator.d.ts +3 -2
  90. package/dist/components/realtime/renderers/types.d.ts +2 -1
  91. package/dist/components/realtime/renderers/waterfallRenderer.d.ts +2 -1
  92. package/dist/components/realtime/types.d.ts +32 -16
  93. package/dist/components/semiotic-geo.d.ts +4 -0
  94. package/dist/components/semiotic-network.d.ts +7 -0
  95. package/dist/components/semiotic-ordinal.d.ts +8 -0
  96. package/dist/components/semiotic-themes.d.ts +2 -1
  97. package/dist/components/semiotic-xy.d.ts +11 -0
  98. package/dist/components/semiotic.d.ts +3 -3
  99. package/dist/components/server/animatedGif.d.ts +4 -18
  100. package/dist/components/server/renderToStaticSVG.d.ts +6 -5
  101. package/dist/components/server/serverChartConfigs.d.ts +2 -10
  102. package/dist/components/server/staticAnnotations.d.ts +2 -1
  103. package/dist/components/server/staticLegend.d.ts +2 -1
  104. package/dist/components/store/ObservationStore.d.ts +4 -3
  105. package/dist/components/store/SelectionStore.d.ts +3 -8
  106. package/dist/components/store/ThemeStore.d.ts +34 -4
  107. package/dist/components/store/TooltipStore.d.ts +1 -1
  108. package/dist/components/store/useSelection.d.ts +6 -5
  109. package/dist/components/stream/AccessibleDataTable.d.ts +5 -5
  110. package/dist/components/stream/CanvasHitTester.d.ts +10 -4
  111. package/dist/components/stream/DataSourceAdapter.d.ts +19 -1
  112. package/dist/components/stream/FocusRing.d.ts +1 -2
  113. package/dist/components/stream/GeoCanvasHitTester.d.ts +1 -1
  114. package/dist/components/stream/GeoParticlePool.d.ts +2 -1
  115. package/dist/components/stream/GeoPipelineStore.d.ts +26 -7
  116. package/dist/components/stream/MarginalGraphics.d.ts +1 -2
  117. package/dist/components/stream/NetworkPipelineStore.d.ts +8 -2
  118. package/dist/components/stream/NetworkSVGOverlay.d.ts +4 -4
  119. package/dist/components/stream/OrdinalBrushOverlay.d.ts +1 -19
  120. package/dist/components/stream/OrdinalCanvasHitTester.d.ts +3 -1
  121. package/dist/components/stream/OrdinalPipelineStore.d.ts +44 -6
  122. package/dist/components/stream/OrdinalSVGOverlay.d.ts +6 -5
  123. package/dist/components/stream/ParticlePool.d.ts +4 -0
  124. package/dist/components/stream/PipelineStore.d.ts +80 -30
  125. package/dist/components/stream/SVGOverlay.d.ts +10 -10
  126. package/dist/components/stream/SceneGraph.d.ts +6 -5
  127. package/dist/components/stream/StreamGeoFrame.d.ts +2 -1
  128. package/dist/components/stream/StreamNetworkFrame.d.ts +2 -1
  129. package/dist/components/stream/StreamOrdinalFrame.d.ts +2 -1
  130. package/dist/components/stream/StreamXYFrame.d.ts +19 -1
  131. package/dist/components/stream/XYBrushOverlay.d.ts +1 -21
  132. package/dist/components/stream/devDataAccessWarning.d.ts +2 -11
  133. package/dist/components/stream/geoTypes.d.ts +32 -18
  134. package/dist/components/stream/hoverUtils.d.ts +14 -1
  135. package/dist/components/stream/layouts/hierarchySceneBuilders.d.ts +4 -3
  136. package/dist/components/stream/layouts/hierarchyUtils.d.ts +4 -3
  137. package/dist/components/stream/networkTypes.d.ts +51 -28
  138. package/dist/components/stream/ordinalSceneBuilders/barFunnelScene.d.ts +1 -1
  139. package/dist/components/stream/ordinalSceneBuilders/barScene.d.ts +2 -2
  140. package/dist/components/stream/ordinalSceneBuilders/connectorScene.d.ts +1 -1
  141. package/dist/components/stream/ordinalSceneBuilders/pointScene.d.ts +2 -2
  142. package/dist/components/stream/ordinalSceneBuilders/statisticalScene.d.ts +4 -4
  143. package/dist/components/stream/ordinalSceneBuilders/swimlaneScene.d.ts +1 -1
  144. package/dist/components/stream/ordinalSceneBuilders/timelineScene.d.ts +1 -1
  145. package/dist/components/stream/ordinalSceneBuilders/types.d.ts +9 -8
  146. package/dist/components/stream/ordinalTypes.d.ts +102 -29
  147. package/dist/components/stream/pipelineDecay.d.ts +2 -1
  148. package/dist/components/stream/pipelinePulse.d.ts +2 -1
  149. package/dist/components/stream/pipelineTransitionUtils.d.ts +21 -0
  150. package/dist/components/stream/pipelineTransitions.d.ts +16 -4
  151. package/dist/components/stream/quadtreeHitTest.d.ts +22 -0
  152. package/dist/components/stream/renderers/colorUtils.d.ts +20 -0
  153. package/dist/components/stream/renderers/resolveCSSColor.d.ts +23 -6
  154. package/dist/components/stream/types.d.ts +63 -8
  155. package/dist/components/stream/useFrame.d.ts +122 -0
  156. package/dist/components/stream/xySceneBuilders/areaScene.d.ts +3 -2
  157. package/dist/components/stream/xySceneBuilders/barScene.d.ts +2 -1
  158. package/dist/components/stream/xySceneBuilders/boundsScene.d.ts +2 -1
  159. package/dist/components/stream/xySceneBuilders/candlestickScene.d.ts +2 -1
  160. package/dist/components/stream/xySceneBuilders/emitPointNodes.d.ts +3 -2
  161. package/dist/components/stream/xySceneBuilders/heatmapScene.d.ts +2 -1
  162. package/dist/components/stream/xySceneBuilders/lineScene.d.ts +2 -1
  163. package/dist/components/stream/xySceneBuilders/mixedScene.d.ts +2 -1
  164. package/dist/components/stream/xySceneBuilders/pointScene.d.ts +2 -1
  165. package/dist/components/stream/xySceneBuilders/swarmScene.d.ts +2 -1
  166. package/dist/components/stream/xySceneBuilders/types.d.ts +35 -26
  167. package/dist/components/stream/xySceneBuilders/waterfallScene.d.ts +2 -1
  168. package/dist/components/types/marginType.d.ts +15 -0
  169. package/dist/geo.min.js +1 -1
  170. package/dist/geo.module.min.js +1 -1
  171. package/dist/network.min.js +1 -1
  172. package/dist/network.module.min.js +1 -1
  173. package/dist/ordinal.min.js +1 -1
  174. package/dist/ordinal.module.min.js +1 -1
  175. package/dist/realtime.min.js +1 -1
  176. package/dist/realtime.module.min.js +1 -1
  177. package/dist/semiotic-ai.min.js +1 -1
  178. package/dist/semiotic-ai.module.min.js +1 -1
  179. package/dist/semiotic-geo.d.ts +4 -0
  180. package/dist/semiotic-network.d.ts +7 -0
  181. package/dist/semiotic-ordinal.d.ts +8 -0
  182. package/dist/semiotic-statisticalOverlays-Ckd_jM8z.js +1 -0
  183. package/dist/semiotic-themes.d.ts +2 -1
  184. package/dist/semiotic-themes.min.js +1 -1
  185. package/dist/semiotic-themes.module.min.js +1 -1
  186. package/dist/semiotic-utils.min.js +1 -1
  187. package/dist/semiotic-utils.module.min.js +1 -1
  188. package/dist/semiotic-xy.d.ts +11 -0
  189. package/dist/semiotic.d.ts +3 -3
  190. package/dist/semiotic.min.js +1 -1
  191. package/dist/semiotic.module.min.js +1 -1
  192. package/dist/server.min.js +1 -1
  193. package/dist/server.module.min.js +1 -1
  194. package/dist/test-utils/canvasMock.d.ts +35 -1
  195. package/dist/test-utils/ordinalFixtures.d.ts +48 -0
  196. package/dist/xy.min.js +1 -1
  197. package/dist/xy.module.min.js +1 -1
  198. package/package.json +50 -42
  199. package/dist/components/types/annotationTypes.d.ts +0 -145
  200. package/dist/components/types/generalTypes.d.ts +0 -241
  201. package/dist/components/types/interactionTypes.d.ts +0 -72
  202. package/dist/components/types/networkTypes.d.ts +0 -174
  203. package/dist/components/types/ordinalTypes.d.ts +0 -112
  204. package/dist/semiotic-statisticalOverlays-DGX_WWc5.js +0 -1
@@ -0,0 +1,122 @@
1
+ import * as React from "react";
2
+ import type { ReactNode } from "react";
3
+ import type { SemioticTheme } from "../store/ThemeStore";
4
+ import { useResponsiveSize } from "./useResponsiveSize";
5
+ import { resolveAnimateConfig } from "./pipelineTransitionUtils";
6
+ import type { AnimateProp } from "./pipelineTransitionUtils";
7
+ import type { TransitionConfig } from "./types";
8
+ import type { HoverPointerCoords } from "./hoverUtils";
9
+ /**
10
+ * Frame-supplied margin defaults. Each Stream Frame has its own — XY's
11
+ * differs from Ordinal's, Network has both a default and a CENTERED variant
12
+ * for radial chart types. The hook accepts the resolved default and
13
+ * shallow-merges user margin on top.
14
+ */
15
+ export interface FrameMargin {
16
+ top: number;
17
+ right: number;
18
+ bottom: number;
19
+ left: number;
20
+ }
21
+ /**
22
+ * Foreground/background graphics can be a ReactNode (rendered as-is) or a
23
+ * function that receives the current `{ size, margin }` and returns one.
24
+ * The function form lets users place chrome relative to the chart area.
25
+ */
26
+ export type FrameGraphicsProp = ReactNode | ((ctx: {
27
+ size: number[];
28
+ margin: FrameMargin;
29
+ }) => ReactNode);
30
+ export interface UseFrameInput {
31
+ /** Resolved size `[width, height]`. Each frame defaults its `size` prop
32
+ * before calling, so this is never undefined. */
33
+ sizeProp: [number, number];
34
+ /** Frame's `responsiveWidth` prop. */
35
+ responsiveWidth: boolean | undefined;
36
+ /** Frame's `responsiveHeight` prop. */
37
+ responsiveHeight: boolean | undefined;
38
+ /** Frame's user-supplied margin (always partial — each side optional).
39
+ * Matches the `margin?:` prop type on every Stream Frame. */
40
+ userMargin: Partial<FrameMargin> | undefined;
41
+ /** Frame's family-default margin. Shallow-merged with `userMargin`. */
42
+ marginDefault: FrameMargin;
43
+ /** Frame's `foregroundGraphics` prop. */
44
+ foregroundGraphics?: FrameGraphicsProp;
45
+ /** Frame's `backgroundGraphics` prop. */
46
+ backgroundGraphics?: FrameGraphicsProp;
47
+ /** Frame's `animate` prop. */
48
+ animate?: AnimateProp;
49
+ /** Frame's `transition` prop (legacy / explicit form). */
50
+ transitionProp?: TransitionConfig;
51
+ /**
52
+ * Frame's `dirtyRef` (the flag that forces a full canvas redraw on the
53
+ * next paint). When provided, useFrame installs a theme-change effect
54
+ * that bumps it to `true`, clears the CSS-var cache, and queues a
55
+ * render — the pattern that all four frames duplicated.
56
+ *
57
+ * Optional because this is a Tier B add-on; before the migration the
58
+ * frames installed this themselves. The hook keeps the input optional
59
+ * so a frame can opt in independently, but in practice all four pass
60
+ * it.
61
+ *
62
+ * `dirtyRef` is owned by the frame (not the hook) because its initial
63
+ * value differs — only `StreamXYFrame` inits to `false`; Ordinal,
64
+ * Network, and Geo all init to `true` (load-bearing for first-paint
65
+ * timing on those three).
66
+ */
67
+ themeDirtyRef?: React.MutableRefObject<boolean>;
68
+ }
69
+ export interface UseFrameResult {
70
+ /** Reduced-motion preference at last render (for re-render gating). */
71
+ reducedMotion: boolean;
72
+ /** Reduced-motion ref-mirror so render closures see the latest value
73
+ * without depending on it. */
74
+ reducedMotionRef: React.MutableRefObject<boolean>;
75
+ /** Ref to attach to the responsive container. */
76
+ responsiveRef: ReturnType<typeof useResponsiveSize>[0];
77
+ /** Resolved size `[width, height]` accounting for `responsiveWidth/Height`. */
78
+ size: [number, number];
79
+ /** Effective margin (`marginDefault` ⊕ `userMargin`). */
80
+ margin: FrameMargin;
81
+ /** `size[0] - margin.left - margin.right`. */
82
+ adjustedWidth: number;
83
+ /** `size[1] - margin.top - margin.bottom`. */
84
+ adjustedHeight: number;
85
+ /** Resolved foreground (function-or-node, evaluated). */
86
+ resolvedForeground: ReactNode;
87
+ /** Resolved background (function-or-node, evaluated). */
88
+ resolvedBackground: ReactNode;
89
+ /** Current theme from the ThemeStore — re-renders on theme change. */
90
+ currentTheme: SemioticTheme;
91
+ /** Resolved transition config from `animate`/`transition` props. */
92
+ transition: ReturnType<typeof resolveAnimateConfig>["transition"];
93
+ /** Whether the intro animation should run on first render. */
94
+ introEnabled: boolean;
95
+ /** Stable id for the AccessibleDataTable region (hash-suffixed). */
96
+ tableId: string;
97
+ /** Token of the pending rAF, or 0 if none. */
98
+ rafRef: React.MutableRefObject<number>;
99
+ /** Frame assigns its render closure here. */
100
+ renderFnRef: React.MutableRefObject<() => void>;
101
+ /** Queue a render on the next animation frame. Coalesces. */
102
+ scheduleRender: () => void;
103
+ /** Frame assigns its hover handler closure here. */
104
+ hoverHandlerRef: React.MutableRefObject<(coords: HoverPointerCoords) => void>;
105
+ /** Frame assigns its pointer-leave closure here. */
106
+ hoverLeaveRef: React.MutableRefObject<() => void>;
107
+ /** Stable callback to attach to canvas's onPointerMove (or onMouseMove).
108
+ * Captures the coords and queues a single rAF to drain into hoverHandlerRef. */
109
+ onPointerMove: (e: {
110
+ clientX: number;
111
+ clientY: number;
112
+ }) => void;
113
+ /** Stable callback to attach to canvas's onPointerLeave (or onMouseLeave).
114
+ * Cancels any pending hover rAF and invokes hoverLeaveRef. */
115
+ onPointerLeave: () => void;
116
+ }
117
+ /**
118
+ * Bundles the universally-shared setup boilerplate that opens every
119
+ * Stream Frame. See `FRAME_COMPOSITION_LOG.md` for which concerns are
120
+ * inside this hook vs. left frame-specific.
121
+ */
122
+ export declare function useFrame(input: UseFrameInput): UseFrameResult;
@@ -1,3 +1,4 @@
1
+ import type { Datum } from "../../charts/shared/datumTypes";
1
2
  /**
2
3
  * Area and stacked area scene builders.
3
4
  *
@@ -9,5 +10,5 @@
9
10
  */
10
11
  import type { SceneNode } from "../types";
11
12
  import type { XYSceneContext } from "./types";
12
- export declare function buildAreaScene(ctx: XYSceneContext, data: Record<string, any>[]): SceneNode[];
13
- export declare function buildStackedAreaScene(ctx: XYSceneContext, data: Record<string, any>[]): SceneNode[];
13
+ export declare function buildAreaScene(ctx: XYSceneContext, data: Datum[]): SceneNode[];
14
+ export declare function buildStackedAreaScene(ctx: XYSceneContext, data: Datum[]): SceneNode[];
@@ -1,3 +1,4 @@
1
+ import type { Datum } from "../../charts/shared/datumTypes";
1
2
  /**
2
3
  * Realtime histogram bar scene builder.
3
4
  *
@@ -15,4 +16,4 @@ export interface BarSceneResult {
15
16
  /** Sorted bin boundary values (edges of all bins) for data-driven brush snapping */
16
17
  binBoundaries: number[];
17
18
  }
18
- export declare function buildBarScene(ctx: XYSceneContext, data: Record<string, any>[]): BarSceneResult;
19
+ export declare function buildBarScene(ctx: XYSceneContext, data: Datum[]): BarSceneResult;
@@ -1,3 +1,4 @@
1
+ import type { Datum } from "../../charts/shared/datumTypes";
1
2
  /**
2
3
  * Bounds scene builder — produces an AreaSceneNode for confidence bands/envelopes.
3
4
  *
@@ -5,4 +6,4 @@
5
6
  */
6
7
  import type { AreaSceneNode } from "../types";
7
8
  import type { XYSceneContext } from "./types";
8
- export declare function buildBoundsForGroup(ctx: XYSceneContext, data: Record<string, any>[], group: string): AreaSceneNode | null;
9
+ export declare function buildBoundsForGroup(ctx: XYSceneContext, data: Datum[], group: string): AreaSceneNode | null;
@@ -1,3 +1,4 @@
1
+ import type { Datum } from "../../charts/shared/datumTypes";
1
2
  /**
2
3
  * Candlestick (OHLC) scene builder.
3
4
  *
@@ -7,4 +8,4 @@
7
8
  */
8
9
  import type { SceneNode, StreamLayout } from "../types";
9
10
  import type { XYSceneContext } from "./types";
10
- export declare function buildCandlestickScene(ctx: XYSceneContext, data: Record<string, any>[], layout: StreamLayout): SceneNode[];
11
+ export declare function buildCandlestickScene(ctx: XYSceneContext, data: Datum[], _layout: StreamLayout): SceneNode[];
@@ -1,3 +1,4 @@
1
+ import type { Datum } from "../../charts/shared/datumTypes";
1
2
  /**
2
3
  * Shared helper for emitting PointSceneNodes from grouped data.
3
4
  *
@@ -9,5 +10,5 @@ import type { SceneNode } from "../types";
9
10
  import type { XYSceneContext } from "./types";
10
11
  export declare function emitPointNodes(ctx: XYSceneContext, groups: {
11
12
  key: string;
12
- data: Record<string, any>[];
13
- }[], nodes: SceneNode[], yGetOverride?: (d: Record<string, any>) => number): void;
13
+ data: Datum[];
14
+ }[], nodes: SceneNode[], yGetOverride?: (d: Datum) => number): void;
@@ -1,3 +1,4 @@
1
+ import type { Datum } from "../../charts/shared/datumTypes";
1
2
  import type { SceneNode, StreamLayout } from "../types";
2
3
  import type { XYSceneContext } from "./types";
3
- export declare function buildHeatmapScene(ctx: XYSceneContext, data: Record<string, any>[], layout: StreamLayout): SceneNode[];
4
+ export declare function buildHeatmapScene(ctx: XYSceneContext, data: Datum[], layout: StreamLayout): SceneNode[];
@@ -1,3 +1,4 @@
1
+ import type { Datum } from "../../charts/shared/datumTypes";
1
2
  /**
2
3
  * Line scene builder — produces LineSceneNode[] from grouped data.
3
4
  *
@@ -9,4 +10,4 @@
9
10
  */
10
11
  import type { SceneNode } from "../types";
11
12
  import type { XYSceneContext } from "./types";
12
- export declare function buildLineScene(ctx: XYSceneContext, data: Record<string, any>[]): SceneNode[];
13
+ export declare function buildLineScene(ctx: XYSceneContext, data: Datum[]): SceneNode[];
@@ -1,3 +1,4 @@
1
+ import type { Datum } from "../../charts/shared/datumTypes";
1
2
  /**
2
3
  * Mixed scene builder — renders some series as areas and others as lines.
3
4
  *
@@ -9,4 +10,4 @@
9
10
  */
10
11
  import type { SceneNode } from "../types";
11
12
  import type { XYSceneContext } from "./types";
12
- export declare function buildMixedScene(ctx: XYSceneContext, data: Record<string, any>[]): SceneNode[];
13
+ export declare function buildMixedScene(ctx: XYSceneContext, data: Datum[]): SceneNode[];
@@ -1,3 +1,4 @@
1
+ import type { Datum } from "../../charts/shared/datumTypes";
1
2
  /**
2
3
  * Point/scatter/bubble scene builder.
3
4
  *
@@ -9,4 +10,4 @@
9
10
  */
10
11
  import type { SceneNode } from "../types";
11
12
  import type { XYSceneContext } from "./types";
12
- export declare function buildPointScene(ctx: XYSceneContext, data: Record<string, any>[]): SceneNode[];
13
+ export declare function buildPointScene(ctx: XYSceneContext, data: Datum[]): SceneNode[];
@@ -1,3 +1,4 @@
1
+ import type { Datum } from "../../charts/shared/datumTypes";
1
2
  /**
2
3
  * Realtime swarm chart scene builder.
3
4
  *
@@ -7,4 +8,4 @@
7
8
  */
8
9
  import type { SceneNode } from "../types";
9
10
  import type { XYSceneContext } from "./types";
10
- export declare function buildSwarmScene(ctx: XYSceneContext, data: Record<string, any>[]): SceneNode[];
11
+ export declare function buildSwarmScene(ctx: XYSceneContext, data: Datum[]): SceneNode[];
@@ -1,3 +1,4 @@
1
+ import type { Datum } from "../../charts/shared/datumTypes";
1
2
  /**
2
3
  * XYSceneContext — shared context passed to all XY scene builder functions.
3
4
  *
@@ -5,33 +6,33 @@
5
6
  * Scene builders are pure functions that receive this context instead of
6
7
  * accessing PipelineStore instance fields directly.
7
8
  */
8
- import type { StreamScales, Style, CurveType } from "../types";
9
+ import type { StreamScales, Style, CurveType, BarStyle, ThemeSemanticColors } from "../types";
9
10
  export interface XYSceneContext {
10
11
  scales: StreamScales;
11
12
  config: XYSceneConfig;
12
- getX: (d: any) => number;
13
- getY: (d: any) => number;
14
- getY0?: (d: any) => number | null;
15
- getSize?: (d: any) => number;
16
- getColor?: (d: any) => string;
17
- getGroup?: (d: any) => string;
18
- getCategory?: (d: any) => string;
19
- getPointId?: (d: any) => string;
20
- getBounds?: (d: any) => number | null;
21
- getOpen?: (d: any) => number;
22
- getHigh?: (d: any) => number;
23
- getLow?: (d: any) => number;
24
- getClose?: (d: any) => number;
13
+ getX: (d: Datum) => number;
14
+ getY: (d: Datum) => number;
15
+ getY0?: (d: Datum) => number | null;
16
+ getSize?: (d: Datum) => number;
17
+ getColor?: (d: Datum) => string;
18
+ getGroup?: (d: Datum) => string;
19
+ getCategory?: (d: Datum) => string;
20
+ getPointId?: (d: Datum) => string;
21
+ getBounds?: (d: Datum) => number | null;
22
+ getOpen?: (d: Datum) => number;
23
+ getHigh?: (d: Datum) => number;
24
+ getLow?: (d: Datum) => number;
25
+ getClose?: (d: Datum) => number;
25
26
  /** Style resolvers — delegate to PipelineStore's cached color management */
26
- resolveLineStyle: (group: string, sampleDatum?: Record<string, any>) => Style;
27
- resolveAreaStyle: (group: string, sampleDatum?: Record<string, any>) => Style;
28
- resolveBoundsStyle: (group: string, sampleDatum?: Record<string, any>) => Style;
29
- resolveColorMap: (data: Record<string, any>[]) => Map<string, string>;
27
+ resolveLineStyle: (group: string, sampleDatum?: Datum) => Style;
28
+ resolveAreaStyle: (group: string, sampleDatum?: Datum) => Style;
29
+ resolveBoundsStyle: (group: string, sampleDatum?: Datum) => Style;
30
+ resolveColorMap: (data: Datum[]) => Map<string, string>;
30
31
  resolveGroupColor: (group: string) => string | null;
31
32
  /** Group data by lineBy/colorBy accessor */
32
- groupData: (data: Record<string, any>[]) => {
33
+ groupData: (data: Datum[]) => {
33
34
  key: string;
34
- data: Record<string, any>[];
35
+ data: Datum[];
35
36
  }[];
36
37
  /** Instance-scoped mutable cache for bar category ordering (prevents cross-instance leaks) */
37
38
  barCategoryCache?: {
@@ -61,14 +62,14 @@ export interface XYSceneConfig {
61
62
  color: string;
62
63
  }>;
63
64
  };
64
- annotations?: Record<string, any>[];
65
- pointStyle?: (d: any) => Style & {
65
+ annotations?: Datum[];
66
+ pointStyle?: (d: Datum) => Style & {
66
67
  r?: number;
67
68
  };
68
69
  sizeRange?: [number, number];
69
- xAccessor?: string | ((d: any) => any);
70
- yAccessor?: string | ((d: any) => any);
71
- valueAccessor?: string | ((d: any) => any);
70
+ xAccessor?: string | ((d: Datum) => any);
71
+ yAccessor?: string | ((d: Datum) => any);
72
+ valueAccessor?: string | ((d: Datum) => any);
72
73
  heatmapAggregation?: "count" | "sum" | "mean";
73
74
  heatmapXBins?: number;
74
75
  heatmapYBins?: number;
@@ -76,6 +77,13 @@ export interface XYSceneConfig {
76
77
  heatmapValueFormat?: (v: number) => string;
77
78
  binSize?: number;
78
79
  barColors?: Record<string, string>;
80
+ /** Bar fill/stroke/strokeWidth/gap. Threaded through from RealtimeHistogram. */
81
+ barStyle?: BarStyle;
82
+ themeSemantic?: ThemeSemanticColors;
83
+ /** Theme sequential scheme name — fallback when colorScheme is not set (heatmap). */
84
+ themeSequential?: string;
85
+ /** Theme diverging scheme name — fallback when colorScheme is not set. */
86
+ themeDiverging?: string;
79
87
  swarmStyle?: {
80
88
  radius?: number;
81
89
  fill?: string;
@@ -89,6 +97,7 @@ export interface XYSceneConfig {
89
97
  gap?: number;
90
98
  stroke?: string;
91
99
  strokeWidth?: number;
100
+ opacity?: number;
92
101
  connectorStroke?: string;
93
102
  connectorWidth?: number;
94
103
  };
@@ -104,5 +113,5 @@ export interface XYSceneConfig {
104
113
  candlestickRangeMode?: boolean;
105
114
  boundsStyle?: Style | ((d: any, group: string) => Style);
106
115
  lineStyle?: Style | ((d: any, group: string) => Style);
107
- areaStyle?: (d: any) => Style;
116
+ areaStyle?: (d: Datum) => Style;
108
117
  }
@@ -7,6 +7,7 @@
7
7
  * Dependencies: SceneGraph (buildRectNode)
8
8
  * Consumed by: PipelineStore.buildSceneNodes (chartType "waterfall")
9
9
  */
10
+ import type { Datum } from "../../charts/shared/datumTypes";
10
11
  import type { SceneNode, StreamLayout } from "../types";
11
12
  import type { XYSceneContext } from "./types";
12
- export declare function buildWaterfallScene(ctx: XYSceneContext, data: Record<string, any>[], layout: StreamLayout): SceneNode[];
13
+ export declare function buildWaterfallScene(ctx: XYSceneContext, data: Datum[], layout: StreamLayout): SceneNode[];
@@ -0,0 +1,15 @@
1
+ /** Resolved chart margin in pixels — every side populated. This is the
2
+ * internal shape after the frame merges the user-supplied margin with
3
+ * chart-mode defaults, so downstream layout math can read all four fields
4
+ * without null-checking. */
5
+ export interface MarginType {
6
+ top: number;
7
+ bottom: number;
8
+ left: number;
9
+ right: number;
10
+ }
11
+ /** Public-API margin shape. Users can pass any subset of sides (`{ left: 120 }`
12
+ * for wide y-axis labels is a common pattern) or a single number as shorthand
13
+ * for "same on all sides". The frame fills missing sides from the chart-mode
14
+ * defaults before handing a fully-resolved `MarginType` to the layout code. */
15
+ export type PartialMargin = number | Partial<MarginType>;