semiotic 3.0.0 → 3.1.0
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 +242 -29
- package/README.md +101 -66
- package/ai/cli.js +34 -21
- package/ai/dist/componentRegistry.js +2 -0
- package/ai/dist/mcp-server.js +54 -0
- package/ai/examples.md +433 -18
- package/ai/schema.json +134 -1
- package/ai/system-prompt.md +51 -10
- package/dist/{ChartGrid.d.ts → components/ChartGrid.d.ts} +9 -7
- package/dist/components/Legend.d.ts +9 -0
- package/dist/{LinkedCharts.d.ts → components/LinkedCharts.d.ts} +34 -1
- package/dist/{Tooltip → components/Tooltip}/Tooltip.d.ts +9 -2
- package/dist/components/charts/geo/ChoroplethMap.d.ts +53 -0
- package/dist/components/charts/geo/DistanceCartogram.d.ts +90 -0
- package/dist/components/charts/geo/FlowMap.d.ts +83 -0
- package/dist/components/charts/geo/ProportionalSymbolMap.d.ts +67 -0
- package/dist/components/charts/geo/index.d.ts +8 -0
- package/dist/{charts → components/charts}/index.d.ts +4 -0
- package/dist/{charts → components/charts}/network/ChordDiagram.d.ts +8 -5
- package/dist/{charts → components/charts}/network/CirclePack.d.ts +4 -2
- package/dist/{charts → components/charts}/network/ForceDirectedGraph.d.ts +10 -6
- package/dist/components/charts/network/OrbitDiagram.d.ts +79 -0
- package/dist/{charts → components/charts}/network/SankeyDiagram.d.ts +8 -5
- package/dist/{charts → components/charts}/network/TreeDiagram.d.ts +4 -2
- package/dist/{charts → components/charts}/network/Treemap.d.ts +4 -2
- package/dist/{charts → components/charts}/ordinal/BarChart.d.ts +9 -5
- package/dist/{charts → components/charts}/ordinal/BoxPlot.d.ts +9 -5
- package/dist/{charts → components/charts}/ordinal/DonutChart.d.ts +9 -5
- package/dist/{charts → components/charts}/ordinal/DotPlot.d.ts +9 -5
- package/dist/{charts → components/charts}/ordinal/GroupedBarChart.d.ts +9 -5
- package/dist/{charts → components/charts}/ordinal/Histogram.d.ts +8 -5
- package/dist/{charts → components/charts}/ordinal/PieChart.d.ts +9 -5
- package/dist/{charts → components/charts}/ordinal/RidgelinePlot.d.ts +2 -0
- package/dist/{charts → components/charts}/ordinal/StackedBarChart.d.ts +9 -5
- package/dist/{charts → components/charts}/ordinal/SwarmPlot.d.ts +9 -5
- package/dist/{charts → components/charts}/ordinal/ViolinPlot.d.ts +8 -5
- package/dist/{charts → components/charts}/realtime/RealtimeHeatmap.d.ts +24 -6
- package/dist/{charts → components/charts}/realtime/RealtimeHistogram.d.ts +28 -7
- package/dist/{charts → components/charts}/realtime/RealtimeLineChart.d.ts +23 -5
- package/dist/{charts → components/charts}/realtime/RealtimeSwarmChart.d.ts +24 -6
- package/dist/{charts → components/charts}/realtime/RealtimeWaterfallChart.d.ts +23 -5
- package/dist/{charts → components/charts}/shared/colorUtils.d.ts +5 -0
- package/dist/components/charts/shared/diagnoseConfig.d.ts +23 -0
- package/dist/{charts → components/charts}/shared/hooks.d.ts +36 -2
- package/dist/{charts → components/charts}/shared/legendUtils.d.ts +2 -3
- package/dist/{charts → components/charts}/shared/statisticalOverlays.d.ts +1 -2
- package/dist/components/charts/shared/statisticalOverlaysLazy.d.ts +10 -0
- package/dist/components/charts/shared/stringDistance.d.ts +11 -0
- package/dist/{charts → components/charts}/shared/tooltipUtils.d.ts +2 -2
- package/dist/{charts → components/charts}/shared/types.d.ts +16 -4
- package/dist/components/charts/shared/useChartSetup.d.ts +112 -0
- package/dist/components/charts/shared/useStreamingLegend.d.ts +65 -0
- package/dist/{charts → components/charts}/shared/withChartWrapper.d.ts +10 -0
- package/dist/{charts → components/charts}/xy/AreaChart.d.ts +18 -5
- package/dist/{charts → components/charts}/xy/BubbleChart.d.ts +18 -5
- package/dist/{charts → components/charts}/xy/ConnectedScatterplot.d.ts +10 -6
- package/dist/{charts → components/charts}/xy/Heatmap.d.ts +24 -5
- package/dist/{charts → components/charts}/xy/LineChart.d.ts +47 -5
- package/dist/{charts → components/charts}/xy/MinimapChart.d.ts +3 -0
- package/dist/components/charts/xy/QuadrantChart.d.ts +120 -0
- package/dist/{charts → components/charts}/xy/Scatterplot.d.ts +11 -5
- package/dist/{charts → components/charts}/xy/StackedAreaChart.d.ts +18 -5
- package/dist/{export → components/export}/exportChart.d.ts +6 -1
- package/dist/components/geo/mergeData.d.ts +18 -0
- package/dist/components/geo/referenceGeography.d.ts +10 -0
- package/dist/components/geo/useReferenceAreas.d.ts +13 -0
- package/dist/{realtime → components/realtime}/RingBuffer.d.ts +1 -0
- package/dist/{realtime → components/realtime}/types.d.ts +17 -0
- package/dist/components/semiotic-ai.d.ts +61 -0
- package/dist/components/semiotic-data.d.ts +8 -0
- package/dist/components/semiotic-geo.d.ts +16 -0
- package/dist/components/semiotic-network.d.ts +14 -0
- package/dist/components/semiotic-ordinal.d.ts +18 -0
- package/dist/components/semiotic-realtime.d.ts +22 -0
- package/dist/components/semiotic-server.d.ts +1 -0
- package/dist/components/semiotic-xy.d.ts +17 -0
- package/dist/components/semiotic.d.ts +57 -0
- package/dist/{server → components/server}/renderToStaticSVG.d.ts +11 -2
- package/dist/components/stream/AccessibleDataTable.d.ts +50 -0
- package/dist/{stream → components/stream}/CanvasHitTester.d.ts +8 -2
- package/dist/components/stream/DataSourceAdapter.d.ts +64 -0
- package/dist/components/stream/GeoCanvasHitTester.d.ts +19 -0
- package/dist/components/stream/GeoParticlePool.d.ts +46 -0
- package/dist/components/stream/GeoPipelineStore.d.ts +81 -0
- package/dist/components/stream/GeoTileRenderer.d.ts +31 -0
- package/dist/{stream → components/stream}/NetworkPipelineStore.d.ts +16 -4
- package/dist/{stream → components/stream}/NetworkSVGOverlay.d.ts +24 -1
- package/dist/{stream → components/stream}/OrdinalPipelineStore.d.ts +8 -4
- package/dist/{stream → components/stream}/OrdinalSVGOverlay.d.ts +31 -1
- package/dist/{stream → components/stream}/PipelineStore.d.ts +64 -5
- package/dist/components/stream/SVGOverlay.d.ts +98 -0
- package/dist/{stream → components/stream}/SceneGraph.d.ts +7 -3
- package/dist/components/stream/SceneToSVG.d.ts +22 -0
- package/dist/components/stream/StreamGeoFrame.d.ts +4 -0
- package/dist/{stream → components/stream}/accessorUtils.d.ts +1 -0
- package/dist/components/stream/canvasSetup.d.ts +26 -0
- package/dist/components/stream/geoTypes.d.ts +186 -0
- package/dist/components/stream/hitTestUtils.d.ts +23 -0
- package/dist/components/stream/layouts/forceLayoutPlugin.d.ts +2 -0
- package/dist/{stream → components/stream}/layouts/index.d.ts +2 -1
- package/dist/components/stream/layouts/orbitLayoutPlugin.d.ts +2 -0
- package/dist/components/stream/legendRenderer.d.ts +33 -0
- package/dist/{stream → components/stream}/networkTypes.d.ts +59 -3
- package/dist/{stream → components/stream}/ordinalTypes.d.ts +26 -10
- package/dist/components/stream/pipelineTransitionUtils.d.ts +42 -0
- package/dist/components/stream/renderers/areaCanvasRenderer.d.ts +2 -0
- package/dist/components/stream/renderers/geoCanvasRenderer.d.ts +9 -0
- package/dist/{stream → components/stream}/renderers/heatmapCanvasRenderer.d.ts +2 -1
- package/dist/{stream → components/stream}/renderers/lineCanvasRenderer.d.ts +1 -0
- package/dist/components/stream/renderers/renderPulse.d.ts +50 -0
- package/dist/{stream → components/stream}/types.d.ts +89 -3
- package/dist/components/stream/useStalenessCheck.d.ts +16 -0
- package/dist/components/types/legendTypes.d.ts +49 -0
- package/dist/geo.min.js +1 -0
- package/dist/geo.module.min.js +1 -0
- 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.d.ts +3 -0
- package/dist/semiotic-ai.min.js +1 -1
- package/dist/semiotic-ai.module.min.js +1 -1
- package/dist/semiotic-data.d.ts +1 -0
- package/dist/semiotic-data.min.js +1 -1
- package/dist/semiotic-data.module.min.js +1 -1
- package/dist/semiotic-geo.d.ts +16 -0
- package/dist/semiotic-network.d.ts +1 -0
- package/dist/semiotic-ordinal.d.ts +1 -0
- package/dist/semiotic-server.d.ts +1 -1
- package/dist/semiotic-xy.d.ts +1 -0
- package/dist/semiotic.d.ts +4 -4
- 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 +23 -0
- package/dist/test-utils/frameMock.d.ts +78 -0
- package/dist/xy.min.js +1 -1
- package/dist/xy.module.min.js +1 -1
- package/package.json +34 -20
- package/dist/Legend.d.ts +0 -3
- package/dist/stream/DataSourceAdapter.d.ts +0 -35
- package/dist/stream/SVGOverlay.d.ts +0 -56
- package/dist/stream/layouts/forceLayoutPlugin.d.ts +0 -9
- package/dist/stream/renderers/areaCanvasRenderer.d.ts +0 -7
- package/dist/types/legendTypes.d.ts +0 -20
- /package/dist/{Annotation.d.ts → components/Annotation.d.ts} +0 -0
- /package/dist/{CategoryColors.d.ts → components/CategoryColors.d.ts} +0 -0
- /package/dist/{ChartContainer.d.ts → components/ChartContainer.d.ts} +0 -0
- /package/dist/{ChartErrorBoundary.d.ts → components/ChartErrorBoundary.d.ts} +0 -0
- /package/dist/{ContextLayout.d.ts → components/ContextLayout.d.ts} +0 -0
- /package/dist/{DetailsPanel.d.ts → components/DetailsPanel.d.ts} +0 -0
- /package/dist/{ThemeProvider.d.ts → components/ThemeProvider.d.ts} +0 -0
- /package/dist/{charts → components/charts}/shared/ChartError.d.ts +0 -0
- /package/dist/{charts → components/charts}/shared/annotationRules.d.ts +0 -0
- /package/dist/{charts → components/charts}/shared/formatUtils.d.ts +0 -0
- /package/dist/{charts → components/charts}/shared/loess.d.ts +0 -0
- /package/dist/{charts → components/charts}/shared/networkUtils.d.ts +0 -0
- /package/dist/{charts → components/charts}/shared/selectionUtils.d.ts +0 -0
- /package/dist/{charts → components/charts}/shared/validateChartData.d.ts +0 -0
- /package/dist/{charts → components/charts}/shared/validateProps.d.ts +0 -0
- /package/dist/{charts → components/charts}/xy/ScatterplotMatrix.d.ts +0 -0
- /package/dist/{data → components/data}/fromVegaLite.d.ts +0 -0
- /package/dist/{data → components/data}/transforms.d.ts +0 -0
- /package/dist/{export → components/export}/chartConfig.d.ts +0 -0
- /package/dist/{export → components/export}/selectionSerializer.d.ts +0 -0
- /package/dist/{geometry → components/geometry}/sankeyLinks.d.ts +0 -0
- /package/dist/{realtime → components/realtime}/BinAccumulator.d.ts +0 -0
- /package/dist/{realtime → components/realtime}/IncrementalExtent.d.ts +0 -0
- /package/dist/{realtime → components/realtime}/renderers/types.d.ts +0 -0
- /package/dist/{realtime → components/realtime}/renderers/waterfallRenderer.d.ts +0 -0
- /package/dist/{store → components/store}/ObservationStore.d.ts +0 -0
- /package/dist/{store → components/store}/SelectionStore.d.ts +0 -0
- /package/dist/{store → components/store}/ThemeStore.d.ts +0 -0
- /package/dist/{store → components/store}/TooltipStore.d.ts +0 -0
- /package/dist/{store → components/store}/createStore.d.ts +0 -0
- /package/dist/{store → components/store}/useObservation.d.ts +0 -0
- /package/dist/{store → components/store}/useSelection.d.ts +0 -0
- /package/dist/{stream → components/stream}/MarginalGraphics.d.ts +0 -0
- /package/dist/{stream → components/stream}/NetworkCanvasHitTester.d.ts +0 -0
- /package/dist/{stream → components/stream}/OrdinalCanvasHitTester.d.ts +0 -0
- /package/dist/{stream → components/stream}/ParticlePool.d.ts +0 -0
- /package/dist/{stream → components/stream}/StreamNetworkFrame.d.ts +0 -0
- /package/dist/{stream → components/stream}/StreamOrdinalFrame.d.ts +0 -0
- /package/dist/{stream → components/stream}/StreamXYFrame.d.ts +0 -0
- /package/dist/{stream → components/stream}/keyboardNav.d.ts +0 -0
- /package/dist/{stream → components/stream}/layouts/chordLayoutPlugin.d.ts +0 -0
- /package/dist/{stream → components/stream}/layouts/hierarchyLayoutPlugin.d.ts +0 -0
- /package/dist/{stream → components/stream}/layouts/sankeyLayoutPlugin.d.ts +0 -0
- /package/dist/{stream → components/stream}/ordinalSceneBuilders/barScene.d.ts +0 -0
- /package/dist/{stream → components/stream}/ordinalSceneBuilders/connectorScene.d.ts +0 -0
- /package/dist/{stream → components/stream}/ordinalSceneBuilders/pieScene.d.ts +0 -0
- /package/dist/{stream → components/stream}/ordinalSceneBuilders/pointScene.d.ts +0 -0
- /package/dist/{stream → components/stream}/ordinalSceneBuilders/statisticalScene.d.ts +0 -0
- /package/dist/{stream → components/stream}/ordinalSceneBuilders/timelineScene.d.ts +0 -0
- /package/dist/{stream → components/stream}/ordinalSceneBuilders/types.d.ts +0 -0
- /package/dist/{stream → components/stream}/renderers/barCanvasRenderer.d.ts +0 -0
- /package/dist/{stream → components/stream}/renderers/boxplotCanvasRenderer.d.ts +0 -0
- /package/dist/{stream → components/stream}/renderers/candlestickCanvasRenderer.d.ts +0 -0
- /package/dist/{stream → components/stream}/renderers/connectorCanvasRenderer.d.ts +0 -0
- /package/dist/{stream → components/stream}/renderers/networkArcRenderer.d.ts +0 -0
- /package/dist/{stream → components/stream}/renderers/networkCircleRenderer.d.ts +0 -0
- /package/dist/{stream → components/stream}/renderers/networkEdgeRenderer.d.ts +0 -0
- /package/dist/{stream → components/stream}/renderers/networkParticleRenderer.d.ts +0 -0
- /package/dist/{stream → components/stream}/renderers/networkRectRenderer.d.ts +0 -0
- /package/dist/{stream → components/stream}/renderers/pointCanvasRenderer.d.ts +0 -0
- /package/dist/{stream → components/stream}/renderers/swarmCanvasRenderer.d.ts +0 -0
- /package/dist/{stream → components/stream}/renderers/types.d.ts +0 -0
- /package/dist/{stream → components/stream}/renderers/violinCanvasRenderer.d.ts +0 -0
- /package/dist/{stream → components/stream}/renderers/waterfallCanvasRenderer.d.ts +0 -0
- /package/dist/{stream → components/stream}/renderers/wedgeCanvasRenderer.d.ts +0 -0
- /package/dist/{stream → components/stream}/useResponsiveSize.d.ts +0 -0
- /package/dist/{types → components/types}/annotationTypes.d.ts +0 -0
- /package/dist/{types → components/types}/generalTypes.d.ts +0 -0
- /package/dist/{types → components/types}/interactionTypes.d.ts +0 -0
- /package/dist/{types → components/types}/networkTypes.d.ts +0 -0
- /package/dist/{types → components/types}/ordinalTypes.d.ts +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a mock 2D canvas rendering context with all commonly used
|
|
3
|
+
* methods stubbed as vi.fn() and properties set to sensible defaults.
|
|
4
|
+
*
|
|
5
|
+
* This is the single canonical canvas mock for the entire test suite.
|
|
6
|
+
* Import from "../../test-utils/canvasMock" (or appropriate relative path).
|
|
7
|
+
*/
|
|
8
|
+
export declare function createMockCanvasContext(): Record<string, any>;
|
|
9
|
+
/**
|
|
10
|
+
* Sets up the canvas getContext mock on HTMLCanvasElement.prototype,
|
|
11
|
+
* mocks requestAnimationFrame to execute callbacks synchronously,
|
|
12
|
+
* and mocks cancelAnimationFrame.
|
|
13
|
+
*
|
|
14
|
+
* @returns A cleanup function that restores the mocked globals.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* let cleanup: () => void
|
|
19
|
+
* beforeEach(() => { cleanup = setupCanvasMock() })
|
|
20
|
+
* afterEach(() => { cleanup() })
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare function setupCanvasMock(): () => void;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Creates a vi.mock factory for a Stream Frame module that captures
|
|
4
|
+
* the props passed to the frame component.
|
|
5
|
+
*
|
|
6
|
+
* The mock renders a simple div with the appropriate CSS class and
|
|
7
|
+
* an inner <svg /> element, matching the real frame's DOM structure.
|
|
8
|
+
*
|
|
9
|
+
* @param className - The CSS class the mock div should use
|
|
10
|
+
* (e.g., "stream-ordinal-frame", "stream-network-frame", "stream-xy-frame").
|
|
11
|
+
* @returns An object with:
|
|
12
|
+
* - `factory` — the mock module factory to pass to `vi.mock(path, factory)`
|
|
13
|
+
* - `getLastProps()` — returns the most recent props passed to the frame
|
|
14
|
+
* - `reset()` — clears captured props (call in beforeEach)
|
|
15
|
+
*/
|
|
16
|
+
export declare function createFrameMock(className: string): {
|
|
17
|
+
factory: () => {
|
|
18
|
+
__esModule: boolean;
|
|
19
|
+
default: (props: any) => React.DetailedReactHTMLElement<{
|
|
20
|
+
className: string;
|
|
21
|
+
}, HTMLElement>;
|
|
22
|
+
};
|
|
23
|
+
getLastProps: () => any;
|
|
24
|
+
reset: () => void;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Pre-built mock for StreamOrdinalFrame.
|
|
28
|
+
*
|
|
29
|
+
* Usage:
|
|
30
|
+
* ```ts
|
|
31
|
+
* import { ordinalFrameMock } from "../../test-utils/frameMock"
|
|
32
|
+
*
|
|
33
|
+
* vi.mock("../../stream/StreamOrdinalFrame", ordinalFrameMock.factory)
|
|
34
|
+
*
|
|
35
|
+
* beforeEach(() => ordinalFrameMock.reset())
|
|
36
|
+
*
|
|
37
|
+
* it("passes correct props", () => {
|
|
38
|
+
* render(<BarChart data={data} />)
|
|
39
|
+
* expect(ordinalFrameMock.getLastProps().chartType).toBe("bar")
|
|
40
|
+
* })
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export declare const ordinalFrameMock: {
|
|
44
|
+
factory: () => {
|
|
45
|
+
__esModule: boolean;
|
|
46
|
+
default: (props: any) => React.DetailedReactHTMLElement<{
|
|
47
|
+
className: string;
|
|
48
|
+
}, HTMLElement>;
|
|
49
|
+
};
|
|
50
|
+
getLastProps: () => any;
|
|
51
|
+
reset: () => void;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Pre-built mock for StreamNetworkFrame.
|
|
55
|
+
*/
|
|
56
|
+
export declare const networkFrameMock: {
|
|
57
|
+
factory: () => {
|
|
58
|
+
__esModule: boolean;
|
|
59
|
+
default: (props: any) => React.DetailedReactHTMLElement<{
|
|
60
|
+
className: string;
|
|
61
|
+
}, HTMLElement>;
|
|
62
|
+
};
|
|
63
|
+
getLastProps: () => any;
|
|
64
|
+
reset: () => void;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Pre-built mock for StreamXYFrame.
|
|
68
|
+
*/
|
|
69
|
+
export declare const xyFrameMock: {
|
|
70
|
+
factory: () => {
|
|
71
|
+
__esModule: boolean;
|
|
72
|
+
default: (props: any) => React.DetailedReactHTMLElement<{
|
|
73
|
+
className: string;
|
|
74
|
+
}, HTMLElement>;
|
|
75
|
+
};
|
|
76
|
+
getLastProps: () => any;
|
|
77
|
+
reset: () => void;
|
|
78
|
+
};
|