semiotic 3.2.3 → 3.3.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 (53) hide show
  1. package/CLAUDE.md +118 -264
  2. package/README.md +37 -17
  3. package/ai/schema.json +1 -1
  4. package/ai/system-prompt.md +3 -3
  5. package/dist/components/charts/ordinal/SwimlaneChart.d.ts +4 -0
  6. package/dist/components/charts/realtime/RealtimeHeatmap.d.ts +2 -0
  7. package/dist/components/charts/realtime/RealtimeHistogram.d.ts +2 -0
  8. package/dist/components/charts/realtime/RealtimeLineChart.d.ts +2 -0
  9. package/dist/components/charts/realtime/RealtimeSwarmChart.d.ts +2 -0
  10. package/dist/components/charts/realtime/RealtimeWaterfallChart.d.ts +2 -0
  11. package/dist/components/charts/shared/hooks.d.ts +2 -1
  12. package/dist/components/charts/shared/types.d.ts +6 -2
  13. package/dist/components/charts/shared/useChartSetup.d.ts +1 -1
  14. package/dist/components/realtime/RingBuffer.d.ts +11 -0
  15. package/dist/components/realtime/types.d.ts +4 -0
  16. package/dist/components/semiotic-server.d.ts +6 -1
  17. package/dist/components/server/animatedGif.d.ts +78 -0
  18. package/dist/components/server/renderToStaticSVG.d.ts +85 -5
  19. package/dist/components/server/staticAnnotations.d.ts +40 -0
  20. package/dist/components/server/staticLegend.d.ts +39 -0
  21. package/dist/components/server/svgHatchPattern.d.ts +26 -0
  22. package/dist/components/server/themeResolver.d.ts +35 -0
  23. package/dist/components/stream/GeoPipelineStore.d.ts +6 -1
  24. package/dist/components/stream/NetworkPipelineStore.d.ts +20 -0
  25. package/dist/components/stream/OrdinalPipelineStore.d.ts +11 -0
  26. package/dist/components/stream/OrdinalSVGOverlay.d.ts +5 -0
  27. package/dist/components/stream/PipelineStore.d.ts +11 -0
  28. package/dist/components/stream/accessorUtils.d.ts +3 -3
  29. package/dist/components/stream/geoTypes.d.ts +2 -0
  30. package/dist/components/stream/networkTypes.d.ts +33 -0
  31. package/dist/components/stream/ordinalTypes.d.ts +30 -3
  32. package/dist/components/stream/renderers/resolveCSSColor.d.ts +17 -0
  33. package/dist/components/stream/types.d.ts +4 -0
  34. package/dist/geo.min.js +1 -1
  35. package/dist/geo.module.min.js +1 -1
  36. package/dist/network.min.js +1 -1
  37. package/dist/network.module.min.js +1 -1
  38. package/dist/ordinal.min.js +1 -1
  39. package/dist/ordinal.module.min.js +1 -1
  40. package/dist/realtime.min.js +1 -1
  41. package/dist/realtime.module.min.js +1 -1
  42. package/dist/semiotic-ai.min.js +1 -1
  43. package/dist/semiotic-ai.module.min.js +1 -1
  44. package/dist/semiotic-server.d.ts +6 -1
  45. package/dist/semiotic-utils.min.js +1 -1
  46. package/dist/semiotic-utils.module.min.js +1 -1
  47. package/dist/semiotic.min.js +1 -1
  48. package/dist/semiotic.module.min.js +1 -1
  49. package/dist/server.min.js +1 -1
  50. package/dist/server.module.min.js +1 -1
  51. package/dist/xy.min.js +1 -1
  52. package/dist/xy.module.min.js +1 -1
  53. package/package.json +14 -3
@@ -35,6 +35,9 @@ export interface RealtimeNode {
35
35
  createdByFrame?: boolean;
36
36
  sourceLinks?: RealtimeEdge[];
37
37
  targetLinks?: RealtimeEdge[];
38
+ _pulseIntensity?: number;
39
+ _pulseColor?: string;
40
+ _pulseGlowRadius?: number;
38
41
  }
