semiotic 3.0.0 → 3.1.0

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 (219) hide show
  1. package/CLAUDE.md +242 -29
  2. package/README.md +101 -66
  3. package/ai/cli.js +34 -21
  4. package/ai/dist/componentRegistry.js +2 -0
  5. package/ai/dist/mcp-server.js +54 -0
  6. package/ai/examples.md +433 -18
  7. package/ai/schema.json +134 -1
  8. package/ai/system-prompt.md +51 -10
  9. package/dist/{ChartGrid.d.ts → components/ChartGrid.d.ts} +9 -7
  10. package/dist/components/Legend.d.ts +9 -0
  11. package/dist/{LinkedCharts.d.ts → components/LinkedCharts.d.ts} +34 -1
  12. package/dist/{Tooltip → components/Tooltip}/Tooltip.d.ts +9 -2
  13. package/dist/components/charts/geo/ChoroplethMap.d.ts +53 -0
  14. package/dist/components/charts/geo/DistanceCartogram.d.ts +90 -0
  15. package/dist/components/charts/geo/FlowMap.d.ts +83 -0
  16. package/dist/components/charts/geo/ProportionalSymbolMap.d.ts +67 -0
  17. package/dist/components/charts/geo/index.d.ts +8 -0
  18. package/dist/{charts → components/charts}/index.d.ts +4 -0
  19. package/dist/{charts → components/charts}/network/ChordDiagram.d.ts +8 -5
  20. package/dist/{charts → components/charts}/network/CirclePack.d.ts +4 -2
  21. package/dist/{charts → components/charts}/network/ForceDirectedGraph.d.ts +10 -6
  22. package/dist/components/charts/network/OrbitDiagram.d.ts +79 -0
  23. package/dist/{charts → components/charts}/network/SankeyDiagram.d.ts +8 -5
  24. package/dist/{charts → components/charts}/network/TreeDiagram.d.ts +4 -2
  25. package/dist/{charts → components/charts}/network/Treemap.d.ts +4 -2
  26. package/dist/{charts → components/charts}/ordinal/BarChart.d.ts +9 -5
  27. package/dist/{charts → components/charts}/ordinal/BoxPlot.d.ts +9 -5
  28. package/dist/{charts → components/charts}/ordinal/DonutChart.d.ts +9 -5
  29. package/dist/{charts → components/charts}/ordinal/DotPlot.d.ts +9 -5
  30. package/dist/{charts → components/charts}/ordinal/GroupedBarChart.d.ts +9 -5
  31. package/dist/{charts → components/charts}/ordinal/Histogram.d.ts +8 -5
  32. package/dist/{charts → components/charts}/ordinal/PieChart.d.ts +9 -5
  33. package/dist/{charts → components/charts}/ordinal/RidgelinePlot.d.ts +2 -0
  34. package/dist/{charts → components/charts}/ordinal/StackedBarChart.d.ts +9 -5
  35. package/dist/{charts → components/charts}/ordinal/SwarmPlot.d.ts +9 -5
  36. package/dist/{charts → components/charts}/ordinal/ViolinPlot.d.ts +8 -5
  37. package/dist/{charts → components/charts}/realtime/RealtimeHeatmap.d.ts +24 -6
  38. package/dist/{charts → components/charts}/realtime/RealtimeHistogram.d.ts +28 -7
  39. package/dist/{charts → components/charts}/realtime/RealtimeLineChart.d.ts +23 -5
  40. package/dist/{charts → components/charts}/realtime/RealtimeSwarmChart.d.ts +24 -6
  41. package/dist/{charts → components/charts}/realtime/RealtimeWaterfallChart.d.ts +23 -5
  42. package/dist/{charts → components/charts}/shared/colorUtils.d.ts +5 -0
  43. package/dist/components/charts/shared/diagnoseConfig.d.ts +23 -0
  44. package/dist/{charts → components/charts}/shared/hooks.d.ts +36 -2
  45. package/dist/{charts → components/charts}/shared/legendUtils.d.ts +2 -3
  46. package/dist/{charts → components/charts}/shared/statisticalOverlays.d.ts +1 -2
  47. package/dist/components/charts/shared/statisticalOverlaysLazy.d.ts +10 -0
  48. package/dist/components/charts/shared/stringDistance.d.ts +11 -0
  49. package/dist/{charts → components/charts}/shared/tooltipUtils.d.ts +2 -2
  50. package/dist/{charts → components/charts}/shared/types.d.ts +16 -4
  51. package/dist/components/charts/shared/useChartSetup.d.ts +112 -0
  52. package/dist/components/charts/shared/useStreamingLegend.d.ts +65 -0
  53. package/dist/{charts → components/charts}/shared/withChartWrapper.d.ts +10 -0
  54. package/dist/{charts → components/charts}/xy/AreaChart.d.ts +18 -5
  55. package/dist/{charts → components/charts}/xy/BubbleChart.d.ts +18 -5
  56. package/dist/{charts → components/charts}/xy/ConnectedScatterplot.d.ts +10 -6
  57. package/dist/{charts → components/charts}/xy/Heatmap.d.ts +24 -5
  58. package/dist/{charts → components/charts}/xy/LineChart.d.ts +47 -5
  59. package/dist/{charts → components/charts}/xy/MinimapChart.d.ts +3 -0
  60. package/dist/components/charts/xy/QuadrantChart.d.ts +120 -0
  61. package/dist/{charts → components/charts}/xy/Scatterplot.d.ts +11 -5
  62. package/dist/{charts → components/charts}/xy/StackedAreaChart.d.ts +18 -5
  63. package/dist/{export → components/export}/exportChart.d.ts +6 -1
  64. package/dist/components/geo/mergeData.d.ts +18 -0
  65. package/dist/components/geo/referenceGeography.d.ts +10 -0
  66. package/dist/components/geo/useReferenceAreas.d.ts +13 -0
  67. package/dist/{realtime → components/realtime}/RingBuffer.d.ts +1 -0
  68. package/dist/{realtime → components/realtime}/types.d.ts +17 -0
  69. package/dist/components/semiotic-ai.d.ts +61 -0
  70. package/dist/components/semiotic-data.d.ts +8 -0
  71. package/dist/components/semiotic-geo.d.ts +16 -0
  72. package/dist/components/semiotic-network.d.ts +14 -0
  73. package/dist/components/semiotic-ordinal.d.ts +18 -0
  74. package/dist/components/semiotic-realtime.d.ts +22 -0
  75. package/dist/components/semiotic-server.d.ts +1 -0
  76. package/dist/components/semiotic-xy.d.ts +17 -0
  77. package/dist/components/semiotic.d.ts +57 -0
  78. package/dist/{server → components/server}/renderToStaticSVG.d.ts +11 -2
  79. package/dist/components/stream/AccessibleDataTable.d.ts +50 -0
  80. package/dist/{stream → components/stream}/CanvasHitTester.d.ts +8 -2
  81. package/dist/components/stream/DataSourceAdapter.d.ts +64 -0
  82. package/dist/components/stream/GeoCanvasHitTester.d.ts +19 -0
  83. package/dist/components/stream/GeoParticlePool.d.ts +46 -0
  84. package/dist/components/stream/GeoPipelineStore.d.ts +81 -0
  85. package/dist/components/stream/GeoTileRenderer.d.ts +31 -0
  86. package/dist/{stream → components/stream}/NetworkPipelineStore.d.ts +16 -4
  87. package/dist/{stream → components/stream}/NetworkSVGOverlay.d.ts +24 -1
  88. package/dist/{stream → components/stream}/OrdinalPipelineStore.d.ts +8 -4
  89. package/dist/{stream → components/stream}/OrdinalSVGOverlay.d.ts +31 -1
  90. package/dist/{stream → components/stream}/PipelineStore.d.ts +64 -5
  91. package/dist/components/stream/SVGOverlay.d.ts +98 -0
  92. package/dist/{stream → components/stream}/SceneGraph.d.ts +7 -3
  93. package/dist/components/stream/SceneToSVG.d.ts +22 -0
  94. package/dist/components/stream/StreamGeoFrame.d.ts +4 -0
  95. package/dist/{stream → components/stream}/accessorUtils.d.ts +1 -0
  96. package/dist/components/stream/canvasSetup.d.ts +26 -0
  97. package/dist/components/stream/geoTypes.d.ts +186 -0
  98. package/dist/components/stream/hitTestUtils.d.ts +23 -0
  99. package/dist/components/stream/layouts/forceLayoutPlugin.d.ts +2 -0
  100. package/dist/{stream → components/stream}/layouts/index.d.ts +2 -1
  101. package/dist/components/stream/layouts/orbitLayoutPlugin.d.ts +2 -0
  102. package/dist/components/stream/legendRenderer.d.ts +33 -0
  103. package/dist/{stream → components/stream}/networkTypes.d.ts +59 -3
  104. package/dist/{stream → components/stream}/ordinalTypes.d.ts +26 -10
  105. package/dist/components/stream/pipelineTransitionUtils.d.ts +42 -0
  106. package/dist/components/stream/renderers/areaCanvasRenderer.d.ts +2 -0
  107. package/dist/components/stream/renderers/geoCanvasRenderer.d.ts +9 -0
  108. package/dist/{stream → components/stream}/renderers/heatmapCanvasRenderer.d.ts +2 -1
  109. package/dist/{stream → components/stream}/renderers/lineCanvasRenderer.d.ts +1 -0
  110. package/dist/components/stream/renderers/renderPulse.d.ts +50 -0
  111. package/dist/{stream → components/stream}/types.d.ts +89 -3
  112. package/dist/components/stream/useStalenessCheck.d.ts +16 -0
  113. package/dist/components/types/legendTypes.d.ts +49 -0
  114. package/dist/geo.min.js +1 -0
  115. package/dist/geo.module.min.js +1 -0
  116. package/dist/network.min.js +1 -1
  117. package/dist/network.module.min.js +1 -1
  118. package/dist/ordinal.min.js +1 -1
  119. package/dist/ordinal.module.min.js +1 -1
  120. package/dist/realtime.min.js +1 -1
  121. package/dist/realtime.module.min.js +1 -1
  122. package/dist/semiotic-ai.d.ts +3 -0
  123. package/dist/semiotic-ai.min.js +1 -1
  124. package/dist/semiotic-ai.module.min.js +1 -1
  125. package/dist/semiotic-data.d.ts +1 -0
  126. package/dist/semiotic-data.min.js +1 -1
  127. package/dist/semiotic-data.module.min.js +1 -1
  128. package/dist/semiotic-geo.d.ts +16 -0
  129. package/dist/semiotic-network.d.ts +1 -0
  130. package/dist/semiotic-ordinal.d.ts +1 -0
  131. package/dist/semiotic-server.d.ts +1 -1
  132. package/dist/semiotic-xy.d.ts +1 -0
  133. package/dist/semiotic.d.ts +4 -4
  134. package/dist/semiotic.min.js +1 -1
  135. package/dist/semiotic.module.min.js +1 -1
  136. package/dist/server.min.js +1 -1
  137. package/dist/server.module.min.js +1 -1
  138. package/dist/test-utils/canvasMock.d.ts +23 -0
  139. package/dist/test-utils/frameMock.d.ts +78 -0
  140. package/dist/xy.min.js +1 -1
  141. package/dist/xy.module.min.js +1 -1
  142. package/package.json +34 -20
  143. package/dist/Legend.d.ts +0 -3
  144. package/dist/stream/DataSourceAdapter.d.ts +0 -35
  145. package/dist/stream/SVGOverlay.d.ts +0 -56
  146. package/dist/stream/layouts/forceLayoutPlugin.d.ts +0 -9
  147. package/dist/stream/renderers/areaCanvasRenderer.d.ts +0 -7
  148. package/dist/types/legendTypes.d.ts +0 -20
  149. /package/dist/{Annotation.d.ts → components/Annotation.d.ts} +0 -0
  150. /package/dist/{CategoryColors.d.ts → components/CategoryColors.d.ts} +0 -0
  151. /package/dist/{ChartContainer.d.ts → components/ChartContainer.d.ts} +0 -0
  152. /package/dist/{ChartErrorBoundary.d.ts → components/ChartErrorBoundary.d.ts} +0 -0
  153. /package/dist/{ContextLayout.d.ts → components/ContextLayout.d.ts} +0 -0
  154. /package/dist/{DetailsPanel.d.ts → components/DetailsPanel.d.ts} +0 -0
  155. /package/dist/{ThemeProvider.d.ts → components/ThemeProvider.d.ts} +0 -0
  156. /package/dist/{charts → components/charts}/shared/ChartError.d.ts +0 -0
  157. /package/dist/{charts → components/charts}/shared/annotationRules.d.ts +0 -0
  158. /package/dist/{charts → components/charts}/shared/formatUtils.d.ts +0 -0
  159. /package/dist/{charts → components/charts}/shared/loess.d.ts +0 -0
  160. /package/dist/{charts → components/charts}/shared/networkUtils.d.ts +0 -0
  161. /package/dist/{charts → components/charts}/shared/selectionUtils.d.ts +0 -0
  162. /package/dist/{charts → components/charts}/shared/validateChartData.d.ts +0 -0
  163. /package/dist/{charts → components/charts}/shared/validateProps.d.ts +0 -0
  164. /package/dist/{charts → components/charts}/xy/ScatterplotMatrix.d.ts +0 -0
  165. /package/dist/{data → components/data}/fromVegaLite.d.ts +0 -0
  166. /package/dist/{data → components/data}/transforms.d.ts +0 -0
  167. /package/dist/{export → components/export}/chartConfig.d.ts +0 -0
  168. /package/dist/{export → components/export}/selectionSerializer.d.ts +0 -0
  169. /package/dist/{geometry → components/geometry}/sankeyLinks.d.ts +0 -0
  170. /package/dist/{realtime → components/realtime}/BinAccumulator.d.ts +0 -0
  171. /package/dist/{realtime → components/realtime}/IncrementalExtent.d.ts +0 -0
  172. /package/dist/{realtime → components/realtime}/renderers/types.d.ts +0 -0
  173. /package/dist/{realtime → components/realtime}/renderers/waterfallRenderer.d.ts +0 -0
  174. /package/dist/{store → components/store}/ObservationStore.d.ts +0 -0
  175. /package/dist/{store → components/store}/SelectionStore.d.ts +0 -0
  176. /package/dist/{store → components/store}/ThemeStore.d.ts +0 -0
  177. /package/dist/{store → components/store}/TooltipStore.d.ts +0 -0
  178. /package/dist/{store → components/store}/createStore.d.ts +0 -0
  179. /package/dist/{store → components/store}/useObservation.d.ts +0 -0
  180. /package/dist/{store → components/store}/useSelection.d.ts +0 -0
  181. /package/dist/{stream → components/stream}/MarginalGraphics.d.ts +0 -0
  182. /package/dist/{stream → components/stream}/NetworkCanvasHitTester.d.ts +0 -0
  183. /package/dist/{stream → components/stream}/OrdinalCanvasHitTester.d.ts +0 -0
  184. /package/dist/{stream → components/stream}/ParticlePool.d.ts +0 -0
  185. /package/dist/{stream → components/stream}/StreamNetworkFrame.d.ts +0 -0
  186. /package/dist/{stream → components/stream}/StreamOrdinalFrame.d.ts +0 -0
  187. /package/dist/{stream → components/stream}/StreamXYFrame.d.ts +0 -0
  188. /package/dist/{stream → components/stream}/keyboardNav.d.ts +0 -0
  189. /package/dist/{stream → components/stream}/layouts/chordLayoutPlugin.d.ts +0 -0
  190. /package/dist/{stream → components/stream}/layouts/hierarchyLayoutPlugin.d.ts +0 -0
  191. /package/dist/{stream → components/stream}/layouts/sankeyLayoutPlugin.d.ts +0 -0
  192. /package/dist/{stream → components/stream}/ordinalSceneBuilders/barScene.d.ts +0 -0
  193. /package/dist/{stream → components/stream}/ordinalSceneBuilders/connectorScene.d.ts +0 -0
  194. /package/dist/{stream → components/stream}/ordinalSceneBuilders/pieScene.d.ts +0 -0
  195. /package/dist/{stream → components/stream}/ordinalSceneBuilders/pointScene.d.ts +0 -0
  196. /package/dist/{stream → components/stream}/ordinalSceneBuilders/statisticalScene.d.ts +0 -0
  197. /package/dist/{stream → components/stream}/ordinalSceneBuilders/timelineScene.d.ts +0 -0
  198. /package/dist/{stream → components/stream}/ordinalSceneBuilders/types.d.ts +0 -0
  199. /package/dist/{stream → components/stream}/renderers/barCanvasRenderer.d.ts +0 -0
  200. /package/dist/{stream → components/stream}/renderers/boxplotCanvasRenderer.d.ts +0 -0
  201. /package/dist/{stream → components/stream}/renderers/candlestickCanvasRenderer.d.ts +0 -0
  202. /package/dist/{stream → components/stream}/renderers/connectorCanvasRenderer.d.ts +0 -0
  203. /package/dist/{stream → components/stream}/renderers/networkArcRenderer.d.ts +0 -0
  204. /package/dist/{stream → components/stream}/renderers/networkCircleRenderer.d.ts +0 -0
  205. /package/dist/{stream → components/stream}/renderers/networkEdgeRenderer.d.ts +0 -0
  206. /package/dist/{stream → components/stream}/renderers/networkParticleRenderer.d.ts +0 -0
  207. /package/dist/{stream → components/stream}/renderers/networkRectRenderer.d.ts +0 -0
  208. /package/dist/{stream → components/stream}/renderers/pointCanvasRenderer.d.ts +0 -0
  209. /package/dist/{stream → components/stream}/renderers/swarmCanvasRenderer.d.ts +0 -0
  210. /package/dist/{stream → components/stream}/renderers/types.d.ts +0 -0
  211. /package/dist/{stream → components/stream}/renderers/violinCanvasRenderer.d.ts +0 -0
  212. /package/dist/{stream → components/stream}/renderers/waterfallCanvasRenderer.d.ts +0 -0
  213. /package/dist/{stream → components/stream}/renderers/wedgeCanvasRenderer.d.ts +0 -0
  214. /package/dist/{stream → components/stream}/useResponsiveSize.d.ts +0 -0
  215. /package/dist/{types → components/types}/annotationTypes.d.ts +0 -0
  216. /package/dist/{types → components/types}/generalTypes.d.ts +0 -0
  217. /package/dist/{types → components/types}/interactionTypes.d.ts +0 -0
  218. /package/dist/{types → components/types}/networkTypes.d.ts +0 -0
  219. /package/dist/{types → components/types}/ordinalTypes.d.ts +0 -0
