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

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 (535) hide show
  1. package/README.md +11 -1046
  2. package/lib/commonjs/blank-stack/navigators/create-blank-stack-navigator.js +69 -2
  3. package/lib/commonjs/blank-stack/navigators/create-blank-stack-navigator.js.map +1 -1
  4. package/lib/commonjs/component-stack/navigators/create-component-stack-navigator.js +9 -0
  5. package/lib/commonjs/component-stack/navigators/create-component-stack-navigator.js.map +1 -1
  6. package/lib/commonjs/shared/animation/snap-to.js +5 -1
  7. package/lib/commonjs/shared/animation/snap-to.js.map +1 -1
  8. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +195 -0
  9. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +1 -0
  10. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js +7 -14
  11. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js.map +1 -1
  12. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js +19 -18
  13. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js.map +1 -1
  14. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.js +54 -0
  15. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.js.map +1 -0
  16. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-measurement.js +40 -8
  17. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-measurement.js.map +1 -1
  18. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.js +72 -0
  19. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.js.map +1 -0
  20. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js +16 -7
  21. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js.map +1 -1
  22. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js +7 -4
  23. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js.map +1 -1
  24. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js +14 -15
  25. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js.map +1 -1
  26. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js +27 -9
  27. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js.map +1 -1
  28. package/lib/commonjs/shared/components/create-boundary-component/index.js +22 -8
  29. package/lib/commonjs/shared/components/create-boundary-component/index.js.map +1 -1
  30. package/lib/commonjs/shared/components/create-boundary-component/utils/build-boundary-match-key.js +5 -10
  31. package/lib/commonjs/shared/components/create-boundary-component/utils/build-boundary-match-key.js.map +1 -1
  32. package/lib/commonjs/shared/components/create-transition-aware-component.js +3 -2
  33. package/lib/commonjs/shared/components/create-transition-aware-component.js.map +1 -1
  34. package/lib/commonjs/shared/components/native-screen-container.js +12 -6
  35. package/lib/commonjs/shared/components/native-screen-container.js.map +1 -1
  36. package/lib/commonjs/shared/components/native-screen.js +35 -8
  37. package/lib/commonjs/shared/components/native-screen.js.map +1 -1
  38. package/lib/commonjs/shared/components/overlay/helpers/get-active-overlay.js +2 -2
  39. package/lib/commonjs/shared/components/overlay/helpers/get-active-overlay.js.map +1 -1
  40. package/lib/commonjs/shared/components/overlay/index.js +1 -3
  41. package/lib/commonjs/shared/components/overlay/index.js.map +1 -1
  42. package/lib/commonjs/shared/components/overlay/variations/overlay-host.js +2 -16
  43. package/lib/commonjs/shared/components/overlay/variations/overlay-host.js.map +1 -1
  44. package/lib/commonjs/shared/components/scene-view.js +2 -4
  45. package/lib/commonjs/shared/components/scene-view.js.map +1 -1
  46. package/lib/commonjs/shared/components/screen-container/hooks/use-content-layout.js +60 -0
  47. package/lib/commonjs/shared/components/screen-container/hooks/use-content-layout.js.map +1 -0
  48. package/lib/commonjs/shared/components/screen-container/layers/backdrop.js +9 -6
  49. package/lib/commonjs/shared/components/screen-container/layers/backdrop.js.map +1 -1
  50. package/lib/commonjs/shared/components/screen-container/layers/content.js +16 -56
  51. package/lib/commonjs/shared/components/screen-container/layers/content.js.map +1 -1
  52. package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js +86 -0
  53. package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -0
  54. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/index.js.map +1 -1
  55. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-open-transition.js +17 -4
  56. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-open-transition.js.map +1 -1
  57. package/lib/commonjs/shared/constants.js +6 -2
  58. package/lib/commonjs/shared/constants.js.map +1 -1
  59. package/lib/commonjs/shared/hooks/gestures/resolve-screen-gesture-target.js +49 -0
  60. package/lib/commonjs/shared/hooks/gestures/resolve-screen-gesture-target.js.map +1 -0
  61. package/lib/commonjs/shared/hooks/gestures/types.js +2 -0
  62. package/lib/commonjs/shared/hooks/gestures/types.js.map +1 -0
  63. package/lib/commonjs/shared/hooks/gestures/use-screen-gesture.js +7 -3
  64. package/lib/commonjs/shared/hooks/gestures/use-screen-gesture.js.map +1 -1
  65. package/lib/commonjs/shared/hooks/navigation/use-stack.js.map +1 -1
  66. package/lib/commonjs/shared/index.js +15 -3
  67. package/lib/commonjs/shared/index.js.map +1 -1
  68. package/lib/commonjs/shared/providers/gestures/handlers/use-handlers.js +61 -25
  69. package/lib/commonjs/shared/providers/gestures/handlers/use-handlers.js.map +1 -1
  70. package/lib/commonjs/shared/providers/gestures/helpers/gesture-activation.js +11 -6
  71. package/lib/commonjs/shared/providers/gestures/helpers/gesture-activation.js.map +1 -1
  72. package/lib/commonjs/shared/providers/gestures/helpers/gesture-snap-points.js +44 -0
  73. package/lib/commonjs/shared/providers/gestures/helpers/gesture-snap-points.js.map +1 -0
  74. package/lib/commonjs/shared/providers/layout-anchor.provider.js +4 -6
  75. package/lib/commonjs/shared/providers/layout-anchor.provider.js.map +1 -1
  76. package/lib/commonjs/shared/providers/screen/animation/animation.provider.js +31 -17
  77. package/lib/commonjs/shared/providers/screen/animation/animation.provider.js.map +1 -1
  78. package/lib/commonjs/shared/providers/screen/animation/helpers/derivations.js +1 -9
  79. package/lib/commonjs/shared/providers/screen/animation/helpers/derivations.js.map +1 -1
  80. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +25 -13
  81. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  82. package/lib/commonjs/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js +33 -0
  83. package/lib/commonjs/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js.map +1 -0
  84. package/lib/commonjs/shared/providers/screen/animation/types.js +2 -0
  85. package/lib/commonjs/shared/providers/screen/animation/types.js.map +1 -0
  86. package/lib/commonjs/shared/providers/screen/animation/use-screen-animation.js +9 -3
  87. package/lib/commonjs/shared/providers/screen/animation/use-screen-animation.js.map +1 -1
  88. package/lib/commonjs/shared/providers/stack/core.provider.js +14 -21
  89. package/lib/commonjs/shared/providers/stack/core.provider.js.map +1 -1
  90. package/lib/commonjs/shared/providers/stack/direct.provider.js +1 -1
  91. package/lib/commonjs/shared/providers/stack/direct.provider.js.map +1 -1
  92. package/lib/commonjs/shared/providers/stack/helpers/use-processed-routes.js +1 -1
  93. package/lib/commonjs/shared/providers/stack/helpers/use-processed-routes.js.map +1 -1
  94. package/lib/commonjs/shared/stores/animation.store.js +10 -2
  95. package/lib/commonjs/shared/stores/animation.store.js.map +1 -1
  96. package/lib/commonjs/shared/stores/bounds/internals/presence.js.map +1 -1
  97. package/lib/commonjs/shared/stores/bounds/internals/resolver.js +7 -0
  98. package/lib/commonjs/shared/stores/bounds/internals/resolver.js.map +1 -1
  99. package/lib/commonjs/shared/utils/animation/animate-to-progress.js +6 -0
  100. package/lib/commonjs/shared/utils/animation/animate-to-progress.js.map +1 -1
  101. package/lib/commonjs/shared/utils/bounds/helpers/compute-bounds-styles.js +33 -9
  102. package/lib/commonjs/shared/utils/bounds/helpers/compute-bounds-styles.js.map +1 -1
  103. package/lib/commonjs/shared/utils/bounds/helpers/geometry.js +3 -2
  104. package/lib/commonjs/shared/utils/bounds/helpers/geometry.js.map +1 -1
  105. package/lib/commonjs/shared/utils/bounds/helpers/interpolators.js +3 -2
  106. package/lib/commonjs/shared/utils/bounds/helpers/interpolators.js.map +1 -1
  107. package/lib/commonjs/shared/utils/bounds/helpers/link-accessor.js +2 -2
  108. package/lib/commonjs/shared/utils/bounds/helpers/link-accessor.js.map +1 -1
  109. package/lib/commonjs/shared/utils/bounds/helpers/resolve-bound-tag.js +4 -8
  110. package/lib/commonjs/shared/utils/bounds/helpers/resolve-bound-tag.js.map +1 -1
  111. package/lib/commonjs/shared/utils/bounds/helpers/style-composers.js +4 -3
  112. package/lib/commonjs/shared/utils/bounds/helpers/style-composers.js.map +1 -1
  113. package/lib/commonjs/shared/utils/bounds/index.js +13 -3
  114. package/lib/commonjs/shared/utils/bounds/index.js.map +1 -1
  115. package/lib/commonjs/shared/utils/bounds/types/frame-props.js +6 -0
  116. package/lib/commonjs/shared/utils/bounds/types/frame-props.js.map +1 -0
  117. package/lib/commonjs/shared/utils/bounds/zoom/accessor.js +54 -0
  118. package/lib/commonjs/shared/utils/bounds/zoom/accessor.js.map +1 -0
  119. package/lib/commonjs/shared/utils/bounds/zoom/build.js +548 -0
  120. package/lib/commonjs/shared/utils/bounds/zoom/build.js.map +1 -0
  121. package/lib/commonjs/shared/utils/bounds/zoom/config.js +118 -0
  122. package/lib/commonjs/shared/utils/bounds/zoom/config.js.map +1 -0
  123. package/lib/commonjs/shared/utils/bounds/zoom/index.js +20 -0
  124. package/lib/commonjs/shared/utils/bounds/zoom/index.js.map +1 -0
  125. package/lib/commonjs/shared/utils/bounds/zoom/types.js.map +1 -0
  126. package/lib/commonjs/shared/utils/gesture/validate-snap-points.js +11 -5
  127. package/lib/commonjs/shared/utils/gesture/validate-snap-points.js.map +1 -1
  128. package/lib/commonjs/shared/utils/overlay/visibility.js +2 -9
  129. package/lib/commonjs/shared/utils/overlay/visibility.js.map +1 -1
  130. package/lib/commonjs/shared/utils/resolve-screen-transition-options.js +25 -0
  131. package/lib/commonjs/shared/utils/resolve-screen-transition-options.js.map +1 -0
  132. package/lib/module/blank-stack/navigators/create-blank-stack-navigator.js +69 -3
  133. package/lib/module/blank-stack/navigators/create-blank-stack-navigator.js.map +1 -1
  134. package/lib/module/component-stack/navigators/create-component-stack-navigator.js +9 -0
  135. package/lib/module/component-stack/navigators/create-component-stack-navigator.js.map +1 -1
  136. package/lib/module/shared/animation/snap-to.js +5 -1
  137. package/lib/module/shared/animation/snap-to.js.map +1 -1
  138. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +182 -0
  139. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +1 -0
  140. package/lib/module/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js +7 -14
  141. package/lib/module/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js.map +1 -1
  142. package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js +19 -18
  143. package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js.map +1 -1
  144. package/lib/module/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.js +49 -0
  145. package/lib/module/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.js.map +1 -0
  146. package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-measurement.js +41 -8
  147. package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-measurement.js.map +1 -1
  148. package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.js +67 -0
  149. package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.js.map +1 -0
  150. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js +16 -7
  151. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js.map +1 -1
  152. package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js +7 -4
  153. package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js.map +1 -1
  154. package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js +14 -15
  155. package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js.map +1 -1
  156. package/lib/module/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js +27 -9
  157. package/lib/module/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js.map +1 -1
  158. package/lib/module/shared/components/create-boundary-component/index.js +22 -8
  159. package/lib/module/shared/components/create-boundary-component/index.js.map +1 -1
  160. package/lib/module/shared/components/create-boundary-component/utils/build-boundary-match-key.js +5 -10
  161. package/lib/module/shared/components/create-boundary-component/utils/build-boundary-match-key.js.map +1 -1
  162. package/lib/module/shared/components/create-transition-aware-component.js +3 -2
  163. package/lib/module/shared/components/create-transition-aware-component.js.map +1 -1
  164. package/lib/module/shared/components/native-screen-container.js +12 -6
  165. package/lib/module/shared/components/native-screen-container.js.map +1 -1
  166. package/lib/module/shared/components/native-screen.js +35 -8
  167. package/lib/module/shared/components/native-screen.js.map +1 -1
  168. package/lib/module/shared/components/overlay/helpers/get-active-overlay.js +3 -3
  169. package/lib/module/shared/components/overlay/helpers/get-active-overlay.js.map +1 -1
  170. package/lib/module/shared/components/overlay/index.js +1 -3
  171. package/lib/module/shared/components/overlay/index.js.map +1 -1
  172. package/lib/module/shared/components/overlay/variations/overlay-host.js +3 -17
  173. package/lib/module/shared/components/overlay/variations/overlay-host.js.map +1 -1
  174. package/lib/module/shared/components/scene-view.js +3 -5
  175. package/lib/module/shared/components/scene-view.js.map +1 -1
  176. package/lib/module/shared/components/screen-container/hooks/use-content-layout.js +56 -0
  177. package/lib/module/shared/components/screen-container/hooks/use-content-layout.js.map +1 -0
  178. package/lib/module/shared/components/screen-container/layers/backdrop.js +9 -6
  179. package/lib/module/shared/components/screen-container/layers/backdrop.js.map +1 -1
  180. package/lib/module/shared/components/screen-container/layers/content.js +18 -58
  181. package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
  182. package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js +81 -0
  183. package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -0
  184. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/index.js.map +1 -1
  185. package/lib/module/shared/components/screen-lifecycle/hooks/use-open-transition.js +17 -4
  186. package/lib/module/shared/components/screen-lifecycle/hooks/use-open-transition.js.map +1 -1
  187. package/lib/module/shared/constants.js +6 -2
  188. package/lib/module/shared/constants.js.map +1 -1
  189. package/lib/module/shared/hooks/gestures/resolve-screen-gesture-target.js +45 -0
  190. package/lib/module/shared/hooks/gestures/resolve-screen-gesture-target.js.map +1 -0
  191. package/lib/module/shared/hooks/gestures/types.js +2 -0
  192. package/lib/module/shared/hooks/gestures/types.js.map +1 -0
  193. package/lib/module/shared/hooks/gestures/use-screen-gesture.js +7 -4
  194. package/lib/module/shared/hooks/gestures/use-screen-gesture.js.map +1 -1
  195. package/lib/module/shared/hooks/navigation/use-stack.js.map +1 -1
  196. package/lib/module/shared/index.js +1 -2
  197. package/lib/module/shared/index.js.map +1 -1
  198. package/lib/module/shared/providers/gestures/handlers/use-handlers.js +61 -25
  199. package/lib/module/shared/providers/gestures/handlers/use-handlers.js.map +1 -1
  200. package/lib/module/shared/providers/gestures/helpers/gesture-activation.js +11 -6
  201. package/lib/module/shared/providers/gestures/helpers/gesture-activation.js.map +1 -1
  202. package/lib/module/shared/providers/gestures/helpers/gesture-snap-points.js +38 -0
  203. package/lib/module/shared/providers/gestures/helpers/gesture-snap-points.js.map +1 -0
  204. package/lib/module/shared/providers/layout-anchor.provider.js +4 -6
  205. package/lib/module/shared/providers/layout-anchor.provider.js.map +1 -1
  206. package/lib/module/shared/providers/screen/animation/animation.provider.js +30 -15
  207. package/lib/module/shared/providers/screen/animation/animation.provider.js.map +1 -1
  208. package/lib/module/shared/providers/screen/animation/helpers/derivations.js +1 -9
  209. package/lib/module/shared/providers/screen/animation/helpers/derivations.js.map +1 -1
  210. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +25 -13
  211. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  212. package/lib/module/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js +29 -0
  213. package/lib/module/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js.map +1 -0
  214. package/lib/module/shared/providers/screen/animation/index.js.map +1 -1
  215. package/lib/module/shared/providers/screen/animation/types.js +2 -0
  216. package/lib/module/shared/providers/screen/animation/types.js.map +1 -0
  217. package/lib/module/shared/providers/screen/animation/use-screen-animation.js +9 -3
  218. package/lib/module/shared/providers/screen/animation/use-screen-animation.js.map +1 -1
  219. package/lib/module/shared/providers/stack/core.provider.js +14 -21
  220. package/lib/module/shared/providers/stack/core.provider.js.map +1 -1
  221. package/lib/module/shared/providers/stack/direct.provider.js +2 -2
  222. package/lib/module/shared/providers/stack/direct.provider.js.map +1 -1
  223. package/lib/module/shared/providers/stack/helpers/use-processed-routes.js +2 -2
  224. package/lib/module/shared/providers/stack/helpers/use-processed-routes.js.map +1 -1
  225. package/lib/module/shared/stores/animation.store.js +10 -2
  226. package/lib/module/shared/stores/animation.store.js.map +1 -1
  227. package/lib/module/shared/stores/bounds/internals/presence.js.map +1 -1
  228. package/lib/module/shared/stores/bounds/internals/resolver.js +7 -0
  229. package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -1
  230. package/lib/module/shared/utils/animation/animate-to-progress.js +6 -0
  231. package/lib/module/shared/utils/animation/animate-to-progress.js.map +1 -1
  232. package/lib/module/shared/utils/bounds/helpers/compute-bounds-styles.js +33 -9
  233. package/lib/module/shared/utils/bounds/helpers/compute-bounds-styles.js.map +1 -1
  234. package/lib/module/shared/utils/bounds/helpers/geometry.js +3 -2
  235. package/lib/module/shared/utils/bounds/helpers/geometry.js.map +1 -1
  236. package/lib/module/shared/utils/bounds/helpers/interpolators.js +3 -2
  237. package/lib/module/shared/utils/bounds/helpers/interpolators.js.map +1 -1
  238. package/lib/module/shared/utils/bounds/helpers/link-accessor.js +2 -2
  239. package/lib/module/shared/utils/bounds/helpers/link-accessor.js.map +1 -1
  240. package/lib/module/shared/utils/bounds/helpers/resolve-bound-tag.js +4 -8
  241. package/lib/module/shared/utils/bounds/helpers/resolve-bound-tag.js.map +1 -1
  242. package/lib/module/shared/utils/bounds/helpers/style-composers.js +4 -3
  243. package/lib/module/shared/utils/bounds/helpers/style-composers.js.map +1 -1
  244. package/lib/module/shared/utils/bounds/index.js +13 -3
  245. package/lib/module/shared/utils/bounds/index.js.map +1 -1
  246. package/lib/module/shared/utils/bounds/types/frame-props.js +4 -0
  247. package/lib/module/shared/utils/bounds/types/frame-props.js.map +1 -0
  248. package/lib/module/shared/utils/bounds/zoom/accessor.js +49 -0
  249. package/lib/module/shared/utils/bounds/zoom/accessor.js.map +1 -0
  250. package/lib/module/shared/utils/bounds/zoom/build.js +543 -0
  251. package/lib/module/shared/utils/bounds/zoom/build.js.map +1 -0
  252. package/lib/module/shared/utils/bounds/zoom/config.js +112 -0
  253. package/lib/module/shared/utils/bounds/zoom/config.js.map +1 -0
  254. package/lib/module/shared/utils/bounds/zoom/index.js +5 -0
  255. package/lib/module/shared/utils/bounds/zoom/index.js.map +1 -0
  256. package/lib/module/shared/utils/bounds/zoom/types.js.map +1 -0
  257. package/lib/module/shared/utils/gesture/validate-snap-points.js +11 -5
  258. package/lib/module/shared/utils/gesture/validate-snap-points.js.map +1 -1
  259. package/lib/module/shared/utils/overlay/visibility.js +1 -7
  260. package/lib/module/shared/utils/overlay/visibility.js.map +1 -1
  261. package/lib/module/shared/utils/resolve-screen-transition-options.js +19 -0
  262. package/lib/module/shared/utils/resolve-screen-transition-options.js.map +1 -0
  263. package/lib/typescript/blank-stack/index.d.ts +1 -1
  264. package/lib/typescript/blank-stack/index.d.ts.map +1 -1
  265. package/lib/typescript/blank-stack/navigators/create-blank-stack-navigator.d.ts +29 -4
  266. package/lib/typescript/blank-stack/navigators/create-blank-stack-navigator.d.ts.map +1 -1
  267. package/lib/typescript/blank-stack/types.d.ts +33 -4
  268. package/lib/typescript/blank-stack/types.d.ts.map +1 -1
  269. package/lib/typescript/component-stack/navigators/create-component-stack-navigator.d.ts +8 -0
  270. package/lib/typescript/component-stack/navigators/create-component-stack-navigator.d.ts.map +1 -1
  271. package/lib/typescript/shared/animation/snap-to.d.ts.map +1 -1
  272. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts +81 -0
  273. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts.map +1 -0
  274. package/lib/typescript/shared/components/create-boundary-component/hooks/use-auto-source-measurement.d.ts.map +1 -1
  275. package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.d.ts +2 -3
  276. package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.d.ts.map +1 -1
  277. package/lib/typescript/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.d.ts +11 -0
  278. package/lib/typescript/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.d.ts.map +1 -0
  279. package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-measurement.d.ts +2 -2
  280. package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-measurement.d.ts.map +1 -1
  281. package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.d.ts +11 -0
  282. package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.d.ts.map +1 -0
  283. package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-layout-handler.d.ts.map +1 -1
  284. package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.d.ts.map +1 -1
  285. package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.d.ts +3 -3
  286. package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.d.ts.map +1 -1
  287. package/lib/typescript/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.d.ts +2 -2
  288. package/lib/typescript/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.d.ts.map +1 -1
  289. package/lib/typescript/shared/components/create-boundary-component/index.d.ts +5 -3
  290. package/lib/typescript/shared/components/create-boundary-component/index.d.ts.map +1 -1
  291. package/lib/typescript/shared/components/create-boundary-component/types.d.ts +2 -4
  292. package/lib/typescript/shared/components/create-boundary-component/types.d.ts.map +1 -1
  293. package/lib/typescript/shared/components/create-boundary-component/utils/build-boundary-match-key.d.ts +0 -1
  294. package/lib/typescript/shared/components/create-boundary-component/utils/build-boundary-match-key.d.ts.map +1 -1
  295. package/lib/typescript/shared/components/create-transition-aware-component.d.ts +1 -0
  296. package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -1
  297. package/lib/typescript/shared/components/native-screen-container.d.ts.map +1 -1
  298. package/lib/typescript/shared/components/native-screen.d.ts.map +1 -1
  299. package/lib/typescript/shared/components/overlay/helpers/get-active-overlay.d.ts +1 -1
  300. package/lib/typescript/shared/components/overlay/index.d.ts +0 -2
  301. package/lib/typescript/shared/components/overlay/index.d.ts.map +1 -1
  302. package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts.map +1 -1
  303. package/lib/typescript/shared/components/scene-view.d.ts.map +1 -1
  304. package/lib/typescript/shared/components/screen-container/hooks/use-content-layout.d.ts +3 -0
  305. package/lib/typescript/shared/components/screen-container/hooks/use-content-layout.d.ts.map +1 -0
  306. package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -1
  307. package/lib/typescript/shared/components/screen-container/layers/content.d.ts.map +1 -1
  308. package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts +9 -0
  309. package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts.map +1 -0
  310. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/index.d.ts.map +1 -1
  311. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-open-transition.d.ts.map +1 -1
  312. package/lib/typescript/shared/constants.d.ts +3 -0
  313. package/lib/typescript/shared/constants.d.ts.map +1 -1
  314. package/lib/typescript/shared/hooks/gestures/resolve-screen-gesture-target.d.ts +10 -0
  315. package/lib/typescript/shared/hooks/gestures/resolve-screen-gesture-target.d.ts.map +1 -0
  316. package/lib/typescript/shared/hooks/gestures/types.d.ts +4 -0
  317. package/lib/typescript/shared/hooks/gestures/types.d.ts.map +1 -0
  318. package/lib/typescript/shared/hooks/gestures/use-screen-gesture.d.ts +4 -2
  319. package/lib/typescript/shared/hooks/gestures/use-screen-gesture.d.ts.map +1 -1
  320. package/lib/typescript/shared/hooks/navigation/use-stack.d.ts +1 -2
  321. package/lib/typescript/shared/hooks/navigation/use-stack.d.ts.map +1 -1
  322. package/lib/typescript/shared/index.d.ts +16 -18
  323. package/lib/typescript/shared/index.d.ts.map +1 -1
  324. package/lib/typescript/shared/providers/gestures/handlers/use-handlers.d.ts +1 -1
  325. package/lib/typescript/shared/providers/gestures/handlers/use-handlers.d.ts.map +1 -1
  326. package/lib/typescript/shared/providers/gestures/helpers/gesture-activation.d.ts.map +1 -1
  327. package/lib/typescript/shared/providers/gestures/helpers/gesture-snap-points.d.ts +18 -0
  328. package/lib/typescript/shared/providers/gestures/helpers/gesture-snap-points.d.ts.map +1 -0
  329. package/lib/typescript/shared/providers/layout-anchor.provider.d.ts +1 -1
  330. package/lib/typescript/shared/providers/layout-anchor.provider.d.ts.map +1 -1
  331. package/lib/typescript/shared/providers/screen/animation/animation.provider.d.ts +6 -3
  332. package/lib/typescript/shared/providers/screen/animation/animation.provider.d.ts.map +1 -1
  333. package/lib/typescript/shared/providers/screen/animation/helpers/derivations.d.ts +0 -2
  334. package/lib/typescript/shared/providers/screen/animation/helpers/derivations.d.ts.map +1 -1
  335. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
  336. package/lib/typescript/shared/providers/screen/animation/helpers/resolve-screen-animation-target.d.ts +11 -0
  337. package/lib/typescript/shared/providers/screen/animation/helpers/resolve-screen-animation-target.d.ts.map +1 -0
  338. package/lib/typescript/shared/providers/screen/animation/index.d.ts +1 -1
  339. package/lib/typescript/shared/providers/screen/animation/index.d.ts.map +1 -1
  340. package/lib/typescript/shared/providers/screen/animation/types.d.ts +4 -0
  341. package/lib/typescript/shared/providers/screen/animation/types.d.ts.map +1 -0
  342. package/lib/typescript/shared/providers/screen/animation/use-screen-animation.d.ts +5 -1
  343. package/lib/typescript/shared/providers/screen/animation/use-screen-animation.d.ts.map +1 -1
  344. package/lib/typescript/shared/providers/stack/core.provider.d.ts +2 -0
  345. package/lib/typescript/shared/providers/stack/core.provider.d.ts.map +1 -1
  346. package/lib/typescript/shared/providers/stack/direct.provider.d.ts.map +1 -1
  347. package/lib/typescript/shared/stores/animation.store.d.ts +8 -2
  348. package/lib/typescript/shared/stores/animation.store.d.ts.map +1 -1
  349. package/lib/typescript/shared/stores/bounds/internals/presence.d.ts.map +1 -1
  350. package/lib/typescript/shared/stores/bounds/internals/resolver.d.ts.map +1 -1
  351. package/lib/typescript/shared/stores/bounds/types.d.ts +2 -0
  352. package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
  353. package/lib/typescript/shared/types/animation.types.d.ts +33 -51
  354. package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
  355. package/lib/typescript/shared/types/bounds.types.d.ts +46 -9
  356. package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
  357. package/lib/typescript/shared/types/index.d.ts +3 -3
  358. package/lib/typescript/shared/types/index.d.ts.map +1 -1
  359. package/lib/typescript/shared/types/overlay.types.d.ts +1 -22
  360. package/lib/typescript/shared/types/overlay.types.d.ts.map +1 -1
  361. package/lib/typescript/shared/types/screen.types.d.ts +62 -37
  362. package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
  363. package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts.map +1 -1
  364. package/lib/typescript/shared/utils/bounds/helpers/build-bounds-options.d.ts +2 -2
  365. package/lib/typescript/shared/utils/bounds/helpers/build-bounds-options.d.ts.map +1 -1
  366. package/lib/typescript/shared/utils/bounds/helpers/compute-bounds-styles.d.ts.map +1 -1
  367. package/lib/typescript/shared/utils/bounds/helpers/geometry.d.ts +3 -2
  368. package/lib/typescript/shared/utils/bounds/helpers/geometry.d.ts.map +1 -1
  369. package/lib/typescript/shared/utils/bounds/helpers/interpolators.d.ts +3 -2
  370. package/lib/typescript/shared/utils/bounds/helpers/interpolators.d.ts.map +1 -1
  371. package/lib/typescript/shared/utils/bounds/helpers/link-accessor.d.ts +3 -2
  372. package/lib/typescript/shared/utils/bounds/helpers/link-accessor.d.ts.map +1 -1
  373. package/lib/typescript/shared/utils/bounds/helpers/resolve-bound-tag.d.ts +2 -1
  374. package/lib/typescript/shared/utils/bounds/helpers/resolve-bound-tag.d.ts.map +1 -1
  375. package/lib/typescript/shared/utils/bounds/helpers/style-composers.d.ts +4 -3
  376. package/lib/typescript/shared/utils/bounds/helpers/style-composers.d.ts.map +1 -1
  377. package/lib/typescript/shared/utils/bounds/index.d.ts +2 -2
  378. package/lib/typescript/shared/utils/bounds/index.d.ts.map +1 -1
  379. package/lib/typescript/shared/utils/bounds/types/frame-props.d.ts +5 -0
  380. package/lib/typescript/shared/utils/bounds/types/frame-props.d.ts.map +1 -0
  381. package/lib/typescript/shared/utils/bounds/types/options.d.ts +5 -4
  382. package/lib/typescript/shared/utils/bounds/types/options.d.ts.map +1 -1
  383. package/lib/typescript/shared/utils/bounds/zoom/accessor.d.ts +17 -0
  384. package/lib/typescript/shared/utils/bounds/zoom/accessor.d.ts.map +1 -0
  385. package/lib/typescript/shared/utils/bounds/zoom/build.d.ts +4 -0
  386. package/lib/typescript/shared/utils/bounds/zoom/build.d.ts.map +1 -0
  387. package/lib/typescript/shared/utils/bounds/zoom/config.d.ts +43 -0
  388. package/lib/typescript/shared/utils/bounds/zoom/config.d.ts.map +1 -0
  389. package/lib/typescript/shared/utils/bounds/zoom/index.d.ts +3 -0
  390. package/lib/typescript/shared/utils/bounds/zoom/index.d.ts.map +1 -0
  391. package/lib/typescript/shared/utils/bounds/zoom/types.d.ts +17 -0
  392. package/lib/typescript/shared/utils/bounds/zoom/types.d.ts.map +1 -0
  393. package/lib/typescript/shared/utils/gesture/validate-snap-points.d.ts +5 -3
  394. package/lib/typescript/shared/utils/gesture/validate-snap-points.d.ts.map +1 -1
  395. package/lib/typescript/shared/utils/overlay/visibility.d.ts +1 -4
  396. package/lib/typescript/shared/utils/overlay/visibility.d.ts.map +1 -1
  397. package/lib/typescript/shared/utils/resolve-screen-transition-options.d.ts +5 -0
  398. package/lib/typescript/shared/utils/resolve-screen-transition-options.d.ts.map +1 -0
  399. package/package.json +3 -2
  400. package/src/blank-stack/index.ts +1 -0
  401. package/src/blank-stack/navigators/create-blank-stack-navigator.tsx +138 -19
  402. package/src/blank-stack/types.ts +33 -5
  403. package/src/component-stack/navigators/create-component-stack-navigator.tsx +8 -0
  404. package/src/shared/animation/snap-to.ts +12 -1
  405. package/src/shared/components/create-boundary-component/hooks/helpers/measurement-rules.ts +258 -0
  406. package/src/shared/components/create-boundary-component/hooks/use-auto-source-measurement.ts +7 -17
  407. package/src/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.ts +38 -28
  408. package/src/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.ts +58 -0
  409. package/src/shared/components/create-boundary-component/hooks/use-group-active-measurement.ts +41 -10
  410. package/src/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.ts +82 -0
  411. package/src/shared/components/create-boundary-component/hooks/use-initial-layout-handler.ts +24 -12
  412. package/src/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.ts +11 -9
  413. package/src/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.ts +29 -26
  414. package/src/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.ts +26 -17
  415. package/src/shared/components/create-boundary-component/index.tsx +25 -6
  416. package/src/shared/components/create-boundary-component/types.ts +8 -4
  417. package/src/shared/components/create-boundary-component/utils/build-boundary-match-key.ts +2 -14
  418. package/src/shared/components/create-transition-aware-component.tsx +5 -2
  419. package/src/shared/components/native-screen-container.tsx +11 -3
  420. package/src/shared/components/native-screen.tsx +65 -20
  421. package/src/shared/components/overlay/helpers/get-active-overlay.ts +3 -3
  422. package/src/shared/components/overlay/index.ts +0 -2
  423. package/src/shared/components/overlay/variations/overlay-host.tsx +2 -16
  424. package/src/shared/components/scene-view.tsx +0 -3
  425. package/src/shared/components/screen-container/hooks/use-content-layout.ts +82 -0
  426. package/src/shared/components/screen-container/layers/backdrop.tsx +25 -6
  427. package/src/shared/components/screen-container/layers/content.tsx +23 -82
  428. package/src/shared/components/screen-container/layers/maybe-masked-navigation-container.tsx +101 -0
  429. package/src/shared/components/screen-lifecycle/hooks/use-close-transition/index.ts +1 -2
  430. package/src/shared/components/screen-lifecycle/hooks/use-open-transition.ts +20 -6
  431. package/src/shared/constants.ts +6 -2
  432. package/src/shared/hooks/gestures/resolve-screen-gesture-target.ts +66 -0
  433. package/src/shared/hooks/gestures/types.ts +5 -0
  434. package/src/shared/hooks/gestures/use-screen-gesture.ts +10 -3
  435. package/src/shared/hooks/navigation/use-stack.tsx +1 -2
  436. package/src/shared/index.ts +14 -16
  437. package/src/shared/providers/gestures/handlers/use-handlers.ts +75 -29
  438. package/src/shared/providers/gestures/helpers/gesture-activation.ts +11 -6
  439. package/src/shared/providers/gestures/helpers/gesture-snap-points.ts +72 -0
  440. package/src/shared/providers/layout-anchor.provider.tsx +2 -5
  441. package/src/shared/providers/register-bounds.provider.tsx +1 -1
  442. package/src/shared/providers/screen/animation/animation.provider.tsx +46 -10
  443. package/src/shared/providers/screen/animation/helpers/derivations.ts +0 -8
  444. package/src/shared/providers/screen/animation/helpers/pipeline.ts +51 -14
  445. package/src/shared/providers/screen/animation/helpers/resolve-screen-animation-target.ts +44 -0
  446. package/src/shared/providers/screen/animation/index.tsx +4 -1
  447. package/src/shared/providers/screen/animation/types.ts +5 -0
  448. package/src/shared/providers/screen/animation/use-screen-animation.tsx +16 -3
  449. package/src/shared/providers/stack/core.provider.tsx +27 -14
  450. package/src/shared/providers/stack/direct.provider.tsx +2 -5
  451. package/src/shared/providers/stack/helpers/use-processed-routes.ts +2 -2
  452. package/src/shared/stores/animation.store.ts +21 -5
  453. package/src/shared/stores/bounds/internals/presence.ts +3 -1
  454. package/src/shared/stores/bounds/internals/resolver.ts +13 -1
  455. package/src/shared/stores/bounds/types.ts +2 -0
  456. package/src/shared/types/animation.types.ts +32 -58
  457. package/src/shared/types/bounds.types.ts +30 -10
  458. package/src/shared/types/index.ts +2 -15
  459. package/src/shared/types/overlay.types.ts +1 -28
  460. package/src/shared/types/screen.types.ts +67 -38
  461. package/src/shared/utils/animation/animate-to-progress.ts +7 -0
  462. package/src/shared/utils/bounds/helpers/build-bounds-options.ts +2 -2
  463. package/src/shared/utils/bounds/helpers/compute-bounds-styles.ts +47 -8
  464. package/src/shared/utils/bounds/helpers/geometry.ts +3 -2
  465. package/src/shared/utils/bounds/helpers/interpolators.ts +8 -6
  466. package/src/shared/utils/bounds/helpers/link-accessor.ts +10 -6
  467. package/src/shared/utils/bounds/helpers/resolve-bound-tag.ts +7 -10
  468. package/src/shared/utils/bounds/helpers/style-composers.ts +4 -3
  469. package/src/shared/utils/bounds/index.ts +22 -13
  470. package/src/shared/utils/bounds/types/frame-props.ts +5 -0
  471. package/src/shared/utils/bounds/types/options.ts +6 -4
  472. package/src/shared/utils/bounds/zoom/accessor.ts +69 -0
  473. package/src/shared/utils/bounds/zoom/build.ts +715 -0
  474. package/src/shared/utils/bounds/zoom/config.ts +179 -0
  475. package/src/shared/utils/bounds/zoom/index.ts +2 -0
  476. package/src/shared/utils/bounds/zoom/types.ts +22 -0
  477. package/src/shared/utils/gesture/validate-snap-points.ts +20 -8
  478. package/src/shared/utils/overlay/visibility.ts +1 -16
  479. package/src/shared/utils/resolve-screen-transition-options.ts +37 -0
  480. package/lib/commonjs/shared/components/overlay/variations/screen-overlay.js +0 -64
  481. package/lib/commonjs/shared/components/overlay/variations/screen-overlay.js.map +0 -1
  482. package/lib/commonjs/shared/providers/viewport.provider.js +0 -33
  483. package/lib/commonjs/shared/providers/viewport.provider.js.map +0 -1
  484. package/lib/commonjs/shared/utils/bounds/helpers/math.js +0 -132
  485. package/lib/commonjs/shared/utils/bounds/helpers/math.js.map +0 -1
  486. package/lib/commonjs/shared/utils/bounds/helpers/navigation-accessor.js +0 -45
  487. package/lib/commonjs/shared/utils/bounds/helpers/navigation-accessor.js.map +0 -1
  488. package/lib/commonjs/shared/utils/bounds/sugar/navigation/helpers.js +0 -60
  489. package/lib/commonjs/shared/utils/bounds/sugar/navigation/helpers.js.map +0 -1
  490. package/lib/commonjs/shared/utils/bounds/sugar/navigation/index.js +0 -20
  491. package/lib/commonjs/shared/utils/bounds/sugar/navigation/index.js.map +0 -1
  492. package/lib/commonjs/shared/utils/bounds/sugar/navigation/types.js.map +0 -1
  493. package/lib/commonjs/shared/utils/bounds/sugar/navigation/zoom.js +0 -295
  494. package/lib/commonjs/shared/utils/bounds/sugar/navigation/zoom.js.map +0 -1
  495. package/lib/module/shared/components/overlay/variations/screen-overlay.js +0 -61
  496. package/lib/module/shared/components/overlay/variations/screen-overlay.js.map +0 -1
  497. package/lib/module/shared/providers/viewport.provider.js +0 -27
  498. package/lib/module/shared/providers/viewport.provider.js.map +0 -1
  499. package/lib/module/shared/utils/bounds/helpers/math.js +0 -115
  500. package/lib/module/shared/utils/bounds/helpers/math.js.map +0 -1
  501. package/lib/module/shared/utils/bounds/helpers/navigation-accessor.js +0 -40
  502. package/lib/module/shared/utils/bounds/helpers/navigation-accessor.js.map +0 -1
  503. package/lib/module/shared/utils/bounds/sugar/navigation/helpers.js +0 -54
  504. package/lib/module/shared/utils/bounds/sugar/navigation/helpers.js.map +0 -1
  505. package/lib/module/shared/utils/bounds/sugar/navigation/index.js +0 -15
  506. package/lib/module/shared/utils/bounds/sugar/navigation/index.js.map +0 -1
  507. package/lib/module/shared/utils/bounds/sugar/navigation/types.js.map +0 -1
  508. package/lib/module/shared/utils/bounds/sugar/navigation/zoom.js +0 -290
  509. package/lib/module/shared/utils/bounds/sugar/navigation/zoom.js.map +0 -1
  510. package/lib/typescript/shared/components/overlay/variations/screen-overlay.d.ts +0 -10
  511. package/lib/typescript/shared/components/overlay/variations/screen-overlay.d.ts.map +0 -1
  512. package/lib/typescript/shared/providers/viewport.provider.d.ts +0 -13
  513. package/lib/typescript/shared/providers/viewport.provider.d.ts.map +0 -1
  514. package/lib/typescript/shared/utils/bounds/helpers/math.d.ts +0 -38
  515. package/lib/typescript/shared/utils/bounds/helpers/math.d.ts.map +0 -1
  516. package/lib/typescript/shared/utils/bounds/helpers/navigation-accessor.d.ts +0 -16
  517. package/lib/typescript/shared/utils/bounds/helpers/navigation-accessor.d.ts.map +0 -1
  518. package/lib/typescript/shared/utils/bounds/sugar/navigation/helpers.d.ts +0 -17
  519. package/lib/typescript/shared/utils/bounds/sugar/navigation/helpers.d.ts.map +0 -1
  520. package/lib/typescript/shared/utils/bounds/sugar/navigation/index.d.ts +0 -3
  521. package/lib/typescript/shared/utils/bounds/sugar/navigation/index.d.ts.map +0 -1
  522. package/lib/typescript/shared/utils/bounds/sugar/navigation/types.d.ts +0 -18
  523. package/lib/typescript/shared/utils/bounds/sugar/navigation/types.d.ts.map +0 -1
  524. package/lib/typescript/shared/utils/bounds/sugar/navigation/zoom.d.ts +0 -4
  525. package/lib/typescript/shared/utils/bounds/sugar/navigation/zoom.d.ts.map +0 -1
  526. package/src/shared/components/overlay/variations/screen-overlay.tsx +0 -68
  527. package/src/shared/providers/viewport.provider.tsx +0 -39
  528. package/src/shared/utils/bounds/helpers/math.ts +0 -161
  529. package/src/shared/utils/bounds/helpers/navigation-accessor.ts +0 -61
  530. package/src/shared/utils/bounds/sugar/navigation/helpers.ts +0 -74
  531. package/src/shared/utils/bounds/sugar/navigation/index.ts +0 -14
  532. package/src/shared/utils/bounds/sugar/navigation/types.ts +0 -26
  533. package/src/shared/utils/bounds/sugar/navigation/zoom.ts +0 -348
  534. /package/lib/commonjs/shared/utils/bounds/{sugar/navigation → zoom}/types.js +0 -0
  535. /package/lib/module/shared/utils/bounds/{sugar/navigation → zoom}/types.js +0 -0
