react-native-screen-transitions 3.9.0-beta.1 → 3.9.0-beta.2

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 (330) hide show
  1. package/lib/commonjs/shared/adapters/with-screen-transitions/index.js +20 -4
  2. package/lib/commonjs/shared/adapters/with-screen-transitions/index.js.map +1 -1
  3. package/lib/commonjs/shared/animation/transition-blocking.js +71 -0
  4. package/lib/commonjs/shared/animation/transition-blocking.js.map +1 -0
  5. package/lib/commonjs/shared/components/boundary/components/boundary-target.js +30 -30
  6. package/lib/commonjs/shared/components/boundary/components/boundary-target.js.map +1 -1
  7. package/lib/commonjs/shared/components/boundary/create-boundary-component.js +30 -95
  8. package/lib/commonjs/shared/components/boundary/create-boundary-component.js.map +1 -1
  9. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +68 -51
  10. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -1
  11. package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js +1 -0
  12. package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
  13. package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js +14 -2
  14. package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js.map +1 -1
  15. package/lib/commonjs/shared/components/boundary/hooks/use-register-target.js +32 -0
  16. package/lib/commonjs/shared/components/boundary/hooks/use-register-target.js.map +1 -0
  17. package/lib/commonjs/shared/components/boundary/index.js +1 -1
  18. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/components/host.js +40 -0
  19. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/components/host.js.map +1 -0
  20. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.js +14 -0
  21. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.js.map +1 -0
  22. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +194 -0
  23. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -0
  24. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/index.js +44 -0
  25. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/index.js.map +1 -0
  26. package/lib/commonjs/shared/components/boundary/portal/components/{host.js → boundary-portal/components/host.js} +17 -16
  27. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/host.js.map +1 -0
  28. package/lib/commonjs/shared/components/boundary/portal/components/{portal-boundary-host.js → boundary-portal/components/portal-boundary-host.js} +11 -11
  29. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -0
  30. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js +52 -0
  31. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js.map +1 -0
  32. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.js.map +1 -0
  33. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/host-name.js +14 -0
  34. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/host-name.js.map +1 -0
  35. package/lib/commonjs/shared/components/boundary/portal/{utils → components/boundary-portal/helpers}/offset-style.js +1 -1
  36. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.js.map +1 -0
  37. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +184 -0
  38. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -0
  39. package/lib/commonjs/shared/components/boundary/portal/{hooks → components/boundary-portal/hooks}/use-host-measurement.js +23 -5
  40. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js.map +1 -0
  41. package/lib/commonjs/shared/components/boundary/portal/{hooks → components/boundary-portal/hooks}/use-placeholder-styles.js +3 -6
  42. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-placeholder-styles.js.map +1 -0
  43. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/index.js +33 -0
  44. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/index.js.map +1 -0
  45. package/lib/commonjs/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-bounds.store.js +1 -1
  46. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.js.map +1 -0
  47. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/host-registry.store.js.map +1 -0
  48. package/lib/commonjs/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/portal-boundary-host.store.js +7 -12
  49. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -0
  50. package/lib/commonjs/shared/components/boundary/portal/index.js +1 -8
  51. package/lib/commonjs/shared/components/boundary/portal/index.js.map +1 -1
  52. package/lib/commonjs/shared/components/boundary/portal/teleport.js +2 -2
  53. package/lib/commonjs/shared/components/boundary/portal/utils/naming.js +1 -15
  54. package/lib/commonjs/shared/components/boundary/portal/utils/naming.js.map +1 -1
  55. package/lib/commonjs/shared/components/boundary/portal/utils/ownership.js +19 -56
  56. package/lib/commonjs/shared/components/boundary/portal/utils/ownership.js.map +1 -1
  57. package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js +77 -23
  58. package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
  59. package/lib/commonjs/shared/components/boundary/utils/destination-signals.js +41 -12
  60. package/lib/commonjs/shared/components/boundary/utils/destination-signals.js.map +1 -1
  61. package/lib/commonjs/shared/components/boundary/utils/measured-bounds.js +36 -1
  62. package/lib/commonjs/shared/components/boundary/utils/measured-bounds.js.map +1 -1
  63. package/lib/commonjs/shared/components/screen-container/layers/content.js +1 -1
  64. package/lib/commonjs/shared/configs/presets.js +2 -2
  65. package/lib/commonjs/shared/configs/presets.js.map +1 -1
  66. package/lib/commonjs/shared/index.js +13 -0
  67. package/lib/commonjs/shared/index.js.map +1 -1
  68. package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +2 -1
  69. package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
  70. package/lib/commonjs/shared/providers/screen/styles/slot.provider.js +5 -3
  71. package/lib/commonjs/shared/providers/screen/styles/slot.provider.js.map +1 -1
  72. package/lib/commonjs/shared/providers/screen/styles/stores/slot-references.store.js +1 -1
  73. package/lib/commonjs/shared/providers/screen/styles/stores/slot-references.store.js.map +1 -1
  74. package/lib/commonjs/shared/stores/system.store.js +10 -2
  75. package/lib/commonjs/shared/stores/system.store.js.map +1 -1
  76. package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js +15 -9
  77. package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
  78. package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js +2 -2
  79. package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
  80. package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js +3 -3
  81. package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
  82. package/lib/module/shared/adapters/with-screen-transitions/index.js +19 -5
  83. package/lib/module/shared/adapters/with-screen-transitions/index.js.map +1 -1
  84. package/lib/module/shared/animation/transition-blocking.js +66 -0
  85. package/lib/module/shared/animation/transition-blocking.js.map +1 -0
  86. package/lib/module/shared/components/boundary/components/boundary-target.js +32 -32
  87. package/lib/module/shared/components/boundary/components/boundary-target.js.map +1 -1
  88. package/lib/module/shared/components/boundary/create-boundary-component.js +32 -97
  89. package/lib/module/shared/components/boundary/create-boundary-component.js.map +1 -1
  90. package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +72 -55
  91. package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -1
  92. package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js +1 -0
  93. package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
  94. package/lib/module/shared/components/boundary/hooks/use-measurer.js +15 -3
  95. package/lib/module/shared/components/boundary/hooks/use-measurer.js.map +1 -1
  96. package/lib/module/shared/components/boundary/hooks/use-register-target.js +27 -0
  97. package/lib/module/shared/components/boundary/hooks/use-register-target.js.map +1 -0
  98. package/lib/module/shared/components/boundary/index.js +1 -1
  99. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/components/host.js +35 -0
  100. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/components/host.js.map +1 -0
  101. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.js +9 -0
  102. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.js.map +1 -0
  103. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +189 -0
  104. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -0
  105. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/index.js +33 -0
  106. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/index.js.map +1 -0
  107. package/lib/module/shared/components/boundary/portal/components/{host.js → boundary-portal/components/host.js} +17 -16
  108. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/host.js.map +1 -0
  109. package/lib/module/shared/components/boundary/portal/components/{portal-boundary-host.js → boundary-portal/components/portal-boundary-host.js} +11 -11
  110. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -0
  111. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js +47 -0
  112. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js.map +1 -0
  113. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.js.map +1 -0
  114. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/host-name.js +9 -0
  115. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/host-name.js.map +1 -0
  116. package/lib/module/shared/components/boundary/portal/{utils → components/boundary-portal/helpers}/offset-style.js +1 -1
  117. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.js.map +1 -0
  118. package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +179 -0
  119. package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -0
  120. package/lib/module/shared/components/boundary/portal/{hooks → components/boundary-portal/hooks}/use-host-measurement.js +23 -5
  121. package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js.map +1 -0
  122. package/lib/module/shared/components/boundary/portal/{hooks → components/boundary-portal/hooks}/use-placeholder-styles.js +3 -6
  123. package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-placeholder-styles.js.map +1 -0
  124. package/lib/module/shared/components/boundary/portal/components/boundary-portal/index.js +29 -0
  125. package/lib/module/shared/components/boundary/portal/components/boundary-portal/index.js.map +1 -0
  126. package/lib/module/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-bounds.store.js +1 -1
  127. package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.js.map +1 -0
  128. package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/host-registry.store.js.map +1 -0
  129. package/lib/module/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/portal-boundary-host.store.js +5 -10
  130. package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -0
  131. package/lib/module/shared/components/boundary/portal/index.js +1 -2
  132. package/lib/module/shared/components/boundary/portal/index.js.map +1 -1
  133. package/lib/module/shared/components/boundary/portal/teleport.js +2 -2
  134. package/lib/module/shared/components/boundary/portal/utils/naming.js +0 -12
  135. package/lib/module/shared/components/boundary/portal/utils/naming.js.map +1 -1
  136. package/lib/module/shared/components/boundary/portal/utils/ownership.js +16 -52
  137. package/lib/module/shared/components/boundary/portal/utils/ownership.js.map +1 -1
  138. package/lib/module/shared/components/boundary/providers/boundary-root.provider.js +74 -20
  139. package/lib/module/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
  140. package/lib/module/shared/components/boundary/utils/destination-signals.js +39 -10
  141. package/lib/module/shared/components/boundary/utils/destination-signals.js.map +1 -1
  142. package/lib/module/shared/components/boundary/utils/measured-bounds.js +34 -0
  143. package/lib/module/shared/components/boundary/utils/measured-bounds.js.map +1 -1
  144. package/lib/module/shared/components/screen-container/layers/content.js +1 -1
  145. package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
  146. package/lib/module/shared/configs/presets.js +2 -2
  147. package/lib/module/shared/configs/presets.js.map +1 -1
  148. package/lib/module/shared/index.js +1 -0
  149. package/lib/module/shared/index.js.map +1 -1
  150. package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +2 -1
  151. package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
  152. package/lib/module/shared/providers/screen/styles/slot.provider.js +5 -3
  153. package/lib/module/shared/providers/screen/styles/slot.provider.js.map +1 -1
  154. package/lib/module/shared/providers/screen/styles/stores/slot-references.store.js +1 -1
  155. package/lib/module/shared/providers/screen/styles/stores/slot-references.store.js.map +1 -1
  156. package/lib/module/shared/stores/system.store.js +10 -2
  157. package/lib/module/shared/stores/system.store.js.map +1 -1
  158. package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js +15 -9
  159. package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
  160. package/lib/module/shared/utils/bounds/navigation/reveal/build.js +2 -2
  161. package/lib/module/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
  162. package/lib/module/shared/utils/bounds/navigation/zoom/build.js +3 -3
  163. package/lib/module/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
  164. package/lib/typescript/shared/adapters/with-screen-transitions/index.d.ts +4 -1
  165. package/lib/typescript/shared/adapters/with-screen-transitions/index.d.ts.map +1 -1
  166. package/lib/typescript/shared/animation/transition-blocking.d.ts +33 -0
  167. package/lib/typescript/shared/animation/transition-blocking.d.ts.map +1 -0
  168. package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts.map +1 -1
  169. package/lib/typescript/shared/components/boundary/create-boundary-component.d.ts.map +1 -1
  170. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts +2 -1
  171. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts.map +1 -1
  172. package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts.map +1 -1
  173. package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts.map +1 -1
  174. package/lib/typescript/shared/components/boundary/hooks/use-register-target.d.ts +10 -0
  175. package/lib/typescript/shared/components/boundary/hooks/use-register-target.d.ts.map +1 -0
  176. package/lib/typescript/shared/components/boundary/index.d.ts +2 -2
  177. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/components/host.d.ts +10 -0
  178. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/components/host.d.ts.map +1 -0
  179. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.d.ts +2 -0
  180. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.d.ts.map +1 -0
  181. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.d.ts +12 -0
  182. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.d.ts.map +1 -0
  183. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/index.d.ts +11 -0
  184. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/index.d.ts.map +1 -0
  185. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/host.d.ts.map +1 -0
  186. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.d.ts.map +1 -0
  187. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.d.ts +14 -0
  188. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.d.ts.map +1 -0
  189. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.d.ts +3 -0
  190. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.d.ts.map +1 -0
  191. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/host-name.d.ts +2 -0
  192. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/host-name.d.ts.map +1 -0
  193. package/lib/typescript/shared/components/boundary/portal/{utils → components/boundary-portal/helpers}/offset-style.d.ts +1 -1
  194. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.d.ts.map +1 -0
  195. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts +12 -0
  196. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts.map +1 -0
  197. package/lib/typescript/shared/components/boundary/portal/{hooks → components/boundary-portal/hooks}/use-host-measurement.d.ts +5 -1
  198. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.d.ts.map +1 -0
  199. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-placeholder-styles.d.ts +12 -0
  200. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-placeholder-styles.d.ts.map +1 -0
  201. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/index.d.ts +13 -0
  202. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/index.d.ts.map +1 -0
  203. package/lib/typescript/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-bounds.store.d.ts +1 -1
  204. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.d.ts.map +1 -0
  205. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/host-registry.store.d.ts.map +1 -0
  206. package/lib/typescript/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/portal-boundary-host.store.d.ts +3 -3
  207. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts.map +1 -0
  208. package/lib/typescript/shared/components/boundary/portal/index.d.ts +1 -2
  209. package/lib/typescript/shared/components/boundary/portal/index.d.ts.map +1 -1
  210. package/lib/typescript/shared/components/boundary/portal/utils/naming.d.ts +0 -2
  211. package/lib/typescript/shared/components/boundary/portal/utils/naming.d.ts.map +1 -1
  212. package/lib/typescript/shared/components/boundary/portal/utils/ownership.d.ts +9 -10
  213. package/lib/typescript/shared/components/boundary/portal/utils/ownership.d.ts.map +1 -1
  214. package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts +21 -21
  215. package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts.map +1 -1
  216. package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts +9 -2
  217. package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts.map +1 -1
  218. package/lib/typescript/shared/components/boundary/utils/measured-bounds.d.ts +8 -0
  219. package/lib/typescript/shared/components/boundary/utils/measured-bounds.d.ts.map +1 -1
  220. package/lib/typescript/shared/index.d.ts +1 -0
  221. package/lib/typescript/shared/index.d.ts.map +1 -1
  222. package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts +1 -0
  223. package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts.map +1 -1
  224. package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts +1 -0
  225. package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts.map +1 -1
  226. package/lib/typescript/shared/providers/screen/styles/stores/slot-references.store.d.ts.map +1 -1
  227. package/lib/typescript/shared/stores/system.store.d.ts.map +1 -1
  228. package/lib/typescript/shared/types/animation.types.d.ts +3 -3
  229. package/lib/typescript/shared/types/bounds.types.d.ts +7 -2
  230. package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
  231. package/lib/typescript/shared/utils/bounds/helpers/create-bounds-accessor-core.d.ts.map +1 -1
  232. package/lib/typescript/shared/utils/bounds/types/options.d.ts +6 -2
  233. package/lib/typescript/shared/utils/bounds/types/options.d.ts.map +1 -1
  234. package/package.json +1 -1
  235. package/src/shared/adapters/with-screen-transitions/index.tsx +30 -9
  236. package/src/shared/animation/transition-blocking.ts +79 -0
  237. package/src/shared/components/boundary/components/boundary-target.tsx +43 -50
  238. package/src/shared/components/boundary/create-boundary-component.tsx +35 -150
  239. package/src/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.ts +103 -81
  240. package/src/shared/components/boundary/hooks/use-boundary-measurement.ts +1 -0
  241. package/src/shared/components/boundary/hooks/use-measurer.ts +12 -4
  242. package/src/shared/components/boundary/hooks/use-register-target.ts +43 -0
  243. package/src/shared/components/boundary/index.tsx +2 -2
  244. package/src/shared/components/boundary/portal/components/boundary-content-portal/components/host.tsx +48 -0
  245. package/src/shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.ts +9 -0
  246. package/src/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.ts +274 -0
  247. package/src/shared/components/boundary/portal/components/boundary-content-portal/index.tsx +59 -0
  248. package/src/shared/components/boundary/portal/components/{host.tsx → boundary-portal/components/host.tsx} +14 -15
  249. package/src/shared/components/boundary/portal/components/{portal-boundary-host.tsx → boundary-portal/components/portal-boundary-host.tsx} +12 -12
  250. package/src/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.tsx +80 -0
  251. package/src/shared/components/boundary/portal/{utils → components/boundary-portal/helpers}/has-local-slot.ts +1 -1
  252. package/src/shared/components/boundary/portal/components/boundary-portal/helpers/host-name.ts +10 -0
  253. package/src/shared/components/boundary/portal/{utils → components/boundary-portal/helpers}/offset-style.ts +2 -2
  254. package/src/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts +250 -0
  255. package/src/shared/components/boundary/portal/{hooks → components/boundary-portal/hooks}/use-host-measurement.ts +38 -8
  256. package/src/shared/components/boundary/portal/{hooks → components/boundary-portal/hooks}/use-placeholder-styles.ts +4 -15
  257. package/src/shared/components/boundary/portal/components/boundary-portal/index.tsx +38 -0
  258. package/src/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-bounds.store.ts +2 -2
  259. package/src/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/portal-boundary-host.store.ts +10 -15
  260. package/src/shared/components/boundary/portal/index.ts +1 -2
  261. package/src/shared/components/boundary/portal/teleport.ts +2 -2
  262. package/src/shared/components/boundary/portal/utils/naming.ts +0 -19
  263. package/src/shared/components/boundary/portal/utils/ownership.ts +32 -88
  264. package/src/shared/components/boundary/providers/boundary-root.provider.tsx +198 -78
  265. package/src/shared/components/boundary/utils/destination-signals.ts +38 -14
  266. package/src/shared/components/boundary/utils/measured-bounds.ts +48 -0
  267. package/src/shared/components/screen-container/layers/content.tsx +1 -1
  268. package/src/shared/configs/presets.ts +2 -2
  269. package/src/shared/index.ts +4 -0
  270. package/src/shared/providers/screen/styles/hooks/use-maybe-block-visibility.tsx +1 -0
  271. package/src/shared/providers/screen/styles/slot.provider.tsx +4 -2
  272. package/src/shared/providers/screen/styles/stores/slot-references.store.ts +2 -1
  273. package/src/shared/stores/system.store.ts +10 -4
  274. package/src/shared/types/animation.types.ts +3 -3
  275. package/src/shared/types/bounds.types.ts +9 -2
  276. package/src/shared/utils/bounds/helpers/create-bounds-accessor-core.ts +18 -11
  277. package/src/shared/utils/bounds/navigation/reveal/build.ts +2 -2
  278. package/src/shared/utils/bounds/navigation/zoom/build.ts +3 -3
  279. package/src/shared/utils/bounds/types/options.ts +9 -2
  280. package/lib/commonjs/shared/components/boundary/portal/components/boundary-local-portal-host.js +0 -58
  281. package/lib/commonjs/shared/components/boundary/portal/components/boundary-local-portal-host.js.map +0 -1
  282. package/lib/commonjs/shared/components/boundary/portal/components/host.js.map +0 -1
  283. package/lib/commonjs/shared/components/boundary/portal/components/portal-boundary-host.js.map +0 -1
  284. package/lib/commonjs/shared/components/boundary/portal/components/portal.js +0 -272
  285. package/lib/commonjs/shared/components/boundary/portal/components/portal.js.map +0 -1
  286. package/lib/commonjs/shared/components/boundary/portal/hooks/use-host-measurement.js.map +0 -1
  287. package/lib/commonjs/shared/components/boundary/portal/hooks/use-placeholder-styles.js.map +0 -1
  288. package/lib/commonjs/shared/components/boundary/portal/stores/host-bounds.store.js.map +0 -1
  289. package/lib/commonjs/shared/components/boundary/portal/stores/host-registry.store.js.map +0 -1
  290. package/lib/commonjs/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map +0 -1
  291. package/lib/commonjs/shared/components/boundary/portal/utils/has-local-slot.js.map +0 -1
  292. package/lib/commonjs/shared/components/boundary/portal/utils/offset-style.js.map +0 -1
  293. package/lib/module/shared/components/boundary/portal/components/boundary-local-portal-host.js +0 -53
  294. package/lib/module/shared/components/boundary/portal/components/boundary-local-portal-host.js.map +0 -1
  295. package/lib/module/shared/components/boundary/portal/components/host.js.map +0 -1
  296. package/lib/module/shared/components/boundary/portal/components/portal-boundary-host.js.map +0 -1
  297. package/lib/module/shared/components/boundary/portal/components/portal.js +0 -267
  298. package/lib/module/shared/components/boundary/portal/components/portal.js.map +0 -1
  299. package/lib/module/shared/components/boundary/portal/hooks/use-host-measurement.js.map +0 -1
  300. package/lib/module/shared/components/boundary/portal/hooks/use-placeholder-styles.js.map +0 -1
  301. package/lib/module/shared/components/boundary/portal/stores/host-bounds.store.js.map +0 -1
  302. package/lib/module/shared/components/boundary/portal/stores/host-registry.store.js.map +0 -1
  303. package/lib/module/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map +0 -1
  304. package/lib/module/shared/components/boundary/portal/utils/has-local-slot.js.map +0 -1
  305. package/lib/module/shared/components/boundary/portal/utils/offset-style.js.map +0 -1
  306. package/lib/typescript/shared/components/boundary/portal/components/boundary-local-portal-host.d.ts +0 -8
  307. package/lib/typescript/shared/components/boundary/portal/components/boundary-local-portal-host.d.ts.map +0 -1
  308. package/lib/typescript/shared/components/boundary/portal/components/host.d.ts.map +0 -1
  309. package/lib/typescript/shared/components/boundary/portal/components/portal-boundary-host.d.ts.map +0 -1
  310. package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts +0 -20
  311. package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts.map +0 -1
  312. package/lib/typescript/shared/components/boundary/portal/hooks/use-host-measurement.d.ts.map +0 -1
  313. package/lib/typescript/shared/components/boundary/portal/hooks/use-placeholder-styles.d.ts +0 -17
  314. package/lib/typescript/shared/components/boundary/portal/hooks/use-placeholder-styles.d.ts.map +0 -1
  315. package/lib/typescript/shared/components/boundary/portal/stores/host-bounds.store.d.ts.map +0 -1
  316. package/lib/typescript/shared/components/boundary/portal/stores/host-registry.store.d.ts.map +0 -1
  317. package/lib/typescript/shared/components/boundary/portal/stores/portal-boundary-host.store.d.ts.map +0 -1
  318. package/lib/typescript/shared/components/boundary/portal/utils/has-local-slot.d.ts +0 -3
  319. package/lib/typescript/shared/components/boundary/portal/utils/has-local-slot.d.ts.map +0 -1
  320. package/lib/typescript/shared/components/boundary/portal/utils/offset-style.d.ts.map +0 -1
  321. package/src/shared/components/boundary/portal/components/boundary-local-portal-host.tsx +0 -66
  322. package/src/shared/components/boundary/portal/components/portal.tsx +0 -412
  323. /package/lib/commonjs/shared/components/boundary/portal/{utils → components/boundary-portal/helpers}/has-local-slot.js +0 -0
  324. /package/lib/commonjs/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-registry.store.js +0 -0
  325. /package/lib/module/shared/components/boundary/portal/{utils → components/boundary-portal/helpers}/has-local-slot.js +0 -0
  326. /package/lib/module/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-registry.store.js +0 -0
  327. /package/lib/typescript/shared/components/boundary/portal/components/{host.d.ts → boundary-portal/components/host.d.ts} +0 -0
  328. /package/lib/typescript/shared/components/boundary/portal/components/{portal-boundary-host.d.ts → boundary-portal/components/portal-boundary-host.d.ts} +0 -0
  329. /package/lib/typescript/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-registry.store.d.ts +0 -0
  330. /package/src/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-registry.store.ts +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNativeReanimated","_descriptors","_styles","_slotReferences","_animation","_state","_naming","_ownership","_shallowEqual","_teleportControl","_visibleHost","_hostName","useBoundaryContentPortalAttachment","boundaryId","enabled","ownScreenSlots","useScreenSlots","sourcePairKey","useDescriptorsStore","s","derivations","currentScreenKey","ownership","setOwnership","useState","styleOwnerScreenKey","ownerScreenKey","ownerScreenSlots","useRegisteredScreenSlots","activeScreenSlots","nextInterpolatorReady","activeNextInterpolatorReady","slotsMap","activeSlotsMap","requestedPortalHostName","useSharedValue","visiblePortalHostName","canSwitchPortalHostImmediately","targetScreenKey","hostScreenKey","settledHostScreenKey","settledHostProgress","AnimationStore","getValue","settledHostAnimating","settledHostWillAnimate","settledHostClosing","handoffHostName","createBoundaryContentPortalHostName","updatePortalOwnership","useCallback","ownerPairKey","current","status","useLayoutEffect","set","useAnimatedReaction","progressAnimating","get","progressSettled","willAnimate","resolveBoundaryPortalOwnership","handoff","isSettledHostClosingComplete","isHandoffHostClosingComplete","closing","isSettledHostReady","pairsState","pairs","signal","previousSignal","shallowEqual","previousOwnerPairKey","undefined","canSwitchImmediately","canSwitchHandoffHostImmediately","hostName","runOnJS","slot","teleport","props","shouldTeleport","shouldAttachBoundaryPortal","requestedName","visibleName","isInterpolatorReady","nextVisibleName","resolveNextVisiblePortalHostName","state","previousState","teleportProps","useAnimatedProps","slotProps","PORTAL_HOST_NAME_RESET_VALUE","exports"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment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G,CAAC,CAAC,CAAC7C,UAAU,CAAC;IAC7C,MAAM;MAAEkE,QAAQ;MAAE,GAAGa;IAAU,CAAC,GAAGd,IAAI,EAAEE,KAAK,IAAI,CAAC,CAAC;IACpD,MAAMC,cAAc,GAAG,IAAAC,2CAA0B,EAAC;MACjDpE,OAAO;MACPiE;IACD,CAAC,CAAC;IACF,MAAMK,WAAW,GAAGhD,qBAAqB,CAACsB,GAAG,CAAC,CAAC;IAE/C,OAAO;MACN,GAAGkC,SAAS;MACZhB,QAAQ,EACPK,cAAc,IAAIG,WAAW,GAC1BA,WAAW,GACXS;IACL,CAAC;EACF,CAAC,CAAC;EAEF,OAAO;IACNH,aAAa;IACbtD;EACD,CAAC;AACF,CAAC;AAAC0D,OAAA,CAAAlF,kCAAA,GAAAA,kCAAA","ignoreList":[]}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.BoundaryContentPortal = void 0;
