react-native-screen-transitions 3.9.0-alpha.2 → 3.9.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (475) hide show
  1. package/lib/commonjs/shared/components/boundary/components/boundary-target.js +14 -9
  2. package/lib/commonjs/shared/components/boundary/components/boundary-target.js.map +1 -1
  3. package/lib/commonjs/shared/components/boundary/create-boundary-component.js +66 -28
  4. package/lib/commonjs/shared/components/boundary/create-boundary-component.js.map +1 -1
  5. package/lib/commonjs/shared/components/boundary/hooks/{use-boundary-presence.js → lifecycles/use-boundary-presence.js} +8 -4
  6. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-boundary-presence.js.map +1 -0
  7. package/lib/commonjs/shared/components/boundary/hooks/{use-initial-destination-measurement.js → lifecycles/use-initial-destination-measurement.js} +27 -10
  8. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -0
  9. package/lib/commonjs/shared/components/boundary/hooks/{use-initial-source-measurement.js → lifecycles/use-initial-source-measurement.js} +5 -7
  10. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js.map +1 -0
  11. package/lib/commonjs/shared/components/boundary/hooks/{use-refresh-boundary.js → lifecycles/use-refresh-boundary.js} +4 -4
  12. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -0
  13. package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js +14 -35
  14. package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
  15. package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js +5 -6
  16. package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js.map +1 -1
  17. package/lib/commonjs/shared/components/boundary/index.js +26 -29
  18. package/lib/commonjs/shared/components/boundary/index.js.map +1 -1
  19. package/lib/commonjs/shared/components/boundary/portal/components/boundary-local-portal-host.js +58 -0
  20. package/lib/commonjs/shared/components/boundary/portal/components/boundary-local-portal-host.js.map +1 -0
  21. package/lib/commonjs/shared/components/boundary/portal/components/host.js +20 -4
  22. package/lib/commonjs/shared/components/boundary/portal/components/host.js.map +1 -1
  23. package/lib/commonjs/shared/components/boundary/portal/components/portal-boundary-host.js +78 -27
  24. package/lib/commonjs/shared/components/boundary/portal/components/portal-boundary-host.js.map +1 -1
  25. package/lib/commonjs/shared/components/boundary/portal/components/portal.js +195 -121
  26. package/lib/commonjs/shared/components/boundary/portal/components/portal.js.map +1 -1
  27. package/lib/commonjs/shared/components/boundary/portal/hooks/use-host-measurement.js +14 -2
  28. package/lib/commonjs/shared/components/boundary/portal/hooks/use-host-measurement.js.map +1 -1
  29. package/lib/commonjs/shared/components/boundary/portal/hooks/use-placeholder-styles.js +57 -0
  30. package/lib/commonjs/shared/components/boundary/portal/hooks/use-placeholder-styles.js.map +1 -0
  31. package/lib/commonjs/shared/components/boundary/portal/stores/host-registry.store.js +5 -44
  32. package/lib/commonjs/shared/components/boundary/portal/stores/host-registry.store.js.map +1 -1
  33. package/lib/commonjs/shared/components/boundary/portal/stores/portal-boundary-host.store.js +37 -5
  34. package/lib/commonjs/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map +1 -1
  35. package/lib/commonjs/shared/components/boundary/portal/teleport.js +15 -2
  36. package/lib/commonjs/shared/components/boundary/portal/teleport.js.map +1 -1
  37. package/lib/commonjs/shared/components/boundary/portal/utils/has-local-slot.js +18 -0
  38. package/lib/commonjs/shared/components/boundary/portal/utils/has-local-slot.js.map +1 -0
  39. package/lib/commonjs/shared/components/boundary/portal/utils/naming.js +10 -3
  40. package/lib/commonjs/shared/components/boundary/portal/utils/naming.js.map +1 -1
  41. package/lib/commonjs/shared/components/boundary/portal/utils/offset-style.js +28 -48
  42. package/lib/commonjs/shared/components/boundary/portal/utils/offset-style.js.map +1 -1
  43. package/lib/commonjs/shared/components/boundary/portal/utils/ownership.js +254 -0
  44. package/lib/commonjs/shared/components/boundary/portal/utils/ownership.js.map +1 -0
  45. package/lib/commonjs/shared/components/boundary/portal/utils/resolve-portal.js +38 -0
  46. package/lib/commonjs/shared/components/boundary/portal/utils/resolve-portal.js.map +1 -0
  47. package/lib/commonjs/shared/components/boundary/portal/utils/shallow-equal.js +29 -0
  48. package/lib/commonjs/shared/components/boundary/portal/utils/shallow-equal.js.map +1 -0
  49. package/lib/commonjs/shared/components/boundary/portal/utils/teleport-control.js +10 -1
  50. package/lib/commonjs/shared/components/boundary/portal/utils/teleport-control.js.map +1 -1
  51. package/lib/commonjs/shared/components/boundary/portal/utils/visible-host.js +25 -0
  52. package/lib/commonjs/shared/components/boundary/portal/utils/visible-host.js.map +1 -0
  53. package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js +6 -7
  54. package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
  55. package/lib/commonjs/shared/components/boundary/utils/destination-signals.js +1 -22
  56. package/lib/commonjs/shared/components/boundary/utils/destination-signals.js.map +1 -1
  57. package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js +0 -21
  58. package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js.map +1 -1
  59. package/lib/commonjs/shared/components/boundary/utils/source-signals.js +4 -9
  60. package/lib/commonjs/shared/components/boundary/utils/source-signals.js.map +1 -1
  61. package/lib/commonjs/shared/components/masked-view.js +5 -0
  62. package/lib/commonjs/shared/components/masked-view.js.map +1 -1
  63. package/lib/commonjs/shared/components/screen-container/layers/backdrop.js +18 -8
  64. package/lib/commonjs/shared/components/screen-container/layers/backdrop.js.map +1 -1
  65. package/lib/commonjs/shared/components/screen-container/layers/content.js +34 -16
  66. package/lib/commonjs/shared/components/screen-container/layers/content.js.map +1 -1
  67. package/lib/commonjs/shared/components/screen-container/layers/render-component.js +10 -0
  68. package/lib/commonjs/shared/components/screen-container/layers/render-component.js.map +1 -0
  69. package/lib/commonjs/shared/components/screen-container/layers/surface-container.js +5 -3
  70. package/lib/commonjs/shared/components/screen-container/layers/surface-container.js.map +1 -1
  71. package/lib/commonjs/shared/index.js +4 -0
  72. package/lib/commonjs/shared/index.js.map +1 -1
  73. package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js +6 -3
  74. package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
  75. package/lib/commonjs/shared/providers/register-bounds.provider.js +6 -0
  76. package/lib/commonjs/shared/providers/register-bounds.provider.js.map +1 -1
  77. package/lib/commonjs/shared/providers/screen/animation/helpers/derivations.js +1 -0
  78. package/lib/commonjs/shared/providers/screen/animation/helpers/derivations.js.map +1 -1
  79. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +1 -0
  80. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  81. package/lib/commonjs/shared/providers/screen/styles/helpers/compose-slot-style.js +95 -0
  82. package/lib/commonjs/shared/providers/screen/styles/helpers/compose-slot-style.js.map +1 -0
  83. package/lib/commonjs/shared/providers/screen/styles/helpers/normalize-slots.js +30 -9
  84. package/lib/commonjs/shared/providers/screen/styles/helpers/normalize-slots.js.map +1 -1
  85. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js +9 -3
  86. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js.map +1 -1
  87. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js +2 -0
  88. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js.map +1 -1
  89. package/lib/commonjs/shared/providers/screen/styles/hooks/slot-resolvers.js +96 -0
  90. package/lib/commonjs/shared/providers/screen/styles/hooks/slot-resolvers.js.map +1 -0
  91. package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +16 -3
  92. package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
  93. package/lib/commonjs/shared/providers/screen/styles/index.js +16 -3
  94. package/lib/commonjs/shared/providers/screen/styles/index.js.map +1 -1
  95. package/lib/commonjs/shared/providers/screen/styles/slot.provider.js +22 -51
  96. package/lib/commonjs/shared/providers/screen/styles/slot.provider.js.map +1 -1
  97. package/lib/commonjs/shared/providers/screen/styles/stores/slot-references.store.js +53 -0
  98. package/lib/commonjs/shared/providers/screen/styles/stores/slot-references.store.js.map +1 -0
  99. package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js +22 -2
  100. package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -1
  101. package/lib/commonjs/shared/stores/bounds/internals/entries.js +11 -4
  102. package/lib/commonjs/shared/stores/bounds/internals/entries.js.map +1 -1
  103. package/lib/commonjs/shared/stores/bounds/internals/links.js +134 -51
  104. package/lib/commonjs/shared/stores/bounds/internals/links.js.map +1 -1
  105. package/lib/commonjs/shared/stores/bounds/internals/resolver.js +1 -3
  106. package/lib/commonjs/shared/stores/bounds/internals/resolver.js.map +1 -1
  107. package/lib/commonjs/shared/stores/system.store.js +5 -0
  108. package/lib/commonjs/shared/stores/system.store.js.map +1 -1
  109. package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js +10 -69
  110. package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
  111. package/lib/commonjs/shared/utils/bounds/helpers/styles/local-transform.js +59 -0
  112. package/lib/commonjs/shared/utils/bounds/helpers/styles/local-transform.js.map +1 -0
  113. package/lib/module/shared/components/boundary/components/boundary-target.js +12 -7
  114. package/lib/module/shared/components/boundary/components/boundary-target.js.map +1 -1
  115. package/lib/module/shared/components/boundary/create-boundary-component.js +67 -29
  116. package/lib/module/shared/components/boundary/create-boundary-component.js.map +1 -1
  117. package/lib/module/shared/components/boundary/hooks/{use-boundary-presence.js → lifecycles/use-boundary-presence.js} +8 -4
  118. package/lib/module/shared/components/boundary/hooks/lifecycles/use-boundary-presence.js.map +1 -0
  119. package/lib/module/shared/components/boundary/hooks/{use-initial-destination-measurement.js → lifecycles/use-initial-destination-measurement.js} +27 -10
  120. package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -0
  121. package/lib/module/shared/components/boundary/hooks/{use-initial-source-measurement.js → lifecycles/use-initial-source-measurement.js} +5 -7
  122. package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js.map +1 -0
  123. package/lib/module/shared/components/boundary/hooks/{use-refresh-boundary.js → lifecycles/use-refresh-boundary.js} +4 -4
  124. package/lib/module/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -0
  125. package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js +15 -36
  126. package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
  127. package/lib/module/shared/components/boundary/hooks/use-measurer.js +5 -6
  128. package/lib/module/shared/components/boundary/hooks/use-measurer.js.map +1 -1
  129. package/lib/module/shared/components/boundary/index.js +26 -29
  130. package/lib/module/shared/components/boundary/index.js.map +1 -1
  131. package/lib/module/shared/components/boundary/portal/components/boundary-local-portal-host.js +53 -0
  132. package/lib/module/shared/components/boundary/portal/components/boundary-local-portal-host.js.map +1 -0
  133. package/lib/module/shared/components/boundary/portal/components/host.js +21 -5
  134. package/lib/module/shared/components/boundary/portal/components/host.js.map +1 -1
  135. package/lib/module/shared/components/boundary/portal/components/portal-boundary-host.js +79 -28
  136. package/lib/module/shared/components/boundary/portal/components/portal-boundary-host.js.map +1 -1
  137. package/lib/module/shared/components/boundary/portal/components/portal.js +201 -127
  138. package/lib/module/shared/components/boundary/portal/components/portal.js.map +1 -1
  139. package/lib/module/shared/components/boundary/portal/hooks/use-host-measurement.js +15 -3
  140. package/lib/module/shared/components/boundary/portal/hooks/use-host-measurement.js.map +1 -1
  141. package/lib/module/shared/components/boundary/portal/hooks/use-placeholder-styles.js +52 -0
  142. package/lib/module/shared/components/boundary/portal/hooks/use-placeholder-styles.js.map +1 -0
  143. package/lib/module/shared/components/boundary/portal/stores/host-registry.store.js +4 -41
  144. package/lib/module/shared/components/boundary/portal/stores/host-registry.store.js.map +1 -1
  145. package/lib/module/shared/components/boundary/portal/stores/portal-boundary-host.store.js +35 -4
  146. package/lib/module/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map +1 -1
  147. package/lib/module/shared/components/boundary/portal/teleport.js +16 -2
  148. package/lib/module/shared/components/boundary/portal/teleport.js.map +1 -1
  149. package/lib/module/shared/components/boundary/portal/utils/has-local-slot.js +13 -0
  150. package/lib/module/shared/components/boundary/portal/utils/has-local-slot.js.map +1 -0
  151. package/lib/module/shared/components/boundary/portal/utils/naming.js +8 -2
  152. package/lib/module/shared/components/boundary/portal/utils/naming.js.map +1 -1
  153. package/lib/module/shared/components/boundary/portal/utils/offset-style.js +29 -48
  154. package/lib/module/shared/components/boundary/portal/utils/offset-style.js.map +1 -1
  155. package/lib/module/shared/components/boundary/portal/utils/ownership.js +246 -0
  156. package/lib/module/shared/components/boundary/portal/utils/ownership.js.map +1 -0
  157. package/lib/module/shared/components/boundary/portal/utils/resolve-portal.js +33 -0
  158. package/lib/module/shared/components/boundary/portal/utils/resolve-portal.js.map +1 -0
  159. package/lib/module/shared/components/boundary/portal/utils/shallow-equal.js +24 -0
  160. package/lib/module/shared/components/boundary/portal/utils/shallow-equal.js.map +1 -0
  161. package/lib/module/shared/components/boundary/portal/utils/teleport-control.js +8 -0
  162. package/lib/module/shared/components/boundary/portal/utils/teleport-control.js.map +1 -1
  163. package/lib/module/shared/components/boundary/portal/utils/visible-host.js +20 -0
  164. package/lib/module/shared/components/boundary/portal/utils/visible-host.js.map +1 -0
  165. package/lib/module/shared/components/boundary/providers/boundary-root.provider.js +6 -7
  166. package/lib/module/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
  167. package/lib/module/shared/components/boundary/utils/destination-signals.js +2 -23
  168. package/lib/module/shared/components/boundary/utils/destination-signals.js.map +1 -1
  169. package/lib/module/shared/components/boundary/utils/refresh-signals.js +0 -21
  170. package/lib/module/shared/components/boundary/utils/refresh-signals.js.map +1 -1
  171. package/lib/module/shared/components/boundary/utils/source-signals.js +4 -9
  172. package/lib/module/shared/components/boundary/utils/source-signals.js.map +1 -1
  173. package/lib/module/shared/components/masked-view.js +5 -0
  174. package/lib/module/shared/components/masked-view.js.map +1 -1
  175. package/lib/module/shared/components/screen-container/layers/backdrop.js +19 -9
  176. package/lib/module/shared/components/screen-container/layers/backdrop.js.map +1 -1
  177. package/lib/module/shared/components/screen-container/layers/content.js +35 -17
  178. package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
  179. package/lib/module/shared/components/screen-container/layers/render-component.js +6 -0
  180. package/lib/module/shared/components/screen-container/layers/render-component.js.map +1 -0
  181. package/lib/module/shared/components/screen-container/layers/surface-container.js +5 -3
  182. package/lib/module/shared/components/screen-container/layers/surface-container.js.map +1 -1
  183. package/lib/module/shared/index.js +4 -0
  184. package/lib/module/shared/index.js.map +1 -1
  185. package/lib/module/shared/providers/helpers/measured-bounds-writes.js +6 -3
  186. package/lib/module/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
  187. package/lib/module/shared/providers/register-bounds.provider.js +6 -0
  188. package/lib/module/shared/providers/register-bounds.provider.js.map +1 -1
  189. package/lib/module/shared/providers/screen/animation/helpers/derivations.js +1 -0
  190. package/lib/module/shared/providers/screen/animation/helpers/derivations.js.map +1 -1
  191. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +1 -0
  192. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  193. package/lib/module/shared/providers/screen/styles/helpers/compose-slot-style.js +89 -0
  194. package/lib/module/shared/providers/screen/styles/helpers/compose-slot-style.js.map +1 -0
  195. package/lib/module/shared/providers/screen/styles/helpers/normalize-slots.js +30 -9
  196. package/lib/module/shared/providers/screen/styles/helpers/normalize-slots.js.map +1 -1
  197. package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js +9 -3
  198. package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js.map +1 -1
  199. package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js +2 -0
  200. package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js.map +1 -1
  201. package/lib/module/shared/providers/screen/styles/hooks/slot-resolvers.js +87 -0
  202. package/lib/module/shared/providers/screen/styles/hooks/slot-resolvers.js.map +1 -0
  203. package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +16 -3
  204. package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
  205. package/lib/module/shared/providers/screen/styles/index.js +2 -1
  206. package/lib/module/shared/providers/screen/styles/index.js.map +1 -1
  207. package/lib/module/shared/providers/screen/styles/slot.provider.js +22 -47
  208. package/lib/module/shared/providers/screen/styles/slot.provider.js.map +1 -1
  209. package/lib/module/shared/providers/screen/styles/stores/slot-references.store.js +47 -0
  210. package/lib/module/shared/providers/screen/styles/stores/slot-references.store.js.map +1 -0
  211. package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js +19 -1
  212. package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -1
  213. package/lib/module/shared/stores/bounds/internals/entries.js +11 -4
  214. package/lib/module/shared/stores/bounds/internals/entries.js.map +1 -1
  215. package/lib/module/shared/stores/bounds/internals/links.js +135 -53
  216. package/lib/module/shared/stores/bounds/internals/links.js.map +1 -1
  217. package/lib/module/shared/stores/bounds/internals/resolver.js +1 -3
  218. package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -1
  219. package/lib/module/shared/stores/system.store.js +5 -0
  220. package/lib/module/shared/stores/system.store.js.map +1 -1
  221. package/lib/module/shared/types/animation.types.js.map +1 -1
  222. package/lib/module/shared/utils/bounds/helpers/styles/compute.js +10 -69
  223. package/lib/module/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
  224. package/lib/module/shared/utils/bounds/helpers/styles/local-transform.js +52 -0
  225. package/lib/module/shared/utils/bounds/helpers/styles/local-transform.js.map +1 -0
  226. package/lib/typescript/blank-stack/navigators/create-blank-stack-navigator.d.ts +1 -2
  227. package/lib/typescript/blank-stack/navigators/create-blank-stack-navigator.d.ts.map +1 -1
  228. package/lib/typescript/component-stack/components/component-screen.d.ts +1 -1
  229. package/lib/typescript/component-stack/components/component-screen.d.ts.map +1 -1
  230. package/lib/typescript/component-stack/navigators/create-component-stack-navigator.d.ts +1 -2
  231. package/lib/typescript/component-stack/navigators/create-component-stack-navigator.d.ts.map +1 -1
  232. package/lib/typescript/component-stack/types.d.ts +26 -0
  233. package/lib/typescript/component-stack/types.d.ts.map +1 -1
  234. package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts +1 -1
  235. package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts.map +1 -1
  236. package/lib/typescript/native-stack/views/NativeStackView.d.ts +1 -2
  237. package/lib/typescript/native-stack/views/NativeStackView.d.ts.map +1 -1
  238. package/lib/typescript/native-stack/views/useHeaderConfigProps.d.ts +2 -2
  239. package/lib/typescript/shared/adapters/with-screen-transitions/context.d.ts +1 -1
  240. package/lib/typescript/shared/adapters/with-screen-transitions/context.d.ts.map +1 -1
  241. package/lib/typescript/shared/adapters/with-screen-transitions/stack-layout.d.ts +1 -1
  242. package/lib/typescript/shared/adapters/with-screen-transitions/stack-layout.d.ts.map +1 -1
  243. package/lib/typescript/shared/components/activity/variants/activity-container.d.ts +1 -1
  244. package/lib/typescript/shared/components/activity/variants/activity-container.d.ts.map +1 -1
  245. package/lib/typescript/shared/components/activity/variants/activity-screen.d.ts +1 -1
  246. package/lib/typescript/shared/components/activity/variants/activity-screen.d.ts.map +1 -1
  247. package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts +1 -1
  248. package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts.map +1 -1
  249. package/lib/typescript/shared/components/boundary/create-boundary-component.d.ts +0 -1
  250. package/lib/typescript/shared/components/boundary/create-boundary-component.d.ts.map +1 -1
  251. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-boundary-presence.d.ts +11 -0
  252. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-boundary-presence.d.ts.map +1 -0
  253. package/lib/typescript/shared/components/boundary/hooks/{use-initial-destination-measurement.d.ts → lifecycles/use-initial-destination-measurement.d.ts} +2 -2
  254. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts.map +1 -0
  255. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.d.ts +8 -0
  256. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.d.ts.map +1 -0
  257. package/lib/typescript/shared/components/boundary/hooks/{use-refresh-boundary.d.ts → lifecycles/use-refresh-boundary.d.ts} +2 -2
  258. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.d.ts.map +1 -0
  259. package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts +5 -9
  260. package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts.map +1 -1
  261. package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts +4 -3
  262. package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts.map +1 -1
  263. package/lib/typescript/shared/components/boundary/index.d.ts +35 -24
  264. package/lib/typescript/shared/components/boundary/index.d.ts.map +1 -1
  265. package/lib/typescript/shared/components/boundary/portal/components/boundary-local-portal-host.d.ts +8 -0
  266. package/lib/typescript/shared/components/boundary/portal/components/boundary-local-portal-host.d.ts.map +1 -0
  267. package/lib/typescript/shared/components/boundary/portal/components/host.d.ts +2 -2
  268. package/lib/typescript/shared/components/boundary/portal/components/host.d.ts.map +1 -1
  269. package/lib/typescript/shared/components/boundary/portal/components/portal-boundary-host.d.ts +2 -2
  270. package/lib/typescript/shared/components/boundary/portal/components/portal-boundary-host.d.ts.map +1 -1
  271. package/lib/typescript/shared/components/boundary/portal/components/portal-provider.d.ts +1 -1
  272. package/lib/typescript/shared/components/boundary/portal/components/portal-provider.d.ts.map +1 -1
  273. package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts +4 -3
  274. package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts.map +1 -1
  275. package/lib/typescript/shared/components/boundary/portal/hooks/use-host-measurement.d.ts.map +1 -1
  276. package/lib/typescript/shared/components/boundary/portal/hooks/use-placeholder-styles.d.ts +17 -0
  277. package/lib/typescript/shared/components/boundary/portal/hooks/use-placeholder-styles.d.ts.map +1 -0
  278. package/lib/typescript/shared/components/boundary/portal/stores/host-registry.store.d.ts +0 -7
  279. package/lib/typescript/shared/components/boundary/portal/stores/host-registry.store.d.ts.map +1 -1
  280. package/lib/typescript/shared/components/boundary/portal/stores/portal-boundary-host.store.d.ts +16 -1
  281. package/lib/typescript/shared/components/boundary/portal/stores/portal-boundary-host.store.d.ts.map +1 -1
  282. package/lib/typescript/shared/components/boundary/portal/teleport.d.ts +1 -1
  283. package/lib/typescript/shared/components/boundary/portal/teleport.d.ts.map +1 -1
  284. package/lib/typescript/shared/components/boundary/portal/utils/has-local-slot.d.ts +3 -0
  285. package/lib/typescript/shared/components/boundary/portal/utils/has-local-slot.d.ts.map +1 -0
  286. package/lib/typescript/shared/components/boundary/portal/utils/naming.d.ts +2 -1
  287. package/lib/typescript/shared/components/boundary/portal/utils/naming.d.ts.map +1 -1
  288. package/lib/typescript/shared/components/boundary/portal/utils/offset-style.d.ts +23 -30
  289. package/lib/typescript/shared/components/boundary/portal/utils/offset-style.d.ts.map +1 -1
  290. package/lib/typescript/shared/components/boundary/portal/utils/ownership.d.ts +35 -0
  291. package/lib/typescript/shared/components/boundary/portal/utils/ownership.d.ts.map +1 -0
  292. package/lib/typescript/shared/components/boundary/portal/utils/resolve-portal.d.ts +12 -0
  293. package/lib/typescript/shared/components/boundary/portal/utils/resolve-portal.d.ts.map +1 -0
  294. package/lib/typescript/shared/components/boundary/portal/utils/shallow-equal.d.ts +8 -0
  295. package/lib/typescript/shared/components/boundary/portal/utils/shallow-equal.d.ts.map +1 -0
  296. package/lib/typescript/shared/components/boundary/portal/utils/teleport-control.d.ts +4 -0
  297. package/lib/typescript/shared/components/boundary/portal/utils/teleport-control.d.ts.map +1 -1
  298. package/lib/typescript/shared/components/boundary/portal/utils/visible-host.d.ts +8 -0
  299. package/lib/typescript/shared/components/boundary/portal/utils/visible-host.d.ts.map +1 -0
  300. package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts +7 -12
  301. package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts.map +1 -1
  302. package/lib/typescript/shared/components/boundary/types.d.ts +9 -36
  303. package/lib/typescript/shared/components/boundary/types.d.ts.map +1 -1
  304. package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts.map +1 -1
  305. package/lib/typescript/shared/components/boundary/utils/refresh-signals.d.ts.map +1 -1
  306. package/lib/typescript/shared/components/boundary/utils/source-signals.d.ts +0 -1
  307. package/lib/typescript/shared/components/boundary/utils/source-signals.d.ts.map +1 -1
  308. package/lib/typescript/shared/components/create-transition-aware-component.d.ts +6 -5
  309. package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -1
  310. package/lib/typescript/shared/components/masked-view.d.ts +5 -1
  311. package/lib/typescript/shared/components/masked-view.d.ts.map +1 -1
  312. package/lib/typescript/shared/components/overlay/variations/float-overlay.d.ts +1 -1
  313. package/lib/typescript/shared/components/overlay/variations/float-overlay.d.ts.map +1 -1
  314. package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts +1 -1
  315. package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts.map +1 -1
  316. package/lib/typescript/shared/components/scene-view.d.ts +1 -1
  317. package/lib/typescript/shared/components/scene-view.d.ts.map +1 -1
  318. package/lib/typescript/shared/components/screen-container/index.d.ts +1 -1
  319. package/lib/typescript/shared/components/screen-container/index.d.ts.map +1 -1
  320. package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts +1 -1
  321. package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -1
  322. package/lib/typescript/shared/components/screen-container/layers/content.d.ts +1 -1
  323. package/lib/typescript/shared/components/screen-container/layers/content.d.ts.map +1 -1
  324. package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts +1 -1
  325. package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts.map +1 -1
  326. package/lib/typescript/shared/components/screen-container/layers/render-component.d.ts +3 -0
  327. package/lib/typescript/shared/components/screen-container/layers/render-component.d.ts.map +1 -0
  328. package/lib/typescript/shared/components/screen-container/layers/surface-container.d.ts +1 -1
  329. package/lib/typescript/shared/components/screen-container/layers/surface-container.d.ts.map +1 -1
  330. package/lib/typescript/shared/hooks/navigation/use-stack.d.ts +1 -1
  331. package/lib/typescript/shared/hooks/navigation/use-stack.d.ts.map +1 -1
  332. package/lib/typescript/shared/index.d.ts +731 -683
  333. package/lib/typescript/shared/index.d.ts.map +1 -1
  334. package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts +3 -3
  335. package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts.map +1 -1
  336. package/lib/typescript/shared/providers/register-bounds.provider.d.ts.map +1 -1
  337. package/lib/typescript/shared/providers/screen/animation/helpers/derivations.d.ts +1 -0
  338. package/lib/typescript/shared/providers/screen/animation/helpers/derivations.d.ts.map +1 -1
  339. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
  340. package/lib/typescript/shared/providers/screen/descriptors/descriptors.provider.d.ts +1 -1
  341. package/lib/typescript/shared/providers/screen/descriptors/descriptors.provider.d.ts.map +1 -1
  342. package/lib/typescript/shared/providers/screen/screen-composer.d.ts +1 -1
  343. package/lib/typescript/shared/providers/screen/screen-composer.d.ts.map +1 -1
  344. package/lib/typescript/shared/providers/screen/styles/components/floating-overlay-layer.d.ts +1 -1
  345. package/lib/typescript/shared/providers/screen/styles/components/floating-overlay-layer.d.ts.map +1 -1
  346. package/lib/typescript/shared/providers/screen/styles/helpers/compose-slot-style.d.ts +4 -0
  347. package/lib/typescript/shared/providers/screen/styles/helpers/compose-slot-style.d.ts.map +1 -0
  348. package/lib/typescript/shared/providers/screen/styles/helpers/normalize-slots.d.ts.map +1 -1
  349. package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/index.d.ts.map +1 -1
  350. package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.d.ts +2 -1
  351. package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.d.ts.map +1 -1
  352. package/lib/typescript/shared/providers/screen/styles/hooks/slot-resolvers.d.ts +11 -0
  353. package/lib/typescript/shared/providers/screen/styles/hooks/slot-resolvers.d.ts.map +1 -0
  354. package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts +4 -1
  355. package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -1
  356. package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts +3 -3
  357. package/lib/typescript/shared/providers/screen/styles/index.d.ts +2 -1
  358. package/lib/typescript/shared/providers/screen/styles/index.d.ts.map +1 -1
  359. package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts +5 -10
  360. package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts.map +1 -1
  361. package/lib/typescript/shared/providers/screen/styles/stores/slot-references.store.d.ts +6 -0
  362. package/lib/typescript/shared/providers/screen/styles/stores/slot-references.store.d.ts.map +1 -0
  363. package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts +2 -0
  364. package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts.map +1 -1
  365. package/lib/typescript/shared/stores/bounds/internals/entries.d.ts.map +1 -1
  366. package/lib/typescript/shared/stores/bounds/internals/links.d.ts +4 -3
  367. package/lib/typescript/shared/stores/bounds/internals/links.d.ts.map +1 -1
  368. package/lib/typescript/shared/stores/bounds/internals/resolver.d.ts.map +1 -1
  369. package/lib/typescript/shared/stores/bounds/types.d.ts +9 -20
  370. package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
  371. package/lib/typescript/shared/stores/system.store.d.ts +1 -0
  372. package/lib/typescript/shared/stores/system.store.d.ts.map +1 -1
  373. package/lib/typescript/shared/types/animation.types.d.ts +7 -1
  374. package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
  375. package/lib/typescript/shared/types/index.d.ts +1 -1
  376. package/lib/typescript/shared/types/index.d.ts.map +1 -1
  377. package/lib/typescript/shared/types/screen.types.d.ts +99 -4
  378. package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
  379. package/lib/typescript/shared/utils/bounds/helpers/styles/compute.d.ts.map +1 -1
  380. package/lib/typescript/shared/utils/bounds/helpers/styles/local-transform.d.ts +6 -0
  381. package/lib/typescript/shared/utils/bounds/helpers/styles/local-transform.d.ts.map +1 -0
  382. package/lib/typescript/shared/utils/bounds/types/options.d.ts +2 -0
  383. package/lib/typescript/shared/utils/bounds/types/options.d.ts.map +1 -1
  384. package/package.json +1 -1
  385. package/src/component-stack/types.ts +26 -0
  386. package/src/shared/components/boundary/components/boundary-target.tsx +21 -7
  387. package/src/shared/components/boundary/create-boundary-component.tsx +92 -28
  388. package/src/shared/components/boundary/hooks/{use-boundary-presence.ts → lifecycles/use-boundary-presence.ts} +16 -5
  389. package/src/shared/components/boundary/hooks/{use-initial-destination-measurement.ts → lifecycles/use-initial-destination-measurement.ts} +40 -13
  390. package/src/shared/components/boundary/hooks/{use-initial-source-measurement.ts → lifecycles/use-initial-source-measurement.ts} +7 -9
  391. package/src/shared/components/boundary/hooks/{use-refresh-boundary.ts → lifecycles/use-refresh-boundary.ts} +6 -6
  392. package/src/shared/components/boundary/hooks/use-boundary-measurement.ts +15 -45
  393. package/src/shared/components/boundary/hooks/use-measurer.ts +9 -14
  394. package/src/shared/components/boundary/index.tsx +55 -29
  395. package/src/shared/components/boundary/portal/components/boundary-local-portal-host.tsx +66 -0
  396. package/src/shared/components/boundary/portal/components/host.tsx +20 -5
  397. package/src/shared/components/boundary/portal/components/portal-boundary-host.tsx +112 -46
  398. package/src/shared/components/boundary/portal/components/portal.tsx +263 -134
  399. package/src/shared/components/boundary/portal/hooks/use-host-measurement.ts +23 -2
  400. package/src/shared/components/boundary/portal/hooks/use-placeholder-styles.ts +55 -0
  401. package/src/shared/components/boundary/portal/stores/host-registry.store.ts +4 -51
  402. package/src/shared/components/boundary/portal/stores/portal-boundary-host.store.ts +59 -6
  403. package/src/shared/components/boundary/portal/teleport.ts +28 -3
  404. package/src/shared/components/boundary/portal/utils/has-local-slot.ts +16 -0
  405. package/src/shared/components/boundary/portal/utils/naming.ts +11 -1
  406. package/src/shared/components/boundary/portal/utils/offset-style.ts +42 -137
  407. package/src/shared/components/boundary/portal/utils/ownership.ts +371 -0
  408. package/src/shared/components/boundary/portal/utils/resolve-portal.ts +50 -0
  409. package/src/shared/components/boundary/portal/utils/shallow-equal.ts +25 -0
  410. package/src/shared/components/boundary/portal/utils/teleport-control.ts +12 -0
  411. package/src/shared/components/boundary/portal/utils/visible-host.ts +24 -0
  412. package/src/shared/components/boundary/providers/boundary-root.provider.tsx +9 -18
  413. package/src/shared/components/boundary/types.ts +9 -39
  414. package/src/shared/components/boundary/utils/destination-signals.ts +1 -32
  415. package/src/shared/components/boundary/utils/refresh-signals.ts +0 -41
  416. package/src/shared/components/boundary/utils/source-signals.ts +5 -17
  417. package/src/shared/components/masked-view.tsx +4 -0
  418. package/src/shared/components/screen-container/layers/backdrop.tsx +31 -10
  419. package/src/shared/components/screen-container/layers/content.tsx +61 -22
  420. package/src/shared/components/screen-container/layers/render-component.ts +9 -0
  421. package/src/shared/components/screen-container/layers/surface-container.tsx +5 -4
  422. package/src/shared/index.ts +9 -5
  423. package/src/shared/providers/helpers/measured-bounds-writes.ts +6 -11
  424. package/src/shared/providers/register-bounds.provider.tsx +5 -0
  425. package/src/shared/providers/screen/animation/helpers/derivations.ts +3 -0
  426. package/src/shared/providers/screen/animation/helpers/pipeline.ts +1 -0
  427. package/src/shared/providers/screen/styles/helpers/compose-slot-style.ts +129 -0
  428. package/src/shared/providers/screen/styles/helpers/normalize-slots.ts +45 -8
  429. package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/index.ts +14 -2
  430. package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.ts +3 -0
  431. package/src/shared/providers/screen/styles/hooks/slot-resolvers.tsx +111 -0
  432. package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +21 -3
  433. package/src/shared/providers/screen/styles/index.tsx +8 -3
  434. package/src/shared/providers/screen/styles/slot.provider.tsx +36 -54
  435. package/src/shared/providers/screen/styles/stores/slot-references.store.ts +71 -0
  436. package/src/shared/stores/bounds/helpers/link-pairs.helpers.ts +24 -1
  437. package/src/shared/stores/bounds/internals/entries.ts +13 -5
  438. package/src/shared/stores/bounds/internals/links.ts +167 -85
  439. package/src/shared/stores/bounds/internals/resolver.ts +0 -2
  440. package/src/shared/stores/bounds/types.ts +10 -22
  441. package/src/shared/stores/system.store.ts +6 -0
  442. package/src/shared/types/animation.types.ts +8 -1
  443. package/src/shared/types/index.ts +5 -0
  444. package/src/shared/types/screen.types.ts +111 -4
  445. package/src/shared/utils/bounds/helpers/styles/compute.ts +22 -124
  446. package/src/shared/utils/bounds/helpers/styles/local-transform.ts +86 -0
  447. package/src/shared/utils/bounds/types/options.ts +2 -0
  448. package/lib/commonjs/shared/components/boundary/hooks/use-boundary-presence.js.map +0 -1
  449. package/lib/commonjs/shared/components/boundary/hooks/use-initial-destination-measurement.js.map +0 -1
  450. package/lib/commonjs/shared/components/boundary/hooks/use-initial-source-measurement.js.map +0 -1
  451. package/lib/commonjs/shared/components/boundary/hooks/use-refresh-boundary.js.map +0 -1
  452. package/lib/commonjs/shared/components/boundary/portal/resolve-portal.js +0 -36
  453. package/lib/commonjs/shared/components/boundary/portal/resolve-portal.js.map +0 -1
  454. package/lib/commonjs/shared/components/boundary/portal/utils/attachment.js +0 -40
  455. package/lib/commonjs/shared/components/boundary/portal/utils/attachment.js.map +0 -1
  456. package/lib/module/shared/components/boundary/hooks/use-boundary-presence.js.map +0 -1
  457. package/lib/module/shared/components/boundary/hooks/use-initial-destination-measurement.js.map +0 -1
  458. package/lib/module/shared/components/boundary/hooks/use-initial-source-measurement.js.map +0 -1
  459. package/lib/module/shared/components/boundary/hooks/use-refresh-boundary.js.map +0 -1
  460. package/lib/module/shared/components/boundary/portal/resolve-portal.js +0 -31
  461. package/lib/module/shared/components/boundary/portal/resolve-portal.js.map +0 -1
  462. package/lib/module/shared/components/boundary/portal/utils/attachment.js +0 -35
  463. package/lib/module/shared/components/boundary/portal/utils/attachment.js.map +0 -1
  464. package/lib/typescript/shared/components/boundary/hooks/use-boundary-presence.d.ts +0 -9
  465. package/lib/typescript/shared/components/boundary/hooks/use-boundary-presence.d.ts.map +0 -1
  466. package/lib/typescript/shared/components/boundary/hooks/use-initial-destination-measurement.d.ts.map +0 -1
  467. package/lib/typescript/shared/components/boundary/hooks/use-initial-source-measurement.d.ts +0 -9
  468. package/lib/typescript/shared/components/boundary/hooks/use-initial-source-measurement.d.ts.map +0 -1
  469. package/lib/typescript/shared/components/boundary/hooks/use-refresh-boundary.d.ts.map +0 -1
  470. package/lib/typescript/shared/components/boundary/portal/resolve-portal.d.ts +0 -14
  471. package/lib/typescript/shared/components/boundary/portal/resolve-portal.d.ts.map +0 -1
  472. package/lib/typescript/shared/components/boundary/portal/utils/attachment.d.ts +0 -21
  473. package/lib/typescript/shared/components/boundary/portal/utils/attachment.d.ts.map +0 -1
  474. package/src/shared/components/boundary/portal/resolve-portal.ts +0 -40
  475. package/src/shared/components/boundary/portal/utils/attachment.ts +0 -48
