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
@@ -1,3 +1,5 @@
1
+ import type { ComponentType, ReactNode } from "react";
2
+ import type { ViewProps } from "react-native";
1
3
  import type { AnimatedProps } from "react-native-reanimated";
2
4
  import type { ScreenStyleInterpolator, TransitionSpec } from "./animation.types";
3
5
  import type { GestureActivationArea, GestureDirectionOption, GestureProgressMode, ScrollMetadataState } from "./gesture.types";
@@ -35,6 +37,60 @@ export type GestureTracking = "auto" | "never" | "always";
35
37
  */
36
38
  export type SnapPoint = number | "auto";
37
39
  export type BackdropBehavior = "block" | "passthrough" | "dismiss" | "collapse";
40
+ /**
41
+ * Props passed to custom screen layer component renderers such as
42
+ * {@linkcode ScreenTransitionConfig.backdropComponent}.
43
+ */
44
+ export type ScreenLayerComponentProps = {
45
+ /**
46
+ * Animated styles for the target layer, including the library-owned base
47
+ * layout style for that layer.
48
+ */
49
+ styles: AnimatedProps<ViewProps>["style"];
50
+ /**
51
+ * Animated props resolved from the matching `screenStyleInterpolator` slot.
52
+ */
53
+ props: AnimatedProps<Record<string, unknown>>["animatedProps"];
54
+ /**
55
+ * Pointer-event behavior resolved for the current layer state.
56
+ */
57
+ pointerEvents: ViewProps["pointerEvents"];
58
+ };
59
+ /**
60
+ * Props passed to {@linkcode ScreenTransitionConfig.backdropComponent} when it
61
+ * is provided as a render-style component.
62
+ */
63
+ export type ScreenBackdropComponentProps = ScreenLayerComponentProps;
64
+ /**
65
+ * Props passed to {@linkcode ScreenTransitionConfig.contentComponent} when it
66
+ * is provided as a render-style component.
67
+ */
68
+ export type ScreenContentComponentProps = ScreenLayerComponentProps & {
69
+ /**
70
+ * The screen subtree rendered inside the content layer.
71
+ */
72
+ children: ReactNode;
73
+ };
74
+ /**
75
+ * Custom renderer for the backdrop layer.
76
+ *
77
+ * Component types such as `BlurView` are still accepted for compatibility.
78
+ * Function components can also receive {@linkcode ScreenBackdropComponentProps}
79
+ * to render the animated styles and props manually.
80
+ *
81
+ * @see {@linkcode ScreenTransitionConfig.backdropComponent}
82
+ */
83
+ export type ScreenBackdropComponent = ComponentType<any> | ComponentType<ScreenBackdropComponentProps>;
84
+ /**
85
+ * Custom renderer for the screen content layer.
86
+ *
87
+ * Component types such as a custom native view are accepted directly. Function
88
+ * components can also receive {@linkcode ScreenContentComponentProps} to render
89
+ * the animated styles, props, pointer-events, and children manually.
90
+ *
91
+ * @see {@linkcode ScreenTransitionConfig.contentComponent}
92
+ */
93
+ export type ScreenContentComponent = ComponentType<any> | ComponentType<ScreenContentComponentProps>;
38
94
  /**
39
95
  * Controls how an inactive screen is retained after it is no longer active.
40
96
  *
@@ -99,6 +155,8 @@ export type TransitionAwareProps<T extends object> = AnimatedProps<T> & {
99
155
  * <Transition.View sharedBoundTag="profile-avatar">
100
156
  * <Avatar size="large" />
101
157
  * </Transition.View>
158
+ *
159
+ * @deprecated Use `Transition.Boundary` with `id` instead.
102
160
  */
103
161
  sharedBoundTag?: string;
104
162
  /**
@@ -108,6 +166,8 @@ export type TransitionAwareProps<T extends object> = AnimatedProps<T> & {
108
166
  * Useful when layout can change while unfocused (for example, programmatic
109
167
  * ScrollView/FlatList scrolling triggered from another screen).
110
168
  *
169
+ * @deprecated Legacy `sharedBoundTag` refresh option. The boundary
170
+ * measurement pipeline refreshes layout through `Transition.Boundary`.
111
171
  * @default false
112
172
  */
113
173
  remeasureOnFocus?: boolean;
