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
@@ -0,0 +1,186 @@
1
+ import type { ReactNode } from "react";
2
+ import type { GeoProjection, GeoPath, GeoPermissibleObjects } from "d3-geo";
3
+ import type { Style, DecayConfig, PulseConfig, TransitionConfig, StalenessConfig, PointSceneNode, LineSceneNode } from "./types";
4
+ import type { HoverAnnotationConfig } from "../realtime/types";
5
+ import type { GeoParticleStyle } from "./GeoParticlePool";
6
+ export type ProjectionProp = GeoProjection | ProjectionName | ProjectionConfig;
7
+ export type ProjectionName = "mercator" | "equalEarth" | "albersUsa" | "orthographic" | "naturalEarth" | "equirectangular";
8
+ export interface ProjectionConfig {
9
+ type: ProjectionName;
10
+ rotate?: [number, number] | [number, number, number];
11
+ center?: [number, number];
12
+ parallels?: [number, number];
13
+ }
14
+ export interface GraticuleConfig {
15
+ step?: [number, number];
16
+ stroke?: string;
17
+ strokeWidth?: number;
18
+ strokeDasharray?: string;
19
+ showLabels?: boolean;
20
+ }
21
+ export interface DistanceCartogramConfig {
22
+ center: string;
23
+ centerAccessor?: string | ((d: any) => string);
24
+ costAccessor: string | ((d: any) => number);
25
+ strength?: number;
26
+ lineMode?: "straight" | "fractional";
27
+ }
28
+ export interface GeoAreaSceneNode {
29
+ type: "geoarea";
30
+ /** Pre-computed SVG path string from d3.geoPath(projection)(feature) */
31
+ pathData: string;
32
+ /** Centroid in screen coords (for tooltip/annotation positioning) */
33
+ centroid: [number, number];
34
+ /** Bounding box in screen coords [[x0,y0],[x1,y1]] */
35
+ bounds: [[number, number], [number, number]];
36
+ /** Screen-space area in px² */
37
+ screenArea: number;
38
+ style: Style;
39
+ datum: any;
40
+ group?: string;
41
+ interactive?: boolean;
42
+ /** Lazily-cached Path2D parsed from pathData (avoids re-parsing on every hit test) */
43
+ _cachedPath2D?: Path2D;
44
+ _decayOpacity?: number;
45
+ _pulseIntensity?: number;
46
+ _pulseColor?: string;
47
+ }
48
+ /** Union of all scene node types that GeoFrame produces */
49
+ export type GeoSceneNode = GeoAreaSceneNode | PointSceneNode | LineSceneNode;
50
+ export interface GeoScales {
51
+ projection: GeoProjection;
52
+ geoPath: GeoPath<any, GeoPermissibleObjects>;
53
+ projectedPoint: (lon: number, lat: number) => [number, number] | null;
54
+ invertedPoint: (px: number, py: number) => [number, number] | null;
55
+ }
56
+ export interface GeoPipelineConfig {
57
+ projection: ProjectionProp;
58
+ projectionExtent?: [[number, number], [number, number]];
59
+ /** Padding fraction for auto-fit projection. 0.1 = 10% inset from edges. @default 0 */
60
+ fitPadding?: number;
61
+ xAccessor?: string | ((d: any) => number);
62
+ yAccessor?: string | ((d: any) => number);
63
+ lineDataAccessor?: string | ((d: any) => any[]);
64
+ lineType?: "geo" | "line";
65
+ /** Flow rendering style: "basic" (straight/great-circle), "offset" (bidirectional offset), "arc" (curved arcs) @default "basic" */
66
+ flowStyle?: "basic" | "offset" | "arc";
67
+ areaStyle?: Style | ((d: any) => Style);
68
+ pointStyle?: (d: any) => Style & {
69
+ r?: number;
70
+ };
71
+ lineStyle?: Style | ((d: any, group?: string) => Style);
72
+ colorScheme?: string | string[];
73
+ graticule?: boolean | GraticuleConfig;
74
+ projectionTransform?: DistanceCartogramConfig;
75
+ decay?: DecayConfig;
76
+ pulse?: PulseConfig;
77
+ transition?: TransitionConfig;
78
+ annotations?: Record<string, any>[];
79
+ pointIdAccessor?: string | ((d: any) => string);
80
+ }
81
+ export interface StreamGeoFrameProps<T = Record<string, any>> {
82
+ projection: ProjectionProp;
83
+ projectionExtent?: [[number, number], [number, number]];
84
+ /** Padding fraction for auto-fit projection. 0.1 = 10% inset from edges. @default 0 */
85
+ fitPadding?: number;
86
+ areas?: GeoJSON.Feature[];
87
+ points?: T[];
88
+ lines?: T[];
89
+ xAccessor?: string | ((d: T) => number);
90
+ yAccessor?: string | ((d: T) => number);
91
+ lineDataAccessor?: string | ((d: T) => any[]);
92
+ pointIdAccessor?: string | ((d: T) => string);
93
+ lineType?: "geo" | "line";
94
+ /** Flow rendering style: "basic" (straight/great-circle), "offset" (bidirectional offset), "arc" (curved arcs) @default "basic" */
95
+ flowStyle?: "basic" | "offset" | "arc";
96
+ graticule?: boolean | GraticuleConfig;
97
+ zoomable?: boolean;
98
+ zoomExtent?: [number, number];
99
+ onZoom?: (state: {
100
+ projection: GeoProjection;
101
+ zoom: number;
102
+ }) => void;
103
+ /**
104
+ * When true, drag gestures rotate the projection (globe spinning)
105
+ * instead of panning. Defaults to true for orthographic projection.
106
+ * Scroll-wheel zoom still works normally.
107
+ */
108
+ dragRotate?: boolean;
109
+ projectionTransform?: DistanceCartogramConfig;
110
+ /** Show animated particles flowing along line paths */
111
+ showParticles?: boolean;
112
+ /** Particle appearance and behavior config */
113
+ particleStyle?: GeoParticleStyle;
114
+ /** Raster tile URL template or function. Enables tile basemap (Mercator only). */
115
+ tileURL?: string | ((z: number, x: number, y: number, dpr: number) => string);
116
+ /** Attribution text for tile provider (e.g., "© OpenStreetMap contributors") */
117
+ tileAttribution?: string;
118
+ /** Max cached tiles @default 256 */
119
+ tileCacheSize?: number;
120
+ size?: [number, number];
121
+ width?: number;
122
+ height?: number;
123
+ responsiveWidth?: boolean;
124
+ responsiveHeight?: boolean;
125
+ margin?: {
126
+ top?: number;
127
+ right?: number;
128
+ bottom?: number;
129
+ left?: number;
130
+ };
131
+ className?: string;
132
+ background?: string;
133
+ runtimeMode?: "bounded" | "streaming";
134
+ areaStyle?: Style | ((d: any) => Style);
135
+ pointStyle?: (d: any) => Style & {
136
+ r?: number;
137
+ };
138
+ lineStyle?: Style | ((d: any, group?: string) => Style);
139
+ colorScheme?: string | string[];
140
+ enableHover?: boolean;
141
+ hoverAnnotation?: boolean | HoverAnnotationConfig;
142
+ tooltipContent?: (d: any) => ReactNode;
143
+ customClickBehavior?: (d: any) => void;
144
+ customHoverBehavior?: (d: any) => void;
145
+ annotations?: Record<string, any>[];
146
+ decay?: DecayConfig;
147
+ pulse?: PulseConfig;
148
+ transition?: TransitionConfig;
149
+ staleness?: StalenessConfig;
150
+ backgroundGraphics?: ReactNode;
151
+ foregroundGraphics?: ReactNode;
152
+ title?: string | ReactNode;
153
+ legend?: any;
154
+ legendPosition?: "right" | "left" | "top" | "bottom";
155
+ legendHoverBehavior?: (item: {
156
+ label: string;
157
+ } | null) => void;
158
+ legendClickBehavior?: (item: {
159
+ label: string;
160
+ }) => void;
161
+ legendHighlightedCategory?: string | null;
162
+ legendIsolatedCategories?: Set<string>;
163
+ showAxes?: boolean;
164
+ /** Render a visually-hidden data table from the scene graph for screen readers (first 50 rows) */
165
+ accessibleTable?: boolean;
166
+ }
167
+ export interface StreamGeoFrameHandle {
168
+ push(datum: Record<string, any>): void;
169
+ pushMany(data: Record<string, any>[]): void;
170
+ clear(): void;
171
+ getProjection(): GeoProjection | null;
172
+ getGeoPath(): GeoPath<any, GeoPermissibleObjects> | null;
173
+ /** Get cartogram layout info (center position, max cost, radius) */
174
+ getCartogramLayout(): {
175
+ cx: number;
176
+ cy: number;
177
+ maxCost: number;
178
+ availableRadius: number;
179
+ } | null;
180
+ /** Get current zoom level (1 = default) */
181
+ getZoom(): number;
182
+ /** Animate back to initial view */
183
+ resetZoom(): void;
184
+ /** Get current data points */
185
+ getData(): Record<string, any>[];
186
+ }
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Shared hit-testing utilities used by CanvasHitTester, OrdinalCanvasHitTester,
3
+ * and NetworkCanvasHitTester.
4
+ */
5
+ export interface RectHitResult {
6
+ hit: boolean;
7
+ cx: number;
8
+ cy: number;
9
+ }
10
+ /**
11
+ * Test whether a point (px, py) falls within a rectangle defined by
12
+ * { x, y, w, h } and return the rectangle's center coordinates.
13
+ */
14
+ export declare function hitTestRect(px: number, py: number, node: {
15
+ x: number;
16
+ y: number;
17
+ w: number;
18
+ h: number;
19
+ }): RectHitResult;
20
+ /**
21
+ * Normalize an angle to the [0, 2π) range.
22
+ */
23
+ export declare function normalizeAngle(angle: number): number;
@@ -0,0 +1,2 @@
1
+ import type { NetworkLayoutPlugin } from "../networkTypes";
2
+ export declare const forceLayoutPlugin: NetworkLayoutPlugin;
@@ -3,9 +3,10 @@ import { sankeyLayoutPlugin } from "./sankeyLayoutPlugin";
3
3
  import { forceLayoutPlugin } from "./forceLayoutPlugin";
