semiotic 3.4.0 → 3.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/export/selectionSerializer.d.ts +1 -1
- 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 +25 -21
- 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 +4 -9
- package/dist/components/store/ThemeStore.d.ts +32 -4
- package/dist/components/store/TooltipStore.d.ts +6 -2
- package/dist/components/store/useSelection.d.ts +13 -9
- 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 +21 -15
- 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 +43 -24
- package/dist/components/stream/hoverUtils.d.ts +2 -1
- package/dist/components/stream/keyboardNav.d.ts +18 -6
- 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 +73 -47
- 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 +65 -33
- 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 +58 -17
- 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 -32
- 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,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
2
2
|
import type { StreamScales, MarginalGraphicsConfig } from "./types";
|
|
3
3
|
import type { AnnotationContext } from "../realtime/types";
|
|
4
4
|
import type { ReactNode } from "react";
|
|
@@ -38,8 +38,8 @@ interface SVGOverlayProps {
|
|
|
38
38
|
yLabel?: string;
|
|
39
39
|
/** Label for the right Y axis (dual-axis charts) */
|
|
40
40
|
yLabelRight?: string;
|
|
41
|
-
xFormat?: (d:
|
|
42
|
-
yFormat?: (d:
|
|
41
|
+
xFormat?: (d: number | Date | string, index?: number, allTicks?: number[]) => string | ReactNode;
|
|
42
|
+
yFormat?: (d: number | Date | string) => string | ReactNode;
|
|
43
43
|
showGrid?: boolean;
|
|
44
44
|
title?: string | ReactNode;
|
|
45
45
|
legend?: ReactNode | {
|
|
@@ -65,12 +65,12 @@ interface SVGOverlayProps {
|
|
|
65
65
|
marginalGraphics?: MarginalGraphicsConfig;
|
|
66
66
|
xValues?: number[];
|
|
67
67
|
yValues?: number[];
|
|
68
|
-
annotations?:
|
|
69
|
-
svgAnnotationRules?: (annotation:
|
|
68
|
+
annotations?: Datum[];
|
|
69
|
+
svgAnnotationRules?: (annotation: Datum, index: number, context: AnnotationContext) => ReactNode;
|
|
70
70
|
annotationFrame?: number;
|
|
71
71
|
xAccessor?: string;
|
|
72
72
|
yAccessor?: string;
|
|
73
|
-
annotationData?:
|
|
73
|
+
annotationData?: Datum[];
|
|
74
74
|
pointNodes?: {
|
|
75
75
|
pointId?: string;
|
|
76
76
|
x: number;
|
|
@@ -102,9 +102,9 @@ interface SVGUnderlayProps {
|
|
|
102
102
|
showAxes?: boolean;
|
|
103
103
|
axes?: AxisConfig[];
|
|
104
104
|
showGrid?: boolean;
|
|
105
|
-
xFormat?: (d:
|
|
106
|
-
yFormat?: (d:
|
|
105
|
+
xFormat?: (d: number | Date | string, index?: number, allTicks?: number[]) => string | ReactNode;
|
|
106
|
+
yFormat?: (d: number | Date | string) => string | ReactNode;
|
|
107
107
|
}
|
|
108
|
-
export declare function SVGUnderlay(props: SVGUnderlayProps):
|
|
109
|
-
export declare function SVGOverlay(props: SVGOverlayProps):
|
|
108
|
+
export declare function SVGUnderlay(props: SVGUnderlayProps): import("react/jsx-runtime").JSX.Element | null;
|
|
109
|
+
export declare function SVGOverlay(props: SVGOverlayProps): import("react/jsx-runtime").JSX.Element | null;
|
|
110
110
|
export {};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import type { SceneNode, LineSceneNode, AreaSceneNode, PointSceneNode, RectSceneNode, HeatcellSceneNode, Style, StreamScales, CurveType } from "./types";
|
|
2
|
-
|
|
3
|
-
export declare function
|
|
2
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
3
|
+
export declare function buildLineNode(data: Datum[], scales: StreamScales, xGet: (d: Datum) => number, yGet: (d: Datum) => number, style: Style, group?: string): LineSceneNode;
|
|
4
|
+
export declare function buildAreaNode(data: Datum[], scales: StreamScales, xGet: (d: Datum) => number, yGet: (d: Datum) => number, baselineY: number, style: Style, group?: string, y0Get?: (d: Datum) => number): AreaSceneNode;
|
|
4
5
|
/** Per-group-per-x stacked top values, keyed by group then x */
|
|
5
6
|
export type StackedTops = Map<string, Map<number, number>>;
|
|
6
7
|
export declare function buildStackedAreaNodes(groups: {
|
|
7
8
|
key: string;
|
|
8
|
-
data:
|
|
9
|
-
}[], scales: StreamScales, xGet: (d:
|
|
9
|
+
data: Datum[];
|
|
10
|
+
}[], scales: StreamScales, xGet: (d: Datum) => number, yGet: (d: Datum) => number, styleFn: (group: string, sampleDatum?: Datum) => Style, normalize?: boolean, curve?: CurveType): {
|
|
10
11
|
nodes: AreaSceneNode[];
|
|
11
12
|
stackedTops: StackedTops;
|
|
12
13
|
};
|
|
13
|
-
export declare function buildPointNode(datum:
|
|
14
|
+
export declare function buildPointNode(datum: Datum, scales: StreamScales, xGet: (d: Datum) => number, yGet: (d: Datum) => number, r: number, style: Style, pointId?: string): PointSceneNode | null;
|
|
14
15
|
export declare function buildRectNode(x: number, y: number, w: number, h: number, style: Style, datum: any, group?: string): RectSceneNode;
|
|
15
16
|
export declare function buildHeatcellNode(x: number, y: number, w: number, h: number, fill: string, datum: any, options?: {
|
|
16
17
|
value?: number;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
import type { StreamGeoFrameProps, StreamGeoFrameHandle } from "./geoTypes";
|
|
3
|
-
declare const StreamGeoFrame: React.ForwardRefExoticComponent<StreamGeoFrameProps<
|
|
4
|
+
declare const StreamGeoFrame: React.ForwardRefExoticComponent<StreamGeoFrameProps<Datum> & React.RefAttributes<StreamGeoFrameHandle>>;
|
|
4
5
|
export default StreamGeoFrame;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
import type { StreamNetworkFrameProps, StreamNetworkFrameHandle } from "./networkTypes";
|
|
3
|
-
declare const StreamNetworkFrame: React.ForwardRefExoticComponent<StreamNetworkFrameProps<
|
|
4
|
+
declare const StreamNetworkFrame: React.ForwardRefExoticComponent<StreamNetworkFrameProps<Datum> & React.RefAttributes<StreamNetworkFrameHandle>>;
|
|
4
5
|
export default StreamNetworkFrame;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
import type { StreamOrdinalFrameProps, StreamOrdinalFrameHandle } from "./ordinalTypes";
|
|
3
|
-
declare const StreamOrdinalFrame: React.ForwardRefExoticComponent<StreamOrdinalFrameProps<
|
|
4
|
+
declare const StreamOrdinalFrame: React.ForwardRefExoticComponent<StreamOrdinalFrameProps<Datum> & React.RefAttributes<StreamOrdinalFrameHandle<Datum>>>;
|
|
4
5
|
export default StreamOrdinalFrame;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
import type { StreamXYFrameProps, StreamXYFrameHandle } from "./types";
|
|
3
4
|
/**
|
|
@@ -17,5 +18,5 @@ import type { StreamXYFrameProps, StreamXYFrameHandle } from "./types";
|
|
|
17
18
|
* raw color without alpha — degrades gracefully.
|
|
18
19
|
*/
|
|
19
20
|
export declare function withAlpha(color: string, alphaHex: string): string;
|
|
20
|
-
declare const StreamXYFrame: React.ForwardRefExoticComponent<StreamXYFrameProps<
|
|
21
|
+
declare const StreamXYFrame: React.ForwardRefExoticComponent<StreamXYFrameProps<Datum> & React.RefAttributes<StreamXYFrameHandle<Datum>>>;
|
|
21
22
|
export default StreamXYFrame;
|
|
@@ -1,23 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* XYBrushOverlay — d3-brush SVG overlay for XY frames.
|
|
3
|
-
*
|
|
4
|
-
* Renders a transparent SVG positioned above the canvas. Supports x, y, and
|
|
5
|
-
* xy brush dimensions, bin snapping, and streaming brush tracking (shrinks/
|
|
6
|
-
* clears the brush as data scrolls past the selected range).
|
|
7
|
-
*
|
|
8
|
-
* Key design decisions:
|
|
9
|
-
* - d3-brush lifecycle depends on [width, height, dimension, snap, binSize, snapDuring]
|
|
10
|
-
* only — scales and binBoundaries are read from refs to avoid teardown mid-drag.
|
|
11
|
-
* - Data-driven snapping (binBoundaries) uses binary search to snap to actual bin
|
|
12
|
-
* edges. Falls back to uniform grid math (binSize) when no boundaries are provided.
|
|
13
|
-
* - Bin snapping applies on "end" events by default. Set snapDuring=true to also
|
|
14
|
-
* snap during drag (the "brush" event).
|
|
15
|
-
* - Streaming tracking guards against y-only dimension (no x-domain to track).
|
|
16
|
-
* - isProgrammaticMoveRef prevents re-entrant brush events from .move() calls.
|
|
17
|
-
*
|
|
18
|
-
* Consumed by: StreamXYFrame (rendered when brush prop is set).
|
|
19
|
-
*/
|
|
20
|
-
import * as React from "react";
|
|
21
1
|
import type { StreamScales } from "./types";
|
|
22
2
|
export interface XYBrushOverlayProps {
|
|
23
3
|
width: number;
|
|
@@ -44,4 +24,4 @@ export interface XYBrushOverlayProps {
|
|
|
44
24
|
snapDuring?: boolean;
|
|
45
25
|
streaming?: boolean;
|
|
46
26
|
}
|
|
47
|
-
export declare function XYBrushOverlay({ width, height, totalWidth, totalHeight, margin, dimension, scales, onBrush, binSize, snap, binBoundaries, snapDuring, streaming }: XYBrushOverlayProps):
|
|
27
|
+
export declare function XYBrushOverlay({ width, height, totalWidth, totalHeight, margin, dimension, scales, onBrush, binSize, snap, binBoundaries, snapDuring, streaming }: XYBrushOverlayProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Dev-mode helper that warns when user callbacks access properties that exist
|
|
3
|
-
* on `.data` but not on the RealtimeNode/RealtimeEdge wrapper.
|
|
4
|
-
*
|
|
5
|
-
* Common pitfall:
|
|
6
|
-
* nodeStyle={(d) => ({ fill: d.category })} // undefined!
|
|
7
|
-
* nodeStyle={(d) => ({ fill: d.data?.category })} // correct
|
|
8
|
-
*
|
|
9
|
-
* In production, this is a no-op passthrough.
|
|
10
|
-
*/
|
|
1
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
11
2
|
export declare function wrapWithDataHint<T extends {
|
|
12
|
-
data?:
|
|
3
|
+
data?: Datum;
|
|
13
4
|
}>(datum: T, callbackName: string): T;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
import type { GeoProjection, GeoPath, GeoPermissibleObjects } from "d3-geo";
|
|
3
|
-
import type {
|
|
3
|
+
import type { GradientLegendConfig, LegendGroup } from "../types/legendTypes";
|
|
4
|
+
import type { Style, DecayConfig, PulseConfig, TransitionConfig, StalenessConfig, SceneDatum, PointSceneNode, ThemeSemanticColors } from "./types";
|
|
4
5
|
import type { AnimateProp } from "./pipelineTransitionUtils";
|
|
5
6
|
import type { HoverAnnotationConfig, HoverData } from "../realtime/types";
|
|
6
7
|
import type { GeoParticleStyle } from "./GeoParticlePool";
|
|
8
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
7
9
|
export type ProjectionProp = GeoProjection | ProjectionName | ProjectionConfig;
|
|
8
10
|
export type ProjectionName = "mercator" | "equalEarth" | "albersUsa" | "orthographic" | "naturalEarth" | "equirectangular";
|
|
9
11
|
export interface ProjectionConfig {
|
|
@@ -21,8 +23,8 @@ export interface GraticuleConfig {
|
|
|
21
23
|
}
|
|
22
24
|
export interface DistanceCartogramConfig {
|
|
23
25
|
center: string;
|
|
24
|
-
centerAccessor?: string | ((d:
|
|
25
|
-
costAccessor: string | ((d:
|
|
26
|
+
centerAccessor?: string | ((d: Datum) => string);
|
|
27
|
+
costAccessor: string | ((d: Datum) => number);
|
|
26
28
|
strength?: number;
|
|
27
29
|
lineMode?: "straight" | "fractional";
|
|
28
30
|
}
|
|
@@ -37,7 +39,7 @@ export interface GeoAreaSceneNode {
|
|
|
37
39
|
/** Screen-space area in px² */
|
|
38
40
|
screenArea: number;
|
|
39
41
|
style: Style;
|
|
40
|
-
datum:
|
|
42
|
+
datum: SceneDatum;
|
|
41
43
|
group?: string;
|
|
42
44
|
interactive?: boolean;
|
|
43
45
|
/** Lazily-cached Path2D parsed from pathData (avoids re-parsing on every hit test) */
|
|
@@ -46,8 +48,15 @@ export interface GeoAreaSceneNode {
|
|
|
46
48
|
_pulseIntensity?: number;
|
|
47
49
|
_pulseColor?: string;
|
|
48
50
|
}
|
|
51
|
+
export interface GeoLineSceneNode {
|
|
52
|
+
type: "line";
|
|
53
|
+
path: [number, number][];
|
|
54
|
+
style: Style;
|
|
55
|
+
datum: SceneDatum;
|
|
56
|
+
group?: string;
|
|
57
|
+
}
|
|
49
58
|
/** Union of all scene node types that GeoFrame produces */
|
|
50
|
-
export type GeoSceneNode = GeoAreaSceneNode | PointSceneNode |
|
|
59
|
+
export type GeoSceneNode = GeoAreaSceneNode | PointSceneNode | GeoLineSceneNode;
|
|
51
60
|
export interface GeoScales {
|
|
52
61
|
projection: GeoProjection;
|
|
53
62
|
geoPath: GeoPath<any, GeoPermissibleObjects>;
|
|
@@ -59,18 +68,24 @@ export interface GeoPipelineConfig {
|
|
|
59
68
|
projectionExtent?: [[number, number], [number, number]];
|
|
60
69
|
/** Padding fraction for auto-fit projection. 0.1 = 10% inset from edges. @default 0 */
|
|
61
70
|
fitPadding?: number;
|
|
62
|
-
xAccessor?: string | ((d:
|
|
63
|
-
yAccessor?: string | ((d:
|
|
64
|
-
lineDataAccessor?: string | ((d:
|
|
71
|
+
xAccessor?: string | ((d: Datum) => number);
|
|
72
|
+
yAccessor?: string | ((d: Datum) => number);
|
|
73
|
+
lineDataAccessor?: string | ((d: Datum) => Datum[]);
|
|
65
74
|
lineType?: "geo" | "line";
|
|
66
75
|
/** Flow rendering style: "basic" (straight/great-circle), "offset" (bidirectional offset), "arc" (curved arcs) @default "basic" */
|
|
67
76
|
flowStyle?: "basic" | "offset" | "arc";
|
|
68
|
-
areaStyle?: Style | ((d:
|
|
69
|
-
pointStyle?: (d:
|
|
77
|
+
areaStyle?: Style | ((d: Datum) => Style);
|
|
78
|
+
pointStyle?: (d: Datum) => Style & {
|
|
70
79
|
r?: number;
|
|
71
80
|
};
|
|
72
|
-
lineStyle?: Style | ((d:
|
|
81
|
+
lineStyle?: Style | ((d: Datum, group?: string) => Style);
|
|
73
82
|
colorScheme?: string | string[];
|
|
83
|
+
/** Theme-resolved semantic role colors — default fallback before hardcoded hex. See `ThemeSemanticColors` in ./types. */
|
|
84
|
+
themeSemantic?: ThemeSemanticColors;
|
|
85
|
+
/** Theme sequential scheme name — fallback for ChoroplethMap when colorScheme is not set. */
|
|
86
|
+
themeSequential?: string;
|
|
87
|
+
/** Theme diverging scheme name — available for geo consumers that need midpoint encodings. */
|
|
88
|
+
themeDiverging?: string;
|
|
74
89
|
graticule?: boolean | GraticuleConfig;
|
|
75
90
|
projectionTransform?: DistanceCartogramConfig;
|
|
76
91
|
decay?: DecayConfig;
|
|
@@ -78,10 +93,10 @@ export interface GeoPipelineConfig {
|
|
|
78
93
|
transition?: TransitionConfig;
|
|
79
94
|
/** Whether to animate elements on first render */
|
|
80
95
|
introAnimation?: boolean;
|
|
81
|
-
annotations?:
|
|
82
|
-
pointIdAccessor?: string | ((d:
|
|
96
|
+
annotations?: Datum[];
|
|
97
|
+
pointIdAccessor?: string | ((d: Datum) => string);
|
|
83
98
|
}
|
|
84
|
-
export interface StreamGeoFrameProps<T =
|
|
99
|
+
export interface StreamGeoFrameProps<T = Datum> {
|
|
85
100
|
projection: ProjectionProp;
|
|
86
101
|
projectionExtent?: [[number, number], [number, number]];
|
|
87
102
|
/** Padding fraction for auto-fit projection. 0.1 = 10% inset from edges. @default 0 */
|
|
@@ -91,7 +106,7 @@ export interface StreamGeoFrameProps<T = Record<string, any>> {
|
|
|
91
106
|
lines?: T[];
|
|
92
107
|
xAccessor?: string | ((d: T) => number);
|
|
93
108
|
yAccessor?: string | ((d: T) => number);
|
|
94
|
-
lineDataAccessor?: string | ((d: T) =>
|
|
109
|
+
lineDataAccessor?: string | ((d: T) => Datum[]);
|
|
95
110
|
pointIdAccessor?: string | ((d: T) => string);
|
|
96
111
|
lineType?: "geo" | "line";
|
|
97
112
|
/** Flow rendering style: "basic" (straight/great-circle), "offset" (bidirectional offset), "arc" (curved arcs) @default "basic" */
|
|
@@ -134,18 +149,18 @@ export interface StreamGeoFrameProps<T = Record<string, any>> {
|
|
|
134
149
|
className?: string;
|
|
135
150
|
background?: string;
|
|
136
151
|
runtimeMode?: "bounded" | "streaming";
|
|
137
|
-
areaStyle?: Style | ((d:
|
|
138
|
-
pointStyle?: (d:
|
|
152
|
+
areaStyle?: Style | ((d: Datum) => Style);
|
|
153
|
+
pointStyle?: (d: Datum) => Style & {
|
|
139
154
|
r?: number;
|
|
140
155
|
};
|
|
141
|
-
lineStyle?: Style | ((d:
|
|
156
|
+
lineStyle?: Style | ((d: Datum, group?: string) => Style);
|
|
142
157
|
colorScheme?: string | string[];
|
|
143
158
|
enableHover?: boolean;
|
|
144
159
|
hoverAnnotation?: boolean | HoverAnnotationConfig;
|
|
145
160
|
tooltipContent?: (d: HoverData) => ReactNode;
|
|
146
161
|
customClickBehavior?: (d: HoverData | null) => void;
|
|
147
162
|
customHoverBehavior?: (d: HoverData | null) => void;
|
|
148
|
-
annotations?:
|
|
163
|
+
annotations?: Datum[];
|
|
149
164
|
decay?: DecayConfig;
|
|
150
165
|
pulse?: PulseConfig;
|
|
151
166
|
transition?: TransitionConfig;
|
|
@@ -157,7 +172,11 @@ export interface StreamGeoFrameProps<T = Record<string, any>> {
|
|
|
157
172
|
backgroundGraphics?: ReactNode;
|
|
158
173
|
foregroundGraphics?: ReactNode;
|
|
159
174
|
title?: string | ReactNode;
|
|
160
|
-
legend?:
|
|
175
|
+
legend?: ReactNode | {
|
|
176
|
+
legendGroups: LegendGroup[];
|
|
177
|
+
} | {
|
|
178
|
+
gradient: GradientLegendConfig;
|
|
179
|
+
};
|
|
161
180
|
legendPosition?: "right" | "left" | "top" | "bottom";
|
|
162
181
|
legendHoverBehavior?: (item: {
|
|
163
182
|
label: string;
|
|
@@ -176,10 +195,10 @@ export interface StreamGeoFrameProps<T = Record<string, any>> {
|
|
|
176
195
|
summary?: string;
|
|
177
196
|
}
|
|
178
197
|
export interface StreamGeoFrameHandle {
|
|
179
|
-
push(datum:
|
|
180
|
-
pushMany(data:
|
|
198
|
+
push(datum: Datum): void;
|
|
199
|
+
pushMany(data: Datum[]): void;
|
|
181
200
|
/** Remove points by ID. Requires pointIdAccessor. */
|
|
182
|
-
removePoint(id: string | string[]):
|
|
201
|
+
removePoint(id: string | string[]): Datum[];
|
|
183
202
|
clear(): void;
|
|
184
203
|
getProjection(): GeoProjection | null;
|
|
185
204
|
getGeoPath(): GeoPath<any, GeoPermissibleObjects> | null;
|
|
@@ -195,5 +214,5 @@ export interface StreamGeoFrameHandle {
|
|
|
195
214
|
/** Animate back to initial view */
|
|
196
215
|
resetZoom(): void;
|
|
197
216
|
/** Get current data points */
|
|
198
|
-
getData():
|
|
217
|
+
getData(): Datum[];
|
|
199
218
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
1
2
|
/**
|
|
2
3
|
* Shared hover data utilities for stream frames.
|
|
3
4
|
*
|
|
@@ -25,7 +26,7 @@ export interface HoverPointerCoords {
|
|
|
25
26
|
* this matches the historical behavior where all datum fields are
|
|
26
27
|
* accessible directly on the hover object (d.fieldName).
|
|
27
28
|
*/
|
|
28
|
-
export declare function spreadDatum(rawDatum: any):
|
|
29
|
+
export declare function spreadDatum(rawDatum: any): Datum;
|
|
29
30
|
/**
|
|
30
31
|
* Build a HoverData object from a raw datum and pixel coordinates.
|
|
31
32
|
* Spreads plain-object datum properties for backwards compatibility
|
|
@@ -10,10 +10,15 @@
|
|
|
10
10
|
* HoverData state that mouse hover does.
|
|
11
11
|
*/
|
|
12
12
|
import type { HoverData } from "../realtime/types";
|
|
13
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
14
|
+
import type { NetworkSceneEdge, NetworkSceneNode } from "./networkTypes";
|
|
15
|
+
import type { SceneNode } from "./types";
|
|
16
|
+
import type { OrdinalSceneNode } from "./ordinalTypes";
|
|
17
|
+
import type { GeoSceneNode } from "./geoTypes";
|
|
13
18
|
export interface NavPoint {
|
|
14
19
|
x: number;
|
|
15
20
|
y: number;
|
|
16
|
-
datum:
|
|
21
|
+
datum: Datum | null;
|
|
17
22
|
/** Shape hint for focus ring rendering */
|
|
18
23
|
shape?: "circle" | "rect" | "wedge";
|
|
19
24
|
/** Width of rect-shaped elements (bars, sankey nodes) */
|
|
@@ -73,18 +78,18 @@ export declare function nextGraphIndex(key: string, pos: NavPosition, graph: Nav
|
|
|
73
78
|
* Lines/areas carry a `group` field identifying the series.
|
|
74
79
|
* ArrowRight/Left = within series, ArrowUp/Down = switch series.
|
|
75
80
|
*/
|
|
76
|
-
export declare function extractXYNavPoints(scene:
|
|
81
|
+
export declare function extractXYNavPoints(scene: SceneNode[]): NavPoint[];
|
|
77
82
|
/**
|
|
78
83
|
* Extract navigable points from ordinal scene nodes.
|
|
79
84
|
* Bars use `node.group` (stack/group key) falling back to `datum.category`.
|
|
80
85
|
* ArrowRight/Left = across categories, ArrowUp/Down = within stacked segments.
|
|
81
86
|
*/
|
|
82
|
-
export declare function extractOrdinalNavPoints(scene:
|
|
87
|
+
export declare function extractOrdinalNavPoints(scene: OrdinalSceneNode[]): NavPoint[];
|
|
83
88
|
/**
|
|
84
89
|
* Extract navigable points from network scene nodes.
|
|
85
90
|
* Each node's group is its own id, enabling neighbor traversal via edges.
|
|
86
91
|
*/
|
|
87
|
-
export declare function extractNetworkNavPoints(scene:
|
|
92
|
+
export declare function extractNetworkNavPoints(scene: NetworkSceneNode[]): NavPoint[];
|
|
88
93
|
/**
|
|
89
94
|
* Network-specific navigation: spatial arrow keys + edge following.
|
|
90
95
|
*
|
|
@@ -94,14 +99,20 @@ export declare function extractNetworkNavPoints(scene: any[]): NavPoint[];
|
|
|
94
99
|
*
|
|
95
100
|
* Returns the flat index of the target node, -1 to clear, or null for unhandled keys.
|
|
96
101
|
*/
|
|
97
|
-
export declare function nextNetworkIndex(key: string, pos: NavPosition, graph: NavGraph, edges:
|
|
102
|
+
export declare function nextNetworkIndex(key: string, pos: NavPosition, graph: NavGraph, edges: EdgeLike[], neighborIndexRef: {
|
|
98
103
|
current: number;
|
|
99
104
|
}): number | null;
|
|
105
|
+
/** Collect neighbor node ids from edge list for a given node. */
|
|
106
|
+
type EdgeLike = NetworkSceneEdge | {
|
|
107
|
+
source?: unknown;
|
|
108
|
+
target?: unknown;
|
|
109
|
+
datum?: Datum | null;
|
|
110
|
+
};
|
|
100
111
|
/**
|
|
101
112
|
* Extract navigable points from geo scene nodes.
|
|
102
113
|
* Flat navigation only (no meaningful grouping for geo).
|
|
103
114
|
*/
|
|
104
|
-
export declare function extractGeoNavPoints(scene:
|
|
115
|
+
export declare function extractGeoNavPoints(scene: GeoSceneNode[]): NavPoint[];
|
|
105
116
|
/**
|
|
106
117
|
* Compute the next focus index given a key and current index.
|
|
107
118
|
* Returns -1 to clear focus. Returns null for unhandled keys.
|
|
@@ -113,3 +124,4 @@ export declare function nextIndex(key: string, current: number, total: number):
|
|
|
113
124
|
* Convert a NavPoint to HoverData for the tooltip system.
|
|
114
125
|
*/
|
|
115
126
|
export declare function navPointToHover(point: NavPoint): HoverData;
|
|
127
|
+
export {};
|
|
@@ -13,17 +13,18 @@
|
|
|
13
13
|
* Consumed by: hierarchyLayoutPlugin.ts (buildScene dispatcher)
|
|
14
14
|
*/
|
|
15
15
|
import type { NetworkPipelineConfig, NetworkSceneNode, NetworkSceneEdge, NetworkLabel, RealtimeNode, RealtimeEdge } from "../networkTypes";
|
|
16
|
-
|
|
16
|
+
import type { Style } from "../types";
|
|
17
|
+
export declare function buildTreeScene(nodes: RealtimeNode[], edges: RealtimeEdge[], config: NetworkPipelineConfig, size: [number, number], nodeStyleFn: (d: RealtimeNode) => Style, edgeStyleFn: (d: RealtimeEdge) => Style): {
|
|
17
18
|
sceneNodes: NetworkSceneNode[];
|
|
18
19
|
sceneEdges: NetworkSceneEdge[];
|
|
19
20
|
labels: NetworkLabel[];
|
|
20
21
|
};
|
|
21
|
-
export declare function buildRectScene(nodes: RealtimeNode[], config: NetworkPipelineConfig, size: [number, number], nodeStyleFn: (d:
|
|
22
|
+
export declare function buildRectScene(nodes: RealtimeNode[], config: NetworkPipelineConfig, size: [number, number], nodeStyleFn: (d: RealtimeNode) => Style): {
|
|
22
23
|
sceneNodes: NetworkSceneNode[];
|
|
23
24
|
sceneEdges: NetworkSceneEdge[];
|
|
24
25
|
labels: NetworkLabel[];
|
|
25
26
|
};
|
|
26
|
-
export declare function buildCircleScene(nodes: RealtimeNode[], config: NetworkPipelineConfig, size: [number, number], nodeStyleFn: (d:
|
|
27
|
+
export declare function buildCircleScene(nodes: RealtimeNode[], config: NetworkPipelineConfig, size: [number, number], nodeStyleFn: (d: RealtimeNode) => Style): {
|
|
27
28
|
sceneNodes: NetworkSceneNode[];
|
|
28
29
|
sceneEdges: NetworkSceneEdge[];
|
|
29
30
|
labels: NetworkLabel[];
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* Consumed by: hierarchyLayoutPlugin.ts, hierarchySceneBuilders.ts
|
|
8
8
|
*/
|
|
9
9
|
import type { NetworkPipelineConfig } from "../networkTypes";
|
|
10
|
+
import type { Datum } from "../../charts/shared/datumTypes";
|
|
10
11
|
/** Depth-based color palette shared across all hierarchy scene builders */
|
|
11
12
|
export declare const DEPTH_PALETTE: string[];
|
|
12
13
|
/**
|
|
@@ -19,7 +20,7 @@ export declare function parseColor(color: string): [number, number, number];
|
|
|
19
20
|
* Uses perceived luminance (ITU-R BT.601).
|
|
20
21
|
*/
|
|
21
22
|
export declare function contrastTextColor(bgColor: string): string;
|
|
22
|
-
export declare function resolveChildrenAccessor(accessor: string | ((d:
|
|
23
|
+
export declare function resolveChildrenAccessor(accessor: string | ((d: Datum) => any[]) | undefined): ((d: Datum) => any[]) | undefined;
|
|
23
24
|
export declare function resolveNodeId(d: any, config: NetworkPipelineConfig, index: number): string;
|
|
24
|
-
export declare function resolveLabelFn(nodeLabel: string | ((d:
|
|
25
|
-
export declare function resolveDefaultNodeSize(nodeSize: number | string | ((d:
|
|
25
|
+
export declare function resolveLabelFn(nodeLabel: string | ((d: Datum) => string) | undefined): ((d: Datum) => string) | null;
|
|
26
|
+
export declare function resolveDefaultNodeSize(nodeSize: number | string | ((d: Datum) => number) | undefined): number;
|