react-native-screen-transitions 3.4.0-alpha.3 → 3.4.0-alpha.5

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 (328) hide show
  1. package/lib/commonjs/component-stack/components/component-screen.js +1 -1
  2. package/lib/commonjs/component-stack/components/component-screen.js.map +1 -1
  3. package/lib/commonjs/shared/animation/snap-to.js +6 -3
  4. package/lib/commonjs/shared/animation/snap-to.js.map +1 -1
  5. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +1 -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-group-active-measurement.js +47 -4
  8. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-measurement.js.map +1 -1
  9. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js +2 -2
  10. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js.map +1 -1
  11. package/lib/commonjs/shared/components/create-boundary-component/index.js +6 -6
  12. package/lib/commonjs/shared/components/create-boundary-component/index.js.map +1 -1
  13. package/lib/commonjs/shared/components/native-screen.js +3 -3
  14. package/lib/commonjs/shared/components/native-screen.js.map +1 -1
  15. package/lib/commonjs/shared/components/screen-container/deferred-visibility-host.js +1 -1
  16. package/lib/commonjs/shared/components/screen-container/deferred-visibility-host.js.map +1 -1
  17. package/lib/commonjs/shared/components/screen-container/hooks/use-content-layout.js +18 -14
  18. package/lib/commonjs/shared/components/screen-container/hooks/use-content-layout.js.map +1 -1
  19. package/lib/commonjs/shared/components/screen-container/layers/backdrop.js +8 -5
  20. package/lib/commonjs/shared/components/screen-container/layers/backdrop.js.map +1 -1
  21. package/lib/commonjs/shared/components/screen-container/layers/content.js +12 -28
  22. package/lib/commonjs/shared/components/screen-container/layers/content.js.map +1 -1
  23. package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js +17 -4
  24. package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
  25. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js +4 -2
  26. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js.map +1 -1
  27. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/index.js +6 -1
  28. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/index.js.map +1 -1
  29. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-open-transition.js +13 -11
  30. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-open-transition.js.map +1 -1
  31. package/lib/commonjs/shared/components/screen-lifecycle/index.js +5 -3
  32. package/lib/commonjs/shared/components/screen-lifecycle/index.js.map +1 -1
  33. package/lib/commonjs/shared/configs/presets.js +3 -4
  34. package/lib/commonjs/shared/configs/presets.js.map +1 -1
  35. package/lib/commonjs/shared/constants.js +16 -2
  36. package/lib/commonjs/shared/constants.js.map +1 -1
  37. package/lib/commonjs/shared/hooks/animation/use-associated-style.js +2 -2
  38. package/lib/commonjs/shared/hooks/animation/use-associated-style.js.map +1 -1
  39. package/lib/commonjs/shared/providers/gestures/handlers/use-handlers.js +12 -9
  40. package/lib/commonjs/shared/providers/gestures/handlers/use-handlers.js.map +1 -1
  41. package/lib/commonjs/shared/providers/gestures/helpers/gesture-physics.js +3 -2
  42. package/lib/commonjs/shared/providers/gestures/helpers/gesture-physics.js.map +1 -1
  43. package/lib/commonjs/shared/providers/gestures/helpers/gesture-reset.js +7 -5
  44. package/lib/commonjs/shared/providers/gestures/helpers/gesture-reset.js.map +1 -1
  45. package/lib/commonjs/shared/providers/gestures/helpers/gesture-snap-points.js +5 -5
  46. package/lib/commonjs/shared/providers/gestures/helpers/gesture-snap-points.js.map +1 -1
  47. package/lib/commonjs/shared/providers/gestures/helpers/gesture-targets.js +9 -6
  48. package/lib/commonjs/shared/providers/gestures/helpers/gesture-targets.js.map +1 -1
  49. package/lib/commonjs/shared/providers/gestures/helpers/register-direction-claims.js +1 -1
  50. package/lib/commonjs/shared/providers/gestures/helpers/register-direction-claims.js.map +1 -1
  51. package/lib/commonjs/shared/providers/gestures/use-build-gestures.js +1 -1
  52. package/lib/commonjs/shared/providers/gestures/use-build-gestures.js.map +1 -1
  53. package/lib/commonjs/shared/providers/register-bounds.provider.js +5 -5
  54. package/lib/commonjs/shared/providers/register-bounds.provider.js.map +1 -1
  55. package/lib/commonjs/shared/providers/screen/animation/helpers/has-transitions-enabled.js +17 -0
  56. package/lib/commonjs/shared/providers/screen/animation/helpers/has-transitions-enabled.js.map +1 -0
  57. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state.js +72 -0
  58. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state.js.map +1 -0
  59. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +22 -108
  60. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  61. package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js +42 -0
  62. package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -0
  63. package/lib/commonjs/shared/providers/screen/helpers/resolve-interpolated-style-output.js +17 -3
  64. package/lib/commonjs/shared/providers/screen/helpers/resolve-interpolated-style-output.js.map +1 -1
  65. package/lib/commonjs/shared/providers/screen/styles.provider.js +4 -1
  66. package/lib/commonjs/shared/providers/screen/styles.provider.js.map +1 -1
  67. package/lib/commonjs/shared/providers/stack/direct.provider.js +1 -1
  68. package/lib/commonjs/shared/providers/stack/direct.provider.js.map +1 -1
  69. package/lib/commonjs/shared/providers/stack/helpers/use-processed-routes.js +1 -1
  70. package/lib/commonjs/shared/providers/stack/helpers/use-processed-routes.js.map +1 -1
  71. package/lib/commonjs/shared/stores/animation.store.js +12 -40
  72. package/lib/commonjs/shared/stores/animation.store.js.map +1 -1
  73. package/lib/commonjs/shared/stores/gesture.store.js +13 -33
  74. package/lib/commonjs/shared/stores/gesture.store.js.map +1 -1
  75. package/lib/commonjs/shared/stores/system.store.js +31 -0
  76. package/lib/commonjs/shared/stores/system.store.js.map +1 -0
  77. package/lib/commonjs/shared/types/bounds.types.js +1 -3
  78. package/lib/commonjs/shared/types/bounds.types.js.map +1 -1
  79. package/lib/commonjs/shared/utils/animation/animate-to-progress.js +2 -2
  80. package/lib/commonjs/shared/utils/animation/animate-to-progress.js.map +1 -1
  81. package/lib/commonjs/shared/utils/bounds/helpers/compute-bounds-styles.js.map +1 -1
  82. package/lib/commonjs/shared/utils/bounds/index.js +23 -50
  83. package/lib/commonjs/shared/utils/bounds/index.js.map +1 -1
  84. package/lib/commonjs/shared/utils/bounds/zoom/build.js +108 -362
  85. package/lib/commonjs/shared/utils/bounds/zoom/build.js.map +1 -1
  86. package/lib/commonjs/shared/utils/bounds/zoom/config.js +15 -101
  87. package/lib/commonjs/shared/utils/bounds/zoom/config.js.map +1 -1
  88. package/lib/commonjs/shared/utils/bounds/zoom/math.js +154 -0
  89. package/lib/commonjs/shared/utils/bounds/zoom/math.js.map +1 -0
  90. package/lib/commonjs/shared/utils/bounds/zoom/types.js +1 -3
  91. package/lib/commonjs/shared/utils/bounds/zoom/types.js.map +1 -1
  92. package/lib/commonjs/shared/utils/create-store.js +54 -0
  93. package/lib/commonjs/shared/utils/create-store.js.map +1 -0
  94. package/lib/module/component-stack/components/component-screen.js +1 -1
  95. package/lib/module/component-stack/components/component-screen.js.map +1 -1
  96. package/lib/module/shared/animation/snap-to.js +6 -3
  97. package/lib/module/shared/animation/snap-to.js.map +1 -1
  98. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +1 -1
  99. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +1 -1
  100. package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-measurement.js +48 -5
  101. package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-measurement.js.map +1 -1
  102. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js +2 -2
  103. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js.map +1 -1
  104. package/lib/module/shared/components/create-boundary-component/index.js +6 -6
  105. package/lib/module/shared/components/create-boundary-component/index.js.map +1 -1
  106. package/lib/module/shared/components/native-screen.js +3 -3
  107. package/lib/module/shared/components/native-screen.js.map +1 -1
  108. package/lib/module/shared/components/screen-container/deferred-visibility-host.js +2 -2
  109. package/lib/module/shared/components/screen-container/deferred-visibility-host.js.map +1 -1
  110. package/lib/module/shared/components/screen-container/hooks/use-content-layout.js +18 -14
  111. package/lib/module/shared/components/screen-container/hooks/use-content-layout.js.map +1 -1
  112. package/lib/module/shared/components/screen-container/layers/backdrop.js +8 -5
  113. package/lib/module/shared/components/screen-container/layers/backdrop.js.map +1 -1
  114. package/lib/module/shared/components/screen-container/layers/content.js +13 -29
  115. package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
  116. package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js +19 -6
  117. package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
  118. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js +4 -2
  119. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js.map +1 -1
  120. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/index.js +6 -1
  121. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/index.js.map +1 -1
  122. package/lib/module/shared/components/screen-lifecycle/hooks/use-open-transition.js +13 -11
  123. package/lib/module/shared/components/screen-lifecycle/hooks/use-open-transition.js.map +1 -1
  124. package/lib/module/shared/components/screen-lifecycle/index.js +5 -3
  125. package/lib/module/shared/components/screen-lifecycle/index.js.map +1 -1
  126. package/lib/module/shared/configs/presets.js +3 -4
  127. package/lib/module/shared/configs/presets.js.map +1 -1
  128. package/lib/module/shared/constants.js +16 -2
  129. package/lib/module/shared/constants.js.map +1 -1
  130. package/lib/module/shared/hooks/animation/use-associated-style.js +2 -2
  131. package/lib/module/shared/hooks/animation/use-associated-style.js.map +1 -1
  132. package/lib/module/shared/providers/gestures/handlers/use-handlers.js +12 -9
  133. package/lib/module/shared/providers/gestures/handlers/use-handlers.js.map +1 -1
  134. package/lib/module/shared/providers/gestures/helpers/gesture-physics.js +3 -2
  135. package/lib/module/shared/providers/gestures/helpers/gesture-physics.js.map +1 -1
  136. package/lib/module/shared/providers/gestures/helpers/gesture-reset.js +7 -5
  137. package/lib/module/shared/providers/gestures/helpers/gesture-reset.js.map +1 -1
  138. package/lib/module/shared/providers/gestures/helpers/gesture-snap-points.js +5 -5
  139. package/lib/module/shared/providers/gestures/helpers/gesture-snap-points.js.map +1 -1
  140. package/lib/module/shared/providers/gestures/helpers/gesture-targets.js +9 -6
  141. package/lib/module/shared/providers/gestures/helpers/gesture-targets.js.map +1 -1
  142. package/lib/module/shared/providers/gestures/helpers/register-direction-claims.js +1 -1
  143. package/lib/module/shared/providers/gestures/helpers/register-direction-claims.js.map +1 -1
  144. package/lib/module/shared/providers/gestures/use-build-gestures.js +1 -1
  145. package/lib/module/shared/providers/gestures/use-build-gestures.js.map +1 -1
  146. package/lib/module/shared/providers/register-bounds.provider.js +5 -5
  147. package/lib/module/shared/providers/register-bounds.provider.js.map +1 -1
  148. package/lib/module/shared/providers/screen/animation/helpers/has-transitions-enabled.js +12 -0
  149. package/lib/module/shared/providers/screen/animation/helpers/has-transitions-enabled.js.map +1 -0
  150. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state.js +67 -0
  151. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state.js.map +1 -0
  152. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +22 -108
  153. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  154. package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js +37 -0
  155. package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -0
  156. package/lib/module/shared/providers/screen/helpers/resolve-interpolated-style-output.js +15 -2
  157. package/lib/module/shared/providers/screen/helpers/resolve-interpolated-style-output.js.map +1 -1
  158. package/lib/module/shared/providers/screen/styles.provider.js +5 -2
  159. package/lib/module/shared/providers/screen/styles.provider.js.map +1 -1
  160. package/lib/module/shared/providers/stack/direct.provider.js +1 -1
  161. package/lib/module/shared/providers/stack/direct.provider.js.map +1 -1
  162. package/lib/module/shared/providers/stack/helpers/use-processed-routes.js +1 -1
  163. package/lib/module/shared/providers/stack/helpers/use-processed-routes.js.map +1 -1
  164. package/lib/module/shared/stores/animation.store.js +12 -40
  165. package/lib/module/shared/stores/animation.store.js.map +1 -1
  166. package/lib/module/shared/stores/gesture.store.js +13 -33
  167. package/lib/module/shared/stores/gesture.store.js.map +1 -1
  168. package/lib/module/shared/stores/system.store.js +27 -0
  169. package/lib/module/shared/stores/system.store.js.map +1 -0
  170. package/lib/module/shared/types/bounds.types.js +9 -1
  171. package/lib/module/shared/types/bounds.types.js.map +1 -1
  172. package/lib/module/shared/utils/animation/animate-to-progress.js +2 -2
  173. package/lib/module/shared/utils/animation/animate-to-progress.js.map +1 -1
  174. package/lib/module/shared/utils/bounds/helpers/compute-bounds-styles.js.map +1 -1
  175. package/lib/module/shared/utils/bounds/index.js +23 -50
  176. package/lib/module/shared/utils/bounds/index.js.map +1 -1
  177. package/lib/module/shared/utils/bounds/zoom/build.js +101 -355
  178. package/lib/module/shared/utils/bounds/zoom/build.js.map +1 -1
  179. package/lib/module/shared/utils/bounds/zoom/config.js +12 -98
  180. package/lib/module/shared/utils/bounds/zoom/config.js.map +1 -1
  181. package/lib/module/shared/utils/bounds/zoom/math.js +136 -0
  182. package/lib/module/shared/utils/bounds/zoom/math.js.map +1 -0
  183. package/lib/module/shared/utils/bounds/zoom/types.js +1 -1
  184. package/lib/module/shared/utils/bounds/zoom/types.js.map +1 -1
  185. package/lib/module/shared/utils/create-store.js +50 -0
  186. package/lib/module/shared/utils/create-store.js.map +1 -0
  187. package/lib/typescript/shared/animation/snap-to.d.ts.map +1 -1
  188. package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-measurement.d.ts +1 -2
  189. package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-measurement.d.ts.map +1 -1
  190. package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-layout-handler.d.ts.map +1 -1
  191. package/lib/typescript/shared/components/create-boundary-component/index.d.ts.map +1 -1
  192. package/lib/typescript/shared/components/native-screen.d.ts.map +1 -1
  193. package/lib/typescript/shared/components/screen-container/hooks/use-content-layout.d.ts.map +1 -1
  194. package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -1
  195. package/lib/typescript/shared/components/screen-container/layers/content.d.ts.map +1 -1
  196. package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts.map +1 -1
  197. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.d.ts.map +1 -1
  198. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/index.d.ts +2 -1
  199. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/index.d.ts.map +1 -1
  200. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-open-transition.d.ts +2 -1
  201. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-open-transition.d.ts.map +1 -1
  202. package/lib/typescript/shared/components/screen-lifecycle/index.d.ts.map +1 -1
  203. package/lib/typescript/shared/configs/presets.d.ts.map +1 -1
  204. package/lib/typescript/shared/constants.d.ts.map +1 -1
  205. package/lib/typescript/shared/hooks/animation/use-associated-style.d.ts.map +1 -1
  206. package/lib/typescript/shared/index.d.ts +3 -3
  207. package/lib/typescript/shared/index.d.ts.map +1 -1
  208. package/lib/typescript/shared/providers/gestures/handlers/use-handlers.d.ts.map +1 -1
  209. package/lib/typescript/shared/providers/gestures/helpers/gesture-physics.d.ts.map +1 -1
  210. package/lib/typescript/shared/providers/gestures/helpers/gesture-reset.d.ts.map +1 -1
  211. package/lib/typescript/shared/providers/gestures/helpers/gesture-snap-points.d.ts +2 -2
  212. package/lib/typescript/shared/providers/gestures/helpers/gesture-snap-points.d.ts.map +1 -1
  213. package/lib/typescript/shared/providers/gestures/helpers/gesture-targets.d.ts.map +1 -1
  214. package/lib/typescript/shared/providers/gestures/use-build-gestures.d.ts.map +1 -1
  215. package/lib/typescript/shared/providers/register-bounds.provider.d.ts.map +1 -1
  216. package/lib/typescript/shared/providers/screen/animation/helpers/has-transitions-enabled.d.ts +8 -0
  217. package/lib/typescript/shared/providers/screen/animation/helpers/has-transitions-enabled.d.ts.map +1 -0
  218. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state.d.ts +22 -0
  219. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state.d.ts.map +1 -0
  220. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts +4 -2
  221. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
  222. package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts +21 -0
  223. package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts.map +1 -0
  224. package/lib/typescript/shared/providers/screen/helpers/resolve-interpolated-style-output.d.ts +6 -2
  225. package/lib/typescript/shared/providers/screen/helpers/resolve-interpolated-style-output.d.ts.map +1 -1
  226. package/lib/typescript/shared/providers/screen/styles.provider.d.ts.map +1 -1
  227. package/lib/typescript/shared/stores/animation.store.d.ts +10 -17
  228. package/lib/typescript/shared/stores/animation.store.d.ts.map +1 -1
  229. package/lib/typescript/shared/stores/gesture.store.d.ts +24 -14
  230. package/lib/typescript/shared/stores/gesture.store.d.ts.map +1 -1
  231. package/lib/typescript/shared/stores/system.store.d.ts +27 -0
  232. package/lib/typescript/shared/stores/system.store.d.ts.map +1 -0
  233. package/lib/typescript/shared/types/animation.types.d.ts +38 -9
  234. package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
  235. package/lib/typescript/shared/types/bounds.types.d.ts +14 -42
  236. package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
  237. package/lib/typescript/shared/types/index.d.ts +2 -2
  238. package/lib/typescript/shared/types/index.d.ts.map +1 -1
  239. package/lib/typescript/shared/types/screen.types.d.ts +11 -0
  240. package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
  241. package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts +3 -1
  242. package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts.map +1 -1
  243. package/lib/typescript/shared/utils/bounds/helpers/compute-bounds-styles.d.ts.map +1 -1
  244. package/lib/typescript/shared/utils/bounds/index.d.ts +2 -3
  245. package/lib/typescript/shared/utils/bounds/index.d.ts.map +1 -1
  246. package/lib/typescript/shared/utils/bounds/zoom/build.d.ts +2 -3
  247. package/lib/typescript/shared/utils/bounds/zoom/build.d.ts.map +1 -1
  248. package/lib/typescript/shared/utils/bounds/zoom/config.d.ts +15 -41
  249. package/lib/typescript/shared/utils/bounds/zoom/config.d.ts.map +1 -1
  250. package/lib/typescript/shared/utils/bounds/zoom/math.d.ts +44 -0
  251. package/lib/typescript/shared/utils/bounds/zoom/math.d.ts.map +1 -0
  252. package/lib/typescript/shared/utils/bounds/zoom/types.d.ts +8 -13
  253. package/lib/typescript/shared/utils/bounds/zoom/types.d.ts.map +1 -1
  254. package/lib/typescript/shared/utils/create-store.d.ts +14 -0
  255. package/lib/typescript/shared/utils/create-store.d.ts.map +1 -0
  256. package/package.json +1 -1
  257. package/src/component-stack/components/component-screen.tsx +1 -1
  258. package/src/shared/animation/snap-to.ts +10 -4
  259. package/src/shared/components/create-boundary-component/hooks/helpers/measurement-rules.ts +1 -1
  260. package/src/shared/components/create-boundary-component/hooks/use-group-active-measurement.ts +82 -10
  261. package/src/shared/components/create-boundary-component/hooks/use-initial-layout-handler.ts +2 -5
  262. package/src/shared/components/create-boundary-component/index.tsx +6 -12
  263. package/src/shared/components/native-screen.tsx +3 -9
  264. package/src/shared/components/screen-container/deferred-visibility-host.tsx +2 -2
  265. package/src/shared/components/screen-container/hooks/use-content-layout.ts +42 -43
  266. package/src/shared/components/screen-container/layers/backdrop.tsx +12 -6
  267. package/src/shared/components/screen-container/layers/content.tsx +17 -49
  268. package/src/shared/components/screen-container/layers/maybe-masked-navigation-container.tsx +26 -5
  269. package/src/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.ts +4 -2
  270. package/src/shared/components/screen-lifecycle/hooks/use-close-transition/index.ts +8 -0
  271. package/src/shared/components/screen-lifecycle/hooks/use-open-transition.ts +21 -10
  272. package/src/shared/components/screen-lifecycle/index.tsx +8 -2
  273. package/src/shared/configs/presets.ts +8 -7
  274. package/src/shared/constants.ts +14 -0
  275. package/src/shared/hooks/animation/use-associated-style.ts +2 -8
  276. package/src/shared/index.ts +2 -0
  277. package/src/shared/providers/gestures/handlers/use-handlers.ts +13 -10
  278. package/src/shared/providers/gestures/helpers/gesture-physics.ts +4 -2
  279. package/src/shared/providers/gestures/helpers/gesture-reset.ts +9 -5
  280. package/src/shared/providers/gestures/helpers/gesture-snap-points.ts +12 -10
  281. package/src/shared/providers/gestures/helpers/gesture-targets.ts +14 -6
  282. package/src/shared/providers/gestures/helpers/register-direction-claims.ts +1 -1
  283. package/src/shared/providers/gestures/use-build-gestures.ts +1 -3
  284. package/src/shared/providers/register-bounds.provider.tsx +5 -11
  285. package/src/shared/providers/screen/animation/helpers/has-transitions-enabled.ts +14 -0
  286. package/src/shared/providers/screen/animation/helpers/hydrate-transition-state.ts +108 -0
  287. package/src/shared/providers/screen/animation/helpers/pipeline.ts +37 -199
  288. package/src/shared/providers/screen/animation/helpers/use-build-transition-state.ts +77 -0
  289. package/src/shared/providers/screen/helpers/resolve-interpolated-style-output.ts +24 -4
  290. package/src/shared/providers/screen/styles.provider.tsx +5 -1
  291. package/src/shared/providers/stack/direct.provider.tsx +1 -1
  292. package/src/shared/providers/stack/helpers/use-processed-routes.ts +1 -1
  293. package/src/shared/stores/animation.store.ts +11 -61
  294. package/src/shared/stores/gesture.store.ts +25 -45
  295. package/src/shared/stores/system.store.ts +44 -0
  296. package/src/shared/types/animation.types.ts +41 -9
  297. package/src/shared/types/bounds.types.ts +25 -25
  298. package/src/shared/types/index.ts +2 -0
  299. package/src/shared/types/screen.types.ts +12 -0
  300. package/src/shared/utils/animation/animate-to-progress.ts +4 -2
  301. package/src/shared/utils/bounds/helpers/compute-bounds-styles.ts +0 -1
  302. package/src/shared/utils/bounds/index.ts +26 -75
  303. package/src/shared/utils/bounds/zoom/build.ts +179 -502
  304. package/src/shared/utils/bounds/zoom/config.ts +14 -164
  305. package/src/shared/utils/bounds/zoom/math.ts +193 -0
  306. package/src/shared/utils/bounds/zoom/types.ts +15 -17
  307. package/src/shared/utils/create-store.ts +62 -0
  308. package/lib/commonjs/shared/utils/bounds/types/frame-props.js +0 -6
  309. package/lib/commonjs/shared/utils/bounds/types/frame-props.js.map +0 -1
  310. package/lib/commonjs/shared/utils/bounds/zoom/accessor.js +0 -54
  311. package/lib/commonjs/shared/utils/bounds/zoom/accessor.js.map +0 -1
  312. package/lib/commonjs/shared/utils/bounds/zoom/index.js +0 -20
  313. package/lib/commonjs/shared/utils/bounds/zoom/index.js.map +0 -1
  314. package/lib/module/shared/utils/bounds/types/frame-props.js +0 -4
  315. package/lib/module/shared/utils/bounds/types/frame-props.js.map +0 -1
  316. package/lib/module/shared/utils/bounds/zoom/accessor.js +0 -49
  317. package/lib/module/shared/utils/bounds/zoom/accessor.js.map +0 -1
  318. package/lib/module/shared/utils/bounds/zoom/index.js +0 -5
  319. package/lib/module/shared/utils/bounds/zoom/index.js.map +0 -1
  320. package/lib/typescript/shared/utils/bounds/types/frame-props.d.ts +0 -5
  321. package/lib/typescript/shared/utils/bounds/types/frame-props.d.ts.map +0 -1
  322. package/lib/typescript/shared/utils/bounds/zoom/accessor.d.ts +0 -17
  323. package/lib/typescript/shared/utils/bounds/zoom/accessor.d.ts.map +0 -1
  324. package/lib/typescript/shared/utils/bounds/zoom/index.d.ts +0 -3
  325. package/lib/typescript/shared/utils/bounds/zoom/index.d.ts.map +0 -1
  326. package/src/shared/utils/bounds/types/frame-props.ts +0 -5
  327. package/src/shared/utils/bounds/zoom/accessor.ts +0 -69
  328. package/src/shared/utils/bounds/zoom/index.ts +0 -2