@@ -0,0 +1,182 @@
1
+ "use strict";
2
+
3
+ export const getMeasurementIntentFlags = intent => {
4
+ "worklet";
5
+
6
+ const flags = {
7
+ captureSource: false,
8
+ completeDestination: false,
9
+ refreshSource: false,
10
+ refreshDestination: false,
11
+ snapshotOnly: false
12
+ };
13
+ if (!intent) {
14
+ return flags;
15
+ }
16
+ const intents = Array.isArray(intent) ? intent : [intent];
17
+ for (let i = 0; i < intents.length; i++) {
18
+ switch (intents[i]) {
19
+ case "capture-source":
20
+ flags.captureSource = true;
21
+ break;
22
+ case "complete-destination":
23
+ flags.completeDestination = true;
24
+ break;
25
+ case "refresh-source":
26
+ flags.refreshSource = true;
27
+ break;
28
+ case "refresh-destination":
29
+ flags.refreshDestination = true;
30
+ break;
31
+ case "snapshot-only":
32
+ flags.snapshotOnly = true;
33
+ break;
34
+ }
35
+ }
36
+ return flags;
37
+ };
38
+ export const resolveMeasurementWritePlan = params => {
39
+ "worklet";
40
+
41
+ const {
42
+ intents,
43
+ hasPendingLink,
44
+ hasSourceLink,
45
+ hasDestinationLink
46
+ } = params;
47
+ const captureSource = intents.captureSource;
48
+ const completeDestination = intents.completeDestination && hasPendingLink;
49
+ const refreshSource = intents.refreshSource && hasSourceLink;
50
+ const refreshDestination = intents.refreshDestination && (hasDestinationLink || hasPendingLink);
51
+ const registerSnapshot = intents.snapshotOnly;
52
+ const writesAny = registerSnapshot || captureSource || completeDestination || refreshSource || refreshDestination;
53
+ return {
54
+ captureSource,
55
+ completeDestination,
56
+ refreshSource,
57
+ refreshDestination,
58
+ registerSnapshot,
59
+ writesAny,
60
+ wantsDestinationWrite: completeDestination || refreshDestination
61
+ };
62
+ };
63
+ export const resolveAutoSourceCaptureSignal = params => {
64
+ "worklet";
65
+
66
+ const {
67
+ enabled,
68
+ nextScreenKey,
69
+ tagPresence
70
+ } = params;
71
+ if (!enabled) return 0;
72
+ if (!nextScreenKey) return 0;
73
+ if (!tagPresence) return 0;
74
+ const direct = tagPresence[nextScreenKey];
75
+ if (direct && direct.count > 0) return nextScreenKey;
76
+ for (const screenKey in tagPresence) {
77
+ const entry = tagPresence[screenKey];
78
+ if (entry.ancestorKeys?.includes(nextScreenKey)) {
79
+ return nextScreenKey;
80
+ }
81
+ }
82
+ return 0;
83
+ };
84
+ export const resolvePendingDestinationCaptureSignal = params => {
85
+ "worklet";
86
+
87
+ const {
88
+ enabled,
89
+ resolvedSourceKey,
90
+ hasPendingLinkFromSource
91
+ } = params;
92
+ if (!enabled) return 0;
93
+ if (!resolvedSourceKey) return 0;
94
+ return hasPendingLinkFromSource ? resolvedSourceKey : 0;
95
+ };
96
+ export const resolvePendingDestinationRetrySignal = params => {
97
+ "worklet";
98
+
99
+ const {
100
+ enabled,
101
+ retryCount,
102
+ maxRetries,
103
+ isAnimating,
104
+ hasDestinationLink,
105
+ progress,
106
+ retryProgressMax,
107
+ retryProgressBuckets,
108
+ resolvedSourceKey,
109
+ hasPendingLinkFromSource
110
+ } = params;
111
+ if (!enabled) return 0;
112
+ if (retryCount >= maxRetries) return 0;
113
+ if (!isAnimating) return 0;
114
+ if (hasDestinationLink) return 0;
115
+ if (progress <= 0 || progress >= retryProgressMax) return 0;
116
+ if (!resolvedSourceKey) return 0;
117
+ if (!hasPendingLinkFromSource) return 0;
118
+ return Math.floor(progress * retryProgressBuckets) + 1;
119
+ };
120
+ export const resolveInitialLayoutMeasurementIntent = params => {
121
+ "worklet";
122
+
123
+ const {
124
+ enabled,
125
+ hasSharedBoundTag,
126
+ hasMeasuredOnLayout,
127
+ isAnyAnimating,
128
+ hasPendingLinkFromSource
129
+ } = params;
130
+ if (!enabled) return null;
131
+ if (!hasSharedBoundTag || hasMeasuredOnLayout) return null;
132
+ if (!isAnyAnimating) {
133
+ return "snapshot-only";
134
+ }
135
+ return hasPendingLinkFromSource ? ["snapshot-only", "complete-destination"] : "snapshot-only";
136
+ };
137
+ export const resolveGroupActiveMeasurementAction = params => {
138
+ "worklet";
139
+
140
+ const {
141
+ enabled,
142
+ isEligible,
143
+ memberId,
144
+ activeId,
145
+ previousActiveId
146
+ } = params;
147
+ if (!enabled || !isEligible) return "noop";
148
+ if (activeId !== memberId) return "clear-pending";
149
+ if (activeId === memberId && activeId !== previousActiveId) {
150
+ return "queue-or-flush";
151
+ }
152
+ return "noop";
153
+ };
154
+ export const canFlushGroupActiveMeasurement = params => {
155
+ "worklet";
156
+
157
+ const {
158
+ enabled,
159
+ isEligible,
160
+ memberId,
161
+ activeId
162
+ } = params;
163
+ if (!enabled || !isEligible) return false;
164
+ return activeId === memberId;
165
+ };
166
+ export const shouldTriggerScrollSettledRefresh = params => {
167
+ "worklet";
168
+
169
+ const {
170
+ enabled,
171
+ group,
172
+ hasNextScreen,
173
+ hasSettledSignal,
174
+ signal,
175
+ previousSignal
176
+ } = params;
177
+ if (!enabled) return false;
178
+ if (!group || !hasNextScreen || !hasSettledSignal) return false;
179
+ if (signal === 0 || signal === previousSignal) return false;
180
+ return true;
181
+ };
182
+ //# sourceMappingURL=measurement-rules.js.map
@@ -0,0 +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,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,OAAO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C,IAAIA,MAAM,KAAKC,cAAc,EAAE,OAAO,KAAK;EAC3D,OAAO,IAAI;AACZ,CAAC","ignoreList":[]}
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { useAnimatedReaction } from "react-native-reanimated";
4
4
  import { BoundStore } from "../../../stores/bounds";
