react-native-screen-transitions 4.0.0-alpha.8 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (308) hide show
  1. package/README.md +6 -11
  2. package/lib/commonjs/components/boundary/create-boundary-component.js +5 -1
  3. package/lib/commonjs/components/boundary/create-boundary-component.js.map +1 -1
  4. package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.js +53 -1
  5. package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.js.map +1 -1
  6. package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +43 -8
  7. package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -1
  8. package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +2 -3
  9. package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
  10. package/lib/commonjs/components/boundary/portal/teleport.js +1 -13
  11. package/lib/commonjs/components/boundary/portal/teleport.js.map +1 -1
  12. package/lib/commonjs/components/boundary/utils/source-signals.js +6 -4
  13. package/lib/commonjs/components/boundary/utils/source-signals.js.map +1 -1
  14. package/lib/commonjs/components/overlay/helpers/get-active-overlay.js +3 -24
  15. package/lib/commonjs/components/overlay/helpers/get-active-overlay.js.map +1 -1
  16. package/lib/commonjs/components/overlay/helpers/retain-ready-overlay-resources.js +4 -3
  17. package/lib/commonjs/components/overlay/helpers/retain-ready-overlay-resources.js.map +1 -1
  18. package/lib/commonjs/components/overlay/hooks/use-overlay-slot.js +1 -2
  19. package/lib/commonjs/components/overlay/hooks/use-overlay-slot.js.map +1 -1
  20. package/lib/commonjs/components/overlay/variations/float-overlay.js +0 -2
  21. package/lib/commonjs/components/overlay/variations/float-overlay.js.map +1 -1
  22. package/lib/commonjs/components/overlay/variations/overlay-host.js +18 -15
  23. package/lib/commonjs/components/overlay/variations/overlay-host.js.map +1 -1
  24. package/lib/commonjs/components/screen-container/layers/content.js +10 -5
  25. package/lib/commonjs/components/screen-container/layers/content.js.map +1 -1
  26. package/lib/commonjs/components/screen-container/layers/surface.js +50 -0
  27. package/lib/commonjs/components/screen-container/layers/surface.js.map +1 -0
  28. package/lib/commonjs/components/stack-view.js +7 -29
  29. package/lib/commonjs/components/stack-view.js.map +1 -1
  30. package/lib/commonjs/configs/index.js +1 -4
  31. package/lib/commonjs/configs/index.js.map +1 -1
  32. package/lib/commonjs/configs/presets.js +1 -384
  33. package/lib/commonjs/configs/presets.js.map +1 -1
  34. package/lib/commonjs/constants.js +2 -1
  35. package/lib/commonjs/constants.js.map +1 -1
  36. package/lib/commonjs/navigators/create-blank-stack-navigator.js +7 -67
  37. package/lib/commonjs/navigators/create-blank-stack-navigator.js.map +1 -1
  38. package/lib/commonjs/navigators/expo-router/index.js +1 -18
  39. package/lib/commonjs/navigators/expo-router/index.js.map +1 -1
  40. package/lib/commonjs/navigators/react-navigation/index.js +1 -3
  41. package/lib/commonjs/navigators/react-navigation/index.js.map +1 -1
  42. package/lib/commonjs/providers/screen/animation/animation.provider.js +6 -1
  43. package/lib/commonjs/providers/screen/animation/animation.provider.js.map +1 -1
  44. package/lib/commonjs/providers/screen/animation/helpers/build-screen-transition-options.js +1 -0
  45. package/lib/commonjs/providers/screen/animation/helpers/build-screen-transition-options.js.map +1 -1
  46. package/lib/commonjs/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.js +20 -5
  47. package/lib/commonjs/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.js.map +1 -1
  48. package/lib/commonjs/providers/screen/animation/helpers/hydrate-transition-state/index.js +16 -1
  49. package/lib/commonjs/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
  50. package/lib/commonjs/providers/screen/animation/helpers/selected-interpolator-options.js +1 -1
  51. package/lib/commonjs/providers/screen/animation/helpers/selected-interpolator-options.js.map +1 -1
  52. package/lib/commonjs/providers/screen/animation/use-screen-animation.js +1 -8
  53. package/lib/commonjs/providers/screen/animation/use-screen-animation.js.map +1 -1
  54. package/lib/commonjs/providers/screen/gestures/pan/behavior/pan-release.js +28 -6
  55. package/lib/commonjs/providers/screen/gestures/pan/behavior/pan-release.js.map +1 -1
  56. package/lib/commonjs/providers/screen/gestures/pinch/behavior/pinch-release.js +26 -6
  57. package/lib/commonjs/providers/screen/gestures/pinch/behavior/pinch-release.js.map +1 -1
  58. package/lib/commonjs/providers/screen/gestures/shared/policy.js +1 -0
  59. package/lib/commonjs/providers/screen/gestures/shared/policy.js.map +1 -1
  60. package/lib/commonjs/providers/screen/gestures/shared/snap-points.js +71 -1
  61. package/lib/commonjs/providers/screen/gestures/shared/snap-points.js.map +1 -1
  62. package/lib/commonjs/providers/screen/options/helpers.js +8 -1
  63. package/lib/commonjs/providers/screen/options/helpers.js.map +1 -1
  64. package/lib/commonjs/providers/screen/styles/constants.js +4 -1
  65. package/lib/commonjs/providers/screen/styles/constants.js.map +1 -1
  66. package/lib/commonjs/providers/screen/styles/hooks/slot-resolvers.js +1 -9
  67. package/lib/commonjs/providers/screen/styles/hooks/slot-resolvers.js.map +1 -1
  68. package/lib/commonjs/providers/screen/styles/slot.provider.js +3 -1
  69. package/lib/commonjs/providers/screen/styles/slot.provider.js.map +1 -1
  70. package/lib/commonjs/providers/stack/blank-stack-state/helpers/build-blank-stack-state.js +10 -4
  71. package/lib/commonjs/providers/stack/blank-stack-state/helpers/build-blank-stack-state.js.map +1 -1
  72. package/lib/commonjs/providers/stack/blank-stack-state/helpers/derive-blank-stack-state.js +4 -3
  73. package/lib/commonjs/providers/stack/blank-stack-state/helpers/derive-blank-stack-state.js.map +1 -1
  74. package/lib/commonjs/providers/stack/blank-stack-state/helpers/reconcile-blank-stack-routes.js.map +1 -1
  75. package/lib/commonjs/providers/stack/blank-stack-state/helpers/state-equality.js +9 -2
  76. package/lib/commonjs/providers/stack/blank-stack-state/helpers/state-equality.js.map +1 -1
  77. package/lib/commonjs/utils/create-provider.js +14 -3
  78. package/lib/commonjs/utils/create-provider.js.map +1 -1
  79. package/lib/module/components/boundary/create-boundary-component.js +6 -2
  80. package/lib/module/components/boundary/create-boundary-component.js.map +1 -1
  81. package/lib/module/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.js +50 -0
  82. package/lib/module/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.js.map +1 -1
  83. package/lib/module/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +44 -9
  84. package/lib/module/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -1
  85. package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +2 -3
  86. package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
  87. package/lib/module/components/boundary/portal/teleport.js +1 -14
  88. package/lib/module/components/boundary/portal/teleport.js.map +1 -1
  89. package/lib/module/components/boundary/utils/source-signals.js +6 -4
  90. package/lib/module/components/boundary/utils/source-signals.js.map +1 -1
  91. package/lib/module/components/overlay/helpers/get-active-overlay.js +3 -24
  92. package/lib/module/components/overlay/helpers/get-active-overlay.js.map +1 -1
  93. package/lib/module/components/overlay/helpers/retain-ready-overlay-resources.js +4 -3
  94. package/lib/module/components/overlay/helpers/retain-ready-overlay-resources.js.map +1 -1
  95. package/lib/module/components/overlay/hooks/use-overlay-slot.js +1 -2
  96. package/lib/module/components/overlay/hooks/use-overlay-slot.js.map +1 -1
  97. package/lib/module/components/overlay/variations/float-overlay.js +0 -2
  98. package/lib/module/components/overlay/variations/float-overlay.js.map +1 -1
  99. package/lib/module/components/overlay/variations/overlay-host.js +19 -16
  100. package/lib/module/components/overlay/variations/overlay-host.js.map +1 -1
  101. package/lib/module/components/screen-container/layers/content.js +10 -5
  102. package/lib/module/components/screen-container/layers/content.js.map +1 -1
  103. package/lib/module/components/screen-container/layers/surface.js +45 -0
  104. package/lib/module/components/screen-container/layers/surface.js.map +1 -0
  105. package/lib/module/components/stack-view.js +7 -29
  106. package/lib/module/components/stack-view.js.map +1 -1
  107. package/lib/module/configs/index.js +2 -5
  108. package/lib/module/configs/index.js.map +1 -1
  109. package/lib/module/configs/presets.js +0 -380
  110. package/lib/module/configs/presets.js.map +1 -1
  111. package/lib/module/constants.js +1 -0
  112. package/lib/module/constants.js.map +1 -1
  113. package/lib/module/navigators/create-blank-stack-navigator.js +7 -66
  114. package/lib/module/navigators/create-blank-stack-navigator.js.map +1 -1
  115. package/lib/module/navigators/expo-router/index.js +1 -18
  116. package/lib/module/navigators/expo-router/index.js.map +1 -1
  117. package/lib/module/navigators/react-navigation/index.js +1 -3
  118. package/lib/module/navigators/react-navigation/index.js.map +1 -1
  119. package/lib/module/providers/screen/animation/animation.provider.js +4 -0
  120. package/lib/module/providers/screen/animation/animation.provider.js.map +1 -1
  121. package/lib/module/providers/screen/animation/helpers/build-screen-transition-options.js +1 -0
  122. package/lib/module/providers/screen/animation/helpers/build-screen-transition-options.js.map +1 -1
  123. package/lib/module/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.js +20 -5
  124. package/lib/module/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.js.map +1 -1
  125. package/lib/module/providers/screen/animation/helpers/hydrate-transition-state/index.js +16 -1
  126. package/lib/module/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
  127. package/lib/module/providers/screen/animation/helpers/selected-interpolator-options.js +1 -1
  128. package/lib/module/providers/screen/animation/helpers/selected-interpolator-options.js.map +1 -1
  129. package/lib/module/providers/screen/animation/use-screen-animation.js +2 -9
  130. package/lib/module/providers/screen/animation/use-screen-animation.js.map +1 -1
  131. package/lib/module/providers/screen/gestures/pan/behavior/pan-release.js +29 -7
  132. package/lib/module/providers/screen/gestures/pan/behavior/pan-release.js.map +1 -1
  133. package/lib/module/providers/screen/gestures/pinch/behavior/pinch-release.js +27 -7
  134. package/lib/module/providers/screen/gestures/pinch/behavior/pinch-release.js.map +1 -1
  135. package/lib/module/providers/screen/gestures/shared/policy.js +2 -1
  136. package/lib/module/providers/screen/gestures/shared/policy.js.map +1 -1
  137. package/lib/module/providers/screen/gestures/shared/snap-points.js +66 -0
  138. package/lib/module/providers/screen/gestures/shared/snap-points.js.map +1 -1
  139. package/lib/module/providers/screen/options/helpers.js +9 -2
  140. package/lib/module/providers/screen/options/helpers.js.map +1 -1
  141. package/lib/module/providers/screen/styles/constants.js +4 -1
  142. package/lib/module/providers/screen/styles/constants.js.map +1 -1
  143. package/lib/module/providers/screen/styles/hooks/slot-resolvers.js +2 -10
  144. package/lib/module/providers/screen/styles/hooks/slot-resolvers.js.map +1 -1
  145. package/lib/module/providers/screen/styles/slot.provider.js +1 -0
  146. package/lib/module/providers/screen/styles/slot.provider.js.map +1 -1
  147. package/lib/module/providers/stack/blank-stack-state/helpers/build-blank-stack-state.js +11 -5
  148. package/lib/module/providers/stack/blank-stack-state/helpers/build-blank-stack-state.js.map +1 -1
  149. package/lib/module/providers/stack/blank-stack-state/helpers/derive-blank-stack-state.js +5 -4
  150. package/lib/module/providers/stack/blank-stack-state/helpers/derive-blank-stack-state.js.map +1 -1
  151. package/lib/module/providers/stack/blank-stack-state/helpers/reconcile-blank-stack-routes.js.map +1 -1
  152. package/lib/module/providers/stack/blank-stack-state/helpers/state-equality.js +7 -1
  153. package/lib/module/providers/stack/blank-stack-state/helpers/state-equality.js.map +1 -1
  154. package/lib/module/types/animation.types.js +10 -0
  155. package/lib/module/types/animation.types.js.map +1 -1
  156. package/lib/module/utils/create-provider.js +14 -3
  157. package/lib/module/utils/create-provider.js.map +1 -1
  158. package/lib/typescript/components/boundary/create-boundary-component.d.ts.map +1 -1
  159. package/lib/typescript/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.d.ts +20 -1
  160. package/lib/typescript/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.d.ts.map +1 -1
  161. package/lib/typescript/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.d.ts.map +1 -1
  162. package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts.map +1 -1
  163. package/lib/typescript/components/boundary/portal/teleport.d.ts +1 -1
  164. package/lib/typescript/components/boundary/portal/teleport.d.ts.map +1 -1
  165. package/lib/typescript/components/boundary/utils/source-signals.d.ts.map +1 -1
  166. package/lib/typescript/components/overlay/helpers/get-active-overlay.d.ts +2 -8
  167. package/lib/typescript/components/overlay/helpers/get-active-overlay.d.ts.map +1 -1
  168. package/lib/typescript/components/overlay/helpers/retain-ready-overlay-resources.d.ts +2 -1
  169. package/lib/typescript/components/overlay/helpers/retain-ready-overlay-resources.d.ts.map +1 -1
  170. package/lib/typescript/components/overlay/hooks/use-overlay-slot.d.ts.map +1 -1
  171. package/lib/typescript/components/overlay/variations/float-overlay.d.ts.map +1 -1
  172. package/lib/typescript/components/overlay/variations/overlay-host.d.ts +2 -3
  173. package/lib/typescript/components/overlay/variations/overlay-host.d.ts.map +1 -1
  174. package/lib/typescript/components/screen-container/layers/content.d.ts.map +1 -1
  175. package/lib/typescript/components/screen-container/layers/surface.d.ts +7 -0
  176. package/lib/typescript/components/screen-container/layers/surface.d.ts.map +1 -0
  177. package/lib/typescript/components/stack-view.d.ts +1 -1
  178. package/lib/typescript/components/stack-view.d.ts.map +1 -1
  179. package/lib/typescript/configs/index.d.ts +0 -9
  180. package/lib/typescript/configs/index.d.ts.map +1 -1
  181. package/lib/typescript/configs/presets.d.ts +0 -9
  182. package/lib/typescript/configs/presets.d.ts.map +1 -1
  183. package/lib/typescript/constants.d.ts +2 -1
  184. package/lib/typescript/constants.d.ts.map +1 -1
  185. package/lib/typescript/index.d.ts +1 -10
  186. package/lib/typescript/index.d.ts.map +1 -1
  187. package/lib/typescript/navigators/create-blank-stack-navigator.d.ts +2 -4
  188. package/lib/typescript/navigators/create-blank-stack-navigator.d.ts.map +1 -1
  189. package/lib/typescript/navigators/expo-router/index.d.ts +3 -3
  190. package/lib/typescript/navigators/expo-router/index.d.ts.map +1 -1
  191. package/lib/typescript/navigators/react-navigation/index.d.ts +1 -1
  192. package/lib/typescript/navigators/react-navigation/index.d.ts.map +1 -1
  193. package/lib/typescript/providers/screen/animation/animation.provider.d.ts +10 -1
  194. package/lib/typescript/providers/screen/animation/animation.provider.d.ts.map +1 -1
  195. package/lib/typescript/providers/screen/animation/helpers/build-screen-transition-options.d.ts.map +1 -1
  196. package/lib/typescript/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.d.ts +2 -1
  197. package/lib/typescript/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.d.ts.map +1 -1
  198. package/lib/typescript/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts.map +1 -1
  199. package/lib/typescript/providers/screen/animation/helpers/selected-interpolator-options.d.ts.map +1 -1
  200. package/lib/typescript/providers/screen/animation/use-screen-animation.d.ts.map +1 -1
  201. package/lib/typescript/providers/screen/gestures/pan/behavior/pan-release.d.ts.map +1 -1
  202. package/lib/typescript/providers/screen/gestures/pinch/behavior/pinch-release.d.ts.map +1 -1
  203. package/lib/typescript/providers/screen/gestures/shared/policy.d.ts +2 -1
  204. package/lib/typescript/providers/screen/gestures/shared/policy.d.ts.map +1 -1
  205. package/lib/typescript/providers/screen/gestures/shared/snap-points.d.ts +11 -0
  206. package/lib/typescript/providers/screen/gestures/shared/snap-points.d.ts.map +1 -1
  207. package/lib/typescript/providers/screen/gestures/types.d.ts +2 -0
  208. package/lib/typescript/providers/screen/gestures/types.d.ts.map +1 -1
  209. package/lib/typescript/providers/screen/options/helpers.d.ts.map +1 -1
  210. package/lib/typescript/providers/screen/options/types.d.ts +1 -0
  211. package/lib/typescript/providers/screen/options/types.d.ts.map +1 -1
  212. package/lib/typescript/providers/screen/styles/constants.d.ts.map +1 -1
  213. package/lib/typescript/providers/screen/styles/hooks/slot-resolvers.d.ts.map +1 -1
  214. package/lib/typescript/providers/screen/styles/slot.provider.d.ts +11 -2
  215. package/lib/typescript/providers/screen/styles/slot.provider.d.ts.map +1 -1
  216. package/lib/typescript/providers/stack/blank-stack-state/helpers/build-blank-stack-state.d.ts +3 -3
  217. package/lib/typescript/providers/stack/blank-stack-state/helpers/build-blank-stack-state.d.ts.map +1 -1
  218. package/lib/typescript/providers/stack/blank-stack-state/helpers/derive-blank-stack-state.d.ts.map +1 -1
  219. package/lib/typescript/providers/stack/blank-stack-state/helpers/reconcile-blank-stack-routes.d.ts +3 -2
  220. package/lib/typescript/providers/stack/blank-stack-state/helpers/reconcile-blank-stack-routes.d.ts.map +1 -1
  221. package/lib/typescript/providers/stack/blank-stack-state/helpers/state-equality.d.ts +4 -4
  222. package/lib/typescript/providers/stack/blank-stack-state/helpers/state-equality.d.ts.map +1 -1
  223. package/lib/typescript/providers/stack/blank-stack-state/helpers/types.d.ts +6 -5
  224. package/lib/typescript/providers/stack/blank-stack-state/helpers/types.d.ts.map +1 -1
  225. package/lib/typescript/providers/stack/blank-stack.provider.d.ts +3 -1
  226. package/lib/typescript/providers/stack/blank-stack.provider.d.ts.map +1 -1
  227. package/lib/typescript/types/animation.types.d.ts +16 -12
  228. package/lib/typescript/types/animation.types.d.ts.map +1 -1
  229. package/lib/typescript/types/blank-stack.types.d.ts +2 -23
  230. package/lib/typescript/types/blank-stack.types.d.ts.map +1 -1
  231. package/lib/typescript/types/index.d.ts +2 -2
  232. package/lib/typescript/types/index.d.ts.map +1 -1
  233. package/lib/typescript/types/providers/blank-stack-provider.types.d.ts +8 -6
  234. package/lib/typescript/types/providers/blank-stack-provider.types.d.ts.map +1 -1
  235. package/lib/typescript/types/screen.types.d.ts +50 -0
  236. package/lib/typescript/types/screen.types.d.ts.map +1 -1
  237. package/lib/typescript/utils/create-provider.d.ts +4 -1
  238. package/lib/typescript/utils/create-provider.d.ts.map +1 -1
  239. package/package.json +3 -8
  240. package/src/components/boundary/create-boundary-component.tsx +10 -2
  241. package/src/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.ts +89 -0
  242. package/src/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.ts +97 -14
  243. package/src/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts +2 -6
  244. package/src/components/boundary/portal/teleport.ts +2 -23
  245. package/src/components/boundary/utils/source-signals.ts +6 -4
  246. package/src/components/overlay/helpers/get-active-overlay.ts +4 -36
  247. package/src/components/overlay/helpers/retain-ready-overlay-resources.ts +10 -1
  248. package/src/components/overlay/hooks/use-overlay-slot.ts +1 -5
  249. package/src/components/overlay/variations/float-overlay.tsx +9 -12
  250. package/src/components/overlay/variations/overlay-host.tsx +24 -22
  251. package/src/components/screen-container/layers/content.tsx +12 -7
  252. package/src/components/screen-container/layers/surface.tsx +65 -0
  253. package/src/components/stack-view.tsx +8 -39
  254. package/src/configs/index.ts +0 -6
  255. package/src/configs/presets.ts +0 -447
  256. package/src/constants.ts +2 -0
  257. package/src/index.ts +4 -1
  258. package/src/navigators/create-blank-stack-navigator.tsx +16 -124
  259. package/src/navigators/expo-router/index.tsx +0 -23
  260. package/src/navigators/react-navigation/index.tsx +0 -3
  261. package/src/providers/screen/animation/animation.provider.tsx +60 -54
  262. package/src/providers/screen/animation/helpers/build-screen-transition-options.ts +1 -0
  263. package/src/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.ts +26 -0
  264. package/src/providers/screen/animation/helpers/hydrate-transition-state/index.ts +20 -0
  265. package/src/providers/screen/animation/helpers/selected-interpolator-options.ts +1 -0
  266. package/src/providers/screen/animation/use-screen-animation.tsx +2 -14
  267. package/src/providers/screen/gestures/pan/behavior/pan-release.ts +46 -7
  268. package/src/providers/screen/gestures/pinch/behavior/pinch-release.ts +45 -4
  269. package/src/providers/screen/gestures/shared/policy.ts +4 -0
  270. package/src/providers/screen/gestures/shared/snap-points.ts +87 -0
  271. package/src/providers/screen/gestures/types.ts +2 -0
  272. package/src/providers/screen/options/helpers.ts +18 -0
  273. package/src/providers/screen/options/types.ts +1 -0
  274. package/src/providers/screen/styles/constants.ts +2 -1
  275. package/src/providers/screen/styles/hooks/slot-resolvers.tsx +2 -17
  276. package/src/providers/screen/styles/slot.provider.tsx +2 -1
  277. package/src/providers/stack/blank-stack-state/helpers/build-blank-stack-state.ts +30 -12
  278. package/src/providers/stack/blank-stack-state/helpers/derive-blank-stack-state.ts +11 -3
  279. package/src/providers/stack/blank-stack-state/helpers/reconcile-blank-stack-routes.ts +2 -2
  280. package/src/providers/stack/blank-stack-state/helpers/state-equality.ts +27 -16
  281. package/src/providers/stack/blank-stack-state/helpers/types.ts +9 -4
  282. package/src/types/animation.types.ts +16 -13
  283. package/src/types/blank-stack.types.ts +1 -29
  284. package/src/types/index.ts +4 -1
  285. package/src/types/providers/blank-stack-provider.types.ts +14 -11
  286. package/src/types/screen.types.ts +57 -0
  287. package/src/utils/create-provider.tsx +22 -4
  288. package/lib/commonjs/components/boundary/portal/utils/teleport-control.js +0 -16
  289. package/lib/commonjs/components/boundary/portal/utils/teleport-control.js.map +0 -1
  290. package/lib/commonjs/providers/navigation/navigation-host.provider.js +0 -56
  291. package/lib/commonjs/providers/navigation/navigation-host.provider.js.map +0 -1
  292. package/lib/commonjs/providers/navigation/react-navigation-host.js +0 -23
  293. package/lib/commonjs/providers/navigation/react-navigation-host.js.map +0 -1
  294. package/lib/module/components/boundary/portal/utils/teleport-control.js +0 -11
  295. package/lib/module/components/boundary/portal/utils/teleport-control.js.map +0 -1
  296. package/lib/module/providers/navigation/navigation-host.provider.js +0 -50
  297. package/lib/module/providers/navigation/navigation-host.provider.js.map +0 -1
  298. package/lib/module/providers/navigation/react-navigation-host.js +0 -19
  299. package/lib/module/providers/navigation/react-navigation-host.js.map +0 -1
  300. package/lib/typescript/components/boundary/portal/utils/teleport-control.d.ts +0 -3
  301. package/lib/typescript/components/boundary/portal/utils/teleport-control.d.ts.map +0 -1
  302. package/lib/typescript/providers/navigation/navigation-host.provider.d.ts +0 -21
  303. package/lib/typescript/providers/navigation/navigation-host.provider.d.ts.map +0 -1
  304. package/lib/typescript/providers/navigation/react-navigation-host.d.ts +0 -3
  305. package/lib/typescript/providers/navigation/react-navigation-host.d.ts.map +0 -1
  306. package/src/components/boundary/portal/utils/teleport-control.ts +0 -13
  307. package/src/providers/navigation/navigation-host.provider.tsx +0 -75
  308. package/src/providers/navigation/react-navigation-host.tsx +0 -24
