react-native-screen-transitions 3.6.0-alpha.1 → 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 (433) 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/constants.js +2 -7
  28. package/lib/commonjs/shared/constants.js.map +1 -1
  29. package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js +35 -0
  30. package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js.map +1 -0
  31. package/lib/commonjs/shared/providers/register-bounds.provider.js +48 -55
  32. package/lib/commonjs/shared/providers/register-bounds.provider.js.map +1 -1
  33. package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js +1 -10
  34. package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js.map +1 -1
  35. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +1 -6
  36. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
  37. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  38. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-activation.js +2 -2
  39. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-activation.js.map +1 -1
  40. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-lifecycle.js +9 -2
  41. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-lifecycle.js.map +1 -1
  42. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-release.js +19 -0
  43. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-release.js.map +1 -1
  44. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-reset.js +2 -0
  45. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-reset.js.map +1 -1
  46. package/lib/commonjs/shared/providers/screen/gestures/pan/use-pan-behavior.js +2 -2
  47. package/lib/commonjs/shared/providers/screen/gestures/pan/use-pan-behavior.js.map +1 -1
  48. package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-activation.js +2 -2
  49. package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-activation.js.map +1 -1
  50. package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-lifecycle.js +1 -0
  51. package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-lifecycle.js.map +1 -1
  52. package/lib/commonjs/shared/providers/screen/gestures/pinch/use-pinch-behavior.js +2 -2
  53. package/lib/commonjs/shared/providers/screen/gestures/pinch/use-pinch-behavior.js.map +1 -1
  54. package/lib/commonjs/shared/providers/screen/gestures/shared/physics.js +18 -2
  55. package/lib/commonjs/shared/providers/screen/gestures/shared/physics.js.map +1 -1
  56. package/lib/commonjs/shared/providers/screen/gestures/shared/policy.js +1 -5
  57. package/lib/commonjs/shared/providers/screen/gestures/shared/policy.js.map +1 -1
  58. package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +1 -4
  59. package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
  60. package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js +125 -0
  61. package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -0
  62. package/lib/commonjs/shared/stores/bounds/index.js +6 -12
  63. package/lib/commonjs/shared/stores/bounds/index.js.map +1 -1
  64. package/lib/commonjs/shared/stores/bounds/internals/clear.js +13 -21
  65. package/lib/commonjs/shared/stores/bounds/internals/clear.js.map +1 -1
  66. package/lib/commonjs/shared/stores/bounds/internals/entries.js +49 -9
  67. package/lib/commonjs/shared/stores/bounds/internals/entries.js.map +1 -1
  68. package/lib/commonjs/shared/stores/bounds/internals/links.js +143 -82
  69. package/lib/commonjs/shared/stores/bounds/internals/links.js.map +1 -1
  70. package/lib/commonjs/shared/stores/bounds/internals/resolver.js +17 -43
  71. package/lib/commonjs/shared/stores/bounds/internals/resolver.js.map +1 -1
  72. package/lib/commonjs/shared/stores/bounds/internals/state.js +26 -3
  73. package/lib/commonjs/shared/stores/bounds/internals/state.js.map +1 -1
  74. package/lib/commonjs/shared/stores/gesture.store.js +2 -0
  75. package/lib/commonjs/shared/stores/gesture.store.js.map +1 -1
  76. package/lib/commonjs/shared/types/gesture.types.js +2 -2
  77. package/lib/commonjs/shared/types/gesture.types.js.map +1 -1
  78. package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js +2 -1
  79. package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
  80. package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js +6 -5
  81. package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
  82. package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js +21 -8
  83. package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
  84. package/lib/commonjs/shared/utils/bounds/helpers/resolve-bounds-pair-key.js +23 -0
  85. package/lib/commonjs/shared/utils/bounds/helpers/resolve-bounds-pair-key.js.map +1 -0
  86. package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js +91 -199
  87. package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
  88. package/lib/commonjs/shared/utils/bounds/navigation/reveal/config.js +15 -2
  89. package/lib/commonjs/shared/utils/bounds/navigation/reveal/config.js.map +1 -1
  90. package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js +155 -14
  91. package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
  92. package/lib/commonjs/shared/utils/navigation/resolve-scene-neighbors.js +20 -19
  93. package/lib/commonjs/shared/utils/navigation/resolve-scene-neighbors.js.map +1 -1
  94. package/lib/module/component-stack/components/component-screen.js +2 -8
  95. package/lib/module/component-stack/components/component-screen.js.map +1 -1
  96. package/lib/module/shared/components/create-boundary-component/create-boundary-component.js +27 -34
  97. package/lib/module/shared/components/create-boundary-component/create-boundary-component.js.map +1 -1
  98. package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js +4 -4
  99. package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +1 -1
  100. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js +18 -20
  101. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js.map +1 -1
  102. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js +28 -8
  103. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js.map +1 -1
  104. package/lib/module/shared/components/create-boundary-component/hooks/use-measurer.js +22 -50
  105. package/lib/module/shared/components/create-boundary-component/hooks/use-measurer.js.map +1 -1
  106. package/lib/module/shared/components/create-boundary-component/hooks/use-refresh-boundary.js +33 -40
  107. package/lib/module/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map +1 -1
  108. package/lib/module/shared/components/create-boundary-component/index.js +3 -1
  109. package/lib/module/shared/components/create-boundary-component/index.js.map +1 -1
  110. package/lib/module/shared/components/create-boundary-component/utils/destination-signals.js +70 -0
  111. package/lib/module/shared/components/create-boundary-component/utils/destination-signals.js.map +1 -0
  112. package/lib/module/shared/components/create-boundary-component/{hooks/helpers/scroll-measurement.js → utils/measured-bounds.js} +13 -1
  113. package/lib/module/shared/components/create-boundary-component/utils/measured-bounds.js.map +1 -0
  114. package/lib/module/shared/components/create-boundary-component/utils/refresh-signals.js +98 -0
  115. package/lib/module/shared/components/create-boundary-component/utils/refresh-signals.js.map +1 -0
  116. package/lib/module/shared/components/create-boundary-component/utils/source-signals.js +47 -0
  117. package/lib/module/shared/components/create-boundary-component/utils/source-signals.js.map +1 -0
  118. package/lib/module/shared/components/native-screen.js +3 -14
  119. package/lib/module/shared/components/native-screen.js.map +1 -1
  120. package/lib/module/shared/constants.js +1 -6
  121. package/lib/module/shared/constants.js.map +1 -1
  122. package/lib/module/shared/providers/helpers/measured-bounds-writes.js +30 -0
  123. package/lib/module/shared/providers/helpers/measured-bounds-writes.js.map +1 -0
  124. package/lib/module/shared/providers/register-bounds.provider.js +48 -55
  125. package/lib/module/shared/providers/register-bounds.provider.js.map +1 -1
  126. package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js +1 -10
  127. package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js.map +1 -1
  128. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +1 -1
  129. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
  130. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  131. package/lib/module/shared/providers/screen/gestures/pan/pan-activation.js +2 -2
  132. package/lib/module/shared/providers/screen/gestures/pan/pan-activation.js.map +1 -1
  133. package/lib/module/shared/providers/screen/gestures/pan/pan-lifecycle.js +10 -3
  134. package/lib/module/shared/providers/screen/gestures/pan/pan-lifecycle.js.map +1 -1
  135. package/lib/module/shared/providers/screen/gestures/pan/pan-release.js +20 -1
  136. package/lib/module/shared/providers/screen/gestures/pan/pan-release.js.map +1 -1
  137. package/lib/module/shared/providers/screen/gestures/pan/pan-reset.js +2 -0
  138. package/lib/module/shared/providers/screen/gestures/pan/pan-reset.js.map +1 -1
  139. package/lib/module/shared/providers/screen/gestures/pan/use-pan-behavior.js +3 -3
  140. package/lib/module/shared/providers/screen/gestures/pan/use-pan-behavior.js.map +1 -1
  141. package/lib/module/shared/providers/screen/gestures/pinch/pinch-activation.js +3 -3
  142. package/lib/module/shared/providers/screen/gestures/pinch/pinch-activation.js.map +1 -1
  143. package/lib/module/shared/providers/screen/gestures/pinch/pinch-lifecycle.js +1 -0
  144. package/lib/module/shared/providers/screen/gestures/pinch/pinch-lifecycle.js.map +1 -1
  145. package/lib/module/shared/providers/screen/gestures/pinch/use-pinch-behavior.js +3 -3
  146. package/lib/module/shared/providers/screen/gestures/pinch/use-pinch-behavior.js.map +1 -1
  147. package/lib/module/shared/providers/screen/gestures/shared/physics.js +15 -0
  148. package/lib/module/shared/providers/screen/gestures/shared/physics.js.map +1 -1
  149. package/lib/module/shared/providers/screen/gestures/shared/policy.js +3 -3
  150. package/lib/module/shared/providers/screen/gestures/shared/policy.js.map +1 -1
  151. package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +1 -4
  152. package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
  153. package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js +105 -0
  154. package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -0
  155. package/lib/module/shared/stores/bounds/index.js +7 -13
  156. package/lib/module/shared/stores/bounds/index.js.map +1 -1
  157. package/lib/module/shared/stores/bounds/internals/clear.js +14 -22
  158. package/lib/module/shared/stores/bounds/internals/clear.js.map +1 -1
  159. package/lib/module/shared/stores/bounds/internals/entries.js +49 -9
  160. package/lib/module/shared/stores/bounds/internals/entries.js.map +1 -1
  161. package/lib/module/shared/stores/bounds/internals/links.js +139 -80
  162. package/lib/module/shared/stores/bounds/internals/links.js.map +1 -1
  163. package/lib/module/shared/stores/bounds/internals/resolver.js +17 -43
  164. package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -1
  165. package/lib/module/shared/stores/bounds/internals/state.js +25 -2
  166. package/lib/module/shared/stores/bounds/internals/state.js.map +1 -1
  167. package/lib/module/shared/stores/gesture.store.js +2 -0
  168. package/lib/module/shared/stores/gesture.store.js.map +1 -1
  169. package/lib/module/shared/types/animation.types.js +0 -4
  170. package/lib/module/shared/types/animation.types.js.map +1 -1
  171. package/lib/module/shared/types/gesture.types.js +0 -1
  172. package/lib/module/shared/types/gesture.types.js.map +1 -1
  173. package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js +2 -1
  174. package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
  175. package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js +6 -5
  176. package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
  177. package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js +21 -8
  178. package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
  179. package/lib/module/shared/utils/bounds/helpers/resolve-bounds-pair-key.js +18 -0
  180. package/lib/module/shared/utils/bounds/helpers/resolve-bounds-pair-key.js.map +1 -0
  181. package/lib/module/shared/utils/bounds/navigation/reveal/build.js +90 -198
  182. package/lib/module/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
  183. package/lib/module/shared/utils/bounds/navigation/reveal/config.js +14 -1
  184. package/lib/module/shared/utils/bounds/navigation/reveal/config.js.map +1 -1
  185. package/lib/module/shared/utils/bounds/navigation/reveal/math.js +144 -12
  186. package/lib/module/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
  187. package/lib/module/shared/utils/navigation/resolve-scene-neighbors.js +20 -19
  188. package/lib/module/shared/utils/navigation/resolve-scene-neighbors.js.map +1 -1
  189. package/lib/typescript/component-stack/components/component-screen.d.ts.map +1 -1
  190. package/lib/typescript/shared/components/create-boundary-component/create-boundary-component.d.ts +1 -0
  191. package/lib/typescript/shared/components/create-boundary-component/create-boundary-component.d.ts.map +1 -1
  192. package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-presence.d.ts +1 -1
  193. package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-presence.d.ts.map +1 -1
  194. package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.d.ts +5 -4
  195. package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.d.ts.map +1 -1
  196. package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-source-measurement.d.ts +6 -2
  197. package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-source-measurement.d.ts.map +1 -1
  198. package/lib/typescript/shared/components/create-boundary-component/hooks/use-measurer.d.ts +5 -4
  199. package/lib/typescript/shared/components/create-boundary-component/hooks/use-measurer.d.ts.map +1 -1
  200. package/lib/typescript/shared/components/create-boundary-component/hooks/use-refresh-boundary.d.ts +7 -7
  201. package/lib/typescript/shared/components/create-boundary-component/hooks/use-refresh-boundary.d.ts.map +1 -1
  202. package/lib/typescript/shared/components/create-boundary-component/index.d.ts.map +1 -1
  203. package/lib/typescript/shared/components/create-boundary-component/types.d.ts +11 -7
  204. package/lib/typescript/shared/components/create-boundary-component/types.d.ts.map +1 -1
  205. package/lib/typescript/shared/components/create-boundary-component/utils/destination-signals.d.ts +10 -0
  206. package/lib/typescript/shared/components/create-boundary-component/utils/destination-signals.d.ts.map +1 -0
  207. package/lib/typescript/shared/components/create-boundary-component/{hooks/helpers/scroll-measurement.d.ts → utils/measured-bounds.d.ts} +3 -2
  208. package/lib/typescript/shared/components/create-boundary-component/utils/measured-bounds.d.ts.map +1 -0
  209. package/lib/typescript/shared/components/create-boundary-component/utils/refresh-signals.d.ts +22 -0
  210. package/lib/typescript/shared/components/create-boundary-component/utils/refresh-signals.d.ts.map +1 -0
  211. package/lib/typescript/shared/components/create-boundary-component/utils/source-signals.d.ts +16 -0
  212. package/lib/typescript/shared/components/create-boundary-component/utils/source-signals.d.ts.map +1 -0
  213. package/lib/typescript/shared/components/native-screen.d.ts.map +1 -1
  214. package/lib/typescript/shared/constants.d.ts +0 -5
  215. package/lib/typescript/shared/constants.d.ts.map +1 -1
  216. package/lib/typescript/shared/index.d.ts +1 -1
  217. package/lib/typescript/shared/index.d.ts.map +1 -1
  218. package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts +21 -0
  219. package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts.map +1 -0
  220. package/lib/typescript/shared/providers/register-bounds.provider.d.ts.map +1 -1
  221. package/lib/typescript/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.d.ts.map +1 -1
  222. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts +0 -1
  223. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts.map +1 -1
  224. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts +1 -1
  225. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
  226. package/lib/typescript/shared/providers/screen/gestures/pan/pan-activation.d.ts.map +1 -1
  227. package/lib/typescript/shared/providers/screen/gestures/pan/pan-lifecycle.d.ts.map +1 -1
  228. package/lib/typescript/shared/providers/screen/gestures/pan/pan-release.d.ts.map +1 -1
  229. package/lib/typescript/shared/providers/screen/gestures/pan/pan-reset.d.ts +2 -1
  230. package/lib/typescript/shared/providers/screen/gestures/pan/pan-reset.d.ts.map +1 -1
  231. package/lib/typescript/shared/providers/screen/gestures/pan/use-pan-behavior.d.ts.map +1 -1
  232. package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-activation.d.ts.map +1 -1
  233. package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-lifecycle.d.ts.map +1 -1
  234. package/lib/typescript/shared/providers/screen/gestures/pinch/use-pinch-behavior.d.ts.map +1 -1
  235. package/lib/typescript/shared/providers/screen/gestures/shared/physics.d.ts +7 -0
  236. package/lib/typescript/shared/providers/screen/gestures/shared/physics.d.ts.map +1 -1
  237. package/lib/typescript/shared/providers/screen/gestures/shared/policy.d.ts +0 -10
  238. package/lib/typescript/shared/providers/screen/gestures/shared/policy.d.ts.map +1 -1
  239. package/lib/typescript/shared/providers/screen/gestures/types.d.ts +2 -0
  240. package/lib/typescript/shared/providers/screen/gestures/types.d.ts.map +1 -1
  241. package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -1
  242. package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts +18 -0
  243. package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts.map +1 -0
  244. package/lib/typescript/shared/stores/bounds/index.d.ts +6 -12
  245. package/lib/typescript/shared/stores/bounds/index.d.ts.map +1 -1
  246. package/lib/typescript/shared/stores/bounds/internals/clear.d.ts.map +1 -1
  247. package/lib/typescript/shared/stores/bounds/internals/entries.d.ts.map +1 -1
  248. package/lib/typescript/shared/stores/bounds/internals/links.d.ts +13 -10
  249. package/lib/typescript/shared/stores/bounds/internals/links.d.ts.map +1 -1
  250. package/lib/typescript/shared/stores/bounds/internals/resolver.d.ts.map +1 -1
  251. package/lib/typescript/shared/stores/bounds/internals/state.d.ts +26 -5
  252. package/lib/typescript/shared/stores/bounds/internals/state.d.ts.map +1 -1
  253. package/lib/typescript/shared/stores/bounds/types.d.ts +14 -7
  254. package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
  255. package/lib/typescript/shared/stores/gesture.store.d.ts +1 -0
  256. package/lib/typescript/shared/stores/gesture.store.d.ts.map +1 -1
  257. package/lib/typescript/shared/types/animation.types.d.ts +0 -18
  258. package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
  259. package/lib/typescript/shared/types/gesture.types.d.ts +8 -1
  260. package/lib/typescript/shared/types/gesture.types.d.ts.map +1 -1
  261. package/lib/typescript/shared/types/index.d.ts +1 -1
  262. package/lib/typescript/shared/types/index.d.ts.map +1 -1
  263. package/lib/typescript/shared/utils/bounds/helpers/create-bounds-accessor-core.d.ts.map +1 -1
  264. package/lib/typescript/shared/utils/bounds/helpers/create-link-accessor.d.ts.map +1 -1
  265. package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts +1 -1
  266. package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts.map +1 -1
  267. package/lib/typescript/shared/utils/bounds/helpers/resolve-bounds-pair-key.d.ts +4 -0
  268. package/lib/typescript/shared/utils/bounds/helpers/resolve-bounds-pair-key.d.ts.map +1 -0
  269. package/lib/typescript/shared/utils/bounds/navigation/reveal/build.d.ts.map +1 -1
  270. package/lib/typescript/shared/utils/bounds/navigation/reveal/config.d.ts +14 -1
  271. package/lib/typescript/shared/utils/bounds/navigation/reveal/config.d.ts.map +1 -1
  272. package/lib/typescript/shared/utils/bounds/navigation/reveal/math.d.ts +48 -7
  273. package/lib/typescript/shared/utils/bounds/navigation/reveal/math.d.ts.map +1 -1
  274. package/lib/typescript/shared/utils/bounds/types/options.d.ts +2 -3
  275. package/lib/typescript/shared/utils/bounds/types/options.d.ts.map +1 -1
  276. package/lib/typescript/shared/utils/navigation/resolve-scene-neighbors.d.ts +3 -2
  277. package/lib/typescript/shared/utils/navigation/resolve-scene-neighbors.d.ts.map +1 -1
  278. package/package.json +1 -1
  279. package/src/component-stack/components/component-screen.tsx +3 -11
  280. package/src/shared/components/create-boundary-component/create-boundary-component.tsx +30 -27
  281. package/src/shared/components/create-boundary-component/hooks/use-boundary-presence.ts +5 -5
  282. package/src/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.ts +25 -24
  283. package/src/shared/components/create-boundary-component/hooks/use-initial-source-measurement.ts +41 -11
  284. package/src/shared/components/create-boundary-component/hooks/use-measurer.ts +49 -64
  285. package/src/shared/components/create-boundary-component/hooks/use-refresh-boundary.ts +44 -83
  286. package/src/shared/components/create-boundary-component/index.tsx +3 -1
  287. package/src/shared/components/create-boundary-component/types.ts +13 -11
  288. package/src/shared/components/create-boundary-component/utils/destination-signals.ts +129 -0
  289. package/src/shared/components/create-boundary-component/{hooks/helpers/scroll-measurement.ts → utils/measured-bounds.ts} +25 -1
  290. package/src/shared/components/create-boundary-component/utils/refresh-signals.ts +164 -0
  291. package/src/shared/components/create-boundary-component/utils/source-signals.ts +72 -0
  292. package/src/shared/components/native-screen.tsx +3 -12
  293. package/src/shared/constants.ts +1 -6
  294. package/src/shared/index.ts +0 -3
  295. package/src/shared/providers/helpers/measured-bounds-writes.ts +67 -0
  296. package/src/shared/providers/register-bounds.provider.tsx +68 -91
  297. package/src/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.ts +0 -14
  298. package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/index.ts +1 -2
  299. package/src/shared/providers/screen/animation/helpers/pipeline.ts +1 -4
  300. package/src/shared/providers/screen/gestures/pan/pan-activation.ts +4 -1
  301. package/src/shared/providers/screen/gestures/pan/pan-lifecycle.ts +18 -2
  302. package/src/shared/providers/screen/gestures/pan/pan-release.ts +33 -0
  303. package/src/shared/providers/screen/gestures/pan/pan-reset.ts +3 -0
  304. package/src/shared/providers/screen/gestures/pan/use-pan-behavior.ts +9 -6
  305. package/src/shared/providers/screen/gestures/pinch/pinch-activation.ts +5 -2
  306. package/src/shared/providers/screen/gestures/pinch/pinch-lifecycle.ts +1 -0
  307. package/src/shared/providers/screen/gestures/pinch/use-pinch-behavior.ts +9 -6
  308. package/src/shared/providers/screen/gestures/shared/physics.ts +25 -0
  309. package/src/shared/providers/screen/gestures/shared/policy.ts +3 -5
  310. package/src/shared/providers/screen/gestures/types.ts +2 -0
  311. package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +0 -3
  312. package/src/shared/stores/bounds/helpers/link-pairs.helpers.ts +161 -0
  313. package/src/shared/stores/bounds/index.ts +10 -20
  314. package/src/shared/stores/bounds/internals/clear.ts +17 -41
  315. package/src/shared/stores/bounds/internals/entries.ts +56 -13
  316. package/src/shared/stores/bounds/internals/links.ts +222 -113
  317. package/src/shared/stores/bounds/internals/resolver.ts +23 -87
  318. package/src/shared/stores/bounds/internals/state.ts +27 -5
  319. package/src/shared/stores/bounds/types.ts +17 -7
  320. package/src/shared/stores/gesture.store.ts +3 -0
  321. package/src/shared/types/animation.types.ts +0 -23
  322. package/src/shared/types/gesture.types.ts +8 -2
  323. package/src/shared/types/index.ts +0 -4
  324. package/src/shared/utils/bounds/helpers/create-bounds-accessor-core.ts +1 -0
  325. package/src/shared/utils/bounds/helpers/create-link-accessor.ts +6 -6
  326. package/src/shared/utils/bounds/helpers/prepare-bound-styles.ts +20 -11
  327. package/src/shared/utils/bounds/helpers/resolve-bounds-pair-key.ts +22 -0
  328. package/src/shared/utils/bounds/navigation/reveal/build.ts +153 -297
  329. package/src/shared/utils/bounds/navigation/reveal/config.ts +20 -1
  330. package/src/shared/utils/bounds/navigation/reveal/math.ts +234 -18
  331. package/src/shared/utils/bounds/types/options.ts +2 -3
  332. package/src/shared/utils/navigation/resolve-scene-neighbors.ts +36 -23
  333. package/lib/commonjs/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js +0 -43
  334. package/lib/commonjs/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js.map +0 -1
  335. package/lib/commonjs/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js +0 -17
  336. package/lib/commonjs/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js.map +0 -1
  337. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js +0 -28
  338. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js.map +0 -1
  339. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +0 -75
  340. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +0 -1
  341. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement.js +0 -20
  342. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement.js.map +0 -1
  343. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/scroll-measurement.js.map +0 -1
  344. package/lib/commonjs/shared/components/create-boundary-component/utils/build-boundary-match-key.js +0 -16
  345. package/lib/commonjs/shared/components/create-boundary-component/utils/build-boundary-match-key.js.map +0 -1
  346. package/lib/commonjs/shared/providers/layout-anchor.provider.js +0 -86
  347. package/lib/commonjs/shared/providers/layout-anchor.provider.js.map +0 -1
  348. package/lib/commonjs/shared/stores/bounds/helpers/entries.helpers.js +0 -49
  349. package/lib/commonjs/shared/stores/bounds/helpers/entries.helpers.js.map +0 -1
  350. package/lib/commonjs/shared/stores/bounds/helpers/find-latest.js +0 -25
  351. package/lib/commonjs/shared/stores/bounds/helpers/find-latest.js.map +0 -1
  352. package/lib/commonjs/shared/stores/bounds/helpers/groups.helpers.js +0 -30
  353. package/lib/commonjs/shared/stores/bounds/helpers/groups.helpers.js.map +0 -1
  354. package/lib/commonjs/shared/stores/bounds/helpers/link.helpers.js +0 -79
  355. package/lib/commonjs/shared/stores/bounds/helpers/link.helpers.js.map +0 -1
  356. package/lib/commonjs/shared/stores/bounds/helpers/matching.js +0 -13
  357. package/lib/commonjs/shared/stores/bounds/helpers/matching.js.map +0 -1
  358. package/lib/commonjs/shared/stores/bounds/helpers/tag-state.helpers.js +0 -30
  359. package/lib/commonjs/shared/stores/bounds/helpers/tag-state.helpers.js.map +0 -1
  360. package/lib/commonjs/shared/stores/bounds/internals/groups.js +0 -102
  361. package/lib/commonjs/shared/stores/bounds/internals/groups.js.map +0 -1
  362. package/lib/module/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js +0 -38
  363. package/lib/module/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js.map +0 -1
  364. package/lib/module/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js +0 -12
  365. package/lib/module/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js.map +0 -1
  366. package/lib/module/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js +0 -23
  367. package/lib/module/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js.map +0 -1
  368. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +0 -68
  369. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +0 -1
  370. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement.js +0 -15
  371. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement.js.map +0 -1
  372. package/lib/module/shared/components/create-boundary-component/hooks/helpers/scroll-measurement.js.map +0 -1
  373. package/lib/module/shared/components/create-boundary-component/utils/build-boundary-match-key.js +0 -12
  374. package/lib/module/shared/components/create-boundary-component/utils/build-boundary-match-key.js.map +0 -1
  375. package/lib/module/shared/providers/layout-anchor.provider.js +0 -80
  376. package/lib/module/shared/providers/layout-anchor.provider.js.map +0 -1
  377. package/lib/module/shared/stores/bounds/helpers/entries.helpers.js +0 -42
  378. package/lib/module/shared/stores/bounds/helpers/entries.helpers.js.map +0 -1
  379. package/lib/module/shared/stores/bounds/helpers/find-latest.js +0 -19
  380. package/lib/module/shared/stores/bounds/helpers/find-latest.js.map +0 -1
  381. package/lib/module/shared/stores/bounds/helpers/groups.helpers.js +0 -23
  382. package/lib/module/shared/stores/bounds/helpers/groups.helpers.js.map +0 -1
  383. package/lib/module/shared/stores/bounds/helpers/link.helpers.js +0 -69
  384. package/lib/module/shared/stores/bounds/helpers/link.helpers.js.map +0 -1
  385. package/lib/module/shared/stores/bounds/helpers/matching.js +0 -9
  386. package/lib/module/shared/stores/bounds/helpers/matching.js.map +0 -1
  387. package/lib/module/shared/stores/bounds/helpers/tag-state.helpers.js +0 -24
  388. package/lib/module/shared/stores/bounds/helpers/tag-state.helpers.js.map +0 -1
  389. package/lib/module/shared/stores/bounds/internals/groups.js +0 -95
  390. package/lib/module/shared/stores/bounds/internals/groups.js.map +0 -1
  391. package/lib/typescript/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.d.ts +0 -15
  392. package/lib/typescript/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.d.ts.map +0 -1
  393. package/lib/typescript/shared/components/create-boundary-component/helpers/resolve-pending-source-key.d.ts +0 -2
  394. package/lib/typescript/shared/components/create-boundary-component/helpers/resolve-pending-source-key.d.ts.map +0 -1
  395. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.d.ts +0 -22
  396. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.d.ts.map +0 -1
  397. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts +0 -29
  398. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts.map +0 -1
  399. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement.d.ts +0 -3
  400. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement.d.ts.map +0 -1
  401. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/scroll-measurement.d.ts.map +0 -1
  402. package/lib/typescript/shared/components/create-boundary-component/utils/build-boundary-match-key.d.ts +0 -8
  403. package/lib/typescript/shared/components/create-boundary-component/utils/build-boundary-match-key.d.ts.map +0 -1
  404. package/lib/typescript/shared/providers/layout-anchor.provider.d.ts +0 -39
  405. package/lib/typescript/shared/providers/layout-anchor.provider.d.ts.map +0 -1
  406. package/lib/typescript/shared/stores/bounds/helpers/entries.helpers.d.ts +0 -5
  407. package/lib/typescript/shared/stores/bounds/helpers/entries.helpers.d.ts.map +0 -1
  408. package/lib/typescript/shared/stores/bounds/helpers/find-latest.d.ts +0 -3
  409. package/lib/typescript/shared/stores/bounds/helpers/find-latest.d.ts.map +0 -1
  410. package/lib/typescript/shared/stores/bounds/helpers/groups.helpers.d.ts +0 -10
  411. package/lib/typescript/shared/stores/bounds/helpers/groups.helpers.d.ts.map +0 -1
  412. package/lib/typescript/shared/stores/bounds/helpers/link.helpers.d.ts +0 -14
  413. package/lib/typescript/shared/stores/bounds/helpers/link.helpers.d.ts.map +0 -1
  414. package/lib/typescript/shared/stores/bounds/helpers/matching.d.ts +0 -3
  415. package/lib/typescript/shared/stores/bounds/helpers/matching.d.ts.map +0 -1
  416. package/lib/typescript/shared/stores/bounds/helpers/tag-state.helpers.d.ts +0 -5
  417. package/lib/typescript/shared/stores/bounds/helpers/tag-state.helpers.d.ts.map +0 -1
  418. package/lib/typescript/shared/stores/bounds/internals/groups.d.ts +0 -16
  419. package/lib/typescript/shared/stores/bounds/internals/groups.d.ts.map +0 -1
  420. package/src/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.ts +0 -83
  421. package/src/shared/components/create-boundary-component/helpers/resolve-pending-source-key.ts +0 -20
  422. package/src/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.ts +0 -48
  423. package/src/shared/components/create-boundary-component/hooks/helpers/measurement-rules.ts +0 -101
  424. package/src/shared/components/create-boundary-component/hooks/helpers/measurement.ts +0 -25
  425. package/src/shared/components/create-boundary-component/utils/build-boundary-match-key.ts +0 -14
  426. package/src/shared/providers/layout-anchor.provider.tsx +0 -112
  427. package/src/shared/stores/bounds/helpers/entries.helpers.ts +0 -55
  428. package/src/shared/stores/bounds/helpers/find-latest.ts +0 -22
  429. package/src/shared/stores/bounds/helpers/groups.helpers.ts +0 -27
  430. package/src/shared/stores/bounds/helpers/link.helpers.ts +0 -131
  431. package/src/shared/stores/bounds/helpers/matching.ts +0 -11
  432. package/src/shared/stores/bounds/helpers/tag-state.helpers.ts +0 -24
  433. package/src/shared/stores/bounds/internals/groups.ts +0 -116
