@spatial-elements/core 1.0.0-beta.7 → 1.0.0-beta.8
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/dist/catalog/CarouselDeviceCamera.d.ts +8 -0
- package/dist/catalog/CarouselDeviceCamera.d.ts.map +1 -1
- package/dist/catalog/CarouselDeviceCamera.js +15 -1
- package/dist/catalog/CarouselDeviceCamera.js.map +1 -1
- package/dist/catalog/CarouselGlassCompositor.d.ts +8 -2
- package/dist/catalog/CarouselGlassCompositor.d.ts.map +1 -1
- package/dist/catalog/CarouselGlassCompositor.js +69 -12
- package/dist/catalog/CarouselGlassCompositor.js.map +1 -1
- package/dist/catalog/CarouselGround.d.ts +22 -1
- package/dist/catalog/CarouselGround.d.ts.map +1 -1
- package/dist/catalog/CarouselGround.js +185 -24
- package/dist/catalog/CarouselGround.js.map +1 -1
- package/dist/catalog/CatalogDepthBlur.d.ts +20 -1
- package/dist/catalog/CatalogDepthBlur.d.ts.map +1 -1
- package/dist/catalog/CatalogDepthBlur.js +126 -23
- package/dist/catalog/CatalogDepthBlur.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 +39 -7
- package/dist/catalog/CatalogGeometryFade.js.map +1 -1
- package/dist/catalog/CatalogModelOutline.d.ts +3 -1
- package/dist/catalog/CatalogModelOutline.d.ts.map +1 -1
- package/dist/catalog/CatalogModelOutline.js +11 -2
- package/dist/catalog/CatalogModelOutline.js.map +1 -1
- package/dist/catalog/CatalogPreparation.d.ts.map +1 -1
- package/dist/catalog/CatalogPreparation.js +8 -6
- package/dist/catalog/CatalogPreparation.js.map +1 -1
- package/dist/catalog/CatalogSpatialElementLayer.d.ts +129 -3
- package/dist/catalog/CatalogSpatialElementLayer.d.ts.map +1 -1
- package/dist/catalog/CatalogSpatialElementLayer.js +408 -33
- package/dist/catalog/CatalogSpatialElementLayer.js.map +1 -1
- package/dist/catalog/CatalogTransition.d.ts +4 -0
- package/dist/catalog/CatalogTransition.d.ts.map +1 -1
- package/dist/catalog/CatalogTransition.js +91 -22
- 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/SpatialPageRegistry.d.ts +1 -0
- package/dist/catalog/SpatialPageRegistry.d.ts.map +1 -1
- package/dist/catalog/SpatialPageRegistry.js.map +1 -1
- 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/cardProjection.d.ts +31 -0
- package/dist/catalog/cardProjection.d.ts.map +1 -1
- package/dist/catalog/cardProjection.js +63 -4
- package/dist/catalog/cardProjection.js.map +1 -1
- 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/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/catalogJourney.d.ts +2 -0
- package/dist/catalog/catalogJourney.d.ts.map +1 -1
- package/dist/catalog/catalogJourney.js.map +1 -1
- package/dist/catalog/catalogPose.d.ts +18 -0
- package/dist/catalog/catalogPose.d.ts.map +1 -1
- package/dist/catalog/catalogPose.js +26 -5
- package/dist/catalog/catalogPose.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/listDeviceOrientation.d.ts +2 -0
- package/dist/catalog/listDeviceOrientation.d.ts.map +1 -1
- package/dist/catalog/listDeviceOrientation.js +18 -1
- package/dist/catalog/listDeviceOrientation.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 +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -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 +24 -0
- package/dist/spatial-element/SectionSurfaceRegistry.d.ts.map +1 -0
- package/dist/spatial-element/SectionSurfaceRegistry.js +48 -0
- package/dist/spatial-element/SectionSurfaceRegistry.js.map +1 -0
- package/dist/spatial-element/SpatialElementDockController.d.ts +19 -9
- package/dist/spatial-element/SpatialElementDockController.d.ts.map +1 -1
- package/dist/spatial-element/SpatialElementDockController.js +189 -93
- 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 +245 -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 +53 -0
- package/dist/spatial-element/responsiveLayout.d.ts +1389 -0
- package/dist/spatial-element/responsiveLayout.d.ts.map +1 -0
- package/dist/spatial-element/responsiveLayout.js +265 -0
- package/dist/spatial-element/responsiveLayout.js.map +1 -0
- package/dist/spatial-element/sectionBackground.d.ts +29 -0
- package/dist/spatial-element/sectionBackground.d.ts.map +1 -0
- package/dist/spatial-element/sectionBackground.js +66 -0
- package/dist/spatial-element/sectionBackground.js.map +1 -0
- package/dist/spatial-element/spatialElement.d.ts +1 -0
- package/dist/spatial-element/spatialElement.d.ts.map +1 -1
- package/dist/spatial-element/spatialElement.js +1 -0
- 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/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/spatialTheme.d.ts +12 -1
- package/dist/spatial-element/spatialTheme.d.ts.map +1 -1
- package/dist/spatial-element/spatialTheme.js +30 -1
- package/dist/spatial-element/spatialTheme.js.map +1 -1
- package/dist/spatial-element/types.d.ts +50 -2
- 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/LiquidGlassPanel.d.ts +3 -0
- package/dist/stage/LiquidGlassPanel.d.ts.map +1 -1
- package/dist/stage/LiquidGlassPanel.js +27 -2
- package/dist/stage/LiquidGlassPanel.js.map +1 -1
- package/dist/stage/MinimapController.d.ts.map +1 -1
- package/dist/stage/MinimapController.js +28 -47
- package/dist/stage/MinimapController.js.map +1 -1
- package/dist/stage/PageBindingController.d.ts +4 -0
- package/dist/stage/PageBindingController.d.ts.map +1 -1
- package/dist/stage/PageBindingController.js +12 -4
- package/dist/stage/PageBindingController.js.map +1 -1
- package/dist/stage/PanelPresentationController.d.ts +17 -0
- package/dist/stage/PanelPresentationController.d.ts.map +1 -1
- package/dist/stage/PanelPresentationController.js +69 -13
- package/dist/stage/PanelPresentationController.js.map +1 -1
- package/dist/stage/SpatialElementInteractionController.d.ts +7 -0
- package/dist/stage/SpatialElementInteractionController.d.ts.map +1 -1
- package/dist/stage/SpatialElementInteractionController.js +9 -0
- 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 +167 -5
- package/dist/stage/StageExperience.d.ts.map +1 -1
- package/dist/stage/StageExperience.js +384 -58
- package/dist/stage/StageExperience.js.map +1 -1
- package/dist/stage/StageRenderPipeline.d.ts +76 -1
- package/dist/stage/StageRenderPipeline.d.ts.map +1 -1
- package/dist/stage/StageRenderPipeline.js +421 -46
- 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 +57 -4
- package/dist/stage/VirtualScrollController.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/MinimapState.d.ts +3 -8
- package/dist/stage/minimap/MinimapState.d.ts.map +1 -1
- package/dist/stage/minimap/MinimapState.js.map +1 -1
- package/dist/stage/panelContext.d.ts +7 -0
- package/dist/stage/panelContext.d.ts.map +1 -1
- package/dist/stage/panelContext.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/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/stageDom.d.ts.map +1 -1
- package/dist/stage/stageDom.js +6 -1
- package/dist/stage/stageDom.js.map +1 -1
- package/dist/stage/stageMath.d.ts +3 -3
- package/dist/stage/stageMath.d.ts.map +1 -1
- package/dist/stage/stageMath.js +11 -10
- package/dist/stage/stageMath.js.map +1 -1
- package/dist/stage/stageTypes.d.ts +7 -1
- package/dist/stage/stageTypes.d.ts.map +1 -1
- package/dist/stage/stageTypes.js.map +1 -1
- package/dist/stage/stageVisualTest.d.ts +19 -0
- package/dist/stage/stageVisualTest.d.ts.map +1 -1
- package/dist/stage/stageVisualTest.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { STAGE_PANEL_LAYOUT_EVENT, STAGE_PANEL_VISUAL_EVENT } from '../stage/panelContext.js';
|
|
2
2
|
import { getStickyPanelTop } from '../stage/stageDom.js';
|
|
3
3
|
import { STAGE_SCROLL_PRIORITY, getStageVisualScrollPosition, subscribeStageScrollFrame } from '../stage/scrollFrame.js';
|
|
4
|
-
import {
|
|
5
|
-
const COMPACT_BREAKPOINT = 1100;
|
|
4
|
+
import { getDockedMinimapInteractionRect, getDockedMinimapModelScale, getSpatialElementDockBreakpoint, getSpatialElementDockPresentationProgress, getSpatialElementDockTarget, getSpatialElementTabsDockBreakpoint, getSpatialElementTabsDockProgress, getSpatialElementTabsDockTarget, resolveSpatialElementDockLayout } from './spatialElementDock.js';
|
|
6
5
|
const TABS_DOCK_MORPH_DISTANCE = 24;
|
|
7
6
|
const MINIMAP_ANCHOR = '[data-spatial-element-dock-minimap-anchor]';
|
|
8
7
|
const PANEL_FRAME = '[data-stage-panel-fallback]';
|
|
@@ -20,17 +19,23 @@ const DEPARTING_CONTENT = '[data-spatial-element-hero-panel-content], [data-spat
|
|
|
20
19
|
*/
|
|
21
20
|
export class SpatialElementDockController {
|
|
22
21
|
root;
|
|
22
|
+
readLayoutMetrics;
|
|
23
23
|
minimapAnchor;
|
|
24
24
|
minimapFrame;
|
|
25
25
|
stickyHeader;
|
|
26
26
|
stickyMinimapAction;
|
|
27
|
+
stickyAction;
|
|
27
28
|
stickyHeaderOriginalParent;
|
|
28
29
|
stickyHeaderOriginalNextSibling;
|
|
30
|
+
stickyHeaderOriginalStyle = null;
|
|
29
31
|
tabsAnchor;
|
|
30
32
|
tabsFrame;
|
|
31
33
|
sourceTabsList;
|
|
32
34
|
stickyTabs;
|
|
33
|
-
|
|
35
|
+
paneTabs;
|
|
36
|
+
tabsInPane = false;
|
|
37
|
+
tabsListOriginalParent;
|
|
38
|
+
tabsListOriginalNextSibling;
|
|
34
39
|
stickyTabsOriginalParent;
|
|
35
40
|
stickyTabsOriginalNextSibling;
|
|
36
41
|
stickyTabsOriginalStyle = null;
|
|
@@ -40,10 +45,12 @@ export class SpatialElementDockController {
|
|
|
40
45
|
minimapOriginalDockProgress = null;
|
|
41
46
|
minimapOriginalModelScale = null;
|
|
42
47
|
minimapOriginalModelTop = null;
|
|
48
|
+
minimapOriginalModelLeft = null;
|
|
43
49
|
minimapDock;
|
|
50
|
+
minimapViewportTop = 0;
|
|
51
|
+
minimapViewportLeft = 0;
|
|
44
52
|
tabsDock;
|
|
45
53
|
dockedMinimapModelScale = 1;
|
|
46
|
-
dockedMinimapModelTop = 0;
|
|
47
54
|
stickyHeaderBottom = 0;
|
|
48
55
|
breakpoint = 0;
|
|
49
56
|
presentationEndScrollY = 0;
|
|
@@ -52,8 +59,7 @@ export class SpatialElementDockController {
|
|
|
52
59
|
tabsDockProgress = -1;
|
|
53
60
|
resizeObserver;
|
|
54
61
|
animationFrame = 0;
|
|
55
|
-
|
|
56
|
-
focusTransferTimer = 0;
|
|
62
|
+
layoutDirty = false;
|
|
57
63
|
stopScrollFrames;
|
|
58
64
|
decorationOpacity = 1;
|
|
59
65
|
minimapDockProgress = 0;
|
|
@@ -65,11 +71,10 @@ export class SpatialElementDockController {
|
|
|
65
71
|
presentationProgress = 0;
|
|
66
72
|
presentationRevision = 0;
|
|
67
73
|
tabsDocked = false;
|
|
68
|
-
lastFocusedTabId;
|
|
69
|
-
lastTabFocusTime = 0;
|
|
70
74
|
layoutRoot;
|
|
71
|
-
constructor(root) {
|
|
75
|
+
constructor(root, readLayoutMetrics) {
|
|
72
76
|
this.root = root;
|
|
77
|
+
this.readLayoutMetrics = readLayoutMetrics;
|
|
73
78
|
this.layoutRoot = root.closest(SPATIAL_ELEMENT_LAYOUT_ROOT) ?? undefined;
|
|
74
79
|
}
|
|
75
80
|
/** Production presentation state, published after this controller's ordered scroll update. */
|
|
@@ -94,11 +99,14 @@ export class SpatialElementDockController {
|
|
|
94
99
|
this.stickyHeader = this.root.querySelector(STICKY_HEADER) ?? undefined;
|
|
95
100
|
this.stickyMinimapAction =
|
|
96
101
|
this.stickyHeader?.querySelector(STICKY_MINIMAP_ACTION) ?? undefined;
|
|
102
|
+
this.stickyAction = this.stickyHeader?.querySelector('[data-spatial-element-dock-action]') ?? undefined;
|
|
97
103
|
this.tabsAnchor = this.root.querySelector(TABS_ANCHOR) ?? undefined;
|
|
98
104
|
this.tabsFrame = this.tabsAnchor?.querySelector(PANEL_FRAME) ?? undefined;
|
|
99
105
|
this.sourceTabsList = this.tabsFrame?.querySelector(TABS_LIST) ?? undefined;
|
|
100
106
|
this.stickyTabs = this.stickyHeader?.querySelector(STICKY_TABS) ?? undefined;
|
|
101
|
-
this.
|
|
107
|
+
this.paneTabs = this.root.querySelector('[data-spatial-detail-pane-submenu]') ?? undefined;
|
|
108
|
+
this.tabsListOriginalParent = this.sourceTabsList?.parentElement ?? undefined;
|
|
109
|
+
this.tabsListOriginalNextSibling = this.sourceTabsList?.nextSibling;
|
|
102
110
|
this.departingContent = Array.from(this.root.querySelectorAll(DEPARTING_CONTENT)).map((element) => ({
|
|
103
111
|
element,
|
|
104
112
|
frame: element.closest(PANEL_FRAME) ?? undefined,
|
|
@@ -111,10 +119,12 @@ export class SpatialElementDockController {
|
|
|
111
119
|
return;
|
|
112
120
|
this.mountStickyHeaderOverlay();
|
|
113
121
|
this.mountStickyTabsOverlay();
|
|
122
|
+
this.stickyHeaderOriginalStyle = this.stickyHeader.getAttribute('style');
|
|
114
123
|
this.minimapOriginalStyle = this.minimapFrame.getAttribute('style');
|
|
115
124
|
this.minimapOriginalDockProgress = this.minimapFrame.getAttribute('data-stage-minimap-dock-progress');
|
|
116
125
|
this.minimapOriginalModelScale = this.minimapFrame.getAttribute('data-stage-minimap-model-scale');
|
|
117
126
|
this.minimapOriginalModelTop = this.minimapFrame.getAttribute('data-stage-minimap-model-top');
|
|
127
|
+
this.minimapOriginalModelLeft = this.minimapFrame.getAttribute('data-stage-minimap-model-left');
|
|
118
128
|
this.stickyTabsOriginalStyle = this.stickyTabs?.getAttribute('style') ?? null;
|
|
119
129
|
this.tabsOriginalSurfaceOpacity =
|
|
120
130
|
this.tabsFrame?.style.getPropertyValue('--stage-panel-surface-opacity') ?? '';
|
|
@@ -123,11 +133,10 @@ export class SpatialElementDockController {
|
|
|
123
133
|
this.minimapModelScale = this.getMinimapModelScale();
|
|
124
134
|
this.scrollY = getStageVisualScrollPosition().scrollY;
|
|
125
135
|
this.started = true;
|
|
126
|
-
this.sourceTabsList?.addEventListener('focusin', this.handleTabFocusIn);
|
|
127
|
-
this.dockedTabsList?.addEventListener('focusin', this.handleTabFocusIn);
|
|
128
136
|
this.measure();
|
|
129
137
|
this.stopScrollFrames = subscribeStageScrollFrame(this.scrollFrame, STAGE_SCROLL_PRIORITY.dock);
|
|
130
138
|
window.addEventListener('resize', this.handleResize, { passive: true });
|
|
139
|
+
window.addEventListener(STAGE_PANEL_LAYOUT_EVENT, this.handlePanelLayout);
|
|
131
140
|
if ('ResizeObserver' in window) {
|
|
132
141
|
this.resizeObserver = new ResizeObserver(this.handleResize);
|
|
133
142
|
this.resizeObserver.observe(this.minimapAnchor);
|
|
@@ -151,30 +160,33 @@ export class SpatialElementDockController {
|
|
|
151
160
|
this.stopScrollFrames?.();
|
|
152
161
|
this.stopScrollFrames = undefined;
|
|
153
162
|
window.removeEventListener('resize', this.handleResize);
|
|
163
|
+
window.removeEventListener(STAGE_PANEL_LAYOUT_EVENT, this.handlePanelLayout);
|
|
154
164
|
this.resizeObserver?.disconnect();
|
|
155
165
|
if (this.animationFrame)
|
|
156
166
|
cancelAnimationFrame(this.animationFrame);
|
|
157
|
-
if (this.focusTransferFrame)
|
|
158
|
-
cancelAnimationFrame(this.focusTransferFrame);
|
|
159
|
-
if (this.focusTransferTimer)
|
|
160
|
-
clearTimeout(this.focusTransferTimer);
|
|
161
|
-
this.sourceTabsList?.removeEventListener('focusin', this.handleTabFocusIn);
|
|
162
|
-
this.dockedTabsList?.removeEventListener('focusin', this.handleTabFocusIn);
|
|
163
167
|
this.restoreMinimap();
|
|
164
168
|
this.restoreMinimapDockProgress();
|
|
165
169
|
this.restoreMinimapModelScale();
|
|
166
170
|
this.restoreMinimapModelTop();
|
|
171
|
+
if (this.minimapOriginalModelLeft === null)
|
|
172
|
+
this.minimapFrame?.removeAttribute('data-stage-minimap-model-left');
|
|
173
|
+
else
|
|
174
|
+
this.minimapFrame?.setAttribute('data-stage-minimap-model-left', this.minimapOriginalModelLeft);
|
|
167
175
|
this.restoreHeaderPresentation();
|
|
168
176
|
this.setHeaderActive(false);
|
|
177
|
+
this.setPaneTabsActive(false);
|
|
169
178
|
this.setTabsActive(false);
|
|
170
179
|
this.restoreStickyTabs();
|
|
171
180
|
this.restoreStickyHeader();
|
|
172
181
|
this.restoreDepartingContentClipping();
|
|
182
|
+
for (const { action } of this.departingContent) {
|
|
183
|
+
if (action)
|
|
184
|
+
action.element.inert = action.inert;
|
|
185
|
+
}
|
|
173
186
|
this.root.removeAttribute('data-spatial-element-dock-active');
|
|
174
187
|
this.root.removeAttribute('data-spatial-element-tabs-dock-active');
|
|
175
188
|
this.root.style.removeProperty('--spatial-element-section-scroll-offset');
|
|
176
189
|
this.root.style.removeProperty('--spatial-element-summary-sticky-top');
|
|
177
|
-
(this.layoutRoot ?? this.root).style.removeProperty('--spatial-element-content-inline-inset');
|
|
178
190
|
}
|
|
179
191
|
scrollFrame = (frame) => {
|
|
180
192
|
this.scrollY = frame.scrollY;
|
|
@@ -185,6 +197,10 @@ export class SpatialElementDockController {
|
|
|
185
197
|
return;
|
|
186
198
|
this.animationFrame = requestAnimationFrame(() => {
|
|
187
199
|
this.animationFrame = 0;
|
|
200
|
+
if (this.layoutDirty) {
|
|
201
|
+
this.layoutDirty = false;
|
|
202
|
+
this.measure();
|
|
203
|
+
}
|
|
188
204
|
this.update();
|
|
189
205
|
});
|
|
190
206
|
};
|
|
@@ -193,14 +209,13 @@ export class SpatialElementDockController {
|
|
|
193
209
|
this.measure();
|
|
194
210
|
this.schedule();
|
|
195
211
|
};
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
if (!tabId)
|
|
212
|
+
handlePanelLayout = (event) => {
|
|
213
|
+
// Also ignore another route's dock during a transition. Otherwise two
|
|
214
|
+
// temporarily mounted controllers could keep remeasuring each other.
|
|
215
|
+
if (event.detail?.source === 'spatial-element-dock')
|
|
201
216
|
return;
|
|
202
|
-
this.
|
|
203
|
-
this.
|
|
217
|
+
this.layoutDirty = true;
|
|
218
|
+
this.schedule();
|
|
204
219
|
};
|
|
205
220
|
measure() {
|
|
206
221
|
if (!this.minimapFrame || !this.stickyHeader)
|
|
@@ -209,13 +224,38 @@ export class SpatialElementDockController {
|
|
|
209
224
|
this.restoreMinimap();
|
|
210
225
|
this.setMinimapSurfaceOpacity(decorationOpacity);
|
|
211
226
|
const minimapRect = toRect(this.minimapFrame.getBoundingClientRect());
|
|
212
|
-
const
|
|
213
|
-
this.
|
|
214
|
-
window.innerWidth
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
this.
|
|
227
|
+
const tabsWidth = this.sourceTabsList?.querySelector(TABS_LINKS)?.scrollWidth ?? 0;
|
|
228
|
+
const metrics = this.readLayoutMetrics?.() ?? {
|
|
229
|
+
width: window.innerWidth, height: window.innerHeight,
|
|
230
|
+
scrollbarWidth: Math.max(0, window.innerWidth - (document.documentElement?.clientWidth ?? window.innerWidth))
|
|
231
|
+
};
|
|
232
|
+
const geometry = resolveSpatialElementDockLayout(metrics, tabsWidth);
|
|
233
|
+
this.minimapViewportLeft = Math.max(Number.isFinite(metrics.safeArea?.left) ? metrics.safeArea.left : 0, 0);
|
|
234
|
+
// The fixed 3XL pane owns its header and submenu separately (step 10).
|
|
235
|
+
if (!geometry) {
|
|
236
|
+
this.applyState(false);
|
|
237
|
+
this.setMinimapModelTop(undefined);
|
|
238
|
+
this.minimapFrame.removeAttribute('data-stage-minimap-model-left');
|
|
239
|
+
if (!this.tabsInPane)
|
|
240
|
+
this.setTabsActive(false);
|
|
241
|
+
this.setPaneTabsActive(true);
|
|
242
|
+
this.applyMinimapPresentation(0);
|
|
243
|
+
this.applyHeaderPresentation(0);
|
|
244
|
+
this.updateActionPresentation(false);
|
|
245
|
+
this.presentationProgress = 0;
|
|
246
|
+
this.minimapDock = undefined;
|
|
247
|
+
this.tabsDock = undefined;
|
|
248
|
+
this.tabsBreakpoint = Number.POSITIVE_INFINITY;
|
|
249
|
+
this.root.style.removeProperty('--spatial-element-section-scroll-offset');
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
this.setPaneTabsActive(false);
|
|
253
|
+
const tabsRect = this.tabsFrame ? toRect(this.tabsFrame.getBoundingClientRect()) : undefined;
|
|
254
|
+
const headerRect = geometry.header;
|
|
255
|
+
applyViewportFixedRect(this.stickyHeader, headerRect);
|
|
256
|
+
this.minimapDock = geometry.minimap;
|
|
257
|
+
this.minimapViewportTop = geometry.header.top;
|
|
258
|
+
this.dockedMinimapModelScale = getDockedMinimapModelScale(this.minimapDock, headerRect, this.getConfiguredDockedModelScale() ?? 1);
|
|
219
259
|
if (this.stickyMinimapAction) {
|
|
220
260
|
applyViewportFixedRect(this.stickyMinimapAction, getDockedMinimapInteractionRect(this.minimapDock, headerRect, this.dockedMinimapModelScale));
|
|
221
261
|
}
|
|
@@ -224,20 +264,22 @@ export class SpatialElementDockController {
|
|
|
224
264
|
this.measureDepartingContent();
|
|
225
265
|
this.breakpoint = getSpatialElementDockBreakpoint(minimapRect.top + this.scrollY, this.minimapDock.top);
|
|
226
266
|
this.presentationEndScrollY = Math.max(minimapRect.top + this.scrollY + minimapRect.height, 0);
|
|
227
|
-
|
|
228
|
-
this.
|
|
229
|
-
(this.
|
|
230
|
-
if (this.tabsFrame && this.stickyTabs) {
|
|
231
|
-
const tabsRect = toRect(this.tabsFrame.getBoundingClientRect());
|
|
267
|
+
this.stickyHeader.style.setProperty('--spatial-element-sticky-minimap-reserve', `${geometry.titleReserve}px`);
|
|
268
|
+
this.root.style.setProperty('--spatial-element-section-scroll-offset', `${geometry.sectionOffset}px`);
|
|
269
|
+
if (this.tabsFrame && this.stickyTabs && tabsRect && geometry.submenu) {
|
|
232
270
|
const panelRadius = Number.parseFloat(getComputedStyle(this.tabsFrame).getPropertyValue('--stage-panel-radius'));
|
|
233
271
|
if (Number.isFinite(panelRadius))
|
|
234
272
|
this.tabsPanelRadius = Math.max(panelRadius, 0);
|
|
235
273
|
this.tabsDockProgress = -1;
|
|
236
|
-
this.tabsDock =
|
|
274
|
+
this.tabsDock = geometry.submenu;
|
|
237
275
|
this.tabsBreakpoint = getSpatialElementTabsDockBreakpoint(tabsRect.top + this.scrollY, this.tabsDock.top);
|
|
238
276
|
applyViewportFixedRect(this.stickyTabs, this.tabsDock);
|
|
239
277
|
this.stickyTabs.style.setProperty('--spatial-element-tabs-dock-bottom-radius', `${this.tabsPanelRadius}px`);
|
|
240
|
-
|
|
278
|
+
}
|
|
279
|
+
else {
|
|
280
|
+
this.setTabsActive(false);
|
|
281
|
+
this.tabsDock = undefined;
|
|
282
|
+
this.tabsBreakpoint = Number.POSITIVE_INFINITY;
|
|
241
283
|
}
|
|
242
284
|
}
|
|
243
285
|
update() {
|
|
@@ -251,6 +293,7 @@ export class SpatialElementDockController {
|
|
|
251
293
|
this.applyState(docked);
|
|
252
294
|
this.applyTabsPresentation(tabsDocked);
|
|
253
295
|
this.applyTabsState(tabsDocked);
|
|
296
|
+
this.updateActionPresentation(docked);
|
|
254
297
|
this.presentationProgress = presentationProgress;
|
|
255
298
|
this.presentationRevision++;
|
|
256
299
|
}
|
|
@@ -268,7 +311,8 @@ export class SpatialElementDockController {
|
|
|
268
311
|
// The virtual document is a transformed containing block. Counter only
|
|
269
312
|
// this dock's scroll offset instead of invalidating inherited styles
|
|
270
313
|
// across the complete page with a per-frame CSS custom property.
|
|
271
|
-
this.
|
|
314
|
+
const compensation = this.layoutRoot?.classList.contains('stage-virtual-scroll-active') ? this.scrollY : 0;
|
|
315
|
+
this.minimapFrame.style.top = `${compensation + this.minimapDock.top}px`;
|
|
272
316
|
}
|
|
273
317
|
else if (changed || this.minimapDockApplied) {
|
|
274
318
|
const decorationOpacity = this.decorationOpacity;
|
|
@@ -279,17 +323,21 @@ export class SpatialElementDockController {
|
|
|
279
323
|
this.setHeaderActive(docked);
|
|
280
324
|
this.root.toggleAttribute('data-spatial-element-dock-active', docked);
|
|
281
325
|
}
|
|
282
|
-
|
|
326
|
+
// The fit square can extend above the viewport for large layouts. The live
|
|
327
|
+
// model follows this top edge through the same continuous dock morph,
|
|
328
|
+
// including its hover and sensor pose, instead of being clipped by it.
|
|
329
|
+
this.setMinimapModelTop(this.minimapViewportTop);
|
|
330
|
+
this.minimapFrame.setAttribute('data-stage-minimap-model-left', this.minimapViewportLeft.toFixed(3));
|
|
283
331
|
if (docked)
|
|
284
332
|
this.updateDepartingContentClipping();
|
|
285
333
|
else if (changed)
|
|
286
334
|
this.restoreDepartingContentClipping();
|
|
287
335
|
if (changed || dockLayoutChanged) {
|
|
288
|
-
window.dispatchEvent(new
|
|
336
|
+
window.dispatchEvent(new CustomEvent(STAGE_PANEL_LAYOUT_EVENT, { detail: { source: 'spatial-element-dock' } }));
|
|
289
337
|
}
|
|
290
338
|
}
|
|
291
339
|
applyTabsState(docked) {
|
|
292
|
-
if (!this.stickyTabs || !this.sourceTabsList
|
|
340
|
+
if (!this.stickyTabs || !this.sourceTabsList)
|
|
293
341
|
return;
|
|
294
342
|
if (docked === this.tabsDocked)
|
|
295
343
|
return;
|
|
@@ -440,44 +488,79 @@ export class SpatialElementDockController {
|
|
|
440
488
|
this.stickyHeader.inert = !active;
|
|
441
489
|
this.stickyHeader.setAttribute('aria-hidden', String(!active));
|
|
442
490
|
}
|
|
491
|
+
moveTabsTo(parent, next = null) {
|
|
492
|
+
const list = this.sourceTabsList;
|
|
493
|
+
if (!list || list.parentElement === parent || list.contains(parent))
|
|
494
|
+
return;
|
|
495
|
+
const focused = document.activeElement instanceof HTMLElement && list.contains(document.activeElement)
|
|
496
|
+
? document.activeElement : undefined;
|
|
497
|
+
const links = list.querySelector(TABS_LINKS);
|
|
498
|
+
const scrollLeft = links?.scrollLeft ?? 0;
|
|
499
|
+
// Reuse the live Svelte-owned navigation, including focus and horizontal
|
|
500
|
+
// scroll. There is never a second active list or a cloned control.
|
|
501
|
+
// Svelte can disconnect the original slot before this controller's cleanup.
|
|
502
|
+
// Atomic moves require matching connected states; an ordinary DOM move is
|
|
503
|
+
// necessary when returning a live portal to that detached owner.
|
|
504
|
+
const reference = next?.parentNode === parent ? next : null;
|
|
505
|
+
if (typeof parent.moveBefore === 'function' && parent.ownerDocument === list.ownerDocument &&
|
|
506
|
+
parent.isConnected === list.isConnected)
|
|
507
|
+
parent.moveBefore(list, reference);
|
|
508
|
+
else
|
|
509
|
+
parent.insertBefore(list, reference);
|
|
510
|
+
if (links)
|
|
511
|
+
links.scrollLeft = scrollLeft;
|
|
512
|
+
if (focused?.isConnected && document.activeElement !== focused)
|
|
513
|
+
focused.focus({ preventScroll: true });
|
|
514
|
+
}
|
|
515
|
+
restoreTabsList() {
|
|
516
|
+
if (!this.tabsListOriginalParent)
|
|
517
|
+
return;
|
|
518
|
+
const next = this.tabsListOriginalNextSibling?.parentNode === this.tabsListOriginalParent
|
|
519
|
+
? this.tabsListOriginalNextSibling : null;
|
|
520
|
+
this.moveTabsTo(this.tabsListOriginalParent, next);
|
|
521
|
+
}
|
|
443
522
|
setTabsActive(active) {
|
|
444
|
-
if (!this.stickyTabs || !this.sourceTabsList || !this.
|
|
445
|
-
return;
|
|
446
|
-
const outgoingList = active ? this.sourceTabsList : this.dockedTabsList;
|
|
447
|
-
const incomingList = active ? this.dockedTabsList : this.sourceTabsList;
|
|
448
|
-
this.syncTabScrollPosition(outgoingList, incomingList);
|
|
449
|
-
const focusedTabId = document.activeElement instanceof HTMLElement && outgoingList.contains(document.activeElement)
|
|
450
|
-
? document.activeElement.closest('[data-spatial-element-tab-id]')?.dataset.spatialElementTabId
|
|
451
|
-
: performance.now() - this.lastTabFocusTime <= 500
|
|
452
|
-
? this.lastFocusedTabId
|
|
453
|
-
: undefined;
|
|
454
|
-
this.tabsDocked = active;
|
|
455
|
-
this.sourceTabsList.inert = active;
|
|
456
|
-
this.sourceTabsList.setAttribute('aria-hidden', String(active));
|
|
457
|
-
this.sourceTabsList.toggleAttribute('data-spatial-element-tab-list-hidden', active);
|
|
523
|
+
if (!this.stickyTabs || !this.sourceTabsList || !this.tabsListOriginalParent)
|
|
524
|
+
return;
|
|
458
525
|
this.stickyTabs.inert = !active;
|
|
459
526
|
this.stickyTabs.setAttribute('aria-hidden', String(!active));
|
|
460
527
|
this.stickyTabs.toggleAttribute('data-active', active);
|
|
461
528
|
this.setSourceTabsSurfaceVisible(!active);
|
|
462
|
-
if (
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
529
|
+
if (active)
|
|
530
|
+
this.moveTabsTo(this.stickyTabs);
|
|
531
|
+
else
|
|
532
|
+
this.restoreTabsList();
|
|
533
|
+
this.tabsDocked = active;
|
|
534
|
+
this.sourceTabsList.dataset.spatialElementTabList = active ? 'docked' : 'panel';
|
|
535
|
+
}
|
|
536
|
+
setPaneTabsActive(active) {
|
|
537
|
+
if (!this.paneTabs || !this.sourceTabsList)
|
|
538
|
+
return;
|
|
539
|
+
if (active) {
|
|
540
|
+
this.paneTabs.inert = false;
|
|
541
|
+
this.paneTabs.setAttribute('aria-hidden', 'false');
|
|
542
|
+
this.paneTabs.toggleAttribute('data-active', true);
|
|
543
|
+
this.moveTabsTo(this.paneTabs);
|
|
544
|
+
this.sourceTabsList.dataset.spatialElementTabList = 'docked';
|
|
545
|
+
const links = this.sourceTabsList.querySelector(TABS_LINKS);
|
|
546
|
+
if (links?.scrollWidth)
|
|
547
|
+
this.paneTabs.style.setProperty('--spatial-detail-submenu-natural-width', `${links.scrollWidth}px`);
|
|
548
|
+
}
|
|
549
|
+
else if (this.tabsInPane) {
|
|
550
|
+
this.root.removeAttribute('data-spatial-detail-pane-tabs');
|
|
551
|
+
this.setSourceTabsSurfaceVisible(true);
|
|
552
|
+
this.restoreTabsList();
|
|
553
|
+
this.sourceTabsList.dataset.spatialElementTabList = 'panel';
|
|
554
|
+
this.paneTabs.inert = true;
|
|
555
|
+
this.paneTabs.setAttribute('aria-hidden', 'true');
|
|
556
|
+
this.paneTabs.removeAttribute('data-active');
|
|
557
|
+
}
|
|
558
|
+
this.tabsInPane = active;
|
|
559
|
+
this.root.toggleAttribute('data-spatial-detail-pane-tabs', active);
|
|
560
|
+
if (active)
|
|
561
|
+
this.setSourceTabsSurfaceVisible(false);
|
|
562
|
+
else if (!this.tabsDocked)
|
|
563
|
+
this.setSourceTabsSurfaceVisible(true);
|
|
481
564
|
}
|
|
482
565
|
setSourceTabsSurfaceVisible(visible) {
|
|
483
566
|
if (!this.tabsFrame)
|
|
@@ -493,18 +576,6 @@ export class SpatialElementDockController {
|
|
|
493
576
|
this.tabsFrame.style.removeProperty(property);
|
|
494
577
|
window.dispatchEvent(new Event(STAGE_PANEL_VISUAL_EVENT));
|
|
495
578
|
}
|
|
496
|
-
syncTabScrollPosition(outgoingList, incomingList) {
|
|
497
|
-
const outgoingLinks = outgoingList.querySelector(TABS_LINKS);
|
|
498
|
-
const incomingLinks = incomingList.querySelector(TABS_LINKS);
|
|
499
|
-
if (!outgoingLinks || !incomingLinks)
|
|
500
|
-
return;
|
|
501
|
-
const outgoingRange = Math.max(outgoingLinks.scrollWidth - outgoingLinks.clientWidth, 0);
|
|
502
|
-
const incomingRange = Math.max(incomingLinks.scrollWidth - incomingLinks.clientWidth, 0);
|
|
503
|
-
incomingLinks.scrollLeft =
|
|
504
|
-
outgoingRange > 0
|
|
505
|
-
? (outgoingLinks.scrollLeft / outgoingRange) * incomingRange
|
|
506
|
-
: outgoingLinks.scrollLeft;
|
|
507
|
-
}
|
|
508
579
|
mountStickyHeaderOverlay() {
|
|
509
580
|
if (!this.stickyHeader)
|
|
510
581
|
return;
|
|
@@ -535,6 +606,10 @@ export class SpatialElementDockController {
|
|
|
535
606
|
const parent = this.stickyHeaderOriginalParent;
|
|
536
607
|
const sibling = this.stickyHeaderOriginalNextSibling;
|
|
537
608
|
this.stickyHeader.removeAttribute('data-stage-fixed-overlay');
|
|
609
|
+
if (this.stickyHeaderOriginalStyle === null)
|
|
610
|
+
this.stickyHeader.removeAttribute('style');
|
|
611
|
+
else
|
|
612
|
+
this.stickyHeader.setAttribute('style', this.stickyHeaderOriginalStyle);
|
|
538
613
|
if (sibling?.parentNode === parent)
|
|
539
614
|
parent.insertBefore(this.stickyHeader, sibling);
|
|
540
615
|
else
|
|
@@ -565,6 +640,10 @@ export class SpatialElementDockController {
|
|
|
565
640
|
const rect = state.element.getBoundingClientRect();
|
|
566
641
|
state.documentTop = rect.top + this.scrollY;
|
|
567
642
|
state.height = rect.height;
|
|
643
|
+
const action = state.element.querySelector('[data-catalog-rich-shared="primary-action"]');
|
|
644
|
+
if (action)
|
|
645
|
+
state.action = { element: action, bottom: action.getBoundingClientRect().bottom - rect.top,
|
|
646
|
+
inert: state.action?.inert ?? action.inert };
|
|
568
647
|
state.sticky = undefined;
|
|
569
648
|
if (state.frame?.parentElement) {
|
|
570
649
|
const style = getComputedStyle(state.frame);
|
|
@@ -581,12 +660,29 @@ export class SpatialElementDockController {
|
|
|
581
660
|
}
|
|
582
661
|
}
|
|
583
662
|
}
|
|
663
|
+
contentViewportTop(state) {
|
|
664
|
+
const sticky = state.sticky;
|
|
665
|
+
return sticky
|
|
666
|
+
? getStickyPanelTop(sticky.documentTop, sticky.height, sticky.boundaryBottom, sticky.inset, this.scrollY) + sticky.contentInset
|
|
667
|
+
: state.documentTop - this.scrollY;
|
|
668
|
+
}
|
|
669
|
+
updateActionPresentation(docked) {
|
|
670
|
+
const summary = this.departingContent.find(state => state.action);
|
|
671
|
+
const hiddenAboveDock = summary?.action
|
|
672
|
+
? this.contentViewportTop(summary) + summary.action.bottom <= this.stickyHeaderBottom : true;
|
|
673
|
+
const visible = docked && hiddenAboveDock;
|
|
674
|
+
this.stickyHeader?.toggleAttribute('data-action-active', visible);
|
|
675
|
+
if (this.stickyAction && this.stickyAction.inert === visible)
|
|
676
|
+
this.stickyAction.inert = !visible;
|
|
677
|
+
if (summary?.action) {
|
|
678
|
+
const inert = summary.action.inert || visible;
|
|
679
|
+
if (summary.action.element.inert !== inert)
|
|
680
|
+
summary.action.element.inert = inert;
|
|
681
|
+
}
|
|
682
|
+
}
|
|
584
683
|
updateDepartingContentClipping() {
|
|
585
684
|
for (const state of this.departingContent) {
|
|
586
|
-
const
|
|
587
|
-
const viewportTop = sticky
|
|
588
|
-
? getStickyPanelTop(sticky.documentTop, sticky.height, sticky.boundaryBottom, sticky.inset, this.scrollY) + sticky.contentInset
|
|
589
|
-
: state.documentTop - this.scrollY;
|
|
685
|
+
const viewportTop = this.contentViewportTop(state);
|
|
590
686
|
const inset = Math.min(Math.max(this.stickyHeaderBottom - viewportTop, 0), state.height);
|
|
591
687
|
const clipPath = `inset(${inset.toFixed(2)}px 0 0 0)`;
|
|
592
688
|
if (state.appliedClipPath === clipPath)
|