@@ -30,6 +30,15 @@ export type ScreenLayouts = {
30
30
  };
31
31
  export type ScreenKey = string;
32
32
  export type SheetScrollGestureBehavior = "expand-and-collapse" | "collapse-only";
33
+ /**
34
+ * Controls how a drag moves between configured {@linkcode ScreenTransitionConfig.snapPoints}.
35
+ *
36
+ * - `"continuous"` maps physical movement directly to global screen progress.
37
+ * - `"step"` maps each drag across one adjacent snap interval.
38
+ *
39
+ * @see {@linkcode ScreenTransitionConfig.sheetSnapBehavior}
40
+ */
41
+ export type SheetSnapBehavior = "continuous" | "step";
33
42
  export type GestureTracking = "auto" | "never" | "always";
34
43
  /**
35
44
  * A single snap point value. Either a fraction of screen height (0–1) or
@@ -71,6 +80,16 @@ export type ScreenContentComponentProps = ScreenLayerComponentProps & {
71
80
  */
72
81
  children: ReactNode;
73
82
  };
83
+ /**
84
+ * Props passed to {@linkcode ScreenTransitionConfig.surfaceComponent} when it
85
+ * is provided as a render-style component.
86
+ */
87
+ export type ScreenSurfaceComponentProps = ScreenLayerComponentProps & {
88
+ /**
89
+ * The screen subtree rendered inside the visual surface layer.
90
+ */
91
+ children: ReactNode;
92
+ };
74
93
  /**
75
94
  * Custom renderer for the backdrop layer.
76
95
  *
@@ -91,6 +110,17 @@ export type ScreenBackdropComponent = ComponentType<any> | ComponentType<ScreenB
91
110
  * @see {@linkcode ScreenTransitionConfig.contentComponent}
92
111
  */