@@ -1,19 +1,17 @@
1
1
  "use strict";
2
2
 
3
3
  import { useSyncExternalStore } from "react";
4
- import { makeMutable } from "react-native-reanimated";
5
4
  const EMPTY_SNAPSHOT = {};
6
5
  const listeners = new Set();
7
6
  const hostStacks = new Map();
8
7
  let snapshot = EMPTY_SNAPSHOT;
9
8
 
10
9
  /**
11
- * UI-readable mirror of each screen's active host, kept only for hosts that
12
- * capture scroll. Measurement worklets read it to record which scroll-scoped
13
- * host a source boundary originated from at measure time, without any React
14
- * subscription on the boundary itself.
10
+ * The active host for a screen. Stack ordering is the load-bearing invariant:
11
+ * `registerHost` unshifts fallback hosts to the front and pushes real hosts to
12
+ * the back, so the active host is the last real (non-fallback) host, falling
13
+ * back to the first entry and finally to the screen's own key.
15
14
  */
16
- const activeScrollHosts = makeMutable({});
17
15
  const getActiveHostFromStack = (screenKey, stack) => {
18
16
  if (!stack || stack.length === 0) {
19
17
  return screenKey;
@@ -33,23 +31,8 @@ const buildSnapshot = () => {
33
31
  }
34
32
  return nextSnapshot;
35
33
  };
36
- const buildScrollHostSnapshot = () => {
37
- const nextSnapshot = {};
38
- for (const [screenKey, stack] of hostStacks) {
39
- const activeHostKey = getActiveHostFromStack(screenKey, stack);
40
- const activeHost = stack.find(host => host.hostKey === activeHostKey);
41
- if (activeHost?.capturesScroll) {
42
- nextSnapshot[screenKey] = {
43
- hostKey: activeHost.hostKey,
44
- capturesScroll: true
45
- };
46
- }
47
- }
48
- return nextSnapshot;
49
- };
50
34
  const emit = () => {
51
35
  snapshot = buildSnapshot();
52
- activeScrollHosts.set(buildScrollHostSnapshot());
53
36
  for (const listener of listeners) {
54
37
  listener();
55
38
  }
@@ -95,32 +78,12 @@ export const unregisterHost = (screenKey, hostKey) => {
95
78
  export const getActiveHostKey = screenKey => {
96
79
  return snapshot[screenKey] ?? screenKey;
97
80
  };
98
-
99
- /**
100
- * The screen's active host, if it captures scroll. Worklet-safe: measurement
101
- * code calls this on the UI thread while writing source bounds.
102
- */
103
- export const getActiveScrollHost = screenKey => {
104
- "worklet";
105
-
106
- return activeScrollHosts.get()[screenKey] ?? null;
107
- };
108
- export const getHostCapturesScroll = hostKey => {
109
- for (const stack of hostStacks.values()) {
110
- const host = stack.find(registration => registration.hostKey === hostKey);
111
- if (host) {
112
- return host.capturesScroll;
113
- }
114
- }
115
- return false;
116
- };
117
81
  export const useActiveHostKey = screenKey => {
118
82
  return useSyncExternalStore(subscribe, () => screenKey ? getActiveHostKey(screenKey) : undefined, () => undefined);
119
83
  };
120
84
  export const resetHostRegistry = () => {
121
85
  hostStacks.clear();
122
86
  snapshot = EMPTY_SNAPSHOT;
123
- activeScrollHosts.set({});
124
87
  emit();
125
88
  };
126
89
  //# sourceMappingURL=host-registry.store.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useSyncExternalStore","makeMutable","EMPTY_SNAPSHOT","listeners","Set","hostStacks","Map","snapshot","activeScrollHosts","getActiveHostFromStack","screenKey","stack","length","index","host","fallback","hostKey","buildSnapshot","nextSnapshot","buildScrollHostSnapshot","activeHostKey","activeHost","find","capturesScroll","emit","set","listener","subscribe","add","delete","registerHost","registration","get","previousActiveHostKey","nextStack","filter","unshift","push","unregisterHost","getActiveHostKey","getActiveScrollHost","getHostCapturesScroll","values","useActiveHostKey","undefined","resetHostRegistry","clear"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/stores/host-registry.store.ts"],"mappings":";;AAAA,SAASA,oBAAoB,QAAQ,OAAO;AAC5C,SAASC,WAAW,QAAQ,yBAAyB;AAYrD,MAAMC,cAAoC,GAAG,CAAC,CAAC;AAE/C,MAAMC,SAAS,GAAG,IAAIC,GAAG,CAAa,CAAC;AACvC,MAAMC,UAAU,GAAG,IAAIC,GAAG,CAA6B,CAAC;AAExD,IAAIC,QAA8B,GAAGL,cAAc;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA,MAAMM,iBAAiB,GAAGP,WAAW,CAAgC,CAAC,CAAC,CAAC;AAExE,MAAMQ,sBAAsB,GAAGA,CAC9BC,SAAiB,EACjBC,KAAqC,KACjC;EACJ,IAAI,CAACA,KAAK,IAAIA,KAAK,CAACC,MAAM,KAAK,CAAC,EAAE;IACjC,OAAOF,SAAS;EACjB;EAEA,KAAK,IAAIG,KAAK,GAAGF,KAAK,CAACC,MAAM,GAAG,CAAC,EAAEC,KAAK,IAAI,CAAC,EAAEA,KAAK,EAAE,EAAE;IACvD,M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CAAC,CAAC;EACzBD,IAAI,CAAC,CAAC;AACP,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useSyncExternalStore","EMPTY_SNAPSHOT","listeners","Set","hostStacks","Map","snapshot","getActiveHostFromStack","screenKey","stack","length","index","host","fallback","hostKey","buildSnapshot","nextSnapshot","emit","listener","subscribe","add","delete","registerHost","registration","get","previousActiveHostKey","nextStack","filter","unshift","push","set","unregisterHost","getActiveHostKey","useActiveHostKey","undefined","resetHostRegistry","clear"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/stores/host-registry.store.ts"],"mappings":";;AAAA,SAASA,oBAAoB,QAAQ,OAAO;AAW5C,MAAMC,cAAoC,GAAG,CAAC,CAAC;AAE/C,MAAMC,SAAS,GAAG,IAAIC,GAAG,CAAa,CAAC;AACvC,MAAMC,UAAU,GAAG,IAAIC,GAAG,CAA6B,CAAC;AAExD,IAAIC,QAA8B,GAAGL,cAAc;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA,MAAMM,sBAAsB,GAAGA,CAC9BC,SAAiB,EACjBC,KAAqC,KACjC;EACJ,IAAI,CAACA,KAAK,IAAIA,KAAK,CAACC,MAAM,KAAK,CAAC,EAAE;IACjC,OAAOF,SAAS;EACjB;EAEA,KAAK,IAAIG,KAAK,GAAGF,KAAK,CAACC,MAAM,GAAG,CAAC,EAAEC,KAAK,IAAI,CAAC,EAAEA,KAAK,EAAE,EAAE;IACvD,MAAMC,IAAI,GAAGH,KAAK,CAACE,KAAK,CAAC;IACzB,IAAI,CAACC,IAAI,CAACC,QAAQ,EAAE;MACnB,OAAOD,IAAI,CAACE,OAAO;IACpB;EACD;EAEA,OAAOL,KAAK,CAAC,CAAC,CAAC,EAAEK,OAAO,IAAIN,SAAS;AACtC,CAAC;AAED,MAAMO,aAAa,GAAGA,CAAA,KAA4B;EACjD,MAAMC,YAAkC,GAAG,CAAC,CAAC;EAE7C,KAAK,MAAM,CAACR,SAAS,EAAEC,KAAK,CAAC,IAAIL,U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;EACrE,MAAML,KAAK,GAAGL,UAAU,CAACoB,GAAG,CAAChB,SAAS,CAAC;EACvC,IAAI,CAACC,KAAK,EAAE;IACX;EACD;EAEA,MAAMgB,qBAAqB,GAAGlB,sBAAsB,CAACC,SAAS,EAAEC,KAAK,CAAC;EACtE,MAAMiB,SAAS,GAAGjB,KAAK,CAACkB,MAAM,CAAEf,IAAI,IAAKA,IAAI,CAACE,OAAO,KAAKA,OAAO,CAAC;EAElE,IAAIY,SAAS,CAAChB,MAAM,KAAK,CAAC,EAAE;IAC3BN,UAAU,CAACiB,MAAM,CAACb,SAAS,CAAC;EAC7B,CAAC,MAAM;IACNJ,UAAU,CAAC0B,GAAG,CAACtB,SAAS,EAAEkB,SAAS,CAAC;EACrC;EAEA,IAAID,qBAAqB,KAAKlB,sBAAsB,CAACC,SAAS,EAAEkB,SAAS,CAAC,EAAE;IAC3E;EACD;EAEAT,IAAI,CAAC,CAAC;AACP,CAAC;AAED,OAAO,MAAMe,gBAAgB,GAAIxB,SAAiB,IAAK;EACtD,OAAOF,QAAQ,CAACE,SAAS,CAAC,IAAIA,SAAS;AACxC,CAAC;AAED,OAAO,MAAMyB,gBAAgB,GAAIzB,SAAyB,IAAK;EAC9D,OAAOR,oBAAoB,CAC1BmB,SAAS,EACT,MAAOX,SAAS,GAAGwB,gBAAgB,CAACxB,SAAS,CAAC,GAAG0B,SAAU,EAC3D,MAAMA,SACP,CAAC;AACF,CAAC;AAED,OAAO,MAAMC,iBAAiB,GAAGA,CAAA,KAAM;EACtC/B,UAAU,CAACgC,KAAK,CAAC,CAAC;EAClB9B,QAAQ,GAAGL,cAAc;EACzBgB,IAAI,CAAC,CAAC;AACP,CAAC","ignoreList":[]}
@@ -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/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AAC;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,47 @@
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
19
  placement,
17
- position = "relative",
18
- sourceCurrentScroll,
19
- trackSourceScroll = false
20
+ landingShift
20
21
  }) => {
21
22
  "worklet";
22
23
 
23
24
  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
25
  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
26
  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
- }
27
+
28
+ // same-screen re-bases the static host frame onto the source scroll snapshot.
29
+ // Cross-screen hosts are the chosen replacement coordinate space, so their
30
+ // destination scroll is represented by where the host itself is mounted.
31
+ const alignHostToBoundsScroll = placement === "same-screen";
32
+ const hostSnapshotDeltaX = alignHostToBoundsScroll ? getClampedScrollAxisDelta(boundsScrollSnapshot, hostBoundsScrollSnapshot, "horizontal") : 0;
33
+ const hostSnapshotDeltaY = alignHostToBoundsScroll ? getClampedScrollAxisDelta(boundsScrollSnapshot, hostBoundsScrollSnapshot, "vertical") : 0;
34
+
35
+ // Without registered host bounds the host frame is the origin, so the source
36
+ // page position becomes the offset directly.
37
+ const adjustedHostPageX = hostBounds ? hostBounds.pageX - hostSnapshotDeltaX : 0;
38
+ const adjustedHostPageY = hostBounds ? hostBounds.pageY - hostSnapshotDeltaY : 0;
62
39
  return {
63
- transform
40
+ transform: [{
41
+ translateY: bounds.pageY - adjustedHostPageY + (landingShift?.y ?? 0)
42
+ }, {
43
+ translateX: bounds.pageX - adjustedHostPageX + (landingShift?.x ?? 0)
44
+ }]
64
45
  };
65
46
  };
