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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (479) 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 +33 -28
  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 +75 -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 +41 -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 +224 -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 +45 -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} +20 -18
  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} +13 -12
  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 +51 -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 +185 -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 +31 -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 +4 -3
  53. package/lib/commonjs/shared/components/boundary/portal/teleport.js.map +1 -1
  54. package/lib/commonjs/shared/components/boundary/portal/utils/naming.js +1 -15
  55. package/lib/commonjs/shared/components/boundary/portal/utils/naming.js.map +1 -1
  56. package/lib/commonjs/shared/components/boundary/portal/utils/ownership.js +19 -56
  57. package/lib/commonjs/shared/components/boundary/portal/utils/ownership.js.map +1 -1
  58. package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js +90 -23
  59. package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
  60. package/lib/commonjs/shared/components/boundary/utils/destination-signals.js +41 -12
  61. package/lib/commonjs/shared/components/boundary/utils/destination-signals.js.map +1 -1
  62. package/lib/commonjs/shared/components/boundary/utils/measured-bounds.js +36 -1
  63. package/lib/commonjs/shared/components/boundary/utils/measured-bounds.js.map +1 -1
  64. package/lib/commonjs/shared/components/screen-container/layers/content.js +1 -1
  65. package/lib/commonjs/shared/configs/presets.js +2 -2
  66. package/lib/commonjs/shared/configs/presets.js.map +1 -1
  67. package/lib/commonjs/shared/constants.js +4 -0
  68. package/lib/commonjs/shared/constants.js.map +1 -1
  69. package/lib/commonjs/shared/index.js +13 -0
  70. package/lib/commonjs/shared/index.js.map +1 -1
  71. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +4 -0
  72. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
  73. package/lib/commonjs/shared/providers/screen/gestures/pan/activation/use-pan-activation.js +10 -10
  74. package/lib/commonjs/shared/providers/screen/gestures/pan/activation/use-pan-activation.js.map +1 -1
  75. package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js +10 -2
  76. package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js.map +1 -1
  77. package/lib/commonjs/shared/providers/screen/gestures/pan/use-build-pan-gesture.js +1 -1
  78. package/lib/commonjs/shared/providers/screen/gestures/pan/use-build-pan-gesture.js.map +1 -1
  79. package/lib/commonjs/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js +25 -3
  80. package/lib/commonjs/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js.map +1 -1
  81. package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js +4 -6
  82. package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js.map +1 -1
  83. package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js +2 -2
  84. package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js.map +1 -1
  85. package/lib/commonjs/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.js +6 -1
  86. package/lib/commonjs/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.js.map +1 -1
  87. package/lib/commonjs/shared/providers/screen/gestures/shared/snapshot.js +2 -0
  88. package/lib/commonjs/shared/providers/screen/gestures/shared/snapshot.js.map +1 -1
  89. package/lib/commonjs/shared/providers/screen/gestures/shared/values.js +2 -0
  90. package/lib/commonjs/shared/providers/screen/gestures/shared/values.js.map +1 -1
  91. package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +13 -1
  92. package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
  93. package/lib/commonjs/shared/providers/screen/styles/slot.provider.js +5 -3
  94. package/lib/commonjs/shared/providers/screen/styles/slot.provider.js.map +1 -1
  95. package/lib/commonjs/shared/providers/screen/styles/stores/slot-references.store.js +1 -1
  96. package/lib/commonjs/shared/providers/screen/styles/stores/slot-references.store.js.map +1 -1
  97. package/lib/commonjs/shared/stores/gesture.store.js +8 -0
  98. package/lib/commonjs/shared/stores/gesture.store.js.map +1 -1
  99. package/lib/commonjs/shared/stores/system.store.js +10 -2
  100. package/lib/commonjs/shared/stores/system.store.js.map +1 -1
  101. package/lib/commonjs/shared/utils/animation/animate-to-progress.js +24 -7
  102. package/lib/commonjs/shared/utils/animation/animate-to-progress.js.map +1 -1
  103. package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js +15 -9
  104. package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
  105. package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js +2 -2
  106. package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
  107. package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js +2 -1
  108. package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
  109. package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js +178 -315
  110. package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
  111. package/lib/commonjs/shared/utils/bounds/navigation/zoom/config.js +12 -18
  112. package/lib/commonjs/shared/utils/bounds/navigation/zoom/config.js.map +1 -1
  113. package/lib/commonjs/shared/utils/bounds/navigation/zoom/drag.js +196 -0
  114. package/lib/commonjs/shared/utils/bounds/navigation/zoom/drag.js.map +1 -0
  115. package/lib/commonjs/shared/utils/bounds/navigation/zoom/helpers.js +94 -108
  116. package/lib/commonjs/shared/utils/bounds/navigation/zoom/helpers.js.map +1 -1
  117. package/lib/commonjs/shared/utils/bounds/navigation/zoom/mask.js +72 -0
  118. package/lib/commonjs/shared/utils/bounds/navigation/zoom/mask.js.map +1 -0
  119. package/lib/commonjs/shared/utils/bounds/navigation/zoom/targets.js +55 -0
  120. package/lib/commonjs/shared/utils/bounds/navigation/zoom/targets.js.map +1 -0
  121. package/lib/module/shared/adapters/with-screen-transitions/index.js +19 -5
  122. package/lib/module/shared/adapters/with-screen-transitions/index.js.map +1 -1
  123. package/lib/module/shared/animation/transition-blocking.js +66 -0
  124. package/lib/module/shared/animation/transition-blocking.js.map +1 -0
  125. package/lib/module/shared/components/boundary/components/boundary-target.js +35 -30
  126. package/lib/module/shared/components/boundary/components/boundary-target.js.map +1 -1
  127. package/lib/module/shared/components/boundary/create-boundary-component.js +32 -97
  128. package/lib/module/shared/components/boundary/create-boundary-component.js.map +1 -1
  129. package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +79 -55
  130. package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -1
  131. package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js +1 -0
  132. package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
  133. package/lib/module/shared/components/boundary/hooks/use-measurer.js +15 -3
  134. package/lib/module/shared/components/boundary/hooks/use-measurer.js.map +1 -1
  135. package/lib/module/shared/components/boundary/hooks/use-register-target.js +27 -0
  136. package/lib/module/shared/components/boundary/hooks/use-register-target.js.map +1 -0
  137. package/lib/module/shared/components/boundary/index.js +1 -1
  138. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/components/host.js +36 -0
  139. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/components/host.js.map +1 -0
  140. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.js +9 -0
  141. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.js.map +1 -0
  142. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +219 -0
  143. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -0
  144. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/index.js +34 -0
  145. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/index.js.map +1 -0
  146. package/lib/module/shared/components/boundary/portal/components/{host.js → boundary-portal/components/host.js} +20 -18
  147. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/host.js.map +1 -0
  148. package/lib/module/shared/components/boundary/portal/components/{portal-boundary-host.js → boundary-portal/components/portal-boundary-host.js} +13 -12
  149. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -0
  150. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js +46 -0
  151. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js.map +1 -0
  152. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.js.map +1 -0
  153. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/host-name.js +9 -0
  154. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/host-name.js.map +1 -0
  155. package/lib/module/shared/components/boundary/portal/{utils → components/boundary-portal/helpers}/offset-style.js +1 -1
  156. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.js.map +1 -0
  157. package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +180 -0
  158. package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -0
  159. package/lib/module/shared/components/boundary/portal/{hooks → components/boundary-portal/hooks}/use-host-measurement.js +23 -5
  160. package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js.map +1 -0
  161. package/lib/module/shared/components/boundary/portal/{hooks → components/boundary-portal/hooks}/use-placeholder-styles.js +3 -6
  162. package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-placeholder-styles.js.map +1 -0
  163. package/lib/module/shared/components/boundary/portal/components/boundary-portal/index.js +27 -0
  164. package/lib/module/shared/components/boundary/portal/components/boundary-portal/index.js.map +1 -0
  165. package/lib/module/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-bounds.store.js +1 -1
  166. package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.js.map +1 -0
  167. package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/host-registry.store.js.map +1 -0
  168. package/lib/module/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/portal-boundary-host.store.js +5 -10
  169. package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -0
  170. package/lib/module/shared/components/boundary/portal/index.js +1 -2
  171. package/lib/module/shared/components/boundary/portal/index.js.map +1 -1
  172. package/lib/module/shared/components/boundary/portal/teleport.js +3 -2
  173. package/lib/module/shared/components/boundary/portal/teleport.js.map +1 -1
  174. package/lib/module/shared/components/boundary/portal/utils/naming.js +0 -12
  175. package/lib/module/shared/components/boundary/portal/utils/naming.js.map +1 -1
  176. package/lib/module/shared/components/boundary/portal/utils/ownership.js +16 -52
  177. package/lib/module/shared/components/boundary/portal/utils/ownership.js.map +1 -1
  178. package/lib/module/shared/components/boundary/providers/boundary-root.provider.js +87 -20
  179. package/lib/module/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
  180. package/lib/module/shared/components/boundary/utils/destination-signals.js +39 -10
  181. package/lib/module/shared/components/boundary/utils/destination-signals.js.map +1 -1
  182. package/lib/module/shared/components/boundary/utils/measured-bounds.js +34 -0
  183. package/lib/module/shared/components/boundary/utils/measured-bounds.js.map +1 -1
  184. package/lib/module/shared/components/screen-container/layers/content.js +1 -1
  185. package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
  186. package/lib/module/shared/configs/presets.js +2 -2
  187. package/lib/module/shared/configs/presets.js.map +1 -1
  188. package/lib/module/shared/constants.js +4 -0
  189. package/lib/module/shared/constants.js.map +1 -1
  190. package/lib/module/shared/index.js +1 -0
  191. package/lib/module/shared/index.js.map +1 -1
  192. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +4 -0
  193. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
  194. package/lib/module/shared/providers/screen/gestures/pan/activation/use-pan-activation.js +10 -10
  195. package/lib/module/shared/providers/screen/gestures/pan/activation/use-pan-activation.js.map +1 -1
  196. package/lib/module/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js +10 -2
  197. package/lib/module/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js.map +1 -1
  198. package/lib/module/shared/providers/screen/gestures/pan/use-build-pan-gesture.js +1 -1
  199. package/lib/module/shared/providers/screen/gestures/pan/use-build-pan-gesture.js.map +1 -1
  200. package/lib/module/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js +23 -2
  201. package/lib/module/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js.map +1 -1
  202. package/lib/module/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js +4 -6
  203. package/lib/module/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js.map +1 -1
  204. package/lib/module/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js +2 -2
  205. package/lib/module/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js.map +1 -1
  206. package/lib/module/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.js +6 -1
  207. package/lib/module/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.js.map +1 -1
  208. package/lib/module/shared/providers/screen/gestures/shared/snapshot.js +2 -0
  209. package/lib/module/shared/providers/screen/gestures/shared/snapshot.js.map +1 -1
  210. package/lib/module/shared/providers/screen/gestures/shared/values.js +2 -0
  211. package/lib/module/shared/providers/screen/gestures/shared/values.js.map +1 -1
  212. package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +13 -1
  213. package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
  214. package/lib/module/shared/providers/screen/styles/slot.provider.js +5 -3
  215. package/lib/module/shared/providers/screen/styles/slot.provider.js.map +1 -1
  216. package/lib/module/shared/providers/screen/styles/stores/slot-references.store.js +1 -1
  217. package/lib/module/shared/providers/screen/styles/stores/slot-references.store.js.map +1 -1
  218. package/lib/module/shared/stores/gesture.store.js +8 -0
  219. package/lib/module/shared/stores/gesture.store.js.map +1 -1
  220. package/lib/module/shared/stores/system.store.js +10 -2
  221. package/lib/module/shared/stores/system.store.js.map +1 -1
  222. package/lib/module/shared/types/bounds.types.js +26 -0
  223. package/lib/module/shared/types/bounds.types.js.map +1 -1
  224. package/lib/module/shared/utils/animation/animate-to-progress.js +24 -7
  225. package/lib/module/shared/utils/animation/animate-to-progress.js.map +1 -1
  226. package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js +15 -9
  227. package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
  228. package/lib/module/shared/utils/bounds/navigation/reveal/build.js +2 -2
  229. package/lib/module/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
  230. package/lib/module/shared/utils/bounds/navigation/reveal/math.js +2 -1
  231. package/lib/module/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
  232. package/lib/module/shared/utils/bounds/navigation/zoom/build.js +182 -319
  233. package/lib/module/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
  234. package/lib/module/shared/utils/bounds/navigation/zoom/config.js +11 -17
  235. package/lib/module/shared/utils/bounds/navigation/zoom/config.js.map +1 -1
  236. package/lib/module/shared/utils/bounds/navigation/zoom/drag.js +184 -0
  237. package/lib/module/shared/utils/bounds/navigation/zoom/drag.js.map +1 -0
  238. package/lib/module/shared/utils/bounds/navigation/zoom/helpers.js +91 -102
  239. package/lib/module/shared/utils/bounds/navigation/zoom/helpers.js.map +1 -1
  240. package/lib/module/shared/utils/bounds/navigation/zoom/mask.js +67 -0
  241. package/lib/module/shared/utils/bounds/navigation/zoom/mask.js.map +1 -0
  242. package/lib/module/shared/utils/bounds/navigation/zoom/targets.js +50 -0
  243. package/lib/module/shared/utils/bounds/navigation/zoom/targets.js.map +1 -0
  244. package/lib/typescript/shared/adapters/with-screen-transitions/index.d.ts +4 -1
  245. package/lib/typescript/shared/adapters/with-screen-transitions/index.d.ts.map +1 -1
  246. package/lib/typescript/shared/animation/transition-blocking.d.ts +33 -0
  247. package/lib/typescript/shared/animation/transition-blocking.d.ts.map +1 -0
  248. package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts +3 -1
  249. package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts.map +1 -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-initial-destination-measurement.d.ts +2 -1
  252. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts.map +1 -1
  253. package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts.map +1 -1
  254. package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts.map +1 -1
  255. package/lib/typescript/shared/components/boundary/hooks/use-register-target.d.ts +10 -0
  256. package/lib/typescript/shared/components/boundary/hooks/use-register-target.d.ts.map +1 -0
  257. package/lib/typescript/shared/components/boundary/index.d.ts +2 -2
  258. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/components/host.d.ts +10 -0
  259. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/components/host.d.ts.map +1 -0
  260. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.d.ts +2 -0
  261. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.d.ts.map +1 -0
  262. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.d.ts +12 -0
  263. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.d.ts.map +1 -0
  264. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/index.d.ts +9 -0
  265. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/index.d.ts.map +1 -0
  266. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/host.d.ts.map +1 -0
  267. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.d.ts.map +1 -0
  268. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.d.ts +13 -0
  269. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.d.ts.map +1 -0
  270. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.d.ts +3 -0
  271. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.d.ts.map +1 -0
  272. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/host-name.d.ts +2 -0
  273. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/host-name.d.ts.map +1 -0
  274. package/lib/typescript/shared/components/boundary/portal/{utils → components/boundary-portal/helpers}/offset-style.d.ts +1 -1
  275. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.d.ts.map +1 -0
  276. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts +12 -0
  277. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts.map +1 -0
  278. package/lib/typescript/shared/components/boundary/portal/{hooks → components/boundary-portal/hooks}/use-host-measurement.d.ts +5 -1
  279. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.d.ts.map +1 -0
  280. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-placeholder-styles.d.ts +12 -0
  281. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-placeholder-styles.d.ts.map +1 -0
  282. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/index.d.ts +12 -0
  283. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/index.d.ts.map +1 -0
  284. package/lib/typescript/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-bounds.store.d.ts +1 -1
  285. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.d.ts.map +1 -0
  286. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/host-registry.store.d.ts.map +1 -0
  287. package/lib/typescript/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/portal-boundary-host.store.d.ts +3 -3
  288. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts.map +1 -0
  289. package/lib/typescript/shared/components/boundary/portal/index.d.ts +1 -2
  290. package/lib/typescript/shared/components/boundary/portal/index.d.ts.map +1 -1
  291. package/lib/typescript/shared/components/boundary/portal/teleport.d.ts +1 -0
  292. package/lib/typescript/shared/components/boundary/portal/teleport.d.ts.map +1 -1
  293. package/lib/typescript/shared/components/boundary/portal/utils/naming.d.ts +0 -2
  294. package/lib/typescript/shared/components/boundary/portal/utils/naming.d.ts.map +1 -1
  295. package/lib/typescript/shared/components/boundary/portal/utils/ownership.d.ts +9 -10
  296. package/lib/typescript/shared/components/boundary/portal/utils/ownership.d.ts.map +1 -1
  297. package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts +22 -21
  298. package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts.map +1 -1
  299. package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts +9 -2
  300. package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts.map +1 -1
  301. package/lib/typescript/shared/components/boundary/utils/measured-bounds.d.ts +8 -0
  302. package/lib/typescript/shared/components/boundary/utils/measured-bounds.d.ts.map +1 -1
  303. package/lib/typescript/shared/constants.d.ts.map +1 -1
  304. package/lib/typescript/shared/index.d.ts +2 -1
  305. package/lib/typescript/shared/index.d.ts.map +1 -1
  306. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts.map +1 -1
  307. package/lib/typescript/shared/providers/screen/gestures/pan/activation/use-pan-activation.d.ts +2 -0
  308. package/lib/typescript/shared/providers/screen/gestures/pan/activation/use-pan-activation.d.ts.map +1 -1
  309. package/lib/typescript/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.d.ts +2 -1
  310. package/lib/typescript/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.d.ts.map +1 -1
  311. package/lib/typescript/shared/providers/screen/gestures/pan/use-build-pan-gesture.d.ts.map +1 -1
  312. package/lib/typescript/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.d.ts +2 -0
  313. package/lib/typescript/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.d.ts.map +1 -1
  314. package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.d.ts +1 -1
  315. package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.d.ts.map +1 -1
  316. package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.d.ts.map +1 -1
  317. package/lib/typescript/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.d.ts.map +1 -1
  318. package/lib/typescript/shared/providers/screen/gestures/shared/snapshot.d.ts.map +1 -1
  319. package/lib/typescript/shared/providers/screen/gestures/shared/values.d.ts.map +1 -1
  320. package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts +5 -0
  321. package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts.map +1 -1
  322. package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts +1 -0
  323. package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts.map +1 -1
  324. package/lib/typescript/shared/providers/screen/styles/stores/slot-references.store.d.ts.map +1 -1
  325. package/lib/typescript/shared/stores/gesture.store.d.ts +4 -0
  326. package/lib/typescript/shared/stores/gesture.store.d.ts.map +1 -1
  327. package/lib/typescript/shared/stores/system.store.d.ts.map +1 -1
  328. package/lib/typescript/shared/types/animation.types.d.ts +3 -3
  329. package/lib/typescript/shared/types/bounds.types.d.ts +122 -90
  330. package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
  331. package/lib/typescript/shared/types/gesture.types.d.ts +10 -0
  332. package/lib/typescript/shared/types/gesture.types.d.ts.map +1 -1
  333. package/lib/typescript/shared/types/index.d.ts +1 -1
  334. package/lib/typescript/shared/types/index.d.ts.map +1 -1
  335. package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts.map +1 -1
  336. package/lib/typescript/shared/utils/bounds/helpers/create-bounds-accessor-core.d.ts.map +1 -1
  337. package/lib/typescript/shared/utils/bounds/navigation/reveal/math.d.ts.map +1 -1
  338. package/lib/typescript/shared/utils/bounds/navigation/zoom/build.d.ts +1 -1
  339. package/lib/typescript/shared/utils/bounds/navigation/zoom/build.d.ts.map +1 -1
  340. package/lib/typescript/shared/utils/bounds/navigation/zoom/config.d.ts +7 -17
  341. package/lib/typescript/shared/utils/bounds/navigation/zoom/config.d.ts.map +1 -1
  342. package/lib/typescript/shared/utils/bounds/navigation/zoom/drag.d.ts +55 -0
  343. package/lib/typescript/shared/utils/bounds/navigation/zoom/drag.d.ts.map +1 -0
  344. package/lib/typescript/shared/utils/bounds/navigation/zoom/helpers.d.ts +31 -34
  345. package/lib/typescript/shared/utils/bounds/navigation/zoom/helpers.d.ts.map +1 -1
  346. package/lib/typescript/shared/utils/bounds/navigation/zoom/mask.d.ts +25 -0
  347. package/lib/typescript/shared/utils/bounds/navigation/zoom/mask.d.ts.map +1 -0
  348. package/lib/typescript/shared/utils/bounds/navigation/zoom/targets.d.ts +16 -0
  349. package/lib/typescript/shared/utils/bounds/navigation/zoom/targets.d.ts.map +1 -0
  350. package/lib/typescript/shared/utils/bounds/navigation/zoom/types.d.ts +1 -1
  351. package/lib/typescript/shared/utils/bounds/navigation/zoom/types.d.ts.map +1 -1
  352. package/lib/typescript/shared/utils/bounds/types/options.d.ts +6 -2
  353. package/lib/typescript/shared/utils/bounds/types/options.d.ts.map +1 -1
  354. package/package.json +1 -1
  355. package/src/shared/adapters/with-screen-transitions/index.tsx +30 -9
  356. package/src/shared/animation/transition-blocking.ts +79 -0
  357. package/src/shared/components/boundary/components/boundary-target.tsx +47 -43
  358. package/src/shared/components/boundary/create-boundary-component.tsx +35 -150
  359. package/src/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.ts +106 -81
  360. package/src/shared/components/boundary/hooks/use-boundary-measurement.ts +1 -0
  361. package/src/shared/components/boundary/hooks/use-measurer.ts +12 -4
  362. package/src/shared/components/boundary/hooks/use-register-target.ts +43 -0
  363. package/src/shared/components/boundary/index.tsx +2 -2
  364. package/src/shared/components/boundary/portal/components/boundary-content-portal/components/host.tsx +52 -0
  365. package/src/shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.ts +9 -0
  366. package/src/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.ts +317 -0
  367. package/src/shared/components/boundary/portal/components/boundary-content-portal/index.tsx +62 -0
  368. package/src/shared/components/boundary/portal/components/{host.tsx → boundary-portal/components/host.tsx} +17 -17
  369. package/src/shared/components/boundary/portal/components/{portal-boundary-host.tsx → boundary-portal/components/portal-boundary-host.tsx} +14 -13
  370. package/src/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.tsx +79 -0
  371. package/src/shared/components/boundary/portal/{utils → components/boundary-portal/helpers}/has-local-slot.ts +1 -1
  372. package/src/shared/components/boundary/portal/components/boundary-portal/helpers/host-name.ts +10 -0
  373. package/src/shared/components/boundary/portal/{utils → components/boundary-portal/helpers}/offset-style.ts +2 -2
  374. package/src/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts +254 -0
  375. package/src/shared/components/boundary/portal/{hooks → components/boundary-portal/hooks}/use-host-measurement.ts +38 -8
  376. package/src/shared/components/boundary/portal/{hooks → components/boundary-portal/hooks}/use-placeholder-styles.ts +4 -15
  377. package/src/shared/components/boundary/portal/components/boundary-portal/index.tsx +35 -0
  378. package/src/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-bounds.store.ts +2 -2
  379. package/src/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/portal-boundary-host.store.ts +10 -15
  380. package/src/shared/components/boundary/portal/index.ts +1 -2
  381. package/src/shared/components/boundary/portal/teleport.ts +3 -2
  382. package/src/shared/components/boundary/portal/utils/naming.ts +0 -19
  383. package/src/shared/components/boundary/portal/utils/ownership.ts +32 -88
  384. package/src/shared/components/boundary/providers/boundary-root.provider.tsx +218 -78
  385. package/src/shared/components/boundary/utils/destination-signals.ts +38 -14
  386. package/src/shared/components/boundary/utils/measured-bounds.ts +48 -0
  387. package/src/shared/components/screen-container/layers/content.tsx +1 -1
  388. package/src/shared/configs/presets.ts +2 -2
  389. package/src/shared/constants.ts +4 -0
  390. package/src/shared/index.ts +6 -0
  391. package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/index.ts +8 -0
  392. package/src/shared/providers/screen/gestures/pan/activation/use-pan-activation.ts +16 -7
  393. package/src/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.ts +18 -1
  394. package/src/shared/providers/screen/gestures/pan/use-build-pan-gesture.ts +1 -0
  395. package/src/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.ts +40 -2
  396. package/src/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.ts +7 -11
  397. package/src/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.ts +12 -15
  398. package/src/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.ts +6 -1
  399. package/src/shared/providers/screen/gestures/shared/snapshot.ts +2 -0
  400. package/src/shared/providers/screen/gestures/shared/values.ts +2 -0
  401. package/src/shared/providers/screen/styles/hooks/use-maybe-block-visibility.tsx +15 -1
  402. package/src/shared/providers/screen/styles/slot.provider.tsx +4 -2
  403. package/src/shared/providers/screen/styles/stores/slot-references.store.ts +2 -1
  404. package/src/shared/stores/gesture.store.ts +12 -0
  405. package/src/shared/stores/system.store.ts +10 -4
  406. package/src/shared/types/animation.types.ts +3 -3
  407. package/src/shared/types/bounds.types.ts +128 -92
  408. package/src/shared/types/gesture.types.ts +10 -0
  409. package/src/shared/types/index.ts +2 -0
  410. package/src/shared/utils/animation/animate-to-progress.ts +23 -7
  411. package/src/shared/utils/bounds/helpers/create-bounds-accessor-core.ts +18 -11
  412. package/src/shared/utils/bounds/navigation/reveal/build.ts +2 -2
  413. package/src/shared/utils/bounds/navigation/reveal/math.ts +2 -1
  414. package/src/shared/utils/bounds/navigation/zoom/build.ts +224 -412
  415. package/src/shared/utils/bounds/navigation/zoom/config.ts +15 -18
  416. package/src/shared/utils/bounds/navigation/zoom/drag.ts +327 -0
  417. package/src/shared/utils/bounds/navigation/zoom/helpers.ts +122 -184
  418. package/src/shared/utils/bounds/navigation/zoom/mask.ts +130 -0
  419. package/src/shared/utils/bounds/navigation/zoom/targets.ts +74 -0
  420. package/src/shared/utils/bounds/navigation/zoom/types.ts +1 -1
  421. package/src/shared/utils/bounds/types/options.ts +9 -2
  422. package/lib/commonjs/shared/components/boundary/portal/components/boundary-local-portal-host.js +0 -58
  423. package/lib/commonjs/shared/components/boundary/portal/components/boundary-local-portal-host.js.map +0 -1
  424. package/lib/commonjs/shared/components/boundary/portal/components/host.js.map +0 -1
  425. package/lib/commonjs/shared/components/boundary/portal/components/portal-boundary-host.js.map +0 -1
  426. package/lib/commonjs/shared/components/boundary/portal/components/portal.js +0 -272
  427. package/lib/commonjs/shared/components/boundary/portal/components/portal.js.map +0 -1
  428. package/lib/commonjs/shared/components/boundary/portal/hooks/use-host-measurement.js.map +0 -1
  429. package/lib/commonjs/shared/components/boundary/portal/hooks/use-placeholder-styles.js.map +0 -1
  430. package/lib/commonjs/shared/components/boundary/portal/stores/host-bounds.store.js.map +0 -1
  431. package/lib/commonjs/shared/components/boundary/portal/stores/host-registry.store.js.map +0 -1
  432. package/lib/commonjs/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map +0 -1
  433. package/lib/commonjs/shared/components/boundary/portal/utils/has-local-slot.js.map +0 -1
  434. package/lib/commonjs/shared/components/boundary/portal/utils/offset-style.js.map +0 -1
  435. package/lib/commonjs/shared/utils/bounds/navigation/zoom/math.js +0 -25
  436. package/lib/commonjs/shared/utils/bounds/navigation/zoom/math.js.map +0 -1
  437. package/lib/module/shared/components/boundary/portal/components/boundary-local-portal-host.js +0 -53
  438. package/lib/module/shared/components/boundary/portal/components/boundary-local-portal-host.js.map +0 -1
  439. package/lib/module/shared/components/boundary/portal/components/host.js.map +0 -1
  440. package/lib/module/shared/components/boundary/portal/components/portal-boundary-host.js.map +0 -1
  441. package/lib/module/shared/components/boundary/portal/components/portal.js +0 -267
  442. package/lib/module/shared/components/boundary/portal/components/portal.js.map +0 -1
  443. package/lib/module/shared/components/boundary/portal/hooks/use-host-measurement.js.map +0 -1
  444. package/lib/module/shared/components/boundary/portal/hooks/use-placeholder-styles.js.map +0 -1
  445. package/lib/module/shared/components/boundary/portal/stores/host-bounds.store.js.map +0 -1
  446. package/lib/module/shared/components/boundary/portal/stores/host-registry.store.js.map +0 -1
  447. package/lib/module/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map +0 -1
  448. package/lib/module/shared/components/boundary/portal/utils/has-local-slot.js.map +0 -1
  449. package/lib/module/shared/components/boundary/portal/utils/offset-style.js.map +0 -1
  450. package/lib/module/shared/utils/bounds/navigation/zoom/math.js +0 -20
  451. package/lib/module/shared/utils/bounds/navigation/zoom/math.js.map +0 -1
  452. package/lib/typescript/shared/components/boundary/portal/components/boundary-local-portal-host.d.ts +0 -8
  453. package/lib/typescript/shared/components/boundary/portal/components/boundary-local-portal-host.d.ts.map +0 -1
  454. package/lib/typescript/shared/components/boundary/portal/components/host.d.ts.map +0 -1
  455. package/lib/typescript/shared/components/boundary/portal/components/portal-boundary-host.d.ts.map +0 -1
  456. package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts +0 -20
  457. package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts.map +0 -1
  458. package/lib/typescript/shared/components/boundary/portal/hooks/use-host-measurement.d.ts.map +0 -1
  459. package/lib/typescript/shared/components/boundary/portal/hooks/use-placeholder-styles.d.ts +0 -17
  460. package/lib/typescript/shared/components/boundary/portal/hooks/use-placeholder-styles.d.ts.map +0 -1
  461. package/lib/typescript/shared/components/boundary/portal/stores/host-bounds.store.d.ts.map +0 -1
  462. package/lib/typescript/shared/components/boundary/portal/stores/host-registry.store.d.ts.map +0 -1
  463. package/lib/typescript/shared/components/boundary/portal/stores/portal-boundary-host.store.d.ts.map +0 -1
  464. package/lib/typescript/shared/components/boundary/portal/utils/has-local-slot.d.ts +0 -3
  465. package/lib/typescript/shared/components/boundary/portal/utils/has-local-slot.d.ts.map +0 -1
  466. package/lib/typescript/shared/components/boundary/portal/utils/offset-style.d.ts.map +0 -1
  467. package/lib/typescript/shared/utils/bounds/navigation/zoom/math.d.ts +0 -8
  468. package/lib/typescript/shared/utils/bounds/navigation/zoom/math.d.ts.map +0 -1
  469. package/src/shared/components/boundary/portal/components/boundary-local-portal-host.tsx +0 -66
  470. package/src/shared/components/boundary/portal/components/portal.tsx +0 -412
  471. package/src/shared/utils/bounds/navigation/zoom/math.ts +0 -25
  472. /package/lib/commonjs/shared/components/boundary/portal/{utils → components/boundary-portal/helpers}/has-local-slot.js +0 -0
  473. /package/lib/commonjs/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-registry.store.js +0 -0
  474. /package/lib/module/shared/components/boundary/portal/{utils → components/boundary-portal/helpers}/has-local-slot.js +0 -0
  475. /package/lib/module/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-registry.store.js +0 -0
  476. /package/lib/typescript/shared/components/boundary/portal/components/{host.d.ts → boundary-portal/components/host.d.ts} +0 -0
  477. /package/lib/typescript/shared/components/boundary/portal/components/{portal-boundary-host.d.ts → boundary-portal/components/portal-boundary-host.d.ts} +0 -0
  478. /package/lib/typescript/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-registry.store.d.ts +0 -0
  479. /package/src/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-registry.store.ts +0 -0
