react-native-screen-transitions 3.6.0-alpha.1 → 3.6.0-alpha.3

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 (513) 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 +27 -34
  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 +4 -4
  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 +17 -19
  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 -51
  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/native-screen.js +2 -13
  26. package/lib/commonjs/shared/components/native-screen.js.map +1 -1
  27. package/lib/commonjs/shared/components/screen-container/layers/content.js +11 -1
  28. package/lib/commonjs/shared/components/screen-container/layers/content.js.map +1 -1
  29. package/lib/commonjs/shared/constants.js +5 -12
  30. package/lib/commonjs/shared/constants.js.map +1 -1
  31. package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js +35 -0
  32. package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js.map +1 -0
  33. package/lib/commonjs/shared/providers/register-bounds.provider.js +48 -55
  34. package/lib/commonjs/shared/providers/register-bounds.provider.js.map +1 -1
  35. package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js +1 -10
  36. package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js.map +1 -1
  37. package/lib/commonjs/shared/providers/screen/animation/helpers/build-screen-transition-options.js +1 -0
  38. package/lib/commonjs/shared/providers/screen/animation/helpers/build-screen-transition-options.js.map +1 -1
  39. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +26 -8
  40. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
  41. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +1 -2
  42. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  43. package/lib/commonjs/shared/providers/screen/animation/helpers/selected-interpolator-options.js +1 -1
  44. package/lib/commonjs/shared/providers/screen/animation/helpers/selected-interpolator-options.js.map +1 -1
  45. package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js +3 -4
  46. package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -1
  47. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-activation.js +2 -2
  48. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-activation.js.map +1 -1
  49. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-lifecycle.js +9 -2
  50. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-lifecycle.js.map +1 -1
  51. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-release.js +19 -0
  52. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-release.js.map +1 -1
  53. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-reset.js +2 -0
  54. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-reset.js.map +1 -1
  55. package/lib/commonjs/shared/providers/screen/gestures/pan/use-pan-behavior.js +2 -2
  56. package/lib/commonjs/shared/providers/screen/gestures/pan/use-pan-behavior.js.map +1 -1
  57. package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-activation.js +2 -2
  58. package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-activation.js.map +1 -1
  59. package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-lifecycle.js +1 -0
  60. package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-lifecycle.js.map +1 -1
  61. package/lib/commonjs/shared/providers/screen/gestures/pinch/use-pinch-behavior.js +2 -2
  62. package/lib/commonjs/shared/providers/screen/gestures/pinch/use-pinch-behavior.js.map +1 -1
  63. package/lib/commonjs/shared/providers/screen/gestures/shared/physics.js +18 -2
  64. package/lib/commonjs/shared/providers/screen/gestures/shared/physics.js.map +1 -1
  65. package/lib/commonjs/shared/providers/screen/gestures/shared/policy.js +1 -5
  66. package/lib/commonjs/shared/providers/screen/gestures/shared/policy.js.map +1 -1
  67. package/lib/commonjs/shared/providers/screen/options/helpers.js +3 -1
  68. package/lib/commonjs/shared/providers/screen/options/helpers.js.map +1 -1
  69. package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +1 -4
  70. package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
  71. package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js +125 -0
  72. package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -0
  73. package/lib/commonjs/shared/stores/bounds/index.js +6 -12
  74. package/lib/commonjs/shared/stores/bounds/index.js.map +1 -1
  75. package/lib/commonjs/shared/stores/bounds/internals/clear.js +13 -21
  76. package/lib/commonjs/shared/stores/bounds/internals/clear.js.map +1 -1
  77. package/lib/commonjs/shared/stores/bounds/internals/entries.js +49 -9
  78. package/lib/commonjs/shared/stores/bounds/internals/entries.js.map +1 -1
  79. package/lib/commonjs/shared/stores/bounds/internals/links.js +143 -82
  80. package/lib/commonjs/shared/stores/bounds/internals/links.js.map +1 -1
  81. package/lib/commonjs/shared/stores/bounds/internals/resolver.js +17 -43
  82. package/lib/commonjs/shared/stores/bounds/internals/resolver.js.map +1 -1
  83. package/lib/commonjs/shared/stores/bounds/internals/state.js +26 -3
  84. package/lib/commonjs/shared/stores/bounds/internals/state.js.map +1 -1
  85. package/lib/commonjs/shared/stores/gesture.store.js +2 -0
  86. package/lib/commonjs/shared/stores/gesture.store.js.map +1 -1
  87. package/lib/commonjs/shared/types/gesture.types.js +2 -2
  88. package/lib/commonjs/shared/types/gesture.types.js.map +1 -1
  89. package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js +2 -1
  90. package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
  91. package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js +6 -5
  92. package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
  93. package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js +21 -8
  94. package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
  95. package/lib/commonjs/shared/utils/bounds/helpers/resolve-bounds-pair-key.js +23 -0
  96. package/lib/commonjs/shared/utils/bounds/helpers/resolve-bounds-pair-key.js.map +1 -0
  97. package/lib/commonjs/shared/utils/bounds/index.js +3 -2
  98. package/lib/commonjs/shared/utils/bounds/index.js.map +1 -1
  99. package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js +120 -205
  100. package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
  101. package/lib/commonjs/shared/utils/bounds/navigation/reveal/config.js +15 -2
  102. package/lib/commonjs/shared/utils/bounds/navigation/reveal/config.js.map +1 -1
  103. package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js +175 -14
  104. package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
  105. package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js +2 -2
  106. package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
  107. package/lib/commonjs/shared/utils/navigation/resolve-scene-neighbors.js +20 -19
  108. package/lib/commonjs/shared/utils/navigation/resolve-scene-neighbors.js.map +1 -1
  109. package/lib/module/component-stack/components/component-screen.js +2 -8
  110. package/lib/module/component-stack/components/component-screen.js.map +1 -1
  111. package/lib/module/shared/components/create-boundary-component/create-boundary-component.js +27 -34
  112. package/lib/module/shared/components/create-boundary-component/create-boundary-component.js.map +1 -1
  113. package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js +4 -4
  114. package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +1 -1
  115. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js +18 -20
  116. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js.map +1 -1
  117. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js +28 -8
  118. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js.map +1 -1
  119. package/lib/module/shared/components/create-boundary-component/hooks/use-measurer.js +22 -50
  120. package/lib/module/shared/components/create-boundary-component/hooks/use-measurer.js.map +1 -1
  121. package/lib/module/shared/components/create-boundary-component/hooks/use-refresh-boundary.js +33 -40
  122. package/lib/module/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map +1 -1
  123. package/lib/module/shared/components/create-boundary-component/index.js +3 -1
  124. package/lib/module/shared/components/create-boundary-component/index.js.map +1 -1
  125. package/lib/module/shared/components/create-boundary-component/utils/destination-signals.js +70 -0
  126. package/lib/module/shared/components/create-boundary-component/utils/destination-signals.js.map +1 -0
  127. package/lib/module/shared/components/create-boundary-component/{hooks/helpers/scroll-measurement.js → utils/measured-bounds.js} +13 -1
  128. package/lib/module/shared/components/create-boundary-component/utils/measured-bounds.js.map +1 -0
  129. package/lib/module/shared/components/create-boundary-component/utils/refresh-signals.js +98 -0
  130. package/lib/module/shared/components/create-boundary-component/utils/refresh-signals.js.map +1 -0
  131. package/lib/module/shared/components/create-boundary-component/utils/source-signals.js +47 -0
  132. package/lib/module/shared/components/create-boundary-component/utils/source-signals.js.map +1 -0
  133. package/lib/module/shared/components/native-screen.js +3 -14
  134. package/lib/module/shared/components/native-screen.js.map +1 -1
  135. package/lib/module/shared/components/screen-container/layers/content.js +13 -3
  136. package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
  137. package/lib/module/shared/constants.js +4 -11
  138. package/lib/module/shared/constants.js.map +1 -1
  139. package/lib/module/shared/providers/helpers/measured-bounds-writes.js +30 -0
  140. package/lib/module/shared/providers/helpers/measured-bounds-writes.js.map +1 -0
  141. package/lib/module/shared/providers/register-bounds.provider.js +48 -55
  142. package/lib/module/shared/providers/register-bounds.provider.js.map +1 -1
  143. package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js +1 -10
  144. package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js.map +1 -1
  145. package/lib/module/shared/providers/screen/animation/helpers/build-screen-transition-options.js +1 -0
  146. package/lib/module/shared/providers/screen/animation/helpers/build-screen-transition-options.js.map +1 -1
  147. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +26 -3
  148. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
  149. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +1 -2
  150. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  151. package/lib/module/shared/providers/screen/animation/helpers/selected-interpolator-options.js +1 -1
  152. package/lib/module/shared/providers/screen/animation/helpers/selected-interpolator-options.js.map +1 -1
  153. package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js +3 -4
  154. package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -1
  155. package/lib/module/shared/providers/screen/gestures/pan/pan-activation.js +2 -2
  156. package/lib/module/shared/providers/screen/gestures/pan/pan-activation.js.map +1 -1
  157. package/lib/module/shared/providers/screen/gestures/pan/pan-lifecycle.js +10 -3
  158. package/lib/module/shared/providers/screen/gestures/pan/pan-lifecycle.js.map +1 -1
  159. package/lib/module/shared/providers/screen/gestures/pan/pan-release.js +20 -1
  160. package/lib/module/shared/providers/screen/gestures/pan/pan-release.js.map +1 -1
  161. package/lib/module/shared/providers/screen/gestures/pan/pan-reset.js +2 -0
  162. package/lib/module/shared/providers/screen/gestures/pan/pan-reset.js.map +1 -1
  163. package/lib/module/shared/providers/screen/gestures/pan/use-pan-behavior.js +3 -3
  164. package/lib/module/shared/providers/screen/gestures/pan/use-pan-behavior.js.map +1 -1
  165. package/lib/module/shared/providers/screen/gestures/pinch/pinch-activation.js +3 -3
  166. package/lib/module/shared/providers/screen/gestures/pinch/pinch-activation.js.map +1 -1
  167. package/lib/module/shared/providers/screen/gestures/pinch/pinch-lifecycle.js +1 -0
  168. package/lib/module/shared/providers/screen/gestures/pinch/pinch-lifecycle.js.map +1 -1
  169. package/lib/module/shared/providers/screen/gestures/pinch/use-pinch-behavior.js +3 -3
  170. package/lib/module/shared/providers/screen/gestures/pinch/use-pinch-behavior.js.map +1 -1
  171. package/lib/module/shared/providers/screen/gestures/shared/physics.js +15 -0
  172. package/lib/module/shared/providers/screen/gestures/shared/physics.js.map +1 -1
  173. package/lib/module/shared/providers/screen/gestures/shared/policy.js +3 -3
  174. package/lib/module/shared/providers/screen/gestures/shared/policy.js.map +1 -1
  175. package/lib/module/shared/providers/screen/options/helpers.js +3 -1
  176. package/lib/module/shared/providers/screen/options/helpers.js.map +1 -1
  177. package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +1 -4
  178. package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
  179. package/lib/module/shared/providers/stack/direct.provider.js.map +1 -1
  180. package/lib/module/shared/providers/stack/managed.provider.js.map +1 -1
  181. package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js +105 -0
  182. package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -0
  183. package/lib/module/shared/stores/bounds/index.js +7 -13
  184. package/lib/module/shared/stores/bounds/index.js.map +1 -1
  185. package/lib/module/shared/stores/bounds/internals/clear.js +14 -22
  186. package/lib/module/shared/stores/bounds/internals/clear.js.map +1 -1
  187. package/lib/module/shared/stores/bounds/internals/entries.js +49 -9
  188. package/lib/module/shared/stores/bounds/internals/entries.js.map +1 -1
  189. package/lib/module/shared/stores/bounds/internals/links.js +139 -80
  190. package/lib/module/shared/stores/bounds/internals/links.js.map +1 -1
  191. package/lib/module/shared/stores/bounds/internals/resolver.js +17 -43
  192. package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -1
  193. package/lib/module/shared/stores/bounds/internals/state.js +25 -2
  194. package/lib/module/shared/stores/bounds/internals/state.js.map +1 -1
  195. package/lib/module/shared/stores/gesture.store.js +2 -0
  196. package/lib/module/shared/stores/gesture.store.js.map +1 -1
  197. package/lib/module/shared/types/animation.types.js +0 -4
  198. package/lib/module/shared/types/animation.types.js.map +1 -1
  199. package/lib/module/shared/types/bounds.types.js.map +1 -1
  200. package/lib/module/shared/types/gesture.types.js +0 -1
  201. package/lib/module/shared/types/gesture.types.js.map +1 -1
  202. package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js +2 -1
  203. package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
  204. package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js +6 -5
  205. package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
  206. package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js +21 -8
  207. package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
  208. package/lib/module/shared/utils/bounds/helpers/resolve-bounds-pair-key.js +18 -0
  209. package/lib/module/shared/utils/bounds/helpers/resolve-bounds-pair-key.js.map +1 -0
  210. package/lib/module/shared/utils/bounds/index.js +3 -2
  211. package/lib/module/shared/utils/bounds/index.js.map +1 -1
  212. package/lib/module/shared/utils/bounds/navigation/reveal/build.js +120 -205
  213. package/lib/module/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
  214. package/lib/module/shared/utils/bounds/navigation/reveal/config.js +14 -1
  215. package/lib/module/shared/utils/bounds/navigation/reveal/config.js.map +1 -1
  216. package/lib/module/shared/utils/bounds/navigation/reveal/math.js +163 -12
  217. package/lib/module/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
  218. package/lib/module/shared/utils/bounds/navigation/zoom/build.js +2 -2
  219. package/lib/module/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
  220. package/lib/module/shared/utils/navigation/resolve-scene-neighbors.js +20 -19
  221. package/lib/module/shared/utils/navigation/resolve-scene-neighbors.js.map +1 -1
  222. package/lib/typescript/component-stack/components/component-screen.d.ts.map +1 -1
  223. package/lib/typescript/shared/components/create-boundary-component/components/boundary-target.d.ts +4 -207
  224. package/lib/typescript/shared/components/create-boundary-component/components/boundary-target.d.ts.map +1 -1
  225. package/lib/typescript/shared/components/create-boundary-component/create-boundary-component.d.ts +1 -0
  226. package/lib/typescript/shared/components/create-boundary-component/create-boundary-component.d.ts.map +1 -1
  227. package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-presence.d.ts +1 -1
  228. package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-presence.d.ts.map +1 -1
  229. package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.d.ts +5 -4
  230. package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.d.ts.map +1 -1
  231. package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-source-measurement.d.ts +6 -2
  232. package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-source-measurement.d.ts.map +1 -1
  233. package/lib/typescript/shared/components/create-boundary-component/hooks/use-measurer.d.ts +5 -4
  234. package/lib/typescript/shared/components/create-boundary-component/hooks/use-measurer.d.ts.map +1 -1
  235. package/lib/typescript/shared/components/create-boundary-component/hooks/use-refresh-boundary.d.ts +7 -7
  236. package/lib/typescript/shared/components/create-boundary-component/hooks/use-refresh-boundary.d.ts.map +1 -1
  237. package/lib/typescript/shared/components/create-boundary-component/index.d.ts +2 -2
  238. package/lib/typescript/shared/components/create-boundary-component/index.d.ts.map +1 -1
  239. package/lib/typescript/shared/components/create-boundary-component/types.d.ts +11 -7
  240. package/lib/typescript/shared/components/create-boundary-component/types.d.ts.map +1 -1
  241. package/lib/typescript/shared/components/create-boundary-component/utils/destination-signals.d.ts +10 -0
  242. package/lib/typescript/shared/components/create-boundary-component/utils/destination-signals.d.ts.map +1 -0
  243. package/lib/typescript/shared/components/create-boundary-component/{hooks/helpers/scroll-measurement.d.ts → utils/measured-bounds.d.ts} +3 -2
  244. package/lib/typescript/shared/components/create-boundary-component/utils/measured-bounds.d.ts.map +1 -0
  245. package/lib/typescript/shared/components/create-boundary-component/utils/refresh-signals.d.ts +22 -0
  246. package/lib/typescript/shared/components/create-boundary-component/utils/refresh-signals.d.ts.map +1 -0
  247. package/lib/typescript/shared/components/create-boundary-component/utils/source-signals.d.ts +16 -0
  248. package/lib/typescript/shared/components/create-boundary-component/utils/source-signals.d.ts.map +1 -0
  249. package/lib/typescript/shared/components/native-screen.d.ts.map +1 -1
  250. package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts +1 -1
  251. package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts.map +1 -1
  252. package/lib/typescript/shared/components/scene-view.d.ts +1 -1
  253. package/lib/typescript/shared/components/scene-view.d.ts.map +1 -1
  254. package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts +2 -2
  255. package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -1
  256. package/lib/typescript/shared/components/screen-container/layers/content.d.ts.map +1 -1
  257. package/lib/typescript/shared/constants.d.ts +1 -6
  258. package/lib/typescript/shared/constants.d.ts.map +1 -1
  259. package/lib/typescript/shared/index.d.ts +3 -3
  260. package/lib/typescript/shared/index.d.ts.map +1 -1
  261. package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts +21 -0
  262. package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts.map +1 -0
  263. package/lib/typescript/shared/providers/register-bounds.provider.d.ts.map +1 -1
  264. package/lib/typescript/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.d.ts.map +1 -1
  265. package/lib/typescript/shared/providers/screen/animation/helpers/build-screen-transition-options.d.ts.map +1 -1
  266. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts +1 -2
  267. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts.map +1 -1
  268. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/types.d.ts +1 -1
  269. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/types.d.ts.map +1 -1
  270. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts +1 -1
  271. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
  272. package/lib/typescript/shared/providers/screen/animation/helpers/selected-interpolator-options.d.ts.map +1 -1
  273. package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts +1 -1
  274. package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts.map +1 -1
  275. package/lib/typescript/shared/providers/screen/gestures/pan/pan-activation.d.ts.map +1 -1
  276. package/lib/typescript/shared/providers/screen/gestures/pan/pan-lifecycle.d.ts.map +1 -1
  277. package/lib/typescript/shared/providers/screen/gestures/pan/pan-release.d.ts.map +1 -1
  278. package/lib/typescript/shared/providers/screen/gestures/pan/pan-reset.d.ts +2 -1
  279. package/lib/typescript/shared/providers/screen/gestures/pan/pan-reset.d.ts.map +1 -1
  280. package/lib/typescript/shared/providers/screen/gestures/pan/use-pan-behavior.d.ts.map +1 -1
  281. package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-activation.d.ts.map +1 -1
  282. package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-lifecycle.d.ts.map +1 -1
  283. package/lib/typescript/shared/providers/screen/gestures/pinch/use-pinch-behavior.d.ts.map +1 -1
  284. package/lib/typescript/shared/providers/screen/gestures/shared/physics.d.ts +7 -0
  285. package/lib/typescript/shared/providers/screen/gestures/shared/physics.d.ts.map +1 -1
  286. package/lib/typescript/shared/providers/screen/gestures/shared/policy.d.ts +0 -10
  287. package/lib/typescript/shared/providers/screen/gestures/shared/policy.d.ts.map +1 -1
  288. package/lib/typescript/shared/providers/screen/gestures/types.d.ts +2 -0
  289. package/lib/typescript/shared/providers/screen/gestures/types.d.ts.map +1 -1
  290. package/lib/typescript/shared/providers/screen/options/helpers.d.ts.map +1 -1
  291. package/lib/typescript/shared/providers/screen/options/types.d.ts +1 -0
  292. package/lib/typescript/shared/providers/screen/options/types.d.ts.map +1 -1
  293. package/lib/typescript/shared/providers/screen/styles/components/maybe-floating-container.d.ts +1 -1
  294. package/lib/typescript/shared/providers/screen/styles/components/maybe-floating-container.d.ts.map +1 -1
  295. package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -1
  296. package/lib/typescript/shared/providers/stack/direct.provider.d.ts +1 -1
  297. package/lib/typescript/shared/providers/stack/direct.provider.d.ts.map +1 -1
  298. package/lib/typescript/shared/providers/stack/managed.provider.d.ts +1 -1
  299. package/lib/typescript/shared/providers/stack/managed.provider.d.ts.map +1 -1
  300. package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts +18 -0
  301. package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts.map +1 -0
  302. package/lib/typescript/shared/stores/bounds/index.d.ts +6 -12
  303. package/lib/typescript/shared/stores/bounds/index.d.ts.map +1 -1
  304. package/lib/typescript/shared/stores/bounds/internals/clear.d.ts.map +1 -1
  305. package/lib/typescript/shared/stores/bounds/internals/entries.d.ts.map +1 -1
  306. package/lib/typescript/shared/stores/bounds/internals/links.d.ts +13 -10
  307. package/lib/typescript/shared/stores/bounds/internals/links.d.ts.map +1 -1
  308. package/lib/typescript/shared/stores/bounds/internals/resolver.d.ts.map +1 -1
  309. package/lib/typescript/shared/stores/bounds/internals/state.d.ts +26 -5
  310. package/lib/typescript/shared/stores/bounds/internals/state.d.ts.map +1 -1
  311. package/lib/typescript/shared/stores/bounds/types.d.ts +14 -7
  312. package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
  313. package/lib/typescript/shared/stores/gesture.store.d.ts +1 -0
  314. package/lib/typescript/shared/stores/gesture.store.d.ts.map +1 -1
  315. package/lib/typescript/shared/types/animation.types.d.ts +4 -19
  316. package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
  317. package/lib/typescript/shared/types/bounds.types.d.ts +69 -1
  318. package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
  319. package/lib/typescript/shared/types/gesture.types.d.ts +8 -1
  320. package/lib/typescript/shared/types/gesture.types.d.ts.map +1 -1
  321. package/lib/typescript/shared/types/index.d.ts +2 -2
  322. package/lib/typescript/shared/types/index.d.ts.map +1 -1
  323. package/lib/typescript/shared/types/screen.types.d.ts +4 -14
  324. package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
  325. package/lib/typescript/shared/utils/bounds/helpers/create-bounds-accessor-core.d.ts.map +1 -1
  326. package/lib/typescript/shared/utils/bounds/helpers/create-link-accessor.d.ts.map +1 -1
  327. package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts +1 -1
  328. package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts.map +1 -1
  329. package/lib/typescript/shared/utils/bounds/helpers/resolve-bounds-pair-key.d.ts +4 -0
  330. package/lib/typescript/shared/utils/bounds/helpers/resolve-bounds-pair-key.d.ts.map +1 -0
  331. package/lib/typescript/shared/utils/bounds/index.d.ts.map +1 -1
  332. package/lib/typescript/shared/utils/bounds/navigation/reveal/build.d.ts +1 -1
  333. package/lib/typescript/shared/utils/bounds/navigation/reveal/build.d.ts.map +1 -1
  334. package/lib/typescript/shared/utils/bounds/navigation/reveal/config.d.ts +14 -1
  335. package/lib/typescript/shared/utils/bounds/navigation/reveal/config.d.ts.map +1 -1
  336. package/lib/typescript/shared/utils/bounds/navigation/reveal/math.d.ts +58 -7
  337. package/lib/typescript/shared/utils/bounds/navigation/reveal/math.d.ts.map +1 -1
  338. package/lib/typescript/shared/utils/bounds/navigation/reveal/types.d.ts +2 -1
  339. package/lib/typescript/shared/utils/bounds/navigation/reveal/types.d.ts.map +1 -1
  340. package/lib/typescript/shared/utils/bounds/types/options.d.ts +2 -3
  341. package/lib/typescript/shared/utils/bounds/types/options.d.ts.map +1 -1
  342. package/lib/typescript/shared/utils/navigation/resolve-scene-neighbors.d.ts +3 -2
  343. package/lib/typescript/shared/utils/navigation/resolve-scene-neighbors.d.ts.map +1 -1
  344. package/package.json +4 -3
  345. package/src/component-stack/components/component-screen.tsx +3 -11
  346. package/src/shared/components/create-boundary-component/create-boundary-component.tsx +30 -27
  347. package/src/shared/components/create-boundary-component/hooks/use-boundary-presence.ts +5 -5
  348. package/src/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.ts +25 -24
  349. package/src/shared/components/create-boundary-component/hooks/use-initial-source-measurement.ts +41 -11
  350. package/src/shared/components/create-boundary-component/hooks/use-measurer.ts +49 -64
  351. package/src/shared/components/create-boundary-component/hooks/use-refresh-boundary.ts +44 -83
  352. package/src/shared/components/create-boundary-component/index.tsx +3 -1
  353. package/src/shared/components/create-boundary-component/types.ts +13 -11
  354. package/src/shared/components/create-boundary-component/utils/destination-signals.ts +129 -0
  355. package/src/shared/components/create-boundary-component/{hooks/helpers/scroll-measurement.ts → utils/measured-bounds.ts} +25 -1
  356. package/src/shared/components/create-boundary-component/utils/refresh-signals.ts +164 -0
  357. package/src/shared/components/create-boundary-component/utils/source-signals.ts +72 -0
  358. package/src/shared/components/native-screen.tsx +3 -12
  359. package/src/shared/components/screen-container/layers/content.tsx +21 -2
  360. package/src/shared/constants.ts +1 -9
  361. package/src/shared/index.ts +0 -3
  362. package/src/shared/providers/helpers/measured-bounds-writes.ts +67 -0
  363. package/src/shared/providers/register-bounds.provider.tsx +68 -91
  364. package/src/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.ts +0 -14
  365. package/src/shared/providers/screen/animation/helpers/build-screen-transition-options.ts +1 -0
  366. package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/index.ts +49 -4
  367. package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/types.ts +1 -1
  368. package/src/shared/providers/screen/animation/helpers/pipeline.ts +2 -5
  369. package/src/shared/providers/screen/animation/helpers/selected-interpolator-options.ts +1 -0
  370. package/src/shared/providers/screen/animation/helpers/use-build-transition-state.ts +3 -12
  371. package/src/shared/providers/screen/gestures/pan/pan-activation.ts +4 -1
  372. package/src/shared/providers/screen/gestures/pan/pan-lifecycle.ts +18 -2
  373. package/src/shared/providers/screen/gestures/pan/pan-release.ts +33 -0
  374. package/src/shared/providers/screen/gestures/pan/pan-reset.ts +3 -0
  375. package/src/shared/providers/screen/gestures/pan/use-pan-behavior.ts +9 -6
  376. package/src/shared/providers/screen/gestures/pinch/pinch-activation.ts +5 -2
  377. package/src/shared/providers/screen/gestures/pinch/pinch-lifecycle.ts +1 -0
  378. package/src/shared/providers/screen/gestures/pinch/use-pinch-behavior.ts +9 -6
  379. package/src/shared/providers/screen/gestures/shared/physics.ts +25 -0
  380. package/src/shared/providers/screen/gestures/shared/policy.ts +3 -5
  381. package/src/shared/providers/screen/gestures/types.ts +2 -0
  382. package/src/shared/providers/screen/options/helpers.ts +9 -0
  383. package/src/shared/providers/screen/options/types.ts +1 -0
  384. package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +0 -3
  385. package/src/shared/providers/stack/direct.provider.tsx +1 -1
  386. package/src/shared/providers/stack/managed.provider.tsx +1 -1
  387. package/src/shared/stores/bounds/helpers/link-pairs.helpers.ts +161 -0
  388. package/src/shared/stores/bounds/index.ts +10 -20
  389. package/src/shared/stores/bounds/internals/clear.ts +17 -41
  390. package/src/shared/stores/bounds/internals/entries.ts +56 -13
  391. package/src/shared/stores/bounds/internals/links.ts +222 -113
  392. package/src/shared/stores/bounds/internals/resolver.ts +23 -87
  393. package/src/shared/stores/bounds/internals/state.ts +27 -5
  394. package/src/shared/stores/bounds/types.ts +17 -7
  395. package/src/shared/stores/gesture.store.ts +3 -0
  396. package/src/shared/types/animation.types.ts +4 -23
  397. package/src/shared/types/bounds.types.ts +72 -1
  398. package/src/shared/types/gesture.types.ts +8 -2
  399. package/src/shared/types/index.ts +1 -4
  400. package/src/shared/types/screen.types.ts +4 -14
  401. package/src/shared/utils/bounds/helpers/create-bounds-accessor-core.ts +1 -0
  402. package/src/shared/utils/bounds/helpers/create-link-accessor.ts +6 -6
  403. package/src/shared/utils/bounds/helpers/prepare-bound-styles.ts +20 -11
  404. package/src/shared/utils/bounds/helpers/resolve-bounds-pair-key.ts +22 -0
  405. package/src/shared/utils/bounds/index.ts +3 -1
  406. package/src/shared/utils/bounds/navigation/reveal/build.ts +198 -308
  407. package/src/shared/utils/bounds/navigation/reveal/config.ts +20 -1
  408. package/src/shared/utils/bounds/navigation/reveal/math.ts +264 -18
  409. package/src/shared/utils/bounds/navigation/reveal/types.ts +2 -0
  410. package/src/shared/utils/bounds/navigation/zoom/build.ts +2 -2
  411. package/src/shared/utils/bounds/types/options.ts +2 -3
  412. package/src/shared/utils/navigation/resolve-scene-neighbors.ts +36 -23
  413. package/lib/commonjs/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js +0 -43
  414. package/lib/commonjs/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js.map +0 -1
  415. package/lib/commonjs/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js +0 -17
  416. package/lib/commonjs/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js.map +0 -1
  417. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js +0 -28
  418. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js.map +0 -1
  419. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +0 -75
  420. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +0 -1
  421. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement.js +0 -20
  422. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement.js.map +0 -1
  423. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/scroll-measurement.js.map +0 -1
  424. package/lib/commonjs/shared/components/create-boundary-component/utils/build-boundary-match-key.js +0 -16
  425. package/lib/commonjs/shared/components/create-boundary-component/utils/build-boundary-match-key.js.map +0 -1
  426. package/lib/commonjs/shared/providers/layout-anchor.provider.js +0 -86
  427. package/lib/commonjs/shared/providers/layout-anchor.provider.js.map +0 -1
  428. package/lib/commonjs/shared/stores/bounds/helpers/entries.helpers.js +0 -49
  429. package/lib/commonjs/shared/stores/bounds/helpers/entries.helpers.js.map +0 -1
  430. package/lib/commonjs/shared/stores/bounds/helpers/find-latest.js +0 -25
  431. package/lib/commonjs/shared/stores/bounds/helpers/find-latest.js.map +0 -1
  432. package/lib/commonjs/shared/stores/bounds/helpers/groups.helpers.js +0 -30
  433. package/lib/commonjs/shared/stores/bounds/helpers/groups.helpers.js.map +0 -1
  434. package/lib/commonjs/shared/stores/bounds/helpers/link.helpers.js +0 -79
  435. package/lib/commonjs/shared/stores/bounds/helpers/link.helpers.js.map +0 -1
  436. package/lib/commonjs/shared/stores/bounds/helpers/matching.js +0 -13
  437. package/lib/commonjs/shared/stores/bounds/helpers/matching.js.map +0 -1
  438. package/lib/commonjs/shared/stores/bounds/helpers/tag-state.helpers.js +0 -30
  439. package/lib/commonjs/shared/stores/bounds/helpers/tag-state.helpers.js.map +0 -1
  440. package/lib/commonjs/shared/stores/bounds/internals/groups.js +0 -102
  441. package/lib/commonjs/shared/stores/bounds/internals/groups.js.map +0 -1
  442. package/lib/module/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js +0 -38
  443. package/lib/module/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js.map +0 -1
  444. package/lib/module/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js +0 -12
  445. package/lib/module/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js.map +0 -1
  446. package/lib/module/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js +0 -23
  447. package/lib/module/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js.map +0 -1
  448. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +0 -68
  449. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +0 -1
  450. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement.js +0 -15
  451. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement.js.map +0 -1
  452. package/lib/module/shared/components/create-boundary-component/hooks/helpers/scroll-measurement.js.map +0 -1
  453. package/lib/module/shared/components/create-boundary-component/utils/build-boundary-match-key.js +0 -12
  454. package/lib/module/shared/components/create-boundary-component/utils/build-boundary-match-key.js.map +0 -1
  455. package/lib/module/shared/providers/layout-anchor.provider.js +0 -80
  456. package/lib/module/shared/providers/layout-anchor.provider.js.map +0 -1
  457. package/lib/module/shared/stores/bounds/helpers/entries.helpers.js +0 -42
  458. package/lib/module/shared/stores/bounds/helpers/entries.helpers.js.map +0 -1
  459. package/lib/module/shared/stores/bounds/helpers/find-latest.js +0 -19
  460. package/lib/module/shared/stores/bounds/helpers/find-latest.js.map +0 -1
  461. package/lib/module/shared/stores/bounds/helpers/groups.helpers.js +0 -23
  462. package/lib/module/shared/stores/bounds/helpers/groups.helpers.js.map +0 -1
  463. package/lib/module/shared/stores/bounds/helpers/link.helpers.js +0 -69
  464. package/lib/module/shared/stores/bounds/helpers/link.helpers.js.map +0 -1
  465. package/lib/module/shared/stores/bounds/helpers/matching.js +0 -9
  466. package/lib/module/shared/stores/bounds/helpers/matching.js.map +0 -1
  467. package/lib/module/shared/stores/bounds/helpers/tag-state.helpers.js +0 -24
  468. package/lib/module/shared/stores/bounds/helpers/tag-state.helpers.js.map +0 -1
  469. package/lib/module/shared/stores/bounds/internals/groups.js +0 -95
  470. package/lib/module/shared/stores/bounds/internals/groups.js.map +0 -1
  471. package/lib/typescript/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.d.ts +0 -15
  472. package/lib/typescript/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.d.ts.map +0 -1
  473. package/lib/typescript/shared/components/create-boundary-component/helpers/resolve-pending-source-key.d.ts +0 -2
  474. package/lib/typescript/shared/components/create-boundary-component/helpers/resolve-pending-source-key.d.ts.map +0 -1
  475. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.d.ts +0 -22
  476. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.d.ts.map +0 -1
  477. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts +0 -29
  478. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts.map +0 -1
  479. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement.d.ts +0 -3
  480. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement.d.ts.map +0 -1
  481. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/scroll-measurement.d.ts.map +0 -1
  482. package/lib/typescript/shared/components/create-boundary-component/utils/build-boundary-match-key.d.ts +0 -8
  483. package/lib/typescript/shared/components/create-boundary-component/utils/build-boundary-match-key.d.ts.map +0 -1
  484. package/lib/typescript/shared/providers/layout-anchor.provider.d.ts +0 -39
  485. package/lib/typescript/shared/providers/layout-anchor.provider.d.ts.map +0 -1
  486. package/lib/typescript/shared/stores/bounds/helpers/entries.helpers.d.ts +0 -5
  487. package/lib/typescript/shared/stores/bounds/helpers/entries.helpers.d.ts.map +0 -1
  488. package/lib/typescript/shared/stores/bounds/helpers/find-latest.d.ts +0 -3
  489. package/lib/typescript/shared/stores/bounds/helpers/find-latest.d.ts.map +0 -1
  490. package/lib/typescript/shared/stores/bounds/helpers/groups.helpers.d.ts +0 -10
  491. package/lib/typescript/shared/stores/bounds/helpers/groups.helpers.d.ts.map +0 -1
  492. package/lib/typescript/shared/stores/bounds/helpers/link.helpers.d.ts +0 -14
  493. package/lib/typescript/shared/stores/bounds/helpers/link.helpers.d.ts.map +0 -1
  494. package/lib/typescript/shared/stores/bounds/helpers/matching.d.ts +0 -3
  495. package/lib/typescript/shared/stores/bounds/helpers/matching.d.ts.map +0 -1
  496. package/lib/typescript/shared/stores/bounds/helpers/tag-state.helpers.d.ts +0 -5
  497. package/lib/typescript/shared/stores/bounds/helpers/tag-state.helpers.d.ts.map +0 -1
  498. package/lib/typescript/shared/stores/bounds/internals/groups.d.ts +0 -16
  499. package/lib/typescript/shared/stores/bounds/internals/groups.d.ts.map +0 -1
  500. package/src/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.ts +0 -83
  501. package/src/shared/components/create-boundary-component/helpers/resolve-pending-source-key.ts +0 -20
  502. package/src/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.ts +0 -48
  503. package/src/shared/components/create-boundary-component/hooks/helpers/measurement-rules.ts +0 -101
  504. package/src/shared/components/create-boundary-component/hooks/helpers/measurement.ts +0 -25
  505. package/src/shared/components/create-boundary-component/utils/build-boundary-match-key.ts +0 -14
  506. package/src/shared/providers/layout-anchor.provider.tsx +0 -112
  507. package/src/shared/stores/bounds/helpers/entries.helpers.ts +0 -55
  508. package/src/shared/stores/bounds/helpers/find-latest.ts +0 -22
  509. package/src/shared/stores/bounds/helpers/groups.helpers.ts +0 -27
  510. package/src/shared/stores/bounds/helpers/link.helpers.ts +0 -131
  511. package/src/shared/stores/bounds/helpers/matching.ts +0 -11
  512. package/src/shared/stores/bounds/helpers/tag-state.helpers.ts +0 -24
  513. package/src/shared/stores/bounds/internals/groups.ts +0 -116