4
4
  import { chordLayoutPlugin } from "./chordLayoutPlugin";
5
5
  import { hierarchyLayoutPlugin } from "./hierarchyLayoutPlugin";
6
+ import { orbitLayoutPlugin } from "./orbitLayoutPlugin";
6
7
  /**
7
8
  * Registry mapping network chart types to their layout plugins.
8
9
  */
9
10
  export declare const networkLayoutRegistry: Record<string, NetworkLayoutPlugin>;
10
11
  export declare function getLayoutPlugin(chartType: NetworkChartType): NetworkLayoutPlugin | undefined;
11
- export { sankeyLayoutPlugin, forceLayoutPlugin, chordLayoutPlugin, hierarchyLayoutPlugin };
12
+ export { sankeyLayoutPlugin, forceLayoutPlugin, chordLayoutPlugin, hierarchyLayoutPlugin, orbitLayoutPlugin };
@@ -0,0 +1,2 @@
1
+ import type { NetworkLayoutPlugin } from "../networkTypes";
2
+ export declare const orbitLayoutPlugin: NetworkLayoutPlugin;
@@ -0,0 +1,33 @@
1
+ import type { ReactNode } from "react";
2
+ import type { LegendGroup, GradientLegendConfig } from "../types/legendTypes";
3
+ export interface LegendRenderConfig {
4
+ legend: ReactNode | {
5
+ legendGroups: LegendGroup[];
6
+ } | {
7
+ gradient: GradientLegendConfig;
8
+ };
9
+ totalWidth: number;
10
+ totalHeight: number;
11
+ margin: {
12
+ top: number;
13
+ right: number;
14
+ bottom: number;
15
+ left: number;
16
+ };
17
+ legendPosition?: "right" | "left" | "top" | "bottom";
18
+ title?: string | ReactNode;
19
+ legendHoverBehavior?: (item: {
20
+ label: string;
21
+ } | null) => void;
22
+ legendClickBehavior?: (item: {
23
+ label: string;
24
+ }) => void;
25
+ legendHighlightedCategory?: string | null;
26
+ legendIsolatedCategories?: Set<string>;
27
+ legendInteraction?: string;
28
+ }
29
+ /**
30
+ * Renders a legend (categorical, gradient, or custom ReactNode) inside an SVG overlay.
31
+ * Computes position based on `legendPosition` and chart dimensions.
32
+ */
33
+ export declare function renderLegendFromConfig(config: LegendRenderConfig): ReactNode;
@@ -124,7 +124,7 @@ export interface RealtimeNetworkFrameProps {
124
124
  background?: string;
125
125
  className?: string;
126
126
  }
