react-native-screen-transitions 3.6.0-alpha.0 → 3.6.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 (1049) hide show
  1. package/lib/commonjs/component-stack/components/component-screen.js +1 -7
  2. package/lib/commonjs/component-stack/components/component-screen.js.map +1 -1
  3. package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js +35 -45
  4. package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js.map +1 -1
  5. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-presence.js +5 -15
  6. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +1 -1
  7. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js +20 -11
  8. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js.map +1 -1
  9. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js +27 -7
  10. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js.map +1 -1
  11. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-measurer.js +23 -57
  12. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-measurer.js.map +1 -1
  13. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-refresh-boundary.js +33 -40
  14. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map +1 -1
  15. package/lib/commonjs/shared/components/create-boundary-component/index.js +3 -1
  16. package/lib/commonjs/shared/components/create-boundary-component/index.js.map +1 -1
  17. package/lib/commonjs/shared/components/create-boundary-component/utils/destination-signals.js +75 -0
  18. package/lib/commonjs/shared/components/create-boundary-component/utils/destination-signals.js.map +1 -0
  19. package/lib/commonjs/shared/components/create-boundary-component/{hooks/helpers/scroll-measurement.js → utils/measured-bounds.js} +15 -2
  20. package/lib/commonjs/shared/components/create-boundary-component/utils/measured-bounds.js.map +1 -0
  21. package/lib/commonjs/shared/components/create-boundary-component/utils/refresh-signals.js +103 -0
  22. package/lib/commonjs/shared/components/create-boundary-component/utils/refresh-signals.js.map +1 -0
  23. package/lib/commonjs/shared/components/create-boundary-component/utils/source-signals.js +52 -0
  24. package/lib/commonjs/shared/components/create-boundary-component/utils/source-signals.js.map +1 -0
  25. package/lib/commonjs/shared/components/create-transition-aware-component.js +2 -2
  26. package/lib/commonjs/shared/components/create-transition-aware-component.js.map +1 -1
  27. package/lib/commonjs/shared/components/native-screen.js +2 -13
  28. package/lib/commonjs/shared/components/native-screen.js.map +1 -1
  29. package/lib/commonjs/shared/components/screen-container/helpers/find-collapse-target.js +17 -12
  30. package/lib/commonjs/shared/components/screen-container/helpers/find-collapse-target.js.map +1 -1
  31. package/lib/commonjs/shared/components/screen-container/hooks/use-content-layout.js +1 -1
  32. package/lib/commonjs/shared/components/screen-container/hooks/use-content-layout.js.map +1 -1
  33. package/lib/commonjs/shared/components/screen-container/layers/backdrop.js +8 -1
  34. package/lib/commonjs/shared/components/screen-container/layers/backdrop.js.map +1 -1
  35. package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js +18 -10
  36. package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
  37. package/lib/commonjs/shared/components/screen-container/layers/surface-container.js +16 -5
  38. package/lib/commonjs/shared/components/screen-container/layers/surface-container.js.map +1 -1
  39. package/lib/commonjs/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.js +2 -12
  40. package/lib/commonjs/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.js.map +1 -1
  41. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js +1 -7
  42. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js.map +1 -1
  43. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-open-transition-intent.js +1 -1
  44. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-open-transition-intent.js.map +1 -1
  45. package/lib/commonjs/shared/configs/presets.js +3 -3
  46. package/lib/commonjs/shared/configs/presets.js.map +1 -1
  47. package/lib/commonjs/shared/constants.js +11 -6
  48. package/lib/commonjs/shared/constants.js.map +1 -1
  49. package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js +35 -0
  50. package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js.map +1 -0
  51. package/lib/commonjs/shared/providers/register-bounds.provider.js +50 -65
  52. package/lib/commonjs/shared/providers/register-bounds.provider.js.map +1 -1
  53. package/lib/commonjs/shared/providers/screen/animation/animation.provider.js +86 -11
  54. package/lib/commonjs/shared/providers/screen/animation/animation.provider.js.map +1 -1
  55. package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.js +23 -0
  56. package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.js.map +1 -0
  57. package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js +98 -0
  58. package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js.map +1 -0
  59. package/lib/commonjs/shared/providers/screen/animation/helpers/build-screen-transition-options.js +8 -1
  60. package/lib/commonjs/shared/providers/screen/animation/helpers/build-screen-transition-options.js.map +1 -1
  61. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.js +79 -0
  62. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.js.map +1 -0
  63. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +90 -0
  64. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -0
  65. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/settle.js +29 -0
  66. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/settle.js.map +1 -0
  67. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/snap-points.js +96 -0
  68. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/snap-points.js.map +1 -0
  69. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/types.js +6 -0
  70. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/types.js.map +1 -0
  71. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +20 -22
  72. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  73. package/lib/commonjs/shared/providers/screen/animation/helpers/selected-interpolator-options.js +51 -0
  74. package/lib/commonjs/shared/providers/screen/animation/helpers/selected-interpolator-options.js.map +1 -0
  75. package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js +2 -3
  76. package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -1
  77. package/lib/commonjs/shared/providers/screen/animation/use-screen-animation.js +55 -25
  78. package/lib/commonjs/shared/providers/screen/animation/use-screen-animation.js.map +1 -1
  79. package/lib/commonjs/shared/providers/screen/descriptors/descriptors.provider.js +2 -5
  80. package/lib/commonjs/shared/providers/screen/descriptors/descriptors.provider.js.map +1 -1
  81. package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js +2 -12
  82. package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js.map +1 -1
  83. package/lib/commonjs/shared/providers/screen/gestures/gestures.provider.js +5 -5
  84. package/lib/commonjs/shared/providers/screen/gestures/gestures.provider.js.map +1 -1
  85. package/lib/commonjs/shared/providers/screen/gestures/hooks/use-gesture-builder-state.js +4 -5
  86. package/lib/commonjs/shared/providers/screen/gestures/hooks/use-gesture-builder-state.js.map +1 -1
  87. package/lib/commonjs/shared/providers/screen/gestures/hooks/use-gesture-sensitivity.js +3 -3
  88. package/lib/commonjs/shared/providers/screen/gestures/hooks/use-gesture-sensitivity.js.map +1 -1
  89. package/lib/commonjs/shared/providers/screen/gestures/hooks/use-screen-gesture-config.js +6 -84
  90. package/lib/commonjs/shared/providers/screen/gestures/hooks/use-screen-gesture-config.js.map +1 -1
  91. package/lib/commonjs/shared/providers/screen/gestures/hooks/use-screen-gesture.js +2 -5
  92. package/lib/commonjs/shared/providers/screen/gestures/hooks/use-screen-gesture.js.map +1 -1
  93. package/lib/commonjs/shared/providers/screen/gestures/hooks/use-stable-runtime-config.js.map +1 -1
  94. package/lib/commonjs/shared/providers/screen/gestures/ownership/compute-claimed-directions.js +37 -36
  95. package/lib/commonjs/shared/providers/screen/gestures/ownership/compute-claimed-directions.js.map +1 -1
  96. package/lib/commonjs/shared/providers/screen/gestures/ownership/resolve-ownership.js +13 -0
  97. package/lib/commonjs/shared/providers/screen/gestures/ownership/resolve-ownership.js.map +1 -1
  98. package/lib/commonjs/shared/providers/screen/gestures/ownership/use-walk-up-and-register-shadowing-claims.js +69 -56
  99. package/lib/commonjs/shared/providers/screen/gestures/ownership/use-walk-up-and-register-shadowing-claims.js.map +1 -1
  100. package/lib/commonjs/shared/providers/screen/gestures/{builders/use-build-pan-gesture.js → pan/build-pan-gesture.js} +4 -4
  101. package/lib/commonjs/shared/providers/screen/gestures/pan/build-pan-gesture.js.map +1 -0
  102. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-activation-decision.js +210 -0
  103. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-activation-decision.js.map +1 -0
  104. package/lib/commonjs/shared/providers/screen/gestures/{helpers/gesture-activation.js → pan/pan-activation-rules.js} +131 -121
  105. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-activation-rules.js.map +1 -0
  106. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-activation.js +94 -0
  107. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-activation.js.map +1 -0
  108. package/lib/commonjs/shared/providers/screen/gestures/{helpers/pan-phases.js → pan/pan-lifecycle.js} +40 -32
  109. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-lifecycle.js.map +1 -0
  110. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-release.js +212 -0
  111. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-release.js.map +1 -0
  112. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-reset.js +54 -0
  113. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-reset.js.map +1 -0
  114. package/lib/commonjs/shared/providers/screen/gestures/pan/use-pan-behavior.js +53 -0
  115. package/lib/commonjs/shared/providers/screen/gestures/pan/use-pan-behavior.js.map +1 -0
  116. package/lib/commonjs/shared/providers/screen/gestures/{builders/use-build-pinch-gesture.js → pinch/build-pinch-gesture.js} +4 -4
  117. package/lib/commonjs/shared/providers/screen/gestures/pinch/build-pinch-gesture.js.map +1 -0
  118. package/lib/commonjs/shared/providers/screen/gestures/{activation/use-pinch-activation.js → pinch/pinch-activation.js} +6 -6
  119. package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-activation.js.map +1 -0
  120. package/lib/commonjs/shared/providers/screen/gestures/{helpers/pinch-phases.js → pinch/pinch-lifecycle.js} +13 -7
  121. package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-lifecycle.js.map +1 -0
  122. package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-release.js +133 -0
  123. package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-release.js.map +1 -0
  124. package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-reset.js +45 -0
  125. package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-reset.js.map +1 -0
  126. package/lib/commonjs/shared/providers/screen/gestures/pinch/use-pinch-behavior.js +53 -0
  127. package/lib/commonjs/shared/providers/screen/gestures/pinch/use-pinch-behavior.js.map +1 -0
  128. package/lib/commonjs/shared/providers/screen/gestures/scroll-coordination/index.js.map +1 -0
  129. package/lib/commonjs/shared/providers/screen/gestures/scroll-coordination/update-scroll-gesture-state.js.map +1 -0
  130. package/lib/commonjs/shared/providers/screen/gestures/{hooks/use-scroll-gesture-coordination → scroll-coordination}/use-scroll-gesture-coordination.js +4 -4
  131. package/lib/commonjs/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.js.map +1 -0
  132. package/lib/commonjs/shared/providers/screen/gestures/{hooks/use-scroll-gesture-coordination → scroll-coordination}/walk-up-scroll-gesture-coordination.js +20 -9
  133. package/lib/commonjs/shared/providers/screen/gestures/scroll-coordination/walk-up-scroll-gesture-coordination.js.map +1 -0
  134. package/lib/commonjs/shared/providers/screen/gestures/{helpers/walk-gesture-ancestors.js → shared/ancestors.js} +1 -1
  135. package/lib/commonjs/shared/providers/screen/gestures/shared/ancestors.js.map +1 -0
  136. package/lib/commonjs/shared/providers/screen/gestures/{helpers/gesture-directions.js → shared/directions.js} +1 -1
  137. package/lib/commonjs/shared/providers/screen/gestures/shared/directions.js.map +1 -0
  138. package/lib/commonjs/shared/providers/screen/gestures/{helpers/gesture-physics.js → shared/physics.js} +92 -68
  139. package/lib/commonjs/shared/providers/screen/gestures/shared/physics.js.map +1 -0
  140. package/lib/commonjs/shared/providers/screen/gestures/shared/policy.js +227 -0
  141. package/lib/commonjs/shared/providers/screen/gestures/shared/policy.js.map +1 -0
  142. package/lib/commonjs/shared/providers/screen/gestures/shared/release.js +36 -0
  143. package/lib/commonjs/shared/providers/screen/gestures/shared/release.js.map +1 -0
  144. package/lib/commonjs/shared/providers/screen/gestures/shared/reset.js +65 -0
  145. package/lib/commonjs/shared/providers/screen/gestures/shared/reset.js.map +1 -0
  146. package/lib/commonjs/shared/providers/screen/gestures/shared/runtime.js +43 -0
  147. package/lib/commonjs/shared/providers/screen/gestures/shared/runtime.js.map +1 -0
  148. package/lib/commonjs/shared/providers/screen/gestures/shared/snap-points.js +184 -0
  149. package/lib/commonjs/shared/providers/screen/gestures/shared/snap-points.js.map +1 -0
  150. package/lib/commonjs/shared/providers/screen/gestures/shared/targets.js +122 -0
  151. package/lib/commonjs/shared/providers/screen/gestures/shared/targets.js.map +1 -0
  152. package/lib/commonjs/shared/providers/screen/gestures/types.js +2 -2
  153. package/lib/commonjs/shared/providers/screen/gestures/types.js.map +1 -1
  154. package/lib/commonjs/shared/providers/screen/options/helpers.js +69 -19
  155. package/lib/commonjs/shared/providers/screen/options/helpers.js.map +1 -1
  156. package/lib/commonjs/shared/providers/screen/styles/helpers/preserve-animated-props-only.js +26 -0
  157. package/lib/commonjs/shared/providers/screen/styles/helpers/preserve-animated-props-only.js.map +1 -0
  158. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js +112 -1
  159. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js.map +1 -1
  160. package/lib/commonjs/shared/providers/screen/styles/helpers/visibility-gate.js +45 -0
  161. package/lib/commonjs/shared/providers/screen/styles/helpers/visibility-gate.js.map +1 -0
  162. package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +32 -15
  163. package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
  164. package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +34 -13
  165. package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
  166. package/lib/commonjs/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js +9 -3
  167. package/lib/commonjs/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js.map +1 -1
  168. package/lib/commonjs/shared/stores/animation.store.js +3 -7
  169. package/lib/commonjs/shared/stores/animation.store.js.map +1 -1
  170. package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js +125 -0
  171. package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -0
  172. package/lib/commonjs/shared/stores/bounds/index.js +7 -15
  173. package/lib/commonjs/shared/stores/bounds/index.js.map +1 -1
  174. package/lib/commonjs/shared/stores/bounds/internals/clear.js +13 -42
  175. package/lib/commonjs/shared/stores/bounds/internals/clear.js.map +1 -1
  176. package/lib/commonjs/shared/stores/bounds/internals/entries.js +49 -9
  177. package/lib/commonjs/shared/stores/bounds/internals/entries.js.map +1 -1
  178. package/lib/commonjs/shared/stores/bounds/internals/links.js +143 -88
  179. package/lib/commonjs/shared/stores/bounds/internals/links.js.map +1 -1
  180. package/lib/commonjs/shared/stores/bounds/internals/resolver.js +17 -43
  181. package/lib/commonjs/shared/stores/bounds/internals/resolver.js.map +1 -1
  182. package/lib/commonjs/shared/stores/bounds/internals/state.js +26 -3
  183. package/lib/commonjs/shared/stores/bounds/internals/state.js.map +1 -1
  184. package/lib/commonjs/shared/stores/gesture.store.js +2 -0
  185. package/lib/commonjs/shared/stores/gesture.store.js.map +1 -1
  186. package/lib/commonjs/shared/stores/system.store.js +3 -0
  187. package/lib/commonjs/shared/stores/system.store.js.map +1 -1
  188. package/lib/commonjs/shared/types/gesture.types.js +2 -2
  189. package/lib/commonjs/shared/types/gesture.types.js.map +1 -1
  190. package/lib/commonjs/shared/utils/animation/animate-to-progress.js +19 -18
  191. package/lib/commonjs/shared/utils/animation/animate-to-progress.js.map +1 -1
  192. package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js +2 -1
  193. package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
  194. package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js +6 -5
  195. package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
  196. package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js +21 -8
  197. package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
  198. package/lib/commonjs/shared/utils/bounds/helpers/resolve-bounds-pair-key.js +23 -0
  199. package/lib/commonjs/shared/utils/bounds/helpers/resolve-bounds-pair-key.js.map +1 -0
  200. package/lib/commonjs/shared/utils/bounds/navigation/math.js +1 -15
  201. package/lib/commonjs/shared/utils/bounds/navigation/math.js.map +1 -1
  202. package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js +140 -133
  203. package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
  204. package/lib/commonjs/shared/utils/bounds/navigation/reveal/config.js +21 -17
  205. package/lib/commonjs/shared/utils/bounds/navigation/reveal/config.js.map +1 -1
  206. package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js +155 -14
  207. package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
  208. package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js +80 -18
  209. package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
  210. package/lib/commonjs/shared/utils/bounds/navigation/zoom/config.js +2 -2
  211. package/lib/commonjs/shared/utils/bounds/navigation/zoom/config.js.map +1 -1
  212. package/lib/commonjs/shared/utils/bounds/navigation/zoom/math.js +4 -5
  213. package/lib/commonjs/shared/utils/bounds/navigation/zoom/math.js.map +1 -1
  214. package/lib/commonjs/shared/utils/gesture-progress-mode.js +50 -0
  215. package/lib/commonjs/shared/utils/gesture-progress-mode.js.map +1 -0
  216. package/lib/commonjs/shared/utils/navigation/resolve-scene-neighbors.js +20 -19
  217. package/lib/commonjs/shared/utils/navigation/resolve-scene-neighbors.js.map +1 -1
  218. package/lib/commonjs/shared/utils/resolve-chain-target.js +9 -16
  219. package/lib/commonjs/shared/utils/resolve-chain-target.js.map +1 -1
  220. package/lib/commonjs/shared/utils/resolve-screen-transition-options.js +3 -3
  221. package/lib/commonjs/shared/utils/resolve-screen-transition-options.js.map +1 -1
  222. package/lib/module/component-stack/components/component-screen.js +2 -8
  223. package/lib/module/component-stack/components/component-screen.js.map +1 -1
  224. package/lib/module/shared/components/create-boundary-component/create-boundary-component.js +35 -45
  225. package/lib/module/shared/components/create-boundary-component/create-boundary-component.js.map +1 -1
  226. package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js +5 -15
  227. package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +1 -1
  228. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js +21 -12
  229. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js.map +1 -1
  230. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js +28 -8
  231. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js.map +1 -1
  232. package/lib/module/shared/components/create-boundary-component/hooks/use-measurer.js +22 -56
  233. package/lib/module/shared/components/create-boundary-component/hooks/use-measurer.js.map +1 -1
  234. package/lib/module/shared/components/create-boundary-component/hooks/use-refresh-boundary.js +33 -40
  235. package/lib/module/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map +1 -1
  236. package/lib/module/shared/components/create-boundary-component/index.js +3 -1
  237. package/lib/module/shared/components/create-boundary-component/index.js.map +1 -1
  238. package/lib/module/shared/components/create-boundary-component/utils/destination-signals.js +70 -0
  239. package/lib/module/shared/components/create-boundary-component/utils/destination-signals.js.map +1 -0
  240. package/lib/module/shared/components/create-boundary-component/{hooks/helpers/scroll-measurement.js → utils/measured-bounds.js} +13 -1
  241. package/lib/module/shared/components/create-boundary-component/utils/measured-bounds.js.map +1 -0
  242. package/lib/module/shared/components/create-boundary-component/utils/refresh-signals.js +98 -0
  243. package/lib/module/shared/components/create-boundary-component/utils/refresh-signals.js.map +1 -0
  244. package/lib/module/shared/components/create-boundary-component/utils/source-signals.js +47 -0
  245. package/lib/module/shared/components/create-boundary-component/utils/source-signals.js.map +1 -0
  246. package/lib/module/shared/components/create-transition-aware-component.js +1 -1
  247. package/lib/module/shared/components/create-transition-aware-component.js.map +1 -1
  248. package/lib/module/shared/components/native-screen.js +3 -14
  249. package/lib/module/shared/components/native-screen.js.map +1 -1
  250. package/lib/module/shared/components/screen-container/helpers/find-collapse-target.js +16 -11
  251. package/lib/module/shared/components/screen-container/helpers/find-collapse-target.js.map +1 -1
  252. package/lib/module/shared/components/screen-container/hooks/use-content-layout.js +1 -1
  253. package/lib/module/shared/components/screen-container/hooks/use-content-layout.js.map +1 -1
  254. package/lib/module/shared/components/screen-container/layers/backdrop.js +8 -1
  255. package/lib/module/shared/components/screen-container/layers/backdrop.js.map +1 -1
  256. package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js +18 -10
  257. package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
  258. package/lib/module/shared/components/screen-container/layers/surface-container.js +16 -5
  259. package/lib/module/shared/components/screen-container/layers/surface-container.js.map +1 -1
  260. package/lib/module/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.js +3 -13
  261. package/lib/module/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.js.map +1 -1
  262. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js +1 -7
  263. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js.map +1 -1
  264. package/lib/module/shared/components/screen-lifecycle/hooks/use-open-transition-intent.js +1 -1
  265. package/lib/module/shared/components/screen-lifecycle/hooks/use-open-transition-intent.js.map +1 -1
  266. package/lib/module/shared/configs/presets.js +3 -3
  267. package/lib/module/shared/configs/presets.js.map +1 -1
  268. package/lib/module/shared/constants.js +10 -5
  269. package/lib/module/shared/constants.js.map +1 -1
  270. package/lib/module/shared/providers/helpers/measured-bounds-writes.js +30 -0
  271. package/lib/module/shared/providers/helpers/measured-bounds-writes.js.map +1 -0
  272. package/lib/module/shared/providers/register-bounds.provider.js +50 -65
  273. package/lib/module/shared/providers/register-bounds.provider.js.map +1 -1
  274. package/lib/module/shared/providers/screen/animation/animation.provider.js +87 -12
  275. package/lib/module/shared/providers/screen/animation/animation.provider.js.map +1 -1
  276. package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.js +18 -0
  277. package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.js.map +1 -0
  278. package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js +92 -0
  279. package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js.map +1 -0
  280. package/lib/module/shared/providers/screen/animation/helpers/build-screen-transition-options.js +8 -1
  281. package/lib/module/shared/providers/screen/animation/helpers/build-screen-transition-options.js.map +1 -1
  282. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.js +74 -0
  283. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.js.map +1 -0
  284. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +85 -0
  285. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -0
  286. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/settle.js +22 -0
  287. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/settle.js.map +1 -0
  288. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/snap-points.js +89 -0
  289. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/snap-points.js.map +1 -0
  290. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/types.js +4 -0
  291. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/types.js.map +1 -0
  292. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +20 -22
  293. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  294. package/lib/module/shared/providers/screen/animation/helpers/selected-interpolator-options.js +46 -0
  295. package/lib/module/shared/providers/screen/animation/helpers/selected-interpolator-options.js.map +1 -0
  296. package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js +2 -3
  297. package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -1
  298. package/lib/module/shared/providers/screen/animation/use-screen-animation.js +56 -25
  299. package/lib/module/shared/providers/screen/animation/use-screen-animation.js.map +1 -1
  300. package/lib/module/shared/providers/screen/descriptors/descriptors.provider.js +2 -5
  301. package/lib/module/shared/providers/screen/descriptors/descriptors.provider.js.map +1 -1
  302. package/lib/module/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js +2 -12
  303. package/lib/module/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js.map +1 -1
  304. package/lib/module/shared/providers/screen/gestures/gestures.provider.js +4 -4
  305. package/lib/module/shared/providers/screen/gestures/gestures.provider.js.map +1 -1
  306. package/lib/module/shared/providers/screen/gestures/hooks/use-gesture-builder-state.js +4 -5
  307. package/lib/module/shared/providers/screen/gestures/hooks/use-gesture-builder-state.js.map +1 -1
  308. package/lib/module/shared/providers/screen/gestures/hooks/use-gesture-sensitivity.js +1 -1
  309. package/lib/module/shared/providers/screen/gestures/hooks/use-gesture-sensitivity.js.map +1 -1
  310. package/lib/module/shared/providers/screen/gestures/hooks/use-screen-gesture-config.js +6 -84
  311. package/lib/module/shared/providers/screen/gestures/hooks/use-screen-gesture-config.js.map +1 -1
  312. package/lib/module/shared/providers/screen/gestures/hooks/use-screen-gesture.js +1 -4
  313. package/lib/module/shared/providers/screen/gestures/hooks/use-screen-gesture.js.map +1 -1
  314. package/lib/module/shared/providers/screen/gestures/hooks/use-stable-runtime-config.js.map +1 -1
  315. package/lib/module/shared/providers/screen/gestures/ownership/compute-claimed-directions.js +36 -36
  316. package/lib/module/shared/providers/screen/gestures/ownership/compute-claimed-directions.js.map +1 -1
  317. package/lib/module/shared/providers/screen/gestures/ownership/resolve-ownership.js +12 -0
  318. package/lib/module/shared/providers/screen/gestures/ownership/resolve-ownership.js.map +1 -1
  319. package/lib/module/shared/providers/screen/gestures/ownership/use-walk-up-and-register-shadowing-claims.js +69 -56
  320. package/lib/module/shared/providers/screen/gestures/ownership/use-walk-up-and-register-shadowing-claims.js.map +1 -1
  321. package/lib/module/shared/providers/screen/gestures/{builders/use-build-pan-gesture.js → pan/build-pan-gesture.js} +3 -3
  322. package/lib/module/shared/providers/screen/gestures/pan/build-pan-gesture.js.map +1 -0
  323. package/lib/module/shared/providers/screen/gestures/pan/pan-activation-decision.js +205 -0
  324. package/lib/module/shared/providers/screen/gestures/pan/pan-activation-decision.js.map +1 -0
  325. package/lib/module/shared/providers/screen/gestures/{helpers/gesture-activation.js → pan/pan-activation-rules.js} +129 -119
  326. package/lib/module/shared/providers/screen/gestures/pan/pan-activation-rules.js.map +1 -0
  327. package/lib/module/shared/providers/screen/gestures/pan/pan-activation.js +89 -0
  328. package/lib/module/shared/providers/screen/gestures/pan/pan-activation.js.map +1 -0
  329. package/lib/module/shared/providers/screen/gestures/{helpers/pan-phases.js → pan/pan-lifecycle.js} +36 -28
  330. package/lib/module/shared/providers/screen/gestures/pan/pan-lifecycle.js.map +1 -0
  331. package/lib/module/shared/providers/screen/gestures/pan/pan-release.js +204 -0
  332. package/lib/module/shared/providers/screen/gestures/pan/pan-release.js.map +1 -0
  333. package/lib/module/shared/providers/screen/gestures/pan/pan-reset.js +49 -0
  334. package/lib/module/shared/providers/screen/gestures/pan/pan-reset.js.map +1 -0
  335. package/lib/module/shared/providers/screen/gestures/{behaviors → pan}/use-pan-behavior.js +11 -22
  336. package/lib/module/shared/providers/screen/gestures/pan/use-pan-behavior.js.map +1 -0
  337. package/lib/module/shared/providers/screen/gestures/{builders/use-build-pinch-gesture.js → pinch/build-pinch-gesture.js} +3 -3
  338. package/lib/module/shared/providers/screen/gestures/pinch/build-pinch-gesture.js.map +1 -0
  339. package/lib/module/shared/providers/screen/gestures/{activation/use-pinch-activation.js → pinch/pinch-activation.js} +5 -5
  340. package/lib/module/shared/providers/screen/gestures/pinch/pinch-activation.js.map +1 -0
  341. package/lib/module/shared/providers/screen/gestures/{helpers/pinch-phases.js → pinch/pinch-lifecycle.js} +10 -4
  342. package/lib/module/shared/providers/screen/gestures/pinch/pinch-lifecycle.js.map +1 -0
  343. package/lib/module/shared/providers/screen/gestures/pinch/pinch-release.js +126 -0
  344. package/lib/module/shared/providers/screen/gestures/pinch/pinch-release.js.map +1 -0
  345. package/lib/module/shared/providers/screen/gestures/pinch/pinch-reset.js +40 -0
  346. package/lib/module/shared/providers/screen/gestures/pinch/pinch-reset.js.map +1 -0
  347. package/lib/module/shared/providers/screen/gestures/{behaviors → pinch}/use-pinch-behavior.js +11 -22
  348. package/lib/module/shared/providers/screen/gestures/pinch/use-pinch-behavior.js.map +1 -0
  349. package/lib/module/shared/providers/screen/gestures/scroll-coordination/index.js.map +1 -0
  350. package/lib/module/shared/providers/screen/gestures/scroll-coordination/update-scroll-gesture-state.js.map +1 -0
  351. package/lib/module/shared/providers/screen/gestures/{hooks/use-scroll-gesture-coordination → scroll-coordination}/use-scroll-gesture-coordination.js +4 -4
  352. package/lib/module/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.js.map +1 -0
  353. package/lib/module/shared/providers/screen/gestures/{hooks/use-scroll-gesture-coordination → scroll-coordination}/walk-up-scroll-gesture-coordination.js +20 -9
  354. package/lib/module/shared/providers/screen/gestures/scroll-coordination/walk-up-scroll-gesture-coordination.js.map +1 -0
  355. package/lib/module/shared/providers/screen/gestures/{helpers/walk-gesture-ancestors.js → shared/ancestors.js} +1 -1
  356. package/lib/module/shared/providers/screen/gestures/shared/ancestors.js.map +1 -0
  357. package/lib/module/shared/providers/screen/gestures/{helpers/gesture-directions.js → shared/directions.js} +1 -1
  358. package/lib/module/shared/providers/screen/gestures/shared/directions.js.map +1 -0
  359. package/lib/module/shared/providers/screen/gestures/{helpers/gesture-physics.js → shared/physics.js} +88 -63
  360. package/lib/module/shared/providers/screen/gestures/shared/physics.js.map +1 -0
  361. package/lib/module/shared/providers/screen/gestures/shared/policy.js +218 -0
  362. package/lib/module/shared/providers/screen/gestures/shared/policy.js.map +1 -0
  363. package/lib/module/shared/providers/screen/gestures/shared/release.js +30 -0
  364. package/lib/module/shared/providers/screen/gestures/shared/release.js.map +1 -0
  365. package/lib/module/shared/providers/screen/gestures/shared/reset.js +58 -0
  366. package/lib/module/shared/providers/screen/gestures/shared/reset.js.map +1 -0
  367. package/lib/module/shared/providers/screen/gestures/shared/runtime.js +37 -0
  368. package/lib/module/shared/providers/screen/gestures/shared/runtime.js.map +1 -0
  369. package/lib/module/shared/providers/screen/gestures/shared/snap-points.js +174 -0
  370. package/lib/module/shared/providers/screen/gestures/shared/snap-points.js.map +1 -0
  371. package/lib/module/shared/providers/screen/gestures/shared/targets.js +116 -0
  372. package/lib/module/shared/providers/screen/gestures/shared/targets.js.map +1 -0
  373. package/lib/module/shared/providers/screen/gestures/types.js +1 -1
  374. package/lib/module/shared/providers/screen/gestures/types.js.map +1 -1
  375. package/lib/module/shared/providers/screen/options/helpers.js +70 -20
  376. package/lib/module/shared/providers/screen/options/helpers.js.map +1 -1
  377. package/lib/module/shared/providers/screen/styles/helpers/preserve-animated-props-only.js +21 -0
  378. package/lib/module/shared/providers/screen/styles/helpers/preserve-animated-props-only.js.map +1 -0
  379. package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js +110 -0
  380. package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js.map +1 -1
  381. package/lib/module/shared/providers/screen/styles/helpers/visibility-gate.js +39 -0
  382. package/lib/module/shared/providers/screen/styles/helpers/visibility-gate.js.map +1 -0
  383. package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +32 -15
  384. package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
  385. package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +35 -14
  386. package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
  387. package/lib/module/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js +10 -4
  388. package/lib/module/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js.map +1 -1
  389. package/lib/module/shared/stores/animation.store.js +3 -7
  390. package/lib/module/shared/stores/animation.store.js.map +1 -1
  391. package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js +105 -0
  392. package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -0
  393. package/lib/module/shared/stores/bounds/index.js +9 -17
  394. package/lib/module/shared/stores/bounds/index.js.map +1 -1
  395. package/lib/module/shared/stores/bounds/internals/clear.js +15 -42
  396. package/lib/module/shared/stores/bounds/internals/clear.js.map +1 -1
  397. package/lib/module/shared/stores/bounds/internals/entries.js +49 -9
  398. package/lib/module/shared/stores/bounds/internals/entries.js.map +1 -1
  399. package/lib/module/shared/stores/bounds/internals/links.js +139 -86
  400. package/lib/module/shared/stores/bounds/internals/links.js.map +1 -1
  401. package/lib/module/shared/stores/bounds/internals/resolver.js +17 -43
  402. package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -1
  403. package/lib/module/shared/stores/bounds/internals/state.js +25 -2
  404. package/lib/module/shared/stores/bounds/internals/state.js.map +1 -1
  405. package/lib/module/shared/stores/gesture.store.js +2 -0
  406. package/lib/module/shared/stores/gesture.store.js.map +1 -1
  407. package/lib/module/shared/stores/system.store.js +3 -0
  408. package/lib/module/shared/stores/system.store.js.map +1 -1
  409. package/lib/module/shared/types/animation.types.js +0 -4
  410. package/lib/module/shared/types/animation.types.js.map +1 -1
  411. package/lib/module/shared/types/gesture.types.js +0 -1
  412. package/lib/module/shared/types/gesture.types.js.map +1 -1
  413. package/lib/module/shared/utils/animation/animate-to-progress.js +19 -18
  414. package/lib/module/shared/utils/animation/animate-to-progress.js.map +1 -1
  415. package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js +2 -1
  416. package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
  417. package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js +6 -5
  418. package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
  419. package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js +21 -8
  420. package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
  421. package/lib/module/shared/utils/bounds/helpers/resolve-bounds-pair-key.js +18 -0
  422. package/lib/module/shared/utils/bounds/helpers/resolve-bounds-pair-key.js.map +1 -0
  423. package/lib/module/shared/utils/bounds/navigation/math.js +2 -16
  424. package/lib/module/shared/utils/bounds/navigation/math.js.map +1 -1
  425. package/lib/module/shared/utils/bounds/navigation/reveal/build.js +141 -134
  426. package/lib/module/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
  427. package/lib/module/shared/utils/bounds/navigation/reveal/config.js +20 -16
  428. package/lib/module/shared/utils/bounds/navigation/reveal/config.js.map +1 -1
  429. package/lib/module/shared/utils/bounds/navigation/reveal/math.js +144 -12
  430. package/lib/module/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
  431. package/lib/module/shared/utils/bounds/navigation/zoom/build.js +81 -19
  432. package/lib/module/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
  433. package/lib/module/shared/utils/bounds/navigation/zoom/config.js +1 -1
  434. package/lib/module/shared/utils/bounds/navigation/zoom/config.js.map +1 -1
  435. package/lib/module/shared/utils/bounds/navigation/zoom/math.js +4 -5
  436. package/lib/module/shared/utils/bounds/navigation/zoom/math.js.map +1 -1
  437. package/lib/module/shared/utils/gesture-progress-mode.js +42 -0
  438. package/lib/module/shared/utils/gesture-progress-mode.js.map +1 -0
  439. package/lib/module/shared/utils/navigation/resolve-scene-neighbors.js +20 -19
  440. package/lib/module/shared/utils/navigation/resolve-scene-neighbors.js.map +1 -1
  441. package/lib/module/shared/utils/resolve-chain-target.js +9 -16
  442. package/lib/module/shared/utils/resolve-chain-target.js.map +1 -1
  443. package/lib/module/shared/utils/resolve-screen-transition-options.js +1 -1
  444. package/lib/module/shared/utils/resolve-screen-transition-options.js.map +1 -1
  445. package/lib/typescript/component-stack/components/component-screen.d.ts.map +1 -1
  446. package/lib/typescript/shared/components/create-boundary-component/create-boundary-component.d.ts +1 -0
  447. package/lib/typescript/shared/components/create-boundary-component/create-boundary-component.d.ts.map +1 -1
  448. package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-presence.d.ts +1 -4
  449. package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-presence.d.ts.map +1 -1
  450. package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.d.ts +6 -4
  451. package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.d.ts.map +1 -1
  452. package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-source-measurement.d.ts +6 -2
  453. package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-source-measurement.d.ts.map +1 -1
  454. package/lib/typescript/shared/components/create-boundary-component/hooks/use-measurer.d.ts +5 -7
  455. package/lib/typescript/shared/components/create-boundary-component/hooks/use-measurer.d.ts.map +1 -1
  456. package/lib/typescript/shared/components/create-boundary-component/hooks/use-refresh-boundary.d.ts +7 -7
  457. package/lib/typescript/shared/components/create-boundary-component/hooks/use-refresh-boundary.d.ts.map +1 -1
  458. package/lib/typescript/shared/components/create-boundary-component/index.d.ts.map +1 -1
  459. package/lib/typescript/shared/components/create-boundary-component/types.d.ts +11 -7
  460. package/lib/typescript/shared/components/create-boundary-component/types.d.ts.map +1 -1
  461. package/lib/typescript/shared/components/create-boundary-component/utils/destination-signals.d.ts +10 -0
  462. package/lib/typescript/shared/components/create-boundary-component/utils/destination-signals.d.ts.map +1 -0
  463. package/lib/typescript/shared/components/create-boundary-component/{hooks/helpers/scroll-measurement.d.ts → utils/measured-bounds.d.ts} +3 -2
  464. package/lib/typescript/shared/components/create-boundary-component/utils/measured-bounds.d.ts.map +1 -0
  465. package/lib/typescript/shared/components/create-boundary-component/utils/refresh-signals.d.ts +22 -0
  466. package/lib/typescript/shared/components/create-boundary-component/utils/refresh-signals.d.ts.map +1 -0
  467. package/lib/typescript/shared/components/create-boundary-component/utils/source-signals.d.ts +16 -0
  468. package/lib/typescript/shared/components/create-boundary-component/utils/source-signals.d.ts.map +1 -0
  469. package/lib/typescript/shared/components/native-screen.d.ts.map +1 -1
  470. package/lib/typescript/shared/components/screen-container/helpers/find-collapse-target.d.ts.map +1 -1
  471. package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -1
  472. package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts.map +1 -1
  473. package/lib/typescript/shared/components/screen-container/layers/surface-container.d.ts.map +1 -1
  474. package/lib/typescript/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.d.ts +1 -1
  475. package/lib/typescript/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.d.ts.map +1 -1
  476. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition-intent.d.ts.map +1 -1
  477. package/lib/typescript/shared/constants.d.ts +9 -6
  478. package/lib/typescript/shared/constants.d.ts.map +1 -1
  479. package/lib/typescript/shared/index.d.ts +2 -2
  480. package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts +21 -0
  481. package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts.map +1 -0
  482. package/lib/typescript/shared/providers/register-bounds.provider.d.ts.map +1 -1
  483. package/lib/typescript/shared/providers/screen/animation/animation.provider.d.ts +4 -1
  484. package/lib/typescript/shared/providers/screen/animation/animation.provider.d.ts.map +1 -1
  485. package/lib/typescript/shared/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.d.ts +2 -0
  486. package/lib/typescript/shared/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.d.ts.map +1 -0
  487. package/lib/typescript/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.d.ts +6 -0
  488. package/lib/typescript/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.d.ts.map +1 -0
  489. package/lib/typescript/shared/providers/screen/animation/helpers/build-screen-transition-options.d.ts.map +1 -1
  490. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.d.ts +5 -0
  491. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.d.ts.map +1 -0
  492. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts +5 -0
  493. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts.map +1 -0
  494. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/settle.d.ts +5 -0
  495. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/settle.d.ts.map +1 -0
  496. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/snap-points.d.ts +5 -0
  497. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/snap-points.d.ts.map +1 -0
  498. package/lib/typescript/shared/providers/screen/animation/helpers/{hydrate-transition-state.d.ts → hydrate-transition-state/types.d.ts} +15 -16
  499. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/types.d.ts.map +1 -0
  500. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts +3 -3
  501. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
  502. package/lib/typescript/shared/providers/screen/animation/helpers/selected-interpolator-options.d.ts +9 -0
  503. package/lib/typescript/shared/providers/screen/animation/helpers/selected-interpolator-options.d.ts.map +1 -0
  504. package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts +2 -3
  505. package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts.map +1 -1
  506. package/lib/typescript/shared/providers/screen/animation/types.d.ts +19 -4
  507. package/lib/typescript/shared/providers/screen/animation/types.d.ts.map +1 -1
  508. package/lib/typescript/shared/providers/screen/animation/use-screen-animation.d.ts +9 -3
  509. package/lib/typescript/shared/providers/screen/animation/use-screen-animation.d.ts.map +1 -1
  510. package/lib/typescript/shared/providers/screen/descriptors/descriptors.provider.d.ts.map +1 -1
  511. package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.d.ts +1 -6
  512. package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.d.ts.map +1 -1
  513. package/lib/typescript/shared/providers/screen/gestures/gestures.provider.d.ts.map +1 -1
  514. package/lib/typescript/shared/providers/screen/gestures/hooks/use-gesture-builder-state.d.ts +2 -2
  515. package/lib/typescript/shared/providers/screen/gestures/hooks/use-gesture-builder-state.d.ts.map +1 -1
  516. package/lib/typescript/shared/providers/screen/gestures/hooks/use-screen-gesture-config.d.ts.map +1 -1
  517. package/lib/typescript/shared/providers/screen/gestures/hooks/use-screen-gesture.d.ts.map +1 -1
  518. package/lib/typescript/shared/providers/screen/gestures/hooks/use-stable-runtime-config.d.ts +3 -5
  519. package/lib/typescript/shared/providers/screen/gestures/hooks/use-stable-runtime-config.d.ts.map +1 -1
  520. package/lib/typescript/shared/providers/screen/gestures/ownership/compute-claimed-directions.d.ts.map +1 -1
  521. package/lib/typescript/shared/providers/screen/gestures/ownership/resolve-ownership.d.ts +5 -0
  522. package/lib/typescript/shared/providers/screen/gestures/ownership/resolve-ownership.d.ts.map +1 -1
  523. package/lib/typescript/shared/providers/screen/gestures/ownership/use-walk-up-and-register-shadowing-claims.d.ts.map +1 -1
  524. package/lib/typescript/shared/providers/screen/gestures/{builders/use-build-pan-gesture.d.ts → pan/build-pan-gesture.d.ts} +1 -1
  525. package/lib/typescript/shared/providers/screen/gestures/pan/build-pan-gesture.d.ts.map +1 -0
  526. package/lib/typescript/shared/providers/screen/gestures/pan/pan-activation-decision.d.ts +29 -0
  527. package/lib/typescript/shared/providers/screen/gestures/pan/pan-activation-decision.d.ts.map +1 -0
  528. package/lib/typescript/shared/providers/screen/gestures/{helpers/gesture-activation.d.ts → pan/pan-activation-rules.d.ts} +12 -11
  529. package/lib/typescript/shared/providers/screen/gestures/pan/pan-activation-rules.d.ts.map +1 -0
  530. package/lib/typescript/shared/providers/screen/gestures/{activation/use-pan-activation.d.ts → pan/pan-activation.d.ts} +1 -1
  531. package/lib/typescript/shared/providers/screen/gestures/pan/pan-activation.d.ts.map +1 -0
  532. package/lib/typescript/shared/providers/screen/gestures/{helpers/pan-phases.d.ts → pan/pan-lifecycle.d.ts} +1 -1
  533. package/lib/typescript/shared/providers/screen/gestures/pan/pan-lifecycle.d.ts.map +1 -0
  534. package/lib/typescript/shared/providers/screen/gestures/pan/pan-release.d.ts +6 -0
  535. package/lib/typescript/shared/providers/screen/gestures/pan/pan-release.d.ts.map +1 -0
  536. package/lib/typescript/shared/providers/screen/gestures/pan/pan-reset.d.ts +18 -0
  537. package/lib/typescript/shared/providers/screen/gestures/pan/pan-reset.d.ts.map +1 -0
  538. package/lib/typescript/shared/providers/screen/gestures/pan/use-pan-behavior.d.ts.map +1 -0
  539. package/lib/typescript/shared/providers/screen/gestures/{builders/use-build-pinch-gesture.d.ts → pinch/build-pinch-gesture.d.ts} +1 -1
  540. package/lib/typescript/shared/providers/screen/gestures/pinch/build-pinch-gesture.d.ts.map +1 -0
  541. package/lib/typescript/shared/providers/screen/gestures/{activation/use-pinch-activation.d.ts → pinch/pinch-activation.d.ts} +1 -1
  542. package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-activation.d.ts.map +1 -0
  543. package/lib/typescript/shared/providers/screen/gestures/{helpers/pinch-phases.d.ts → pinch/pinch-lifecycle.d.ts} +1 -1
  544. package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-lifecycle.d.ts.map +1 -0
  545. package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-release.d.ts +5 -0
  546. package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-release.d.ts.map +1 -0
  547. package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-reset.d.ts +11 -0
  548. package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-reset.d.ts.map +1 -0
  549. package/lib/typescript/shared/providers/screen/gestures/pinch/use-pinch-behavior.d.ts.map +1 -0
  550. package/lib/typescript/shared/providers/screen/gestures/scroll-coordination/index.d.ts.map +1 -0
  551. package/lib/typescript/shared/providers/screen/gestures/{hooks/use-scroll-gesture-coordination → scroll-coordination}/update-scroll-gesture-state.d.ts +1 -1
  552. package/lib/typescript/shared/providers/screen/gestures/scroll-coordination/update-scroll-gesture-state.d.ts.map +1 -0
  553. package/lib/typescript/shared/providers/screen/gestures/{hooks/use-scroll-gesture-coordination → scroll-coordination}/use-scroll-gesture-coordination.d.ts +1 -1
  554. package/lib/typescript/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.d.ts.map +1 -0
  555. package/lib/typescript/shared/providers/screen/gestures/{hooks/use-scroll-gesture-coordination → scroll-coordination}/walk-up-scroll-gesture-coordination.d.ts +1 -1
  556. package/lib/typescript/shared/providers/screen/gestures/scroll-coordination/walk-up-scroll-gesture-coordination.d.ts.map +1 -0
  557. package/lib/typescript/shared/providers/screen/gestures/{helpers/walk-gesture-ancestors.d.ts → shared/ancestors.d.ts} +1 -1
  558. package/lib/typescript/shared/providers/screen/gestures/shared/ancestors.d.ts.map +1 -0
  559. package/lib/typescript/shared/providers/screen/gestures/{helpers/gesture-directions.d.ts → shared/directions.d.ts} +1 -1
  560. package/lib/typescript/shared/providers/screen/gestures/shared/directions.d.ts.map +1 -0
  561. package/lib/typescript/shared/providers/screen/gestures/{helpers/gesture-physics.d.ts → shared/physics.d.ts} +11 -10
  562. package/lib/typescript/shared/providers/screen/gestures/shared/physics.d.ts.map +1 -0
  563. package/lib/typescript/shared/providers/screen/gestures/shared/policy.d.ts +39 -0
  564. package/lib/typescript/shared/providers/screen/gestures/shared/policy.d.ts.map +1 -0
  565. package/lib/typescript/shared/providers/screen/gestures/shared/release.d.ts +13 -0
  566. package/lib/typescript/shared/providers/screen/gestures/shared/release.d.ts.map +1 -0
  567. package/lib/typescript/shared/providers/screen/gestures/shared/reset.d.ts +7 -0
  568. package/lib/typescript/shared/providers/screen/gestures/shared/reset.d.ts.map +1 -0
  569. package/lib/typescript/shared/providers/screen/gestures/shared/runtime.d.ts +5 -0
  570. package/lib/typescript/shared/providers/screen/gestures/shared/runtime.d.ts.map +1 -0
  571. package/lib/typescript/shared/providers/screen/gestures/shared/snap-points.d.ts +37 -0
  572. package/lib/typescript/shared/providers/screen/gestures/shared/snap-points.d.ts.map +1 -0
  573. package/lib/typescript/shared/providers/screen/gestures/{helpers/gesture-targets.d.ts → shared/targets.d.ts} +1 -1
  574. package/lib/typescript/shared/providers/screen/gestures/shared/targets.d.ts.map +1 -0
  575. package/lib/typescript/shared/providers/screen/gestures/types.d.ts +32 -29
  576. package/lib/typescript/shared/providers/screen/gestures/types.d.ts.map +1 -1
  577. package/lib/typescript/shared/providers/screen/options/helpers.d.ts.map +1 -1
  578. package/lib/typescript/shared/providers/screen/options/types.d.ts +1 -0
  579. package/lib/typescript/shared/providers/screen/options/types.d.ts.map +1 -1
  580. package/lib/typescript/shared/providers/screen/styles/helpers/preserve-animated-props-only.d.ts +3 -0
  581. package/lib/typescript/shared/providers/screen/styles/helpers/preserve-animated-props-only.d.ts.map +1 -0
  582. package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/index.d.ts +4 -0
  583. package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/index.d.ts.map +1 -1
  584. package/lib/typescript/shared/providers/screen/styles/helpers/visibility-gate.d.ts +17 -0
  585. package/lib/typescript/shared/providers/screen/styles/helpers/visibility-gate.d.ts.map +1 -0
  586. package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts +4 -4
  587. package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -1
  588. package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts.map +1 -1
  589. package/lib/typescript/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.d.ts.map +1 -1
  590. package/lib/typescript/shared/stores/animation.store.d.ts +1 -3
  591. package/lib/typescript/shared/stores/animation.store.d.ts.map +1 -1
  592. package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts +18 -0
  593. package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts.map +1 -0
  594. package/lib/typescript/shared/stores/bounds/index.d.ts +7 -15
  595. package/lib/typescript/shared/stores/bounds/index.d.ts.map +1 -1
  596. package/lib/typescript/shared/stores/bounds/internals/clear.d.ts +2 -4
  597. package/lib/typescript/shared/stores/bounds/internals/clear.d.ts.map +1 -1
  598. package/lib/typescript/shared/stores/bounds/internals/entries.d.ts.map +1 -1
  599. package/lib/typescript/shared/stores/bounds/internals/links.d.ts +13 -10
  600. package/lib/typescript/shared/stores/bounds/internals/links.d.ts.map +1 -1
  601. package/lib/typescript/shared/stores/bounds/internals/resolver.d.ts.map +1 -1
  602. package/lib/typescript/shared/stores/bounds/internals/state.d.ts +26 -5
  603. package/lib/typescript/shared/stores/bounds/internals/state.d.ts.map +1 -1
  604. package/lib/typescript/shared/stores/bounds/types.d.ts +16 -18
  605. package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
  606. package/lib/typescript/shared/stores/gesture.store.d.ts +1 -0
  607. package/lib/typescript/shared/stores/gesture.store.d.ts.map +1 -1
  608. package/lib/typescript/shared/stores/system.store.d.ts +4 -0
  609. package/lib/typescript/shared/stores/system.store.d.ts.map +1 -1
  610. package/lib/typescript/shared/types/animation.types.d.ts +11 -5
  611. package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
  612. package/lib/typescript/shared/types/bounds.types.d.ts +1 -1
  613. package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
  614. package/lib/typescript/shared/types/gesture.types.d.ts +9 -1
  615. package/lib/typescript/shared/types/gesture.types.d.ts.map +1 -1
  616. package/lib/typescript/shared/types/index.d.ts +1 -1
  617. package/lib/typescript/shared/types/index.d.ts.map +1 -1
  618. package/lib/typescript/shared/types/screen.types.d.ts +8 -1
  619. package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
  620. package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts.map +1 -1
  621. package/lib/typescript/shared/utils/bounds/helpers/create-bounds-accessor-core.d.ts.map +1 -1
  622. package/lib/typescript/shared/utils/bounds/helpers/create-interpolators.d.ts +2 -2
  623. package/lib/typescript/shared/utils/bounds/helpers/create-interpolators.d.ts.map +1 -1
  624. package/lib/typescript/shared/utils/bounds/helpers/create-link-accessor.d.ts +2 -3
  625. package/lib/typescript/shared/utils/bounds/helpers/create-link-accessor.d.ts.map +1 -1
  626. package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts +3 -3
  627. package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts.map +1 -1
  628. package/lib/typescript/shared/utils/bounds/helpers/resolve-bounds-pair-key.d.ts +4 -0
  629. package/lib/typescript/shared/utils/bounds/helpers/resolve-bounds-pair-key.d.ts.map +1 -0
  630. package/lib/typescript/shared/utils/bounds/navigation/math.d.ts.map +1 -1
  631. package/lib/typescript/shared/utils/bounds/navigation/reveal/build.d.ts.map +1 -1
  632. package/lib/typescript/shared/utils/bounds/navigation/reveal/config.d.ts +20 -16
  633. package/lib/typescript/shared/utils/bounds/navigation/reveal/config.d.ts.map +1 -1
  634. package/lib/typescript/shared/utils/bounds/navigation/reveal/math.d.ts +48 -7
  635. package/lib/typescript/shared/utils/bounds/navigation/reveal/math.d.ts.map +1 -1
  636. package/lib/typescript/shared/utils/bounds/navigation/zoom/build.d.ts.map +1 -1
  637. package/lib/typescript/shared/utils/bounds/navigation/zoom/config.d.ts +1 -1
  638. package/lib/typescript/shared/utils/bounds/navigation/zoom/config.d.ts.map +1 -1
  639. package/lib/typescript/shared/utils/bounds/navigation/zoom/math.d.ts +2 -3
  640. package/lib/typescript/shared/utils/bounds/navigation/zoom/math.d.ts.map +1 -1
  641. package/lib/typescript/shared/utils/bounds/types/options.d.ts +2 -3
  642. package/lib/typescript/shared/utils/bounds/types/options.d.ts.map +1 -1
  643. package/lib/typescript/shared/utils/gesture-progress-mode.d.ts +14 -0
  644. package/lib/typescript/shared/utils/gesture-progress-mode.d.ts.map +1 -0
  645. package/lib/typescript/shared/utils/navigation/resolve-scene-neighbors.d.ts +3 -2
  646. package/lib/typescript/shared/utils/navigation/resolve-scene-neighbors.d.ts.map +1 -1
  647. package/lib/typescript/shared/utils/resolve-chain-target.d.ts +2 -2
  648. package/lib/typescript/shared/utils/resolve-chain-target.d.ts.map +1 -1
  649. package/lib/typescript/shared/utils/resolve-screen-transition-options.d.ts +0 -1
  650. package/lib/typescript/shared/utils/resolve-screen-transition-options.d.ts.map +1 -1
  651. package/package.json +5 -2
  652. package/src/component-stack/components/component-screen.tsx +3 -11
  653. package/src/shared/components/create-boundary-component/create-boundary-component.tsx +38 -40
  654. package/src/shared/components/create-boundary-component/hooks/use-boundary-presence.ts +5 -30
  655. package/src/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.ts +29 -19
  656. package/src/shared/components/create-boundary-component/hooks/use-initial-source-measurement.ts +41 -11
  657. package/src/shared/components/create-boundary-component/hooks/use-measurer.ts +49 -76
  658. package/src/shared/components/create-boundary-component/hooks/use-refresh-boundary.ts +45 -84
  659. package/src/shared/components/create-boundary-component/index.tsx +3 -1
  660. package/src/shared/components/create-boundary-component/types.ts +13 -11
  661. package/src/shared/components/create-boundary-component/utils/destination-signals.ts +129 -0
  662. package/src/shared/components/create-boundary-component/{hooks/helpers/scroll-measurement.ts → utils/measured-bounds.ts} +25 -1
  663. package/src/shared/components/create-boundary-component/utils/refresh-signals.ts +164 -0
  664. package/src/shared/components/create-boundary-component/utils/source-signals.ts +72 -0
  665. package/src/shared/components/create-transition-aware-component.tsx +1 -1
  666. package/src/shared/components/native-screen.tsx +3 -12
  667. package/src/shared/components/screen-container/helpers/find-collapse-target.ts +18 -7
  668. package/src/shared/components/screen-container/hooks/use-content-layout.ts +1 -1
  669. package/src/shared/components/screen-container/layers/backdrop.tsx +11 -5
  670. package/src/shared/components/screen-container/layers/maybe-masked-navigation-container.tsx +30 -15
  671. package/src/shared/components/screen-container/layers/surface-container.tsx +35 -15
  672. package/src/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.ts +3 -23
  673. package/src/shared/components/screen-lifecycle/hooks/use-close-transition-intent.ts +1 -4
  674. package/src/shared/components/screen-lifecycle/hooks/use-open-transition-intent.ts +1 -1
  675. package/src/shared/configs/presets.ts +3 -3
  676. package/src/shared/constants.ts +15 -6
  677. package/src/shared/providers/helpers/measured-bounds-writes.ts +67 -0
  678. package/src/shared/providers/register-bounds.provider.tsx +77 -101
  679. package/src/shared/providers/screen/animation/animation.provider.tsx +169 -17
  680. package/src/shared/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.tsx +13 -0
  681. package/src/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.ts +144 -0
  682. package/src/shared/providers/screen/animation/helpers/build-screen-transition-options.ts +17 -1
  683. package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.ts +164 -0
  684. package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/index.ts +159 -0
  685. package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/settle.ts +41 -0
  686. package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/snap-points.ts +188 -0
  687. package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/types.ts +40 -0
  688. package/src/shared/providers/screen/animation/helpers/pipeline.ts +40 -24
  689. package/src/shared/providers/screen/animation/helpers/selected-interpolator-options.ts +99 -0
  690. package/src/shared/providers/screen/animation/helpers/use-build-transition-state.ts +7 -6
  691. package/src/shared/providers/screen/animation/types.ts +34 -4
  692. package/src/shared/providers/screen/animation/use-screen-animation.tsx +88 -33
  693. package/src/shared/providers/screen/descriptors/descriptors.provider.tsx +1 -7
  694. package/src/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.ts +0 -19
  695. package/src/shared/providers/screen/gestures/gestures.provider.tsx +5 -4
  696. package/src/shared/providers/screen/gestures/hooks/use-gesture-builder-state.ts +6 -10
  697. package/src/shared/providers/screen/gestures/hooks/use-gesture-sensitivity.ts +1 -1
  698. package/src/shared/providers/screen/gestures/hooks/use-screen-gesture-config.ts +11 -147
  699. package/src/shared/providers/screen/gestures/hooks/use-screen-gesture.ts +1 -5
  700. package/src/shared/providers/screen/gestures/hooks/use-stable-runtime-config.ts +11 -19
  701. package/src/shared/providers/screen/gestures/ownership/compute-claimed-directions.ts +52 -40
  702. package/src/shared/providers/screen/gestures/ownership/resolve-ownership.ts +15 -0
  703. package/src/shared/providers/screen/gestures/ownership/use-walk-up-and-register-shadowing-claims.ts +83 -47
  704. package/src/shared/providers/screen/gestures/{builders/use-build-pan-gesture.ts → pan/build-pan-gesture.ts} +2 -2
  705. package/src/shared/providers/screen/gestures/pan/pan-activation-decision.ts +458 -0
  706. package/src/shared/providers/screen/gestures/{helpers/gesture-activation.ts → pan/pan-activation-rules.ts} +208 -147
  707. package/src/shared/providers/screen/gestures/pan/pan-activation.ts +135 -0
  708. package/src/shared/providers/screen/gestures/{helpers/pan-phases.ts → pan/pan-lifecycle.ts} +44 -23
  709. package/src/shared/providers/screen/gestures/pan/pan-release.ts +279 -0
  710. package/src/shared/providers/screen/gestures/pan/pan-reset.ts +95 -0
  711. package/src/shared/providers/screen/gestures/{behaviors → pan}/use-pan-behavior.ts +28 -36
  712. package/src/shared/providers/screen/gestures/{builders/use-build-pinch-gesture.ts → pinch/build-pinch-gesture.ts} +2 -2
  713. package/src/shared/providers/screen/gestures/{activation/use-pinch-activation.ts → pinch/pinch-activation.ts} +6 -3
  714. package/src/shared/providers/screen/gestures/{helpers/pinch-phases.ts → pinch/pinch-lifecycle.ts} +9 -2
  715. package/src/shared/providers/screen/gestures/pinch/pinch-release.ts +183 -0
  716. package/src/shared/providers/screen/gestures/pinch/pinch-reset.ts +65 -0
  717. package/src/shared/providers/screen/gestures/{behaviors → pinch}/use-pinch-behavior.ts +28 -42
  718. package/src/shared/providers/screen/gestures/{hooks/use-scroll-gesture-coordination → scroll-coordination}/update-scroll-gesture-state.ts +1 -1
  719. package/src/shared/providers/screen/gestures/{hooks/use-scroll-gesture-coordination → scroll-coordination}/use-scroll-gesture-coordination.ts +5 -5
  720. package/src/shared/providers/screen/gestures/{hooks/use-scroll-gesture-coordination → scroll-coordination}/walk-up-scroll-gesture-coordination.ts +42 -26
  721. package/src/shared/providers/screen/gestures/{helpers/gesture-physics.ts → shared/physics.ts} +167 -107
  722. package/src/shared/providers/screen/gestures/shared/policy.ts +344 -0
  723. package/src/shared/providers/screen/gestures/shared/release.ts +43 -0
  724. package/src/shared/providers/screen/gestures/shared/reset.ts +74 -0
  725. package/src/shared/providers/screen/gestures/shared/runtime.ts +76 -0
  726. package/src/shared/providers/screen/gestures/shared/snap-points.ts +250 -0
  727. package/src/shared/providers/screen/gestures/shared/targets.ts +202 -0
  728. package/src/shared/providers/screen/gestures/types.ts +40 -44
  729. package/src/shared/providers/screen/options/helpers.ts +169 -58
  730. package/src/shared/providers/screen/options/types.ts +1 -0
  731. package/src/shared/providers/screen/styles/helpers/preserve-animated-props-only.ts +22 -0
  732. package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/index.ts +154 -0
  733. package/src/shared/providers/screen/styles/helpers/visibility-gate.ts +57 -0
  734. package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +45 -18
  735. package/src/shared/providers/screen/styles/hooks/use-maybe-block-visibility.tsx +36 -17
  736. package/src/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.tsx +11 -3
  737. package/src/shared/stores/animation.store.ts +3 -9
  738. package/src/shared/stores/bounds/helpers/link-pairs.helpers.ts +161 -0
  739. package/src/shared/stores/bounds/index.ts +11 -23
  740. package/src/shared/stores/bounds/internals/clear.ts +18 -81
  741. package/src/shared/stores/bounds/internals/entries.ts +56 -13
  742. package/src/shared/stores/bounds/internals/links.ts +222 -125
  743. package/src/shared/stores/bounds/internals/resolver.ts +23 -87
  744. package/src/shared/stores/bounds/internals/state.ts +27 -5
  745. package/src/shared/stores/bounds/types.ts +19 -18
  746. package/src/shared/stores/gesture.store.ts +3 -0
  747. package/src/shared/stores/system.store.ts +8 -0
  748. package/src/shared/types/animation.types.ts +13 -5
  749. package/src/shared/types/bounds.types.ts +4 -1
  750. package/src/shared/types/gesture.types.ts +10 -2
  751. package/src/shared/types/index.ts +0 -1
  752. package/src/shared/types/screen.types.ts +13 -1
  753. package/src/shared/utils/animation/animate-to-progress.ts +25 -17
  754. package/src/shared/utils/bounds/helpers/create-bounds-accessor-core.ts +2 -0
  755. package/src/shared/utils/bounds/helpers/create-interpolators.ts +2 -2
  756. package/src/shared/utils/bounds/helpers/create-link-accessor.ts +8 -8
  757. package/src/shared/utils/bounds/helpers/prepare-bound-styles.ts +23 -14
  758. package/src/shared/utils/bounds/helpers/resolve-bounds-pair-key.ts +22 -0
  759. package/src/shared/utils/bounds/navigation/math.ts +2 -18
  760. package/src/shared/utils/bounds/navigation/reveal/build.ts +288 -193
  761. package/src/shared/utils/bounds/navigation/reveal/config.ts +24 -16
  762. package/src/shared/utils/bounds/navigation/reveal/math.ts +234 -18
  763. package/src/shared/utils/bounds/navigation/zoom/build.ts +124 -20
  764. package/src/shared/utils/bounds/navigation/zoom/config.ts +1 -1
  765. package/src/shared/utils/bounds/navigation/zoom/math.ts +5 -7
  766. package/src/shared/utils/bounds/types/options.ts +2 -3
  767. package/src/shared/utils/gesture-progress-mode.ts +67 -0
  768. package/src/shared/utils/navigation/resolve-scene-neighbors.ts +36 -23
  769. package/src/shared/utils/resolve-chain-target.ts +9 -22
  770. package/src/shared/utils/resolve-screen-transition-options.ts +1 -3
  771. package/lib/commonjs/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js +0 -46
  772. package/lib/commonjs/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js.map +0 -1
  773. package/lib/commonjs/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js +0 -17
  774. package/lib/commonjs/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js.map +0 -1
  775. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js +0 -28
  776. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js.map +0 -1
  777. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +0 -64
  778. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +0 -1
  779. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement.js +0 -20
  780. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement.js.map +0 -1
  781. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/scroll-measurement.js.map +0 -1
  782. package/lib/commonjs/shared/components/create-boundary-component/utils/build-boundary-match-key.js +0 -16
  783. package/lib/commonjs/shared/components/create-boundary-component/utils/build-boundary-match-key.js.map +0 -1
  784. package/lib/commonjs/shared/hooks/reanimated/use-animated-debounce.js +0 -43
  785. package/lib/commonjs/shared/hooks/reanimated/use-animated-debounce.js.map +0 -1
  786. package/lib/commonjs/shared/providers/layout-anchor.provider.js +0 -86
  787. package/lib/commonjs/shared/providers/layout-anchor.provider.js.map +0 -1
  788. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state.js +0 -164
  789. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state.js.map +0 -1
  790. package/lib/commonjs/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js +0 -33
  791. package/lib/commonjs/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js.map +0 -1
  792. package/lib/commonjs/shared/providers/screen/descriptors/helpers/get-ancestor-navigator-keys.js +0 -28
  793. package/lib/commonjs/shared/providers/screen/descriptors/helpers/get-ancestor-navigator-keys.js.map +0 -1
  794. package/lib/commonjs/shared/providers/screen/gestures/activation/use-pan-activation.js +0 -182
  795. package/lib/commonjs/shared/providers/screen/gestures/activation/use-pan-activation.js.map +0 -1
  796. package/lib/commonjs/shared/providers/screen/gestures/activation/use-pinch-activation.js.map +0 -1
  797. package/lib/commonjs/shared/providers/screen/gestures/behaviors/strategies/pan-snap.strategy.js +0 -161
  798. package/lib/commonjs/shared/providers/screen/gestures/behaviors/strategies/pan-snap.strategy.js.map +0 -1
  799. package/lib/commonjs/shared/providers/screen/gestures/behaviors/strategies/pan.strategy.js +0 -78
  800. package/lib/commonjs/shared/providers/screen/gestures/behaviors/strategies/pan.strategy.js.map +0 -1
  801. package/lib/commonjs/shared/providers/screen/gestures/behaviors/strategies/pinch-snap.strategy.js +0 -147
  802. package/lib/commonjs/shared/providers/screen/gestures/behaviors/strategies/pinch-snap.strategy.js.map +0 -1
  803. package/lib/commonjs/shared/providers/screen/gestures/behaviors/strategies/pinch.strategy.js +0 -52
  804. package/lib/commonjs/shared/providers/screen/gestures/behaviors/strategies/pinch.strategy.js.map +0 -1
  805. package/lib/commonjs/shared/providers/screen/gestures/behaviors/use-pan-behavior.js +0 -64
  806. package/lib/commonjs/shared/providers/screen/gestures/behaviors/use-pan-behavior.js.map +0 -1
  807. package/lib/commonjs/shared/providers/screen/gestures/behaviors/use-pinch-behavior.js +0 -64
  808. package/lib/commonjs/shared/providers/screen/gestures/behaviors/use-pinch-behavior.js.map +0 -1
  809. package/lib/commonjs/shared/providers/screen/gestures/builders/use-build-pan-gesture.js.map +0 -1
  810. package/lib/commonjs/shared/providers/screen/gestures/builders/use-build-pinch-gesture.js.map +0 -1
  811. package/lib/commonjs/shared/providers/screen/gestures/helpers/gesture-activation.js.map +0 -1
  812. package/lib/commonjs/shared/providers/screen/gestures/helpers/gesture-directions.js.map +0 -1
  813. package/lib/commonjs/shared/providers/screen/gestures/helpers/gesture-physics.js.map +0 -1
  814. package/lib/commonjs/shared/providers/screen/gestures/helpers/gesture-reset.js +0 -99
  815. package/lib/commonjs/shared/providers/screen/gestures/helpers/gesture-reset.js.map +0 -1
  816. package/lib/commonjs/shared/providers/screen/gestures/helpers/gesture-snap-points.js +0 -43
  817. package/lib/commonjs/shared/providers/screen/gestures/helpers/gesture-snap-points.js.map +0 -1
  818. package/lib/commonjs/shared/providers/screen/gestures/helpers/gesture-targets.js +0 -93
  819. package/lib/commonjs/shared/providers/screen/gestures/helpers/gesture-targets.js.map +0 -1
  820. package/lib/commonjs/shared/providers/screen/gestures/helpers/pan-phases.js.map +0 -1
  821. package/lib/commonjs/shared/providers/screen/gestures/helpers/pinch-phases.js.map +0 -1
  822. package/lib/commonjs/shared/providers/screen/gestures/helpers/resolve-can-track-gesture.js +0 -21
  823. package/lib/commonjs/shared/providers/screen/gestures/helpers/resolve-can-track-gesture.js.map +0 -1
  824. package/lib/commonjs/shared/providers/screen/gestures/helpers/runtime-options.js +0 -134
  825. package/lib/commonjs/shared/providers/screen/gestures/helpers/runtime-options.js.map +0 -1
  826. package/lib/commonjs/shared/providers/screen/gestures/helpers/validate-snap-points.js +0 -56
  827. package/lib/commonjs/shared/providers/screen/gestures/helpers/validate-snap-points.js.map +0 -1
  828. package/lib/commonjs/shared/providers/screen/gestures/helpers/walk-gesture-ancestors.js.map +0 -1
  829. package/lib/commonjs/shared/providers/screen/gestures/hooks/use-scroll-gesture-coordination/index.js.map +0 -1
  830. package/lib/commonjs/shared/providers/screen/gestures/hooks/use-scroll-gesture-coordination/update-scroll-gesture-state.js.map +0 -1
  831. package/lib/commonjs/shared/providers/screen/gestures/hooks/use-scroll-gesture-coordination/use-scroll-gesture-coordination.js.map +0 -1
  832. package/lib/commonjs/shared/providers/screen/gestures/hooks/use-scroll-gesture-coordination/walk-up-scroll-gesture-coordination.js.map +0 -1
  833. package/lib/commonjs/shared/providers/screen/gestures/ownership/should-defer-to-child-claim.js +0 -18
  834. package/lib/commonjs/shared/providers/screen/gestures/ownership/should-defer-to-child-claim.js.map +0 -1
  835. package/lib/commonjs/shared/providers/scroll-settle.provider.js +0 -25
  836. package/lib/commonjs/shared/providers/scroll-settle.provider.js.map +0 -1
  837. package/lib/commonjs/shared/stores/bounds/helpers/entries.helpers.js +0 -59
  838. package/lib/commonjs/shared/stores/bounds/helpers/entries.helpers.js.map +0 -1
  839. package/lib/commonjs/shared/stores/bounds/helpers/find-latest.js +0 -25
  840. package/lib/commonjs/shared/stores/bounds/helpers/find-latest.js.map +0 -1
  841. package/lib/commonjs/shared/stores/bounds/helpers/groups.helpers.js +0 -30
  842. package/lib/commonjs/shared/stores/bounds/helpers/groups.helpers.js.map +0 -1
  843. package/lib/commonjs/shared/stores/bounds/helpers/link.helpers.js +0 -79
  844. package/lib/commonjs/shared/stores/bounds/helpers/link.helpers.js.map +0 -1
  845. package/lib/commonjs/shared/stores/bounds/helpers/matching.js +0 -22
  846. package/lib/commonjs/shared/stores/bounds/helpers/matching.js.map +0 -1
  847. package/lib/commonjs/shared/stores/bounds/helpers/tag-state.helpers.js +0 -30
  848. package/lib/commonjs/shared/stores/bounds/helpers/tag-state.helpers.js.map +0 -1
  849. package/lib/commonjs/shared/stores/bounds/internals/groups.js +0 -102
  850. package/lib/commonjs/shared/stores/bounds/internals/groups.js.map +0 -1
  851. package/lib/commonjs/shared/typecheck/public-api.typecheck.js +0 -227
  852. package/lib/commonjs/shared/typecheck/public-api.typecheck.js.map +0 -1
  853. package/lib/module/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js +0 -41
  854. package/lib/module/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js.map +0 -1
  855. package/lib/module/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js +0 -12
  856. package/lib/module/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js.map +0 -1
  857. package/lib/module/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js +0 -23
  858. package/lib/module/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js.map +0 -1
  859. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +0 -58
  860. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +0 -1
  861. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement.js +0 -15
  862. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement.js.map +0 -1
  863. package/lib/module/shared/components/create-boundary-component/hooks/helpers/scroll-measurement.js.map +0 -1
  864. package/lib/module/shared/components/create-boundary-component/utils/build-boundary-match-key.js +0 -12
  865. package/lib/module/shared/components/create-boundary-component/utils/build-boundary-match-key.js.map +0 -1
  866. package/lib/module/shared/hooks/reanimated/use-animated-debounce.js +0 -39
  867. package/lib/module/shared/hooks/reanimated/use-animated-debounce.js.map +0 -1
  868. package/lib/module/shared/providers/layout-anchor.provider.js +0 -80
  869. package/lib/module/shared/providers/layout-anchor.provider.js.map +0 -1
  870. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state.js +0 -158
  871. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state.js.map +0 -1
  872. package/lib/module/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js +0 -29
  873. package/lib/module/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js.map +0 -1
  874. package/lib/module/shared/providers/screen/descriptors/helpers/get-ancestor-navigator-keys.js +0 -24
  875. package/lib/module/shared/providers/screen/descriptors/helpers/get-ancestor-navigator-keys.js.map +0 -1
  876. package/lib/module/shared/providers/screen/gestures/activation/use-pan-activation.js +0 -177
  877. package/lib/module/shared/providers/screen/gestures/activation/use-pan-activation.js.map +0 -1
  878. package/lib/module/shared/providers/screen/gestures/activation/use-pinch-activation.js.map +0 -1
  879. package/lib/module/shared/providers/screen/gestures/behaviors/strategies/pan-snap.strategy.js +0 -157
  880. package/lib/module/shared/providers/screen/gestures/behaviors/strategies/pan-snap.strategy.js.map +0 -1
  881. package/lib/module/shared/providers/screen/gestures/behaviors/strategies/pan.strategy.js +0 -74
  882. package/lib/module/shared/providers/screen/gestures/behaviors/strategies/pan.strategy.js.map +0 -1
  883. package/lib/module/shared/providers/screen/gestures/behaviors/strategies/pinch-snap.strategy.js +0 -143
  884. package/lib/module/shared/providers/screen/gestures/behaviors/strategies/pinch-snap.strategy.js.map +0 -1
  885. package/lib/module/shared/providers/screen/gestures/behaviors/strategies/pinch.strategy.js +0 -48
  886. package/lib/module/shared/providers/screen/gestures/behaviors/strategies/pinch.strategy.js.map +0 -1
  887. package/lib/module/shared/providers/screen/gestures/behaviors/use-pan-behavior.js.map +0 -1
  888. package/lib/module/shared/providers/screen/gestures/behaviors/use-pinch-behavior.js.map +0 -1
  889. package/lib/module/shared/providers/screen/gestures/builders/use-build-pan-gesture.js.map +0 -1
  890. package/lib/module/shared/providers/screen/gestures/builders/use-build-pinch-gesture.js.map +0 -1
  891. package/lib/module/shared/providers/screen/gestures/helpers/gesture-activation.js.map +0 -1
  892. package/lib/module/shared/providers/screen/gestures/helpers/gesture-directions.js.map +0 -1
  893. package/lib/module/shared/providers/screen/gestures/helpers/gesture-physics.js.map +0 -1
  894. package/lib/module/shared/providers/screen/gestures/helpers/gesture-reset.js +0 -93
  895. package/lib/module/shared/providers/screen/gestures/helpers/gesture-reset.js.map +0 -1
  896. package/lib/module/shared/providers/screen/gestures/helpers/gesture-snap-points.js +0 -37
  897. package/lib/module/shared/providers/screen/gestures/helpers/gesture-snap-points.js.map +0 -1
  898. package/lib/module/shared/providers/screen/gestures/helpers/gesture-targets.js +0 -87
  899. package/lib/module/shared/providers/screen/gestures/helpers/gesture-targets.js.map +0 -1
  900. package/lib/module/shared/providers/screen/gestures/helpers/pan-phases.js.map +0 -1
  901. package/lib/module/shared/providers/screen/gestures/helpers/pinch-phases.js.map +0 -1
  902. package/lib/module/shared/providers/screen/gestures/helpers/resolve-can-track-gesture.js +0 -17
  903. package/lib/module/shared/providers/screen/gestures/helpers/resolve-can-track-gesture.js.map +0 -1
  904. package/lib/module/shared/providers/screen/gestures/helpers/runtime-options.js +0 -124
  905. package/lib/module/shared/providers/screen/gestures/helpers/runtime-options.js.map +0 -1
  906. package/lib/module/shared/providers/screen/gestures/helpers/validate-snap-points.js +0 -50
  907. package/lib/module/shared/providers/screen/gestures/helpers/validate-snap-points.js.map +0 -1
  908. package/lib/module/shared/providers/screen/gestures/helpers/walk-gesture-ancestors.js.map +0 -1
  909. package/lib/module/shared/providers/screen/gestures/hooks/use-scroll-gesture-coordination/index.js.map +0 -1
  910. package/lib/module/shared/providers/screen/gestures/hooks/use-scroll-gesture-coordination/update-scroll-gesture-state.js.map +0 -1
  911. package/lib/module/shared/providers/screen/gestures/hooks/use-scroll-gesture-coordination/use-scroll-gesture-coordination.js.map +0 -1
  912. package/lib/module/shared/providers/screen/gestures/hooks/use-scroll-gesture-coordination/walk-up-scroll-gesture-coordination.js.map +0 -1
  913. package/lib/module/shared/providers/screen/gestures/ownership/should-defer-to-child-claim.js +0 -14
  914. package/lib/module/shared/providers/screen/gestures/ownership/should-defer-to-child-claim.js.map +0 -1
  915. package/lib/module/shared/providers/scroll-settle.provider.js +0 -19
  916. package/lib/module/shared/providers/scroll-settle.provider.js.map +0 -1
  917. package/lib/module/shared/stores/bounds/helpers/entries.helpers.js +0 -52
  918. package/lib/module/shared/stores/bounds/helpers/entries.helpers.js.map +0 -1
  919. package/lib/module/shared/stores/bounds/helpers/find-latest.js +0 -19
  920. package/lib/module/shared/stores/bounds/helpers/find-latest.js.map +0 -1
  921. package/lib/module/shared/stores/bounds/helpers/groups.helpers.js +0 -23
  922. package/lib/module/shared/stores/bounds/helpers/groups.helpers.js.map +0 -1
  923. package/lib/module/shared/stores/bounds/helpers/link.helpers.js +0 -69
  924. package/lib/module/shared/stores/bounds/helpers/link.helpers.js.map +0 -1
  925. package/lib/module/shared/stores/bounds/helpers/matching.js +0 -17
  926. package/lib/module/shared/stores/bounds/helpers/matching.js.map +0 -1
  927. package/lib/module/shared/stores/bounds/helpers/tag-state.helpers.js +0 -24
  928. package/lib/module/shared/stores/bounds/helpers/tag-state.helpers.js.map +0 -1
  929. package/lib/module/shared/stores/bounds/internals/groups.js +0 -95
  930. package/lib/module/shared/stores/bounds/internals/groups.js.map +0 -1
  931. package/lib/module/shared/typecheck/public-api.typecheck.js +0 -227
  932. package/lib/module/shared/typecheck/public-api.typecheck.js.map +0 -1
  933. package/lib/typescript/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.d.ts +0 -18
  934. package/lib/typescript/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.d.ts.map +0 -1
  935. package/lib/typescript/shared/components/create-boundary-component/helpers/resolve-pending-source-key.d.ts +0 -2
  936. package/lib/typescript/shared/components/create-boundary-component/helpers/resolve-pending-source-key.d.ts.map +0 -1
  937. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.d.ts +0 -22
  938. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.d.ts.map +0 -1
  939. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts +0 -24
  940. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts.map +0 -1
  941. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement.d.ts +0 -3
  942. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement.d.ts.map +0 -1
  943. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/scroll-measurement.d.ts.map +0 -1
  944. package/lib/typescript/shared/components/create-boundary-component/utils/build-boundary-match-key.d.ts +0 -8
  945. package/lib/typescript/shared/components/create-boundary-component/utils/build-boundary-match-key.d.ts.map +0 -1
  946. package/lib/typescript/shared/hooks/reanimated/use-animated-debounce.d.ts +0 -13
  947. package/lib/typescript/shared/hooks/reanimated/use-animated-debounce.d.ts.map +0 -1
  948. package/lib/typescript/shared/providers/layout-anchor.provider.d.ts +0 -39
  949. package/lib/typescript/shared/providers/layout-anchor.provider.d.ts.map +0 -1
  950. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state.d.ts.map +0 -1
  951. package/lib/typescript/shared/providers/screen/animation/helpers/resolve-screen-animation-target.d.ts +0 -9
  952. package/lib/typescript/shared/providers/screen/animation/helpers/resolve-screen-animation-target.d.ts.map +0 -1
  953. package/lib/typescript/shared/providers/screen/descriptors/helpers/get-ancestor-navigator-keys.d.ts +0 -7
  954. package/lib/typescript/shared/providers/screen/descriptors/helpers/get-ancestor-navigator-keys.d.ts.map +0 -1
  955. package/lib/typescript/shared/providers/screen/gestures/activation/use-pan-activation.d.ts.map +0 -1
  956. package/lib/typescript/shared/providers/screen/gestures/activation/use-pinch-activation.d.ts.map +0 -1
  957. package/lib/typescript/shared/providers/screen/gestures/behaviors/strategies/pan-snap.strategy.d.ts +0 -3
  958. package/lib/typescript/shared/providers/screen/gestures/behaviors/strategies/pan-snap.strategy.d.ts.map +0 -1
  959. package/lib/typescript/shared/providers/screen/gestures/behaviors/strategies/pan.strategy.d.ts +0 -3
  960. package/lib/typescript/shared/providers/screen/gestures/behaviors/strategies/pan.strategy.d.ts.map +0 -1
  961. package/lib/typescript/shared/providers/screen/gestures/behaviors/strategies/pinch-snap.strategy.d.ts +0 -3
  962. package/lib/typescript/shared/providers/screen/gestures/behaviors/strategies/pinch-snap.strategy.d.ts.map +0 -1
  963. package/lib/typescript/shared/providers/screen/gestures/behaviors/strategies/pinch.strategy.d.ts +0 -3
  964. package/lib/typescript/shared/providers/screen/gestures/behaviors/strategies/pinch.strategy.d.ts.map +0 -1
  965. package/lib/typescript/shared/providers/screen/gestures/behaviors/use-pan-behavior.d.ts.map +0 -1
  966. package/lib/typescript/shared/providers/screen/gestures/behaviors/use-pinch-behavior.d.ts.map +0 -1
  967. package/lib/typescript/shared/providers/screen/gestures/builders/use-build-pan-gesture.d.ts.map +0 -1
  968. package/lib/typescript/shared/providers/screen/gestures/builders/use-build-pinch-gesture.d.ts.map +0 -1
  969. package/lib/typescript/shared/providers/screen/gestures/helpers/gesture-activation.d.ts.map +0 -1
  970. package/lib/typescript/shared/providers/screen/gestures/helpers/gesture-directions.d.ts.map +0 -1
  971. package/lib/typescript/shared/providers/screen/gestures/helpers/gesture-physics.d.ts.map +0 -1
  972. package/lib/typescript/shared/providers/screen/gestures/helpers/gesture-reset.d.ts +0 -20
  973. package/lib/typescript/shared/providers/screen/gestures/helpers/gesture-reset.d.ts.map +0 -1
  974. package/lib/typescript/shared/providers/screen/gestures/helpers/gesture-snap-points.d.ts +0 -17
  975. package/lib/typescript/shared/providers/screen/gestures/helpers/gesture-snap-points.d.ts.map +0 -1
  976. package/lib/typescript/shared/providers/screen/gestures/helpers/gesture-targets.d.ts.map +0 -1
  977. package/lib/typescript/shared/providers/screen/gestures/helpers/pan-phases.d.ts.map +0 -1
  978. package/lib/typescript/shared/providers/screen/gestures/helpers/pinch-phases.d.ts.map +0 -1
  979. package/lib/typescript/shared/providers/screen/gestures/helpers/resolve-can-track-gesture.d.ts +0 -8
  980. package/lib/typescript/shared/providers/screen/gestures/helpers/resolve-can-track-gesture.d.ts.map +0 -1
  981. package/lib/typescript/shared/providers/screen/gestures/helpers/runtime-options.d.ts +0 -9
  982. package/lib/typescript/shared/providers/screen/gestures/helpers/runtime-options.d.ts.map +0 -1
  983. package/lib/typescript/shared/providers/screen/gestures/helpers/validate-snap-points.d.ts +0 -20
  984. package/lib/typescript/shared/providers/screen/gestures/helpers/validate-snap-points.d.ts.map +0 -1
  985. package/lib/typescript/shared/providers/screen/gestures/helpers/walk-gesture-ancestors.d.ts.map +0 -1
  986. package/lib/typescript/shared/providers/screen/gestures/hooks/use-scroll-gesture-coordination/index.d.ts.map +0 -1
  987. package/lib/typescript/shared/providers/screen/gestures/hooks/use-scroll-gesture-coordination/update-scroll-gesture-state.d.ts.map +0 -1
  988. package/lib/typescript/shared/providers/screen/gestures/hooks/use-scroll-gesture-coordination/use-scroll-gesture-coordination.d.ts.map +0 -1
  989. package/lib/typescript/shared/providers/screen/gestures/hooks/use-scroll-gesture-coordination/walk-up-scroll-gesture-coordination.d.ts.map +0 -1
  990. package/lib/typescript/shared/providers/screen/gestures/ownership/should-defer-to-child-claim.d.ts +0 -6
  991. package/lib/typescript/shared/providers/screen/gestures/ownership/should-defer-to-child-claim.d.ts.map +0 -1
  992. package/lib/typescript/shared/providers/scroll-settle.provider.d.ts +0 -12
  993. package/lib/typescript/shared/providers/scroll-settle.provider.d.ts.map +0 -1
  994. package/lib/typescript/shared/stores/bounds/helpers/entries.helpers.d.ts +0 -5
  995. package/lib/typescript/shared/stores/bounds/helpers/entries.helpers.d.ts.map +0 -1
  996. package/lib/typescript/shared/stores/bounds/helpers/find-latest.d.ts +0 -3
  997. package/lib/typescript/shared/stores/bounds/helpers/find-latest.d.ts.map +0 -1
  998. package/lib/typescript/shared/stores/bounds/helpers/groups.helpers.d.ts +0 -10
  999. package/lib/typescript/shared/stores/bounds/helpers/groups.helpers.d.ts.map +0 -1
  1000. package/lib/typescript/shared/stores/bounds/helpers/link.helpers.d.ts +0 -16
  1001. package/lib/typescript/shared/stores/bounds/helpers/link.helpers.d.ts.map +0 -1
  1002. package/lib/typescript/shared/stores/bounds/helpers/matching.d.ts +0 -4
  1003. package/lib/typescript/shared/stores/bounds/helpers/matching.d.ts.map +0 -1
  1004. package/lib/typescript/shared/stores/bounds/helpers/tag-state.helpers.d.ts +0 -5
  1005. package/lib/typescript/shared/stores/bounds/helpers/tag-state.helpers.d.ts.map +0 -1
  1006. package/lib/typescript/shared/stores/bounds/internals/groups.d.ts +0 -16
  1007. package/lib/typescript/shared/stores/bounds/internals/groups.d.ts.map +0 -1
  1008. package/src/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.ts +0 -101
  1009. package/src/shared/components/create-boundary-component/helpers/resolve-pending-source-key.ts +0 -20
  1010. package/src/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.ts +0 -48
  1011. package/src/shared/components/create-boundary-component/hooks/helpers/measurement-rules.ts +0 -90
  1012. package/src/shared/components/create-boundary-component/hooks/helpers/measurement.ts +0 -25
  1013. package/src/shared/components/create-boundary-component/utils/build-boundary-match-key.ts +0 -14
  1014. package/src/shared/hooks/reanimated/use-animated-debounce.ts +0 -53
  1015. package/src/shared/providers/layout-anchor.provider.tsx +0 -112
  1016. package/src/shared/providers/screen/animation/helpers/hydrate-transition-state.ts +0 -335
  1017. package/src/shared/providers/screen/animation/helpers/resolve-screen-animation-target.ts +0 -42
  1018. package/src/shared/providers/screen/descriptors/helpers/get-ancestor-navigator-keys.ts +0 -29
  1019. package/src/shared/providers/screen/gestures/activation/use-pan-activation.ts +0 -244
  1020. package/src/shared/providers/screen/gestures/behaviors/strategies/pan-snap.strategy.ts +0 -195
  1021. package/src/shared/providers/screen/gestures/behaviors/strategies/pan.strategy.ts +0 -76
  1022. package/src/shared/providers/screen/gestures/behaviors/strategies/pinch-snap.strategy.ts +0 -177
  1023. package/src/shared/providers/screen/gestures/behaviors/strategies/pinch.strategy.ts +0 -73
  1024. package/src/shared/providers/screen/gestures/helpers/gesture-reset.ts +0 -158
  1025. package/src/shared/providers/screen/gestures/helpers/gesture-snap-points.ts +0 -72
  1026. package/src/shared/providers/screen/gestures/helpers/gesture-targets.ts +0 -153
  1027. package/src/shared/providers/screen/gestures/helpers/resolve-can-track-gesture.ts +0 -23
  1028. package/src/shared/providers/screen/gestures/helpers/runtime-options.ts +0 -159
  1029. package/src/shared/providers/screen/gestures/helpers/validate-snap-points.ts +0 -74
  1030. package/src/shared/providers/screen/gestures/ownership/should-defer-to-child-claim.ts +0 -15
  1031. package/src/shared/providers/scroll-settle.provider.tsx +0 -24
  1032. package/src/shared/stores/bounds/helpers/entries.helpers.ts +0 -74
  1033. package/src/shared/stores/bounds/helpers/find-latest.ts +0 -22
  1034. package/src/shared/stores/bounds/helpers/groups.helpers.ts +0 -27
  1035. package/src/shared/stores/bounds/helpers/link.helpers.ts +0 -135
  1036. package/src/shared/stores/bounds/helpers/matching.ts +0 -25
  1037. package/src/shared/stores/bounds/helpers/tag-state.helpers.ts +0 -24
  1038. package/src/shared/stores/bounds/internals/groups.ts +0 -116
  1039. package/src/shared/typecheck/public-api.typecheck.ts +0 -272
  1040. /package/lib/commonjs/shared/providers/screen/gestures/{hooks/use-scroll-gesture-coordination → scroll-coordination}/index.js +0 -0
  1041. /package/lib/commonjs/shared/providers/screen/gestures/{hooks/use-scroll-gesture-coordination → scroll-coordination}/update-scroll-gesture-state.js +0 -0
  1042. /package/lib/module/shared/providers/screen/gestures/{hooks/use-scroll-gesture-coordination → scroll-coordination}/index.js +0 -0
  1043. /package/lib/module/shared/providers/screen/gestures/{hooks/use-scroll-gesture-coordination → scroll-coordination}/update-scroll-gesture-state.js +0 -0
  1044. /package/lib/typescript/shared/providers/screen/gestures/{behaviors → pan}/use-pan-behavior.d.ts +0 -0
  1045. /package/lib/typescript/shared/providers/screen/gestures/{behaviors → pinch}/use-pinch-behavior.d.ts +0 -0
  1046. /package/lib/typescript/shared/providers/screen/gestures/{hooks/use-scroll-gesture-coordination → scroll-coordination}/index.d.ts +0 -0
  1047. /package/src/shared/providers/screen/gestures/{hooks/use-scroll-gesture-coordination → scroll-coordination}/index.ts +0 -0
  1048. /package/src/shared/providers/screen/gestures/{helpers/walk-gesture-ancestors.ts → shared/ancestors.ts} +0 -0
  1049. /package/src/shared/providers/screen/gestures/{helpers/gesture-directions.ts → shared/directions.ts} +0 -0
