@spatial-elements/core 0.1.0-beta.1 → 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.
Files changed (367) hide show
  1. package/README.md +17 -9
  2. package/dist/catalog/CarouselDeviceCamera.d.ts +20 -0
  3. package/dist/catalog/CarouselDeviceCamera.d.ts.map +1 -0
  4. package/dist/catalog/CarouselDeviceCamera.js +58 -0
  5. package/dist/catalog/CarouselDeviceCamera.js.map +1 -0
  6. package/dist/catalog/CarouselGlassCompositor.d.ts +14 -3
  7. package/dist/catalog/CarouselGlassCompositor.d.ts.map +1 -1
  8. package/dist/catalog/CarouselGlassCompositor.js +164 -28
  9. package/dist/catalog/CarouselGlassCompositor.js.map +1 -1
  10. package/dist/catalog/CarouselGround.d.ts +43 -0
  11. package/dist/catalog/CarouselGround.d.ts.map +1 -0
  12. package/dist/catalog/CarouselGround.js +270 -0
  13. package/dist/catalog/CarouselGround.js.map +1 -0
  14. package/dist/catalog/CarouselSectionSurfaces.d.ts +10 -0
  15. package/dist/catalog/CarouselSectionSurfaces.d.ts.map +1 -0
  16. package/dist/catalog/CarouselSectionSurfaces.js +55 -0
  17. package/dist/catalog/CarouselSectionSurfaces.js.map +1 -0
  18. package/dist/catalog/CatalogDepthBlur.d.ts +45 -0
  19. package/dist/catalog/CatalogDepthBlur.d.ts.map +1 -0
  20. package/dist/catalog/CatalogDepthBlur.js +190 -0
  21. package/dist/catalog/CatalogDepthBlur.js.map +1 -0
  22. package/dist/catalog/CatalogEndpointRegistry.d.ts +2 -0
  23. package/dist/catalog/CatalogEndpointRegistry.d.ts.map +1 -1
  24. package/dist/catalog/CatalogEndpointRegistry.js +2 -0
  25. package/dist/catalog/CatalogEndpointRegistry.js.map +1 -1
  26. package/dist/catalog/CatalogGeometryFade.d.ts +5 -1
  27. package/dist/catalog/CatalogGeometryFade.d.ts.map +1 -1
  28. package/dist/catalog/CatalogGeometryFade.js +45 -9
  29. package/dist/catalog/CatalogGeometryFade.js.map +1 -1
  30. package/dist/catalog/CatalogModelOutline.d.ts +33 -0
  31. package/dist/catalog/CatalogModelOutline.d.ts.map +1 -0
  32. package/dist/catalog/CatalogModelOutline.js +143 -0
  33. package/dist/catalog/CatalogModelOutline.js.map +1 -0
  34. package/dist/catalog/CatalogNavigationRegistry.d.ts +44 -0
  35. package/dist/catalog/CatalogNavigationRegistry.d.ts.map +1 -0
  36. package/dist/catalog/CatalogNavigationRegistry.js +66 -0
  37. package/dist/catalog/CatalogNavigationRegistry.js.map +1 -0
  38. package/dist/catalog/CatalogPreparation.d.ts +3 -3
  39. package/dist/catalog/CatalogPreparation.d.ts.map +1 -1
  40. package/dist/catalog/CatalogPreparation.js +10 -7
  41. package/dist/catalog/CatalogPreparation.js.map +1 -1
  42. package/dist/catalog/CatalogSpatialElementLayer.d.ts +175 -5
  43. package/dist/catalog/CatalogSpatialElementLayer.d.ts.map +1 -1
  44. package/dist/catalog/CatalogSpatialElementLayer.js +739 -121
  45. package/dist/catalog/CatalogSpatialElementLayer.js.map +1 -1
  46. package/dist/catalog/CatalogTransition.d.ts +4 -2
  47. package/dist/catalog/CatalogTransition.d.ts.map +1 -1
  48. package/dist/catalog/CatalogTransition.js +206 -90
  49. package/dist/catalog/CatalogTransition.js.map +1 -1
  50. package/dist/catalog/CatalogWarmOutputContext.d.ts +39 -0
  51. package/dist/catalog/CatalogWarmOutputContext.d.ts.map +1 -0
  52. package/dist/catalog/CatalogWarmOutputContext.js +159 -0
  53. package/dist/catalog/CatalogWarmOutputContext.js.map +1 -0
  54. package/dist/catalog/EarlyNavigationCoordinator.d.ts +35 -0
  55. package/dist/catalog/EarlyNavigationCoordinator.d.ts.map +1 -0
  56. package/dist/catalog/EarlyNavigationCoordinator.js +103 -0
  57. package/dist/catalog/EarlyNavigationCoordinator.js.map +1 -0
  58. package/dist/catalog/NavigationFeedback.d.ts +12 -0
  59. package/dist/catalog/NavigationFeedback.d.ts.map +1 -0
  60. package/dist/catalog/NavigationFeedback.js +40 -0
  61. package/dist/catalog/NavigationFeedback.js.map +1 -0
  62. package/dist/catalog/PreparationGate.d.ts +4 -0
  63. package/dist/catalog/PreparationGate.d.ts.map +1 -1
  64. package/dist/catalog/PreparationGate.js +1 -0
  65. package/dist/catalog/PreparationGate.js.map +1 -1
  66. package/dist/catalog/SourceDomClipping.d.ts +8 -0
  67. package/dist/catalog/SourceDomClipping.d.ts.map +1 -0
  68. package/dist/catalog/SourceDomClipping.js +74 -0
  69. package/dist/catalog/SourceDomClipping.js.map +1 -0
  70. package/dist/catalog/SourceDomMotion.d.ts +28 -0
  71. package/dist/catalog/SourceDomMotion.d.ts.map +1 -0
  72. package/dist/catalog/SourceDomMotion.js +111 -0
  73. package/dist/catalog/SourceDomMotion.js.map +1 -0
  74. package/dist/catalog/SpatialGeometryCapture.d.ts +9 -0
  75. package/dist/catalog/SpatialGeometryCapture.d.ts.map +1 -1
  76. package/dist/catalog/SpatialGeometryCapture.js +11 -1
  77. package/dist/catalog/SpatialGeometryCapture.js.map +1 -1
  78. package/dist/catalog/SpatialPageRegistry.d.ts +18 -0
  79. package/dist/catalog/SpatialPageRegistry.d.ts.map +1 -0
  80. package/dist/catalog/SpatialPageRegistry.js +21 -0
  81. package/dist/catalog/SpatialPageRegistry.js.map +1 -0
  82. package/dist/catalog/StagedCatalogTransition.d.ts +74 -0
  83. package/dist/catalog/StagedCatalogTransition.d.ts.map +1 -0
  84. package/dist/catalog/StagedCatalogTransition.js +270 -0
  85. package/dist/catalog/StagedCatalogTransition.js.map +1 -0
  86. package/dist/catalog/cardModelFit.d.ts +7 -0
  87. package/dist/catalog/cardModelFit.d.ts.map +1 -0
  88. package/dist/catalog/cardModelFit.js +16 -0
  89. package/dist/catalog/cardModelFit.js.map +1 -0
  90. package/dist/catalog/cardProjection.d.ts +39 -0
  91. package/dist/catalog/cardProjection.d.ts.map +1 -0
  92. package/dist/catalog/cardProjection.js +110 -0
  93. package/dist/catalog/cardProjection.js.map +1 -0
  94. package/dist/catalog/carouselMotion.d.ts +74 -0
  95. package/dist/catalog/carouselMotion.d.ts.map +1 -0
  96. package/dist/catalog/carouselMotion.js +185 -0
  97. package/dist/catalog/carouselMotion.js.map +1 -0
  98. package/dist/catalog/carouselPanelProjection.d.ts.map +1 -1
  99. package/dist/catalog/carouselPanelProjection.js +48 -11
  100. package/dist/catalog/carouselPanelProjection.js.map +1 -1
  101. package/dist/catalog/carouselProximity.d.ts +11 -0
  102. package/dist/catalog/carouselProximity.d.ts.map +1 -0
  103. package/dist/catalog/carouselProximity.js +13 -0
  104. package/dist/catalog/carouselProximity.js.map +1 -0
  105. package/dist/catalog/carouselSupport.d.ts +4 -0
  106. package/dist/catalog/carouselSupport.d.ts.map +1 -0
  107. package/dist/catalog/carouselSupport.js +30 -0
  108. package/dist/catalog/carouselSupport.js.map +1 -0
  109. package/dist/catalog/catalogActivationFocus.d.ts +5 -0
  110. package/dist/catalog/catalogActivationFocus.d.ts.map +1 -0
  111. package/dist/catalog/catalogActivationFocus.js +39 -0
  112. package/dist/catalog/catalogActivationFocus.js.map +1 -0
  113. package/dist/catalog/catalogDomSnapshot.d.ts +18 -0
  114. package/dist/catalog/catalogDomSnapshot.d.ts.map +1 -0
  115. package/dist/catalog/catalogDomSnapshot.js +51 -0
  116. package/dist/catalog/catalogDomSnapshot.js.map +1 -0
  117. package/dist/catalog/catalogJourney.d.ts +4 -1
  118. package/dist/catalog/catalogJourney.d.ts.map +1 -1
  119. package/dist/catalog/catalogJourney.js +7 -15
  120. package/dist/catalog/catalogJourney.js.map +1 -1
  121. package/dist/catalog/catalogPage.d.ts +7 -3
  122. package/dist/catalog/catalogPage.d.ts.map +1 -1
  123. package/dist/catalog/catalogPage.js.map +1 -1
  124. package/dist/catalog/catalogPose.d.ts +54 -6
  125. package/dist/catalog/catalogPose.d.ts.map +1 -1
  126. package/dist/catalog/catalogPose.js +100 -23
  127. package/dist/catalog/catalogPose.js.map +1 -1
  128. package/dist/catalog/catalogRecipes.d.ts +3 -2
  129. package/dist/catalog/catalogRecipes.d.ts.map +1 -1
  130. package/dist/catalog/catalogRecipes.js +10 -25
  131. package/dist/catalog/catalogRecipes.js.map +1 -1
  132. package/dist/catalog/catalogTransitionViewport.d.ts +9 -0
  133. package/dist/catalog/catalogTransitionViewport.d.ts.map +1 -0
  134. package/dist/catalog/catalogTransitionViewport.js +13 -0
  135. package/dist/catalog/catalogTransitionViewport.js.map +1 -0
  136. package/dist/catalog/catalogViewLink.d.ts +2 -0
  137. package/dist/catalog/catalogViewLink.d.ts.map +1 -1
  138. package/dist/catalog/catalogViewLink.js +10 -2
  139. package/dist/catalog/catalogViewLink.js.map +1 -1
  140. package/dist/catalog/deviceYaw.d.ts +21 -0
  141. package/dist/catalog/deviceYaw.d.ts.map +1 -0
  142. package/dist/catalog/deviceYaw.js +87 -0
  143. package/dist/catalog/deviceYaw.js.map +1 -0
  144. package/dist/catalog/listDeviceOrientation.d.ts +17 -0
  145. package/dist/catalog/listDeviceOrientation.d.ts.map +1 -0
  146. package/dist/catalog/listDeviceOrientation.js +262 -0
  147. package/dist/catalog/listDeviceOrientation.js.map +1 -0
  148. package/dist/catalog/spatialElementAssets.d.ts +5 -5
  149. package/dist/catalog/spatialElementAssets.d.ts.map +1 -1
  150. package/dist/catalog/spatialElementAssets.js.map +1 -1
  151. package/dist/catalog/spatialElementLodPair.d.ts +2 -1
  152. package/dist/catalog/spatialElementLodPair.d.ts.map +1 -1
  153. package/dist/catalog/spatialElementLodPair.js.map +1 -1
  154. package/dist/catalog/stagedDetailGeometry.d.ts +37 -0
  155. package/dist/catalog/stagedDetailGeometry.d.ts.map +1 -0
  156. package/dist/catalog/stagedDetailGeometry.js +55 -0
  157. package/dist/catalog/stagedDetailGeometry.js.map +1 -0
  158. package/dist/catalog/stagedDockGeometry.d.ts +66 -0
  159. package/dist/catalog/stagedDockGeometry.d.ts.map +1 -0
  160. package/dist/catalog/stagedDockGeometry.js +66 -0
  161. package/dist/catalog/stagedDockGeometry.js.map +1 -0
  162. package/dist/index.d.ts +6 -2
  163. package/dist/index.d.ts.map +1 -1
  164. package/dist/index.js +5 -1
  165. package/dist/index.js.map +1 -1
  166. package/dist/spatial-element/ResponsiveViewportMetrics.d.ts +18 -0
  167. package/dist/spatial-element/ResponsiveViewportMetrics.d.ts.map +1 -0
  168. package/dist/spatial-element/ResponsiveViewportMetrics.js +68 -0
  169. package/dist/spatial-element/ResponsiveViewportMetrics.js.map +1 -0
  170. package/dist/spatial-element/SectionSurfaceRegistry.d.ts +2 -0
  171. package/dist/spatial-element/SectionSurfaceRegistry.d.ts.map +1 -0
  172. package/dist/spatial-element/SectionSurfaceRegistry.js +2 -0
  173. package/dist/spatial-element/SectionSurfaceRegistry.js.map +1 -0
  174. package/dist/spatial-element/SpatialElementDockController.d.ts +22 -10
  175. package/dist/spatial-element/SpatialElementDockController.d.ts.map +1 -1
  176. package/dist/spatial-element/SpatialElementDockController.js +228 -96
  177. package/dist/spatial-element/SpatialElementDockController.js.map +1 -1
  178. package/dist/spatial-element/SpatialElementPaneController.d.ts +67 -0
  179. package/dist/spatial-element/SpatialElementPaneController.d.ts.map +1 -0
  180. package/dist/spatial-element/SpatialElementPaneController.js +246 -0
  181. package/dist/spatial-element/SpatialElementPaneController.js.map +1 -0
  182. package/dist/spatial-element/activeDetailSection.d.ts +8 -0
  183. package/dist/spatial-element/activeDetailSection.d.ts.map +1 -0
  184. package/dist/spatial-element/activeDetailSection.js +19 -0
  185. package/dist/spatial-element/activeDetailSection.js.map +1 -0
  186. package/dist/spatial-element/layoutTokens.json +228 -0
  187. package/dist/spatial-element/messages.d.ts +34 -0
  188. package/dist/spatial-element/messages.d.ts.map +1 -0
  189. package/dist/spatial-element/messages.js +34 -0
  190. package/dist/spatial-element/messages.js.map +1 -0
  191. package/dist/spatial-element/responsiveLayout.d.ts +1353 -0
  192. package/dist/spatial-element/responsiveLayout.d.ts.map +1 -0
  193. package/dist/spatial-element/responsiveLayout.js +210 -0
  194. package/dist/spatial-element/responsiveLayout.js.map +1 -0
  195. package/dist/spatial-element/sectionBackground.d.ts +3 -0
  196. package/dist/spatial-element/sectionBackground.d.ts.map +1 -0
  197. package/dist/spatial-element/sectionBackground.js +2 -0
  198. package/dist/spatial-element/sectionBackground.js.map +1 -0
  199. package/dist/spatial-element/spatialElement.d.ts +17 -12
  200. package/dist/spatial-element/spatialElement.d.ts.map +1 -1
  201. package/dist/spatial-element/spatialElement.js +33 -6
  202. package/dist/spatial-element/spatialElement.js.map +1 -1
  203. package/dist/spatial-element/spatialElementDock.d.ts +15 -0
  204. package/dist/spatial-element/spatialElementDock.d.ts.map +1 -1
  205. package/dist/spatial-element/spatialElementDock.js +22 -0
  206. package/dist/spatial-element/spatialElementDock.js.map +1 -1
  207. package/dist/spatial-element/spatialElementGeometry.d.ts +22 -0
  208. package/dist/spatial-element/spatialElementGeometry.d.ts.map +1 -0
  209. package/dist/spatial-element/spatialElementGeometry.js +40 -0
  210. package/dist/spatial-element/spatialElementGeometry.js.map +1 -0
  211. package/dist/spatial-element/spatialElementMedia.d.ts +16 -0
  212. package/dist/spatial-element/spatialElementMedia.d.ts.map +1 -0
  213. package/dist/spatial-element/spatialElementMedia.js +29 -0
  214. package/dist/spatial-element/spatialElementMedia.js.map +1 -0
  215. package/dist/spatial-element/spatialElementScene.d.ts +16 -0
  216. package/dist/spatial-element/spatialElementScene.d.ts.map +1 -0
  217. package/dist/spatial-element/spatialElementScene.js +22 -0
  218. package/dist/spatial-element/spatialElementScene.js.map +1 -0
  219. package/dist/spatial-element/spatialElementSectionRegistry.d.ts +6 -25
  220. package/dist/spatial-element/spatialElementSectionRegistry.d.ts.map +1 -1
  221. package/dist/spatial-element/spatialElementSectionRegistry.js +6 -63
  222. package/dist/spatial-element/spatialElementSectionRegistry.js.map +1 -1
  223. package/dist/spatial-element/spatialTheme.d.ts +27 -0
  224. package/dist/spatial-element/spatialTheme.d.ts.map +1 -0
  225. package/dist/spatial-element/spatialTheme.js +83 -0
  226. package/dist/spatial-element/spatialTheme.js.map +1 -0
  227. package/dist/spatial-element/types.d.ts +117 -36
  228. package/dist/spatial-element/types.d.ts.map +1 -1
  229. package/dist/spatial-element/types.js.map +1 -1
  230. package/dist/stage/BackgroundLayerOutput.d.ts +76 -0
  231. package/dist/stage/BackgroundLayerOutput.d.ts.map +1 -0
  232. package/dist/stage/BackgroundLayerOutput.js +333 -0
  233. package/dist/stage/BackgroundLayerOutput.js.map +1 -0
  234. package/dist/stage/DeviceGeometryMotion.d.ts +13 -0
  235. package/dist/stage/DeviceGeometryMotion.d.ts.map +1 -0
  236. package/dist/stage/DeviceGeometryMotion.js +37 -0
  237. package/dist/stage/DeviceGeometryMotion.js.map +1 -0
  238. package/dist/stage/LiquidGlassPanel.d.ts +7 -0
  239. package/dist/stage/LiquidGlassPanel.d.ts.map +1 -1
  240. package/dist/stage/LiquidGlassPanel.js +46 -5
  241. package/dist/stage/LiquidGlassPanel.js.map +1 -1
  242. package/dist/stage/MinimapController.d.ts +4 -1
  243. package/dist/stage/MinimapController.d.ts.map +1 -1
  244. package/dist/stage/MinimapController.js +57 -66
  245. package/dist/stage/MinimapController.js.map +1 -1
  246. package/dist/stage/ModelPointerPreview.d.ts +22 -0
  247. package/dist/stage/ModelPointerPreview.d.ts.map +1 -0
  248. package/dist/stage/ModelPointerPreview.js +71 -0
  249. package/dist/stage/ModelPointerPreview.js.map +1 -0
  250. package/dist/stage/PageBindingController.d.ts +10 -0
  251. package/dist/stage/PageBindingController.d.ts.map +1 -1
  252. package/dist/stage/PageBindingController.js +45 -5
  253. package/dist/stage/PageBindingController.js.map +1 -1
  254. package/dist/stage/PanelPresentationController.d.ts +21 -1
  255. package/dist/stage/PanelPresentationController.d.ts.map +1 -1
  256. package/dist/stage/PanelPresentationController.js +190 -31
  257. package/dist/stage/PanelPresentationController.js.map +1 -1
  258. package/dist/stage/SpatialElementInteractionController.d.ts +19 -1
  259. package/dist/stage/SpatialElementInteractionController.d.ts.map +1 -1
  260. package/dist/stage/SpatialElementInteractionController.js +134 -13
  261. package/dist/stage/SpatialElementInteractionController.js.map +1 -1
  262. package/dist/stage/SpatialElementPresentationController.d.ts +14 -2
  263. package/dist/stage/SpatialElementPresentationController.d.ts.map +1 -1
  264. package/dist/stage/SpatialElementPresentationController.js +47 -2
  265. package/dist/stage/SpatialElementPresentationController.js.map +1 -1
  266. package/dist/stage/SpatialElementRefinement.d.ts +34 -1
  267. package/dist/stage/SpatialElementRefinement.d.ts.map +1 -1
  268. package/dist/stage/SpatialElementRefinement.js +175 -37
  269. package/dist/stage/SpatialElementRefinement.js.map +1 -1
  270. package/dist/stage/StageExperience.d.ts +263 -10
  271. package/dist/stage/StageExperience.d.ts.map +1 -1
  272. package/dist/stage/StageExperience.js +655 -124
  273. package/dist/stage/StageExperience.js.map +1 -1
  274. package/dist/stage/StageFullscreenController.d.ts +17 -0
  275. package/dist/stage/StageFullscreenController.d.ts.map +1 -0
  276. package/dist/stage/StageFullscreenController.js +90 -0
  277. package/dist/stage/StageFullscreenController.js.map +1 -0
  278. package/dist/stage/StagePanelRuntime.d.ts +2 -1
  279. package/dist/stage/StagePanelRuntime.d.ts.map +1 -1
  280. package/dist/stage/StagePanelRuntime.js.map +1 -1
  281. package/dist/stage/StageRenderPipeline.d.ts +90 -2
  282. package/dist/stage/StageRenderPipeline.d.ts.map +1 -1
  283. package/dist/stage/StageRenderPipeline.js +494 -119
  284. package/dist/stage/StageRenderPipeline.js.map +1 -1
  285. package/dist/stage/VirtualScrollController.d.ts +7 -0
  286. package/dist/stage/VirtualScrollController.d.ts.map +1 -1
  287. package/dist/stage/VirtualScrollController.js +63 -6
  288. package/dist/stage/VirtualScrollController.js.map +1 -1
  289. package/dist/stage/inertLease.d.ts +2 -0
  290. package/dist/stage/inertLease.d.ts.map +1 -0
  291. package/dist/stage/inertLease.js +18 -0
  292. package/dist/stage/inertLease.js.map +1 -0
  293. package/dist/stage/interactionGuidance.d.ts +22 -0
  294. package/dist/stage/interactionGuidance.d.ts.map +1 -0
  295. package/dist/stage/interactionGuidance.js +53 -0
  296. package/dist/stage/interactionGuidance.js.map +1 -0
  297. package/dist/stage/interactionOutline.d.ts +14 -0
  298. package/dist/stage/interactionOutline.d.ts.map +1 -0
  299. package/dist/stage/interactionOutline.js +59 -0
  300. package/dist/stage/interactionOutline.js.map +1 -0
  301. package/dist/stage/minimap/MinimapGeometry.d.ts.map +1 -1
  302. package/dist/stage/minimap/MinimapGeometry.js +29 -0
  303. package/dist/stage/minimap/MinimapGeometry.js.map +1 -1
  304. package/dist/stage/minimap/MinimapModel.d.ts +2 -1
  305. package/dist/stage/minimap/MinimapModel.d.ts.map +1 -1
  306. package/dist/stage/minimap/MinimapModel.js +34 -4
  307. package/dist/stage/minimap/MinimapModel.js.map +1 -1
  308. package/dist/stage/minimap/MinimapModelGeometry.d.ts +21 -0
  309. package/dist/stage/minimap/MinimapModelGeometry.d.ts.map +1 -0
  310. package/dist/stage/minimap/MinimapModelGeometry.js +68 -0
  311. package/dist/stage/minimap/MinimapModelGeometry.js.map +1 -0
  312. package/dist/stage/minimap/MinimapProjection.d.ts +7 -0
  313. package/dist/stage/minimap/MinimapProjection.d.ts.map +1 -1
  314. package/dist/stage/minimap/MinimapProjection.js +14 -13
  315. package/dist/stage/minimap/MinimapProjection.js.map +1 -1
  316. package/dist/stage/minimap/MinimapState.d.ts +3 -8
  317. package/dist/stage/minimap/MinimapState.d.ts.map +1 -1
  318. package/dist/stage/minimap/MinimapState.js.map +1 -1
  319. package/dist/stage/mouseHover.d.ts +9 -0
  320. package/dist/stage/mouseHover.d.ts.map +1 -0
  321. package/dist/stage/mouseHover.js +55 -0
  322. package/dist/stage/mouseHover.js.map +1 -0
  323. package/dist/stage/panelContext.d.ts +27 -2
  324. package/dist/stage/panelContext.d.ts.map +1 -1
  325. package/dist/stage/panelContext.js.map +1 -1
  326. package/dist/stage/renderSettings.d.ts +10 -0
  327. package/dist/stage/renderSettings.d.ts.map +1 -0
  328. package/dist/stage/renderSettings.js +27 -0
  329. package/dist/stage/renderSettings.js.map +1 -0
  330. package/dist/stage/renderTargetInventory.d.ts +1 -1
  331. package/dist/stage/renderTargetInventory.js +1 -1
  332. package/dist/stage/renderTargetInventory.js.map +1 -1
  333. package/dist/stage/rendererState.d.ts +2 -0
  334. package/dist/stage/rendererState.d.ts.map +1 -1
  335. package/dist/stage/rendererState.js +13 -0
  336. package/dist/stage/rendererState.js.map +1 -1
  337. package/dist/stage/sceneEndpointEligibility.d.ts +20 -0
  338. package/dist/stage/sceneEndpointEligibility.d.ts.map +1 -0
  339. package/dist/stage/sceneEndpointEligibility.js +363 -0
  340. package/dist/stage/sceneEndpointEligibility.js.map +1 -0
  341. package/dist/stage/scrollFrame.d.ts +2 -0
  342. package/dist/stage/scrollFrame.d.ts.map +1 -1
  343. package/dist/stage/scrollFrame.js +18 -5
  344. package/dist/stage/scrollFrame.js.map +1 -1
  345. package/dist/stage/spatialElementFrame.d.ts.map +1 -1
  346. package/dist/stage/spatialElementFrame.js +5 -1
  347. package/dist/stage/spatialElementFrame.js.map +1 -1
  348. package/dist/stage/stageConstants.d.ts +3 -3
  349. package/dist/stage/stageConstants.d.ts.map +1 -1
  350. package/dist/stage/stageConstants.js +6 -6
  351. package/dist/stage/stageConstants.js.map +1 -1
  352. package/dist/stage/stageDom.d.ts +2 -0
  353. package/dist/stage/stageDom.d.ts.map +1 -1
  354. package/dist/stage/stageDom.js +10 -1
  355. package/dist/stage/stageDom.js.map +1 -1
  356. package/dist/stage/stageMath.d.ts +9 -10
  357. package/dist/stage/stageMath.d.ts.map +1 -1
  358. package/dist/stage/stageMath.js +23 -21
  359. package/dist/stage/stageMath.js.map +1 -1
  360. package/dist/stage/stageTypes.d.ts +30 -3
  361. package/dist/stage/stageTypes.d.ts.map +1 -1
  362. package/dist/stage/stageTypes.js.map +1 -1
  363. package/dist/stage/stageVisualTest.d.ts +24 -1
  364. package/dist/stage/stageVisualTest.d.ts.map +1 -1
  365. package/dist/stage/stageVisualTest.js.map +1 -1
  366. package/logo.svg +188 -0
  367. package/package.json +7 -5
