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
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useActivePortalBoundaryHosts = exports.unmountPortalBoundaryHost = exports.mountPortalBoundaryHost = void 0;
6
+ exports.useActivePortalBoundaryHosts = exports.unmountPortalBoundaryHost = exports.mountPortalBoundaryHost = exports.dropStalePortalBoundaryHosts = void 0;
7
7
  var _react = require("react");
8
8
  const EMPTY_HOSTS = [];
9
9
  const listeners = new Set();
@@ -29,24 +29,56 @@ const emit = () => {
29
29
  }
30
30
  };
31
31
  const isSameHost = (a, b) => {
32
- return a.boundaryId === b.boundaryId && a.capturesScroll === b.capturesScroll && a.hostKey === b.hostKey && a.pairKey === b.pairKey && a.screenKey === b.screenKey;
32
+ 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;
33
33
  };
34
34
  const mountPortalBoundaryHost = host => {
35
- const previous = activeBoundaryHosts.get(host.boundaryId);
35
+ const previous = activeBoundaryHosts.get(host.portalHostName);
36
36
  if (previous && isSameHost(previous, host)) {
37
37
  return;
38
38
  }
39
- activeBoundaryHosts.set(host.boundaryId, host);
39
+ activeBoundaryHosts.set(host.portalHostName, host);
40
40
  emit();
41
41
  };
42
42
  exports.mountPortalBoundaryHost = mountPortalBoundaryHost;
