react-native-screen-transitions 3.6.0-alpha.1 → 3.6.0-alpha.3

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 (513) hide show
  1. package/lib/commonjs/component-stack/components/component-screen.js +1 -7
  2. package/lib/commonjs/component-stack/components/component-screen.js.map +1 -1
  3. package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js +27 -34
  4. package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js.map +1 -1
  5. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-presence.js +4 -4
  6. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +1 -1
  7. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js +17 -19
  8. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js.map +1 -1
  9. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js +27 -7
  10. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js.map +1 -1
  11. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-measurer.js +23 -51
  12. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-measurer.js.map +1 -1
  13. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-refresh-boundary.js +33 -40
  14. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map +1 -1
  15. package/lib/commonjs/shared/components/create-boundary-component/index.js +3 -1
  16. package/lib/commonjs/shared/components/create-boundary-component/index.js.map +1 -1
  17. package/lib/commonjs/shared/components/create-boundary-component/utils/destination-signals.js +75 -0
  18. package/lib/commonjs/shared/components/create-boundary-component/utils/destination-signals.js.map +1 -0
  19. package/lib/commonjs/shared/components/create-boundary-component/{hooks/helpers/scroll-measurement.js → utils/measured-bounds.js} +15 -2
  20. package/lib/commonjs/shared/components/create-boundary-component/utils/measured-bounds.js.map +1 -0
  21. package/lib/commonjs/shared/components/create-boundary-component/utils/refresh-signals.js +103 -0
  22. package/lib/commonjs/shared/components/create-boundary-component/utils/refresh-signals.js.map +1 -0
  23. package/lib/commonjs/shared/components/create-boundary-component/utils/source-signals.js +52 -0
  24. package/lib/commonjs/shared/components/create-boundary-component/utils/source-signals.js.map +1 -0
  25. package/lib/commonjs/shared/components/native-screen.js +2 -13
  26. package/lib/commonjs/shared/components/native-screen.js.map +1 -1
  27. package/lib/commonjs/shared/components/screen-container/layers/content.js +11 -1
  28. package/lib/commonjs/shared/components/screen-container/layers/content.js.map +1 -1
  29. package/lib/commonjs/shared/constants.js +5 -12
  30. package/lib/commonjs/shared/constants.js.map +1 -1
  31. package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js +35 -0
  32. package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js.map +1 -0
  33. package/lib/commonjs/shared/providers/register-bounds.provider.js +48 -55
  34. package/lib/commonjs/shared/providers/register-bounds.provider.js.map +1 -1
  35. package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js +1 -10
  36. package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js.map +1 -1
  37. package/lib/commonjs/shared/providers/screen/animation/helpers/build-screen-transition-options.js +1 -0
  38. package/lib/commonjs/shared/providers/screen/animation/helpers/build-screen-transition-options.js.map +1 -1
  39. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +26 -8
  40. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
  41. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +1 -2
  42. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  43. package/lib/commonjs/shared/providers/screen/animation/helpers/selected-interpolator-options.js +1 -1
  44. package/lib/commonjs/shared/providers/screen/animation/helpers/selected-interpolator-options.js.map +1 -1
  45. package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js +3 -4
  46. package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -1
  47. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-activation.js +2 -2
  48. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-activation.js.map +1 -1
  49. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-lifecycle.js +9 -2
  50. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-lifecycle.js.map +1 -1
  51. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-release.js +19 -0
  52. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-release.js.map +1 -1
  53. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-reset.js +2 -0
  54. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-reset.js.map +1 -1
  55. package/lib/commonjs/shared/providers/screen/gestures/pan/use-pan-behavior.js +2 -2
  56. package/lib/commonjs/shared/providers/screen/gestures/pan/use-pan-behavior.js.map +1 -1
  57. package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-activation.js +2 -2
  58. package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-activation.js.map +1 -1
  59. package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-lifecycle.js +1 -0
  60. package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-lifecycle.js.map +1 -1
  61. package/lib/commonjs/shared/providers/screen/gestures/pinch/use-pinch-behavior.js +2 -2
  62. package/lib/commonjs/shared/providers/screen/gestures/pinch/use-pinch-behavior.js.map +1 -1
  63. package/lib/commonjs/shared/providers/screen/gestures/shared/physics.js +18 -2
  64. package/lib/commonjs/shared/providers/screen/gestures/shared/physics.js.map +1 -1
  65. package/lib/commonjs/shared/providers/screen/gestures/shared/policy.js +1 -5
  66. package/lib/commonjs/shared/providers/screen/gestures/shared/policy.js.map +1 -1
  67. package/lib/commonjs/shared/providers/screen/options/helpers.js +3 -1
  68. package/lib/commonjs/shared/providers/screen/options/helpers.js.map +1 -1
  69. package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +1 -4
  70. package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
  71. package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js +125 -0
  72. package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -0
  73. package/lib/commonjs/shared/stores/bounds/index.js +6 -12
  74. package/lib/commonjs/shared/stores/bounds/index.js.map +1 -1
  75. package/lib/commonjs/shared/stores/bounds/internals/clear.js +13 -21
  76. package/lib/commonjs/shared/stores/bounds/internals/clear.js.map +1 -1
  77. package/lib/commonjs/shared/stores/bounds/internals/entries.js +49 -9
  78. package/lib/commonjs/shared/stores/bounds/internals/entries.js.map +1 -1
  79. package/lib/commonjs/shared/stores/bounds/internals/links.js +143 -82
  80. package/lib/commonjs/shared/stores/bounds/internals/links.js.map +1 -1
  81. package/lib/commonjs/shared/stores/bounds/internals/resolver.js +17 -43
  82. package/lib/commonjs/shared/stores/bounds/internals/resolver.js.map +1 -1
  83. package/lib/commonjs/shared/stores/bounds/internals/state.js +26 -3
  84. package/lib/commonjs/shared/stores/bounds/internals/state.js.map +1 -1
  85. package/lib/commonjs/shared/stores/gesture.store.js +2 -0
  86. package/lib/commonjs/shared/stores/gesture.store.js.map +1 -1
  87. package/lib/commonjs/shared/types/gesture.types.js +2 -2
  88. package/lib/commonjs/shared/types/gesture.types.js.map +1 -1
  89. package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js +2 -1
  90. package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
  91. package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js +6 -5
  92. package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
  93. package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js +21 -8
  94. package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
  95. package/lib/commonjs/shared/utils/bounds/helpers/resolve-bounds-pair-key.js +23 -0
  96. package/lib/commonjs/shared/utils/bounds/helpers/resolve-bounds-pair-key.js.map +1 -0
  97. package/lib/commonjs/shared/utils/bounds/index.js +3 -2
  98. package/lib/commonjs/shared/utils/bounds/index.js.map +1 -1
  99. package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js +120 -205
  100. package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
  101. package/lib/commonjs/shared/utils/bounds/navigation/reveal/config.js +15 -2
  102. package/lib/commonjs/shared/utils/bounds/navigation/reveal/config.js.map +1 -1
  103. package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js +175 -14
  104. package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
  105. package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js +2 -2
  106. package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
  107. package/lib/commonjs/shared/utils/navigation/resolve-scene-neighbors.js +20 -19
  108. package/lib/commonjs/shared/utils/navigation/resolve-scene-neighbors.js.map +1 -1
  109. package/lib/module/component-stack/components/component-screen.js +2 -8
  110. package/lib/module/component-stack/components/component-screen.js.map +1 -1
  111. package/lib/module/shared/components/create-boundary-component/create-boundary-component.js +27 -34
  112. package/lib/module/shared/components/create-boundary-component/create-boundary-component.js.map +1 -1
  113. package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js +4 -4
  114. package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +1 -1
  115. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js +18 -20
  116. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js.map +1 -1
  117. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js +28 -8
  118. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js.map +1 -1
  119. package/lib/module/shared/components/create-boundary-component/hooks/use-measurer.js +22 -50
  120. package/lib/module/shared/components/create-boundary-component/hooks/use-measurer.js.map +1 -1
  121. package/lib/module/shared/components/create-boundary-component/hooks/use-refresh-boundary.js +33 -40
  122. package/lib/module/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map +1 -1
  123. package/lib/module/shared/components/create-boundary-component/index.js +3 -1
  124. package/lib/module/shared/components/create-boundary-component/index.js.map +1 -1
  125. package/lib/module/shared/components/create-boundary-component/utils/destination-signals.js +70 -0
  126. package/lib/module/shared/components/create-boundary-component/utils/destination-signals.js.map +1 -0
  127. package/lib/module/shared/components/create-boundary-component/{hooks/helpers/scroll-measurement.js → utils/measured-bounds.js} +13 -1
  128. package/lib/module/shared/components/create-boundary-component/utils/measured-bounds.js.map +1 -0
  129. package/lib/module/shared/components/create-boundary-component/utils/refresh-signals.js +98 -0
  130. package/lib/module/shared/components/create-boundary-component/utils/refresh-signals.js.map +1 -0
  131. package/lib/module/shared/components/create-boundary-component/utils/source-signals.js +47 -0
  132. package/lib/module/shared/components/create-boundary-component/utils/source-signals.js.map +1 -0
  133. package/lib/module/shared/components/native-screen.js +3 -14
  134. package/lib/module/shared/components/native-screen.js.map +1 -1
  135. package/lib/module/shared/components/screen-container/layers/content.js +13 -3
  136. package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
  137. package/lib/module/shared/constants.js +4 -11
  138. package/lib/module/shared/constants.js.map +1 -1
  139. package/lib/module/shared/providers/helpers/measured-bounds-writes.js +30 -0
  140. package/lib/module/shared/providers/helpers/measured-bounds-writes.js.map +1 -0
  141. package/lib/module/shared/providers/register-bounds.provider.js +48 -55
  142. package/lib/module/shared/providers/register-bounds.provider.js.map +1 -1
  143. package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js +1 -10
  144. package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js.map +1 -1
  145. package/lib/module/shared/providers/screen/animation/helpers/build-screen-transition-options.js +1 -0
  146. package/lib/module/shared/providers/screen/animation/helpers/build-screen-transition-options.js.map +1 -1
  147. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +26 -3
  148. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
  149. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +1 -2
  150. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  151. package/lib/module/shared/providers/screen/animation/helpers/selected-interpolator-options.js +1 -1
  152. package/lib/module/shared/providers/screen/animation/helpers/selected-interpolator-options.js.map +1 -1
  153. package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js +3 -4
  154. package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -1
  155. package/lib/module/shared/providers/screen/gestures/pan/pan-activation.js +2 -2
  156. package/lib/module/shared/providers/screen/gestures/pan/pan-activation.js.map +1 -1
  157. package/lib/module/shared/providers/screen/gestures/pan/pan-lifecycle.js +10 -3
  158. package/lib/module/shared/providers/screen/gestures/pan/pan-lifecycle.js.map +1 -1
  159. package/lib/module/shared/providers/screen/gestures/pan/pan-release.js +20 -1
  160. package/lib/module/shared/providers/screen/gestures/pan/pan-release.js.map +1 -1
  161. package/lib/module/shared/providers/screen/gestures/pan/pan-reset.js +2 -0
  162. package/lib/module/shared/providers/screen/gestures/pan/pan-reset.js.map +1 -1
  163. package/lib/module/shared/providers/screen/gestures/pan/use-pan-behavior.js +3 -3
  164. package/lib/module/shared/providers/screen/gestures/pan/use-pan-behavior.js.map +1 -1
  165. package/lib/module/shared/providers/screen/gestures/pinch/pinch-activation.js +3 -3
  166. package/lib/module/shared/providers/screen/gestures/pinch/pinch-activation.js.map +1 -1
  167. package/lib/module/shared/providers/screen/gestures/pinch/pinch-lifecycle.js +1 -0
  168. package/lib/module/shared/providers/screen/gestures/pinch/pinch-lifecycle.js.map +1 -1
  169. package/lib/module/shared/providers/screen/gestures/pinch/use-pinch-behavior.js +3 -3
  170. package/lib/module/shared/providers/screen/gestures/pinch/use-pinch-behavior.js.map +1 -1
  171. package/lib/module/shared/providers/screen/gestures/shared/physics.js +15 -0
  172. package/lib/module/shared/providers/screen/gestures/shared/physics.js.map +1 -1
  173. package/lib/module/shared/providers/screen/gestures/shared/policy.js +3 -3
  174. package/lib/module/shared/providers/screen/gestures/shared/policy.js.map +1 -1
  175. package/lib/module/shared/providers/screen/options/helpers.js +3 -1
  176. package/lib/module/shared/providers/screen/options/helpers.js.map +1 -1
  177. package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +1 -4
  178. package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
  179. package/lib/module/shared/providers/stack/direct.provider.js.map +1 -1
  180. package/lib/module/shared/providers/stack/managed.provider.js.map +1 -1
  181. package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js +105 -0
  182. package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -0
  183. package/lib/module/shared/stores/bounds/index.js +7 -13
  184. package/lib/module/shared/stores/bounds/index.js.map +1 -1
  185. package/lib/module/shared/stores/bounds/internals/clear.js +14 -22
  186. package/lib/module/shared/stores/bounds/internals/clear.js.map +1 -1
  187. package/lib/module/shared/stores/bounds/internals/entries.js +49 -9
  188. package/lib/module/shared/stores/bounds/internals/entries.js.map +1 -1
  189. package/lib/module/shared/stores/bounds/internals/links.js +139 -80
  190. package/lib/module/shared/stores/bounds/internals/links.js.map +1 -1
  191. package/lib/module/shared/stores/bounds/internals/resolver.js +17 -43
  192. package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -1
  193. package/lib/module/shared/stores/bounds/internals/state.js +25 -2
  194. package/lib/module/shared/stores/bounds/internals/state.js.map +1 -1
  195. package/lib/module/shared/stores/gesture.store.js +2 -0
  196. package/lib/module/shared/stores/gesture.store.js.map +1 -1
  197. package/lib/module/shared/types/animation.types.js +0 -4
  198. package/lib/module/shared/types/animation.types.js.map +1 -1
  199. package/lib/module/shared/types/bounds.types.js.map +1 -1
  200. package/lib/module/shared/types/gesture.types.js +0 -1
  201. package/lib/module/shared/types/gesture.types.js.map +1 -1
  202. package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js +2 -1
  203. package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
  204. package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js +6 -5
  205. package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
  206. package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js +21 -8
  207. package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
  208. package/lib/module/shared/utils/bounds/helpers/resolve-bounds-pair-key.js +18 -0
  209. package/lib/module/shared/utils/bounds/helpers/resolve-bounds-pair-key.js.map +1 -0
  210. package/lib/module/shared/utils/bounds/index.js +3 -2
  211. package/lib/module/shared/utils/bounds/index.js.map +1 -1
  212. package/lib/module/shared/utils/bounds/navigation/reveal/build.js +120 -205
  213. package/lib/module/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
  214. package/lib/module/shared/utils/bounds/navigation/reveal/config.js +14 -1
  215. package/lib/module/shared/utils/bounds/navigation/reveal/config.js.map +1 -1
  216. package/lib/module/shared/utils/bounds/navigation/reveal/math.js +163 -12
  217. package/lib/module/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
  218. package/lib/module/shared/utils/bounds/navigation/zoom/build.js +2 -2
  219. package/lib/module/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
  220. package/lib/module/shared/utils/navigation/resolve-scene-neighbors.js +20 -19
  221. package/lib/module/shared/utils/navigation/resolve-scene-neighbors.js.map +1 -1
  222. package/lib/typescript/component-stack/components/component-screen.d.ts.map +1 -1
  223. package/lib/typescript/shared/components/create-boundary-component/components/boundary-target.d.ts +4 -207
  224. package/lib/typescript/shared/components/create-boundary-component/components/boundary-target.d.ts.map +1 -1
  225. package/lib/typescript/shared/components/create-boundary-component/create-boundary-component.d.ts +1 -0
  226. package/lib/typescript/shared/components/create-boundary-component/create-boundary-component.d.ts.map +1 -1
  227. package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-presence.d.ts +1 -1
  228. package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-presence.d.ts.map +1 -1
  229. package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.d.ts +5 -4
  230. package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.d.ts.map +1 -1
  231. package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-source-measurement.d.ts +6 -2
  232. package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-source-measurement.d.ts.map +1 -1
  233. package/lib/typescript/shared/components/create-boundary-component/hooks/use-measurer.d.ts +5 -4
  234. package/lib/typescript/shared/components/create-boundary-component/hooks/use-measurer.d.ts.map +1 -1
  235. package/lib/typescript/shared/components/create-boundary-component/hooks/use-refresh-boundary.d.ts +7 -7
  236. package/lib/typescript/shared/components/create-boundary-component/hooks/use-refresh-boundary.d.ts.map +1 -1
  237. package/lib/typescript/shared/components/create-boundary-component/index.d.ts +2 -2
  238. package/lib/typescript/shared/components/create-boundary-component/index.d.ts.map +1 -1
  239. package/lib/typescript/shared/components/create-boundary-component/types.d.ts +11 -7
  240. package/lib/typescript/shared/components/create-boundary-component/types.d.ts.map +1 -1
  241. package/lib/typescript/shared/components/create-boundary-component/utils/destination-signals.d.ts +10 -0
  242. package/lib/typescript/shared/components/create-boundary-component/utils/destination-signals.d.ts.map +1 -0
  243. package/lib/typescript/shared/components/create-boundary-component/{hooks/helpers/scroll-measurement.d.ts → utils/measured-bounds.d.ts} +3 -2
  244. package/lib/typescript/shared/components/create-boundary-component/utils/measured-bounds.d.ts.map +1 -0
  245. package/lib/typescript/shared/components/create-boundary-component/utils/refresh-signals.d.ts +22 -0
  246. package/lib/typescript/shared/components/create-boundary-component/utils/refresh-signals.d.ts.map +1 -0
  247. package/lib/typescript/shared/components/create-boundary-component/utils/source-signals.d.ts +16 -0
  248. package/lib/typescript/shared/components/create-boundary-component/utils/source-signals.d.ts.map +1 -0
  249. package/lib/typescript/shared/components/native-screen.d.ts.map +1 -1
  250. package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts +1 -1
  251. package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts.map +1 -1
  252. package/lib/typescript/shared/components/scene-view.d.ts +1 -1
  253. package/lib/typescript/shared/components/scene-view.d.ts.map +1 -1
  254. package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts +2 -2
  255. package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -1
  256. package/lib/typescript/shared/components/screen-container/layers/content.d.ts.map +1 -1
  257. package/lib/typescript/shared/constants.d.ts +1 -6
  258. package/lib/typescript/shared/constants.d.ts.map +1 -1
  259. package/lib/typescript/shared/index.d.ts +3 -3
  260. package/lib/typescript/shared/index.d.ts.map +1 -1
  261. package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts +21 -0
  262. package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts.map +1 -0
  263. package/lib/typescript/shared/providers/register-bounds.provider.d.ts.map +1 -1
  264. package/lib/typescript/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.d.ts.map +1 -1
  265. package/lib/typescript/shared/providers/screen/animation/helpers/build-screen-transition-options.d.ts.map +1 -1
  266. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts +1 -2
  267. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts.map +1 -1
  268. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/types.d.ts +1 -1
  269. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/types.d.ts.map +1 -1
  270. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts +1 -1
  271. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
  272. package/lib/typescript/shared/providers/screen/animation/helpers/selected-interpolator-options.d.ts.map +1 -1
  273. package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts +1 -1
  274. package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts.map +1 -1
  275. package/lib/typescript/shared/providers/screen/gestures/pan/pan-activation.d.ts.map +1 -1
  276. package/lib/typescript/shared/providers/screen/gestures/pan/pan-lifecycle.d.ts.map +1 -1
  277. package/lib/typescript/shared/providers/screen/gestures/pan/pan-release.d.ts.map +1 -1
  278. package/lib/typescript/shared/providers/screen/gestures/pan/pan-reset.d.ts +2 -1
  279. package/lib/typescript/shared/providers/screen/gestures/pan/pan-reset.d.ts.map +1 -1
  280. package/lib/typescript/shared/providers/screen/gestures/pan/use-pan-behavior.d.ts.map +1 -1
  281. package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-activation.d.ts.map +1 -1
  282. package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-lifecycle.d.ts.map +1 -1
  283. package/lib/typescript/shared/providers/screen/gestures/pinch/use-pinch-behavior.d.ts.map +1 -1
  284. package/lib/typescript/shared/providers/screen/gestures/shared/physics.d.ts +7 -0
  285. package/lib/typescript/shared/providers/screen/gestures/shared/physics.d.ts.map +1 -1
  286. package/lib/typescript/shared/providers/screen/gestures/shared/policy.d.ts +0 -10
  287. package/lib/typescript/shared/providers/screen/gestures/shared/policy.d.ts.map +1 -1
  288. package/lib/typescript/shared/providers/screen/gestures/types.d.ts +2 -0
  289. package/lib/typescript/shared/providers/screen/gestures/types.d.ts.map +1 -1
  290. package/lib/typescript/shared/providers/screen/options/helpers.d.ts.map +1 -1
  291. package/lib/typescript/shared/providers/screen/options/types.d.ts +1 -0
  292. package/lib/typescript/shared/providers/screen/options/types.d.ts.map +1 -1
  293. package/lib/typescript/shared/providers/screen/styles/components/maybe-floating-container.d.ts +1 -1
  294. package/lib/typescript/shared/providers/screen/styles/components/maybe-floating-container.d.ts.map +1 -1
  295. package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -1
  296. package/lib/typescript/shared/providers/stack/direct.provider.d.ts +1 -1
  297. package/lib/typescript/shared/providers/stack/direct.provider.d.ts.map +1 -1
  298. package/lib/typescript/shared/providers/stack/managed.provider.d.ts +1 -1
  299. package/lib/typescript/shared/providers/stack/managed.provider.d.ts.map +1 -1
  300. package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts +18 -0
  301. package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts.map +1 -0
  302. package/lib/typescript/shared/stores/bounds/index.d.ts +6 -12
  303. package/lib/typescript/shared/stores/bounds/index.d.ts.map +1 -1
  304. package/lib/typescript/shared/stores/bounds/internals/clear.d.ts.map +1 -1
  305. package/lib/typescript/shared/stores/bounds/internals/entries.d.ts.map +1 -1
  306. package/lib/typescript/shared/stores/bounds/internals/links.d.ts +13 -10
  307. package/lib/typescript/shared/stores/bounds/internals/links.d.ts.map +1 -1
  308. package/lib/typescript/shared/stores/bounds/internals/resolver.d.ts.map +1 -1
  309. package/lib/typescript/shared/stores/bounds/internals/state.d.ts +26 -5
  310. package/lib/typescript/shared/stores/bounds/internals/state.d.ts.map +1 -1
  311. package/lib/typescript/shared/stores/bounds/types.d.ts +14 -7
  312. package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
  313. package/lib/typescript/shared/stores/gesture.store.d.ts +1 -0
  314. package/lib/typescript/shared/stores/gesture.store.d.ts.map +1 -1
  315. package/lib/typescript/shared/types/animation.types.d.ts +4 -19
  316. package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
  317. package/lib/typescript/shared/types/bounds.types.d.ts +69 -1
  318. package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
  319. package/lib/typescript/shared/types/gesture.types.d.ts +8 -1
  320. package/lib/typescript/shared/types/gesture.types.d.ts.map +1 -1
  321. package/lib/typescript/shared/types/index.d.ts +2 -2
  322. package/lib/typescript/shared/types/index.d.ts.map +1 -1
  323. package/lib/typescript/shared/types/screen.types.d.ts +4 -14
  324. package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
  325. package/lib/typescript/shared/utils/bounds/helpers/create-bounds-accessor-core.d.ts.map +1 -1
  326. package/lib/typescript/shared/utils/bounds/helpers/create-link-accessor.d.ts.map +1 -1
  327. package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts +1 -1
  328. package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts.map +1 -1
  329. package/lib/typescript/shared/utils/bounds/helpers/resolve-bounds-pair-key.d.ts +4 -0
  330. package/lib/typescript/shared/utils/bounds/helpers/resolve-bounds-pair-key.d.ts.map +1 -0
  331. package/lib/typescript/shared/utils/bounds/index.d.ts.map +1 -1
  332. package/lib/typescript/shared/utils/bounds/navigation/reveal/build.d.ts +1 -1
  333. package/lib/typescript/shared/utils/bounds/navigation/reveal/build.d.ts.map +1 -1
  334. package/lib/typescript/shared/utils/bounds/navigation/reveal/config.d.ts +14 -1
  335. package/lib/typescript/shared/utils/bounds/navigation/reveal/config.d.ts.map +1 -1
  336. package/lib/typescript/shared/utils/bounds/navigation/reveal/math.d.ts +58 -7
  337. package/lib/typescript/shared/utils/bounds/navigation/reveal/math.d.ts.map +1 -1
  338. package/lib/typescript/shared/utils/bounds/navigation/reveal/types.d.ts +2 -1
  339. package/lib/typescript/shared/utils/bounds/navigation/reveal/types.d.ts.map +1 -1
  340. package/lib/typescript/shared/utils/bounds/types/options.d.ts +2 -3
  341. package/lib/typescript/shared/utils/bounds/types/options.d.ts.map +1 -1
  342. package/lib/typescript/shared/utils/navigation/resolve-scene-neighbors.d.ts +3 -2
  343. package/lib/typescript/shared/utils/navigation/resolve-scene-neighbors.d.ts.map +1 -1
  344. package/package.json +4 -3
  345. package/src/component-stack/components/component-screen.tsx +3 -11
  346. package/src/shared/components/create-boundary-component/create-boundary-component.tsx +30 -27
  347. package/src/shared/components/create-boundary-component/hooks/use-boundary-presence.ts +5 -5
  348. package/src/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.ts +25 -24
  349. package/src/shared/components/create-boundary-component/hooks/use-initial-source-measurement.ts +41 -11
  350. package/src/shared/components/create-boundary-component/hooks/use-measurer.ts +49 -64
  351. package/src/shared/components/create-boundary-component/hooks/use-refresh-boundary.ts +44 -83
  352. package/src/shared/components/create-boundary-component/index.tsx +3 -1
  353. package/src/shared/components/create-boundary-component/types.ts +13 -11
  354. package/src/shared/components/create-boundary-component/utils/destination-signals.ts +129 -0
  355. package/src/shared/components/create-boundary-component/{hooks/helpers/scroll-measurement.ts → utils/measured-bounds.ts} +25 -1
  356. package/src/shared/components/create-boundary-component/utils/refresh-signals.ts +164 -0
  357. package/src/shared/components/create-boundary-component/utils/source-signals.ts +72 -0
  358. package/src/shared/components/native-screen.tsx +3 -12
  359. package/src/shared/components/screen-container/layers/content.tsx +21 -2
  360. package/src/shared/constants.ts +1 -9
  361. package/src/shared/index.ts +0 -3
  362. package/src/shared/providers/helpers/measured-bounds-writes.ts +67 -0
  363. package/src/shared/providers/register-bounds.provider.tsx +68 -91
  364. package/src/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.ts +0 -14
  365. package/src/shared/providers/screen/animation/helpers/build-screen-transition-options.ts +1 -0
  366. package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/index.ts +49 -4
  367. package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/types.ts +1 -1
  368. package/src/shared/providers/screen/animation/helpers/pipeline.ts +2 -5
  369. package/src/shared/providers/screen/animation/helpers/selected-interpolator-options.ts +1 -0
  370. package/src/shared/providers/screen/animation/helpers/use-build-transition-state.ts +3 -12
  371. package/src/shared/providers/screen/gestures/pan/pan-activation.ts +4 -1
  372. package/src/shared/providers/screen/gestures/pan/pan-lifecycle.ts +18 -2
  373. package/src/shared/providers/screen/gestures/pan/pan-release.ts +33 -0
  374. package/src/shared/providers/screen/gestures/pan/pan-reset.ts +3 -0
  375. package/src/shared/providers/screen/gestures/pan/use-pan-behavior.ts +9 -6
  376. package/src/shared/providers/screen/gestures/pinch/pinch-activation.ts +5 -2
  377. package/src/shared/providers/screen/gestures/pinch/pinch-lifecycle.ts +1 -0
  378. package/src/shared/providers/screen/gestures/pinch/use-pinch-behavior.ts +9 -6
  379. package/src/shared/providers/screen/gestures/shared/physics.ts +25 -0
  380. package/src/shared/providers/screen/gestures/shared/policy.ts +3 -5
  381. package/src/shared/providers/screen/gestures/types.ts +2 -0
  382. package/src/shared/providers/screen/options/helpers.ts +9 -0
  383. package/src/shared/providers/screen/options/types.ts +1 -0
  384. package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +0 -3
  385. package/src/shared/providers/stack/direct.provider.tsx +1 -1
  386. package/src/shared/providers/stack/managed.provider.tsx +1 -1
  387. package/src/shared/stores/bounds/helpers/link-pairs.helpers.ts +161 -0
  388. package/src/shared/stores/bounds/index.ts +10 -20
  389. package/src/shared/stores/bounds/internals/clear.ts +17 -41
  390. package/src/shared/stores/bounds/internals/entries.ts +56 -13
  391. package/src/shared/stores/bounds/internals/links.ts +222 -113
  392. package/src/shared/stores/bounds/internals/resolver.ts +23 -87
  393. package/src/shared/stores/bounds/internals/state.ts +27 -5
  394. package/src/shared/stores/bounds/types.ts +17 -7
  395. package/src/shared/stores/gesture.store.ts +3 -0
  396. package/src/shared/types/animation.types.ts +4 -23
  397. package/src/shared/types/bounds.types.ts +72 -1
  398. package/src/shared/types/gesture.types.ts +8 -2
  399. package/src/shared/types/index.ts +1 -4
  400. package/src/shared/types/screen.types.ts +4 -14
  401. package/src/shared/utils/bounds/helpers/create-bounds-accessor-core.ts +1 -0
  402. package/src/shared/utils/bounds/helpers/create-link-accessor.ts +6 -6
  403. package/src/shared/utils/bounds/helpers/prepare-bound-styles.ts +20 -11
  404. package/src/shared/utils/bounds/helpers/resolve-bounds-pair-key.ts +22 -0
  405. package/src/shared/utils/bounds/index.ts +3 -1
  406. package/src/shared/utils/bounds/navigation/reveal/build.ts +198 -308
  407. package/src/shared/utils/bounds/navigation/reveal/config.ts +20 -1
  408. package/src/shared/utils/bounds/navigation/reveal/math.ts +264 -18
  409. package/src/shared/utils/bounds/navigation/reveal/types.ts +2 -0
  410. package/src/shared/utils/bounds/navigation/zoom/build.ts +2 -2
  411. package/src/shared/utils/bounds/types/options.ts +2 -3
  412. package/src/shared/utils/navigation/resolve-scene-neighbors.ts +36 -23
  413. package/lib/commonjs/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js +0 -43
  414. package/lib/commonjs/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js.map +0 -1
  415. package/lib/commonjs/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js +0 -17
  416. package/lib/commonjs/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js.map +0 -1
  417. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js +0 -28
  418. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js.map +0 -1
  419. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +0 -75
  420. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +0 -1
  421. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement.js +0 -20
  422. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement.js.map +0 -1
  423. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/scroll-measurement.js.map +0 -1
  424. package/lib/commonjs/shared/components/create-boundary-component/utils/build-boundary-match-key.js +0 -16
  425. package/lib/commonjs/shared/components/create-boundary-component/utils/build-boundary-match-key.js.map +0 -1
  426. package/lib/commonjs/shared/providers/layout-anchor.provider.js +0 -86
  427. package/lib/commonjs/shared/providers/layout-anchor.provider.js.map +0 -1
  428. package/lib/commonjs/shared/stores/bounds/helpers/entries.helpers.js +0 -49
  429. package/lib/commonjs/shared/stores/bounds/helpers/entries.helpers.js.map +0 -1
  430. package/lib/commonjs/shared/stores/bounds/helpers/find-latest.js +0 -25
  431. package/lib/commonjs/shared/stores/bounds/helpers/find-latest.js.map +0 -1
  432. package/lib/commonjs/shared/stores/bounds/helpers/groups.helpers.js +0 -30
  433. package/lib/commonjs/shared/stores/bounds/helpers/groups.helpers.js.map +0 -1
  434. package/lib/commonjs/shared/stores/bounds/helpers/link.helpers.js +0 -79
  435. package/lib/commonjs/shared/stores/bounds/helpers/link.helpers.js.map +0 -1
  436. package/lib/commonjs/shared/stores/bounds/helpers/matching.js +0 -13
  437. package/lib/commonjs/shared/stores/bounds/helpers/matching.js.map +0 -1
  438. package/lib/commonjs/shared/stores/bounds/helpers/tag-state.helpers.js +0 -30
  439. package/lib/commonjs/shared/stores/bounds/helpers/tag-state.helpers.js.map +0 -1
  440. package/lib/commonjs/shared/stores/bounds/internals/groups.js +0 -102
  441. package/lib/commonjs/shared/stores/bounds/internals/groups.js.map +0 -1
  442. package/lib/module/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js +0 -38
  443. package/lib/module/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js.map +0 -1
  444. package/lib/module/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js +0 -12
  445. package/lib/module/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js.map +0 -1
  446. package/lib/module/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js +0 -23
  447. package/lib/module/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js.map +0 -1
  448. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +0 -68
  449. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +0 -1
  450. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement.js +0 -15
  451. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement.js.map +0 -1
  452. package/lib/module/shared/components/create-boundary-component/hooks/helpers/scroll-measurement.js.map +0 -1
  453. package/lib/module/shared/components/create-boundary-component/utils/build-boundary-match-key.js +0 -12
  454. package/lib/module/shared/components/create-boundary-component/utils/build-boundary-match-key.js.map +0 -1
  455. package/lib/module/shared/providers/layout-anchor.provider.js +0 -80
  456. package/lib/module/shared/providers/layout-anchor.provider.js.map +0 -1
  457. package/lib/module/shared/stores/bounds/helpers/entries.helpers.js +0 -42
  458. package/lib/module/shared/stores/bounds/helpers/entries.helpers.js.map +0 -1
  459. package/lib/module/shared/stores/bounds/helpers/find-latest.js +0 -19
  460. package/lib/module/shared/stores/bounds/helpers/find-latest.js.map +0 -1
  461. package/lib/module/shared/stores/bounds/helpers/groups.helpers.js +0 -23
  462. package/lib/module/shared/stores/bounds/helpers/groups.helpers.js.map +0 -1
  463. package/lib/module/shared/stores/bounds/helpers/link.helpers.js +0 -69
  464. package/lib/module/shared/stores/bounds/helpers/link.helpers.js.map +0 -1
  465. package/lib/module/shared/stores/bounds/helpers/matching.js +0 -9
  466. package/lib/module/shared/stores/bounds/helpers/matching.js.map +0 -1
  467. package/lib/module/shared/stores/bounds/helpers/tag-state.helpers.js +0 -24
  468. package/lib/module/shared/stores/bounds/helpers/tag-state.helpers.js.map +0 -1
  469. package/lib/module/shared/stores/bounds/internals/groups.js +0 -95
  470. package/lib/module/shared/stores/bounds/internals/groups.js.map +0 -1
  471. package/lib/typescript/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.d.ts +0 -15
  472. package/lib/typescript/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.d.ts.map +0 -1
  473. package/lib/typescript/shared/components/create-boundary-component/helpers/resolve-pending-source-key.d.ts +0 -2
  474. package/lib/typescript/shared/components/create-boundary-component/helpers/resolve-pending-source-key.d.ts.map +0 -1
  475. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.d.ts +0 -22
  476. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.d.ts.map +0 -1
  477. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts +0 -29
  478. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts.map +0 -1
  479. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement.d.ts +0 -3
  480. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement.d.ts.map +0 -1
  481. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/scroll-measurement.d.ts.map +0 -1
  482. package/lib/typescript/shared/components/create-boundary-component/utils/build-boundary-match-key.d.ts +0 -8
  483. package/lib/typescript/shared/components/create-boundary-component/utils/build-boundary-match-key.d.ts.map +0 -1
  484. package/lib/typescript/shared/providers/layout-anchor.provider.d.ts +0 -39
  485. package/lib/typescript/shared/providers/layout-anchor.provider.d.ts.map +0 -1
  486. package/lib/typescript/shared/stores/bounds/helpers/entries.helpers.d.ts +0 -5
  487. package/lib/typescript/shared/stores/bounds/helpers/entries.helpers.d.ts.map +0 -1
  488. package/lib/typescript/shared/stores/bounds/helpers/find-latest.d.ts +0 -3
  489. package/lib/typescript/shared/stores/bounds/helpers/find-latest.d.ts.map +0 -1
  490. package/lib/typescript/shared/stores/bounds/helpers/groups.helpers.d.ts +0 -10
  491. package/lib/typescript/shared/stores/bounds/helpers/groups.helpers.d.ts.map +0 -1
  492. package/lib/typescript/shared/stores/bounds/helpers/link.helpers.d.ts +0 -14
  493. package/lib/typescript/shared/stores/bounds/helpers/link.helpers.d.ts.map +0 -1
  494. package/lib/typescript/shared/stores/bounds/helpers/matching.d.ts +0 -3
  495. package/lib/typescript/shared/stores/bounds/helpers/matching.d.ts.map +0 -1
  496. package/lib/typescript/shared/stores/bounds/helpers/tag-state.helpers.d.ts +0 -5
  497. package/lib/typescript/shared/stores/bounds/helpers/tag-state.helpers.d.ts.map +0 -1
  498. package/lib/typescript/shared/stores/bounds/internals/groups.d.ts +0 -16
  499. package/lib/typescript/shared/stores/bounds/internals/groups.d.ts.map +0 -1
  500. package/src/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.ts +0 -83
  501. package/src/shared/components/create-boundary-component/helpers/resolve-pending-source-key.ts +0 -20
  502. package/src/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.ts +0 -48
  503. package/src/shared/components/create-boundary-component/hooks/helpers/measurement-rules.ts +0 -101
  504. package/src/shared/components/create-boundary-component/hooks/helpers/measurement.ts +0 -25
  505. package/src/shared/components/create-boundary-component/utils/build-boundary-match-key.ts +0 -14
  506. package/src/shared/providers/layout-anchor.provider.tsx +0 -112
  507. package/src/shared/stores/bounds/helpers/entries.helpers.ts +0 -55
  508. package/src/shared/stores/bounds/helpers/find-latest.ts +0 -22
  509. package/src/shared/stores/bounds/helpers/groups.helpers.ts +0 -27
  510. package/src/shared/stores/bounds/helpers/link.helpers.ts +0 -131
  511. package/src/shared/stores/bounds/helpers/matching.ts +0 -11
  512. package/src/shared/stores/bounds/helpers/tag-state.helpers.ts +0 -24
  513. package/src/shared/stores/bounds/internals/groups.ts +0 -116