93
112
  export type ScreenContentComponent = ComponentType<any> | ComponentType<ScreenContentComponentProps>;
113
+ /**
114
+ * Custom renderer for the screen's visual surface layer.
115
+ *
116
+ * The surface is nested inside the content layer and does not contain the
117
+ * shared-element fallback host. Use it for visual effects such as filters,
118
+ * clipping, backgrounds, and corner treatments without changing navigation
119
+ * geometry.
120
+ *
121
+ * @see {@linkcode ScreenTransitionConfig.surfaceComponent}
122
+ */
123
+ export type ScreenSurfaceComponent = ComponentType<any> | ComponentType<ScreenSurfaceComponentProps>;
94
124
  /**
95
125
  * Controls how an inactive screen is retained after it is no longer active.
96
126
  *
@@ -298,6 +328,16 @@ export type ScreenTransitionConfig = {
298
328
  * @default "expand-and-collapse"
299
329
  */
300
330
  sheetScrollGestureBehavior?: SheetScrollGestureBehavior;
331
+ /**
332
+ * Controls how gesture movement maps between adjacent snap points.
333
+ *
334
+ * `"continuous"` preserves direct global progress and permits one gesture to
335
+ * cross multiple snap points. `"step"` gives every adjacent interval a full
336
+ * normalized drag range and limits the gesture to one snap-point step.
337
+ *
338
+ * @default "continuous"
339
+ */
340
+ sheetSnapBehavior?: SheetSnapBehavior;
301
341
  /**
302
342
  * Locks gesture-based snap movement to the current snap point.
303
343
  *
@@ -372,5 +412,15 @@ export type ScreenTransitionConfig = {
372
412
  * @default undefined
373
413
  */
