react-native-screen-transitions 3.7.0 → 3.8.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (637) hide show
  1. package/lib/commonjs/blank-stack/components/stack-view.js +2 -2
  2. package/lib/commonjs/blank-stack/components/stack-view.js.map +1 -1
  3. package/lib/commonjs/component-stack/components/stack-view.js +2 -2
  4. package/lib/commonjs/component-stack/components/stack-view.js.map +1 -1
  5. package/lib/commonjs/shared/adapters/with-screen-transitions/stack-layout.js +1 -10
  6. package/lib/commonjs/shared/adapters/with-screen-transitions/stack-layout.js.map +1 -1
  7. package/lib/commonjs/shared/components/overlay/variations/float-overlay.js +1 -3
  8. package/lib/commonjs/shared/components/overlay/variations/float-overlay.js.map +1 -1
  9. package/lib/commonjs/shared/components/scene-view.js +1 -1
  10. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js +7 -7
  11. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js.map +1 -1
  12. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js +2 -2
  13. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js.map +1 -1
  14. package/lib/commonjs/shared/components/screen-lifecycle/index.js +2 -2
  15. package/lib/commonjs/shared/components/screen-lifecycle/index.js.map +1 -1
  16. package/lib/commonjs/shared/constants.js +3 -13
  17. package/lib/commonjs/shared/constants.js.map +1 -1
  18. package/lib/commonjs/shared/hooks/navigation/use-screen-state.js +1 -3
  19. package/lib/commonjs/shared/hooks/navigation/use-screen-state.js.map +1 -1
  20. package/lib/commonjs/shared/hooks/navigation/use-stack.js.map +1 -1
  21. package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js +15 -12
  22. package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js.map +1 -1
  23. package/lib/commonjs/shared/providers/screen/animation/helpers/build-screen-transition-options.js +2 -6
  24. package/lib/commonjs/shared/providers/screen/animation/helpers/build-screen-transition-options.js.map +1 -1
  25. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.js.map +1 -1
  26. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +6 -23
  27. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
  28. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +1 -1
  29. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  30. package/lib/commonjs/shared/providers/screen/animation/helpers/selected-interpolator-options.js +14 -1
  31. package/lib/commonjs/shared/providers/screen/animation/helpers/selected-interpolator-options.js.map +1 -1
  32. package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js +1 -1
  33. package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -1
  34. package/lib/commonjs/shared/providers/screen/gestures/gestures.provider.js +21 -8
  35. package/lib/commonjs/shared/providers/screen/gestures/gestures.provider.js.map +1 -1
  36. package/lib/commonjs/shared/providers/screen/gestures/ownership/compute-claimed-directions.js +2 -1
  37. package/lib/commonjs/shared/providers/screen/gestures/ownership/compute-claimed-directions.js.map +1 -1
  38. package/lib/commonjs/shared/providers/screen/gestures/pan/{pan-activation-decision.js → activation/pan-activation-decision.js} +5 -5
  39. package/lib/commonjs/shared/providers/screen/gestures/pan/activation/pan-activation-decision.js.map +1 -0
  40. package/lib/commonjs/shared/providers/screen/gestures/pan/{pan-activation-rules.js → activation/pan-activation-rules.js} +12 -9
  41. package/lib/commonjs/shared/providers/screen/gestures/pan/activation/pan-activation-rules.js.map +1 -0
  42. package/lib/commonjs/shared/providers/screen/gestures/pan/{pan-activation.js → activation/use-pan-activation.js} +15 -10
  43. package/lib/commonjs/shared/providers/screen/gestures/pan/activation/use-pan-activation.js.map +1 -0
  44. package/lib/commonjs/shared/providers/screen/gestures/pan/{pan-lifecycle.js → behavior/pan-lifecycle.js} +29 -8
  45. package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js.map +1 -0
  46. package/lib/commonjs/shared/providers/screen/gestures/pan/{pan-release.js → behavior/pan-release.js} +5 -5
  47. package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/pan-release.js.map +1 -0
  48. package/lib/commonjs/shared/providers/screen/gestures/pan/{pan-reset.js → behavior/pan-reset.js} +21 -11
  49. package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/pan-reset.js.map +1 -0
  50. package/lib/commonjs/shared/providers/screen/gestures/pan/{use-pan-behavior.js → behavior/use-pan-behavior.js} +34 -8
  51. package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js.map +1 -0
  52. package/lib/commonjs/shared/providers/screen/gestures/pan/{build-pan-gesture.js → use-build-pan-gesture.js} +10 -8
  53. package/lib/commonjs/shared/providers/screen/gestures/pan/use-build-pan-gesture.js.map +1 -0
  54. package/lib/commonjs/shared/providers/screen/gestures/pinch/{pinch-activation.js → activation/use-pinch-activation.js} +12 -5
  55. package/lib/commonjs/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js.map +1 -0
  56. package/lib/commonjs/shared/providers/screen/gestures/pinch/{pinch-lifecycle.js → behavior/pinch-lifecycle.js} +7 -7
  57. package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js.map +1 -0
  58. package/lib/commonjs/shared/providers/screen/gestures/pinch/{pinch-release.js → behavior/pinch-release.js} +4 -4
  59. package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/pinch-release.js.map +1 -0
  60. package/lib/commonjs/shared/providers/screen/gestures/pinch/{pinch-reset.js → behavior/pinch-reset.js} +6 -3
  61. package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/pinch-reset.js.map +1 -0
  62. package/lib/commonjs/shared/providers/screen/gestures/pinch/{use-pinch-behavior.js → behavior/use-pinch-behavior.js} +6 -5
  63. package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js.map +1 -0
  64. package/lib/commonjs/shared/providers/screen/gestures/pinch/{build-pinch-gesture.js → use-build-pinch-gesture.js} +9 -7
  65. package/lib/commonjs/shared/providers/screen/gestures/pinch/use-build-pinch-gesture.js.map +1 -0
  66. package/lib/commonjs/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.js +62 -0
  67. package/lib/commonjs/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.js.map +1 -0
  68. package/lib/commonjs/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.js +21 -0
  69. package/lib/commonjs/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.js.map +1 -0
  70. package/lib/commonjs/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.js +29 -0
  71. package/lib/commonjs/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.js.map +1 -0
  72. package/lib/commonjs/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.js +45 -0
  73. package/lib/commonjs/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.js.map +1 -0
  74. package/lib/commonjs/shared/providers/screen/gestures/shared/directions.js +17 -5
  75. package/lib/commonjs/shared/providers/screen/gestures/shared/directions.js.map +1 -1
  76. package/lib/commonjs/shared/providers/screen/gestures/shared/policy.js +67 -2
  77. package/lib/commonjs/shared/providers/screen/gestures/shared/policy.js.map +1 -1
  78. package/lib/commonjs/shared/providers/screen/gestures/shared/reset.js +3 -12
  79. package/lib/commonjs/shared/providers/screen/gestures/shared/reset.js.map +1 -1
  80. package/lib/commonjs/shared/providers/screen/gestures/shared/runtime.js +1 -10
  81. package/lib/commonjs/shared/providers/screen/gestures/shared/runtime.js.map +1 -1
  82. package/lib/commonjs/shared/providers/screen/gestures/shared/snap-points.js +1 -1
  83. package/lib/commonjs/shared/providers/screen/gestures/shared/snap-points.js.map +1 -1
  84. package/lib/commonjs/shared/providers/screen/gestures/types.js +2 -0
  85. package/lib/commonjs/shared/providers/screen/gestures/types.js.map +1 -1
  86. package/lib/commonjs/shared/providers/screen/options/helpers.js +60 -24
  87. package/lib/commonjs/shared/providers/screen/options/helpers.js.map +1 -1
  88. package/lib/commonjs/shared/providers/screen/styles/components/{maybe-floating-container.js → floating-overlay-layer.js} +5 -5
  89. package/lib/commonjs/shared/providers/screen/styles/components/floating-overlay-layer.js.map +1 -0
  90. package/lib/commonjs/shared/providers/screen/styles/styles.provider.js +3 -3
  91. package/lib/commonjs/shared/providers/screen/styles/styles.provider.js.map +1 -1
  92. package/lib/commonjs/shared/providers/stack/{helpers/managed-stack-state/managed-stack-controller.js → blank-stack-state/blank-stack-controller.js} +11 -11
  93. package/lib/commonjs/shared/providers/stack/blank-stack-state/blank-stack-controller.js.map +1 -0
  94. package/lib/commonjs/shared/providers/stack/{helpers/managed-stack-state/helpers/build-managed-stack-state.js → blank-stack-state/helpers/build-blank-stack-state.js} +18 -18
  95. package/lib/commonjs/shared/providers/stack/blank-stack-state/helpers/build-blank-stack-state.js.map +1 -0
  96. package/lib/commonjs/shared/providers/stack/blank-stack-state/helpers/derive-blank-stack-state.js +58 -0
  97. package/lib/commonjs/shared/providers/stack/blank-stack-state/helpers/derive-blank-stack-state.js.map +1 -0
  98. package/lib/commonjs/shared/providers/stack/blank-stack-state/helpers/navigation/compose-descriptors.js.map +1 -0
  99. package/lib/commonjs/shared/providers/stack/blank-stack-state/helpers/navigation/resolve-scene-neighbors.js.map +1 -0
  100. package/lib/commonjs/shared/{utils → providers/stack/blank-stack-state/helpers}/navigation/sync-routes-with-removed.js +6 -23
  101. package/lib/commonjs/shared/providers/stack/blank-stack-state/helpers/navigation/sync-routes-with-removed.js.map +1 -0
  102. package/lib/commonjs/shared/providers/stack/{helpers/managed-stack-state/helpers/reconcile-managed-routes.js → blank-stack-state/helpers/reconcile-blank-stack-routes.js} +8 -8
  103. package/lib/commonjs/shared/providers/stack/{helpers/managed-stack-state/helpers/reconcile-managed-routes.js.map → blank-stack-state/helpers/reconcile-blank-stack-routes.js.map} +1 -1
  104. package/lib/commonjs/shared/providers/stack/{helpers/managed-stack-state/helpers/helpers.js → blank-stack-state/helpers/state-equality.js} +1 -1
  105. package/lib/commonjs/shared/providers/stack/blank-stack-state/helpers/state-equality.js.map +1 -0
  106. package/lib/commonjs/shared/providers/stack/blank-stack-state/helpers/types.js.map +1 -0
  107. package/lib/commonjs/shared/providers/stack/{helpers/managed-stack-state → blank-stack-state}/index.js +5 -5
  108. package/lib/commonjs/shared/providers/stack/blank-stack-state/index.js.map +1 -0
  109. package/lib/commonjs/shared/providers/stack/{managed.provider.js → blank-stack.provider.js} +20 -27
  110. package/lib/commonjs/shared/providers/stack/blank-stack.provider.js.map +1 -0
  111. package/lib/commonjs/shared/providers/stack/direct.provider.js +3 -13
  112. package/lib/commonjs/shared/providers/stack/direct.provider.js.map +1 -1
  113. package/lib/commonjs/shared/stores/animation.store.js +2 -0
  114. package/lib/commonjs/shared/stores/animation.store.js.map +1 -1
  115. package/lib/commonjs/shared/stores/gesture.store.js +5 -1
  116. package/lib/commonjs/shared/stores/gesture.store.js.map +1 -1
  117. package/lib/commonjs/shared/stores/system.store.js +1 -4
  118. package/lib/commonjs/shared/stores/system.store.js.map +1 -1
  119. package/lib/commonjs/shared/types/animation.types.js.map +1 -1
  120. package/lib/commonjs/shared/types/gesture.types.js.map +1 -1
  121. package/lib/commonjs/shared/types/providers/blank-stack-provider.types.js +6 -0
  122. package/lib/commonjs/shared/types/providers/blank-stack-provider.types.js.map +1 -0
  123. package/lib/commonjs/shared/utils/animation/animate-to-progress.js +10 -4
  124. package/lib/commonjs/shared/utils/animation/animate-to-progress.js.map +1 -1
  125. package/lib/commonjs/shared/utils/animation/animate.js +22 -5
  126. package/lib/commonjs/shared/utils/animation/animate.js.map +1 -1
  127. package/lib/commonjs/shared/utils/animation/spring/index.js +13 -0
  128. package/lib/commonjs/shared/utils/animation/spring/index.js.map +1 -0
  129. package/lib/commonjs/shared/utils/animation/spring/spring.js +244 -0
  130. package/lib/commonjs/shared/utils/animation/spring/spring.js.map +1 -0
  131. package/lib/commonjs/shared/{types/providers/managed-stack.types.js → utils/animation/spring/springConfigs.js} +1 -1
  132. package/lib/commonjs/shared/utils/animation/spring/springConfigs.js.map +1 -0
  133. package/lib/commonjs/shared/utils/animation/spring/springUtils.js +313 -0
  134. package/lib/commonjs/shared/utils/animation/spring/springUtils.js.map +1 -0
  135. package/lib/commonjs/shared/utils/animation/state.js +2 -0
  136. package/lib/commonjs/shared/utils/animation/state.js.map +1 -0
  137. package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js +5 -5
  138. package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
  139. package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js +4 -4
  140. package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
  141. package/lib/module/blank-stack/components/stack-view.js +2 -2
  142. package/lib/module/blank-stack/components/stack-view.js.map +1 -1
  143. package/lib/module/component-stack/components/stack-view.js +2 -2
  144. package/lib/module/component-stack/components/stack-view.js.map +1 -1
  145. package/lib/module/shared/adapters/with-screen-transitions/stack-layout.js +1 -10
  146. package/lib/module/shared/adapters/with-screen-transitions/stack-layout.js.map +1 -1
  147. package/lib/module/shared/components/overlay/variations/float-overlay.js +1 -3
  148. package/lib/module/shared/components/overlay/variations/float-overlay.js.map +1 -1
  149. package/lib/module/shared/components/scene-view.js +1 -1
  150. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js +7 -7
  151. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js.map +1 -1
  152. package/lib/module/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js +2 -2
  153. package/lib/module/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js.map +1 -1
  154. package/lib/module/shared/components/screen-lifecycle/index.js +2 -2
  155. package/lib/module/shared/components/screen-lifecycle/index.js.map +1 -1
  156. package/lib/module/shared/constants.js +2 -12
  157. package/lib/module/shared/constants.js.map +1 -1
  158. package/lib/module/shared/hooks/navigation/use-screen-state.js +1 -3
  159. package/lib/module/shared/hooks/navigation/use-screen-state.js.map +1 -1
  160. package/lib/module/shared/hooks/navigation/use-stack.js.map +1 -1
  161. package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js +15 -12
  162. package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js.map +1 -1
  163. package/lib/module/shared/providers/screen/animation/helpers/build-screen-transition-options.js +2 -6
  164. package/lib/module/shared/providers/screen/animation/helpers/build-screen-transition-options.js.map +1 -1
  165. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.js.map +1 -1
  166. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +7 -24
  167. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
  168. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +1 -1
  169. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  170. package/lib/module/shared/providers/screen/animation/helpers/selected-interpolator-options.js +14 -1
  171. package/lib/module/shared/providers/screen/animation/helpers/selected-interpolator-options.js.map +1 -1
  172. package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js +1 -1
  173. package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -1
  174. package/lib/module/shared/providers/screen/gestures/gestures.provider.js +19 -6
  175. package/lib/module/shared/providers/screen/gestures/gestures.provider.js.map +1 -1
  176. package/lib/module/shared/providers/screen/gestures/ownership/compute-claimed-directions.js +2 -1
  177. package/lib/module/shared/providers/screen/gestures/ownership/compute-claimed-directions.js.map +1 -1
  178. package/lib/module/shared/providers/screen/gestures/pan/{pan-activation-decision.js → activation/pan-activation-decision.js} +5 -5
  179. package/lib/module/shared/providers/screen/gestures/pan/activation/pan-activation-decision.js.map +1 -0
  180. package/lib/module/shared/providers/screen/gestures/pan/{pan-activation-rules.js → activation/pan-activation-rules.js} +12 -9
  181. package/lib/module/shared/providers/screen/gestures/pan/activation/pan-activation-rules.js.map +1 -0
  182. package/lib/module/shared/providers/screen/gestures/pan/{pan-activation.js → activation/use-pan-activation.js} +15 -10
  183. package/lib/module/shared/providers/screen/gestures/pan/activation/use-pan-activation.js.map +1 -0
  184. package/lib/module/shared/providers/screen/gestures/pan/{pan-lifecycle.js → behavior/pan-lifecycle.js} +29 -8
  185. package/lib/module/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js.map +1 -0
  186. package/lib/module/shared/providers/screen/gestures/pan/{pan-release.js → behavior/pan-release.js} +5 -5
  187. package/lib/module/shared/providers/screen/gestures/pan/behavior/pan-release.js.map +1 -0
  188. package/lib/module/shared/providers/screen/gestures/pan/{pan-reset.js → behavior/pan-reset.js} +21 -11
  189. package/lib/module/shared/providers/screen/gestures/pan/behavior/pan-reset.js.map +1 -0
  190. package/lib/module/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js +75 -0
  191. package/lib/module/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js.map +1 -0
  192. package/lib/module/shared/providers/screen/gestures/pan/{build-pan-gesture.js → use-build-pan-gesture.js} +9 -7
  193. package/lib/module/shared/providers/screen/gestures/pan/use-build-pan-gesture.js.map +1 -0
  194. package/lib/module/shared/providers/screen/gestures/pinch/{pinch-activation.js → activation/use-pinch-activation.js} +12 -5
  195. package/lib/module/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js.map +1 -0
  196. package/lib/module/shared/providers/screen/gestures/pinch/{pinch-lifecycle.js → behavior/pinch-lifecycle.js} +7 -7
  197. package/lib/module/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js.map +1 -0
  198. package/lib/module/shared/providers/screen/gestures/pinch/{pinch-release.js → behavior/pinch-release.js} +4 -4
  199. package/lib/module/shared/providers/screen/gestures/pinch/behavior/pinch-release.js.map +1 -0
  200. package/lib/module/shared/providers/screen/gestures/pinch/{pinch-reset.js → behavior/pinch-reset.js} +6 -3
  201. package/lib/module/shared/providers/screen/gestures/pinch/behavior/pinch-reset.js.map +1 -0
  202. package/lib/module/shared/providers/screen/gestures/pinch/{use-pinch-behavior.js → behavior/use-pinch-behavior.js} +6 -5
  203. package/lib/module/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js.map +1 -0
  204. package/lib/module/shared/providers/screen/gestures/pinch/{build-pinch-gesture.js → use-build-pinch-gesture.js} +8 -6
  205. package/lib/module/shared/providers/screen/gestures/pinch/use-build-pinch-gesture.js.map +1 -0
  206. package/lib/module/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.js +57 -0
  207. package/lib/module/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.js.map +1 -0
  208. package/lib/module/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.js +15 -0
  209. package/lib/module/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.js.map +1 -0
  210. package/lib/module/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.js +24 -0
  211. package/lib/module/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.js.map +1 -0
  212. package/lib/module/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.js +40 -0
  213. package/lib/module/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.js.map +1 -0
  214. package/lib/module/shared/providers/screen/gestures/shared/directions.js +14 -4
  215. package/lib/module/shared/providers/screen/gestures/shared/directions.js.map +1 -1
  216. package/lib/module/shared/providers/screen/gestures/shared/policy.js +68 -3
  217. package/lib/module/shared/providers/screen/gestures/shared/policy.js.map +1 -1
  218. package/lib/module/shared/providers/screen/gestures/shared/reset.js +4 -13
  219. package/lib/module/shared/providers/screen/gestures/shared/reset.js.map +1 -1
  220. package/lib/module/shared/providers/screen/gestures/shared/runtime.js +1 -10
  221. package/lib/module/shared/providers/screen/gestures/shared/runtime.js.map +1 -1
  222. package/lib/module/shared/providers/screen/gestures/shared/snap-points.js +1 -1
  223. package/lib/module/shared/providers/screen/gestures/shared/snap-points.js.map +1 -1
  224. package/lib/module/shared/providers/screen/gestures/types.js +2 -0
  225. package/lib/module/shared/providers/screen/gestures/types.js.map +1 -1
  226. package/lib/module/shared/providers/screen/options/helpers.js +60 -24
  227. package/lib/module/shared/providers/screen/options/helpers.js.map +1 -1
  228. package/lib/module/shared/providers/screen/styles/components/{maybe-floating-container.js → floating-overlay-layer.js} +4 -4
  229. package/lib/module/shared/providers/screen/styles/components/floating-overlay-layer.js.map +1 -0
  230. package/lib/module/shared/providers/screen/styles/styles.provider.js +3 -3
  231. package/lib/module/shared/providers/screen/styles/styles.provider.js.map +1 -1
  232. package/lib/module/shared/providers/stack/{helpers/managed-stack-state/managed-stack-controller.js → blank-stack-state/blank-stack-controller.js} +9 -9
  233. package/lib/module/shared/providers/stack/blank-stack-state/blank-stack-controller.js.map +1 -0
  234. package/lib/module/shared/providers/stack/{helpers/managed-stack-state/helpers/build-managed-stack-state.js → blank-stack-state/helpers/build-blank-stack-state.js} +10 -10
  235. package/lib/module/shared/providers/stack/blank-stack-state/helpers/build-blank-stack-state.js.map +1 -0
  236. package/lib/module/shared/providers/stack/{helpers/managed-stack-state/helpers/derive-managed-stack-state.js → blank-stack-state/helpers/derive-blank-stack-state.js} +7 -7
  237. package/lib/module/shared/providers/stack/blank-stack-state/helpers/derive-blank-stack-state.js.map +1 -0
  238. package/lib/module/shared/providers/stack/blank-stack-state/helpers/navigation/compose-descriptors.js.map +1 -0
  239. package/lib/module/shared/providers/stack/blank-stack-state/helpers/navigation/resolve-scene-neighbors.js.map +1 -0
  240. package/lib/module/shared/{utils → providers/stack/blank-stack-state/helpers}/navigation/sync-routes-with-removed.js +6 -23
  241. package/lib/module/shared/providers/stack/blank-stack-state/helpers/navigation/sync-routes-with-removed.js.map +1 -0
  242. package/lib/module/shared/providers/stack/{helpers/managed-stack-state/helpers/reconcile-managed-routes.js → blank-stack-state/helpers/reconcile-blank-stack-routes.js} +5 -5
  243. package/lib/module/shared/providers/stack/blank-stack-state/helpers/reconcile-blank-stack-routes.js.map +1 -0
  244. package/lib/module/shared/providers/stack/{helpers/managed-stack-state/helpers/helpers.js → blank-stack-state/helpers/state-equality.js} +1 -1
  245. package/lib/module/shared/providers/stack/blank-stack-state/helpers/state-equality.js.map +1 -0
  246. package/lib/module/shared/providers/stack/blank-stack-state/helpers/types.js.map +1 -0
  247. package/lib/module/shared/providers/stack/{helpers/managed-stack-state → blank-stack-state}/index.js +3 -3
  248. package/lib/module/shared/providers/stack/blank-stack-state/index.js.map +1 -0
  249. package/lib/module/shared/providers/stack/{managed.provider.js → blank-stack.provider.js} +19 -26
  250. package/lib/module/shared/providers/stack/blank-stack.provider.js.map +1 -0
  251. package/lib/module/shared/providers/stack/direct.provider.js +3 -13
  252. package/lib/module/shared/providers/stack/direct.provider.js.map +1 -1
  253. package/lib/module/shared/stores/animation.store.js +2 -0
  254. package/lib/module/shared/stores/animation.store.js.map +1 -1
  255. package/lib/module/shared/stores/gesture.store.js +5 -1
  256. package/lib/module/shared/stores/gesture.store.js.map +1 -1
  257. package/lib/module/shared/stores/system.store.js +1 -4
  258. package/lib/module/shared/stores/system.store.js.map +1 -1
  259. package/lib/module/shared/types/animation.types.js.map +1 -1
  260. package/lib/module/shared/types/gesture.types.js.map +1 -1
  261. package/lib/module/shared/types/providers/blank-stack-provider.types.js +4 -0
  262. package/lib/module/shared/types/providers/blank-stack-provider.types.js.map +1 -0
  263. package/lib/module/shared/utils/animation/animate-to-progress.js +11 -5
  264. package/lib/module/shared/utils/animation/animate-to-progress.js.map +1 -1
  265. package/lib/module/shared/utils/animation/animate.js +21 -5
  266. package/lib/module/shared/utils/animation/animate.js.map +1 -1
  267. package/lib/module/shared/utils/animation/spring/index.js +4 -0
  268. package/lib/module/shared/utils/animation/spring/index.js.map +1 -0
  269. package/lib/module/shared/utils/animation/spring/spring.js +239 -0
  270. package/lib/module/shared/utils/animation/spring/spring.js.map +1 -0
  271. package/lib/module/shared/utils/animation/spring/springConfigs.js +4 -0
  272. package/lib/module/shared/utils/animation/spring/springConfigs.js.map +1 -0
  273. package/lib/module/shared/utils/animation/spring/springUtils.js +300 -0
  274. package/lib/module/shared/utils/animation/spring/springUtils.js.map +1 -0
  275. package/lib/module/shared/utils/animation/state.js +2 -0
  276. package/lib/module/shared/utils/animation/state.js.map +1 -0
  277. package/lib/module/shared/utils/bounds/navigation/reveal/build.js +5 -5
  278. package/lib/module/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
  279. package/lib/module/shared/utils/bounds/navigation/zoom/build.js +4 -4
  280. package/lib/module/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
  281. package/lib/typescript/blank-stack/components/stack-view.d.ts +1 -1
  282. package/lib/typescript/blank-stack/components/stack-view.d.ts.map +1 -1
  283. package/lib/typescript/component-stack/components/stack-view.d.ts +1 -1
  284. package/lib/typescript/component-stack/components/stack-view.d.ts.map +1 -1
  285. package/lib/typescript/shared/adapters/with-screen-transitions/stack-layout.d.ts.map +1 -1
  286. package/lib/typescript/shared/components/overlay/variations/float-overlay.d.ts.map +1 -1
  287. package/lib/typescript/shared/components/scene-view.d.ts +1 -1
  288. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition-intent.d.ts +1 -1
  289. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition-intent.d.ts.map +1 -1
  290. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-transition-start-controller.d.ts +2 -2
  291. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-transition-start-controller.d.ts.map +1 -1
  292. package/lib/typescript/shared/constants.d.ts +0 -9
  293. package/lib/typescript/shared/constants.d.ts.map +1 -1
  294. package/lib/typescript/shared/hooks/navigation/use-screen-state.d.ts.map +1 -1
  295. package/lib/typescript/shared/hooks/navigation/use-stack.d.ts +0 -2
  296. package/lib/typescript/shared/hooks/navigation/use-stack.d.ts.map +1 -1
  297. package/lib/typescript/shared/index.d.ts +12 -12
  298. package/lib/typescript/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.d.ts.map +1 -1
  299. package/lib/typescript/shared/providers/screen/animation/helpers/build-screen-transition-options.d.ts.map +1 -1
  300. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts.map +1 -1
  301. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/types.d.ts +1 -6
  302. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/types.d.ts.map +1 -1
  303. package/lib/typescript/shared/providers/screen/animation/helpers/selected-interpolator-options.d.ts.map +1 -1
  304. package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts +1 -1
  305. package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts.map +1 -1
  306. package/lib/typescript/shared/providers/screen/gestures/gestures.provider.d.ts.map +1 -1
  307. package/lib/typescript/shared/providers/screen/gestures/ownership/compute-claimed-directions.d.ts +2 -2
  308. package/lib/typescript/shared/providers/screen/gestures/ownership/compute-claimed-directions.d.ts.map +1 -1
  309. package/lib/typescript/shared/providers/screen/gestures/pan/{pan-activation-decision.d.ts → activation/pan-activation-decision.d.ts} +3 -3
  310. package/lib/typescript/shared/providers/screen/gestures/pan/activation/pan-activation-decision.d.ts.map +1 -0
  311. package/lib/typescript/shared/providers/screen/gestures/pan/{pan-activation-rules.d.ts → activation/pan-activation-rules.d.ts} +11 -11
  312. package/lib/typescript/shared/providers/screen/gestures/pan/activation/pan-activation-rules.d.ts.map +1 -0
  313. package/lib/typescript/shared/providers/screen/gestures/pan/{pan-activation.d.ts → activation/use-pan-activation.d.ts} +5 -4
  314. package/lib/typescript/shared/providers/screen/gestures/pan/activation/use-pan-activation.d.ts.map +1 -0
  315. package/lib/typescript/shared/providers/screen/gestures/pan/{pan-lifecycle.d.ts → behavior/pan-lifecycle.d.ts} +3 -2
  316. package/lib/typescript/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.d.ts.map +1 -0
  317. package/lib/typescript/shared/providers/screen/gestures/pan/{pan-release.d.ts → behavior/pan-release.d.ts} +1 -1
  318. package/lib/typescript/shared/providers/screen/gestures/pan/behavior/pan-release.d.ts.map +1 -0
  319. package/lib/typescript/shared/providers/screen/gestures/pan/{pan-reset.d.ts → behavior/pan-reset.d.ts} +4 -3
  320. package/lib/typescript/shared/providers/screen/gestures/pan/behavior/pan-reset.d.ts.map +1 -0
  321. package/lib/typescript/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.d.ts +5 -0
  322. package/lib/typescript/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.d.ts.map +1 -0
  323. package/lib/typescript/shared/providers/screen/gestures/pan/use-build-pan-gesture.d.ts +11 -0
  324. package/lib/typescript/shared/providers/screen/gestures/pan/use-build-pan-gesture.d.ts.map +1 -0
  325. package/lib/typescript/shared/providers/screen/gestures/pinch/{pinch-activation.d.ts → activation/use-pinch-activation.d.ts} +5 -4
  326. package/lib/typescript/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.d.ts.map +1 -0
  327. package/lib/typescript/shared/providers/screen/gestures/pinch/{pinch-lifecycle.d.ts → behavior/pinch-lifecycle.d.ts} +1 -1
  328. package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.d.ts.map +1 -0
  329. package/lib/typescript/shared/providers/screen/gestures/pinch/{pinch-release.d.ts → behavior/pinch-release.d.ts} +1 -1
  330. package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/pinch-release.d.ts.map +1 -0
  331. package/lib/typescript/shared/providers/screen/gestures/pinch/{pinch-reset.d.ts → behavior/pinch-reset.d.ts} +2 -2
  332. package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/pinch-reset.d.ts.map +1 -0
  333. package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.d.ts +5 -0
  334. package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.d.ts.map +1 -0
  335. package/lib/typescript/shared/providers/screen/gestures/pinch/use-build-pinch-gesture.d.ts +9 -0
  336. package/lib/typescript/shared/providers/screen/gestures/pinch/use-build-pinch-gesture.d.ts.map +1 -0
  337. package/lib/typescript/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.d.ts +15 -0
  338. package/lib/typescript/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.d.ts.map +1 -0
  339. package/lib/typescript/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.d.ts +4 -0
  340. package/lib/typescript/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.d.ts.map +1 -0
  341. package/lib/typescript/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.d.ts +5 -0
  342. package/lib/typescript/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.d.ts.map +1 -0
  343. package/lib/typescript/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.d.ts +9 -0
  344. package/lib/typescript/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.d.ts.map +1 -0
  345. package/lib/typescript/shared/providers/screen/gestures/shared/directions.d.ts +8 -6
  346. package/lib/typescript/shared/providers/screen/gestures/shared/directions.d.ts.map +1 -1
  347. package/lib/typescript/shared/providers/screen/gestures/shared/policy.d.ts +2 -2
  348. package/lib/typescript/shared/providers/screen/gestures/shared/policy.d.ts.map +1 -1
  349. package/lib/typescript/shared/providers/screen/gestures/shared/reset.d.ts.map +1 -1
  350. package/lib/typescript/shared/providers/screen/gestures/shared/runtime.d.ts.map +1 -1
  351. package/lib/typescript/shared/providers/screen/gestures/types.d.ts +14 -4
  352. package/lib/typescript/shared/providers/screen/gestures/types.d.ts.map +1 -1
  353. package/lib/typescript/shared/providers/screen/options/helpers.d.ts +2 -2
  354. package/lib/typescript/shared/providers/screen/options/helpers.d.ts.map +1 -1
  355. package/lib/typescript/shared/providers/screen/options/types.d.ts +4 -3
  356. package/lib/typescript/shared/providers/screen/options/types.d.ts.map +1 -1
  357. package/lib/typescript/shared/providers/screen/styles/components/floating-overlay-layer.d.ts +7 -0
  358. package/lib/typescript/shared/providers/screen/styles/components/floating-overlay-layer.d.ts.map +1 -0
  359. package/lib/typescript/shared/providers/stack/blank-stack-state/blank-stack-controller.d.ts +13 -0
  360. package/lib/typescript/shared/providers/stack/blank-stack-state/blank-stack-controller.d.ts.map +1 -0
  361. package/lib/typescript/shared/providers/stack/blank-stack-state/helpers/build-blank-stack-state.d.ts +13 -0
  362. package/lib/typescript/shared/providers/stack/blank-stack-state/helpers/build-blank-stack-state.d.ts.map +1 -0
  363. package/lib/typescript/shared/providers/stack/blank-stack-state/helpers/derive-blank-stack-state.d.ts +12 -0
  364. package/lib/typescript/shared/providers/stack/blank-stack-state/helpers/derive-blank-stack-state.d.ts.map +1 -0
  365. package/lib/typescript/shared/{utils → providers/stack/blank-stack-state/helpers}/navigation/compose-descriptors.d.ts +1 -1
  366. package/lib/typescript/shared/providers/stack/blank-stack-state/helpers/navigation/compose-descriptors.d.ts.map +1 -0
  367. package/lib/typescript/shared/providers/stack/blank-stack-state/helpers/navigation/resolve-scene-neighbors.d.ts.map +1 -0
  368. package/lib/typescript/shared/{utils → providers/stack/blank-stack-state/helpers}/navigation/sync-routes-with-removed.d.ts +2 -4
  369. package/lib/typescript/shared/providers/stack/blank-stack-state/helpers/navigation/sync-routes-with-removed.d.ts.map +1 -0
  370. package/lib/typescript/shared/providers/stack/blank-stack-state/helpers/reconcile-blank-stack-routes.d.ts +12 -0
  371. package/lib/typescript/shared/providers/stack/blank-stack-state/helpers/reconcile-blank-stack-routes.d.ts.map +1 -0
  372. package/lib/typescript/shared/providers/stack/{helpers/managed-stack-state/helpers/helpers.d.ts → blank-stack-state/helpers/state-equality.d.ts} +4 -4
  373. package/lib/typescript/shared/providers/stack/blank-stack-state/helpers/state-equality.d.ts.map +1 -0
  374. package/lib/typescript/shared/providers/stack/blank-stack-state/helpers/types.d.ts +39 -0
  375. package/lib/typescript/shared/providers/stack/blank-stack-state/helpers/types.d.ts.map +1 -0
  376. package/lib/typescript/shared/providers/stack/blank-stack-state/index.d.ts +12 -0
  377. package/lib/typescript/shared/providers/stack/blank-stack-state/index.d.ts.map +1 -0
  378. package/lib/typescript/shared/providers/stack/blank-stack.provider.d.ts +8 -0
  379. package/lib/typescript/shared/providers/stack/blank-stack.provider.d.ts.map +1 -0
  380. package/lib/typescript/shared/providers/stack/direct.provider.d.ts.map +1 -1
  381. package/lib/typescript/shared/stores/animation.store.d.ts +1 -0
  382. package/lib/typescript/shared/stores/animation.store.d.ts.map +1 -1
  383. package/lib/typescript/shared/stores/gesture.store.d.ts +2 -0
  384. package/lib/typescript/shared/stores/gesture.store.d.ts.map +1 -1
  385. package/lib/typescript/shared/stores/system.store.d.ts +1 -5
  386. package/lib/typescript/shared/stores/system.store.d.ts.map +1 -1
  387. package/lib/typescript/shared/types/animation.types.d.ts +12 -10
  388. package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
  389. package/lib/typescript/shared/types/bounds.types.d.ts +1 -1
  390. package/lib/typescript/shared/types/gesture.types.d.ts +24 -0
  391. package/lib/typescript/shared/types/gesture.types.d.ts.map +1 -1
  392. package/lib/typescript/shared/types/index.d.ts +1 -1
  393. package/lib/typescript/shared/types/index.d.ts.map +1 -1
  394. package/lib/typescript/shared/types/providers/{managed-stack.types.d.ts → blank-stack-provider.types.d.ts} +11 -11
  395. package/lib/typescript/shared/types/providers/blank-stack-provider.types.d.ts.map +1 -0
  396. package/lib/typescript/shared/types/screen.types.d.ts +7 -2
  397. package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
  398. package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts.map +1 -1
  399. package/lib/typescript/shared/utils/animation/animate.d.ts +8 -3
  400. package/lib/typescript/shared/utils/animation/animate.d.ts.map +1 -1
  401. package/lib/typescript/shared/utils/animation/spring/index.d.ts +3 -0
  402. package/lib/typescript/shared/utils/animation/spring/index.d.ts.map +1 -0
  403. package/lib/typescript/shared/utils/animation/spring/spring.d.ts +24 -0
  404. package/lib/typescript/shared/utils/animation/spring/spring.d.ts.map +1 -0
  405. package/lib/typescript/shared/utils/animation/spring/springConfigs.d.ts +46 -0
  406. package/lib/typescript/shared/utils/animation/spring/springConfigs.d.ts.map +1 -0
  407. package/lib/typescript/shared/utils/animation/spring/springUtils.d.ts +68 -0
  408. package/lib/typescript/shared/utils/animation/spring/springUtils.d.ts.map +1 -0
  409. package/lib/typescript/shared/utils/animation/state.d.ts +6 -0
  410. package/lib/typescript/shared/utils/animation/state.d.ts.map +1 -0
  411. package/lib/typescript/shared/utils/bounds/navigation/reveal/build.d.ts.map +1 -1
  412. package/lib/typescript/shared/utils/bounds/navigation/zoom/build.d.ts.map +1 -1
  413. package/package.json +1 -1
  414. package/src/blank-stack/components/stack-view.tsx +2 -2
  415. package/src/component-stack/components/stack-view.tsx +2 -2
  416. package/src/shared/adapters/with-screen-transitions/stack-layout.tsx +0 -14
  417. package/src/shared/components/overlay/variations/float-overlay.tsx +1 -7
  418. package/src/shared/components/scene-view.tsx +1 -1
  419. package/src/shared/components/screen-lifecycle/hooks/use-close-transition-intent.ts +11 -8
  420. package/src/shared/components/screen-lifecycle/hooks/use-transition-start-controller.ts +4 -4
  421. package/src/shared/components/screen-lifecycle/index.tsx +2 -2
  422. package/src/shared/constants.ts +1 -11
  423. package/src/shared/hooks/navigation/use-screen-state.ts +1 -7
  424. package/src/shared/hooks/navigation/use-stack.tsx +0 -2
  425. package/src/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.ts +19 -16
  426. package/src/shared/providers/screen/animation/helpers/build-screen-transition-options.ts +2 -17
  427. package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.ts +3 -3
  428. package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/index.ts +9 -51
  429. package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/types.ts +1 -7
  430. package/src/shared/providers/screen/animation/helpers/pipeline.ts +1 -1
  431. package/src/shared/providers/screen/animation/helpers/selected-interpolator-options.ts +24 -1
  432. package/src/shared/providers/screen/animation/helpers/use-build-transition-state.ts +2 -5
  433. package/src/shared/providers/screen/gestures/gestures.provider.tsx +21 -4
  434. package/src/shared/providers/screen/gestures/ownership/compute-claimed-directions.ts +6 -9
  435. package/src/shared/providers/screen/gestures/pan/{pan-activation-decision.ts → activation/pan-activation-decision.ts} +7 -7
  436. package/src/shared/providers/screen/gestures/pan/{pan-activation-rules.ts → activation/pan-activation-rules.ts} +32 -25
  437. package/src/shared/providers/screen/gestures/pan/{pan-activation.ts → activation/use-pan-activation.ts} +23 -12
  438. package/src/shared/providers/screen/gestures/pan/{pan-lifecycle.ts → behavior/pan-lifecycle.ts} +46 -8
  439. package/src/shared/providers/screen/gestures/pan/{pan-release.ts → behavior/pan-release.ts} +6 -6
  440. package/src/shared/providers/screen/gestures/pan/{pan-reset.ts → behavior/pan-reset.ts} +22 -12
  441. package/src/shared/providers/screen/gestures/pan/{use-pan-behavior.ts → behavior/use-pan-behavior.ts} +43 -10
  442. package/src/shared/providers/screen/gestures/pan/{build-pan-gesture.ts → use-build-pan-gesture.ts} +15 -6
  443. package/src/shared/providers/screen/gestures/pinch/{pinch-activation.ts → activation/use-pinch-activation.ts} +17 -5
  444. package/src/shared/providers/screen/gestures/pinch/{pinch-lifecycle.ts → behavior/pinch-lifecycle.ts} +10 -8
  445. package/src/shared/providers/screen/gestures/pinch/{pinch-release.ts → behavior/pinch-release.ts} +5 -5
  446. package/src/shared/providers/screen/gestures/pinch/{pinch-reset.ts → behavior/pinch-reset.ts} +11 -5
  447. package/src/shared/providers/screen/gestures/pinch/{use-pinch-behavior.ts → behavior/use-pinch-behavior.ts} +16 -6
  448. package/src/shared/providers/screen/gestures/pinch/{build-pinch-gesture.ts → use-build-pinch-gesture.ts} +18 -6
  449. package/src/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.ts +87 -0
  450. package/src/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.ts +19 -0
  451. package/src/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.ts +47 -0
  452. package/src/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.ts +55 -0
  453. package/src/shared/providers/screen/gestures/shared/directions.ts +27 -13
  454. package/src/shared/providers/screen/gestures/shared/policy.ts +99 -5
  455. package/src/shared/providers/screen/gestures/shared/reset.ts +9 -17
  456. package/src/shared/providers/screen/gestures/shared/runtime.ts +1 -14
  457. package/src/shared/providers/screen/gestures/shared/snap-points.ts +1 -1
  458. package/src/shared/providers/screen/gestures/types.ts +20 -3
  459. package/src/shared/providers/screen/options/helpers.ts +85 -30
  460. package/src/shared/providers/screen/options/types.ts +6 -5
  461. package/src/shared/providers/screen/styles/components/{maybe-floating-container.tsx → floating-overlay-layer.tsx} +6 -6
  462. package/src/shared/providers/screen/styles/styles.provider.tsx +3 -3
  463. package/src/shared/providers/stack/{helpers/managed-stack-state/managed-stack-controller.ts → blank-stack-state/blank-stack-controller.ts} +22 -20
  464. package/src/shared/providers/stack/{helpers/managed-stack-state/helpers/build-managed-stack-state.ts → blank-stack-state/helpers/build-blank-stack-state.ts} +28 -25
  465. package/src/shared/providers/stack/{helpers/managed-stack-state/helpers/derive-managed-stack-state.ts → blank-stack-state/helpers/derive-blank-stack-state.ts} +13 -13
  466. package/src/shared/{utils → providers/stack/blank-stack-state/helpers}/navigation/compose-descriptors.ts +1 -1
  467. package/src/shared/{utils → providers/stack/blank-stack-state/helpers}/navigation/sync-routes-with-removed.ts +8 -40
  468. package/src/shared/providers/stack/{helpers/managed-stack-state/helpers/reconcile-managed-routes.ts → blank-stack-state/helpers/reconcile-blank-stack-routes.ts} +26 -22
  469. package/src/shared/providers/stack/{helpers/managed-stack-state/helpers/helpers.ts → blank-stack-state/helpers/state-equality.ts} +4 -4
  470. package/src/shared/providers/stack/{helpers/managed-stack-state → blank-stack-state}/helpers/types.ts +16 -15
  471. package/src/shared/providers/stack/{helpers/managed-stack-state → blank-stack-state}/index.ts +9 -9
  472. package/src/shared/providers/stack/blank-stack.provider.tsx +118 -0
  473. package/src/shared/providers/stack/direct.provider.tsx +38 -54
  474. package/src/shared/stores/animation.store.ts +3 -0
  475. package/src/shared/stores/gesture.store.ts +6 -0
  476. package/src/shared/stores/system.store.ts +1 -9
  477. package/src/shared/types/animation.types.ts +12 -14
  478. package/src/shared/types/bounds.types.ts +1 -1
  479. package/src/shared/types/gesture.types.ts +33 -0
  480. package/src/shared/types/index.ts +4 -0
  481. package/src/shared/types/providers/{managed-stack.types.ts → blank-stack-provider.types.ts} +10 -10
  482. package/src/shared/types/screen.types.ts +7 -2
  483. package/src/shared/utils/animation/animate-to-progress.ts +18 -7
  484. package/src/shared/utils/animation/animate.ts +44 -21
  485. package/src/shared/utils/animation/spring/index.ts +2 -0
  486. package/src/shared/utils/animation/spring/spring.ts +343 -0
  487. package/src/shared/utils/animation/spring/springConfigs.ts +46 -0
  488. package/src/shared/utils/animation/spring/springUtils.ts +418 -0
  489. package/src/shared/utils/animation/state.ts +6 -0
  490. package/src/shared/utils/bounds/navigation/reveal/build.ts +5 -9
  491. package/src/shared/utils/bounds/navigation/zoom/build.ts +4 -6
  492. package/lib/commonjs/shared/hooks/navigation/use-closing-route-keys.js +0 -61
  493. package/lib/commonjs/shared/hooks/navigation/use-closing-route-keys.js.map +0 -1
  494. package/lib/commonjs/shared/hooks/navigation/use-optimistic-focused-index.js +0 -20
  495. package/lib/commonjs/shared/hooks/navigation/use-optimistic-focused-index.js.map +0 -1
  496. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/settle.js +0 -29
  497. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/settle.js.map +0 -1
  498. package/lib/commonjs/shared/providers/screen/gestures/pan/build-pan-gesture.js.map +0 -1
  499. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-activation-decision.js.map +0 -1
  500. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-activation-rules.js.map +0 -1
  501. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-activation.js.map +0 -1
  502. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-lifecycle.js.map +0 -1
  503. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-release.js.map +0 -1
  504. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-reset.js.map +0 -1
  505. package/lib/commonjs/shared/providers/screen/gestures/pan/use-pan-behavior.js.map +0 -1
  506. package/lib/commonjs/shared/providers/screen/gestures/pinch/build-pinch-gesture.js.map +0 -1
  507. package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-activation.js.map +0 -1
  508. package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-lifecycle.js.map +0 -1
  509. package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-release.js.map +0 -1
  510. package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-reset.js.map +0 -1
  511. package/lib/commonjs/shared/providers/screen/gestures/pinch/use-pinch-behavior.js.map +0 -1
  512. package/lib/commonjs/shared/providers/screen/styles/components/maybe-floating-container.js.map +0 -1
  513. package/lib/commonjs/shared/providers/stack/helpers/managed-stack-state/helpers/build-managed-stack-state.js.map +0 -1
  514. package/lib/commonjs/shared/providers/stack/helpers/managed-stack-state/helpers/derive-managed-stack-state.js +0 -58
  515. package/lib/commonjs/shared/providers/stack/helpers/managed-stack-state/helpers/derive-managed-stack-state.js.map +0 -1
  516. package/lib/commonjs/shared/providers/stack/helpers/managed-stack-state/helpers/helpers.js.map +0 -1
  517. package/lib/commonjs/shared/providers/stack/helpers/managed-stack-state/helpers/types.js.map +0 -1
  518. package/lib/commonjs/shared/providers/stack/helpers/managed-stack-state/index.js.map +0 -1
  519. package/lib/commonjs/shared/providers/stack/helpers/managed-stack-state/managed-stack-controller.js.map +0 -1
  520. package/lib/commonjs/shared/providers/stack/helpers/use-closing-route-map.js +0 -30
  521. package/lib/commonjs/shared/providers/stack/helpers/use-closing-route-map.js.map +0 -1
  522. package/lib/commonjs/shared/providers/stack/helpers/use-processed-routes.js +0 -58
  523. package/lib/commonjs/shared/providers/stack/helpers/use-processed-routes.js.map +0 -1
  524. package/lib/commonjs/shared/providers/stack/helpers/use-stack-derived.js +0 -27
  525. package/lib/commonjs/shared/providers/stack/helpers/use-stack-derived.js.map +0 -1
  526. package/lib/commonjs/shared/providers/stack/managed.provider.js.map +0 -1
  527. package/lib/commonjs/shared/types/providers/managed-stack.types.js.map +0 -1
  528. package/lib/commonjs/shared/utils/navigation/compose-descriptors.js.map +0 -1
  529. package/lib/commonjs/shared/utils/navigation/resolve-scene-neighbors.js.map +0 -1
  530. package/lib/commonjs/shared/utils/navigation/sync-routes-with-removed.js.map +0 -1
  531. package/lib/module/shared/hooks/navigation/use-closing-route-keys.js +0 -55
  532. package/lib/module/shared/hooks/navigation/use-closing-route-keys.js.map +0 -1
  533. package/lib/module/shared/hooks/navigation/use-optimistic-focused-index.js +0 -17
  534. package/lib/module/shared/hooks/navigation/use-optimistic-focused-index.js.map +0 -1
  535. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/settle.js +0 -22
  536. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/settle.js.map +0 -1
  537. package/lib/module/shared/providers/screen/gestures/pan/build-pan-gesture.js.map +0 -1
  538. package/lib/module/shared/providers/screen/gestures/pan/pan-activation-decision.js.map +0 -1
  539. package/lib/module/shared/providers/screen/gestures/pan/pan-activation-rules.js.map +0 -1
  540. package/lib/module/shared/providers/screen/gestures/pan/pan-activation.js.map +0 -1
  541. package/lib/module/shared/providers/screen/gestures/pan/pan-lifecycle.js.map +0 -1
  542. package/lib/module/shared/providers/screen/gestures/pan/pan-release.js.map +0 -1
  543. package/lib/module/shared/providers/screen/gestures/pan/pan-reset.js.map +0 -1
  544. package/lib/module/shared/providers/screen/gestures/pan/use-pan-behavior.js +0 -49
  545. package/lib/module/shared/providers/screen/gestures/pan/use-pan-behavior.js.map +0 -1
  546. package/lib/module/shared/providers/screen/gestures/pinch/build-pinch-gesture.js.map +0 -1
  547. package/lib/module/shared/providers/screen/gestures/pinch/pinch-activation.js.map +0 -1
  548. package/lib/module/shared/providers/screen/gestures/pinch/pinch-lifecycle.js.map +0 -1
  549. package/lib/module/shared/providers/screen/gestures/pinch/pinch-release.js.map +0 -1
  550. package/lib/module/shared/providers/screen/gestures/pinch/pinch-reset.js.map +0 -1
  551. package/lib/module/shared/providers/screen/gestures/pinch/use-pinch-behavior.js.map +0 -1
  552. package/lib/module/shared/providers/screen/styles/components/maybe-floating-container.js.map +0 -1
  553. package/lib/module/shared/providers/stack/helpers/managed-stack-state/helpers/build-managed-stack-state.js.map +0 -1
  554. package/lib/module/shared/providers/stack/helpers/managed-stack-state/helpers/derive-managed-stack-state.js.map +0 -1
  555. package/lib/module/shared/providers/stack/helpers/managed-stack-state/helpers/helpers.js.map +0 -1
  556. package/lib/module/shared/providers/stack/helpers/managed-stack-state/helpers/reconcile-managed-routes.js.map +0 -1
  557. package/lib/module/shared/providers/stack/helpers/managed-stack-state/helpers/types.js.map +0 -1
  558. package/lib/module/shared/providers/stack/helpers/managed-stack-state/index.js.map +0 -1
  559. package/lib/module/shared/providers/stack/helpers/managed-stack-state/managed-stack-controller.js.map +0 -1
  560. package/lib/module/shared/providers/stack/helpers/use-closing-route-map.js +0 -25
  561. package/lib/module/shared/providers/stack/helpers/use-closing-route-map.js.map +0 -1
  562. package/lib/module/shared/providers/stack/helpers/use-processed-routes.js +0 -54
  563. package/lib/module/shared/providers/stack/helpers/use-processed-routes.js.map +0 -1
  564. package/lib/module/shared/providers/stack/helpers/use-stack-derived.js +0 -23
  565. package/lib/module/shared/providers/stack/helpers/use-stack-derived.js.map +0 -1
  566. package/lib/module/shared/providers/stack/managed.provider.js.map +0 -1
  567. package/lib/module/shared/types/providers/managed-stack.types.js +0 -4
  568. package/lib/module/shared/types/providers/managed-stack.types.js.map +0 -1
  569. package/lib/module/shared/utils/navigation/compose-descriptors.js.map +0 -1
  570. package/lib/module/shared/utils/navigation/resolve-scene-neighbors.js.map +0 -1
  571. package/lib/module/shared/utils/navigation/sync-routes-with-removed.js.map +0 -1
  572. package/lib/typescript/shared/hooks/navigation/use-closing-route-keys.d.ts +0 -8
  573. package/lib/typescript/shared/hooks/navigation/use-closing-route-keys.d.ts.map +0 -1
  574. package/lib/typescript/shared/hooks/navigation/use-optimistic-focused-index.d.ts +0 -7
  575. package/lib/typescript/shared/hooks/navigation/use-optimistic-focused-index.d.ts.map +0 -1
  576. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/settle.d.ts +0 -5
  577. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/settle.d.ts.map +0 -1
  578. package/lib/typescript/shared/providers/screen/gestures/pan/build-pan-gesture.d.ts +0 -10
  579. package/lib/typescript/shared/providers/screen/gestures/pan/build-pan-gesture.d.ts.map +0 -1
  580. package/lib/typescript/shared/providers/screen/gestures/pan/pan-activation-decision.d.ts.map +0 -1
  581. package/lib/typescript/shared/providers/screen/gestures/pan/pan-activation-rules.d.ts.map +0 -1
  582. package/lib/typescript/shared/providers/screen/gestures/pan/pan-activation.d.ts.map +0 -1
  583. package/lib/typescript/shared/providers/screen/gestures/pan/pan-lifecycle.d.ts.map +0 -1
  584. package/lib/typescript/shared/providers/screen/gestures/pan/pan-release.d.ts.map +0 -1
  585. package/lib/typescript/shared/providers/screen/gestures/pan/pan-reset.d.ts.map +0 -1
  586. package/lib/typescript/shared/providers/screen/gestures/pan/use-pan-behavior.d.ts +0 -5
  587. package/lib/typescript/shared/providers/screen/gestures/pan/use-pan-behavior.d.ts.map +0 -1
  588. package/lib/typescript/shared/providers/screen/gestures/pinch/build-pinch-gesture.d.ts +0 -7
  589. package/lib/typescript/shared/providers/screen/gestures/pinch/build-pinch-gesture.d.ts.map +0 -1
  590. package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-activation.d.ts.map +0 -1
  591. package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-lifecycle.d.ts.map +0 -1
  592. package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-release.d.ts.map +0 -1
  593. package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-reset.d.ts.map +0 -1
  594. package/lib/typescript/shared/providers/screen/gestures/pinch/use-pinch-behavior.d.ts +0 -5
  595. package/lib/typescript/shared/providers/screen/gestures/pinch/use-pinch-behavior.d.ts.map +0 -1
  596. package/lib/typescript/shared/providers/screen/styles/components/maybe-floating-container.d.ts +0 -7
  597. package/lib/typescript/shared/providers/screen/styles/components/maybe-floating-container.d.ts.map +0 -1
  598. package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/helpers/build-managed-stack-state.d.ts +0 -13
  599. package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/helpers/build-managed-stack-state.d.ts.map +0 -1
  600. package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/helpers/derive-managed-stack-state.d.ts +0 -12
  601. package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/helpers/derive-managed-stack-state.d.ts.map +0 -1
  602. package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/helpers/helpers.d.ts.map +0 -1
  603. package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/helpers/reconcile-managed-routes.d.ts +0 -12
  604. package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/helpers/reconcile-managed-routes.d.ts.map +0 -1
  605. package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/helpers/types.d.ts +0 -39
  606. package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/helpers/types.d.ts.map +0 -1
  607. package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/index.d.ts +0 -12
  608. package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/index.d.ts.map +0 -1
  609. package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/managed-stack-controller.d.ts +0 -13
  610. package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/managed-stack-controller.d.ts.map +0 -1
  611. package/lib/typescript/shared/providers/stack/helpers/use-closing-route-map.d.ts +0 -7
  612. package/lib/typescript/shared/providers/stack/helpers/use-closing-route-map.d.ts.map +0 -1
  613. package/lib/typescript/shared/providers/stack/helpers/use-processed-routes.d.ts +0 -17
  614. package/lib/typescript/shared/providers/stack/helpers/use-processed-routes.d.ts.map +0 -1
  615. package/lib/typescript/shared/providers/stack/helpers/use-stack-derived.d.ts +0 -18
  616. package/lib/typescript/shared/providers/stack/helpers/use-stack-derived.d.ts.map +0 -1
  617. package/lib/typescript/shared/providers/stack/managed.provider.d.ts +0 -8
  618. package/lib/typescript/shared/providers/stack/managed.provider.d.ts.map +0 -1
  619. package/lib/typescript/shared/types/providers/managed-stack.types.d.ts.map +0 -1
  620. package/lib/typescript/shared/utils/navigation/compose-descriptors.d.ts.map +0 -1
  621. package/lib/typescript/shared/utils/navigation/resolve-scene-neighbors.d.ts.map +0 -1
  622. package/lib/typescript/shared/utils/navigation/sync-routes-with-removed.d.ts.map +0 -1
  623. package/src/shared/hooks/navigation/use-closing-route-keys.ts +0 -60
  624. package/src/shared/hooks/navigation/use-optimistic-focused-index.ts +0 -19
  625. package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/settle.ts +0 -41
  626. package/src/shared/providers/stack/helpers/use-closing-route-map.ts +0 -28
  627. package/src/shared/providers/stack/helpers/use-processed-routes.ts +0 -85
  628. package/src/shared/providers/stack/helpers/use-stack-derived.ts +0 -34
  629. package/src/shared/providers/stack/managed.provider.tsx +0 -126
  630. /package/lib/commonjs/shared/{utils → providers/stack/blank-stack-state/helpers}/navigation/compose-descriptors.js +0 -0
  631. /package/lib/commonjs/shared/{utils → providers/stack/blank-stack-state/helpers}/navigation/resolve-scene-neighbors.js +0 -0
  632. /package/lib/commonjs/shared/providers/stack/{helpers/managed-stack-state → blank-stack-state}/helpers/types.js +0 -0
  633. /package/lib/module/shared/{utils → providers/stack/blank-stack-state/helpers}/navigation/compose-descriptors.js +0 -0
  634. /package/lib/module/shared/{utils → providers/stack/blank-stack-state/helpers}/navigation/resolve-scene-neighbors.js +0 -0
  635. /package/lib/module/shared/providers/stack/{helpers/managed-stack-state → blank-stack-state}/helpers/types.js +0 -0
  636. /package/lib/typescript/shared/{utils → providers/stack/blank-stack-state/helpers}/navigation/resolve-scene-neighbors.d.ts +0 -0
  637. /package/src/shared/{utils → providers/stack/blank-stack-state/helpers}/navigation/resolve-scene-neighbors.ts +0 -0
