semiotic 3.0.0-beta.3 → 3.0.0-beta.4

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 (132) hide show
  1. package/CLAUDE.md +93 -753
  2. package/README.md +80 -7
  3. package/dist/ChartContainer.d.ts +60 -0
  4. package/dist/DetailsPanel.d.ts +37 -0
  5. package/dist/LinkedCharts.d.ts +2 -0
  6. package/dist/Tooltip/Tooltip.d.ts +2 -2
  7. package/dist/charts/index.d.ts +1 -1
  8. package/dist/charts/ordinal/BarChart.d.ts +1 -0
  9. package/dist/charts/ordinal/BoxPlot.d.ts +1 -0
  10. package/dist/charts/ordinal/DonutChart.d.ts +1 -0
  11. package/dist/charts/ordinal/DotPlot.d.ts +1 -0
  12. package/dist/charts/ordinal/GroupedBarChart.d.ts +1 -0
  13. package/dist/charts/ordinal/Histogram.d.ts +1 -0
  14. package/dist/charts/ordinal/PieChart.d.ts +1 -0
  15. package/dist/charts/ordinal/RidgelinePlot.d.ts +1 -0
  16. package/dist/charts/ordinal/StackedBarChart.d.ts +1 -0
  17. package/dist/charts/ordinal/SwarmPlot.d.ts +1 -0
  18. package/dist/charts/ordinal/ViolinPlot.d.ts +1 -0
  19. package/dist/charts/realtime/RealtimeHeatmap.d.ts +11 -0
  20. package/dist/charts/realtime/RealtimeHistogram.d.ts +15 -1
  21. package/dist/charts/realtime/RealtimeLineChart.d.ts +6 -0
  22. package/dist/charts/realtime/RealtimeSwarmChart.d.ts +6 -0
  23. package/dist/charts/realtime/RealtimeWaterfallChart.d.ts +6 -0
  24. package/dist/charts/shared/annotationRules.d.ts +3 -0
  25. package/dist/charts/shared/colorUtils.d.ts +17 -11
  26. package/dist/charts/shared/hooks.d.ts +96 -1
  27. package/dist/charts/shared/loess.d.ts +13 -0
  28. package/dist/charts/shared/networkUtils.d.ts +31 -0
  29. package/dist/charts/shared/tooltipUtils.d.ts +16 -0
  30. package/dist/charts/shared/types.d.ts +17 -2
  31. package/dist/charts/shared/validateChartData.d.ts +2 -3
  32. package/dist/charts/shared/validateProps.d.ts +18 -0
  33. package/dist/charts/xy/AreaChart.d.ts +4 -0
  34. package/dist/charts/xy/BubbleChart.d.ts +6 -0
  35. package/dist/charts/xy/Heatmap.d.ts +4 -0
  36. package/dist/charts/xy/LineChart.d.ts +6 -0
  37. package/dist/charts/xy/Scatterplot.d.ts +4 -0
  38. package/dist/charts/xy/StackedAreaChart.d.ts +4 -0
  39. package/dist/data/fromVegaLite.d.ts +48 -0
  40. package/dist/export/chartConfig.d.ts +29 -0
  41. package/dist/export/selectionSerializer.d.ts +20 -0
  42. package/dist/geometry/sankeyLinks.d.ts +1 -1
  43. package/dist/network.min.js +1 -1
  44. package/dist/network.module.min.js +1 -1
  45. package/dist/ordinal.min.js +1 -1
  46. package/dist/ordinal.module.min.js +1 -1
  47. package/dist/realtime/types.d.ts +20 -6
  48. package/dist/realtime.min.js +1 -1
  49. package/dist/realtime.module.min.js +1 -1
  50. package/dist/semiotic-ai.d.ts +14 -0
  51. package/dist/semiotic-ai.min.js +1 -1
  52. package/dist/semiotic-ai.module.min.js +1 -1
  53. package/dist/semiotic-data.d.ts +2 -0
  54. package/dist/semiotic-data.min.js +1 -1
  55. package/dist/semiotic-data.module.min.js +1 -1
  56. package/dist/semiotic-network.d.ts +9 -19
  57. package/dist/semiotic-ordinal.d.ts +12 -14
  58. package/dist/semiotic-xy.d.ts +12 -18
  59. package/dist/semiotic.d.ts +16 -13
  60. package/dist/semiotic.min.js +1 -1
  61. package/dist/semiotic.module.min.js +1 -1
  62. package/dist/server.min.js +1 -1
  63. package/dist/server.module.min.js +1 -1
  64. package/dist/store/ObservationStore.d.ts +61 -0
  65. package/dist/store/SelectionStore.d.ts +9 -1
  66. package/dist/store/ThemeStore.d.ts +6 -1
  67. package/dist/store/TooltipStore.d.ts +3 -1
  68. package/dist/store/createStore.d.ts +4 -1
  69. package/dist/store/useObservation.d.ts +18 -0
  70. package/dist/stream/MarginalGraphics.d.ts +1 -1
  71. package/dist/stream/NetworkPipelineStore.d.ts +44 -0
  72. package/dist/stream/OrdinalCanvasHitTester.d.ts +1 -0
  73. package/dist/stream/OrdinalSVGOverlay.d.ts +6 -2
  74. package/dist/stream/ParticlePool.d.ts +2 -1
  75. package/dist/stream/PipelineStore.d.ts +11 -0
  76. package/dist/stream/SVGOverlay.d.ts +21 -2
  77. package/dist/stream/SceneGraph.d.ts +1 -1
  78. package/dist/stream/networkTypes.d.ts +58 -1
  79. package/dist/stream/ordinalTypes.d.ts +13 -0
  80. package/dist/stream/types.d.ts +14 -0
  81. package/dist/types/annotationTypes.d.ts +10 -0
  82. package/dist/types/networkTypes.d.ts +1 -2
  83. package/dist/xy.min.js +1 -1
  84. package/dist/xy.module.min.js +1 -1
  85. package/package.json +27 -38
  86. package/dist/AnnotationLayer/AnnotationLayer.d.ts +0 -25
  87. package/dist/Axis/Axis.d.ts +0 -7
  88. package/dist/Axis/axisTitle.d.ts +0 -10
  89. package/dist/Axis/index.d.ts +0 -2
  90. package/dist/Axis/summaryGraphic.d.ts +0 -17
  91. package/dist/Brush.d.ts +0 -12
  92. package/dist/DividedLine.d.ts +0 -16
  93. package/dist/TooltipPositioner/index.d.ts +0 -7
  94. package/dist/annotationLayerBehavior/annotationHandling.d.ts +0 -19
  95. package/dist/annotationLayerBehavior/d3labeler.d.ts +0 -9
  96. package/dist/annotationRules/baseRules.d.ts +0 -25
  97. package/dist/annotationRules/networkframeRules.d.ts +0 -48
  98. package/dist/annotationRules/xyframeRules.d.ts +0 -117
  99. package/dist/batchWork.d.ts +0 -6
  100. package/dist/constants/coordinateNames.d.ts +0 -8
  101. package/dist/constants/frame_props.d.ts +0 -13
  102. package/dist/data/dataFunctions.d.ts +0 -45
  103. package/dist/data/multiAccessorUtils.d.ts +0 -1
  104. package/dist/data/unflowedFunctions.d.ts +0 -1
  105. package/dist/generic_utilities/functions.d.ts +0 -1
  106. package/dist/geometry/areaDrawing.d.ts +0 -21
  107. package/dist/geometry/contourLayout.d.ts +0 -6
  108. package/dist/geometry/hexbinLayout.d.ts +0 -7
  109. package/dist/geometry/lineDrawing.d.ts +0 -71
  110. package/dist/geometry/summaryLayouts.d.ts +0 -45
  111. package/dist/index.d.ts +0 -1
  112. package/dist/processing/InteractionItems.d.ts +0 -13
  113. package/dist/processing/hierarchyUtils.d.ts +0 -16
  114. package/dist/processing/layouts/chordLayout.d.ts +0 -2
  115. package/dist/processing/layouts/forceLayout.d.ts +0 -3
  116. package/dist/processing/layouts/hierarchyLayout.d.ts +0 -10
  117. package/dist/processing/layouts/index.d.ts +0 -8
  118. package/dist/processing/layouts/sankeyLayout.d.ts +0 -8
  119. package/dist/processing/layouts/simpleLayouts.d.ts +0 -7
  120. package/dist/processing/layouts/types.d.ts +0 -17
  121. package/dist/processing/networkDefaults.d.ts +0 -36
  122. package/dist/realtime/renderers/barRenderer.d.ts +0 -2
  123. package/dist/realtime/renderers/candlestickRenderer.d.ts +0 -2
  124. package/dist/realtime/renderers/lineRenderer.d.ts +0 -2
  125. package/dist/realtime/renderers/swarmRenderer.d.ts +0 -2
  126. package/dist/stream/NetworkSceneGraph.d.ts +0 -14
  127. package/dist/stream/index.d.ts +0 -16
  128. package/dist/types/canvasTypes.d.ts +0 -9
  129. package/dist/types/xyTypes.d.ts +0 -24
  130. package/dist/useBoundingRect.d.ts +0 -2
  131. package/dist/visualizationLayerBehavior/axis.d.ts +0 -36
  132. package/dist/visualizationLayerBehavior/general.d.ts +0 -80