127
- export type NetworkChartType = "force" | "sankey" | "chord" | "tree" | "cluster" | "treemap" | "circlepack" | "partition";
127
+ export type NetworkChartType = "force" | "sankey" | "chord" | "tree" | "cluster" | "treemap" | "circlepack" | "orbit" | "partition";
128
128
  /** Circle node — used by force, tree, cluster, circlepack */
129
129
  export interface NetworkCircleNode {
130
130
  type: "circle";
@@ -240,6 +240,17 @@ export interface NetworkLayoutPlugin {
240
240
  supportsStreaming: boolean;
241
241
  /** Whether this layout uses hierarchical (tree) input instead of nodes+edges */
242
242
  hierarchical: boolean;
243
+ /**
244
+ * Whether this layout drives continuous animation (e.g. orbiting nodes).
245
+ * When true, StreamNetworkFrame keeps its RAF loop alive and calls `tick()` each frame.
246
+ */
247
+ supportsAnimation?: boolean;
248
+ /**
249
+ * Advance one animation frame. Called by StreamNetworkFrame on each RAF tick
250
+ * when `supportsAnimation` is true. Should mutate node positions in-place.
251
+ * Returns true if the scene needs a rebuild (always true for orbit animation).
252
+ */
253
+ tick?: (nodes: RealtimeNode[], edges: RealtimeEdge[], config: NetworkPipelineConfig, size: [number, number], deltaTime: number) => boolean;
243
254
  }
244
255
  /** Threshold alerting configuration for streaming network nodes */
245
256
  export interface ThresholdAlertConfig {
@@ -284,7 +295,8 @@ export interface NetworkPipelineConfig {
284
295
  edgeStyle?: (d: any) => Record<string, any>;
285
296
  nodeLabel?: string | ((d: any) => string);
286
297
  showLabels?: boolean;
287
- colorBy?: string | ((d: any) => string);
298
+ labelMode?: "leaf" | "parent" | "all";
299
+ colorBy?: string | ((d: any) => string | number);
288
300
  colorScheme?: string | string[];
289
301
  edgeColorBy?: "source" | "target" | "gradient" | ((d: any) => string);
290
302
  edgeOpacity?: number;
@@ -295,6 +307,30 @@ export interface NetworkPipelineConfig {
295
307
  pulse?: PulseConfig;
296
308
  staleness?: StalenessConfig;
297
309
  thresholds?: ThresholdAlertConfig;
310
+ /** Ring arrangement mode: "flat" (all children in one ring), "solar" (one per ring),
311
+ * "atomic" ([2,8] electron shell), or custom capacities. @default "flat" */
312
+ orbitMode?: "flat" | "solar" | "atomic" | number[];
313
+ /** Ring size divisor per depth. Larger = tighter orbits. @default 2.95 */
314
+ orbitSize?: number | ((node: any) => number);
315
+ /** Orbit speed multiplier (higher = faster rotation). @default 0.25 */
316
+ orbitSpeed?: number;
317
+ /** Per-node speed modifier. @default (node) => 1 / (node.depth + 1) */
318
+ orbitRevolution?: (node: any) => number;
319
+ /**
320
+ * Built-in revolution style presets:
321
+ * - "locked": children rotate with parent at decreasing speed (default)
322
+ * - "decay": each depth level progressively slower, independent of parent
323
+ * - "alternate": odd-depth rings reverse direction
324
+ * Ignored when `orbitRevolution` is provided.
325
+ * @default "locked"
326
+ */
327
+ orbitRevolutionStyle?: "locked" | "decay" | "alternate";
328
+ /** Vertical squash for elliptical orbits. 1 = circle. @default 1 */
329
+ orbitEccentricity?: number | ((node: any) => number);
330
+ /** Show orbital ring ellipses as foreground graphics. @default true */
331
+ orbitShowRings?: boolean;
332
+ /** Enable orbit animation. @default true */
333
+ orbitAnimated?: boolean;
298
334
  }
299
335
  export interface StreamNetworkFrameProps<T = Record<string, any>> {
300
336
  chartType: NetworkChartType;
@@ -328,7 +364,7 @@ export interface StreamNetworkFrameProps<T = Record<string, any>> {
328
364
  particleStyle?: ParticleStyle;
329
365
  nodeStyle?: (d: any) => Record<string, any>;
330
366
  edgeStyle?: (d: any) => Record<string, any>;
331
- colorBy?: string | ((d: any) => string);
367
+ colorBy?: string | ((d: any) => string | number);
332
368
  colorScheme?: string | string[];
333
369
  edgeColorBy?: "source" | "target" | "gradient" | ((d: any) => string);
334
370
  edgeOpacity?: number;
@@ -337,6 +373,7 @@ export interface StreamNetworkFrameProps<T = Record<string, any>> {
337
373
  nodeSizeRange?: [number, number];
338
374
  nodeLabel?: string | ((d: any) => string);
339
375
  showLabels?: boolean;
376
+ labelMode?: "leaf" | "parent" | "all";
340
377
  size?: [number, number];
341
378
  responsiveWidth?: boolean;
342
379
  responsiveHeight?: boolean;
@@ -377,6 +414,15 @@ export interface StreamNetworkFrameProps<T = Record<string, any>> {
377
414
  legend?: ReactNode | {
378
415
  legendGroups: LegendGroup[];
379
416
  };
417
+ legendPosition?: "right" | "left" | "top" | "bottom";
418
+ legendHoverBehavior?: (item: {
419
+ label: string;
420
+ } | null) => void;
421
+ legendClickBehavior?: (item: {
422
+ label: string;
423
+ }) => void;
424
+ legendHighlightedCategory?: string | null;
425
+ legendIsolatedCategories?: Set<string>;
380
426
  title?: string | ReactNode;
381
427
  foregroundGraphics?: ReactNode;
382
428
  backgroundGraphics?: ReactNode;
@@ -384,6 +430,16 @@ export interface StreamNetworkFrameProps<T = Record<string, any>> {
384
430
  pulse?: PulseConfig;
385
431
  staleness?: StalenessConfig;
386
432
  thresholds?: ThresholdAlertConfig;
433
+ orbitMode?: "flat" | "solar" | "atomic" | number[];
434
+ orbitSize?: number | ((node: any) => number);
435
+ orbitSpeed?: number;
436
+ orbitRevolution?: (node: any) => number;
437
+ orbitRevolutionStyle?: "locked" | "decay" | "alternate";
438
+ orbitEccentricity?: number | ((node: any) => number);
439
+ orbitShowRings?: boolean;
440
+ orbitAnimated?: boolean;
441
+ /** Render a visually-hidden data table from the scene graph for screen readers (first 50 rows) */
442
+ accessibleTable?: boolean;
387
443
  }
388
444
  export interface StreamNetworkFrameHandle {
389
445
  push(edge: EdgePush): void;
@@ -20,6 +20,12 @@ export interface WedgeSceneNode {
20
20
  style: Style;
21
21
  datum: any;
22
22
  category?: string;
23
+ /** Pulse intensity 0–1 (set when aggregated category value changes) */
24
+ _pulseIntensity?: number;
25
+ /** Pulse color */
26
+ _pulseColor?: string;
27
+ /** Animation target opacity (set during enter/exit transitions) */
28
+ _targetOpacity?: number;
23
29
  }
24
30
  export interface BoxplotSceneNode {
25
31
  type: "boxplot";
@@ -35,13 +41,7 @@ export interface BoxplotSceneNode {
35
41
  medianPos: number;
36
42
  q3Pos: number;
37
43
  maxPos: number;
38
- stats: {
39
- min: number;
40
- q1: number;
41
- median: number;
42
- q3: number;
43
- max: number;
44
- };
44
+ stats: DistributionStats;
45
45
  style: Style;
46
46
  datum: any;
47
47
  category?: string;
@@ -51,6 +51,7 @@ export interface BoxplotSceneNode {
51
51
  value: number;
52
52
  datum: any;
53
53
  }[];
54
+ _targetOpacity?: number;
54
55
  }
55
56
  export interface DistributionStats {
56
57
  n: number;
@@ -88,6 +89,7 @@ export interface ViolinSceneNode {
88
89
  style: Style;
89
90
  datum: any;
90
91
  category?: string;
92
+ _targetOpacity?: number;
91
93
  }
92
94
  export interface ConnectorSceneNode {
93
95
  type: "connector";
@@ -98,6 +100,7 @@ export interface ConnectorSceneNode {
98
100
  style: Style;
99
101
  datum: any;
100
102
  group?: string;
103
+ _targetOpacity?: number;
101
104
  }
102
105
  export type { Style, PointSceneNode, RectSceneNode } from "./types";
103
106
  import type { PointSceneNode, RectSceneNode } from "./types";
@@ -141,7 +144,7 @@ export interface OrdinalPipelineConfig {
141
144
  showOutliers?: boolean;
142
145
  showIQR?: boolean;
143
146
  amplitude?: number;
144
- oSort?: ((a: string, b: string) => number) | boolean | "asc" | "desc";
147
+ oSort?: ((a: any, b: any) => number) | boolean | "asc" | "desc";
145
148
  connectorAccessor?: string | ((d: any) => string);
146
149
  connectorStyle?: Style | ((d: any) => Style);
147
150
  dynamicColumnWidth?: string | ((data: any[]) => number);
@@ -189,7 +192,7 @@ export interface StreamOrdinalFrameProps<T = Record<string, any>> {
189
192
  rExtent?: [number?, number?];
190
193
  oExtent?: string[];
191
194
  extentPadding?: number;
192
- oSort?: ((a: string, b: string) => number) | boolean | "asc" | "desc";
195
+ oSort?: ((a: any, b: any) => number) | boolean | "asc" | "desc";
193
196
  arrowOfTime?: ArrowOfTime;
194
197
  windowMode?: WindowMode;
195
198
  windowSize?: number;
@@ -203,7 +206,7 @@ export interface StreamOrdinalFrameProps<T = Record<string, any>> {
203
206
  oLabel?: string;
204
207
  rLabel?: string;
205
208
  oFormat?: (d: string) => string;
206
- rFormat?: (d: number) => string;
209
+ rFormat?: (d: number | string) => string;
207
210
  enableHover?: boolean;
208
211
  hoverAnnotation?: boolean | HoverAnnotationConfig;
209
212
  tooltipContent?: (d: HoverData) => ReactNode;
@@ -213,7 +216,18 @@ export interface StreamOrdinalFrameProps<T = Record<string, any>> {
213
216
  showGrid?: boolean;
214
217
  legend?: ReactNode | {
215
218
  legendGroups: LegendGroup[];
219
+ } | {
220
+ gradient: import("../types/legendTypes").GradientLegendConfig;
216
221
  };
222
+ legendHoverBehavior?: (item: {
223
+ label: string;
224
+ } | null) => void;
225
+ legendClickBehavior?: (item: {
226
+ label: string;
227
+ }) => void;
228
+ legendHighlightedCategory?: string | null;
229
+ legendIsolatedCategories?: Set<string>;
230
+ legendPosition?: "right" | "left" | "top" | "bottom";
217
231
  backgroundGraphics?: ReactNode;
218
232
  foregroundGraphics?: ReactNode;
219
233
  title?: string | ReactNode;
@@ -224,6 +238,8 @@ export interface StreamOrdinalFrameProps<T = Record<string, any>> {
224
238
  pulse?: PulseConfig;
225
239
  transition?: TransitionConfig;
226
240
  staleness?: StalenessConfig;
241
+ /** Render a visually-hidden data table from the scene graph for screen readers (first 50 rows) */
242
+ accessibleTable?: boolean;
227
243
  }
228
244
  export interface StreamOrdinalFrameHandle<T = Record<string, any>> {
229
245
  push(datum: T): void;
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Shared transition utilities for PipelineStores.
3
+ *
4
+ * Extracts common easing logic and types used by PipelineStore,
5
+ * OrdinalPipelineStore, NetworkPipelineStore, and GeoPipelineStore.
6
+ */
7
+ /** Active transition state tracked by each PipelineStore */
8
+ export interface ActiveTransition {
9
+ startTime: number;
10
+ duration: number;
11
+ }
12
+ /** Easing mode — determines interpolation curve */
13
+ export type EasingMode = "linear" | "ease-out-cubic";
14
+ /**
15
+ * Compute the eased interpolation parameter from raw progress.
16
+ *
17
+ * @param rawT - Raw linear progress in [0, 1]
18
+ * @param easing - Easing mode. "linear" returns rawT unchanged;
19
+ * "ease-out-cubic" (default) applies 1 - (1 - t)^3.
20
+ * @returns Eased progress in [0, 1]
21
+ */
22
+ export declare function computeEasing(rawT: number, easing?: EasingMode): number;
23
+ /**
24
+ * Compute the raw linear progress of a transition.
25
+ *
26
+ * @param now - Current timestamp (e.g. performance.now())
27
+ * @param transition - The active transition state
28
+ * @returns Raw progress clamped to [0, 1]
29
+ */
30
+ export declare function computeRawProgress(now: number, transition: ActiveTransition): number;
31
+ /**
32
+ * Linearly interpolate between two values.
33
+ *
34
+ * @param from - Start value
35
+ * @param to - End value
36
+ * @param t - Eased progress in [0, 1]
37
+ */
38
+ export declare function lerp(from: number, to: number, t: number): number;
39
+ /**
40
+ * Get the current timestamp in a way that works both in browser and Node.
41
+ */
42
+ export declare function now(): number;
@@ -0,0 +1,2 @@
1
+ import type { StreamRendererFn } from "./types";
2
+ export declare const areaCanvasRenderer: StreamRendererFn;
@@ -0,0 +1,9 @@
1
+ import type { GeoSceneNode } from "../geoTypes";
2
+ /**
3
+ * Canvas renderer for GeoAreaSceneNode — projected geographic polygons.
4
+ * Uses Path2D for GPU-accelerated rendering of complex geo paths.
5
+ *
6
+ * Points and lines in a geo frame are rendered by the existing
7
+ * pointCanvasRenderer and lineCanvasRenderer respectively.
8
+ */
9
+ export declare function geoCanvasRenderer(ctx: CanvasRenderingContext2D, nodes: GeoSceneNode[], _scales: any, _layout: any): void;
@@ -1,6 +1,7 @@
1
1
  import type { StreamRendererFn } from "./types";
2
2
  /**
3
3
  * Canvas heatmap renderer.
4
- * Renders HeatcellSceneNode as filled rectangles with color encoding.
4
+ * Renders HeatcellSceneNode as filled rectangles with color encoding,
5
+ * and optionally draws cell value text when showValues is enabled.
5
6
  */
6
7
  export declare const heatmapCanvasRenderer: StreamRendererFn;
@@ -4,5 +4,6 @@ import type { StreamRendererFn } from "./types";
4
4
  * Renders LineSceneNode paths using moveTo/lineTo.
5
5
  * Supports threshold-based segment coloring when colorThresholds + rawValues
6
6
  * are present on the node.
7
+ * Supports d3-shape curve interpolation when node.curve is set.
7
8
  */
8
9
  export declare const lineCanvasRenderer: StreamRendererFn;
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Shared pulse overlay rendering utilities.
3
+ *
4
+ * Pulse is a brief visual flash (glow/overlay) applied to scene nodes when
5
+ * their aggregated value changes. Each node carries `_pulseIntensity` (0–1),
6
+ * `_pulseColor`, and optionally `_pulseGlowRadius`.
7
+ *
8
+ * Three visual variants:
9
+ * - **Rect overlay**: semi-transparent fillRect on top of the bar/cell
10
+ * - **Circle glow ring**: expanding stroke ring around a point
11
+ * - **Path fill overlay**: re-traces an arbitrary path and fills with glow
12
+ */
13
+ interface PulseFields {
14
+ _pulseIntensity?: number;
15
+ _pulseColor?: string;
16
+ _pulseGlowRadius?: number;
17
+ }
18
+ /**
19
+ * Returns true if the node has an active pulse effect.
20
+ */
21
+ export declare function hasPulse(node: PulseFields): boolean;
22
+ /**
23
+ * Render a rectangular pulse overlay (used by bar, heatmap, and network rect renderers).
24
+ * Call this after drawing the main fill/stroke for the rectangle.
25
+ */
26
+ export declare function renderRectPulse(ctx: CanvasRenderingContext2D, node: PulseFields & {
27
+ x: number;
28
+ y: number;
29
+ w: number;
30
+ h: number;
31
+ }, alphaMultiplier?: number): void;
32
+ /**
33
+ * Render a circular glow ring pulse (used by point and network circle renderers).
34
+ * Call this after drawing the main circle fill/stroke.
35
+ */
36
+ export declare function renderCirclePulse(ctx: CanvasRenderingContext2D, node: PulseFields & {
37
+ x?: number;
38
+ y?: number;
39
+ cx?: number;
40
+ cy?: number;
41
+ r: number;
42
+ }, alphaMultiplier?: number): void;
43
+ /**
44
+ * Render a path-based fill pulse (used by area, wedge, and geo renderers).
45
+ * The caller must trace the path onto ctx BEFORE calling this function,
46
+ * or pass a Path2D object as the third argument (for geo renderers).
47
+ * This function sets alpha/fillStyle and calls ctx.fill().
48
+ */
49
+ export declare function renderPathPulse(ctx: CanvasRenderingContext2D, node: PulseFields, path?: Path2D, alphaMultiplier?: number): void;
50
+ export {};