react-native-screen-transitions 4.0.0-alpha.5 → 4.0.0-alpha.7

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 (287) hide show
  1. package/lib/commonjs/components/boundary/components/boundary-lifecycle.js +36 -0
  2. package/lib/commonjs/components/boundary/components/boundary-lifecycle.js.map +1 -0
  3. package/lib/commonjs/components/boundary/components/boundary-target.js +1 -0
  4. package/lib/commonjs/components/boundary/components/boundary-target.js.map +1 -1
  5. package/lib/commonjs/components/boundary/create-boundary-component.js +1 -0
  6. package/lib/commonjs/components/boundary/create-boundary-component.js.map +1 -1
  7. package/lib/commonjs/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +1 -13
  8. package/lib/commonjs/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -1
  9. package/lib/commonjs/components/boundary/hooks/lifecycles/use-refresh-boundary.js +9 -2
  10. package/lib/commonjs/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -1
  11. package/lib/commonjs/components/boundary/hooks/use-boundary-measurement.js +3 -2
  12. package/lib/commonjs/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
  13. package/lib/commonjs/components/boundary/hooks/use-measurer.js +9 -2
  14. package/lib/commonjs/components/boundary/hooks/use-measurer.js.map +1 -1
  15. package/lib/commonjs/components/boundary/portal/components/boundary-portal/components/host.js +5 -12
  16. package/lib/commonjs/components/boundary/portal/components/boundary-portal/components/host.js.map +1 -1
  17. package/lib/commonjs/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +25 -43
  18. package/lib/commonjs/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
  19. package/lib/commonjs/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js +13 -0
  20. package/lib/commonjs/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js.map +1 -0
  21. package/lib/commonjs/components/boundary/portal/components/boundary-portal/helpers/offset-style.js +8 -31
  22. package/lib/commonjs/components/boundary/portal/components/boundary-portal/helpers/offset-style.js.map +1 -1
  23. package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js +14 -19
  24. package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js.map +1 -1
  25. package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +3 -1
  26. package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
  27. package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js +19 -48
  28. package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js.map +1 -1
  29. package/lib/commonjs/components/boundary/portal/components/boundary-portal/index.js +6 -2
  30. package/lib/commonjs/components/boundary/portal/components/boundary-portal/index.js.map +1 -1
  31. package/lib/commonjs/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js +1 -1
  32. package/lib/commonjs/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -1
  33. package/lib/commonjs/components/boundary/providers/boundary-root.provider.js +19 -17
  34. package/lib/commonjs/components/boundary/providers/boundary-root.provider.js.map +1 -1
  35. package/lib/commonjs/components/boundary/utils/refresh-signals.js +19 -5
  36. package/lib/commonjs/components/boundary/utils/refresh-signals.js.map +1 -1
  37. package/lib/commonjs/components/screen-container/layers/backdrop.js +11 -7
  38. package/lib/commonjs/components/screen-container/layers/backdrop.js.map +1 -1
  39. package/lib/commonjs/components/screen-lifecycle/hooks/helpers/close-interception-rules.js +32 -0
  40. package/lib/commonjs/components/screen-lifecycle/hooks/helpers/close-interception-rules.js.map +1 -0
  41. package/lib/commonjs/components/screen-lifecycle/hooks/use-close-completion.js +27 -0
  42. package/lib/commonjs/components/screen-lifecycle/hooks/use-close-completion.js.map +1 -0
  43. package/lib/commonjs/components/screen-lifecycle/hooks/use-close-transition-intent.js +61 -86
  44. package/lib/commonjs/components/screen-lifecycle/hooks/use-close-transition-intent.js.map +1 -1
  45. package/lib/commonjs/components/screen-lifecycle/hooks/use-transition-start-controller.js +1 -5
  46. package/lib/commonjs/components/screen-lifecycle/hooks/use-transition-start-controller.js.map +1 -1
  47. package/lib/commonjs/components/screen-lifecycle/index.js +9 -6
  48. package/lib/commonjs/components/screen-lifecycle/index.js.map +1 -1
  49. package/lib/commonjs/hooks/navigation/use-navigation-helpers.js +30 -13
  50. package/lib/commonjs/hooks/navigation/use-navigation-helpers.js.map +1 -1
  51. package/lib/commonjs/providers/helpers/measured-bounds-writes.js +1 -2
  52. package/lib/commonjs/providers/helpers/measured-bounds-writes.js.map +1 -1
  53. package/lib/commonjs/providers/screen/gestures/hooks/use-screen-gesture-config.js +9 -2
  54. package/lib/commonjs/providers/screen/gestures/hooks/use-screen-gesture-config.js.map +1 -1
  55. package/lib/commonjs/providers/screen/gestures/pan/behavior/pan-lifecycle.js +4 -5
  56. package/lib/commonjs/providers/screen/gestures/pan/behavior/pan-lifecycle.js.map +1 -1
  57. package/lib/commonjs/providers/screen/gestures/pan/behavior/use-pan-behavior.js +2 -3
  58. package/lib/commonjs/providers/screen/gestures/pan/behavior/use-pan-behavior.js.map +1 -1
  59. package/lib/commonjs/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js +4 -5
  60. package/lib/commonjs/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js.map +1 -1
  61. package/lib/commonjs/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js +2 -3
  62. package/lib/commonjs/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js.map +1 -1
  63. package/lib/commonjs/providers/screen/gestures/shared/policy.js +9 -5
  64. package/lib/commonjs/providers/screen/gestures/shared/policy.js.map +1 -1
  65. package/lib/commonjs/providers/screen/styles/helpers/create-interpolator-scope.js +40 -0
  66. package/lib/commonjs/providers/screen/styles/helpers/create-interpolator-scope.js.map +1 -0
  67. package/lib/commonjs/providers/screen/styles/hooks/use-interpolated-style-maps.js +5 -10
  68. package/lib/commonjs/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
  69. package/lib/commonjs/providers/stack/blank-stack-state/blank-stack-controller.js +7 -9
  70. package/lib/commonjs/providers/stack/blank-stack-state/blank-stack-controller.js.map +1 -1
  71. package/lib/commonjs/stores/bounds/internals/links.js +1 -1
  72. package/lib/commonjs/stores/bounds/internals/links.js.map +1 -1
  73. package/lib/commonjs/stores/system.store.js +1 -2
  74. package/lib/commonjs/stores/system.store.js.map +1 -1
  75. package/lib/commonjs/utils/animation/animate-to-progress.js +0 -22
  76. package/lib/commonjs/utils/animation/animate-to-progress.js.map +1 -1
  77. package/lib/commonjs/utils/navigation/close-action-replay.js +22 -0
  78. package/lib/commonjs/utils/navigation/close-action-replay.js.map +1 -0
  79. package/lib/module/components/boundary/components/boundary-lifecycle.js +32 -0
  80. package/lib/module/components/boundary/components/boundary-lifecycle.js.map +1 -0
  81. package/lib/module/components/boundary/components/boundary-target.js +1 -0
  82. package/lib/module/components/boundary/components/boundary-target.js.map +1 -1
  83. package/lib/module/components/boundary/create-boundary-component.js +1 -0
  84. package/lib/module/components/boundary/create-boundary-component.js.map +1 -1
  85. package/lib/module/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +1 -13
  86. package/lib/module/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -1
  87. package/lib/module/components/boundary/hooks/lifecycles/use-refresh-boundary.js +9 -2
  88. package/lib/module/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -1
  89. package/lib/module/components/boundary/hooks/use-boundary-measurement.js +3 -2
  90. package/lib/module/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
  91. package/lib/module/components/boundary/hooks/use-measurer.js +9 -2
  92. package/lib/module/components/boundary/hooks/use-measurer.js.map +1 -1
  93. package/lib/module/components/boundary/portal/components/boundary-portal/components/host.js +5 -12
  94. package/lib/module/components/boundary/portal/components/boundary-portal/components/host.js.map +1 -1
  95. package/lib/module/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +27 -45
  96. package/lib/module/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
  97. package/lib/module/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js +8 -0
  98. package/lib/module/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js.map +1 -0
  99. package/lib/module/components/boundary/portal/components/boundary-portal/helpers/offset-style.js +8 -32
  100. package/lib/module/components/boundary/portal/components/boundary-portal/helpers/offset-style.js.map +1 -1
  101. package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js +15 -20
  102. package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js.map +1 -1
  103. package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +3 -1
  104. package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
  105. package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js +19 -48
  106. package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js.map +1 -1
  107. package/lib/module/components/boundary/portal/components/boundary-portal/index.js +6 -2
  108. package/lib/module/components/boundary/portal/components/boundary-portal/index.js.map +1 -1
  109. package/lib/module/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js +1 -1
  110. package/lib/module/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -1
  111. package/lib/module/components/boundary/providers/boundary-root.provider.js +20 -18
  112. package/lib/module/components/boundary/providers/boundary-root.provider.js.map +1 -1
  113. package/lib/module/components/boundary/utils/refresh-signals.js +19 -5
  114. package/lib/module/components/boundary/utils/refresh-signals.js.map +1 -1
  115. package/lib/module/components/screen-container/layers/backdrop.js +12 -8
  116. package/lib/module/components/screen-container/layers/backdrop.js.map +1 -1
  117. package/lib/module/components/screen-lifecycle/hooks/helpers/close-interception-rules.js +26 -0
  118. package/lib/module/components/screen-lifecycle/hooks/helpers/close-interception-rules.js.map +1 -0
  119. package/lib/module/components/screen-lifecycle/hooks/use-close-completion.js +22 -0
  120. package/lib/module/components/screen-lifecycle/hooks/use-close-completion.js.map +1 -0
  121. package/lib/module/components/screen-lifecycle/hooks/use-close-transition-intent.js +61 -85
  122. package/lib/module/components/screen-lifecycle/hooks/use-close-transition-intent.js.map +1 -1
  123. package/lib/module/components/screen-lifecycle/hooks/use-transition-start-controller.js +1 -5
  124. package/lib/module/components/screen-lifecycle/hooks/use-transition-start-controller.js.map +1 -1
  125. package/lib/module/components/screen-lifecycle/index.js +9 -6
  126. package/lib/module/components/screen-lifecycle/index.js.map +1 -1
  127. package/lib/module/hooks/navigation/use-navigation-helpers.js +30 -13
  128. package/lib/module/hooks/navigation/use-navigation-helpers.js.map +1 -1
  129. package/lib/module/providers/helpers/measured-bounds-writes.js +1 -2
  130. package/lib/module/providers/helpers/measured-bounds-writes.js.map +1 -1
  131. package/lib/module/providers/screen/gestures/hooks/use-screen-gesture-config.js +9 -2
  132. package/lib/module/providers/screen/gestures/hooks/use-screen-gesture-config.js.map +1 -1
  133. package/lib/module/providers/screen/gestures/pan/behavior/pan-lifecycle.js +4 -5
  134. package/lib/module/providers/screen/gestures/pan/behavior/pan-lifecycle.js.map +1 -1
  135. package/lib/module/providers/screen/gestures/pan/behavior/use-pan-behavior.js +2 -3
  136. package/lib/module/providers/screen/gestures/pan/behavior/use-pan-behavior.js.map +1 -1
  137. package/lib/module/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js +4 -5
  138. package/lib/module/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js.map +1 -1
  139. package/lib/module/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js +2 -3
  140. package/lib/module/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js.map +1 -1
  141. package/lib/module/providers/screen/gestures/shared/policy.js +9 -5
  142. package/lib/module/providers/screen/gestures/shared/policy.js.map +1 -1
  143. package/lib/module/providers/screen/styles/helpers/create-interpolator-scope.js +35 -0
  144. package/lib/module/providers/screen/styles/helpers/create-interpolator-scope.js.map +1 -0
  145. package/lib/module/providers/screen/styles/hooks/use-interpolated-style-maps.js +5 -10
  146. package/lib/module/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
  147. package/lib/module/providers/stack/blank-stack-state/blank-stack-controller.js +7 -9
  148. package/lib/module/providers/stack/blank-stack-state/blank-stack-controller.js.map +1 -1
  149. package/lib/module/stores/bounds/internals/links.js +1 -1
  150. package/lib/module/stores/bounds/internals/links.js.map +1 -1
  151. package/lib/module/stores/system.store.js +1 -2
  152. package/lib/module/stores/system.store.js.map +1 -1
  153. package/lib/module/utils/animation/animate-to-progress.js +0 -22
  154. package/lib/module/utils/animation/animate-to-progress.js.map +1 -1
  155. package/lib/module/utils/navigation/close-action-replay.js +16 -0
  156. package/lib/module/utils/navigation/close-action-replay.js.map +1 -0
  157. package/lib/typescript/components/boundary/components/boundary-lifecycle.d.ts +18 -0
  158. package/lib/typescript/components/boundary/components/boundary-lifecycle.d.ts.map +1 -0
  159. package/lib/typescript/components/boundary/components/boundary-target.d.ts.map +1 -1
  160. package/lib/typescript/components/boundary/create-boundary-component.d.ts.map +1 -1
  161. package/lib/typescript/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts +1 -2
  162. package/lib/typescript/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts.map +1 -1
  163. package/lib/typescript/components/boundary/hooks/lifecycles/use-refresh-boundary.d.ts.map +1 -1
  164. package/lib/typescript/components/boundary/hooks/use-boundary-measurement.d.ts +3 -2
  165. package/lib/typescript/components/boundary/hooks/use-boundary-measurement.d.ts.map +1 -1
  166. package/lib/typescript/components/boundary/hooks/use-measurer.d.ts +3 -2
  167. package/lib/typescript/components/boundary/hooks/use-measurer.d.ts.map +1 -1
  168. package/lib/typescript/components/boundary/portal/components/boundary-portal/components/host.d.ts.map +1 -1
  169. package/lib/typescript/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.d.ts +5 -1
  170. package/lib/typescript/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.d.ts.map +1 -1
  171. package/lib/typescript/components/boundary/portal/components/boundary-portal/helpers/local-measurement.d.ts +4 -0
  172. package/lib/typescript/components/boundary/portal/components/boundary-portal/helpers/local-measurement.d.ts.map +1 -0
  173. package/lib/typescript/components/boundary/portal/components/boundary-portal/helpers/offset-style.d.ts +4 -17
  174. package/lib/typescript/components/boundary/portal/components/boundary-portal/helpers/offset-style.d.ts.map +1 -1
  175. package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.d.ts +3 -1
  176. package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.d.ts.map +1 -1
  177. package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts +3 -1
  178. package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts.map +1 -1
  179. package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.d.ts +5 -9
  180. package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.d.ts.map +1 -1
  181. package/lib/typescript/components/boundary/portal/components/boundary-portal/index.d.ts +3 -1
  182. package/lib/typescript/components/boundary/portal/components/boundary-portal/index.d.ts.map +1 -1
  183. package/lib/typescript/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts +2 -1
  184. package/lib/typescript/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts.map +1 -1
  185. package/lib/typescript/components/boundary/providers/boundary-root.provider.d.ts +2 -1
  186. package/lib/typescript/components/boundary/providers/boundary-root.provider.d.ts.map +1 -1
  187. package/lib/typescript/components/boundary/types.d.ts +6 -0
  188. package/lib/typescript/components/boundary/types.d.ts.map +1 -1
  189. package/lib/typescript/components/boundary/utils/refresh-signals.d.ts +1 -0
  190. package/lib/typescript/components/boundary/utils/refresh-signals.d.ts.map +1 -1
  191. package/lib/typescript/components/screen-container/layers/backdrop.d.ts.map +1 -1
  192. package/lib/typescript/components/screen-lifecycle/hooks/helpers/close-interception-rules.d.ts +28 -0
  193. package/lib/typescript/components/screen-lifecycle/hooks/helpers/close-interception-rules.d.ts.map +1 -0
  194. package/lib/typescript/components/screen-lifecycle/hooks/use-close-completion.d.ts +7 -0
  195. package/lib/typescript/components/screen-lifecycle/hooks/use-close-completion.d.ts.map +1 -0
  196. package/lib/typescript/components/screen-lifecycle/hooks/use-close-transition-intent.d.ts +2 -7
  197. package/lib/typescript/components/screen-lifecycle/hooks/use-close-transition-intent.d.ts.map +1 -1
  198. package/lib/typescript/components/screen-lifecycle/hooks/use-transition-start-controller.d.ts +1 -3
  199. package/lib/typescript/components/screen-lifecycle/hooks/use-transition-start-controller.d.ts.map +1 -1
  200. package/lib/typescript/components/screen-lifecycle/index.d.ts.map +1 -1
  201. package/lib/typescript/hooks/navigation/use-navigation-helpers.d.ts +1 -0
  202. package/lib/typescript/hooks/navigation/use-navigation-helpers.d.ts.map +1 -1
  203. package/lib/typescript/navigators/react-navigation/index.d.ts +1 -1
  204. package/lib/typescript/providers/screen/gestures/hooks/use-screen-gesture-config.d.ts.map +1 -1
  205. package/lib/typescript/providers/screen/gestures/pan/behavior/pan-lifecycle.d.ts +1 -1
  206. package/lib/typescript/providers/screen/gestures/pan/behavior/pan-lifecycle.d.ts.map +1 -1
  207. package/lib/typescript/providers/screen/gestures/pan/behavior/use-pan-behavior.d.ts.map +1 -1
  208. package/lib/typescript/providers/screen/gestures/pinch/behavior/pinch-lifecycle.d.ts +1 -1
  209. package/lib/typescript/providers/screen/gestures/pinch/behavior/pinch-lifecycle.d.ts.map +1 -1
  210. package/lib/typescript/providers/screen/gestures/pinch/behavior/use-pinch-behavior.d.ts.map +1 -1
  211. package/lib/typescript/providers/screen/gestures/shared/policy.d.ts +2 -1
  212. package/lib/typescript/providers/screen/gestures/shared/policy.d.ts.map +1 -1
  213. package/lib/typescript/providers/screen/gestures/types.d.ts +2 -0
  214. package/lib/typescript/providers/screen/gestures/types.d.ts.map +1 -1
  215. package/lib/typescript/providers/screen/styles/helpers/create-interpolator-scope.d.ts +9 -0
  216. package/lib/typescript/providers/screen/styles/helpers/create-interpolator-scope.d.ts.map +1 -0
  217. package/lib/typescript/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -1
  218. package/lib/typescript/providers/stack/blank-stack-state/blank-stack-controller.d.ts.map +1 -1
  219. package/lib/typescript/stores/system.store.d.ts +1 -2
  220. package/lib/typescript/stores/system.store.d.ts.map +1 -1
  221. package/lib/typescript/utils/animation/animate-to-progress.d.ts +1 -2
  222. package/lib/typescript/utils/animation/animate-to-progress.d.ts.map +1 -1
  223. package/lib/typescript/utils/navigation/close-action-replay.d.ts +4 -0
  224. package/lib/typescript/utils/navigation/close-action-replay.d.ts.map +1 -0
  225. package/package.json +1 -1
  226. package/src/components/boundary/components/boundary-lifecycle.tsx +53 -0
  227. package/src/components/boundary/components/boundary-target.tsx +1 -0
  228. package/src/components/boundary/create-boundary-component.tsx +1 -0
  229. package/src/components/boundary/hooks/lifecycles/use-initial-destination-measurement.ts +0 -14
  230. package/src/components/boundary/hooks/lifecycles/use-refresh-boundary.ts +13 -2
  231. package/src/components/boundary/hooks/use-boundary-measurement.ts +7 -2
  232. package/src/components/boundary/hooks/use-measurer.ts +11 -1
  233. package/src/components/boundary/portal/components/boundary-portal/components/host.tsx +13 -11
  234. package/src/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.tsx +44 -55
  235. package/src/components/boundary/portal/components/boundary-portal/helpers/local-measurement.ts +10 -0
  236. package/src/components/boundary/portal/components/boundary-portal/helpers/offset-style.ts +11 -55
  237. package/src/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.ts +20 -24
  238. package/src/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts +6 -0
  239. package/src/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.ts +20 -68
  240. package/src/components/boundary/portal/components/boundary-portal/index.tsx +19 -3
  241. package/src/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.ts +3 -2
  242. package/src/components/boundary/providers/boundary-root.provider.tsx +29 -20
  243. package/src/components/boundary/types.ts +9 -0
  244. package/src/components/boundary/utils/refresh-signals.ts +39 -6
  245. package/src/components/screen-container/layers/backdrop.tsx +11 -7
  246. package/src/components/screen-lifecycle/hooks/helpers/close-interception-rules.ts +66 -0
  247. package/src/components/screen-lifecycle/hooks/use-close-completion.ts +25 -0
  248. package/src/components/screen-lifecycle/hooks/use-close-transition-intent.ts +68 -108
  249. package/src/components/screen-lifecycle/hooks/use-transition-start-controller.ts +0 -12
  250. package/src/components/screen-lifecycle/index.tsx +8 -4
  251. package/src/hooks/navigation/use-navigation-helpers.ts +40 -12
  252. package/src/providers/helpers/measured-bounds-writes.ts +1 -1
  253. package/src/providers/screen/gestures/hooks/use-screen-gesture-config.ts +9 -1
  254. package/src/providers/screen/gestures/pan/behavior/pan-lifecycle.ts +4 -6
  255. package/src/providers/screen/gestures/pan/behavior/use-pan-behavior.ts +1 -3
  256. package/src/providers/screen/gestures/pinch/behavior/pinch-lifecycle.ts +4 -6
  257. package/src/providers/screen/gestures/pinch/behavior/use-pinch-behavior.ts +2 -8
  258. package/src/providers/screen/gestures/shared/policy.ts +17 -6
  259. package/src/providers/screen/gestures/types.ts +2 -0
  260. package/src/providers/screen/styles/helpers/create-interpolator-scope.ts +45 -0
  261. package/src/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +8 -12
  262. package/src/providers/stack/blank-stack-state/blank-stack-controller.ts +7 -7
  263. package/src/stores/bounds/internals/links.ts +1 -1
  264. package/src/stores/system.store.ts +1 -2
  265. package/src/utils/animation/animate-to-progress.ts +0 -23
  266. package/src/utils/navigation/close-action-replay.ts +25 -0
  267. package/lib/commonjs/components/boundary/portal/components/boundary-portal/helpers/active-pair.js +0 -30
  268. package/lib/commonjs/components/boundary/portal/components/boundary-portal/helpers/active-pair.js.map +0 -1
  269. package/lib/commonjs/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.js +0 -47
  270. package/lib/commonjs/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.js.map +0 -1
  271. package/lib/commonjs/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.js +0 -21
  272. package/lib/commonjs/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.js.map +0 -1
  273. package/lib/module/components/boundary/portal/components/boundary-portal/helpers/active-pair.js +0 -25
  274. package/lib/module/components/boundary/portal/components/boundary-portal/helpers/active-pair.js.map +0 -1
  275. package/lib/module/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.js +0 -40
  276. package/lib/module/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.js.map +0 -1
  277. package/lib/module/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.js +0 -16
  278. package/lib/module/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.js.map +0 -1
  279. package/lib/typescript/components/boundary/portal/components/boundary-portal/helpers/active-pair.d.ts +0 -9
  280. package/lib/typescript/components/boundary/portal/components/boundary-portal/helpers/active-pair.d.ts.map +0 -1
  281. package/lib/typescript/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.d.ts +0 -9
  282. package/lib/typescript/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.d.ts.map +0 -1
  283. package/lib/typescript/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.d.ts +0 -2
  284. package/lib/typescript/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.d.ts.map +0 -1
  285. package/src/components/boundary/portal/components/boundary-portal/helpers/active-pair.ts +0 -36
  286. package/src/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.ts +0 -45
  287. package/src/providers/screen/animation/helpers/accessors/use-build-bounds-accessor.tsx +0 -15