package/README.md CHANGED
@@ -87,10 +87,20 @@ LLM code generation. AI coding assistants can generate correct Semiotic code on
87
87
  the first try. Run `npx semiotic-ai --help` for CLI options or add `semiotic-mcp`
88
88
  to your MCP client config for tool-based chart rendering.
89
89
 
90
+ **Vega-Lite compatible.** Have existing Vega-Lite specs? `fromVegaLite(spec)`
91
+ translates them to Semiotic chart configs — instant onboarding from notebooks,
92
+ dashboards, or AI-generated specs. Composes with `configToJSX()`,
93
+ `copyConfig()`, and `toURL()` for full round-trip interop.
94
+
95
+ **Streaming system models.** Turn a streaming Sankey into a live system monitor:
96
+ click-to-inspect `DetailsPanel`, particle speed proportional to edge throughput,
97
+ threshold alerting with animated glow, and automatic topology diffing that
98
+ highlights new services as they appear. Visualization as product navigation.
99
+
90
100
  ## Install
91
101
 
92
102
  ```bash
93
- npm install semiotic@3.0.0-beta.3
103
+ npm install semiotic@3.0.0-beta.4
94
104
  ```
95
105
 
96
106
  Requires React 18.1 or later.
@@ -154,6 +164,31 @@ import { ForceDirectedGraph, SankeyDiagram } from "semiotic"
154
164
  />