374
414
  contentComponent?: ScreenContentComponent;
415
+ /**
416
+ * Custom component to render as the screen's visual surface layer.
417
+ *
418
+ * The component receives the `surface` slot's animated styles and props. It
419
+ * is nested inside the content layer while shared-element fallback content
420
+ * remains outside it.
421
+ *
422
+ * @default undefined
423
+ */
424
+ surfaceComponent?: ScreenSurfaceComponent;
375
425
  };
376
426
  //# sourceMappingURL=screen.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"screen.types.d.ts","sourceRoot":"","sources":["../../../src/types/screen.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EACX,uBAAuB,EACvB,c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IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAE/B;;OAEG;IACH,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAE3B;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;;;;;;;OASG;IACH,kCAAkC,CAAC,EAAE,OAAO,CAAC;IAE7C;;;;;;;;;OASG;IACH,kCAAkC,CAAC,EAAE,OAAO,CAAC;IAE7C;;;;;;;;;;;;;;OAcG;IACH,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;IAEzB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;;;;;;;;;OAWG;IACH,0BAA0B,CAAC,EAAE,0BAA0B,CAAC;IAExD;;;;;;;;OAQG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IAEtC;;;;;;;;OAQG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B;;;;;;;;;OASG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;IAE5C;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,gBAAgB,CAAC,EAAE,sBAAsB,CAAC;IAE1C;;;;;;;;OAQG;IACH,gBAAgB,CAAC,EAAE,sBAAsB,CAAC;CAC1C,CAAC"}