@@ -60,12 +60,40 @@ export type SideActivation = {
60
60
  bottom?: ActivationArea;
61
61
  };
62
62
 
63
+ export type GestureDirectionActivationArea = ActivationArea | number;
64
+
65
+ export type GestureDirectionConfig = {
66
+ gesture: GestureDirection;
67
+ /**
68
+ * Pan-only activation area for this gesture direction. Pinch directions
69
+ * ignore this field.
70
+ *
71
+ * A number means an edge distance in points.
72
+ */
73
+ area?: GestureDirectionActivationArea;
74
+ };
75
+
76
+ export type GestureDirectionEntry = GestureDirection | GestureDirectionConfig;
77
+
78
+ export type GestureDirectionOption =
79
+ | GestureDirectionEntry
80
+ | GestureDirectionEntry[];
81
+
63
82
  export enum GestureActivationState {
64
83
  PENDING,
65
84
  PASSED,
66
85
  FAILED,
67
86
  }
68
87
 
88
+ export type ResolvedGestureActivationArea =
89
+ | GestureDirectionActivationArea
90
+ | {
91
+ left?: GestureDirectionActivationArea;
92
+ right?: GestureDirectionActivationArea;
93
+ top?: GestureDirectionActivationArea;
94
+ bottom?: GestureDirectionActivationArea;
95
+ };
96
+
69
97
  export type GestureActivationArea = ActivationArea | SideActivation;
