react-native-screen-transitions 4.0.0-alpha.0 → 4.0.0-alpha.2

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 (403) hide show
  1. package/lib/commonjs/animation/snap-to.js +2 -0
  2. package/lib/commonjs/animation/snap-to.js.map +1 -1
  3. package/lib/commonjs/components/boundary/components/boundary-target.js +19 -20
  4. package/lib/commonjs/components/boundary/components/boundary-target.js.map +1 -1
  5. package/lib/commonjs/components/boundary/create-boundary-component.js +16 -2
  6. package/lib/commonjs/components/boundary/create-boundary-component.js.map +1 -1
  7. package/lib/commonjs/components/boundary/hooks/lifecycles/use-refresh-boundary.js +5 -0
  8. package/lib/commonjs/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -1
  9. package/lib/commonjs/components/boundary/hooks/use-boundary-measurement.js +1 -3
  10. package/lib/commonjs/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
  11. package/lib/commonjs/components/boundary/index.js +4 -3
  12. package/lib/commonjs/components/boundary/index.js.map +1 -1
  13. package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/components/host.js +5 -1
  14. package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/components/host.js.map +1 -1
  15. package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +47 -188
  16. package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -1
  17. package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/index.js +21 -13
  18. package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/index.js.map +1 -1
  19. package/lib/commonjs/components/boundary/portal/components/boundary-portal/components/host.js +1 -12
  20. package/lib/commonjs/components/boundary/portal/components/boundary-portal/components/host.js.map +1 -1
  21. package/lib/commonjs/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +40 -33
  22. package/lib/commonjs/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
  23. package/lib/commonjs/components/boundary/portal/components/boundary-portal/helpers/offset-style.js +3 -4
  24. package/lib/commonjs/components/boundary/portal/components/boundary-portal/helpers/offset-style.js.map +1 -1
  25. package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +46 -131
  26. package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
  27. package/lib/commonjs/components/boundary/portal/components/boundary-portal/index.js +45 -9
  28. package/lib/commonjs/components/boundary/portal/components/boundary-portal/index.js.map +1 -1
  29. package/lib/commonjs/components/boundary/portal/components/boundary-portal/stores/host-registry.store.js.map +1 -1
  30. package/lib/commonjs/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js +2 -29
  31. package/lib/commonjs/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -1
  32. package/lib/commonjs/components/boundary/portal/utils/handoff-target.js +33 -0
  33. package/lib/commonjs/components/boundary/portal/utils/handoff-target.js.map +1 -0
  34. package/lib/commonjs/components/boundary/portal/utils/resolve-portal.js +19 -15
  35. package/lib/commonjs/components/boundary/portal/utils/resolve-portal.js.map +1 -1
  36. package/lib/commonjs/components/boundary/portal/utils/teleport-control.js +1 -10
  37. package/lib/commonjs/components/boundary/portal/utils/teleport-control.js.map +1 -1
  38. package/lib/commonjs/components/boundary/providers/boundary-root.provider.js +18 -36
  39. package/lib/commonjs/components/boundary/providers/boundary-root.provider.js.map +1 -1
  40. package/lib/commonjs/components/boundary/utils/refresh-signals.js +7 -0
  41. package/lib/commonjs/components/boundary/utils/refresh-signals.js.map +1 -1
  42. package/lib/commonjs/components/boundary/utils/resolve-boundary-target.js +29 -0
  43. package/lib/commonjs/components/boundary/utils/resolve-boundary-target.js.map +1 -0
  44. package/lib/commonjs/components/masked-view.js +9 -1
  45. package/lib/commonjs/components/masked-view.js.map +1 -1
  46. package/lib/commonjs/components/screen-container/layers/backdrop.js +3 -1
  47. package/lib/commonjs/components/screen-container/layers/backdrop.js.map +1 -1
  48. package/lib/commonjs/components/screen-container/layers/maybe-masked-navigation-container.js +9 -1
  49. package/lib/commonjs/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
  50. package/lib/commonjs/components/screen-lifecycle/hooks/use-transition-start-controller.js +2 -0
  51. package/lib/commonjs/components/screen-lifecycle/hooks/use-transition-start-controller.js.map +1 -1
  52. package/lib/commonjs/navigators/react-navigation/index.js +7 -8
  53. package/lib/commonjs/navigators/react-navigation/index.js.map +1 -1
  54. package/lib/commonjs/providers/helpers/measured-bounds-writes.js +4 -1
  55. package/lib/commonjs/providers/helpers/measured-bounds-writes.js.map +1 -1
  56. package/lib/commonjs/providers/screen/gestures/gestures.provider.js +2 -8
  57. package/lib/commonjs/providers/screen/gestures/gestures.provider.js.map +1 -1
  58. package/lib/commonjs/providers/screen/gestures/pan/behavior/pan-lifecycle.js +1 -0
  59. package/lib/commonjs/providers/screen/gestures/pan/behavior/pan-lifecycle.js.map +1 -1
  60. package/lib/commonjs/providers/screen/gestures/pinch/activation/use-pinch-activation.js +37 -3
  61. package/lib/commonjs/providers/screen/gestures/pinch/activation/use-pinch-activation.js.map +1 -1
  62. package/lib/commonjs/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js +1 -0
  63. package/lib/commonjs/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js.map +1 -1
  64. package/lib/commonjs/providers/screen/gestures/pinch/behavior/pinch-release.js +3 -2
  65. package/lib/commonjs/providers/screen/gestures/pinch/behavior/pinch-release.js.map +1 -1
  66. package/lib/commonjs/providers/screen/gestures/types.js.map +1 -1
  67. package/lib/commonjs/providers/screen/styles/helpers/transition-visual-state.js +42 -0
  68. package/lib/commonjs/providers/screen/styles/helpers/transition-visual-state.js.map +1 -0
  69. package/lib/commonjs/providers/screen/styles/helpers/visibility-gate.js +11 -5
  70. package/lib/commonjs/providers/screen/styles/helpers/visibility-gate.js.map +1 -1
  71. package/lib/commonjs/providers/screen/styles/hooks/use-interpolated-style-maps.js +23 -10
  72. package/lib/commonjs/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
  73. package/lib/commonjs/providers/screen/styles/hooks/use-maybe-block-visibility.js +10 -8
  74. package/lib/commonjs/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
  75. package/lib/commonjs/stores/bounds/internals/links.js +4 -4
  76. package/lib/commonjs/stores/bounds/internals/links.js.map +1 -1
  77. package/lib/commonjs/stores/scroll.store.js +20 -2
  78. package/lib/commonjs/stores/scroll.store.js.map +1 -1
  79. package/lib/commonjs/stores/system.store.js +2 -0
  80. package/lib/commonjs/stores/system.store.js.map +1 -1
  81. package/lib/commonjs/utils/animation/animate-to-progress.js +23 -1
  82. package/lib/commonjs/utils/animation/animate-to-progress.js.map +1 -1
  83. package/lib/commonjs/utils/animation/animate.js +14 -2
  84. package/lib/commonjs/utils/animation/animate.js.map +1 -1
  85. package/lib/commonjs/utils/animation/spring/spring.js +22 -2
  86. package/lib/commonjs/utils/animation/spring/spring.js.map +1 -1
  87. package/lib/commonjs/utils/animation/spring/springUtils.js +96 -0
  88. package/lib/commonjs/utils/animation/spring/springUtils.js.map +1 -1
  89. package/lib/commonjs/utils/animation/state.js +4 -0
  90. package/lib/commonjs/utils/bounds/navigation/reveal/math.js +17 -5
  91. package/lib/commonjs/utils/bounds/navigation/reveal/math.js.map +1 -1
  92. package/lib/commonjs/utils/bounds/navigation/zoom/build.js +44 -20
  93. package/lib/commonjs/utils/bounds/navigation/zoom/build.js.map +1 -1
  94. package/lib/commonjs/utils/bounds/navigation/zoom/drag.js +2 -31
  95. package/lib/commonjs/utils/bounds/navigation/zoom/drag.js.map +1 -1
  96. package/lib/commonjs/utils/bounds/navigation/zoom/helpers.js +3 -17
  97. package/lib/commonjs/utils/bounds/navigation/zoom/helpers.js.map +1 -1
  98. package/lib/module/animation/snap-to.js +2 -0
  99. package/lib/module/animation/snap-to.js.map +1 -1
  100. package/lib/module/components/boundary/components/boundary-target.js +19 -20
  101. package/lib/module/components/boundary/components/boundary-target.js.map +1 -1
  102. package/lib/module/components/boundary/create-boundary-component.js +17 -3
  103. package/lib/module/components/boundary/create-boundary-component.js.map +1 -1
  104. package/lib/module/components/boundary/hooks/lifecycles/use-refresh-boundary.js +5 -0
  105. package/lib/module/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -1
  106. package/lib/module/components/boundary/hooks/use-boundary-measurement.js +1 -3
  107. package/lib/module/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
  108. package/lib/module/components/boundary/index.js +3 -2
  109. package/lib/module/components/boundary/index.js.map +1 -1
  110. package/lib/module/components/boundary/portal/components/boundary-content-portal/components/host.js +5 -1
  111. package/lib/module/components/boundary/portal/components/boundary-content-portal/components/host.js.map +1 -1
  112. package/lib/module/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +49 -190
  113. package/lib/module/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -1
  114. package/lib/module/components/boundary/portal/components/boundary-content-portal/index.js +21 -13
  115. package/lib/module/components/boundary/portal/components/boundary-content-portal/index.js.map +1 -1
  116. package/lib/module/components/boundary/portal/components/boundary-portal/components/host.js +2 -13
  117. package/lib/module/components/boundary/portal/components/boundary-portal/components/host.js.map +1 -1
  118. package/lib/module/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +43 -36
  119. package/lib/module/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
  120. package/lib/module/components/boundary/portal/components/boundary-portal/helpers/offset-style.js +3 -4
  121. package/lib/module/components/boundary/portal/components/boundary-portal/helpers/offset-style.js.map +1 -1
  122. package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +50 -135
  123. package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
  124. package/lib/module/components/boundary/portal/components/boundary-portal/index.js +44 -9
  125. package/lib/module/components/boundary/portal/components/boundary-portal/index.js.map +1 -1
  126. package/lib/module/components/boundary/portal/components/boundary-portal/stores/host-registry.store.js.map +1 -1
  127. package/lib/module/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js +1 -27
  128. package/lib/module/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -1
  129. package/lib/module/components/boundary/portal/utils/handoff-target.js +28 -0
  130. package/lib/module/components/boundary/portal/utils/handoff-target.js.map +1 -0
  131. package/lib/module/components/boundary/portal/utils/resolve-portal.js +19 -15
  132. package/lib/module/components/boundary/portal/utils/resolve-portal.js.map +1 -1
  133. package/lib/module/components/boundary/portal/utils/teleport-control.js +0 -8
  134. package/lib/module/components/boundary/portal/utils/teleport-control.js.map +1 -1
  135. package/lib/module/components/boundary/providers/boundary-root.provider.js +19 -37
  136. package/lib/module/components/boundary/providers/boundary-root.provider.js.map +1 -1
  137. package/lib/module/components/boundary/utils/refresh-signals.js +7 -0
  138. package/lib/module/components/boundary/utils/refresh-signals.js.map +1 -1
  139. package/lib/module/components/boundary/utils/resolve-boundary-target.js +24 -0
  140. package/lib/module/components/boundary/utils/resolve-boundary-target.js.map +1 -0
  141. package/lib/module/components/masked-view.js +10 -2
  142. package/lib/module/components/masked-view.js.map +1 -1
  143. package/lib/module/components/screen-container/layers/backdrop.js +3 -1
  144. package/lib/module/components/screen-container/layers/backdrop.js.map +1 -1
  145. package/lib/module/components/screen-container/layers/maybe-masked-navigation-container.js +10 -2
  146. package/lib/module/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
  147. package/lib/module/components/screen-lifecycle/hooks/use-transition-start-controller.js +2 -0
  148. package/lib/module/components/screen-lifecycle/hooks/use-transition-start-controller.js.map +1 -1
  149. package/lib/module/navigators/react-navigation/index.js +4 -6
  150. package/lib/module/navigators/react-navigation/index.js.map +1 -1
  151. package/lib/module/providers/helpers/measured-bounds-writes.js +4 -1
  152. package/lib/module/providers/helpers/measured-bounds-writes.js.map +1 -1
  153. package/lib/module/providers/screen/gestures/gestures.provider.js +2 -8
  154. package/lib/module/providers/screen/gestures/gestures.provider.js.map +1 -1
  155. package/lib/module/providers/screen/gestures/pan/behavior/pan-lifecycle.js +1 -0
  156. package/lib/module/providers/screen/gestures/pan/behavior/pan-lifecycle.js.map +1 -1
  157. package/lib/module/providers/screen/gestures/pinch/activation/use-pinch-activation.js +35 -2
  158. package/lib/module/providers/screen/gestures/pinch/activation/use-pinch-activation.js.map +1 -1
  159. package/lib/module/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js +1 -0
  160. package/lib/module/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js.map +1 -1
  161. package/lib/module/providers/screen/gestures/pinch/behavior/pinch-release.js +3 -2
  162. package/lib/module/providers/screen/gestures/pinch/behavior/pinch-release.js.map +1 -1
  163. package/lib/module/providers/screen/gestures/types.js.map +1 -1
  164. package/lib/module/providers/screen/styles/helpers/transition-visual-state.js +35 -0
  165. package/lib/module/providers/screen/styles/helpers/transition-visual-state.js.map +1 -0
  166. package/lib/module/providers/screen/styles/helpers/visibility-gate.js +11 -5
  167. package/lib/module/providers/screen/styles/helpers/visibility-gate.js.map +1 -1
  168. package/lib/module/providers/screen/styles/hooks/use-interpolated-style-maps.js +23 -10
  169. package/lib/module/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
  170. package/lib/module/providers/screen/styles/hooks/use-maybe-block-visibility.js +10 -8
  171. package/lib/module/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
  172. package/lib/module/stores/bounds/internals/links.js +4 -4
  173. package/lib/module/stores/bounds/internals/links.js.map +1 -1
  174. package/lib/module/stores/scroll.store.js +17 -0
  175. package/lib/module/stores/scroll.store.js.map +1 -1
  176. package/lib/module/stores/system.store.js +2 -0
  177. package/lib/module/stores/system.store.js.map +1 -1
  178. package/lib/module/utils/animation/animate-to-progress.js +21 -0
  179. package/lib/module/utils/animation/animate-to-progress.js.map +1 -1
  180. package/lib/module/utils/animation/animate.js +14 -2
  181. package/lib/module/utils/animation/animate.js.map +1 -1
  182. package/lib/module/utils/animation/spring/spring.js +23 -3
  183. package/lib/module/utils/animation/spring/spring.js.map +1 -1
  184. package/lib/module/utils/animation/spring/springUtils.js +95 -0
  185. package/lib/module/utils/animation/spring/springUtils.js.map +1 -1
  186. package/lib/module/utils/animation/state.js +2 -0
  187. package/lib/module/utils/bounds/navigation/reveal/math.js +16 -5
  188. package/lib/module/utils/bounds/navigation/reveal/math.js.map +1 -1
  189. package/lib/module/utils/bounds/navigation/zoom/build.js +46 -22
  190. package/lib/module/utils/bounds/navigation/zoom/build.js.map +1 -1
  191. package/lib/module/utils/bounds/navigation/zoom/drag.js +2 -30
  192. package/lib/module/utils/bounds/navigation/zoom/drag.js.map +1 -1
  193. package/lib/module/utils/bounds/navigation/zoom/helpers.js +4 -18
  194. package/lib/module/utils/bounds/navigation/zoom/helpers.js.map +1 -1
  195. package/lib/typescript/animation/snap-to.d.ts.map +1 -1
  196. package/lib/typescript/components/boundary/components/boundary-target.d.ts +2 -1
  197. package/lib/typescript/components/boundary/components/boundary-target.d.ts.map +1 -1
  198. package/lib/typescript/components/boundary/create-boundary-component.d.ts.map +1 -1
  199. package/lib/typescript/components/boundary/hooks/lifecycles/use-refresh-boundary.d.ts.map +1 -1
  200. package/lib/typescript/components/boundary/hooks/use-boundary-measurement.d.ts +3 -4
  201. package/lib/typescript/components/boundary/hooks/use-boundary-measurement.d.ts.map +1 -1
  202. package/lib/typescript/components/boundary/index.d.ts +6 -9
  203. package/lib/typescript/components/boundary/index.d.ts.map +1 -1
  204. package/lib/typescript/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.d.ts +1 -3
  205. package/lib/typescript/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.d.ts.map +1 -1
  206. package/lib/typescript/components/boundary/portal/components/boundary-content-portal/index.d.ts.map +1 -1
  207. package/lib/typescript/components/boundary/portal/components/boundary-portal/components/host.d.ts.map +1 -1
  208. package/lib/typescript/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.d.ts.map +1 -1
  209. package/lib/typescript/components/boundary/portal/components/boundary-portal/helpers/offset-style.d.ts +1 -10
  210. package/lib/typescript/components/boundary/portal/components/boundary-portal/helpers/offset-style.d.ts.map +1 -1
  211. package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts +1 -3
  212. package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts.map +1 -1
  213. package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-placeholder-styles.d.ts +2 -2
  214. package/lib/typescript/components/boundary/portal/components/boundary-portal/index.d.ts +2 -2
  215. package/lib/typescript/components/boundary/portal/components/boundary-portal/index.d.ts.map +1 -1
  216. package/lib/typescript/components/boundary/portal/components/boundary-portal/stores/host-registry.store.d.ts +0 -1
  217. package/lib/typescript/components/boundary/portal/components/boundary-portal/stores/host-registry.store.d.ts.map +1 -1
  218. package/lib/typescript/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts +1 -10
  219. package/lib/typescript/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts.map +1 -1
  220. package/lib/typescript/components/boundary/portal/utils/handoff-target.d.ts +12 -0
  221. package/lib/typescript/components/boundary/portal/utils/handoff-target.d.ts.map +1 -0
  222. package/lib/typescript/components/boundary/portal/utils/resolve-portal.d.ts +2 -3
  223. package/lib/typescript/components/boundary/portal/utils/resolve-portal.d.ts.map +1 -1
  224. package/lib/typescript/components/boundary/portal/utils/teleport-control.d.ts +0 -4
  225. package/lib/typescript/components/boundary/portal/utils/teleport-control.d.ts.map +1 -1
  226. package/lib/typescript/components/boundary/providers/boundary-root.provider.d.ts +8 -12
  227. package/lib/typescript/components/boundary/providers/boundary-root.provider.d.ts.map +1 -1
  228. package/lib/typescript/components/boundary/utils/refresh-signals.d.ts +1 -0
  229. package/lib/typescript/components/boundary/utils/refresh-signals.d.ts.map +1 -1
  230. package/lib/typescript/components/boundary/utils/resolve-boundary-target.d.ts +12 -0
  231. package/lib/typescript/components/boundary/utils/resolve-boundary-target.d.ts.map +1 -0
  232. package/lib/typescript/components/create-transition-aware-component.d.ts +5 -6
  233. package/lib/typescript/components/create-transition-aware-component.d.ts.map +1 -1
  234. package/lib/typescript/components/masked-view.d.ts.map +1 -1
  235. package/lib/typescript/components/screen-container/layers/backdrop.d.ts.map +1 -1
  236. package/lib/typescript/components/screen-container/layers/maybe-masked-navigation-container.d.ts.map +1 -1
  237. package/lib/typescript/components/screen-lifecycle/hooks/use-transition-start-controller.d.ts.map +1 -1
  238. package/lib/typescript/index.d.ts +650 -702
  239. package/lib/typescript/index.d.ts.map +1 -1
  240. package/lib/typescript/navigators/react-navigation/index.d.ts +6 -17
  241. package/lib/typescript/navigators/react-navigation/index.d.ts.map +1 -1
  242. package/lib/typescript/providers/helpers/measured-bounds-writes.d.ts.map +1 -1
  243. package/lib/typescript/providers/screen/gestures/gestures.provider.d.ts.map +1 -1
  244. package/lib/typescript/providers/screen/gestures/pan/behavior/pan-lifecycle.d.ts.map +1 -1
  245. package/lib/typescript/providers/screen/gestures/pinch/activation/use-pinch-activation.d.ts +2 -1
  246. package/lib/typescript/providers/screen/gestures/pinch/activation/use-pinch-activation.d.ts.map +1 -1
  247. package/lib/typescript/providers/screen/gestures/pinch/behavior/pinch-lifecycle.d.ts.map +1 -1
  248. package/lib/typescript/providers/screen/gestures/pinch/behavior/pinch-release.d.ts.map +1 -1
  249. package/lib/typescript/providers/screen/gestures/types.d.ts +1 -9
  250. package/lib/typescript/providers/screen/gestures/types.d.ts.map +1 -1
  251. package/lib/typescript/providers/screen/styles/helpers/transition-visual-state.d.ts +18 -0
  252. package/lib/typescript/providers/screen/styles/helpers/transition-visual-state.d.ts.map +1 -0
  253. package/lib/typescript/providers/screen/styles/helpers/visibility-gate.d.ts +2 -2
  254. package/lib/typescript/providers/screen/styles/helpers/visibility-gate.d.ts.map +1 -1
  255. package/lib/typescript/providers/screen/styles/hooks/slot-resolvers.d.ts +4 -4
  256. package/lib/typescript/providers/screen/styles/hooks/slot-resolvers.d.ts.map +1 -1
  257. package/lib/typescript/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -1
  258. package/lib/typescript/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts +2 -2
  259. package/lib/typescript/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts.map +1 -1
  260. package/lib/typescript/stores/bounds/internals/links.d.ts +1 -1
  261. package/lib/typescript/stores/bounds/internals/links.d.ts.map +1 -1
  262. package/lib/typescript/stores/scroll.store.d.ts +7 -0
  263. package/lib/typescript/stores/scroll.store.d.ts.map +1 -1
  264. package/lib/typescript/stores/system.store.d.ts +5 -0
  265. package/lib/typescript/stores/system.store.d.ts.map +1 -1
  266. package/lib/typescript/utils/animation/animate-to-progress.d.ts +6 -1
  267. package/lib/typescript/utils/animation/animate-to-progress.d.ts.map +1 -1
  268. package/lib/typescript/utils/animation/animate.d.ts +2 -2
  269. package/lib/typescript/utils/animation/animate.d.ts.map +1 -1
  270. package/lib/typescript/utils/animation/spring/spring.d.ts +2 -2
  271. package/lib/typescript/utils/animation/spring/spring.d.ts.map +1 -1
  272. package/lib/typescript/utils/animation/spring/springUtils.d.ts +3 -0
  273. package/lib/typescript/utils/animation/spring/springUtils.d.ts.map +1 -1
  274. package/lib/typescript/utils/animation/state.d.ts +6 -0
  275. package/lib/typescript/utils/animation/state.d.ts.map +1 -1
  276. package/lib/typescript/utils/bounds/navigation/reveal/math.d.ts +9 -0
  277. package/lib/typescript/utils/bounds/navigation/reveal/math.d.ts.map +1 -1
  278. package/lib/typescript/utils/bounds/navigation/zoom/build.d.ts.map +1 -1
  279. package/lib/typescript/utils/bounds/navigation/zoom/drag.d.ts +2 -11
  280. package/lib/typescript/utils/bounds/navigation/zoom/drag.d.ts.map +1 -1
  281. package/lib/typescript/utils/bounds/navigation/zoom/helpers.d.ts +7 -4
  282. package/lib/typescript/utils/bounds/navigation/zoom/helpers.d.ts.map +1 -1
  283. package/package.json +1 -1
  284. package/src/animation/snap-to.ts +5 -0
  285. package/src/components/boundary/components/boundary-target.tsx +37 -23
  286. package/src/components/boundary/create-boundary-component.tsx +29 -3
  287. package/src/components/boundary/hooks/lifecycles/use-refresh-boundary.ts +11 -0
  288. package/src/components/boundary/hooks/use-boundary-measurement.ts +3 -9
  289. package/src/components/boundary/index.tsx +4 -8
  290. package/src/components/boundary/portal/components/boundary-content-portal/components/host.tsx +5 -1
  291. package/src/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.ts +73 -276
  292. package/src/components/boundary/portal/components/boundary-content-portal/index.tsx +31 -12
  293. package/src/components/boundary/portal/components/boundary-portal/components/host.tsx +2 -12
  294. package/src/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.tsx +64 -62
  295. package/src/components/boundary/portal/components/boundary-portal/helpers/offset-style.ts +2 -9
  296. package/src/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts +73 -187
  297. package/src/components/boundary/portal/components/boundary-portal/index.tsx +72 -12
  298. package/src/components/boundary/portal/components/boundary-portal/stores/host-registry.store.ts +0 -1
  299. package/src/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.ts +2 -39
  300. package/src/components/boundary/portal/utils/handoff-target.ts +48 -0
  301. package/src/components/boundary/portal/utils/resolve-portal.ts +26 -18
  302. package/src/components/boundary/portal/utils/teleport-control.ts +0 -12
  303. package/src/components/boundary/providers/boundary-root.provider.tsx +28 -80
  304. package/src/components/boundary/utils/refresh-signals.ts +8 -0
  305. package/src/components/boundary/utils/resolve-boundary-target.tsx +39 -0
  306. package/src/components/masked-view.tsx +20 -4
  307. package/src/components/screen-container/layers/backdrop.tsx +3 -1
  308. package/src/components/screen-container/layers/maybe-masked-navigation-container.tsx +14 -4
  309. package/src/components/screen-lifecycle/hooks/use-transition-start-controller.ts +2 -0
  310. package/src/navigators/react-navigation/index.tsx +4 -48
  311. package/src/providers/helpers/measured-bounds-writes.ts +1 -0
  312. package/src/providers/screen/gestures/gestures.provider.tsx +2 -10
  313. package/src/providers/screen/gestures/pan/behavior/pan-lifecycle.ts +1 -0
  314. package/src/providers/screen/gestures/pinch/activation/use-pinch-activation.ts +74 -3
  315. package/src/providers/screen/gestures/pinch/behavior/pinch-lifecycle.ts +1 -0
  316. package/src/providers/screen/gestures/pinch/behavior/pinch-release.ts +2 -4
  317. package/src/providers/screen/gestures/types.ts +0 -14
  318. package/src/providers/screen/styles/helpers/transition-visual-state.ts +44 -0
  319. package/src/providers/screen/styles/helpers/visibility-gate.ts +17 -7
  320. package/src/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +30 -15
  321. package/src/providers/screen/styles/hooks/use-maybe-block-visibility.tsx +14 -13
  322. package/src/stores/bounds/internals/links.ts +13 -2
  323. package/src/stores/scroll.store.ts +23 -0
  324. package/src/stores/system.store.ts +8 -0
  325. package/src/utils/animation/animate-to-progress.ts +59 -28
  326. package/src/utils/animation/animate.ts +18 -2
  327. package/src/utils/animation/spring/spring.ts +36 -1
  328. package/src/utils/animation/spring/springUtils.ts +130 -0
  329. package/src/utils/animation/state.ts +8 -0
  330. package/src/utils/bounds/navigation/reveal/math.ts +21 -5
  331. package/src/utils/bounds/navigation/zoom/build.ts +77 -23
  332. package/src/utils/bounds/navigation/zoom/drag.ts +3 -42
  333. package/src/utils/bounds/navigation/zoom/helpers.ts +9 -23
  334. package/lib/commonjs/components/boundary/hooks/use-register-target.js +0 -32
  335. package/lib/commonjs/components/boundary/hooks/use-register-target.js.map +0 -1
  336. package/lib/commonjs/components/boundary/portal/components/boundary-portal/components/portal-slot.js +0 -52
  337. package/lib/commonjs/components/boundary/portal/components/boundary-portal/components/portal-slot.js.map +0 -1
  338. package/lib/commonjs/components/boundary/portal/utils/ownership.js +0 -220
  339. package/lib/commonjs/components/boundary/portal/utils/ownership.js.map +0 -1
  340. package/lib/commonjs/components/boundary/portal/utils/shallow-equal.js +0 -29
  341. package/lib/commonjs/components/boundary/portal/utils/shallow-equal.js.map +0 -1
  342. package/lib/commonjs/components/boundary/portal/utils/visible-host.js +0 -25
  343. package/lib/commonjs/components/boundary/portal/utils/visible-host.js.map +0 -1
  344. package/lib/commonjs/providers/screen/gestures/rotation/activation/use-rotation-activation.js +0 -64
  345. package/lib/commonjs/providers/screen/gestures/rotation/activation/use-rotation-activation.js.map +0 -1
  346. package/lib/commonjs/providers/screen/gestures/rotation/behavior/rotation-lifecycle.js +0 -21
  347. package/lib/commonjs/providers/screen/gestures/rotation/behavior/rotation-lifecycle.js.map +0 -1
  348. package/lib/commonjs/providers/screen/gestures/rotation/behavior/use-rotation-behavior.js +0 -29
  349. package/lib/commonjs/providers/screen/gestures/rotation/behavior/use-rotation-behavior.js.map +0 -1
  350. package/lib/commonjs/providers/screen/gestures/rotation/use-build-rotation-gesture.js +0 -38
  351. package/lib/commonjs/providers/screen/gestures/rotation/use-build-rotation-gesture.js.map +0 -1
  352. package/lib/commonjs/providers/screen/styles/helpers/opening-phase.js +0 -32
  353. package/lib/commonjs/providers/screen/styles/helpers/opening-phase.js.map +0 -1
  354. package/lib/module/components/boundary/hooks/use-register-target.js +0 -27
  355. package/lib/module/components/boundary/hooks/use-register-target.js.map +0 -1
  356. package/lib/module/components/boundary/portal/components/boundary-portal/components/portal-slot.js +0 -47
  357. package/lib/module/components/boundary/portal/components/boundary-portal/components/portal-slot.js.map +0 -1
  358. package/lib/module/components/boundary/portal/utils/ownership.js +0 -213
  359. package/lib/module/components/boundary/portal/utils/ownership.js.map +0 -1
  360. package/lib/module/components/boundary/portal/utils/shallow-equal.js +0 -24
  361. package/lib/module/components/boundary/portal/utils/shallow-equal.js.map +0 -1
  362. package/lib/module/components/boundary/portal/utils/visible-host.js +0 -20
  363. package/lib/module/components/boundary/portal/utils/visible-host.js.map +0 -1
  364. package/lib/module/providers/screen/gestures/rotation/activation/use-rotation-activation.js +0 -59
  365. package/lib/module/providers/screen/gestures/rotation/activation/use-rotation-activation.js.map +0 -1
  366. package/lib/module/providers/screen/gestures/rotation/behavior/rotation-lifecycle.js +0 -15
  367. package/lib/module/providers/screen/gestures/rotation/behavior/rotation-lifecycle.js.map +0 -1
  368. package/lib/module/providers/screen/gestures/rotation/behavior/use-rotation-behavior.js +0 -24
  369. package/lib/module/providers/screen/gestures/rotation/behavior/use-rotation-behavior.js.map +0 -1
  370. package/lib/module/providers/screen/gestures/rotation/use-build-rotation-gesture.js +0 -33
  371. package/lib/module/providers/screen/gestures/rotation/use-build-rotation-gesture.js.map +0 -1
  372. package/lib/module/providers/screen/styles/helpers/opening-phase.js +0 -26
  373. package/lib/module/providers/screen/styles/helpers/opening-phase.js.map +0 -1
  374. package/lib/typescript/components/boundary/hooks/use-register-target.d.ts +0 -10
  375. package/lib/typescript/components/boundary/hooks/use-register-target.d.ts.map +0 -1
  376. package/lib/typescript/components/boundary/portal/components/boundary-portal/components/portal-slot.d.ts +0 -13
  377. package/lib/typescript/components/boundary/portal/components/boundary-portal/components/portal-slot.d.ts.map +0 -1
  378. package/lib/typescript/components/boundary/portal/utils/ownership.d.ts +0 -34
  379. package/lib/typescript/components/boundary/portal/utils/ownership.d.ts.map +0 -1
  380. package/lib/typescript/components/boundary/portal/utils/shallow-equal.d.ts +0 -8
  381. package/lib/typescript/components/boundary/portal/utils/shallow-equal.d.ts.map +0 -1
  382. package/lib/typescript/components/boundary/portal/utils/visible-host.d.ts +0 -8
  383. package/lib/typescript/components/boundary/portal/utils/visible-host.d.ts.map +0 -1
  384. package/lib/typescript/providers/screen/gestures/rotation/activation/use-rotation-activation.d.ts +0 -15
  385. package/lib/typescript/providers/screen/gestures/rotation/activation/use-rotation-activation.d.ts.map +0 -1
  386. package/lib/typescript/providers/screen/gestures/rotation/behavior/rotation-lifecycle.d.ts +0 -4
  387. package/lib/typescript/providers/screen/gestures/rotation/behavior/rotation-lifecycle.d.ts.map +0 -1
  388. package/lib/typescript/providers/screen/gestures/rotation/behavior/use-rotation-behavior.d.ts +0 -5
  389. package/lib/typescript/providers/screen/gestures/rotation/behavior/use-rotation-behavior.d.ts.map +0 -1
  390. package/lib/typescript/providers/screen/gestures/rotation/use-build-rotation-gesture.d.ts +0 -9
  391. package/lib/typescript/providers/screen/gestures/rotation/use-build-rotation-gesture.d.ts.map +0 -1
  392. package/lib/typescript/providers/screen/styles/helpers/opening-phase.d.ts +0 -16
  393. package/lib/typescript/providers/screen/styles/helpers/opening-phase.d.ts.map +0 -1
  394. package/src/components/boundary/hooks/use-register-target.ts +0 -43
  395. package/src/components/boundary/portal/components/boundary-portal/components/portal-slot.tsx +0 -80
  396. package/src/components/boundary/portal/utils/ownership.ts +0 -319
  397. package/src/components/boundary/portal/utils/shallow-equal.ts +0 -25
  398. package/src/components/boundary/portal/utils/visible-host.ts +0 -24
  399. package/src/providers/screen/gestures/rotation/activation/use-rotation-activation.ts +0 -88
  400. package/src/providers/screen/gestures/rotation/behavior/rotation-lifecycle.ts +0 -19
  401. package/src/providers/screen/gestures/rotation/behavior/use-rotation-behavior.ts +0 -47
  402. package/src/providers/screen/gestures/rotation/use-build-rotation-gesture.ts +0 -50
  403. package/src/providers/screen/styles/helpers/opening-phase.ts +0 -25
