semiotic 3.4.0 → 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 +16 -3
- 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 +1 -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 +2 -0
- 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 +24 -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 +4 -3
- 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 +4 -3
- package/dist/components/charts/ordinal/Histogram.d.ts +4 -3
- package/dist/components/charts/ordinal/LikertChart.d.ts +4 -3
- 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 +4 -3
- 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 +27 -23
- 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 +5 -4
- 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 +7 -6
- package/dist/components/charts/shared/types.d.ts +22 -13
- package/dist/components/charts/shared/useChartSetup.d.ts +7 -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/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 +20 -16
- package/dist/components/semiotic-themes.d.ts +2 -1
- package/dist/components/semiotic-xy.d.ts +2 -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 +5 -4
- 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 +32 -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 +2 -1
- package/dist/components/stream/DataSourceAdapter.d.ts +2 -1
- package/dist/components/stream/FocusRing.d.ts +1 -2
- package/dist/components/stream/GeoParticlePool.d.ts +2 -1
- package/dist/components/stream/GeoPipelineStore.d.ts +7 -6
- package/dist/components/stream/MarginalGraphics.d.ts +1 -2
- package/dist/components/stream/NetworkPipelineStore.d.ts +3 -2
- package/dist/components/stream/NetworkSVGOverlay.d.ts +4 -4
- package/dist/components/stream/OrdinalBrushOverlay.d.ts +1 -19
- package/dist/components/stream/OrdinalPipelineStore.d.ts +6 -5
- package/dist/components/stream/OrdinalSVGOverlay.d.ts +6 -5
- package/dist/components/stream/PipelineStore.d.ts +63 -28
- 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 +2 -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 +25 -18
- package/dist/components/stream/hoverUtils.d.ts +2 -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 +33 -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 +54 -22
- package/dist/components/stream/pipelineDecay.d.ts +2 -1
- package/dist/components/stream/pipelinePulse.d.ts +2 -1
- package/dist/components/stream/pipelineTransitions.d.ts +16 -4
- package/dist/components/stream/renderers/colorUtils.d.ts +20 -0
- package/dist/components/stream/types.d.ts +45 -8
- 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-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 +2 -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 +10 -2
- package/dist/xy.min.js +1 -1
- package/dist/xy.module.min.js +1 -1
- package/package.json +38 -31
- 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,3 +1,4 @@
|
|
|
1
|
+
import type { Datum } from "../shared/datumTypes";
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
import type { StreamXYFrameProps } from "../../stream/types";
|
|
3
4
|
import type { RealtimeFrameHandle } from "../../realtime/types";
|
|
@@ -43,7 +44,7 @@ export interface CenterlineStyle {
|
|
|
43
44
|
/**
|
|
44
45
|
* QuadrantChart component props
|
|
45
46
|
*/
|
|
46
|
-
export interface QuadrantChartProps<TDatum extends
|
|
47
|
+
export interface QuadrantChartProps<TDatum extends Datum = Datum> extends BaseChartProps, AxisConfig {
|
|
47
48
|
/** Array of data points */
|
|
48
49
|
data?: TDatum[];
|
|
49
50
|
/** Field name or function to access x values @default "x" */
|
|
@@ -89,7 +90,7 @@ export interface QuadrantChartProps<TDatum extends Record<string, any> = Record<
|
|
|
89
90
|
/** Legend position */
|
|
90
91
|
legendPosition?: LegendPosition;
|
|
91
92
|
/** Annotation objects */
|
|
92
|
-
annotations?:
|
|
93
|
+
annotations?: Datum[];
|
|
93
94
|
/** Additional StreamXYFrame props */
|
|
94
95
|
frameProps?: Partial<Omit<StreamXYFrameProps, "chartType" | "data" | "size">>;
|
|
95
96
|
}
|
|
@@ -115,6 +116,6 @@ export interface QuadrantChartProps<TDatum extends Record<string, any> = Record<
|
|
|
115
116
|
* ```
|
|
116
117
|
*/
|
|
117
118
|
export declare const QuadrantChart: {
|
|
118
|
-
<TDatum extends
|
|
119
|
+
<TDatum extends Datum = Datum>(props: QuadrantChartProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
|
|
119
120
|
displayName?: string;
|
|
120
121
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Datum } from "../shared/datumTypes";
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
import type { StreamXYFrameProps, MarginalGraphicsConfig } from "../../stream/types";
|
|
3
4
|
import type { RealtimeFrameHandle } from "../../realtime/types";
|
|
@@ -7,7 +8,7 @@ import type { LegendInteractionMode, LegendPosition } from "../shared/hooks";
|
|
|
7
8
|
/**
|
|
8
9
|
* Scatterplot component props
|
|
9
10
|
*/
|
|
10
|
-
export interface ScatterplotProps<TDatum extends
|
|
11
|
+
export interface ScatterplotProps<TDatum extends Datum = Datum> extends BaseChartProps, AxisConfig {
|
|
11
12
|
/** Array of data points. Each point should have x and y properties. */
|
|
12
13
|
data?: TDatum[];
|
|
13
14
|
/** Field name or function to access x values @default "x" */
|
|
@@ -43,7 +44,7 @@ export interface ScatterplotProps<TDatum extends Record<string, any> = Record<st
|
|
|
43
44
|
/** Legend position */
|
|
44
45
|
legendPosition?: LegendPosition;
|
|
45
46
|
/** Annotation objects to render on the chart */
|
|
46
|
-
annotations?:
|
|
47
|
+
annotations?: Datum[];
|
|
47
48
|
/** Additional StreamXYFrame props for advanced customization */
|
|
48
49
|
frameProps?: Partial<Omit<StreamXYFrameProps, "chartType" | "data" | "size">>;
|
|
49
50
|
}
|
|
@@ -60,6 +61,6 @@ export interface ScatterplotProps<TDatum extends Record<string, any> = Record<st
|
|
|
60
61
|
* ```
|
|
61
62
|
*/
|
|
62
63
|
export declare const Scatterplot: {
|
|
63
|
-
<TDatum extends
|
|
64
|
+
<TDatum extends Datum = Datum>(props: ScatterplotProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
|
|
64
65
|
displayName?: string;
|
|
65
66
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { Datum } from "../shared/datumTypes";
|
|
2
2
|
import type { BaseChartProps, ChartAccessor } from "../shared/types";
|
|
3
3
|
import { type TooltipProp } from "../../Tooltip/Tooltip";
|
|
4
|
-
export interface ScatterplotMatrixProps<TDatum extends
|
|
4
|
+
export interface ScatterplotMatrixProps<TDatum extends Datum = Datum> extends BaseChartProps {
|
|
5
5
|
/** Array of data objects */
|
|
6
6
|
data: TDatum[];
|
|
7
7
|
/** Array of field names to include in the matrix */
|
|
@@ -65,7 +65,7 @@ export interface ScatterplotMatrixProps<TDatum extends Record<string, any> = Rec
|
|
|
65
65
|
* />
|
|
66
66
|
* ```
|
|
67
67
|
*/
|
|
68
|
-
export declare function ScatterplotMatrix<TDatum extends
|
|
68
|
+
export declare function ScatterplotMatrix<TDatum extends Datum = Datum>(props: ScatterplotMatrixProps<TDatum>): import("react/jsx-runtime").JSX.Element;
|
|
69
69
|
export declare namespace ScatterplotMatrix {
|
|
70
70
|
var displayName: string;
|
|
71
71
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Datum } from "../shared/datumTypes";
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
import type { StreamXYFrameProps } from "../../stream/types";
|
|
3
4
|
import type { RealtimeFrameHandle } from "../../realtime/types";
|
|
@@ -7,7 +8,7 @@ import { type TooltipProp } from "../../Tooltip/Tooltip";
|
|
|
7
8
|
/**
|
|
8
9
|
* StackedAreaChart component props
|
|
9
10
|
*/
|
|
10
|
-
export interface StackedAreaChartProps<TDatum extends
|
|
11
|
+
export interface StackedAreaChartProps<TDatum extends Datum = Datum> extends BaseChartProps, AxisConfig {
|
|
11
12
|
/**
|
|
12
13
|
* Array of data points, grouped by category.
|
|
13
14
|
* @example
|
|
@@ -124,7 +125,7 @@ export interface StackedAreaChartProps<TDatum extends Record<string, any> = Reco
|
|
|
124
125
|
/**
|
|
125
126
|
* Annotation objects to render on the chart
|
|
126
127
|
*/
|
|
127
|
-
annotations?:
|
|
128
|
+
annotations?: Datum[];
|
|
128
129
|
/**
|
|
129
130
|
* Additional StreamXYFrame props for advanced customization
|
|
130
131
|
* For full control, consider using StreamXYFrame directly
|
|
@@ -157,6 +158,6 @@ export interface StackedAreaChartProps<TDatum extends Record<string, any> = Reco
|
|
|
157
158
|
* ```
|
|
158
159
|
*/
|
|
159
160
|
export declare const StackedAreaChart: {
|
|
160
|
-
<TDatum extends
|
|
161
|
+
<TDatum extends Datum = Datum>(props: StackedAreaChartProps<TDatum> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
|
|
161
162
|
displayName?: string;
|
|
162
163
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
1
2
|
/**
|
|
2
3
|
* Data transform helpers for common data shapes.
|
|
3
4
|
* Import from "semiotic/data"
|
|
@@ -6,7 +7,7 @@
|
|
|
6
7
|
* Bin continuous data into histogram-ready format.
|
|
7
8
|
* Returns array of { category, value } objects suitable for BarChart.
|
|
8
9
|
*/
|
|
9
|
-
export declare function bin<T extends
|
|
10
|
+
export declare function bin<T extends Datum>(data: T[], options: {
|
|
10
11
|
field: string;
|
|
11
12
|
bins?: number;
|
|
12
13
|
domain?: [number, number];
|
|
@@ -18,28 +19,28 @@ export declare function bin<T extends Record<string, any>>(data: T[], options: {
|
|
|
18
19
|
* Group and aggregate data.
|
|
19
20
|
* Returns array of { [groupBy]: string, value: number } objects.
|
|
20
21
|
*/
|
|
21
|
-
export declare function rollup<T extends
|
|
22
|
+
export declare function rollup<T extends Datum>(data: T[], options: {
|
|
22
23
|
groupBy: string;
|
|
23
24
|
value: string;
|
|
24
25
|
agg?: "sum" | "mean" | "count" | "min" | "max";
|
|
25
|
-
}):
|
|
26
|
+
}): Datum[];
|
|
26
27
|
/**
|
|
27
28
|
* Group flat rows into line-chart-ready nested format.
|
|
28
29
|
* Returns array of { id, coordinates } objects for LineChart with lineBy.
|
|
29
30
|
*/
|
|
30
|
-
export declare function groupBy<T extends
|
|
31
|
+
export declare function groupBy<T extends Datum>(data: T[], options: {
|
|
31
32
|
key: string;
|
|
32
33
|
fields?: string[];
|
|
33
34
|
}): {
|
|
34
35
|
id: string;
|
|
35
|
-
coordinates:
|
|
36
|
+
coordinates: Datum[];
|
|
36
37
|
}[];
|
|
37
38
|
/**
|
|
38
39
|
* Pivot wide data to long format.
|
|
39
40
|
* Converts column-per-variable to row-per-variable.
|
|
40
41
|
*/
|
|
41
|
-
export declare function pivot<T extends
|
|
42
|
+
export declare function pivot<T extends Datum>(data: T[], options: {
|
|
42
43
|
columns: string[];
|
|
43
44
|
nameField?: string;
|
|
44
45
|
valueField?: string;
|
|
45
|
-
}):
|
|
46
|
+
}): Datum[];
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { SerializedSelections } from "./selectionSerializer";
|
|
2
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
2
3
|
export interface ChartConfig {
|
|
3
4
|
/** Component name, e.g. "LineChart", "SankeyDiagram" */
|
|
4
5
|
component: string;
|
|
5
6
|
/** Serializable props only — functions and React elements stripped */
|
|
6
|
-
props:
|
|
7
|
+
props: Datum;
|
|
7
8
|
/** Config schema version */
|
|
8
9
|
version: string;
|
|
9
10
|
/** ISO 8601 timestamp */
|
|
@@ -18,10 +19,10 @@ export interface ToConfigOptions {
|
|
|
18
19
|
selections?: SerializedSelections;
|
|
19
20
|
}
|
|
20
21
|
export type CopyFormat = "json" | "jsx";
|
|
21
|
-
export declare function toConfig(componentName: string, props:
|
|
22
|
+
export declare function toConfig(componentName: string, props: Datum, options?: ToConfigOptions): ChartConfig;
|
|
22
23
|
export declare function fromConfig(config: ChartConfig): {
|
|
23
24
|
componentName: string;
|
|
24
|
-
props:
|
|
25
|
+
props: Datum;
|
|
25
26
|
};
|
|
26
27
|
export declare function toURL(config: ChartConfig): string;
|
|
27
28
|
export declare function fromURL(urlString: string): ChartConfig;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
1
2
|
/**
|
|
2
3
|
* Merge external data into GeoJSON features by joining on a key field.
|
|
3
4
|
*
|
|
@@ -12,7 +13,7 @@
|
|
|
12
13
|
* Cross-pollination: This pattern (key-based data join) could be extracted
|
|
13
14
|
* to a shared utility for any data merge operation in Semiotic.
|
|
14
15
|
*/
|
|
15
|
-
export declare function mergeData<T extends
|
|
16
|
+
export declare function mergeData<T extends Datum>(features: GeoJSON.Feature[], data: T[], options: {
|
|
16
17
|
featureKey: string;
|
|
17
18
|
dataKey: string;
|
|
18
19
|
}): GeoJSON.Feature[];
|
|
@@ -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,14 @@ 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[];
|
|
179
183
|
/** Returns the frame's resolved scales, or null if unavailable.
|
|
180
184
|
*
|
|
181
185
|
* The concrete scales object differs by frame type — XY charts
|
|
@@ -199,7 +203,7 @@ export interface RealtimeLayout {
|
|
|
199
203
|
timeAxis: "x" | "y";
|
|
200
204
|
}
|
|
201
205
|
export interface RealtimeAccessors {
|
|
202
|
-
time: (d:
|
|
203
|
-
value: (d:
|
|
204
|
-
category?: (d:
|
|
206
|
+
time: (d: Datum) => number;
|
|
207
|
+
value: (d: Datum) => number;
|
|
208
|
+
category?: (d: Datum) => string;
|
|
205
209
|
}
|
|
@@ -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,6 +15,7 @@ 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";
|
|
19
20
|
export type { LineChartProps } from "./charts/xy/LineChart";
|
|
20
21
|
export type { AreaChartProps } from "./charts/xy/AreaChart";
|
|
@@ -25,3 +26,4 @@ export type { BubbleChartProps } from "./charts/xy/BubbleChart";
|
|
|
25
26
|
export type { HeatmapProps } from "./charts/xy/Heatmap";
|
|
26
27
|
export type { QuadrantChartProps } from "./charts/xy/QuadrantChart";
|
|
27
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;
|
|
@@ -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,14 +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;
|
|
1
18
|
/** Apply accessibility flags to a resolved theme. Shared by ThemeStore and server themeResolver. */
|
|
2
19
|
export declare function applyThemeAccessibility(theme: SemioticTheme): SemioticTheme;
|
|
3
20
|
export interface SemioticTheme {
|
|
4
21
|
mode: "light" | "dark" | "auto";
|
|
5
22
|
colors: {
|
|
6
23
|
primary: string;
|
|
24
|
+
/** Secondary accent color. Falls back to `primary` when unset. */
|
|
25
|
+
secondary?: string;
|
|
7
26
|
categorical: string[];
|
|
8
27
|
sequential: string;
|
|
9
28
|
/** d3-scale-chromatic diverging scheme name, e.g. "RdBu", "PiYG" */
|
|
10
29
|
diverging?: string;
|
|
11
30
|
background: string;
|
|
31
|
+
/** Elevated surface fill (e.g. card/tooltip bg). Falls back to `background`. */
|
|
32
|
+
surface?: string;
|
|
12
33
|
text: string;
|
|
13
34
|
textSecondary: string;
|
|
14
35
|
grid: string;
|
|
@@ -20,6 +41,16 @@ export interface SemioticTheme {
|
|
|
20
41
|
selectionOpacity?: number;
|
|
21
42
|
/** Default annotation text/marker color. Falls back to `text` if unset. */
|
|
22
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;
|
|
23
54
|
};
|
|
24
55
|
typography: {
|
|
25
56
|
fontFamily: string;
|
|
@@ -61,7 +92,4 @@ export interface ThemeStoreState {
|
|
|
61
92
|
}
|
|
62
93
|
export declare const ThemeProvider: import("react").FC<{
|
|
63
94
|
children: React.ReactNode;
|
|
64
|
-
}>, useThemeSelector: <R>(selector: (state:
|
|
65
|
-
theme: SemioticTheme;
|
|
66
|
-
setTheme(theme: Partial<SemioticTheme> | "light" | "dark" | "high-contrast"): void;
|
|
67
|
-
}) => R) => R;
|
|
95
|
+
}>, useThemeSelector: <R>(selector: (state: ThemeStoreState) => R) => R;
|