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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (848) hide show
  1. package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js +9 -12
  2. package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js.map +1 -1
  3. package/lib/commonjs/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js +4 -7
  4. package/lib/commonjs/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js.map +1 -1
  5. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +12 -1
  6. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +1 -1
  7. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-presence.js +2 -12
  8. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +1 -1
  9. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js +13 -2
  10. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js.map +1 -1
  11. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-measurer.js +1 -7
  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 +1 -1
  14. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map +1 -1
  15. package/lib/commonjs/shared/components/create-transition-aware-component.js +2 -2
  16. package/lib/commonjs/shared/components/create-transition-aware-component.js.map +1 -1
  17. package/lib/commonjs/shared/components/screen-container/helpers/find-collapse-target.js +17 -12
  18. package/lib/commonjs/shared/components/screen-container/helpers/find-collapse-target.js.map +1 -1
  19. package/lib/commonjs/shared/components/screen-container/hooks/use-content-layout.js +1 -1
  20. package/lib/commonjs/shared/components/screen-container/hooks/use-content-layout.js.map +1 -1
  21. package/lib/commonjs/shared/components/screen-container/layers/backdrop.js +8 -1
  22. package/lib/commonjs/shared/components/screen-container/layers/backdrop.js.map +1 -1
  23. package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js +18 -10
  24. package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
  25. package/lib/commonjs/shared/components/screen-container/layers/surface-container.js +16 -5
  26. package/lib/commonjs/shared/components/screen-container/layers/surface-container.js.map +1 -1
  27. package/lib/commonjs/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.js +2 -12
  28. package/lib/commonjs/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.js.map +1 -1
  29. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js +1 -7
  30. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js.map +1 -1
  31. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-open-transition-intent.js +1 -1
  32. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-open-transition-intent.js.map +1 -1
  33. package/lib/commonjs/shared/configs/presets.js +3 -3
  34. package/lib/commonjs/shared/configs/presets.js.map +1 -1
  35. package/lib/commonjs/shared/constants.js +13 -3
  36. package/lib/commonjs/shared/constants.js.map +1 -1
  37. package/lib/commonjs/shared/providers/register-bounds.provider.js +4 -12
  38. package/lib/commonjs/shared/providers/register-bounds.provider.js.map +1 -1
  39. package/lib/commonjs/shared/providers/screen/animation/animation.provider.js +86 -11
  40. package/lib/commonjs/shared/providers/screen/animation/animation.provider.js.map +1 -1
  41. package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.js +23 -0
  42. package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.js.map +1 -0
  43. package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js +107 -0
  44. package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js.map +1 -0
  45. package/lib/commonjs/shared/providers/screen/animation/helpers/build-screen-transition-options.js +8 -1
  46. package/lib/commonjs/shared/providers/screen/animation/helpers/build-screen-transition-options.js.map +1 -1
  47. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.js +79 -0
  48. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.js.map +1 -0
  49. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +95 -0
  50. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -0
  51. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/settle.js +29 -0
  52. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/settle.js.map +1 -0
  53. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/snap-points.js +96 -0
  54. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/snap-points.js.map +1 -0
  55. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/types.js +6 -0
  56. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/types.js.map +1 -0
  57. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +20 -22
  58. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  59. package/lib/commonjs/shared/providers/screen/animation/helpers/selected-interpolator-options.js +51 -0
  60. package/lib/commonjs/shared/providers/screen/animation/helpers/selected-interpolator-options.js.map +1 -0
  61. package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js +2 -3
  62. package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -1
  63. package/lib/commonjs/shared/providers/screen/animation/use-screen-animation.js +55 -25
  64. package/lib/commonjs/shared/providers/screen/animation/use-screen-animation.js.map +1 -1
  65. package/lib/commonjs/shared/providers/screen/descriptors/descriptors.provider.js +2 -5
  66. package/lib/commonjs/shared/providers/screen/descriptors/descriptors.provider.js.map +1 -1
  67. package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js +2 -12
  68. package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js.map +1 -1
  69. package/lib/commonjs/shared/providers/screen/gestures/gestures.provider.js +5 -5
  70. package/lib/commonjs/shared/providers/screen/gestures/gestures.provider.js.map +1 -1
  71. package/lib/commonjs/shared/providers/screen/gestures/hooks/use-gesture-builder-state.js +4 -5
  72. package/lib/commonjs/shared/providers/screen/gestures/hooks/use-gesture-builder-state.js.map +1 -1
  73. package/lib/commonjs/shared/providers/screen/gestures/hooks/use-gesture-sensitivity.js +3 -3
  74. package/lib/commonjs/shared/providers/screen/gestures/hooks/use-gesture-sensitivity.js.map +1 -1
  75. package/lib/commonjs/shared/providers/screen/gestures/hooks/use-screen-gesture-config.js +6 -84
  76. package/lib/commonjs/shared/providers/screen/gestures/hooks/use-screen-gesture-config.js.map +1 -1
  77. package/lib/commonjs/shared/providers/screen/gestures/hooks/use-screen-gesture.js +2 -5
  78. package/lib/commonjs/shared/providers/screen/gestures/hooks/use-screen-gesture.js.map +1 -1
  79. package/lib/commonjs/shared/providers/screen/gestures/hooks/use-stable-runtime-config.js.map +1 -1
  80. package/lib/commonjs/shared/providers/screen/gestures/ownership/compute-claimed-directions.js +37 -36
  81. package/lib/commonjs/shared/providers/screen/gestures/ownership/compute-claimed-directions.js.map +1 -1
  82. package/lib/commonjs/shared/providers/screen/gestures/ownership/resolve-ownership.js +13 -0
  83. package/lib/commonjs/shared/providers/screen/gestures/ownership/resolve-ownership.js.map +1 -1
  84. package/lib/commonjs/shared/providers/screen/gestures/ownership/use-walk-up-and-register-shadowing-claims.js +69 -56
  85. package/lib/commonjs/shared/providers/screen/gestures/ownership/use-walk-up-and-register-shadowing-claims.js.map +1 -1
  86. package/lib/commonjs/shared/providers/screen/gestures/{builders/use-build-pan-gesture.js → pan/build-pan-gesture.js} +4 -4
  87. package/lib/commonjs/shared/providers/screen/gestures/pan/build-pan-gesture.js.map +1 -0
  88. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-activation-decision.js +210 -0
  89. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-activation-decision.js.map +1 -0
  90. package/lib/commonjs/shared/providers/screen/gestures/{helpers/gesture-activation.js → pan/pan-activation-rules.js} +131 -121
  91. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-activation-rules.js.map +1 -0
  92. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-activation.js +94 -0
  93. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-activation.js.map +1 -0
  94. package/lib/commonjs/shared/providers/screen/gestures/{helpers/pan-phases.js → pan/pan-lifecycle.js} +31 -30
  95. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-lifecycle.js.map +1 -0
  96. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-release.js +193 -0
  97. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-release.js.map +1 -0
  98. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-reset.js +52 -0
  99. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-reset.js.map +1 -0
  100. package/lib/commonjs/shared/providers/screen/gestures/pan/use-pan-behavior.js +53 -0
  101. package/lib/commonjs/shared/providers/screen/gestures/pan/use-pan-behavior.js.map +1 -0
  102. package/lib/commonjs/shared/providers/screen/gestures/{builders/use-build-pinch-gesture.js → pinch/build-pinch-gesture.js} +4 -4
  103. package/lib/commonjs/shared/providers/screen/gestures/pinch/build-pinch-gesture.js.map +1 -0
  104. package/lib/commonjs/shared/providers/screen/gestures/{activation/use-pinch-activation.js → pinch/pinch-activation.js} +4 -4
  105. package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-activation.js.map +1 -0
  106. package/lib/commonjs/shared/providers/screen/gestures/{helpers/pinch-phases.js → pinch/pinch-lifecycle.js} +12 -7
  107. package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-lifecycle.js.map +1 -0
  108. package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-release.js +133 -0
  109. package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-release.js.map +1 -0
  110. package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-reset.js +45 -0
  111. package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-reset.js.map +1 -0
  112. package/lib/commonjs/shared/providers/screen/gestures/pinch/use-pinch-behavior.js +53 -0
  113. package/lib/commonjs/shared/providers/screen/gestures/pinch/use-pinch-behavior.js.map +1 -0
  114. package/lib/commonjs/shared/providers/screen/gestures/scroll-coordination/index.js.map +1 -0
  115. package/lib/commonjs/shared/providers/screen/gestures/scroll-coordination/update-scroll-gesture-state.js.map +1 -0
  116. package/lib/commonjs/shared/providers/screen/gestures/{hooks/use-scroll-gesture-coordination → scroll-coordination}/use-scroll-gesture-coordination.js +4 -4
  117. package/lib/commonjs/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.js.map +1 -0
  118. package/lib/commonjs/shared/providers/screen/gestures/{hooks/use-scroll-gesture-coordination → scroll-coordination}/walk-up-scroll-gesture-coordination.js +20 -9
  119. package/lib/commonjs/shared/providers/screen/gestures/scroll-coordination/walk-up-scroll-gesture-coordination.js.map +1 -0
  120. package/lib/commonjs/shared/providers/screen/gestures/{helpers/walk-gesture-ancestors.js → shared/ancestors.js} +1 -1
  121. package/lib/commonjs/shared/providers/screen/gestures/shared/ancestors.js.map +1 -0
  122. package/lib/commonjs/shared/providers/screen/gestures/{helpers/gesture-directions.js → shared/directions.js} +1 -1
  123. package/lib/commonjs/shared/providers/screen/gestures/shared/directions.js.map +1 -0
  124. package/lib/commonjs/shared/providers/screen/gestures/{helpers/gesture-physics.js → shared/physics.js} +80 -72
  125. package/lib/commonjs/shared/providers/screen/gestures/shared/physics.js.map +1 -0
  126. package/lib/commonjs/shared/providers/screen/gestures/shared/policy.js +231 -0
  127. package/lib/commonjs/shared/providers/screen/gestures/shared/policy.js.map +1 -0
  128. package/lib/commonjs/shared/providers/screen/gestures/shared/release.js +36 -0
  129. package/lib/commonjs/shared/providers/screen/gestures/shared/release.js.map +1 -0
  130. package/lib/commonjs/shared/providers/screen/gestures/shared/reset.js +65 -0
  131. package/lib/commonjs/shared/providers/screen/gestures/shared/reset.js.map +1 -0
  132. package/lib/commonjs/shared/providers/screen/gestures/shared/runtime.js +43 -0
  133. package/lib/commonjs/shared/providers/screen/gestures/shared/runtime.js.map +1 -0
  134. package/lib/commonjs/shared/providers/screen/gestures/shared/snap-points.js +184 -0
  135. package/lib/commonjs/shared/providers/screen/gestures/shared/snap-points.js.map +1 -0
  136. package/lib/commonjs/shared/providers/screen/gestures/shared/targets.js +122 -0
  137. package/lib/commonjs/shared/providers/screen/gestures/shared/targets.js.map +1 -0
  138. package/lib/commonjs/shared/providers/screen/gestures/types.js +2 -2
  139. package/lib/commonjs/shared/providers/screen/gestures/types.js.map +1 -1
  140. package/lib/commonjs/shared/providers/screen/options/helpers.js +69 -19
  141. package/lib/commonjs/shared/providers/screen/options/helpers.js.map +1 -1
  142. package/lib/commonjs/shared/providers/screen/styles/helpers/preserve-animated-props-only.js +26 -0
  143. package/lib/commonjs/shared/providers/screen/styles/helpers/preserve-animated-props-only.js.map +1 -0
  144. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js +112 -1
  145. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js.map +1 -1
  146. package/lib/commonjs/shared/providers/screen/styles/helpers/visibility-gate.js +45 -0
  147. package/lib/commonjs/shared/providers/screen/styles/helpers/visibility-gate.js.map +1 -0
  148. package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +36 -16
  149. package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
  150. package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +34 -13
  151. package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
  152. package/lib/commonjs/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js +9 -3
  153. package/lib/commonjs/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js.map +1 -1
  154. package/lib/commonjs/shared/stores/animation.store.js +3 -7
  155. package/lib/commonjs/shared/stores/animation.store.js.map +1 -1
  156. package/lib/commonjs/shared/stores/bounds/helpers/entries.helpers.js +2 -12
  157. package/lib/commonjs/shared/stores/bounds/helpers/entries.helpers.js.map +1 -1
  158. package/lib/commonjs/shared/stores/bounds/helpers/link.helpers.js +1 -1
  159. package/lib/commonjs/shared/stores/bounds/helpers/link.helpers.js.map +1 -1
  160. package/lib/commonjs/shared/stores/bounds/helpers/matching.js +1 -10
  161. package/lib/commonjs/shared/stores/bounds/helpers/matching.js.map +1 -1
  162. package/lib/commonjs/shared/stores/bounds/index.js +1 -3
  163. package/lib/commonjs/shared/stores/bounds/index.js.map +1 -1
  164. package/lib/commonjs/shared/stores/bounds/internals/clear.js +0 -21
  165. package/lib/commonjs/shared/stores/bounds/internals/clear.js.map +1 -1
  166. package/lib/commonjs/shared/stores/bounds/internals/links.js +2 -8
  167. package/lib/commonjs/shared/stores/bounds/internals/links.js.map +1 -1
  168. package/lib/commonjs/shared/stores/system.store.js +3 -0
  169. package/lib/commonjs/shared/stores/system.store.js.map +1 -1
  170. package/lib/commonjs/shared/types/gesture.types.js.map +1 -1
  171. package/lib/commonjs/shared/utils/animation/animate-to-progress.js +19 -18
  172. package/lib/commonjs/shared/utils/animation/animate-to-progress.js.map +1 -1
  173. package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
  174. package/lib/commonjs/shared/utils/bounds/navigation/math.js +1 -15
  175. package/lib/commonjs/shared/utils/bounds/navigation/math.js.map +1 -1
  176. package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js +190 -75
  177. package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
  178. package/lib/commonjs/shared/utils/bounds/navigation/reveal/config.js +8 -17
  179. package/lib/commonjs/shared/utils/bounds/navigation/reveal/config.js.map +1 -1
  180. package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js +80 -18
  181. package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
  182. package/lib/commonjs/shared/utils/bounds/navigation/zoom/config.js +2 -2
  183. package/lib/commonjs/shared/utils/bounds/navigation/zoom/config.js.map +1 -1
  184. package/lib/commonjs/shared/utils/bounds/navigation/zoom/math.js +4 -5
  185. package/lib/commonjs/shared/utils/bounds/navigation/zoom/math.js.map +1 -1
  186. package/lib/commonjs/shared/utils/gesture-progress-mode.js +50 -0
  187. package/lib/commonjs/shared/utils/gesture-progress-mode.js.map +1 -0
  188. package/lib/commonjs/shared/utils/resolve-chain-target.js +9 -16
  189. package/lib/commonjs/shared/utils/resolve-chain-target.js.map +1 -1
  190. package/lib/commonjs/shared/utils/resolve-screen-transition-options.js +3 -3
  191. package/lib/commonjs/shared/utils/resolve-screen-transition-options.js.map +1 -1
  192. package/lib/module/shared/components/create-boundary-component/create-boundary-component.js +9 -12
  193. package/lib/module/shared/components/create-boundary-component/create-boundary-component.js.map +1 -1
  194. package/lib/module/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js +4 -7
  195. package/lib/module/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js.map +1 -1
  196. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +10 -0
  197. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +1 -1
  198. package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js +2 -12
  199. package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +1 -1
  200. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js +13 -2
  201. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js.map +1 -1
  202. package/lib/module/shared/components/create-boundary-component/hooks/use-measurer.js +1 -7
  203. package/lib/module/shared/components/create-boundary-component/hooks/use-measurer.js.map +1 -1
  204. package/lib/module/shared/components/create-boundary-component/hooks/use-refresh-boundary.js +1 -1
  205. package/lib/module/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map +1 -1
  206. package/lib/module/shared/components/create-transition-aware-component.js +1 -1
  207. package/lib/module/shared/components/create-transition-aware-component.js.map +1 -1
  208. package/lib/module/shared/components/screen-container/helpers/find-collapse-target.js +16 -11
  209. package/lib/module/shared/components/screen-container/helpers/find-collapse-target.js.map +1 -1
  210. package/lib/module/shared/components/screen-container/hooks/use-content-layout.js +1 -1
  211. package/lib/module/shared/components/screen-container/hooks/use-content-layout.js.map +1 -1
  212. package/lib/module/shared/components/screen-container/layers/backdrop.js +8 -1
  213. package/lib/module/shared/components/screen-container/layers/backdrop.js.map +1 -1
  214. package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js +18 -10
  215. package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
  216. package/lib/module/shared/components/screen-container/layers/surface-container.js +16 -5
  217. package/lib/module/shared/components/screen-container/layers/surface-container.js.map +1 -1
  218. package/lib/module/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.js +3 -13
  219. package/lib/module/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.js.map +1 -1
  220. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js +1 -7
  221. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js.map +1 -1
  222. package/lib/module/shared/components/screen-lifecycle/hooks/use-open-transition-intent.js +1 -1
  223. package/lib/module/shared/components/screen-lifecycle/hooks/use-open-transition-intent.js.map +1 -1
  224. package/lib/module/shared/configs/presets.js +3 -3
  225. package/lib/module/shared/configs/presets.js.map +1 -1
  226. package/lib/module/shared/constants.js +12 -2
  227. package/lib/module/shared/constants.js.map +1 -1
  228. package/lib/module/shared/providers/register-bounds.provider.js +4 -12
  229. package/lib/module/shared/providers/register-bounds.provider.js.map +1 -1
  230. package/lib/module/shared/providers/screen/animation/animation.provider.js +87 -12
  231. package/lib/module/shared/providers/screen/animation/animation.provider.js.map +1 -1
  232. package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.js +18 -0
  233. package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.js.map +1 -0
  234. package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js +101 -0
  235. package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js.map +1 -0
  236. package/lib/module/shared/providers/screen/animation/helpers/build-screen-transition-options.js +8 -1
  237. package/lib/module/shared/providers/screen/animation/helpers/build-screen-transition-options.js.map +1 -1
  238. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.js +74 -0
  239. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.js.map +1 -0
  240. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +85 -0
  241. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -0
  242. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/settle.js +22 -0
  243. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/settle.js.map +1 -0
  244. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/snap-points.js +89 -0
  245. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/snap-points.js.map +1 -0
  246. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/types.js +4 -0
  247. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/types.js.map +1 -0
  248. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +20 -22
  249. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  250. package/lib/module/shared/providers/screen/animation/helpers/selected-interpolator-options.js +46 -0
  251. package/lib/module/shared/providers/screen/animation/helpers/selected-interpolator-options.js.map +1 -0
  252. package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js +2 -3
  253. package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -1
  254. package/lib/module/shared/providers/screen/animation/use-screen-animation.js +56 -25
  255. package/lib/module/shared/providers/screen/animation/use-screen-animation.js.map +1 -1
  256. package/lib/module/shared/providers/screen/descriptors/descriptors.provider.js +2 -5
  257. package/lib/module/shared/providers/screen/descriptors/descriptors.provider.js.map +1 -1
  258. package/lib/module/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js +2 -12
  259. package/lib/module/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js.map +1 -1
  260. package/lib/module/shared/providers/screen/gestures/gestures.provider.js +4 -4
  261. package/lib/module/shared/providers/screen/gestures/gestures.provider.js.map +1 -1
  262. package/lib/module/shared/providers/screen/gestures/hooks/use-gesture-builder-state.js +4 -5
  263. package/lib/module/shared/providers/screen/gestures/hooks/use-gesture-builder-state.js.map +1 -1
  264. package/lib/module/shared/providers/screen/gestures/hooks/use-gesture-sensitivity.js +1 -1
  265. package/lib/module/shared/providers/screen/gestures/hooks/use-gesture-sensitivity.js.map +1 -1
  266. package/lib/module/shared/providers/screen/gestures/hooks/use-screen-gesture-config.js +6 -84
  267. package/lib/module/shared/providers/screen/gestures/hooks/use-screen-gesture-config.js.map +1 -1
  268. package/lib/module/shared/providers/screen/gestures/hooks/use-screen-gesture.js +1 -4
  269. package/lib/module/shared/providers/screen/gestures/hooks/use-screen-gesture.js.map +1 -1
  270. package/lib/module/shared/providers/screen/gestures/hooks/use-stable-runtime-config.js.map +1 -1
  271. package/lib/module/shared/providers/screen/gestures/ownership/compute-claimed-directions.js +36 -36
  272. package/lib/module/shared/providers/screen/gestures/ownership/compute-claimed-directions.js.map +1 -1
  273. package/lib/module/shared/providers/screen/gestures/ownership/resolve-ownership.js +12 -0
  274. package/lib/module/shared/providers/screen/gestures/ownership/resolve-ownership.js.map +1 -1
  275. package/lib/module/shared/providers/screen/gestures/ownership/use-walk-up-and-register-shadowing-claims.js +69 -56
  276. package/lib/module/shared/providers/screen/gestures/ownership/use-walk-up-and-register-shadowing-claims.js.map +1 -1
  277. package/lib/module/shared/providers/screen/gestures/{builders/use-build-pan-gesture.js → pan/build-pan-gesture.js} +3 -3
  278. package/lib/module/shared/providers/screen/gestures/pan/build-pan-gesture.js.map +1 -0
  279. package/lib/module/shared/providers/screen/gestures/pan/pan-activation-decision.js +205 -0
  280. package/lib/module/shared/providers/screen/gestures/pan/pan-activation-decision.js.map +1 -0
  281. package/lib/module/shared/providers/screen/gestures/{helpers/gesture-activation.js → pan/pan-activation-rules.js} +129 -119
  282. package/lib/module/shared/providers/screen/gestures/pan/pan-activation-rules.js.map +1 -0
  283. package/lib/module/shared/providers/screen/gestures/pan/pan-activation.js +89 -0
  284. package/lib/module/shared/providers/screen/gestures/pan/pan-activation.js.map +1 -0
  285. package/lib/module/shared/providers/screen/gestures/{helpers/pan-phases.js → pan/pan-lifecycle.js} +27 -26
  286. package/lib/module/shared/providers/screen/gestures/pan/pan-lifecycle.js.map +1 -0
  287. package/lib/module/shared/providers/screen/gestures/pan/pan-release.js +185 -0
  288. package/lib/module/shared/providers/screen/gestures/pan/pan-release.js.map +1 -0
  289. package/lib/module/shared/providers/screen/gestures/pan/pan-reset.js +47 -0
  290. package/lib/module/shared/providers/screen/gestures/pan/pan-reset.js.map +1 -0
  291. package/lib/module/shared/providers/screen/gestures/{behaviors → pan}/use-pan-behavior.js +8 -19
  292. package/lib/module/shared/providers/screen/gestures/pan/use-pan-behavior.js.map +1 -0
  293. package/lib/module/shared/providers/screen/gestures/{builders/use-build-pinch-gesture.js → pinch/build-pinch-gesture.js} +3 -3
  294. package/lib/module/shared/providers/screen/gestures/pinch/build-pinch-gesture.js.map +1 -0
  295. package/lib/module/shared/providers/screen/gestures/{activation/use-pinch-activation.js → pinch/pinch-activation.js} +2 -2
  296. package/lib/module/shared/providers/screen/gestures/pinch/pinch-activation.js.map +1 -0
  297. package/lib/module/shared/providers/screen/gestures/{helpers/pinch-phases.js → pinch/pinch-lifecycle.js} +9 -4
  298. package/lib/module/shared/providers/screen/gestures/pinch/pinch-lifecycle.js.map +1 -0
  299. package/lib/module/shared/providers/screen/gestures/pinch/pinch-release.js +126 -0
  300. package/lib/module/shared/providers/screen/gestures/pinch/pinch-release.js.map +1 -0
  301. package/lib/module/shared/providers/screen/gestures/pinch/pinch-reset.js +40 -0
  302. package/lib/module/shared/providers/screen/gestures/pinch/pinch-reset.js.map +1 -0
  303. package/lib/module/shared/providers/screen/gestures/{behaviors → pinch}/use-pinch-behavior.js +8 -19
  304. package/lib/module/shared/providers/screen/gestures/pinch/use-pinch-behavior.js.map +1 -0
  305. package/lib/module/shared/providers/screen/gestures/scroll-coordination/index.js.map +1 -0
  306. package/lib/module/shared/providers/screen/gestures/scroll-coordination/update-scroll-gesture-state.js.map +1 -0
  307. package/lib/module/shared/providers/screen/gestures/{hooks/use-scroll-gesture-coordination → scroll-coordination}/use-scroll-gesture-coordination.js +4 -4
  308. package/lib/module/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.js.map +1 -0
  309. package/lib/module/shared/providers/screen/gestures/{hooks/use-scroll-gesture-coordination → scroll-coordination}/walk-up-scroll-gesture-coordination.js +20 -9
  310. package/lib/module/shared/providers/screen/gestures/scroll-coordination/walk-up-scroll-gesture-coordination.js.map +1 -0
  311. package/lib/module/shared/providers/screen/gestures/{helpers/walk-gesture-ancestors.js → shared/ancestors.js} +1 -1
  312. package/lib/module/shared/providers/screen/gestures/shared/ancestors.js.map +1 -0
  313. package/lib/module/shared/providers/screen/gestures/{helpers/gesture-directions.js → shared/directions.js} +1 -1
  314. package/lib/module/shared/providers/screen/gestures/shared/directions.js.map +1 -0
  315. package/lib/module/shared/providers/screen/gestures/{helpers/gesture-physics.js → shared/physics.js} +76 -66
  316. package/lib/module/shared/providers/screen/gestures/shared/physics.js.map +1 -0
  317. package/lib/module/shared/providers/screen/gestures/shared/policy.js +218 -0
  318. package/lib/module/shared/providers/screen/gestures/shared/policy.js.map +1 -0
  319. package/lib/module/shared/providers/screen/gestures/shared/release.js +30 -0
  320. package/lib/module/shared/providers/screen/gestures/shared/release.js.map +1 -0
  321. package/lib/module/shared/providers/screen/gestures/shared/reset.js +58 -0
  322. package/lib/module/shared/providers/screen/gestures/shared/reset.js.map +1 -0
  323. package/lib/module/shared/providers/screen/gestures/shared/runtime.js +37 -0
  324. package/lib/module/shared/providers/screen/gestures/shared/runtime.js.map +1 -0
  325. package/lib/module/shared/providers/screen/gestures/shared/snap-points.js +174 -0
  326. package/lib/module/shared/providers/screen/gestures/shared/snap-points.js.map +1 -0
  327. package/lib/module/shared/providers/screen/gestures/shared/targets.js +116 -0
  328. package/lib/module/shared/providers/screen/gestures/shared/targets.js.map +1 -0
  329. package/lib/module/shared/providers/screen/gestures/types.js +1 -1
  330. package/lib/module/shared/providers/screen/gestures/types.js.map +1 -1
  331. package/lib/module/shared/providers/screen/options/helpers.js +70 -20
  332. package/lib/module/shared/providers/screen/options/helpers.js.map +1 -1
  333. package/lib/module/shared/providers/screen/styles/helpers/preserve-animated-props-only.js +21 -0
  334. package/lib/module/shared/providers/screen/styles/helpers/preserve-animated-props-only.js.map +1 -0
  335. package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js +110 -0
  336. package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js.map +1 -1
  337. package/lib/module/shared/providers/screen/styles/helpers/visibility-gate.js +39 -0
  338. package/lib/module/shared/providers/screen/styles/helpers/visibility-gate.js.map +1 -0
  339. package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +36 -16
  340. package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
  341. package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +35 -14
  342. package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
  343. package/lib/module/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js +10 -4
  344. package/lib/module/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js.map +1 -1
  345. package/lib/module/shared/stores/animation.store.js +3 -7
  346. package/lib/module/shared/stores/animation.store.js.map +1 -1
  347. package/lib/module/shared/stores/bounds/helpers/entries.helpers.js +2 -12
  348. package/lib/module/shared/stores/bounds/helpers/entries.helpers.js.map +1 -1
  349. package/lib/module/shared/stores/bounds/helpers/link.helpers.js +1 -1
  350. package/lib/module/shared/stores/bounds/helpers/link.helpers.js.map +1 -1
  351. package/lib/module/shared/stores/bounds/helpers/matching.js +1 -9
  352. package/lib/module/shared/stores/bounds/helpers/matching.js.map +1 -1
  353. package/lib/module/shared/stores/bounds/index.js +2 -4
  354. package/lib/module/shared/stores/bounds/index.js.map +1 -1
  355. package/lib/module/shared/stores/bounds/internals/clear.js +2 -21
  356. package/lib/module/shared/stores/bounds/internals/clear.js.map +1 -1
  357. package/lib/module/shared/stores/bounds/internals/links.js +2 -8
  358. package/lib/module/shared/stores/bounds/internals/links.js.map +1 -1
  359. package/lib/module/shared/stores/system.store.js +3 -0
  360. package/lib/module/shared/stores/system.store.js.map +1 -1
  361. package/lib/module/shared/types/animation.types.js.map +1 -1
  362. package/lib/module/shared/types/gesture.types.js.map +1 -1
  363. package/lib/module/shared/utils/animation/animate-to-progress.js +19 -18
  364. package/lib/module/shared/utils/animation/animate-to-progress.js.map +1 -1
  365. package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
  366. package/lib/module/shared/utils/bounds/navigation/math.js +2 -16
  367. package/lib/module/shared/utils/bounds/navigation/math.js.map +1 -1
  368. package/lib/module/shared/utils/bounds/navigation/reveal/build.js +192 -77
  369. package/lib/module/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
  370. package/lib/module/shared/utils/bounds/navigation/reveal/config.js +7 -16
  371. package/lib/module/shared/utils/bounds/navigation/reveal/config.js.map +1 -1
  372. package/lib/module/shared/utils/bounds/navigation/zoom/build.js +81 -19
  373. package/lib/module/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
  374. package/lib/module/shared/utils/bounds/navigation/zoom/config.js +1 -1
  375. package/lib/module/shared/utils/bounds/navigation/zoom/config.js.map +1 -1
  376. package/lib/module/shared/utils/bounds/navigation/zoom/math.js +4 -5
  377. package/lib/module/shared/utils/bounds/navigation/zoom/math.js.map +1 -1
  378. package/lib/module/shared/utils/gesture-progress-mode.js +42 -0
  379. package/lib/module/shared/utils/gesture-progress-mode.js.map +1 -0
  380. package/lib/module/shared/utils/resolve-chain-target.js +9 -16
  381. package/lib/module/shared/utils/resolve-chain-target.js.map +1 -1
  382. package/lib/module/shared/utils/resolve-screen-transition-options.js +1 -1
  383. package/lib/module/shared/utils/resolve-screen-transition-options.js.map +1 -1
  384. package/lib/typescript/shared/components/create-boundary-component/create-boundary-component.d.ts.map +1 -1
  385. package/lib/typescript/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.d.ts +0 -3
  386. package/lib/typescript/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.d.ts.map +1 -1
  387. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts +5 -0
  388. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts.map +1 -1
  389. package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-presence.d.ts +0 -3
  390. package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-presence.d.ts.map +1 -1
  391. package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.d.ts +2 -1
  392. package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.d.ts.map +1 -1
  393. package/lib/typescript/shared/components/create-boundary-component/hooks/use-measurer.d.ts +1 -4
  394. package/lib/typescript/shared/components/create-boundary-component/hooks/use-measurer.d.ts.map +1 -1
  395. package/lib/typescript/shared/components/screen-container/helpers/find-collapse-target.d.ts.map +1 -1
  396. package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -1
  397. package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts.map +1 -1
  398. package/lib/typescript/shared/components/screen-container/layers/surface-container.d.ts.map +1 -1
  399. package/lib/typescript/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.d.ts +1 -1
  400. package/lib/typescript/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.d.ts.map +1 -1
  401. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition-intent.d.ts.map +1 -1
  402. package/lib/typescript/shared/constants.d.ts +11 -3
  403. package/lib/typescript/shared/constants.d.ts.map +1 -1
  404. package/lib/typescript/shared/index.d.ts +3 -3
  405. package/lib/typescript/shared/index.d.ts.map +1 -1
  406. package/lib/typescript/shared/providers/register-bounds.provider.d.ts.map +1 -1
  407. package/lib/typescript/shared/providers/screen/animation/animation.provider.d.ts +4 -1
  408. package/lib/typescript/shared/providers/screen/animation/animation.provider.d.ts.map +1 -1
  409. package/lib/typescript/shared/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.d.ts +2 -0
  410. package/lib/typescript/shared/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.d.ts.map +1 -0
  411. package/lib/typescript/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.d.ts +6 -0
  412. package/lib/typescript/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.d.ts.map +1 -0
  413. package/lib/typescript/shared/providers/screen/animation/helpers/build-screen-transition-options.d.ts.map +1 -1
  414. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.d.ts +5 -0
  415. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.d.ts.map +1 -0
  416. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts +6 -0
  417. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts.map +1 -0
  418. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/settle.d.ts +5 -0
  419. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/settle.d.ts.map +1 -0
  420. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/snap-points.d.ts +5 -0
  421. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/snap-points.d.ts.map +1 -0
  422. package/lib/typescript/shared/providers/screen/animation/helpers/{hydrate-transition-state.d.ts → hydrate-transition-state/types.d.ts} +15 -16
  423. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/types.d.ts.map +1 -0
  424. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts +4 -4
  425. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
  426. package/lib/typescript/shared/providers/screen/animation/helpers/selected-interpolator-options.d.ts +9 -0
  427. package/lib/typescript/shared/providers/screen/animation/helpers/selected-interpolator-options.d.ts.map +1 -0
  428. package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts +2 -3
  429. package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts.map +1 -1
  430. package/lib/typescript/shared/providers/screen/animation/types.d.ts +19 -4
  431. package/lib/typescript/shared/providers/screen/animation/types.d.ts.map +1 -1
  432. package/lib/typescript/shared/providers/screen/animation/use-screen-animation.d.ts +9 -3
  433. package/lib/typescript/shared/providers/screen/animation/use-screen-animation.d.ts.map +1 -1
  434. package/lib/typescript/shared/providers/screen/descriptors/descriptors.provider.d.ts.map +1 -1
  435. package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.d.ts +1 -6
  436. package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.d.ts.map +1 -1
  437. package/lib/typescript/shared/providers/screen/gestures/gestures.provider.d.ts.map +1 -1
  438. package/lib/typescript/shared/providers/screen/gestures/hooks/use-gesture-builder-state.d.ts +2 -2
  439. package/lib/typescript/shared/providers/screen/gestures/hooks/use-gesture-builder-state.d.ts.map +1 -1
  440. package/lib/typescript/shared/providers/screen/gestures/hooks/use-screen-gesture-config.d.ts.map +1 -1
  441. package/lib/typescript/shared/providers/screen/gestures/hooks/use-screen-gesture.d.ts.map +1 -1
  442. package/lib/typescript/shared/providers/screen/gestures/hooks/use-stable-runtime-config.d.ts +3 -5
  443. package/lib/typescript/shared/providers/screen/gestures/hooks/use-stable-runtime-config.d.ts.map +1 -1
  444. package/lib/typescript/shared/providers/screen/gestures/ownership/compute-claimed-directions.d.ts.map +1 -1
  445. package/lib/typescript/shared/providers/screen/gestures/ownership/resolve-ownership.d.ts +5 -0
  446. package/lib/typescript/shared/providers/screen/gestures/ownership/resolve-ownership.d.ts.map +1 -1
  447. package/lib/typescript/shared/providers/screen/gestures/ownership/use-walk-up-and-register-shadowing-claims.d.ts.map +1 -1
  448. package/lib/typescript/shared/providers/screen/gestures/{builders/use-build-pan-gesture.d.ts → pan/build-pan-gesture.d.ts} +1 -1
  449. package/lib/typescript/shared/providers/screen/gestures/pan/build-pan-gesture.d.ts.map +1 -0
  450. package/lib/typescript/shared/providers/screen/gestures/pan/pan-activation-decision.d.ts +29 -0
  451. package/lib/typescript/shared/providers/screen/gestures/pan/pan-activation-decision.d.ts.map +1 -0
  452. package/lib/typescript/shared/providers/screen/gestures/{helpers/gesture-activation.d.ts → pan/pan-activation-rules.d.ts} +12 -11
  453. package/lib/typescript/shared/providers/screen/gestures/pan/pan-activation-rules.d.ts.map +1 -0
  454. package/lib/typescript/shared/providers/screen/gestures/{activation/use-pan-activation.d.ts → pan/pan-activation.d.ts} +1 -1
  455. package/lib/typescript/shared/providers/screen/gestures/pan/pan-activation.d.ts.map +1 -0
  456. package/lib/typescript/shared/providers/screen/gestures/{helpers/pan-phases.d.ts → pan/pan-lifecycle.d.ts} +1 -1
  457. package/lib/typescript/shared/providers/screen/gestures/pan/pan-lifecycle.d.ts.map +1 -0
  458. package/lib/typescript/shared/providers/screen/gestures/pan/pan-release.d.ts +6 -0
  459. package/lib/typescript/shared/providers/screen/gestures/pan/pan-release.d.ts.map +1 -0
  460. package/lib/typescript/shared/providers/screen/gestures/pan/pan-reset.d.ts +17 -0
  461. package/lib/typescript/shared/providers/screen/gestures/pan/pan-reset.d.ts.map +1 -0
  462. package/lib/typescript/shared/providers/screen/gestures/pan/use-pan-behavior.d.ts.map +1 -0
  463. package/lib/typescript/shared/providers/screen/gestures/{builders/use-build-pinch-gesture.d.ts → pinch/build-pinch-gesture.d.ts} +1 -1
  464. package/lib/typescript/shared/providers/screen/gestures/pinch/build-pinch-gesture.d.ts.map +1 -0
  465. package/lib/typescript/shared/providers/screen/gestures/{activation/use-pinch-activation.d.ts → pinch/pinch-activation.d.ts} +1 -1
  466. package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-activation.d.ts.map +1 -0
  467. package/lib/typescript/shared/providers/screen/gestures/{helpers/pinch-phases.d.ts → pinch/pinch-lifecycle.d.ts} +1 -1
  468. package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-lifecycle.d.ts.map +1 -0
  469. package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-release.d.ts +5 -0
  470. package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-release.d.ts.map +1 -0
  471. package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-reset.d.ts +11 -0
  472. package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-reset.d.ts.map +1 -0
  473. package/lib/typescript/shared/providers/screen/gestures/pinch/use-pinch-behavior.d.ts.map +1 -0
  474. package/lib/typescript/shared/providers/screen/gestures/scroll-coordination/index.d.ts.map +1 -0
  475. package/lib/typescript/shared/providers/screen/gestures/{hooks/use-scroll-gesture-coordination → scroll-coordination}/update-scroll-gesture-state.d.ts +1 -1
  476. package/lib/typescript/shared/providers/screen/gestures/scroll-coordination/update-scroll-gesture-state.d.ts.map +1 -0
  477. package/lib/typescript/shared/providers/screen/gestures/{hooks/use-scroll-gesture-coordination → scroll-coordination}/use-scroll-gesture-coordination.d.ts +1 -1
  478. package/lib/typescript/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.d.ts.map +1 -0
  479. package/lib/typescript/shared/providers/screen/gestures/{hooks/use-scroll-gesture-coordination → scroll-coordination}/walk-up-scroll-gesture-coordination.d.ts +1 -1
  480. package/lib/typescript/shared/providers/screen/gestures/scroll-coordination/walk-up-scroll-gesture-coordination.d.ts.map +1 -0
  481. package/lib/typescript/shared/providers/screen/gestures/{helpers/walk-gesture-ancestors.d.ts → shared/ancestors.d.ts} +1 -1
  482. package/lib/typescript/shared/providers/screen/gestures/shared/ancestors.d.ts.map +1 -0
  483. package/lib/typescript/shared/providers/screen/gestures/{helpers/gesture-directions.d.ts → shared/directions.d.ts} +1 -1
  484. package/lib/typescript/shared/providers/screen/gestures/shared/directions.d.ts.map +1 -0
  485. package/lib/typescript/shared/providers/screen/gestures/{helpers/gesture-physics.d.ts → shared/physics.d.ts} +4 -10
  486. package/lib/typescript/shared/providers/screen/gestures/shared/physics.d.ts.map +1 -0
  487. package/lib/typescript/shared/providers/screen/gestures/shared/policy.d.ts +49 -0
  488. package/lib/typescript/shared/providers/screen/gestures/shared/policy.d.ts.map +1 -0
  489. package/lib/typescript/shared/providers/screen/gestures/shared/release.d.ts +13 -0
  490. package/lib/typescript/shared/providers/screen/gestures/shared/release.d.ts.map +1 -0
  491. package/lib/typescript/shared/providers/screen/gestures/shared/reset.d.ts +7 -0
  492. package/lib/typescript/shared/providers/screen/gestures/shared/reset.d.ts.map +1 -0
  493. package/lib/typescript/shared/providers/screen/gestures/shared/runtime.d.ts +5 -0
  494. package/lib/typescript/shared/providers/screen/gestures/shared/runtime.d.ts.map +1 -0
  495. package/lib/typescript/shared/providers/screen/gestures/shared/snap-points.d.ts +37 -0
  496. package/lib/typescript/shared/providers/screen/gestures/shared/snap-points.d.ts.map +1 -0
  497. package/lib/typescript/shared/providers/screen/gestures/{helpers/gesture-targets.d.ts → shared/targets.d.ts} +1 -1
  498. package/lib/typescript/shared/providers/screen/gestures/shared/targets.d.ts.map +1 -0
  499. package/lib/typescript/shared/providers/screen/gestures/types.d.ts +30 -29
  500. package/lib/typescript/shared/providers/screen/gestures/types.d.ts.map +1 -1
  501. package/lib/typescript/shared/providers/screen/options/helpers.d.ts.map +1 -1
  502. package/lib/typescript/shared/providers/screen/options/types.d.ts +1 -0
  503. package/lib/typescript/shared/providers/screen/options/types.d.ts.map +1 -1
  504. package/lib/typescript/shared/providers/screen/styles/helpers/preserve-animated-props-only.d.ts +3 -0
  505. package/lib/typescript/shared/providers/screen/styles/helpers/preserve-animated-props-only.d.ts.map +1 -0
  506. package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/index.d.ts +4 -0
  507. package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/index.d.ts.map +1 -1
  508. package/lib/typescript/shared/providers/screen/styles/helpers/visibility-gate.d.ts +17 -0
  509. package/lib/typescript/shared/providers/screen/styles/helpers/visibility-gate.d.ts.map +1 -0
  510. package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts +4 -4
  511. package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -1
  512. package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts.map +1 -1
  513. package/lib/typescript/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.d.ts.map +1 -1
  514. package/lib/typescript/shared/stores/animation.store.d.ts +1 -3
  515. package/lib/typescript/shared/stores/animation.store.d.ts.map +1 -1
  516. package/lib/typescript/shared/stores/bounds/helpers/entries.helpers.d.ts.map +1 -1
  517. package/lib/typescript/shared/stores/bounds/helpers/link.helpers.d.ts +0 -2
  518. package/lib/typescript/shared/stores/bounds/helpers/link.helpers.d.ts.map +1 -1
  519. package/lib/typescript/shared/stores/bounds/helpers/matching.d.ts +1 -2
  520. package/lib/typescript/shared/stores/bounds/helpers/matching.d.ts.map +1 -1
  521. package/lib/typescript/shared/stores/bounds/index.d.ts +1 -3
  522. package/lib/typescript/shared/stores/bounds/index.d.ts.map +1 -1
  523. package/lib/typescript/shared/stores/bounds/internals/clear.d.ts +2 -4
  524. package/lib/typescript/shared/stores/bounds/internals/clear.d.ts.map +1 -1
  525. package/lib/typescript/shared/stores/bounds/internals/links.d.ts +3 -3
  526. package/lib/typescript/shared/stores/bounds/internals/links.d.ts.map +1 -1
  527. package/lib/typescript/shared/stores/bounds/types.d.ts +2 -11
  528. package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
  529. package/lib/typescript/shared/stores/system.store.d.ts +4 -0
  530. package/lib/typescript/shared/stores/system.store.d.ts.map +1 -1
  531. package/lib/typescript/shared/types/animation.types.d.ts +25 -1
  532. package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
  533. package/lib/typescript/shared/types/bounds.types.d.ts +1 -1
  534. package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
  535. package/lib/typescript/shared/types/gesture.types.d.ts +1 -0
  536. package/lib/typescript/shared/types/gesture.types.d.ts.map +1 -1
  537. package/lib/typescript/shared/types/index.d.ts +1 -1
  538. package/lib/typescript/shared/types/index.d.ts.map +1 -1
  539. package/lib/typescript/shared/types/screen.types.d.ts +8 -1
  540. package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
  541. package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts.map +1 -1
  542. package/lib/typescript/shared/utils/bounds/helpers/create-bounds-accessor-core.d.ts.map +1 -1
  543. package/lib/typescript/shared/utils/bounds/helpers/create-interpolators.d.ts +2 -2
  544. package/lib/typescript/shared/utils/bounds/helpers/create-interpolators.d.ts.map +1 -1
  545. package/lib/typescript/shared/utils/bounds/helpers/create-link-accessor.d.ts +2 -3
  546. package/lib/typescript/shared/utils/bounds/helpers/create-link-accessor.d.ts.map +1 -1
  547. package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts +2 -2
  548. package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts.map +1 -1
  549. package/lib/typescript/shared/utils/bounds/navigation/math.d.ts.map +1 -1
  550. package/lib/typescript/shared/utils/bounds/navigation/reveal/build.d.ts.map +1 -1
  551. package/lib/typescript/shared/utils/bounds/navigation/reveal/config.d.ts +7 -16
  552. package/lib/typescript/shared/utils/bounds/navigation/reveal/config.d.ts.map +1 -1
  553. package/lib/typescript/shared/utils/bounds/navigation/zoom/build.d.ts.map +1 -1
  554. package/lib/typescript/shared/utils/bounds/navigation/zoom/config.d.ts +1 -1
  555. package/lib/typescript/shared/utils/bounds/navigation/zoom/config.d.ts.map +1 -1
  556. package/lib/typescript/shared/utils/bounds/navigation/zoom/math.d.ts +2 -3
  557. package/lib/typescript/shared/utils/bounds/navigation/zoom/math.d.ts.map +1 -1
  558. package/lib/typescript/shared/utils/gesture-progress-mode.d.ts +14 -0
  559. package/lib/typescript/shared/utils/gesture-progress-mode.d.ts.map +1 -0
  560. package/lib/typescript/shared/utils/resolve-chain-target.d.ts +2 -2
  561. package/lib/typescript/shared/utils/resolve-chain-target.d.ts.map +1 -1
  562. package/lib/typescript/shared/utils/resolve-screen-transition-options.d.ts +0 -1
  563. package/lib/typescript/shared/utils/resolve-screen-transition-options.d.ts.map +1 -1
  564. package/package.json +5 -2
  565. package/src/shared/components/create-boundary-component/create-boundary-component.tsx +9 -14
  566. package/src/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.ts +0 -18
  567. package/src/shared/components/create-boundary-component/hooks/helpers/measurement-rules.ts +11 -0
  568. package/src/shared/components/create-boundary-component/hooks/use-boundary-presence.ts +2 -27
  569. package/src/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.ts +13 -4
  570. package/src/shared/components/create-boundary-component/hooks/use-measurer.ts +0 -12
  571. package/src/shared/components/create-boundary-component/hooks/use-refresh-boundary.ts +1 -1
  572. package/src/shared/components/create-transition-aware-component.tsx +1 -1
  573. package/src/shared/components/screen-container/helpers/find-collapse-target.ts +18 -7
  574. package/src/shared/components/screen-container/hooks/use-content-layout.ts +1 -1
  575. package/src/shared/components/screen-container/layers/backdrop.tsx +11 -5
  576. package/src/shared/components/screen-container/layers/maybe-masked-navigation-container.tsx +30 -15
  577. package/src/shared/components/screen-container/layers/surface-container.tsx +35 -15
  578. package/src/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.ts +3 -23
  579. package/src/shared/components/screen-lifecycle/hooks/use-close-transition-intent.ts +1 -4
  580. package/src/shared/components/screen-lifecycle/hooks/use-open-transition-intent.ts +1 -1
  581. package/src/shared/configs/presets.ts +3 -3
  582. package/src/shared/constants.ts +17 -3
  583. package/src/shared/index.ts +3 -0
  584. package/src/shared/providers/register-bounds.provider.tsx +10 -11
  585. package/src/shared/providers/screen/animation/animation.provider.tsx +169 -17
  586. package/src/shared/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.tsx +13 -0
  587. package/src/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.ts +158 -0
  588. package/src/shared/providers/screen/animation/helpers/build-screen-transition-options.ts +17 -1
  589. package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.ts +164 -0
  590. package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/index.ts +160 -0
  591. package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/settle.ts +41 -0
  592. package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/snap-points.ts +188 -0
  593. package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/types.ts +40 -0
  594. package/src/shared/providers/screen/animation/helpers/pipeline.ts +44 -25
  595. package/src/shared/providers/screen/animation/helpers/selected-interpolator-options.ts +99 -0
  596. package/src/shared/providers/screen/animation/helpers/use-build-transition-state.ts +7 -6
  597. package/src/shared/providers/screen/animation/types.ts +34 -4
  598. package/src/shared/providers/screen/animation/use-screen-animation.tsx +88 -33
  599. package/src/shared/providers/screen/descriptors/descriptors.provider.tsx +1 -7
  600. package/src/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.ts +0 -19
  601. package/src/shared/providers/screen/gestures/gestures.provider.tsx +5 -4
  602. package/src/shared/providers/screen/gestures/hooks/use-gesture-builder-state.ts +6 -10
  603. package/src/shared/providers/screen/gestures/hooks/use-gesture-sensitivity.ts +1 -1
  604. package/src/shared/providers/screen/gestures/hooks/use-screen-gesture-config.ts +11 -147
  605. package/src/shared/providers/screen/gestures/hooks/use-screen-gesture.ts +1 -5
  606. package/src/shared/providers/screen/gestures/hooks/use-stable-runtime-config.ts +11 -19
  607. package/src/shared/providers/screen/gestures/ownership/compute-claimed-directions.ts +52 -40
  608. package/src/shared/providers/screen/gestures/ownership/resolve-ownership.ts +15 -0
  609. package/src/shared/providers/screen/gestures/ownership/use-walk-up-and-register-shadowing-claims.ts +83 -47
  610. package/src/shared/providers/screen/gestures/{builders/use-build-pan-gesture.ts → pan/build-pan-gesture.ts} +2 -2
  611. package/src/shared/providers/screen/gestures/pan/pan-activation-decision.ts +458 -0
  612. package/src/shared/providers/screen/gestures/{helpers/gesture-activation.ts → pan/pan-activation-rules.ts} +208 -147
  613. package/src/shared/providers/screen/gestures/pan/pan-activation.ts +132 -0
  614. package/src/shared/providers/screen/gestures/{helpers/pan-phases.ts → pan/pan-lifecycle.ts} +27 -22
  615. package/src/shared/providers/screen/gestures/pan/pan-release.ts +246 -0
  616. package/src/shared/providers/screen/gestures/pan/pan-reset.ts +92 -0
  617. package/src/shared/providers/screen/gestures/{behaviors → pan}/use-pan-behavior.ts +19 -30
  618. package/src/shared/providers/screen/gestures/{builders/use-build-pinch-gesture.ts → pinch/build-pinch-gesture.ts} +2 -2
  619. package/src/shared/providers/screen/gestures/{activation/use-pinch-activation.ts → pinch/pinch-activation.ts} +1 -1
  620. package/src/shared/providers/screen/gestures/{helpers/pinch-phases.ts → pinch/pinch-lifecycle.ts} +8 -2
  621. package/src/shared/providers/screen/gestures/pinch/pinch-release.ts +183 -0
  622. package/src/shared/providers/screen/gestures/pinch/pinch-reset.ts +65 -0
  623. package/src/shared/providers/screen/gestures/{behaviors → pinch}/use-pinch-behavior.ts +19 -36
  624. package/src/shared/providers/screen/gestures/{hooks/use-scroll-gesture-coordination → scroll-coordination}/update-scroll-gesture-state.ts +1 -1
  625. package/src/shared/providers/screen/gestures/{hooks/use-scroll-gesture-coordination → scroll-coordination}/use-scroll-gesture-coordination.ts +5 -5
  626. package/src/shared/providers/screen/gestures/{hooks/use-scroll-gesture-coordination → scroll-coordination}/walk-up-scroll-gesture-coordination.ts +42 -26
  627. package/src/shared/providers/screen/gestures/{helpers/gesture-physics.ts → shared/physics.ts} +147 -112
  628. package/src/shared/providers/screen/gestures/shared/policy.ts +346 -0
  629. package/src/shared/providers/screen/gestures/shared/release.ts +43 -0
  630. package/src/shared/providers/screen/gestures/shared/reset.ts +74 -0
  631. package/src/shared/providers/screen/gestures/shared/runtime.ts +76 -0
  632. package/src/shared/providers/screen/gestures/shared/snap-points.ts +250 -0
  633. package/src/shared/providers/screen/gestures/shared/targets.ts +202 -0
  634. package/src/shared/providers/screen/gestures/types.ts +38 -44
  635. package/src/shared/providers/screen/options/helpers.ts +169 -58
  636. package/src/shared/providers/screen/options/types.ts +1 -0
  637. package/src/shared/providers/screen/styles/helpers/preserve-animated-props-only.ts +22 -0
  638. package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/index.ts +154 -0
  639. package/src/shared/providers/screen/styles/helpers/visibility-gate.ts +57 -0
  640. package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +48 -18
  641. package/src/shared/providers/screen/styles/hooks/use-maybe-block-visibility.tsx +36 -17
  642. package/src/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.tsx +11 -3
  643. package/src/shared/stores/animation.store.ts +3 -9
  644. package/src/shared/stores/bounds/helpers/entries.helpers.ts +2 -21
  645. package/src/shared/stores/bounds/helpers/link.helpers.ts +3 -7
  646. package/src/shared/stores/bounds/helpers/matching.ts +2 -16
  647. package/src/shared/stores/bounds/index.ts +1 -3
  648. package/src/shared/stores/bounds/internals/clear.ts +3 -42
  649. package/src/shared/stores/bounds/internals/links.ts +1 -13
  650. package/src/shared/stores/bounds/types.ts +2 -11
  651. package/src/shared/stores/system.store.ts +8 -0
  652. package/src/shared/types/animation.types.ts +31 -0
  653. package/src/shared/types/bounds.types.ts +4 -1
  654. package/src/shared/types/gesture.types.ts +2 -0
  655. package/src/shared/types/index.ts +3 -0
  656. package/src/shared/types/screen.types.ts +13 -1
  657. package/src/shared/utils/animation/animate-to-progress.ts +25 -17
  658. package/src/shared/utils/bounds/helpers/create-bounds-accessor-core.ts +1 -0
  659. package/src/shared/utils/bounds/helpers/create-interpolators.ts +2 -2
  660. package/src/shared/utils/bounds/helpers/create-link-accessor.ts +2 -2
  661. package/src/shared/utils/bounds/helpers/prepare-bound-styles.ts +3 -3
  662. package/src/shared/utils/bounds/navigation/math.ts +2 -18
  663. package/src/shared/utils/bounds/navigation/reveal/build.ts +357 -118
  664. package/src/shared/utils/bounds/navigation/reveal/config.ts +7 -18
  665. package/src/shared/utils/bounds/navigation/zoom/build.ts +124 -20
  666. package/src/shared/utils/bounds/navigation/zoom/config.ts +1 -1
  667. package/src/shared/utils/bounds/navigation/zoom/math.ts +5 -7
  668. package/src/shared/utils/gesture-progress-mode.ts +67 -0
  669. package/src/shared/utils/resolve-chain-target.ts +9 -22
  670. package/src/shared/utils/resolve-screen-transition-options.ts +1 -3
  671. package/lib/commonjs/shared/hooks/reanimated/use-animated-debounce.js +0 -43
  672. package/lib/commonjs/shared/hooks/reanimated/use-animated-debounce.js.map +0 -1
  673. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state.js +0 -164
  674. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state.js.map +0 -1
  675. package/lib/commonjs/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js +0 -33
  676. package/lib/commonjs/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js.map +0 -1
  677. package/lib/commonjs/shared/providers/screen/descriptors/helpers/get-ancestor-navigator-keys.js +0 -28
  678. package/lib/commonjs/shared/providers/screen/descriptors/helpers/get-ancestor-navigator-keys.js.map +0 -1
  679. package/lib/commonjs/shared/providers/screen/gestures/activation/use-pan-activation.js +0 -182
  680. package/lib/commonjs/shared/providers/screen/gestures/activation/use-pan-activation.js.map +0 -1
  681. package/lib/commonjs/shared/providers/screen/gestures/activation/use-pinch-activation.js.map +0 -1
  682. package/lib/commonjs/shared/providers/screen/gestures/behaviors/strategies/pan-snap.strategy.js +0 -161
  683. package/lib/commonjs/shared/providers/screen/gestures/behaviors/strategies/pan-snap.strategy.js.map +0 -1
  684. package/lib/commonjs/shared/providers/screen/gestures/behaviors/strategies/pan.strategy.js +0 -78
  685. package/lib/commonjs/shared/providers/screen/gestures/behaviors/strategies/pan.strategy.js.map +0 -1
  686. package/lib/commonjs/shared/providers/screen/gestures/behaviors/strategies/pinch-snap.strategy.js +0 -147
  687. package/lib/commonjs/shared/providers/screen/gestures/behaviors/strategies/pinch-snap.strategy.js.map +0 -1
  688. package/lib/commonjs/shared/providers/screen/gestures/behaviors/strategies/pinch.strategy.js +0 -52
  689. package/lib/commonjs/shared/providers/screen/gestures/behaviors/strategies/pinch.strategy.js.map +0 -1
  690. package/lib/commonjs/shared/providers/screen/gestures/behaviors/use-pan-behavior.js +0 -64
  691. package/lib/commonjs/shared/providers/screen/gestures/behaviors/use-pan-behavior.js.map +0 -1
  692. package/lib/commonjs/shared/providers/screen/gestures/behaviors/use-pinch-behavior.js +0 -64
  693. package/lib/commonjs/shared/providers/screen/gestures/behaviors/use-pinch-behavior.js.map +0 -1
  694. package/lib/commonjs/shared/providers/screen/gestures/builders/use-build-pan-gesture.js.map +0 -1
  695. package/lib/commonjs/shared/providers/screen/gestures/builders/use-build-pinch-gesture.js.map +0 -1
  696. package/lib/commonjs/shared/providers/screen/gestures/helpers/gesture-activation.js.map +0 -1
  697. package/lib/commonjs/shared/providers/screen/gestures/helpers/gesture-directions.js.map +0 -1
  698. package/lib/commonjs/shared/providers/screen/gestures/helpers/gesture-physics.js.map +0 -1
  699. package/lib/commonjs/shared/providers/screen/gestures/helpers/gesture-reset.js +0 -99
  700. package/lib/commonjs/shared/providers/screen/gestures/helpers/gesture-reset.js.map +0 -1
  701. package/lib/commonjs/shared/providers/screen/gestures/helpers/gesture-snap-points.js +0 -43
  702. package/lib/commonjs/shared/providers/screen/gestures/helpers/gesture-snap-points.js.map +0 -1
  703. package/lib/commonjs/shared/providers/screen/gestures/helpers/gesture-targets.js +0 -93
  704. package/lib/commonjs/shared/providers/screen/gestures/helpers/gesture-targets.js.map +0 -1
  705. package/lib/commonjs/shared/providers/screen/gestures/helpers/pan-phases.js.map +0 -1
  706. package/lib/commonjs/shared/providers/screen/gestures/helpers/pinch-phases.js.map +0 -1
  707. package/lib/commonjs/shared/providers/screen/gestures/helpers/resolve-can-track-gesture.js +0 -21
  708. package/lib/commonjs/shared/providers/screen/gestures/helpers/resolve-can-track-gesture.js.map +0 -1
  709. package/lib/commonjs/shared/providers/screen/gestures/helpers/runtime-options.js +0 -134
  710. package/lib/commonjs/shared/providers/screen/gestures/helpers/runtime-options.js.map +0 -1
  711. package/lib/commonjs/shared/providers/screen/gestures/helpers/validate-snap-points.js +0 -56
  712. package/lib/commonjs/shared/providers/screen/gestures/helpers/validate-snap-points.js.map +0 -1
  713. package/lib/commonjs/shared/providers/screen/gestures/helpers/walk-gesture-ancestors.js.map +0 -1
  714. package/lib/commonjs/shared/providers/screen/gestures/hooks/use-scroll-gesture-coordination/index.js.map +0 -1
  715. package/lib/commonjs/shared/providers/screen/gestures/hooks/use-scroll-gesture-coordination/update-scroll-gesture-state.js.map +0 -1
  716. package/lib/commonjs/shared/providers/screen/gestures/hooks/use-scroll-gesture-coordination/use-scroll-gesture-coordination.js.map +0 -1
  717. package/lib/commonjs/shared/providers/screen/gestures/hooks/use-scroll-gesture-coordination/walk-up-scroll-gesture-coordination.js.map +0 -1
  718. package/lib/commonjs/shared/providers/screen/gestures/ownership/should-defer-to-child-claim.js +0 -18
  719. package/lib/commonjs/shared/providers/screen/gestures/ownership/should-defer-to-child-claim.js.map +0 -1
  720. package/lib/commonjs/shared/providers/scroll-settle.provider.js +0 -25
  721. package/lib/commonjs/shared/providers/scroll-settle.provider.js.map +0 -1
  722. package/lib/commonjs/shared/typecheck/public-api.typecheck.js +0 -227
  723. package/lib/commonjs/shared/typecheck/public-api.typecheck.js.map +0 -1
  724. package/lib/module/shared/hooks/reanimated/use-animated-debounce.js +0 -39
  725. package/lib/module/shared/hooks/reanimated/use-animated-debounce.js.map +0 -1
  726. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state.js +0 -158
  727. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state.js.map +0 -1
  728. package/lib/module/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js +0 -29
  729. package/lib/module/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js.map +0 -1
  730. package/lib/module/shared/providers/screen/descriptors/helpers/get-ancestor-navigator-keys.js +0 -24
  731. package/lib/module/shared/providers/screen/descriptors/helpers/get-ancestor-navigator-keys.js.map +0 -1
  732. package/lib/module/shared/providers/screen/gestures/activation/use-pan-activation.js +0 -177
  733. package/lib/module/shared/providers/screen/gestures/activation/use-pan-activation.js.map +0 -1
  734. package/lib/module/shared/providers/screen/gestures/activation/use-pinch-activation.js.map +0 -1
  735. package/lib/module/shared/providers/screen/gestures/behaviors/strategies/pan-snap.strategy.js +0 -157
  736. package/lib/module/shared/providers/screen/gestures/behaviors/strategies/pan-snap.strategy.js.map +0 -1
  737. package/lib/module/shared/providers/screen/gestures/behaviors/strategies/pan.strategy.js +0 -74
  738. package/lib/module/shared/providers/screen/gestures/behaviors/strategies/pan.strategy.js.map +0 -1
  739. package/lib/module/shared/providers/screen/gestures/behaviors/strategies/pinch-snap.strategy.js +0 -143
  740. package/lib/module/shared/providers/screen/gestures/behaviors/strategies/pinch-snap.strategy.js.map +0 -1
  741. package/lib/module/shared/providers/screen/gestures/behaviors/strategies/pinch.strategy.js +0 -48
  742. package/lib/module/shared/providers/screen/gestures/behaviors/strategies/pinch.strategy.js.map +0 -1
  743. package/lib/module/shared/providers/screen/gestures/behaviors/use-pan-behavior.js.map +0 -1
  744. package/lib/module/shared/providers/screen/gestures/behaviors/use-pinch-behavior.js.map +0 -1
  745. package/lib/module/shared/providers/screen/gestures/builders/use-build-pan-gesture.js.map +0 -1
  746. package/lib/module/shared/providers/screen/gestures/builders/use-build-pinch-gesture.js.map +0 -1
  747. package/lib/module/shared/providers/screen/gestures/helpers/gesture-activation.js.map +0 -1
  748. package/lib/module/shared/providers/screen/gestures/helpers/gesture-directions.js.map +0 -1
  749. package/lib/module/shared/providers/screen/gestures/helpers/gesture-physics.js.map +0 -1
  750. package/lib/module/shared/providers/screen/gestures/helpers/gesture-reset.js +0 -93
  751. package/lib/module/shared/providers/screen/gestures/helpers/gesture-reset.js.map +0 -1
  752. package/lib/module/shared/providers/screen/gestures/helpers/gesture-snap-points.js +0 -37
  753. package/lib/module/shared/providers/screen/gestures/helpers/gesture-snap-points.js.map +0 -1
  754. package/lib/module/shared/providers/screen/gestures/helpers/gesture-targets.js +0 -87
  755. package/lib/module/shared/providers/screen/gestures/helpers/gesture-targets.js.map +0 -1
  756. package/lib/module/shared/providers/screen/gestures/helpers/pan-phases.js.map +0 -1
  757. package/lib/module/shared/providers/screen/gestures/helpers/pinch-phases.js.map +0 -1
  758. package/lib/module/shared/providers/screen/gestures/helpers/resolve-can-track-gesture.js +0 -17
  759. package/lib/module/shared/providers/screen/gestures/helpers/resolve-can-track-gesture.js.map +0 -1
  760. package/lib/module/shared/providers/screen/gestures/helpers/runtime-options.js +0 -124
  761. package/lib/module/shared/providers/screen/gestures/helpers/runtime-options.js.map +0 -1
  762. package/lib/module/shared/providers/screen/gestures/helpers/validate-snap-points.js +0 -50
  763. package/lib/module/shared/providers/screen/gestures/helpers/validate-snap-points.js.map +0 -1
  764. package/lib/module/shared/providers/screen/gestures/helpers/walk-gesture-ancestors.js.map +0 -1
  765. package/lib/module/shared/providers/screen/gestures/hooks/use-scroll-gesture-coordination/index.js.map +0 -1
  766. package/lib/module/shared/providers/screen/gestures/hooks/use-scroll-gesture-coordination/update-scroll-gesture-state.js.map +0 -1
  767. package/lib/module/shared/providers/screen/gestures/hooks/use-scroll-gesture-coordination/use-scroll-gesture-coordination.js.map +0 -1
  768. package/lib/module/shared/providers/screen/gestures/hooks/use-scroll-gesture-coordination/walk-up-scroll-gesture-coordination.js.map +0 -1
  769. package/lib/module/shared/providers/screen/gestures/ownership/should-defer-to-child-claim.js +0 -14
  770. package/lib/module/shared/providers/screen/gestures/ownership/should-defer-to-child-claim.js.map +0 -1
  771. package/lib/module/shared/providers/scroll-settle.provider.js +0 -19
  772. package/lib/module/shared/providers/scroll-settle.provider.js.map +0 -1
  773. package/lib/module/shared/typecheck/public-api.typecheck.js +0 -227
  774. package/lib/module/shared/typecheck/public-api.typecheck.js.map +0 -1
  775. package/lib/typescript/shared/hooks/reanimated/use-animated-debounce.d.ts +0 -13
  776. package/lib/typescript/shared/hooks/reanimated/use-animated-debounce.d.ts.map +0 -1
  777. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state.d.ts.map +0 -1
  778. package/lib/typescript/shared/providers/screen/animation/helpers/resolve-screen-animation-target.d.ts +0 -9
  779. package/lib/typescript/shared/providers/screen/animation/helpers/resolve-screen-animation-target.d.ts.map +0 -1
  780. package/lib/typescript/shared/providers/screen/descriptors/helpers/get-ancestor-navigator-keys.d.ts +0 -7
  781. package/lib/typescript/shared/providers/screen/descriptors/helpers/get-ancestor-navigator-keys.d.ts.map +0 -1
  782. package/lib/typescript/shared/providers/screen/gestures/activation/use-pan-activation.d.ts.map +0 -1
  783. package/lib/typescript/shared/providers/screen/gestures/activation/use-pinch-activation.d.ts.map +0 -1
  784. package/lib/typescript/shared/providers/screen/gestures/behaviors/strategies/pan-snap.strategy.d.ts +0 -3
  785. package/lib/typescript/shared/providers/screen/gestures/behaviors/strategies/pan-snap.strategy.d.ts.map +0 -1
  786. package/lib/typescript/shared/providers/screen/gestures/behaviors/strategies/pan.strategy.d.ts +0 -3
  787. package/lib/typescript/shared/providers/screen/gestures/behaviors/strategies/pan.strategy.d.ts.map +0 -1
  788. package/lib/typescript/shared/providers/screen/gestures/behaviors/strategies/pinch-snap.strategy.d.ts +0 -3
  789. package/lib/typescript/shared/providers/screen/gestures/behaviors/strategies/pinch-snap.strategy.d.ts.map +0 -1
  790. package/lib/typescript/shared/providers/screen/gestures/behaviors/strategies/pinch.strategy.d.ts +0 -3
  791. package/lib/typescript/shared/providers/screen/gestures/behaviors/strategies/pinch.strategy.d.ts.map +0 -1
  792. package/lib/typescript/shared/providers/screen/gestures/behaviors/use-pan-behavior.d.ts.map +0 -1
  793. package/lib/typescript/shared/providers/screen/gestures/behaviors/use-pinch-behavior.d.ts.map +0 -1
  794. package/lib/typescript/shared/providers/screen/gestures/builders/use-build-pan-gesture.d.ts.map +0 -1
  795. package/lib/typescript/shared/providers/screen/gestures/builders/use-build-pinch-gesture.d.ts.map +0 -1
  796. package/lib/typescript/shared/providers/screen/gestures/helpers/gesture-activation.d.ts.map +0 -1
  797. package/lib/typescript/shared/providers/screen/gestures/helpers/gesture-directions.d.ts.map +0 -1
  798. package/lib/typescript/shared/providers/screen/gestures/helpers/gesture-physics.d.ts.map +0 -1
  799. package/lib/typescript/shared/providers/screen/gestures/helpers/gesture-reset.d.ts +0 -20
  800. package/lib/typescript/shared/providers/screen/gestures/helpers/gesture-reset.d.ts.map +0 -1
  801. package/lib/typescript/shared/providers/screen/gestures/helpers/gesture-snap-points.d.ts +0 -17
  802. package/lib/typescript/shared/providers/screen/gestures/helpers/gesture-snap-points.d.ts.map +0 -1
  803. package/lib/typescript/shared/providers/screen/gestures/helpers/gesture-targets.d.ts.map +0 -1
  804. package/lib/typescript/shared/providers/screen/gestures/helpers/pan-phases.d.ts.map +0 -1
  805. package/lib/typescript/shared/providers/screen/gestures/helpers/pinch-phases.d.ts.map +0 -1
  806. package/lib/typescript/shared/providers/screen/gestures/helpers/resolve-can-track-gesture.d.ts +0 -8
  807. package/lib/typescript/shared/providers/screen/gestures/helpers/resolve-can-track-gesture.d.ts.map +0 -1
  808. package/lib/typescript/shared/providers/screen/gestures/helpers/runtime-options.d.ts +0 -9
  809. package/lib/typescript/shared/providers/screen/gestures/helpers/runtime-options.d.ts.map +0 -1
  810. package/lib/typescript/shared/providers/screen/gestures/helpers/validate-snap-points.d.ts +0 -20
  811. package/lib/typescript/shared/providers/screen/gestures/helpers/validate-snap-points.d.ts.map +0 -1
  812. package/lib/typescript/shared/providers/screen/gestures/helpers/walk-gesture-ancestors.d.ts.map +0 -1
  813. package/lib/typescript/shared/providers/screen/gestures/hooks/use-scroll-gesture-coordination/index.d.ts.map +0 -1
  814. package/lib/typescript/shared/providers/screen/gestures/hooks/use-scroll-gesture-coordination/update-scroll-gesture-state.d.ts.map +0 -1
  815. package/lib/typescript/shared/providers/screen/gestures/hooks/use-scroll-gesture-coordination/use-scroll-gesture-coordination.d.ts.map +0 -1
  816. package/lib/typescript/shared/providers/screen/gestures/hooks/use-scroll-gesture-coordination/walk-up-scroll-gesture-coordination.d.ts.map +0 -1
  817. package/lib/typescript/shared/providers/screen/gestures/ownership/should-defer-to-child-claim.d.ts +0 -6
  818. package/lib/typescript/shared/providers/screen/gestures/ownership/should-defer-to-child-claim.d.ts.map +0 -1
  819. package/lib/typescript/shared/providers/scroll-settle.provider.d.ts +0 -12
  820. package/lib/typescript/shared/providers/scroll-settle.provider.d.ts.map +0 -1
  821. package/src/shared/hooks/reanimated/use-animated-debounce.ts +0 -53
  822. package/src/shared/providers/screen/animation/helpers/hydrate-transition-state.ts +0 -335
  823. package/src/shared/providers/screen/animation/helpers/resolve-screen-animation-target.ts +0 -42
  824. package/src/shared/providers/screen/descriptors/helpers/get-ancestor-navigator-keys.ts +0 -29
  825. package/src/shared/providers/screen/gestures/activation/use-pan-activation.ts +0 -244
  826. package/src/shared/providers/screen/gestures/behaviors/strategies/pan-snap.strategy.ts +0 -195
  827. package/src/shared/providers/screen/gestures/behaviors/strategies/pan.strategy.ts +0 -76
  828. package/src/shared/providers/screen/gestures/behaviors/strategies/pinch-snap.strategy.ts +0 -177
  829. package/src/shared/providers/screen/gestures/behaviors/strategies/pinch.strategy.ts +0 -73
  830. package/src/shared/providers/screen/gestures/helpers/gesture-reset.ts +0 -158
  831. package/src/shared/providers/screen/gestures/helpers/gesture-snap-points.ts +0 -72
  832. package/src/shared/providers/screen/gestures/helpers/gesture-targets.ts +0 -153
  833. package/src/shared/providers/screen/gestures/helpers/resolve-can-track-gesture.ts +0 -23
  834. package/src/shared/providers/screen/gestures/helpers/runtime-options.ts +0 -159
  835. package/src/shared/providers/screen/gestures/helpers/validate-snap-points.ts +0 -74
  836. package/src/shared/providers/screen/gestures/ownership/should-defer-to-child-claim.ts +0 -15
  837. package/src/shared/providers/scroll-settle.provider.tsx +0 -24
  838. package/src/shared/typecheck/public-api.typecheck.ts +0 -272
  839. /package/lib/commonjs/shared/providers/screen/gestures/{hooks/use-scroll-gesture-coordination → scroll-coordination}/index.js +0 -0
  840. /package/lib/commonjs/shared/providers/screen/gestures/{hooks/use-scroll-gesture-coordination → scroll-coordination}/update-scroll-gesture-state.js +0 -0
  841. /package/lib/module/shared/providers/screen/gestures/{hooks/use-scroll-gesture-coordination → scroll-coordination}/index.js +0 -0
  842. /package/lib/module/shared/providers/screen/gestures/{hooks/use-scroll-gesture-coordination → scroll-coordination}/update-scroll-gesture-state.js +0 -0
  843. /package/lib/typescript/shared/providers/screen/gestures/{behaviors → pan}/use-pan-behavior.d.ts +0 -0
  844. /package/lib/typescript/shared/providers/screen/gestures/{behaviors → pinch}/use-pinch-behavior.d.ts +0 -0
  845. /package/lib/typescript/shared/providers/screen/gestures/{hooks/use-scroll-gesture-coordination → scroll-coordination}/index.d.ts +0 -0
  846. /package/src/shared/providers/screen/gestures/{hooks/use-scroll-gesture-coordination → scroll-coordination}/index.ts +0 -0
  847. /package/src/shared/providers/screen/gestures/{helpers/walk-gesture-ancestors.ts → shared/ancestors.ts} +0 -0
  848. /package/src/shared/providers/screen/gestures/{helpers/gesture-directions.ts → shared/directions.ts} +0 -0
