@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.
Files changed (235) hide show
  1. package/dist/catalog/CarouselDeviceCamera.d.ts +8 -0
  2. package/dist/catalog/CarouselDeviceCamera.d.ts.map +1 -1
  3. package/dist/catalog/CarouselDeviceCamera.js +15 -1
  4. package/dist/catalog/CarouselDeviceCamera.js.map +1 -1
  5. package/dist/catalog/CarouselGlassCompositor.d.ts +8 -2
  6. package/dist/catalog/CarouselGlassCompositor.d.ts.map +1 -1
  7. package/dist/catalog/CarouselGlassCompositor.js +69 -12
  8. package/dist/catalog/CarouselGlassCompositor.js.map +1 -1
  9. package/dist/catalog/CarouselGround.d.ts +22 -1
  10. package/dist/catalog/CarouselGround.d.ts.map +1 -1
  11. package/dist/catalog/CarouselGround.js +185 -24
  12. package/dist/catalog/CarouselGround.js.map +1 -1
  13. package/dist/catalog/CatalogDepthBlur.d.ts +20 -1
  14. package/dist/catalog/CatalogDepthBlur.d.ts.map +1 -1
  15. package/dist/catalog/CatalogDepthBlur.js +126 -23
  16. package/dist/catalog/CatalogDepthBlur.js.map +1 -1
  17. package/dist/catalog/CatalogGeometryFade.d.ts +5 -1
  18. package/dist/catalog/CatalogGeometryFade.d.ts.map +1 -1
  19. package/dist/catalog/CatalogGeometryFade.js +39 -7
  20. package/dist/catalog/CatalogGeometryFade.js.map +1 -1
  21. package/dist/catalog/CatalogModelOutline.d.ts +3 -1
  22. package/dist/catalog/CatalogModelOutline.d.ts.map +1 -1
  23. package/dist/catalog/CatalogModelOutline.js +11 -2
  24. package/dist/catalog/CatalogModelOutline.js.map +1 -1
  25. package/dist/catalog/CatalogPreparation.d.ts.map +1 -1
  26. package/dist/catalog/CatalogPreparation.js +8 -6
  27. package/dist/catalog/CatalogPreparation.js.map +1 -1
  28. package/dist/catalog/CatalogSpatialElementLayer.d.ts +129 -3
  29. package/dist/catalog/CatalogSpatialElementLayer.d.ts.map +1 -1
  30. package/dist/catalog/CatalogSpatialElementLayer.js +408 -33
  31. package/dist/catalog/CatalogSpatialElementLayer.js.map +1 -1
  32. package/dist/catalog/CatalogTransition.d.ts +4 -0
  33. package/dist/catalog/CatalogTransition.d.ts.map +1 -1
  34. package/dist/catalog/CatalogTransition.js +91 -22
  35. package/dist/catalog/CatalogTransition.js.map +1 -1
  36. package/dist/catalog/CatalogWarmOutputContext.d.ts +39 -0
  37. package/dist/catalog/CatalogWarmOutputContext.d.ts.map +1 -0
  38. package/dist/catalog/CatalogWarmOutputContext.js +159 -0
  39. package/dist/catalog/CatalogWarmOutputContext.js.map +1 -0
  40. package/dist/catalog/EarlyNavigationCoordinator.d.ts +35 -0
  41. package/dist/catalog/EarlyNavigationCoordinator.d.ts.map +1 -0
  42. package/dist/catalog/EarlyNavigationCoordinator.js +103 -0
  43. package/dist/catalog/EarlyNavigationCoordinator.js.map +1 -0
  44. package/dist/catalog/NavigationFeedback.d.ts +12 -0
  45. package/dist/catalog/NavigationFeedback.d.ts.map +1 -0
  46. package/dist/catalog/NavigationFeedback.js +40 -0
  47. package/dist/catalog/NavigationFeedback.js.map +1 -0
  48. package/dist/catalog/PreparationGate.d.ts +4 -0
  49. package/dist/catalog/PreparationGate.d.ts.map +1 -1
  50. package/dist/catalog/PreparationGate.js +1 -0
  51. package/dist/catalog/PreparationGate.js.map +1 -1
  52. package/dist/catalog/SourceDomClipping.d.ts +8 -0
  53. package/dist/catalog/SourceDomClipping.d.ts.map +1 -0
  54. package/dist/catalog/SourceDomClipping.js +74 -0
  55. package/dist/catalog/SourceDomClipping.js.map +1 -0
  56. package/dist/catalog/SourceDomMotion.d.ts +28 -0
  57. package/dist/catalog/SourceDomMotion.d.ts.map +1 -0
  58. package/dist/catalog/SourceDomMotion.js +111 -0
  59. package/dist/catalog/SourceDomMotion.js.map +1 -0
  60. package/dist/catalog/SpatialPageRegistry.d.ts +1 -0
  61. package/dist/catalog/SpatialPageRegistry.d.ts.map +1 -1
  62. package/dist/catalog/SpatialPageRegistry.js.map +1 -1
  63. package/dist/catalog/StagedCatalogTransition.d.ts +74 -0
  64. package/dist/catalog/StagedCatalogTransition.d.ts.map +1 -0
  65. package/dist/catalog/StagedCatalogTransition.js +270 -0
  66. package/dist/catalog/StagedCatalogTransition.js.map +1 -0
  67. package/dist/catalog/cardProjection.d.ts +31 -0
  68. package/dist/catalog/cardProjection.d.ts.map +1 -1
  69. package/dist/catalog/cardProjection.js +63 -4
  70. package/dist/catalog/cardProjection.js.map +1 -1
  71. package/dist/catalog/carouselPanelProjection.d.ts.map +1 -1
  72. package/dist/catalog/carouselPanelProjection.js +48 -11
  73. package/dist/catalog/carouselPanelProjection.js.map +1 -1
  74. package/dist/catalog/catalogActivationFocus.d.ts +5 -0
  75. package/dist/catalog/catalogActivationFocus.d.ts.map +1 -0
  76. package/dist/catalog/catalogActivationFocus.js +39 -0
  77. package/dist/catalog/catalogActivationFocus.js.map +1 -0
  78. package/dist/catalog/catalogJourney.d.ts +2 -0
  79. package/dist/catalog/catalogJourney.d.ts.map +1 -1
  80. package/dist/catalog/catalogJourney.js.map +1 -1
  81. package/dist/catalog/catalogPose.d.ts +18 -0
  82. package/dist/catalog/catalogPose.d.ts.map +1 -1
  83. package/dist/catalog/catalogPose.js +26 -5
  84. package/dist/catalog/catalogPose.js.map +1 -1
  85. package/dist/catalog/catalogTransitionViewport.d.ts +9 -0
  86. package/dist/catalog/catalogTransitionViewport.d.ts.map +1 -0
  87. package/dist/catalog/catalogTransitionViewport.js +13 -0
  88. package/dist/catalog/catalogTransitionViewport.js.map +1 -0
  89. package/dist/catalog/catalogViewLink.d.ts +2 -0
  90. package/dist/catalog/catalogViewLink.d.ts.map +1 -1
  91. package/dist/catalog/catalogViewLink.js +10 -2
  92. package/dist/catalog/catalogViewLink.js.map +1 -1
  93. package/dist/catalog/listDeviceOrientation.d.ts +2 -0
  94. package/dist/catalog/listDeviceOrientation.d.ts.map +1 -1
  95. package/dist/catalog/listDeviceOrientation.js +18 -1
  96. package/dist/catalog/listDeviceOrientation.js.map +1 -1
  97. package/dist/catalog/stagedDetailGeometry.d.ts +37 -0
  98. package/dist/catalog/stagedDetailGeometry.d.ts.map +1 -0
  99. package/dist/catalog/stagedDetailGeometry.js +55 -0
  100. package/dist/catalog/stagedDetailGeometry.js.map +1 -0
  101. package/dist/catalog/stagedDockGeometry.d.ts +66 -0
  102. package/dist/catalog/stagedDockGeometry.d.ts.map +1 -0
  103. package/dist/catalog/stagedDockGeometry.js +66 -0
  104. package/dist/catalog/stagedDockGeometry.js.map +1 -0
  105. package/dist/index.d.ts +2 -1
  106. package/dist/index.d.ts.map +1 -1
  107. package/dist/index.js +2 -1
  108. package/dist/index.js.map +1 -1
  109. package/dist/spatial-element/ResponsiveViewportMetrics.d.ts +18 -0
  110. package/dist/spatial-element/ResponsiveViewportMetrics.d.ts.map +1 -0
  111. package/dist/spatial-element/ResponsiveViewportMetrics.js +68 -0
  112. package/dist/spatial-element/ResponsiveViewportMetrics.js.map +1 -0
  113. package/dist/spatial-element/SectionSurfaceRegistry.d.ts +24 -0
  114. package/dist/spatial-element/SectionSurfaceRegistry.d.ts.map +1 -0
  115. package/dist/spatial-element/SectionSurfaceRegistry.js +48 -0
  116. package/dist/spatial-element/SectionSurfaceRegistry.js.map +1 -0
  117. package/dist/spatial-element/SpatialElementDockController.d.ts +19 -9
  118. package/dist/spatial-element/SpatialElementDockController.d.ts.map +1 -1
  119. package/dist/spatial-element/SpatialElementDockController.js +189 -93
  120. package/dist/spatial-element/SpatialElementDockController.js.map +1 -1
  121. package/dist/spatial-element/SpatialElementPaneController.d.ts +67 -0
  122. package/dist/spatial-element/SpatialElementPaneController.d.ts.map +1 -0
  123. package/dist/spatial-element/SpatialElementPaneController.js +245 -0
  124. package/dist/spatial-element/SpatialElementPaneController.js.map +1 -0
  125. package/dist/spatial-element/activeDetailSection.d.ts +8 -0
  126. package/dist/spatial-element/activeDetailSection.d.ts.map +1 -0
  127. package/dist/spatial-element/activeDetailSection.js +19 -0
  128. package/dist/spatial-element/activeDetailSection.js.map +1 -0
  129. package/dist/spatial-element/layoutTokens.json +53 -0
  130. package/dist/spatial-element/responsiveLayout.d.ts +1389 -0
  131. package/dist/spatial-element/responsiveLayout.d.ts.map +1 -0
  132. package/dist/spatial-element/responsiveLayout.js +265 -0
  133. package/dist/spatial-element/responsiveLayout.js.map +1 -0
  134. package/dist/spatial-element/sectionBackground.d.ts +29 -0
  135. package/dist/spatial-element/sectionBackground.d.ts.map +1 -0
  136. package/dist/spatial-element/sectionBackground.js +66 -0
  137. package/dist/spatial-element/sectionBackground.js.map +1 -0
  138. package/dist/spatial-element/spatialElement.d.ts +1 -0
  139. package/dist/spatial-element/spatialElement.d.ts.map +1 -1
  140. package/dist/spatial-element/spatialElement.js +1 -0
  141. package/dist/spatial-element/spatialElement.js.map +1 -1
  142. package/dist/spatial-element/spatialElementDock.d.ts +15 -0
  143. package/dist/spatial-element/spatialElementDock.d.ts.map +1 -1
  144. package/dist/spatial-element/spatialElementDock.js +22 -0
  145. package/dist/spatial-element/spatialElementDock.js.map +1 -1
  146. package/dist/spatial-element/spatialElementMedia.d.ts +16 -0
  147. package/dist/spatial-element/spatialElementMedia.d.ts.map +1 -0
  148. package/dist/spatial-element/spatialElementMedia.js +29 -0
  149. package/dist/spatial-element/spatialElementMedia.js.map +1 -0
  150. package/dist/spatial-element/spatialTheme.d.ts +12 -1
  151. package/dist/spatial-element/spatialTheme.d.ts.map +1 -1
  152. package/dist/spatial-element/spatialTheme.js +30 -1
  153. package/dist/spatial-element/spatialTheme.js.map +1 -1
  154. package/dist/spatial-element/types.d.ts +50 -2
  155. package/dist/spatial-element/types.d.ts.map +1 -1
  156. package/dist/spatial-element/types.js.map +1 -1
  157. package/dist/stage/BackgroundLayerOutput.d.ts +76 -0
  158. package/dist/stage/BackgroundLayerOutput.d.ts.map +1 -0
  159. package/dist/stage/BackgroundLayerOutput.js +333 -0
  160. package/dist/stage/BackgroundLayerOutput.js.map +1 -0
  161. package/dist/stage/LiquidGlassPanel.d.ts +3 -0
  162. package/dist/stage/LiquidGlassPanel.d.ts.map +1 -1
  163. package/dist/stage/LiquidGlassPanel.js +27 -2
  164. package/dist/stage/LiquidGlassPanel.js.map +1 -1
  165. package/dist/stage/MinimapController.d.ts.map +1 -1
  166. package/dist/stage/MinimapController.js +28 -47
  167. package/dist/stage/MinimapController.js.map +1 -1
  168. package/dist/stage/PageBindingController.d.ts +4 -0
  169. package/dist/stage/PageBindingController.d.ts.map +1 -1
  170. package/dist/stage/PageBindingController.js +12 -4
  171. package/dist/stage/PageBindingController.js.map +1 -1
  172. package/dist/stage/PanelPresentationController.d.ts +17 -0
  173. package/dist/stage/PanelPresentationController.d.ts.map +1 -1
  174. package/dist/stage/PanelPresentationController.js +69 -13
  175. package/dist/stage/PanelPresentationController.js.map +1 -1
  176. package/dist/stage/SpatialElementInteractionController.d.ts +7 -0
  177. package/dist/stage/SpatialElementInteractionController.d.ts.map +1 -1
  178. package/dist/stage/SpatialElementInteractionController.js +9 -0
  179. package/dist/stage/SpatialElementInteractionController.js.map +1 -1
  180. package/dist/stage/SpatialElementPresentationController.d.ts +14 -2
  181. package/dist/stage/SpatialElementPresentationController.d.ts.map +1 -1
  182. package/dist/stage/SpatialElementPresentationController.js +47 -2
  183. package/dist/stage/SpatialElementPresentationController.js.map +1 -1
  184. package/dist/stage/SpatialElementRefinement.d.ts +34 -1
  185. package/dist/stage/SpatialElementRefinement.d.ts.map +1 -1
  186. package/dist/stage/SpatialElementRefinement.js +175 -37
  187. package/dist/stage/SpatialElementRefinement.js.map +1 -1
  188. package/dist/stage/StageExperience.d.ts +167 -5
  189. package/dist/stage/StageExperience.d.ts.map +1 -1
  190. package/dist/stage/StageExperience.js +384 -58
  191. package/dist/stage/StageExperience.js.map +1 -1
  192. package/dist/stage/StageRenderPipeline.d.ts +76 -1
  193. package/dist/stage/StageRenderPipeline.d.ts.map +1 -1
  194. package/dist/stage/StageRenderPipeline.js +421 -46
  195. package/dist/stage/StageRenderPipeline.js.map +1 -1
  196. package/dist/stage/VirtualScrollController.d.ts +7 -0
  197. package/dist/stage/VirtualScrollController.d.ts.map +1 -1
  198. package/dist/stage/VirtualScrollController.js +57 -4
  199. package/dist/stage/VirtualScrollController.js.map +1 -1
  200. package/dist/stage/minimap/MinimapModel.d.ts +2 -1
  201. package/dist/stage/minimap/MinimapModel.d.ts.map +1 -1
  202. package/dist/stage/minimap/MinimapModel.js +34 -4
  203. package/dist/stage/minimap/MinimapModel.js.map +1 -1
  204. package/dist/stage/minimap/MinimapModelGeometry.d.ts +21 -0
  205. package/dist/stage/minimap/MinimapModelGeometry.d.ts.map +1 -0
  206. package/dist/stage/minimap/MinimapModelGeometry.js +68 -0
  207. package/dist/stage/minimap/MinimapModelGeometry.js.map +1 -0
  208. package/dist/stage/minimap/MinimapState.d.ts +3 -8
  209. package/dist/stage/minimap/MinimapState.d.ts.map +1 -1
  210. package/dist/stage/minimap/MinimapState.js.map +1 -1
  211. package/dist/stage/panelContext.d.ts +7 -0
  212. package/dist/stage/panelContext.d.ts.map +1 -1
  213. package/dist/stage/panelContext.js.map +1 -1
  214. package/dist/stage/rendererState.d.ts +2 -0
  215. package/dist/stage/rendererState.d.ts.map +1 -1
  216. package/dist/stage/rendererState.js +13 -0
  217. package/dist/stage/rendererState.js.map +1 -1
  218. package/dist/stage/sceneEndpointEligibility.d.ts +20 -0
  219. package/dist/stage/sceneEndpointEligibility.d.ts.map +1 -0
  220. package/dist/stage/sceneEndpointEligibility.js +363 -0
  221. package/dist/stage/sceneEndpointEligibility.js.map +1 -0
  222. package/dist/stage/stageDom.d.ts.map +1 -1
  223. package/dist/stage/stageDom.js +6 -1
  224. package/dist/stage/stageDom.js.map +1 -1
  225. package/dist/stage/stageMath.d.ts +3 -3
  226. package/dist/stage/stageMath.d.ts.map +1 -1
  227. package/dist/stage/stageMath.js +11 -10
  228. package/dist/stage/stageMath.js.map +1 -1
  229. package/dist/stage/stageTypes.d.ts +7 -1
  230. package/dist/stage/stageTypes.d.ts.map +1 -1
  231. package/dist/stage/stageTypes.js.map +1 -1
  232. package/dist/stage/stageVisualTest.d.ts +19 -0
  233. package/dist/stage/stageVisualTest.d.ts.map +1 -1
  234. package/dist/stage/stageVisualTest.js.map +1 -1
  235. package/package.json +1 -1