@@ -4,221 +4,80 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useBoundaryContentPortalAttachment = void 0;
7
- var _react = require("react");
8
7
  var _reactNativeReanimated = require("react-native-reanimated");
9
- var _reactNativeWorklets = require("react-native-worklets");
10
8
  var _descriptors = require("../../../../../../providers/screen/descriptors");
11
9
  var _styles = require("../../../../../../providers/screen/styles");
12
- var _slotReferences = require("../../../../../../providers/screen/styles/stores/slot-references.store");
10
+ var _transitionVisualState = require("../../../../../../providers/screen/styles/helpers/transition-visual-state");
13
11
  var _animation = require("../../../../../../stores/animation.store");
14
- var _linkPairs = require("../../../../../../stores/bounds/helpers/link-pairs.helpers");
15
12
  var _state = require("../../../../../../stores/bounds/internals/state");
13
+ var _system = require("../../../../../../stores/system.store");
14
+ var _handoffTarget = require("../../../utils/handoff-target");
16
15
  var _naming = require("../../../utils/naming");
17
- var _ownership = require("../../../utils/ownership");
18
- var _shallowEqual = require("../../../utils/shallow-equal");
19
16
  var _teleportControl = require("../../../utils/teleport-control");
20
- var _visibleHost = require("../../../utils/visible-host");
21
17
  var _hostName = require("../helpers/host-name");