@@ -11,25 +11,24 @@ import {
11
11
  useSharedValue,
12
12
  } from "react-native-reanimated";
13
13
  import type { SharedValue } from "react-native-reanimated/lib/typescript/commonTypes";
14
- import { applyMeasuredBoundsWrites } from "../components/create-boundary-component/helpers/apply-measured-bounds-writes";
15
14
  import useStableCallback from "../hooks/use-stable-callback";
16
15
  import useStableCallbackValue from "../hooks/use-stable-callback-value";
17
16
  import { AnimationStore } from "../stores/animation.store";
18
- import { getEntry } from "../stores/bounds/internals/entries";
19
17
  import {
20
- getPendingLink,
21
- hasDestinationLink,
22
- hasSourceLink,
23
- } from "../stores/bounds/internals/links";
18
+ createPendingPairKey,
19
+ createScreenPairKey,
20
+ } from "../stores/bounds/helpers/link-pairs.helpers";
21
+ import { getEntry } from "../stores/bounds/internals/entries";
22
+ import { getDestination, getSource } from "../stores/bounds/internals/links";
24
23
  import { prepareStyleForBounds } from "../utils/bounds/helpers/styles/styles";
25
24
  import createProvider from "../utils/create-provider";
25
+ import { applyMeasuredBoundsWrites } from "./helpers/measured-bounds-writes";
26
26
  import { useDescriptorDerivations, useDescriptors } from "./screen/descriptors";
