react-native-screen-transitions 3.3.0 → 3.4.0-alpha.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 (1111) hide show
  1. package/README.md +323 -130
  2. package/lib/commonjs/blank-stack/components/stack-view.js +13 -29
  3. package/lib/commonjs/blank-stack/components/stack-view.js.map +1 -1
  4. package/lib/commonjs/blank-stack/components/stack-view.native.js +13 -29
  5. package/lib/commonjs/blank-stack/components/stack-view.native.js.map +1 -1
  6. package/lib/commonjs/blank-stack/navigators/create-blank-stack-navigator.js +2 -20
  7. package/lib/commonjs/blank-stack/navigators/create-blank-stack-navigator.js.map +1 -1
  8. package/lib/commonjs/component-stack/components/component-screen.js +1 -1
  9. package/lib/commonjs/component-stack/components/component-screen.js.map +1 -1
  10. package/lib/commonjs/component-stack/components/stack-view.js +11 -25
  11. package/lib/commonjs/component-stack/components/stack-view.js.map +1 -1
  12. package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js +2 -20
  13. package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js.map +1 -1
  14. package/lib/commonjs/native-stack/views/NativeStackView.native.js +2 -4
  15. package/lib/commonjs/native-stack/views/NativeStackView.native.js.map +1 -1
  16. package/lib/commonjs/shared/animation/snap-to.js +1 -1
  17. package/lib/commonjs/shared/animation/snap-to.js.map +1 -1
  18. package/lib/commonjs/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js +17 -0
  19. package/lib/commonjs/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js.map +1 -0
  20. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js +45 -0
  21. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js.map +1 -0
  22. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js +101 -0
  23. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js.map +1 -0
  24. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-presence.js +33 -0
  25. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +1 -0
  26. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-measurement.js +47 -0
  27. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-measurement.js.map +1 -0
  28. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js +57 -0
  29. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js.map +1 -0
  30. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js +37 -0
  31. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js.map +1 -0
  32. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js +58 -0
  33. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js.map +1 -0
  34. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js +35 -0
  35. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js.map +1 -0
  36. package/lib/commonjs/shared/components/create-boundary-component/index.js +230 -0
  37. package/lib/commonjs/shared/components/create-boundary-component/index.js.map +1 -0
  38. package/lib/commonjs/shared/{utils/bounds/types/builder.js → components/create-boundary-component/types.js} +1 -1
  39. package/lib/commonjs/shared/components/create-boundary-component/types.js.map +1 -0
  40. package/lib/commonjs/shared/components/create-boundary-component/utils/build-boundary-match-key.js +21 -0
  41. package/lib/commonjs/shared/components/create-boundary-component/utils/build-boundary-match-key.js.map +1 -0
  42. package/lib/commonjs/shared/components/create-transition-aware-component.js +40 -8
  43. package/lib/commonjs/shared/components/create-transition-aware-component.js.map +1 -1
  44. package/lib/commonjs/shared/components/native-screen.js +5 -5
  45. package/lib/commonjs/shared/components/native-screen.js.map +1 -1
  46. package/lib/commonjs/shared/components/overlay/variations/float-overlay.js +9 -6
  47. package/lib/commonjs/shared/components/overlay/variations/float-overlay.js.map +1 -1
  48. package/lib/commonjs/shared/components/overlay/variations/overlay-host.js +2 -2
  49. package/lib/commonjs/shared/components/overlay/variations/overlay-host.js.map +1 -1
  50. package/lib/commonjs/shared/components/overlay/variations/screen-overlay.js +2 -2
  51. package/lib/commonjs/shared/components/overlay/variations/screen-overlay.js.map +1 -1
  52. package/lib/commonjs/shared/components/scene-view.js +34 -0
  53. package/lib/commonjs/shared/components/scene-view.js.map +1 -0
  54. package/lib/commonjs/shared/{hooks → components/screen-container/hooks}/use-backdrop-pointer-events.js +7 -5
  55. package/lib/commonjs/shared/components/screen-container/hooks/use-backdrop-pointer-events.js.map +1 -0
  56. package/lib/commonjs/shared/components/screen-container/index.js +32 -0
  57. package/lib/commonjs/shared/components/screen-container/index.js.map +1 -0
  58. package/lib/commonjs/shared/components/screen-container/layers/backdrop.js +101 -0
  59. package/lib/commonjs/shared/components/screen-container/layers/backdrop.js.map +1 -0
  60. package/lib/commonjs/shared/components/screen-container/layers/content.js +118 -0
  61. package/lib/commonjs/shared/components/screen-container/layers/content.js.map +1 -0
  62. package/lib/commonjs/shared/components/screen-container/layers/surface-container.js +52 -0
  63. package/lib/commonjs/shared/components/screen-container/layers/surface-container.js.map +1 -0
  64. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/navigator-route-registry.js +42 -0
  65. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/navigator-route-registry.js.map +1 -0
  66. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js +27 -0
  67. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js.map +1 -0
  68. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.js +47 -0
  69. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.js.map +1 -0
  70. package/lib/commonjs/shared/{hooks/lifecycle/use-close-transition.js → components/screen-lifecycle/hooks/use-close-transition/index.js} +39 -18
  71. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/index.js.map +1 -0
  72. package/lib/commonjs/shared/{hooks/animation → components/screen-lifecycle/hooks}/use-high-refresh-rate.js +1 -1
  73. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-high-refresh-rate.js.map +1 -0
  74. package/lib/commonjs/shared/{hooks/lifecycle → components/screen-lifecycle/hooks}/use-open-transition.js +12 -3
  75. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-open-transition.js.map +1 -0
  76. package/lib/commonjs/shared/{hooks/lifecycle → components/screen-lifecycle/hooks}/use-screen-events.js +2 -2
  77. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-screen-events.js.map +1 -0
  78. package/lib/commonjs/shared/components/screen-lifecycle/index.js +36 -0
  79. package/lib/commonjs/shared/components/screen-lifecycle/index.js.map +1 -0
  80. package/lib/commonjs/shared/configs/index.js +3 -1
  81. package/lib/commonjs/shared/configs/index.js.map +1 -1
  82. package/lib/commonjs/shared/configs/presets.js +222 -203
  83. package/lib/commonjs/shared/configs/presets.js.map +1 -1
  84. package/lib/commonjs/shared/configs/specs.js +8 -1
  85. package/lib/commonjs/shared/configs/specs.js.map +1 -1
  86. package/lib/commonjs/shared/constants.js +19 -9
  87. package/lib/commonjs/shared/constants.js.map +1 -1
  88. package/lib/commonjs/shared/hooks/animation/use-associated-style.js +219 -28
  89. package/lib/commonjs/shared/hooks/animation/use-associated-style.js.map +1 -1
  90. package/lib/commonjs/shared/hooks/gestures/use-screen-gesture.js +1 -1
  91. package/lib/commonjs/shared/hooks/gestures/use-scroll-registry.js +1 -1
  92. package/lib/commonjs/shared/hooks/gestures/use-scroll-registry.js.map +1 -1
  93. package/lib/commonjs/shared/hooks/navigation/use-closing-route-keys.js.map +1 -1
  94. package/lib/commonjs/shared/hooks/navigation/use-navigation-helpers.js +30 -0
  95. package/lib/commonjs/shared/hooks/navigation/use-navigation-helpers.js.map +1 -0
  96. package/lib/commonjs/shared/hooks/navigation/use-previous.js.map +1 -1
  97. package/lib/commonjs/shared/hooks/navigation/use-screen-state.js +2 -2
  98. package/lib/commonjs/shared/hooks/navigation/use-screen-state.js.map +1 -1
  99. package/lib/commonjs/shared/hooks/navigation/use-stack.js +0 -19
  100. package/lib/commonjs/shared/hooks/navigation/use-stack.js.map +1 -1
  101. package/lib/commonjs/shared/hooks/navigation/use-tab-press-reset.js +32 -0
  102. package/lib/commonjs/shared/hooks/navigation/use-tab-press-reset.js.map +1 -0
  103. package/lib/commonjs/shared/hooks/reanimated/use-shared-value-ref.js +38 -0
  104. package/lib/commonjs/shared/hooks/reanimated/use-shared-value-ref.js.map +1 -0
  105. package/lib/commonjs/shared/hooks/reanimated/use-shared-value-state.js +2 -13
  106. package/lib/commonjs/shared/hooks/reanimated/use-shared-value-state.js.map +1 -1
  107. package/lib/commonjs/shared/index.js +12 -2
  108. package/lib/commonjs/shared/index.js.map +1 -1
  109. package/lib/commonjs/shared/providers/gestures/gestures.provider.js +94 -0
  110. package/lib/commonjs/shared/providers/gestures/gestures.provider.js.map +1 -0
  111. package/lib/commonjs/shared/{hooks/gestures/use-screen-gesture-handlers.js → providers/gestures/handlers/use-handlers.js} +77 -98
  112. package/lib/commonjs/shared/providers/gestures/handlers/use-handlers.js.map +1 -0
  113. package/lib/commonjs/shared/{utils/gesture/check-gesture-activation.js → providers/gestures/helpers/gesture-activation.js} +2 -2
  114. package/lib/commonjs/shared/providers/gestures/helpers/gesture-activation.js.map +1 -0
  115. package/lib/commonjs/shared/{utils/gesture/should-defer-to-child-claim.js → providers/gestures/helpers/gesture-claims.js} +1 -1
  116. package/lib/commonjs/shared/providers/gestures/helpers/gesture-claims.js.map +1 -0
  117. package/lib/commonjs/shared/providers/gestures/helpers/gesture-directions.js +56 -0
  118. package/lib/commonjs/shared/providers/gestures/helpers/gesture-directions.js.map +1 -0
  119. package/lib/commonjs/shared/providers/gestures/helpers/gesture-physics.js +143 -0
  120. package/lib/commonjs/shared/providers/gestures/helpers/gesture-physics.js.map +1 -0
  121. package/lib/commonjs/shared/providers/gestures/helpers/gesture-reset.js +76 -0
  122. package/lib/commonjs/shared/providers/gestures/helpers/gesture-reset.js.map +1 -0
  123. package/lib/commonjs/shared/{utils/gesture/determine-snap-target.js → providers/gestures/helpers/gesture-targets.js} +50 -3
  124. package/lib/commonjs/shared/providers/gestures/helpers/gesture-targets.js.map +1 -0
  125. package/lib/commonjs/shared/providers/gestures/helpers/register-direction-claims.js +74 -0
  126. package/lib/commonjs/shared/providers/gestures/helpers/register-direction-claims.js.map +1 -0
  127. package/lib/commonjs/shared/providers/gestures/index.js +19 -0
  128. package/lib/commonjs/shared/providers/gestures/index.js.map +1 -0
  129. package/lib/commonjs/shared/providers/gestures/types.js +13 -0
  130. package/lib/commonjs/shared/providers/gestures/types.js.map +1 -0
  131. package/lib/commonjs/shared/{hooks → providers}/gestures/use-build-gestures.js +25 -32
  132. package/lib/commonjs/shared/providers/gestures/use-build-gestures.js.map +1 -0
  133. package/lib/commonjs/shared/providers/layout-anchor.provider.js +19 -6
  134. package/lib/commonjs/shared/providers/layout-anchor.provider.js.map +1 -1
  135. package/lib/commonjs/shared/providers/register-bounds.provider.js +124 -77
  136. package/lib/commonjs/shared/providers/register-bounds.provider.js.map +1 -1
  137. package/lib/commonjs/shared/providers/screen/animation/animation.provider.js +46 -0
  138. package/lib/commonjs/shared/providers/screen/animation/animation.provider.js.map +1 -0
  139. package/lib/commonjs/shared/{utils/animation → providers/screen/animation/helpers}/derivations.js +6 -2
  140. package/lib/commonjs/shared/providers/screen/animation/helpers/derivations.js.map +1 -0
  141. package/lib/commonjs/shared/{hooks/animation/use-screen-animation.js → providers/screen/animation/helpers/pipeline.js} +70 -45
  142. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -0
  143. package/lib/commonjs/shared/providers/screen/animation/helpers/worklet.js.map +1 -0
  144. package/lib/commonjs/shared/providers/screen/animation/index.js +26 -0
  145. package/lib/commonjs/shared/providers/screen/animation/index.js.map +1 -0
  146. package/lib/commonjs/shared/providers/screen/animation/use-screen-animation.js +14 -0
  147. package/lib/commonjs/shared/providers/screen/animation/use-screen-animation.js.map +1 -0
  148. package/lib/commonjs/shared/providers/screen/descriptors/descriptors.provider.js +91 -0
  149. package/lib/commonjs/shared/providers/screen/descriptors/descriptors.provider.js.map +1 -0
  150. package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js +41 -0
  151. package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js.map +1 -0
  152. package/lib/commonjs/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js +31 -0
  153. package/lib/commonjs/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js.map +1 -0
  154. package/lib/commonjs/shared/providers/screen/descriptors/helpers/get-ancestor-navigator-keys.js +28 -0
  155. package/lib/commonjs/shared/providers/screen/descriptors/helpers/get-ancestor-navigator-keys.js.map +1 -0
  156. package/lib/commonjs/shared/providers/screen/descriptors/index.js +25 -0
  157. package/lib/commonjs/shared/providers/screen/descriptors/index.js.map +1 -0
  158. package/lib/commonjs/shared/providers/screen/screen-composer.js +12 -11
  159. package/lib/commonjs/shared/providers/screen/screen-composer.js.map +1 -1
  160. package/lib/commonjs/shared/providers/screen/styles.provider.js +37 -25
  161. package/lib/commonjs/shared/providers/screen/styles.provider.js.map +1 -1
  162. package/lib/commonjs/shared/providers/scroll-settle.provider.js +25 -0
  163. package/lib/commonjs/shared/providers/scroll-settle.provider.js.map +1 -0
  164. package/lib/commonjs/shared/providers/stack/core.provider.js +14 -8
  165. package/lib/commonjs/shared/providers/stack/core.provider.js.map +1 -1
  166. package/lib/commonjs/shared/providers/stack/direct.provider.js +14 -67
  167. package/lib/commonjs/shared/providers/stack/direct.provider.js.map +1 -1
  168. package/lib/commonjs/shared/providers/stack/helpers/use-closing-route-map.js +30 -0
  169. package/lib/commonjs/shared/providers/stack/helpers/use-closing-route-map.js.map +1 -0
  170. package/lib/commonjs/shared/{utils/navigation → providers/stack/helpers/use-local-routes/helpers}/align-routes-with-latest.js +1 -1
  171. package/lib/commonjs/shared/providers/stack/helpers/use-local-routes/helpers/align-routes-with-latest.js.map +1 -0
  172. package/lib/commonjs/shared/providers/stack/helpers/use-local-routes/helpers/are-descriptors-equal.js.map +1 -0
  173. package/lib/commonjs/shared/providers/stack/helpers/use-local-routes/helpers/have-same-route-keys.js.map +1 -0
  174. package/lib/commonjs/shared/providers/stack/helpers/use-local-routes/helpers/routes-are-identical.js.map +1 -0
  175. package/lib/commonjs/shared/providers/stack/helpers/use-local-routes/index.js +101 -0
  176. package/lib/commonjs/shared/providers/stack/helpers/use-local-routes/index.js.map +1 -0
  177. package/lib/commonjs/shared/providers/stack/helpers/use-processed-routes.js +58 -0
  178. package/lib/commonjs/shared/providers/stack/helpers/use-processed-routes.js.map +1 -0
  179. package/lib/commonjs/shared/providers/stack/helpers/use-stack-derived.js +37 -0
  180. package/lib/commonjs/shared/providers/stack/helpers/use-stack-derived.js.map +1 -0
  181. package/lib/commonjs/shared/providers/stack/managed.provider.js +36 -124
  182. package/lib/commonjs/shared/providers/stack/managed.provider.js.map +1 -1
  183. package/lib/commonjs/shared/providers/viewport.provider.js +33 -0
  184. package/lib/commonjs/shared/providers/viewport.provider.js.map +1 -0
  185. package/lib/commonjs/shared/stores/animation.store.js +33 -20
  186. package/lib/commonjs/shared/stores/animation.store.js.map +1 -1
  187. package/lib/commonjs/shared/stores/bounds/helpers/apply-measured-bounds-writes.js +43 -0
  188. package/lib/commonjs/shared/stores/bounds/helpers/apply-measured-bounds-writes.js.map +1 -0
  189. package/lib/commonjs/shared/stores/bounds/helpers/keys.js +23 -0
  190. package/lib/commonjs/shared/stores/bounds/helpers/keys.js.map +1 -0
  191. package/lib/commonjs/shared/stores/bounds/helpers/matching.js +22 -0
  192. package/lib/commonjs/shared/stores/bounds/helpers/matching.js.map +1 -0
  193. package/lib/commonjs/shared/stores/bounds/index.js +37 -0
  194. package/lib/commonjs/shared/stores/bounds/index.js.map +1 -0
  195. package/lib/commonjs/shared/stores/bounds/internals/clear.js +247 -0
  196. package/lib/commonjs/shared/stores/bounds/internals/clear.js.map +1 -0
  197. package/lib/commonjs/shared/stores/bounds/internals/presence.js +128 -0
  198. package/lib/commonjs/shared/stores/bounds/internals/presence.js.map +1 -0
  199. package/lib/commonjs/shared/stores/bounds/internals/registry.js +309 -0
  200. package/lib/commonjs/shared/stores/bounds/internals/registry.js.map +1 -0
  201. package/lib/commonjs/shared/stores/bounds/internals/resolver.js +123 -0
  202. package/lib/commonjs/shared/stores/bounds/internals/resolver.js.map +1 -0
  203. package/lib/commonjs/shared/stores/bounds/internals/state.js +102 -0
  204. package/lib/commonjs/shared/stores/bounds/internals/state.js.map +1 -0
  205. package/lib/commonjs/shared/stores/bounds/types.js +6 -0
  206. package/lib/commonjs/shared/stores/bounds/types.js.map +1 -0
  207. package/lib/commonjs/shared/stores/gesture.store.js +36 -16
  208. package/lib/commonjs/shared/stores/gesture.store.js.map +1 -1
  209. package/lib/commonjs/shared/types/gesture.types.js +4 -0
  210. package/lib/commonjs/shared/types/gesture.types.js.map +1 -1
  211. package/lib/commonjs/shared/types/providers/direct-stack.types.js +6 -0
  212. package/lib/commonjs/shared/types/providers/direct-stack.types.js.map +1 -0
  213. package/lib/commonjs/shared/types/providers/managed-stack.types.js +6 -0
  214. package/lib/commonjs/shared/types/providers/managed-stack.types.js.map +1 -0
  215. package/lib/commonjs/shared/types/stack.types.js +4 -0
  216. package/lib/commonjs/shared/types/stack.types.js.map +1 -1
  217. package/lib/commonjs/shared/utils/animation/animate-many.js +32 -0
  218. package/lib/commonjs/shared/utils/animation/animate-many.js.map +1 -0
  219. package/lib/commonjs/shared/utils/bounds/helpers/build-bounds-options.js +41 -0
  220. package/lib/commonjs/shared/utils/bounds/helpers/build-bounds-options.js.map +1 -0
  221. package/lib/commonjs/shared/utils/bounds/helpers/compute-bounds-styles.js +137 -0
  222. package/lib/commonjs/shared/utils/bounds/helpers/compute-bounds-styles.js.map +1 -0
  223. package/lib/commonjs/shared/utils/bounds/helpers/constants.js +15 -0
  224. package/lib/commonjs/shared/utils/bounds/helpers/constants.js.map +1 -0
  225. package/lib/commonjs/shared/utils/bounds/helpers/geometry.js +3 -2
  226. package/lib/commonjs/shared/utils/bounds/helpers/geometry.js.map +1 -1
  227. package/lib/commonjs/shared/utils/bounds/helpers/interpolate-style.js +2 -2
  228. package/lib/commonjs/shared/utils/bounds/helpers/interpolate-style.js.map +1 -1
  229. package/lib/commonjs/shared/utils/bounds/helpers/interpolate.js +20 -0
  230. package/lib/commonjs/shared/utils/bounds/helpers/interpolate.js.map +1 -0
  231. package/lib/commonjs/shared/utils/bounds/helpers/interpolators.js +67 -0
  232. package/lib/commonjs/shared/utils/bounds/helpers/interpolators.js.map +1 -0
  233. package/lib/commonjs/shared/utils/bounds/helpers/link-accessor.js +40 -0
  234. package/lib/commonjs/shared/utils/bounds/helpers/link-accessor.js.map +1 -0
  235. package/lib/commonjs/shared/utils/bounds/helpers/math.js +132 -0
  236. package/lib/commonjs/shared/utils/bounds/helpers/math.js.map +1 -0
  237. package/lib/commonjs/shared/utils/bounds/helpers/navigation-accessor.js +45 -0
  238. package/lib/commonjs/shared/utils/bounds/helpers/navigation-accessor.js.map +1 -0
  239. package/lib/commonjs/shared/utils/bounds/helpers/resolve-bound-tag.js +25 -0
  240. package/lib/commonjs/shared/utils/bounds/helpers/resolve-bound-tag.js.map +1 -0
  241. package/lib/commonjs/shared/utils/bounds/helpers/style-composers.js +154 -21
  242. package/lib/commonjs/shared/utils/bounds/helpers/style-composers.js.map +1 -1
  243. package/lib/commonjs/shared/utils/bounds/index.js +89 -190
  244. package/lib/commonjs/shared/utils/bounds/index.js.map +1 -1
  245. package/lib/commonjs/shared/utils/bounds/sugar/navigation/helpers.js +60 -0
  246. package/lib/commonjs/shared/utils/bounds/sugar/navigation/helpers.js.map +1 -0
  247. package/lib/commonjs/shared/utils/bounds/sugar/navigation/index.js +20 -0
  248. package/lib/commonjs/shared/utils/bounds/sugar/navigation/index.js.map +1 -0
  249. package/lib/commonjs/shared/utils/bounds/sugar/navigation/types.js +6 -0
  250. package/lib/commonjs/shared/utils/bounds/sugar/navigation/types.js.map +1 -0
  251. package/lib/commonjs/shared/utils/bounds/sugar/navigation/zoom.js +295 -0
  252. package/lib/commonjs/shared/utils/bounds/sugar/navigation/zoom.js.map +1 -0
  253. package/lib/commonjs/shared/utils/bounds/types/options.js +6 -0
  254. package/lib/commonjs/shared/utils/bounds/types/{builder.js.map → options.js.map} +1 -1
  255. package/lib/commonjs/shared/utils/create-provider.js +1 -23
  256. package/lib/commonjs/shared/utils/create-provider.js.map +1 -1
  257. package/lib/commonjs/shared/utils/gesture/find-collapse-target.js +2 -1
  258. package/lib/commonjs/shared/utils/gesture/find-collapse-target.js.map +1 -1
  259. package/lib/commonjs/shared/utils/gesture/resolve-ownership.js +0 -28
  260. package/lib/commonjs/shared/utils/gesture/resolve-ownership.js.map +1 -1
  261. package/lib/commonjs/shared/utils/gesture/validate-snap-points.js +11 -1
  262. package/lib/commonjs/shared/utils/gesture/validate-snap-points.js.map +1 -1
  263. package/lib/commonjs/shared/utils/logger.js +1 -3
  264. package/lib/commonjs/shared/utils/logger.js.map +1 -1
  265. package/lib/commonjs/shared/utils/navigation/compose-descriptors.js.map +1 -1
  266. package/lib/commonjs/shared/utils/navigation/resolve-scene-neighbors.js +70 -0
  267. package/lib/commonjs/shared/utils/navigation/resolve-scene-neighbors.js.map +1 -0
  268. package/lib/commonjs/shared/utils/navigation/sync-routes-with-removed.js.map +1 -1
  269. package/lib/commonjs/shared/utils/normalize-interpolated-style.js +68 -0
  270. package/lib/commonjs/shared/utils/normalize-interpolated-style.js.map +1 -0
  271. package/lib/commonjs/shared/utils/overlay/visibility.js +1 -2
  272. package/lib/commonjs/shared/utils/overlay/visibility.js.map +1 -1
  273. package/lib/commonjs/shared/utils/platform.js +13 -0
  274. package/lib/commonjs/shared/utils/platform.js.map +1 -0
  275. package/lib/module/blank-stack/components/stack-view.js +10 -25
  276. package/lib/module/blank-stack/components/stack-view.js.map +1 -1
  277. package/lib/module/blank-stack/components/stack-view.native.js +10 -25
  278. package/lib/module/blank-stack/components/stack-view.native.js.map +1 -1
  279. package/lib/module/blank-stack/navigators/create-blank-stack-navigator.js +3 -20
  280. package/lib/module/blank-stack/navigators/create-blank-stack-navigator.js.map +1 -1
  281. package/lib/module/component-stack/components/component-screen.js +1 -1
  282. package/lib/module/component-stack/components/component-screen.js.map +1 -1
  283. package/lib/module/component-stack/components/stack-view.js +9 -22
  284. package/lib/module/component-stack/components/stack-view.js.map +1 -1
  285. package/lib/module/native-stack/navigators/createNativeStackNavigator.js +3 -20
  286. package/lib/module/native-stack/navigators/createNativeStackNavigator.js.map +1 -1
  287. package/lib/module/native-stack/views/NativeStackView.native.js +1 -3
  288. package/lib/module/native-stack/views/NativeStackView.native.js.map +1 -1
  289. package/lib/module/shared/animation/snap-to.js +1 -1
  290. package/lib/module/shared/animation/snap-to.js.map +1 -1
  291. package/lib/module/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js +12 -0
  292. package/lib/module/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js.map +1 -0
  293. package/lib/module/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js +40 -0
  294. package/lib/module/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js.map +1 -0
  295. package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js +95 -0
  296. package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js.map +1 -0
  297. package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js +28 -0
  298. package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +1 -0
  299. package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-measurement.js +42 -0
  300. package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-measurement.js.map +1 -0
  301. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js +52 -0
  302. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js.map +1 -0
  303. package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js +32 -0
  304. package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js.map +1 -0
  305. package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js +53 -0
  306. package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js.map +1 -0
  307. package/lib/module/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js +30 -0
  308. package/lib/module/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js.map +1 -0
  309. package/lib/module/shared/components/create-boundary-component/index.js +224 -0
  310. package/lib/module/shared/components/create-boundary-component/index.js.map +1 -0
  311. package/lib/module/shared/components/create-boundary-component/types.js +4 -0
  312. package/lib/module/shared/components/create-boundary-component/types.js.map +1 -0
  313. package/lib/module/shared/components/create-boundary-component/utils/build-boundary-match-key.js +17 -0
  314. package/lib/module/shared/components/create-boundary-component/utils/build-boundary-match-key.js.map +1 -0
  315. package/lib/module/shared/components/create-transition-aware-component.js +42 -10
  316. package/lib/module/shared/components/create-transition-aware-component.js.map +1 -1
  317. package/lib/module/shared/components/native-screen.js +5 -5
  318. package/lib/module/shared/components/native-screen.js.map +1 -1
  319. package/lib/module/shared/components/overlay/variations/float-overlay.js +11 -7
  320. package/lib/module/shared/components/overlay/variations/float-overlay.js.map +1 -1
  321. package/lib/module/shared/components/overlay/variations/overlay-host.js +1 -1
  322. package/lib/module/shared/components/overlay/variations/overlay-host.js.map +1 -1
  323. package/lib/module/shared/components/overlay/variations/screen-overlay.js +4 -3
  324. package/lib/module/shared/components/overlay/variations/screen-overlay.js.map +1 -1
  325. package/lib/module/shared/components/scene-view.js +29 -0
  326. package/lib/module/shared/components/scene-view.js.map +1 -0
  327. package/lib/module/shared/{hooks → components/screen-container/hooks}/use-backdrop-pointer-events.js +7 -5
  328. package/lib/module/shared/components/screen-container/hooks/use-backdrop-pointer-events.js.map +1 -0
  329. package/lib/module/shared/components/screen-container/index.js +28 -0
  330. package/lib/module/shared/components/screen-container/index.js.map +1 -0
  331. package/lib/module/shared/components/screen-container/layers/backdrop.js +96 -0
  332. package/lib/module/shared/components/screen-container/layers/backdrop.js.map +1 -0
  333. package/lib/module/shared/components/screen-container/layers/content.js +112 -0
  334. package/lib/module/shared/components/screen-container/layers/content.js.map +1 -0
  335. package/lib/module/shared/components/screen-container/layers/surface-container.js +47 -0
  336. package/lib/module/shared/components/screen-container/layers/surface-container.js.map +1 -0
  337. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/navigator-route-registry.js +36 -0
  338. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/navigator-route-registry.js.map +1 -0
  339. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js +22 -0
  340. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js.map +1 -0
  341. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.js +42 -0
  342. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.js.map +1 -0
  343. package/lib/module/shared/{hooks/lifecycle/use-close-transition.js → components/screen-lifecycle/hooks/use-close-transition/index.js} +39 -18
  344. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/index.js.map +1 -0
  345. package/lib/module/shared/{hooks/animation → components/screen-lifecycle/hooks}/use-high-refresh-rate.js +1 -2
  346. package/lib/module/shared/components/screen-lifecycle/hooks/use-high-refresh-rate.js.map +1 -0
  347. package/lib/module/shared/{hooks/lifecycle → components/screen-lifecycle/hooks}/use-open-transition.js +12 -3
  348. package/lib/module/shared/components/screen-lifecycle/hooks/use-open-transition.js.map +1 -0
  349. package/lib/module/shared/{hooks/lifecycle → components/screen-lifecycle/hooks}/use-screen-events.js +2 -2
  350. package/lib/module/shared/components/screen-lifecycle/hooks/use-screen-events.js.map +1 -0
  351. package/lib/module/shared/components/screen-lifecycle/index.js +31 -0
  352. package/lib/module/shared/components/screen-lifecycle/index.js.map +1 -0
  353. package/lib/module/shared/configs/index.js +4 -2
  354. package/lib/module/shared/configs/index.js.map +1 -1
  355. package/lib/module/shared/configs/presets.js +222 -203
  356. package/lib/module/shared/configs/presets.js.map +1 -1
  357. package/lib/module/shared/configs/specs.js +7 -0
  358. package/lib/module/shared/configs/specs.js.map +1 -1
  359. package/lib/module/shared/constants.js +18 -8
  360. package/lib/module/shared/constants.js.map +1 -1
  361. package/lib/module/shared/hooks/animation/use-associated-style.js +221 -30
  362. package/lib/module/shared/hooks/animation/use-associated-style.js.map +1 -1
  363. package/lib/module/shared/hooks/gestures/use-screen-gesture.js +1 -1
  364. package/lib/module/shared/hooks/gestures/use-screen-gesture.js.map +1 -1
  365. package/lib/module/shared/hooks/gestures/use-scroll-registry.js +1 -1
  366. package/lib/module/shared/hooks/gestures/use-scroll-registry.js.map +1 -1
  367. package/lib/module/shared/hooks/navigation/use-closing-route-keys.js.map +1 -1
  368. package/lib/module/shared/hooks/navigation/use-navigation-helpers.js +26 -0
  369. package/lib/module/shared/hooks/navigation/use-navigation-helpers.js.map +1 -0
  370. package/lib/module/shared/hooks/navigation/use-previous.js.map +1 -1
  371. package/lib/module/shared/hooks/navigation/use-screen-state.js +2 -2
  372. package/lib/module/shared/hooks/navigation/use-screen-state.js.map +1 -1
  373. package/lib/module/shared/hooks/navigation/use-stack.js +0 -20
  374. package/lib/module/shared/hooks/navigation/use-stack.js.map +1 -1
  375. package/lib/module/shared/hooks/navigation/use-tab-press-reset.js +28 -0
  376. package/lib/module/shared/hooks/navigation/use-tab-press-reset.js.map +1 -0
  377. package/lib/module/shared/hooks/reanimated/use-shared-value-ref.js +33 -0
  378. package/lib/module/shared/hooks/reanimated/use-shared-value-ref.js.map +1 -0
  379. package/lib/module/shared/hooks/reanimated/use-shared-value-state.js +3 -14
  380. package/lib/module/shared/hooks/reanimated/use-shared-value-state.js.map +1 -1
  381. package/lib/module/shared/index.js +6 -1
  382. package/lib/module/shared/index.js.map +1 -1
  383. package/lib/module/shared/providers/gestures/gestures.provider.js +87 -0
  384. package/lib/module/shared/providers/gestures/gestures.provider.js.map +1 -0
  385. package/lib/module/shared/{hooks/gestures/use-screen-gesture-handlers.js → providers/gestures/handlers/use-handlers.js} +64 -85
  386. package/lib/module/shared/providers/gestures/handlers/use-handlers.js.map +1 -0
  387. package/lib/module/shared/{utils/gesture/check-gesture-activation.js → providers/gestures/helpers/gesture-activation.js} +2 -2
  388. package/lib/module/shared/providers/gestures/helpers/gesture-activation.js.map +1 -0
  389. package/lib/module/shared/{utils/gesture/should-defer-to-child-claim.js → providers/gestures/helpers/gesture-claims.js} +1 -1
  390. package/lib/module/shared/providers/gestures/helpers/gesture-claims.js.map +1 -0
  391. package/lib/module/shared/providers/gestures/helpers/gesture-directions.js +47 -0
  392. package/lib/module/shared/providers/gestures/helpers/gesture-directions.js.map +1 -0
  393. package/lib/module/shared/{utils/gesture/velocity.js → providers/gestures/helpers/gesture-physics.js} +56 -30
  394. package/lib/module/shared/providers/gestures/helpers/gesture-physics.js.map +1 -0
  395. package/lib/module/shared/providers/gestures/helpers/gesture-reset.js +71 -0
  396. package/lib/module/shared/providers/gestures/helpers/gesture-reset.js.map +1 -0
  397. package/lib/module/shared/{utils/gesture/determine-snap-target.js → providers/gestures/helpers/gesture-targets.js} +48 -3
  398. package/lib/module/shared/providers/gestures/helpers/gesture-targets.js.map +1 -0
  399. package/lib/module/shared/providers/gestures/helpers/register-direction-claims.js +70 -0
  400. package/lib/module/shared/providers/gestures/helpers/register-direction-claims.js.map +1 -0
  401. package/lib/module/shared/providers/gestures/index.js +4 -0
  402. package/lib/module/shared/providers/gestures/index.js.map +1 -0
  403. package/lib/module/shared/providers/gestures/types.js +9 -0
  404. package/lib/module/shared/providers/gestures/types.js.map +1 -0
  405. package/lib/module/shared/{hooks → providers}/gestures/use-build-gestures.js +24 -31
  406. package/lib/module/shared/providers/gestures/use-build-gestures.js.map +1 -0
  407. package/lib/module/shared/providers/layout-anchor.provider.js +19 -6
  408. package/lib/module/shared/providers/layout-anchor.provider.js.map +1 -1
  409. package/lib/module/shared/providers/register-bounds.provider.js +124 -76
  410. package/lib/module/shared/providers/register-bounds.provider.js.map +1 -1
  411. package/lib/module/shared/providers/screen/animation/animation.provider.js +40 -0
  412. package/lib/module/shared/providers/screen/animation/animation.provider.js.map +1 -0
  413. package/lib/module/shared/{utils/animation → providers/screen/animation/helpers}/derivations.js +6 -2
  414. package/lib/module/shared/providers/screen/animation/helpers/derivations.js.map +1 -0
  415. package/lib/module/shared/{hooks/animation/use-screen-animation.js → providers/screen/animation/helpers/pipeline.js} +70 -44
  416. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -0
  417. package/lib/module/shared/providers/screen/animation/helpers/worklet.js.map +1 -0
  418. package/lib/module/shared/providers/screen/animation/index.js +5 -0
  419. package/lib/module/shared/providers/screen/animation/index.js.map +1 -0
  420. package/lib/module/shared/providers/screen/animation/use-screen-animation.js +10 -0
  421. package/lib/module/shared/providers/screen/animation/use-screen-animation.js.map +1 -0
  422. package/lib/module/shared/providers/screen/descriptors/descriptors.provider.js +84 -0
  423. package/lib/module/shared/providers/screen/descriptors/descriptors.provider.js.map +1 -0
  424. package/lib/module/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js +37 -0
  425. package/lib/module/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js.map +1 -0
  426. package/lib/module/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js +27 -0
  427. package/lib/module/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js.map +1 -0
  428. package/lib/module/shared/providers/screen/descriptors/helpers/get-ancestor-navigator-keys.js +24 -0
  429. package/lib/module/shared/providers/screen/descriptors/helpers/get-ancestor-navigator-keys.js.map +1 -0
  430. package/lib/module/shared/providers/screen/descriptors/index.js +4 -0
  431. package/lib/module/shared/providers/screen/descriptors/index.js.map +1 -0
  432. package/lib/module/shared/providers/screen/screen-composer.js +12 -11
  433. package/lib/module/shared/providers/screen/screen-composer.js.map +1 -1
  434. package/lib/module/shared/providers/screen/styles.provider.js +35 -24
  435. package/lib/module/shared/providers/screen/styles.provider.js.map +1 -1
  436. package/lib/module/shared/providers/scroll-settle.provider.js +19 -0
  437. package/lib/module/shared/providers/scroll-settle.provider.js.map +1 -0
  438. package/lib/module/shared/providers/stack/core.provider.js +14 -8
  439. package/lib/module/shared/providers/stack/core.provider.js.map +1 -1
  440. package/lib/module/shared/providers/stack/direct.provider.js +15 -66
  441. package/lib/module/shared/providers/stack/direct.provider.js.map +1 -1
  442. package/lib/module/shared/providers/stack/helpers/use-closing-route-map.js +25 -0
  443. package/lib/module/shared/providers/stack/helpers/use-closing-route-map.js.map +1 -0
  444. package/lib/module/shared/{utils/navigation → providers/stack/helpers/use-local-routes/helpers}/align-routes-with-latest.js +2 -1
  445. package/lib/module/shared/providers/stack/helpers/use-local-routes/helpers/align-routes-with-latest.js.map +1 -0
  446. package/lib/module/shared/providers/stack/helpers/use-local-routes/helpers/are-descriptors-equal.js.map +1 -0
  447. package/lib/module/shared/providers/stack/helpers/use-local-routes/helpers/have-same-route-keys.js.map +1 -0
  448. package/lib/module/shared/providers/stack/helpers/use-local-routes/helpers/routes-are-identical.js.map +1 -0
  449. package/lib/module/shared/providers/stack/helpers/use-local-routes/index.js +95 -0
  450. package/lib/module/shared/providers/stack/helpers/use-local-routes/index.js.map +1 -0
  451. package/lib/module/shared/providers/stack/helpers/use-processed-routes.js +54 -0
  452. package/lib/module/shared/providers/stack/helpers/use-processed-routes.js.map +1 -0
  453. package/lib/module/shared/providers/stack/helpers/use-stack-derived.js +33 -0
  454. package/lib/module/shared/providers/stack/helpers/use-stack-derived.js.map +1 -0
  455. package/lib/module/shared/providers/stack/managed.provider.js +37 -125
  456. package/lib/module/shared/providers/stack/managed.provider.js.map +1 -1
  457. package/lib/module/shared/providers/viewport.provider.js +27 -0
  458. package/lib/module/shared/providers/viewport.provider.js.map +1 -0
  459. package/lib/module/shared/stores/animation.store.js +34 -21
  460. package/lib/module/shared/stores/animation.store.js.map +1 -1
  461. package/lib/module/shared/stores/bounds/helpers/apply-measured-bounds-writes.js +38 -0
  462. package/lib/module/shared/stores/bounds/helpers/apply-measured-bounds-writes.js.map +1 -0
  463. package/lib/module/shared/stores/bounds/helpers/keys.js +19 -0
  464. package/lib/module/shared/stores/bounds/helpers/keys.js.map +1 -0
  465. package/lib/module/shared/stores/bounds/helpers/matching.js +17 -0
  466. package/lib/module/shared/stores/bounds/helpers/matching.js.map +1 -0
  467. package/lib/module/shared/stores/bounds/index.js +33 -0
  468. package/lib/module/shared/stores/bounds/index.js.map +1 -0
  469. package/lib/module/shared/stores/bounds/internals/clear.js +242 -0
  470. package/lib/module/shared/stores/bounds/internals/clear.js.map +1 -0
  471. package/lib/module/shared/stores/bounds/internals/presence.js +118 -0
  472. package/lib/module/shared/stores/bounds/internals/presence.js.map +1 -0
  473. package/lib/module/shared/stores/bounds/internals/registry.js +295 -0
  474. package/lib/module/shared/stores/bounds/internals/registry.js.map +1 -0
  475. package/lib/module/shared/stores/bounds/internals/resolver.js +120 -0
  476. package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -0
  477. package/lib/module/shared/stores/bounds/internals/state.js +93 -0
  478. package/lib/module/shared/stores/bounds/internals/state.js.map +1 -0
  479. package/lib/module/shared/stores/bounds/types.js +4 -0
  480. package/lib/module/shared/stores/bounds/types.js.map +1 -0
  481. package/lib/module/shared/stores/gesture.store.js +36 -16
  482. package/lib/module/shared/stores/gesture.store.js.map +1 -1
  483. package/lib/module/shared/types/gesture.types.js +5 -0
  484. package/lib/module/shared/types/gesture.types.js.map +1 -1
  485. package/lib/module/shared/types/providers/direct-stack.types.js +4 -0
  486. package/lib/module/shared/types/providers/direct-stack.types.js.map +1 -0
  487. package/lib/module/shared/types/providers/managed-stack.types.js +4 -0
  488. package/lib/module/shared/types/providers/managed-stack.types.js.map +1 -0
  489. package/lib/module/shared/types/stack.types.js +5 -0
  490. package/lib/module/shared/types/stack.types.js.map +1 -1
  491. package/lib/module/shared/utils/animation/animate-many.js +27 -0
  492. package/lib/module/shared/utils/animation/animate-many.js.map +1 -0
  493. package/lib/module/shared/utils/bounds/helpers/build-bounds-options.js +36 -0
  494. package/lib/module/shared/utils/bounds/helpers/build-bounds-options.js.map +1 -0
  495. package/lib/module/shared/utils/bounds/helpers/compute-bounds-styles.js +132 -0
  496. package/lib/module/shared/utils/bounds/helpers/compute-bounds-styles.js.map +1 -0
  497. package/lib/module/shared/utils/bounds/helpers/constants.js +11 -0
  498. package/lib/module/shared/utils/bounds/helpers/constants.js.map +1 -0
  499. package/lib/module/shared/utils/bounds/helpers/geometry.js +3 -2
  500. package/lib/module/shared/utils/bounds/helpers/geometry.js.map +1 -1
  501. package/lib/module/shared/utils/bounds/helpers/interpolate-style.js +2 -2
  502. package/lib/module/shared/utils/bounds/helpers/interpolate-style.js.map +1 -1
  503. package/lib/module/shared/utils/bounds/helpers/interpolate.js +16 -0
  504. package/lib/module/shared/utils/bounds/helpers/interpolate.js.map +1 -0
  505. package/lib/module/shared/utils/bounds/helpers/interpolators.js +62 -0
  506. package/lib/module/shared/utils/bounds/helpers/interpolators.js.map +1 -0
  507. package/lib/module/shared/utils/bounds/helpers/link-accessor.js +35 -0
  508. package/lib/module/shared/utils/bounds/helpers/link-accessor.js.map +1 -0
  509. package/lib/module/shared/utils/bounds/helpers/math.js +115 -0
  510. package/lib/module/shared/utils/bounds/helpers/math.js.map +1 -0
  511. package/lib/module/shared/utils/bounds/helpers/navigation-accessor.js +40 -0
  512. package/lib/module/shared/utils/bounds/helpers/navigation-accessor.js.map +1 -0
  513. package/lib/module/shared/utils/bounds/helpers/resolve-bound-tag.js +20 -0
  514. package/lib/module/shared/utils/bounds/helpers/resolve-bound-tag.js.map +1 -0
  515. package/lib/module/shared/utils/bounds/helpers/style-composers.js +154 -21
  516. package/lib/module/shared/utils/bounds/helpers/style-composers.js.map +1 -1
  517. package/lib/module/shared/utils/bounds/index.js +86 -187
  518. package/lib/module/shared/utils/bounds/index.js.map +1 -1
  519. package/lib/module/shared/utils/bounds/sugar/navigation/helpers.js +54 -0
  520. package/lib/module/shared/utils/bounds/sugar/navigation/helpers.js.map +1 -0
  521. package/lib/module/shared/utils/bounds/sugar/navigation/index.js +15 -0
  522. package/lib/module/shared/utils/bounds/sugar/navigation/index.js.map +1 -0
  523. package/lib/module/shared/utils/bounds/sugar/navigation/types.js +4 -0
  524. package/lib/module/shared/utils/bounds/sugar/navigation/types.js.map +1 -0
  525. package/lib/module/shared/utils/bounds/sugar/navigation/zoom.js +290 -0
  526. package/lib/module/shared/utils/bounds/sugar/navigation/zoom.js.map +1 -0
  527. package/lib/module/shared/utils/bounds/types/options.js +4 -0
  528. package/lib/module/shared/utils/bounds/types/{builder.js.map → options.js.map} +1 -1
  529. package/lib/module/shared/utils/create-provider.js +1 -23
  530. package/lib/module/shared/utils/create-provider.js.map +1 -1
  531. package/lib/module/shared/utils/gesture/find-collapse-target.js +2 -1
  532. package/lib/module/shared/utils/gesture/find-collapse-target.js.map +1 -1
  533. package/lib/module/shared/utils/gesture/resolve-ownership.js +0 -27
  534. package/lib/module/shared/utils/gesture/resolve-ownership.js.map +1 -1
  535. package/lib/module/shared/utils/gesture/validate-snap-points.js +10 -1
  536. package/lib/module/shared/utils/gesture/validate-snap-points.js.map +1 -1
  537. package/lib/module/shared/utils/logger.js +0 -1
  538. package/lib/module/shared/utils/logger.js.map +1 -1
  539. package/lib/module/shared/utils/navigation/compose-descriptors.js.map +1 -1
  540. package/lib/module/shared/utils/navigation/resolve-scene-neighbors.js +66 -0
  541. package/lib/module/shared/utils/navigation/resolve-scene-neighbors.js.map +1 -0
  542. package/lib/module/shared/utils/navigation/sync-routes-with-removed.js.map +1 -1
  543. package/lib/module/shared/utils/normalize-interpolated-style.js +64 -0
  544. package/lib/module/shared/utils/normalize-interpolated-style.js.map +1 -0
  545. package/lib/module/shared/utils/overlay/visibility.js +1 -1
  546. package/lib/module/shared/utils/overlay/visibility.js.map +1 -1
  547. package/lib/module/shared/utils/platform.js +9 -0
  548. package/lib/module/shared/utils/platform.js.map +1 -0
  549. package/lib/typescript/blank-stack/components/stack-view.d.ts +1 -2
  550. package/lib/typescript/blank-stack/components/stack-view.d.ts.map +1 -1
  551. package/lib/typescript/blank-stack/components/stack-view.native.d.ts +1 -2
  552. package/lib/typescript/blank-stack/components/stack-view.native.d.ts.map +1 -1
  553. package/lib/typescript/blank-stack/navigators/create-blank-stack-navigator.d.ts.map +1 -1
  554. package/lib/typescript/component-stack/components/stack-view.d.ts +1 -2
  555. package/lib/typescript/component-stack/components/stack-view.d.ts.map +1 -1
  556. package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts.map +1 -1
  557. package/lib/typescript/native-stack/views/NativeStackView.native.d.ts +1 -1
  558. package/lib/typescript/native-stack/views/NativeStackView.native.d.ts.map +1 -1
  559. package/lib/typescript/shared/components/create-boundary-component/helpers/resolve-pending-source-key.d.ts +2 -0
  560. package/lib/typescript/shared/components/create-boundary-component/helpers/resolve-pending-source-key.d.ts.map +1 -0
  561. package/lib/typescript/shared/components/create-boundary-component/hooks/use-auto-source-measurement.d.ts +8 -0
  562. package/lib/typescript/shared/components/create-boundary-component/hooks/use-auto-source-measurement.d.ts.map +1 -0
  563. package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.d.ts +23 -0
  564. package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.d.ts.map +1 -0
  565. package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-presence.d.ts +11 -0
  566. package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-presence.d.ts.map +1 -0
  567. package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-measurement.d.ts +18 -0
  568. package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-measurement.d.ts.map +1 -0
  569. package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-layout-handler.d.ts +10 -0
  570. package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-layout-handler.d.ts.map +1 -0
  571. package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.d.ts +8 -0
  572. package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.d.ts.map +1 -0
  573. package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.d.ts +12 -0
  574. package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.d.ts.map +1 -0
  575. package/lib/typescript/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.d.ts +10 -0
  576. package/lib/typescript/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.d.ts.map +1 -0
  577. package/lib/typescript/shared/components/create-boundary-component/index.d.ts +30 -0
  578. package/lib/typescript/shared/components/create-boundary-component/index.d.ts.map +1 -0
  579. package/lib/typescript/shared/components/create-boundary-component/types.d.ts +38 -0
  580. package/lib/typescript/shared/components/create-boundary-component/types.d.ts.map +1 -0
  581. package/lib/typescript/shared/components/create-boundary-component/utils/build-boundary-match-key.d.ts +9 -0
  582. package/lib/typescript/shared/components/create-boundary-component/utils/build-boundary-match-key.d.ts.map +1 -0
  583. package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -1
  584. package/lib/typescript/shared/components/native-screen.d.ts.map +1 -1
  585. package/lib/typescript/shared/components/overlay/variations/float-overlay.d.ts.map +1 -1
  586. package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts +3 -7
  587. package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts.map +1 -1
  588. package/lib/typescript/shared/components/overlay/variations/screen-overlay.d.ts.map +1 -1
  589. package/lib/typescript/shared/components/scene-view.d.ts +13 -0
  590. package/lib/typescript/shared/components/scene-view.d.ts.map +1 -0
  591. package/lib/typescript/shared/{hooks → components/screen-container/hooks}/use-backdrop-pointer-events.d.ts +1 -0
  592. package/lib/typescript/shared/components/screen-container/hooks/use-backdrop-pointer-events.d.ts.map +1 -0
  593. package/lib/typescript/shared/components/{screen-container.d.ts → screen-container/index.d.ts} +1 -1
  594. package/lib/typescript/shared/components/screen-container/index.d.ts.map +1 -0
  595. package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts +2 -0
  596. package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -0
  597. package/lib/typescript/shared/components/screen-container/layers/content.d.ts +6 -0
  598. package/lib/typescript/shared/components/screen-container/layers/content.d.ts.map +1 -0
  599. package/lib/typescript/shared/components/screen-container/layers/surface-container.d.ts +8 -0
  600. package/lib/typescript/shared/components/screen-container/layers/surface-container.d.ts.map +1 -0
  601. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/navigator-route-registry.d.ts +11 -0
  602. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/navigator-route-registry.d.ts.map +1 -0
  603. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.d.ts +2 -0
  604. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.d.ts.map +1 -0
  605. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.d.ts +2 -0
  606. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.d.ts.map +1 -0
  607. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/index.d.ts +7 -0
  608. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/index.d.ts.map +1 -0
  609. package/lib/typescript/shared/{hooks/animation → components/screen-lifecycle/hooks}/use-high-refresh-rate.d.ts +1 -1
  610. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-high-refresh-rate.d.ts.map +1 -0
  611. package/lib/typescript/shared/{hooks/lifecycle → components/screen-lifecycle/hooks}/use-open-transition.d.ts +3 -3
  612. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-open-transition.d.ts.map +1 -0
  613. package/lib/typescript/shared/{hooks/lifecycle → components/screen-lifecycle/hooks}/use-screen-events.d.ts +2 -2
  614. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-screen-events.d.ts.map +1 -0
  615. package/lib/typescript/shared/components/screen-lifecycle/index.d.ts +10 -0
  616. package/lib/typescript/shared/components/screen-lifecycle/index.d.ts.map +1 -0
  617. package/lib/typescript/shared/configs/index.d.ts +2 -0
  618. package/lib/typescript/shared/configs/index.d.ts.map +1 -1
  619. package/lib/typescript/shared/configs/presets.d.ts.map +1 -1
  620. package/lib/typescript/shared/configs/specs.d.ts +1 -0
  621. package/lib/typescript/shared/configs/specs.d.ts.map +1 -1
  622. package/lib/typescript/shared/constants.d.ts +9 -5
  623. package/lib/typescript/shared/constants.d.ts.map +1 -1
  624. package/lib/typescript/shared/hooks/animation/use-associated-style.d.ts +27 -2
  625. package/lib/typescript/shared/hooks/animation/use-associated-style.d.ts.map +1 -1
  626. package/lib/typescript/shared/hooks/gestures/use-scroll-registry.d.ts.map +1 -1
  627. package/lib/typescript/shared/hooks/navigation/use-closing-route-keys.d.ts.map +1 -1
  628. package/lib/typescript/shared/hooks/navigation/use-history.d.ts +2 -1
  629. package/lib/typescript/shared/hooks/navigation/use-history.d.ts.map +1 -1
  630. package/lib/typescript/shared/hooks/navigation/use-navigation-helpers.d.ts +4 -0
  631. package/lib/typescript/shared/hooks/navigation/use-navigation-helpers.d.ts.map +1 -0
  632. package/lib/typescript/shared/hooks/navigation/use-previous.d.ts.map +1 -1
  633. package/lib/typescript/shared/hooks/navigation/use-screen-state.d.ts.map +1 -1
  634. package/lib/typescript/shared/hooks/navigation/use-stack.d.ts +1 -41
  635. package/lib/typescript/shared/hooks/navigation/use-stack.d.ts.map +1 -1
  636. package/lib/typescript/shared/hooks/navigation/use-tab-press-reset.d.ts +10 -0
  637. package/lib/typescript/shared/hooks/navigation/use-tab-press-reset.d.ts.map +1 -0
  638. package/lib/typescript/shared/hooks/reanimated/use-shared-value-ref.d.ts +8 -0
  639. package/lib/typescript/shared/hooks/reanimated/use-shared-value-ref.d.ts.map +1 -0
  640. package/lib/typescript/shared/hooks/reanimated/use-shared-value-state.d.ts.map +1 -1
  641. package/lib/typescript/shared/index.d.ts +27 -16
  642. package/lib/typescript/shared/index.d.ts.map +1 -1
  643. package/lib/typescript/shared/providers/gestures/gestures.provider.d.ts +19 -0
  644. package/lib/typescript/shared/providers/gestures/gestures.provider.d.ts.map +1 -0
  645. package/lib/typescript/shared/{hooks/gestures/use-screen-gesture-handlers.d.ts → providers/gestures/handlers/use-handlers.d.ts} +6 -4
  646. package/lib/typescript/shared/providers/gestures/handlers/use-handlers.d.ts.map +1 -0
  647. package/lib/typescript/shared/{utils/gesture/check-gesture-activation.d.ts → providers/gestures/helpers/gesture-activation.d.ts} +7 -13
  648. package/lib/typescript/shared/providers/gestures/helpers/gesture-activation.d.ts.map +1 -0
  649. package/lib/typescript/shared/{utils/gesture/should-defer-to-child-claim.d.ts → providers/gestures/helpers/gesture-claims.d.ts} +2 -2
  650. package/lib/typescript/shared/providers/gestures/helpers/gesture-claims.d.ts.map +1 -0
  651. package/lib/typescript/shared/providers/gestures/helpers/gesture-directions.d.ts +13 -0
  652. package/lib/typescript/shared/providers/gestures/helpers/gesture-directions.d.ts.map +1 -0
  653. package/lib/typescript/shared/providers/gestures/helpers/gesture-physics.d.ts +42 -0
  654. package/lib/typescript/shared/providers/gestures/helpers/gesture-physics.d.ts.map +1 -0
  655. package/lib/typescript/shared/{utils/gesture/reset-gesture-values.d.ts → providers/gestures/helpers/gesture-reset.d.ts} +6 -4
  656. package/lib/typescript/shared/providers/gestures/helpers/gesture-reset.d.ts.map +1 -0
  657. package/lib/typescript/shared/{utils/gesture/determine-snap-target.d.ts → providers/gestures/helpers/gesture-targets.d.ts} +19 -1
  658. package/lib/typescript/shared/providers/gestures/helpers/gesture-targets.d.ts.map +1 -0
  659. package/lib/typescript/shared/providers/gestures/helpers/register-direction-claims.d.ts +9 -0
  660. package/lib/typescript/shared/providers/gestures/helpers/register-direction-claims.d.ts.map +1 -0
  661. package/lib/typescript/shared/providers/gestures/index.d.ts +3 -0
  662. package/lib/typescript/shared/providers/gestures/index.d.ts.map +1 -0
  663. package/lib/typescript/shared/providers/{gestures.provider.d.ts → gestures/types.d.ts} +4 -20
  664. package/lib/typescript/shared/providers/gestures/types.d.ts.map +1 -0
  665. package/lib/typescript/shared/{hooks → providers}/gestures/use-build-gestures.d.ts +2 -2
  666. package/lib/typescript/shared/providers/gestures/use-build-gestures.d.ts.map +1 -0
  667. package/lib/typescript/shared/providers/layout-anchor.provider.d.ts +6 -1
  668. package/lib/typescript/shared/providers/layout-anchor.provider.d.ts.map +1 -1
  669. package/lib/typescript/shared/providers/register-bounds.provider.d.ts.map +1 -1
  670. package/lib/typescript/shared/providers/screen/animation/animation.provider.d.ts +13 -0
  671. package/lib/typescript/shared/providers/screen/animation/animation.provider.d.ts.map +1 -0
  672. package/lib/typescript/shared/{utils/animation → providers/screen/animation/helpers}/derivations.d.ts +1 -1
  673. package/lib/typescript/shared/providers/screen/animation/helpers/derivations.d.ts.map +1 -0
  674. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts +11 -0
  675. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -0
  676. package/lib/typescript/shared/{utils/animation → providers/screen/animation/helpers}/worklet.d.ts +1 -1
  677. package/lib/typescript/shared/providers/screen/animation/helpers/worklet.d.ts.map +1 -0
  678. package/lib/typescript/shared/providers/screen/animation/index.d.ts +3 -0
  679. package/lib/typescript/shared/providers/screen/animation/index.d.ts.map +1 -0
  680. package/lib/typescript/shared/providers/screen/animation/use-screen-animation.d.ts +2 -0
  681. package/lib/typescript/shared/providers/screen/animation/use-screen-animation.d.ts.map +1 -0
  682. package/lib/typescript/shared/providers/screen/descriptors/descriptors.provider.d.ts +26 -0
  683. package/lib/typescript/shared/providers/screen/descriptors/descriptors.provider.d.ts.map +1 -0
  684. package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.d.ts +24 -0
  685. package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.d.ts.map +1 -0
  686. package/lib/typescript/shared/providers/screen/descriptors/helpers/get-ancestor-keys.d.ts +8 -0
  687. package/lib/typescript/shared/providers/screen/descriptors/helpers/get-ancestor-keys.d.ts.map +1 -0
  688. package/lib/typescript/shared/providers/screen/descriptors/helpers/get-ancestor-navigator-keys.d.ts +7 -0
  689. package/lib/typescript/shared/providers/screen/descriptors/helpers/get-ancestor-navigator-keys.d.ts.map +1 -0
  690. package/lib/typescript/shared/providers/screen/descriptors/index.d.ts +2 -0
  691. package/lib/typescript/shared/providers/screen/descriptors/index.d.ts.map +1 -0
  692. package/lib/typescript/shared/providers/screen/screen-composer.d.ts +1 -1
  693. package/lib/typescript/shared/providers/screen/screen-composer.d.ts.map +1 -1
  694. package/lib/typescript/shared/providers/screen/styles.provider.d.ts +7 -7
  695. package/lib/typescript/shared/providers/screen/styles.provider.d.ts.map +1 -1
  696. package/lib/typescript/shared/providers/scroll-settle.provider.d.ts +12 -0
  697. package/lib/typescript/shared/providers/scroll-settle.provider.d.ts.map +1 -0
  698. package/lib/typescript/shared/providers/stack/core.provider.d.ts.map +1 -1
  699. package/lib/typescript/shared/providers/stack/direct.provider.d.ts +4 -32
  700. package/lib/typescript/shared/providers/stack/direct.provider.d.ts.map +1 -1
  701. package/lib/typescript/shared/providers/stack/helpers/use-closing-route-map.d.ts +7 -0
  702. package/lib/typescript/shared/providers/stack/helpers/use-closing-route-map.d.ts.map +1 -0
  703. package/lib/typescript/shared/{utils/navigation → providers/stack/helpers/use-local-routes/helpers}/align-routes-with-latest.d.ts +1 -4
  704. package/lib/typescript/shared/providers/stack/helpers/use-local-routes/helpers/align-routes-with-latest.d.ts.map +1 -0
  705. package/lib/typescript/shared/providers/stack/helpers/use-local-routes/helpers/are-descriptors-equal.d.ts.map +1 -0
  706. package/lib/typescript/shared/providers/stack/helpers/use-local-routes/helpers/have-same-route-keys.d.ts +3 -0
  707. package/lib/typescript/shared/providers/stack/helpers/use-local-routes/helpers/have-same-route-keys.d.ts.map +1 -0
  708. package/lib/typescript/shared/providers/stack/helpers/use-local-routes/helpers/routes-are-identical.d.ts +3 -0
  709. package/lib/typescript/shared/providers/stack/helpers/use-local-routes/helpers/routes-are-identical.d.ts.map +1 -0
  710. package/lib/typescript/shared/providers/stack/helpers/{use-local-routes.d.ts → use-local-routes/index.d.ts} +3 -3
  711. package/lib/typescript/shared/providers/stack/helpers/use-local-routes/index.d.ts.map +1 -0
  712. package/lib/typescript/shared/providers/stack/helpers/use-processed-routes.d.ts +17 -0
  713. package/lib/typescript/shared/providers/stack/helpers/use-processed-routes.d.ts.map +1 -0
  714. package/lib/typescript/shared/providers/stack/helpers/use-stack-derived.d.ts +18 -0
  715. package/lib/typescript/shared/providers/stack/helpers/use-stack-derived.d.ts.map +1 -0
  716. package/lib/typescript/shared/providers/stack/managed.provider.d.ts +5 -37
  717. package/lib/typescript/shared/providers/stack/managed.provider.d.ts.map +1 -1
  718. package/lib/typescript/shared/providers/viewport.provider.d.ts +13 -0
  719. package/lib/typescript/shared/providers/viewport.provider.d.ts.map +1 -0
  720. package/lib/typescript/shared/stores/animation.store.d.ts +6 -4
  721. package/lib/typescript/shared/stores/animation.store.d.ts.map +1 -1
  722. package/lib/typescript/shared/stores/bounds/helpers/apply-measured-bounds-writes.d.ts +19 -0
  723. package/lib/typescript/shared/stores/bounds/helpers/apply-measured-bounds-writes.d.ts.map +1 -0
  724. package/lib/typescript/shared/stores/bounds/helpers/keys.d.ts +3 -0
  725. package/lib/typescript/shared/stores/bounds/helpers/keys.d.ts.map +1 -0
  726. package/lib/typescript/shared/stores/bounds/helpers/matching.d.ts +4 -0
  727. package/lib/typescript/shared/stores/bounds/helpers/matching.d.ts.map +1 -0
  728. package/lib/typescript/shared/stores/bounds/index.d.ts +32 -0
  729. package/lib/typescript/shared/stores/bounds/index.d.ts.map +1 -0
  730. package/lib/typescript/shared/stores/bounds/internals/clear.d.ts +6 -0
  731. package/lib/typescript/shared/stores/bounds/internals/clear.d.ts.map +1 -0
  732. package/lib/typescript/shared/stores/bounds/internals/presence.d.ts +12 -0
  733. package/lib/typescript/shared/stores/bounds/internals/presence.d.ts.map +1 -0
  734. package/lib/typescript/shared/stores/bounds/internals/registry.d.ts +16 -0
  735. package/lib/typescript/shared/stores/bounds/internals/registry.d.ts.map +1 -0
  736. package/lib/typescript/shared/stores/bounds/internals/resolver.d.ts +4 -0
  737. package/lib/typescript/shared/stores/bounds/internals/resolver.d.ts.map +1 -0
  738. package/lib/typescript/shared/stores/bounds/internals/state.d.ts +11 -0
  739. package/lib/typescript/shared/stores/bounds/internals/state.d.ts.map +1 -0
  740. package/lib/typescript/shared/stores/bounds/types.d.ts +62 -0
  741. package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -0
  742. package/lib/typescript/shared/stores/gesture.store.d.ts +13 -4
  743. package/lib/typescript/shared/stores/gesture.store.d.ts.map +1 -1
  744. package/lib/typescript/shared/types/animation.types.d.ts +85 -29
  745. package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
  746. package/lib/typescript/shared/types/bounds.types.d.ts +17 -3
  747. package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
  748. package/lib/typescript/shared/types/gesture.types.d.ts +27 -8
  749. package/lib/typescript/shared/types/gesture.types.d.ts.map +1 -1
  750. package/lib/typescript/shared/types/index.d.ts +2 -2
  751. package/lib/typescript/shared/types/index.d.ts.map +1 -1
  752. package/lib/typescript/shared/types/overlay.types.d.ts +8 -0
  753. package/lib/typescript/shared/types/overlay.types.d.ts.map +1 -1
  754. package/lib/typescript/shared/types/providers/direct-stack.types.d.ts +22 -0
  755. package/lib/typescript/shared/types/providers/direct-stack.types.d.ts.map +1 -0
  756. package/lib/typescript/shared/types/providers/managed-stack.types.d.ts +45 -0
  757. package/lib/typescript/shared/types/providers/managed-stack.types.d.ts.map +1 -0
  758. package/lib/typescript/shared/types/screen.types.d.ts +62 -6
  759. package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
  760. package/lib/typescript/shared/types/stack.types.d.ts +7 -0
  761. package/lib/typescript/shared/types/stack.types.d.ts.map +1 -1
  762. package/lib/typescript/shared/utils/animation/animate-many.d.ts +13 -0
  763. package/lib/typescript/shared/utils/animation/animate-many.d.ts.map +1 -0
  764. package/lib/typescript/shared/utils/bounds/helpers/build-bounds-options.d.ts +14 -0
  765. package/lib/typescript/shared/utils/bounds/helpers/build-bounds-options.d.ts.map +1 -0
  766. package/lib/typescript/shared/utils/bounds/helpers/compute-bounds-styles.d.ts +4 -0
  767. package/lib/typescript/shared/utils/bounds/helpers/compute-bounds-styles.d.ts.map +1 -0
  768. package/lib/typescript/shared/utils/bounds/helpers/constants.d.ts +9 -0
  769. package/lib/typescript/shared/utils/bounds/helpers/constants.d.ts.map +1 -0
  770. package/lib/typescript/shared/utils/bounds/helpers/geometry.d.ts +1 -1
  771. package/lib/typescript/shared/utils/bounds/helpers/geometry.d.ts.map +1 -1
  772. package/lib/typescript/shared/utils/bounds/helpers/interpolate-style.d.ts.map +1 -1
  773. package/lib/typescript/shared/utils/bounds/helpers/interpolate.d.ts +2 -0
  774. package/lib/typescript/shared/utils/bounds/helpers/interpolate.d.ts.map +1 -0
  775. package/lib/typescript/shared/utils/bounds/helpers/interpolators.d.ts +13 -0
  776. package/lib/typescript/shared/utils/bounds/helpers/interpolators.d.ts.map +1 -0
  777. package/lib/typescript/shared/utils/bounds/helpers/link-accessor.d.ts +11 -0
  778. package/lib/typescript/shared/utils/bounds/helpers/link-accessor.d.ts.map +1 -0
  779. package/lib/typescript/shared/utils/bounds/helpers/math.d.ts +38 -0
  780. package/lib/typescript/shared/utils/bounds/helpers/math.d.ts.map +1 -0
  781. package/lib/typescript/shared/utils/bounds/helpers/navigation-accessor.d.ts +16 -0
  782. package/lib/typescript/shared/utils/bounds/helpers/navigation-accessor.d.ts.map +1 -0
  783. package/lib/typescript/shared/utils/bounds/helpers/resolve-bound-tag.d.ts +6 -0
  784. package/lib/typescript/shared/utils/bounds/helpers/resolve-bound-tag.d.ts.map +1 -0
  785. package/lib/typescript/shared/utils/bounds/helpers/style-composers.d.ts +4 -4
  786. package/lib/typescript/shared/utils/bounds/helpers/style-composers.d.ts.map +1 -1
  787. package/lib/typescript/shared/utils/bounds/index.d.ts +1 -1
  788. package/lib/typescript/shared/utils/bounds/index.d.ts.map +1 -1
  789. package/lib/typescript/shared/utils/bounds/sugar/navigation/helpers.d.ts +17 -0
  790. package/lib/typescript/shared/utils/bounds/sugar/navigation/helpers.d.ts.map +1 -0
  791. package/lib/typescript/shared/utils/bounds/sugar/navigation/index.d.ts +3 -0
  792. package/lib/typescript/shared/utils/bounds/sugar/navigation/index.d.ts.map +1 -0
  793. package/lib/typescript/shared/utils/bounds/sugar/navigation/types.d.ts +18 -0
  794. package/lib/typescript/shared/utils/bounds/sugar/navigation/types.d.ts.map +1 -0
  795. package/lib/typescript/shared/utils/bounds/sugar/navigation/zoom.d.ts +4 -0
  796. package/lib/typescript/shared/utils/bounds/sugar/navigation/zoom.d.ts.map +1 -0
  797. package/lib/typescript/shared/utils/bounds/types/{builder.d.ts → options.d.ts} +15 -7
  798. package/lib/typescript/shared/utils/bounds/types/{builder.d.ts.map → options.d.ts.map} +1 -1
  799. package/lib/typescript/shared/utils/create-provider.d.ts +2 -2
  800. package/lib/typescript/shared/utils/create-provider.d.ts.map +1 -1
  801. package/lib/typescript/shared/utils/gesture/find-collapse-target.d.ts.map +1 -1
  802. package/lib/typescript/shared/utils/gesture/resolve-ownership.d.ts +2 -10
  803. package/lib/typescript/shared/utils/gesture/resolve-ownership.d.ts.map +1 -1
  804. package/lib/typescript/shared/utils/gesture/validate-snap-points.d.ts +7 -2
  805. package/lib/typescript/shared/utils/gesture/validate-snap-points.d.ts.map +1 -1
  806. package/lib/typescript/shared/utils/logger.d.ts +0 -1
  807. package/lib/typescript/shared/utils/logger.d.ts.map +1 -1
  808. package/lib/typescript/shared/utils/navigation/compose-descriptors.d.ts +1 -4
  809. package/lib/typescript/shared/utils/navigation/compose-descriptors.d.ts.map +1 -1
  810. package/lib/typescript/shared/utils/navigation/resolve-scene-neighbors.d.ts +25 -0
  811. package/lib/typescript/shared/utils/navigation/resolve-scene-neighbors.d.ts.map +1 -0
  812. package/lib/typescript/shared/utils/navigation/sync-routes-with-removed.d.ts +1 -3
  813. package/lib/typescript/shared/utils/navigation/sync-routes-with-removed.d.ts.map +1 -1
  814. package/lib/typescript/shared/utils/normalize-interpolated-style.d.ts +17 -0
  815. package/lib/typescript/shared/utils/normalize-interpolated-style.d.ts.map +1 -0
  816. package/lib/typescript/shared/utils/overlay/visibility.d.ts +0 -1
  817. package/lib/typescript/shared/utils/overlay/visibility.d.ts.map +1 -1
  818. package/lib/typescript/shared/utils/platform.d.ts +5 -0
  819. package/lib/typescript/shared/utils/platform.d.ts.map +1 -0
  820. package/package.json +3 -1
  821. package/src/blank-stack/components/stack-view.native.tsx +15 -34
  822. package/src/blank-stack/components/stack-view.tsx +15 -34
  823. package/src/blank-stack/navigators/create-blank-stack-navigator.tsx +2 -28
  824. package/src/component-stack/components/component-screen.tsx +1 -1
  825. package/src/component-stack/components/stack-view.tsx +8 -30
  826. package/src/native-stack/navigators/createNativeStackNavigator.tsx +2 -28
  827. package/src/native-stack/views/NativeStackView.native.tsx +1 -4
  828. package/src/shared/animation/snap-to.ts +1 -1
  829. package/src/shared/components/create-boundary-component/helpers/resolve-pending-source-key.ts +16 -0
  830. package/src/shared/components/create-boundary-component/hooks/use-auto-source-measurement.ts +50 -0
  831. package/src/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.ts +177 -0
  832. package/src/shared/components/create-boundary-component/hooks/use-boundary-presence.ts +55 -0
  833. package/src/shared/components/create-boundary-component/hooks/use-group-active-measurement.ts +59 -0
  834. package/src/shared/components/create-boundary-component/hooks/use-initial-layout-handler.ts +83 -0
  835. package/src/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.ts +47 -0
  836. package/src/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.ts +83 -0
  837. package/src/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.ts +40 -0
  838. package/src/shared/components/create-boundary-component/index.tsx +263 -0
  839. package/src/shared/components/create-boundary-component/types.ts +47 -0
  840. package/src/shared/components/create-boundary-component/utils/build-boundary-match-key.ts +29 -0
  841. package/src/shared/components/create-transition-aware-component.tsx +53 -9
  842. package/src/shared/components/native-screen.tsx +4 -8
  843. package/src/shared/components/overlay/variations/float-overlay.tsx +25 -28
  844. package/src/shared/components/overlay/variations/overlay-host.tsx +7 -12
  845. package/src/shared/components/overlay/variations/screen-overlay.tsx +6 -12
  846. package/src/shared/components/scene-view.tsx +32 -0
  847. package/src/shared/{hooks → components/screen-container/hooks}/use-backdrop-pointer-events.ts +9 -5
  848. package/src/shared/components/screen-container/index.tsx +26 -0
  849. package/src/shared/components/screen-container/layers/backdrop.tsx +111 -0
  850. package/src/shared/components/screen-container/layers/content.tsx +133 -0
  851. package/src/shared/components/screen-container/layers/surface-container.tsx +55 -0
  852. package/src/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/navigator-route-registry.ts +46 -0
  853. package/src/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.ts +27 -0
  854. package/src/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.ts +58 -0
  855. package/src/shared/{hooks/lifecycle/use-close-transition.ts → components/screen-lifecycle/hooks/use-close-transition/index.ts} +43 -20
  856. package/src/shared/{hooks/animation/use-high-refresh-rate.tsx → components/screen-lifecycle/hooks/use-high-refresh-rate.ts} +2 -2
  857. package/src/shared/{hooks/lifecycle → components/screen-lifecycle/hooks}/use-open-transition.ts +15 -4
  858. package/src/shared/{hooks/lifecycle → components/screen-lifecycle/hooks}/use-screen-events.ts +4 -4
  859. package/src/shared/components/screen-lifecycle/index.tsx +36 -0
  860. package/src/shared/configs/index.ts +3 -1
  861. package/src/shared/configs/presets.ts +189 -153
  862. package/src/shared/configs/specs.ts +8 -0
  863. package/src/shared/constants.ts +18 -6
  864. package/src/shared/hooks/animation/use-associated-style.ts +347 -0
  865. package/src/shared/hooks/gestures/use-screen-gesture.ts +1 -1
  866. package/src/shared/hooks/gestures/{use-scroll-registry.tsx → use-scroll-registry.ts} +1 -1
  867. package/src/shared/hooks/navigation/use-history.ts +1 -1
  868. package/src/shared/hooks/navigation/use-navigation-helpers.ts +25 -0
  869. package/src/shared/hooks/navigation/{use-previous.tsx → use-previous.ts} +1 -1
  870. package/src/shared/hooks/navigation/{use-screen-state.tsx → use-screen-state.ts} +3 -3
  871. package/src/shared/hooks/navigation/use-stack.tsx +1 -41
  872. package/src/shared/hooks/navigation/use-tab-press-reset.ts +41 -0
  873. package/src/shared/hooks/reanimated/use-shared-value-ref.ts +43 -0
  874. package/src/shared/hooks/reanimated/use-shared-value-state.ts +2 -13
  875. package/src/shared/index.ts +20 -1
  876. package/src/shared/providers/gestures/gestures.provider.tsx +127 -0
  877. package/src/shared/{hooks/gestures/use-screen-gesture-handlers.ts → providers/gestures/handlers/use-handlers.ts} +109 -126
  878. package/src/shared/{utils/gesture/check-gesture-activation.ts → providers/gestures/helpers/gesture-activation.ts} +6 -13
  879. package/src/shared/{utils/gesture/should-defer-to-child-claim.ts → providers/gestures/helpers/gesture-claims.ts} +1 -1
  880. package/src/shared/providers/gestures/helpers/gesture-directions.ts +97 -0
  881. package/src/shared/{utils/gesture/velocity.ts → providers/gestures/helpers/gesture-physics.ts} +97 -48
  882. package/src/shared/providers/gestures/helpers/gesture-reset.ts +108 -0
  883. package/src/shared/{utils/gesture/determine-snap-target.ts → providers/gestures/helpers/gesture-targets.ts} +81 -4
  884. package/src/shared/providers/gestures/helpers/register-direction-claims.ts +84 -0
  885. package/src/shared/providers/gestures/index.tsx +10 -0
  886. package/src/shared/providers/gestures/types.ts +45 -0
  887. package/src/shared/{hooks/gestures/use-build-gestures.tsx → providers/gestures/use-build-gestures.ts} +30 -45
  888. package/src/shared/providers/layout-anchor.provider.tsx +34 -3
  889. package/src/shared/providers/register-bounds.provider.tsx +169 -113
  890. package/src/shared/providers/screen/animation/animation.provider.tsx +57 -0
  891. package/src/shared/{utils/animation → providers/screen/animation/helpers}/derivations.ts +5 -5
  892. package/src/shared/{hooks/animation/use-screen-animation.tsx → providers/screen/animation/helpers/pipeline.ts} +109 -48
  893. package/src/shared/{utils/animation → providers/screen/animation/helpers}/worklet.ts +1 -1
  894. package/src/shared/providers/screen/animation/index.tsx +5 -0
  895. package/src/shared/providers/screen/animation/use-screen-animation.tsx +6 -0
  896. package/src/shared/providers/screen/descriptors/descriptors.provider.tsx +113 -0
  897. package/src/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.ts +67 -0
  898. package/src/shared/providers/screen/descriptors/helpers/get-ancestor-keys.ts +30 -0
  899. package/src/shared/providers/screen/descriptors/helpers/get-ancestor-navigator-keys.ts +29 -0
  900. package/src/shared/providers/screen/descriptors/index.tsx +6 -0
  901. package/src/shared/providers/screen/screen-composer.tsx +12 -9
  902. package/src/shared/providers/screen/styles.provider.tsx +122 -105
  903. package/src/shared/providers/scroll-settle.provider.tsx +24 -0
  904. package/src/shared/providers/stack/core.provider.tsx +13 -8
  905. package/src/shared/providers/stack/direct.provider.tsx +19 -110
  906. package/src/shared/providers/stack/helpers/use-closing-route-map.ts +28 -0
  907. package/src/shared/{utils/navigation → providers/stack/helpers/use-local-routes/helpers}/align-routes-with-latest.ts +2 -5
  908. package/src/shared/{utils/navigation → providers/stack/helpers/use-local-routes/helpers}/have-same-route-keys.ts +1 -3
  909. package/src/shared/{utils/navigation → providers/stack/helpers/use-local-routes/helpers}/routes-are-identical.ts +1 -3
  910. package/src/shared/providers/stack/helpers/use-local-routes/index.ts +147 -0
  911. package/src/shared/providers/stack/helpers/use-processed-routes.ts +85 -0
  912. package/src/shared/providers/stack/helpers/use-stack-derived.ts +43 -0
  913. package/src/shared/providers/stack/managed.provider.tsx +65 -190
  914. package/src/shared/providers/viewport.provider.tsx +39 -0
  915. package/src/shared/stores/animation.store.ts +42 -20
  916. package/src/shared/stores/bounds/helpers/apply-measured-bounds-writes.ts +101 -0
  917. package/src/shared/stores/bounds/helpers/keys.ts +21 -0
  918. package/src/shared/stores/bounds/helpers/matching.ts +25 -0
  919. package/src/shared/stores/bounds/index.ts +60 -0
  920. package/src/shared/stores/bounds/internals/clear.ts +335 -0
  921. package/src/shared/stores/bounds/internals/presence.ts +146 -0
  922. package/src/shared/stores/bounds/internals/registry.ts +408 -0
  923. package/src/shared/stores/bounds/internals/resolver.ts +213 -0
  924. package/src/shared/stores/bounds/internals/state.ts +115 -0
  925. package/src/shared/stores/bounds/types.ts +76 -0
  926. package/src/shared/stores/gesture.store.ts +52 -27
  927. package/src/shared/types/animation.types.ts +92 -30
  928. package/src/shared/types/bounds.types.ts +25 -5
  929. package/src/shared/types/gesture.types.ts +29 -8
  930. package/src/shared/types/index.ts +11 -0
  931. package/src/shared/types/overlay.types.ts +12 -0
  932. package/src/shared/types/providers/direct-stack.types.ts +35 -0
  933. package/src/shared/types/providers/managed-stack.types.ts +59 -0
  934. package/src/shared/types/screen.types.ts +66 -6
  935. package/src/shared/types/stack.types.ts +8 -0
  936. package/src/shared/utils/animation/animate-many.ts +40 -0
  937. package/src/shared/utils/bounds/helpers/build-bounds-options.ts +48 -0
  938. package/src/shared/utils/bounds/helpers/compute-bounds-styles.ts +180 -0
  939. package/src/shared/utils/bounds/helpers/constants.ts +10 -0
  940. package/src/shared/utils/bounds/helpers/geometry.ts +4 -3
  941. package/src/shared/utils/bounds/helpers/interpolate-style.ts +2 -2
  942. package/src/shared/utils/bounds/helpers/interpolate.ts +19 -0
  943. package/src/shared/utils/bounds/helpers/interpolators.ts +108 -0
  944. package/src/shared/utils/bounds/helpers/link-accessor.ts +40 -0
  945. package/src/shared/utils/bounds/helpers/math.ts +161 -0
  946. package/src/shared/utils/bounds/helpers/navigation-accessor.ts +61 -0
  947. package/src/shared/utils/bounds/helpers/resolve-bound-tag.ts +26 -0
  948. package/src/shared/utils/bounds/helpers/style-composers.ts +132 -57
  949. package/src/shared/utils/bounds/index.ts +115 -254
  950. package/src/shared/utils/bounds/sugar/navigation/helpers.ts +74 -0
  951. package/src/shared/utils/bounds/sugar/navigation/index.ts +14 -0
  952. package/src/shared/utils/bounds/sugar/navigation/types.ts +26 -0
  953. package/src/shared/utils/bounds/sugar/navigation/zoom.ts +348 -0
  954. package/src/shared/utils/bounds/types/{builder.ts → options.ts} +26 -18
  955. package/src/shared/utils/create-provider.tsx +0 -27
  956. package/src/shared/utils/gesture/find-collapse-target.ts +2 -3
  957. package/src/shared/utils/gesture/resolve-ownership.ts +1 -37
  958. package/src/shared/utils/gesture/validate-snap-points.ts +17 -5
  959. package/src/shared/utils/logger.ts +0 -3
  960. package/src/shared/utils/navigation/compose-descriptors.ts +1 -3
  961. package/src/shared/utils/navigation/resolve-scene-neighbors.ts +89 -0
  962. package/src/shared/utils/navigation/sync-routes-with-removed.ts +1 -4
  963. package/src/shared/utils/normalize-interpolated-style.ts +67 -0
  964. package/src/shared/utils/overlay/visibility.ts +1 -1
  965. package/src/shared/utils/platform.ts +6 -0
  966. package/lib/commonjs/shared/components/screen-container.js +0 -129
  967. package/lib/commonjs/shared/components/screen-container.js.map +0 -1
  968. package/lib/commonjs/shared/components/screen-lifecycle.js +0 -29
  969. package/lib/commonjs/shared/components/screen-lifecycle.js.map +0 -1
  970. package/lib/commonjs/shared/hooks/animation/use-high-refresh-rate.js.map +0 -1
  971. package/lib/commonjs/shared/hooks/animation/use-screen-animation.js.map +0 -1
  972. package/lib/commonjs/shared/hooks/gestures/use-build-gestures.js.map +0 -1
  973. package/lib/commonjs/shared/hooks/gestures/use-screen-gesture-handlers.js.map +0 -1
  974. package/lib/commonjs/shared/hooks/lifecycle/use-close-transition.js.map +0 -1
  975. package/lib/commonjs/shared/hooks/lifecycle/use-open-transition.js.map +0 -1
  976. package/lib/commonjs/shared/hooks/lifecycle/use-screen-events.js.map +0 -1
  977. package/lib/commonjs/shared/hooks/use-backdrop-pointer-events.js.map +0 -1
  978. package/lib/commonjs/shared/providers/gestures.provider.js +0 -169
  979. package/lib/commonjs/shared/providers/gestures.provider.js.map +0 -1
  980. package/lib/commonjs/shared/providers/screen/keys.provider.js +0 -40
  981. package/lib/commonjs/shared/providers/screen/keys.provider.js.map +0 -1
  982. package/lib/commonjs/shared/providers/stack/helpers/active-screens-limit.js +0 -23
  983. package/lib/commonjs/shared/providers/stack/helpers/active-screens-limit.js.map +0 -1
  984. package/lib/commonjs/shared/providers/stack/helpers/use-local-routes.js +0 -93
  985. package/lib/commonjs/shared/providers/stack/helpers/use-local-routes.js.map +0 -1
  986. package/lib/commonjs/shared/stores/bounds.store.js +0 -231
  987. package/lib/commonjs/shared/stores/bounds.store.js.map +0 -1
  988. package/lib/commonjs/shared/utils/animation/derivations.js.map +0 -1
  989. package/lib/commonjs/shared/utils/animation/worklet.js.map +0 -1
  990. package/lib/commonjs/shared/utils/gesture/check-gesture-activation.js.map +0 -1
  991. package/lib/commonjs/shared/utils/gesture/determine-dismissal.js +0 -50
  992. package/lib/commonjs/shared/utils/gesture/determine-dismissal.js.map +0 -1
  993. package/lib/commonjs/shared/utils/gesture/determine-snap-target.js.map +0 -1
  994. package/lib/commonjs/shared/utils/gesture/map-gesture-to-progress.js +0 -17
  995. package/lib/commonjs/shared/utils/gesture/map-gesture-to-progress.js.map +0 -1
  996. package/lib/commonjs/shared/utils/gesture/reset-gesture-values.js +0 -56
  997. package/lib/commonjs/shared/utils/gesture/reset-gesture-values.js.map +0 -1
  998. package/lib/commonjs/shared/utils/gesture/should-defer-to-child-claim.js.map +0 -1
  999. package/lib/commonjs/shared/utils/gesture/velocity.js +0 -111
  1000. package/lib/commonjs/shared/utils/gesture/velocity.js.map +0 -1
  1001. package/lib/commonjs/shared/utils/navigation/align-routes-with-latest.js.map +0 -1
  1002. package/lib/commonjs/shared/utils/navigation/are-descriptors-equal.js.map +0 -1
  1003. package/lib/commonjs/shared/utils/navigation/have-same-route-keys.js.map +0 -1
  1004. package/lib/commonjs/shared/utils/navigation/routes-are-identical.js.map +0 -1
  1005. package/lib/commonjs/shared/utils/reset-stores-for-screen.js +0 -20
  1006. package/lib/commonjs/shared/utils/reset-stores-for-screen.js.map +0 -1
  1007. package/lib/module/shared/components/screen-container.js +0 -123
  1008. package/lib/module/shared/components/screen-container.js.map +0 -1
  1009. package/lib/module/shared/components/screen-lifecycle.js +0 -24
  1010. package/lib/module/shared/components/screen-lifecycle.js.map +0 -1
  1011. package/lib/module/shared/hooks/animation/use-high-refresh-rate.js.map +0 -1
  1012. package/lib/module/shared/hooks/animation/use-screen-animation.js.map +0 -1
  1013. package/lib/module/shared/hooks/gestures/use-build-gestures.js.map +0 -1
  1014. package/lib/module/shared/hooks/gestures/use-screen-gesture-handlers.js.map +0 -1
  1015. package/lib/module/shared/hooks/lifecycle/use-close-transition.js.map +0 -1
  1016. package/lib/module/shared/hooks/lifecycle/use-open-transition.js.map +0 -1
  1017. package/lib/module/shared/hooks/lifecycle/use-screen-events.js.map +0 -1
  1018. package/lib/module/shared/hooks/use-backdrop-pointer-events.js.map +0 -1
  1019. package/lib/module/shared/providers/gestures.provider.js +0 -162
  1020. package/lib/module/shared/providers/gestures.provider.js.map +0 -1
  1021. package/lib/module/shared/providers/screen/keys.provider.js +0 -35
  1022. package/lib/module/shared/providers/screen/keys.provider.js.map +0 -1
  1023. package/lib/module/shared/providers/stack/helpers/active-screens-limit.js +0 -19
  1024. package/lib/module/shared/providers/stack/helpers/active-screens-limit.js.map +0 -1
  1025. package/lib/module/shared/providers/stack/helpers/use-local-routes.js +0 -87
  1026. package/lib/module/shared/providers/stack/helpers/use-local-routes.js.map +0 -1
  1027. package/lib/module/shared/stores/bounds.store.js +0 -227
  1028. package/lib/module/shared/stores/bounds.store.js.map +0 -1
  1029. package/lib/module/shared/utils/animation/derivations.js.map +0 -1
  1030. package/lib/module/shared/utils/animation/worklet.js.map +0 -1
  1031. package/lib/module/shared/utils/bounds/types/builder.js +0 -4
  1032. package/lib/module/shared/utils/gesture/check-gesture-activation.js.map +0 -1
  1033. package/lib/module/shared/utils/gesture/determine-dismissal.js +0 -45
  1034. package/lib/module/shared/utils/gesture/determine-dismissal.js.map +0 -1
  1035. package/lib/module/shared/utils/gesture/determine-snap-target.js.map +0 -1
  1036. package/lib/module/shared/utils/gesture/map-gesture-to-progress.js +0 -12
  1037. package/lib/module/shared/utils/gesture/map-gesture-to-progress.js.map +0 -1
  1038. package/lib/module/shared/utils/gesture/reset-gesture-values.js +0 -51
  1039. package/lib/module/shared/utils/gesture/reset-gesture-values.js.map +0 -1
  1040. package/lib/module/shared/utils/gesture/should-defer-to-child-claim.js.map +0 -1
  1041. package/lib/module/shared/utils/gesture/velocity.js.map +0 -1
  1042. package/lib/module/shared/utils/navigation/align-routes-with-latest.js.map +0 -1
  1043. package/lib/module/shared/utils/navigation/are-descriptors-equal.js.map +0 -1
  1044. package/lib/module/shared/utils/navigation/have-same-route-keys.js.map +0 -1
  1045. package/lib/module/shared/utils/navigation/routes-are-identical.js.map +0 -1
  1046. package/lib/module/shared/utils/reset-stores-for-screen.js +0 -15
  1047. package/lib/module/shared/utils/reset-stores-for-screen.js.map +0 -1
  1048. package/lib/typescript/shared/components/screen-container.d.ts.map +0 -1
  1049. package/lib/typescript/shared/components/screen-lifecycle.d.ts +0 -12
  1050. package/lib/typescript/shared/components/screen-lifecycle.d.ts.map +0 -1
  1051. package/lib/typescript/shared/hooks/animation/use-high-refresh-rate.d.ts.map +0 -1
  1052. package/lib/typescript/shared/hooks/animation/use-screen-animation.d.ts +0 -8
  1053. package/lib/typescript/shared/hooks/animation/use-screen-animation.d.ts.map +0 -1
  1054. package/lib/typescript/shared/hooks/gestures/use-build-gestures.d.ts.map +0 -1
  1055. package/lib/typescript/shared/hooks/gestures/use-screen-gesture-handlers.d.ts.map +0 -1
  1056. package/lib/typescript/shared/hooks/lifecycle/use-close-transition.d.ts +0 -13
  1057. package/lib/typescript/shared/hooks/lifecycle/use-close-transition.d.ts.map +0 -1
  1058. package/lib/typescript/shared/hooks/lifecycle/use-open-transition.d.ts.map +0 -1
  1059. package/lib/typescript/shared/hooks/lifecycle/use-screen-events.d.ts.map +0 -1
  1060. package/lib/typescript/shared/hooks/use-backdrop-pointer-events.d.ts.map +0 -1
  1061. package/lib/typescript/shared/providers/gestures.provider.d.ts.map +0 -1
  1062. package/lib/typescript/shared/providers/screen/keys.provider.d.ts +0 -22
  1063. package/lib/typescript/shared/providers/screen/keys.provider.d.ts.map +0 -1
  1064. package/lib/typescript/shared/providers/stack/helpers/active-screens-limit.d.ts +0 -9
  1065. package/lib/typescript/shared/providers/stack/helpers/active-screens-limit.d.ts.map +0 -1
  1066. package/lib/typescript/shared/providers/stack/helpers/use-local-routes.d.ts.map +0 -1
  1067. package/lib/typescript/shared/stores/bounds.store.d.ts +0 -43
  1068. package/lib/typescript/shared/stores/bounds.store.d.ts.map +0 -1
  1069. package/lib/typescript/shared/utils/animation/derivations.d.ts.map +0 -1
  1070. package/lib/typescript/shared/utils/animation/worklet.d.ts.map +0 -1
  1071. package/lib/typescript/shared/utils/gesture/check-gesture-activation.d.ts.map +0 -1
  1072. package/lib/typescript/shared/utils/gesture/determine-dismissal.d.ts +0 -24
  1073. package/lib/typescript/shared/utils/gesture/determine-dismissal.d.ts.map +0 -1
  1074. package/lib/typescript/shared/utils/gesture/determine-snap-target.d.ts.map +0 -1
  1075. package/lib/typescript/shared/utils/gesture/map-gesture-to-progress.d.ts +0 -5
  1076. package/lib/typescript/shared/utils/gesture/map-gesture-to-progress.d.ts.map +0 -1
  1077. package/lib/typescript/shared/utils/gesture/reset-gesture-values.d.ts.map +0 -1
  1078. package/lib/typescript/shared/utils/gesture/should-defer-to-child-claim.d.ts.map +0 -1
  1079. package/lib/typescript/shared/utils/gesture/velocity.d.ts +0 -26
  1080. package/lib/typescript/shared/utils/gesture/velocity.d.ts.map +0 -1
  1081. package/lib/typescript/shared/utils/navigation/align-routes-with-latest.d.ts.map +0 -1
  1082. package/lib/typescript/shared/utils/navigation/are-descriptors-equal.d.ts.map +0 -1
  1083. package/lib/typescript/shared/utils/navigation/have-same-route-keys.d.ts +0 -6
  1084. package/lib/typescript/shared/utils/navigation/have-same-route-keys.d.ts.map +0 -1
  1085. package/lib/typescript/shared/utils/navigation/routes-are-identical.d.ts +0 -6
  1086. package/lib/typescript/shared/utils/navigation/routes-are-identical.d.ts.map +0 -1
  1087. package/lib/typescript/shared/utils/reset-stores-for-screen.d.ts +0 -7
  1088. package/lib/typescript/shared/utils/reset-stores-for-screen.d.ts.map +0 -1
  1089. package/src/shared/components/screen-container.tsx +0 -138
  1090. package/src/shared/components/screen-lifecycle.tsx +0 -32
  1091. package/src/shared/hooks/animation/use-associated-style.tsx +0 -71
  1092. package/src/shared/providers/gestures.provider.tsx +0 -254
  1093. package/src/shared/providers/screen/keys.provider.tsx +0 -48
  1094. package/src/shared/providers/stack/helpers/active-screens-limit.ts +0 -35
  1095. package/src/shared/providers/stack/helpers/use-local-routes.tsx +0 -133
  1096. package/src/shared/stores/bounds.store.ts +0 -257
  1097. package/src/shared/utils/gesture/determine-dismissal.ts +0 -80
  1098. package/src/shared/utils/gesture/map-gesture-to-progress.ts +0 -11
  1099. package/src/shared/utils/gesture/reset-gesture-values.ts +0 -67
  1100. package/src/shared/utils/reset-stores-for-screen.ts +0 -14
  1101. /package/lib/commonjs/shared/{utils/animation → providers/screen/animation/helpers}/worklet.js +0 -0
  1102. /package/lib/commonjs/shared/{utils/navigation → providers/stack/helpers/use-local-routes/helpers}/are-descriptors-equal.js +0 -0
  1103. /package/lib/commonjs/shared/{utils/navigation → providers/stack/helpers/use-local-routes/helpers}/have-same-route-keys.js +0 -0
  1104. /package/lib/commonjs/shared/{utils/navigation → providers/stack/helpers/use-local-routes/helpers}/routes-are-identical.js +0 -0
  1105. /package/lib/module/shared/{utils/animation → providers/screen/animation/helpers}/worklet.js +0 -0
  1106. /package/lib/module/shared/{utils/navigation → providers/stack/helpers/use-local-routes/helpers}/are-descriptors-equal.js +0 -0
  1107. /package/lib/module/shared/{utils/navigation → providers/stack/helpers/use-local-routes/helpers}/have-same-route-keys.js +0 -0
  1108. /package/lib/module/shared/{utils/navigation → providers/stack/helpers/use-local-routes/helpers}/routes-are-identical.js +0 -0
  1109. /package/lib/typescript/shared/{utils/navigation → providers/stack/helpers/use-local-routes/helpers}/are-descriptors-equal.d.ts +0 -0
  1110. /package/src/shared/hooks/navigation/{use-closing-route-keys.tsx → use-closing-route-keys.ts} +0 -0
  1111. /package/src/shared/{utils/navigation → providers/stack/helpers/use-local-routes/helpers}/are-descriptors-equal.ts +0 -0