22
18
  const useBoundaryContentPortalAttachment = ({
23
- boundaryId,
24
- enabled
19
+ boundaryId
25
20
  }) => {
26
- const ownScreenSlots = (0, _styles.useScreenSlots)();
21
+ const {
22
+ slotsMap
23
+ } = (0, _styles.useScreenSlots)();
27
24
  const sourcePairKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.sourcePairKey);
28
25
  const currentScreenKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.currentScreenKey);
29
- const [ownership, setOwnership] = (0, _react.useState)(null);
30
- const styleOwnerScreenKey = ownership?.ownerScreenKey ?? currentScreenKey;
31
- const ownerScreenSlots = (0, _slotReferences.useRegisteredScreenSlots)(styleOwnerScreenKey);
32
- const activeScreenSlots = ownerScreenSlots ?? ownScreenSlots;
33
- const {
34
- nextInterpolatorReady: activeNextInterpolatorReady,
35
- slotsMap: activeSlotsMap
36
- } = activeScreenSlots;
37
- const requestedPortalHostName = (0, _reactNativeReanimated.useSharedValue)(null);
38
- const visiblePortalHostName = (0, _reactNativeReanimated.useSharedValue)(null);
39
- const canSwitchPortalHostImmediately = (0, _reactNativeReanimated.useSharedValue)(0);
40
- const targetScreenKey = ownership ? ownership.hostScreenKey : null;
41
- const settledHostScreenKey = ownership?.hostScreenKey ?? null;
42
- const settledHostProgress = _animation.AnimationStore.getValue(settledHostScreenKey ?? currentScreenKey, "progressSettled");
43
- const settledHostAnimating = _animation.AnimationStore.getValue(settledHostScreenKey ?? currentScreenKey, "progressAnimating");
44
- const settledHostWillAnimate = _animation.AnimationStore.getValue(settledHostScreenKey ?? currentScreenKey, "willAnimate");
45
- const settledHostClosing = _animation.AnimationStore.getValue(settledHostScreenKey ?? currentScreenKey, "closing");
46
- const handoffHostName = targetScreenKey !== null ? (0, _hostName.createBoundaryContentPortalHostName)(targetScreenKey, boundaryId) : null;
47
- const updatePortalOwnership = (0, _react.useCallback)((hostScreenKey, ownerPairKey, ownerScreenKey) => {
48
- if (hostScreenKey && ownerPairKey && ownerScreenKey) {
49
- setOwnership(current => {
50
- if (current?.hostScreenKey === hostScreenKey && current.ownerPairKey === ownerPairKey && current.ownerScreenKey === ownerScreenKey) {
51
- return current;
52
- }
53
- return {
54
- hostScreenKey,
55
- ownerPairKey,
56
- ownerScreenKey,
57
- status: "complete"
58
- };
59
- });
60
- return;
61
- }
62
- setOwnership(current => current ? null : current);
63
- }, []);
64
- (0, _react.useLayoutEffect)(() => {
65
- if (!enabled || !ownership || !handoffHostName) {
66
- requestedPortalHostName.set(null);
67
- visiblePortalHostName.set(null);
68
- return;
69
- }
70
- requestedPortalHostName.set(handoffHostName);
71
- }, [enabled, handoffHostName, ownership, requestedPortalHostName, visiblePortalHostName]);
72
- (0, _react.useLayoutEffect)(() => {
73
- return () => {
74
- requestedPortalHostName.set(null);
75
- visiblePortalHostName.set(null);
76
- };
77
- }, [requestedPortalHostName, visiblePortalHostName]);
78
- (0, _reactNativeReanimated.useAnimatedReaction)(() => {
79
- "worklet";
26
+ const nextScreenKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.nextScreenKey);
27
+ const destinationScreenKey = nextScreenKey ?? currentScreenKey;
28
+ const destinationAnimationProgress = _system.SystemStore.getValue(destinationScreenKey, "animationProgress");
29
+ const destinationClosing = _animation.AnimationStore.getValue(destinationScreenKey, "closing");
80
30
 
81
- if (!enabled) {
82
- return {
83
- hostScreenKey: null,
84
- ownerPairKey: sourcePairKey,
85
- ownerScreenKey: null,
86
- status: "clear"
87
- };
88
- }
89
- const progressAnimating = settledHostAnimating.get();
90
- const progressSettled = settledHostProgress.get();
91
- const willAnimate = settledHostWillAnimate.get();
92
- const closing = settledHostClosing.get();
93
- const isOwnedHostClosing = !!closing && !!ownership && settledHostScreenKey === ownership.hostScreenKey;
94
- if (isOwnedHostClosing && ownership) {
95
- const isClosingComplete = (0, _ownership.isHandoffHostClosingComplete)({
96
- closing,
97
- progressAnimating,
98
- progressSettled,
99
- willAnimate
100
- });
101
- if (!isClosingComplete) {
102
- return ownership;
103
- }
104
- const sourceScreenKey = (0, _linkPairs.getSourceScreenKeyFromPairKey)(ownership.ownerPairKey);
105
- return {
106
- hostScreenKey: sourceScreenKey,
107
- ownerPairKey: ownership.ownerPairKey,
108
- ownerScreenKey: sourceScreenKey,
109
- status: "complete"
110
- };
111
- }
112
- if (!sourcePairKey) {
113
- return {
114
- hostScreenKey: null,
115
- ownerPairKey: sourcePairKey,
116
- ownerScreenKey: null,
117
- status: "clear"
118
- };
119
- }
120
- return (0, _ownership.resolveBoundaryPortalOwnership)({
121
- boundaryId,
122
- currentScreenKey,
123
- handoff: true,
124
- isSettledHostClosingComplete: (0, _ownership.isHandoffHostClosingComplete)({
125
- closing,
126
- progressAnimating,
127
- progressSettled,
128
- willAnimate
129
- }),
130
- isSettledHostReady: progressSettled === 1 && progressAnimating === 0,
131
- pairsState: _state.pairs.get(),
132
- settledHostScreenKey,
133
- sourcePairKey
134
- });
135
- }, (signal, previousSignal) => {
136
- "worklet";
137
-
138
- if ((0, _shallowEqual.shallowEqual)(previousSignal, signal)) {
139
- return;
140
- }
141
- if (signal.status === "pending") {
142
- canSwitchPortalHostImmediately.set(0);
143
- return;
144
- }
145
- const hostScreenKey = signal.status === "complete" ? signal.hostScreenKey : null;
146
- let previousOwnerPairKey;
147
- if (previousSignal?.status === "complete") {
148
- previousOwnerPairKey = previousSignal.ownerPairKey ?? undefined;
149
- }
150
- const canSwitchImmediately = (0, _ownership.canSwitchHandoffHostImmediately)({
151
- hostScreenKey,
152
- ownerPairKey: signal.status === "complete" ? signal.ownerPairKey : undefined,
153
- previousOwnerPairKey
154
- });
155
- canSwitchPortalHostImmediately.set(canSwitchImmediately ? 1 : 0);
156
- if (canSwitchImmediately && hostScreenKey) {
157
- const hostName = (0, _hostName.createBoundaryContentPortalHostName)(hostScreenKey, boundaryId);
158
- requestedPortalHostName.set(hostName);
159
- visiblePortalHostName.set(hostName);
160
- }
161
- (0, _reactNativeWorklets.scheduleOnRN)(updatePortalOwnership, signal.hostScreenKey, signal.ownerPairKey, signal.ownerScreenKey ?? undefined);
162
- });
163
- (0, _reactNativeReanimated.useAnimatedReaction)(() => {
164
- "worklet";
165
-
166
- const slot = activeSlotsMap.get()[boundaryId];
167
- const teleport = slot?.props?.teleport;
168
- const shouldTeleport = (0, _teleportControl.shouldAttachBoundaryPortal)({
169
- enabled,
170
- teleport
171
- });
172
- const requestedName = requestedPortalHostName.get();
173
- const visibleName = visiblePortalHostName.get();
174
- const isInterpolatorReady = activeNextInterpolatorReady.get();
175
- const nextVisibleName = (0, _visibleHost.resolveNextVisiblePortalHostName)({
176
- canSwitchImmediately: canSwitchPortalHostImmediately.get() === 1,
177
- isInterpolatorReady: isInterpolatorReady === 1,
178
- requestedName,
179
- shouldTeleport,
180
- visibleName
181
- });
182
- return {
183
- isInterpolatorReady,
184
- nextVisibleName,
185
- requestedName,
186
- shouldTeleport,
187
- teleport,
188
- visibleName
189
- };
190
- }, (state, previousState) => {
191
- "worklet";
192
-
193
- if ((0, _shallowEqual.shallowEqual)(previousState, state)) {
194
- return;
195
- }
196
- if (state.nextVisibleName !== state.visibleName) {
197
- visiblePortalHostName.set(state.nextVisibleName);
198
- }
199
- });
31
+ // `nextScreenKey` can change while the previously attached destination is
32
+ // still closing. Retain that destination's lifecycle shared values so this
33
+ // payload follows the screen that actually hosts it, not the newest route.
34
+ const attachedDestination = (0, _reactNativeReanimated.useSharedValue)(null);
200
35
  const teleportProps = (0, _reactNativeReanimated.useAnimatedProps)(() => {
201
36
  "worklet";
202
37
 
203
- const slot = activeSlotsMap.get()[boundaryId];
38
+ const slot = slotsMap.get()[boundaryId];
204
39
  const {
205
40
  pointerEvents: _pointerEvents,
206
41
  teleport,
207
42
  ...slotProps
208
43
  } = slot?.props ?? {};
209
- const shouldTeleport = (0, _teleportControl.shouldAttachBoundaryPortal)({
210
- enabled,
211
- teleport
44
+ const animationProgress = destinationAnimationProgress.get();
45
+ const shouldTeleport = (0, _teleportControl.isTeleportEnabled)(teleport);
46
+ const pairsState = _state.pairs.get();
47
+ const enteringTargetScreenKey = shouldTeleport ? (0, _handoffTarget.resolveEnteringHandoffTarget)({
48
+ animationProgress,
49
+ boundaryId,
50
+ currentScreenKey,
51
+ pairsState,
52
+ sourcePairKey
53
+ }) : null;
54
+ if (enteringTargetScreenKey) {
55
+ // A valid entering pair is the only event that replaces the current
56
+ // attachment and its lifecycle owner.
57
+ attachedDestination.set({
58
+ animationProgress: destinationAnimationProgress,
59
+ closing: destinationClosing,
60
+ screenKey: enteringTargetScreenKey
61
+ });
62
+ }
63
+ const attached = attachedDestination.get();
64
+ const hasAttachedCloseFinished = attached !== null && (0, _transitionVisualState.hasCloseTransitionFinished)({
65
+ animationProgress: attached.animationProgress.get(),
66
+ closing: attached.closing.get()
212
67
  });
213
- const visibleName = visiblePortalHostName.get();
68
+
69
+ // Missing or changing pairs do not imply a return: keep the current host
70
+ // until its own screen visually closes. At that point, target the source
71
+ // host explicitly instead of `null` so Teleport restores source dimensions.
72
+ const targetScreenKey = enteringTargetScreenKey ? enteringTargetScreenKey : shouldTeleport ? hasAttachedCloseFinished ? currentScreenKey : attached?.screenKey ?? null : null;
73
+ const targetHostName = targetScreenKey ? (0, _hostName.createBoundaryContentPortalHostName)(targetScreenKey, boundaryId) : _naming.PORTAL_HOST_NAME_RESET_VALUE;
214
74
  return {
215
75
  ...slotProps,
216
- hostName: shouldTeleport && visibleName ? visibleName : _naming.PORTAL_HOST_NAME_RESET_VALUE
76
+ hostName: targetHostName
217
77
  };
218
78
  });
219
79
  return {
220
- teleportProps,
221
- visiblePortalHostName
80
+ teleportProps
222
81
  };
223
82
  };
224
83
  exports.useBoundaryContentPortalAttachment = useBoundaryContentPortalAttachment;
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_reactNativeReanimated","_reactNativeWorklets","_descriptors","_styles","_slotReferences","_animation","_linkPairs","_state","_naming","_ownership","_shallowEqual","_teleportControl","_visibleHost","_hostName","useBoundaryContentPortalAttachment","boundaryId","enabled","ownScreenSlots","useScreenSlots","sourcePairKey","useDescriptorsStore","s","derivations","currentScreenKey","ownership","setOwnership","useState","styleOwnerScreenKey","ownerScreenKey","ownerScreenSlots","useRegisteredScreenSlots","activeScreenSlots","nextInterpolatorReady","activeNextInterpolatorReady","slotsMap","activeSlotsMap","requestedPortalHostName","useSharedValue","visiblePortalHostName","canSwitchPortalHostImmediately","targetScreenKey","hostScreenKey","settledHostScreenKey","settledHostProgress","AnimationStore","getValue","settledHostAnimating","settledHostWillAnimate","settledHostClosing","handoffHostName","createBoundaryContentPortalHostName","updatePortalOwnership","useCallback","ownerPairKey","current","status","useLayoutEffect","set","useAnimatedReaction","progressAnimating","get","progressSettled","willAnimate","closing","isOwnedHostClosing","isClosingComplete","isHandoffHostClosingComplete","sourceScreenKey","getSourceScreenKeyFromPairKey","resolveBoundaryPortalOwnership","handoff","isSettledHostClosingComplete","isSettledHostReady","pairsState","pairs","signal","previousSignal","shallowEqual","previousOwnerPairKey","undefined","canSwitchImmediately","canSwitchHandoffHostImmediately","hostName","scheduleOnRN","slot","teleport","props","shouldTeleport","shouldAttachBoundaryPortal","requestedName","visibleName","isInterpolatorReady","nextVisibleName","resolveNextVisiblePortalHostName","state","previousState","teleportProps","useAnimatedProps","pointerEvents","_pointerEvents","slotProps","PORTAL_HOST_NAME_RESET_VALUE","exports"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AAKA,IAAAE,oBAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GA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AAC,KAAK,CAAC;MAChE+B,mBAAmB,EAAEA,mBAAmB,KAAK,CAAC;MAC9CF,aAAa;MACbF,cAAc;MACdG;IACD,CAAC,CAAC;IAEF,OAAO;MACNC,mBAAmB;MACnBC,eAAe;MACfH,aAAa;MACbF,cAAc;MACdF,QAAQ;MACRK;IACD,CAAC;EACF,CAAC,EACD,CAACI,KAAK,EAAEC,aAAa,KAAK;IACzB,SAAS;;IACT,IAAI,IAAAlB,0BAAY,EAACkB,aAAa,EAAED,KAAK,CAAC,EAAE;MACvC;IACD;IAEA,IAAIA,KAAK,CAACF,eAAe,KAAKE,KAAK,CAACJ,WAAW,EAAE;MAChDpD,qBAAqB,CAACmB,GAAG,CAACqC,KAAK,CAACF,eAAe,CAAC;IACjD;EACD,CACD,CAAC;EAED,MAAMI,aAAa,GAAG,IAAAC,uCAAgB,EAAC,MAAM;IAC5C,SAAS;;IAET,MAAMb,IAAI,GAAGjD,cAAc,CAACyB,GAAG,CAAC,CAAC,CAAC7C,UAAU,CAAC;IAC7C,MAAM;MACLmF,aAAa,EAAEC,cAAc;MAC7Bd,QAAQ;MACR,GAAGe;IACJ,CAAC,GAAGhB,IAAI,EAAEE,KAAK,IAAI,CAAC,CAAC;IACrB,MAAMC,cAAc,GAAG,IAAAC,2CAA0B,EAAC;MACjDxE,OAAO;MACPqE;IACD,CAAC,CAAC;IACF,MAAMK,WAAW,GAAGpD,qBAAqB,CAACsB,GAAG,CAAC,CAAC;IAE/C,OAAO;MACN,GAAGwC,SAAS;MACZlB,QAAQ,EACPK,cAAc,IAAIG,WAAW,GAC1BA,WAAW,GACXW;IACL,CAAC;EACF,CAAC,CAAC;EAEF,OAAO;IACNL,aAAa;IACb1D;EACD,CAAC;AACF,CAAC;AAACgE,OAAA,CAAAxF,kCAAA,GAAAA,kCAAA","ignoreList":[]}
1
+ {"version":3,"names":["_reactNativeReanimated","require","_descriptors","_styles","_transitionVisualState","_animation","_state","_system","_handoffTarget","_naming","_teleportControl","_hostName","useBoundaryContentPortalAttachment","boundaryId","slotsMap","useScreenSlots","sourcePairKey","useDescriptorsStore","s","derivations","currentScreenKey","nextScreenKey","destinationScreenKey","destinationAnimationProgress","SystemStore","getValue","destinationClosing","AnimationStore","attachedDestination","useSharedValue","teleportProps","useAnimatedProps","slot","get","pointerEvents","_pointerEvents","teleport","slotProps","props","animationProgress","shouldTeleport","isTeleportEnabled","pairsState","pairs","enteringTargetScreenKey","resolveEnteringHandoffTarget","set","closing","screenKey","attached","hasAttachedCloseFinished","hasCloseTransitionFinished","targetScreenKey","targetHostName","createBoundaryContentPortalHostName","PORTAL_HOST_NAME_RESET_VALUE","hostName","exports"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,sBAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,cAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AACA,IAAAS,gBAAA,GAAAT,OAAA;AACA,IAAAU,SAAA,GAAAV,OAAA;AAYO,MAAMW,kCAAkC,GAAGA,CAAC;EAClDC;AACyC,CAAC,KAAK;EAC/C,MAAM;IAAEC;EAAS,CAAC,GAAG,IAAAC,sBAAc,EAAC,CAAC;EACrC,MAAMC,aAAa,GAAG,IAAAC,gCAAmB,EAAEC,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACH,aAAa,CAAC;EAC7E,MAAMI,gBAAgB,GAAG,IAAAH,gCAAmB,EAC1CC,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACC,gBACtB,CAAC;EACD,MAAMC,aAAa,GAAG,IAAAJ,gCAAmB,EAAEC,CAAC,IAA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AK,IAAI,IACjB,IAAAE,iDAA0B,EAAC;MAC1BZ,iBAAiB,EAAEU,QAAQ,CAACV,iBAAiB,CAACN,GAAG,CAAC,CAAC;MACnDc,OAAO,EAAEE,QAAQ,CAACF,OAAO,CAACd,GAAG,CAAC;IAC/B,CAAC,CAAC;;IAEH;IACA;IACA;IACA,MAAMmB,eAAe,GAAGR,uBAAuB,GAC5CA,uBAAuB,GACvBJ,cAAc,GACbU,wBAAwB,GACvB9B,gBAAgB,GACf6B,QAAQ,EAAED,SAAS,IAAI,IAAK,GAC9B,IAAI;IAER,MAAMK,cAAc,GAAGD,eAAe,GACnC,IAAAE,6CAAmC,EAACF,eAAe,EAAEvC,UAAU,CAAC,GAChE0C,oCAA4B;IAE/B,OAAO;MACN,GAAGlB,SAAS;MACZmB,QAAQ,EAAEH;IACX,CAAC;EACF,CAAC,CAAC;EAEF,OAAO;IAAEvB;EAAc,CAAC;AACzB,CAAC;AAAC2B,OAAA,CAAA7C,kCAAA,GAAAA,kCAAA","ignoreList":[]}
@@ -19,27 +19,35 @@ var _jsxRuntime = require("react/jsx-runtime");
19
19
  var _host = require("./components/host");
20
20
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
21
21
  const AnimatedNativePortal = _teleport.NativePortal ? _reactNativeReanimated.default.createAnimatedComponent(_teleport.NativePortal) : null;
22
+ const EnabledNativePortal = AnimatedNativePortal;
22
23
  const BoundaryContentPortal = exports.BoundaryContentPortal = /*#__PURE__*/(0, _react.memo)(function BoundaryContentPortal({
23
24
  boundaryId,
24
25
  children,
25
26
  enabled
26
27
  }) {
27
- const shouldEnablePortal = enabled && boundaryId !== undefined;
28
+ if (!enabled || boundaryId === undefined || !_teleport.isTeleportAvailable || !AnimatedNativePortal) {
29
+ return children;
30
+ }
31
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(EnabledBoundaryContentPortal, {
32
+ boundaryId: boundaryId,
33
+ children: children
34
+ });
35
+ });
36
+ const EnabledBoundaryContentPortal = /*#__PURE__*/(0, _react.memo)(function EnabledBoundaryContentPortal({
37
+ boundaryId,
38
+ children
39
+ }) {
28
40
  const {
29
41
  teleportProps
30
42
  } = (0, _useBoundaryContentPortalAttachment.useBoundaryContentPortalAttachment)({
31
- boundaryId: boundaryId ?? "",
32
- enabled: shouldEnablePortal
43
+ boundaryId
44
+ });
45
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(EnabledNativePortal, {
46
+ animatedProps: teleportProps,
47
+ name: boundaryId,
48
+ pointerEvents: _teleport.PORTAL_POINTER_EVENTS,
49
+ style: _reactNative.StyleSheet.absoluteFill,
50
+ children: children
33
51
  });
34
- if (shouldEnablePortal && _teleport.isTeleportAvailable && AnimatedNativePortal) {
35
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedNativePortal, {
36
- animatedProps: teleportProps,
37
- name: boundaryId,
38
- pointerEvents: _teleport.PORTAL_POINTER_EVENTS,
39
- style: _reactNative.StyleSheet.absoluteFill,
40
- children: children
41
- });
42
- }
43
- return children;
44
52
  });
45
53
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireDefault","_teleport","_useBoundaryContentPortalAttachment","_jsxRuntime","_host","e","__esModule","default","AnimatedNativePortal","NativePortal","Animated","createAnimatedComponent","BoundaryContentPortal","exports","memo","boundaryId","children","enabled","shouldEnablePortal","undefined","teleportProps","useBoundaryContentPortalAttachment","isTeleportAvailable","jsx","animatedProps","name","pointerEvents","PORTAL_POINTER_EVENTS","style","StyleSheet","absoluteFill"],"sourceRoot":"../../../../../../../src","sources":["components/boundary/portal/components/boundary-content-portal/index.tsx"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAMA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AAKA,IAAAK,mCAAA,GAAAL,OAAA;AAAoG,IAAAM,WAAA,GAAAN,OAAA;AAEpG,IAAAO,KAAA,GAAAP,OAAA;AAA8D,SAAAG,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAe9D,MAAMG,oBAAoB,GAAGC,sBAAY,GACtCC,8BAAQ,CAACC,uBAAuB,CAChCF,sBACD,CAAC,GACA,IAAI;AAEA,MAAMG,qBAAqB,GAAAC,OAAA,CAAAD,qBAAA,gBAAG,IAAAE,WAAI,EAAC,SAASF,qBAAqBA,CAAC;EACxEG,UAAU;EACVC,QAAQ;EACRC;AAC2B,CAAC,EAAE;EAC9B,MAAMC,kBAAkB,GAAGD,OAAO,IAAIF,UAAU,KAAKI,SAAS;EAC9D,MAAM;IAAEC;EAAc,CAAC,GAAG,IAAAC,sEAAkC,EAAC;IAC5DN,UAAU,EAAEA,UAAU,IAAI,EAAE;IAC5BE,OAAO,EAAEC;EACV,CAAC,CAAC;EAEF,IAAIA,kBAAkB,IAAII,6BAAmB,IAAId,oBAAoB,EAAE;IACtE,oBACC,IAAAL,WAAA,CAAAoB,GAAA,EAACf,oBAAoB;MACpBgB,aAAa,EAAEJ,aAAc;MAC7BK,IAAI,EAAEV,UAAW;MACjBW,aAAa,EAAEC,+BAAsB;MACrCC,KAAK,EAAEC,uBAAU,CAACC,YAAa;MAAAd,QAAA,EAE9BA;IAAQ,CACY,CAAC;EAEzB;EAEA,OAAOA,QAAQ;AAChB,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireDefault","_teleport","_useBoundaryContentPortalAttachment","_jsxRuntime","_host","e","__esModule","default","AnimatedNativePortal","NativePortal","Animated","createAnimatedComponent","EnabledNativePortal","BoundaryContentPortal","exports","memo","boundaryId","children","enabled","undefined","isTeleportAvailable","jsx","EnabledBoundaryContentPortal","teleportProps","useBoundaryContentPortalAttachment","animatedProps","name","pointerEvents","PORTAL_POINTER_EVENTS","style","StyleSheet","absoluteFill"],"sourceRoot":"../../../../../../../src","sources":["components/boundary/portal/components/boundary-content-portal/index.tsx"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAMA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AAKA,IAAAK,mCAAA,GAAAL,OAAA;AAAoG,IAAAM,WAAA,GAAAN,OAAA;AAEpG,IAAAO,KAAA,GAAAP,OAAA;AAA8D,SAAAG,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAe9D,MAAMG,oBAAoB,GAAGC,sBAAY,GACtCC,8BAAQ,CAACC,uBAAuB,CAChCF,sBACD,CAAC,GACA,IAAI;AACP,MAAMG,mBAAmB,GAAGJ,oBAE3B;AAEM,MAAMK,qBAAqB,GAAAC,OAAA,CAAAD,qBAAA,gBAAG,IAAAE,WAAI,EAAC,SAASF,qBAAqBA,CAAC;EACxEG,UAAU;EACVC,QAAQ;EACRC;AAC2B,CAAC,EAAE;EAC9B,IACC,CAACA,OAAO,IACRF,UAAU,KAAKG,SAAS,IACxB,CAACC,6BAAmB,IACpB,CAACZ,oBAAoB,EACpB;IACD,OAAOS,QAAQ;EAChB;EAEA,oBACC,IAAAd,WAAA,CAAAkB,GAAA,EAACC,4BAA4B;IAACN,UAAU,EAAEA,UAAW;IAAAC,QAAA,EACnDA;EAAQ,CACoB,CAAC;AAEjC,CAAC,CAAC;AAEF,MAAMK,4BAA4B,gBAAG,IAAAP,WAAI,EACxC,SAASO,4BAA4BA,CAAC;EACrCN,UAAU;EACVC;AACqE,CAAC,EAAE;EACxE,MAAM;IAAEM;EAAc,CAAC,GAAG,IAAAC,sEAAkC,EAAC;IAC5DR;EACD,CAAC,CAAC;EAEF,oBACC,IAAAb,WAAA,CAAAkB,GAAA,EAACT,mBAAmB;IACnBa,aAAa,EAAEF,aAAc;IAC7BG,IAAI,EAAEV,UAAW;IACjBW,aAAa,EAAEC,+BAAsB;IACrCC,KAAK,EAAEC,uBAAU,CAACC,YAAa;IAAAd,QAAA,EAE9BA;EAAQ,CACW,CAAC;AAExB,CACD,CAAC","ignoreList":[]}
@@ -9,7 +9,6 @@ var _reactNative = require("react-native");
9
9
  var _reactNativeReanimated = _interopRequireDefault(require("react-native-reanimated"));
10
10
  var _descriptors = require("../../../../../../providers/screen/descriptors");
11
11
  var _styles = require("../../../../../../providers/screen/styles");
12
- var _system = require("../../../../../../stores/system.store");
13
12
  var _teleport = require("../../../teleport");
14
13
  var _useHostMeasurement = require("../hooks/use-host-measurement");
15
14
  var _hostRegistry = require("../stores/host-registry.store");
@@ -23,9 +22,6 @@ function HostImpl({
23
22
  style
24
23
  }) {
25
24
  const screenKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.currentScreenKey);
26
- const {
27
- unblockLifecycleStart
28
- } = _system.SystemStore.getBag(screenKey).actions;
29
25
  const generatedHostKeyRef = (0, _react.useRef)(null);
30
26
  if (generatedHostKeyRef.current === null) {
31
27
  generatedHostKeyRef.current = `${screenKey}-host-${nextHostId++}`;
@@ -51,7 +47,6 @@ function HostImpl({
51
47
  });
52
48
  (0, _react.useLayoutEffect)(() => {
53
49
  (0, _hostRegistry.registerHost)({
54
- capturesScroll,
55
50
  fallback,
56
51
  hostKey,
57
52
  screenKey
@@ -59,19 +54,13 @@ function HostImpl({
59
54
  return () => {
60
55
  (0, _hostRegistry.unregisterHost)(screenKey, hostKey);
61
56
  };
62
- }, [capturesScroll, fallback, hostKey, screenKey]);
63
- const handleUnblocking = (0, _react.useCallback)(() => {
64
- // Each destination boundary contributes one lifecycle start block. Release
65
- // only this host's block so unrelated boundary and user blocks stay intact.
66
- unblockLifecycleStart();
67
- }, [unblockLifecycleStart]);
57
+ }, [fallback, hostKey, screenKey]);
68
58
  const boundaryHosts = measurement.canRenderHosts ? activeBoundaryHosts.map(host => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
69
59
  pointerEvents: _teleport.PORTAL_POINTER_EVENTS,
70
60
  style: [styles.boundaryHostViewport, {
71
61
  width: viewportWidth,
72
62
  height: viewportHeight
73
63
  }],
74
- onLayout: handleUnblocking,
75
64
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_portalBoundaryHost2.PortalBoundaryHost, {
76
65
  host: host,
77
66
  style: _reactNative.StyleSheet.absoluteFill
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireDefault","_descriptors","_styles","_system","_teleport","_useHostMeasurement","_hostRegistry","_portalBoundaryHost","_portalBoundaryHost2","_jsxRuntime","e","__esModule","default","nextHostId","HostImpl","fallback","style","screenKey","useDescriptorsStore","s","derivations","currentScreenKey","unblockLifecycleStart","SystemStore","getBag","actions","generatedHostKeyRef","useRef","current","hostKey","capturesScroll","activeBoundaryHosts","useActivePortalBoundaryHosts","visibilityBlocked","useScreenSlots","height","viewportHeight","width","viewportWidth","useWindowDimensions","measurement","useHostMeasurement","enabled","length","useLayoutEffect","registerHost","unregisterHost","handleUnblocking","useCallback","boundaryHosts","canRenderHosts","map","host","jsx","View","pointerEvents","PORTAL_POINTER_EVENTS","styles","boundaryHostViewport","onLayout","children","PortalBoundaryHost","StyleSheet","absoluteFill","portalHostName","ref","hostRef","collapsable","Host","exports","memo","props","ScreenFallbackHost","create","elevation","left","overflow","position","top","zIndex"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/components/host.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAOA,IAAAE,sBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,O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AsB;IACrCxC,KAAK,EAAE,CACNyC,MAAM,CAACL,IAAI,EACX;MAAEf,KAAK,EAAEC,aAAa;MAAEH,MAAM,EAAEC;IAAe,CAAC,EAChDpB,KAAK,CACJ;IACFmD,WAAW,EAAE,KAAM;IAAAP,QAAA,EAElBX;EAAa,CACA,CAAC;AAElB;AAEO,MAAMmB,IAAI,GAAAC,OAAA,CAAAD,IAAA,gBAAG,IAAAE,WAAI,EAAC,SAASF,IAAIA,CAACG,KAAsB,EAAE;EAC9D,oBAAO,IAAA9D,WAAA,CAAA4C,GAAA,EAACvC,QAAQ;IAAA,GAAKyD;EAAK,CAAG,CAAC;AAC/B,CAAC,CAAC;AAEK,MAAMC,kBAAkB,GAAAH,OAAA,CAAAG,kBAAA,gBAAG,IAAAF,WAAI,EAAC,SAASE,kBAAkBA,CAAA,EAAG;EACpE,oBAAO,IAAA/D,WAAA,CAAA4C,GAAA,EAACvC,QAAQ;IAACC,QAAQ;EAAA,CAAE,CAAC;AAC7B,CAAC,CAAC;AAEF,MAAM0C,MAAM,GAAGK,uBAAU,CAACW,MAAM,CAAC;EAChCrB,IAAI,EAAE;IACLsB,SAAS,EAAE,MAAM;IACjBC,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE,SAAS;IACnBC,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,CAAC;IACNC,MAAM,EAAE;EACT,CAAC;EACDrB,oBAAoB,EAAE;IACrBiB,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE,SAAS;IACnBC,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE;EACN;AACD,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireDefault","_descriptors","_styles","_teleport","_useHostMeasurement","_hostRegistry","_portalBoundaryHost","_portalBoundaryHost2","_jsxRuntime","e","__esModule","default","nextHostId","HostImpl","fallback","style","screenKey","useDescriptorsStore","s","derivations","currentScreenKey","generatedHostKeyRef","useRef","current","hostKey","capturesScroll","activeBoundaryHosts","useActivePortalBoundaryHosts","visibilityBlocked","useScreenSlots","height","viewportHeight","width","viewportWidth","useWindowDimensions","measurement","useHostMeasurement","enabled","length","useLayoutEffect","registerHost","unregisterHost","boundaryHosts","canRenderHosts","map","host","jsx","View","pointerEvents","PORTAL_POINTER_EVENTS","styles","boundaryHostViewport","children","PortalBoundaryHost","StyleSheet","absoluteFill","portalHostName","ref","hostRef","collapsable","Host","exports","memo","props","ScreenFallbackHost","create","elevation","left","overflow","position","top","zIndex"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/components/host.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAOA,IAAAE,sBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AACA,IAAAO,mBAAA,GAAAP,OAAA;AACA,IAAAQ,aAAA,GAAAR,OAAA;AACA,IAAAS,mBAAA,GAAAT,OAAA;AACA,IAAAU,oBAAA,GAAAV,OAAA;AAA4D,IAAAW,WAAA,GAAAX,OAAA;AAAA,SAAAG,uBAAAS,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE5D,IAAIG,UAAU,GAAG,CAAC;AAUlB,SAASC,QAAQA,CAAC;EAAEC,QAAQ,GAAG,KAAK;EAAEC;AAAqB,CAAC,EAAE;EAC7D,MAAMC,SAAS,GAAG,IAAAC,gCAAmB,EAAEC,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACC,gBAAgB,CAAC;EAC5E,MAAMC,mBAAmB,GAAG,IAAAC,aAAM,EAAgB,IAAI,CAAC;EAEvD,IAAID,mBAAmB,CAACE,OAAO,KAAK,IAAI,EAAE;IACzCF,mBAAmB,CAACE,O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,UAAU;IACpBC,GAAG,EAAE;EACN;AACD,CAAC,CAAC","ignoreList":[]}
@@ -9,13 +9,12 @@ var _reactNative = require("react-native");
9
9
  var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
10
10
  var _constants = require("../../../../../../constants");
11
11
  var _composeSlotStyle = require("../../../../../../providers/screen/styles/helpers/compose-slot-style");
12
- var _animation = require("../../../../../../stores/animation.store");
13
- var _linkPairs = require("../../../../../../stores/bounds/helpers/link-pairs.helpers");
14
12
  var _links = require("../../../../../../stores/bounds/internals/links");
15
- var _scroll = require("../../../../../../stores/scroll.store");
13
+ var _system = require("../../../../../../stores/system.store");
16
14
  var _teleport = require("../../../teleport");
17
15
  var _hasLocalSlot = require("../helpers/has-local-slot");
18
16
  var _offsetStyle = require("../helpers/offset-style");
17
+ var _hostBounds = require("../stores/host-bounds.store");
19
18
  var _jsxRuntime = require("react/jsx-runtime");
20
19
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
21
20
  const AnimatedPortalBoundaryHost = _teleport.NativePortalHost ? _reactNativeReanimated.default.createAnimatedComponent(_teleport.NativePortalHost) : null;
@@ -23,13 +22,32 @@ const PortalBoundaryHost = exports.PortalBoundaryHost = /*#__PURE__*/(0, _react.
23
22
  host,
24
23
  style
25
24
  }) {
26
- // Cross-screen landing-rect scroll tracking: the flight interpolates toward
27
- // the source rect stored at measure time, but the source screen stays
28
- // scrollable while the pair closes (destination pointer events are
29
- // released). These are read per-frame so the landing point follows the
30
- // live source scroll instead of the stale snapshot.
31
- const sourceScrollMetadata = _scroll.ScrollStore.getValue((0, _linkPairs.getSourceScreenKeyFromPairKey)(host.pairKey), "metadata");
32
- const hostVisualProgress = _animation.AnimationStore.getValue(host.screenKey, "visualProgress");
25
+ const geometryReadyFrames = (0, _reactNativeReanimated.useSharedValue)(0);
26
+ const {
27
+ unblockLifecycleStart
28
+ } = _system.SystemStore.getBag(host.screenKey).actions;
29
+ const handleFrame = (0, _react.useCallback)(() => {
30
+ "worklet";
31
+
32
+ if (host.portalHostReady.get()) {
33
+ return;
34
+ }
35
+ const link = (0, _links.getLink)(host.pairKey, host.boundaryId);
36
+ const hasGeometry = link?.source !== null && link !== undefined && (0, _hostBounds.getPortalHostBounds)(host.hostKey) !== null && (0, _hasLocalSlot.hasLocalSlot)(host.localStylesMaps.get(), host.boundaryId);
37
+ if (!hasGeometry) {
38
+ geometryReadyFrames.set(0);
39
+ return;
40
+ }
41
+ if (geometryReadyFrames.get() === 0) {
42
+ // Give the source frame, host offset, and slot style one UI frame to
43
+ // reach native before Teleport targets this receiver.
44
+ geometryReadyFrames.set(1);
45
+ return;
46
+ }
47
+ host.portalHostReady.set(true);
48
+ unblockLifecycleStart();
49
+ }, [geometryReadyFrames, host, unblockLifecycleStart]);
50
+ (0, _reactNativeReanimated.useFrameCallback)(handleFrame, true);
33
51
  const hostStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
34
52
  "worklet";
35
53
 
@@ -41,30 +59,10 @@ const PortalBoundaryHost = exports.PortalBoundaryHost = /*#__PURE__*/(0, _react.
41
59
  }
42
60
  const sourceBounds = link.source.bounds;
43
61
  const isCrossScreenPortal = link.source.screenKey !== host.screenKey;
44
- let landingShift;
45
- if (isCrossScreenPortal) {
46
- // Weight by distance-to-landing so the destination end of the flight
47
- // stays pinned: no correction while the content sits over the
48
- // destination rect (progress 1), full correction at touchdown on the
49
- // source rect (progress 0).
50
- const landingWeight = 1 - Math.min(Math.max(hostVisualProgress.get(), 0), 1);
51
- if (landingWeight > 0) {
52
- const liveScroll = sourceScrollMetadata.get();
53
- const capturedScroll = sourceBounds.scroll ?? null;
54
-
55
- // Scroll offset grows as content moves up/left, so the rect's
56
- // on-screen position shifts by the negative delta.
57
- landingShift = {
58
- x: -(0, _scroll.getClampedScrollAxisDelta)(liveScroll, capturedScroll, "horizontal") * landingWeight,
59
- y: -(0, _scroll.getClampedScrollAxisDelta)(liveScroll, capturedScroll, "vertical") * landingWeight
60
- };
61
- }
62
- }
63
62
  return (0, _offsetStyle.resolvePortalOffsetStyle)({
64
63
  bounds: sourceBounds,
65
64
  hostKey: host.hostKey,
66
- placement: isCrossScreenPortal ? "cross-screen" : "same-screen",
67
- landingShift
65
+ placement: isCrossScreenPortal ? "cross-screen" : "same-screen"
68
66
  });
69
67
  });
70
68
  const contentFrameStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
@@ -93,7 +91,7 @@ const PortalBoundaryHost = exports.PortalBoundaryHost = /*#__PURE__*/(0, _react.
93
91
  // cleanup frame. If the current local interpolator layers did not emit this
94
92
  // boundary id, any resolved style here is cleanup/stale residue and should
95
93
  // not be drawn by the host.
96
- if (host.escapeClipping && !(0, _hasLocalSlot.hasLocalSlot)(host.localStylesMaps.get(), host.boundaryId)) {
94
+ if (!(0, _hasLocalSlot.hasLocalSlot)(host.localStylesMaps.get(), host.boundaryId)) {
97
95
  return _constants.NO_STYLES;
98
96
  }
99
97
  const slot = host.slotsMap.get()[host.boundaryId];
@@ -116,8 +114,17 @@ const PortalBoundaryHost = exports.PortalBoundaryHost = /*#__PURE__*/(0, _react.
116
114
  })
117
115
  });
118
116
  });
117
+
118
+ // The teleport offset is a physical page delta measured from the screen's
119
+ // left edge, so the content box must anchor there too. Under native RTL,
120
+ // `left: 0` swaps to a right-edge anchor; `end: 0` is the physical left edge
121
+ // in RTL regardless of the swap setting.
119
122
  const styles = _reactNative.StyleSheet.create({
120
- content: {
123
+ content: _reactNative.I18nManager.isRTL ? {
124
+ end: 0,
125
+ position: "absolute",
126
+ top: 0
127
+ } : {
121
128
  left: 0,
122
129
  position: "absolute",
123
130
  top: 0
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireWildcard","_constants","_composeSlotStyle","_animation","_linkPairs","_links","_scroll","_teleport","_hasLocalSlot","_offsetStyle","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","AnimatedPortalBoundaryHost","NativePortalHost","Animated","createAnimatedComponent","PortalBoundaryHost","exports","memo","host","style","sourceScrollMetadata","ScrollStore","getValue","getSourceScreenKeyFromPairKey","pairKey","hostVisualProgress","AnimationStore","screenKey","hostStyle","useAnimatedStyle","link","getLink","boundaryId","source","NO_STYLES","sourceBounds","bounds","isCrossScreenPortal","landingShift","landingWeight","Math","min","max","liveScroll","capturedScroll","scroll","x","getClampedScrollAxisDelta","y","resolvePortalOffsetStyle","hostKey","placement","contentFrameStyle","height","width","slotStyle","escapeClipping","hasLocalSlot","localStylesMaps","slot","slotsMap","composeSlotStyleWithLocalTransform","undefined","boundsLocalTransform","jsx","View","pointerEvents","PORTAL_POINTER_EVENTS","collapsable","children","name","portalHostName","styles","content","StyleSheet","create","left","position","top"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/components/portal-boundary-host.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,OAAA,GAAAT,OAAA;AAKA,IAAAU,SAAA,GAAAV,OAAA;AACA,IAAAW,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AI;EACZ;EAEA,oBACC,IAAApB,WAAA,CAAAyE,GAAA,EAACpF,sBAAA,CAAAsB,OAAQ,CAAC+D,IAAI;IACbC,aAAa,EAAEC,+BAAsB;IACrChD,KAAK,EAAE,CAACA,KAAK,EAAES,SAAS,CAAE;IAC1BwC,WAAW,EAAE,KAAM;IAAAC,QAAA,eAEnB,IAAA9E,WAAA,CAAAyE,GAAA,EAACrD,0BAA0B;MAC1B2D,IAAI,EAAEpD,IAAI,CAACqD,cAAe;MAC1BL,aAAa,EAAEC,+BAAsB;MACrChD,KAAK,EAAE,CAACqD,MAAM,CAACC,OAAO,EAAErB,iBAAiB,EAAEG,SAAS;IAAE,CACtD;EAAC,CACY,CAAC;AAElB,CAAC,CAAC;AAEF,MAAMiB,MAAM,GAAGE,uBAAU,CAACC,MAAM,CAAC;EAChCF,OAAO,EAAE;IACRG,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE;EACN;AACD,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireWildcard","_constants","_composeSlotStyle","_links","_system","_teleport","_hasLocalSlot","_offsetStyle","_hostBounds","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","AnimatedPortalBoundaryHost","NativePortalHost","Animated","createAnimatedComponent","PortalBoundaryHost","exports","memo","host","style","geometryReadyFrames","useSharedValue","unblockLifecycleStart","SystemStore","getBag","screenKey","actions","handleFrame","useCallback","portalHostReady","link","getLink","pairKey","boundaryId","hasGeometry","source","undefined","getPortalHostBounds","hostKey","hasLocalSlot","localStylesMaps","useFrameCallback","hostStyle","useAnimatedStyle","NO_STYLES","sourceBounds","bounds","isCrossScreenPortal","resolvePortalOffsetStyle","placement","contentFrameStyle","height","width","slotStyle","slot","slotsMap","composeSlotStyleWithLocalTransform","boundsLocalTransform","jsx","View","pointerEvents","PORTAL_POINTER_EVENTS","collapsable","children","name","portalHostName","styles","content","StyleSheet","create","I18nManager","isRTL","end","position","top","left"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/components/portal-boundary-host.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAMA,IAAAE,sBAAA,GAAAC,uBAAA,CAAAH,OAAA;AAKA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AAEA,IAAAQ,SAAA,GAAAR,OAAA;AACA,IAAAS,aAAA,GAAAT,OAAA;AACA,IAAAU,YAAA,GAAAV,OAAA;AACA,IAAAW,WAAA,GAAAX,OAAA;AAAkE,IAAAY,WAAA,GAAAZ,OAAA;AAAA,SAAAG,wBAAAU,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAZ,uBAAA,YAAAA,CAAAU,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,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O,EAAEG,wBAAW,CAACC,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":[]}
@@ -19,8 +19,7 @@ var _hostBounds = require("../stores/host-bounds.store");
19
19
  const resolvePortalOffsetStyle = ({
20
20
  bounds,
21
21
  hostKey,
22
- placement,
23
- landingShift
22
+ placement
24
23
  }) => {
25
24
  "worklet";
26
25
 
@@ -41,9 +40,9 @@ const resolvePortalOffsetStyle = ({
41
40
  const adjustedHostPageY = hostBounds ? hostBounds.pageY - hostSnapshotDeltaY : 0;
42
41
  return {
43
42
  transform: [{
44
- translateY: bounds.pageY - adjustedHostPageY + (landingShift?.y ?? 0)
43
+ translateY: bounds.pageY - adjustedHostPageY
45
44
  }, {
46
- translateX: bounds.pageX - adjustedHostPageX + (landingShift?.x ?? 0)
45
+ translateX: bounds.pageX - adjustedHostPageX
47
46
  }]
48
47
  };
49
48
  };