react-native-screen-transitions 3.9.0 → 3.10.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 (383) hide show
  1. package/lib/commonjs/shared/animation/snap-to.js +2 -0
  2. package/lib/commonjs/shared/animation/snap-to.js.map +1 -1
  3. package/lib/commonjs/shared/components/boundary/components/boundary-target.js +19 -20
  4. package/lib/commonjs/shared/components/boundary/components/boundary-target.js.map +1 -1
  5. package/lib/commonjs/shared/components/boundary/create-boundary-component.js +16 -2
  6. package/lib/commonjs/shared/components/boundary/create-boundary-component.js.map +1 -1
  7. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js +5 -0
  8. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -1
  9. package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js +1 -3
  10. package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
  11. package/lib/commonjs/shared/components/boundary/index.js +4 -3
  12. package/lib/commonjs/shared/components/boundary/index.js.map +1 -1
  13. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +47 -187
  14. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -1
  15. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/index.js +21 -13
  16. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/index.js.map +1 -1
  17. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/host.js +1 -12
  18. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/host.js.map +1 -1
  19. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +40 -33
  20. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
  21. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.js +3 -4
  22. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.js.map +1 -1
  23. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +46 -130
  24. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
  25. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/index.js +45 -9
  26. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/index.js.map +1 -1
  27. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/host-registry.store.js.map +1 -1
  28. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js +2 -29
  29. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -1
  30. package/lib/commonjs/shared/components/boundary/portal/utils/handoff-target.js +33 -0
  31. package/lib/commonjs/shared/components/boundary/portal/utils/handoff-target.js.map +1 -0
  32. package/lib/commonjs/shared/components/boundary/portal/utils/resolve-portal.js +19 -15
  33. package/lib/commonjs/shared/components/boundary/portal/utils/resolve-portal.js.map +1 -1
  34. package/lib/commonjs/shared/components/boundary/portal/utils/teleport-control.js +1 -10
  35. package/lib/commonjs/shared/components/boundary/portal/utils/teleport-control.js.map +1 -1
  36. package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js +18 -36
  37. package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
  38. package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js +7 -0
  39. package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js.map +1 -1
  40. package/lib/commonjs/shared/components/boundary/utils/resolve-boundary-target.js +29 -0
  41. package/lib/commonjs/shared/components/boundary/utils/resolve-boundary-target.js.map +1 -0
  42. package/lib/commonjs/shared/components/masked-view.js +9 -1
  43. package/lib/commonjs/shared/components/masked-view.js.map +1 -1
  44. package/lib/commonjs/shared/components/screen-container/layers/backdrop.js +3 -1
  45. package/lib/commonjs/shared/components/screen-container/layers/backdrop.js.map +1 -1
  46. package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js +9 -1
  47. package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
  48. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js +2 -0
  49. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js.map +1 -1
  50. package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js +4 -1
  51. package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
  52. package/lib/commonjs/shared/providers/screen/gestures/gestures.provider.js +2 -8
  53. package/lib/commonjs/shared/providers/screen/gestures/gestures.provider.js.map +1 -1
  54. package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js +1 -0
  55. package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js.map +1 -1
  56. package/lib/commonjs/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js +37 -3
  57. package/lib/commonjs/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js.map +1 -1
  58. package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js +1 -0
  59. package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js.map +1 -1
  60. package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/pinch-release.js +3 -2
  61. package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/pinch-release.js.map +1 -1
  62. package/lib/commonjs/shared/providers/screen/gestures/types.js.map +1 -1
  63. package/lib/commonjs/shared/providers/screen/styles/helpers/transition-visual-state.js +42 -0
  64. package/lib/commonjs/shared/providers/screen/styles/helpers/transition-visual-state.js.map +1 -0
  65. package/lib/commonjs/shared/providers/screen/styles/helpers/visibility-gate.js +11 -5
  66. package/lib/commonjs/shared/providers/screen/styles/helpers/visibility-gate.js.map +1 -1
  67. package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +23 -10
  68. package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
  69. package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +10 -8
  70. package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
  71. package/lib/commonjs/shared/stores/bounds/internals/links.js +4 -4
  72. package/lib/commonjs/shared/stores/bounds/internals/links.js.map +1 -1
  73. package/lib/commonjs/shared/stores/scroll.store.js +20 -2
  74. package/lib/commonjs/shared/stores/scroll.store.js.map +1 -1
  75. package/lib/commonjs/shared/stores/system.store.js +2 -0
  76. package/lib/commonjs/shared/stores/system.store.js.map +1 -1
  77. package/lib/commonjs/shared/utils/animation/animate-to-progress.js +23 -1
  78. package/lib/commonjs/shared/utils/animation/animate-to-progress.js.map +1 -1
  79. package/lib/commonjs/shared/utils/animation/animate.js +14 -2
  80. package/lib/commonjs/shared/utils/animation/animate.js.map +1 -1
  81. package/lib/commonjs/shared/utils/animation/spring/spring.js +22 -2
  82. package/lib/commonjs/shared/utils/animation/spring/spring.js.map +1 -1
  83. package/lib/commonjs/shared/utils/animation/spring/springUtils.js +96 -0
  84. package/lib/commonjs/shared/utils/animation/spring/springUtils.js.map +1 -1
  85. package/lib/commonjs/shared/utils/animation/state.js +4 -0
  86. package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js +17 -5
  87. package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
  88. package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js +44 -20
  89. package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
  90. package/lib/commonjs/shared/utils/bounds/navigation/zoom/drag.js +2 -31
  91. package/lib/commonjs/shared/utils/bounds/navigation/zoom/drag.js.map +1 -1
  92. package/lib/commonjs/shared/utils/bounds/navigation/zoom/helpers.js +3 -17
  93. package/lib/commonjs/shared/utils/bounds/navigation/zoom/helpers.js.map +1 -1
  94. package/lib/module/shared/animation/snap-to.js +2 -0
  95. package/lib/module/shared/animation/snap-to.js.map +1 -1
  96. package/lib/module/shared/components/boundary/components/boundary-target.js +19 -20
  97. package/lib/module/shared/components/boundary/components/boundary-target.js.map +1 -1
  98. package/lib/module/shared/components/boundary/create-boundary-component.js +17 -3
  99. package/lib/module/shared/components/boundary/create-boundary-component.js.map +1 -1
  100. package/lib/module/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js +5 -0
  101. package/lib/module/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -1
  102. package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js +1 -3
  103. package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
  104. package/lib/module/shared/components/boundary/index.js +3 -2
  105. package/lib/module/shared/components/boundary/index.js.map +1 -1
  106. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +49 -189
  107. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -1
  108. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/index.js +21 -13
  109. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/index.js.map +1 -1
  110. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/host.js +2 -13
  111. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/host.js.map +1 -1
  112. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +43 -36
  113. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
  114. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.js +3 -4
  115. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.js.map +1 -1
  116. package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +50 -134
  117. package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
  118. package/lib/module/shared/components/boundary/portal/components/boundary-portal/index.js +44 -9
  119. package/lib/module/shared/components/boundary/portal/components/boundary-portal/index.js.map +1 -1
  120. package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/host-registry.store.js.map +1 -1
  121. package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js +1 -27
  122. package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -1
  123. package/lib/module/shared/components/boundary/portal/utils/handoff-target.js +28 -0
  124. package/lib/module/shared/components/boundary/portal/utils/handoff-target.js.map +1 -0
  125. package/lib/module/shared/components/boundary/portal/utils/resolve-portal.js +19 -15
  126. package/lib/module/shared/components/boundary/portal/utils/resolve-portal.js.map +1 -1
  127. package/lib/module/shared/components/boundary/portal/utils/teleport-control.js +0 -8
  128. package/lib/module/shared/components/boundary/portal/utils/teleport-control.js.map +1 -1
  129. package/lib/module/shared/components/boundary/providers/boundary-root.provider.js +19 -37
  130. package/lib/module/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
  131. package/lib/module/shared/components/boundary/utils/refresh-signals.js +7 -0
  132. package/lib/module/shared/components/boundary/utils/refresh-signals.js.map +1 -1
  133. package/lib/module/shared/components/boundary/utils/resolve-boundary-target.js +24 -0
  134. package/lib/module/shared/components/boundary/utils/resolve-boundary-target.js.map +1 -0
  135. package/lib/module/shared/components/masked-view.js +10 -2
  136. package/lib/module/shared/components/masked-view.js.map +1 -1
  137. package/lib/module/shared/components/screen-container/layers/backdrop.js +3 -1
  138. package/lib/module/shared/components/screen-container/layers/backdrop.js.map +1 -1
  139. package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js +10 -2
  140. package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
  141. package/lib/module/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js +2 -0
  142. package/lib/module/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js.map +1 -1
  143. package/lib/module/shared/providers/helpers/measured-bounds-writes.js +4 -1
  144. package/lib/module/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
  145. package/lib/module/shared/providers/screen/gestures/gestures.provider.js +2 -8
  146. package/lib/module/shared/providers/screen/gestures/gestures.provider.js.map +1 -1
  147. package/lib/module/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js +1 -0
  148. package/lib/module/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js.map +1 -1
  149. package/lib/module/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js +35 -2
  150. package/lib/module/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js.map +1 -1
  151. package/lib/module/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js +1 -0
  152. package/lib/module/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js.map +1 -1
  153. package/lib/module/shared/providers/screen/gestures/pinch/behavior/pinch-release.js +3 -2
  154. package/lib/module/shared/providers/screen/gestures/pinch/behavior/pinch-release.js.map +1 -1
  155. package/lib/module/shared/providers/screen/gestures/types.js.map +1 -1
  156. package/lib/module/shared/providers/screen/styles/helpers/transition-visual-state.js +35 -0
  157. package/lib/module/shared/providers/screen/styles/helpers/transition-visual-state.js.map +1 -0
  158. package/lib/module/shared/providers/screen/styles/helpers/visibility-gate.js +11 -5
  159. package/lib/module/shared/providers/screen/styles/helpers/visibility-gate.js.map +1 -1
  160. package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +23 -10
  161. package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
  162. package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +10 -8
  163. package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
  164. package/lib/module/shared/stores/bounds/internals/links.js +4 -4
  165. package/lib/module/shared/stores/bounds/internals/links.js.map +1 -1
  166. package/lib/module/shared/stores/scroll.store.js +17 -0
  167. package/lib/module/shared/stores/scroll.store.js.map +1 -1
  168. package/lib/module/shared/stores/system.store.js +2 -0
  169. package/lib/module/shared/stores/system.store.js.map +1 -1
  170. package/lib/module/shared/utils/animation/animate-to-progress.js +21 -0
  171. package/lib/module/shared/utils/animation/animate-to-progress.js.map +1 -1
  172. package/lib/module/shared/utils/animation/animate.js +14 -2
  173. package/lib/module/shared/utils/animation/animate.js.map +1 -1
  174. package/lib/module/shared/utils/animation/spring/spring.js +23 -3
  175. package/lib/module/shared/utils/animation/spring/spring.js.map +1 -1
  176. package/lib/module/shared/utils/animation/spring/springUtils.js +95 -0
  177. package/lib/module/shared/utils/animation/spring/springUtils.js.map +1 -1
  178. package/lib/module/shared/utils/animation/state.js +2 -0
  179. package/lib/module/shared/utils/bounds/navigation/reveal/math.js +16 -5
  180. package/lib/module/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
  181. package/lib/module/shared/utils/bounds/navigation/zoom/build.js +46 -22
  182. package/lib/module/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
  183. package/lib/module/shared/utils/bounds/navigation/zoom/drag.js +2 -30
  184. package/lib/module/shared/utils/bounds/navigation/zoom/drag.js.map +1 -1
  185. package/lib/module/shared/utils/bounds/navigation/zoom/helpers.js +4 -18
  186. package/lib/module/shared/utils/bounds/navigation/zoom/helpers.js.map +1 -1
  187. package/lib/typescript/shared/animation/snap-to.d.ts.map +1 -1
  188. package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts +2 -1
  189. package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts.map +1 -1
  190. package/lib/typescript/shared/components/boundary/create-boundary-component.d.ts.map +1 -1
  191. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.d.ts.map +1 -1
  192. package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts +3 -4
  193. package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts.map +1 -1
  194. package/lib/typescript/shared/components/boundary/index.d.ts +6 -9
  195. package/lib/typescript/shared/components/boundary/index.d.ts.map +1 -1
  196. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.d.ts +1 -3
  197. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.d.ts.map +1 -1
  198. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/index.d.ts.map +1 -1
  199. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/host.d.ts.map +1 -1
  200. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.d.ts.map +1 -1
  201. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.d.ts +1 -10
  202. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.d.ts.map +1 -1
  203. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts +1 -3
  204. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts.map +1 -1
  205. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/index.d.ts +2 -2
  206. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/index.d.ts.map +1 -1
  207. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/host-registry.store.d.ts +0 -1
  208. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/host-registry.store.d.ts.map +1 -1
  209. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts +1 -10
  210. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts.map +1 -1
  211. package/lib/typescript/shared/components/boundary/portal/utils/handoff-target.d.ts +12 -0
  212. package/lib/typescript/shared/components/boundary/portal/utils/handoff-target.d.ts.map +1 -0
  213. package/lib/typescript/shared/components/boundary/portal/utils/resolve-portal.d.ts +2 -3
  214. package/lib/typescript/shared/components/boundary/portal/utils/resolve-portal.d.ts.map +1 -1
  215. package/lib/typescript/shared/components/boundary/portal/utils/teleport-control.d.ts +0 -4
  216. package/lib/typescript/shared/components/boundary/portal/utils/teleport-control.d.ts.map +1 -1
  217. package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts +8 -12
  218. package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts.map +1 -1
  219. package/lib/typescript/shared/components/boundary/utils/refresh-signals.d.ts +1 -0
  220. package/lib/typescript/shared/components/boundary/utils/refresh-signals.d.ts.map +1 -1
  221. package/lib/typescript/shared/components/boundary/utils/resolve-boundary-target.d.ts +12 -0
  222. package/lib/typescript/shared/components/boundary/utils/resolve-boundary-target.d.ts.map +1 -0
  223. package/lib/typescript/shared/components/masked-view.d.ts.map +1 -1
  224. package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -1
  225. package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts.map +1 -1
  226. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-transition-start-controller.d.ts.map +1 -1
  227. package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts.map +1 -1
  228. package/lib/typescript/shared/providers/screen/gestures/gestures.provider.d.ts.map +1 -1
  229. package/lib/typescript/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.d.ts.map +1 -1
  230. package/lib/typescript/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.d.ts +2 -1
  231. package/lib/typescript/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.d.ts.map +1 -1
  232. package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.d.ts.map +1 -1
  233. package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/pinch-release.d.ts.map +1 -1
  234. package/lib/typescript/shared/providers/screen/gestures/types.d.ts +1 -9
  235. package/lib/typescript/shared/providers/screen/gestures/types.d.ts.map +1 -1
  236. package/lib/typescript/shared/providers/screen/styles/helpers/transition-visual-state.d.ts +18 -0
  237. package/lib/typescript/shared/providers/screen/styles/helpers/transition-visual-state.d.ts.map +1 -0
  238. package/lib/typescript/shared/providers/screen/styles/helpers/visibility-gate.d.ts +2 -2
  239. package/lib/typescript/shared/providers/screen/styles/helpers/visibility-gate.d.ts.map +1 -1
  240. package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -1
  241. package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts.map +1 -1
  242. package/lib/typescript/shared/stores/bounds/internals/links.d.ts +1 -1
  243. package/lib/typescript/shared/stores/bounds/internals/links.d.ts.map +1 -1
  244. package/lib/typescript/shared/stores/scroll.store.d.ts +7 -0
  245. package/lib/typescript/shared/stores/scroll.store.d.ts.map +1 -1
  246. package/lib/typescript/shared/stores/system.store.d.ts +5 -0
  247. package/lib/typescript/shared/stores/system.store.d.ts.map +1 -1
  248. package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts +6 -1
  249. package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts.map +1 -1
  250. package/lib/typescript/shared/utils/animation/animate.d.ts +2 -2
  251. package/lib/typescript/shared/utils/animation/animate.d.ts.map +1 -1
  252. package/lib/typescript/shared/utils/animation/spring/spring.d.ts +2 -2
  253. package/lib/typescript/shared/utils/animation/spring/spring.d.ts.map +1 -1
  254. package/lib/typescript/shared/utils/animation/spring/springUtils.d.ts +3 -0
  255. package/lib/typescript/shared/utils/animation/spring/springUtils.d.ts.map +1 -1
  256. package/lib/typescript/shared/utils/animation/state.d.ts +6 -0
  257. package/lib/typescript/shared/utils/animation/state.d.ts.map +1 -1
  258. package/lib/typescript/shared/utils/bounds/navigation/reveal/math.d.ts +9 -0
  259. package/lib/typescript/shared/utils/bounds/navigation/reveal/math.d.ts.map +1 -1
  260. package/lib/typescript/shared/utils/bounds/navigation/zoom/build.d.ts.map +1 -1
  261. package/lib/typescript/shared/utils/bounds/navigation/zoom/drag.d.ts +2 -11
  262. package/lib/typescript/shared/utils/bounds/navigation/zoom/drag.d.ts.map +1 -1
  263. package/lib/typescript/shared/utils/bounds/navigation/zoom/helpers.d.ts +7 -4
  264. package/lib/typescript/shared/utils/bounds/navigation/zoom/helpers.d.ts.map +1 -1
  265. package/package.json +1 -1
  266. package/src/shared/animation/snap-to.ts +5 -0
  267. package/src/shared/components/boundary/components/boundary-target.tsx +37 -23
  268. package/src/shared/components/boundary/create-boundary-component.tsx +29 -3
  269. package/src/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.ts +11 -0
  270. package/src/shared/components/boundary/hooks/use-boundary-measurement.ts +3 -9
  271. package/src/shared/components/boundary/index.tsx +4 -8
  272. package/src/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.ts +73 -275
  273. package/src/shared/components/boundary/portal/components/boundary-content-portal/index.tsx +31 -12
  274. package/src/shared/components/boundary/portal/components/boundary-portal/components/host.tsx +2 -12
  275. package/src/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.tsx +64 -62
  276. package/src/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.ts +2 -9
  277. package/src/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts +73 -186
  278. package/src/shared/components/boundary/portal/components/boundary-portal/index.tsx +72 -12
  279. package/src/shared/components/boundary/portal/components/boundary-portal/stores/host-registry.store.ts +0 -1
  280. package/src/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.ts +2 -39
  281. package/src/shared/components/boundary/portal/utils/handoff-target.ts +48 -0
  282. package/src/shared/components/boundary/portal/utils/resolve-portal.ts +26 -18
  283. package/src/shared/components/boundary/portal/utils/teleport-control.ts +0 -12
  284. package/src/shared/components/boundary/providers/boundary-root.provider.tsx +28 -80
  285. package/src/shared/components/boundary/utils/refresh-signals.ts +8 -0
  286. package/src/shared/components/boundary/utils/resolve-boundary-target.tsx +39 -0
  287. package/src/shared/components/masked-view.tsx +20 -4
  288. package/src/shared/components/screen-container/layers/backdrop.tsx +3 -1
  289. package/src/shared/components/screen-container/layers/maybe-masked-navigation-container.tsx +14 -4
  290. package/src/shared/components/screen-lifecycle/hooks/use-transition-start-controller.ts +2 -0
  291. package/src/shared/providers/helpers/measured-bounds-writes.ts +1 -0
  292. package/src/shared/providers/screen/gestures/gestures.provider.tsx +2 -10
  293. package/src/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.ts +1 -0
  294. package/src/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.ts +74 -3
  295. package/src/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.ts +1 -0
  296. package/src/shared/providers/screen/gestures/pinch/behavior/pinch-release.ts +2 -4
  297. package/src/shared/providers/screen/gestures/types.ts +0 -14
  298. package/src/shared/providers/screen/styles/helpers/transition-visual-state.ts +44 -0
  299. package/src/shared/providers/screen/styles/helpers/visibility-gate.ts +17 -7
  300. package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +30 -15
  301. package/src/shared/providers/screen/styles/hooks/use-maybe-block-visibility.tsx +14 -13
  302. package/src/shared/stores/bounds/internals/links.ts +13 -2
  303. package/src/shared/stores/scroll.store.ts +23 -0
  304. package/src/shared/stores/system.store.ts +8 -0
  305. package/src/shared/utils/animation/animate-to-progress.ts +59 -28
  306. package/src/shared/utils/animation/animate.ts +18 -2
  307. package/src/shared/utils/animation/spring/spring.ts +36 -1
  308. package/src/shared/utils/animation/spring/springUtils.ts +130 -0
  309. package/src/shared/utils/animation/state.ts +8 -0
  310. package/src/shared/utils/bounds/navigation/reveal/math.ts +21 -5
  311. package/src/shared/utils/bounds/navigation/zoom/build.ts +77 -23
  312. package/src/shared/utils/bounds/navigation/zoom/drag.ts +3 -42
  313. package/src/shared/utils/bounds/navigation/zoom/helpers.ts +9 -23
  314. package/lib/commonjs/shared/components/boundary/hooks/use-register-target.js +0 -32
  315. package/lib/commonjs/shared/components/boundary/hooks/use-register-target.js.map +0 -1
  316. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js +0 -51
  317. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js.map +0 -1
  318. package/lib/commonjs/shared/components/boundary/portal/utils/ownership.js +0 -220
  319. package/lib/commonjs/shared/components/boundary/portal/utils/ownership.js.map +0 -1
  320. package/lib/commonjs/shared/components/boundary/portal/utils/shallow-equal.js +0 -29
  321. package/lib/commonjs/shared/components/boundary/portal/utils/shallow-equal.js.map +0 -1
  322. package/lib/commonjs/shared/components/boundary/portal/utils/visible-host.js +0 -25
  323. package/lib/commonjs/shared/components/boundary/portal/utils/visible-host.js.map +0 -1
  324. package/lib/commonjs/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.js +0 -64
  325. package/lib/commonjs/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.js.map +0 -1
  326. package/lib/commonjs/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.js +0 -21
  327. package/lib/commonjs/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.js.map +0 -1
  328. package/lib/commonjs/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.js +0 -29
  329. package/lib/commonjs/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.js.map +0 -1
  330. package/lib/commonjs/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.js +0 -38
  331. package/lib/commonjs/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.js.map +0 -1
  332. package/lib/commonjs/shared/providers/screen/styles/helpers/opening-phase.js +0 -32
  333. package/lib/commonjs/shared/providers/screen/styles/helpers/opening-phase.js.map +0 -1
  334. package/lib/module/shared/components/boundary/hooks/use-register-target.js +0 -27
  335. package/lib/module/shared/components/boundary/hooks/use-register-target.js.map +0 -1
  336. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js +0 -46
  337. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js.map +0 -1
  338. package/lib/module/shared/components/boundary/portal/utils/ownership.js +0 -213
  339. package/lib/module/shared/components/boundary/portal/utils/ownership.js.map +0 -1
  340. package/lib/module/shared/components/boundary/portal/utils/shallow-equal.js +0 -24
  341. package/lib/module/shared/components/boundary/portal/utils/shallow-equal.js.map +0 -1
  342. package/lib/module/shared/components/boundary/portal/utils/visible-host.js +0 -20
  343. package/lib/module/shared/components/boundary/portal/utils/visible-host.js.map +0 -1
  344. package/lib/module/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.js +0 -59
  345. package/lib/module/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.js.map +0 -1
  346. package/lib/module/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.js +0 -15
  347. package/lib/module/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.js.map +0 -1
  348. package/lib/module/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.js +0 -24
  349. package/lib/module/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.js.map +0 -1
  350. package/lib/module/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.js +0 -33
  351. package/lib/module/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.js.map +0 -1
  352. package/lib/module/shared/providers/screen/styles/helpers/opening-phase.js +0 -26
  353. package/lib/module/shared/providers/screen/styles/helpers/opening-phase.js.map +0 -1
  354. package/lib/typescript/shared/components/boundary/hooks/use-register-target.d.ts +0 -10
  355. package/lib/typescript/shared/components/boundary/hooks/use-register-target.d.ts.map +0 -1
  356. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.d.ts +0 -13
  357. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.d.ts.map +0 -1
  358. package/lib/typescript/shared/components/boundary/portal/utils/ownership.d.ts +0 -34
  359. package/lib/typescript/shared/components/boundary/portal/utils/ownership.d.ts.map +0 -1
  360. package/lib/typescript/shared/components/boundary/portal/utils/shallow-equal.d.ts +0 -8
  361. package/lib/typescript/shared/components/boundary/portal/utils/shallow-equal.d.ts.map +0 -1
  362. package/lib/typescript/shared/components/boundary/portal/utils/visible-host.d.ts +0 -8
  363. package/lib/typescript/shared/components/boundary/portal/utils/visible-host.d.ts.map +0 -1
  364. package/lib/typescript/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.d.ts +0 -15
  365. package/lib/typescript/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.d.ts.map +0 -1
  366. package/lib/typescript/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.d.ts +0 -4
  367. package/lib/typescript/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.d.ts.map +0 -1
  368. package/lib/typescript/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.d.ts +0 -5
  369. package/lib/typescript/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.d.ts.map +0 -1
  370. package/lib/typescript/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.d.ts +0 -9
  371. package/lib/typescript/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.d.ts.map +0 -1
  372. package/lib/typescript/shared/providers/screen/styles/helpers/opening-phase.d.ts +0 -16
  373. package/lib/typescript/shared/providers/screen/styles/helpers/opening-phase.d.ts.map +0 -1
  374. package/src/shared/components/boundary/hooks/use-register-target.ts +0 -43
  375. package/src/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.tsx +0 -79
  376. package/src/shared/components/boundary/portal/utils/ownership.ts +0 -319
  377. package/src/shared/components/boundary/portal/utils/shallow-equal.ts +0 -25
  378. package/src/shared/components/boundary/portal/utils/visible-host.ts +0 -24
  379. package/src/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.ts +0 -88
  380. package/src/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.ts +0 -19
  381. package/src/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.ts +0 -47
  382. package/src/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.ts +0 -50
  383. package/src/shared/providers/screen/styles/helpers/opening-phase.ts +0 -25