7
+ Object.defineProperty(exports, "BoundaryContentPortalHost", {
8
+ enumerable: true,
9
+ get: function () {
10
+ return _host.BoundaryContentPortalHost;
11
+ }
12
+ });
13
+ var _react = require("react");
14
+ var _reactNativeReanimated = _interopRequireDefault(require("react-native-reanimated"));
15
+ var _teleport = require("../../teleport");
16
+ var _useBoundaryContentPortalAttachment = require("./hooks/use-boundary-content-portal-attachment");
17
+ var _jsxRuntime = require("react/jsx-runtime");
18
+ var _host = require("./components/host");
19
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
20
+ const AnimatedNativePortal = _teleport.NativePortal ? _reactNativeReanimated.default.createAnimatedComponent(_teleport.NativePortal) : null;
21
+ const BoundaryContentPortal = exports.BoundaryContentPortal = /*#__PURE__*/(0, _react.memo)(function BoundaryContentPortal({
22
+ boundaryId,
23
+ children,
24
+ enabled,
25
+ pointerEvents
26
+ }) {
27
+ const shouldEnablePortal = enabled && boundaryId !== undefined;
28
+ const {
29
+ teleportProps
30
+ } = (0, _useBoundaryContentPortalAttachment.useBoundaryContentPortalAttachment)({
31
+ boundaryId: boundaryId ?? "",
32
+ enabled: shouldEnablePortal
33
+ });
34
+ if (shouldEnablePortal && _teleport.isTeleportAvailable && AnimatedNativePortal) {
35
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedNativePortal, {
36
+ animatedProps: teleportProps,
37
+ name: boundaryId,
38
+ pointerEvents: pointerEvents,
39
+ children: children
40
+ });
41
+ }
42
+ return children;
43
+ });
44
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNativeReanimated","_interopRequireDefault","_teleport","_useBoundaryContentPortalAttachment","_jsxRuntime","_host","e","__esModule","default","AnimatedNativePortal","NativePortal","Animated","createAnimatedComponent","BoundaryContentPortal","exports","memo","boundaryId","children","enabled","pointerEvents","shouldEnablePortal","undefined","teleportProps","useBoundaryContentPortalAttachment","isTeleportAvailable","jsx","animatedProps","name"],"sourceRoot":"../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-content-portal/index.tsx"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAOA,IAAAC,sBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,mCAAA,GAAAJ,OAAA;AAAoG,IAAAK,WAAA,GAAAL,OAAA;AAEpG,IAAAM,KAAA,GAAAN,OAAA;AAA8D,SAAAE,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAgB9D,MAAMG,oBAAoB,GAAGC,sBAAY,GACtCC,8BAAQ,CAACC,uBAAuB,CAChCF,sBACD,CAAC,GACA,IAAI;AAEA,MAAMG,qBAAqB,GAAAC,OAAA,CAAAD,qBAAA,gBAAG,IAAAE,WAAI,EAAC,SAASF,qBAAqBA,CAAC;EACxEG,UAAU;EACVC,QAAQ;EACRC,OAAO;EACPC;AAC2B,CAAC,EAAE;EAC9B,MAAMC,kBAAkB,GAAGF,OAAO,IAAIF,UAAU,KAAKK,SAAS;EAC9D,MAAM;IAAEC;EAAc,CAAC,GAAG,IAAAC,sEAAkC,EAAC;IAC5DP,UAAU,EAAEA,UAAU,IAAI,EAAE;IAC5BE,OAAO,EAAEE;EACV,CAAC,CAAC;EAEF,IAAIA,kBAAkB,IAAII,6BAAmB,IAAIf,oBAAoB,EAAE;IACtE,oBACC,IAAAL,WAAA,CAAAqB,GAAA,EAAChB,oBAAoB;MACpBiB,aAAa,EAAEJ,aAAc;MAC7BK,IAAI,EAAEX,UAAW;MACjBG,aAAa,EAAEA,aAAc;MAAAF,QAAA,EAE5BA;IAAQ,CACY,CAAC;EAEzB;EAEA,OAAOA,QAAQ;AAChB,CAAC,CAAC","ignoreList":[]}
@@ -7,8 +7,9 @@ exports.ScreenFallbackHost = exports.Host = void 0;
7
7
  var _react = require("react");