@@ -1,20 +1,20 @@
1
1
  import { memo } from "react";
2
2
  import { type StyleProp, StyleSheet, type ViewStyle } from "react-native";
3
3
  import Animated, { useAnimatedStyle } from "react-native-reanimated";
4
- import { NO_STYLES } from "../../../../constants";
5
- import { composeSlotStyleWithLocalTransform } from "../../../../providers/screen/styles/helpers/compose-slot-style";
6
- import { AnimationStore } from "../../../../stores/animation.store";
7
- import { getSourceScreenKeyFromPairKey } from "../../../../stores/bounds/helpers/link-pairs.helpers";
8
- import { getLink } from "../../../../stores/bounds/internals/links";
4
+ import { NO_STYLES } from "../../../../../../constants";
5
+ import { composeSlotStyleWithLocalTransform } from "../../../../../../providers/screen/styles/helpers/compose-slot-style";
6
+ import { AnimationStore } from "../../../../../../stores/animation.store";
7
+ import { getSourceScreenKeyFromPairKey } from "../../../../../../stores/bounds/helpers/link-pairs.helpers";
8
+ import { getLink } from "../../../../../../stores/bounds/internals/links";
9
9
  import {
10
10
  getClampedScrollAxisDelta,
11
11
  ScrollStore,
12
- } from "../../../../stores/scroll.store";
13
- import type { ScrollMeasuredDimensions } from "../../utils/measured-bounds";
12
+ } from "../../../../../../stores/scroll.store";
13
+ import type { ScrollMeasuredDimensions } from "../../../../utils/measured-bounds";
14
+ import { NativePortalHost, PORTAL_POINTER_EVENTS } from "../../../teleport";
15
+ import { hasLocalSlot } from "../helpers/has-local-slot";
16
+ import { resolvePortalOffsetStyle } from "../helpers/offset-style";
14
17
  import type { ActivePortalBoundaryHost } from "../stores/portal-boundary-host.store";