@@ -1,26 +1,25 @@
1
- import { StackActions } from "@react-navigation/native";
2
1
  import { useCallback, useMemo, useRef } from "react";
3
2
  import { Gesture, type GestureType } from "react-native-gesture-handler";
4
3
  import type { SharedValue } from "react-native-reanimated";
5
- import type {
6
- DirectionClaimMap,
7
- GestureContextType,
8
- ScrollConfig,
9
- } from "../../providers/gestures.provider";
10
- import { useKeys } from "../../providers/screen/keys.provider";
4
+ import { useNavigationHelpers } from "../../hooks/navigation/use-navigation-helpers";
11
5
  import { GestureStore, type GestureStoreMap } from "../../stores/gesture.store";
12
- import type { ClaimedDirections, Direction } from "../../types/ownership.types";
6
+ import {
7
+ type ClaimedDirections,
8
+ DIRECTIONS,
9
+ } from "../../types/ownership.types";
13
10
  import { claimsAnyDirection } from "../../utils/gesture/compute-claimed-directions";
14
11
  import { resolveOwnership } from "../../utils/gesture/resolve-ownership";
15
12
  import { validateSnapPoints } from "../../utils/gesture/validate-snap-points";
16
- import { useScreenGestureHandlers } from "./use-screen-gesture-handlers";
17
-
18
- const DIRECTIONS: Direction[] = [
19
- "vertical",
20
- "vertical-inverted",
21
- "horizontal",
22
- "horizontal-inverted",
23
- ];
13
+ import {
14
+ useDescriptorDerivations,
15
+ useDescriptors,
16
+ } from "../screen/descriptors";
17
+ import { useHandlers } from "./handlers/use-handlers";
18
+ import type {
19
+ DirectionClaimMap,
20
+ GestureContextType,
21
+ ScrollConfig,
22
+ } from "./types";
24
23
 
