react-native-screen-transitions 3.8.0-beta.1 → 3.9.0-alpha.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 (485) hide show
  1. package/lib/commonjs/blank-stack/components/stack-view.js +2 -1
  2. package/lib/commonjs/blank-stack/components/stack-view.js.map +1 -1
  3. package/lib/commonjs/shared/components/{create-boundary-component → boundary}/components/boundary-target.js +21 -8
  4. package/lib/commonjs/shared/components/boundary/components/boundary-target.js.map +1 -0
  5. package/lib/commonjs/shared/components/{create-boundary-component → boundary}/create-boundary-component.js +10 -24
  6. package/lib/commonjs/shared/components/boundary/create-boundary-component.js.map +1 -0
  7. package/lib/commonjs/shared/components/boundary/hooks/use-boundary-presence.js.map +1 -0
  8. package/lib/commonjs/shared/components/boundary/hooks/use-initial-destination-measurement.js +115 -0
  9. package/lib/commonjs/shared/components/boundary/hooks/use-initial-destination-measurement.js.map +1 -0
  10. package/lib/commonjs/shared/components/{create-boundary-component → boundary}/hooks/use-initial-source-measurement.js +4 -5
  11. package/lib/commonjs/shared/components/boundary/hooks/use-initial-source-measurement.js.map +1 -0
  12. package/lib/commonjs/shared/components/{create-boundary-component → boundary}/hooks/use-measurer.js +26 -22
  13. package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js.map +1 -0
  14. package/lib/commonjs/shared/components/{create-boundary-component → boundary}/hooks/use-refresh-boundary.js +10 -7
  15. package/lib/commonjs/shared/components/boundary/hooks/use-refresh-boundary.js.map +1 -0
  16. package/lib/commonjs/shared/components/{create-boundary-component → boundary}/index.js +8 -1
  17. package/lib/commonjs/shared/components/boundary/index.js.map +1 -0
  18. package/lib/commonjs/shared/components/boundary/portal/components/host.js +99 -0
  19. package/lib/commonjs/shared/components/boundary/portal/components/host.js.map +1 -0
  20. package/lib/commonjs/shared/components/boundary/portal/components/portal-boundary-host.js +68 -0
  21. package/lib/commonjs/shared/components/boundary/portal/components/portal-boundary-host.js.map +1 -0
  22. package/lib/commonjs/shared/components/boundary/portal/components/portal-provider.js +17 -0
  23. package/lib/commonjs/shared/components/boundary/portal/components/portal-provider.js.map +1 -0
  24. package/lib/commonjs/shared/components/boundary/portal/components/portal.js +195 -0
  25. package/lib/commonjs/shared/components/boundary/portal/components/portal.js.map +1 -0
  26. package/lib/commonjs/shared/components/boundary/portal/hooks/use-host-measurement.js +74 -0
  27. package/lib/commonjs/shared/components/boundary/portal/hooks/use-host-measurement.js.map +1 -0
  28. package/lib/commonjs/shared/components/boundary/portal/index.js +27 -0
  29. package/lib/commonjs/shared/components/boundary/portal/index.js.map +1 -0
  30. package/lib/commonjs/shared/components/boundary/portal/stores/host-bounds.store.js +47 -0
  31. package/lib/commonjs/shared/components/boundary/portal/stores/host-bounds.store.js.map +1 -0
  32. package/lib/commonjs/shared/components/boundary/portal/stores/host-registry.store.js +137 -0
  33. package/lib/commonjs/shared/components/boundary/portal/stores/host-registry.store.js.map +1 -0
  34. package/lib/commonjs/shared/components/boundary/portal/stores/portal-boundary-host.store.js +60 -0
  35. package/lib/commonjs/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map +1 -0
  36. package/lib/commonjs/shared/components/boundary/portal/utils/attachment.js +40 -0
  37. package/lib/commonjs/shared/components/boundary/portal/utils/attachment.js.map +1 -0
  38. package/lib/commonjs/shared/components/boundary/portal/utils/naming.js +15 -0
  39. package/lib/commonjs/shared/components/boundary/portal/utils/naming.js.map +1 -0
  40. package/lib/commonjs/shared/components/boundary/portal/utils/offset-style.js +71 -0
  41. package/lib/commonjs/shared/components/boundary/portal/utils/offset-style.js.map +1 -0
  42. package/lib/commonjs/shared/components/boundary/portal/utils/teleport-control.js +16 -0
  43. package/lib/commonjs/shared/components/boundary/portal/utils/teleport-control.js.map +1 -0
  44. package/lib/commonjs/shared/components/{create-boundary-component → boundary}/providers/boundary-owner.provider.js +26 -25
  45. package/lib/commonjs/shared/components/boundary/providers/boundary-owner.provider.js.map +1 -0
  46. package/lib/commonjs/shared/components/boundary/types.js.map +1 -0
  47. package/lib/commonjs/shared/components/boundary/utils/destination-signals.js +25 -0
  48. package/lib/commonjs/shared/components/boundary/utils/destination-signals.js.map +1 -0
  49. package/lib/commonjs/shared/components/{create-boundary-component → boundary}/utils/measured-bounds.js +19 -9
  50. package/lib/commonjs/shared/components/boundary/utils/measured-bounds.js.map +1 -0
  51. package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js +105 -0
  52. package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js.map +1 -0
  53. package/lib/commonjs/shared/components/boundary/utils/source-signals.js +48 -0
  54. package/lib/commonjs/shared/components/boundary/utils/source-signals.js.map +1 -0
  55. package/lib/commonjs/shared/components/create-transition-aware-component.js +8 -3
  56. package/lib/commonjs/shared/components/create-transition-aware-component.js.map +1 -1
  57. package/lib/commonjs/shared/components/{integrations/masked-view.js → masked-view.js} +2 -2
  58. package/lib/commonjs/shared/components/masked-view.js.map +1 -0
  59. package/lib/commonjs/shared/components/screen-container/layers/content.js +9 -5
  60. package/lib/commonjs/shared/components/screen-container/layers/content.js.map +1 -1
  61. package/lib/commonjs/shared/configs/presets.js +6 -6
  62. package/lib/commonjs/shared/configs/presets.js.map +1 -1
  63. package/lib/commonjs/shared/index.js +4 -4
  64. package/lib/commonjs/shared/index.js.map +1 -1
  65. package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js +4 -2
  66. package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
  67. package/lib/commonjs/shared/providers/screen/descriptors/descriptors.provider.js +7 -3
  68. package/lib/commonjs/shared/providers/screen/descriptors/descriptors.provider.js.map +1 -1
  69. package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js +8 -1
  70. package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js.map +1 -1
  71. package/lib/commonjs/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js +21 -6
  72. package/lib/commonjs/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js.map +1 -1
  73. package/lib/commonjs/shared/providers/screen/origin.provider.js +41 -0
  74. package/lib/commonjs/shared/providers/screen/origin.provider.js.map +1 -0
  75. package/lib/commonjs/shared/providers/screen/styles/constants.js +2 -0
  76. package/lib/commonjs/shared/providers/screen/styles/constants.js.map +1 -1
  77. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/are-resettable-states-equal.js +58 -0
  78. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/are-resettable-states-equal.js.map +1 -0
  79. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js +7 -0
  80. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js.map +1 -1
  81. package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +2 -1
  82. package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
  83. package/lib/commonjs/shared/providers/screen/styles/styles.provider.js +7 -5
  84. package/lib/commonjs/shared/providers/screen/styles/styles.provider.js.map +1 -1
  85. package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js +1 -10
  86. package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -1
  87. package/lib/commonjs/shared/stores/bounds/index.js.map +1 -1
  88. package/lib/commonjs/shared/stores/bounds/internals/entries.js.map +1 -1
  89. package/lib/commonjs/shared/stores/bounds/internals/links.js +36 -19
  90. package/lib/commonjs/shared/stores/bounds/internals/links.js.map +1 -1
  91. package/lib/commonjs/shared/stores/bounds/internals/resolver.js +6 -4
  92. package/lib/commonjs/shared/stores/bounds/internals/resolver.js.map +1 -1
  93. package/lib/commonjs/shared/stores/bounds/internals/state.js.map +1 -1
  94. package/lib/commonjs/shared/stores/scroll.store.js +54 -1
  95. package/lib/commonjs/shared/stores/scroll.store.js.map +1 -1
  96. package/lib/commonjs/shared/utils/bounds/helpers/create-bound-tag.js +38 -4
  97. package/lib/commonjs/shared/utils/bounds/helpers/create-bound-tag.js.map +1 -1
  98. package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js +40 -87
  99. package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
  100. package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js +6 -67
  101. package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
  102. package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js +8 -12
  103. package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
  104. package/lib/commonjs/shared/utils/bounds/helpers/styles/composers.js +235 -68
  105. package/lib/commonjs/shared/utils/bounds/helpers/styles/composers.js.map +1 -1
  106. package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js +74 -4
  107. package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
  108. package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js +5 -9
  109. package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
  110. package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js +5 -10
  111. package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
  112. package/lib/module/blank-stack/components/stack-view.js +3 -2
  113. package/lib/module/blank-stack/components/stack-view.js.map +1 -1
  114. package/lib/module/shared/components/{create-boundary-component → boundary}/components/boundary-target.js +21 -8
  115. package/lib/module/shared/components/boundary/components/boundary-target.js.map +1 -0
  116. package/lib/module/shared/components/{create-boundary-component → boundary}/create-boundary-component.js +11 -25
  117. package/lib/module/shared/components/boundary/create-boundary-component.js.map +1 -0
  118. package/lib/module/shared/components/boundary/hooks/use-boundary-presence.js.map +1 -0
  119. package/lib/module/shared/components/boundary/hooks/use-initial-destination-measurement.js +110 -0
  120. package/lib/module/shared/components/boundary/hooks/use-initial-destination-measurement.js.map +1 -0
  121. package/lib/module/shared/components/{create-boundary-component → boundary}/hooks/use-initial-source-measurement.js +4 -5
  122. package/lib/module/shared/components/boundary/hooks/use-initial-source-measurement.js.map +1 -0
  123. package/lib/module/shared/components/{create-boundary-component → boundary}/hooks/use-measurer.js +27 -23
  124. package/lib/module/shared/components/boundary/hooks/use-measurer.js.map +1 -0
  125. package/lib/module/shared/components/{create-boundary-component → boundary}/hooks/use-refresh-boundary.js +10 -7
  126. package/lib/module/shared/components/boundary/hooks/use-refresh-boundary.js.map +1 -0
  127. package/lib/module/shared/components/{create-boundary-component → boundary}/index.js +8 -1
  128. package/lib/module/shared/components/boundary/index.js.map +1 -0
  129. package/lib/module/shared/components/boundary/portal/components/host.js +94 -0
  130. package/lib/module/shared/components/boundary/portal/components/host.js.map +1 -0
  131. package/lib/module/shared/components/boundary/portal/components/portal-boundary-host.js +63 -0
  132. package/lib/module/shared/components/boundary/portal/components/portal-boundary-host.js.map +1 -0
  133. package/lib/module/shared/components/boundary/portal/components/portal-provider.js +13 -0
  134. package/lib/module/shared/components/boundary/portal/components/portal-provider.js.map +1 -0
  135. package/lib/module/shared/components/boundary/portal/components/portal.js +190 -0
  136. package/lib/module/shared/components/boundary/portal/components/portal.js.map +1 -0
  137. package/lib/module/shared/components/boundary/portal/hooks/use-host-measurement.js +69 -0
  138. package/lib/module/shared/components/boundary/portal/hooks/use-host-measurement.js.map +1 -0
  139. package/lib/module/shared/components/boundary/portal/index.js +6 -0
  140. package/lib/module/shared/components/boundary/portal/index.js.map +1 -0
  141. package/lib/module/shared/components/boundary/portal/stores/host-bounds.store.js +40 -0
  142. package/lib/module/shared/components/boundary/portal/stores/host-bounds.store.js.map +1 -0
  143. package/lib/module/shared/components/boundary/portal/stores/host-registry.store.js +126 -0
  144. package/lib/module/shared/components/boundary/portal/stores/host-registry.store.js.map +1 -0
  145. package/lib/module/shared/components/boundary/portal/stores/portal-boundary-host.store.js +53 -0
  146. package/lib/module/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map +1 -0
  147. package/lib/module/shared/components/boundary/portal/utils/attachment.js +35 -0
  148. package/lib/module/shared/components/boundary/portal/utils/attachment.js.map +1 -0
  149. package/lib/module/shared/components/boundary/portal/utils/naming.js +10 -0
  150. package/lib/module/shared/components/boundary/portal/utils/naming.js.map +1 -0
  151. package/lib/module/shared/components/boundary/portal/utils/offset-style.js +66 -0
  152. package/lib/module/shared/components/boundary/portal/utils/offset-style.js.map +1 -0
  153. package/lib/module/shared/components/boundary/portal/utils/teleport-control.js +11 -0
  154. package/lib/module/shared/components/boundary/portal/utils/teleport-control.js.map +1 -0
  155. package/lib/module/shared/components/boundary/providers/boundary-owner.provider.js +60 -0
  156. package/lib/module/shared/components/boundary/providers/boundary-owner.provider.js.map +1 -0
  157. package/lib/module/shared/components/boundary/types.js.map +1 -0
  158. package/lib/module/shared/components/boundary/utils/destination-signals.js +20 -0
  159. package/lib/module/shared/components/boundary/utils/destination-signals.js.map +1 -0
  160. package/lib/module/shared/components/{create-boundary-component → boundary}/utils/measured-bounds.js +16 -7
  161. package/lib/module/shared/components/boundary/utils/measured-bounds.js.map +1 -0
  162. package/lib/module/shared/components/boundary/utils/refresh-signals.js +100 -0
  163. package/lib/module/shared/components/boundary/utils/refresh-signals.js.map +1 -0
  164. package/lib/module/shared/components/boundary/utils/source-signals.js +43 -0
  165. package/lib/module/shared/components/boundary/utils/source-signals.js.map +1 -0
  166. package/lib/module/shared/components/create-transition-aware-component.js +8 -3
  167. package/lib/module/shared/components/create-transition-aware-component.js.map +1 -1
  168. package/lib/module/shared/components/{integrations/masked-view.js → masked-view.js} +2 -2
  169. package/lib/module/shared/components/masked-view.js.map +1 -0
  170. package/lib/module/shared/components/screen-container/layers/content.js +10 -6
  171. package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
  172. package/lib/module/shared/configs/presets.js +6 -6
  173. package/lib/module/shared/configs/presets.js.map +1 -1
  174. package/lib/module/shared/index.js +2 -2
  175. package/lib/module/shared/index.js.map +1 -1
  176. package/lib/module/shared/providers/helpers/measured-bounds-writes.js +4 -2
  177. package/lib/module/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
  178. package/lib/module/shared/providers/screen/descriptors/descriptors.provider.js +8 -4
  179. package/lib/module/shared/providers/screen/descriptors/descriptors.provider.js.map +1 -1
  180. package/lib/module/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js +8 -1
  181. package/lib/module/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js.map +1 -1
  182. package/lib/module/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js +20 -6
  183. package/lib/module/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js.map +1 -1
  184. package/lib/module/shared/providers/screen/origin.provider.js +33 -0
  185. package/lib/module/shared/providers/screen/origin.provider.js.map +1 -0
  186. package/lib/module/shared/providers/screen/styles/constants.js +2 -0
  187. package/lib/module/shared/providers/screen/styles/constants.js.map +1 -1
  188. package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/are-resettable-states-equal.js +53 -0
  189. package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/are-resettable-states-equal.js.map +1 -0
  190. package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js +1 -0
  191. package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js.map +1 -1
  192. package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +2 -1
  193. package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
  194. package/lib/module/shared/providers/screen/styles/styles.provider.js +7 -5
  195. package/lib/module/shared/providers/screen/styles/styles.provider.js.map +1 -1
  196. package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js +1 -8
  197. package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -1
  198. package/lib/module/shared/stores/bounds/index.js.map +1 -1
  199. package/lib/module/shared/stores/bounds/internals/entries.js.map +1 -1
  200. package/lib/module/shared/stores/bounds/internals/links.js +36 -19
  201. package/lib/module/shared/stores/bounds/internals/links.js.map +1 -1
  202. package/lib/module/shared/stores/bounds/internals/resolver.js +6 -4
  203. package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -1
  204. package/lib/module/shared/stores/bounds/internals/state.js.map +1 -1
  205. package/lib/module/shared/stores/scroll.store.js +50 -0
  206. package/lib/module/shared/stores/scroll.store.js.map +1 -1
  207. package/lib/module/shared/types/animation.types.js.map +1 -1
  208. package/lib/module/shared/types/bounds.types.js.map +1 -1
  209. package/lib/module/shared/utils/bounds/helpers/create-bound-tag.js +36 -3
  210. package/lib/module/shared/utils/bounds/helpers/create-bound-tag.js.map +1 -1
  211. package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js +42 -89
  212. package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
  213. package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js +6 -67
  214. package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
  215. package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js +8 -13
  216. package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
  217. package/lib/module/shared/utils/bounds/helpers/styles/composers.js +236 -69
  218. package/lib/module/shared/utils/bounds/helpers/styles/composers.js.map +1 -1
  219. package/lib/module/shared/utils/bounds/helpers/styles/compute.js +74 -4
  220. package/lib/module/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
  221. package/lib/module/shared/utils/bounds/navigation/reveal/build.js +5 -9
  222. package/lib/module/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
  223. package/lib/module/shared/utils/bounds/navigation/zoom/build.js +5 -10
  224. package/lib/module/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
  225. package/lib/typescript/blank-stack/components/stack-view.d.ts.map +1 -1
  226. package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts.map +1 -0
  227. package/lib/typescript/shared/components/boundary/create-boundary-component.d.ts.map +1 -0
  228. package/lib/typescript/shared/components/boundary/hooks/use-boundary-presence.d.ts.map +1 -0
  229. package/lib/typescript/shared/components/{create-boundary-component → boundary}/hooks/use-initial-destination-measurement.d.ts +1 -4
  230. package/lib/typescript/shared/components/boundary/hooks/use-initial-destination-measurement.d.ts.map +1 -0
  231. package/lib/typescript/shared/components/{create-boundary-component → boundary}/hooks/use-initial-source-measurement.d.ts +0 -2
  232. package/lib/typescript/shared/components/boundary/hooks/use-initial-source-measurement.d.ts.map +1 -0
  233. package/lib/typescript/shared/components/{create-boundary-component → boundary}/hooks/use-measurer.d.ts +4 -2
  234. package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts.map +1 -0
  235. package/lib/typescript/shared/components/boundary/hooks/use-refresh-boundary.d.ts +10 -0
  236. package/lib/typescript/shared/components/boundary/hooks/use-refresh-boundary.d.ts.map +1 -0
  237. package/lib/typescript/shared/components/{create-boundary-component → boundary}/index.d.ts +8 -2
  238. package/lib/typescript/shared/components/boundary/index.d.ts.map +1 -0
  239. package/lib/typescript/shared/components/boundary/portal/components/host.d.ts +7 -0
  240. package/lib/typescript/shared/components/boundary/portal/components/host.d.ts.map +1 -0
  241. package/lib/typescript/shared/components/boundary/portal/components/portal-boundary-host.d.ts +9 -0
  242. package/lib/typescript/shared/components/boundary/portal/components/portal-boundary-host.d.ts.map +1 -0
  243. package/lib/typescript/shared/components/boundary/portal/components/portal-provider.d.ts +4 -0
  244. package/lib/typescript/shared/components/boundary/portal/components/portal-provider.d.ts.map +1 -0
  245. package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts +19 -0
  246. package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts.map +1 -0
  247. package/lib/typescript/shared/components/boundary/portal/hooks/use-host-measurement.d.ts +13 -0
  248. package/lib/typescript/shared/components/boundary/portal/hooks/use-host-measurement.d.ts.map +1 -0
  249. package/lib/typescript/shared/components/boundary/portal/index.d.ts +4 -0
  250. package/lib/typescript/shared/components/boundary/portal/index.d.ts.map +1 -0
  251. package/lib/typescript/shared/components/boundary/portal/stores/host-bounds.store.d.ts +9 -0
  252. package/lib/typescript/shared/components/boundary/portal/stores/host-bounds.store.d.ts.map +1 -0
  253. package/lib/typescript/shared/components/boundary/portal/stores/host-registry.store.d.ts +19 -0
  254. package/lib/typescript/shared/components/boundary/portal/stores/host-registry.store.d.ts.map +1 -0
  255. package/lib/typescript/shared/components/boundary/portal/stores/portal-boundary-host.store.d.ts +11 -0
  256. package/lib/typescript/shared/components/boundary/portal/stores/portal-boundary-host.store.d.ts.map +1 -0
  257. package/lib/typescript/shared/components/boundary/portal/utils/attachment.d.ts +21 -0
  258. package/lib/typescript/shared/components/boundary/portal/utils/attachment.d.ts.map +1 -0
  259. package/lib/typescript/shared/components/boundary/portal/utils/naming.d.ts +3 -0
  260. package/lib/typescript/shared/components/boundary/portal/utils/naming.d.ts.map +1 -0
  261. package/lib/typescript/shared/components/boundary/portal/utils/offset-style.d.ts +37 -0
  262. package/lib/typescript/shared/components/boundary/portal/utils/offset-style.d.ts.map +1 -0
  263. package/lib/typescript/shared/components/boundary/portal/utils/teleport-control.d.ts +3 -0
  264. package/lib/typescript/shared/components/boundary/portal/utils/teleport-control.d.ts.map +1 -0
  265. package/lib/typescript/shared/components/{create-boundary-component → boundary}/providers/boundary-owner.provider.d.ts +14 -6
  266. package/lib/typescript/shared/components/boundary/providers/boundary-owner.provider.d.ts.map +1 -0
  267. package/lib/typescript/shared/components/boundary/types.d.ts +78 -0
  268. package/lib/typescript/shared/components/boundary/types.d.ts.map +1 -0
  269. package/lib/typescript/shared/components/{create-boundary-component → boundary}/utils/destination-signals.d.ts +2 -3
  270. package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts.map +1 -0
  271. package/lib/typescript/shared/components/boundary/utils/measured-bounds.d.ts +12 -0
  272. package/lib/typescript/shared/components/boundary/utils/measured-bounds.d.ts.map +1 -0
  273. package/lib/typescript/shared/components/{create-boundary-component → boundary}/utils/refresh-signals.d.ts +4 -3
  274. package/lib/typescript/shared/components/boundary/utils/refresh-signals.d.ts.map +1 -0
  275. package/lib/typescript/shared/components/{create-boundary-component → boundary}/utils/source-signals.d.ts +1 -2
  276. package/lib/typescript/shared/components/boundary/utils/source-signals.d.ts.map +1 -0
  277. package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -1
  278. package/lib/typescript/shared/components/masked-view.d.ts.map +1 -0
  279. package/lib/typescript/shared/components/screen-container/layers/content.d.ts.map +1 -1
  280. package/lib/typescript/shared/configs/presets.d.ts.map +1 -1
  281. package/lib/typescript/shared/index.d.ts +19 -17
  282. package/lib/typescript/shared/index.d.ts.map +1 -1
  283. package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts +3 -1
  284. package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts.map +1 -1
  285. package/lib/typescript/shared/providers/screen/descriptors/descriptors.provider.d.ts.map +1 -1
  286. package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.d.ts +6 -1
  287. package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.d.ts.map +1 -1
  288. package/lib/typescript/shared/providers/screen/descriptors/helpers/get-ancestor-keys.d.ts +9 -3
  289. package/lib/typescript/shared/providers/screen/descriptors/helpers/get-ancestor-keys.d.ts.map +1 -1
  290. package/lib/typescript/shared/providers/screen/origin.provider.d.ts +11 -0
  291. package/lib/typescript/shared/providers/screen/origin.provider.d.ts.map +1 -0
  292. package/lib/typescript/shared/providers/screen/styles/constants.d.ts.map +1 -1
  293. package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/are-resettable-states-equal.d.ts +3 -0
  294. package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/are-resettable-states-equal.d.ts.map +1 -0
  295. package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/index.d.ts +1 -0
  296. package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/index.d.ts.map +1 -1
  297. package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts +1 -0
  298. package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts.map +1 -1
  299. package/lib/typescript/shared/providers/screen/styles/styles.provider.d.ts +1 -0
  300. package/lib/typescript/shared/providers/screen/styles/styles.provider.d.ts.map +1 -1
  301. package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts +1 -3
  302. package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts.map +1 -1
  303. package/lib/typescript/shared/stores/bounds/index.d.ts +1 -1
  304. package/lib/typescript/shared/stores/bounds/index.d.ts.map +1 -1
  305. package/lib/typescript/shared/stores/bounds/internals/entries.d.ts +2 -2
  306. package/lib/typescript/shared/stores/bounds/internals/entries.d.ts.map +1 -1
  307. package/lib/typescript/shared/stores/bounds/internals/links.d.ts +2 -2
  308. package/lib/typescript/shared/stores/bounds/internals/links.d.ts.map +1 -1
  309. package/lib/typescript/shared/stores/bounds/internals/resolver.d.ts.map +1 -1
  310. package/lib/typescript/shared/stores/bounds/internals/state.d.ts +4 -2
  311. package/lib/typescript/shared/stores/bounds/internals/state.d.ts.map +1 -1
  312. package/lib/typescript/shared/stores/bounds/types.d.ts +47 -12
  313. package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
  314. package/lib/typescript/shared/stores/scroll.store.d.ts +12 -1
  315. package/lib/typescript/shared/stores/scroll.store.d.ts.map +1 -1
  316. package/lib/typescript/shared/types/animation.types.d.ts +13 -2
  317. package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
  318. package/lib/typescript/shared/types/bounds.types.d.ts +10 -40
  319. package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
  320. package/lib/typescript/shared/types/index.d.ts +2 -2
  321. package/lib/typescript/shared/types/index.d.ts.map +1 -1
  322. package/lib/typescript/shared/utils/bounds/helpers/create-bound-tag.d.ts +2 -1
  323. package/lib/typescript/shared/utils/bounds/helpers/create-bound-tag.d.ts.map +1 -1
  324. package/lib/typescript/shared/utils/bounds/helpers/create-bounds-accessor-core.d.ts +7 -11
  325. package/lib/typescript/shared/utils/bounds/helpers/create-bounds-accessor-core.d.ts.map +1 -1
  326. package/lib/typescript/shared/utils/bounds/helpers/create-link-accessor.d.ts +0 -3
  327. package/lib/typescript/shared/utils/bounds/helpers/create-link-accessor.d.ts.map +1 -1
  328. package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts +7 -3
  329. package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts.map +1 -1
  330. package/lib/typescript/shared/utils/bounds/helpers/styles/composers.d.ts +3 -0
  331. package/lib/typescript/shared/utils/bounds/helpers/styles/composers.d.ts.map +1 -1
  332. package/lib/typescript/shared/utils/bounds/helpers/styles/compute.d.ts +1 -1
  333. package/lib/typescript/shared/utils/bounds/helpers/styles/compute.d.ts.map +1 -1
  334. package/lib/typescript/shared/utils/bounds/navigation/reveal/build.d.ts.map +1 -1
  335. package/lib/typescript/shared/utils/bounds/navigation/zoom/build.d.ts.map +1 -1
  336. package/lib/typescript/shared/utils/bounds/types/options.d.ts +93 -6
  337. package/lib/typescript/shared/utils/bounds/types/options.d.ts.map +1 -1
  338. package/package.json +3 -2
  339. package/src/blank-stack/components/stack-view.tsx +4 -3
  340. package/src/shared/components/{create-boundary-component → boundary}/components/boundary-target.tsx +28 -11
  341. package/src/shared/components/{create-boundary-component → boundary}/create-boundary-component.tsx +20 -31
  342. package/src/shared/components/boundary/hooks/use-initial-destination-measurement.ts +156 -0
  343. package/src/shared/components/{create-boundary-component → boundary}/hooks/use-initial-source-measurement.ts +5 -14
  344. package/src/shared/components/{create-boundary-component → boundary}/hooks/use-measurer.ts +42 -46
  345. package/src/shared/components/{create-boundary-component → boundary}/hooks/use-refresh-boundary.ts +16 -11
  346. package/src/shared/components/{create-boundary-component → boundary}/index.tsx +12 -0
  347. package/src/shared/components/boundary/portal/components/host.tsx +114 -0
  348. package/src/shared/components/boundary/portal/components/portal-boundary-host.tsx +90 -0
  349. package/src/shared/components/boundary/portal/components/portal-provider.tsx +10 -0
  350. package/src/shared/components/boundary/portal/components/portal.tsx +278 -0
  351. package/src/shared/components/boundary/portal/hooks/use-host-measurement.ts +102 -0
  352. package/src/shared/components/boundary/portal/index.ts +3 -0
  353. package/src/shared/components/boundary/portal/stores/host-bounds.store.ts +45 -0
  354. package/src/shared/components/boundary/portal/stores/host-registry.store.ts +182 -0
  355. package/src/shared/components/boundary/portal/stores/portal-boundary-host.store.ts +91 -0
  356. package/src/shared/components/boundary/portal/utils/attachment.ts +48 -0
  357. package/src/shared/components/boundary/portal/utils/naming.ts +10 -0
  358. package/src/shared/components/boundary/portal/utils/offset-style.ts +171 -0
  359. package/src/shared/components/boundary/portal/utils/teleport-control.ts +13 -0
  360. package/src/shared/components/{create-boundary-component → boundary}/providers/boundary-owner.provider.tsx +41 -33
  361. package/src/shared/components/boundary/types.ts +92 -0
  362. package/src/shared/components/boundary/utils/destination-signals.ts +31 -0
  363. package/src/shared/components/{create-boundary-component → boundary}/utils/measured-bounds.ts +34 -11
  364. package/src/shared/components/boundary/utils/refresh-signals.ts +175 -0
  365. package/src/shared/components/boundary/utils/source-signals.ts +63 -0
  366. package/src/shared/components/create-transition-aware-component.tsx +8 -3
  367. package/src/shared/components/{integrations/masked-view.tsx → masked-view.tsx} +2 -2
  368. package/src/shared/components/screen-container/layers/content.tsx +12 -7
  369. package/src/shared/configs/presets.ts +2 -6
  370. package/src/shared/index.ts +13 -5
  371. package/src/shared/providers/helpers/measured-bounds-writes.ts +11 -1
  372. package/src/shared/providers/screen/descriptors/descriptors.provider.tsx +7 -3
  373. package/src/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.ts +16 -0
  374. package/src/shared/providers/screen/descriptors/helpers/get-ancestor-keys.ts +31 -6
  375. package/src/shared/providers/screen/origin.provider.tsx +38 -0
  376. package/src/shared/providers/screen/styles/constants.ts +2 -0
  377. package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/are-resettable-states-equal.ts +74 -0
  378. package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/index.ts +1 -0
  379. package/src/shared/providers/screen/styles/hooks/use-maybe-block-visibility.tsx +1 -0
  380. package/src/shared/providers/screen/styles/styles.provider.tsx +5 -3
  381. package/src/shared/stores/bounds/helpers/link-pairs.helpers.ts +1 -10
  382. package/src/shared/stores/bounds/index.ts +2 -4
  383. package/src/shared/stores/bounds/internals/entries.ts +4 -4
  384. package/src/shared/stores/bounds/internals/links.ts +52 -18
  385. package/src/shared/stores/bounds/internals/resolver.ts +5 -3
  386. package/src/shared/stores/bounds/internals/state.ts +5 -2
  387. package/src/shared/stores/bounds/types.ts +59 -15
  388. package/src/shared/stores/scroll.store.ts +68 -0
  389. package/src/shared/types/animation.types.ts +17 -2
  390. package/src/shared/types/bounds.types.ts +22 -60
  391. package/src/shared/types/index.ts +5 -0
  392. package/src/shared/utils/bounds/helpers/create-bound-tag.ts +46 -4
  393. package/src/shared/utils/bounds/helpers/create-bounds-accessor-core.ts +65 -116
  394. package/src/shared/utils/bounds/helpers/create-link-accessor.ts +10 -80
  395. package/src/shared/utils/bounds/helpers/prepare-bound-styles.ts +10 -13
  396. package/src/shared/utils/bounds/helpers/styles/composers.ts +269 -46
  397. package/src/shared/utils/bounds/helpers/styles/compute.ts +134 -2
  398. package/src/shared/utils/bounds/navigation/reveal/build.ts +5 -7
  399. package/src/shared/utils/bounds/navigation/zoom/build.ts +5 -8
  400. package/src/shared/utils/bounds/types/options.ts +105 -6
  401. package/lib/commonjs/shared/components/create-boundary-component/components/boundary-target.js.map +0 -1
  402. package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js.map +0 -1
  403. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +0 -1
  404. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js +0 -99
  405. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js.map +0 -1
  406. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js.map +0 -1
  407. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-measurer.js.map +0 -1
  408. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map +0 -1
  409. package/lib/commonjs/shared/components/create-boundary-component/index.js.map +0 -1
  410. package/lib/commonjs/shared/components/create-boundary-component/providers/boundary-owner.provider.js.map +0 -1
  411. package/lib/commonjs/shared/components/create-boundary-component/types.js.map +0 -1
  412. package/lib/commonjs/shared/components/create-boundary-component/utils/destination-signals.js +0 -75
  413. package/lib/commonjs/shared/components/create-boundary-component/utils/destination-signals.js.map +0 -1
  414. package/lib/commonjs/shared/components/create-boundary-component/utils/measured-bounds.js.map +0 -1
  415. package/lib/commonjs/shared/components/create-boundary-component/utils/refresh-signals.js +0 -103
  416. package/lib/commonjs/shared/components/create-boundary-component/utils/refresh-signals.js.map +0 -1
  417. package/lib/commonjs/shared/components/create-boundary-component/utils/source-signals.js +0 -52
  418. package/lib/commonjs/shared/components/create-boundary-component/utils/source-signals.js.map +0 -1
  419. package/lib/commonjs/shared/components/integrations/masked-view.js.map +0 -1
  420. package/lib/commonjs/shared/utils/bounds/helpers/create-interpolators.js +0 -68
  421. package/lib/commonjs/shared/utils/bounds/helpers/create-interpolators.js.map +0 -1
  422. package/lib/commonjs/shared/utils/bounds/helpers/styles/interpolate-link-style.js +0 -30
  423. package/lib/commonjs/shared/utils/bounds/helpers/styles/interpolate-link-style.js.map +0 -1
  424. package/lib/module/shared/components/create-boundary-component/components/boundary-target.js.map +0 -1
  425. package/lib/module/shared/components/create-boundary-component/create-boundary-component.js.map +0 -1
  426. package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +0 -1
  427. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js +0 -94
  428. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js.map +0 -1
  429. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js.map +0 -1
  430. package/lib/module/shared/components/create-boundary-component/hooks/use-measurer.js.map +0 -1
  431. package/lib/module/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map +0 -1
  432. package/lib/module/shared/components/create-boundary-component/index.js.map +0 -1
  433. package/lib/module/shared/components/create-boundary-component/providers/boundary-owner.provider.js +0 -60
  434. package/lib/module/shared/components/create-boundary-component/providers/boundary-owner.provider.js.map +0 -1
  435. package/lib/module/shared/components/create-boundary-component/types.js.map +0 -1
  436. package/lib/module/shared/components/create-boundary-component/utils/destination-signals.js +0 -70
  437. package/lib/module/shared/components/create-boundary-component/utils/destination-signals.js.map +0 -1
  438. package/lib/module/shared/components/create-boundary-component/utils/measured-bounds.js.map +0 -1
  439. package/lib/module/shared/components/create-boundary-component/utils/refresh-signals.js +0 -98
  440. package/lib/module/shared/components/create-boundary-component/utils/refresh-signals.js.map +0 -1
  441. package/lib/module/shared/components/create-boundary-component/utils/source-signals.js +0 -47
  442. package/lib/module/shared/components/create-boundary-component/utils/source-signals.js.map +0 -1
  443. package/lib/module/shared/components/integrations/masked-view.js.map +0 -1
  444. package/lib/module/shared/utils/bounds/helpers/create-interpolators.js +0 -63
  445. package/lib/module/shared/utils/bounds/helpers/create-interpolators.js.map +0 -1
  446. package/lib/module/shared/utils/bounds/helpers/styles/interpolate-link-style.js +0 -26
  447. package/lib/module/shared/utils/bounds/helpers/styles/interpolate-link-style.js.map +0 -1
  448. package/lib/typescript/shared/components/create-boundary-component/components/boundary-target.d.ts.map +0 -1
  449. package/lib/typescript/shared/components/create-boundary-component/create-boundary-component.d.ts.map +0 -1
  450. package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-presence.d.ts.map +0 -1
  451. package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.d.ts.map +0 -1
  452. package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-source-measurement.d.ts.map +0 -1
  453. package/lib/typescript/shared/components/create-boundary-component/hooks/use-measurer.d.ts.map +0 -1
  454. package/lib/typescript/shared/components/create-boundary-component/hooks/use-refresh-boundary.d.ts +0 -14
  455. package/lib/typescript/shared/components/create-boundary-component/hooks/use-refresh-boundary.d.ts.map +0 -1
  456. package/lib/typescript/shared/components/create-boundary-component/index.d.ts.map +0 -1
  457. package/lib/typescript/shared/components/create-boundary-component/providers/boundary-owner.provider.d.ts.map +0 -1
  458. package/lib/typescript/shared/components/create-boundary-component/types.d.ts +0 -37
  459. package/lib/typescript/shared/components/create-boundary-component/types.d.ts.map +0 -1
  460. package/lib/typescript/shared/components/create-boundary-component/utils/destination-signals.d.ts.map +0 -1
  461. package/lib/typescript/shared/components/create-boundary-component/utils/measured-bounds.d.ts +0 -8
  462. package/lib/typescript/shared/components/create-boundary-component/utils/measured-bounds.d.ts.map +0 -1
  463. package/lib/typescript/shared/components/create-boundary-component/utils/refresh-signals.d.ts.map +0 -1
  464. package/lib/typescript/shared/components/create-boundary-component/utils/source-signals.d.ts.map +0 -1
  465. package/lib/typescript/shared/components/integrations/masked-view.d.ts.map +0 -1
  466. package/lib/typescript/shared/utils/bounds/helpers/create-interpolators.d.ts +0 -14
  467. package/lib/typescript/shared/utils/bounds/helpers/create-interpolators.d.ts.map +0 -1
  468. package/lib/typescript/shared/utils/bounds/helpers/styles/interpolate-link-style.d.ts +0 -17
  469. package/lib/typescript/shared/utils/bounds/helpers/styles/interpolate-link-style.d.ts.map +0 -1
  470. package/src/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.ts +0 -130
  471. package/src/shared/components/create-boundary-component/types.ts +0 -48
  472. package/src/shared/components/create-boundary-component/utils/destination-signals.ts +0 -129
  473. package/src/shared/components/create-boundary-component/utils/refresh-signals.ts +0 -164
  474. package/src/shared/components/create-boundary-component/utils/source-signals.ts +0 -72
  475. package/src/shared/utils/bounds/helpers/create-interpolators.ts +0 -117
  476. package/src/shared/utils/bounds/helpers/styles/interpolate-link-style.ts +0 -43
  477. /package/lib/commonjs/shared/components/{create-boundary-component → boundary}/hooks/use-boundary-presence.js +0 -0
  478. /package/lib/commonjs/shared/components/{create-boundary-component → boundary}/types.js +0 -0
  479. /package/lib/module/shared/components/{create-boundary-component → boundary}/hooks/use-boundary-presence.js +0 -0
  480. /package/lib/module/shared/components/{create-boundary-component → boundary}/types.js +0 -0
  481. /package/lib/typescript/shared/components/{create-boundary-component → boundary}/components/boundary-target.d.ts +0 -0
  482. /package/lib/typescript/shared/components/{create-boundary-component → boundary}/create-boundary-component.d.ts +0 -0
  483. /package/lib/typescript/shared/components/{create-boundary-component → boundary}/hooks/use-boundary-presence.d.ts +0 -0
  484. /package/lib/typescript/shared/components/{integrations/masked-view.d.ts → masked-view.d.ts} +0 -0
  485. /package/src/shared/components/{create-boundary-component → boundary}/hooks/use-boundary-presence.ts +0 -0