@@ -0,0 +1,65 @@
1
+ import { EPSILON, FALSE, TRUE } from "../../../../constants";
2
+ import type { GestureStoreMap } from "../../../../stores/gesture.store";
3
+ import type { AnimationConfig } from "../../../../types/animation.types";
4
+ import {
5
+ animateResetValue,
6
+ clearGestureSettlingIfResting,
7
+ getGestureResetSpec,
8
+ } from "../shared/reset";
9
+
10
+ interface ResetPinchGestureValuesProps {
11
+ spec?: AnimationConfig;
12
+ gestures: GestureStoreMap;
13
+ shouldDismiss: boolean;
14
+ resetValuesImmediately?: boolean;
15
+ }
16
+
17
+ const clearPinchSettlingIfResting = (gestures: GestureStoreMap) => {
18
+ "worklet";
19
+
20
+ const isResting =
21
+ !gestures.dragging.get() &&
22
+ !gestures.dismissing.get() &&
23
+ Math.abs(gestures.scale.get() - 1) <= EPSILON &&
24
+ Math.abs(gestures.normScale.get()) <= EPSILON;
25
+
26
+ if (isResting) {
27
+ gestures.focalX.set(0);
28
+ gestures.focalY.set(0);
29
+ }
30
+
31
+ clearGestureSettlingIfResting(gestures, isResting);
32
+ };
33
+
34
+ export const resetPinchGestureValues = ({
35
+ spec,
36
+ gestures,
37
+ shouldDismiss,
38
+ resetValuesImmediately = false,
39
+ }: ResetPinchGestureValuesProps) => {
40
+ "worklet";
41
+ const resetSpec = getGestureResetSpec(spec);
42
+
43
+ if (!shouldDismiss) {
44
+ gestures.raw.scale.set(1);
45
+ gestures.raw.normScale.set(0);
46
+ }
47
+
48
+ gestures.dragging.set(FALSE);
49
+ gestures.dismissing.set(shouldDismiss ? TRUE : FALSE);
50
+ gestures.settling.set(shouldDismiss ? FALSE : TRUE);
51
+
52
+ if (resetValuesImmediately) {
53
+ gestures.scale.set(1);
54
+ gestures.normScale.set(0);
55
+ clearPinchSettlingIfResting(gestures);
56
+ return;
57
+ }
58
+
59
+ animateResetValue(gestures.scale, 1, resetSpec, () =>
60
+ clearPinchSettlingIfResting(gestures),
61
+ );
62
+ animateResetValue(gestures.normScale, 0, resetSpec, () =>
63
+ clearPinchSettlingIfResting(gestures),
64
+ );
65
+ };
@@ -2,30 +2,23 @@ import { useCallback } 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";
5
- import {
6
- finalizePinchRelease,
7
- startPinchBase,
8
- trackPinchGesture,
9
- } from "../helpers/pinch-phases";
10
- import { resolvePinchRuntime } from "../helpers/runtime-options";
11
5
  import { usePinchGestureSensitivity } from "../hooks/use-gesture-sensitivity";
