@oxy.so/bloom 23.1.0 → 23.3.0

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 (670) hide show
  1. package/NOTICE +1 -2
  2. package/README.md +1 -1
  3. package/docs/adoption-matrix.mdx +1 -2
  4. package/docs/bloom-language-codemod.mdx +4 -2
  5. package/docs/bloom-language-for-agents.mdx +1 -0
  6. package/docs/bloom-language.mdx +9 -1
  7. package/docs/page-header.mdx +3 -3
  8. package/docs/public-parts.mdx +2 -5
  9. package/docs/semantic-composition.mdx +2 -2
  10. package/docs/task-catalog.json +1 -1
  11. package/docs/task-catalog.mdx +1 -1
  12. package/docs/verification.mdx +1 -1
  13. package/docs/zoomable-media-gallery.mdx +33 -3
  14. package/lib/commonjs/agent-chat/shared.js +1 -3
  15. package/lib/commonjs/agent-chat/shared.js.map +1 -1
  16. package/lib/commonjs/agent-progress/AgentProgressPlan.js +1 -2
  17. package/lib/commonjs/agent-progress/AgentProgressPlan.js.map +1 -1
  18. package/lib/commonjs/ai-chat/AiChatGalleryPanelBase.js +9 -9
  19. package/lib/commonjs/ai-chat/AiChatGalleryPanelBase.js.map +1 -1
  20. package/lib/commonjs/ai-chat/AiChatImageGenerationBase.js +6 -6
  21. package/lib/commonjs/ai-chat/AiChatImageGenerationBase.js.map +1 -1
  22. package/lib/commonjs/app-shell/use-shell-viewport.js +0 -11
  23. package/lib/commonjs/app-shell/use-shell-viewport.js.map +1 -1
  24. package/lib/commonjs/avatar/Avatar.js +37 -18
  25. package/lib/commonjs/avatar/Avatar.js.map +1 -1
  26. package/lib/commonjs/avatar/LiveBadge.js +6 -1
  27. package/lib/commonjs/avatar/LiveBadge.js.map +1 -1
  28. package/lib/commonjs/avatar-flight/create-avatar-flight-layer.js +5 -5
  29. package/lib/commonjs/avatar-flight/create-avatar-flight-layer.js.map +1 -1
  30. package/lib/commonjs/button/shared.js +0 -7
  31. package/lib/commonjs/button/shared.js.map +1 -1
  32. package/lib/commonjs/canvas/CanvasPanelBase.js +2 -2
  33. package/lib/commonjs/canvas/CanvasPanelBase.js.map +1 -1
  34. package/lib/commonjs/card/SelectionCard.js +11 -11
  35. package/lib/commonjs/card/SelectionCard.js.map +1 -1
  36. package/lib/commonjs/chat-composer/shared.js +0 -7
  37. package/lib/commonjs/chat-composer/shared.js.map +1 -1
  38. package/lib/commonjs/chat-list/shared.js +1 -8
  39. package/lib/commonjs/chat-list/shared.js.map +1 -1
  40. package/lib/commonjs/chip/Chip.js +2 -2
  41. package/lib/commonjs/chip/Chip.js.map +1 -1
  42. package/lib/commonjs/composer-panel/ModelPickerBase.js +2 -1
  43. package/lib/commonjs/composer-panel/ModelPickerBase.js.map +1 -1
  44. package/lib/commonjs/composer-panel/shared.js +0 -7
  45. package/lib/commonjs/composer-panel/shared.js.map +1 -1
  46. package/lib/commonjs/content-panel/ContentPanel.web.js +12 -35
  47. package/lib/commonjs/content-panel/ContentPanel.web.js.map +1 -1
  48. package/lib/commonjs/cover-header/CoverHeader.js +1 -2
  49. package/lib/commonjs/cover-header/CoverHeader.js.map +1 -1
  50. package/lib/commonjs/dialog/DetailDialogMotion.js +1 -2
  51. package/lib/commonjs/dialog/DetailDialogMotion.js.map +1 -1
  52. package/lib/commonjs/floating/FloatingPanel.js +3 -3
  53. package/lib/commonjs/floating/FloatingPanel.js.map +1 -1
  54. package/lib/commonjs/floating/TriggerSlot.js +2 -2
  55. package/lib/commonjs/floating/TriggerSlot.js.map +1 -1
  56. package/lib/commonjs/floating/constants.js +1 -1
  57. package/lib/commonjs/floating/menu-swatch-row.js +2 -2
  58. package/lib/commonjs/floating/menu-swatch-row.js.map +1 -1
  59. package/lib/commonjs/floating/shared.js +2 -2
  60. package/lib/commonjs/floating/shared.js.map +1 -1
  61. package/lib/commonjs/image/BloomImage.js +4 -0
  62. package/lib/commonjs/image/BloomImage.js.map +1 -1
  63. package/lib/commonjs/image/expo-image-module.js.map +1 -1
  64. package/lib/commonjs/link-preview/LinkPreviewCard.js +21 -5
  65. package/lib/commonjs/link-preview/LinkPreviewCard.js.map +1 -1
  66. package/lib/commonjs/lyrics/shared.js +0 -12
  67. package/lib/commonjs/lyrics/shared.js.map +1 -1
  68. package/lib/commonjs/mail-list/shared.js +1 -11
  69. package/lib/commonjs/mail-list/shared.js.map +1 -1
  70. package/lib/commonjs/media-card/shared.js +0 -12
  71. package/lib/commonjs/media-card/shared.js.map +1 -1
  72. package/lib/commonjs/media-flight/MediaSurface.js +34 -12
  73. package/lib/commonjs/media-flight/MediaSurface.js.map +1 -1
  74. package/lib/commonjs/media-header/shared.js +0 -12
  75. package/lib/commonjs/media-header/shared.js.map +1 -1
  76. package/lib/commonjs/media-player/shared.js +0 -12
  77. package/lib/commonjs/media-player/shared.js.map +1 -1
  78. package/lib/commonjs/multi-agent-chat/Marketplace.js +3 -3
  79. package/lib/commonjs/multi-agent-chat/Marketplace.js.map +1 -1
  80. package/lib/commonjs/music-library/shared.js +0 -12
  81. package/lib/commonjs/music-library/shared.js.map +1 -1
  82. package/lib/commonjs/page-header/EdgeScrim.js +19 -16
  83. package/lib/commonjs/page-header/EdgeScrim.js.map +1 -1
  84. package/lib/commonjs/page-header/PageHeader.js +10 -2
  85. package/lib/commonjs/page-header/PageHeader.js.map +1 -1
  86. package/lib/commonjs/project-board/ProjectBoardCanvas.js +2 -2
  87. package/lib/commonjs/project-board/ProjectBoardCanvas.js.map +1 -1
  88. package/lib/commonjs/property-insights/shared.js +1 -14
  89. package/lib/commonjs/property-insights/shared.js.map +1 -1
  90. package/lib/commonjs/radio/RadioHost.js +2 -2
  91. package/lib/commonjs/radio/RadioHost.js.map +1 -1
  92. package/lib/commonjs/select/Select.js +2 -2
  93. package/lib/commonjs/select/Select.js.map +1 -1
  94. package/lib/commonjs/select/Select.web.js +2 -2
  95. package/lib/commonjs/select/Select.web.js.map +1 -1
  96. package/lib/commonjs/select/shared.js +2 -2
  97. package/lib/commonjs/select/shared.js.map +1 -1
  98. package/lib/commonjs/shapes/Image.js +11 -3
  99. package/lib/commonjs/shapes/Image.js.map +1 -1
  100. package/lib/commonjs/sidebar/SidebarItem.js +2 -2
  101. package/lib/commonjs/sidebar/SidebarItem.js.map +1 -1
  102. package/lib/commonjs/sidebar/SidebarOnboardingCard.js +2 -2
  103. package/lib/commonjs/sidebar/SidebarOnboardingCard.js.map +1 -1
  104. package/lib/commonjs/sidebar/parts.js +0 -50
  105. package/lib/commonjs/sidebar/parts.js.map +1 -1
  106. package/lib/commonjs/stay-filters/EnergyRatingFilter.js +0 -6
  107. package/lib/commonjs/stay-filters/EnergyRatingFilter.js.map +1 -1
  108. package/lib/commonjs/styles/aria-hosts.js +20 -0
  109. package/lib/commonjs/styles/aria-hosts.js.map +1 -0
  110. package/lib/commonjs/surface/Surface.js +8 -2
  111. package/lib/commonjs/surface/Surface.js.map +1 -1
  112. package/lib/commonjs/surface/Surface.web.js +1 -2
  113. package/lib/commonjs/surface/Surface.web.js.map +1 -1
  114. package/lib/commonjs/surface/SurfacePaint.js +1 -2
  115. package/lib/commonjs/surface/SurfacePaint.js.map +1 -1
  116. package/lib/commonjs/toast/animations.js +1 -2
  117. package/lib/commonjs/toast/animations.js.map +1 -1
  118. package/lib/commonjs/typography/TypographyScope.js +0 -6
  119. package/lib/commonjs/typography/TypographyScope.js.map +1 -1
  120. package/lib/commonjs/zoomable-media-gallery/ZoomableMediaGalleryBase.js +255 -258
  121. package/lib/commonjs/zoomable-media-gallery/ZoomableMediaGalleryBase.js.map +1 -1
  122. package/lib/module/agent-chat/shared.js +0 -2
  123. package/lib/module/agent-chat/shared.js.map +1 -1
  124. package/lib/module/agent-progress/AgentProgressPlan.js +1 -2
  125. package/lib/module/agent-progress/AgentProgressPlan.js.map +1 -1
  126. package/lib/module/ai-chat/AiChatGalleryPanelBase.js +1 -1
  127. package/lib/module/ai-chat/AiChatGalleryPanelBase.js.map +1 -1
  128. package/lib/module/ai-chat/AiChatImageGenerationBase.js +1 -1
  129. package/lib/module/ai-chat/AiChatImageGenerationBase.js.map +1 -1
  130. package/lib/module/app-shell/use-shell-viewport.js +1 -11
  131. package/lib/module/app-shell/use-shell-viewport.js.map +1 -1
  132. package/lib/module/avatar/Avatar.js +37 -18
  133. package/lib/module/avatar/Avatar.js.map +1 -1
  134. package/lib/module/avatar/LiveBadge.js +6 -1
  135. package/lib/module/avatar/LiveBadge.js.map +1 -1
  136. package/lib/module/avatar-flight/create-avatar-flight-layer.js +6 -6
  137. package/lib/module/avatar-flight/create-avatar-flight-layer.js.map +1 -1
  138. package/lib/module/button/shared.js +0 -6
  139. package/lib/module/button/shared.js.map +1 -1
  140. package/lib/module/canvas/CanvasPanelBase.js +2 -2
  141. package/lib/module/canvas/CanvasPanelBase.js.map +1 -1
  142. package/lib/module/card/SelectionCard.js +1 -1
  143. package/lib/module/card/SelectionCard.js.map +1 -1
  144. package/lib/module/chat-composer/shared.js +1 -1
  145. package/lib/module/chat-composer/shared.js.map +1 -1
  146. package/lib/module/chat-list/shared.js +0 -7
  147. package/lib/module/chat-list/shared.js.map +1 -1
  148. package/lib/module/chip/Chip.js +2 -2
  149. package/lib/module/chip/Chip.js.map +1 -1
  150. package/lib/module/composer-panel/ModelPickerBase.js +2 -1
  151. package/lib/module/composer-panel/ModelPickerBase.js.map +1 -1
  152. package/lib/module/composer-panel/shared.js +0 -1
  153. package/lib/module/composer-panel/shared.js.map +1 -1
  154. package/lib/module/content-panel/ContentPanel.web.js +12 -35
  155. package/lib/module/content-panel/ContentPanel.web.js.map +1 -1
  156. package/lib/module/cover-header/CoverHeader.js +1 -2
  157. package/lib/module/cover-header/CoverHeader.js.map +1 -1
  158. package/lib/module/dialog/DetailDialogMotion.js +2 -3
  159. package/lib/module/dialog/DetailDialogMotion.js.map +1 -1
  160. package/lib/module/floating/FloatingPanel.js +3 -3
  161. package/lib/module/floating/FloatingPanel.js.map +1 -1
  162. package/lib/module/floating/TriggerSlot.js +2 -2
  163. package/lib/module/floating/TriggerSlot.js.map +1 -1
  164. package/lib/module/floating/constants.js +1 -1
  165. package/lib/module/floating/menu-swatch-row.js +2 -2
  166. package/lib/module/floating/menu-swatch-row.js.map +1 -1
  167. package/lib/module/floating/shared.js +2 -2
  168. package/lib/module/floating/shared.js.map +1 -1
  169. package/lib/module/image/BloomImage.js +4 -0
  170. package/lib/module/image/BloomImage.js.map +1 -1
  171. package/lib/module/image/expo-image-module.js.map +1 -1
  172. package/lib/module/link-preview/LinkPreviewCard.js +21 -5
  173. package/lib/module/link-preview/LinkPreviewCard.js.map +1 -1
  174. package/lib/module/lyrics/shared.js +1 -2
  175. package/lib/module/lyrics/shared.js.map +1 -1
  176. package/lib/module/mail-list/shared.js +0 -9
  177. package/lib/module/mail-list/shared.js.map +1 -1
  178. package/lib/module/media-card/shared.js +1 -2
  179. package/lib/module/media-card/shared.js.map +1 -1
  180. package/lib/module/media-flight/MediaSurface.js +34 -12
  181. package/lib/module/media-flight/MediaSurface.js.map +1 -1
  182. package/lib/module/media-header/shared.js +1 -2
  183. package/lib/module/media-header/shared.js.map +1 -1
  184. package/lib/module/media-player/shared.js +1 -2
  185. package/lib/module/media-player/shared.js.map +1 -1
  186. package/lib/module/multi-agent-chat/Marketplace.js +3 -3
  187. package/lib/module/multi-agent-chat/Marketplace.js.map +1 -1
  188. package/lib/module/music-library/shared.js +0 -1
  189. package/lib/module/music-library/shared.js.map +1 -1
  190. package/lib/module/page-header/EdgeScrim.js +19 -16
  191. package/lib/module/page-header/EdgeScrim.js.map +1 -1
  192. package/lib/module/page-header/PageHeader.js +11 -3
  193. package/lib/module/page-header/PageHeader.js.map +1 -1
  194. package/lib/module/project-board/ProjectBoardCanvas.js +2 -2
  195. package/lib/module/project-board/ProjectBoardCanvas.js.map +1 -1
  196. package/lib/module/property-insights/shared.js +1 -2
  197. package/lib/module/property-insights/shared.js.map +1 -1
  198. package/lib/module/radio/RadioHost.js +2 -2
  199. package/lib/module/radio/RadioHost.js.map +1 -1
  200. package/lib/module/select/Select.js +2 -2
  201. package/lib/module/select/Select.js.map +1 -1
  202. package/lib/module/select/Select.web.js +2 -2
  203. package/lib/module/select/Select.web.js.map +1 -1
  204. package/lib/module/select/shared.js +2 -2
  205. package/lib/module/select/shared.js.map +1 -1
  206. package/lib/module/shapes/Image.js +11 -3
  207. package/lib/module/shapes/Image.js.map +1 -1
  208. package/lib/module/sidebar/SidebarItem.js +2 -2
  209. package/lib/module/sidebar/SidebarItem.js.map +1 -1
  210. package/lib/module/sidebar/SidebarOnboardingCard.js +2 -2
  211. package/lib/module/sidebar/SidebarOnboardingCard.js.map +1 -1
  212. package/lib/module/sidebar/parts.js +3 -52
  213. package/lib/module/sidebar/parts.js.map +1 -1
  214. package/lib/module/stay-filters/EnergyRatingFilter.js +0 -1
  215. package/lib/module/stay-filters/EnergyRatingFilter.js.map +1 -1
  216. package/lib/module/styles/aria-hosts.js +16 -0
  217. package/lib/module/styles/aria-hosts.js.map +1 -0
  218. package/lib/module/surface/Surface.js +11 -5
  219. package/lib/module/surface/Surface.js.map +1 -1
  220. package/lib/module/surface/Surface.web.js +2 -3
  221. package/lib/module/surface/Surface.web.js.map +1 -1
  222. package/lib/module/surface/SurfacePaint.js +1 -2
  223. package/lib/module/surface/SurfacePaint.js.map +1 -1
  224. package/lib/module/toast/animations.js +0 -1
  225. package/lib/module/toast/animations.js.map +1 -1
  226. package/lib/module/typography/TypographyScope.js +0 -5
  227. package/lib/module/typography/TypographyScope.js.map +1 -1
  228. package/lib/module/zoomable-media-gallery/ZoomableMediaGalleryBase.js +256 -259
  229. package/lib/module/zoomable-media-gallery/ZoomableMediaGalleryBase.js.map +1 -1
  230. package/lib/typescript/commonjs/agent-chat/shared.d.ts +0 -2
  231. package/lib/typescript/commonjs/agent-chat/shared.d.ts.map +1 -1
  232. package/lib/typescript/commonjs/agent-progress/AgentProgressPlan.d.ts.map +1 -1
  233. package/lib/typescript/commonjs/app-shell/use-shell-viewport.d.ts +0 -1
  234. package/lib/typescript/commonjs/app-shell/use-shell-viewport.d.ts.map +1 -1
  235. package/lib/typescript/commonjs/avatar/Avatar.d.ts.map +1 -1
  236. package/lib/typescript/commonjs/avatar/LiveBadge.d.ts +6 -2
  237. package/lib/typescript/commonjs/avatar/LiveBadge.d.ts.map +1 -1
  238. package/lib/typescript/commonjs/button/shared.d.ts +0 -2
  239. package/lib/typescript/commonjs/button/shared.d.ts.map +1 -1
  240. package/lib/typescript/commonjs/button/types.d.ts +1 -1
  241. package/lib/typescript/commonjs/button/types.d.ts.map +1 -1
  242. package/lib/typescript/commonjs/chat-composer/shared.d.ts +0 -1
  243. package/lib/typescript/commonjs/chat-composer/shared.d.ts.map +1 -1
  244. package/lib/typescript/commonjs/chat-list/shared.d.ts +0 -9
  245. package/lib/typescript/commonjs/chat-list/shared.d.ts.map +1 -1
  246. package/lib/typescript/commonjs/composer-panel/shared.d.ts +0 -1
  247. package/lib/typescript/commonjs/composer-panel/shared.d.ts.map +1 -1
  248. package/lib/typescript/commonjs/content-panel/ContentPanel.web.d.ts +9 -11
  249. package/lib/typescript/commonjs/content-panel/ContentPanel.web.d.ts.map +1 -1
  250. package/lib/typescript/commonjs/cover-header/CoverHeader.d.ts.map +1 -1
  251. package/lib/typescript/commonjs/dialog/DetailDialogMotion.d.ts.map +1 -1
  252. package/lib/typescript/commonjs/floating/constants.d.ts +1 -1
  253. package/lib/typescript/commonjs/floating/shared.d.ts +1 -1
  254. package/lib/typescript/commonjs/floating/shared.d.ts.map +1 -1
  255. package/lib/typescript/commonjs/floating/types.d.ts +2 -2
  256. package/lib/typescript/commonjs/floating/types.d.ts.map +1 -1
  257. package/lib/typescript/commonjs/image/BloomImage.d.ts +1 -1
  258. package/lib/typescript/commonjs/image/BloomImage.d.ts.map +1 -1
  259. package/lib/typescript/commonjs/image/expo-image-module.d.ts +3 -1
  260. package/lib/typescript/commonjs/image/expo-image-module.d.ts.map +1 -1
  261. package/lib/typescript/commonjs/image/index.d.ts +1 -1
  262. package/lib/typescript/commonjs/image/index.d.ts.map +1 -1
  263. package/lib/typescript/commonjs/image/types.d.ts +18 -0
  264. package/lib/typescript/commonjs/image/types.d.ts.map +1 -1
  265. package/lib/typescript/commonjs/link-preview/LinkPreviewCard.d.ts.map +1 -1
  266. package/lib/typescript/commonjs/link-preview/types.d.ts +7 -0
  267. package/lib/typescript/commonjs/link-preview/types.d.ts.map +1 -1
  268. package/lib/typescript/commonjs/lyrics/shared.d.ts +0 -2
  269. package/lib/typescript/commonjs/lyrics/shared.d.ts.map +1 -1
  270. package/lib/typescript/commonjs/mail-list/shared.d.ts +0 -9
  271. package/lib/typescript/commonjs/mail-list/shared.d.ts.map +1 -1
  272. package/lib/typescript/commonjs/media-card/shared.d.ts +0 -2
  273. package/lib/typescript/commonjs/media-card/shared.d.ts.map +1 -1
  274. package/lib/typescript/commonjs/media-flight/MediaSurface.d.ts +10 -1
  275. package/lib/typescript/commonjs/media-flight/MediaSurface.d.ts.map +1 -1
  276. package/lib/typescript/commonjs/media-header/shared.d.ts +0 -2
  277. package/lib/typescript/commonjs/media-header/shared.d.ts.map +1 -1
  278. package/lib/typescript/commonjs/media-header/types.d.ts +1 -1
  279. package/lib/typescript/commonjs/media-header/types.d.ts.map +1 -1
  280. package/lib/typescript/commonjs/media-player/PlayerIconButton.d.ts +1 -1
  281. package/lib/typescript/commonjs/media-player/PlayerIconButton.d.ts.map +1 -1
  282. package/lib/typescript/commonjs/media-player/shared.d.ts +0 -2
  283. package/lib/typescript/commonjs/media-player/shared.d.ts.map +1 -1
  284. package/lib/typescript/commonjs/music-library/shared.d.ts +0 -2
  285. package/lib/typescript/commonjs/music-library/shared.d.ts.map +1 -1
  286. package/lib/typescript/commonjs/page-header/EdgeScrim.d.ts +19 -16
  287. package/lib/typescript/commonjs/page-header/EdgeScrim.d.ts.map +1 -1
  288. package/lib/typescript/commonjs/page-header/PageHeader.d.ts.map +1 -1
  289. package/lib/typescript/commonjs/property-insights/shared.d.ts +0 -2
  290. package/lib/typescript/commonjs/property-insights/shared.d.ts.map +1 -1
  291. package/lib/typescript/commonjs/queue-panel/QueueIconButton.d.ts +1 -1
  292. package/lib/typescript/commonjs/queue-panel/QueueIconButton.d.ts.map +1 -1
  293. package/lib/typescript/commonjs/shapes/Image.d.ts +1 -1
  294. package/lib/typescript/commonjs/shapes/Image.d.ts.map +1 -1
  295. package/lib/typescript/commonjs/shapes/types.d.ts +10 -0
  296. package/lib/typescript/commonjs/shapes/types.d.ts.map +1 -1
  297. package/lib/typescript/commonjs/sidebar/parts.d.ts +0 -6
  298. package/lib/typescript/commonjs/sidebar/parts.d.ts.map +1 -1
  299. package/lib/typescript/commonjs/stay-filters/EnergyRatingFilter.d.ts +1 -2
  300. package/lib/typescript/commonjs/stay-filters/EnergyRatingFilter.d.ts.map +1 -1
  301. package/lib/typescript/commonjs/styles/aria-hosts.d.ts +49 -0
  302. package/lib/typescript/commonjs/styles/aria-hosts.d.ts.map +1 -0
  303. package/lib/typescript/commonjs/surface/Surface.d.ts.map +1 -1
  304. package/lib/typescript/commonjs/surface/Surface.web.d.ts.map +1 -1
  305. package/lib/typescript/commonjs/surface/SurfacePaint.d.ts.map +1 -1
  306. package/lib/typescript/commonjs/toast/animations.d.ts +0 -1
  307. package/lib/typescript/commonjs/toast/animations.d.ts.map +1 -1
  308. package/lib/typescript/commonjs/track-list/parts.d.ts +1 -1
  309. package/lib/typescript/commonjs/track-list/parts.d.ts.map +1 -1
  310. package/lib/typescript/commonjs/typography/TypographyScope.d.ts +0 -4
  311. package/lib/typescript/commonjs/typography/TypographyScope.d.ts.map +1 -1
  312. package/lib/typescript/commonjs/zoomable-media-gallery/ZoomableMediaGalleryBase.d.ts.map +1 -1
  313. package/lib/typescript/commonjs/zoomable-media-gallery/types.d.ts +11 -0
  314. package/lib/typescript/commonjs/zoomable-media-gallery/types.d.ts.map +1 -1
  315. package/lib/typescript/module/agent-chat/shared.d.ts +0 -2
  316. package/lib/typescript/module/agent-chat/shared.d.ts.map +1 -1
  317. package/lib/typescript/module/agent-progress/AgentProgressPlan.d.ts.map +1 -1
  318. package/lib/typescript/module/app-shell/use-shell-viewport.d.ts +0 -1
  319. package/lib/typescript/module/app-shell/use-shell-viewport.d.ts.map +1 -1
  320. package/lib/typescript/module/avatar/Avatar.d.ts.map +1 -1
  321. package/lib/typescript/module/avatar/LiveBadge.d.ts +6 -2
  322. package/lib/typescript/module/avatar/LiveBadge.d.ts.map +1 -1
  323. package/lib/typescript/module/button/shared.d.ts +0 -2
  324. package/lib/typescript/module/button/shared.d.ts.map +1 -1
  325. package/lib/typescript/module/button/types.d.ts +1 -1
  326. package/lib/typescript/module/button/types.d.ts.map +1 -1
  327. package/lib/typescript/module/chat-composer/shared.d.ts +0 -1
  328. package/lib/typescript/module/chat-composer/shared.d.ts.map +1 -1
  329. package/lib/typescript/module/chat-list/shared.d.ts +0 -9
  330. package/lib/typescript/module/chat-list/shared.d.ts.map +1 -1
  331. package/lib/typescript/module/composer-panel/shared.d.ts +0 -1
  332. package/lib/typescript/module/composer-panel/shared.d.ts.map +1 -1
  333. package/lib/typescript/module/content-panel/ContentPanel.web.d.ts +9 -11
  334. package/lib/typescript/module/content-panel/ContentPanel.web.d.ts.map +1 -1
  335. package/lib/typescript/module/cover-header/CoverHeader.d.ts.map +1 -1
  336. package/lib/typescript/module/dialog/DetailDialogMotion.d.ts.map +1 -1
  337. package/lib/typescript/module/floating/constants.d.ts +1 -1
  338. package/lib/typescript/module/floating/shared.d.ts +1 -1
  339. package/lib/typescript/module/floating/shared.d.ts.map +1 -1
  340. package/lib/typescript/module/floating/types.d.ts +2 -2
  341. package/lib/typescript/module/floating/types.d.ts.map +1 -1
  342. package/lib/typescript/module/image/BloomImage.d.ts +1 -1
  343. package/lib/typescript/module/image/BloomImage.d.ts.map +1 -1
  344. package/lib/typescript/module/image/expo-image-module.d.ts +3 -1
  345. package/lib/typescript/module/image/expo-image-module.d.ts.map +1 -1
  346. package/lib/typescript/module/image/index.d.ts +1 -1
  347. package/lib/typescript/module/image/index.d.ts.map +1 -1
  348. package/lib/typescript/module/image/types.d.ts +18 -0
  349. package/lib/typescript/module/image/types.d.ts.map +1 -1
  350. package/lib/typescript/module/link-preview/LinkPreviewCard.d.ts.map +1 -1
  351. package/lib/typescript/module/link-preview/types.d.ts +7 -0
  352. package/lib/typescript/module/link-preview/types.d.ts.map +1 -1
  353. package/lib/typescript/module/lyrics/shared.d.ts +0 -2
  354. package/lib/typescript/module/lyrics/shared.d.ts.map +1 -1
  355. package/lib/typescript/module/mail-list/shared.d.ts +0 -9
  356. package/lib/typescript/module/mail-list/shared.d.ts.map +1 -1
  357. package/lib/typescript/module/media-card/shared.d.ts +0 -2
  358. package/lib/typescript/module/media-card/shared.d.ts.map +1 -1
  359. package/lib/typescript/module/media-flight/MediaSurface.d.ts +10 -1
  360. package/lib/typescript/module/media-flight/MediaSurface.d.ts.map +1 -1
  361. package/lib/typescript/module/media-header/shared.d.ts +0 -2
  362. package/lib/typescript/module/media-header/shared.d.ts.map +1 -1
  363. package/lib/typescript/module/media-header/types.d.ts +1 -1
  364. package/lib/typescript/module/media-header/types.d.ts.map +1 -1
  365. package/lib/typescript/module/media-player/PlayerIconButton.d.ts +1 -1
  366. package/lib/typescript/module/media-player/PlayerIconButton.d.ts.map +1 -1
  367. package/lib/typescript/module/media-player/shared.d.ts +0 -2
  368. package/lib/typescript/module/media-player/shared.d.ts.map +1 -1
  369. package/lib/typescript/module/music-library/shared.d.ts +0 -2
  370. package/lib/typescript/module/music-library/shared.d.ts.map +1 -1
  371. package/lib/typescript/module/page-header/EdgeScrim.d.ts +19 -16
  372. package/lib/typescript/module/page-header/EdgeScrim.d.ts.map +1 -1
  373. package/lib/typescript/module/page-header/PageHeader.d.ts.map +1 -1
  374. package/lib/typescript/module/property-insights/shared.d.ts +0 -2
  375. package/lib/typescript/module/property-insights/shared.d.ts.map +1 -1
  376. package/lib/typescript/module/queue-panel/QueueIconButton.d.ts +1 -1
  377. package/lib/typescript/module/queue-panel/QueueIconButton.d.ts.map +1 -1
  378. package/lib/typescript/module/shapes/Image.d.ts +1 -1
  379. package/lib/typescript/module/shapes/Image.d.ts.map +1 -1
  380. package/lib/typescript/module/shapes/types.d.ts +10 -0
  381. package/lib/typescript/module/shapes/types.d.ts.map +1 -1
  382. package/lib/typescript/module/sidebar/parts.d.ts +0 -6
  383. package/lib/typescript/module/sidebar/parts.d.ts.map +1 -1
  384. package/lib/typescript/module/stay-filters/EnergyRatingFilter.d.ts +1 -2
  385. package/lib/typescript/module/stay-filters/EnergyRatingFilter.d.ts.map +1 -1
  386. package/lib/typescript/module/styles/aria-hosts.d.ts +49 -0
  387. package/lib/typescript/module/styles/aria-hosts.d.ts.map +1 -0
  388. package/lib/typescript/module/surface/Surface.d.ts.map +1 -1
  389. package/lib/typescript/module/surface/Surface.web.d.ts.map +1 -1
  390. package/lib/typescript/module/surface/SurfacePaint.d.ts.map +1 -1
  391. package/lib/typescript/module/toast/animations.d.ts +0 -1
  392. package/lib/typescript/module/toast/animations.d.ts.map +1 -1
  393. package/lib/typescript/module/track-list/parts.d.ts +1 -1
  394. package/lib/typescript/module/track-list/parts.d.ts.map +1 -1
  395. package/lib/typescript/module/typography/TypographyScope.d.ts +0 -4
  396. package/lib/typescript/module/typography/TypographyScope.d.ts.map +1 -1
  397. package/lib/typescript/module/zoomable-media-gallery/ZoomableMediaGalleryBase.d.ts.map +1 -1
  398. package/lib/typescript/module/zoomable-media-gallery/types.d.ts +11 -0
  399. package/lib/typescript/module/zoomable-media-gallery/types.d.ts.map +1 -1
  400. package/package.json +1 -18
  401. package/src/__tests__/support/held-animations.ts +33 -0
  402. package/src/__tests__/support/public-part-classifications.json +0 -3
  403. package/src/agent-chat/shared.ts +0 -2
  404. package/src/agent-progress/AgentProgressPlan.tsx +2 -3
  405. package/src/ai-chat/AiChatGalleryPanelBase.tsx +1 -1
  406. package/src/ai-chat/AiChatImageGenerationBase.tsx +1 -1
  407. package/src/app-shell/use-shell-viewport.ts +1 -7
  408. package/src/avatar/Avatar.tsx +44 -16
  409. package/src/avatar/LiveBadge.tsx +10 -3
  410. package/src/avatar-flight/create-avatar-flight-layer.tsx +8 -8
  411. package/src/button/shared.ts +0 -6
  412. package/src/button/types.ts +1 -1
  413. package/src/canvas/CanvasPanelBase.tsx +3 -3
  414. package/src/card/SelectionCard.tsx +1 -1
  415. package/src/chat-composer/shared.ts +0 -1
  416. package/src/chat-list/shared.ts +0 -7
  417. package/src/chip/Chip.tsx +3 -3
  418. package/src/composer-panel/ModelPickerBase.tsx +1 -1
  419. package/src/composer-panel/shared.ts +0 -1
  420. package/src/content-panel/ContentPanel.web.tsx +12 -35
  421. package/src/cover-header/CoverHeader.tsx +2 -3
  422. package/src/dialog/DetailDialogMotion.tsx +2 -3
  423. package/src/floating/FloatingPanel.tsx +3 -3
  424. package/src/floating/TriggerSlot.tsx +2 -2
  425. package/src/floating/constants.ts +1 -1
  426. package/src/floating/menu-swatch-row.tsx +3 -3
  427. package/src/floating/shared.tsx +3 -3
  428. package/src/floating/types.ts +2 -2
  429. package/src/image/BloomImage.tsx +4 -0
  430. package/src/image/expo-image-module.ts +3 -1
  431. package/src/image/index.ts +1 -0
  432. package/src/image/types.ts +19 -0
  433. package/src/link-preview/LinkPreviewCard.tsx +27 -5
  434. package/src/link-preview/types.ts +7 -0
  435. package/src/lyrics/shared.ts +0 -3
  436. package/src/mail-list/shared.ts +0 -9
  437. package/src/media-card/shared.ts +1 -9
  438. package/src/media-flight/MediaSurface.tsx +46 -8
  439. package/src/media-header/shared.ts +1 -8
  440. package/src/media-header/types.ts +1 -1
  441. package/src/media-player/PlayerIconButton.tsx +1 -1
  442. package/src/media-player/shared.ts +1 -8
  443. package/src/multi-agent-chat/Marketplace.tsx +5 -5
  444. package/src/music-library/shared.ts +0 -2
  445. package/src/page-header/EdgeScrim.tsx +17 -14
  446. package/src/page-header/PageHeader.tsx +11 -6
  447. package/src/project-board/ProjectBoardCanvas.tsx +3 -3
  448. package/src/property-insights/shared.ts +1 -3
  449. package/src/queue-panel/QueueIconButton.tsx +1 -1
  450. package/src/radio/RadioHost.tsx +2 -2
  451. package/src/select/Select.tsx +3 -3
  452. package/src/select/Select.web.tsx +3 -3
  453. package/src/select/shared.tsx +3 -3
  454. package/src/shapes/Image.tsx +18 -2
  455. package/src/shapes/types.ts +10 -0
  456. package/src/sidebar/SidebarItem.tsx +2 -2
  457. package/src/sidebar/SidebarOnboardingCard.tsx +3 -3
  458. package/src/sidebar/parts.tsx +3 -36
  459. package/src/stay-filters/EnergyRatingFilter.tsx +0 -2
  460. package/src/styles/aria-hosts.ts +62 -0
  461. package/src/surface/Surface.tsx +12 -6
  462. package/src/surface/Surface.web.tsx +3 -4
  463. package/src/surface/SurfacePaint.tsx +1 -2
  464. package/src/toast/animations.ts +0 -1
  465. package/src/track-list/parts.tsx +1 -1
  466. package/src/typography/TypographyScope.tsx +0 -5
  467. package/src/zoomable-media-gallery/ZoomableMediaGalleryBase.tsx +368 -324
  468. package/src/zoomable-media-gallery/types.ts +11 -0
  469. package/docs/teleport.mdx +0 -72
  470. package/lib/commonjs/styles/styled-primitives.js +0 -37
  471. package/lib/commonjs/styles/styled-primitives.js.map +0 -1
  472. package/lib/commonjs/teleport/Portal.js +0 -109
  473. package/lib/commonjs/teleport/Portal.js.map +0 -1
  474. package/lib/commonjs/teleport/PortalHost.js +0 -75
  475. package/lib/commonjs/teleport/PortalHost.js.map +0 -1
  476. package/lib/commonjs/teleport/PortalHostView.js +0 -40
  477. package/lib/commonjs/teleport/PortalHostView.js.map +0 -1
  478. package/lib/commonjs/teleport/PortalHostView.native.js +0 -24
  479. package/lib/commonjs/teleport/PortalHostView.native.js.map +0 -1
  480. package/lib/commonjs/teleport/PortalProvider.js +0 -57
  481. package/lib/commonjs/teleport/PortalProvider.js.map +0 -1
  482. package/lib/commonjs/teleport/PortalProviderView.js +0 -59
  483. package/lib/commonjs/teleport/PortalProviderView.js.map +0 -1
  484. package/lib/commonjs/teleport/PortalProviderView.native.js +0 -19
  485. package/lib/commonjs/teleport/PortalProviderView.native.js.map +0 -1
  486. package/lib/commonjs/teleport/PortalView.js +0 -83
  487. package/lib/commonjs/teleport/PortalView.js.map +0 -1
  488. package/lib/commonjs/teleport/PortalView.native.js +0 -14
  489. package/lib/commonjs/teleport/PortalView.native.js.map +0 -1
  490. package/lib/commonjs/teleport/index.js +0 -35
  491. package/lib/commonjs/teleport/index.js.map +0 -1
  492. package/lib/commonjs/teleport/portal-manager.js +0 -40
  493. package/lib/commonjs/teleport/portal-manager.js.map +0 -1
  494. package/lib/commonjs/teleport/portal-registry.js +0 -24
  495. package/lib/commonjs/teleport/portal-registry.js.map +0 -1
  496. package/lib/commonjs/teleport/reducer.js +0 -86
  497. package/lib/commonjs/teleport/reducer.js.map +0 -1
  498. package/lib/commonjs/teleport/scroll-view-context/context.js +0 -17
  499. package/lib/commonjs/teleport/scroll-view-context/context.js.map +0 -1
  500. package/lib/commonjs/teleport/scroll-view-context/context.native.js +0 -22
  501. package/lib/commonjs/teleport/scroll-view-context/context.native.js.map +0 -1
  502. package/lib/commonjs/teleport/scroll-view-context/types.js +0 -2
  503. package/lib/commonjs/teleport/scroll-view-context/types.js.map +0 -1
  504. package/lib/commonjs/teleport/specs/PortalHostViewNativeComponent.js +0 -17
  505. package/lib/commonjs/teleport/specs/PortalHostViewNativeComponent.js.map +0 -1
  506. package/lib/commonjs/teleport/specs/PortalViewNativeComponent.js +0 -17
  507. package/lib/commonjs/teleport/specs/PortalViewNativeComponent.js.map +0 -1
  508. package/lib/commonjs/teleport/teleport-global.d.ts +0 -11
  509. package/lib/commonjs/teleport/types.js +0 -6
  510. package/lib/commonjs/teleport/types.js.map +0 -1
  511. package/lib/commonjs/teleport/use-id.js +0 -24
  512. package/lib/commonjs/teleport/use-id.js.map +0 -1
  513. package/lib/commonjs/teleport/use-portal.js +0 -59
  514. package/lib/commonjs/teleport/use-portal.js.map +0 -1
  515. package/lib/module/styles/styled-primitives.js +0 -34
  516. package/lib/module/styles/styled-primitives.js.map +0 -1
  517. package/lib/module/teleport/Portal.js +0 -103
  518. package/lib/module/teleport/Portal.js.map +0 -1
  519. package/lib/module/teleport/PortalHost.js +0 -71
  520. package/lib/module/teleport/PortalHost.js.map +0 -1
  521. package/lib/module/teleport/PortalHostView.js +0 -35
  522. package/lib/module/teleport/PortalHostView.js.map +0 -1
  523. package/lib/module/teleport/PortalHostView.native.js +0 -18
  524. package/lib/module/teleport/PortalHostView.native.js.map +0 -1
  525. package/lib/module/teleport/PortalProvider.js +0 -51
  526. package/lib/module/teleport/PortalProvider.js.map +0 -1
  527. package/lib/module/teleport/PortalProviderView.js +0 -54
  528. package/lib/module/teleport/PortalProviderView.js.map +0 -1
  529. package/lib/module/teleport/PortalProviderView.native.js +0 -15
  530. package/lib/module/teleport/PortalProviderView.native.js.map +0 -1
  531. package/lib/module/teleport/PortalView.js +0 -79
  532. package/lib/module/teleport/PortalView.js.map +0 -1
  533. package/lib/module/teleport/PortalView.native.js +0 -10
  534. package/lib/module/teleport/PortalView.native.js.map +0 -1
  535. package/lib/module/teleport/index.js +0 -30
  536. package/lib/module/teleport/index.js.map +0 -1
  537. package/lib/module/teleport/portal-manager.js +0 -33
  538. package/lib/module/teleport/portal-manager.js.map +0 -1
  539. package/lib/module/teleport/portal-registry.js +0 -18
  540. package/lib/module/teleport/portal-registry.js.map +0 -1
  541. package/lib/module/teleport/reducer.js +0 -81
  542. package/lib/module/teleport/reducer.js.map +0 -1
  543. package/lib/module/teleport/scroll-view-context/context.js +0 -12
  544. package/lib/module/teleport/scroll-view-context/context.js.map +0 -1
  545. package/lib/module/teleport/scroll-view-context/context.native.js +0 -18
  546. package/lib/module/teleport/scroll-view-context/context.native.js.map +0 -1
  547. package/lib/module/teleport/scroll-view-context/types.js +0 -2
  548. package/lib/module/teleport/scroll-view-context/types.js.map +0 -1
  549. package/lib/module/teleport/specs/PortalHostViewNativeComponent.js +0 -13
  550. package/lib/module/teleport/specs/PortalHostViewNativeComponent.js.map +0 -1
  551. package/lib/module/teleport/specs/PortalViewNativeComponent.js +0 -13
  552. package/lib/module/teleport/specs/PortalViewNativeComponent.js.map +0 -1
  553. package/lib/module/teleport/teleport-global.d.ts +0 -11
  554. package/lib/module/teleport/types.js +0 -4
  555. package/lib/module/teleport/types.js.map +0 -1
  556. package/lib/module/teleport/use-id.js +0 -19
  557. package/lib/module/teleport/use-id.js.map +0 -1
  558. package/lib/module/teleport/use-portal.js +0 -55
  559. package/lib/module/teleport/use-portal.js.map +0 -1
  560. package/lib/typescript/commonjs/styles/styled-primitives.d.ts +0 -69
  561. package/lib/typescript/commonjs/styles/styled-primitives.d.ts.map +0 -1
  562. package/lib/typescript/commonjs/teleport/Portal.d.ts +0 -48
  563. package/lib/typescript/commonjs/teleport/Portal.d.ts.map +0 -1
  564. package/lib/typescript/commonjs/teleport/PortalHost.d.ts +0 -25
  565. package/lib/typescript/commonjs/teleport/PortalHost.d.ts.map +0 -1
  566. package/lib/typescript/commonjs/teleport/PortalHostView.d.ts +0 -5
  567. package/lib/typescript/commonjs/teleport/PortalHostView.d.ts.map +0 -1
  568. package/lib/typescript/commonjs/teleport/PortalHostView.native.d.ts +0 -4
  569. package/lib/typescript/commonjs/teleport/PortalHostView.native.d.ts.map +0 -1
  570. package/lib/typescript/commonjs/teleport/PortalProvider.d.ts +0 -23
  571. package/lib/typescript/commonjs/teleport/PortalProvider.d.ts.map +0 -1
  572. package/lib/typescript/commonjs/teleport/PortalProviderView.d.ts +0 -3
  573. package/lib/typescript/commonjs/teleport/PortalProviderView.d.ts.map +0 -1
  574. package/lib/typescript/commonjs/teleport/PortalProviderView.native.d.ts +0 -9
  575. package/lib/typescript/commonjs/teleport/PortalProviderView.native.d.ts.map +0 -1
  576. package/lib/typescript/commonjs/teleport/PortalView.d.ts +0 -9
  577. package/lib/typescript/commonjs/teleport/PortalView.d.ts.map +0 -1
  578. package/lib/typescript/commonjs/teleport/PortalView.native.d.ts +0 -8
  579. package/lib/typescript/commonjs/teleport/PortalView.native.d.ts.map +0 -1
  580. package/lib/typescript/commonjs/teleport/index.d.ts +0 -29
  581. package/lib/typescript/commonjs/teleport/index.d.ts.map +0 -1
  582. package/lib/typescript/commonjs/teleport/portal-manager.d.ts +0 -16
  583. package/lib/typescript/commonjs/teleport/portal-manager.d.ts.map +0 -1
  584. package/lib/typescript/commonjs/teleport/portal-registry.d.ts +0 -10
  585. package/lib/typescript/commonjs/teleport/portal-registry.d.ts.map +0 -1
  586. package/lib/typescript/commonjs/teleport/reducer.d.ts +0 -40
  587. package/lib/typescript/commonjs/teleport/reducer.d.ts.map +0 -1
  588. package/lib/typescript/commonjs/teleport/scroll-view-context/context.d.ts +0 -4
  589. package/lib/typescript/commonjs/teleport/scroll-view-context/context.d.ts.map +0 -1
  590. package/lib/typescript/commonjs/teleport/scroll-view-context/context.native.d.ts +0 -13
  591. package/lib/typescript/commonjs/teleport/scroll-view-context/context.native.d.ts.map +0 -1
  592. package/lib/typescript/commonjs/teleport/scroll-view-context/types.d.ts +0 -10
  593. package/lib/typescript/commonjs/teleport/scroll-view-context/types.d.ts.map +0 -1
  594. package/lib/typescript/commonjs/teleport/specs/PortalHostViewNativeComponent.d.ts +0 -13
  595. package/lib/typescript/commonjs/teleport/specs/PortalHostViewNativeComponent.d.ts.map +0 -1
  596. package/lib/typescript/commonjs/teleport/specs/PortalViewNativeComponent.d.ts +0 -14
  597. package/lib/typescript/commonjs/teleport/specs/PortalViewNativeComponent.d.ts.map +0 -1
  598. package/lib/typescript/commonjs/teleport/types.d.ts +0 -22
  599. package/lib/typescript/commonjs/teleport/types.d.ts.map +0 -1
  600. package/lib/typescript/commonjs/teleport/use-id.d.ts +0 -2
  601. package/lib/typescript/commonjs/teleport/use-id.d.ts.map +0 -1
  602. package/lib/typescript/commonjs/teleport/use-portal.d.ts +0 -35
  603. package/lib/typescript/commonjs/teleport/use-portal.d.ts.map +0 -1
  604. package/lib/typescript/module/styles/styled-primitives.d.ts +0 -69
  605. package/lib/typescript/module/styles/styled-primitives.d.ts.map +0 -1
  606. package/lib/typescript/module/teleport/Portal.d.ts +0 -48
  607. package/lib/typescript/module/teleport/Portal.d.ts.map +0 -1
  608. package/lib/typescript/module/teleport/PortalHost.d.ts +0 -25
  609. package/lib/typescript/module/teleport/PortalHost.d.ts.map +0 -1
  610. package/lib/typescript/module/teleport/PortalHostView.d.ts +0 -5
  611. package/lib/typescript/module/teleport/PortalHostView.d.ts.map +0 -1
  612. package/lib/typescript/module/teleport/PortalHostView.native.d.ts +0 -4
  613. package/lib/typescript/module/teleport/PortalHostView.native.d.ts.map +0 -1
  614. package/lib/typescript/module/teleport/PortalProvider.d.ts +0 -23
  615. package/lib/typescript/module/teleport/PortalProvider.d.ts.map +0 -1
  616. package/lib/typescript/module/teleport/PortalProviderView.d.ts +0 -3
  617. package/lib/typescript/module/teleport/PortalProviderView.d.ts.map +0 -1
  618. package/lib/typescript/module/teleport/PortalProviderView.native.d.ts +0 -9
  619. package/lib/typescript/module/teleport/PortalProviderView.native.d.ts.map +0 -1
  620. package/lib/typescript/module/teleport/PortalView.d.ts +0 -9
  621. package/lib/typescript/module/teleport/PortalView.d.ts.map +0 -1
  622. package/lib/typescript/module/teleport/PortalView.native.d.ts +0 -8
  623. package/lib/typescript/module/teleport/PortalView.native.d.ts.map +0 -1
  624. package/lib/typescript/module/teleport/index.d.ts +0 -29
  625. package/lib/typescript/module/teleport/index.d.ts.map +0 -1
  626. package/lib/typescript/module/teleport/portal-manager.d.ts +0 -16
  627. package/lib/typescript/module/teleport/portal-manager.d.ts.map +0 -1
  628. package/lib/typescript/module/teleport/portal-registry.d.ts +0 -10
  629. package/lib/typescript/module/teleport/portal-registry.d.ts.map +0 -1
  630. package/lib/typescript/module/teleport/reducer.d.ts +0 -40
  631. package/lib/typescript/module/teleport/reducer.d.ts.map +0 -1
  632. package/lib/typescript/module/teleport/scroll-view-context/context.d.ts +0 -4
  633. package/lib/typescript/module/teleport/scroll-view-context/context.d.ts.map +0 -1
  634. package/lib/typescript/module/teleport/scroll-view-context/context.native.d.ts +0 -13
  635. package/lib/typescript/module/teleport/scroll-view-context/context.native.d.ts.map +0 -1
  636. package/lib/typescript/module/teleport/scroll-view-context/types.d.ts +0 -10
  637. package/lib/typescript/module/teleport/scroll-view-context/types.d.ts.map +0 -1
  638. package/lib/typescript/module/teleport/specs/PortalHostViewNativeComponent.d.ts +0 -13
  639. package/lib/typescript/module/teleport/specs/PortalHostViewNativeComponent.d.ts.map +0 -1
  640. package/lib/typescript/module/teleport/specs/PortalViewNativeComponent.d.ts +0 -14
  641. package/lib/typescript/module/teleport/specs/PortalViewNativeComponent.d.ts.map +0 -1
  642. package/lib/typescript/module/teleport/types.d.ts +0 -22
  643. package/lib/typescript/module/teleport/types.d.ts.map +0 -1
  644. package/lib/typescript/module/teleport/use-id.d.ts +0 -2
  645. package/lib/typescript/module/teleport/use-id.d.ts.map +0 -1
  646. package/lib/typescript/module/teleport/use-portal.d.ts +0 -35
  647. package/lib/typescript/module/teleport/use-portal.d.ts.map +0 -1
  648. package/src/styles/styled-primitives.ts +0 -87
  649. package/src/teleport/Portal.tsx +0 -96
  650. package/src/teleport/PortalHost.tsx +0 -61
  651. package/src/teleport/PortalHostView.native.tsx +0 -14
  652. package/src/teleport/PortalHostView.tsx +0 -30
  653. package/src/teleport/PortalProvider.tsx +0 -51
  654. package/src/teleport/PortalProviderView.native.tsx +0 -11
  655. package/src/teleport/PortalProviderView.tsx +0 -54
  656. package/src/teleport/PortalView.native.tsx +0 -7
  657. package/src/teleport/PortalView.tsx +0 -83
  658. package/src/teleport/index.ts +0 -32
  659. package/src/teleport/portal-manager.tsx +0 -29
  660. package/src/teleport/portal-registry.ts +0 -24
  661. package/src/teleport/reducer.ts +0 -93
  662. package/src/teleport/scroll-view-context/context.native.ts +0 -19
  663. package/src/teleport/scroll-view-context/context.ts +0 -12
  664. package/src/teleport/scroll-view-context/types.ts +0 -7
  665. package/src/teleport/specs/PortalHostViewNativeComponent.ts +0 -15
  666. package/src/teleport/specs/PortalViewNativeComponent.ts +0 -16
  667. package/src/teleport/teleport-global.d.ts +0 -11
  668. package/src/teleport/types.ts +0 -22
  669. package/src/teleport/use-id.ts +0 -18
  670. package/src/teleport/use-portal.ts +0 -46