@@ -1,219 +1,79 @@
1
1
  "use strict";
2
2
 
3
- import { useCallback, useLayoutEffect, useState } from "react";
4
- import { runOnJS, useAnimatedProps, useAnimatedReaction, useSharedValue } from "react-native-reanimated";
3
+ import { useAnimatedProps, useSharedValue } from "react-native-reanimated";
5
4
  import { useDescriptorsStore } from "../../../../../../providers/screen/descriptors";
6
5
  import { useScreenSlots } from "../../../../../../providers/screen/styles";
7
- import { useRegisteredScreenSlots } from "../../../../../../providers/screen/styles/stores/slot-references.store";
6
+ import { hasCloseTransitionFinished } from "../../../../../../providers/screen/styles/helpers/transition-visual-state";
8
7
  import { AnimationStore } from "../../../../../../stores/animation.store";
9
- import { getSourceScreenKeyFromPairKey } from "../../../../../../stores/bounds/helpers/link-pairs.helpers";
10
8
  import { pairs } from "../../../../../../stores/bounds/internals/state";
9
+ import { SystemStore } from "../../../../../../stores/system.store";
10
+ import { resolveEnteringHandoffTarget } from "../../../utils/handoff-target";
11
11
  import { PORTAL_HOST_NAME_RESET_VALUE } from "../../../utils/naming";
