react-native-screen-transitions 3.9.0-alpha.2 → 3.9.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 (475) hide show
  1. package/lib/commonjs/shared/components/boundary/components/boundary-target.js +14 -9
  2. package/lib/commonjs/shared/components/boundary/components/boundary-target.js.map +1 -1
  3. package/lib/commonjs/shared/components/boundary/create-boundary-component.js +66 -28
  4. package/lib/commonjs/shared/components/boundary/create-boundary-component.js.map +1 -1
  5. package/lib/commonjs/shared/components/boundary/hooks/{use-boundary-presence.js → lifecycles/use-boundary-presence.js} +8 -4
  6. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-boundary-presence.js.map +1 -0
  7. package/lib/commonjs/shared/components/boundary/hooks/{use-initial-destination-measurement.js → lifecycles/use-initial-destination-measurement.js} +27 -10
  8. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -0
  9. package/lib/commonjs/shared/components/boundary/hooks/{use-initial-source-measurement.js → lifecycles/use-initial-source-measurement.js} +5 -7
  10. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js.map +1 -0
  11. package/lib/commonjs/shared/components/boundary/hooks/{use-refresh-boundary.js → lifecycles/use-refresh-boundary.js} +4 -4
  12. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -0
  13. package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js +14 -35
  14. package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
  15. package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js +5 -6
  16. package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js.map +1 -1
  17. package/lib/commonjs/shared/components/boundary/index.js +26 -29
  18. package/lib/commonjs/shared/components/boundary/index.js.map +1 -1
  19. package/lib/commonjs/shared/components/boundary/portal/components/boundary-local-portal-host.js +58 -0
  20. package/lib/commonjs/shared/components/boundary/portal/components/boundary-local-portal-host.js.map +1 -0
  21. package/lib/commonjs/shared/components/boundary/portal/components/host.js +20 -4
  22. package/lib/commonjs/shared/components/boundary/portal/components/host.js.map +1 -1
  23. package/lib/commonjs/shared/components/boundary/portal/components/portal-boundary-host.js +78 -27
  24. package/lib/commonjs/shared/components/boundary/portal/components/portal-boundary-host.js.map +1 -1
  25. package/lib/commonjs/shared/components/boundary/portal/components/portal.js +195 -121
  26. package/lib/commonjs/shared/components/boundary/portal/components/portal.js.map +1 -1
  27. package/lib/commonjs/shared/components/boundary/portal/hooks/use-host-measurement.js +14 -2
  28. package/lib/commonjs/shared/components/boundary/portal/hooks/use-host-measurement.js.map +1 -1
  29. package/lib/commonjs/shared/components/boundary/portal/hooks/use-placeholder-styles.js +57 -0
  30. package/lib/commonjs/shared/components/boundary/portal/hooks/use-placeholder-styles.js.map +1 -0
  31. package/lib/commonjs/shared/components/boundary/portal/stores/host-registry.store.js +5 -44
  32. package/lib/commonjs/shared/components/boundary/portal/stores/host-registry.store.js.map +1 -1
  33. package/lib/commonjs/shared/components/boundary/portal/stores/portal-boundary-host.store.js +37 -5
  34. package/lib/commonjs/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map +1 -1
  35. package/lib/commonjs/shared/components/boundary/portal/teleport.js +15 -2
  36. package/lib/commonjs/shared/components/boundary/portal/teleport.js.map +1 -1
  37. package/lib/commonjs/shared/components/boundary/portal/utils/has-local-slot.js +18 -0
  38. package/lib/commonjs/shared/components/boundary/portal/utils/has-local-slot.js.map +1 -0
  39. package/lib/commonjs/shared/components/boundary/portal/utils/naming.js +10 -3
  40. package/lib/commonjs/shared/components/boundary/portal/utils/naming.js.map +1 -1
  41. package/lib/commonjs/shared/components/boundary/portal/utils/offset-style.js +28 -48
  42. package/lib/commonjs/shared/components/boundary/portal/utils/offset-style.js.map +1 -1
  43. package/lib/commonjs/shared/components/boundary/portal/utils/ownership.js +254 -0
  44. package/lib/commonjs/shared/components/boundary/portal/utils/ownership.js.map +1 -0
  45. package/lib/commonjs/shared/components/boundary/portal/utils/resolve-portal.js +38 -0
  46. package/lib/commonjs/shared/components/boundary/portal/utils/resolve-portal.js.map +1 -0
  47. package/lib/commonjs/shared/components/boundary/portal/utils/shallow-equal.js +29 -0
  48. package/lib/commonjs/shared/components/boundary/portal/utils/shallow-equal.js.map +1 -0
  49. package/lib/commonjs/shared/components/boundary/portal/utils/teleport-control.js +10 -1
  50. package/lib/commonjs/shared/components/boundary/portal/utils/teleport-control.js.map +1 -1
  51. package/lib/commonjs/shared/components/boundary/portal/utils/visible-host.js +25 -0
  52. package/lib/commonjs/shared/components/boundary/portal/utils/visible-host.js.map +1 -0
  53. package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js +6 -7
  54. package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
  55. package/lib/commonjs/shared/components/boundary/utils/destination-signals.js +1 -22
  56. package/lib/commonjs/shared/components/boundary/utils/destination-signals.js.map +1 -1
  57. package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js +0 -21
  58. package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js.map +1 -1
  59. package/lib/commonjs/shared/components/boundary/utils/source-signals.js +4 -9
  60. package/lib/commonjs/shared/components/boundary/utils/source-signals.js.map +1 -1
  61. package/lib/commonjs/shared/components/masked-view.js +5 -0
  62. package/lib/commonjs/shared/components/masked-view.js.map +1 -1
  63. package/lib/commonjs/shared/components/screen-container/layers/backdrop.js +18 -8
  64. package/lib/commonjs/shared/components/screen-container/layers/backdrop.js.map +1 -1
  65. package/lib/commonjs/shared/components/screen-container/layers/content.js +34 -16
  66. package/lib/commonjs/shared/components/screen-container/layers/content.js.map +1 -1
  67. package/lib/commonjs/shared/components/screen-container/layers/render-component.js +10 -0
  68. package/lib/commonjs/shared/components/screen-container/layers/render-component.js.map +1 -0
  69. package/lib/commonjs/shared/components/screen-container/layers/surface-container.js +5 -3
  70. package/lib/commonjs/shared/components/screen-container/layers/surface-container.js.map +1 -1
  71. package/lib/commonjs/shared/index.js +4 -0
  72. package/lib/commonjs/shared/index.js.map +1 -1
  73. package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js +6 -3
  74. package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
  75. package/lib/commonjs/shared/providers/register-bounds.provider.js +6 -0
  76. package/lib/commonjs/shared/providers/register-bounds.provider.js.map +1 -1
  77. package/lib/commonjs/shared/providers/screen/animation/helpers/derivations.js +1 -0
  78. package/lib/commonjs/shared/providers/screen/animation/helpers/derivations.js.map +1 -1
  79. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +1 -0
  80. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  81. package/lib/commonjs/shared/providers/screen/styles/helpers/compose-slot-style.js +95 -0
  82. package/lib/commonjs/shared/providers/screen/styles/helpers/compose-slot-style.js.map +1 -0
  83. package/lib/commonjs/shared/providers/screen/styles/helpers/normalize-slots.js +30 -9
  84. package/lib/commonjs/shared/providers/screen/styles/helpers/normalize-slots.js.map +1 -1
  85. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js +9 -3
  86. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js.map +1 -1
  87. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js +2 -0
  88. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js.map +1 -1
  89. package/lib/commonjs/shared/providers/screen/styles/hooks/slot-resolvers.js +96 -0
  90. package/lib/commonjs/shared/providers/screen/styles/hooks/slot-resolvers.js.map +1 -0
  91. package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +16 -3
  92. package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
  93. package/lib/commonjs/shared/providers/screen/styles/index.js +16 -3
  94. package/lib/commonjs/shared/providers/screen/styles/index.js.map +1 -1
  95. package/lib/commonjs/shared/providers/screen/styles/slot.provider.js +22 -51
  96. package/lib/commonjs/shared/providers/screen/styles/slot.provider.js.map +1 -1
  97. package/lib/commonjs/shared/providers/screen/styles/stores/slot-references.store.js +53 -0
  98. package/lib/commonjs/shared/providers/screen/styles/stores/slot-references.store.js.map +1 -0
  99. package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js +22 -2
  100. package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -1
  101. package/lib/commonjs/shared/stores/bounds/internals/entries.js +11 -4
  102. package/lib/commonjs/shared/stores/bounds/internals/entries.js.map +1 -1
  103. package/lib/commonjs/shared/stores/bounds/internals/links.js +134 -51
  104. package/lib/commonjs/shared/stores/bounds/internals/links.js.map +1 -1
  105. package/lib/commonjs/shared/stores/bounds/internals/resolver.js +1 -3
  106. package/lib/commonjs/shared/stores/bounds/internals/resolver.js.map +1 -1
  107. package/lib/commonjs/shared/stores/system.store.js +5 -0
  108. package/lib/commonjs/shared/stores/system.store.js.map +1 -1
  109. package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js +10 -69
  110. package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
  111. package/lib/commonjs/shared/utils/bounds/helpers/styles/local-transform.js +59 -0
  112. package/lib/commonjs/shared/utils/bounds/helpers/styles/local-transform.js.map +1 -0
  113. package/lib/module/shared/components/boundary/components/boundary-target.js +12 -7
  114. package/lib/module/shared/components/boundary/components/boundary-target.js.map +1 -1
  115. package/lib/module/shared/components/boundary/create-boundary-component.js +67 -29
  116. package/lib/module/shared/components/boundary/create-boundary-component.js.map +1 -1
  117. package/lib/module/shared/components/boundary/hooks/{use-boundary-presence.js → lifecycles/use-boundary-presence.js} +8 -4
  118. package/lib/module/shared/components/boundary/hooks/lifecycles/use-boundary-presence.js.map +1 -0
  119. package/lib/module/shared/components/boundary/hooks/{use-initial-destination-measurement.js → lifecycles/use-initial-destination-measurement.js} +27 -10
  120. package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -0
  121. package/lib/module/shared/components/boundary/hooks/{use-initial-source-measurement.js → lifecycles/use-initial-source-measurement.js} +5 -7
  122. package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js.map +1 -0
  123. package/lib/module/shared/components/boundary/hooks/{use-refresh-boundary.js → lifecycles/use-refresh-boundary.js} +4 -4
  124. package/lib/module/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -0
  125. package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js +15 -36
  126. package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
  127. package/lib/module/shared/components/boundary/hooks/use-measurer.js +5 -6
  128. package/lib/module/shared/components/boundary/hooks/use-measurer.js.map +1 -1
  129. package/lib/module/shared/components/boundary/index.js +26 -29
  130. package/lib/module/shared/components/boundary/index.js.map +1 -1
  131. package/lib/module/shared/components/boundary/portal/components/boundary-local-portal-host.js +53 -0
  132. package/lib/module/shared/components/boundary/portal/components/boundary-local-portal-host.js.map +1 -0
  133. package/lib/module/shared/components/boundary/portal/components/host.js +21 -5
  134. package/lib/module/shared/components/boundary/portal/components/host.js.map +1 -1
  135. package/lib/module/shared/components/boundary/portal/components/portal-boundary-host.js +79 -28
  136. package/lib/module/shared/components/boundary/portal/components/portal-boundary-host.js.map +1 -1
  137. package/lib/module/shared/components/boundary/portal/components/portal.js +201 -127
  138. package/lib/module/shared/components/boundary/portal/components/portal.js.map +1 -1
  139. package/lib/module/shared/components/boundary/portal/hooks/use-host-measurement.js +15 -3
  140. package/lib/module/shared/components/boundary/portal/hooks/use-host-measurement.js.map +1 -1
  141. package/lib/module/shared/components/boundary/portal/hooks/use-placeholder-styles.js +52 -0
  142. package/lib/module/shared/components/boundary/portal/hooks/use-placeholder-styles.js.map +1 -0
  143. package/lib/module/shared/components/boundary/portal/stores/host-registry.store.js +4 -41
  144. package/lib/module/shared/components/boundary/portal/stores/host-registry.store.js.map +1 -1
  145. package/lib/module/shared/components/boundary/portal/stores/portal-boundary-host.store.js +35 -4
  146. package/lib/module/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map +1 -1
  147. package/lib/module/shared/components/boundary/portal/teleport.js +16 -2
  148. package/lib/module/shared/components/boundary/portal/teleport.js.map +1 -1
  149. package/lib/module/shared/components/boundary/portal/utils/has-local-slot.js +13 -0
  150. package/lib/module/shared/components/boundary/portal/utils/has-local-slot.js.map +1 -0
  151. package/lib/module/shared/components/boundary/portal/utils/naming.js +8 -2
  152. package/lib/module/shared/components/boundary/portal/utils/naming.js.map +1 -1
  153. package/lib/module/shared/components/boundary/portal/utils/offset-style.js +29 -48
  154. package/lib/module/shared/components/boundary/portal/utils/offset-style.js.map +1 -1
  155. package/lib/module/shared/components/boundary/portal/utils/ownership.js +246 -0
  156. package/lib/module/shared/components/boundary/portal/utils/ownership.js.map +1 -0
  157. package/lib/module/shared/components/boundary/portal/utils/resolve-portal.js +33 -0
  158. package/lib/module/shared/components/boundary/portal/utils/resolve-portal.js.map +1 -0
  159. package/lib/module/shared/components/boundary/portal/utils/shallow-equal.js +24 -0
  160. package/lib/module/shared/components/boundary/portal/utils/shallow-equal.js.map +1 -0
  161. package/lib/module/shared/components/boundary/portal/utils/teleport-control.js +8 -0
  162. package/lib/module/shared/components/boundary/portal/utils/teleport-control.js.map +1 -1
  163. package/lib/module/shared/components/boundary/portal/utils/visible-host.js +20 -0
  164. package/lib/module/shared/components/boundary/portal/utils/visible-host.js.map +1 -0
  165. package/lib/module/shared/components/boundary/providers/boundary-root.provider.js +6 -7
  166. package/lib/module/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
  167. package/lib/module/shared/components/boundary/utils/destination-signals.js +2 -23
  168. package/lib/module/shared/components/boundary/utils/destination-signals.js.map +1 -1
  169. package/lib/module/shared/components/boundary/utils/refresh-signals.js +0 -21
  170. package/lib/module/shared/components/boundary/utils/refresh-signals.js.map +1 -1
  171. package/lib/module/shared/components/boundary/utils/source-signals.js +4 -9
  172. package/lib/module/shared/components/boundary/utils/source-signals.js.map +1 -1
  173. package/lib/module/shared/components/masked-view.js +5 -0
  174. package/lib/module/shared/components/masked-view.js.map +1 -1
  175. package/lib/module/shared/components/screen-container/layers/backdrop.js +19 -9
  176. package/lib/module/shared/components/screen-container/layers/backdrop.js.map +1 -1
  177. package/lib/module/shared/components/screen-container/layers/content.js +35 -17
  178. package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
  179. package/lib/module/shared/components/screen-container/layers/render-component.js +6 -0
  180. package/lib/module/shared/components/screen-container/layers/render-component.js.map +1 -0
  181. package/lib/module/shared/components/screen-container/layers/surface-container.js +5 -3
  182. package/lib/module/shared/components/screen-container/layers/surface-container.js.map +1 -1
  183. package/lib/module/shared/index.js +4 -0
  184. package/lib/module/shared/index.js.map +1 -1
  185. package/lib/module/shared/providers/helpers/measured-bounds-writes.js +6 -3
  186. package/lib/module/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
  187. package/lib/module/shared/providers/register-bounds.provider.js +6 -0
  188. package/lib/module/shared/providers/register-bounds.provider.js.map +1 -1
  189. package/lib/module/shared/providers/screen/animation/helpers/derivations.js +1 -0
  190. package/lib/module/shared/providers/screen/animation/helpers/derivations.js.map +1 -1
  191. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +1 -0
  192. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  193. package/lib/module/shared/providers/screen/styles/helpers/compose-slot-style.js +89 -0
  194. package/lib/module/shared/providers/screen/styles/helpers/compose-slot-style.js.map +1 -0
  195. package/lib/module/shared/providers/screen/styles/helpers/normalize-slots.js +30 -9
  196. package/lib/module/shared/providers/screen/styles/helpers/normalize-slots.js.map +1 -1
  197. package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js +9 -3
  198. package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js.map +1 -1
  199. package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js +2 -0
  200. package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js.map +1 -1
  201. package/lib/module/shared/providers/screen/styles/hooks/slot-resolvers.js +87 -0
  202. package/lib/module/shared/providers/screen/styles/hooks/slot-resolvers.js.map +1 -0
  203. package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +16 -3
  204. package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
  205. package/lib/module/shared/providers/screen/styles/index.js +2 -1
  206. package/lib/module/shared/providers/screen/styles/index.js.map +1 -1
  207. package/lib/module/shared/providers/screen/styles/slot.provider.js +22 -47
  208. package/lib/module/shared/providers/screen/styles/slot.provider.js.map +1 -1
  209. package/lib/module/shared/providers/screen/styles/stores/slot-references.store.js +47 -0
  210. package/lib/module/shared/providers/screen/styles/stores/slot-references.store.js.map +1 -0
  211. package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js +19 -1
  212. package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -1
  213. package/lib/module/shared/stores/bounds/internals/entries.js +11 -4
  214. package/lib/module/shared/stores/bounds/internals/entries.js.map +1 -1
  215. package/lib/module/shared/stores/bounds/internals/links.js +135 -53
  216. package/lib/module/shared/stores/bounds/internals/links.js.map +1 -1
  217. package/lib/module/shared/stores/bounds/internals/resolver.js +1 -3
  218. package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -1
  219. package/lib/module/shared/stores/system.store.js +5 -0
  220. package/lib/module/shared/stores/system.store.js.map +1 -1
  221. package/lib/module/shared/types/animation.types.js.map +1 -1
  222. package/lib/module/shared/utils/bounds/helpers/styles/compute.js +10 -69
  223. package/lib/module/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
  224. package/lib/module/shared/utils/bounds/helpers/styles/local-transform.js +52 -0
  225. package/lib/module/shared/utils/bounds/helpers/styles/local-transform.js.map +1 -0
  226. package/lib/typescript/blank-stack/navigators/create-blank-stack-navigator.d.ts +1 -2
  227. package/lib/typescript/blank-stack/navigators/create-blank-stack-navigator.d.ts.map +1 -1
  228. package/lib/typescript/component-stack/components/component-screen.d.ts +1 -1
  229. package/lib/typescript/component-stack/components/component-screen.d.ts.map +1 -1
  230. package/lib/typescript/component-stack/navigators/create-component-stack-navigator.d.ts +1 -2
  231. package/lib/typescript/component-stack/navigators/create-component-stack-navigator.d.ts.map +1 -1
  232. package/lib/typescript/component-stack/types.d.ts +26 -0
  233. package/lib/typescript/component-stack/types.d.ts.map +1 -1
  234. package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts +1 -1
  235. package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts.map +1 -1
  236. package/lib/typescript/native-stack/views/NativeStackView.d.ts +1 -2
  237. package/lib/typescript/native-stack/views/NativeStackView.d.ts.map +1 -1
  238. package/lib/typescript/native-stack/views/useHeaderConfigProps.d.ts +2 -2
  239. package/lib/typescript/shared/adapters/with-screen-transitions/context.d.ts +1 -1
  240. package/lib/typescript/shared/adapters/with-screen-transitions/context.d.ts.map +1 -1
  241. package/lib/typescript/shared/adapters/with-screen-transitions/stack-layout.d.ts +1 -1
  242. package/lib/typescript/shared/adapters/with-screen-transitions/stack-layout.d.ts.map +1 -1
  243. package/lib/typescript/shared/components/activity/variants/activity-container.d.ts +1 -1
  244. package/lib/typescript/shared/components/activity/variants/activity-container.d.ts.map +1 -1
  245. package/lib/typescript/shared/components/activity/variants/activity-screen.d.ts +1 -1
  246. package/lib/typescript/shared/components/activity/variants/activity-screen.d.ts.map +1 -1
  247. package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts +1 -1
  248. package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts.map +1 -1
  249. package/lib/typescript/shared/components/boundary/create-boundary-component.d.ts +0 -1
  250. package/lib/typescript/shared/components/boundary/create-boundary-component.d.ts.map +1 -1
  251. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-boundary-presence.d.ts +11 -0
  252. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-boundary-presence.d.ts.map +1 -0
  253. package/lib/typescript/shared/components/boundary/hooks/{use-initial-destination-measurement.d.ts → lifecycles/use-initial-destination-measurement.d.ts} +2 -2
  254. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts.map +1 -0
  255. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.d.ts +8 -0
  256. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.d.ts.map +1 -0
  257. package/lib/typescript/shared/components/boundary/hooks/{use-refresh-boundary.d.ts → lifecycles/use-refresh-boundary.d.ts} +2 -2
  258. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.d.ts.map +1 -0
  259. package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts +5 -9
  260. package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts.map +1 -1
  261. package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts +4 -3
  262. package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts.map +1 -1
  263. package/lib/typescript/shared/components/boundary/index.d.ts +35 -24
  264. package/lib/typescript/shared/components/boundary/index.d.ts.map +1 -1
  265. package/lib/typescript/shared/components/boundary/portal/components/boundary-local-portal-host.d.ts +8 -0
  266. package/lib/typescript/shared/components/boundary/portal/components/boundary-local-portal-host.d.ts.map +1 -0
  267. package/lib/typescript/shared/components/boundary/portal/components/host.d.ts +2 -2
  268. package/lib/typescript/shared/components/boundary/portal/components/host.d.ts.map +1 -1
  269. package/lib/typescript/shared/components/boundary/portal/components/portal-boundary-host.d.ts +2 -2
  270. package/lib/typescript/shared/components/boundary/portal/components/portal-boundary-host.d.ts.map +1 -1
  271. package/lib/typescript/shared/components/boundary/portal/components/portal-provider.d.ts +1 -1
  272. package/lib/typescript/shared/components/boundary/portal/components/portal-provider.d.ts.map +1 -1
  273. package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts +4 -3
  274. package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts.map +1 -1
  275. package/lib/typescript/shared/components/boundary/portal/hooks/use-host-measurement.d.ts.map +1 -1
  276. package/lib/typescript/shared/components/boundary/portal/hooks/use-placeholder-styles.d.ts +17 -0
  277. package/lib/typescript/shared/components/boundary/portal/hooks/use-placeholder-styles.d.ts.map +1 -0
  278. package/lib/typescript/shared/components/boundary/portal/stores/host-registry.store.d.ts +0 -7
  279. package/lib/typescript/shared/components/boundary/portal/stores/host-registry.store.d.ts.map +1 -1
  280. package/lib/typescript/shared/components/boundary/portal/stores/portal-boundary-host.store.d.ts +16 -1
  281. package/lib/typescript/shared/components/boundary/portal/stores/portal-boundary-host.store.d.ts.map +1 -1
  282. package/lib/typescript/shared/components/boundary/portal/teleport.d.ts +1 -1
  283. package/lib/typescript/shared/components/boundary/portal/teleport.d.ts.map +1 -1
  284. package/lib/typescript/shared/components/boundary/portal/utils/has-local-slot.d.ts +3 -0
  285. package/lib/typescript/shared/components/boundary/portal/utils/has-local-slot.d.ts.map +1 -0
  286. package/lib/typescript/shared/components/boundary/portal/utils/naming.d.ts +2 -1
  287. package/lib/typescript/shared/components/boundary/portal/utils/naming.d.ts.map +1 -1
  288. package/lib/typescript/shared/components/boundary/portal/utils/offset-style.d.ts +23 -30
  289. package/lib/typescript/shared/components/boundary/portal/utils/offset-style.d.ts.map +1 -1
  290. package/lib/typescript/shared/components/boundary/portal/utils/ownership.d.ts +35 -0
  291. package/lib/typescript/shared/components/boundary/portal/utils/ownership.d.ts.map +1 -0
  292. package/lib/typescript/shared/components/boundary/portal/utils/resolve-portal.d.ts +12 -0
  293. package/lib/typescript/shared/components/boundary/portal/utils/resolve-portal.d.ts.map +1 -0
  294. package/lib/typescript/shared/components/boundary/portal/utils/shallow-equal.d.ts +8 -0
  295. package/lib/typescript/shared/components/boundary/portal/utils/shallow-equal.d.ts.map +1 -0
  296. package/lib/typescript/shared/components/boundary/portal/utils/teleport-control.d.ts +4 -0
  297. package/lib/typescript/shared/components/boundary/portal/utils/teleport-control.d.ts.map +1 -1
  298. package/lib/typescript/shared/components/boundary/portal/utils/visible-host.d.ts +8 -0
  299. package/lib/typescript/shared/components/boundary/portal/utils/visible-host.d.ts.map +1 -0
  300. package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts +7 -12
  301. package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts.map +1 -1
  302. package/lib/typescript/shared/components/boundary/types.d.ts +9 -36
  303. package/lib/typescript/shared/components/boundary/types.d.ts.map +1 -1
  304. package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts.map +1 -1
  305. package/lib/typescript/shared/components/boundary/utils/refresh-signals.d.ts.map +1 -1
  306. package/lib/typescript/shared/components/boundary/utils/source-signals.d.ts +0 -1
  307. package/lib/typescript/shared/components/boundary/utils/source-signals.d.ts.map +1 -1
  308. package/lib/typescript/shared/components/create-transition-aware-component.d.ts +6 -5
  309. package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -1
  310. package/lib/typescript/shared/components/masked-view.d.ts +5 -1
  311. package/lib/typescript/shared/components/masked-view.d.ts.map +1 -1
  312. package/lib/typescript/shared/components/overlay/variations/float-overlay.d.ts +1 -1
  313. package/lib/typescript/shared/components/overlay/variations/float-overlay.d.ts.map +1 -1
  314. package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts +1 -1
  315. package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts.map +1 -1
  316. package/lib/typescript/shared/components/scene-view.d.ts +1 -1
  317. package/lib/typescript/shared/components/scene-view.d.ts.map +1 -1
  318. package/lib/typescript/shared/components/screen-container/index.d.ts +1 -1
  319. package/lib/typescript/shared/components/screen-container/index.d.ts.map +1 -1
  320. package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts +1 -1
  321. package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -1
  322. package/lib/typescript/shared/components/screen-container/layers/content.d.ts +1 -1
  323. package/lib/typescript/shared/components/screen-container/layers/content.d.ts.map +1 -1
  324. package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts +1 -1
  325. package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts.map +1 -1
  326. package/lib/typescript/shared/components/screen-container/layers/render-component.d.ts +3 -0
  327. package/lib/typescript/shared/components/screen-container/layers/render-component.d.ts.map +1 -0
  328. package/lib/typescript/shared/components/screen-container/layers/surface-container.d.ts +1 -1
  329. package/lib/typescript/shared/components/screen-container/layers/surface-container.d.ts.map +1 -1
  330. package/lib/typescript/shared/hooks/navigation/use-stack.d.ts +1 -1
  331. package/lib/typescript/shared/hooks/navigation/use-stack.d.ts.map +1 -1
  332. package/lib/typescript/shared/index.d.ts +731 -683
  333. package/lib/typescript/shared/index.d.ts.map +1 -1
  334. package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts +3 -3
  335. package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts.map +1 -1
  336. package/lib/typescript/shared/providers/register-bounds.provider.d.ts.map +1 -1
  337. package/lib/typescript/shared/providers/screen/animation/helpers/derivations.d.ts +1 -0
  338. package/lib/typescript/shared/providers/screen/animation/helpers/derivations.d.ts.map +1 -1
  339. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
  340. package/lib/typescript/shared/providers/screen/descriptors/descriptors.provider.d.ts +1 -1
  341. package/lib/typescript/shared/providers/screen/descriptors/descriptors.provider.d.ts.map +1 -1
  342. package/lib/typescript/shared/providers/screen/screen-composer.d.ts +1 -1
  343. package/lib/typescript/shared/providers/screen/screen-composer.d.ts.map +1 -1
  344. package/lib/typescript/shared/providers/screen/styles/components/floating-overlay-layer.d.ts +1 -1
  345. package/lib/typescript/shared/providers/screen/styles/components/floating-overlay-layer.d.ts.map +1 -1
  346. package/lib/typescript/shared/providers/screen/styles/helpers/compose-slot-style.d.ts +4 -0
  347. package/lib/typescript/shared/providers/screen/styles/helpers/compose-slot-style.d.ts.map +1 -0
  348. package/lib/typescript/shared/providers/screen/styles/helpers/normalize-slots.d.ts.map +1 -1
  349. package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/index.d.ts.map +1 -1
  350. package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.d.ts +2 -1
  351. package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.d.ts.map +1 -1
  352. package/lib/typescript/shared/providers/screen/styles/hooks/slot-resolvers.d.ts +11 -0
  353. package/lib/typescript/shared/providers/screen/styles/hooks/slot-resolvers.d.ts.map +1 -0
  354. package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts +4 -1
  355. package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -1
  356. package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts +3 -3
  357. package/lib/typescript/shared/providers/screen/styles/index.d.ts +2 -1
  358. package/lib/typescript/shared/providers/screen/styles/index.d.ts.map +1 -1
  359. package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts +5 -10
  360. package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts.map +1 -1
  361. package/lib/typescript/shared/providers/screen/styles/stores/slot-references.store.d.ts +6 -0
  362. package/lib/typescript/shared/providers/screen/styles/stores/slot-references.store.d.ts.map +1 -0
  363. package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts +2 -0
  364. package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts.map +1 -1
  365. package/lib/typescript/shared/stores/bounds/internals/entries.d.ts.map +1 -1
  366. package/lib/typescript/shared/stores/bounds/internals/links.d.ts +4 -3
  367. package/lib/typescript/shared/stores/bounds/internals/links.d.ts.map +1 -1
  368. package/lib/typescript/shared/stores/bounds/internals/resolver.d.ts.map +1 -1
  369. package/lib/typescript/shared/stores/bounds/types.d.ts +9 -20
  370. package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
  371. package/lib/typescript/shared/stores/system.store.d.ts +1 -0
  372. package/lib/typescript/shared/stores/system.store.d.ts.map +1 -1
  373. package/lib/typescript/shared/types/animation.types.d.ts +7 -1
  374. package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
  375. package/lib/typescript/shared/types/index.d.ts +1 -1
  376. package/lib/typescript/shared/types/index.d.ts.map +1 -1
  377. package/lib/typescript/shared/types/screen.types.d.ts +99 -4
  378. package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
  379. package/lib/typescript/shared/utils/bounds/helpers/styles/compute.d.ts.map +1 -1
  380. package/lib/typescript/shared/utils/bounds/helpers/styles/local-transform.d.ts +6 -0
  381. package/lib/typescript/shared/utils/bounds/helpers/styles/local-transform.d.ts.map +1 -0
  382. package/lib/typescript/shared/utils/bounds/types/options.d.ts +2 -0
  383. package/lib/typescript/shared/utils/bounds/types/options.d.ts.map +1 -1
  384. package/package.json +1 -1
  385. package/src/component-stack/types.ts +26 -0
  386. package/src/shared/components/boundary/components/boundary-target.tsx +21 -7
  387. package/src/shared/components/boundary/create-boundary-component.tsx +92 -28
  388. package/src/shared/components/boundary/hooks/{use-boundary-presence.ts → lifecycles/use-boundary-presence.ts} +16 -5
  389. package/src/shared/components/boundary/hooks/{use-initial-destination-measurement.ts → lifecycles/use-initial-destination-measurement.ts} +40 -13
  390. package/src/shared/components/boundary/hooks/{use-initial-source-measurement.ts → lifecycles/use-initial-source-measurement.ts} +7 -9
  391. package/src/shared/components/boundary/hooks/{use-refresh-boundary.ts → lifecycles/use-refresh-boundary.ts} +6 -6
  392. package/src/shared/components/boundary/hooks/use-boundary-measurement.ts +15 -45
  393. package/src/shared/components/boundary/hooks/use-measurer.ts +9 -14
  394. package/src/shared/components/boundary/index.tsx +55 -29
  395. package/src/shared/components/boundary/portal/components/boundary-local-portal-host.tsx +66 -0
  396. package/src/shared/components/boundary/portal/components/host.tsx +20 -5
  397. package/src/shared/components/boundary/portal/components/portal-boundary-host.tsx +112 -46
  398. package/src/shared/components/boundary/portal/components/portal.tsx +263 -134
  399. package/src/shared/components/boundary/portal/hooks/use-host-measurement.ts +23 -2
  400. package/src/shared/components/boundary/portal/hooks/use-placeholder-styles.ts +55 -0
  401. package/src/shared/components/boundary/portal/stores/host-registry.store.ts +4 -51
  402. package/src/shared/components/boundary/portal/stores/portal-boundary-host.store.ts +59 -6
  403. package/src/shared/components/boundary/portal/teleport.ts +28 -3
  404. package/src/shared/components/boundary/portal/utils/has-local-slot.ts +16 -0
  405. package/src/shared/components/boundary/portal/utils/naming.ts +11 -1
  406. package/src/shared/components/boundary/portal/utils/offset-style.ts +42 -137
  407. package/src/shared/components/boundary/portal/utils/ownership.ts +371 -0
  408. package/src/shared/components/boundary/portal/utils/resolve-portal.ts +50 -0
  409. package/src/shared/components/boundary/portal/utils/shallow-equal.ts +25 -0
  410. package/src/shared/components/boundary/portal/utils/teleport-control.ts +12 -0
  411. package/src/shared/components/boundary/portal/utils/visible-host.ts +24 -0
  412. package/src/shared/components/boundary/providers/boundary-root.provider.tsx +9 -18
  413. package/src/shared/components/boundary/types.ts +9 -39
  414. package/src/shared/components/boundary/utils/destination-signals.ts +1 -32
  415. package/src/shared/components/boundary/utils/refresh-signals.ts +0 -41
  416. package/src/shared/components/boundary/utils/source-signals.ts +5 -17
  417. package/src/shared/components/masked-view.tsx +4 -0
  418. package/src/shared/components/screen-container/layers/backdrop.tsx +31 -10
  419. package/src/shared/components/screen-container/layers/content.tsx +61 -22
  420. package/src/shared/components/screen-container/layers/render-component.ts +9 -0
  421. package/src/shared/components/screen-container/layers/surface-container.tsx +5 -4
  422. package/src/shared/index.ts +9 -5
  423. package/src/shared/providers/helpers/measured-bounds-writes.ts +6 -11
  424. package/src/shared/providers/register-bounds.provider.tsx +5 -0
  425. package/src/shared/providers/screen/animation/helpers/derivations.ts +3 -0
  426. package/src/shared/providers/screen/animation/helpers/pipeline.ts +1 -0
  427. package/src/shared/providers/screen/styles/helpers/compose-slot-style.ts +129 -0
  428. package/src/shared/providers/screen/styles/helpers/normalize-slots.ts +45 -8
  429. package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/index.ts +14 -2
  430. package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.ts +3 -0
  431. package/src/shared/providers/screen/styles/hooks/slot-resolvers.tsx +111 -0
  432. package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +21 -3
  433. package/src/shared/providers/screen/styles/index.tsx +8 -3
  434. package/src/shared/providers/screen/styles/slot.provider.tsx +36 -54
  435. package/src/shared/providers/screen/styles/stores/slot-references.store.ts +71 -0
  436. package/src/shared/stores/bounds/helpers/link-pairs.helpers.ts +24 -1
  437. package/src/shared/stores/bounds/internals/entries.ts +13 -5
  438. package/src/shared/stores/bounds/internals/links.ts +167 -85
  439. package/src/shared/stores/bounds/internals/resolver.ts +0 -2
  440. package/src/shared/stores/bounds/types.ts +10 -22
  441. package/src/shared/stores/system.store.ts +6 -0
  442. package/src/shared/types/animation.types.ts +8 -1
  443. package/src/shared/types/index.ts +5 -0
  444. package/src/shared/types/screen.types.ts +111 -4
  445. package/src/shared/utils/bounds/helpers/styles/compute.ts +22 -124
  446. package/src/shared/utils/bounds/helpers/styles/local-transform.ts +86 -0
  447. package/src/shared/utils/bounds/types/options.ts +2 -0
  448. package/lib/commonjs/shared/components/boundary/hooks/use-boundary-presence.js.map +0 -1
  449. package/lib/commonjs/shared/components/boundary/hooks/use-initial-destination-measurement.js.map +0 -1
  450. package/lib/commonjs/shared/components/boundary/hooks/use-initial-source-measurement.js.map +0 -1
  451. package/lib/commonjs/shared/components/boundary/hooks/use-refresh-boundary.js.map +0 -1
  452. package/lib/commonjs/shared/components/boundary/portal/resolve-portal.js +0 -36
  453. package/lib/commonjs/shared/components/boundary/portal/resolve-portal.js.map +0 -1
  454. package/lib/commonjs/shared/components/boundary/portal/utils/attachment.js +0 -40
  455. package/lib/commonjs/shared/components/boundary/portal/utils/attachment.js.map +0 -1
  456. package/lib/module/shared/components/boundary/hooks/use-boundary-presence.js.map +0 -1
  457. package/lib/module/shared/components/boundary/hooks/use-initial-destination-measurement.js.map +0 -1
  458. package/lib/module/shared/components/boundary/hooks/use-initial-source-measurement.js.map +0 -1
  459. package/lib/module/shared/components/boundary/hooks/use-refresh-boundary.js.map +0 -1
  460. package/lib/module/shared/components/boundary/portal/resolve-portal.js +0 -31
  461. package/lib/module/shared/components/boundary/portal/resolve-portal.js.map +0 -1
  462. package/lib/module/shared/components/boundary/portal/utils/attachment.js +0 -35
  463. package/lib/module/shared/components/boundary/portal/utils/attachment.js.map +0 -1
  464. package/lib/typescript/shared/components/boundary/hooks/use-boundary-presence.d.ts +0 -9
  465. package/lib/typescript/shared/components/boundary/hooks/use-boundary-presence.d.ts.map +0 -1
  466. package/lib/typescript/shared/components/boundary/hooks/use-initial-destination-measurement.d.ts.map +0 -1
  467. package/lib/typescript/shared/components/boundary/hooks/use-initial-source-measurement.d.ts +0 -9
  468. package/lib/typescript/shared/components/boundary/hooks/use-initial-source-measurement.d.ts.map +0 -1
  469. package/lib/typescript/shared/components/boundary/hooks/use-refresh-boundary.d.ts.map +0 -1
  470. package/lib/typescript/shared/components/boundary/portal/resolve-portal.d.ts +0 -14
  471. package/lib/typescript/shared/components/boundary/portal/resolve-portal.d.ts.map +0 -1
  472. package/lib/typescript/shared/components/boundary/portal/utils/attachment.d.ts +0 -21
  473. package/lib/typescript/shared/components/boundary/portal/utils/attachment.d.ts.map +0 -1
  474. package/src/shared/components/boundary/portal/resolve-portal.ts +0 -40
  475. package/src/shared/components/boundary/portal/utils/attachment.ts +0 -48