155
165
  ```
156
166
 
167
+ ### Streaming System Monitor
168
+
169
+ Live service topology with threshold alerting and click-to-inspect:
170
+
171
+ ```jsx
172
+ import { StreamNetworkFrame, ChartContainer, DetailsPanel, LinkedCharts } from "semiotic"
173
+
174
+ const chartRef = useRef()
175
+ chartRef.current.push({ source: "API", target: "Orders", value: 15 })
176
+
177
+ <LinkedCharts>
178
+ <ChartContainer title="System Monitor" status="live"
179
+ detailsPanel={
180
+ <DetailsPanel position="right" trigger="click">
181
+ {(datum) => <div>{datum.id}: {datum.value} req/s</div>}
182
+ </DetailsPanel>
183
+ }>
184
+ <StreamNetworkFrame ref={chartRef} chartType="sankey"
185
+ showParticles particleStyle={{ proportionalSpeed: true }}
186
+ thresholds={{ metric: n => n.value, warning: 100, critical: 250 }}
187
+ />
188
+ </ChartContainer>
189
+ </LinkedCharts>
190
+ ```
191
+
157
192
  ### Standard Charts
158
193
 
159
194
  Line, bar, scatter, area — all the basics, with sensible defaults:
@@ -185,20 +220,53 @@ import { LineChart, BarChart } from "semiotic"
185
220
  | **Coordination** | `LinkedCharts` `ScatterplotMatrix` |
186
221
  | **Frames** | `StreamXYFrame` `StreamOrdinalFrame` `StreamNetworkFrame` |
187
222
 
223
+ ### Vega-Lite Translation
224
+
225
+ Paste a Vega-Lite spec, get a Semiotic chart:
226
+
227
+ ```jsx
228
+ import { fromVegaLite } from "semiotic/data"
229
+ import { configToJSX, fromConfig } from "semiotic"
230
+
231
+ const config = fromVegaLite({
232
+ mark: "bar",
233
+ data: { values: [{ a: "A", b: 28 }, { a: "B", b: 55 }] },
234
+ encoding: {
235
+ x: { field: "a", type: "nominal" },
236
+ y: { field: "b", type: "quantitative" },
237
+ },
238
+ })
239
+
240
+ // Render directly
241
+ const { componentName, props } = fromConfig(config)
242
+ // → componentName: "BarChart", props: { data, categoryAccessor: "a", valueAccessor: "b" }
243
+
244
+ // Or generate JSX code
245
+ configToJSX(config)
246
+ // → <BarChart data={[...]} categoryAccessor="a" valueAccessor="b" />
247
+ ```
248
+
249
+ Supports bar, line, area, point, rect, arc, tick marks with encoding translation
250
+ for color, size, aggregation, and binning.
251
+
188
252
  ## Smaller Bundles
189
253
 
190
254
  Import only what you need:
191
255
 
192
256
  ```jsx