70
98
 
71
99
  /**
@@ -86,6 +114,7 @@ export type RawGestureValues = {
86
114
  normY: number;
87
115
  scale: number;
88
116
  normScale: number;
117
+ rotation: number;
89
118
  };
90
119
 
91
120
  export type GestureValues = {
@@ -129,6 +158,10 @@ export type GestureValues = {
129
158
  * The live pinch focal point y-position in screen coordinates.
130
159
  */
131
160
  focalY: number;
161
+ /**
162
+ * The live two-finger rotation in radians.
163
+ */
164
+ rotation: number;
132
165
  /**
133
166
  * Physical gesture values before `gestureSensitivity` is applied.
134
167
  */
@@ -29,6 +29,10 @@ export type {
29
29
  ActivationArea,
30
30
  GestureActivationArea,
31
31
  GestureDirection,
32
+ GestureDirectionActivationArea,
33
+ GestureDirectionConfig,
34
+ GestureDirectionEntry,
35
+ GestureDirectionOption,
32
36
  GestureValues,
33
37
  PanGestureDirection,
34
38
  PinchGestureDirection,
@@ -9,10 +9,10 @@ import type {
9
9
  } from "../stack.types";
10
10
 
11
11
  /**
12
- * Props for managed stack - generic over descriptor and navigation types.
12
+ * Props for blank stack - generic over descriptor and navigation types.
13
13
  * Defaults to base types for backward compatibility.
14
14
  */
15
- export interface ManagedStackProps<
15
+ export interface BlankStackProviderProps<
16
16
  TDescriptor extends BaseStackDescriptor = BaseStackDescriptor,
17
17
  TNavigation extends BaseStackNavigation = BaseStackNavigation,
18
18
  > {
@@ -26,18 +26,18 @@ export interface ManagedStackProps<
26
26
  }
27
27
 
28
28
  /**
29
- * Context value for managed stack — only fields unique to managed lifecycle.
29
+ * Context value for blank stack — only fields unique to blank stack lifecycle.
30
30
  * Shared fields (routes, scenes, etc.) live in StackContext.
31
31
  */
32
- export interface ManagedStackContextValue {
32
+ export interface BlankStackProviderContextValue {
33
33
  handleCloseRoute: (payload: { route: BaseStackRoute }) => void;
34
34
  }
35
35
 
36
36
  /**
37
- * Props passed to the render child of `withManagedStack`.
37
+ * Props passed to the render child of `withBlankStack`.
38
38
  * Only the fields that stack-view components actually consume.
39
39
  */
40
- export interface ManagedStackRenderProps<
40
+ export interface BlankStackProviderRenderProps<
41
41
  TDescriptor extends BaseStackDescriptor = BaseStackDescriptor,
42
42
  > {
43
43
  scenes: BaseStackScene<TDescriptor>[];
@@ -46,12 +46,12 @@ export interface ManagedStackRenderProps<
46
46
  }
47
47
 
48
48
  /**
49
- * Internal result shape returned by useManagedStackValue.
49
+ * Internal result shape returned by useBlankStackProviderValue.
50
50
  */
51
- export interface ManagedStackResult<
51
+ export interface BlankStackProviderResult<
52
52
  TDescriptor extends BaseStackDescriptor = BaseStackDescriptor,
53
53
  > {
54
54
  stackContextValue: StackContextValue;
55
- managedContextValue: ManagedStackContextValue;
56
- renderProps: ManagedStackRenderProps<TDescriptor>;
55
+ blankStackProviderContextValue: BlankStackProviderContextValue;
56
+ renderProps: BlankStackProviderRenderProps<TDescriptor>;
57
57
  }
@@ -5,7 +5,7 @@ import type {
5
5
  } from "./animation.types";
6
6
  import type {
7
7
  GestureActivationArea,
8
- GestureDirection,
8
+ GestureDirectionOption,
9
9
  GestureProgressMode,
10
10
  } from "./gesture.types";
11
11
  import type { OverlayProps } from "./overlay.types";
@@ -174,8 +174,11 @@ export type ScreenTransitionConfig = {
174
174
  *
175
175
  * Supports pan directions (`horizontal`, `vertical`, etc.) and pinch
176
176
  * directions (`pinch-in`, `pinch-out`).
177
+ *
178
+ * Pan directions may be configured with an activation area:
179
+ * `[{ gesture: "vertical", area: "edge" }]`.
177
180
  */
178
- gestureDirection?: GestureDirection | GestureDirection[];
181
+ gestureDirection?: GestureDirectionOption;
179
182
 
180
183
  /**
181
184
  * Controls how directly live gesture movement maps into transition progress
@@ -251,6 +254,8 @@ export type ScreenTransitionConfig = {
251
254
 
252
255
  /**
253
256
  * The area of the screen where the gesture is activated.
257
+ *
258
+ * @deprecated Use `gestureDirection` entries with per-direction `area`.
254
259
  */
255
260
  gestureActivationArea?: GestureActivationArea;
256
261
 
@@ -2,7 +2,7 @@ import { runOnJS, type SharedValue } from "react-native-reanimated";
2
2
  import { FALSE, TRUE } from "../../constants";
3
3
  import type { AnimationStoreMap } from "../../stores/animation.store";
4
4
  import type { TransitionSpec } from "../../types/animation.types";
5
- import { animate } from "./animate";
5
+ import { animate, isSpringAnimationConfig } from "./animate";
6
6
 
7
7
  interface AnimateToProgressProps {
8
8
  /**
@@ -60,15 +60,20 @@ export const animateToProgress = ({
60
60
  // Select spec based on direction (closing uses close spec, otherwise open)
61
61
  const config = isClosing ? spec?.close : spec?.open;
62
62
 
63
- const isSpringConfig =
64
- !!config && !("duration" in config) && !("easing" in config);
63
+ const isSpringConfig = isSpringAnimationConfig(config);
65
64
 
66
65
  const effectiveConfig =
67
66
  isSpringConfig && typeof initialVelocity === "number"
68
67
  ? { ...config, velocity: initialVelocity }
69
68
  : config;
70
69
 
71
- const { progress, willAnimate, progressAnimating, entering } = animations;
70
+ const {
71
+ progress,
72
+ willAnimate,
73
+ progressAnimating,
74
+ progressSettled,
75
+ entering,
76
+ } = animations;
72
77
 
73
78
  const startAnimation = () => {
74
79
  "worklet";
@@ -81,6 +86,7 @@ export const animateToProgress = ({
81
86
 
82
87
  if (!config) {
83
88
  progressAnimating.set(FALSE);
89
+ progressSettled.set(TRUE);
84
90
  progress.set(value);
85
91
  if (shouldClearEnteringOnFinish) {
86
92
  entering.set(FALSE);
@@ -93,17 +99,22 @@ export const animateToProgress = ({
93
99
  }
94
100
 
95
101
  progressAnimating.set(TRUE); //<-- Do not move this into the callback
102
+ progressSettled.set(FALSE);
96
103
  progress.set(
97
- animate(value, effectiveConfig, (finished) => {
104
+ animate(value, effectiveConfig, (state) => {
98
105
  "worklet";
99
- if (!finished) return;
106
+ if (state.settled) {
107
+ progressSettled.set(TRUE);
108
+ }
109
+
110
+ if (!state.finished) return;
100
111
 
101
112
  if (shouldClearEnteringOnFinish) {
102
113
  entering.set(FALSE);
103
114
  }
104
115
 
105
116
  if (onAnimationFinish) {
106
- runOnJS(onAnimationFinish)(finished);
117
+ runOnJS(onAnimationFinish)(state.finished);
107
118
  }
108
119
 
109
120
  // Delay clearing progress animation by one frame to ensure final frame is painted
@@ -1,28 +1,51 @@
1
- import {
2
- type WithSpringConfig,
3
- type WithTimingConfig,
4
- withSpring,
5
- withTiming,
6
- } from "react-native-reanimated";
7
- import type {
8
- AnimatableValue,
9
- AnimationCallback,
10
- } from "react-native-reanimated/lib/typescript/commonTypes";
1
+ import type { WithTimingConfig } from "react-native-reanimated";
2
+ import { withTiming } from "react-native-reanimated";
3
+ import { type SpringConfig, withInternalSpring } from "./spring";
4
+ import type { AnimationStateCallback } from "./state";
11
5
 
12
- export const animate = <T extends AnimatableValue>(
13
- toValue: T,
14
- config?: WithSpringConfig | WithTimingConfig,
15
- callback?: AnimationCallback,
6
+ export type TimingAnimationConfig = WithTimingConfig;
7
+ export type SpringAnimationConfig = SpringConfig;
8
+ export type ScreenAnimationConfig =
9
+ | SpringAnimationConfig
10
+ | TimingAnimationConfig;
11
+
12
+ export const isSpringAnimationConfig = (
13
+ config: ScreenAnimationConfig | undefined,
14
+ ): config is SpringAnimationConfig => {
15
+ "worklet";
16
+ if (typeof config !== "object" || config === null) {
17
+ return false;
18
+ }
19
+
20
+ return (
21
+ "stiffness" in config ||
22
+ "damping" in config ||
23
+ "mass" in config ||
24
+ "velocity" in config ||
25
+ "overshootClamping" in config ||
26
+ "energyThreshold" in config ||
27
+ "dampingRatio" in config ||
28
+ "clamp" in config
29
+ );
30
+ };
31
+
32
+ export const animate = (
33
+ toValue: number,
34
+ config?: ScreenAnimationConfig,
35
+ callback?: AnimationStateCallback,
16
36
  ) => {
17
37
  "worklet";
18
- const isSpring =
19
- typeof config === "object" &&
20
- !("duration" in config) &&
21
- !("easing" in config);
22
38
 
23
- if (!isSpring) {
24
- return withTiming(toValue, config, callback);
39
+ if (!isSpringAnimationConfig(config)) {
40
+ return withTiming(toValue, config, (finished) => {
41
+ "worklet";
42
+ const didFinish = finished === true;
43
+ callback?.({
44
+ finished: didFinish,
45
+ settled: didFinish,
46
+ });
47
+ });
25
48
  }
26
49
 
27
- return withSpring(toValue, config, callback);
50
+ return withInternalSpring(toValue, config, callback);
28
51
  };
@@ -0,0 +1,2 @@
1
+ export { withInternalSpring } from "./spring";
2
+ export type { SpringConfig } from "./springConfigs";
@@ -0,0 +1,343 @@
1
+ import type {
2
+ Animation,
3
+ AnimationCallback,
4
+ ReduceMotion,
5
+ } from "react-native-reanimated";
6
+ import type { AnimationStateCallback } from "../state";
7
+ import type { SpringConfig } from "./springConfigs";
8
+ import type {
9
+ DefaultSpringConfig,
10
+ InnerSpringAnimation,
11
+ SpringAnimation,
12
+ SpringConfigInner,
13
+ } from "./springUtils";
14
+ import {
15
+ calculateNewStiffnessToMatchDuration,
16
+ checkIfConfigIsValid,
17
+ criticallyDampedSpringCalculations,
18
+ getEnergy,
19
+ initialCalculations,
20
+ isAnimationSettledCalculation,
21
+ isAnimationTerminatingCalculation,
22
+ safeMergeConfigs,
23
+ scaleZetaToMatchClamps,
24
+ underDampedSpringCalculations,
25
+ } from "./springUtils";
26
+
27
+ type Timestamp = number;
28
+
29
+ const REACT_NATIVE_RUNTIME_KIND = 1;
30
+ const REDUCE_MOTION_SYSTEM = "system";
31
+ const REDUCE_MOTION_ALWAYS = "always";
32
+ const DEFAULT_SPRING_SETTLE_DISTANCE = 0.001;
33
+
34
+ const DEFAULT_SPRING_CONFIG = {
35
+ damping: 120,
36
+ mass: 4,
37
+ stiffness: 900,
38
+ duration: 550,
39
+ dampingRatio: 1,
40
+ overshootClamping: false,
41
+ energyThreshold: 6e-9,
42
+ velocity: 0,
43
+ reduceMotion: undefined,
44
+ clamp: undefined,
45
+ } as const satisfies DefaultSpringConfig;
46
+
47
+ const getRuntimeKind = () => {
48
+ "worklet";
49
+ return (globalThis as { __RUNTIME_KIND?: number }).__RUNTIME_KIND;
50
+ };
51
+
52
+ const getReduceMotionForAnimation = (config?: ReduceMotion) => {
53
+ "worklet";
54
+ if (!config || config === REDUCE_MOTION_SYSTEM) {
55
+ return undefined;
56
+ }
57
+
58
+ return config === REDUCE_MOTION_ALWAYS;
59
+ };
60
+
61
+ const defineSpringAnimation = <TAnimation extends Animation<TAnimation>>(
62
+ _starting: number,
63
+ factory: () => TAnimation,
64
+ ): TAnimation => {
65
+ "worklet";
66
+ const create = (() => {
67
+ "worklet";
68
+ const animation = factory();
69
+ const baseOnStart = animation.onStart;
70
+
71
+ animation.onStart = (
72
+ animation: TAnimation,
73
+ value: Parameters<TAnimation["onStart"]>[1],
74
+ timestamp: Timestamp,
75
+ previousAnimation: Parameters<TAnimation["onStart"]>[3],
76
+ ) => {
77
+ "worklet";
78
+ if (animation.reduceMotion) {
79
+ animation.current = animation.toValue;
80
+ animation.onFrame = () => true;
81
+ return;
82
+ }
83
+
84
+ baseOnStart(animation, value, timestamp, previousAnimation);
85
+ };
86
+
87
+ return animation;
88
+ }) as (() => TAnimation) & { __isAnimationDefinition?: true };
89
+
90
+ if (getRuntimeKind() !== REACT_NATIVE_RUNTIME_KIND) {
91
+ return create();
92
+ }
93
+
94
+ create.__isAnimationDefinition = true;
95
+ return create as unknown as TAnimation;
96
+ };
97
+
98
+ type withSpringType = (
99
+ toValue: number,
100
+ userConfig?: SpringConfig,
101
+ callback?: AnimationStateCallback,
102
+ ) => number;
103
+
104
+ /**
105
+ * Internal numeric spring forked from Reanimated's `withSpring`.
106
+ *
107
+ * As of version 4.4, Reanimated resets the spring velocity to zero whenever it
108
+ * initially points away from the target (see
109
+ * https://github.com/software-mansion/react-native-reanimated/pull/9463).
110
+ * That's a reasonable fix for stale inherited velocity in Reanimated's public
111
+ * spring behavior, but our gesture release handoff relies on that
112
+ * away-from-target velocity on purpose. It's what preserves the visual
113
+ * dismissal tail controlled by `gestureReleaseVelocityScale`.
114
+ *
115
+ * We went with this fork rather than trying to recreate the velocity scale
116
+ * outside the spring, since that approach pushed too much state and timing
117
+ * logic into the transition layer, bloated the code, and made the handoff
118
+ * easier to get subtly wrong. Keeping the fork lets screen transitions hold on
119
+ * to the native spring handoff behavior while keeping our own surface small and
120
+ * easy to extend with callbacks tailored to the transition lifecycle.
121
+ */
122
+ export const withInternalSpring = ((
123
+ toValue: number,
124
+ userConfig?: SpringConfig,
125
+ callback?: AnimationStateCallback,
126
+ ): Animation<SpringAnimation> => {
127
+ "worklet";
128
+
129
+ return defineSpringAnimation<SpringAnimation>(toValue, () => {
130
+ "worklet";
131
+ const config: DefaultSpringConfig & SpringConfigInner = safeMergeConfigs<
132
+ DefaultSpringConfig & SpringConfigInner
133
+ >(
134
+ {
135
+ ...DEFAULT_SPRING_CONFIG,
136
+ useDuration: !!(userConfig?.duration || userConfig?.dampingRatio),
137
+ skipAnimation: false,
138
+ settleDistance: DEFAULT_SPRING_SETTLE_DISTANCE,
139
+ },
140
+ userConfig,
141
+ );
142
+
143
+ let settled = false;
144
+
145
+ const updateSettled = (animation: SpringAnimation) => {
146
+ "worklet";
147
+ if (settled) {
148
+ return;
149
+ }
150
+
151
+ if (!isAnimationSettledCalculation(animation, config)) {
152
+ return;
153
+ }
154
+
155
+ settled = true;
156
+ animation.settled = true;
157
+ };
158
+
159
+ config.skipAnimation = !checkIfConfigIsValid(config);
160
+
161
+ if (config.duration === 0) {
162
+ config.skipAnimation = true;
163
+ }
164
+
165
+ function springOnFrame(
166
+ animation: InnerSpringAnimation,
167
+ now: Timestamp,
168
+ ): boolean {
169
+ // eslint-disable-next-line @typescript-eslint/no-shadow
170
+ const { toValue, current } = animation;
171
+
172
+ if (config.skipAnimation) {
173
+ animation.current = toValue;
174
+ animation.lastTimestamp = 0;
175
+ return true;
176
+ }
177
+ const { lastTimestamp, velocity } = animation;
178
+
179
+ const deltaTime = Math.min(Math.max(now - lastTimestamp, 0), 64);
180
+ animation.lastTimestamp = now;
181
+
182
+ const t = deltaTime / 1000;
183
+ const v0 = velocity as number;
184
+ const x0 = current - toValue;
185
+
186
+ const { zeta, omega0, omega1 } = animation;
187
+
188
+ const { position: newPosition, velocity: newVelocity } =
189
+ zeta < 1
190
+ ? underDampedSpringCalculations(animation, {
191
+ zeta,
192
+ v0,
193
+ x0,
194
+ omega0,
195
+ omega1,
196
+ t,
197
+ })
198
+ : criticallyDampedSpringCalculations(animation, {
199
+ v0,
200
+ x0,
201
+ omega0,
202
+ t,
203
+ });
204
+
205
+ animation.current = newPosition;
206
+ animation.velocity = newVelocity;
207
+
208
+ if (isAnimationTerminatingCalculation(animation, config)) {
209
+ animation.velocity = 0;
210
+ animation.current = toValue;
211
+ settled = true;
212
+ animation.settled = true;
213
+ // clear lastTimestamp to avoid using stale value by the next spring animation that starts after this one
214
+ animation.lastTimestamp = 0;
215
+ return true;
216
+ }
217
+
218
+ updateSettled(animation);
219
+
220
+ return false;
221
+ }
222
+
223
+ function isTriggeredTwice(
224
+ previousAnimation: SpringAnimation | undefined,
225
+ animation: SpringAnimation,
226
+ ) {
227
+ return (
228
+ previousAnimation?.lastTimestamp &&
229
+ previousAnimation?.startTimestamp &&
230
+ previousAnimation?.toValue === animation.toValue &&
231
+ previousAnimation?.duration === animation.duration &&
232
+ previousAnimation?.dampingRatio === animation.dampingRatio
233
+ );
234
+ }
235
+
236
+ function onStart(
237
+ animation: SpringAnimation,
238
+ value: number,
239
+ now: Timestamp,
240
+ previousAnimation: SpringAnimation | undefined,
241
+ ): void {
242
+ animation.current = value;
243
+
244
+ let stiffness = config.stiffness;
245
+ const triggeredTwice = isTriggeredTwice(previousAnimation, animation);
246
+
247
+ const duration = config.duration;
248
+
249
+ const x0 = triggeredTwice
250
+ ? // If animation is triggered twice we want to continue the previous animation
251
+ // form the previous starting point
252
+ (previousAnimation?.startValue as number)
253
+ : value - (animation.toValue as number);
254
+
255
+ animation.startValue = x0;
256
+
257
+ if (previousAnimation) {
258
+ animation.velocity =
259
+ (triggeredTwice
260
+ ? previousAnimation?.velocity
261
+ : previousAnimation?.velocity + config.velocity) || 0;
262
+ } else {
263
+ animation.velocity = config.velocity || 0;
264
+ }
265
+
266
+ if (triggeredTwice) {
267
+ animation.zeta = previousAnimation?.zeta || 0;
268
+ animation.omega0 = previousAnimation?.omega0 || 0;
269
+ animation.omega1 = previousAnimation?.omega1 || 0;
270
+ } else {
271
+ if (config.useDuration) {
272
+ const actualDuration = triggeredTwice
273
+ ? // If animation is triggered twice we want to continue the previous animation
274
+ // so we need to include the time that already elapsed
275
+ duration -
276
+ ((previousAnimation?.lastTimestamp || 0) -
277
+ (previousAnimation?.startTimestamp || 0))
278
+ : duration;
279
+
280
+ config.duration = actualDuration;
281
+ stiffness = calculateNewStiffnessToMatchDuration(
282
+ x0,
283
+ config,
284
+ animation.velocity,
285
+ );
286
+ config.stiffness = stiffness;
287
+ }
288
+
289
+ const { zeta, omega0, omega1 } = initialCalculations(stiffness, config);
290
+ animation.zeta = zeta;
291
+ animation.omega0 = omega0;
292
+ animation.omega1 = omega1;
293
+
294
+ if (config.clamp !== undefined) {
295
+ animation.zeta = scaleZetaToMatchClamps(animation, config.clamp);
296
+ }
297
+ }
298
+
299
+ const initialEnergy = getEnergy(
300
+ x0,
301
+ config.velocity,
302
+ config.stiffness,
303
+ config.mass,
304
+ );
305
+ animation.initialEnergy = initialEnergy;
306
+
307
+ animation.lastTimestamp = previousAnimation?.lastTimestamp || now;
308
+
309
+ animation.startTimestamp = triggeredTwice
310
+ ? previousAnimation?.startTimestamp || now
311
+ : now;
312
+
313
+ updateSettled(animation);
314
+ }
315
+
316
+ const animation = {
317
+ onFrame: springOnFrame,
318
+ onStart,
319
+ toValue,
320
+ velocity: config.velocity || 0,
321
+ current: toValue,
322
+ settled: false,
323
+ startValue: 0,
324
+ callback: ((finished?: boolean) => {
325
+ "worklet";
326
+ const didFinish = finished === true;
327
+ callback?.({
328
+ finished: didFinish,
329
+ settled: didFinish || settled,
330
+ });
331
+ }) as AnimationCallback,
332
+ lastTimestamp: 0,
333
+ startTimestamp: 0,
334
+ zeta: 0,
335
+ omega0: 0,
336
+ omega1: 0,
337
+ initialEnergy: 0,
338
+ reduceMotion: getReduceMotionForAnimation(config.reduceMotion),
339
+ } as SpringAnimation;
340
+
341
+ return animation;
342
+ });
343
+ }) as unknown as withSpringType;
@@ -0,0 +1,46 @@
1
+ import type { ReduceMotion } from "react-native-reanimated";
2
+
3
+ /**
4
+ * Internal spring animation configuration.
5
+ *
6
+ * @param mass - The weight of the spring. Reducing this value makes the
7
+ * animation faster.
8
+ * @param damping - How quickly a spring slows down. Higher damping means the
9
+ * spring will come to rest faster.
10
+ * @param stiffness - How bouncy the spring is.
11
+ * @param duration - Perceptual duration of the animation in milliseconds.
12
+ * Actual duration is 1.5 times the value of perceptual duration.
13
+ * @param dampingRatio - How damped the spring is. Value `1` means the spring is
14
+ * critically damped, value `<1` means the spring is underdamped and value
15
+ * `>1` means the spring is overdamped.
16
+ * @param velocity - Initial velocity applied to the spring equation.
17
+ * @param overshootClamping - Whether a spring can bounce over the `toValue`.
18
+ * @param energyThreshold - Relative energy threshold below which the spring
19
+ * will snap to `toValue` without further oscillations.
20
+ * @param reduceMotion - Optional reduced-motion override. `ReduceMotion.Always`
21
+ * finishes immediately, `ReduceMotion.Never` runs normally, and
22
+ * `ReduceMotion.System` is treated like the default in this internal fork.
23
+ * @see https://docs.swmansion.com/react-native-reanimated/docs/animations/withSpring/#config-
24
+ */
25
+ export type SpringConfig = {
26
+ mass?: number;
27
+ overshootClamping?: boolean;
28
+ energyThreshold?: number;
29
+ velocity?: number;
30
+ reduceMotion?: ReduceMotion;
31
+ } & (
32
+ | {
33
+ stiffness?: number;
34
+ damping?: number;
35
+ duration?: never;
36
+ dampingRatio?: never;
37
+ clamp?: never;
38
+ }
39
+ | {
40
+ stiffness?: never;
41
+ damping?: never;
42
+ duration?: number;
43
+ dampingRatio?: number;
44
+ clamp?: { min?: number; max?: number };
45
+ }
46
+ );