@@ -1,9 +1,11 @@
1
1
  import * as React from "react";
2
2
  import type { StreamOrdinalFrameProps } from "../../stream/ordinalTypes";
3
+ import type { LegendInteractionMode } from "../shared/hooks";
3
4
  import type { BaseChartProps, ChartAccessor } from "../shared/types";
4
5
  import { type TooltipProp } from "../../Tooltip/Tooltip";
6
+ import type { RealtimeFrameHandle } from "../../realtime/types";
5
7
  export interface StackedBarChartProps<TDatum extends Record<string, any> = Record<string, any>> extends BaseChartProps {
6
- data: TDatum[];
8
+ data?: TDatum[];
7
9
  categoryAccessor?: ChartAccessor<TDatum, string>;
8
10
  stackBy: ChartAccessor<TDatum, string>;
9
11
  valueAccessor?: ChartAccessor<TDatum, number>;
@@ -18,11 +20,13 @@ export interface StackedBarChartProps<TDatum extends Record<string, any> = Recor
18
20
  enableHover?: boolean;
19
21
  showGrid?: boolean;
20
22
  showLegend?: boolean;
23
+ legendInteraction?: LegendInteractionMode;
24
+ legendPosition?: "right" | "left" | "top" | "bottom";
21
25
  tooltip?: TooltipProp;
22
26
  annotations?: Record<string, any>[];
23
27
  frameProps?: Partial<Omit<StreamOrdinalFrameProps, "data" | "size">>;
24
28
  }
