react-native-screen-transitions 3.4.0-alpha.0 → 3.4.0-alpha.1

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 (364) hide show
  1. package/README.md +65 -2
  2. package/lib/commonjs/shared/animation/snap-to.js +5 -1
  3. package/lib/commonjs/shared/animation/snap-to.js.map +1 -1
  4. package/lib/commonjs/shared/components/create-boundary-component/utils/build-boundary-match-key.js +5 -10
  5. package/lib/commonjs/shared/components/create-boundary-component/utils/build-boundary-match-key.js.map +1 -1
  6. package/lib/commonjs/shared/components/overlay/helpers/get-active-overlay.js +2 -2
  7. package/lib/commonjs/shared/components/overlay/helpers/get-active-overlay.js.map +1 -1
  8. package/lib/commonjs/shared/components/overlay/index.js +1 -3
  9. package/lib/commonjs/shared/components/overlay/index.js.map +1 -1
  10. package/lib/commonjs/shared/components/overlay/variations/overlay-host.js +2 -16
  11. package/lib/commonjs/shared/components/overlay/variations/overlay-host.js.map +1 -1
  12. package/lib/commonjs/shared/components/scene-view.js +2 -4
  13. package/lib/commonjs/shared/components/scene-view.js.map +1 -1
  14. package/lib/commonjs/shared/components/screen-container/layers/backdrop.js +9 -6
  15. package/lib/commonjs/shared/components/screen-container/layers/backdrop.js.map +1 -1
  16. package/lib/commonjs/shared/components/screen-container/layers/content.js +47 -55
  17. package/lib/commonjs/shared/components/screen-container/layers/content.js.map +1 -1
  18. package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js +77 -0
  19. package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -0
  20. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/index.js.map +1 -1
  21. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-open-transition.js +17 -4
  22. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-open-transition.js.map +1 -1
  23. package/lib/commonjs/shared/constants.js +6 -2
  24. package/lib/commonjs/shared/constants.js.map +1 -1
  25. package/lib/commonjs/shared/hooks/gestures/resolve-screen-gesture-target.js +49 -0
  26. package/lib/commonjs/shared/hooks/gestures/resolve-screen-gesture-target.js.map +1 -0
  27. package/lib/commonjs/shared/hooks/gestures/types.js +2 -0
  28. package/lib/commonjs/shared/hooks/gestures/types.js.map +1 -0
  29. package/lib/commonjs/shared/hooks/gestures/use-screen-gesture.js +7 -3
  30. package/lib/commonjs/shared/hooks/gestures/use-screen-gesture.js.map +1 -1
  31. package/lib/commonjs/shared/hooks/navigation/use-stack.js.map +1 -1
  32. package/lib/commonjs/shared/index.js +15 -3
  33. package/lib/commonjs/shared/index.js.map +1 -1
  34. package/lib/commonjs/shared/providers/gestures/handlers/use-handlers.js +55 -18
  35. package/lib/commonjs/shared/providers/gestures/handlers/use-handlers.js.map +1 -1
  36. package/lib/commonjs/shared/providers/gestures/helpers/gesture-snap-points.js +44 -0
  37. package/lib/commonjs/shared/providers/gestures/helpers/gesture-snap-points.js.map +1 -0
  38. package/lib/commonjs/shared/providers/screen/animation/animation.provider.js +31 -17
  39. package/lib/commonjs/shared/providers/screen/animation/animation.provider.js.map +1 -1
  40. package/lib/commonjs/shared/providers/screen/animation/helpers/derivations.js +1 -9
  41. package/lib/commonjs/shared/providers/screen/animation/helpers/derivations.js.map +1 -1
  42. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +11 -6
  43. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  44. package/lib/commonjs/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js +33 -0
  45. package/lib/commonjs/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js.map +1 -0
  46. package/lib/commonjs/shared/providers/screen/animation/types.js +2 -0
  47. package/lib/commonjs/shared/providers/screen/animation/types.js.map +1 -0
  48. package/lib/commonjs/shared/providers/screen/animation/use-screen-animation.js +9 -3
  49. package/lib/commonjs/shared/providers/screen/animation/use-screen-animation.js.map +1 -1
  50. package/lib/commonjs/shared/providers/stack/direct.provider.js +1 -1
  51. package/lib/commonjs/shared/providers/stack/direct.provider.js.map +1 -1
  52. package/lib/commonjs/shared/providers/stack/helpers/use-processed-routes.js +1 -1
  53. package/lib/commonjs/shared/providers/stack/helpers/use-processed-routes.js.map +1 -1
  54. package/lib/commonjs/shared/stores/animation.store.js +8 -2
  55. package/lib/commonjs/shared/stores/animation.store.js.map +1 -1
  56. package/lib/commonjs/shared/stores/bounds/internals/resolver.js +7 -0
  57. package/lib/commonjs/shared/stores/bounds/internals/resolver.js.map +1 -1
  58. package/lib/commonjs/shared/utils/animation/animate-to-progress.js +6 -0
  59. package/lib/commonjs/shared/utils/animation/animate-to-progress.js.map +1 -1
  60. package/lib/commonjs/shared/utils/bounds/helpers/compute-bounds-styles.js +24 -9
  61. package/lib/commonjs/shared/utils/bounds/helpers/compute-bounds-styles.js.map +1 -1
  62. package/lib/commonjs/shared/utils/bounds/helpers/geometry.js +3 -2
  63. package/lib/commonjs/shared/utils/bounds/helpers/geometry.js.map +1 -1
  64. package/lib/commonjs/shared/utils/bounds/helpers/interpolators.js +3 -2
  65. package/lib/commonjs/shared/utils/bounds/helpers/interpolators.js.map +1 -1
  66. package/lib/commonjs/shared/utils/bounds/helpers/link-accessor.js +2 -2
  67. package/lib/commonjs/shared/utils/bounds/helpers/link-accessor.js.map +1 -1
  68. package/lib/commonjs/shared/utils/bounds/helpers/resolve-bound-tag.js +6 -5
  69. package/lib/commonjs/shared/utils/bounds/helpers/resolve-bound-tag.js.map +1 -1
  70. package/lib/commonjs/shared/utils/bounds/helpers/style-composers.js +4 -3
  71. package/lib/commonjs/shared/utils/bounds/helpers/style-composers.js.map +1 -1
  72. package/lib/commonjs/shared/utils/bounds/index.js +3 -3
  73. package/lib/commonjs/shared/utils/bounds/index.js.map +1 -1
  74. package/lib/commonjs/shared/utils/bounds/zoom/accessor.js +54 -0
  75. package/lib/commonjs/shared/utils/bounds/zoom/accessor.js.map +1 -0
  76. package/lib/commonjs/shared/utils/bounds/zoom/build.js +541 -0
  77. package/lib/commonjs/shared/utils/bounds/zoom/build.js.map +1 -0
  78. package/lib/commonjs/shared/utils/bounds/zoom/config.js +118 -0
  79. package/lib/commonjs/shared/utils/bounds/zoom/config.js.map +1 -0
  80. package/lib/commonjs/shared/utils/bounds/zoom/index.js +20 -0
  81. package/lib/commonjs/shared/utils/bounds/zoom/index.js.map +1 -0
  82. package/lib/commonjs/shared/utils/bounds/zoom/types.js.map +1 -0
  83. package/lib/commonjs/shared/utils/gesture/validate-snap-points.js +11 -5
  84. package/lib/commonjs/shared/utils/gesture/validate-snap-points.js.map +1 -1
  85. package/lib/commonjs/shared/utils/overlay/visibility.js +2 -9
  86. package/lib/commonjs/shared/utils/overlay/visibility.js.map +1 -1
  87. package/lib/module/shared/animation/snap-to.js +5 -1
  88. package/lib/module/shared/animation/snap-to.js.map +1 -1
  89. package/lib/module/shared/components/create-boundary-component/utils/build-boundary-match-key.js +5 -10
  90. package/lib/module/shared/components/create-boundary-component/utils/build-boundary-match-key.js.map +1 -1
  91. package/lib/module/shared/components/overlay/helpers/get-active-overlay.js +3 -3
  92. package/lib/module/shared/components/overlay/helpers/get-active-overlay.js.map +1 -1
  93. package/lib/module/shared/components/overlay/index.js +1 -3
  94. package/lib/module/shared/components/overlay/index.js.map +1 -1
  95. package/lib/module/shared/components/overlay/variations/overlay-host.js +3 -17
  96. package/lib/module/shared/components/overlay/variations/overlay-host.js.map +1 -1
  97. package/lib/module/shared/components/scene-view.js +3 -5
  98. package/lib/module/shared/components/scene-view.js.map +1 -1
  99. package/lib/module/shared/components/screen-container/layers/backdrop.js +9 -6
  100. package/lib/module/shared/components/screen-container/layers/backdrop.js.map +1 -1
  101. package/lib/module/shared/components/screen-container/layers/content.js +52 -60
  102. package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
  103. package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js +72 -0
  104. package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -0
  105. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/index.js.map +1 -1
  106. package/lib/module/shared/components/screen-lifecycle/hooks/use-open-transition.js +17 -4
  107. package/lib/module/shared/components/screen-lifecycle/hooks/use-open-transition.js.map +1 -1
  108. package/lib/module/shared/constants.js +6 -2
  109. package/lib/module/shared/constants.js.map +1 -1
  110. package/lib/module/shared/hooks/gestures/resolve-screen-gesture-target.js +45 -0
  111. package/lib/module/shared/hooks/gestures/resolve-screen-gesture-target.js.map +1 -0
  112. package/lib/module/shared/hooks/gestures/types.js +2 -0
  113. package/lib/module/shared/hooks/gestures/types.js.map +1 -0
  114. package/lib/module/shared/hooks/gestures/use-screen-gesture.js +7 -4
  115. package/lib/module/shared/hooks/gestures/use-screen-gesture.js.map +1 -1
  116. package/lib/module/shared/hooks/navigation/use-stack.js.map +1 -1
  117. package/lib/module/shared/index.js +1 -2
  118. package/lib/module/shared/index.js.map +1 -1
  119. package/lib/module/shared/providers/gestures/handlers/use-handlers.js +55 -18
  120. package/lib/module/shared/providers/gestures/handlers/use-handlers.js.map +1 -1
  121. package/lib/module/shared/providers/gestures/helpers/gesture-snap-points.js +38 -0
  122. package/lib/module/shared/providers/gestures/helpers/gesture-snap-points.js.map +1 -0
  123. package/lib/module/shared/providers/screen/animation/animation.provider.js +30 -15
  124. package/lib/module/shared/providers/screen/animation/animation.provider.js.map +1 -1
  125. package/lib/module/shared/providers/screen/animation/helpers/derivations.js +1 -9
  126. package/lib/module/shared/providers/screen/animation/helpers/derivations.js.map +1 -1
  127. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +11 -6
  128. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  129. package/lib/module/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js +29 -0
  130. package/lib/module/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js.map +1 -0
  131. package/lib/module/shared/providers/screen/animation/index.js.map +1 -1
  132. package/lib/module/shared/providers/screen/animation/types.js +2 -0
  133. package/lib/module/shared/providers/screen/animation/types.js.map +1 -0
  134. package/lib/module/shared/providers/screen/animation/use-screen-animation.js +9 -3
  135. package/lib/module/shared/providers/screen/animation/use-screen-animation.js.map +1 -1
  136. package/lib/module/shared/providers/stack/direct.provider.js +2 -2
  137. package/lib/module/shared/providers/stack/direct.provider.js.map +1 -1
  138. package/lib/module/shared/providers/stack/helpers/use-processed-routes.js +2 -2
  139. package/lib/module/shared/providers/stack/helpers/use-processed-routes.js.map +1 -1
  140. package/lib/module/shared/stores/animation.store.js +8 -2
  141. package/lib/module/shared/stores/animation.store.js.map +1 -1
  142. package/lib/module/shared/stores/bounds/internals/resolver.js +7 -0
  143. package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -1
  144. package/lib/module/shared/utils/animation/animate-to-progress.js +6 -0
  145. package/lib/module/shared/utils/animation/animate-to-progress.js.map +1 -1
  146. package/lib/module/shared/utils/bounds/helpers/compute-bounds-styles.js +24 -9
  147. package/lib/module/shared/utils/bounds/helpers/compute-bounds-styles.js.map +1 -1
  148. package/lib/module/shared/utils/bounds/helpers/geometry.js +3 -2
  149. package/lib/module/shared/utils/bounds/helpers/geometry.js.map +1 -1
  150. package/lib/module/shared/utils/bounds/helpers/interpolators.js +3 -2
  151. package/lib/module/shared/utils/bounds/helpers/interpolators.js.map +1 -1
  152. package/lib/module/shared/utils/bounds/helpers/link-accessor.js +2 -2
  153. package/lib/module/shared/utils/bounds/helpers/link-accessor.js.map +1 -1
  154. package/lib/module/shared/utils/bounds/helpers/resolve-bound-tag.js +6 -5
  155. package/lib/module/shared/utils/bounds/helpers/resolve-bound-tag.js.map +1 -1
  156. package/lib/module/shared/utils/bounds/helpers/style-composers.js +4 -3
  157. package/lib/module/shared/utils/bounds/helpers/style-composers.js.map +1 -1
  158. package/lib/module/shared/utils/bounds/index.js +3 -3
  159. package/lib/module/shared/utils/bounds/index.js.map +1 -1
  160. package/lib/module/shared/utils/bounds/zoom/accessor.js +49 -0
  161. package/lib/module/shared/utils/bounds/zoom/accessor.js.map +1 -0
  162. package/lib/module/shared/utils/bounds/zoom/build.js +536 -0
  163. package/lib/module/shared/utils/bounds/zoom/build.js.map +1 -0
  164. package/lib/module/shared/utils/bounds/zoom/config.js +112 -0
  165. package/lib/module/shared/utils/bounds/zoom/config.js.map +1 -0
  166. package/lib/module/shared/utils/bounds/zoom/index.js +5 -0
  167. package/lib/module/shared/utils/bounds/zoom/index.js.map +1 -0
  168. package/lib/module/shared/utils/bounds/zoom/types.js.map +1 -0
  169. package/lib/module/shared/utils/gesture/validate-snap-points.js +11 -5
  170. package/lib/module/shared/utils/gesture/validate-snap-points.js.map +1 -1
  171. package/lib/module/shared/utils/overlay/visibility.js +1 -7
  172. package/lib/module/shared/utils/overlay/visibility.js.map +1 -1
  173. package/lib/typescript/shared/animation/snap-to.d.ts.map +1 -1
  174. package/lib/typescript/shared/components/create-boundary-component/utils/build-boundary-match-key.d.ts +0 -1
  175. package/lib/typescript/shared/components/create-boundary-component/utils/build-boundary-match-key.d.ts.map +1 -1
  176. package/lib/typescript/shared/components/overlay/helpers/get-active-overlay.d.ts +1 -1
  177. package/lib/typescript/shared/components/overlay/index.d.ts +0 -2
  178. package/lib/typescript/shared/components/overlay/index.d.ts.map +1 -1
  179. package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts.map +1 -1
  180. package/lib/typescript/shared/components/scene-view.d.ts.map +1 -1
  181. package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -1
  182. package/lib/typescript/shared/components/screen-container/layers/content.d.ts.map +1 -1
  183. package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts +7 -0
  184. package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts.map +1 -0
  185. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/index.d.ts.map +1 -1
  186. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-open-transition.d.ts.map +1 -1
  187. package/lib/typescript/shared/constants.d.ts +3 -0
  188. package/lib/typescript/shared/constants.d.ts.map +1 -1
  189. package/lib/typescript/shared/hooks/gestures/resolve-screen-gesture-target.d.ts +10 -0
  190. package/lib/typescript/shared/hooks/gestures/resolve-screen-gesture-target.d.ts.map +1 -0
  191. package/lib/typescript/shared/hooks/gestures/types.d.ts +4 -0
  192. package/lib/typescript/shared/hooks/gestures/types.d.ts.map +1 -0
  193. package/lib/typescript/shared/hooks/gestures/use-screen-gesture.d.ts +4 -2
  194. package/lib/typescript/shared/hooks/gestures/use-screen-gesture.d.ts.map +1 -1
  195. package/lib/typescript/shared/hooks/navigation/use-stack.d.ts +1 -2
  196. package/lib/typescript/shared/hooks/navigation/use-stack.d.ts.map +1 -1
  197. package/lib/typescript/shared/index.d.ts +16 -17
  198. package/lib/typescript/shared/index.d.ts.map +1 -1
  199. package/lib/typescript/shared/providers/gestures/handlers/use-handlers.d.ts.map +1 -1
  200. package/lib/typescript/shared/providers/gestures/helpers/gesture-snap-points.d.ts +18 -0
  201. package/lib/typescript/shared/providers/gestures/helpers/gesture-snap-points.d.ts.map +1 -0
  202. package/lib/typescript/shared/providers/screen/animation/animation.provider.d.ts +6 -3
  203. package/lib/typescript/shared/providers/screen/animation/animation.provider.d.ts.map +1 -1
  204. package/lib/typescript/shared/providers/screen/animation/helpers/derivations.d.ts +0 -2
  205. package/lib/typescript/shared/providers/screen/animation/helpers/derivations.d.ts.map +1 -1
  206. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
  207. package/lib/typescript/shared/providers/screen/animation/helpers/resolve-screen-animation-target.d.ts +11 -0
  208. package/lib/typescript/shared/providers/screen/animation/helpers/resolve-screen-animation-target.d.ts.map +1 -0
  209. package/lib/typescript/shared/providers/screen/animation/index.d.ts +1 -1
  210. package/lib/typescript/shared/providers/screen/animation/index.d.ts.map +1 -1
  211. package/lib/typescript/shared/providers/screen/animation/types.d.ts +4 -0
  212. package/lib/typescript/shared/providers/screen/animation/types.d.ts.map +1 -0
  213. package/lib/typescript/shared/providers/screen/animation/use-screen-animation.d.ts +5 -1
  214. package/lib/typescript/shared/providers/screen/animation/use-screen-animation.d.ts.map +1 -1
  215. package/lib/typescript/shared/providers/stack/direct.provider.d.ts.map +1 -1
  216. package/lib/typescript/shared/stores/animation.store.d.ts +4 -0
  217. package/lib/typescript/shared/stores/animation.store.d.ts.map +1 -1
  218. package/lib/typescript/shared/stores/bounds/internals/resolver.d.ts.map +1 -1
  219. package/lib/typescript/shared/stores/bounds/types.d.ts +2 -0
  220. package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
  221. package/lib/typescript/shared/types/animation.types.d.ts +26 -51
  222. package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
  223. package/lib/typescript/shared/types/bounds.types.d.ts +46 -9
  224. package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
  225. package/lib/typescript/shared/types/index.d.ts +3 -3
  226. package/lib/typescript/shared/types/index.d.ts.map +1 -1
  227. package/lib/typescript/shared/types/overlay.types.d.ts +1 -22
  228. package/lib/typescript/shared/types/overlay.types.d.ts.map +1 -1
  229. package/lib/typescript/shared/types/screen.types.d.ts +16 -15
  230. package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
  231. package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts.map +1 -1
  232. package/lib/typescript/shared/utils/bounds/helpers/build-bounds-options.d.ts +2 -2
  233. package/lib/typescript/shared/utils/bounds/helpers/build-bounds-options.d.ts.map +1 -1
  234. package/lib/typescript/shared/utils/bounds/helpers/compute-bounds-styles.d.ts.map +1 -1
  235. package/lib/typescript/shared/utils/bounds/helpers/geometry.d.ts +3 -2
  236. package/lib/typescript/shared/utils/bounds/helpers/geometry.d.ts.map +1 -1
  237. package/lib/typescript/shared/utils/bounds/helpers/interpolators.d.ts +3 -2
  238. package/lib/typescript/shared/utils/bounds/helpers/interpolators.d.ts.map +1 -1
  239. package/lib/typescript/shared/utils/bounds/helpers/link-accessor.d.ts +3 -2
  240. package/lib/typescript/shared/utils/bounds/helpers/link-accessor.d.ts.map +1 -1
  241. package/lib/typescript/shared/utils/bounds/helpers/resolve-bound-tag.d.ts +2 -1
  242. package/lib/typescript/shared/utils/bounds/helpers/resolve-bound-tag.d.ts.map +1 -1
  243. package/lib/typescript/shared/utils/bounds/helpers/style-composers.d.ts +4 -3
  244. package/lib/typescript/shared/utils/bounds/helpers/style-composers.d.ts.map +1 -1
  245. package/lib/typescript/shared/utils/bounds/index.d.ts.map +1 -1
  246. package/lib/typescript/shared/utils/bounds/types/options.d.ts +5 -4
  247. package/lib/typescript/shared/utils/bounds/types/options.d.ts.map +1 -1
  248. package/lib/typescript/shared/utils/bounds/zoom/accessor.d.ts +17 -0
  249. package/lib/typescript/shared/utils/bounds/zoom/accessor.d.ts.map +1 -0
  250. package/lib/typescript/shared/utils/bounds/zoom/build.d.ts +4 -0
  251. package/lib/typescript/shared/utils/bounds/zoom/build.d.ts.map +1 -0
  252. package/lib/typescript/shared/utils/bounds/zoom/config.d.ts +43 -0
  253. package/lib/typescript/shared/utils/bounds/zoom/config.d.ts.map +1 -0
  254. package/lib/typescript/shared/utils/bounds/zoom/index.d.ts +3 -0
  255. package/lib/typescript/shared/utils/bounds/zoom/index.d.ts.map +1 -0
  256. package/lib/typescript/shared/utils/bounds/zoom/types.d.ts +17 -0
  257. package/lib/typescript/shared/utils/bounds/zoom/types.d.ts.map +1 -0
  258. package/lib/typescript/shared/utils/gesture/validate-snap-points.d.ts +5 -3
  259. package/lib/typescript/shared/utils/gesture/validate-snap-points.d.ts.map +1 -1
  260. package/lib/typescript/shared/utils/overlay/visibility.d.ts +1 -4
  261. package/lib/typescript/shared/utils/overlay/visibility.d.ts.map +1 -1
  262. package/package.json +2 -2
  263. package/src/shared/animation/snap-to.ts +12 -1
  264. package/src/shared/components/create-boundary-component/utils/build-boundary-match-key.ts +2 -14
  265. package/src/shared/components/overlay/helpers/get-active-overlay.ts +3 -3
  266. package/src/shared/components/overlay/index.ts +0 -2
  267. package/src/shared/components/overlay/variations/overlay-host.tsx +2 -16
  268. package/src/shared/components/scene-view.tsx +0 -3
  269. package/src/shared/components/screen-container/layers/backdrop.tsx +25 -6
  270. package/src/shared/components/screen-container/layers/content.tsx +80 -77
  271. package/src/shared/components/screen-container/layers/maybe-masked-navigation-container.tsx +93 -0
  272. package/src/shared/components/screen-lifecycle/hooks/use-close-transition/index.ts +1 -2
  273. package/src/shared/components/screen-lifecycle/hooks/use-open-transition.ts +20 -6
  274. package/src/shared/constants.ts +6 -2
  275. package/src/shared/hooks/gestures/resolve-screen-gesture-target.ts +66 -0
  276. package/src/shared/hooks/gestures/types.ts +5 -0
  277. package/src/shared/hooks/gestures/use-screen-gesture.ts +10 -3
  278. package/src/shared/hooks/navigation/use-stack.tsx +1 -2
  279. package/src/shared/index.ts +14 -16
  280. package/src/shared/providers/gestures/handlers/use-handlers.ts +67 -24
  281. package/src/shared/providers/gestures/helpers/gesture-snap-points.ts +72 -0
  282. package/src/shared/providers/screen/animation/animation.provider.tsx +46 -10
  283. package/src/shared/providers/screen/animation/helpers/derivations.ts +0 -8
  284. package/src/shared/providers/screen/animation/helpers/pipeline.ts +26 -5
  285. package/src/shared/providers/screen/animation/helpers/resolve-screen-animation-target.ts +44 -0
  286. package/src/shared/providers/screen/animation/index.tsx +4 -1
  287. package/src/shared/providers/screen/animation/types.ts +5 -0
  288. package/src/shared/providers/screen/animation/use-screen-animation.tsx +16 -3
  289. package/src/shared/providers/stack/direct.provider.tsx +2 -5
  290. package/src/shared/providers/stack/helpers/use-processed-routes.ts +2 -2
  291. package/src/shared/stores/animation.store.ts +13 -1
  292. package/src/shared/stores/bounds/internals/resolver.ts +13 -1
  293. package/src/shared/stores/bounds/types.ts +2 -0
  294. package/src/shared/types/animation.types.ts +25 -58
  295. package/src/shared/types/bounds.types.ts +30 -10
  296. package/src/shared/types/index.ts +2 -15
  297. package/src/shared/types/overlay.types.ts +1 -28
  298. package/src/shared/types/screen.types.ts +17 -16
  299. package/src/shared/utils/animation/animate-to-progress.ts +7 -0
  300. package/src/shared/utils/bounds/helpers/build-bounds-options.ts +2 -2
  301. package/src/shared/utils/bounds/helpers/compute-bounds-styles.ts +34 -8
  302. package/src/shared/utils/bounds/helpers/geometry.ts +3 -2
  303. package/src/shared/utils/bounds/helpers/interpolators.ts +8 -6
  304. package/src/shared/utils/bounds/helpers/link-accessor.ts +10 -6
  305. package/src/shared/utils/bounds/helpers/resolve-bound-tag.ts +9 -6
  306. package/src/shared/utils/bounds/helpers/style-composers.ts +4 -3
  307. package/src/shared/utils/bounds/index.ts +6 -8
  308. package/src/shared/utils/bounds/types/options.ts +6 -4
  309. package/src/shared/utils/bounds/zoom/accessor.ts +69 -0
  310. package/src/shared/utils/bounds/zoom/build.ts +705 -0
  311. package/src/shared/utils/bounds/zoom/config.ts +179 -0
  312. package/src/shared/utils/bounds/zoom/index.ts +2 -0
  313. package/src/shared/utils/bounds/zoom/types.ts +22 -0
  314. package/src/shared/utils/gesture/validate-snap-points.ts +20 -8
  315. package/src/shared/utils/overlay/visibility.ts +1 -16
  316. package/lib/commonjs/shared/components/overlay/variations/screen-overlay.js +0 -64
  317. package/lib/commonjs/shared/components/overlay/variations/screen-overlay.js.map +0 -1
  318. package/lib/commonjs/shared/utils/bounds/helpers/math.js +0 -132
  319. package/lib/commonjs/shared/utils/bounds/helpers/math.js.map +0 -1
  320. package/lib/commonjs/shared/utils/bounds/helpers/navigation-accessor.js +0 -45
  321. package/lib/commonjs/shared/utils/bounds/helpers/navigation-accessor.js.map +0 -1
  322. package/lib/commonjs/shared/utils/bounds/sugar/navigation/helpers.js +0 -60
  323. package/lib/commonjs/shared/utils/bounds/sugar/navigation/helpers.js.map +0 -1
  324. package/lib/commonjs/shared/utils/bounds/sugar/navigation/index.js +0 -20
  325. package/lib/commonjs/shared/utils/bounds/sugar/navigation/index.js.map +0 -1
  326. package/lib/commonjs/shared/utils/bounds/sugar/navigation/types.js.map +0 -1
  327. package/lib/commonjs/shared/utils/bounds/sugar/navigation/zoom.js +0 -295
  328. package/lib/commonjs/shared/utils/bounds/sugar/navigation/zoom.js.map +0 -1
  329. package/lib/module/shared/components/overlay/variations/screen-overlay.js +0 -61
  330. package/lib/module/shared/components/overlay/variations/screen-overlay.js.map +0 -1
  331. package/lib/module/shared/utils/bounds/helpers/math.js +0 -115
  332. package/lib/module/shared/utils/bounds/helpers/math.js.map +0 -1
  333. package/lib/module/shared/utils/bounds/helpers/navigation-accessor.js +0 -40
  334. package/lib/module/shared/utils/bounds/helpers/navigation-accessor.js.map +0 -1
  335. package/lib/module/shared/utils/bounds/sugar/navigation/helpers.js +0 -54
  336. package/lib/module/shared/utils/bounds/sugar/navigation/helpers.js.map +0 -1
  337. package/lib/module/shared/utils/bounds/sugar/navigation/index.js +0 -15
  338. package/lib/module/shared/utils/bounds/sugar/navigation/index.js.map +0 -1
  339. package/lib/module/shared/utils/bounds/sugar/navigation/types.js.map +0 -1
  340. package/lib/module/shared/utils/bounds/sugar/navigation/zoom.js +0 -290
  341. package/lib/module/shared/utils/bounds/sugar/navigation/zoom.js.map +0 -1
  342. package/lib/typescript/shared/components/overlay/variations/screen-overlay.d.ts +0 -10
  343. package/lib/typescript/shared/components/overlay/variations/screen-overlay.d.ts.map +0 -1
  344. package/lib/typescript/shared/utils/bounds/helpers/math.d.ts +0 -38
  345. package/lib/typescript/shared/utils/bounds/helpers/math.d.ts.map +0 -1
  346. package/lib/typescript/shared/utils/bounds/helpers/navigation-accessor.d.ts +0 -16
  347. package/lib/typescript/shared/utils/bounds/helpers/navigation-accessor.d.ts.map +0 -1
  348. package/lib/typescript/shared/utils/bounds/sugar/navigation/helpers.d.ts +0 -17
  349. package/lib/typescript/shared/utils/bounds/sugar/navigation/helpers.d.ts.map +0 -1
  350. package/lib/typescript/shared/utils/bounds/sugar/navigation/index.d.ts +0 -3
  351. package/lib/typescript/shared/utils/bounds/sugar/navigation/index.d.ts.map +0 -1
  352. package/lib/typescript/shared/utils/bounds/sugar/navigation/types.d.ts +0 -18
  353. package/lib/typescript/shared/utils/bounds/sugar/navigation/types.d.ts.map +0 -1
  354. package/lib/typescript/shared/utils/bounds/sugar/navigation/zoom.d.ts +0 -4
  355. package/lib/typescript/shared/utils/bounds/sugar/navigation/zoom.d.ts.map +0 -1
  356. package/src/shared/components/overlay/variations/screen-overlay.tsx +0 -68
  357. package/src/shared/utils/bounds/helpers/math.ts +0 -161
  358. package/src/shared/utils/bounds/helpers/navigation-accessor.ts +0 -61
  359. package/src/shared/utils/bounds/sugar/navigation/helpers.ts +0 -74
  360. package/src/shared/utils/bounds/sugar/navigation/index.ts +0 -14
  361. package/src/shared/utils/bounds/sugar/navigation/types.ts +0 -26
  362. package/src/shared/utils/bounds/sugar/navigation/zoom.ts +0 -348
  363. /package/lib/commonjs/shared/utils/bounds/{sugar/navigation → zoom}/types.js +0 -0
  364. /package/lib/module/shared/utils/bounds/{sugar/navigation → zoom}/types.js +0 -0
