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
@@ -25,18 +25,49 @@ const emit = () => {
25
25
  }
26
26
  };
27
27
  const isSameHost = (a, b) => {
28
- return a.boundaryId === b.boundaryId && a.capturesScroll === b.capturesScroll && a.hostKey === b.hostKey && a.pairKey === b.pairKey && a.screenKey === b.screenKey;
28
+ return a.boundaryId === b.boundaryId && a.escapeClipping === b.escapeClipping && a.hostKey === b.hostKey && a.localStylesMaps === b.localStylesMaps && a.pairKey === b.pairKey && a.portalHostName === b.portalHostName && a.screenKey === b.screenKey && a.slotsMap === b.slotsMap;
29
29
  };
30
30
  export const mountPortalBoundaryHost = host => {
31
- const previous = activeBoundaryHosts.get(host.boundaryId);
31
+ const previous = activeBoundaryHosts.get(host.portalHostName);
32
32
  if (previous && isSameHost(previous, host)) {
33
33
  return;
34
34
  }
35
- activeBoundaryHosts.set(host.boundaryId, host);
35
+ activeBoundaryHosts.set(host.portalHostName, host);
36
36
  emit();
37
37
  };
38
38
  export const unmountPortalBoundaryHost = boundaryId => {
39
- if (!activeBoundaryHosts.delete(boundaryId)) {
39
+ let didDelete = false;
40
+ for (const [hostEntryKey, host] of activeBoundaryHosts) {
41
+ if (host.boundaryId !== boundaryId) {
42
+ continue;
43
+ }
44
+ activeBoundaryHosts.delete(hostEntryKey);
45
+ didDelete = true;
46
+ }
47
+ if (!didDelete) {
48
+ return;
49
+ }
50
+ emit();
51
+ };
52
+
53
+ /**
54
+ * Post-handoff GC: drop every receiver for this boundary except the one now
55
+ * visible (`keepPortalHostName`). Called once the new host is confirmed on
56
+ * screen so the superseded receivers stop rendering.
57
+ */
58
+ export const dropStalePortalBoundaryHosts = ({
59
+ boundaryId,
60
+ keepPortalHostName
61
+ }) => {
62
+ let didDelete = false;
63
+ for (const [hostEntryKey, host] of activeBoundaryHosts) {
64
+ if (host.boundaryId !== boundaryId || host.portalHostName === keepPortalHostName) {
65
+ continue;
66
+ }
67
+ activeBoundaryHosts.delete(hostEntryKey);
68
+ didDelete = true;
69
+ }
70
+ if (!didDelete) {
40
71
  return;
41
72
  }
42
73
  emit();
@@ -1 +1 @@
1
- {"version":3,"names":["useSyncExternalStore","EMPTY_HOSTS","listeners","Set","activeBoundaryHosts","Map","snapshot","hostsByScope","buildSnapshot","host","values","hosts","hostKey","push","emit","listener","isSameHost","a","b","boundaryId","capturesScroll","pairKey","screenKey","mountPortalBoundaryHost","previous","get","set","unmountPortalBoundaryHost","delete","subscribe","add","useActivePortalBoundaryHosts"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/stores/portal-boundary-host.store.ts"],"mappings":";;AAAA,SAASA,oBAAoB,QAAQ,OAAO;AAc5C,MAAMC,WAAuC,GAAG,EAAE;AAElD,MAAMC,SAAS,GAAG,IAAIC,GAAG,CAAa,CAAC;AACvC,MAAMC,mBAAmB,GAAG,IAAIC,GAAG,CAAmC,CAAC;AAEvE,IAAIC,QAAwB,GAAG;EAC9BC,YAAY,EAAE,CAAC;AAChB,CAAC;AAED,MAAMC,aAAa,GAAGA,CAAA,KAAsB;EAC3C,MAAMD,YAAwD,GAAG,CAAC,CAAC;EAEnE,KAAK,MAAME,IAAI,IAAIL,mBAAmB,CAACM,MAAM,CAAC,CAAC,EAAE;IAChD,MAAMC,KAAK,GAAGJ,YAAY,CAACE,IAAI,CAACG,OAAO,CAAC,IAAI,EAAE;IAC9CD,KAAK,CAACE,IAAI,CAACJ,IAAI,CAAC;IAChBF,YAAY,CAACE,IAAI,CAACG,OAAO,CAAC,GAAGD,KAAK;EACnC;EAEA,OAAO;IACNJ;EACD,CAAC;AACF,CAAC;AAED,MAAMO,IAAI,GAAGA,CAAA,KAAM;EAClBR,QAAQ,GAAGE,aAAa,CAAC,CAAC;EAE1B,KAAK,MAAMO,QAAQ,IAAIb,SAAS,EAAE;IACjCa,QAAQ,CAAC,CAAC;EACX;AACD,CAAC;AAED,MAAMC,UAAU,GAAGA,CAClBC,CAA2B,EAC3BC,CAA2B,KACvB;EACJ,OACCD,CAAC,CAACE,UAAU,KAAKD,CAAC,CAACC,UAAU,IAC7BF,CAAC,CAACG,cAAc,KAAKF,CAAC,CAACE,cAAc,IACrCH,CAAC,CAACL,OAAO,KAAKM,CAAC,CAACN,OAAO,IACvBK,CAAC,CAACI,OAAO,KAAKH,CAAC,CAACG,OAAO,IACvBJ,CAAC,CAACK,SAAS,KAAKJ,CAAC,CAACI,SAAS;AAE7B,CAAC;AAED,OAAO,MAAMC,uBAAuB,GAAId,IAA8B,IAAK;EAC1E,MAAMe,QAAQ,GAAGpB,mBAAmB,CAACqB,GAAG,CAAChB,IAAI,CAACU,UAAU,CAAC;EACzD,IAAIK,QAAQ,IAAIR,UAAU,CAACQ,QAAQ,EAAEf,IAAI,CAAC,EAAE;IAC3C;EACD;EAEAL,mBAAmB,CAACsB,GAAG,CAACjB,IAAI,CAACU,UAAU,EAAEV,IAAI,CAAC;EAC9CK,IAAI,CAAC,CAAC;AACP,CAAC;AAED,OAAO,MAAMa,yBAAyB,GAAIR,UAAkB,IAAK;EAChE,IAAI,CAACf,mBAAmB,CAACwB,MAAM,CAACT,UAAU,CAAC,EAAE;IAC5C;EACD;EAEAL,IAAI,CAAC,CAAC;AACP,CAAC;AAED,MAAMe,SAAS,GAAId,QAAoB,IAAK;EAC3Cb,SAAS,CAAC4B,GAAG,CAACf,QAAQ,CAAC;EAEvB,OAAO,MAAM;IACZb,SAAS,CAAC0B,MAAM,CAACb,QAAQ,CAAC;EAC3B,CAAC;AACF,CAAC;AAED,OAAO,MAAMgB,4BAA4B,GAAInB,OAAe,IAAK;EAChE,OAAOZ,oBAAoB,CAC1B6B,SAAS,EACT,MAAMvB,QAAQ,CAACC,YAAY,CAACK,OAAO,CAAC,IAAIX,WAAW,EACnD,MAAMA,WACP,CAAC;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useSyncExternalStore","EMPTY_HOSTS","listeners","Set","activeBoundaryHosts","Map","snapshot","hostsByScope","buildSnapshot","host","values","hosts","hostKey","push","emit","listener","isSameHost","a","b","boundaryId","escapeClipping","localStylesMaps","pairKey","portalHostName","screenKey","slotsMap","mountPortalBoundaryHost","previous","get","set","unmountPortalBoundaryHost","didDelete","hostEntryKey","delete","dropStalePortalBoundaryHosts","keepPortalHostName","subscribe","add","useActivePortalBoundaryHosts"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/stores/portal-boundary-host.store.ts"],"mappings":";;AAAA,SAASA,oBAAoB,QAAQ,OAAO;AAoB5C,MAAMC,WAAuC,GAAG,EAAE;AAElD,MAAMC,SAAS,GAAG,IAAIC,GAAG,CAAa,CAAC;AACvC,MAAMC,mBAAmB,GAAG,IAAIC,GAAG,CAAmC,CAAC;AAEvE,IAAIC,QAAwB,GAAG;EAC9BC,YAAY,EAAE,CAAC;AAChB,CAAC;AAED,MAAMC,aAAa,GAAGA,CAAA,KAAsB;EAC3C,MAAMD,YAAwD,GAAG,CAAC,CAAC;EAEnE,KAAK,MAAME,IAAI,IAAIL,mBAAmB,CAACM,MAAM,CAAC,CAAC,EAAE;IAChD,MAAMC,KAAK,GAAGJ,YAAY,CAACE,IAAI,CAACG,OAAO,CAAC,IAAI,EAAE;IAC9CD,KAAK,CAACE,IAAI,CAACJ,IAAI,CAAC;IAChBF,YAAY,CAACE,IAAI,CAACG,OAAO,CAAC,GAAGD,KAAK;EACnC;EAEA,OAAO;IACNJ;EACD,CAAC;AACF,CAAC;AAED,MAAMO,IAAI,GAAGA,CAAA,KAAM;EAClBR,QAAQ,GAAGE,aAAa,CAAC,CAAC;EAE1B,KAAK,MAAMO,QAAQ,IAAIb,SAAS,EAAE;IACjCa,QAAQ,CAAC,CAAC;EACX;AACD,CAAC;AAED,MAAMC,UAAU,GAAGA,CAClBC,CAA2B,EAC3BC,CAA2B,KACvB;EACJ,OACCD,CAAC,CAACE,UAAU,KAAKD,CAAC,CAACC,UAAU,IAC7BF,CAAC,CAACG,cAAc,KAAKF,CAAC,CAACE,cAAc,IACrCH,CAAC,CAACL,OAAO,KAAKM,CAAC,CAACN,OAAO,IACvBK,CAAC,CAACI,eAAe,KAAKH,CAAC,CAACG,eAAe,IACvCJ,CAAC,C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AC6B,MAAM,CAACD,YAAY,CAAC;IACxCD,SAAS,GAAG,IAAI;EACjB;EAEA,IAAI,CAACA,SAAS,EAAE;IACf;EACD;EAEAjB,IAAI,CAAC,CAAC;AACP,CAAC;AAED,MAAMsB,SAAS,GAAIrB,QAAoB,IAAK;EAC3Cb,SAAS,CAACmC,GAAG,CAACtB,QAAQ,CAAC;EAEvB,OAAO,MAAM;IACZb,SAAS,CAAC+B,MAAM,CAAClB,QAAQ,CAAC;EAC3B,CAAC;AACF,CAAC;AAED,OAAO,MAAMuB,4BAA4B,GAAI1B,OAAe,IAAK;EAChE,OAAOZ,oBAAoB,CAC1BoC,SAAS,EACT,MAAM9B,QAAQ,CAACC,YAAY,CAACK,OAAO,CAAC,IAAIX,WAAW,EACnD,MAAMA,WACP,CAAC;AACF,CAAC","ignoreList":[]}
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
 
3
+ import { createElement } from "react";
4
+
3
5
  /**
4
6
  * `react-native-teleport` is an optional peer dependency. The require sits in a
5
7
  * try/catch so Metro treats it as an optional dependency — an absent module no
@@ -9,11 +11,23 @@
9
11
  * rendering; everything else keeps working.
10
12
  */
11
13
  let mod = null;
14
+ let managerMod = null;
15
+ let providerViewMod = null;
12
16
  try {
13
17
  mod = require("react-native-teleport");
18
+ managerMod = require("react-native-teleport/lib/module/contexts/PortalManager");
19
+ providerViewMod = require("react-native-teleport/lib/module/views/PortalProvider");
14
20
  } catch {}
15
- export const isTeleportAvailable = mod !== null;
21
+ const NativePortalProviderView = providerViewMod?.default ?? null;
22
+ const PortalManagerProvider = managerMod?.PortalManagerProvider ?? null;
23
+ const SafeNativePortalProvider = PortalManagerProvider ? ({
24
+ children
25
+ }) => {
26
+ const managedChildren = /*#__PURE__*/createElement(PortalManagerProvider, null, children);
27
+ return NativePortalProviderView ? /*#__PURE__*/createElement(NativePortalProviderView, null, managedChildren) : managedChildren;
28
+ } : null;
29
+ export const isTeleportAvailable = mod !== null && SafeNativePortalProvider !== null;
16
30
  export const NativePortal = mod?.Portal ?? null;
17
- export const NativePortalProvider = mod?.PortalProvider ?? null;
31
+ export const NativePortalProvider = SafeNativePortalProvider;
18
32
  export const NativePortalHost = mod?.PortalHost ?? null;
19
33
  //# sourceMappingURL=teleport.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["mod","require","isTeleportAvailable","NativePortal","Portal","NativePortalProvider","PortalProvider","NativePortalHost","PortalHost"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/portal/teleport.ts"],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIA,GAAQ,GAAG,IAAI;AACnB,IAAI;EACHA,GAAG,GAAGC,OAAO,CAAC,uBAAuB,CAAC;AACvC,CAAC,CAAC,MAAM,CAAC;AAET,OAAO,MAAMC,mBAAmB,GAAGF,GAAG,KAAK,IAAI;AAC/C,OAAO,MAAMG,YAAuC,GAAGH,GAAG,EAAEI,MAAM,IAAI,IAAI;AAC1E,OAAO,MAAMC,oBAA+C,GAC3DL,GAAG,EAAEM,cAAc,IAAI,IAAI;AAC5B,OAAO,MAAMC,gBAA2C,GACvDP,GAAG,EAAEQ,UAAU,IAAI,IAAI","ignoreList":[]}
1
+ {"version":3,"names":["createElement","mod","managerMod","providerViewMod","require","NativePortalProviderView","default","PortalManagerProvider","SafeNativePortalProvider","children","managedChildren","isTeleportAvailable","NativePortal","Portal","NativePortalProvider","NativePortalHost","PortalHost"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/portal/teleport.ts"],"mappings":";;AAAA,SAA6BA,aAAa,QAAwB,OAAO;;AAEzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIC,GAAQ,GAAG,IAAI;AACnB,IAAIC,UAAe,GAAG,IAAI;AAC1B,IAAIC,eAAoB,GAAG,IAAI;AAC/B,IAAI;EACHF,GAAG,GAAGG,OAAO,CAAC,uBAAuB,CAAC;EACtCF,UAAU,GAAGE,OAAO,CAAC,yDAAyD,CAAC;EAC/ED,eAAe,GAAGC,OAAO,CAAC,uDAAuD,CAAC;AACnF,CAAC,CAAC,MAAM,CAAC;AAET,MAAMC,wBAAuE,GAC5EF,eAAe,EAAEG,OAAO,IAAI,IAAI;AACjC,MAAMC,qBAAoE,GACzEL,UAAU,EAAEK,qBAAqB,IAAI,IAAI;AAE1C,MAAMC,wBAAuE,GAC5ED,qBAAqB,GAClB,CAAC;EAAEE;AAAkC,CAAC,KAAK;EAC3C,MAAMC,eAAe,gBAAGV,aAAa,CACpCO,qBAAqB,EACrB,IAAI,EACJE,QACD,CAAC;EAED,OAAOJ,wBAAwB,gBAC5BL,aAAa,CAACK,wBAAwB,EAAE,IAAI,EAAEK,eAAe,CAAC,GAC9DA,eAAe;AACnB,CAAC,GACA,IAAI;AAER,OAAO,MAAMC,mBAAmB,GAC/BV,GAAG,KAAK,IAAI,IAAIO,wBAAwB,KAAK,IAAI;AAClD,OAAO,MAAMI,YAAuC,GAAGX,GAAG,EAAEY,MAAM,IAAI,IAAI;AAC1E,OAAO,MAAMC,oBAA+C,GAC3DN,wBAAwB;AACzB,OAAO,MAAMO,gBAA2C,GACvDd,GAAG,EAAEe,UAAU,IAAI,IAAI","ignoreList":[]}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ export const hasLocalSlot = (localStylesMaps, slotId) => {
4
+ "worklet";
5
+
6
+ for (let index = 0; index < localStylesMaps.length; index++) {
7
+ if (localStylesMaps[index]?.[slotId] !== undefined) {
8
+ return true;
9
+ }
10
+ }
11
+ return false;
12
+ };
13
+ //# sourceMappingURL=has-local-slot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["hasLocalSlot","localStylesMaps","slotId","index","length","undefined"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/has-local-slot.ts"],"mappings":";;AAEA,OAAO,MAAMA,YAAY,GAAGA,CAC3BC,eAAiC,EACjCC,MAAc,KACV;EACJ,SAAS;;EAET,KAAK,IAAIC,KAAK,GAAG,CAAC,EAAEA,KAAK,GAAGF,eAAe,CAACG,MAAM,EAAED,KAAK,EAAE,EAAE;IAC5D,IAAIF,eAAe,CAACE,KAAK,CAAC,GAAGD,MAAM,CAAC,KAAKG,SAAS,EAAE;MACnD,OAAO,IAAI;IACZ;EACD;EAEA,OAAO,KAAK;AACb,CAAC","ignoreList":[]}
@@ -2,9 +2,15 @@
2
2
 
3
3
  export const PORTAL_HOST_NAME_RESET_VALUE = null;
4
4
  const PORTAL_HOST_NAME_SUFFIX = "-portal-host";
5
- export const createPortalBoundaryHostName = (hostKey, boundaryId) => {
5
+ const BOUNDARY_LOCAL_PORTAL_HOST_NAME_SUFFIX = "-boundary-local-portal-host";
6
+ export const createPortalBoundaryHostName = (hostKey, boundaryId, pairKey) => {
6
7
  "worklet";
7
8
 
8
- return `${hostKey}-${boundaryId}${PORTAL_HOST_NAME_SUFFIX}`;
9
+ return `${hostKey}-${pairKey ? `${pairKey}-` : ""}${boundaryId}${PORTAL_HOST_NAME_SUFFIX}`;
10
+ };
11
+ export const createBoundaryLocalPortalHostName = (screenKey, boundaryId) => {
12
+ "worklet";
13
+
14
+ return `${screenKey}-${boundaryId}${BOUNDARY_LOCAL_PORTAL_HOST_NAME_SUFFIX}`;
9
15
  };
10
16
  //# sourceMappingURL=naming.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["PORTAL_HOST_NAME_RESET_VALUE","PORTAL_HOST_NAME_SUFFIX","createPortalBoundaryHostName","hostKey","boundaryId"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/naming.ts"],"mappings":";;AAAA,OAAO,MAAMA,4BAA4B,GAAG,IAAI;AAChD,MAAMC,uBAAuB,GAAG,cAAc;AAE9C,OAAO,MAAMC,4BAA4B,GAAGA,CAC3CC,OAAe,EACfC,UAAkB,KACd;EACJ,SAAS;;EACT,OAAO,GAAGD,OAAO,IAAIC,UAAU,GAAGH,uBAAuB,EAAE;AAC5D,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["PORTAL_HOST_NAME_RESET_VALUE","PORTAL_HOST_NAME_SUFFIX","BOUNDARY_LOCAL_PORTAL_HOST_NAME_SUFFIX","createPortalBoundaryHostName","hostKey","boundaryId","pairKey","createBoundaryLocalPortalHostName","screenKey"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/naming.ts"],"mappings":";;AAAA,OAAO,MAAMA,4BAA4B,GAAG,IAAI;AAChD,MAAMC,uBAAuB,GAAG,cAAc;AAC9C,MAAMC,sCAAsC,GAAG,6BAA6B;AAE5E,OAAO,MAAMC,4BAA4B,GAAGA,CAC3CC,OAAe,EACfC,UAAkB,EAClBC,OAAuB,KACnB;EACJ,SAAS;;EACT,OAAO,GAAGF,OAAO,IAAIE,OAAO,GAAG,GAAGA,OAAO,GAAG,GAAG,EAAE,GAAGD,UAAU,GAAGJ,uBAAuB,EAAE;AAC3F,CAAC;AAED,OAAO,MAAMM,iCAAiC,GAAGA,CAChDC,SAAiB,EACjBH,UAAkB,KACd;EACJ,SAAS;;EACT,OAAO,GAAGG,SAAS,IAAIH,UAAU,GAAGH,sCAAsC,EAAE;AAC7E,CAAC","ignoreList":[]}
@@ -1,66 +1,46 @@
1
1
  "use strict";
2
2
 
3
- import { interpolate } from "react-native-reanimated";
4
3
  import { getClampedScrollAxisDelta } from "../../../../stores/scroll.store";
5
4
  import { getPortalHostBounds } from "../stores/host-bounds.store";
5
+
6
+ /**
7
+ * The two portal coordinate cases we support:
8
+ *
9
+ * - same-screen: source and host live on the same screen; re-base the stored
10
+ * host frame onto the source measurement's scroll snapshot.
11
+ * - cross-screen: source and host live on different screens; the host is the
12
+ * replacement coordinate space, so destination scroll is inherited naturally
13
+ * from host placement instead of manually propagated.
14
+ */
15
+
6
16
  export const resolvePortalOffsetStyle = ({
7
- alignHostToBoundsScroll = false,
8
17
  bounds,
9
- boundsCurrentScroll,
10
- compensateSourceScroll = false,
11
- currentScroll,
12
- hostCurrentScroll,
13
18
  hostKey,
14
- hostProgress = 0,
15
- includeScrollOffsets = true,
16
- placement,
17
- position = "relative",
18
- sourceCurrentScroll,
19
- trackSourceScroll = false
19
+ placement
20
20
  }) => {
21
21
  "worklet";
22
22
 
23
23
  const hostBounds = getPortalHostBounds(hostKey);
24
- const shouldAlignHostToBoundsScroll = placement ? placement === "same-screen" : alignHostToBoundsScroll;
25
- const shouldCompensateSourceScroll = trackSourceScroll || compensateSourceScroll;
26
- const shouldIncludeHostScrollOffsets = placement ? placement === "cross-screen-close" : includeScrollOffsets;
27
24
  const boundsScrollSnapshot = bounds.scroll ?? null;
28
- const sourceScrollSnapshot = shouldCompensateSourceScroll ? boundsScrollSnapshot : null;
29
- const sourceScrollDeltaX = shouldCompensateSourceScroll ? getClampedScrollAxisDelta(sourceCurrentScroll ?? null, sourceScrollSnapshot, "horizontal") : 0;
30
- const sourceScrollDeltaY = shouldCompensateSourceScroll ? getClampedScrollAxisDelta(sourceCurrentScroll ?? null, sourceScrollSnapshot, "vertical") : 0;
31
- const sourcePageX = bounds.pageX - sourceScrollDeltaX;
32
- const sourcePageY = bounds.pageY - sourceScrollDeltaY;
33
- const boundsScroll = shouldIncludeHostScrollOffsets ? boundsScrollSnapshot ?? boundsCurrentScroll ?? currentScroll ?? null : null;
34
25
  const hostBoundsScrollSnapshot = hostBounds?.scroll ?? null;
35
- const hostBoundsScroll = shouldIncludeHostScrollOffsets ? hostBoundsScrollSnapshot : null;
36
- const resolvedHostCurrentScroll = hostCurrentScroll ?? boundsScroll ?? hostBoundsScroll ?? null;
37
- const hostSnapshotDeltaX = shouldAlignHostToBoundsScroll && !shouldIncludeHostScrollOffsets ? getClampedScrollAxisDelta(boundsScrollSnapshot, hostBoundsScrollSnapshot, "horizontal") : 0;
38
- const hostSnapshotDeltaY = shouldAlignHostToBoundsScroll && !shouldIncludeHostScrollOffsets ? getClampedScrollAxisDelta(boundsScrollSnapshot, hostBoundsScrollSnapshot, "vertical") : 0;
39
- // Deltas are clamped to the layout range: iOS rubber-band offsets are
40
- // outside the real scroll range and must not become coordinate-space deltas.
41
- const hostScrollDeltaX = getClampedScrollAxisDelta(resolvedHostCurrentScroll, hostBoundsScroll, "horizontal");
42
- const hostScrollDeltaY = getClampedScrollAxisDelta(resolvedHostCurrentScroll, hostBoundsScroll, "vertical");
43
- const adjustedHostPageX = hostBounds ? hostBounds.pageX - hostSnapshotDeltaX - interpolate(hostProgress, [0, 1], [hostScrollDeltaX, 0]) : 0;
44
- const adjustedHostPageY = hostBounds ? hostBounds.pageY - hostSnapshotDeltaY - interpolate(hostProgress, [0, 1], [hostScrollDeltaY, 0]) : 0;
45
- const boundsScrollDeltaX = shouldIncludeHostScrollOffsets ? getClampedScrollAxisDelta(currentScroll ?? null, boundsScroll, "horizontal") : 0;
46
- const boundsScrollDeltaY = shouldIncludeHostScrollOffsets ? getClampedScrollAxisDelta(currentScroll ?? null, boundsScroll, "vertical") : 0;
47
- const offsetX = hostBounds ? sourcePageX - adjustedHostPageX : sourcePageX - boundsScrollDeltaX;
48
- const offsetY = hostBounds ? sourcePageY - adjustedHostPageY : sourcePageY - boundsScrollDeltaY;
49
- const transform = [{
50
- translateY: offsetY
51
- }, {
52
- translateX: offsetX
53
- }];
54
- if (position === "absolute") {
55
- return {
56
- left: 0,
57
- position: "absolute",
58
- top: 0,
59
- transform
60
- };
61
- }
26
+
27
+ // same-screen re-bases the static host frame onto the source scroll snapshot.
28
+ // Cross-screen hosts are the chosen replacement coordinate space, so their
29
+ // destination scroll is represented by where the host itself is mounted.
30
+ const alignHostToBoundsScroll = placement === "same-screen";
31
+ const hostSnapshotDeltaX = alignHostToBoundsScroll ? getClampedScrollAxisDelta(boundsScrollSnapshot, hostBoundsScrollSnapshot, "horizontal") : 0;
32
+ const hostSnapshotDeltaY = alignHostToBoundsScroll ? getClampedScrollAxisDelta(boundsScrollSnapshot, hostBoundsScrollSnapshot, "vertical") : 0;
33
+
34
+ // Without registered host bounds the host frame is the origin, so the source
35
+ // page position becomes the offset directly.
36
+ const adjustedHostPageX = hostBounds ? hostBounds.pageX - hostSnapshotDeltaX : 0;
37
+ const adjustedHostPageY = hostBounds ? hostBounds.pageY - hostSnapshotDeltaY : 0;
62
38
  return {
63
- transform
39
+ transform: [{
40
+ translateY: bounds.pageY - adjustedHostPageY
41
+ }, {
42
+ translateX: bounds.pageX - adjustedHostPageX
43
+ }]
64
44
  };
65
45
  };
66
46
  //# sourceMappingURL=offset-style.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["interpolate","getClampedScrollAxisDelta","getPortalHostBounds","resolvePortalOffsetStyle","alignHostToBoundsScroll","bounds","boundsCurrentScroll","compensateSourceScroll","currentScroll","hostCurrentScroll","hostKey","hostProgress","includeScrollOffsets","placement","position","sourceCurrentScroll","trackSourceScroll","hostBounds","shouldAlignHostToBoundsScroll","shouldCompensateSourceScroll","shouldIncludeHostScrollOffsets","boundsScrollSnapshot","scroll","sourceScrollSnapshot","sourceScrollDeltaX","sourceScrollDeltaY","sourcePageX","pageX","sourcePageY","pageY","boundsScroll","hostBoundsScrollSnapshot","hostBoundsScroll","resolvedHostCurrentScroll","hostSnapshotDeltaX","hostSnapshotDeltaY","hostScrollDeltaX","hostScrollDeltaY","adjustedHostPageX","adjustedHostPageY","boundsScrollDeltaX","boundsScrollDeltaY","offsetX","offsetY","transform","translateY","translateX","left","top"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/offset-style.ts"],"mappings":";;AAAA,SACCA,WAAW,QAGL,yBAAyB;AAChC,SAASC,yBAAyB,QAAQ,iCAAiC;AAE3E,SAASC,mBAAmB,QAAQ,6BAA6B;AAuCjE,OAAO,MAAMC,wBAAwB,GAAGA,CAAC;EACxCC,uBAAuB,GAAG,KAAK;EAC/BC,MAAM;EACNC,mBAAmB;EACnBC,sBAAsB,GAAG,KAAK;EAC9BC,aAAa;EACbC,iBAAiB;EACjBC,OAAO;EACPC,YAAY,GAAG,CAAC;EAChBC,oBAAoB,GAAG,IAAI;EAC3BC,SAAS;EACTC,QAAQ,GAAG,UAAU;EACrBC,mBA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AAEC,UAAU,EAAEF;EAAQ,CAAC,EAAE;IAAEG,UAAU,EAAEJ;EAAQ,CAAC,CAAC;EAEpE,IAAI5B,QAAQ,KAAK,UAAU,EAAE;IAC5B,OAAO;MACNiC,IAAI,EAAE,CAAC;MACPjC,QAAQ,EAAE,UAAU;MACpBkC,GAAG,EAAE,CAAC;MACNJ;IACD,CAAC;EACF;EAEA,OAAO;IACNA;EACD,CAAC;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["getClampedScrollAxisDelta","getPortalHostBounds","resolvePortalOffsetStyle","bounds","hostKey","placement","hostBounds","boundsScrollSnapshot","scroll","hostBoundsScrollSnapshot","alignHostToBoundsScroll","hostSnapshotDeltaX","hostSnapshotDeltaY","adjustedHostPageX","pageX","adjustedHostPageY","pageY","transform","translateY","translateX"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/offset-style.ts"],"mappings":";;AACA,SAASA,yBAAyB,QAAQ,iCAAiC;AAE3E,SAASC,mBAAmB,QAAQ,6BAA6B;;AAEjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA,OAAO,MAAMC,wBAAwB,GAAGA,CAAC;EACxCC,MAAM;EACNC,OAAO;EACPC;AAC+B,CAAC,KAAiB;EACjD,SAAS;;EACT,MAAMC,UAAU,GAAGL,mBAAmB,CAACG,OAAO,CAAC;EAC/C,MAAMG,oBAAoB,GAAGJ,MAAM,CAACK,MAAM,IAAI,IAAI;EAClD,MAAMC,wBAAwB,GAAGH,UAAU,EAAEE,MAAM,IAAI,IAAI;;EAE3D;EACA;EACA;EACA,MAAME,uBAAuB,GAAGL,SAAS,KAAK,aAAa;EAE3D,MAAMM,kBAAkB,GAAGD,uBAAuB,GAC/CV,yBAAyB,CACzBO,oBAAoB,EACpBE,wBAAwB,EACxB,YACD,CAAC,GACA,CAAC;EACJ,MAAMG,kBAAkB,GAAGF,uBAAuB,GAC/CV,yBAAyB,CACzBO,oBAAoB,EACpBE,wBAAwB,EACxB,UACD,CAAC,GACA,CAAC;;EAEJ;EACA;EACA,MAAMI,iBAAiB,GAAGP,UAAU,GACjCA,UAAU,CAACQ,KAAK,GAAGH,kBAAkB,GACrC,CAAC;EACJ,MAAMI,iBAAiB,GAAGT,UAAU,GACjCA,UAAU,CAACU,KAAK,GAAGJ,kBAAkB,GACrC,CAAC;EAEJ,OAAO;IACNK,SAAS,EAAE,CACV;MAAEC,UAAU,EAAEf,MAAM,CAACa,KAAK,GAAGD;IAAkB,CAAC,EAChD;MAAEI,UAAU,EAAEhB,MAAM,CAACW,KAAK,GAAGD;IAAkB,CAAC;EAElD,CAAC;AACF,CAAC","ignoreList":[]}
@@ -0,0 +1,246 @@
1
+ "use strict";
2
+
3
+ import { getDestinationScreenKeyFromPairKey, getLinkKeyFromTag, getLink as getPairLink, getSourceScreenKeyFromPairKey } from "../../../../stores/bounds/helpers/link-pairs.helpers";
4
+ const hasSeenScreenKey = (screenKeys, screenKey) => {
5
+ "worklet";
6
+
7
+ for (let index = 0; index < screenKeys.length; index++) {
8
+ if (screenKeys[index] === screenKey) {
9
+ return true;
10
+ }
11
+ }
12
+ return false;
13
+ };
14
+ export const usesEscapeClippingHost = link => {
15
+ "worklet";
16
+
17
+ return link?.source?.handoff === true && link.source.escapeClipping === true;
18
+ };
19
+ const isReturningToPreviousSourceHost = ({
20
+ hostScreenKey,
21
+ ownerPairKey,
22
+ previousOwnerPairKey
23
+ }) => {
24
+ "worklet";
25
+
26
+ const previousSourceScreenKey = getSourceScreenKeyFromPairKey(previousOwnerPairKey);
27
+ const previousDestinationScreenKey = getDestinationScreenKeyFromPairKey(previousOwnerPairKey);
28
+ const ownerDestinationScreenKey = getDestinationScreenKeyFromPairKey(ownerPairKey);
29
+ return previousDestinationScreenKey !== "" && ownerDestinationScreenKey !== "" && previousDestinationScreenKey !== previousSourceScreenKey && ownerDestinationScreenKey === previousSourceScreenKey && hostScreenKey === previousSourceScreenKey;
30
+ };
31
+ export const canSwitchBoundaryLocalHandoffImmediately = ({
32
+ hostScreenKey,
33
+ ownerPairKey,
34
+ previousOwnerPairKey
35
+ }) => {
36
+ "worklet";
37
+
38
+ if (!hostScreenKey || !ownerPairKey) {
39
+ return false;
40
+ }
41
+ if (hostScreenKey === getSourceScreenKeyFromPairKey(ownerPairKey)) {
42
+ return true;
43
+ }
44
+ if (!previousOwnerPairKey) {
45
+ return false;
46
+ }
47
+ return isReturningToPreviousSourceHost({
48
+ hostScreenKey,
49
+ ownerPairKey,
50
+ previousOwnerPairKey
51
+ });
52
+ };
53
+ const isActiveHandoffLink = ({
54
+ link,
55
+ linkKey,
56
+ pairKey,
57
+ pairsState
58
+ }) => {
59
+ "worklet";
60
+
61
+ if (!link.group) {
62
+ return true;
63
+ }
64
+ const activeId = pairsState[pairKey]?.groups?.[link.group]?.activeId;
65
+ return !activeId || activeId === linkKey;
66
+ };
67
+ const resolveBoundaryLocalStyleOwnerScreenKey = ({
68
+ hostScreenKey,
69
+ isSettledHostReady,
70
+ settledHostScreenKey,
71
+ sourceScreenKey
72
+ }) => {
73
+ "worklet";
74
+
75
+ if (settledHostScreenKey === hostScreenKey && isSettledHostReady) {
76
+ return hostScreenKey;
77
+ }
78
+ return sourceScreenKey;
79
+ };
80
+ const pendingSignal = sourcePairKey => {
81
+ "worklet";
82
+
83
+ return {
84
+ hostScreenKey: null,
85
+ ownerPairKey: sourcePairKey,
86
+ ownerScreenKey: null,
87
+ status: "pending"
88
+ };
89
+ };
90
+ const clearSignal = sourcePairKey => {
91
+ "worklet";
92
+
93
+ return {
94
+ hostScreenKey: null,
95
+ ownerPairKey: sourcePairKey,
96
+ ownerScreenKey: null,
97
+ status: "clear"
98
+ };
99
+ };
100
+ export const resolveBoundaryPortalOwnership = ({
101
+ boundaryId,
102
+ currentScreenKey,
103
+ escapeClipping,
104
+ handoff,
105
+ isSettledHostClosingComplete = false,
106
+ isSettledHostReady = false,
107
+ pairsState,
108
+ settledHostScreenKey = null,
109
+ sourcePairKey
110
+ }) => {
111
+ "worklet";
112
+
113
+ const linkKey = getLinkKeyFromTag(boundaryId);
114
+ const link = getPairLink(pairsState, sourcePairKey, linkKey);
115
+ if (link?.status !== "complete") {
116
+ return pendingSignal(sourcePairKey);
117
+ }
118
+ if (!isActiveHandoffLink({
119
+ link,
120
+ linkKey,
121
+ pairKey: sourcePairKey,
122
+ pairsState
123
+ })) {
124
+ return clearSignal(sourcePairKey);
125
+ }
126
+ if (!handoff) {
127
+ return {
128
+ hostScreenKey: currentScreenKey,
129
+ ownerPairKey: sourcePairKey,
130
+ ownerScreenKey: currentScreenKey,
131
+ status: "complete"
132
+ };
133
+ }
134
+ let hostScreenKey = link.destination.screenKey;
135
+ let ownerPairKey = sourcePairKey;
136
+ let previousOwnerPairKey = null;
137
+ const seenScreenKeys = [getSourceScreenKeyFromPairKey(sourcePairKey), hostScreenKey];
138
+ const pairKeys = Object.keys(pairsState);
139
+ for (let hop = 0; hop < pairKeys.length; hop++) {
140
+ let didAdvance = false;
141
+ let hasPendingNextHop = false;
142
+ let didHitVisitedScreen = false;
143
+ for (let index = 0; index < pairKeys.length; index++) {
144
+ const candidatePairKey = pairKeys[index];
145
+ if (!candidatePairKey || candidatePairKey === ownerPairKey) {
146
+ continue;
147
+ }
148
+ const candidate = getPairLink(pairsState, candidatePairKey, linkKey);
149
+ if (!candidate?.source || candidate.source.screenKey !== hostScreenKey) {
150
+ continue;
151
+ }
152
+ if (!candidate.source.handoff) {
153
+ continue;
154
+ }
155
+ if (!isActiveHandoffLink({
156
+ link: candidate,
157
+ linkKey,
158
+ pairKey: candidatePairKey,
159
+ pairsState
160
+ })) {
161
+ continue;
162
+ }
163
+ if (candidate.status !== "complete") {
164
+ hasPendingNextHop = true;
165
+ continue;
166
+ }
167
+ const nextHostScreenKey = candidate.destination.screenKey;
168
+ previousOwnerPairKey = ownerPairKey;
169
+ ownerPairKey = candidatePairKey;
170
+ hostScreenKey = nextHostScreenKey;
171
+ if (hasSeenScreenKey(seenScreenKeys, nextHostScreenKey)) {
172
+ didHitVisitedScreen = true;
173
+ break;
174
+ }
175
+ seenScreenKeys.push(nextHostScreenKey);
176
+ didAdvance = true;
177
+ break;
178
+ }
179
+ if (didHitVisitedScreen) {
180
+ break;
181
+ }
182
+ if (didAdvance) {
183
+ continue;
184
+ }
185
+ if (hasPendingNextHop) {
186
+ return pendingSignal(ownerPairKey);
187
+ }
188
+ break;
189
+ }
190
+ const ownerLink = getPairLink(pairsState, ownerPairKey, linkKey);
191
+ const ownerUsesEscapeClipping = ownerLink?.source?.escapeClipping ?? escapeClipping;
192
+ if (!ownerUsesEscapeClipping && isSettledHostClosingComplete && settledHostScreenKey === hostScreenKey && previousOwnerPairKey) {
193
+ hostScreenKey = getSourceScreenKeyFromPairKey(ownerPairKey);
194
+ }
195
+ const ownerScreenKey = ownerUsesEscapeClipping ? getSourceScreenKeyFromPairKey(ownerPairKey) : resolveBoundaryLocalStyleOwnerScreenKey({
196
+ hostScreenKey,
197
+ isSettledHostReady,
198
+ settledHostScreenKey,
199
+ sourceScreenKey: getSourceScreenKeyFromPairKey(ownerPairKey)
200
+ });
201
+ return {
202
+ hostScreenKey,
203
+ ownerPairKey,
204
+ ownerScreenKey,
205
+ status: "complete"
206
+ };
207
+ };
208
+ export const hasHandoffEscapeContinuation = ({
209
+ linkKey,
210
+ linkState,
211
+ sourceScreenKey
212
+ }) => {
213
+ "worklet";
214
+
215
+ const pairKeys = Object.keys(linkState);
216
+ const visitedScreenKeys = [];
217
+ let cursorScreenKey = sourceScreenKey;
218
+ for (let hop = 0; hop < pairKeys.length; hop++) {
219
+ if (hasSeenScreenKey(visitedScreenKeys, cursorScreenKey)) {
220
+ return false;
221
+ }
222
+ visitedScreenKeys.push(cursorScreenKey);
223
+ let previousScreenKey = null;
224
+ for (let index = 0; index < pairKeys.length; index++) {
225
+ const candidatePairKey = pairKeys[index];
226
+ const link = candidatePairKey ? linkState[candidatePairKey]?.links?.[linkKey] : null;
227
+ if (!link?.source || !link.destination || link.destination.screenKey !== cursorScreenKey) {
228
+ continue;
229
+ }
230
+ if (usesEscapeClippingHost(link)) {
231
+ return true;
232
+ }
233
+ if (!link.source.handoff) {
234
+ return false;
235
+ }
236
+ previousScreenKey = link.source.screenKey;
237
+ break;
238
+ }
239
+ if (!previousScreenKey) {
240
+ return false;
241
+ }
242
+ cursorScreenKey = previousScreenKey;
243
+ }
244
+ return false;
245
+ };
246
+ //# sourceMappingURL=ownership.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["getDestinationScreenKeyFromPairKey","getLinkKeyFromTag","getLink","getPairLink","getSourceScreenKeyFromPairKey","hasSeenScreenKey","screenKeys","screenKey","index","length","usesEscapeClippingHost","link","source","handoff","escapeClipping","isReturningToPreviousSourceHost","hostScreenKey","ownerPairKey","previousOwnerPairKey","previousSourceScreenKey","previousDestinationScreenKey","ownerDestinationScreenKey","canSwitchBoundaryLocalHandoffImmediately","isActiveHandoffLink","linkKey","pairKey","pairsState","group","activeId","groups","resolveBoundaryLocalStyleOwnerScreenKey","isSettledHostReady","settledHostScreenKey","sourceScreenKey","pendingSignal","sourcePairKey","ownerScreenKey","status","clearSignal","resolveBoundaryPortalOwnership","boundaryId","currentScreenKey","isSettledHostClosingComplete","destination","seenScreenKeys","pairKeys","Object","keys","hop","didAdvance","hasPendingNextHop","didHitVisitedScreen","candidatePairKey","candidate","nextHostScreenKey","push","ownerLink","ownerUsesEscapeClipping","hasHandoffEscapeContinuation","linkState","visitedScreenKeys","cursorScreenKey","previousScreenKey","links"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/ownership.ts"],"mappings":";;AAAA,SACCA,kCAAkC,EAClCC,iBAAiB,EACjBC,OAAO,IAAIC,WAAW,EACtBC,6BAA6B,QACvB,sDAAsD;AAuB7D,MAAMC,gBAAgB,GAAGA,CAACC,UAAuB,EAAEC,SAAoB,KAAK;EAC3E,SAAS;;EACT,KAAK,IAAIC,KAAK,GAAG,CAAC,EAAEA,KAAK,GAAGF,UAAU,CAACG,MAAM,EAAED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IAAI,CAAC,EAAE;QACjC,OAAO,IAAI;MACZ;MAEA,IAAI,CAACA,IAAI,CAACC,MAAM,CAACC,OAAO,EAAE;QACzB,OAAO,KAAK;MACb;MAEAiD,iBAAiB,GAAGnD,IAAI,CAACC,MAAM,CAACL,SAAS;MACzC;IACD;IAEA,IAAI,CAACuD,iBAAiB,EAAE;MACvB,OAAO,KAAK;IACb;IAEAD,eAAe,GAAGC,iBAAiB;EACpC;EAEA,OAAO,KAAK;AACb,CAAC","ignoreList":[]}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ import { logger } from "../../../../utils/logger";
4
+ import { isTeleportAvailable } from "../teleport";
5
+ export const resolveBoundaryPortal = ({
6
+ handoff,
7
+ escapeClipping
8
+ }) => {
9
+ const resolvedHandoff = handoff ?? false;
10
+ const resolvedEscapeClipping = escapeClipping ?? false;
11
+ const enabled = resolvedHandoff || resolvedEscapeClipping;
12
+ if (!enabled) {
13
+ return {
14
+ handoff: false,
15
+ escapeClipping: false,
16
+ enabled: false
17
+ };
18
+ }
19
+ if (!isTeleportAvailable) {
20
+ logger.warnOnce("boundary:teleport-missing", "react-native-teleport is not installed; handoff and escapeClipping boundaries will render inline.");
21
+ return {
22
+ handoff: false,
23
+ escapeClipping: false,
24
+ enabled: false
25
+ };
26
+ }
27
+ return {
28
+ handoff: resolvedHandoff,
29
+ escapeClipping: resolvedEscapeClipping,
30
+ enabled
31
+ };
32
+ };
33
+ //# sourceMappingURL=resolve-portal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["logger","isTeleportAvailable","resolveBoundaryPortal","handoff","escapeClipping","resolvedHandoff","resolvedEscapeClipping","enabled","warnOnce"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/resolve-portal.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,0BAA0B;AACjD,SAASC,mBAAmB,QAAQ,aAAa;AAajD,OAAO,MAAMC,qBAAqB,GAAGA,CAAC;EACrCC,OAAO;EACPC;AAC4B,CAAC,KAA4B;EACzD,MAAMC,eAAe,GAAGF,OAAO,IAAI,KAAK;EACxC,MAAMG,sBAAsB,GAAGF,cAAc,IAAI,KAAK;EAEtD,MAAMG,OAAO,GAAGF,eAAe,IAAIC,sBAAsB;EAEzD,IAAI,CAACC,OAAO,EAAE;IACb,OAAO;MACNJ,OAAO,EAAE,KAAK;MACdC,cAAc,EAAE,KAAK;MACrBG,OAAO,EAAE;IACV,CAAC;EACF;EAEA,IAAI,CAACN,mBAAmB,EAAE;IACzBD,MAAM,CAACQ,QAAQ,CACd,2BAA2B,EAC3B,mGACD,CAAC;IAED,OAAO;MACNL,OAAO,EAAE,KAAK;MACdC,cAAc,EAAE,KAAK;MACrBG,OAAO,EAAE;IACV,CAAC;EACF;EAEA,OAAO;IACNJ,OAAO,EAAEE,eAAe;IACxBD,cAAc,EAAEE,sBAAsB;IACtCC;EACD,CAAC;AACF,CAAC","ignoreList":[]}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Shallow equality for the flat signal objects produced by the portal
5
+ * `useAnimatedReaction` blocks. Both sides always carry the same fixed key set,
6
+ * so iterating one side's keys is sufficient. A `null`/`undefined` operand
7
+ * (the first reaction run) is treated as not-equal so the reaction proceeds.
8
+ */
9
+ export const shallowEqual = (a, b) => {
10
+ "worklet";
11
+
12
+ if (!a || !b) {
13
+ return false;
14
+ }
15
+ const keys = Object.keys(a);
16
+ for (let index = 0; index < keys.length; index++) {
17
+ const key = keys[index];
18
+ if (a[key] !== b[key]) {
19
+ return false;
20
+ }
21
+ }
22
+ return true;
23
+ };
24
+ //# sourceMappingURL=shallow-equal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["shallowEqual","a","b","keys","Object","index","length","key"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/shallow-equal.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,YAAY,GAAGA,CAC3BC,CAA6C,EAC7CC,CAA6C,KACzC;EACJ,SAAS;;EACT,IAAI,CAACD,CAAC,IAAI,CAACC,CAAC,EAAE;IACb,OAAO,KAAK;EACb;EAEA,MAAMC,IAAI,GAAGC,MAAM,CAACD,IAAI,CAACF,CAAC,CAAC;EAC3B,KAAK,IAAII,KAAK,GAAG,CAAC,EAAEA,KAAK,GAAGF,IAAI,CAACG,MAAM,EAAED,KAAK,EAAE,EAAE;IACjD,MAAME,GAAG,GAAGJ,IAAI,CAACE,KAAK,CAAC;IACvB,IAAIJ,CAAC,CAACM,GAAG,CAAC,KAAKL,CAAC,CAACK,GAAG,CAAC,EAAE;MACtB,OAAO,KAAK;IACb;EACD;EAEA,OAAO,IAAI;AACZ,CAAC","ignoreList":[]}
@@ -8,4 +8,12 @@ export const isTeleportEnabled = teleport => {
8
8
  }
9
9
  return teleport?.enabled !== false;
10
10
  };
11
+ export const shouldAttachBoundaryPortal = ({
12
+ enabled,
13
+ teleport
14
+ }) => {
15
+ "worklet";
16
+
17
+ return enabled && isTeleportEnabled(teleport);
18
+ };
11
19
  //# sourceMappingURL=teleport-control.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["isTeleportEnabled","teleport","enabled"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/teleport-control.ts"],"mappings":";;AAEA,OAAO,MAAMA,iBAAiB,GAC7BC,QAA6C,IACzC;EACJ,SAAS;;EAET,IAAI,OAAOA,QAAQ,KAAK,SAAS,EAAE;IAClC,OAAOA,QAAQ;EAChB;EAEA,OAAOA,QAAQ,EAAEC,OAAO,KAAK,KAAK;AACnC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["isTeleportEnabled","teleport","enabled","shouldAttachBoundaryPortal"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/teleport-control.ts"],"mappings":";;AAEA,OAAO,MAAMA,iBAAiB,GAC7BC,QAA6C,IACzC;EACJ,SAAS;;EAET,IAAI,OAAOA,QAAQ,KAAK,SAAS,EAAE;IAClC,OAAOA,QAAQ;EAChB;EAEA,OAAOA,QAAQ,EAAEC,OAAO,KAAK,KAAK;AACnC,CAAC;AAED,OAAO,MAAMC,0BAA0B,GAAGA,CAAC;EAC1CD,OAAO;EACPD;AAID,CAAC,KAAK;EACL,SAAS;;EAET,OAAOC,OAAO,IAAIF,iBAAiB,CAACC,QAAQ,CAAC;AAC9C,CAAC","ignoreList":[]}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ export const resolveNextVisiblePortalHostName = ({
4
+ canSwitchImmediately,
5
+ isInterpolatorReady,
6
+ requestedName,
7
+ shouldTeleport,
8
+ visibleName
9
+ }) => {
10
+ "worklet";
11
+
12
+ if (!shouldTeleport) {
13
+ return null;
14
+ }
15
+ if (requestedName && (canSwitchImmediately || isInterpolatorReady)) {
16
+ return requestedName;
17
+ }
18
+ return visibleName;
19
+ };
20
+ //# sourceMappingURL=visible-host.js.map