semiotic 3.7.4 → 3.8.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 +60 -15
- package/README.md +135 -24
- package/agent-skill/semiotic-charts/SKILL.md +146 -0
- package/ai/cli.js +133 -45
- package/ai/componentMetadata.cjs +6 -1
- package/ai/dist/mcp-server.js +1651 -154
- package/ai/examples.md +174 -0
- package/ai/schema.json +2934 -517
- package/ai/surface-manifest.json +200 -0
- package/ai/system-prompt.md +19 -3
- package/dist/components/Annotation.d.ts +4 -0
- package/dist/components/CategoryColors.d.ts +1 -1
- package/dist/components/ChartContainer.d.ts +91 -0
- package/dist/components/ChartGrid.d.ts +11 -1
- package/dist/components/CircularBrush.d.ts +61 -0
- package/dist/components/ContextLayout.d.ts +5 -1
- package/dist/components/DataSummaryContext.d.ts +1 -0
- package/dist/components/DirectManipulationControl.d.ts +63 -0
- package/dist/components/LinkedCharts.d.ts +3 -1
- package/dist/components/MobileAnnotationCalloutList.d.ts +13 -0
- package/dist/components/MobileChartContainer.d.ts +51 -0
- package/dist/components/MobileStandardControls.d.ts +68 -0
- package/dist/components/SmallMultipleChart.d.ts +84 -0
- package/dist/components/Tooltip/FlippingTooltip.d.ts +21 -0
- package/dist/components/ai/ChartRecipe.d.ts +16 -0
- package/dist/components/ai/IntentMark.d.ts +15 -0
- package/dist/components/ai/chartCapabilities.d.ts +8 -1
- package/dist/components/ai/chartCapabilityTypes.d.ts +42 -1
- package/dist/components/ai/chartClinic.d.ts +91 -0
- package/dist/components/ai/chartRecipeRegistry.d.ts +14 -0
- package/dist/components/ai/chartRecipes.d.ts +278 -0
- package/dist/components/ai/dataPitfallsBridge.d.ts +203 -0
- package/dist/components/ai/dataQualityBridge.d.ts +201 -0
- package/dist/components/ai/describeChart.d.ts +9 -0
- package/dist/components/ai/describeRecipeChart.d.ts +16 -0
- package/dist/components/ai/generativeChart.d.ts +170 -0
- package/dist/components/ai/intentManifest.d.ts +62 -0
- package/dist/components/ai/navigationTree.d.ts +3 -0
- package/dist/components/ai/observedSceneAudit.d.ts +72 -0
- package/dist/components/ai/readerGrounding.d.ts +83 -0
- package/dist/components/ai/recipeCapability.d.ts +8 -0
- package/dist/components/ai/recipeNavigation.d.ts +13 -0
- package/dist/components/ai/recipeSemantics.d.ts +11 -0
- package/dist/components/ai/repairChartConfig.d.ts +9 -0
- package/dist/components/ai/suggestCharts.d.ts +11 -1
- package/dist/components/charts/custom/GeoCustomChart.d.ts +48 -0
- package/dist/components/charts/custom/NetworkCustomChart.d.ts +22 -3
- package/dist/components/charts/custom/OrdinalCustomChart.d.ts +8 -2
- package/dist/components/charts/custom/XYCustomChart.d.ts +11 -2
- package/dist/components/charts/geo/DistanceCartogram.d.ts +1 -1
- package/dist/components/charts/geo/FlowMap.d.ts +1 -1
- package/dist/components/charts/geo/ProportionalSymbolMap.d.ts +1 -1
- package/dist/components/charts/geo/index.d.ts +2 -0
- package/dist/components/charts/index.d.ts +29 -1
- package/dist/components/charts/network/ChordDiagram.d.ts +1 -1
- package/dist/components/charts/network/CirclePack.d.ts +1 -1
- package/dist/components/charts/network/ForceDirectedGraph.d.ts +15 -5
- package/dist/components/charts/network/OrbitDiagram.d.ts +1 -1
- package/dist/components/charts/network/ProcessSankey.d.ts +1 -1
- package/dist/components/charts/network/SankeyDiagram.d.ts +1 -1
- package/dist/components/charts/network/TreeDiagram.d.ts +1 -1
- package/dist/components/charts/network/Treemap.d.ts +1 -1
- package/dist/components/charts/network/useForceLayout.d.ts +17 -0
- package/dist/components/charts/ordinal/BarChart.d.ts +1 -1
- package/dist/components/charts/ordinal/BoxPlot.d.ts +1 -1
- package/dist/components/charts/ordinal/DonutChart.d.ts +1 -1
- package/dist/components/charts/ordinal/DotPlot.d.ts +1 -1
- package/dist/components/charts/ordinal/FunnelChart.d.ts +1 -1
- package/dist/components/charts/ordinal/GroupedBarChart.d.ts +1 -1
- package/dist/components/charts/ordinal/Histogram.d.ts +1 -1
- package/dist/components/charts/ordinal/PieChart.d.ts +1 -1
- package/dist/components/charts/ordinal/RidgelinePlot.d.ts +1 -1
- package/dist/components/charts/ordinal/StackedBarChart.d.ts +1 -1
- package/dist/components/charts/ordinal/SwarmPlot.d.ts +8 -1
- package/dist/components/charts/ordinal/SwimlaneChart.d.ts +1 -1
- package/dist/components/charts/ordinal/ViolinPlot.d.ts +1 -1
- package/dist/components/charts/physics/ChainReactionChart.d.ts +9 -0
- package/dist/components/charts/physics/CollisionSwarmChart.capability.d.ts +2 -0
- package/dist/components/charts/physics/CollisionSwarmChart.d.ts +47 -0
- package/dist/components/charts/physics/EventDropChart.capability.d.ts +2 -0
- package/dist/components/charts/physics/EventDropChart.d.ts +53 -0
- package/dist/components/charts/physics/GaltonBoardChart.capability.d.ts +2 -0
- package/dist/components/charts/physics/GaltonBoardChart.d.ts +66 -0
- package/dist/components/charts/physics/GauntletChart.capability.d.ts +2 -0
- package/dist/components/charts/physics/GauntletChart.d.ts +73 -0
- package/dist/components/charts/physics/PhysicalFlowChart.capability.d.ts +2 -0
- package/dist/components/charts/physics/PhysicalFlowChart.d.ts +63 -0
- package/dist/components/charts/physics/PhysicsCustomChart.d.ts +120 -0
- package/dist/components/charts/physics/PhysicsPileChart.capability.d.ts +2 -0
- package/dist/components/charts/physics/PhysicsPileChart.d.ts +53 -0
- package/dist/components/charts/physics/ProcessFlowChart.capability.d.ts +2 -0
- package/dist/components/charts/physics/ProcessFlowChart.d.ts +96 -0
- package/dist/components/charts/physics/chainReactionOverlay.d.ts +22 -0
- package/dist/components/charts/physics/chainReactionRuntime.d.ts +37 -0
- package/dist/components/charts/physics/chainReactionTypes.d.ts +97 -0
- package/dist/components/charts/physics/collisionSwarmPhysics.d.ts +27 -0
- package/dist/components/charts/physics/dependencyMachine.d.ts +188 -0
- package/dist/components/charts/physics/eventDropPhysics.d.ts +64 -0
- package/dist/components/charts/physics/galtonBoardPhysics.d.ts +28 -0
- package/dist/components/charts/physics/gauntletChartProps.d.ts +67 -0
- package/dist/components/charts/physics/gauntletChrome.d.ts +33 -0
- package/dist/components/charts/physics/gauntletController.d.ts +73 -0
- package/dist/components/charts/physics/gauntletEffects.d.ts +36 -0
- package/dist/components/charts/physics/gauntletPhysics.d.ts +71 -0
- package/dist/components/charts/physics/gauntletRuntime.d.ts +42 -0
- package/dist/components/charts/physics/gauntletTypes.d.ts +213 -0
- package/dist/components/charts/physics/physicalFlowPhysics.d.ts +57 -0
- package/dist/components/charts/physics/physicsChartShared.d.ts +41 -0
- package/dist/components/charts/physics/physicsChartUtils.d.ts +18 -0
- package/dist/components/charts/physics/physicsEncoding.d.ts +142 -0
- package/dist/components/charts/physics/physicsHocHandle.d.ts +53 -0
- package/dist/components/charts/physics/physicsHocUtils.d.ts +128 -0
- package/dist/components/charts/physics/physicsPilePhysics.d.ts +41 -0
- package/dist/components/charts/physics/physicsProcessPrimitives.d.ts +38 -0
- package/dist/components/charts/physics/processFlowPhysics.d.ts +97 -0
- package/dist/components/charts/realtime/RealtimeHeatmap.d.ts +9 -1
- package/dist/components/charts/realtime/RealtimeHistogram.d.ts +9 -1
- package/dist/components/charts/realtime/RealtimeLineChart.d.ts +30 -1
- package/dist/components/charts/realtime/RealtimeSwarmChart.d.ts +16 -2
- package/dist/components/charts/realtime/RealtimeWaterfallChart.d.ts +9 -1
- package/dist/components/charts/realtime/aggregate.d.ts +51 -0
- package/dist/components/charts/realtime/eventTime.d.ts +26 -0
- package/dist/components/charts/shared/auditMobileVisualization.d.ts +91 -0
- package/dist/components/charts/shared/chartDefinitionPilot.d.ts +145 -0
- package/dist/components/charts/shared/chartFamilySets.d.ts +20 -0
- package/dist/components/charts/shared/chartSpecCore.d.ts +165 -0
- package/dist/components/charts/shared/chartSpecs.d.ts +8 -127
- package/dist/components/charts/shared/chartSpecsGeo.d.ts +2 -0
- package/dist/components/charts/shared/chartSpecsNetwork.d.ts +2 -0
- package/dist/components/charts/shared/chartSpecsOrdinal.d.ts +2 -0
- package/dist/components/charts/shared/chartSpecsPhysics.d.ts +2 -0
- package/dist/components/charts/shared/chartSpecsRealtime.d.ts +2 -0
- package/dist/components/charts/shared/chartSpecsValue.d.ts +2 -0
- package/dist/components/charts/shared/chartSpecsXY.d.ts +2 -0
- package/dist/components/charts/shared/colorContrast.d.ts +3 -0
- package/dist/components/charts/shared/colorPalettes.d.ts +2 -0
- package/dist/components/charts/shared/colorUtils.d.ts +17 -13
- package/dist/components/charts/shared/diagnoseAnnotationChecks.d.ts +4 -0
- package/dist/components/charts/shared/diagnoseConfig.d.ts +9 -14
- package/dist/components/charts/shared/diagnoseMisleadingChecks.d.ts +9 -0
- package/dist/components/charts/shared/diagnosePhysicsChecks.d.ts +3 -0
- package/dist/components/charts/shared/diagnoseTypes.d.ts +10 -0
- package/dist/components/charts/shared/hooks.d.ts +28 -5
- package/dist/components/charts/shared/minMax.d.ts +3 -0
- package/dist/components/charts/shared/motionEncoding.d.ts +145 -0
- package/dist/components/charts/shared/radialGeometry.d.ts +0 -18
- package/dist/components/charts/shared/responsiveRules.d.ts +56 -0
- package/dist/components/charts/shared/smartTooltip.d.ts +27 -0
- package/dist/components/charts/shared/statisticalOverlays.d.ts +35 -0
- package/dist/components/charts/shared/streamPropsHelpers.d.ts +12 -2
- package/dist/components/charts/shared/temporalStrings.d.ts +7 -0
- package/dist/components/charts/shared/tooltipUtils.d.ts +2 -0
- package/dist/components/charts/shared/types.d.ts +49 -1
- package/dist/components/charts/shared/useChartSetup.d.ts +10 -3
- package/dist/components/charts/shared/useCustomChartSetup.d.ts +15 -6
- package/dist/components/charts/shared/useNetworkChartSetup.d.ts +6 -2
- package/dist/components/charts/shared/useOrdinalPieceStyle.d.ts +1 -1
- package/dist/components/charts/shared/useStreamingLegend.d.ts +1 -1
- package/dist/components/charts/shared/useSyncedPushData.d.ts +49 -0
- package/dist/components/charts/shared/validateChartData.d.ts +1 -1
- package/dist/components/charts/shared/validationMap.d.ts +0 -11
- package/dist/components/charts/xy/AreaChart.d.ts +1 -1
- package/dist/components/charts/xy/BubbleChart.d.ts +1 -1
- package/dist/components/charts/xy/LineChart.d.ts +1 -1
- package/dist/components/charts/xy/MinimapChart.d.ts +1 -1
- package/dist/components/charts/xy/MultiAxisLineChart.d.ts +2 -2
- package/dist/components/charts/xy/QuadrantChart.d.ts +1 -1
- package/dist/components/charts/xy/Scatterplot.d.ts +10 -1
- package/dist/components/charts/xy/ScatterplotMatrix.d.ts +11 -1
- package/dist/components/charts/xy/StackedAreaChart.d.ts +9 -4
- package/dist/components/controls/controlAudit.d.ts +24 -0
- package/dist/components/controls/controlContract.d.ts +57 -0
- package/dist/components/data/fromArrow.d.ts +54 -0
- package/dist/components/data/fromFlintChart.d.ts +74 -0
- package/dist/components/data/fromMermaid.d.ts +47 -0
- package/dist/components/data/fromObservablePlot.d.ts +69 -0
- package/dist/components/data/fromVegaLite.d.ts +27 -0
- package/dist/components/data/portability/index.d.ts +17 -0
- package/dist/components/data/portability/result.d.ts +52 -0
- package/dist/components/data/portability/spec.d.ts +160 -0
- package/dist/components/data/portability/vegaLite.d.ts +80 -0
- package/dist/components/export/chartConfig.d.ts +11 -0
- package/dist/components/realtime/ReorderBuffer.d.ts +54 -0
- package/dist/components/realtime/RunningStats.d.ts +66 -0
- package/dist/components/realtime/WindowAccumulator.d.ts +105 -0
- package/dist/components/realtime/parseWindowDuration.d.ts +12 -0
- package/dist/components/realtime/types.d.ts +11 -0
- package/dist/components/recipes/annotationLayout.d.ts +29 -0
- package/dist/components/recipes/axisFixedForce.d.ts +119 -0
- package/dist/components/recipes/boba.d.ts +23 -0
- package/dist/components/recipes/customTooltip.d.ts +31 -0
- package/dist/components/recipes/cyclical.d.ts +39 -0
- package/dist/components/recipes/edgeRouter.d.ts +103 -0
- package/dist/components/recipes/forceLayout.d.ts +48 -0
- package/dist/components/recipes/forceLayoutAsync.d.ts +17 -0
- package/dist/components/recipes/gofishBobaHandwritten.d.ts +3 -0
- package/dist/components/recipes/gofishDisplayListFixtures.generated.d.ts +37 -0
- package/dist/components/recipes/gofishIR.d.ts +215 -0
- package/dist/components/recipes/gofishIRExamples.d.ts +38 -0
- package/dist/components/recipes/intervalLanes.d.ts +87 -0
- package/dist/components/recipes/intervals.d.ts +80 -0
- package/dist/components/recipes/isometricLandmarks.d.ts +88 -0
- package/dist/components/recipes/isotypeGlyphs.d.ts +17 -0
- package/dist/components/recipes/mermaidDag.d.ts +44 -0
- package/dist/components/recipes/mobileAnnotationStrategy.d.ts +48 -0
- package/dist/components/recipes/mobileChartFamilyRecipes.d.ts +59 -0
- package/dist/components/recipes/networkAnalysis.d.ts +102 -0
- package/dist/components/recipes/networkLayouts.d.ts +83 -0
- package/dist/components/recipes/packedClusterMatrix.d.ts +166 -0
- package/dist/components/recipes/physics.d.ts +122 -0
- package/dist/components/recipes/physicsReference.d.ts +102 -0
- package/dist/components/recipes/processAggregates.d.ts +32 -0
- package/dist/components/recipes/processChrome.d.ts +67 -0
- package/dist/components/recipes/processJourney.d.ts +54 -0
- package/dist/components/recipes/processPhysics.d.ts +300 -0
- package/dist/components/recipes/processVolumeGeometry.d.ts +28 -0
- package/dist/components/recipes/radialCoords.d.ts +69 -0
- package/dist/components/recipes/random.d.ts +2 -0
- package/dist/components/recipes/recipeChrome.d.ts +191 -0
- package/dist/components/recipes/recipeGlyph.d.ts +42 -0
- package/dist/components/recipes/recipeLegend.d.ts +109 -0
- package/dist/components/recipes/recipeUtils.d.ts +157 -0
- package/dist/components/recipes/runs.d.ts +59 -0
- package/dist/components/recipes/tokenEncoding.d.ts +157 -0
- package/dist/components/recipes/tokenLayer.d.ts +79 -0
- package/dist/components/recipes/unitize.d.ts +108 -0
- package/dist/components/recipes/vector.d.ts +28 -0
- package/dist/components/recipes/waffle.d.ts +43 -0
- package/dist/components/semiotic-ai-core.d.ts +47 -0
- package/dist/components/semiotic-ai.d.ts +52 -4
- package/dist/components/semiotic-controls.d.ts +18 -0
- package/dist/components/semiotic-data.d.ts +2 -0
- package/dist/components/semiotic-experimental.d.ts +49 -0
- package/dist/components/semiotic-geo.d.ts +11 -0
- package/dist/components/semiotic-network.d.ts +14 -1
- package/dist/components/semiotic-ordinal.d.ts +10 -0
- package/dist/components/semiotic-physics-matter.d.ts +10 -0
- package/dist/components/semiotic-physics-rapier.d.ts +9 -0
- package/dist/components/semiotic-physics.d.ts +56 -0
- package/dist/components/semiotic-realtime-core.d.ts +34 -0
- package/dist/components/semiotic-realtime-react.d.ts +10 -0
- package/dist/components/semiotic-realtime.d.ts +4 -22
- package/dist/components/semiotic-recipes-core.d.ts +92 -0
- package/dist/components/semiotic-recipes-react.d.ts +7 -0
- package/dist/components/semiotic-recipes.d.ts +4 -26
- package/dist/components/semiotic-server-edge.d.ts +8 -0
- package/dist/components/semiotic-server-node.d.ts +5 -0
- package/dist/components/semiotic-server.d.ts +2 -2
- package/dist/components/semiotic-themes-core.d.ts +53 -0
- package/dist/components/semiotic-themes-react.d.ts +4 -0
- package/dist/components/semiotic-themes.d.ts +6 -74
- package/dist/components/semiotic-utils-core.d.ts +46 -0
- package/dist/components/semiotic-utils-react.d.ts +5 -0
- package/dist/components/semiotic-utils.d.ts +3 -39
- package/dist/components/semiotic-xy.d.ts +10 -0
- package/dist/components/semiotic.d.ts +39 -7
- package/dist/components/server/animatedGif.d.ts +36 -0
- package/dist/components/server/renderEvidence.d.ts +1 -1
- package/dist/components/server/renderToStaticSVG.d.ts +3 -35
- package/dist/components/server/serverChartConfigShared.d.ts +17 -0
- package/dist/components/server/serverChartConfigs.d.ts +19 -9
- package/dist/components/server/serverChartConfigsCustom.d.ts +5 -0
- package/dist/components/server/serverChartConfigsGeo.d.ts +9 -0
- package/dist/components/server/serverChartConfigsNetwork.d.ts +8 -0
- package/dist/components/server/serverChartConfigsOrdinal.d.ts +16 -0
- package/dist/components/server/serverChartConfigsPhysics.d.ts +9 -0
- package/dist/components/server/serverChartConfigsXY.d.ts +11 -0
- package/dist/components/server/staticGeo.d.ts +4 -0
- package/dist/components/server/staticLegend.d.ts +1 -1
- package/dist/components/server/staticNetwork.d.ts +8 -0
- package/dist/components/server/staticOrdinal.d.ts +11 -0
- package/dist/components/server/staticPhysics.d.ts +3 -0
- package/dist/components/server/staticSVGChrome.d.ts +110 -0
- package/dist/components/server/staticXY.d.ts +4 -0
- package/dist/components/store/ObservationStore.d.ts +23 -3
- package/dist/components/store/SelectionStore.d.ts +1 -1
- package/dist/components/store/ThemeStore.d.ts +1 -1
- package/dist/components/store/TooltipStore.d.ts +1 -1
- package/dist/components/store/createStore.d.ts +1 -1
- package/dist/components/store/designTokens.d.ts +15 -0
- package/dist/components/store/themeSerialization.d.ts +32 -0
- package/dist/components/store/useChartInterrogation.d.ts +9 -0
- package/dist/components/stream/AccessibleDataTable.d.ts +3 -13
- package/dist/components/stream/FocusRing.d.ts +4 -2
- package/dist/components/stream/GeoCanvasHitTester.d.ts +1 -1
- package/dist/components/stream/GeoPipelineStore.d.ts +28 -0
- package/dist/components/stream/NetworkHtmlMarksLayer.d.ts +44 -0
- package/dist/components/stream/NetworkPipelineStore.d.ts +62 -25
- package/dist/components/stream/NetworkSVGOverlay.d.ts +15 -0
- package/dist/components/stream/OrdinalPipelineStore.d.ts +64 -2
- package/dist/components/stream/PipelineStore.d.ts +100 -162
- package/dist/components/stream/SceneGraph.d.ts +14 -2
- package/dist/components/stream/StreamGeoFrame.d.ts +1 -1
- package/dist/components/stream/StreamNetworkFrame.d.ts +1 -1
- package/dist/components/stream/StreamOrdinalFrame.d.ts +1 -1
- package/dist/components/stream/StreamXYFrame.d.ts +2 -18
- package/dist/components/stream/accessibleDataRows.d.ts +33 -0
- package/dist/components/stream/accessorUtils.d.ts +23 -10
- package/dist/components/stream/brushAccessibility.d.ts +25 -0
- package/dist/components/stream/canvasBackground.d.ts +24 -0
- package/dist/components/stream/canvasSetup.d.ts +4 -1
- package/dist/components/stream/customLayout.d.ts +20 -0
- package/dist/components/stream/customLayoutDiagnostics.d.ts +11 -0
- package/dist/components/stream/customLayoutFailure.d.ts +33 -0
- package/dist/components/stream/customLayoutPalette.d.ts +19 -9
- package/dist/components/stream/customLayoutSelection.d.ts +52 -0
- package/dist/components/stream/frameThemeColors.d.ts +24 -0
- package/dist/components/stream/geoAnnotationAnchors.d.ts +14 -0
- package/dist/components/stream/geoCartogram.d.ts +17 -0
- package/dist/components/stream/geoCustomLayout.d.ts +59 -0
- package/dist/components/stream/geoDefaultTooltip.d.ts +11 -0
- package/dist/components/stream/geoFrameHelpers.d.ts +34 -0
- package/dist/components/stream/geoPipelineHelpers.d.ts +46 -0
- package/dist/components/stream/geoTypes.d.ts +56 -7
- package/dist/components/stream/glyphDef.d.ts +98 -0
- package/dist/components/stream/hitTarget.d.ts +170 -0
- package/dist/components/stream/hoverUtils.d.ts +3 -0
- package/dist/components/stream/keyboardNav.d.ts +4 -1
- package/dist/components/stream/layouts/forceLayoutPlugin.d.ts +9 -1
- package/dist/components/stream/layouts/forceLayoutWorkerClient.d.ts +57 -0
- package/dist/components/stream/networkBezier.d.ts +10 -0
- package/dist/components/stream/networkColorAccessors.d.ts +49 -0
- package/dist/components/stream/networkCustomLayout.d.ts +66 -1
- package/dist/components/stream/networkDefaultTooltip.d.ts +10 -0
- package/dist/components/stream/networkFrameInteraction.d.ts +37 -0
- package/dist/components/stream/networkFramePaint.d.ts +43 -0
- package/dist/components/stream/networkPipelineConfig.d.ts +22 -0
- package/dist/components/stream/networkPipelineHelpers.d.ts +12 -0
- package/dist/components/stream/networkRealtimeEncoding.d.ts +41 -0
- package/dist/components/stream/networkTypes.d.ts +104 -5
- package/dist/components/stream/ordinalCanvasRenderers.d.ts +7 -0
- package/dist/components/stream/ordinalCustomLayout.d.ts +17 -1
- package/dist/components/stream/ordinalDataIndex.d.ts +5 -0
- package/dist/components/stream/ordinalDefaultTooltip.d.ts +10 -0
- package/dist/components/stream/ordinalDomain.d.ts +38 -0
- package/dist/components/stream/ordinalPipelineUpdateResults.d.ts +12 -0
- package/dist/components/stream/ordinalPulse.d.ts +10 -0
- package/dist/components/stream/ordinalPulseResources.d.ts +3 -0
- package/dist/components/stream/ordinalSceneBuilders/sceneBuilderMap.d.ts +5 -0
- package/dist/components/stream/ordinalSceneBuilders/types.d.ts +2 -0
- package/dist/components/stream/ordinalSpatialIndex.d.ts +9 -0
- package/dist/components/stream/ordinalTypes.d.ts +56 -8
- package/dist/components/stream/paintNeeds.d.ts +31 -0
- package/dist/components/stream/physics/CapacityQueueController.d.ts +5 -0
- package/dist/components/stream/physics/CapacityQueueTypes.d.ts +134 -0
- package/dist/components/stream/physics/MatterPhysicsEngineAdapter.d.ts +42 -0
- package/dist/components/stream/physics/PhysicsAccessibility.d.ts +48 -0
- package/dist/components/stream/physics/PhysicsAnnotations.d.ts +58 -0
- package/dist/components/stream/physics/PhysicsBodyBudget.d.ts +26 -0
- package/dist/components/stream/physics/PhysicsBodySpatialIndex.d.ts +10 -0
- package/dist/components/stream/physics/PhysicsCanvasTheme.d.ts +26 -0
- package/dist/components/stream/physics/PhysicsControllers.d.ts +75 -0
- package/dist/components/stream/physics/PhysicsEngineAdapter.d.ts +59 -0
- package/dist/components/stream/physics/PhysicsEngineConformance.d.ts +23 -0
- package/dist/components/stream/physics/PhysicsEvidence.d.ts +25 -0
- package/dist/components/stream/physics/PhysicsKernel.d.ts +207 -0
- package/dist/components/stream/physics/PhysicsOptionalEngineAdapters.d.ts +12 -0
- package/dist/components/stream/physics/PhysicsPipelineStore.d.ts +84 -0
- package/dist/components/stream/physics/PhysicsPipelineTypes.d.ts +181 -0
- package/dist/components/stream/physics/PhysicsSVGOverlay.d.ts +72 -0
- package/dist/components/stream/physics/PhysicsSediment.d.ts +69 -0
- package/dist/components/stream/physics/PhysicsSettledSVG.d.ts +18 -0
- package/dist/components/stream/physics/PhysicsSettledScene.d.ts +21 -0
- package/dist/components/stream/physics/PhysicsWorkerClient.d.ts +24 -0
- package/dist/components/stream/physics/PhysicsWorkerProtocol.d.ts +101 -0
- package/dist/components/stream/physics/PhysicsWorkerRuntime.d.ts +5 -0
- package/dist/components/stream/physics/RapierPhysicsEngineAdapter.d.ts +18 -0
- package/dist/components/stream/physics/ServiceOperationsControllers.d.ts +27 -0
- package/dist/components/stream/physics/ServiceOperationsTypes.d.ts +89 -0
- package/dist/components/stream/physics/StreamPhysicsFrame.d.ts +6 -0
- package/dist/components/stream/physics/StreamPhysicsTypes.d.ts +302 -0
- package/dist/components/stream/physics/physicsBodyCanvas.d.ts +27 -0
- package/dist/components/stream/physics/physicsPipelineControls.d.ts +4 -0
- package/dist/components/stream/physics/physicsPipelineHelpers.d.ts +41 -0
- package/dist/components/stream/physics/physicsPipelineObservations.d.ts +14 -0
- package/dist/components/stream/physics/physicsPipelineUpdateResults.d.ts +9 -0
- package/dist/components/stream/physics/physicsRegionRuntime.d.ts +54 -0
- package/dist/components/stream/physics/physicsSemanticUI.d.ts +20 -0
- package/dist/components/stream/physics/usePhysicsFrameLifecyclePolicy.d.ts +16 -0
- package/dist/components/stream/pipelineBufferUtils.d.ts +26 -0
- package/dist/components/stream/pipelineConfig.d.ts +177 -0
- package/dist/components/stream/pipelineDecay.d.ts +20 -2
- package/dist/components/stream/pipelineDomainResolution.d.ts +62 -0
- package/dist/components/stream/pipelineIdentityOps.d.ts +26 -0
- package/dist/components/stream/pipelinePulse.d.ts +16 -2
- package/dist/components/stream/pipelineRibbons.d.ts +41 -0
- package/dist/components/stream/pipelineSpatialIndex.d.ts +12 -0
- package/dist/components/stream/pipelineStoreUpdateResults.d.ts +12 -0
- package/dist/components/stream/pipelineStyleResolvers.d.ts +46 -0
- package/dist/components/stream/pipelineTransitions.d.ts +2 -0
- package/dist/components/stream/pipelineUpdateContract.d.ts +62 -0
- package/dist/components/stream/pulseFrameRefresh.d.ts +22 -0
- package/dist/components/stream/renderers/glyphCanvasRenderer.d.ts +6 -0
- package/dist/components/stream/renderers/networkSymbolRenderer.d.ts +2 -0
- package/dist/components/stream/renderers/resolveCSSColor.d.ts +6 -0
- package/dist/components/stream/renderers/symbolCanvasRenderer.d.ts +2 -0
- package/dist/components/stream/sceneRevisionDiagnostics.d.ts +18 -0
- package/dist/components/stream/stalenessBands.d.ts +28 -0
- package/dist/components/stream/streamStoreSync.d.ts +37 -0
- package/dist/components/stream/symbolPath.d.ts +24 -0
- package/dist/components/stream/types.d.ts +206 -9
- package/dist/components/stream/useFrame.d.ts +21 -2
- package/dist/components/stream/useHydration.d.ts +6 -0
- package/dist/components/stream/useLegendCategoryEmission.d.ts +5 -0
- package/dist/components/stream/useStalenessCheck.d.ts +6 -1
- package/dist/components/stream/workerModuleUrl.d.ts +10 -0
- package/dist/components/stream/xyAnnotationAnchors.d.ts +13 -0
- package/dist/components/stream/xyCanvasRenderers.d.ts +7 -0
- package/dist/components/stream/xyCrosshair.d.ts +11 -0
- package/dist/components/stream/xyDateTicks.d.ts +9 -0
- package/dist/components/stream/xyDefaultTooltip.d.ts +10 -0
- package/dist/components/stream/xySceneBuilders/pointScene.d.ts +2 -2
- package/dist/components/stream/xySceneBuilders/types.d.ts +9 -4
- package/dist/controls.min.js +2 -0
- package/dist/controls.module.min.js +2 -0
- package/dist/forceLayoutWorker.js +1 -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/physics-matter.min.js +1 -0
- package/dist/physics-matter.module.min.js +1 -0
- package/dist/physics-rapier.min.js +1 -0
- package/dist/physics-rapier.module.min.js +1 -0
- package/dist/physics.min.js +2 -0
- package/dist/physics.module.min.js +2 -0
- package/dist/physicsWorker.js +1 -0
- package/dist/realtime.min.js +1 -1
- package/dist/realtime.module.min.js +1 -1
- package/dist/semiotic-ai-chunk-OG7BQUUW.module.min.js +2 -0
- package/dist/semiotic-ai-core.d.ts +47 -0
- package/dist/semiotic-ai-core.min.js +1 -0
- package/dist/semiotic-ai-core.module.min.js +1 -0
- package/dist/semiotic-ai-statisticalOverlays-CY4WKR4A.module.min.js +2 -0
- package/dist/semiotic-ai.d.ts +52 -4
- package/dist/semiotic-ai.min.js +1 -1
- package/dist/semiotic-ai.module.min.js +1 -1
- package/dist/semiotic-chunk-3FSVZ46U.module.min.js +2 -0
- package/dist/semiotic-controls.d.ts +18 -0
- package/dist/semiotic-data.d.ts +2 -0
- package/dist/semiotic-data.min.js +1 -1
- package/dist/semiotic-data.module.min.js +1 -1
- package/dist/semiotic-experimental.d.ts +49 -0
- package/dist/semiotic-experimental.min.js +1 -0
- package/dist/semiotic-experimental.module.min.js +1 -0
- package/dist/semiotic-geo.d.ts +11 -0
- package/dist/semiotic-network.d.ts +14 -1
- package/dist/semiotic-ordinal.d.ts +10 -0
- package/dist/semiotic-physics-matter.d.ts +10 -0
- package/dist/semiotic-physics-rapier.d.ts +9 -0
- package/dist/semiotic-physics.d.ts +56 -0
- package/dist/semiotic-realtime-core.d.ts +34 -0
- package/dist/semiotic-realtime-core.min.js +1 -0
- package/dist/semiotic-realtime-core.module.min.js +1 -0
- package/dist/semiotic-realtime-react.d.ts +10 -0
- package/dist/semiotic-realtime-react.min.js +2 -0
- package/dist/semiotic-realtime-react.module.min.js +2 -0
- package/dist/semiotic-realtime.d.ts +4 -22
- package/dist/semiotic-recipes-core.d.ts +92 -0
- package/dist/semiotic-recipes-core.min.js +1 -0
- package/dist/semiotic-recipes-core.module.min.js +1 -0
- package/dist/semiotic-recipes-react.d.ts +7 -0
- package/dist/semiotic-recipes-react.min.js +2 -0
- package/dist/semiotic-recipes-react.module.min.js +2 -0
- package/dist/semiotic-recipes.d.ts +4 -26
- package/dist/semiotic-recipes.min.js +1 -1
- package/dist/semiotic-recipes.module.min.js +1 -1
- package/dist/semiotic-server-edge.d.ts +8 -0
- package/dist/semiotic-server-edge.min.js +1 -0
- package/dist/semiotic-server-edge.module.min.js +1 -0
- package/dist/semiotic-server-node.d.ts +5 -0
- package/dist/semiotic-server-node.min.js +1 -0
- package/dist/semiotic-server-node.module.min.js +1 -0
- package/dist/semiotic-server.d.ts +2 -2
- package/dist/semiotic-statisticalOverlays-UOMSFKVJ.module.min.js +2 -0
- package/dist/semiotic-themes-core.d.ts +53 -0
- package/dist/semiotic-themes-core.min.js +1 -0
- package/dist/semiotic-themes-core.module.min.js +1 -0
- package/dist/semiotic-themes-react.d.ts +4 -0
- package/dist/semiotic-themes-react.min.js +2 -0
- package/dist/semiotic-themes-react.module.min.js +2 -0
- package/dist/semiotic-themes.d.ts +6 -74
- package/dist/semiotic-themes.min.js +1 -2
- package/dist/semiotic-themes.module.min.js +1 -2
- package/dist/semiotic-utils-core.d.ts +46 -0
- package/dist/semiotic-utils-core.min.js +1 -0
- package/dist/semiotic-utils-core.module.min.js +1 -0
- package/dist/semiotic-utils-react.d.ts +5 -0
- package/dist/semiotic-utils-react.min.js +2 -0
- package/dist/semiotic-utils-react.module.min.js +2 -0
- package/dist/semiotic-utils.d.ts +3 -39
- package/dist/semiotic-utils.min.js +1 -2
- package/dist/semiotic-utils.module.min.js +1 -2
- package/dist/semiotic-value.min.js +1 -1
- package/dist/semiotic-value.module.min.js +1 -1
- package/dist/semiotic-xy.d.ts +10 -0
- package/dist/semiotic.d.ts +39 -7
- 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/xy-chunk-IWD6IB6V.module.min.js +2 -0
- package/dist/xy-statisticalOverlays-7RWG6LJT.module.min.js +2 -0
- package/dist/xy.min.js +1 -1
- package/dist/xy.module.min.js +1 -1
- package/package.json +246 -86
- package/spec/README.md +152 -0
- package/spec/bindings/README.md +35 -0
- package/spec/bindings/vega-lite.mjs +112 -0
- package/spec/v0.1/annotation-provenance.schema.json +127 -0
- package/spec/v0.1/audience-profile.schema.json +67 -0
- package/spec/v0.1/chart-capability.schema.json +186 -0
- package/dist/semiotic-ai-statisticalOverlays-C2PPlmXv.js +0 -1
- package/dist/semiotic-statisticalOverlays-C3DsOgr_.js +0 -1
- package/dist/xy-statisticalOverlays-C2PPlmXv.js +0 -1
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure update contract for the stream-pipeline migration pilot.
|
|
3
|
+
*
|
|
4
|
+
* Stores still expose their established boolean/void mutation APIs. This
|
|
5
|
+
* module gives a host an additive, inspectable result path without coupling it
|
|
6
|
+
* to React, canvas, timers, or a particular chart family.
|
|
7
|
+
*/
|
|
8
|
+
/** Reasons a host may need to recompute or repaint part of a chart. */
|
|
9
|
+
export declare const INVALIDATION_KINDS: readonly ["data", "domain", "layout", "scene-geometry", "scene-style", "data-paint", "interaction-paint", "overlay", "accessibility", "evidence"];
|
|
10
|
+
export type Invalidation = (typeof INVALIDATION_KINDS)[number];
|
|
11
|
+
/**
|
|
12
|
+
* Describes the operation that produced an update without retaining raw data
|
|
13
|
+
* or user callbacks in a diagnostic/result object.
|
|
14
|
+
*/
|
|
15
|
+
export interface ChangeSet {
|
|
16
|
+
readonly kind: "initialize" | "ingest" | "replace" | "remove" | "update" | "clear" | "config" | "restyle" | "enqueue" | "tick" | "settle" | "restore" | "constraint" | "impulse" | "pause" | "visibility";
|
|
17
|
+
readonly keys?: readonly string[];
|
|
18
|
+
readonly count?: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Monotonic revision counters. A host can consume only the counters relevant
|
|
22
|
+
* to its work (for example a canvas data layer observes `dataPaint`, while an
|
|
23
|
+
* accessibility tree observes `accessibility`).
|
|
24
|
+
*/
|
|
25
|
+
export interface RevisionSet {
|
|
26
|
+
readonly data: number;
|
|
27
|
+
readonly domain: number;
|
|
28
|
+
readonly layout: number;
|
|
29
|
+
readonly sceneGeometry: number;
|
|
30
|
+
readonly sceneStyle: number;
|
|
31
|
+
readonly dataPaint: number;
|
|
32
|
+
readonly interactionPaint: number;
|
|
33
|
+
readonly overlay: number;
|
|
34
|
+
readonly accessibility: number;
|
|
35
|
+
readonly evidence: number;
|
|
36
|
+
}
|
|
37
|
+
/** The additive result exposed by the XY PipelineStore reference path. */
|
|
38
|
+
export interface UpdateResult {
|
|
39
|
+
readonly changeSet: ChangeSet;
|
|
40
|
+
readonly changed: ReadonlySet<Invalidation>;
|
|
41
|
+
readonly revisions: RevisionSet;
|
|
42
|
+
}
|
|
43
|
+
export declare function createRevisionSet(): RevisionSet;
|
|
44
|
+
/** Return a fresh revision snapshot with exactly the invalidated counters bumped. */
|
|
45
|
+
export declare function advanceRevisions(previous: RevisionSet, invalidations: Iterable<Invalidation>): RevisionSet;
|
|
46
|
+
/**
|
|
47
|
+
* Build an immutable-by-convention update record from a change description.
|
|
48
|
+
* The Set is copied so later mutation of the caller's iterable cannot alter
|
|
49
|
+
* the revision decision that was recorded.
|
|
50
|
+
*/
|
|
51
|
+
export declare function createUpdateResult(changeSet: ChangeSet, invalidations: Iterable<Invalidation>, previousRevisions: RevisionSet): UpdateResult;
|
|
52
|
+
/**
|
|
53
|
+
* Small retained-state helper for stores adopting the result contract. It
|
|
54
|
+
* keeps revision bookkeeping out of family-specific data/layout code while
|
|
55
|
+
* preserving each store's existing mutation API.
|
|
56
|
+
*/
|
|
57
|
+
export declare class UpdateResultTracker {
|
|
58
|
+
private revisions;
|
|
59
|
+
private latest;
|
|
60
|
+
get last(): UpdateResult;
|
|
61
|
+
record(changeSet: ChangeSet, invalidations: Iterable<Invalidation>): UpdateResult;
|
|
62
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** Minimal surface shared by stream frames for idle pulse repainting. */
|
|
2
|
+
export interface PulseRefreshStore {
|
|
3
|
+
lastCustomLayoutFailure?: {
|
|
4
|
+
preservedLastGoodScene?: boolean;
|
|
5
|
+
} | null;
|
|
6
|
+
hasActivePulsesAt(now: number): boolean;
|
|
7
|
+
refreshPulse(now: number): boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface IdlePulseRefresh {
|
|
10
|
+
/** Whether the data canvas needs a style-only repaint this frame. */
|
|
11
|
+
changed: boolean;
|
|
12
|
+
/** Keep one subsequent frame so an expired glow can be cleared. */
|
|
13
|
+
pending: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Advance pulse styling without triggering a layout rebuild. A failed custom
|
|
17
|
+
* layout deliberately retains its last good scene, which must remain
|
|
18
|
+
* immutable until the layout owner recovers.
|
|
19
|
+
*/
|
|
20
|
+
export declare function refreshIdlePulse(store: PulseRefreshStore, now: number, sceneRecomputed: boolean, pendingRef: {
|
|
21
|
+
current: boolean;
|
|
22
|
+
}): IdlePulseRefresh;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { NetworkSceneNode } from "../networkTypes";
|
|
2
|
+
import type { StreamRendererFn } from "./types";
|
|
3
|
+
/** XY / ordinal / geo painter (x/y-positioned glyph nodes). */
|
|
4
|
+
export declare const glyphCanvasRenderer: StreamRendererFn;
|
|
5
|
+
/** Network painter (cx/cy-positioned glyph nodes). */
|
|
6
|
+
export declare function networkGlyphRenderer(ctx: CanvasRenderingContext2D, nodes: NetworkSceneNode[]): void;
|
|
@@ -21,6 +21,12 @@ export declare function resolveCSSColor(ctx: CanvasRenderingContext2D, value: st
|
|
|
21
21
|
* invalidation is global because theme changes are global.
|
|
22
22
|
*/
|
|
23
23
|
export declare function clearCSSColorCache(_canvas?: HTMLCanvasElement): void;
|
|
24
|
+
/**
|
|
25
|
+
* Monotonic version bumped by theme changes and `clearCSSColorCache`.
|
|
26
|
+
* Frames can cache derived theme color objects keyed by this value so
|
|
27
|
+
* paint loops avoid `getComputedStyle` on every rAF.
|
|
28
|
+
*/
|
|
29
|
+
export declare function getCSSColorCacheVersion(): number;
|
|
24
30
|
/**
|
|
25
31
|
* Test-only: reset all cache state, including disconnecting any installed
|
|
26
32
|
* observer/matchMedia listeners. Required for test isolation — without it,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { RevisionSet, UpdateResult } from "./pipelineUpdateContract";
|
|
2
|
+
type SceneRevisionSet = Pick<RevisionSet, "sceneGeometry" | "layout" | "domain">;
|
|
3
|
+
interface SceneRevisionCheck {
|
|
4
|
+
revisions: SceneRevisionSet;
|
|
5
|
+
signature: string;
|
|
6
|
+
sawSignals: boolean;
|
|
7
|
+
wasUnconsumed: boolean;
|
|
8
|
+
warnUnconsumed: boolean;
|
|
9
|
+
}
|
|
10
|
+
/** Development-only consumption and duplicate-compute diagnostics for an XY scene host. */
|
|
11
|
+
export declare class SceneRevisionDiagnostics {
|
|
12
|
+
private lastConsumed;
|
|
13
|
+
private lastDuplicateWarning;
|
|
14
|
+
private lastUnconsumedWarning;
|
|
15
|
+
beforeCompute(updateResult: UpdateResult, isTransitioning: boolean): SceneRevisionCheck;
|
|
16
|
+
afterCompute(check: SceneRevisionCheck, computedScene: boolean, dimsChanged: boolean): void;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type LifecycleBand, type LifecycleBandThresholds } from "../realtime/lifecycleBands";
|
|
2
|
+
import type { StalenessConfig } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Default canvas alpha per band in graded mode. `fresh` is full; each
|
|
5
|
+
* older band dims further. Override individually via
|
|
6
|
+
* `staleness.graded.opacities`.
|
|
7
|
+
*/
|
|
8
|
+
export declare const DEFAULT_STALENESS_BAND_OPACITY: Record<LifecycleBand, number>;
|
|
9
|
+
export interface ResolvedStaleness {
|
|
10
|
+
/** Canvas alpha to apply (1 = no dimming). */
|
|
11
|
+
alpha: number;
|
|
12
|
+
/**
|
|
13
|
+
* Classified band. In graded mode this is the `bandFromAge` result;
|
|
14
|
+
* in binary mode it collapses to `"fresh"` or `"stale"`.
|
|
15
|
+
*/
|
|
16
|
+
band: LifecycleBand;
|
|
17
|
+
/** Whether the chart should read as stale (drives the badge). */
|
|
18
|
+
isStale: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Resolve the dimming + band for a given idle duration. Pure — the
|
|
22
|
+
* render path computes idle from `now - lastIngestTime` each paint and
|
|
23
|
+
* the staleness poll uses the same function to decide when to repaint.
|
|
24
|
+
*
|
|
25
|
+
* `idleMs` of 0 (no data yet) is treated as fresh.
|
|
26
|
+
*/
|
|
27
|
+
export declare function resolveStaleness(staleness: StalenessConfig | undefined, idleMs: number): ResolvedStaleness;
|
|
28
|
+
export type { LifecycleBand, LifecycleBandThresholds };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type MutableRefObject } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Push the memoized pipeline config into the scene store and repaint.
|
|
4
|
+
*
|
|
5
|
+
* `config` is memoized upstream (the frames' `stablePipelineConfig`), so this
|
|
6
|
+
* fires only on a real config change, never per render. Marks the scene dirty
|
|
7
|
+
* and repaints because style callbacks (pointStyle, areaStyle, …) carried in
|
|
8
|
+
* the config may have changed even when geometry did not.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useConfigSync<C>(storeRef: MutableRefObject<{
|
|
11
|
+
updateConfig(config: C): void;
|
|
12
|
+
} | null>, config: C, dirtyRef: MutableRefObject<boolean>, scheduleRender: () => void): void;
|
|
13
|
+
/**
|
|
14
|
+
* Bridge a custom layout's resolved selection (`layoutSelection`) into the
|
|
15
|
+
* scene store and repaint.
|
|
16
|
+
*
|
|
17
|
+
* `layoutSelection` has no single home in a store: the custom-chart HOCs
|
|
18
|
+
* assemble it in React by merging local component state (hover-highlight,
|
|
19
|
+
* legend interaction) with the cross-chart selection store
|
|
20
|
+
* (`effectiveSelectionHook = hover ?? legend ?? activeSelection`). React owns
|
|
21
|
+
* that blended value.
|
|
22
|
+
*
|
|
23
|
+
* Kept OFF the rebuild path: when the layout returned a `restyle` callback a
|
|
24
|
+
* selection change re-applies styles to the existing scene and repaints (no
|
|
25
|
+
* relayout, no quadtree rebuild); otherwise it marks the scene dirty so a
|
|
26
|
+
* rebuild lets `ctx.selection` reach the layout. Either way the overlay subtree
|
|
27
|
+
* re-renders against the new selection via `CustomLayoutSelectionProvider`.
|
|
28
|
+
*
|
|
29
|
+
* The `lastSelectionRef` guard makes the write fire only on a real selection
|
|
30
|
+
* change (the HOCs already memoize `layoutSelection` on its `isActive`/
|
|
31
|
+
* `predicate` identity), never per render.
|
|
32
|
+
*/
|
|
33
|
+
export declare function useLayoutSelectionSync<S>(storeRef: MutableRefObject<{
|
|
34
|
+
setLayoutSelection(selection: S | null): void;
|
|
35
|
+
hasCustomRestyle: boolean;
|
|
36
|
+
restyleScene(selection: S | null): void;
|
|
37
|
+
} | null>, layoutSelection: S | null | undefined, dirtyRef: MutableRefObject<boolean>, scheduleRender: () => void): void;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** Named glyph shapes a `symbol` scene node can request. */
|
|
2
|
+
export type NetworkSymbolName = "circle" | "square" | "triangle" | "diamond" | "star" | "cross" | "wye" | "chevron";
|
|
3
|
+
/** Pipeline-neutral alias — the symbol mark is shared by network, XY, and
|
|
4
|
+
* ordinal scenes, so callers outside the network pipeline read this name. */
|
|
5
|
+
export type SymbolName = NetworkSymbolName;
|
|
6
|
+
/** Default shape assignment order when a recipe auto-maps distinct categories. */
|
|
7
|
+
export declare const SYMBOL_SEQUENCE: NetworkSymbolName[];
|
|
8
|
+
/**
|
|
9
|
+
* SVG path `d` string for a glyph, centered at the origin. `size` follows the
|
|
10
|
+
* d3-symbol area convention (px²) for named shapes; the custom `chevron`
|
|
11
|
+
* derives a comparable radius from it. `customPath`, when provided, is returned
|
|
12
|
+
* verbatim (already origin-centered and sized).
|
|
13
|
+
*/
|
|
14
|
+
export declare function symbolPathString(symbolType: NetworkSymbolName | string | undefined, size: number, customPath?: string): string;
|
|
15
|
+
/** Effective radius of a glyph with the given d3-symbol `size` (used for hit testing). */
|
|
16
|
+
export declare function symbolRadius(size: number): number;
|
|
17
|
+
/**
|
|
18
|
+
* Maximum extent (circumradius) of a glyph from its center — the radius that
|
|
19
|
+
* actually bounds the drawn shape. For `circle` this equals {@link symbolRadius},
|
|
20
|
+
* but pointy shapes (triangle/star/chevron) reach further for the same area, so
|
|
21
|
+
* collision-packing must use this to avoid visual overlap. Polygonal shapes are
|
|
22
|
+
* measured from their path vertices; `circle` is the area formula.
|
|
23
|
+
*/
|
|
24
|
+
export declare function symbolExtent(symbolType: NetworkSymbolName | string | undefined, size: number, customPath?: string): number;
|
|
@@ -6,6 +6,8 @@ import type { ArrowOfTime, WindowMode, LineStyle, BarStyle, WaterfallStyle, Swar
|
|
|
6
6
|
import type { Datum } from "../charts/shared/datumTypes";
|
|
7
7
|
import type { CoercibleNumber } from "./accessorUtils";
|
|
8
8
|
import type { AutoPlaceAnnotations } from "../recipes/annotationLayout";
|
|
9
|
+
import type { SymbolName } from "./symbolPath";
|
|
10
|
+
import type { GlyphDef } from "./glyphDef";
|
|
9
11
|
export type SceneDatum = Datum | null;
|
|
10
12
|
export type SeriesDatum = Datum[] | null;
|
|
11
13
|
export type AxisTickFormat = ((d: number, index?: number, allTicks?: number[]) => string) | ((d: string, index?: number, allTicks?: number[]) => string) | ((d: Date, index?: number, allTicks?: number[]) => string);
|
|
@@ -47,14 +49,34 @@ export interface TransitionConfig {
|
|
|
47
49
|
easing?: "ease-out" | "linear";
|
|
48
50
|
}
|
|
49
51
|
export interface StalenessConfig {
|
|
50
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* ms without data before "stale" (default: 5000). In graded mode this
|
|
54
|
+
* is the base TTL the lifecycle bands are measured against — `aging`
|
|
55
|
+
* begins here, `stale` at 1.5×, `expired` at 3× (overridable).
|
|
56
|
+
*/
|
|
51
57
|
threshold?: number;
|
|
52
|
-
/** Canvas alpha when stale (default: 0.5) */
|
|
58
|
+
/** Canvas alpha when stale, binary mode (default: 0.5) */
|
|
53
59
|
dimOpacity?: number;
|
|
54
60
|
/** Render LIVE/STALE badge (default: false) */
|
|
55
61
|
showBadge?: boolean;
|
|
56
62
|
/** Badge position (default: "top-right") */
|
|
57
63
|
badgePosition?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
64
|
+
/**
|
|
65
|
+
* Opt into graded (banded) staleness. Instead of a single live→stale
|
|
66
|
+
* flip at `threshold`, frames that support graded staleness dim
|
|
67
|
+
* progressively through fresh → aging → stale → expired as idle time
|
|
68
|
+
* crosses multiples of `threshold`, sharing one schedule with per-datum
|
|
69
|
+
* decay and annotation freshness. (Currently honored by `StreamXYFrame`,
|
|
70
|
+
* which backs the realtime XY charts; other frames treat it as binary.)
|
|
71
|
+
* `true` uses the default per-band opacities; pass an object to override
|
|
72
|
+
* the band thresholds or opacities.
|
|
73
|
+
*/
|
|
74
|
+
graded?: boolean | {
|
|
75
|
+
/** Multiples of `threshold` marking each band edge (see LifecycleBandThresholds). */
|
|
76
|
+
thresholds?: import("../realtime/lifecycleBands").LifecycleBandThresholds;
|
|
77
|
+
/** Per-band canvas alpha override. Missing bands use the defaults. */
|
|
78
|
+
opacities?: Partial<Record<import("../realtime/lifecycleBands").LifecycleBand, number>>;
|
|
79
|
+
};
|
|
58
80
|
}
|
|
59
81
|
export type MarginalType = "histogram" | "violin" | "ridgeline" | "boxplot";
|
|
60
82
|
export interface MarginalConfig {
|
|
@@ -96,7 +118,19 @@ export interface Style {
|
|
|
96
118
|
/** Internal geo line flag: fade line ends at projection clipping edges. */
|
|
97
119
|
_edgeFade?: boolean;
|
|
98
120
|
}
|
|
99
|
-
|
|
121
|
+
/**
|
|
122
|
+
* Optional semantic payload carried beside render geometry. `accessibleDatum`
|
|
123
|
+
* preserves the full row; `tableFields` lets a recipe expose a curated,
|
|
124
|
+
* user-facing table projection without reducing the scene datum itself.
|
|
125
|
+
*/
|
|
126
|
+
export interface SceneAccessibilityMetadata {
|
|
127
|
+
accessibleDatum?: SceneDatum | Datum[];
|
|
128
|
+
accessibility?: {
|
|
129
|
+
label?: string;
|
|
130
|
+
tableFields?: SceneDatum | Datum[];
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
export type SceneNode = LineSceneNode | AreaSceneNode | PointSceneNode | SymbolSceneNode | GlyphSceneNode | RectSceneNode | HeatcellSceneNode | CandlestickSceneNode;
|
|
100
134
|
export interface LineColorThreshold {
|
|
101
135
|
value: number;
|
|
102
136
|
color: string;
|
|
@@ -111,6 +145,8 @@ export interface LineSceneNode {
|
|
|
111
145
|
colorThresholds?: LineColorThreshold[];
|
|
112
146
|
style: Style;
|
|
113
147
|
datum: SeriesDatum;
|
|
148
|
+
accessibleDatum?: SceneAccessibilityMetadata["accessibleDatum"];
|
|
149
|
+
accessibility?: SceneAccessibilityMetadata["accessibility"];
|
|
114
150
|
group?: string;
|
|
115
151
|
/** Horizontal gradient for the line stroke */
|
|
116
152
|
strokeGradient?: {
|
|
@@ -142,6 +178,8 @@ export interface AreaSceneNode {
|
|
|
142
178
|
bottomPath: [number, number][];
|
|
143
179
|
style: Style;
|
|
144
180
|
datum: SeriesDatum;
|
|
181
|
+
accessibleDatum?: SceneAccessibilityMetadata["accessibleDatum"];
|
|
182
|
+
accessibility?: SceneAccessibilityMetadata["accessibility"];
|
|
145
183
|
group?: string;
|
|
146
184
|
/** Clip the area to this rect (in plot-relative pixels). Used by horizon
|
|
147
185
|
* charts to band a single series into N slices. */
|
|
@@ -202,6 +240,8 @@ export interface PointSceneNode {
|
|
|
202
240
|
r: number;
|
|
203
241
|
style: Style;
|
|
204
242
|
datum: SceneDatum;
|
|
243
|
+
accessibleDatum?: SceneAccessibilityMetadata["accessibleDatum"];
|
|
244
|
+
accessibility?: SceneAccessibilityMetadata["accessibility"];
|
|
205
245
|
/** Optional unique identifier for point-anchored annotations */
|
|
206
246
|
pointId?: string;
|
|
207
247
|
/** Pulse glow intensity 0–1 (set by PipelineStore when pulse is active) */
|
|
@@ -219,6 +259,104 @@ export interface PointSceneNode {
|
|
|
219
259
|
/** Stable identity key for transition tracking */
|
|
220
260
|
_transitionKey?: string;
|
|
221
261
|
}
|
|
262
|
+
/**
|
|
263
|
+
* Symbol node — the per-datum **shape channel**, shared with the network and
|
|
264
|
+
* ordinal pipelines. A glyph drawn from a `d3-shape` symbol path (or a custom
|
|
265
|
+
* `path`), painted on canvas and in SVG/SSR via the shared `symbolPath` helpers,
|
|
266
|
+
* and hit-tested + keyboard-navigated as a unit. Emitted by custom XY layouts
|
|
267
|
+
* and by Scatterplot's `symbolBy` encoding. Uses `x`/`y` like its sibling
|
|
268
|
+
* `PointSceneNode` (the network variant uses `cx`/`cy`).
|
|
269
|
+
*/
|
|
270
|
+
export interface SymbolSceneNode {
|
|
271
|
+
type: "symbol";
|
|
272
|
+
x: number;
|
|
273
|
+
y: number;
|
|
274
|
+
/** d3-symbol area in px² — drives the glyph's drawn size. */
|
|
275
|
+
size: number;
|
|
276
|
+
/** Named shape. Ignored when `path` is set. @default "circle" */
|
|
277
|
+
symbolType?: SymbolName;
|
|
278
|
+
/** Pre-built SVG path string, origin-centered — overrides `symbolType`. */
|
|
279
|
+
path?: string;
|
|
280
|
+
/** Rotation in radians about (x, y). */
|
|
281
|
+
rotation?: number;
|
|
282
|
+
style: Style;
|
|
283
|
+
datum: SceneDatum;
|
|
284
|
+
accessibleDatum?: SceneAccessibilityMetadata["accessibleDatum"];
|
|
285
|
+
accessibility?: SceneAccessibilityMetadata["accessibility"];
|
|
286
|
+
/** Optional unique identifier for point-anchored annotations. */
|
|
287
|
+
pointId?: string;
|
|
288
|
+
/** Pulse glow intensity 0–1 (set by PipelineStore when pulse is active). */
|
|
289
|
+
_pulseIntensity?: number;
|
|
290
|
+
/** Pulse glow color. */
|
|
291
|
+
_pulseColor?: string;
|
|
292
|
+
/** Pulse glow radius in px. */
|
|
293
|
+
_pulseGlowRadius?: number;
|
|
294
|
+
/** Animation target fields (set during transitions). */
|
|
295
|
+
_targetX?: number;
|
|
296
|
+
_targetY?: number;
|
|
297
|
+
_targetR?: number;
|
|
298
|
+
_targetOpacity?: number;
|
|
299
|
+
/** Per-datum decay opacity (set by PipelineStore.applyDecay). */
|
|
300
|
+
_decayOpacity?: number;
|
|
301
|
+
/** Stable identity key for transition tracking. */
|
|
302
|
+
_transitionKey?: string;
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* Glyph node — the composite-pictogram channel. Where `symbol` stamps one
|
|
306
|
+
* `d3-shape` path, `glyph` stamps a small multi-part vector pictogram (a
|
|
307
|
+
* `GlyphDef`: an ISOTYPE server sign, a factory, a worker) with per-node
|
|
308
|
+
* `color`/`accent` paints resolved against the definition's role tokens, and
|
|
309
|
+
* an optional partial fill (`fraction`/`fractionStart`) for unit-chart final
|
|
310
|
+
* signs — pair with the `unitize` recipe. Painted on canvas and in SVG/SSR
|
|
311
|
+
* via the shared `glyphDef` helpers, hit-tested and keyboard-navigated by its
|
|
312
|
+
* drawn bounds, and transition-tracked like a point. Uses `x`/`y` in XY,
|
|
313
|
+
* ordinal, and geo scenes (the network variant uses `cx`/`cy`).
|
|
314
|
+
*/
|
|
315
|
+
export interface GlyphSceneNode {
|
|
316
|
+
type: "glyph";
|
|
317
|
+
x: number;
|
|
318
|
+
y: number;
|
|
319
|
+
/** Rendered height in px — width follows the definition's viewBox aspect. */
|
|
320
|
+
size: number;
|
|
321
|
+
/** The multi-part pictogram definition to stamp. */
|
|
322
|
+
glyph: GlyphDef;
|
|
323
|
+
/** Primary paint for parts declaring `"color"`. Falls back to `style.fill`. */
|
|
324
|
+
color?: string;
|
|
325
|
+
/** Accent paint for parts declaring `"accent"`. */
|
|
326
|
+
accent?: string;
|
|
327
|
+
/** Partial fill 0–1 — how much of the sign is painted. @default 1 */
|
|
328
|
+
fraction?: number;
|
|
329
|
+
/** Where the partial fill begins, 0–1 (range boundary signs). @default 0 */
|
|
330
|
+
fractionStart?: number;
|
|
331
|
+
/** Partial-fill axis: horizontal fills left→right, vertical bottom→up. @default "horizontal" */
|
|
332
|
+
fractionDirection?: "horizontal" | "vertical";
|
|
333
|
+
/** Ghost paint drawn at full extent beneath a partial fill so the whole
|
|
334
|
+
* sign stays countable (the ISOTYPE partial-symbol convention). */
|
|
335
|
+
ghostColor?: string;
|
|
336
|
+
/** Rotation in radians about (x, y). */
|
|
337
|
+
rotation?: number;
|
|
338
|
+
style: Style;
|
|
339
|
+
datum: SceneDatum;
|
|
340
|
+
accessibleDatum?: SceneAccessibilityMetadata["accessibleDatum"];
|
|
341
|
+
accessibility?: SceneAccessibilityMetadata["accessibility"];
|
|
342
|
+
/** Optional unique identifier for point-anchored annotations. */
|
|
343
|
+
pointId?: string;
|
|
344
|
+
/** Pulse glow intensity 0–1 (set by PipelineStore when pulse is active). */
|
|
345
|
+
_pulseIntensity?: number;
|
|
346
|
+
/** Pulse glow color. */
|
|
347
|
+
_pulseColor?: string;
|
|
348
|
+
/** Pulse glow radius in px. */
|
|
349
|
+
_pulseGlowRadius?: number;
|
|
350
|
+
/** Animation target fields (set during transitions). */
|
|
351
|
+
_targetX?: number;
|
|
352
|
+
_targetY?: number;
|
|
353
|
+
_targetR?: number;
|
|
354
|
+
_targetOpacity?: number;
|
|
355
|
+
/** Per-datum decay opacity (set by PipelineStore.applyDecay). */
|
|
356
|
+
_decayOpacity?: number;
|
|
357
|
+
/** Stable identity key for transition tracking. */
|
|
358
|
+
_transitionKey?: string;
|
|
359
|
+
}
|
|
222
360
|
export interface RectSceneNode {
|
|
223
361
|
type: "rect";
|
|
224
362
|
x: number;
|
|
@@ -259,6 +397,8 @@ export interface RectSceneNode {
|
|
|
259
397
|
};
|
|
260
398
|
style: Style;
|
|
261
399
|
datum: SceneDatum;
|
|
400
|
+
accessibleDatum?: SceneAccessibilityMetadata["accessibleDatum"];
|
|
401
|
+
accessibility?: SceneAccessibilityMetadata["accessibility"];
|
|
262
402
|
group?: string;
|
|
263
403
|
_pulseIntensity?: number;
|
|
264
404
|
_pulseColor?: string;
|
|
@@ -281,6 +421,8 @@ export interface HeatcellSceneNode {
|
|
|
281
421
|
h: number;
|
|
282
422
|
fill: string;
|
|
283
423
|
datum: SceneDatum;
|
|
424
|
+
accessibleDatum?: SceneAccessibilityMetadata["accessibleDatum"];
|
|
425
|
+
accessibility?: SceneAccessibilityMetadata["accessibility"];
|
|
284
426
|
/** Optional style object (used for decay/transition opacity on heatmap cells) */
|
|
285
427
|
style?: Style;
|
|
286
428
|
/** Numeric cell value (for canvas text rendering when showValues is enabled) */
|
|
@@ -318,6 +460,8 @@ export interface CandlestickSceneNode {
|
|
|
318
460
|
/** Range/dumbbell mode — no body, endpoint dots instead */
|
|
319
461
|
isRange?: boolean;
|
|
320
462
|
datum: SceneDatum;
|
|
463
|
+
accessibleDatum?: SceneAccessibilityMetadata["accessibleDatum"];
|
|
464
|
+
accessibility?: SceneAccessibilityMetadata["accessibility"];
|
|
321
465
|
/** Optional style object (used during transition opacity animations) */
|
|
322
466
|
style?: Style;
|
|
323
467
|
_pulseIntensity?: number;
|
|
@@ -370,6 +514,30 @@ export interface StreamScales {
|
|
|
370
514
|
x: ScaleLinear<number, number>;
|
|
371
515
|
y: ScaleLinear<number, number>;
|
|
372
516
|
}
|
|
517
|
+
/**
|
|
518
|
+
* Context handed to a `foregroundGraphics` / `backgroundGraphics` callback. The
|
|
519
|
+
* function form receives the frame's **resolved scales** alongside `size` +
|
|
520
|
+
* `margin`, so bespoke SVG overlays anchor to the same scales the chart drew
|
|
521
|
+
* (instead of re-deriving them from extents by hand and risking drift). `scales`
|
|
522
|
+
* is `null` before the first layout pass — fall back to your own mapping then.
|
|
523
|
+
* This is the HOC analogue of what custom layouts get via `ctx.scales`.
|
|
524
|
+
*
|
|
525
|
+
* Generic over the scale shape: XY frames pass {@link StreamScales} (`{x, y}`),
|
|
526
|
+
* the ordinal frame passes its `{o, r, projection}` scales.
|
|
527
|
+
*/
|
|
528
|
+
export interface FrameGraphicsContext<S = StreamScales> {
|
|
529
|
+
size: number[];
|
|
530
|
+
margin: {
|
|
531
|
+
top: number;
|
|
532
|
+
right: number;
|
|
533
|
+
bottom: number;
|
|
534
|
+
left: number;
|
|
535
|
+
};
|
|
536
|
+
scales: S | null;
|
|
537
|
+
}
|
|
538
|
+
/** A foreground/background graphics value: static SVG, or a function of the
|
|
539
|
+
* frame's geometry + resolved scales. */
|
|
540
|
+
export type FrameGraphicsProp<S = StreamScales> = ReactNode | ((ctx: FrameGraphicsContext<S>) => ReactNode);
|
|
373
541
|
export interface StreamLayout {
|
|
374
542
|
width: number;
|
|
375
543
|
height: number;
|
|
@@ -465,8 +633,18 @@ export interface StreamXYFrameProps<T = Datum> {
|
|
|
465
633
|
chunkSize?: number;
|
|
466
634
|
xAccessor?: string | ((d: T) => CoercibleNumber);
|
|
467
635
|
yAccessor?: string | ((d: T) => CoercibleNumber);
|
|
636
|
+
/**
|
|
637
|
+
* Force domain/scene re-derivation when a stable function accessor's
|
|
638
|
+
* external semantics changed without receiving a new function identity.
|
|
639
|
+
* Prefer changing the accessor reference where possible.
|
|
640
|
+
*/
|
|
641
|
+
accessorRevision?: number;
|
|
468
642
|
colorAccessor?: string | ((d: T) => string);
|
|
469
643
|
sizeAccessor?: string | ((d: T) => CoercibleNumber);
|
|
644
|
+
/** Categorical accessor → glyph shape (scatter/bubble). */
|
|
645
|
+
symbolAccessor?: string | ((d: T) => string);
|
|
646
|
+
/** Explicit `{category → shape}` map for `symbolAccessor`; unmapped auto-assign. */
|
|
647
|
+
symbolMap?: Record<string, SymbolName>;
|
|
470
648
|
groupAccessor?: string | ((d: T) => string);
|
|
471
649
|
lineDataAccessor?: string;
|
|
472
650
|
curve?: CurveType;
|
|
@@ -476,22 +654,25 @@ export interface StreamXYFrameProps<T = Datum> {
|
|
|
476
654
|
* - "zero" (default): standard stack from y=0
|
|
477
655
|
* - "wiggle": Byron–Wattenberg streamgraph offset (minimizes wiggle)
|
|
478
656
|
* - "silhouette": center the stack symmetrically around y=0
|
|
657
|
+
* - "diverging": positives stack above 0, negatives below 0 (signed values)
|
|
479
658
|
*
|
|
480
659
|
* Mutually exclusive with `normalize`: when `normalize` is `true`, the
|
|
481
660
|
* stack is forced to a `"zero"` baseline (any other value is ignored)
|
|
482
661
|
* because normalization assumes a fixed `[0, 1]` y-domain.
|
|
483
662
|
*/
|
|
484
|
-
baseline?: "zero" | "wiggle" | "silhouette";
|
|
663
|
+
baseline?: "zero" | "wiggle" | "silhouette" | "diverging";
|
|
485
664
|
/**
|
|
486
665
|
* Stack order — controls which series sits at the top, middle, or bottom.
|
|
487
666
|
* - "key" (default): alphabetical by group key
|
|
667
|
+
* - "input": first-seen group order within the current data
|
|
668
|
+
* buffer/window; streaming eviction can change this order
|
|
488
669
|
* - "insideOut": largest-total series in the middle, smaller alternating
|
|
489
670
|
* above/below. Combined with `baseline: "wiggle"` or `"silhouette"`,
|
|
490
671
|
* produces the canonical streamgraph look where a "central anchor"
|
|
491
672
|
* layer sits across y=0 and other layers stack outward.
|
|
492
673
|
* - "asc" / "desc": by total ascending / descending
|
|
493
674
|
*/
|
|
494
|
-
stackOrder?: "key" | "insideOut" | "asc" | "desc";
|
|
675
|
+
stackOrder?: "key" | "input" | "insideOut" | "asc" | "desc";
|
|
495
676
|
/**
|
|
496
677
|
* Accessor returning a symmetric uncertainty offset per datum.
|
|
497
678
|
* When set, an uncertainty band is drawn ± this offset from the line.
|
|
@@ -556,7 +737,7 @@ export interface StreamXYFrameProps<T = Datum> {
|
|
|
556
737
|
windowSize?: number;
|
|
557
738
|
timeAccessor?: string | ((d: T) => number);
|
|
558
739
|
xScaleType?: "linear" | "log" | "time";
|
|
559
|
-
yScaleType?: "linear" | "log";
|
|
740
|
+
yScaleType?: "linear" | "log" | "symlog";
|
|
560
741
|
xExtent?: [number | undefined, number | undefined] | [number];
|
|
561
742
|
yExtent?: [number | undefined, number | undefined] | [number];
|
|
562
743
|
extentPadding?: number;
|
|
@@ -585,7 +766,7 @@ export interface StreamXYFrameProps<T = Datum> {
|
|
|
585
766
|
waterfallStyle?: WaterfallStyle;
|
|
586
767
|
swarmStyle?: SwarmStyle;
|
|
587
768
|
barColors?: Record<string, string>;
|
|
588
|
-
colorScheme?: string | string[]
|
|
769
|
+
colorScheme?: string | string[] | Record<string, string>;
|
|
589
770
|
showAxes?: boolean;
|
|
590
771
|
/**
|
|
591
772
|
* Per-axis config array. See `XYFrameAxisConfig` for the full set of
|
|
@@ -659,9 +840,9 @@ export interface StreamXYFrameProps<T = Datum> {
|
|
|
659
840
|
/** Fires when the current legend category domain changes after scene rebuilds. */
|
|
660
841
|
onCategoriesChange?: (categories: string[]) => void;
|
|
661
842
|
/** SVG elements rendered behind the canvas (in pixel space) */
|
|
662
|
-
backgroundGraphics?:
|
|
843
|
+
backgroundGraphics?: FrameGraphicsProp;
|
|
663
844
|
/** SVG elements rendered on top of everything (in SVG overlay) */
|
|
664
|
-
foregroundGraphics?:
|
|
845
|
+
foregroundGraphics?: FrameGraphicsProp;
|
|
665
846
|
/** Canvas renderers executed before the chart-type renderers (e.g. connecting lines under points) */
|
|
666
847
|
canvasPreRenderers?: CanvasRendererFn[];
|
|
667
848
|
/** SVG pre-renderers for SSR — SVG equivalent of canvasPreRenderers, rendered under data marks */
|
|
@@ -707,11 +888,18 @@ export interface StreamXYFrameProps<T = Datum> {
|
|
|
707
888
|
* returns SceneNode[] + optional overlays. See `semiotic/recipes` for
|
|
708
889
|
* reference layouts (waffle, calendar, horizon). */
|
|
709
890
|
customLayout?: import("./customLayout").CustomLayout;
|
|
891
|
+
/** Called when `customLayout` throws. See `getLayoutFailure()` for the
|
|
892
|
+
* latest structured failure diagnostic. */
|
|
893
|
+
onLayoutError?: (diagnostic: import("./customLayoutFailure").CustomLayoutFailureDiagnostic) => void;
|
|
710
894
|
/** User-supplied config blob threaded through to LayoutContext.config.
|
|
711
895
|
* Typed as `object` so caller-defined interfaces (without an index
|
|
712
896
|
* signature) flow through without casts; layouts narrow via their
|
|
713
897
|
* own `CustomLayout<TConfig>` parameterization. */
|
|
714
898
|
layoutConfig?: object;
|
|
899
|
+
/** Resolved shared selection projected into `LayoutContext.selection`. Kept off
|
|
900
|
+
* the rebuild path — a change restyles (if the layout returned `restyle`) or
|
|
901
|
+
* rebuilds, never re-ingests. */
|
|
902
|
+
layoutSelection?: import("./customLayoutSelection").CustomLayoutSelection | null;
|
|
715
903
|
}
|
|
716
904
|
export interface StreamXYFrameHandle<T = Datum> {
|
|
717
905
|
push(datum: T): void;
|
|
@@ -727,6 +915,15 @@ export interface StreamXYFrameHandle<T = Datum> {
|
|
|
727
915
|
x: [number, number];
|
|
728
916
|
y: [number, number];
|
|
729
917
|
} | null;
|
|
918
|
+
/** The most recent custom layout result (nodes/overlays as returned by the
|
|
919
|
+
* `customLayout` function) — host readback so pages that need the computed
|
|
920
|
+
* placement don't re-run the layout. Null before the first layout or when
|
|
921
|
+
* no custom layout is configured. A failed retry retains the prior good
|
|
922
|
+
* result; inspect `getLayoutFailure()` to distinguish that recovery. */
|
|
923
|
+
getCustomLayout(): import("./customLayout").LayoutResult | null;
|
|
924
|
+
/** The latest custom-layout failure, if any. Cleared by the next successful
|
|
925
|
+
* layout, by removing the custom layout, or by `clear()`. */
|
|
926
|
+
getLayoutFailure(): import("./customLayoutFailure").CustomLayoutFailureDiagnostic | null;
|
|
730
927
|
}
|
|
731
928
|
export type CanvasRendererFn = (ctx: CanvasRenderingContext2D, nodes: SceneNode[], scales: StreamScales, layout: StreamLayout) => void;
|
|
732
929
|
/** SVG equivalent of CanvasRendererFn — returns React elements for SSR/SVG rendering */
|
|
@@ -6,6 +6,15 @@ import { resolveAnimateConfig } from "./pipelineTransitionUtils";
|
|
|
6
6
|
import type { AnimateProp } from "./pipelineTransitionUtils";
|
|
7
7
|
import type { TransitionConfig } from "./types";
|
|
8
8
|
import type { HoverPointerCoords } from "./hoverUtils";
|
|
9
|
+
/**
|
|
10
|
+
* The small scheduling surface `useFrame` needs. Keeping this separate from
|
|
11
|
+
* the browser global gives hook tests a deterministic, handle-agnostic seam
|
|
12
|
+
* without coupling the frame lifecycle to a broader scheduler abstraction.
|
|
13
|
+
*/
|
|
14
|
+
export interface FrameScheduler {
|
|
15
|
+
requestAnimationFrame(callback: FrameRequestCallback): number;
|
|
16
|
+
cancelAnimationFrame(handle: number): void;
|
|
17
|
+
}
|
|
9
18
|
/**
|
|
10
19
|
* Frame-supplied margin defaults. Each Stream Frame has its own — XY's
|
|
11
20
|
* differs from Ordinal's, Network has both a default and a CENTERED variant
|
|
@@ -48,6 +57,12 @@ export interface UseFrameInput {
|
|
|
48
57
|
animate?: AnimateProp;
|
|
49
58
|
/** Frame's `transition` prop (legacy / explicit form). */
|
|
50
59
|
transitionProp?: TransitionConfig;
|
|
60
|
+
/**
|
|
61
|
+
* Optional rAF seam for deterministic frame tests or an embedding runtime.
|
|
62
|
+
* It owns both render scheduling and pointer-move coalescing. Omit it to
|
|
63
|
+
* use the browser's `requestAnimationFrame` / `cancelAnimationFrame`.
|
|
64
|
+
*/
|
|
65
|
+
frameScheduler?: FrameScheduler;
|
|
51
66
|
/**
|
|
52
67
|
* Frame's `dirtyRef` (the flag that forces a full canvas redraw on the
|
|
53
68
|
* next paint). When provided, useFrame installs a theme-change effect
|
|
@@ -94,12 +109,15 @@ export interface UseFrameResult {
|
|
|
94
109
|
introEnabled: boolean;
|
|
95
110
|
/** Stable id for the AccessibleDataTable region (hash-suffixed). */
|
|
96
111
|
tableId: string;
|
|
97
|
-
/** Token of the pending rAF, or
|
|
98
|
-
rafRef: React.MutableRefObject<number>;
|
|
112
|
+
/** Token of the pending rAF, or `null` if none. `0` is a valid token. */
|
|
113
|
+
rafRef: React.MutableRefObject<number | null>;
|
|
99
114
|
/** Frame assigns its render closure here. */
|
|
100
115
|
renderFnRef: React.MutableRefObject<() => void>;
|
|
101
116
|
/** Queue a render on the next animation frame. Coalesces. */
|
|
102
117
|
scheduleRender: () => void;
|
|
118
|
+
/** Cancel a queued render, if any. Direct/hydration paints use this before
|
|
119
|
+
* taking over so a stale rAF cannot race a synchronous frame. */
|
|
120
|
+
cancelRender: () => void;
|
|
103
121
|
/** Frame assigns its hover handler closure here. */
|
|
104
122
|
hoverHandlerRef: React.MutableRefObject<(coords: HoverPointerCoords) => void>;
|
|
105
123
|
/** Frame assigns its pointer-leave closure here. */
|
|
@@ -109,6 +127,7 @@ export interface UseFrameResult {
|
|
|
109
127
|
onPointerMove: (e: {
|
|
110
128
|
clientX: number;
|
|
111
129
|
clientY: number;
|
|
130
|
+
pointerType?: string;
|
|
112
131
|
}) => void;
|
|
113
132
|
/** Stable callback to attach to canvas's onPointerLeave (or onMouseLeave).
|
|
114
133
|
* Cancels any pending hover rAF and invokes hoverLeaveRef. */
|
|
@@ -79,6 +79,12 @@ export interface HydrationLifecycleOptions {
|
|
|
79
79
|
* would produce.
|
|
80
80
|
*/
|
|
81
81
|
renderFnRef: MutableRefObject<() => void>;
|
|
82
|
+
/**
|
|
83
|
+
* Optional shared-scheduler cancellation. A hydration paint is synchronous,
|
|
84
|
+
* so it must take ownership from any queued render before invoking the
|
|
85
|
+
* frame closure.
|
|
86
|
+
*/
|
|
87
|
+
cancelRender?: () => void;
|
|
82
88
|
/**
|
|
83
89
|
* Optional unmount cleanup. Frame-specific work the hook can't
|
|
84
90
|
* generalize — e.g. clearing the streaming `DataSourceAdapter`
|