react-native-screen-transitions 3.9.0-alpha.2 → 3.9.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (421) 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 +53 -32
  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 +206 -96
  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/stores/host-registry.store.js +5 -44
  30. package/lib/commonjs/shared/components/boundary/portal/stores/host-registry.store.js.map +1 -1
  31. package/lib/commonjs/shared/components/boundary/portal/stores/portal-boundary-host.store.js +37 -5
  32. package/lib/commonjs/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map +1 -1
  33. package/lib/commonjs/shared/components/boundary/portal/teleport.js +15 -2
  34. package/lib/commonjs/shared/components/boundary/portal/teleport.js.map +1 -1
  35. package/lib/commonjs/shared/components/boundary/portal/utils/has-local-slot.js +18 -0
  36. package/lib/commonjs/shared/components/boundary/portal/utils/has-local-slot.js.map +1 -0
  37. package/lib/commonjs/shared/components/boundary/portal/utils/naming.js +10 -3
  38. package/lib/commonjs/shared/components/boundary/portal/utils/naming.js.map +1 -1
  39. package/lib/commonjs/shared/components/boundary/portal/utils/offset-style.js +28 -49
  40. package/lib/commonjs/shared/components/boundary/portal/utils/offset-style.js.map +1 -1
  41. package/lib/commonjs/shared/components/boundary/portal/utils/ownership.js +254 -0
  42. package/lib/commonjs/shared/components/boundary/portal/utils/ownership.js.map +1 -0
  43. package/lib/commonjs/shared/components/boundary/portal/utils/resolve-portal.js +38 -0
  44. package/lib/commonjs/shared/components/boundary/portal/utils/resolve-portal.js.map +1 -0
  45. package/lib/commonjs/shared/components/boundary/portal/utils/shallow-equal.js +29 -0
  46. package/lib/commonjs/shared/components/boundary/portal/utils/shallow-equal.js.map +1 -0
  47. package/lib/commonjs/shared/components/boundary/portal/utils/teleport-control.js +10 -1
  48. package/lib/commonjs/shared/components/boundary/portal/utils/teleport-control.js.map +1 -1
  49. package/lib/commonjs/shared/components/boundary/portal/utils/visible-host.js +25 -0
  50. package/lib/commonjs/shared/components/boundary/portal/utils/visible-host.js.map +1 -0
  51. package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js +6 -7
  52. package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
  53. package/lib/commonjs/shared/components/boundary/utils/destination-signals.js +1 -22
  54. package/lib/commonjs/shared/components/boundary/utils/destination-signals.js.map +1 -1
  55. package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js +0 -21
  56. package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js.map +1 -1
  57. package/lib/commonjs/shared/components/boundary/utils/source-signals.js +4 -9
  58. package/lib/commonjs/shared/components/boundary/utils/source-signals.js.map +1 -1
  59. package/lib/commonjs/shared/index.js.map +1 -1
  60. package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js +6 -3
  61. package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
  62. package/lib/commonjs/shared/providers/screen/animation/helpers/derivations.js +1 -0
  63. package/lib/commonjs/shared/providers/screen/animation/helpers/derivations.js.map +1 -1
  64. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +1 -0
  65. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  66. package/lib/commonjs/shared/providers/screen/styles/helpers/compose-slot-style.js +95 -0
  67. package/lib/commonjs/shared/providers/screen/styles/helpers/compose-slot-style.js.map +1 -0
  68. package/lib/commonjs/shared/providers/screen/styles/helpers/normalize-slots.js +30 -9
  69. package/lib/commonjs/shared/providers/screen/styles/helpers/normalize-slots.js.map +1 -1
  70. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js +9 -3
  71. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js.map +1 -1
  72. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js +2 -0
  73. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js.map +1 -1
  74. package/lib/commonjs/shared/providers/screen/styles/hooks/slot-resolvers.js +96 -0
  75. package/lib/commonjs/shared/providers/screen/styles/hooks/slot-resolvers.js.map +1 -0
  76. package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +16 -3
  77. package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
  78. package/lib/commonjs/shared/providers/screen/styles/index.js +16 -3
  79. package/lib/commonjs/shared/providers/screen/styles/index.js.map +1 -1
  80. package/lib/commonjs/shared/providers/screen/styles/slot.provider.js +22 -51
  81. package/lib/commonjs/shared/providers/screen/styles/slot.provider.js.map +1 -1
  82. package/lib/commonjs/shared/providers/screen/styles/stores/slot-references.store.js +53 -0
  83. package/lib/commonjs/shared/providers/screen/styles/stores/slot-references.store.js.map +1 -0
  84. package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js +22 -2
  85. package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -1
  86. package/lib/commonjs/shared/stores/bounds/internals/entries.js +11 -4
  87. package/lib/commonjs/shared/stores/bounds/internals/entries.js.map +1 -1
  88. package/lib/commonjs/shared/stores/bounds/internals/links.js +134 -51
  89. package/lib/commonjs/shared/stores/bounds/internals/links.js.map +1 -1
  90. package/lib/commonjs/shared/stores/bounds/internals/resolver.js +1 -3
  91. package/lib/commonjs/shared/stores/bounds/internals/resolver.js.map +1 -1
  92. package/lib/commonjs/shared/stores/system.store.js +5 -0
  93. package/lib/commonjs/shared/stores/system.store.js.map +1 -1
  94. package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js +10 -69
  95. package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
  96. package/lib/commonjs/shared/utils/bounds/helpers/styles/local-transform.js +59 -0
  97. package/lib/commonjs/shared/utils/bounds/helpers/styles/local-transform.js.map +1 -0
  98. package/lib/module/shared/components/boundary/components/boundary-target.js +12 -7
  99. package/lib/module/shared/components/boundary/components/boundary-target.js.map +1 -1
  100. package/lib/module/shared/components/boundary/create-boundary-component.js +67 -29
  101. package/lib/module/shared/components/boundary/create-boundary-component.js.map +1 -1
  102. package/lib/module/shared/components/boundary/hooks/{use-boundary-presence.js → lifecycles/use-boundary-presence.js} +8 -4
  103. package/lib/module/shared/components/boundary/hooks/lifecycles/use-boundary-presence.js.map +1 -0
  104. package/lib/module/shared/components/boundary/hooks/{use-initial-destination-measurement.js → lifecycles/use-initial-destination-measurement.js} +27 -10
  105. package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -0
  106. package/lib/module/shared/components/boundary/hooks/{use-initial-source-measurement.js → lifecycles/use-initial-source-measurement.js} +5 -7
  107. package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js.map +1 -0
  108. package/lib/module/shared/components/boundary/hooks/{use-refresh-boundary.js → lifecycles/use-refresh-boundary.js} +4 -4
  109. package/lib/module/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -0
  110. package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js +15 -36
  111. package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
  112. package/lib/module/shared/components/boundary/hooks/use-measurer.js +5 -6
  113. package/lib/module/shared/components/boundary/hooks/use-measurer.js.map +1 -1
  114. package/lib/module/shared/components/boundary/index.js +26 -29
  115. package/lib/module/shared/components/boundary/index.js.map +1 -1
  116. package/lib/module/shared/components/boundary/portal/components/boundary-local-portal-host.js +53 -0
  117. package/lib/module/shared/components/boundary/portal/components/boundary-local-portal-host.js.map +1 -0
  118. package/lib/module/shared/components/boundary/portal/components/host.js +21 -5
  119. package/lib/module/shared/components/boundary/portal/components/host.js.map +1 -1
  120. package/lib/module/shared/components/boundary/portal/components/portal-boundary-host.js +53 -32
  121. package/lib/module/shared/components/boundary/portal/components/portal-boundary-host.js.map +1 -1
  122. package/lib/module/shared/components/boundary/portal/components/portal.js +212 -102
  123. package/lib/module/shared/components/boundary/portal/components/portal.js.map +1 -1
  124. package/lib/module/shared/components/boundary/portal/hooks/use-host-measurement.js +15 -3
  125. package/lib/module/shared/components/boundary/portal/hooks/use-host-measurement.js.map +1 -1
  126. package/lib/module/shared/components/boundary/portal/stores/host-registry.store.js +4 -41
  127. package/lib/module/shared/components/boundary/portal/stores/host-registry.store.js.map +1 -1
  128. package/lib/module/shared/components/boundary/portal/stores/portal-boundary-host.store.js +35 -4
  129. package/lib/module/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map +1 -1
  130. package/lib/module/shared/components/boundary/portal/teleport.js +16 -2
  131. package/lib/module/shared/components/boundary/portal/teleport.js.map +1 -1
  132. package/lib/module/shared/components/boundary/portal/utils/has-local-slot.js +13 -0
  133. package/lib/module/shared/components/boundary/portal/utils/has-local-slot.js.map +1 -0
  134. package/lib/module/shared/components/boundary/portal/utils/naming.js +8 -2
  135. package/lib/module/shared/components/boundary/portal/utils/naming.js.map +1 -1
  136. package/lib/module/shared/components/boundary/portal/utils/offset-style.js +29 -49
  137. package/lib/module/shared/components/boundary/portal/utils/offset-style.js.map +1 -1
  138. package/lib/module/shared/components/boundary/portal/utils/ownership.js +246 -0
  139. package/lib/module/shared/components/boundary/portal/utils/ownership.js.map +1 -0
  140. package/lib/module/shared/components/boundary/portal/utils/resolve-portal.js +33 -0
  141. package/lib/module/shared/components/boundary/portal/utils/resolve-portal.js.map +1 -0
  142. package/lib/module/shared/components/boundary/portal/utils/shallow-equal.js +24 -0
  143. package/lib/module/shared/components/boundary/portal/utils/shallow-equal.js.map +1 -0
  144. package/lib/module/shared/components/boundary/portal/utils/teleport-control.js +8 -0
  145. package/lib/module/shared/components/boundary/portal/utils/teleport-control.js.map +1 -1
  146. package/lib/module/shared/components/boundary/portal/utils/visible-host.js +20 -0
  147. package/lib/module/shared/components/boundary/portal/utils/visible-host.js.map +1 -0
  148. package/lib/module/shared/components/boundary/providers/boundary-root.provider.js +6 -7
  149. package/lib/module/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
  150. package/lib/module/shared/components/boundary/utils/destination-signals.js +2 -23
  151. package/lib/module/shared/components/boundary/utils/destination-signals.js.map +1 -1
  152. package/lib/module/shared/components/boundary/utils/refresh-signals.js +0 -21
  153. package/lib/module/shared/components/boundary/utils/refresh-signals.js.map +1 -1
  154. package/lib/module/shared/components/boundary/utils/source-signals.js +4 -9
  155. package/lib/module/shared/components/boundary/utils/source-signals.js.map +1 -1
  156. package/lib/module/shared/index.js.map +1 -1
  157. package/lib/module/shared/providers/helpers/measured-bounds-writes.js +6 -3
  158. package/lib/module/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
  159. package/lib/module/shared/providers/screen/animation/helpers/derivations.js +1 -0
  160. package/lib/module/shared/providers/screen/animation/helpers/derivations.js.map +1 -1
  161. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +1 -0
  162. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  163. package/lib/module/shared/providers/screen/styles/helpers/compose-slot-style.js +89 -0
  164. package/lib/module/shared/providers/screen/styles/helpers/compose-slot-style.js.map +1 -0
  165. package/lib/module/shared/providers/screen/styles/helpers/normalize-slots.js +30 -9
  166. package/lib/module/shared/providers/screen/styles/helpers/normalize-slots.js.map +1 -1
  167. package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js +9 -3
  168. package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js.map +1 -1
  169. package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js +2 -0
  170. package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js.map +1 -1
  171. package/lib/module/shared/providers/screen/styles/hooks/slot-resolvers.js +87 -0
  172. package/lib/module/shared/providers/screen/styles/hooks/slot-resolvers.js.map +1 -0
  173. package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +16 -3
  174. package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
  175. package/lib/module/shared/providers/screen/styles/index.js +2 -1
  176. package/lib/module/shared/providers/screen/styles/index.js.map +1 -1
  177. package/lib/module/shared/providers/screen/styles/slot.provider.js +22 -47
  178. package/lib/module/shared/providers/screen/styles/slot.provider.js.map +1 -1
  179. package/lib/module/shared/providers/screen/styles/stores/slot-references.store.js +47 -0
  180. package/lib/module/shared/providers/screen/styles/stores/slot-references.store.js.map +1 -0
  181. package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js +19 -1
  182. package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -1
  183. package/lib/module/shared/stores/bounds/internals/entries.js +11 -4
  184. package/lib/module/shared/stores/bounds/internals/entries.js.map +1 -1
  185. package/lib/module/shared/stores/bounds/internals/links.js +135 -53
  186. package/lib/module/shared/stores/bounds/internals/links.js.map +1 -1
  187. package/lib/module/shared/stores/bounds/internals/resolver.js +1 -3
  188. package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -1
  189. package/lib/module/shared/stores/system.store.js +5 -0
  190. package/lib/module/shared/stores/system.store.js.map +1 -1
  191. package/lib/module/shared/types/animation.types.js.map +1 -1
  192. package/lib/module/shared/utils/bounds/helpers/styles/compute.js +10 -69
  193. package/lib/module/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
  194. package/lib/module/shared/utils/bounds/helpers/styles/local-transform.js +52 -0
  195. package/lib/module/shared/utils/bounds/helpers/styles/local-transform.js.map +1 -0
  196. package/lib/typescript/blank-stack/navigators/create-blank-stack-navigator.d.ts +1 -2
  197. package/lib/typescript/blank-stack/navigators/create-blank-stack-navigator.d.ts.map +1 -1
  198. package/lib/typescript/component-stack/components/component-screen.d.ts +1 -1
  199. package/lib/typescript/component-stack/components/component-screen.d.ts.map +1 -1
  200. package/lib/typescript/component-stack/navigators/create-component-stack-navigator.d.ts +1 -2
  201. package/lib/typescript/component-stack/navigators/create-component-stack-navigator.d.ts.map +1 -1
  202. package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts +1 -1
  203. package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts.map +1 -1
  204. package/lib/typescript/native-stack/views/NativeStackView.d.ts +1 -2
  205. package/lib/typescript/native-stack/views/NativeStackView.d.ts.map +1 -1
  206. package/lib/typescript/native-stack/views/useHeaderConfigProps.d.ts +2 -2
  207. package/lib/typescript/shared/adapters/with-screen-transitions/context.d.ts +1 -1
  208. package/lib/typescript/shared/adapters/with-screen-transitions/context.d.ts.map +1 -1
  209. package/lib/typescript/shared/adapters/with-screen-transitions/stack-layout.d.ts +1 -1
  210. package/lib/typescript/shared/adapters/with-screen-transitions/stack-layout.d.ts.map +1 -1
  211. package/lib/typescript/shared/components/activity/variants/activity-container.d.ts +1 -1
  212. package/lib/typescript/shared/components/activity/variants/activity-container.d.ts.map +1 -1
  213. package/lib/typescript/shared/components/activity/variants/activity-screen.d.ts +1 -1
  214. package/lib/typescript/shared/components/activity/variants/activity-screen.d.ts.map +1 -1
  215. package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts +1 -1
  216. package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts.map +1 -1
  217. package/lib/typescript/shared/components/boundary/create-boundary-component.d.ts +0 -1
  218. package/lib/typescript/shared/components/boundary/create-boundary-component.d.ts.map +1 -1
  219. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-boundary-presence.d.ts +11 -0
  220. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-boundary-presence.d.ts.map +1 -0
  221. package/lib/typescript/shared/components/boundary/hooks/{use-initial-destination-measurement.d.ts → lifecycles/use-initial-destination-measurement.d.ts} +2 -2
  222. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts.map +1 -0
  223. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.d.ts +8 -0
  224. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.d.ts.map +1 -0
  225. package/lib/typescript/shared/components/boundary/hooks/{use-refresh-boundary.d.ts → lifecycles/use-refresh-boundary.d.ts} +2 -2
  226. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.d.ts.map +1 -0
  227. package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts +5 -9
  228. package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts.map +1 -1
  229. package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts +4 -3
  230. package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts.map +1 -1
  231. package/lib/typescript/shared/components/boundary/index.d.ts +35 -24
  232. package/lib/typescript/shared/components/boundary/index.d.ts.map +1 -1
  233. package/lib/typescript/shared/components/boundary/portal/components/boundary-local-portal-host.d.ts +8 -0
  234. package/lib/typescript/shared/components/boundary/portal/components/boundary-local-portal-host.d.ts.map +1 -0
  235. package/lib/typescript/shared/components/boundary/portal/components/host.d.ts +2 -2
  236. package/lib/typescript/shared/components/boundary/portal/components/host.d.ts.map +1 -1
  237. package/lib/typescript/shared/components/boundary/portal/components/portal-boundary-host.d.ts +2 -2
  238. package/lib/typescript/shared/components/boundary/portal/components/portal-boundary-host.d.ts.map +1 -1
  239. package/lib/typescript/shared/components/boundary/portal/components/portal-provider.d.ts +1 -1
  240. package/lib/typescript/shared/components/boundary/portal/components/portal-provider.d.ts.map +1 -1
  241. package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts +4 -3
  242. package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts.map +1 -1
  243. package/lib/typescript/shared/components/boundary/portal/hooks/use-host-measurement.d.ts.map +1 -1
  244. package/lib/typescript/shared/components/boundary/portal/stores/host-registry.store.d.ts +0 -7
  245. package/lib/typescript/shared/components/boundary/portal/stores/host-registry.store.d.ts.map +1 -1
  246. package/lib/typescript/shared/components/boundary/portal/stores/portal-boundary-host.store.d.ts +16 -1
  247. package/lib/typescript/shared/components/boundary/portal/stores/portal-boundary-host.store.d.ts.map +1 -1
  248. package/lib/typescript/shared/components/boundary/portal/teleport.d.ts +1 -1
  249. package/lib/typescript/shared/components/boundary/portal/teleport.d.ts.map +1 -1
  250. package/lib/typescript/shared/components/boundary/portal/utils/has-local-slot.d.ts +3 -0
  251. package/lib/typescript/shared/components/boundary/portal/utils/has-local-slot.d.ts.map +1 -0
  252. package/lib/typescript/shared/components/boundary/portal/utils/naming.d.ts +2 -1
  253. package/lib/typescript/shared/components/boundary/portal/utils/naming.d.ts.map +1 -1
  254. package/lib/typescript/shared/components/boundary/portal/utils/offset-style.d.ts +16 -32
  255. package/lib/typescript/shared/components/boundary/portal/utils/offset-style.d.ts.map +1 -1
  256. package/lib/typescript/shared/components/boundary/portal/utils/ownership.d.ts +35 -0
  257. package/lib/typescript/shared/components/boundary/portal/utils/ownership.d.ts.map +1 -0
  258. package/lib/typescript/shared/components/boundary/portal/utils/resolve-portal.d.ts +12 -0
  259. package/lib/typescript/shared/components/boundary/portal/utils/resolve-portal.d.ts.map +1 -0
  260. package/lib/typescript/shared/components/boundary/portal/utils/shallow-equal.d.ts +8 -0
  261. package/lib/typescript/shared/components/boundary/portal/utils/shallow-equal.d.ts.map +1 -0
  262. package/lib/typescript/shared/components/boundary/portal/utils/teleport-control.d.ts +4 -0
  263. package/lib/typescript/shared/components/boundary/portal/utils/teleport-control.d.ts.map +1 -1
  264. package/lib/typescript/shared/components/boundary/portal/utils/visible-host.d.ts +8 -0
  265. package/lib/typescript/shared/components/boundary/portal/utils/visible-host.d.ts.map +1 -0
  266. package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts +7 -12
  267. package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts.map +1 -1
  268. package/lib/typescript/shared/components/boundary/types.d.ts +9 -36
  269. package/lib/typescript/shared/components/boundary/types.d.ts.map +1 -1
  270. package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts.map +1 -1
  271. package/lib/typescript/shared/components/boundary/utils/refresh-signals.d.ts.map +1 -1
  272. package/lib/typescript/shared/components/boundary/utils/source-signals.d.ts +0 -1
  273. package/lib/typescript/shared/components/boundary/utils/source-signals.d.ts.map +1 -1
  274. package/lib/typescript/shared/components/create-transition-aware-component.d.ts +6 -5
  275. package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -1
  276. package/lib/typescript/shared/components/masked-view.d.ts +1 -1
  277. package/lib/typescript/shared/components/masked-view.d.ts.map +1 -1
  278. package/lib/typescript/shared/components/overlay/variations/float-overlay.d.ts +1 -1
  279. package/lib/typescript/shared/components/overlay/variations/float-overlay.d.ts.map +1 -1
  280. package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts +1 -1
  281. package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts.map +1 -1
  282. package/lib/typescript/shared/components/scene-view.d.ts +1 -1
  283. package/lib/typescript/shared/components/scene-view.d.ts.map +1 -1
  284. package/lib/typescript/shared/components/screen-container/index.d.ts +1 -1
  285. package/lib/typescript/shared/components/screen-container/index.d.ts.map +1 -1
  286. package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts +1 -1
  287. package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -1
  288. package/lib/typescript/shared/components/screen-container/layers/content.d.ts +1 -1
  289. package/lib/typescript/shared/components/screen-container/layers/content.d.ts.map +1 -1
  290. package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts +1 -1
  291. package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts.map +1 -1
  292. package/lib/typescript/shared/components/screen-container/layers/surface-container.d.ts +1 -1
  293. package/lib/typescript/shared/components/screen-container/layers/surface-container.d.ts.map +1 -1
  294. package/lib/typescript/shared/hooks/navigation/use-stack.d.ts +1 -1
  295. package/lib/typescript/shared/hooks/navigation/use-stack.d.ts.map +1 -1
  296. package/lib/typescript/shared/index.d.ts +711 -667
  297. package/lib/typescript/shared/index.d.ts.map +1 -1
  298. package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts +3 -3
  299. package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts.map +1 -1
  300. package/lib/typescript/shared/providers/screen/animation/helpers/derivations.d.ts +1 -0
  301. package/lib/typescript/shared/providers/screen/animation/helpers/derivations.d.ts.map +1 -1
  302. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
  303. package/lib/typescript/shared/providers/screen/descriptors/descriptors.provider.d.ts +1 -1
  304. package/lib/typescript/shared/providers/screen/descriptors/descriptors.provider.d.ts.map +1 -1
  305. package/lib/typescript/shared/providers/screen/screen-composer.d.ts +1 -1
  306. package/lib/typescript/shared/providers/screen/screen-composer.d.ts.map +1 -1
  307. package/lib/typescript/shared/providers/screen/styles/components/floating-overlay-layer.d.ts +1 -1
  308. package/lib/typescript/shared/providers/screen/styles/components/floating-overlay-layer.d.ts.map +1 -1
  309. package/lib/typescript/shared/providers/screen/styles/helpers/compose-slot-style.d.ts +4 -0
  310. package/lib/typescript/shared/providers/screen/styles/helpers/compose-slot-style.d.ts.map +1 -0
  311. package/lib/typescript/shared/providers/screen/styles/helpers/normalize-slots.d.ts.map +1 -1
  312. package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/index.d.ts.map +1 -1
  313. package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.d.ts +2 -1
  314. package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.d.ts.map +1 -1
  315. package/lib/typescript/shared/providers/screen/styles/hooks/slot-resolvers.d.ts +11 -0
  316. package/lib/typescript/shared/providers/screen/styles/hooks/slot-resolvers.d.ts.map +1 -0
  317. package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts +4 -1
  318. package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -1
  319. package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts +2 -2
  320. package/lib/typescript/shared/providers/screen/styles/index.d.ts +2 -1
  321. package/lib/typescript/shared/providers/screen/styles/index.d.ts.map +1 -1
  322. package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts +5 -10
  323. package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts.map +1 -1
  324. package/lib/typescript/shared/providers/screen/styles/stores/slot-references.store.d.ts +6 -0
  325. package/lib/typescript/shared/providers/screen/styles/stores/slot-references.store.d.ts.map +1 -0
  326. package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts +2 -0
  327. package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts.map +1 -1
  328. package/lib/typescript/shared/stores/bounds/internals/entries.d.ts.map +1 -1
  329. package/lib/typescript/shared/stores/bounds/internals/links.d.ts +4 -3
  330. package/lib/typescript/shared/stores/bounds/internals/links.d.ts.map +1 -1
  331. package/lib/typescript/shared/stores/bounds/internals/resolver.d.ts.map +1 -1
  332. package/lib/typescript/shared/stores/bounds/types.d.ts +9 -20
  333. package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
  334. package/lib/typescript/shared/stores/system.store.d.ts +1 -0
  335. package/lib/typescript/shared/stores/system.store.d.ts.map +1 -1
  336. package/lib/typescript/shared/types/animation.types.d.ts +7 -1
  337. package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
  338. package/lib/typescript/shared/utils/bounds/helpers/styles/compute.d.ts.map +1 -1
  339. package/lib/typescript/shared/utils/bounds/helpers/styles/local-transform.d.ts +6 -0
  340. package/lib/typescript/shared/utils/bounds/helpers/styles/local-transform.d.ts.map +1 -0
  341. package/package.json +1 -1
  342. package/src/shared/components/boundary/components/boundary-target.tsx +21 -7
  343. package/src/shared/components/boundary/create-boundary-component.tsx +92 -28
  344. package/src/shared/components/boundary/hooks/{use-boundary-presence.ts → lifecycles/use-boundary-presence.ts} +16 -5
  345. package/src/shared/components/boundary/hooks/{use-initial-destination-measurement.ts → lifecycles/use-initial-destination-measurement.ts} +40 -13
  346. package/src/shared/components/boundary/hooks/{use-initial-source-measurement.ts → lifecycles/use-initial-source-measurement.ts} +7 -9
  347. package/src/shared/components/boundary/hooks/{use-refresh-boundary.ts → lifecycles/use-refresh-boundary.ts} +6 -6
  348. package/src/shared/components/boundary/hooks/use-boundary-measurement.ts +15 -45
  349. package/src/shared/components/boundary/hooks/use-measurer.ts +9 -14
  350. package/src/shared/components/boundary/index.tsx +55 -29
  351. package/src/shared/components/boundary/portal/components/boundary-local-portal-host.tsx +66 -0
  352. package/src/shared/components/boundary/portal/components/host.tsx +20 -5
  353. package/src/shared/components/boundary/portal/components/portal-boundary-host.tsx +67 -52
  354. package/src/shared/components/boundary/portal/components/portal.tsx +280 -119
  355. package/src/shared/components/boundary/portal/hooks/use-host-measurement.ts +23 -2
  356. package/src/shared/components/boundary/portal/stores/host-registry.store.ts +4 -51
  357. package/src/shared/components/boundary/portal/stores/portal-boundary-host.store.ts +59 -6
  358. package/src/shared/components/boundary/portal/teleport.ts +28 -3
  359. package/src/shared/components/boundary/portal/utils/has-local-slot.ts +16 -0
  360. package/src/shared/components/boundary/portal/utils/naming.ts +11 -1
  361. package/src/shared/components/boundary/portal/utils/offset-style.ts +37 -139
  362. package/src/shared/components/boundary/portal/utils/ownership.ts +371 -0
  363. package/src/shared/components/boundary/portal/utils/resolve-portal.ts +50 -0
  364. package/src/shared/components/boundary/portal/utils/shallow-equal.ts +25 -0
  365. package/src/shared/components/boundary/portal/utils/teleport-control.ts +12 -0
  366. package/src/shared/components/boundary/portal/utils/visible-host.ts +24 -0
  367. package/src/shared/components/boundary/providers/boundary-root.provider.tsx +9 -18
  368. package/src/shared/components/boundary/types.ts +9 -39
  369. package/src/shared/components/boundary/utils/destination-signals.ts +1 -32
  370. package/src/shared/components/boundary/utils/refresh-signals.ts +0 -41
  371. package/src/shared/components/boundary/utils/source-signals.ts +5 -17
  372. package/src/shared/index.ts +0 -5
  373. package/src/shared/providers/helpers/measured-bounds-writes.ts +6 -11
  374. package/src/shared/providers/screen/animation/helpers/derivations.ts +3 -0
  375. package/src/shared/providers/screen/animation/helpers/pipeline.ts +1 -0
  376. package/src/shared/providers/screen/styles/helpers/compose-slot-style.ts +129 -0
  377. package/src/shared/providers/screen/styles/helpers/normalize-slots.ts +45 -8
  378. package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/index.ts +14 -2
  379. package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.ts +3 -0
  380. package/src/shared/providers/screen/styles/hooks/slot-resolvers.tsx +111 -0
  381. package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +21 -3
  382. package/src/shared/providers/screen/styles/index.tsx +8 -3
  383. package/src/shared/providers/screen/styles/slot.provider.tsx +36 -54
  384. package/src/shared/providers/screen/styles/stores/slot-references.store.ts +71 -0
  385. package/src/shared/stores/bounds/helpers/link-pairs.helpers.ts +24 -1
  386. package/src/shared/stores/bounds/internals/entries.ts +13 -5
  387. package/src/shared/stores/bounds/internals/links.ts +167 -85
  388. package/src/shared/stores/bounds/internals/resolver.ts +0 -2
  389. package/src/shared/stores/bounds/types.ts +10 -22
  390. package/src/shared/stores/system.store.ts +6 -0
  391. package/src/shared/types/animation.types.ts +8 -1
  392. package/src/shared/utils/bounds/helpers/styles/compute.ts +22 -124
  393. package/src/shared/utils/bounds/helpers/styles/local-transform.ts +86 -0
  394. package/lib/commonjs/shared/components/boundary/hooks/use-boundary-presence.js.map +0 -1
  395. package/lib/commonjs/shared/components/boundary/hooks/use-initial-destination-measurement.js.map +0 -1
  396. package/lib/commonjs/shared/components/boundary/hooks/use-initial-source-measurement.js.map +0 -1
  397. package/lib/commonjs/shared/components/boundary/hooks/use-refresh-boundary.js.map +0 -1
  398. package/lib/commonjs/shared/components/boundary/portal/resolve-portal.js +0 -36
  399. package/lib/commonjs/shared/components/boundary/portal/resolve-portal.js.map +0 -1
  400. package/lib/commonjs/shared/components/boundary/portal/utils/attachment.js +0 -40
  401. package/lib/commonjs/shared/components/boundary/portal/utils/attachment.js.map +0 -1
  402. package/lib/module/shared/components/boundary/hooks/use-boundary-presence.js.map +0 -1
  403. package/lib/module/shared/components/boundary/hooks/use-initial-destination-measurement.js.map +0 -1
  404. package/lib/module/shared/components/boundary/hooks/use-initial-source-measurement.js.map +0 -1
  405. package/lib/module/shared/components/boundary/hooks/use-refresh-boundary.js.map +0 -1
  406. package/lib/module/shared/components/boundary/portal/resolve-portal.js +0 -31
  407. package/lib/module/shared/components/boundary/portal/resolve-portal.js.map +0 -1
  408. package/lib/module/shared/components/boundary/portal/utils/attachment.js +0 -35
  409. package/lib/module/shared/components/boundary/portal/utils/attachment.js.map +0 -1
  410. package/lib/typescript/shared/components/boundary/hooks/use-boundary-presence.d.ts +0 -9
  411. package/lib/typescript/shared/components/boundary/hooks/use-boundary-presence.d.ts.map +0 -1
  412. package/lib/typescript/shared/components/boundary/hooks/use-initial-destination-measurement.d.ts.map +0 -1
  413. package/lib/typescript/shared/components/boundary/hooks/use-initial-source-measurement.d.ts +0 -9
  414. package/lib/typescript/shared/components/boundary/hooks/use-initial-source-measurement.d.ts.map +0 -1
  415. package/lib/typescript/shared/components/boundary/hooks/use-refresh-boundary.d.ts.map +0 -1
  416. package/lib/typescript/shared/components/boundary/portal/resolve-portal.d.ts +0 -14
  417. package/lib/typescript/shared/components/boundary/portal/resolve-portal.d.ts.map +0 -1
  418. package/lib/typescript/shared/components/boundary/portal/utils/attachment.d.ts +0 -21
  419. package/lib/typescript/shared/components/boundary/portal/utils/attachment.d.ts.map +0 -1
  420. package/src/shared/components/boundary/portal/resolve-portal.ts +0 -40
  421. package/src/shared/components/boundary/portal/utils/attachment.ts +0 -48