15
- import { NativePortalHost } from "../teleport";
16
- import { hasLocalSlot } from "../utils/has-local-slot";
17
- import { resolvePortalOffsetStyle } from "../utils/offset-style";
18
18
 
19
19
  const AnimatedPortalBoundaryHost = NativePortalHost
20
20
  ? Animated.createAnimatedComponent(NativePortalHost)
@@ -45,7 +45,7 @@ export const PortalBoundaryHost = memo(function PortalBoundaryHost({
45
45
 
46
46
  const hostStyle = useAnimatedStyle(() => {
47
47
  "worklet";
48
- // Strict per-member lookup a fallback member's source rect would
48
+ // Strict per-member lookup - a fallback member's source rect would
49
49
  // misplace this host's teleported content.
50
50
  const link = getLink(host.pairKey, host.boundaryId);
51
51
  if (!link?.source || !link.destination) {
@@ -135,19 +135,20 @@ export const PortalBoundaryHost = memo(function PortalBoundaryHost({
135
135
  });
136
136
 
137
137
  // Without `react-native-teleport` no portal ever mounts a boundary host, so
138
- // this never renders the guard just narrows the nullable animated host.
138
+ // this never renders - the guard just narrows the nullable animated host.
139
139
  if (!AnimatedPortalBoundaryHost) {
140
140
  return null;
141
141
  }
142
142
 
143
143
  return (
144
144
  <Animated.View
145
- pointerEvents="none"
145
+ pointerEvents={PORTAL_POINTER_EVENTS}
146
146
  style={[style, hostStyle]}
147
147
  collapsable={false}
148
148
  >
149
149
  <AnimatedPortalBoundaryHost
150
150
  name={host.portalHostName}
151
+ pointerEvents={PORTAL_POINTER_EVENTS}
151
152
  style={[styles.content, contentFrameStyle, slotStyle]}
152
153
  />
153
154
  </Animated.View>
@@ -0,0 +1,79 @@
1
+ import {
2
+ type ComponentProps,
3
+ type ComponentType,
4
+ memo,
5
+ type ReactNode,
6
+ } from "react";
7
+ import type { View } from "react-native";
8
+ import Animated, { type AnimatedRef, runOnUI } from "react-native-reanimated";
9
+ import { logger } from "../../../../../../utils/logger";
10
+ import {
11
+ isTeleportAvailable,
12
+ PORTAL_POINTER_EVENTS,
13
+ NativePortal as TeleportPortal,
14
+ } from "../../../teleport";
15
+ import { usePlaceholderStyles } from "../hooks/use-placeholder-styles";
16
+
17
+ type NullableHostNamePortalProps = Omit<
18
+ ComponentProps<NonNullable<typeof TeleportPortal>>,
19
+ "hostName"
20
+ > & {
21
+ hostName?: string | null;
22
+ };
23
+
24
+ const AnimatedNativePortal = TeleportPortal
25
+ ? Animated.createAnimatedComponent(
26
+ TeleportPortal as ComponentType<NullableHostNamePortalProps>,
27
+ )
28
+ : null;
29
+
30
+ type BoundaryPortalSlotProps = {
31
+ id: string;
32
+ children: ReactNode;
33
+ enabled: boolean;
34
+ animatedProps: any;
35
+ placeholderRef?: AnimatedRef<View>;
36
+ };
37
+
38
+ export const BoundaryPortalSlot = memo(function BoundaryPortalSlot({
39
+ id,
40
+ children,
41
+ enabled,
42
+ animatedProps,
43
+ placeholderRef,
44
+ }: BoundaryPortalSlotProps) {
45
+ const isPortalEnabled = enabled && isTeleportAvailable;
46
+
47
+ if (__DEV__ && enabled && !id) {
48
+ logger.warnOnce(
49
+ "portal:missing-id",
50
+ "A boundary portal was rendered without an id; rendering inline.",
51
+ );
52
+ }
53
+
54
+ const { handleOnLayout, placeholderStyle } = usePlaceholderStyles();
55
+
56
+ if (isPortalEnabled && AnimatedNativePortal) {
57
+ return (
58
+ <Animated.View
59
+ ref={placeholderRef}
60
+ onLayout={({ nativeEvent: { layout } }) =>
61
+ runOnUI(handleOnLayout)(layout)
62
+ }
63
+ style={placeholderStyle}
64
+ pointerEvents={PORTAL_POINTER_EVENTS}
65
+ collapsable={false}
66
+ >
67
+ <AnimatedNativePortal
68
+ animatedProps={animatedProps}
69
+ name={id}
70
+ pointerEvents={PORTAL_POINTER_EVENTS}
71
+ >
72
+ {children}
73
+ </AnimatedNativePortal>
74
+ </Animated.View>
75
+ );
76
+ }
77
+
78
+ return children;
79
+ });
@@ -1,4 +1,4 @@
1
- import type { LocalStyleLayers } from "../../../../providers/screen/styles/helpers/resolve-slot-styles";
1
+ import type { LocalStyleLayers } from "../../../../../../providers/screen/styles/helpers/resolve-slot-styles";
2
2
 
3
3
  export const hasLocalSlot = (
4
4
  localStylesMaps: LocalStyleLayers,
@@ -0,0 +1,10 @@
1
+ const BOUNDARY_PORTAL_HOST_NAME_SUFFIX = "-portal-host";
2
+
3
+ export const createBoundaryPortalHostName = (
4
+ hostKey: string,
5
+ boundaryId: string,
6
+ pairKey?: string | null,
7
+ ) => {
8
+ "worklet";
9
+ return `${hostKey}-${pairKey ? `${pairKey}-` : ""}${boundaryId}${BOUNDARY_PORTAL_HOST_NAME_SUFFIX}`;
10
+ };
@@ -1,6 +1,6 @@
1
1
  import type { StyleProps } from "react-native-reanimated";
2
- import { getClampedScrollAxisDelta } from "../../../../stores/scroll.store";
3
- import type { ScrollMeasuredDimensions } from "../../utils/measured-bounds";
2
+ import { getClampedScrollAxisDelta } from "../../../../../../stores/scroll.store";
3
+ import type { ScrollMeasuredDimensions } from "../../../../utils/measured-bounds";
4
4
  import { getPortalHostBounds } from "../stores/host-bounds.store";
5
5
 
6
6
  /**
@@ -0,0 +1,254 @@
1
+ import { useCallback, useLayoutEffect, useRef, useState } from "react";
2
+ import {
3
+ runOnJS,
4
+ useAnimatedProps,
5
+ useAnimatedReaction,
6
+ useSharedValue,
7
+ } from "react-native-reanimated";
8
+ import { useDescriptorsStore } from "../../../../../../providers/screen/descriptors";
9
+ import { useScreenSlots } from "../../../../../../providers/screen/styles";
10
+ import { pairs } from "../../../../../../stores/bounds/internals/state";
11
+ import { PORTAL_HOST_NAME_RESET_VALUE } from "../../../utils/naming";
12
+ import {
13
+ type PortalOwnershipSignal,
14
+ resolveBoundaryPortalOwnership,
15
+ } from "../../../utils/ownership";
16
+ import { shallowEqual } from "../../../utils/shallow-equal";
17
+ import { shouldAttachBoundaryPortal } from "../../../utils/teleport-control";
18
+ import { resolveNextVisiblePortalHostName } from "../../../utils/visible-host";
19
+ import { createBoundaryPortalHostName } from "../helpers/host-name";
20
+ import { useActiveHostKey } from "../stores/host-registry.store";
21
+ import {
22
+ dropStalePortalBoundaryHosts,
23
+ mountPortalBoundaryHost,
24
+ unmountPortalBoundaryHostByName,
25
+ } from "../stores/portal-boundary-host.store";
26
+
27
+ interface UseBoundaryPortalAttachmentParams {
28
+ boundaryId: string;
29
+ enabled: boolean;
30
+ }
31
+
32
+ export const useBoundaryPortalAttachment = ({
33
+ boundaryId,
34
+ enabled,
35
+ }: UseBoundaryPortalAttachmentParams) => {
36
+ const sourcePairKey = useDescriptorsStore((s) => s.derivations.sourcePairKey);
37
+ const currentScreenKey = useDescriptorsStore(
38
+ (s) => s.derivations.currentScreenKey,
39
+ );
40
+ const { localStylesMaps, nextInterpolatorReady, slotsMap } = useScreenSlots();
41
+ const [ownership, setOwnership] = useState<Extract<
42
+ PortalOwnershipSignal,
43
+ { status: "complete" }
44
+ > | null>(null);
45
+ const requestedPortalHostName = useSharedValue<string | null>(null);
46
+ const visiblePortalHostName = useSharedValue<string | null>(null);
47
+ const mountedPortalBoundaryHostNamesRef = useRef(new Set<string>());
48
+ const escapeHostKey = useActiveHostKey(enabled ? currentScreenKey : null);
49
+
50
+ const updatePortalOwnership = useCallback(
51
+ (
52
+ hostScreenKey: string | null,
53
+ ownerPairKey?: string,
54
+ ownerScreenKey?: string,
55
+ ) => {
56
+ if (hostScreenKey && ownerPairKey && ownerScreenKey) {
57
+ setOwnership((current) => {
58
+ if (
59
+ current?.hostScreenKey === hostScreenKey &&
60
+ current.ownerPairKey === ownerPairKey &&
61
+ current.ownerScreenKey === ownerScreenKey
62
+ ) {
63
+ return current;
64
+ }
65
+
66
+ return {
67
+ hostScreenKey,
68
+ ownerPairKey,
69
+ ownerScreenKey,
70
+ status: "complete",
71
+ };
72
+ });
73
+ return;
74
+ }
75
+
76
+ setOwnership((current) => (current ? null : current));
77
+ },
78
+ [],
79
+ );
80
+
81
+ const unmountOwnedPortalBoundaryHosts = useCallback(() => {
82
+ for (const portalHostName of mountedPortalBoundaryHostNamesRef.current) {
83
+ unmountPortalBoundaryHostByName(portalHostName);
84
+ }
85
+
86
+ mountedPortalBoundaryHostNamesRef.current.clear();
87
+ }, []);
88
+
89
+ useLayoutEffect(() => {
90
+ if (!enabled || !ownership || !escapeHostKey) {
91
+ requestedPortalHostName.set(null);
92
+ visiblePortalHostName.set(null);
93
+ unmountOwnedPortalBoundaryHosts();
94
+ return;
95
+ }
96
+
97
+ const portalHostName = createBoundaryPortalHostName(
98
+ escapeHostKey,
99
+ boundaryId,
100
+ ownership.ownerPairKey,
101
+ );
102
+
103
+ mountPortalBoundaryHost({
104
+ boundaryId,
105
+ escapeClipping: true,
106
+ hostKey: escapeHostKey,
107
+ localStylesMaps,
108
+ pairKey: ownership.ownerPairKey,
109
+ portalHostName,
110
+ screenKey: currentScreenKey,
111
+ slotsMap,
112
+ });
113
+ mountedPortalBoundaryHostNamesRef.current.add(portalHostName);
114
+
115
+ // Request the new receiver immediately, but keep the currently visible
116
+ // receiver until the new interpolator is ready. This avoids a no-host gap
117
+ // during rapid close/open retargets.
118
+ requestedPortalHostName.set(portalHostName);
119
+ }, [
120
+ boundaryId,
121
+ currentScreenKey,
122
+ enabled,
123
+ escapeHostKey,
124
+ localStylesMaps,
125
+ ownership,
126
+ requestedPortalHostName,
127
+ slotsMap,
128
+ unmountOwnedPortalBoundaryHosts,
129
+ visiblePortalHostName,
130
+ ]);
131
+
132
+ useLayoutEffect(() => {
133
+ return () => {
134
+ requestedPortalHostName.set(null);
135
+ visiblePortalHostName.set(null);
136
+ unmountOwnedPortalBoundaryHosts();
137
+ };
138
+ }, [
139
+ requestedPortalHostName,
140
+ unmountOwnedPortalBoundaryHosts,
141
+ visiblePortalHostName,
142
+ ]);
143
+
144
+ useAnimatedReaction(
145
+ () => {
146
+ "worklet";
147
+ if (!enabled || !sourcePairKey) {
148
+ return {
149
+ hostScreenKey: null,
150
+ ownerPairKey: sourcePairKey,
151
+ ownerScreenKey: null,
152
+ status: "clear",
153
+ };
154
+ }
155
+
156
+ return resolveBoundaryPortalOwnership({
157
+ boundaryId,
158
+ currentScreenKey,
159
+ handoff: false,
160
+ pairsState: pairs.get(),
161
+ sourcePairKey,
162
+ });
163
+ },
164
+ (signal, previousSignal) => {
165
+ "worklet";
166
+ if (shallowEqual(previousSignal, signal)) {
167
+ return;
168
+ }
169
+
170
+ runOnJS(updatePortalOwnership)(
171
+ signal.hostScreenKey,
172
+ signal.ownerPairKey,
173
+ signal.ownerScreenKey ?? undefined,
174
+ );
175
+ },
176
+ );
177
+
178
+ useAnimatedReaction(
179
+ () => {
180
+ "worklet";
181
+ const slot = slotsMap.get()[boundaryId];
182
+ const teleport = slot?.props?.teleport;
183
+ const shouldTeleport = shouldAttachBoundaryPortal({
184
+ enabled,
185
+ teleport,
186
+ });
187
+ const requestedName = requestedPortalHostName.get();
188
+ const visibleName = visiblePortalHostName.get();
189
+ const isInterpolatorReady = nextInterpolatorReady.get();
190
+ const nextVisibleName = resolveNextVisiblePortalHostName({
191
+ isInterpolatorReady: isInterpolatorReady === 1,
192
+ requestedName,
193
+ shouldTeleport,
194
+ visibleName,
195
+ });
196
+
197
+ return {
198
+ isInterpolatorReady,
199
+ nextVisibleName,
200
+ requestedName,
201
+ shouldTeleport,
202
+ teleport,
203
+ visibleName,
204
+ };
205
+ },
206
+ (state, previousState) => {
207
+ "worklet";
208
+ if (shallowEqual(previousState, state)) {
209
+ return;
210
+ }
211
+
212
+ if (state.nextVisibleName !== state.visibleName) {
213
+ visiblePortalHostName.set(state.nextVisibleName);
214
+ return;
215
+ }
216
+
217
+ if (state.visibleName && state.visibleName === state.requestedName) {
218
+ runOnJS(dropStalePortalBoundaryHosts)({
219
+ boundaryId,
220
+ keepPortalHostName: state.visibleName,
221
+ });
222
+ }
223
+ },
224
+ );
225
+
226
+ const teleportProps = useAnimatedProps(() => {
227
+ "worklet";
228
+
229
+ const slot = slotsMap.get()[boundaryId];
230
+ const {
231
+ pointerEvents: _pointerEvents,
232
+ teleport,
233
+ ...slotProps
234
+ } = slot?.props ?? {};
235
+ const shouldTeleport = shouldAttachBoundaryPortal({
236
+ enabled,
237
+ teleport,
238
+ });
239
+ const visibleName = visiblePortalHostName.get();
240
+
241
+ return {
242
+ ...slotProps,
243
+ hostName:
244
+ shouldTeleport && visibleName
245
+ ? visibleName
246
+ : PORTAL_HOST_NAME_RESET_VALUE,
247
+ };
248
+ });
249
+
250
+ return {
251
+ teleportProps,
252
+ visiblePortalHostName,
253
+ };
254
+ };
@@ -5,18 +5,21 @@ import {
5
5
  measure,
6
6
  runOnJS,
7
7
  runOnUI,
8
+ type SharedValue,
8
9
  useAnimatedReaction,
9
10
  useAnimatedRef,
10
11
  useSharedValue,
11
12
  withDelay,
12
13
  withTiming,
13
14
  } from "react-native-reanimated";
14
- import { useOriginContext } from "../../../../providers/screen/origin.provider";
15
- import { ScrollStore } from "../../../../stores/scroll.store";
15
+ import { useOriginContext } from "../../../../../../providers/screen/origin.provider";
16
+ import { ScrollStore } from "../../../../../../stores/scroll.store";
17
+ import { getVisibilityBlockOffset } from "../../../../../../utils/visibility-block-offset";
16
18
  import {
17
19
  adjustedMeasuredBoundsForOverscrollDeltas,
18
- normalizeMeasuredBoundsToOrigin,
19
- } from "../../utils/measured-bounds";
20
+ isMeasurementInViewport,
21
+ normalizeMeasuredBoundsWithVisibilityGate,
22
+ } from "../../../../utils/measured-bounds";
20
23
  import {
21
24
  clearPortalHostBounds,
22
25
  setPortalHostBounds,
@@ -29,6 +32,9 @@ type UseHostMeasurementParams = {
29
32
  enabled: boolean;
30
33
  hostKey: string;
31
34
  screenKey: string;
35
+ visibilityBlocked: SharedValue<boolean>;
36
+ viewportHeight: number;
37
+ viewportWidth: number;
32
38
  };
33
39
 
34
40
  export const useHostMeasurement = ({
@@ -36,6 +42,9 @@ export const useHostMeasurement = ({
36
42
  enabled,
37
43
  hostKey,
38
44
  screenKey,
45
+ visibilityBlocked,
46
+ viewportHeight,
47
+ viewportWidth,
39
48
  }: UseHostMeasurementParams) => {
40
49
  const hostRef = useAnimatedRef<View>();
41
50
  const scrollMetadata = ScrollStore.getValue(screenKey, "metadata");
@@ -91,10 +100,31 @@ export const useHostMeasurement = ({
91
100
  ? adjustedMeasuredBoundsForOverscrollDeltas(measured, currentScroll)
92
101
  : measured;
93
102
 
94
- const normalizedMeasured = normalizeMeasuredBoundsToOrigin(
95
- overscrollNormalized,
96
- measuredOrigin,
97
- );
103
+ const normalizedMeasured = normalizeMeasuredBoundsWithVisibilityGate({
104
+ measured: overscrollNormalized,
105
+ origin: measuredOrigin,
106
+ visibilityBlocked: visibilityBlocked.get(),
107
+ visibilityBlockOffset: getVisibilityBlockOffset(viewportHeight),
108
+ viewportWidth,
109
+ viewportHeight,
110
+ });
111
+
112
+ if (
113
+ !isMeasurementInViewport(
114
+ normalizedMeasured,
115
+ viewportWidth,
116
+ viewportHeight,
117
+ )
118
+ ) {
119
+ cancelAnimation(retryToken);
120
+ retryToken.set(
121
+ withDelay(
122
+ HOST_MEASUREMENT_RETRY_DELAY_MS,
123
+ withTiming(retryToken.get() + 1, { duration: 0 }),
124
+ ),
125
+ );
126
+ return;
127
+ }
98
128
 
99
129
  setPortalHostBounds(hostKey, {
100
130
  x: normalizedMeasured.x,
@@ -1,31 +1,20 @@
1
1
  import { useCallback } from "react";
2
2
  import type { LayoutRectangle } from "react-native";
3
- import {
4
- type SharedValue,
5
- useAnimatedStyle,
6
- useSharedValue,
7
- } from "react-native-reanimated";
3
+ import { useAnimatedStyle, useSharedValue } from "react-native-reanimated";
8
4
 
9
- interface UsePlaceholderProps {
10
- visiblePortalHostName: SharedValue<string | null>;
11
- }
12
-
13
- export const usePlaceholderStyles = ({
14
- visiblePortalHostName,
15
- }: UsePlaceholderProps) => {
5
+ export const usePlaceholderStyles = () => {
16
6
  const placeholderWidth = useSharedValue(0);
17
7
  const placeholderHeight = useSharedValue(0);
18
8
  // Pin the placeholder to its measured size while content lives in the host,
19
- // in the same UI frame the host name flips no commit in between. Until the
9
+ // in the same UI frame the host name flips - no commit in between. Until the
20
10
  // first layout lands (dims 0) sizing stays natural so an instant attach
21
11
  // cannot collapse the slot.
22
12
  const placeholderStyle = useAnimatedStyle(() => {
23
13
  "worklet";
24
- const isAttached = visiblePortalHostName.get() !== null;
25
14
  const width = placeholderWidth.get();
26
15
  const height = placeholderHeight.get();
27
16
 
28
- if (!isAttached || width === 0) {
17
+ if (width === 0) {
29
18
  return { width: "auto", height: "auto" } as const;
30
19
  }
31
20
 
@@ -0,0 +1,35 @@
1
+ import { memo, type ReactNode } from "react";
2
+ import type { View } from "react-native";
3
+ import type { AnimatedRef } from "react-native-reanimated";
4
+ import { BoundaryPortalSlot } from "./components/portal-slot";
5
+ import { useBoundaryPortalAttachment } from "./hooks/use-boundary-portal-attachment";
6
+
7
+ type BoundaryPortalProps = {
8
+ boundaryId: string;
9
+ children: ReactNode;
10
+ enabled: boolean;
11
+ placeholderRef?: AnimatedRef<View>;
12
+ };
13
+
14
+ export const BoundaryPortal = memo(function BoundaryPortal({
15
+ boundaryId,
16
+ children,
17
+ enabled,
18
+ placeholderRef,
19
+ }: BoundaryPortalProps) {
20
+ const { teleportProps } = useBoundaryPortalAttachment({
21
+ boundaryId,
22
+ enabled,
23
+ });
24
+
25
+ return (
26
+ <BoundaryPortalSlot
27
+ id={boundaryId}
28
+ enabled={enabled}
29
+ animatedProps={teleportProps}
30
+ placeholderRef={placeholderRef}
31
+ >
32
+ {children}
33
+ </BoundaryPortalSlot>
34
+ );
35
+ });
@@ -1,6 +1,6 @@
1
1
  import { type MeasuredDimensions, makeMutable } from "react-native-reanimated";
2
- import { cloneScrollMetadataState } from "../../../../stores/scroll.store";
3
- import type { ScrollMetadataState } from "../../../../types/gesture.types";
2
+ import { cloneScrollMetadataState } from "../../../../../../stores/scroll.store";
3
+ import type { ScrollMetadataState } from "../../../../../../types/gesture.types";
4
4
 
5
5
  export type PortalHostBounds = MeasuredDimensions & {
6
6
  scroll?: ScrollMetadataState | null;
@@ -1,7 +1,7 @@
1
1
  import { useSyncExternalStore } from "react";
2
2
  import type { SharedValue } from "react-native-reanimated";
3
- import type { LocalStyleLayers } from "../../../../providers/screen/styles/helpers/resolve-slot-styles";
4
- import type { NormalizedTransitionInterpolatedStyle } from "../../../../types/animation.types";
3
+ import type { LocalStyleLayers } from "../../../../../../providers/screen/styles/helpers/resolve-slot-styles";
4
+ import type { NormalizedTransitionInterpolatedStyle } from "../../../../../../types/animation.types";
5
5
 
6
6
  export type ActivePortalBoundaryHost = {
7
7
  boundaryId: string;
@@ -75,19 +75,10 @@ export const mountPortalBoundaryHost = (host: ActivePortalBoundaryHost) => {
75
75
  emit();
76
76
  };
77
77
 
78
- export const unmountPortalBoundaryHost = (boundaryId: string) => {
79
- let didDelete = false;
80
-
81
- for (const [hostEntryKey, host] of activeBoundaryHosts) {
82
- if (host.boundaryId !== boundaryId) {
83
- continue;
84
- }
85
-
86
- activeBoundaryHosts.delete(hostEntryKey);
87
- didDelete = true;
88
- }
89
-
90
- if (!didDelete) {
78
+ export const unmountPortalBoundaryHostByName = (
79
+ portalHostName: string | null | undefined,
80
+ ) => {
81
+ if (!portalHostName || !activeBoundaryHosts.delete(portalHostName)) {
91
82
  return;
92
83
  }
93
84
 
@@ -106,6 +97,10 @@ export const dropStalePortalBoundaryHosts = ({
106
97
  boundaryId: string;
107
98
  keepPortalHostName: string;
108
99
  }) => {
100
+ if (!activeBoundaryHosts.has(keepPortalHostName)) {
101
+ return;
102
+ }
103
+
109
104
  let didDelete = false;
110
105
 
111
106
  for (const [hostEntryKey, host] of activeBoundaryHosts) {
@@ -1,3 +1,2 @@
1
- export { Host } from "./components/host";
2
- export { Portal } from "./components/portal";
1
+ export { Host } from "./components/boundary-portal/components/host";
3
2
  export { PortalProvider } from "./components/portal-provider";
@@ -5,8 +5,8 @@ import { type ComponentType, createElement, type ReactNode } from "react";
5
5
  * try/catch so Metro treats it as an optional dependency — an absent module no
6
6
  * longer fails the bundle, it throws at runtime and the catch swallows it.
7
7
  *
8
- * When teleport is missing, `portal`-enabled boundaries degrade to inline
9
- * rendering; everything else keeps working.
8
+ * When teleport is missing, handoff and escapeClipping boundaries degrade to
9
+ * inline rendering; everything else keeps working.
10
10
  */
11
11
  let mod: any = null;
12
12
  let managerMod: any = null;
@@ -39,6 +39,7 @@ const SafeNativePortalProvider: ComponentType<{ children: ReactNode }> | null =
39
39
 
40
40
  export const isTeleportAvailable =
41
41
  mod !== null && SafeNativePortalProvider !== null;
42
+ export const PORTAL_POINTER_EVENTS = "box-none" as const;
42
43
  export const NativePortal: ComponentType<any> | null = mod?.Portal ?? null;
43
44
  export const NativePortalProvider: ComponentType<any> | null =
44
45
  SafeNativePortalProvider;
@@ -1,20 +1 @@
1
1
  export const PORTAL_HOST_NAME_RESET_VALUE = null;
2
- const PORTAL_HOST_NAME_SUFFIX = "-portal-host";
3
- const BOUNDARY_LOCAL_PORTAL_HOST_NAME_SUFFIX = "-boundary-local-portal-host";
4
-
5
- export const createPortalBoundaryHostName = (
6
- hostKey: string,
7
- boundaryId: string,
8
- pairKey?: string | null,
9
- ) => {
10
- "worklet";
11
- return `${hostKey}-${pairKey ? `${pairKey}-` : ""}${boundaryId}${PORTAL_HOST_NAME_SUFFIX}`;
12
- };
13
-
14
- export const createBoundaryLocalPortalHostName = (
15
- screenKey: string,
16
- boundaryId: string,
17
- ) => {
18
- "worklet";
19
- return `${screenKey}-${boundaryId}${BOUNDARY_LOCAL_PORTAL_HOST_NAME_SUFFIX}`;
20
- };