6
+ import { resolvePinchRuntime } from "../shared/runtime";
12
7
  import type {
13
8
  PinchBehavior,
14
- PinchBehaviorStrategy,
15
9
  PinchGestureEvent,
16
10
  PinchGestureRuntime,
17
11
  } from "../types";
18
- import { PinchStrategy } from "./strategies/pinch.strategy";
19
- import { SnapPinchStrategy } from "./strategies/pinch-snap.strategy";
20
-
21
- const getPinchStrategy = (
22
- runtime: PinchGestureRuntime,
23
- ): PinchBehaviorStrategy => {
24
- "worklet";
25
- return runtime.participation.effectiveSnapPoints.hasSnapPoints
26
- ? SnapPinchStrategy
27
- : PinchStrategy;
28
- };
12
+ import {
13
+ finalizePinchRelease,
14
+ startPinchBase,
15
+ trackPinchGesture,
16
+ } from "./pinch-lifecycle";
17
+ import {
18
+ primeSnapPinchRelease,
19
+ resolvePinchRelease,
20
+ resolveSnapPinchRelease,
21
+ } from "./pinch-release";
29
22
 
30
23
  export const usePinchBehavior = (
31
24
  runtime: SharedValue<PinchGestureRuntime>,
@@ -42,8 +35,9 @@ export const usePinchBehavior = (
42
35
  runtime.get(),
43
36
  screenOptions.get(),
44
37
  );
45
- const strategy = getPinchStrategy(latestRuntime);
46
- strategy.primeStart(latestRuntime);
38
+ if (latestRuntime.participation.effectiveSnapPoints.hasSnapPoints) {
39
+ primeSnapPinchRelease(latestRuntime);
40
+ }
47
41
  startPinchBase(latestRuntime, event);
48
42
  resetSensitivity();
49
43
  },
