semiotic 3.3.1 → 3.4.1
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/CLAUDE.md +25 -6
- package/README.md +1 -1
- package/ai/dist/mcp-server.js +104 -9
- package/ai/schema.json +42 -1
- package/ai/system-prompt.md +4 -0
- package/dist/components/Annotation.d.ts +42 -2
- package/dist/components/CategoryColors.d.ts +1 -1
- package/dist/components/ChartGrid.d.ts +1 -1
- package/dist/components/ContextLayout.d.ts +1 -1
- package/dist/components/DataSummaryContext.d.ts +1 -1
- package/dist/components/DetailsPanel.d.ts +3 -2
- package/dist/components/Legend.d.ts +2 -3
- package/dist/components/LinkedCharts.d.ts +9 -1
- package/dist/components/ThemeProvider.d.ts +1 -1
- package/dist/components/Tooltip/FlippingTooltip.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +4 -3
- package/dist/components/charts/geo/ChoroplethMap.d.ts +4 -4
- package/dist/components/charts/geo/DistanceCartogram.d.ts +5 -4
- package/dist/components/charts/geo/FlowMap.d.ts +4 -4
- package/dist/components/charts/geo/ProportionalSymbolMap.d.ts +4 -3
- package/dist/components/charts/index.d.ts +3 -1
- package/dist/components/charts/network/ChordDiagram.d.ts +4 -3
- package/dist/components/charts/network/CirclePack.d.ts +3 -3
- package/dist/components/charts/network/ForceDirectedGraph.d.ts +3 -2
- package/dist/components/charts/network/OrbitDiagram.d.ts +6 -5
- package/dist/components/charts/network/SankeyDiagram.d.ts +4 -3
- package/dist/components/charts/network/TreeDiagram.d.ts +3 -3
- package/dist/components/charts/network/Treemap.d.ts +3 -3
- package/dist/components/charts/ordinal/BarChart.d.ts +30 -4
- package/dist/components/charts/ordinal/BoxPlot.d.ts +4 -3
- package/dist/components/charts/ordinal/DonutChart.d.ts +4 -3
- package/dist/components/charts/ordinal/DotPlot.d.ts +13 -4
- package/dist/components/charts/ordinal/FunnelChart.d.ts +4 -3
- package/dist/components/charts/ordinal/GaugeChart.d.ts +2 -1
- package/dist/components/charts/ordinal/GroupedBarChart.d.ts +6 -5
- package/dist/components/charts/ordinal/Histogram.d.ts +4 -3
- package/dist/components/charts/ordinal/LikertChart.d.ts +8 -4
- package/dist/components/charts/ordinal/PieChart.d.ts +4 -3
- package/dist/components/charts/ordinal/RidgelinePlot.d.ts +4 -3
- package/dist/components/charts/ordinal/StackedBarChart.d.ts +6 -5
- package/dist/components/charts/ordinal/SwarmPlot.d.ts +4 -3
- package/dist/components/charts/ordinal/SwimlaneChart.d.ts +4 -3
- package/dist/components/charts/ordinal/ViolinPlot.d.ts +4 -3
- package/dist/components/charts/realtime/RealtimeHeatmap.d.ts +7 -6
- package/dist/components/charts/realtime/RealtimeHistogram.d.ts +10 -7
- package/dist/components/charts/realtime/RealtimeLineChart.d.ts +9 -6
- package/dist/components/charts/realtime/RealtimeSwarmChart.d.ts +7 -6
- package/dist/components/charts/realtime/RealtimeWaterfallChart.d.ts +9 -6
- package/dist/components/charts/shared/ChartError.d.ts +1 -2
- package/dist/components/charts/shared/annotationResolvers.d.ts +4 -3
- package/dist/components/charts/shared/annotationRules.d.ts +2 -1
- package/dist/components/charts/shared/colorUtils.d.ts +4 -3
- package/dist/components/charts/shared/datumTypes.d.ts +20 -0
- package/dist/components/charts/shared/diagnoseConfig.d.ts +2 -7
- package/dist/components/charts/shared/formatUtils.d.ts +4 -2
- package/dist/components/charts/shared/hooks.d.ts +41 -24
- package/dist/components/charts/shared/legendUtils.d.ts +3 -2
- package/dist/components/charts/shared/mergeShapeStyle.d.ts +43 -0
- package/dist/components/charts/shared/networkUtils.d.ts +7 -6
- package/dist/components/charts/shared/selectionUtils.d.ts +14 -11
- package/dist/components/charts/shared/statisticalOverlays.d.ts +14 -26
- package/dist/components/charts/shared/statisticalOverlaysLazy.d.ts +2 -2
- package/dist/components/charts/shared/statsTooltip.d.ts +3 -2
- package/dist/components/charts/shared/tooltipUtils.d.ts +20 -7
- package/dist/components/charts/shared/types.d.ts +27 -19
- package/dist/components/charts/shared/useChartSetup.d.ts +15 -6
- package/dist/components/charts/shared/useLikertAggregation.d.ts +18 -7
- package/dist/components/charts/shared/useOrdinalStreaming.d.ts +3 -2
- package/dist/components/charts/shared/useResolvedSelection.d.ts +2 -0
- package/dist/components/charts/shared/useStreamingLegend.d.ts +2 -1
- package/dist/components/charts/shared/validateChartData.d.ts +2 -1
- package/dist/components/charts/shared/validateProps.d.ts +2 -8
- package/dist/components/charts/shared/withChartWrapper.d.ts +1 -1
- package/dist/components/charts/xy/AreaChart.d.ts +4 -3
- package/dist/components/charts/xy/BubbleChart.d.ts +4 -3
- package/dist/components/charts/xy/CandlestickChart.d.ts +47 -0
- package/dist/components/charts/xy/ConnectedScatterplot.d.ts +4 -3
- package/dist/components/charts/xy/Heatmap.d.ts +12 -7
- package/dist/components/charts/xy/LineChart.d.ts +4 -3
- package/dist/components/charts/xy/MinimapChart.d.ts +4 -4
- package/dist/components/charts/xy/MultiAxisLineChart.d.ts +5 -4
- package/dist/components/charts/xy/QuadrantChart.d.ts +4 -3
- package/dist/components/charts/xy/Scatterplot.d.ts +4 -3
- package/dist/components/charts/xy/ScatterplotMatrix.d.ts +3 -3
- package/dist/components/charts/xy/StackedAreaChart.d.ts +4 -3
- package/dist/components/data/transforms.d.ts +8 -7
- package/dist/components/export/chartConfig.d.ts +4 -3
- package/dist/components/geo/mergeData.d.ts +2 -1
- package/dist/components/realtime/BinAccumulator.d.ts +3 -2
- package/dist/components/realtime/renderers/types.d.ts +2 -1
- package/dist/components/realtime/renderers/waterfallRenderer.d.ts +2 -1
- package/dist/components/realtime/types.d.ts +32 -16
- package/dist/components/semiotic-geo.d.ts +4 -0
- package/dist/components/semiotic-network.d.ts +7 -0
- package/dist/components/semiotic-ordinal.d.ts +8 -0
- package/dist/components/semiotic-themes.d.ts +2 -1
- package/dist/components/semiotic-xy.d.ts +11 -0
- package/dist/components/semiotic.d.ts +3 -3
- package/dist/components/server/animatedGif.d.ts +4 -18
- package/dist/components/server/renderToStaticSVG.d.ts +6 -5
- package/dist/components/server/serverChartConfigs.d.ts +2 -10
- package/dist/components/server/staticAnnotations.d.ts +2 -1
- package/dist/components/server/staticLegend.d.ts +2 -1
- package/dist/components/store/ObservationStore.d.ts +4 -3
- package/dist/components/store/SelectionStore.d.ts +3 -8
- package/dist/components/store/ThemeStore.d.ts +34 -4
- package/dist/components/store/TooltipStore.d.ts +1 -1
- package/dist/components/store/useSelection.d.ts +6 -5
- package/dist/components/stream/AccessibleDataTable.d.ts +5 -5
- package/dist/components/stream/CanvasHitTester.d.ts +10 -4
- package/dist/components/stream/DataSourceAdapter.d.ts +19 -1
- package/dist/components/stream/FocusRing.d.ts +1 -2
- package/dist/components/stream/GeoCanvasHitTester.d.ts +1 -1
- package/dist/components/stream/GeoParticlePool.d.ts +2 -1
- package/dist/components/stream/GeoPipelineStore.d.ts +26 -7
- package/dist/components/stream/MarginalGraphics.d.ts +1 -2
- package/dist/components/stream/NetworkPipelineStore.d.ts +8 -2
- package/dist/components/stream/NetworkSVGOverlay.d.ts +4 -4
- package/dist/components/stream/OrdinalBrushOverlay.d.ts +1 -19
- package/dist/components/stream/OrdinalCanvasHitTester.d.ts +3 -1
- package/dist/components/stream/OrdinalPipelineStore.d.ts +44 -6
- package/dist/components/stream/OrdinalSVGOverlay.d.ts +6 -5
- package/dist/components/stream/ParticlePool.d.ts +4 -0
- package/dist/components/stream/PipelineStore.d.ts +80 -30
- package/dist/components/stream/SVGOverlay.d.ts +10 -10
- package/dist/components/stream/SceneGraph.d.ts +6 -5
- package/dist/components/stream/StreamGeoFrame.d.ts +2 -1
- package/dist/components/stream/StreamNetworkFrame.d.ts +2 -1
- package/dist/components/stream/StreamOrdinalFrame.d.ts +2 -1
- package/dist/components/stream/StreamXYFrame.d.ts +19 -1
- package/dist/components/stream/XYBrushOverlay.d.ts +1 -21
- package/dist/components/stream/devDataAccessWarning.d.ts +2 -11
- package/dist/components/stream/geoTypes.d.ts +32 -18
- package/dist/components/stream/hoverUtils.d.ts +14 -1
- package/dist/components/stream/layouts/hierarchySceneBuilders.d.ts +4 -3
- package/dist/components/stream/layouts/hierarchyUtils.d.ts +4 -3
- package/dist/components/stream/networkTypes.d.ts +51 -28
- package/dist/components/stream/ordinalSceneBuilders/barFunnelScene.d.ts +1 -1
- package/dist/components/stream/ordinalSceneBuilders/barScene.d.ts +2 -2
- package/dist/components/stream/ordinalSceneBuilders/connectorScene.d.ts +1 -1
- package/dist/components/stream/ordinalSceneBuilders/pointScene.d.ts +2 -2
- package/dist/components/stream/ordinalSceneBuilders/statisticalScene.d.ts +4 -4
- package/dist/components/stream/ordinalSceneBuilders/swimlaneScene.d.ts +1 -1
- package/dist/components/stream/ordinalSceneBuilders/timelineScene.d.ts +1 -1
- package/dist/components/stream/ordinalSceneBuilders/types.d.ts +9 -8
- package/dist/components/stream/ordinalTypes.d.ts +102 -29
- package/dist/components/stream/pipelineDecay.d.ts +2 -1
- package/dist/components/stream/pipelinePulse.d.ts +2 -1
- package/dist/components/stream/pipelineTransitionUtils.d.ts +21 -0
- package/dist/components/stream/pipelineTransitions.d.ts +16 -4
- package/dist/components/stream/quadtreeHitTest.d.ts +22 -0
- package/dist/components/stream/renderers/colorUtils.d.ts +20 -0
- package/dist/components/stream/renderers/resolveCSSColor.d.ts +23 -6
- package/dist/components/stream/types.d.ts +63 -8
- package/dist/components/stream/useFrame.d.ts +122 -0
- package/dist/components/stream/xySceneBuilders/areaScene.d.ts +3 -2
- package/dist/components/stream/xySceneBuilders/barScene.d.ts +2 -1
- package/dist/components/stream/xySceneBuilders/boundsScene.d.ts +2 -1
- package/dist/components/stream/xySceneBuilders/candlestickScene.d.ts +2 -1
- package/dist/components/stream/xySceneBuilders/emitPointNodes.d.ts +3 -2
- package/dist/components/stream/xySceneBuilders/heatmapScene.d.ts +2 -1
- package/dist/components/stream/xySceneBuilders/lineScene.d.ts +2 -1
- package/dist/components/stream/xySceneBuilders/mixedScene.d.ts +2 -1
- package/dist/components/stream/xySceneBuilders/pointScene.d.ts +2 -1
- package/dist/components/stream/xySceneBuilders/swarmScene.d.ts +2 -1
- package/dist/components/stream/xySceneBuilders/types.d.ts +35 -26
- package/dist/components/stream/xySceneBuilders/waterfallScene.d.ts +2 -1
- package/dist/components/types/marginType.d.ts +15 -0
- package/dist/geo.min.js +1 -1
- package/dist/geo.module.min.js +1 -1
- package/dist/network.min.js +1 -1
- package/dist/network.module.min.js +1 -1
- package/dist/ordinal.min.js +1 -1
- package/dist/ordinal.module.min.js +1 -1
- package/dist/realtime.min.js +1 -1
- package/dist/realtime.module.min.js +1 -1
- package/dist/semiotic-ai.min.js +1 -1
- package/dist/semiotic-ai.module.min.js +1 -1
- package/dist/semiotic-geo.d.ts +4 -0
- package/dist/semiotic-network.d.ts +7 -0
- package/dist/semiotic-ordinal.d.ts +8 -0
- package/dist/semiotic-statisticalOverlays-Ckd_jM8z.js +1 -0
- package/dist/semiotic-themes.d.ts +2 -1
- package/dist/semiotic-themes.min.js +1 -1
- package/dist/semiotic-themes.module.min.js +1 -1
- package/dist/semiotic-utils.min.js +1 -1
- package/dist/semiotic-utils.module.min.js +1 -1
- package/dist/semiotic-xy.d.ts +11 -0
- package/dist/semiotic.d.ts +3 -3
- package/dist/semiotic.min.js +1 -1
- package/dist/semiotic.module.min.js +1 -1
- package/dist/server.min.js +1 -1
- package/dist/server.module.min.js +1 -1
- package/dist/test-utils/canvasMock.d.ts +35 -1
- package/dist/test-utils/ordinalFixtures.d.ts +48 -0
- package/dist/xy.min.js +1 -1
- package/dist/xy.module.min.js +1 -1
- package/package.json +50 -42
- package/dist/components/types/annotationTypes.d.ts +0 -145
- package/dist/components/types/generalTypes.d.ts +0 -241
- package/dist/components/types/interactionTypes.d.ts +0 -72
- package/dist/components/types/networkTypes.d.ts +0 -174
- package/dist/components/types/ordinalTypes.d.ts +0 -112
- package/dist/semiotic-statisticalOverlays-DGX_WWc5.js +0 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
1
2
|
export interface Bin {
|
|
2
3
|
start: number;
|
|
3
4
|
end: number;
|
|
4
5
|
total: number;
|
|
5
6
|
categories: Map<string, number>;
|
|
6
7
|
}
|
|
7
|
-
export declare function computeBins(data: Iterable<
|
|
8
|
-
export declare function computeBinExtent(data: Iterable<
|
|
8
|
+
export declare function computeBins(data: Iterable<Datum>, getTime: (d: Datum) => number, getValue: (d: Datum) => number, binSize: number, getCategory?: (d: Datum) => string): Map<number, Bin>;
|
|
9
|
+
export declare function computeBinExtent(data: Iterable<Datum>, getTime: (d: Datum) => number, getValue: (d: Datum) => number, binSize: number, getCategory?: (d: Datum) => string): [number, number];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { RealtimeScales, RealtimeLayout, LineStyle, RealtimeAccessors, BarStyle, WaterfallStyle, SwarmStyle } from "../types";
|
|
2
|
+
import type { Datum } from "../../charts/shared/datumTypes";
|
|
2
3
|
export interface RendererOptions {
|
|
3
4
|
binSize?: number;
|
|
4
5
|
barColors?: Record<string, string>;
|
|
@@ -6,4 +7,4 @@ export interface RendererOptions {
|
|
|
6
7
|
waterfallStyle?: WaterfallStyle;
|
|
7
8
|
swarmStyle?: SwarmStyle;
|
|
8
9
|
}
|
|
9
|
-
export type RendererFn = (ctx: CanvasRenderingContext2D, data: Iterable<
|
|
10
|
+
export type RendererFn = (ctx: CanvasRenderingContext2D, data: Iterable<Datum>, scales: RealtimeScales, layout: RealtimeLayout, style: LineStyle, accessors: RealtimeAccessors, annotations?: Datum[], options?: RendererOptions) => void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { RendererFn } from "./types";
|
|
2
|
-
|
|
2
|
+
import type { Datum } from "../../charts/shared/datumTypes";
|
|
3
|
+
export declare function computeWaterfallExtent(data: Iterable<Datum>, getValue: (d: Datum) => number): [number, number];
|
|
3
4
|
export declare const waterfallRenderer: RendererFn;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
import type { ScaleLinear } from "d3-scale";
|
|
3
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
3
4
|
export type ArrowOfTime = "up" | "down" | "left" | "right";
|
|
4
5
|
export type WindowMode = "sliding" | "growing";
|
|
5
6
|
export type ThresholdType = "greater" | "lesser";
|
|
@@ -7,6 +8,7 @@ export interface LineStyle {
|
|
|
7
8
|
stroke?: string;
|
|
8
9
|
strokeWidth?: number;
|
|
9
10
|
strokeDasharray?: string;
|
|
11
|
+
opacity?: number;
|
|
10
12
|
}
|
|
11
13
|
/**
|
|
12
14
|
* Anchoring mode for streaming annotations.
|
|
@@ -33,7 +35,7 @@ export interface AnnotationContext {
|
|
|
33
35
|
yAccessor?: string;
|
|
34
36
|
width?: number;
|
|
35
37
|
height?: number;
|
|
36
|
-
data?:
|
|
38
|
+
data?: Datum[];
|
|
37
39
|
frameType?: "xy" | "ordinal" | "network";
|
|
38
40
|
/** Ordinal projection direction (only in ordinal frames) */
|
|
39
41
|
projection?: "vertical" | "horizontal";
|
|
@@ -107,12 +109,13 @@ export interface HoverData {
|
|
|
107
109
|
/** Whether the hovered element is a node or edge */
|
|
108
110
|
nodeOrEdge?: "node" | "edge";
|
|
109
111
|
/** GeoJSON feature properties (flattened for convenience) */
|
|
110
|
-
properties?:
|
|
112
|
+
properties?: Datum;
|
|
111
113
|
}
|
|
112
114
|
export interface BarStyle {
|
|
113
115
|
fill?: string;
|
|
114
116
|
stroke?: string;
|
|
115
117
|
strokeWidth?: number;
|
|
118
|
+
opacity?: number;
|
|
116
119
|
gap?: number;
|
|
117
120
|
}
|
|
118
121
|
export interface WaterfallStyle {
|
|
@@ -123,6 +126,7 @@ export interface WaterfallStyle {
|
|
|
123
126
|
gap?: number;
|
|
124
127
|
stroke?: string;
|
|
125
128
|
strokeWidth?: number;
|
|
129
|
+
opacity?: number;
|
|
126
130
|
}
|
|
127
131
|
export interface SwarmStyle {
|
|
128
132
|
radius?: number;
|
|
@@ -136,9 +140,9 @@ export interface RealtimeFrameProps {
|
|
|
136
140
|
arrowOfTime?: ArrowOfTime;
|
|
137
141
|
windowMode?: WindowMode;
|
|
138
142
|
windowSize?: number;
|
|
139
|
-
data?:
|
|
140
|
-
timeAccessor?: string | ((d:
|
|
141
|
-
valueAccessor?: string | ((d:
|
|
143
|
+
data?: Datum[];
|
|
144
|
+
timeAccessor?: string | ((d: Datum) => number);
|
|
145
|
+
valueAccessor?: string | ((d: Datum) => number);
|
|
142
146
|
timeExtent?: [number, number];
|
|
143
147
|
valueExtent?: [number, number];
|
|
144
148
|
extentPadding?: number;
|
|
@@ -151,14 +155,14 @@ export interface RealtimeFrameProps {
|
|
|
151
155
|
};
|
|
152
156
|
className?: string;
|
|
153
157
|
lineStyle?: LineStyle;
|
|
154
|
-
annotations?:
|
|
155
|
-
svgAnnotationRules?: (annotation:
|
|
158
|
+
annotations?: Datum[];
|
|
159
|
+
svgAnnotationRules?: (annotation: Datum, index: number, context: AnnotationContext) => ReactNode;
|
|
156
160
|
hoverAnnotation?: boolean | HoverAnnotationConfig;
|
|
157
161
|
tooltipContent?: (d: HoverData) => ReactNode;
|
|
158
162
|
customHoverBehavior?: (d: HoverData | null) => void;
|
|
159
163
|
showAxes?: boolean;
|
|
160
164
|
background?: string;
|
|
161
|
-
categoryAccessor?: string | ((d:
|
|
165
|
+
categoryAccessor?: string | ((d: Datum) => string);
|
|
162
166
|
binSize?: number;
|
|
163
167
|
barColors?: Record<string, string>;
|
|
164
168
|
barStyle?: BarStyle;
|
|
@@ -168,14 +172,26 @@ export interface RealtimeFrameProps {
|
|
|
168
172
|
tickFormatValue?: (value: number) => string;
|
|
169
173
|
}
|
|
170
174
|
export interface RealtimeFrameHandle {
|
|
171
|
-
push(point:
|
|
172
|
-
pushMany(points:
|
|
175
|
+
push(point: Datum): void;
|
|
176
|
+
pushMany(points: Datum[]): void;
|
|
173
177
|
/** Remove data by ID. Requires an ID accessor (pointIdAccessor or dataIdAccessor). */
|
|
174
|
-
remove(id: string | string[]):
|
|
178
|
+
remove(id: string | string[]): Datum[];
|
|
175
179
|
/** Update data by ID in place. Requires an ID accessor. Returns previous values. */
|
|
176
|
-
update(id: string | string[], updater: (d:
|
|
180
|
+
update(id: string | string[], updater: (d: Datum) => Datum): Datum[];
|
|
177
181
|
clear(): void;
|
|
178
|
-
getData():
|
|
182
|
+
getData(): Datum[];
|
|
183
|
+
/** Returns the frame's resolved scales, or null if unavailable.
|
|
184
|
+
*
|
|
185
|
+
* The concrete scales object differs by frame type — XY charts
|
|
186
|
+
* expose `{ x, y }`, ordinal charts expose `{ o, r, projection }`,
|
|
187
|
+
* network/geo don't have a meaningful scale concept and may not
|
|
188
|
+
* implement this method at all.
|
|
189
|
+
*
|
|
190
|
+
* Typed as `unknown` so the shared handle stays compatible across
|
|
191
|
+
* chart families. HOCs that want a narrower return type should
|
|
192
|
+
* export a chart-specific handle (e.g. `LikertChartHandle`) that
|
|
193
|
+
* extends this interface and narrows `getScales()`. */
|
|
194
|
+
getScales?(): unknown | null;
|
|
179
195
|
}
|
|
180
196
|
export interface RealtimeScales {
|
|
181
197
|
time: ScaleLinear<number, number>;
|
|
@@ -187,7 +203,7 @@ export interface RealtimeLayout {
|
|
|
187
203
|
timeAxis: "x" | "y";
|
|
188
204
|
}
|
|
189
205
|
export interface RealtimeAccessors {
|
|
190
|
-
time: (d:
|
|
191
|
-
value: (d:
|
|
192
|
-
category?: (d:
|
|
206
|
+
time: (d: Datum) => number;
|
|
207
|
+
value: (d: Datum) => number;
|
|
208
|
+
category?: (d: Datum) => string;
|
|
193
209
|
}
|
|
@@ -14,3 +14,7 @@ export { mergeData } from "./geo/mergeData";
|
|
|
14
14
|
export { resolveReferenceGeography } from "./geo/referenceGeography";
|
|
15
15
|
export type { ReferenceGeography } from "./geo/referenceGeography";
|
|
16
16
|
export type { AreasProp } from "./geo/useReferenceAreas";
|
|
17
|
+
export type { ChoroplethMapProps } from "./charts/geo/ChoroplethMap";
|
|
18
|
+
export type { ProportionalSymbolMapProps } from "./charts/geo/ProportionalSymbolMap";
|
|
19
|
+
export type { FlowMapProps } from "./charts/geo/FlowMap";
|
|
20
|
+
export type { DistanceCartogramProps } from "./charts/geo/DistanceCartogram";
|
|
@@ -12,3 +12,10 @@ export { Treemap } from "./charts/network/Treemap";
|
|
|
12
12
|
export { CirclePack } from "./charts/network/CirclePack";
|
|
13
13
|
export { OrbitDiagram } from "./charts/network/OrbitDiagram";
|
|
14
14
|
export type { StreamNetworkFrameProps, StreamNetworkFrameHandle, NetworkChartType, NetworkSceneNode, NetworkSceneEdge, NetworkLabel, ThresholdAlertConfig } from "./stream/networkTypes";
|
|
15
|
+
export type { ForceDirectedGraphProps } from "./charts/network/ForceDirectedGraph";
|
|
16
|
+
export type { SankeyDiagramProps } from "./charts/network/SankeyDiagram";
|
|
17
|
+
export type { ChordDiagramProps } from "./charts/network/ChordDiagram";
|
|
18
|
+
export type { TreeDiagramProps } from "./charts/network/TreeDiagram";
|
|
19
|
+
export type { TreemapProps } from "./charts/network/Treemap";
|
|
20
|
+
export type { CirclePackProps } from "./charts/network/CirclePack";
|
|
21
|
+
export type { OrbitDiagramProps } from "./charts/network/OrbitDiagram";
|
|
@@ -23,3 +23,11 @@ export { LikertChart } from "./charts/ordinal/LikertChart";
|
|
|
23
23
|
export { createHatchPattern } from "./charts/shared/hatchPattern";
|
|
24
24
|
export type { HatchPatternOptions } from "./charts/shared/hatchPattern";
|
|
25
25
|
export type { StreamOrdinalFrameProps, StreamOrdinalFrameHandle, OrdinalChartType, OrdinalScales, OrdinalSceneNode } from "./stream/ordinalTypes";
|
|
26
|
+
export type { BarChartProps } from "./charts/ordinal/BarChart";
|
|
27
|
+
export type { StackedBarChartProps } from "./charts/ordinal/StackedBarChart";
|
|
28
|
+
export type { GroupedBarChartProps } from "./charts/ordinal/GroupedBarChart";
|
|
29
|
+
export type { SwimlaneChartProps } from "./charts/ordinal/SwimlaneChart";
|
|
30
|
+
export type { PieChartProps } from "./charts/ordinal/PieChart";
|
|
31
|
+
export type { DonutChartProps } from "./charts/ordinal/DonutChart";
|
|
32
|
+
export type { FunnelChartProps } from "./charts/ordinal/FunnelChart";
|
|
33
|
+
export type { LikertChartProps } from "./charts/ordinal/LikertChart";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Datum } from "./charts/shared/datumTypes";
|
|
1
2
|
/**
|
|
2
3
|
* semiotic/themes — Named theme presets for Semiotic charts.
|
|
3
4
|
*
|
|
@@ -77,4 +78,4 @@ export declare function themeToCSS(theme: SemioticTheme, selector?: string): str
|
|
|
77
78
|
* // { semiotic: { bg: { $value: "#fffff8", $type: "color" }, ... } }
|
|
78
79
|
* ```
|
|
79
80
|
*/
|
|
80
|
-
export declare function themeToTokens(theme: SemioticTheme):
|
|
81
|
+
export declare function themeToTokens(theme: SemioticTheme): Datum;
|
|
@@ -15,4 +15,15 @@ export { ScatterplotMatrix } from "./charts/xy/ScatterplotMatrix";
|
|
|
15
15
|
export { MinimapChart } from "./charts/xy/MinimapChart";
|
|
16
16
|
export { QuadrantChart } from "./charts/xy/QuadrantChart";
|
|
17
17
|
export { MultiAxisLineChart } from "./charts/xy/MultiAxisLineChart";
|
|
18
|
+
export { CandlestickChart } from "./charts/xy/CandlestickChart";
|
|
18
19
|
export type { StreamXYFrameProps, StreamXYFrameHandle } from "./stream/types";
|
|
20
|
+
export type { LineChartProps } from "./charts/xy/LineChart";
|
|
21
|
+
export type { AreaChartProps } from "./charts/xy/AreaChart";
|
|
22
|
+
export type { StackedAreaChartProps } from "./charts/xy/StackedAreaChart";
|
|
23
|
+
export type { ScatterplotProps } from "./charts/xy/Scatterplot";
|
|
24
|
+
export type { ConnectedScatterplotProps } from "./charts/xy/ConnectedScatterplot";
|
|
25
|
+
export type { BubbleChartProps } from "./charts/xy/BubbleChart";
|
|
26
|
+
export type { HeatmapProps } from "./charts/xy/Heatmap";
|
|
27
|
+
export type { QuadrantChartProps } from "./charts/xy/QuadrantChart";
|
|
28
|
+
export type { MultiAxisLineChartProps } from "./charts/xy/MultiAxisLineChart";
|
|
29
|
+
export type { CandlestickChartProps } from "./charts/xy/CandlestickChart";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import StreamXYFrame from "./stream/StreamXYFrame";
|
|
2
2
|
import StreamOrdinalFrame from "./stream/StreamOrdinalFrame";
|
|
3
3
|
import StreamNetworkFrame from "./stream/StreamNetworkFrame";
|
|
4
|
-
import { Scatterplot, ConnectedScatterplot, LineChart, AreaChart, StackedAreaChart, Heatmap, BubbleChart, BarChart, StackedBarChart, LikertChart, SwarmPlot, BoxPlot, Histogram, ViolinPlot, RidgelinePlot, DotPlot, PieChart, DonutChart, GaugeChart, GroupedBarChart, FunnelChart, SwimlaneChart, ForceDirectedGraph, ChordDiagram, SankeyDiagram, TreeDiagram, Treemap, CirclePack, OrbitDiagram, ScatterplotMatrix, MinimapChart, QuadrantChart, MultiAxisLineChart } from "./charts";
|
|
4
|
+
import { Scatterplot, ConnectedScatterplot, LineChart, AreaChart, StackedAreaChart, Heatmap, BubbleChart, BarChart, StackedBarChart, LikertChart, SwarmPlot, BoxPlot, Histogram, ViolinPlot, RidgelinePlot, DotPlot, PieChart, DonutChart, GaugeChart, GroupedBarChart, FunnelChart, SwimlaneChart, ForceDirectedGraph, ChordDiagram, SankeyDiagram, TreeDiagram, Treemap, CirclePack, OrbitDiagram, ScatterplotMatrix, MinimapChart, QuadrantChart, MultiAxisLineChart, CandlestickChart } from "./charts";
|
|
5
5
|
import { LinkedCharts } from "./LinkedCharts";
|
|
6
6
|
import { ThemeProvider, useTheme } from "./ThemeProvider";
|
|
7
7
|
import { exportChart } from "./export/exportChart";
|
|
@@ -23,8 +23,8 @@ import { RealtimeTemporalHistogram, RealtimeHistogram } from "./charts/realtime/
|
|
|
23
23
|
import { RealtimeSwarmChart } from "./charts/realtime/RealtimeSwarmChart";
|
|
24
24
|
import { RealtimeWaterfallChart } from "./charts/realtime/RealtimeWaterfallChart";
|
|
25
25
|
import { RealtimeHeatmap } from "./charts/realtime/RealtimeHeatmap";
|
|
26
|
-
export { StreamXYFrame, StreamOrdinalFrame, StreamNetworkFrame, Scatterplot, ConnectedScatterplot, LineChart, AreaChart, StackedAreaChart, Heatmap, BubbleChart, BarChart, StackedBarChart, LikertChart, SwarmPlot, BoxPlot, Histogram, ViolinPlot, RidgelinePlot, DotPlot, ForceDirectedGraph, ChordDiagram, SankeyDiagram, TreeDiagram, PieChart, DonutChart, GaugeChart, FunnelChart, GroupedBarChart, SwimlaneChart, Treemap, CirclePack, OrbitDiagram, ScatterplotMatrix, MinimapChart, QuadrantChart, MultiAxisLineChart, LinkedCharts, ThemeProvider, useTheme, exportChart, toConfig, fromConfig, toURL, fromURL, copyConfig, configToJSX, serializeSelections, deserializeSelections, fromVegaLite, ChartErrorBoundary, ChartContainer, ChartGrid, CategoryColorProvider, useCategoryColors, ContextLayout, DetailsPanel, Tooltip, MultiLineTooltip, normalizeTooltip, RingBuffer, IncrementalExtent, RealtimeLineChart, RealtimeTemporalHistogram, RealtimeHistogram, RealtimeSwarmChart, RealtimeWaterfallChart, RealtimeHeatmap, createHatchPattern };
|
|
27
|
-
export { ScatterplotProps, ConnectedScatterplotProps, LineChartProps, AreaChartProps, StackedAreaChartProps, HeatmapProps, BubbleChartProps, BarChartProps, StackedBarChartProps, LikertChartProps, SwarmPlotProps, BoxPlotProps, HistogramProps, ViolinPlotProps, DotPlotProps, PieChartProps, DonutChartProps, GaugeChartProps, GaugeThreshold, FunnelChartProps, GroupedBarChartProps, SwimlaneChartProps, RidgelinePlotProps, OrbitDiagramProps, OrbitNode, ForceDirectedGraphProps, ChordDiagramProps, SankeyDiagramProps, TreeDiagramProps, TreemapProps, CirclePackProps, ScatterplotMatrixProps, MinimapChartProps, MinimapConfig, QuadrantChartProps, MultiAxisLineChartProps, MultiAxisSeriesConfig, QuadrantsConfig, QuadrantConfig, CenterlineStyle, BaseChartProps, AxisConfig, Accessor, ChartAccessor, ChartMode } from "./charts";
|
|
26
|
+
export { StreamXYFrame, StreamOrdinalFrame, StreamNetworkFrame, Scatterplot, ConnectedScatterplot, LineChart, AreaChart, StackedAreaChart, Heatmap, BubbleChart, BarChart, StackedBarChart, LikertChart, SwarmPlot, BoxPlot, Histogram, ViolinPlot, RidgelinePlot, DotPlot, ForceDirectedGraph, ChordDiagram, SankeyDiagram, TreeDiagram, PieChart, DonutChart, GaugeChart, FunnelChart, GroupedBarChart, SwimlaneChart, Treemap, CirclePack, OrbitDiagram, ScatterplotMatrix, MinimapChart, QuadrantChart, MultiAxisLineChart, CandlestickChart, LinkedCharts, ThemeProvider, useTheme, exportChart, toConfig, fromConfig, toURL, fromURL, copyConfig, configToJSX, serializeSelections, deserializeSelections, fromVegaLite, ChartErrorBoundary, ChartContainer, ChartGrid, CategoryColorProvider, useCategoryColors, ContextLayout, DetailsPanel, Tooltip, MultiLineTooltip, normalizeTooltip, RingBuffer, IncrementalExtent, RealtimeLineChart, RealtimeTemporalHistogram, RealtimeHistogram, RealtimeSwarmChart, RealtimeWaterfallChart, RealtimeHeatmap, createHatchPattern };
|
|
27
|
+
export { ScatterplotProps, ConnectedScatterplotProps, LineChartProps, AreaChartProps, StackedAreaChartProps, HeatmapProps, BubbleChartProps, BarChartProps, StackedBarChartProps, LikertChartProps, SwarmPlotProps, BoxPlotProps, HistogramProps, ViolinPlotProps, DotPlotProps, PieChartProps, DonutChartProps, GaugeChartProps, GaugeThreshold, FunnelChartProps, GroupedBarChartProps, SwimlaneChartProps, RidgelinePlotProps, OrbitDiagramProps, OrbitNode, ForceDirectedGraphProps, ChordDiagramProps, SankeyDiagramProps, TreeDiagramProps, TreemapProps, CirclePackProps, ScatterplotMatrixProps, MinimapChartProps, MinimapConfig, QuadrantChartProps, MultiAxisLineChartProps, MultiAxisSeriesConfig, CandlestickChartProps, QuadrantsConfig, QuadrantConfig, CenterlineStyle, BaseChartProps, AxisConfig, Accessor, ChartAccessor, ChartMode } from "./charts";
|
|
28
28
|
export type { StreamXYFrameProps, StreamXYFrameHandle, StreamChartType, RuntimeMode, SceneNode, Changeset, StreamScales, StreamLayout, CurveType, CanvasRendererFn } from "./stream/types";
|
|
29
29
|
export type { StreamRendererFn } from "./stream/renderers/types";
|
|
30
30
|
export type { StreamOrdinalFrameProps, StreamOrdinalFrameHandle, OrdinalChartType, OrdinalScales, OrdinalSceneNode } from "./stream/ordinalTypes";
|
|
@@ -1,18 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Animated GIF generation from semiotic chart data.
|
|
3
|
-
*
|
|
4
|
-
* Renders a sequence of chart frames by progressively feeding data into
|
|
5
|
-
* PipelineStore, optionally applying transition easing and decay effects,
|
|
6
|
-
* then encoding all frames as an animated GIF.
|
|
7
|
-
*
|
|
8
|
-
* Phases:
|
|
9
|
-
* 1. Sliding window — slice data into progressive windows, render each
|
|
10
|
-
* 2. Transition easing — interpolate enter/update between data windows
|
|
11
|
-
* 3. Decay/pulse — apply age-based opacity fading per frame
|
|
12
|
-
*
|
|
13
|
-
* Requires: sharp (SVG→PNG rasterization), gifenc (GIF encoding)
|
|
14
|
-
* Both are optional dependencies of semiotic.
|
|
15
|
-
*/
|
|
1
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
16
2
|
import type { SemioticTheme } from "../store/ThemeStore";
|
|
17
3
|
export interface AnimatedGifOptions {
|
|
18
4
|
/** Frames per second (default 12) */
|
|
@@ -56,7 +42,7 @@ export interface AnimatedGifFrameConfig {
|
|
|
56
42
|
* Generate SVG strings for each animation frame.
|
|
57
43
|
* This is the core logic shared between GIF export and client-side preview.
|
|
58
44
|
*/
|
|
59
|
-
export declare function generateFrameSVGs(chartType: string, data:
|
|
45
|
+
export declare function generateFrameSVGs(chartType: string, data: Datum[], props: Datum, options?: AnimatedGifOptions): string[];
|
|
60
46
|
/**
|
|
61
47
|
* Generate SVG strings from an array of data snapshots.
|
|
62
48
|
*
|
|
@@ -67,7 +53,7 @@ export declare function generateFrameSVGs(chartType: string, data: Record<string
|
|
|
67
53
|
*
|
|
68
54
|
* Each snapshot is passed directly to `renderChart()`.
|
|
69
55
|
*/
|
|
70
|
-
export declare function generateFrameSequence(component: string, snapshots:
|
|
56
|
+
export declare function generateFrameSequence(component: string, snapshots: Datum[], baseProps?: Datum): string[];
|
|
71
57
|
/**
|
|
72
58
|
* Render a chart as an animated GIF.
|
|
73
59
|
*
|
|
@@ -75,4 +61,4 @@ export declare function generateFrameSequence(component: string, snapshots: Reco
|
|
|
75
61
|
*
|
|
76
62
|
* @returns Buffer containing the animated GIF
|
|
77
63
|
*/
|
|
78
|
-
export declare function renderToAnimatedGif(chartType: string, data:
|
|
64
|
+
export declare function renderToAnimatedGif(chartType: string, data: Datum[], props: Datum, options?: AnimatedGifOptions): Promise<Buffer>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
1
2
|
/**
|
|
2
3
|
* Server-side rendering of Semiotic charts to standalone SVG strings.
|
|
3
4
|
*
|
|
@@ -24,7 +25,7 @@ interface ThemeAwareProps {
|
|
|
24
25
|
theme?: ThemeInput;
|
|
25
26
|
showLegend?: boolean;
|
|
26
27
|
showGrid?: boolean;
|
|
27
|
-
annotations?:
|
|
28
|
+
annotations?: Datum[];
|
|
28
29
|
title?: string | React.ReactNode;
|
|
29
30
|
description?: string;
|
|
30
31
|
background?: string;
|
|
@@ -39,7 +40,7 @@ export declare function renderOrdinalToStaticSVG(props: StreamOrdinalFrameProps
|
|
|
39
40
|
export declare function renderNetworkToStaticSVG(props: StreamNetworkFrameProps & ThemeAwareProps): string;
|
|
40
41
|
export declare function renderGeoToStaticSVG(props: StreamGeoFrameProps & ThemeAwareProps): string;
|
|
41
42
|
/** Chart component name to frame type + props mapping */
|
|
42
|
-
type ChartName = "LineChart" | "AreaChart" | "StackedAreaChart" | "Scatterplot" | "BubbleChart" | "ConnectedScatterplot" | "Heatmap" | "Sparkline" | "BarChart" | "StackedBarChart" | "GroupedBarChart" | "PieChart" | "DonutChart" | "SwimlaneChart" | "Histogram" | "BoxPlot" | "ViolinPlot" | "SwarmPlot" | "DotPlot" | "RidgelinePlot" | "FunnelChart" | "GaugeChart" | "ForceDirectedGraph" | "SankeyDiagram" | "ChordDiagram" | "TreeDiagram" | "Treemap" | "CirclePack" | "ChoroplethMap" | "ProportionalSymbolMap";
|
|
43
|
+
type ChartName = "LineChart" | "AreaChart" | "StackedAreaChart" | "Scatterplot" | "BubbleChart" | "ConnectedScatterplot" | "Heatmap" | "Sparkline" | "BarChart" | "StackedBarChart" | "GroupedBarChart" | "PieChart" | "DonutChart" | "SwimlaneChart" | "Histogram" | "BoxPlot" | "ViolinPlot" | "SwarmPlot" | "DotPlot" | "RidgelinePlot" | "LikertChart" | "FunnelChart" | "GaugeChart" | "ForceDirectedGraph" | "SankeyDiagram" | "ChordDiagram" | "TreeDiagram" | "Treemap" | "CirclePack" | "ChoroplethMap" | "ProportionalSymbolMap" | "FlowMap";
|
|
43
44
|
interface RenderChartOptions {
|
|
44
45
|
/** Output format — currently only "svg" is synchronous */
|
|
45
46
|
format?: "svg";
|
|
@@ -50,7 +51,7 @@ interface RenderChartOptions {
|
|
|
50
51
|
*
|
|
51
52
|
* This is the primary API for AI/MCP workflows.
|
|
52
53
|
*/
|
|
53
|
-
export declare function renderChart(component: ChartName, props:
|
|
54
|
+
export declare function renderChart(component: ChartName, props: Datum, _options?: RenderChartOptions): string;
|
|
54
55
|
export interface RenderToImageOptions {
|
|
55
56
|
/** Output format */
|
|
56
57
|
format?: "png" | "jpeg";
|
|
@@ -65,13 +66,13 @@ export interface RenderToImageOptions {
|
|
|
65
66
|
* Requires `sharp` as an optional peer dependency.
|
|
66
67
|
* Falls back to a descriptive error if sharp is not installed.
|
|
67
68
|
*/
|
|
68
|
-
export declare function renderToImage(frameTypeOrComponent: FrameType | ChartName, props:
|
|
69
|
+
export declare function renderToImage(frameTypeOrComponent: FrameType | ChartName, props: Datum, options?: RenderToImageOptions): Promise<Buffer>;
|
|
69
70
|
export interface DashboardChart {
|
|
70
71
|
/** Frame type or HOC component name */
|
|
71
72
|
component?: ChartName;
|
|
72
73
|
frameType?: FrameType;
|
|
73
74
|
/** Chart props (data, accessors, etc.) */
|
|
74
|
-
props:
|
|
75
|
+
props: Datum;
|
|
75
76
|
/** Span multiple columns (for emphasis="primary") */
|
|
76
77
|
colSpan?: number;
|
|
77
78
|
}
|
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
* Chart-specific prop mapping for renderChart().
|
|
3
|
-
*
|
|
4
|
-
* Each entry maps HOC-level props (categoryAccessor, valueAccessor, etc.)
|
|
5
|
-
* to frame-level props (oAccessor, rAccessor, etc.) for server rendering.
|
|
6
|
-
*
|
|
7
|
-
* Extracted from renderToStaticSVG.tsx's 400-line switch statement to make
|
|
8
|
-
* each chart type independently readable and testable.
|
|
9
|
-
*/
|
|
1
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
10
2
|
type FrameType = "xy" | "ordinal" | "network" | "geo";
|
|
11
3
|
interface ChartConfig {
|
|
12
4
|
frameType: FrameType;
|
|
13
5
|
/** Build frame props from HOC-level props */
|
|
14
|
-
buildProps: (data: any, colorBy: any, colorScheme: any, common:
|
|
6
|
+
buildProps: (data: any, colorBy: any, colorScheme: any, common: Datum, rest: Datum) => Datum;
|
|
15
7
|
}
|
|
16
8
|
export declare const CHART_CONFIGS: Record<string, ChartConfig>;
|
|
17
9
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
1
2
|
/**
|
|
2
3
|
* Static annotation rendering for server-side SVG.
|
|
3
4
|
*
|
|
@@ -22,7 +23,7 @@ interface AnnotationLayout {
|
|
|
22
23
|
height: number;
|
|
23
24
|
}
|
|
24
25
|
export interface StaticAnnotationConfig {
|
|
25
|
-
annotations:
|
|
26
|
+
annotations: Datum[];
|
|
26
27
|
scales: AnnotationScales;
|
|
27
28
|
layout: AnnotationLayout;
|
|
28
29
|
theme: SemioticTheme;
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import * as React from "react";
|
|
8
8
|
import type { SemioticTheme } from "../store/ThemeStore";
|
|
9
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
9
10
|
export interface StaticLegendConfig {
|
|
10
11
|
/** Category labels to show in legend */
|
|
11
12
|
categories: string[];
|
|
@@ -36,4 +37,4 @@ export declare function renderStaticLegend(config: StaticLegendConfig): React.Re
|
|
|
36
37
|
/**
|
|
37
38
|
* Extract unique categories from data using an accessor.
|
|
38
39
|
*/
|
|
39
|
-
export declare function extractCategories(data: any[], accessor: string | ((d:
|
|
40
|
+
export declare function extractCategories(data: any[], accessor: string | ((d: Datum) => string) | undefined): string[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
1
2
|
interface ObservationBase {
|
|
2
3
|
timestamp: number;
|
|
3
4
|
chartType: string;
|
|
@@ -5,7 +6,7 @@ interface ObservationBase {
|
|
|
5
6
|
}
|
|
6
7
|
export interface HoverObservation extends ObservationBase {
|
|
7
8
|
type: "hover";
|
|
8
|
-
datum:
|
|
9
|
+
datum: Datum;
|
|
9
10
|
x: number;
|
|
10
11
|
y: number;
|
|
11
12
|
}
|
|
@@ -26,7 +27,7 @@ export interface SelectionObservation extends ObservationBase {
|
|
|
26
27
|
type: "selection";
|
|
27
28
|
selection: {
|
|
28
29
|
name: string;
|
|
29
|
-
fields:
|
|
30
|
+
fields: Datum;
|
|
30
31
|
};
|
|
31
32
|
}
|
|
32
33
|
export interface SelectionEndObservation extends ObservationBase {
|
|
@@ -37,7 +38,7 @@ export interface SelectionEndObservation extends ObservationBase {
|
|
|
37
38
|
}
|
|
38
39
|
export interface ClickObservation extends ObservationBase {
|
|
39
40
|
type: "click";
|
|
40
|
-
datum:
|
|
41
|
+
datum: Datum;
|
|
41
42
|
x: number;
|
|
42
43
|
y: number;
|
|
43
44
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
1
2
|
export type ResolutionMode = "union" | "intersect" | "crossfilter";
|
|
2
3
|
export interface FieldConstraint {
|
|
3
4
|
type: "point";
|
|
@@ -25,13 +26,7 @@ export interface SelectionStoreState {
|
|
|
25
26
|
setResolution: (selectionName: string, mode: ResolutionMode) => void;
|
|
26
27
|
clearSelection: (selectionName: string) => void;
|
|
27
28
|
}
|
|
28
|
-
export declare function buildPredicate(selection: Selection, requestingClientId?: string): (d:
|
|
29
|
+
export declare function buildPredicate(selection: Selection, requestingClientId?: string): (d: Datum) => boolean;
|
|
29
30
|
export declare const SelectionProvider: import("react").FC<{
|
|
30
31
|
children: React.ReactNode;
|
|
31
|
-
}>, useSelectionSelector: <R>(selector: (state:
|
|
32
|
-
selections: Map<string, Selection>;
|
|
33
|
-
setClause(selectionName: string, clause: SelectionClause): void;
|
|
34
|
-
clearClause(selectionName: string, clientId: string): void;
|
|
35
|
-
setResolution(selectionName: string, mode: ResolutionMode): void;
|
|
36
|
-
clearSelection(selectionName: string): void;
|
|
37
|
-
}) => R) => R;
|
|
32
|
+
}>, useSelectionSelector: <R>(selector: (state: SelectionStoreState) => R) => R;
|
|
@@ -1,12 +1,35 @@
|
|
|
1
|
+
import type { ThemeSemanticColors } from "../stream/types";
|
|
2
|
+
/**
|
|
3
|
+
* Extract the semantic-role subset of a `SemioticTheme` into the flat
|
|
4
|
+
* `ThemeSemanticColors` shape that Stream Frames thread through to
|
|
5
|
+
* scene builders via `pipelineConfig.themeSemantic`.
|
|
6
|
+
*
|
|
7
|
+
* Centralizes two fallback rules documented on `SemioticTheme.colors`:
|
|
8
|
+
* - `secondary` falls back to `primary` when unset
|
|
9
|
+
* - `surface` falls back to `background` when unset
|
|
10
|
+
*
|
|
11
|
+
* Called from every Stream Frame (XY / Ordinal / Network / Geo) so role
|
|
12
|
+
* additions and fallback tweaks land in exactly one place.
|
|
13
|
+
*
|
|
14
|
+
* Returns `undefined` when no theme is available so scene builders can
|
|
15
|
+
* skip the theme-default path and use their hardcoded fallbacks.
|
|
16
|
+
*/
|
|
17
|
+
export declare function resolveThemeSemanticColors(theme: SemioticTheme | null | undefined): ThemeSemanticColors | undefined;
|
|
18
|
+
/** Apply accessibility flags to a resolved theme. Shared by ThemeStore and server themeResolver. */
|
|
19
|
+
export declare function applyThemeAccessibility(theme: SemioticTheme): SemioticTheme;
|
|
1
20
|
export interface SemioticTheme {
|
|
2
21
|
mode: "light" | "dark" | "auto";
|
|
3
22
|
colors: {
|
|
4
23
|
primary: string;
|
|
24
|
+
/** Secondary accent color. Falls back to `primary` when unset. */
|
|
25
|
+
secondary?: string;
|
|
5
26
|
categorical: string[];
|
|
6
27
|
sequential: string;
|
|
7
28
|
/** d3-scale-chromatic diverging scheme name, e.g. "RdBu", "PiYG" */
|
|
8
29
|
diverging?: string;
|
|
9
30
|
background: string;
|
|
31
|
+
/** Elevated surface fill (e.g. card/tooltip bg). Falls back to `background`. */
|
|
32
|
+
surface?: string;
|
|
10
33
|
text: string;
|
|
11
34
|
textSecondary: string;
|
|
12
35
|
grid: string;
|
|
@@ -18,6 +41,16 @@ export interface SemioticTheme {
|
|
|
18
41
|
selectionOpacity?: number;
|
|
19
42
|
/** Default annotation text/marker color. Falls back to `text` if unset. */
|
|
20
43
|
annotation?: string;
|
|
44
|
+
/** Positive outcomes, gains, "ok" states. */
|
|
45
|
+
success?: string;
|
|
46
|
+
/** Negative outcomes, losses, destructive actions. */
|
|
47
|
+
danger?: string;
|
|
48
|
+
/** Cautionary states, degraded but not failed. */
|
|
49
|
+
warning?: string;
|
|
50
|
+
/** Failed states, blocking errors. Typically more intense than `danger`. */
|
|
51
|
+
error?: string;
|
|
52
|
+
/** Neutral informational callouts, tips, help content. */
|
|
53
|
+
info?: string;
|
|
21
54
|
};
|
|
22
55
|
typography: {
|
|
23
56
|
fontFamily: string;
|
|
@@ -59,7 +92,4 @@ export interface ThemeStoreState {
|
|
|
59
92
|
}
|
|
60
93
|
export declare const ThemeProvider: import("react").FC<{
|
|
61
94
|
children: React.ReactNode;
|
|
62
|
-
}>, useThemeSelector: <R>(selector: (state:
|
|
63
|
-
theme: SemioticTheme;
|
|
64
|
-
setTheme(theme: Partial<SemioticTheme> | "light" | "dark" | "high-contrast"): void;
|
|
65
|
-
}) => R) => R;
|
|
95
|
+
}>, useThemeSelector: <R>(selector: (state: ThemeStoreState) => R) => R;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
1
2
|
export { useCrosshairPosition, setCrosshairPosition, clearCrosshairPosition } from "./LinkedCrosshairStore";
|
|
2
3
|
export interface UseSelectionOptions {
|
|
3
4
|
/** Name of the selection to participate in */
|
|
@@ -9,7 +10,7 @@ export interface UseSelectionOptions {
|
|
|
9
10
|
}
|
|
10
11
|
export interface UseSelectionResult {
|
|
11
12
|
/** Returns true if the datum matches the current selection */
|
|
12
|
-
predicate: (datum:
|
|
13
|
+
predicate: (datum: Datum) => boolean;
|
|
13
14
|
/** Whether any selection clause is currently active */
|
|
14
15
|
isActive: boolean;
|
|
15
16
|
/** Set a point selection (categorical values) */
|
|
@@ -30,9 +31,9 @@ export interface UseLinkedHoverOptions {
|
|
|
30
31
|
}
|
|
31
32
|
export interface UseLinkedHoverResult {
|
|
32
33
|
/** Call with a datum to set hover, or null to clear */
|
|
33
|
-
onHover: (datum:
|
|
34
|
+
onHover: (datum: Datum | null) => void;
|
|
34
35
|
/** Returns true if datum matches the hover selection */
|
|
35
|
-
predicate: (datum:
|
|
36
|
+
predicate: (datum: Datum) => boolean;
|
|
36
37
|
/** Whether any hover is active */
|
|
37
38
|
isActive: boolean;
|
|
38
39
|
}
|
|
@@ -53,7 +54,7 @@ export interface UseBrushSelectionResult {
|
|
|
53
54
|
end: (extent: any) => void;
|
|
54
55
|
};
|
|
55
56
|
/** Returns true if datum matches the brush selection */
|
|
56
|
-
predicate: (datum:
|
|
57
|
+
predicate: (datum: Datum) => boolean;
|
|
57
58
|
/** Whether any brush is active */
|
|
58
59
|
isActive: boolean;
|
|
59
60
|
/** Clear the brush */
|
|
@@ -64,4 +65,4 @@ export declare function useBrushSelection(options: UseBrushSelectionOptions): Us
|
|
|
64
65
|
* Returns the subset of `data` that matches the given selection.
|
|
65
66
|
* In crossfilter mode, pass the consumer's clientId so its own clause is excluded.
|
|
66
67
|
*/
|
|
67
|
-
export declare function useFilteredData<T extends
|
|
68
|
+
export declare function useFilteredData<T extends Datum>(data: T[], selectionName: string, clientId?: string): T[];
|
|
@@ -26,7 +26,7 @@ interface AccessibleDataTableProps {
|
|
|
26
26
|
* On activation (or when ChartContainer's dataSummary action is toggled),
|
|
27
27
|
* computes a statistical summary (.describe()-style) and shows 5 sample rows.
|
|
28
28
|
*/
|
|
29
|
-
export declare function AccessibleDataTable({ scene, chartType, tableId, chartTitle }: AccessibleDataTableProps):
|
|
29
|
+
export declare function AccessibleDataTable({ scene, chartType, tableId, chartTitle }: AccessibleDataTableProps): import("react/jsx-runtime").JSX.Element | null;
|
|
30
30
|
interface NetworkAccessibleDataTableProps {
|
|
31
31
|
nodes: Array<{
|
|
32
32
|
datum?: any;
|
|
@@ -48,25 +48,25 @@ interface NetworkAccessibleDataTableProps {
|
|
|
48
48
|
/**
|
|
49
49
|
* JIT accessible data summary for network charts.
|
|
50
50
|
*/
|
|
51
|
-
export declare function NetworkAccessibleDataTable({ nodes, edges, chartType, tableId, chartTitle }: NetworkAccessibleDataTableProps):
|
|
51
|
+
export declare function NetworkAccessibleDataTable({ nodes, edges, chartType, tableId, chartTitle }: NetworkAccessibleDataTableProps): import("react/jsx-runtime").JSX.Element | null;
|
|
52
52
|
/**
|
|
53
53
|
* Screen-reader-only summary note for the chart.
|
|
54
54
|
* Rendered as role="note" so assistive technology can discover it.
|
|
55
55
|
*/
|
|
56
56
|
export declare function ScreenReaderSummary({ summary }: {
|
|
57
57
|
summary?: string;
|
|
58
|
-
}):
|
|
58
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
59
59
|
/**
|
|
60
60
|
* Screen-reader-only skip link to jump past chart canvas to the data table.
|
|
61
61
|
* Only rendered when accessibleTable is enabled.
|
|
62
62
|
*/
|
|
63
63
|
export declare function SkipToTableLink({ tableId }: {
|
|
64
64
|
tableId: string;
|
|
65
|
-
}):
|
|
65
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
66
66
|
/**
|
|
67
67
|
* Visually-hidden aria-live region that mirrors tooltip text for screen readers.
|
|
68
68
|
*/
|
|
69
69
|
export declare function AriaLiveTooltip({ hoverPoint }: {
|
|
70
70
|
hoverPoint: any;
|
|
71
|
-
}):
|
|
71
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
72
72
|
export { SR_ONLY_STYLE };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { SceneNode, PointSceneNode } from "./types";
|
|
2
2
|
import type { RingBuffer } from "../realtime/RingBuffer";
|
|
3
3
|
import type { Quadtree } from "d3-quadtree";
|
|
4
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
4
5
|
export interface HitResult {
|
|
5
6
|
node: SceneNode;
|
|
6
7
|
datum: any;
|
|
@@ -13,11 +14,16 @@ export interface HitResult {
|
|
|
13
14
|
* Dispatches to type-specific hit testers for optimal performance.
|
|
14
15
|
*
|
|
15
16
|
* When a quadtree spatial index is provided (for scatter/bubble charts with
|
|
16
|
-
* many points), point hit testing
|
|
17
|
-
*
|
|
17
|
+
* many points), point hit testing routes through `findHitPointInQuadtree`,
|
|
18
|
+
* which visits every candidate within the widened search radius (using
|
|
19
|
+
* `maxPointRadius` so variable-size points like BubbleChart can't hide
|
|
20
|
+
* behind a nearer non-hit). The visit is authoritative — when it returns
|
|
21
|
+
* null, no point hit exists and the linear point loop is skipped.
|
|
22
|
+
*
|
|
23
|
+
* Non-point node types (line, rect, area, heatcell, candlestick) still
|
|
18
24
|
* use the linear scan.
|
|
19
25
|
*/
|
|
20
|
-
export declare function findNearestNode(scene: SceneNode[], px: number, py: number, maxDistance?: number, pointQuadtree?: Quadtree<PointSceneNode> | null): HitResult | null;
|
|
26
|
+
export declare function findNearestNode(scene: SceneNode[], px: number, py: number, maxDistance?: number, pointQuadtree?: Quadtree<PointSceneNode> | null, maxPointRadius?: number): HitResult | null;
|
|
21
27
|
/**
|
|
22
28
|
* Find all line/area nodes at a given X pixel coordinate.
|
|
23
29
|
* For each node, interpolates the Y value at px using the path data.
|
|
@@ -34,4 +40,4 @@ export declare function findAllNodesAtX(scene: SceneNode[], px: number, maxXDist
|
|
|
34
40
|
/**
|
|
35
41
|
* Binary search for nearest point by time value in a RingBuffer.
|
|
36
42
|
*/
|
|
37
|
-
export declare function findNearestIndex(buf: RingBuffer<
|
|
43
|
+
export declare function findNearestIndex(buf: RingBuffer<Datum>, targetTime: number, getTime: (d: Datum) => number): number;
|