25
24
  /**
26
25
  * Finds ancestor pan gestures that we shadow (claim the same direction).
@@ -79,27 +78,24 @@ export const useBuildGestures = ({
79
78
  panGestureRef: React.MutableRefObject<GestureType | undefined>;
80
79
  gestureAnimationValues: GestureStoreMap;
81
80
  } => {
82
- const { current } = useKeys();
83
- const navState = current.navigation.getState();
84
-
85
- const isFirstScreen = useMemo(() => {
86
- return navState.routes.findIndex((r) => r.key === current.route.key) === 0;
87
- }, [navState.routes, current.route.key]);
81
+ const { current } = useDescriptors();
82
+ const { isFirstKey } = useDescriptorDerivations();
83
+ const { dismissScreen } = useNavigationHelpers();
88
84
 
89
85
  const panGestureRef = useRef<GestureType | undefined>(undefined);
90
86
  const gestureAnimationValues = GestureStore.getRouteGestures(
91
87
  current.route.key,
92
88
  );
93
89
 
94
- const { snapPoints } = current.options;
90
+ const { snapPoints: rawSnapPoints } = current.options;
95
91
  const canDismiss = Boolean(
96
- isFirstScreen ? false : current.options.gestureEnabled,
92
+ isFirstKey ? false : current.options.gestureEnabled,
97
93
  );
98
- const { hasSnapPoints } = useMemo(
99
- () => validateSnapPoints({ snapPoints, canDismiss }),
100
- [snapPoints, canDismiss],
94
+ const effectiveSnapPoints = useMemo(
95
+ () => validateSnapPoints({ snapPoints: rawSnapPoints, canDismiss }),
96
+ [rawSnapPoints, canDismiss],
101
97
  );
102
- const gestureEnabled = canDismiss || hasSnapPoints;
98
+ const gestureEnabled = canDismiss || effectiveSnapPoints.hasSnapPoints;
103
99
 
104
100
  const ownershipStatus = useMemo(
105
101
  () => resolveOwnership(claimedDirections, ancestorContext ?? null),
@@ -109,32 +105,21 @@ export const useBuildGestures = ({
109
105
  const selfClaimsAny = claimsAnyDirection(claimedDirections);
110
106
 
111
107
  const handleDismiss = useCallback(() => {
112
- if (ancestorContext?.gestureAnimationValues.isDismissing?.value) return;
113
-
114
- const state = current.navigation.getState();
115
- const routeStillPresent = state.routes.some(
116
- (route) => route.key === current.route.key,
117
- );
118
- if (!routeStillPresent) return;
119
-
120
- current.navigation.dispatch({
121
- ...StackActions.pop(),
122
- source: current.route.key,
123
- target: state.key,
124
- });
125
- }, [current, ancestorContext]);
108
+ if (ancestorContext?.gestureAnimationValues.dismissing?.value) return;
109
+ dismissScreen();
110
+ }, [ancestorContext, dismissScreen]);
126
111
 
127
112
  const { onTouchesDown, onTouchesMove, onStart, onUpdate, onEnd } =
128
- useScreenGestureHandlers({
113
+ useHandlers({
129
114
  scrollConfig,
130
115
  canDismiss,
131
116
  handleDismiss,
132
117
  ownershipStatus,
133
- ancestorIsDismissing:
134
- ancestorContext?.gestureAnimationValues.isDismissing,
118
+ ancestorIsDismissing: ancestorContext?.gestureAnimationValues.dismissing,
135
119
  claimedDirections,
136
120
  ancestorContext,
137
121
  childDirectionClaims,
122
+ effectiveSnapPoints,
138
123
  });
139
124
 
140
125
  return useMemo(() => {
@@ -1,11 +1,12 @@
1
1
  import { type ReactNode, useCallback, useMemo } from "react";
2
- import { useWindowDimensions, type View } from "react-native";
2
+ import type { View } from "react-native";
3
3
  import {
4
4
  type AnimatedRef,
5
5
  type MeasuredDimensions,
6
6
  measure,
7
7
  } from "react-native-reanimated";
8
8
  import createProvider from "../utils/create-provider";
9
+ import { useViewportContext } from "./viewport.provider";
9
10
 
10
11
  interface LayoutAnchorProviderProps {
11
12
  anchorRef: AnimatedRef<View>;
@@ -20,6 +21,11 @@ interface LayoutAnchorContextValue {
20
21
  * the true layout position and dimensions.
21
22
  */