@@ -181,6 +241,8 @@ export type ScreenTransitionConfig = {
181
241
  /**
182
242
  * How much velocity affects snap point targeting. Lower values make snapping
183
243
  * feel more deliberate (iOS-like), higher values make it more responsive to flicks.
244
+ *
245
+ * @deprecated Use `gestureSnapVelocityImpact` instead.
184
246
  * @default 0.1
185
247
  */
186
248
  snapVelocityImpact?: number;
@@ -353,13 +415,21 @@ export type ScreenTransitionConfig = {
353
415
  /**
354
416
  * Custom component to render as the backdrop layer (between screens).
355
417
  *
356
- * The library wraps this component with `Animated.createAnimatedComponent` internally.
357
- * Animated styles and props are driven by the `backdrop` slot in the interpolator return value.
418
+ * Direct component types are wrapped with `Animated.createAnimatedComponent`
419
+ * internally. Function components can receive `{ styles, props, pointerEvents }`
420
+ * and decide how to render the layer. Animated styles and props are driven by
421
+ * the `backdrop` slot in the interpolator return value.
358
422
  *
359
423
  * `backdropBehavior` still controls the wrapping Pressable for dismiss/collapse handling.
360
424
  *
361
425
  * @example
362
- * backdropComponent: BlurView,
426
+ * backdropComponent: ({ styles, props, pointerEvents }) => (
427
+ * <AnimatedBlurView
428
+ * style={styles}
429
+ * animatedProps={props}
430
+ * pointerEvents={pointerEvents}
431
+ * />
432
+ * ),
363
433
  * screenStyleInterpolator: ({ progress }) => {
364
434
  * "worklet";
365
435
  * return {
@@ -372,7 +442,31 @@ export type ScreenTransitionConfig = {
372
442
  *
373
443
  * @default undefined
374
444
  */
375
- backdropComponent?: React.ComponentType<any>;
445
+ backdropComponent?: ScreenBackdropComponent;
446
+ /**
447
+ * Custom component to render as the screen's content layer.
448
+ *
449
+ * The component receives the `content` slot's animated styles and props. A
450
+ * direct component type is wrapped with `Animated.createAnimatedComponent`;
451
+ * a function component can receive `{ styles, props, pointerEvents, children }`
452
+ * and decide how to render the layer.
453
+ *
454
+ * `contentComponent` replaces `surfaceComponent` for custom screen shells.
455
+ *
456
+ * @example
457
+ * contentComponent: ({ styles, props, pointerEvents, children }) => (
458
+ * <AnimatedSquircleView
459
+ * style={styles}
460
+ * animatedProps={props}
461
+ * pointerEvents={pointerEvents}
462
+ * >
463
+ * {children}
464
+ * </AnimatedSquircleView>
465
+ * )
466
+ *
467
+ * @default undefined
468
+ */
469
+ contentComponent?: ScreenContentComponent;
376
470
  /**
377
471
  * Custom component to render as the screen's surface layer.
378
472
  *
@@ -395,6 +489,7 @@ export type ScreenTransitionConfig = {
395
489
  * }
396
490
  *
397
491
  * @default undefined
492
+ * @deprecated Use `contentComponent` instead.
398
493
  */
399
494
  surfaceComponent?: React.ComponentType<any>;
400
495
  };
@@ -1 +1 @@
1
- {"version":3,"file":"screen.types.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/screen.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EACX,uBAAuB,EACvB,cAAc,EACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACX,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,EACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KA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AC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAE/B;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,KAAK,CAAC,SAAS,CAAC;IAEnD;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;;;;;;;OASG;IACH,kCAAkC,CAAC,EAAE,OAAO,CAAC;IAE7C;;;;;;;;;OASG;IACH,kCAAkC,CAAC,EAAE,OAAO,CAAC;IAE7C;;;;;;;;;;;;;;OAcG;IACH,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;IAEzB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;;;;;;;;;OAWG;IACH,0BAA0B,CAAC,EAAE,0BAA0B,CAAC;IAExD;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;;;;;;;OAQG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B;;;;;;;;;OASG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;IAE5C;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,gBAAgB,CAAC,EAAE,sBAAsB,CAAC;IAE1C;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;CAC5C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"compute.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/utils/bounds/helpers/styles/compute.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAK9E,OAAO,KAAK,EAEX,mBAAmB,EACnB,aAAa,EACb,MAAM,qBAAqB,CAAC;AAyN7B,eAAO,MAAM,kBAAkB,GAC9B,4EAQG,mBAAmB,EACtB,iBAAgB,aAAkC,EAClD,eAAe,sBAAsB,iBAsFrC,CAAC"}
1
+ {"version":3,"file":"compute.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/utils/bounds/helpers/styles/compute.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAG9E,OAAO,KAAK,EAEX,mBAAmB,EACnB,aAAa,EACb,MAAM,qBAAqB,CAAC;AA4G7B,eAAO,MAAM,kBAAkB,GAC9B,4EAQG,mBAAmB,EACtB,iBAAgB,aAAkC,EAClD,eAAe,sBAAsB,iBA6FrC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { StyleProps, TransformArrayItem } from "react-native-reanimated";
2
+ export declare const BOUNDS_LOCAL_TRANSFORM_STYLE_KEY = "__screenTransitionsBoundsLocalTransform";
3
+ export declare const attachBoundsLocalTransform: (slotStyle: StyleProps, localStyle: StyleProps | null | undefined) => StyleProps;
4
+ export declare const getBoundsLocalTransform: (style: StyleProps | undefined) => TransformArrayItem[] | undefined;
5
+ export declare const stripBoundsLocalTransform: (style: StyleProps) => StyleProps;
6
+ //# sourceMappingURL=local-transform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-transform.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/utils/bounds/helpers/styles/local-transform.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE9E,eAAO,MAAM,gCAAgC,4CACH,CAAC;AA2B3C,eAAO,MAAM,0BAA0B,GACtC,WAAW,UAAU,EACrB,YAAY,UAAU,GAAG,IAAI,GAAG,SAAS,KACvC,UAkBF,CAAC;AAEF,eAAO,MAAM,uBAAuB,GACnC,OAAO,UAAU,GAAG,SAAS,KAC3B,kBAAkB,EAAE,GAAG,SAOzB,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAI,OAAO,UAAU,KAAG,UAqB7D,CAAC"}
@@ -192,6 +192,8 @@ export type BoundsOptions = {
192
192
  motion?: BoundsMotion;
193
193
  /**
194
194
  * If true, the raw values will be returned instead of the computed values.
195
+ *
196
+ * @deprecated Use `bounds(id).math(options)` instead of passing `raw`.
195
197
  * @default false
196
198
  */
197
199
  raw?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/utils/bounds/types/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,KAAK,EACX,wBAAwB,EACxB,YAAY,EACZ,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAE1D,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAEtC,MAAM,MAAM,YAAY,GACrB,YAAY,GACZ,KAAK,GACL,aAAa,GACb,SAAS,GACT,QAAQ,GACR,UAAU,GACV,eAAe,GACf,QAAQ,GACR,gBAAgB,CAAC;AAEpB,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAE3D,KAAK,YAAY,GAAG,OAAO,GAAG,YAAY,GAAG,kBAAkB,CAAC;AAEhE,KAAK,WAAW,GAAG,UAAU,GAAG,UAAU,CAAC;AAE3C;;;;;;;;;;GAUG;AACH,MAAM,MAAM,qBAAqB,GAAG;IACnC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,8BAA8B;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,WA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B;;;;;OAKG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC5B,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,cAAc,CAAC;AAE3D,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,aAAa,EAAE,OAAO,GAAG,IAAI,GAAG,KAAK,CAAC,CAAC;AAE/E,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC;AAE3C,MAAM,MAAM,gBAAgB,CAC3B,CAAC,SAAS,oBAAoB,GAAG,oBAAoB,IAClD,mBAAmB,CAAC,CAAC,GAAG;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,IAAI,CAAA;CAAE,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-screen-transitions",
3
- "version": "3.9.0-alpha.2",
3
+ "version": "3.9.0-beta.0",
4
4
  "description": "Easy screen transitions for React Native and Expo",
5
5
  "author": "Ed",
6
6
  "license": "MIT",
@@ -13,8 +13,14 @@ import type {
13
13
  import type { ScreenTransitionConfig } from "../shared";
14
14
  import type { OverlayProps } from "../shared/types/overlay.types";
15
15
 
16
+ /**
17
+ * @deprecated Component stack is deprecated. Use blank stack instead.
18
+ */
16
19
  export type ComponentStackNavigationEventMap = {};
17
20
 
21
+ /**
22
+ * @deprecated Component stack is deprecated. Use blank stack instead.
23
+ */
18
24
  export type ComponentStackNavigationProp<
19
25
  ParamList extends ParamListBase,
20
26
  RouteName extends keyof ParamList = string,
@@ -29,6 +35,9 @@ export type ComponentStackNavigationProp<
29
35
  > &
30
36
  StackActionHelpers<ParamList>;
31
37
 
38
+ /**
39
+ * @deprecated Component stack is deprecated. Use blank stack instead.
40
+ */
32
41
  export type ComponentStackScreenProps<
33
42
  ParamList extends ParamListBase,
34
43
  RouteName extends keyof ParamList = string,
@@ -38,6 +47,9 @@ export type ComponentStackScreenProps<
38
47
  route: RouteProp<ParamList, RouteName>;
39
48
  };
40
49
 
50
+ /**
51
+ * @deprecated Component stack is deprecated. Use blank stack instead.
52
+ */
41
53
  export type ComponentStackOptionsArgs<
42
54
  ParamList extends ParamListBase,
43
55
  RouteName extends keyof ParamList = keyof ParamList,
@@ -46,6 +58,9 @@ export type ComponentStackOptionsArgs<
46
58
  theme: Theme;
47
59
  };
48
60
 
61
+ /**
62
+ * @deprecated Component stack is deprecated. Use blank stack instead.
63
+ */
49
64
  export type ComponentStackNavigationHelpers = NavigationHelpers<
50
65
  ParamListBase,
51
66
  ComponentStackNavigationEventMap
@@ -56,6 +71,8 @@ type ComponentStackNavigationConfig = {};
56
71
  /**
57
72
  * Props passed to overlay components in component-stack.
58
73
  * Uses the shared OverlayProps type with component-stack's navigation type.
74
+ *
75
+ * @deprecated Component stack is deprecated. Use blank stack instead.
59
76
  */
60
77
  export type ComponentStackOverlayProps = OverlayProps<
61
78
  ComponentStackNavigationProp<ParamListBase>
@@ -70,9 +87,15 @@ type ComponentStackScreenTransitionConfig = ScreenTransitionConfig & {
70
87
  detachPreviousScreen?: boolean;
71
88
  };
72
89
 
90
+ /**
91
+ * @deprecated Component stack is deprecated. Use blank stack instead.
92
+ */
73
93
  export type ComponentStackNavigationOptions =
74
94
  ComponentStackScreenTransitionConfig & {};
75
95
 
96
+ /**
97
+ * @deprecated Component stack is deprecated. Use blank stack instead.
98
+ */
76
99
  export type ComponentStackNavigatorProps = DefaultNavigatorOptions<
77
100
  ParamListBase,
78
101
  string | undefined,
@@ -84,6 +107,9 @@ export type ComponentStackNavigatorProps = DefaultNavigatorOptions<
84
107
  StackRouterOptions &
85
108
  ComponentStackNavigationConfig;
86
109
 
110
+ /**
111
+ * @deprecated Component stack is deprecated. Use blank stack instead.
112
+ */
87
113
  export type ComponentStackDescriptor = Descriptor<
88
114
  ComponentStackNavigationOptions,
89
115
  ComponentStackNavigationProp<ParamListBase>,
@@ -2,6 +2,10 @@ import type React from "react";
2
2
  import { memo, useLayoutEffect, useMemo } from "react";
3
3
  import type { View } from "react-native";
4
4
  import Animated, { useAnimatedRef } from "react-native-reanimated";
5
+ import {
6
+ useComposedSlotStyles,
7
+ useSlotLayoutStyles,
8
+ } from "../../../providers/screen/styles";
5
9
  import { prepareStyleForBounds } from "../../../utils/bounds/helpers/styles/styles";
6
10
  import { logger } from "../../../utils/logger";
7
11
  import { Portal } from "../portal/components/portal";
@@ -22,12 +26,20 @@ export const BoundaryTarget = memo(function BoundaryTarget(
22
26
  const registerTargetRef = rootContext?.registerTargetRef;
23
27
  const unregisterTargetRef = rootContext?.unregisterTargetRef;
24
28
  const isActiveTarget = rootContext?.activeTargetRef === targetAnimatedRef;
29
+ const portalRuntime = rootContext?.portalRuntime;
30
+ const shouldApplyAssociatedStyleInline =
31
+ isActiveTarget && portalRuntime?.enabled !== true;
32
+ const shouldApplyPortalLayoutStyle =
33
+ isActiveTarget && portalRuntime?.enabled === true;
34
+ const associatedTargetStyles = useComposedSlotStyles(
35
+ rootContext?.boundTag.tag,
36
+ style,
37
+ );
38
+ const portalLayoutStyle = useSlotLayoutStyles(rootContext?.boundTag.tag);
25
39
  const preparedStyles = useMemo(() => prepareStyleForBounds(style), [style]);
26
- // Portal'd content can be teleported into another screen's host; measuring
27
- // it there would capture its CURRENT (destination) position as the source
28
- // bounds. The portal placeholder keeps the layout slot at home, so it is
29
- // the truthful measurement surface whenever a portal is configured.
30
- const measurementRef = rootContext?.portal
40
+ // Teleported content can render outside its layout slot. The placeholder is
41
+ // the truthful measurement surface whenever runtime portal behavior is active.
42
+ const measurementRef = portalRuntime?.enabled
31
43
  ? placeholderAnimatedRef
32
44
  : targetAnimatedRef;
33
45
 
@@ -54,7 +66,8 @@ export const BoundaryTarget = memo(function BoundaryTarget(
54
66
  return (
55
67
  <Portal
56
68
  id={rootContext?.boundTag.tag}
57
- mode={rootContext?.portal}
69
+ handoff={portalRuntime?.handoff}
70
+ escapeClipping={portalRuntime?.escapeClipping}
58
71
  placeholderRef={placeholderAnimatedRef}
59
72
  >
60
73
  <Animated.View
@@ -62,7 +75,8 @@ export const BoundaryTarget = memo(function BoundaryTarget(
62
75
  ref={targetAnimatedRef}
63
76
  style={[
64
77
  style,
65
- isActiveTarget ? rootContext.associatedTargetStyles : undefined,
78
+ shouldApplyAssociatedStyleInline ? associatedTargetStyles : undefined,
79
+ shouldApplyPortalLayoutStyle ? portalLayoutStyle : undefined,
66
80
  ]}
67
81
  collapsable={false}
68
82
  />
@@ -2,18 +2,22 @@ import {
2
2
  type ComponentType,
3
3
  forwardRef,
4
4
  memo,
5
+ type ReactNode,
5
6
  useImperativeHandle,
6
7
  useMemo,
7
8
  } from "react";
8
- import Animated from "react-native-reanimated";
9
+ import type { View } from "react-native";
10
+ import Animated, { useAnimatedRef } from "react-native-reanimated";
9
11
  import { useDescriptorsStore } from "../../providers/screen/descriptors";
10
12
  import {
13
+ useComposedSlotStyles,
11
14
  useSlotStackingStyles,
12
- useSlotStyles,
13
15
  } from "../../providers/screen/styles";
14
16
  import { createBoundTag } from "../../stores/bounds/helpers/link-pairs.helpers";
15
17
  import { useBoundaryMeasurement } from "./hooks/use-boundary-measurement";
16
- import { resolveBoundaryPortal } from "./portal/resolve-portal";
18
+ import { BoundaryLocalPortalHost } from "./portal/components/boundary-local-portal-host";
19
+ import { Portal } from "./portal/components/portal";
20
+ import { resolveBoundaryPortal } from "./portal/utils/resolve-portal";
17
21
  import {
18
22
  BoundaryRootProvider,
19
23
  useBoundaryRootState,
@@ -22,14 +26,29 @@ import type { BoundaryComponentProps } from "./types";
22
26
 
23
27
  interface CreateBoundaryComponentOptions {
24
28
  alreadyAnimated?: boolean;
25
- shouldAutoMeasure?: boolean;
26
29
  }
27
30
 
31
+ const hasRenderableChildren = (children: ReactNode): boolean => {
32
+ if (
33
+ children === null ||
34
+ children === undefined ||
35
+ typeof children === "boolean"
36
+ ) {
37
+ return false;
38
+ }
39
+
40
+ if (Array.isArray(children)) {
41
+ return children.some(hasRenderableChildren);
42
+ }
43
+
44
+ return true;
45
+ };
46
+
28
47
  export function createBoundaryComponent<P extends object>(
29
48
  Wrapped: ComponentType<P>,
30
49
  options: CreateBoundaryComponentOptions = {},
31
50
  ) {
32
- const { alreadyAnimated = false, shouldAutoMeasure = false } = options;
51
+ const { alreadyAnimated = false } = options;
33
52
  const AnimatedComponent = alreadyAnimated
34
53
  ? Wrapped
35
54
  : Animated.createAnimatedComponent(Wrapped);
@@ -48,7 +67,9 @@ export function createBoundaryComponent<P extends object>(
48
67
  method,
49
68
  style,
50
69
  onPress,
51
- portal: portalProp,
70
+ handoff,
71
+ escapeClipping,
72
+ children,
52
73
  ...rest
53
74
  } = props as any;
54
75
 
@@ -56,7 +77,10 @@ export function createBoundaryComponent<P extends object>(
56
77
  () => createBoundTag(String(id), group),
57
78
  [id, group],
58
79
  );
59
- const portal = resolveBoundaryPortal(portalProp);
80
+ const portalRuntime = resolveBoundaryPortal({
81
+ handoff,
82
+ escapeClipping,
83
+ });
60
84
 
61
85
  const currentScreenKey = useDescriptorsStore(
62
86
  (s) => s.derivations.currentScreenKey,
@@ -68,9 +92,12 @@ export function createBoundaryComponent<P extends object>(
68
92
  // Associated slot styles attach whenever the boundary is enabled,
69
93
  // independent of whether an interpolator is configured for this transition.
70
94
  const shouldAttachAssociatedStyles = enabled;
95
+ const canPortalRoot =
96
+ portalRuntime.enabled && hasRenderableChildren(children);
71
97
 
72
- const associatedStyles = useSlotStyles(boundTag.tag);
98
+ const associatedStyles = useComposedSlotStyles(boundTag.tag, style);
73
99
  const associatedStackingStyles = useSlotStackingStyles(boundTag.tag);
100
+ const rootPlaceholderRef = useAnimatedRef<View>();
74
101
 
75
102
  const {
76
103
  ref,
@@ -80,13 +107,11 @@ export function createBoundaryComponent<P extends object>(
80
107
  targetPreparedStyles,
81
108
  } = useBoundaryRootState({
82
109
  boundTag,
83
- portal,
84
- associatedTargetStyles: shouldAttachAssociatedStyles
85
- ? associatedStyles
86
- : undefined,
110
+ portalRuntime,
111
+ rootMeasurementRef: canPortalRoot ? rootPlaceholderRef : undefined,
87
112
  });
88
113
 
89
- const { onPress: resolvedOnPress } = useBoundaryMeasurement({
114
+ useBoundaryMeasurement({
90
115
  boundTag,
91
116
  enabled,
92
117
  runtimeEnabled,
@@ -94,40 +119,79 @@ export function createBoundaryComponent<P extends object>(
94
119
  measuredRef,
95
120
  style,
96
121
  targetPreparedStyles,
97
- portal,
98
- shouldAutoMeasure,
122
+ handoff: portalRuntime.handoff,
123
+ escapeClipping: portalRuntime.escapeClipping,
99
124
  config: { anchor, scaleMode, target, method },
100
- onPress,
101
125
  });
102
126
 
103
127
  useImperativeHandle(forwardedRef, () => ref.current as any, [ref]);
104
128
 
129
+ const shouldPortalRoot = canPortalRoot && !hasActiveTarget;
105
130
  // A nested active target takes the full associated style, so the root keeps
106
- // only its stacking context; otherwise the root wears the full style.
131
+ // only its stacking context. Without a nested target, a portal'd root is the
132
+ // target, so its associated style is applied through the portal host instead
133
+ // of inline on the teleported element.
134
+ // Host-only handoff receivers still need the associated style: their local
135
+ // portal host is absolute-filled inside this root, so the root is the visual
136
+ // frame that animates the received payload.
107
137
  const attachedStyle = shouldAttachAssociatedStyles
108
138
  ? hasActiveTarget
109
139
  ? associatedStackingStyles
110
- : associatedStyles
140
+ : shouldPortalRoot
141
+ ? undefined
142
+ : associatedStyles
111
143
  : undefined;
144
+ const pressProps = typeof onPress === "function" ? { onPress } : undefined;
145
+
146
+ const localPortalHost = (
147
+ <BoundaryLocalPortalHost
148
+ boundaryId={boundTag.tag}
149
+ enabled={enabled && portalRuntime.handoff}
150
+ screenKey={currentScreenKey}
151
+ />
152
+ );
153
+ const canInjectLocalPortalHost = typeof children !== "function";
154
+
155
+ const renderBoundaryRoot = (extraChildren?: ReactNode) => (
156
+ <AnimatedComponent
157
+ {...rest}
158
+ {...pressProps}
159
+ ref={ref}
160
+ style={[style, attachedStyle]}
161
+ collapsable={false}
162
+ >
163
+ {children}
164
+ {canInjectLocalPortalHost ? extraChildren : null}
165
+ </AnimatedComponent>
166
+ );
167
+ const boundaryRoot = renderBoundaryRoot(
168
+ shouldPortalRoot ? undefined : localPortalHost,
169
+ );
112
170
 
113
171
  return (
114
172
  <BoundaryRootProvider value={contextValue}>
115
- <AnimatedComponent
116
- {...rest}
117
- ref={ref}
118
- style={[style, attachedStyle]}
119
- onPress={resolvedOnPress}
120
- collapsable={false}
121
- />
173
+ {shouldPortalRoot ? (
174
+ <Portal
175
+ id={boundTag.tag}
176
+ handoff={portalRuntime.handoff}
177
+ escapeClipping={portalRuntime.escapeClipping}
178
+ placeholderRef={rootPlaceholderRef}
179
+ placeholderChildren={
180
+ portalRuntime.handoff ? localPortalHost : undefined
181
+ }
182
+ >
183
+ {boundaryRoot}
184
+ </Portal>
185
+ ) : (
186
+ boundaryRoot
187
+ )}
122
188
  </BoundaryRootProvider>
123
189
  );
124
190
  });
125
191
 
126
192
  // The HOC's runtime identity (animated + memoized forwardRef) is not
127
193
  // expressible against the public boundary props, so assert it here.
128
- return memo(
129
- Animated.createAnimatedComponent(Inner),
130
- ) as unknown as React.MemoExoticComponent<
194
+ return memo(Inner) as unknown as React.MemoExoticComponent<
131
195
  React.ForwardRefExoticComponent<
132
196
  BoundaryComponentProps<P> &
133
197
  React.RefAttributes<React.ComponentRef<typeof Wrapped>>
@@ -3,17 +3,26 @@ import { runOnUI } from "react-native-reanimated";
3
3
  import {
4
4
  removeEntry,
5
5
  setEntry,
6
- } from "../../../stores/bounds/internals/entries";
7
- import type { BoundTag } from "../../../stores/bounds/types";
8
- import type { BoundaryConfigProps } from "../types";
6
+ } from "../../../../stores/bounds/internals/entries";
7
+ import type { BoundTag } from "../../../../stores/bounds/types";
8
+ import type { BoundaryConfigProps } from "../../types";
9
9
 
10
10
  export const useBoundaryPresence = (params: {
11
11
  enabled: boolean;
12
12
  boundTag: BoundTag;
13
13
  currentScreenKey: string;
14
14
  boundaryConfig?: BoundaryConfigProps;
15
+ handoff?: boolean;
16
+ escapeClipping?: boolean;
15
17
  }) => {
16
- const { enabled, boundTag, currentScreenKey, boundaryConfig } = params;
18
+ const {
19
+ enabled,
20
+ boundTag,
21
+ currentScreenKey,
22
+ boundaryConfig,
23
+ handoff,
24
+ escapeClipping,
25
+ } = params;
17
26
  const { tag } = boundTag;
18
27
 
19
28
  useLayoutEffect(() => {
@@ -21,10 +30,12 @@ export const useBoundaryPresence = (params: {
21
30
 
22
31
  runOnUI(setEntry)(tag, currentScreenKey, {
23
32
  boundaryConfig,
33
+ handoff: handoff ? true : null,
34
+ escapeClipping: escapeClipping ? true : null,
24
35
  });
25
36
 
26
37
  return () => {
27
38
  runOnUI(removeEntry)(tag, currentScreenKey);
28
39
  };
29
- }, [enabled, tag, currentScreenKey, boundaryConfig]);
40
+ }, [enabled, tag, currentScreenKey, boundaryConfig, handoff, escapeClipping]);
30
41
  };