8
8
  var _reactNative = require("react-native");
9
9
  var _reactNativeReanimated = _interopRequireDefault(require("react-native-reanimated"));
10
- var _descriptors = require("../../../../providers/screen/descriptors");
11
- var _system = require("../../../../stores/system.store");
10
+ var _descriptors = require("../../../../../../providers/screen/descriptors");
11
+ var _styles = require("../../../../../../providers/screen/styles");
12
+ var _system = require("../../../../../../stores/system.store");
12
13
  var _useHostMeasurement = require("../hooks/use-host-measurement");
13
14
  var _hostRegistry = require("../stores/host-registry.store");
14
15
  var _portalBoundaryHost = require("../stores/portal-boundary-host.store");
@@ -22,7 +23,7 @@ function HostImpl({
22
23
  }) {
23
24
  const screenKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.currentScreenKey);
24
25
  const {
25
- drainLifecycleStartBlocks
26
+ unblockLifecycleStart
26
27
  } = _system.SystemStore.getBag(screenKey).actions;
27
28
  const generatedHostKeyRef = (0, _react.useRef)(null);
28
29
  if (generatedHostKeyRef.current === null) {
@@ -31,6 +32,9 @@ function HostImpl({
31
32
  const hostKey = fallback ? screenKey : generatedHostKeyRef.current;
32
33
  const capturesScroll = !fallback;
33
34
  const activeBoundaryHosts = (0, _portalBoundaryHost.useActivePortalBoundaryHosts)(hostKey);
35
+ const {
36
+ visibilityBlocked
37
+ } = (0, _styles.useScreenSlots)();
34
38
  const {
35
39
  height: viewportHeight,
36
40
  width: viewportWidth
@@ -39,7 +43,10 @@ function HostImpl({
39
43
  capturesScroll,
40
44
  enabled: activeBoundaryHosts.length > 0,
41
45
  hostKey,
42
- screenKey
46
+ screenKey,
47
+ visibilityBlocked,
48
+ viewportHeight,
49
+ viewportWidth
43
50
  });
44
51
  (0, _react.useLayoutEffect)(() => {
45
52
  (0, _hostRegistry.registerHost)({
@@ -53,23 +60,17 @@ function HostImpl({
53
60
  };
54
61
  }, [capturesScroll, fallback, hostKey, screenKey]);
55
62
  const handleUnblocking = (0, _react.useCallback)(() => {
56
- // Screen-level escape keeps the open transition gated until portal hosts
57
- // have committed layout. A screen may render more than one portal boundary
58
- // host for the same lifecycle request, so the final host layout drains the
59
- // outstanding start blocks for this screen.
60
- drainLifecycleStartBlocks();
61
- }, [drainLifecycleStartBlocks]);
62
- const boundaryHosts = measurement.canRenderHosts ? activeBoundaryHosts.map((host, idx, list) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
63
+ // Each destination boundary contributes one lifecycle start block. Release
64
+ // only this host's block so unrelated boundary and user blocks stay intact.
65
+ unblockLifecycleStart();
66
+ }, [unblockLifecycleStart]);
67
+ const boundaryHosts = measurement.canRenderHosts ? activeBoundaryHosts.map(host => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
63
68
  pointerEvents: "none",
64
69
  style: [styles.boundaryHostViewport, {
65
70
  width: viewportWidth,
66
71
  height: viewportHeight
67
72
  }],
68
- onLayout: () => {
69
- if (list.length - 1 === idx) {
70
- handleUnblocking();
71
- }
72
- },
73
+ onLayout: handleUnblocking,
73
74
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_portalBoundaryHost2.PortalBoundaryHost, {
74
75
  host: host,
75
76
  style: _reactNative.StyleSheet.absoluteFill
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireDefault","_descriptors","_styles","_system","_useHostMeasurement","_hostRegistry","_portalBoundaryHost","_portalBoundaryHost2","_jsxRuntime","e","__esModule","default","nextHostId","HostImpl","fallback","style","screenKey","useDescriptorsStore","s","derivations","currentScreenKey","unblockLifecycleStart","SystemStore","getBag","actions","generatedHostKeyRef","useRef","current","hostKey","capturesScroll","activeBoundaryHosts","useActivePortalBoundaryHosts","visibilityBlocked","useScreenSlots","height","viewportHeight","width","viewportWidth","useWindowDimensions","measurement","useHostMeasurement","enabled","length","useLayoutEffect","registerHost","unregisterHost","handleUnblocking","useCallback","boundaryHosts","canRenderHosts","map","host","jsx","View","pointerEvents","styles","boundaryHostViewport","onLayout","children","PortalBoundaryHost","StyleSheet","absoluteFill","portalHostName","ref","hostRef","collapsable","Host","exports","memo","props","ScreenFallbackHost","create","elevation","left","overflow","position","top","zIndex"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/components/host.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAOA,IAAAE,sBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,mBAAA,GAAAP,OAAA;AACA,IAAAQ,aAAA,GAAAR,OAAA;AACA,IAAAS,mBAAA,GAAAT,OAAA;AACA,IAAAU,oBAAA,GAAAV,OAAA;AAA4D,IAAAW,WAAA,GAAAX,OAAA;AAAA,SAAAG,uBAAAS,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE5D,IAA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A7D,WAAA,CAAA4C,GAAA,EAACvC,QAAQ;IAAA,GAAKwD;EAAK,CAAG,CAAC;AAC/B,CAAC,CAAC;AAEK,MAAMC,kBAAkB,GAAAH,OAAA,CAAAG,kBAAA,gBAAG,IAAAF,WAAI,EAAC,SAASE,kBAAkBA,CAAA,EAAG;EACpE,oBAAO,IAAA9D,WAAA,CAAA4C,GAAA,EAACvC,QAAQ;IAACC,QAAQ;EAAA,CAAE,CAAC;AAC7B,CAAC,CAAC;AAEF,MAAMyC,MAAM,GAAGK,uBAAU,CAACW,MAAM,CAAC;EAChCpB,IAAI,EAAE;IACLqB,SAAS,EAAE,MAAM;IACjBC,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE,SAAS;IACnBC,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,CAAC;IACNC,MAAM,EAAE;EACT,CAAC;EACDrB,oBAAoB,EAAE;IACrBiB,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE,SAAS;IACnBC,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE;EACN;AACD,CAAC,CAAC","ignoreList":[]}
@@ -7,15 +7,15 @@ exports.PortalBoundaryHost = void 0;
7
7
  var _react = require("react");
8
8
  var _reactNative = require("react-native");
9
9
  var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
10
- var _constants = require("../../../../constants");
11
- var _composeSlotStyle = require("../../../../providers/screen/styles/helpers/compose-slot-style");
12
- var _animation = require("../../../../stores/animation.store");
13
- var _linkPairs = require("../../../../stores/bounds/helpers/link-pairs.helpers");
14
- var _links = require("../../../../stores/bounds/internals/links");
15
- var _scroll = require("../../../../stores/scroll.store");
16
- var _teleport = require("../teleport");
17
- var _hasLocalSlot = require("../utils/has-local-slot");
18
- var _offsetStyle = require("../utils/offset-style");
10
+ var _constants = require("../../../../../../constants");
11
+ var _composeSlotStyle = require("../../../../../../providers/screen/styles/helpers/compose-slot-style");
12
+ var _animation = require("../../../../../../stores/animation.store");
13
+ var _linkPairs = require("../../../../../../stores/bounds/helpers/link-pairs.helpers");
14
+ var _links = require("../../../../../../stores/bounds/internals/links");
15
+ var _scroll = require("../../../../../../stores/scroll.store");
16
+ var _teleport = require("../../../teleport");
17
+ var _hasLocalSlot = require("../helpers/has-local-slot");
18
+ var _offsetStyle = require("../helpers/offset-style");
19
19
  var _jsxRuntime = require("react/jsx-runtime");
20
20
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
21
21
  const AnimatedPortalBoundaryHost = _teleport.NativePortalHost ? _reactNativeReanimated.default.createAnimatedComponent(_teleport.NativePortalHost) : null;
@@ -33,7 +33,7 @@ const PortalBoundaryHost = exports.PortalBoundaryHost = /*#__PURE__*/(0, _react.
33
33
  const hostStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
34
34
  "worklet";
35
35
 
36
- // Strict per-member lookup a fallback member's source rect would
36
+ // Strict per-member lookup - a fallback member's source rect would
37
37
  // misplace this host's teleported content.
38
38
  const link = (0, _links.getLink)(host.pairKey, host.boundaryId);
39
39
  if (!link?.source || !link.destination) {
@@ -101,7 +101,7 @@ const PortalBoundaryHost = exports.PortalBoundaryHost = /*#__PURE__*/(0, _react.
101
101
  });
102
102
 
103
103
  // Without `react-native-teleport` no portal ever mounts a boundary host, so
104
- // this never renders the guard just narrows the nullable animated host.
104
+ // this never renders - the guard just narrows the nullable animated host.
105
105
  if (!AnimatedPortalBoundaryHost) {
106
106
  return null;
107
107
  }
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireWildcard","_constants","_composeSlotStyle","_animation","_linkPairs","_links","_scroll","_teleport","_hasLocalSlot","_offsetStyle","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","AnimatedPortalBoundaryHost","NativePortalHost","Animated","createAnimatedComponent","PortalBoundaryHost","exports","memo","host","style","sourceScrollMetadata","ScrollStore","getValue","getSourceScreenKeyFromPairKey","pairKey","hostVisualProgress","AnimationStore","screenKey","hostStyle","useAnimatedStyle","link","getLink","boundaryId","source","destination","NO_STYLES","sourceBounds","bounds","isCrossScreenPortal","landingShift","landingWeight","Math","min","max","liveScroll","capturedScroll","scroll","x","getClampedScrollAxisDelta","y","resolvePortalOffsetStyle","hostKey","placement","contentFrameStyle","height","width","slotStyle","escapeClipping","hasLocalSlot","localStylesMaps","slot","slotsMap","composeSlotStyleWithLocalTransform","undefined","boundsLocalTransform","jsx","View","pointerEvents","collapsable","children","name","portalHostName","styles","content","StyleSheet","create","left","position","top"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,OAAA,GAAAT,OAAA;AAKA,IAAAU,SAAA,GAAAV,OAAA;AACA,IAAAW,aAAA,GAAAX,OAAA;AACA,IAAAY,YAAA,GAAAZ,OAAA;AAAmE,IAAAa,WAAA,GAAAb,OAAA;AAAA,SAAAG,wBAAAW,CAAA,EAAA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F,sBAAA,CAAAsB,OAAQ,CAACgE,IAAI;IACbC,aAAa,EAAC,MAAM;IACpBhD,KAAK,EAAE,CAACA,KAAK,EAAES,SAAS,CAAE;IAC1BwC,WAAW,EAAE,KAAM;IAAAC,QAAA,eAEnB,IAAA9E,WAAA,CAAA0E,GAAA,EAACtD,0BAA0B;MAC1B2D,IAAI,EAAEpD,IAAI,CAACqD,cAAe;MAC1BpD,KAAK,EAAE,CAACqD,MAAM,CAACC,OAAO,EAAEpB,iBAAiB,EAAEG,SAAS;IAAE,CACtD;EAAC,CACY,CAAC;AAElB,CAAC,CAAC;AAEF,MAAMgB,MAAM,GAAGE,uBAAU,CAACC,MAAM,CAAC;EAChCF,OAAO,EAAE;IACRG,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE;EACN;AACD,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.BoundaryPortalSlot = void 0;
7
+ var _react = require("react");
8
+ var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
9
+ var _logger = require("../../../../../../utils/logger");
10
+ var _teleport = require("../../../teleport");
11
+ var _usePlaceholderStyles = require("../hooks/use-placeholder-styles");
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
14
+ const AnimatedNativePortal = _teleport.NativePortal ? _reactNativeReanimated.default.createAnimatedComponent(_teleport.NativePortal) : null;
15
+ const BoundaryPortalSlot = exports.BoundaryPortalSlot = /*#__PURE__*/(0, _react.memo)(function BoundaryPortalSlot({
16
+ id,
17
+ children,
18
+ enabled,
19
+ animatedProps,
20
+ pointerEvents,
21
+ placeholderRef
22
+ }) {
23
+ const isPortalEnabled = enabled && _teleport.isTeleportAvailable;
24
+ if (__DEV__ && enabled && !id) {
25
+ _logger.logger.warnOnce("portal:missing-id", "A boundary portal was rendered without an id; rendering inline.");
26
+ }
27
+ const {
28
+ handleOnLayout,
29
+ placeholderStyle
30
+ } = (0, _usePlaceholderStyles.usePlaceholderStyles)();
31
+ if (isPortalEnabled && AnimatedNativePortal) {
32
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
33
+ ref: placeholderRef,
34
+ onLayout: ({
35
+ nativeEvent: {
36
+ layout
37
+ }
38
+ }) => (0, _reactNativeReanimated.runOnUI)(handleOnLayout)(layout),
39
+ style: placeholderStyle,
40
+ pointerEvents: pointerEvents,
41
+ collapsable: false,
42
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedNativePortal, {
43
+ animatedProps: animatedProps,
44
+ name: id,
45
+ pointerEvents: pointerEvents,
46
+ children: children
47
+ })
48
+ });
49
+ }
50
+ return children;
51
+ });
52
+ //# sourceMappingURL=portal-slot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNativeReanimated","_interopRequireWildcard","_logger","_teleport","_usePlaceholderStyles","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","AnimatedNativePortal","TeleportPortal","Animated","createAnimatedComponent","BoundaryPortalSlot","exports","memo","id","children","enabled","animatedProps","pointerEvents","placeholderRef","isPortalEnabled","isTeleportAvailable","__DEV__","logger","warnOnce","handleOnLayout","placeholderStyle","usePlaceholderStyles","jsx","View","ref","onLayout","nativeEvent","layout","runOnUI","style","collapsable","name"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/components/portal-slot.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAOA,IAAAC,sBAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AAIA,IAAAK,qBAAA,GAAAL,OAAA;AAAuE,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAE,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,C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,"names":["hasLocalSlot","localStylesMaps","slotId","index","length","undefined","exports"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/helpers/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":[]}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createBoundaryPortalHostName = void 0;
7
+ const BOUNDARY_PORTAL_HOST_NAME_SUFFIX = "-portal-host";
8
+ const createBoundaryPortalHostName = (hostKey, boundaryId, pairKey) => {
9
+ "worklet";
10
+
11
+ return `${hostKey}-${pairKey ? `${pairKey}-` : ""}${boundaryId}${BOUNDARY_PORTAL_HOST_NAME_SUFFIX}`;
12
+ };
13
+ exports.createBoundaryPortalHostName = createBoundaryPortalHostName;
14
+ //# sourceMappingURL=host-name.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["BOUNDARY_PORTAL_HOST_NAME_SUFFIX","createBoundaryPortalHostName","hostKey","boundaryId","pairKey","exports"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/helpers/host-name.ts"],"mappings":";;;;;;AAAA,MAAMA,gCAAgC,GAAG,cAAc;AAEhD,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,GAAGH,gCAAgC,EAAE;AACpG,CAAC;AAACK,OAAA,CAAAJ,4BAAA,GAAAA,4BAAA","ignoreList":[]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.resolvePortalOffsetStyle = void 0;
7
- var _scroll = require("../../../../stores/scroll.store");
7
+ var _scroll = require("../../../../../../stores/scroll.store");
8
8
  var _hostBounds = require("../stores/host-bounds.store");
9
9
  /**
10
10
  * The two portal coordinate cases we support:
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_scroll","require","_hostBounds","resolvePortalOffsetStyle","bounds","hostKey","placement","landingShift","hostBounds","getPortalHostBounds","boundsScrollSnapshot","scroll","hostBoundsScrollSnapshot","alignHostToBoundsScroll","hostSnapshotDeltaX","getClampedScrollAxisDelta","hostSnapshotDeltaY","adjustedHostPageX","pageX","adjustedHostPageY","pageY","transform","translateY","y","translateX","x","exports"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.ts"],"mappings":";;;;;;AACA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgBO,MAAME,wBAAwB,GAAGA,CAAC;EACxCC,MAAM;EACNC,OAAO;EACPC,SAAS;EACTC;AAC+B,CAAC,KAAiB;EACjD,SAAS;;EACT,MAAMC,UAAU,GAAG,IAAAC,+BAAmB,EAACJ,OAAO,CAAC;EAC/C,MAAMK,oBAAoB,GAAGN,MAAM,CAACO,MAAM,IAAI,IAAI;EAClD,MAAMC,wBAAwB,GAAGJ,UAAU,EAAEG,MAAM,IAAI,IAAI;;EAE3D;EACA;EACA;EACA,MAAME,uBAAuB,GAAGP,SAAS,KAAK,aAAa;EAE3D,MAAMQ,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,EAAElB,MAAM,CAACgB,KAAK,GAAGD,iBAAiB,IAAIZ,YAAY,EAAEgB,CAAC,IAAI,CAAC;IAAE,CAAC,EACzE;MAAEC,UAAU,EAAEpB,MAAM,CAACc,KAAK,GAAGD,iBAAiB,IAAIV,YAAY,EAAEkB,CAAC,IAAI,CAAC;IAAE,CAAC;EAE3E,CAAC;AACF,CAAC;AAACC,OAAA,CAAAvB,wBAAA,GAAAA,wBAAA","ignoreList":[]}
@@ -0,0 +1,184 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useBoundaryPortalAttachment = void 0;
7
+ var _react = require("react");
8
+ var _reactNativeReanimated = require("react-native-reanimated");
9
+ var _descriptors = require("../../../../../../providers/screen/descriptors");
10
+ var _styles = require("../../../../../../providers/screen/styles");
11
+ var _state = require("../../../../../../stores/bounds/internals/state");
12
+ var _naming = require("../../../utils/naming");
13
+ var _ownership = require("../../../utils/ownership");
14
+ var _shallowEqual = require("../../../utils/shallow-equal");
15
+ var _teleportControl = require("../../../utils/teleport-control");
16
+ var _visibleHost = require("../../../utils/visible-host");
17
+ var _hostName = require("../helpers/host-name");
18
+ var _hostRegistry = require("../stores/host-registry.store");
19
+ var _portalBoundaryHost = require("../stores/portal-boundary-host.store");
20
+ const useBoundaryPortalAttachment = ({
21
+ boundaryId,
22
+ enabled
23
+ }) => {
24
+ const sourcePairKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.sourcePairKey);
25
+ const currentScreenKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.currentScreenKey);
26
+ const {
27
+ localStylesMaps,
28
+ nextInterpolatorReady,
29
+ slotsMap
30
+ } = (0, _styles.useScreenSlots)();
31
+ const [ownership, setOwnership] = (0, _react.useState)(null);
32
+ const requestedPortalHostName = (0, _reactNativeReanimated.useSharedValue)(null);
33
+ const visiblePortalHostName = (0, _reactNativeReanimated.useSharedValue)(null);
34
+ const mountedPortalBoundaryHostNamesRef = (0, _react.useRef)(new Set());
35
+ const escapeHostKey = (0, _hostRegistry.useActiveHostKey)(enabled ? currentScreenKey : null);
36
+ const updatePortalOwnership = (0, _react.useCallback)((hostScreenKey, ownerPairKey, ownerScreenKey) => {
37
+ if (hostScreenKey && ownerPairKey && ownerScreenKey) {
38
+ setOwnership(current => {
39
+ if (current?.hostScreenKey === hostScreenKey && current.ownerPairKey === ownerPairKey && current.ownerScreenKey === ownerScreenKey) {
40
+ return current;
41
+ }
42
+ return {
43
+ hostScreenKey,
44
+ ownerPairKey,
45
+ ownerScreenKey,
46
+ status: "complete"
47
+ };
48
+ });
49
+ return;
50
+ }
51
+ setOwnership(current => current ? null : current);
52
+ }, []);
53
+ const unmountOwnedPortalBoundaryHosts = (0, _react.useCallback)(() => {
54
+ for (const portalHostName of mountedPortalBoundaryHostNamesRef.current) {
55
+ (0, _portalBoundaryHost.unmountPortalBoundaryHostByName)(portalHostName);
56
+ }
57
+ mountedPortalBoundaryHostNamesRef.current.clear();
58
+ }, []);
59
+ (0, _react.useLayoutEffect)(() => {
60
+ if (!enabled || !ownership || !escapeHostKey) {
61
+ requestedPortalHostName.set(null);
62
+ visiblePortalHostName.set(null);
63
+ unmountOwnedPortalBoundaryHosts();
64
+ return;
65
+ }
66
+ const portalHostName = (0, _hostName.createBoundaryPortalHostName)(escapeHostKey, boundaryId, ownership.ownerPairKey);
67
+ (0, _portalBoundaryHost.mountPortalBoundaryHost)({
68
+ boundaryId,
69
+ escapeClipping: true,
70
+ hostKey: escapeHostKey,
71
+ localStylesMaps,
72
+ pairKey: ownership.ownerPairKey,
73
+ portalHostName,
74
+ screenKey: currentScreenKey,
75
+ slotsMap
76
+ });
77
+ mountedPortalBoundaryHostNamesRef.current.add(portalHostName);
78
+
79
+ // Request the new receiver immediately, but keep the currently visible
80
+ // receiver until the new interpolator is ready. This avoids a no-host gap
81
+ // during rapid close/open retargets.
82
+ requestedPortalHostName.set(portalHostName);
83
+ }, [boundaryId, currentScreenKey, enabled, escapeHostKey, localStylesMaps, ownership, requestedPortalHostName, slotsMap, unmountOwnedPortalBoundaryHosts, visiblePortalHostName]);
84
+ (0, _react.useLayoutEffect)(() => {
85
+ return () => {
86
+ requestedPortalHostName.set(null);
87
+ visiblePortalHostName.set(null);
88
+ unmountOwnedPortalBoundaryHosts();
89
+ };
90
+ }, [requestedPortalHostName, unmountOwnedPortalBoundaryHosts, visiblePortalHostName]);
91
+ (0, _reactNativeReanimated.useAnimatedReaction)(() => {
92
+ "worklet";
93
+
94
+ if (!enabled || !sourcePairKey) {
95
+ return {
96
+ hostScreenKey: null,
97
+ ownerPairKey: sourcePairKey,
98
+ ownerScreenKey: null,
99
+ status: "clear"
100
+ };
101
+ }
102
+ return (0, _ownership.resolveBoundaryPortalOwnership)({
103
+ boundaryId,
104
+ currentScreenKey,
105
+ handoff: false,
106
+ pairsState: _state.pairs.get(),
107
+ sourcePairKey
108
+ });
109
+ }, (signal, previousSignal) => {
110
+ "worklet";
111
+
112
+ if ((0, _shallowEqual.shallowEqual)(previousSignal, signal)) {
113
+ return;
114
+ }
115
+ (0, _reactNativeReanimated.runOnJS)(updatePortalOwnership)(signal.hostScreenKey, signal.ownerPairKey, signal.ownerScreenKey ?? undefined);
116
+ });
117
+ (0, _reactNativeReanimated.useAnimatedReaction)(() => {
118
+ "worklet";
119
+
120
+ const slot = slotsMap.get()[boundaryId];
121
+ const teleport = slot?.props?.teleport;
122
+ const shouldTeleport = (0, _teleportControl.shouldAttachBoundaryPortal)({
123
+ enabled,
124
+ teleport
125
+ });
126
+ const requestedName = requestedPortalHostName.get();
127
+ const visibleName = visiblePortalHostName.get();
128
+ const isInterpolatorReady = nextInterpolatorReady.get();
129
+ const nextVisibleName = (0, _visibleHost.resolveNextVisiblePortalHostName)({
130
+ isInterpolatorReady: isInterpolatorReady === 1,
131
+ requestedName,
132
+ shouldTeleport,
133
+ visibleName
134
+ });
135
+ return {
136
+ isInterpolatorReady,
137
+ nextVisibleName,
138
+ requestedName,
139
+ shouldTeleport,
140
+ teleport,
141
+ visibleName
142
+ };
143
+ }, (state, previousState) => {
144
+ "worklet";
145
+
146
+ if ((0, _shallowEqual.shallowEqual)(previousState, state)) {
147
+ return;
148
+ }
149
+ if (state.nextVisibleName !== state.visibleName) {
150
+ visiblePortalHostName.set(state.nextVisibleName);
151
+ return;
152
+ }
153
+ if (state.visibleName && state.visibleName === state.requestedName) {
154
+ (0, _reactNativeReanimated.runOnJS)(_portalBoundaryHost.dropStalePortalBoundaryHosts)({
155
+ boundaryId,
156
+ keepPortalHostName: state.visibleName
157
+ });
158
+ }
159
+ });
160
+ const teleportProps = (0, _reactNativeReanimated.useAnimatedProps)(() => {
161
+ "worklet";
162
+
163
+ const slot = slotsMap.get()[boundaryId];
164
+ const {
165
+ teleport,
166
+ ...slotProps
167
+ } = slot?.props ?? {};
168
+ const shouldTeleport = (0, _teleportControl.shouldAttachBoundaryPortal)({
169
+ enabled,
170
+ teleport
171
+ });
172
+ const visibleName = visiblePortalHostName.get();
173
+ return {
174
+ ...slotProps,
175
+ hostName: shouldTeleport && visibleName ? visibleName : _naming.PORTAL_HOST_NAME_RESET_VALUE
176
+ };
177
+ });
178
+ return {
179
+ teleportProps,
180
+ visiblePortalHostName
181
+ };
182
+ };
183
+ exports.useBoundaryPortalAttachment = useBoundaryPortalAttachment;
184
+ //# sourceMappingURL=use-boundary-portal-attachment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNativeReanimated","_descriptors","_styles","_state","_naming","_ownership","_shallowEqual","_teleportControl","_visibleHost","_hostName","_hostRegistry","_portalBoundaryHost","useBoundaryPortalAttachment","boundaryId","enabled","sourcePairKey","useDescriptorsStore","s","derivations","currentScreenKey","localStylesMaps","nextInterpolatorReady","slotsMap","useScreenSlots","ownership","setOwnership","useState","requestedPortalHostName","useSharedValue","visiblePortalHostName","mountedPortalBoundaryHostNamesRef","useRef","Set","escapeHostKey","useActiveHostKey","updatePortalOwnership","useCallback","hostScreenKey","ownerPairKey","ownerScreenKey","current","status","unmountOwnedPortalBoundaryHosts","portalHostName","unmountPortalBoundaryHostByName","clear","useLayoutEffect","set","createBoundaryPortalHostName","mountPortalBoundaryHost","escapeClipping","hostKey","pairKey","screenKey","add","useAnimatedReaction","resolveBoundaryPortalOwnership","handoff","pairsState","pairs","get","signal","previousSignal","shallowEqual","runOnJS","undefined","slot","teleport","props","shouldTeleport","shouldAttachBoundaryPortal","requestedName","visibleName","isInterpolatorReady","nextVisibleName","resolveNextVisiblePortalHostName","state","previousState","dropStalePortalBoundaryHosts","keepPortalHostName","teleportProps","useAnimatedProps","slotProps","hostName","PORTAL_HOST_NAME_RESET_VALUE","exports"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AAMA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AAIA,IAAAO,aAAA,GAAAP,OAAA;AACA,IAAAQ,gBAAA,GAAAR,OAAA;AACA,IAAAS,YAAA,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AC;IACF,MAAMK,WAAW,GAAG3C,qBAAqB,CAAC+B,GAAG,CAAC,CAAC;IAE/C,OAAO;MACN,GAAGsB,SAAS;MACZC,QAAQ,EACPd,cAAc,IAAIG,WAAW,GAC1BA,WAAW,GACXY;IACL,CAAC;EACF,CAAC,CAAC;EAEF,OAAO;IACNJ,aAAa;IACbnD;EACD,CAAC;AACF,CAAC;AAACwD,OAAA,CAAAzE,2BAAA,GAAAA,2BAAA","ignoreList":[]}
@@ -6,16 +6,20 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.useHostMeasurement = void 0;
7
7
  var _react = require("react");
8
8
  var _reactNativeReanimated = require("react-native-reanimated");
9
- var _origin = require("../../../../providers/screen/origin.provider");
10
- var _scroll = require("../../../../stores/scroll.store");
11
- var _measuredBounds = require("../../utils/measured-bounds");
9
+ var _origin = require("../../../../../../providers/screen/origin.provider");
10
+ var _scroll = require("../../../../../../stores/scroll.store");
11
+ var _visibilityBlockOffset = require("../../../../../../utils/visibility-block-offset");
12
+ var _measuredBounds = require("../../../../utils/measured-bounds");
12
13
  var _hostBounds = require("../stores/host-bounds.store");
13
14
  const HOST_MEASUREMENT_RETRY_DELAY_MS = 16;
14
15
  const useHostMeasurement = ({
15
16
  capturesScroll,
16
17
  enabled,
17
18
  hostKey,
18
- screenKey
19
+ screenKey,
20
+ visibilityBlocked,
21
+ viewportHeight,
22
+ viewportWidth
19
23
  }) => {
20
24
  const hostRef = (0, _reactNativeReanimated.useAnimatedRef)();
21
25
  const scrollMetadata = _scroll.ScrollStore.getValue(screenKey, "metadata");
@@ -60,7 +64,21 @@ const useHostMeasurement = ({
60
64
  // position instead; clamped scroll deltas share that basis.
61
65
  const currentScroll = scrollMetadata.get();
62
66
  const overscrollNormalized = capturesScroll ? (0, _measuredBounds.adjustedMeasuredBoundsForOverscrollDeltas)(measured, currentScroll) : measured;
63
- const normalizedMeasured = (0, _measuredBounds.normalizeMeasuredBoundsToOrigin)(overscrollNormalized, measuredOrigin);
67
+ const normalizedMeasured = (0, _measuredBounds.normalizeMeasuredBoundsWithVisibilityGate)({
68
+ measured: overscrollNormalized,
69
+ origin: measuredOrigin,
70
+ visibilityBlocked: visibilityBlocked.get(),
71
+ visibilityBlockOffset: (0, _visibilityBlockOffset.getVisibilityBlockOffset)(viewportHeight),
72
+ viewportWidth,
73
+ viewportHeight
74
+ });
75
+ if (!(0, _measuredBounds.isMeasurementInViewport)(normalizedMeasured, viewportWidth, viewportHeight)) {
76
+ (0, _reactNativeReanimated.cancelAnimation)(retryToken);
77
+ retryToken.set((0, _reactNativeReanimated.withDelay)(HOST_MEASUREMENT_RETRY_DELAY_MS, (0, _reactNativeReanimated.withTiming)(retryToken.get() + 1, {
78
+ duration: 0
79
+ })));
80
+ return;
81
+ }
64
82
  (0, _hostBounds.setPortalHostBounds)(hostKey, {
65
83
  x: normalizedMeasured.x,
66
84
  y: normalizedMeasured.y,
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNativeReanimated","_origin","_scroll","_visibilityBlockOffset","_measuredBounds","_hostBounds","HOST_MEASUREMENT_RETRY_DELAY_MS","useHostMeasurement","capturesScroll","enabled","hostKey","screenKey","visibilityBlocked","viewportHeight","viewportWidth","hostRef","useAnimatedRef","scrollMetadata","ScrollStore","getValue","canRenderHosts","setCanRenderHosts","useState","originRef","useOriginContext","hasMeasuredHost","useSharedValue","retryToken","useAnimatedReaction","get","state","cancelAnimation","hasAlreadyMeasured","measured","measure","measuredOrigin","set","withDelay","withTiming","duration","currentScroll","overscrollNormalized","adjustedMeasuredBoundsForOverscrollDeltas","normalizedMeasured","normalizeMeasuredBoundsWithVisibilityGate","origin","visibilityBlockOffset","getVisibilityBlockOffset","isMeasurementInViewport","setPortalHostBounds","x","y","width","height","pageX","pageY","scroll","runOnJS","useLayoutEffect","runOnUI","clearPortalHostBounds","exports"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.ts"],"mappings":";;;;;;AAA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ACD;IAEA,IAAAU,+BAAmB,EAACvC,OAAO,EAAE;MAC5BwC,CAAC,EAAEP,kBAAkB,CAACO,CAAC;MACvBC,CAAC,EAAER,kBAAkB,CAACQ,CAAC;MACvBC,KAAK,EAAET,kBAAkB,CAACS,KAAK;MAC/BC,MAAM,EAAEV,kBAAkB,CAACU,MAAM;MACjCC,KAAK,EAAEX,kBAAkB,CAACW,KAAK;MAC/BC,KAAK,EAAEZ,kBAAkB,CAACY,KAAK;MAC/BC,MAAM,EAAEhD,cAAc,GAAGgC,aAAa,GAAG;IAC1C,CAAC,CAAC;IAEF,IAAAiB,8BAAO,EAACpC,iBAAiB,CAAC,CAAC,IAAI,CAAC;EACjC,CACD,CAAC;EAED,IAAAqC,sBAAe,EAAC,MAAM;IACrB,OAAO,MAAM;MACZ,IAAAC,8BAAO,EAACC,iCAAqB,CAAC,CAAClD,OAAO,CAAC;IACxC,CAAC;EACF,CAAC,EAAE,CAACA,OAAO,CAAC,CAAC;EAEb,OAAO;IACNU,cAAc;IACdL;EACD,CAAC;AACF,CAAC;AAAC8C,OAAA,CAAAtD,kBAAA,GAAAA,kBAAA","ignoreList":[]}
@@ -6,22 +6,19 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.usePlaceholderStyles = void 0;
7
7
  var _react = require("react");
8
8
  var _reactNativeReanimated = require("react-native-reanimated");
9
- const usePlaceholderStyles = ({
10
- visiblePortalHostName
11
- }) => {
9
+ const usePlaceholderStyles = () => {
12
10
  const placeholderWidth = (0, _reactNativeReanimated.useSharedValue)(0);
13
11
  const placeholderHeight = (0, _reactNativeReanimated.useSharedValue)(0);
14
12
  // Pin the placeholder to its measured size while content lives in the host,
15
- // in the same UI frame the host name flips no commit in between. Until the
13
+ // in the same UI frame the host name flips - no commit in between. Until the
16
14
  // first layout lands (dims 0) sizing stays natural so an instant attach
17
15
  // cannot collapse the slot.
18
16
  const placeholderStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
19
17
  "worklet";
20
18
 
21
- const isAttached = visiblePortalHostName.get() !== null;
22
19
  const width = placeholderWidth.get();
23
20
  const height = placeholderHeight.get();
24
- if (!isAttached || width === 0) {
21
+ if (width === 0) {
25
22
  return {
26
23
  width: "auto",
27
24
  height: "auto"
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNativeReanimated","usePlaceholderStyles","placeholderWidth","useSharedValue","placeholderHeight","placeholderStyle","useAnimatedStyle","width","get","height","handleOnLayout","useCallback","layout","hasValidDimensions","set","exports"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/hooks/use-placeholder-styles.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,sBAAA,GAAAD,OAAA;AAEO,MAAME,oBAAoB,GAAGA,CAAA,KAAM;EACzC,MAAMC,gBAAgB,GAAG,IAAAC,qCAAc,EAAC,CAAC,CAAC;EAC1C,MAAMC,iBAAiB,GAAG,IAAAD,qCAAc,EAAC,CAAC,CAAC;EAC3C;EACA;EACA;EACA;EACA,MAAME,gBAAgB,GAAG,IAAAC,uCAAgB,EAAC,MAAM;IAC/C,SAAS;;IACT,MAAMC,KAAK,GAAGL,gBAAgB,CAACM,GAAG,CAAC,CAAC;IACpC,MAAMC,MAAM,GAAGL,iBAAiB,CAACI,GAAG,CAAC,CAAC;IAEtC,IAAID,KAAK,KAAK,CAAC,EAAE;MAChB,OAAO;QAAEA,KAAK,EAAE,MAAM;QAAEE,MAAM,EAAE;MAAO,CAAC;IACzC;IAEA,OAAO;MAAEF,KAAK;MAAEE;IAAO,CAAC;EACzB,CAAC,CAAC;EAEF,MAAMC,cAAc,GAAG,IAAAC,kBAAW,EAChCC,MAAuB,IAAK;IAC5B,SAAS;;IACT,MAAM;MAAEL,KAAK;MAAEE;IAAO,CAAC,GAAGG,MAAM;IAChC,IAAIL,KAAK,KAAK,CAAC,IAAIE,MAAM,KAAK,CAAC,EAAE;MAChC;IACD;IAEA,MAAMI,kBAAk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