semiotic 3.2.1 → 3.2.3

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 (50) hide show
  1. package/CLAUDE.md +47 -5
  2. package/ai/dist/mcp-server.js +31925 -528
  3. package/ai/schema.json +76 -1
  4. package/dist/components/Tooltip/Tooltip.d.ts +6 -1
  5. package/dist/components/charts/index.d.ts +2 -0
  6. package/dist/components/charts/ordinal/BarChart.d.ts +2 -0
  7. package/dist/components/charts/ordinal/GaugeChart.d.ts +55 -0
  8. package/dist/components/charts/ordinal/GroupedBarChart.d.ts +1 -0
  9. package/dist/components/charts/ordinal/StackedBarChart.d.ts +1 -0
  10. package/dist/components/charts/shared/hooks.d.ts +4 -1
  11. package/dist/components/charts/shared/types.d.ts +10 -5
  12. package/dist/components/charts/shared/useChartSetup.d.ts +2 -0
  13. package/dist/components/charts/xy/AreaChart.d.ts +17 -2
  14. package/dist/components/charts/xy/LineChart.d.ts +14 -3
  15. package/dist/components/semiotic-ordinal.d.ts +2 -0
  16. package/dist/components/semiotic-utils.d.ts +2 -1
  17. package/dist/components/semiotic.d.ts +3 -3
  18. package/dist/components/store/LinkedCrosshairStore.d.ts +6 -2
  19. package/dist/components/stream/CanvasHitTester.d.ts +13 -0
  20. package/dist/components/stream/OrdinalSVGOverlay.d.ts +1 -1
  21. package/dist/components/stream/PipelineStore.d.ts +17 -1
  22. package/dist/components/stream/SVGOverlay.d.ts +11 -5
  23. package/dist/components/stream/devDataAccessWarning.d.ts +13 -0
  24. package/dist/components/stream/hitTestUtils.d.ts +15 -0
  25. package/dist/components/stream/ordinalTypes.d.ts +7 -1
  26. package/dist/components/stream/types.d.ts +54 -5
  27. package/dist/components/stream/xySceneBuilders/mixedScene.d.ts +12 -0
  28. package/dist/components/stream/xySceneBuilders/types.d.ts +15 -0
  29. package/dist/geo.min.js +1 -1
  30. package/dist/geo.module.min.js +1 -1
  31. package/dist/network.min.js +1 -1
  32. package/dist/network.module.min.js +1 -1
  33. package/dist/ordinal.min.js +1 -1
  34. package/dist/ordinal.module.min.js +1 -1
  35. package/dist/realtime.min.js +1 -1
  36. package/dist/realtime.module.min.js +1 -1
  37. package/dist/semiotic-ai.min.js +1 -1
  38. package/dist/semiotic-ai.module.min.js +1 -1
  39. package/dist/semiotic-ordinal.d.ts +2 -0
  40. package/dist/semiotic-utils.d.ts +2 -1
  41. package/dist/semiotic-utils.min.js +1 -1
  42. package/dist/semiotic-utils.module.min.js +1 -1
  43. package/dist/semiotic.d.ts +3 -3
  44. package/dist/semiotic.min.js +1 -1
  45. package/dist/semiotic.module.min.js +1 -1
  46. package/dist/server.min.js +1 -1
  47. package/dist/server.module.min.js +1 -1
  48. package/dist/xy.min.js +1 -1
  49. package/dist/xy.module.min.js +1 -1
  50. package/package.json +12 -8
@@ -54,7 +54,7 @@ export interface MarginalGraphicsConfig {
54
54
  left?: MarginalConfig | MarginalType;
55
55
  right?: MarginalConfig | MarginalType;
56
56
  }
57
- export type StreamChartType = "line" | "area" | "stackedarea" | "scatter" | "bubble" | "heatmap" | "bar" | "swarm" | "waterfall" | "candlestick";
57
+ export type StreamChartType = "line" | "area" | "stackedarea" | "mixed" | "scatter" | "bubble" | "heatmap" | "bar" | "swarm" | "waterfall" | "candlestick";
58
58
  export type RuntimeMode = "bounded" | "streaming";
