semiotic 3.7.5 → 3.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +63 -18
- package/README.md +121 -27
- 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 +1741 -163
- package/ai/examples.md +174 -0
- package/ai/schema.json +2733 -536
- package/ai/surface-manifest.json +201 -0
- package/ai/system-prompt.md +20 -4
- package/dist/__tests__/scenarios/mcpProtocolTypes.d.ts +20 -0
- package/dist/components/AccessibleNavTree.d.ts +7 -1
- 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/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 +26 -1
- package/dist/components/ai/chartClinic.d.ts +91 -0
- package/dist/components/ai/chartClinicMetadata.generated.d.ts +15 -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 +102 -0
- package/dist/components/ai/describeChart.d.ts +7 -0
- package/dist/components/ai/describeRecipeChart.d.ts +16 -0
- package/dist/components/ai/generativeChart.d.ts +28 -3
- 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/ai/useNavigationSync.d.ts +17 -2
- package/dist/components/chartContainerMobile.d.ts +9 -0
- package/dist/components/charts/custom/GeoCustomChart.d.ts +48 -0
- package/dist/components/charts/custom/NetworkCustomChart.d.ts +8 -2
- 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/ChoroplethMap.d.ts +19 -2
- package/dist/components/charts/geo/DistanceCartogram.d.ts +15 -3
- package/dist/components/charts/geo/FlowMap.d.ts +11 -7
- package/dist/components/charts/geo/ProportionalSymbolMap.d.ts +15 -3
- package/dist/components/charts/geo/index.d.ts +2 -0
- package/dist/components/charts/index.d.ts +35 -1
- package/dist/components/charts/network/ChordDiagram.d.ts +10 -2
- package/dist/components/charts/network/CirclePack.d.ts +1 -1
- package/dist/components/charts/network/ForceDirectedGraph.d.ts +26 -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 +10 -2
- 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 +22 -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 +12 -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 +12 -1
- package/dist/components/charts/ordinal/SwarmPlot.d.ts +1 -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 +54 -0
- package/dist/components/charts/physics/EventDropChart.capability.d.ts +2 -0
- package/dist/components/charts/physics/EventDropChart.d.ts +60 -0
- package/dist/components/charts/physics/GaltonBoardChart.capability.d.ts +2 -0
- package/dist/components/charts/physics/GaltonBoardChart.d.ts +74 -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 +99 -0
- package/dist/components/charts/physics/PhysicsPileChart.capability.d.ts +2 -0
- package/dist/components/charts/physics/PhysicsPileChart.d.ts +60 -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 +57 -0
- package/dist/components/charts/physics/physicsChartUtils.d.ts +18 -0
- package/dist/components/charts/physics/physicsCustomLayout.d.ts +32 -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 +9 -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/shared/AnnotationLabel.d.ts +88 -0
- package/dist/components/charts/shared/annotationActivation.d.ts +35 -0
- package/dist/components/charts/shared/annotationLabelLayout.d.ts +5 -0
- package/dist/components/charts/shared/annotationRules.d.ts +2 -1
- 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/chartSelectionUtils.d.ts +4 -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/colorUtils.d.ts +16 -1
- package/dist/components/charts/shared/datumTypes.d.ts +2 -0
- package/dist/components/charts/shared/diagnoseAnnotationChecks.d.ts +6 -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/formatUtils.d.ts +3 -3
- package/dist/components/charts/shared/hatchFill.d.ts +87 -0
- package/dist/components/charts/shared/hooks.d.ts +34 -10
- package/dist/components/charts/shared/knownChartComponents.d.ts +9 -0
- package/dist/components/charts/shared/leastSquaresRegression.d.ts +16 -0
- package/dist/components/charts/shared/mergeShapeStyle.d.ts +3 -2
- package/dist/components/charts/shared/motionEncoding.d.ts +145 -0
- package/dist/components/charts/shared/responsiveRules.d.ts +56 -0
- package/dist/components/charts/shared/semanticInteractions.d.ts +42 -0
- package/dist/components/charts/shared/sparseArray.d.ts +1 -1
- package/dist/components/charts/shared/streamPropsHelpers.d.ts +17 -5
- package/dist/components/charts/shared/styleRules.d.ts +205 -0
- package/dist/components/charts/shared/temporalStrings.d.ts +7 -0
- package/dist/components/charts/shared/tooltipUtils.d.ts +22 -9
- package/dist/components/charts/shared/types.d.ts +58 -7
- package/dist/components/charts/shared/useAreaSeriesSetup.d.ts +16 -2
- package/dist/components/charts/shared/useChartSetup.d.ts +11 -4
- package/dist/components/charts/shared/useCustomChartSetup.d.ts +17 -5
- package/dist/components/charts/shared/useFrameImperativeHandle.d.ts +1 -2
- package/dist/components/charts/shared/useLikertAggregation.d.ts +4 -4
- package/dist/components/charts/shared/useNetworkChartSetup.d.ts +6 -2
- package/dist/components/charts/shared/useOrdinalBrush.d.ts +2 -1
- package/dist/components/charts/shared/useOrdinalPieceStyle.d.ts +25 -2
- package/dist/components/charts/shared/useStreamingLegend.d.ts +2 -2
- package/dist/components/charts/shared/useSyncedPushData.d.ts +49 -0
- package/dist/components/charts/shared/useXYLineStyle.d.ts +10 -0
- package/dist/components/charts/shared/useXYPointStyle.d.ts +19 -1
- package/dist/components/charts/shared/validateChartData.d.ts +7 -5
- package/dist/components/charts/shared/validationMap.d.ts +7 -9
- package/dist/components/charts/shared/validationMap.generated.d.ts +6 -0
- package/dist/components/charts/shared/withChartWrapper.d.ts +4 -3
- package/dist/components/charts/value/targetPresentation.d.ts +22 -0
- package/dist/components/charts/value/types.d.ts +5 -6
- package/dist/components/charts/xy/AreaChart.d.ts +9 -1
- package/dist/components/charts/xy/BubbleChart.d.ts +10 -1
- package/dist/components/charts/xy/ConnectedScatterplot.d.ts +7 -0
- package/dist/components/charts/xy/DifferenceChart.d.ts +1 -52
- package/dist/components/charts/xy/Heatmap.d.ts +2 -2
- package/dist/components/charts/xy/LineChart.d.ts +12 -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 +8 -1
- package/dist/components/charts/xy/Scatterplot.d.ts +11 -1
- package/dist/components/charts/xy/ScatterplotMatrix.d.ts +11 -1
- package/dist/components/charts/xy/StackedAreaChart.d.ts +16 -4
- package/dist/components/charts/xy/differenceSegments.d.ts +49 -0
- package/dist/components/charts/xy/scatterplotMatrixInteractionTypes.d.ts +12 -0
- package/dist/components/controls/SentenceFilter.d.ts +97 -0
- package/dist/components/controls/controlAudit.d.ts +24 -0
- package/dist/components/controls/controlContract.d.ts +57 -0
- package/dist/components/data/fromFlintChart.d.ts +74 -0
- package/dist/components/data/fromVegaLite.d.ts +46 -9
- package/dist/components/data/portability/index.d.ts +6 -3
- package/dist/components/data/portability/result.d.ts +52 -0
- package/dist/components/data/portability/spec.d.ts +31 -0
- package/dist/components/data/portability/vegaLite.d.ts +24 -6
- package/dist/components/export/chartConfig.d.ts +11 -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/{gofishBoba.d.ts → boba.d.ts} +2 -2
- 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 +178 -132
- package/dist/components/recipes/gofishIRExamples.d.ts +30 -81
- 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/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/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 +91 -0
- package/dist/components/recipes/recipeGlyph.d.ts +42 -0
- package/dist/components/recipes/recipeLegend.d.ts +53 -1
- package/dist/components/recipes/recipeUtils.d.ts +52 -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/rough/createRoughRenderMode.d.ts +46 -0
- package/dist/components/semiotic-ai-core.d.ts +47 -0
- package/dist/components/semiotic-ai.d.ts +53 -9
- package/dist/components/semiotic-controls.d.ts +20 -0
- package/dist/components/semiotic-experimental.d.ts +38 -9
- package/dist/components/semiotic-geo.d.ts +15 -0
- package/dist/components/semiotic-network.d.ts +15 -0
- package/dist/components/semiotic-ordinal.d.ts +14 -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 +60 -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 -30
- 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 -43
- package/dist/components/semiotic-rough.d.ts +4 -0
- 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 -76
- package/dist/components/semiotic-utils-core.d.ts +50 -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 +12 -0
- package/dist/components/semiotic.d.ts +44 -8
- package/dist/components/server/animatedGif.d.ts +36 -0
- package/dist/components/server/optionalImageTypes.d.ts +37 -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 +21 -0
- package/dist/components/server/serverChartConfigs.d.ts +22 -12
- 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/staticAnnotations.d.ts +6 -3
- package/dist/components/server/staticGeo.d.ts +4 -0
- package/dist/components/server/staticLegend.d.ts +2 -2
- 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 -2
- 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 +7 -23
- package/dist/components/stream/AriaLiveTooltip.d.ts +9 -0
- package/dist/components/stream/CanvasHitTester.d.ts +4 -4
- package/dist/components/stream/DataSourceAdapter.d.ts +1 -1
- package/dist/components/stream/FocusRing.d.ts +4 -2
- package/dist/components/stream/FrameRuntime.d.ts +57 -0
- package/dist/components/stream/GeoCanvasHitTester.d.ts +1 -1
- package/dist/components/stream/GeoParticlePool.d.ts +1 -1
- package/dist/components/stream/GeoPipelineStore.d.ts +62 -3
- package/dist/components/stream/GeoSVGOverlay.d.ts +64 -0
- package/dist/components/stream/NetworkCanvasHitTester.d.ts +2 -1
- package/dist/components/stream/NetworkPipelineStore.d.ts +44 -36
- package/dist/components/stream/NetworkSSRFrame.d.ts +17 -0
- package/dist/components/stream/NetworkSVGOverlay.d.ts +10 -1
- package/dist/components/stream/OrdinalCanvasHitTester.d.ts +2 -2
- package/dist/components/stream/OrdinalPipelineStore.d.ts +55 -11
- package/dist/components/stream/OrdinalSVGOverlay.d.ts +9 -1
- package/dist/components/stream/OrdinalStyleResolver.d.ts +12 -0
- package/dist/components/stream/ParticlePool.d.ts +1 -1
- package/dist/components/stream/PipelineStore.d.ts +81 -174
- package/dist/components/stream/SVGOverlay.d.ts +6 -0
- package/dist/components/stream/SceneGraph.d.ts +12 -4
- 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 +25 -12
- package/dist/components/stream/annotationAccessorResolver.d.ts +2 -2
- 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/customLayoutFailure.d.ts +33 -0
- package/dist/components/stream/customLayoutPalette.d.ts +19 -9
- package/dist/components/stream/frameGraphics.d.ts +4 -0
- package/dist/components/stream/frameKeyboardNavigation.d.ts +45 -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/geoPipelineUpdateResults.d.ts +34 -0
- package/dist/components/stream/geoSceneBuilder.d.ts +16 -0
- package/dist/components/stream/geoTypes.d.ts +97 -15
- package/dist/components/stream/glyphDef.d.ts +98 -0
- package/dist/components/stream/hitTarget.d.ts +170 -0
- package/dist/components/stream/hitTestUtils.d.ts +2 -2
- package/dist/components/stream/hoverUtils.d.ts +7 -2
- 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 +58 -0
- package/dist/components/stream/layouts/hierarchyUtils.d.ts +2 -2
- package/dist/components/stream/networkBezier.d.ts +10 -0
- package/dist/components/stream/networkColorAccessors.d.ts +49 -0
- package/dist/components/stream/networkCustomLayoutRunner.d.ts +23 -0
- package/dist/components/stream/networkCustomRestyle.d.ts +15 -0
- package/dist/components/stream/networkDefaultTooltip.d.ts +10 -0
- package/dist/components/stream/networkFrameAnimation.d.ts +7 -0
- package/dist/components/stream/networkFrameHandleTypes.d.ts +39 -0
- package/dist/components/stream/networkFrameInteraction.d.ts +37 -0
- package/dist/components/stream/networkFrameObservations.d.ts +15 -0
- package/dist/components/stream/networkFramePaint.d.ts +52 -0
- package/dist/components/stream/networkInteractionTypes.d.ts +26 -0
- package/dist/components/stream/networkPipelineConfig.d.ts +22 -0
- package/dist/components/stream/networkPipelineHelpers.d.ts +12 -0
- package/dist/components/stream/networkPipelineUpdateResults.d.ts +38 -0
- package/dist/components/stream/networkRealtimeEncoding.d.ts +41 -0
- package/dist/components/stream/networkTypes.d.ts +103 -51
- package/dist/components/stream/ordinalCanvasRenderers.d.ts +7 -0
- 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 +31 -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 -2
- package/dist/components/stream/ordinalSpatialIndex.d.ts +9 -0
- package/dist/components/stream/ordinalTypes.d.ts +68 -9
- 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 +86 -0
- package/dist/components/stream/physics/PhysicsPipelineTypes.d.ts +181 -0
- package/dist/components/stream/physics/PhysicsSVGOverlay.d.ts +78 -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 +317 -0
- package/dist/components/stream/physics/physicsBodyCanvas.d.ts +27 -0
- package/dist/components/stream/physics/physicsFrameObservations.d.ts +19 -0
- package/dist/components/stream/physics/physicsFrameSetup.d.ts +4 -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 +27 -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 +18 -0
- package/dist/components/stream/pipelineBufferUtils.d.ts +26 -0
- package/dist/components/stream/pipelineConfig.d.ts +179 -0
- package/dist/components/stream/pipelineDecay.d.ts +21 -3
- 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 +17 -3
- 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 +33 -0
- package/dist/components/stream/pipelineStyleResolvers.d.ts +46 -0
- package/dist/components/stream/pipelineTransitions.d.ts +3 -1
- package/dist/components/stream/pipelineUpdateContract.d.ts +69 -0
- package/dist/components/stream/pipelineUpdateStore.d.ts +21 -0
- package/dist/components/stream/pulseFrameRefresh.d.ts +22 -0
- package/dist/components/stream/renderBackend.d.ts +27 -0
- package/dist/components/stream/renderers/canvasRenderHelpers.d.ts +15 -1
- package/dist/components/stream/renderers/geoCanvasRenderer.d.ts +3 -2
- package/dist/components/stream/renderers/glyphCanvasRenderer.d.ts +6 -0
- package/dist/components/stream/renderers/networkParticleRenderer.d.ts +1 -1
- package/dist/components/stream/renderers/resolveCSSColor.d.ts +6 -0
- package/dist/components/stream/sceneRenderBackendTypes.d.ts +28 -0
- package/dist/components/stream/sceneRevisionDiagnostics.d.ts +45 -0
- package/dist/components/stream/streamSemanticTypes.d.ts +16 -0
- package/dist/components/stream/streamStoreSync.d.ts +37 -0
- package/dist/components/stream/streamThemeTypes.d.ts +14 -0
- package/dist/components/stream/svgOverlayUtils.d.ts +10 -0
- package/dist/components/stream/test-utils/frameScheduler.d.ts +12 -0
- package/dist/components/stream/test-utils/revisionConsumption.d.ts +13 -0
- package/dist/components/stream/titleLayout.d.ts +31 -0
- package/dist/components/stream/types.d.ts +165 -72
- package/dist/components/stream/useCanvasFrameHost.d.ts +71 -0
- package/dist/components/stream/useFrame.d.ts +44 -2
- package/dist/components/stream/useHydration.d.ts +6 -0
- package/dist/components/stream/useLegendCategoryEmission.d.ts +5 -0
- package/dist/components/stream/useSemanticFrameInteractions.d.ts +22 -0
- package/dist/components/stream/useUpdateResultSnapshot.d.ts +7 -0
- 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/xyFrameAxisTypes.d.ts +50 -0
- package/dist/components/stream/xySceneBuilders/types.d.ts +10 -9
- 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/rough.min.js +1 -0
- package/dist/rough.module.min.js +1 -0
- 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 +53 -9
- 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 +20 -0
- package/dist/semiotic-data.min.js +1 -1
- package/dist/semiotic-data.module.min.js +1 -1
- package/dist/semiotic-experimental.d.ts +38 -9
- package/dist/semiotic-experimental.min.js +1 -1
- package/dist/semiotic-experimental.module.min.js +1 -1
- package/dist/semiotic-geo.d.ts +15 -0
- package/dist/semiotic-network.d.ts +15 -0
- package/dist/semiotic-ordinal.d.ts +14 -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 +60 -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 -30
- 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 -43
- package/dist/semiotic-recipes.min.js +1 -1
- package/dist/semiotic-recipes.module.min.js +1 -1
- package/dist/semiotic-rough.d.ts +4 -0
- 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 -76
- package/dist/semiotic-themes.min.js +1 -2
- package/dist/semiotic-themes.module.min.js +1 -2
- package/dist/semiotic-utils-core.d.ts +50 -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 +12 -0
- package/dist/semiotic.d.ts +44 -8
- package/dist/semiotic.min.js +1 -1
- package/dist/semiotic.module.min.js +1 -1
- package/dist/server.min.js +1 -1
- package/dist/server.module.min.js +1 -1
- package/dist/test-utils/capturedFrameProps.d.ts +67 -0
- package/dist/test-utils/frameMock.d.ts +12 -9
- 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 +259 -88
- 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/components/recipes/gofish.d.ts +0 -207
- package/dist/components/recipes/gofishInterpreter.d.ts +0 -52
- package/dist/components/recipes/gofishLambdas.d.ts +0 -145
- package/dist/semiotic-ai-semiotic-ai-u954ylUn.js +0 -2
- package/dist/semiotic-ai-statisticalOverlays-CU7jW05Q.js +0 -1
- package/dist/semiotic-semiotic-BmrYbi99.js +0 -2
- package/dist/semiotic-statisticalOverlays-IjZw8Lsu.js +0 -1
- package/dist/xy-semiotic-xy-Dufu3D0-.js +0 -2
- package/dist/xy-statisticalOverlays-3Ni9bRph.js +0 -1
|
@@ -4,26 +4,19 @@ import type { AnimateProp } from "./pipelineTransitionUtils";
|
|
|
4
4
|
import type { LegendGroup, GradientLegendConfig, LegendLayout } from "../types/legendTypes";
|
|
5
5
|
import type { ArrowOfTime, WindowMode, LineStyle, BarStyle, WaterfallStyle, SwarmStyle, HoverAnnotationConfig, HoverData, AnnotationContext, AnnotationAnchorMode } from "../realtime/types";
|
|
6
6
|
import type { Datum } from "../charts/shared/datumTypes";
|
|
7
|
+
import type { HatchFill } from "../charts/shared/hatchFill";
|
|
7
8
|
import type { CoercibleNumber } from "./accessorUtils";
|
|
8
9
|
import type { AutoPlaceAnnotations } from "../recipes/annotationLayout";
|
|
9
10
|
import type { SymbolName } from "./symbolPath";
|
|
11
|
+
import type { GlyphDef } from "./glyphDef";
|
|
12
|
+
import type { SceneRenderMode } from "./sceneRenderBackendTypes";
|
|
13
|
+
import type { StreamSemanticInteractionProps } from "./streamSemanticTypes";
|
|
14
|
+
import type { XYFrameAxisConfig } from "./xyFrameAxisTypes";
|
|
15
|
+
export type { SceneRenderBackend, SceneRenderMode } from "./sceneRenderBackendTypes";
|
|
16
|
+
export type { ThemeSemanticColors } from "./streamThemeTypes";
|
|
17
|
+
export type { AxisTickFormat, AxisTickFormatter, XYFrameAxisConfig } from "./xyFrameAxisTypes";
|
|
10
18
|
export type SceneDatum = Datum | null;
|
|
11
19
|
export type SeriesDatum = Datum[] | null;
|
|
12
|
-
export type AxisTickFormat = ((d: number, index?: number, allTicks?: number[]) => string) | ((d: string, index?: number, allTicks?: number[]) => string) | ((d: Date, index?: number, allTicks?: number[]) => string);
|
|
13
|
-
export interface ThemeSemanticColors {
|
|
14
|
-
primary?: string;
|
|
15
|
-
secondary?: string;
|
|
16
|
-
success?: string;
|
|
17
|
-
danger?: string;
|
|
18
|
-
warning?: string;
|
|
19
|
-
error?: string;
|
|
20
|
-
info?: string;
|
|
21
|
-
text?: string;
|
|
22
|
-
textSecondary?: string;
|
|
23
|
-
border?: string;
|
|
24
|
-
grid?: string;
|
|
25
|
-
surface?: string;
|
|
26
|
-
}
|
|
27
20
|
export interface DecayConfig {
|
|
28
21
|
type: "linear" | "exponential" | "step";
|
|
29
22
|
/** Exponential: half-life in buffer positions (default: bufferSize/2) */
|
|
@@ -104,8 +97,14 @@ export interface Style {
|
|
|
104
97
|
strokeWidth?: number;
|
|
105
98
|
strokeDasharray?: string;
|
|
106
99
|
strokeLinecap?: "butt" | "round" | "square";
|
|
107
|
-
/**
|
|
108
|
-
|
|
100
|
+
/**
|
|
101
|
+
* Fill for the mark. One of:
|
|
102
|
+
* - a color string (or CSS var)
|
|
103
|
+
* - a {@link HatchFill} descriptor (declarative hatch — resolves to a
|
|
104
|
+
* CanvasPattern on canvas and an SVG `<pattern>` on the SSR/overlay path)
|
|
105
|
+
* - a `CanvasPattern` (e.g. a hand-built `createHatchPattern` — canvas only)
|
|
106
|
+
*/
|
|
107
|
+
fill?: string | HatchFill | CanvasPattern;
|
|
109
108
|
fillOpacity?: number;
|
|
110
109
|
opacity?: number;
|
|
111
110
|
/** For icon/isotype bars: an image to stamp instead of filling */
|
|
@@ -117,7 +116,19 @@ export interface Style {
|
|
|
117
116
|
/** Internal geo line flag: fade line ends at projection clipping edges. */
|
|
118
117
|
_edgeFade?: boolean;
|
|
119
118
|
}
|
|
120
|
-
|
|
119
|
+
/**
|
|
120
|
+
* Optional semantic payload carried beside render geometry. `accessibleDatum`
|
|
121
|
+
* preserves the full row; `tableFields` lets a recipe expose a curated,
|
|
122
|
+
* user-facing table projection without reducing the scene datum itself.
|
|
123
|
+
*/
|
|
124
|
+
export interface SceneAccessibilityMetadata {
|
|
125
|
+
accessibleDatum?: SceneDatum | Datum[];
|
|
126
|
+
accessibility?: {
|
|
127
|
+
label?: string;
|
|
128
|
+
tableFields?: SceneDatum | Datum[];
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
export type SceneNode = LineSceneNode | AreaSceneNode | PointSceneNode | SymbolSceneNode | GlyphSceneNode | RectSceneNode | HeatcellSceneNode | CandlestickSceneNode;
|
|
121
132
|
export interface LineColorThreshold {
|
|
122
133
|
value: number;
|
|
123
134
|
color: string;
|
|
@@ -132,6 +143,8 @@ export interface LineSceneNode {
|
|
|
132
143
|
colorThresholds?: LineColorThreshold[];
|
|
133
144
|
style: Style;
|
|
134
145
|
datum: SeriesDatum;
|
|
146
|
+
accessibleDatum?: SceneAccessibilityMetadata["accessibleDatum"];
|
|
147
|
+
accessibility?: SceneAccessibilityMetadata["accessibility"];
|
|
135
148
|
group?: string;
|
|
136
149
|
/** Horizontal gradient for the line stroke */
|
|
137
150
|
strokeGradient?: {
|
|
@@ -163,6 +176,8 @@ export interface AreaSceneNode {
|
|
|
163
176
|
bottomPath: [number, number][];
|
|
164
177
|
style: Style;
|
|
165
178
|
datum: SeriesDatum;
|
|
179
|
+
accessibleDatum?: SceneAccessibilityMetadata["accessibleDatum"];
|
|
180
|
+
accessibility?: SceneAccessibilityMetadata["accessibility"];
|
|
166
181
|
group?: string;
|
|
167
182
|
/** Clip the area to this rect (in plot-relative pixels). Used by horizon
|
|
168
183
|
* charts to band a single series into N slices. */
|
|
@@ -223,6 +238,8 @@ export interface PointSceneNode {
|
|
|
223
238
|
r: number;
|
|
224
239
|
style: Style;
|
|
225
240
|
datum: SceneDatum;
|
|
241
|
+
accessibleDatum?: SceneAccessibilityMetadata["accessibleDatum"];
|
|
242
|
+
accessibility?: SceneAccessibilityMetadata["accessibility"];
|
|
226
243
|
/** Optional unique identifier for point-anchored annotations */
|
|
227
244
|
pointId?: string;
|
|
228
245
|
/** Pulse glow intensity 0–1 (set by PipelineStore when pulse is active) */
|
|
@@ -262,6 +279,64 @@ export interface SymbolSceneNode {
|
|
|
262
279
|
rotation?: number;
|
|
263
280
|
style: Style;
|
|
264
281
|
datum: SceneDatum;
|
|
282
|
+
accessibleDatum?: SceneAccessibilityMetadata["accessibleDatum"];
|
|
283
|
+
accessibility?: SceneAccessibilityMetadata["accessibility"];
|
|
284
|
+
/** Optional unique identifier for point-anchored annotations. */
|
|
285
|
+
pointId?: string;
|
|
286
|
+
/** Pulse glow intensity 0–1 (set by PipelineStore when pulse is active). */
|
|
287
|
+
_pulseIntensity?: number;
|
|
288
|
+
/** Pulse glow color. */
|
|
289
|
+
_pulseColor?: string;
|
|
290
|
+
/** Pulse glow radius in px. */
|
|
291
|
+
_pulseGlowRadius?: number;
|
|
292
|
+
/** Animation target fields (set during transitions). */
|
|
293
|
+
_targetX?: number;
|
|
294
|
+
_targetY?: number;
|
|
295
|
+
_targetR?: number;
|
|
296
|
+
_targetOpacity?: number;
|
|
297
|
+
/** Per-datum decay opacity (set by PipelineStore.applyDecay). */
|
|
298
|
+
_decayOpacity?: number;
|
|
299
|
+
/** Stable identity key for transition tracking. */
|
|
300
|
+
_transitionKey?: string;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Glyph node — the composite-pictogram channel. Where `symbol` stamps one
|
|
304
|
+
* `d3-shape` path, `glyph` stamps a small multi-part vector pictogram (a
|
|
305
|
+
* `GlyphDef`: an ISOTYPE server sign, a factory, a worker) with per-node
|
|
306
|
+
* `color`/`accent` paints resolved against the definition's role tokens, and
|
|
307
|
+
* an optional partial fill (`fraction`/`fractionStart`) for unit-chart final
|
|
308
|
+
* signs — pair with the `unitize` recipe. Painted on canvas and in SVG/SSR
|
|
309
|
+
* via the shared `glyphDef` helpers, hit-tested and keyboard-navigated by its
|
|
310
|
+
* drawn bounds, and transition-tracked like a point. Uses `x`/`y` in XY,
|
|
311
|
+
* ordinal, and geo scenes (the network variant uses `cx`/`cy`).
|
|
312
|
+
*/
|
|
313
|
+
export interface GlyphSceneNode {
|
|
314
|
+
type: "glyph";
|
|
315
|
+
x: number;
|
|
316
|
+
y: number;
|
|
317
|
+
/** Rendered height in px — width follows the definition's viewBox aspect. */
|
|
318
|
+
size: number;
|
|
319
|
+
/** The multi-part pictogram definition to stamp. */
|
|
320
|
+
glyph: GlyphDef;
|
|
321
|
+
/** Primary paint for parts declaring `"color"`. Falls back to `style.fill`. */
|
|
322
|
+
color?: string;
|
|
323
|
+
/** Accent paint for parts declaring `"accent"`. */
|
|
324
|
+
accent?: string;
|
|
325
|
+
/** Partial fill 0–1 — how much of the sign is painted. @default 1 */
|
|
326
|
+
fraction?: number;
|
|
327
|
+
/** Where the partial fill begins, 0–1 (range boundary signs). @default 0 */
|
|
328
|
+
fractionStart?: number;
|
|
329
|
+
/** Partial-fill axis: horizontal fills left→right, vertical bottom→up. @default "horizontal" */
|
|
330
|
+
fractionDirection?: "horizontal" | "vertical";
|
|
331
|
+
/** Ghost paint drawn at full extent beneath a partial fill so the whole
|
|
332
|
+
* sign stays countable (the ISOTYPE partial-symbol convention). */
|
|
333
|
+
ghostColor?: string;
|
|
334
|
+
/** Rotation in radians about (x, y). */
|
|
335
|
+
rotation?: number;
|
|
336
|
+
style: Style;
|
|
337
|
+
datum: SceneDatum;
|
|
338
|
+
accessibleDatum?: SceneAccessibilityMetadata["accessibleDatum"];
|
|
339
|
+
accessibility?: SceneAccessibilityMetadata["accessibility"];
|
|
265
340
|
/** Optional unique identifier for point-anchored annotations. */
|
|
266
341
|
pointId?: string;
|
|
267
342
|
/** Pulse glow intensity 0–1 (set by PipelineStore when pulse is active). */
|
|
@@ -320,6 +395,8 @@ export interface RectSceneNode {
|
|
|
320
395
|
};
|
|
321
396
|
style: Style;
|
|
322
397
|
datum: SceneDatum;
|
|
398
|
+
accessibleDatum?: SceneAccessibilityMetadata["accessibleDatum"];
|
|
399
|
+
accessibility?: SceneAccessibilityMetadata["accessibility"];
|
|
323
400
|
group?: string;
|
|
324
401
|
_pulseIntensity?: number;
|
|
325
402
|
_pulseColor?: string;
|
|
@@ -342,6 +419,8 @@ export interface HeatcellSceneNode {
|
|
|
342
419
|
h: number;
|
|
343
420
|
fill: string;
|
|
344
421
|
datum: SceneDatum;
|
|
422
|
+
accessibleDatum?: SceneAccessibilityMetadata["accessibleDatum"];
|
|
423
|
+
accessibility?: SceneAccessibilityMetadata["accessibility"];
|
|
345
424
|
/** Optional style object (used for decay/transition opacity on heatmap cells) */
|
|
346
425
|
style?: Style;
|
|
347
426
|
/** Numeric cell value (for canvas text rendering when showValues is enabled) */
|
|
@@ -379,6 +458,8 @@ export interface CandlestickSceneNode {
|
|
|
379
458
|
/** Range/dumbbell mode — no body, endpoint dots instead */
|
|
380
459
|
isRange?: boolean;
|
|
381
460
|
datum: SceneDatum;
|
|
461
|
+
accessibleDatum?: SceneAccessibilityMetadata["accessibleDatum"];
|
|
462
|
+
accessibility?: SceneAccessibilityMetadata["accessibility"];
|
|
382
463
|
/** Optional style object (used during transition opacity animations) */
|
|
383
464
|
style?: Style;
|
|
384
465
|
_pulseIntensity?: number;
|
|
@@ -431,6 +512,30 @@ export interface StreamScales {
|
|
|
431
512
|
x: ScaleLinear<number, number>;
|
|
432
513
|
y: ScaleLinear<number, number>;
|
|
433
514
|
}
|
|
515
|
+
/**
|
|
516
|
+
* Context handed to a `foregroundGraphics` / `backgroundGraphics` callback. The
|
|
517
|
+
* function form receives the frame's **resolved scales** alongside `size` +
|
|
518
|
+
* `margin`, so bespoke SVG overlays anchor to the same scales the chart drew
|
|
519
|
+
* (instead of re-deriving them from extents by hand and risking drift). `scales`
|
|
520
|
+
* is `null` before the first layout pass — fall back to your own mapping then.
|
|
521
|
+
* This is the HOC analogue of what custom layouts get via `ctx.scales`.
|
|
522
|
+
*
|
|
523
|
+
* Generic over the scale shape: XY frames pass {@link StreamScales} (`{x, y}`),
|
|
524
|
+
* the ordinal frame passes its `{o, r, projection}` scales.
|
|
525
|
+
*/
|
|
526
|
+
export interface FrameGraphicsContext<S = StreamScales> {
|
|
527
|
+
size: number[];
|
|
528
|
+
margin: {
|
|
529
|
+
top: number;
|
|
530
|
+
right: number;
|
|
531
|
+
bottom: number;
|
|
532
|
+
left: number;
|
|
533
|
+
};
|
|
534
|
+
scales: S | null;
|
|
535
|
+
}
|
|
536
|
+
/** A foreground/background graphics value: static SVG, or a function of the
|
|
537
|
+
* frame's geometry + resolved scales. */
|
|
538
|
+
export type FrameGraphicsProp<S = StreamScales> = ReactNode | ((ctx: FrameGraphicsContext<S>) => ReactNode);
|
|
434
539
|
export interface StreamLayout {
|
|
435
540
|
width: number;
|
|
436
541
|
height: number;
|
|
@@ -471,52 +576,7 @@ export interface BandConfig<T = Datum> {
|
|
|
471
576
|
*/
|
|
472
577
|
interactive?: boolean;
|
|
473
578
|
}
|
|
474
|
-
|
|
475
|
-
* Per-axis configuration object for an XY frame's `axes: []` array.
|
|
476
|
-
* Distinct from `AxisConfig` exported from the HOC layer (which is the
|
|
477
|
-
* chart-level `xLabel` / `yLabel` / `xFormat` / `yFormat` bundle) —
|
|
478
|
-
* this type describes one axis at a time and is what
|
|
479
|
-
* `frameProps.axes[i]` consumes.
|
|
480
|
-
*
|
|
481
|
-
* Re-exported under the legacy name `AxisConfig` from `SVGOverlay.tsx`
|
|
482
|
-
* for backwards-compatibility with internal callers; new code should
|
|
483
|
-
* import this name directly.
|
|
484
|
-
*/
|
|
485
|
-
export interface XYFrameAxisConfig {
|
|
486
|
-
orient: "left" | "right" | "top" | "bottom";
|
|
487
|
-
label?: string;
|
|
488
|
-
ticks?: number;
|
|
489
|
-
/** Per-axis tick label formatter. ReactNode return is supported and
|
|
490
|
-
* renders inside a `<foreignObject>`. */
|
|
491
|
-
tickFormat?: (d: any, index?: number, allTicks?: number[]) => string | ReactNode;
|
|
492
|
-
baseline?: boolean | "under";
|
|
493
|
-
jaggedBase?: boolean;
|
|
494
|
-
/** Explicit tick values. When provided, bypasses both d3's "nice"
|
|
495
|
-
* generator and `axisExtent: "exact"` — the caller has hand-picked
|
|
496
|
-
* the positions. Pixel-distance filtering downstream still drops
|
|
497
|
-
* overlapping labels. Mirrors the ordinal frame's `rTickValues`. */
|
|
498
|
-
tickValues?: Array<number | Date>;
|
|
499
|
-
/** Grid line stroke style: `"dashed"` (6,4), `"dotted"` (2,4), or a
|
|
500
|
-
* custom strokeDasharray string. Applied to grid lines extending
|
|
501
|
-
* from ticks across the chart area. */
|
|
502
|
-
gridStyle?: "dashed" | "dotted" | string;
|
|
503
|
-
/** Always include the domain max as a tick, even if d3 omits it. */
|
|
504
|
-
includeMax?: boolean;
|
|
505
|
-
/** Auto-rotate labels 45° when horizontal spacing is too tight. */
|
|
506
|
-
autoRotate?: boolean;
|
|
507
|
-
/** Highlight ticks at time boundaries (new month, year, etc.) with
|
|
508
|
-
* semibold text. `true` auto-detects Date boundaries. A function
|
|
509
|
-
* receives (value, index) and returns true for landmark ticks. */
|
|
510
|
-
landmarkTicks?: boolean | ((value: any, index: number) => boolean);
|
|
511
|
-
/** Tick label anchoring strategy:
|
|
512
|
-
* - `"middle"` (default): all tick labels centered on the tick mark
|
|
513
|
-
* - `"edges"`: first tick label anchors to start, last to end,
|
|
514
|
-
* middles stay centered. Pairs naturally with `axisExtent: "exact"`
|
|
515
|
-
* — pins the domain to the data min/max AND keeps the extreme
|
|
516
|
-
* labels from overflowing the plot. */
|
|
517
|
-
tickAnchor?: "middle" | "edges";
|
|
518
|
-
}
|
|
519
|
-
export interface StreamXYFrameProps<T = Datum> {
|
|
579
|
+
export interface StreamXYFrameProps<T = Datum> extends StreamSemanticInteractionProps<HoverData> {
|
|
520
580
|
chartType: StreamChartType;
|
|
521
581
|
runtimeMode?: RuntimeMode;
|
|
522
582
|
data?: T[];
|
|
@@ -526,6 +586,12 @@ export interface StreamXYFrameProps<T = Datum> {
|
|
|
526
586
|
chunkSize?: number;
|
|
527
587
|
xAccessor?: string | ((d: T) => CoercibleNumber);
|
|
528
588
|
yAccessor?: string | ((d: T) => CoercibleNumber);
|
|
589
|
+
/**
|
|
590
|
+
* Force domain/scene re-derivation when a stable function accessor's
|
|
591
|
+
* external semantics changed without receiving a new function identity.
|
|
592
|
+
* Prefer changing the accessor reference where possible.
|
|
593
|
+
*/
|
|
594
|
+
accessorRevision?: number;
|
|
529
595
|
colorAccessor?: string | ((d: T) => string);
|
|
530
596
|
sizeAccessor?: string | ((d: T) => CoercibleNumber);
|
|
531
597
|
/** Categorical accessor → glyph shape (scatter/bubble). */
|
|
@@ -541,22 +607,25 @@ export interface StreamXYFrameProps<T = Datum> {
|
|
|
541
607
|
* - "zero" (default): standard stack from y=0
|
|
542
608
|
* - "wiggle": Byron–Wattenberg streamgraph offset (minimizes wiggle)
|
|
543
609
|
* - "silhouette": center the stack symmetrically around y=0
|
|
610
|
+
* - "diverging": positives stack above 0, negatives below 0 (signed values)
|
|
544
611
|
*
|
|
545
612
|
* Mutually exclusive with `normalize`: when `normalize` is `true`, the
|
|
546
613
|
* stack is forced to a `"zero"` baseline (any other value is ignored)
|
|
547
614
|
* because normalization assumes a fixed `[0, 1]` y-domain.
|
|
548
615
|
*/
|
|
549
|
-
baseline?: "zero" | "wiggle" | "silhouette";
|
|
616
|
+
baseline?: "zero" | "wiggle" | "silhouette" | "diverging";
|
|
550
617
|
/**
|
|
551
618
|
* Stack order — controls which series sits at the top, middle, or bottom.
|
|
552
619
|
* - "key" (default): alphabetical by group key
|
|
620
|
+
* - "input": first-seen group order within the current data
|
|
621
|
+
* buffer/window; streaming eviction can change this order
|
|
553
622
|
* - "insideOut": largest-total series in the middle, smaller alternating
|
|
554
623
|
* above/below. Combined with `baseline: "wiggle"` or `"silhouette"`,
|
|
555
624
|
* produces the canonical streamgraph look where a "central anchor"
|
|
556
625
|
* layer sits across y=0 and other layers stack outward.
|
|
557
626
|
* - "asc" / "desc": by total ascending / descending
|
|
558
627
|
*/
|
|
559
|
-
stackOrder?: "key" | "insideOut" | "asc" | "desc";
|
|
628
|
+
stackOrder?: "key" | "input" | "insideOut" | "asc" | "desc";
|
|
560
629
|
/**
|
|
561
630
|
* Accessor returning a symmetric uncertainty offset per datum.
|
|
562
631
|
* When set, an uncertainty band is drawn ± this offset from the line.
|
|
@@ -621,7 +690,7 @@ export interface StreamXYFrameProps<T = Datum> {
|
|
|
621
690
|
windowSize?: number;
|
|
622
691
|
timeAccessor?: string | ((d: T) => number);
|
|
623
692
|
xScaleType?: "linear" | "log" | "time";
|
|
624
|
-
yScaleType?: "linear" | "log";
|
|
693
|
+
yScaleType?: "linear" | "log" | "symlog";
|
|
625
694
|
xExtent?: [number | undefined, number | undefined] | [number];
|
|
626
695
|
yExtent?: [number | undefined, number | undefined] | [number];
|
|
627
696
|
extentPadding?: number;
|
|
@@ -641,6 +710,8 @@ export interface StreamXYFrameProps<T = Datum> {
|
|
|
641
710
|
};
|
|
642
711
|
className?: string;
|
|
643
712
|
background?: string;
|
|
713
|
+
/** Optional scene paint backend. Exact scene geometry remains interactive. */
|
|
714
|
+
renderMode?: SceneRenderMode<SceneNode>;
|
|
644
715
|
lineStyle?: LineStyle | ((d: T, group?: string) => Style);
|
|
645
716
|
pointStyle?: (d: T) => Style & {
|
|
646
717
|
r?: number;
|
|
@@ -650,7 +721,7 @@ export interface StreamXYFrameProps<T = Datum> {
|
|
|
650
721
|
waterfallStyle?: WaterfallStyle;
|
|
651
722
|
swarmStyle?: SwarmStyle;
|
|
652
723
|
barColors?: Record<string, string>;
|
|
653
|
-
colorScheme?: string | string[]
|
|
724
|
+
colorScheme?: string | string[] | Record<string, string>;
|
|
654
725
|
showAxes?: boolean;
|
|
655
726
|
/**
|
|
656
727
|
* Per-axis config array. See `XYFrameAxisConfig` for the full set of
|
|
@@ -675,8 +746,6 @@ export interface StreamXYFrameProps<T = Datum> {
|
|
|
675
746
|
tickFormatValue?: (value: number) => string;
|
|
676
747
|
hoverAnnotation?: boolean | HoverAnnotationConfig;
|
|
677
748
|
tooltipContent?: (d: HoverData) => ReactNode;
|
|
678
|
-
customHoverBehavior?: (d: HoverData | null) => void;
|
|
679
|
-
customClickBehavior?: (d: HoverData | null) => void;
|
|
680
749
|
enableHover?: boolean;
|
|
681
750
|
/** Max pixel distance for hover/click hit testing. Default 30. */
|
|
682
751
|
hoverRadius?: number;
|
|
@@ -724,9 +793,9 @@ export interface StreamXYFrameProps<T = Datum> {
|
|
|
724
793
|
/** Fires when the current legend category domain changes after scene rebuilds. */
|
|
725
794
|
onCategoriesChange?: (categories: string[]) => void;
|
|
726
795
|
/** SVG elements rendered behind the canvas (in pixel space) */
|
|
727
|
-
backgroundGraphics?:
|
|
796
|
+
backgroundGraphics?: FrameGraphicsProp;
|
|
728
797
|
/** SVG elements rendered on top of everything (in SVG overlay) */
|
|
729
|
-
foregroundGraphics?:
|
|
798
|
+
foregroundGraphics?: FrameGraphicsProp;
|
|
730
799
|
/** Canvas renderers executed before the chart-type renderers (e.g. connecting lines under points) */
|
|
731
800
|
canvasPreRenderers?: CanvasRendererFn[];
|
|
732
801
|
/** SVG pre-renderers for SSR — SVG equivalent of canvasPreRenderers, rendered under data marks */
|
|
@@ -745,6 +814,18 @@ export interface StreamXYFrameProps<T = Datum> {
|
|
|
745
814
|
animate?: AnimateProp;
|
|
746
815
|
/** Frame-level data liveness indicator */
|
|
747
816
|
staleness?: StalenessConfig;
|
|
817
|
+
/** Optional rAF seam for deterministic host scheduling. */
|
|
818
|
+
frameScheduler?: import("./useFrame").FrameScheduler;
|
|
819
|
+
/** Monotonic wall-clock seam for deterministic replay, tests, or evidence capture. */
|
|
820
|
+
clock?: import("./FrameRuntime").FrameClock;
|
|
821
|
+
/** Injectable random source for frame-local stochastic work. */
|
|
822
|
+
random?: import("./FrameRuntime").FrameRandom;
|
|
823
|
+
/** Serializable deterministic random seed. Ignored when `random` is supplied. */
|
|
824
|
+
seed?: number;
|
|
825
|
+
/** Freeze logical animation time and cancel queued work while paused. */
|
|
826
|
+
paused?: boolean;
|
|
827
|
+
/** Freeze logical animation time while the page is hidden. Defaults to true for XY frames. */
|
|
828
|
+
suspendWhenHidden?: boolean;
|
|
748
829
|
/** Marginal distribution plots in axis margins (histogram, violin, ridgeline, boxplot) */
|
|
749
830
|
marginalGraphics?: MarginalGraphicsConfig;
|
|
750
831
|
/** Aggregation mode for streaming heatmap (count, sum, mean) */
|
|
@@ -772,6 +853,9 @@ export interface StreamXYFrameProps<T = Datum> {
|
|
|
772
853
|
* returns SceneNode[] + optional overlays. See `semiotic/recipes` for
|
|
773
854
|
* reference layouts (waffle, calendar, horizon). */
|
|
774
855
|
customLayout?: import("./customLayout").CustomLayout;
|
|
856
|
+
/** Called when `customLayout` throws. See `getLayoutFailure()` for the
|
|
857
|
+
* latest structured failure diagnostic. */
|
|
858
|
+
onLayoutError?: (diagnostic: import("./customLayoutFailure").CustomLayoutFailureDiagnostic) => void;
|
|
775
859
|
/** User-supplied config blob threaded through to LayoutContext.config.
|
|
776
860
|
* Typed as `object` so caller-defined interfaces (without an index
|
|
777
861
|
* signature) flow through without casts; layouts narrow via their
|
|
@@ -796,6 +880,15 @@ export interface StreamXYFrameHandle<T = Datum> {
|
|
|
796
880
|
x: [number, number];
|
|
797
881
|
y: [number, number];
|
|
798
882
|
} | null;
|
|
883
|
+
/** The most recent custom layout result (nodes/overlays as returned by the
|
|
884
|
+
* `customLayout` function) — host readback so pages that need the computed
|
|
885
|
+
* placement don't re-run the layout. Null before the first layout or when
|
|
886
|
+
* no custom layout is configured. A failed retry retains the prior good
|
|
887
|
+
* result; inspect `getLayoutFailure()` to distinguish that recovery. */
|
|
888
|
+
getCustomLayout(): import("./customLayout").LayoutResult | null;
|
|
889
|
+
/** The latest custom-layout failure, if any. Cleared by the next successful
|
|
890
|
+
* layout, by removing the custom layout, or by `clear()`. */
|
|
891
|
+
getLayoutFailure(): import("./customLayoutFailure").CustomLayoutFailureDiagnostic | null;
|
|
799
892
|
}
|
|
800
893
|
export type CanvasRendererFn = (ctx: CanvasRenderingContext2D, nodes: SceneNode[], scales: StreamScales, layout: StreamLayout) => void;
|
|
801
894
|
/** SVG equivalent of CanvasRendererFn — returns React elements for SSR/SVG rendering */
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { DependencyList, MutableRefObject, ReactNode, RefObject } from "react";
|
|
3
|
+
import type { FrameMargin, UseFrameResult } from "./useFrame";
|
|
4
|
+
export interface CanvasFrameHostRuntime {
|
|
5
|
+
readonly isActive: boolean;
|
|
6
|
+
subscribe(listener: () => void): () => void;
|
|
7
|
+
}
|
|
8
|
+
export interface CanvasFrameHostStore {
|
|
9
|
+
cancelIntroAnimation?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export interface UseCanvasFrameHostInput<TStore extends object> {
|
|
12
|
+
/** The family-owned store only needs the shared hydration escape hatch. */
|
|
13
|
+
storeRef: RefObject<TStore | null>;
|
|
14
|
+
/** The family-owned retained-scene repaint flag. */
|
|
15
|
+
dirtyRef: MutableRefObject<boolean>;
|
|
16
|
+
/** Stable render closure and scheduler callbacks supplied by `useFrame`. */
|
|
17
|
+
renderFnRef: MutableRefObject<() => void>;
|
|
18
|
+
scheduleRender: () => void;
|
|
19
|
+
cancelRender: () => void;
|
|
20
|
+
/** Logical pause/visibility runtime supplied by `useFrame`. */
|
|
21
|
+
frameRuntime: CanvasFrameHostRuntime;
|
|
22
|
+
/**
|
|
23
|
+
* Opt out only when a family-specific lifecycle adapter must synchronize
|
|
24
|
+
* pause/visibility with an external runtime such as a worker. The default
|
|
25
|
+
* host policy owns ordinary canvas-frame runtime transitions.
|
|
26
|
+
*/
|
|
27
|
+
manageFrameRuntime?: boolean;
|
|
28
|
+
hydrated: boolean;
|
|
29
|
+
wasHydratingFromSSR: boolean;
|
|
30
|
+
/** Family-specific teardown such as clearing a streaming data adapter. */
|
|
31
|
+
cleanup?: () => void;
|
|
32
|
+
/**
|
|
33
|
+
* Some adapters synchronously paint their initial retained scene through a
|
|
34
|
+
* family-specific execution policy. They can skip the otherwise useful
|
|
35
|
+
* mount-time invalidation while retaining dependency-change invalidation.
|
|
36
|
+
*/
|
|
37
|
+
skipInitialCanvasPaintInvalidation?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Values that require a data-canvas repaint. Keep this list family-owned:
|
|
40
|
+
* it expresses paint semantics without teaching the host chart props or
|
|
41
|
+
* layout rules. Its length must remain stable for one host instance.
|
|
42
|
+
*/
|
|
43
|
+
canvasPaintDependencies: DependencyList;
|
|
44
|
+
}
|
|
45
|
+
export interface CanvasFrameHostResult {
|
|
46
|
+
/** Base retained-scene data layer. */
|
|
47
|
+
canvasRef: RefObject<HTMLCanvasElement | null>;
|
|
48
|
+
/** Optional family use for hover/crosshair/highlight canvas content. */
|
|
49
|
+
interactionCanvasRef: RefObject<HTMLCanvasElement | null>;
|
|
50
|
+
}
|
|
51
|
+
type FrameCanvasHost = Pick<UseFrameResult, "renderFnRef" | "scheduleRender" | "cancelRender" | "frameRuntime">;
|
|
52
|
+
type FrameCanvasHostInput<TStore extends object> = Omit<UseCanvasFrameHostInput<TStore>, "renderFnRef" | "scheduleRender" | "cancelRender" | "frameRuntime">;
|
|
53
|
+
/**
|
|
54
|
+
* Installs common canvas-host lifecycle without absorbing family render work.
|
|
55
|
+
*/
|
|
56
|
+
export declare function useCanvasFrameHost<TStore extends object>(input: UseCanvasFrameHostInput<TStore>): CanvasFrameHostResult;
|
|
57
|
+
/** Bind a family-owned store to the common scheduling runtime from useFrame. */
|
|
58
|
+
export declare function useFrameCanvasHost<TStore extends object>(frame: FrameCanvasHost, input: FrameCanvasHostInput<TStore>): CanvasFrameHostResult;
|
|
59
|
+
export interface CanvasFrameBackgroundProps {
|
|
60
|
+
children: ReactNode;
|
|
61
|
+
size: readonly [number, number];
|
|
62
|
+
margin: FrameMargin;
|
|
63
|
+
/** Preserve a family's existing SVG overflow behavior when it needs it. */
|
|
64
|
+
overflowVisible?: boolean;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* The shared SVG background layer. Its coordinate translation is common;
|
|
68
|
+
* resolving graphics and choosing their contents remain family-specific.
|
|
69
|
+
*/
|
|
70
|
+
export declare function CanvasFrameBackground({ children, size, margin, overflowVisible, }: CanvasFrameBackgroundProps): React.ReactNode;
|
|
71
|
+
export {};
|
|
@@ -6,6 +6,16 @@ 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
|
+
import { FrameRuntime, type FrameClock, type FrameRandom } from "./FrameRuntime";
|
|
10
|
+
/**
|
|
11
|
+
* The small scheduling surface `useFrame` needs. Keeping this separate from
|
|
12
|
+
* the browser global gives hook tests a deterministic, handle-agnostic seam
|
|
13
|
+
* without coupling the frame lifecycle to a broader scheduler abstraction.
|
|
14
|
+
*/
|
|
15
|
+
export interface FrameScheduler {
|
|
16
|
+
requestAnimationFrame(callback: FrameRequestCallback): number;
|
|
17
|
+
cancelAnimationFrame(handle: number): void;
|
|
18
|
+
}
|
|
9
19
|
/**
|
|
10
20
|
* Frame-supplied margin defaults. Each Stream Frame has its own — XY's
|
|
11
21
|
* differs from Ordinal's, Network has both a default and a CENTERED variant
|
|
@@ -40,6 +50,16 @@ export interface UseFrameInput {
|
|
|
40
50
|
userMargin: Partial<FrameMargin> | undefined;
|
|
41
51
|
/** Frame's family-default margin. Shallow-merged with `userMargin`. */
|
|
42
52
|
marginDefault: FrameMargin;
|
|
53
|
+
/**
|
|
54
|
+
* Visual title rendered by the frame's SVG chrome. A title reserves a small
|
|
55
|
+
* top strip before plot geometry is calculated so compact caller margins do
|
|
56
|
+
* not place marks directly beneath the title.
|
|
57
|
+
*/
|
|
58
|
+
title?: ReactNode;
|
|
59
|
+
/** Optional legend; a top-positioned legend reserves its first row. */
|
|
60
|
+
legend?: unknown;
|
|
61
|
+
/** Legend placement used for shared top-chrome clearance. */
|
|
62
|
+
legendPosition?: "right" | "left" | "top" | "bottom";
|
|
43
63
|
/** Frame's `foregroundGraphics` prop. */
|
|
44
64
|
foregroundGraphics?: FrameGraphicsProp;
|
|
45
65
|
/** Frame's `backgroundGraphics` prop. */
|
|
@@ -48,6 +68,22 @@ export interface UseFrameInput {
|
|
|
48
68
|
animate?: AnimateProp;
|
|
49
69
|
/** Frame's `transition` prop (legacy / explicit form). */
|
|
50
70
|
transitionProp?: TransitionConfig;
|
|
71
|
+
/**
|
|
72
|
+
* Optional rAF seam for deterministic frame tests or an embedding runtime.
|
|
73
|
+
* It owns both render scheduling and pointer-move coalescing. Omit it to
|
|
74
|
+
* use the browser's `requestAnimationFrame` / `cancelAnimationFrame`.
|
|
75
|
+
*/
|
|
76
|
+
frameScheduler?: FrameScheduler;
|
|
77
|
+
/** Monotonic wall-clock seam used by the frame runtime. */
|
|
78
|
+
clock?: FrameClock;
|
|
79
|
+
/** Injectable random seam. A serializable `seed` takes effect when omitted. */
|
|
80
|
+
random?: FrameRandom;
|
|
81
|
+
/** Serializable deterministic random seed for frame-local stochastic work. */
|
|
82
|
+
seed?: number;
|
|
83
|
+
/** Freeze logical frame time while paused. Opt-in so existing frame families retain their policy. */
|
|
84
|
+
paused?: boolean;
|
|
85
|
+
/** Freeze logical frame time while the document is hidden. Opt-in per frame family. */
|
|
86
|
+
suspendWhenHidden?: boolean;
|
|
51
87
|
/**
|
|
52
88
|
* Frame's `dirtyRef` (the flag that forces a full canvas redraw on the
|
|
53
89
|
* next paint). When provided, useFrame installs a theme-change effect
|
|
@@ -94,12 +130,17 @@ export interface UseFrameResult {
|
|
|
94
130
|
introEnabled: boolean;
|
|
95
131
|
/** Stable id for the AccessibleDataTable region (hash-suffixed). */
|
|
96
132
|
tableId: string;
|
|
97
|
-
/**
|
|
98
|
-
|
|
133
|
+
/** Shared logical clock, pause/visibility policy, and RNG seam for this host. */
|
|
134
|
+
frameRuntime: FrameRuntime;
|
|
135
|
+
/** Token of the pending rAF, or `null` if none. `0` is a valid token. */
|
|
136
|
+
rafRef: React.MutableRefObject<number | null>;
|
|
99
137
|
/** Frame assigns its render closure here. */
|
|
100
138
|
renderFnRef: React.MutableRefObject<() => void>;
|
|
101
139
|
/** Queue a render on the next animation frame. Coalesces. */
|
|
102
140
|
scheduleRender: () => void;
|
|
141
|
+
/** Cancel a queued render, if any. Direct/hydration paints use this before
|
|
142
|
+
* taking over so a stale rAF cannot race a synchronous frame. */
|
|
143
|
+
cancelRender: () => void;
|
|
103
144
|
/** Frame assigns its hover handler closure here. */
|
|
104
145
|
hoverHandlerRef: React.MutableRefObject<(coords: HoverPointerCoords) => void>;
|
|
105
146
|
/** Frame assigns its pointer-leave closure here. */
|
|
@@ -109,6 +150,7 @@ export interface UseFrameResult {
|
|
|
109
150
|
onPointerMove: (e: {
|
|
110
151
|
clientX: number;
|
|
111
152
|
clientY: number;
|
|
153
|
+
pointerType?: string;
|
|
112
154
|
}) => void;
|
|
113
155
|
/** Stable callback to attach to canvas's onPointerLeave (or onMouseLeave).
|
|
114
156
|
* 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`
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type RefObject } from "react";
|
|
2
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
3
|
+
import { type CategoryDomainAccessor } from "./categoryDomain";
|
|
4
|
+
/** Keep legend-category callbacks stable while reading the latest frame props. */
|
|
5
|
+
export declare function useLegendCategoryEmission<TStore extends object, TDatum extends Datum = Datum>(storeRef: RefObject<TStore | null>, accessor: CategoryDomainAccessor<TDatum> | undefined, onChange: ((categories: string[]) => void) | undefined, readData: (store: TStore) => TDatum[]): () => void;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
2
|
+
import { type SemanticClickBehavior, type SemanticHoverBehavior, type SemanticInteractionContext } from "../charts/shared/semanticInteractions";
|
|
3
|
+
import type { OnObservationCallback } from "../store/ObservationStore";
|
|
4
|
+
interface HoverLike {
|
|
5
|
+
data?: Datum | null;
|
|
6
|
+
x?: number;
|
|
7
|
+
y?: number;
|
|
8
|
+
}
|
|
9
|
+
interface SemanticFrameInteractionOptions<Hover extends HoverLike> {
|
|
10
|
+
customHoverBehavior?: SemanticHoverBehavior<Hover>;
|
|
11
|
+
customClickBehavior?: SemanticClickBehavior<Hover>;
|
|
12
|
+
onObservation?: OnObservationCallback;
|
|
13
|
+
chartId?: string;
|
|
14
|
+
chartType: string;
|
|
15
|
+
}
|
|
16
|
+
/** Add semantic observations around the legacy Stream Frame callbacks. */
|
|
17
|
+
export declare function useSemanticFrameInteractions<Hover extends HoverLike>({ customHoverBehavior: customHoverBehaviorProp, customClickBehavior: customClickBehaviorProp, onObservation, chartId, chartType }: SemanticFrameInteractionOptions<Hover>): {
|
|
18
|
+
customHoverBehavior: (hover: Hover | null, context?: SemanticInteractionContext) => void;
|
|
19
|
+
customClickBehavior: (hover: Hover | null, context?: SemanticInteractionContext) => void;
|
|
20
|
+
hasClickBehavior: boolean;
|
|
21
|
+
};
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { UpdateResult, UpdateResultStore } from "./pipelineUpdateContract";
|
|
2
|
+
/**
|
|
3
|
+
* Read an additive pipeline update snapshot through React's external-store
|
|
4
|
+
* contract. Store mutation and frame scheduling remain imperative; consumers
|
|
5
|
+
* can use this only for React-owned inspection or diagnostics.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useUpdateResultSnapshot(store: UpdateResultStore): UpdateResult;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve a packaged module-worker asset from either published module format.
|
|
3
|
+
*
|
|
4
|
+
* tsup's CommonJS transform replaces `import.meta` with an object whose `url`
|
|
5
|
+
* field is absent. The fallback deliberately uses the real CommonJS module
|
|
6
|
+
* filename so `new Worker()` still points at the sibling asset shipped in the
|
|
7
|
+
* tarball. ESM callers retain their literal `new URL(..., import.meta.url)`
|
|
8
|
+
* expression so browser bundlers can discover and emit the worker asset.
|
|
9
|
+
*/
|
|
10
|
+
export declare function commonJsWorkerModuleUrl(assetName: string): URL;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Harvest annotation anchors from an XY scene graph.
|
|
3
|
+
* Every mark with a `pointId` becomes a `{ pointId, x, y, r }` record so
|
|
4
|
+
* `{ pointId }` annotations resolve regardless of mark type.
|
|
5
|
+
*/
|
|
6
|
+
import type { SceneNode } from "./types";
|
|
7
|
+
export type AnnotationAnchor = {
|
|
8
|
+
pointId?: string;
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
r: number;
|
|
12
|
+
};
|
|
13
|
+
export declare function collectAnnotationAnchors(scene: SceneNode[] | undefined): AnnotationAnchor[] | undefined;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chart-type → canvas renderer dispatch for StreamXYFrame.
|
|
3
|
+
* Order matters: earlier renderers paint underneath later ones.
|
|
4
|
+
*/
|
|
5
|
+
import type { StreamChartType } from "./types";
|
|
6
|
+
import type { StreamRendererFn } from "./renderers/types";
|
|
7
|
+
export declare const XY_CANVAS_RENDERERS: Record<StreamChartType, StreamRendererFn[]>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canvas crosshair + line-highlight paint helpers for StreamXYFrame.
|
|
3
|
+
* Pure drawing — no React / store dependency.
|
|
4
|
+
*/
|
|
5
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
6
|
+
import type { HoverData, HoverAnnotationConfig, SceneNode } from "./types";
|
|
7
|
+
import type { FrameThemeColors } from "./frameThemeColors";
|
|
8
|
+
export declare function drawCrosshair(ctx: CanvasRenderingContext2D, hover: HoverData, width: number, height: number, config: HoverAnnotationConfig, hoveredNode: SceneNode | null, theme: FrameThemeColors): void;
|
|
9
|
+
export declare function drawLineHighlight(ctx: CanvasRenderingContext2D, scene: SceneNode[], hoveredNode: SceneNode | null, highlightConfig: {
|
|
10
|
+
style?: Datum | ((d: Datum) => Datum);
|
|
11
|
+
}, theme: FrameThemeColors): void;
|