66
47
  //# 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,mBAAmB;EACnBC,iBAAiB,GAAG;AACW,CAAC,KAAiB;EACjD,SAAS;;EACT,MAAMC,UAAU,GAAGf,mBAAmB,C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B,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","landingShift","hostBounds","boundsScrollSnapshot","scroll","hostBoundsScrollSnapshot","alignHostToBoundsScroll","hostSnapshotDeltaX","hostSnapshotDeltaY","adjustedHostPageX","pageX","adjustedHostPageY","pageY","transform","translateY","y","translateX","x"],"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;;AAgBA,OAAO,MAAMC,wBAAwB,GAAGA,CAAC;EACxCC,MAAM;EACNC,OAAO;EACPC,SAAS;EACTC;AAC+B,CAAC,KAAiB;EACjD,SAAS;;EACT,MAAMC,UAAU,GAAGN,mBAAmB,CAACG,OAAO,CAAC;EAC/C,MAAMI,oBAAoB,GAAGL,MAAM,CAACM,MAAM,IAAI,IAAI;EAClD,MAAMC,wBAAwB,GAAGH,UAAU,EAAEE,MAAM,IAAI,IAAI;;EAE3D;EACA;EACA;EACA,MAAME,uBAAuB,GAAGN,SAAS,KAAK,aAAa;EAE3D,MAAMO,kBAAkB,GAAGD,uBAAuB,GAC/CX,yBAAyB,CACzBQ,oBAAoB,EACpBE,wBAAwB,EACxB,YACD,CAAC,GACA,CAAC;EACJ,MAAMG,kBAAkB,GAAGF,uBAAuB,GAC/CX,yBAAyB,CACzBQ,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,EAAEhB,MAAM,CAACc,KAAK,GAAGD,iBAAiB,IAAIV,YAAY,EAAEc,CAAC,IAAI,CAAC;IAAE,CAAC,EACzE;MAAEC,UAAU,EAAElB,MAAM,CAACY,KAAK,GAAGD,iBAAiB,IAAIR,YAAY,EAAEgB,CAAC,IAAI,CAAC;IAAE,CAAC;EAE3E,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,GAA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