@@ -43,6 +43,7 @@ type ResolvedOptionalProviderStoreHook<ContextValue, Global extends boolean> = O
43
43
  type ProviderFactoryResult<ContextValue, Global extends boolean> = {
44
44
  value: ContextValue;
45
45
  children?: ReactNode;
46
+ unregisterOnCleanup?: boolean;
46
47
  } & (Global extends true ? {
47
48
  key: string;
48
49
  } : {
@@ -52,9 +53,11 @@ export default function createProvider<ProviderName extends string, Global exten
52
53
  global?: Global;
53
54
  }): <ProviderProps extends object, ContextValue>(factory: (props: ProviderProps) => ProviderFactoryResult<ContextValue, Global>) => {
54
55
  StoreProvider: {
55
- ({ children, storeKey, value, }: {
56
+ ({ children, registerGlobally, storeKey, unregisterOnCleanup, value, }: {
56
57
  children?: ReactNode;
58
+ registerGlobally?: boolean;
57
59
  storeKey?: string;
60
+ unregisterOnCleanup?: boolean;
58
61
  value: ContextValue;
59
62
  }): import("react").JSX.Element;
60
63
  displayName: string;
@@ -1 +1 @@
1
- {"version":3,"file":"create-provider.d.ts","sourceRoot":"","sources":["../../../src/utils/create-provider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAEN,KAAK,SAAS,EAMd,MAAM,OAAO,CAAC;AAEf,KAAK,iBAAiB,CAAC,YAAY,IAAI;IACtC,IAAI,YAAY,CAAC;IACjB,CAAC,QAAQ,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,QAAQ,GAAG,QAAQ,CAAC;CAClE,CAAC;AAEF,KAAK,uBAAuB,CAAC,YAAY,IAAI;IAC5C,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAAC;IAC5B,CAAC,QAAQ,EACR,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,QAAQ,GACzC,QAAQ,CAAC;CACZ,CAAC;AAEF,KAAK,yBAAyB,CAAC,YAAY,IAAI;IAC9C,IAAI,YAAY,GAAG,IAAI,CAAC;IACxB,CAAC,QAAQ,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,KAAK,QAAQ,GAAG,QAAQ,CAAC;CACzE,CAAC;AAEF,KAAK,+BAA+B,CAAC,YAAY,IAAI;IACpD,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,YAAY,GAAG,IAAI,CAAC;IAC1C,CAAC,QAAQ,EACR,GAAG,EAAE,MAAM,GAAG,IAAI,EAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,QAAQ,GACzC,QAAQ,GA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GAAG,CAAC,UAAU,GAAG,KAAK,CAAC,EAAE,CAAC,aAAa,CAAC,GAC9D,GAAG,GACF,CAAC,IAAI,YAAY,IAAI,cAAc,CAAC,OAAO,GAAG,iCAAiC,CAC/E,YAAY,EACZ,MAAM,CACN,GACD,GAAG,GACF,CAAC,IAAI,YAAY,IAAI,MAAM,CAAC,OAAO,GAAG,yBAAyB,CAC/D,YAAY,EACZ,MAAM,CACN,GACD,CAEF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-screen-transitions",
3
- "version": "4.0.0-alpha.8",
3
+ "version": "4.0.0",
4
4
  "description": "Easy screen transitions for React Native and Expo",
5
5
  "author": "Ed",
6
6
  "license": "MIT",
@@ -70,20 +70,15 @@
70
70
  "peerDependencies": {
71
71
  "@react-navigation/native": ">=7.3.0",
72
72
  "@types/react": "*",
73
- "@types/react-native": "*",
74
- "expo-router": ">=56.2.10",
75
73
  "react": ">=19.2.0",
76
74
  "react-native": "*",
77
75
  "react-native-gesture-handler": ">=2.16.1",
78
76
  "react-native-reanimated": ">=4.0.0",
79
77
  "react-native-safe-area-context": "*",
80
- "react-native-teleport": ">=1.1.0 <1.1.11",
81
- "react-native-worklets": "0.8.x"
78
+ "react-native-teleport": ">=1.2.0",
79
+ "react-native-worklets": ">=0.8.0"
82
80
  },
83
81
  "peerDependenciesMeta": {
84
- "expo-router": {
85
- "optional": true
86
- },
87
82
  "react-native-teleport": {
88
83
  "optional": true
89
84
  }
@@ -10,7 +10,10 @@ import {
10
10
  BOUNDARY_TARGET_ACTIVE_PROP,
11
11
  BoundaryTarget,
12
12
  } from "./components/boundary-target";
13
- import { BoundaryContentPortalHost } from "./portal/components/boundary-content-portal";
13
+ import {
14
+ BoundaryContentPortal,
15
+ BoundaryContentPortalHost,
16
+ } from "./portal/components/boundary-content-portal";
14
17
  import { BoundaryPortal } from "./portal/components/boundary-portal";
15
18
  import { BoundaryRootProvider } from "./providers/boundary-root.provider";
16
19
  import type { BoundaryComponentProps } from "./types";
@@ -91,7 +94,12 @@ export function createBoundaryComponent<P extends object>(
91
94
  enabled={root.shouldRenderHandoffHost}
92
95
  screenKey={root.currentScreenKey}
93
96
  >
94
- {targetResolution.children}
97
+ <BoundaryContentPortal
98
+ boundaryId={root.boundTag.tag}
99
+ enabled={root.shouldRenderHandoffHost}
100
+ >
101
+ {targetResolution.children}
102
+ </BoundaryContentPortal>
95
103
  </BoundaryContentPortalHost>
96
104
  </AnimatedComponent>
97
105
  </BoundaryPortal>
@@ -1,3 +1,6 @@
1
+ import type { ScreenPairKey } from "../../../../../../stores/bounds/types";
2
+ import type { BoundaryHandoffTarget } from "../../../../../../types/animation.types";
3
+
1
4
  type ReceiverRoute = {
2
5
  key: string;
3
6
  };
@@ -57,6 +60,7 @@ export const resolveHandoffAttachmentCandidate = ({
57
60
  interpolatorReady,
58
61
  pairChangedDuringClose = false,
59
62
  pairDestinationScreenKey,
63
+ pairHasBoundaryLink,
60
64
  previousReceiverScreenKey,
61
65
  }: {
62
66
  activeReceiverClosing: boolean;
@@ -66,9 +70,20 @@ export const resolveHandoffAttachmentCandidate = ({
66
70
  interpolatorReady: boolean;
67
71
  pairChangedDuringClose?: boolean;
68
72
  pairDestinationScreenKey: string | null;
73
+ pairHasBoundaryLink?: boolean;
69
74
  previousReceiverScreenKey: string | null;
70
75
  }) => {
71
76
  "worklet";
77
+ const currentPairHasBoundaryLink =
78
+ pairHasBoundaryLink ?? pairDestinationScreenKey !== null;
79
+
80
+ if (
81
+ activeReceiverClosing &&
82
+ attachedReceiverScreenKey !== activeReceiverScreenKey &&
83
+ !currentPairHasBoundaryLink
84
+ ) {
85
+ return attachedReceiverScreenKey;
86
+ }
72
87
 
73
88
  if (
74
89
  activeReceiverClosing &&
@@ -79,6 +94,16 @@ export const resolveHandoffAttachmentCandidate = ({
79
94
  return pairDestinationScreenKey;
80
95
  }
81
96
 
97
+ if (
98
+ activeReceiverClosing &&
99
+ pairChangedDuringClose &&
100
+ !currentPairHasBoundaryLink
101
+ ) {
102
+ return hasActiveCloseFinished
103
+ ? previousReceiverScreenKey
104
+ : attachedReceiverScreenKey;
105
+ }
106
+
82
107
  if (
83
108
  hasActiveCloseFinished &&
84
109
  attachedReceiverScreenKey === activeReceiverScreenKey
@@ -101,3 +126,67 @@ export const resolveHandoffAttachmentCandidate = ({
101
126
 
102
127
  return activeReceiverScreenKey;
103
128
  };
129
+
130
+ export const resolveRequestedHandoffReceiver = ({
131
+ automaticScreenKey,
132
+ destinationReady = true,
133
+ destinationScreenKey,
134
+ handoffTarget,
135
+ sourceScreenKey,
136
+ }: {
137
+ automaticScreenKey: string | null;
138
+ destinationReady?: boolean;
139
+ destinationScreenKey: string | null;
140
+ handoffTarget: BoundaryHandoffTarget | undefined;
141
+ sourceScreenKey: string | null;
142
+ }) => {
143
+ "worklet";
144
+
145
+ if (handoffTarget === "source") {
146
+ return sourceScreenKey;
147
+ }
148
+
149
+ if (handoffTarget === "destination") {
150
+ return destinationReady ? destinationScreenKey : automaticScreenKey;
151
+ }
152
+
153
+ return automaticScreenKey;
154
+ };
155
+
156
+ export const resolveRequestedHandoffPairKey = ({
157
+ destinationPairHasCompleteLink,
158
+ destinationPairKey,
159
+ handoffTarget,
160
+ retainedSourcePairHasCompleteLink,
161
+ retainedSourcePairKey,
162
+ sourcePairHasCompleteLink,
163
+ sourcePairKey,
164
+ }: {
165
+ destinationPairHasCompleteLink: boolean;
166
+ destinationPairKey: ScreenPairKey | undefined;
167
+ handoffTarget: BoundaryHandoffTarget | undefined;
168
+ retainedSourcePairHasCompleteLink: boolean;
169
+ retainedSourcePairKey: ScreenPairKey | undefined;
170
+ sourcePairHasCompleteLink: boolean;
171
+ sourcePairKey: ScreenPairKey | undefined;
172
+ }) => {
173
+ "worklet";
174
+
175
+ if (handoffTarget === "source" || handoffTarget === "destination") {
176
+ if (sourcePairHasCompleteLink) {
177
+ return sourcePairKey;
178
+ }
179
+
180
+ if (destinationPairHasCompleteLink) {
181
+ return destinationPairKey;
182
+ }
183
+
184
+ if (retainedSourcePairHasCompleteLink) {
185
+ return retainedSourcePairKey;
186
+ }
187
+
188
+ return sourcePairKey ?? destinationPairKey ?? retainedSourcePairKey;
189
+ }
190
+
191
+ return sourcePairKey;
192
+ };
@@ -9,14 +9,23 @@ import { useBlankStackStore } from "../../../../../../providers/stack/blank-stac
9
9
  import { AnimationStore } from "../../../../../../stores/animation.store";
10
10
  import { getLinkKeyFromTag } from "../../../../../../stores/bounds/helpers/link-pairs.helpers";
11
11
  import { getEntry } from "../../../../../../stores/bounds/internals/entries";
12
+ import {
13
+ getPairKeyForDestination,
14
+ getPairKeyForSource,
15
+ } from "../../../../../../stores/bounds/internals/links";
12
16
  import { pairs } from "../../../../../../stores/bounds/internals/state";
17
+ import type {
18
+ LinkPairState,
19
+ TagLink,
20
+ } from "../../../../../../stores/bounds/types";
13
21
  import { SystemStore } from "../../../../../../stores/system.store";
14
22
  import { PORTAL_HOST_NAME_RESET_VALUE } from "../../../utils/naming";
15
- import { isTeleportEnabled } from "../../../utils/teleport-control";
16
23
  import {
17
24
  resolveActiveHandoffReceiver,
18
25
  resolveHandoffAttachmentCandidate,
19
26
  resolvePreviousHandoffReceiver,
27
+ resolveRequestedHandoffPairKey,
28
+ resolveRequestedHandoffReceiver,
20
29
  } from "../helpers/active-handoff-receiver";
21
30
  import { createBoundaryContentPortalHostName } from "../helpers/host-name";
22
31
 
@@ -24,6 +33,19 @@ interface UseBoundaryContentPortalAttachmentParams {
24
33
  boundaryId: string;
25
34
  }
26
35
 
36
+ const isCompleteActiveLink = (
37
+ pair: LinkPairState | null | undefined,
38
+ link: TagLink | undefined,
39
+ boundaryLinkKey: string,
40
+ ) => {
41
+ "worklet";
42
+
43
+ return (
44
+ link?.status === "complete" &&
45
+ (!link.group || pair?.groups[link.group]?.activeId === boundaryLinkKey)
46
+ );
47
+ };
48
+
27
49
  export const useBoundaryContentPortalAttachment = ({
28
50
  boundaryId,
29
51
  }: UseBoundaryContentPortalAttachmentParams) => {
@@ -34,6 +56,9 @@ export const useBoundaryContentPortalAttachment = ({
34
56
  );
35
57
  const nextScreenKey = useDescriptorsStore((s) => s.derivations.nextScreenKey);
36
58
  const sourcePairKey = useDescriptorsStore((s) => s.derivations.sourcePairKey);
59
+ const destinationPairKey = useDescriptorsStore(
60
+ (s) => s.derivations.destinationPairKey,
61
+ );
37
62
  const destinationSlots = useOptionalScreenSlotStore(
38
63
  nextScreenKey ?? currentScreenKey,
39
64
  );
@@ -67,11 +92,9 @@ export const useBoundaryContentPortalAttachment = ({
67
92
  const slot = slotsMap.get()[boundaryId];
68
93
  const {
69
94
  pointerEvents: _pointerEvents,
70
- teleport,
95
+ handoffTarget,
71
96
  ...slotProps
72
97
  } = slot?.props ?? {};
73
-
74
- const shouldTeleport = isTeleportEnabled(teleport);
75
98
  const closing = activeReceiverClosing.get();
76
99
  const animationProgress = activeReceiverAnimationProgress.get();
77
100
 
@@ -89,20 +112,65 @@ export const useBoundaryContentPortalAttachment = ({
89
112
  animationProgress,
90
113
  });
91
114
 
92
- const pair = sourcePairKey ? pairs.get()[sourcePairKey] : null;
93
- const link = pair?.links[getLinkKeyFromTag(boundaryId)];
115
+ const automaticPair = sourcePairKey ? pairs.get()[sourcePairKey] : null;
116
+ const boundaryLinkKey = getLinkKeyFromTag(boundaryId);
117
+ const automaticLink = automaticPair?.links[boundaryLinkKey];
118
+ const requestedSourcePairKey =
119
+ getPairKeyForSource(boundaryId, currentScreenKey) ?? sourcePairKey;
120
+ const requestedSourcePair = requestedSourcePairKey
121
+ ? pairs.get()[requestedSourcePairKey]
122
+ : null;
123
+ const requestedSourceLink = requestedSourcePair?.links[boundaryLinkKey];
94
124
 
95
125
  const pairDestination =
96
- link?.status === "complete" &&
97
- (!link.group ||
98
- pair?.groups[link.group]?.activeId === getLinkKeyFromTag(boundaryId))
99
- ? link.destination.screenKey
126
+ automaticLink?.status === "complete" &&
127
+ (!automaticLink.group ||
128
+ automaticPair?.groups[automaticLink.group]?.activeId ===
129
+ boundaryLinkKey)
130
+ ? automaticLink.destination.screenKey
100
131
  : null;
132
+ const requestedDestinationPairKey =
133
+ getPairKeyForDestination(boundaryId, currentScreenKey) ??
134
+ destinationPairKey;
135
+ const destinationPair = requestedDestinationPairKey
136
+ ? pairs.get()[requestedDestinationPairKey]
137
+ : null;
138
+ const destinationLink = destinationPair?.links[boundaryLinkKey];
139
+ const retainedSourcePairKey = sourcePairBeforeClose.get() ?? undefined;
140
+ const retainedSourcePair = retainedSourcePairKey
141
+ ? pairs.get()[retainedSourcePairKey]
142
+ : null;
143
+ const retainedSourceLink = retainedSourcePair?.links[boundaryLinkKey];
144
+ const requestedPairKey = resolveRequestedHandoffPairKey({
145
+ destinationPairHasCompleteLink: isCompleteActiveLink(
146
+ destinationPair,
147
+ destinationLink,
148
+ boundaryLinkKey,
149
+ ),
150
+ destinationPairKey: requestedDestinationPairKey,
151
+ handoffTarget,
152
+ retainedSourcePairHasCompleteLink: isCompleteActiveLink(
153
+ retainedSourcePair,
154
+ retainedSourceLink,
155
+ boundaryLinkKey,
156
+ ),
157
+ retainedSourcePairKey,
158
+ sourcePairHasCompleteLink: isCompleteActiveLink(
159
+ requestedSourcePair,
160
+ requestedSourceLink,
161
+ boundaryLinkKey,
162
+ ),
163
+ sourcePairKey: requestedSourcePairKey,
164
+ });
165
+ const requestedPair = requestedPairKey
166
+ ? pairs.get()[requestedPairKey]
167
+ : null;
168
+ const requestedLink = requestedPair?.links[boundaryLinkKey];
101
169
 
102
170
  const isInterpolatorReady = interpolatorReady.get();
103
171
  const attachedScreenKey = attachedReceiverScreenKey.get();
104
172
 
105
- const nextReceiverScreenKey = resolveHandoffAttachmentCandidate({
173
+ const automaticReceiverScreenKey = resolveHandoffAttachmentCandidate({
106
174
  activeReceiverClosing: !!closing,
107
175
  activeReceiverScreenKey,
108
176
  attachedReceiverScreenKey: attachedScreenKey,
@@ -110,8 +178,25 @@ export const useBoundaryContentPortalAttachment = ({
110
178
  interpolatorReady: !!isInterpolatorReady,
111
179
  pairChangedDuringClose,
112
180
  pairDestinationScreenKey: pairDestination,
181
+ pairHasBoundaryLink: automaticLink !== undefined,
113
182
  previousReceiverScreenKey,
114
183
  });
184
+ const requestedDestinationScreenKey =
185
+ requestedLink?.status === "complete"
186
+ ? requestedLink.destination.screenKey
187
+ : null;
188
+ const nextReceiverScreenKey = resolveRequestedHandoffReceiver({
189
+ automaticScreenKey: automaticReceiverScreenKey,
190
+ destinationReady:
191
+ requestedDestinationScreenKey === activeReceiverScreenKey ||
192
+ !!isInterpolatorReady,
193
+ destinationScreenKey: requestedDestinationScreenKey,
194
+ handoffTarget,
195
+ sourceScreenKey:
196
+ requestedLink?.status === "complete"
197
+ ? requestedLink.source.screenKey
198
+ : null,
199
+ });
115
200
 
116
201
  const receiverEntry = nextReceiverScreenKey
117
202
  ? getEntry(boundaryId, nextReceiverScreenKey)
@@ -136,9 +221,7 @@ export const useBoundaryContentPortalAttachment = ({
136
221
  attachedReceiverScreenKey.set(nextReceiverScreenKey);
137
222
  }
138
223
 
139
- const targetScreenKey = shouldTeleport
140
- ? attachedReceiverScreenKey.get()
141
- : null;
224
+ const targetScreenKey = attachedReceiverScreenKey.get();
142
225
 
143
226
  const targetHostName = targetScreenKey
144
227
  ? createBoundaryContentPortalHostName(targetScreenKey, boundaryId)
@@ -3,7 +3,6 @@ import { useDescriptorsStore } from "../../../../../../providers/screen/descript
3
3
  import { useScreenSlotStore } from "../../../../../../providers/screen/styles";
4
4
  import { useBoundaryRootStore } from "../../../../providers/boundary-root.provider";
5
5
  import { PORTAL_HOST_NAME_RESET_VALUE } from "../../../utils/naming";
6
- import { isTeleportEnabled } from "../../../utils/teleport-control";
7
6
  import { useActiveHostKey } from "../stores/host-registry.store";
8
7
  import { useActivePortalBoundaryHost } from "./use-active-portal-boundary-host";
9
8
 
@@ -45,14 +44,11 @@ export const useBoundaryPortalAttachment = ({
45
44
  const slot = slotsMap.get()[boundaryId];
46
45
  const {
47
46
  pointerEvents: _pointerEvents,
48
- teleport,
47
+ handoffTarget: _handoffTarget,
49
48
  ...slotProps
50
49
  } = slot?.props ?? {};
51
50
 
52
- const shouldAttach =
53
- slot !== undefined &&
54
- isTeleportEnabled(teleport) &&
55
- portalHostReady.get();
51
+ const shouldAttach = slot !== undefined && portalHostReady.get();
56
52
 
57
53
  const hostName = shouldAttach
58
54
  ? portalHostName.get()
@@ -1,4 +1,4 @@
1
- import { type ComponentType, createElement, type ReactNode } from "react";
1
+ import type { ComponentType, ReactNode } from "react";
2
2
 
3
3
  /**
4
4
  * `react-native-teleport` is an optional peer dependency. The require sits in a
@@ -9,33 +9,12 @@ import { type ComponentType, createElement, type ReactNode } from "react";
9
9
  * inline rendering; everything else keeps working.
10
10
  */
11
11
  let mod: any = null;
12
- let managerMod: any = null;
13
- let providerViewMod: any = null;
14
12
  try {
15
13
  mod = require("react-native-teleport");
16
- managerMod = require("react-native-teleport/lib/module/contexts/PortalManager");
17
- providerViewMod = require("react-native-teleport/lib/module/views/PortalProvider");
18
14
  } catch {}
19
15
 
20
- const NativePortalProviderView: ComponentType<{ children: ReactNode }> | null =
21
- providerViewMod?.default ?? null;
22
- const PortalManagerProvider: ComponentType<{ children: ReactNode }> | null =
23
- managerMod?.PortalManagerProvider ?? null;
24
-
25
16
  const SafeNativePortalProvider: ComponentType<{ children: ReactNode }> | null =
26
- PortalManagerProvider
27
- ? ({ children }: { children: ReactNode }) => {
28
- const managedChildren = createElement(
29
- PortalManagerProvider,
30
- null,
31
- children,
32
- );
33
-
34
- return NativePortalProviderView
35
- ? createElement(NativePortalProviderView, null, managedChildren)
36
- : managedChildren;
37
- }
38
- : null;
17
+ mod?.PortalProvider ?? null;
39
18
 
40
19
  export const isTeleportAvailable =
41
20
  mod !== null && SafeNativePortalProvider !== null;
@@ -1,3 +1,4 @@
1
+ import { getLinkKeyFromTag } from "../../../stores/bounds/helpers/link-pairs.helpers";
1
2
  import type {
2
3
  LinkPairsState,
3
4
  ScreenPairKey,
@@ -25,8 +26,9 @@ export const getInitialSourceCaptureSignal = (params: {
25
26
  }
26
27
 
27
28
  const pair = linkState?.[sourcePairKey];
28
- const link = pair?.links?.[linkId];
29
- const hasSourceRequest = pair?.sourceRequests?.[linkId];
29
+ const linkKey = getLinkKeyFromTag(linkId);
30
+ const link = pair?.links?.[linkKey];
31
+ const hasSourceRequest = pair?.sourceRequests?.[linkKey];
30
32
 
31
33
  if ((!link?.destination && !hasSourceRequest) || link?.source) {
32
34
  return null;
@@ -37,12 +39,12 @@ export const getInitialSourceCaptureSignal = (params: {
37
39
 
38
40
  // Passive grouped sources should not measure every mounted item. Once a
39
41
  // group has an active id, only that concrete member can auto-capture.
40
- if (activeId && activeId !== linkId) {
42
+ if (activeId && activeId !== linkKey) {
41
43
  return null;
42
44
  }
43
45
  }
44
46
 
45
- const signalParts = group ? [group, linkId] : [linkId];
47
+ const signalParts = group ? [group, linkKey] : [linkKey];
46
48
 
47
49
  return {
48
50
  pairKey: sourcePairKey,
@@ -4,52 +4,24 @@ type StackScene = BaseStackScene;
4
4
 
5
5
  import { isOverlayVisible } from "../../../utils/overlay/visibility";
6
6
 
7
- export type FloatOverlayActivity = "active" | "inert" | "inactive" | "closing";
8
-
9
7
  export type FloatOverlayEntry = {
10
8
  scene: StackScene;
11
9
  overlayIndex: number;
12
- activity: FloatOverlayActivity;
13
10
  };
14
11
 
15
12
  export type FloatOverlayTransitionEntry = FloatOverlayEntry & {
16
13
  driverScene: StackScene;
17
14
  };
18
15
 
19
- type OverlayCandidate = Omit<FloatOverlayEntry, "activity">;
20
-
21
- const resolveOverlayActivity = (
22
- scene: StackScene,
23
- distanceFromTop: number,
24
- ): FloatOverlayActivity => {
25
- if (distanceFromTop === 0 && scene.activity === "closing") {
26
- return "closing";
27
- }
28
-
29
- if (distanceFromTop === 0) {
30
- return "active";
31
- }
32
-
33
- if (distanceFromTop === 1) {
34
- return "inert";
35
- }
36
-
37
- return "inactive";
38
- };
39
-
40
16
  /**
41
- * Finds every visible floating-overlay checkpoint in stack order.
42
- *
43
- * The newest checkpoint owns the active overlay. Its immediate predecessor
44
- * remains visible and inert; all older checkpoints are retained but inactive.
45
- * This mirrors the screen activity window without making plain screens create
46
- * a new overlay checkpoint.
17
+ * Overlay ordering and transition coordination are library-owned. Visibility,
18
+ * interaction, and presentation are user-owned.
47
19
  */
48
20
  export function getFloatOverlayStack(
49
21
  scenes: StackScene[],
50
22
  transitionsAlwaysOn: boolean,
51
23
  ): FloatOverlayEntry[] {
52
- const candidates: OverlayCandidate[] = [];
24
+ const candidates: FloatOverlayEntry[] = [];
53
25
 
54
26
  for (let index = 0; index < scenes.length; index += 1) {
55
27
  const scene = scenes[index];
@@ -64,11 +36,7 @@ export function getFloatOverlayStack(
64
36
  }
65
37
  }
66
38
 
67
- const topIndex = candidates.length - 1;
68
- return candidates.map((candidate, index) => ({
69
- ...candidate,
70
- activity: resolveOverlayActivity(candidate.scene, topIndex - index),
71
- }));
39
+ return candidates;
72
40
  }
73
41
 
74
42
  export function getFloatOverlayTransitions(