@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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"responsiveLayout.d.ts","sourceRoot":"","sources":["../../src/spatial-element/responsiveLayout.ts"],"names":[],"mappings":"AACA,OAAO,EACyC,KAAK,iBAAiB,EAAE,KAAK,qBAAqB,EAChG,KAAK,UAAU,EAAE,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,kBAAkB,EACpF,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACvE,YAAY,EAAE,eAAe,EAAE,kBAAkB,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EACtF,qBAAqB,EAAE,iBAAiB,EAAE,eAAe,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACpH,YAAY,EAAE,cAAc,IAAI,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,KAAK,EAAE,cAAc,IAAI,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAI7E,oFAAoF;AACpF,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,UAAQ,UAG/D;AACD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA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 -0,0 +1,210 @@
1
+ import spatialTokens from './layoutTokens.json' with { type: 'json' };
2
+ import { layoutTokens, resolveContentGrid, contentSpanWidth, resolvePageLayout, resolveCardLayout as resolveSharedCardLayout } from '@page-sections/core';
3
+ export { contentGridSizes, viewportLayoutSizes, resolveContentGrid, resolveContentSpan, contentSpanWidth, resolveViewportLayout } from '@page-sections/core';
4
+ /** Shared layout tokens plus spatial-only detail, docking and carousel settings. */
5
+ const tokens = { ...layoutTokens, ...spatialTokens, menu: { ...layoutTokens.menu, scrollThreshold: 32 } };
6
+ /** Keep native navigation and projected surfaces on the same short sticky track. */
7
+ export function resolveMenuOffset(scrollY, fixed = false) {
8
+ const delta = (Number.isFinite(scrollY) ? scrollY : 0) - tokens.menu.scrollThreshold;
9
+ return fixed || delta <= 0 ? 0 : -delta;
10
+ }
11
+ export const spatialLayoutTokens = tokens;
12
+ const size = (value) => Number.isFinite(value) ? Math.max(0, value) : 0;
13
+ const clamp = (value, min, max) => Math.min(Math.max(value, min), max);
14
+ /** Spatial objects default to square media; text has independent height. */
15
+ export function resolveCardLayout(containerWidth, cardSize = 'm', options = {}) {
16
+ return resolveSharedCardLayout(containerWidth, cardSize, { mediaAspect: '1/1', mediaFit: 'contain', ...options });
17
+ }
18
+ export function resolveResponsiveLayout(input) {
19
+ const width = size(input.width);
20
+ const layoutWidth = Math.max(0, width - size(input.scrollbarWidth));
21
+ const height = size(input.height);
22
+ const safeArea = {
23
+ top: Math.min(height, size(input.safeArea?.top)),
24
+ right: Math.min(layoutWidth, size(input.safeArea?.right)),
25
+ bottom: Math.min(height, size(input.safeArea?.bottom)),
26
+ left: Math.min(layoutWidth, size(input.safeArea?.left))
27
+ };
28
+ const available = {
29
+ x: safeArea.left, y: safeArea.top,
30
+ width: Math.max(0, layoutWidth - safeArea.left - safeArea.right),
31
+ height: Math.max(0, height - safeArea.top - safeArea.bottom)
32
+ };
33
+ const { layout, content, menu } = resolvePageLayout(input);
34
+ const grid = resolveContentGrid(content.width);
35
+ const wide = tokens.layoutMinWidths[layout] >= tokens.layoutMinWidths.xl;
36
+ const breadcrumb = {
37
+ x: content.x, y: menu.y + menu.height, width: content.width,
38
+ height: tokens.breadcrumb[layout].height,
39
+ fontSize: tokens.breadcrumb[layout].fontSize
40
+ };
41
+ const paneLeft = Math.min(layoutWidth, layoutWidth / 2 + tokens.pane.centerGap);
42
+ const pane = {
43
+ x: paneLeft, y: available.y + tokens.pane.top,
44
+ width: Math.min(tokens.contentMax, Math.max(0, layoutWidth - safeArea.right - tokens.pane.rightInset - paneLeft)),
45
+ height: Math.max(0, available.height - tokens.pane.top - tokens.pane.bottom - tokens.pane.submenuHeight / 2)
46
+ };
47
+ const paneGrid = resolveContentGrid(pane.width);
48
+ const paneSubmenu = {
49
+ x: pane.x, y: pane.y + Math.max(0, pane.height - tokens.pane.submenuHeight / 2),
50
+ width: pane.width, height: Math.min(tokens.pane.submenuHeight, Math.max(0, available.height - tokens.pane.top - tokens.pane.bottom))
51
+ };
52
+ const paneHeader = { ...pane, height: Math.min(pane.height, tokens.pane.headerHeight) };
53
+ const paneBody = { ...pane, y: pane.y + paneHeader.height, height: Math.max(0, pane.height - paneHeader.height) };
54
+ const satellites = wide ? {
55
+ left: { x: available.x + tokens.satellite.inset, y: available.y + tokens.satellite.top,
56
+ width: tokens.satellite.width, height: tokens.satellite.height },
57
+ right: { x: available.x + available.width - tokens.satellite.inset - tokens.satellite.width,
58
+ y: available.y + tokens.satellite.top, width: tokens.satellite.width, height: tokens.satellite.height }
59
+ } : undefined;
60
+ return { layout, viewport: { width, height }, layoutWidth, safeArea, available, content, grid, menu, breadcrumb,
61
+ satellites, pane, paneGrid, paneHeader, paneBody, paneSubmenu };
62
+ }
63
+ function stageControls(right, top) {
64
+ const { buttonSize, groupButtons, gap } = tokens.stageControls;
65
+ const groupWidth = buttonSize * groupButtons;
66
+ return {
67
+ help: { x: right - groupWidth - gap - buttonSize, y: top, width: buttonSize, height: buttonSize },
68
+ viewSelector: { x: right - groupWidth, y: top, width: groupWidth, height: buttonSize }
69
+ };
70
+ }
71
+ /** Fitted detail anchors and overflow policies. Natural summary height stays unresolved. */
72
+ export function resolveDetailLayout(input) {
73
+ const base = resolveResponsiveLayout(input);
74
+ const { available, content } = base;
75
+ const split = base.layout === '3xl' && available.height >= tokens.pane.minUsableHeight;
76
+ const layout = base.layout === '3xl' && !split ? '2xl' : base.layout;
77
+ const hero = tokens.hero[layout];
78
+ const horizontal = layout === 'xs' || layout === 's';
79
+ const wide = layout === 'xl' || layout === '2xl';
80
+ const right = available.x + available.width;
81
+ const contentLeft = content.x - available.x;
82
+ const railSize = layout === '2xl'
83
+ ? Math.min(available.width * tokens.hero['2xl'].railWidthRatio, hero.railSize, Math.max(0, contentLeft - hero.railStageGap - tokens.hero['2xl'].railMinInset)) : hero.railSize;
84
+ const railInset = layout === '2xl' ? contentLeft - hero.railStageGap - railSize : hero.railInset;
85
+ const top = split ? base.pane.y : base.breadcrumb.y + base.breadcrumb.height;
86
+ const fitHeight = split ? Math.max(0, available.height - hero.heightOffset)
87
+ : clamp(available.height - hero.heightOffset, hero.minHeight, hero.maxHeight);
88
+ const summaryWidth = split ? base.pane.width : horizontal
89
+ ? Math.max(0, available.width - hero.summaryInset * 2)
90
+ : contentSpanWidth(content.width, hero.summaryColumns);
91
+ const summaryRight = right - (layout === '2xl' ? railInset : hero.summaryInset);
92
+ const stageLeft = available.x + (horizontal ? hero.railInset : railInset + railSize + hero.railStageGap);
93
+ const stageRight = split ? base.pane.x - tokens.pane.centerGap * 2 : horizontal
94
+ ? right - hero.railInset : summaryRight - summaryWidth - hero.summaryGap;
95
+ const mediaFit = { x: stageLeft, y: top, width: Math.max(0, stageRight - stageLeft), height: fitHeight };
96
+ const rail = {
97
+ rect: horizontal
98
+ ? { x: available.x + railInset, y: top + fitHeight + hero.railStageGap,
99
+ width: Math.max(0, available.width - hero.railInset * 2), height: railSize }
100
+ : { x: available.x + railInset, y: top, width: railSize, height: fitHeight },
101
+ axis: horizontal ? 'horizontal' : 'vertical',
102
+ itemSize: railSize, gap: hero.railGap, overflow: 'local-scroll'
103
+ };
104
+ const summary = {
105
+ x: split ? base.pane.x : summaryRight - summaryWidth,
106
+ width: summaryWidth,
107
+ anchor: { y: split ? base.paneBody.y : horizontal
108
+ ? rail.rect.y + rail.rect.height + hero.summaryGap : top, alignment: 'start' },
109
+ height: horizontal || split ? { kind: 'natural' } : { kind: 'natural', maxHeight: fitHeight },
110
+ placement: split ? 'pane' : horizontal ? 'flow' : 'floating'
111
+ };
112
+ const submenu = horizontal ? undefined : split ? {
113
+ x: base.paneSubmenu.x, y: base.paneSubmenu.y, maxWidth: base.paneSubmenu.width,
114
+ height: base.paneSubmenu.height, inlineAlignment: 'center', position: 'fixed'
115
+ } : {
116
+ x: wide ? content.x : available.x + hero.submenuLeft,
117
+ y: top + fitHeight + hero.submenuGap,
118
+ maxWidth: wide ? content.width : Math.max(0, available.width - hero.submenuLeft - hero.submenuRight),
119
+ height: hero.submenuHeight, inlineAlignment: 'start', position: 'document'
120
+ };
121
+ const dock = split ? undefined : {
122
+ surface: { x: available.x + (wide ? railInset : 0), y: available.y,
123
+ width: Math.max(0, available.width - (wide ? railInset * 2 : 0)), height: hero.dockHeight },
124
+ minimap: { x: available.x + railInset, y: available.y + (hero.dockHeight - railSize) / 2,
125
+ width: railSize, height: railSize },
126
+ titleLeft: available.x + railInset + railSize + hero.railStageGap
127
+ };
128
+ const contentStart = horizontal ? { kind: 'after-summary', gap: 0 }
129
+ : split ? { kind: 'pane-body', y: base.paneBody.y }
130
+ : { kind: 'fixed', y: submenu.y + submenu.height + hero.submenuAfterGap };
131
+ return {
132
+ base, layout, composition: split ? 'split' : 'flow',
133
+ shortHeightFallback: base.layout === '3xl' && !split,
134
+ mediaFit, rail, summary, submenu, dock, contentStart,
135
+ controls: stageControls(mediaFit.x + mediaFit.width, mediaFit.y),
136
+ content: split ? { x: base.pane.x, width: base.pane.width } : base.content,
137
+ grid: split ? base.paneGrid : base.grid,
138
+ pane: split ? { surface: base.pane, header: base.paneHeader, body: base.paneBody } : undefined,
139
+ scrollOwner: 'document',
140
+ menuFixed: split
141
+ };
142
+ }
143
+ /** Ordinary-section carousel geometry; its title strip does not change when the eyebrow changes. */
144
+ export function resolveCarouselLayout(input) {
145
+ const base = resolveResponsiveLayout(input);
146
+ const layout = base.layout === '3xl' ? '2xl' : base.layout;
147
+ const settings = tokens.carousel.layouts[layout];
148
+ const compact = layout === 'xs' || layout === 's';
149
+ const { content, grid, available } = base;
150
+ const padding = grid.gap;
151
+ const headlineHeight = input.hasHeadline ? grid.headlineLineHeight : 0;
152
+ const headlineGap = input.hasHeadline ? grid.headlineGap : 0;
153
+ const titleStrip = compact ? tokens.carousel.compactEyebrowHeight : 0;
154
+ const sectionTop = input.sectionTop === undefined ? base.breadcrumb.y + base.breadcrumb.height : size(input.sectionTop);
155
+ const shellBudget = base.breadcrumb.y + base.breadcrumb.height - available.y;
156
+ const heightOffset = shellBudget + padding * 2 + headlineHeight + headlineGap + titleStrip
157
+ + settings.dotsGap + tokens.carousel.dotsHeight + tokens.carousel.nextPreviewHeight;
158
+ const fitHeight = clamp(available.height - heightOffset, settings.minHeight, settings.maxHeight);
159
+ const columnX = (column) => content.x + padding + (column - 1) * (grid.columnWidth + grid.gap);
160
+ const fitX = compact ? content.x + padding + settings.sideAllowance : columnX(settings.fitStartColumn);
161
+ const fitWidth = compact ? Math.max(0, content.width - (padding + settings.sideAllowance) * 2)
162
+ : contentSpanWidth(content.width, settings.fitColumns);
163
+ const fitTop = sectionTop + padding + headlineHeight + headlineGap + titleStrip;
164
+ const mediaFit = { x: fitX, y: fitTop, width: fitWidth, height: fitHeight };
165
+ const compactHeight = input.hasEyebrow ? tokens.carousel.compactEyebrowHeight : tokens.carousel.compactTitleHeight;
166
+ const summary = {
167
+ x: compact ? fitX : columnX(settings.summaryStartColumn),
168
+ width: compact ? fitWidth : contentSpanWidth(content.width, settings.summaryColumns),
169
+ anchor: { y: compact ? fitTop - compactHeight : fitTop + fitHeight / 2, alignment: compact ? 'start' : 'center' },
170
+ height: compact ? { kind: 'fixed', value: compactHeight } : { kind: 'natural', maxHeight: fitHeight },
171
+ placement: compact ? 'compact' : 'floating'
172
+ };
173
+ const dots = {
174
+ x: content.x + padding, y: fitTop + fitHeight + settings.dotsGap,
175
+ maxWidth: Math.max(0, content.width - padding * 2), height: tokens.carousel.dotsHeight,
176
+ inlineAlignment: 'center', position: 'document'
177
+ };
178
+ const sectionEnd = dots.y + dots.height + padding;
179
+ return {
180
+ base, layout, content, grid, mediaFit, summary, dots, heightOffset,
181
+ section: { x: content.x, y: sectionTop, width: content.width, height: Math.max(0, sectionEnd - sectionTop) },
182
+ headline: input.hasHeadline ? { x: content.x + padding, y: sectionTop + padding,
183
+ width: Math.max(0, content.width - padding * 2), height: headlineHeight } : undefined,
184
+ sectionEnd, scrollOwner: 'document'
185
+ };
186
+ }
187
+ /** Fullscreen presentation uses the actual viewport layout, independent of the short-detail fallback. */
188
+ export function resolveZoomLayout(input) {
189
+ const base = resolveResponsiveLayout(input);
190
+ const settings = tokens.hero[base.layout];
191
+ const bottom = base.layout === 'xs' || base.layout === 's';
192
+ const { available } = base;
193
+ const inset = settings.zoomInset;
194
+ const minimap = {
195
+ x: available.x + inset,
196
+ y: bottom ? available.y + available.height - inset - settings.zoomMinimap : available.y + inset,
197
+ width: settings.zoomMinimap, height: settings.zoomMinimap
198
+ };
199
+ return {
200
+ base, interactionArea: available,
201
+ canvas: { x: 0, y: 0, width: base.viewport.width, height: base.viewport.height },
202
+ minimap, minimapAnchor: bottom ? 'bottom-left' : 'top-left',
203
+ controls: stageControls(available.x + available.width - inset, available.y + inset)
204
+ };
205
+ }
206
+ /** Requested source height is used during handoff; intrinsic destination height remains unknown. */
207
+ export function resolvePanelHeight(sourceHeight, maxHeight) {
208
+ return maxHeight === undefined ? size(sourceHeight) : clamp(size(sourceHeight), 0, size(maxHeight));
209
+ }
210
+ //# sourceMappingURL=responsiveLayout.js.map
@@ -0,0 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AAE,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;QAChF,OAAO,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC,CAAC,aAAsB,CAAC,CAAC,CAAC,UAAmB;QAC7E,QAAQ,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC,GAAG,SAAS,CAAC,KAAK,GAAG,KAAK,EAAE,SAAS,CAAC,CAAC,GAAG,KAAK,CAAC;KACnF,CAAC;AACH,CAAC;AAED,oGAAoG;AACpG,MAAM,UAAU,kBAAkB,CAAC,YAAoB,EAAE,SAAkB;IAC1E,OAAO,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;AACrG,CAAC","sourcesContent":["import spatialTokens from './layoutTokens.json' with { type: 'json' };\nimport { layoutTokens, resolveContentGrid, contentSpanWidth, resolvePageLayout,\n resolveCardLayout as resolveSharedCardLayout, type CardLayoutOptions, type ResponsiveLayoutInput,\n type LayoutRect, type LayoutInsets } from '@page-sections/core';\nexport { contentGridSizes, viewportLayoutSizes, resolveContentGrid, resolveContentSpan,\n contentSpanWidth, resolveViewportLayout } from '@page-sections/core';\nexport type { ContentGridSize, ViewportLayoutSize, ContentSpan, LayoutRect, LayoutInsets,\n ResponsiveLayoutInput, CardLayoutOptions, CardMediaAspect, CardMediaFit, SurfaceTone } from '@page-sections/core';\nexport type { LayoutCardSize as SpatialCardSize } from '@page-sections/core';\nimport type { LayoutCardSize as SpatialCardSize } from '@page-sections/core';\n\n/** Shared layout tokens plus spatial-only detail, docking and carousel settings. */\nconst tokens = { ...layoutTokens, ...spatialTokens, menu: { ...layoutTokens.menu, scrollThreshold: 32 } };\n/** Keep native navigation and projected surfaces on the same short sticky track. */\nexport function resolveMenuOffset(scrollY: number, fixed = false) {\n const delta = (Number.isFinite(scrollY) ? scrollY : 0) - tokens.menu.scrollThreshold;\n return fixed || delta <= 0 ? 0 : -delta;\n}\nexport const spatialLayoutTokens = tokens;\n\n/** A natural-height panel has a known width and anchor, never an invented rectangle. */\nexport interface SummaryLayoutConstraint {\n\tx: number;\n\twidth: number;\n\tanchor: { y: number; alignment: 'start' | 'center' };\n\theight: { kind: 'natural'; maxHeight?: number } | { kind: 'fixed'; value: number };\n\tplacement: 'flow' | 'floating' | 'pane' | 'compact';\n}\nexport interface SubmenuLayoutConstraint {\n\tx: number;\n\ty: number;\n\tmaxWidth: number;\n\theight: number;\n\tinlineAlignment: 'start' | 'center';\n\tposition: 'document' | 'fixed';\n}\nexport interface CarouselLayoutInput extends ResponsiveLayoutInput {\n\t/** Document coordinate. Omitted means immediately after the normal breadcrumb. */\n\tsectionTop?: number;\n\thasHeadline?: boolean;\n\thasEyebrow?: boolean;\n}\n\nconst size = (value: number | undefined) => Number.isFinite(value) ? Math.max(0, value!) : 0;\nconst clamp = (value: number, min: number, max: number) => Math.min(Math.max(value, min), max);\n\n/** Spatial objects default to square media; text has independent height. */\nexport function resolveCardLayout(containerWidth: number, cardSize: SpatialCardSize = 'm', options: CardLayoutOptions = {}) {\n return resolveSharedCardLayout(containerWidth, cardSize, { mediaAspect: '1/1', mediaFit: 'contain', ...options });\n}\n\nexport function resolveResponsiveLayout(input: ResponsiveLayoutInput) {\n\tconst width = size(input.width);\n\tconst layoutWidth = Math.max(0, width - size(input.scrollbarWidth));\n\tconst height = size(input.height);\n\tconst safeArea: LayoutInsets = {\n\t\ttop: Math.min(height, size(input.safeArea?.top)),\n\t\tright: Math.min(layoutWidth, size(input.safeArea?.right)),\n\t\tbottom: Math.min(height, size(input.safeArea?.bottom)),\n\t\tleft: Math.min(layoutWidth, size(input.safeArea?.left))\n\t};\n\tconst available = {\n\t\tx: safeArea.left, y: safeArea.top,\n\t\twidth: Math.max(0, layoutWidth - safeArea.left - safeArea.right),\n\t\theight: Math.max(0, height - safeArea.top - safeArea.bottom)\n\t};\n\tconst { layout, content, menu } = resolvePageLayout(input);\n\tconst grid = resolveContentGrid(content.width);\n\tconst wide = tokens.layoutMinWidths[layout] >= tokens.layoutMinWidths.xl;\n\tconst breadcrumb = {\n\t\tx: content.x, y: menu.y + menu.height, width: content.width,\n\t\theight: tokens.breadcrumb[layout].height,\n\t\tfontSize: tokens.breadcrumb[layout].fontSize\n\t};\n\tconst paneLeft = Math.min(layoutWidth, layoutWidth / 2 + tokens.pane.centerGap);\n\tconst pane = {\n\t\tx: paneLeft, y: available.y + tokens.pane.top,\n\t\twidth: Math.min(tokens.contentMax, Math.max(0, layoutWidth - safeArea.right - tokens.pane.rightInset - paneLeft)),\n\t\theight: Math.max(0, available.height - tokens.pane.top - tokens.pane.bottom - tokens.pane.submenuHeight / 2)\n\t};\n\tconst paneGrid = resolveContentGrid(pane.width);\n\tconst paneSubmenu: LayoutRect = {\n\t\tx: pane.x, y: pane.y + Math.max(0, pane.height - tokens.pane.submenuHeight / 2),\n\t\twidth: pane.width, height: Math.min(tokens.pane.submenuHeight,\n\t\t\tMath.max(0, available.height - tokens.pane.top - tokens.pane.bottom))\n\t};\n\tconst paneHeader = { ...pane, height: Math.min(pane.height, tokens.pane.headerHeight) };\n\tconst paneBody = { ...pane, y: pane.y + paneHeader.height, height: Math.max(0, pane.height - paneHeader.height) };\n\tconst satellites = wide ? {\n\t\tleft: { x: available.x + tokens.satellite.inset, y: available.y + tokens.satellite.top,\n\t\t\twidth: tokens.satellite.width, height: tokens.satellite.height },\n\t\tright: { x: available.x + available.width - tokens.satellite.inset - tokens.satellite.width,\n\t\t\ty: available.y + tokens.satellite.top, width: tokens.satellite.width, height: tokens.satellite.height }\n\t} : undefined;\n\treturn { layout, viewport: { width, height }, layoutWidth, safeArea, available, content, grid, menu, breadcrumb,\n\t\tsatellites, pane, paneGrid, paneHeader, paneBody, paneSubmenu };\n}\n\nfunction stageControls(right: number, top: number) {\n\tconst { buttonSize, groupButtons, gap } = tokens.stageControls;\n\tconst groupWidth = buttonSize * groupButtons;\n\treturn {\n\t\thelp: { x: right - groupWidth - gap - buttonSize, y: top, width: buttonSize, height: buttonSize },\n\t\tviewSelector: { x: right - groupWidth, y: top, width: groupWidth, height: buttonSize }\n\t};\n}\n\n/** Fitted detail anchors and overflow policies. Natural summary height stays unresolved. */\nexport function resolveDetailLayout(input: ResponsiveLayoutInput) {\n\tconst base = resolveResponsiveLayout(input);\n\tconst { available, content } = base;\n\tconst split = base.layout === '3xl' && available.height >= tokens.pane.minUsableHeight;\n\tconst layout = base.layout === '3xl' && !split ? '2xl' : base.layout;\n\tconst hero = tokens.hero[layout];\n\tconst horizontal = layout === 'xs' || layout === 's';\n\tconst wide = layout === 'xl' || layout === '2xl';\n\tconst right = available.x + available.width;\n\tconst contentLeft = content.x - available.x;\n\tconst railSize = layout === '2xl'\n\t\t? Math.min(available.width * tokens.hero['2xl'].railWidthRatio, hero.railSize,\n\t\t\tMath.max(0, contentLeft - hero.railStageGap - tokens.hero['2xl'].railMinInset)) : hero.railSize;\n\tconst railInset = layout === '2xl' ? contentLeft - hero.railStageGap - railSize : hero.railInset;\n\tconst top = split ? base.pane.y : base.breadcrumb.y + base.breadcrumb.height;\n\tconst fitHeight = split ? Math.max(0, available.height - hero.heightOffset)\n\t\t: clamp(available.height - hero.heightOffset, hero.minHeight, hero.maxHeight);\n\tconst summaryWidth = split ? base.pane.width : horizontal\n\t\t? Math.max(0, available.width - hero.summaryInset * 2)\n\t\t: contentSpanWidth(content.width, hero.summaryColumns);\n\tconst summaryRight = right - (layout === '2xl' ? railInset : hero.summaryInset);\n\tconst stageLeft = available.x + (horizontal ? hero.railInset : railInset + railSize + hero.railStageGap);\n\tconst stageRight = split ? base.pane.x - tokens.pane.centerGap * 2 : horizontal\n\t\t? right - hero.railInset : summaryRight - summaryWidth - hero.summaryGap;\n\tconst mediaFit: LayoutRect = { x: stageLeft, y: top, width: Math.max(0, stageRight - stageLeft), height: fitHeight };\n\tconst rail = {\n\t\trect: horizontal\n\t\t\t? { x: available.x + railInset, y: top + fitHeight + hero.railStageGap,\n\t\t\t\twidth: Math.max(0, available.width - hero.railInset * 2), height: railSize }\n\t\t\t: { x: available.x + railInset, y: top, width: railSize, height: fitHeight },\n\t\taxis: horizontal ? 'horizontal' as const : 'vertical' as const,\n\t\titemSize: railSize, gap: hero.railGap, overflow: 'local-scroll' as const\n\t};\n\tconst summary: SummaryLayoutConstraint = {\n\t\tx: split ? base.pane.x : summaryRight - summaryWidth,\n\t\twidth: summaryWidth,\n\t\tanchor: { y: split ? base.paneBody.y : horizontal\n\t\t\t? rail.rect.y + rail.rect.height + hero.summaryGap : top, alignment: 'start' },\n\t\theight: horizontal || split ? { kind: 'natural' } : { kind: 'natural', maxHeight: fitHeight },\n\t\tplacement: split ? 'pane' : horizontal ? 'flow' : 'floating'\n\t};\n\tconst submenu: SubmenuLayoutConstraint | undefined = horizontal ? undefined : split ? {\n\t\tx: base.paneSubmenu.x, y: base.paneSubmenu.y, maxWidth: base.paneSubmenu.width,\n\t\theight: base.paneSubmenu.height, inlineAlignment: 'center', position: 'fixed'\n\t} : {\n\t\tx: wide ? content.x : available.x + hero.submenuLeft,\n\t\ty: top + fitHeight + hero.submenuGap,\n\t\tmaxWidth: wide ? content.width : Math.max(0, available.width - hero.submenuLeft - hero.submenuRight),\n\t\theight: hero.submenuHeight, inlineAlignment: 'start', position: 'document'\n\t};\n\tconst dock = split ? undefined : {\n\t\tsurface: { x: available.x + (wide ? railInset : 0), y: available.y,\n\t\t\twidth: Math.max(0, available.width - (wide ? railInset * 2 : 0)), height: hero.dockHeight },\n\t\tminimap: { x: available.x + railInset, y: available.y + (hero.dockHeight - railSize) / 2,\n\t\t\twidth: railSize, height: railSize },\n\t\ttitleLeft: available.x + railInset + railSize + hero.railStageGap\n\t};\n\tconst contentStart = horizontal ? { kind: 'after-summary' as const, gap: 0 }\n\t\t: split ? { kind: 'pane-body' as const, y: base.paneBody.y }\n\t\t\t: { kind: 'fixed' as const, y: submenu!.y + submenu!.height + hero.submenuAfterGap };\n\treturn {\n\t\tbase, layout, composition: split ? 'split' as const : 'flow' as const,\n\t\tshortHeightFallback: base.layout === '3xl' && !split,\n\t\tmediaFit, rail, summary, submenu, dock, contentStart,\n\t\tcontrols: stageControls(mediaFit.x + mediaFit.width, mediaFit.y),\n\t\tcontent: split ? { x: base.pane.x, width: base.pane.width } : base.content,\n\t\tgrid: split ? base.paneGrid : base.grid,\n\t\tpane: split ? { surface: base.pane, header: base.paneHeader, body: base.paneBody } : undefined,\n\t\tscrollOwner: 'document' as const,\n\t\tmenuFixed: split\n\t};\n}\n\n/** Ordinary-section carousel geometry; its title strip does not change when the eyebrow changes. */\nexport function resolveCarouselLayout(input: CarouselLayoutInput) {\n\tconst base = resolveResponsiveLayout(input);\n\tconst layout = base.layout === '3xl' ? '2xl' : base.layout;\n\tconst settings = tokens.carousel.layouts[layout];\n\tconst compact = layout === 'xs' || layout === 's';\n\tconst { content, grid, available } = base;\n\tconst padding = grid.gap;\n\tconst headlineHeight = input.hasHeadline ? grid.headlineLineHeight : 0;\n\tconst headlineGap = input.hasHeadline ? grid.headlineGap : 0;\n\tconst titleStrip = compact ? tokens.carousel.compactEyebrowHeight : 0;\n\tconst sectionTop = input.sectionTop === undefined ? base.breadcrumb.y + base.breadcrumb.height : size(input.sectionTop);\n\tconst shellBudget = base.breadcrumb.y + base.breadcrumb.height - available.y;\n\tconst heightOffset = shellBudget + padding * 2 + headlineHeight + headlineGap + titleStrip\n\t\t+ settings.dotsGap + tokens.carousel.dotsHeight + tokens.carousel.nextPreviewHeight;\n\tconst fitHeight = clamp(available.height - heightOffset, settings.minHeight, settings.maxHeight);\n\tconst columnX = (column: number) => content.x + padding + (column - 1) * (grid.columnWidth + grid.gap);\n\tconst fitX = compact ? content.x + padding + settings.sideAllowance : columnX(settings.fitStartColumn);\n\tconst fitWidth = compact ? Math.max(0, content.width - (padding + settings.sideAllowance) * 2)\n\t\t: contentSpanWidth(content.width, settings.fitColumns);\n\tconst fitTop = sectionTop + padding + headlineHeight + headlineGap + titleStrip;\n\tconst mediaFit: LayoutRect = { x: fitX, y: fitTop, width: fitWidth, height: fitHeight };\n\tconst compactHeight = input.hasEyebrow ? tokens.carousel.compactEyebrowHeight : tokens.carousel.compactTitleHeight;\n\tconst summary: SummaryLayoutConstraint = {\n\t\tx: compact ? fitX : columnX(settings.summaryStartColumn),\n\t\twidth: compact ? fitWidth : contentSpanWidth(content.width, settings.summaryColumns),\n\t\tanchor: { y: compact ? fitTop - compactHeight : fitTop + fitHeight / 2, alignment: compact ? 'start' : 'center' },\n\t\theight: compact ? { kind: 'fixed', value: compactHeight } : { kind: 'natural', maxHeight: fitHeight },\n\t\tplacement: compact ? 'compact' : 'floating'\n\t};\n\tconst dots: SubmenuLayoutConstraint = {\n\t\tx: content.x + padding, y: fitTop + fitHeight + settings.dotsGap,\n\t\tmaxWidth: Math.max(0, content.width - padding * 2), height: tokens.carousel.dotsHeight,\n\t\tinlineAlignment: 'center', position: 'document'\n\t};\n\tconst sectionEnd = dots.y + dots.height + padding;\n\treturn {\n\t\tbase, layout, content, grid, mediaFit, summary, dots, heightOffset,\n\t\tsection: { x: content.x, y: sectionTop, width: content.width, height: Math.max(0, sectionEnd - sectionTop) },\n\t\theadline: input.hasHeadline ? { x: content.x + padding, y: sectionTop + padding,\n\t\t\twidth: Math.max(0, content.width - padding * 2), height: headlineHeight } : undefined,\n\t\tsectionEnd, scrollOwner: 'document' as const\n\t};\n}\n\n/** Fullscreen presentation uses the actual viewport layout, independent of the short-detail fallback. */\nexport function resolveZoomLayout(input: ResponsiveLayoutInput) {\n\tconst base = resolveResponsiveLayout(input);\n\tconst settings = tokens.hero[base.layout];\n\tconst bottom = base.layout === 'xs' || base.layout === 's';\n\tconst { available } = base;\n\tconst inset = settings.zoomInset;\n\tconst minimap: LayoutRect = {\n\t\tx: available.x + inset,\n\t\ty: bottom ? available.y + available.height - inset - settings.zoomMinimap : available.y + inset,\n\t\twidth: settings.zoomMinimap, height: settings.zoomMinimap\n\t};\n\treturn {\n\t\tbase, interactionArea: available,\n\t\tcanvas: { x: 0, y: 0, width: base.viewport.width, height: base.viewport.height },\n\t\tminimap, minimapAnchor: bottom ? 'bottom-left' as const : 'top-left' as const,\n\t\tcontrols: stageControls(available.x + available.width - inset, available.y + inset)\n\t};\n}\n\n/** Requested source height is used during handoff; intrinsic destination height remains unknown. */\nexport function resolvePanelHeight(sourceHeight: number, maxHeight?: number) {\n\treturn maxHeight === undefined ? size(sourceHeight) : clamp(size(sourceHeight), 0, size(maxHeight));\n}\n"]}
@@ -0,0 +1,3 @@
1
+ export { normalizeSectionBackground, createSectionBackgroundNormalizer } from '@page-sections/core';
2
+ export type { SectionBackgroundContext, SectionBackgroundDiagnostic, ResolvedSectionBackground } from '@page-sections/core';
3
+ //# sourceMappingURL=sectionBackground.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sectionBackground.d.ts","sourceRoot":"","sources":["../../src/spatial-element/sectionBackground.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,iCAAiC,EAAE,MAAM,qBAAqB,CAAC;AACpG,YAAY,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { normalizeSectionBackground, createSectionBackgroundNormalizer } from '@page-sections/core';
2
+ //# sourceMappingURL=sectionBackground.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sectionBackground.js","sourceRoot":"","sources":["../../src/spatial-element/sectionBackground.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,iCAAiC,EAAE,MAAM,qBAAqB,CAAC","sourcesContent":["export { normalizeSectionBackground, createSectionBackgroundNormalizer } from '@page-sections/core';\nexport type { SectionBackgroundContext, SectionBackgroundDiagnostic, ResolvedSectionBackground } from '@page-sections/core';\n"]}
@@ -1,4 +1,5 @@
1
- import type { SpatialListItem, SpatialElementSectionStyle, SpatialStageConfig } from './types.js';
1
+ import type { SpatialListItem, SpatialElementSectionStyle, SpatialElementData } from './types.js';
2
+ import type { SpatialElementSceneSource } from './spatialElementScene.js';
2
3
  /** Validates section identifiers before they are used as DOM anchors. */
