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,3 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mock 2D canvas rendering context — structurally a `Partial<CanvasRenderingContext2D>`
|
|
3
|
+
* with method spies, plus a few extra stub fields. Typed as a loose stringy
|
|
4
|
+
* bag because vitest's `vi.fn()` return type doesn't line up with
|
|
5
|
+
* `CanvasRenderingContext2D`'s method signatures and tests inspect the spies
|
|
6
|
+
* directly via `ctx.fillRect.mock.calls` etc.
|
|
7
|
+
*/
|
|
8
|
+
export type CanvasContextMock = Record<string, unknown>;
|
|
1
9
|
/**
|
|
2
10
|
* Creates a mock 2D canvas rendering context with all commonly used
|
|
3
11
|
* methods stubbed as vi.fn() and properties set to sensible defaults.
|
|
@@ -5,7 +13,33 @@
|
|
|
5
13
|
* This is the single canonical canvas mock for the entire test suite.
|
|
6
14
|
* Import from "../../test-utils/canvasMock" (or appropriate relative path).
|
|
7
15
|
*/
|
|
8
|
-
export declare function createMockCanvasContext():
|
|
16
|
+
export declare function createMockCanvasContext(): CanvasContextMock;
|
|
17
|
+
/**
|
|
18
|
+
* Record style state at the moment each draw op fires.
|
|
19
|
+
*
|
|
20
|
+
* Counting `ctx.fill` / `ctx.stroke` calls is brittle — a refactor that
|
|
21
|
+
* batches two paths into one stroke changes the count without changing
|
|
22
|
+
* what's visible. This helper instead captures the style state (`fillStyle`,
|
|
23
|
+
* `strokeStyle`, `globalAlpha`, `lineWidth`) at each draw call, so tests
|
|
24
|
+
* can assert on *what was drawn with what appearance* rather than on how
|
|
25
|
+
* many primitives the renderer emitted to get there.
|
|
26
|
+
*
|
|
27
|
+
* Usage:
|
|
28
|
+
* const ctx = createMockCanvasContext()
|
|
29
|
+
* const ops = recordCanvasOps(ctx)
|
|
30
|
+
* someRenderer(ctx, nodes, ...)
|
|
31
|
+
* expect(ops.fillStyles).toEqual(["#e41a1c", "rgba(255,255,0,0.5)"])
|
|
32
|
+
*/
|
|
33
|
+
export interface CanvasOpLog {
|
|
34
|
+
fillStyles: string[];
|
|
35
|
+
strokeStyles: string[];
|
|
36
|
+
fillAlphas: number[];
|
|
37
|
+
strokeAlphas: number[];
|
|
38
|
+
/** `lineWidth` at the moment each stroke fired — useful for pulse /
|
|
39
|
+
* emphasis renderers that vary stroke weight by intensity. */
|
|
40
|
+
strokeLineWidths: number[];
|
|
41
|
+
}
|
|
42
|
+
export declare function recordCanvasOps(ctx: CanvasContextMock): CanvasOpLog;
|
|
9
43
|
/**
|
|
10
44
|
* Sets up the canvas getContext mock on HTMLCanvasElement.prototype,
|
|
11
45
|
* mocks requestAnimationFrame to execute callbacks synchronously,
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared sample datasets for ordinal HOC chart tests (BarChart,
|
|
3
|
+
* StackedBarChart, GroupedBarChart). Previously defined locally in each
|
|
4
|
+
* test file with slight variations; this module is the single source of
|
|
5
|
+
* truth so shape changes (new fields, accessor renames) flow through every
|
|
6
|
+
* consumer at once.
|
|
7
|
+
*/
|
|
8
|
+
export interface BarDatum {
|
|
9
|
+
category: string;
|
|
10
|
+
value: number;
|
|
11
|
+
}
|
|
12
|
+
/** 3-point baseline used by most BarChart rendering tests. */
|
|
13
|
+
export declare const BAR_SAMPLE: readonly BarDatum[];
|
|
14
|
+
/** Smaller 2-point variant for initial-render / update-on-change tests. */
|
|
15
|
+
export declare const BAR_INITIAL: readonly BarDatum[];
|
|
16
|
+
/** Extended 3-point variant for "data changed" rerender tests. */
|
|
17
|
+
export declare const BAR_EXTENDED: readonly BarDatum[];
|
|
18
|
+
export interface NamedCountDatum {
|
|
19
|
+
name: string;
|
|
20
|
+
count: number;
|
|
21
|
+
}
|
|
22
|
+
/** `{name, count}` shape for verifying `categoryAccessor` / `valueAccessor` overrides. */
|
|
23
|
+
export declare const NAMED_COUNT_DATA: readonly NamedCountDatum[];
|
|
24
|
+
export interface ColoredBarDatum {
|
|
25
|
+
category: string;
|
|
26
|
+
value: number;
|
|
27
|
+
type: string;
|
|
28
|
+
}
|
|
29
|
+
/** Used for `colorBy="type"` legend-behavior tests. */
|
|
30
|
+
export declare const BAR_COLORED: readonly ColoredBarDatum[];
|
|
31
|
+
export interface StackedBarDatum {
|
|
32
|
+
category: string;
|
|
33
|
+
product: string;
|
|
34
|
+
value: number;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Used by both StackedBarChart and GroupedBarChart tests — same shape, same
|
|
38
|
+
* values; the only difference is whether the consumer passes `stackBy` or
|
|
39
|
+
* `groupBy`. Two categories × two products so stacking/grouping behavior is
|
|
40
|
+
* observable from the scene.
|
|
41
|
+
*/
|
|
42
|
+
export declare const STACKED_SAMPLE: readonly StackedBarDatum[];
|
|
43
|
+
export interface GroupSeriesDatum {
|
|
44
|
+
group: string;
|
|
45
|
+
series: string;
|
|
46
|
+
count: number;
|
|
47
|
+
}
|
|
48
|
+
export declare const GROUP_SERIES_CUSTOM: readonly GroupSeriesDatum[];
|