25
- export declare function StackedBarChart<TDatum extends Record<string, any> = Record<string, any>>(props: StackedBarChartProps<TDatum>): React.JSX.Element;
26
- export declare namespace StackedBarChart {
27
- var displayName: string;
28
- }
29
+ export declare const StackedBarChart: {
30
+ <TDatum extends Record<string, any> = Record<string, any>>(props: StackedBarChartProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
31
+ displayName?: string;
32
+ };
@@ -1,9 +1,11 @@
1
1
  import * as React from "react";
2
2
  import type { StreamOrdinalFrameProps } from "../../stream/ordinalTypes";
3
+ import type { LegendInteractionMode, LegendPosition } from "../shared/hooks";
3
4
  import type { BaseChartProps, ChartAccessor } from "../shared/types";
4
5
  import { type TooltipProp } from "../../Tooltip/Tooltip";
6
+ import type { RealtimeFrameHandle } from "../../realtime/types";
5
7
  export interface SwarmPlotProps<TDatum extends Record<string, any> = Record<string, any>> extends BaseChartProps {
6
- data: TDatum[];
8
+ data?: TDatum[];
7
9
  categoryAccessor?: ChartAccessor<TDatum, string>;
8
10
  valueAccessor?: ChartAccessor<TDatum, number>;
9
11
  orientation?: "vertical" | "horizontal";
@@ -20,11 +22,13 @@ export interface SwarmPlotProps<TDatum extends Record<string, any> = Record<stri
20
22
  enableHover?: boolean;
21
23
  showGrid?: boolean;
22
24
  showLegend?: boolean;
25
+ legendInteraction?: LegendInteractionMode;
26
+ legendPosition?: LegendPosition;
23
27
  tooltip?: TooltipProp;
24
28
  annotations?: Record<string, any>[];
25
29
  frameProps?: Partial<Omit<StreamOrdinalFrameProps, "data" | "size">>;
26
30
  }
27
- export declare function SwarmPlot<TDatum extends Record<string, any> = Record<string, any>>(props: SwarmPlotProps<TDatum>): React.JSX.Element;
28
- export declare namespace SwarmPlot {
29
- var displayName: string;
30
- }
31
+ export declare const SwarmPlot: {
32
+ <TDatum extends Record<string, any> = Record<string, any>>(props: SwarmPlotProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
33
+ displayName?: string;
34
+ };
@@ -1,9 +1,11 @@
1
1
  import * as React from "react";
2
2
  import type { StreamOrdinalFrameProps } from "../../stream/ordinalTypes";
3
+ import type { LegendPosition } from "../shared/hooks";
3
4
  import type { BaseChartProps, ChartAccessor } from "../shared/types";
4
5
  import { type TooltipProp } from "../../Tooltip/Tooltip";
6
+ import type { RealtimeFrameHandle } from "../../realtime/types";
5
7
  export interface ViolinPlotProps<TDatum extends Record<string, any> = Record<string, any>> extends BaseChartProps {
6
- data: TDatum[];
8
+ data?: TDatum[];
7
9
  categoryAccessor?: ChartAccessor<TDatum, string>;
8
10
  valueAccessor?: ChartAccessor<TDatum, number>;
9
11
  orientation?: "vertical" | "horizontal";
@@ -19,11 +21,12 @@ export interface ViolinPlotProps<TDatum extends Record<string, any> = Record<str
19
21
  enableHover?: boolean;
20
22
  showGrid?: boolean;
21
23
  showLegend?: boolean;
24
+ legendPosition?: LegendPosition;
22
25
  tooltip?: TooltipProp;
23
26
  annotations?: Record<string, any>[];
24
27
  frameProps?: Partial<Omit<StreamOrdinalFrameProps, "data" | "size">>;
25
28
  }
26
- export declare function ViolinPlot<TDatum extends Record<string, any> = Record<string, any>>(props: ViolinPlotProps<TDatum>): React.JSX.Element;
27
- export declare namespace ViolinPlot {
28
- var displayName: string;
29
- }
29
+ export declare const ViolinPlot: {
30
+ <TDatum extends Record<string, any> = Record<string, any>>(props: ViolinPlotProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
31
+ displayName?: string;
32
+ };
@@ -2,9 +2,10 @@ import * as React from "react";
2
2
  import type { ArrowOfTime, WindowMode, HoverAnnotationConfig, HoverData, AnnotationContext, DecayConfig, PulseConfig, StalenessConfig } from "../../stream/types";
3
3
  import type { RealtimeFrameHandle } from "../../realtime/types";
4
4
  import type { ReactNode } from "react";
5
- import type { ChartMode } from "../shared/types";
5
+ import type { LegendInteractionMode, LegendPosition } from "../shared/hooks";
6
+ import type { ChartMode, ChartAccessor, SelectionConfig } from "../shared/types";
6
7
  import type { OnObservationCallback } from "../../store/ObservationStore";
7
- export interface RealtimeHeatmapProps {
8
+ export interface RealtimeHeatmapProps<TDatum extends Record<string, any> = Record<string, any>> {
8
9
  /** Display mode: "primary" (full chrome), "context" (compact), "sparkline" (inline) */
9
10
  mode?: ChartMode;
10
11
  /** Chart dimensions as [width, height] */
@@ -33,11 +34,11 @@ export interface RealtimeHeatmapProps {
33
34
  /** Controlled data array */
34
35
  data?: Record<string, any>[];
35
36
  /** Time/x value accessor */
36
- timeAccessor?: string | ((d: Record<string, any>) => number);
37
+ timeAccessor?: ChartAccessor<TDatum, number>;
37
38
  /** Value/y accessor */
38
- valueAccessor?: string | ((d: Record<string, any>) => number);
39
+ valueAccessor?: ChartAccessor<TDatum, number>;
39
40
  /** Category accessor for colored cells */
40
- categoryAccessor?: string | ((d: Record<string, any>) => string);
41
+ categoryAccessor?: ChartAccessor<TDatum, string>;
41
42
  /** Fixed time domain */
42
43
  timeExtent?: [number, number];
43
44
  /** Fixed value domain */
@@ -81,6 +82,20 @@ export interface RealtimeHeatmapProps {
81
82
  name?: string;
82
83
  fields: string[];
83
84
  };
85
+ /** Consume a named selection — dims unselected elements */
86
+ selection?: SelectionConfig;
87
+ /** Show a loading skeleton placeholder */
88
+ loading?: boolean;
89
+ /** Custom content to render when data is empty. Set to `false` to disable empty state. */
90
+ emptyContent?: ReactNode | false;
91
+ /** Visual emphasis level for dashboard hierarchy. "primary" spans two columns in ChartGrid. */
92
+ emphasis?: "primary" | "secondary";
93
+ /** Show a legend */
94
+ showLegend?: boolean;
95
+ /** Legend position */
96
+ legendPosition?: LegendPosition;
97
+ /** Legend interaction mode */
98
+ legendInteraction?: LegendInteractionMode;
84
99
  }
85
100
  /**
86
101
  * RealtimeHeatmap - Streaming heatmap with 2D grid binning.
@@ -103,4 +118,7 @@ export interface RealtimeHeatmapProps {
103
118
  * />
104
119
  * ```
105
120
  */
106
- export declare const RealtimeHeatmap: React.ForwardRefExoticComponent<RealtimeHeatmapProps & React.RefAttributes<RealtimeFrameHandle>>;
121
+ export declare const RealtimeHeatmap: {
122
+ <TDatum extends Record<string, any> = Record<string, any>>(props: RealtimeHeatmapProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
123
+ displayName?: string;
124
+ };
@@ -2,9 +2,10 @@ import * as React from "react";
2
2
  import type { ArrowOfTime, WindowMode, HoverAnnotationConfig, HoverData, AnnotationContext, DecayConfig, PulseConfig, StalenessConfig, TransitionConfig } from "../../stream/types";
3
3
  import type { RealtimeFrameHandle } from "../../realtime/types";
4
4
  import type { ReactNode } from "react";
5
- import type { ChartMode } from "../shared/types";
5
+ import type { LegendInteractionMode, LegendPosition } from "../shared/hooks";
6
+ import type { ChartMode, ChartAccessor, SelectionConfig } from "../shared/types";
6
7
  import type { OnObservationCallback } from "../../store/ObservationStore";
7
- export interface RealtimeTemporalHistogramProps {
8
+ export interface RealtimeTemporalHistogramProps<TDatum extends Record<string, any> = Record<string, any>> {
8
9
  /** Display mode: "primary" (full chrome), "context" (compact), "sparkline" (inline) */
9
10
  mode?: ChartMode;
10
11
  /** Time interval for binning */
@@ -35,9 +36,9 @@ export interface RealtimeTemporalHistogramProps {
35
36
  /** Controlled data array */
36
37
  data?: Record<string, any>[];
37
38
  /** Time value accessor */
38
- timeAccessor?: string | ((d: Record<string, any>) => number);
39
+ timeAccessor?: ChartAccessor<TDatum, number>;
39
40
  /** Value accessor */
40
- valueAccessor?: string | ((d: Record<string, any>) => number);
41
+ valueAccessor?: ChartAccessor<TDatum, number>;
41
42
  /** Fixed time domain */
42
43
  timeExtent?: [number, number];
43
44
  /** Fixed value domain */
@@ -48,7 +49,7 @@ export interface RealtimeTemporalHistogramProps {
48
49
  * Category accessor for stacked bars.
49
50
  * When provided, bars are stacked by category within each bin.
50
51
  */
51
- categoryAccessor?: string | ((d: Record<string, any>) => string);
52
+ categoryAccessor?: ChartAccessor<TDatum, string>;
52
53
  /**
53
54
  * Category-to-color map for stacked bars.
54
55
  * Keys also determine stack order (listed keys first, then alphabetical).
@@ -87,6 +88,8 @@ export interface RealtimeTemporalHistogramProps {
87
88
  name?: string;
88
89
  fields: string[];
89
90
  };
91
+ /** Consume a named selection — dims unselected elements */
92
+ selection?: SelectionConfig;
90
93
  /** Configurable opacity decay for older data */
91
94
  decay?: DecayConfig;
92
95
  /** Flash effect on newly inserted data */
@@ -95,6 +98,18 @@ export interface RealtimeTemporalHistogramProps {
95
98
  staleness?: StalenessConfig;
96
99
  /** Smooth position interpolation on data change */
97
100
  transition?: TransitionConfig;
101
+ /** Show a loading skeleton placeholder */
102
+ loading?: boolean;
103
+ /** Custom content to render when data is empty. Set to `false` to disable empty state. */
104
+ emptyContent?: ReactNode | false;
105
+ /** Visual emphasis level for dashboard hierarchy. "primary" spans two columns in ChartGrid. */
106
+ emphasis?: "primary" | "secondary";
107
+ /** Show a legend */
108
+ showLegend?: boolean;
109
+ /** Legend position */
110
+ legendPosition?: LegendPosition;
111
+ /** Legend interaction mode */
112
+ legendInteraction?: LegendInteractionMode;
98
113
  }
99
114
  /**
100
115
  * RealtimeTemporalHistogram - Streaming temporal histogram.
@@ -126,8 +141,14 @@ export interface RealtimeTemporalHistogramProps {
126
141
  * />
127
142
  * ```
128
143
  */
129
- export declare const RealtimeTemporalHistogram: React.ForwardRefExoticComponent<RealtimeTemporalHistogramProps & React.RefAttributes<RealtimeFrameHandle>>;
144
+ export declare const RealtimeTemporalHistogram: {
145
+ <TDatum extends Record<string, any> = Record<string, any>>(props: RealtimeTemporalHistogramProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
146
+ displayName?: string;
147
+ };
130
148
  /** @deprecated Use RealtimeTemporalHistogram instead */
131
- export declare const RealtimeHistogram: React.ForwardRefExoticComponent<RealtimeTemporalHistogramProps & React.RefAttributes<RealtimeFrameHandle>>;
149
+ export declare const RealtimeHistogram: {
150
+ <TDatum extends Record<string, any> = Record<string, any>>(props: RealtimeTemporalHistogramProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
151
+ displayName?: string;
152
+ };
132
153
  /** @deprecated Use RealtimeTemporalHistogramProps instead */
133
154
  export type RealtimeHistogramProps = RealtimeTemporalHistogramProps;
@@ -2,9 +2,10 @@ import * as React from "react";
2
2
  import type { ArrowOfTime, WindowMode, HoverAnnotationConfig, HoverData, AnnotationContext, DecayConfig, PulseConfig, StalenessConfig, TransitionConfig } from "../../stream/types";
3
3
  import type { RealtimeFrameHandle } from "../../realtime/types";
4
4
  import type { ReactNode } from "react";
5
- import type { ChartMode } from "../shared/types";
5
+ import type { LegendInteractionMode, LegendPosition } from "../shared/hooks";
6
+ import type { ChartMode, ChartAccessor, SelectionConfig } from "../shared/types";
6
7
  import type { OnObservationCallback } from "../../store/ObservationStore";
7
- export interface RealtimeLineChartProps {
8
+ export interface RealtimeLineChartProps<TDatum extends Record<string, any> = Record<string, any>> {
8
9
  /** Display mode: "primary" (full chrome), "context" (compact), "sparkline" (inline) */
9
10
  mode?: ChartMode;
10
11
  /** Chart dimensions as [width, height] */
@@ -33,9 +34,9 @@ export interface RealtimeLineChartProps {
33
34
  /** Controlled data array */
34
35
  data?: Record<string, any>[];
35
36
  /** Time value accessor */
36
- timeAccessor?: string | ((d: Record<string, any>) => number);
37
+ timeAccessor?: ChartAccessor<TDatum, number>;
37
38
  /** Value accessor */
38
- valueAccessor?: string | ((d: Record<string, any>) => number);
39
+ valueAccessor?: ChartAccessor<TDatum, number>;
39
40
  /** Fixed time domain */
40
41
  timeExtent?: [number, number];
41
42
  /** Fixed value domain */
@@ -81,6 +82,20 @@ export interface RealtimeLineChartProps {
81
82
  name?: string;
82
83
  fields: string[];
83
84
  };
85
+ /** Consume a named selection — dims unselected elements */
86
+ selection?: SelectionConfig;
87
+ /** Show a loading skeleton placeholder */
88
+ loading?: boolean;
89
+ /** Custom content to render when data is empty. Set to `false` to disable empty state. */
90
+ emptyContent?: ReactNode | false;
91
+ /** Visual emphasis level for dashboard hierarchy. "primary" spans two columns in ChartGrid. */
92
+ emphasis?: "primary" | "secondary";
93
+ /** Show a legend */
94
+ showLegend?: boolean;
95
+ /** Legend position */
96
+ legendPosition?: LegendPosition;
97
+ /** Legend interaction mode */
98
+ legendInteraction?: LegendInteractionMode;
84
99
  }
85
100
  /**
86
101
  * RealtimeLineChart - Simplified wrapper for streaming line charts.
@@ -101,4 +116,7 @@ export interface RealtimeLineChartProps {
101
116
  * />
102
117
  * ```
103
118
  */
104
- export declare const RealtimeLineChart: React.ForwardRefExoticComponent<RealtimeLineChartProps & React.RefAttributes<RealtimeFrameHandle>>;
119
+ export declare const RealtimeLineChart: {
120
+ <TDatum extends Record<string, any> = Record<string, any>>(props: RealtimeLineChartProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
121
+ displayName?: string;
122
+ };
@@ -2,9 +2,10 @@ import * as React from "react";
2
2
  import type { ArrowOfTime, WindowMode, HoverAnnotationConfig, HoverData, AnnotationContext } from "../../stream/types";
3
3
  import type { RealtimeFrameHandle } from "../../realtime/types";
4
4
  import type { ReactNode } from "react";
5
- import type { ChartMode } from "../shared/types";
5
+ import type { LegendInteractionMode, LegendPosition } from "../shared/hooks";
6
+ import type { ChartMode, ChartAccessor, SelectionConfig } from "../shared/types";
6
7
  import type { OnObservationCallback } from "../../store/ObservationStore";
7
- export interface RealtimeSwarmChartProps {
8
+ export interface RealtimeSwarmChartProps<TDatum extends Record<string, any> = Record<string, any>> {
8
9
  /** Display mode: "primary" (full chrome), "context" (compact), "sparkline" (inline) */
9
10
  mode?: ChartMode;
10
11
  /** Chart dimensions as [width, height] */
@@ -33,9 +34,9 @@ export interface RealtimeSwarmChartProps {
33
34
  /** Controlled data array */
34
35
  data?: Record<string, any>[];
35
36
  /** Time value accessor */
36
- timeAccessor?: string | ((d: Record<string, any>) => number);
37
+ timeAccessor?: ChartAccessor<TDatum, number>;
37
38
  /** Value accessor */
38
- valueAccessor?: string | ((d: Record<string, any>) => number);
39
+ valueAccessor?: ChartAccessor<TDatum, number>;
39
40
  /** Fixed time domain */
40
41
  timeExtent?: [number, number];
41
42
  /** Fixed value domain */
@@ -43,7 +44,7 @@ export interface RealtimeSwarmChartProps {
43
44
  /** Extent padding factor */
44
45
  extentPadding?: number;
45
46
  /** Category accessor for color-coding dots */
46
- categoryAccessor?: string | ((d: Record<string, any>) => string);
47
+ categoryAccessor?: ChartAccessor<TDatum, string>;
47
48
  /** Category-to-color map */
48
49
  colors?: Record<string, string>;
49
50
  /** Dot radius */
@@ -81,6 +82,20 @@ export interface RealtimeSwarmChartProps {
81
82
  name?: string;
82
83
  fields: string[];
83
84
  };
85
+ /** Consume a named selection — dims unselected elements */
86
+ selection?: SelectionConfig;
87
+ /** Show a loading skeleton placeholder */
88
+ loading?: boolean;
89
+ /** Custom content to render when data is empty. Set to `false` to disable empty state. */
90
+ emptyContent?: ReactNode | false;
91
+ /** Visual emphasis level for dashboard hierarchy. "primary" spans two columns in ChartGrid. */
92
+ emphasis?: "primary" | "secondary";
93
+ /** Show a legend */
94
+ showLegend?: boolean;
95
+ /** Legend position */
96
+ legendPosition?: LegendPosition;
97
+ /** Legend interaction mode */
98
+ legendInteraction?: LegendInteractionMode;
84
99
  }
85
100
  /**
86
101
  * RealtimeSwarmChart - Simplified wrapper for streaming dot/swarm charts.
@@ -103,4 +118,7 @@ export interface RealtimeSwarmChartProps {
103
118
  * />
104
119
  * ```
105
120
  */
106
- export declare const RealtimeSwarmChart: React.ForwardRefExoticComponent<RealtimeSwarmChartProps & React.RefAttributes<RealtimeFrameHandle>>;
121
+ export declare const RealtimeSwarmChart: {
122
+ <TDatum extends Record<string, any> = Record<string, any>>(props: RealtimeSwarmChartProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
123
+ displayName?: string;
124
+ };
@@ -2,9 +2,10 @@ import * as React from "react";
2
2
  import type { ArrowOfTime, WindowMode, HoverAnnotationConfig, HoverData, AnnotationContext } from "../../stream/types";
3
3
  import type { RealtimeFrameHandle } from "../../realtime/types";
4
4
  import type { ReactNode } from "react";
5
- import type { ChartMode } from "../shared/types";
5
+ import type { LegendInteractionMode, LegendPosition } from "../shared/hooks";
6
+ import type { ChartMode, ChartAccessor, SelectionConfig } from "../shared/types";
6
7
  import type { OnObservationCallback } from "../../store/ObservationStore";
7
- export interface RealtimeWaterfallChartProps {
8
+ export interface RealtimeWaterfallChartProps<TDatum extends Record<string, any> = Record<string, any>> {
8
9
  /** Display mode: "primary" (full chrome), "context" (compact), "sparkline" (inline) */
9
10
  mode?: ChartMode;
10
11
  /** Chart dimensions as [width, height] */
@@ -33,9 +34,9 @@ export interface RealtimeWaterfallChartProps {
33
34
  /** Controlled data array */
34
35
  data?: Record<string, any>[];
35
36
  /** Time value accessor */
36
- timeAccessor?: string | ((d: Record<string, any>) => number);
37
+ timeAccessor?: ChartAccessor<TDatum, number>;
37
38
  /** Value accessor (positive = gain, negative = loss) */
38
- valueAccessor?: string | ((d: Record<string, any>) => number);
39
+ valueAccessor?: ChartAccessor<TDatum, number>;
39
40
  /** Fixed time domain */
40
41
  timeExtent?: [number, number];
41
42
  /** Fixed value domain */
@@ -81,6 +82,20 @@ export interface RealtimeWaterfallChartProps {
81
82
  name?: string;
82
83
  fields: string[];
83
84
  };
85
+ /** Consume a named selection — dims unselected elements */
86
+ selection?: SelectionConfig;
87
+ /** Show a loading skeleton placeholder */
88
+ loading?: boolean;
89
+ /** Custom content to render when data is empty. Set to `false` to disable empty state. */
90
+ emptyContent?: ReactNode | false;
91
+ /** Visual emphasis level for dashboard hierarchy. "primary" spans two columns in ChartGrid. */
92
+ emphasis?: "primary" | "secondary";
93
+ /** Show a legend */
94
+ showLegend?: boolean;
95
+ /** Legend position */
96
+ legendPosition?: LegendPosition;
97
+ /** Legend interaction mode */
98
+ legendInteraction?: LegendInteractionMode;
84
99
  }
85
100
  /**
86
101
  * RealtimeWaterfallChart - Simplified wrapper for streaming waterfall charts.
@@ -100,4 +115,7 @@ export interface RealtimeWaterfallChartProps {
100
115
  * />
101
116
  * ```
102
117
  */
103
- export declare const RealtimeWaterfallChart: React.ForwardRefExoticComponent<RealtimeWaterfallChartProps & React.RefAttributes<RealtimeFrameHandle>>;
118
+ export declare const RealtimeWaterfallChart: {
119
+ <TDatum extends Record<string, any> = Record<string, any>>(props: RealtimeWaterfallChartProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
120
+ displayName?: string;
121
+ };
@@ -22,6 +22,11 @@ export declare const DEFAULT_COLORS: readonly string[];
22
22
  * Pastel palette for depth-based hierarchy coloring (Treemap, CirclePack, TreeDiagram).
23
23
  * Index corresponds to hierarchy depth, wraps via modulo.
24
24
  */
25
+ /**
26
+ * Default streaming palette — used by PipelineStore, OrdinalPipelineStore,
27
+ * and useStreamingLegend for consistent colors when no colorScheme is specified.
28
+ */
29
+ export declare const STREAMING_PALETTE: string[];
25
30
  export declare const DEPTH_PALETTE_COLORS: string[];
26
31
  /**
27
32
  * Gets a color for a data point based on the colorBy configuration
@@ -0,0 +1,23 @@
1
+ /**
2
+ * diagnoseConfig — anti-pattern detector for Semiotic chart configurations.
3
+ *
4
+ * Catches common failure modes that produce blank charts or runtime errors,
5
+ * returning actionable fix instructions for each issue found.
6
+ */
7
+ export interface Diagnosis {
8
+ severity: "error" | "warning";
9
+ code: string;
10
+ message: string;
11
+ fix: string;
12
+ }
13
+ export interface DiagnosisResult {
14
+ ok: boolean;
15
+ diagnoses: Diagnosis[];
16
+ }
17
+ /**
18
+ * Run anti-pattern diagnostics on a Semiotic chart configuration.
19
+ *
20
+ * Returns actionable diagnoses with severity, code, message, and fix instruction.
21
+ * Runs validateProps internally — validation errors are included as diagnoses.
22
+ */
23
+ export declare function diagnoseConfig(componentName: string, props: Record<string, any>): DiagnosisResult;
@@ -3,6 +3,7 @@ import type { SelectionHookResult } from "./selectionUtils";
3
3
  import type { OnObservationCallback } from "../../store/ObservationStore";
4
4
  import type { Accessor, SelectionConfig, LinkedHoverProp, ChartMode } from "./types";
5
5
  import type { MarginType } from "../../types/generalTypes";
6
+ import type { TransitionConfig } from "../../stream/types";
6
7
  /**
7
8
  * Default fill color used when no colorBy is specified
8
9
  */
@@ -16,7 +17,7 @@ export declare function resolveAccessor<T = any>(accessor: string | ((d: Record<
16
17
  * Hook to create a color scale from data and colorBy configuration.
17
18
  * Returns undefined when colorBy is absent or is a function accessor.
18
19
  */
19
- export declare function useColorScale(data: Array<Record<string, any>>, colorBy: Accessor<string> | undefined, colorScheme?: string | string[]): ((v: string) => string) | undefined;
20
+ export declare function useColorScale(data: Array<Record<string, any>>, colorBy: string | ((d: any, i?: number) => any) | undefined, colorScheme?: string | string[]): ((v: string) => string) | undefined;
20
21
  /**
21
22
  * Hook to sort data by a value accessor.
22
23
  * Used by BarChart and DotPlot.
@@ -48,11 +49,13 @@ export declare function useChartSelection({ selection, linkedHover, fallbackFiel
48
49
  * Consolidates the shouldShowLegend / createLegend / margin merge / right-margin
49
50
  * expansion pattern that every chart with color encoding repeats.
50
51
  */
51
- export declare function useChartLegendAndMargin({ data, colorBy, colorScale, showLegend, userMargin, defaults, }: {
52
+ export type LegendPosition = "right" | "left" | "top" | "bottom";
53
+ export declare function useChartLegendAndMargin({ data, colorBy, colorScale, showLegend, legendPosition, userMargin, defaults, }: {
52
54
  data: Array<Record<string, any>>;
53
55
  colorBy: Accessor<string> | undefined;
54
56
  colorScale: ((v: string) => string) | undefined;
55
57
  showLegend: boolean | undefined;
58
+ legendPosition?: LegendPosition;
56
59
  userMargin: MarginType | undefined;
57
60
  defaults?: {
58
61
  top: number;
@@ -68,7 +71,30 @@ export declare function useChartLegendAndMargin({ data, colorBy, colorScale, sho
68
71
  left: number;
69
72
  right: number;
70
73
  };
74
+ legendPosition: LegendPosition;
71
75
  };
76
+ export type LegendInteractionMode = "highlight" | "isolate" | "none";
77
+ export interface LegendInteractionState {
78
+ highlightedCategory: string | null;
79
+ isolatedCategories: Set<string>;
80
+ onLegendHover: (item: {
81
+ label: string;
82
+ } | null) => void;
83
+ onLegendClick: (item: {
84
+ label: string;
85
+ }) => void;
86
+ /** Selection predicate that dims non-matching data — use with wrapStyleWithSelection */
87
+ legendSelectionHook: {
88
+ isActive: boolean;
89
+ predicate: (d: Record<string, any>) => boolean;
90
+ } | null;
91
+ }
92
+ /**
93
+ * Hook managing legend highlight/isolate interaction.
94
+ * - "highlight": hover over legend item dims everything else to 30% opacity
95
+ * - "isolate": click toggles category visibility; click all to reset
96
+ */
97
+ export declare function useLegendInteraction(mode: LegendInteractionMode | undefined, colorBy: string | ((d: any) => string) | undefined, allCategories: string[]): LegendInteractionState;
72
98
  interface ChartModeInput {
73
99
  width?: number;
74
100
  height?: number;
@@ -112,4 +138,12 @@ export declare function useChartMode(mode: ChartMode | undefined, userProps: Cha
112
138
  width?: number;
113
139
  height?: number;
114
140
  }): ChartModeResult;
141
+ /**
142
+ * Resolve the `animate` prop into a `TransitionConfig` for Stream Frames.
143
+ * Returns undefined when animate is falsy (no transition).
144
+ */
145
+ export declare function resolveAnimateConfig(animate: boolean | {
146
+ duration?: number;
147
+ easing?: "linear" | "ease-out";
148
+ } | undefined): TransitionConfig | undefined;
115
149
  export {};
@@ -1,4 +1,5 @@
1
1
  import type { Accessor } from "./types";
2
+ import type { LegendItem } from "../../types/legendTypes";
2
3
  /**
3
4
  * Create a legend configuration for HOC components
4
5
  *
@@ -19,9 +20,7 @@ export declare function createLegend({ data, colorBy, colorScale, getColor, stro
19
20
  strokeWidth?: number;
20
21
  }): {
21
22
  legendGroups: {
22
- styleFn: (d: {
23
- color: string;
24
- }) => Record<string, string | number>;
23
+ styleFn: (d: LegendItem) => Record<string, string | number>;
25
24
  type: "fill";
26
25
  items: {
27
26
  label: string;
@@ -67,10 +67,9 @@ export interface ForecastConfig {
67
67
  export declare const SEGMENT_FIELD: "__forecastSegment";
68
68
  export type SegmentType = "training" | "observed" | "forecast";
69
69
  export declare function buildAnomalyAnnotations(config: AnomalyConfig): Record<string, any>[];
70
- interface ForecastResult {
70
+ export interface ForecastResult {
71
71
  processedData: Record<string, any>[];
72
72
  annotations: Record<string, any>[];
73
73
  }
74
74
  export declare function buildForecast(data: Record<string, any>[], xAccessor: string, yAccessor: string, forecastConfig: ForecastConfig, anomalyConfig?: AnomalyConfig): ForecastResult;
75
75
  export declare function createSegmentLineStyle(baseStyle: (d: Record<string, any>) => Record<string, any>, forecastConfig: ForecastConfig): (d: Record<string, any>) => Record<string, any>;
76
- export {};
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Lazy-loaded wrapper for statistical overlays.
3
+ * Only loads the LOESS/forecast logic when forecast or anomaly props are actually used.
4
+ */
5
+ export type { ForecastResult } from "./statisticalOverlays";
6
+ /** Duplicated here to avoid pulling in the heavy statisticalOverlays module at import time */
7
+ export declare const SEGMENT_FIELD: "__forecastSegment";
8
+ export declare function buildForecastLazy(...args: Parameters<typeof import("./statisticalOverlays")["buildForecast"]>): Promise<import("./statisticalOverlays").ForecastResult>;
9
+ export declare function buildAnomalyAnnotationsLazy(...args: Parameters<typeof import("./statisticalOverlays")["buildAnomalyAnnotations"]>): Promise<Record<string, any>[]>;
10
+ export declare function createSegmentLineStyleLazy(...args: Parameters<typeof import("./statisticalOverlays")["createSegmentLineStyle"]>): Promise<(d: Record<string, any>) => Record<string, any>>;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * String distance utilities for typo detection and field suggestions.
3
+ * Shared by validateProps and validateChartData.
4
+ */
5
+ /** Levenshtein edit distance between two strings. */
6
+ export declare function levenshtein(a: string, b: string): number;
7
+ /**
8
+ * Find the closest match from candidates by Levenshtein distance.
9
+ * Returns the match if distance <= maxDist, otherwise null/undefined.
10
+ */
11
+ export declare function closestMatch(input: string, candidates: string[], maxDist?: number): string | undefined;
@@ -2,8 +2,8 @@ import * as React from "react";
2
2
  import type { HoverData } from "../../realtime/types";
3
3
  export interface TooltipFieldConfig {
4
4
  label: string;
5
- accessor: string | ((d: Record<string, any>) => any);
6
- role?: "x" | "y" | "color" | "size" | "group" | "value";
5
+ accessor: string | ((d: any) => any);
6
+ role?: "title" | "x" | "y" | "color" | "size" | "group" | "value";
7
7
  }
8
8
  /**
9
9
  * Extract a display name from an accessor.
@@ -69,6 +69,18 @@ export interface BaseChartProps {
69
69
  onObservation?: OnObservationCallback;
70
70
  /** Identifier for this chart instance, included in observation events */
71
71
  chartId?: string;
72
+ /** Show a loading skeleton placeholder */
73
+ loading?: boolean;
74
+ /** Custom content to render when data is empty. Set to `false` to disable empty state. */
75
+ emptyContent?: React.ReactNode | false;
76
+ /** Visual emphasis level for dashboard hierarchy. "primary" spans two columns in ChartGrid. */
77
+ emphasis?: "primary" | "secondary";
78
+ /** Enable declarative bounded animation (enter/exit/update transitions).
79
+ * `true` uses defaults (300ms ease-out). Object form allows customization. */
80
+ animate?: boolean | {
81
+ duration?: number;
82
+ easing?: "linear" | "ease-out";
83
+ };
72
84
  }
73
85
  /**
74
86
  * Axis configuration props
@@ -97,9 +109,9 @@ export type ChartAccessor<TDatum, T> = (keyof TDatum & string) | ((d: Record<str
97
109
  /**
98
110
  * Color configuration
99
111
  */
100
- export interface ColorConfig {
112
+ export interface ColorConfig<TDatum = Record<string, any>> {
101
113
  /** Field name or function to determine color */
102
- colorBy?: Accessor<string>;
114
+ colorBy?: ChartAccessor<TDatum, string>;
103
115
  /** Color scheme name (e.g., "blues", "category10") */
104
116
  colorScheme?: string;
105
117
  /** Custom color palette */
@@ -108,9 +120,9 @@ export interface ColorConfig {
108
120
  /**
109
121
  * Size configuration
110
122
  */
111
- export interface SizeConfig {
123
+ export interface SizeConfig<TDatum = Record<string, any>> {
112
124
  /** Field name or function to determine size */
113
- sizeBy?: Accessor<number>;
125
+ sizeBy?: ChartAccessor<TDatum, number>;
114
126
  /** Min and max size range */
115
127
  sizeRange?: [number, number];
116
128
  }