@@ -5,18 +5,27 @@ import {
5
5
  withDelay,
6
6
  withTiming,
7
7
  } from "react-native-reanimated";
8
- import { useDescriptorsStore } from "../../../providers/screen/descriptors";
9
- import { AnimationStore } from "../../../stores/animation.store";
10
- import { getDestination } from "../../../stores/bounds/internals/links";
11
- import { pairs } from "../../../stores/bounds/internals/state";
12
- import type { BoundTag } from "../../../stores/bounds/types";
8
+ import { useDescriptorsStore } from "../../../../providers/screen/descriptors";
9
+ import { AnimationStore } from "../../../../stores/animation.store";
10
+ import { getSourceScreenKeyFromPairKey } from "../../../../stores/bounds/helpers/link-pairs.helpers";
11
+ import { getEntry } from "../../../../stores/bounds/internals/entries";
12
+ import {
13
+ getDestination,
14
+ getLink,
15
+ } from "../../../../stores/bounds/internals/links";
16
+ import { pairs } from "../../../../stores/bounds/internals/state";
17
+ import type { BoundTag } from "../../../../stores/bounds/types";
13
18
  import {
14
19
  LifecycleTransitionRequestKind,
15
20
  SystemStore,
16
- } from "../../../stores/system.store";
17
- import { logger } from "../../../utils/logger";
18
- import type { MeasureBoundary } from "../types";
19
- import { getInitialDestinationMeasurePairKey } from "../utils/destination-signals";
21
+ } from "../../../../stores/system.store";
22
+ import { logger } from "../../../../utils/logger";
23
+ import {
24
+ hasHandoffEscapeContinuation,
25
+ usesEscapeClippingHost,
26
+ } from "../../portal/utils/ownership";
27
+ import type { MeasureBoundary } from "../../types";
28
+ import { getInitialDestinationMeasurePairKey } from "../../utils/destination-signals";
20
29
 