@@ -5,7 +5,7 @@ import Animated, { runOnUI, useAnimatedRef, useAnimatedStyle } from "react-nativ
5
5
  import { NO_STYLES } from "../../constants";
6
6
  import { useDescriptorDerivations } from "../../providers/screen/descriptors";
7
7
  import { useScreenStyles } from "../../providers/screen/styles";
8
- import { setGroupInitialId } from "../../stores/bounds/internals/groups";
8
+ import { createPendingPairKey } from "../../stores/bounds/helpers/link-pairs.helpers";
9
9
  import { prepareStyleForBounds } from "../../utils/bounds/helpers/styles/styles";
10
10
  import { useBoundaryPresence } from "./hooks/use-boundary-presence";
11
11
  import { useInitialDestinationMeasurement } from "./hooks/use-initial-destination-measurement";
@@ -13,11 +13,11 @@ import { useInitialSourceMeasurement } from "./hooks/use-initial-source-measurem
13
13
  import { useMeasurer } from "./hooks/use-measurer";
14
14
  import { useRefreshBoundary } from "./hooks/use-refresh-boundary";
15
15
  import { BoundaryOwnerProvider, useBoundaryOwner } from "./providers/boundary-owner.provider";
16
- import { buildBoundaryMatchKey } from "./utils/build-boundary-match-key";
17
16
  import { jsx as _jsx } from "react/jsx-runtime";
