semiotic 2.0.3 → 3.0.0-beta.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 +828 -0
- package/README.md +215 -37
- package/ai/cli.js +48 -0
- package/ai/dist/ai/componentRegistry.js +45 -0
- package/ai/dist/ai/mcp-server.js +99 -0
- package/ai/dist/ai/renderHOCToSVG.js +77 -0
- package/ai/dist/src/components/Annotation.js +358 -0
- package/ai/dist/src/components/AnnotationLayer/AnnotationLayer.js +369 -0
- package/ai/dist/src/components/Axis/Axis.js +374 -0
- package/ai/dist/src/components/Axis/axisTitle.js +14 -0
- package/ai/dist/src/components/Axis/index.js +7 -0
- package/ai/dist/src/components/Axis/summaryGraphic.js +37 -0
- package/ai/dist/src/components/Brush.js +84 -0
- package/ai/dist/src/components/ChartErrorBoundary.js +91 -0
- package/ai/dist/src/components/DividedLine.js +65 -0
- package/ai/dist/src/components/Legend.js +140 -0
- package/ai/dist/src/components/LinkedCharts.js +95 -0
- package/ai/dist/src/components/ThemeProvider.js +79 -0
- package/ai/dist/src/components/Tooltip/Tooltip.js +309 -0
- package/ai/dist/src/components/TooltipPositioner/index.js +132 -0
- package/ai/dist/src/components/annotationLayerBehavior/annotationHandling.js +73 -0
- package/ai/dist/src/components/annotationLayerBehavior/d3labeler.js +254 -0
- package/ai/dist/src/components/annotationRules/baseRules.js +150 -0
- package/ai/dist/src/components/annotationRules/networkframeRules.js +196 -0
- package/ai/dist/src/components/annotationRules/xyframeRules.js +297 -0
- package/ai/dist/src/components/batchWork.js +35 -0
- package/ai/dist/src/components/charts/index.js +109 -0
- package/ai/dist/src/components/charts/network/ChordDiagram.js +142 -0
- package/ai/dist/src/components/charts/network/CirclePack.js +108 -0
- package/ai/dist/src/components/charts/network/ForceDirectedGraph.js +121 -0
- package/ai/dist/src/components/charts/network/SankeyDiagram.js +155 -0
- package/ai/dist/src/components/charts/network/TreeDiagram.js +110 -0
- package/ai/dist/src/components/charts/network/Treemap.js +106 -0
- package/ai/dist/src/components/charts/ordinal/BarChart.js +156 -0
- package/ai/dist/src/components/charts/ordinal/BoxPlot.js +139 -0
- package/ai/dist/src/components/charts/ordinal/DonutChart.js +130 -0
- package/ai/dist/src/components/charts/ordinal/DotPlot.js +126 -0
- package/ai/dist/src/components/charts/ordinal/GroupedBarChart.js +129 -0
- package/ai/dist/src/components/charts/ordinal/Histogram.js +132 -0
- package/ai/dist/src/components/charts/ordinal/PieChart.js +128 -0
- package/ai/dist/src/components/charts/ordinal/RidgelinePlot.js +130 -0
- package/ai/dist/src/components/charts/ordinal/StackedBarChart.js +130 -0
- package/ai/dist/src/components/charts/ordinal/SwarmPlot.js +147 -0
- package/ai/dist/src/components/charts/ordinal/ViolinPlot.js +138 -0
- package/ai/dist/src/components/charts/realtime/RealtimeHeatmap.js +79 -0
- package/ai/dist/src/components/charts/realtime/RealtimeHistogram.js +114 -0
- package/ai/dist/src/components/charts/realtime/RealtimeLineChart.js +93 -0
- package/ai/dist/src/components/charts/realtime/RealtimeSwarmChart.js +105 -0
- package/ai/dist/src/components/charts/realtime/RealtimeWaterfallChart.js +106 -0
- package/ai/dist/src/components/charts/shared/ChartError.js +72 -0
- package/ai/dist/src/components/charts/shared/colorUtils.js +138 -0
- package/ai/dist/src/components/charts/shared/formatUtils.js +213 -0
- package/ai/dist/src/components/charts/shared/hooks.js +49 -0
- package/ai/dist/src/components/charts/shared/legendUtils.js +57 -0
- package/ai/dist/src/components/charts/shared/selectionUtils.js +67 -0
- package/ai/dist/src/components/charts/shared/tooltipUtils.js +79 -0
- package/ai/dist/src/components/charts/shared/types.js +2 -0
- package/ai/dist/src/components/charts/shared/validateChartData.js +82 -0
- package/ai/dist/src/components/charts/shared/validateProps.js +736 -0
- package/ai/dist/src/components/charts/xy/AreaChart.js +230 -0
- package/ai/dist/src/components/charts/xy/BubbleChart.js +251 -0
- package/ai/dist/src/components/charts/xy/Heatmap.js +235 -0
- package/ai/dist/src/components/charts/xy/LineChart.js +307 -0
- package/ai/dist/src/components/charts/xy/MinimapChart.js +298 -0
- package/ai/dist/src/components/charts/xy/Scatterplot.js +172 -0
- package/ai/dist/src/components/charts/xy/ScatterplotMatrix.js +426 -0
- package/ai/dist/src/components/charts/xy/StackedAreaChart.js +231 -0
- package/ai/dist/src/components/constants/coordinateNames.js +11 -0
- package/ai/dist/src/components/constants/frame_props.js +251 -0
- package/ai/dist/src/components/data/dataFunctions.js +487 -0
- package/ai/dist/src/components/data/multiAccessorUtils.js +14 -0
- package/ai/dist/src/components/data/transforms.js +143 -0
- package/ai/dist/src/components/data/unflowedFunctions.js +5 -0
- package/ai/dist/src/components/export/exportChart.js +121 -0
- package/ai/dist/src/components/generic_utilities/functions.js +5 -0
- package/ai/dist/src/components/geometry/areaDrawing.js +312 -0
- package/ai/dist/src/components/geometry/contourLayout.js +73 -0
- package/ai/dist/src/components/geometry/hexbinLayout.js +163 -0
- package/ai/dist/src/components/geometry/lineDrawing.js +356 -0
- package/ai/dist/src/components/geometry/sankeyLinks.js +331 -0
- package/ai/dist/src/components/geometry/summaryLayouts.js +136 -0
- package/ai/dist/src/components/index.js +18 -0
- package/ai/dist/src/components/processing/InteractionItems.js +223 -0
- package/ai/dist/src/components/processing/hierarchyUtils.js +104 -0
- package/ai/dist/src/components/processing/layouts/chordLayout.js +58 -0
- package/ai/dist/src/components/processing/layouts/forceLayout.js +142 -0
- package/ai/dist/src/components/processing/layouts/hierarchyLayout.js +31 -0
- package/ai/dist/src/components/processing/layouts/index.js +32 -0
- package/ai/dist/src/components/processing/layouts/sankeyLayout.js +96 -0
- package/ai/dist/src/components/processing/layouts/simpleLayouts.js +34 -0
- package/ai/dist/src/components/processing/layouts/types.js +2 -0
- package/ai/dist/src/components/processing/networkDefaults.js +39 -0
- package/ai/dist/src/components/realtime/BinAccumulator.js +36 -0
- package/ai/dist/src/components/realtime/IncrementalExtent.js +55 -0
- package/ai/dist/src/components/realtime/RingBuffer.js +104 -0
- package/ai/dist/src/components/realtime/renderers/barRenderer.js +133 -0
- package/ai/dist/src/components/realtime/renderers/candlestickRenderer.js +7 -0
- package/ai/dist/src/components/realtime/renderers/lineRenderer.js +164 -0
- package/ai/dist/src/components/realtime/renderers/swarmRenderer.js +91 -0
- package/ai/dist/src/components/realtime/renderers/types.js +2 -0
- package/ai/dist/src/components/realtime/renderers/waterfallRenderer.js +163 -0
- package/ai/dist/src/components/realtime/types.js +2 -0
- package/ai/dist/src/components/semiotic-ai.js +89 -0
- package/ai/dist/src/components/semiotic-data.js +12 -0
- package/ai/dist/src/components/semiotic-network.js +38 -0
- package/ai/dist/src/components/semiotic-ordinal.js +28 -0
- package/ai/dist/src/components/semiotic-realtime.js +30 -0
- package/ai/dist/src/components/semiotic-server.js +8 -0
- package/ai/dist/src/components/semiotic-xy.js +35 -0
- package/ai/dist/src/components/semiotic.js +109 -0
- package/ai/dist/src/components/server/renderToStaticSVG.js +594 -0
- package/ai/dist/src/components/store/SelectionStore.js +91 -0
- package/ai/dist/src/components/store/ThemeStore.js +78 -0
- package/ai/dist/src/components/store/TooltipStore.js +13 -0
- package/ai/dist/src/components/store/createStore.js +81 -0
- package/ai/dist/src/components/store/useSelection.js +133 -0
- package/ai/dist/src/components/stream/CanvasHitTester.js +164 -0
- package/ai/dist/src/components/stream/DataSourceAdapter.js +99 -0
- package/ai/dist/src/components/stream/MarginalGraphics.js +266 -0
- package/ai/dist/src/components/stream/NetworkCanvasHitTester.js +228 -0
- package/ai/dist/src/components/stream/NetworkPipelineStore.js +498 -0
- package/ai/dist/src/components/stream/NetworkSVGOverlay.js +70 -0
- package/ai/dist/src/components/stream/NetworkSceneGraph.js +38 -0
- package/ai/dist/src/components/stream/OrdinalCanvasHitTester.js +146 -0
- package/ai/dist/src/components/stream/OrdinalPipelineStore.js +786 -0
- package/ai/dist/src/components/stream/OrdinalSVGOverlay.js +130 -0
- package/ai/dist/src/components/stream/ParticlePool.js +174 -0
- package/ai/dist/src/components/stream/PipelineStore.js +1243 -0
- package/ai/dist/src/components/stream/SVGOverlay.js +129 -0
- package/ai/dist/src/components/stream/SceneGraph.js +132 -0
- package/ai/dist/src/components/stream/StreamNetworkFrame.js +561 -0
- package/ai/dist/src/components/stream/StreamOrdinalFrame.js +492 -0
- package/ai/dist/src/components/stream/StreamXYFrame.js +590 -0
- package/ai/dist/src/components/stream/accessorUtils.js +20 -0
- package/ai/dist/src/components/stream/index.js +32 -0
- package/ai/dist/src/components/stream/layouts/chordLayoutPlugin.js +352 -0
- package/ai/dist/src/components/stream/layouts/forceLayoutPlugin.js +230 -0
- package/ai/dist/src/components/stream/layouts/hierarchyLayoutPlugin.js +568 -0
- package/ai/dist/src/components/stream/layouts/index.js +28 -0
- package/ai/dist/src/components/stream/layouts/sankeyLayoutPlugin.js +245 -0
- package/ai/dist/src/components/stream/networkTypes.js +17 -0
- package/ai/dist/src/components/stream/ordinalSceneBuilders/barScene.js +126 -0
- package/ai/dist/src/components/stream/ordinalSceneBuilders/connectorScene.js +62 -0
- package/ai/dist/src/components/stream/ordinalSceneBuilders/pieScene.js +33 -0
- package/ai/dist/src/components/stream/ordinalSceneBuilders/pointScene.js +63 -0
- package/ai/dist/src/components/stream/ordinalSceneBuilders/statisticalScene.js +278 -0
- package/ai/dist/src/components/stream/ordinalSceneBuilders/timelineScene.js +30 -0
- package/ai/dist/src/components/stream/ordinalSceneBuilders/types.js +2 -0
- package/ai/dist/src/components/stream/ordinalTypes.js +2 -0
- package/ai/dist/src/components/stream/renderers/areaCanvasRenderer.js +48 -0
- package/ai/dist/src/components/stream/renderers/barCanvasRenderer.js +70 -0
- package/ai/dist/src/components/stream/renderers/boxplotCanvasRenderer.js +75 -0
- package/ai/dist/src/components/stream/renderers/candlestickCanvasRenderer.js +28 -0
- package/ai/dist/src/components/stream/renderers/connectorCanvasRenderer.js +47 -0
- package/ai/dist/src/components/stream/renderers/heatmapCanvasRenderer.js +31 -0
- package/ai/dist/src/components/stream/renderers/lineCanvasRenderer.js +140 -0
- package/ai/dist/src/components/stream/renderers/networkArcRenderer.js +38 -0
- package/ai/dist/src/components/stream/renderers/networkCircleRenderer.js +37 -0
- package/ai/dist/src/components/stream/renderers/networkEdgeRenderer.js +102 -0
- package/ai/dist/src/components/stream/renderers/networkParticleRenderer.js +63 -0
- package/ai/dist/src/components/stream/renderers/networkRectRenderer.js +35 -0
- package/ai/dist/src/components/stream/renderers/pointCanvasRenderer.js +38 -0
- package/ai/dist/src/components/stream/renderers/swarmCanvasRenderer.js +10 -0
- package/ai/dist/src/components/stream/renderers/types.js +2 -0
- package/ai/dist/src/components/stream/renderers/violinCanvasRenderer.js +47 -0
- package/ai/dist/src/components/stream/renderers/waterfallCanvasRenderer.js +38 -0
- package/ai/dist/src/components/stream/renderers/wedgeCanvasRenderer.js +33 -0
- package/ai/dist/src/components/stream/types.js +2 -0
- package/ai/dist/src/components/types/annotationTypes.js +2 -0
- package/ai/dist/src/components/types/canvasTypes.js +2 -0
- package/ai/dist/src/components/types/generalTypes.js +2 -0
- package/ai/dist/src/components/types/interactionTypes.js +2 -0
- package/ai/dist/src/components/types/legendTypes.js +2 -0
- package/ai/dist/src/components/types/networkTypes.js +2 -0
- package/ai/dist/src/components/types/ordinalTypes.js +2 -0
- package/ai/dist/src/components/types/xyTypes.js +2 -0
- package/ai/dist/src/components/useBoundingRect.js +24 -0
- package/ai/dist/src/components/visualizationLayerBehavior/axis.js +301 -0
- package/ai/dist/src/components/visualizationLayerBehavior/general.js +435 -0
- package/ai/dist/src/setupTests.js +4 -0
- package/ai/examples.md +489 -0
- package/ai/schema.json +1338 -0
- package/ai/system-prompt.md +41 -0
- package/dist/AnnotationLayer/AnnotationLayer.d.ts +0 -1
- package/dist/Axis/axisTitle.d.ts +3 -3
- package/dist/Axis/summaryGraphic.d.ts +1 -1
- package/dist/ChartErrorBoundary.d.ts +39 -0
- package/dist/LinkedCharts.d.ts +42 -0
- package/dist/ThemeProvider.d.ts +12 -0
- package/dist/Tooltip/Tooltip.d.ts +141 -0
- package/dist/TooltipPositioner/index.d.ts +1 -1
- package/dist/annotationLayerBehavior/annotationHandling.d.ts +2 -2
- package/dist/annotationRules/networkframeRules.d.ts +2 -2
- package/dist/annotationRules/xyframeRules.d.ts +2 -2
- package/dist/batchWork.d.ts +1 -1
- package/dist/charts/index.d.ts +74 -0
- package/dist/charts/network/ChordDiagram.d.ts +36 -0
- package/dist/charts/network/CirclePack.d.ts +32 -0
- package/dist/charts/network/ForceDirectedGraph.d.ts +38 -0
- package/dist/charts/network/SankeyDiagram.d.ts +38 -0
- package/dist/charts/network/TreeDiagram.d.ts +34 -0
- package/dist/charts/network/Treemap.d.ts +33 -0
- package/dist/charts/ordinal/BarChart.d.ts +32 -0
- package/dist/charts/ordinal/BoxPlot.d.ts +27 -0
- package/dist/charts/ordinal/DonutChart.d.ts +23 -0
- package/dist/charts/ordinal/DotPlot.d.ts +27 -0
- package/dist/charts/ordinal/GroupedBarChart.d.ts +26 -0
- package/dist/charts/ordinal/Histogram.d.ts +26 -0
- package/dist/charts/ordinal/PieChart.d.ts +21 -0
- package/dist/charts/ordinal/RidgelinePlot.d.ts +34 -0
- package/dist/charts/ordinal/StackedBarChart.d.ts +27 -0
- package/dist/charts/ordinal/SwarmPlot.d.ts +29 -0
- package/dist/charts/ordinal/ViolinPlot.d.ts +28 -0
- package/dist/charts/realtime/RealtimeHeatmap.d.ts +95 -0
- package/dist/charts/realtime/RealtimeHistogram.d.ts +119 -0
- package/dist/charts/realtime/RealtimeLineChart.d.ts +98 -0
- package/dist/charts/realtime/RealtimeSwarmChart.d.ts +100 -0
- package/dist/charts/realtime/RealtimeWaterfallChart.d.ts +97 -0
- package/dist/charts/shared/ChartError.d.ts +19 -0
- package/dist/charts/shared/colorUtils.d.ts +62 -0
- package/dist/charts/shared/formatUtils.d.ts +94 -0
- package/dist/charts/shared/hooks.d.ts +20 -0
- package/dist/charts/shared/legendUtils.d.ts +32 -0
- package/dist/charts/shared/selectionUtils.d.ts +51 -0
- package/dist/charts/shared/tooltipUtils.d.ts +18 -0
- package/dist/charts/shared/types.d.ts +97 -0
- package/dist/charts/shared/validateChartData.d.ts +41 -0
- package/dist/charts/shared/validateProps.d.ts +18 -0
- package/dist/charts/xy/AreaChart.d.ts +130 -0
- package/dist/charts/xy/BubbleChart.d.ts +164 -0
- package/dist/charts/xy/Heatmap.d.ts +156 -0
- package/dist/charts/xy/LineChart.d.ts +196 -0
- package/dist/charts/xy/MinimapChart.d.ts +73 -0
- package/dist/charts/xy/Scatterplot.d.ts +55 -0
- package/dist/charts/xy/ScatterplotMatrix.d.ts +71 -0
- package/dist/charts/xy/StackedAreaChart.d.ts +134 -0
- package/dist/constants/frame_props.d.ts +9 -0
- package/dist/data/dataFunctions.d.ts +10 -11
- package/dist/data/transforms.d.ts +45 -0
- package/dist/export/exportChart.d.ts +16 -0
- package/dist/{svg → geometry}/areaDrawing.d.ts +3 -13
- package/dist/geometry/contourLayout.d.ts +6 -0
- package/dist/geometry/hexbinLayout.d.ts +7 -0
- package/dist/{svg → geometry}/lineDrawing.d.ts +7 -35
- package/dist/geometry/sankeyLinks.d.ts +2 -0
- package/dist/geometry/summaryLayouts.d.ts +45 -0
- package/dist/index.d.ts +1 -125
- package/dist/network.js +7495 -0
- package/dist/network.js.map +1 -0
- package/dist/network.min.js +1 -0
- package/dist/network.module.js +7458 -0
- package/dist/network.module.js.map +1 -0
- package/dist/network.module.min.js +1 -0
- package/dist/ordinal.js +6497 -0
- package/dist/ordinal.js.map +1 -0
- package/dist/ordinal.min.js +1 -0
- package/dist/ordinal.module.js +6465 -0
- package/dist/ordinal.module.js.map +1 -0
- package/dist/ordinal.module.min.js +1 -0
- package/dist/processing/InteractionItems.d.ts +5 -4
- package/dist/processing/hierarchyUtils.d.ts +16 -0
- package/dist/processing/layouts/chordLayout.d.ts +2 -0
- package/dist/processing/layouts/forceLayout.d.ts +3 -0
- package/dist/processing/layouts/hierarchyLayout.d.ts +10 -0
- package/dist/processing/layouts/index.d.ts +8 -0
- package/dist/processing/layouts/sankeyLayout.d.ts +8 -0
- package/dist/processing/layouts/simpleLayouts.d.ts +7 -0
- package/dist/processing/layouts/types.d.ts +17 -0
- package/dist/processing/networkDefaults.d.ts +36 -0
- package/dist/realtime/BinAccumulator.d.ts +8 -0
- package/dist/realtime/IncrementalExtent.d.ts +13 -0
- package/dist/realtime/RingBuffer.d.ts +19 -0
- package/dist/realtime/renderers/barRenderer.d.ts +2 -0
- package/dist/realtime/renderers/candlestickRenderer.d.ts +2 -0
- package/dist/realtime/renderers/lineRenderer.d.ts +2 -0
- package/dist/realtime/renderers/swarmRenderer.d.ts +2 -0
- package/dist/realtime/renderers/types.d.ts +9 -0
- package/dist/realtime/renderers/waterfallRenderer.d.ts +3 -0
- package/dist/realtime/types.d.ts +113 -0
- package/dist/realtime.js +7072 -0
- package/dist/realtime.js.map +1 -0
- package/dist/realtime.min.js +1 -0
- package/dist/realtime.module.js +7043 -0
- package/dist/realtime.module.js.map +1 -0
- package/dist/realtime.module.min.js +1 -0
- package/dist/semiotic-ai.d.ts +36 -0
- package/dist/semiotic-ai.js +13323 -0
- package/dist/semiotic-ai.js.map +1 -0
- package/dist/semiotic-ai.min.js +1 -0
- package/dist/semiotic-ai.module.js +13264 -0
- package/dist/semiotic-ai.module.js.map +1 -0
- package/dist/semiotic-ai.module.min.js +1 -0
- package/dist/semiotic-data.d.ts +5 -0
- package/dist/semiotic-data.js +141 -0
- package/dist/semiotic-data.js.map +1 -0
- package/dist/semiotic-data.min.js +1 -0
- package/dist/semiotic-data.module.js +136 -0
- package/dist/semiotic-data.module.js.map +1 -0
- package/dist/semiotic-data.module.min.js +1 -0
- package/dist/semiotic-network.d.ts +23 -0
- package/dist/semiotic-ordinal.d.ts +19 -0
- package/dist/semiotic-realtime.d.ts +22 -0
- package/dist/semiotic-server.d.ts +1 -0
- package/dist/semiotic-xy.d.ts +21 -0
- package/dist/semiotic.d.ts +41 -28
- package/dist/semiotic.js +16257 -13130
- package/dist/semiotic.js.map +1 -0
- package/dist/semiotic.min.js +1 -0
- package/dist/semiotic.module.js +16198 -13100
- package/dist/semiotic.module.js.map +1 -0
- package/dist/semiotic.module.min.js +1 -0
- package/dist/server/renderToStaticSVG.d.ts +9 -0
- package/dist/server.js +5191 -0
- package/dist/server.js.map +1 -0
- package/dist/server.min.js +1 -0
- package/dist/server.module.js +5166 -0
- package/dist/server.module.js.map +1 -0
- package/dist/server.module.min.js +1 -0
- package/dist/store/SelectionStore.d.ts +29 -0
- package/dist/store/ThemeStore.d.ts +26 -0
- package/dist/store/useSelection.d.ts +66 -0
- package/dist/stream/CanvasHitTester.d.ts +18 -0
- package/dist/stream/DataSourceAdapter.d.ts +32 -0
- package/dist/stream/MarginalGraphics.d.ts +19 -0
- package/dist/stream/NetworkCanvasHitTester.d.ts +14 -0
- package/dist/stream/NetworkPipelineStore.d.ts +74 -0
- package/dist/stream/NetworkSVGOverlay.d.ts +40 -0
- package/dist/stream/NetworkSceneGraph.d.ts +14 -0
- package/dist/stream/OrdinalCanvasHitTester.d.ts +9 -0
- package/dist/stream/OrdinalPipelineStore.d.ts +65 -0
- package/dist/stream/OrdinalSVGOverlay.d.ts +34 -0
- package/dist/stream/ParticlePool.d.ts +28 -0
- package/dist/stream/PipelineStore.d.ts +161 -0
- package/dist/stream/SVGOverlay.d.ts +37 -0
- package/dist/stream/SceneGraph.d.ts +16 -0
- package/dist/stream/StreamNetworkFrame.d.ts +4 -0
- package/dist/stream/StreamOrdinalFrame.d.ts +4 -0
- package/dist/stream/StreamXYFrame.d.ts +4 -0
- package/dist/stream/accessorUtils.d.ts +2 -0
- package/dist/stream/index.d.ts +16 -0
- package/dist/stream/layouts/chordLayoutPlugin.d.ts +8 -0
- package/dist/stream/layouts/forceLayoutPlugin.d.ts +9 -0
- package/dist/stream/layouts/hierarchyLayoutPlugin.d.ts +17 -0
- package/dist/stream/layouts/index.d.ts +11 -0
- package/dist/stream/layouts/sankeyLayoutPlugin.d.ts +8 -0
- package/dist/stream/networkTypes.d.ts +346 -0
- package/dist/stream/ordinalSceneBuilders/barScene.d.ts +4 -0
- package/dist/stream/ordinalSceneBuilders/connectorScene.d.ts +3 -0
- package/dist/stream/ordinalSceneBuilders/pieScene.d.ts +3 -0
- package/dist/stream/ordinalSceneBuilders/pointScene.d.ts +4 -0
- package/dist/stream/ordinalSceneBuilders/statisticalScene.d.ts +6 -0
- package/dist/stream/ordinalSceneBuilders/timelineScene.d.ts +3 -0
- package/dist/stream/ordinalSceneBuilders/types.d.ts +21 -0
- package/dist/stream/ordinalTypes.d.ts +225 -0
- package/dist/stream/renderers/areaCanvasRenderer.d.ts +7 -0
- package/dist/stream/renderers/barCanvasRenderer.d.ts +7 -0
- package/dist/stream/renderers/boxplotCanvasRenderer.d.ts +2 -0
- package/dist/stream/renderers/candlestickCanvasRenderer.d.ts +2 -0
- package/dist/stream/renderers/connectorCanvasRenderer.d.ts +2 -0
- package/dist/stream/renderers/heatmapCanvasRenderer.d.ts +6 -0
- package/dist/stream/renderers/lineCanvasRenderer.d.ts +8 -0
- package/dist/stream/renderers/networkArcRenderer.d.ts +5 -0
- package/dist/stream/renderers/networkCircleRenderer.d.ts +5 -0
- package/dist/stream/renderers/networkEdgeRenderer.d.ts +10 -0
- package/dist/stream/renderers/networkParticleRenderer.d.ts +11 -0
- package/dist/stream/renderers/networkRectRenderer.d.ts +5 -0
- package/dist/stream/renderers/pointCanvasRenderer.d.ts +7 -0
- package/dist/stream/renderers/swarmCanvasRenderer.d.ts +7 -0
- package/dist/stream/renderers/types.d.ts +7 -0
- package/dist/stream/renderers/violinCanvasRenderer.d.ts +2 -0
- package/dist/stream/renderers/waterfallCanvasRenderer.d.ts +8 -0
- package/dist/stream/renderers/wedgeCanvasRenderer.d.ts +2 -0
- package/dist/stream/types.d.ts +307 -0
- package/dist/types/annotationTypes.d.ts +13 -18
- package/dist/types/canvasTypes.d.ts +1 -1
- package/dist/types/generalTypes.d.ts +41 -36
- package/dist/types/interactionTypes.d.ts +7 -9
- package/dist/types/legendTypes.d.ts +2 -2
- package/dist/types/networkTypes.d.ts +40 -30
- package/dist/types/ordinalTypes.d.ts +27 -18
- package/dist/types/xyTypes.d.ts +1 -95
- package/dist/visualizationLayerBehavior/axis.d.ts +3 -5
- package/dist/visualizationLayerBehavior/general.d.ts +8 -12
- package/dist/xy.js +6993 -0
- package/dist/xy.js.map +1 -0
- package/dist/xy.min.js +1 -0
- package/dist/xy.module.js +6957 -0
- package/dist/xy.module.js.map +1 -0
- package/dist/xy.module.min.js +1 -0
- package/package.json +123 -67
- package/dist/AnnotationLayer/helpers.d.ts +0 -6
- package/dist/AnnotationLayer/index.d.ts +0 -2
- package/dist/FacetController.d.ts +0 -12
- package/dist/Frame.d.ts +0 -2
- package/dist/InteractionLayer.d.ts +0 -3
- package/dist/Mark/Mark.d.ts +0 -3
- package/dist/Mark/Mark.types.d.ts +0 -10
- package/dist/Mark/constants/markTransition.d.ts +0 -10
- package/dist/Mark/markBehavior/drawing.d.ts +0 -13
- package/dist/MiniMap.d.ts +0 -14
- package/dist/MinimapXYFrame.d.ts +0 -10
- package/dist/NetworkFrame.d.ts +0 -4
- package/dist/OrdinalFrame.d.ts +0 -4
- package/dist/ResponsiveFrame.d.ts +0 -22
- package/dist/ResponsiveMinimapXYFrame.d.ts +0 -6
- package/dist/ResponsiveNetworkFrame.d.ts +0 -6
- package/dist/ResponsiveOrdinalFrame.d.ts +0 -6
- package/dist/ResponsiveXYFrame.d.ts +0 -6
- package/dist/SpanOrDiv.d.ts +0 -10
- package/dist/SparkFrame.d.ts +0 -14
- package/dist/SparkNetworkFrame.d.ts +0 -5
- package/dist/SparkOrdinalFrame.d.ts +0 -5
- package/dist/SparkXYFrame.d.ts +0 -5
- package/dist/VisualizationLayer.d.ts +0 -33
- package/dist/XYFrame.d.ts +0 -4
- package/dist/annotationRules/orframeRules.d.ts +0 -105
- package/dist/components/Annotation.d.ts +0 -3
- package/dist/components/AnnotationLayer/AnnotationLayer.d.ts +0 -26
- package/dist/components/Axis/Axis.d.ts +0 -7
- package/dist/components/Axis/axisTitle.d.ts +0 -10
- package/dist/components/Axis/index.d.ts +0 -2
- package/dist/components/Axis/summaryGraphic.d.ts +0 -17
- package/dist/components/Brush.d.ts +0 -12
- package/dist/components/DividedLine.d.ts +0 -16
- package/dist/components/FacetController.d.ts +0 -12
- package/dist/components/Frame.d.ts +0 -2
- package/dist/components/InteractionLayer.d.ts +0 -3
- package/dist/components/Legend.d.ts +0 -3
- package/dist/components/Mark/Mark.d.ts +0 -3
- package/dist/components/Mark/Mark.types.d.ts +0 -10
- package/dist/components/Mark/markBehavior/drawing.d.ts +0 -13
- package/dist/components/MiniMap.d.ts +0 -14
- package/dist/components/MinimapXYFrame.d.ts +0 -10
- package/dist/components/NetworkFrame.d.ts +0 -4
- package/dist/components/OrdinalFrame.d.ts +0 -4
- package/dist/components/ResponsiveFrame.d.ts +0 -22
- package/dist/components/ResponsiveMinimapXYFrame.d.ts +0 -6
- package/dist/components/ResponsiveNetworkFrame.d.ts +0 -6
- package/dist/components/ResponsiveOrdinalFrame.d.ts +0 -6
- package/dist/components/ResponsiveXYFrame.d.ts +0 -6
- package/dist/components/SpanOrDiv.d.ts +0 -10
- package/dist/components/SparkFrame.d.ts +0 -14
- package/dist/components/SparkNetworkFrame.d.ts +0 -5
- package/dist/components/SparkOrdinalFrame.d.ts +0 -5
- package/dist/components/SparkXYFrame.d.ts +0 -5
- package/dist/components/TooltipPositioner/index.d.ts +0 -7
- package/dist/components/VisualizationLayer.d.ts +0 -33
- package/dist/components/XYFrame.d.ts +0 -4
- package/dist/components/annotationLayerBehavior/annotationHandling.d.ts +0 -19
- package/dist/components/annotationLayerBehavior/d3labeler.d.ts +0 -9
- package/dist/components/annotationRules/baseRules.d.ts +0 -25
- package/dist/components/annotationRules/networkframeRules.d.ts +0 -48
- package/dist/components/annotationRules/orframeRules.d.ts +0 -105
- package/dist/components/annotationRules/xyframeRules.d.ts +0 -117
- package/dist/components/batchWork.d.ts +0 -6
- package/dist/components/constants/coordinateNames.d.ts +0 -8
- package/dist/components/constants/frame_props.d.ts +0 -4
- package/dist/components/constants/jsx.d.ts +0 -19
- package/dist/components/data/dataFunctions.d.ts +0 -46
- package/dist/components/data/multiAccessorUtils.d.ts +0 -1
- package/dist/components/data/unflowedFunctions.d.ts +0 -1
- package/dist/components/generic_utilities/functions.d.ts +0 -1
- package/dist/components/index.d.ts +0 -125
- package/dist/components/interactionLayerBehavior/InteractionCanvas.d.ts +0 -20
- package/dist/components/processing/InteractionItems.d.ts +0 -12
- package/dist/components/processing/network.d.ts +0 -114
- package/dist/components/processing/ordinal.d.ts +0 -102
- package/dist/components/processing/xyDrawing.d.ts +0 -135
- package/dist/components/semiotic.d.ts +0 -35
- package/dist/components/store/TooltipStore.d.ts +0 -2
- package/dist/components/store/createStore.d.ts +0 -1
- package/dist/components/svg/SvgHelper.d.ts +0 -37
- package/dist/components/svg/areaDrawing.d.ts +0 -31
- package/dist/components/svg/ckmeans.d.ts +0 -69
- package/dist/components/svg/frameFunctions.d.ts +0 -119
- package/dist/components/svg/lineDrawing.d.ts +0 -99
- package/dist/components/svg/networkDrawing.d.ts +0 -134
- package/dist/components/svg/pieceDrawing.d.ts +0 -13
- package/dist/components/svg/pieceLayouts.d.ts +0 -71
- package/dist/components/svg/summaryLayouts.d.ts +0 -74
- package/dist/components/types/annotationTypes.d.ts +0 -140
- package/dist/components/types/canvasTypes.d.ts +0 -9
- package/dist/components/types/generalTypes.d.ts +0 -236
- package/dist/components/types/interactionTypes.d.ts +0 -74
- package/dist/components/types/legendTypes.d.ts +0 -20
- package/dist/components/types/networkTypes.d.ts +0 -165
- package/dist/components/types/ordinalTypes.d.ts +0 -103
- package/dist/components/types/xyTypes.d.ts +0 -118
- package/dist/components/useBoundingRect.d.ts +0 -2
- package/dist/components/useDerivedStateFromProps.d.ts +0 -1
- package/dist/components/useLegacyUnmountCallback.d.ts +0 -1
- package/dist/components/visualizationLayerBehavior/axis.d.ts +0 -38
- package/dist/components/visualizationLayerBehavior/general.d.ts +0 -84
- package/dist/constants/jsx.d.ts +0 -19
- package/dist/interactionLayerBehavior/InteractionCanvas.d.ts +0 -20
- package/dist/processing/network.d.ts +0 -114
- package/dist/processing/ordinal.d.ts +0 -102
- package/dist/processing/xyDrawing.d.ts +0 -135
- package/dist/setupTests.d.ts +0 -1
- package/dist/svg/SvgHelper.d.ts +0 -37
- package/dist/svg/ckmeans.d.ts +0 -69
- package/dist/svg/frameFunctions.d.ts +0 -119
- package/dist/svg/networkDrawing.d.ts +0 -134
- package/dist/svg/pieceDrawing.d.ts +0 -13
- package/dist/svg/pieceLayouts.d.ts +0 -71
- package/dist/svg/summaryLayouts.d.ts +0 -74
- package/dist/useDerivedStateFromProps.d.ts +0 -1
- package/dist/useLegacyUnmountCallback.d.ts +0 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { NetworkSceneEdge } from "../networkTypes";
|
|
2
|
+
/**
|
|
3
|
+
* Canvas painter for all network edge types.
|
|
4
|
+
*
|
|
5
|
+
* - bezier: Sankey flow bands (Path2D from SVG path string)
|
|
6
|
+
* - line: Force-directed straight edges
|
|
7
|
+
* - ribbon: Chord diagram ribbons
|
|
8
|
+
* - curved: Tree/cluster curved edges
|
|
9
|
+
*/
|
|
10
|
+
export declare function networkEdgeRenderer(ctx: CanvasRenderingContext2D, edges: NetworkSceneEdge[]): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ParticlePool } from "../ParticlePool";
|
|
2
|
+
import type { RealtimeEdge, ParticleStyle } from "../networkTypes";
|
|
3
|
+
/**
|
|
4
|
+
* Canvas particle renderer for sankey — ported directly from realtime-network.
|
|
5
|
+
* Called each rAF frame.
|
|
6
|
+
*/
|
|
7
|
+
export declare function renderNetworkParticles(ctx: CanvasRenderingContext2D, pool: ParticlePool, edges: RealtimeEdge[], style: ParticleStyle, edgeColorFn: (edge: RealtimeEdge) => string): void;
|
|
8
|
+
/**
|
|
9
|
+
* Spawn particles for all edges proportional to their value.
|
|
10
|
+
*/
|
|
11
|
+
export declare function spawnNetworkParticles(pool: ParticlePool, edges: RealtimeEdge[], deltaTime: number, style: ParticleStyle): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { StreamRendererFn } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Canvas point renderer.
|
|
4
|
+
* Renders PointSceneNode as circles. Used for Scatterplot, BubbleChart, and SwarmChart.
|
|
5
|
+
* Supports pulse glow effect via _pulseIntensity/_pulseColor fields.
|
|
6
|
+
*/
|
|
7
|
+
export declare const pointCanvasRenderer: StreamRendererFn;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { StreamRendererFn } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Canvas swarm renderer.
|
|
4
|
+
* Identical to point renderer — swarm data points are pre-computed as PointSceneNodes.
|
|
5
|
+
* Separated for semantic clarity and potential future swarm-specific logic.
|
|
6
|
+
*/
|
|
7
|
+
export declare const swarmCanvasRenderer: StreamRendererFn;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SceneNode, StreamScales, StreamLayout } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* A canvas renderer function takes pre-computed SceneNodes and paints them.
|
|
4
|
+
* Unlike the realtime RendererFn which receives raw data + scales,
|
|
5
|
+
* the StreamXYFrame renderers receive already-projected scene graph nodes.
|
|
6
|
+
*/
|
|
7
|
+
export type StreamRendererFn = (ctx: CanvasRenderingContext2D, nodes: SceneNode[], scales: StreamScales, layout: StreamLayout) => void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { StreamRendererFn } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Canvas waterfall renderer.
|
|
4
|
+
* Waterfall bars are pre-computed as RectSceneNodes by PipelineStore,
|
|
5
|
+
* so the rendering is identical to the bar renderer.
|
|
6
|
+
* Connector lines between bars are handled separately if needed.
|
|
7
|
+
*/
|
|
8
|
+
export declare const waterfallCanvasRenderer: StreamRendererFn;
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { ScaleLinear } from "d3-scale";
|
|
3
|
+
import type { ArrowOfTime, WindowMode, LineStyle, BarStyle, WaterfallStyle, SwarmStyle, HoverAnnotationConfig, HoverData, AnnotationContext } from "../realtime/types";
|
|
4
|
+
export interface DecayConfig {
|
|
5
|
+
type: "linear" | "exponential" | "step";
|
|
6
|
+
/** Exponential: half-life in buffer positions (default: bufferSize/2) */
|
|
7
|
+
halfLife?: number;
|
|
8
|
+
/** Minimum opacity floor (default: 0.1) */
|
|
9
|
+
minOpacity?: number;
|
|
10
|
+
/** Step: positions from newest before fading (default: bufferSize*0.5) */
|
|
11
|
+
stepThreshold?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface PulseConfig {
|
|
14
|
+
/** Duration of the pulse glow in ms (default: 500) */
|
|
15
|
+
duration?: number;
|
|
16
|
+
/** Glow color (default: "rgba(255,255,255,0.6)") */
|
|
17
|
+
color?: string;
|
|
18
|
+
/** Extra px radius for glow ring on points (default: 4) */
|
|
19
|
+
glowRadius?: number;
|
|
20
|
+
}
|
|
21
|
+
export interface TransitionConfig {
|
|
22
|
+
/** Animation duration in ms (default: 300) */
|
|
23
|
+
duration?: number;
|
|
24
|
+
/** Easing function (default: "ease-out") */
|
|
25
|
+
easing?: "ease-out" | "linear";
|
|
26
|
+
}
|
|
27
|
+
export interface StalenessConfig {
|
|
28
|
+
/** ms without data before "stale" (default: 5000) */
|
|
29
|
+
threshold?: number;
|
|
30
|
+
/** Canvas alpha when stale (default: 0.5) */
|
|
31
|
+
dimOpacity?: number;
|
|
32
|
+
/** Render LIVE/STALE badge (default: false) */
|
|
33
|
+
showBadge?: boolean;
|
|
34
|
+
/** Badge position (default: "top-right") */
|
|
35
|
+
badgePosition?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
36
|
+
}
|
|
37
|
+
export type MarginalType = "histogram" | "violin" | "ridgeline" | "boxplot";
|
|
38
|
+
export interface MarginalConfig {
|
|
39
|
+
type: MarginalType;
|
|
40
|
+
/** Number of bins for histogram/violin/ridgeline @default 20 */
|
|
41
|
+
bins?: number;
|
|
42
|
+
/** Fill color @default "#4e79a7" */
|
|
43
|
+
fill?: string;
|
|
44
|
+
/** Fill opacity @default 0.5 */
|
|
45
|
+
fillOpacity?: number;
|
|
46
|
+
/** Stroke color @default "none" */
|
|
47
|
+
stroke?: string;
|
|
48
|
+
/** Stroke width @default 1 */
|
|
49
|
+
strokeWidth?: number;
|
|
50
|
+
}
|
|
51
|
+
export interface MarginalGraphicsConfig {
|
|
52
|
+
top?: MarginalConfig | MarginalType;
|
|
53
|
+
bottom?: MarginalConfig | MarginalType;
|
|
54
|
+
left?: MarginalConfig | MarginalType;
|
|
55
|
+
right?: MarginalConfig | MarginalType;
|
|
56
|
+
}
|
|
57
|
+
export type StreamChartType = "line" | "area" | "stackedarea" | "scatter" | "bubble" | "heatmap" | "bar" | "swarm" | "waterfall" | "candlestick";
|
|
58
|
+
export type RuntimeMode = "bounded" | "streaming";
|
|
59
|
+
export interface Style {
|
|
60
|
+
stroke?: string;
|
|
61
|
+
strokeWidth?: number;
|
|
62
|
+
strokeDasharray?: string;
|
|
63
|
+
fill?: string;
|
|
64
|
+
fillOpacity?: number;
|
|
65
|
+
opacity?: number;
|
|
66
|
+
/** For icon/isotype bars: an image to stamp instead of filling */
|
|
67
|
+
icon?: HTMLImageElement | HTMLCanvasElement;
|
|
68
|
+
/** Padding between stamped icons */
|
|
69
|
+
iconPadding?: number;
|
|
70
|
+
}
|
|
71
|
+
export type SceneNode = LineSceneNode | AreaSceneNode | PointSceneNode | RectSceneNode | HeatcellSceneNode | CandlestickSceneNode;
|
|
72
|
+
export interface LineColorThreshold {
|
|
73
|
+
value: number;
|
|
74
|
+
color: string;
|
|
75
|
+
thresholdType: "greater" | "lesser";
|
|
76
|
+
}
|
|
77
|
+
export interface LineSceneNode {
|
|
78
|
+
type: "line";
|
|
79
|
+
path: [number, number][];
|
|
80
|
+
/** Raw y-values corresponding to each path point (for threshold coloring) */
|
|
81
|
+
rawValues?: number[];
|
|
82
|
+
/** Threshold-based color segments */
|
|
83
|
+
colorThresholds?: LineColorThreshold[];
|
|
84
|
+
style: Style;
|
|
85
|
+
datum: any;
|
|
86
|
+
group?: string;
|
|
87
|
+
}
|
|
88
|
+
export interface AreaSceneNode {
|
|
89
|
+
type: "area";
|
|
90
|
+
topPath: [number, number][];
|
|
91
|
+
bottomPath: [number, number][];
|
|
92
|
+
style: Style;
|
|
93
|
+
datum: any;
|
|
94
|
+
group?: string;
|
|
95
|
+
/** When false, skip hit testing (used for decorative bounds areas) */
|
|
96
|
+
interactive?: boolean;
|
|
97
|
+
}
|
|
98
|
+
export interface PointSceneNode {
|
|
99
|
+
type: "point";
|
|
100
|
+
x: number;
|
|
101
|
+
y: number;
|
|
102
|
+
r: number;
|
|
103
|
+
style: Style;
|
|
104
|
+
datum: any;
|
|
105
|
+
/** Pulse glow intensity 0–1 (set by PipelineStore when pulse is active) */
|
|
106
|
+
_pulseIntensity?: number;
|
|
107
|
+
/** Pulse glow color */
|
|
108
|
+
_pulseColor?: string;
|
|
109
|
+
/** Animation target fields (set during transitions) */
|
|
110
|
+
_targetX?: number;
|
|
111
|
+
_targetY?: number;
|
|
112
|
+
_targetR?: number;
|
|
113
|
+
_decayOpacity?: number;
|
|
114
|
+
}
|
|
115
|
+
export interface RectSceneNode {
|
|
116
|
+
type: "rect";
|
|
117
|
+
x: number;
|
|
118
|
+
y: number;
|
|
119
|
+
w: number;
|
|
120
|
+
h: number;
|
|
121
|
+
style: Style;
|
|
122
|
+
datum: any;
|
|
123
|
+
group?: string;
|
|
124
|
+
_pulseIntensity?: number;
|
|
125
|
+
_pulseColor?: string;
|
|
126
|
+
/** Animation target fields (set during transitions) */
|
|
127
|
+
_targetX?: number;
|
|
128
|
+
_targetY?: number;
|
|
129
|
+
_targetW?: number;
|
|
130
|
+
_targetH?: number;
|
|
131
|
+
_decayOpacity?: number;
|
|
132
|
+
}
|
|
133
|
+
export interface HeatcellSceneNode {
|
|
134
|
+
type: "heatcell";
|
|
135
|
+
x: number;
|
|
136
|
+
y: number;
|
|
137
|
+
w: number;
|
|
138
|
+
h: number;
|
|
139
|
+
fill: string;
|
|
140
|
+
datum: any;
|
|
141
|
+
_pulseIntensity?: number;
|
|
142
|
+
_pulseColor?: string;
|
|
143
|
+
/** Animation target fields (set during transitions) */
|
|
144
|
+
_targetX?: number;
|
|
145
|
+
_targetY?: number;
|
|
146
|
+
_targetW?: number;
|
|
147
|
+
_targetH?: number;
|
|
148
|
+
_decayOpacity?: number;
|
|
149
|
+
}
|
|
150
|
+
export interface CandlestickSceneNode {
|
|
151
|
+
type: "candlestick";
|
|
152
|
+
x: number;
|
|
153
|
+
openY: number;
|
|
154
|
+
closeY: number;
|
|
155
|
+
highY: number;
|
|
156
|
+
lowY: number;
|
|
157
|
+
bodyWidth: number;
|
|
158
|
+
upColor: string;
|
|
159
|
+
downColor: string;
|
|
160
|
+
wickColor: string;
|
|
161
|
+
wickWidth: number;
|
|
162
|
+
isUp: boolean;
|
|
163
|
+
datum: any;
|
|
164
|
+
_pulseIntensity?: number;
|
|
165
|
+
_pulseColor?: string;
|
|
166
|
+
}
|
|
167
|
+
export interface CandlestickStyle {
|
|
168
|
+
upColor?: string;
|
|
169
|
+
downColor?: string;
|
|
170
|
+
wickColor?: string;
|
|
171
|
+
bodyWidth?: number;
|
|
172
|
+
wickWidth?: number;
|
|
173
|
+
}
|
|
174
|
+
export interface Changeset<T = Record<string, any>> {
|
|
175
|
+
inserts: T[];
|
|
176
|
+
bounded: boolean;
|
|
177
|
+
/** Hint: total dataset size when progressively chunking bounded data */
|
|
178
|
+
totalSize?: number;
|
|
179
|
+
}
|
|
180
|
+
export interface StreamScales {
|
|
181
|
+
x: ScaleLinear<number, number>;
|
|
182
|
+
y: ScaleLinear<number, number>;
|
|
183
|
+
}
|
|
184
|
+
export interface StreamLayout {
|
|
185
|
+
width: number;
|
|
186
|
+
height: number;
|
|
187
|
+
}
|
|
188
|
+
export type CurveType = "linear" | "monotoneX" | "monotoneY" | "step" | "stepAfter" | "stepBefore" | "basis" | "cardinal" | "catmullRom";
|
|
189
|
+
export interface StreamXYFrameProps<T = Record<string, any>> {
|
|
190
|
+
chartType: StreamChartType;
|
|
191
|
+
runtimeMode?: RuntimeMode;
|
|
192
|
+
data?: T[];
|
|
193
|
+
xAccessor?: string | ((d: T) => number);
|
|
194
|
+
yAccessor?: string | ((d: T) => number);
|
|
195
|
+
colorAccessor?: string | ((d: T) => string);
|
|
196
|
+
sizeAccessor?: string | ((d: T) => number);
|
|
197
|
+
groupAccessor?: string | ((d: T) => string);
|
|
198
|
+
lineDataAccessor?: string;
|
|
199
|
+
curve?: CurveType;
|
|
200
|
+
normalize?: boolean;
|
|
201
|
+
/**
|
|
202
|
+
* Accessor returning a symmetric uncertainty offset per datum.
|
|
203
|
+
* When set, an uncertainty band is drawn ± this offset from the line.
|
|
204
|
+
*/
|
|
205
|
+
boundsAccessor?: string | ((d: T) => number);
|
|
206
|
+
/**
|
|
207
|
+
* Style for bounds/uncertainty areas.
|
|
208
|
+
* If omitted, defaults to the line color at 0.2 opacity.
|
|
209
|
+
*/
|
|
210
|
+
boundsStyle?: Style | ((d: T, group?: string) => Style);
|
|
211
|
+
openAccessor?: string | ((d: T) => number);
|
|
212
|
+
highAccessor?: string | ((d: T) => number);
|
|
213
|
+
lowAccessor?: string | ((d: T) => number);
|
|
214
|
+
closeAccessor?: string | ((d: T) => number);
|
|
215
|
+
candlestickStyle?: CandlestickStyle;
|
|
216
|
+
binSize?: number;
|
|
217
|
+
valueAccessor?: string | ((d: T) => number);
|
|
218
|
+
arrowOfTime?: ArrowOfTime;
|
|
219
|
+
windowMode?: WindowMode;
|
|
220
|
+
windowSize?: number;
|
|
221
|
+
timeAccessor?: string | ((d: T) => number);
|
|
222
|
+
xExtent?: [number | undefined, number | undefined] | [number];
|
|
223
|
+
yExtent?: [number | undefined, number | undefined] | [number];
|
|
224
|
+
extentPadding?: number;
|
|
225
|
+
sizeRange?: [number, number];
|
|
226
|
+
size?: [number, number];
|
|
227
|
+
margin?: {
|
|
228
|
+
top?: number;
|
|
229
|
+
right?: number;
|
|
230
|
+
bottom?: number;
|
|
231
|
+
left?: number;
|
|
232
|
+
};
|
|
233
|
+
className?: string;
|
|
234
|
+
background?: string;
|
|
235
|
+
lineStyle?: LineStyle | ((d: T, group?: string) => Style);
|
|
236
|
+
pointStyle?: (d: T) => Style & {
|
|
237
|
+
r?: number;
|
|
238
|
+
};
|
|
239
|
+
areaStyle?: (d: T) => Style;
|
|
240
|
+
barStyle?: BarStyle;
|
|
241
|
+
waterfallStyle?: WaterfallStyle;
|
|
242
|
+
swarmStyle?: SwarmStyle;
|
|
243
|
+
barColors?: Record<string, string>;
|
|
244
|
+
colorScheme?: string | string[];
|
|
245
|
+
showAxes?: boolean;
|
|
246
|
+
xLabel?: string;
|
|
247
|
+
yLabel?: string;
|
|
248
|
+
xFormat?: (d: any) => string;
|
|
249
|
+
yFormat?: (d: any) => string;
|
|
250
|
+
tickFormatTime?: (value: number) => string;
|
|
251
|
+
tickFormatValue?: (value: number) => string;
|
|
252
|
+
hoverAnnotation?: boolean | HoverAnnotationConfig;
|
|
253
|
+
tooltipContent?: (d: HoverData) => ReactNode;
|
|
254
|
+
customHoverBehavior?: (d: HoverData | null) => void;
|
|
255
|
+
enableHover?: boolean;
|
|
256
|
+
/** Brush configuration — when provided, an SVG brush overlay is rendered */
|
|
257
|
+
brush?: {
|
|
258
|
+
/** Which dimension(s) to brush: "x", "y", or "xy" (default "xy") */
|
|
259
|
+
dimension?: "x" | "y" | "xy";
|
|
260
|
+
};
|
|
261
|
+
/** Callback when brush selection changes. Called with data-space extent, or null when cleared. */
|
|
262
|
+
onBrush?: (extent: {
|
|
263
|
+
x: [number, number];
|
|
264
|
+
y: [number, number];
|
|
265
|
+
} | null) => void;
|
|
266
|
+
annotations?: Record<string, any>[];
|
|
267
|
+
svgAnnotationRules?: (annotation: Record<string, any>, index: number, context: AnnotationContext) => ReactNode;
|
|
268
|
+
showGrid?: boolean;
|
|
269
|
+
legend?: ReactNode | {
|
|
270
|
+
legendGroups: any[];
|
|
271
|
+
};
|
|
272
|
+
/** SVG elements rendered behind the canvas (in pixel space) */
|
|
273
|
+
backgroundGraphics?: ReactNode;
|
|
274
|
+
/** SVG elements rendered on top of everything (in SVG overlay) */
|
|
275
|
+
foregroundGraphics?: ReactNode;
|
|
276
|
+
title?: string | ReactNode;
|
|
277
|
+
categoryAccessor?: string | ((d: T) => string);
|
|
278
|
+
/** Configurable opacity decay for older data points */
|
|
279
|
+
decay?: DecayConfig;
|
|
280
|
+
/** Flash effect on newly inserted data points */
|
|
281
|
+
pulse?: PulseConfig;
|
|
282
|
+
/** Smooth position transitions on data change */
|
|
283
|
+
transition?: TransitionConfig;
|
|
284
|
+
/** Frame-level data liveness indicator */
|
|
285
|
+
staleness?: StalenessConfig;
|
|
286
|
+
/** Marginal distribution plots in axis margins (histogram, violin, ridgeline, boxplot) */
|
|
287
|
+
marginalGraphics?: MarginalGraphicsConfig;
|
|
288
|
+
/** Aggregation mode for streaming heatmap (count, sum, mean) */
|
|
289
|
+
heatmapAggregation?: "count" | "sum" | "mean";
|
|
290
|
+
/** Number of x-axis bins for streaming heatmap (default: 20) */
|
|
291
|
+
heatmapXBins?: number;
|
|
292
|
+
/** Number of y-axis bins for streaming heatmap (default: 20) */
|
|
293
|
+
heatmapYBins?: number;
|
|
294
|
+
}
|
|
295
|
+
export interface StreamXYFrameHandle<T = Record<string, any>> {
|
|
296
|
+
push(datum: T): void;
|
|
297
|
+
pushMany(data: T[]): void;
|
|
298
|
+
clear(): void;
|
|
299
|
+
getData(): T[];
|
|
300
|
+
getScales(): StreamScales | null;
|
|
301
|
+
getExtents(): {
|
|
302
|
+
x: [number, number];
|
|
303
|
+
y: [number, number];
|
|
304
|
+
} | null;
|
|
305
|
+
}
|
|
306
|
+
export type CanvasRendererFn = (ctx: CanvasRenderingContext2D, nodes: SceneNode[], scales: StreamScales, layout: StreamLayout) => void;
|
|
307
|
+
export type { ArrowOfTime, WindowMode, LineStyle, BarStyle, WaterfallStyle, SwarmStyle, HoverAnnotationConfig, HoverData, AnnotationContext };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { RawPoint,
|
|
2
|
-
import { NodeType } from "./networkTypes";
|
|
1
|
+
import { RawPoint, MarginType, AxisSummaryTypeSettings, OrdinalSummaryTypes } from "./generalTypes";
|
|
2
|
+
import { NodeType, EdgeType } from "./networkTypes";
|
|
3
3
|
import { ScaleLinear } from "d3-scale";
|
|
4
|
-
export
|
|
5
|
-
type?: string
|
|
4
|
+
export type AnnotationType = {
|
|
5
|
+
type?: string;
|
|
6
6
|
column?: {
|
|
7
7
|
name: string;
|
|
8
8
|
};
|
|
@@ -16,9 +16,9 @@ export declare type AnnotationType = {
|
|
|
16
16
|
coordinates?: object[];
|
|
17
17
|
key?: string;
|
|
18
18
|
percent?: number;
|
|
19
|
-
style?:
|
|
19
|
+
style?: Record<string, any> | ((arg?: Record<string, any>, index?: number) => Record<string, any>);
|
|
20
20
|
ids?: string[];
|
|
21
|
-
edge?:
|
|
21
|
+
edge?: EdgeType;
|
|
22
22
|
source?: NodeType;
|
|
23
23
|
target?: NodeType;
|
|
24
24
|
id?: string;
|
|
@@ -27,8 +27,8 @@ export declare type AnnotationType = {
|
|
|
27
27
|
neighbors?: object[];
|
|
28
28
|
isColumnAnnotation?: boolean;
|
|
29
29
|
};
|
|
30
|
-
export
|
|
31
|
-
export
|
|
30
|
+
export type CustomHoverType = boolean | Array<AnnotationType | Function> | object | Function | "all" | "edge" | "node" | "area";
|
|
31
|
+
export type AnnotationTypes = "marginalia" | "bump" | false;
|
|
32
32
|
interface AnnotationLayout {
|
|
33
33
|
type: AnnotationTypes;
|
|
34
34
|
orient?: "nearest" | "left" | "right" | "top" | "bottom" | Array<string>;
|
|
@@ -57,11 +57,7 @@ export interface AnnotationProps {
|
|
|
57
57
|
noteData: {
|
|
58
58
|
eventListeners?: object;
|
|
59
59
|
events?: object;
|
|
60
|
-
|
|
61
|
-
onDragStart?: Function;
|
|
62
|
-
onDrag?: Function;
|
|
63
|
-
type: string | Function;
|
|
64
|
-
editMode?: boolean;
|
|
60
|
+
type: string;
|
|
65
61
|
screenCoordinates?: Array<Array<number>>;
|
|
66
62
|
coordinates?: boolean;
|
|
67
63
|
noteHeight?: Function | number;
|
|
@@ -81,12 +77,12 @@ export interface AnnotationProps {
|
|
|
81
77
|
label?: string;
|
|
82
78
|
};
|
|
83
79
|
}
|
|
84
|
-
|
|
80
|
+
type GlyphProps = {
|
|
85
81
|
lineHeight: number;
|
|
86
82
|
lineWidth: number;
|
|
87
83
|
value: number;
|
|
88
84
|
};
|
|
89
|
-
|
|
85
|
+
type AxisPart = {
|
|
90
86
|
value: number;
|
|
91
87
|
};
|
|
92
88
|
export interface AxisProps {
|
|
@@ -114,11 +110,10 @@ export interface AxisProps {
|
|
|
114
110
|
ticks?: number;
|
|
115
111
|
footer?: boolean;
|
|
116
112
|
tickSize?: number;
|
|
117
|
-
tickLineGenerator?: ({ xy, orient, i,
|
|
113
|
+
tickLineGenerator?: ({ xy, orient, i, className }: {
|
|
118
114
|
xy?: object;
|
|
119
115
|
orient?: string;
|
|
120
116
|
i?: number;
|
|
121
|
-
baseMarkProps?: object;
|
|
122
117
|
className?: string;
|
|
123
118
|
}) => SVGElement;
|
|
124
119
|
baseline?: boolean | "under";
|
|
@@ -136,5 +131,5 @@ export interface AxisProps {
|
|
|
136
131
|
marginalSummaryType?: AxisSummaryTypeSettings | OrdinalSummaryTypes;
|
|
137
132
|
showOutboundTickLines?: boolean;
|
|
138
133
|
}
|
|
139
|
-
export
|
|
134
|
+
export type AxisGeneratingFunction = (args: object) => AxisProps;
|
|
140
135
|
export {};
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { CustomHoverType, AnnotationHandling } from "./annotationTypes";
|
|
3
|
-
import { TitleType } from "../svg/frameFunctions";
|
|
4
2
|
import { Interactivity, AdvancedInteractionSettings } from "./interactionTypes";
|
|
3
|
+
export type TitleType = string | Element | {
|
|
4
|
+
title?: string | Element;
|
|
5
|
+
orient?: string;
|
|
6
|
+
};
|
|
5
7
|
import { LegendProps } from "./legendTypes";
|
|
6
8
|
import { AxisProps } from "./annotationTypes";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
9
|
+
/** @deprecated Use Record<string, any> instead */
|
|
10
|
+
export type GenericObject = Record<string, any>;
|
|
10
11
|
export interface MarginType {
|
|
11
12
|
top: number;
|
|
12
13
|
bottom: number;
|
|
13
14
|
left: number;
|
|
14
15
|
right: number;
|
|
15
16
|
}
|
|
16
|
-
export
|
|
17
|
-
export
|
|
17
|
+
export type ProjectionTypes = "vertical" | "horizontal" | "radial";
|
|
18
|
+
export type ExtentType = number[] | {
|
|
18
19
|
extent?: number[];
|
|
19
20
|
onChange?: Function;
|
|
20
21
|
includeAnnotations?: boolean;
|
|
@@ -37,13 +38,13 @@ export interface ProjectedPoint {
|
|
|
37
38
|
class?: Function | string;
|
|
38
39
|
coordinates?: object[];
|
|
39
40
|
}
|
|
40
|
-
export
|
|
41
|
+
export type PieceLayoutType = (args: {
|
|
41
42
|
type: string | {
|
|
42
43
|
type: string;
|
|
43
44
|
};
|
|
44
|
-
data: any
|
|
45
|
-
renderMode: (d?:
|
|
46
|
-
eventListenersGenerator:
|
|
45
|
+
data: Record<string, any>;
|
|
46
|
+
renderMode: (d?: Record<string, any>, i?: number) => string | Record<string, any>;
|
|
47
|
+
eventListenersGenerator: (d: object, i: number) => Record<string, Function>;
|
|
47
48
|
styleFn: (d: object) => object;
|
|
48
49
|
projection: string;
|
|
49
50
|
classFn: (d: object) => string;
|
|
@@ -51,8 +52,7 @@ export declare type PieceLayoutType = (args: {
|
|
|
51
52
|
chartSize: number[];
|
|
52
53
|
margin: MarginType;
|
|
53
54
|
rScale?: Function;
|
|
54
|
-
|
|
55
|
-
}) => GenericObject[];
|
|
55
|
+
}) => Record<string, any>[];
|
|
56
56
|
export interface ProjectedLine {
|
|
57
57
|
data: ProjectedPoint[];
|
|
58
58
|
key: string | number;
|
|
@@ -69,7 +69,7 @@ export interface ProjectedSummary {
|
|
|
69
69
|
data: object[];
|
|
70
70
|
y: number;
|
|
71
71
|
x: number;
|
|
72
|
-
parentSummary?:
|
|
72
|
+
parentSummary?: Record<string, any>;
|
|
73
73
|
bounds: object[] | number[];
|
|
74
74
|
customMark?: Function;
|
|
75
75
|
type?: string;
|
|
@@ -77,27 +77,28 @@ export interface ProjectedSummary {
|
|
|
77
77
|
processedData?: boolean;
|
|
78
78
|
binMax?: number;
|
|
79
79
|
}
|
|
80
|
-
export
|
|
80
|
+
export type RoughType = {
|
|
81
81
|
canvas: Function;
|
|
82
82
|
generator: Function;
|
|
83
83
|
};
|
|
84
|
-
export
|
|
85
|
-
export
|
|
84
|
+
export type CanvasPostProcessTypes = Function;
|
|
85
|
+
export type ExtentSettingsType = {
|
|
86
86
|
extent?: Array<number>;
|
|
87
87
|
onChange?: Function;
|
|
88
88
|
};
|
|
89
|
-
export
|
|
89
|
+
export type accessorType<ReturnValue> = string | ((args?: unknown, index?: number) => ReturnValue);
|
|
90
|
+
export type DataAccessor<TDatum, ReturnValue> = (keyof TDatum & string) | ((datum: TDatum, index?: number) => ReturnValue);
|
|
90
91
|
export interface AccessorFnType {
|
|
91
|
-
<T>(arg:
|
|
92
|
+
<T>(arg: Record<string, any>): T;
|
|
92
93
|
}
|
|
93
|
-
export
|
|
94
|
+
export type BasicLineTypes = "line" | "area" | "summary" | "cumulative" | "cumulative-reverse" | "linepercent" | "stackedarea" | "stackedarea-invert" | "stackedpercent" | "bumparea" | "bumparea-invert" | "bumpline" | "stackedpercent-invert" | "difference";
|
|
94
95
|
export interface LineTypeSettings {
|
|
95
96
|
type: BasicLineTypes | Function;
|
|
96
97
|
simpleLine?: boolean;
|
|
97
98
|
y1?: (d?: ProjectedPoint, index?: number) => number;
|
|
98
99
|
interpolator: string | Function;
|
|
99
100
|
}
|
|
100
|
-
export
|
|
101
|
+
export type BasicSummaryTypes = "basic" | "contour" | "hexbin" | "heatmap" | "trendline" | "linebounds";
|
|
101
102
|
export interface SummaryTypeSettings {
|
|
102
103
|
showSlope?: boolean;
|
|
103
104
|
type: BasicSummaryTypes | Function;
|
|
@@ -112,19 +113,18 @@ export interface SummaryTypeSettings {
|
|
|
112
113
|
binMax?: number;
|
|
113
114
|
customMark?: Function;
|
|
114
115
|
}
|
|
115
|
-
export interface RawLine {
|
|
116
|
-
coordinates?:
|
|
116
|
+
export interface RawLine<TDatum = Record<string, any>> {
|
|
117
|
+
coordinates?: TDatum[];
|
|
117
118
|
}
|
|
118
|
-
export interface RawSummary {
|
|
119
|
-
processedData?:
|
|
120
|
-
coordinates?:
|
|
119
|
+
export interface RawSummary<TDatum = Record<string, any>> {
|
|
120
|
+
processedData?: TDatum[];
|
|
121
|
+
coordinates?: TDatum[];
|
|
121
122
|
preprocess?: boolean;
|
|
122
123
|
}
|
|
123
|
-
export interface RawPoint {
|
|
124
|
+
export interface RawPoint<TDatum = Record<string, any>> {
|
|
124
125
|
}
|
|
125
126
|
export interface CustomAreaMarkProps {
|
|
126
127
|
d: object;
|
|
127
|
-
baseMarkProps: object;
|
|
128
128
|
margin: object;
|
|
129
129
|
styleFn: Function;
|
|
130
130
|
classFn: Function;
|
|
@@ -144,11 +144,11 @@ export interface ProjectedBin {
|
|
|
144
144
|
parentSummary: object;
|
|
145
145
|
centroid: boolean;
|
|
146
146
|
}
|
|
147
|
-
export
|
|
148
|
-
export
|
|
149
|
-
export
|
|
147
|
+
export type GenericAccessor<GenericValue> = (args?: Record<string, any>, index?: number) => GenericValue;
|
|
148
|
+
export type VizLayerTypes = "pieces" | "summaries" | "connectors" | "edges" | "nodes" | "lines" | "points";
|
|
149
|
+
export type RenderPipelineType = {
|
|
150
150
|
[key in VizLayerTypes]?: {
|
|
151
|
-
data?:
|
|
151
|
+
data?: object[];
|
|
152
152
|
ariaLabel?: {
|
|
153
153
|
chart?: string;
|
|
154
154
|
items?: string;
|
|
@@ -157,8 +157,8 @@ export declare type RenderPipelineType = {
|
|
|
157
157
|
styleFn?: Function;
|
|
158
158
|
};
|
|
159
159
|
};
|
|
160
|
-
export
|
|
161
|
-
export
|
|
160
|
+
export type OrdinalSummaryTypes = "none" | "histogram" | "heatmap" | "violin" | "joy" | "ridgeline" | "boxplot" | "contour";
|
|
161
|
+
export type OrdinalSummaryTypeSettings = {
|
|
162
162
|
type: OrdinalSummaryTypes;
|
|
163
163
|
amplitude?: number;
|
|
164
164
|
eventListenersGenerator?: Function;
|
|
@@ -175,8 +175,13 @@ export interface AxisSummaryTypeSettings extends OrdinalSummaryTypeSettings {
|
|
|
175
175
|
showPoints?: boolean;
|
|
176
176
|
filter?: Function;
|
|
177
177
|
}
|
|
178
|
+
export interface TransitionConfig {
|
|
179
|
+
/** Duration in milliseconds. @default 300 */
|
|
180
|
+
duration?: number;
|
|
181
|
+
/** CSS easing function. @default "ease" */
|
|
182
|
+
ease?: string;
|
|
183
|
+
}
|
|
178
184
|
export interface GeneralFrameProps {
|
|
179
|
-
useSpans?: boolean;
|
|
180
185
|
title?: string | object;
|
|
181
186
|
margin?: number | {
|
|
182
187
|
top?: number;
|
|
@@ -207,7 +212,6 @@ export interface GeneralFrameProps {
|
|
|
207
212
|
tooltipContent?: Function;
|
|
208
213
|
optimizeCustomTooltipPosition?: boolean;
|
|
209
214
|
annotations?: object[];
|
|
210
|
-
baseMarkProps?: object;
|
|
211
215
|
backgroundGraphics?: React.ReactNode | Function;
|
|
212
216
|
foregroundGraphics?: React.ReactNode | Function;
|
|
213
217
|
beforeElements?: React.ReactNode;
|
|
@@ -222,6 +226,7 @@ export interface GeneralFrameProps {
|
|
|
222
226
|
disableCanvasInteraction?: boolean;
|
|
223
227
|
interactionSettings?: AdvancedInteractionSettings;
|
|
224
228
|
disableProgressiveRendering?: boolean;
|
|
229
|
+
transition?: boolean | TransitionConfig;
|
|
225
230
|
}
|
|
226
231
|
export interface GeneralFrameState {
|
|
227
232
|
dataVersion?: string;
|