@@ -57,21 +51,8 @@ export const usePinchBehavior = (
57
51
  runtime.get(),
58
52
  screenOptions.get(),
59
53
  );
60
- const strategy = getPinchStrategy(latestRuntime);
61
54
  const event = withSensitivity(rawEvent);
62
- const track = trackPinchGesture(
63
- event,
64
- rawEvent,
65
- latestRuntime.stores.gestures,
66
- );
67
-
68
- if (!latestRuntime.policy.gestureDrivesProgress) {
69
- return;
70
- }
71
-
72
- latestRuntime.stores.animations.progress.set(
73
- strategy.resolveProgress(latestRuntime, track),
74
- );
55
+ trackPinchGesture(event, rawEvent, latestRuntime.stores.gestures);
75
56
  },
76
57
  [runtime, screenOptions, withSensitivity],
77
58
  );
@@ -83,9 +64,11 @@ export const usePinchBehavior = (
83
64
  runtime.get(),
84
65
  screenOptions.get(),
85
66
  );
86
- const strategy = getPinchStrategy(latestRuntime);
87
67
  const event = withSensitivity(rawEvent);
88
- const release = strategy.resolveRelease(event, latestRuntime);
68
+ const release = latestRuntime.participation.effectiveSnapPoints
69
+ .hasSnapPoints
70
+ ? resolveSnapPinchRelease(event, latestRuntime)
71
+ : resolvePinchRelease(event, latestRuntime);
89
72
  finalizePinchRelease(release, latestRuntime, dismissScreen);
