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
@@ -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":["components/boundary/portal/components/boundary-portal/components/portal-boundary-host.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAAQ,OAAO;AAC5B,SAAyBC,UAAU,QAAwB,cAAc;AACzE,OAAOC,QAAQ,IAAIC,gBAAgB,QAAQ,yBAAyB;AACpE,SAASC,SAAS,QAAQ,6BAA6B;AACvD,SAASC,kCAAkC,QAAQ,sEAAsE;AACzH,SAASC,cAAc,QAAQ,0CAA0C;AACzE,SAASC,6BAA6B,QAAQ,4DAA4D;AAC1G,SAASC,OAAO,QAAQ,iDAAiD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zD;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":["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,MAAM;IAAEkB;EAAsB,CAAC,GAAGd,WAAW,CAACe,MAAM,CAACJ,IAAI,CAACK,SAAS,CAAC,CAACC,OAAO;EAE5E,MAAMC,WAAW,GAAG5B,WAAW,CAAC,MAAM;IACrC,SAAS;;IACT,IAAIqB,IAAI,CAACQ,eAAe,CAACC,GAAG,CAAC,CAAC,EAAE;MAC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A0B;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
  };
@@ -1 +1 @@
1
- {"version":3,"names":["getClampedScrollAxisDelta","getPortalHostBounds","resolvePortalOffsetStyle","bounds","hostKey","placement","landingShift","hostBounds","boundsScrollSnapshot","scroll","hostBoundsScrollSnapshot","alignHostToBoundsScroll","hostSnapshotDeltaX","hostSnapshotDeltaY","adjustedHostPageX","pageX","adjustedHostPageY","pageY","transform","translateY","y","translateX","x"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/helpers/offset-style.ts"],"mappings":";;AACA,SAASA,yBAAyB,QAAQ,uCAAuC;AAEjF,SAASC,mBAAmB,QAAQ,6BAA6B;;AAEjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgBA,OAAO,MAAMC,wBAAwB,GAAGA,CAAC;EACxCC,MAAM;EACNC,OAAO;EACPC,SAAS;EACTC;AAC+B,CAAC,KAAiB;EACjD,SAAS;;EACT,MAAMC,UAAU,GAAGN,mBAAmB,CAACG,OAAO,CAAC;EAC/C,MAAMI,oBAAoB,GAAGL,MAAM,CAACM,MAAM,IAAI,IAAI;EAClD,MAAMC,wBAAwB,GAAGH,UAAU,EAAEE,MAAM,IAAI,IAAI;;EAE3D;EACA;EACA;EACA,MAAME,uBAAuB,GAAGN,SAAS,KAAK,aAAa;EAE3D,MAAMO,kBAAkB,GAAGD,uBAAuB,GAC/CX,yBAAyB,CACzBQ,oBAAoB,EACpBE,wBAAwB,EACxB,YACD,CAAC,GACA,CAAC;EACJ,MAAMG,kBAAkB,GAAGF,uBAAuB,GAC/CX,yBAAyB,CACzBQ,oBAAoB,EACpBE,wBAAwB,EACxB,UACD,CAAC,GACA,CAAC;;EAEJ;EACA;EACA,MAAMI,iBAAiB,GAAGP,UAAU,GACjCA,UAAU,CAACQ,KAAK,GAAGH,kBAAkB,GACrC,CAAC;EACJ,MAAMI,iBAAiB,GAAGT,UAAU,GACjCA,UAAU,CAACU,KAAK,GAAGJ,kBAAkB,GACrC,CAAC;EAEJ,OAAO;IACNK,SAAS,EAAE,CACV;MAAEC,UAAU,EAAEhB,MAAM,CAACc,KAAK,GAAGD,iBAAiB,IAAIV,YAAY,EAAEc,CAAC,IAAI,CAAC;IAAE,CAAC,EACzE;MAAEC,UAAU,EAAElB,MAAM,CAACY,KAAK,GAAGD,iBAAiB,IAAIR,YAAY,EAAEgB,CAAC,IAAI,CAAC;IAAE,CAAC;EAE3E,CAAC;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["getClampedScrollAxisDelta","getPortalHostBounds","resolvePortalOffsetStyle","bounds","hostKey","placement","hostBounds","boundsScrollSnapshot","scroll","hostBoundsScrollSnapshot","alignHostToBoundsScroll","hostSnapshotDeltaX","hostSnapshotDeltaY","adjustedHostPageX","pageX","adjustedHostPageY","pageY","transform","translateY","translateX"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/helpers/offset-style.ts"],"mappings":";;AACA,SAASA,yBAAyB,QAAQ,uCAAuC;AAEjF,SAASC,mBAAmB,QAAQ,6BAA6B;;AAEjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA,OAAO,MAAMC,wBAAwB,GAAGA,CAAC;EACxCC,MAAM;EACNC,OAAO;EACPC;AAC+B,CAAC,KAAiB;EACjD,SAAS;;EACT,MAAMC,UAAU,GAAGL,mBAAmB,CAACG,OAAO,CAAC;EAC/C,MAAMG,oBAAoB,GAAGJ,MAAM,CAACK,MAAM,IAAI,IAAI;EAClD,MAAMC,wBAAwB,GAAGH,UAAU,EAAEE,MAAM,IAAI,IAAI;;EAE3D;EACA;EACA;EACA,MAAME,uBAAuB,GAAGL,SAAS,KAAK,aAAa;EAE3D,MAAMM,kBAAkB,GAAGD,uBAAuB,GAC/CV,yBAAyB,CACzBO,oBAAoB,EACpBE,wBAAwB,EACxB,YACD,CAAC,GACA,CAAC;EACJ,MAAMG,kBAAkB,GAAGF,uBAAuB,GAC/CV,yBAAyB,CACzBO,oBAAoB,EACpBE,wBAAwB,EACxB,UACD,CAAC,GACA,CAAC;;EAEJ;EACA;EACA,MAAMI,iBAAiB,GAAGP,UAAU,GACjCA,UAAU,CAACQ,KAAK,GAAGH,kBAAkB,GACrC,CAAC;EACJ,MAAMI,iBAAiB,GAAGT,UAAU,GACjCA,UAAU,CAACU,KAAK,GAAGJ,kBAAkB,GACrC,CAAC;EAEJ,OAAO;IACNK,SAAS,EAAE,CACV;MAAEC,UAAU,EAAEf,MAAM,CAACa,KAAK,GAAGD;IAAkB,CAAC,EAChD;MAAEI,UAAU,EAAEhB,MAAM,CAACW,KAAK,GAAGD;IAAkB,CAAC;EAElD,CAAC;AACF,CAAC","ignoreList":[]}
@@ -1,159 +1,60 @@
1
1
  "use strict";
2
2
 
3
- import { useCallback, useLayoutEffect, useRef, useState } from "react";
4
- import { useAnimatedProps, useAnimatedReaction, useSharedValue } from "react-native-reanimated";
5
- import { scheduleOnRN } from "react-native-worklets";
3
+ import { useLayoutEffect } from "react";
4
+ import { useAnimatedProps, useSharedValue } from "react-native-reanimated";
6
5
  import { useDescriptorsStore } from "../../../../../../providers/screen/descriptors";
7
6
  import { useScreenSlots } from "../../../../../../providers/screen/styles";
7
+ import { hasCloseTransitionFinished } from "../../../../../../providers/screen/styles/helpers/transition-visual-state";
8
+ import { AnimationStore } from "../../../../../../stores/animation.store";
9
+ import { getLinkKeyFromTag } from "../../../../../../stores/bounds/helpers/link-pairs.helpers";
8
10
  import { pairs } from "../../../../../../stores/bounds/internals/state";
11
+ import { SystemStore } from "../../../../../../stores/system.store";
9
12
  import { PORTAL_HOST_NAME_RESET_VALUE } from "../../../utils/naming";
10
- import { resolveBoundaryPortalOwnership } from "../../../utils/ownership";
11
- import { shallowEqual } from "../../../utils/shallow-equal";
12
- import { shouldAttachBoundaryPortal } from "../../../utils/teleport-control";
13
- import { resolveNextVisiblePortalHostName } from "../../../utils/visible-host";
13
+ import { isTeleportEnabled } from "../../../utils/teleport-control";
14
14
  import { createBoundaryPortalHostName } from "../helpers/host-name";
15
15
  import { useActiveHostKey } from "../stores/host-registry.store";
16
- import { dropStalePortalBoundaryHosts, mountPortalBoundaryHost, unmountPortalBoundaryHostByName } from "../stores/portal-boundary-host.store";
16
+ import { mountPortalBoundaryHost, unmountPortalBoundaryHostByName } from "../stores/portal-boundary-host.store";
17
17
  export const useBoundaryPortalAttachment = ({
18
- boundaryId,
19
- enabled
18
+ boundaryId
20
19
  }) => {
21
20
  const sourcePairKey = useDescriptorsStore(s => s.derivations.sourcePairKey);
22
21
  const currentScreenKey = useDescriptorsStore(s => s.derivations.currentScreenKey);
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");
23
26
  const {
24
27
  localStylesMaps,
25
- nextInterpolatorReady,
26
28
  slotsMap
27
29
  } = useScreenSlots();
28
- const [ownership, setOwnership] = useState(null);
29
- const requestedPortalHostName = useSharedValue(null);
30
- const visiblePortalHostName = useSharedValue(null);
31
- const mountedPortalBoundaryHostNamesRef = useRef(new Set());
32
- const escapeHostKey = useActiveHostKey(enabled ? currentScreenKey : null);
33
- const updatePortalOwnership = useCallback((hostScreenKey, ownerPairKey, ownerScreenKey) => {
34
- if (hostScreenKey && ownerPairKey && ownerScreenKey) {
35
- setOwnership(current => {
36
- if (current?.hostScreenKey === hostScreenKey && current.ownerPairKey === ownerPairKey && current.ownerScreenKey === ownerScreenKey) {
37
- return current;
38
- }
39
- return {
40
- hostScreenKey,
41
- ownerPairKey,
42
- ownerScreenKey,
43
- status: "complete"
44
- };
45
- });
46
- return;
47
- }
48
- setOwnership(current => current ? null : current);
49
- }, []);
50
- const unmountOwnedPortalBoundaryHosts = useCallback(() => {
51
- for (const portalHostName of mountedPortalBoundaryHostNamesRef.current) {
52
- unmountPortalBoundaryHostByName(portalHostName);
53
- }
54
- mountedPortalBoundaryHostNamesRef.current.clear();
55
- }, []);
30
+ const portalHostName = useSharedValue(null);
31
+ const portalHostReady = useSharedValue(false);
32
+ const attachedDestination = useSharedValue(null);
33
+ const escapeHostKey = useActiveHostKey(currentScreenKey);
56
34
  useLayoutEffect(() => {
57
- if (!enabled || !ownership || !escapeHostKey) {
58
- requestedPortalHostName.set(null);
59
- visiblePortalHostName.set(null);
60
- unmountOwnedPortalBoundaryHosts();
35
+ if (!sourcePairKey || !escapeHostKey) {
36
+ portalHostName.set(null);
37
+ portalHostReady.set(false);
61
38
  return;
62
39
  }
63
- const portalHostName = createBoundaryPortalHostName(escapeHostKey, boundaryId, ownership.ownerPairKey);
40
+ const nextPortalHostName = createBoundaryPortalHostName(escapeHostKey, boundaryId, sourcePairKey);
64
41
  mountPortalBoundaryHost({
65
42
  boundaryId,
66
- escapeClipping: true,
67
43
  hostKey: escapeHostKey,
68
44
  localStylesMaps,
69
- pairKey: ownership.ownerPairKey,
70
- portalHostName,
45
+ pairKey: sourcePairKey,
46
+ portalHostName: nextPortalHostName,
47
+ portalHostReady,
71
48
  screenKey: currentScreenKey,
72
49
  slotsMap
73
50
  });
74
- mountedPortalBoundaryHostNamesRef.current.add(portalHostName);
75
-
76
- // Request the new receiver immediately, but keep the currently visible
77
- // receiver until the new interpolator is ready. This avoids a no-host gap
78
- // during rapid close/open retargets.
79
- requestedPortalHostName.set(portalHostName);
80
- }, [boundaryId, currentScreenKey, enabled, escapeHostKey, localStylesMaps, ownership, requestedPortalHostName, slotsMap, unmountOwnedPortalBoundaryHosts, visiblePortalHostName]);
81
- useLayoutEffect(() => {
51
+ portalHostName.set(nextPortalHostName);
82
52
  return () => {
83
- requestedPortalHostName.set(null);
84
- visiblePortalHostName.set(null);
85
- unmountOwnedPortalBoundaryHosts();
53
+ portalHostName.set(null);
54
+ portalHostReady.set(false);
55
+ unmountPortalBoundaryHostByName(nextPortalHostName);
86
56
  };
87
- }, [requestedPortalHostName, unmountOwnedPortalBoundaryHosts, visiblePortalHostName]);
88
- useAnimatedReaction(() => {
89
- "worklet";
90
-
91
- if (!enabled || !sourcePairKey) {
92
- return {
93
- hostScreenKey: null,
94
- ownerPairKey: sourcePairKey,
95
- ownerScreenKey: null,
96
- status: "clear"
97
- };
98
- }
99
- return resolveBoundaryPortalOwnership({
100
- boundaryId,
101
- currentScreenKey,
102
- handoff: false,
103
- pairsState: pairs.get(),
104
- sourcePairKey
105
- });
106
- }, (signal, previousSignal) => {
107
- "worklet";
108
-
109
- if (shallowEqual(previousSignal, signal)) {
110
- return;
111
- }
112
- scheduleOnRN(updatePortalOwnership, signal.hostScreenKey, signal.ownerPairKey, signal.ownerScreenKey ?? undefined);
113
- });
114
- useAnimatedReaction(() => {
115
- "worklet";
116
-
117
- const slot = slotsMap.get()[boundaryId];
118
- const teleport = slot?.props?.teleport;
119
- const shouldTeleport = shouldAttachBoundaryPortal({
120
- enabled,
121
- teleport
122
- });
123
- const requestedName = requestedPortalHostName.get();
124
- const visibleName = visiblePortalHostName.get();
125
- const isInterpolatorReady = nextInterpolatorReady.get();
126
- const nextVisibleName = resolveNextVisiblePortalHostName({
127
- isInterpolatorReady: isInterpolatorReady === 1,
128
- requestedName,
129
- shouldTeleport,
130
- visibleName
131
- });
132
- return {
133
- isInterpolatorReady,
134
- nextVisibleName,
135
- requestedName,
136
- shouldTeleport,
137
- teleport,
138
- visibleName
139
- };
140
- }, (state, previousState) => {
141
- "worklet";
142
-
143
- if (shallowEqual(previousState, state)) {
144
- return;
145
- }
146
- if (state.nextVisibleName !== state.visibleName) {
147
- visiblePortalHostName.set(state.nextVisibleName);
148
- return;
149
- }
150
- if (state.visibleName && state.visibleName === state.requestedName) {
151
- scheduleOnRN(dropStalePortalBoundaryHosts, {
152
- boundaryId,
153
- keepPortalHostName: state.visibleName
154
- });
155
- }
156
- });
57
+ }, [boundaryId, currentScreenKey, escapeHostKey, localStylesMaps, portalHostName, portalHostReady, sourcePairKey, slotsMap]);
157
58
  const teleportProps = useAnimatedProps(() => {
158
59
  "worklet";
159
60
 
@@ -163,19 +64,33 @@ export const useBoundaryPortalAttachment = ({
163
64
  teleport,
164
65
  ...slotProps
165
66
  } = slot?.props ?? {};
166
- const shouldTeleport = shouldAttachBoundaryPortal({
167
- enabled,
168
- teleport
67
+ const shouldTeleport = isTeleportEnabled(teleport);
68
+ const hostName = portalHostName.get();
69
+ const pair = sourcePairKey ? pairs.get()[sourcePairKey] : undefined;
70
+ const linkKey = getLinkKeyFromTag(boundaryId);
71
+ const link = pair?.links[linkKey];
72
+ const hasActiveLink = link?.source !== null && link !== undefined && (!link.group || pair?.groups[link.group]?.activeId === linkKey);
73
+ const hasAttachableHost = shouldTeleport && hasActiveLink && portalHostReady.get() && hostName;
74
+ if (hasAttachableHost) {
75
+ attachedDestination.set({
76
+ animationProgress: destinationAnimationProgress,
77
+ closing: destinationClosing
78
+ });
79
+ }
80
+ const attached = attachedDestination.get();
81
+ const hasAttachedCloseFinished = attached !== null && hasCloseTransitionFinished({
82
+ animationProgress: attached.animationProgress.get(),
83
+ closing: attached.closing.get()
169
84
  });
170
- const visibleName = visiblePortalHostName.get();
85
+ const canAttach = hasAttachableHost && !hasAttachedCloseFinished;
86
+ const targetHostName = canAttach ? hostName : PORTAL_HOST_NAME_RESET_VALUE;
171
87
  return {
172
88
  ...slotProps,
173
- hostName: shouldTeleport && visibleName ? visibleName : PORTAL_HOST_NAME_RESET_VALUE
89
+ hostName: targetHostName
174
90
  };
175
91
  });
176
92
  return {
177
- teleportProps,
178
- visiblePortalHostName
93
+ teleportProps
179
94
  };
180
95
  };
181
96
  //# sourceMappingURL=use-boundary-portal-attachment.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useCallback","useLayoutEffect","useRef","useState","useAnimatedProps","useAnimatedReaction","useSharedValue","scheduleOnRN","useDescriptorsStore","useScreenSlots","pairs","PORTAL_HOST_NAME_RESET_VALUE","resolveBoundaryPortalOwnership","shallowEqual","shouldAttachBoundaryPortal","resolveNextVisiblePortalHostName","createBoundaryPortalHostName","useActiveHostKey","dropStalePortalBoundaryHosts","mountPortalBoundaryHost","unmountPortalBoundaryHostByName","useBoundaryPortalAttachment","boundaryId","enabled","sourcePairKey","s","derivations","currentScreenKey","localStylesMaps","nextInterpolatorReady","slotsMap","ownership","setOwnership","requestedPortalHostName","visiblePortalHostName","mountedPortalBoundaryHostNamesRef","Set","escapeHostKey","updatePortalOwnership","hostScreenKey","ownerPairKey","ownerScreenKey","current","status","unmountOwnedPortalBoundaryHosts","portalHostName","clear","set","escapeClipping","hostKey","pairKey","screenKey","add","handoff","pairsState","get","signal","previousSignal","undefined","slot","teleport","props","shouldTeleport","requestedName","visibleName","isInterpolatorReady","nextVisibleName","state","previousState","keepPortalHostName","teleportProps","pointerEvents","_pointerEvents","slotProps","hostName"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,eAAe,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACtE,SACCC,gBAAgB,EAChBC,mBAAmB,EACnBC,cAAc,QACR,yBAAyB;AAChC,SAASC,YAAY,QAAQ,uBAAuB;AACpD,SAASC,mBAAmB,QAAQ,gDAAgD;AACpF,SAASC,cAAc,QAAQ,2CAA2C;AAC1E,SAASC,KAAK,QAAQ,iDAAiD;AACvE,SAASC,4BAA4B,QAAQ,uBAAuB;AACpE,SAECC,8BAA8B,QACxB,0BAA0B;AACjC,SAASC,YAAY,QAAQ,8BAA8B;AAC3D,SAASC,0BAA0B,QAAQ,iCAAiC;AAC5E,SAASC,gCAAgC,QAAQ,6BAA6B;AAC9E,SAASC,4BAA4B,QAAQ,sBAAsB;AACnE,SAASC,gBAAgB,QAAQ,+BAA+B;AAChE,SACCC,4BAA4B,EAC5BC,uBAAuB,EACvBC,+BAA+B,QACzB,sCAAsC;AAO7C,OAAO,MAAMC,2BAA2B,GAAGA,CAAC;EAC3CC,UAAU;EACVC;AACkC,CAAC,KAAK;EACxC,MAAMC,aAAa,GAAGhB,mBAAmB,CAAEiB,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACF,aAAa,CAAC;EAC7E,MAAMG,gBAAgB,GAAGnB,mBAAmB,CAC1CiB,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACC,gBACtB,CAAC;EACD,MAAM;IAAEC,eAAe;IAAEC,qBAAqB;IAAEC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IA,KAAK,CAACD,eAAe,KAAKC,KAAK,CAACH,WAAW,EAAE;MAChD9B,qBAAqB,CAACa,GAAG,CAACoB,KAAK,CAACD,eAAe,CAAC;MAChD;IACD;IAEA,IAAIC,KAAK,CAACH,WAAW,IAAIG,KAAK,CAACH,WAAW,KAAKG,KAAK,CAACJ,aAAa,EAAE;MACnExD,YAAY,CAACW,4BAA4B,EAAE;QAC1CI,UAAU;QACV+C,kBAAkB,EAAEF,KAAK,CAACH;MAC3B,CAAC,CAAC;IACH;EACD,CACD,CAAC;EAED,MAAMM,aAAa,GAAGlE,gBAAgB,CAAC,MAAM;IAC5C,SAAS;;IAET,MAAMuD,IAAI,GAAG7B,QAAQ,CAACyB,GAAG,CAAC,CAAC,CAACjC,UAAU,CAAC;IACvC,MAAM;MACLiD,aAAa,EAAEC,cAAc;MAC7BZ,QAAQ;MACR,GAAGa;IACJ,CAAC,GAAGd,IAAI,EAAEE,KAAK,IAAI,CAAC,CAAC;IACrB,MAAMC,cAAc,GAAGhD,0BAA0B,CAAC;MACjDS,OAAO;MACPqC;IACD,CAAC,CAAC;IACF,MAAMI,WAAW,GAAG9B,qBAAqB,CAACqB,GAAG,CAAC,CAAC;IAE/C,OAAO;MACN,GAAGkB,SAAS;MACZC,QAAQ,EACPZ,cAAc,IAAIE,WAAW,GAC1BA,WAAW,GACXrD;IACL,CAAC;EACF,CAAC,CAAC;EAEF,OAAO;IACN2D,aAAa;IACbpC;EACD,CAAC;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useLayoutEffect","useAnimatedProps","useSharedValue","useDescriptorsStore","useScreenSlots","hasCloseTransitionFinished","AnimationStore","getLinkKeyFromTag","pairs","SystemStore","PORTAL_HOST_NAME_RESET_VALUE","isTeleportEnabled","createBoundaryPortalHostName","useActiveHostKey","mountPortalBoundaryHost","unmountPortalBoundaryHostByName","useBoundaryPortalAttachment","boundaryId","sourcePairKey","s","derivations","currentScreenKey","nextScreenKey","destinationScreenKey","destinationAnimationProgress","getValue","destinationClosing","localStylesMaps","slotsMap","portalHostName","portalHostReady","attachedDestination","escapeHostKey","set","nextPortalHostName","hostKey","pairKey","screenKey","teleportProps","slot","get","pointerEvents","_pointerEvents","teleport","slotProps","props","shouldTeleport","hostName","pair","undefined","linkKey","link","links","hasActiveLink","source","group","groups","activeId","hasAttachableHost","animationProgress","closing","attached","hasAttachedCloseFinished","canAttach","targetHostName"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,OAAO;AACvC,SAECC,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,iBAAiB,QAAQ,4DAA4D;AAC9F,SAASC,KAAK,QAAQ,iDAAiD;AACvE,SAASC,WAAW,QAAQ,uCAAuC;AACnE,SAASC,4BAA4B,QAAQ,uBAAuB;AACpE,SAASC,iBAAiB,QAAQ,iCAAiC;AACnE,SAASC,4BAA4B,QAAQ,sBAAsB;AACnE,SAASC,gBAAgB,QAAQ,+BAA+B;AAChE,SACCC,uBAAuB,EACvBC,+BAA+B,QACzB,sCAAsC;AAW7C,OAAO,MAAMC,2BAA2B,GAAGA,CAAC;EAC3CC;AACkC,CAAC,KAAK;EACxC,MAAMC,aAAa,GAAGf,mBAAmB,CAAEgB,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACF,aAAa,CAAC;EAC7E,MAAMG,gBAAgB,GAAGlB,mBAAmB,CAC1CgB,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACC,gBACtB,CAAC;EACD,MAAMC,aAAa,GAAGnB,mBAAmB,CAAEgB,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACE,aAAa,CAAC;EAC7E,MAAMC,oBAAoB,GA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C;MAC1BsD,iBAAiB,EAAEE,QAAQ,CAACF,iBAAiB,CAACnB,GAAG,CAAC,CAAC;MACnDoB,OAAO,EAAEC,QAAQ,CAACD,OAAO,CAACpB,GAAG,CAAC;IAC/B,CAAC,CAAC;IACH,MAAMuB,SAAS,GAAGL,iBAAiB,IAAI,CAACI,wBAAwB;IAChE,MAAME,cAAc,GAAGD,SAAS,GAAGhB,QAAQ,GAAGrC,4BAA4B;IAE1E,OAAO;MACN,GAAGkC,SAAS;MACZG,QAAQ,EAAEiB;IACX,CAAC;EACF,CAAC,CAAC;EAEF,OAAO;IAAE1B;EAAc,CAAC;AACzB,CAAC","ignoreList":[]}
@@ -1,27 +1,62 @@
1
1
  "use strict";
2
2
 
3
3
  import { memo } from "react";
4
- import { BoundaryPortalSlot } from "./components/portal-slot";
4
+ import Animated, { runOnUI } from "react-native-reanimated";
5
+ import { logger } from "../../../../../utils/logger";
6
+ import { isTeleportAvailable, PORTAL_POINTER_EVENTS, NativePortal as TeleportPortal } from "../../teleport";
5
7
  import { useBoundaryPortalAttachment } from "./hooks/use-boundary-portal-attachment";
8
+ import { usePlaceholderStyles } from "./hooks/use-placeholder-styles";
6
9
  import { jsx as _jsx } from "react/jsx-runtime";
10
+ const AnimatedNativePortal = TeleportPortal ? Animated.createAnimatedComponent(TeleportPortal) : null;
11
+ const EnabledNativePortal = AnimatedNativePortal;
7
12
  export const BoundaryPortal = /*#__PURE__*/memo(function BoundaryPortal({
8
13
  boundaryId,
9
14
  children,
10
15
  enabled,
11
16
  placeholderRef
12
17
  }) {
18
+ if (!enabled || !isTeleportAvailable || !AnimatedNativePortal) {
19
+ return children;
20
+ }
21
+ return /*#__PURE__*/_jsx(EnabledBoundaryPortal, {
22
+ boundaryId: boundaryId,
23
+ placeholderRef: placeholderRef,
24
+ children: children
25
+ });
26
+ });
27
+ const EnabledBoundaryPortal = /*#__PURE__*/memo(function EnabledBoundaryPortal({
28
+ boundaryId,
29
+ children,
30
+ placeholderRef
31
+ }) {
32
+ if (__DEV__ && !boundaryId) {
33
+ logger.warnOnce("portal:missing-id", "A boundary portal was rendered without an id; rendering inline.");
34
+ }
13
35
  const {
14
36
  teleportProps
15
37
  } = useBoundaryPortalAttachment({
16
- boundaryId,
17
- enabled
38
+ boundaryId
18
39
  });
19
- return /*#__PURE__*/_jsx(BoundaryPortalSlot, {
20
- id: boundaryId,
21
- enabled: enabled,
22
- animatedProps: teleportProps,
23
- placeholderRef: placeholderRef,
24
- children: children
40
+ const {
41
+ handleOnLayout,
42
+ placeholderStyle
43
+ } = usePlaceholderStyles();
44
+ return /*#__PURE__*/_jsx(Animated.View, {
45
+ ref: placeholderRef,
46
+ onLayout: ({
47
+ nativeEvent: {
48
+ layout
49
+ }
50
+ }) => runOnUI(handleOnLayout)(layout),
51
+ style: placeholderStyle,
52
+ pointerEvents: PORTAL_POINTER_EVENTS,
53
+ collapsable: false,
54
+ children: /*#__PURE__*/_jsx(EnabledNativePortal, {
55
+ animatedProps: teleportProps,
56
+ name: boundaryId,
57
+ pointerEvents: PORTAL_POINTER_EVENTS,
58
+ children: children
59
+ })
25
60
  });
26
61
  });
27
62
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["memo","BoundaryPortalSlot","useBoundaryPortalAttachment","jsx","_jsx","BoundaryPortal","boundaryId","children","enabled","placeholderRef","teleportProps","id","animatedProps"],"sourceRoot":"../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/index.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAAwB,OAAO;AAG5C,SAASC,kBAAkB,QAAQ,0BAA0B;AAC7D,SAASC,2BAA2B,QAAQ,wCAAwC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AASrF,OAAO,MAAMC,cAAc,gBAAGL,IAAI,CAAC,SAASK,cAAcA,CAAC;EAC1DC,UAAU;EACVC,QAAQ;EACRC,OAAO;EACPC;AACoB,CAAC,EAAE;EACvB,MAAM;IAAEC;EAAc,CAAC,GAAGR,2BAA2B,CAAC;IACrDI,UAAU;IACVE;EACD,CAAC,CAAC;EAEF,oBACCJ,IAAA,CAACH,kBAAkB;IAClBU,EAAE,EAAEL,UAAW;IACfE,OAAO,EAAEA,OAAQ;IACjBI,aAAa,EAAEF,aAAc;IAC7BD,cAAc,EAAEA,cAAe;IAAAF,QAAA,EAE9BA;EAAQ,CACU,CAAC;AAEvB,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["memo","Animated","runOnUI","logger","isTeleportAvailable","PORTAL_POINTER_EVENTS","NativePortal","TeleportPortal","useBoundaryPortalAttachment","usePlaceholderStyles","jsx","_jsx","AnimatedNativePortal","createAnimatedComponent","EnabledNativePortal","BoundaryPortal","boundaryId","children","enabled","placeholderRef","EnabledBoundaryPortal","__DEV__","warnOnce","teleportProps","handleOnLayout","placeholderStyle","View","ref","onLayout","nativeEvent","layout","style","pointerEvents","collapsable","animatedProps","name"],"sourceRoot":"../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/index.tsx"],"mappings":";;AAAA,SAGCA,IAAI,QAEE,OAAO;AAEd,OAAOC,QAAQ,IAAsBC,OAAO,QAAQ,yBAAyB;AAC7E,SAASC,MAAM,QAAQ,6BAA6B;AACpD,SACCC,mBAAmB,EACnBC,qBAAqB,EACrBC,YAAY,IAAIC,cAAc,QACxB,gBAAgB;AACvB,SAASC,2BAA2B,QAAQ,wCAAwC;AACpF,SAASC,oBAAoB,QAAQ,gCAAgC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAStE,MAAMC,oBAAoB,GAAGL,cAAc,GACxCN,QAAQ,CAACY,uBAAuB,CAChCN,cACD,CAAC,GACA,IAAI;AACP,MAAMO,mBAAmB,GAAGF,oBAE3B;AASD,OAAO,MAAMG,cAAc,gBAAGf,IAAI,CAAC,SAASe,cAAcA,CAAC;EAC1DC,UAAU;EACVC,QAAQ;EACRC,OAAO;EACPC;AACoB,CAAC,EAAE;EACvB,IAAI,CAACD,OAAO,IAAI,CAACd,mBAAmB,IAAI,CAACQ,oBAAoB,EAAE;IAC9D,OAAOK,QAAQ;EAChB;EAEA,oBACCN,IAAA,CAACS,qBAAqB;IACrBJ,UAAU,EAAEA,UAAW;IACvBG,cAAc,EAAEA,cAAe;IAAAF,QAAA,EAE9BA;EAAQ,CACa,CAAC;AAE1B,CAAC,CAAC;AAEF,MAAMG,qBAAqB,gBAAGpB,IAAI,CAAC,SAASoB,qBAAqBA,CAAC;EACjEJ,UAAU;EACVC,QAAQ;EACRE;AACqC,CAAC,EAAE;EACxC,IAAIE,OAAO,IAAI,CAACL,UAAU,EAAE;IAC3Bb,MAAM,CAACmB,QAAQ,CACd,mBAAmB,EACnB,iEACD,CAAC;EACF;EAEA,MAAM;IAAEC;EAAc,CAAC,GAAGf,2BAA2B,CAAC;IAAEQ;EAAW,CAAC,CAAC;EACrE,MAAM;IAAEQ,cAAc;IAAEC;EAAiB,CAAC,GAAGhB,oBAAoB,CAAC,CAAC;EAEnE,oBACCE,IAAA,CAACV,QAAQ,CAACyB,IAAI;IACbC,GAAG,EAAER,cAAe;IACpBS,QAAQ,EAAEA,CAAC;MAAEC,WAAW,EAAE;QAAEC;MAAO;IAAE,CAAC,KACrC5B,OAAO,CAACsB,cAAc,CAAC,CAACM,MAAM,CAC9B;IACDC,KAAK,EAAEN,gBAAiB;IACxBO,aAAa,EAAE3B,qBAAsB;IACrC4B,WAAW,EAAE,KAAM;IAAAhB,QAAA,eAEnBN,IAAA,CAACG,mBAAmB;MACnBoB,aAAa,EAAEX,aAAc;MAC7BY,IAAI,EAAEnB,UAAW;MACjBgB,aAAa,EAAE3B,qBAAsB;MAAAY,QAAA,EAEpCA;IAAQ,CACW;EAAC,CACR,CAAC;AAElB,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["useSyncExternalStore","EMPTY_SNAPSHOT","listeners","Set","hostStacks","Map","snapshot","getActiveHostFromStack","screenKey","stack","length","index","host","fallback","hostKey","buildSnapshot","nextSnapshot","emit","listener","subscribe","add","delete","registerHost","registration","get","previousActiveHostKey","nextStack","filter","unshift","push","set","unregisterHost","getActiveHostKey","useActiveHostKey","undefined","resetHostRegistry","clear"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/stores/host-registry.store.ts"],"mappings":";;AAAA,SAASA,oBAAoB,QAAQ,OAAO;AAW5C,MAAMC,cAAoC,GAAG,CAAC,CAAC;AAE/C,MAAMC,SAAS,GAAG,IAAIC,GAAG,CAAa,CAAC;AACvC,MAAMC,UAAU,GAAG,IAAIC,GAAG,CAA6B,CAAC;AAExD,IAAIC,QAA8B,GAAGL,cAAc;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA,MAAMM,sBAAsB,GAAGA,CAC9BC,SAAiB,EACjBC,KAAqC,KACjC;EACJ,IAAI,CAACA,KAAK,IAAIA,KAAK,CAACC,MAAM,KAAK,CAAC,EAAE;IACjC,OAAOF,SAAS;EACjB;EAEA,KAAK,IAAIG,KAAK,GAAGF,KAAK,CAACC,MAAM,GAAG,CAAC,EAAEC,KAAK,IAAI,CAAC,EAAEA,KAAK,EAAE,EAAE;IACvD,MAAMC,IAAI,GAAGH,KAAK,CAACE,KAAK,CAAC;IACzB,IAAI,CAACC,IAAI,CAACC,QAAQ,EAAE;MACnB,OAAOD,IAAI,CAACE,OAAO;IACpB;EACD;EAEA,OAAOL,KAAK,CAAC,CAAC,CAAC,EAAEK,OAAO,IAAIN,SAAS;AACtC,CAAC;AAED,MAAMO,aAAa,GAAGA,CAAA,KAA4B;EACjD,MAAMC,YAAkC,GAAG,CAAC,CAAC;EAE7C,KAAK,MAAM,CAACR,SAAS,EAAEC,KAAK,CAAC,IAAIL,UAAU,EAAE;IAC5CY,YAAY,CAACR,SAAS,CAAC,GAAGD,sBAAsB,CAACC,SAAS,EAAEC,KAAK,CAAC;EACnE;EAEA,OAAOO,YAAY;AACpB,CAAC;AAED,MAAMC,IAAI,GAAGA,CAAA,KAAM;EAClBX,QAAQ,GAAGS,aAAa,CAAC,CAAC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,KAAK,CAACkB,MAAM,CAAEf,IAAI,IAAKA,IAAI,CAACE,OAAO,KAAKA,OAAO,CAAC;EAElE,IAAIY,SAAS,CAAChB,MAAM,KAAK,CAAC,EAAE;IAC3BN,UAAU,CAACiB,MAAM,CAACb,SAAS,CAAC;EAC7B,CAAC,MAAM;IACNJ,UAAU,CAAC0B,GAAG,CAACtB,SAAS,EAAEkB,SAAS,CAAC;EACrC;EAEA,IAAID,qBAAqB,KAAKlB,sBAAsB,CAACC,SAAS,EAAEkB,SAAS,CAAC,EAAE;IAC3E;EACD;EAEAT,IAAI,CAAC,CAAC;AACP,CAAC;AAED,OAAO,MAAMe,gBAAgB,GAAIxB,SAAiB,IAAK;EACtD,OAAOF,QAAQ,CAACE,SAAS,CAAC,IAAIA,SAAS;AACxC,CAAC;AAED,OAAO,MAAMyB,gBAAgB,GAAIzB,SAAyB,IAAK;EAC9D,OAAOR,oBAAoB,CAC1BmB,SAAS,EACT,MAAOX,SAAS,GAAGwB,gBAAgB,CAACxB,SAAS,CAAC,GAAG0B,SAAU,EAC3D,MAAMA,SACP,CAAC;AACF,CAAC;AAED,OAAO,MAAMC,iBAAiB,GAAGA,CAAA,KAAM;EACtC/B,UAAU,CAACgC,KAAK,CAAC,CAAC;EAClB9B,QAAQ,GAAGL,cAAc;EACzBgB,IAAI,CAAC,CAAC;AACP,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useSyncExternalStore","EMPTY_SNAPSHOT","listeners","Set","hostStacks","Map","snapshot","getActiveHostFromStack","screenKey","stack","length","index","host","fallback","hostKey","buildSnapshot","nextSnapshot","emit","listener","subscribe","add","delete","registerHost","registration","get","previousActiveHostKey","nextStack","filter","unshift","push","set","unregisterHost","getActiveHostKey","useActiveHostKey","undefined","resetHostRegistry","clear"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/stores/host-registry.store.ts"],"mappings":";;AAAA,SAASA,oBAAoB,QAAQ,OAAO;AAU5C,MAAMC,cAAoC,GAA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,SAAS,EAAEkB,SAAS,CAAC;EACrC;EAEA,IAAID,qBAAqB,KAAKlB,sBAAsB,CAACC,SAAS,EAAEkB,SAAS,CAAC,EAAE;IAC3E;EACD;EAEAT,IAAI,CAAC,CAAC;AACP,CAAC;AAED,OAAO,MAAMe,gBAAgB,GAAIxB,SAAiB,IAAK;EACtD,OAAOF,QAAQ,CAACE,SAAS,CAAC,IAAIA,SAAS;AACxC,CAAC;AAED,OAAO,MAAMyB,gBAAgB,GAAIzB,SAAyB,IAAK;EAC9D,OAAOR,oBAAoB,CAC1BmB,SAAS,EACT,MAAOX,SAAS,GAAGwB,gBAAgB,CAACxB,SAAS,CAAC,GAAG0B,SAAU,EAC3D,MAAMA,SACP,CAAC;AACF,CAAC;AAED,OAAO,MAAMC,iBAAiB,GAAGA,CAAA,KAAM;EACtC/B,UAAU,CAACgC,KAAK,CAAC,CAAC;EAClB9B,QAAQ,GAAGL,cAAc;EACzBgB,IAAI,CAAC,CAAC;AACP,CAAC","ignoreList":[]}
@@ -25,7 +25,7 @@ const emit = () => {
25
25
  }
26
26
  };
27
27
  const isSameHost = (a, b) => {
28
- return a.boundaryId === b.boundaryId && a.escapeClipping === b.escapeClipping && a.hostKey === b.hostKey && a.localStylesMaps === b.localStylesMaps && a.pairKey === b.pairKey && a.portalHostName === b.portalHostName && a.screenKey === b.screenKey && a.slotsMap === b.slotsMap;
28
+ return a.boundaryId === b.boundaryId && a.hostKey === b.hostKey && a.localStylesMaps === b.localStylesMaps && a.pairKey === b.pairKey && a.portalHostName === b.portalHostName && a.portalHostReady === b.portalHostReady && a.screenKey === b.screenKey && a.slotsMap === b.slotsMap;
29
29
  };
30
30
  export const mountPortalBoundaryHost = host => {
31
31
  const previous = activeBoundaryHosts.get(host.portalHostName);
@@ -41,32 +41,6 @@ export const unmountPortalBoundaryHostByName = portalHostName => {
41
41
  }
42
42
  emit();
43
43
  };
44
-
45
- /**
46
- * Post-handoff GC: drop every receiver for this boundary except the one now
47
- * visible (`keepPortalHostName`). Called once the new host is confirmed on
48
- * screen so the superseded receivers stop rendering.
49
- */
50
- export const dropStalePortalBoundaryHosts = ({
51
- boundaryId,
52
- keepPortalHostName
53
- }) => {
54
- if (!activeBoundaryHosts.has(keepPortalHostName)) {
55
- return;
56
- }
57
- let didDelete = false;
58
- for (const [hostEntryKey, host] of activeBoundaryHosts) {
59
- if (host.boundaryId !== boundaryId || host.portalHostName === keepPortalHostName) {
60
- continue;
61
- }
62
- activeBoundaryHosts.delete(hostEntryKey);
63
- didDelete = true;
64
- }
65
- if (!didDelete) {
66
- return;
67
- }
68
- emit();
69
- };
70
44
  const subscribe = listener => {
71
45
  listeners.add(listener);
72
46
  return () => {