@@ -10,17 +10,6 @@ import type { GestureValues } from "./gesture.types";
10
10
  import type { Layout } from "./screen.types";
11
11
  import type { BaseStackRoute } from "./stack.types";
12
12
 
13
- export interface OverlayInterpolationProps {
14
- progress: number;
15
- layouts: {
16
- /**
17
- * The `width` and `height` of the screen container.
18
- */
19
- screen: Layout;
20
- };
21
- insets: EdgeInsets;
22
- }
23
-
24
13
  export type ScreenTransitionState = {
25
14
  /**
26
15
  * Animation progress for this screen.
@@ -42,11 +31,11 @@ export type ScreenTransitionState = {
42
31
  closing: number;
43
32
 
44
33
  /**
45
- * Whether this screen is in the process of entering.
46
- * - `0`: Screen is closing or inactive
47
- * - `1`: Screen is opening/entering
34
+ * Whether this screen is actively in its opening phase.
35
+ * - `0`: Screen is settled, inactive, or closing
36
+ * - `1`: Screen is currently opening/entering
48
37
  *
49
- * Use this to trigger different animations when navigating back vs forward.
38
+ * This flips back to `0` once the open animation finishes.
50
39
  */
51
40
  entering: number;
52
41
 
@@ -169,18 +158,6 @@ export interface ScreenInterpolationProps {
169
158
  * When focused, this is the previous screen. When not focused, this is the current screen.
170
159
  */
171
160
  inactive: ScreenTransitionState | undefined;
172
-
173
- /**
174
- * Whether the active screen is currently transitioning (either being dragged or animating).
175
- * @deprecated Use `active.animating` instead.
176
- */
177
- isActiveTransitioning: boolean;
178
-
179
- /**
180
- * Whether the active screen is in the process of being dismissed/closed.
181
- * @deprecated Use `active.closing` instead.
182
- */
183
- isDismissing: boolean;
184
161
  }
185
162
 
186
163
  export type ScreenStyleInterpolator = (
@@ -195,17 +172,11 @@ export type ScreenStyleInterpolator = (
195
172
  */
196
173
  export type AnimatedViewStyle = ViewStyle & TextStyle;
197
174
 
198
- /**
199
- * Explicit slot format with separate `style` and `props` buckets.
200
- *
201
- * - `style` is applied via `useAnimatedStyle` (transform, opacity, backgroundColor, etc.)
202
- * - `props` is applied via `useAnimatedProps` (component-specific props like BlurView intensity)
203
- */
204
- export type TransitionSlotExplicit = {
205
- /** Animated styles applied via useAnimatedStyle. */
175
+ type TransitionSlotDefinition = {
176
+ /** Animated styles applied via `useAnimatedStyle`. */
206
177
  style?: AnimatedViewStyle;
207
- /** Animated props applied via useAnimatedProps (e.g., BlurView intensity, SquircleView cornerRadius). */
208
- props?: Record<string, any>;
178
+ /** Animated props applied via `useAnimatedProps`. */
179
+ props?: Record<string, unknown>;
209
180
  };
210
181
 
211
182
  /**
@@ -215,7 +186,7 @@ export type TransitionSlotExplicit = {
215
186
  * - **Shorthand**: Write styles directly — `{ opacity: 0.5, transform: [...] }`
216
187
  * - **Explicit**: Use `style` and/or `props` buckets — `{ style: { opacity: 0.5 }, props: { intensity: 80 } }`
217
188
  */
218
- export type TransitionSlotStyle = AnimatedViewStyle | TransitionSlotExplicit;
189
+ export type TransitionSlotStyle = AnimatedViewStyle | TransitionSlotDefinition;
219
190
 
220
191
  /**
221
192
  * Internal normalized slot format used after the backward-compat shim.
@@ -223,7 +194,7 @@ export type TransitionSlotStyle = AnimatedViewStyle | TransitionSlotExplicit;
223
194
  */
224
195
  export type NormalizedTransitionSlotStyle = {
225
196
  style?: StyleProps;
226
- props?: Record<string, any>;
197
+ props?: Record<string, unknown>;
227
198
  };
228
199
 
229
200
  /**
@@ -242,10 +213,10 @@ export type NormalizedTransitionInterpolatedStyle = {
242
213
  };
243
214
 
244
215
  /**
245
- * Public new-format interpolator result with type-safe style autocomplete.
246
- * Uses `TransitionSlotStyle` (backed by `AnimatedViewStyle`) for full style autocomplete.
216
+ * The return type of `screenStyleInterpolator`.
217
+ * Uses the nested slot format, while still accepting deprecated flat keys.
247
218
  */
248
- export type NewTransitionInterpolatedStyle = {
219
+ export type TransitionInterpolatedStyle = {
249
220
  /** Animated style and props for the main screen content view. */
250
221
  content?: TransitionSlotStyle;
251
222
  /** Animated style and props for the backdrop layer between screens. */
@@ -254,27 +225,23 @@ export type NewTransitionInterpolatedStyle = {
254
225
  surface?: TransitionSlotStyle;
255
226
  /** Custom styles/props by id for Transition.View components. */
256
227
  [id: string]: TransitionSlotStyle | undefined;
257
- };
258
-
259
- /**
260
- * @deprecated Use the nested format instead: `{ content: { style }, backdrop: { style } }`.
261
- * This flat format is auto-converted via a backward-compat shim.
262
- */
263
- export type LegacyTransitionInterpolatedStyle = {
228
+ /**
229
+ * @deprecated Use `content` instead.
230
+ * This flat format is auto-converted via a backward-compat shim.
231
+ */
264
232
  contentStyle?: AnimatedViewStyle;
233
+ /**
234
+ * @deprecated Use `backdrop` instead.
235
+ * This flat format is auto-converted via a backward-compat shim.
236
+ */
265
237
  backdropStyle?: AnimatedViewStyle;
238
+ /**
239
+ * @deprecated Use `backdrop` instead.
240
+ * This flat format is auto-converted via a backward-compat shim.
241
+ */
266
242
  overlayStyle?: AnimatedViewStyle;
267
- [id: string]: AnimatedViewStyle | undefined;
268
243
  };
269
244
 
270
- /**
271
- * The return type of `screenStyleInterpolator`.
272
- * Accepts both the new nested format and the legacy flat format (auto-converted).
273
- */
274
- export type TransitionInterpolatedStyle =
275
- | NewTransitionInterpolatedStyle
276
- | LegacyTransitionInterpolatedStyle;
277
-
278
245
  /**
279
246
  * A Reanimated animation configuration object.
280
247
  */
@@ -1,8 +1,11 @@
1
1
  import type { MeasuredDimensions, StyleProps } from "react-native-reanimated";
2
2
  import type { Snapshot } from "../stores/bounds";
3
3
  import type {
4
+ BoundId,
5
+ BoundsAnchor,
4
6
  BoundsOptions,
5
7
  BoundsOptionsResult,
8
+ BoundsScaleMode,
6
9
  } from "../utils/bounds/types/options";
7
10
  import type { TransitionInterpolatedStyle } from "./animation.types";
8
11
 
@@ -25,16 +28,33 @@ export type BoundsLink = {
25
28
  destination: BoundEntry | null;
26
29
  };
27
30
 
28
- export type BoundsStyleOptions = Omit<BoundsOptions, "id" | "group">;
29
-
30
- export type BoundsNavigationPreset = "zoom";
31
-
32
- export type BoundsNavigationOptions = BoundsStyleOptions & {
31
+ export type BoundsNavigationZoomOptions = {
32
+ anchor?: BoundsAnchor;
33
+ scaleMode?: BoundsScaleMode;
34
+ target?: "bound" | "fullscreen" | MeasuredDimensions;
35
+ mask?: {
36
+ borderRadius?: number | "auto" | { from?: number; to?: number };
37
+ borderTopLeftRadius?: number | "auto" | { from?: number; to?: number };
38
+ borderTopRightRadius?: number | "auto" | { from?: number; to?: number };
39
+ borderBottomLeftRadius?: number | "auto" | { from?: number; to?: number };
40
+ borderBottomRightRadius?: number | "auto" | { from?: number; to?: number };
41
+ borderCurve?: "circular" | "continuous";
42
+ outset?:
43
+ | number
44
+ | { top?: number; right?: number; bottom?: number; left?: number };
45
+ };
46
+ motion?: {
47
+ dragResistance?: number;
48
+ dragDirectionalScaleMin?: number;
49
+ };
50
+ /**
51
+ * @deprecated Use `mask.borderRadius` instead.
52
+ */
33
53
  maskBorderRadius?: number;
34
54
  };
35
55
 
36
56
  export type BoundsNavigationAccessor = {
37
- zoom: () => TransitionInterpolatedStyle;
57
+ zoom: (options?: BoundsNavigationZoomOptions) => TransitionInterpolatedStyle;
38
58
  };
39
59
 
40
60
  type BoundsBoundNavigationAccessor = {
@@ -46,15 +66,15 @@ type BoundsCallResult<T extends BoundsOptions> = BoundsOptionsResult<T> &
46
66
 
47
67
  export type BoundsAccessor = {
48
68
  <T extends BoundsOptions>(options: T): BoundsCallResult<T>;
49
- getSnapshot: (id: string, key?: string) => Snapshot | null;
50
- getLink: (id: string) => BoundsLink | null;
69
+ getSnapshot: (id: BoundId, key?: string) => Snapshot | null;
70
+ getLink: (id: BoundId) => BoundsLink | null;
51
71
  interpolateStyle: (
52
- id: string,
72
+ id: BoundId,
53
73
  property: keyof StyleProps,
54
74
  fallback?: number,
55
75
  ) => number;
56
76
  interpolateBounds: (
57
- id: string,
77
+ id: BoundId,
58
78
  property: keyof MeasuredDimensions,
59
79
  fallbackOrTargetKey?: number | string,
60
80
  fallback?: number,
@@ -2,28 +2,18 @@ export { FALSE, TRUE } from "../constants";
2
2
  export type {
3
3
  AnimatedViewStyle,
4
4
  AnimationConfig,
5
- LegacyTransitionInterpolatedStyle,
6
- NewTransitionInterpolatedStyle,
7
- NormalizedTransitionInterpolatedStyle,
8
- NormalizedTransitionSlotStyle,
9
- OverlayInterpolationProps,
10
5
  ScreenInterpolationProps,
11
6
  ScreenStyleInterpolator,
12
7
  ScreenTransitionState,
13
8
  TransitionInterpolatedStyle,
14
- TransitionSlotExplicit,
15
9
  TransitionSlotStyle,
16
10
  TransitionSpec,
17
11
  } from "./animation.types";
18
12
  export type {
19
- BoundEntry,
20
13
  BoundsAccessor,
21
- BoundsLink,
22
14
  BoundsMethod,
23
15
  BoundsNavigationAccessor,
24
- BoundsNavigationOptions,
25
- BoundsNavigationPreset,
26
- BoundsStyleOptions,
16
+ BoundsNavigationZoomOptions,
27
17
  } from "./bounds.types";
28
18
  export type {
29
19
  ActivationArea,
@@ -32,10 +22,7 @@ export type {
32
22
  GestureValues,
33
23
  SideActivation,
34
24
  } from "./gesture.types";
35
- export type {
36
- OverlayMode,
37
- OverlayProps,
38
- } from "./overlay.types";
25
+ export type { OverlayProps } from "./overlay.types";
39
26
  export type {
40
27
  Layout,
41
28
  ScreenKey,
@@ -1,18 +1,7 @@
1
1
  import type { Route } from "@react-navigation/native";
2
2
  import type { DerivedValue } from "react-native-reanimated";
3
- import type {
4
- OverlayInterpolationProps,
5
- ScreenInterpolationProps,
6
- } from "./animation.types";
7
3
  import type { ScreenTransitionConfig } from "./screen.types";
8
4
 
9
- /**
10
- * @deprecated Overlay mode is no longer needed. Overlays now always render as "float" mode.
11
- * For per-screen overlays, render an absolute-positioned view directly in your screen component
12
- * and use `useScreenAnimation()` to access animation values.
13
- */
14
- export type OverlayMode = "float" | "screen";
15
-
16
5
  /**
17
6
  * Props passed to overlay components.
18
7
  * Generic over the navigation type since different stacks have different navigation props.
@@ -23,7 +12,7 @@ export type OverlayMode = "float" | "screen";
23
12
  */
24
13
  export type OverlayScreenState<TNavigation = unknown> = Omit<
25
14
  OverlayProps<TNavigation>,
26
- "progress" | "overlayAnimation" | "screenAnimation"
15
+ "progress"
27
16
  > & {
28
17
  index: number;
29
18
  snapTo: (index: number) => void;
@@ -65,20 +54,4 @@ export type OverlayProps<TNavigation = unknown> = {
65
54
  * This is equivalent to `useScreenAnimation().stackProgress`.
66
55
  */
67
56
  progress: DerivedValue<number>;
68
-
69
- /**
70
- * Animation values for the overlay.
71
- *
72
- * @deprecated Use `progress` prop or `useScreenAnimation()` instead.
73
- * This prop will be removed in a future version.
74
- */
75
- overlayAnimation: DerivedValue<OverlayInterpolationProps>;
76
-
77
- /**
78
- * Animation values for the screen.
79
- *
80
- * @deprecated Use `useScreenAnimation()` hook directly instead.
81
- * This prop will be removed in a future version.
82
- */
83
- screenAnimation: DerivedValue<ScreenInterpolationProps>;
84
57
  };
@@ -4,7 +4,7 @@ import type {
4
4
  TransitionSpec,
5
5
  } from "./animation.types";
6
6
  import type { GestureActivationArea, GestureDirection } from "./gesture.types";
7
- import type { OverlayMode, OverlayProps } from "./overlay.types";
7
+ import type { OverlayProps } from "./overlay.types";
8
8
 
9
9
  export type Layout = {
10
10
  width: number;
@@ -13,6 +13,12 @@ export type Layout = {
13
13
 
14
14
  export type ScreenKey = string;
15
15
 
16
+ /**
17
+ * A single snap point value. Either a fraction of screen height (0–1) or
18
+ * `'auto'` to snap to the intrinsic height of the screen content.
19
+ */
20
+ export type SnapPoint = number | "auto";
21
+
16
22
  export type TransitionAwareProps<T extends object> = AnimatedProps<T> & {
17
23
  /**
18
24
  * Connects this component to custom animated styles defined in screenStyleInterpolator.
@@ -157,20 +163,9 @@ export type ScreenTransitionConfig = {
157
163
 
158
164
  /**
159
165
  * Function that returns a React Element to display as an overlay.
160
- * For container overlays (overlayMode: 'container'), use ContainerOverlayProps which includes children.
161
166
  */
162
167
  overlay?: (props: OverlayProps) => React.ReactNode;
163
168
 
164
- /**
165
- * How the overlay is positioned relative to screens.
166
- *
167
- * @deprecated This option is no longer needed. Overlays now always render as "float" mode
168
- * (single persistent overlay above all screens). For per-screen overlays, render an
169
- * absolute-positioned view directly in your screen component and use `useScreenAnimation()`
170
- * to access animation values.
171
- */
172
- overlayMode?: OverlayMode;
173
-
174
169
  /**
175
170
  * Whether to show the overlay. The overlay is shown by default when `overlay` is provided.
176
171
  * Setting this to `false` hides the overlay.
@@ -190,15 +185,21 @@ export type ScreenTransitionConfig = {
190
185
  experimental_enableHighRefreshRate?: boolean;
191
186
 
192
187
  /**
193
- * Describes heights where a screen can rest, as fractions of screen height.
194
- * Pass an array of ascending values from 0 to 1.
188
+ * Describes heights where a screen can rest, as fractions of screen height,
189
+ * or `'auto'` to snap to the intrinsic height of the screen content.
190
+ *
191
+ * Pass an array of ascending values from 0 to 1, or `'auto'`.
192
+ * The `'auto'` value measures the content's natural height after layout and
193
+ * converts it to the equivalent fraction of the screen height.
195
194
  *
196
195
  * @example
197
- * snapPoints={[0.5, 1.0]} // 50% and 100% of screen height
196
+ * snapPoints={[0.5, 1.0]} // 50% and 100% of screen height
197
+ * snapPoints={['auto']} // snap to content height
198
+ * snapPoints={['auto', 1.0]} // content height or full screen
198
199
  *
199
200
  * @default [1.0]
200
201
  */
201
- snapPoints?: number[];
202
+ snapPoints?: SnapPoint[];
202
203
 
203
204
  /**
204
205
  * The initial snap point index when the screen opens.
@@ -58,6 +58,9 @@ export const animateToProgress = ({
58
58
  if (!config) {
59
59
  animating.set(FALSE);
60
60
  progress.set(value);
61
+ if (!isClosing) {
62
+ entering.set(FALSE);
63
+ }
61
64
 
62
65
  if (onAnimationFinish) {
63
66
  runOnJS(onAnimationFinish)(true);
@@ -71,6 +74,10 @@ export const animateToProgress = ({
71
74
  "worklet";
72
75
  if (!finished) return;
73
76
 
77
+ if (!isClosing) {
78
+ entering.set(FALSE);
79
+ }
80
+
74
81
  if (onAnimationFinish) {
75
82
  runOnJS(onAnimationFinish)(finished);
76
83
  }
@@ -1,12 +1,12 @@
1
1
  import { BoundStore } from "../../../stores/bounds";
2
2
  import type { ScreenInterpolationProps } from "../../../types/animation.types";
3
- import type { BoundsOptions } from "../types/options";
3
+ import type { BoundId, BoundsOptions } from "../types/options";
4
4
  import { DEFAULT_BOUNDS_OPTIONS } from "./constants";
5
5
  import type { ResolveBoundTagParams } from "./resolve-bound-tag";
6
6
 
7
7
  type BuildBoundsOptionsParams = {
8
8
  props: Omit<ScreenInterpolationProps, "bounds">;
9
- id?: string;
9
+ id?: BoundId;
10
10
  group?: string;
11
11
  overrides?: Partial<BoundsOptions>;
12
12
  mode?: "style" | "navigation";
@@ -12,7 +12,11 @@ import {
12
12
  } from "../../../stores/bounds";
13
13
  import type { ScreenTransitionState } from "../../../types/animation.types";
14
14
  import type { Layout } from "../../../types/screen.types";
15
- import type { BoundsComputeParams, BoundsOptions } from "../types/options";
15
+ import type {
16
+ BoundId,
17
+ BoundsComputeParams,
18
+ BoundsOptions,
19
+ } from "../types/options";
16
20
  import {
17
21
  computeContentTransformGeometry,
18
22
  computeRelativeGeometry,
@@ -27,7 +31,7 @@ import {
27
31
  } from "./style-composers";
28
32
 
29
33
  const resolveBounds = (params: {
30
- id: string;
34
+ id: BoundId;
31
35
  previous?: ScreenTransitionState;
32
36
  current?: ScreenTransitionState;
33
37
  next?: ScreenTransitionState;
@@ -51,7 +55,7 @@ const resolveBounds = (params: {
51
55
 
52
56
  const resolvedPair =
53
57
  params.resolvedPair ??
54
- BoundStore.resolveTransitionPair(params.id, {
58
+ BoundStore.resolveTransitionPair(String(params.id), {
55
59
  currentScreenKey,
56
60
  previousScreenKey,
57
61
  nextScreenKey,
@@ -66,6 +70,9 @@ const resolveBounds = (params: {
66
70
  start: null,
67
71
  end: null,
68
72
  entering,
73
+ currentScreenKey,
74
+ sourceScreenKey: resolvedPair.sourceScreenKey,
75
+ destinationScreenKey: resolvedPair.destinationScreenKey,
69
76
  };
70
77
  }
71
78
 
@@ -75,6 +82,9 @@ const resolveBounds = (params: {
75
82
  start: null,
76
83
  end: null,
77
84
  entering,
85
+ currentScreenKey,
86
+ sourceScreenKey: resolvedPair.sourceScreenKey,
87
+ destinationScreenKey: resolvedPair.destinationScreenKey,
78
88
  };
79
89
  }
80
90
 
@@ -94,6 +104,9 @@ const resolveBounds = (params: {
94
104
  start,
95
105
  end,
96
106
  entering,
107
+ currentScreenKey,
108
+ sourceScreenKey: resolvedPair.sourceScreenKey,
109
+ destinationScreenKey: resolvedPair.destinationScreenKey,
97
110
  };
98
111
  };
99
112
 
@@ -111,7 +124,14 @@ export const computeBoundStyles = (
111
124
  return EMPTY_BOUND_HELPER_RESULT;
112
125
  }
113
126
 
114
- const { start, end, entering } = resolveBounds({
127
+ const {
128
+ start,
129
+ end,
130
+ entering,
131
+ currentScreenKey,
132
+ sourceScreenKey,
133
+ destinationScreenKey,
134
+ } = resolveBounds({
115
135
  id,
116
136
  previous,
117
137
  current,
@@ -131,9 +151,15 @@ export const computeBoundStyles = (
131
151
  const ranges: readonly [number, number] = entering ? ENTER_RANGE : EXIT_RANGE;
132
152
 
133
153
  if (computeOptions.method === "content") {
154
+ const currentOwnsSource =
155
+ !!currentScreenKey &&
156
+ currentScreenKey === sourceScreenKey &&
157
+ currentScreenKey !== destinationScreenKey;
158
+ const contentStart = currentOwnsSource ? end : start;
159
+ const contentEnd = currentOwnsSource ? start : end;
134
160
  const geometry = computeContentTransformGeometry({
135
- start,
136
- end,
161
+ start: contentStart,
162
+ end: contentEnd,
137
163
  entering,
138
164
  dimensions,
139
165
  anchor: computeOptions.anchor,
@@ -141,10 +167,10 @@ export const computeBoundStyles = (
141
167
  });
142
168
 
143
169
  return composeContentStyle({
144
- start,
170
+ start: contentStart,
145
171
  progress,
146
172
  ranges,
147
- end,
173
+ end: contentEnd,
148
174
  geometry,
149
175
  computeOptions,
150
176
  });
@@ -95,8 +95,9 @@ export function computeRelativeGeometry({
95
95
  return { dx, dy, scaleX, scaleY, entering };
96
96
  }
97
97
  /**
98
- * Computes the transform to apply to the entire destination screen so that
99
- * its bound (end) matches the source bound (start) at progress start.
98
+ * Computes the transform to apply to the current screen so that its owned
99
+ * bound (`end`) matches the paired target bound (`start`) at the aligned
100
+ * phase of the transition.
100
101
  */
101
102
  export function computeContentTransformGeometry({
102
103
  start,
@@ -2,6 +2,7 @@ import type { MeasuredDimensions } from "react-native-reanimated";
2
2
  import { ENTER_RANGE, EXIT_RANGE } from "../../../constants";
3
3
  import { BoundStore } from "../../../stores/bounds";
4
4
  import type { ScreenInterpolationProps } from "../../../types/animation.types";
5
+ import type { BoundId } from "../types/options";
5
6
  import { interpolateClamped } from "./interpolate";
6
7
  import { interpolateLinkStyle } from "./interpolate-style";
7
8
  import type { LinkAccessor } from "./link-accessor";
@@ -18,7 +19,7 @@ export const createInterpolators = ({
18
19
  "worklet";
19
20
 
20
21
  const interpolateStyle = (
21
- tag: string,
22
+ tag: BoundId,
22
23
  property: string,
23
24
  fallback?: number,
24
25
  ): number => {
@@ -32,7 +33,7 @@ export const createInterpolators = ({
32
33
  };
33
34
 
34
35
  const interpolateBoundsFromSnapshot = (
35
- tag: string,
36
+ tag: BoundId,
36
37
  property: keyof MeasuredDimensions,
37
38
  targetKey: string,
38
39
  fallback?: number,
@@ -44,11 +45,12 @@ export const createInterpolators = ({
44
45
  const range = entering ? ENTER_RANGE : EXIT_RANGE;
45
46
  const currentKey = props.current?.route?.key;
46
47
  const fb = fallback ?? 0;
48
+ const normalizedTag = String(tag);
47
49
 
48
50
  const currentSnapshot = currentKey
49
- ? BoundStore.getSnapshot(tag, currentKey)
51
+ ? BoundStore.getSnapshot(normalizedTag, currentKey)
50
52
  : null;
51
- const targetSnapshot = BoundStore.getSnapshot(tag, targetKey);
53
+ const targetSnapshot = BoundStore.getSnapshot(normalizedTag, targetKey);
52
54
 
53
55
  const currentValue = currentSnapshot?.bounds?.[property] ?? fb;
54
56
  const targetValue = targetSnapshot?.bounds?.[property] ?? fb;
@@ -60,7 +62,7 @@ export const createInterpolators = ({
60
62
  };
61
63
 
62
64
  const interpolateBoundsFromLink = (
63
- tag: string,
65
+ tag: BoundId,
64
66
  property: keyof MeasuredDimensions,
65
67
  fallback?: number,
66
68
  ): number => {
@@ -82,7 +84,7 @@ export const createInterpolators = ({
82
84
  };
83
85
 
84
86
  const interpolateBounds = (
85
- tag: string,
87
+ tag: BoundId,
86
88
  property: keyof MeasuredDimensions,
87
89
  fallbackOrTargetKey?: number | string,
88
90
  fallback?: number,
@@ -1,27 +1,31 @@
1
1
  import { BoundStore, type Snapshot } from "../../../stores/bounds";
2
2
  import type { ScreenInterpolationProps } from "../../../types/animation.types";
3
3
  import type { BoundsLink } from "../../../types/bounds.types";
4
+ import type { BoundId } from "../types/options";
4
5
 
5
6
  type GetProps = () => Omit<ScreenInterpolationProps, "bounds">;
6
7
 
7
8
  export type LinkAccessor = {
8
- getSnapshot: (tag: string, key?: string) => Snapshot | null;
9
- getLink: (tag: string) => BoundsLink | null;
9
+ getSnapshot: (tag: BoundId, key?: string) => Snapshot | null;
10
+ getLink: (tag: BoundId) => BoundsLink | null;
10
11
  };
11
12
 
12
13
  export const createLinkAccessor = (getProps: GetProps): LinkAccessor => {
13
14
  "worklet";
14
15
 
15
- const getSnapshot = (tag: string, key?: string): Snapshot | null => {
16
+ const getSnapshot = (tag: BoundId, key?: string): Snapshot | null => {
16
17
  "worklet";
17
18
  if (!key) return null;
18
- return BoundStore.getSnapshot(tag, key);
19
+ return BoundStore.getSnapshot(String(tag), key);
19
20
  };
20
21
 
21
- const getLink = (tag: string): BoundsLink | null => {
22
+ const getLink = (tag: BoundId): BoundsLink | null => {
22
23
  "worklet";
23
24
  const props = getProps();
24
- const link = BoundStore.getActiveLink(tag, props.current?.route.key);
25
+ const link = BoundStore.getActiveLink(
26
+ String(tag),
27
+ props.current?.route.key,
28
+ );
25
29
  if (!link) return null;
26
30
  return {
27
31
  source: link.source
@@ -1,7 +1,8 @@
1
1
  import { BoundStore } from "../../../stores/bounds";
2
+ import type { BoundId } from "../types/options";
2
3
 
3
4
  export type ResolveBoundTagParams = {
4
- id?: string;
5
+ id?: BoundId;
5
6
  group?: string;
6
7
  };
7
8
 
@@ -11,16 +12,18 @@ export const resolveBoundTag = ({
11
12
  }: ResolveBoundTagParams): string | undefined => {
12
13
  "worklet";
13
14
 
14
- if (!id) return id;
15
+ if (id === undefined || id === null || id === "") return undefined;
16
+
17
+ const normalizedId = String(id);
15
18
 
16
19
  if (!group) {
17
- return id;
20
+ return normalizedId;
18
21
  }
19
22
 
20
23
  const currentActiveId = BoundStore.getGroupActiveId(group);
21
- if (currentActiveId !== id) {
22
- BoundStore.setGroupActiveId(group, id);
24
+ if (currentActiveId !== normalizedId) {
25
+ BoundStore.setGroupActiveId(group, normalizedId);
23
26
  }
24
27
 
25
- return `${group}:${id}`;
28
+ return `${group}:${normalizedId}`;
26
29
  };
@@ -22,9 +22,10 @@ export type ElementComposeParams = {
22
22
  };
23
23
 
24
24
  /**
25
- * Screen-level content transform params (for aligning destination bound to source).
26
- * - start/end: absolute window bounds for the shared id (source/destination)
27
- * - geometry: precomputed screen-level tx/ty/sx/sy plus ranges/entering
25
+ * Screen-level content transform params.
26
+ * - start/end: absolute window bounds for the paired target and the current
27
+ * screen-owned bound
28
+ * - geometry: precomputed screen-level tx/ty/scale plus ranges/entering
28
29
  * - interp: function to interpolate between numbers using the correct progress range
29
30
  */
30
31
  type ContentComposeParams = {