semiotic 3.7.5 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +54 -12
- 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 +1651 -154
- package/ai/examples.md +174 -0
- package/ai/schema.json +2733 -536
- package/ai/surface-manifest.json +200 -0
- package/ai/system-prompt.md +18 -3
- 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/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/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/DistanceCartogram.d.ts +1 -1
- package/dist/components/charts/geo/FlowMap.d.ts +1 -1
- package/dist/components/charts/geo/ProportionalSymbolMap.d.ts +1 -1
- package/dist/components/charts/geo/index.d.ts +2 -0
- package/dist/components/charts/index.d.ts +29 -1
- package/dist/components/charts/network/ChordDiagram.d.ts +1 -1
- package/dist/components/charts/network/CirclePack.d.ts +1 -1
- package/dist/components/charts/network/ForceDirectedGraph.d.ts +15 -5
- package/dist/components/charts/network/OrbitDiagram.d.ts +1 -1
- package/dist/components/charts/network/ProcessSankey.d.ts +1 -1
- package/dist/components/charts/network/SankeyDiagram.d.ts +1 -1
- package/dist/components/charts/network/TreeDiagram.d.ts +1 -1
- package/dist/components/charts/network/Treemap.d.ts +1 -1
- package/dist/components/charts/network/useForceLayout.d.ts +17 -0
- package/dist/components/charts/ordinal/BarChart.d.ts +1 -1
- package/dist/components/charts/ordinal/BoxPlot.d.ts +1 -1
- package/dist/components/charts/ordinal/DonutChart.d.ts +1 -1
- package/dist/components/charts/ordinal/DotPlot.d.ts +1 -1
- package/dist/components/charts/ordinal/FunnelChart.d.ts +1 -1
- package/dist/components/charts/ordinal/GroupedBarChart.d.ts +1 -1
- package/dist/components/charts/ordinal/Histogram.d.ts +1 -1
- package/dist/components/charts/ordinal/PieChart.d.ts +1 -1
- package/dist/components/charts/ordinal/RidgelinePlot.d.ts +1 -1
- package/dist/components/charts/ordinal/StackedBarChart.d.ts +1 -1
- package/dist/components/charts/ordinal/SwarmPlot.d.ts +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 +47 -0
- package/dist/components/charts/physics/EventDropChart.capability.d.ts +2 -0
- package/dist/components/charts/physics/EventDropChart.d.ts +53 -0
- package/dist/components/charts/physics/GaltonBoardChart.capability.d.ts +2 -0
- package/dist/components/charts/physics/GaltonBoardChart.d.ts +66 -0
- package/dist/components/charts/physics/GauntletChart.capability.d.ts +2 -0
- package/dist/components/charts/physics/GauntletChart.d.ts +73 -0
- package/dist/components/charts/physics/PhysicalFlowChart.capability.d.ts +2 -0
- package/dist/components/charts/physics/PhysicalFlowChart.d.ts +63 -0
- package/dist/components/charts/physics/PhysicsCustomChart.d.ts +120 -0
- package/dist/components/charts/physics/PhysicsPileChart.capability.d.ts +2 -0
- package/dist/components/charts/physics/PhysicsPileChart.d.ts +53 -0
- package/dist/components/charts/physics/ProcessFlowChart.capability.d.ts +2 -0
- package/dist/components/charts/physics/ProcessFlowChart.d.ts +96 -0
- package/dist/components/charts/physics/chainReactionOverlay.d.ts +22 -0
- package/dist/components/charts/physics/chainReactionRuntime.d.ts +37 -0
- package/dist/components/charts/physics/chainReactionTypes.d.ts +97 -0
- package/dist/components/charts/physics/collisionSwarmPhysics.d.ts +27 -0
- package/dist/components/charts/physics/dependencyMachine.d.ts +188 -0
- package/dist/components/charts/physics/eventDropPhysics.d.ts +64 -0
- package/dist/components/charts/physics/galtonBoardPhysics.d.ts +28 -0
- package/dist/components/charts/physics/gauntletChartProps.d.ts +67 -0
- package/dist/components/charts/physics/gauntletChrome.d.ts +33 -0
- package/dist/components/charts/physics/gauntletController.d.ts +73 -0
- package/dist/components/charts/physics/gauntletEffects.d.ts +36 -0
- package/dist/components/charts/physics/gauntletPhysics.d.ts +71 -0
- package/dist/components/charts/physics/gauntletRuntime.d.ts +42 -0
- package/dist/components/charts/physics/gauntletTypes.d.ts +213 -0
- package/dist/components/charts/physics/physicalFlowPhysics.d.ts +57 -0
- package/dist/components/charts/physics/physicsChartShared.d.ts +41 -0
- package/dist/components/charts/physics/physicsChartUtils.d.ts +18 -0
- package/dist/components/charts/physics/physicsEncoding.d.ts +142 -0
- package/dist/components/charts/physics/physicsHocHandle.d.ts +53 -0
- package/dist/components/charts/physics/physicsHocUtils.d.ts +128 -0
- package/dist/components/charts/physics/physicsPilePhysics.d.ts +41 -0
- package/dist/components/charts/physics/physicsProcessPrimitives.d.ts +38 -0
- package/dist/components/charts/physics/processFlowPhysics.d.ts +97 -0
- package/dist/components/charts/realtime/RealtimeHeatmap.d.ts +9 -1
- package/dist/components/charts/realtime/RealtimeHistogram.d.ts +9 -1
- package/dist/components/charts/realtime/RealtimeLineChart.d.ts +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/auditMobileVisualization.d.ts +91 -0
- package/dist/components/charts/shared/chartDefinitionPilot.d.ts +145 -0
- package/dist/components/charts/shared/chartFamilySets.d.ts +20 -0
- package/dist/components/charts/shared/chartSpecCore.d.ts +165 -0
- package/dist/components/charts/shared/chartSpecs.d.ts +8 -127
- package/dist/components/charts/shared/chartSpecsGeo.d.ts +2 -0
- package/dist/components/charts/shared/chartSpecsNetwork.d.ts +2 -0
- package/dist/components/charts/shared/chartSpecsOrdinal.d.ts +2 -0
- package/dist/components/charts/shared/chartSpecsPhysics.d.ts +2 -0
- package/dist/components/charts/shared/chartSpecsRealtime.d.ts +2 -0
- package/dist/components/charts/shared/chartSpecsValue.d.ts +2 -0
- package/dist/components/charts/shared/chartSpecsXY.d.ts +2 -0
- package/dist/components/charts/shared/colorContrast.d.ts +3 -0
- package/dist/components/charts/shared/colorUtils.d.ts +16 -1
- package/dist/components/charts/shared/diagnoseAnnotationChecks.d.ts +4 -0
- package/dist/components/charts/shared/diagnoseConfig.d.ts +9 -14
- package/dist/components/charts/shared/diagnoseMisleadingChecks.d.ts +9 -0
- package/dist/components/charts/shared/diagnosePhysicsChecks.d.ts +3 -0
- package/dist/components/charts/shared/diagnoseTypes.d.ts +10 -0
- package/dist/components/charts/shared/hooks.d.ts +28 -5
- package/dist/components/charts/shared/motionEncoding.d.ts +145 -0
- package/dist/components/charts/shared/responsiveRules.d.ts +56 -0
- package/dist/components/charts/shared/streamPropsHelpers.d.ts +12 -2
- package/dist/components/charts/shared/temporalStrings.d.ts +7 -0
- package/dist/components/charts/shared/types.d.ts +49 -1
- package/dist/components/charts/shared/useChartSetup.d.ts +9 -2
- package/dist/components/charts/shared/useCustomChartSetup.d.ts +14 -5
- package/dist/components/charts/shared/useNetworkChartSetup.d.ts +6 -2
- package/dist/components/charts/shared/useOrdinalPieceStyle.d.ts +1 -1
- package/dist/components/charts/shared/useStreamingLegend.d.ts +1 -1
- package/dist/components/charts/shared/useSyncedPushData.d.ts +49 -0
- package/dist/components/charts/shared/validationMap.d.ts +0 -11
- package/dist/components/charts/xy/AreaChart.d.ts +1 -1
- package/dist/components/charts/xy/BubbleChart.d.ts +1 -1
- package/dist/components/charts/xy/LineChart.d.ts +1 -1
- package/dist/components/charts/xy/MinimapChart.d.ts +1 -1
- package/dist/components/charts/xy/MultiAxisLineChart.d.ts +2 -2
- package/dist/components/charts/xy/QuadrantChart.d.ts +1 -1
- package/dist/components/charts/xy/Scatterplot.d.ts +1 -1
- package/dist/components/charts/xy/ScatterplotMatrix.d.ts +11 -1
- package/dist/components/charts/xy/StackedAreaChart.d.ts +9 -4
- package/dist/components/controls/controlAudit.d.ts +24 -0
- package/dist/components/controls/controlContract.d.ts +57 -0
- package/dist/components/data/fromFlintChart.d.ts +74 -0
- package/dist/components/data/fromVegaLite.d.ts +27 -0
- 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/semiotic-ai-core.d.ts +47 -0
- package/dist/components/semiotic-ai.d.ts +50 -8
- package/dist/components/semiotic-controls.d.ts +18 -0
- package/dist/components/semiotic-experimental.d.ts +38 -9
- package/dist/components/semiotic-geo.d.ts +11 -0
- package/dist/components/semiotic-network.d.ts +11 -0
- package/dist/components/semiotic-ordinal.d.ts +8 -0
- package/dist/components/semiotic-physics-matter.d.ts +10 -0
- package/dist/components/semiotic-physics-rapier.d.ts +9 -0
- package/dist/components/semiotic-physics.d.ts +56 -0
- package/dist/components/semiotic-realtime-core.d.ts +34 -0
- package/dist/components/semiotic-realtime-react.d.ts +10 -0
- package/dist/components/semiotic-realtime.d.ts +4 -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-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 +46 -0
- package/dist/components/semiotic-utils-react.d.ts +5 -0
- package/dist/components/semiotic-utils.d.ts +3 -39
- package/dist/components/semiotic-xy.d.ts +8 -0
- package/dist/components/semiotic.d.ts +35 -7
- package/dist/components/server/animatedGif.d.ts +36 -0
- package/dist/components/server/renderEvidence.d.ts +1 -1
- package/dist/components/server/renderToStaticSVG.d.ts +3 -35
- package/dist/components/server/serverChartConfigShared.d.ts +17 -0
- package/dist/components/server/serverChartConfigs.d.ts +19 -9
- package/dist/components/server/serverChartConfigsCustom.d.ts +5 -0
- package/dist/components/server/serverChartConfigsGeo.d.ts +9 -0
- package/dist/components/server/serverChartConfigsNetwork.d.ts +8 -0
- package/dist/components/server/serverChartConfigsOrdinal.d.ts +16 -0
- package/dist/components/server/serverChartConfigsPhysics.d.ts +9 -0
- package/dist/components/server/serverChartConfigsXY.d.ts +11 -0
- package/dist/components/server/staticGeo.d.ts +4 -0
- package/dist/components/server/staticLegend.d.ts +1 -1
- package/dist/components/server/staticNetwork.d.ts +8 -0
- package/dist/components/server/staticOrdinal.d.ts +11 -0
- package/dist/components/server/staticPhysics.d.ts +3 -0
- package/dist/components/server/staticSVGChrome.d.ts +110 -0
- package/dist/components/server/staticXY.d.ts +4 -0
- package/dist/components/store/ObservationStore.d.ts +3 -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 +3 -13
- package/dist/components/stream/FocusRing.d.ts +4 -2
- package/dist/components/stream/GeoCanvasHitTester.d.ts +1 -1
- package/dist/components/stream/GeoPipelineStore.d.ts +28 -0
- package/dist/components/stream/NetworkPipelineStore.d.ts +31 -26
- package/dist/components/stream/NetworkSVGOverlay.d.ts +4 -1
- package/dist/components/stream/OrdinalPipelineStore.d.ts +46 -2
- package/dist/components/stream/PipelineStore.d.ts +81 -170
- package/dist/components/stream/SceneGraph.d.ts +9 -1
- package/dist/components/stream/StreamGeoFrame.d.ts +1 -1
- package/dist/components/stream/StreamNetworkFrame.d.ts +1 -1
- package/dist/components/stream/StreamOrdinalFrame.d.ts +1 -1
- package/dist/components/stream/StreamXYFrame.d.ts +2 -18
- package/dist/components/stream/accessibleDataRows.d.ts +33 -0
- package/dist/components/stream/accessorUtils.d.ts +23 -10
- package/dist/components/stream/brushAccessibility.d.ts +25 -0
- package/dist/components/stream/canvasBackground.d.ts +24 -0
- package/dist/components/stream/canvasSetup.d.ts +4 -1
- package/dist/components/stream/customLayoutFailure.d.ts +33 -0
- package/dist/components/stream/customLayoutPalette.d.ts +19 -9
- package/dist/components/stream/frameThemeColors.d.ts +24 -0
- package/dist/components/stream/geoAnnotationAnchors.d.ts +14 -0
- package/dist/components/stream/geoCartogram.d.ts +17 -0
- package/dist/components/stream/geoCustomLayout.d.ts +59 -0
- package/dist/components/stream/geoDefaultTooltip.d.ts +11 -0
- package/dist/components/stream/geoFrameHelpers.d.ts +34 -0
- package/dist/components/stream/geoPipelineHelpers.d.ts +46 -0
- package/dist/components/stream/geoTypes.d.ts +56 -7
- package/dist/components/stream/glyphDef.d.ts +98 -0
- package/dist/components/stream/hitTarget.d.ts +170 -0
- package/dist/components/stream/hoverUtils.d.ts +3 -0
- package/dist/components/stream/keyboardNav.d.ts +4 -1
- package/dist/components/stream/layouts/forceLayoutPlugin.d.ts +9 -1
- package/dist/components/stream/layouts/forceLayoutWorkerClient.d.ts +57 -0
- package/dist/components/stream/networkBezier.d.ts +10 -0
- package/dist/components/stream/networkColorAccessors.d.ts +49 -0
- package/dist/components/stream/networkDefaultTooltip.d.ts +10 -0
- package/dist/components/stream/networkFrameInteraction.d.ts +37 -0
- package/dist/components/stream/networkFramePaint.d.ts +43 -0
- package/dist/components/stream/networkPipelineConfig.d.ts +22 -0
- package/dist/components/stream/networkPipelineHelpers.d.ts +12 -0
- package/dist/components/stream/networkRealtimeEncoding.d.ts +41 -0
- package/dist/components/stream/networkTypes.d.ts +76 -5
- 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 +12 -0
- package/dist/components/stream/ordinalPulse.d.ts +10 -0
- package/dist/components/stream/ordinalPulseResources.d.ts +3 -0
- package/dist/components/stream/ordinalSceneBuilders/sceneBuilderMap.d.ts +5 -0
- package/dist/components/stream/ordinalSpatialIndex.d.ts +9 -0
- package/dist/components/stream/ordinalTypes.d.ts +40 -8
- package/dist/components/stream/paintNeeds.d.ts +31 -0
- package/dist/components/stream/physics/CapacityQueueController.d.ts +5 -0
- package/dist/components/stream/physics/CapacityQueueTypes.d.ts +134 -0
- package/dist/components/stream/physics/MatterPhysicsEngineAdapter.d.ts +42 -0
- package/dist/components/stream/physics/PhysicsAccessibility.d.ts +48 -0
- package/dist/components/stream/physics/PhysicsAnnotations.d.ts +58 -0
- package/dist/components/stream/physics/PhysicsBodyBudget.d.ts +26 -0
- package/dist/components/stream/physics/PhysicsBodySpatialIndex.d.ts +10 -0
- package/dist/components/stream/physics/PhysicsCanvasTheme.d.ts +26 -0
- package/dist/components/stream/physics/PhysicsControllers.d.ts +75 -0
- package/dist/components/stream/physics/PhysicsEngineAdapter.d.ts +59 -0
- package/dist/components/stream/physics/PhysicsEngineConformance.d.ts +23 -0
- package/dist/components/stream/physics/PhysicsEvidence.d.ts +25 -0
- package/dist/components/stream/physics/PhysicsKernel.d.ts +207 -0
- package/dist/components/stream/physics/PhysicsOptionalEngineAdapters.d.ts +12 -0
- package/dist/components/stream/physics/PhysicsPipelineStore.d.ts +84 -0
- package/dist/components/stream/physics/PhysicsPipelineTypes.d.ts +181 -0
- package/dist/components/stream/physics/PhysicsSVGOverlay.d.ts +72 -0
- package/dist/components/stream/physics/PhysicsSediment.d.ts +69 -0
- package/dist/components/stream/physics/PhysicsSettledSVG.d.ts +18 -0
- package/dist/components/stream/physics/PhysicsSettledScene.d.ts +21 -0
- package/dist/components/stream/physics/PhysicsWorkerClient.d.ts +24 -0
- package/dist/components/stream/physics/PhysicsWorkerProtocol.d.ts +101 -0
- package/dist/components/stream/physics/PhysicsWorkerRuntime.d.ts +5 -0
- package/dist/components/stream/physics/RapierPhysicsEngineAdapter.d.ts +18 -0
- package/dist/components/stream/physics/ServiceOperationsControllers.d.ts +27 -0
- package/dist/components/stream/physics/ServiceOperationsTypes.d.ts +89 -0
- package/dist/components/stream/physics/StreamPhysicsFrame.d.ts +6 -0
- package/dist/components/stream/physics/StreamPhysicsTypes.d.ts +302 -0
- package/dist/components/stream/physics/physicsBodyCanvas.d.ts +27 -0
- package/dist/components/stream/physics/physicsPipelineControls.d.ts +4 -0
- package/dist/components/stream/physics/physicsPipelineHelpers.d.ts +41 -0
- package/dist/components/stream/physics/physicsPipelineObservations.d.ts +14 -0
- package/dist/components/stream/physics/physicsPipelineUpdateResults.d.ts +9 -0
- package/dist/components/stream/physics/physicsRegionRuntime.d.ts +54 -0
- package/dist/components/stream/physics/physicsSemanticUI.d.ts +20 -0
- package/dist/components/stream/physics/usePhysicsFrameLifecyclePolicy.d.ts +16 -0
- package/dist/components/stream/pipelineBufferUtils.d.ts +26 -0
- package/dist/components/stream/pipelineConfig.d.ts +177 -0
- package/dist/components/stream/pipelineDecay.d.ts +20 -2
- package/dist/components/stream/pipelineDomainResolution.d.ts +62 -0
- package/dist/components/stream/pipelineIdentityOps.d.ts +26 -0
- package/dist/components/stream/pipelinePulse.d.ts +16 -2
- package/dist/components/stream/pipelineRibbons.d.ts +41 -0
- package/dist/components/stream/pipelineSpatialIndex.d.ts +12 -0
- package/dist/components/stream/pipelineStoreUpdateResults.d.ts +12 -0
- package/dist/components/stream/pipelineStyleResolvers.d.ts +46 -0
- package/dist/components/stream/pipelineTransitions.d.ts +2 -0
- package/dist/components/stream/pipelineUpdateContract.d.ts +62 -0
- package/dist/components/stream/pulseFrameRefresh.d.ts +22 -0
- package/dist/components/stream/renderers/glyphCanvasRenderer.d.ts +6 -0
- package/dist/components/stream/renderers/resolveCSSColor.d.ts +6 -0
- package/dist/components/stream/sceneRevisionDiagnostics.d.ts +18 -0
- package/dist/components/stream/streamStoreSync.d.ts +37 -0
- package/dist/components/stream/types.d.ts +135 -7
- package/dist/components/stream/useFrame.d.ts +21 -2
- package/dist/components/stream/useHydration.d.ts +6 -0
- package/dist/components/stream/useLegendCategoryEmission.d.ts +5 -0
- package/dist/components/stream/workerModuleUrl.d.ts +10 -0
- package/dist/components/stream/xyAnnotationAnchors.d.ts +13 -0
- package/dist/components/stream/xyCanvasRenderers.d.ts +7 -0
- package/dist/components/stream/xyCrosshair.d.ts +11 -0
- package/dist/components/stream/xyDateTicks.d.ts +9 -0
- package/dist/components/stream/xyDefaultTooltip.d.ts +10 -0
- package/dist/components/stream/xySceneBuilders/types.d.ts +4 -4
- package/dist/controls.min.js +2 -0
- package/dist/controls.module.min.js +2 -0
- package/dist/forceLayoutWorker.js +1 -0
- package/dist/geo.min.js +1 -1
- package/dist/geo.module.min.js +1 -1
- package/dist/network.min.js +1 -1
- package/dist/network.module.min.js +1 -1
- package/dist/ordinal.min.js +1 -1
- package/dist/ordinal.module.min.js +1 -1
- package/dist/physics-matter.min.js +1 -0
- package/dist/physics-matter.module.min.js +1 -0
- package/dist/physics-rapier.min.js +1 -0
- package/dist/physics-rapier.module.min.js +1 -0
- package/dist/physics.min.js +2 -0
- package/dist/physics.module.min.js +2 -0
- package/dist/physicsWorker.js +1 -0
- package/dist/realtime.min.js +1 -1
- package/dist/realtime.module.min.js +1 -1
- package/dist/semiotic-ai-chunk-OG7BQUUW.module.min.js +2 -0
- package/dist/semiotic-ai-core.d.ts +47 -0
- package/dist/semiotic-ai-core.min.js +1 -0
- package/dist/semiotic-ai-core.module.min.js +1 -0
- package/dist/semiotic-ai-statisticalOverlays-CY4WKR4A.module.min.js +2 -0
- package/dist/semiotic-ai.d.ts +50 -8
- package/dist/semiotic-ai.min.js +1 -1
- package/dist/semiotic-ai.module.min.js +1 -1
- package/dist/semiotic-chunk-3FSVZ46U.module.min.js +2 -0
- package/dist/semiotic-controls.d.ts +18 -0
- package/dist/semiotic-data.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 +11 -0
- package/dist/semiotic-network.d.ts +11 -0
- package/dist/semiotic-ordinal.d.ts +8 -0
- package/dist/semiotic-physics-matter.d.ts +10 -0
- package/dist/semiotic-physics-rapier.d.ts +9 -0
- package/dist/semiotic-physics.d.ts +56 -0
- package/dist/semiotic-realtime-core.d.ts +34 -0
- package/dist/semiotic-realtime-core.min.js +1 -0
- package/dist/semiotic-realtime-core.module.min.js +1 -0
- package/dist/semiotic-realtime-react.d.ts +10 -0
- package/dist/semiotic-realtime-react.min.js +2 -0
- package/dist/semiotic-realtime-react.module.min.js +2 -0
- package/dist/semiotic-realtime.d.ts +4 -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-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 +46 -0
- package/dist/semiotic-utils-core.min.js +1 -0
- package/dist/semiotic-utils-core.module.min.js +1 -0
- package/dist/semiotic-utils-react.d.ts +5 -0
- package/dist/semiotic-utils-react.min.js +2 -0
- package/dist/semiotic-utils-react.module.min.js +2 -0
- package/dist/semiotic-utils.d.ts +3 -39
- package/dist/semiotic-utils.min.js +1 -2
- package/dist/semiotic-utils.module.min.js +1 -2
- package/dist/semiotic-value.min.js +1 -1
- package/dist/semiotic-value.module.min.js +1 -1
- package/dist/semiotic-xy.d.ts +8 -0
- package/dist/semiotic.d.ts +35 -7
- package/dist/semiotic.min.js +1 -1
- package/dist/semiotic.module.min.js +1 -1
- package/dist/server.min.js +1 -1
- package/dist/server.module.min.js +1 -1
- package/dist/xy-chunk-IWD6IB6V.module.min.js +2 -0
- package/dist/xy-statisticalOverlays-7RWG6LJT.module.min.js +2 -0
- package/dist/xy.min.js +1 -1
- package/dist/xy.module.min.js +1 -1
- package/package.json +239 -87
- 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,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,72 @@
|
|
|
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
|
+
export type PhysicsAnnotationAnchorNode = {
|
|
14
|
+
pointId?: string;
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
r: number;
|
|
18
|
+
};
|
|
19
|
+
export declare function bodiesToAnnotationAnchors(bodies: readonly PhysicsBodyState[]): PhysicsAnnotationAnchorNode[];
|
|
20
|
+
export interface PhysicsSVGOverlayProps {
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
totalWidth: number;
|
|
24
|
+
totalHeight: number;
|
|
25
|
+
margin: {
|
|
26
|
+
top: number;
|
|
27
|
+
right: number;
|
|
28
|
+
bottom: number;
|
|
29
|
+
left: number;
|
|
30
|
+
};
|
|
31
|
+
title?: string | ReactNode;
|
|
32
|
+
legend?: ReactNode | {
|
|
33
|
+
legendGroups: LegendGroup[];
|
|
34
|
+
} | {
|
|
35
|
+
gradient: GradientLegendConfig;
|
|
36
|
+
};
|
|
37
|
+
legendHoverBehavior?: (item: {
|
|
38
|
+
label: string;
|
|
39
|
+
} | null) => void;
|
|
40
|
+
legendClickBehavior?: (item: {
|
|
41
|
+
label: string;
|
|
42
|
+
}) => void;
|
|
43
|
+
legendHighlightedCategory?: string | null;
|
|
44
|
+
legendIsolatedCategories?: Set<string>;
|
|
45
|
+
legendPosition?: "right" | "left" | "top" | "bottom";
|
|
46
|
+
legendLayout?: LegendLayout;
|
|
47
|
+
/** Live body anchors for pointId / bodyId annotations. */
|
|
48
|
+
pointNodes?: PhysicsAnnotationAnchorNode[];
|
|
49
|
+
annotations?: Datum[];
|
|
50
|
+
autoPlaceAnnotations?: AutoPlaceAnnotations;
|
|
51
|
+
svgAnnotationRules?: (annotation: Datum, index: number, context: AnnotationContext) => ReactNode;
|
|
52
|
+
/** Optional foreground SVG already composed into the frame stack. */
|
|
53
|
+
children?: ReactNode;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Pixel-space annotation context: identity scales so raw `x`/`y` on notes
|
|
57
|
+
* read as canvas coordinates (physics has no data→pixel scale).
|
|
58
|
+
*/
|
|
59
|
+
export declare function buildPhysicsAnnotationContext(options: {
|
|
60
|
+
width: number;
|
|
61
|
+
height: number;
|
|
62
|
+
pointNodes?: PhysicsAnnotationAnchorNode[];
|
|
63
|
+
data?: Datum[];
|
|
64
|
+
}): AnnotationContext;
|
|
65
|
+
/**
|
|
66
|
+
* Normalize common physics annotation aliases onto Semiotic annotation shapes.
|
|
67
|
+
* - `bodyId` → `pointId` (anchor to a live body)
|
|
68
|
+
* - physics barrier/sensor notes still paint as x/y-threshold when typed that way
|
|
69
|
+
*/
|
|
70
|
+
export declare function normalizePhysicsAnnotations(annotations: Datum[] | undefined): Datum[] | undefined;
|
|
71
|
+
export declare function PhysicsSVGOverlay(props: PhysicsSVGOverlayProps): React.JSX.Element;
|
|
72
|
+
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;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { PhysicsPipelineConfig, PhysicsPipelineSnapshot, PhysicsQueuedSpawn, PhysicsSpawnPacingOptions } from "./PhysicsPipelineStore";
|
|
2
|
+
import { type PhysicsWorkerCommand, type PhysicsWorkerFrame, type PhysicsWorkerResponsePayload } from "./PhysicsWorkerProtocol";
|
|
3
|
+
export declare function canUsePhysicsWorker(): boolean;
|
|
4
|
+
export declare function createPhysicsWorker(): Worker;
|
|
5
|
+
export declare class PhysicsWorkerSession {
|
|
6
|
+
private nextRequestId;
|
|
7
|
+
private pending;
|
|
8
|
+
private worker;
|
|
9
|
+
constructor(worker?: Worker);
|
|
10
|
+
request(command: PhysicsWorkerCommand, signal?: AbortSignal): Promise<PhysicsWorkerResponsePayload>;
|
|
11
|
+
init(config?: PhysicsPipelineConfig, initialSpawns?: PhysicsQueuedSpawn[], initialSpawnPacing?: PhysicsSpawnPacingOptions, signal?: AbortSignal): Promise<PhysicsWorkerFrame>;
|
|
12
|
+
restore(snapshot: PhysicsPipelineSnapshot, signal?: AbortSignal): Promise<PhysicsWorkerFrame>;
|
|
13
|
+
initFromSnapshot(config: PhysicsPipelineConfig | undefined, snapshot: PhysicsPipelineSnapshot, signal?: AbortSignal): Promise<PhysicsWorkerFrame>;
|
|
14
|
+
enqueue(spawns: PhysicsQueuedSpawn[], pacing?: PhysicsSpawnPacingOptions, signal?: AbortSignal): Promise<PhysicsWorkerFrame>;
|
|
15
|
+
tick(deltaSeconds: number, signal?: AbortSignal): Promise<PhysicsWorkerFrame>;
|
|
16
|
+
settle(maxSteps?: number, signal?: AbortSignal): Promise<PhysicsWorkerFrame>;
|
|
17
|
+
snapshot(signal?: AbortSignal): Promise<PhysicsPipelineSnapshot>;
|
|
18
|
+
remove(ids: string[], signal?: AbortSignal): Promise<{
|
|
19
|
+
frame: PhysicsWorkerFrame;
|
|
20
|
+
removed: string[];
|
|
21
|
+
}>;
|
|
22
|
+
terminate(): void;
|
|
23
|
+
private rejectAll;
|
|
24
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type { PhysicsBodyState } from "./PhysicsKernel";
|
|
2
|
+
import type { PhysicsPipelineConfig, PhysicsPipelineObservationOptions, PhysicsPipelineSnapshot, PhysicsPipelineTickResult, PhysicsQueuedSpawn, PhysicsSpawnPacingOptions } from "./PhysicsPipelineStore";
|
|
3
|
+
import type { PhysicsSedimentBinSnapshot } from "./PhysicsSediment";
|
|
4
|
+
export type PhysicsExecution = "auto" | "worker" | "sync";
|
|
5
|
+
export declare const DEFAULT_PHYSICS_WORKER_BODY_THRESHOLD = 2500;
|
|
6
|
+
export type PhysicsWorkerObservationOptions = Omit<PhysicsPipelineObservationOptions, "onObservation" | "onSimulationStateChange">;
|
|
7
|
+
export type PhysicsWorkerSedimentConfig = false | {
|
|
8
|
+
binAccessor?: string;
|
|
9
|
+
labelAccessor?: string;
|
|
10
|
+
valueAccessor?: number | string;
|
|
11
|
+
retainBodyIds?: number;
|
|
12
|
+
};
|
|
13
|
+
export type PhysicsWorkerPipelineConfig = Omit<PhysicsPipelineConfig, "engine" | "observation" | "sediment"> & {
|
|
14
|
+
observation?: PhysicsWorkerObservationOptions;
|
|
15
|
+
sediment?: PhysicsWorkerSedimentConfig;
|
|
16
|
+
};
|
|
17
|
+
export interface PhysicsWorkerFrame {
|
|
18
|
+
bodies: PhysicsBodyState[];
|
|
19
|
+
ids: string[];
|
|
20
|
+
positions: Float32Array;
|
|
21
|
+
result: PhysicsPipelineTickResult;
|
|
22
|
+
sediment: PhysicsSedimentBinSnapshot[];
|
|
23
|
+
sleeping: Uint8Array;
|
|
24
|
+
snapshot?: PhysicsPipelineSnapshot;
|
|
25
|
+
velocities: Float32Array;
|
|
26
|
+
}
|
|
27
|
+
export type PhysicsWorkerCommand = {
|
|
28
|
+
type: "init";
|
|
29
|
+
config?: PhysicsWorkerPipelineConfig;
|
|
30
|
+
initialSpawns?: PhysicsQueuedSpawn[];
|
|
31
|
+
initialSpawnPacing?: PhysicsSpawnPacingOptions;
|
|
32
|
+
snapshot?: PhysicsPipelineSnapshot;
|
|
33
|
+
} | {
|
|
34
|
+
type: "configure";
|
|
35
|
+
config: PhysicsWorkerPipelineConfig;
|
|
36
|
+
} | {
|
|
37
|
+
type: "enqueue";
|
|
38
|
+
spawns: PhysicsQueuedSpawn[];
|
|
39
|
+
pacing?: PhysicsSpawnPacingOptions;
|
|
40
|
+
} | {
|
|
41
|
+
type: "tick";
|
|
42
|
+
deltaSeconds: number;
|
|
43
|
+
} | {
|
|
44
|
+
type: "settle";
|
|
45
|
+
maxSteps?: number;
|
|
46
|
+
} | {
|
|
47
|
+
type: "snapshot";
|
|
48
|
+
} | {
|
|
49
|
+
type: "restore";
|
|
50
|
+
snapshot: PhysicsPipelineSnapshot;
|
|
51
|
+
} | {
|
|
52
|
+
type: "clear";
|
|
53
|
+
} | {
|
|
54
|
+
type: "remove";
|
|
55
|
+
ids: string[];
|
|
56
|
+
} | {
|
|
57
|
+
type: "applyImpulse";
|
|
58
|
+
id: string;
|
|
59
|
+
ix: number;
|
|
60
|
+
iy: number;
|
|
61
|
+
} | {
|
|
62
|
+
type: "setPaused";
|
|
63
|
+
paused: boolean;
|
|
64
|
+
} | {
|
|
65
|
+
type: "setVisible";
|
|
66
|
+
visible: boolean;
|
|
67
|
+
};
|
|
68
|
+
export interface PhysicsWorkerRequest {
|
|
69
|
+
command: PhysicsWorkerCommand;
|
|
70
|
+
requestId: number;
|
|
71
|
+
}
|
|
72
|
+
export type PhysicsWorkerResponsePayload = {
|
|
73
|
+
type: "frame";
|
|
74
|
+
frame: PhysicsWorkerFrame;
|
|
75
|
+
} | {
|
|
76
|
+
type: "removed";
|
|
77
|
+
frame: PhysicsWorkerFrame;
|
|
78
|
+
removed: string[];
|
|
79
|
+
} | {
|
|
80
|
+
type: "snapshot";
|
|
81
|
+
snapshot: PhysicsPipelineSnapshot;
|
|
82
|
+
};
|
|
83
|
+
export type PhysicsWorkerResponse = {
|
|
84
|
+
ok: true;
|
|
85
|
+
payload: PhysicsWorkerResponsePayload;
|
|
86
|
+
requestId: number;
|
|
87
|
+
} | {
|
|
88
|
+
error: {
|
|
89
|
+
message: string;
|
|
90
|
+
name?: string;
|
|
91
|
+
stack?: string;
|
|
92
|
+
};
|
|
93
|
+
ok: false;
|
|
94
|
+
requestId: number;
|
|
95
|
+
};
|
|
96
|
+
export declare function isPhysicsWorkerConfigSupported(config: PhysicsPipelineConfig | undefined): boolean;
|
|
97
|
+
export declare function isPhysicsWorkerPacingSupported(pacing: PhysicsSpawnPacingOptions | undefined): boolean;
|
|
98
|
+
export declare function createPhysicsWorkerConfig(config?: PhysicsPipelineConfig | undefined): PhysicsWorkerPipelineConfig;
|
|
99
|
+
export declare function shouldUsePhysicsWorker(execution: PhysicsExecution, liveBodies: number, queuedBodies?: number, threshold?: number): boolean;
|
|
100
|
+
export declare function packPhysicsWorkerFrame(result: PhysicsPipelineTickResult, bodies: PhysicsBodyState[], sediment?: PhysicsSedimentBinSnapshot[], snapshot?: PhysicsPipelineSnapshot): PhysicsWorkerFrame;
|
|
101
|
+
export declare function physicsWorkerFrameTransferables(frame: PhysicsWorkerFrame): Transferable[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type PhysicsWorkerCommand, type PhysicsWorkerResponsePayload } from "./PhysicsWorkerProtocol";
|
|
2
|
+
export interface PhysicsWorkerRuntime {
|
|
3
|
+
handle: (command: PhysicsWorkerCommand) => PhysicsWorkerResponsePayload;
|
|
4
|
+
}
|
|
5
|
+
export declare function createPhysicsWorkerRuntime(): PhysicsWorkerRuntime;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { PhysicsEngineCapabilities } from "./PhysicsEngineAdapter";
|
|
2
|
+
export declare const RAPIER_PHYSICS_PACKAGE = "@dimforge/rapier2d-compat";
|
|
3
|
+
export declare const RAPIER_PHYSICS_IMPORT_PATH = "semiotic/physics/rapier";
|
|
4
|
+
export declare const RAPIER_PHYSICS_ENGINE_DECISION: {
|
|
5
|
+
readonly selectedPackage: "@dimforge/rapier2d-compat";
|
|
6
|
+
readonly rejectedPackage: "@dimforge/rapier2d-deterministic";
|
|
7
|
+
readonly determinism: "tolerance";
|
|
8
|
+
readonly reason: "Use @dimforge/rapier2d-compat for the optional browser adapter path because it is the maintained npm/WASM package with standard bundler behavior. Treat Rapier visual/position conformance as tolerance-classed; keep the built-in kernel as the strict deterministic default.";
|
|
9
|
+
};
|
|
10
|
+
export declare const RAPIER_PHYSICS_CAPABILITIES: PhysicsEngineCapabilities;
|
|
11
|
+
export declare const RAPIER_PHYSICS_INSTALL: {
|
|
12
|
+
readonly engine: "Rapier 2D";
|
|
13
|
+
readonly importPath: "semiotic/physics/rapier";
|
|
14
|
+
readonly packageName: "@dimforge/rapier2d-compat";
|
|
15
|
+
readonly installCommand: "npm install @dimforge/rapier2d-compat";
|
|
16
|
+
};
|
|
17
|
+
export declare function loadRapierPhysicsPeer(): Promise<unknown>;
|
|
18
|
+
export declare function rapierPhysicsDependencyError(cause?: unknown): Error;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { PhysicsController } from "./PhysicsControllers";
|
|
2
|
+
import type { DependencyGateOptions, DependencyGateSnapshot, ServiceLevelCaseInfo, ServiceLevelControllerOptions, ServiceLevelSnapshot, ServiceResourceAssignment, ServiceResourcePoolOptions, ServiceResourcePoolSnapshot } from "./ServiceOperationsTypes";
|
|
3
|
+
export interface ServiceResourcePoolController extends PhysicsController {
|
|
4
|
+
assign: (caseBodyId: string) => ServiceResourceAssignment | null;
|
|
5
|
+
release: (caseBodyId: string) => boolean;
|
|
6
|
+
getAssignment: (caseBodyId: string) => ServiceResourceAssignment | undefined;
|
|
7
|
+
getSnapshot: () => ServiceResourcePoolSnapshot;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Models finite, visible service resources. Assignment is intentionally
|
|
11
|
+
* explicit so domain controllers decide scheduling while this controller
|
|
12
|
+
* supplies physical tethers, return-to-home force, and resource evidence.
|
|
13
|
+
*/
|
|
14
|
+
export declare function createServiceResourcePoolController(options: ServiceResourcePoolOptions): ServiceResourcePoolController;
|
|
15
|
+
export interface ServiceLevelController extends PhysicsController {
|
|
16
|
+
protect: (bodyId: string) => boolean;
|
|
17
|
+
complete: (bodyId: string) => boolean;
|
|
18
|
+
getCase: (bodyId: string) => ServiceLevelCaseInfo | undefined;
|
|
19
|
+
getSnapshot: () => ServiceLevelSnapshot;
|
|
20
|
+
}
|
|
21
|
+
/** Tracks service-level outcomes independently from the force simulation. */
|
|
22
|
+
export declare function createServiceLevelController(options: ServiceLevelControllerOptions): ServiceLevelController;
|
|
23
|
+
export interface DependencyGateController extends PhysicsController {
|
|
24
|
+
getSnapshot: () => DependencyGateSnapshot;
|
|
25
|
+
}
|
|
26
|
+
/** Holds dependency-bound work until an external condition or scheduled recovery opens. */
|
|
27
|
+
export declare function createDependencyGateController(options: DependencyGateOptions): DependencyGateController;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { PhysicsBodyState, PhysicsColliderBodyFilter } from "./PhysicsKernel";
|
|
2
|
+
import type { StreamPhysicsRegionVector } from "./StreamPhysicsFrame";
|
|
3
|
+
export type ServiceLevelCaseState = "waiting" | "protected" | "unhappy" | "resolved" | "resolved-unhappy";
|
|
4
|
+
export interface ServiceResourceDefinition {
|
|
5
|
+
id: string;
|
|
6
|
+
/** Defaults to `id`; use this when the visual body has a different id. */
|
|
7
|
+
bodyId?: string;
|
|
8
|
+
/** Resting point used while the resource is unassigned. */
|
|
9
|
+
home: {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export interface ServiceResourceAssignment {
|
|
15
|
+
resourceId: string;
|
|
16
|
+
resourceBodyId: string;
|
|
17
|
+
caseBodyId: string;
|
|
18
|
+
assignedAt: number;
|
|
19
|
+
}
|
|
20
|
+
export interface ServiceResourcePoolSnapshot {
|
|
21
|
+
total: number;
|
|
22
|
+
available: number;
|
|
23
|
+
assigned: number;
|
|
24
|
+
assignments: ServiceResourceAssignment[];
|
|
25
|
+
simulatedAt: number;
|
|
26
|
+
metricRevision: number;
|
|
27
|
+
}
|
|
28
|
+
export interface ServiceResourcePoolOptions {
|
|
29
|
+
id?: string;
|
|
30
|
+
resources: readonly ServiceResourceDefinition[];
|
|
31
|
+
/** Pulls an assigned resource toward its case (default 0.45). */
|
|
32
|
+
assignmentForce?: number;
|
|
33
|
+
/** Place an assigned resource ahead of its case to express directional service. */
|
|
34
|
+
assignmentOffset?: StreamPhysicsRegionVector;
|
|
35
|
+
/** Returns an idle resource to its home point (default 0.35). */
|
|
36
|
+
returnForce?: number;
|
|
37
|
+
/** Small reciprocal force that makes an assignment readable as a tether. */
|
|
38
|
+
caseAttraction?: number;
|
|
39
|
+
}
|
|
40
|
+
export interface ServiceLevelCaseInfo {
|
|
41
|
+
bodyId: string;
|
|
42
|
+
openedAt: number;
|
|
43
|
+
deadlineAt: number;
|
|
44
|
+
state: ServiceLevelCaseState;
|
|
45
|
+
completedAt?: number;
|
|
46
|
+
protectedAt?: number;
|
|
47
|
+
}
|
|
48
|
+
export interface ServiceLevelSnapshot {
|
|
49
|
+
total: number;
|
|
50
|
+
waiting: number;
|
|
51
|
+
protected: number;
|
|
52
|
+
unhappy: number;
|
|
53
|
+
resolved: number;
|
|
54
|
+
resolvedUnhappy: number;
|
|
55
|
+
simulatedAt: number;
|
|
56
|
+
metricRevision: number;
|
|
57
|
+
}
|
|
58
|
+
export interface ServiceLevelControllerOptions {
|
|
59
|
+
id?: string;
|
|
60
|
+
/** Only matching bodies become service cases. */
|
|
61
|
+
bodyFilter?: PhysicsColliderBodyFilter;
|
|
62
|
+
/** String form reads `body.datum[field]`; values are simulated seconds. */
|
|
63
|
+
deadlineAccessor: string | ((body: PhysicsBodyState) => number | null | undefined);
|
|
64
|
+
/** Entering this region marks a case complete. Completion may also be explicit. */
|
|
65
|
+
completionRegionId?: string;
|
|
66
|
+
onStateChange?: (caseInfo: ServiceLevelCaseInfo) => void;
|
|
67
|
+
}
|
|
68
|
+
export interface DependencyGateSnapshot {
|
|
69
|
+
regionId: string;
|
|
70
|
+
isOpen: boolean;
|
|
71
|
+
blocked: number;
|
|
72
|
+
released: number;
|
|
73
|
+
simulatedAt: number;
|
|
74
|
+
metricRevision: number;
|
|
75
|
+
}
|
|
76
|
+
export interface DependencyGateOptions {
|
|
77
|
+
id?: string;
|
|
78
|
+
regionId: string;
|
|
79
|
+
bodyFilter?: PhysicsColliderBodyFilter;
|
|
80
|
+
/** Defaults to closed until `opensAt`; provide `isOpen` for live external state. */
|
|
81
|
+
opensAt?: number;
|
|
82
|
+
isOpen?: (simulatedAt: number) => boolean;
|
|
83
|
+
/** Pull strength toward the closed gate's center (default 0.4). */
|
|
84
|
+
holdForce?: number;
|
|
85
|
+
/** Applied once to every held body as the gate opens. */
|
|
86
|
+
releaseImpulse?: StreamPhysicsRegionVector;
|
|
87
|
+
onHeld?: (body: PhysicsBodyState) => void;
|
|
88
|
+
onReleased?: (body: PhysicsBodyState) => void;
|
|
89
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { StreamPhysicsFrameHandle, StreamPhysicsFrameProps } from "./StreamPhysicsTypes";
|
|
3
|
+
export type { PhysicsBodyMark, StreamPhysicsPopOptions } from "./physicsBodyCanvas";
|
|
4
|
+
export type { PhysicsBodySelection, PhysicsBodySemanticItemAccessor, PhysicsBodySemanticItemContext, PhysicsBodyStyleContext, PhysicsHoverData, PhysicsSemanticItem, StreamPhysicsBodyForce, StreamPhysicsBodyForceContext, StreamPhysicsBodyRegionState, StreamPhysicsExecutionState, StreamPhysicsFrameHandle, StreamPhysicsFrameProps, StreamPhysicsRegionEffect, StreamPhysicsRegionEffectContext, StreamPhysicsRegionEvent, StreamPhysicsRegionKind, StreamPhysicsRegionVector } from "./StreamPhysicsTypes";
|
|
5
|
+
export declare const StreamPhysicsFrame: React.NamedExoticComponent<StreamPhysicsFrameProps & React.RefAttributes<StreamPhysicsFrameHandle>>;
|
|
6
|
+
export default StreamPhysicsFrame;
|