@@ -1,12 +1,16 @@
1
+ import { setInertLease } from '../stage/inertLease.js';
1
2
  import { geometryEndpoint } from './catalogGeometryRequest.js';
2
3
  import { resolveCatalogJourney, planCatalogParticipants } from './catalogJourney.js';
3
4
  import { readCatalogViewContext } from './catalogViewLink.js';
5
+ import { catalogTransitionViewportChanged, readCatalogTransitionViewport } from './catalogTransitionViewport.js';
4
6
  import { captureCarouselElement } from './carouselPanelProjection.js';
7
+ import { captureCardElement } from './cardProjection.js';
5
8
  import { PresentationLease } from './PresentationLease.js';
6
9
  import { rebasePresentation } from './rebasePresentation.js';
7
10
  import { getProjectiveCssMatrix3d } from '../stage/cssProjection.js';
8
11
  import { catalogSharedKey } from './CatalogEndpointRegistry.js';
9
12
  import { resolveCatalogIntent, selectCatalogRecipe } from './catalogRecipes.js';
13
+ import { snapshotCatalogDom } from './catalogDomSnapshot.js';
10
14
  export { catalogSharedKey } from './CatalogEndpointRegistry.js';
11
15
  import { MOTION_DURATION as DURATION, transitionTiming } from './transitionTiming.js';