@@ -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,gCA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,MAAMiC,SAAS,GAAGP,UAAU,CAACE,GAAG,CAAC,CAAC;IAElC,MAAMM,qBAAqB,GAC1Bb,2BAA2B,CAACO,GAAG,CAAC,CAAC,KACjCtB,8BAA8B,CAAC6B,IAAI;IAEpC,MAAMC,uBAAuB,GAAGnB,QAAQ,CAACW,GAAG,CAAC,CAAC,IAAI,CAAC;IAEnD,IAAI,CAACM,qBAAqB,IAAI,CAACE,uBAAuB,EAAE;MACvD,OAAO,CAAC,CAAC,EAAEH,SAAS,CAAC;IACtB;IAEA,MAAMI,WAAW,GAAG7B,iBAAiB,CAAC;MACrCI,cAAc;MACdE,gBAAgB;MAChBC;IACD,CAAC,CAAC;IAEF,MAAMuB,WAAW,GAAG7B,wCAAwC,CAAC;MAC5DI,OAAO;MACPR,kBAAkB,EAAEgC,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,SAASC,cAAc,QAAQ,wCAAwC;AACvE,SAASC,KAAK,QAAQ,wCAAwC;AAC9D,SACCC,8BAA8B,EAC9BC,WAAW,QACL,8BAA8B;AAErC,SAASC,mCAAmC,QAAQ,8BAA8B;AAElF,MAAMC,uBAAuB,GAAG,EAAE;AAWlC,OAAO,MAAMC,gCAAgC,GAAGA,CAAC;EAChDC,MAAM;EACNC,OAAO;EACPC,gBAAgB;EAChBC,wBAAwB;EACxBC,kBAAkB;EAClBC;AACuC,CAAC,KAAK;EAC7C,MAAMC,QAAQ,GAAGd,cAAc,CAACe,QAAQ,CAACL,gBAAgB,EAAE,UAAU,CAAC;EACtE,MAAMM,MAAM,GAAGZ,WAAW,CAACa,MAAM,CAACP,gBAAgB,CAAC;EACnD,MAAM;IAAEQ;EAA4B,CAAC,GAAGF,MAAM;EAC9C,MAAM;IAAEG,mBAAmB;IAAEC;EAAsB,CAAC,GAAGJ,MAAM,CAACK,OAAO;EACrE,MAAMC,wBAAwB,GAAGzB,cAAc,CAAC,CAAC,CAAC;EAClD,MAAM0B,UAAU,GAAG1B,cAAc,CAAC,CAAC,CAAC;EAEpC,MAAM2B,2BAA2B,GAAGA,CAAA,KAAM;I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C,CAAC,GAAGY;IACtD,CAAC,CAAC;IAEF,OAAO,CAACH,kBAAkB,EAAEJ,SAAS,CAAC;EACvC,CAAC,EACD,CAAC,CAACI,kBAAkB,CAAC,KAAK;IACzB,SAAS;;IACT,IAAI,CAACA,kBAAkB,EAAE;MACxBP,0BAA0B,CAAC,CAAC;MAC5B;IACD;IAEAH,2BAA2B,CAAC,CAAC;IAC7BX,eAAe,CAAC;MACfyB,IAAI,EAAE,aAAa;MACnBC,OAAO,EAAEL;IACV,CAAC,CAAC;IAEF,MAAMM,mBAAmB,GACxBvC,cAAc,CAACiC,kBAAkB,EAAE1B,MAAM,CAAC,KAAK,IAAI;IAEpD,IAAIgC,mBAAmB,EAAE;MACxBb,0BAA0B,CAAC,CAAC;MAC5B;IACD;IAEAC,qBAAqB,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":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-measurer.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,OAAO;AAEnC,SAASC,mBAAmB,QAAQ,cAAc;AAElD,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,SAASC,yBAAyB,QAAQ,yCAAyC;AAEnF,SAASC,iBAAiB,QAAQ,iCAAiC;AACnE,SAASC,uBAAuB,QAAQ,uBAAuB;AAC/D,SACCC,yBAAyB,EACzBC,qBAAqB,QACf,6BAA6B;AACpC,SAASC,8BAA8B,QAAQ,8BAA8B;AAW7E,OAAO,MAAMC,WAAW,GAAGA,CAAC;EAC3BC,OAAO;EACPC,cAAc;EACdC,wBAAwB;EACxBC,gBAAgB;EAChBC,cAAc;EACdC;AACkB,CAAC,KAAK;EACxB,MAAM;IAAEC,KAAK,EAAEC,aAAa;IAAEC,MAAM,EAAEC;EAAe,CAAC,GACrDnB,mBAAmB,CAAC,CAAC;EAEtB,MAAMoB,WAAW,GAAGnB,WAAW,CAACoB,QAAQ,CAACR,gBAAgB,EAAE,OAAO,CAAC;EACnE,MAAMS,+BAA+B,GAAGpB,WAAW,CA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sBAAsB,GAC3BZ,YAAY,CAACC,eAAe,IAC5BD,YAAY,CAACG,kBAAkB,IAC/BI,iBAAiB,CAACC,oBAAoB,IACtCD,iBAAiB,CAACG,uBAAuB;IAE1C,IAAI,CAACE,sBAAsB,EAAE;IAE7B3C,yBAAyB,CAAC;MACzBQ,cAAc;MACdE,gBAAgB;MAChBmB,QAAQ;MACRlB,cAAc;MACdiC,uBAAuB,EAAEtB,WAAW,CAACsB,uBAAuB;MAC5D,GAAGb,YAAY;MACf,GAAGO;IACJ,CAAC,CAAC;EACH,CAAC,EACD,CACC/B,OAAO,EACPC,cAAc,EACdC,wBAAwB,EACxBC,gBAAgB,EAChBC,cAAc,EACdC,mBAAmB,EACnBE,aAAa,EACbE,cAAc,EACdC,WAAW,EACXE,+BAA+B,CAEjC,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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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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,KAAKK,iBAAiB,EACpE;IAED,MAAMC,oBAAoB,GAAGpB,KAAK,GAAGP,gBAAgB,CAACO,KAAK,CAAC,GAAG,IAAI;IAEnE,IAAIA,KAAK,IAAIoB,oBAAoB,KAAKC,MAAM,CAACtB,EAAE,CAAC,EAAE;MACjD;IACD;IAEA,IAAII,aAAa,EAAE;MAClB,IACC,CAACD,aAAa,IACd,CAACP,aAAa,CAACG,cAAc,EAAEG,gBAAgB,CAAC,IAChD,CAACP,kBAAkB,CAACI,cAAc,EAAEI,aAAa,CAAC,EACjD;QACD;MACD;MAEAE,eAAe,CAAC;QAAEkB,MAAM,EAAE;MAAiB,CAAC,CAAC;MAC7C;IACD;IAEAlB,eAAe,CAAC;MACfkB,MAAM,EAAE;IACT,CAAC,CAAC;EACH,CACD,CAAC;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;EAC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,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":[]}
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+
3
+ import { createPendingPairKey, createScreenPairKey, getDestinationScreenKeyFromPairKey, getSourceScreenKeyFromPairKey } from "../../../stores/bounds/helpers/link-pairs.helpers";
4
+ import { getDestination, getSource } from "../../../stores/bounds/internals/links";
5
+ const findPendingSourcePairKey = (linkState, linkId) => {
6
+ "worklet";
7
+
8
+ if (!linkState) return null;
9
+ for (const pairKey in linkState) {
10
+ const sourceScreenKey = getSourceScreenKeyFromPairKey(pairKey);
11
+ if (pairKey !== createPendingPairKey(sourceScreenKey)) {
12
+ continue;
13
+ }
14
+ if (linkState[pairKey]?.links?.[linkId]?.source) {
15
+ return pairKey;
16
+ }
17
+ }
18
+ return null;
19
+ };
20
+
21
+ // Passive Boundary.View sources in nested routes can already live in the final
22
+ // ancestor pair, even before the destination side has attached.
23
+ const findAncestorSourcePairKey = (linkState, linkId, destinationScreenKey) => {
24
+ "worklet";
25
+
26
+ if (!linkState || !destinationScreenKey) return null;
27
+ for (const pairKey in linkState) {
28
+ if (getDestinationScreenKeyFromPairKey(pairKey) !== destinationScreenKey) {
29
+ continue;
30
+ }
31
+ if (linkState[pairKey]?.links?.[linkId]?.source) {
32
+ return pairKey;
33
+ }
34
+ }
35
+ return null;
36
+ };
37
+ export const getInitialDestinationMeasurePairKey = params => {
38
+ "worklet";
39
+
40
+ const {
41
+ enabled,
42
+ currentScreenKey,
43
+ preferredSourceScreenKey,
44
+ ancestorScreenKeys,
45
+ linkId,
46
+ linkState
47
+ } = params;
48
+ if (!enabled) {
49
+ return null;
50
+ }
51
+
52
+ // Initial screens inside nested navigators measure concrete child views, but
53
+ // the transition pair belongs to the nearest animated ancestor route.
54
+ const ancestorPairKey = findAncestorSourcePairKey(linkState, linkId, ancestorScreenKeys?.[0]);
55
+
56
+ // Trigger sources start as pending screen<> links. Boundary.View sources may
57
+ // already be in the ancestor pair, so only scan pending when needed.
58
+ const pendingSourcePairKey = preferredSourceScreenKey ? createPendingPairKey(preferredSourceScreenKey) : ancestorPairKey ? null : findPendingSourcePairKey(linkState, linkId);
59
+ const sourceScreenKey = preferredSourceScreenKey ? preferredSourceScreenKey : getSourceScreenKeyFromPairKey(ancestorPairKey ?? pendingSourcePairKey ?? "");
60
+ if (!sourceScreenKey) return null;
61
+
62
+ // Non-nested destinations attach to their own route. Nested initial screens
63
+ // attach to the animated ancestor route unless that pair already exists.
64
+ const destinationScreenKey = ancestorPairKey || preferredSourceScreenKey || !ancestorScreenKeys?.[0] ? currentScreenKey : ancestorScreenKeys[0];
65
+ const destinationPairKey = ancestorPairKey ?? createScreenPairKey(sourceScreenKey, destinationScreenKey);
66
+ const hasDestinationLink = getDestination(destinationPairKey, linkId) !== null;
67
+ const hasAttachableSourceLink = getSource(destinationPairKey, linkId) !== null || !!pendingSourcePairKey && getSource(pendingSourcePairKey, linkId) !== null;
68
+ return hasAttachableSourceLink && !hasDestinationLink ? destinationPairKey : null;
69
+ };
70
+ //# sourceMappingURL=destination-signals.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createPendingPairKey","createScreenPairKey","getDestinationScreenKeyFromPairKey","getSourceScreenKeyFromPairKey","getDestination","getSource","findPendingSourcePairKey","linkState","linkId","pairKey","sourceScreenKey","links","source","findAncestorSourcePairKey","destinationScreenKey","getInitialDestinationMeasurePairKey","params","enabled","currentScreenKey","preferredSourceScreenKey","ancestorScreenKeys","ancestorPairKey","pendingSourcePairKey","destinationPairKey","hasDestinationLink","hasAttachableSourceLink"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/utils/destination-signals.ts"],"mappings":";;AAAA,SACCA,oBAAoB,EACpBC,mBAAmB,EACnBC,kCAAkC,EAClCC,6BAA6B,QACvB,mDAAmD;AAC1D,SACCC,cAAc,EACdC,SAAS,QACH,wCAAwC;AAM/C,MAAMC,wBAAwB,GAAGA,CAChCC,SAAqC,EACrCC,MAAc,KACY;EAC1B,SAAS;;EACT,IAAI,CAACD,SAAS,EAAE,OAAO,IAAI;EAE3B,KAAK,MAAME,OAAO,IAAIF,SAAS,EAAE;IAChC,MAAMG,eAAe,GAAGP,6BAA6B,CAACM,OAAO,CAAC;IAE9D,IAAIA,OAAO,KAAKT,oBAAoB,CAACU,eAAe,CAAC,EAAE;MACtD;IACD;IAEA,IAAIH,SAAS,CAACE,OAAO,CAAC,EAAEE,KAAK,GAAGH,MAAM,CAAC,EAAEI,MAAM,EAAE;MAChD,OAAOH,OAAO;IACf;EACD;EAEA,OAAO,IAAI;AACZ,CAAC;;AAED;AACA;AACA,MAAMI,yBAAyB,GAAGA,CACjCN,SAAqC,EACrCC,MAAc,EACdM,oBAAwC,KACd;EAC1B,SAAS;;EACT,IAAI,CAACP,SAAS,IAAI,CAACO,oBAAoB,EA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AAM,CAAC,KAAK,IAAI;EAEpD,MAAMiB,uBAAuB,GAC5BpB,SAAS,CAACkB,kBAAkB,EAAEf,MAAM,CAAC,KAAK,IAAI,IAC7C,CAAC,CAACc,oBAAoB,IACtBjB,SAAS,CAACiB,oBAAoB,EAAEd,MAAM,CAAC,KAAK,IAAK;EAEnD,OAAOiB,uBAAuB,IAAI,CAACD,kBAAkB,GAClDD,kBAAkB,GAClB,IAAI;AACR,CAAC","ignoreList":[]}
@@ -29,6 +29,18 @@ export const adjustedMeasuredBoundsForOverscrollDeltas = (measured, scrollState)
29
29
  pageY: measured.pageY + deltaY