90
73
  },
91
74
  [runtime, screenOptions, dismissScreen, withSensitivity],
@@ -2,7 +2,7 @@ import type {
2
2
  ScrollGestureAxis,
3
3
  ScrollGestureAxisState,
4
4
  ScrollGestureState,
5
- } from "../../types";
5
+ } from "../types";
6
6
 
7
7
  const createScrollGestureState = (): ScrollGestureState => {
8
8
  "worklet";
@@ -6,15 +6,15 @@ import {
6
6
  useAnimatedScrollHandler,
7
7
  useDerivedValue,
8
8
  } from "react-native-reanimated";
9
- import { useSharedValueState } from "../../../../../hooks/reanimated/use-shared-value-state";
10
- import useStableCallback from "../../../../../hooks/use-stable-callback";
11
- import { AnimationStore } from "../../../../../stores/animation.store";
12
- import { useGestureContext } from "../../gestures.provider";
9
+ import { useSharedValueState } from "../../../../hooks/reanimated/use-shared-value-state";
10
+ import useStableCallback from "../../../../hooks/use-stable-callback";
11
+ import { AnimationStore } from "../../../../stores/animation.store";
12
+ import { useGestureContext } from "../gestures.provider";
13
13
  import type {
14
14
  ScrollGestureAxis,
15
15
  ScrollGestureAxisState,
16
16
  ScrollGestureState,
17
- } from "../../types";
17
+ } from "../types";
18
18
  import { updateScrollGestureAxisState } from "./update-scroll-gesture-state";
