@spatial-elements/sveltekit 0.1.0-beta.2 → 1.0.0-beta.10
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 +18 -13
- package/dist/catalog/ScrollNavigationBridge.svelte +172 -47
- package/dist/catalog/ScrollNavigationBridge.svelte.d.ts +9 -2
- package/dist/catalog/catalogNavigation.js +3 -2
- package/dist/catalog/catalogSummaryTransfer.d.ts +16 -0
- package/dist/catalog/catalogSummaryTransfer.js +79 -0
- package/dist/catalog/catalogTransition.css +58 -3
- package/dist/catalog/interruptedPresentation.d.ts +10 -0
- package/dist/catalog/interruptedPresentation.js +29 -0
- package/dist/catalog/presentationCleanup.d.ts +4 -0
- package/dist/catalog/presentationCleanup.js +20 -0
- package/dist/catalog/stagedCatalogNavigation.d.ts +44 -0
- package/dist/catalog/stagedCatalogNavigation.js +403 -0
- package/dist/catalog/stagedDomReveal.d.ts +8 -0
- package/dist/catalog/stagedDomReveal.js +76 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +3 -0
- package/dist/spatial-element/BrandStageShell.svelte +52 -71
- package/dist/spatial-element/BrandStageShell.svelte.d.ts +31 -4
- package/dist/spatial-element/CarouselSpatialElement.svelte +150 -197
- package/dist/spatial-element/CarouselSpatialElement.svelte.d.ts +5 -1
- package/dist/spatial-element/ContentBlock.svelte +7 -0
- package/dist/spatial-element/ContentBlock.svelte.d.ts +9 -0
- package/dist/spatial-element/ContentGrid.svelte +7 -0
- package/dist/spatial-element/ContentGrid.svelte.d.ts +8 -0
- package/dist/spatial-element/ContentPage.svelte +51 -55
- package/dist/spatial-element/ContentPage.svelte.d.ts +14 -3
- package/dist/spatial-element/InteractionGesture.svelte +39 -0
- package/dist/spatial-element/InteractionGesture.svelte.d.ts +7 -0
- package/dist/spatial-element/OverflowControls.svelte +125 -0
- package/dist/spatial-element/OverflowControls.svelte.d.ts +9 -0
- package/dist/spatial-element/PointerHint.svelte +80 -0
- package/dist/spatial-element/PointerHint.svelte.d.ts +3 -0
- package/dist/spatial-element/Section.svelte +25 -106
- package/dist/spatial-element/Section.svelte.d.ts +1 -0
- package/dist/spatial-element/SectionSurfaceGroup.svelte +8 -0
- package/dist/spatial-element/SectionSurfaceGroup.svelte.d.ts +8 -0
- package/dist/spatial-element/SpatialCardGridSection.svelte +79 -0
- package/dist/spatial-element/SpatialCardGridSection.svelte.d.ts +11 -0
- package/dist/spatial-element/SpatialCardPresentation.svelte +311 -0
- package/dist/spatial-element/SpatialCardPresentation.svelte.d.ts +19 -0
- package/dist/spatial-element/SpatialCardSlot.svelte +33 -0
- package/dist/spatial-element/SpatialCardSlot.svelte.d.ts +8 -0
- package/dist/spatial-element/SpatialCarouselSection.svelte +752 -0
- package/dist/spatial-element/{CarouselSection.svelte.d.ts → SpatialCarouselSection.svelte.d.ts} +5 -5
- package/dist/spatial-element/SpatialElementBreadcrumbs.svelte +12 -65
- package/dist/spatial-element/SpatialElementCard.svelte +54 -238
- package/dist/spatial-element/SpatialElementCard.svelte.d.ts +9 -0
- package/dist/spatial-element/SpatialElementHelp.svelte +292 -0
- package/dist/spatial-element/SpatialElementHelp.svelte.d.ts +6 -0
- package/dist/spatial-element/SpatialElementMediaRail.svelte +321 -52
- package/dist/spatial-element/SpatialElementMediaRail.svelte.d.ts +4 -1
- package/dist/spatial-element/SpatialElementNativeMedia.svelte +101 -0
- package/dist/spatial-element/SpatialElementNativeMedia.svelte.d.ts +9 -0
- package/dist/spatial-element/SpatialElementPage.svelte +150 -70
- package/dist/spatial-element/SpatialElementPage.svelte.d.ts +6 -3
- package/dist/spatial-element/SpatialElementStickyHeader.svelte +76 -104
- package/dist/spatial-element/SpatialElementStickyHeader.svelte.d.ts +3 -1
- package/dist/spatial-element/SpatialElementSummaryContent.svelte +185 -0
- package/dist/spatial-element/SpatialElementSummaryContent.svelte.d.ts +18 -0
- package/dist/spatial-element/SpatialElementSummaryPanel.svelte +48 -380
- package/dist/spatial-element/SpatialElementSummaryPanel.svelte.d.ts +2 -1
- package/dist/spatial-element/SpatialElementTabList.svelte +40 -17
- package/dist/spatial-element/SpatialElementTabList.svelte.d.ts +2 -1
- package/dist/spatial-element/SpatialElementTabs.svelte +61 -18
- package/dist/spatial-element/SpatialElementTabs.svelte.d.ts +3 -1
- package/dist/spatial-element/SpatialElementViewToggle.svelte +54 -0
- package/dist/spatial-element/SpatialElementViewToggle.svelte.d.ts +8 -0
- package/dist/spatial-element/SpatialIconButton.svelte +59 -0
- package/dist/spatial-element/SpatialIconButton.svelte.d.ts +14 -0
- package/dist/spatial-element/SpatialListPage.svelte +37 -8
- package/dist/spatial-element/SpatialListPage.svelte.d.ts +4 -1
- package/dist/spatial-element/SpatialMediaIndicator.svelte +16 -0
- package/dist/spatial-element/SpatialMediaIndicator.svelte.d.ts +26 -0
- package/dist/spatial-element/SpatialNavigationShell.svelte +136 -0
- package/dist/spatial-element/SpatialNavigationShell.svelte.d.ts +15 -0
- package/dist/spatial-element/SpatialSummaryHost.svelte +19 -0
- package/dist/spatial-element/SpatialSummaryHost.svelte.d.ts +9 -0
- package/dist/spatial-element/SpatialSummaryRoot.svelte +78 -0
- package/dist/spatial-element/SpatialSummaryRoot.svelte.d.ts +8 -0
- package/dist/spatial-element/SpatialSummarySlot.svelte +39 -0
- package/dist/spatial-element/SpatialSummarySlot.svelte.d.ts +9 -0
- package/dist/spatial-element/SpatialViewIcon.svelte +29 -0
- package/dist/spatial-element/SpatialViewIcon.svelte.d.ts +6 -0
- package/dist/spatial-element/brandContext.d.ts +1 -1
- package/dist/spatial-element/brandContext.js +1 -1
- package/dist/spatial-element/cardAppearanceFreeze.d.ts +5 -0
- package/dist/spatial-element/cardAppearanceFreeze.js +72 -0
- package/dist/spatial-element/carouselTextHit.d.ts +2 -0
- package/dist/spatial-element/carouselTextHit.js +17 -0
- package/dist/spatial-element/contentSidebars.d.ts +3 -0
- package/dist/spatial-element/contentSidebars.js +56 -0
- package/dist/spatial-element/index.d.ts +18 -3
- package/dist/spatial-element/index.js +11 -2
- package/dist/spatial-element/layout.generated.css +363 -0
- package/dist/spatial-element/messagesContext.d.ts +3 -0
- package/dist/spatial-element/messagesContext.js +10 -0
- package/dist/spatial-element/presentationBoxFreeze.d.ts +8 -0
- package/dist/spatial-element/presentationBoxFreeze.js +35 -0
- package/dist/spatial-element/spatialCardGrid.d.ts +12 -0
- package/dist/spatial-element/spatialCardGrid.js +1 -0
- package/dist/spatial-element/spatialPageContext.d.ts +4 -0
- package/dist/spatial-element/spatialPageContext.js +9 -0
- package/dist/spatial-element/spatialPresentationOwner.d.ts +6 -0
- package/dist/spatial-element/spatialPresentationOwner.js +2 -0
- package/dist/spatial-element/spatialSummary.d.ts +43 -0
- package/dist/spatial-element/spatialSummary.js +1 -0
- package/dist/spatial-element/spatialSummaryHost.svelte.d.ts +60 -0
- package/dist/spatial-element/spatialSummaryHost.svelte.js +233 -0
- package/dist/spatial-element/spatialThemeStyle.d.ts +3 -0
- package/dist/spatial-element/spatialThemeStyle.js +69 -0
- package/dist/spatial-element/truncatedTitle.d.ts +5 -0
- package/dist/spatial-element/truncatedTitle.js +28 -0
- package/dist/stage/ButtonGroup.svelte +151 -0
- package/dist/stage/ButtonGroup.svelte.d.ts +24 -0
- package/dist/stage/Panel.svelte +72 -14
- package/dist/stage/Panel.svelte.d.ts +14 -2
- package/dist/stage/Stage.svelte +405 -48
- package/dist/stage/Stage.svelte.d.ts +8 -1
- package/dist/stage/StageViewport.svelte +15 -2
- package/dist/stage/authoredStyle.d.ts +4 -0
- package/dist/stage/authoredStyle.js +17 -0
- package/dist/stage/buttonGroup.d.ts +9 -0
- package/dist/stage/buttonGroup.js +1 -0
- package/logo.svg +188 -0
- package/package.json +9 -6
- package/dist/spatial-element/CarouselSection.svelte +0 -350
- package/dist/spatial-element/ListSection.svelte +0 -30
- package/dist/spatial-element/ListSection.svelte.d.ts +0 -8
package/README.md
CHANGED
|
@@ -1,22 +1,27 @@
|
|
|
1
|
+
<img src="https://raw.githubusercontent.com/LauridBergjohann/spatial-elements/main/packages/sveltekit/logo.svg" alt="Spatial Elements logo" width="64" />
|
|
2
|
+
|
|
1
3
|
# @spatial-elements/sveltekit
|
|
2
4
|
|
|
3
|
-
SvelteKit components and
|
|
5
|
+
SvelteKit components for interactive 3D collections and detail pages, built on the shared Page Sections layout system.
|
|
6
|
+
|
|
7
|
+
- Compose BrandStageShell, SpatialCardGridSection, SpatialCarouselSection and SpatialElementPage.
|
|
8
|
+
- Keep the renderer alive across related routes while using native links and SvelteKit navigation.
|
|
9
|
+
- Combine spatial content with Page Sections, sidebars, headings and responsive grids.
|
|
10
|
+
- Supply poster images for meaningful SSR and no-WebGPU fallbacks.
|
|
11
|
+
- Adapt themes and interface texts to your application.
|
|
4
12
|
|
|
5
|
-
|
|
13
|
+
## Installation
|
|
6
14
|
|
|
7
|
-
|
|
15
|
+
```sh
|
|
16
|
+
npm install @spatial-elements/sveltekit@beta three@^0.186.1
|
|
17
|
+
```
|
|
8
18
|
|
|
9
|
-
|
|
19
|
+
Requires Node >=22.12 for tooling, Svelte ^5.56.4 and SvelteKit ^2.70.3. This is a beta package. Models and environments belong to your application and are not bundled.
|
|
10
20
|
|
|
11
|
-
|
|
12
|
-
npm install @spatial-elements/sveltekit@beta
|
|
13
|
-
~~~
|
|
21
|
+
## Documentation and examples
|
|
14
22
|
|
|
15
|
-
|
|
23
|
+
**[Visit the Spatial Elements website](https://spatial-elements.bergjohann.com/)** for installation, interactive guides, the API reference and showcase. The website source is included in the repository under apps/website.
|
|
16
24
|
|
|
17
|
-
|
|
25
|
+
## License
|
|
18
26
|
|
|
19
|
-
|
|
20
|
-
Modern npm installs it automatically. If the application imports Three.js directly, declare it
|
|
21
|
-
explicitly with `npm install three@^0.185.1`. Do not bypass incompatible peer ranges with
|
|
22
|
-
`--legacy-peer-deps`. Other package managers may require explicit peer installation.
|
|
27
|
+
[Mozilla Public License 2.0](LICENSE).
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { readCatalogViewContext } from '@spatial-elements/core/catalog/catalogViewLink';
|
|
2
|
+
import { readCatalogLinkContext, readCatalogViewContext } from '@spatial-elements/core/catalog/catalogViewLink';
|
|
3
|
+
import {
|
|
4
|
+
EarlyNavigationCoordinator,
|
|
5
|
+
type EarlyNavigationCancelReason,
|
|
6
|
+
type EarlyNavigationHandle
|
|
7
|
+
} from '@spatial-elements/core/catalog/EarlyNavigationCoordinator';
|
|
3
8
|
import {
|
|
4
9
|
afterNavigate,
|
|
5
10
|
beforeNavigate,
|
|
6
11
|
disableScrollHandling,
|
|
12
|
+
goto,
|
|
7
13
|
onNavigate,
|
|
14
|
+
preloadData,
|
|
8
15
|
pushState,
|
|
9
16
|
replaceState
|
|
10
17
|
} from '$app/navigation';
|
|
11
18
|
import { navigating, page } from '$app/state';
|
|
12
|
-
import type { OnNavigate } from '@sveltejs/kit';
|
|
13
|
-
import { getContext, onDestroy, tick } from 'svelte';
|
|
19
|
+
import type { BeforeNavigate, OnNavigate } from '@sveltejs/kit';
|
|
20
|
+
import { getContext, onDestroy, onMount, tick } from 'svelte';
|
|
14
21
|
import { CATALOG_ENDPOINTS, type CatalogEndpointRegistry } from '@spatial-elements/core/catalog/CatalogEndpointRegistry';
|
|
15
22
|
import {
|
|
16
23
|
CATALOG_SECTIONS,
|
|
@@ -23,6 +30,7 @@
|
|
|
23
30
|
} from '@spatial-elements/core/stage/VirtualScrollController';
|
|
24
31
|
import { subscribeStageScrollFrame, syncStageScrollToNative } from '@spatial-elements/core/stage/scrollFrame';
|
|
25
32
|
import { resolveCatalogIntent } from '@spatial-elements/core/catalog/catalogRecipes';
|
|
33
|
+
import { catalogTransitionViewportChanged, readCatalogTransitionViewport } from '@spatial-elements/core/catalog/catalogTransitionViewport';
|
|
26
34
|
|
|
27
35
|
interface EntryState {
|
|
28
36
|
id: string;
|
|
@@ -31,14 +39,20 @@
|
|
|
31
39
|
|
|
32
40
|
interface Props {
|
|
33
41
|
controller?: VirtualScrollController;
|
|
34
|
-
|
|
42
|
+
onStart?: () => void;
|
|
43
|
+
/** Starts only a source-only transition whose destination is already known. */
|
|
44
|
+
onEarlyStart?: (navigation: BeforeNavigate) => EarlyNavigationHandle | undefined;
|
|
45
|
+
/** Must retain the outgoing presentation before returning; never hold Kit's commit. */
|
|
46
|
+
onCapture?: (navigation: OnNavigate) => undefined;
|
|
35
47
|
onInterrupt?: () => void;
|
|
48
|
+
/** Cancel only a still-owned visual handoff after route commit; retain destination binding. */
|
|
49
|
+
onInterruptCommitted?: (reason: EarlyNavigationCancelReason) => boolean;
|
|
36
50
|
onSupersede?: (destination: URL) => void;
|
|
37
51
|
onRestored?: (navigation: OnNavigate) => void | Promise<void>;
|
|
38
52
|
handlesNavigation?: (navigation: OnNavigate) => boolean;
|
|
39
53
|
}
|
|
40
54
|
|
|
41
|
-
let { controller, onCapture, onInterrupt, onSupersede, onRestored, handlesNavigation }: Props =
|
|
55
|
+
let { controller, onStart, onEarlyStart, onCapture, onInterrupt, onInterruptCommitted, onSupersede, onRestored, handlesNavigation }: Props =
|
|
42
56
|
$props();
|
|
43
57
|
const endpoints = getContext<CatalogEndpointRegistry | undefined>(CATALOG_ENDPOINTS);
|
|
44
58
|
const sections = getContext<CatalogSections | undefined>(CATALOG_SECTIONS);
|
|
@@ -51,10 +65,44 @@
|
|
|
51
65
|
}
|
|
52
66
|
});
|
|
53
67
|
onDestroy(() => disconnectSections?.());
|
|
54
|
-
const PREPARATION_LIMIT_MS = 500;
|
|
55
68
|
let generation = 0;
|
|
56
69
|
let pendingNavigation = false;
|
|
57
70
|
let focusRevision = 0;
|
|
71
|
+
let earlyReplayComplete: Promise<void> | undefined;
|
|
72
|
+
// Kit invokes beforeNavigate after the click dispatch has finished. The DOM
|
|
73
|
+
// event's composedPath is empty by then, so remember its original anchor now.
|
|
74
|
+
const earlyAnchors = new WeakMap<Event, HTMLAnchorElement>();
|
|
75
|
+
const earlyNavigation = new EarlyNavigationCoordinator({
|
|
76
|
+
preload: async (destination, signal) => {
|
|
77
|
+
let timer: ReturnType<typeof setTimeout> | undefined;
|
|
78
|
+
let abort: (() => void) | undefined;
|
|
79
|
+
try {
|
|
80
|
+
return await Promise.race([
|
|
81
|
+
preloadData(destination),
|
|
82
|
+
new Promise<never>((_resolve, reject) => {
|
|
83
|
+
abort = () => reject(new Error('Early navigation interrupted'));
|
|
84
|
+
if (signal.aborted) abort();
|
|
85
|
+
else signal.addEventListener('abort', abort, { once: true });
|
|
86
|
+
timer = setTimeout(() => reject(new Error('Early navigation preload deadline')), 15_000);
|
|
87
|
+
})
|
|
88
|
+
]);
|
|
89
|
+
} finally {
|
|
90
|
+
if (timer !== undefined) clearTimeout(timer);
|
|
91
|
+
if (abort) signal.removeEventListener('abort', abort);
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
// The absolute destination already includes Kit's configured base path.
|
|
95
|
+
// eslint-disable-next-line svelte/no-navigation-without-resolve
|
|
96
|
+
navigate: async (destination) => {
|
|
97
|
+
const url = new URL(destination);
|
|
98
|
+
if (url.origin !== location.origin && (url.protocol === 'https:' || url.protocol === 'http:')) {
|
|
99
|
+
location.assign(url.href);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
// eslint-disable-next-line svelte/no-navigation-without-resolve
|
|
103
|
+
await goto(destination);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
58
106
|
// This imperative history cache must not subscribe effects to per-frame position writes.
|
|
59
107
|
// eslint-disable-next-line svelte/prefer-svelte-reactivity
|
|
60
108
|
const entryPositions = new Map<string, { x: number; y: number }>();
|
|
@@ -63,7 +111,8 @@
|
|
|
63
111
|
controller: VirtualScrollController;
|
|
64
112
|
token: object;
|
|
65
113
|
complete?: Promise<void>;
|
|
66
|
-
|
|
114
|
+
committed: boolean;
|
|
115
|
+
interrupted: boolean;
|
|
67
116
|
}
|
|
68
117
|
| undefined;
|
|
69
118
|
let initial = $state<{ target: ScrollRestoreTarget; url: string }>();
|
|
@@ -92,11 +141,12 @@
|
|
|
92
141
|
if (entryPositions.size > 100) entryPositions.delete(entryPositions.keys().next().value!);
|
|
93
142
|
}
|
|
94
143
|
|
|
95
|
-
function stopActive(destination?: URL) {
|
|
144
|
+
function stopActive(destination?: URL, reason: EarlyNavigationCancelReason = 'superseded') {
|
|
96
145
|
generation += 1;
|
|
146
|
+
earlyNavigation.cancel(reason);
|
|
147
|
+
earlyReplayComplete = undefined;
|
|
97
148
|
if (active) {
|
|
98
149
|
active.controller.endNavigation(active.token);
|
|
99
|
-
active.releasePreparation?.();
|
|
100
150
|
}
|
|
101
151
|
active = undefined;
|
|
102
152
|
pendingNavigation = false;
|
|
@@ -109,6 +159,38 @@
|
|
|
109
159
|
} else interruptVisuals();
|
|
110
160
|
}
|
|
111
161
|
|
|
162
|
+
function supportsEarlyStart(navigation: BeforeNavigate): boolean {
|
|
163
|
+
if (!onEarlyStart || navigation.type !== 'link' || navigation.willUnload ||
|
|
164
|
+
!navigation.from || !navigation.to?.route.id ||
|
|
165
|
+
navigation.to.url.origin !== navigation.from.url.origin ||
|
|
166
|
+
(navigation.to.url.pathname === navigation.from.url.pathname && navigation.to.url.search === navigation.from.url.search)) return false;
|
|
167
|
+
// Kit's BeforeNavigate does not expose the resolved link options. Keep
|
|
168
|
+
// explicitly authored focus/scroll/history policies on the ordinary path.
|
|
169
|
+
const anchor = earlyAnchors.get(navigation.event);
|
|
170
|
+
// An author can declare a complete Dock endpoint. Arbitrary hashes still
|
|
171
|
+
// need destination DOM, including short pages where native scrolling clamps.
|
|
172
|
+
if (navigation.to.url.hash && navigation.to.url.hash !== '#overview' &&
|
|
173
|
+
readCatalogLinkContext(anchor, navigation.to.url).targetPresentation !== 'dock') return false;
|
|
174
|
+
return anchor instanceof HTMLAnchorElement && !anchor.closest(
|
|
175
|
+
'[data-sveltekit-keepfocus], [data-sveltekit-noscroll], [data-sveltekit-replacestate], [data-sveltekit-reload]'
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function interruptInput(reason: EarlyNavigationCancelReason) {
|
|
180
|
+
const binding = active;
|
|
181
|
+
if (binding?.committed) {
|
|
182
|
+
// goto may already be complete while its real source is still held for
|
|
183
|
+
// destination binding/reveal. Do not invalidate that binding generation:
|
|
184
|
+
// there is no successor navigation which could finish the current page.
|
|
185
|
+
if (binding.interrupted || !onInterruptCommitted?.(reason)) return;
|
|
186
|
+
binding.interrupted = true;
|
|
187
|
+
focusRevision += 1;
|
|
188
|
+
binding.controller.endNavigation(binding.token);
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
if (earlyNavigation.pending) stopActive(undefined, reason);
|
|
192
|
+
}
|
|
193
|
+
|
|
112
194
|
function interruptVisuals() {
|
|
113
195
|
try {
|
|
114
196
|
onInterrupt?.();
|
|
@@ -132,7 +214,7 @@
|
|
|
132
214
|
};
|
|
133
215
|
const intent =
|
|
134
216
|
navigation.from && navigation.to
|
|
135
|
-
? resolveCatalogIntent(navigation.from.url, navigation.to.url, navigation.type)
|
|
217
|
+
? resolveCatalogIntent(navigation.from.url, navigation.to.url, navigation.type, endpoints?.navigation)
|
|
136
218
|
: undefined;
|
|
137
219
|
const card =
|
|
138
220
|
intent?.direction === 'detail-to-list'
|
|
@@ -188,9 +270,34 @@
|
|
|
188
270
|
}
|
|
189
271
|
|
|
190
272
|
beforeNavigate((navigation) => {
|
|
273
|
+
// The single permitted replay continues the existing visual ownership.
|
|
274
|
+
// It must not run stopActive, onSupersede, or the generic feedback again.
|
|
275
|
+
if (navigation.to && earlyNavigation.acceptReplay(navigation.to.url.href)) {
|
|
276
|
+
earlyReplayComplete = navigation.complete;
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
191
279
|
if (!pendingNavigation) rememberPosition();
|
|
192
|
-
stopActive(navigation.to?.url);
|
|
280
|
+
stopActive(navigation.to?.url, navigation.type === 'popstate' ? 'history' : navigation.willUnload ? 'leave' : 'superseded');
|
|
193
281
|
pendingNavigation = true;
|
|
282
|
+
if (supportsEarlyStart(navigation)) {
|
|
283
|
+
let handle: EarlyNavigationHandle | undefined;
|
|
284
|
+
try { handle = onEarlyStart?.(navigation); }
|
|
285
|
+
catch { interruptVisuals(); }
|
|
286
|
+
if (handle) {
|
|
287
|
+
navigation.cancel();
|
|
288
|
+
// Rejecting the original navigation is intentional. Its completion
|
|
289
|
+
// must never cancel the independently owned source movement.
|
|
290
|
+
void navigation.complete.catch(() => {});
|
|
291
|
+
const epoch = generation;
|
|
292
|
+
void earlyNavigation.start(navigation.to!.url.href, handle).finally(() => {
|
|
293
|
+
if (epoch === generation && !active) pendingNavigation = false;
|
|
294
|
+
});
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
if (controller?.active && !navigation.willUnload && navigation.to && navigation.from &&
|
|
299
|
+
navigation.from.url.pathname !== navigation.to.url.pathname &&
|
|
300
|
+
navigation.from.url.origin === navigation.to.url.origin) onStart?.();
|
|
194
301
|
const epoch = generation;
|
|
195
302
|
void navigation.complete
|
|
196
303
|
.catch(() => {})
|
|
@@ -201,15 +308,49 @@
|
|
|
201
308
|
}
|
|
202
309
|
});
|
|
203
310
|
});
|
|
204
|
-
onDestroy(() => stopActive());
|
|
311
|
+
onDestroy(() => stopActive(undefined, 'destroyed'));
|
|
312
|
+
onMount(() => {
|
|
313
|
+
const rememberAnchor = (event: MouseEvent) => {
|
|
314
|
+
const anchor = event.composedPath().find((node) => node instanceof HTMLAnchorElement);
|
|
315
|
+
if (anchor instanceof HTMLAnchorElement) earlyAnchors.set(event, anchor);
|
|
316
|
+
};
|
|
317
|
+
const interrupt = () => interruptInput('interaction');
|
|
318
|
+
const keydown = (event: KeyboardEvent) => { if (event.key === 'Escape') interrupt(); };
|
|
319
|
+
let viewport = readCatalogTransitionViewport();
|
|
320
|
+
const resize = () => {
|
|
321
|
+
const current = readCatalogTransitionViewport();
|
|
322
|
+
const changed = catalogTransitionViewportChanged(viewport, current);
|
|
323
|
+
viewport = current;
|
|
324
|
+
if (changed) interruptInput('resize');
|
|
325
|
+
};
|
|
326
|
+
window.addEventListener('keydown', keydown);
|
|
327
|
+
window.addEventListener('wheel', interrupt, { passive: true });
|
|
328
|
+
window.addEventListener('touchmove', interrupt, { passive: true });
|
|
329
|
+
window.addEventListener('resize', resize);
|
|
330
|
+
document.addEventListener('click', rememberAnchor, true);
|
|
331
|
+
return () => {
|
|
332
|
+
window.removeEventListener('keydown', keydown);
|
|
333
|
+
window.removeEventListener('wheel', interrupt);
|
|
334
|
+
window.removeEventListener('touchmove', interrupt);
|
|
335
|
+
window.removeEventListener('resize', resize);
|
|
336
|
+
document.removeEventListener('click', rememberAnchor, true);
|
|
337
|
+
};
|
|
338
|
+
});
|
|
205
339
|
|
|
206
340
|
$effect(() => {
|
|
207
341
|
const complete = navigating.complete;
|
|
342
|
+
if (complete && earlyReplayComplete && complete !== earlyReplayComplete && earlyNavigation.pending) {
|
|
343
|
+
stopActive(navigating.to?.url);
|
|
344
|
+
pendingNavigation = true;
|
|
345
|
+
}
|
|
208
346
|
// Kit skips beforeNavigate while another navigation is already in progress.
|
|
209
347
|
// The public completion identity still changes when that operation is superseded.
|
|
210
348
|
if (!complete || !active?.complete || complete === active.complete) return;
|
|
211
349
|
stopActive(navigating.to?.url);
|
|
212
350
|
pendingNavigation = true;
|
|
351
|
+
if (controller?.active && navigating.to && navigating.from &&
|
|
352
|
+
navigating.from.url.pathname !== navigating.to.url.pathname &&
|
|
353
|
+
navigating.from.url.origin === navigating.to.url.origin) onStart?.();
|
|
213
354
|
const epoch = generation;
|
|
214
355
|
void complete
|
|
215
356
|
.catch(() => {})
|
|
@@ -218,13 +359,13 @@
|
|
|
218
359
|
});
|
|
219
360
|
});
|
|
220
361
|
|
|
221
|
-
onNavigate(
|
|
362
|
+
onNavigate((navigation) => {
|
|
222
363
|
const destination = navigation.to;
|
|
223
364
|
if (!destination) return;
|
|
224
365
|
const owner = controller;
|
|
225
366
|
const handled = handlesNavigation
|
|
226
367
|
? handlesNavigation(navigation)
|
|
227
|
-
: navigation.from?.url.
|
|
368
|
+
: navigation.from?.url.origin === destination.url.origin;
|
|
228
369
|
if (!owner?.active || !handled) return;
|
|
229
370
|
const viewContext =
|
|
230
371
|
navigation.type === 'popstate' ? {} : readCatalogViewContext(destination.url);
|
|
@@ -235,49 +376,33 @@
|
|
|
235
376
|
const token = {};
|
|
236
377
|
const epoch = ++generation;
|
|
237
378
|
owner.beginNavigation(token);
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
}
|
|
242
|
-
active =
|
|
243
|
-
let preparationTimer: ReturnType<typeof setTimeout> | undefined;
|
|
379
|
+
const binding: NonNullable<typeof active> = {
|
|
380
|
+
controller: owner, token, complete: navigation.complete,
|
|
381
|
+
committed: false, interrupted: false
|
|
382
|
+
};
|
|
383
|
+
active = binding;
|
|
244
384
|
try {
|
|
245
|
-
|
|
246
|
-
if (preparation) {
|
|
247
|
-
const prepared = await Promise.race([
|
|
248
|
-
Promise.resolve(preparation).then(() => true),
|
|
249
|
-
interrupted,
|
|
250
|
-
new Promise<boolean>((resolve) => {
|
|
251
|
-
preparationTimer = setTimeout(() => resolve(false), PREPARATION_LIMIT_MS);
|
|
252
|
-
})
|
|
253
|
-
]);
|
|
254
|
-
if (!prepared) {
|
|
255
|
-
if (epoch !== generation) return;
|
|
256
|
-
interruptVisuals();
|
|
257
|
-
}
|
|
258
|
-
}
|
|
385
|
+
onCapture?.(navigation);
|
|
259
386
|
} catch {
|
|
260
387
|
if (epoch !== generation) return;
|
|
261
388
|
interruptVisuals();
|
|
262
|
-
} finally {
|
|
263
|
-
if (preparationTimer !== undefined) clearTimeout(preparationTimer);
|
|
264
|
-
if (active?.token === token) active.releasePreparation = undefined;
|
|
265
389
|
}
|
|
266
390
|
if (epoch !== generation || !owner.active) return;
|
|
267
|
-
//
|
|
268
|
-
// restores the committed page
|
|
391
|
+
// Source ownership is secured in this call stack. Return no promise to Kit:
|
|
392
|
+
// a visual failure still restores the committed page through the same owner.
|
|
269
393
|
disableScrollHandling();
|
|
270
394
|
|
|
271
395
|
// Do not return this promise: SvelteKit must commit before it can complete.
|
|
272
396
|
void navigation.complete
|
|
273
397
|
.then(async () => {
|
|
398
|
+
binding.committed = true;
|
|
274
399
|
await tick();
|
|
275
400
|
// Kit queues fragment focus/history work after committing the page. Its
|
|
276
401
|
// scroll correction must finish before our sole destination restoration.
|
|
277
402
|
// A microtask/tick alone runs before that queued task (Kit 2.69.2).
|
|
278
403
|
if (destination.url.hash) await new Promise<void>((resolve) => setTimeout(resolve, 0));
|
|
279
404
|
if (epoch !== generation || !owner.active) return;
|
|
280
|
-
sections?.restore();
|
|
405
|
+
if (!binding.interrupted) sections?.restore();
|
|
281
406
|
let requestedSection = viewContext.targetSection;
|
|
282
407
|
if (destination.url.hash) {
|
|
283
408
|
try {
|
|
@@ -286,7 +411,7 @@
|
|
|
286
411
|
requestedSection = undefined;
|
|
287
412
|
}
|
|
288
413
|
}
|
|
289
|
-
if (navigation.type !== 'popstate' && requestedSection && viewContext.spatialElementId)
|
|
414
|
+
if (!binding.interrupted && navigation.type !== 'popstate' && requestedSection && viewContext.spatialElementId)
|
|
290
415
|
sections?.selectForView(requestedSection, viewContext.spatialElementId);
|
|
291
416
|
await tick();
|
|
292
417
|
if (epoch !== generation || !owner.active) return;
|
|
@@ -295,15 +420,15 @@
|
|
|
295
420
|
// Our bounded cache belongs to public page.state entry IDs, never URLs.
|
|
296
421
|
const saved =
|
|
297
422
|
navigation.type === 'popstate' ? entryPositions.get(entryState()?.id ?? '') : undefined;
|
|
298
|
-
const restored = owner.restoreTarget(saved ?? target, token);
|
|
299
|
-
if (!restored) syncStageScrollToNative();
|
|
423
|
+
const restored = binding.interrupted ? undefined : owner.restoreTarget(saved ?? target, token);
|
|
424
|
+
if (!restored && !binding.interrupted) syncStageScrollToNative();
|
|
300
425
|
ensureEntry();
|
|
301
426
|
const revision = focusRevision;
|
|
302
|
-
endpoints?.restoreFocus(entryState()?.focus);
|
|
427
|
+
if (!binding.interrupted) endpoints?.restoreFocus(entryState()?.focus);
|
|
303
428
|
const origin = sections?.getOrigin();
|
|
304
|
-
endpoints?.restoreOrigin(origin);
|
|
429
|
+
if (!binding.interrupted) endpoints?.restoreOrigin(origin);
|
|
305
430
|
await onRestored?.(navigation);
|
|
306
|
-
if (restored && epoch === generation && owner.active && revision === focusRevision) {
|
|
431
|
+
if (!binding.interrupted && restored && epoch === generation && owner.active && revision === focusRevision) {
|
|
307
432
|
focusDestination(navigation);
|
|
308
433
|
}
|
|
309
434
|
})
|
|
@@ -377,7 +502,7 @@
|
|
|
377
502
|
const token = {};
|
|
378
503
|
const epoch = generation;
|
|
379
504
|
owner.beginNavigation(token);
|
|
380
|
-
active = { controller: owner, token };
|
|
505
|
+
active = { controller: owner, token, committed: true, interrupted: false };
|
|
381
506
|
void tick()
|
|
382
507
|
.then(() => {
|
|
383
508
|
if (epoch !== generation || !owner.active || location.href !== start.url) return;
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type EarlyNavigationCancelReason, type EarlyNavigationHandle } from '@spatial-elements/core/catalog/EarlyNavigationCoordinator';
|
|
2
|
+
import type { BeforeNavigate, OnNavigate } from '@sveltejs/kit';
|
|
2
3
|
import type { VirtualScrollController } from '@spatial-elements/core/stage/VirtualScrollController';
|
|
3
4
|
interface Props {
|
|
4
5
|
controller?: VirtualScrollController;
|
|
5
|
-
|
|
6
|
+
onStart?: () => void;
|
|
7
|
+
/** Starts only a source-only transition whose destination is already known. */
|
|
8
|
+
onEarlyStart?: (navigation: BeforeNavigate) => EarlyNavigationHandle | undefined;
|
|
9
|
+
/** Must retain the outgoing presentation before returning; never hold Kit's commit. */
|
|
10
|
+
onCapture?: (navigation: OnNavigate) => undefined;
|
|
6
11
|
onInterrupt?: () => void;
|
|
12
|
+
/** Cancel only a still-owned visual handoff after route commit; retain destination binding. */
|
|
13
|
+
onInterruptCommitted?: (reason: EarlyNavigationCancelReason) => boolean;
|
|
7
14
|
onSupersede?: (destination: URL) => void;
|
|
8
15
|
onRestored?: (navigation: OnNavigate) => void | Promise<void>;
|
|
9
16
|
handlesNavigation?: (navigation: OnNavigate) => boolean;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getSpatialElementScene, hasSpatialElementScene } from '@spatial-elements/core/spatial-element/spatialElementScene';
|
|
1
2
|
import { getContext } from 'svelte';
|
|
2
3
|
import { resolve } from '$app/paths';
|
|
3
4
|
import { navigating } from '$app/state';
|
|
@@ -12,8 +13,8 @@ export function useCatalogNavigation() {
|
|
|
12
13
|
pending: () => navigating.to?.url,
|
|
13
14
|
prepare(spatialElement) {
|
|
14
15
|
void preloadData(href(spatialElement.href)).catch(() => { });
|
|
15
|
-
if (spatialElement
|
|
16
|
-
stage?.prefetchSpatialElement?.(spatialElement
|
|
16
|
+
if (hasSpatialElementScene(spatialElement))
|
|
17
|
+
stage?.prefetchSpatialElement?.(getSpatialElementScene(spatialElement));
|
|
17
18
|
}
|
|
18
19
|
};
|
|
19
20
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CatalogEndpointRegistry } from '@spatial-elements/core/catalog/CatalogEndpointRegistry';
|
|
2
|
+
import type { SpatialSummaryHostController } from '../spatial-element/spatialSummaryHost.svelte.js';
|
|
3
|
+
/** Semantic ownership must survive routing even if motion is declined or interrupted. */
|
|
4
|
+
export declare function prepareCatalogSummaryTransfer(options: {
|
|
5
|
+
from: URL;
|
|
6
|
+
to: URL;
|
|
7
|
+
type: string;
|
|
8
|
+
endpoints: CatalogEndpointRegistry;
|
|
9
|
+
host: SpatialSummaryHostController;
|
|
10
|
+
}): {
|
|
11
|
+
/** Call after decorative snapshots have captured the still-mounted source. */
|
|
12
|
+
hold(): void;
|
|
13
|
+
/** Call after route placement, before the destination's panel/GPU measurement. */
|
|
14
|
+
adopt(): HTMLElement | undefined;
|
|
15
|
+
cancel(): void;
|
|
16
|
+
} | undefined;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { resolveCatalogIntent } from '@spatial-elements/core/catalog/catalogRecipes';
|
|
2
|
+
/** Semantic ownership must survive routing even if motion is declined or interrupted. */
|
|
3
|
+
export function prepareCatalogSummaryTransfer(options) {
|
|
4
|
+
const { endpoints, host } = options;
|
|
5
|
+
const intent = resolveCatalogIntent(options.from, options.to, options.type, endpoints.navigation);
|
|
6
|
+
if (!intent)
|
|
7
|
+
return;
|
|
8
|
+
const returning = intent.direction === 'detail-to-list';
|
|
9
|
+
const contentSlot = returning
|
|
10
|
+
? endpoints.getPreferredContentSlot(intent.identity)
|
|
11
|
+
: endpoints.getContentSlot(intent.identity);
|
|
12
|
+
if (contentSlot !== 'carousel.front')
|
|
13
|
+
return;
|
|
14
|
+
const sourceSlot = returning ? 'detail.summary' : 'carousel.front';
|
|
15
|
+
const targetSlot = returning ? 'carousel.front' : 'detail.summary';
|
|
16
|
+
const surface = endpoints.resolve({ ...intent.identity, slot: sourceSlot, role: 'summary-surface' });
|
|
17
|
+
const retained = surface && host.retainByElement(surface);
|
|
18
|
+
if (!retained || retained.record.kind !== 'summary') {
|
|
19
|
+
retained?.restore() || retained?.release();
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const root = retained.record.root;
|
|
23
|
+
// Legacy transition snapshots hide source roles. The same nodes become the
|
|
24
|
+
// destination, so those temporary source visibility changes cannot travel.
|
|
25
|
+
const visibility = [root, ...root.querySelectorAll('*')].map(element => ({
|
|
26
|
+
element, value: element.style.getPropertyValue('visibility'), priority: element.style.getPropertyPriority('visibility')
|
|
27
|
+
}));
|
|
28
|
+
let holding;
|
|
29
|
+
let finished = false;
|
|
30
|
+
const clean = (restore) => {
|
|
31
|
+
if (finished)
|
|
32
|
+
return;
|
|
33
|
+
finished = true;
|
|
34
|
+
try {
|
|
35
|
+
if (!restore || !retained.restore())
|
|
36
|
+
retained.release();
|
|
37
|
+
}
|
|
38
|
+
finally {
|
|
39
|
+
holding?.remove();
|
|
40
|
+
holding = undefined;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
return {
|
|
44
|
+
/** Call after decorative snapshots have captured the still-mounted source. */
|
|
45
|
+
hold() {
|
|
46
|
+
if (finished || holding)
|
|
47
|
+
return;
|
|
48
|
+
holding = document.createElement('div');
|
|
49
|
+
holding.hidden = true;
|
|
50
|
+
holding.inert = true;
|
|
51
|
+
holding.dataset.spatialSummaryTransfer = '';
|
|
52
|
+
document.body.append(holding);
|
|
53
|
+
retained.hold(holding);
|
|
54
|
+
for (const { element, value, priority } of visibility) {
|
|
55
|
+
if (value)
|
|
56
|
+
element.style.setProperty('visibility', value, priority);
|
|
57
|
+
else
|
|
58
|
+
element.style.removeProperty('visibility');
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
/** Call after route placement, before the destination's panel/GPU measurement. */
|
|
62
|
+
adopt() {
|
|
63
|
+
if (finished)
|
|
64
|
+
return;
|
|
65
|
+
try {
|
|
66
|
+
const destination = endpoints.resolve({ ...intent.identity, slot: targetSlot, role: 'summary-surface' });
|
|
67
|
+
const slot = destination?.querySelector('[data-spatial-summary-slot]');
|
|
68
|
+
if (!slot || !retained.adopt(slot))
|
|
69
|
+
return;
|
|
70
|
+
retained.unfreeze();
|
|
71
|
+
return slot;
|
|
72
|
+
}
|
|
73
|
+
finally {
|
|
74
|
+
clean(true);
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
cancel() { clean(true); }
|
|
78
|
+
};
|
|
79
|
+
}
|
|
@@ -1,4 +1,30 @@
|
|
|
1
1
|
/* Loaded by the persistent stage before any destination page can mount. */
|
|
2
|
+
/* No initial-value: outside a staged reveal the guaranteed-invalid value keeps
|
|
3
|
+
the existing transition formula as the var() fallback. Do not inherit this
|
|
4
|
+
channel through text/content subtrees or another custom-property alias. */
|
|
5
|
+
@property --catalog-reveal-opacity {
|
|
6
|
+
syntax: '*';
|
|
7
|
+
inherits: false;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.stage-navigation-feedback {
|
|
11
|
+
position: fixed;
|
|
12
|
+
inset: 0 0 auto;
|
|
13
|
+
height: 3px;
|
|
14
|
+
z-index: 2147483647;
|
|
15
|
+
pointer-events: none;
|
|
16
|
+
background: var(--spatial-element-accent, #6688cc);
|
|
17
|
+
transform: scaleX(0.18);
|
|
18
|
+
transform-origin: left;
|
|
19
|
+
animation: stage-navigation-progress 6s cubic-bezier(0.12, 0.7, 0.1, 1) forwards;
|
|
20
|
+
}
|
|
21
|
+
@keyframes stage-navigation-progress {
|
|
22
|
+
to { transform: scaleX(0.9); }
|
|
23
|
+
}
|
|
24
|
+
@media (prefers-reduced-motion: reduce) {
|
|
25
|
+
.stage-navigation-feedback { animation: none; transform: none; }
|
|
26
|
+
}
|
|
27
|
+
|
|
2
28
|
.stage [data-catalog-transition-group='enter'] {
|
|
3
29
|
--stage-transition-opacity: var(--catalog-enter-opacity, 1);
|
|
4
30
|
}
|
|
@@ -9,7 +35,7 @@
|
|
|
9
35
|
|
|
10
36
|
.stage [data-catalog-transition-dom='enter'] {
|
|
11
37
|
--catalog-content-opacity: var(--catalog-enter-opacity, 1);
|
|
12
|
-
opacity: var(--catalog-content-opacity);
|
|
38
|
+
opacity: var(--catalog-reveal-opacity, var(--catalog-content-opacity));
|
|
13
39
|
}
|
|
14
40
|
|
|
15
41
|
.stage [data-catalog-transition-dom='exit'] {
|
|
@@ -35,13 +61,13 @@
|
|
|
35
61
|
.stage:is(
|
|
36
62
|
[data-catalog-recipe='list-to-dock'],
|
|
37
63
|
[data-catalog-recipe='carousel-to-dock']
|
|
38
|
-
)[data-catalog-transition]
|
|
64
|
+
)[data-catalog-transition]:not([data-catalog-staged-phase='revealing']):not([data-catalog-staged-phase='committing'])
|
|
39
65
|
[data-spatial-element-sticky-header]::before {
|
|
40
66
|
opacity: 0 !important;
|
|
41
67
|
}
|
|
42
68
|
|
|
43
69
|
.stage[data-catalog-transition] [data-catalog-transition-dom][data-stage-dom-content] {
|
|
44
|
-
opacity: calc(var(--stage-dom-opacity, 1) * var(--catalog-content-opacity, 1));
|
|
70
|
+
opacity: calc(var(--stage-dom-opacity, 1) * var(--catalog-reveal-opacity, var(--catalog-content-opacity, 1)));
|
|
45
71
|
}
|
|
46
72
|
|
|
47
73
|
/* Gate the initial paint before panel registration and renderer binding. */
|
|
@@ -51,9 +77,38 @@
|
|
|
51
77
|
visibility: hidden !important;
|
|
52
78
|
}
|
|
53
79
|
|
|
80
|
+
/* The source is stationary in its independent hold. Rasterize real destination
|
|
81
|
+
DOM now, before its fade: visibility:hidden/opacity:0 postpones the browser's
|
|
82
|
+
rounded-rectangle/path shader preparation until the first visible frame.
|
|
83
|
+
The persistent menu keeps its explicit full opacity below; canvas and held
|
|
84
|
+
source content do not use these incoming DOM variables. */
|
|
85
|
+
.stage[data-catalog-staged-phase='held'] {
|
|
86
|
+
--catalog-enter-opacity: 0.001 !important;
|
|
87
|
+
--catalog-shared-opacity: 0.001 !important;
|
|
88
|
+
}
|
|
89
|
+
.stage[data-catalog-staged-phase='held'] :is(
|
|
90
|
+
[data-catalog-transition-dom='enter'],
|
|
91
|
+
[data-catalog-transition-group='enter'],
|
|
92
|
+
[data-catalog-transition-group='shared']
|
|
93
|
+
) {
|
|
94
|
+
visibility: visible !important;
|
|
95
|
+
}
|
|
96
|
+
|
|
54
97
|
.stage[data-catalog-transition] [data-catalog-transition-dom],
|
|
55
98
|
.stage[data-catalog-transition] [data-catalog-transition-dom] *,
|
|
56
99
|
.stage[data-catalog-transition] [data-catalog-transition-group],
|
|
57
100
|
.stage[data-catalog-transition] [data-catalog-transition-group] * {
|
|
58
101
|
pointer-events: none !important;
|
|
59
102
|
}
|
|
103
|
+
|
|
104
|
+
/* The persistent shell is already present at both restored scroll positions. */
|
|
105
|
+
.stage[data-catalog-transition] [data-catalog-shell-continuous] {
|
|
106
|
+
--catalog-content-opacity: 1;
|
|
107
|
+
--stage-transition-opacity: 1;
|
|
108
|
+
opacity: 1 !important;
|
|
109
|
+
visibility: visible !important;
|
|
110
|
+
}
|
|
111
|
+
.stage[data-catalog-transition] [data-catalog-shell-continuous] [data-catalog-transition-group='enter'] {
|
|
112
|
+
--stage-transition-opacity: 1;
|
|
113
|
+
visibility: visible !important;
|
|
114
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface InterruptedCatalogPresentation {
|
|
2
|
+
finished: Promise<void>;
|
|
3
|
+
cancel(): void;
|
|
4
|
+
}
|
|
5
|
+
/** Keep semantic ownership beyond a cancelled visual overlay, never beyond its route. */
|
|
6
|
+
export declare function finishInterruptedPresentation(options: {
|
|
7
|
+
settle(): Promise<void>;
|
|
8
|
+
adopt(): HTMLElement;
|
|
9
|
+
release(): unknown;
|
|
10
|
+
}): InterruptedCatalogPresentation;
|