@@ -1,78 +1,60 @@
1
1
  "use strict";
2
2
 
3
- import { memo, useCallback } from "react";
3
+ import { memo } from "react";
4
4
  import { I18nManager, StyleSheet } from "react-native";
5
- import Animated, { useAnimatedStyle, useFrameCallback, useSharedValue } from "react-native-reanimated";
5
+ import Animated, { useAnimatedReaction, useAnimatedStyle } from "react-native-reanimated";
6
6
  import { NO_STYLES } from "../../../../../../constants";
7
7
  import { composeSlotStyleWithLocalTransform } from "../../../../../../providers/screen/styles/helpers/compose-slot-style";
8
- import { getLink } from "../../../../../../stores/bounds/internals/links";
9
- import { SystemStore } from "../../../../../../stores/system.store";
10
8
  import { NativePortalHost, PORTAL_POINTER_EVENTS } from "../../../teleport";
9
+ import { resolveBoundaryLocalMeasurement } from "../helpers/local-measurement";
11
10
  import { resolvePortalOffsetStyle } from "../helpers/offset-style";
12
- import { getPortalHostBounds } from "../stores/host-bounds.store";
13
11
  import { jsx as _jsx } from "react/jsx-runtime";
14
12
  const AnimatedPortalBoundaryHost = NativePortalHost ? Animated.createAnimatedComponent(NativePortalHost) : null;