@@ -6,26 +6,32 @@ import {
6
6
  withTiming,
7
7
  } from "react-native-reanimated";
8
8
  import { AnimationStore } from "../../../stores/animation.store";
9
- import { hasDestinationLink } from "../../../stores/bounds/internals/links";
9
+ import { getDestination } from "../../../stores/bounds/internals/links";
10
+ import { pairs } from "../../../stores/bounds/internals/state";
10
11
  import {
11
12
  LifecycleTransitionRequestKind,
12
13
  SystemStore,
13
14
  } from "../../../stores/system.store";
14
- import type { MeasureParams } from "../types";
15
+ import type { MeasureBoundary } from "../types";
16
+ import { getInitialDestinationMeasurePairKey } from "../utils/destination-signals";
15
17
 
16
18
  const VIEWPORT_RETRY_DELAY_MS = 16;
17
19
 
18
20
  interface UseInitialDestinationMeasurementParams {
19
- sharedBoundTag: string;
21
+ linkId: string;
20
22
  enabled: boolean;
21
23
  currentScreenKey: string;
22
- measureBoundary: (options: MeasureParams) => void;
24
+ preferredSourceScreenKey?: string;
25
+ ancestorScreenKeys: string[];
26
+ measureBoundary: MeasureBoundary;
23
27
  }