@@ -0,0 +1,175 @@
1
+ import type {
2
+ LinkPairsState,
3
+ ScreenPairKey,
4
+ } from "../../../stores/bounds/types";
5
+ import type { MeasureTarget } from "../types";
6
+
7
+ const SOURCE_SIGNAL_PREFIX = "source|";
8
+ const DESTINATION_SIGNAL_PREFIX = "destination|";
9
+
10
+ type RefreshBoundarySignal = MeasureTarget & {
11
+ signal: string;
12
+ };
13
+
14
+ const buildRefreshSignal = (
15
+ type: MeasureTarget["type"],
16
+ pairKey: ScreenPairKey,
17
+ key: string,
18
+ ): RefreshBoundarySignal => {
19
+ "worklet";
20
+ const prefix =
21
+ type === "source" ? SOURCE_SIGNAL_PREFIX : DESTINATION_SIGNAL_PREFIX;
22
+ return {
23
+ type,
24
+ pairKey,
25
+ signal: `${prefix}${pairKey}|${key}`,
26
+ };
27
+ };
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
+ export const getRefreshBoundarySignal = (params: {
43
+ enabled: boolean;
44
+ currentScreenKey: string;
45
+ sourcePairKey?: ScreenPairKey;
46
+ destinationPairKey?: ScreenPairKey;
47
+ ancestorDestinationPairKey?: ScreenPairKey;
48
+ nextScreenKey?: string;
49
+ linkId: string;
50
+ group?: string;
51
+ shouldRefresh: boolean;
52
+ closing: boolean;
53
+ entering: boolean;
54
+ animating: boolean;
55
+ progress: number;
56
+ linkState?: LinkPairsState;
57
+ }): RefreshBoundarySignal | null => {
58
+ "worklet";
59
+ const {
60
+ enabled,
61
+ currentScreenKey,
62
+ sourcePairKey,
63
+ destinationPairKey,
64
+ ancestorDestinationPairKey,
65
+ nextScreenKey,
66
+ linkId,
67
+ group,
68
+ shouldRefresh,
69
+ closing,
70
+ entering,
71
+ animating,
72
+ progress,
73
+ linkState,
74
+ } = params;
75
+
76
+ if (!enabled) return null;
77
+
78
+ const canRefreshPreCloseDestination =
79
+ shouldRefresh && closing && !entering && !animating && progress >= 1;
80
+
81
+ const canRefreshSettledDestination = shouldRefresh && !closing && !entering;
82
+
83
+ // Guards:
84
+ // 1) A user may dismiss via back button, in this case, we should remeasure.
85
+ // 2) If a user drags during entering/closing animations we should NOT remeasure.
86
+ if (!canRefreshPreCloseDestination && !canRefreshSettledDestination) {
87
+ return null;
88
+ }
89
+
90
+ // Non group:
91
+ // Since in typical group flows we would need to know the src, we don't need to do that for
92
+ // single a->b flows. So we just trigger the destination refresh.
93
+ if (!group) {
94
+ const refreshDestinationPairKey =
95
+ destinationPairKey ??
96
+ (nextScreenKey ? undefined : ancestorDestinationPairKey);
97
+
98
+ if (!refreshDestinationPairKey) {
99
+ return null;
100
+ }
101
+
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
+ return buildRefreshSignal(
119
+ "destination",
120
+ refreshDestinationPairKey,
121
+ [currentScreenKey, closing ? "closing" : "settled"].join("|"),
122
+ );
123
+ }
124
+
125
+ // Source side:
126
+ // When the activeId changes, trigger a refresh to ensure the source bounds are captured.
127
+ if (sourcePairKey) {
128
+ const activeId = linkState?.[sourcePairKey]?.groups?.[group]?.activeId;
129
+
130
+ if (activeId !== linkId) {
131
+ return null;
132
+ }
133
+
134
+ return buildRefreshSignal(
135
+ "source",
136
+ sourcePairKey,
137
+ [group, linkId, closing ? "closing" : "settled"].join("|"),
138
+ );
139
+ }
140
+
141
+ const refreshDestinationPairKey =
142
+ destinationPairKey ??
143
+ (nextScreenKey ? undefined : ancestorDestinationPairKey);
144
+
145
+ if (!refreshDestinationPairKey) return null;
146
+
147
+ // Destination side:
148
+ // When the activeId changes, trigger a refresh to ensure the destination bounds are captured.
149
+ const activeId =
150
+ linkState?.[refreshDestinationPairKey]?.groups?.[group]?.activeId;
151
+
152
+ // Destination retargeting should only measure a concrete member that already
153
+ // participates in the pair. Missing members fall back to initialId at resolve.
154
+ if (activeId !== linkId) {
155
+ return null;
156
+ }
157
+
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
+ return buildRefreshSignal(
171
+ "destination",
172
+ refreshDestinationPairKey,
173
+ [group, linkId, closing ? "closing" : "settled"].join("|"),
174
+ );
175
+ };
@@ -0,0 +1,63 @@
1
+ import type {
2
+ LinkPairsState,
3
+ ScreenPairKey,
4
+ } from "../../../stores/bounds/types";
5
+
6
+ const SOURCE_SIGNAL_PREFIX = "source|";
7
+
8
+ type SourceCaptureSignal = {
9
+ pairKey: ScreenPairKey;
10
+ signal: string;
11
+ };
12
+
13
+ export const getInitialSourceCaptureSignal = (params: {
14
+ enabled: boolean;
15
+ sourcePairKey?: ScreenPairKey;
16
+ linkId: string;
17
+ group?: string;
18
+ shouldAutoMeasure: boolean;
19
+ linkState?: LinkPairsState;
20
+ }): SourceCaptureSignal | null => {
21
+ "worklet";
22
+ const {
23
+ enabled,
24
+ sourcePairKey,
25
+ linkId,
26
+ group,
27
+ shouldAutoMeasure,
28
+ linkState,
29
+ } = params;
30
+
31
+ if (!enabled || !sourcePairKey) {
32
+ return null;
33
+ }
34
+
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];
42
+
43
+ if (!link?.destination || link.source) {
44
+ return null;
45
+ }
46
+
47
+ if (group) {
48
+ const activeId = linkState?.[sourcePairKey]?.groups?.[group]?.activeId;
49
+
50
+ // Passive grouped sources should not measure every mounted item. Once a
51
+ // group has an active id, only that concrete member can auto-capture.
52
+ if (activeId && activeId !== linkId) {
53
+ return null;
54
+ }
55
+ }
56
+
57
+ const signalParts = group ? [group, linkId] : [linkId];
58
+
59
+ return {
60
+ pairKey: sourcePairKey,
61
+ signal: `${SOURCE_SIGNAL_PREFIX}${sourcePairKey}|${signalParts.join("|")}`,
62
+ };
63
+ };
@@ -43,6 +43,8 @@ export function createTransitionAwareComponent<P extends object>(
43
43
  onScroll: userOnScroll,
44
44
  onMomentumScrollEnd: userOnMomentumScrollEnd,
45
45
  onScrollEndDrag: userOnScrollEndDrag,
46
+ children,
47
+ contentContainerStyle,
46
48
  ...scrollableProps
47
49
  } = props;