27
27
 
28
28
  interface MaybeMeasureAndStoreParams {
29
29
  onPress?: ((...args: unknown[]) => void) | undefined;
30
30
  shouldSetSource?: boolean;
31
31
  shouldSetDestination?: boolean;
32
- shouldUpdateSource?: boolean;
33
32
  }
34
33
 
35
34
  interface RegisterBoundsRenderProps {
@@ -208,48 +207,14 @@ const useParentSyncReaction = (params: {
208
207
  );
209
208
  };
210
209
 
211
- const CloseRemeasureReactionEffect = (params: {
212
- sharedBoundTag: string;
213
- remeasureOnFocus: boolean;
214
- nextClosing: SharedValue<number>;
215
- maybeMeasureAndStore: (options: MaybeMeasureAndStoreParams) => void;
216
- }) => {
217
- const {
218
- sharedBoundTag,
219
- remeasureOnFocus,
220
- nextClosing,
221
- maybeMeasureAndStore,
222
- } = params;
223
-
224
- useAnimatedReaction(
225
- () => nextClosing.get(),
226
- (closing, prevClosing) => {
227
- "worklet";
228
- if (closing === 1 && (prevClosing === 0 || prevClosing === null)) {
229
- maybeMeasureAndStore({ shouldUpdateSource: true });
230
- }
231
- },
232
- [sharedBoundTag, remeasureOnFocus, nextClosing],
233
- );
234
-
235
- return null;
236
- };
237
-
238
210
  let useRegisterBoundsContext: () => RegisterBoundsContextValue | null;
239
211
 
240
212
  const registerBoundsBundle = createProvider("RegisterBounds", {
241
213
  guarded: false,
242
214
  })<RegisterBoundsProviderProps, RegisterBoundsContextValue>(
243
- ({
244
- style,
245
- onPress,
246
- sharedBoundTag,
247
- animatedRef,
248
- remeasureOnFocus,
249
- children,
250
- }) => {
215
+ ({ style, onPress, sharedBoundTag, animatedRef, children }) => {
251
216
  const { current, next } = useDescriptors();
252
- const { ancestorKeys } = useDescriptorDerivations();
217
+ const { ancestorKeys, previousScreenKey } = useDescriptorDerivations();
253
218
  const currentScreenKey = current.route.key;
254
219
  const selectedNextRouteId = getRouteParamId(next?.route);
255
220
 
@@ -277,7 +242,6 @@ const registerBoundsBundle = createProvider("RegisterBounds", {
277
242
  onPress,
278
243
  shouldSetSource,
279
244
  shouldSetDestination,
280
- shouldUpdateSource,
281
245
  }: MaybeMeasureAndStoreParams = {}) => {
282
246
  "worklet";
283
247
  if (!sharedBoundTag) {
@@ -285,15 +249,27 @@ const registerBoundsBundle = createProvider("RegisterBounds", {
285
249
  return;
286
250
  }
287
251
 
252
+ const sourcePairKey = createPendingPairKey(currentScreenKey);
253
+ const destinationPairKey = previousScreenKey
254
+ ? createScreenPairKey(previousScreenKey, currentScreenKey)
255
+ : undefined;
256
+ const pendingSourcePairKey = previousScreenKey
257
+ ? createPendingPairKey(previousScreenKey)
258
+ : undefined;
259
+
288
260
  if (shouldSetSource && isAnimating.get()) {
289
261
  const existing = getEntry(sharedBoundTag, currentScreenKey);
290
262
  if (existing?.bounds) {
291
263
  applyMeasuredBoundsWrites({
292
- sharedBoundTag,
264
+ entryTag: sharedBoundTag,
265
+ linkId: sharedBoundTag,
293
266
  currentScreenKey,
294
267
  measured: existing.bounds,
295
268
  preparedStyles,
296
- shouldSetSource: true,
269
+ linkWrite: {
270
+ type: "source",
271
+ pairKey: sourcePairKey,
272
+ },
297
273
  });
298
274
  }
299
275
 
@@ -301,31 +277,30 @@ const registerBoundsBundle = createProvider("RegisterBounds", {
301
277
  return;
302
278
  }
303
279
 
304
- const hasPending = getPendingLink(sharedBoundTag) !== null;
305
- const hasSource = hasSourceLink(sharedBoundTag, currentScreenKey);
306
- const hasDestination = hasDestinationLink(
307
- sharedBoundTag,
308
- currentScreenKey,
309
- );
280
+ const hasPendingSource = pendingSourcePairKey
281
+ ? getSource(pendingSourcePairKey, sharedBoundTag) !== null
282
+ : false;
283
+ const hasSource =
284
+ getSource(sourcePairKey, sharedBoundTag) !== null ||
285
+ (destinationPairKey
286
+ ? getSource(destinationPairKey, sharedBoundTag) !== null
287
+ : false);
288
+ const hasDestination = destinationPairKey
289
+ ? getDestination(destinationPairKey, sharedBoundTag) !== null
290
+ : false;
310
291
 
311
292
  const wantsSetSource = !!shouldSetSource;
312
293
  const wantsSetDestination = !!shouldSetDestination;
313
- const wantsUpdateSource = !!shouldUpdateSource;
314
- const wantsSnapshotOnly =
315
- !wantsSetSource && !wantsSetDestination && !wantsUpdateSource;
294
+ const wantsSnapshotOnly = !wantsSetSource && !wantsSetDestination;
316
295
 
317
296
  const canSetSource = wantsSetSource;
318
- const canSetDestination = wantsSetDestination && hasPending;
319
- const canUpdateSource = wantsUpdateSource && hasSource;
297
+ const canSetDestination =
298
+ wantsSetDestination && (hasPendingSource || hasSource);
320
299
  const canSnapshotOnly =
321
- wantsSnapshotOnly && (hasPending || hasSource || hasDestination);
322
-
323
- if (
324
- !canSetSource &&
325
- !canSetDestination &&
326
- !canUpdateSource &&
327
- !canSnapshotOnly
328
- ) {
300
+ wantsSnapshotOnly &&
301
+ (hasPendingSource || hasSource || hasDestination);
302
+
303
+ if (!canSetSource && !canSetDestination && !canSnapshotOnly) {
329
304
  if (onPress) runOnJS(onPress)();
330
305
  return;
331
306
  }
@@ -339,15 +314,38 @@ const registerBoundsBundle = createProvider("RegisterBounds", {
339
314
  emitUpdate();
340
315
 
341
316
  applyMeasuredBoundsWrites({
342
- sharedBoundTag,
317
+ entryTag: sharedBoundTag,
318
+ linkId: sharedBoundTag,
343
319
  currentScreenKey,
344
320
  measured,
345
321
  preparedStyles,
346
- shouldSetSource: canSetSource,
347
- shouldUpdateSource: canUpdateSource,
348
- shouldSetDestination: canSetDestination,
322
+ linkWrite: canSetSource
323
+ ? {
324
+ type: "source",
325
+ pairKey: sourcePairKey,
326
+ }
327
+ : canSetDestination && destinationPairKey
328
+ ? {
329
+ type: "destination",
330
+ pairKey: destinationPairKey,
331
+ }
332
+ : undefined,
349
333
  });
350
334
 
335
+ if (canSetSource && canSetDestination && destinationPairKey) {
336
+ applyMeasuredBoundsWrites({
337
+ entryTag: sharedBoundTag,
338
+ linkId: sharedBoundTag,
339
+ currentScreenKey,
340
+ measured,
341
+ preparedStyles,
342
+ linkWrite: {
343
+ type: "destination",
344
+ pairKey: destinationPairKey,
345
+ },
346
+ });
347
+ }
348
+
351
349
  if (onPress) runOnJS(onPress)();
352
350
  },
353
351
  );
@@ -368,15 +366,6 @@ const registerBoundsBundle = createProvider("RegisterBounds", {
368
366
  ancestorKeys,
369
367
  });
370
368
 
371
- // Re-measure source bounds when the destination screen (next in stack)
372
- // starts closing. This fires at the instant the back animation begins,
373
- // unlike useFocusEffect which fires too late (after the screen is removed
374
- // from state).
375
- const nextScreenKey = next?.route.key;
376
- const nextClosing = nextScreenKey
377
- ? AnimationStore.getValue(nextScreenKey, "closing")
378
- : null;
379
-
380
369
  useParentSyncReaction({ parentContext, maybeMeasureAndStore });
381
370
 
382
371
  const captureActiveOnPress = useStableCallback(() => {
@@ -390,19 +379,7 @@ const registerBoundsBundle = createProvider("RegisterBounds", {
390
379
 
391
380
  return {
392
381
  value: { updateSignal },
393
- children: (
394
- <>
395
- {sharedBoundTag && remeasureOnFocus && nextClosing ? (
396
- <CloseRemeasureReactionEffect
397
- sharedBoundTag={sharedBoundTag}
398
- remeasureOnFocus={remeasureOnFocus}
399
- nextClosing={nextClosing}
400
- maybeMeasureAndStore={maybeMeasureAndStore}
401
- />
402
- ) : null}
403
- {children({ handleInitialLayout, captureActiveOnPress })}
404
- </>
405
- ),
382
+ children: <>{children({ handleInitialLayout, captureActiveOnPress })}</>,
406
383
  };
407
384
  },
408
385
  );
@@ -72,20 +72,6 @@ export const createTransitionAccessor = (
72
72
  return {
73
73
  ...frame,
74
74
  bounds: source.boundsAccessor,
75
- transition: (target?: ScreenTransitionTarget) => {
76
- "worklet";
77
- const targetIndex = resolveTargetIndex(
78
- target,
79
- sourceIndex,
80
- currentSources.length,
81
- );
82
-
83
- if (targetIndex === -1) {
84
- return null;
85
- }
86
-
87
- return buildScope(targetIndex);
88
- },
89
75
  };
90
76
  };
91
77
 
@@ -38,6 +38,7 @@ export const buildScreenTransitionOptions = (
38
38
  : undefined;
39
39
 
40
40
  return {
41
+ navigationMaskEnabled: options.navigationMaskEnabled,
41
42
  gestureEnabled: options.gestureEnabled,
42
43
  experimental_allowDisabledGestureTracking:
43
44
  options.experimental_allowDisabledGestureTracking,
@@ -18,11 +18,51 @@ import {
18
18
  } from "./snap-points";
19
19
  import type { BuiltState } from "./types";
20
20
 
21
- export { computeLogicallySettled } from "./settle";
22
-
23
21
  const LOGICAL_SETTLE_STICKY_PROGRESS_THRESHOLD =
24
22
  LOGICAL_SETTLE_PROGRESS_THRESHOLD * 10;
25
23
 
24
+ const mergeTransitionOptions = (
25
+ base: ScreenTransitionOptions,
26
+ effective: ScreenTransitionOptions | undefined,
27
+ slot: ScreenTransitionOptions,
28
+ ): ScreenTransitionOptions => {
29
+ "worklet";
30
+ if (!effective) {
31
+ return base;
32
+ }
33
+
34
+ slot.navigationMaskEnabled =
35
+ effective.navigationMaskEnabled ?? base.navigationMaskEnabled;
36
+ slot.gestureEnabled = effective.gestureEnabled ?? base.gestureEnabled;
37
+ slot.experimental_allowDisabledGestureTracking =
38
+ effective.experimental_allowDisabledGestureTracking ??
39
+ base.experimental_allowDisabledGestureTracking;
40
+ slot.gestureDirection = effective.gestureDirection ?? base.gestureDirection;
41
+ slot.gestureSensitivity =
42
+ effective.gestureSensitivity ?? base.gestureSensitivity;
43
+ slot.gestureVelocityImpact =
44
+ effective.gestureVelocityImpact ?? base.gestureVelocityImpact;
45
+ slot.gestureSnapVelocityImpact =
46
+ effective.gestureSnapVelocityImpact ?? base.gestureSnapVelocityImpact;
47
+ slot.gestureReleaseVelocityScale =
48
+ effective.gestureReleaseVelocityScale ?? base.gestureReleaseVelocityScale;
49
+ slot.gestureResponseDistance =
50
+ effective.gestureResponseDistance ?? base.gestureResponseDistance;
51
+ slot.gestureProgressMode =
52
+ effective.gestureProgressMode ?? base.gestureProgressMode;
53
+ slot.gestureDrivesProgress =
54
+ effective.gestureDrivesProgress ?? base.gestureDrivesProgress;
55
+ slot.gestureActivationArea =
56
+ effective.gestureActivationArea ?? base.gestureActivationArea;
57
+ slot.gestureSnapLocked =
58
+ effective.gestureSnapLocked ?? base.gestureSnapLocked;
59
+ slot.sheetScrollGestureBehavior =
60
+ effective.sheetScrollGestureBehavior ?? base.sheetScrollGestureBehavior;
61
+ slot.backdropBehavior = effective.backdropBehavior ?? base.backdropBehavior;
62
+
63
+ return slot;
64
+ };
65
+
26
66
  export const hydrateTransitionState = (
27
67
  s: BuiltState,
28
68
  dimensions: Layout,
@@ -31,6 +71,11 @@ export const hydrateTransitionState = (
31
71
  "worklet";
32
72
  const out = s.unwrapped;
33
73
  const baseProgress = s.progress.get();
74
+ const options = mergeTransitionOptions(
75
+ s.options,
76
+ effectiveOptions,
77
+ s.optionsSlot,
78
+ );
34
79
  out.willAnimate = s.willAnimate.get();
35
80
  out.closing = s.closing.get();
36
81
  out.entering = s.entering.get();
@@ -38,6 +83,7 @@ export const hydrateTransitionState = (
38
83
  out.gesture.y = s.gesture.y.get();
39
84
  out.gesture.normX = s.gesture.normX.get();
40
85
  out.gesture.normY = s.gesture.normY.get();
86
+ out.gesture.velocity = s.gesture.velocity.get();
41
87
  out.gesture.scale = s.gesture.scale.get();
42
88
  out.gesture.normScale = s.gesture.normScale.get();
43
89
  out.gesture.focalX = s.gesture.focalX.get();
@@ -124,11 +170,10 @@ export const hydrateTransitionState = (
124
170
  computedLogicallySettled || shouldPreserveLogicalSettle ? 1 : 0;
125
171
 
126
172
  out.meta = s.meta;
127
- out.options = s.options;
173
+ out.options = options;
128
174
  out.route = s.route;
129
175
  out.layouts.screen.width = dimensions.width;
130
176
  out.layouts.screen.height = dimensions.height;
131
- out.layouts.navigationMaskEnabled = s.navigationMaskEnabled;
132
177
 
133
178
  const content = s.measuredContentLayout.get();
134
179
 
@@ -17,7 +17,7 @@ export type BuiltState = {
17
17
  route: BaseStackRoute;
18
18
  meta?: Record<string, unknown>;
19
19
  options: ScreenTransitionOptions;
20
- navigationMaskEnabled: boolean;
20
+ optionsSlot: ScreenTransitionOptions;
21
21
  targetProgress: SharedValue<number>;
22
22
  logicalSettleFrameCount: SharedValue<number>;
23
23
  resolvedAutoSnapPoint: SharedValue<number>;
@@ -20,10 +20,7 @@ import { hydrateTransitionState } from "./hydrate-transition-state";
20
20
  import type { SelectedInterpolatorOptions } from "./selected-interpolator-options";
21
21
  import { useBuildTransitionState } from "./use-build-transition-state";
22
22
 
23
- export type ScreenInterpolatorFrame = Omit<
24
- ScreenInterpolationProps,
25
- "bounds" | "transition"
26
- >;
23
+ export type ScreenInterpolatorFrame = Omit<ScreenInterpolationProps, "bounds">;
27
24
 
28
25
  interface ScreenAnimationPipeline {
29
26
  screenInterpolatorProps: SharedValue<ScreenInterpolatorFrame>;
@@ -39,7 +36,7 @@ const createInitialBaseInterpolatorProps = (
39
36
  ): ScreenInterpolatorFrame => {
40
37
  const current = {
41
38
  ...DEFAULT_SCREEN_TRANSITION_STATE,
42
- layouts: { screen: dimensions, navigationMaskEnabled: false },
39
+ layouts: { screen: dimensions },
43
40
  };
44
41
 
45
42
  return {
@@ -59,6 +59,7 @@ const areInterpolatorOptionsEqual = (
59
59
  if (!left || !right) return false;
60
60
 
61
61
  return (
62
+ left.navigationMaskEnabled === right.navigationMaskEnabled &&
62
63
  left.gestureEnabled === right.gestureEnabled &&
63
64
  left.experimental_allowDisabledGestureTracking ===
64
65
  right.experimental_allowDisabledGestureTracking &&
@@ -27,7 +27,7 @@ type BuiltState = {
27
27
  route: BaseStackRoute;
28
28
  meta?: Record<string, unknown>;
29
29
  options: ScreenTransitionOptions;
30
- navigationMaskEnabled: boolean;
30
+ optionsSlot: ScreenTransitionOptions;
31
31
  targetProgress: SharedValue<number>;
32
32
  logicalSettleFrameCount: SharedValue<number>;
33
33
  resolvedAutoSnapPoint: SharedValue<number>;
@@ -44,7 +44,6 @@ export const useBuildTransitionState = (
44
44
  const key = descriptor?.route?.key;
45
45
  const meta = descriptor?.options?.meta;
46
46
  const route = descriptor?.route;
47
- const navigationMaskEnabled = !!descriptor?.options?.navigationMaskEnabled;
48
47
  const snapPoints = descriptor?.options?.snapPoints;
49
48
 
50
49
  return useMemo(() => {
@@ -81,20 +80,12 @@ export const useBuildTransitionState = (
81
80
  route: plainRoute,
82
81
  meta: plainMeta,
83
82
  options: transitionOptions,
84
- navigationMaskEnabled,
83
+ optionsSlot: {},
85
84
  unwrapped: createScreenTransitionState(
86
85
  plainRoute,
87
86
  plainMeta,
88
- navigationMaskEnabled,
89
87
  transitionOptions,
90
88
  ),
91
89
  };
92
- }, [
93
- key,
94
- meta,
95
- route,
96
- snapPoints,
97
- navigationMaskEnabled,
98
- descriptor?.options,
99
- ]);
90
+ }, [key, meta, route, snapPoints, descriptor?.options]);
100
91
  };
@@ -128,5 +128,8 @@ export const usePanActivation = ({
128
128
  ],
129
129
  );
130
130
 
131
- return { onTouchesDown, onTouchesMove };
131
+ return useMemo(
132
+ () => ({ onTouchesDown, onTouchesMove }),
133
+ [onTouchesDown, onTouchesMove],
134
+ );
132
135
  };
@@ -2,7 +2,10 @@ import { clamp } from "react-native-reanimated";
2
2
  import { EPSILON, FALSE, TRUE } from "../../../../constants";
3
3
  import { animateToProgress } from "../../../../utils/animation/animate-to-progress";
4
4
  import { emit } from "../../../../utils/animation/emit";
5
- import { normalizeGestureTranslation } from "../shared/physics";
5
+ import {
6
+ normalizeGestureTranslation,
7
+ resolveGestureVelocity,
8
+ } from "../shared/physics";
6
9
  import type {
7
10
  GestureDimensions,
8
11
  PanGestureEvent,
@@ -36,6 +39,7 @@ export const startPanBase = (runtime: PanGestureRuntime) => {
36
39
  gestures.y.set(0);
37
40
  gestures.normX.set(0);
38
41
  gestures.normY.set(0);
42
+ gestures.velocity.set(0);
39
43
  gestures.raw.x.set(0);
40
44
  gestures.raw.y.set(0);
41
45
  gestures.raw.normX.set(0);
@@ -51,18 +55,28 @@ export const trackPanGesture = (
51
55
  ): PanTrackState => {
52
56
  "worklet";
53
57
  const { translationX: x, translationY: y } = event;
54
- const { translationX: rawX, translationY: rawY } = rawEvent;
58
+ const {
59
+ translationX: rawX,
60
+ translationY: rawY,
61
+ velocityX,
62
+ velocityY,
63
+ } = rawEvent;
55
64
  const { width, height } = dimensions;
56
65
 
57
66
  const normX = clamp(normalizeGestureTranslation(x, width), -1, 1);
58
67
  const normY = clamp(normalizeGestureTranslation(y, height), -1, 1);
59
68
  const rawNormX = clamp(normalizeGestureTranslation(rawX, width), -1, 1);
60
69
  const rawNormY = clamp(normalizeGestureTranslation(rawY, height), -1, 1);
70
+ const velocity = resolveGestureVelocity(
71
+ velocityX / Math.max(1, width),
72
+ velocityY / Math.max(1, height),
73
+ );
61
74
 
62
75
  gestures.x.set(x);
63
76
  gestures.y.set(y);
64
77
  gestures.normX.set(normX);
65
78
  gestures.normY.set(normY);
79
+ gestures.velocity.set(velocity);
66
80
  gestures.raw.x.set(rawX);
67
81
  gestures.raw.y.set(rawY);
68
82
  gestures.raw.normX.set(rawNormX);
@@ -73,6 +87,7 @@ export const trackPanGesture = (
73
87
  y,
74
88
  normX,
75
89
  normY,
90
+ velocity,
76
91
  };
77
92
  };
78
93
 
@@ -102,6 +117,7 @@ export const finalizePanRelease = (
102
117
  velocityY: plan.resetVelocityY,
103
118
  velocityNormX: plan.resetVelocityNormX,
104
119
  velocityNormY: plan.resetVelocityNormY,
120
+ releaseVelocity: plan.releaseVelocity,
105
121
  resetNormalizedValues: plan.resetNormalizedValues,
106
122
  resetNormalizedValuesImmediately: plan.resetNormalizedValuesImmediately,
107
123
  preserveRawValues: plan.preserveRawValues,
@@ -6,6 +6,7 @@ import {
6
6
  import {
7
7
  getPanReleaseHandoffVelocity,
8
8
  getPanReleaseProgressVelocity,
9
+ resolveGestureVelocity,
9
10
  } from "../shared/physics";
10
11
  import {
11
12
  getProgressVelocityTowardTarget,
@@ -24,6 +25,26 @@ import type {
24
25
  PanReleaseResult,
25
26
  } from "../types";
26
27
 
28
+ const resolvePanReleaseVelocity = (
29
+ runtime: PanGestureRuntime,
30
+ velocityNormX: number,
31
+ velocityNormY: number,
32
+ ) => {
33
+ "worklet";
34
+ const activeGesture = runtime.stores.gestures.active.get();
35
+
36
+ switch (activeGesture) {
37
+ case "horizontal":
38
+ case "horizontal-inverted":
39
+ return resolveGestureVelocity(velocityNormX, 0);
40
+ case "vertical":
41
+ case "vertical-inverted":
42
+ return resolveGestureVelocity(0, velocityNormY);
43
+ default:
44
+ return resolveGestureVelocity(velocityNormX, velocityNormY);
45
+ }
46
+ };
47
+
27
48
  const resolveActivePanSnapAxis = (runtime: PanGestureRuntime) => {
28
49
  "worklet";
29
50
  const activeGesture = runtime.stores.gestures.active.get();
@@ -226,6 +247,17 @@ export const buildPanReleasePlan = (
226
247
  resetVelocityScale === 0 ? 0 : rawEvent.velocityX * resetVelocityScale;
227
248
  const resetVelocityY =
228
249
  resetVelocityScale === 0 ? 0 : rawEvent.velocityY * resetVelocityScale;
250
+ const releaseVelocityNormX =
251
+ rawEvent.velocityX / Math.max(1, dimensions.width);
252
+ const releaseVelocityNormY =
253
+ rawEvent.velocityY / Math.max(1, dimensions.height);
254
+ const releaseVelocity = release.shouldDismiss
255
+ ? resolvePanReleaseVelocity(
256
+ runtime,
257
+ releaseVelocityNormX,
258
+ releaseVelocityNormY,
259
+ )
260
+ : 0;
229
261
 
230
262
  return {
231
263
  target: release.target,
@@ -235,6 +267,7 @@ export const buildPanReleasePlan = (
235
267
  resetVelocityY,
236
268
  resetVelocityNormX: resetVelocityX / Math.max(1, dimensions.width),
237
269
  resetVelocityNormY: resetVelocityY / Math.max(1, dimensions.height),
270
+ releaseVelocity,
238
271
  resetNormalizedValues: !release.shouldDismiss || progressDriven,
239
272
  resetNormalizedValuesImmediately:
240
273
  release.resetNormalizedValuesImmediately === true,
@@ -15,6 +15,7 @@ interface ResetPanGestureValuesProps {
15
15
  velocityY?: number;
16
16
  velocityNormX?: number;
17
17
  velocityNormY?: number;
18
+ releaseVelocity?: number;
18
19
  resetNormalizedValues?: boolean;
19
20
  resetNormalizedValuesImmediately?: boolean;
20
21
  preserveRawValues?: boolean;
@@ -42,6 +43,7 @@ export const resetPanGestureValues = ({
42
43
  velocityY,
43
44
  velocityNormX,
44
45
  velocityNormY,
46
+ releaseVelocity,
45
47
  resetNormalizedValues = true,
46
48
  resetNormalizedValuesImmediately = false,
47
49
  preserveRawValues = shouldDismiss,
@@ -58,6 +60,7 @@ export const resetPanGestureValues = ({
58
60
  gestures.dragging.set(FALSE);
59
61
  gestures.dismissing.set(shouldDismiss ? TRUE : FALSE);
60
62
  gestures.settling.set(shouldDismiss ? FALSE : TRUE);
63
+ gestures.velocity.set(shouldDismiss ? (releaseVelocity ?? 0) : 0);
61
64
 
62
65
  animateResetValue(gestures.x, 0, getGestureResetSpec(spec, velocityX), () =>
63
66
  clearPanSettlingIfResting(gestures),
@@ -1,4 +1,4 @@
1
- import { useCallback } from "react";
1
+ import { useCallback, useMemo } from "react";
2
2
  import type { SharedValue } from "react-native-reanimated";
3
3
  import { useNavigationHelpers } from "../../../../hooks/navigation/use-navigation-helpers";
4
4
  import type { ScreenOptionsContextValue } from "../../options";
@@ -81,9 +81,12 @@ export const usePanBehavior = (
81
81
  [runtime, screenOptions, dimensions, dismissScreen, withSensitivity],
82
82
  );
83
83
 
84
- return {
85
- onStart,
86
- onUpdate,
87
- onEnd,
88
- };
84
+ return useMemo(
85
+ () => ({
86
+ onStart,
87
+ onUpdate,
88
+ onEnd,
89
+ }),
90
+ [onStart, onUpdate, onEnd],
91
+ );
89
92
  };
@@ -1,4 +1,4 @@
1
- import { useCallback } from "react";
1
+ import { useCallback, useMemo } from "react";
2
2
  import type {
3
3
  GestureStateManager,
4
4
  GestureTouchEvent,
@@ -68,5 +68,8 @@ export const usePinchActivation = ({
68
68
  [runtime, screenOptions],
69
69
  );
70
70
 
71
- return { onTouchesDown, onTouchesMove };
71
+ return useMemo(
72
+ () => ({ onTouchesDown, onTouchesMove }),
73
+ [onTouchesDown, onTouchesMove],
74
+ );
72
75
  };
@@ -33,6 +33,7 @@ export const startPinchBase = (
33
33
  gestures.settling.set(0);
34
34
  gestures.active.set(null);
35
35
  gestures.direction.set(null);
36
+ gestures.velocity.set(0);
36
37
  gestures.scale.set(1);
37
38
  gestures.normScale.set(0);
38
39
  gestures.raw.scale.set(1);
@@ -1,4 +1,4 @@
1
- import { useCallback } from "react";
1
+ import { useCallback, useMemo } from "react";
2
2
  import type { SharedValue } from "react-native-reanimated";
3
3
  import { useNavigationHelpers } from "../../../../hooks/navigation/use-navigation-helpers";
4
4
  import type { ScreenOptionsContextValue } from "../../options";
@@ -74,9 +74,12 @@ export const usePinchBehavior = (
74
74
  [runtime, screenOptions, dismissScreen, withSensitivity],
75
75
  );
76
76
 
77
- return {
78
- onStart,
79
- onUpdate,
80
- onEnd,
81
- };
77
+ return useMemo(
78
+ () => ({
79
+ onStart,
80
+ onUpdate,
81
+ onEnd,
82
+ }),
83
+ [onStart, onUpdate, onEnd],
84
+ );
82
85
  };