react-native-screen-transitions 3.12.0 → 3.13.0-beta.0

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 (336) hide show
  1. package/lib/commonjs/shared/components/activity/variants/activity-screen.js +1 -1
  2. package/lib/commonjs/shared/components/activity/variants/activity-screen.js.map +1 -1
  3. package/lib/commonjs/shared/components/boundary/components/boundary-lifecycle.js +0 -3
  4. package/lib/commonjs/shared/components/boundary/components/boundary-lifecycle.js.map +1 -1
  5. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-boundary-measurement-request.js +69 -0
  6. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-boundary-measurement-request.js.map +1 -0
  7. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-boundary-presence.js +11 -10
  8. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-boundary-presence.js.map +1 -1
  9. package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js +3 -19
  10. package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
  11. package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js +6 -16
  12. package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js.map +1 -1
  13. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.js +27 -1
  14. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.js.map +1 -1
  15. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +26 -8
  16. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -1
  17. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +8 -1
  18. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
  19. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/attachment.js +19 -0
  20. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/attachment.js.map +1 -0
  21. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/host-readiness.js +18 -0
  22. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/host-readiness.js.map +1 -0
  23. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js +22 -1
  24. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js.map +1 -1
  25. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js +10 -10
  26. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js.map +1 -1
  27. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +18 -6
  28. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
  29. package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js +4 -0
  30. package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
  31. package/lib/commonjs/shared/providers/screen/animation/animation.provider.js +4 -1
  32. package/lib/commonjs/shared/providers/screen/animation/animation.provider.js.map +1 -1
  33. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +5 -1
  34. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
  35. package/lib/commonjs/shared/providers/screen/animation/helpers/interpolator-participation.js +9 -0
  36. package/lib/commonjs/shared/providers/screen/animation/helpers/interpolator-participation.js.map +1 -0
  37. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +13 -2
  38. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  39. package/lib/commonjs/shared/providers/screen/descriptors/descriptors.provider.js +40 -8
  40. package/lib/commonjs/shared/providers/screen/descriptors/descriptors.provider.js.map +1 -1
  41. package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js +2 -0
  42. package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js.map +1 -1
  43. package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-structural-ancestor-keys.js +12 -0
  44. package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-structural-ancestor-keys.js.map +1 -0
  45. package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js +1 -0
  46. package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js.map +1 -1
  47. package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/pan-release.js +9 -2
  48. package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/pan-release.js.map +1 -1
  49. package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js +1 -0
  50. package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js.map +1 -1
  51. package/lib/commonjs/shared/providers/screen/styles/constants.js +2 -1
  52. package/lib/commonjs/shared/providers/screen/styles/constants.js.map +1 -1
  53. package/lib/commonjs/shared/providers/screen/styles/helpers/visibility-block-ownership.js +19 -0
  54. package/lib/commonjs/shared/providers/screen/styles/helpers/visibility-block-ownership.js.map +1 -0
  55. package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +35 -15
  56. package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
  57. package/lib/commonjs/shared/providers/screen/styles/slot.provider.js +15 -6
  58. package/lib/commonjs/shared/providers/screen/styles/slot.provider.js.map +1 -1
  59. package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js +11 -1
  60. package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -1
  61. package/lib/commonjs/shared/stores/bounds/internals/clear.js +6 -0
  62. package/lib/commonjs/shared/stores/bounds/internals/clear.js.map +1 -1
  63. package/lib/commonjs/shared/stores/bounds/internals/coordinator.js +298 -0
  64. package/lib/commonjs/shared/stores/bounds/internals/coordinator.js.map +1 -0
  65. package/lib/commonjs/shared/stores/bounds/internals/entries.js +0 -27
  66. package/lib/commonjs/shared/stores/bounds/internals/entries.js.map +1 -1
  67. package/lib/commonjs/shared/stores/bounds/internals/links.js +22 -32
  68. package/lib/commonjs/shared/stores/bounds/internals/links.js.map +1 -1
  69. package/lib/commonjs/shared/stores/bounds/internals/screen-graph.js +45 -0
  70. package/lib/commonjs/shared/stores/bounds/internals/screen-graph.js.map +1 -0
  71. package/lib/commonjs/shared/stores/bounds/internals/state.js +4 -1
  72. package/lib/commonjs/shared/stores/bounds/internals/state.js.map +1 -1
  73. package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js +7 -3
  74. package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
  75. package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js +11 -0
  76. package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
  77. package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js +6 -2
  78. package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
  79. package/lib/commonjs/shared/utils/bounds/helpers/resolve-bounds-pair-key.js.map +1 -1
  80. package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js +11 -5
  81. package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
  82. package/lib/module/shared/components/activity/variants/activity-screen.js +1 -1
  83. package/lib/module/shared/components/activity/variants/activity-screen.js.map +1 -1
  84. package/lib/module/shared/components/boundary/components/boundary-lifecycle.js +0 -3
  85. package/lib/module/shared/components/boundary/components/boundary-lifecycle.js.map +1 -1
  86. package/lib/module/shared/components/boundary/hooks/lifecycles/use-boundary-measurement-request.js +64 -0
  87. package/lib/module/shared/components/boundary/hooks/lifecycles/use-boundary-measurement-request.js.map +1 -0
  88. package/lib/module/shared/components/boundary/hooks/lifecycles/use-boundary-presence.js +11 -10
  89. package/lib/module/shared/components/boundary/hooks/lifecycles/use-boundary-presence.js.map +1 -1
  90. package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js +3 -19
  91. package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
  92. package/lib/module/shared/components/boundary/hooks/use-measurer.js +6 -16
  93. package/lib/module/shared/components/boundary/hooks/use-measurer.js.map +1 -1
  94. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.js +24 -0
  95. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.js.map +1 -1
  96. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +27 -9
  97. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -1
  98. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +8 -1
  99. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
  100. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/attachment.js +14 -0
  101. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/attachment.js.map +1 -0
  102. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/host-readiness.js +13 -0
  103. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/host-readiness.js.map +1 -0
  104. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js +19 -0
  105. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js.map +1 -1
  106. package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js +10 -10
  107. package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js.map +1 -1
  108. package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +18 -6
  109. package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
  110. package/lib/module/shared/providers/helpers/measured-bounds-writes.js +4 -0
  111. package/lib/module/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
  112. package/lib/module/shared/providers/screen/animation/animation.provider.js +4 -1
  113. package/lib/module/shared/providers/screen/animation/animation.provider.js.map +1 -1
  114. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +5 -1
  115. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
  116. package/lib/module/shared/providers/screen/animation/helpers/interpolator-participation.js +4 -0
  117. package/lib/module/shared/providers/screen/animation/helpers/interpolator-participation.js.map +1 -0
  118. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +13 -2
  119. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  120. package/lib/module/shared/providers/screen/descriptors/descriptors.provider.js +41 -9
  121. package/lib/module/shared/providers/screen/descriptors/descriptors.provider.js.map +1 -1
  122. package/lib/module/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js +2 -0
  123. package/lib/module/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js.map +1 -1
  124. package/lib/module/shared/providers/screen/descriptors/helpers/derive-structural-ancestor-keys.js +7 -0
  125. package/lib/module/shared/providers/screen/descriptors/helpers/derive-structural-ancestor-keys.js.map +1 -0
  126. package/lib/module/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js +1 -0
  127. package/lib/module/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js.map +1 -1
  128. package/lib/module/shared/providers/screen/gestures/pan/behavior/pan-release.js +9 -2
  129. package/lib/module/shared/providers/screen/gestures/pan/behavior/pan-release.js.map +1 -1
  130. package/lib/module/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js +1 -0
  131. package/lib/module/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js.map +1 -1
  132. package/lib/module/shared/providers/screen/styles/constants.js +2 -1
  133. package/lib/module/shared/providers/screen/styles/constants.js.map +1 -1
  134. package/lib/module/shared/providers/screen/styles/helpers/visibility-block-ownership.js +14 -0
  135. package/lib/module/shared/providers/screen/styles/helpers/visibility-block-ownership.js.map +1 -0
  136. package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +35 -15
  137. package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
  138. package/lib/module/shared/providers/screen/styles/slot.provider.js +13 -5
  139. package/lib/module/shared/providers/screen/styles/slot.provider.js.map +1 -1
  140. package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js +9 -0
  141. package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -1
  142. package/lib/module/shared/stores/bounds/internals/clear.js +7 -1
  143. package/lib/module/shared/stores/bounds/internals/clear.js.map +1 -1
  144. package/lib/module/shared/stores/bounds/internals/coordinator.js +286 -0
  145. package/lib/module/shared/stores/bounds/internals/coordinator.js.map +1 -0
  146. package/lib/module/shared/stores/bounds/internals/entries.js +1 -27
  147. package/lib/module/shared/stores/bounds/internals/entries.js.map +1 -1
  148. package/lib/module/shared/stores/bounds/internals/links.js +24 -32
  149. package/lib/module/shared/stores/bounds/internals/links.js.map +1 -1
  150. package/lib/module/shared/stores/bounds/internals/screen-graph.js +39 -0
  151. package/lib/module/shared/stores/bounds/internals/screen-graph.js.map +1 -0
  152. package/lib/module/shared/stores/bounds/internals/state.js +3 -0
  153. package/lib/module/shared/stores/bounds/internals/state.js.map +1 -1
  154. package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js +7 -3
  155. package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
  156. package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js +11 -0
  157. package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
  158. package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js +6 -2
  159. package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
  160. package/lib/module/shared/utils/bounds/helpers/resolve-bounds-pair-key.js.map +1 -1
  161. package/lib/module/shared/utils/bounds/helpers/styles/compute.js +11 -5
  162. package/lib/module/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
  163. package/lib/typescript/native-stack/views/useHeaderConfigProps.d.ts +1 -1
  164. package/lib/typescript/shared/components/boundary/components/boundary-lifecycle.d.ts.map +1 -1
  165. package/lib/typescript/shared/components/boundary/hooks/lifecycles/{use-initial-source-measurement.d.ts → use-boundary-measurement-request.d.ts} +4 -3
  166. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-boundary-measurement-request.d.ts.map +1 -0
  167. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-boundary-presence.d.ts.map +1 -1
  168. package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts +1 -3
  169. package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts.map +1 -1
  170. package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts.map +1 -1
  171. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.d.ts +12 -0
  172. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.d.ts.map +1 -1
  173. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.d.ts.map +1 -1
  174. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.d.ts.map +1 -1
  175. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/attachment.d.ts +8 -0
  176. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/attachment.d.ts.map +1 -0
  177. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/host-readiness.d.ts +6 -0
  178. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/host-readiness.d.ts.map +1 -0
  179. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.d.ts +4 -1
  180. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.d.ts.map +1 -1
  181. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.d.ts +2 -3
  182. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.d.ts.map +1 -1
  183. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts.map +1 -1
  184. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-placeholder-styles.d.ts +2 -2
  185. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts +1 -1
  186. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts.map +1 -1
  187. package/lib/typescript/shared/components/boundary/types.d.ts +1 -1
  188. package/lib/typescript/shared/components/boundary/types.d.ts.map +1 -1
  189. package/lib/typescript/shared/components/create-transition-aware-component.d.ts +5 -6
  190. package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -1
  191. package/lib/typescript/shared/components/overlay/hooks/use-overlay-slot.d.ts +1 -1
  192. package/lib/typescript/shared/index.d.ts +651 -703
  193. package/lib/typescript/shared/index.d.ts.map +1 -1
  194. package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts.map +1 -1
  195. package/lib/typescript/shared/providers/screen/animation/animation.provider.d.ts.map +1 -1
  196. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts.map +1 -1
  197. package/lib/typescript/shared/providers/screen/animation/helpers/interpolator-participation.d.ts +3 -0
  198. package/lib/typescript/shared/providers/screen/animation/helpers/interpolator-participation.d.ts.map +1 -0
  199. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts +2 -1
  200. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
  201. package/lib/typescript/shared/providers/screen/descriptors/descriptors.provider.d.ts.map +1 -1
  202. package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.d.ts +4 -0
  203. package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.d.ts.map +1 -1
  204. package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-structural-ancestor-keys.d.ts +5 -0
  205. package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-structural-ancestor-keys.d.ts.map +1 -0
  206. package/lib/typescript/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.d.ts.map +1 -1
  207. package/lib/typescript/shared/providers/screen/gestures/pan/behavior/pan-release.d.ts.map +1 -1
  208. package/lib/typescript/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.d.ts.map +1 -1
  209. package/lib/typescript/shared/providers/screen/gestures/types.d.ts +1 -0
  210. package/lib/typescript/shared/providers/screen/gestures/types.d.ts.map +1 -1
  211. package/lib/typescript/shared/providers/screen/styles/constants.d.ts.map +1 -1
  212. package/lib/typescript/shared/providers/screen/styles/helpers/visibility-block-ownership.d.ts +10 -0
  213. package/lib/typescript/shared/providers/screen/styles/helpers/visibility-block-ownership.d.ts.map +1 -0
  214. package/lib/typescript/shared/providers/screen/styles/hooks/slot-resolvers.d.ts +4 -4
  215. package/lib/typescript/shared/providers/screen/styles/hooks/slot-resolvers.d.ts.map +1 -1
  216. package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts +10 -4
  217. package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts.map +1 -1
  218. package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts +1 -0
  219. package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts.map +1 -1
  220. package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts +1 -0
  221. package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts.map +1 -1
  222. package/lib/typescript/shared/stores/bounds/internals/clear.d.ts.map +1 -1
  223. package/lib/typescript/shared/stores/bounds/internals/coordinator.d.ts +36 -0
  224. package/lib/typescript/shared/stores/bounds/internals/coordinator.d.ts.map +1 -0
  225. package/lib/typescript/shared/stores/bounds/internals/entries.d.ts +1 -2
  226. package/lib/typescript/shared/stores/bounds/internals/entries.d.ts.map +1 -1
  227. package/lib/typescript/shared/stores/bounds/internals/links.d.ts +1 -3
  228. package/lib/typescript/shared/stores/bounds/internals/links.d.ts.map +1 -1
  229. package/lib/typescript/shared/stores/bounds/internals/screen-graph.d.ts +5 -0
  230. package/lib/typescript/shared/stores/bounds/internals/screen-graph.d.ts.map +1 -0
  231. package/lib/typescript/shared/stores/bounds/internals/state.d.ts +3 -1
  232. package/lib/typescript/shared/stores/bounds/internals/state.d.ts.map +1 -1
  233. package/lib/typescript/shared/stores/bounds/types.d.ts +13 -1
  234. package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
  235. package/lib/typescript/shared/types/screen.types.d.ts +9 -0
  236. package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
  237. package/lib/typescript/shared/utils/bounds/helpers/create-bounds-accessor-core.d.ts.map +1 -1
  238. package/lib/typescript/shared/utils/bounds/helpers/create-link-accessor.d.ts.map +1 -1
  239. package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts.map +1 -1
  240. package/lib/typescript/shared/utils/bounds/helpers/resolve-bounds-pair-key.d.ts.map +1 -1
  241. package/lib/typescript/shared/utils/bounds/helpers/styles/compute.d.ts.map +1 -1
  242. package/package.json +1 -1
  243. package/src/shared/components/activity/variants/activity-screen.tsx +1 -1
  244. package/src/shared/components/boundary/components/boundary-lifecycle.tsx +0 -6
  245. package/src/shared/components/boundary/hooks/lifecycles/use-boundary-measurement-request.ts +102 -0
  246. package/src/shared/components/boundary/hooks/lifecycles/use-boundary-presence.ts +20 -11
  247. package/src/shared/components/boundary/hooks/use-boundary-measurement.ts +3 -22
  248. package/src/shared/components/boundary/hooks/use-measurer.ts +5 -20
  249. package/src/shared/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.ts +40 -0
  250. package/src/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.ts +68 -20
  251. package/src/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.tsx +10 -1
  252. package/src/shared/components/boundary/portal/components/boundary-portal/helpers/attachment.ts +19 -0
  253. package/src/shared/components/boundary/portal/components/boundary-portal/helpers/host-readiness.ts +14 -0
  254. package/src/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.ts +36 -1
  255. package/src/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.ts +22 -13
  256. package/src/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts +26 -9
  257. package/src/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.ts +1 -1
  258. package/src/shared/components/boundary/types.ts +1 -1
  259. package/src/shared/providers/helpers/measured-bounds-writes.ts +5 -0
  260. package/src/shared/providers/screen/animation/animation.provider.tsx +7 -1
  261. package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/index.ts +18 -3
  262. package/src/shared/providers/screen/animation/helpers/interpolator-participation.ts +6 -0
  263. package/src/shared/providers/screen/animation/helpers/pipeline.ts +54 -32
  264. package/src/shared/providers/screen/descriptors/descriptors.provider.tsx +80 -14
  265. package/src/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.ts +6 -0
  266. package/src/shared/providers/screen/descriptors/helpers/derive-structural-ancestor-keys.ts +13 -0
  267. package/src/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.ts +1 -0
  268. package/src/shared/providers/screen/gestures/pan/behavior/pan-release.ts +12 -2
  269. package/src/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.ts +1 -0
  270. package/src/shared/providers/screen/gestures/types.ts +1 -0
  271. package/src/shared/providers/screen/styles/constants.ts +1 -0
  272. package/src/shared/providers/screen/styles/helpers/visibility-block-ownership.ts +16 -0
  273. package/src/shared/providers/screen/styles/hooks/use-maybe-block-visibility.tsx +40 -15
  274. package/src/shared/providers/screen/styles/slot.provider.tsx +19 -5
  275. package/src/shared/stores/bounds/helpers/link-pairs.helpers.ts +12 -0
  276. package/src/shared/stores/bounds/internals/clear.ts +12 -1
  277. package/src/shared/stores/bounds/internals/coordinator.ts +403 -0
  278. package/src/shared/stores/bounds/internals/entries.ts +1 -38
  279. package/src/shared/stores/bounds/internals/links.ts +28 -38
  280. package/src/shared/stores/bounds/internals/screen-graph.ts +45 -0
  281. package/src/shared/stores/bounds/internals/state.ts +10 -1
  282. package/src/shared/stores/bounds/types.ts +19 -1
  283. package/src/shared/types/screen.types.ts +10 -0
  284. package/src/shared/utils/bounds/helpers/create-bounds-accessor-core.ts +8 -3
  285. package/src/shared/utils/bounds/helpers/create-link-accessor.ts +11 -0
  286. package/src/shared/utils/bounds/helpers/prepare-bound-styles.ts +3 -2
  287. package/src/shared/utils/bounds/helpers/resolve-bounds-pair-key.ts +0 -1
  288. package/src/shared/utils/bounds/helpers/styles/compute.ts +12 -5
  289. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +0 -177
  290. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +0 -1
  291. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js +0 -49
  292. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js.map +0 -1
  293. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js +0 -69
  294. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +0 -1
  295. package/lib/commonjs/shared/components/boundary/utils/destination-signals.js +0 -68
  296. package/lib/commonjs/shared/components/boundary/utils/destination-signals.js.map +0 -1
  297. package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js +0 -97
  298. package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js.map +0 -1
  299. package/lib/commonjs/shared/components/boundary/utils/source-signals.js +0 -43
  300. package/lib/commonjs/shared/components/boundary/utils/source-signals.js.map +0 -1
  301. package/lib/commonjs/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js +0 -29
  302. package/lib/commonjs/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js.map +0 -1
  303. package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +0 -173
  304. package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +0 -1
  305. package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js +0 -44
  306. package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js.map +0 -1
  307. package/lib/module/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js +0 -64
  308. package/lib/module/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +0 -1
  309. package/lib/module/shared/components/boundary/utils/destination-signals.js +0 -63
  310. package/lib/module/shared/components/boundary/utils/destination-signals.js.map +0 -1
  311. package/lib/module/shared/components/boundary/utils/refresh-signals.js +0 -92
  312. package/lib/module/shared/components/boundary/utils/refresh-signals.js.map +0 -1
  313. package/lib/module/shared/components/boundary/utils/source-signals.js +0 -38
  314. package/lib/module/shared/components/boundary/utils/source-signals.js.map +0 -1
  315. package/lib/module/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js +0 -25
  316. package/lib/module/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js.map +0 -1
  317. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts +0 -10
  318. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts.map +0 -1
  319. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.d.ts.map +0 -1
  320. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.d.ts +0 -10
  321. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.d.ts.map +0 -1
  322. package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts +0 -16
  323. package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts.map +0 -1
  324. package/lib/typescript/shared/components/boundary/utils/refresh-signals.d.ts +0 -19
  325. package/lib/typescript/shared/components/boundary/utils/refresh-signals.d.ts.map +0 -1
  326. package/lib/typescript/shared/components/boundary/utils/source-signals.d.ts +0 -14
  327. package/lib/typescript/shared/components/boundary/utils/source-signals.d.ts.map +0 -1
  328. package/lib/typescript/shared/providers/screen/descriptors/helpers/get-ancestor-keys.d.ts +0 -6
  329. package/lib/typescript/shared/providers/screen/descriptors/helpers/get-ancestor-keys.d.ts.map +0 -1
  330. package/src/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.ts +0 -267
  331. package/src/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.ts +0 -51
  332. package/src/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.ts +0 -90
  333. package/src/shared/components/boundary/utils/destination-signals.ts +0 -75
  334. package/src/shared/components/boundary/utils/refresh-signals.ts +0 -164
  335. package/src/shared/components/boundary/utils/source-signals.ts +0 -51
  336. package/src/shared/providers/screen/descriptors/helpers/get-ancestor-keys.ts +0 -28
