react-native-screen-transitions 3.4.0-alpha.2 → 3.4.0-alpha.4

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 (334) 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 +4 -18
  12. package/lib/commonjs/shared/components/create-boundary-component/index.js.map +1 -1
  13. package/lib/commonjs/shared/components/create-transition-aware-component.js +1 -2
  14. package/lib/commonjs/shared/components/create-transition-aware-component.js.map +1 -1
  15. package/lib/commonjs/shared/components/native-screen.js +3 -3
  16. package/lib/commonjs/shared/components/native-screen.js.map +1 -1
  17. package/lib/commonjs/shared/components/screen-container/deferred-visibility-host.js +43 -0
  18. package/lib/commonjs/shared/components/screen-container/deferred-visibility-host.js.map +1 -0
  19. package/lib/commonjs/shared/components/screen-container/hooks/use-content-layout.js +18 -14
  20. package/lib/commonjs/shared/components/screen-container/hooks/use-content-layout.js.map +1 -1
  21. package/lib/commonjs/shared/components/screen-container/index.js +7 -4
  22. package/lib/commonjs/shared/components/screen-container/index.js.map +1 -1
  23. package/lib/commonjs/shared/components/screen-container/layers/backdrop.js +8 -5
  24. package/lib/commonjs/shared/components/screen-container/layers/backdrop.js.map +1 -1
  25. package/lib/commonjs/shared/components/screen-container/layers/content.js.map +1 -1
  26. package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js +17 -24
  27. package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
  28. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js +4 -2
  29. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js.map +1 -1
  30. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/index.js +6 -1
  31. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/index.js.map +1 -1
  32. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-open-transition.js +13 -11
  33. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-open-transition.js.map +1 -1
  34. package/lib/commonjs/shared/components/screen-lifecycle/index.js +5 -3
  35. package/lib/commonjs/shared/components/screen-lifecycle/index.js.map +1 -1
  36. package/lib/commonjs/shared/configs/presets.js +9 -10
  37. package/lib/commonjs/shared/configs/presets.js.map +1 -1
  38. package/lib/commonjs/shared/constants.js +26 -6
  39. package/lib/commonjs/shared/constants.js.map +1 -1
  40. package/lib/commonjs/shared/hooks/animation/use-associated-style.js +11 -36
  41. package/lib/commonjs/shared/hooks/animation/use-associated-style.js.map +1 -1
  42. package/lib/commonjs/shared/index.js +4 -10
  43. package/lib/commonjs/shared/index.js.map +1 -1
  44. package/lib/commonjs/shared/providers/gestures/handlers/use-handlers.js +12 -9
  45. package/lib/commonjs/shared/providers/gestures/handlers/use-handlers.js.map +1 -1
  46. package/lib/commonjs/shared/providers/gestures/helpers/gesture-snap-points.js +5 -5
  47. package/lib/commonjs/shared/providers/gestures/helpers/gesture-snap-points.js.map +1 -1
  48. package/lib/commonjs/shared/providers/gestures/helpers/register-direction-claims.js +1 -1
  49. package/lib/commonjs/shared/providers/gestures/helpers/register-direction-claims.js.map +1 -1
  50. package/lib/commonjs/shared/providers/gestures/use-build-gestures.js +1 -1
  51. package/lib/commonjs/shared/providers/gestures/use-build-gestures.js.map +1 -1
  52. package/lib/commonjs/shared/providers/register-bounds.provider.js +5 -5
  53. package/lib/commonjs/shared/providers/register-bounds.provider.js.map +1 -1
  54. package/lib/commonjs/shared/providers/screen/animation/helpers/has-transitions-enabled.js +17 -0
  55. package/lib/commonjs/shared/providers/screen/animation/helpers/has-transitions-enabled.js.map +1 -0
  56. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state.js +72 -0
  57. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state.js.map +1 -0
  58. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +22 -108
  59. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  60. package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js +42 -0
  61. package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -0
  62. package/lib/commonjs/shared/providers/screen/helpers/resolve-interpolated-style-output.js +50 -0
  63. package/lib/commonjs/shared/providers/screen/helpers/resolve-interpolated-style-output.js.map +1 -0
  64. package/lib/commonjs/shared/providers/screen/styles.provider.js +34 -10
  65. package/lib/commonjs/shared/providers/screen/styles.provider.js.map +1 -1
  66. package/lib/commonjs/shared/providers/stack/direct.provider.js +1 -1
  67. package/lib/commonjs/shared/providers/stack/direct.provider.js.map +1 -1
  68. package/lib/commonjs/shared/providers/stack/helpers/use-processed-routes.js +1 -1
  69. package/lib/commonjs/shared/providers/stack/helpers/use-processed-routes.js.map +1 -1
  70. package/lib/commonjs/shared/stores/animation.store.js +12 -40
  71. package/lib/commonjs/shared/stores/animation.store.js.map +1 -1
  72. package/lib/commonjs/shared/stores/gesture.store.js +13 -33
  73. package/lib/commonjs/shared/stores/gesture.store.js.map +1 -1
  74. package/lib/commonjs/shared/stores/system.store.js +31 -0
  75. package/lib/commonjs/shared/stores/system.store.js.map +1 -0
  76. package/lib/commonjs/shared/types/bounds.types.js +1 -3
  77. package/lib/commonjs/shared/types/bounds.types.js.map +1 -1
  78. package/lib/commonjs/shared/utils/animation/animate-to-progress.js +2 -2
  79. package/lib/commonjs/shared/utils/animation/animate-to-progress.js.map +1 -1
  80. package/lib/commonjs/shared/utils/bounds/helpers/compute-bounds-styles.js +2 -2
  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 +100 -363
  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 +4 -18
  105. package/lib/module/shared/components/create-boundary-component/index.js.map +1 -1
  106. package/lib/module/shared/components/create-transition-aware-component.js +1 -2
  107. package/lib/module/shared/components/create-transition-aware-component.js.map +1 -1
  108. package/lib/module/shared/components/native-screen.js +3 -3
  109. package/lib/module/shared/components/native-screen.js.map +1 -1
  110. package/lib/module/shared/components/screen-container/deferred-visibility-host.js +38 -0
  111. package/lib/module/shared/components/screen-container/deferred-visibility-host.js.map +1 -0
  112. package/lib/module/shared/components/screen-container/hooks/use-content-layout.js +18 -14
  113. package/lib/module/shared/components/screen-container/hooks/use-content-layout.js.map +1 -1
  114. package/lib/module/shared/components/screen-container/index.js +7 -4
  115. package/lib/module/shared/components/screen-container/index.js.map +1 -1
  116. package/lib/module/shared/components/screen-container/layers/backdrop.js +8 -5
  117. package/lib/module/shared/components/screen-container/layers/backdrop.js.map +1 -1
  118. package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
  119. package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js +20 -27
  120. package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
  121. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js +4 -2
  122. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js.map +1 -1
  123. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/index.js +6 -1
  124. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/index.js.map +1 -1
  125. package/lib/module/shared/components/screen-lifecycle/hooks/use-open-transition.js +13 -11
  126. package/lib/module/shared/components/screen-lifecycle/hooks/use-open-transition.js.map +1 -1
  127. package/lib/module/shared/components/screen-lifecycle/index.js +5 -3
  128. package/lib/module/shared/components/screen-lifecycle/index.js.map +1 -1
  129. package/lib/module/shared/configs/presets.js +10 -11
  130. package/lib/module/shared/configs/presets.js.map +1 -1
  131. package/lib/module/shared/constants.js +25 -5
  132. package/lib/module/shared/constants.js.map +1 -1
  133. package/lib/module/shared/hooks/animation/use-associated-style.js +12 -37
  134. package/lib/module/shared/hooks/animation/use-associated-style.js.map +1 -1
  135. package/lib/module/shared/index.js +1 -1
  136. package/lib/module/shared/index.js.map +1 -1
  137. package/lib/module/shared/providers/gestures/handlers/use-handlers.js +12 -9
  138. package/lib/module/shared/providers/gestures/handlers/use-handlers.js.map +1 -1
  139. package/lib/module/shared/providers/gestures/helpers/gesture-snap-points.js +5 -5
  140. package/lib/module/shared/providers/gestures/helpers/gesture-snap-points.js.map +1 -1
  141. package/lib/module/shared/providers/gestures/helpers/register-direction-claims.js +1 -1
  142. package/lib/module/shared/providers/gestures/helpers/register-direction-claims.js.map +1 -1
  143. package/lib/module/shared/providers/gestures/use-build-gestures.js +1 -1
  144. package/lib/module/shared/providers/gestures/use-build-gestures.js.map +1 -1
  145. package/lib/module/shared/providers/register-bounds.provider.js +5 -5
  146. package/lib/module/shared/providers/register-bounds.provider.js.map +1 -1
  147. package/lib/module/shared/providers/screen/animation/helpers/has-transitions-enabled.js +12 -0
  148. package/lib/module/shared/providers/screen/animation/helpers/has-transitions-enabled.js.map +1 -0
  149. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state.js +67 -0
  150. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state.js.map +1 -0
  151. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +22 -108
  152. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  153. package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js +37 -0
  154. package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -0
  155. package/lib/module/shared/providers/screen/helpers/resolve-interpolated-style-output.js +44 -0
  156. package/lib/module/shared/providers/screen/helpers/resolve-interpolated-style-output.js.map +1 -0
  157. package/lib/module/shared/providers/screen/styles.provider.js +33 -11
  158. package/lib/module/shared/providers/screen/styles.provider.js.map +1 -1
  159. package/lib/module/shared/providers/stack/direct.provider.js +1 -1
  160. package/lib/module/shared/providers/stack/direct.provider.js.map +1 -1
  161. package/lib/module/shared/providers/stack/helpers/use-processed-routes.js +1 -1
  162. package/lib/module/shared/providers/stack/helpers/use-processed-routes.js.map +1 -1
  163. package/lib/module/shared/stores/animation.store.js +12 -40
  164. package/lib/module/shared/stores/animation.store.js.map +1 -1
  165. package/lib/module/shared/stores/gesture.store.js +13 -33
  166. package/lib/module/shared/stores/gesture.store.js.map +1 -1
  167. package/lib/module/shared/stores/system.store.js +27 -0
  168. package/lib/module/shared/stores/system.store.js.map +1 -0
  169. package/lib/module/shared/types/bounds.types.js +9 -1
  170. package/lib/module/shared/types/bounds.types.js.map +1 -1
  171. package/lib/module/shared/utils/animation/animate-to-progress.js +2 -2
  172. package/lib/module/shared/utils/animation/animate-to-progress.js.map +1 -1
  173. package/lib/module/shared/utils/bounds/helpers/compute-bounds-styles.js +3 -3
  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 +94 -357
  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/create-transition-aware-component.d.ts.map +1 -1
  193. package/lib/typescript/shared/components/native-screen.d.ts.map +1 -1
  194. package/lib/typescript/shared/components/screen-container/deferred-visibility-host.d.ts +13 -0
  195. package/lib/typescript/shared/components/screen-container/deferred-visibility-host.d.ts.map +1 -0
  196. package/lib/typescript/shared/components/screen-container/hooks/use-content-layout.d.ts.map +1 -1
  197. package/lib/typescript/shared/components/screen-container/index.d.ts.map +1 -1
  198. package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -1
  199. package/lib/typescript/shared/components/screen-container/layers/content.d.ts.map +1 -1
  200. package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts +1 -1
  201. package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts.map +1 -1
  202. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.d.ts.map +1 -1
  203. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/index.d.ts +2 -1
  204. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/index.d.ts.map +1 -1
  205. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-open-transition.d.ts +2 -1
  206. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-open-transition.d.ts.map +1 -1
  207. package/lib/typescript/shared/components/screen-lifecycle/index.d.ts.map +1 -1
  208. package/lib/typescript/shared/configs/index.d.ts.map +1 -1
  209. package/lib/typescript/shared/configs/presets.d.ts.map +1 -1
  210. package/lib/typescript/shared/constants.d.ts +9 -3
  211. package/lib/typescript/shared/constants.d.ts.map +1 -1
  212. package/lib/typescript/shared/hooks/animation/use-associated-style.d.ts +5 -11
  213. package/lib/typescript/shared/hooks/animation/use-associated-style.d.ts.map +1 -1
  214. package/lib/typescript/shared/index.d.ts +4 -4
  215. package/lib/typescript/shared/index.d.ts.map +1 -1
  216. package/lib/typescript/shared/providers/gestures/handlers/use-handlers.d.ts.map +1 -1
  217. package/lib/typescript/shared/providers/gestures/helpers/gesture-snap-points.d.ts +2 -2
  218. package/lib/typescript/shared/providers/gestures/helpers/gesture-snap-points.d.ts.map +1 -1
  219. package/lib/typescript/shared/providers/gestures/use-build-gestures.d.ts.map +1 -1
  220. package/lib/typescript/shared/providers/register-bounds.provider.d.ts.map +1 -1
  221. package/lib/typescript/shared/providers/screen/animation/helpers/has-transitions-enabled.d.ts +8 -0
  222. package/lib/typescript/shared/providers/screen/animation/helpers/has-transitions-enabled.d.ts.map +1 -0
  223. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state.d.ts +22 -0
  224. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state.d.ts.map +1 -0
  225. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts +4 -2
  226. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
  227. package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts +21 -0
  228. package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts.map +1 -0
  229. package/lib/typescript/shared/providers/screen/helpers/resolve-interpolated-style-output.d.ts +14 -0
  230. package/lib/typescript/shared/providers/screen/helpers/resolve-interpolated-style-output.d.ts.map +1 -0
  231. package/lib/typescript/shared/providers/screen/styles.provider.d.ts +4 -2
  232. package/lib/typescript/shared/providers/screen/styles.provider.d.ts.map +1 -1
  233. package/lib/typescript/shared/stores/animation.store.d.ts +10 -17
  234. package/lib/typescript/shared/stores/animation.store.d.ts.map +1 -1
  235. package/lib/typescript/shared/stores/gesture.store.d.ts +24 -14
  236. package/lib/typescript/shared/stores/gesture.store.d.ts.map +1 -1
  237. package/lib/typescript/shared/stores/system.store.d.ts +27 -0
  238. package/lib/typescript/shared/stores/system.store.d.ts.map +1 -0
  239. package/lib/typescript/shared/types/animation.types.d.ts +40 -6
  240. package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
  241. package/lib/typescript/shared/types/bounds.types.d.ts +14 -42
  242. package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
  243. package/lib/typescript/shared/types/index.d.ts +2 -2
  244. package/lib/typescript/shared/types/index.d.ts.map +1 -1
  245. package/lib/typescript/shared/types/screen.types.d.ts +16 -0
  246. package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
  247. package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts +3 -1
  248. package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts.map +1 -1
  249. package/lib/typescript/shared/utils/bounds/helpers/compute-bounds-styles.d.ts +11 -1
  250. package/lib/typescript/shared/utils/bounds/helpers/compute-bounds-styles.d.ts.map +1 -1
  251. package/lib/typescript/shared/utils/bounds/index.d.ts +2 -3
  252. package/lib/typescript/shared/utils/bounds/index.d.ts.map +1 -1
  253. package/lib/typescript/shared/utils/bounds/zoom/build.d.ts +2 -3
  254. package/lib/typescript/shared/utils/bounds/zoom/build.d.ts.map +1 -1
  255. package/lib/typescript/shared/utils/bounds/zoom/config.d.ts +15 -41
  256. package/lib/typescript/shared/utils/bounds/zoom/config.d.ts.map +1 -1
  257. package/lib/typescript/shared/utils/bounds/zoom/math.d.ts +44 -0
  258. package/lib/typescript/shared/utils/bounds/zoom/math.d.ts.map +1 -0
  259. package/lib/typescript/shared/utils/bounds/zoom/types.d.ts +8 -13
  260. package/lib/typescript/shared/utils/bounds/zoom/types.d.ts.map +1 -1
  261. package/lib/typescript/shared/utils/create-store.d.ts +14 -0
  262. package/lib/typescript/shared/utils/create-store.d.ts.map +1 -0
  263. package/package.json +1 -1
  264. package/src/component-stack/components/component-screen.tsx +1 -1
  265. package/src/shared/animation/snap-to.ts +10 -4
  266. package/src/shared/components/create-boundary-component/hooks/helpers/measurement-rules.ts +1 -1
  267. package/src/shared/components/create-boundary-component/hooks/use-group-active-measurement.ts +82 -10
  268. package/src/shared/components/create-boundary-component/hooks/use-initial-layout-handler.ts +2 -5
  269. package/src/shared/components/create-boundary-component/index.tsx +3 -23
  270. package/src/shared/components/create-transition-aware-component.tsx +0 -1
  271. package/src/shared/components/native-screen.tsx +3 -9
  272. package/src/shared/components/screen-container/deferred-visibility-host.tsx +37 -0
  273. package/src/shared/components/screen-container/hooks/use-content-layout.ts +42 -43
  274. package/src/shared/components/screen-container/index.tsx +5 -2
  275. package/src/shared/components/screen-container/layers/backdrop.tsx +12 -6
  276. package/src/shared/components/screen-container/layers/content.tsx +3 -0
  277. package/src/shared/components/screen-container/layers/maybe-masked-navigation-container.tsx +30 -32
  278. package/src/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.ts +4 -2
  279. package/src/shared/components/screen-lifecycle/hooks/use-close-transition/index.ts +8 -0
  280. package/src/shared/components/screen-lifecycle/hooks/use-open-transition.ts +21 -10
  281. package/src/shared/components/screen-lifecycle/index.tsx +8 -2
  282. package/src/shared/configs/presets.ts +18 -17
  283. package/src/shared/constants.ts +19 -3
  284. package/src/shared/hooks/animation/use-associated-style.ts +12 -62
  285. package/src/shared/index.ts +4 -3
  286. package/src/shared/providers/gestures/handlers/use-handlers.ts +13 -10
  287. package/src/shared/providers/gestures/helpers/gesture-snap-points.ts +12 -10
  288. package/src/shared/providers/gestures/helpers/register-direction-claims.ts +1 -1
  289. package/src/shared/providers/gestures/use-build-gestures.ts +1 -3
  290. package/src/shared/providers/register-bounds.provider.tsx +5 -11
  291. package/src/shared/providers/screen/animation/helpers/has-transitions-enabled.ts +14 -0
  292. package/src/shared/providers/screen/animation/helpers/hydrate-transition-state.ts +108 -0
  293. package/src/shared/providers/screen/animation/helpers/pipeline.ts +37 -199
  294. package/src/shared/providers/screen/animation/helpers/use-build-transition-state.ts +77 -0
  295. package/src/shared/providers/screen/helpers/resolve-interpolated-style-output.ts +61 -0
  296. package/src/shared/providers/screen/styles.provider.tsx +99 -72
  297. package/src/shared/providers/stack/direct.provider.tsx +1 -1
  298. package/src/shared/providers/stack/helpers/use-processed-routes.ts +1 -1
  299. package/src/shared/stores/animation.store.ts +11 -61
  300. package/src/shared/stores/gesture.store.ts +25 -45
  301. package/src/shared/stores/system.store.ts +44 -0
  302. package/src/shared/types/animation.types.ts +43 -6
  303. package/src/shared/types/bounds.types.ts +25 -25
  304. package/src/shared/types/index.ts +2 -0
  305. package/src/shared/types/screen.types.ts +17 -0
  306. package/src/shared/utils/animation/animate-to-progress.ts +4 -2
  307. package/src/shared/utils/bounds/helpers/compute-bounds-styles.ts +3 -3
  308. package/src/shared/utils/bounds/index.ts +26 -75
  309. package/src/shared/utils/bounds/zoom/build.ts +174 -497
  310. package/src/shared/utils/bounds/zoom/config.ts +14 -164
  311. package/src/shared/utils/bounds/zoom/math.ts +193 -0
  312. package/src/shared/utils/bounds/zoom/types.ts +15 -17
  313. package/src/shared/utils/create-store.ts +62 -0
  314. package/lib/commonjs/shared/utils/bounds/types/frame-props.js +0 -6
  315. package/lib/commonjs/shared/utils/bounds/types/frame-props.js.map +0 -1
  316. package/lib/commonjs/shared/utils/bounds/zoom/accessor.js +0 -54
  317. package/lib/commonjs/shared/utils/bounds/zoom/accessor.js.map +0 -1
  318. package/lib/commonjs/shared/utils/bounds/zoom/index.js +0 -20
  319. package/lib/commonjs/shared/utils/bounds/zoom/index.js.map +0 -1
  320. package/lib/module/shared/utils/bounds/types/frame-props.js +0 -4
  321. package/lib/module/shared/utils/bounds/types/frame-props.js.map +0 -1
  322. package/lib/module/shared/utils/bounds/zoom/accessor.js +0 -49
  323. package/lib/module/shared/utils/bounds/zoom/accessor.js.map +0 -1
  324. package/lib/module/shared/utils/bounds/zoom/index.js +0 -5
  325. package/lib/module/shared/utils/bounds/zoom/index.js.map +0 -1
  326. package/lib/typescript/shared/utils/bounds/types/frame-props.d.ts +0 -5
  327. package/lib/typescript/shared/utils/bounds/types/frame-props.d.ts.map +0 -1
  328. package/lib/typescript/shared/utils/bounds/zoom/accessor.d.ts +0 -17
  329. package/lib/typescript/shared/utils/bounds/zoom/accessor.d.ts.map +0 -1
  330. package/lib/typescript/shared/utils/bounds/zoom/index.d.ts +0 -3
  331. package/lib/typescript/shared/utils/bounds/zoom/index.d.ts.map +0 -1
  332. package/src/shared/utils/bounds/types/frame-props.ts +0 -5
  333. package/src/shared/utils/bounds/zoom/accessor.ts +0 -69
  334. package/src/shared/utils/bounds/zoom/index.ts +0 -2