48
50
 
@@ -69,11 +71,11 @@ export function createTransitionAwareComponent<P extends object>(
69
71
  scrollHandler,
70
72
  userOnScroll ?? null,
71
73
  ]);
72
-
73
74
  const scrollableComponent = (
74
75
  <AnimatedComponent
75
76
  {...(scrollableProps as any)}
76
77
  ref={ref}
78
+ contentContainerStyle={contentContainerStyle}
77
79
  /**
78
80
  * Keep the scroll listener detached while the owning gesture screen is
79
81
  * closing. On iOS, a bounced ScrollView can keep sending native scroll
@@ -90,7 +92,9 @@ export function createTransitionAwareComponent<P extends object>(
90
92
  ? scrollableProps.scrollEventThrottle || 16
91
93
  : undefined
92
94
  }
93
- />
95
+ >
96
+ {children}
97
+ </AnimatedComponent>
94
98
  );
95
99
 
96
100
  const coordinatedScrollableComponent = nativeGesture ? (
@@ -119,6 +123,7 @@ export function createTransitionAwareComponent<P extends object>(
119
123
  styleId,
120
124
  onPress,
121
125
  remeasureOnFocus,
126
+ animatedProps: userAnimatedProps,
122
127
  ...rest
123
128
  } = props as any;
124
129
 
@@ -159,7 +164,7 @@ export function createTransitionAwareComponent<P extends object>(
159
164
  {...(rest as any)}
160
165
  ref={animatedRef}
161
166
  style={[style, associatedStyles]}
162
- animatedProps={associatedProps}
167
+ animatedProps={userAnimatedProps ?? associatedProps}
163
168
  onPress={captureActiveOnPress}
164
169
  onLayout={runOnUI(handleInitialLayout)}
165
170
  collapsable={!sharedBoundTag}
@@ -1,6 +1,6 @@
1
1
  import { type StyleProp, StyleSheet, View, type ViewStyle } from "react-native";
2
- import { CONTAINER_STYLE_ID, MASK_STYLE_ID } from "../../constants";
3
- import { createTransitionAwareComponent } from "../create-transition-aware-component";
2
+ import { CONTAINER_STYLE_ID, MASK_STYLE_ID } from "../constants";
3
+ import { createTransitionAwareComponent } from "./create-transition-aware-component";
4
4
 
5
5
  const TransitionView = createTransitionAwareComponent(View);
6
6
 
@@ -9,7 +9,9 @@ import Animated, {
9
9
  import { NO_PROPS, NO_STYLES } from "../../../constants";
10
10
  import { useDescriptors } from "../../../providers/screen/descriptors";
11
11
  import { useGestureContext } from "../../../providers/screen/gestures";
12
+ import { OriginProvider } from "../../../providers/screen/origin.provider";
12
13
  import { useScreenStyles } from "../../../providers/screen/styles";
14
+ import { ScreenFallbackHost } from "../../boundary/portal/components/host";
13
15
  import { useContentLayout } from "../hooks/use-content-layout";
14
16
  import { MaybeMaskedNavigationContainer } from "./maybe-masked-navigation-container";
15
17
  import { SurfaceContainer } from "./surface-container";
@@ -56,13 +58,16 @@ export const ContentLayer = memo(
56
58
  enabled={isNavigationMaskEnabled}
57
59
  >
58
60
  <SurfaceContainer pointerEvents={contentPointerEvents}>
59
- {hasAutoSnapPoint ? (
60
- <View collapsable={false} onLayout={handleContentLayout}>
61
- {children}
62
- </View>
63
- ) : (
64
- children
65
- )}
61
+ <OriginProvider>
62
+ {hasAutoSnapPoint ? (
63
+ <View collapsable={false} onLayout={handleContentLayout}>
64
+ {children}
65
+ </View>
66
+ ) : (
67
+ children
68
+ )}
69
+ <ScreenFallbackHost />
70
+ </OriginProvider>
66
71
  </SurfaceContainer>
67
72
  </MaybeMaskedNavigationContainer>
68
73
  </Animated.View>
@@ -434,12 +434,10 @@ export const SharedAppleMusic = ({
434
434
  const dragXScale = interpolate(normX, [0, 1], xScaleOuput);
435
435
  const dragYScale = interpolate(normY, [0, 1], yScaleOuput);
436
436
 
437
- const boundValues = bounds({
438
- id: sharedBoundTag,
437
+ const boundValues = bounds({ id: sharedBoundTag }).math({
439
438
  method: focused ? "content" : "transform",
440
439
  anchor: "top",
441
440
  scaleMode: "uniform",
442
- raw: true,
443
441
  });
444
442
 
445
443
  const opacity = interpolate(
@@ -455,12 +453,10 @@ export const SharedAppleMusic = ({
455
453
  * ===============================
456
454
  */
457
455
  if (focused) {
458
- const maskedValues = bounds({
459
- id: sharedBoundTag,
456
+ const maskedValues = bounds({ id: sharedBoundTag }).math({
460
457
  space: "absolute",
461
458
  method: "size",
462
459
  target: "fullscreen",
463
- raw: true,
464
460
  });
465
461
 
466
462
  // Apple Music style drop shadow that increases with drag magnitude
@@ -1,11 +1,8 @@
1
1
  import { FlatList, Pressable, ScrollView, View } from "react-native";
2
2
  import { withScreenTransitions } from "./adapters/with-screen-transitions";
3
- import {
4
- Boundary,
5
- createBoundaryComponent,
6
- } from "./components/create-boundary-component";
3
+ import { Boundary, createBoundaryComponent } from "./components/boundary";
7
4
  import { createTransitionAwareComponent } from "./components/create-transition-aware-component";
8
- import MaskedView from "./components/integrations/masked-view";
5
+ import MaskedView from "./components/masked-view";
9
6
  import { Presets, Specs } from "./configs";
10
7
 
11
8
  export default {
@@ -29,6 +26,11 @@ export default {
29
26
  export type { NativeStackAdapterOptions } from "./adapters/with-screen-transitions";
30
27
  export { withScreenTransitions } from "./adapters/with-screen-transitions";
31
28
  export { snapTo } from "./animation/snap-to";
29
+ export type {
30
+ BoundaryPortal,
31
+ BoundaryPortalAttachTarget,
32
+ BoundaryPortalOptions,
33
+ } from "./components/boundary";
32
34
  export {
33
35
  NAVIGATION_MASK_CONTAINER_STYLE_ID,
34
36
  NAVIGATION_MASK_ELEMENT_STYLE_ID,
@@ -51,7 +53,12 @@ export {
51
53
  export type {
52
54
  AnimatedViewStyle,
53
55
  AnimationConfig,
56
+ BoundaryTeleportControl,
57
+ BoundsMotion,
58
+ BoundsMotionFrame,
59
+ BoundsMotionTransform,
54
60
  BoundsNavigationAccessor,
61
+ BoundsNavigationRevealOptions,
55
62
  BoundsNavigationRevealStyle,
56
63
  BoundsNavigationZoomOpacityRange,
57
64
  BoundsNavigationZoomOpacityRanges,
@@ -72,6 +79,7 @@ export type {
72
79
  ScrollGestureState,
73
80
  ScrollMetadataState,
74
81
  TransitionInterpolatedStyle,
82
+ TransitionSlotProps,
75
83
  TransitionSlotStyle,
76
84
  TransitionSpec,
77
85
  } from "./types";
@@ -1,7 +1,11 @@
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 { ScreenPairKey } from "../../stores/bounds/types";
4
+ import type {
5
+ BoundsPortalAttachTarget,
6
+ ScreenPairKey,
7
+ SourceHostRef,
8
+ } from "../../stores/bounds/types";
5
9
 
6
10
  type LinkWrite =
7
11
  | {
@@ -21,6 +25,8 @@ type ApplyMeasuredBoundsWritesParams = {
21
25
  measured: MeasuredDimensions;
22
26
  preparedStyles: StyleProps;
23
27
  linkWrite?: LinkWrite;
28
+ portalHost?: BoundsPortalAttachTarget;
29
+ sourceHost?: SourceHostRef;
24
30
  };
25
31
 
26
32
  export const applyMeasuredBoundsWrites = (
@@ -35,6 +41,8 @@ export const applyMeasuredBoundsWrites = (
35
41
  measured,
36
42
  preparedStyles,
37
43
  linkWrite,
44
+ portalHost,
45
+ sourceHost,
38
46
  } = params;
39
47
 
40
48
  // Set the bounds entry on every measure to avoid any stale measurements
@@ -51,6 +59,8 @@ export const applyMeasuredBoundsWrites = (
51
59
  measured,
52
60
  preparedStyles,
53
61
  group,
62
+ portalHost,
63
+ sourceHost,
54
64
  );
55
65
  }
56
66
 
@@ -4,7 +4,7 @@ import type { BaseStackDescriptor } from "../../../types/stack.types";
4
4
  import createProvider from "../../../utils/create-provider";
5
5
  import type { DescriptorDerivations } from "./helpers/derive-descriptor-derivations";
6
6
  import { deriveDescriptorDerivations } from "./helpers/derive-descriptor-derivations";
7
- import { getAncestorKeys } from "./helpers/get-ancestor-keys";
7
+ import { getAncestorKeyState } from "./helpers/get-ancestor-keys";
8
8
 
9
9
  /**
10
10
  * Base descriptor interface - minimal contract for all stack types.
@@ -49,7 +49,10 @@ const {
49
49
  [previous, current, next],
50
50
  );
51
51
 
52
- const ancestorKeys = useMemo(() => getAncestorKeys(current), [current]);
52
+ const { ancestorKeys, ancestorDestinationPairKey } = useMemo(
53
+ () => getAncestorKeyState(current),
54
+ [current],
55
+ );
53
56
 
54
57
  const derivations = useMemo(
55
58
  () =>
@@ -58,8 +61,9 @@ const {
58
61
  current,
59
62
  next,
60
63
  ancestorKeys,
64
+ ancestorDestinationPairKey,
61
65
  }),
62
- [previous, current, next, ancestorKeys],
66
+ [previous, current, next, ancestorKeys, ancestorDestinationPairKey],
63
67
  );
64
68
 
65
69
  const value = useMemo(
@@ -1,9 +1,14 @@
1
+ import { createScreenPairKey } from "../../../../stores/bounds/helpers/link-pairs.helpers";
2
+ import type { ScreenPairKey } from "../../../../stores/bounds/types";
1
3
  import type { BaseStackDescriptor } from "../../../../types/stack.types";
2
4
 
3
5
  export interface DescriptorDerivations {
4
6
  previousScreenKey?: string;
5
7
  currentScreenKey: string;
6
8
  nextScreenKey?: string;
9
+ sourcePairKey?: ScreenPairKey;
10
+ destinationPairKey?: ScreenPairKey;
11
+ ancestorDestinationPairKey?: ScreenPairKey;
7
12
  parentScreenKey?: string;
8
13
  isFirstKey: boolean;
9
14
  isTopMostScreen: boolean;
@@ -16,6 +21,7 @@ interface Params {
16
21
  current: BaseStackDescriptor;
17
22
  next?: BaseStackDescriptor;
18
23
  ancestorKeys: string[];
24
+ ancestorDestinationPairKey?: ScreenPairKey;
19
25
  }
20
26
 
21
27
  export function deriveDescriptorDerivations({
@@ -23,10 +29,17 @@ export function deriveDescriptorDerivations({
23
29
  current,
24
30
  next,
25
31
  ancestorKeys,
32
+ ancestorDestinationPairKey,
26
33
  }: Params): DescriptorDerivations {
27
34
  const previousScreenKey = previous?.route.key;
28
35
  const currentScreenKey = current.route.key;
29
36
  const nextScreenKey = next?.route.key;
37
+ const sourcePairKey = nextScreenKey
38
+ ? createScreenPairKey(currentScreenKey, nextScreenKey)
39
+ : undefined;
40
+ const destinationPairKey = previousScreenKey
41
+ ? createScreenPairKey(previousScreenKey, currentScreenKey)
42
+ : undefined;
30
43
 
31
44
  const navigationState = current.navigation.getState();
32
45
  const routes = navigationState?.routes ?? [];
@@ -41,6 +54,9 @@ export function deriveDescriptorDerivations({
41
54
  previousScreenKey,
42
55
  currentScreenKey,
43
56
  nextScreenKey,
57
+ sourcePairKey,
58
+ destinationPairKey,
59
+ ancestorDestinationPairKey,
44
60
  parentScreenKey: ancestorKeys[0],
45
61
  isFirstKey,
46
62
  isTopMostScreen,
@@ -1,16 +1,26 @@
1
+ import { createScreenPairKey } from "../../../../stores/bounds/helpers/link-pairs.helpers";
2
+ import type { ScreenPairKey } from "../../../../stores/bounds/types";
1
3
  import type { BaseStackDescriptor } from "../../../../types/stack.types";
2
4
 
5
+ export interface AncestorKeyState {
6
+ ancestorKeys: string[];
7
+ ancestorDestinationPairKey?: ScreenPairKey;
8
+ }
9
+
3
10
  /**
4
- * Builds the full ancestor key chain for nested navigators.
5
- * Returns an array of screen keys from immediate parent to root.
6
- * [parentKey, grandparentKey, greatGrandparentKey, ...]
11
+ * Builds nested navigator ancestor keys from immediate parent to root.
12
+ * The nearest ancestor destination pair lets child routes attach measurements
13
+ * to the transition owned by the parent stack.
7
14
  */
8
- export function getAncestorKeys(current: BaseStackDescriptor): string[] {
15
+ export function getAncestorKeyState(
16
+ current: BaseStackDescriptor,
17
+ ): AncestorKeyState {
9
18
  const ancestors: string[] = [];
19
+ let ancestorDestinationPairKey: ScreenPairKey | undefined;
10
20
  const nav = current.navigation as any;
11
21
 
12
22
  if (typeof nav?.getParent !== "function") {
13
- return ancestors;
23
+ return { ancestorKeys: ancestors };
14
24
  }
15
25
 
16
26
  let parent = nav.getParent();
@@ -21,10 +31,25 @@ export function getAncestorKeys(current: BaseStackDescriptor): string[] {
21
31
  const focusedRoute = state.routes[state.index];
22
32
  if (focusedRoute?.key) {
23
33
  ancestors.push(focusedRoute.key);
34
+
35
+ const previousRoute = state.routes[state.index - 1];
36
+ if (!ancestorDestinationPairKey && previousRoute?.key) {
37
+ ancestorDestinationPairKey = createScreenPairKey(
38
+ previousRoute.key,
39
+ focusedRoute.key,
40
+ );
41
+ }
24
42
  }
25
43
  }
26
44
  parent = parent.getParent();
27
45
  }
28
46
 
29
- return ancestors;
47
+ return {
48
+ ancestorKeys: ancestors,
49
+ ancestorDestinationPairKey,
50
+ };
51
+ }
52
+
53
+ export function getAncestorKeys(current: BaseStackDescriptor): string[] {
54
+ return getAncestorKeyState(current).ancestorKeys;
30
55
  }
@@ -0,0 +1,38 @@
1
+ import { StyleSheet, type View } from "react-native";
2
+ import Animated, {
3
+ type AnimatedRef,
4
+ useAnimatedRef,
5
+ } from "react-native-reanimated";
6
+ import createProvider from "../../utils/create-provider";
7
+
8
+ interface Props {
9
+ children: React.ReactNode;
10
+ }
11
+ interface ContextValue {
12
+ originRef: AnimatedRef<View>;
13
+ }
14
+
15
+ export const { OriginProvider, useOriginContext } = createProvider("Origin", {
16
+ guarded: true,
17
+ })<Props, ContextValue>(({ children }) => {
18
+ const originRef = useAnimatedRef<View>();
19
+
20
+ return {
21
+ value: {
22
+ originRef,
23
+ },
24
+ children: (
25
+ <Animated.View
26
+ style={styles.container}
27
+ collapsable={false}
28
+ ref={originRef}
29
+ >
30
+ {children}
31
+ </Animated.View>
32
+ ),
33
+ };
34
+ });
35
+
36
+ const styles = StyleSheet.create({
37
+ container: { flex: 1 },
38
+ });
@@ -1,3 +1,4 @@
1
+ import { PORTAL_HOST_NAME_RESET_VALUE } from "../../../components/boundary/portal/utils/naming";
1
2
  import {
2
3
  NAVIGATION_MASK_CONTAINER_STYLE_ID,
3
4
  NAVIGATION_MASK_ELEMENT_STYLE_ID,
@@ -59,6 +60,7 @@ export const STYLE_RESET_VALUES: Record<string, unknown> = {
59
60
  };
60
61
 
61
62
  export const PROP_RESET_VALUES: Record<string, unknown> = {
63
+ hostName: PORTAL_HOST_NAME_RESET_VALUE,
62
64
  pointerEvents: "auto",
63
65
  };
64
66