18
17
  export function createBoundaryComponent(Wrapped, options = {}) {
19
18
  const {
20
- alreadyAnimated = false
19
+ alreadyAnimated = false,
20
+ shouldAutoMeasure = false
21
21
  } = options;
22
22
  const AnimatedComponent = alreadyAnimated ? Wrapped : Animated.createAnimatedComponent(Wrapped);
23
23
  const Inner = /*#__PURE__*/forwardRef((props, forwardedRef) => {
@@ -34,14 +34,13 @@ export function createBoundaryComponent(Wrapped, options = {}) {
34
34
  onPress,
35
35
  ...rest
36
36
  } = props;
37
- const sharedBoundTag = buildBoundaryMatchKey({
38
- group,
39
- id
40
- });
37
+ const linkId = String(id);
38
+ const entryTag = group ? `${group}:${linkId}` : linkId;
41
39
  const {
42
40
  previousScreenKey: preferredSourceScreenKey,
43
41
  currentScreenKey,
44
42
  nextScreenKey,
43
+ ancestorKeys,
45
44
  hasConfiguredInterpolator
46
45
  } = useDescriptorDerivations();
47
46
  const runtimeEnabled = enabled && hasConfiguredInterpolator;
@@ -64,12 +63,12 @@ export function createBoundaryComponent(Wrapped, options = {}) {
64
63
  const associatedStyles = useAnimatedStyle(() => {
65
64
  "worklet";
66
65
 
67
- return stylesMap.get()[sharedBoundTag]?.style ?? NO_STYLES;
66
+ return stylesMap.get()[entryTag]?.style ?? NO_STYLES;
68
67
  });
69
68
  const associatedStackingStyles = useAnimatedStyle(() => {
70
69
  "worklet";
71
70
 
72
- const baseStyle = stylesMap.get()[sharedBoundTag]?.style;
71
+ const baseStyle = stylesMap.get()[entryTag]?.style;
73
72
  const zIndex = baseStyle?.zIndex ?? 0;
74
73
  const elevation = baseStyle?.elevation ?? 0;
75
74
  if (zIndex === 0 && elevation === 0) {
@@ -92,8 +91,9 @@ export function createBoundaryComponent(Wrapped, options = {}) {
92
91
  const preparedStyles = targetPreparedStyles ?? ownerPreparedStyles;
93
92
  const measureBoundary = useMeasurer({
94
93
  enabled,
95
- sharedBoundTag,
96
- preferredSourceScreenKey,
94
+ entryTag,
95
+ linkId,
96
+ group,
97
97
  currentScreenKey,
98
98
  preparedStyles,
99
99
  measuredAnimatedRef: measuredRef
@@ -104,55 +104,48 @@ export function createBoundaryComponent(Wrapped, options = {}) {
104
104
  // matching can resolve across concrete screen keys.
105
105
  useBoundaryPresence({
106
106
  enabled: runtimeEnabled,
107
- sharedBoundTag,
107
+ entryTag,
108
108
  currentScreenKey,
109
109
  boundaryConfig
110
110
  });
111
-
112
- // Initial source measurement: capture source bounds when a matching
113
- // destination appears on the next screen.
111
+ const shouldPassivelyMeasureSource = shouldAutoMeasure && typeof onPress !== "function";
114
112
  useInitialSourceMeasurement({
115
113
  enabled: runtimeEnabled,
116
114
  nextScreenKey,
117
- measureBoundary
115
+ measureBoundary,
116
+ currentScreenKey,
117
+ linkId,
118
+ group,
119
+ shouldAutoMeasure: shouldPassivelyMeasureSource
118
120
  });
119
-
120
- // Initial destination measurement: hold lifecycle start until the first
121
- // valid destination measurement attaches, then release the pending transition.
122
121
  useInitialDestinationMeasurement({
123
- sharedBoundTag,
122
+ linkId,
124
123
  enabled: shouldRunDestinationEffects,
125
124
  currentScreenKey,
126
125
  preferredSourceScreenKey,
126
+ ancestorScreenKeys: ancestorKeys,
127
127
  measureBoundary
128
128
  });
129
-
130
- // Pre-transition measurement path: when this route or its next sibling is
131
- // about to animate, capture or refresh the measurements needed before
132
- // progress or transform state mutates. Grouped sources refresh existing
133
- // links; plain sources only backfill when missing.
134
129
  useRefreshBoundary({
135
130
  enabled: runtimeEnabled,
136
- sharedBoundTag,
137
- id,
138
- group,
139
131
  currentScreenKey,
132
+ preferredSourceScreenKey,
140
133
  nextScreenKey,
141
- hasNextScreen,
134
+ linkId,
135
+ group,
136
+ ancestorScreenKeys: ancestorKeys,
142
137
  measureBoundary
143
138
  });
144
139
  const handlePress = useCallback((...args) => {
145
140
  // Press path has priority: capture source before user onPress/navigation.
146
- if (group) {
147
- runOnUI(setGroupInitialId)(group, String(id));
148
- }
149
141
  runOnUI(measureBoundary)({
150
- intent: "capture-source"
142
+ type: "source",
143
+ pairKey: createPendingPairKey(currentScreenKey)
151
144
  });
152
145
  if (typeof onPress === "function") {
153
146
  onPress(...args);
154
147
  }
155
- }, [group, id, measureBoundary, onPress]);
148
+ }, [measureBoundary, onPress, currentScreenKey]);
156
149
  const resolvedOnPress = typeof onPress === "function" ? handlePress : undefined;
157
150
  useImperativeHandle(forwardedRef, () => ownerRef.current, [ownerRef]);
158
151
  return /*#__PURE__*/_jsx(BoundaryOwnerProvider, {
@@ -1 +1 @@
1
- {"version":3,"names":["forwardRef","memo","useCallback","useImperativeHandle","useMemo","Animated","runOnUI","useAnimatedRef","useAnimatedStyle","NO_STYLES","useDescriptorDerivations","useScreenStyles","setGroupInitialId","prepareStyleForBounds","useBoundaryPresence","useInitialDestinationMeasurement","useInitialSourceMeasurement","useMeasurer","useRefreshBoundary","BoundaryOwnerProvider","useBoundaryOwner","buildBoundaryMatchKey","jsx","_jsx","createBoundaryComponent","Wrapped","options","alreadyAnimated","AnimatedComponent","createAnimatedComponent","Inner","props","forwardedRef","ownerRef","enabled","group","id","anchor","scaleMode","target","method","style","onPress","rest","sharedBoundTag","previousScreenKey","preferredSourceScreenKey","currentScreenKey","nextScreenKey","hasConfiguredInterpolator","runtimeEnabled","hasNextScreen","boundaryConfig","undefined","ownerPreparedStyles","stylesMap","associatedStyles","get","associatedStackingStyles","baseStyle","zIndex","elevation","contextValue","measuredRef","hasActiveTarget","targetPreparedStyles","associatedTargetStyles","preparedStyles","measureBoundary","measuredAnimatedRef","shouldRunDestinationEffects","handlePress","args","String","intent","resolvedOnPress","current","value","children","ref","collapsable"],"sourceRoot":"../../../../../src","sources":["shared/components/create-boundary-component/create-boundary-component.tsx"],"mappings":";;AAAA,SAECA,UAAU,EACVC,IAAI,EACJC,WAAW,EACXC,mBAAmB,EACnBC,OAAO,QACD,OAAO;AAEd,OAAOC,QAAQ,IACdC,OAAO,EACPC,cAAc,EACdC,gBAAgB,QACV,yBAAyB;AAChC,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,wBAAwB,QAAQ,oCAAoC;AAC7E,SAASC,eAAe,QAAQ,+BAA+B;AAC/D,SAASC,iBAAiB,QAAQ,sCAAsC;AACxE,SAASC,qBAAqB,QAAQ,0CAA0C;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,GAAGlB,SAAS;IAExDlD,mBAAmB,CAAC6B,YAAY,EAAE,MAAMC,QAAQ,CAAC2C,OAAc,EAAE,CAChE3C,QAAQ,CACR,CAAC;IAEF,oBACCV,IAAA,CAACJ,qBAAqB;MAAC0D,KAAK,EAAEf,YAAa;MAAAgB,QAAA,eAC1CvD,IAAA,CAACK,iBAAiB;QAAA,GACbe,IAAI;QACRoC,GAAG,EAAE9C,QAAS;QACdQ,KAAK,EAAE,CACNA,KAAK,EACLS,cAAc,GACXc,eAAe,GACdN,wBAAwB,GACxBF,gBAAgB,GACjBH,SAAS,CACX;QACFX,OAAO,EAAEiC,eAAgB;QACzBK,WAAW,EAAE;MAAM,CACnB;IAAC,CACoB,CAAC;EAE1B,CAAC,CAAC;EAEF,oBAAO/E,IAAI,CACVI,QAAQ,CAACwB,uBAAuB,CAACC,KAAK,CACvC,CAAC;AAMF","ignoreList":[]}
1
+ {"version":3,"names":["forwardRef","memo","useCallback","useImperativeHandle","useMemo","Animated","runOnUI","useAnimatedRef","useAnimatedStyle","NO_STYLES","useDescriptorDerivations","useScreenStyles","createPendingPairKey","prepareStyleForBounds","useBoundaryPresence","useInitialDestinationMeasurement","useInitialSourceMeasurement","useMeasurer","useRefreshBoundary","BoundaryOwnerProvider","useBoundaryOwner","jsx","_jsx","createBoundaryComponent","Wrapped","options","alreadyAnimated","shouldAutoMeasure","AnimatedComponent","createAnimatedComponent","Inner","props","forwardedRef","ownerRef","enabled","group","id","anchor","scaleMode","target","method","style","onPress","rest","linkId","String","entryTag","previousScreenKey","preferredSourceScreenKey","currentScreenKey","nextScreenKey","ancestorKeys","hasConfiguredInterpolator","runtimeEnabled","hasNextScreen","boundaryConfig","undefined","ownerPreparedStyles","stylesMap","associatedStyles","get","associatedStackingStyles","baseStyle","zIndex","elevation","contextValue","measuredRef","hasActiveTarget","targetPreparedStyles","associatedTargetStyles","preparedStyles","measureBoundary","measuredAnimatedRef","shouldRunDestinationEffects","shouldPassivelyMeasureSource","ancestorScreenKeys","handlePress","args","type","pairKey","resolvedOnPress","current","value","children","ref","collapsable"],"sourceRoot":"../../../../../src","sources":["shared/components/create-boundary-component/create-boundary-component.tsx"],"mappings":";;AAAA,SAECA,UAAU,EACVC,IAAI,EACJC,WAAW,EACXC,mBAAmB,EACnBC,OAAO,QACD,OAAO;AAEd,OAAOC,QAAQ,IACdC,OAAO,EACPC,cAAc,EACdC,gBAAgB,QACV,yBAAyB;AAChC,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,wBAAwB,QAAQ,oCAAoC;AAC7E,SAASC,eAAe,QAAQ,+BAA+B;AAC/D,SAASC,oBAAoB,QAAQ,gDAAgD;AACrF,SAASC,qBAAqB,QAAQ,0CAA0C;AAChF,SAASC,mBAAmB,QAAQ,+BAA+B;AACnE,SAASC,gCAAgC,QAAQ,6CAA6C;AAC9F,SAASC,2BAA2B,QAAQ,wCAAwC;AACpF,SAASC,WAAW,QAAQ,sBAAsB;AAClD,SAASC,kBAAkB,QAAQ,8BAA8B;AACjE,SACCC,qBAAqB,EACrBC,gBAAgB,QACV,qCAAqC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAQ7C,OAAO,SAASC,uBAAuBA,CACtCC,OAAyB,EACzBC,OAAuC,GAAG,CAAC,CAAC,EAC3C;EACD,MAAM;IAAEC,eAAe,GAAG,KAAK;IAAEC,iBAAiB,GAAG;EAAM,CAAC,GAAGF,OAAO;EACtE,MAAMG,iBAAiB,GAAGF,eAAe,GACtCF,OAAO,GACPnB,QAAQ,CAACwB,uBAAuB,CAACL,OAAO,CAAC;EAE5C,MAAMM,KAAK,gBAAG9B,UAAU,CAGtB,CAAC+B,KAAK,EAAEC,YAAY,KAAK;IAC1B,MAAMC,QAAQ,GAAG1B,cAAc,CAAO,CAAC;IACvC,MAAM;MACL2B,OAAO,GAAG,IAAI;MACdC,KAAK;MACLC,EAAE;MACFC,MAAM;MACNC,SAAS;MACTC,MAAM;MACNC,MAAM;MACNC,KAAK;MACLC,OAAO;MAC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IAEFrD,kBAAkB,CAAC;MAClBgB,OAAO,EAAEmB,cAAc;MACvBJ,gBAAgB;MAChBD,wBAAwB;MACxBE,aAAa;MACbN,MAAM;MACNT,KAAK;MACLwC,kBAAkB,EAAExB,YAAY;MAChCoB;IACD,CAAC,CAAC;IAEF,MAAMK,WAAW,GAAG1E,WAAW,CAC9B,CAAC,GAAG2E,IAAe,KAAK;MACvB;MACAvE,OAAO,CAACiE,eAAe,CAAC,CAAC;QACxBO,IAAI,EAAE,QAAQ;QACdC,OAAO,EAAEnE,oBAAoB,CAACqC,gBAAgB;MAC/C,CAAC,CAAC;MAEF,IAAI,OAAOP,OAAO,KAAK,UAAU,EAAE;QAClCA,OAAO,CAAC,GAAGmC,IAAI,CAAC;MACjB;IACD,CAAC,EACD,CAACN,eAAe,EAAE7B,OAAO,EAAEO,gBAAgB,CAC5C,CAAC;IAED,MAAM+B,eAAe,GACpB,OAAOtC,OAAO,KAAK,UAAU,GAAGkC,WAAW,GAAGpB,SAAS;IAExDrD,mBAAmB,CAAC6B,YAAY,EAAE,MAAMC,QAAQ,CAACgD,OAAc,EAAE,CAChEhD,QAAQ,CACR,CAAC;IAEF,oBACCX,IAAA,CAACH,qBAAqB;MAAC+D,KAAK,EAAEjB,YAAa;MAAAkB,QAAA,eAC1C7D,IAAA,CAACM,iBAAiB;QAAA,GACbe,IAAI;QACRyC,GAAG,EAAEnD,QAAS;QACdQ,KAAK,EAAE,CACNA,KAAK,EACLY,cAAc,GACXc,eAAe,GACdN,wBAAwB,GACxBF,gBAAgB,GACjBH,SAAS,CACX;QACFd,OAAO,EAAEsC,eAAgB;QACzBK,WAAW,EAAE;MAAM,CACnB;IAAC,CACoB,CAAC;EAE1B,CAAC,CAAC;EAEF,oBAAOpF,IAAI,CACVI,QAAQ,CAACwB,uBAAuB,CAACC,KAAK,CACvC,CAAC;AAMF","ignoreList":[]}
@@ -6,18 +6,18 @@ import { removeEntry, setEntry } from "../../../stores/bounds/internals/entries"
6
6
  export const useBoundaryPresence = params => {
7
7
  const {
8
8
  enabled,
9
- sharedBoundTag,
9
+ entryTag,
10
10
  currentScreenKey,
11
11
  boundaryConfig
12
12
  } = params;
13
13
  useLayoutEffect(() => {
14
14
  if (!enabled) return;
15
- runOnUI(setEntry)(sharedBoundTag, currentScreenKey, {
15
+ runOnUI(setEntry)(entryTag, currentScreenKey, {
16
16
  boundaryConfig
17
17
  });
18
18
  return () => {
19
- runOnUI(removeEntry)(sharedBoundTag, currentScreenKey);
19
+ runOnUI(removeEntry)(entryTag, currentScreenKey);
20
20
  };
21
- }, [enabled, sharedBoundTag, currentScreenKey, boundaryConfig]);
21
+ }, [enabled, entryTag, currentScreenKey, boundaryConfig]);
22
22
  };
23
23
  //# sourceMappingURL=use-boundary-presence.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useLayoutEffect","runOnUI","removeEntry","setEntry","useBoundaryPresence","params","enabled","sharedBoundTag","currentScreenKey","boundaryConfig"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-boundary-presence.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,OAAO;AACvC,SAASC,OAAO,QAAQ,yBAAyB;AACjD,SACCC,WAAW,EACXC,QAAQ,QACF,0CAA0C;AAGjD,OAAO,MAAMC,mBAAmB,GAAIC,MAKnC,IAAK;EACL,MAAM;IAAEC,OAAO;IAAEC,cAAc;IAAEC,gBAAgB;IAAEC;EAAe,CAAC,GAAGJ,MAAM;EAE5EL,eAAe,CAAC,MAAM;IACrB,IAAI,CAACM,OAAO,EAAE;IAEdL,OAAO,CAACE,QAAQ,CAAC,CAACI,cAAc,EAAEC,gBAAgB,EAAE;MACnDC;IACD,CAAC,CAAC;IAEF,OAAO,MAAM;MACZR,OAAO,CAACC,WAAW,CAAC,CAACK,cAAc,EAAEC,gBAAgB,CAAC;IACvD,CAAC;EACF,CAAC,EAAE,CAACF,OAAO,EAAEC,cAAc,EAAEC,gBAAgB,EAAEC,cAAc,CAAC,CAAC;AAChE,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useLayoutEffect","runOnUI","removeEntry","setEntry","useBoundaryPresence","params","enabled","entryTag","currentScreenKey","boundaryConfig"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-boundary-presence.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,OAAO;AACvC,SAASC,OAAO,QAAQ,yBAAyB;AACjD,SACCC,WAAW,EACXC,QAAQ,QACF,0CAA0C;AAGjD,OAAO,MAAMC,mBAAmB,GAAIC,MAKnC,IAAK;EACL,MAAM;IAAEC,OAAO;IAAEC,QAAQ;IAAEC,gBAAgB;IAAEC;EAAe,CAAC,GAAGJ,MAAM;EAEtEL,eAAe,CAAC,MAAM;IACrB,IAAI,CAACM,OAAO,EAAE;IAEdL,OAAO,CAACE,QAAQ,CAAC,CAACI,QAAQ,EAAEC,gBAAgB,EAAE;MAC7CC;IACD,CAAC,CAAC;IAEF,OAAO,MAAM;MACZR,OAAO,CAACC,WAAW,CAAC,CAACK,QAAQ,EAAEC,gBAAgB,CAAC;IACjD,CAAC;EACF,CAAC,EAAE,CAACF,OAAO,EAAEC,QAAQ,EAAEC,gBAAgB,EAAEC,cAAc,CAAC,CAAC;AAC1D,CAAC","ignoreList":[]}
@@ -2,16 +2,17 @@
2
2
 
3
3
  import { cancelAnimation, useAnimatedReaction, useSharedValue, withDelay, withTiming } from "react-native-reanimated";
4
4
  import { AnimationStore } from "../../../stores/animation.store";
5
- import { hasDestinationLink } from "../../../stores/bounds/internals/links";
5
+ import { getDestination } from "../../../stores/bounds/internals/links";
6
+ import { pairs } from "../../../stores/bounds/internals/state";
6
7
  import { LifecycleTransitionRequestKind, SystemStore } from "../../../stores/system.store";
7
- import { createLinkContext } from "./helpers/boundary-link-context";
8
- import { shouldBlockInitialDestinationMeasurement } from "./helpers/measurement-rules";
8
+ import { getInitialDestinationMeasurePairKey } from "../utils/destination-signals";
9
9
  const VIEWPORT_RETRY_DELAY_MS = 16;
10
10
  export const useInitialDestinationMeasurement = ({
11
- sharedBoundTag,
11
+ linkId,
12
12
  enabled,
13
13
  currentScreenKey,
14
14
  preferredSourceScreenKey,
15
+ ancestorScreenKeys,
15
16
  measureBoundary
16
17
  }) => {
17
18
  const progress = AnimationStore.getValue(currentScreenKey, "progress");
@@ -61,32 +62,29 @@ export const useInitialDestinationMeasurement = ({
61
62
  if (!hasPendingOpenRequest || !isWaitingForOpenToStart) {
62
63
  return [0, retryTick];
63
64
  }
64
- const linkContext = createLinkContext({
65
- sharedBoundTag,
66
- currentScreenKey,
67
- preferredSourceScreenKey
68
- });
69
- const shouldBlock = shouldBlockInitialDestinationMeasurement({
65
+ const destinationPairKey = getInitialDestinationMeasurePairKey({
70
66
  enabled,
71
- hasDestinationLink: linkContext.hasDestinationLink,
72
- hasAttachableSourceLink: linkContext.hasAttachableSourceLink
67
+ currentScreenKey,
68
+ preferredSourceScreenKey,
69
+ ancestorScreenKeys,
70
+ linkId,
71
+ linkState: ancestorScreenKeys.length ? pairs.get() : undefined
73
72
  });
74
- if (!shouldBlock) {
75
- return [0, retryTick];
76
- }
77
- return [1, retryTick];
78
- }, ([shouldBlock]) => {
73
+ return [destinationPairKey, retryTick];
74
+ }, ([destinationPairKey]) => {
79
75
  "worklet";
80
76
 
81
- if (!shouldBlock) {
77
+ if (!destinationPairKey) {
82
78
  releaseLifecycleStartBlock();
83
79
  return;
84
80
  }
85
81
  ensureLifecycleStartBlocked();
86
82
  measureBoundary({
87
- intent: "complete-destination"
83
+ type: "destination",
84
+ pairKey: destinationPairKey
88
85
  });
89
- if (hasDestinationLink(sharedBoundTag, currentScreenKey)) {
86
+ const destinationAttached = getDestination(destinationPairKey, linkId) !== null;
87
+ if (destinationAttached) {
90
88
  releaseLifecycleStartBlock();
91
89
  return;
92
90
  }
@@ -1 +1 @@
1
- {"version":3,"names":["cancelAnimation","useAnimatedReaction","useSharedValue","withDelay","withTiming","AnimationStore","hasDestinationLink","LifecycleTransitionRequestKind","SystemStore","createLinkContext","shouldBlockInitialDestinationMeasurement","VIEWPORT_RETRY_DELAY_MS","useInitialDestinationMeasurement","sharedBoundTag","enabled","currentScreenKey","preferredSourceScreenKey","measureBoundary","progress","getValue","system","getBag","pendingLifecycleRequestKind","blockLifecycleStart","unblockLifecycleStart","actions","isBlockingLifecycleStart","retryToken","ensureLifecycleStartBlocked","get","set","releaseLifecycleStartBlock","scheduleViewportRetry","duration","retryTick","hasPendingOpenRequest","Open","isWaitingForOpenToStart","linkContext","shouldBlock","hasAttachableSourceLink","intent"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-initial-destination-measurement.ts"],"mappings":";;AAAA,SACCA,eAAe,EACfC,mBAAmB,EACnBC,cAAc,EACdC,SAAS,EACTC,UAAU,QACJ,yBAAyB;AAChC,SAASC,cAAc,QAAQ,iCAAiC;AAChE,SAASC,kBAAkB,QAAQ,wCAAwC;AAC3E,SACCC,8BAA8B,EAC9BC,WAAW,QACL,8BAA8B;AAErC,SAASC,iBAAiB,QAAQ,iCAAiC;AACnE,SAASC,wCAAwC,QAAQ,6BAA6B;AAEtF,MAAMC,uBAAuB,GAAG,EAAE;AAUlC,OAAO,MAAMC,gCAAgC,GAAGA,CAAC;EAChDC,cAAc;EACdC,OAAO;EACPC,gBAAgB;EAChBC,wBAAwB;EACxBC;AACuC,CAAC,KAAK;EAC7C,MAAMC,QAAQ,GAAGb,cAAc,CAACc,QAAQ,CAACJ,gBAAgB,EAAE,UAAU,CAAC;EACtE,MAAMK,MAAM,GAAGZ,WAAW,CAACa,MAAM,CAACN,gBAAgB,CAAC;EACnD,MAAM;IAAEO;EAA4B,CAAC,GAAGF,MAAM;EAC9C,MAAM;IAAEG,mBAAmB;IAAEC;EAAsB,CAAC,GAAGJ,MAAM,CAACK,OAAO;EACrE,MAAMC,wBAAwB,GAAGxB,cAAc,CAAC,CAAC,CAAC;EAClD,MAAMyB,UAAU,GAAGzB,cAAc,CAAC,CAAC,CAAC;EAEpC,MAAM0B,2BA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AEgC,WAAW,CAAChC,kBAAkB;MAClDkC,uBAAuB,EAAEF,WAAW,CAACE;IACtC,CAAC,CAAC;IAEF,IAAI,CAACD,WAAW,EAAE;MACjB,OAAO,CAAC,CAAC,EAAEL,SAAS,CAAC;IACtB;IAEA,OAAO,CAAC,CAAC,EAAEA,SAAS,CAAC;EACtB,CAAC,EACD,CAAC,CAACK,WAAW,CAAC,KAAK;IAClB,SAAS;;IACT,IAAI,CAACA,WAAW,EAAE;MACjBR,0BAA0B,CAAC,CAAC;MAC5B;IACD;IAEAH,2BAA2B,CAAC,CAAC;IAC7BX,eAAe,CAAC;MAAEwB,MAAM,EAAE;IAAuB,CAAC,CAAC;IAEnD,IAAInC,kBAAkB,CAACO,cAAc,EAAEE,gBAAgB,CAAC,EAAE;MACzDgB,0BAA0B,CAAC,CAAC;MAC5B;IACD;IAEAC,qBAAqB,CAAC,CAAC;EACxB,CACD,CAAC;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["cancelAnimation","useAnimatedReaction","useSharedValue","withDelay","withTiming","AnimationStore","getDestination","pairs","LifecycleTransitionRequestKind","SystemStore","getInitialDestinationMeasurePairKey","VIEWPORT_RETRY_DELAY_MS","useInitialDestinationMeasurement","linkId","enabled","currentScreenKey","preferredSourceScreenKey","ancestorScreenKeys","measureBoundary","progress","getValue","system","getBag","pendingLifecycleRequestKind","blockLifecycleStart","unblockLifecycleStart","actions","isBlockingLifecycleStart","retryToken","ensureLifecycleStartBlocked","get","set","releaseLifecycleStartBlock","scheduleViewportRetry","duration","retryTick","hasPendingOpenRequest","Open","isWaitingForOpenToStart","destinationPairKey","linkState","length","undefined","type","pairKey","destinationAttached"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-initial-destination-measurement.ts"],"mappings":";;AAAA,SACCA,eAAe,EACfC,mBAAmB,EACnBC,cAAc,EACdC,SAAS,EACTC,UAAU,QACJ,yBAAyB;AAChC,SAASC,cAAc,QAAQ,iCAAiC;AAChE,SA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CAAC,CAAC;EACxB,CACD,CAAC;AACF,CAAC","ignoreList":[]}
@@ -1,25 +1,45 @@
1
1
  "use strict";
2
2
 
3
- import { useAnimatedReaction } from "react-native-reanimated";
3
+ import { useAnimatedReaction, useSharedValue } from "react-native-reanimated";
4
+ import { pairs } from "../../../stores/bounds/internals/state";
5
+ import { getInitialSourceCaptureSignal } from "../utils/source-signals";
4
6
  export const useInitialSourceMeasurement = params => {
5
7
  const {
6
8
  enabled,
7
9
  nextScreenKey,
8
- measureBoundary
10
+ measureBoundary,
11
+ linkId,
12
+ currentScreenKey,
13
+ group,
14
+ shouldAutoMeasure
9
15
  } = params;
16
+ const lastSourceCaptureSignal = useSharedValue(null);
10
17
  useAnimatedReaction(() => {
11
18
  "worklet";
12
19
 
13
- if (!enabled || !nextScreenKey) {
14
- return 0;
15
- }
16
- return nextScreenKey;
20
+ return getInitialSourceCaptureSignal({
21
+ enabled,
22
+ nextScreenKey,
23
+ currentScreenKey,
24
+ linkId,
25
+ group,
26
+ shouldAutoMeasure,
27
+ linkState: group ? pairs.get() : undefined
28
+ });
17
29
  }, captureSignal => {
18
30
  "worklet";
19
31
 
20
- if (!enabled || !captureSignal) return;
32
+ if (!enabled || !captureSignal) {
33
+ lastSourceCaptureSignal.set(null);
34
+ return;
35
+ }
36
+ if (lastSourceCaptureSignal.get() === captureSignal.signal) {
37
+ return;
38
+ }
39
+ lastSourceCaptureSignal.set(captureSignal.signal);
21
40
  measureBoundary({
22
- intent: "capture-source"
41
+ type: "source",
42
+ pairKey: captureSignal.pairKey
23
43
  });
24
44
  });
25
45
  };
@@ -1 +1 @@
1
- {"version":3,"names":["useAnimatedReaction","useInitialSourceMeasurement","params","enabled","nextScreenKey","measureBoundary","captureSignal","intent"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-initial-source-measurement.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAAQ,yBAAyB;AAG7D,OAAO,MAAMC,2BAA2B,GAAIC,MAI3C,IAAK;EACL,MAAM;IAAEC,OAAO;IAAEC,aAAa;IAAEC;EAAgB,CAAC,GAAGH,MAAM;EAE1DF,mBAAmB,CAClB,MAAM;IACL,SAAS;;IACT,IAAI,CAACG,OAAO,IAAI,CAACC,aAAa,EAAE;MAC/B,OAAO,CAAC;IACT;IAEA,OAAOA,aAAa;EACrB,CAAC,EACAE,aAAa,IAAK;IAClB,SAAS;;IACT,IAAI,CAACH,OAAO,IAAI,CAACG,aAAa,EAAE;IAEhCD,eAAe,CAAC;MAAEE,MAAM,EAAE;IAAiB,CAAC,CAAC;EAC9C,CACD,CAAC;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useAnimatedReaction","useSharedValue","pairs","getInitialSourceCaptureSignal","useInitialSourceMeasurement","params","enabled","nextScreenKey","measureBoundary","linkId","currentScreenKey","group","shouldAutoMeasure","lastSourceCaptureSignal","linkState","get","undefined","captureSignal","set","signal","type","pairKey"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-initial-source-measurement.ts"],"mappings":";;AAAA,SAASA,mBAAmB,EAAEC,cAAc,QAAQ,yBAAyB;AAC7E,SAASC,KAAK,QAAQ,wCAAwC;AAE9D,SAASC,6BAA6B,QAAQ,yBAAyB;AAEvE,OAAO,MAAMC,2BAA2B,GAAIC,MAQ3C,IAAK;EACL,MAAM;IACLC,OAAO;IACPC,aAAa;IACbC,eAAe;IACfC,MAAM;IACNC,gBAAgB;IAChBC,KAAK;IACLC;EACD,CAAC,GAAGP,MAAM;EACV,MAAMQ,uBAAuB,GAAGZ,cAAc,CAAgB,IAAI,CAAC;EAEnED,mBAAmB,CAClB,MAAM;IACL,SAAS;;IACT,OAAOG,6BAA6B,CAAC;MACpCG,OAAO;MACPC,aAAa;MACbG,gBAAgB;MAChBD,MAAM;MACNE,KAAK;MACLC,iBAAiB;MACjBE,SAAS,EAAEH,KAAK,GAAGT,KAAK,CAACa,GAAG,CAAC,CAAC,GAAGC;IAClC,CAAC,CAAC;EACH,CAAC,EACAC,aAAa,IAAK;IAClB,SAAS;;IACT,IAAI,CAACX,OAAO,IAAI,CAACW,aAAa,EAAE;MAC/BJ,uBAAuB,CAACK,GAAG,CAAC,IAAI,CAAC;MACjC;IACD;IAEA,IAAIL,uBAAuB,CAACE,GAAG,CAAC,CAAC,KAAKE,aAAa,CAACE,MAAM,EAAE;MAC3D;IACD;IAEAN,uBAAuB,CAACK,GAAG,CAACD,aAAa,CAACE,MAAM,CAAC;IACjDX,eAAe,CAAC;MACfY,IAAI,EAAE,QAAQ;MACdC,OAAO,EAAEJ,aAAa,CAACI;IACxB,CAAC,CAAC;EACH,CACD,CAAC;AACF,CAAC","ignoreList":[]}
@@ -2,17 +2,16 @@
2
2
 
3
3
  import { useCallback } from "react";
4
4
  import { useWindowDimensions } from "react-native";
5
+ import { setEntry } from "../../../stores/bounds/internals/entries";
6
+ import { setDestination, setSource } from "../../../stores/bounds/internals/links";
5
7
  import { ScrollStore } from "../../../stores/scroll.store";
6
8
  import { SystemStore } from "../../../stores/system.store";
7
- import { applyMeasuredBoundsWrites } from "../helpers/apply-measured-bounds-writes";
8
- import { createLinkContext } from "./helpers/boundary-link-context";
9
- import { isMeasurementInViewport } from "./helpers/measurement";
10
- import { buildMeasurementWritePlan, getMeasureIntentFlags } from "./helpers/measurement-rules";
11
- import { measureWithOverscrollAwareness } from "./helpers/scroll-measurement";
9
+ import { isMeasurementInViewport, measureWithOverscrollAwareness } from "../utils/measured-bounds";
12
10
  export const useMeasurer = ({
13
11
  enabled,
14
- sharedBoundTag,
15
- preferredSourceScreenKey,
12
+ entryTag,
13
+ linkId,
14
+ group,
16
15
  currentScreenKey,
17
16
  preparedStyles,
18
17
  measuredAnimatedRef
@@ -23,38 +22,13 @@ export const useMeasurer = ({
23
22
  } = useWindowDimensions();
24
23
  const scrollState = ScrollStore.getValue(currentScreenKey, "state");
25
24
  const pendingLifecycleStartBlockCount = SystemStore.getValue(currentScreenKey, "pendingLifecycleStartBlockCount");
26
- return useCallback(({
27
- intent
28
- } = {}) => {
25
+ return useCallback(target => {
29
26
  "worklet";
30
27
 
31
28
  if (!enabled) return;
32
- const intents = getMeasureIntentFlags(intent);
33
- const currentLink = createLinkContext({
34
- sharedBoundTag,
35
- currentScreenKey,
36
- preferredSourceScreenKey
37
- });
38
- const writePlan = buildMeasurementWritePlan({
39
- intents,
40
- hasPendingLink: currentLink.hasPendingLink,
41
- hasSourceLink: currentLink.hasSourceLink,
42
- hasDestinationLink: currentLink.hasDestinationLink,
43
- hasAttachableSourceLink: currentLink.hasAttachableSourceLink
44
- });
45
- if (!writePlan.writesAny) return;
46
29
  const measured = measureWithOverscrollAwareness(measuredAnimatedRef, scrollState.get());
47
30
  if (!measured) return;
48
31
 
49
- /**
50
- * Source Pass
51
- * Source intents are intentionally used & kept unguarded.
52
- */
53
- const sourceWrites = {
54
- shouldSetSource: writePlan.captureSource,
55
- shouldUpdateSource: writePlan.refreshSource
56
- };
57
-
58
32
  /**
59
33
  * - Destination Pass -
60
34
  * Be strict while lifecycle start is blocked for destination capture.
@@ -62,23 +36,21 @@ export const useMeasurer = ({
62
36
  * and malformed off-screen destination measurements should keep the
63
37
  * lifecycle blocked until a valid retry lands.
64
38
  */
65
- const shouldGuardDestinationViewport = pendingLifecycleStartBlockCount.get() > 0;
66
- const viewportAllowsDestinationWrite = !shouldGuardDestinationViewport || isMeasurementInViewport(measured, viewportWidth, viewportHeight);
67
- const destinationWrites = {
68
- shouldSetDestination: viewportAllowsDestinationWrite && writePlan.completeDestination,
69
- shouldUpdateDestination: viewportAllowsDestinationWrite && writePlan.refreshDestination
70
- };
71
- const shouldApplyMeasurement = sourceWrites.shouldSetSource || sourceWrites.shouldUpdateSource || destinationWrites.shouldSetDestination || destinationWrites.shouldUpdateDestination;
72
- if (!shouldApplyMeasurement) return;
73
- applyMeasuredBoundsWrites({
74
- sharedBoundTag,
75
- currentScreenKey,
76
- measured,
77
- preparedStyles,
78
- expectedSourceScreenKey: currentLink.expectedSourceScreenKey,
79
- ...sourceWrites,
80
- ...destinationWrites
39
+ const shouldGuardDestinationViewport = pendingLifecycleStartBlockCount.get() > 0 || !!group;
40
+ const viewportAllowsDestinationWrite = target.type !== "destination" || !shouldGuardDestinationViewport || isMeasurementInViewport(measured, viewportWidth, viewportHeight);
41
+ if (!viewportAllowsDestinationWrite) return;
42
+
43
+ // Set the bounds entry on every measure to avoid any stale measurements
44
+ // for the public read API.
45
+ setEntry(entryTag, currentScreenKey, {
46
+ bounds: measured
81
47
  });
82
- }, [enabled, sharedBoundTag, preferredSourceScreenKey, currentScreenKey, preparedStyles, measuredAnimatedRef, viewportWidth, viewportHeight, scrollState, pendingLifecycleStartBlockCount]);
48
+ if (target.type === "source") {
49
+ setSource(target.pairKey, linkId, currentScreenKey, measured, preparedStyles, group);
50
+ }
51
+ if (target.type === "destination") {
52
+ setDestination(target.pairKey, linkId, currentScreenKey, measured, preparedStyles, group);
53
+ }
54
+ }, [enabled, entryTag, linkId, group, currentScreenKey, preparedStyles, measuredAnimatedRef, viewportWidth, viewportHeight, scrollState, pendingLifecycleStartBlockCount]);
83
55
  };
84
56
  //# sourceMappingURL=use-measurer.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useCallback","useWindowDimensions","ScrollStore","SystemStore","applyMeasuredBoundsWrites","createLinkContext","isMeasurementInViewport","buildMeasurementWritePlan","getMeasureIntentFlags","measureWithOverscrollAwareness","useMeasurer","enabled","sharedBoundTag","preferredSourceScreenKey","currentScreenKey","preparedStyles","measuredAnimatedRef","width","viewportWidth","height","viewportHeight","scrollState","getValue","pendingLifecycleStartBlockCount","intent","intents","currentLink","writePlan","hasPendingLink","hasSourceLink","hasDestinationLink","hasAttachableSourceLink","writesAny","measured","get","sourceWrites","shouldSetSource","captureSource","shouldUpdateSource","refreshSource","shouldGuardDestinationViewport","viewportAllowsDestinationWrite","destinationWrites","shouldSetDestination","completeDestination","shouldUpdateDestination","refreshDestination","shouldApplyMeasurement","expectedSourceScreenKey"],"sourceRoot":"../../../../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,CAAC;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useCallback","useWindowDimensions","setEntry","setDestination","setSource","ScrollStore","SystemStore","isMeasurementInViewport","measureWithOverscrollAwareness","useMeasurer","enabled","entryTag","linkId","group","currentScreenKey","preparedStyles","measuredAnimatedRef","width","viewportWidth","height","viewportHeight","scrollState","getValue","pendingLifecycleStartBlockCount","target","measured","get","shouldGuardDestinationViewport","viewportAllowsDestinationWrite","type","bounds","pairKey"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-measurer.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,OAAO;AAEnC,SAASC,mBAAmB,QAAQ,cAAc;AAElD,SAASC,QAAQ,QAAQ,0CAA0C;AACnE,SACCC,cAAc,EACdC,SAAS,QACH,wCAAwC;AAC/C,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,SAASC,WAAW,QAAQ,8BAA8B;AAE1D,SACCC,uBAAuB,EACvBC,8BAA8B,QACxB,0BAA0B;AAYjC,OAAO,MAAMC,WAAW,GAAGA,CAAC;EAC3BC,OAAO;EACPC,QAAQ;EACRC,MAAM;EACNC,KAAK;EACLC,gBAAgB;EAChBC,cAAc;EACdC;AACkB,CAAC,KAAsB;EACzC,MAAM;IAAEC,KAAK,EAAEC,aAAa;IAAEC,MAAM,EAAEC;EAAe,CAAC,GACrDnB,mBAAmB,CAAC,CAAC;EAEtB,MAAMoB,WAAW,GAAGhB,WAAW,CAACiB,QAAQ,CAACR,gBAAgB,EAAE,OAAO,CAAC;EACnE,MAAMS,+BAA+B,GAAGjB,WAAW,CAACgB,QAAQ,CAC3DR,gBAAgB,EAChB,iCACD,CAAC;EAED,OAAOd,WAAW,CAChBwB,MAAM,IAAK;IACX,SAAS;;IACT,IAAI,CAACd,OAAO,EAAE;IAEd,MAAMe,QAAQ,GAAGjB,8BAA8B,CAC9CQ,mBAAmB,EACnBK,WAAW,CAACK,GAAG,CAAC,CACjB,CAAC;IAED,IAAI,CAACD,QAAQ,EAAE;;IAEf;AACH;AACA;AACA;AACA;AACA;AACA;IACG,MAAME,8BAA8B,GACnCJ,+BAA+B,CAACG,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAACb,KAAK;IAErD,MAAMe,8BAA8B,GACnCJ,MAAM,CAACK,IAAI,KAAK,aAAa,IAC7B,CAACF,8BAA8B,IAC/BpB,uBAAuB,CAACkB,QAAQ,EAAEP,aAAa,EAAEE,cAAc,CAAC;IAEjE,IAAI,CAACQ,8BAA8B,EAAE;;IAErC;IACA;IACA1B,QAAQ,CAACS,QAAQ,EAAEG,gBAAgB,EAAE;MACpCgB,MAAM,EAAEL;IACT,CAAC,CAAC;IAEF,IAAID,MAAM,CAACK,IAAI,KAAK,QAAQ,EAAE;MAC7BzB,SAAS,CACRoB,MAAM,CAACO,OAAO,EACdnB,MAAM,EACNE,gBAAgB,EAChBW,QAAQ,EACRV,cAAc,EACdF,KACD,CAAC;IACF;IAEA,IAAIW,MAAM,CAACK,IAAI,KAAK,aAAa,EAAE;MAClC1B,cAAc,CACbqB,MAAM,CAACO,OAAO,EACdnB,MAAM,EACNE,gBAAgB,EAChBW,QAAQ,EACRV,cAAc,EACdF,KACD,CAAC;IACF;EACD,CAAC,EACD,CACCH,OAAO,EACPC,QAAQ,EACRC,MAAM,EACNC,KAAK,EACLC,gBAAgB,EAChBC,cAAc,EACdC,mBAAmB,EACnBE,aAAa,EACbE,cAAc,EACdC,WAAW,EACXE,+BAA+B,CAEjC,CAAC;AACF,CAAC","ignoreList":[]}
@@ -2,60 +2,53 @@
2
2
 
3
3
  import { useAnimatedReaction } from "react-native-reanimated";
4
4
  import { AnimationStore } from "../../../stores/animation.store";
5
- import { getGroupActiveId } from "../../../stores/bounds/internals/groups";
6
- import { hasDestinationLink, hasSourceLink } from "../../../stores/bounds/internals/links";
5
+ import { pairs } from "../../../stores/bounds/internals/state";
6
+ import { getRefreshBoundarySignal } from "../utils/refresh-signals";
7
7
  export const useRefreshBoundary = ({
8
8
  enabled,
9
- sharedBoundTag,
10
- id,
11
- group,
12
9
  currentScreenKey,
10
+ preferredSourceScreenKey,
13
11
  nextScreenKey,
14
- hasNextScreen,
12
+ linkId,
13
+ group,
14
+ ancestorScreenKeys,
15
15
  measureBoundary
16
16
  }) => {
17
- const currentWillAnimate = AnimationStore.getValue(currentScreenKey, "willAnimate");
18
- const currentClosing = AnimationStore.getValue(currentScreenKey, "closing");
19
- const currentEntering = AnimationStore.getValue(currentScreenKey, "entering");
20
- const currentAnimating = AnimationStore.getValue(currentScreenKey, "progressAnimating");
21
- const currentProgress = AnimationStore.getValue(currentScreenKey, "progress");
22
- const nextWillAnimate = nextScreenKey ? AnimationStore.getValue(nextScreenKey, "willAnimate") : null;
23
- const nextClosing = nextScreenKey ? AnimationStore.getValue(nextScreenKey, "closing") : null;
24
- const nextEntering = nextScreenKey ? AnimationStore.getValue(nextScreenKey, "entering") : null;
17
+ // Source-side boundaries refresh from the next screen's lifecycle pulse.
18
+ // Destination-side boundaries have no next screen, so they refresh from self.
19
+ const refreshScreenKey = nextScreenKey ?? currentScreenKey;
20
+ const refreshWillAnimate = AnimationStore.getValue(refreshScreenKey, "willAnimate");
21
+ const refreshClosing = AnimationStore.getValue(refreshScreenKey, "closing");
22
+ const refreshEntering = AnimationStore.getValue(refreshScreenKey, "entering");
23
+ const refreshAnimating = AnimationStore.getValue(refreshScreenKey, "progressAnimating");
24
+ const refreshProgress = AnimationStore.getValue(refreshScreenKey, "progress");
25
25
  useAnimatedReaction(() => {
26
26
  "worklet";
27
27
 
28
- const shouldRefresh = hasNextScreen ? nextWillAnimate?.get() ?? 0 : currentWillAnimate.get();
29
- const closing = hasNextScreen ? nextClosing?.get() ?? 0 : currentClosing.get();
30
- const entering = hasNextScreen ? nextEntering?.get() ?? 0 : currentEntering.get();
31
-
32
- // Programmatic close marks `closing` before pulsing `willAnimate`.
33
- // This frame is still settled, so destination refresh is valid and
34
- // reveal can compute initial/current destination delta before progress moves.
35
- const canRefreshPreCloseDestination = !hasNextScreen && shouldRefresh && closing && !entering && !currentAnimating.get() && currentProgress.get() >= 1;
36
- if (canRefreshPreCloseDestination || shouldRefresh && !closing && !entering) {
37
- return 1;
38
- }
39
- return 0;
40
- }, (shouldRefresh, prevShouldRefresh) => {
28
+ return getRefreshBoundarySignal({
29
+ enabled,
30
+ currentScreenKey,
31
+ preferredSourceScreenKey,
32
+ nextScreenKey,
33
+ linkId,
34
+ group,
35
+ ancestorScreenKeys,
36
+ shouldRefresh: !!refreshWillAnimate.get(),
37
+ closing: !!refreshClosing.get(),
38
+ entering: !!refreshEntering.get(),
39
+ animating: !!refreshAnimating.get(),
40
+ progress: refreshProgress.get(),
41
+ linkState: group || ancestorScreenKeys.length ? pairs.get() : undefined
42
+ });
43
+ }, (refreshSignal, prevRefreshSignal) => {
41
44
  "worklet";
42
45
 
43
- if (!enabled || !shouldRefresh || shouldRefresh === prevShouldRefresh) return;
44
- const currentGroupActiveId = group ? getGroupActiveId(group) : null;
45
- if (group && currentGroupActiveId !== String(id)) {
46
- return;
47
- }
48
- if (hasNextScreen) {
49
- if (!nextScreenKey || !hasSourceLink(sharedBoundTag, currentScreenKey) || !hasDestinationLink(sharedBoundTag, nextScreenKey)) {
50
- return;
51
- }
52
- measureBoundary({
53
- intent: "refresh-source"
54
- });
46
+ if (!refreshSignal || refreshSignal.signal === prevRefreshSignal?.signal) {
55
47
  return;
56
48
  }
57
49
  measureBoundary({
58
- intent: "refresh-destination"
50
+ type: refreshSignal.type,
51
+ pairKey: refreshSignal.pairKey
59
52
  });
60
53
  });
61
54
  };
@@ -1 +1 @@
1
- {"version":3,"names":["useAnimatedReaction","AnimationStore","getGroupActiveId","hasDestinationLink","hasSourceLink","useRefreshBoundary","enabled","sharedBoundTag","id","group","currentScreenKey","nextScreenKey","hasNextScreen","measureBoundary","currentWillAnimate","getValue","currentClosing","currentEntering","currentAnimating","currentProgress","nextWillAnimate","nextClosing","nextEntering","shouldRefresh","get","closing","entering","canRefreshPreCloseDestination","prevShouldRefresh","currentGroupActiveId","String","intent"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-refresh-boundary.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAAQ,yBAAyB;AAC7D,SAASC,cAAc,QAAQ,iCAAiC;AAChE,SAASC,gBAAgB,QAAQ,yCAAyC;AAC1E,SACCC,kBAAkB,EAClBC,aAAa,QACP,wCAAwC;AAc/C,OAAO,MAAMC,kBAAkB,GAAGA,CAAC;EAClCC,OAAO;EACPC,cAAc;EACdC,EAAE;EACFC,KAAK;EACLC,gBAAgB;EAChBC,aAAa;EACbC,aAAa;EACbC;AACyB,CAAC,KAAK;EAC/B,MAAMC,kBAAkB,GAAGb,cAAc,CAACc,QAAQ,CACjDL,gBAAgB,EAChB,aACD,CAAC;EACD,MAAMM,cAAc,GAAGf,cAAc,CAACc,QAAQ,CAACL,gBAAgB,EAAE,SAAS,CAAC;EAC3E,MAAMO,eAAe,GAAGhB,cAAc,CAACc,QAAQ,CAACL,gBAAgB,EAAE,UAAU,CAAC;EAC7E,MAAMQ,gBAAgB,GAAGjB,cAAc,CAACc,QAAQ,CAC/CL,gBAAgB,EAChB,mBACD,CAAC;EACD,MAAMS,eAAe,GAAGlB,cAAc,CAACc,QAAQ,CAACL,gBAAgB,EAAE,UAAU,CAAC;EAC7E,MAAMU,eAAe,GAAGT,aAAa,GAClCV,cAAc,CAACc,QAAQ,CAACJ,aAAa,EAAE,aAAa,CAAC,GACrD,IAAI;EAEP,MAAMU,WAAW,GAAGV,aAAa,GAC9BV,cAAc,CAACc,QAAQ,CAACJ,aAAa,EAAE,SAAS,CAAC,GACjD,IAAI;EACP,MAAMW,YAAY,GAAGX,aAAa,GAC/BV,cAAc,CAACc,QAAQ,CAACJ,aAAa,EAAE,UAAU,CAAC,GAClD,IAAI;EAEPX,mBAAmB,CAClB,MAAM;IACL,SAAS;;IAET,MAAMuB,aAAa,GAAGX,aAAa,GAC/BQ,eAAe,EAAEI,GAAG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AC;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useAnimatedReaction","AnimationStore","pairs","getRefreshBoundarySignal","useRefreshBoundary","enabled","currentScreenKey","preferredSourceScreenKey","nextScreenKey","linkId","group","ancestorScreenKeys","measureBoundary","refreshScreenKey","refreshWillAnimate","getValue","refreshClosing","refreshEntering","refreshAnimating","refreshProgress","shouldRefresh","get","closing","entering","animating","progress","linkState","length","undefined","refreshSignal","prevRefreshSignal","signal","type","pairKey"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-refresh-boundary.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAAQ,yBAAyB;AAC7D,SAASC,cAAc,QAAQ,iCAAiC;AAChE,SAASC,KAAK,QAAQ,wCAAwC;AAE9D,SAASC,wBAAwB,QAAQ,0BAA0B;AAanE,OAAO,MAAMC,kBAAkB,GAAGA,CAAC;EAClCC,OAAO;EACPC,gBAAgB;EAChBC,wBAAwB;EACxBC,aAAa;EACbC,MAAM;EACNC,KAAK;EACLC,kBAAkB;EAClBC;AACyB,CAAC,KAAK;EAC/B;EACA;EACA,MAAMC,gBAAgB,GAAGL,aAAa,IAAIF,gBAAgB;EAC1D,MAAMQ,kBAAkB,GAAGb,cAAc,CAACc,QAAQ,CACjDF,gBAAgB,EAChB,aACD,CAAC;EACD,MAAMG,cAAc,GAAGf,cAAc,CAACc,QAAQ,CAACF,gBAAgB,EAAE,SAAS,CAAC;EAC3E,MAAMI,eAAe,GAAGhB,cAAc,CAACc,QAAQ,CAACF,gBAAgB,EAAE,UAAU,CAAC;EAC7E,MAAMK,gBAAgB,GAAGjB,cAAc,CAACc,QAAQ,CAC/CF,gBAAgB,EAChB,mBACD,CAAC;EACD,MAAMM,eAAe,GAAGlB,cAAc,CAACc,QAAQ,CAACF,gBAAgB,EAAE,UAAU,CAAC;EAE7Eb,mBAAmB,CAClB,MAAM;IACL,SAAS;;IACT,OAAOG,wBAAwB,CAAC;MAC/BE,OAAO;MACPC,gBAAgB;MAChBC,wBAAwB;MACxBC,aAAa;MACbC,MAAM;MACNC,KAAK;MACLC,kBAAkB;MAClBS,aAAa,EAAE,CAAC,CAACN,kBAAkB,CAACO,GAAG,CAAC,CAAC;MACzCC,OAAO,EAAE,CAAC,CAACN,cAAc,CAACK,GAAG,CAAC,CAAC;MAC/BE,QAAQ,EAAE,CAAC,CAACN,eAAe,CAACI,GAAG,CAAC,CAAC;MACjCG,SAAS,EAAE,CAAC,CAACN,gBAAgB,CAACG,GAAG,CAAC,CAAC;MACnCI,QAAQ,EAAEN,eAAe,CAACE,GAAG,CAAC,CAAC;MAC/BK,SAAS,EAAEhB,KAAK,IAAIC,kBAAkB,CAACgB,MAAM,GAAGzB,KAAK,CAACmB,GAAG,CAAC,CAAC,GAAGO;IAC/D,CAAC,CAAC;EACH,CAAC,EACD,CAACC,aAAa,EAAEC,iBAAiB,KAAK;IACrC,SAAS;;IAET,IACC,CAACD,aAAa,IACdA,aAAa,CAACE,MAAM,KAAKD,iBAAiB,EAAEC,MAAM,EACjD;MACD;IACD;IAEAnB,eAAe,CAAC;MACfoB,IAAI,EAAEH,aAAa,CAACG,IAAI;MACxBC,OAAO,EAAEJ,aAAa,CAACI;IACxB,CAAC,CAAC;EACH,CACD,CAAC;AACF,CAAC","ignoreList":[]}
@@ -4,7 +4,9 @@ import { Pressable, View } from "react-native";
4
4
  import { BoundaryTarget } from "./components/boundary-target";
5
5
  import { createBoundaryComponent } from "./create-boundary-component";
6
6
  export { createBoundaryComponent };
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 +1 @@
1
- {"version":3,"names":["Pressable","View","BoundaryTarget","createBoundaryComponent","BoundaryView","BoundaryTrigger","displayName","Boundary","Trigger","Target"],"sourceRoot":"../../../../../src","sources":["shared/components/create-boundary-component/index.tsx"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,IAAI,QAAQ,cAAc;AAC9C,SAASC,cAAc,QAAQ,8BAA8B;AAC7D,SAASC,uBAAuB,QAAQ,6BAA6B;AAErE,SAASA,uBAAuB;AAEhC,MAAMC,YAAY,GAAGD,uBAAuB,CAACF,IAAI,CAAC;AAClD,MAAMI,eAAe,GAAGF,uBAAuB,CAACH,SAAS,CAAC;AAC1DI,YAAY,CAACE,WAAW,GAAG,0BAA0B;AACrDD,eAAe,CAACC,WAAW,GAAG,6BAA6B;AAC3DJ,cAAc,CAACI,WAAW,GAAG,4BAA4B;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,QAAQ,GAAG;EACvB;AACD;AACA;EACCN,IAAI,EAAEG,YAAY;EAClB;AACD;AACA;EACCI,OAAO,EAAEH,eAAe;EACxB;AACD;AACA;EACCI,MAAM,EAAEP;AACT,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["Pressable","View","BoundaryTarget","createBoundaryComponent","BoundaryView","shouldAutoMeasure","BoundaryTrigger","displayName","Boundary","Trigger","Target"],"sourceRoot":"../../../../../src","sources":["shared/components/create-boundary-component/index.tsx"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,IAAI,QAAQ,cAAc;AAC9C,SAASC,cAAc,QAAQ,8BAA8B;AAC7D,SAASC,uBAAuB,QAAQ,6BAA6B;AAErE,SAASA,uBAAuB;AAEhC,MAAMC,YAAY,GAAGD,uBAAuB,CAACF,IAAI,EAAE;EAClDI,iBAAiB,EAAE;AACpB,CAAC,CAAC;AACF,MAAMC,eAAe,GAAGH,uBAAuB,CAACH,SAAS,CAAC;AAC1DI,YAAY,CAACG,WAAW,GAAG,0BAA0B;AACrDD,eAAe,CAACC,WAAW,GAAG,6BAA6B;AAC3DL,cAAc,CAACK,WAAW,GAAG,4BAA4B;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,QAAQ,GAAG;EACvB;AACD;AACA;EACCP,IAAI,EAAEG,YAAY;EAClB;AACD;AACA;EACCK,OAAO,EAAEH,eAAe;EACxB;AACD;AACA;EACCI,MAAM,EAAER;AACT,CAAC","ignoreList":[]}