@@ -3,116 +3,30 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.toNumber = exports.resolveZoomConfig = void 0;
7
- var _bounds = require("../../../stores/bounds");
8
- const DEFAULT_DRAG_RESISTANCE = 0.4;
9
- const DEFAULT_DRAG_DIRECTIONAL_SCALE_MIN = 0.25;
10
- const DEFAULT_DRAG_DIRECTIONAL_SCALE_MAX = 1.06;
11
- const DEFAULT_MASK_BORDER_RADIUS = 12;
12
- const ZERO_OUTSET = Object.freeze({
6
+ exports.toNumber = exports.getZoomAnchor = exports.ZOOM_SHARED_OPTIONS = exports.ZOOM_MASK_OUTSET = exports.ZOOM_DRAG_RESISTANCE = exports.ZOOM_DRAG_DIRECTIONAL_SCALE_MIN = exports.ZOOM_DRAG_DIRECTIONAL_SCALE_MAX = void 0;
7
+ const ZOOM_SHARED_OPTIONS = exports.ZOOM_SHARED_OPTIONS = Object.freeze({
8
+ anchor: "top",
9
+ scaleMode: "uniform"
10
+ });
11
+ const ZOOM_DRAG_RESISTANCE = exports.ZOOM_DRAG_RESISTANCE = 0.4;
12
+ const ZOOM_DRAG_DIRECTIONAL_SCALE_MIN = exports.ZOOM_DRAG_DIRECTIONAL_SCALE_MIN = 0.25;
13
+ const ZOOM_DRAG_DIRECTIONAL_SCALE_MAX = exports.ZOOM_DRAG_DIRECTIONAL_SCALE_MAX = 1.06;
14
+ const ZOOM_MASK_OUTSET = exports.ZOOM_MASK_OUTSET = Object.freeze({
13
15
  top: 0,
14
16
  right: 0,
15
17
  bottom: 0,
16
18
  left: 0
17
19
  });
18
- const toNumber = (value, fallback = 0) => {
19
- "worklet";
20
-
21
- return typeof value === "number" ? value : fallback;
22
- };
23
- exports.toNumber = toNumber;
24
- const isFiniteNumber = value => {
25
- "worklet";
26
-
27
- return typeof value === "number" && Number.isFinite(value);
28
- };
29
- const normalizeOutset = value => {
20
+ const getZoomAnchor = target => {
30
21
  "worklet";
31
22
 
32
- if (typeof value === "number") {
33
- return {
34
- top: value,
35
- right: value,
36
- bottom: value,
37
- left: value
38
- };
39
- }
40
- if (!value) {
41
- return ZERO_OUTSET;
42
- }
43
- return {
44
- top: isFiniteNumber(value.top) ? value.top : 0,
45
- right: isFiniteNumber(value.right) ? value.right : 0,
46
- bottom: isFiniteNumber(value.bottom) ? value.bottom : 0,
47
- left: isFiniteNumber(value.left) ? value.left : 0
48
- };
23
+ return target === "bound" ? "center" : ZOOM_SHARED_OPTIONS.anchor;
49
24
  };
50
- const normalizeZoomOptions = zoomOptions => {
51
- "worklet";
52
-
53
- const resolvedMaskRadius = zoomOptions?.mask?.borderRadius ?? (isFiniteNumber(zoomOptions?.maskBorderRadius) ? zoomOptions?.maskBorderRadius : DEFAULT_MASK_BORDER_RADIUS);
54
- return {
55
- mask: {
56
- borderRadius: resolvedMaskRadius,
57
- borderTopLeftRadius: zoomOptions?.mask?.borderTopLeftRadius,
58
- borderTopRightRadius: zoomOptions?.mask?.borderTopRightRadius,
59
- borderBottomLeftRadius: zoomOptions?.mask?.borderBottomLeftRadius,
60
- borderBottomRightRadius: zoomOptions?.mask?.borderBottomRightRadius,
61
- borderCurve: zoomOptions?.mask?.borderCurve,
62
- outset: normalizeOutset(zoomOptions?.mask?.outset)
63
- },
64
- motion: {
65
- dragResistance: isFiniteNumber(zoomOptions?.motion?.dragResistance) ? zoomOptions.motion.dragResistance : DEFAULT_DRAG_RESISTANCE,
66
- dragDirectionalScaleMin: isFiniteNumber(zoomOptions?.motion?.dragDirectionalScaleMin) ? zoomOptions.motion.dragDirectionalScaleMin : DEFAULT_DRAG_DIRECTIONAL_SCALE_MIN,
67
- dragDirectionalScaleMax: DEFAULT_DRAG_DIRECTIONAL_SCALE_MAX
68
- }
69
- };
70
- };
71
- const resolveZoomConfig = ({
72
- id,
73
- group,
74
- zoomOptions,
75
- currentRouteKey,
76
- resolveTag,
77
- defaultAnchor
78
- }) => {
25
+ exports.getZoomAnchor = getZoomAnchor;
26
+ const toNumber = (value, fallback = 0) => {
79
27
  "worklet";
80
28
 
81
- const resolvedTag = resolveTag({
82
- id,
83
- group
84
- });
85
- if (!resolvedTag) return null;
86
-
87
- // Try direct boundary config for the current screen first.
88
- const boundaryConfig = currentRouteKey ? _bounds.BoundStore.getBoundaryConfig(resolvedTag, currentRouteKey) : null;
89
-
90
- // Fallback: when the current screen has no Boundary (e.g. a zoom detail
91
- // screen without a destination element), inherit config from the link's
92
- // source screen so that props like scaleMode propagate to both sides.
93
- let effectiveConfig = boundaryConfig;
94
- if (!effectiveConfig) {
95
- // For no-destination navigation zoom, the focused route won't appear in
96
- // a completed link yet. Fall back to the latest unscoped link so source
97
- // boundary defaults (anchor/scaleMode/target) still propagate.
98
- const scopedLink = currentRouteKey ? _bounds.BoundStore.getActiveLink(resolvedTag, currentRouteKey) : null;
99
- const link = scopedLink ?? _bounds.BoundStore.getActiveLink(resolvedTag);
100
- if (link?.source) {
101
- effectiveConfig = _bounds.BoundStore.getBoundaryConfig(resolvedTag, link.source.screenKey);
102
- }
103
- }
104
- const sharedOptions = {
105
- anchor: zoomOptions?.anchor ?? effectiveConfig?.anchor ?? defaultAnchor,
106
- scaleMode: zoomOptions?.scaleMode ?? effectiveConfig?.scaleMode ?? "uniform"
107
- };
108
- const explicitTarget = zoomOptions?.target ?? effectiveConfig?.target;
109
- const resolvedZoomOptions = normalizeZoomOptions(zoomOptions);
110
- return {
111
- resolvedTag,
112
- sharedOptions,
113
- explicitTarget,
114
- zoomOptions: resolvedZoomOptions
115
- };
29
+ return typeof value === "number" ? value : fallback;
116
30
  };
117
- exports.resolveZoomConfig = resolveZoomConfig;
31
+ exports.toNumber = toNumber;
118
32
  //# sourceMappingURL=config.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_bounds","require","DEFAULT_DRAG_RESISTANCE","DEFAULT_DRAG_DIRECTIONAL_SCALE_MIN","DEFAULT_DRAG_DIRECTIONAL_SCALE_MAX","DEFAULT_MASK_BORDER_RADIUS","ZERO_OUTSET","Object","freeze","top","right","bottom","left","toNumber","value","fallback","exports","isFiniteNumber","Number","isFinite","normalizeOutset","normalizeZoomOptions","zoomOptions","resolvedMaskRadius","mask","borderRadius","maskBorderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","borderCurve","outset","motion","dragResistance","dragDirectionalScaleMin","dragDirectionalScaleMax","resolveZoomConfig","id","group","currentRouteKey","resolveTag","defaultAnchor","resolvedTag","boundaryConfig","BoundStore","getBoundaryConfig","effectiveConfig","scopedLink","getActiveLink","link","source","screenKey","sharedOptions","anchor","scaleMode","explicitTarget","target","resolvedZoomOptions"],"sourceRoot":"../../../../../../src","sources":["shared/utils/bounds/zoom/config.ts"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAKA,MAAMC,uBAAuB,GAAG,GAAG;AACnC,MAAMC,kCAAkC,GAAG,IAAI;AAC/C,MAAMC,kCAAkC,GAAG,IAAI;AAM/C,MAAMC,0BAA2C,GAAG,EAAE;AAEtD,MAAMC,WAAW,GAAGC,MAAM,CAACC,MAAM,CAAC;EACjCC,GAAG,EAAE,CAAC;EACNC,KAAK,EAAE,CAAC;EACRC,MAAM,EAAE,CAAC;EACTC,IAAI,EAAE;AACP,CAAC,CAAC;AA0BK,MAAMC,QAAQ,GAAGA,CAACC,KAAc,EAAEC,QAAQ,GAAG,CAAC,KAAa;EACjE,SAAS;;EACT,OAAO,OAAOD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IAAI;IACP,MAAMU,IAAI,GAAGF,UAAU,IAAIH,kBAAU,CAACI,aAAa,CAACN,WAAW,CAAC;IAChE,IAAIO,IAAI,EAAEC,MAAM,EAAE;MACjBJ,eAAe,GAAGF,kBAAU,CAACC,iBAAiB,CAC7CH,WAAW,EACXO,IAAI,CAACC,MAAM,CAACC,SACb,CAAC;IACF;EACD;EAEA,MAAMC,aAAqC,GAAG;IAC7CC,MAAM,EAAEhC,WAAW,EAAEgC,MAAM,IAAIP,eAAe,EAAEO,MAAM,IAAIZ,aAAa;IACvEa,SAAS,EACRjC,WAAW,EAAEiC,SAAS,IAAIR,eAAe,EAAEQ,SAAS,IAAI;EAC1D,CAAC;EAED,MAAMC,cAAc,GAAGlC,WAAW,EAAEmC,MAAM,IAAIV,eAAe,EAAEU,MAAM;EACrE,MAAMC,mBAAmB,GAAGrC,oBAAoB,CAACC,WAAW,CAAC;EAE7D,OAAO;IACNqB,WAAW;IACXU,aAAa;IACbG,cAAc;IACdlC,WAAW,EAAEoC;EACd,CAAC;AACF,CAAC;AAAC1C,OAAA,CAAAqB,iBAAA,GAAAA,iBAAA","ignoreList":[]}
1
+ {"version":3,"names":["ZOOM_SHARED_OPTIONS","exports","Object","freeze","anchor","scaleMode","ZOOM_DRAG_RESISTANCE","ZOOM_DRAG_DIRECTIONAL_SCALE_MIN","ZOOM_DRAG_DIRECTIONAL_SCALE_MAX","ZOOM_MASK_OUTSET","top","right","bottom","left","getZoomAnchor","target","toNumber","value","fallback"],"sourceRoot":"../../../../../../src","sources":["shared/utils/bounds/zoom/config.ts"],"mappings":";;;;;;AAEO,MAAMA,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAGE,MAAM,CAACC,MAAM,CAAC;EAChDC,MAAM,EAAE,KAAc;EACtBC,SAAS,EAAE;AACZ,CAAC,CAAC;AAEK,MAAMC,oBAAoB,GAAAL,OAAA,CAAAK,oBAAA,GAAG,GAAG;AAChC,MAAMC,+BAA+B,GAAAN,OAAA,CAAAM,+BAAA,GAAG,IAAI;AAC5C,MAAMC,+BAA+B,GAAAP,OAAA,CAAAO,+BAAA,GAAG,IAAI;AAE5C,MAAMC,gBAAgB,GAAAR,OAAA,CAAAQ,gBAAA,GAAGP,MAAM,CAACC,MAAM,CAAC;EAC7CO,GAAG,EAAE,CAAC;EACNC,KAAK,EAAE,CAAC;EACRC,MAAM,EAAE,CAAC;EACTC,IAAI,EAAE;AACP,CAAC,CAAC;AAEK,MAAMC,aAAa,GACzBC,MAA2C,IACd;EAC7B,SAAS;;EACT,OAAOA,MAAM,KAAK,OAAO,GAAG,QAAQ,GAAGf,mBAAmB,CAACI,MAAM;AAClE,CAAC;AAACH,OAAA,CAAAa,aAAA,GAAAA,aAAA;AAEK,MAAME,QAAQ,GAAGA,CAACC,KAAc,EAAEC,QAAQ,GAAG,CAAC,KAAa;EACjE,SAAS;;EACT,OAAO,OAAOD,KAAK,KAAK,QAAQ,GAAGA,KAAK,GAAGC,QAAQ;AACpD,CAAC;AAACjB,OAAA,CAAAe,QAAA,GAAAA,QAAA","ignoreList":[]}
@@ -0,0 +1,154 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.safeDivide = exports.resolveDirectionalDragScale = exports.normalizedToTranslation = exports.normalizedToScale = exports.mapRangeClamped = exports.lerp = exports.inverseLerp = exports.computeCenterScaleShift = exports.composeCompensatedTranslation = exports.compensateTranslationForParentScale = exports.combineScales = exports.clamp01 = exports.clamp = exports.applyPowerCurve = void 0;
7
+ var _reactNativeReanimated = require("react-native-reanimated");
8
+ const clamp = (value, min, max) => {
9
+ "worklet";
10
+
11
+ const lower = min < max ? min : max;
12
+ const upper = max > min ? max : min;
13
+ if (value < lower) return lower;
14
+ if (value > upper) return upper;
15
+ return value;
16
+ };
17
+ exports.clamp = clamp;
18
+ const clamp01 = value => {
19
+ "worklet";
20
+
21
+ return clamp(value, 0, 1);
22
+ };
23
+ exports.clamp01 = clamp01;
24
+ const lerp = (from, to, t) => {
25
+ "worklet";
26
+
27
+ return from + (to - from) * t;
28
+ };
29
+ exports.lerp = lerp;
30
+ const safeDivide = (numerator, denominator, fallback = 0) => {
31
+ "worklet";
32
+
33
+ if (denominator === 0) return fallback;
34
+ return numerator / denominator;
35
+ };
36
+ exports.safeDivide = safeDivide;
37
+ const inverseLerp = (value, inMin, inMax) => {
38
+ "worklet";
39
+
40
+ return safeDivide(value - inMin, inMax - inMin, 0);
41
+ };
42
+ exports.inverseLerp = inverseLerp;
43
+ const mapRangeClamped = (value, inMin, inMax, outMin, outMax) => {
44
+ "worklet";
45
+
46
+ const t = clamp01(inverseLerp(value, inMin, inMax));
47
+ return lerp(outMin, outMax, t);
48
+ };
49
+ exports.mapRangeClamped = mapRangeClamped;
50
+ const applyPowerCurve = (value, exponent) => {
51
+ "worklet";
52
+
53
+ const safeExponent = exponent > 0 ? exponent : 1;
54
+ const magnitude = Math.abs(value) ** safeExponent;
55
+ return value < 0 ? -magnitude : magnitude;
56
+ };
57
+ exports.applyPowerCurve = applyPowerCurve;
58
+ const normalizedToTranslation = ({
59
+ normalized,
60
+ dimension,
61
+ resistance
62
+ }) => {
63
+ "worklet";
64
+
65
+ const distance = Math.max(0, dimension) * resistance;
66
+ return mapRangeClamped(normalized, -1, 1, -distance, distance);
67
+ };
68
+ exports.normalizedToTranslation = normalizedToTranslation;
69
+ const normalizedToScale = ({
70
+ normalized,
71
+ outputRange,
72
+ exponent = 1,
73
+ positiveOnly = true
74
+ }) => {
75
+ "worklet";
76
+
77
+ const [outputStart, outputEnd] = outputRange;
78
+ const raw = positiveOnly ? mapRangeClamped(normalized, 0, 1, outputStart, outputEnd) : mapRangeClamped(normalized, -1, 1, outputStart, outputEnd);
79
+ return applyPowerCurve(raw, exponent);
80
+ };
81
+ exports.normalizedToScale = normalizedToScale;
82
+ const combineScales = (scaleX, scaleY, mode = "multiply") => {
83
+ "worklet";
84
+
85
+ switch (mode) {
86
+ case "average":
87
+ return (scaleX + scaleY) / 2;
88
+ case "max":
89
+ return Math.max(scaleX, scaleY);
90
+ case "min":
91
+ return Math.min(scaleX, scaleY);
92
+ default:
93
+ return scaleX * scaleY;
94
+ }
95
+ };
96
+ exports.combineScales = combineScales;
97
+ const computeCenterScaleShift = ({
98
+ center,
99
+ containerCenter,
100
+ scale
101
+ }) => {
102
+ "worklet";
103
+
104
+ return (center - containerCenter) * (scale - 1);
105
+ };
106
+ exports.computeCenterScaleShift = computeCenterScaleShift;
107
+ const compensateTranslationForParentScale = ({
108
+ translation,
109
+ parentScale,
110
+ epsilon
111
+ }) => {
112
+ "worklet";
113
+
114
+ const safeParentScale = Math.max(parentScale, epsilon);
115
+ return safeDivide(translation, safeParentScale, translation);
116
+ };
117
+ exports.compensateTranslationForParentScale = compensateTranslationForParentScale;
118
+ const composeCompensatedTranslation = ({
119
+ gesture,
120
+ parentScale,
121
+ centerShift = 0,
122
+ epsilon
123
+ }) => {
124
+ "worklet";
125
+
126
+ return compensateTranslationForParentScale({
127
+ translation: gesture,
128
+ parentScale,
129
+ epsilon
130
+ }) + centerShift;
131
+ };
132
+ exports.composeCompensatedTranslation = composeCompensatedTranslation;
133
+ const resolveDirectionalDragScale = ({
134
+ normalized,
135
+ dismissDirection,
136
+ shrinkMin,
137
+ growMax,
138
+ exponent
139
+ }) => {
140
+ "worklet";
141
+
142
+ const dismissalRelative = dismissDirection === "negative" ? -normalized : normalized;
143
+ if (dismissalRelative >= 0) {
144
+ return normalizedToScale({
145
+ normalized: dismissalRelative,
146
+ outputRange: [1, shrinkMin],
147
+ exponent
148
+ });
149
+ }
150
+ const oppositeDrag = Math.min(1, Math.abs(dismissalRelative));
151
+ return (0, _reactNativeReanimated.interpolate)(oppositeDrag, [0, 1], [1, growMax], "clamp");
152
+ };
153
+ exports.resolveDirectionalDragScale = resolveDirectionalDragScale;
154
+ //# sourceMappingURL=math.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNativeReanimated","require","clamp","value","min","max","lower","upper","exports","clamp01","lerp","from","to","t","safeDivide","numerator","denominator","fallback","inverseLerp","inMin","inMax","mapRangeClamped","outMin","outMax","applyPowerCurve","exponent","safeExponent","magnitude","Math","abs","normalizedToTranslation","normalized","dimension","resistance","distance","normalizedToScale","outputRange","positiveOnly","outputStart","outputEnd","raw","combineScales","scaleX","scaleY","mode","computeCenterScaleShift","center","containerCenter","scale","compensateTranslationForParentScale","translation","parentScale","epsilon","safeParentScale","composeCompensatedTranslation","gesture","centerShift","resolveDirectionalDragScale","dismissDirection","shrinkMin","growMax","dismissalRelative","oppositeDrag","interpolate"],"sourceRoot":"../../../../../../src","sources":["shared/utils/bounds/zoom/math.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AAIO,MAAMC,KAAK,GAAGA,CAACC,KAAa,EAAEC,GAAW,EAAEC,GAAW,KAAa;EACzE,SAAS;;EACT,MAAMC,KAAK,GAAGF,GAAG,GAAGC,GAAG,GAAGD,GAAG,GAAGC,GAAG;EACnC,MAAME,KAAK,GAAGF,GAAG,GAAGD,GAAG,GAAGC,GAAG,GAAGD,GAAG;EAEnC,IAAID,KAAK,GAAGG,KAAK,EAAE,OAAOA,KAAK;EAC/B,IAAIH,KAAK,GAAGI,KAAK,EAAE,OAAOA,KAAK;EAE/B,OAAOJ,KAAK;AACb,CAAC;AAACK,OAAA,CAAAN,KAAA,GAAAA,KAAA;AAEK,MAAMO,OAAO,GAAIN,KAAa,IAAa;EACjD,SAAS;;EACT,OAAOD,KAAK,CAACC,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;AAC1B,CAAC;AAACK,OAAA,CAAAC,OAAA,GAAAA,OAAA;AAEK,MAAMC,IAAI,GAAGA,CAACC,IAAY,EAAEC,EAAU,EAAEC,CAAS,KAAa;EACpE,SAAS;;EACT,OAAOF,IAAI,GAAG,CAACC,EAAE,GAAGD,IAAI,IAAIE,CAAC;AAC9B,CAAC;AAACL,OAAA,CAAAE,IAAA,GAAAA,IAAA;AAEK,MAAMI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gC,iBAAiB,CAAC,CAAC;EAC7D,OAAO,IAAAE,kCAAW,EAACD,YAAY,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAEF,OAAO,CAAC,EAAE,OAAO,CAAC;AAChE,CAAC;AAACpD,OAAA,CAAAiD,2BAAA,GAAAA,2BAAA","ignoreList":[]}
@@ -1,6 +1,4 @@
1
1
  "use strict";
2
2
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
3
+ var _constants = require("../../../constants");
6
4
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../../../src","sources":["shared/utils/bounds/zoom/types.ts"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":["_constants","require"],"sourceRoot":"../../../../../../src","sources":["shared/utils/bounds/zoom/types.ts"],"mappings":";;AAAA,IAAAA,UAAA,GAAAC,OAAA","ignoreList":[]}
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createStore = createStore;
7
+ function createStore({
8
+ createBag,
9
+ disposeBag
10
+ }) {
11
+ const store = {};
12
+ let cachedBag;
13
+ function peekBag(routeKey) {
14
+ return store[routeKey];
15
+ }
16
+ function getBag(routeKey) {
17
+ let bag = store[routeKey];
18
+ if (!bag) {
19
+ bag = createBag();
20
+ store[routeKey] = bag;
21
+ }
22
+ return bag;
23
+ }
24
+ function getValue(routeKey, key) {
25
+ return getBag(routeKey)[key];
26
+ }
27
+
28
+ /**
29
+ * Returns a lazily-created singleton bag that is not keyed to a route. This is
30
+ * useful for stable fallback state, such as neutral gesture values for screens
31
+ * that should not own live route-specific state.
32
+ */
33
+ function getCachedBag() {
34
+ if (!cachedBag) {
35
+ cachedBag = createBag();
36
+ }
37
+ return cachedBag;
38
+ }
39
+ function clearBag(routeKey) {
40
+ const bag = store[routeKey];
41
+ if (bag) {
42
+ disposeBag(bag);
43
+ }
44
+ delete store[routeKey];
45
+ }
46
+ return {
47
+ peekBag,
48
+ getBag,
49
+ getValue,
50
+ getCachedBag,
51
+ clearBag
52
+ };
53
+ }
54
+ //# sourceMappingURL=create-store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createStore","createBag","disposeBag","store","cachedBag","peekBag","routeKey","getBag","bag","getValue","key","getCachedBag","clearBag"],"sourceRoot":"../../../../src","sources":["shared/utils/create-store.ts"],"mappings":";;;;;;AAOO,SAASA,WAAWA,CAAO;EACjCC,SAAS;EACTC;AACyB,CAAC,EAAE;EAC5B,MAAMC,KAA8B,GAAG,CAAC,CAAC;EACzC,IAAIC,SAA2B;EAE/B,SAASC,OAAOA,CAACC,QAAmB,EAAoB;IACvD,OAAOH,KAAK,CAACG,QAAQ,CAAC;EACvB;EAEA,SAASC,MAAMA,CAACD,QAAmB,EAAQ;IAC1C,IAAIE,GAAG,GAAGL,KAAK,CAACG,QAAQ,CAAC;IACzB,IAAI,CAACE,GAAG,EAAE;MACTA,GAAG,GAAGP,SAAS,CAAC,CAAC;MACjBE,KAAK,CAACG,QAAQ,CAAC,GAAGE,GAAG;IACtB;IACA,OAAOA,GAAG;EACX;EAEA,SAASC,QAAQA,CAChBH,QAAmB,EACnBI,GAAM,EACI;IACV,OAAOH,MAAM,CAACD,QAAQ,CAAC,CAACI,GAAG,CAAC;EAC7B;;EAEA;AACD;AACA;AACA;AACA;EACC,SAASC,YAAYA,CAAA,EAAS;IAC7B,IAAI,CAACP,SAAS,EAAE;MACfA,SAAS,GAAGH,SAAS,CAAC,CAAC;IACxB;IACA,OAAOG,SAAS;EACjB;EAEA,SAASQ,QAAQA,CAACN,QAAmB,EAAE;IACtC,MAAME,GAAG,GAAGL,KAAK,CAACG,QAAQ,CAAC;IAC3B,IAAIE,GAAG,EAAE;MACRN,UAAU,CAACM,GAAG,CAAC;IAChB;IACA,OAAOL,KAAK,CAACG,QAAQ,CAAC;EACvB;EAEA,OAAO;IACND,OAAO;IACPE,MAAM;IACNE,QAAQ;IACRE,YAAY;IACZC;EACD,CAAC;AACF","ignoreList":[]}
@@ -11,7 +11,7 @@ export const ComponentScreen = ({
11
11
  routeKey,
12
12
  children
13
13
  }) => {
14
- const sceneClosing = AnimationStore.getRouteAnimation(routeKey, "closing");
14
+ const sceneClosing = AnimationStore.getValue(routeKey, "closing");
15
15
  const screenRef = useAnimatedRef();
16
16
  const animatedProps = useAnimatedProps(() => {
17
17
  return {
@@ -1 +1 @@
1
- {"version":3,"names":["StyleSheet","Animated","useAnimatedProps","useAnimatedRef","LayoutAnchorProvider","AnimationStore","jsx","_jsx","POINT_NONE","POINT_BOX_NONE","ComponentScreen","routeKey","children","sceneClosing","getRouteAnimation","screenRef","animatedProps","pointerEvents","get","ComponentScreenComponent","View","ref","style","absoluteFill","anchorRef"],"sourceRoot":"../../../../src","sources":["component-stack/components/component-screen.tsx"],"mappings":";;AACA,SAASA,UAAU,QAAmB,cAAc;AACpD,OAAOC,QAAQ,IACdC,gBAAgB,EAChBC,cAAc,QACR,yBAAyB;AAChC,SAASC,oBAAoB,QAAQ,+CAA+C;AACpF,SAASC,cAAc,QAAQ,qCAAqC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAMrE,MAAMC,UAAU,GAAG,MAAe;AAClC,MAAMC,cAAc,GAAG,UAAmB;AAE1C,OAAO,MAAMC,eAAe,GAAGA,CAAC;EAAEC,QAAQ;EAAEC;AAAsB,CAAC,KAAK;EACvE,MAAMC,YAAY,GAAGR,cAAc,CAACS,iBAAiB,CAACH,QAAQ,EAAE,SAAS,CAAC;EAC1E,MAAMI,SAAS,GAAGZ,cAAc,CAAO,CAAC;EAExC,MAAMa,aAAa,GAAGd,gBAAgB,CAAC,MAAM;IAC5C,OAAO;MACNe,aAAa,EAAEJ,YAAY,CAACK,GAAG,CAAC,CAAC,GAAGV,UAAU,GAAGC;IAClD,CAAC;EACF,CAAC,CAAC;EAEF,MAAMU,wBAAwB,GAAGlB,QAAQ,CAACmB,IAAI;EAE9C,oBACCb,IAAA,CAACY,wBAAwB;IACxBE,GAAG,EAAEN,SAAU;IACfO,KAAK,EAAEtB,UAAU,CAACuB,YAAa;IAC/BP,aAAa,EAAEA,aAAc;IAAAJ,QAAA,eAE7BL,IAAA,CAACH,oBAAoB;MAACoB,SAAS,EAAET,SAAU;MAAAH,QAAA,EACzCA;IAAQ,CACY;EAAC,CACE,CAAC;AAE7B,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["StyleSheet","Animated","useAnimatedProps","useAnimatedRef","LayoutAnchorProvider","AnimationStore","jsx","_jsx","POINT_NONE","POINT_BOX_NONE","ComponentScreen","routeKey","children","sceneClosing","getValue","screenRef","animatedProps","pointerEvents","get","ComponentScreenComponent","View","ref","style","absoluteFill","anchorRef"],"sourceRoot":"../../../../src","sources":["component-stack/components/component-screen.tsx"],"mappings":";;AACA,SAASA,UAAU,QAAmB,cAAc;AACpD,OAAOC,QAAQ,IACdC,gBAAgB,EAChBC,cAAc,QACR,yBAAyB;AAChC,SAASC,oBAAoB,QAAQ,+CAA+C;AACpF,SAASC,cAAc,QAAQ,qCAAqC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAMrE,MAAMC,UAAU,GAAG,MAAe;AAClC,MAAMC,cAAc,GAAG,UAAmB;AAE1C,OAAO,MAAMC,eAAe,GAAGA,CAAC;EAAEC,QAAQ;EAAEC;AAAsB,CAAC,KAAK;EACvE,MAAMC,YAAY,GAAGR,cAAc,CAACS,QAAQ,CAACH,QAAQ,EAAE,SAAS,CAAC;EACjE,MAAMI,SAAS,GAAGZ,cAAc,CAAO,CAAC;EAExC,MAAMa,aAAa,GAAGd,gBAAgB,CAAC,MAAM;IAC5C,OAAO;MACNe,aAAa,EAAEJ,YAAY,CAACK,GAAG,CAAC,CAAC,GAAGV,UAAU,GAAGC;IAClD,CAAC;EACF,CAAC,CAAC;EAEF,MAAMU,wBAAwB,GAAGlB,QAAQ,CAACmB,IAAI;EAE9C,oBACCb,IAAA,CAACY,wBAAwB;IACxBE,GAAG,EAAEN,SAAU;IACfO,KAAK,EAAEtB,UAAU,CAACuB,YAAa;IAC/BP,aAAa,EAAEA,aAAc;IAAAJ,QAAA,eAE7BL,IAAA,CAACH,oBAAoB;MAACoB,SAAS,EAAET,SAAU;MAAAH,QAAA,EACzCA;IAAQ,CACY;EAAC,CACE,CAAC;AAE7B,CAAC","ignoreList":[]}
@@ -3,6 +3,7 @@
3
3
  import { runOnUI } from "react-native-reanimated";
4
4
  import { DefaultSnapSpec } from "../configs/specs";
5
5
  import { AnimationStore } from "../stores/animation.store";
6
+ import { SystemStore } from "../stores/system.store";
6
7
  import { animateToProgress } from "../utils/animation/animate-to-progress";
7
8
  import { logger } from "../utils/logger";
8
9
  import { resolveSnapTargetEntry } from "./resolve-snap-target";
@@ -10,8 +11,8 @@ const getSortedSnapPoints = descriptor => {
10
11
  const snapPoints = descriptor.options?.snapPoints;
11
12
  if (!snapPoints || snapPoints.length === 0) return null;
12
13
 
13
- // Resolve 'auto' to the measured fraction stored in AnimationStore
14
- const autoVal = AnimationStore.getAnimation(descriptor.route.key, "autoSnapPoint").value;
14
+ // Resolve 'auto' to the measured fraction stored in SystemStore
15
+ const autoVal = SystemStore.getValue(descriptor.route.key, "resolvedAutoSnapPoint").value;
15
16
  const resolved = snapPoints.map(p => p === "auto" ? autoVal : p).filter(p => typeof p === "number" && p > 0);
16
17
  return resolved.length > 0 ? resolved.sort((a, b) => a - b) : null;
17
18
  };
@@ -26,13 +27,15 @@ export function snapDescriptorToIndex(descriptor, index) {
26
27
  return false;
27
28
  }
28
29
  const targetProgress = sorted[index];
29
- const animations = AnimationStore.getRouteAnimations(descriptor.route.key);
30
+ const animations = AnimationStore.getBag(descriptor.route.key);
31
+ const targetProgressValue = SystemStore.getValue(descriptor.route.key, "targetProgress");
30
32
  runOnUI(() => {
31
33
  "worklet";
32
34
 
33
35
  animateToProgress({
34
36
  target: targetProgress,
35
37
  animations,
38
+ targetProgress: targetProgressValue,
36
39
  spec: {
37
40
  open: descriptor.options.transitionSpec?.expand ?? DefaultSnapSpec,
38
41
  close: descriptor.options.transitionSpec?.collapse ?? DefaultSnapSpec
@@ -1 +1 @@
1
- {"version":3,"names":["runOnUI","DefaultSnapSpec","AnimationStore","animateToProgress","logger","resolveSnapTargetEntry","getSortedSnapPoints","descriptor","snapPoints","options","length","autoVal","getAnimation","route","key","value","resolved","map","p","filter","sort","a","b","snapDescriptorToIndex","index","sorted","warn","targetProgress","animations","getRouteAnimations","target","spec","open","transitionSpec","expand","close","collapse","snapTo","screenWithSnapPoints"],"sourceRoot":"../../../../src","sources":["shared/animation/snap-to.ts"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,yBAAyB;AACjD,SAASC,eAAe,QAAQ,kBAAkB;AAClD,SAASC,cAAc,QAAQ,2BAA2B;AAE1D,SAASC,iBAAiB,QAAQ,wCAAwC;AAC1E,SAASC,MAAM,QAAQ,iBAAiB;AACxC,SAASC,sBAAsB,QAAQ,uBAAuB;AAE9D,MAAMC,mBAAmB,GACxBC,UAAsC,IACjB;EACrB,MAAMC,UAAU,GAAGD,UAAU,CAACE,OAAO,EAAED,UAAU;EACjD,IAAI,CAACA,UAAU,IAAIA,UAAU,CAACE,MAAM,KAAK,CAAC,EAAE,OAAO,IAAI;;EAEvD;EACA,MAAMC,OAAO,GAAGT,cAAc,CAACU,YAAY,CAC1CL,UAAU,CAACM,KAAK,CAACC,GAAG,EACpB,eACD,CAAC,CAACC,KAAK;EAEP,MAAMC,QAAQ,GAAGR,UAAU,CACzBS,GAAG,CAAEC,CAAC,IAAMA,CAAC,KAAK,MAAM,GAAGP,OAAO,GAAGO,CAAE,CAAC,CACxCC,MAAM,CAAED,CAAC,IAAkB,OAAOA,CAAC,KAAK,QAAQ,IAAIA,CAAC,GAAG,CAAC,CAAC;EAE5D,OAAOF,QAAQ,CAACN,MAAM,GAAG,CAAC,GAAGM,QAAQ,CAACI,IAAI,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,GAAGC,CA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ACe,oBAAoB,CAAC/B,UAAU,EAAEiB,KAAK,CAAC;AAC9D","ignoreList":[]}
1
+ {"version":3,"names":["runOnUI","DefaultSnapSpec","AnimationStore","SystemStore","animateToProgress","logger","resolveSnapTargetEntry","getSortedSnapPoints","descriptor","snapPoints","options","length","autoVal","getValue","route","key","value","resolved","map","p","filter","sort","a","b","snapDescriptorToIndex","index","sorted","warn","targetProgress","animations","getBag","targetProgressValue","target","spec","open","transitionSpec","expand","close","collapse","snapTo","screenWithSnapPoints"],"sourceRoot":"../../../../src","sources":["shared/animation/snap-to.ts"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,yBAAyB;AACjD,SAASC,eAAe,QAAQ,kBAAkB;AAClD,SAASC,cAAc,QAAQ,2BAA2B;AAE1D,SAASC,WAAW,QAAQ,wBAAwB;AACpD,SAASC,iBAAiB,QAAQ,wCAAwC;AAC1E,SAASC,MAAM,QAAQ,iBAAiB;AACxC,SAASC,sBAAsB,QAAQ,uBAAuB;AAE9D,MAAMC,mBAAmB,GACxBC,UAAsC,IACjB;EACrB,MAAMC,UAAU,GAAGD,UAAU,CAACE,OAAO,EAAED,UAAU;EACjD,IAAI,CAACA,UAAU,IAAIA,UAAU,CAACE,MAAM,KAAK,CAAC,EAAE,OAAO,IAAI;;EAEvD;EACA,MAAMC,OAAO,GAAGT,WAAW,CAACU,QAAQ,CACnCL,UAAU,CAACM,KAAK,CAACC,GAAG,EACpB,uBACD,CAAC,CAACC,KAAK;EAEP,MAAMC,QAAQ,GAAGR,UAAU,CACzBS,GAAG,CAAEC,CAAC,IAAMA,CAAC,KAAK,MAAM,GAAGP,OAAO,GAAGO,CAAE,CAAC,CACxCC,MAAM,CAAED,CAAC,IAAkB,OAAOA,CAAC,KAAK,QAAQ,IAAIA,CAAC,GAAG,CAAC,CAAC;EAE5D,OAAOF,QAAQ,CAACN,MAAM,GAAG,CAAC,GAAGM,QAAQ,CAACI,IAAI,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC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B,GAAGlC,sBAAsB,CAAC,CAAC;EAErD,IAAI,CAACkC,oBAAoB,EAAE;IAC1BnC,MAAM,CAACsB,IAAI,CAAC,+CAA+C,CAAC;IAC5D;EACD;EAEAH,qBAAqB,CAACgB,oBAAoB,CAAChC,UAAU,EAAEiB,KAAK,CAAC;AAC9D","ignoreList":[]}
@@ -48,7 +48,7 @@ export const resolveMeasurementWritePlan = params => {
48
48
  const completeDestination = intents.completeDestination && hasPendingLink;
49
49
  const refreshSource = intents.refreshSource && hasSourceLink;
50
50
  const refreshDestination = intents.refreshDestination && (hasDestinationLink || hasPendingLink);
51
- const registerSnapshot = intents.snapshotOnly;
51
+ const registerSnapshot = intents.snapshotOnly || intents.refreshSource;
52
52
  const writesAny = registerSnapshot || captureSource || completeDestination || refreshSource || refreshDestination;
53
53
  return {
54
54
  captureSource,
@@ -1 +1 @@
1
- {"version":3,"names":["getMeasurementIntentFlags","intent","flags","captureSource","completeDestination","refreshSource","refreshDestination","snapshotOnly","intents","Array","isArray","i","length","resolveMeasurementWritePlan","params","hasPendingLink","hasSourceLink","hasDestinationLink","registerSnapshot","writesAny","wantsDestinationWrite","resolveAutoSourceCaptureSignal","enabled","nextScreenKey","tagPresence","direct","count","screenKey","entry","ancestorKeys","includes","resolvePendingDestinationCaptureSignal","resolvedSourceKey","hasPendingLinkFromSource","resolvePendingDestinationRetrySignal","retryCount","maxRetries","isAnimating","progress","retryProgressMax","retryProgressBuckets","Math","floor","resolveInitialLayoutMeasurementIntent","hasSharedBoundTag","hasMeasuredOnLayout","isAnyAnimating","resolveGroupActiveMeasurementAction","isEligible","memberId","activeId","previousActiveId","canFlushGroupActiveMeasurement","shouldTriggerScrollSettledRefresh","group","hasNextScreen","hasSettledSignal","signal","previousSignal"],"sourceRoot":"../../../../../../../src","sources":["shared/components/create-boundary-component/hooks/helpers/measurement-rules.ts"],"mappings":";;AA8BA,OAAO,MAAMA,yBAAyB,GACrCC,MAAyD,IAC7B;EAC5B,SAAS;;EACT,MAA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AAU,EAAE,OAAO,MAAM;EAC1C,IAAIE,QAAQ,KAAKD,QAAQ,EAAE,OAAO,eAAe;EACjD,IAAIC,QAAQ,KAAKD,QAAQ,IAAIC,QAAQ,KAAKC,gBAAgB,EAAE;IAC3D,OAAO,gBAAgB;EACxB;EACA,OAAO,MAAM;AACd,CAAC;AAED,OAAO,MAAMC,8BAA8B,GAAItC,MAK9C,IAAc;EACd,SAAS;;EACT,MAAM;IAAEQ,OAAO;IAAE0B,UAAU;IAAEC,QAAQ;IAAEC;EAAS,CAAC,GAAGpC,MAAM;EAC1D,IAAI,CAACQ,OAAO,IAAI,CAAC0B,UAAU,EAAE,OAAO,KAAK;EACzC,OAAOE,QAAQ,KAAKD,QAAQ;AAC7B,CAAC;AAED,OAAO,MAAMI,iCAAiC,GAAIvC,MAOjD,IAAc;EACd,SAAS;;EACT,MAAM;IACLQ,OAAO;IACPgC,KAAK;IACLC,aAAa;IACbC,gBAAgB;IAChBC,MAAM;IACNC;EACD,CAAC,GAAG5C,MAAM;EAEV,IAAI,CAACQ,OAAO,EAAE,OAAO,KAAK;EAC1B,IAAI,CAACgC,KAAK,IAAI,CAACC,aAAa,IAAI,CAACC,gBAAgB,EAAE,OAAO,KAAK;EAC/D,IAAIC,MAAM,KAAK,CAAC,IAAIA,MAAM,KAAKC,cAAc,EAAE,OAAO,KAAK;EAC3D,OAAO,IAAI;AACZ,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["getMeasurementIntentFlags","intent","flags","captureSource","completeDestination","refreshSource","refreshDestination","snapshotOnly","intents","Array","isArray","i","length","resolveMeasurementWritePlan","params","hasPendingLink","hasSourceLink","hasDestinationLink","registerSnapshot","writesAny","wantsDestinationWrite","resolveAutoSourceCaptureSignal","enabled","nextScreenKey","tagPresence","direct","count","screenKey","entry","ancestorKeys","includes","resolvePendingDestinationCaptureSignal","resolvedSourceKey","hasPendingLinkFromSource","resolvePendingDestinationRetrySignal","retryCount","maxRetries","isAnimating","progress","retryProgressMax","retryProgressBuckets","Math","floor","resolveInitialLayoutMeasurementIntent","hasSharedBoundTag","hasMeasuredOnLayout","isAnyAnimating","resolveGroupActiveMeasurementAction","isEligible","memberId","activeId","previousActiveId","canFlushGroupActiveMeasurement","shouldTriggerScrollSettledRefresh","group","hasNextScreen","hasSettledSignal","signal","previousSignal"],"sourceRoot":"../../../../../../../src","sources":["shared/components/create-boundary-component/hooks/helpers/measurement-rules.ts"],"mappings":";;AA8BA,OAAO,MAAMA,yBAAyB,GACrCC,MAAyD,IAC7B;EAC5B,SAAS;;EACT,MAAMC,KAA6B,GAAG;IACrCC,aAAa,EAAE,KAAK;IACpBC,mBAAmB,EAAE,KAAK;IAC1BC,aAAa,EAAE,KAAK;IACpBC,kBAAkB,EAAE,KAAK;IACzBC,YAAY,EAAE;EACf,CAAC;EAED,IAAI,CAACN,MAAM,EAAE;IACZ,OAAOC,KAAK;EACb;EAEA,MAAMM,OAAO,GAAGC,KAAK,CAACC,OAAO,CAACT,MAAM,CAAC,GAAGA,MAAM,GAAG,CAACA,MAAM,CAAC;EAEzD,KAAK,IAAIU,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGH,OAAO,CAACI,MAAM,EAAED,CAAC,EAAE,EAAE;IACxC,QAAQH,OAAO,CAACG,CAAC,CAAC;MACjB,KAAK,gBAAgB;QACpBT,KAAK,CAACC,aAAa,GAAG,IAAI;QAC1B;MACD,KAAK,sBAAsB;QAC1BD,KAAK,CAACE,mBAAmB,GAAG,IAAI;QAChC;MACD,KAAK,gBAAgB;QACpBF,KAAK,CAACG,aAAa,GAAG,IAAI;QAC1B;MACD,KAAK,qBAAqB;QACzBH,KAAK,CAACI,kBAAkB,GAAG,IAAI;QAC/B;MACD,KAAK,eAAe;QACnBJ,KAAK,CAACK,YAAY,GAAG,IAAI;QACzB;IACF;EACD;EAEA,OAAOL,KAAK;AACb,CAAC;AAED,OAAO,MAAMW,2BAA2B,GAAIC,MAK3C,IAA2B;EAC3B,SAAS;;EACT,MAAM;IAAEN,O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","ignoreList":[]}
@@ -1,7 +1,10 @@
1
1
  "use strict";
2
2
 
3
- import { useAnimatedReaction } from "react-native-reanimated";
3
+ import { useAnimatedReaction, useDerivedValue, useSharedValue } from "react-native-reanimated";
4
+ import { EPSILON } from "../../../constants";
5
+ import { AnimationStore } from "../../../stores/animation.store";
4
6
  import { BoundStore } from "../../../stores/bounds";
7
+ import { GestureStore } from "../../../stores/gesture.store";
5
8
  import { canFlushGroupActiveMeasurement, resolveGroupActiveMeasurementAction } from "./helpers/measurement-rules";
6
9
  import { useDeferredMeasurementTrigger } from "./use-deferred-measurement-trigger";
7
10
 
@@ -17,18 +20,55 @@ export const useGroupActiveMeasurement = params => {
17
20
  enabled,
18
21
  group,
19
22
  id,
23
+ currentScreenKey,
20
24
  shouldUpdateDestination,
21
- isAnimating,
22
25
  maybeMeasureAndStore
23
26
  } = params;
24
27
  const idStr = String(id);
25
28
  const allGroups = BoundStore.getGroups();
29
+ const progress = AnimationStore.getValue(currentScreenKey, "progress");
30
+ const animating = AnimationStore.getValue(currentScreenKey, "animating");
31
+ const entering = AnimationStore.getValue(currentScreenKey, "entering");
32
+ const closing = AnimationStore.getValue(currentScreenKey, "closing");
33
+ const dragging = GestureStore.getValue(currentScreenKey, "dragging");
34
+ const dismissing = GestureStore.getValue(currentScreenKey, "dismissing");
35
+ const hasSettledOpenOnce = useSharedValue(false);
36
+ useAnimatedReaction(() => {
37
+ "worklet";
38
+
39
+ if (!enabled || !shouldUpdateDestination) return false;
40
+ return progress.value >= 1 - EPSILON && animating.value === 0 && entering.value === 0 && closing.value === 0 && dragging.value === 0 && dismissing.value === 0;
41
+ }, isSettledOpen => {
42
+ "worklet";
43
+
44
+ if (isSettledOpen) {
45
+ hasSettledOpenOnce.value = true;
46
+ }
47
+ }, [enabled, shouldUpdateDestination, progress, animating, entering, closing, dragging, dismissing, hasSettledOpenOnce]);
48
+ const isRefreshBlocked = useDerivedValue(() => {
49
+ "worklet";
50
+
51
+ if (!enabled || !shouldUpdateDestination) return 0;
52
+ if (!hasSettledOpenOnce.value) return 1;
53
+ if (progress.value < 1 - EPSILON) return 1;
54
+ if (animating.value !== 0) return 1;
55
+ if (entering.value !== 0) return 1;
56
+ if (closing.value !== 0) return 1;
57
+ if (dragging.value !== 0) return 1;
58
+ if (dismissing.value !== 0) return 1;
59
+ return 0;
60
+ });
26
61
  const {
27
62
  clearPendingMeasurement,
28
63
  queueOrFlushMeasurement
29
64
  } = useDeferredMeasurementTrigger({
30
65
  enabled,
31
- isAnimating,
66
+ /**
67
+ * The reason to do extra guard checks for isAnimating is because a user may mid animation drag, causing
68
+ * the src component to be wrongly measured. This in turns leads to faulty src measurements being used, giving us a weird teleport
69
+ * animation rather than a smooth 'SET' transition when dst is actually dismissing.
70
+ */
71
+ isAnimating: isRefreshBlocked,
32
72
  canFlush: () => {
33
73
  "worklet";
34
74
 
@@ -37,7 +77,7 @@ export const useGroupActiveMeasurement = params => {
37
77
  isEligible: !!group && shouldUpdateDestination,
38
78
  memberId: idStr,
39
79
  activeId: group ? allGroups.value[group]?.activeId ?? null : null
40
- });
80
+ }) && hasSettledOpenOnce.value;
41
81
  },
42
82
  onFlush: () => {
43
83
  "worklet";
@@ -68,8 +108,11 @@ export const useGroupActiveMeasurement = params => {
68
108
  return;
69
109
  }
70
110
  if (action === "queue-or-flush") {
111
+ if (!hasSettledOpenOnce.value) {
112
+ return;
113
+ }
71
114
  queueOrFlushMeasurement();
72
115
  }
73
- }, [enabled, group, idStr, shouldUpdateDestination, clearPendingMeasurement, queueOrFlushMeasurement]);
116
+ }, [enabled, group, idStr, currentScreenKey, shouldUpdateDestination, hasSettledOpenOnce, clearPendingMeasurement, queueOrFlushMeasurement]);
74
117
  };
75
118
  //# sourceMappingURL=use-group-active-measurement.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useAnimatedReaction","BoundStore","canFlushGroupActiveMeasurement","resolveGroupActiveMeasurementAction","useDeferredMeasurementTrigger","useGroupActiveMeasurement","params","enabled","group","id","shouldUpdateDestination","isAnimating","maybeMeasureAndStore","idStr","String","allGroups","getGroups","clearPendingMeasurement","queueOrFlushMeasurement","canFlush","isEligible","memberId","activeId","value","onFlush","intent","previousActiveId","action"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-group-active-measurement.ts"],"mappings":";;AAAA,SAA2BA,mBAAmB,QAAQ,yBAAyB;AAC/E,SAASC,UAAU,QAAQ,wBAAwB;AAEnD,SACCC,8BAA8B,EAC9BC,mCAAmC,QAC7B,6BAA6B;AACpC,SAASC,6BAA6B,QAAQ,oCAAoC;;AAElF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,yBAAyB,GAAIC,MAOzC,IAAK;EACL,MAAM;IACLC,OAAO;IACPC,KAAK;IACLC,EAAE;IACFC,uBAAuB;IACvBC,WAAW;IACXC;EACD,CAAC,GAAGN,MAAM;EACV,MAAMO,KAAK,GAAGC,MAAM,CAACL,EAAE,CAAC;EAExB,MAAMM,SAAS,GAAGd,UAAU,CAACe,SAAS,CAAC,CAAC;EACxC,MAAM;IAAEC,uBAAuB;IAAEC;EAAwB,CAAC,GACzDd,6BAA6B,CAAC;IAC7BG,OAAO;IACPI,WAAW;IACXQ,QAAQ,EAAEA,CAAA,KAAM;MACf,SAAS;;MACT,OAAOjB,8BAA8B,CAAC;QACrCK,OAAO;QACPa,UAAU,EAAE,CAAC,CAACZ,KAAK,IAAIE,uBAAuB;QAC9CW,QAAQ,EAAER,KAAK;QACfS,QAAQ,EAAEd,KAAK,GAAIO,SAAS,CAACQ,KAAK,CAACf,KAAK,CAAC,EAAEc,QAAQ,IAAI,IAAI,GAAI;MAChE,CAAC,CAAC;IACH,CAAC;IACDE,OAAO,EAAEA,CAAA,KAAM;MACd,SAAS;;MACTZ,oBAAoB,CAAC;QAAEa,MAAM,EAAE;MAAsB,CAAC,CAAC;IACxD;EACD,CAAC,CAAC;EAEHzB,mBAAmB,CAClB,MAAM;IACL,SAAS;;IACT,IAAI,CAACO,OAAO,EAAE,OAAO,IAAI;IACzB,IAAI,CAACC,KAAK,EAAE,OAAO,IAAI;IACvB,OAAOO,SAAS,CAACQ,KAAK,CAACf,KAAK,CAAC,EAAEc,QAAQ,IAAI,IAAI;EAChD,CAAC,EACD,CAACA,QAAQ,EAAEI,gBAAgB,KAAK;IAC/B,SAAS;;IACT,MAAMC,MAAM,GAAGxB,mCAAmC,CAAC;MAClDI,OAAO;MACPa,UAAU,EAAE,CAAC,CAACZ,KAAK,IAAIE,uBAAuB;MAC9CW,QAAQ,EAAER,KAAK;MACfS,QAAQ;MACRI;IACD,CAAC,CAAC;IAEF,IAAIC,MAAM,KAAK,eAAe,EAAE;MAC/BV,uBAAuB,CAAC,CAAC;MACzB;IACD;IAEA,IAAIU,MAAM,KAAK,gBAAgB,EAAE;MAChCT,uBAAuB,CAAC,CAAC;IAC1B;EACD,CAAC,EACD,CACCX,OAAO,EACPC,KAAK,EACLK,KAAK,EACLH,uBAAuB,EACvBO,uBAAuB,EACvBC,uBAAuB,CAEzB,CAAC;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useAnimatedReaction","useDerivedValue","useSharedValue","EPSILON","AnimationStore","BoundStore","GestureStore","canFlushGroupActiveMeasurement","resolveGroupActiveMeasurementAction","useDeferredMeasurementTrigger","useGroupActiveMeasurement","params","enabled","group","id","currentScreenKey","shouldUpdateDestination","maybeMeasureAndStore","idStr","String","allGroups","getGroups","progress","getValue","animating","entering","closing","dragging","dismissing","hasSettledOpenOnce","value","isSettledOpen","isRefreshBlocked","clearPendingMeasurement","queueOrFlushMeasurement","isAnimating","canFlush","isEligible","memberId","activeId","onFlush","intent","previousActiveId","action"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-group-active-measurement.ts"],"mappings":";;AAAA,SACCA,mBAAmB,EACnBC,eAAe,EACfC,cAAc,QACR,yBAAyB;AAChC,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,cAAc,QAAQ,iCAAiC;AACh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
16
16
  maybeMeasureAndStore
17
17
  } = params;
18
- const isAnimating = AnimationStore.getRouteAnimation(currentScreenKey, "animating");
19
- const ancestorAnimations = ancestorKeys.map(key => AnimationStore.getRouteAnimation(key, "animating"));
18
+ const isAnimating = AnimationStore.getValue(currentScreenKey, "animating");
19
+ const ancestorAnimations = ancestorKeys.map(key => AnimationStore.getValue(key, "animating"));
20
20
  const hasMeasuredOnLayout = useSharedValue(false);
21
21
  const handleInitialLayout = useCallback(() => {
22
22
  "worklet";