193
- import { LineChart } from "semiotic/xy" // 125 KB (vs 218 KB full)
194
- import { BarChart } from "semiotic/ordinal" // 140 KB
195
- import { ForceDirectedGraph } from "semiotic/network" // 133 KB
196
- import { LineChart } from "semiotic/ai" // HOC-only surface for AI generation
257
+ import { LineChart } from "semiotic/xy" // 123 KB
258
+ import { BarChart } from "semiotic/ordinal" // 118 KB
259
+ import { ForceDirectedGraph } from "semiotic/network" // 127 KB
260
+ import { LineChart } from "semiotic/ai" // HOC-only surface for AI generation
197
261
  ```
198
262
 
263
+ Granular entry points export only v3 Stream Frames and HOC charts — no legacy
264
+ utilities or backwards-compatibility shims.
265
+
199
266
  ## TypeScript
200
267
 
201
- Full type definitions ship with the package. Generics for type-safe accessors:
268
+ Built with `strict: true`. Full type definitions ship with the package.
269
+ Generics for type-safe accessors:
202
270
 
203
271
  ```tsx
204
272
  interface Sale { month: number; revenue: number }
@@ -234,7 +302,7 @@ Works with Next.js App Router, Remix, and Astro via `"use client"` directives.
234
302
  - [Getting Started](https://semiotic.nteract.io/getting-started)
235
303
  - [Charts](https://semiotic.nteract.io/charts) — all 27 chart types with live examples
236
304
  - [Frames](https://semiotic.nteract.io/frames) — full Frame API reference
237
- - [Features](https://semiotic.nteract.io/features) — axes, annotations, tooltips, styling
305
+ - [Features](https://semiotic.nteract.io/features) — axes, annotations, tooltips, styling, Vega-Lite translator
238
306
  - [Cookbook](https://semiotic.nteract.io/cookbook) — advanced patterns and recipes
239
307
  - [Playground](https://semiotic.nteract.io/playground) — interactive prop exploration
240
308
 
@@ -253,6 +321,11 @@ See [CONTRIBUTING.md](CONTRIBUTING.md). Our community follows the nteract
253
321
  Development of this library owes a lot to Susie Lu, Jason Reid, James Womack,
254
322
  Matt Herman, Shelby Sturgis, and Tristan Reid.
255
323
 
324
+ The Sankey layout engine is based on [sankey-plus](https://github.com/tomshanley/sankey-plus)
325
+ by [Tom Shanley](https://github.com/tomshanley), which improved on his earlier
326
+ `d3-sankey-circular` with better cycle detection, hierarchical arc stacking,
327
+ and dynamic extent adjustment.
328
+
256
329
  _Semiotic icon based on an icon by Andre Schauer._
257
330
 
258
331
  ## License
@@ -0,0 +1,60 @@
1
+ import * as React from "react";
2
+ import type { ChartConfig, CopyFormat } from "./export/chartConfig";
3
+ export interface ChartContainerProps {
4
+ /** Chart title */
5
+ title?: string;
6
+ /** Subtitle / description */
7
+ subtitle?: string;
8
+ /** Chart children (any Semiotic chart component) */
9
+ children: React.ReactNode;
10
+ /** Width — passed to child chart if not set on child. Default: "100%" */
11
+ width?: number | string;
12
+ /** Height of the chart area (excluding header). Default: 400 */
13
+ height?: number;
14
+ /** Built-in actions. Each can be true (default config), false (hidden), or config object */
15
+ actions?: {
16
+ export?: boolean | {
17
+ format?: "svg" | "png";
18
+ scale?: number;
19
+ filename?: string;
20
+ };
21
+ fullscreen?: boolean;
22
+ /** Enable "Copy Config" action button. Requires chartConfig prop. */
23
+ copyConfig?: boolean | {
24
+ format?: CopyFormat;
25
+ };
26
+ };
27
+ /** Chart configuration for serialization. Enables the "Copy Config" toolbar action. */
28
+ chartConfig?: ChartConfig;
29
+ /** Additional controls rendered in the toolbar after built-in actions */
30
+ controls?: React.ReactNode;
31
+ /** Loading state — shows skeleton placeholder */
32
+ loading?: boolean;
33
+ /** Error state — shows error message (overrides children) */
34
+ error?: string | React.ReactNode;
35
+ /** Wrap children in ChartErrorBoundary */
36
+ errorBoundary?: boolean;
37
+ /** Status indicator (wired to streaming staleness) */
38
+ status?: "live" | "stale" | "paused" | "error" | "static";
39
+ /** Details panel rendered alongside the chart (e.g. DetailsPanel component) */
40
+ detailsPanel?: React.ReactNode;
41
+ /** CSS class for the outer container */
42
+ className?: string;
43
+ /** Inline style overrides */
44
+ style?: React.CSSProperties;
45
+ }
46
+ export interface ChartContainerHandle {
47
+ /** Export chart to SVG or PNG */
48
+ export: (options?: {
49
+ format?: "svg" | "png";
50
+ scale?: number;
51
+ filename?: string;
52
+ }) => Promise<void>;
53
+ /** Toggle fullscreen */
54
+ toggleFullscreen: () => void;
55
+ /** Copy chart config to clipboard */
56
+ copyConfig: (format?: CopyFormat) => Promise<void>;
57
+ /** The chart container DOM element */
58
+ element: HTMLDivElement | null;
59
+ }
60
+ export declare const ChartContainer: React.ForwardRefExoticComponent<ChartContainerProps & React.RefAttributes<ChartContainerHandle>>;
@@ -0,0 +1,37 @@
1
+ import * as React from "react";
2
+ import type { ChartObservation, ClickObservation } from "./store/ObservationStore";
3
+ export interface DetailsPanelProps {
4
+ /**
5
+ * Render function receiving the clicked datum and the full observation.
6
+ * Return null to hide the panel for a given datum.
7
+ */
8
+ children: (datum: Record<string, any>, observation: ClickObservation) => React.ReactNode;
9
+ /** Panel position relative to the chart. Default: "right" */
10
+ position?: "right" | "bottom" | "overlay";
11
+ /** Panel width (for "right" position) or height (for "bottom"). Default: 300 */
12
+ size?: number;
13
+ /** Observation trigger type. Default: "click" */
14
+ trigger?: "click" | "hover";
15
+ /** Filter observations by chart ID */
16
+ chartId?: string;
17
+ /**
18
+ * Direct observation feed — use when the chart pushes observations via
19
+ * onObservation callback rather than through the ObservationStore.
20
+ * When set, bypasses useChartObserver and reacts to this prop directly.
21
+ */
22
+ observation?: ChartObservation | null;
23
+ /** Whether clicking empty space dismisses the panel. Default: true */
24
+ dismissOnEmpty?: boolean;
25
+ /** Custom close button. Set to false to hide. Default: true */
26
+ showClose?: boolean;
27
+ /** Called when the panel opens or closes */
28
+ onToggle?: (open: boolean) => void;
29
+ /** CSS class for the panel container */
30
+ className?: string;
31
+ /** Inline style overrides */
32
+ style?: React.CSSProperties;
33
+ }
34
+ export declare function DetailsPanel({ children, position, size, trigger, chartId, observation: directObservation, dismissOnEmpty, showClose, onToggle, className, style, }: DetailsPanelProps): React.JSX.Element | null;
35
+ export declare namespace DetailsPanel {
36
+ var displayName: string;
37
+ }
@@ -2,6 +2,8 @@ import * as React from "react";
2
2
  import type { ResolutionMode } from "./store/SelectionStore";
3
3
  export { useSelection, useLinkedHover, useBrushSelection, useFilteredData } from "./store/useSelection";
4
4
  export type { UseSelectionOptions, UseSelectionResult, UseLinkedHoverOptions, UseLinkedHoverResult, UseBrushSelectionOptions, UseBrushSelectionResult } from "./store/useSelection";
5
+ export { useChartObserver } from "./store/useObservation";
6
+ export type { UseChartObserverOptions, UseChartObserverResult } from "./store/useObservation";
5
7
  export interface LinkedChartsProps {
6
8
  children: React.ReactNode;
7
9
  /** Pre-configure selections with resolution modes */
@@ -87,7 +87,7 @@ export declare const defaultTooltipStyle: React.CSSProperties;
87
87
  * />
88
88
  * ```
89
89
  */
90
- export declare function Tooltip(config?: TooltipConfig): (data: Record<string, unknown>) => React.JSX.Element;
90
+ export declare function Tooltip(config?: TooltipConfig): (data: Record<string, unknown>) => React.JSX.Element | null;
91
91
  /**
92
92
  * Create a multi-line tooltip that displays multiple fields
93
93
  *
@@ -130,7 +130,7 @@ export declare function Tooltip(config?: TooltipConfig): (data: Record<string, u
130
130
  * />
131
131
  * ```
132
132
  */
133
- export declare function MultiLineTooltip(config?: MultiLineTooltipConfig): (data: Record<string, unknown>) => React.JSX.Element;
133
+ export declare function MultiLineTooltip(config?: MultiLineTooltipConfig): (data: Record<string, unknown>) => React.JSX.Element | null;
134
134
  /**
135
135
  * Type for tooltip prop that chart components accept
136
136
  */
@@ -66,7 +66,7 @@ export { RealtimeWaterfallChart } from "./realtime/RealtimeWaterfallChart";
66
66
  export type { RealtimeWaterfallChartProps } from "./realtime/RealtimeWaterfallChart";
67
67
  export { RealtimeHeatmap } from "./realtime/RealtimeHeatmap";
68
68
  export type { RealtimeHeatmapProps } from "./realtime/RealtimeHeatmap";
69
- export type { BaseChartProps, AxisConfig, Accessor, ChartAccessor } from "./shared/types";
69
+ export type { BaseChartProps, AxisConfig, Accessor, ChartAccessor, ChartMode } from "./shared/types";
70
70
  export { useColorScale, useSortedData, DEFAULT_COLOR } from "./shared/hooks";
71
71
  export { COLOR_SCHEMES, DEFAULT_COLORS, getColor, createColorScale, getSize } from "./shared/colorUtils";
72
72
  export { formatNumber, formatDate, formatAxis, createTooltip, formatLargeNumber, truncateText } from "./shared/formatUtils";
@@ -21,6 +21,7 @@ export interface BarChartProps<TDatum extends Record<string, any> = Record<strin
21
21
  showGrid?: boolean;
22
22
  showLegend?: boolean;
23
23
  tooltip?: TooltipProp;
24
+ annotations?: Record<string, any>[];
24
25
  frameProps?: Partial<Omit<StreamOrdinalFrameProps, "data" | "size">>;
25
26
  }
26
27
  /**
@@ -19,6 +19,7 @@ export interface BoxPlotProps<TDatum extends Record<string, any> = Record<string
19
19
  showGrid?: boolean;
20
20
  showLegend?: boolean;
21
21
  tooltip?: TooltipProp;
22
+ annotations?: Record<string, any>[];
22
23
  frameProps?: Partial<Omit<StreamOrdinalFrameProps, "data" | "size">>;
23
24
  }
24
25
  export declare function BoxPlot<TDatum extends Record<string, any> = Record<string, any>>(props: BoxPlotProps<TDatum>): React.JSX.Element;
@@ -15,6 +15,7 @@ export interface DonutChartProps<TDatum extends Record<string, any> = Record<str
15
15
  enableHover?: boolean;
16
16
  showLegend?: boolean;
17
17
  tooltip?: TooltipProp;
18
+ annotations?: Record<string, any>[];
18
19
  frameProps?: Partial<Omit<StreamOrdinalFrameProps, "data" | "size">>;
19
20
  }
20
21
  export declare function DonutChart<TDatum extends Record<string, any> = Record<string, any>>(props: DonutChartProps<TDatum>): React.JSX.Element;
@@ -19,6 +19,7 @@ export interface DotPlotProps<TDatum extends Record<string, any> = Record<string
19
19
  showGrid?: boolean;
20
20
  showLegend?: boolean;
21
21
  tooltip?: TooltipProp;
22
+ annotations?: Record<string, any>[];
22
23
  frameProps?: Partial<Omit<StreamOrdinalFrameProps, "data" | "size">>;
23
24
  }
24
25
  export declare function DotPlot<TDatum extends Record<string, any> = Record<string, any>>(props: DotPlotProps<TDatum>): React.JSX.Element;
@@ -18,6 +18,7 @@ export interface GroupedBarChartProps<TDatum extends Record<string, any> = Recor
18
18
  showGrid?: boolean;
19
19
  showLegend?: boolean;
20
20
  tooltip?: TooltipProp;
21
+ annotations?: Record<string, any>[];
21
22
  frameProps?: Partial<Omit<StreamOrdinalFrameProps, "data" | "size">>;
22
23
  }
23
24
  export declare function GroupedBarChart<TDatum extends Record<string, any> = Record<string, any>>(props: GroupedBarChartProps<TDatum>): React.JSX.Element;
@@ -18,6 +18,7 @@ export interface HistogramProps<TDatum extends Record<string, any> = Record<stri
18
18
  showGrid?: boolean;
19
19
  showLegend?: boolean;
20
20
  tooltip?: TooltipProp;
21
+ annotations?: Record<string, any>[];
21
22
  frameProps?: Partial<Omit<StreamOrdinalFrameProps, "data" | "size">>;
22
23
  }
23
24
  export declare function Histogram<TDatum extends Record<string, any> = Record<string, any>>(props: HistogramProps<TDatum>): React.JSX.Element;
@@ -13,6 +13,7 @@ export interface PieChartProps<TDatum extends Record<string, any> = Record<strin
13
13
  enableHover?: boolean;
14
14
  showLegend?: boolean;
15
15
  tooltip?: TooltipProp;
16
+ annotations?: Record<string, any>[];
16
17
  frameProps?: Partial<Omit<StreamOrdinalFrameProps, "data" | "size">>;
17
18
  }
18
19
  export declare function PieChart<TDatum extends Record<string, any> = Record<string, any>>(props: PieChartProps<TDatum>): React.JSX.Element;
@@ -20,6 +20,7 @@ export interface RidgelinePlotProps<TDatum extends Record<string, any> = Record<
20
20
  showGrid?: boolean;
21
21
  showLegend?: boolean;
22
22
  tooltip?: TooltipProp;
23
+ annotations?: Record<string, any>[];
23
24
  frameProps?: Partial<Omit<StreamOrdinalFrameProps, "data" | "size">>;
24
25
  }
25
26
  /**
@@ -19,6 +19,7 @@ export interface StackedBarChartProps<TDatum extends Record<string, any> = Recor
19
19
  showGrid?: boolean;
20
20
  showLegend?: boolean;
21
21
  tooltip?: TooltipProp;
22
+ annotations?: Record<string, any>[];
22
23
  frameProps?: Partial<Omit<StreamOrdinalFrameProps, "data" | "size">>;
23
24
  }
24
25
  export declare function StackedBarChart<TDatum extends Record<string, any> = Record<string, any>>(props: StackedBarChartProps<TDatum>): React.JSX.Element;
@@ -21,6 +21,7 @@ export interface SwarmPlotProps<TDatum extends Record<string, any> = Record<stri
21
21
  showGrid?: boolean;
22
22
  showLegend?: boolean;
23
23
  tooltip?: TooltipProp;
24
+ annotations?: Record<string, any>[];
24
25
  frameProps?: Partial<Omit<StreamOrdinalFrameProps, "data" | "size">>;
25
26
  }
26
27
  export declare function SwarmPlot<TDatum extends Record<string, any> = Record<string, any>>(props: SwarmPlotProps<TDatum>): React.JSX.Element;
@@ -20,6 +20,7 @@ export interface ViolinPlotProps<TDatum extends Record<string, any> = Record<str
20
20
  showGrid?: boolean;
21
21
  showLegend?: boolean;
22
22
  tooltip?: TooltipProp;
23
+ annotations?: Record<string, any>[];
23
24
  frameProps?: Partial<Omit<StreamOrdinalFrameProps, "data" | "size">>;
24
25
  }
25
26
  export declare function ViolinPlot<TDatum extends Record<string, any> = Record<string, any>>(props: ViolinPlotProps<TDatum>): React.JSX.Element;
@@ -2,7 +2,11 @@ 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";
6
+ import type { OnObservationCallback } from "../../store/ObservationStore";
5
7
  export interface RealtimeHeatmapProps {
8
+ /** Display mode: "primary" (full chrome), "context" (compact), "sparkline" (inline) */
9
+ mode?: ChartMode;
6
10
  /** Chart dimensions as [width, height] */
7
11
  size?: [number, number];
8
12
  /** Chart width (alternative to size) */
@@ -18,6 +22,8 @@ export interface RealtimeHeatmapProps {
18
22
  };
19
23
  /** CSS class name */
20
24
  className?: string;
25
+ onObservation?: OnObservationCallback;
26
+ chartId?: string;
21
27
  /** Direction time flows */
22
28
  arrowOfTime?: ArrowOfTime;
23
29
  /** Data retention strategy */
@@ -70,6 +76,11 @@ export interface RealtimeHeatmapProps {
70
76
  staleness?: StalenessConfig;
71
77
  /** Custom tooltip renderer (alias for tooltipContent) */
72
78
  tooltip?: (d: HoverData) => ReactNode;
79
+ /** Enable linked hover selection events for cross-chart highlighting */
80
+ linkedHover?: boolean | string | {
81
+ name?: string;
82
+ fields: string[];
83
+ };
73
84
  }
74
85
  /**
75
86
  * RealtimeHeatmap - Streaming heatmap with 2D grid binning.
@@ -1,8 +1,12 @@
1
1
  import * as React from "react";
2
- import type { ArrowOfTime, WindowMode, HoverAnnotationConfig, HoverData, AnnotationContext } from "../../stream/types";
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";
6
+ import type { OnObservationCallback } from "../../store/ObservationStore";
5
7
  export interface RealtimeTemporalHistogramProps {
8
+ /** Display mode: "primary" (full chrome), "context" (compact), "sparkline" (inline) */
9
+ mode?: ChartMode;
6
10
  /** Time interval for binning */
7
11
  binSize: number;
8
12
  /** Chart dimensions as [width, height] */
@@ -20,6 +24,8 @@ export interface RealtimeTemporalHistogramProps {
20
24
  };
21
25
  /** CSS class name */
22
26
  className?: string;
27
+ onObservation?: OnObservationCallback;
28
+ chartId?: string;
23
29
  /** Direction time flows */
24
30
  arrowOfTime?: ArrowOfTime;
25
31
  /** Data retention strategy */
@@ -81,6 +87,14 @@ export interface RealtimeTemporalHistogramProps {
81
87
  name?: string;
82
88
  fields: string[];
83
89
  };
90
+ /** Configurable opacity decay for older data */
91
+ decay?: DecayConfig;
92
+ /** Flash effect on newly inserted data */
93
+ pulse?: PulseConfig;
94
+ /** Frame-level data liveness indicator */
95
+ staleness?: StalenessConfig;
96
+ /** Smooth position interpolation on data change */
97
+ transition?: TransitionConfig;
84
98
  }
85
99
  /**
86
100
  * RealtimeTemporalHistogram - Streaming temporal histogram.
@@ -2,7 +2,11 @@ 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";
6
+ import type { OnObservationCallback } from "../../store/ObservationStore";
5
7
  export interface RealtimeLineChartProps {
8
+ /** Display mode: "primary" (full chrome), "context" (compact), "sparkline" (inline) */
9
+ mode?: ChartMode;
6
10
  /** Chart dimensions as [width, height] */
7
11
  size?: [number, number];
8
12
  /** Chart width (alternative to size) */
@@ -18,6 +22,8 @@ export interface RealtimeLineChartProps {
18
22
  };
19
23
  /** CSS class name */
20
24
  className?: string;
25
+ onObservation?: OnObservationCallback;
26
+ chartId?: string;
21
27
  /** Direction time flows */
22
28
  arrowOfTime?: ArrowOfTime;
23
29
  /** Data retention strategy */
@@ -2,7 +2,11 @@ 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";
6
+ import type { OnObservationCallback } from "../../store/ObservationStore";
5
7
  export interface RealtimeSwarmChartProps {
8
+ /** Display mode: "primary" (full chrome), "context" (compact), "sparkline" (inline) */
9
+ mode?: ChartMode;
6
10
  /** Chart dimensions as [width, height] */
7
11
  size?: [number, number];
8
12
  /** Chart width (alternative to size) */
@@ -18,6 +22,8 @@ export interface RealtimeSwarmChartProps {
18
22
  };
19
23
  /** CSS class name */
20
24
  className?: string;
25
+ onObservation?: OnObservationCallback;
26
+ chartId?: string;
21
27
  /** Direction time flows */
22
28
  arrowOfTime?: ArrowOfTime;
23
29
  /** Data retention strategy */
@@ -2,7 +2,11 @@ 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";
6
+ import type { OnObservationCallback } from "../../store/ObservationStore";
5
7
  export interface RealtimeWaterfallChartProps {
8
+ /** Display mode: "primary" (full chrome), "context" (compact), "sparkline" (inline) */
9
+ mode?: ChartMode;
6
10
  /** Chart dimensions as [width, height] */
7
11
  size?: [number, number];
8
12
  /** Chart width (alternative to size) */
@@ -18,6 +22,8 @@ export interface RealtimeWaterfallChartProps {
18
22
  };
19
23
  /** CSS class name */
20
24
  className?: string;
25
+ onObservation?: OnObservationCallback;
26
+ chartId?: string;
21
27
  /** Direction time flows */
22
28
  arrowOfTime?: ArrowOfTime;
23
29
  /** Data retention strategy */
@@ -0,0 +1,3 @@
1
+ import * as React from "react";
2
+ import type { AnnotationContext } from "../../realtime/types";
3
+ export declare function createDefaultAnnotationRules(frameType: "xy" | "ordinal" | "network"): (annotation: Record<string, any>, index: number, context: AnnotationContext) => React.ReactNode | null;
@@ -1,22 +1,28 @@
1
+ import { interpolateBlues, interpolateReds, interpolateGreens, interpolateOranges, interpolatePurples, interpolateViridis, interpolatePlasma } from "d3-scale-chromatic";
1
2
  /**
2
3
  * Predefined color schemes
3
4
  */
4
5
  export declare const COLOR_SCHEMES: {
5
- category10: any;
6
- tableau10: any;
7
- set3: any;
8
- blues: any;
9
- reds: any;
10
- greens: any;
11
- oranges: any;
12
- purples: any;
13
- viridis: any;
14
- plasma: any;
6
+ category10: readonly string[];
7
+ tableau10: readonly string[];
8
+ set3: readonly string[];
9
+ blues: typeof interpolateBlues;
10
+ reds: typeof interpolateReds;
11
+ greens: typeof interpolateGreens;
12
+ oranges: typeof interpolateOranges;
13
+ purples: typeof interpolatePurples;
14
+ viridis: typeof interpolateViridis;
15
+ plasma: typeof interpolatePlasma;
15
16
  };
16
17
  /**
17
18
  * Default colors for charts
18
19
  */
19
- export declare const DEFAULT_COLORS: any;
20
+ export declare const DEFAULT_COLORS: readonly string[];
21
+ /**
22
+ * Pastel palette for depth-based hierarchy coloring (Treemap, CirclePack, TreeDiagram).
23
+ * Index corresponds to hierarchy depth, wraps via modulo.
24
+ */
25
+ export declare const DEPTH_PALETTE_COLORS: string[];
20
26
  /**
21
27
  * Gets a color for a data point based on the colorBy configuration
22
28
  *