24
28
 
25
29
  export const useInitialDestinationMeasurement = ({
26
- sharedBoundTag,
30
+ linkId,
27
31
  enabled,
28
32
  currentScreenKey,
33
+ preferredSourceScreenKey,
34
+ ancestorScreenKeys,
29
35
  measureBoundary,
30
36
  }: UseInitialDestinationMeasurementParams) => {
31
37
  const progress = AnimationStore.getValue(currentScreenKey, "progress");
@@ -83,30 +89,34 @@ export const useInitialDestinationMeasurement = ({
83
89
  return [0, retryTick] as const;
84
90
  }
85
91
 
86
- const hasDestination = hasDestinationLink(
87
- sharedBoundTag,
92
+ const destinationPairKey = getInitialDestinationMeasurePairKey({
93
+ enabled,
88
94
  currentScreenKey,
89
- );
95
+ preferredSourceScreenKey,
96
+ ancestorScreenKeys,
97
+ linkId,
98
+ linkState: ancestorScreenKeys.length ? pairs.get() : undefined,
99
+ });
90
100
 
91
- const shouldBlock = enabled && !hasDestination;
92
-
93
- if (!shouldBlock) {
94
- return [0, retryTick] as const;
95
- }
96
-
97
- return [1, retryTick] as const;
101
+ return [destinationPairKey, retryTick] as const;
98
102
  },
99
- ([shouldBlock]) => {
103
+ ([destinationPairKey]) => {
100
104
  "worklet";
101
- if (!shouldBlock) {
105
+ if (!destinationPairKey) {
102
106
  releaseLifecycleStartBlock();
103
107
  return;
104
108
  }
105
109
 
106
110
  ensureLifecycleStartBlocked();
107
- measureBoundary({ intent: "complete-destination" });
111
+ measureBoundary({
112
+ type: "destination",
113
+ pairKey: destinationPairKey,
114
+ });
115
+
116
+ const destinationAttached =
117
+ getDestination(destinationPairKey, linkId) !== null;
108
118
 
109
- if (hasDestinationLink(sharedBoundTag, currentScreenKey)) {
119
+ if (destinationAttached) {
110
120
  releaseLifecycleStartBlock();
111
121
  return;
112
122
  }
@@ -1,27 +1,57 @@
1
- import { useAnimatedReaction } from "react-native-reanimated";
2
- import type { MeasureParams } from "../types";
1
+ import { useAnimatedReaction, useSharedValue } from "react-native-reanimated";
2
+ import { pairs } from "../../../stores/bounds/internals/state";
3
+ import type { MeasureBoundary } from "../types";
4
+ import { getInitialSourceCaptureSignal } from "../utils/source-signals";
3
5
 
4
6
  export const useInitialSourceMeasurement = (params: {
5
7
  enabled: boolean;
6
8
  nextScreenKey?: string;
7
- measureBoundary: (options: MeasureParams) => void;
9
+ currentScreenKey?: string;
10
+ measureBoundary: MeasureBoundary;
11
+ linkId: string;
12
+ group?: string;
13
+ shouldAutoMeasure: boolean;
8
14
  }) => {
9
- const { enabled, nextScreenKey, measureBoundary } = params;
15
+ const {
16
+ enabled,
17
+ nextScreenKey,
18
+ measureBoundary,
19
+ linkId,
20
+ currentScreenKey,
21
+ group,
22
+ shouldAutoMeasure,
23
+ } = params;
24
+ const lastSourceCaptureSignal = useSharedValue<string | null>(null);
10
25
 
11
26
  useAnimatedReaction(
12
27
  () => {
13
28
  "worklet";
14
- if (!enabled || !nextScreenKey) {
15
- return 0;
16
- }
17
-
18
- return nextScreenKey;
29
+ return getInitialSourceCaptureSignal({
30
+ enabled,
31
+ nextScreenKey,
32
+ currentScreenKey,
33
+ linkId,
34
+ group,
35
+ shouldAutoMeasure,
36
+ linkState: group ? pairs.get() : undefined,
37
+ });
19
38
  },
20
39
  (captureSignal) => {
21
40
  "worklet";
22
- if (!enabled || !captureSignal) return;
41
+ if (!enabled || !captureSignal) {
42
+ lastSourceCaptureSignal.set(null);
43
+ return;
44
+ }
45
+
46
+ if (lastSourceCaptureSignal.get() === captureSignal.signal) {
47
+ return;
48
+ }
23
49
 
24
- measureBoundary({ intent: "capture-source" });
50
+ lastSourceCaptureSignal.set(captureSignal.signal);
51
+ measureBoundary({
52
+ type: "source",
53
+ pairKey: captureSignal.pairKey,
54
+ });
25
55
  },
26
56
  );
27
57
  };
@@ -2,41 +2,38 @@ import { useCallback } from "react";
2
2
  import type { View } from "react-native";
3
3
  import { useWindowDimensions } from "react-native";
4
4
  import type { AnimatedRef, StyleProps } from "react-native-reanimated";
5
+ import { setEntry } from "../../../stores/bounds/internals/entries";
6
+ import {
7
+ setDestination,
8
+ setSource,
9
+ } from "../../../stores/bounds/internals/links";
5
10
  import { ScrollStore } from "../../../stores/scroll.store";
6
11
  import { SystemStore } from "../../../stores/system.store";
7
- import { applyMeasuredBoundsWrites } from "../helpers/apply-measured-bounds-writes";
8
- import type { MeasureParams } from "../types";
9
- import { createLinkContext } from "./helpers/boundary-link-context";
10
- import { isMeasurementInViewport } from "./helpers/measurement";
12
+ import type { MeasureBoundary } from "../types";
11
13
  import {
12
- buildMeasurementWritePlan,
13
- getMeasureIntentFlags,
14
- } from "./helpers/measurement-rules";
15
- import { measureWithOverscrollAwareness } from "./helpers/scroll-measurement";
14
+ isMeasurementInViewport,
15
+ measureWithOverscrollAwareness,
16
+ } from "../utils/measured-bounds";
16
17
 
17
18
  interface UseMeasurerParams {
18
19
  enabled: boolean;
19
- sharedBoundTag: string;
20
- preferredSourceScreenKey?: string;
20
+ entryTag: string;
21
+ linkId: string;
22
+ group?: string;
21
23
  currentScreenKey: string;
22
- ancestorKeys: string[];
23
- navigatorKey?: string;
24
- ancestorNavigatorKeys?: string[];
25
24
  preparedStyles: StyleProps;
26
25
  measuredAnimatedRef: AnimatedRef<View>;
27
26
  }
28
27
 
29
28
  export const useMeasurer = ({
30
29
  enabled,
31
- sharedBoundTag,
32
- preferredSourceScreenKey,
30
+ entryTag,
31
+ linkId,
32
+ group,
33
33
  currentScreenKey,
34
- ancestorKeys,
35
- navigatorKey,
36
- ancestorNavigatorKeys,
37
34
  preparedStyles,
38
35
  measuredAnimatedRef,
39
- }: UseMeasurerParams) => {
36
+ }: UseMeasurerParams): MeasureBoundary => {
40
37
  const { width: viewportWidth, height: viewportHeight } =
41
38
  useWindowDimensions();
42
39
 
@@ -47,27 +44,10 @@ export const useMeasurer = ({
47
44
  );
48
45
 
49
46
  return useCallback(
50
- ({ intent }: MeasureParams = {}) => {
47
+ (target) => {
51
48
  "worklet";
52
49
  if (!enabled) return;
53
50
 
54
- const intents = getMeasureIntentFlags(intent);
55
- const currentLink = createLinkContext({
56
- sharedBoundTag,
57
- currentScreenKey,
58
- preferredSourceScreenKey,
59
- });
60
-
61
- const writePlan = buildMeasurementWritePlan({
62
- intents,
63
- hasPendingLink: currentLink.hasPendingLink,
64
- hasSourceLink: currentLink.hasSourceLink,
65
- hasDestinationLink: currentLink.hasDestinationLink,
66
- hasAttachableSourceLink: currentLink.hasAttachableSourceLink,
67
- });
68
-
69
- if (!writePlan.writesAny) return;
70
-
71
51
  const measured = measureWithOverscrollAwareness(
72
52
  measuredAnimatedRef,
73
53
  scrollState.get(),
@@ -75,15 +55,6 @@ export const useMeasurer = ({
75
55
 
76
56
  if (!measured) return;
77
57
 
78
- /**
79
- * Source Pass
80
- * Source intents are intentionally used & kept unguarded.
81
- */
82
- const sourceWrites = {
83
- shouldSetSource: writePlan.captureSource,
84
- shouldUpdateSource: writePlan.refreshSource,
85
- };
86
-
87
58
  /**
88
59
  * - Destination Pass -
89
60
  * Be strict while lifecycle start is blocked for destination capture.
@@ -92,47 +63,49 @@ export const useMeasurer = ({
92
63
  * lifecycle blocked until a valid retry lands.
93
64
  */
94
65
  const shouldGuardDestinationViewport =
95
- pendingLifecycleStartBlockCount.get() > 0;
66
+ pendingLifecycleStartBlockCount.get() > 0 || !!group;
67
+
96
68
  const viewportAllowsDestinationWrite =
69
+ target.type !== "destination" ||
97
70
  !shouldGuardDestinationViewport ||
98
71
  isMeasurementInViewport(measured, viewportWidth, viewportHeight);
99
72
 
100
- const destinationWrites = {
101
- shouldSetDestination:
102
- viewportAllowsDestinationWrite && writePlan.completeDestination,
103
- shouldUpdateDestination:
104
- viewportAllowsDestinationWrite && writePlan.refreshDestination,
105
- };
73
+ if (!viewportAllowsDestinationWrite) return;
106
74
 
107
- const shouldApplyMeasurement =
108
- sourceWrites.shouldSetSource ||
109
- sourceWrites.shouldUpdateSource ||
110
- destinationWrites.shouldSetDestination ||
111
- destinationWrites.shouldUpdateDestination;
75
+ // Set the bounds entry on every measure to avoid any stale measurements
76
+ // for the public read API.
77
+ setEntry(entryTag, currentScreenKey, {
78
+ bounds: measured,
79
+ });
112
80
 
113
- if (!shouldApplyMeasurement) return;
81
+ if (target.type === "source") {
82
+ setSource(
83
+ target.pairKey,
84
+ linkId,
85
+ currentScreenKey,
86
+ measured,
87
+ preparedStyles,
88
+ group,
89
+ );
90
+ }
114
91
 
115
- applyMeasuredBoundsWrites({
116
- sharedBoundTag,
117
- currentScreenKey,
118
- measured,
119
- preparedStyles,
120
- ancestorKeys,
121
- navigatorKey,
122
- ancestorNavigatorKeys,
123
- expectedSourceScreenKey: currentLink.expectedSourceScreenKey,
124
- ...sourceWrites,
125
- ...destinationWrites,
126
- });
92
+ if (target.type === "destination") {
93
+ setDestination(
94
+ target.pairKey,
95
+ linkId,
96
+ currentScreenKey,
97
+ measured,
98
+ preparedStyles,
99
+ group,
100
+ );
101
+ }
127
102
  },
128
103
  [
129
104
  enabled,
130
- sharedBoundTag,
131
- preferredSourceScreenKey,
105
+ entryTag,
106
+ linkId,
107
+ group,
132
108
  currentScreenKey,
133
- ancestorKeys,
134
- navigatorKey,
135
- ancestorNavigatorKeys,
136
109
  preparedStyles,
137
110
  measuredAnimatedRef,
138
111
  viewportWidth,
@@ -1,116 +1,77 @@
1
1
  import { useAnimatedReaction } from "react-native-reanimated";
2
2
  import { AnimationStore } from "../../../stores/animation.store";
3
- import { getGroupActiveId } from "../../../stores/bounds/internals/groups";
4
- import {
5
- hasDestinationLink,
6
- hasSourceLink,
7
- } from "../../../stores/bounds/internals/links";
8
- import type { BoundaryId, MeasureParams } from "../types";
3
+ import { pairs } from "../../../stores/bounds/internals/state";
4
+ import type { MeasureBoundary } from "../types";
5
+ import { getRefreshBoundarySignal } from "../utils/refresh-signals";
9
6
 
10
7
  interface UseRefreshBoundaryParams {
11
8
  enabled: boolean;
12
- sharedBoundTag: string;
13
- id: BoundaryId;
14
- group?: string;
15
9
  currentScreenKey: string;
10
+ preferredSourceScreenKey?: string;
16
11
  nextScreenKey?: string;
17
- hasNextScreen: boolean;
18
- measureBoundary: (options: MeasureParams) => void;
12
+ linkId: string;
13
+ group?: string;
14
+ ancestorScreenKeys: string[];
15
+ measureBoundary: MeasureBoundary;
19
16
  }
20
17
 
21
18
  export const useRefreshBoundary = ({
22
19
  enabled,
23
- sharedBoundTag,
24
- id,
25
- group,
26
20
  currentScreenKey,
21
+ preferredSourceScreenKey,
27
22
  nextScreenKey,
28
- hasNextScreen,
23
+ linkId,
24
+ group,
25
+ ancestorScreenKeys,
29
26
  measureBoundary,
30
27
  }: UseRefreshBoundaryParams) => {
31
- const currentWillAnimate = AnimationStore.getValue(
32
- currentScreenKey,
28
+ // Source-side boundaries refresh from the next screen's lifecycle pulse.
29
+ // Destination-side boundaries have no next screen, so they refresh from self.
30
+ const refreshScreenKey = nextScreenKey ?? currentScreenKey;
31
+ const refreshWillAnimate = AnimationStore.getValue(
32
+ refreshScreenKey,
33
33
  "willAnimate",
34
34
  );
35
- const currentClosing = AnimationStore.getValue(currentScreenKey, "closing");
36
- const currentEntering = AnimationStore.getValue(currentScreenKey, "entering");
37
- const currentAnimating = AnimationStore.getValue(
38
- currentScreenKey,
39
- "animating",
35
+ const refreshClosing = AnimationStore.getValue(refreshScreenKey, "closing");
36
+ const refreshEntering = AnimationStore.getValue(refreshScreenKey, "entering");
37
+ const refreshAnimating = AnimationStore.getValue(
38
+ refreshScreenKey,
39
+ "progressAnimating",
40
40
  );
41
- const currentProgress = AnimationStore.getValue(currentScreenKey, "progress");
42
- const nextWillAnimate = nextScreenKey
43
- ? AnimationStore.getValue(nextScreenKey, "willAnimate")
44
- : null;
45
-
46
- const nextClosing = nextScreenKey
47
- ? AnimationStore.getValue(nextScreenKey, "closing")
48
- : null;
49
- const nextEntering = nextScreenKey
50
- ? AnimationStore.getValue(nextScreenKey, "entering")
51
- : null;
41
+ const refreshProgress = AnimationStore.getValue(refreshScreenKey, "progress");
52
42
 
53
43
  useAnimatedReaction(
54
44
  () => {
55
45
  "worklet";
56
-
57
- const shouldRefresh = hasNextScreen
58
- ? (nextWillAnimate?.get() ?? 0)
59
- : currentWillAnimate.get();
60
- const closing = hasNextScreen
61
- ? (nextClosing?.get() ?? 0)
62
- : currentClosing.get();
63
- const entering = hasNextScreen
64
- ? (nextEntering?.get() ?? 0)
65
- : currentEntering.get();
66
-
67
- // Programmatic close marks `closing` before pulsing `willAnimate`.
68
- // This frame is still settled, so destination refresh is valid and
69
- // reveal can compute initial/current destination delta before progress moves.
70
- const canRefreshPreCloseDestination =
71
- !hasNextScreen &&
72
- shouldRefresh &&
73
- closing &&
74
- !entering &&
75
- !currentAnimating.get() &&
76
- currentProgress.get() >= 1;
77
-
78
- if (
79
- canRefreshPreCloseDestination ||
80
- (shouldRefresh && !closing && !entering)
81
- ) {
82
- return 1;
83
- }
84
-
85
- return 0;
46
+ return getRefreshBoundarySignal({
47
+ enabled,
48
+ currentScreenKey,
49
+ preferredSourceScreenKey,
50
+ nextScreenKey,
51
+ linkId,
52
+ group,
53
+ ancestorScreenKeys,
54
+ shouldRefresh: !!refreshWillAnimate.get(),
55
+ closing: !!refreshClosing.get(),
56
+ entering: !!refreshEntering.get(),
57
+ animating: !!refreshAnimating.get(),
58
+ progress: refreshProgress.get(),
59
+ linkState: group || ancestorScreenKeys.length ? pairs.get() : undefined,
60
+ });
86
61
  },
87
- (shouldRefresh, prevShouldRefresh) => {
62
+ (refreshSignal, prevRefreshSignal) => {
88
63
  "worklet";
89
64
 
90
- if (!enabled || !shouldRefresh || shouldRefresh === prevShouldRefresh)
91
- return;
92
-
93
- const currentGroupActiveId = group ? getGroupActiveId(group) : null;
94
-
95
- if (group && currentGroupActiveId !== String(id)) {
96
- return;
97
- }
98
-
99
- if (hasNextScreen) {
100
- if (
101
- !nextScreenKey ||
102
- !hasSourceLink(sharedBoundTag, currentScreenKey) ||
103
- !hasDestinationLink(sharedBoundTag, nextScreenKey)
104
- ) {
105
- return;
106
- }
107
-
108
- measureBoundary({ intent: "refresh-source" });
65
+ if (
66
+ !refreshSignal ||
67
+ refreshSignal.signal === prevRefreshSignal?.signal
68
+ ) {
109
69
  return;
110
70
  }
111
71
 
112
72
  measureBoundary({
113
- intent: "refresh-destination",
73
+ type: refreshSignal.type,
74
+ pairKey: refreshSignal.pairKey,
114
75
  });
115
76
  },
116
77
  );
@@ -4,7 +4,9 @@ import { createBoundaryComponent } from "./create-boundary-component";
4
4
 
5
5
  export { createBoundaryComponent };
6
6
 
7
- const BoundaryView = createBoundaryComponent(View);
7
+ const BoundaryView = createBoundaryComponent(View, {
8
+ shouldAutoMeasure: true,
9
+ });
8
10
  const BoundaryTrigger = createBoundaryComponent(Pressable);
9
11
  BoundaryView.displayName = "Transition.Boundary.View";
10
12
  BoundaryTrigger.displayName = "Transition.Boundary.Trigger";
@@ -1,3 +1,4 @@
1
+ import type { ScreenPairKey } from "../../stores/bounds/types";
1
2
  import type { BoundsOptions } from "../../utils/bounds/types/options";
2
3
 
3
4
  export type BoundaryId = string | number;
@@ -15,9 +16,8 @@ export type BoundaryConfigProps = Pick<
15
16
  export interface BoundaryOwnProps extends BoundaryConfigProps {
16
17
  /**
17
18
  * Optional group name for collection/list scenarios.
18
- * When provided, boundaries are tracked as a group and the active member
19
- * re-measures automatically when focus changes within the group.
20
- * The internal tag becomes `group:id`.
19
+ * When provided, concrete boundary entries use `group:id`, while transition
20
+ * links stay keyed by the member `id` inside the active screen pair.
21
21
  */
22
22
  group?: string;
23
23
  /**
@@ -35,12 +35,14 @@ export interface BoundaryOwnProps extends BoundaryConfigProps {
35
35
  export type BoundaryComponentProps<P extends object> = Omit<P, "id"> &
36
36
  BoundaryOwnProps;
37
37
 
38
- export type MeasureIntent =
39
- | "capture-source"
40
- | "complete-destination"
41
- | "refresh-source"
42
- | "refresh-destination";
38
+ export type MeasureTarget =
39
+ | {
40
+ type: "source";
41
+ pairKey: ScreenPairKey;
42
+ }
43
+ | {
44
+ type: "destination";
45
+ pairKey: ScreenPairKey;
46
+ };
43
47
 
44
- export interface MeasureParams {
45
- intent?: MeasureIntent | readonly MeasureIntent[];
46
- }
48
+ export type MeasureBoundary = (target: MeasureTarget) => void;
@@ -0,0 +1,129 @@
1
+ import {
2
+ createPendingPairKey,
3
+ createScreenPairKey,
4
+ getDestinationScreenKeyFromPairKey,
5
+ getSourceScreenKeyFromPairKey,
6
+ } from "../../../stores/bounds/helpers/link-pairs.helpers";
7
+ import {
8
+ getDestination,
9
+ getSource,
10
+ } from "../../../stores/bounds/internals/links";
11
+ import type {
12
+ LinkPairsState,
13
+ ScreenPairKey,
14
+ } from "../../../stores/bounds/types";
15
+
16
+ const findPendingSourcePairKey = (
17
+ linkState: LinkPairsState | undefined,
18
+ linkId: string,
19
+ ): ScreenPairKey | null => {
20
+ "worklet";
21
+ if (!linkState) return null;
22
+
23
+ for (const pairKey in linkState) {
24
+ const sourceScreenKey = getSourceScreenKeyFromPairKey(pairKey);
25
+
26
+ if (pairKey !== createPendingPairKey(sourceScreenKey)) {
27
+ continue;
28
+ }
29
+
30
+ if (linkState[pairKey]?.links?.[linkId]?.source) {
31
+ return pairKey;
32
+ }
33
+ }
34
+
35
+ return null;
36
+ };
37
+
38
+ // Passive Boundary.View sources in nested routes can already live in the final
39
+ // ancestor pair, even before the destination side has attached.
40
+ const findAncestorSourcePairKey = (
41
+ linkState: LinkPairsState | undefined,
42
+ linkId: string,
43
+ destinationScreenKey: string | undefined,
44
+ ): ScreenPairKey | null => {
45
+ "worklet";
46
+ if (!linkState || !destinationScreenKey) return null;
47
+
48
+ for (const pairKey in linkState) {
49
+ if (getDestinationScreenKeyFromPairKey(pairKey) !== destinationScreenKey) {
50
+ continue;
51
+ }
52
+
53
+ if (linkState[pairKey]?.links?.[linkId]?.source) {
54
+ return pairKey;
55
+ }
56
+ }
57
+
58
+ return null;
59
+ };
60
+
61
+ export const getInitialDestinationMeasurePairKey = (params: {
62
+ enabled: boolean;
63
+ currentScreenKey: string;
64
+ preferredSourceScreenKey?: string;
65
+ ancestorScreenKeys?: readonly string[];
66
+ linkId: string;
67
+ linkState?: LinkPairsState;
68
+ }): ScreenPairKey | null => {
69
+ "worklet";
70
+ const {
71
+ enabled,
72
+ currentScreenKey,
73
+ preferredSourceScreenKey,
74
+ ancestorScreenKeys,
75
+ linkId,
76
+ linkState,
77
+ } = params;
78
+
79
+ if (!enabled) {
80
+ return null;
81
+ }
82
+
83
+ // Initial screens inside nested navigators measure concrete child views, but
84
+ // the transition pair belongs to the nearest animated ancestor route.
85
+ const ancestorPairKey = findAncestorSourcePairKey(
86
+ linkState,
87
+ linkId,
88
+ ancestorScreenKeys?.[0],
89
+ );
90
+
91
+ // Trigger sources start as pending screen<> links. Boundary.View sources may
92
+ // already be in the ancestor pair, so only scan pending when needed.
93
+ const pendingSourcePairKey = preferredSourceScreenKey
94
+ ? createPendingPairKey(preferredSourceScreenKey)
95
+ : ancestorPairKey
96
+ ? null
97
+ : findPendingSourcePairKey(linkState, linkId);
98
+
99
+ const sourceScreenKey = preferredSourceScreenKey
100
+ ? preferredSourceScreenKey
101
+ : getSourceScreenKeyFromPairKey(
102
+ ancestorPairKey ?? pendingSourcePairKey ?? "",
103
+ );
104
+
105
+ if (!sourceScreenKey) return null;
106
+
107
+ // Non-nested destinations attach to their own route. Nested initial screens
108
+ // attach to the animated ancestor route unless that pair already exists.
109
+ const destinationScreenKey =
110
+ ancestorPairKey || preferredSourceScreenKey || !ancestorScreenKeys?.[0]
111
+ ? currentScreenKey
112
+ : ancestorScreenKeys[0];
113
+
114
+ const destinationPairKey =
115
+ ancestorPairKey ??
116
+ createScreenPairKey(sourceScreenKey, destinationScreenKey);
117
+
118
+ const hasDestinationLink =
119
+ getDestination(destinationPairKey, linkId) !== null;
120
+
121
+ const hasAttachableSourceLink =
122
+ getSource(destinationPairKey, linkId) !== null ||
123
+ (!!pendingSourcePairKey &&
124
+ getSource(pendingSourcePairKey, linkId) !== null);
125
+
126
+ return hasAttachableSourceLink && !hasDestinationLink
127
+ ? destinationPairKey
128
+ : null;
129
+ };