21
30
  const VIEWPORT_RETRY_DELAY_MS = 100;
22
31
  /**
@@ -37,7 +46,7 @@ export const useInitialDestinationMeasurement = ({
37
46
  enabled,
38
47
  measureBoundary,
39
48
  }: UseInitialDestinationMeasurementParams) => {
40
- const { linkKey, group } = boundTag;
49
+ const { tag, linkKey, group } = boundTag;
41
50
  const currentScreenKey = useDescriptorsStore(
42
51
  (s) => s.derivations.currentScreenKey,
43
52
  );
@@ -109,9 +118,6 @@ export const useInitialDestinationMeasurement = ({
109
118
  ([measurePairKey, retryTick], previous) => {
110
119
  "worklet";
111
120
  if (!measurePairKey) {
112
- releaseLifecycleStartBlock();
113
- viewportRetries.set(0);
114
- hasGivenUp.set(0);
115
121
  return;
116
122
  }
117
123
 
@@ -143,6 +149,27 @@ export const useInitialDestinationMeasurement = ({
143
149
  getDestination(measurePairKey, linkKey) !== null;
144
150
 
145
151
  if (destinationAttached) {
152
+ const linkState = pairs.get();
153
+ const link = getLink(measurePairKey, linkKey);
154
+ const sourceScreenKey = getSourceScreenKeyFromPairKey(measurePairKey);
155
+ const sourceEntry = getEntry(tag, sourceScreenKey);
156
+ const sourceEntryUsesDestinationEscapeHost =
157
+ sourceEntry?.handoff === true && sourceEntry.escapeClipping === true;
158
+ const shouldWaitForEscapeClippingHost =
159
+ usesEscapeClippingHost(link) ||
160
+ sourceEntryUsesDestinationEscapeHost ||
161
+ hasHandoffEscapeContinuation({
162
+ linkKey,
163
+ linkState,
164
+ sourceScreenKey,
165
+ });
166
+
167
+ if (shouldWaitForEscapeClippingHost) {
168
+ // Screen-level escape has a second readiness phase after destination
169
+ // measurement: the host must commit before the transition starts, or
170
+ // the payload can disappear for a frame.
171
+ return;
172
+ }
146
173
  releaseLifecycleStartBlock();
147
174
  viewportRetries.set(0);
148
175
  return;
@@ -1,17 +1,16 @@
1
1
  import { useAnimatedReaction, useSharedValue } from "react-native-reanimated";
2
- import { useDescriptorsStore } from "../../../providers/screen/descriptors";
3
- import { pairs } from "../../../stores/bounds/internals/state";
4
- import type { BoundTag } from "../../../stores/bounds/types";
5
- import type { MeasureBoundary } from "../types";
6
- import { getInitialSourceCaptureSignal } from "../utils/source-signals";
2
+ import { useDescriptorsStore } from "../../../../providers/screen/descriptors";
3
+ import { pairs } from "../../../../stores/bounds/internals/state";
4
+ import type { BoundTag } from "../../../../stores/bounds/types";
5
+ import type { MeasureBoundary } from "../../types";
6
+ import { getInitialSourceCaptureSignal } from "../../utils/source-signals";
7
7
 
8
8
  export const useInitialSourceMeasurement = (params: {
9
9
  enabled: boolean;
10
10
  measureBoundary: MeasureBoundary;
11
11
  boundTag: BoundTag;
12
- shouldAutoMeasure: boolean;
13
12
  }) => {
14
- const { enabled, measureBoundary, boundTag, shouldAutoMeasure } = params;
13
+ const { enabled, measureBoundary, boundTag } = params;
15
14
  const sourcePairKey = useDescriptorsStore((s) => s.derivations.sourcePairKey);
16
15
  const lastSourceCaptureSignal = useSharedValue<string | null>(null);
17
16
 
@@ -23,8 +22,7 @@ export const useInitialSourceMeasurement = (params: {
23
22
  sourcePairKey,
24
23
  linkId: boundTag.linkKey,
25
24
  group: boundTag.group,
26
- shouldAutoMeasure,
27
- linkState: shouldAutoMeasure && sourcePairKey ? pairs.get() : undefined,
25
+ linkState: sourcePairKey ? pairs.get() : undefined,
28
26
  });
29
27
  },
30
28
  (captureSignal) => {
@@ -1,10 +1,10 @@
1
1
  import { useAnimatedReaction } from "react-native-reanimated";
2
- import { useDescriptorsStore } from "../../../providers/screen/descriptors";
3
- import { AnimationStore } from "../../../stores/animation.store";
4
- import { pairs } from "../../../stores/bounds/internals/state";
5
- import type { BoundTag } from "../../../stores/bounds/types";
6
- import type { MeasureBoundary } from "../types";
7
- import { getRefreshBoundarySignal } from "../utils/refresh-signals";
2
+ import { useDescriptorsStore } from "../../../../providers/screen/descriptors";
3
+ import { AnimationStore } from "../../../../stores/animation.store";
4
+ import { pairs } from "../../../../stores/bounds/internals/state";
5
+ import type { BoundTag } from "../../../../stores/bounds/types";
6
+ import type { MeasureBoundary } from "../../types";
7
+ import { getRefreshBoundarySignal } from "../../utils/refresh-signals";
8
8
 
9
9
  interface UseRefreshBoundaryParams {
10
10
  enabled: boolean;
@@ -1,17 +1,14 @@
1
- import { useCallback, useMemo } from "react";
1
+ import { useMemo } from "react";
2
2
  import type { View } from "react-native";
3
3
  import type { AnimatedRef, StyleProps } from "react-native-reanimated";
4
- import { runOnUI } from "react-native-reanimated";
5
- import { createPendingPairKey } from "../../../stores/bounds/helpers/link-pairs.helpers";
6
4
  import type { BoundTag } from "../../../stores/bounds/types";
7
5
  import { prepareStyleForBounds } from "../../../utils/bounds/helpers/styles/styles";
8
- import { resolvePortalHost } from "../portal/resolve-portal";
9
- import type { BoundaryConfigProps, BoundaryPortal } from "../types";
10
- import { useBoundaryPresence } from "./use-boundary-presence";
11
- import { useInitialDestinationMeasurement } from "./use-initial-destination-measurement";
12
- import { useInitialSourceMeasurement } from "./use-initial-source-measurement";
6
+ import type { BoundaryConfigProps } from "../types";
7
+ import { useBoundaryPresence } from "./lifecycles/use-boundary-presence";
8
+ import { useInitialDestinationMeasurement } from "./lifecycles/use-initial-destination-measurement";
9
+ import { useInitialSourceMeasurement } from "./lifecycles/use-initial-source-measurement";
10
+ import { useRefreshBoundary } from "./lifecycles/use-refresh-boundary";
13
11
  import { useMeasurer } from "./use-measurer";
14
- import { useRefreshBoundary } from "./use-refresh-boundary";
15
12
 
16
13
  interface UseBoundaryMeasurementParams {
17
14
  boundTag: BoundTag;
@@ -25,17 +22,15 @@ interface UseBoundaryMeasurementParams {
25
22
  /** Root's own style; ignored when a nested target supplies its own. */