19
19
  import { walkUpScrollGestureCoordination } from "./walk-up-scroll-gesture-coordination";
20
20
 
@@ -1,13 +1,13 @@
1
1
  import type { SharedValue } from "react-native-reanimated";
2
- import type { Direction } from "../../../../../types/ownership.types";
3
- import { walkGestureAncestors } from "../../helpers/walk-gesture-ancestors";
2
+ import type { Direction } from "../../../../types/ownership.types";
3
+ import { walkGestureAncestors } from "../shared/ancestors";
4
4
  import type {
5
5
  GestureContextType,
6
6
  PanGesture,
7
7
  PinchGesture,
8
8
  ScrollGestureAxis,
9
9
  ScrollGestureState,
10
- } from "../../types";
10
+ } from "../types";
11
11
 
12
12
  /** Walks up the gesture tree until it finds the owner for a specific direction. */
13
13
  function findGestureOwnerForDirection(
@@ -21,28 +21,15 @@ function findGestureOwnerForDirection(
21
21
  return null;
22
22
  }
23
23
 
24
- interface WalkUpScrollGestureCoordinationResult {
25
- panGestures: PanGesture[];
26
- pinchGestures: PinchGesture[];
27
- scrollStates: SharedValue<ScrollGestureState | null>[];
28
- ownerRouteKeys: string[];
29
- }
30
-
31
- export function walkUpScrollGestureCoordination(
32
- context: GestureContextType | null,
24
+ const getDirectionsForAxis = (
33
25
  axis: ScrollGestureAxis,
34
- ): WalkUpScrollGestureCoordinationResult {
35
- const directions: readonly [Direction, Direction] =
36
- axis === "vertical"
37
- ? ["vertical", "vertical-inverted"]
38
- : ["horizontal", "horizontal-inverted"];
26
+ ): readonly [Direction, Direction] =>
27
+ axis === "vertical"
28
+ ? ["vertical", "vertical-inverted"]
29
+ : ["horizontal", "horizontal-inverted"];
39
30
 
40
- const seenOwners: GestureContextType[] = [];
41
- const panGestures: GestureContextType["panGesture"][] = [];
31
+ const collectAncestorPinchGestures = (ancestors: GestureContextType[]) => {
42
32
  const pinchGestures: GestureContextType["pinchGesture"][] = [];
43
- const scrollStates: GestureContextType["scrollState"][] = [];
44
- const ownerRouteKeys: string[] = [];
45
- const ancestors = walkGestureAncestors(context);
46
33
 
47
34
  for (const ancestor of ancestors) {
48
35
  if (!pinchGestures.includes(ancestor.pinchGesture)) {
@@ -50,6 +37,18 @@ export function walkUpScrollGestureCoordination(
50
37
  }
51
38
  }
52
39
 
40
+ return pinchGestures;
41
+ };
42
+
43
+ const collectAxisOwners = (
44
+ ancestors: GestureContextType[],
45
+ directions: readonly [Direction, Direction],
46
+ ) => {
47
+ const seenOwners: GestureContextType[] = [];
48
+ const panGestures: GestureContextType["panGesture"][] = [];
49
+ const scrollStates: GestureContextType["scrollState"][] = [];
50
+ const ownerRouteKeys: string[] = [];
51
+
53
52
  for (const direction of directions) {
54
53
  const owner = findGestureOwnerForDirection(ancestors, direction);
55
54
 
@@ -63,10 +62,27 @@ export function walkUpScrollGestureCoordination(
63
62
  ownerRouteKeys.push(owner.routeKey);
64
63
  }
65
64
 
65
+ return { panGestures, scrollStates, ownerRouteKeys };
66
+ };
67
+
68
+ interface WalkUpScrollGestureCoordinationResult {
69
+ panGestures: PanGesture[];
70
+ pinchGestures: PinchGesture[];
71
+ scrollStates: SharedValue<ScrollGestureState | null>[];
72
+ ownerRouteKeys: string[];
73
+ }
74
+
75
+ export function walkUpScrollGestureCoordination(
76
+ context: GestureContextType | null,
77
+ axis: ScrollGestureAxis,
78
+ ): WalkUpScrollGestureCoordinationResult {
79
+ const ancestors = walkGestureAncestors(context);
80
+ const axisOwners = collectAxisOwners(ancestors, getDirectionsForAxis(axis));
81
+
66
82
  return {
67
- panGestures,
68
- pinchGestures,
69
- scrollStates,
70
- ownerRouteKeys,
83
+ panGestures: axisOwners.panGestures,
84
+ pinchGestures: collectAncestorPinchGestures(ancestors),
85
+ scrollStates: axisOwners.scrollStates,
86
+ ownerRouteKeys: axisOwners.ownerRouteKeys,
71
87
  };
72
88
  }
@@ -11,7 +11,6 @@ interface CalculateProgressProps {
11
11
  dimensions: { width: number; height: number };
12
12
  directions: GestureDirections;
13
13
  gestureReleaseVelocityScale?: number;
14
- gestureReleaseVelocityMax?: number;
15
14
  }
16
15
 
17
16
  type GestureAxisCandidate = {
@@ -30,17 +29,6 @@ export const toProgressVelocity = (
30
29
  return velocityPixelsPerSecond / Math.max(1, screenSize);
31
30
  };
32
31
 
33
- export const clampReleaseVelocity = (
34
- velocity: number,
35
- maxMagnitude?: number,
36
- ) => {
37
- "worklet";
38
- if (maxMagnitude === undefined) return velocity;
39
-
40
- const max = Math.max(0, Math.abs(maxMagnitude));
41
- return clamp(velocity, -max, max);
42
- };
43
-
44
32
  /**
45
33
  * Converts pan release velocity into a spring handoff in progress units/second.
46
34
  */
@@ -48,14 +36,12 @@ export const getPanReleaseHandoffVelocity = (
48
36
  velocityPixelsPerSecond: number,
49
37
  screenSize: number,
50
38
  gestureReleaseVelocityScale: number = 1,
51
- gestureReleaseVelocityMax?: number,
52
39
  ) => {
53
40
  "worklet";
54
- const velocity =
41
+ return (
55
42
  toProgressVelocity(velocityPixelsPerSecond, screenSize) *
56
- Math.max(0, gestureReleaseVelocityScale);
57
-
58
- return clampReleaseVelocity(velocity, gestureReleaseVelocityMax);
43
+ Math.max(0, gestureReleaseVelocityScale)
44
+ );
59
45
  };
60
46
 
61
47
  /**
@@ -64,12 +50,139 @@ export const getPanReleaseHandoffVelocity = (
64
50
  export const getPinchReleaseHandoffVelocity = (
65
51
  velocityScalePerSecond: number,
66
52
  gestureReleaseVelocityScale: number = 1,
67
- gestureReleaseVelocityMax?: number,
68
53
  ) => {
69
54
  "worklet";
70
- const velocity =
71
- velocityScalePerSecond * Math.max(0, gestureReleaseVelocityScale);
72
- return clampReleaseVelocity(velocity, gestureReleaseVelocityMax);
55
+ return velocityScalePerSecond * Math.max(0, gestureReleaseVelocityScale);
56
+ };
57
+
58
+ const getPanAxisCandidate = (
59
+ isEnabled: boolean,
60
+ translationTowardDismiss: number,
61
+ velocityTowardDismiss: number,
62
+ screenSize: number,
63
+ gestureReleaseVelocityScale?: number,
64
+ ): GestureAxisCandidate | null => {
65
+ "worklet";
66
+ if (!isEnabled || translationTowardDismiss <= 0) {
67
+ return null;
68
+ }
69
+
70
+ return {
71
+ progressContribution: translationTowardDismiss / Math.max(1, screenSize),
72
+ velocityContribution: getPanReleaseHandoffVelocity(
73
+ velocityTowardDismiss,
74
+ screenSize,
75
+ gestureReleaseVelocityScale,
76
+ ),
77
+ };
78
+ };
79
+
80
+ const pushPanAxisCandidate = (
81
+ candidates: GestureAxisCandidate[],
82
+ candidate: GestureAxisCandidate | null,
83
+ ) => {
84
+ "worklet";
85
+ if (candidate) {
86
+ candidates.push(candidate);
87
+ }
88
+ };
89
+
90
+ const collectPanAxisCandidates = ({
91
+ event,
92
+ dimensions,
93
+ directions,
94
+ gestureReleaseVelocityScale,
95
+ }: Pick<
96
+ CalculateProgressProps,
97
+ "event" | "dimensions" | "directions" | "gestureReleaseVelocityScale"
98
+ >) => {
99
+ "worklet";
100
+ const candidates: GestureAxisCandidate[] = [];
101
+
102
+ pushPanAxisCandidate(
103
+ candidates,
104
+ getPanAxisCandidate(
105
+ directions.horizontal,
106
+ event.translationX,
107
+ event.velocityX,
108
+ dimensions.width,
109
+ gestureReleaseVelocityScale,
110
+ ),
111
+ );
112
+ pushPanAxisCandidate(
113
+ candidates,
114
+ getPanAxisCandidate(
115
+ directions.horizontalInverted,
116
+ -event.translationX,
117
+ -event.velocityX,
118
+ dimensions.width,
119
+ gestureReleaseVelocityScale,
120
+ ),
121
+ );
122
+ pushPanAxisCandidate(
123
+ candidates,
124
+ getPanAxisCandidate(
125
+ directions.vertical,
126
+ event.translationY,
127
+ event.velocityY,
128
+ dimensions.height,
129
+ gestureReleaseVelocityScale,
130
+ ),
131
+ );
132
+ pushPanAxisCandidate(
133
+ candidates,
134
+ getPanAxisCandidate(
135
+ directions.verticalInverted,
136
+ -event.translationY,
137
+ -event.velocityY,
138
+ dimensions.height,
139
+ gestureReleaseVelocityScale,
140
+ ),
141
+ );
142
+
143
+ return candidates;
144
+ };
145
+
146
+ const getDominantPanCandidateVelocity = (
147
+ candidates: GestureAxisCandidate[],
148
+ ): number | null => {
149
+ "worklet";
150
+ if (candidates.length === 0) {
151
+ return null;
152
+ }
153
+
154
+ let dominant = candidates[0];
155
+ for (let i = 1; i < candidates.length; i++) {
156
+ const candidate = candidates[i];
157
+ if (candidate.progressContribution > dominant.progressContribution) {
158
+ dominant = candidate;
159
+ }
160
+ }
161
+
162
+ return Math.abs(dominant.velocityContribution);
163
+ };
164
+
165
+ const getFallbackPanReleaseVelocityMagnitude = ({
166
+ event,
167
+ dimensions,
168
+ gestureReleaseVelocityScale,
169
+ }: Pick<
170
+ CalculateProgressProps,
171
+ "event" | "dimensions" | "gestureReleaseVelocityScale"
172
+ >) => {
173
+ "worklet";
174
+ const normalizedVelocityX = getPanReleaseHandoffVelocity(
175
+ event.velocityX,
176
+ dimensions.width,
177
+ gestureReleaseVelocityScale,
178
+ );
179
+ const normalizedVelocityY = getPanReleaseHandoffVelocity(
180
+ event.velocityY,
181
+ dimensions.height,
182
+ gestureReleaseVelocityScale,
183
+ );
184
+
185
+ return Math.max(Math.abs(normalizedVelocityX), Math.abs(normalizedVelocityY));
73
186
  };
74
187
 
75
188
  /**
@@ -95,7 +208,6 @@ export const getPanReleaseProgressVelocity = ({
95
208
  dimensions,
96
209
  directions,
97
210
  gestureReleaseVelocityScale,
98
- gestureReleaseVelocityMax,
99
211
  }: CalculateProgressProps) => {
100
212
  "worklet";
101
213
 
@@ -105,86 +217,21 @@ export const getPanReleaseProgressVelocity = ({
105
217
 
106
218
  const progressDirection = progressDelta === 0 ? 0 : Math.sign(progressDelta);
107
219
 
108
- const candidates: GestureAxisCandidate[] = [];
109
-
110
- if (directions.horizontal && event.translationX > 0) {
111
- candidates.push({
112
- progressContribution: event.translationX / Math.max(1, dimensions.width),
113
- velocityContribution: getPanReleaseHandoffVelocity(
114
- event.velocityX,
115
- dimensions.width,
116
- gestureReleaseVelocityScale,
117
- gestureReleaseVelocityMax,
118
- ),
119
- });
120
- }
121
-
122
- if (directions.horizontalInverted && event.translationX < 0) {
123
- candidates.push({
124
- progressContribution: -event.translationX / Math.max(1, dimensions.width),
125
- velocityContribution: getPanReleaseHandoffVelocity(
126
- -event.velocityX,
127
- dimensions.width,
128
- gestureReleaseVelocityScale,
129
- gestureReleaseVelocityMax,
130
- ),
131
- });
132
- }
133
-
134
- if (directions.vertical && event.translationY > 0) {
135
- candidates.push({
136
- progressContribution: event.translationY / Math.max(1, dimensions.height),
137
- velocityContribution: getPanReleaseHandoffVelocity(
138
- event.velocityY,
139
- dimensions.height,
140
- gestureReleaseVelocityScale,
141
- gestureReleaseVelocityMax,
142
- ),
143
- });
144
- }
145
-
146
- if (directions.verticalInverted && event.translationY < 0) {
147
- candidates.push({
148
- progressContribution:
149
- -event.translationY / Math.max(1, dimensions.height),
150
- velocityContribution: getPanReleaseHandoffVelocity(
151
- -event.velocityY,
152
- dimensions.height,
153
- gestureReleaseVelocityScale,
154
- gestureReleaseVelocityMax,
155
- ),
156
- });
157
- }
158
-
159
- let progressVelocityMagnitude = 0;
160
-
161
- if (candidates.length > 0) {
162
- let dominant = candidates[0];
163
- for (let i = 1; i < candidates.length; i++) {
164
- const candidate = candidates[i];
165
- if (candidate.progressContribution > dominant.progressContribution) {
166
- dominant = candidate;
167
- }
168
- }
169
- progressVelocityMagnitude = Math.abs(dominant.velocityContribution);
170
- } else {
171
- const normalizedVelocityX = getPanReleaseHandoffVelocity(
172
- event.velocityX,
173
- dimensions.width,
220
+ const dominantVelocity = getDominantPanCandidateVelocity(
221
+ collectPanAxisCandidates({
222
+ event,
223
+ dimensions,
224
+ directions,
174
225
  gestureReleaseVelocityScale,
175
- gestureReleaseVelocityMax,
176
- );
177
- const normalizedVelocityY = getPanReleaseHandoffVelocity(
178
- event.velocityY,
179
- dimensions.height,
226
+ }),
227
+ );
228
+ const progressVelocityMagnitude =
229
+ dominantVelocity ??
230
+ getFallbackPanReleaseVelocityMagnitude({
231
+ event,
232
+ dimensions,
180
233
  gestureReleaseVelocityScale,
181
- gestureReleaseVelocityMax,
182
- );
183
- progressVelocityMagnitude = Math.max(
184
- Math.abs(normalizedVelocityX),
185
- Math.abs(normalizedVelocityY),
186
- );
187
- }
234
+ });
188
235
 
189
236
  return progressDirection * progressVelocityMagnitude;
190
237
  };
@@ -229,18 +276,6 @@ export const shouldDismissFromProjection = (
229
276
  return exceedsThreshold;
230
277
  };
231
278
 
232
- /**
233
- * Utility function to map raw gesture translation to a progress value.
234
- */
235
- export const mapGestureToProgress = (
236
- translation: number,
237
- dimension: number,
238
- ) => {
239
- "worklet";
240
- const rawProgress = translation / dimension;
241
- return Math.max(0, Math.min(1, rawProgress));
242
- };
243
-
244
279
  /**
245
280
  * Scales live gesture movement before it is applied to transition progress.
246
281
  * Lower values reduce sensitivity, higher values increase it.