12
16
  function isReturnRecipe(recipe) {
@@ -17,18 +21,13 @@ function isRichRole(role) {
17
21
  }
18
22
  /** Full summaries retain authored row/icon layout; temporary controls never become interactive. */
19
23
  function copyRichContent(target, source) {
20
- const copy = source.cloneNode(true);
21
- const originals = [source, ...source.querySelectorAll('*')];
22
- const copies = [copy, ...copy.querySelectorAll('*')];
23
- for (let index = 0; index < originals.length; index++) {
24
- const style = getComputedStyle(originals[index]);
25
- for (const property of style)
26
- copies[index].style.setProperty(property, style.getPropertyValue(property));
27
- copies[index].style.visibility = 'visible';
28
- copies[index].removeAttribute('id');
29
- for (const attribute of [...copies[index].attributes])
24
+ const { copy, elements } = snapshotCatalogDom(source);
25
+ for (const { copy: element } of elements) {
26
+ element.style.visibility = 'visible';
27
+ element.removeAttribute('id');
28
+ for (const attribute of [...element.attributes])
30
29
  if (attribute.name.startsWith('data-'))
31
- copies[index].removeAttribute(attribute.name);
30
+ element.removeAttribute(attribute.name);
32
31
  }
33
32
  Object.assign(copy.style, {
34
33
  position: 'relative',
@@ -44,14 +43,6 @@ function copyRichContent(target, source) {
44
43
  copy.setAttribute('aria-hidden', 'true');
45
44
  target.append(copy);
46
45
  }
47
- /** Only the forward list-to-hero edge is part of the first vertical slice. */
48
- export function resolveCatalogTransition(from, to, type) {
49
- if (type === 'popstate' ||
50
- to.hash ||
51
- !from.pathname.replace(/\/$/, '').endsWith('/categories/list'))
52
- return;
53
- return selectCatalogRecipe(resolveCatalogIntent(from, to, type), 'list', 'hero')?.identity;
54
- }
55
46
  /** A stale animation completion cannot settle a newer navigation. */
56
47
  export class CatalogTransitionSequence {
57
48
  generation = 0;
@@ -144,6 +135,12 @@ function copyTypography(element, style) {
144
135
  'white-space',
145
136
  'overflow',
146
137
  'text-overflow',
138
+ 'overflow-wrap',
139
+ 'word-break',
140
+ 'display',
141
+ '-webkit-box-orient',
142
+ '-webkit-line-clamp',
143
+ 'line-clamp',
147
144
  'color',
148
145
  'text-shadow'
149
146
  ])
@@ -169,6 +166,15 @@ export class CatalogTransition {
169
166
  sequence = new CatalogTransitionSequence();
170
167
  captureState;
171
168
  interrupt = () => this.cancel();
169
+ capturedViewport;
170
+ resize = () => {
171
+ // Android's address bar changes innerHeight without changing the svh
172
+ // layout endpoints. Only a real layout/render-scale change cancels motion.
173
+ if (this.capturedViewport && catalogTransitionViewportChanged(this.capturedViewport, readCatalogTransitionViewport())) {
174
+ this.hooks.diagnose?.('viewport-resize');
175
+ this.cancel();
176
+ }
177
+ };
172
178
  keydown = (event) => {
173
179
  if (event.key === 'Escape')
174
180
  this.cancel();
@@ -184,12 +190,10 @@ export class CatalogTransition {
184
190
  /** Pause at the last submitted DOM/GPU frame while a compatible navigation resolves. */
185
191
  supersede(destination) {
186
192
  const capture = this.captureState;
187
- const path = destination.pathname.replace(/\/$/, '');
188
- const compatible = capture &&
189
- destination.origin === location.origin &&
190
- (Boolean(resolveCatalogIntent(new URL(`/${encodeURIComponent(capture.identity.brandId)}/elements/${encodeURIComponent(capture.identity.spatialElementId)}`, location.href), destination, 'link')) ||
191
- path ===
192
- `/${encodeURIComponent(capture.identity.brandId)}/elements/${encodeURIComponent(capture.identity.spatialElementId)}`);
193
+ const target = this.endpoints.navigation?.get(destination);
194
+ const compatible = capture && destination.origin === location.origin && target &&
195
+ target.kind !== 'ordinary' && target.brandId === capture.identity.brandId &&
196
+ (target.kind === 'detail' ? target.spatialElementId === capture.identity.spatialElementId : target.elements.includes(capture.identity.spatialElementId));
193
197
  if (!capture || !compatible) {
194
198
  this.cancel();
195
199
  return;
@@ -206,7 +210,7 @@ export class CatalogTransition {
206
210
  capture.paused = true;
207
211
  capture.resolve?.();
208
212
  capture.resolve = undefined;
209
- const reverse = /\/categories\/(?:list|carousel|mixed)$/.test(path);
213
+ const reverse = target?.kind === 'content';
210
214
  if (capture.view ||
211
215
  capture.retarget ||
212
216
  reverse !== isReturnRecipe(capture.recipe) ||
@@ -334,18 +338,20 @@ export class CatalogTransition {
334
338
  : null;
335
339
  }
336
340
  matchesDestination(capture, destination) {
337
- return (destination.origin === location.origin &&
338
- !destination.hash &&
339
- destination.pathname.replace(/\/$/, '') ===
340
- `/${encodeURIComponent(capture.identity.brandId)}/elements/${encodeURIComponent(capture.identity.spatialElementId)}`);
341
+ const target = this.endpoints.navigation?.get(destination);
342
+ return destination.origin === location.origin && !destination.hash && target?.kind === 'detail' &&
343
+ target.brandId === capture.identity.brandId && target.spatialElementId === capture.identity.spatialElementId;
341
344
  }
342
345
  createActor(identity, source, role, reverse) {
343
346
  const paint = role === 'summary-surface' && reverse ? this.hooks.captureSurface?.(source) : undefined;
344
347
  const projection = captureCarouselElement(source) ??
348
+ captureCardElement(source) ??
345
349
  (role !== 'summary-surface' && reverse ? this.hooks.captureElement?.(source) : undefined);
346
350
  const bounds = paint?.bounds ?? (role === 'summary-surface' ? this.hooks.resolveSurface(source) : source);
347
351
  const from = bounds.getBoundingClientRect();
348
- const style = getComputedStyle(role === 'summary-surface' && reverse ? bounds : source, role === 'summary-surface' && source.closest('[data-carousel-spatial-element]') ? '::before' : null);
352
+ const carouselSurface = role === 'summary-surface' && source.closest('[data-carousel-spatial-element]')
353
+ ? source.querySelector('.spatial-summary-surface') : undefined;
354
+ const style = getComputedStyle(carouselSurface ?? (role === 'summary-surface' && reverse ? bounds : source), !carouselSurface && role === 'summary-surface' && source.closest('[data-carousel-spatial-element]') ? '::before' : null);
349
355
  const element = document.createElement('div');
350
356
  element.dataset.catalogSharedKey = catalogSharedKey(identity, role);
351
357
  element.dataset.catalogActorRole = role;
@@ -437,9 +443,10 @@ export class CatalogTransition {
437
443
  });
438
444
  }
439
445
  capture(fromURL, toURL, type) {
446
+ this.hooks.diagnose?.('capturing');
440
447
  const retained = this.captureState;
441
448
  if (retained?.paused && retained.retarget) {
442
- const journey = resolveCatalogJourney(fromURL, toURL, type);
449
+ const journey = resolveCatalogJourney(fromURL, toURL, type, this.endpoints.navigation);
443
450
  if (journey?.kind === 'content-view') {
444
451
  const context = type === 'popstate' ? {} : readCatalogViewContext(toURL);
445
452
  const previousPairs = retained.view?.pairs ?? [];
@@ -478,7 +485,7 @@ export class CatalogTransition {
478
485
  return false;
479
486
  }
480
487
  }
481
- const intent = resolveCatalogIntent(fromURL, toURL, type);
488
+ const intent = resolveCatalogIntent(fromURL, toURL, type, this.endpoints.navigation);
482
489
  const reverse = intent?.direction === 'detail-to-list';
483
490
  const content = retained.recipe.source.startsWith('carousel.') ||
484
491
  retained.recipe.targetShared.startsWith('carousel.')
@@ -514,7 +521,7 @@ export class CatalogTransition {
514
521
  return true;
515
522
  }
516
523
  this.cancel();
517
- const journey = resolveCatalogJourney(fromURL, toURL, type);
524
+ const journey = resolveCatalogJourney(fromURL, toURL, type, this.endpoints.navigation);
518
525
  const context = type === 'popstate' ? {} : readCatalogViewContext(toURL);
519
526
  const inventory = journey?.kind === 'content-view' ? this.contentEndpoints(journey.brandId) : [];
520
527
  const sourcePairs = planCatalogParticipants(inventory, inventory, {
@@ -541,7 +548,7 @@ export class CatalogTransition {
541
548
  history: type === 'popstate',
542
549
  target: 'hero'
543
550
  }
544
- : resolveCatalogIntent(fromURL, toURL, type);
551
+ : resolveCatalogIntent(fromURL, toURL, type, this.endpoints.navigation);
545
552
  const reverse = intent?.direction === 'detail-to-list';
546
553
  const contentSlot = intent
547
554
  ? reverse
@@ -569,8 +576,10 @@ export class CatalogTransition {
569
576
  recipe.source = contentSlot;
570
577
  recipe.roles = [];
571
578
  }
572
- if (!recipe || matchMedia('(prefers-reduced-motion: reduce)').matches)
579
+ if (!recipe || matchMedia('(prefers-reduced-motion: reduce)').matches) {
580
+ this.hooks.diagnose?.(recipe ? 'reduced-motion' : 'source-recipe');
573
581
  return;
582
+ }
574
583
  const identity = recipe.identity;
575
584
  const dock = recipe.source === 'detail.dock';
576
585
  const source = { ...identity, slot: recipe.source };
@@ -583,25 +592,44 @@ export class CatalogTransition {
583
592
  ...source,
584
593
  slot: reverse && !dock ? 'detail.hero' : source.slot,
585
594
  role: 'geometry'
586
- }))
595
+ })) {
596
+ this.hooks.diagnose?.('source-endpoint');
587
597
  return;
598
+ }
588
599
  if (reverse)
589
600
  recipe.roles = recipe.roles.filter((role) => {
590
601
  const element = this.endpoints.resolve({ ...source, role });
591
602
  // During docking the hero remains the geometry source. Do not resurrect
592
603
  // already clipped summary pieces just to retain their semantic roles.
593
604
  return (element &&
594
- visiblyPresented(element) &&
595
- (composition !== 'intermediate' || fullyPresented(element)));
605
+ visiblyPresented(element) && fullyPresented(element));
596
606
  });
597
- recipe.roles = recipe.roles.filter((role) => !isRichRole(role) || this.endpoints.resolve({ ...source, role }));
607
+ recipe.roles = recipe.roles.filter((role) => {
608
+ // S cards and compact Carousel summaries deliberately omit the eyebrow
609
+ // or rich content. That does not invalidate their prepared 3D endpoint.
610
+ if (role !== 'eyebrow' && !isRichRole(role))
611
+ return true;
612
+ const element = this.endpoints.resolve({ ...source, role });
613
+ return Boolean(element && hasSize(element.getBoundingClientRect()));
614
+ });
615
+ // A clipped summary (mobile fold / 3XL pane) may contribute fully visible
616
+ // title rows while its surface fades out. Rich rows need a retained surface
617
+ // to map to a compact destination which does not expose those same rows.
618
+ if (!recipe.roles.includes('summary-surface'))
619
+ recipe.roles = recipe.roles.filter(role => !isRichRole(role));
598
620
  const sources = recipe.roles.map((role) => this.endpoints.resolve({ ...source, role }));
599
- if (sources.some((element) => !element || !hasSize(element.getBoundingClientRect())))
600
- return;
601
- if (!reverse && !(composition === 'carousel' ? visiblyPresented(card) : fullyPresented(card)))
621
+ if (sources.some((element) => !element || !hasSize(element.getBoundingClientRect()))) {
622
+ this.hooks.diagnose?.('source-role-size');
602
623
  return;
603
- if (reverse && sources.some((element) => element && !fullyPresented(element)))
624
+ }
625
+ const carouselTarget = composition === 'carousel'
626
+ ? card.querySelector('.spatial-element-target') : null;
627
+ if (!reverse && !(composition === 'carousel'
628
+ ? visiblyPresented(card) || (carouselTarget && visiblyPresented(carouselTarget))
629
+ : fullyPresented(card))) {
630
+ this.hooks.diagnose?.('source-visibility');
604
631
  return;
632
+ }
605
633
  try {
606
634
  const endpoint = geometryEndpoint({
607
635
  ...source,
@@ -609,8 +637,10 @@ export class CatalogTransition {
609
637
  });
610
638
  if (view
611
639
  ? !this.hooks.captureContentGeometry?.(view.source, view.sources.slice(1))
612
- : !this.hooks.captureGeometry(endpoint))
640
+ : !this.hooks.captureGeometry(endpoint)) {
641
+ this.hooks.diagnose?.('source-geometry-not-ready');
613
642
  return;
643
+ }
614
644
  const token = this.sequence.begin();
615
645
  const host = document.createElement('div');
616
646
  host.dataset.catalogTransitionActors = '';
@@ -620,7 +650,6 @@ export class CatalogTransition {
620
650
  host.style.pointerEvents = 'none';
621
651
  const capture = {
622
652
  view,
623
- captureShell: !reverse && (intent?.history || intent?.target === 'section'),
624
653
  elapsed: 0,
625
654
  token,
626
655
  identity,
@@ -630,10 +659,12 @@ export class CatalogTransition {
630
659
  exiting: [],
631
660
  restore: [],
632
661
  frame: 0,
633
- inert: new Map(),
662
+ inert: new Set(),
634
663
  timeout: setTimeout(() => {
635
- if (this.captureState === capture)
664
+ if (this.captureState === capture) {
665
+ this.hooks.diagnose?.('capture-timeout');
636
666
  this.cancel();
667
+ }
637
668
  }, 5000)
638
669
  };
639
670
  this.captureState = capture;
@@ -674,25 +705,30 @@ export class CatalogTransition {
674
705
  this.root.dataset.catalogDirection = reverse || view ? 'return' : 'forward';
675
706
  this.setPresentation({ active: true, exitOpacity: 1, enterOpacity: 0, sharedOpacity: 0 });
676
707
  this.root.dataset.catalogTransition = 'captured';
708
+ this.hooks.diagnose?.('captured');
677
709
  this.root.dataset.catalogRecipe = recipe.id;
678
710
  this.root.dataset.catalogOwnershipRevision = String(capture.lease.revision);
679
711
  this.lockParticipants(capture);
680
712
  capture.observer = new MutationObserver(() => this.lockParticipants(capture));
681
713
  capture.observer.observe(this.root, { childList: true, subtree: true });
682
- window.addEventListener('resize', this.interrupt, { passive: true });
714
+ this.capturedViewport = readCatalogTransitionViewport();
715
+ window.addEventListener('resize', this.resize, { passive: true });
683
716
  window.addEventListener('wheel', this.interrupt, { passive: true, capture: true });
684
717
  window.addEventListener('touchmove', this.interrupt, { passive: true, capture: true });
685
718
  window.addEventListener('keydown', this.keydown);
686
719
  }
687
- catch {
720
+ catch (error) {
721
+ this.hooks.diagnose?.(`capture-error:${error instanceof Error ? error.message : String(error)}`);
688
722
  this.cancel();
689
723
  }
690
724
  }
691
725
  /** Keep only decorative outgoing DOM; Kit can mount and measure the real destination now. */
692
726
  captureExitingContent(capture) {
727
+ const copiesToAttach = document.createDocumentFragment();
728
+ const sourcesToHide = [];
693
729
  const selector = isReturnRecipe(capture.recipe)
694
730
  ? '[data-catalog-transition-dom="enter"], [data-catalog-transition-group="enter"], [data-catalog-secondary]'
695
- : `[data-catalog-transition-dom="exit"]${capture.captureShell ? ', [data-catalog-shell]' : ''}`;
731
+ : '[data-catalog-transition-dom="exit"], [data-catalog-shell]';
696
732
  for (const source of this.root.querySelectorAll(selector)) {
697
733
  if (source.parentElement?.closest(selector))
698
734
  continue;
@@ -704,16 +740,9 @@ export class CatalogTransition {
704
740
  continue;
705
741
  if (!visiblyPresented(source))
706
742
  continue;
707
- const copy = source.cloneNode(true);
708
- const style = getComputedStyle(source);
709
- const originals = [source, ...source.querySelectorAll('*')];
710
- const copies = [copy, ...copy.querySelectorAll('*')];
711
- for (let index = 0; index < originals.length; index++) {
712
- const computed = getComputedStyle(originals[index]);
713
- for (const property of computed)
714
- copies[index].style.setProperty(property, computed.getPropertyValue(property));
715
- }
716
- for (const element of [copy, ...copy.querySelectorAll('*')]) {
743
+ const { copy, elements } = snapshotCatalogDom(source);
744
+ const style = elements[0].style;
745
+ for (const { copy: element } of elements) {
717
746
  element.removeAttribute('id');
718
747
  for (const attribute of [...element.attributes]) {
719
748
  if (attribute.name.startsWith('data-') &&
@@ -728,15 +757,16 @@ export class CatalogTransition {
728
757
  element.removeAttribute(attribute.name);
729
758
  }
730
759
  }
731
- for (let index = 0; index < originals.length; index++) {
732
- const original = originals[index];
760
+ for (const { source: original, copy: cloned } of elements) {
733
761
  if (original.matches('[data-catalog-card], [data-carousel-spatial-element]'))
734
- copies[index].dataset.catalogExitOccurrence = original.dataset.catalogOccurrence;
762
+ cloned.dataset.catalogExitOccurrence = original.dataset.catalogOccurrence;
735
763
  }
736
764
  copy.dataset.catalogExitCopy = '';
737
765
  copy.dataset.catalogBaseOpacity = style.opacity;
738
- if (source.hasAttribute('data-catalog-shell'))
766
+ if (source.hasAttribute('data-catalog-shell')) {
739
767
  copy.dataset.catalogShellCopy = '';
768
+ (capture.shellCopies ??= new Map()).set(source, copy);
769
+ }
740
770
  copy.setAttribute('aria-hidden', 'true');
741
771
  copy.inert = true;
742
772
  Object.assign(copy.style, {
@@ -766,7 +796,7 @@ export class CatalogTransition {
766
796
  transform: getProjectiveCssMatrix3d(corners, projection.width, projection.height) ?? 'none'
767
797
  });
768
798
  }
769
- this.root.appendChild(copy);
799
+ copiesToAttach.appendChild(copy);
770
800
  capture.exiting.push(copy);
771
801
  const panel = capture.actors.find((actor) => actor.role === 'summary-surface');
772
802
  if (panel && source.closest('[data-spatial-element-hero-panel-content]')) {
@@ -777,6 +807,12 @@ export class CatalogTransition {
777
807
  incoming: false
778
808
  });
779
809
  }
810
+ sourcesToHide.push(source);
811
+ }
812
+ // Measure and copy every source before touching connected DOM. Appending or
813
+ // hiding one subtree before measuring the next forces repeated style/layout work.
814
+ this.root.appendChild(copiesToAttach);
815
+ for (const source of sourcesToHide) {
780
816
  preserveStyle(source, 'visibility', capture.restore);
781
817
  source.style.setProperty('visibility', 'hidden', 'important');
782
818
  }
@@ -787,19 +823,26 @@ export class CatalogTransition {
787
823
  for (const element of this.root.querySelectorAll('[data-catalog-transition-dom], [data-catalog-transition-group]')) {
788
824
  if (capture.inert.has(element))
789
825
  continue;
790
- capture.inert.set(element, element.inert);
791
- element.inert = true;
826
+ capture.inert.add(element);
827
+ setInertLease(element, capture, true);
792
828
  }
793
829
  }
794
830
  setPresentation(presentation) {
795
831
  for (const channel of ['enter', 'exit', 'shared']) {
796
832
  const value = presentation[`${channel}Opacity`];
833
+ const property = `--catalog-${channel}-opacity`;
834
+ const previous = this.root.style.getPropertyValue(property);
797
835
  if (presentation.active) {
798
- this.root.style.setProperty(`--catalog-${channel}-opacity`, String(value));
836
+ const next = String(value);
837
+ if (next !== previous)
838
+ this.root.style.setProperty(property, next);
799
839
  }
800
- else
801
- this.root.style.removeProperty(`--catalog-${channel}-opacity`);
802
- this.root.toggleAttribute(`data-catalog-${channel}-hidden`, presentation.active && value === 0);
840
+ else if (previous)
841
+ this.root.style.removeProperty(property);
842
+ const attribute = `data-catalog-${channel}-hidden`;
843
+ const hidden = presentation.active && value === 0;
844
+ if (this.root.hasAttribute(attribute) !== hidden)
845
+ this.root.toggleAttribute(attribute, hidden);
803
846
  }
804
847
  for (const copy of this.captureState?.exiting ?? []) {
805
848
  copy.style.opacity = String(copy.hasAttribute('data-catalog-shell-copy') &&
@@ -814,15 +857,39 @@ export class CatalogTransition {
814
857
  const capture = this.captureState;
815
858
  if (!capture || !this.sequence.start(capture.token))
816
859
  return;
860
+ // Persistent shell nodes survive route replacement; the exit copy owns their old pose.
861
+ for (const shell of this.root.querySelectorAll('[data-catalog-shell]'))
862
+ shell.style.removeProperty('visibility');
863
+ // A persistent header visible at both scroll positions is not entering or
864
+ // leaving the page. Hand its snapshot back without an opacity dip.
865
+ for (const [shell, copy] of capture.shellCopies ?? []) {
866
+ delete copy.dataset.catalogShellCopy;
867
+ const sourceRect = copy.getBoundingClientRect();
868
+ // A surface switch can move header text out of the captured surface into
869
+ // a native layer. Transfer continuity to its current shell nodes as well.
870
+ const candidates = new Set([shell, ...this.root.querySelectorAll('[data-catalog-shell]')]);
871
+ let continuous = false;
872
+ for (const current of candidates) {
873
+ if (!current.isConnected || !intersectsViewport(current))
874
+ continue;
875
+ const rect = current.getBoundingClientRect();
876
+ if (current !== shell && !(rect.left < sourceRect.right && rect.right > sourceRect.left &&
877
+ rect.top < sourceRect.bottom && rect.bottom > sourceRect.top))
878
+ continue;
879
+ current.setAttribute('data-catalog-shell-continuous', '');
880
+ capture.restore.push(() => current.removeAttribute('data-catalog-shell-continuous'));
881
+ continuous = true;
882
+ }
883
+ if (continuous)
884
+ copy.style.display = 'none';
885
+ }
817
886
  try {
818
887
  const reverse = Boolean(capture.view) || isReturnRecipe(capture.recipe);
819
888
  if (capture.view) {
820
889
  const pairs = planCatalogParticipants(capture.view.sources, this.contentEndpoints(capture.identity.brandId, false), capture.view.context, 5);
821
890
  capture.view.pairs = pairs;
822
891
  const pair = pairs[0];
823
- if (!pair ||
824
- pair.source.slot === pair.target.slot ||
825
- (pair.source.slot.startsWith('carousel.') && pair.target.slot.startsWith('carousel.'))) {
892
+ if (!pair) {
826
893
  this.cancel();
827
894
  return;
828
895
  }
@@ -848,6 +915,10 @@ export class CatalogTransition {
848
915
  }
849
916
  this.endpoints.prefer(pair.target.brandId, pair.target.spatialElementId, pair.target.occurrence, pair.target.slot);
850
917
  capture.recipe.targetGeometry = capture.recipe.targetShared = pair.target.slot;
918
+ capture.recipe.id = pair.source.slot === 'catalog.card'
919
+ ? pair.target.slot === 'catalog.card' ? 'list-to-list' : 'list-to-carousel'
920
+ : pair.target.slot === 'catalog.card' ? 'carousel-to-list' : 'carousel-to-carousel';
921
+ this.root.dataset.catalogRecipe = capture.recipe.id;
851
922
  if (pair.target.slot === 'carousel.neighbour') {
852
923
  for (const actor of capture.actors)
853
924
  capture.exiting.push(actor.element);
@@ -858,6 +929,7 @@ export class CatalogTransition {
858
929
  else if (reverse) {
859
930
  const slot = this.endpoints.getContentSlot(capture.identity);
860
931
  if (!slot) {
932
+ this.hooks.diagnose?.('return-content-slot');
861
933
  this.cancel();
862
934
  return;
863
935
  }
@@ -886,6 +958,7 @@ export class CatalogTransition {
886
958
  else {
887
959
  const composition = this.endpoints.getComposition(capture.identity);
888
960
  if (composition !== 'hero' && composition !== 'intermediate' && composition !== 'dock') {
961
+ this.hooks.diagnose?.('destination-composition');
889
962
  this.cancel();
890
963
  return;
891
964
  }
@@ -910,6 +983,7 @@ export class CatalogTransition {
910
983
  slot: capture.recipe.targetGeometry,
911
984
  role: 'geometry'
912
985
  })) {
986
+ this.hooks.diagnose?.('destination-geometry-endpoint');
913
987
  this.cancel();
914
988
  return;
915
989
  }
@@ -917,6 +991,7 @@ export class CatalogTransition {
917
991
  spatialElementId: capture.identity.spatialElementId,
918
992
  kind: reverse ? 'content' : capture.recipe.targetGeometry === 'detail.dock' ? 'dock' : 'hero'
919
993
  }) === false) {
994
+ this.hooks.diagnose?.('destination-geometry-projection');
920
995
  this.cancel();
921
996
  return;
922
997
  }
@@ -933,6 +1008,17 @@ export class CatalogTransition {
933
1008
  this.hooks.flushFrame();
934
1009
  }
935
1010
  if (reverse) {
1011
+ // Zoom can withdraw every summary actor. The transferred GPU model
1012
+ // still owns geometry: never expose the destination's fallback poster.
1013
+ const geometry = this.endpoints.resolve({
1014
+ ...capture.identity,
1015
+ slot: capture.recipe.targetGeometry,
1016
+ role: 'geometry'
1017
+ });
1018
+ if (geometry) {
1019
+ preserveStyle(geometry, 'visibility', capture.restore);
1020
+ geometry.style.setProperty('visibility', 'hidden', 'important');
1021
+ }
936
1022
  const card = this.endpoints.resolve({
937
1023
  ...capture.identity,
938
1024
  slot: capture.recipe.targetShared,
@@ -942,6 +1028,7 @@ export class CatalogTransition {
942
1028
  !(capture.recipe.targetShared.startsWith('carousel.')
943
1029
  ? intersectsViewport(card)
944
1030
  : fullyPresented(card))) {
1031
+ this.hooks.diagnose?.('return-target-visibility');
945
1032
  this.cancel();
946
1033
  return;
947
1034
  }
@@ -952,12 +1039,28 @@ export class CatalogTransition {
952
1039
  }
953
1040
  const measuredTargets = new Map();
954
1041
  const sharedTargets = new Set();
1042
+ const destinationCopies = document.createDocumentFragment();
1043
+ // Eyebrows are optional, notably for S cards. Fade the outgoing text
1044
+ // when the destination omits it; retain the rest of the transition.
1045
+ capture.actors = capture.actors.filter(actor => {
1046
+ if (actor.role !== 'eyebrow')
1047
+ return true;
1048
+ const eyebrow = this.endpoints.resolve({ ...capture.identity, slot: capture.recipe.targetShared, role: 'eyebrow' });
1049
+ // A registered optional role can still be omitted by responsive CSS.
1050
+ if (eyebrow && hasSize(eyebrow.getBoundingClientRect()))
1051
+ return true;
1052
+ capture.exiting.push(actor.element);
1053
+ actor.destinationCopy?.remove();
1054
+ return false;
1055
+ });
955
1056
  for (const actor of capture.actors) {
956
1057
  let target = this.endpoints.resolve({
957
1058
  ...capture.identity,
958
1059
  slot: capture.recipe.targetShared,
959
1060
  role: actor.role
960
1061
  });
1062
+ if (target && isRichRole(actor.role) && !hasSize(target.getBoundingClientRect()))
1063
+ target = undefined;
961
1064
  const missingRich = !target && isRichRole(actor.role);
962
1065
  if (missingRich) {
963
1066
  target = this.endpoints.resolve({
@@ -968,6 +1071,7 @@ export class CatalogTransition {
968
1071
  actor.sourceOnly = true;
969
1072
  }
970
1073
  if (!target) {
1074
+ this.hooks.diagnose?.(`destination-role:${actor.role}`);
971
1075
  this.cancel();
972
1076
  return;
973
1077
  }
@@ -994,6 +1098,7 @@ export class CatalogTransition {
994
1098
  : 'replaced';
995
1099
  measuredTargets.set(bounds, targetRect);
996
1100
  if (!hasSize(actor.to)) {
1101
+ this.hooks.diagnose?.(`destination-size:${actor.role}`);
997
1102
  this.cancel();
998
1103
  return;
999
1104
  }
@@ -1027,7 +1132,7 @@ export class CatalogTransition {
1027
1132
  copy.style.overflow = 'hidden';
1028
1133
  copy.dataset.catalogActorRole = actor.role;
1029
1134
  copy.dataset.catalogActorVariant = 'destination';
1030
- capture.host.appendChild(copy);
1135
+ destinationCopies.appendChild(copy);
1031
1136
  actor.destinationCopy = copy;
1032
1137
  }
1033
1138
  if (actor.role === 'summary-surface') {
@@ -1039,17 +1144,12 @@ export class CatalogTransition {
1039
1144
  .catalogRichShared))
1040
1145
  continue;
1041
1146
  const rect = source.getBoundingClientRect();
1042
- const copy = source.cloneNode(true);
1043
- const originals = [source, ...source.querySelectorAll('*')];
1044
- const copies = [copy, ...copy.querySelectorAll('*')];
1045
- for (let index = 0; index < originals.length; index++) {
1046
- const style = getComputedStyle(originals[index]);
1047
- for (const property of style)
1048
- copies[index].style.setProperty(property, style.getPropertyValue(property));
1147
+ const { copy, elements } = snapshotCatalogDom(source);
1148
+ for (const { copy: element } of elements) {
1049
1149
  // The live destination is deliberately masked during binding.
1050
- copies[index].style.visibility = 'visible';
1150
+ element.style.visibility = 'visible';
1051
1151
  }
1052
- for (const element of [copy, ...copy.querySelectorAll('*')]) {
1152
+ for (const { copy: element } of elements) {
1053
1153
  element.removeAttribute('id');
1054
1154
  for (const attribute of [...element.attributes])
1055
1155
  if (attribute.name.startsWith('data-'))
@@ -1073,7 +1173,7 @@ export class CatalogTransition {
1073
1173
  transition: 'none',
1074
1174
  animation: 'none'
1075
1175
  });
1076
- capture.host.appendChild(copy);
1176
+ destinationCopies.appendChild(copy);
1077
1177
  (capture.panelContent ??= []).push({
1078
1178
  element: copy,
1079
1179
  rect,
@@ -1084,6 +1184,8 @@ export class CatalogTransition {
1084
1184
  }
1085
1185
  }
1086
1186
  }
1187
+ // Keep clones detached while measuring the next destination's layout/type.
1188
+ capture.host.appendChild(destinationCopies);
1087
1189
  for (const target of sharedTargets) {
1088
1190
  preserveStyle(target, 'visibility', capture.restore);
1089
1191
  target.style.setProperty('visibility', 'hidden', 'important');
@@ -1097,6 +1199,7 @@ export class CatalogTransition {
1097
1199
  const current = element.getBoundingClientRect();
1098
1200
  if (Math.abs(current.width - rect.width) > 1 ||
1099
1201
  Math.abs(current.height - rect.height) > 1) {
1202
+ this.hooks.diagnose?.('destination-layout-changed');
1100
1203
  this.cancel();
1101
1204
  return;
1102
1205
  }
@@ -1110,12 +1213,21 @@ export class CatalogTransition {
1110
1213
  }
1111
1214
  this.lockParticipants(capture);
1112
1215
  this.root.dataset.catalogTransition = 'animating';
1216
+ this.hooks.diagnose?.('animating');
1113
1217
  if (matchMedia('(prefers-reduced-motion: reduce)').matches) {
1114
1218
  this.hooks.setGeometryProgress(1);
1115
1219
  this.settle(capture.token);
1116
1220
  return;
1117
1221
  }
1118
1222
  await new Promise((resolve) => {
1223
+ // Route binding and shader preparation have their own bounded wait above.
1224
+ // Give playback its full safety window instead of cancelling its first
1225
+ // frames when preparation consumed most of the capture deadline.
1226
+ clearTimeout(capture.timeout);
1227
+ capture.timeout = setTimeout(() => {
1228
+ if (this.captureState === capture)
1229
+ this.cancel();
1230
+ }, 5000);
1119
1231
  const mode = capture.mode ?? (reverse ? 'synchronous' : this.hooks.beginMotion?.()) ?? 'asynchronous';
1120
1232
  capture.mode = mode;
1121
1233
  capture.backgroundPrepared ??= !reverse && Boolean(this.hooks.backgroundPrepared?.());
@@ -1232,7 +1344,8 @@ export class CatalogTransition {
1232
1344
  capture.frame = requestAnimationFrame(frame);
1233
1345
  });
1234
1346
  }
1235
- catch {
1347
+ catch (error) {
1348
+ this.hooks.diagnose?.(`play-error:${error instanceof Error ? error.message : String(error)}`);
1236
1349
  this.cancel();
1237
1350
  }
1238
1351
  }
@@ -1254,7 +1367,8 @@ export class CatalogTransition {
1254
1367
  delete this.root.dataset.catalogRecipe;
1255
1368
  delete this.root.dataset.catalogOwnershipRevision;
1256
1369
  delete this.root.dataset.catalogDirection;
1257
- window.removeEventListener('resize', this.interrupt);
1370
+ window.removeEventListener('resize', this.resize);
1371
+ this.capturedViewport = undefined;
1258
1372
  window.removeEventListener('wheel', this.interrupt, true);
1259
1373
  window.removeEventListener('touchmove', this.interrupt, true);
1260
1374
  window.removeEventListener('keydown', this.keydown);
@@ -1269,11 +1383,13 @@ export class CatalogTransition {
1269
1383
  copy.remove();
1270
1384
  for (const restore of capture.restore.reverse())
1271
1385
  restore();
1272
- for (const [element, inert] of capture.inert) {
1386
+ for (const element of capture.inert) {
1273
1387
  // Docking can change during route scroll restoration after this lock was acquired.
1274
1388
  // Preserve the controller's current semantic state instead of reviving a stale lock snapshot.
1275
1389
  const dock = element.matches('[data-spatial-element-sticky-header], [data-spatial-element-sticky-tabs]');
1276
- element.inert = dock ? element.getAttribute('aria-hidden') === 'true' : inert;
1390
+ setInertLease(element, capture, false);
1391
+ if (dock)
1392
+ element.inert = element.getAttribute('aria-hidden') === 'true';
1277
1393
  }
1278
1394
  if (capture.focus?.isConnected &&
1279
1395
  (document.activeElement === document.body ||