26
23
  style?: unknown;
27
24
  targetPreparedStyles?: StyleProps;
28
- portal?: BoundaryPortal;
29
- shouldAutoMeasure: boolean;
25
+ handoff: boolean;
26
+ escapeClipping: boolean;
30
27
  config: BoundaryConfigProps;
31
- onPress?: (...args: unknown[]) => void;
32
28
  }
33
29
 
34
30
  /**
35
31
  * Owns the full measurement lifecycle for a boundary: builds the measurer,
36
32
  * registers presence, runs the initial source/destination + refresh reactions,
37
- * and returns the press-priority `onPress`. The component never touches the
38
- * measurer itself.
33
+ * and keeps the component itself away from the measurer.
39
34
  */
40
35
  export const useBoundaryMeasurement = ({
41
36
  boundTag,
@@ -45,10 +40,9 @@ export const useBoundaryMeasurement = ({
45
40
  measuredRef,
46
41
  style,
47
42
  targetPreparedStyles,
48
- portal,
49
- shouldAutoMeasure,
43
+ handoff,
44
+ escapeClipping,
50
45
  config,
51
- onPress,
52
46
  }: UseBoundaryMeasurementParams) => {
53
47
  const { anchor, scaleMode, target, method } = config;
54
48
  const boundaryConfig = useMemo<BoundaryConfigProps>(
@@ -62,15 +56,14 @@ export const useBoundaryMeasurement = ({
62
56
  );
63
57
  const preparedStyles = targetPreparedStyles ?? rootPreparedStyles;
64
58
 
65
- const portalHost = resolvePortalHost(portal);
66
-
67
59
  const measureBoundary = useMeasurer({
68
60
  enabled,
69
61
  boundTag,
70
62
  currentScreenKey,
71
63
  preparedStyles,
72
64
  measuredAnimatedRef: measuredRef,
73
- portalHost,
65
+ handoff,
66
+ escapeClipping,
74
67
  });
75
68
 
76
69
  // Register/unregister this boundary in the presence map so source/destination
@@ -80,18 +73,14 @@ export const useBoundaryMeasurement = ({
80
73
  boundTag,
81
74
  currentScreenKey,
82
75
  boundaryConfig,
76
+ handoff,
77
+ escapeClipping,
83
78
  });
84
79
 
85
- // Passive auto-measurement only applies to non-pressable boundaries; pressable
86
- // ones capture their source on press (see handlePress below).
87
- const shouldPassivelyMeasureSource =
88
- shouldAutoMeasure && typeof onPress !== "function";
89
-
90
80
  useInitialSourceMeasurement({
91
81
  enabled: runtimeEnabled,
92
82
  measureBoundary,
93
83
  boundTag,
94
- shouldAutoMeasure: shouldPassivelyMeasureSource,
95
84
  });
96
85
 
97
86
  useInitialDestinationMeasurement({
@@ -105,23 +94,4 @@ export const useBoundaryMeasurement = ({
105
94
  boundTag,
106
95
  measureBoundary,
107
96
  });
108
-
109
- const handlePress = useCallback(
110
- (...args: unknown[]) => {
111
- // Press path has priority: capture source before user onPress/navigation.
112
- runOnUI(measureBoundary)({
113
- type: "source",
114
- pairKey: createPendingPairKey(currentScreenKey),
115
- });
116
-
117
- if (typeof onPress === "function") {
118
- onPress(...args);
119
- }
120
- },
121
- [measureBoundary, onPress, currentScreenKey],
122
- );
123
-
124
- return {
125
- onPress: typeof onPress === "function" ? handlePress : undefined,
126
- };
127
97
  };
@@ -8,13 +8,9 @@ import {
8
8
  } from "react-native-reanimated";
9
9
  import { applyMeasuredBoundsWrites } from "../../../providers/helpers/measured-bounds-writes";
10
10
  import { useOriginContext } from "../../../providers/screen/origin.provider";
11
- import type {
12
- BoundsPortalAttachTarget,
13
- BoundTag,
14
- } from "../../../stores/bounds/types";
11
+ import type { BoundTag } from "../../../stores/bounds/types";
15
12
  import { ScrollStore } from "../../../stores/scroll.store";
16
13
  import { SystemStore } from "../../../stores/system.store";
17
- import { getActiveScrollHost } from "../portal/stores/host-registry.store";
18
14
  import type { MeasureBoundary } from "../types";
19
15
  import {
20
16
  attachScrollSnapshotToMeasuredBounds,
@@ -29,7 +25,8 @@ interface UseMeasurerParams {
29
25
  currentScreenKey: string;
30
26
  preparedStyles: StyleProps;
31
27
  measuredAnimatedRef: AnimatedRef<View>;
32
- portalHost?: BoundsPortalAttachTarget;
28
+ handoff: boolean;
29
+ escapeClipping: boolean;
33
30
  }
34
31
 
35
32
  export const useMeasurer = ({
@@ -38,7 +35,8 @@ export const useMeasurer = ({
38
35
  currentScreenKey,
39
36
  preparedStyles,
40
37
  measuredAnimatedRef,
41
- portalHost,
38
+ handoff,
39
+ escapeClipping,
42
40
  }: UseMeasurerParams): MeasureBoundary => {
43
41
  const { width: viewportWidth, height: viewportHeight } =
44
42
  useWindowDimensions();
@@ -94,10 +92,6 @@ export const useMeasurer = ({
94
92
  normalizedMeasured,
95
93
  scrollMetadata.get(),
96
94
  );
97
- const sourceHost =
98
- target.type === "source"
99
- ? (getActiveScrollHost(currentScreenKey) ?? undefined)
100
- : undefined;
101
95
 
102
96
  applyMeasuredBoundsWrites({
103
97
  entryTag: boundTag.tag,
@@ -107,8 +101,8 @@ export const useMeasurer = ({
107
101
  measured: measuredWithScroll,
108
102
  preparedStyles,
109
103
  linkWrite: target,
110
- portalHost,
111
- sourceHost,
104
+ handoff,
105
+ escapeClipping,
112
106
  });
113
107
  },
114
108
  [
@@ -117,7 +111,8 @@ export const useMeasurer = ({
117
111
  currentScreenKey,
118
112
  preparedStyles,
119
113
  measuredAnimatedRef,
120
- portalHost,
114
+ handoff,
115
+ escapeClipping,
121
116
  viewportWidth,
122
117
  viewportHeight,
123
118
  scrollState,
@@ -1,58 +1,84 @@
1
- import { Pressable, View } from "react-native";
1
+ import { forwardRef } from "react";
2
+ import {
3
+ Pressable,
4
+ type PressableProps,
5
+ View,
6
+ type ViewProps,
7
+ } from "react-native";
2
8
  import { BoundaryTarget } from "./components/boundary-target";
3
9
  import { createBoundaryComponent } from "./create-boundary-component";
4
10
  import { Host } from "./portal";
11
+ import type { BoundaryComponentProps } from "./types";
5
12
 
6
- export type {
7
- BoundaryPortal,
8
- BoundaryPortalAttachTarget,
9
- BoundaryPortalOptions,
10
- } from "./types";
11
13
  export { createBoundaryComponent };
12
14
 
13
- const BoundaryView = createBoundaryComponent(View, {
14
- shouldAutoMeasure: true,
15
- });
15
+ type BoundaryPrimitiveProps = Omit<ViewProps, "id" | "style"> &
16
+ Omit<PressableProps, "id" | "style"> & {
17
+ style?: ViewProps["style"] | PressableProps["style"];
18
+ };
19
+
20
+ const BoundaryPrimitive = forwardRef<View, BoundaryPrimitiveProps>(
21
+ (props, ref) => {
22
+ const Component = "onPress" in props ? Pressable : View;
23
+
24
+ return <Component {...(props as any)} ref={ref as any} />;
25
+ },
26
+ );
27
+
28
+ BoundaryPrimitive.displayName = "Transition.Boundary.Primitive";
29
+
30
+ const BoundaryRoot = createBoundaryComponent(BoundaryPrimitive);
31
+ const BoundaryView = createBoundaryComponent(View);
16
32
  const BoundaryTrigger = createBoundaryComponent(Pressable);
33
+ BoundaryRoot.displayName = "Transition.Boundary";
17
34
  BoundaryView.displayName = "Transition.Boundary.View";
18
35
  BoundaryTrigger.displayName = "Transition.Boundary.Trigger";
19
36
  BoundaryTarget.displayName = "Transition.Boundary.Target";
20
37
  Host.displayName = "Transition.Boundary.Host";
21
38
 
39
+ type BoundaryRootComponent = typeof BoundaryRoot;
40
+
22
41
  /**
23
- * Shared-boundary components.
42
+ * Shared-boundary component with static helpers.
24
43
  *
25
44
  * How measurement works:
26
- * 1. Source screen captures bounds for a tag.
27
- * 2. Destination screen captures bounds for the same tag.
28
- * 3. The link is updated as layout changes (group-active + scroll-settled paths).
45
+ * 1. Destination screen captures bounds for a tag.
46
+ * 2. Source screen captures bounds for the same concrete pair.
47
+ * 3. The link is updated as layout changes.
29
48
  *
30
- * Trigger behavior:
31
- * - When a boundary has `onPress` (typically `Boundary.Trigger`), source
32
- * measurement runs before the user callback. This gives navigation transitions
33
- * fresh source geometry on the first frame.
49
+ * Runtime primitive:
50
+ * - With an `onPress` handler, the root renders as a Pressable.
51
+ * - Without an `onPress` handler, the root renders as a View.
34
52
  *
35
53
  * Use:
36
- * - `Boundary.View` for passive/shared elements.
37
- * - `Boundary.Trigger` for tappable elements that start navigation.
54
+ * - `Boundary` for passive and pressable shared elements.
38
55
  * - `Boundary.Target` to measure a nested descendant instead of the root.
39
56
  * - `Boundary.Host` to make nested portal placement explicit.
40
57
  */
41
- export const Boundary = {
58
+ export interface BoundaryComponent extends BoundaryRootComponent {
42
59
  /**
43
- * Passive boundary wrapper (no built-in press semantics).
60
+ * Optional nested measurement override inside a boundary root.
44
61
  */
45
- View: BoundaryView,
62
+ Target: typeof BoundaryTarget;
46
63
  /**
47
- * Pressable boundary wrapper with press-priority source capture.
64
+ * Explicit portal host for scrollable or otherwise clipped coordinate spaces.
48
65
  */
49
- Trigger: BoundaryTrigger,
66
+ Host: typeof Host;
50
67
  /**
51
- * Optional nested measurement override inside a boundary root.
68
+ * @deprecated Use `Transition.Boundary` without `onPress`.
52
69
  */
53
- Target: BoundaryTarget,
70
+ View: typeof BoundaryView;
54
71
  /**
55
- * Explicit portal host for scrollable or otherwise clipped coordinate spaces.
72
+ * @deprecated Use `Transition.Boundary` with `onPress`.
56
73
  */
57
- Host: Host,
58
- };
74
+ Trigger: typeof BoundaryTrigger;
75
+ }
76
+
77
+ export type BoundaryProps = BoundaryComponentProps<BoundaryPrimitiveProps>;
78
+
79
+ export const Boundary = Object.assign(BoundaryRoot, {
80
+ Target: BoundaryTarget,
81
+ Host,
82
+ View: BoundaryView,
83
+ Trigger: BoundaryTrigger,
84
+ }) as BoundaryComponent;
@@ -0,0 +1,66 @@
1
+ import { memo, useCallback, useLayoutEffect } from "react";
2
+ import { StyleSheet, View } from "react-native";
3
+ import Animated from "react-native-reanimated";
4
+ import { SystemStore } from "../../../../stores/system.store";
5
+ import { NativePortalHost } from "../teleport";
6
+ import { createBoundaryLocalPortalHostName } from "../utils/naming";
7
+
8
+ const AnimatedPortalHost = NativePortalHost
9
+ ? Animated.createAnimatedComponent(NativePortalHost)
10
+ : null;
11
+
12
+ type BoundaryLocalPortalHostProps = {
13
+ boundaryId: string;
14
+ enabled: boolean;
15
+ screenKey: string;
16
+ };
17
+
18
+ export const BoundaryLocalPortalHost = memo(function BoundaryLocalPortalHost({
19
+ boundaryId,
20
+ enabled,
21
+ screenKey,
22
+ }: BoundaryLocalPortalHostProps) {
23
+ const { drainLifecycleStartBlocks } = SystemStore.getBag(screenKey).actions;
24
+ const handleLayout = useCallback(() => {
25
+ drainLifecycleStartBlocks();
26
+ }, [drainLifecycleStartBlocks]);
27
+
28
+ useLayoutEffect(() => {
29
+ if (!enabled || !AnimatedPortalHost) {
30
+ return;
31
+ }
32
+
33
+ drainLifecycleStartBlocks();
34
+ }, [enabled, drainLifecycleStartBlocks]);
35
+
36
+ if (!enabled || !AnimatedPortalHost) {
37
+ return null;
38
+ }
39
+
40
+ const portalHostName = createBoundaryLocalPortalHostName(
41
+ screenKey,
42
+ boundaryId,
43
+ );
44
+
45
+ return (
46
+ <View
47
+ pointerEvents="none"
48
+ style={styles.hostWrapper}
49
+ onLayout={handleLayout}
50
+ collapsable={false}
51
+ >
52
+ <AnimatedPortalHost name={portalHostName} style={styles.host} />
53
+ </View>
54
+ );
55
+ });
56
+
57
+ const styles = StyleSheet.create({
58
+ host: {
59
+ ...StyleSheet.absoluteFillObject,
60
+ overflow: "visible",
61
+ },
62
+ hostWrapper: {
63
+ ...StyleSheet.absoluteFillObject,
64
+ overflow: "visible",
65
+ },
66
+ });
@@ -1,4 +1,4 @@
1
- import { memo, useLayoutEffect, useRef } from "react";
1
+ import { memo, useCallback, useLayoutEffect, useRef } from "react";
2
2
  import {
3
3
  type StyleProp,
4
4
  StyleSheet,
@@ -8,6 +8,7 @@ import {
8
8
  } from "react-native";
9
9
  import Animated from "react-native-reanimated";
10
10
  import { useDescriptorsStore } from "../../../../providers/screen/descriptors";
11
+ import { SystemStore } from "../../../../stores/system.store";
11
12
  import { useHostMeasurement } from "../hooks/use-host-measurement";
12
13
  import { registerHost, unregisterHost } from "../stores/host-registry.store";
13
14
  import { useActivePortalBoundaryHosts } from "../stores/portal-boundary-host.store";
@@ -25,6 +26,7 @@ type HostImplProps = PublicHostProps & {
25
26
 
26
27
  function HostImpl({ fallback = false, style }: HostImplProps) {
27
28
  const screenKey = useDescriptorsStore((s) => s.derivations.currentScreenKey);
29
+ const { drainLifecycleStartBlocks } = SystemStore.getBag(screenKey).actions;
28
30
  const generatedHostKeyRef = useRef<string | null>(null);
29
31
 
30
32
  if (generatedHostKeyRef.current === null) {
@@ -57,15 +59,28 @@ function HostImpl({ fallback = false, style }: HostImplProps) {
57
59
  };
58
60
  }, [capturesScroll, fallback, hostKey, screenKey]);
59
61
 
62
+ const handleUnblocking = useCallback(() => {
63
+ // Screen-level escape keeps the open transition gated until portal hosts
64
+ // have committed layout. A screen may render more than one portal boundary
65
+ // host for the same lifecycle request, so the final host layout drains the
66
+ // outstanding start blocks for this screen.
67
+ drainLifecycleStartBlocks();
68
+ }, [drainLifecycleStartBlocks]);
69
+
60
70
  const boundaryHosts = measurement.canRenderHosts
61
- ? activeBoundaryHosts.map((host) => (
71
+ ? activeBoundaryHosts.map((host, idx, list) => (
62
72
  <View
63
- key={host.boundaryId}
64
- pointerEvents="box-none"
73
+ key={host.portalHostName}
74
+ pointerEvents="none"
65
75
  style={[
66
76
  styles.boundaryHostViewport,
67
77
  { width: viewportWidth, height: viewportHeight },
68
78
  ]}
79
+ onLayout={() => {
80
+ if (list.length - 1 === idx) {
81
+ handleUnblocking();
82
+ }
83
+ }}
69
84
  >
70
85
  <PortalBoundaryHost host={host} style={StyleSheet.absoluteFill} />
71
86
  </View>
@@ -75,7 +90,7 @@ function HostImpl({ fallback = false, style }: HostImplProps) {
75
90
  return (
76
91
  <Animated.View
77
92
  ref={measurement.hostRef}
78
- pointerEvents="box-none"
93
+ pointerEvents="none"
79
94
  style={[
80
95
  styles.host,
81
96
  { width: viewportWidth, height: viewportHeight },