@@ -25,6 +25,7 @@ import {
25
25
  import useStableCallbackValue from "../../../hooks/use-stable-callback-value";
26
26
  import { AnimationStore } from "../../../stores/animation.store";
27
27
  import { GestureStore } from "../../../stores/gesture.store";
28
+ import { SystemStore } from "../../../stores/system.store";
28
29
  import { GestureOffsetState } from "../../../types/gesture.types";
29
30
  import type {
30
31
  ClaimedDirections,
@@ -154,8 +155,9 @@ export const useHandlers = ({
154
155
 
155
156
  const dimensions = useWindowDimensions();
156
157
  const routeKey = current.route.key;
157
- const animations = AnimationStore.getRouteAnimations(routeKey);
158
- const gestureAnimationValues = GestureStore.getRouteGestures(routeKey);
158
+ const animations = AnimationStore.getBag(routeKey);
159
+ const gestureAnimationValues = GestureStore.getBag(routeKey);
160
+ const targetProgressValue = SystemStore.getValue(routeKey, "targetProgress");
159
161
  const {
160
162
  hasSnapPoints,
161
163
  hasAutoSnapPoint,
@@ -165,9 +167,9 @@ export const useHandlers = ({
165
167
  } = effectiveSnapPoints;
166
168
 
167
169
  // Read the measured "auto" snap point reactively inside worklets.
168
- const autoSnapPointValue = AnimationStore.getAnimation(
170
+ const resolvedAutoSnapPointValue = SystemStore.getValue(
169
171
  routeKey,
170
- "autoSnapPoint",
172
+ "resolvedAutoSnapPoint",
171
173
  );
172
174
 
173
175
  const directions = useMemo(() => {
@@ -307,7 +309,7 @@ export const useHandlers = ({
307
309
  const { resolvedMaxSnapPoint } = resolveRuntimeSnapPoints({
308
310
  snapPoints,
309
311
  hasAutoSnapPoint,
310
- autoSnapPoint: autoSnapPointValue.value,
312
+ resolvedAutoSnapPoint: resolvedAutoSnapPointValue.value,
311
313
  minSnapPoint,
312
314
  maxSnapPoint,
313
315
  canDismiss,
@@ -318,7 +320,7 @@ export const useHandlers = ({
318
320
 
319
321
  const canExpandMore =
320
322
  animations.progress.value < effectiveMaxSnapPoint - EPSILON &&
321
- animations.targetProgress.value < effectiveMaxSnapPoint - EPSILON;
323
+ targetProgressValue.value < effectiveMaxSnapPoint - EPSILON;
322
324
 
323
325
  if (!canExpandMore) {
324
326
  manager.fail();
@@ -339,7 +341,7 @@ export const useHandlers = ({
339
341
  resolveRuntimeSnapPoints({
340
342
  snapPoints,
341
343
  hasAutoSnapPoint,
342
- autoSnapPoint: autoSnapPointValue.value,
344
+ resolvedAutoSnapPoint: resolvedAutoSnapPointValue.value,
343
345
  minSnapPoint,
344
346
  maxSnapPoint,
345
347
  canDismiss,
@@ -357,7 +359,6 @@ export const useHandlers = ({
357
359
  gestureAnimationValues.dragging.value = TRUE;
358
360
  gestureAnimationValues.dismissing.value = FALSE;
359
361
  gestureStartProgress.value = animations.progress.value;
360
- animations.animating.value = TRUE;
361
362
  });
362
363
 
363
364
  const onUpdate = useStableCallbackValue(
@@ -392,7 +393,7 @@ export const useHandlers = ({
392
393
  resolveRuntimeSnapPoints({
393
394
  snapPoints,
394
395
  hasAutoSnapPoint,
395
- autoSnapPoint: autoSnapPointValue.value,
396
+ resolvedAutoSnapPoint: resolvedAutoSnapPointValue.value,
396
397
  minSnapPoint,
397
398
  maxSnapPoint,
398
399
  canDismiss,
@@ -468,7 +469,7 @@ export const useHandlers = ({
468
469
  const { resolvedSnapPoints } = resolveRuntimeSnapPoints({
469
470
  snapPoints,
470
471
  hasAutoSnapPoint,
471
- autoSnapPoint: autoSnapPointValue.value,
472
+ resolvedAutoSnapPoint: resolvedAutoSnapPointValue.value,
472
473
  minSnapPoint,
473
474
  maxSnapPoint,
474
475
  canDismiss,
@@ -535,6 +536,7 @@ export const useHandlers = ({
535
536
  onAnimationFinish: shouldDismiss ? handleDismiss : undefined,
536
537
  spec: effectiveSpec,
537
538
  animations,
539
+ targetProgress: targetProgressValue,
538
540
  initialVelocity,
539
541
  });
540
542
  } else {
@@ -576,6 +578,7 @@ export const useHandlers = ({
576
578
  onAnimationFinish: shouldDismiss ? handleDismiss : undefined,
577
579
  spec: transitionSpec,
578
580
  animations,
581
+ targetProgress: targetProgressValue,
579
582
  initialVelocity: scaledInitialVelocity,
580
583
  });
581
584
  }
@@ -31,10 +31,12 @@ type GestureAxisCandidate = {
31
31
  export const normalizeVelocity = (
32
32
  velocityPixelsPerSecond: number,
33
33
  screenSize: number,
34
- maxMagnitude: number = DEFAULT_GESTURE_RELEASE_VELOCITY_MAX,
34
+ maxMagnitude?: number,
35
35
  ) => {
36
36
  "worklet";
37
- const max = Math.max(0, Math.abs(maxMagnitude));
37
+ const resolvedMaxMagnitude =
38
+ maxMagnitude ?? DEFAULT_GESTURE_RELEASE_VELOCITY_MAX;
39
+ const max = Math.max(0, Math.abs(resolvedMaxMagnitude));
38
40
  return clamp(velocityPixelsPerSecond / Math.max(1, screenSize), -max, max);
39
41
  };
40
42
 
@@ -32,14 +32,18 @@ export const resetGestureValues = ({
32
32
  shouldDismiss,
33
33
  event,
34
34
  dimensions,
35
- gestureReleaseVelocityScale = DEFAULT_GESTURE_RELEASE_VELOCITY_SCALE,
36
- gestureReleaseVelocityMax = DEFAULT_GESTURE_RELEASE_VELOCITY_MAX,
35
+ gestureReleaseVelocityScale,
36
+ gestureReleaseVelocityMax,
37
37
  }: ResetGestureValuesProps) => {
38
38
  "worklet";
39
+ const resolvedGestureReleaseVelocityScale =
40
+ gestureReleaseVelocityScale ?? DEFAULT_GESTURE_RELEASE_VELOCITY_SCALE;
41
+ const resolvedGestureReleaseVelocityMax =
42
+ gestureReleaseVelocityMax ?? DEFAULT_GESTURE_RELEASE_VELOCITY_MAX;
39
43
 
40
44
  const effectiveReleaseVelocityMax = Math.max(
41
45
  0,
42
- Math.abs(gestureReleaseVelocityMax),
46
+ Math.abs(resolvedGestureReleaseVelocityMax),
43
47
  );
44
48
 
45
49
  const vxNorm = normalizeVelocity(
@@ -67,11 +71,11 @@ export const resetGestureValues = ({
67
71
  // so the spring carries the gesture's momentum. The spec controls the
68
72
  // spring character — use an underdamped spec (e.g. FlingSpec) for orbit/fling.
69
73
  const resetVX = shouldDismiss
70
- ? vxNorm * gestureReleaseVelocityScale
74
+ ? vxNorm * resolvedGestureReleaseVelocityScale
71
75
  : vxTowardZero;
72
76
 
73
77
  const resetVY = shouldDismiss
74
- ? vyNorm * gestureReleaseVelocityScale
78
+ ? vyNorm * resolvedGestureReleaseVelocityScale
75
79
  : vyTowardZero;
76
80
 
77
81
  animateMany({
@@ -1,7 +1,7 @@
1
1
  interface ResolveRuntimeSnapPointsProps {
2
2
  snapPoints: number[];
3
3
  hasAutoSnapPoint: boolean;
4
- autoSnapPoint: number;
4
+ resolvedAutoSnapPoint: number;
5
5
  minSnapPoint: number;
6
6
  maxSnapPoint: number;
7
7
  canDismiss: boolean;
@@ -17,31 +17,33 @@ interface ResolvedRuntimeSnapPointsResult {
17
17
  export const resolveRuntimeSnapPoints = ({
18
18
  snapPoints,
19
19
  hasAutoSnapPoint,
20
- autoSnapPoint,
20
+ resolvedAutoSnapPoint,
21
21
  minSnapPoint,
22
22
  maxSnapPoint,
23
23
  canDismiss,
24
24
  }: ResolveRuntimeSnapPointsProps): ResolvedRuntimeSnapPointsResult => {
25
25
  "worklet";
26
26
 
27
- const resolvedAutoSnapPoint =
28
- hasAutoSnapPoint && autoSnapPoint > 0 ? autoSnapPoint : null;
27
+ const nextResolvedAutoSnapPoint =
28
+ hasAutoSnapPoint && resolvedAutoSnapPoint > 0
29
+ ? resolvedAutoSnapPoint
30
+ : null;
29
31
 
30
32
  const resolvedSnapPoints =
31
- resolvedAutoSnapPoint === null
33
+ nextResolvedAutoSnapPoint === null
32
34
  ? snapPoints
33
- : [...snapPoints, resolvedAutoSnapPoint].sort((a, b) => a - b);
35
+ : [...snapPoints, nextResolvedAutoSnapPoint].sort((a, b) => a - b);
34
36
 
35
37
  const resolvedMinSnapPoint =
36
- resolvedAutoSnapPoint !== null && !canDismiss
38
+ nextResolvedAutoSnapPoint !== null && !canDismiss
37
39
  ? Math.min(
38
- minSnapPoint === -1 ? resolvedAutoSnapPoint : minSnapPoint,
39
- resolvedAutoSnapPoint,
40
+ minSnapPoint === -1 ? nextResolvedAutoSnapPoint : minSnapPoint,
41
+ nextResolvedAutoSnapPoint,
40
42
  )
41
43
  : minSnapPoint;
42
44
 
43
45
  return {
44
- resolvedAutoSnapPoint,
46
+ resolvedAutoSnapPoint: nextResolvedAutoSnapPoint,
45
47
  resolvedSnapPoints,
46
48
  resolvedMinSnapPoint,
47
49
  resolvedMaxSnapPoint:
@@ -111,22 +111,30 @@ export function determineSnapTarget({
111
111
  snapPoints,
112
112
  velocity,
113
113
  dimension,
114
- velocityFactor = DEFAULT_GESTURE_SNAP_VELOCITY_IMPACT,
115
- canDismiss = true,
114
+ velocityFactor,
115
+ canDismiss,
116
116
  }: DetermineSnapTargetProps): DetermineSnapTargetResult {
117
117
  "worklet";
118
+ const resolvedVelocityFactor =
119
+ velocityFactor ?? DEFAULT_GESTURE_SNAP_VELOCITY_IMPACT;
120
+ const resolvedCanDismiss = canDismiss ?? true;
118
121
 
119
122
  // Convert velocity to progress units (positive = toward dismiss = decreasing progress)
120
- const velocityInProgress = (velocity / dimension) * velocityFactor;
123
+ const velocityInProgress = (velocity / dimension) * resolvedVelocityFactor;
121
124
 
122
125
  // Project where we'd end up with velocity
123
126
  const projectedProgress = currentProgress - velocityInProgress;
124
127
 
125
- const sanitizedSnapPoints = sanitizeSnapPoints(snapPoints, canDismiss);
128
+ const sanitizedSnapPoints = sanitizeSnapPoints(
129
+ snapPoints,
130
+ resolvedCanDismiss,
131
+ );
126
132
 
127
133
  // Build all possible targets: dismiss (0) only if allowed, plus all snap points
128
134
  const allTargets = Array.from(
129
- new Set(canDismiss ? [0, ...sanitizedSnapPoints] : sanitizedSnapPoints),
135
+ new Set(
136
+ resolvedCanDismiss ? [0, ...sanitizedSnapPoints] : sanitizedSnapPoints,
137
+ ),
130
138
  ).sort((a, b) => a - b);
131
139
 
132
140
  if (allTargets.length === 0) {
@@ -162,6 +170,6 @@ export function determineSnapTarget({
162
170
 
163
171
  return {
164
172
  targetProgress,
165
- shouldDismiss: canDismiss && targetProgress === 0,
173
+ shouldDismiss: resolvedCanDismiss && targetProgress === 0,
166
174
  };
167
175
  }
@@ -25,7 +25,7 @@ export function useRegisterDirectionClaims(
25
25
  return;
26
26
  }
27
27
 
28
- const gestureValues = GestureStore.getRouteGestures(routeKey);
28
+ const gestureValues = GestureStore.getBag(routeKey);
29
29
  const isDismissing = gestureValues.dismissing;
30
30
 
31
31
  const claimedAncestors: Array<{
@@ -83,9 +83,7 @@ export const useBuildGestures = ({
83
83
  const { dismissScreen } = useNavigationHelpers();
84
84
 
85
85
  const panGestureRef = useRef<GestureType | undefined>(undefined);
86
- const gestureAnimationValues = GestureStore.getRouteGestures(
87
- current.route.key,
88
- );
86
+ const gestureAnimationValues = GestureStore.getBag(current.route.key);
89
87
 
90
88
  const { snapPoints: rawSnapPoints } = current.options;
91
89
  const canDismiss = Boolean(
@@ -83,14 +83,11 @@ const useInitialLayoutHandler = (params: {
83
83
  maybeMeasureAndStore,
84
84
  } = params;
85
85
 
86
- const isAnimating = AnimationStore.getRouteAnimation(
87
- currentScreenKey,
88
- "animating",
89
- );
86
+ const isAnimating = AnimationStore.getValue(currentScreenKey, "animating");
90
87
 
91
88
  // Check if any ancestor is animating
92
89
  const ancestorAnimations = ancestorKeys.map((key) =>
93
- AnimationStore.getRouteAnimation(key, "animating"),
90
+ AnimationStore.getValue(key, "animating"),
94
91
  );
95
92
 
96
93
  const hasMeasuredOnLayout = useSharedValue(false);
@@ -147,7 +144,7 @@ const useBlurMeasurement = (params: {
147
144
  const hasCapturedSource = useRef(false);
148
145
 
149
146
  const ancestorClosing = [current.route.key, ...ancestorKeys].map((key) =>
150
- AnimationStore.getRouteAnimation(key, "closing"),
147
+ AnimationStore.getValue(key, "closing"),
151
148
  );
152
149
 
153
150
  const maybeMeasureOnBlur = useStableCallbackValue(() => {
@@ -258,10 +255,7 @@ const registerBoundsBundle = createProvider("RegisterBounds", {
258
255
  const updateSignal: SharedValue<number> =
259
256
  parentContext?.updateSignal ?? ownSignal;
260
257
 
261
- const isAnimating = AnimationStore.getRouteAnimation(
262
- currentScreenKey,
263
- "animating",
264
- );
258
+ const isAnimating = AnimationStore.getValue(currentScreenKey, "animating");
265
259
  const preparedStyles = useMemo(() => prepareStyleForBounds(style), [style]);
266
260
 
267
261
  const emitUpdate = useStableCallbackValue(() => {
@@ -390,7 +384,7 @@ const registerBoundsBundle = createProvider("RegisterBounds", {
390
384
  // from state).
391
385
  const nextScreenKey = next?.route.key;
392
386
  const nextClosing = nextScreenKey
393
- ? AnimationStore.getRouteAnimation(nextScreenKey, "closing")
387
+ ? AnimationStore.getValue(nextScreenKey, "closing")
394
388
  : null;
395
389
 
396
390
  useParentSyncReaction({ parentContext, maybeMeasureAndStore });
@@ -0,0 +1,14 @@
1
+ import type { ScreenTransitionConfig } from "../../../../types";
2
+
3
+ /**
4
+ * Helper for compatibility with NativeStack. Native stack integration requires
5
+ * the `enableTransitions` prop for creating custom animations, however, blank
6
+ * stack animations are always on.
7
+ */
8
+ export const hasTransitionsEnabled = (
9
+ options: ScreenTransitionConfig | undefined,
10
+ alwaysOn: boolean,
11
+ ) => {
12
+ if (alwaysOn) return true;
13
+ return !!(options as any)?.enableTransitions;
14
+ };
@@ -0,0 +1,108 @@
1
+ import type { SharedValue } from "react-native-reanimated";
2
+ import { EPSILON } from "../../../../constants";
3
+ import type { GestureStoreMap } from "../../../../stores/gesture.store";
4
+ import type { ScreenTransitionState } from "../../../../types/animation.types";
5
+ import type { Layout } from "../../../../types/screen.types";
6
+ import type { BaseStackRoute } from "../../../../types/stack.types";
7
+
8
+ type BuiltState = {
9
+ progress: SharedValue<number>;
10
+ closing: SharedValue<number>;
11
+ animating: SharedValue<number>;
12
+ entering: SharedValue<number>;
13
+ gesture: GestureStoreMap;
14
+ route: BaseStackRoute;
15
+ meta?: Record<string, unknown>;
16
+ resolvedAutoSnapPoint: SharedValue<number>;
17
+ measuredContentLayout: SharedValue<Layout | null>;
18
+ hasAutoSnapPoint: boolean;
19
+ sortedNumericSnapPoints: number[];
20
+ unwrapped: ScreenTransitionState;
21
+ };
22
+
23
+ /**
24
+ * Computes the animated snap index based on progress and snap points.
25
+ * Returns -1 if no snap points, otherwise interpolates between indices.
26
+ */
27
+ const computeSnapIndex = (progress: number, snapPoints: number[]): number => {
28
+ "worklet";
29
+ if (snapPoints.length === 0) return -1;
30
+ if (progress <= snapPoints[0]) return 0;
31
+ if (progress >= snapPoints[snapPoints.length - 1])
32
+ return snapPoints.length - 1;
33
+
34
+ for (let i = 0; i < snapPoints.length - 1; i++) {
35
+ if (progress <= snapPoints[i + 1]) {
36
+ const t =
37
+ (progress - snapPoints[i]) / (snapPoints[i + 1] - snapPoints[i]);
38
+ return i + t;
39
+ }
40
+ }
41
+ return snapPoints.length - 1;
42
+ };
43
+
44
+ export const hydrateTransitionState = (
45
+ s: BuiltState,
46
+ dimensions: Layout,
47
+ ): ScreenTransitionState => {
48
+ "worklet";
49
+ const out = s.unwrapped;
50
+ out.progress = s.progress.value;
51
+ out.closing = s.closing.value;
52
+ out.entering = s.entering.value;
53
+ out.gesture.x = s.gesture.x.value;
54
+ out.gesture.y = s.gesture.y.value;
55
+ out.gesture.normX = s.gesture.normX.value;
56
+ out.gesture.normY = s.gesture.normY.value;
57
+ out.gesture.dismissing = s.gesture.dismissing.value;
58
+ out.gesture.dragging = s.gesture.dragging.value;
59
+ out.gesture.direction = s.gesture.direction.value;
60
+
61
+ const isGestureSettling =
62
+ Math.abs(out.gesture.normX) > EPSILON ||
63
+ Math.abs(out.gesture.normY) > EPSILON;
64
+
65
+ out.animating =
66
+ s.animating.value || out.gesture.dragging || isGestureSettling ? 1 : 0;
67
+
68
+ // Deprecated aliases (kept for backwards compatibility)
69
+ out.gesture.normalizedX = out.gesture.normX;
70
+ out.gesture.normalizedY = out.gesture.normY;
71
+ out.gesture.isDismissing = out.gesture.dismissing;
72
+ out.gesture.isDragging = out.gesture.dragging;
73
+
74
+ out.settled = out.animating || out.gesture.dismissing || out.closing ? 0 : 1;
75
+
76
+ out.meta = s.meta;
77
+ out.layouts.screen.width = dimensions.width;
78
+ out.layouts.screen.height = dimensions.height;
79
+
80
+ const content = s.measuredContentLayout.value;
81
+ if (content) {
82
+ if (!out.layouts.content) {
83
+ out.layouts.content = {
84
+ width: content.width,
85
+ height: content.height,
86
+ };
87
+ } else {
88
+ out.layouts.content.width = content.width;
89
+ out.layouts.content.height = content.height;
90
+ }
91
+ } else {
92
+ out.layouts.content = undefined;
93
+ }
94
+
95
+ const resolvedAutoSnap =
96
+ s.hasAutoSnapPoint && s.resolvedAutoSnapPoint.value > 0
97
+ ? s.resolvedAutoSnapPoint.value
98
+ : null;
99
+
100
+ const resolvedSnapPoints =
101
+ resolvedAutoSnap !== null
102
+ ? [...s.sortedNumericSnapPoints, resolvedAutoSnap].sort((a, b) => a - b)
103
+ : s.sortedNumericSnapPoints;
104
+
105
+ out.snapIndex = computeSnapIndex(out.progress, resolvedSnapPoints);
106
+
107
+ return out;
108
+ };