@@ -23,6 +23,8 @@ export declare class CatalogTransitionSequence {
23
23
  cancel(): void;
24
24
  }
25
25
  interface CatalogTransitionHooks {
26
+ /** Optional test/debug sink; no DOM or timing work on the production path. */
27
+ diagnose?(reason: string): void;
26
28
  captureContentGeometry?(endpoint: CatalogParticipantEndpoint, secondary: CatalogParticipantEndpoint[]): boolean;
27
29
  prepareContentParticipants?(pairs: CatalogParticipantPair[]): CatalogParticipantPair[] | undefined;
28
30
  adoptContentParticipants?(pairs: CatalogParticipantPair[]): void;
@@ -56,6 +58,8 @@ export declare class CatalogTransition {
56
58
  private readonly sequence;
57
59
  private captureState?;
58
60
  private readonly interrupt;
61
+ private capturedViewport?;
62
+ private readonly resize;
59
63
  private readonly keydown;
60
64
  constructor(root: HTMLElement, endpoints: CatalogEndpointRegistry, hooks: CatalogTransitionHooks);
61
65
  get active(): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"CatalogTransition.d.ts","sourceRoot":"","sources":["../../src/catalog/CatalogTransition.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAC/B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAGN,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,EAE3B,MAAM,qBAAqB,CAAC;AAI7B,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AAG9E,OAAO,EAA4B,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC7F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,EAEN,KAAK,eAAe,EAEpB,KAAK,uBAAuB,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AuhB3B,MAAM;IAKN,OAAO;IAIP,OAAO,CAAC,MAAM;IAId,OAAO,CAAC,OAAO;CA6Cf"}
@@ -1,6 +1,7 @@
1
1
  import { geometryEndpoint } from './catalogGeometryRequest.js';
2
2
  import { resolveCatalogJourney, planCatalogParticipants } from './catalogJourney.js';
3
3
  import { readCatalogViewContext } from './catalogViewLink.js';
4
+ import { catalogTransitionViewportChanged, readCatalogTransitionViewport } from './catalogTransitionViewport.js';
4
5
  import { captureCarouselElement } from './carouselPanelProjection.js';
5
6
  import { captureCardElement } from './cardProjection.js';
6
7
  import { PresentationLease } from './PresentationLease.js';
@@ -16,6 +17,15 @@ function isReturnRecipe(recipe) {
16
17
  function isRichRole(role) {
17
18
  return role === 'features' || role === 'primary-action';
18
19
  }
20
+ /** One CSS parse per detached clone instead of hundreds of CSSOM mutations.
21
+ * Retain all computed properties (including SVG and authored custom properties).
22
+ */
23
+ function freezeComputedStyle(target, style) {
24
+ let css = '';
25
+ for (const property of style)
26
+ css += property + ':' + style.getPropertyValue(property) + ';';
27
+ target.style.cssText = css;
28
+ }
19
29
  /** Full summaries retain authored row/icon layout; temporary controls never become interactive. */
20
30
  function copyRichContent(target, source) {
21
31
  const copy = source.cloneNode(true);
@@ -23,8 +33,7 @@ function copyRichContent(target, source) {
23
33
  const copies = [copy, ...copy.querySelectorAll('*')];
24
34
  for (let index = 0; index < originals.length; index++) {
25
35
  const style = getComputedStyle(originals[index]);
26
- for (const property of style)
27
- copies[index].style.setProperty(property, style.getPropertyValue(property));
36
+ freezeComputedStyle(copies[index], style);
28
37
  copies[index].style.visibility = 'visible';
29
38
  copies[index].removeAttribute('id');
30
39
  for (const attribute of [...copies[index].attributes])
@@ -176,6 +185,15 @@ export class CatalogTransition {
176
185
  sequence = new CatalogTransitionSequence();
177
186
  captureState;
178
187
  interrupt = () => this.cancel();
188
+ capturedViewport;
189
+ resize = () => {
190
+ // Android's address bar changes innerHeight without changing the svh
191
+ // layout endpoints. Only a real layout/render-scale change cancels motion.
192
+ if (this.capturedViewport && catalogTransitionViewportChanged(this.capturedViewport, readCatalogTransitionViewport())) {
193
+ this.hooks.diagnose?.('viewport-resize');
194
+ this.cancel();
195
+ }
196
+ };
179
197
  keydown = (event) => {
180
198
  if (event.key === 'Escape')
181
199
  this.cancel();
@@ -353,7 +371,9 @@ export class CatalogTransition {
353
371
  (role !== 'summary-surface' && reverse ? this.hooks.captureElement?.(source) : undefined);
354
372
  const bounds = paint?.bounds ?? (role === 'summary-surface' ? this.hooks.resolveSurface(source) : source);
355
373
  const from = bounds.getBoundingClientRect();
356
- const style = getComputedStyle(role === 'summary-surface' && reverse ? bounds : source, role === 'summary-surface' && source.closest('[data-carousel-spatial-element]') ? '::before' : null);
374
+ const carouselSurface = role === 'summary-surface' && source.closest('[data-carousel-spatial-element]')
375
+ ? source.querySelector('.spatial-summary-surface') : undefined;
376
+ const style = getComputedStyle(carouselSurface ?? (role === 'summary-surface' && reverse ? bounds : source), !carouselSurface && role === 'summary-surface' && source.closest('[data-carousel-spatial-element]') ? '::before' : null);
357
377
  const element = document.createElement('div');
358
378
  element.dataset.catalogSharedKey = catalogSharedKey(identity, role);
359
379
  element.dataset.catalogActorRole = role;
@@ -445,6 +465,7 @@ export class CatalogTransition {
445
465
  });
446
466
  }
447
467
  capture(fromURL, toURL, type) {
468
+ this.hooks.diagnose?.('capturing');
448
469
  const retained = this.captureState;
449
470
  if (retained?.paused && retained.retarget) {
450
471
  const journey = resolveCatalogJourney(fromURL, toURL, type);
@@ -577,8 +598,10 @@ export class CatalogTransition {
577
598
  recipe.source = contentSlot;
578
599
  recipe.roles = [];
579
600
  }
580
- if (!recipe || matchMedia('(prefers-reduced-motion: reduce)').matches)
601
+ if (!recipe || matchMedia('(prefers-reduced-motion: reduce)').matches) {
602
+ this.hooks.diagnose?.(recipe ? 'reduced-motion' : 'source-recipe');
581
603
  return;
604
+ }
582
605
  const identity = recipe.identity;
583
606
  const dock = recipe.source === 'detail.dock';
584
607
  const source = { ...identity, slot: recipe.source };
@@ -591,29 +614,44 @@ export class CatalogTransition {
591
614
  ...source,
592
615
  slot: reverse && !dock ? 'detail.hero' : source.slot,
593
616
  role: 'geometry'
594
- }))
617
+ })) {
618
+ this.hooks.diagnose?.('source-endpoint');
595
619
  return;
620
+ }
596
621
  if (reverse)
597
622
  recipe.roles = recipe.roles.filter((role) => {
598
623
  const element = this.endpoints.resolve({ ...source, role });
599
624
  // During docking the hero remains the geometry source. Do not resurrect
600
625
  // already clipped summary pieces just to retain their semantic roles.
601
626
  return (element &&
602
- visiblyPresented(element) &&
603
- (composition !== 'intermediate' || fullyPresented(element)));
627
+ visiblyPresented(element) && fullyPresented(element));
604
628
  });
605
- recipe.roles = recipe.roles.filter((role) => !isRichRole(role) || this.endpoints.resolve({ ...source, role }));
629
+ recipe.roles = recipe.roles.filter((role) => {
630
+ // S cards and compact Carousel summaries deliberately omit the eyebrow
631
+ // or rich content. That does not invalidate their prepared 3D endpoint.
632
+ if (role !== 'eyebrow' && !isRichRole(role))
633
+ return true;
634
+ const element = this.endpoints.resolve({ ...source, role });
635
+ return Boolean(element && hasSize(element.getBoundingClientRect()));
636
+ });
637
+ // A clipped summary (mobile fold / 3XL pane) may contribute fully visible
638
+ // title rows while its surface fades out. Rich rows need a retained surface
639
+ // to map to a compact destination which does not expose those same rows.
640
+ if (!recipe.roles.includes('summary-surface'))
641
+ recipe.roles = recipe.roles.filter(role => !isRichRole(role));
606
642
  const sources = recipe.roles.map((role) => this.endpoints.resolve({ ...source, role }));
607
- if (sources.some((element) => !element || !hasSize(element.getBoundingClientRect())))
643
+ if (sources.some((element) => !element || !hasSize(element.getBoundingClientRect()))) {
644
+ this.hooks.diagnose?.('source-role-size');
608
645
  return;
646
+ }
609
647
  const carouselTarget = composition === 'carousel'
610
648
  ? card.querySelector('.spatial-element-target') : null;
611
649
  if (!reverse && !(composition === 'carousel'
612
650
  ? visiblyPresented(card) || (carouselTarget && visiblyPresented(carouselTarget))
613
- : fullyPresented(card)))
614
- return;
615
- if (reverse && sources.some((element) => element && !fullyPresented(element)))
651
+ : fullyPresented(card))) {
652
+ this.hooks.diagnose?.('source-visibility');
616
653
  return;
654
+ }
617
655
  try {
618
656
  const endpoint = geometryEndpoint({
619
657
  ...source,
@@ -621,8 +659,10 @@ export class CatalogTransition {
621
659
  });
622
660
  if (view
623
661
  ? !this.hooks.captureContentGeometry?.(view.source, view.sources.slice(1))
624
- : !this.hooks.captureGeometry(endpoint))
662
+ : !this.hooks.captureGeometry(endpoint)) {
663
+ this.hooks.diagnose?.('source-geometry-not-ready');
625
664
  return;
665
+ }
626
666
  const token = this.sequence.begin();
627
667
  const host = document.createElement('div');
628
668
  host.dataset.catalogTransitionActors = '';
@@ -643,8 +683,10 @@ export class CatalogTransition {
643
683
  frame: 0,
644
684
  inert: new Map(),
645
685
  timeout: setTimeout(() => {
646
- if (this.captureState === capture)
686
+ if (this.captureState === capture) {
687
+ this.hooks.diagnose?.('capture-timeout');
647
688
  this.cancel();
689
+ }
648
690
  }, 5000)
649
691
  };
650
692
  this.captureState = capture;
@@ -685,17 +727,20 @@ export class CatalogTransition {
685
727
  this.root.dataset.catalogDirection = reverse || view ? 'return' : 'forward';
686
728
  this.setPresentation({ active: true, exitOpacity: 1, enterOpacity: 0, sharedOpacity: 0 });
687
729
  this.root.dataset.catalogTransition = 'captured';
730
+ this.hooks.diagnose?.('captured');
688
731
  this.root.dataset.catalogRecipe = recipe.id;
689
732
  this.root.dataset.catalogOwnershipRevision = String(capture.lease.revision);
690
733
  this.lockParticipants(capture);
691
734
  capture.observer = new MutationObserver(() => this.lockParticipants(capture));
692
735
  capture.observer.observe(this.root, { childList: true, subtree: true });
693
- window.addEventListener('resize', this.interrupt, { passive: true });
736
+ this.capturedViewport = readCatalogTransitionViewport();
737
+ window.addEventListener('resize', this.resize, { passive: true });
694
738
  window.addEventListener('wheel', this.interrupt, { passive: true, capture: true });
695
739
  window.addEventListener('touchmove', this.interrupt, { passive: true, capture: true });
696
740
  window.addEventListener('keydown', this.keydown);
697
741
  }
698
- catch {
742
+ catch (error) {
743
+ this.hooks.diagnose?.(`capture-error:${error instanceof Error ? error.message : String(error)}`);
699
744
  this.cancel();
700
745
  }
701
746
  }
@@ -723,8 +768,7 @@ export class CatalogTransition {
723
768
  const copies = [copy, ...copy.querySelectorAll('*')];
724
769
  for (let index = 0; index < originals.length; index++) {
725
770
  const computed = getComputedStyle(originals[index]);
726
- for (const property of computed)
727
- copies[index].style.setProperty(property, computed.getPropertyValue(property));
771
+ freezeComputedStyle(copies[index], computed);
728
772
  }
729
773
  for (const element of [copy, ...copy.querySelectorAll('*')]) {
730
774
  element.removeAttribute('id');
@@ -912,6 +956,7 @@ export class CatalogTransition {
912
956
  else if (reverse) {
913
957
  const slot = this.endpoints.getContentSlot(capture.identity);
914
958
  if (!slot) {
959
+ this.hooks.diagnose?.('return-content-slot');
915
960
  this.cancel();
916
961
  return;
917
962
  }
@@ -940,6 +985,7 @@ export class CatalogTransition {
940
985
  else {
941
986
  const composition = this.endpoints.getComposition(capture.identity);
942
987
  if (composition !== 'hero' && composition !== 'intermediate' && composition !== 'dock') {
988
+ this.hooks.diagnose?.('destination-composition');
943
989
  this.cancel();
944
990
  return;
945
991
  }
@@ -964,6 +1010,7 @@ export class CatalogTransition {
964
1010
  slot: capture.recipe.targetGeometry,
965
1011
  role: 'geometry'
966
1012
  })) {
1013
+ this.hooks.diagnose?.('destination-geometry-endpoint');
967
1014
  this.cancel();
968
1015
  return;
969
1016
  }
@@ -971,6 +1018,7 @@ export class CatalogTransition {
971
1018
  spatialElementId: capture.identity.spatialElementId,
972
1019
  kind: reverse ? 'content' : capture.recipe.targetGeometry === 'detail.dock' ? 'dock' : 'hero'
973
1020
  }) === false) {
1021
+ this.hooks.diagnose?.('destination-geometry-projection');
974
1022
  this.cancel();
975
1023
  return;
976
1024
  }
@@ -1007,6 +1055,7 @@ export class CatalogTransition {
1007
1055
  !(capture.recipe.targetShared.startsWith('carousel.')
1008
1056
  ? intersectsViewport(card)
1009
1057
  : fullyPresented(card))) {
1058
+ this.hooks.diagnose?.('return-target-visibility');
1010
1059
  this.cancel();
1011
1060
  return;
1012
1061
  }
@@ -1018,12 +1067,27 @@ export class CatalogTransition {
1018
1067
  const measuredTargets = new Map();
1019
1068
  const sharedTargets = new Set();
1020
1069
  const destinationCopies = document.createDocumentFragment();
1070
+ // Eyebrows are optional, notably for S cards. Fade the outgoing text
1071
+ // when the destination omits it; retain the rest of the transition.
1072
+ capture.actors = capture.actors.filter(actor => {
1073
+ if (actor.role !== 'eyebrow')
1074
+ return true;
1075
+ const eyebrow = this.endpoints.resolve({ ...capture.identity, slot: capture.recipe.targetShared, role: 'eyebrow' });
1076
+ // A registered optional role can still be omitted by responsive CSS.
1077
+ if (eyebrow && hasSize(eyebrow.getBoundingClientRect()))
1078
+ return true;
1079
+ capture.exiting.push(actor.element);
1080
+ actor.destinationCopy?.remove();
1081
+ return false;
1082
+ });
1021
1083
  for (const actor of capture.actors) {
1022
1084
  let target = this.endpoints.resolve({
1023
1085
  ...capture.identity,
1024
1086
  slot: capture.recipe.targetShared,
1025
1087
  role: actor.role
1026
1088
  });
1089
+ if (target && isRichRole(actor.role) && !hasSize(target.getBoundingClientRect()))
1090
+ target = undefined;
1027
1091
  const missingRich = !target && isRichRole(actor.role);
1028
1092
  if (missingRich) {
1029
1093
  target = this.endpoints.resolve({
@@ -1034,6 +1098,7 @@ export class CatalogTransition {
1034
1098
  actor.sourceOnly = true;
1035
1099
  }
1036
1100
  if (!target) {
1101
+ this.hooks.diagnose?.(`destination-role:${actor.role}`);
1037
1102
  this.cancel();
1038
1103
  return;
1039
1104
  }
@@ -1060,6 +1125,7 @@ export class CatalogTransition {
1060
1125
  : 'replaced';
1061
1126
  measuredTargets.set(bounds, targetRect);
1062
1127
  if (!hasSize(actor.to)) {
1128
+ this.hooks.diagnose?.(`destination-size:${actor.role}`);
1063
1129
  this.cancel();
1064
1130
  return;
1065
1131
  }
@@ -1110,8 +1176,7 @@ export class CatalogTransition {
1110
1176
  const copies = [copy, ...copy.querySelectorAll('*')];
1111
1177
  for (let index = 0; index < originals.length; index++) {
1112
1178
  const style = getComputedStyle(originals[index]);
1113
- for (const property of style)
1114
- copies[index].style.setProperty(property, style.getPropertyValue(property));
1179
+ freezeComputedStyle(copies[index], style);
1115
1180
  // The live destination is deliberately masked during binding.
1116
1181
  copies[index].style.visibility = 'visible';
1117
1182
  }
@@ -1165,6 +1230,7 @@ export class CatalogTransition {
1165
1230
  const current = element.getBoundingClientRect();
1166
1231
  if (Math.abs(current.width - rect.width) > 1 ||
1167
1232
  Math.abs(current.height - rect.height) > 1) {
1233
+ this.hooks.diagnose?.('destination-layout-changed');
1168
1234
  this.cancel();
1169
1235
  return;
1170
1236
  }
@@ -1178,6 +1244,7 @@ export class CatalogTransition {
1178
1244
  }
1179
1245
  this.lockParticipants(capture);
1180
1246
  this.root.dataset.catalogTransition = 'animating';
1247
+ this.hooks.diagnose?.('animating');
1181
1248
  if (matchMedia('(prefers-reduced-motion: reduce)').matches) {
1182
1249
  this.hooks.setGeometryProgress(1);
1183
1250
  this.settle(capture.token);
@@ -1308,7 +1375,8 @@ export class CatalogTransition {
1308
1375
  capture.frame = requestAnimationFrame(frame);
1309
1376
  });
1310
1377
  }
1311
- catch {
1378
+ catch (error) {
1379
+ this.hooks.diagnose?.(`play-error:${error instanceof Error ? error.message : String(error)}`);
1312
1380
  this.cancel();
1313
1381
  }
1314
1382
  }
@@ -1330,7 +1398,8 @@ export class CatalogTransition {
1330
1398
  delete this.root.dataset.catalogRecipe;
1331
1399
  delete this.root.dataset.catalogOwnershipRevision;
1332
1400
  delete this.root.dataset.catalogDirection;
1333
- window.removeEventListener('resize', this.interrupt);
1401
+ window.removeEventListener('resize', this.resize);
1402
+ this.capturedViewport = undefined;
1334
1403
  window.removeEventListener('wheel', this.interrupt, true);
1335
1404
  window.removeEventListener('touchmove', this.interrupt, true);
1336
1405
  window.removeEventListener('keydown', this.keydown);