semiotic 3.4.1 → 3.4.2

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.
package/ai/schema.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "name": "semiotic",
4
- "version": "3.4.1",
4
+ "version": "3.4.2",
5
5
  "description": "React data visualization library for charts, networks, and beyond",
6
6
  "tools": [
7
7
  {
@@ -1,7 +1,7 @@
1
1
  import type { Selection } from "../store/SelectionStore";
2
2
  export type SerializedFieldSelection = {
3
3
  type: "point";
4
- values: any[];
4
+ values: unknown[];
5
5
  } | {
6
6
  type: "interval";
7
7
  range: [number, number];
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from "react";
2
- import type { ScaleLinear } from "d3-scale";
2
+ import type { ScaleBand, ScaleLinear } from "d3-scale";
3
3
  import type { Datum } from "../charts/shared/datumTypes";
4
4
  export type ArrowOfTime = "up" | "down" | "left" | "right";
5
5
  export type WindowMode = "sliding" | "growing";
@@ -27,7 +27,7 @@ export interface AnnotationContext {
27
27
  time?: ScaleLinear<number, number>;
28
28
  value?: ScaleLinear<number, number>;
29
29
  /** The raw ordinal band scale (only in ordinal frames). Has .bandwidth(). */
30
- o?: any;
30
+ o?: ScaleBand<string>;
31
31
  } | null;
32
32
  /** @deprecated Use scales.x / scales.y instead */
33
33
  timeAxis?: "x" | "y";
@@ -67,7 +67,7 @@ export interface HoverAnnotationConfig {
67
67
  }
68
68
  export interface HoverData {
69
69
  /** The raw datum from the user's data array (may be an object, array, or null for exit nodes) */
70
- data: any;
70
+ data: Datum | null;
71
71
  /** Pixel X coordinate of the hovered element */
72
72
  x: number;
73
73
  /** Pixel Y coordinate of the hovered element */
@@ -82,12 +82,12 @@ export interface HoverData {
82
82
  value: number;
83
83
  valuePx?: number;
84
84
  color: string;
85
- datum: any;
85
+ datum: Datum;
86
86
  }>;
87
87
  /** Pixel X of hover position (may differ from x for multi-point snap) */
88
88
  xPx?: number;
89
89
  /** Raw X domain value at hover position */
90
- xValue?: any;
90
+ xValue?: unknown;
91
91
  /** Distribution statistics for boxplot/violin/ridgeline */
92
92
  stats?: {
93
93
  n: number;
@@ -2,7 +2,7 @@ import type { Datum } from "../charts/shared/datumTypes";
2
2
  export type ResolutionMode = "union" | "intersect" | "crossfilter";
3
3
  export interface FieldConstraint {
4
4
  type: "point";
5
- values: Set<any>;
5
+ values: Set<unknown>;
6
6
  }
7
7
  export interface IntervalConstraint {
8
8
  type: "interval";
@@ -1,4 +1,8 @@
1
+ interface TooltipStoreState {
2
+ tooltip: unknown;
3
+ changeTooltip: (tooltip: unknown) => void;
4
+ }
1
5
  declare const TooltipProvider: import("react").FC<{
2
6
  children: React.ReactNode;
3
- }>, useTooltip: <R>(selector: (state: unknown) => R) => R;
7
+ }>, useTooltip: <R>(selector: (state: TooltipStoreState) => R) => R;
4
8
  export { TooltipProvider, useTooltip };
@@ -14,7 +14,7 @@ export interface UseSelectionResult {
14
14
  /** Whether any selection clause is currently active */
15
15
  isActive: boolean;
16
16
  /** Set a point selection (categorical values) */
17
- selectPoints: (fieldValues: Record<string, any[]>) => void;
17
+ selectPoints: (fieldValues: Record<string, unknown[]>) => void;
18
18
  /** Set an interval selection (numeric ranges) */
19
19
  selectInterval: (fieldRanges: Record<string, [number, number]>) => void;
20
20
  /** Clear this client's clause */
@@ -47,12 +47,12 @@ export interface UseBrushSelectionOptions {
47
47
  yField?: string;
48
48
  }
49
49
  export interface UseBrushSelectionResult {
50
- /** Interaction config to pass to frameProps.interaction */
51
50
  brushInteraction: {
52
51
  brush: "xyBrush" | "xBrush" | "yBrush";
53
- during: (extent: any) => void;
54
- end: (extent: any) => void;
52
+ during: (extent: BrushExtent | null) => void;
53
+ end: (extent: BrushExtent | null) => void;
55
54
  };
55
+ /** Interaction config to pass to frameProps.interaction */
56
56
  /** Returns true if datum matches the brush selection */
57
57
  predicate: (datum: Datum) => boolean;
58
58
  /** Whether any brush is active */
@@ -60,6 +60,9 @@ export interface UseBrushSelectionResult {
60
60
  /** Clear the brush */
61
61
  clear: () => void;
62
62
  }
63
+ type LinearBrushExtent = [number, number];
64
+ type XYBrushExtent = [[number, number], [number, number]];
65
+ type BrushExtent = LinearBrushExtent | XYBrushExtent | [number, number][];
63
66
  export declare function useBrushSelection(options: UseBrushSelectionOptions): UseBrushSelectionResult;
64
67
  /**
65
68
  * Returns the subset of `data` that matches the given selection.
@@ -2,6 +2,17 @@ import type { Datum } from "../charts/shared/datumTypes";
2
2
  import type { ReactNode } from "react";
3
3
  import type { NetworkLabel } from "./networkTypes";
4
4
  import type { LegendGroup, GradientLegendConfig } from "../types/legendTypes";
5
+ type AnnotationAnchorNode = {
6
+ type: string;
7
+ datum: Datum | null;
8
+ id?: string;
9
+ x?: number;
10
+ y?: number;
11
+ cx?: number;
12
+ cy?: number;
13
+ w?: number;
14
+ h?: number;
15
+ };
5
16
  export interface NetworkSVGOverlayProps {
6
17
  width: number;
7
18
  height: number;
@@ -35,20 +46,14 @@ export interface NetworkSVGOverlayProps {
35
46
  /** User-provided SVG elements on top */
36
47
  foregroundGraphics?: ReactNode;
37
48
  /** Scene nodes for annotation positioning */
38
- sceneNodes?: Array<{
39
- type: string;
40
- datum: any;
41
- id?: string;
42
- x?: number;
43
- y?: number;
44
- cx?: number;
45
- cy?: number;
46
- w?: number;
47
- h?: number;
48
- }>;
49
+ sceneNodes?: AnnotationAnchorNode[];
49
50
  /** Annotations */
50
51
  annotations?: Datum[];
51
- svgAnnotationRules?: (annotation: Datum, index: number, context: any) => ReactNode;
52
+ svgAnnotationRules?: (annotation: Datum, index: number, context: {
53
+ width: number;
54
+ height: number;
55
+ sceneNodes?: AnnotationAnchorNode[];
56
+ }) => ReactNode;
52
57
  annotationFrame?: number;
53
58
  }
54
59
  /**
@@ -61,3 +66,4 @@ export declare function NetworkSVGOverlay(props: NetworkSVGOverlayProps): import
61
66
  export declare namespace NetworkSVGOverlay {
62
67
  var displayName: string;
63
68
  }
69
+ export {};
@@ -1,6 +1,7 @@
1
1
  import type { ReactNode } from "react";
2
2
  import type { GeoProjection, GeoPath, GeoPermissibleObjects } from "d3-geo";
3
- import type { Style, DecayConfig, PulseConfig, TransitionConfig, StalenessConfig, PointSceneNode, LineSceneNode, ThemeSemanticColors } from "./types";
3
+ import type { GradientLegendConfig, LegendGroup } from "../types/legendTypes";
4
+ import type { Style, DecayConfig, PulseConfig, TransitionConfig, StalenessConfig, SceneDatum, PointSceneNode, ThemeSemanticColors } from "./types";
4
5
  import type { AnimateProp } from "./pipelineTransitionUtils";
5
6
  import type { HoverAnnotationConfig, HoverData } from "../realtime/types";
6
7
  import type { GeoParticleStyle } from "./GeoParticlePool";
@@ -38,7 +39,7 @@ export interface GeoAreaSceneNode {
38
39
  /** Screen-space area in px² */
39
40
  screenArea: number;
40
41
  style: Style;
41
- datum: any;
42
+ datum: SceneDatum;
42
43
  group?: string;
43
44
  interactive?: boolean;
44
45
  /** Lazily-cached Path2D parsed from pathData (avoids re-parsing on every hit test) */
@@ -47,8 +48,15 @@ export interface GeoAreaSceneNode {
47
48
  _pulseIntensity?: number;
48
49
  _pulseColor?: string;
49
50
  }
51
+ export interface GeoLineSceneNode {
52
+ type: "line";
53
+ path: [number, number][];
54
+ style: Style;
55
+ datum: SceneDatum;
56
+ group?: string;
57
+ }
50
58
  /** Union of all scene node types that GeoFrame produces */
51
- export type GeoSceneNode = GeoAreaSceneNode | PointSceneNode | LineSceneNode;
59
+ export type GeoSceneNode = GeoAreaSceneNode | PointSceneNode | GeoLineSceneNode;
52
60
  export interface GeoScales {
53
61
  projection: GeoProjection;
54
62
  geoPath: GeoPath<any, GeoPermissibleObjects>;
@@ -62,7 +70,7 @@ export interface GeoPipelineConfig {
62
70
  fitPadding?: number;
63
71
  xAccessor?: string | ((d: Datum) => number);
64
72
  yAccessor?: string | ((d: Datum) => number);
65
- lineDataAccessor?: string | ((d: Datum) => any[]);
73
+ lineDataAccessor?: string | ((d: Datum) => Datum[]);
66
74
  lineType?: "geo" | "line";
67
75
  /** Flow rendering style: "basic" (straight/great-circle), "offset" (bidirectional offset), "arc" (curved arcs) @default "basic" */
68
76
  flowStyle?: "basic" | "offset" | "arc";
@@ -70,7 +78,7 @@ export interface GeoPipelineConfig {
70
78
  pointStyle?: (d: Datum) => Style & {
71
79
  r?: number;
72
80
  };
73
- lineStyle?: Style | ((d: any, group?: string) => Style);
81
+ lineStyle?: Style | ((d: Datum, group?: string) => Style);
74
82
  colorScheme?: string | string[];
75
83
  /** Theme-resolved semantic role colors — default fallback before hardcoded hex. See `ThemeSemanticColors` in ./types. */
76
84
  themeSemantic?: ThemeSemanticColors;
@@ -98,7 +106,7 @@ export interface StreamGeoFrameProps<T = Datum> {
98
106
  lines?: T[];
99
107
  xAccessor?: string | ((d: T) => number);
100
108
  yAccessor?: string | ((d: T) => number);
101
- lineDataAccessor?: string | ((d: T) => any[]);
109
+ lineDataAccessor?: string | ((d: T) => Datum[]);
102
110
  pointIdAccessor?: string | ((d: T) => string);
103
111
  lineType?: "geo" | "line";
104
112
  /** Flow rendering style: "basic" (straight/great-circle), "offset" (bidirectional offset), "arc" (curved arcs) @default "basic" */
@@ -145,7 +153,7 @@ export interface StreamGeoFrameProps<T = Datum> {
145
153
  pointStyle?: (d: Datum) => Style & {
146
154
  r?: number;
147
155
  };
148
- lineStyle?: Style | ((d: any, group?: string) => Style);
156
+ lineStyle?: Style | ((d: Datum, group?: string) => Style);
149
157
  colorScheme?: string | string[];
150
158
  enableHover?: boolean;
151
159
  hoverAnnotation?: boolean | HoverAnnotationConfig;
@@ -164,7 +172,11 @@ export interface StreamGeoFrameProps<T = Datum> {
164
172
  backgroundGraphics?: ReactNode;
165
173
  foregroundGraphics?: ReactNode;
166
174
  title?: string | ReactNode;
167
- legend?: any;
175
+ legend?: ReactNode | {
176
+ legendGroups: LegendGroup[];
177
+ } | {
178
+ gradient: GradientLegendConfig;
179
+ };
168
180
  legendPosition?: "right" | "left" | "top" | "bottom";
169
181
  legendHoverBehavior?: (item: {
170
182
  label: string;
@@ -10,10 +10,15 @@
10
10
  * HoverData state that mouse hover does.
11
11
  */
12
12
  import type { HoverData } from "../realtime/types";
13
+ import type { Datum } from "../charts/shared/datumTypes";
14
+ import type { NetworkSceneEdge, NetworkSceneNode } from "./networkTypes";
15
+ import type { SceneNode } from "./types";
16
+ import type { OrdinalSceneNode } from "./ordinalTypes";
17
+ import type { GeoSceneNode } from "./geoTypes";
13
18
  export interface NavPoint {
14
19
  x: number;
15
20
  y: number;
16
- datum: any;
21
+ datum: Datum | null;
17
22
  /** Shape hint for focus ring rendering */
18
23
  shape?: "circle" | "rect" | "wedge";
19
24
  /** Width of rect-shaped elements (bars, sankey nodes) */
@@ -73,18 +78,18 @@ export declare function nextGraphIndex(key: string, pos: NavPosition, graph: Nav
73
78
  * Lines/areas carry a `group` field identifying the series.
74
79
  * ArrowRight/Left = within series, ArrowUp/Down = switch series.
75
80
  */
76
- export declare function extractXYNavPoints(scene: any[]): NavPoint[];
81
+ export declare function extractXYNavPoints(scene: SceneNode[]): NavPoint[];
77
82
  /**
78
83
  * Extract navigable points from ordinal scene nodes.
79
84
  * Bars use `node.group` (stack/group key) falling back to `datum.category`.
80
85
  * ArrowRight/Left = across categories, ArrowUp/Down = within stacked segments.
81
86
  */
82
- export declare function extractOrdinalNavPoints(scene: any[]): NavPoint[];
87
+ export declare function extractOrdinalNavPoints(scene: OrdinalSceneNode[]): NavPoint[];
83
88
  /**
84
89
  * Extract navigable points from network scene nodes.
85
90
  * Each node's group is its own id, enabling neighbor traversal via edges.
86
91
  */
87
- export declare function extractNetworkNavPoints(scene: any[]): NavPoint[];
92
+ export declare function extractNetworkNavPoints(scene: NetworkSceneNode[]): NavPoint[];
88
93
  /**
89
94
  * Network-specific navigation: spatial arrow keys + edge following.
90
95
  *
@@ -94,14 +99,20 @@ export declare function extractNetworkNavPoints(scene: any[]): NavPoint[];
94
99
  *
95
100
  * Returns the flat index of the target node, -1 to clear, or null for unhandled keys.
96
101
  */
97
- export declare function nextNetworkIndex(key: string, pos: NavPosition, graph: NavGraph, edges: any[], neighborIndexRef: {
102
+ export declare function nextNetworkIndex(key: string, pos: NavPosition, graph: NavGraph, edges: EdgeLike[], neighborIndexRef: {
98
103
  current: number;
99
104
  }): number | null;
105
+ /** Collect neighbor node ids from edge list for a given node. */
106
+ type EdgeLike = NetworkSceneEdge | {
107
+ source?: unknown;
108
+ target?: unknown;
109
+ datum?: Datum | null;
110
+ };
100
111
  /**
101
112
  * Extract navigable points from geo scene nodes.
102
113
  * Flat navigation only (no meaningful grouping for geo).
103
114
  */
104
- export declare function extractGeoNavPoints(scene: any[]): NavPoint[];
115
+ export declare function extractGeoNavPoints(scene: GeoSceneNode[]): NavPoint[];
105
116
  /**
106
117
  * Compute the next focus index given a key and current index.
107
118
  * Returns -1 to clear focus. Returns null for unhandled keys.
@@ -113,3 +124,4 @@ export declare function nextIndex(key: string, current: number, total: number):
113
124
  * Convert a NavPoint to HoverData for the tooltip system.
114
125
  */
115
126
  export declare function navPointToHover(point: NavPoint): HoverData;
127
+ export {};
@@ -2,7 +2,7 @@ import type { ReactNode } from "react";
2
2
  import type { OnObservationCallback } from "../store/ObservationStore";
3
3
  import type { HoverData, AnnotationContext } from "../realtime/types";
4
4
  import type { LegendGroup } from "../types/legendTypes";
5
- import type { Style, DecayConfig, PulseConfig, TransitionConfig, StalenessConfig, ThemeSemanticColors } from "./types";
5
+ import type { Style, DecayConfig, PulseConfig, TransitionConfig, StalenessConfig, ThemeSemanticColors, SceneDatum } from "./types";
6
6
  import type { AnimateProp } from "./pipelineTransitionUtils";
7
7
  import type { Datum } from "../charts/shared/datumTypes";
8
8
  export interface TensionConfig {
@@ -58,7 +58,7 @@ export interface RealtimeEdge {
58
58
  _introFromZero?: boolean;
59
59
  direction?: string;
60
60
  circular?: boolean;
61
- circularPathData?: any;
61
+ circularPathData?: CircularPathData;
62
62
  bezier?: BezierCache;
63
63
  data?: Datum;
64
64
  /** Unique key for this edge (supports parallel edges between same node pair) */
@@ -80,6 +80,27 @@ export interface BezierCache {
80
80
  segments?: Array<[BezierPoint, BezierPoint, BezierPoint, BezierPoint]>;
81
81
  halfWidth: number;
82
82
  }
83
+ export interface CircularPathData {
84
+ sourceX: number;
85
+ targetX: number;
86
+ sourceY: number;
87
+ targetY: number;
88
+ rightFullExtent: number;
89
+ leftFullExtent: number;
90
+ verticalFullExtent: number;
91
+ rightInnerExtent: number;
92
+ leftInnerExtent: number;
93
+ verticalRightInnerExtent: number;
94
+ verticalLeftInnerExtent: number;
95
+ rightSmallArcRadius: number;
96
+ rightLargeArcRadius: number;
97
+ leftSmallArcRadius: number;
98
+ leftLargeArcRadius: number;
99
+ sourceWidth: number;
100
+ rightNodeBuffer: number;
101
+ leftNodeBuffer: number;
102
+ arcRadius: number;
103
+ }
83
104
  export interface Particle {
84
105
  t: number;
85
106
  offset: number;
@@ -133,7 +154,7 @@ export interface RealtimeNetworkFrameProps {
133
154
  enableHover?: boolean;
134
155
  tooltipContent?: (d: {
135
156
  type: "node" | "edge";
136
- data: any;
157
+ data: Datum | null;
137
158
  }) => ReactNode;
138
159
  onTopologyChange?: (nodes: RealtimeNode[], edges: RealtimeEdge[]) => void;
139
160
  background?: string;
@@ -147,7 +168,7 @@ export interface NetworkCircleNode {
147
168
  cy: number;
148
169
  r: number;
149
170
  style: Style;
150
- datum: any;
171
+ datum: SceneDatum;
151
172
  id?: string;
152
173
  label?: string;
153
174
  depth?: number;
@@ -163,7 +184,7 @@ export interface NetworkRectNode {
163
184
  w: number;
164
185
  h: number;
165
186
  style: Style;
166
- datum: any;
187
+ datum: SceneDatum;
167
188
  id?: string;
168
189
  label?: string;
169
190
  depth?: number;
@@ -184,7 +205,7 @@ export interface NetworkArcNode {
184
205
  /** End angle in radians, canvas convention */
185
206
  endAngle: number;
186
207
  style: Style;
187
- datum: any;
208
+ datum: SceneDatum;
188
209
  id?: string;
189
210
  label?: string;
190
211
  _pulseIntensity?: number;
@@ -199,7 +220,7 @@ export interface NetworkLineEdge {
199
220
  x2: number;
200
221
  y2: number;
201
222
  style: Style;
202
- datum: any;
223
+ datum: SceneDatum;
203
224
  _pulseIntensity?: number;
204
225
  _pulseColor?: string;
205
226
  }
@@ -209,7 +230,7 @@ export interface NetworkBezierEdge {
209
230
  pathD: string;
210
231
  bezierCache?: BezierCache;
211
232
  style: Style;
212
- datum: any;
233
+ datum: SceneDatum;
213
234
  _pulseIntensity?: number;
214
235
  _pulseColor?: string;
215
236
  /** Lazily-built Path2D for hit testing; invalidated when pathD changes. */
@@ -221,7 +242,7 @@ export interface NetworkRibbonEdge {
221
242
  type: "ribbon";
222
243
  pathD: string;
223
244
  style: Style;
224
- datum: any;
245
+ datum: SceneDatum;
225
246
  _pulseIntensity?: number;
226
247
  _pulseColor?: string;
227
248
  _cachedPath2D?: Path2D;
@@ -232,7 +253,7 @@ export interface NetworkCurvedEdge {
232
253
  type: "curved";
233
254
  pathD: string;
234
255
  style: Style;
235
- datum: any;
256
+ datum: SceneDatum;
236
257
  _pulseIntensity?: number;
237
258
  _pulseColor?: string;
238
259
  _cachedPath2D?: Path2D;
@@ -306,18 +327,18 @@ export interface NetworkPipelineConfig {
306
327
  valueAccessor?: string | ((d: Datum) => number);
307
328
  /** Edge ID accessor for removeEdge(edgeId) — enables single-ID edge removal */
308
329
  edgeIdAccessor?: string | ((d: Datum) => string);
309
- childrenAccessor?: string | ((d: Datum) => any[]);
330
+ childrenAccessor?: string | ((d: Datum) => Datum[]);
310
331
  hierarchySum?: string | ((d: Datum) => number);
311
332
  orientation?: "horizontal" | "vertical";
312
333
  nodeAlign?: "justify" | "left" | "right" | "center";
313
334
  nodePaddingRatio?: number;
314
335
  nodeWidth?: number;
315
- edgeSort?: (a: any, b: any) => number;
336
+ edgeSort?: (a: unknown, b: unknown) => number;
316
337
  iterations?: number;
317
338
  forceStrength?: number;
318
339
  padAngle?: number;
319
340
  groupWidth?: number;
320
- sortGroups?: (a: any, b: any) => number;
341
+ sortGroups?: (a: unknown, b: unknown) => number;
321
342
  treeOrientation?: "vertical" | "horizontal" | "radial";
322
343
  edgeType?: "line" | "curve";
323
344
  padding?: number;
@@ -352,11 +373,11 @@ export interface NetworkPipelineConfig {
352
373
  * "atomic" ([2,8] electron shell), or custom capacities. @default "flat" */
353
374
  orbitMode?: "flat" | "solar" | "atomic" | number[];
354
375
  /** Ring size divisor per depth. Larger = tighter orbits. @default 2.95 */
355
- orbitSize?: number | ((node: any) => number);
376
+ orbitSize?: number | ((node: Datum) => number);
356
377
  /** Orbit speed multiplier (higher = faster rotation). @default 0.25 */
357
378
  orbitSpeed?: number;
358
379
  /** Per-node speed modifier. @default (node) => 1 / (node.depth + 1) */
359
- orbitRevolution?: (node: any) => number;
380
+ orbitRevolution?: (node: Datum) => number;
360
381
  /**
361
382
  * Built-in revolution style presets:
362
383
  * - "locked": children rotate with parent at decreasing speed (default)
@@ -367,7 +388,7 @@ export interface NetworkPipelineConfig {
367
388
  */
368
389
  orbitRevolutionStyle?: "locked" | "decay" | "alternate";
369
390
  /** Vertical squash for elliptical orbits. 1 = circle. @default 1 */
370
- orbitEccentricity?: number | ((node: any) => number);
391
+ orbitEccentricity?: number | ((node: Datum) => number);
371
392
  /** Show orbital ring ellipses as foreground graphics. @default true */
372
393
  orbitShowRings?: boolean;
373
394
  /** Enable orbit animation. @default true */
@@ -405,8 +426,8 @@ export interface StreamNetworkFrameProps<T = Datum> {
405
426
  forceStrength?: number;
406
427
  padAngle?: number;
407
428
  groupWidth?: number;
408
- sortGroups?: (a: any, b: any) => number;
409
- edgeSort?: (a: any, b: any) => number;
429
+ sortGroups?: (a: unknown, b: unknown) => number;
430
+ edgeSort?: (a: unknown, b: unknown) => number;
410
431
  treeOrientation?: "vertical" | "horizontal" | "radial";
411
432
  edgeType?: "line" | "curve";
412
433
  padding?: number;
@@ -473,11 +494,11 @@ export interface StreamNetworkFrameProps<T = Datum> {
473
494
  staleness?: StalenessConfig;
474
495
  thresholds?: ThresholdAlertConfig;
475
496
  orbitMode?: "flat" | "solar" | "atomic" | number[];
476
- orbitSize?: number | ((node: any) => number);
497
+ orbitSize?: number | ((node: Datum) => number);
477
498
  orbitSpeed?: number;
478
- orbitRevolution?: (node: any) => number;
499
+ orbitRevolution?: (node: Datum) => number;
479
500
  orbitRevolutionStyle?: "locked" | "decay" | "alternate";
480
- orbitEccentricity?: number | ((node: any) => number);
501
+ orbitEccentricity?: number | ((node: Datum) => number);
481
502
  orbitShowRings?: boolean;
482
503
  orbitAnimated?: boolean;
483
504
  /** Render a visually-hidden data table from the scene graph for screen readers */
@@ -1,7 +1,7 @@
1
1
  import type { ReactNode } from "react";
2
2
  import type { ScaleLinear, ScaleBand } from "d3-scale";
3
3
  import type { WindowMode, HoverAnnotationConfig, HoverData, AnnotationContext } from "../realtime/types";
4
- import type { Style, DecayConfig, PulseConfig, TransitionConfig, StalenessConfig, ThemeSemanticColors } from "./types";
4
+ import type { Style, SceneDatum, DecayConfig, PulseConfig, TransitionConfig, StalenessConfig, ThemeSemanticColors } from "./types";
5
5
  import type { AnimateProp } from "./pipelineTransitionUtils";
6
6
  import type { LegendGroup } from "../types/legendTypes";
7
7
  import type { Datum } from "../charts/shared/datumTypes";
@@ -24,7 +24,7 @@ export interface WedgeSceneNode {
24
24
  /** Corner radius for rounded wedge arcs (d3-shape arc.cornerRadius) */
25
25
  cornerRadius?: number;
26
26
  style: Style;
27
- datum: any;
27
+ datum: SceneDatum;
28
28
  category?: string;
29
29
  _pulseIntensity?: number;
30
30
  _pulseColor?: string;
@@ -50,13 +50,13 @@ export interface BoxplotSceneNode {
50
50
  maxPos: number;
51
51
  stats: DistributionStats;
52
52
  style: Style;
53
- datum: any;
53
+ datum: Datum;
54
54
  category?: string;
55
55
  outliers?: {
56
56
  px: number;
57
57
  py: number;
58
58
  value: number;
59
- datum: any;
59
+ datum: Datum;
60
60
  }[];
61
61
  _pulseIntensity?: number;
62
62
  _pulseColor?: string;
@@ -98,7 +98,7 @@ export interface ViolinSceneNode {
98
98
  /** Pre-computed distribution statistics for tooltips */
99
99
  stats?: DistributionStats;
100
100
  style: Style;
101
- datum: any;
101
+ datum: Datum;
102
102
  category?: string;
103
103
  _pulseIntensity?: number;
104
104
  _pulseColor?: string;
@@ -113,7 +113,7 @@ export interface ConnectorSceneNode {
113
113
  x2: number;
114
114
  y2: number;
115
115
  style: Style;
116
- datum: any;
116
+ datum: Datum;
117
117
  group?: string;
118
118
  _pulseIntensity?: number;
119
119
  _pulseColor?: string;
@@ -126,7 +126,7 @@ export interface TrapezoidSceneNode {
126
126
  /** Four corners: [top-left, top-right, bottom-right, bottom-left] */
127
127
  points: [number, number][];
128
128
  style: Style;
129
- datum: any;
129
+ datum: Datum;
130
130
  category?: string;
131
131
  _pulseIntensity?: number;
132
132
  _pulseColor?: string;
@@ -205,9 +205,9 @@ export interface OrdinalPipelineConfig {
205
205
  oSort?: ((a: string, b: string) => number) | boolean | "asc" | "desc" | "auto";
206
206
  connectorAccessor?: string | ((d: Datum) => string);
207
207
  connectorStyle?: Style | ((d: Datum) => Style);
208
- dynamicColumnWidth?: string | ((data: any[]) => number);
209
- pieceStyle?: (d: any, category?: string) => Style;
210
- summaryStyle?: (d: any, category?: string) => Style;
208
+ dynamicColumnWidth?: string | ((data: Datum[]) => number);
209
+ pieceStyle?: (d: Datum, category?: string) => Style;
210
+ summaryStyle?: (d: Datum, category?: string) => Style;
211
211
  colorScheme?: string | string[];
212
212
  themeCategorical?: string[];
213
213
  /** Theme-resolved semantic role colors — default fallback before hardcoded hex. See `ThemeSemanticColors` in ./types. */
@@ -293,8 +293,8 @@ export interface StreamOrdinalFrameProps<T = Datum> {
293
293
  rTickValues?: number[];
294
294
  /** Align first tick label to start and last tick label to end. Default false. */
295
295
  tickLabelEdgeAlign?: boolean;
296
- pieceStyle?: (d: any, category?: string) => Style;
297
- summaryStyle?: (d: any, category?: string) => Style;
296
+ pieceStyle?: (d: Datum, category?: string) => Style;
297
+ summaryStyle?: (d: Datum, category?: string) => Style;
298
298
  colorScheme?: string | string[];
299
299
  barColors?: Record<string, string>;
300
300
  showAxes?: boolean;
@@ -1,8 +1,12 @@
1
1
  import type { ReactNode } from "react";
2
2
  import type { ScaleLinear } from "d3-scale";
3
3
  import type { AnimateProp } from "./pipelineTransitionUtils";
4
+ import type { LegendGroup, GradientLegendConfig } from "../types/legendTypes";
4
5
  import type { ArrowOfTime, WindowMode, LineStyle, BarStyle, WaterfallStyle, SwarmStyle, HoverAnnotationConfig, HoverData, AnnotationContext, AnnotationAnchorMode } from "../realtime/types";
5
6
  import type { Datum } from "../charts/shared/datumTypes";
7
+ export type SceneDatum = Datum | null;
8
+ export type SeriesDatum = Datum[] | null;
9
+ export type AxisTickFormat = ((d: number, index?: number, allTicks?: number[]) => string) | ((d: string, index?: number, allTicks?: number[]) => string) | ((d: Date, index?: number, allTicks?: number[]) => string);
6
10
  export interface ThemeSemanticColors {
7
11
  primary?: string;
8
12
  secondary?: string;
@@ -100,7 +104,7 @@ export interface LineSceneNode {
100
104
  /** Threshold-based color segments */
101
105
  colorThresholds?: LineColorThreshold[];
102
106
  style: Style;
103
- datum: any;
107
+ datum: SeriesDatum;
104
108
  group?: string;
105
109
  /** Horizontal gradient for the line stroke */
106
110
  strokeGradient?: {
@@ -131,7 +135,7 @@ export interface AreaSceneNode {
131
135
  topPath: [number, number][];
132
136
  bottomPath: [number, number][];
133
137
  style: Style;
134
- datum: any;
138
+ datum: SeriesDatum;
135
139
  group?: string;
136
140
  /** Gradient fill: opacity-based (topOpacity/bottomOpacity) or multi-color (colorStops) */
137
141
  fillGradient?: {
@@ -183,7 +187,7 @@ export interface PointSceneNode {
183
187
  y: number;
184
188
  r: number;
185
189
  style: Style;
186
- datum: any;
190
+ datum: SceneDatum;
187
191
  /** Optional unique identifier for point-anchored annotations */
188
192
  pointId?: string;
189
193
  /** Pulse glow intensity 0–1 (set by PipelineStore when pulse is active) */
@@ -227,7 +231,7 @@ export interface RectSceneNode {
227
231
  }>;
228
232
  };
229
233
  style: Style;
230
- datum: any;
234
+ datum: SceneDatum;
231
235
  group?: string;
232
236
  _pulseIntensity?: number;
233
237
  _pulseColor?: string;
@@ -249,7 +253,7 @@ export interface HeatcellSceneNode {
249
253
  w: number;
250
254
  h: number;
251
255
  fill: string;
252
- datum: any;
256
+ datum: SceneDatum;
253
257
  /** Optional style object (used for decay/transition opacity on heatmap cells) */
254
258
  style?: Style;
255
259
  /** Numeric cell value (for canvas text rendering when showValues is enabled) */
@@ -286,7 +290,7 @@ export interface CandlestickSceneNode {
286
290
  isUp: boolean;
287
291
  /** Range/dumbbell mode — no body, endpoint dots instead */
288
292
  isRange?: boolean;
289
- datum: any;
293
+ datum: SceneDatum;
290
294
  /** Optional style object (used during transition opacity animations) */
291
295
  style?: Style;
292
296
  _pulseIntensity?: number;
@@ -446,7 +450,7 @@ export interface StreamXYFrameProps<T = Datum> {
446
450
  orient: "left" | "right" | "top" | "bottom";
447
451
  label?: string;
448
452
  ticks?: number;
449
- tickFormat?: (d: any, index?: number, allTicks?: number[]) => string;
453
+ tickFormat?: AxisTickFormat;
450
454
  baseline?: boolean | "under";
451
455
  jaggedBase?: boolean;
452
456
  }>;
@@ -489,9 +493,9 @@ export interface StreamXYFrameProps<T = Datum> {
489
493
  svgAnnotationRules?: (annotation: Datum, index: number, context: AnnotationContext) => ReactNode;
490
494
  showGrid?: boolean;
491
495
  legend?: ReactNode | {
492
- legendGroups: any[];
496
+ legendGroups: LegendGroup[];
493
497
  } | {
494
- gradient: import("../types/legendTypes").GradientLegendConfig;
498
+ gradient: GradientLegendConfig;
495
499
  };
496
500
  legendHoverBehavior?: (item: {
497
501
  label: string;