22
23
  correctMeasurement: (measured: MeasuredDimensions) => MeasuredDimensions;
24
+ /**
25
+ * Returns true when the corrected measurement is plausibly inside viewport space.
26
+ * This helps reject transient off-page measurements from paged containers.
27
+ */
28
+ isMeasurementInViewport: (measured: MeasuredDimensions) => boolean;
23
29
  }
24
30
 
25
31
  /**
@@ -42,7 +48,9 @@ const { LayoutAnchorProvider, useLayoutAnchorContext } = createProvider(
42
48
  { guarded: false },
43
49
  )<LayoutAnchorProviderProps, LayoutAnchorContextValue>(
44
50
  ({ anchorRef, children }) => {
45
- const { width: screenWidth, height: screenHeight } = useWindowDimensions();
51
+ const {
52
+ dimensions: { width: screenWidth, height: screenHeight },
53
+ } = useViewportContext();
46
54
 
47
55
  const correctMeasurement = useCallback(
48
56
  (measured: MeasuredDimensions): MeasuredDimensions => {
@@ -72,7 +80,30 @@ const { LayoutAnchorProvider, useLayoutAnchorContext } = createProvider(
72
80
  [anchorRef, screenWidth, screenHeight],
73
81
  );
74
82
 
75
- const value = useMemo(() => ({ correctMeasurement }), [correctMeasurement]);
83
+ const isMeasurementInViewport = useCallback(
84
+ (measured: MeasuredDimensions): boolean => {
85
+ "worklet";
86
+ if (measured.width <= 0 || measured.height <= 0) return false;
87
+
88
+ const toleranceX = screenWidth * 0.15;
89
+ const toleranceY = screenHeight * 0.15;
90
+ const centerX = measured.pageX + measured.width / 2;
91
+ const centerY = measured.pageY + measured.height / 2;
92
+
93
+ return (
94
+ centerX >= -toleranceX &&
95
+ centerX <= screenWidth + toleranceX &&
96
+ centerY >= -toleranceY &&
97
+ centerY <= screenHeight + toleranceY
98
+ );
99
+ },
100
+ [screenWidth, screenHeight],
101
+ );
102
+
103
+ const value = useMemo(
104
+ () => ({ correctMeasurement, isMeasurementInViewport }),
105
+ [correctMeasurement, isMeasurementInViewport],
106
+ );
76
107
 
77
108
  return {
78
109
  value,
@@ -14,11 +14,12 @@ import type { SharedValue } from "react-native-reanimated/lib/typescript/commonT
14
14
  import useStableCallback from "../hooks/use-stable-callback";
15
15
  import useStableCallbackValue from "../hooks/use-stable-callback-value";
16
16
  import { AnimationStore } from "../stores/animation.store";
17
- import { BoundStore } from "../stores/bounds.store";
17
+ import { BoundStore } from "../stores/bounds";
18
+ import { applyMeasuredBoundsWrites } from "../stores/bounds/helpers/apply-measured-bounds-writes";
18
19
  import { prepareStyleForBounds } from "../utils/bounds/helpers/styles";
19
20
  import createProvider from "../utils/create-provider";
20
21
  import { useLayoutAnchorContext } from "./layout-anchor.provider";
21
- import { type BaseDescriptor, useKeys } from "./screen/keys.provider";
22
+ import { useDescriptorDerivations, useDescriptors } from "./screen/descriptors";
22
23
 
23
24
  interface MaybeMeasureAndStoreParams {
24
25
  onPress?: ((...args: unknown[]) => void) | undefined;
@@ -45,34 +46,24 @@ interface RegisterBoundsContextValue {
45
46
  updateSignal: SharedValue<number>;
46
47
  }
47
48
 
48
- /**
49
- * Builds the full ancestor key chain for nested navigators.
50
- * Returns an array of screen keys from immediate parent to root.
51
- * [parentKey, grandparentKey, greatGrandparentKey, ...]
52
- */
53
- const getAncestorKeys = (current: BaseDescriptor): string[] => {
54
- const ancestors: string[] = [];
55
- const nav = current.navigation as any;
56
-
57
- // Safety check for navigators without getParent
58
- if (typeof nav?.getParent !== "function") {
59
- return ancestors;
60
- }
61
-
62
- let parent = nav.getParent();
63
-
64
- while (parent) {
65
- const state = parent.getState();
66
- if (state?.routes && state.index !== undefined) {
67
- const focusedRoute = state.routes[state.index];
68
- if (focusedRoute?.key) {
69
- ancestors.push(focusedRoute.key);
70
- }
71
- }
72
- parent = parent.getParent();
73
- }
49
+ const getRouteParamId = (
50
+ route: { params?: object } | undefined,
51
+ ): string | null => {
52
+ const params = route?.params as Record<string, unknown> | undefined;
53
+ const rawId = params?.id;
54
+ return typeof rawId === "string" ? rawId : null;
55
+ };
74
56
 
75
- return ancestors;
57
+ const matchesSelectionTag = (
58
+ tag: string | undefined,
59
+ selectedId: string | null,
60
+ ): boolean => {
61
+ "worklet";
62
+ if (!tag || !selectedId) return false;
63
+ if (tag === selectedId) return true;
64
+ if (tag.endsWith(`:${selectedId}`)) return true;
65
+ if (tag.endsWith(`-${selectedId}`)) return true;
66
+ return false;
76
67
  };
77
68
 
78
69
  /**
@@ -92,14 +83,14 @@ const useInitialLayoutHandler = (params: {
92
83
  maybeMeasureAndStore,
93
84
  } = params;
94
85
 
95
- const isAnimating = AnimationStore.getAnimation(
86
+ const isAnimating = AnimationStore.getRouteAnimation(
96
87
  currentScreenKey,
97
88
  "animating",
98
89
  );
99
90
 
100
91
  // Check if any ancestor is animating
101
92
  const ancestorAnimations = ancestorKeys.map((key) =>
102
- AnimationStore.getAnimation(key, "animating"),
93
+ AnimationStore.getRouteAnimation(key, "animating"),
103
94
  );
104
95
 
105
96
  const hasMeasuredOnLayout = useSharedValue(false);
@@ -139,20 +130,30 @@ const useInitialLayoutHandler = (params: {
139
130
  * Captures bounds right before transition starts.
140
131
  */
141
132
  const useBlurMeasurement = (params: {
133
+ enabled: boolean;
142
134
  sharedBoundTag?: string;
135
+ selectedRouteId: string | null;
143
136
  ancestorKeys: string[];
144
137
  maybeMeasureAndStore: (options: MaybeMeasureAndStoreParams) => void;
145
138
  }) => {
146
- const { current } = useKeys();
147
- const { sharedBoundTag, ancestorKeys, maybeMeasureAndStore } = params;
139
+ const { current } = useDescriptors();
140
+ const {
141
+ enabled,
142
+ sharedBoundTag,
143
+ selectedRouteId,
144
+ ancestorKeys,
145
+ maybeMeasureAndStore,
146
+ } = params;
148
147
  const hasCapturedSource = useRef(false);
149
148
 
150
149
  const ancestorClosing = [current.route.key, ...ancestorKeys].map((key) =>
151
- AnimationStore.getAnimation(key, "closing"),
150
+ AnimationStore.getRouteAnimation(key, "closing"),
152
151
  );
153
152
 
154
153
  const maybeMeasureOnBlur = useStableCallbackValue(() => {
155
154
  "worklet";
155
+ if (!enabled) return;
156
+ if (!matchesSelectionTag(sharedBoundTag, selectedRouteId)) return;
156
157
 
157
158
  //.some doesnt work here apparently... :-(
158
159
  for (const closing of ancestorClosing) {
@@ -166,11 +167,15 @@ const useBlurMeasurement = (params: {
166
167
  useCallback(() => {
167
168
  hasCapturedSource.current = false;
168
169
 
170
+ if (!enabled) {
171
+ return;
172
+ }
173
+
169
174
  return () => {
170
175
  if (!sharedBoundTag || hasCapturedSource.current) return;
171
176
  runOnUI(maybeMeasureOnBlur)();
172
177
  };
173
- }, [sharedBoundTag, maybeMeasureOnBlur]),
178
+ }, [enabled, sharedBoundTag, maybeMeasureOnBlur]),
174
179
  );
175
180
 
176
181
  return {
@@ -199,10 +204,38 @@ const useParentSyncReaction = (params: {
199
204
  );
200
205
  };
201
206
 
202
- const { RegisterBoundsProvider, useRegisterBoundsContext } = createProvider(
203
- "RegisterBounds",
204
- { guarded: false },
205
- )<RegisterBoundsProviderProps, RegisterBoundsContextValue>(
207
+ const CloseRemeasureReactionEffect = (params: {
208
+ sharedBoundTag: string;
209
+ remeasureOnFocus: boolean;
210
+ nextClosing: ReturnType<typeof AnimationStore.getRouteAnimation>;
211
+ maybeMeasureAndStore: (options: MaybeMeasureAndStoreParams) => void;
212
+ }) => {
213
+ const {
214
+ sharedBoundTag,
215
+ remeasureOnFocus,
216
+ nextClosing,
217
+ maybeMeasureAndStore,
218
+ } = params;
219
+
220
+ useAnimatedReaction(
221
+ () => nextClosing.get(),
222
+ (closing, prevClosing) => {
223
+ "worklet";
224
+ if (closing === 1 && (prevClosing === 0 || prevClosing === null)) {
225
+ maybeMeasureAndStore({ shouldUpdateSource: true });
226
+ }
227
+ },
228
+ [sharedBoundTag, remeasureOnFocus, nextClosing],
229
+ );
230
+
231
+ return null;
232
+ };
233
+
234
+ let useRegisterBoundsContext: () => RegisterBoundsContextValue | null;
235
+
236
+ const registerBoundsBundle = createProvider("RegisterBounds", {
237
+ guarded: false,
238
+ })<RegisterBoundsProviderProps, RegisterBoundsContextValue>(
206
239
  ({
207
240
  style,
208
241
  onPress,
@@ -211,20 +244,21 @@ const { RegisterBoundsProvider, useRegisterBoundsContext } = createProvider(
211
244
  remeasureOnFocus,
212
245
  children,
213
246
  }) => {
214
- const { current, next } = useKeys();
247
+ const { current, next } = useDescriptors();
248
+ const { ancestorKeys, navigatorKey, ancestorNavigatorKeys } =
249
+ useDescriptorDerivations();
215
250
  const currentScreenKey = current.route.key;
216
- const ancestorKeys = useMemo(() => getAncestorKeys(current), [current]);
251
+ const selectedNextRouteId = getRouteParamId(next?.route);
217
252
  const layoutAnchor = useLayoutAnchorContext();
218
253
 
219
254
  // Context & signals
220
- const parentContext: RegisterBoundsContextValue | null =
221
- useRegisterBoundsContext();
255
+ const parentContext = useRegisterBoundsContext();
222
256
 
223
257
  const ownSignal = useSharedValue(0);
224
258
  const updateSignal: SharedValue<number> =
225
259
  parentContext?.updateSignal ?? ownSignal;
226
260
 
227
- const isAnimating = AnimationStore.getAnimation(
261
+ const isAnimating = AnimationStore.getRouteAnimation(
228
262
  currentScreenKey,
229
263
  "animating",
230
264
  );
@@ -244,74 +278,91 @@ const { RegisterBoundsProvider, useRegisterBoundsContext } = createProvider(
244
278
  shouldUpdateSource,
245
279
  }: MaybeMeasureAndStoreParams = {}) => {
246
280
  "worklet";
247
- if (!sharedBoundTag) return;
281
+ if (!sharedBoundTag) {
282
+ if (onPress) runOnJS(onPress)();
283
+ return;
284
+ }
285
+
286
+ if (shouldSetSource && isAnimating.get()) {
287
+ const existing = BoundStore.getSnapshot(
288
+ sharedBoundTag,
289
+ currentScreenKey,
290
+ );
291
+ if (existing) {
292
+ applyMeasuredBoundsWrites({
293
+ sharedBoundTag,
294
+ ancestorKeys,
295
+ navigatorKey,
296
+ ancestorNavigatorKeys,
297
+ currentScreenKey,
298
+ measured: existing.bounds,
299
+ preparedStyles,
300
+ shouldSetSource: true,
301
+ });
302
+ }
303
+
304
+ if (onPress) runOnJS(onPress)();
305
+ return;
306
+ }
307
+
308
+ const hasPendingLink = BoundStore.hasPendingLink(sharedBoundTag);
309
+ const hasSourceLink = BoundStore.hasSourceLink(
310
+ sharedBoundTag,
311
+ currentScreenKey,
312
+ );
313
+ const hasDestinationLink = BoundStore.hasDestinationLink(
314
+ sharedBoundTag,
315
+ currentScreenKey,
316
+ );
317
+
318
+ const wantsSetSource = !!shouldSetSource;
319
+ const wantsSetDestination = !!shouldSetDestination;
320
+ const wantsUpdateSource = !!shouldUpdateSource;
321
+ const wantsSnapshotOnly =
322
+ !wantsSetSource && !wantsSetDestination && !wantsUpdateSource;
323
+
324
+ const canSetSource = wantsSetSource;
325
+ const canSetDestination = wantsSetDestination && hasPendingLink;
326
+ const canUpdateSource = wantsUpdateSource && hasSourceLink;
327
+ const canSnapshotOnly =
328
+ wantsSnapshotOnly &&
329
+ (hasPendingLink || hasSourceLink || hasDestinationLink);
330
+
331
+ if (
332
+ !canSetSource &&
333
+ !canSetDestination &&
334
+ !canUpdateSource &&
335
+ !canSnapshotOnly
336
+ ) {
337
+ if (onPress) runOnJS(onPress)();
338
+ return;
339
+ }
248
340
 
249
341
  const measured = measure(animatedRef);
250
- if (!measured) return;
342
+ if (!measured) {
343
+ if (onPress) runOnJS(onPress)();
344
+ return;
345
+ }
251
346
 
252
- // Correct for parent transforms (e.g., when parent screen is animating)
253
347
  const correctedMeasured = layoutAnchor
254
348
  ? layoutAnchor.correctMeasurement(measured)
255
349
  : measured;
256
350
 
257
351
  emitUpdate();
258
352
 
259
- BoundStore.registerSnapshot(
353
+ applyMeasuredBoundsWrites({
260
354
  sharedBoundTag,
261
355
  currentScreenKey,
262
- correctedMeasured,
356
+ measured: correctedMeasured,
263
357
  preparedStyles,
264
358
  ancestorKeys,
265
- );
266
-
267
- if (shouldSetSource) {
268
- if (isAnimating.get()) {
269
- // If animation is already in progress,
270
- // lets use the existing measuremenets.
271
- const existing = BoundStore.getSnapshot(
272
- sharedBoundTag,
273
- currentScreenKey,
274
- );
275
- if (existing) {
276
- BoundStore.setLinkSource(
277
- sharedBoundTag,
278
- currentScreenKey,
279
- existing.bounds,
280
- preparedStyles,
281
- ancestorKeys,
282
- );
283
- }
284
- return;
285
- }
286
- BoundStore.setLinkSource(
287
- sharedBoundTag,
288
- currentScreenKey,
289
- correctedMeasured,
290
- preparedStyles,
291
- ancestorKeys,
292
- );
293
- }
294
-
295
- if (shouldUpdateSource) {
296
- BoundStore.updateLinkSource(
297
- sharedBoundTag,
298
- currentScreenKey,
299
- correctedMeasured,
300
- preparedStyles,
301
- ancestorKeys,
302
- );
303
- }
304
-
305
- // Set as destination (on mount during animation)
306
- if (shouldSetDestination) {
307
- BoundStore.setLinkDestination(
308
- sharedBoundTag,
309
- currentScreenKey,
310
- correctedMeasured,
311
- preparedStyles,
312
- ancestorKeys,
313
- );
314
- }
359
+ navigatorKey,
360
+ ancestorNavigatorKeys,
361
+ shouldRegisterSnapshot: true,
362
+ shouldSetSource: canSetSource,
363
+ shouldUpdateSource: canUpdateSource,
364
+ shouldSetDestination: canSetDestination,
365
+ });
315
366
 
316
367
  if (onPress) runOnJS(onPress)();
317
368
  },
@@ -326,7 +377,9 @@ const { RegisterBoundsProvider, useRegisterBoundsContext } = createProvider(
326
377
 
327
378
  // Side effects
328
379
  const { markSourceCaptured } = useBlurMeasurement({
380
+ enabled: !onPress,
329
381
  sharedBoundTag,
382
+ selectedRouteId: selectedNextRouteId,
330
383
  maybeMeasureAndStore,
331
384
  ancestorKeys,
332
385
  });
@@ -337,21 +390,9 @@ const { RegisterBoundsProvider, useRegisterBoundsContext } = createProvider(
337
390
  // from state).
338
391
  const nextScreenKey = next?.route.key;
339
392
  const nextClosing = nextScreenKey
340
- ? AnimationStore.getAnimation(nextScreenKey, "closing")
393
+ ? AnimationStore.getRouteAnimation(nextScreenKey, "closing")
341
394
  : null;
342
395
 
343
- useAnimatedReaction(
344
- () => nextClosing?.get() ?? 0,
345
- (closing, prevClosing) => {
346
- "worklet";
347
- if (!sharedBoundTag || !remeasureOnFocus) return;
348
- if (closing === 1 && (prevClosing === 0 || prevClosing === null)) {
349
- maybeMeasureAndStore({ shouldUpdateSource: true });
350
- }
351
- },
352
- [sharedBoundTag, remeasureOnFocus, nextClosing],
353
- );
354
-
355
396
  useParentSyncReaction({ parentContext, maybeMeasureAndStore });
356
397
 
357
398
  const captureActiveOnPress = useStableCallback(() => {
@@ -365,9 +406,24 @@ const { RegisterBoundsProvider, useRegisterBoundsContext } = createProvider(
365
406
 
366
407
  return {
367
408
  value: { updateSignal },
368
- children: children({ handleInitialLayout, captureActiveOnPress }),
409
+ children: (
410
+ <>
411
+ {sharedBoundTag && remeasureOnFocus && nextClosing ? (
412
+ <CloseRemeasureReactionEffect
413
+ sharedBoundTag={sharedBoundTag}
414
+ remeasureOnFocus={remeasureOnFocus}
415
+ nextClosing={nextClosing}
416
+ maybeMeasureAndStore={maybeMeasureAndStore}
417
+ />
418
+ ) : null}
419
+ {children({ handleInitialLayout, captureActiveOnPress })}
420
+ </>
421
+ ),
369
422
  };
370
423
  },
371
424
  );
372
425
 
426
+ const RegisterBoundsProvider = registerBoundsBundle.RegisterBoundsProvider;
427
+ useRegisterBoundsContext = registerBoundsBundle.useRegisterBoundsContext;
428
+
373
429
  export { RegisterBoundsProvider };
@@ -0,0 +1,57 @@
1
+ import { type ReactNode, useMemo } from "react";
2
+ import { type DerivedValue, useDerivedValue } from "react-native-reanimated";
3
+ import type { ScreenInterpolationProps } from "../../../types/animation.types";
4
+ import createProvider from "../../../utils/create-provider";
5
+ import { useScreenAnimationPipeline } from "./helpers/pipeline";
6
+
7
+ type Props = {
8
+ children: ReactNode;
9
+ };
10
+
11
+ type ScreenAnimationContextValue = ReturnType<
12
+ typeof useScreenAnimationPipeline
13
+ > & {
14
+ screenAnimation: DerivedValue<ScreenInterpolationProps>;
15
+ };
16
+
17
+ const { ScreenAnimationProvider, useScreenAnimationContext } = createProvider(
18
+ "ScreenAnimation",
19
+ { guarded: true },
20
+ )<Props, ScreenAnimationContextValue>(() => {
21
+ const {
22
+ screenInterpolatorProps,
23
+ nextInterpolator,
24
+ currentInterpolator,
25
+ boundsAccessor,
26
+ } = useScreenAnimationPipeline();
27
+
28
+ const screenAnimation = useDerivedValue<ScreenInterpolationProps>(() => {
29
+ "worklet";
30
+ const props = screenInterpolatorProps.value;
31
+ return {
32
+ ...props,
33
+ bounds: boundsAccessor,
34
+ };
35
+ });
36
+
37
+ const value = useMemo(
38
+ () => ({
39
+ screenInterpolatorProps,
40
+ nextInterpolator,
41
+ currentInterpolator,
42
+ boundsAccessor,
43
+ screenAnimation,
44
+ }),
45
+ [
46
+ screenInterpolatorProps,
47
+ nextInterpolator,
48
+ currentInterpolator,
49
+ boundsAccessor,
50
+ screenAnimation,
51
+ ],
52
+ );
53
+
54
+ return { value };
55
+ });
56
+
57
+ export { ScreenAnimationProvider, useScreenAnimationContext };
@@ -1,4 +1,4 @@
1
- import type { ScreenTransitionState } from "../../types/animation.types";
1
+ import type { ScreenTransitionState } from "../../../../types/animation.types";
2
2
 
3
3
  interface DerivationsParams {
4
4
  previous?: ScreenTransitionState;
@@ -24,11 +24,11 @@ export const derivations = ({ previous, current, next }: DerivationsParams) => {
24
24
  // The screen NOT driving the transition
25
25
  const inactive = focused ? previous : current;
26
26
 
27
- const isActiveTransitioning = !!(
28
- active.gesture.isDragging || active.animating
29
- );
27
+ // deprecated
28
+ const isActiveTransitioning = !!(active.gesture.dragging || active.animating);
30
29
 
31
- const isDismissing = !!(active.gesture.isDismissing || active.closing);
30
+ // deprecated
31
+ const isDismissing = !!(active.gesture.dismissing || active.closing);
32
32
 
33
33
  return {
34
34
  progress,