13
+ const getCurrentBoundaryBounds = host => {
14
+ "worklet";
15
+
16
+ return resolveBoundaryLocalMeasurement(host.localMeasurement.get(), host.pairKey);
17
+ };
15
18
  export const PortalBoundaryHost = /*#__PURE__*/memo(function PortalBoundaryHost({
16
19
  host,
20
+ hostBounds,
21
+ hostMeasurementKey,
22
+ measuredHostKey,
17
23
  style
18
24
  }) {
19
- const geometryReadyFrames = useSharedValue(0);
20
- const {
21
- unblockLifecycleStart
22
- } = SystemStore.getBag(host.screenKey).actions;
23
- const handleFrame = useCallback(() => {
25
+ useAnimatedReaction(() => {
24
26
  "worklet";
25
27
 
26
- if (host.portalHostReady.get()) {
27
- return;
28
- }
29
- const link = getLink(host.pairKey, host.boundaryId);
30
- const hasSource = !!link?.source;
31
- const hasHostBounds = getPortalHostBounds(host.hostKey) !== null;
32
- const hasSlot = host.slotsMap.get()[host.boundaryId] !== undefined;
33
- const hasGeometry = hasSource && hasHostBounds && hasSlot;
34
- if (!hasGeometry) {
35
- geometryReadyFrames.set(0);
36
- return;
37
- }
38
- if (geometryReadyFrames.get() === 0) {
39
- // Give the source frame, host offset, and slot style one UI frame to
40
- // reach native before Teleport targets this receiver.
41
- geometryReadyFrames.set(1);
42
- return;
28
+ return getCurrentBoundaryBounds(host) !== null && hostBounds.get() !== null && !!hostMeasurementKey && measuredHostKey.get() === hostMeasurementKey;
29
+ }, ready => {
30
+ "worklet";
31
+
32
+ if (ready) {
33
+ host.portalHostReady.set(true);
43
34
  }
44
- host.portalHostReady.set(true);
45
- unblockLifecycleStart();
46
- }, [geometryReadyFrames, host, unblockLifecycleStart]);
47
- useFrameCallback(handleFrame, true);
35
+ });
48
36
  const hostStyle = useAnimatedStyle(() => {
49
37
  "worklet";
50
38
 
51
- // Strict per-member lookup - a fallback member's source rect would
52
- // misplace this host's teleported content.
53
- const link = getLink(host.pairKey, host.boundaryId);
54
- if (!link?.source) {
39
+ const boundaryBounds = getCurrentBoundaryBounds(host);
40
+ if (!boundaryBounds) {
55
41
  return NO_STYLES;
56
42
  }
57
- const sourceBounds = link.source.bounds;
58
- const isCrossScreenPortal = link.source.screenKey !== host.screenKey;
59
43
  return resolvePortalOffsetStyle({
60
- bounds: sourceBounds,
61
- hostKey: host.hostKey,
62
- placement: isCrossScreenPortal ? "cross-screen" : "same-screen"
44
+ bounds: boundaryBounds,
45
+ hostBounds: hostBounds.get()
63
46
  });
64
47
  });
65
48
  const contentFrameStyle = useAnimatedStyle(() => {
66
49
  "worklet";
67
50
 
68
- const link = getLink(host.pairKey, host.boundaryId);
69
- if (!link?.source) {
51
+ const boundaryBounds = getCurrentBoundaryBounds(host);
52
+ if (!boundaryBounds) {
70
53
  return NO_STYLES;
71
54
  }
72
- const sourceBounds = link.source.bounds;
73
55
  return {
74
- height: sourceBounds.height,
75
- width: sourceBounds.width
56
+ height: boundaryBounds.height,
57
+ width: boundaryBounds.width
76
58
  };
77
59
  });
78
60
  const slotStyle = useAnimatedStyle(() => {
@@ -1 +1 @@
1
- {"version":3,"names":["memo","useCallback","I18nManager","StyleSheet","Animated","useAnimatedStyle","useFrameCallback","useSharedValue","NO_STYLES","composeSlotStyleWithLocalTransform","getLink","SystemStore","NativePortalHost","PORTAL_POINTER_EVENTS","resolvePortalOffsetStyle","getPortalHostBounds","jsx","_jsx","AnimatedPortalBoundaryHost","createAnimatedComponent","PortalBoundaryHost","host","style","geometryReadyFrames","unblockLifecycleStart","getBag","screenKey","actions","handleFrame","portalHostReady","get","link","pairKey","boundaryId","hasSource","source","hasHostBounds","hostKey","hasSlot","slotsMap","undefined","hasGeometry","set","hostStyle","sourceBounds","bounds","isCrossScreenPortal","placement","contentFrameStyle","height","width","slotStyle","slot","boundsLocalTransform","View","pointerEvents","collapsable","children","name","portalHostName","styles","content","create","isRTL","end","position","top","left"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/components/portal-boundary-host.tsx"],"mappings":";;AAAA,SAASA,IAAI,EAAEC,WAAW,QAAQ,OAAO;AACzC,SACCC,WAAW,EAEXC,UAAU,QAEJ,cAAc;AACrB,OAAOC,QAAQ,IACdC,gBAAgB,EAChBC,gBAAgB,EAChBC,cAAc,QACR,yBAAyB;AAChC,SAASC,SAAS,QAAQ,6BAA6B;AACvD,SAASC,kCAAkC,QAAQ,sEAAsE;AACzH,SAASC,OAAO,QAAQ,iDAAiD;AACzE,SAASC,WAAW,QAAQ,uCAAuC;AAEnE,SAASC,gBAAgB,EAAEC,qBAAqB,QAAQ,mBAAmB;AAC3E,SAASC,wBAAwB,QAAQ,yBAAyB;AAClE,SAASC,mBAAmB,QAAQ,6BAA6B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGlE,MAAMC,0BAA0B,GAAGN,gBAAgB,GAChDR,QAAQ,CAACe,uBAAuB,CAACP,gBAAgB,CAAC,GAClD,IAAI;AAOP,OAAO,MAAMQ,kBAAkB,gBAAGpB,IAAI,CAAC,SAASoB,kBAAkBA,CAAC;EAClEC,IAAI;EACJC;AACwB,CAAC,EAAE;EAC3B,MAAMC,mBAAmB,GAAGhB,cAAc,CAAC,CAAC,CAAC;EAC7C,MAAM;IAAEiB;EAAsB,CAAC,GAAGb,WAAW,CA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AW,EAAE,KAAM;IAAAC,QAAA,eAEnBxC,IAAA,CAACC,0BAA0B;MAC1BwC,IAAI,EAAErC,IAAI,CAACsC,cAAe;MAC1BJ,aAAa,EAAE1C,qBAAsB;MACrCS,KAAK,EAAE,CAACsC,MAAM,CAACC,OAAO,EAAEb,iBAAiB,EAAEG,SAAS;IAAE,CACtD;EAAC,CACY,CAAC;AAElB,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA,MAAMS,MAAM,GAAGzD,UAAU,CAAC2D,MAAM,CAAC;EAChCD,OAAO,EAAE3D,WAAW,CAAC6D,KAAK,GACvB;IACAC,GAAG,EAAE,CAAC;IACNC,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE;EACN,CAAC,GACA;IACAC,IAAI,EAAE,CAAC;IACPF,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE;EACN;AACH,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["memo","I18nManager","StyleSheet","Animated","useAnimatedReaction","useAnimatedStyle","NO_STYLES","composeSlotStyleWithLocalTransform","NativePortalHost","PORTAL_POINTER_EVENTS","resolveBoundaryLocalMeasurement","resolvePortalOffsetStyle","jsx","_jsx","AnimatedPortalBoundaryHost","createAnimatedComponent","getCurrentBoundaryBounds","host","localMeasurement","get","pairKey","PortalBoundaryHost","hostBounds","hostMeasurementKey","measuredHostKey","style","ready","portalHostReady","set","hostStyle","boundaryBounds","bounds","contentFrameStyle","height","width","slotStyle","slot","slotsMap","boundaryId","undefined","boundsLocalTransform","View","pointerEvents","collapsable","children","name","portalHostName","styles","content","create","isRTL","end","position","top","left"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/components/portal-boundary-host.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAAQ,OAAO;AAC5B,SACCC,WAAW,EAEXC,UAAU,QAEJ,cAAc;AACrB,OAAOC,QAAQ,IAGdC,mBAAmB,EACnBC,gBAAgB,QACV,yBAAyB;AAChC,SAASC,SAAS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,GACvB;IACAC,GAAG,EAAE,CAAC;IACNC,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE;EACN,CAAC,GACA;IACAC,IAAI,EAAE,CAAC;IACPF,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE;EACN;AACH,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+
3
+ export const resolveBoundaryLocalMeasurement = (measurement, pairKey) => {
4
+ "worklet";
5
+
6
+ return measurement?.pairKey === pairKey ? measurement.bounds : null;
7
+ };
8
+ //# sourceMappingURL=local-measurement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["resolveBoundaryLocalMeasurement","measurement","pairKey","bounds"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/helpers/local-measurement.ts"],"mappings":";;AAGA,OAAO,MAAMA,+BAA+B,GAAGA,CAC9CC,WAA4C,EAC5CC,OAAsB,KAClB;EACJ,SAAS;;EACT,OAAOD,WAAW,EAAEC,OAAO,KAAKA,OAAO,GAAGD,WAAW,CAACE,MAAM,GAAG,IAAI;AACpE,CAAC","ignoreList":[]}
@@ -1,45 +1,21 @@
1
1
  "use strict";
2
2
 
3
- import { getClampedScrollAxisDelta } from "../../../../../../stores/scroll.store";
4
- import { getPortalHostBounds } from "../stores/host-bounds.store";
5
-
6
- /**
7
- * The two portal coordinate cases we support:
8
- *
9
- * - same-screen: source and host live on the same screen; re-base the stored
10
- * host frame onto the source measurement's scroll snapshot.
11
- * - cross-screen: source and host live on different screens; the host is the
12
- * replacement coordinate space, so destination scroll is inherited naturally
13
- * from host placement instead of manually propagated.
14
- */
15
-
16
3
  export const resolvePortalOffsetStyle = ({
17
4
  bounds,
18
- hostKey,
19
- placement
5
+ hostBounds
20
6
  }) => {
21
7
  "worklet";
22
8
 
23
- const hostBounds = getPortalHostBounds(hostKey);
24
- const boundsScrollSnapshot = bounds.scroll ?? null;
25
- const hostBoundsScrollSnapshot = hostBounds?.scroll ?? null;
26
-
27
- // same-screen re-bases the static host frame onto the source scroll snapshot.
28
- // Cross-screen hosts are the chosen replacement coordinate space, so their
29
- // destination scroll is represented by where the host itself is mounted.
30
- const alignHostToBoundsScroll = placement === "same-screen";
31
- const hostSnapshotDeltaX = alignHostToBoundsScroll ? getClampedScrollAxisDelta(boundsScrollSnapshot, hostBoundsScrollSnapshot, "horizontal") : 0;
32
- const hostSnapshotDeltaY = alignHostToBoundsScroll ? getClampedScrollAxisDelta(boundsScrollSnapshot, hostBoundsScrollSnapshot, "vertical") : 0;
33
-
34
- // Without registered host bounds the host frame is the origin, so the source
35
- // page position becomes the offset directly.
36
- const adjustedHostPageX = hostBounds ? hostBounds.pageX - hostSnapshotDeltaX : 0;
37
- const adjustedHostPageY = hostBounds ? hostBounds.pageY - hostSnapshotDeltaY : 0;
9
+ // Both values are measured in page coordinates. Subtracting the host origin
10
+ // gives the boundary's local position inside that host, independent of which
11
+ // scroll container owns either view.
12
+ const hostPageX = hostBounds?.pageX ?? 0;
13
+ const hostPageY = hostBounds?.pageY ?? 0;
38
14
  return {
39
15
  transform: [{
40
- translateY: bounds.pageY - adjustedHostPageY
16
+ translateY: bounds.pageY - hostPageY
41
17
  }, {
42
- translateX: bounds.pageX - adjustedHostPageX
18
+ translateX: bounds.pageX - hostPageX
43
19
  }]
44
20
  };
45
21
  };
@@ -1 +1 @@
1
- {"version":3,"names":["getClampedScrollAxisDelta","getPortalHostBounds","resolvePortalOffsetStyle","bounds","hostKey","placement","hostBounds","boundsScrollSnapshot","scroll","hostBoundsScrollSnapshot","alignHostToBoundsScroll","hostSnapshotDeltaX","hostSnapshotDeltaY","adjustedHostPageX","pageX","adjustedHostPageY","pageY","transform","translateY","translateX"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/helpers/offset-style.ts"],"mappings":";;AACA,SAASA,yBAAyB,QAAQ,uCAAuC;AAEjF,SAASC,mBAAmB,QAAQ,6BAA6B;;AAEjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA,OAAO,MAAMC,wBAAwB,GAAGA,CAAC;EACxCC,MAAM;EACNC,OAAO;EACPC;AAC+B,CAAC,KAAiB;EACjD,SAAS;;EACT,MAAMC,UAAU,GAAGL,mBAAmB,CAACG,OAAO,CAAC;EAC/C,MAAMG,oBAAoB,GAAGJ,MAAM,CAACK,MAAM,IAAI,IAAI;EAClD,MAAMC,wBAAwB,GAAGH,UAAU,EAAEE,MAAM,IAAI,IAAI;;EAE3D;EACA;EACA;EACA,MAAME,uBAAuB,GAAGL,SAAS,KAAK,aAAa;EAE3D,MAAMM,kBAAkB,GAAGD,uBAAuB,GAC/CV,yBAAyB,CACzBO,oBAAoB,EACpBE,wBAAwB,EACxB,YACD,CAAC,GACA,CAAC;EACJ,MAAMG,kBAAkB,GAAGF,uBAAuB,GAC/CV,yBAAyB,CACzBO,oBAAoB,EACpBE,wBAAwB,EACxB,UACD,CAAC,GACA,CAAC;;EAEJ;EACA;EACA,MAAMI,iBAAiB,GAAGP,UAAU,GACjCA,UAAU,CAACQ,KAAK,GAAGH,kBAAkB,GACrC,CAAC;EACJ,MAAMI,iBAAiB,GAAGT,UAAU,GACjCA,UAAU,CAACU,KAAK,GAAGJ,kBAAkB,GACrC,CAAC;EAEJ,OAAO;IACNK,SAAS,EAAE,CACV;MAAEC,UAAU,EAAEf,MAAM,CAACa,KAAK,GAAGD;IAAkB,CAAC,EAChD;MAAEI,UAAU,EAAEhB,MAAM,CAACW,KAAK,GAAGD;IAAkB,CAAC;EAElD,CAAC;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["resolvePortalOffsetStyle","bounds","hostBounds","hostPageX","pageX","hostPageY","pageY","transform","translateY","translateX"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/helpers/offset-style.ts"],"mappings":";;AAOA,OAAO,MAAMA,wBAAwB,GAAGA,CAAC;EACxCC,MAAM;EACNC;AAC+B,CAAC,KAAiB;EACjD,SAAS;;EACT;EACA;EACA;EACA,MAAMC,SAAS,GAAGD,UAAU,EAAEE,KAAK,IAAI,CAAC;EACxC,MAAMC,SAAS,GAAGH,UAAU,EAAEI,KAAK,IAAI,CAAC;EAExC,OAAO;IACNC,SAAS,EAAE,CACV;MAAEC,UAAU,EAAEP,MAAM,CAACK,KAAK,GAAGD;IAAU,CAAC,EACxC;MAAEI,UAAU,EAAER,MAAM,CAACG,KAAK,GAAGD;IAAU,CAAC;EAE1C,CAAC;AACF,CAAC","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- import { useCallback, useLayoutEffect, useRef, useState } from "react";
3
+ import { useCallback, useLayoutEffect, useState } from "react";
4
4
  import { useAnimatedReaction } from "react-native-reanimated";
5
5
  import { scheduleOnRN } from "react-native-worklets";
6
6
  import { getPairKeyForSource } from "../../../../../../stores/bounds/internals/links";
@@ -10,51 +10,46 @@ export const useActivePortalBoundaryHost = ({
10
10
  boundaryId,
11
11
  currentScreenKey,
12
12
  escapeHostKey,
13
+ localMeasurement,
13
14
  portalHostName,
14
15
  portalHostReady,
15
16
  slotsMap
16
17
  }) => {
17
- const [activePortal, setActivePortal] = useState(null);
18
- const activePairKeyRef = useRef(null);
19
- const updateActivePortal = useCallback(pairKey => {
20
- if (activePairKeyRef.current === pairKey) {
21
- return;
22
- }
23
- activePairKeyRef.current = pairKey;
24
- setActivePortal(pairKey ? {
25
- pairKey
26
- } : null);
18
+ const [activePairKey, setActivePairKey] = useState(null);
19
+ const updateActivePairKey = useCallback(pairKey => {
20
+ setActivePairKey(pairKey);
27
21
  }, []);
28
22
  useAnimatedReaction(() => {
29
23
  "worklet";
30
24
 
31
- const isBoundaryAnimating = slotsMap.get()[boundaryId] !== undefined;
32
- if (!isBoundaryAnimating) {
25
+ const pairKey = getPairKeyForSource(boundaryId, currentScreenKey);
26
+ const measurement = localMeasurement.get();
27
+ if (!pairKey || measurement?.pairKey !== pairKey) {
33
28
  return null;
34
29
  }
35
- return getPairKeyForSource(boundaryId, currentScreenKey);
30
+ return pairKey;
36
31
  }, (pairKey, previousPairKey) => {
37
32
  "worklet";
38
33
 
39
34
  if (pairKey === previousPairKey) {
40
35
  return;
41
36
  }
42
- scheduleOnRN(updateActivePortal, pairKey);
37
+ scheduleOnRN(updateActivePairKey, pairKey);
43
38
  });
44
39
  useLayoutEffect(() => {
45
- if (!activePortal || !escapeHostKey) {
40
+ if (!activePairKey || !escapeHostKey) {
46
41
  portalHostName.set(null);
47
42
  portalHostReady.set(false);
48
43
  return;
49
44
  }
50
- const nextPortalHostName = createBoundaryPortalHostName(escapeHostKey, boundaryId, activePortal.pairKey);
45
+ const nextPortalHostName = createBoundaryPortalHostName(escapeHostKey, boundaryId, activePairKey);
51
46
  mountPortalBoundaryHost({
52
47
  boundaryId,
53
48
  hostKey: escapeHostKey,
54
- pairKey: activePortal.pairKey,
49
+ localMeasurement,
50
+ pairKey: activePairKey,
55
51
  portalHostName: nextPortalHostName,
56
52
  portalHostReady,
57
- screenKey: currentScreenKey,
58
53
  slotsMap
59
54
  });
60
55
  portalHostName.set(nextPortalHostName);
@@ -63,6 +58,6 @@ export const useActivePortalBoundaryHost = ({
63
58
  portalHostReady.set(false);
64
59
  unmountPortalBoundaryHostByName(nextPortalHostName);
65
60
  };
66
- }, [activePortal, boundaryId, currentScreenKey, escapeHostKey, portalHostName, portalHostReady, slotsMap]);
61
+ }, [activePairKey, boundaryId, escapeHostKey, localMeasurement, portalHostName, portalHostReady, slotsMap]);
67
62
  };
68
63
  //# sourceMappingURL=use-active-portal-boundary-host.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useCallback","useLayoutEffect","useRef","useState","useAnimatedReaction","scheduleOnRN","getPairKeyForSource","createBoundaryPortalHostName","mountPortalBoundaryHost","unmountPortalBoundaryHostByName","useActivePortalBoundaryHost","boundaryId","currentScreenKey","escapeHostKey","portalHostName","portalHostReady","slotsMap","activePortal","setActivePortal","activePairKeyRef","updateActivePortal","pairKey","current","isBoundaryAnimating","get","undefined","previousPairKey","set","nextPortalHostName","hostKey","screenKey"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,eAAe,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACtE,SAA2BC,mBAAmB,QAAQ,yBAAyB;AAC/E,SAASC,YAAY,QAAQ,uBAAuB;AACpD,SAASC,mBAAmB,QAAQ,iDAAiD;AAGrF,SAASC,4BAA4B,QAAQ,uBAAuB;AACpE,SACCC,uBAAuB,EACvBC,+BAA+B,QACzB,sCAAsC;AAe7C,OAAO,MAAMC,2BAA2B,GAAGA,CAAC;EAC3CC,UAAU;EACVC,gBAAgB;EAChBC,aAAa;EACbC,cAAc;EACdC,eAAe;EACfC;AACkC,CAAC,KAAK;EACxC,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAGf,QAAQ,CAAsB,IAAI,CAAC;EAC3E,MAAMgB,gBAAgB,GAAGjB,MAAM,CAAuB,IAAI,CAAC;EAE3D,MAAMkB,kBAAkB,GAAGpB,WAAW,CAAEqB,OAA6B,IAAK;IACzE,IAAIF,gBAAgB,CAACG,OAAO,KAAKD,OAAO,EAAE;MACzC;IACD;IAEAF,gBAAgB,CAACG,OAAO,GAAGD,OAAO;IAClCH,eAAe,CAACG,OAAO,GAAG;MAAEA;IAAQ,CAAC,GAAG,IAAI,CAAC;EAC9C,CAAC,EAAE,EAAE,CAAC;EAENjB,mBAAmB,CAClB,MAAM;IACL,SAAS;;IACT,MAAMmB,mBAAmB,GAAGP,QAAQ,CAACQ,GAAG,CAAC,CAAC,CAACb,UAAU,CAAC,KAAKc,SAAS;IACpE,IAAI,CAACF,mBAAmB,EAAE;MACzB,OAAO,IAAI;IACZ;IAEA,OAAOjB,mBAAmB,CAACK,UAAU,EAAEC,gBAAgB,CAAC;EACzD,CAAC,EACD,CAACS,OAAO,EAAEK,eAAe,KAAK;IAC7B,SAAS;;IACT,IAAIL,OAAO,KAAKK,eAAe,EAAE;MAChC;IACD;IAEArB,YAAY,CAACe,kBAAkB,EAAEC,OAAO,CAAC;EAC1C,CACD,CAAC;EAEDpB,eAAe,CAAC,MAAM;IACrB,IAAI,CAACgB,YAAY,IAAI,CAACJ,aAAa,EAAE;MACpCC,cAAc,CAACa,GAAG,CAAC,IAAI,CAAC;MACxBZ,eAAe,CAACY,GAAG,CAAC,KAAK,CAAC;MAC1B;IACD;IAEA,MAAMC,kBAAkB,GAAGrB,4BAA4B,CACtDM,aAAa,EACbF,UAAU,EACVM,YAAY,CAACI,OACd,CAAC;IAEDb,uBAAuB,CAAC;MACvBG,UAAU;MACVkB,OAAO,EAAEhB,aAAa;MACtBQ,OAAO,EAAEJ,YAAY,CAACI,OAAO;MAC7BP,cAAc,EAAEc,kBAAkB;MAClCb,eAAe;MACfe,SAAS,EAAElB,gBAAgB;MAC3BI;IACD,CAAC,CAAC;IACFF,cAAc,CAACa,GAAG,CAACC,kBAAkB,CAAC;IAEtC,OAAO,MAAM;MACZd,cAAc,CAACa,GAAG,CAAC,IAAI,CAAC;MACxBZ,eAAe,CAACY,GAAG,CAAC,KAAK,CAAC;MAC1BlB,+BAA+B,CAACmB,kBAAkB,CAAC;IACpD,CAAC;EACF,CAAC,EAAE,CACFX,YAAY,EACZN,UAAU,EACVC,gBAAgB,EAChBC,aAAa,EACbC,cAAc,EACdC,eAAe,EACfC,QAAQ,CACR,CAAC;AACH,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useCallback","useLayoutEffect","useState","useAnimatedReaction","scheduleOnRN","getPairKeyForSource","createBoundaryPortalHostName","mountPortalBoundaryHost","unmountPortalBoundaryHostByName","useActivePortalBoundaryHost","boundaryId","currentScreenKey","escapeHostKey","localMeasurement","portalHostName","portalHostReady","slotsMap","activePairKey","setActivePairKey","updateActivePairKey","pairKey","measurement","get","previousPairKey","set","nextPortalHostName","hostKey"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/bound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Ae,CAACS,GAAG,CAAC,KAAK,CAAC;MAC1B;IACD;IAEA,MAAMC,kBAAkB,GAAGnB,4BAA4B,CACtDM,aAAa,EACbF,UAAU,EACVO,aACD,CAAC;IAEDV,uBAAuB,CAAC;MACvBG,UAAU;MACVgB,OAAO,EAAEd,aAAa;MACtBC,gBAAgB;MAChBO,OAAO,EAAEH,aAAa;MACtBH,cAAc,EAAEW,kBAAkB;MAClCV,eAAe;MACfC;IACD,CAAC,CAAC;IACFF,cAAc,CAACU,GAAG,CAACC,kBAAkB,CAAC;IAEtC,OAAO,MAAM;MACZX,cAAc,CAACU,GAAG,CAAC,IAAI,CAAC;MACxBT,eAAe,CAACS,GAAG,CAAC,KAAK,CAAC;MAC1BhB,+BAA+B,CAACiB,kBAAkB,CAAC;IACpD,CAAC;EACF,CAAC,EAAE,CACFR,aAAa,EACbP,UAAU,EACVE,aAAa,EACbC,gBAAgB,EAChBC,cAAc,EACdC,eAAe,EACfC,QAAQ,CACR,CAAC;AACH,CAAC","ignoreList":[]}
@@ -8,7 +8,8 @@ import { isTeleportEnabled } from "../../../utils/teleport-control";
8
8
  import { useActiveHostKey } from "../stores/host-registry.store";
9
9
  import { useActivePortalBoundaryHost } from "./use-active-portal-boundary-host";
10
10
  export const useBoundaryPortalAttachment = ({
11
- boundaryId
11
+ boundaryId,
12
+ localMeasurement
12
13
  }) => {
13
14
  const currentScreenKey = useDescriptorsStore(s => s.derivations.currentScreenKey);
14
15
  const {
@@ -21,6 +22,7 @@ export const useBoundaryPortalAttachment = ({
21
22
  boundaryId,
22
23
  currentScreenKey,
23
24
  escapeHostKey,
25
+ localMeasurement,
24
26
  portalHostName,
25
27
  portalHostReady,
26
28
  slotsMap
@@ -1 +1 @@
1
- {"version":3,"names":["useAnimatedProps","useSharedValue","useDescriptorsStore","useScreenSlots","PORTAL_HOST_NAME_RESET_VALUE","isTeleportEnabled","useActiveHostKey","useActivePortalBoundaryHost","useBoundaryPortalAttachment","boundaryId","currentScreenKey","s","derivations","slotsMap","portalHostName","portalHostReady","escapeHostKey","teleportProps","slot","get","pointerEvents","_pointerEvents","teleport","slotProps","props","shouldAttach","undefined","hostName"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts"],"mappings":";;AAAA,SAASA,gBAAgB,EAAEC,cAAc,QAAQ,yBAAyB;AAC1E,SAASC,mBAAmB,QAAQ,gDAAgD;AACpF,SAASC,cAAc,QAAQ,2CAA2C;AAC1E,SAASC,4BAA4B,QAAQ,uBAAuB;AACpE,SAASC,iBAAiB,QAAQ,iCAAiC;AACnE,SAASC,gBAAgB,QAAQ,+BAA+B;AAChE,SAASC,2BAA2B,QAAQ,mCAAmC;AAM/E,OAAO,MAAMC,2BAA2B,GAAGA,CAAC;EAC3CC;AACkC,CAAC,KAAK;EACxC,MAAMC,gBAAgB,GAAGR,mBAAmB,CAC1CS,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACF,gBACtB,CAAC;EACD,MAAM;IAAEG;EAAS,CAAC,GAAGV,cAAc,CAAC,CAAC;EACrC,MAAMW,cAAc,GAAGb,cAAc,CAAgB,IAAI,CAAC;EAC1D,MAAMc,eAAe,GAAGd,cAAc,CAAC,KAAK,CAAC;EAC7C,MAAMe,aAAa,GAAGV,gBAAgB,CAACI,gBAAgB,CAAC;EAExDH,2BAA2B,CAAC;IAC3BE,UAAU;IACVC,gBAAgB;IAChBM,aAAa;IACbF,cAAc;IACdC,eAAe;IACfF;EACD,CAAC,CAAC;EAEF,MAAMI,aAAa,GAAGjB,gBAAgB,CAAC,MAAM;IAC5C,SAAS;;IAET,MAAMkB,IAAI,GAAGL,QAAQ,CAACM,GAAG,CAAC,CAAC,CAACV,UAAU,CAAC;IACvC,MAAM;MACLW,aAAa,EAAEC,cAAc;MAC7BC,QAAQ;MACR,GAAGC;IACJ,CAAC,GAAGL,IAAI,EAAEM,KAAK,IAAI,CAAC,CAAC;IACrB,MAAMC,YAAY,GACjBP,IAAI,KAAKQ,SAAS,IAClBrB,iBAAiB,CAACiB,QAAQ,CAAC,IAC3BP,eAAe,CAACI,GAAG,CAAC,CAAC;IACtB,MAAMQ,QAAQ,GAAGF,YAAY,GAC1BX,cAAc,CAACK,GAAG,CAAC,CAAC,GACpBf,4BAA4B;IAE/B,OAAO;MACN,GAAGmB,SAAS;MACZI;IACD,CAAC;EACF,CAAC,CAAC;EAEF,OAAO;IAAEV;EAAc,CAAC;AACzB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useAnimatedProps","useSharedValue","useDescriptorsStore","useScreenSlots","PORTAL_HOST_NAME_RESET_VALUE","isTeleportEnabled","useActiveHostKey","useActivePortalBoundaryHost","useBoundaryPortalAttachment","boundaryId","localMeasurement","currentScreenKey","s","derivations","slotsMap","portalHostName","portalHostReady","escapeHostKey","teleportProps","slot","get","pointerEvents","_pointerEvents","teleport","slotProps","props","shouldAttach","undefined","hostName"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts"],"mappings":";;AAAA,SAASA,gBAAgB,EAAEC,cAAc,QAAQ,yBAAyB;AAC1E,SAASC,mBAAmB,QAAQ,gDAAgD;AACpF,SAASC,cAAc,QAAQ,2CAA2C;AAE1E,SAASC,4BAA4B,QAAQ,uBAAuB;AACpE,SAASC,iBAAiB,QAAQ,iCAAiC;AACnE,SAASC,gBAAgB,QAAQ,+BAA+B;AAChE,SAASC,2BAA2B,QAAQ,mCAAmC;AAO/E,OAAO,MAAMC,2BAA2B,GAAGA,CAAC;EAC3CC,UAAU;EACVC;AACkC,CAAC,KAAK;EACxC,MAAMC,gBAAgB,GAAGT,mBAAmB,CAC1CU,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACF,gBACtB,CAAC;EACD,MAAM;IAAEG;EAAS,CAAC,GAAGX,cAAc,CAAC,CAAC;EACrC,MAAMY,cAAc,GAAGd,cAAc,CAAgB,IAAI,CAAC;EAC1D,MAAMe,eAAe,GAAGf,cAAc,CAAC,KAAK,CAAC;EAC7C,MAAMgB,aAAa,GAAGX,gBAAgB,CAACK,gBAAgB,CAAC;EAExDJ,2BAA2B,CAAC;IAC3BE,UAAU;IACVE,gBAAgB;IAChBM,aAAa;IACbP,gBAAgB;IAChBK,cAAc;IACdC,eAAe;IACfF;EACD,CAAC,CAAC;EAEF,MAAMI,aAAa,GAAGlB,gBAAgB,CAAC,MAAM;IAC5C,SAAS;;IAET,MAAMmB,IAAI,GAAGL,QAAQ,CAACM,GAAG,CAAC,CAAC,CAACX,UAAU,CAAC;IACvC,MAAM;MACLY,aAAa,EAAEC,cAAc;MAC7BC,QAAQ;MACR,GAAGC;IACJ,CAAC,GAAGL,IAAI,EAAEM,KAAK,IAAI,CAAC,CAAC;IAErB,MAAMC,YAAY,GACjBP,IAAI,KAAKQ,SAAS,IAClBtB,iBAAiB,CAACkB,QAAQ,CAAC,IAC3BP,eAAe,CAACI,GAAG,CAAC,CAAC;IAEtB,MAAMQ,QAAQ,GAAGF,YAAY,GAC1BX,cAAc,CAACK,GAAG,CAAC,CAAC,GACpBhB,4BAA4B;IAE/B,OAAO;MACN,GAAGoB,SAAS;MACZI;IACD,CAAC;EACF,CAAC,CAAC;EAEF,OAAO;IAAEV;EAAc,CAAC;AACzB,CAAC","ignoreList":[]}
@@ -1,33 +1,21 @@
1
1
  "use strict";
2
2
 
3
- import { useLayoutEffect } from "react";
4
3
  import { cancelAnimation, measure, useAnimatedReaction, useAnimatedRef, useSharedValue, withDelay, withTiming } from "react-native-reanimated";
5
- import { scheduleOnUI } from "react-native-worklets";
6
- import { ScrollStore } from "../../../../../../stores/scroll.store";
7
- import { getVisibilityBlockOffset } from "../../../../../../utils/visibility-block-offset";
8
- import { adjustedMeasuredBoundsForOverscrollDeltas, correctMeasuredBoundsForVisibilityGate } from "../../../../utils/measured-bounds";
9
- import { clearPortalHostBounds, setPortalHostBounds } from "../stores/host-bounds.store";
10
4
  const HOST_MEASUREMENT_RETRY_DELAY_MS = 16;
11
5
  export const useHostMeasurement = ({
12
- capturesScroll,
13
- enabled,
14
- hostKey,
15
- screenKey,
16
- visibilityBlocked,
17
- viewportHeight,
18
- viewportWidth
6
+ measurementKey
19
7
  }) => {
20
8
  const hostRef = useAnimatedRef();
21
- const scrollMetadata = ScrollStore.getValue(screenKey, "metadata");
22
- const hasMeasuredHost = useSharedValue(false);
9
+ const hostBounds = useSharedValue(null);
10
+ const measuredKey = useSharedValue(null);
23
11
  const retryToken = useSharedValue(0);
24
12
  useAnimatedReaction(() => {
25
13
  "worklet";
26
14
 
27
- if (!enabled) {
15
+ if (!measurementKey) {
28
16
  return null;
29
17
  }
30
- return [hasMeasuredHost.get(), retryToken.get()];
18
+ return [measurementKey, measuredKey.get(), retryToken.get()];
31
19
  }, state => {
32
20
  "worklet";
33
21
 
@@ -35,8 +23,8 @@ export const useHostMeasurement = ({
35
23
  cancelAnimation(retryToken);
36
24
  return;
37
25
  }
38
- const [hasAlreadyMeasured] = state;
39
- if (!enabled || hasAlreadyMeasured) {
26
+ const [requestedKey, completedKey] = state;
27
+ if (requestedKey === completedKey) {
40
28
  return;
41
29
  }
42
30
  const measured = measure(hostRef);
@@ -48,44 +36,27 @@ export const useHostMeasurement = ({
48
36
  return;
49
37
  }
50
38
  cancelAnimation(retryToken);
51
-
52
- // A measurement taken mid rubber-band would bake the transient
53
- // overscroll displacement into the host frame. Store the at-rest
54
- // position instead; clamped scroll deltas share that basis.
55
- const currentScroll = scrollMetadata.get();
56
- const overscrollNormalized = capturesScroll ? adjustedMeasuredBoundsForOverscrollDeltas(measured, currentScroll) : measured;
57
- const correctedMeasured = correctMeasuredBoundsForVisibilityGate({
58
- measured: overscrollNormalized,
59
- visibilityBlocked: visibilityBlocked.get(),
60
- visibilityBlockOffset: getVisibilityBlockOffset(viewportHeight),
61
- viewportWidth,
62
- viewportHeight
63
- });
64
- if (correctedMeasured.width <= 0 || correctedMeasured.height <= 0) {
39
+ if (measured.width <= 0 || measured.height <= 0) {
65
40
  cancelAnimation(retryToken);
66
41
  retryToken.set(withDelay(HOST_MEASUREMENT_RETRY_DELAY_MS, withTiming(retryToken.get() + 1, {
67
42
  duration: 0
68
43
  })));
69
44
  return;
70
45
  }
71
- setPortalHostBounds(hostKey, {
72
- x: correctedMeasured.x,
73
- y: correctedMeasured.y,
74
- width: correctedMeasured.width,
75
- height: correctedMeasured.height,
76
- pageX: correctedMeasured.pageX,
77
- pageY: correctedMeasured.pageY,
78
- scroll: capturesScroll ? currentScroll : null
46
+ hostBounds.set({
47
+ x: measured.x,
48
+ y: measured.y,
49
+ width: measured.width,
50
+ height: measured.height,
51
+ pageX: measured.pageX,
52
+ pageY: measured.pageY
79
53
  });
80
- hasMeasuredHost.set(true);
54
+ measuredKey.set(requestedKey);
81
55
  });
82
- useLayoutEffect(() => {
83
- return () => {
84
- scheduleOnUI(clearPortalHostBounds, hostKey);
85
- };
86
- }, [hostKey]);
87
56
  return {
88
- hostRef
57
+ hostBounds,
58
+ hostRef,
59
+ measuredKey
89
60
  };
90
61
  };
91
62
  //# sourceMappingURL=use-host-measurement.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useLayoutEffect","cancelAnimation","measure","useAnimatedReaction","useAnimatedRef","useSharedValue","withDelay","withTiming","scheduleOnUI","ScrollStore","getVisibilityBlockOffset","adjustedMeasuredBoundsForOverscrollDeltas","correctMeasuredBoundsForVisibilityGate","clearPortalHostBounds","setPortalHostBounds","HOST_MEASUREMENT_RETRY_DELAY_MS","useHostMeasurement","capturesScroll","enabled","hostKey","screenKey","visibilityBlocked","viewportHeight","viewportWidth","hostRef","scrollMetadata","getValue","hasMeasuredHost","retryToken","get","state","hasAlreadyMeasured","measured","set","duration","currentScroll","overscrollNormalized","correctedMeasured","visibilityBlockOffset","width","height","x","y","pageX","pageY","scroll"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,OAAO;AAEvC,SACCC,eAAe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B,cAAc,GAAGkB,aAAa,GAAG;IAC1C,CAAC,CAAC;IAEFR,eAAe,CAACM,GAAG,CAAC,IAAI,CAAC;EAC1B,CACD,CAAC;EAEDjC,eAAe,CAAC,MAAM;IACrB,OAAO,MAAM;MACZQ,YAAY,CAACK,qBAAqB,EAAEM,OAAO,CAAC;IAC7C,CAAC;EACF,CAAC,EAAE,CAACA,OAAO,CAAC,CAAC;EAEb,OAAO;IACNK;EACD,CAAC;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["cancelAnimation","measure","useAnimatedReaction","useAnimatedRef","useSharedValue","withDelay","withTiming","HOST_MEASUREMENT_RETRY_DELAY_MS","useHostMeasurement","measurementKey","hostRef","hostBounds","measuredKey","retryToken","get","state","requestedKey","completedKey","measured","set","duration","width","height","x","y","pageX","pageY"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.ts"],"mappings":";;AACA,SACCA,eAAe,EAEfC,OAAO,EACPC,mBAAmB,EACnBC,cAAc,EACdC,cAAc,EACdC,SAAS,EACTC,UAAU,QACJ,yBAAyB;AAEhC,MAAMC,+BAA+B,GAAG,EAAE;AAM1C,OAAO,MAAMC,kBAAkB,GAAGA,CAAC;EAClCC;AACyB,CAAC,KAAK;EAC/B,MAAMC,OAAO,GAAGP,cAAc,CAAO,CAAC;EACtC,MAAMQ,UAAU,GAAGP,cAAc,CAA4B,IAAI,CAAC;EAClE,MAAMQ,WAAW,GAAGR,cAAc,CAAgB,IAAI,CAAC;EACvD,MAAMS,UAAU,GAAGT,cAAc,CAAC,CAAC,CAAC;EAEpCF,mBAAmB,CAClB,MAAM;IACL,SAAS;;IACT,IAAI,CAACO,cAAc,EAAE;MACpB,OAAO,IAAI;IACZ;IAEA,OAAO,CAACA,cAAc,EAAEG,WAAW,CAACE,GAAG,CAAC,CAAC,EAAED,UAAU,CAACC,GAAG,CAAC,CAAC,CAAC;EAC7D,CAAC,EACAC,KAAK,IAAK;IACV,SAAS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-13,13 +13,15 @@ export const BoundaryPortal = /*#__PURE__*/memo(function BoundaryPortal({
13
13
  boundaryId,
14
14
  children,
15
15
  enabled,
16
+ localMeasurement,
16
17
  placeholderRef
17
18
  }) {
18
- if (!enabled || !isTeleportAvailable || !AnimatedNativePortal) {
19
+ if (!enabled || !localMeasurement || !isTeleportAvailable || !AnimatedNativePortal) {
19
20
  return children;
20
21
  }
21
22
  return /*#__PURE__*/_jsx(EnabledBoundaryPortal, {
22
23
  boundaryId: boundaryId,
24
+ localMeasurement: localMeasurement,
23
25
  placeholderRef: placeholderRef,
24
26
  children: children
25
27
  });
@@ -27,6 +29,7 @@ export const BoundaryPortal = /*#__PURE__*/memo(function BoundaryPortal({
27
29
  const EnabledBoundaryPortal = /*#__PURE__*/memo(function EnabledBoundaryPortal({
28
30
  boundaryId,
29
31
  children,
32
+ localMeasurement,
30
33
  placeholderRef
31
34
  }) {
32
35
  if (__DEV__ && !boundaryId) {
@@ -35,7 +38,8 @@ const EnabledBoundaryPortal = /*#__PURE__*/memo(function EnabledBoundaryPortal({
35
38
  const {
36
39
  teleportProps
37
40
  } = useBoundaryPortalAttachment({
38
- boundaryId
41
+ boundaryId,
42
+ localMeasurement
39
43
  });
40
44
  const {
41
45
  handleOnLayout,
@@ -1 +1 @@
1
- {"version":3,"names":["memo","Animated","runOnUI","logger","isTeleportAvailable","PORTAL_POINTER_EVENTS","NativePortal","TeleportPortal","useBoundaryPortalAttachment","usePlaceholderStyles","jsx","_jsx","AnimatedNativePortal","createAnimatedComponent","EnabledNativePortal","BoundaryPortal","boundaryId","children","enabled","placeholderRef","EnabledBoundaryPortal","__DEV__","warnOnce","teleportProps","handleOnLayout","placeholderStyle","View","ref","onLayout","nativeEvent","layout","style","pointerEvents","collapsable","animatedProps","name"],"sourceRoot":"../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/index.tsx"],"mappings":";;AAAA,SAGCA,IAAI,QAEE,OAAO;AAEd,OAAOC,QAAQ,IAAsBC,OAAO,QA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;QAAEC;MAAO;IAAE,CAAC,KACrC5B,OAAO,CAACsB,cAAc,CAAC,CAACM,MAAM,CAC9B;IACDC,KAAK,EAAEN,gBAAiB;IACxBO,aAAa,EAAE3B,qBAAsB;IACrC4B,WAAW,EAAE,KAAM;IAAAhB,QAAA,eAEnBN,IAAA,CAACG,mBAAmB;MACnBoB,aAAa,EAAEX,aAAc;MAC7BY,IAAI,EAAEnB,UAAW;MACjBgB,aAAa,EAAE3B,qBAAsB;MAAAY,QAAA,EAEpCA;IAAQ,CACW;EAAC,CACR,CAAC;AAElB,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["memo","Animated","runOnUI","logger","isTeleportAvailable","PORTAL_POINTER_EVENTS","NativePortal","TeleportPortal","useBoundaryPortalAttachment","usePlaceholderStyles","jsx","_jsx","AnimatedNativePortal","createAnimatedComponent","EnabledNativePortal","BoundaryPortal","boundaryId","children","enabled","localMeasurement","placeholderRef","EnabledBoundaryPortal","__DEV__","warnOnce","teleportProps","handleOnLayout","placeholderStyle","View","ref","onLayout","nativeEvent","layout","style","pointerEvents","collapsable","animatedProps","name"],"sourceRoot":"../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/index.tsx"],"mappings":";;AAAA,SAGCA,IAAI,QAEE,OAAO;AAEd,OAAOC,QAAQ,IAAsBC,OAAO,QAAQ,yBAAyB;AAC7E,SAASC,MAAM,QAAQ,6BAA6B;AAEpD,SACCC,mBAAmB,EACnBC,qBAAqB,EACrBC,YAAY,IAAIC,cAAc,QACxB,gBAAgB;AACvB,SAASC,2BAA2B,QAAQ,wCAAwC;AACpF,SAASC,oBAAoB,QAAQ,gCAAgC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAStE,MAAMC,oBAAoB,GAAGL,cAAc,GACxCN,QAAQ,CAACY,uBAAuB,CAChCN,cACD,CAAC,GACA,IAAI;AACP,MAAMO,mBAAmB,GAAGF,oBAE3B;AAUD,OAAO,MAAMG,cAAc,gBAAGf,IAAI,CAAC,SAAS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Q,CACW;EAAC,CACR,CAAC;AAElB,CAAC,CAAC","ignoreList":[]}
@@ -25,7 +25,7 @@ const emit = () => {
25
25
  }
26
26
  };
27
27
  const isSameHost = (a, b) => {
28
- return a.boundaryId === b.boundaryId && a.hostKey === b.hostKey && a.pairKey === b.pairKey && a.portalHostName === b.portalHostName && a.portalHostReady === b.portalHostReady && a.screenKey === b.screenKey && a.slotsMap === b.slotsMap;
28
+ return a.boundaryId === b.boundaryId && a.hostKey === b.hostKey && a.localMeasurement === b.localMeasurement && a.pairKey === b.pairKey && a.portalHostName === b.portalHostName && a.portalHostReady === b.portalHostReady && a.slotsMap === b.slotsMap;
29
29
  };
30
30
  export const mountPortalBoundaryHost = host => {
31
31
  const previous = activeBoundaryHosts.get(host.portalHostName);
@@ -1 +1 @@
1
- {"version":3,"names":["useSyncExternalStore","EMPTY_HOSTS","listeners","Set","activeBoundaryHosts","Map","snapshot","hostsByScope","buildSnapshot","host","values","hosts","hostKey","push","emit","listener","isSameHost","a","b","boundaryId","pairKey","portalHostName","portalHostReady","screenKey","slotsMap","mountPortalBoundaryHost","previous","get","set","unmountPortalBoundaryHostByName","delete","subscribe","add","useActivePortalBoundaryHosts"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.ts"],"mappings":";;AAAA,SAASA,oBAAoB,QAAQ,OAAO;AAkB5C,MAAMC,WAAuC,GAAG,EAAE;AAElD,MAAMC,SAAS,GAAG,IAAIC,GAAG,CAAa,CAAC;AACvC,MAAMC,mBAAmB,GAAG,IAAIC,GAAG,CAAmC,CAAC;AAEvE,IAAIC,QAAwB,GAAG;EAC9BC,YAAY,EAAE,CAAC;AAChB,CAAC;AAED,MAAMC,aAAa,GAAGA,CAAA,KAAsB;EAC3C,MAAMD,YAAwD,GAAG,CAAC,CAAC;EAEnE,KAAK,MAAME,IAAI,IAAIL,mBAAmB,CAACM,MAAM,CAAC,CAAC,EAAE;IAChD,MAAMC,KAAK,GAAGJ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C0B,MAAM,CAACT,cAAc,CAAC,EAAE;IACnE;EACD;EAEAP,IAAI,CAAC,CAAC;AACP,CAAC;AAED,MAAMiB,SAAS,GAAIhB,QAAoB,IAAK;EAC3Cb,SAAS,CAAC8B,GAAG,CAACjB,QAAQ,CAAC;EAEvB,OAAO,MAAM;IACZb,SAAS,CAAC4B,MAAM,CAACf,QAAQ,CAAC;EAC3B,CAAC;AACF,CAAC;AAED,OAAO,MAAMkB,4BAA4B,GAAIrB,OAAe,IAAK;EAChE,OAAOZ,oBAAoB,CAC1B+B,SAAS,EACT,MAAMzB,QAAQ,CAACC,YAAY,CAACK,OAAO,CAAC,IAAIX,WAAW,EACnD,MAAMA,WACP,CAAC;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useSyncExternalStore","EMPTY_HOSTS","listeners","Set","activeBoundaryHosts","Map","snapshot","hostsByScope","buildSnapshot","host","values","hosts","hostKey","push","emit","listener","isSameHost","a","b","boundaryId","localMeasurement","pairKey","portalHostName","portalHostReady","slotsMap","mountPortalBoundaryHost","previous","get","set","unmountPortalBoundaryHostByName","delete","subscribe","add","useActivePortalBoundaryHosts"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.ts"],"mappings":";;AAAA,SAASA,oBAAoB,QAAQ,OAAO;AAmB5C,MAAMC,WAAuC,GAAG,EAAE;AAElD,MAAMC,SAAS,GAAG,IAAIC,GAAG,CAAa,CAAC;AACvC,MAAMC,mBAAmB,GAAG,IAAIC,GAAG,CAAmC,CAAC;AAEvE,IAAIC,QAAwB,GAAG;EAC9BC,YAAY,EAAE,CAAC;AAChB,CAAC;AAED,MAAMC,aAAa,GAAGA,CAAA,KAAsB;EAC3C,MAAMD,YAAwD,GAAG,CAAC,CAAC;EAEnE,KAAK,MAAME,IAAI,IAAIL,mBAAmB,CAACM,MAAM,CAAC,CAAC,EAAE;IAChD,MAAMC,KAAK,GAAGJ,YAAY,CAACE,IAAI,CAACG,OAA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