30
30
  };
31
31
  };
32
+ export const isMeasurementInViewport = (measured, viewportWidth, viewportHeight) => {
33
+ "worklet";
34
+
35
+ if (measured.width <= 0 || measured.height <= 0) {
36
+ return false;
37
+ }
38
+ const toleranceX = viewportWidth * 0.15;
39
+ const toleranceY = viewportHeight * 0.15;
40
+ const centerX = measured.pageX + measured.width / 2;
41
+ const centerY = measured.pageY + measured.height / 2;
42
+ return centerX >= -toleranceX && centerX <= viewportWidth + toleranceX && centerY >= -toleranceY && centerY <= viewportHeight + toleranceY;
43
+ };
32
44
  export const measureWithOverscrollAwareness = (ref, scrollState) => {
33
45
  "worklet";
34
46
 
@@ -36,4 +48,4 @@ export const measureWithOverscrollAwareness = (ref, scrollState) => {
36
48
  if (!measured) return null;
37
49
  return adjustedMeasuredBoundsForOverscrollDeltas(measured, scrollState);
38
50
  };
39
- //# sourceMappingURL=scroll-measurement.js.map
51
+ //# sourceMappingURL=measured-bounds.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["measure","SCROLL_MEASUREMENT_EPSILON","getOverscrollDelta","axisState","maxOffset","Math","max","contentSize","layoutSize","clampedOffset","min","offset","delta","abs","adjustedMeasuredBoundsForOverscrollDeltas","measured","scrollState","deltaX","horizontal","deltaY","vertical","x","y","pageX","pageY","isMeasurementInViewport","viewportWidth","viewportHeight","width","height","toleranceX","toleranceY","centerX","centerY","measureWithOverscrollAwareness","ref"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/utils/measured-bounds.ts"],"mappings":";;AACA,SAGCA,OAAO,QACD,yBAAyB;AAMhC,MAAMC,0BAA0B,GAAG,CAAC;AAEpC,MAAMC,kBAAkB,GAAIC,SAAiC,IAAa;EACzE,SAAS;;EACT,MAAMC,SAAS,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEH,SAAS,CAACI,WAAW,GAAGJ,SAAS,CAACK,UAAU,CAAC;EAC3E,MAAMC,aAAa,GAAGJ,IAAI,CAACK,GAAG,CAACL,IAAI,CAACC,GAAG,CAACH,SAAS,CAACQ,MAAM,EAAE,CAAC,CAAC,EAAEP,SAAS,CAAC;EACxE,MAAMQ,KAAK,GAAGT,SAAS,CAACQ,MAAM,GAAGF,aAAa;EAE9C,OAAOJ,IAAI,CAACQ,GAAG,CAACD,KAAK,CAAC,GAAGX,0BAA0B,GAAGW,KAAK,GAAG,CAAC;AAChE,CAAC;AAED,OAAO,MAAME,yCAAyC,GAAGA,CACxDC,QAA4B,EAC5BC,WAAsC,KACd;EACxB,SAAS;;EAET,IAAI,CAACA,WAAW,EAAE;IACjB,OAAOD,QAAQ;EAChB;EAEA,MAAME,MAAM,GAAGf,kBAAkB,CAACc,WAAW,CAACE,UAAU,CAAC;EACzD,MAAMC,MAAM,GAAGjB,kBAAkB,CAACc,WAAW,CAACI,QAAQ,CAAC;EAEvD,IAAIH,MAAM,KAAK,CAAC,IAAIE,MAAM,KAAK,CAAC,EAAE;IACjC,OAAOJ,QAAQ;EAChB;EAEA,OAAO;IACN,GAAGA,QAAQ;IACXM,CAAC,EAAEN,QAAQ,CAACM,CAAC,GAAGJ,MAAM;IACtBK,CAAC,EAAEP,QAAQ,CAACO,CAAC,GAAGH,MAAM;IACtBI,KAAK,EAAER,QAAQ,CAACQ,KAAK,GAAGN,MAAM;IAC9BO,KAAK,EAAET,QAAQ,CAACS,KAAK,GAAGL;EACzB,CAAC;AACF,CA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