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
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
export type PhysicsBodyShape = {
|
|
2
|
+
type: "circle";
|
|
3
|
+
radius: number;
|
|
4
|
+
} | {
|
|
5
|
+
type: "aabb";
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
};
|
|
9
|
+
export type PhysicsColliderShape = {
|
|
10
|
+
type: "aabb";
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
} | {
|
|
16
|
+
type: "segment";
|
|
17
|
+
x1: number;
|
|
18
|
+
y1: number;
|
|
19
|
+
x2: number;
|
|
20
|
+
y2: number;
|
|
21
|
+
thickness?: number;
|
|
22
|
+
};
|
|
23
|
+
export interface PhysicsKernelOptions {
|
|
24
|
+
seed?: number;
|
|
25
|
+
gravity?: {
|
|
26
|
+
x: number;
|
|
27
|
+
y: number;
|
|
28
|
+
};
|
|
29
|
+
fixedDt?: number;
|
|
30
|
+
cellSize?: number;
|
|
31
|
+
collisionIterations?: number;
|
|
32
|
+
velocityDamping?: number;
|
|
33
|
+
sleepSpeed?: number;
|
|
34
|
+
sleepAfter?: number;
|
|
35
|
+
restitution?: number;
|
|
36
|
+
friction?: number;
|
|
37
|
+
/** Speed cap (px/s) applied each substep to prevent tunneling through thin walls. */
|
|
38
|
+
maxVelocity?: number;
|
|
39
|
+
/**
|
|
40
|
+
* Contact impact speed (px/s) above which a resting/sleeping body is woken.
|
|
41
|
+
* Higher than `sleepSpeed` so a settled pile is not churned by every arrival —
|
|
42
|
+
* a sleeping body acts as a static anchor until something hits it hard enough.
|
|
43
|
+
*/
|
|
44
|
+
contactWakeSpeed?: number;
|
|
45
|
+
}
|
|
46
|
+
export interface PhysicsBodySpec {
|
|
47
|
+
id: string;
|
|
48
|
+
x: number;
|
|
49
|
+
y: number;
|
|
50
|
+
vx?: number;
|
|
51
|
+
vy?: number;
|
|
52
|
+
angle?: number;
|
|
53
|
+
mass?: number;
|
|
54
|
+
restitution?: number;
|
|
55
|
+
friction?: number;
|
|
56
|
+
/** Disable body-body contacts for visual/tethered satellite marks. */
|
|
57
|
+
bodyCollisions?: boolean;
|
|
58
|
+
shape: PhysicsBodyShape;
|
|
59
|
+
datum?: unknown;
|
|
60
|
+
}
|
|
61
|
+
export interface PhysicsBodyState {
|
|
62
|
+
id: string;
|
|
63
|
+
x: number;
|
|
64
|
+
y: number;
|
|
65
|
+
prevX: number;
|
|
66
|
+
prevY: number;
|
|
67
|
+
vx: number;
|
|
68
|
+
vy: number;
|
|
69
|
+
angle: number;
|
|
70
|
+
mass: number;
|
|
71
|
+
bodyCollisions?: boolean;
|
|
72
|
+
shape: PhysicsBodyShape;
|
|
73
|
+
sleeping: boolean;
|
|
74
|
+
datum?: unknown;
|
|
75
|
+
}
|
|
76
|
+
export interface PhysicsColliderBodyFilterSpec {
|
|
77
|
+
property: string;
|
|
78
|
+
equals?: unknown;
|
|
79
|
+
notEquals?: unknown;
|
|
80
|
+
oneOf?: unknown[];
|
|
81
|
+
notOneOf?: unknown[];
|
|
82
|
+
}
|
|
83
|
+
export type PhysicsColliderBodyFilter = PhysicsColliderBodyFilterSpec | ((body: PhysicsBodyState) => boolean);
|
|
84
|
+
export interface PhysicsColliderSpec {
|
|
85
|
+
id: string;
|
|
86
|
+
shape: PhysicsColliderShape;
|
|
87
|
+
sensor?: boolean;
|
|
88
|
+
restitution?: number;
|
|
89
|
+
friction?: number;
|
|
90
|
+
/**
|
|
91
|
+
* Optional body filter for permeable colliders. Bodies that do not match the
|
|
92
|
+
* filter ignore this collider or sensor entirely. Object filters are worker
|
|
93
|
+
* serializable; function filters require sync execution.
|
|
94
|
+
*/
|
|
95
|
+
bodyFilter?: PhysicsColliderBodyFilter;
|
|
96
|
+
}
|
|
97
|
+
export interface PhysicsSpringSpec {
|
|
98
|
+
id?: string;
|
|
99
|
+
bodyId: string;
|
|
100
|
+
target: {
|
|
101
|
+
type: "point";
|
|
102
|
+
x: number;
|
|
103
|
+
y: number;
|
|
104
|
+
} | {
|
|
105
|
+
type: "body";
|
|
106
|
+
bodyId: string;
|
|
107
|
+
};
|
|
108
|
+
restLength?: number;
|
|
109
|
+
stiffness?: number;
|
|
110
|
+
damping?: number;
|
|
111
|
+
}
|
|
112
|
+
export interface PhysicsKernelSnapshotBody extends PhysicsBodyState {
|
|
113
|
+
bodyCollisions: boolean;
|
|
114
|
+
index: number;
|
|
115
|
+
sleepTime: number;
|
|
116
|
+
restitution?: number;
|
|
117
|
+
friction?: number;
|
|
118
|
+
}
|
|
119
|
+
export interface PhysicsKernelSnapshotCollider extends PhysicsColliderSpec {
|
|
120
|
+
index: number;
|
|
121
|
+
}
|
|
122
|
+
export interface PhysicsKernelSnapshotSpring extends Required<Omit<PhysicsSpringSpec, "target">> {
|
|
123
|
+
target: PhysicsSpringSpec["target"];
|
|
124
|
+
}
|
|
125
|
+
export type PhysicsKernelEvent = {
|
|
126
|
+
type: "contact";
|
|
127
|
+
bodyId: string;
|
|
128
|
+
otherId: string;
|
|
129
|
+
sensor: false;
|
|
130
|
+
} | {
|
|
131
|
+
type: "sensor-enter";
|
|
132
|
+
bodyId: string;
|
|
133
|
+
sensorId: string;
|
|
134
|
+
} | {
|
|
135
|
+
type: "sensor-exit";
|
|
136
|
+
bodyId: string;
|
|
137
|
+
sensorId: string;
|
|
138
|
+
} | {
|
|
139
|
+
type: "sleep";
|
|
140
|
+
bodyId: string;
|
|
141
|
+
} | {
|
|
142
|
+
type: "wake";
|
|
143
|
+
bodyId: string;
|
|
144
|
+
};
|
|
145
|
+
export interface PhysicsActiveSensorPair {
|
|
146
|
+
sensorId: string;
|
|
147
|
+
bodyId: string;
|
|
148
|
+
}
|
|
149
|
+
export interface PhysicsKernelSnapshot {
|
|
150
|
+
options: Required<PhysicsKernelOptions>;
|
|
151
|
+
bodies: PhysicsKernelSnapshotBody[];
|
|
152
|
+
colliders: PhysicsKernelSnapshotCollider[];
|
|
153
|
+
springs: PhysicsKernelSnapshotSpring[];
|
|
154
|
+
activeSensors: string[];
|
|
155
|
+
}
|
|
156
|
+
export declare class PhysicsKernelWorld {
|
|
157
|
+
readonly capabilities: {
|
|
158
|
+
determinism: "strict";
|
|
159
|
+
sensors: boolean;
|
|
160
|
+
joints: boolean;
|
|
161
|
+
ccd: boolean;
|
|
162
|
+
maxBodiesHint: number;
|
|
163
|
+
worker: boolean;
|
|
164
|
+
};
|
|
165
|
+
private options;
|
|
166
|
+
private bodies;
|
|
167
|
+
private colliders;
|
|
168
|
+
private springs;
|
|
169
|
+
private activeSensors;
|
|
170
|
+
private supportedThisStep;
|
|
171
|
+
private lastEvents;
|
|
172
|
+
private nextBodyIndex;
|
|
173
|
+
private nextColliderIndex;
|
|
174
|
+
private nextSpringIndex;
|
|
175
|
+
private random;
|
|
176
|
+
constructor(options?: PhysicsKernelOptions);
|
|
177
|
+
init(options?: PhysicsKernelOptions): void;
|
|
178
|
+
spawn(spec: PhysicsBodySpec): void;
|
|
179
|
+
remove(ids: string[]): void;
|
|
180
|
+
setColliders(colliders: PhysicsColliderSpec[]): void;
|
|
181
|
+
setConstraint(spec: PhysicsSpringSpec): string;
|
|
182
|
+
removeConstraint(id: string): void;
|
|
183
|
+
applyImpulse(id: string, ix: number, iy: number): void;
|
|
184
|
+
step(dtSeconds?: number): void;
|
|
185
|
+
settle(maxSteps?: number, dtSeconds?: number): number;
|
|
186
|
+
readState(out?: PhysicsBodyState[]): PhysicsBodyState[];
|
|
187
|
+
events(): PhysicsKernelEvent[];
|
|
188
|
+
activeSensorPairs(): PhysicsActiveSensorPair[];
|
|
189
|
+
allSleeping(): boolean;
|
|
190
|
+
snapshot(): PhysicsKernelSnapshot;
|
|
191
|
+
restore(snapshot: PhysicsKernelSnapshot): void;
|
|
192
|
+
dispose(): void;
|
|
193
|
+
private sortedBodies;
|
|
194
|
+
private sortedColliders;
|
|
195
|
+
private applySprings;
|
|
196
|
+
private resolveBodyPairs;
|
|
197
|
+
private bodyPairKeys;
|
|
198
|
+
private resolveDynamicCollision;
|
|
199
|
+
private applyFriction;
|
|
200
|
+
private resolveColliders;
|
|
201
|
+
private resolveStaticCollision;
|
|
202
|
+
private updateSensors;
|
|
203
|
+
private updateSleeping;
|
|
204
|
+
private wake;
|
|
205
|
+
/** Uses the deterministic PRNG for future jittered spawn helpers. */
|
|
206
|
+
nextRandom(): number;
|
|
207
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface PhysicsOptionalEngineInstallDetails {
|
|
2
|
+
engine: string;
|
|
3
|
+
importPath: string;
|
|
4
|
+
packageName: string;
|
|
5
|
+
installCommand: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class PhysicsOptionalEngineDependencyError extends Error {
|
|
8
|
+
readonly details: PhysicsOptionalEngineInstallDetails;
|
|
9
|
+
constructor(details: PhysicsOptionalEngineInstallDetails, cause?: unknown);
|
|
10
|
+
}
|
|
11
|
+
export declare function optionalEngineDependencyError(details: PhysicsOptionalEngineInstallDetails, cause?: unknown): PhysicsOptionalEngineDependencyError;
|
|
12
|
+
export declare function loadOptionalPhysicsPeer(details: PhysicsOptionalEngineInstallDetails): Promise<unknown>;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { type PhysicsBodyState, type PhysicsColliderSpec, type PhysicsKernelEvent, type PhysicsSpringSpec } from "./PhysicsKernel";
|
|
2
|
+
import { type PhysicsSedimentBinSnapshot, type PhysicsSedimentColumn, type PhysicsSedimentHeightfieldOptions, type PhysicsSedimentTotals } from "./PhysicsSediment";
|
|
3
|
+
import { type PhysicsBodyBudgetDecision } from "./PhysicsBodyBudget";
|
|
4
|
+
import type { PhysicsObservationEvent, PhysicsObservationRecord, PhysicsPipelineConfig, PhysicsPipelineControlSurface, PhysicsPipelineSnapshot, PhysicsPipelineTickResult, PhysicsQueuedSpawn, PhysicsSpawnPacingOptions } from "./PhysicsPipelineTypes";
|
|
5
|
+
import { type UpdateResult } from "../pipelineUpdateContract";
|
|
6
|
+
export type { PhysicsPlotBounds, PhysicsBoundsColliderOptions, PhysicsXBinColliderOptions, PhysicsSpawnSpringSpec, PhysicsQueuedSpawn, PhysicsSpawnPacing, PhysicsSpawnTimeAccessor, PhysicsSpawnPacingOptions, PhysicsPipelineQueuedSpawnSnapshot, PhysicsObservationEventType, PhysicsSimulationState, PhysicsObservationEvent, PhysicsObservationRecord, PhysicsSensorObservationConfig, PhysicsPipelineObservationOptions, PhysicsPipelineConfig, PhysicsPipelineTickResult, PhysicsPipelineSnapshot, PhysicsPipelineControlSurface } from "./PhysicsPipelineTypes";
|
|
7
|
+
export { schedulePhysicsSpawns, collidersFromPlotBounds, collidersFromXScaleBins } from "./physicsPipelineHelpers";
|
|
8
|
+
export type { ChangeSet, Invalidation, RevisionSet, UpdateResult } from "../pipelineUpdateContract";
|
|
9
|
+
export declare class PhysicsPipelineStore {
|
|
10
|
+
private activeSensorPairs;
|
|
11
|
+
private accumulator;
|
|
12
|
+
private bodyBudget;
|
|
13
|
+
private bodyBudgetObservationKey;
|
|
14
|
+
private config;
|
|
15
|
+
/** Raw public config references, used only for no-op classification. */
|
|
16
|
+
private configInput;
|
|
17
|
+
private engineInput?;
|
|
18
|
+
private bodySpatialIndex;
|
|
19
|
+
private elapsedSeconds;
|
|
20
|
+
private liveBodyOrder;
|
|
21
|
+
private nextSequence;
|
|
22
|
+
private observation;
|
|
23
|
+
private paused;
|
|
24
|
+
private queue;
|
|
25
|
+
private revision;
|
|
26
|
+
private updateResults;
|
|
27
|
+
private sediment;
|
|
28
|
+
private simulationState;
|
|
29
|
+
private visible;
|
|
30
|
+
private world;
|
|
31
|
+
constructor(config?: PhysicsPipelineConfig);
|
|
32
|
+
updateConfig(config: PhysicsPipelineConfig): void;
|
|
33
|
+
/** Additive explicit-result form of {@link updateConfig}. */
|
|
34
|
+
updateConfigWithResult(config: PhysicsPipelineConfig): UpdateResult;
|
|
35
|
+
setColliders(colliders: PhysicsColliderSpec[]): void;
|
|
36
|
+
enqueue(spawn: PhysicsQueuedSpawn | PhysicsQueuedSpawn[], pacing?: PhysicsSpawnPacingOptions): void;
|
|
37
|
+
/** Additive explicit-result form of {@link enqueue}. */
|
|
38
|
+
enqueueWithResult(spawn: PhysicsQueuedSpawn | PhysicsQueuedSpawn[], pacing?: PhysicsSpawnPacingOptions): UpdateResult;
|
|
39
|
+
spawnNow(spawn: PhysicsQueuedSpawn): void;
|
|
40
|
+
clear(): void;
|
|
41
|
+
tick(deltaSeconds: number): PhysicsPipelineTickResult;
|
|
42
|
+
settle(maxSteps?: number): number;
|
|
43
|
+
settleWithObservations(maxSteps?: number): PhysicsPipelineTickResult;
|
|
44
|
+
readBodies(out?: PhysicsBodyState[]): PhysicsBodyState[];
|
|
45
|
+
readSediment(): PhysicsSedimentBinSnapshot[];
|
|
46
|
+
bodyBudgetStatus(): PhysicsBodyBudgetDecision;
|
|
47
|
+
sedimentTotals(): PhysicsSedimentTotals;
|
|
48
|
+
sedimentHeightfield(options?: PhysicsSedimentHeightfieldOptions): PhysicsSedimentColumn[];
|
|
49
|
+
hitTest(x: number, y: number, radius?: number): PhysicsBodyState | null;
|
|
50
|
+
events(): PhysicsKernelEvent[];
|
|
51
|
+
allSleeping(): boolean;
|
|
52
|
+
hasPendingWork(): boolean;
|
|
53
|
+
queueSize(): number;
|
|
54
|
+
liveBodyCount(): number;
|
|
55
|
+
elapsed(): number;
|
|
56
|
+
recordObservation(record: PhysicsObservationRecord): PhysicsObservationEvent;
|
|
57
|
+
/** Most recent explicit update result for a revision-aware host or tool. */
|
|
58
|
+
getLastUpdateResult(): UpdateResult;
|
|
59
|
+
getUpdateSnapshot(): UpdateResult;
|
|
60
|
+
subscribeUpdateResult(listener: () => void): () => void;
|
|
61
|
+
version(): number;
|
|
62
|
+
setPaused(paused: boolean): void;
|
|
63
|
+
setVisible(visible: boolean): void;
|
|
64
|
+
remove(ids: string[]): string[];
|
|
65
|
+
setConstraint(spec: PhysicsSpringSpec): string;
|
|
66
|
+
removeConstraint(id: string): void;
|
|
67
|
+
applyImpulse(id: string, ix: number, iy: number): void;
|
|
68
|
+
nextRandom(): number;
|
|
69
|
+
controls(): PhysicsPipelineControlSurface;
|
|
70
|
+
snapshot(): PhysicsPipelineSnapshot;
|
|
71
|
+
restore(snapshot: PhysicsPipelineSnapshot): void;
|
|
72
|
+
private spawnDue;
|
|
73
|
+
private spawnOne;
|
|
74
|
+
private result;
|
|
75
|
+
private observeKernelEvents;
|
|
76
|
+
private observeSensorTransitions;
|
|
77
|
+
private removeActiveSensorPairsForBodies;
|
|
78
|
+
private observationContext;
|
|
79
|
+
private emitObservation;
|
|
80
|
+
private evaluateBodyBudget;
|
|
81
|
+
private observeBodyBudget;
|
|
82
|
+
private syncSimulationState;
|
|
83
|
+
private evictOverflow;
|
|
84
|
+
private absorbSediment;
|
|
85
|
+
private sleepingFirstEvictionOrder;
|
|
86
|
+
}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public types for PhysicsPipelineStore.
|
|
3
|
+
* Separated so helpers, frames, and recipes can import types without the store class.
|
|
4
|
+
*/
|
|
5
|
+
import type { PhysicsBodySpec, PhysicsBodyState, PhysicsColliderSpec, PhysicsKernelEvent, PhysicsKernelOptions, PhysicsKernelSnapshot, PhysicsSpringSpec } from "./PhysicsKernel";
|
|
6
|
+
import type { PhysicsEngineAdapterInput } from "./PhysicsEngineAdapter";
|
|
7
|
+
import type { PhysicsSedimentBinSnapshot, PhysicsSedimentColumn, PhysicsSedimentConfig, PhysicsSedimentHeightfieldOptions, PhysicsSedimentTotals } from "./PhysicsSediment";
|
|
8
|
+
import type { PhysicsBodyBudgetDecision, PhysicsBodyBudgetOptions } from "./PhysicsBodyBudget";
|
|
9
|
+
export interface PhysicsPlotBounds {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
width: number;
|
|
13
|
+
height: number;
|
|
14
|
+
}
|
|
15
|
+
export interface PhysicsBoundsColliderOptions {
|
|
16
|
+
idPrefix?: string;
|
|
17
|
+
includeFloor?: boolean;
|
|
18
|
+
includeCeiling?: boolean;
|
|
19
|
+
includeLeftWall?: boolean;
|
|
20
|
+
includeRightWall?: boolean;
|
|
21
|
+
wallThickness?: number;
|
|
22
|
+
floorThickness?: number;
|
|
23
|
+
}
|
|
24
|
+
export interface PhysicsXBinColliderOptions {
|
|
25
|
+
idPrefix?: string;
|
|
26
|
+
count: number;
|
|
27
|
+
domainStart: number;
|
|
28
|
+
domainStep: number;
|
|
29
|
+
xScale: (value: number) => number;
|
|
30
|
+
yTop: number;
|
|
31
|
+
yBottom: number;
|
|
32
|
+
wallThickness?: number;
|
|
33
|
+
includeBoundaryWalls?: boolean;
|
|
34
|
+
includeInteriorWalls?: boolean;
|
|
35
|
+
closedBefore?: number;
|
|
36
|
+
lidY?: number;
|
|
37
|
+
lidThickness?: number;
|
|
38
|
+
}
|
|
39
|
+
export type PhysicsSpawnSpringSpec = Omit<PhysicsSpringSpec, "bodyId">;
|
|
40
|
+
export interface PhysicsQueuedSpawn extends PhysicsBodySpec {
|
|
41
|
+
spawnAt?: number;
|
|
42
|
+
springs?: PhysicsSpawnSpringSpec[];
|
|
43
|
+
}
|
|
44
|
+
export type PhysicsSpawnPacing = "immediate" | "arrival" | {
|
|
45
|
+
ratePerSec: number;
|
|
46
|
+
};
|
|
47
|
+
export type PhysicsSpawnTimeAccessor = string | ((spawn: PhysicsQueuedSpawn, index: number) => unknown);
|
|
48
|
+
export interface PhysicsSpawnPacingOptions {
|
|
49
|
+
pacing?: PhysicsSpawnPacing;
|
|
50
|
+
startAt?: number;
|
|
51
|
+
timeAccessor?: PhysicsSpawnTimeAccessor;
|
|
52
|
+
timeScale?: number;
|
|
53
|
+
}
|
|
54
|
+
export interface PhysicsPipelineQueuedSpawnSnapshot extends PhysicsQueuedSpawn {
|
|
55
|
+
sequence: number;
|
|
56
|
+
spawnAt: number;
|
|
57
|
+
}
|
|
58
|
+
export type PhysicsObservationEventType = "physics-spawn" | "physics-settle" | "physics-sediment" | "physics-budget-warning" | "physics-budget-overflow" | "physics-bin-enter" | "physics-bin-exit" | "physics-proximity-enter" | "physics-proximity-exit" | "physics-late" | "physics-barrier-cross" | "physics-capacity-processed" | "physics-capacity-queued" | "physics-capacity-blocked" | "physics-capacity-abandoned" | "sim-active" | "sim-idle";
|
|
59
|
+
export type PhysicsSimulationState = "running" | "paused" | "settled";
|
|
60
|
+
export interface PhysicsObservationEvent {
|
|
61
|
+
type: PhysicsObservationEventType;
|
|
62
|
+
timestamp: number;
|
|
63
|
+
chartType: string;
|
|
64
|
+
chartId: string;
|
|
65
|
+
bodyId?: string;
|
|
66
|
+
datum?: unknown;
|
|
67
|
+
x?: number;
|
|
68
|
+
y?: number;
|
|
69
|
+
sensorId?: string;
|
|
70
|
+
binId?: string;
|
|
71
|
+
barrierId?: string;
|
|
72
|
+
barrierValue?: number;
|
|
73
|
+
count?: number;
|
|
74
|
+
total?: number;
|
|
75
|
+
budgetAction?: PhysicsBodyBudgetDecision["action"];
|
|
76
|
+
bodyLimit?: number;
|
|
77
|
+
engineMaxBodiesHint?: number;
|
|
78
|
+
liveBodies?: number;
|
|
79
|
+
overflow?: number;
|
|
80
|
+
projectedBodies?: number;
|
|
81
|
+
queuedBodies?: number;
|
|
82
|
+
warnAt?: number;
|
|
83
|
+
simulationState?: PhysicsSimulationState;
|
|
84
|
+
previousSimulationState?: PhysicsSimulationState;
|
|
85
|
+
/** Capacitated region id for capacity queue controllers. */
|
|
86
|
+
regionId?: string;
|
|
87
|
+
/** Work units processed when a capacity queue releases a body. */
|
|
88
|
+
work?: number;
|
|
89
|
+
/** Semantic service identity and visit metadata for capacity controllers. */
|
|
90
|
+
jobId?: string;
|
|
91
|
+
visitId?: string;
|
|
92
|
+
visit?: number;
|
|
93
|
+
queuedAt?: number;
|
|
94
|
+
blockedAt?: number;
|
|
95
|
+
completedAt?: number;
|
|
96
|
+
abandonedAt?: number;
|
|
97
|
+
queueSeconds?: number;
|
|
98
|
+
queueDepth?: number;
|
|
99
|
+
blockedDepth?: number;
|
|
100
|
+
remainingWork?: number;
|
|
101
|
+
}
|
|
102
|
+
export type PhysicsObservationRecord = Omit<PhysicsObservationEvent, "timestamp" | "chartType" | "chartId"> & Partial<Pick<PhysicsObservationEvent, "timestamp" | "chartType" | "chartId">>;
|
|
103
|
+
export interface PhysicsSensorObservationConfig {
|
|
104
|
+
binId?: string;
|
|
105
|
+
enterType?: PhysicsObservationEventType;
|
|
106
|
+
exitType?: PhysicsObservationEventType;
|
|
107
|
+
}
|
|
108
|
+
export interface PhysicsPipelineObservationOptions {
|
|
109
|
+
chartId?: string;
|
|
110
|
+
chartType?: string;
|
|
111
|
+
sensors?: Record<string, PhysicsSensorObservationConfig>;
|
|
112
|
+
onObservation?: (event: PhysicsObservationEvent) => void;
|
|
113
|
+
onSimulationStateChange?: (state: PhysicsSimulationState, previousState: PhysicsSimulationState) => void;
|
|
114
|
+
}
|
|
115
|
+
export interface PhysicsPipelineConfig {
|
|
116
|
+
bodyBudget?: false | PhysicsBodyBudgetOptions;
|
|
117
|
+
engine?: PhysicsEngineAdapterInput;
|
|
118
|
+
kernel?: PhysicsKernelOptions;
|
|
119
|
+
colliders?: PhysicsColliderSpec[];
|
|
120
|
+
bodyLimit?: number;
|
|
121
|
+
eviction?: false | "oldest" | "sleeping-first";
|
|
122
|
+
sediment?: false | PhysicsSedimentConfig;
|
|
123
|
+
fixedDt?: number;
|
|
124
|
+
maxDeltaSeconds?: number;
|
|
125
|
+
maxSubsteps?: number;
|
|
126
|
+
settleStepLimit?: number;
|
|
127
|
+
timeScale?: number;
|
|
128
|
+
observation?: PhysicsPipelineObservationOptions;
|
|
129
|
+
}
|
|
130
|
+
export interface PhysicsPipelineTickResult {
|
|
131
|
+
budget: PhysicsBodyBudgetDecision;
|
|
132
|
+
elapsedSeconds: number;
|
|
133
|
+
evicted: string[];
|
|
134
|
+
events: PhysicsKernelEvent[];
|
|
135
|
+
observations: PhysicsObservationEvent[];
|
|
136
|
+
queueSize: number;
|
|
137
|
+
revision: number;
|
|
138
|
+
shouldContinue: boolean;
|
|
139
|
+
sleeping: boolean;
|
|
140
|
+
sedimented: string[];
|
|
141
|
+
spawned: string[];
|
|
142
|
+
steps: number;
|
|
143
|
+
}
|
|
144
|
+
export interface PhysicsPipelineSnapshot {
|
|
145
|
+
accumulator: number;
|
|
146
|
+
activeSensorPairs: string[];
|
|
147
|
+
bodyBudget: false | PhysicsBodyBudgetOptions;
|
|
148
|
+
config: Required<Omit<PhysicsPipelineConfig, "bodyBudget" | "colliders" | "engine" | "kernel" | "observation" | "sediment">> & {
|
|
149
|
+
kernel: Required<PhysicsKernelOptions>;
|
|
150
|
+
};
|
|
151
|
+
elapsedSeconds: number;
|
|
152
|
+
paused: boolean;
|
|
153
|
+
queue: PhysicsPipelineQueuedSpawnSnapshot[];
|
|
154
|
+
revision: number;
|
|
155
|
+
sediment: PhysicsSedimentBinSnapshot[];
|
|
156
|
+
simulationState: PhysicsSimulationState;
|
|
157
|
+
liveBodyOrder: string[];
|
|
158
|
+
visible: boolean;
|
|
159
|
+
world: PhysicsKernelSnapshot;
|
|
160
|
+
}
|
|
161
|
+
export interface PhysicsPipelineControlSurface {
|
|
162
|
+
applyImpulse: (id: string, ix: number, iy: number) => void;
|
|
163
|
+
clear: () => void;
|
|
164
|
+
hitTest: (x: number, y: number, radius?: number) => PhysicsBodyState | null;
|
|
165
|
+
pause: () => void;
|
|
166
|
+
push: (spawn: PhysicsQueuedSpawn, pacing?: PhysicsSpawnPacingOptions) => void;
|
|
167
|
+
pushMany: (spawns: PhysicsQueuedSpawn[], pacing?: PhysicsSpawnPacingOptions) => void;
|
|
168
|
+
readBodies: (out?: PhysicsBodyState[]) => PhysicsBodyState[];
|
|
169
|
+
readSediment: () => PhysicsSedimentBinSnapshot[];
|
|
170
|
+
bodyBudgetStatus: () => PhysicsBodyBudgetDecision;
|
|
171
|
+
recordObservation: (event: PhysicsObservationRecord) => PhysicsObservationEvent;
|
|
172
|
+
remove: (ids: string[]) => string[];
|
|
173
|
+
restore: (snapshot: PhysicsPipelineSnapshot) => void;
|
|
174
|
+
resume: () => void;
|
|
175
|
+
settle: (maxSteps?: number) => number;
|
|
176
|
+
settleWithObservations: (maxSteps?: number) => PhysicsPipelineTickResult;
|
|
177
|
+
snapshot: () => PhysicsPipelineSnapshot;
|
|
178
|
+
sedimentHeightfield: (options?: PhysicsSedimentHeightfieldOptions) => PhysicsSedimentColumn[];
|
|
179
|
+
sedimentTotals: () => PhysicsSedimentTotals;
|
|
180
|
+
step: (deltaSeconds: number) => PhysicsPipelineTickResult;
|
|
181
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SVG chrome layer for StreamPhysicsFrame — title, legend, and annotations.
|
|
3
|
+
* Mirrors NetworkSVGOverlay: no axes/grid (physics is pixel-space), but
|
|
4
|
+
* honors the same annotation + auto-place + legend contracts as other frames.
|
|
5
|
+
*/
|
|
6
|
+
import type { Datum } from "../../charts/shared/datumTypes";
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import type { ReactNode } from "react";
|
|
9
|
+
import type { LegendGroup, GradientLegendConfig, LegendLayout } from "../../types/legendTypes";
|
|
10
|
+
import { type AutoPlaceAnnotations } from "../../recipes/annotationLayout";
|
|
11
|
+
import type { AnnotationContext } from "../../realtime/types";
|
|
12
|
+
import type { PhysicsBodyState } from "./PhysicsKernel";
|
|
13
|
+
import type { OnObservationCallback } from "../../store/ObservationStore";
|
|
14
|
+
import { type OnAnnotationActivateCallback } from "../../charts/shared/annotationActivation";
|
|
15
|
+
export type PhysicsAnnotationAnchorNode = {
|
|
16
|
+
pointId?: string;
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
r: number;
|
|
20
|
+
};
|
|
21
|
+
export declare function bodiesToAnnotationAnchors(bodies: readonly PhysicsBodyState[]): PhysicsAnnotationAnchorNode[];
|
|
22
|
+
export interface PhysicsSVGOverlayProps {
|
|
23
|
+
width: number;
|
|
24
|
+
height: number;
|
|
25
|
+
totalWidth: number;
|
|
26
|
+
totalHeight: number;
|
|
27
|
+
margin: {
|
|
28
|
+
top: number;
|
|
29
|
+
right: number;
|
|
30
|
+
bottom: number;
|
|
31
|
+
left: number;
|
|
32
|
+
};
|
|
33
|
+
title?: string | ReactNode;
|
|
34
|
+
legend?: ReactNode | {
|
|
35
|
+
legendGroups: LegendGroup[];
|
|
36
|
+
} | {
|
|
37
|
+
gradient: GradientLegendConfig;
|
|
38
|
+
};
|
|
39
|
+
legendHoverBehavior?: (item: {
|
|
40
|
+
label: string;
|
|
41
|
+
} | null) => void;
|
|
42
|
+
legendClickBehavior?: (item: {
|
|
43
|
+
label: string;
|
|
44
|
+
}) => void;
|
|
45
|
+
legendHighlightedCategory?: string | null;
|
|
46
|
+
legendIsolatedCategories?: Set<string>;
|
|
47
|
+
legendPosition?: "right" | "left" | "top" | "bottom";
|
|
48
|
+
legendLayout?: LegendLayout;
|
|
49
|
+
/** Live body anchors for pointId / bodyId annotations. */
|
|
50
|
+
pointNodes?: PhysicsAnnotationAnchorNode[];
|
|
51
|
+
annotations?: Datum[];
|
|
52
|
+
onAnnotationActivate?: OnAnnotationActivateCallback;
|
|
53
|
+
onObservation?: OnObservationCallback;
|
|
54
|
+
chartId?: string;
|
|
55
|
+
chartType?: string;
|
|
56
|
+
autoPlaceAnnotations?: AutoPlaceAnnotations;
|
|
57
|
+
svgAnnotationRules?: (annotation: Datum, index: number, context: AnnotationContext) => ReactNode;
|
|
58
|
+
/** Optional foreground SVG already composed into the frame stack. */
|
|
59
|
+
children?: ReactNode;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Pixel-space annotation context: identity scales so raw `x`/`y` on notes
|
|
63
|
+
* read as canvas coordinates (physics has no data→pixel scale).
|
|
64
|
+
*/
|
|
65
|
+
export declare function buildPhysicsAnnotationContext(options: {
|
|
66
|
+
width: number;
|
|
67
|
+
height: number;
|
|
68
|
+
pointNodes?: PhysicsAnnotationAnchorNode[];
|
|
69
|
+
data?: Datum[];
|
|
70
|
+
}): AnnotationContext;
|
|
71
|
+
/**
|
|
72
|
+
* Normalize common physics annotation aliases onto Semiotic annotation shapes.
|
|
73
|
+
* - `bodyId` → `pointId` (anchor to a live body)
|
|
74
|
+
* - physics barrier/sensor notes still paint as x/y-threshold when typed that way
|
|
75
|
+
*/
|
|
76
|
+
export declare function normalizePhysicsAnnotations(annotations: Datum[] | undefined): Datum[] | undefined;
|
|
77
|
+
export declare function PhysicsSVGOverlay(props: PhysicsSVGOverlayProps): React.JSX.Element;
|
|
78
|
+
export default PhysicsSVGOverlay;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { PhysicsBodyState } from "./PhysicsKernel";
|
|
2
|
+
export type PhysicsSedimentAccessor = string | ((body: PhysicsBodyState, index: number) => unknown);
|
|
3
|
+
export type PhysicsSedimentValueAccessor = number | string | ((body: PhysicsBodyState, index: number) => unknown);
|
|
4
|
+
export interface RunningStatsSnapshot {
|
|
5
|
+
count: number;
|
|
6
|
+
total: number;
|
|
7
|
+
mean: number;
|
|
8
|
+
min: number;
|
|
9
|
+
max: number;
|
|
10
|
+
variance: number;
|
|
11
|
+
}
|
|
12
|
+
export interface PhysicsSedimentConfig {
|
|
13
|
+
binAccessor?: PhysicsSedimentAccessor;
|
|
14
|
+
labelAccessor?: PhysicsSedimentAccessor;
|
|
15
|
+
valueAccessor?: PhysicsSedimentValueAccessor;
|
|
16
|
+
retainBodyIds?: number;
|
|
17
|
+
}
|
|
18
|
+
export interface PhysicsSedimentBinSnapshot {
|
|
19
|
+
id: string;
|
|
20
|
+
label: string;
|
|
21
|
+
count: number;
|
|
22
|
+
total: number;
|
|
23
|
+
bodyIds: string[];
|
|
24
|
+
lastBodyId?: string;
|
|
25
|
+
lastDatum?: unknown;
|
|
26
|
+
x: RunningStatsSnapshot;
|
|
27
|
+
y: RunningStatsSnapshot;
|
|
28
|
+
value: RunningStatsSnapshot;
|
|
29
|
+
}
|
|
30
|
+
export interface PhysicsSedimentTotals {
|
|
31
|
+
bins: number;
|
|
32
|
+
count: number;
|
|
33
|
+
total: number;
|
|
34
|
+
}
|
|
35
|
+
export interface PhysicsSedimentHeightfieldOptions {
|
|
36
|
+
baselineY?: number;
|
|
37
|
+
binWidth?: number;
|
|
38
|
+
gap?: number;
|
|
39
|
+
maxHeight?: number;
|
|
40
|
+
value?: "count" | "total";
|
|
41
|
+
x?: (bin: PhysicsSedimentBinSnapshot, index: number) => number;
|
|
42
|
+
}
|
|
43
|
+
export interface PhysicsSedimentColumn {
|
|
44
|
+
binId: string;
|
|
45
|
+
label: string;
|
|
46
|
+
index: number;
|
|
47
|
+
count: number;
|
|
48
|
+
total: number;
|
|
49
|
+
x: number;
|
|
50
|
+
y: number;
|
|
51
|
+
width: number;
|
|
52
|
+
height: number;
|
|
53
|
+
meanX: number;
|
|
54
|
+
meanY: number;
|
|
55
|
+
}
|
|
56
|
+
export declare class PhysicsSedimentAccumulator {
|
|
57
|
+
private bins;
|
|
58
|
+
private config;
|
|
59
|
+
private nextIndex;
|
|
60
|
+
constructor(config?: PhysicsSedimentConfig | false);
|
|
61
|
+
updateConfig(config: PhysicsSedimentConfig | false | undefined): void;
|
|
62
|
+
isEnabled(): boolean;
|
|
63
|
+
add(body: PhysicsBodyState): PhysicsSedimentBinSnapshot | null;
|
|
64
|
+
clear(): void;
|
|
65
|
+
snapshot(): PhysicsSedimentBinSnapshot[];
|
|
66
|
+
restore(snapshot?: PhysicsSedimentBinSnapshot[]): void;
|
|
67
|
+
totals(): PhysicsSedimentTotals;
|
|
68
|
+
}
|
|
69
|
+
export declare function sedimentHeightfield(bins: PhysicsSedimentBinSnapshot[], options?: PhysicsSedimentHeightfieldOptions): PhysicsSedimentColumn[];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { PhysicsSettledEvidence } from "./PhysicsEvidence";
|
|
2
|
+
import type { PhysicsPipelineStore } from "./PhysicsPipelineStore";
|
|
3
|
+
import { type PhysicsSettledScene, type PhysicsSettledSceneOptions } from "./PhysicsSettledScene";
|
|
4
|
+
export interface PhysicsSettledSVGOptions extends PhysicsSettledSceneOptions {
|
|
5
|
+
width?: number;
|
|
6
|
+
height?: number;
|
|
7
|
+
title?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
background?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
idPrefix?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface PhysicsSettledSVGRender {
|
|
14
|
+
svg: string;
|
|
15
|
+
scene: PhysicsSettledScene;
|
|
16
|
+
evidence: PhysicsSettledEvidence;
|
|
17
|
+
}
|
|
18
|
+
export declare function renderPhysicsSettledSVG(store: PhysicsPipelineStore, options?: PhysicsSettledSVGOptions): PhysicsSettledSVGRender;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { SceneNode, Style } from "../types";
|
|
2
|
+
import type { PhysicsSettledProjectionRow } from "./PhysicsAccessibility";
|
|
3
|
+
import { type PhysicsSettledEvidence } from "./PhysicsEvidence";
|
|
4
|
+
import type { PhysicsBodyState } from "./PhysicsKernel";
|
|
5
|
+
import type { PhysicsPipelineSnapshot, PhysicsPipelineStore } from "./PhysicsPipelineStore";
|
|
6
|
+
export interface PhysicsSettledSceneOptions {
|
|
7
|
+
maxSteps?: number;
|
|
8
|
+
projectionRows?: PhysicsSettledProjectionRow[];
|
|
9
|
+
bodyStyle?: Style | ((body: PhysicsBodyState) => Style);
|
|
10
|
+
getBodyLabel?: (body: PhysicsBodyState) => string | undefined;
|
|
11
|
+
}
|
|
12
|
+
export interface PhysicsSettledScene {
|
|
13
|
+
snapshot: PhysicsPipelineSnapshot;
|
|
14
|
+
bodies: PhysicsBodyState[];
|
|
15
|
+
sceneNodes: SceneNode[];
|
|
16
|
+
evidence: PhysicsSettledEvidence;
|
|
17
|
+
stepsRun: number;
|
|
18
|
+
}
|
|
19
|
+
export declare function physicsBodyToXYSceneNode(body: PhysicsBodyState, options?: Pick<PhysicsSettledSceneOptions, "bodyStyle" | "getBodyLabel">): SceneNode;
|
|
20
|
+
export declare function physicsBodiesToXYSceneNodes(bodies: PhysicsBodyState[], options?: Pick<PhysicsSettledSceneOptions, "bodyStyle" | "getBodyLabel">): SceneNode[];
|
|
21
|
+
export declare function buildPhysicsSettledScene(store: PhysicsPipelineStore, options?: PhysicsSettledSceneOptions): PhysicsSettledScene;
|