@@ -11,7 +11,6 @@ import {
11
11
  getDestination as getPairDestination,
12
12
  getLink as getPairLink,
13
13
  getSource as getPairSource,
14
- getSourceScreenKeyFromPairKey,
15
14
  } from "../helpers/link-pairs.helpers";
16
15
  import type {
17
16
  BoundaryRuntimeFlags,
@@ -24,6 +23,7 @@ import type {
24
23
  TagID,
25
24
  TagLink,
26
25
  } from "../types";
26
+ import { screenBelongsToScope } from "./screen-graph";
27
27
  import { pairs } from "./state";
28
28
 
29
29
  const syncLinkStatus = (link: TagLink) => {
@@ -315,33 +315,21 @@ function setDestination(
315
315
  group,
316
316
  runtimeFlags,
317
317
  );
318
+ delete state[pairKey]?.destinationRequests?.[linkKey];
318
319
 
319
320
  return state;
320
321
  });
321
322
  }
322
323
 
323
324
  function setActiveGroupId(pairKey: ScreenPairKey, group: GroupKey, tag: TagID) {
324
- "worklet";
325
- pairs.modify(<T extends LinkPairsState>(state: T): T => {
326
- "worklet";
327
- writeGroup(state, pairKey, group, getLinkKeyFromTag(tag));
328
- return state;
329
- });
330
- }
331
-
332
- function requestSourceMeasure(pairKey: ScreenPairKey, tag: TagID) {
333
325
  "worklet";
334
326
  pairs.modify(<T extends LinkPairsState>(state: T): T => {
335
327
  "worklet";
336
328
  const linkKey = getLinkKeyFromTag(tag);
337
- const link = getPairLink(state, pairKey, linkKey);
338
-
339
- if (link?.source || state[pairKey]?.sourceRequests?.[linkKey]) {
340
- return state;
329
+ writeGroup(state, pairKey, group, linkKey);
330
+ if (!getPairLink(state, pairKey, linkKey)?.source) {
331
+ ensurePairSourceRequests(state, pairKey)[linkKey] = true;
341
332
  }
342
-
343
- ensurePairSourceRequests(state, pairKey)[linkKey] = true;
344
-
345
333
  return state;
346
334
  });
347
335
  }
@@ -374,14 +362,18 @@ function getResolvedLink(
374
362
  const state = pairs.get();
375
363
  const linkKey = getLinkKeyFromTag(tag);
376
364
  const group = getGroupKeyFromTag(tag);
377
- const link = getPairLink(state, pairKey, linkKey);
365
+ const activeId = group
366
+ ? state[pairKey]?.groups?.[group]?.activeId
367
+ : undefined;
368
+ const resolvedLinkKey = activeId ?? linkKey;
369
+ const link = getPairLink(state, pairKey, resolvedLinkKey);
378
370
 
379
371
  // Group active ids can update before the new member has a full source/destination
380
372
  // link. As soon as the requested member has source bounds, prefer it; only
381
373
  // fall back while the requested member has no source yet.
382
374
  if (!group || hasSourceLink(link)) {
383
375
  return {
384
- tag,
376
+ tag: group ? createGroupTag(group, resolvedLinkKey) : tag,
385
377
  link,
386
378
  };
387
379
  }
@@ -404,34 +396,34 @@ function getResolvedLink(
404
396
  };
405
397
  }
406
398
 
407
- function getPairKeyForSource(
399
+ function getPairKeyForDestination(
408
400
  tag: TagID,
409
401
  screenKey: ScreenKey,
410
402
  ): ScreenPairKey | null {
411
403
  "worklet";
412
404
  const state = pairs.get();
413
- const linkKey = getLinkKeyFromTag(tag);
405
+ const group = getGroupKeyFromTag(tag);
414
406
  for (const pairKey in state) {
415
- if (getSourceScreenKeyFromPairKey(pairKey) !== screenKey) continue;
407
+ const resolvedLink = getResolvedLink(pairKey, tag).link;
408
+ if (!resolvedLink) continue;
416
409
  if (
417
- getResolvedLink(pairKey, tag).link?.destination ||
418
- state[pairKey]?.sourceRequests?.[linkKey]
410
+ screenBelongsToScope(
411
+ screenKey,
412
+ getDestinationScreenKeyFromPairKey(pairKey),
413
+ ) ||
414
+ resolvedLink.destination?.screenKey === screenKey
419
415
  ) {
420
416
  return pairKey;
421
417
  }
422
- }
423
- return null;
424
- }
425
418
 
426
- function getPairKeyForDestination(
427
- tag: TagID,
428
- screenKey: ScreenKey,
429
- ): ScreenPairKey | null {
430
- "worklet";
431
- const state = pairs.get();
432
- for (const pairKey in state) {
433
- if (getDestinationScreenKeyFromPairKey(pairKey) !== screenKey) continue;
434
- if (getResolvedLink(pairKey, tag).link) return pairKey;
419
+ if (!group) continue;
420
+ const links = state[pairKey]?.links;
421
+ for (const linkKey in links) {
422
+ const link = links[linkKey];
423
+ if (link?.group === group && link.destination?.screenKey === screenKey) {
424
+ return pairKey;
425
+ }
426
+ }
435
427
  }
436
428
  return null;
437
429
  }
@@ -457,10 +449,8 @@ export {
457
449
  getDestination,
458
450
  getLink,
459
451
  getPairKeyForDestination,
460
- getPairKeyForSource,
461
452
  getResolvedLink,
462
453
  getSource,
463
- requestSourceMeasure,
464
454
  setActiveGroupId,
465
455
  setDestination,
466
456
  setSource,
@@ -0,0 +1,45 @@
1
+ import type { BoundsScreenNode, BoundsScreenState, ScreenKey } from "../types";
2
+ import { boundsScreens } from "./state";
3
+
4
+ const MAX_PARENT_DEPTH = 100;
5
+
6
+ export function registerBoundsScreen(
7
+ screenKey: ScreenKey,
8
+ node: BoundsScreenNode,
9
+ ) {
10
+ "worklet";
11
+ boundsScreens.modify(<T extends BoundsScreenState>(state: T): T => {
12
+ "worklet";
13
+ (state as BoundsScreenState)[screenKey] = node;
14
+ return state;
15
+ });
16
+ }
17
+
18
+ export function unregisterBoundsScreen(screenKey: ScreenKey) {
19
+ "worklet";
20
+ boundsScreens.modify(<T extends BoundsScreenState>(state: T): T => {
21
+ "worklet";
22
+ delete (state as BoundsScreenState)[screenKey];
23
+ return state;
24
+ });
25
+ }
26
+
27
+ export function screenBelongsToScope(
28
+ screenKey: ScreenKey,
29
+ scopeScreenKey: ScreenKey,
30
+ ): boolean {
31
+ "worklet";
32
+ if (screenKey === scopeScreenKey) return true;
33
+
34
+ const screens = boundsScreens.get();
35
+ let parentScreenKey = screens[screenKey]?.parentScreenKey;
36
+ let depth = 0;
37
+
38
+ while (parentScreenKey && depth < MAX_PARENT_DEPTH) {
39
+ if (parentScreenKey === scopeScreenKey) return true;
40
+ parentScreenKey = screens[parentScreenKey]?.parentScreenKey;
41
+ depth += 1;
42
+ }
43
+
44
+ return false;
45
+ }
@@ -1,5 +1,11 @@
1
1
  import { makeMutable } from "react-native-reanimated";
2
- import type { Entry, LinkPairsState, ScreenKey, TagID } from "../types";
2
+ import type {
3
+ BoundsScreenState,
4
+ Entry,
5
+ LinkPairsState,
6
+ ScreenKey,
7
+ TagID,
8
+ } from "../types";
3
9
 
4
10
  export type BoundaryEntriesState = Record<
5
11
  TagID,
@@ -31,3 +37,6 @@ export const boundaryRegistry = makeMutable<BoundaryEntriesState>({});
31
37
  * }
32
38
  */
33
39
  export const pairs = makeMutable<LinkPairsState>({});
40
+
41
+ /** Stable ownership graph used to match leaf boundaries to transition roots. */
42
+ export const boundsScreens = makeMutable<BoundsScreenState>({});
@@ -1,4 +1,8 @@
1
- import type { MeasuredDimensions, StyleProps } from "react-native-reanimated";
1
+ import type {
2
+ MeasuredDimensions,
3
+ SharedValue,
4
+ StyleProps,
5
+ } from "react-native-reanimated";
2
6
  import type { BoundsMethod } from "../../types/bounds.types";
3
7
  import type { ScreenKey } from "../../types/screen.types";
4
8
  import type {
@@ -128,6 +132,20 @@ export type LinkPairState = {
128
132
  links: Record<LinkKey, TagLink>;
129
133
  groups: Record<GroupKey, LinkGroupState>;
130
134
  sourceRequests?: Record<LinkKey, true>;
135
+ destinationRequests?: Record<LinkKey, true>;
136
+ destinationLinkDemands?: Record<LinkKey, true>;
137
+ destinationGroupDemands?: Record<GroupKey, true>;
138
+ refreshingLinks?: Record<LinkKey, true>;
139
+ blockedDestinations?: Record<LinkKey, true>;
140
+ portalReadySources?: Record<LinkKey, true>;
131
141
  };
132
142
 
133
143
  export type LinkPairsState = Record<ScreenPairKey, LinkPairState>;
144
+
145
+ export type BoundsScreenNode = {
146
+ parentScreenKey?: ScreenKey;
147
+ animationProgress: SharedValue<number>;
148
+ pendingLifecycleStartBlockCount: SharedValue<number>;
149
+ };
150
+
151
+ export type BoundsScreenState = Record<ScreenKey, BoundsScreenNode>;
@@ -180,6 +180,16 @@ export type ScreenTransitionConfig = {
180
180
  */
181
181
  screenStyleInterpolator?: ScreenStyleInterpolator;
182
182
 
183
+ /**
184
+ * Allows this screen's interpolator to keep updating while the screen is
185
+ * inactive. This is useful for flows that intentionally animate screens more
186
+ * than one level behind the active route with values such as `stackProgress`.
187
+ *
188
+ * @experimental This API may change in future versions.
189
+ * @default false
190
+ */
191
+ experimental_updateInactiveInterpolators?: boolean;
192
+
183
193
  /**
184
194
  * The Reanimated animation config for opening and closing transitions.
185
195
  */
@@ -66,12 +66,15 @@ const createBoundsAccessorParts = ({
66
66
  styles: (options?: BoundsComputeOptions): BoundsStyleResult => {
67
67
  "worklet";
68
68
  // Keep the component at its base layout for pre-animation refresh
69
- // measurement, then remove generated styles again after settlement.
70
- if (!props.active.animating) {
69
+ // measurement, then remove generated styles again after settlement. The
70
+ // pre-animation pass still has to reach the bounds coordinator so both
71
+ // endpoints are captured before generated transforms attach.
72
+ const shouldRenderStyles = !!props.active.animating;
73
+ if (!shouldRenderStyles && !props.active.willAnimate) {
71
74
  return NO_STYLES;
72
75
  }
73
76
 
74
- return prepareBoundStyles({
77
+ const preparedStyles = prepareBoundStyles({
75
78
  props,
76
79
  options: {
77
80
  ...options,
@@ -79,6 +82,8 @@ const createBoundsAccessorParts = ({
79
82
  group: normalizedIdentity.group,
80
83
  },
81
84
  }) as BoundsStyleResult;
85
+
86
+ return shouldRenderStyles ? preparedStyles : NO_STYLES;
82
87
  },
83
88
  values: getValues,
84
89
  math: <T extends BoundsComputeOptions = BoundsComputeOptions>(
@@ -1,3 +1,4 @@
1
+ import { requestBoundaryMeasurements } from "../../../stores/bounds/internals/coordinator";
1
2
  import {
2
3
  getPairKeyForDestination,
3
4
  getResolvedLink,
@@ -7,6 +8,7 @@ import type {
7
8
  BoundsLink,
8
9
  } from "../../../types/bounds.types";
9
10
  import type { BoundId } from "../types/options";
11
+ import { resolveBoundsPairKey } from "./resolve-bounds-pair-key";
10
12
 
11
13
  type GetProps = () => BoundsInterpolationProps;
12
14
 
@@ -21,6 +23,15 @@ export const createLinkAccessor = (getProps: GetProps): LinkAccessor => {
21
23
  "worklet";
22
24
  const props = getProps();
23
25
  const stringTag = String(tag);
26
+ const requestedPairKey = resolveBoundsPairKey(props);
27
+ if (requestedPairKey) {
28
+ requestBoundaryMeasurements({
29
+ pairKey: requestedPairKey,
30
+ tag: stringTag,
31
+ destination: true,
32
+ refresh: !!props.active.willAnimate,
33
+ });
34
+ }
24
35
  const destinationScreenKey =
25
36
  props.next?.route.key ?? props.current?.route.key;
26
37
  const pairKey = destinationScreenKey
@@ -66,11 +66,12 @@ export const syncActiveGroupId = (params: {
66
66
  const { props, id, group } = params;
67
67
  if (id == null || id === "" || !group) return;
68
68
 
69
- const pairKey = resolveBoundsPairKey(props);
69
+ const tag = createBoundTag({ id, group });
70
+ const pairKey = tag ? resolveBoundsPairKey(props) : null;
70
71
  if (!pairKey) return;
71
72
 
72
73
  const activeId = String(id);
73
- if (getActiveGroupId(pairKey, group) === activeId) return;
74
+ if (getActiveGroupId(pairKey, group) !== null) return;
74
75
 
75
76
  setActiveGroupId(pairKey, group, activeId);
76
77
  };
@@ -9,7 +9,6 @@ export const resolveBoundsPairKey = (
9
9
  const currentScreenKey = props.current?.route.key;
10
10
  const previousScreenKey = props.previous?.route.key;
11
11
  const nextScreenKey = props.next?.route.key;
12
-
13
12
  if (nextScreenKey && currentScreenKey) {
14
13
  return createScreenPairKey(currentScreenKey, nextScreenKey);
15
14
  }
@@ -6,7 +6,7 @@ import {
6
6
  NO_STYLES,
7
7
  } from "../../../../constants";
8
8
  import { createScreenPairKey } from "../../../../stores/bounds/helpers/link-pairs.helpers";
9
- import { requestSourceMeasure } from "../../../../stores/bounds/internals/links";
9
+ import { requestBoundaryMeasurements } from "../../../../stores/bounds/internals/coordinator";
10
10
  import { resolveTransitionPair } from "../../../../stores/bounds/internals/resolver";
11
11
  import type { ResolvedTransitionPair } from "../../../../stores/bounds/types";
12
12
  import type { ScreenTransitionState } from "../../../../types/animation.types";
@@ -39,6 +39,7 @@ const resolveStartEnd = (params: {
39
39
  dimensions: Layout;
40
40
  computeOptions: BoundsOptions;
41
41
  resolvedPair?: ResolvedTransitionPair;
42
+ refresh: boolean;
42
43
  }) => {
43
44
  "worklet";
44
45
 
@@ -59,6 +60,15 @@ const resolveStartEnd = (params: {
59
60
  ? createScreenPairKey(currentScreenKey, nextScreenKey)
60
61
  : null;
61
62
 
63
+ if (sourceMeasurePairKey) {
64
+ requestBoundaryMeasurements({
65
+ pairKey: sourceMeasurePairKey,
66
+ tag: String(params.id),
67
+ destination: !hasTargetOverride,
68
+ refresh: params.refresh,
69
+ });
70
+ }
71
+
62
72
  const resolvedPair =
63
73
  params.resolvedPair ??
64
74
  resolveTransitionPair(String(params.id), {
@@ -72,10 +82,6 @@ const resolveStartEnd = (params: {
72
82
  const destinationBounds = resolvedPair.destinationBounds;
73
83
 
74
84
  if (!sourceBounds) {
75
- if (hasTargetOverride && sourceMeasurePairKey) {
76
- requestSourceMeasure(sourceMeasurePairKey, String(params.id));
77
- }
78
-
79
85
  return {
80
86
  start: null,
81
87
  end: null,
@@ -157,6 +163,7 @@ export const computeBoundStyles = (
157
163
  computeOptions,
158
164
  dimensions,
159
165
  resolvedPair,
166
+ refresh: !!interpolationProps?.active?.willAnimate,
160
167
  });
161
168
 
162
169
  if (!start || !end) {
@@ -1,177 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useInitialDestinationMeasurement = void 0;
7
- var _react = require("react");
8
- var _reactNativeReanimated = require("react-native-reanimated");
9
- var _useStack = require("../../../../hooks/navigation/use-stack");
10
- var _descriptors = require("../../../../providers/screen/descriptors");
11
- var _animation = require("../../../../stores/animation.store");
12
- var _linkPairs = require("../../../../stores/bounds/helpers/link-pairs.helpers");
13
- var _entries = require("../../../../stores/bounds/internals/entries");
14
- var _links = require("../../../../stores/bounds/internals/links");
15
- var _state = require("../../../../stores/bounds/internals/state");
16
- var _system = require("../../../../stores/system.store");
17
- var _logger = require("../../../../utils/logger");
18
- var _destinationSignals = require("../../utils/destination-signals");
19
- // A missed layout should be retried on the next frame. The previous 100 ms
20
- // interval made each ordinary Android layout miss visibly delay navigation.
21
- const HANDSHAKE_RETRY_DELAY_MS = 16;
22
- /**
23
- * A destination whose initial handshake never completes must not hold the
24
- * transition gate forever. After this budget, release the block with a warning
25
- * so the open proceeds without that boundary.
26
- */
27
- const MAX_HANDSHAKE_RETRIES = 20;
28
- const useInitialDestinationMeasurement = ({
29
- boundTag,
30
- enabled,
31
- measureBoundary
32
- }) => {
33
- const {
34
- tag,
35
- linkKey,
36
- group
37
- } = boundTag;
38
- const currentScreenKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.currentScreenKey);
39
- const nextScreenKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.nextScreenKey);
40
- const destinationPairKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.destinationPairKey);
41
- const destinationEnabled = enabled && !nextScreenKey;
42
- const canReceiveDestination = destinationEnabled && !!destinationPairKey;
43
- const preferredSourceScreenKey = destinationPairKey ? (0, _linkPairs.getSourceScreenKeyFromPairKey)(destinationPairKey) : undefined;
44
- const stackScenes = (0, _useStack.useStack)(store => store.scenes);
45
- // A retained closing screen can still have registered boundaries, but it
46
- // cannot own a new transition link.
47
- const closingSourceScreenKeys = (0, _react.useMemo)(() => stackScenes.filter(scene => scene.activity === "closing").map(scene => scene.route.key), [stackScenes]);
48
- const progress = _animation.AnimationStore.getValue(currentScreenKey, "transitionProgress");
49
- const {
50
- actions: {
51
- blockLifecycleStart,
52
- unblockLifecycleStart
53
- }
54
- } = _system.SystemStore.getBag(currentScreenKey);
55
- const isBlockingLifecycleStart = (0, _reactNativeReanimated.useSharedValue)(0);
56
- const retryToken = (0, _reactNativeReanimated.useSharedValue)(0);
57
- const handshakeRetries = (0, _reactNativeReanimated.useSharedValue)(0);
58
- const hasGivenUp = (0, _reactNativeReanimated.useSharedValue)(0);
59
- const hasFinishedInitialMeasurement = (0, _reactNativeReanimated.useSharedValue)(0);
60
- const releaseLifecycleStartBlock = (0, _react.useCallback)(() => {
61
- "worklet";
62
-
63
- (0, _reactNativeReanimated.cancelAnimation)(retryToken);
64
- if (!isBlockingLifecycleStart.get()) {
65
- return;
66
- }
67
- hasFinishedInitialMeasurement.set(1);
68
- isBlockingLifecycleStart.set(0);
69
- unblockLifecycleStart();
70
- }, [hasFinishedInitialMeasurement, isBlockingLifecycleStart, retryToken, unblockLifecycleStart]);
71
- const claimLifecycleStartBlock = (0, _react.useCallback)(() => {
72
- "worklet";
73
-
74
- if (!canReceiveDestination || hasFinishedInitialMeasurement.get() || !(0, _entries.getMatchingSourceScreenKey)(tag, currentScreenKey)) {
75
- return;
76
- }
77
-
78
- // The progress check and block claim must share one UI-thread operation.
79
- // Otherwise a JS-thread layout effect can observe zero, enqueue the block,
80
- // and let the opening animation start before that block reaches the UI thread.
81
- if (progress.get() > 0 || isBlockingLifecycleStart.get()) {
82
- return;
83
- }
84
- blockLifecycleStart();
85
- isBlockingLifecycleStart.set(1);
86
- }, [blockLifecycleStart, canReceiveDestination, currentScreenKey, hasFinishedInitialMeasurement, isBlockingLifecycleStart, progress, tag]);
87
- (0, _react.useLayoutEffect)(() => {
88
- if (!canReceiveDestination) {
89
- return;
90
- }
91
- (0, _reactNativeReanimated.runOnUI)(claimLifecycleStartBlock)();
92
- return () => {
93
- // This is an abandonment fallback, not a second release. Run it on the UI
94
- // runtime so it serializes with the handshake's guarded release.
95
- (0, _reactNativeReanimated.runOnUI)(releaseLifecycleStartBlock)();
96
- };
97
- }, [claimLifecycleStartBlock, canReceiveDestination, releaseLifecycleStartBlock]);
98
- (0, _reactNativeReanimated.useAnimatedReaction)(() => {
99
- "worklet";
100
-
101
- if (!canReceiveDestination || hasFinishedInitialMeasurement.get() || isBlockingLifecycleStart.get() <= 0) {
102
- return null;
103
- }
104
- if (progress.get() > 0) {
105
- return null;
106
- }
107
- const retryTick = retryToken.get();
108
- const sourceScreenKey = (0, _entries.getMatchingSourceScreenKey)(tag, currentScreenKey, preferredSourceScreenKey, closingSourceScreenKeys);
109
- const pairKey = sourceScreenKey ? (0, _linkPairs.createScreenPairKey)(sourceScreenKey, currentScreenKey) : undefined;
110
- const signal = (0, _destinationSignals.getInitialDestinationMeasurementSignal)({
111
- enabled: destinationEnabled,
112
- pairKey,
113
- linkId: linkKey,
114
- group,
115
- destinationPresent: (0, _entries.getEntry)(tag, currentScreenKey) !== null,
116
- sourcePresent: sourceScreenKey !== null,
117
- linkState: _state.pairs.get()
118
- });
119
- return [signal?.pairKey ?? null, signal?.action ?? null, retryTick];
120
- }, (next, previous) => {
121
- "worklet";
122
-
123
- if (!next || hasFinishedInitialMeasurement.get()) {
124
- return;
125
- }
126
- const [measurePairKey, action, retryTick] = next;
127
- if (!action) {
128
- return;
129
- }
130
- const previousMeasurePairKey = previous?.[0];
131
- const previousAction = previous?.[1];
132
- const previousRetryTick = previous?.[2];
133
- const shouldHandleSignal = measurePairKey !== previousMeasurePairKey || action !== previousAction || retryTick !== previousRetryTick;
134
- if (!shouldHandleSignal) {
135
- return;
136
- }
137
- if (hasGivenUp.get()) {
138
- return;
139
- }
140
- if (action === "release") {
141
- releaseLifecycleStartBlock();
142
- handshakeRetries.set(0);
143
- return;
144
- }
145
- if (action === "measure" && measurePairKey) {
146
- measureBoundary({
147
- type: "destination",
148
- pairKey: measurePairKey
149
- });
150
- }
151
- const link = measurePairKey ? (0, _links.getLink)(measurePairKey, linkKey) : null;
152
- const linkComplete = !!link?.source && !!link.destination;
153
- if (linkComplete || action === "complete") {
154
- (0, _reactNativeReanimated.cancelAnimation)(retryToken);
155
- handshakeRetries.set(0);
156
- hasFinishedInitialMeasurement.set(1);
157
- releaseLifecycleStartBlock();
158
- return;
159
- }
160
- if (handshakeRetries.get() >= MAX_HANDSHAKE_RETRIES) {
161
- hasGivenUp.set(1);
162
- releaseLifecycleStartBlock();
163
- _logger.logger.warn(`Boundary "${linkKey}" never formed a complete source/destination link after ${MAX_HANDSHAKE_RETRIES} attempts; releasing the transition gate without it. One side is likely off-viewport or unmounted.`);
164
- return;
165
- }
166
-
167
- // Keep the lifecycle blocked while registration, measurement, or source
168
- // attachment settles. The retry token also retries rejected destination bounds.
169
- handshakeRetries.set(handshakeRetries.get() + 1);
170
- (0, _reactNativeReanimated.cancelAnimation)(retryToken);
171
- retryToken.set((0, _reactNativeReanimated.withDelay)(HANDSHAKE_RETRY_DELAY_MS, (0, _reactNativeReanimated.withTiming)(retryToken.get() + 1, {
172
- duration: 0
173
- })));
174
- });
175
- };
176
- exports.useInitialDestinationMeasurement = useInitialDestinationMeasurement;
177
- //# sourceMappingURL=use-initial-destination-measurement.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","require","_reactNativeReanimated","_useStack","_descriptors","_animation","_linkPairs","_entries","_links","_state","_system","_logger","_destinationSignals","HANDSHAKE_RETRY_DELAY_MS","MAX_HANDSHAKE_RETRIES","useInitialDestinationMeasurement","boundTag","enabled","measureBoundary","tag","linkKey","group","currentScreenKey","useDescriptorsStore","s","derivations","nextScreenKey","destinationPairKey","destinationEnabled","canReceiveDestination","preferredSourceScreenKey","getSourceScreenKeyFromPairKey","undefined","stackScenes","useStack","store","scenes","closingSourceScreenKeys","useMemo","filter","scene","activity","map","route","key","progress","AnimationStore","getValue","actions","blockLifecycleStart","unblockLifecycleStart","SystemStore","getBag","isBlockingLifecycleStart","useSharedValue","retryToken","handshakeRetries","hasGivenUp","hasFinishedInitialMeasurement","releaseLifecycleStartBlock","useCallback","cancelAnimation","get","set","claimLifecycleStartBlock","getMatchingSourceScreenKey","useLayoutEffect","runOnUI","useAnimatedReaction","retryTick","sourceScreenKey","pairKey","createScreenPairKey","signal","getInitialDestinationMeasurementSignal","linkId","destinationPresent","getEntry","sourcePresent","linkState","pairs","action","next","previous","measurePairKey","previousMeasurePairKey","previousAction","previousRetryTick","shouldHandleSignal","type","link","getLink","linkComplete","source","destination","logger","warn","withDelay","withTiming","duration","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AAQA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AAIA,IAAAM,QAAA,GAAAN,OAAA;AAIA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AAEA,IAAAS,OAAA,GAAAT,OAAA;AACA,IAAAU,OAAA,GAAAV,OAAA;AAEA,IAAAW,mBAAA,GAAAX,OAAA;AAEA;AACA;AACA,MAAMY,wBAAwB,GAAG,EAAE;AACnC;AACA;AACA;AACA;AACA;AACA,MAAMC,qBAAqB,GAAG,EAAE;AAQzB,MAAMC,gCAAgC,GAAGA,CAAC;EAChDC,QAAQ;EACRC,OAAO;EACPC;AACuC,CAAC,KAAK;EAC7C,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,CAAC;MAC5B;IACD;IAEA,IAAIH,gBAAgB,CAACM,GAAG,CAAC,CAAC,IAAIhD,qBAAqB,EAAE;MACpD2C,UAAU,CAACM,GAAG,CAAC,CAAC,CAAC;MACjBJ,0BAA0B,CAAC,CAAC;MAC5BoC,cAAM,CAACC,IAAI,CACV,aAAa5E,OAAO,2DAA2DN,qBAAqB,oGACrG,CAAC;MACD;IACD;;IAEA;IACA;IACA0C,gBAAgB,CAACO,GAAG,CAACP,gBAAgB,CAACM,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IAChD,IAAAD,sCAAe,EAACN,UAAU,CAAC;IAC3BA,UAAU,CAACQ,GAAG,CACb,IAAAkC,gCAAS,EACRpF,wBAAwB,EACxB,IAAAqF,iCAAU,EAAC3C,UAAU,CAACO,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE;MAAEqC,QAAQ,EAAE;IAAE,CAAC,CACjD,CACD,CAAC;EACF,CACD,CAAC;AACF,CAAC;AAACC,OAAA,CAAArF,gCAAA,GAAAA,gCAAA","ignoreList":[]}
@@ -1,49 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useInitialSourceMeasurement = void 0;
7
- var _reactNativeReanimated = require("react-native-reanimated");
8
- var _descriptors = require("../../../../providers/screen/descriptors");
9
- var _links = require("../../../../stores/bounds/internals/links");
10
- var _state = require("../../../../stores/bounds/internals/state");
11
- var _sourceSignals = require("../../utils/source-signals");
12
- const useInitialSourceMeasurement = params => {
13
- const {
14
- enabled,
15
- measureBoundary,
16
- boundTag
17
- } = params;
18
- const currentScreenKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.currentScreenKey);
19
- const lastSourceCaptureSignal = (0, _reactNativeReanimated.useSharedValue)(null);
20
- (0, _reactNativeReanimated.useAnimatedReaction)(() => {
21
- "worklet";
22
-
23
- const sourcePairKey = (0, _links.getPairKeyForSource)(boundTag.tag, currentScreenKey) ?? undefined;
24
- return (0, _sourceSignals.getInitialSourceCaptureSignal)({
25
- enabled,
26
- sourcePairKey,
27
- linkId: boundTag.linkKey,
28
- group: boundTag.group,
29
- linkState: sourcePairKey ? _state.pairs.get() : undefined
30
- });
31
- }, captureSignal => {
32
- "worklet";
33
-
34
- if (!enabled || !captureSignal) {
35
- lastSourceCaptureSignal.set(null);
36
- return;
37
- }
38
- if (lastSourceCaptureSignal.get() === captureSignal.signal) {
39
- return;
40
- }
41
- lastSourceCaptureSignal.set(captureSignal.signal);
42
- measureBoundary({
43
- type: "source",
44
- pairKey: captureSignal.pairKey
45
- });
46
- });
47
- };
48
- exports.useInitialSourceMeasurement = useInitialSourceMeasurement;
49
- //# sourceMappingURL=use-initial-source-measurement.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNativeReanimated","require","_descriptors","_links","_state","_sourceSignals","useInitialSourceMeasurement","params","enabled","measureBoundary","boundTag","currentScreenKey","useDescriptorsStore","s","derivations","lastSourceCaptureSignal","useSharedValue","useAnimatedReaction","sourcePairKey","getPairKeyForSource","tag","undefined","getInitialSourceCaptureSignal","linkId","linkKey","group","linkState","pairs","get","captureSignal","set","signal","type","pairKey","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAGA,IAAAI,cAAA,GAAAJ,OAAA;AAEO,MAAMK,2BAA2B,GAAIC,MAI3C,IAAK;EACL,MAAM;IAAEC,OAAO;IAAEC,eAAe;IAAEC;EAAS,CAAC,GAAGH,MAAM;EACrD,MAAMI,gBAAgB,GAAG,IAAAC,gCAAmB,EAC1CC,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACH,gBACtB,CAAC;EACD,MAAMI,uBAAuB,GAAG,IAAAC,qCAAc,EAAgB,IAA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