@@ -26,6 +26,7 @@ import {
26
26
  import Animated, {
27
27
  useSharedValue,
28
28
  useAnimatedStyle,
29
+ useDerivedValue,
29
30
  withSpring,
30
31
  withTiming,
31
32
  runOnJS,
@@ -165,6 +166,20 @@ const UNBLURRED_DIM_OPACITY = 0.92;
165
166
  */
166
167
  const SCRIM_CHROME = { background: 'rgba(0,0,0,0.55)', foreground: '#fff' } as const;
167
168
 
169
+ /**
170
+ * Calls `onCommit` from the commit that mounts it. Placed INSIDE the portaled
171
+ * overlay, so it runs once the overlay itself is in the tree — the viewer's
172
+ * own effects run a commit earlier, before the portal outlet has rendered the
173
+ * content, and a flight started there would be under way before its first
174
+ * frame was on screen.
175
+ */
176
+ function OnCommit({ onCommit }: { onCommit: () => void }) {
177
+ useLayoutEffect(() => {
178
+ onCommit();
179
+ }, [onCommit]);
180
+ return null;
181
+ }
182
+
168
183
  export function createZoomableMediaGallery(Button: MemoRefComponent<ButtonProps>) {
169
184
  function NavArrow({
170
185
  direction,
@@ -229,10 +244,14 @@ export function createZoomableMediaGallery(Button: MemoRefComponent<ButtonProps>
229
244
  * renders through the Bloom `Portal` on BOTH platforms (RN's `Modal` is not
230
245
  * used on native — on the New Architecture / Fabric Android its host views
231
246
  * mount full-screen but never composite, leaving the viewer invisible).
232
- * - The OPENING (tapped) item animates from its measured rect to a centered,
233
- * aspect-ratio-preserving fit within {@link FIT_FRACTION} of the screen. Once
234
- * the open animation settles, a horizontal paging `ScrollView` mounts seeded at
235
- * the tapped index so the user can swipe between every item in the post.
247
+ * - The OPENING (tapped) item flies from its measured rect to a centered,
248
+ * aspect-ratio-preserving fit within {@link FIT_FRACTION} of the screen, and
249
+ * every dismissal flies it back. The horizontal paging `ScrollView` is
250
+ * mounted from the first frame, seeded at the tapped index, and the flight
251
+ * transforms it: the media on screen is ONE surface, the active page's, from
252
+ * the first frame of the open to the last frame of the close. One shared
253
+ * value (`flight`) drives the transform and the backdrop, on the UI thread;
254
+ * `hiddenThumbIndex` lets the consumer hide the thumbnail it stands in for.
236
255
  * - Gesture disambiguation: the pager owns horizontal swipes; a vertical-only
237
256
  * `Gesture.Pan` (`activeOffsetY` + `failOffsetX`) owns drag-to-dismiss, so the
238
257
  * two never fight.
@@ -245,8 +264,8 @@ export function createZoomableMediaGallery(Button: MemoRefComponent<ButtonProps>
245
264
  * handing the same player to this gallery moves a playing video into fullscreen
246
265
  * without re-opening the stream. Exactly ONE view is mounted per opening — the
247
266
  * active page's — while every other page and every strip tile renders the still
248
- * (`MediaPoster`). The single unavoidable swap is the pre-pager open surface
249
- * handing over to the pager's active page once the open animation settles.
267
+ * (`MediaPoster`). The active page's view lives from the first frame of the
268
+ * open to the last frame of the close, so the transition swaps nothing.
250
269
  *
251
270
  * `expo-video` is an OPTIONAL peer loaded through `media-flight/expo-video-module`.
252
271
  * Without it a video page degrades to its poster, once, with a dev warning.
@@ -266,6 +285,7 @@ export function createZoomableMediaGallery(Button: MemoRefComponent<ButtonProps>
266
285
  indicatorVariant = 'dots',
267
286
  videoControls = false,
268
287
  labels: labelsProp,
288
+ hiddenThumbIndex,
269
289
  },
270
290
  ref,
271
291
  ) => {
@@ -307,8 +327,9 @@ export function createZoomableMediaGallery(Button: MemoRefComponent<ButtonProps>
307
327
  );
308
328
 
309
329
  const [isOpen, setIsOpen] = useState(false);
310
- // Once true, the swipeable pager is mounted and the single open-surface hidden.
311
- const [pagerReady, setPagerReady] = useState(false);
330
+ // True once the open flight has landed, until a dismissal starts: the
331
+ // chrome (share, counter, arrows) shows and the pager may page.
332
+ const [settled, setSettled] = useState(false);
312
333
  const [items, setItems] = useState<GalleryMedia[]>([]);
313
334
  // The accepted opening's item identities are needed by async probes even
314
335
  // before React commits the corresponding state update.
@@ -333,10 +354,22 @@ export function createZoomableMediaGallery(Button: MemoRefComponent<ButtonProps>
333
354
  return typeof navigator !== 'undefined' && typeof navigator.share === 'function';
334
355
  });
335
356
 
336
- const scale = useSharedValue(1);
337
- const translateX = useSharedValue(0);
338
- const translateY = useSharedValue(0);
339
- const opacity = useSharedValue(0);
357
+ // The transition is ONE value: 0 is the media standing on its thumbnail,
358
+ // 1 is the media fitted on screen. Open springs it to 1, every dismissal
359
+ // springs it back to 0, and both ends of the media's transform and the
360
+ // backdrop's fade are read from it — so a close started mid-open, or from
361
+ // wherever a drag left the media, lands on the thumbnail by construction,
362
+ // and its one completion callback is the frame the viewer has returned.
363
+ const flight = useSharedValue(0);
364
+ // The finger's offset while dragging to dismiss, applied at the fitted
365
+ // end of the flight. Rest is (0, 0, 1).
366
+ const dragX = useSharedValue(0);
367
+ const dragY = useSharedValue(0);
368
+ const dragScale = useSharedValue(1);
369
+ // The media itself is opaque: only the backdrop and chrome fade. It fades
370
+ // only where there is no thumbnail to fly to (or from), and drops to 0 on
371
+ // the frame the fly-back lands, when the thumbnail takes its place.
372
+ const mediaOpacity = useSharedValue(1);
340
373
 
341
374
  // Zoom transform of the active media, kept SEPARATE from the open/close +
342
375
  // dismiss-drag transform above (reusing those would collide two meanings).
@@ -353,13 +386,12 @@ export function createZoomableMediaGallery(Button: MemoRefComponent<ButtonProps>
353
386
  const originX = useSharedValue(0);
354
387
  const originY = useSharedValue(0);
355
388
 
389
+ // Per-drag baseline captured at pan start (transient).
356
390
  const startX = useSharedValue(0);
357
391
  const startY = useSharedValue(0);
358
- // Per-drag baseline captured at pan start (transient).
359
392
  const startScale = useSharedValue(1);
360
- // Persistent scale of the open-surface at its thumbnail origin (thumbWidth /
361
- // fittedWidth). The open animation grows from this to 1; the close animation
362
- // shrinks back to it. Never overwritten by the drag gesture.
393
+ // Scale of the fitted media at its thumbnail (thumbWidth / fittedWidth):
394
+ // the flight's 0 end.
363
395
  const originScale = useSharedValue(1);
364
396
 
365
397
  const pagerRef = useRef<ComponentRef<typeof ScrollView>>(null);
@@ -376,54 +408,38 @@ export function createZoomableMediaGallery(Button: MemoRefComponent<ButtonProps>
376
408
  // True from the first dismiss request until the viewer is actually unmounted.
377
409
  const dismissingRef = useRef(false);
378
410
 
379
- // Every deferred step of the open / dismiss choreography, so unmount can cancel
380
- // the ones still owing.
381
- //
382
- // Each one ends in a `setState` on THIS instance, and each is scheduled from a
383
- // gesture or an imperative `open()` — never from an effect — so React's own
384
- // teardown reaches none of them. A screen left within the ~300 ms of the open
385
- // transition therefore leaves a live timer holding the whole subtree, and the
386
- // state it eventually writes lands on a tree nobody is rendering. React makes
387
- // that a silent no-op rather than an error, which is exactly why it survived:
388
- // measured under jest, the gallery's `revealPager` timer outlives the file
389
- // that mounted it and fires inside the NEXT test file in the same worker
390
- // process, sometimes re-scheduling itself two files further on.
391
- const pendingRef = useRef<Set<ReturnType<typeof setTimeout>>>(new Set());
392
- const frameRef = useRef<number | null>(null);
411
+ // Nothing in the transition is a timer: the open starts from the commit
412
+ // that mounts the overlay and ends in its spring's callback, and the close
413
+ // ends in its own. An unmount only has to stop that callback from writing
414
+ // (`unmountedRef`) and give the thumbnail back.
393
415
  const unmountedRef = useRef(false);
394
- const schedule = useCallback((step: () => void, delay: number) => {
395
- // The open transition's own frame callback schedules the step after it, so
396
- // this can be reached once the component is already gone — starting a timer
397
- // there would put one back after the cleanup has run.
398
- if (unmountedRef.current) return;
399
- const handle = setTimeout(() => {
400
- pendingRef.current.delete(handle);
401
- step();
402
- }, delay);
403
- pendingRef.current.add(handle);
404
- }, []);
416
+ const hiddenThumbRef = useRef(hiddenThumbIndex);
417
+ hiddenThumbRef.current = hiddenThumbIndex;
405
418
  useEffect(() => {
406
419
  unmountedRef.current = false;
407
420
  return () => {
408
421
  unmountedRef.current = true;
409
422
  reportOpen(false);
410
- for (const handle of pendingRef.current) clearTimeout(handle);
411
- pendingRef.current.clear();
412
- if (frameRef.current !== null) {
413
- cancelAnimationFrame(frameRef.current);
414
- frameRef.current = null;
415
- }
423
+ if (hiddenThumbRef.current) hiddenThumbRef.current.value = -1;
416
424
  };
417
425
  }, [reportOpen]);
418
426
 
419
427
  // Single writer for the current index: updates state (drives indicator + open
420
428
  // image) and the synchronous mirror together, and only when it changes.
421
- const setActiveIndexBoth = useCallback((next: number, opening = false) => {
422
- const changed = activeIndexRef.current !== next;
423
- activeIndexRef.current = next;
424
- setActiveIndex((prev) => (prev === next ? prev : next));
425
- if (changed || opening) onIndexChangeRef.current?.(next);
426
- }, []);
429
+ // The thumbnail the media stands in for follows the page, so a swipe
430
+ // gives back the one it left and hides the one it reached.
431
+ const setActiveIndexBoth = useCallback(
432
+ (next: number, opening = false) => {
433
+ const changed = activeIndexRef.current !== next;
434
+ activeIndexRef.current = next;
435
+ setActiveIndex((prev) => (prev === next ? prev : next));
436
+ if (changed && hiddenThumbIndex && !opening && !dismissingRef.current) {
437
+ hiddenThumbIndex.value = next;
438
+ }
439
+ if (changed || opening) onIndexChangeRef.current?.(next);
440
+ },
441
+ [hiddenThumbIndex],
442
+ );
427
443
 
428
444
  // Snap the active media back to its un-zoomed baseline (no animation) and
429
445
  // clear all zoom bookkeeping. Called on every path that changes the active
@@ -475,7 +491,7 @@ export function createZoomableMediaGallery(Button: MemoRefComponent<ButtonProps>
475
491
  [fitBox],
476
492
  );
477
493
 
478
- // Fitted size of the single open-surface for the CURRENT page. On open this is
494
+ // Fitted size of the media for the CURRENT page. On open this is
479
495
  // the opened item's fit;
480
496
  // after swiping it tracks the viewed item so the collapse-on-dismiss renders
481
497
  // and flies back the media actually on screen.
@@ -538,60 +554,60 @@ export function createZoomableMediaGallery(Button: MemoRefComponent<ButtonProps>
538
554
  [isCurrentRatioProbe],
539
555
  );
540
556
 
541
- // Unmount + reset all animation values to their neutral baseline. Shared by
542
- // every dismiss path (fly-back and fade-out fallback).
557
+ // The viewer has returned: unmount and put every value back at rest.
543
558
  const finalizeDismiss = useCallback(() => {
559
+ if (unmountedRef.current) return;
544
560
  setIsOpen(false);
545
561
  // Keep the dismissal latch until the next open. Throttled web scroll
546
562
  // events can arrive after the pager unmounts and must not reset selection.
547
- scale.value = 1;
548
- translateX.value = 0;
549
- translateY.value = 0;
550
- opacity.value = 0;
563
+ flight.value = 0;
564
+ dragX.value = 0;
565
+ dragY.value = 0;
566
+ dragScale.value = 1;
567
+ resetZoom();
551
568
  reportOpen(false);
552
- }, [opacity, reportOpen, scale, translateX, translateY]);
553
-
554
- // Fly the (possibly dragged) media back toward `target` — the rect of the
555
- // thumbnail currently being viewed — shrinking to its footprint. Uses the
556
- // EXACT same close spring (native) / timing (web) as the avatar transition.
557
- const flyBackTo = useCallback(
558
- (target: { x: number; y: number; scale: number }) => {
559
- if (Platform.OS === 'web') {
560
- const duration = CLOSE_DURATION_WEB;
561
- const easing = Easing.in(Easing.cubic);
562
- scale.value = withTiming(target.scale, { duration, easing });
563
- translateX.value = withTiming(target.x, { duration, easing });
564
- translateY.value = withTiming(target.y, { duration, easing });
565
- opacity.value = withTiming(0, { duration, easing });
566
- schedule(finalizeDismiss, duration + 20);
569
+ }, [dragScale, dragX, dragY, flight, reportOpen, resetZoom]);
570
+
571
+ // Fly the media home: back to `target` (the current item's thumbnail,
572
+ // relative to the screen center), or, with no thumbnail to land on, into
573
+ // the center while it fades. Both end on the same callback — the frame
574
+ // the flight reaches 0 hides the media and gives the thumbnail back
575
+ // together, on the UI thread, so the photo is on screen exactly once.
576
+ const flyHome = useCallback(
577
+ (target: { x: number; y: number; scale: number } | null) => {
578
+ if (unmountedRef.current) return;
579
+ const web = Platform.OS === 'web';
580
+ if (target) {
581
+ originX.value = target.x;
582
+ originY.value = target.y;
583
+ originScale.value = target.scale;
567
584
  } else {
568
- scale.value = withSpring(target.scale, CLOSE_SPRING);
569
- translateX.value = withSpring(target.x, CLOSE_SPRING);
570
- translateY.value = withSpring(target.y, CLOSE_SPRING);
571
- opacity.value = withTiming(0, { duration: OPACITY_DURATION });
572
- schedule(finalizeDismiss, CLOSE_DURATION_WEB);
585
+ originX.value = 0;
586
+ originY.value = 0;
587
+ originScale.value = MIN_DRAG_SCALE;
588
+ mediaOpacity.value = withTiming(0, {
589
+ duration: web ? CLOSE_DURATION_WEB : OPACITY_DURATION,
590
+ });
573
591
  }
592
+ const thumb = hiddenThumbIndex;
593
+ const landed = (finished?: boolean) => {
594
+ 'worklet';
595
+ if (!finished) return;
596
+ mediaOpacity.value = 0;
597
+ if (thumb) thumb.value = -1;
598
+ runOnJS(finalizeDismiss)();
599
+ };
600
+ flight.value = web
601
+ ? withTiming(
602
+ 0,
603
+ { duration: CLOSE_DURATION_WEB, easing: Easing.in(Easing.cubic) },
604
+ landed,
605
+ )
606
+ : withSpring(0, CLOSE_SPRING, landed);
574
607
  },
575
- [finalizeDismiss, opacity, scale, schedule, translateX, translateY],
608
+ [finalizeDismiss, flight, hiddenThumbIndex, mediaOpacity, originScale, originX, originY],
576
609
  );
577
610
 
578
- // Fallback when the current thumbnail cannot be measured (ref missing /
579
- // unmounted / virtualized): a plain center fade-out with a slight scale-down,
580
- // then unmount. Keeps the same web timing / native spring feel.
581
- const fadeOutCenter = useCallback(() => {
582
- if (Platform.OS === 'web') {
583
- const duration = CLOSE_DURATION_WEB;
584
- const easing = Easing.in(Easing.cubic);
585
- scale.value = withTiming(MIN_DRAG_SCALE, { duration, easing });
586
- opacity.value = withTiming(0, { duration, easing });
587
- schedule(finalizeDismiss, duration + 20);
588
- } else {
589
- scale.value = withSpring(MIN_DRAG_SCALE, CLOSE_SPRING);
590
- opacity.value = withTiming(0, { duration: OPACITY_DURATION });
591
- schedule(finalizeDismiss, CLOSE_DURATION_WEB);
592
- }
593
- }, [finalizeDismiss, opacity, scale, schedule]);
594
-
595
611
  const handleDismiss = useCallback(() => {
596
612
  // A press on the image reaches BOTH its tap gesture and the page beneath it
597
613
  // (which owns the dismiss for the empty area around the image), so this can
@@ -600,42 +616,106 @@ export function createZoomableMediaGallery(Button: MemoRefComponent<ButtonProps>
600
616
  if (dismissingRef.current) return;
601
617
  dismissingRef.current = true;
602
618
  pendingShareFocus.current = null;
603
- // Collapse the pager back to the single open-surface so the fly-back
604
- // animates one item (the current one) rather than the whole scrolled strip.
605
- setPagerReady(false);
619
+ setSettled(false);
620
+ // A zoomed page unzooms on the way home, in step with the flight.
621
+ zoomScale.value = withSpring(1, CLOSE_SPRING);
622
+ zoomTranslateX.value = withSpring(0, CLOSE_SPRING);
623
+ zoomTranslateY.value = withSpring(0, CLOSE_SPRING);
606
624
 
607
625
  const index = activeIndexRef.current;
608
626
  const current = items[index];
609
- // Recompute the fly-back target from the CURRENT item: the live rect of its
610
- // thumbnail + the same fitted box (`activeFit`) the open-surface is rendered
611
- // at, using the same screen-center math as `open`. Falls back to a center
612
- // fade-out when the thumbnail can't be measured.
613
- if (measureThumb && current) {
614
- const centerX = SCREEN_WIDTH / 2;
615
- const centerY = SCREEN_HEIGHT / 2;
616
- void measureThumb(index).then((rect) => {
617
- if (rect && rect.width > 0 && activeFit.width > 0) {
618
- flyBackTo({
619
- x: rect.x + rect.width / 2 - centerX,
620
- y: rect.y + rect.height / 2 - centerY,
621
- scale: rect.width / activeFit.width,
622
- });
623
- } else {
624
- fadeOutCenter();
625
- }
626
- });
627
+ // The target is the CURRENT item's thumbnail, measured now: the page may
628
+ // have changed, and the list under the viewer may have scrolled.
629
+ if (!measureThumb || !current) {
630
+ flyHome(null);
627
631
  return;
628
632
  }
633
+ const centerX = SCREEN_WIDTH / 2;
634
+ const centerY = SCREEN_HEIGHT / 2;
635
+ void measureThumb(index).then((rect) => {
636
+ flyHome(
637
+ rect && rect.width > 0 && activeFit.width > 0
638
+ ? {
639
+ x: rect.x + rect.width / 2 - centerX,
640
+ y: rect.y + rect.height / 2 - centerY,
641
+ scale: rect.width / activeFit.width,
642
+ }
643
+ : null,
644
+ );
645
+ });
646
+ }, [
647
+ activeFit,
648
+ flyHome,
649
+ items,
650
+ measureThumb,
651
+ SCREEN_HEIGHT,
652
+ SCREEN_WIDTH,
653
+ zoomScale,
654
+ zoomTranslateX,
655
+ zoomTranslateY,
656
+ ]);
629
657
 
630
- fadeOutCenter();
631
- }, [activeFit, fadeOutCenter, flyBackTo, items, measureThumb, SCREEN_HEIGHT, SCREEN_WIDTH]);
632
-
633
- // Reveal the swipeable pager once the open animation has settled. The index it
634
- // lands on is `activeIndexRef` (set synchronously in `open`), seated by the
635
- // layout effect below.
636
- const revealPager = useCallback(() => {
637
- setPagerReady(true);
638
- }, []);
658
+ // The open flight: from the thumbnail to the fitted center. The thumbnail
659
+ // is hidden in the same write, so the photo is on screen exactly once. It
660
+ // starts when the opened media shows a picture (`onPicture`) if it has a
661
+ // preview — the thumbnail's own, already decoded URL — and otherwise as
662
+ // soon as the overlay is committed. Started any earlier, the thumbnail
663
+ // was hidden and the media had flown a frame or two before its first
664
+ // pixel was drawn: a hole where the avatar was, then a photo already on
665
+ // its way.
666
+ const flightPendingRef = useRef(false);
667
+ const startOpenFlight = useCallback(() => {
668
+ if (!flightPendingRef.current) return;
669
+ flightPendingRef.current = false;
670
+ const generation = openingGenerationRef.current;
671
+ const settle = () => {
672
+ if (
673
+ unmountedRef.current ||
674
+ dismissingRef.current ||
675
+ openingGenerationRef.current !== generation
676
+ )
677
+ return;
678
+ setSettled(true);
679
+ };
680
+ const landed = (finished?: boolean) => {
681
+ 'worklet';
682
+ if (finished) runOnJS(settle)();
683
+ };
684
+ if (hiddenThumbIndex) hiddenThumbIndex.value = activeIndexRef.current;
685
+ if (mediaOpacity.value < 1) {
686
+ mediaOpacity.value = withTiming(1, {
687
+ duration: Platform.OS === 'web' ? OPEN_DURATION_WEB : OPACITY_DURATION,
688
+ });
689
+ }
690
+ flight.value =
691
+ Platform.OS === 'web'
692
+ ? withTiming(
693
+ 1,
694
+ { duration: OPEN_DURATION_WEB, easing: Easing.out(Easing.cubic) },
695
+ landed,
696
+ )
697
+ : withSpring(1, OPEN_SPRING, landed);
698
+ }, [flight, hiddenThumbIndex, mediaOpacity]);
699
+
700
+ // The overlay is committed (see `OnCommit`). Seat the pager on the opened
701
+ // page now that it exists: `contentOffset` alone is not honoured on web
702
+ // for a pager mounted with the overlay (it stayed on page 0 while the
703
+ // counter said 2 / 2), and the viewer's own layout effects run before the
704
+ // portal has rendered the pager.
705
+ const onOverlayCommit = useCallback(() => {
706
+ pagerRef.current?.scrollTo({
707
+ x: activeIndexRef.current * SCREEN_WIDTH,
708
+ y: 0,
709
+ animated: false,
710
+ });
711
+ const opened = openedItemsRef.current[activeIndexRef.current];
712
+ const waitsForPicture =
713
+ opened !== undefined &&
714
+ opened.kind !== 'video' &&
715
+ opened.previewUri !== undefined &&
716
+ opened.previewUri !== opened.uri;
717
+ if (!waitsForPicture) startOpenFlight();
718
+ }, [startOpenFlight, SCREEN_WIDTH]);
639
719
 
640
720
  const open = useCallback(
641
721
  (nextItems: GalleryMedia[], index: number, rect?: MeasuredRect) => {
@@ -682,10 +762,9 @@ export function createZoomableMediaGallery(Button: MemoRefComponent<ButtonProps>
682
762
  });
683
763
  }
684
764
 
685
- // The open-surface box is rendered at its FINAL fitted size; the open
686
- // animation grows it from the thumbnail's footprint (scale < 1) up to 1,
687
- // mirroring the avatar's small→big scale. The initial scale is the ratio
688
- // of the thumbnail width to the fitted width.
765
+ // The media is laid out at its FINAL fitted size and the flight scales it
766
+ // down onto the thumbnail: its 0 end is the thumbnail's center (as an
767
+ // offset from the screen's) and width over the fitted width.
689
768
  const fitted = fitForRatio(ratio, targetUri);
690
769
  const centerX = SCREEN_WIDTH / 2;
691
770
  const centerY = SCREEN_HEIGHT / 2;
@@ -693,56 +772,39 @@ export function createZoomableMediaGallery(Button: MemoRefComponent<ButtonProps>
693
772
  originX.value = rect.x + rect.width / 2 - centerX;
694
773
  originY.value = rect.y + rect.height / 2 - centerY;
695
774
  originScale.value = rect.width / fitted.width;
775
+ mediaOpacity.value = 1;
696
776
  } else {
777
+ // Nothing to grow out of: the media appears in place and fades in.
697
778
  originX.value = 0;
698
779
  originY.value = 0;
699
780
  originScale.value = 1;
781
+ mediaOpacity.value = 0;
700
782
  }
783
+ flight.value = 0;
784
+ dragX.value = 0;
785
+ dragY.value = 0;
786
+ dragScale.value = 1;
787
+ flightPendingRef.current = true;
701
788
 
789
+ setSettled(false);
702
790
  setIsOpen(true);
703
791
  reportOpen(true);
704
- translateX.value = originX.value;
705
- translateY.value = originY.value;
706
- scale.value = originScale.value;
707
- opacity.value = 0;
708
-
709
- if (Platform.OS === 'web') {
710
- frameRef.current = requestAnimationFrame(() => {
711
- frameRef.current = null;
712
- const duration = OPEN_DURATION_WEB;
713
- const easing = Easing.out(Easing.cubic);
714
- scale.value = withTiming(1, { duration, easing });
715
- translateX.value = withTiming(0, { duration, easing });
716
- translateY.value = withTiming(0, { duration, easing });
717
- opacity.value = withTiming(1, { duration, easing });
718
- schedule(revealPager, duration);
719
- });
720
- } else {
721
- schedule(() => {
722
- scale.value = withSpring(1, OPEN_SPRING);
723
- translateX.value = withSpring(0, OPEN_SPRING);
724
- translateY.value = withSpring(0, OPEN_SPRING);
725
- opacity.value = withTiming(1, { duration: OPACITY_DURATION });
726
- schedule(revealPager, OPEN_DURATION_WEB);
727
- }, 0);
728
- }
729
792
  },
730
793
  [
731
794
  SCREEN_WIDTH,
732
795
  SCREEN_HEIGHT,
796
+ dragScale,
797
+ dragX,
798
+ dragY,
733
799
  fitForRatio,
800
+ flight,
734
801
  isCurrentRatioProbe,
735
- opacity,
802
+ mediaOpacity,
736
803
  originScale,
737
804
  originX,
738
805
  originY,
739
- revealPager,
740
806
  reportOpen,
741
- scale,
742
- schedule,
743
807
  setActiveIndexBoth,
744
- translateX,
745
- translateY,
746
808
  ],
747
809
  );
748
810
 
@@ -753,6 +815,10 @@ export function createZoomableMediaGallery(Button: MemoRefComponent<ButtonProps>
753
815
 
754
816
  React.useImperativeHandle(ref, () => ({ open, close }), [open, close]);
755
817
 
818
+ // Drag to dismiss: the media follows the finger on the UI thread, shrinking
819
+ // and dimming the backdrop with distance. Short of the threshold it springs
820
+ // back carrying the finger's speed; past it, the same flight home as any
821
+ // other dismissal, starting from wherever the finger left it.
756
822
  const panGesture = useMemo(
757
823
  () =>
758
824
  Gesture.Pan()
@@ -764,45 +830,41 @@ export function createZoomableMediaGallery(Button: MemoRefComponent<ButtonProps>
764
830
  .activeOffsetY([-AXIS_DECISION_OFFSET, AXIS_DECISION_OFFSET])
765
831
  .failOffsetX([-AXIS_DECISION_OFFSET, AXIS_DECISION_OFFSET])
766
832
  .onStart(() => {
767
- startX.value = translateX.value;
768
- startY.value = translateY.value;
769
- startScale.value = scale.value;
833
+ startX.value = dragX.value;
834
+ startY.value = dragY.value;
835
+ startScale.value = dragScale.value;
770
836
  })
771
837
  .onUpdate((event) => {
772
- translateX.value = startX.value + event.translationX;
773
- translateY.value = startY.value + event.translationY;
838
+ dragX.value = startX.value + event.translationX;
839
+ dragY.value = startY.value + event.translationY;
774
840
  const dragDistance = Math.sqrt(event.translationX ** 2 + event.translationY ** 2);
775
- const maxDrag = SCREEN_HEIGHT * MAX_DRAG_FRACTION;
776
- opacity.value = Math.max(0, 1 - dragDistance / maxDrag);
777
841
  const scaleReduction = Math.max(
778
842
  MIN_DRAG_SCALE,
779
843
  1 - dragDistance / (SCREEN_HEIGHT * SCALE_DRAG_FRACTION),
780
844
  );
781
- scale.value = startScale.value * scaleReduction;
845
+ dragScale.value = startScale.value * scaleReduction;
782
846
  })
783
847
  .onEnd((event) => {
784
848
  const dragDistance = Math.sqrt(event.translationX ** 2 + event.translationY ** 2);
785
849
  if (dragDistance > SCREEN_HEIGHT * DISMISS_FRACTION) {
786
850
  runOnJS(handleDismiss)();
787
851
  } else {
788
- scale.value = withSpring(1, SNAP_BACK_SPRING);
789
- translateX.value = withSpring(0, SNAP_BACK_SPRING);
790
- translateY.value = withSpring(0, SNAP_BACK_SPRING);
791
- opacity.value = withTiming(1, { duration: OPACITY_DURATION });
852
+ dragScale.value = withSpring(1, SNAP_BACK_SPRING);
853
+ dragX.value = withSpring(0, { ...SNAP_BACK_SPRING, velocity: event.velocityX });
854
+ dragY.value = withSpring(0, { ...SNAP_BACK_SPRING, velocity: event.velocityY });
792
855
  }
793
856
  }),
794
857
  [
858
+ dragScale,
859
+ dragX,
860
+ dragY,
795
861
  handleDismiss,
796
862
  isOpen,
797
863
  isZoomed,
798
864
  SCREEN_HEIGHT,
799
- opacity,
800
- scale,
801
865
  startScale,
802
866
  startX,
803
867
  startY,
804
- translateX,
805
- translateY,
806
868
  ],
807
869
  );
808
870
 
@@ -815,32 +877,35 @@ export function createZoomableMediaGallery(Button: MemoRefComponent<ButtonProps>
815
877
  // double-tap zoom on web. Native (plugin present) auto-tracks and ignores the
816
878
  // extra deps, so listing them is correct on both platforms. Same rule as
817
879
  // `bottom-sheet/BottomSheetBase.tsx`. Do NOT strip these.
818
- const backdropStyle = useAnimatedStyle(() => ({ opacity: opacity.value }), [opacity]);
819
-
820
- // The single open-surface animates from origin → fitted center.
821
- const openImageStyle = useAnimatedStyle(
822
- () => ({
823
- transform: [
824
- { translateX: translateX.value },
825
- { translateY: translateY.value },
826
- { scale: scale.value },
827
- ],
828
- }),
829
- [translateX, translateY, scale],
880
+ //
881
+ // The backdrop (and the chrome over it) is the flight, dimmed by how far
882
+ // the media has been dragged.
883
+ const backdropProgress = useDerivedValue(() => {
884
+ const dragDistance = Math.sqrt(dragX.value ** 2 + dragY.value ** 2);
885
+ const dragDim = Math.max(0, 1 - dragDistance / (SCREEN_HEIGHT * MAX_DRAG_FRACTION));
886
+ return flight.value * dragDim;
887
+ }, [dragX, dragY, flight, SCREEN_HEIGHT]);
888
+ const backdropStyle = useAnimatedStyle(
889
+ () => ({ opacity: backdropProgress.value }),
890
+ [backdropProgress],
830
891
  );
831
892
 
832
- // While dragging to dismiss, the whole pager follows the finger + fades.
833
- const pagerContainerStyle = useAnimatedStyle(
834
- () => ({
835
- opacity: opacity.value,
893
+ // The pager — and so the active page's media, centered in it — rides the
894
+ // flight: at 0 it stands on the thumbnail, at 1 it is where the finger
895
+ // has it. ONE surface paints the media from the first frame of the open
896
+ // to the last frame of the close; nothing is swapped, remounted or
897
+ // re-decoded on the way, which is what used to flash.
898
+ const mediaStyle = useAnimatedStyle(() => {
899
+ const t = flight.value;
900
+ return {
901
+ opacity: mediaOpacity.value,
836
902
  transform: [
837
- { translateX: translateX.value },
838
- { translateY: translateY.value },
839
- { scale: scale.value },
903
+ { translateX: originX.value + (dragX.value - originX.value) * t },
904
+ { translateY: originY.value + (dragY.value - originY.value) * t },
905
+ { scale: originScale.value + (dragScale.value - originScale.value) * t },
840
906
  ],
841
- }),
842
- [opacity, translateX, translateY, scale],
843
- );
907
+ };
908
+ }, [dragScale, dragX, dragY, flight, mediaOpacity, originScale, originX, originY]);
844
909
 
845
910
  // Pinch/double-tap zoom transform, layered on TOP of the active page image's
846
911
  // `fit`-based sizing (composed, never replacing it).
@@ -861,7 +926,7 @@ export function createZoomableMediaGallery(Button: MemoRefComponent<ButtonProps>
861
926
  // (web, where paging may not fire a reliable momentum-end).
862
927
  const updateIndexFromOffset = useCallback(
863
928
  (offsetX: number) => {
864
- if (dismissingRef.current || !pagerReady) return;
929
+ if (dismissingRef.current || !settled) return;
865
930
  const lastIndex = items.length - 1;
866
931
  if (lastIndex < 0) return;
867
932
  const next = Math.min(Math.max(Math.round(offsetX / SCREEN_WIDTH), 0), lastIndex);
@@ -890,7 +955,7 @@ export function createZoomableMediaGallery(Button: MemoRefComponent<ButtonProps>
890
955
  const item = items[next];
891
956
  if (item) ensureRatio(next, item);
892
957
  },
893
- [ensureRatio, items, pagerReady, resetZoom, setActiveIndexBoth, SCREEN_WIDTH],
958
+ [ensureRatio, items, resetZoom, setActiveIndexBoth, settled, SCREEN_WIDTH],
894
959
  );
895
960
 
896
961
  // Programmatically page to `index` (arrow buttons, keyboard, thumbnail taps).
@@ -898,14 +963,14 @@ export function createZoomableMediaGallery(Button: MemoRefComponent<ButtonProps>
898
963
  // state-sync — this only triggers the scroll. No-op until the pager is mounted.
899
964
  const pageTo = useCallback(
900
965
  (index: number) => {
901
- if (!pagerReady) return;
966
+ if (!settled) return;
902
967
  const lastIndex = items.length - 1;
903
968
  if (lastIndex < 0) return;
904
969
  const clamped = Math.min(Math.max(index, 0), lastIndex);
905
970
  resetZoom();
906
971
  pagerRef.current?.scrollTo({ x: clamped * SCREEN_WIDTH, y: 0, animated: true });
907
972
  },
908
- [items.length, pagerReady, resetZoom, SCREEN_WIDTH],
973
+ [items.length, resetZoom, settled, SCREEN_WIDTH],
909
974
  );
910
975
 
911
976
  const onPagerScroll = useCallback(
@@ -956,13 +1021,13 @@ export function createZoomableMediaGallery(Button: MemoRefComponent<ButtonProps>
956
1021
  // `SCREEN_WIDTH` makes the two agree by construction, and running it before
957
1022
  // paint keeps the corrected offset from being visible as a jump.
958
1023
  useLayoutEffect(() => {
959
- if (!pagerReady) return;
1024
+ if (!isOpen) return;
960
1025
  pagerRef.current?.scrollTo({
961
1026
  x: activeIndexRef.current * SCREEN_WIDTH,
962
1027
  y: 0,
963
1028
  animated: false,
964
1029
  });
965
- }, [pagerReady, SCREEN_WIDTH]);
1030
+ }, [isOpen, SCREEN_WIDTH]);
966
1031
 
967
1032
  // Double-tap toggles zoom: reset when already zoomed, else zoom to the tapped
968
1033
  // point (biased toward it, clamped near the image center). `x`/`y` are local
@@ -1192,7 +1257,7 @@ export function createZoomableMediaGallery(Button: MemoRefComponent<ButtonProps>
1192
1257
  <Backdrop
1193
1258
  onPress={handleDismiss}
1194
1259
  accessibilityLabel={labels.close}
1195
- progress={opacity}
1260
+ progress={backdropProgress}
1196
1261
  blurIntensity={page || !overlayCanBlur() ? 0 : undefined}
1197
1262
  dimColor={pagePalette?.background}
1198
1263
  dimOpacity={page ? 1 : overlayCanBlur() ? undefined : UNBLURRED_DIM_OPACITY}
@@ -1208,128 +1273,104 @@ export function createZoomableMediaGallery(Button: MemoRefComponent<ButtonProps>
1208
1273
  ]}
1209
1274
  pointerEvents="box-none"
1210
1275
  >
1211
- {!pagerReady && activeItem !== undefined && (
1212
- <Pressable onPress={handleDismiss} style={webPointerStyle}>
1213
- {/* The animated transform rides the BOX, not the media, so the
1214
- image and video arms move identically — and so the box's
1215
- radius clips a video the same way it rounds an image. */}
1216
- <Animated.View
1217
- style={[
1218
- styles.mediaBox,
1219
- {
1220
- width: activeFit.width,
1221
- height: activeFit.height,
1222
- borderRadius: radiusFor(activeFit),
1223
- },
1224
- openImageStyle,
1225
- ]}
1226
- >
1227
- <MediaSurface
1228
- content={activeItem}
1229
- contentFit="contain"
1230
- nativeControls={videoControls}
1231
- accessibilityLabel={activeItem.alt}
1232
- style={StyleSheet.absoluteFill}
1233
- />
1234
- </Animated.View>
1235
- </Pressable>
1236
- )}
1237
-
1238
- {pagerReady && (
1239
- <Animated.View style={[StyleSheet.absoluteFill, pagerContainerStyle]}>
1240
- <ScrollView
1241
- ref={pagerRef}
1242
- testID="bloom-media-gallery-pager"
1243
- horizontal
1244
- pagingEnabled
1245
- // Frozen while zoomed so a horizontal drag pans the zoomed image
1246
- // instead of paging away from it.
1247
- scrollEnabled={!isZoomed}
1248
- showsHorizontalScrollIndicator={false}
1249
- contentOffset={{ x: activeIndexRef.current * SCREEN_WIDTH, y: 0 }}
1250
- onMomentumScrollEnd={onPagerScroll}
1251
- {...(Platform.OS === 'web' ? { onScroll: onPagerScroll } : {})}
1252
- scrollEventThrottle={16}
1253
- style={StyleSheet.absoluteFill}
1254
- >
1255
- {items.map((item, idx) => {
1256
- const uri = posterUri(item);
1257
- const ratio = itemRatio(item, ratios.pages[idx]);
1258
- const fit = fitForRatio(ratio, uri);
1259
- // Only the active page is zoomable + gesture-wrapped (double-tap
1260
- // / single-tap dismiss / pinch / pan). It is also the ONLY page
1261
- // that mounts a real media surface: an off-screen page renders
1262
- // the still, because a second `VideoView` on the same player is
1263
- // exactly the duplicate surface this package exists to avoid.
1264
- // The active media handles its own tap-to-dismiss through the
1265
- // gesture, so it isn't wrapped in a Pressable.
1266
- if (idx === activeIndex) {
1267
- return (
1268
- <Pressable
1269
- key={mediaKey(item, idx)}
1270
- // The page fills the screen ON TOP of the backdrop (the
1271
- // pager below it needs pointer events to swipe), so a
1272
- // press on the empty area around the media can never
1273
- // reach the backdrop — the page dismisses it itself.
1274
- // Same outcome as tapping the media, which already
1275
- // dismisses through `singleTapDismissGesture`.
1276
- onPress={handleDismiss}
1277
- accessibilityLabel={labels.close}
1278
- style={[
1279
- styles.page,
1280
- { width: SCREEN_WIDTH, height: SCREEN_HEIGHT },
1281
- webPointerStyle,
1282
- ]}
1283
- >
1284
- <GestureDetector gesture={activePageGesture}>
1285
- <Animated.View
1286
- style={[
1287
- styles.mediaBox,
1288
- {
1289
- width: fit.width,
1290
- height: fit.height,
1291
- borderRadius: radiusFor(fit),
1292
- },
1293
- zoomImageStyle,
1294
- ]}
1295
- >
1296
- <MediaSurface
1297
- content={item}
1298
- contentFit="contain"
1299
- nativeControls={videoControls}
1300
- accessibilityLabel={item.alt}
1301
- style={StyleSheet.absoluteFill}
1302
- />
1303
- </Animated.View>
1304
- </GestureDetector>
1305
- </Pressable>
1306
- );
1307
- }
1276
+ {/* The transform rides the pager, so the active page's BOX moves —
1277
+ image and video arms identically, the box's radius clipping a
1278
+ video the way it rounds an image — and the pager clips its
1279
+ neighbours to the one page the flight is carrying. */}
1280
+ <Animated.View style={[StyleSheet.absoluteFill, mediaStyle]}>
1281
+ <ScrollView
1282
+ ref={pagerRef}
1283
+ testID="bloom-media-gallery-pager"
1284
+ horizontal
1285
+ pagingEnabled
1286
+ // Frozen in flight, and while zoomed so a horizontal drag pans
1287
+ // the zoomed image instead of paging away from it.
1288
+ scrollEnabled={settled && !isZoomed}
1289
+ showsHorizontalScrollIndicator={false}
1290
+ contentOffset={{ x: activeIndexRef.current * SCREEN_WIDTH, y: 0 }}
1291
+ onMomentumScrollEnd={onPagerScroll}
1292
+ {...(Platform.OS === 'web' ? { onScroll: onPagerScroll } : {})}
1293
+ scrollEventThrottle={16}
1294
+ style={StyleSheet.absoluteFill}
1295
+ >
1296
+ {items.map((item, idx) => {
1297
+ const uri = posterUri(item);
1298
+ const ratio = itemRatio(item, ratios.pages[idx]);
1299
+ const fit = fitForRatio(ratio, uri);
1300
+ // Only the active page is zoomable + gesture-wrapped (double-tap
1301
+ // / single-tap dismiss / pinch / pan). It is also the ONLY page
1302
+ // that mounts a real media surface: an off-screen page renders
1303
+ // the still, because a second `VideoView` on the same player is
1304
+ // exactly the duplicate surface this package exists to avoid.
1305
+ // The active media handles its own tap-to-dismiss through the
1306
+ // gesture, so it isn't wrapped in a Pressable.
1307
+ if (idx === activeIndex) {
1308
1308
  return (
1309
1309
  <Pressable
1310
1310
  key={mediaKey(item, idx)}
1311
+ // The page fills the screen ON TOP of the backdrop (the
1312
+ // pager below it needs pointer events to swipe), so a
1313
+ // press on the empty area around the media can never
1314
+ // reach the backdrop — the page dismisses it itself.
1315
+ // Same outcome as tapping the media, which already
1316
+ // dismisses through `singleTapDismissGesture`.
1311
1317
  onPress={handleDismiss}
1312
1318
  accessibilityLabel={labels.close}
1313
- style={[styles.page, { width: SCREEN_WIDTH, height: SCREEN_HEIGHT }]}
1319
+ style={[
1320
+ styles.page,
1321
+ { width: SCREEN_WIDTH, height: SCREEN_HEIGHT },
1322
+ webPointerStyle,
1323
+ ]}
1314
1324
  >
1315
- <MediaPoster
1316
- content={item}
1317
- contentFit="contain"
1318
- accessibilityLabel={item.alt}
1319
- style={{
1320
- width: fit.width,
1321
- height: fit.height,
1322
- borderRadius: radiusFor(fit),
1323
- }}
1324
- />
1325
+ <GestureDetector gesture={activePageGesture}>
1326
+ <Animated.View
1327
+ style={[
1328
+ styles.mediaBox,
1329
+ {
1330
+ width: fit.width,
1331
+ height: fit.height,
1332
+ borderRadius: radiusFor(fit),
1333
+ },
1334
+ zoomImageStyle,
1335
+ ]}
1336
+ >
1337
+ <MediaSurface
1338
+ content={item}
1339
+ contentFit="contain"
1340
+ nativeControls={videoControls}
1341
+ accessibilityLabel={item.alt}
1342
+ onPicture={startOpenFlight}
1343
+ style={StyleSheet.absoluteFill}
1344
+ />
1345
+ </Animated.View>
1346
+ </GestureDetector>
1325
1347
  </Pressable>
1326
1348
  );
1327
- })}
1328
- </ScrollView>
1329
- </Animated.View>
1330
- )}
1349
+ }
1350
+ return (
1351
+ <Pressable
1352
+ key={mediaKey(item, idx)}
1353
+ onPress={handleDismiss}
1354
+ accessibilityLabel={labels.close}
1355
+ style={[styles.page, { width: SCREEN_WIDTH, height: SCREEN_HEIGHT }]}
1356
+ >
1357
+ <MediaPoster
1358
+ content={item}
1359
+ contentFit="contain"
1360
+ accessibilityLabel={item.alt}
1361
+ style={{
1362
+ width: fit.width,
1363
+ height: fit.height,
1364
+ borderRadius: radiusFor(fit),
1365
+ }}
1366
+ />
1367
+ </Pressable>
1368
+ );
1369
+ })}
1370
+ </ScrollView>
1371
+ </Animated.View>
1331
1372
 
1332
- {pagerReady && items.length > 1 && (
1373
+ {settled && items.length > 1 && (
1333
1374
  <Animated.View
1334
1375
  style={[
1335
1376
  styles.indicatorWrap,
@@ -1407,7 +1448,7 @@ export function createZoomableMediaGallery(Button: MemoRefComponent<ButtonProps>
1407
1448
  </Animated.View>
1408
1449
  )}
1409
1450
 
1410
- {Platform.OS === 'web' && pagerReady && items.length > 1 && activeIndex > 0 && (
1451
+ {Platform.OS === 'web' && settled && items.length > 1 && activeIndex > 0 && (
1411
1452
  <NavArrow
1412
1453
  buttonRef={previousButtonRef}
1413
1454
  pageColors={pageColors}
@@ -1418,7 +1459,7 @@ export function createZoomableMediaGallery(Button: MemoRefComponent<ButtonProps>
1418
1459
  )}
1419
1460
 
1420
1461
  {Platform.OS === 'web' &&
1421
- pagerReady &&
1462
+ settled &&
1422
1463
  items.length > 1 &&
1423
1464
  activeIndex < items.length - 1 && (
1424
1465
  <NavArrow
@@ -1430,7 +1471,7 @@ export function createZoomableMediaGallery(Button: MemoRefComponent<ButtonProps>
1430
1471
  />
1431
1472
  )}
1432
1473
 
1433
- {canShare && pagerReady && activeItem && (
1474
+ {canShare && settled && activeItem && (
1434
1475
  <Button
1435
1476
  ref={shareButtonRef}
1436
1477
  onPress={handleShare}
@@ -1500,6 +1541,9 @@ export function createZoomableMediaGallery(Button: MemoRefComponent<ButtonProps>
1500
1541
  </Animated.View>
1501
1542
  )}
1502
1543
  </GestureHandlerRootView>
1544
+ {/* LAST, so its layout effect runs after every ref above it — the
1545
+ pager's included — is attached. */}
1546
+ <OnCommit onCommit={onOverlayCommit} />
1503
1547
  </OverlayRoot>
1504
1548
  );
1505
1549