@@ -26,19 +26,6 @@ const buildRefreshSignal = (
26
26
  };
27
27
  };
28
28
 
29
- const isMatchedScreenPortalDestinationRefresh = (
30
- linkState: LinkPairsState | undefined,
31
- pairKey: ScreenPairKey,
32
- linkId: string,
33
- ) => {
34
- "worklet";
35
-
36
- return (
37
- linkState?.[pairKey]?.links?.[linkId]?.source?.portalAttachTarget ===
38
- "matched-screen"
39
- );
40
- };
41
-
42
29
  export const getRefreshBoundarySignal = (params: {
43
30
  enabled: boolean;
44
31
  currentScreenKey: string;
@@ -99,22 +86,6 @@ export const getRefreshBoundarySignal = (params: {
99
86
  return null;
100
87
  }
101
88
 
102
- // NOTE:
103
- // Matched-screen portals use the destination as the initial host/anchor.
104
- // Once attached, the teleported source is the thing being animated, so a
105
- // fresh destination measure would mix in a second coordinate basis. Signals were introduced for scroll view cases + group
106
- // cases, but I can't find a case for where a live component ( matched-screen ) would need this complexity. I would just assume
107
- // you would want this for a->b | b->a transitions.
108
- if (
109
- isMatchedScreenPortalDestinationRefresh(
110
- linkState,
111
- refreshDestinationPairKey,
112
- linkId,
113
- )
114
- ) {
115
- return null;
116
- }
117
-
118
89
  return buildRefreshSignal(
119
90
  "destination",
120
91
  refreshDestinationPairKey,
@@ -155,18 +126,6 @@ export const getRefreshBoundarySignal = (params: {
155
126
  return null;
156
127
  }
157
128
 
158
- // NOTE:
159
- // see above for explanation
160
- if (
161
- isMatchedScreenPortalDestinationRefresh(
162
- linkState,
163
- refreshDestinationPairKey,
164
- linkId,
165
- )
166
- ) {
167
- return null;
168
- }
169
-
170
129
  return buildRefreshSignal(
171
130
  "destination",
172
131
  refreshDestinationPairKey,
@@ -15,32 +15,20 @@ export const getInitialSourceCaptureSignal = (params: {
15
15
  sourcePairKey?: ScreenPairKey;
16
16
  linkId: string;
17
17
  group?: string;
18
- shouldAutoMeasure: boolean;
19
18
  linkState?: LinkPairsState;
20
19
  }): SourceCaptureSignal | null => {
21
20
  "worklet";
22
- const {
23
- enabled,
24
- sourcePairKey,
25
- linkId,
26
- group,
27
- shouldAutoMeasure,
28
- linkState,
29
- } = params;
21
+ const { enabled, sourcePairKey, linkId, group, linkState } = params;
30
22
 
31
23
  if (!enabled || !sourcePairKey) {
32
24
  return null;
33
25
  }
34
26
 
35
- // Trigger components capture on press. Passive Boundary.View sources wait for
36
- // their destination side to attach, then capture into the same assigned pair.
37
- if (!shouldAutoMeasure) {
38
- return null;
39
- }
40
-
41
- const link = linkState?.[sourcePairKey]?.links?.[linkId];
27
+ const pair = linkState?.[sourcePairKey];
28
+ const link = pair?.links?.[linkId];
29
+ const hasSourceRequest = pair?.sourceRequests?.[linkId];
42
30
 
43
- if (!link?.destination || link.source) {
31
+ if ((!link?.destination && !hasSourceRequest) || link?.source) {
44
32
  return null;
45
33
  }
46
34
 
@@ -26,11 +26,6 @@ export default {
26
26
  export type { NativeStackAdapterOptions } from "./adapters/with-screen-transitions";
27
27
  export { withScreenTransitions } from "./adapters/with-screen-transitions";
28
28
  export { snapTo } from "./animation/snap-to";
29
- export type {
30
- BoundaryPortal,
31
- BoundaryPortalAttachTarget,
32
- BoundaryPortalOptions,
33
- } from "./components/boundary";
34
29
  export {
35
30
  NAVIGATION_MASK_CONTAINER_STYLE_ID,
36
31
  NAVIGATION_MASK_ELEMENT_STYLE_ID,
@@ -1,11 +1,7 @@
1
1
  import type { MeasuredDimensions, StyleProps } from "react-native-reanimated";
2
2
  import { setEntry } from "../../stores/bounds/internals/entries";
3
3
  import { setDestination, setSource } from "../../stores/bounds/internals/links";
4
- import type {
5
- BoundsPortalAttachTarget,
6
- ScreenPairKey,
7
- SourceHostRef,
8
- } from "../../stores/bounds/types";
4
+ import type { ScreenPairKey } from "../../stores/bounds/types";
9
5
 
10
6
  type LinkWrite =
11
7
  | {
@@ -25,8 +21,8 @@ type ApplyMeasuredBoundsWritesParams = {
25
21
  measured: MeasuredDimensions;
26
22
  preparedStyles: StyleProps;
27
23
  linkWrite?: LinkWrite;
28
- portalHost?: BoundsPortalAttachTarget;
29
- sourceHost?: SourceHostRef;
24
+ handoff?: boolean;
25
+ escapeClipping?: boolean;
30
26
  };
31
27
 
32
28
  export const applyMeasuredBoundsWrites = (
@@ -41,8 +37,8 @@ export const applyMeasuredBoundsWrites = (
41
37
  measured,
42
38
  preparedStyles,
43
39
  linkWrite,
44
- portalHost,
45
- sourceHost,
40
+ handoff,
41
+ escapeClipping,
46
42
  } = params;
47
43
 
48
44
  // Set the bounds entry on every measure to avoid any stale measurements
@@ -59,8 +55,7 @@ export const applyMeasuredBoundsWrites = (
59
55
  measured,
60
56
  preparedStyles,
61
57
  group,
62
- portalHost,
63
- sourceHost,
58
+ { handoff, escapeClipping },
64
59
  );
65
60
  }
66
61
 
@@ -5,6 +5,7 @@ interface DerivationsTarget {
5
5
  current: ScreenTransitionState;
6
6
  next?: ScreenTransitionState;
7
7
  progress: number;
8
+ transitionProgress: number;
8
9
  focused: boolean;
9
10
  active: ScreenTransitionState;
10
11
  inactive: ScreenTransitionState | undefined;
@@ -14,6 +15,8 @@ export const updateDerivations = (frame: DerivationsTarget) => {
14
15
  "worklet";
15
16
 
16
17
  frame.progress = frame.current.progress + (frame.next?.progress ?? 0);
18
+ frame.transitionProgress =
19
+ frame.current.transitionProgress + (frame.next?.transitionProgress ?? 0);
17
20
  frame.focused = !frame.next;
18
21
  frame.active = frame.focused ? frame.current : (frame.next ?? frame.current);
19
22
  frame.inactive = frame.focused ? frame.previous : frame.current;
@@ -184,6 +184,7 @@ const createInitialInterpolatorProps = ({
184
184
  current,
185
185
  next,
186
186
  progress: 0,
187
+ transitionProgress: 0,
187
188
  stackProgress: 0,
188
189
  logicallySettled: 1,
189
190
  focused: true,
@@ -0,0 +1,129 @@
1
+ import type { StyleProps, TransformArrayItem } from "react-native-reanimated";
2
+ import { NO_STYLES } from "../../../../constants";
3
+
4
+ type SharedValueLike = {
5
+ _isReanimatedSharedValue: true;
6
+ get?: () => unknown;
7
+ value?: unknown;
8
+ };
9
+
10
+ const isSharedValueLike = (value: unknown): value is SharedValueLike => {
11
+ "worklet";
12
+ return (
13
+ (value as Partial<SharedValueLike> | null)?._isReanimatedSharedValue ===
14
+ true
15
+ );
16
+ };
17
+
18
+ const resolveTransformValue = <T>(value: T): T | unknown => {
19
+ "worklet";
20
+ if (isSharedValueLike(value)) {
21
+ return value.value;
22
+ }
23
+
24
+ if (Array.isArray(value)) {
25
+ const resolved = [];
26
+ for (let index = 0; index < value.length; index++) {
27
+ const item = value[index];
28
+ resolved.push(isSharedValueLike(item) ? item.value : item);
29
+ }
30
+ return resolved;
31
+ }
32
+
33
+ return value;
34
+ };
35
+
36
+ const resolveTransformItem = (
37
+ value: TransformArrayItem,
38
+ ): TransformArrayItem => {
39
+ "worklet";
40
+ if (typeof value === "object" && value !== null) {
41
+ const resolved: Record<string, unknown> = {};
42
+ const source = value as Record<string, unknown>;
43
+ for (const key in source) {
44
+ resolved[key] = resolveTransformValue(source[key]);
45
+ }
46
+ return resolved as TransformArrayItem;
47
+ }
48
+
49
+ return value;
50
+ };
51
+
52
+ const resolveLocalTransform = (
53
+ transform: TransformArrayItem[],
54
+ ): TransformArrayItem[] => {
55
+ "worklet";
56
+ const resolved: TransformArrayItem[] = [];
57
+
58
+ for (let index = 0; index < transform.length; index++) {
59
+ resolved.push(resolveTransformItem(transform[index]));
60
+ }
61
+
62
+ return resolved;
63
+ };
64
+
65
+ const flattenStyleObject = (
66
+ style: unknown,
67
+ ): Record<string, unknown> | undefined => {
68
+ if (style === null || style === undefined || typeof style !== "object") {
69
+ return undefined;
70
+ }
71
+
72
+ if (!Array.isArray(style)) {
73
+ return style as Record<string, unknown>;
74
+ }
75
+
76
+ let flattened: Record<string, unknown> | undefined;
77
+ for (let index = 0; index < style.length; index++) {
78
+ const child = flattenStyleObject(style[index]);
79
+
80
+ if (!child) {
81
+ continue;
82
+ }
83
+
84
+ flattened = flattened ?? {};
85
+ Object.assign(flattened, child);
86
+ }
87
+
88
+ return flattened;
89
+ };
90
+
91
+ export const getLocalTransformForSlotComposition = (
92
+ style: unknown,
93
+ ): TransformArrayItem[] | undefined => {
94
+ const flattened = flattenStyleObject(style);
95
+ const transform = flattened?.transform;
96
+
97
+ return Array.isArray(transform)
98
+ ? (transform as TransformArrayItem[])
99
+ : undefined;
100
+ };
101
+
102
+ export const composeSlotStyleWithLocalTransform = (
103
+ slotStyle: StyleProps | undefined,
104
+ localTransform: TransformArrayItem[] | undefined,
105
+ boundsLocalTransform?: TransformArrayItem[],
106
+ ): StyleProps => {
107
+ "worklet";
108
+ const resolvedSlotStyle = (slotStyle ?? NO_STYLES) as StyleProps;
109
+ // The measured bounds snapshot supersedes the live local transform so bounds
110
+ // geometry and payload scale are composed from the same measurement frame.
111
+ const transformToCompose = boundsLocalTransform ?? localTransform;
112
+
113
+ if (!transformToCompose?.length) {
114
+ return resolvedSlotStyle;
115
+ }
116
+
117
+ const slotTransform = resolvedSlotStyle.transform;
118
+ if (!Array.isArray(slotTransform)) {
119
+ return resolvedSlotStyle;
120
+ }
121
+
122
+ return {
123
+ ...resolvedSlotStyle,
124
+ transform: [
125
+ ...(slotTransform as TransformArrayItem[]),
126
+ ...resolveLocalTransform(transformToCompose),
127
+ ],
128
+ };
129
+ };
@@ -2,6 +2,10 @@ import type {
2
2
  NormalizedTransitionInterpolatedStyle,
3
3
  NormalizedTransitionSlotStyle,
4
4
  } from "../../../../types/animation.types";
5
+ import {
6
+ getBoundsLocalTransform,
7
+ stripBoundsLocalTransform,
8
+ } from "../../../../utils/bounds/helpers/styles/local-transform";
5
9
 
6
10
  const isExplicitTransitionSlot = (value: unknown) => {
7
11
  "worklet";
@@ -12,7 +16,14 @@ const isExplicitTransitionSlot = (value: unknown) => {
12
16
  );
13
17
  };
14
18
 
15
- const isAlreadyNormalizedStyleMap = (raw: Record<string, any>) => {
19
+ const hasBoundsLocalTransformMarker = (style: unknown) => {
20
+ "worklet";
21
+ return !!getBoundsLocalTransform(style as any)?.length;
22
+ };
23
+
24
+ const isAlreadyNormalizedStyleMapWithoutBoundsMetadata = (
25
+ raw: Record<string, any>,
26
+ ) => {
16
27
  "worklet";
17
28
 
18
29
  for (const key in raw) {
@@ -25,6 +36,14 @@ const isAlreadyNormalizedStyleMap = (raw: Record<string, any>) => {
25
36
  if (!isExplicitTransitionSlot(value)) {
26
37
  return false;
27
38
  }
39
+
40
+ if (
41
+ hasBoundsLocalTransformMarker(
42
+ (value as NormalizedTransitionSlotStyle).style,
43
+ )
44
+ ) {
45
+ return false;
46
+ }
28
47
  }
29
48
 
30
49
  return true;
@@ -42,10 +61,7 @@ export function normalizeSlots(
42
61
  ): NormalizedTransitionInterpolatedStyle {
43
62
  "worklet";
44
63
 
45
- // Most modern interpolators already return the canonical `{ style, props }`
46
- // slot shape. In that common case, we can forward the raw object directly and
47
- // avoid building a second map just to copy the same slot references over.
48
- if (isAlreadyNormalizedStyleMap(raw)) {
64
+ if (isAlreadyNormalizedStyleMapWithoutBoundsMetadata(raw)) {
49
65
  return raw as NormalizedTransitionInterpolatedStyle;
50
66
  }
51
67
 
@@ -62,11 +78,32 @@ export function normalizeSlots(
62
78
  }
63
79
 
64
80
  if (isExplicitTransitionSlot(value)) {
65
- // Proper TransitionSlotStyle pass through
66
- normalized[key] = value as NormalizedTransitionSlotStyle;
81
+ const explicitSlot = value as NormalizedTransitionSlotStyle;
82
+ const boundsLocalTransform = getBoundsLocalTransform(explicitSlot.style);
83
+
84
+ if (!boundsLocalTransform?.length) {
85
+ normalized[key] = explicitSlot;
86
+ continue;
87
+ }
88
+
89
+ normalized[key] = {
90
+ style: explicitSlot.style
91
+ ? stripBoundsLocalTransform(explicitSlot.style)
92
+ : undefined,
93
+ props: explicitSlot.props,
94
+ boundsLocalTransform,
95
+ };
67
96
  } else {
97
+ const boundsLocalTransform = getBoundsLocalTransform(value);
98
+ const style =
99
+ boundsLocalTransform?.length && value
100
+ ? stripBoundsLocalTransform(value)
101
+ : value;
102
+
68
103
  // Shorthand: plain StyleProps — wrap it
69
- normalized[key] = { style: value };
104
+ normalized[key] = boundsLocalTransform?.length
105
+ ? { style, boundsLocalTransform }
106
+ : { style };
70
107
  }
71
108
  }
72
109
 
@@ -107,6 +107,7 @@ const getResolvedSlotOutput = ({
107
107
  resolvedSlot: materializeResolvedSlot({
108
108
  baseStyle: state.baseStyle,
109
109
  baseProps: state.baseProps,
110
+ boundsLocalTransform: slot?.boundsLocalTransform,
110
111
  previousState,
111
112
  styleKeys: state.styleKeys,
112
113
  propKeys: state.propKeys,
@@ -164,6 +165,9 @@ const getMergedLocalSlot = (
164
165
  "worklet";
165
166
  let mergedStyle: Record<string, unknown> | undefined;
166
167
  let mergedProps: Record<string, unknown> | undefined;
168
+ let boundsLocalTransform:
169
+ | NormalizedTransitionSlotStyle["boundsLocalTransform"]
170
+ | undefined;
167
171
 
168
172
  for (let index = 0; index < context.localStylesMaps.length; index++) {
169
173
  const slot = context.localStylesMaps[index]?.[slotId];
@@ -177,15 +181,19 @@ const getMergedLocalSlot = (
177
181
  slot.style as Record<string, unknown> | undefined,
178
182
  );
179
183
  mergedProps = mergeBucket(mergedProps, slot.props);
184
+ if (slot.boundsLocalTransform?.length) {
185
+ boundsLocalTransform = slot.boundsLocalTransform;
186
+ }
180
187
  }
181
188
 
182
- if (!mergedStyle && !mergedProps) {
189
+ if (!mergedStyle && !mergedProps && !boundsLocalTransform) {
183
190
  return undefined;
184
191
  }
185
192
 
186
193
  return {
187
194
  style: mergedStyle,
188
195
  props: mergedProps,
196
+ boundsLocalTransform,
189
197
  };
190
198
  };
191
199
 
@@ -343,7 +351,11 @@ const areSlotsEqual = (
343
351
 
344
352
  return (
345
353
  areFlatObjectsEqual(left.style, right.style) &&
346
- areFlatObjectsEqual(left.props, right.props)
354
+ areFlatObjectsEqual(left.props, right.props) &&
355
+ areTransformArraysEqual(
356
+ left.boundsLocalTransform,
357
+ right.boundsLocalTransform,
358
+ )
347
359
  );
348
360
  };
349
361
 
@@ -111,6 +111,7 @@ const materializeResolvedProps = ({
111
111
  export const materializeResolvedSlot = ({
112
112
  baseStyle,
113
113
  baseProps,
114
+ boundsLocalTransform,
114
115
  previousState,
115
116
  styleKeys,
116
117
  propKeys,
@@ -121,6 +122,7 @@ export const materializeResolvedSlot = ({
121
122
  }: {
122
123
  baseStyle: Record<string, unknown> | undefined;
123
124
  baseProps: Record<string, unknown> | undefined;
125
+ boundsLocalTransform: NormalizedTransitionSlotStyle["boundsLocalTransform"];
124
126
  previousState: ResettableStyleState | undefined;
125
127
  styleKeys: Record<string, true> | undefined;
126
128
  propKeys: Record<string, true> | undefined;
@@ -149,6 +151,7 @@ export const materializeResolvedSlot = ({
149
151
 
150
152
  resolvedSlot.style = resolvedStyle;
151
153
  resolvedSlot.props = resolvedProps;
154
+ resolvedSlot.boundsLocalTransform = boundsLocalTransform;
152
155
 
153
156
  if (!resolvedSlot.style && !resolvedSlot.props) {
154
157
  return undefined;
@@ -0,0 +1,111 @@
1
+ import { useMemo } from "react";
2
+ import { useAnimatedProps, useAnimatedStyle } from "react-native-reanimated";
3
+ import { NO_PROPS, NO_STYLES } from "../../../../constants";
4
+ import {
5
+ composeSlotStyleWithLocalTransform,
6
+ getLocalTransformForSlotComposition,
7
+ } from "../helpers/compose-slot-style";
8
+ import { useScreenSlots } from "../slot.provider";
9
+
10
+ export const useSlotStyles = (slotId: string | undefined) => {
11
+ const { slotsMap } = useScreenSlots();
12
+
13
+ return useAnimatedStyle(() => {
14
+ const slot = slotId ? slotsMap.get()[slotId] : undefined;
15
+ const slotStyle = slot?.style ?? NO_STYLES;
16
+
17
+ return composeSlotStyleWithLocalTransform(
18
+ slotStyle,
19
+ undefined,
20
+ slot?.boundsLocalTransform,
21
+ );
22
+ });
23
+ };
24
+
25
+ export const useComposedSlotStyles = (
26
+ slotId: string | undefined,
27
+ style: unknown,
28
+ ) => {
29
+ const { slotsMap } = useScreenSlots();
30
+ const localTransform = useMemo(
31
+ () => getLocalTransformForSlotComposition(style),
32
+ [style],
33
+ );
34
+
35
+ return useAnimatedStyle(() => {
36
+ const slot = slotId ? slotsMap.get()[slotId] : undefined;
37
+ const slotStyle = slot?.style ?? NO_STYLES;
38
+
39
+ return composeSlotStyleWithLocalTransform(
40
+ slotStyle,
41
+ localTransform,
42
+ slot?.boundsLocalTransform,
43
+ );
44
+ });
45
+ };
46
+
47
+ /**
48
+ * Stacking-only slice (`zIndex`/`elevation`) of a slot's style. Returned
49
+ * separately so an owner can keep just its stacking context while a nested
50
+ * target takes the full associated style. Yields `NO_STYLES` when neither is set.
51
+ */
52
+ export const useSlotStackingStyles = (slotId: string | undefined) => {
53
+ const { slotsMap } = useScreenSlots();
54
+
55
+ return useAnimatedStyle(() => {
56
+ const baseStyle = slotId ? slotsMap.get()[slotId]?.style : undefined;
57
+ const zIndex = baseStyle?.zIndex ?? 0;
58
+ const elevation = baseStyle?.elevation ?? 0;
59
+
60
+ if (zIndex === 0 && elevation === 0) {
61
+ return NO_STYLES;
62
+ }
63
+
64
+ return { zIndex, elevation };
65
+ });
66
+ };
67
+
68
+ export const useSlotLayoutStyles = (slotId: string | undefined) => {
69
+ const { slotsMap } = useScreenSlots();
70
+
71
+ return useAnimatedStyle(() => {
72
+ const baseStyle = slotId ? slotsMap.get()[slotId]?.style : undefined;
73
+ const width = baseStyle?.width;
74
+ const height = baseStyle?.height;
75
+ const minWidth = baseStyle?.minWidth;
76
+ const minHeight = baseStyle?.minHeight;
77
+ const maxWidth = baseStyle?.maxWidth;
78
+ const maxHeight = baseStyle?.maxHeight;
79
+ const aspectRatio = baseStyle?.aspectRatio;
80
+
81
+ if (
82
+ width === undefined &&
83
+ height === undefined &&
84
+ minWidth === undefined &&
85
+ minHeight === undefined &&
86
+ maxWidth === undefined &&
87
+ maxHeight === undefined &&
88
+ aspectRatio === undefined
89
+ ) {
90
+ return NO_STYLES;
91
+ }
92
+
93
+ return {
94
+ width,
95
+ height,
96
+ minWidth,
97
+ minHeight,
98
+ maxWidth,
99
+ maxHeight,
100
+ aspectRatio,
101
+ };
102
+ });
103
+ };
104
+
105
+ export const useSlotProps = (slotId: string | undefined) => {
106
+ const { slotsMap } = useScreenSlots();
107
+
108
+ return useAnimatedProps(() => {
109
+ return (slotId ? slotsMap.get()[slotId]?.props : undefined) ?? NO_PROPS;
110
+ });
111
+ };
@@ -1,6 +1,10 @@
1
1
  import { useDerivedValue, useSharedValue } from "react-native-reanimated";
2
2
  import { NO_STYLES } from "../../../../constants";
3
3
  import { AnimationStore } from "../../../../stores/animation.store";
4
+ import {
5
+ LifecycleTransitionRequestKind,
6
+ SystemStore,
7
+ } from "../../../../stores/system.store";
4
8
  import type {
5
9
  NormalizedTransitionInterpolatedStyle,
6
10
  ScreenStyleInterpolator,
@@ -140,15 +144,19 @@ export const useInterpolatedStylesMap = () => {
140
144
  } = useScreenAnimationContext();
141
145
  const boundsAccessor = useBuildBoundsAccessor();
142
146
  const transition = useBuildTransitionAccessor();
147
+ const nextInterpolatorReady = useSharedValue(0);
143
148
 
149
+ const activeScreenKey = nextScreenKey ?? currentScreenKey;
144
150
  const {
145
151
  entering: activeEntering,
146
152
  transitionProgress: activeTransitionProgress,
147
- } = AnimationStore.getBag(nextScreenKey ?? currentScreenKey);
153
+ } = AnimationStore.getBag(activeScreenKey);
154
+ const { pendingLifecycleRequestKind: activePendingLifecycleRequestKind } =
155
+ SystemStore.getBag(activeScreenKey);
148
156
 
149
157
  const isGesturingDuringCloseAnimation = useSharedValue(false);
150
158
 
151
- return useDerivedValue<LocalStyleLayers>(() => {
159
+ const localStylesMaps = useDerivedValue<LocalStyleLayers>(() => {
152
160
  "worklet";
153
161
  readScreenAnimationRevisions(
154
162
  screenInterpolatorPropsRevision,
@@ -179,13 +187,18 @@ export const useInterpolatedStylesMap = () => {
179
187
  // genuinely live: never during a gesture-driven close, never before a next
180
188
  // interpolator exists, and never in the next screen's pre-start window
181
189
  // (entering, but no transformed frame yet). Only then does "next" take over.
190
+ const isPendingOpen =
191
+ activePendingLifecycleRequestKind.get() ===
192
+ LifecycleTransitionRequestKind.Open;
193
+ const activeOpening = isPendingOpen || !!activeEntering.get();
182
194
  const currentOwnsInterpolator =
183
195
  isInGestureMode ||
184
196
  !nextInterpolator ||
185
197
  isOpeningBeforeStart(
186
- activeEntering.get(),
198
+ activeOpening ? 1 : 0,
187
199
  activeTransitionProgress.get(),
188
200
  );
201
+ nextInterpolatorReady.set(currentOwnsInterpolator ? 0 : 1);
189
202
 
190
203
  const interpolatorOptionsOwner = currentOwnsInterpolator
191
204
  ? "current"
@@ -250,4 +263,9 @@ export const useInterpolatedStylesMap = () => {
250
263
 
251
264
  return layers;
252
265
  });
266
+
267
+ return {
268
+ localStylesMaps,
269
+ nextInterpolatorReady,
270
+ };
253
271
  };
@@ -1,9 +1,14 @@
1
+ export {
2
+ useComposedSlotStyles,
3
+ useSlotLayoutStyles,
4
+ useSlotProps,
5
+ useSlotStackingStyles,
6
+ useSlotStyles,
7
+ } from "./hooks/slot-resolvers";
8
+
1
9
  export {
2
10
  ScreenSlotContext,
3
11
  type ScreenSlotName,
4
12
  ScreenSlotProvider,
5
13
  useScreenSlots,
6
- useSlotProps,
7
- useSlotStackingStyles,
8
- useSlotStyles,
9
14
  } from "./slot.provider";