39
42
  export interface RealtimeEdge {
40
43
  source: RealtimeNode | string;
@@ -56,6 +59,12 @@ export interface RealtimeEdge {
56
59
  data?: Record<string, any>;
57
60
  /** Unique key for this edge (supports parallel edges between same node pair) */
58
61
  _edgeKey?: string;
62
+ _pulseIntensity?: number;
63
+ _pulseColor?: string;
64
+ _pulseGlowRadius?: number;
65
+ /** @internal Circular sankey layout fields */
66
+ _circularWidth?: number;
67
+ _circularStub?: boolean;
59
68
  }
60
69
  export interface BezierPoint {
61
70
  x: number;
@@ -171,6 +180,9 @@ export interface NetworkArcNode {
171
180
  datum: any;
172
181
  id?: string;
173
182
  label?: string;
183
+ _pulseIntensity?: number;
184
+ _pulseColor?: string;
185
+ _pulseGlowRadius?: number;
174
186
  }
175
187
  /** Line edge — used by force */
176
188
  export interface NetworkLineEdge {
@@ -200,6 +212,8 @@ export interface NetworkRibbonEdge {
200
212
  pathD: string;
201
213
  style: Style;
202
214
  datum: any;
215
+ _pulseIntensity?: number;
216
+ _pulseColor?: string;
203
217
  }
204
218
  /** Curved edge — used by tree, cluster */
205
219
  export interface NetworkCurvedEdge {
@@ -207,6 +221,8 @@ export interface NetworkCurvedEdge {
207
221
  pathD: string;
208
222
  style: Style;
209
223
  datum: any;
224
+ _pulseIntensity?: number;
225
+ _pulseColor?: string;
210
226
  }
211
227
  export type NetworkSceneNode = NetworkCircleNode | NetworkRectNode | NetworkArcNode;
212
228
  export type NetworkSceneEdge = NetworkLineEdge | NetworkBezierEdge | NetworkRibbonEdge | NetworkCurvedEdge;
@@ -333,6 +349,15 @@ export interface NetworkPipelineConfig {
333
349
  orbitShowRings?: boolean;
334
350
  /** Enable orbit animation. @default true */
335
351
  orbitAnimated?: boolean;
352
+ /** @internal Hierarchy root stashed for tree/treemap/circlepack plugins */
353
+ __hierarchyRoot?: unknown;
354
+ /** @internal Orbit animation state preserved across config updates */
355
+ __orbitState?: unknown;
356
+ /** @internal Previous node positions for warm-start force layout */
357
+ __previousPositions?: Map<string, {
358
+ x: number;
359
+ y: number;
360
+ }>;
336
361
  }
337
362
  export interface StreamNetworkFrameProps<T = Record<string, any>> {
338
363
  chartType: NetworkChartType;
@@ -450,6 +475,14 @@ export interface StreamNetworkFrameProps<T = Record<string, any>> {
450
475
  export interface StreamNetworkFrameHandle {
451
476
  push(edge: EdgePush): void;
452
477
  pushMany(edges: EdgePush[]): void;
478
+ /** Remove a node by ID. Also removes connected edges. */
479
+ removeNode(id: string): boolean;
480
+ /** Remove all edges between source and target node IDs. */
481
+ removeEdge(sourceId: string, targetId: string): boolean;
482
+ /** Update a node's data by ID. Returns previous data. */
483
+ updateNode(id: string, updater: (data: Record<string, any>) => Record<string, any>): Record<string, any> | null;
484
+ /** Update all edges between source+target. Returns array of previous data. */
485
+ updateEdge(sourceId: string, targetId: string, updater: (data: Record<string, any>) => Record<string, any>): Record<string, any>[];
453
486
  clear(): void;
454
487
  getTopology(): {
455
488
  nodes: RealtimeNode[];
@@ -20,12 +20,11 @@ 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
23
  _pulseIntensity?: number;
25
- /** Pulse color */
26
24
  _pulseColor?: string;
27
- /** Animation target opacity (set during enter/exit transitions) */
25
+ _pulseGlowRadius?: number;
28
26
  _targetOpacity?: number;
27
+ _transitionKey?: string;
29
28
  }
30
29
  export interface BoxplotSceneNode {
31
30
  type: "boxplot";
@@ -51,7 +50,11 @@ export interface BoxplotSceneNode {
51
50
  value: number;
52
51
  datum: any;
53
52
  }[];
53
+ _pulseIntensity?: number;
54
+ _pulseColor?: string;
55
+ _pulseGlowRadius?: number;
54
56
  _targetOpacity?: number;
57
+ _transitionKey?: string;
55
58
  }
56
59
  export interface DistributionStats {
57
60
  n: number;
@@ -89,7 +92,11 @@ export interface ViolinSceneNode {
89
92
  style: Style;
90
93
  datum: any;
91
94
  category?: string;
95
+ _pulseIntensity?: number;
96
+ _pulseColor?: string;
97
+ _pulseGlowRadius?: number;
92
98
  _targetOpacity?: number;
99
+ _transitionKey?: string;
93
100
  }
94
101
  export interface ConnectorSceneNode {
95
102
  type: "connector";
@@ -100,7 +107,11 @@ export interface ConnectorSceneNode {
100
107
  style: Style;
101
108
  datum: any;
102
109
  group?: string;
110
+ _pulseIntensity?: number;
111
+ _pulseColor?: string;
112
+ _pulseGlowRadius?: number;
103
113
  _targetOpacity?: number;
114
+ _transitionKey?: string;
104
115
  }
105
116
  export interface TrapezoidSceneNode {
106
117
  type: "trapezoid";
@@ -109,7 +120,11 @@ export interface TrapezoidSceneNode {
109
120
  style: Style;
110
121
  datum: any;
111
122
  category?: string;
123
+ _pulseIntensity?: number;
124
+ _pulseColor?: string;
125
+ _pulseGlowRadius?: number;
112
126
  _targetOpacity?: number;
127
+ _transitionKey?: string;
113
128
  }
114
129
  export type { Style, PointSceneNode, RectSceneNode } from "./types";
115
130
  import type { PointSceneNode, RectSceneNode } from "./types";
@@ -167,6 +182,8 @@ export interface OrdinalPipelineConfig {
167
182
  summaryStyle?: (d: any, category?: string) => Style;
168
183
  colorScheme?: string | string[];
169
184
  barColors?: Record<string, string>;
185
+ /** ID accessor for remove() — extracts a unique identifier from each datum */
186
+ dataIdAccessor?: string | ((d: any) => string);
170
187
  decay?: DecayConfig;
171
188
  pulse?: PulseConfig;
172
189
  transition?: TransitionConfig;
@@ -217,6 +234,12 @@ export interface StreamOrdinalFrameProps<T = Record<string, any>> {
217
234
  windowSize?: number;
218
235
  connectorAccessor?: string | ((d: T) => string);
219
236
  connectorStyle?: Style | ((d: any) => Style);
237
+ /** ID accessor for remove()/update() — extracts a unique identifier from each datum */
238
+ dataIdAccessor?: string | ((d: any) => string);
239
+ /** Custom tick values for the value (r) axis. Overrides the default d3 ticks. */
240
+ rTickValues?: number[];
241
+ /** Align first tick label to start and last tick label to end. Default false. */
242
+ tickLabelEdgeAlign?: boolean;
220
243
  pieceStyle?: (d: any, category?: string) => Style;
221
244
  summaryStyle?: (d: any, category?: string) => Style;
222
245
  colorScheme?: string | string[];
@@ -276,6 +299,10 @@ export interface StreamOrdinalFrameProps<T = Record<string, any>> {
276
299
  export interface StreamOrdinalFrameHandle<T = Record<string, any>> {
277
300
  push(datum: T): void;
278
301
  pushMany(data: T[]): void;
302
+ /** Remove data items by ID. Requires dataIdAccessor. */
303
+ remove(id: string | string[]): T[];
304
+ /** Update data items by ID in place. Requires dataIdAccessor. Returns previous values. */
305
+ update(id: string | string[], updater: (d: T) => T): T[];
279
306
  clear(): void;
280
307
  getData(): T[];
281
308
  getScales(): OrdinalScales | null;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Resolve a CSS custom property value to a concrete color string.
3
+ *
4
+ * If the input is a `var(--name)` or `var(--name, fallback)` string,
5
+ * reads the computed value from the canvas element. Otherwise returns
6
+ * the input unchanged.
7
+ *
8
+ * Per-canvas cache avoids repeated getComputedStyle calls within a single
9
+ * paint cycle. The cache is cleared on theme changes via clearCSSColorCache(),
10
+ * which each Stream Frame calls in its theme-change useEffect.
11
+ */
12
+ export declare function resolveCSSColor(ctx: CanvasRenderingContext2D, value: string | undefined): string | undefined;
13
+ /**
14
+ * Clear the per-canvas CSS variable cache. Called by Stream Frames
15
+ * when the theme changes so the next paint reads fresh computed values.
16
+ */
17
+ export declare function clearCSSColorCache(canvas: HTMLCanvasElement): void;
@@ -491,6 +491,10 @@ export interface StreamXYFrameProps<T = Record<string, any>> {
491
491
  export interface StreamXYFrameHandle<T = Record<string, any>> {
492
492
  push(datum: T): void;
493
493
  pushMany(data: T[]): void;
494
+ /** Remove data points by ID. Requires pointIdAccessor. */
495
+ remove(id: string | string[]): T[];
496
+ /** Update data points by ID in place. Requires pointIdAccessor. Returns previous values. */
497
+ update(id: string | string[], updater: (d: T) => T): T[];
494
498
  clear(): void;
495
499
  getData(): T[];
496
500
  getScales(): StreamScales | null;