12
- import { canSwitchHandoffHostImmediately, isHandoffHostClosingComplete, resolveBoundaryPortalOwnership } from "../../../utils/ownership";
13
- import { shallowEqual } from "../../../utils/shallow-equal";
14
- import { shouldAttachBoundaryPortal } from "../../../utils/teleport-control";
15
- import { resolveNextVisiblePortalHostName } from "../../../utils/visible-host";
12
+ import { isTeleportEnabled } from "../../../utils/teleport-control";
16
13
  import { createBoundaryContentPortalHostName } from "../helpers/host-name";
17
14
  export const useBoundaryContentPortalAttachment = ({
18
- boundaryId,
19
- enabled
15
+ boundaryId
20
16
  }) => {
21
- const ownScreenSlots = useScreenSlots();
17
+ const {
18
+ slotsMap
19
+ } = useScreenSlots();
22
20
  const sourcePairKey = useDescriptorsStore(s => s.derivations.sourcePairKey);
23
21
  const currentScreenKey = useDescriptorsStore(s => s.derivations.currentScreenKey);
24
- const [ownership, setOwnership] = useState(null);
25
- const styleOwnerScreenKey = ownership?.ownerScreenKey ?? currentScreenKey;
26
- const ownerScreenSlots = useRegisteredScreenSlots(styleOwnerScreenKey);
27
- const activeScreenSlots = ownerScreenSlots ?? ownScreenSlots;
28
- const {
29
- nextInterpolatorReady: activeNextInterpolatorReady,
30
- slotsMap: activeSlotsMap
31
- } = activeScreenSlots;
32
- const requestedPortalHostName = useSharedValue(null);
33
- const visiblePortalHostName = useSharedValue(null);
34
- const canSwitchPortalHostImmediately = useSharedValue(0);
35
- const targetScreenKey = ownership ? ownership.hostScreenKey : null;
36
- const settledHostScreenKey = ownership?.hostScreenKey ?? null;
37
- const settledHostProgress = AnimationStore.getValue(settledHostScreenKey ?? currentScreenKey, "progressSettled");
38
- const settledHostAnimating = AnimationStore.getValue(settledHostScreenKey ?? currentScreenKey, "progressAnimating");
39
- const settledHostWillAnimate = AnimationStore.getValue(settledHostScreenKey ?? currentScreenKey, "willAnimate");
40
- const settledHostClosing = AnimationStore.getValue(settledHostScreenKey ?? currentScreenKey, "closing");
41
- const handoffHostName = targetScreenKey !== null ? createBoundaryContentPortalHostName(targetScreenKey, boundaryId) : null;
42
- const updatePortalOwnership = useCallback((hostScreenKey, ownerPairKey, ownerScreenKey) => {
43
- if (hostScreenKey && ownerPairKey && ownerScreenKey) {
44
- setOwnership(current => {
45
- if (current?.hostScreenKey === hostScreenKey && current.ownerPairKey === ownerPairKey && current.ownerScreenKey === ownerScreenKey) {
46
- return current;
47
- }
48
- return {
49
- hostScreenKey,
50
- ownerPairKey,
51
- ownerScreenKey,
52
- status: "complete"
53
- };
54
- });
55
- return;
56
- }
57
- setOwnership(current => current ? null : current);
58
- }, []);
59
- useLayoutEffect(() => {
60
- if (!enabled || !ownership || !handoffHostName) {
61
- requestedPortalHostName.set(null);
62
- visiblePortalHostName.set(null);
63
- return;
64
- }
65
- requestedPortalHostName.set(handoffHostName);
66
- }, [enabled, handoffHostName, ownership, requestedPortalHostName, visiblePortalHostName]);
67
- useLayoutEffect(() => {
68
- return () => {
69
- requestedPortalHostName.set(null);
70
- visiblePortalHostName.set(null);
71
- };
72
- }, [requestedPortalHostName, visiblePortalHostName]);
73
- useAnimatedReaction(() => {
74
- "worklet";
22
+ const nextScreenKey = useDescriptorsStore(s => s.derivations.nextScreenKey);
23
+ const destinationScreenKey = nextScreenKey ?? currentScreenKey;
24
+ const destinationAnimationProgress = SystemStore.getValue(destinationScreenKey, "animationProgress");
25
+ const destinationClosing = AnimationStore.getValue(destinationScreenKey, "closing");
75
26
 
76
- if (!enabled) {
77
- return {
78
- hostScreenKey: null,
79
- ownerPairKey: sourcePairKey,
80
- ownerScreenKey: null,
81
- status: "clear"
82
- };
83
- }
84
- const progressAnimating = settledHostAnimating.get();
85
- const progressSettled = settledHostProgress.get();
86
- const willAnimate = settledHostWillAnimate.get();
87
- const closing = settledHostClosing.get();
88
- const isOwnedHostClosing = !!closing && !!ownership && settledHostScreenKey === ownership.hostScreenKey;
89
- if (isOwnedHostClosing && ownership) {
90
- const isClosingComplete = isHandoffHostClosingComplete({
91
- closing,
92
- progressAnimating,
93
- progressSettled,
94
- willAnimate
95
- });
96
- if (!isClosingComplete) {
97
- return ownership;
98
- }
99
- const sourceScreenKey = getSourceScreenKeyFromPairKey(ownership.ownerPairKey);
100
- return {
101
- hostScreenKey: sourceScreenKey,
102
- ownerPairKey: ownership.ownerPairKey,
103
- ownerScreenKey: sourceScreenKey,
104
- status: "complete"
105
- };
106
- }
107
- if (!sourcePairKey) {
108
- return {
109
- hostScreenKey: null,
110
- ownerPairKey: sourcePairKey,
111
- ownerScreenKey: null,
112
- status: "clear"
113
- };
114
- }
115
- return resolveBoundaryPortalOwnership({
116
- boundaryId,
117
- currentScreenKey,
118
- handoff: true,
119
- isSettledHostClosingComplete: isHandoffHostClosingComplete({
120
- closing,
121
- progressAnimating,
122
- progressSettled,
123
- willAnimate
124
- }),
125
- isSettledHostReady: progressSettled === 1 && progressAnimating === 0,
126
- pairsState: pairs.get(),
127
- settledHostScreenKey,
128
- sourcePairKey
129
- });
130
- }, (signal, previousSignal) => {
131
- "worklet";
132
-
133
- if (shallowEqual(previousSignal, signal)) {
134
- return;
135
- }
136
- if (signal.status === "pending") {
137
- canSwitchPortalHostImmediately.set(0);
138
- return;
139
- }
140
- const hostScreenKey = signal.status === "complete" ? signal.hostScreenKey : null;
141
- let previousOwnerPairKey;
142
- if (previousSignal?.status === "complete") {
143
- previousOwnerPairKey = previousSignal.ownerPairKey ?? undefined;
144
- }
145
- const canSwitchImmediately = canSwitchHandoffHostImmediately({
146
- hostScreenKey,
147
- ownerPairKey: signal.status === "complete" ? signal.ownerPairKey : undefined,
148
- previousOwnerPairKey
149
- });
150
- canSwitchPortalHostImmediately.set(canSwitchImmediately ? 1 : 0);
151
- if (canSwitchImmediately && hostScreenKey) {
152
- const hostName = createBoundaryContentPortalHostName(hostScreenKey, boundaryId);
153
- requestedPortalHostName.set(hostName);
154
- visiblePortalHostName.set(hostName);
155
- }
156
- runOnJS(updatePortalOwnership)(signal.hostScreenKey, signal.ownerPairKey, signal.ownerScreenKey ?? undefined);
157
- });
158
- useAnimatedReaction(() => {
159
- "worklet";
160
-
161
- const slot = activeSlotsMap.get()[boundaryId];
162
- const teleport = slot?.props?.teleport;
163
- const shouldTeleport = shouldAttachBoundaryPortal({
164
- enabled,
165
- teleport
166
- });
167
- const requestedName = requestedPortalHostName.get();
168
- const visibleName = visiblePortalHostName.get();
169
- const isInterpolatorReady = activeNextInterpolatorReady.get();
170
- const nextVisibleName = resolveNextVisiblePortalHostName({
171
- canSwitchImmediately: canSwitchPortalHostImmediately.get() === 1,
172
- isInterpolatorReady: isInterpolatorReady === 1,
173
- requestedName,
174
- shouldTeleport,
175
- visibleName
176
- });
177
- return {
178
- isInterpolatorReady,
179
- nextVisibleName,
180
- requestedName,
181
- shouldTeleport,
182
- teleport,
183
- visibleName
184
- };
185
- }, (state, previousState) => {
186
- "worklet";
187
-
188
- if (shallowEqual(previousState, state)) {
189
- return;
190
- }
191
- if (state.nextVisibleName !== state.visibleName) {
192
- visiblePortalHostName.set(state.nextVisibleName);
193
- }
194
- });
27
+ // `nextScreenKey` can change while the previously attached destination is
28
+ // still closing. Retain that destination's lifecycle shared values so this
29
+ // payload follows the screen that actually hosts it, not the newest route.
30
+ const attachedDestination = useSharedValue(null);
195
31
  const teleportProps = useAnimatedProps(() => {
196
32
  "worklet";
197
33
 
198
- const slot = activeSlotsMap.get()[boundaryId];
34
+ const slot = slotsMap.get()[boundaryId];
199
35
  const {
200
36
  pointerEvents: _pointerEvents,
201
37
  teleport,
202
38
  ...slotProps
203
39
  } = slot?.props ?? {};
204
- const shouldTeleport = shouldAttachBoundaryPortal({
205
- enabled,
206
- teleport
40
+ const animationProgress = destinationAnimationProgress.get();
41
+ const shouldTeleport = isTeleportEnabled(teleport);
42
+ const pairsState = pairs.get();
43
+ const enteringTargetScreenKey = shouldTeleport ? resolveEnteringHandoffTarget({
44
+ animationProgress,
45
+ boundaryId,
46
+ currentScreenKey,
47
+ pairsState,
48
+ sourcePairKey
49
+ }) : null;
50
+ if (enteringTargetScreenKey) {
51
+ // A valid entering pair is the only event that replaces the current
52
+ // attachment and its lifecycle owner.
53
+ attachedDestination.set({
54
+ animationProgress: destinationAnimationProgress,
55
+ closing: destinationClosing,
56
+ screenKey: enteringTargetScreenKey
57
+ });
58
+ }
59
+ const attached = attachedDestination.get();
60
+ const hasAttachedCloseFinished = attached !== null && hasCloseTransitionFinished({
61
+ animationProgress: attached.animationProgress.get(),
62
+ closing: attached.closing.get()
207
63
  });
208
- const visibleName = visiblePortalHostName.get();
64
+
65
+ // Missing or changing pairs do not imply a return: keep the current host
66
+ // until its own screen visually closes. At that point, target the source
67
+ // host explicitly instead of `null` so Teleport restores source dimensions.
68
+ const targetScreenKey = enteringTargetScreenKey ? enteringTargetScreenKey : shouldTeleport ? hasAttachedCloseFinished ? currentScreenKey : attached?.screenKey ?? null : null;
69
+ const targetHostName = targetScreenKey ? createBoundaryContentPortalHostName(targetScreenKey, boundaryId) : PORTAL_HOST_NAME_RESET_VALUE;
209
70
  return {
210
71
  ...slotProps,
211
- hostName: shouldTeleport && visibleName ? visibleName : PORTAL_HOST_NAME_RESET_VALUE
72
+ hostName: targetHostName
212
73
  };
213
74
  });
214
75
  return {
215
- teleportProps,
216
- visiblePortalHostName
76
+ teleportProps
217
77
  };
218
78
  };
219
79
  //# sourceMappingURL=use-boundary-content-portal-attachment.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useCallback","useLayoutEffect","useState","runOnJS","useAnimatedProps","useAnimatedReaction","useSharedValue","useDescriptorsStore","useScreenSlots","useRegisteredScreenSlots","AnimationStore","getSourceScreenKeyFromPairKey","pairs","PORTAL_HOST_NAME_RESET_VALUE","canSwitchHandoffHostImmediately","isHandoffHostClosingComplete","resolveBoundaryPortalOwnership","shallowEqual","shouldAttachBoundaryPortal","resolveNextVisiblePortalHostName","createBoundaryContentPortalHostName","useBoundaryContentPortalAttachment","boundaryId","enabled","ownScreenSlots","sourcePairKey","s","derivations","currentScreenKey","ownership","setOwnership","styleOwnerScreenKey","ownerScreenKey","ownerScreenSlots","activeScreenSlots","nextInterpolatorReady","activeNextInterpolatorReady","slotsMap","activeSlotsMap","requestedPortalHostName","visiblePortalHostName","canSwitchPortalHostImmediately","targetScreenKey","hostScreenKey","settledHostScreenKey","settledHostProgress","getValue","settledHostAnimating","settledHostWillAnimate","settledHostClosing","handoffHostName","updatePortalOwnership","ownerPairKey","current","status","set","progressAnimating","get","progressSettled","willAnimate","closing","isOwnedHostClosing","isClosingComplete","sourceScreenKey","handoff","isSettledHostClosingComplete","isSettledHostReady","pairsState","signal","previousSignal","previousOwnerPairKey","undefined","canSwitchImmediately","hostName","slot","teleport","props","shouldTeleport","requestedName","visibleName","isInterpolatorReady","nextVisibleName","state","previousState","teleportProps","pointerEvents","_pointerEvents","slotProps"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,eAAe,EAAEC,QAAQ,QAAQ,OAAO;AAC9D,SACCC,OAAO,EACPC,gBAAgB,EAChBC,mBAA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EAAE/B,8BAA8B,CAACgB,GAAG,CAAC,CAAC,KAAK,CAAC;MAChEuB,mBAAmB,EAAEA,mBAAmB,KAAK,CAAC;MAC9CF,aAAa;MACbD,cAAc;MACdE;IACD,CAAC,CAAC;IAEF,OAAO;MACNC,mBAAmB;MACnBC,eAAe;MACfH,aAAa;MACbD,cAAc;MACdF,QAAQ;MACRI;IACD,CAAC;EACF,CAAC,EACD,CAACG,KAAK,EAAEC,aAAa,KAAK;IACzB,SAAS;;IACT,IAAIlE,YAAY,CAACkE,aAAa,EAAED,KAAK,CAAC,EAAE;MACvC;IACD;IAEA,IAAIA,KAAK,CAACD,eAAe,KAAKC,KAAK,CAACH,WAAW,EAAE;MAChDvC,qBAAqB,CAACe,GAAG,CAAC2B,KAAK,CAACD,eAAe,CAAC;IACjD;EACD,CACD,CAAC;EAED,MAAMG,aAAa,GAAGhF,gBAAgB,CAAC,MAAM;IAC5C,SAAS;;IAET,MAAMsE,IAAI,GAAGpC,cAAc,CAACmB,GAAG,CAAC,CAAC,CAACnC,UAAU,CAAC;IAC7C,MAAM;MACL+D,aAAa,EAAEC,cAAc;MAC7BX,QAAQ;MACR,GAAGY;IACJ,CAAC,GAAGb,IAAI,EAAEE,KAAK,IAAI,CAAC,CAAC;IACrB,MAAMC,cAAc,GAAG3D,0BAA0B,CAAC;MACjDK,OAAO;MACPoD;IACD,CAAC,CAAC;IACF,MAAMI,WAAW,GAAGvC,qBAAqB,CAACiB,GAAG,CAAC,CAAC;IAE/C,OAAO;MACN,GAAG8B,SAAS;MACZd,QAAQ,EACPI,cAAc,IAAIE,WAAW,GAC1BA,WAAW,GACXlE;IACL,CAAC;EACF,CAAC,CAAC;EAEF,OAAO;IACNuE,aAAa;IACb5C;EACD,CAAC;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useAnimatedProps","useSharedValue","useDescriptorsStore","useScreenSlots","hasCloseTransitionFinished","AnimationStore","pairs","SystemStore","resolveEnteringHandoffTarget","PORTAL_HOST_NAME_RESET_VALUE","isTeleportEnabled","createBoundaryContentPortalHostName","useBoundaryContentPortalAttachment","boundaryId","slotsMap","sourcePairKey","s","derivations","currentScreenKey","nextScreenKey","destinationScreenKey","destinationAnimationProgress","getValue","destinationClosing","attachedDestination","teleportProps","slot","get","pointerEvents","_pointerEvents","teleport","slotProps","props","animationProgress","shouldTeleport","pairsState","enteringTargetScreenKey","set","closing","screenKey","attached","hasAttachedCloseFinished","targetScreenKey","targetHostName","hostName"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.ts"],"mappings":";;AAAA,SAECA,gBAAgB,EAChBC,cAAc,QACR,yBAAyB;AAChC,SAASC,mBAAmB,QAAQ,gDAAgD;AACpF,SAASC,cAAc,QAAQ,2CAA2C;AAC1E,SAASC,0BAA0B,QAAQ,2EAA2E;AACtH,SAASC,cAAc,QAAQ,0CAA0C;AACzE,SAASC,KAAK,QAAQ,iDAAiD;AACvE,SAASC,WAAW,QAAQ,uCAAuC;AACnE,SAASC,4BAA4B,QAAQ,+BAA+B;AAC5E,SAASC,4BAA4B,QAAQ,uBAAuB;AACpE,SAASC,iBAAiB,QAAQ,iCAAiC;AACnE,SAASC,mCAAmC,QAAQ,sBAAsB;AAY1E,OAAO,MAAMC,kCAAkC,GAAGA,CAAC;EAClDC;AACyC,CAAC,KAAK;EAC/C,MAAM;IAAEC;EAAS,CAAC,GAAGX,cAAc,CAAC,CAAC;EACrC,MAAMY,aAAa,GAAGb,mBAAmB,CAAEc,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACF,aAAa,CAAC;EAC7E,MAAMG,gBAAgB,GAAGhB,mBAAmB,CAC1Cc,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACC,gBACtB,CAAC;EACD,MAAMC,aAAa,GAAGjB,mBAAmB,CAAEc,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACE,aAAa,CAAC;EAC7E,MAAMC,oBAAoB,GAAGD,aAAa,I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CAAC;MACnDW,OAAO,EAAEE,QAAQ,CAACF,OAAO,CAACX,GAAG,CAAC;IAC/B,CAAC,CAAC;;IAEH;IACA;IACA;IACA,MAAMe,eAAe,GAAGN,uBAAuB,GAC5CA,uBAAuB,GACvBF,cAAc,GACbO,wBAAwB,GACvBvB,gBAAgB,GACfsB,QAAQ,EAAED,SAAS,IAAI,IAAK,GAC9B,IAAI;IAER,MAAMI,cAAc,GAAGD,eAAe,GACnC/B,mCAAmC,CAAC+B,eAAe,EAAE7B,UAAU,CAAC,GAChEJ,4BAA4B;IAE/B,OAAO;MACN,GAAGsB,SAAS;MACZa,QAAQ,EAAED;IACX,CAAC;EACF,CAAC,CAAC;EAEF,OAAO;IAAElB;EAAc,CAAC;AACzB,CAAC","ignoreList":[]}
@@ -8,27 +8,35 @@ import { useBoundaryContentPortalAttachment } from "./hooks/use-boundary-content
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
9
  export { BoundaryContentPortalHost } from "./components/host";
10
10
  const AnimatedNativePortal = NativePortal ? Animated.createAnimatedComponent(NativePortal) : null;
11
+ const EnabledNativePortal = AnimatedNativePortal;
11
12
  export const BoundaryContentPortal = /*#__PURE__*/memo(function BoundaryContentPortal({
12
13
  boundaryId,
13
14
  children,
14
15
  enabled
15
16
  }) {
16
- const shouldEnablePortal = enabled && boundaryId !== undefined;
17
+ if (!enabled || boundaryId === undefined || !isTeleportAvailable || !AnimatedNativePortal) {
18
+ return children;
19
+ }
20
+ return /*#__PURE__*/_jsx(EnabledBoundaryContentPortal, {
21
+ boundaryId: boundaryId,
22
+ children: children
23
+ });
24
+ });
25
+ const EnabledBoundaryContentPortal = /*#__PURE__*/memo(function EnabledBoundaryContentPortal({
26
+ boundaryId,
27
+ children
28
+ }) {
17
29
  const {
18
30
  teleportProps
19
31
  } = useBoundaryContentPortalAttachment({
20
- boundaryId: boundaryId ?? "",
21
- enabled: shouldEnablePortal
32
+ boundaryId
33
+ });
34
+ return /*#__PURE__*/_jsx(EnabledNativePortal, {
35
+ animatedProps: teleportProps,
36
+ name: boundaryId,
37
+ pointerEvents: PORTAL_POINTER_EVENTS,
38
+ style: StyleSheet.absoluteFill,
39
+ children: children
22
40
  });
23
- if (shouldEnablePortal && isTeleportAvailable && AnimatedNativePortal) {
24
- return /*#__PURE__*/_jsx(AnimatedNativePortal, {
25
- animatedProps: teleportProps,
26
- name: boundaryId,
27
- pointerEvents: PORTAL_POINTER_EVENTS,
28
- style: StyleSheet.absoluteFill,
29
- children: children
30
- });
31
- }
32
- return children;
33
41
  });
34
42
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["memo","StyleSheet","Animated","isTeleportAvailable","NativePortal","PORTAL_POINTER_EVENTS","useBoundaryContentPortalAttachment","jsx","_jsx","BoundaryContentPortalHost","AnimatedNativePortal","createAnimatedComponent","BoundaryContentPortal","boundaryId","children","enabled","shouldEnablePortal","undefined","teleportProps","animatedProps","name","pointerEvents","style","absoluteFill"],"sourceRoot":"../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-content-portal/index.tsx"],"mappings":";;AAAA,SAGCA,IAAI,QAEE,OAAO;AACd,SAASC,UAAU,QAAQ,cAAc;AACzC,OAAOC,QAAQ,MAAM,yBAAyB;AAC9C,SACCC,mBAAmB,EACnBC,YAAY,EACZC,qBAAqB,QACf,gBAAgB;AACvB,SAASC,kCAAkC,QAAQ,gDAAgD;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEpG,SAASC,yBAAyB,QAAQ,mBAAmB;AAe7D,MAAMC,oBAAoB,GAAGN,YAAY,GACtCF,QAAQ,CAACS,uBAAuB,CAChCP,YACD,CAAC,GACA,IAAI;AAEP,OAAO,MAAMQ,qBAAqB,gBAAGZ,IAAI,CAAC,SAASY,qBAAqBA,CAAC;EACxEC,UAAU;EACVC,QAAQ;EACRC;AAC2B,CAAC,EAAE;EAC9B,MAAMC,kBAAkB,GAAGD,OAAO,IAAIF,UAAU,KAAKI,SAAS;EAC9D,MAAM;IAAEC;EAAc,CAAC,GAAGZ,kCAAkC,CAAC;IAC5DO,UAAU,EAAEA,UAAU,IAAI,EAAE;IAC5BE,OAAO,EAAEC;EACV,CAAC,CAAC;EAEF,IAAIA,kBAAkB,IAAIb,mBAAmB,IAAIO,oBAAoB,EAAE;IACtE,oBACCF,IAAA,CAACE,oBAAoB;MACpBS,aAAa,EAAED,aAAc;MAC7BE,IAAI,EAAEP,UAAW;MACjBQ,aAAa,EAAEhB,qBAAsB;MACrCiB,KAAK,EAAErB,UAAU,CAACsB,YAAa;MAAAT,QAAA,EAE9BA;IAAQ,CACY,CAAC;EAEzB;EAEA,OAAOA,QAAQ;AAChB,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["memo","StyleSheet","Animated","isTeleportAvailable","NativePortal","PORTAL_POINTER_EVENTS","useBoundaryContentPortalAttachment","jsx","_jsx","BoundaryContentPortalHost","AnimatedNativePortal","createAnimatedComponent","EnabledNativePortal","BoundaryContentPortal","boundaryId","children","enabled","undefined","EnabledBoundaryContentPortal","teleportProps","animatedProps","name","pointerEvents","style","absoluteFill"],"sourceRoot":"../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-content-portal/index.tsx"],"mappings":";;AAAA,SAGCA,IAAI,QAEE,OAAO;AACd,SAASC,UAAU,QAAQ,cAAc;AACzC,OAAOC,QAAQ,MAAM,yBAAyB;AAC9C,SACCC,mBAAmB,EACnBC,YAAY,EACZC,qBAAqB,QACf,gBAAgB;AACvB,SAASC,kCAAkC,QAAQ,gDAAgD;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEpG,SAASC,yBAAyB,QAAQ,mBAAmB;AAe7D,MAAMC,oBAAoB,GAAGN,YAAY,GACtCF,QAAQ,CAACS,uBAAuB,CAChCP,YACD,CAAC,GACA,IAAI;AACP,MAAMQ,mBAAmB,GAAGF,oBAE3B;AAED,OAAO,MAAMG,qBAAqB,gBAAGb,IAAI,CAAC,SAASa,qBAAqBA,CAAC;EACxEC,UAAU;EACVC,QAAQ;EACRC;AAC2B,CAAC,EAAE;EAC9B,IACC,CAACA,OAAO,IACRF,UAAU,KAAKG,SAAS,IACxB,CAACd,mBAAmB,IACpB,CAACO,oBAAoB,EACpB;IACD,OAAOK,QAAQ;EAChB;EAEA,oBACCP,IAAA,CAACU,4BAA4B;IAACJ,UAAU,EAAEA,UAAW;IAAAC,QAAA,EACnDA;EAAQ,CACoB,CAAC;AAEjC,CAAC,CAAC;AAEF,MAAMG,4BAA4B,gBAAGlB,IAAI,CACxC,SAASkB,4BAA4BA,CAAC;EACrCJ,UAAU;EACVC;AACqE,CAAC,EAAE;EACxE,MAAM;IAAEI;EAAc,CAAC,GAAGb,kCAAkC,CAAC;IAC5DQ;EACD,CAAC,CAAC;EAEF,oBACCN,IAAA,CAACI,mBAAmB;IACnBQ,aAAa,EAAED,aAAc;IAC7BE,IAAI,EAAEP,UAAW;IACjBQ,aAAa,EAAEjB,qBAAsB;IACrCkB,KAAK,EAAEtB,UAAU,CAACuB,YAAa;IAAAT,QAAA,EAE9BA;EAAQ,CACW,CAAC;AAExB,CACD,CAAC","ignoreList":[]}
@@ -1,11 +1,10 @@
1
1
  "use strict";
2
2
 
3
- import { memo, useCallback, useLayoutEffect, useRef } from "react";
3
+ import { memo, useLayoutEffect, useRef } from "react";
4
4
  import { StyleSheet, useWindowDimensions, View } from "react-native";
5
5
  import Animated from "react-native-reanimated";
6
6
  import { useDescriptorsStore } from "../../../../../../providers/screen/descriptors";
7
7
  import { useScreenSlots } from "../../../../../../providers/screen/styles";
8
- import { SystemStore } from "../../../../../../stores/system.store";
9
8
  import { PORTAL_POINTER_EVENTS } from "../../../teleport";
10
9
  import { useHostMeasurement } from "../hooks/use-host-measurement";
11
10
  import { registerHost, unregisterHost } from "../stores/host-registry.store";
@@ -18,9 +17,6 @@ function HostImpl({
18
17
  style
19
18
  }) {
20
19
  const screenKey = useDescriptorsStore(s => s.derivations.currentScreenKey);
21
- const {
22
- unblockLifecycleStart
23
- } = SystemStore.getBag(screenKey).actions;
24
20
  const generatedHostKeyRef = useRef(null);
25
21
  if (generatedHostKeyRef.current === null) {
26
22
  generatedHostKeyRef.current = `${screenKey}-host-${nextHostId++}`;
@@ -46,7 +42,6 @@ function HostImpl({
46
42
  });
47
43
  useLayoutEffect(() => {
48
44
  registerHost({
49
- capturesScroll,
50
45
  fallback,
51
46
  hostKey,
52
47
  screenKey
@@ -54,19 +49,13 @@ function HostImpl({
54
49
  return () => {
55
50
  unregisterHost(screenKey, hostKey);
56
51
  };
57
- }, [capturesScroll, fallback, hostKey, screenKey]);
58
- const handleUnblocking = useCallback(() => {
59
- // Each destination boundary contributes one lifecycle start block. Release
60
- // only this host's block so unrelated boundary and user blocks stay intact.
61
- unblockLifecycleStart();
62
- }, [unblockLifecycleStart]);
52
+ }, [fallback, hostKey, screenKey]);
63
53
  const boundaryHosts = measurement.canRenderHosts ? activeBoundaryHosts.map(host => /*#__PURE__*/_jsx(View, {
64
54
  pointerEvents: PORTAL_POINTER_EVENTS,
65
55
  style: [styles.boundaryHostViewport, {
66
56
  width: viewportWidth,
67
57
  height: viewportHeight
68
58
  }],
69
- onLayout: handleUnblocking,
70
59
  children: /*#__PURE__*/_jsx(PortalBoundaryHost, {
71
60
  host: host,
72
61
  style: StyleSheet.absoluteFill
@@ -1 +1 @@
1
- {"version":3,"names":["memo","useCallback","useLayoutEffect","useRef","StyleSheet","useWindowDimensions","View","Animated","useDescriptorsStore","useScreenSlots","SystemStore","PORTAL_POINTER_EVENTS","useHostMeasurement","registerHost","unregisterHost","useActivePortalBoundaryHosts","PortalBoundaryHost","jsx","_jsx","nextHostId","HostImpl","fallback","style","screenKey","s","derivations","currentScreenKey","unblockLifecycleStart","getBag","actions","generatedHostKeyRef","current","hostKey","capturesScroll","activeBoundaryHosts","visibilityBlocked","height","viewportHeight","width","viewportWidth","measurement","enabled","length","handleUnblocking","boundaryHosts","canRenderHosts","map","host","pointerEvents","styles","boundaryHostViewport","onLayout","children","absoluteFill","portalHostName","ref","hostRef","collapsable","Host","props","ScreenFallbackHost","create","elevation","left","overflow","position","top","zIndex"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/components/host.tsx"],"mappings":";;AAAA,SAASA,IAAI,EAAEC,WAAW,EAAEC,eAAe,EAAEC,MAAM,QAAQ,OAAO;AAClE,SAECC,UAAU,EACVC,mBAAmB,EACnBC,IAAI,QAEE,cAAc;AACrB,OAAOC,QAAQ,MAAM,yBAAyB;AAC9C,SAASC,mBAAmB,QAAQ,gDAAgD;AACpF,SAASC,cAAc,QAAQ,2CAA2C;AAC1E,SAASC,WAAW,QAAQ,uCAAuC;AACnE,SAASC,qBAAqB,QAAQ,mBAAmB;AACzD,SAASC,kBAAkB,QAAQ,+BAA+B;AAClE,SAASC,YAAY,EAAEC,cAAc,QAAQ,+BAA+B;AAC5E,SAASC,4BAA4B,QAAQ,sCAAsC;AACnF,SAASC,kBAAkB,QAAQ,wBAAwB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE5D,IAAIC,UAAU,GAAG,CAAC;AAUlB,SAASC,QAAQA,CAAC;EAAEC,QAAQ,GAAG,KAAK;EAAEC;AAAqB,CAAC,EAAE;EAC7D,MAAMC,SAAS,GAAGf,mBAAmB,CAAEgB,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACC,gBAAgB,CAAC;EAC5E,MAAM;IAAEC;EAAsB,CAAC,GAAGjB,WAAW,CAACkB,MAAM,CAACL,SAAS,CAAC,CAACM,OAAO;EACvE,MAAMC,mBAAmB,GAAG3B,MAAM,CAAgB,IAAI,CAAC;EAEvD,IAAI2B,mBAAmB,CAACC,OAAO,KAAK,IAAI,EAAE;IACzCD,mBAAmB,CAACC,OAAO,GAAG,GAAGR,SAAS,SAASJ,UAAU,EAAE,EAAE;EAClE;EAEA,MAAMa,OAAO,GAAGX,QAAQ,GAAGE,SAAS,GAAGO,mBAAmB,CAACC,OAAO;EAClE,MAAME,cAAc,GAAG,CAACZ,QAAQ;EAChC,M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I,CAACO,cASL,CACN,CAAC,GACD,IAAI;EAEP,oBACCpC,IAAA,CAACX,QAAQ,CAACD,IAAI;IACbiD,GAAG,EAAEf,WAAW,CAACgB,OAAQ;IACzBR,aAAa,EAAErC,qBAAsB;IACrCW,KAAK,EAAE,CACN2B,MAAM,CAACF,IAAI,EACX;MAAET,KAAK,EAAEC,aAAa;MAAEH,MAAM,EAAEC;IAAe,CAAC,EAChDf,KAAK,CACJ;IACFmC,WAAW,EAAE,KAAM;IAAAL,QAAA,EAElBR;EAAa,CACA,CAAC;AAElB;AAEA,OAAO,MAAMc,IAAI,gBAAG1D,IAAI,CAAC,SAAS0D,IAAIA,CAACC,KAAsB,EAAE;EAC9D,oBAAOzC,IAAA,CAACE,QAAQ;IAAA,GAAKuC;EAAK,CAAG,CAAC;AAC/B,CAAC,CAAC;AAEF,OAAO,MAAMC,kBAAkB,gBAAG5D,IAAI,CAAC,SAAS4D,kBAAkBA,CAAA,EAAG;EACpE,oBAAO1C,IAAA,CAACE,QAAQ;IAACC,QAAQ;EAAA,CAAE,CAAC;AAC7B,CAAC,CAAC;AAEF,MAAM4B,MAAM,GAAG7C,UAAU,CAACyD,MAAM,CAAC;EAChCd,IAAI,EAAE;IACLe,SAAS,EAAE,MAAM;IACjBC,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE,SAAS;IACnBC,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,CAAC;IACNC,MAAM,EAAE;EACT,CAAC;EACDjB,oBAAoB,EAAE;IACrBa,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE,SAAS;IACnBC,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE;EACN;AACD,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["memo","useLayoutEffect","useRef","StyleSheet","useWindowDimensions","View","Animated","useDescriptorsStore","useScreenSlots","PORTAL_POINTER_EVENTS","useHostMeasurement","registerHost","unregisterHost","useActivePortalBoundaryHosts","PortalBoundaryHost","jsx","_jsx","nextHostId","HostImpl","fallback","style","screenKey","s","derivations","currentScreenKey","generatedHostKeyRef","current","hostKey","capturesScroll","activeBoundaryHosts","visibilityBlocked","height","viewportHeight","width","viewportWidth","measurement","enabled","length","boundaryHosts","canRenderHosts","map","host","pointerEvents","styles","boundaryHostViewport","children","absoluteFill","portalHostName","ref","hostRef","collapsable","Host","props","ScreenFallbackHost","create","elevation","left","overflow","position","top","zIndex"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/components/host.tsx"],"mappings":";;AAAA,SAASA,IAAI,EAAEC,eAAe,EAAEC,MAAM,QAAQ,OAAO;AACrD,SAECC,UAAU,EACVC,mBAAmB,EACnBC,IAAI,QAEE,cAAc;AACrB,OAAOC,QAAQ,MAAM,yBAAyB;AAC9C,SAASC,mBAAmB,QAAQ,gDAAgD;AACpF,SAASC,cAAc,QAAQ,2CAA2C;AAC1E,SAASC,qBAAqB,QAAQ,mBAAmB;AACzD,SAASC,kBAAkB,QAAQ,+BAA+B;AAClE,SAASC,YAAY,EAAEC,cAAc,QAAQ,+BAA+B;AAC5E,SAASC,4BAA4B,QAAQ,sCAAsC;AACnF,SAASC,kBAAkB,QAAQ,wBAAwB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE5D,IAAIC,UAAU,GAAG,CAAC;AAUlB,SAASC,QAAQA,CAAC;EAAEC,QAAQ,GAAG,KAAK;EAAEC;AAAqB,CAAC,EAAE;EAC7D,MAAMC,SAAS,GAAGd,mBAAmB,CAAEe,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACC,gBAAgB,CAAC;EAC5E,MAAMC,mBAAmB,GAAGvB,MAAM,CAAgB,IAAI,CAAC;EAEvD,IAAIuB,mBAAmB,CAACC,OAAO,KAAK,IAAI,EAAE;IACzCD,mBAAmB,CAACC,OAAO,GAAG,GAAGL,SAAS,SAASJ,UAAU,EAAE,EAAE;EAClE;EAEA,MAAMU,OAAO,GAAGR,QAAQ,GAAGE,SAAS,GAAGI,m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BP,aAAa,EAAEjC,qBAAsB;IACrCW,KAAK,EAAE,CACNuB,MAAM,CAACF,IAAI,EACX;MAAER,KAAK,EAAEC,aAAa;MAAEH,MAAM,EAAEC;IAAe,CAAC,EAChDZ,KAAK,CACJ;IACF8B,WAAW,EAAE,KAAM;IAAAL,QAAA,EAElBP;EAAa,CACA,CAAC;AAElB;AAEA,OAAO,MAAMa,IAAI,gBAAGnD,IAAI,CAAC,SAASmD,IAAIA,CAACC,KAAsB,EAAE;EAC9D,oBAAOpC,IAAA,CAACE,QAAQ;IAAA,GAAKkC;EAAK,CAAG,CAAC;AAC/B,CAAC,CAAC;AAEF,OAAO,MAAMC,kBAAkB,gBAAGrD,IAAI,CAAC,SAASqD,kBAAkBA,CAAA,EAAG;EACpE,oBAAOrC,IAAA,CAACE,QAAQ;IAACC,QAAQ;EAAA,CAAE,CAAC;AAC7B,CAAC,CAAC;AAEF,MAAMwB,MAAM,GAAGxC,UAAU,CAACmD,MAAM,CAAC;EAChCb,IAAI,EAAE;IACLc,SAAS,EAAE,MAAM;IACjBC,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE,SAAS;IACnBC,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,CAAC;IACNC,MAAM,EAAE;EACT,CAAC;EACDhB,oBAAoB,EAAE;IACrBY,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE,SAAS;IACnBC,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE;EACN;AACD,CAAC,CAAC","ignoreList":[]}
@@ -1,30 +1,48 @@
1
1
  "use strict";
2
2
 
3
- import { memo } from "react";
4
- import { StyleSheet } from "react-native";
5
- import Animated, { useAnimatedStyle } from "react-native-reanimated";
3
+ import { memo, useCallback } from "react";
4
+ import { I18nManager, StyleSheet } from "react-native";
5
+ import Animated, { useAnimatedStyle, useFrameCallback, useSharedValue } from "react-native-reanimated";
6
6
  import { NO_STYLES } from "../../../../../../constants";
7
7
  import { composeSlotStyleWithLocalTransform } from "../../../../../../providers/screen/styles/helpers/compose-slot-style";
8
- import { AnimationStore } from "../../../../../../stores/animation.store";
9
- import { getSourceScreenKeyFromPairKey } from "../../../../../../stores/bounds/helpers/link-pairs.helpers";
10
8
  import { getLink } from "../../../../../../stores/bounds/internals/links";
11
- import { getClampedScrollAxisDelta, ScrollStore } from "../../../../../../stores/scroll.store";
9
+ import { SystemStore } from "../../../../../../stores/system.store";
12
10
  import { NativePortalHost, PORTAL_POINTER_EVENTS } from "../../../teleport";
13
11
  import { hasLocalSlot } from "../helpers/has-local-slot";
14
12
  import { resolvePortalOffsetStyle } from "../helpers/offset-style";
13
+ import { getPortalHostBounds } from "../stores/host-bounds.store";
15
14
  import { jsx as _jsx } from "react/jsx-runtime";
16
15
  const AnimatedPortalBoundaryHost = NativePortalHost ? Animated.createAnimatedComponent(NativePortalHost) : null;
17
16
  export const PortalBoundaryHost = /*#__PURE__*/memo(function PortalBoundaryHost({
18
17
  host,
19
18
  style
20
19
  }) {
21
- // Cross-screen landing-rect scroll tracking: the flight interpolates toward
22
- // the source rect stored at measure time, but the source screen stays
23
- // scrollable while the pair closes (destination pointer events are
24
- // released). These are read per-frame so the landing point follows the
25
- // live source scroll instead of the stale snapshot.
26
- const sourceScrollMetadata = ScrollStore.getValue(getSourceScreenKeyFromPairKey(host.pairKey), "metadata");
27
- const hostVisualProgress = AnimationStore.getValue(host.screenKey, "visualProgress");
20
+ const geometryReadyFrames = useSharedValue(0);
21
+ const {
22
+ unblockLifecycleStart
23
+ } = SystemStore.getBag(host.screenKey).actions;
24
+ const handleFrame = useCallback(() => {
25
+ "worklet";
26
+
27
+ if (host.portalHostReady.get()) {
28
+ return;
29
+ }
30
+ const link = getLink(host.pairKey, host.boundaryId);
31
+ const hasGeometry = link?.source !== null && link !== undefined && getPortalHostBounds(host.hostKey) !== null && hasLocalSlot(host.localStylesMaps.get(), host.boundaryId);
32
+ if (!hasGeometry) {
33
+ geometryReadyFrames.set(0);
34
+ return;
35
+ }
36
+ if (geometryReadyFrames.get() === 0) {
37
+ // Give the source frame, host offset, and slot style one UI frame to
38
+ // reach native before Teleport targets this receiver.
39
+ geometryReadyFrames.set(1);
40
+ return;
41
+ }
42
+ host.portalHostReady.set(true);
43
+ unblockLifecycleStart();
44
+ }, [geometryReadyFrames, host, unblockLifecycleStart]);
45
+ useFrameCallback(handleFrame, true);
28
46
  const hostStyle = useAnimatedStyle(() => {
29
47
  "worklet";
30
48
 
@@ -36,30 +54,10 @@ export const PortalBoundaryHost = /*#__PURE__*/memo(function PortalBoundaryHost(
36
54
  }
37
55
  const sourceBounds = link.source.bounds;
38
56
  const isCrossScreenPortal = link.source.screenKey !== host.screenKey;
39
- let landingShift;
40
- if (isCrossScreenPortal) {
41
- // Weight by distance-to-landing so the destination end of the flight
42
- // stays pinned: no correction while the content sits over the
43
- // destination rect (progress 1), full correction at touchdown on the
44
- // source rect (progress 0).
45
- const landingWeight = 1 - Math.min(Math.max(hostVisualProgress.get(), 0), 1);
46
- if (landingWeight > 0) {
47
- const liveScroll = sourceScrollMetadata.get();
48
- const capturedScroll = sourceBounds.scroll ?? null;
49
-
50
- // Scroll offset grows as content moves up/left, so the rect's
51
- // on-screen position shifts by the negative delta.
52
- landingShift = {
53
- x: -getClampedScrollAxisDelta(liveScroll, capturedScroll, "horizontal") * landingWeight,
54
- y: -getClampedScrollAxisDelta(liveScroll, capturedScroll, "vertical") * landingWeight
55
- };
56
- }
57
- }
58
57
  return resolvePortalOffsetStyle({
59
58
  bounds: sourceBounds,
60
59
  hostKey: host.hostKey,
61
- placement: isCrossScreenPortal ? "cross-screen" : "same-screen",
62
- landingShift
60
+ placement: isCrossScreenPortal ? "cross-screen" : "same-screen"
63
61
  });
64
62
  });
65
63
  const contentFrameStyle = useAnimatedStyle(() => {
@@ -88,7 +86,7 @@ export const PortalBoundaryHost = /*#__PURE__*/memo(function PortalBoundaryHost(
88
86
  // cleanup frame. If the current local interpolator layers did not emit this
89
87
  // boundary id, any resolved style here is cleanup/stale residue and should
90
88
  // not be drawn by the host.
91
- if (host.escapeClipping && !hasLocalSlot(host.localStylesMaps.get(), host.boundaryId)) {
89
+ if (!hasLocalSlot(host.localStylesMaps.get(), host.boundaryId)) {
92
90
  return NO_STYLES;
93
91
  }
94
92
  const slot = host.slotsMap.get()[host.boundaryId];
@@ -111,8 +109,17 @@ export const PortalBoundaryHost = /*#__PURE__*/memo(function PortalBoundaryHost(
111
109
  })
112
110
  });
113
111
  });
112
+
113
+ // The teleport offset is a physical page delta measured from the screen's
114
+ // left edge, so the content box must anchor there too. Under native RTL,
115
+ // `left: 0` swaps to a right-edge anchor; `end: 0` is the physical left edge
116
+ // in RTL regardless of the swap setting.
114
117
  const styles = StyleSheet.create({
115
- content: {
118
+ content: I18nManager.isRTL ? {
119
+ end: 0,
120
+ position: "absolute",
121
+ top: 0
122
+ } : {
116
123
  left: 0,
117
124
  position: "absolute",
118
125
  top: 0
@@ -1 +1 @@
1
- {"version":3,"names":["memo","StyleSheet","Animated","useAnimatedStyle","NO_STYLES","composeSlotStyleWithLocalTransform","AnimationStore","getSourceScreenKeyFromPairKey","getLink","getClampedScrollAxisDelta","ScrollStore","NativePortalHost","PORTAL_POINTER_EVENTS","hasLocalSlot","resolvePortalOffsetStyle","jsx","_jsx","AnimatedPortalBoundaryHost","createAnimatedComponent","PortalBoundaryHost","host","style","sourceScrollMetadata","getValue","pairKey","hostVisualProgress","screenKey","hostStyle","link","boundaryId","source","sourceBounds","bounds","isCrossScreenPortal","landingShift","landingWeight","Math","min","max","get","liveScroll","capturedScroll","scroll","x","y","hostKey","placement","contentFrameStyle","height","width","slotStyle","escapeClipping","localStylesMaps","slot","slotsMap","undefined","boundsLocalTransform","View","pointerEvents","collapsable","children","name","portalHostName","styles","content","create","left","position","top"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAAQ,OAAO;AAC5B,SAAyBC,UAAU,QAAwB,cAAc;AACzE,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,gBAAgB,CAAC,MAAM;IACxC,SAAS;;IACT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,IACCiB,IAAI,CAAC+B,cAAc,IACnB,CAACtC,YAAY,CAACO,IAAI,CAACgC,eAAe,CAACb,GAAG,CAAC,CAAC,EAAEnB,IAAI,CAACS,UAAU,CAAC,EACzD;MACD,OAAOzB,SAAS;IACjB;IAEA,MAAMiD,IAAI,GAAGjC,IAAI,CAACkC,QAAQ,CAACf,GAAG,CAAC,CAAC,CAACnB,IAAI,CAACS,UAAU,CAAC;IAEjD,OAAOxB,kCAAkC,CACxCgD,IAAI,EAAEhC,KAAK,IAAIjB,SAAS,EACxBmD,SAAS,EACTF,IAAI,EAAEG,oBACP,CAAC;EACF,CAAC,CAAC;;EAEF;EACA;EACA,IAAI,CAACvC,0BAA0B,EAAE;IAChC,OAAO,IAAI;EACZ;EAEA,oBACCD,IAAA,CAACd,QAAQ,CAACuD,IAAI;IACbC,aAAa,EAAE9C,qBAAsB;IACrCS,KAAK,EAAE,CAACA,KAAK,EAAEM,SAAS,CAAE;IAC1BgC,WAAW,EAAE,KAAM;IAAAC,QAAA,eAEnB5C,IAAA,CAACC,0BAA0B;MAC1B4C,IAAI,EAAEzC,IAAI,CAAC0C,cAAe;MAC1BJ,aAAa,EAAE9C,qBAAsB;MACrCS,KAAK,EAAE,CAAC0C,MAAM,CAACC,OAAO,EAAEjB,iBAAiB,EAAEG,SAAS;IAAE,CACtD;EAAC,CACY,CAAC;AAElB,CAAC,CAAC;AAEF,MAAMa,MAAM,GAAG9D,UAAU,CAACgE,MAAM,CAAC;EAChCD,OAAO,EAAE;IACRE,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE;EACN;AACD,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["memo","useCallback","I18nManager","StyleSheet","Animated","useAnimatedStyle","useFrameCallback","useSharedValue","NO_STYLES","composeSlotStyleWithLocalTransform","getLink","SystemStore","NativePortalHost","PORTAL_POINTER_EVENTS","hasLocalSlot","resolvePortalOffsetStyle","getPortalHostBounds","jsx","_jsx","AnimatedPortalBoundaryHost","createAnimatedComponent","PortalBoundaryHost","host","style","geometryReadyFrames","unblockLifecycleStart","getBag","screenKey","actions","handleFrame","portalHostReady","get","link","pairKey","boundaryId","hasGeometry","source","undefined","hostKey","localStylesMaps","set","hostStyle","sourceBounds","bounds","isCrossScreenPortal","placement","contentFrameStyle","height","width","slotStyle","slot","slotsMap","boundsLocalTransform","View","pointerEvents","collapsable","children","name","portalHostName","styles","content","create","isRTL","end","position","top","left"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.tsx"],"mappings":";;AAAA,SAASA,IAAI,EAAEC,WAAW,QAAQ,OAAO;AACzC,SACCC,WAAW,EAEXC,UAAU,QAEJ,cAAc;AACrB,OAAOC,QAAQ,IACdC,gBAAgB,EAChBC,gBAAgB,EAChBC,cAAc,QACR,yBAAyB;AAChC,SAASC,SAAS,QAAQ,6BAA6B;AACvD,SAASC,kCAAkC,QAAQ,sEAAsE;AACzH,SAASC,OAAO,QAAQ,iDAAiD;AACzE,SAASC,WAAW,QAAQ,uCAAuC;AAEnE,SAASC,gBAAgB,EAAEC,qBAAqB,QAAQ,mBAAmB;AAC3E,SAASC,YAAY,QAAQ,2BAA2B;AACxD,SAASC,wBAAwB,QAAQ,yBAAyB;AAClE,SAASC,mBAAmB,QAAQ,6BAA6B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGlE,MAAMC,0BAA0B,GAAGP,gBAAgB,GAChDR,QAAQ,CAACgB,uBAAuB,CAACR,gBAAgB,CAAC,GAClD,IAAI;AAOP,OAAO,MAAMS,kBAAkB,gBAAGrB,IAAI,CAAC,SAASqB,kBAAkBA,CAAC;EAClEC,IAAI;EACJC;AACwB,CAAC,EAAE;EAC3B,MAAMC,mBAAmB,GAAGjB,cAAc,CAAC,CAAC,CAAC;EAC7C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,EAAE;IAChC,OAAO,IAAI;EACZ;EAEA,oBACCD,IAAA,CAACd,QAAQ,CAACiD,IAAI;IACbC,aAAa,EAAEzC,qBAAsB;IACrCU,KAAK,EAAE,CAACA,KAAK,EAAEkB,SAAS,CAAE;IAC1Bc,WAAW,EAAE,KAAM;IAAAC,QAAA,eAEnBtC,IAAA,CAACC,0BAA0B;MAC1BsC,IAAI,EAAEnC,IAAI,CAACoC,cAAe;MAC1BJ,aAAa,EAAEzC,qBAAsB;MACrCU,KAAK,EAAE,CAACoC,MAAM,CAACC,OAAO,EAAEd,iBAAiB,EAAEG,SAAS;IAAE,CACtD;EAAC,CACY,CAAC;AAElB,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA,MAAMU,MAAM,GAAGxD,UAAU,CAAC0D,MAAM,CAAC;EAChCD,OAAO,EAAE1D,WAAW,CAAC4D,KAAK,GACvB;IACAC,GAAG,EAAE,CAAC;IACNC,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE;EACN,CAAC,GACA;IACAC,IAAI,EAAE,CAAC;IACPF,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE;EACN;AACH,CAAC,CAAC","ignoreList":[]}
@@ -16,8 +16,7 @@ import { getPortalHostBounds } from "../stores/host-bounds.store";
16
16
  export const resolvePortalOffsetStyle = ({
17
17
  bounds,
18
18
  hostKey,
19
- placement,
20
- landingShift
19
+ placement
21
20
  }) => {
22
21
  "worklet";
23
22
 
@@ -38,9 +37,9 @@ export const resolvePortalOffsetStyle = ({
38
37
  const adjustedHostPageY = hostBounds ? hostBounds.pageY - hostSnapshotDeltaY : 0;
39
38
  return {
40
39
  transform: [{
41
- translateY: bounds.pageY - adjustedHostPageY + (landingShift?.y ?? 0)
40
+ translateY: bounds.pageY - adjustedHostPageY
42
41
  }, {
43
- translateX: bounds.pageX - adjustedHostPageX + (landingShift?.x ?? 0)
42
+ translateX: bounds.pageX - adjustedHostPageX
44
43
  }]
45
44
  };
46
45
  };