5
+ import { resolveAutoSourceCaptureSignal } from "./helpers/measurement-rules";
5
6
  export const useAutoSourceMeasurement = params => {
6
7
  const {
7
8
  enabled,
@@ -13,19 +14,11 @@ export const useAutoSourceMeasurement = params => {
13
14
  useAnimatedReaction(() => {
14
15
  "worklet";
15
16
 
16
- if (!enabled) return 0;
17
- if (!nextScreenKey) return 0;
18
- const tagPresence = boundaryPresence.value[sharedBoundTag];
19
- if (!tagPresence) return 0;
20
- const direct = tagPresence[nextScreenKey];
21
- if (direct && direct.count > 0) return nextScreenKey;
22
- for (const screenKey in tagPresence) {
23
- const entry = tagPresence[screenKey];
24
- if (entry.ancestorKeys?.includes(nextScreenKey)) {
25
- return nextScreenKey;
26
- }
27
- }
28
- return 0;
17
+ return resolveAutoSourceCaptureSignal({
18
+ enabled,
19
+ nextScreenKey,
20
+ tagPresence: boundaryPresence.value[sharedBoundTag]
21
+ });
29
22
  }, (captureSignal, previousCaptureSignal) => {
30
23
  "worklet";
31
24
 
@@ -33,7 +26,7 @@ export const useAutoSourceMeasurement = params => {
33
26
  if (!nextScreenKey) return;
34
27
  if (!captureSignal || captureSignal === previousCaptureSignal) return;
35
28
  maybeMeasureAndStore({
36
- shouldSetSource: true
29
+ intent: "capture-source"
37
30
  });
38
31
  }, [enabled, nextScreenKey, sharedBoundTag, boundaryPresence, maybeMeasureAndStore]);
39
32
  };
@@ -1 +1 @@
1
- {"version":3,"names":["useAnimatedReaction","BoundStore","useAutoSourceMeasurement","params","enabled","sharedBoundTag","nextScreenKey","maybeMeasureAndStore","boundaryPresence","getBoundaryPresence","tagPresence","value","direct","count","screenKey","entry","ancestorKeys","includes","captureSignal","previousCaptureSignal","shouldSetSource"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-auto-source-measurement.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAAQ,yBAAyB;AAC7D,SAASC,UAAU,QAAQ,wBAAwB;AAGnD,OAAO,MAAMC,wBAAwB,GAAIC,MAKxC,IAAK;EACL,MAAM;IAAEC,OAAO;IAAEC,cAAc;IAAEC,aAAa;IAAEC;EAAqB,CAAC,GACrEJ,MAAM;EACP,MAAMK,gBAAgB,GAAGP,UAAU,CAACQ,mBAAmB,CAAC,CAAC;EAEzDT,mBAAmB,CAClB,MAAM;IACL,SAAS;;IACT,IAAI,CAACI,OAAO,EAAE,OAAO,CAAC;IACtB,IAAI,CAACE,aAAa,EAAE,OAAO,CAAC;IAC5B,MAAMI,WAAW,GAAGF,gBAAgB,CAACG,KAAK,CAACN,cAAc,CAAC;IAC1D,IAAI,CAACK,WAAW,EAAE,OAAO,CAAC;IAE1B,MAAME,MAAM,GAAGF,WAAW,CAACJ,aAAa,CAAC;IACzC,IAAIM,MAAM,IAAIA,MAAM,CAACC,KAAK,GAAG,CAAC,EAAE,OAAOP,aAAa;IAEpD,KAAK,MAAMQ,SAAS,IAAIJ,WAAW,EAAE;MACpC,MAAMK,KAAK,GAAGL,WAAW,CAACI,SAAS,CAAC;MACpC,IAAIC,KAAK,CAACC,YAAY,EAAEC,QAAQ,CAACX,aAAa,CAAC,EAAE;QAChD,OAAOA,aAAa;MACrB;IACD;IAEA,OAAO,CAAC;EACT,CAAC,EACD,CAACY,aAAa,EAAEC,qBAAqB,KAAK;IACzC,SAAS;;IACT,IAAI,CAACf,OAAO,EAAE;IACd,IAAI,CAACE,aAAa,EAAE;IACpB,IAAI,CAACY,aAAa,IAAIA,aAAa,KAAKC,qBAAqB,EAAE;IAC/DZ,oBAAoB,CAAC;MAAEa,eAAe,EAAE;IAAK,CAAC,CAAC;EAChD,CAAC,EACD,CACChB,OAAO,EACPE,aAAa,EACbD,cAAc,EACdG,gBAAgB,EAChBD,oBAAoB,CAEtB,CAAC;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useAnimatedReaction","BoundStore","resolveAutoSourceCaptureSignal","useAutoSourceMeasurement","params","enabled","sharedBoundTag","nextScreenKey","maybeMeasureAndStore","boundaryPresence","getBoundaryPresence","tagPresence","value","captureSignal","previousCaptureSignal","intent"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-auto-source-measurement.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAAQ,yBAAyB;AAC7D,SAASC,UAAU,QAAQ,wBAAwB;AAEnD,SAASC,8BAA8B,QAAQ,6BAA6B;AAE5E,OAAO,MAAMC,wBAAwB,GAAIC,MAKxC,IAAK;EACL,MAAM;IAAEC,OAAO;IAAEC,cAAc;IAAEC,aAAa;IAAEC;EAAqB,CAAC,GACrEJ,MAAM;EACP,MAAMK,gBAAgB,GAAGR,UAAU,CAACS,mBAAmB,CAAC,CAAC;EAEzDV,mBAAmB,CAClB,MAAM;IACL,SAAS;;IACT,OAAOE,8BAA8B,CAAC;MACrCG,OAAO;MACPE,aAAa;MACbI,WAAW,EAAEF,gBAAgB,CAACG,KAAK,CAACN,cAAc;IACnD,CAAC,CAAC;EACH,CAAC,EACD,CAACO,aAAa,EAAEC,qBAAqB,KAAK;IACzC,SAAS;;IACT,IAAI,CAACT,OAAO,EAAE;IACd,IAAI,CAACE,aAAa,EAAE;IACpB,IAAI,CAACM,aAAa,IAAIA,aAAa,KAAKC,qBAAqB,EAAE;IAC/DN,oBAAoB,CAAC;MAAEO,MAAM,EAAE;IAAiB,CAAC,CAAC;EACnD,CAAC,EACD,CACCV,OAAO,EACPE,aAAa,EACbD,cAAc,EACdG,gBAAgB,EAChBD,oBAAoB,CAEtB,CAAC;AACF,CAAC","ignoreList":[]}
@@ -5,6 +5,7 @@ import useStableCallbackValue from "../../../hooks/use-stable-callback-value";
5
5
  import { BoundStore } from "../../../stores/bounds";
6
6
  import { applyMeasuredBoundsWrites } from "../../../stores/bounds/helpers/apply-measured-bounds-writes";
7
7
  import { resolvePendingSourceKey } from "../helpers/resolve-pending-source-key";
8
+ import { getMeasurementIntentFlags, resolveMeasurementWritePlan } from "./helpers/measurement-rules";
8
9
  const SNAPSHOT_EPSILON = 0.5;
9
10
  const areMeasurementsEqual = (a, b) => {
10
11
  "worklet";
@@ -26,16 +27,14 @@ export const useBoundaryMeasureAndStore = params => {
26
27
  layoutAnchor
27
28
  } = params;
28
29
  return useStableCallbackValue(({
29
- shouldSetSource,
30
- shouldSetDestination,
31
- shouldUpdateSource,
32
- shouldUpdateDestination
30
+ intent
33
31
  } = {}) => {
34
32
  "worklet";
35
33
 
36
34
  if (!enabled) return;
35
+ const intents = getMeasurementIntentFlags(intent);
37
36
  const expectedSourceScreenKey = resolvePendingSourceKey(sharedBoundTag, preferredSourceScreenKey) || undefined;
38
- if (shouldSetSource && isAnimating.get()) {
37
+ if (intents.captureSource && isAnimating.get()) {
39
38
  const existing = BoundStore.getSnapshot(sharedBoundTag, currentScreenKey);
40
39
  if (existing) {
41
40
  applyMeasuredBoundsWrites({
@@ -58,23 +57,25 @@ export const useBoundaryMeasureAndStore = params => {
58
57
  const hasPendingLink = expectedSourceScreenKey ? BoundStore.hasPendingLinkFromSource(sharedBoundTag, expectedSourceScreenKey) : BoundStore.hasPendingLink(sharedBoundTag);
59
58
  const hasSourceLink = BoundStore.hasSourceLink(sharedBoundTag, currentScreenKey);
60
59
  const hasDestinationLink = BoundStore.hasDestinationLink(sharedBoundTag, currentScreenKey);
61
- const canSetSource = !!shouldSetSource;
62
- const canSetDestination = !!shouldSetDestination && hasPendingLink;
63
- const canUpdateSource = !!shouldUpdateSource && hasSourceLink;
64
- const canUpdateDestination = !!shouldUpdateDestination && (hasDestinationLink || hasPendingLink);
65
- if (!canSetSource && !canSetDestination && !canUpdateSource && !canUpdateDestination) {
60
+ const writePlan = resolveMeasurementWritePlan({
61
+ intents,
62
+ hasPendingLink,
63
+ hasSourceLink,
64
+ hasDestinationLink
65
+ });
66
+ if (!writePlan.writesAny) {
66
67
  return;
67
68
  }
68
69
  const measured = measure(animatedRef);
69
70
  if (!measured) return;
70
71
  const correctedMeasured = layoutAnchor ? layoutAnchor.correctMeasurement(measured) : measured;
71
- const wantsDestinationWrite = canSetDestination || canUpdateDestination;
72
- const destinationInViewport = !wantsDestinationWrite || !layoutAnchor || !layoutAnchor.isMeasurementInViewport || layoutAnchor.isMeasurementInViewport(correctedMeasured);
73
- if (!destinationInViewport && !canSetSource && !canUpdateSource) {
72
+ const destinationInViewport = !writePlan.wantsDestinationWrite || !layoutAnchor || !layoutAnchor.isMeasurementInViewport || layoutAnchor.isMeasurementInViewport(correctedMeasured);
73
+ if (!destinationInViewport && !writePlan.captureSource && !writePlan.refreshSource) {
74
74
  return;
75
75
  }
76
76
  const existingSnapshot = BoundStore.getSnapshot(sharedBoundTag, currentScreenKey);
77
77
  const hasSnapshotChanged = !existingSnapshot || !areMeasurementsEqual(existingSnapshot.bounds, correctedMeasured);
78
+ const shouldWriteSnapshot = hasSnapshotChanged && (writePlan.registerSnapshot || writePlan.captureSource || writePlan.completeDestination || writePlan.refreshSource || writePlan.refreshDestination);
78
79
  applyMeasuredBoundsWrites({
79
80
  sharedBoundTag,
80
81
  currentScreenKey,
@@ -84,11 +85,11 @@ export const useBoundaryMeasureAndStore = params => {
84
85
  navigatorKey,
85
86
  ancestorNavigatorKeys,
86
87
  expectedSourceScreenKey,
87
- shouldRegisterSnapshot: hasSnapshotChanged,
88
- shouldSetSource: canSetSource,
89
- shouldUpdateSource: canUpdateSource && hasSnapshotChanged,
90
- shouldUpdateDestination: canUpdateDestination && destinationInViewport && hasSnapshotChanged,
91
- shouldSetDestination: canSetDestination && destinationInViewport
88
+ shouldRegisterSnapshot: shouldWriteSnapshot,
89
+ shouldSetSource: writePlan.captureSource,
90
+ shouldUpdateSource: writePlan.refreshSource && hasSnapshotChanged,
91
+ shouldUpdateDestination: writePlan.refreshDestination && destinationInViewport && hasSnapshotChanged,
92
+ shouldSetDestination: writePlan.completeDestination && destinationInViewport
92
93
  });
93
94
  });
94
95
  };
@@ -1 +1 @@
1
- {"version":3,"names":["measure","useStableCallbackValue","BoundStore","applyMeasuredBoundsWrites","resolvePendingSourceKey","SNAPSHOT_EPSILON","areMeasurementsEqual","a","b","Math","abs","x","y","pageX","pageY","width","height","useBoundaryMeasureAndStore","params","enabled","sharedBoundTag","preferredSourceScreenKey","currentScreenKey","ancestorKeys","navigatorKey","ancestorNavigatorKeys","isAnimating","preparedStyles","animatedRef","layoutAnchor","shouldSetSource","shouldSetDestination","shouldUpdateSource","shouldUpdateDestination","expectedSourceScreenKey","undefined","get","existing","getSnapshot","measured","bounds","hasPendingLink","hasPendingLinkFromSource","hasSourceLink","hasDestinationLink","canSetSource","canSetDestination","canUpdateSource","canUpdateDestination","correctedMeasured","correctMeasurement","wantsDestinationWrite","destinationInViewport","isMeasurementInViewport","existingSnapshot","hasSnapshotChanged","shouldRegisterSnapshot"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.ts"],"mappings":";;AACA,SAGCA,OAAO,QAED,yBAAyB;AAChC,OAAOC,sBAAsB,MAAM,0CAA0C;AAE7E,SAASC,UAAU,QAAQ,wBAAwB;AACnD,SAASC,yBAAyB,QAAQ,6DAA6D;AACvG,SAASC,uBAAuB,QAAQ,uCAAuC;AAQ/E,MAAMC,gBAAgB,GAAG,GAAG;AAE5B,MAAMC,oBAAoB,GAAGA,CAC5BC,CAAqB,EACrBC,CAAqB,KACR;EACb,SAAS;;EAET,OACCC,IAAI,CAACC,GAAG,CAACH,CAAC,CAACI,CAAC,GAAGH,CAAC,CAACG,CAAC,CAAC,IAAIN,gBAAgB,IACvCI,IAAI,CAACC,GAAG,CAACH,CAAC,CAACK,CAAC,GAAGJ,CAAC,CAACI,CAAC,CAAC,IAAIP,gBAAgB,IACvCI,IAAI,CAACC,GAAG,CAACH,CAAC,CAACM,KAAK,GAAGL,CAAC,CAACK,KAAK,CAA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CAACd,MAAM,EAAES,iBAAiB,CAAC;IAElE9C,yBAAyB,CAAC;MACzBiB,cAAc;MACdE,gBAAgB;MAChBiB,QAAQ,EAAEU,iBAAiB;MAC3BtB,cAAc;MACdJ,YAAY;MACZC,YAAY;MACZC,qBAAqB;MACrBS,uBAAuB;MACvBsB,sBAAsB,EAAED,kBAAkB;MAC1CzB,eAAe,EAAEe,YAAY;MAC7Bb,kBAAkB,EAAEe,eAAe,IAAIQ,kBAAkB;MACzDtB,uBAAuB,EACtBe,oBAAoB,IAAII,qBAAqB,IAAIG,kBAAkB;MACpExB,oBAAoB,EAAEe,iBAAiB,IAAIM;IAC5C,CAAC,CAAC;EACH,CACD,CAAC;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["measure","useStableCallbackValue","BoundStore","applyMeasuredBoundsWrites","resolvePendingSourceKey","getMeasurementIntentFlags","resolveMeasurementWritePlan","SNAPSHOT_EPSILON","areMeasurementsEqual","a","b","Math","abs","x","y","pageX","pageY","width","height","useBoundaryMeasureAndStore","params","enabled","sharedBoundTag","preferredSourceScreenKey","currentScreenKey","ancestorKeys","navigatorKey","ancestorNavigatorKeys","isAnimating","preparedStyles","animatedRef","layoutAnchor","intent","intents","expectedSourceScreenKey","undefined","captureSource","get","existing","getSnapshot","measured","bounds","shouldSetSource","hasPendingLink","hasPendingLinkFromSource","hasSourceLink","hasDestinationLink","writePlan","writesAny","correctedMeasured","correctMeasurement","destinationInViewport","wantsDestinationWrite","isMeasurementInViewport","refreshSource","existingSnapshot","hasSnapshotChanged","shouldWriteSnapshot","registerSnapshot","completeDestination","refreshDestination","shouldRegisterSnapshot","shouldUpdateSource","shouldUpdateDestination","shouldSetDestination"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.ts"],"mappings":";;AACA,SAGCA,OAAO,QAGD,yBAAyB;AAChC,OAAOC,sBAAsB,MAAM,0CAA0C;AAC7E,SAASC,UAAU,QAAQ,wBAAwB;AACnD,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AACsB,uBAAuB,IACrCtB,YAAY,CAACsB,uBAAuB,CAACJ,iBAAiB,CAAC;IAExD,IACC,CAACE,qBAAqB,IACtB,CAACJ,SAAS,CAACX,aAAa,IACxB,CAACW,SAAS,CAACO,aAAa,EACvB;MACD;IACD;IAEA,MAAMC,gBAAgB,GAAGrD,UAAU,CAACqC,WAAW,CAC9CjB,cAAc,EACdE,gBACD,CAAC;IACD,MAAMgC,kBAAkB,GACvB,CAACD,gBAAgB,IACjB,CAAC/C,oBAAoB,CAAC+C,gBAAgB,CAACd,MAAM,EAAEQ,iBAAiB,CAAC;IAClE,MAAMQ,mBAAmB,GACxBD,kBAAkB,KACjBT,SAAS,CAACW,gBAAgB,IAC1BX,SAAS,CAACX,aAAa,IACvBW,SAAS,CAACY,mBAAmB,IAC7BZ,SAAS,CAACO,aAAa,IACvBP,SAAS,CAACa,kBAAkB,CAAC;IAE/BzD,yBAAyB,CAAC;MACzBmB,cAAc;MACdE,gBAAgB;MAChBgB,QAAQ,EAAES,iBAAiB;MAC3BpB,cAAc;MACdJ,YAAY;MACZC,YAAY;MACZC,qBAAqB;MACrBO,uBAAuB;MACvB2B,sBAAsB,EAAEJ,mBAAmB;MAC3Cf,eAAe,EAAEK,SAAS,CAACX,aAAa;MACxC0B,kBAAkB,EAAEf,SAAS,CAACO,aAAa,IAAIE,kBAAkB;MACjEO,uBAAuB,EACtBhB,SAAS,CAACa,kBAAkB,IAC5BT,qBAAqB,IACrBK,kBAAkB;MACnBQ,oBAAoB,EACnBjB,SAAS,CAACY,mBAAmB,IAAIR;IACnC,CAAC,CAAC;EACH,CACD,CAAC;AACF,CAAC","ignoreList":[]}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ import { useCallback } from "react";
4
+ import { useAnimatedReaction, useSharedValue } from "react-native-reanimated";
5
+ export const useDeferredMeasurementTrigger = params => {
6
+ const {
7
+ enabled,
8
+ isAnimating,
9
+ canFlush,
10
+ onFlush
11
+ } = params;
12
+ const hasPendingMeasurement = useSharedValue(false);
13
+ const clearPendingMeasurement = useCallback(() => {
14
+ "worklet";
15
+
16
+ hasPendingMeasurement.value = false;
17
+ }, [hasPendingMeasurement]);
18
+ const queueOrFlushMeasurement = useCallback(() => {
19
+ "worklet";
20
+
21
+ if (!enabled) return;
22
+ if (isAnimating.value) {
23
+ hasPendingMeasurement.value = true;
24
+ return;
25
+ }
26
+ hasPendingMeasurement.value = false;
27
+ onFlush();
28
+ }, [enabled, isAnimating, hasPendingMeasurement, onFlush]);
29
+ useAnimatedReaction(() => {
30
+ "worklet";
31
+
32
+ if (!enabled) return false;
33
+ if (!hasPendingMeasurement.value) return false;
34
+ if (isAnimating.value) return false;
35
+ return canFlush ? canFlush() : true;
36
+ }, (shouldFlush, previousShouldFlush) => {
37
+ "worklet";
38
+
39
+ if (!enabled) return;
40
+ if (!shouldFlush || shouldFlush === previousShouldFlush) return;
41
+ hasPendingMeasurement.value = false;
42
+ onFlush();
43
+ }, [enabled, isAnimating, hasPendingMeasurement, canFlush, onFlush]);
44
+ return {
45
+ clearPendingMeasurement,
46
+ queueOrFlushMeasurement
47
+ };
48
+ };
49
+ //# sourceMappingURL=use-deferred-measurement-trigger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useCallback","useAnimatedReaction","useSharedValue","useDeferredMeasurementTrigger","params","enabled","isAnimating","canFlush","onFlush","hasPendingMeasurement","clearPendingMeasurement","value","queueOrFlushMeasurement","shouldFlush","previousShouldFlush"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,OAAO;AACnC,SAECC,mBAAmB,EACnBC,cAAc,QACR,yBAAyB;AAEhC,OAAO,MAAMC,6BAA6B,GAAIC,MAK7C,IAAK;EACL,MAAM;IAAEC,OAAO;IAAEC,WAAW;IAAEC,QAAQ;IAAEC;EAAQ,CAAC,GAAGJ,MAAM;EAC1D,MAAMK,qBAAqB,GAAGP,cAAc,CAAC,KAAK,CAAC;EAEnD,MAAMQ,uBAAuB,GAAGV,WAAW,CAAC,MAAM;IACjD,SAAS;;IACTS,qBAAqB,CAACE,KAAK,GAAG,KAAK;EACpC,CAAC,EAAE,CAACF,qBAAqB,CAAC,CAAC;EAE3B,MAAMG,uBAAuB,GAAGZ,WAAW,CAAC,MAAM;IACjD,SAAS;;IACT,IAAI,CAACK,OAAO,EAAE;IAEd,IAAIC,WAAW,CAACK,KAAK,EAAE;MACtBF,qBAAqB,CAACE,KAAK,GAAG,IAAI;MAClC;IACD;IAEAF,qBAAqB,CAACE,KAAK,GAAG,KAAK;IACnCH,OAAO,CAAC,CAAC;EACV,CAAC,EAAE,CAACH,OAAO,EAAEC,WAAW,EAAEG,qBAAqB,EAAED,OAAO,CAAC,CAAC;EAE1DP,mBAAmB,CAClB,MAAM;IACL,SAAS;;IACT,IAAI,CAACI,OAAO,EAAE,OAAO,KAAK;IAC1B,IAAI,CAACI,qBAAqB,CAACE,KAAK,EAAE,OAAO,KAAK;IAC9C,IAAIL,WAAW,CAACK,KAAK,EAAE,OAAO,KAAK;IACnC,OAAOJ,QAAQ,GAAGA,QAAQ,CAAC,CAAC,GAAG,IAAI;EACpC,CAAC,EACD,CAACM,WAAW,EAAEC,mBAAmB,KAAK;IACrC,SAAS;;IACT,IAAI,CAACT,OAAO,EAAE;IACd,IAAI,CAACQ,WAAW,IAAIA,WAAW,KAAKC,mBAAmB,EAAE;IAEzDL,qBAAqB,CAACE,KAAK,GAAG,KAAK;IACnCH,OAAO,CAAC,CAAC;EACV,CAAC,EACD,CAACH,OAAO,EAAEC,WAAW,EAAEG,qBAAqB,EAAEF,QAAQ,EAAEC,OAAO,CAChE,CAAC;EAED,OAAO;IACNE,uBAAuB;IACvBE;EACD,CAAC;AACF,CAAC","ignoreList":[]}
@@ -2,6 +2,9 @@
2
2
 
3
3
  import { useAnimatedReaction } from "react-native-reanimated";
4
4
  import { BoundStore } from "../../../stores/bounds";
5
+ import { canFlushGroupActiveMeasurement, resolveGroupActiveMeasurementAction } from "./helpers/measurement-rules";
6
+ import { useDeferredMeasurementTrigger } from "./use-deferred-measurement-trigger";
7
+
5
8
  /**
6
9
  * Watches the group's active id in the BoundStore.
7
10
  * When this boundary becomes the active member of its group,
@@ -20,6 +23,30 @@ export const useGroupActiveMeasurement = params => {
20
23
  } = params;
21
24
  const idStr = String(id);
22
25
  const allGroups = BoundStore.getGroups();
26
+ const {
27
+ clearPendingMeasurement,
28
+ queueOrFlushMeasurement
29
+ } = useDeferredMeasurementTrigger({
30
+ enabled,
31
+ isAnimating,
32
+ canFlush: () => {
33
+ "worklet";
34
+
35
+ return canFlushGroupActiveMeasurement({
36
+ enabled,
37
+ isEligible: !!group && shouldUpdateDestination,
38
+ memberId: idStr,
39
+ activeId: group ? allGroups.value[group]?.activeId ?? null : null
40
+ });
41
+ },
42
+ onFlush: () => {
43
+ "worklet";
44
+
45
+ maybeMeasureAndStore({
46
+ intent: "refresh-destination"
47
+ });
48
+ }
49
+ });
23
50
  useAnimatedReaction(() => {
24
51
  "worklet";
25
52
 
@@ -29,14 +56,20 @@ export const useGroupActiveMeasurement = params => {
29
56
  }, (activeId, previousActiveId) => {
30
57
  "worklet";
31
58
 
32
- if (!enabled) return;
33
- if (!group || !shouldUpdateDestination) return;
34
- if (isAnimating.value) return;
35
- if (activeId === idStr && activeId !== previousActiveId) {
36
- maybeMeasureAndStore({
37
- shouldUpdateDestination: true
38
- });
59
+ const action = resolveGroupActiveMeasurementAction({
60
+ enabled,
61
+ isEligible: !!group && shouldUpdateDestination,
62
+ memberId: idStr,
63
+ activeId,
64
+ previousActiveId
65
+ });
66
+ if (action === "clear-pending") {
67
+ clearPendingMeasurement();
68
+ return;
69
+ }
70
+ if (action === "queue-or-flush") {
71
+ queueOrFlushMeasurement();
39
72
  }
40
- }, [enabled, group, idStr, shouldUpdateDestination, isAnimating, maybeMeasureAndStore]);
73
+ }, [enabled, group, idStr, shouldUpdateDestination, clearPendingMeasurement, queueOrFlushMeasurement]);
41
74
  };
42
75
  //# sourceMappingURL=use-group-active-measurement.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useAnimatedReaction","BoundStore","useGroupActiveMeasurement","params","enabled","group","id","shouldUpdateDestination","isAnimating","maybeMeasureAndStore","idStr","String","allGroups","getGroups","value","activeId","previousActiveId"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-group-active-measurement.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAAQ,yBAAyB;AAE7D,SAASC,UAAU,QAAQ,wBAAwB;AAGnD;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,GAAGX,UAAU,CAACY,SAAS,CAAC,CAAC;EAExCb,mBAAmB,CAClB,MAAM;IACL,SAAS;;IACT,IAAI,CAACI,OAAO,EAAE,OAAO,IAAI;IACzB,IAAI,CAACC,KAAK,EAAE,OAAO,IAAI;IACvB,OAAOO,SAAS,CAACE,KAAK,CAACT,KAAK,CAAC,EAAEU,QAAQ,IAAI,IAAI;EAChD,CAAC,EACD,CAACA,QAAQ,EAAEC,gBAAgB,KAAK;IAC/B,SAAS;;IACT,IAAI,CAACZ,OAAO,EAAE;IACd,IAAI,CAACC,KAAK,IAAI,CAACE,uBAAuB,EAAE;IACxC,IAAIC,WAAW,CAACM,KAAK,EAAE;IAEvB,IAAIC,QAAQ,KAAKL,KAAK,IAAIK,QAAQ,KAAKC,gBAAgB,EAAE;MACxDP,oBAAoB,CAAC;QAAEF,uBAAuB,EAAE;MAAK,CAAC,CAAC;IACxD;EACD,CAAC,EACD,CACCH,OAAO,EACPC,KAAK,EACLK,KAAK,EACLH,uBAAuB,EACvBC,WAAW,EACXC,oBAAoB,CAEtB,CAAC;AACF,CAAC","ignoreList":[]}
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":[]}
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+
3
+ import { useAnimatedReaction } from "react-native-reanimated";
4
+ import { BoundStore } from "../../../stores/bounds";
5
+ import { canFlushGroupActiveMeasurement, resolveGroupActiveMeasurementAction } from "./helpers/measurement-rules";
6
+ import { useDeferredMeasurementTrigger } from "./use-deferred-measurement-trigger";
7
+ export const useGroupActiveSourceMeasurement = params => {
8
+ const {
9
+ enabled,
10
+ group,
11
+ id,
12
+ hasNextScreen,
13
+ isAnimating,
14
+ maybeMeasureAndStore
15
+ } = params;
16
+ const idStr = String(id);
17
+ const allGroups = BoundStore.getGroups();
18
+ const {
19
+ clearPendingMeasurement,
20
+ queueOrFlushMeasurement
21
+ } = useDeferredMeasurementTrigger({
22
+ enabled,
23
+ isAnimating,
24
+ canFlush: () => {
25
+ "worklet";
26
+
27
+ return canFlushGroupActiveMeasurement({
28
+ enabled,
29
+ isEligible: !!group && hasNextScreen,
30
+ memberId: idStr,
31
+ activeId: group ? allGroups.value[group]?.activeId ?? null : null
32
+ });
33
+ },
34
+ onFlush: () => {
35
+ "worklet";
36
+
37
+ maybeMeasureAndStore({
38
+ intent: "refresh-source"
39
+ });
40
+ }
41
+ });
42
+ useAnimatedReaction(() => {
43
+ "worklet";
44
+
45
+ if (!enabled) return null;
46
+ if (!group) return null;
47
+ return allGroups.value[group]?.activeId ?? null;
48
+ }, (activeId, previousActiveId) => {
49
+ "worklet";
50
+
51
+ const action = resolveGroupActiveMeasurementAction({
52
+ enabled,
53
+ isEligible: !!group && hasNextScreen,
54
+ memberId: idStr,
55
+ activeId,
56
+ previousActiveId
57
+ });
58
+ if (action === "clear-pending") {
59
+ clearPendingMeasurement();
60
+ return;
61
+ }
62
+ if (action === "queue-or-flush") {
63
+ queueOrFlushMeasurement();
64
+ }
65
+ }, [enabled, group, idStr, hasNextScreen, clearPendingMeasurement, queueOrFlushMeasurement]);
66
+ };
67
+ //# sourceMappingURL=use-group-active-source-measurement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useAnimatedReaction","BoundStore","canFlushGroupActiveMeasurement","resolveGroupActiveMeasurementAction","useDeferredMeasurementTrigger","useGroupActiveSourceMeasurement","params","enabled","group","id","hasNextScreen","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-source-measurement.ts"],"mappings":";;AAAA,SAA2BA,mBAAmB,QAAQ,yBAAyB;AAC/E,SAASC,UAAU,QAAQ,wB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IE,aAAa;MACpCW,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,aAAa,EACbO,uBAAuB,EACvBC,uBAAuB,CAEzB,CAAC;AACF,CAAC","ignoreList":[]}
@@ -5,6 +5,7 @@ import { runOnUI, useSharedValue } from "react-native-reanimated";
5
5
  import { AnimationStore } from "../../../stores/animation.store";
6
6
  import { BoundStore } from "../../../stores/bounds";
7
7
  import { resolvePendingSourceKey } from "../helpers/resolve-pending-source-key";
8
+ import { resolveInitialLayoutMeasurementIntent } from "./helpers/measurement-rules";
8
9
  export const useInitialLayoutHandler = params => {
9
10
  const {
10
11
  enabled,
@@ -29,15 +30,23 @@ export const useInitialLayoutHandler = params => {
29
30
  break;
30
31
  }
31
32
  }
32
- if (!isAnyAnimating) return;
33
- const resolvedSourceKey = resolvePendingSourceKey(sharedBoundTag, expectedSourceScreenKey);
34
- if (!resolvedSourceKey) return;
35
- if (!BoundStore.hasPendingLinkFromSource(sharedBoundTag, resolvedSourceKey)) {
36
- return;
33
+ let hasPendingLinkFromSource = false;
34
+ if (isAnyAnimating) {
35
+ const resolvedSourceKey = resolvePendingSourceKey(sharedBoundTag, expectedSourceScreenKey);
36
+ if (resolvedSourceKey && BoundStore.hasPendingLinkFromSource(sharedBoundTag, resolvedSourceKey)) {
37
+ hasPendingLinkFromSource = true;
38
+ }
37
39
  }
40
+ const intent = resolveInitialLayoutMeasurementIntent({
41
+ enabled,
42
+ hasSharedBoundTag: !!sharedBoundTag,
43
+ hasMeasuredOnLayout: hasMeasuredOnLayout.get(),
44
+ isAnyAnimating: !!isAnyAnimating,
45
+ hasPendingLinkFromSource
46
+ });
47
+ if (!intent) return;
38
48
  maybeMeasureAndStore({
39
- shouldSetSource: false,
40
- shouldSetDestination: true
49
+ intent
41
50
  });
42
51
  hasMeasuredOnLayout.set(true);
43
52
  }, [enabled, sharedBoundTag, hasMeasuredOnLayout, isAnimating, ancestorAnimations, maybeMeasureAndStore, expectedSourceScreenKey]);
@@ -1 +1 @@
1
- {"version":3,"names":["useCallback","useLayoutEffect","runOnUI","useSharedValue","AnimationStore","BoundStore","resolvePendingSourceKey","useInitialLayoutHandler","params","enabled","sharedBoundTag","currentScreenKey","ancestorKeys","expectedSourceScreenKey","maybeMeasureAndStore","isAnimating","getRouteAnimation","ancestorAnimations","map","key","hasMeasuredOnLayout","handleInitialLayout","get","isAnyAnimating","i","length","resolvedSourceKey","hasPendingLinkFromSource","shouldSetSource","shouldSetDestination","set"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-initial-layout-handler.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,eAAe,QAAQ,OAAO;AACpD,SAASC,OAAO,EAAEC,cAAc,QAAQ,yBAAyB;AACjE,SAASC,cAAc,QAAQ,iCAAiC;AAChE,SAASC,UAAU,QAAQ,wBAAwB;AACnD,SAASC,uBAAuB,QAAQ,uCAAuC;AAG/E,OAAO,MAAMC,uBAAuB,GAAIC,MAOvC,IAAK;EACL,MAAM;IACLC,OAAO;IACPC,cAAc;IACdC,gBAAgB;IAChBC,YAAY;IACZC,uBAAuB;IACvBC;EACD,CAAC,GAAGN,MAAM;EAEV,MAAMO,WAAW,GAAGX,cAAc,CAACY,iBAAiB,CACnDL,gBAAgB,EAChB,WACD,CAAC;EAED,MAAMM,kBAAkB,GAAGL,YAAY,CAACM,GAAG,CAAEC,GAAG,IAC/Cf,cAAc,CAACY,iBAAiB,CAACG,GAAG,EAAE,WAAW,CAClD,CAAC;EAED,MAAMC,mBAAmB,GAAGjB,cAAc,CAAC,KAAK,CAAC;EAEjD,MAAMkB,mBAAmB,GAAGrB,WAAW,CAAC,MAAM;IAC7C,SAAS;;IACT,IAAI,CAACS,OAAO,EAAE;IACd,IAAI,CAACC,cAAc,IAAIU,mBAAmB,CAACE,GAAG,CAAC,CAAC,EAAE;IAElD,IAAIC,cAAc,GAAGR,WAAW,CAACO,GAAG,CAAC,CAAC;IACtC,KAAK,IAAIE,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGP,kBAAkB,CAACQ,MAAM,EAAED,CAAC,EAAE,EAAE;MACnD,IAAIP,kBAAkB,CAACO,CAAC,CAAC,CAACF,GAAG,CAAC,CAAC,EAAE;QAChCC,cAAc,GAAG,CAAC;QAClB;MACD;IACD;IAEA,IAAI,CAACA,cAAc,EAAE;IACrB,MAAMG,iBAAiB,GAAGpB,uBAAuB,CAChDI,cAAc,EACdG,uBACD,CAAC;IACD,IAAI,CAACa,iBAAiB,EAAE;IACxB,IACC,CAACrB,UAAU,CAACsB,wBAAwB,CAACjB,cAAc,EAAEgB,iBAAiB,CAAC,EACtE;MACD;IACD;IAEAZ,oBAAoB,CAAC;MACpBc,eAAe,EAAE,KAAK;MACtBC,oBAAoB,EAAE;IACvB,CAAC,CAAC;IAEFT,mBAAmB,CAACU,GAAG,CAAC,IAAI,CAAC;EAC9B,CAAC,EAAE,CACFrB,OAAO,EACPC,cAAc,EACdU,mBAAmB,EACnBL,WAAW,EACXE,kBAAkB,EAClBH,oBAAoB,EACpBD,uBAAuB,CACvB,CAAC;;EAEF;EACA;EACAZ,eAAe,CAAC,MAAM;IACrB,IAAI,CAACQ,OAAO,EAAE;IACdP,OAAO,CAACmB,mBAAmB,CAAC,CAAC,CAAC;EAC/B,CAAC,EAAE,CAACZ,OAAO,EAAEY,mBAAmB,CAAC,CAAC;AACnC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useCallback","useLayoutEffect","runOnUI","useSharedValue","AnimationStore","BoundStore","resolvePendingSourceKey","resolveInitialLayoutMeasurementIntent","useInitialLayoutHandler","params","enabled","sharedBoundTag","currentScreenKey","ancestorKeys","expectedSourceScreenKey","maybeMeasureAndStore","isAnimating","getRouteAnimation","ancestorAnimations","map","key","hasMeasuredOnLayout","handleInitialLayout","get","isAnyAnimating","i","length","hasPendingLinkFromSource","resolvedSourceKey","intent","hasSharedBoundTag","set"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-initial-layout-handler.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,eAAe,QAAQ,OAAO;AACpD,SAASC,OAAO,EAAEC,cAAc,QAAQ,yBAAyB;AACjE,SAASC,cAAc,QAAQ,iCAAiC;AAChE,SAASC,UAAU,QAAQ,wBAAwB;AACnD,SAASC,uBAAuB,QAAQ,uCAAuC;AAE/E,SAASC,qCAAqC,QAAQ,6BAA6B;AAEnF,OAAO,MAAMC,uBAAuB,GAAIC,MAOvC,IAAK;EACL,MAAM;IACLC,OAAO;IACPC,cAAc;IACdC,gBAAgB;IAChBC,YAAY;IACZC,uBAAuB;IACvBC;EACD,CAAC,GAAGN,MAAM;EAEV,MAAMO,WAAW,GAAGZ,cAAc,CAACa,iBAAiB,CACnDL,gBAAgB,EAChB,WACD,CAAC;EAED,MAAMM,kBAAkB,GAAGL,YAAY,CAACM,GAAG,CAAEC,GAAG,IAC/ChB,cAAc,CAACa,iBAAiB,CAACG,GAAG,EAAE,WAAW,CAClD,CAAC;EAED,MAAMC,mBAAmB,GAAGlB,cAAc,CAAC,KAAK,CAAC;EAEjD,MAAMmB,mBAAmB,GAAGtB,WAAW,CAAC,MAAM;IAC7C,SAAS;;IACT,IAAI,CAACU,OAAO,EAAE;IACd,IAAI,CAACC,cAAc,IAAIU,mBAAmB,CAACE,GAAG,CAAC,CAAC,EAAE;IAElD,IAAIC,cAAc,GAAGR,WAAW,CAACO,GAAG,CAAC,CAAC;IACtC,KAAK,IAAIE,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGP,kBAAkB,CAACQ,MAAM,EAAED,CAAC,EAAE,EAAE;MACnD,IAAIP,kBAAkB,CAACO,CAA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