@spatial-elements/core 0.1.0-beta.2 → 1.0.0-beta.11
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/README.md +16 -13
- package/dist/catalog/CarouselDeviceCamera.d.ts +20 -0
- package/dist/catalog/CarouselDeviceCamera.d.ts.map +1 -0
- package/dist/catalog/CarouselDeviceCamera.js +58 -0
- package/dist/catalog/CarouselDeviceCamera.js.map +1 -0
- package/dist/catalog/CarouselGlassCompositor.d.ts +14 -3
- package/dist/catalog/CarouselGlassCompositor.d.ts.map +1 -1
- package/dist/catalog/CarouselGlassCompositor.js +164 -28
- package/dist/catalog/CarouselGlassCompositor.js.map +1 -1
- package/dist/catalog/CarouselGround.d.ts +43 -0
- package/dist/catalog/CarouselGround.d.ts.map +1 -0
- package/dist/catalog/CarouselGround.js +270 -0
- package/dist/catalog/CarouselGround.js.map +1 -0
- package/dist/catalog/CarouselSectionSurfaces.d.ts +10 -0
- package/dist/catalog/CarouselSectionSurfaces.d.ts.map +1 -0
- package/dist/catalog/CarouselSectionSurfaces.js +55 -0
- package/dist/catalog/CarouselSectionSurfaces.js.map +1 -0
- package/dist/catalog/CatalogDepthBlur.d.ts +45 -0
- package/dist/catalog/CatalogDepthBlur.d.ts.map +1 -0
- package/dist/catalog/CatalogDepthBlur.js +190 -0
- package/dist/catalog/CatalogDepthBlur.js.map +1 -0
- package/dist/catalog/CatalogEndpointRegistry.d.ts +4 -2
- package/dist/catalog/CatalogEndpointRegistry.d.ts.map +1 -1
- package/dist/catalog/CatalogEndpointRegistry.js +2 -0
- package/dist/catalog/CatalogEndpointRegistry.js.map +1 -1
- package/dist/catalog/CatalogGeometryFade.d.ts +5 -1
- package/dist/catalog/CatalogGeometryFade.d.ts.map +1 -1
- package/dist/catalog/CatalogGeometryFade.js +45 -9
- package/dist/catalog/CatalogGeometryFade.js.map +1 -1
- package/dist/catalog/CatalogModelOutline.d.ts +33 -0
- package/dist/catalog/CatalogModelOutline.d.ts.map +1 -0
- package/dist/catalog/CatalogModelOutline.js +144 -0
- package/dist/catalog/CatalogModelOutline.js.map +1 -0
- package/dist/catalog/CatalogNavigationRegistry.d.ts +44 -0
- package/dist/catalog/CatalogNavigationRegistry.d.ts.map +1 -0
- package/dist/catalog/CatalogNavigationRegistry.js +66 -0
- package/dist/catalog/CatalogNavigationRegistry.js.map +1 -0
- package/dist/catalog/CatalogPreparation.d.ts +3 -3
- package/dist/catalog/CatalogPreparation.d.ts.map +1 -1
- package/dist/catalog/CatalogPreparation.js +10 -7
- package/dist/catalog/CatalogPreparation.js.map +1 -1
- package/dist/catalog/CatalogSpatialElementLayer.d.ts +175 -5
- package/dist/catalog/CatalogSpatialElementLayer.d.ts.map +1 -1
- package/dist/catalog/CatalogSpatialElementLayer.js +739 -121
- package/dist/catalog/CatalogSpatialElementLayer.js.map +1 -1
- package/dist/catalog/CatalogTransition.d.ts +5 -3
- package/dist/catalog/CatalogTransition.d.ts.map +1 -1
- package/dist/catalog/CatalogTransition.js +207 -91
- package/dist/catalog/CatalogTransition.js.map +1 -1
- package/dist/catalog/CatalogWarmOutputContext.d.ts +39 -0
- package/dist/catalog/CatalogWarmOutputContext.d.ts.map +1 -0
- package/dist/catalog/CatalogWarmOutputContext.js +159 -0
- package/dist/catalog/CatalogWarmOutputContext.js.map +1 -0
- package/dist/catalog/EarlyNavigationCoordinator.d.ts +35 -0
- package/dist/catalog/EarlyNavigationCoordinator.d.ts.map +1 -0
- package/dist/catalog/EarlyNavigationCoordinator.js +103 -0
- package/dist/catalog/EarlyNavigationCoordinator.js.map +1 -0
- package/dist/catalog/NavigationFeedback.d.ts +12 -0
- package/dist/catalog/NavigationFeedback.d.ts.map +1 -0
- package/dist/catalog/NavigationFeedback.js +40 -0
- package/dist/catalog/NavigationFeedback.js.map +1 -0
- package/dist/catalog/PreparationGate.d.ts +4 -0
- package/dist/catalog/PreparationGate.d.ts.map +1 -1
- package/dist/catalog/PreparationGate.js +1 -0
- package/dist/catalog/PreparationGate.js.map +1 -1
- package/dist/catalog/SourceDomClipping.d.ts +8 -0
- package/dist/catalog/SourceDomClipping.d.ts.map +1 -0
- package/dist/catalog/SourceDomClipping.js +74 -0
- package/dist/catalog/SourceDomClipping.js.map +1 -0
- package/dist/catalog/SourceDomMotion.d.ts +28 -0
- package/dist/catalog/SourceDomMotion.d.ts.map +1 -0
- package/dist/catalog/SourceDomMotion.js +111 -0
- package/dist/catalog/SourceDomMotion.js.map +1 -0
- package/dist/catalog/SpatialGeometryCapture.d.ts +9 -0
- package/dist/catalog/SpatialGeometryCapture.d.ts.map +1 -1
- package/dist/catalog/SpatialGeometryCapture.js +11 -1
- package/dist/catalog/SpatialGeometryCapture.js.map +1 -1
- package/dist/catalog/SpatialPageRegistry.d.ts +18 -0
- package/dist/catalog/SpatialPageRegistry.d.ts.map +1 -0
- package/dist/catalog/SpatialPageRegistry.js +21 -0
- package/dist/catalog/SpatialPageRegistry.js.map +1 -0
- package/dist/catalog/StagedCatalogTransition.d.ts +74 -0
- package/dist/catalog/StagedCatalogTransition.d.ts.map +1 -0
- package/dist/catalog/StagedCatalogTransition.js +270 -0
- package/dist/catalog/StagedCatalogTransition.js.map +1 -0
- package/dist/catalog/cardModelFit.d.ts +7 -0
- package/dist/catalog/cardModelFit.d.ts.map +1 -0
- package/dist/catalog/cardModelFit.js +16 -0
- package/dist/catalog/cardModelFit.js.map +1 -0
- package/dist/catalog/cardProjection.d.ts +39 -0
- package/dist/catalog/cardProjection.d.ts.map +1 -0
- package/dist/catalog/cardProjection.js +110 -0
- package/dist/catalog/cardProjection.js.map +1 -0
- package/dist/catalog/carouselMotion.d.ts +74 -0
- package/dist/catalog/carouselMotion.d.ts.map +1 -0
- package/dist/catalog/carouselMotion.js +185 -0
- package/dist/catalog/carouselMotion.js.map +1 -0
- package/dist/catalog/carouselPanelProjection.d.ts.map +1 -1
- package/dist/catalog/carouselPanelProjection.js +48 -11
- package/dist/catalog/carouselPanelProjection.js.map +1 -1
- package/dist/catalog/carouselProximity.d.ts +11 -0
- package/dist/catalog/carouselProximity.d.ts.map +1 -0
- package/dist/catalog/carouselProximity.js +13 -0
- package/dist/catalog/carouselProximity.js.map +1 -0
- package/dist/catalog/carouselSupport.d.ts +4 -0
- package/dist/catalog/carouselSupport.d.ts.map +1 -0
- package/dist/catalog/carouselSupport.js +30 -0
- package/dist/catalog/carouselSupport.js.map +1 -0
- package/dist/catalog/catalogActivationFocus.d.ts +5 -0
- package/dist/catalog/catalogActivationFocus.d.ts.map +1 -0
- package/dist/catalog/catalogActivationFocus.js +39 -0
- package/dist/catalog/catalogActivationFocus.js.map +1 -0
- package/dist/catalog/catalogDomSnapshot.d.ts +18 -0
- package/dist/catalog/catalogDomSnapshot.d.ts.map +1 -0
- package/dist/catalog/catalogDomSnapshot.js +51 -0
- package/dist/catalog/catalogDomSnapshot.js.map +1 -0
- package/dist/catalog/catalogJourney.d.ts +4 -1
- package/dist/catalog/catalogJourney.d.ts.map +1 -1
- package/dist/catalog/catalogJourney.js +7 -15
- package/dist/catalog/catalogJourney.js.map +1 -1
- package/dist/catalog/catalogPage.d.ts +7 -3
- package/dist/catalog/catalogPage.d.ts.map +1 -1
- package/dist/catalog/catalogPage.js.map +1 -1
- package/dist/catalog/catalogPose.d.ts +54 -6
- package/dist/catalog/catalogPose.d.ts.map +1 -1
- package/dist/catalog/catalogPose.js +100 -23
- package/dist/catalog/catalogPose.js.map +1 -1
- package/dist/catalog/catalogRecipes.d.ts +3 -2
- package/dist/catalog/catalogRecipes.d.ts.map +1 -1
- package/dist/catalog/catalogRecipes.js +12 -27
- package/dist/catalog/catalogRecipes.js.map +1 -1
- package/dist/catalog/catalogTransitionViewport.d.ts +9 -0
- package/dist/catalog/catalogTransitionViewport.d.ts.map +1 -0
- package/dist/catalog/catalogTransitionViewport.js +13 -0
- package/dist/catalog/catalogTransitionViewport.js.map +1 -0
- package/dist/catalog/catalogViewLink.d.ts +2 -0
- package/dist/catalog/catalogViewLink.d.ts.map +1 -1
- package/dist/catalog/catalogViewLink.js +10 -2
- package/dist/catalog/catalogViewLink.js.map +1 -1
- package/dist/catalog/deviceYaw.d.ts +21 -0
- package/dist/catalog/deviceYaw.d.ts.map +1 -0
- package/dist/catalog/deviceYaw.js +87 -0
- package/dist/catalog/deviceYaw.js.map +1 -0
- package/dist/catalog/listDeviceOrientation.d.ts +20 -0
- package/dist/catalog/listDeviceOrientation.d.ts.map +1 -0
- package/dist/catalog/listDeviceOrientation.js +273 -0
- package/dist/catalog/listDeviceOrientation.js.map +1 -0
- package/dist/catalog/spatialElementAssets.d.ts +5 -5
- package/dist/catalog/spatialElementAssets.d.ts.map +1 -1
- package/dist/catalog/spatialElementAssets.js.map +1 -1
- package/dist/catalog/spatialElementLodPair.d.ts +2 -1
- package/dist/catalog/spatialElementLodPair.d.ts.map +1 -1
- package/dist/catalog/spatialElementLodPair.js.map +1 -1
- package/dist/catalog/stagedDetailGeometry.d.ts +37 -0
- package/dist/catalog/stagedDetailGeometry.d.ts.map +1 -0
- package/dist/catalog/stagedDetailGeometry.js +55 -0
- package/dist/catalog/stagedDetailGeometry.js.map +1 -0
- package/dist/catalog/stagedDockGeometry.d.ts +66 -0
- package/dist/catalog/stagedDockGeometry.d.ts.map +1 -0
- package/dist/catalog/stagedDockGeometry.js +66 -0
- package/dist/catalog/stagedDockGeometry.js.map +1 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/spatial-element/ResponsiveViewportMetrics.d.ts +18 -0
- package/dist/spatial-element/ResponsiveViewportMetrics.d.ts.map +1 -0
- package/dist/spatial-element/ResponsiveViewportMetrics.js +68 -0
- package/dist/spatial-element/ResponsiveViewportMetrics.js.map +1 -0
- package/dist/spatial-element/SectionSurfaceRegistry.d.ts +2 -0
- package/dist/spatial-element/SectionSurfaceRegistry.d.ts.map +1 -0
- package/dist/spatial-element/SectionSurfaceRegistry.js +2 -0
- package/dist/spatial-element/SectionSurfaceRegistry.js.map +1 -0
- package/dist/spatial-element/SpatialElementDockController.d.ts +23 -11
- package/dist/spatial-element/SpatialElementDockController.d.ts.map +1 -1
- package/dist/spatial-element/SpatialElementDockController.js +228 -96
- package/dist/spatial-element/SpatialElementDockController.js.map +1 -1
- package/dist/spatial-element/SpatialElementPaneController.d.ts +67 -0
- package/dist/spatial-element/SpatialElementPaneController.d.ts.map +1 -0
- package/dist/spatial-element/SpatialElementPaneController.js +246 -0
- package/dist/spatial-element/SpatialElementPaneController.js.map +1 -0
- package/dist/spatial-element/activeDetailSection.d.ts +8 -0
- package/dist/spatial-element/activeDetailSection.d.ts.map +1 -0
- package/dist/spatial-element/activeDetailSection.js +19 -0
- package/dist/spatial-element/activeDetailSection.js.map +1 -0
- package/dist/spatial-element/layoutTokens.json +228 -0
- package/dist/spatial-element/messages.d.ts +46 -0
- package/dist/spatial-element/messages.d.ts.map +1 -0
- package/dist/spatial-element/messages.js +46 -0
- package/dist/spatial-element/messages.js.map +1 -0
- package/dist/spatial-element/responsiveLayout.d.ts +1353 -0
- package/dist/spatial-element/responsiveLayout.d.ts.map +1 -0
- package/dist/spatial-element/responsiveLayout.js +210 -0
- package/dist/spatial-element/responsiveLayout.js.map +1 -0
- package/dist/spatial-element/sectionBackground.d.ts +3 -0
- package/dist/spatial-element/sectionBackground.d.ts.map +1 -0
- package/dist/spatial-element/sectionBackground.js +2 -0
- package/dist/spatial-element/sectionBackground.js.map +1 -0
- package/dist/spatial-element/spatialElement.d.ts +17 -12
- package/dist/spatial-element/spatialElement.d.ts.map +1 -1
- package/dist/spatial-element/spatialElement.js +33 -6
- package/dist/spatial-element/spatialElement.js.map +1 -1
- package/dist/spatial-element/spatialElementDock.d.ts +15 -0
- package/dist/spatial-element/spatialElementDock.d.ts.map +1 -1
- package/dist/spatial-element/spatialElementDock.js +22 -0
- package/dist/spatial-element/spatialElementDock.js.map +1 -1
- package/dist/spatial-element/spatialElementGeometry.d.ts +22 -0
- package/dist/spatial-element/spatialElementGeometry.d.ts.map +1 -0
- package/dist/spatial-element/spatialElementGeometry.js +40 -0
- package/dist/spatial-element/spatialElementGeometry.js.map +1 -0
- package/dist/spatial-element/spatialElementMedia.d.ts +16 -0
- package/dist/spatial-element/spatialElementMedia.d.ts.map +1 -0
- package/dist/spatial-element/spatialElementMedia.js +29 -0
- package/dist/spatial-element/spatialElementMedia.js.map +1 -0
- package/dist/spatial-element/spatialElementScene.d.ts +16 -0
- package/dist/spatial-element/spatialElementScene.d.ts.map +1 -0
- package/dist/spatial-element/spatialElementScene.js +22 -0
- package/dist/spatial-element/spatialElementScene.js.map +1 -0
- package/dist/spatial-element/spatialElementSectionRegistry.d.ts +6 -25
- package/dist/spatial-element/spatialElementSectionRegistry.d.ts.map +1 -1
- package/dist/spatial-element/spatialElementSectionRegistry.js +6 -63
- package/dist/spatial-element/spatialElementSectionRegistry.js.map +1 -1
- package/dist/spatial-element/spatialTheme.d.ts +27 -0
- package/dist/spatial-element/spatialTheme.d.ts.map +1 -0
- package/dist/spatial-element/spatialTheme.js +83 -0
- package/dist/spatial-element/spatialTheme.js.map +1 -0
- package/dist/spatial-element/types.d.ts +117 -36
- package/dist/spatial-element/types.d.ts.map +1 -1
- package/dist/spatial-element/types.js.map +1 -1
- package/dist/stage/BackgroundLayerOutput.d.ts +76 -0
- package/dist/stage/BackgroundLayerOutput.d.ts.map +1 -0
- package/dist/stage/BackgroundLayerOutput.js +333 -0
- package/dist/stage/BackgroundLayerOutput.js.map +1 -0
- package/dist/stage/DeviceGeometryMotion.d.ts +13 -0
- package/dist/stage/DeviceGeometryMotion.d.ts.map +1 -0
- package/dist/stage/DeviceGeometryMotion.js +37 -0
- package/dist/stage/DeviceGeometryMotion.js.map +1 -0
- package/dist/stage/LiquidGlassPanel.d.ts +7 -0
- package/dist/stage/LiquidGlassPanel.d.ts.map +1 -1
- package/dist/stage/LiquidGlassPanel.js +51 -7
- package/dist/stage/LiquidGlassPanel.js.map +1 -1
- package/dist/stage/MinimapController.d.ts +4 -1
- package/dist/stage/MinimapController.d.ts.map +1 -1
- package/dist/stage/MinimapController.js +62 -71
- package/dist/stage/MinimapController.js.map +1 -1
- package/dist/stage/ModelPointerPreview.d.ts +22 -0
- package/dist/stage/ModelPointerPreview.d.ts.map +1 -0
- package/dist/stage/ModelPointerPreview.js +71 -0
- package/dist/stage/ModelPointerPreview.js.map +1 -0
- package/dist/stage/PageBindingController.d.ts +10 -0
- package/dist/stage/PageBindingController.d.ts.map +1 -1
- package/dist/stage/PageBindingController.js +45 -5
- package/dist/stage/PageBindingController.js.map +1 -1
- package/dist/stage/PanelPresentationController.d.ts +21 -1
- package/dist/stage/PanelPresentationController.d.ts.map +1 -1
- package/dist/stage/PanelPresentationController.js +190 -31
- package/dist/stage/PanelPresentationController.js.map +1 -1
- package/dist/stage/SpaceMouseAdapter.d.ts +10 -2
- package/dist/stage/SpaceMouseAdapter.d.ts.map +1 -1
- package/dist/stage/SpaceMouseAdapter.js +50 -8
- package/dist/stage/SpaceMouseAdapter.js.map +1 -1
- package/dist/stage/SpatialElementInteractionController.d.ts +24 -2
- package/dist/stage/SpatialElementInteractionController.d.ts.map +1 -1
- package/dist/stage/SpatialElementInteractionController.js +198 -45
- package/dist/stage/SpatialElementInteractionController.js.map +1 -1
- package/dist/stage/SpatialElementPresentationController.d.ts +14 -2
- package/dist/stage/SpatialElementPresentationController.d.ts.map +1 -1
- package/dist/stage/SpatialElementPresentationController.js +47 -2
- package/dist/stage/SpatialElementPresentationController.js.map +1 -1
- package/dist/stage/SpatialElementRefinement.d.ts +34 -1
- package/dist/stage/SpatialElementRefinement.d.ts.map +1 -1
- package/dist/stage/SpatialElementRefinement.js +175 -37
- package/dist/stage/SpatialElementRefinement.js.map +1 -1
- package/dist/stage/StageExperience.d.ts +266 -11
- package/dist/stage/StageExperience.d.ts.map +1 -1
- package/dist/stage/StageExperience.js +673 -126
- package/dist/stage/StageExperience.js.map +1 -1
- package/dist/stage/StageFullscreenController.d.ts +17 -0
- package/dist/stage/StageFullscreenController.d.ts.map +1 -0
- package/dist/stage/StageFullscreenController.js +90 -0
- package/dist/stage/StageFullscreenController.js.map +1 -0
- package/dist/stage/StagePanelRuntime.d.ts +2 -1
- package/dist/stage/StagePanelRuntime.d.ts.map +1 -1
- package/dist/stage/StagePanelRuntime.js.map +1 -1
- package/dist/stage/StageRenderPipeline.d.ts +90 -2
- package/dist/stage/StageRenderPipeline.d.ts.map +1 -1
- package/dist/stage/StageRenderPipeline.js +494 -120
- package/dist/stage/StageRenderPipeline.js.map +1 -1
- package/dist/stage/VirtualScrollController.d.ts +7 -0
- package/dist/stage/VirtualScrollController.d.ts.map +1 -1
- package/dist/stage/VirtualScrollController.js +63 -6
- package/dist/stage/VirtualScrollController.js.map +1 -1
- package/dist/stage/inertLease.d.ts +2 -0
- package/dist/stage/inertLease.d.ts.map +1 -0
- package/dist/stage/inertLease.js +18 -0
- package/dist/stage/inertLease.js.map +1 -0
- package/dist/stage/interactionGuidance.d.ts +22 -0
- package/dist/stage/interactionGuidance.d.ts.map +1 -0
- package/dist/stage/interactionGuidance.js +53 -0
- package/dist/stage/interactionGuidance.js.map +1 -0
- package/dist/stage/interactionOutline.d.ts +14 -0
- package/dist/stage/interactionOutline.d.ts.map +1 -0
- package/dist/stage/interactionOutline.js +59 -0
- package/dist/stage/interactionOutline.js.map +1 -0
- package/dist/stage/minimap/MinimapGeometry.d.ts.map +1 -1
- package/dist/stage/minimap/MinimapGeometry.js +29 -0
- package/dist/stage/minimap/MinimapGeometry.js.map +1 -1
- package/dist/stage/minimap/MinimapModel.d.ts +2 -1
- package/dist/stage/minimap/MinimapModel.d.ts.map +1 -1
- package/dist/stage/minimap/MinimapModel.js +34 -4
- package/dist/stage/minimap/MinimapModel.js.map +1 -1
- package/dist/stage/minimap/MinimapModelGeometry.d.ts +21 -0
- package/dist/stage/minimap/MinimapModelGeometry.d.ts.map +1 -0
- package/dist/stage/minimap/MinimapModelGeometry.js +68 -0
- package/dist/stage/minimap/MinimapModelGeometry.js.map +1 -0
- package/dist/stage/minimap/MinimapProjection.d.ts +7 -0
- package/dist/stage/minimap/MinimapProjection.d.ts.map +1 -1
- package/dist/stage/minimap/MinimapProjection.js +14 -13
- package/dist/stage/minimap/MinimapProjection.js.map +1 -1
- package/dist/stage/minimap/MinimapState.d.ts +6 -11
- package/dist/stage/minimap/MinimapState.d.ts.map +1 -1
- package/dist/stage/minimap/MinimapState.js.map +1 -1
- package/dist/stage/mouseHover.d.ts +9 -0
- package/dist/stage/mouseHover.d.ts.map +1 -0
- package/dist/stage/mouseHover.js +55 -0
- package/dist/stage/mouseHover.js.map +1 -0
- package/dist/stage/panelContext.d.ts +33 -2
- package/dist/stage/panelContext.d.ts.map +1 -1
- package/dist/stage/panelContext.js.map +1 -1
- package/dist/stage/panelFocusMath.d.ts +34 -0
- package/dist/stage/panelFocusMath.d.ts.map +1 -0
- package/dist/stage/panelFocusMath.js +79 -0
- package/dist/stage/panelFocusMath.js.map +1 -0
- package/dist/stage/renderSettings.d.ts +10 -0
- package/dist/stage/renderSettings.d.ts.map +1 -0
- package/dist/stage/renderSettings.js +27 -0
- package/dist/stage/renderSettings.js.map +1 -0
- package/dist/stage/renderTargetInventory.d.ts +1 -1
- package/dist/stage/renderTargetInventory.js +1 -1
- package/dist/stage/renderTargetInventory.js.map +1 -1
- package/dist/stage/rendererState.d.ts +2 -0
- package/dist/stage/rendererState.d.ts.map +1 -1
- package/dist/stage/rendererState.js +13 -0
- package/dist/stage/rendererState.js.map +1 -1
- package/dist/stage/scalarMath.d.ts +6 -0
- package/dist/stage/scalarMath.d.ts.map +1 -0
- package/dist/stage/scalarMath.js +6 -0
- package/dist/stage/scalarMath.js.map +1 -0
- package/dist/stage/sceneEndpointEligibility.d.ts +20 -0
- package/dist/stage/sceneEndpointEligibility.d.ts.map +1 -0
- package/dist/stage/sceneEndpointEligibility.js +363 -0
- package/dist/stage/sceneEndpointEligibility.js.map +1 -0
- package/dist/stage/scrollFrame.d.ts +2 -0
- package/dist/stage/scrollFrame.d.ts.map +1 -1
- package/dist/stage/scrollFrame.js +18 -5
- package/dist/stage/scrollFrame.js.map +1 -1
- package/dist/stage/spaceMousePermission.d.ts +11 -0
- package/dist/stage/spaceMousePermission.d.ts.map +1 -0
- package/dist/stage/spaceMousePermission.js +63 -0
- package/dist/stage/spaceMousePermission.js.map +1 -0
- package/dist/stage/spaceMousePlatform.d.ts +12 -0
- package/dist/stage/spaceMousePlatform.d.ts.map +1 -0
- package/dist/stage/spaceMousePlatform.js +13 -0
- package/dist/stage/spaceMousePlatform.js.map +1 -0
- package/dist/stage/spatialElementFrame.d.ts.map +1 -1
- package/dist/stage/spatialElementFrame.js +5 -1
- package/dist/stage/spatialElementFrame.js.map +1 -1
- package/dist/stage/stageConstants.d.ts +3 -3
- package/dist/stage/stageConstants.d.ts.map +1 -1
- package/dist/stage/stageConstants.js +10 -10
- package/dist/stage/stageConstants.js.map +1 -1
- package/dist/stage/stageDom.d.ts +2 -0
- package/dist/stage/stageDom.d.ts.map +1 -1
- package/dist/stage/stageDom.js +10 -1
- package/dist/stage/stageDom.js.map +1 -1
- package/dist/stage/stageMath.d.ts +4 -33
- package/dist/stage/stageMath.d.ts.map +1 -1
- package/dist/stage/stageMath.js +39 -110
- package/dist/stage/stageMath.js.map +1 -1
- package/dist/stage/stageTypes.d.ts +32 -4
- package/dist/stage/stageTypes.d.ts.map +1 -1
- package/dist/stage/stageTypes.js.map +1 -1
- package/dist/stage/stageVisualTest.d.ts +24 -1
- package/dist/stage/stageVisualTest.d.ts.map +1 -1
- package/dist/stage/stageVisualTest.js.map +1 -1
- package/dist/stage/webgpuSupport.d.ts +3 -0
- package/dist/stage/webgpuSupport.d.ts.map +1 -0
- package/dist/stage/webgpuSupport.js +14 -0
- package/dist/stage/webgpuSupport.js.map +1 -0
- package/logo.svg +225 -0
- package/package.json +7 -5
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { STAGE_PANEL_LAYOUT_EVENT, STAGE_PANEL_VISUAL_EVENT } from '../stage/panelContext.js';
|
|
2
|
+
import { getStickyPanelTop } from '../stage/stageDom.js';
|
|
2
3
|
import { STAGE_SCROLL_PRIORITY, getStageVisualScrollPosition, subscribeStageScrollFrame } from '../stage/scrollFrame.js';
|
|
3
|
-
import {
|
|
4
|
-
const COMPACT_BREAKPOINT = 1100;
|
|
4
|
+
import { getDockedMinimapInteractionRect, getDockedMinimapModelScale, getSpatialElementDockBreakpoint, getSpatialElementDockPresentationProgress, getSpatialElementDockTarget, getSpatialElementTabsDockBreakpoint, getSpatialElementTabsDockProgress, getSpatialElementTabsDockTarget, resolveSpatialElementDockLayout } from './spatialElementDock.js';
|
|
5
5
|
const TABS_DOCK_MORPH_DISTANCE = 24;
|
|
6
6
|
const MINIMAP_ANCHOR = '[data-spatial-element-dock-minimap-anchor]';
|
|
7
|
+
const MEDIA_RAIL = '[data-spatial-element-media-rail]';
|
|
7
8
|
const PANEL_FRAME = '[data-stage-panel-fallback]';
|
|
8
9
|
const STICKY_HEADER = '[data-spatial-element-sticky-header]';
|
|
9
10
|
const STICKY_MINIMAP_ACTION = '[data-spatial-element-sticky-minimap-action]';
|
|
@@ -15,21 +16,29 @@ const SPATIAL_ELEMENT_LAYOUT_ROOT = '.stage';
|
|
|
15
16
|
const DEPARTING_CONTENT = '[data-spatial-element-hero-panel-content], [data-spatial-element-departing-media-content]';
|
|
16
17
|
/**
|
|
17
18
|
* Pins the existing minimap without transforming it and reveals a separate HTML header.
|
|
18
|
-
* The
|
|
19
|
+
* The element summary stays bounded by its hero while the header takes over on scroll.
|
|
19
20
|
*/
|
|
20
21
|
export class SpatialElementDockController {
|
|
21
22
|
root;
|
|
23
|
+
readLayoutMetrics;
|
|
24
|
+
readTabsList;
|
|
22
25
|
minimapAnchor;
|
|
23
26
|
minimapFrame;
|
|
27
|
+
mediaRail;
|
|
24
28
|
stickyHeader;
|
|
25
29
|
stickyMinimapAction;
|
|
30
|
+
stickyAction;
|
|
26
31
|
stickyHeaderOriginalParent;
|
|
27
32
|
stickyHeaderOriginalNextSibling;
|
|
33
|
+
stickyHeaderOriginalStyle = null;
|
|
28
34
|
tabsAnchor;
|
|
29
35
|
tabsFrame;
|
|
30
36
|
sourceTabsList;
|
|
31
37
|
stickyTabs;
|
|
32
|
-
|
|
38
|
+
paneTabs;
|
|
39
|
+
tabsInPane = false;
|
|
40
|
+
tabsListOriginalParent;
|
|
41
|
+
tabsListOriginalNextSibling;
|
|
33
42
|
stickyTabsOriginalParent;
|
|
34
43
|
stickyTabsOriginalNextSibling;
|
|
35
44
|
stickyTabsOriginalStyle = null;
|
|
@@ -39,10 +48,12 @@ export class SpatialElementDockController {
|
|
|
39
48
|
minimapOriginalDockProgress = null;
|
|
40
49
|
minimapOriginalModelScale = null;
|
|
41
50
|
minimapOriginalModelTop = null;
|
|
51
|
+
minimapOriginalModelLeft = null;
|
|
42
52
|
minimapDock;
|
|
53
|
+
minimapViewportTop = 0;
|
|
54
|
+
minimapViewportLeft = 0;
|
|
43
55
|
tabsDock;
|
|
44
56
|
dockedMinimapModelScale = 1;
|
|
45
|
-
dockedMinimapModelTop = 0;
|
|
46
57
|
stickyHeaderBottom = 0;
|
|
47
58
|
breakpoint = 0;
|
|
48
59
|
presentationEndScrollY = 0;
|
|
@@ -51,8 +62,7 @@ export class SpatialElementDockController {
|
|
|
51
62
|
tabsDockProgress = -1;
|
|
52
63
|
resizeObserver;
|
|
53
64
|
animationFrame = 0;
|
|
54
|
-
|
|
55
|
-
focusTransferTimer = 0;
|
|
65
|
+
layoutDirty = false;
|
|
56
66
|
stopScrollFrames;
|
|
57
67
|
decorationOpacity = 1;
|
|
58
68
|
minimapDockProgress = 0;
|
|
@@ -64,11 +74,11 @@ export class SpatialElementDockController {
|
|
|
64
74
|
presentationProgress = 0;
|
|
65
75
|
presentationRevision = 0;
|
|
66
76
|
tabsDocked = false;
|
|
67
|
-
lastFocusedTabId;
|
|
68
|
-
lastTabFocusTime = 0;
|
|
69
77
|
layoutRoot;
|
|
70
|
-
constructor(root) {
|
|
78
|
+
constructor(root, readLayoutMetrics, readTabsList) {
|
|
71
79
|
this.root = root;
|
|
80
|
+
this.readLayoutMetrics = readLayoutMetrics;
|
|
81
|
+
this.readTabsList = readTabsList;
|
|
72
82
|
this.layoutRoot = root.closest(SPATIAL_ELEMENT_LAYOUT_ROOT) ?? undefined;
|
|
73
83
|
}
|
|
74
84
|
/** Production presentation state, published after this controller's ordered scroll update. */
|
|
@@ -90,16 +100,21 @@ export class SpatialElementDockController {
|
|
|
90
100
|
return;
|
|
91
101
|
this.minimapAnchor = this.root.querySelector(MINIMAP_ANCHOR) ?? undefined;
|
|
92
102
|
this.minimapFrame = this.minimapAnchor?.querySelector(PANEL_FRAME) ?? undefined;
|
|
103
|
+
this.mediaRail = this.minimapAnchor?.closest(MEDIA_RAIL) ?? undefined;
|
|
93
104
|
this.stickyHeader = this.root.querySelector(STICKY_HEADER) ?? undefined;
|
|
94
105
|
this.stickyMinimapAction =
|
|
95
106
|
this.stickyHeader?.querySelector(STICKY_MINIMAP_ACTION) ?? undefined;
|
|
107
|
+
this.stickyAction = this.stickyHeader?.querySelector('[data-spatial-element-dock-action]') ?? undefined;
|
|
96
108
|
this.tabsAnchor = this.root.querySelector(TABS_ANCHOR) ?? undefined;
|
|
97
109
|
this.tabsFrame = this.tabsAnchor?.querySelector(PANEL_FRAME) ?? undefined;
|
|
98
|
-
this.sourceTabsList = this.tabsFrame?.querySelector(TABS_LIST) ?? undefined;
|
|
110
|
+
this.sourceTabsList = this.readTabsList?.() ?? this.tabsFrame?.querySelector(TABS_LIST) ?? undefined;
|
|
99
111
|
this.stickyTabs = this.stickyHeader?.querySelector(STICKY_TABS) ?? undefined;
|
|
100
|
-
this.
|
|
112
|
+
this.paneTabs = this.root.querySelector('[data-spatial-detail-pane-submenu]') ?? undefined;
|
|
113
|
+
this.tabsListOriginalParent = this.sourceTabsList?.parentElement ?? undefined;
|
|
114
|
+
this.tabsListOriginalNextSibling = this.sourceTabsList?.nextSibling;
|
|
101
115
|
this.departingContent = Array.from(this.root.querySelectorAll(DEPARTING_CONTENT)).map((element) => ({
|
|
102
116
|
element,
|
|
117
|
+
frame: element.closest(PANEL_FRAME) ?? undefined,
|
|
103
118
|
clipPath: element.style.clipPath,
|
|
104
119
|
webkitClipPath: element.style.getPropertyValue('-webkit-clip-path'),
|
|
105
120
|
documentTop: 0,
|
|
@@ -109,10 +124,12 @@ export class SpatialElementDockController {
|
|
|
109
124
|
return;
|
|
110
125
|
this.mountStickyHeaderOverlay();
|
|
111
126
|
this.mountStickyTabsOverlay();
|
|
127
|
+
this.stickyHeaderOriginalStyle = this.stickyHeader.getAttribute('style');
|
|
112
128
|
this.minimapOriginalStyle = this.minimapFrame.getAttribute('style');
|
|
113
129
|
this.minimapOriginalDockProgress = this.minimapFrame.getAttribute('data-stage-minimap-dock-progress');
|
|
114
130
|
this.minimapOriginalModelScale = this.minimapFrame.getAttribute('data-stage-minimap-model-scale');
|
|
115
131
|
this.minimapOriginalModelTop = this.minimapFrame.getAttribute('data-stage-minimap-model-top');
|
|
132
|
+
this.minimapOriginalModelLeft = this.minimapFrame.getAttribute('data-stage-minimap-model-left');
|
|
116
133
|
this.stickyTabsOriginalStyle = this.stickyTabs?.getAttribute('style') ?? null;
|
|
117
134
|
this.tabsOriginalSurfaceOpacity =
|
|
118
135
|
this.tabsFrame?.style.getPropertyValue('--stage-panel-surface-opacity') ?? '';
|
|
@@ -121,17 +138,22 @@ export class SpatialElementDockController {
|
|
|
121
138
|
this.minimapModelScale = this.getMinimapModelScale();
|
|
122
139
|
this.scrollY = getStageVisualScrollPosition().scrollY;
|
|
123
140
|
this.started = true;
|
|
124
|
-
this.sourceTabsList?.addEventListener('focusin', this.handleTabFocusIn);
|
|
125
|
-
this.dockedTabsList?.addEventListener('focusin', this.handleTabFocusIn);
|
|
126
141
|
this.measure();
|
|
127
142
|
this.stopScrollFrames = subscribeStageScrollFrame(this.scrollFrame, STAGE_SCROLL_PRIORITY.dock);
|
|
128
143
|
window.addEventListener('resize', this.handleResize, { passive: true });
|
|
144
|
+
window.addEventListener(STAGE_PANEL_LAYOUT_EVENT, this.handlePanelLayout);
|
|
129
145
|
if ('ResizeObserver' in window) {
|
|
130
146
|
this.resizeObserver = new ResizeObserver(this.handleResize);
|
|
131
147
|
this.resizeObserver.observe(this.minimapAnchor);
|
|
132
148
|
this.resizeObserver.observe(this.stickyHeader);
|
|
133
149
|
if (this.tabsAnchor)
|
|
134
150
|
this.resizeObserver.observe(this.tabsAnchor);
|
|
151
|
+
for (const { frame } of this.departingContent) {
|
|
152
|
+
if (frame)
|
|
153
|
+
this.resizeObserver.observe(frame);
|
|
154
|
+
if (frame?.parentElement)
|
|
155
|
+
this.resizeObserver.observe(frame.parentElement);
|
|
156
|
+
}
|
|
135
157
|
}
|
|
136
158
|
this.setTabsActive(false);
|
|
137
159
|
this.update();
|
|
@@ -143,29 +165,33 @@ export class SpatialElementDockController {
|
|
|
143
165
|
this.stopScrollFrames?.();
|
|
144
166
|
this.stopScrollFrames = undefined;
|
|
145
167
|
window.removeEventListener('resize', this.handleResize);
|
|
168
|
+
window.removeEventListener(STAGE_PANEL_LAYOUT_EVENT, this.handlePanelLayout);
|
|
146
169
|
this.resizeObserver?.disconnect();
|
|
147
170
|
if (this.animationFrame)
|
|
148
171
|
cancelAnimationFrame(this.animationFrame);
|
|
149
|
-
if (this.focusTransferFrame)
|
|
150
|
-
cancelAnimationFrame(this.focusTransferFrame);
|
|
151
|
-
if (this.focusTransferTimer)
|
|
152
|
-
clearTimeout(this.focusTransferTimer);
|
|
153
|
-
this.sourceTabsList?.removeEventListener('focusin', this.handleTabFocusIn);
|
|
154
|
-
this.dockedTabsList?.removeEventListener('focusin', this.handleTabFocusIn);
|
|
155
172
|
this.restoreMinimap();
|
|
156
173
|
this.restoreMinimapDockProgress();
|
|
157
174
|
this.restoreMinimapModelScale();
|
|
158
175
|
this.restoreMinimapModelTop();
|
|
176
|
+
if (this.minimapOriginalModelLeft === null)
|
|
177
|
+
this.minimapFrame?.removeAttribute('data-stage-minimap-model-left');
|
|
178
|
+
else
|
|
179
|
+
this.minimapFrame?.setAttribute('data-stage-minimap-model-left', this.minimapOriginalModelLeft);
|
|
159
180
|
this.restoreHeaderPresentation();
|
|
160
181
|
this.setHeaderActive(false);
|
|
182
|
+
this.setPaneTabsActive(false);
|
|
161
183
|
this.setTabsActive(false);
|
|
162
184
|
this.restoreStickyTabs();
|
|
163
185
|
this.restoreStickyHeader();
|
|
164
186
|
this.restoreDepartingContentClipping();
|
|
187
|
+
for (const { action } of this.departingContent) {
|
|
188
|
+
if (action)
|
|
189
|
+
action.element.inert = action.inert;
|
|
190
|
+
}
|
|
165
191
|
this.root.removeAttribute('data-spatial-element-dock-active');
|
|
166
192
|
this.root.removeAttribute('data-spatial-element-tabs-dock-active');
|
|
167
193
|
this.root.style.removeProperty('--spatial-element-section-scroll-offset');
|
|
168
|
-
|
|
194
|
+
this.root.style.removeProperty('--spatial-element-summary-sticky-top');
|
|
169
195
|
}
|
|
170
196
|
scrollFrame = (frame) => {
|
|
171
197
|
this.scrollY = frame.scrollY;
|
|
@@ -176,6 +202,10 @@ export class SpatialElementDockController {
|
|
|
176
202
|
return;
|
|
177
203
|
this.animationFrame = requestAnimationFrame(() => {
|
|
178
204
|
this.animationFrame = 0;
|
|
205
|
+
if (this.layoutDirty) {
|
|
206
|
+
this.layoutDirty = false;
|
|
207
|
+
this.measure();
|
|
208
|
+
}
|
|
179
209
|
this.update();
|
|
180
210
|
});
|
|
181
211
|
};
|
|
@@ -184,14 +214,13 @@ export class SpatialElementDockController {
|
|
|
184
214
|
this.measure();
|
|
185
215
|
this.schedule();
|
|
186
216
|
};
|
|
187
|
-
|
|
188
|
-
|
|
217
|
+
handlePanelLayout = (event) => {
|
|
218
|
+
// Also ignore another route's dock during a transition. Otherwise two
|
|
219
|
+
// temporarily mounted controllers could keep remeasuring each other.
|
|
220
|
+
if (event.detail?.source === 'spatial-element-dock')
|
|
189
221
|
return;
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
return;
|
|
193
|
-
this.lastFocusedTabId = tabId;
|
|
194
|
-
this.lastTabFocusTime = performance.now();
|
|
222
|
+
this.layoutDirty = true;
|
|
223
|
+
this.schedule();
|
|
195
224
|
};
|
|
196
225
|
measure() {
|
|
197
226
|
if (!this.minimapFrame || !this.stickyHeader)
|
|
@@ -200,34 +229,65 @@ export class SpatialElementDockController {
|
|
|
200
229
|
this.restoreMinimap();
|
|
201
230
|
this.setMinimapSurfaceOpacity(decorationOpacity);
|
|
202
231
|
const minimapRect = toRect(this.minimapFrame.getBoundingClientRect());
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
232
|
+
// Thumbnail scrolling must not move the page's docking threshold. Measure
|
|
233
|
+
// the first thumbnail in its unscrolled rail while preserving outer/page scroll.
|
|
234
|
+
const minimapPageTop = minimapRect.top + (this.mediaRail?.scrollTop ?? 0) + this.scrollY;
|
|
235
|
+
const tabsWidth = this.sourceTabsList?.querySelector(TABS_LINKS)?.scrollWidth ?? 0;
|
|
236
|
+
const metrics = this.readLayoutMetrics?.() ?? {
|
|
237
|
+
width: window.innerWidth, height: window.innerHeight,
|
|
238
|
+
scrollbarWidth: Math.max(0, window.innerWidth - (document.documentElement?.clientWidth ?? window.innerWidth))
|
|
239
|
+
};
|
|
240
|
+
const geometry = resolveSpatialElementDockLayout(metrics, tabsWidth);
|
|
241
|
+
this.minimapViewportLeft = Math.max(Number.isFinite(metrics.safeArea?.left) ? metrics.safeArea.left : 0, 0);
|
|
242
|
+
// The fixed 3XL pane owns its header and submenu separately (step 10).
|
|
243
|
+
if (!geometry) {
|
|
244
|
+
this.applyState(false);
|
|
245
|
+
this.setMinimapModelTop(undefined);
|
|
246
|
+
this.minimapFrame.removeAttribute('data-stage-minimap-model-left');
|
|
247
|
+
if (!this.tabsInPane)
|
|
248
|
+
this.setTabsActive(false);
|
|
249
|
+
this.setPaneTabsActive(true);
|
|
250
|
+
this.applyMinimapPresentation(0);
|
|
251
|
+
this.applyHeaderPresentation(0);
|
|
252
|
+
this.updateActionPresentation(false);
|
|
253
|
+
this.presentationProgress = 0;
|
|
254
|
+
this.minimapDock = undefined;
|
|
255
|
+
this.tabsDock = undefined;
|
|
256
|
+
this.tabsBreakpoint = Number.POSITIVE_INFINITY;
|
|
257
|
+
this.root.style.removeProperty('--spatial-element-section-scroll-offset');
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
this.setPaneTabsActive(false);
|
|
261
|
+
const tabsRect = this.tabsFrame ? toRect(this.tabsFrame.getBoundingClientRect()) : undefined;
|
|
262
|
+
const headerRect = geometry.header;
|
|
263
|
+
applyViewportFixedRect(this.stickyHeader, headerRect);
|
|
264
|
+
this.minimapDock = geometry.minimap;
|
|
265
|
+
this.minimapViewportTop = geometry.header.top;
|
|
266
|
+
this.dockedMinimapModelScale = getDockedMinimapModelScale(this.minimapDock, headerRect, this.getConfiguredDockedModelScale() ?? 1);
|
|
210
267
|
if (this.stickyMinimapAction) {
|
|
211
268
|
applyViewportFixedRect(this.stickyMinimapAction, getDockedMinimapInteractionRect(this.minimapDock, headerRect, this.dockedMinimapModelScale));
|
|
212
269
|
}
|
|
213
270
|
this.stickyHeaderBottom = headerRect.top + headerRect.height;
|
|
271
|
+
this.root.style.setProperty('--spatial-element-summary-sticky-top', `${this.stickyHeaderBottom + 10}px`);
|
|
214
272
|
this.measureDepartingContent();
|
|
215
|
-
this.breakpoint = getSpatialElementDockBreakpoint(
|
|
216
|
-
this.presentationEndScrollY = Math.max(
|
|
217
|
-
|
|
218
|
-
this.
|
|
219
|
-
(this.
|
|
220
|
-
if (this.tabsFrame && this.stickyTabs) {
|
|
221
|
-
const tabsRect = toRect(this.tabsFrame.getBoundingClientRect());
|
|
273
|
+
this.breakpoint = getSpatialElementDockBreakpoint(minimapPageTop, this.minimapDock.top);
|
|
274
|
+
this.presentationEndScrollY = Math.max(minimapPageTop + minimapRect.height, 0);
|
|
275
|
+
this.stickyHeader.style.setProperty('--spatial-element-sticky-minimap-reserve', `${geometry.titleReserve}px`);
|
|
276
|
+
this.root.style.setProperty('--spatial-element-section-scroll-offset', `${geometry.sectionOffset}px`);
|
|
277
|
+
if (this.tabsFrame && this.stickyTabs && tabsRect && geometry.submenu) {
|
|
222
278
|
const panelRadius = Number.parseFloat(getComputedStyle(this.tabsFrame).getPropertyValue('--stage-panel-radius'));
|
|
223
279
|
if (Number.isFinite(panelRadius))
|
|
224
280
|
this.tabsPanelRadius = Math.max(panelRadius, 0);
|
|
225
281
|
this.tabsDockProgress = -1;
|
|
226
|
-
this.tabsDock =
|
|
282
|
+
this.tabsDock = geometry.submenu;
|
|
227
283
|
this.tabsBreakpoint = getSpatialElementTabsDockBreakpoint(tabsRect.top + this.scrollY, this.tabsDock.top);
|
|
228
284
|
applyViewportFixedRect(this.stickyTabs, this.tabsDock);
|
|
229
285
|
this.stickyTabs.style.setProperty('--spatial-element-tabs-dock-bottom-radius', `${this.tabsPanelRadius}px`);
|
|
230
|
-
|
|
286
|
+
}
|
|
287
|
+
else {
|
|
288
|
+
this.setTabsActive(false);
|
|
289
|
+
this.tabsDock = undefined;
|
|
290
|
+
this.tabsBreakpoint = Number.POSITIVE_INFINITY;
|
|
231
291
|
}
|
|
232
292
|
}
|
|
233
293
|
update() {
|
|
@@ -241,6 +301,7 @@ export class SpatialElementDockController {
|
|
|
241
301
|
this.applyState(docked);
|
|
242
302
|
this.applyTabsPresentation(tabsDocked);
|
|
243
303
|
this.applyTabsState(tabsDocked);
|
|
304
|
+
this.updateActionPresentation(docked);
|
|
244
305
|
this.presentationProgress = presentationProgress;
|
|
245
306
|
this.presentationRevision++;
|
|
246
307
|
}
|
|
@@ -255,6 +316,11 @@ export class SpatialElementDockController {
|
|
|
255
316
|
applyFixedRect(this.minimapFrame, this.minimapDock);
|
|
256
317
|
this.minimapDockApplied = true;
|
|
257
318
|
}
|
|
319
|
+
// The virtual document is a transformed containing block. Counter only
|
|
320
|
+
// this dock's scroll offset instead of invalidating inherited styles
|
|
321
|
+
// across the complete page with a per-frame CSS custom property.
|
|
322
|
+
const compensation = this.layoutRoot?.classList.contains('stage-virtual-scroll-active') ? this.scrollY : 0;
|
|
323
|
+
this.minimapFrame.style.top = `${compensation + this.minimapDock.top}px`;
|
|
258
324
|
}
|
|
259
325
|
else if (changed || this.minimapDockApplied) {
|
|
260
326
|
const decorationOpacity = this.decorationOpacity;
|
|
@@ -265,17 +331,21 @@ export class SpatialElementDockController {
|
|
|
265
331
|
this.setHeaderActive(docked);
|
|
266
332
|
this.root.toggleAttribute('data-spatial-element-dock-active', docked);
|
|
267
333
|
}
|
|
268
|
-
|
|
334
|
+
// The fit square can extend above the viewport for large layouts. The live
|
|
335
|
+
// model follows this top edge through the same continuous dock morph,
|
|
336
|
+
// including its hover and sensor pose, instead of being clipped by it.
|
|
337
|
+
this.setMinimapModelTop(this.minimapViewportTop);
|
|
338
|
+
this.minimapFrame.setAttribute('data-stage-minimap-model-left', this.minimapViewportLeft.toFixed(3));
|
|
269
339
|
if (docked)
|
|
270
340
|
this.updateDepartingContentClipping();
|
|
271
341
|
else if (changed)
|
|
272
342
|
this.restoreDepartingContentClipping();
|
|
273
343
|
if (changed || dockLayoutChanged) {
|
|
274
|
-
window.dispatchEvent(new
|
|
344
|
+
window.dispatchEvent(new CustomEvent(STAGE_PANEL_LAYOUT_EVENT, { detail: { source: 'spatial-element-dock' } }));
|
|
275
345
|
}
|
|
276
346
|
}
|
|
277
347
|
applyTabsState(docked) {
|
|
278
|
-
if (!this.stickyTabs || !this.sourceTabsList
|
|
348
|
+
if (!this.stickyTabs || !this.sourceTabsList)
|
|
279
349
|
return;
|
|
280
350
|
if (docked === this.tabsDocked)
|
|
281
351
|
return;
|
|
@@ -426,44 +496,79 @@ export class SpatialElementDockController {
|
|
|
426
496
|
this.stickyHeader.inert = !active;
|
|
427
497
|
this.stickyHeader.setAttribute('aria-hidden', String(!active));
|
|
428
498
|
}
|
|
499
|
+
moveTabsTo(parent, next = null) {
|
|
500
|
+
const list = this.sourceTabsList;
|
|
501
|
+
if (!list || list.parentElement === parent || list.contains(parent))
|
|
502
|
+
return;
|
|
503
|
+
const focused = document.activeElement instanceof HTMLElement && list.contains(document.activeElement)
|
|
504
|
+
? document.activeElement : undefined;
|
|
505
|
+
const links = list.querySelector(TABS_LINKS);
|
|
506
|
+
const scrollLeft = links?.scrollLeft ?? 0;
|
|
507
|
+
// Reuse the live Svelte-owned navigation, including focus and horizontal
|
|
508
|
+
// scroll. There is never a second active list or a cloned control.
|
|
509
|
+
// Svelte can disconnect the original slot before this controller's cleanup.
|
|
510
|
+
// Atomic moves require matching connected states; an ordinary DOM move is
|
|
511
|
+
// necessary when returning a live portal to that detached owner.
|
|
512
|
+
const reference = next?.parentNode === parent ? next : null;
|
|
513
|
+
if (typeof parent.moveBefore === 'function' && parent.ownerDocument === list.ownerDocument &&
|
|
514
|
+
parent.isConnected === list.isConnected)
|
|
515
|
+
parent.moveBefore(list, reference);
|
|
516
|
+
else
|
|
517
|
+
parent.insertBefore(list, reference);
|
|
518
|
+
if (links)
|
|
519
|
+
links.scrollLeft = scrollLeft;
|
|
520
|
+
if (focused?.isConnected && document.activeElement !== focused)
|
|
521
|
+
focused.focus({ preventScroll: true });
|
|
522
|
+
}
|
|
523
|
+
restoreTabsList() {
|
|
524
|
+
if (!this.tabsListOriginalParent)
|
|
525
|
+
return;
|
|
526
|
+
const next = this.tabsListOriginalNextSibling?.parentNode === this.tabsListOriginalParent
|
|
527
|
+
? this.tabsListOriginalNextSibling : null;
|
|
528
|
+
this.moveTabsTo(this.tabsListOriginalParent, next);
|
|
529
|
+
}
|
|
429
530
|
setTabsActive(active) {
|
|
430
|
-
if (!this.stickyTabs || !this.sourceTabsList || !this.
|
|
431
|
-
return;
|
|
432
|
-
const outgoingList = active ? this.sourceTabsList : this.dockedTabsList;
|
|
433
|
-
const incomingList = active ? this.dockedTabsList : this.sourceTabsList;
|
|
434
|
-
this.syncTabScrollPosition(outgoingList, incomingList);
|
|
435
|
-
const focusedTabId = document.activeElement instanceof HTMLElement && outgoingList.contains(document.activeElement)
|
|
436
|
-
? document.activeElement.closest('[data-spatial-element-tab-id]')?.dataset.spatialElementTabId
|
|
437
|
-
: performance.now() - this.lastTabFocusTime <= 500
|
|
438
|
-
? this.lastFocusedTabId
|
|
439
|
-
: undefined;
|
|
440
|
-
this.tabsDocked = active;
|
|
441
|
-
this.sourceTabsList.inert = active;
|
|
442
|
-
this.sourceTabsList.setAttribute('aria-hidden', String(active));
|
|
443
|
-
this.sourceTabsList.toggleAttribute('data-spatial-element-tab-list-hidden', active);
|
|
531
|
+
if (!this.stickyTabs || !this.sourceTabsList || !this.tabsListOriginalParent)
|
|
532
|
+
return;
|
|
444
533
|
this.stickyTabs.inert = !active;
|
|
445
534
|
this.stickyTabs.setAttribute('aria-hidden', String(!active));
|
|
446
535
|
this.stickyTabs.toggleAttribute('data-active', active);
|
|
447
536
|
this.setSourceTabsSurfaceVisible(!active);
|
|
448
|
-
if (
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
537
|
+
if (active)
|
|
538
|
+
this.moveTabsTo(this.stickyTabs);
|
|
539
|
+
else
|
|
540
|
+
this.restoreTabsList();
|
|
541
|
+
this.tabsDocked = active;
|
|
542
|
+
this.sourceTabsList.dataset.spatialElementTabList = active ? 'docked' : 'panel';
|
|
543
|
+
}
|
|
544
|
+
setPaneTabsActive(active) {
|
|
545
|
+
if (!this.paneTabs || !this.sourceTabsList)
|
|
546
|
+
return;
|
|
547
|
+
if (active) {
|
|
548
|
+
this.paneTabs.inert = false;
|
|
549
|
+
this.paneTabs.setAttribute('aria-hidden', 'false');
|
|
550
|
+
this.paneTabs.toggleAttribute('data-active', true);
|
|
551
|
+
this.moveTabsTo(this.paneTabs);
|
|
552
|
+
this.sourceTabsList.dataset.spatialElementTabList = 'docked';
|
|
553
|
+
const links = this.sourceTabsList.querySelector(TABS_LINKS);
|
|
554
|
+
if (links?.scrollWidth)
|
|
555
|
+
this.paneTabs.style.setProperty('--spatial-detail-submenu-natural-width', `${links.scrollWidth}px`);
|
|
556
|
+
}
|
|
557
|
+
else if (this.tabsInPane) {
|
|
558
|
+
this.root.removeAttribute('data-spatial-detail-pane-tabs');
|
|
559
|
+
this.setSourceTabsSurfaceVisible(true);
|
|
560
|
+
this.restoreTabsList();
|
|
561
|
+
this.sourceTabsList.dataset.spatialElementTabList = 'panel';
|
|
562
|
+
this.paneTabs.inert = true;
|
|
563
|
+
this.paneTabs.setAttribute('aria-hidden', 'true');
|
|
564
|
+
this.paneTabs.removeAttribute('data-active');
|
|
565
|
+
}
|
|
566
|
+
this.tabsInPane = active;
|
|
567
|
+
this.root.toggleAttribute('data-spatial-detail-pane-tabs', active);
|
|
568
|
+
if (active)
|
|
569
|
+
this.setSourceTabsSurfaceVisible(false);
|
|
570
|
+
else if (!this.tabsDocked)
|
|
571
|
+
this.setSourceTabsSurfaceVisible(true);
|
|
467
572
|
}
|
|
468
573
|
setSourceTabsSurfaceVisible(visible) {
|
|
469
574
|
if (!this.tabsFrame)
|
|
@@ -479,18 +584,6 @@ export class SpatialElementDockController {
|
|
|
479
584
|
this.tabsFrame.style.removeProperty(property);
|
|
480
585
|
window.dispatchEvent(new Event(STAGE_PANEL_VISUAL_EVENT));
|
|
481
586
|
}
|
|
482
|
-
syncTabScrollPosition(outgoingList, incomingList) {
|
|
483
|
-
const outgoingLinks = outgoingList.querySelector(TABS_LINKS);
|
|
484
|
-
const incomingLinks = incomingList.querySelector(TABS_LINKS);
|
|
485
|
-
if (!outgoingLinks || !incomingLinks)
|
|
486
|
-
return;
|
|
487
|
-
const outgoingRange = Math.max(outgoingLinks.scrollWidth - outgoingLinks.clientWidth, 0);
|
|
488
|
-
const incomingRange = Math.max(incomingLinks.scrollWidth - incomingLinks.clientWidth, 0);
|
|
489
|
-
incomingLinks.scrollLeft =
|
|
490
|
-
outgoingRange > 0
|
|
491
|
-
? (outgoingLinks.scrollLeft / outgoingRange) * incomingRange
|
|
492
|
-
: outgoingLinks.scrollLeft;
|
|
493
|
-
}
|
|
494
587
|
mountStickyHeaderOverlay() {
|
|
495
588
|
if (!this.stickyHeader)
|
|
496
589
|
return;
|
|
@@ -521,6 +614,10 @@ export class SpatialElementDockController {
|
|
|
521
614
|
const parent = this.stickyHeaderOriginalParent;
|
|
522
615
|
const sibling = this.stickyHeaderOriginalNextSibling;
|
|
523
616
|
this.stickyHeader.removeAttribute('data-stage-fixed-overlay');
|
|
617
|
+
if (this.stickyHeaderOriginalStyle === null)
|
|
618
|
+
this.stickyHeader.removeAttribute('style');
|
|
619
|
+
else
|
|
620
|
+
this.stickyHeader.setAttribute('style', this.stickyHeaderOriginalStyle);
|
|
524
621
|
if (sibling?.parentNode === parent)
|
|
525
622
|
parent.insertBefore(this.stickyHeader, sibling);
|
|
526
623
|
else
|
|
@@ -551,11 +648,49 @@ export class SpatialElementDockController {
|
|
|
551
648
|
const rect = state.element.getBoundingClientRect();
|
|
552
649
|
state.documentTop = rect.top + this.scrollY;
|
|
553
650
|
state.height = rect.height;
|
|
651
|
+
const action = state.element.querySelector('[data-catalog-rich-shared="primary-action"]');
|
|
652
|
+
if (action)
|
|
653
|
+
state.action = { element: action, bottom: action.getBoundingClientRect().bottom - rect.top,
|
|
654
|
+
inert: state.action?.inert ?? action.inert };
|
|
655
|
+
state.sticky = undefined;
|
|
656
|
+
if (state.frame?.parentElement) {
|
|
657
|
+
const style = getComputedStyle(state.frame);
|
|
658
|
+
if (style.position !== 'sticky')
|
|
659
|
+
continue;
|
|
660
|
+
const frameRect = state.frame.getBoundingClientRect();
|
|
661
|
+
state.sticky = {
|
|
662
|
+
documentTop: frameRect.top + this.scrollY,
|
|
663
|
+
height: frameRect.height,
|
|
664
|
+
boundaryBottom: state.frame.parentElement.getBoundingClientRect().bottom + this.scrollY,
|
|
665
|
+
inset: Number.parseFloat(style.top) || 0,
|
|
666
|
+
contentInset: Number.parseFloat(style.getPropertyValue('--stage-panel-content-inset')) || 0
|
|
667
|
+
};
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
contentViewportTop(state) {
|
|
672
|
+
const sticky = state.sticky;
|
|
673
|
+
return sticky
|
|
674
|
+
? getStickyPanelTop(sticky.documentTop, sticky.height, sticky.boundaryBottom, sticky.inset, this.scrollY) + sticky.contentInset
|
|
675
|
+
: state.documentTop - this.scrollY;
|
|
676
|
+
}
|
|
677
|
+
updateActionPresentation(docked) {
|
|
678
|
+
const summary = this.departingContent.find(state => state.action);
|
|
679
|
+
const hiddenAboveDock = summary?.action
|
|
680
|
+
? this.contentViewportTop(summary) + summary.action.bottom <= this.stickyHeaderBottom : true;
|
|
681
|
+
const visible = docked && hiddenAboveDock;
|
|
682
|
+
this.stickyHeader?.toggleAttribute('data-action-active', visible);
|
|
683
|
+
if (this.stickyAction && this.stickyAction.inert === visible)
|
|
684
|
+
this.stickyAction.inert = !visible;
|
|
685
|
+
if (summary?.action) {
|
|
686
|
+
const inert = summary.action.inert || visible;
|
|
687
|
+
if (summary.action.element.inert !== inert)
|
|
688
|
+
summary.action.element.inert = inert;
|
|
554
689
|
}
|
|
555
690
|
}
|
|
556
691
|
updateDepartingContentClipping() {
|
|
557
692
|
for (const state of this.departingContent) {
|
|
558
|
-
const viewportTop =
|
|
693
|
+
const viewportTop = this.contentViewportTop(state);
|
|
559
694
|
const inset = Math.min(Math.max(this.stickyHeaderBottom - viewportTop, 0), state.height);
|
|
560
695
|
const clipPath = `inset(${inset.toFixed(2)}px 0 0 0)`;
|
|
561
696
|
if (state.appliedClipPath === clipPath)
|
|
@@ -599,9 +734,6 @@ function formatPresentationProgress(progress) {
|
|
|
599
734
|
function applyFixedRect(frame, rect) {
|
|
600
735
|
frame.style.position = 'fixed';
|
|
601
736
|
frame.style.left = `${rect.left}px`;
|
|
602
|
-
// A transformed virtual document is the containing block for fixed descendants.
|
|
603
|
-
// Counter the document transform so the dock remains viewport-aligned.
|
|
604
|
-
frame.style.top = `calc(var(--virtual-scroll-y, 0px) + ${rect.top}px)`;
|
|
605
737
|
frame.style.width = `${rect.width}px`;
|
|
606
738
|
frame.style.height = `${rect.height}px`;
|
|
607
739
|
frame.style.minHeight = `${rect.height}px`;
|