43
43
  const unmountPortalBoundaryHost = boundaryId => {
44
- if (!activeBoundaryHosts.delete(boundaryId)) {
44
+ let didDelete = false;
45
+ for (const [hostEntryKey, host] of activeBoundaryHosts) {
46
+ if (host.boundaryId !== boundaryId) {
47
+ continue;
48
+ }
49
+ activeBoundaryHosts.delete(hostEntryKey);
50
+ didDelete = true;
51
+ }
52
+ if (!didDelete) {
45
53
  return;
46
54
  }
47
55
  emit();
48
56
  };
57
+
58
+ /**
59
+ * Post-handoff GC: drop every receiver for this boundary except the one now
60
+ * visible (`keepPortalHostName`). Called once the new host is confirmed on
61
+ * screen so the superseded receivers stop rendering.
62
+ */
49
63
  exports.unmountPortalBoundaryHost = unmountPortalBoundaryHost;
64
+ const dropStalePortalBoundaryHosts = ({
65
+ boundaryId,
66
+ keepPortalHostName
67
+ }) => {
68
+ let didDelete = false;
69
+ for (const [hostEntryKey, host] of activeBoundaryHosts) {
70
+ if (host.boundaryId !== boundaryId || host.portalHostName === keepPortalHostName) {
71
+ continue;
72
+ }
73
+ activeBoundaryHosts.delete(hostEntryKey);
74
+ didDelete = true;
75
+ }
76
+ if (!didDelete) {
77
+ return;
78
+ }
79
+ emit();
80
+ };
81
+ exports.dropStalePortalBoundaryHosts = dropStalePortalBoundaryHosts;
50
82
  const subscribe = listener => {
51
83
  listeners.add(listener);
52
84
  return () => {
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","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","exports","unmountPortalBoundaryHost","delete","subscribe","add","useActivePortalBoundaryHosts","useSyncExternalStore"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/stores/portal-boundary-host.store.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAcA,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,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MAAME,SAAS,GAAIf,QAAoB,IAAK;EAC3Cb,SAAS,CAAC6B,GAAG,CAAChB,QAAQ,CAAC;EAEvB,OAAO,MAAM;IACZb,SAAS,CAAC2B,MAAM,CAACd,QAAQ,CAAC;EAC3B,CAAC;AACF,CAAC;AAEM,MAAMiB,4BAA4B,GAAIpB,OAAe,IAAK;EAChE,OAAO,IAAAqB,2BAAoB,EAC1BH,SAAS,EACT,MAAMxB,QAAQ,CAACC,YAAY,CAACK,OAAO,CAAC,IAAIX,WAAW,EACnD,MAAMA,WACP,CAAC;AACF,CAAC;AAAC0B,OAAA,CAAAK,4BAAA,GAAAA,4BAAA","ignoreList":[]}
1
+ {"version":3,"names":["_react","require","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","exports","unmountPortalBoundaryHost","didDelete","hostEntryKey","delete","dropStalePortalBoundaryHosts","keepPortalHostName","subscribe","add","useActivePortalBoundaryHosts","useSyncExternalStore"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/stores/portal-boundary-host.store.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAoBA,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,CA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CAAC;AAAC6B,OAAA,CAAAS,4BAAA,GAAAA,4BAAA","ignoreList":[]}
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.isTeleportAvailable = exports.NativePortalProvider = exports.NativePortalHost = exports.NativePortal = void 0;
7
+ var _react = require("react");
7
8
  /**
8
9
  * `react-native-teleport` is an optional peer dependency. The require sits in a
9
10
  * try/catch so Metro treats it as an optional dependency — an absent module no
@@ -13,11 +14,23 @@ exports.isTeleportAvailable = exports.NativePortalProvider = exports.NativePorta
13
14
  * rendering; everything else keeps working.
14
15
  */
15
16
  let mod = null;
17
+ let managerMod = null;
18
+ let providerViewMod = null;
16
19
  try {
17
20
  mod = require("react-native-teleport");
21
+ managerMod = require("react-native-teleport/lib/module/contexts/PortalManager");
22
+ providerViewMod = require("react-native-teleport/lib/module/views/PortalProvider");
18
23
  } catch {}
19
- const isTeleportAvailable = exports.isTeleportAvailable = mod !== null;
24
+ const NativePortalProviderView = providerViewMod?.default ?? null;
25
+ const PortalManagerProvider = managerMod?.PortalManagerProvider ?? null;
26
+ const SafeNativePortalProvider = PortalManagerProvider ? ({
27
+ children
28
+ }) => {
29
+ const managedChildren = /*#__PURE__*/(0, _react.createElement)(PortalManagerProvider, null, children);
30
+ return NativePortalProviderView ? /*#__PURE__*/(0, _react.createElement)(NativePortalProviderView, null, managedChildren) : managedChildren;
31
+ } : null;
32
+ const isTeleportAvailable = exports.isTeleportAvailable = mod !== null && SafeNativePortalProvider !== null;
20
33
  const NativePortal = exports.NativePortal = mod?.Portal ?? null;
21
- const NativePortalProvider = exports.NativePortalProvider = mod?.PortalProvider ?? null;
34
+ const NativePortalProvider = exports.NativePortalProvider = SafeNativePortalProvider;
22
35
  const NativePortalHost = exports.NativePortalHost = mod?.PortalHost ?? null;
23
36
  //# sourceMappingURL=teleport.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["mod","require","isTeleportAvailable","exports","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;AAEF,MAAMC,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAGF,GAAG,KAAK,IAAI;AACxC,MAAMI,YAAuC,GAAAD,OAAA,CAAAC,YAAA,GAAGJ,GAAG,EAAEK,MAAM,IAAI,IAAI;AACnE,MAAMC,oBAA+C,GAAAH,OAAA,CAAAG,oBAAA,GAC3DN,GAAG,EAAEO,cAAc,IAAI,IAAI;AACrB,MAAMC,gBAA2C,GAAAL,OAAA,CAAAK,gBAAA,GACvDR,GAAG,EAAES,UAAU,IAAI,IAAI","ignoreList":[]}
1
+ {"version":3,"names":["_react","require","mod","managerMod","providerViewMod","NativePortalProviderView","default","PortalManagerProvider","SafeNativePortalProvider","children","managedChildren","createElement","isTeleportAvailable","exports","NativePortal","Portal","NativePortalProvider","NativePortalHost","PortalHost"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/portal/teleport.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA;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,GAAGD,OAAO,CAAC,uBAAuB,CAAC;EACtCE,UAAU,GAAGF,OAAO,CAAC,yDAAyD,CAAC;EAC/EG,eAAe,GAAGH,OAAO,CAAC,uDAAuD,CAAC;AACnF,CAAC,CAAC,MAAM,CAAC;AAET,MAAMI,wBAAuE,GAC5ED,eAAe,EAAEE,OAAO,IAAI,IAAI;AACjC,MAAMC,qBAAoE,GACzEJ,UAAU,EAAEI,qBAAqB,IAAI,IAAI;AAE1C,MAAMC,wBAAuE,GAC5ED,qBAAqB,GAClB,CAAC;EAAEE;AAAkC,CAAC,KAAK;EAC3C,MAAMC,eAAe,gBAAG,IAAAC,oBAAa,EACpCJ,qBAAqB,EACrB,IAAI,EACJE,QACD,CAAC;EAED,OAAOJ,wBAAwB,gBAC5B,IAAAM,oBAAa,EAACN,wBAAwB,EAAE,IAAI,EAAEK,eAAe,CAAC,GAC9DA,eAAe;AACnB,CAAC,GACA,IAAI;AAED,MAAME,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAC/BV,GAAG,KAAK,IAAI,IAAIM,wBAAwB,KAAK,IAAI;AAC3C,MAAMM,YAAuC,GAAAD,OAAA,CAAAC,YAAA,GAAGZ,GAAG,EAAEa,MAAM,IAAI,IAAI;AACnE,MAAMC,oBAA+C,GAAAH,OAAA,CAAAG,oBAAA,GAC3DR,wBAAwB;AAClB,MAAMS,gBAA2C,GAAAJ,OAAA,CAAAI,gBAAA,GACvDf,GAAG,EAAEgB,UAAU,IAAI,IAAI","ignoreList":[]}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.hasLocalSlot = void 0;
7
+ const hasLocalSlot = (localStylesMaps, slotId) => {
8
+ "worklet";
9
+
10
+ for (let index = 0; index < localStylesMaps.length; index++) {
11
+ if (localStylesMaps[index]?.[slotId] !== undefined) {
12
+ return true;
13
+ }
14
+ }
15
+ return false;
16
+ };
17
+ exports.hasLocalSlot = hasLocalSlot;
18
+ //# sourceMappingURL=has-local-slot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["hasLocalSlot","localStylesMaps","slotId","index","length","undefined","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/has-local-slot.ts"],"mappings":";;;;;;AAEO,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;AAACC,OAAA,CAAAN,YAAA,GAAAA,YAAA","ignoreList":[]}
@@ -3,13 +3,20 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.createPortalBoundaryHostName = exports.PORTAL_HOST_NAME_RESET_VALUE = void 0;
6
+ exports.createPortalBoundaryHostName = exports.createBoundaryLocalPortalHostName = exports.PORTAL_HOST_NAME_RESET_VALUE = void 0;
7
7
  const PORTAL_HOST_NAME_RESET_VALUE = exports.PORTAL_HOST_NAME_RESET_VALUE = null;
8
8
  const PORTAL_HOST_NAME_SUFFIX = "-portal-host";
9
- const createPortalBoundaryHostName = (hostKey, boundaryId) => {
9
+ const BOUNDARY_LOCAL_PORTAL_HOST_NAME_SUFFIX = "-boundary-local-portal-host";
10
+ const createPortalBoundaryHostName = (hostKey, boundaryId, pairKey) => {
10
11
  "worklet";
11
12
 
12
- return `${hostKey}-${boundaryId}${PORTAL_HOST_NAME_SUFFIX}`;
13
+ return `${hostKey}-${pairKey ? `${pairKey}-` : ""}${boundaryId}${PORTAL_HOST_NAME_SUFFIX}`;
13
14
  };
14
15
  exports.createPortalBoundaryHostName = createPortalBoundaryHostName;
16
+ const createBoundaryLocalPortalHostName = (screenKey, boundaryId) => {
17
+ "worklet";
18
+
19
+ return `${screenKey}-${boundaryId}${BOUNDARY_LOCAL_PORTAL_HOST_NAME_SUFFIX}`;
20
+ };
21
+ exports.createBoundaryLocalPortalHostName = createBoundaryLocalPortalHostName;
15
22
  //# sourceMappingURL=naming.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["PORTAL_HOST_NAME_RESET_VALUE","exports","PORTAL_HOST_NAME_SUFFIX","createPortalBoundaryHostName","hostKey","boundaryId"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/naming.ts"],"mappings":";;;;;;AAAO,MAAMA,4BAA4B,GAAAC,OAAA,CAAAD,4BAAA,GAAG,IAAI;AAChD,MAAME,uBAAuB,GAAG,cAAc;AAEvC,MAAMC,4BAA4B,GAAGA,CAC3CC,OAAe,EACfC,UAAkB,KACd;EACJ,SAAS;;EACT,OAAO,GAAGD,OAAO,IAAIC,UAAU,GAAGH,uBAAuB,EAAE;AAC5D,CAAC;AAACD,OAAA,CAAAE,4BAAA,GAAAA,4BAAA","ignoreList":[]}
1
+ {"version":3,"names":["PORTAL_HOST_NAME_RESET_VALUE","exports","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":";;;;;;AAAO,MAAMA,4BAA4B,GAAAC,OAAA,CAAAD,4BAAA,GAAG,IAAI;AAChD,MAAME,uBAAuB,GAAG,cAAc;AAC9C,MAAMC,sCAAsC,GAAG,6BAA6B;AAErE,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;AAACD,OAAA,CAAAG,4BAAA,GAAAA,4BAAA;AAEK,MAAMI,iCAAiC,GAAGA,CAChDC,SAAiB,EACjBH,UAAkB,KACd;EACJ,SAAS;;EACT,OAAO,GAAGG,SAAS,IAAIH,UAAU,GAAGH,sCAAsC,EAAE;AAC7E,CAAC;AAACF,OAAA,CAAAO,iCAAA,GAAAA,iCAAA","ignoreList":[]}
@@ -4,67 +4,46 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.resolvePortalOffsetStyle = void 0;
7
- var _reactNativeReanimated = require("react-native-reanimated");
8
7
  var _scroll = require("../../../../stores/scroll.store");
9
8
  var _hostBounds = require("../stores/host-bounds.store");
9
+ /**
10
+ * The two portal coordinate cases we support:
11
+ *
12
+ * - same-screen: source and host live on the same screen; re-base the stored
13
+ * host frame onto the source measurement's scroll snapshot.
14
+ * - cross-screen: source and host live on different screens; the host is the
15
+ * replacement coordinate space, so destination scroll is inherited naturally
16
+ * from host placement instead of manually propagated.
17
+ */
18
+
10
19
  const resolvePortalOffsetStyle = ({
11
- alignHostToBoundsScroll = false,
12
20
  bounds,
13
- boundsCurrentScroll,
14
- compensateSourceScroll = false,
15
- currentScroll,
16
- hostCurrentScroll,
17
21
  hostKey,
18
- hostProgress = 0,
19
- includeScrollOffsets = true,
20
- placement,
21
- position = "relative",
22
- sourceCurrentScroll,
23
- trackSourceScroll = false
22
+ placement
24
23
  }) => {
25
24
  "worklet";
26
25
 
27
26
  const hostBounds = (0, _hostBounds.getPortalHostBounds)(hostKey);
28
- const shouldAlignHostToBoundsScroll = placement ? placement === "same-screen" : alignHostToBoundsScroll;
29
- const shouldCompensateSourceScroll = trackSourceScroll || compensateSourceScroll;
30
- const shouldIncludeHostScrollOffsets = placement ? placement === "cross-screen-close" : includeScrollOffsets;
31
27
  const boundsScrollSnapshot = bounds.scroll ?? null;
32
- const sourceScrollSnapshot = shouldCompensateSourceScroll ? boundsScrollSnapshot : null;
33
- const sourceScrollDeltaX = shouldCompensateSourceScroll ? (0, _scroll.getClampedScrollAxisDelta)(sourceCurrentScroll ?? null, sourceScrollSnapshot, "horizontal") : 0;
34
- const sourceScrollDeltaY = shouldCompensateSourceScroll ? (0, _scroll.getClampedScrollAxisDelta)(sourceCurrentScroll ?? null, sourceScrollSnapshot, "vertical") : 0;
35
- const sourcePageX = bounds.pageX - sourceScrollDeltaX;
36
- const sourcePageY = bounds.pageY - sourceScrollDeltaY;
37
- const boundsScroll = shouldIncludeHostScrollOffsets ? boundsScrollSnapshot ?? boundsCurrentScroll ?? currentScroll ?? null : null;
38
28
  const hostBoundsScrollSnapshot = hostBounds?.scroll ?? null;
39
- const hostBoundsScroll = shouldIncludeHostScrollOffsets ? hostBoundsScrollSnapshot : null;
40
- const resolvedHostCurrentScroll = hostCurrentScroll ?? boundsScroll ?? hostBoundsScroll ?? null;
41
- const hostSnapshotDeltaX = shouldAlignHostToBoundsScroll && !shouldIncludeHostScrollOffsets ? (0, _scroll.getClampedScrollAxisDelta)(boundsScrollSnapshot, hostBoundsScrollSnapshot, "horizontal") : 0;
42
- const hostSnapshotDeltaY = shouldAlignHostToBoundsScroll && !shouldIncludeHostScrollOffsets ? (0, _scroll.getClampedScrollAxisDelta)(boundsScrollSnapshot, hostBoundsScrollSnapshot, "vertical") : 0;
43
- // Deltas are clamped to the layout range: iOS rubber-band offsets are
44
- // outside the real scroll range and must not become coordinate-space deltas.
45
- const hostScrollDeltaX = (0, _scroll.getClampedScrollAxisDelta)(resolvedHostCurrentScroll, hostBoundsScroll, "horizontal");
46
- const hostScrollDeltaY = (0, _scroll.getClampedScrollAxisDelta)(resolvedHostCurrentScroll, hostBoundsScroll, "vertical");
47
- const adjustedHostPageX = hostBounds ? hostBounds.pageX - hostSnapshotDeltaX - (0, _reactNativeReanimated.interpolate)(hostProgress, [0, 1], [hostScrollDeltaX, 0]) : 0;
48
- const adjustedHostPageY = hostBounds ? hostBounds.pageY - hostSnapshotDeltaY - (0, _reactNativeReanimated.interpolate)(hostProgress, [0, 1], [hostScrollDeltaY, 0]) : 0;
49
- const boundsScrollDeltaX = shouldIncludeHostScrollOffsets ? (0, _scroll.getClampedScrollAxisDelta)(currentScroll ?? null, boundsScroll, "horizontal") : 0;
50
- const boundsScrollDeltaY = shouldIncludeHostScrollOffsets ? (0, _scroll.getClampedScrollAxisDelta)(currentScroll ?? null, boundsScroll, "vertical") : 0;
51
- const offsetX = hostBounds ? sourcePageX - adjustedHostPageX : sourcePageX - boundsScrollDeltaX;
52
- const offsetY = hostBounds ? sourcePageY - adjustedHostPageY : sourcePageY - boundsScrollDeltaY;
53
- const transform = [{
54
- translateY: offsetY
55
- }, {
56
- translateX: offsetX
57
- }];
58
- if (position === "absolute") {
59
- return {
60
- left: 0,
61
- position: "absolute",
62
- top: 0,
63
- transform
64
- };
65
- }
29
+
30
+ // same-screen re-bases the static host frame onto the source scroll snapshot.
31
+ // Cross-screen hosts are the chosen replacement coordinate space, so their
32
+ // destination scroll is represented by where the host itself is mounted.
33
+ const alignHostToBoundsScroll = placement === "same-screen";
34
+ const hostSnapshotDeltaX = alignHostToBoundsScroll ? (0, _scroll.getClampedScrollAxisDelta)(boundsScrollSnapshot, hostBoundsScrollSnapshot, "horizontal") : 0;
35
+ const hostSnapshotDeltaY = alignHostToBoundsScroll ? (0, _scroll.getClampedScrollAxisDelta)(boundsScrollSnapshot, hostBoundsScrollSnapshot, "vertical") : 0;
36
+
37
+ // Without registered host bounds the host frame is the origin, so the source
38
+ // page position becomes the offset directly.
39
+ const adjustedHostPageX = hostBounds ? hostBounds.pageX - hostSnapshotDeltaX : 0;
40
+ const adjustedHostPageY = hostBounds ? hostBounds.pageY - hostSnapshotDeltaY : 0;
66
41
  return {
67
- transform
42
+ transform: [{
43
+ translateY: bounds.pageY - adjustedHostPageY
44
+ }, {
45
+ translateX: bounds.pageX - adjustedHostPageX
46
+ }]
68
47
  };
69
48
  };
70
49
  exports.resolvePortalOffsetStyle = resolvePortalOffsetStyle;
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNativeReanimated","require","_scroll","_hostBounds","resolvePortalOffsetStyle","alignHostToBoundsScroll","bounds","boundsCurrentScroll","compensateSourceScroll","currentScroll","hostCurrentScroll","hostKey","hostProgress","includeScrollOffsets","placement","position","sourceCurrentScroll","trackSourceScroll","hostBounds","getPortalHostBounds","shouldAlignHostToBoundsScroll","shouldCompensateSourceScroll","shouldIncludeHostScrollOffsets","boundsScrollSnapshot","scroll","sourceScrollSnapshot","sourceScrollDeltaX","getClampedScrollAxisDelta","sourceScrollDeltaY","sourcePageX","pageX","sourcePageY","pageY","boundsScroll","hostBoundsScrollSnapshot","hostBoundsScroll","resolvedHostCurrentScroll","hostSnapshotDeltaX","hostSnapshotDeltaY","hostScrollDeltaX","hostScrollDeltaY","adjustedHostPageX","interpolate","adjustedHostPageY","boundsScrollDeltaX","boundsScrollDeltaY","offsetX","offsetY","transform","translateY","translateX","left","top","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/offset-style.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAF,OAAA;AAuCO,MAAMG,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,mBAAmB;EACnBC,iBAAiB,GAAG;AACW,CAAC,KAAiB;EACjD,SAAS;;EACT,MAAMC,UAAU,GAAG,IAAAC,+BAAmB,EAACR,OAAO,CAAC;EAC/C,MAAMS,6BAA6B,GAAGN,SAAS,GAC5CA,SAAS,KAAK,aAAa,GAC3BT,uBAAuB;EAC1B,MAAMgB,4BAA4B,GACjCJ,iBAAiB,IAAIT,sBAAsB;EAC5C,MAAMc,8BAA8B,GAAGR,SAAS,GAC7CA,SAAS,KAAK,oBAAoB,GAClCD,oBAAoB;EACvB,MAAMU,oBAAoB,GACxBjB,MAAM,CAA6CkB,MAAM,IAAI,IAAI;EACnE,MAAMC,oBAAoB,GAAGJ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Bounds","resolvePortalOffsetStyle","bounds","hostKey","placement","hostBounds","getPortalHostBounds","boundsScrollSnapshot","scroll","hostBoundsScrollSnapshot","alignHostToBoundsScroll","hostSnapshotDeltaX","getClampedScrollAxisDelta","hostSnapshotDeltaY","adjustedHostPageX","pageX","adjustedHostPageY","pageY","transform","translateY","translateX","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/offset-style.ts"],"mappings":";;;;;;AACA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUO,MAAME,wBAAwB,GAAGA,CAAC;EACxCC,MAAM;EACNC,OAAO;EACPC;AAC+B,CAAC,KAAiB;EACjD,SAAS;;EACT,MAAMC,UAAU,GAAG,IAAAC,+BAAmB,EAACH,OAAO,CAAC;EAC/C,MAAMI,oBAAoB,GAAGL,MAAM,CAACM,MAAM,IAAI,IAAI;EAClD,MAAMC,wBAAwB,GAAGJ,UAAU,EAAEG,MAAM,IAAI,IAAI;;EAE3D;EACA;EACA;EACA,MAAME,uBAAuB,GAAGN,SAAS,KAAK,aAAa;EAE3D,MAAMO,kBAAkB,GAAGD,uBAAuB,GAC/C,IAAAE,iCAAyB,EACzBL,oBAAoB,EACpBE,wBAAwB,EACxB,YACD,CAAC,GACA,CAAC;EACJ,MAAMI,kBAAkB,GAAGH,uBAAuB,GAC/C,IAAAE,iCAAyB,EACzBL,oBAAoB,EACpBE,wBAAwB,EACxB,UACD,CAAC,GACA,CAAC;;EAEJ;EACA;EACA,MAAMK,iBAAiB,GAAGT,UAAU,GACjCA,UAAU,CAACU,KAAK,GAAGJ,kBAAkB,GACrC,CAAC;EACJ,MAAMK,iBAAiB,GAAGX,UAAU,GACjCA,UAAU,CAACY,KAAK,GAAGJ,kBAAkB,GACrC,CAAC;EAEJ,OAAO;IACNK,SAAS,EAAE,CACV;MAAEC,UAAU,EAAEjB,MAAM,CAACe,KAAK,GAAGD;IAAkB,CAAC,EAChD;MAAEI,UAAU,EAAElB,MAAM,CAACa,KAAK,GAAGD;IAAkB,CAAC;EAElD,CAAC;AACF,CAAC;AAACO,OAAA,CAAApB,wBAAA,GAAAA,wBAAA","ignoreList":[]}
@@ -0,0 +1,254 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.usesEscapeClippingHost = exports.resolveBoundaryPortalOwnership = exports.hasHandoffEscapeContinuation = exports.canSwitchBoundaryLocalHandoffImmediately = void 0;
7
+ var _linkPairs = require("../../../../stores/bounds/helpers/link-pairs.helpers");
8
+ const hasSeenScreenKey = (screenKeys, screenKey) => {
9
+ "worklet";
10
+
11
+ for (let index = 0; index < screenKeys.length; index++) {
12
+ if (screenKeys[index] === screenKey) {
13
+ return true;
14
+ }
15
+ }
16
+ return false;
17
+ };
18
+ const usesEscapeClippingHost = link => {
19
+ "worklet";
20
+
21
+ return link?.source?.handoff === true && link.source.escapeClipping === true;
22
+ };
23
+ exports.usesEscapeClippingHost = usesEscapeClippingHost;
24
+ const isReturningToPreviousSourceHost = ({
25
+ hostScreenKey,
26
+ ownerPairKey,
27
+ previousOwnerPairKey
28
+ }) => {
29
+ "worklet";
30
+
31
+ const previousSourceScreenKey = (0, _linkPairs.getSourceScreenKeyFromPairKey)(previousOwnerPairKey);
32
+ const previousDestinationScreenKey = (0, _linkPairs.getDestinationScreenKeyFromPairKey)(previousOwnerPairKey);
33
+ const ownerDestinationScreenKey = (0, _linkPairs.getDestinationScreenKeyFromPairKey)(ownerPairKey);
34
+ return previousDestinationScreenKey !== "" && ownerDestinationScreenKey !== "" && previousDestinationScreenKey !== previousSourceScreenKey && ownerDestinationScreenKey === previousSourceScreenKey && hostScreenKey === previousSourceScreenKey;
35
+ };
36
+ const canSwitchBoundaryLocalHandoffImmediately = ({
37
+ hostScreenKey,
38
+ ownerPairKey,
39
+ previousOwnerPairKey
40
+ }) => {
41
+ "worklet";
42
+
43
+ if (!hostScreenKey || !ownerPairKey) {
44
+ return false;
45
+ }
46
+ if (hostScreenKey === (0, _linkPairs.getSourceScreenKeyFromPairKey)(ownerPairKey)) {
47
+ return true;
48
+ }
49
+ if (!previousOwnerPairKey) {
50
+ return false;
51
+ }
52
+ return isReturningToPreviousSourceHost({
53
+ hostScreenKey,
54
+ ownerPairKey,
55
+ previousOwnerPairKey
56
+ });
57
+ };
58
+ exports.canSwitchBoundaryLocalHandoffImmediately = canSwitchBoundaryLocalHandoffImmediately;
59
+ const isActiveHandoffLink = ({
60
+ link,
61
+ linkKey,
62
+ pairKey,
63
+ pairsState
64
+ }) => {
65
+ "worklet";
66
+
67
+ if (!link.group) {
68
+ return true;
69
+ }
70
+ const activeId = pairsState[pairKey]?.groups?.[link.group]?.activeId;
71
+ return !activeId || activeId === linkKey;
72
+ };
73
+ const resolveBoundaryLocalStyleOwnerScreenKey = ({
74
+ hostScreenKey,
75
+ isSettledHostReady,
76
+ settledHostScreenKey,
77
+ sourceScreenKey
78
+ }) => {
79
+ "worklet";
80
+
81
+ if (settledHostScreenKey === hostScreenKey && isSettledHostReady) {
82
+ return hostScreenKey;
83
+ }
84
+ return sourceScreenKey;
85
+ };
86
+ const pendingSignal = sourcePairKey => {
87
+ "worklet";
88
+
89
+ return {
90
+ hostScreenKey: null,
91
+ ownerPairKey: sourcePairKey,
92
+ ownerScreenKey: null,
93
+ status: "pending"
94
+ };
95
+ };
96
+ const clearSignal = sourcePairKey => {
97
+ "worklet";
98
+
99
+ return {
100
+ hostScreenKey: null,
101
+ ownerPairKey: sourcePairKey,
102
+ ownerScreenKey: null,
103
+ status: "clear"
104
+ };
105
+ };
106
+ const resolveBoundaryPortalOwnership = ({
107
+ boundaryId,
108
+ currentScreenKey,
109
+ escapeClipping,
110
+ handoff,
111
+ isSettledHostClosingComplete = false,
112
+ isSettledHostReady = false,
113
+ pairsState,
114
+ settledHostScreenKey = null,
115
+ sourcePairKey
116
+ }) => {
117
+ "worklet";
118
+
119
+ const linkKey = (0, _linkPairs.getLinkKeyFromTag)(boundaryId);
120
+ const link = (0, _linkPairs.getLink)(pairsState, sourcePairKey, linkKey);
121
+ if (link?.status !== "complete") {
122
+ return pendingSignal(sourcePairKey);
123
+ }
124
+ if (!isActiveHandoffLink({
125
+ link,
126
+ linkKey,
127
+ pairKey: sourcePairKey,
128
+ pairsState
129
+ })) {
130
+ return clearSignal(sourcePairKey);
131
+ }
132
+ if (!handoff) {
133
+ return {
134
+ hostScreenKey: currentScreenKey,
135
+ ownerPairKey: sourcePairKey,
136
+ ownerScreenKey: currentScreenKey,
137
+ status: "complete"
138
+ };
139
+ }
140
+ let hostScreenKey = link.destination.screenKey;
141
+ let ownerPairKey = sourcePairKey;
142
+ let previousOwnerPairKey = null;
143
+ const seenScreenKeys = [(0, _linkPairs.getSourceScreenKeyFromPairKey)(sourcePairKey), hostScreenKey];
144
+ const pairKeys = Object.keys(pairsState);
145
+ for (let hop = 0; hop < pairKeys.length; hop++) {
146
+ let didAdvance = false;
147
+ let hasPendingNextHop = false;
148
+ let didHitVisitedScreen = false;
149
+ for (let index = 0; index < pairKeys.length; index++) {
150
+ const candidatePairKey = pairKeys[index];
151
+ if (!candidatePairKey || candidatePairKey === ownerPairKey) {
152
+ continue;
153
+ }
154
+ const candidate = (0, _linkPairs.getLink)(pairsState, candidatePairKey, linkKey);
155
+ if (!candidate?.source || candidate.source.screenKey !== hostScreenKey) {
156
+ continue;
157
+ }
158
+ if (!candidate.source.handoff) {
159
+ continue;
160
+ }
161
+ if (!isActiveHandoffLink({
162
+ link: candidate,
163
+ linkKey,
164
+ pairKey: candidatePairKey,
165
+ pairsState
166
+ })) {
167
+ continue;
168
+ }
169
+ if (candidate.status !== "complete") {
170
+ hasPendingNextHop = true;
171
+ continue;
172
+ }
173
+ const nextHostScreenKey = candidate.destination.screenKey;
174
+ previousOwnerPairKey = ownerPairKey;
175
+ ownerPairKey = candidatePairKey;
176
+ hostScreenKey = nextHostScreenKey;
177
+ if (hasSeenScreenKey(seenScreenKeys, nextHostScreenKey)) {
178
+ didHitVisitedScreen = true;
179
+ break;
180
+ }
181
+ seenScreenKeys.push(nextHostScreenKey);
182
+ didAdvance = true;
183
+ break;
184
+ }
185
+ if (didHitVisitedScreen) {
186
+ break;
187
+ }
188
+ if (didAdvance) {
189
+ continue;
190
+ }
191
+ if (hasPendingNextHop) {
192
+ return pendingSignal(ownerPairKey);
193
+ }
194
+ break;
195
+ }
196
+ const ownerLink = (0, _linkPairs.getLink)(pairsState, ownerPairKey, linkKey);
197
+ const ownerUsesEscapeClipping = ownerLink?.source?.escapeClipping ?? escapeClipping;
198
+ if (!ownerUsesEscapeClipping && isSettledHostClosingComplete && settledHostScreenKey === hostScreenKey && previousOwnerPairKey) {
199
+ hostScreenKey = (0, _linkPairs.getSourceScreenKeyFromPairKey)(ownerPairKey);
200
+ }
201
+ const ownerScreenKey = ownerUsesEscapeClipping ? (0, _linkPairs.getSourceScreenKeyFromPairKey)(ownerPairKey) : resolveBoundaryLocalStyleOwnerScreenKey({
202
+ hostScreenKey,
203
+ isSettledHostReady,
204
+ settledHostScreenKey,
205
+ sourceScreenKey: (0, _linkPairs.getSourceScreenKeyFromPairKey)(ownerPairKey)
206
+ });
207
+ return {
208
+ hostScreenKey,
209
+ ownerPairKey,
210
+ ownerScreenKey,
211
+ status: "complete"
212
+ };
213
+ };
214
+ exports.resolveBoundaryPortalOwnership = resolveBoundaryPortalOwnership;
215
+ const hasHandoffEscapeContinuation = ({
216
+ linkKey,
217
+ linkState,
218
+ sourceScreenKey
219
+ }) => {
220
+ "worklet";
221
+
222
+ const pairKeys = Object.keys(linkState);
223
+ const visitedScreenKeys = [];
224
+ let cursorScreenKey = sourceScreenKey;
225
+ for (let hop = 0; hop < pairKeys.length; hop++) {
226
+ if (hasSeenScreenKey(visitedScreenKeys, cursorScreenKey)) {
227
+ return false;
228
+ }
229
+ visitedScreenKeys.push(cursorScreenKey);
230
+ let previousScreenKey = null;
231
+ for (let index = 0; index < pairKeys.length; index++) {
232
+ const candidatePairKey = pairKeys[index];
233
+ const link = candidatePairKey ? linkState[candidatePairKey]?.links?.[linkKey] : null;
234
+ if (!link?.source || !link.destination || link.destination.screenKey !== cursorScreenKey) {
235
+ continue;
236
+ }
237
+ if (usesEscapeClippingHost(link)) {
238
+ return true;
239
+ }
240
+ if (!link.source.handoff) {
241
+ return false;
242
+ }
243
+ previousScreenKey = link.source.screenKey;
244
+ break;
245
+ }
246
+ if (!previousScreenKey) {
247
+ return false;
248
+ }
249
+ cursorScreenKey = previousScreenKey;
250
+ }
251
+ return false;
252
+ };
253
+ exports.hasHandoffEscapeContinuation = hasHandoffEscapeContinuation;
254
+ //# sourceMappingURL=ownership.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_linkPairs","require","hasSeenScreenKey","screenKeys","screenKey","index","length","usesEscapeClippingHost","link","source","handoff","escapeClipping","exports","isReturningToPreviousSourceHost","hostScreenKey","ownerPairKey","previousOwnerPairKey","previousSourceScreenKey","getSourceScreenKeyFromPairKey","previousDestinationScreenKey","getDestinationScreenKeyFromPairKey","ownerDestinationScreenKey","canSwitchBoundaryLocalHandoffImmediately","isActiveHandoffLink","linkKey","pairKey","pairsState","group","activeId","groups","resolveBoundaryLocalStyleOwnerScreenKey","isSettledHostReady","settledHostScreenKey","sourceScreenKey","pendingSignal","sourcePairKey","ownerScreenKey","status","clearSignal","resolveBoundaryPortalOwnership","boundaryId","currentScreenKey","isSettledHostClosingComplete","getLinkKeyFromTag","getPairLink","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,IAAAA,UAAA,GAAAC,OAAA;AA4BA,MAAMC,gBAAgB,G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AgB,GAAGP,QAAQ,CAAC1C,KAAK,CAAC;MACxC,MAAMG,IAAI,GAAG8C,gBAAgB,GAC1BO,SAAS,CAACP,gBAAgB,CAAC,EAAEW,KAAK,GAAGzC,OAAO,CAAC,GAC7C,IAAI;MAEP,IACC,CAAChB,IAAI,EAAEC,MAAM,IACb,CAACD,IAAI,CAACqC,WAAW,IACjBrC,IAAI,CAACqC,WAAW,CAACzC,SAAS,KAAK2D,eAAe,EAC7C;QACD;MACD;MAEA,IAAIxD,sBAAsB,CAACC,IAAI,CAAC,EAAE;QACjC,OAAO,IAAI;MACZ;MAEA,IAAI,CAACA,IAAI,CAACC,MAAM,CAACC,OAAO,EAAE;QACzB,OAAO,KAAK;MACb;MAEAsD,iBAAiB,GAAGxD,IAAI,CAACC,MAAM,CAACL,SAAS;MACzC;IACD;IAEA,IAAI,CAAC4D,iBAAiB,EAAE;MACvB,OAAO,KAAK;IACb;IAEAD,eAAe,GAAGC,iBAAiB;EACpC;EAEA,OAAO,KAAK;AACb,CAAC;AAACpD,OAAA,CAAAgD,4BAAA,GAAAA,4BAAA","ignoreList":[]}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.resolveBoundaryPortal = void 0;
7
+ var _logger = require("../../../../utils/logger");
8
+ var _teleport = require("../teleport");
9
+ const resolveBoundaryPortal = ({
10
+ handoff,
11
+ escapeClipping
12
+ }) => {
13
+ const resolvedHandoff = handoff ?? false;
14
+ const resolvedEscapeClipping = escapeClipping ?? false;
15
+ const enabled = resolvedHandoff || resolvedEscapeClipping;
16
+ if (!enabled) {
17
+ return {
18
+ handoff: false,
19
+ escapeClipping: false,
20
+ enabled: false
21
+ };
22
+ }
23
+ if (!_teleport.isTeleportAvailable) {
24
+ _logger.logger.warnOnce("boundary:teleport-missing", "react-native-teleport is not installed; handoff and escapeClipping boundaries will render inline.");
25
+ return {
26
+ handoff: false,
27
+ escapeClipping: false,
28
+ enabled: false
29
+ };
30
+ }
31
+ return {
32
+ handoff: resolvedHandoff,
33
+ escapeClipping: resolvedEscapeClipping,
34
+ enabled
35
+ };
36
+ };
37
+ exports.resolveBoundaryPortal = resolveBoundaryPortal;
38
+ //# sourceMappingURL=resolve-portal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_logger","require","_teleport","resolveBoundaryPortal","handoff","escapeClipping","resolvedHandoff","resolvedEscapeClipping","enabled","isTeleportAvailable","logger","warnOnce","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/resolve-portal.ts"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAaO,MAAME,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,CAACC,6BAAmB,EAAE;IACzBC,cAAM,CAACC,QAAQ,CACd,2BAA2B,EAC3B,mGACD,CAAC;IAED,OAAO;MACNP,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;AAACI,OAAA,CAAAT,qBAAA,GAAAA,qBAAA","ignoreList":[]}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.shallowEqual = void 0;
7
+ /**
8
+ * Shallow equality for the flat signal objects produced by the portal
9
+ * `useAnimatedReaction` blocks. Both sides always carry the same fixed key set,
10
+ * so iterating one side's keys is sufficient. A `null`/`undefined` operand
11
+ * (the first reaction run) is treated as not-equal so the reaction proceeds.
12
+ */
13
+ const shallowEqual = (a, b) => {
14
+ "worklet";
15
+
16
+ if (!a || !b) {
17
+ return false;
18
+ }
19
+ const keys = Object.keys(a);
20
+ for (let index = 0; index < keys.length; index++) {
21
+ const key = keys[index];
22
+ if (a[key] !== b[key]) {
23
+ return false;
24
+ }
25
+ }
26
+ return true;
27
+ };
28
+ exports.shallowEqual = shallowEqual;
29
+ //# sourceMappingURL=shallow-equal.js.map