3
4
  export declare function isSpatialElementSectionId(value: string): boolean;
4
5
  /** Converts section styling data into scoped CSS custom properties. */
@@ -9,20 +10,24 @@ export declare function findSpatialElement<T extends {
9
10
  }>(spatialElements: readonly T[], spatialElementId: string): T | undefined;
10
11
  interface SpatialListSource {
11
12
  id: string;
12
- eyebrow: string;
13
+ eyebrow?: string;
13
14
  title: string;
14
- features: readonly {
15
+ features?: readonly {
15
16
  label: string;
17
+ marker?: string;
16
18
  }[];
19
+ action?: SpatialElementData['action'];
20
+ minimap?: SpatialElementData['minimap'];
17
21
  }
18
- /** Keeps content projections lightweight; spatial catalogs explicitly request migration asset metadata. */
19
- export declare function getSpatialListItems(spatialElements: readonly (SpatialListSource & {
20
- stage: SpatialStageConfig;
21
- })[], basePath: string, options: {
22
- includeStage: true;
23
- }): SpatialListItem[];
24
- export declare function getSpatialListItems(spatialElements: readonly SpatialListSource[], basePath: string, options?: {
25
- includeStage?: false;
26
- }): SpatialListItem[];
22
+ /**
23
+ * Creates category items, including scene assets and the shared detail summary, from element data.
24
+ * `basePath` is the application's detail route prefix (e.g. `/shop/elements`).
25
+ * IDs are URL-encoded; no assets are loaded by this helper. Text-only sources also work.
26
+ */
27
+ export declare function getSpatialListItems(spatialElements: readonly (SpatialListSource & Partial<SpatialElementSceneSource>)[], basePath: string): SpatialListItem[];
28
+ /** @internal Normalized presentation document; the public authoring type keeps optional content optional. */
29
+ export type ResolvedSpatialElementData = SpatialElementData & Required<Pick<SpatialElementData, 'brandId' | 'pageTitle' | 'eyebrow' | 'features' | 'breadcrumbs' | 'media'>>;
30
+ /** @internal Resolve presentation defaults without mutating route data or inventing link destinations. */
31
+ export declare function resolveSpatialElementData(element: SpatialElementData, brandId: string): ResolvedSpatialElementData;
27
32
  export {};
28
33
  //# sourceMappingURL=spatialElement.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"spatialElement.d.ts","sourceRoot":"","sources":["../../src/spatial-element/spatialElement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,0BAA0B,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAIlG,yEAAyE;AACzE,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,WAEtD;AAED,uEAAuE;AACvE,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,0BAA0B,GAAG,SAAS,UAgB1F;AAOD,sFAAsF;AACtF,wBAAgB,kBAAkB,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,eAAe,EAAE,SAAS,CAAC,EAAE,EAAE,gBAAgB,EAAE,MAAM,iBAEnH;AAED,UAAU,iBAAiB;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACvC;AAED,2GAA2G;AAC3G,wBAAgB,mBAAmB,CAClC,eAAe,EAAE,SAAS,CAAC,iBAAiB,GAAG;IAAE,KAAK,EAAE,kBAAkB,CAAA;CAAE,CAAC,EAAE,EAC/E,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE;IAAE,YAAY,EAAE,IAAI,CAAA;CAAE,GAC7B,eAAe,EAAE,CAAC;AACrB,wBAAgB,mBAAmB,CAClC,eAAe,EAAE,SAAS,iBAAiB,EAAE,EAC7C,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE;IAAE,YAAY,CAAC,EAAE,KAAK,CAAA;CAAE,GAChC,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"spatialElement.d.ts","sourceRoot":"","sources":["../../src/spatial-element/spatialElement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA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GACb,0BAA0B,CAe5B"}
@@ -29,17 +29,44 @@ function toPercentage(value) {
29
29
  export function findSpatialElement(spatialElements, spatialElementId) {
30
30
  return spatialElements.find((spatialElement) => spatialElement.id === spatialElementId);
31
31
  }
32
- export function getSpatialListItems(spatialElements, basePath, options = {}) {
32
+ /**
33
+ * Creates category items, including scene assets and the shared detail summary, from element data.
34
+ * `basePath` is the application's detail route prefix (e.g. `/shop/elements`).
35
+ * IDs are URL-encoded; no assets are loaded by this helper. Text-only sources also work.
36
+ */
37
+ export function getSpatialListItems(spatialElements, basePath) {
33
38
  const normalizedBasePath = basePath.replace(/\/$/, '');
34
39
  return spatialElements.map((spatialElement) => ({
35
40
  id: spatialElement.id,
36
41
  href: `${normalizedBasePath}/${encodeURIComponent(spatialElement.id)}`,
37
- eyebrow: spatialElement.eyebrow,
42
+ eyebrow: spatialElement.eyebrow ?? '',
38
43
  title: spatialElement.title,
39
- features: spatialElement.features.map(({ label }) => label),
40
- ...(options.includeStage && 'stage' in spatialElement
41
- ? { stage: spatialElement.stage }
42
- : {})
44
+ features: (spatialElement.features ?? []).map(({ label }) => label),
45
+ summary: { features: [...(spatialElement.features ?? [])], action: spatialElement.action },
46
+ geometry: spatialElement.geometry,
47
+ hdr: spatialElement.hdr,
48
+ background: spatialElement.background,
49
+ model: spatialElement.model,
50
+ camera: spatialElement.camera,
51
+ minimap: spatialElement.minimap,
52
+ assetManifest: spatialElement.assetManifest,
53
+ fallbackImage: spatialElement.fallbackImage,
54
+ fallbackImageSize: spatialElement.fallbackImageSize
43
55
  }));
44
56
  }
57
+ /** @internal Resolve presentation defaults without mutating route data or inventing link destinations. */
58
+ export function resolveSpatialElementData(element, brandId) {
59
+ if (element.brandId && element.brandId !== brandId) {
60
+ throw new Error(`Element "${element.id}" belongs to "${element.brandId}", but the shell uses "${brandId}".`);
61
+ }
62
+ return {
63
+ ...element,
64
+ brandId,
65
+ pageTitle: element.pageTitle ?? element.title,
66
+ eyebrow: element.eyebrow ?? '',
67
+ features: element.features ?? [],
68
+ breadcrumbs: element.breadcrumbs ?? [],
69
+ media: element.media ?? [{ id: 'model', kind: 'minimap', label: '3D view' }]
70
+ };
71
+ }
45
72
  //# sourceMappingURL=spatialElement.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"spatialElement.js","sourceRoot":"","sources":["../../src/spatial-element/spatialElement.ts"],"names":[],"mappings":"AAEA,MAAM,kBAAkB,GAAG,mBAAmB,CAAC;AAE/C,yEAAyE;AACzE,MAAM,UAAU,yBAAyB,CAAC,KAAa;IACtD,OAAO,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACvC,CAAC;AAED,uEAAuE;AACvE,MAAM,UAAU,6BAA6B,CAAC,KAA6C;IAC1F,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,CAAC;IAEtB,OAAO;QACN,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,mCAAmC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE;QACjE,KAAK,CAAC,WAAW,KAAK,SAAS;YAC9B,CAAC,CAAC,2CAA2C,YAAY,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE;YAC9E,CAAC,CAAC,EAAE;QACL,KAAK,CAAC,YAAY,KAAK,SAAS;YAC/B,CAAC,CAAC,4CAA4C,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC,IAAI;YACjF,CAAC,CAAC,EAAE;QACL,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,oCAAoC,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE;QAC5E,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,oCAAoC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE;KACpE;SACC,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,IAAI,CAAC,CAAC;AACd,CAAC;AAED,SAAS,YAAY,CAAC,KAAa;IAClC,MAAM,WAAW,GAAG,MAAM,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z][a-z0-9-]*$/;\n\n/** Validates section identifiers before they are used as DOM anchors. */\nexport function isSpatialElementSectionId(value: string) {\n\treturn SECTION_ID_PATTERN.test(value);\n}\n\n/** Converts section styling data into scoped CSS custom properties. */\nexport function getSpatialElementSectionStyle(style: SpatialElementSectionStyle | undefined) {\n\tif (!style) return '';\n\n\treturn [\n\t\tstyle.tint ? `--spatial-element-section-tint: ${style.tint}` : '',\n\t\tstyle.tintOpacity !== undefined\n\t\t\t? `--spatial-element-section-tint-opacity: ${toPercentage(style.tintOpacity)}`\n\t\t\t: '',\n\t\tstyle.backdropBlur !== undefined\n\t\t\t? `--spatial-element-section-backdrop-blur: ${Math.max(style.backdropBlur, 0)}px`\n\t\t\t: '',\n\t\tstyle.textColor ? `--spatial-element-section-color: ${style.textColor}` : '',\n\t\tstyle.width ? `--spatial-element-section-width: ${style.width}` : ''\n\t]\n\t\t.filter(Boolean)\n\t\t.join('; ');\n}\n\nfunction toPercentage(value: number) {\n\tconst finiteValue = Number.isFinite(value) ? value : 0;\n\treturn `${Math.min(Math.max(finiteValue, 0), 1) * 100}%`;\n}\n\n/** Finds a element by route id while retaining a narrow, serializable return type. */\nexport function findSpatialElement<T extends { id: string }>(spatialElements: readonly T[], spatialElementId: string) {\n\treturn spatialElements.find((spatialElement) => spatialElement.id === spatialElementId);\n}\n\ninterface SpatialListSource {\n\tid: string;\n\teyebrow: string;\n\ttitle: string;\n\tfeatures: readonly { label: string }[];\n}\n\n/** Keeps content projections lightweight; spatial catalogs explicitly request migration asset metadata. */\nexport function getSpatialListItems(\n\tspatialElements: readonly (SpatialListSource & { stage: SpatialStageConfig })[],\n\tbasePath: string,\n\toptions: { includeStage: true }\n): SpatialListItem[];\nexport function getSpatialListItems(\n\tspatialElements: readonly SpatialListSource[],\n\tbasePath: string,\n\toptions?: { includeStage?: false }\n): SpatialListItem[];\nexport function getSpatialListItems(\n\tspatialElements: readonly SpatialListSource[],\n\tbasePath: string,\n\toptions: { includeStage?: boolean } = {}\n): SpatialListItem[] {\n\tconst normalizedBasePath = basePath.replace(/\\/$/, '');\n\n\treturn spatialElements.map((spatialElement) => ({\n\t\tid: spatialElement.id,\n\t\thref: `${normalizedBasePath}/${encodeURIComponent(spatialElement.id)}`,\n\t\teyebrow: spatialElement.eyebrow,\n\t\ttitle: spatialElement.title,\n\t\tfeatures: spatialElement.features.map(({ label }) => label),\n\t\t...(options.includeStage && 'stage' in spatialElement\n\t\t\t? { stage: spatialElement.stage as SpatialStageConfig }\n\t\t\t: {})\n\t}));\n}\n"]}
1
+ {"version":3,"file":"spatialElement.js","sourceRoot":"","sources":["../../src/spatial-element/spatialElement.ts"],"names":[],"mappings":"AAGA,MAAM,kBAAkB,GAAG,mBAAmB,CAAC;AAE/C,yEAAyE;AACzE,MAAM,UAAU,yBAAyB,CAAC,KAAa;IACtD,OAAO,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACvC,CAAC;AAED,uEAAuE;AACvE,MAAM,UAAU,6BAA6B,CAAC,KAA6C;IAC1F,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,CAAC;IAEtB,OAAO;QACN,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,mCAAmC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE;QACjE,KAAK,CAAC,WAAW,KAAK,SAAS;YAC9B,CAAC,CAAC,2CAA2C,YAAY,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE;YAC9E,CAAC,CAAC,EAAE;QACL,KAAK,CAAC,YAAY,KAAK,SAAS;YAC/B,CAAC,CAAC,4CAA4C,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC,IAAI;YACjF,CAAC,CAAC,EAAE;QACL,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,oCAAoC,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE;QAC5E,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,oCAAoC,KAAK,CAA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QAAQ,IAAI,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,MAAM,EAAE;QAC1F,QAAQ,EAAE,cAAc,CAAC,QAAQ;QACjC,GAAG,EAAE,cAAc,CAAC,GAAG;QACvB,UAAU,EAAE,cAAc,CAAC,UAAU;QACrC,KAAK,EAAE,cAAc,CAAC,KAAK;QAC3B,MAAM,EAAE,cAAc,CAAC,MAAM;QAC7B,OAAO,EAAE,cAAc,CAAC,OAAO;QAC/B,aAAa,EAAE,cAAc,CAAC,aAAa;QAC3C,aAAa,EAAE,cAAc,CAAC,aAAa;QAC3C,iBAAiB,EAAE,cAAc,CAAC,iBAAiB;KACnD,CAAC,CAAC,CAAC;AACL,CAAC;AAWD,0GAA0G;AAC1G,MAAM,UAAU,yBAAyB,CACxC,OAA2B,EAC3B,OAAe;IAEf,IAAI,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,OAAO,KAAK,OAAO,EAAE,CAAC;QACpD,MAAM,IAAI,KAAK,CACd,YAAY,OAAO,CAAC,EAAE,iBAAiB,OAAO,CAAC,OAAO,0BAA0B,OAAO,IAAI,CAC3F,CAAC;IACH,CAAC;IACD,OAAO;QACN,GAAG,OAAO;QACV,OAAO;QACP,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,KAAK;QAC7C,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,EAAE;QAC9B,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,EAAE;QAChC,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,EAAE;QACtC,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;KAC5E,CAAC;AACH,CAAC","sourcesContent":["import type { SpatialListItem, SpatialElementSectionStyle, SpatialElementData } from './types.js';\nimport type { SpatialElementSceneSource } from './spatialElementScene.js';\n\nconst SECTION_ID_PATTERN = /^[a-z][a-z0-9-]*$/;\n\n/** Validates section identifiers before they are used as DOM anchors. */\nexport function isSpatialElementSectionId(value: string) {\n\treturn SECTION_ID_PATTERN.test(value);\n}\n\n/** Converts section styling data into scoped CSS custom properties. */\nexport function getSpatialElementSectionStyle(style: SpatialElementSectionStyle | undefined) {\n\tif (!style) return '';\n\n\treturn [\n\t\tstyle.tint ? `--spatial-element-section-tint: ${style.tint}` : '',\n\t\tstyle.tintOpacity !== undefined\n\t\t\t? `--spatial-element-section-tint-opacity: ${toPercentage(style.tintOpacity)}`\n\t\t\t: '',\n\t\tstyle.backdropBlur !== undefined\n\t\t\t? `--spatial-element-section-backdrop-blur: ${Math.max(style.backdropBlur, 0)}px`\n\t\t\t: '',\n\t\tstyle.textColor ? `--spatial-element-section-color: ${style.textColor}` : '',\n\t\tstyle.width ? `--spatial-element-section-width: ${style.width}` : ''\n\t]\n\t\t.filter(Boolean)\n\t\t.join('; ');\n}\n\nfunction toPercentage(value: number) {\n\tconst finiteValue = Number.isFinite(value) ? value : 0;\n\treturn `${Math.min(Math.max(finiteValue, 0), 1) * 100}%`;\n}\n\n/** Finds a element by route id while retaining a narrow, serializable return type. */\nexport function findSpatialElement<T extends { id: string }>(\n\tspatialElements: readonly T[],\n\tspatialElementId: string\n) {\n\treturn spatialElements.find((spatialElement) => spatialElement.id === spatialElementId);\n}\n\ninterface SpatialListSource {\n\tid: string;\n\teyebrow?: string;\n\ttitle: string;\n\tfeatures?: readonly { label: string; marker?: string }[];\n\taction?: SpatialElementData['action'];\n\tminimap?: SpatialElementData['minimap'];\n}\n\n/**\n * Creates category items, including scene assets and the shared detail summary, from element data.\n * `basePath` is the application's detail route prefix (e.g. `/shop/elements`).\n * IDs are URL-encoded; no assets are loaded by this helper. Text-only sources also work.\n */\nexport function getSpatialListItems(\n\tspatialElements: readonly (SpatialListSource & Partial<SpatialElementSceneSource>)[],\n\tbasePath: string\n): SpatialListItem[] {\n\tconst normalizedBasePath = basePath.replace(/\\/$/, '');\n\n\treturn spatialElements.map((spatialElement) => ({\n\t\tid: spatialElement.id,\n\t\thref: `${normalizedBasePath}/${encodeURIComponent(spatialElement.id)}`,\n\t\teyebrow: spatialElement.eyebrow ?? '',\n\t\ttitle: spatialElement.title,\n\t\tfeatures: (spatialElement.features ?? []).map(({ label }) => label),\n\t\tsummary: { features: [...(spatialElement.features ?? [])], action: spatialElement.action },\n\t\tgeometry: spatialElement.geometry,\n\t\thdr: spatialElement.hdr,\n\t\tbackground: spatialElement.background,\n\t\tmodel: spatialElement.model,\n\t\tcamera: spatialElement.camera,\n\t\tminimap: spatialElement.minimap,\n\t\tassetManifest: spatialElement.assetManifest,\n\t\tfallbackImage: spatialElement.fallbackImage,\n\t\tfallbackImageSize: spatialElement.fallbackImageSize\n\t}));\n}\n\n/** @internal Normalized presentation document; the public authoring type keeps optional content optional. */\nexport type ResolvedSpatialElementData = SpatialElementData &\n\tRequired<\n\t\tPick<\n\t\t\tSpatialElementData,\n\t\t\t'brandId' | 'pageTitle' | 'eyebrow' | 'features' | 'breadcrumbs' | 'media'\n\t\t>\n\t>;\n\n/** @internal Resolve presentation defaults without mutating route data or inventing link destinations. */\nexport function resolveSpatialElementData(\n\telement: SpatialElementData,\n\tbrandId: string\n): ResolvedSpatialElementData {\n\tif (element.brandId && element.brandId !== brandId) {\n\t\tthrow new Error(\n\t\t\t`Element \"${element.id}\" belongs to \"${element.brandId}\", but the shell uses \"${brandId}\".`\n\t\t);\n\t}\n\treturn {\n\t\t...element,\n\t\tbrandId,\n\t\tpageTitle: element.pageTitle ?? element.title,\n\t\teyebrow: element.eyebrow ?? '',\n\t\tfeatures: element.features ?? [],\n\t\tbreadcrumbs: element.breadcrumbs ?? [],\n\t\tmedia: element.media ?? [{ id: 'model', kind: 'minimap', label: '3D view' }]\n\t};\n}\n"]}
@@ -6,6 +6,20 @@ export interface SpatialElementDockRect {
6
6
  height: number;
7
7
  }
8
8
  export declare const SPATIAL_ELEMENT_TABS_DOCK_SEAM_OVERLAP = 1;
9
+ /** Shared endpoint geometry. Intrinsic submenu width is bounded, never stretched. */
10
+ export declare function resolveSpatialElementDockLayout(input: ResponsiveLayoutInput, submenuWidth?: number): {
11
+ layout: "s" | "m" | "l" | "xs" | "xl" | "2xl" | "3xl";
12
+ header: SpatialElementDockRect;
13
+ minimap: SpatialElementDockRect;
14
+ submenu: {
15
+ left: number;
16
+ top: number;
17
+ width: number;
18
+ height: number;
19
+ } | undefined;
20
+ titleReserve: number;
21
+ sectionOffset: number;
22
+ } | undefined;
9
23
  /** Resolves the fixed spatial-element-header rectangle for a viewport. */
10
24
  export declare function getSpatialElementDockDestination(viewportWidth: number, top?: number, height?: number): SpatialElementDockRect;
11
25
  /** Pins the unchanged minimap to the top edge of the viewport. */
@@ -40,4 +54,5 @@ export declare function getSpatialElementDockBreakpoint(minimapDocumentTop: numb
40
54
  export declare function getSpatialElementDockPresentationProgress(scrollY: number, minimapDocumentBottom: number, startScrollY?: number): number;
41
55
  /** Adds a small release hysteresis so trackpad momentum cannot flicker the header. */
42
56
  export declare function getSpatialElementDockTarget(scrollY: number, breakpoint: number, currentlyDocked: boolean, releaseOffset?: number): boolean;
57
+ import { type ResponsiveLayoutInput } from './responsiveLayout.js';
43
58
  //# sourceMappingURL=spatialElementDock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"spatialElementDock.d.ts","sourceRoot":"","sources":["../../src/spatial-element/spatialElementDock.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,MAAM,WAAW,sBAAsB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CACf;AAKD,eAAO,MAAM,sCAAsC,IAAI,CAAC;AAExD,0EAA0E;AAC1E,wBAAgB,gCAAgC,CAC/C,aAAa,EAAE,MAAM,EACrB,GAAG,SAAI,EACP,MAAM,SAAK,GACT,sBAAsB,CAQxB;AAED,kEAAkE;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ChB,sBAAsB,CAWxB;AAED,0FAA0F;AAC1F,wBAAgB,+BAA+B,CAAC,kBAAkB,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,UAEjG;AAED;;;GAGG;AACH,wBAAgB,yCAAyC,CACxD,OAAO,EAAE,MAAM,EACf,qBAAqB,EAAE,MAAM,EAC7B,YAAY,SAAI,UAQhB;AAED,sFAAsF;AACtF,wBAAgB,2BAA2B,CAC1C,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,eAAe,EAAE,OAAO,EACxB,aAAa,SAAK,WAKlB"}
1
+ {"version":3,"file":"spatialElementDock.d.ts","sourceRoot":"","sources":["../../src/spatial-element/spatialElementDock.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,MAAM,WAAW,sBAAsB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CACf;AAKD,eAAO,MAAM,sCAAsC,IAAI,CAAC;AAExD,qFAAqF;AACrF,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,qBAAqB,EAAE,YAAY,SAAI;;;;;;;;;;;;cAmB7F;AAED,0EAA0E;AAC1E,wBAAgB,gCAAgC,CAC/C,aAAa,EAAE,MAAM,EACrB,GAAG,SAAI,EACP,MAAM,SAAK,GACT,sBAAsB,CAQxB;AAED,kEAAkE;AAClE,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,sBAAsB,GAAG,sBAAsB,CAKhG;AAED,gGAAgG;AAChG,wBAAgB,gCAAgC,CAC/C,MAAM,EAAE,sBAAsB,EAC9B,MAAM,EAAE,sBAAsB,EAC9B,aAAa,EAAE,MAAM,EACrB,KAAK,SAAI,GACP,sBAAsB,CAexB;AAED,oGAAoG;AACpG,wBAAgB,oCAAoC,CACnD,MAAM,EAAE,sBAAsB,EAC9B,MAAM,EAAE,sBAAsB,EAC9B,aAAa,EAAE,MAAM,EACrB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SAAK,WAKlB;AACD,OAAO,EAA4C,KAAK,qBAAqB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -2,6 +2,27 @@ const MAX_DOCKED_MINIMAP_MODEL_SCALE = 1.4;
2
2
  const MIN_CONFIGURED_DOCKED_MINIMAP_MODEL_SCALE = 0.2;
3
3
  const MAX_CONFIGURED_DOCKED_MINIMAP_MODEL_SCALE = 2;
4
4
  export const SPATIAL_ELEMENT_TABS_DOCK_SEAM_OVERLAP = 1;
5
+ /** Shared endpoint geometry. Intrinsic submenu width is bounded, never stretched. */
6
+ export function resolveSpatialElementDockLayout(input, submenuWidth = 0) {
7
+ const detail = resolveDetailLayout(input);
8
+ if (!detail.dock)
9
+ return undefined;
10
+ const asRect = ({ x, y, width, height }) => ({ left: x, top: y, width, height });
11
+ const header = asRect(detail.dock.surface);
12
+ const minimap = asRect(detail.dock.minimap);
13
+ const submenu = detail.submenu && {
14
+ left: detail.submenu.x,
15
+ top: header.top + header.height,
16
+ width: Math.min(Math.max(Number.isFinite(submenuWidth) ? submenuWidth : 0, 0), detail.submenu.maxWidth),
17
+ height: detail.submenu.height
18
+ };
19
+ const gap = submenu ? spatialLayoutTokens.hero[detail.layout].submenuAfterGap : 8;
20
+ return {
21
+ layout: detail.layout, header, minimap, submenu,
22
+ titleReserve: detail.dock.titleLeft - header.left,
23
+ sectionOffset: header.top + header.height + (submenu?.height ?? 0) + gap
24
+ };
25
+ }
5
26
  /** Resolves the fixed spatial-element-header rectangle for a viewport. */
6
27
  export function getSpatialElementDockDestination(viewportWidth, top = 8, height = 86) {
7
28
  const inset = 16;
@@ -123,4 +144,5 @@ export function getSpatialElementDockTarget(scrollY, breakpoint, currentlyDocked
123
144
  ? scrollY >= Math.max(breakpoint - releaseOffset, 0)
124
145
  : scrollY >= breakpoint;
125
146
  }
147
+ import { resolveDetailLayout, spatialLayoutTokens } from './responsiveLayout.js';
126
148
  //# sourceMappingURL=spatialElementDock.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"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G,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5E,MAAM,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAAC;QACjD,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,qBAAqB,EAAE,KAAK,CAAC;QACxC,CAAC,CAAC,KAAK,CAAC;IACT,IAAI,GAAG,KAAK,KAAK;QAAE,OAAO,OAAO,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACjD,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,GAAG,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACpE,CAAC;AAED,sFAAsF;AACtF,MAAM,UAAU,2BAA2B,CAC1C,OAAe,EACf,UAAkB,EAClB,eAAwB,EACxB,aAAa,GAAG,EAAE;IAElB,OAAO,eAAe;QACrB,CAAC,CAAC,OAAO,IAAI,IAAI,CAAC,GAAG,CAAC,UAAU,GAAG,aAAa,EAAE,CAAC,CAAC;QACpD,CAAC,CAAC,OAAO,IAAI,UAAU,CAAC;AAC1B,CAAC","sourcesContent":["/** A viewport-aligned rectangle expressed in CSS pixels. */\nexport interface SpatialElementDockRect {\n\tleft: number;\n\ttop: number;\n\twidth: number;\n\theight: number;\n}\n\nconst MAX_DOCKED_MINIMAP_MODEL_SCALE = 1.4;\nconst MIN_CONFIGURED_DOCKED_MINIMAP_MODEL_SCALE = 0.2;\nconst MAX_CONFIGURED_DOCKED_MINIMAP_MODEL_SCALE = 2;\nexport const SPATIAL_ELEMENT_TABS_DOCK_SEAM_OVERLAP = 1;\n\n/** Resolves the fixed spatial-element-header rectangle for a viewport. */\nexport function getSpatialElementDockDestination(\n\tviewportWidth: number,\n\ttop = 8,\n\theight = 86\n): SpatialElementDockRect {\n\tconst inset = 16;\n\treturn {\n\t\tleft: inset,\n\t\ttop,\n\t\twidth: Math.max(viewportWidth - inset * 2, 1),\n\t\theight\n\t};\n}\n\n/** Pins the unchanged minimap to the top edge of the viewport. */\nexport function getMinimapDockDestination(source: SpatialElementDockRect): SpatialElementDockRect {\n\treturn {\n\t\t...source,\n\t\ttop: 0\n\t};\n}\n\n/** Fits the docked minimap around a compact header without consuming most of its copy width. */\nexport function getCompactMinimapDockDestination(\n\tsource: SpatialElementDockRect,\n\theader: SpatialElementDockRect,\n\tviewportWidth: number,\n\tinset = 4\n): SpatialElementDockRect {\n\tconst safeInset = Math.max(inset, 0);\n\tconst size = Math.max(\n\t\tMath.min(source.width, header.height + 8, viewportWidth - safeInset * 2),\n\t\t1\n\t);\n\tconst minimumLeft = header.left + safeInset;\n\tconst maximumLeft = Math.max(header.left + header.width - size - safeInset, minimumLeft);\n\n\treturn {\n\t\tleft: Math.min(Math.max(source.left, minimumLeft), maximumLeft),\n\t\ttop: Math.max(header.top - (size - header.height) * 0.5, 0),\n\t\twidth: size,\n\t\theight: size\n\t};\n}\n\n/** Overlaps the subnavigation with the header edge to avoid a compositing seam between surfaces. */\nexport function getSpatialElementTabsDockDestination(\n\tsource: SpatialElementDockRect,\n\theader: SpatialElementDockRect,\n\tviewportWidth: number,\n\tinset = 8,\n\tseamOverlap = SPATIAL_ELEMENT_TABS_DOCK_SEAM_OVERLAP\n): SpatialElementDockRect {\n\tconst safeInset = Math.max(inset, 0);\n\tconst safeSeamOverlap = Number.isFinite(seamOverlap) ? Math.max(seamOverlap, 0) : 0;\n\tconst left = Math.min(\n\t\tMath.max(source.left, safeInset),\n\t\tMath.max(viewportWidth - safeInset, safeInset)\n\t);\n\tconst width = Math.max(Math.min(source.width, viewportWidth - left - safeInset), 1);\n\n\treturn {\n\t\tleft,\n\t\ttop: header.top + header.height - safeSeamOverlap,\n\t\twidth,\n\t\theight: Math.max(source.height, 1)\n\t};\n}\n\n/** Returns the exact visual-scroll point where the source tabs meet their dock destination. */\nexport function getSpatialElementTabsDockBreakpoint(sourceDocumentTop: number, dockTop: number) {\n\treturn Math.max(sourceDocumentTop - dockTop, 0);\n}\n\n/** Tabs only dock after the element header is available as their visible anchor. */\nexport function getSpatialElementTabsDockTarget(\n\tscrollY: number,\n\tbreakpoint: number,\n\theaderDocked: boolean,\n\tcurrentlyDocked = false,\n\treleaseOffset = 1\n) {\n\tif (!headerDocked) return false;\n\treturn currentlyDocked\n\t\t? scrollY >= Math.max(breakpoint - Math.max(releaseOffset, 0), 0)\n\t\t: scrollY >= breakpoint;\n}\n\n/** Morphs the dock shell over a short, reversible distance after the visual handoff. */\nexport function getSpatialElementTabsDockProgress(scrollY: number, breakpoint: number, distance = 24) {\n\tconst safeDistance = Number.isFinite(distance) ? Math.max(distance, 0) : 0;\n\tif (safeDistance === 0) return scrollY >= breakpoint ? 1 : 0;\n\treturn Math.min(Math.max((scrollY - breakpoint) / safeDistance, 0), 1);\n}\n\n/** Leaves a small reading gap below the complete docked header stack for anchor navigation. */\nexport function getSpatialElementSectionScrollOffset(tabs: SpatialElementDockRect, gap = 16) {\n\treturn Math.max(tabs.top + tabs.height + Math.max(gap, 0), 0);\n}\n\n/**\n * Makes the docked element overhang as deliberately as the minimap is taller than\n * the header, without requiring spatial-element-specific optical tuning.\n */\nexport function getDockedMinimapModelScale(\n\tminimap: SpatialElementDockRect,\n\theader: SpatialElementDockRect,\n\tconfiguredScale?: number\n) {\n\tif (configuredScale !== undefined && Number.isFinite(configuredScale)) {\n\t\treturn Math.min(\n\t\t\tMath.max(configuredScale, MIN_CONFIGURED_DOCKED_MINIMAP_MODEL_SCALE),\n\t\t\tMAX_CONFIGURED_DOCKED_MINIMAP_MODEL_SCALE\n\t\t);\n\t}\n\n\tconst minimapHeight = Number.isFinite(minimap.height) ? Math.max(minimap.height, 0) : 0;\n\tconst headerHeight = Number.isFinite(header.height) ? Math.max(header.height, 0) : 0;\n\tif (minimapHeight === 0 || headerHeight === 0) return 1;\n\n\treturn Math.min(Math.max(minimapHeight / headerHeight, 1), MAX_DOCKED_MINIMAP_MODEL_SCALE);\n}\n\n/** Reserves the scaled model's potential right-side overhang before header copy. */\nexport function getDockedMinimapCopyReserve(\n\tminimap: SpatialElementDockRect,\n\theader: SpatialElementDockRect,\n\tmodelScale: number,\n\tgap = 16\n) {\n\tconst safeScale = Number.isFinite(modelScale) ? Math.max(modelScale, 1) : 1;\n\tconst modelOverflow = Math.max(minimap.width, 0) * (safeScale - 1) * 0.5;\n\treturn Math.max(minimap.left + minimap.width + modelOverflow + gap - header.left, 0);\n}\n\n/** Covers the complete scaled model overhang with a viewport-aligned interaction target. */\nexport function getDockedMinimapInteractionRect(\n\tminimap: SpatialElementDockRect,\n\theader: SpatialElementDockRect,\n\tmodelScale: number\n): SpatialElementDockRect {\n\tconst safeScale = Number.isFinite(modelScale) ? Math.max(modelScale, 1) : 1;\n\tconst width = Math.max(minimap.width, 1) * safeScale;\n\tconst height = Math.max(minimap.height, 1) * safeScale;\n\n\treturn {\n\t\tleft: minimap.left - (width - minimap.width) * 0.5,\n\t\ttop: header.top,\n\t\twidth,\n\t\theight\n\t};\n}\n\n/** Returns the scroll position where the minimap naturally reaches its fixed position. */\nexport function getSpatialElementDockBreakpoint(minimapDocumentTop: number, minimapDockTop: number) {\n\treturn Math.max(minimapDocumentTop - minimapDockTop, 0);\n}\n\n/**\n * Maps page scroll directly to the minimap/header handoff. The transition starts\n * at the top of the page and completes when the source minimap has fully left the viewport.\n */\nexport function getSpatialElementDockPresentationProgress(\n\tscrollY: number,\n\tminimapDocumentBottom: number,\n\tstartScrollY = 0\n) {\n\tconst start = Number.isFinite(startScrollY) ? Math.max(startScrollY, 0) : 0;\n\tconst end = Number.isFinite(minimapDocumentBottom)\n\t\t? Math.max(minimapDocumentBottom, start)\n\t\t: start;\n\tif (end === start) return scrollY >= end ? 1 : 0;\n\treturn Math.min(Math.max((scrollY - start) / (end - start), 0), 1);\n}\n\n/** Adds a small release hysteresis so trackpad momentum cannot flicker the header. */\nexport function getSpatialElementDockTarget(\n\tscrollY: number,\n\tbreakpoint: number,\n\tcurrentlyDocked: boolean,\n\treleaseOffset = 16\n) {\n\treturn currentlyDocked\n\t\t? scrollY >= Math.max(breakpoint - releaseOffset, 0)\n\t\t: scrollY >= breakpoint;\n}\n"]}
1
+ {"version":3,"file":"spatialElementDock.js","sourceRoot":"","sources":["../../src/spatial-element/spatialElementDock.ts"],"names":[],"mappings":"AAQA,MAAM,8BAA8B,GAAG,GAAG,CAAC;AAC3C,MAAM,yCAAyC,GAAG,GAAG,CAAC;AACtD,MAAM,yCAAyC,GAAG,CAAC,CAAC;AACpD,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAC,CAAC;AAExD,qFAAqF;AACrF,MAAM,UAAU,+BAA+B,CAAC,KAA4B,EAAE,YAAY,GAAG,CAAC;IAC7F,MAAM,MAAM,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAC1C,IAAI,CAAC,MAAM,CAAC,IAAI;QAAE,OAAO,SAAS,CAAC;IACnC,MAAM,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAA2D,EAA0B,EAAE,CAC3H,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;IACtC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3C,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC5C,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI;QACjC,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QACtB,GAAG,EAAE,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,MAAM;QAC/B,KAAK,EAAE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U,GAAG,aAAa,EAAE,CAAC,CAAC;QACpD,CAAC,CAAC,OAAO,IAAI,UAAU,CAAC;AAC1B,CAAC;AACD,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAA8B,MAAM,uBAAuB,CAAC","sourcesContent":["/** A viewport-aligned rectangle expressed in CSS pixels. */\nexport interface SpatialElementDockRect {\n\tleft: number;\n\ttop: number;\n\twidth: number;\n\theight: number;\n}\n\nconst MAX_DOCKED_MINIMAP_MODEL_SCALE = 1.4;\nconst MIN_CONFIGURED_DOCKED_MINIMAP_MODEL_SCALE = 0.2;\nconst MAX_CONFIGURED_DOCKED_MINIMAP_MODEL_SCALE = 2;\nexport const SPATIAL_ELEMENT_TABS_DOCK_SEAM_OVERLAP = 1;\n\n/** Shared endpoint geometry. Intrinsic submenu width is bounded, never stretched. */\nexport function resolveSpatialElementDockLayout(input: ResponsiveLayoutInput, submenuWidth = 0) {\n\tconst detail = resolveDetailLayout(input);\n\tif (!detail.dock) return undefined;\n\tconst asRect = ({ x, y, width, height }: { x: number; y: number; width: number; height: number }): SpatialElementDockRect =>\n\t\t({ left: x, top: y, width, height });\n\tconst header = asRect(detail.dock.surface);\n\tconst minimap = asRect(detail.dock.minimap);\n\tconst submenu = detail.submenu && {\n\t\tleft: detail.submenu.x,\n\t\ttop: header.top + header.height,\n\t\twidth: Math.min(Math.max(Number.isFinite(submenuWidth) ? submenuWidth : 0, 0), detail.submenu.maxWidth),\n\t\theight: detail.submenu.height\n\t};\n\tconst gap = submenu ? spatialLayoutTokens.hero[detail.layout].submenuAfterGap : 8;\n\treturn {\n\t\tlayout: detail.layout, header, minimap, submenu,\n\t\ttitleReserve: detail.dock.titleLeft - header.left,\n\t\tsectionOffset: header.top + header.height + (submenu?.height ?? 0) + gap\n\t};\n}\n\n/** Resolves the fixed spatial-element-header rectangle for a viewport. */\nexport function getSpatialElementDockDestination(\n\tviewportWidth: number,\n\ttop = 8,\n\theight = 86\n): SpatialElementDockRect {\n\tconst inset = 16;\n\treturn {\n\t\tleft: inset,\n\t\ttop,\n\t\twidth: Math.max(viewportWidth - inset * 2, 1),\n\t\theight\n\t};\n}\n\n/** Pins the unchanged minimap to the top edge of the viewport. */\nexport function getMinimapDockDestination(source: SpatialElementDockRect): SpatialElementDockRect {\n\treturn {\n\t\t...source,\n\t\ttop: 0\n\t};\n}\n\n/** Fits the docked minimap around a compact header without consuming most of its copy width. */\nexport function getCompactMinimapDockDestination(\n\tsource: SpatialElementDockRect,\n\theader: SpatialElementDockRect,\n\tviewportWidth: number,\n\tinset = 4\n): SpatialElementDockRect {\n\tconst safeInset = Math.max(inset, 0);\n\tconst size = Math.max(\n\t\tMath.min(source.width, header.height + 8, viewportWidth - safeInset * 2),\n\t\t1\n\t);\n\tconst minimumLeft = header.left + safeInset;\n\tconst maximumLeft = Math.max(header.left + header.width - size - safeInset, minimumLeft);\n\n\treturn {\n\t\tleft: Math.min(Math.max(source.left, minimumLeft), maximumLeft),\n\t\ttop: Math.max(header.top - (size - header.height) * 0.5, 0),\n\t\twidth: size,\n\t\theight: size\n\t};\n}\n\n/** Overlaps the subnavigation with the header edge to avoid a compositing seam between surfaces. */\nexport function getSpatialElementTabsDockDestination(\n\tsource: SpatialElementDockRect,\n\theader: SpatialElementDockRect,\n\tviewportWidth: number,\n\tinset = 8,\n\tseamOverlap = SPATIAL_ELEMENT_TABS_DOCK_SEAM_OVERLAP\n): SpatialElementDockRect {\n\tconst safeInset = Math.max(inset, 0);\n\tconst safeSeamOverlap = Number.isFinite(seamOverlap) ? Math.max(seamOverlap, 0) : 0;\n\tconst left = Math.min(\n\t\tMath.max(source.left, safeInset),\n\t\tMath.max(viewportWidth - safeInset, safeInset)\n\t);\n\tconst width = Math.max(Math.min(source.width, viewportWidth - left - safeInset), 1);\n\n\treturn {\n\t\tleft,\n\t\ttop: header.top + header.height - safeSeamOverlap,\n\t\twidth,\n\t\theight: Math.max(source.height, 1)\n\t};\n}\n\n/** Returns the exact visual-scroll point where the source tabs meet their dock destination. */\nexport function getSpatialElementTabsDockBreakpoint(sourceDocumentTop: number, dockTop: number) {\n\treturn Math.max(sourceDocumentTop - dockTop, 0);\n}\n\n/** Tabs only dock after the element header is available as their visible anchor. */\nexport function getSpatialElementTabsDockTarget(\n\tscrollY: number,\n\tbreakpoint: number,\n\theaderDocked: boolean,\n\tcurrentlyDocked = false,\n\treleaseOffset = 1\n) {\n\tif (!headerDocked) return false;\n\treturn currentlyDocked\n\t\t? scrollY >= Math.max(breakpoint - Math.max(releaseOffset, 0), 0)\n\t\t: scrollY >= breakpoint;\n}\n\n/** Morphs the dock shell over a short, reversible distance after the visual handoff. */\nexport function getSpatialElementTabsDockProgress(scrollY: number, breakpoint: number, distance = 24) {\n\tconst safeDistance = Number.isFinite(distance) ? Math.max(distance, 0) : 0;\n\tif (safeDistance === 0) return scrollY >= breakpoint ? 1 : 0;\n\treturn Math.min(Math.max((scrollY - breakpoint) / safeDistance, 0), 1);\n}\n\n/** Leaves a small reading gap below the complete docked header stack for anchor navigation. */\nexport function getSpatialElementSectionScrollOffset(tabs: SpatialElementDockRect, gap = 16) {\n\treturn Math.max(tabs.top + tabs.height + Math.max(gap, 0), 0);\n}\n\n/**\n * Makes the docked element overhang as deliberately as the minimap is taller than\n * the header, without requiring spatial-element-specific optical tuning.\n */\nexport function getDockedMinimapModelScale(\n\tminimap: SpatialElementDockRect,\n\theader: SpatialElementDockRect,\n\tconfiguredScale?: number\n) {\n\tif (configuredScale !== undefined && Number.isFinite(configuredScale)) {\n\t\treturn Math.min(\n\t\t\tMath.max(configuredScale, MIN_CONFIGURED_DOCKED_MINIMAP_MODEL_SCALE),\n\t\t\tMAX_CONFIGURED_DOCKED_MINIMAP_MODEL_SCALE\n\t\t);\n\t}\n\n\tconst minimapHeight = Number.isFinite(minimap.height) ? Math.max(minimap.height, 0) : 0;\n\tconst headerHeight = Number.isFinite(header.height) ? Math.max(header.height, 0) : 0;\n\tif (minimapHeight === 0 || headerHeight === 0) return 1;\n\n\treturn Math.min(Math.max(minimapHeight / headerHeight, 1), MAX_DOCKED_MINIMAP_MODEL_SCALE);\n}\n\n/** Reserves the scaled model's potential right-side overhang before header copy. */\nexport function getDockedMinimapCopyReserve(\n\tminimap: SpatialElementDockRect,\n\theader: SpatialElementDockRect,\n\tmodelScale: number,\n\tgap = 16\n) {\n\tconst safeScale = Number.isFinite(modelScale) ? Math.max(modelScale, 1) : 1;\n\tconst modelOverflow = Math.max(minimap.width, 0) * (safeScale - 1) * 0.5;\n\treturn Math.max(minimap.left + minimap.width + modelOverflow + gap - header.left, 0);\n}\n\n/** Covers the complete scaled model overhang with a viewport-aligned interaction target. */\nexport function getDockedMinimapInteractionRect(\n\tminimap: SpatialElementDockRect,\n\theader: SpatialElementDockRect,\n\tmodelScale: number\n): SpatialElementDockRect {\n\tconst safeScale = Number.isFinite(modelScale) ? Math.max(modelScale, 1) : 1;\n\tconst width = Math.max(minimap.width, 1) * safeScale;\n\tconst height = Math.max(minimap.height, 1) * safeScale;\n\n\treturn {\n\t\tleft: minimap.left - (width - minimap.width) * 0.5,\n\t\ttop: header.top,\n\t\twidth,\n\t\theight\n\t};\n}\n\n/** Returns the scroll position where the minimap naturally reaches its fixed position. */\nexport function getSpatialElementDockBreakpoint(minimapDocumentTop: number, minimapDockTop: number) {\n\treturn Math.max(minimapDocumentTop - minimapDockTop, 0);\n}\n\n/**\n * Maps page scroll directly to the minimap/header handoff. The transition starts\n * at the top of the page and completes when the source minimap has fully left the viewport.\n */\nexport function getSpatialElementDockPresentationProgress(\n\tscrollY: number,\n\tminimapDocumentBottom: number,\n\tstartScrollY = 0\n) {\n\tconst start = Number.isFinite(startScrollY) ? Math.max(startScrollY, 0) : 0;\n\tconst end = Number.isFinite(minimapDocumentBottom)\n\t\t? Math.max(minimapDocumentBottom, start)\n\t\t: start;\n\tif (end === start) return scrollY >= end ? 1 : 0;\n\treturn Math.min(Math.max((scrollY - start) / (end - start), 0), 1);\n}\n\n/** Adds a small release hysteresis so trackpad momentum cannot flicker the header. */\nexport function getSpatialElementDockTarget(\n\tscrollY: number,\n\tbreakpoint: number,\n\tcurrentlyDocked: boolean,\n\treleaseOffset = 16\n) {\n\treturn currentlyDocked\n\t\t? scrollY >= Math.max(breakpoint - releaseOffset, 0)\n\t\t: scrollY >= breakpoint;\n}\nimport { resolveDetailLayout, spatialLayoutTokens, type ResponsiveLayoutInput } from './responsiveLayout.js';\n"]}