59
59
  export interface Style {
60
60
  stroke?: string;
@@ -86,6 +86,13 @@ export interface LineSceneNode {
86
86
  style: Style;
87
87
  datum: any;
88
88
  group?: string;
89
+ /** Horizontal gradient for the line stroke */
90
+ strokeGradient?: {
91
+ colorStops: Array<{
92
+ offset: number;
93
+ color: string;
94
+ }>;
95
+ };
89
96
  /** Curve interpolation type (default: linear / straight segments) */
90
97
  curve?: CurveType;
91
98
  /** Per-vertex decay opacities (oldest→newest = minOpacity→1.0). Set by PipelineStore.applyDecay. */
@@ -108,10 +115,22 @@ export interface AreaSceneNode {
108
115
  style: Style;
109
116
  datum: any;
110
117
  group?: string;
111
- /** Vertical gradient fill: opacity fades from topOpacity at the line to bottomOpacity at the baseline */
118
+ /** Gradient fill: opacity-based (topOpacity/bottomOpacity) or multi-color (colorStops) */
112
119
  fillGradient?: {
113
120
  topOpacity: number;
114
121
  bottomOpacity: number;
122
+ } | {
123
+ colorStops: Array<{
124
+ offset: number;
125
+ color: string;
126
+ }>;
127
+ };
128
+ /** Horizontal gradient for the line stroke */
129
+ strokeGradient?: {
130
+ colorStops: Array<{
131
+ offset: number;
132
+ color: string;
133
+ }>;
115
134
  };
116
135
  /** When false, skip hit testing (used for decorative bounds areas) */
117
136
  interactive?: boolean;
@@ -226,6 +245,8 @@ export interface CandlestickSceneNode {
226
245
  wickColor: string;
227
246
  wickWidth: number;
228
247
  isUp: boolean;
248
+ /** Range/dumbbell mode — no body, endpoint dots instead */
249
+ isRange?: boolean;
229
250
  datum: any;
230
251
  /** Optional style object (used during transition opacity animations) */
231
252
  style?: Style;
@@ -245,6 +266,8 @@ export interface CandlestickStyle {
245
266
  wickColor?: string;
246
267
  bodyWidth?: number;
247
268
  wickWidth?: number;
269
+ /** Single color for range/dumbbell mode (replaces up/down when no open/close provided) */
270
+ rangeColor?: string;
248
271
  }
249
272
  export interface Changeset<T = Record<string, any>> {
250
273
  inserts: T[];
@@ -252,6 +275,11 @@ export interface Changeset<T = Record<string, any>> {
252
275
  /** Hint: total dataset size when progressively chunking bounded data */
253
276
  totalSize?: number;
254
277
  }
278
+ /**
279
+ * Note: when xScaleType="time", the x scale is a d3.scaleTime at runtime
280
+ * (domain returns Date objects, ticks() returns Date[]). It is typed as
281
+ * ScaleLinear for compatibility — use valueOf() when comparing domain values.
282
+ */
255
283
  export interface StreamScales {
256
284
  x: ScaleLinear<number, number>;
257
285
  y: ScaleLinear<number, number>;
@@ -296,7 +324,21 @@ export interface StreamXYFrameProps<T = Record<string, any>> {
296
324
  gradientFill?: boolean | {
297
325
  topOpacity: number;
298
326
  bottomOpacity: number;
327
+ } | {
328
+ colorStops: Array<{
329
+ offset: number;
330
+ color: string;
331
+ }>;
332
+ };
333
+ /** Horizontal gradient for line strokes. Applied to all lines/area top-strokes. */
334
+ lineGradient?: {
335
+ colorStops: Array<{
336
+ offset: number;
337
+ color: string;
338
+ }>;
299
339
  };
340
+ /** Series names (matching lineBy/colorBy group keys) that render as filled areas in "mixed" chartType */
341
+ areaGroups?: string[];
300
342
  /**
301
343
  * Style for bounds/uncertainty areas.
302
344
  * If omitted, defaults to the line color at 0.2 opacity.
@@ -313,11 +355,13 @@ export interface StreamXYFrameProps<T = Record<string, any>> {
313
355
  windowMode?: WindowMode;
314
356
  windowSize?: number;
315
357
  timeAccessor?: string | ((d: T) => number);
316
- xScaleType?: "linear" | "log";
358
+ xScaleType?: "linear" | "log" | "time";
317
359
  yScaleType?: "linear" | "log";
318
360
  xExtent?: [number | undefined, number | undefined] | [number];
319
361
  yExtent?: [number | undefined, number | undefined] | [number];
320
362
  extentPadding?: number;
363
+ /** Pixel inset on scale ranges to prevent glyph clipping at chart edges. Default 0. */
364
+ scalePadding?: number;
321
365
  sizeRange?: [number, number];
322
366
  size?: [number, number];
323
367
  /** Auto-match width to container. Requires a sized parent element. */
@@ -355,14 +399,19 @@ export interface StreamXYFrameProps<T = Record<string, any>> {
355
399
  yLabel?: string;
356
400
  /** Label for the right Y axis (dual-axis charts) */
357
401
  yLabelRight?: string;
358
- xFormat?: (d: any, index?: number, allTicks?: number[]) => string;
359
- yFormat?: (d: any) => string;
402
+ xFormat?: (d: any, index?: number, allTicks?: number[]) => string | ReactNode;
403
+ yFormat?: (d: any) => string | ReactNode;
360
404
  tickFormatTime?: (value: number) => string;
361
405
  tickFormatValue?: (value: number) => string;
362
406
  hoverAnnotation?: boolean | HoverAnnotationConfig;
363
407
  tooltipContent?: (d: HoverData) => ReactNode;
364
408
  customHoverBehavior?: (d: HoverData | null) => void;
409
+ customClickBehavior?: (d: HoverData | null) => void;
365
410
  enableHover?: boolean;
411
+ /** Max pixel distance for hover/click hit testing. Default 30. */
412
+ hoverRadius?: number;
413
+ /** Tooltip mode: "single" (default) shows one datum, "multi" shows all series at the hovered X. */
414
+ tooltipMode?: "single" | "multi";
366
415
  /** Brush configuration — when provided, an SVG brush overlay is rendered */
367
416
  brush?: {
368
417
  /** Which dimension(s) to brush: "x", "y", or "xy" (default "xy") */
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Mixed scene builder — renders some series as areas and others as lines.
3
+ *
4
+ * Used when LineChart.fillArea is a string[] of series names.
5
+ * Area groups get filled area rendering, the rest get line rendering.
6
+ *
7
+ * Dependencies: SceneGraph (buildLineNode, buildAreaNode)
8
+ * Consumed by: PipelineStore.buildSceneNodes (chartType "mixed")
9
+ */
10
+ import type { SceneNode } from "../types";
11
+ import type { XYSceneContext } from "./types";
12
+ export declare function buildMixedScene(ctx: XYSceneContext, data: Record<string, any>[]): SceneNode[];
@@ -48,6 +48,18 @@ export interface XYSceneConfig {
48
48
  gradientFill?: boolean | {
49
49
  topOpacity?: number;
50
50
  bottomOpacity?: number;
51
+ } | {
52
+ colorStops: Array<{
53
+ offset: number;
54
+ color: string;
55
+ }>;
56
+ };
57
+ areaGroups?: Set<string>;
58
+ lineGradient?: {
59
+ colorStops: Array<{
60
+ offset: number;
61
+ color: string;
62
+ }>;
51
63
  };
52
64
  annotations?: Record<string, any>[];
53
65
  pointStyle?: (d: any) => Style & {
@@ -86,7 +98,10 @@ export interface XYSceneConfig {
86
98
  wickColor?: string;
87
99
  wickWidth?: number;
88
100
  bodyWidth?: number;
101
+ rangeColor?: string;
89
102
  };
103
+ /** True when candlestick is in range/dumbbell mode (no open/close accessors provided) */
104
+ candlestickRangeMode?: boolean;
90
105
  boundsStyle?: Style | ((d: any, group: string) => Style);
91
106
  lineStyle?: Style | ((d: any, group: string) => Style);
92
107
  areaStyle?: (d: any) => Style;