react-native-screen-transitions 3.11.2 → 3.11.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 (255) hide show
  1. package/lib/commonjs/native-stack/views/NativeStackView.native.js +1 -1
  2. package/lib/commonjs/native-stack/views/NativeStackView.native.js.map +1 -1
  3. package/lib/commonjs/shared/components/boundary/components/boundary-lifecycle.js +36 -0
  4. package/lib/commonjs/shared/components/boundary/components/boundary-lifecycle.js.map +1 -0
  5. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +1 -13
  6. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -1
  7. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js +9 -2
  8. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -1
  9. package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js +3 -2
  10. package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
  11. package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js +9 -2
  12. package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js.map +1 -1
  13. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/host.js +5 -12
  14. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/host.js.map +1 -1
  15. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +25 -43
  16. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
  17. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js +13 -0
  18. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js.map +1 -0
  19. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.js +8 -31
  20. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.js.map +1 -1
  21. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js +14 -19
  22. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js.map +1 -1
  23. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +8 -0
  24. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
  25. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js +19 -47
  26. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js.map +1 -1
  27. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/index.js.map +1 -1
  28. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js +1 -1
  29. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -1
  30. package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js +19 -17
  31. package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
  32. package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js +19 -5
  33. package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js.map +1 -1
  34. package/lib/commonjs/shared/components/screen-container/layers/backdrop.js +11 -7
  35. package/lib/commonjs/shared/components/screen-container/layers/backdrop.js.map +1 -1
  36. package/lib/commonjs/shared/components/screen-lifecycle/hooks/helpers/close-interception-rules.js +31 -0
  37. package/lib/commonjs/shared/components/screen-lifecycle/hooks/helpers/close-interception-rules.js.map +1 -0
  38. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-completion.js +26 -0
  39. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-completion.js.map +1 -0
  40. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js +60 -86
  41. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js.map +1 -1
  42. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js +1 -5
  43. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js.map +1 -1
  44. package/lib/commonjs/shared/components/screen-lifecycle/index.js +9 -6
  45. package/lib/commonjs/shared/components/screen-lifecycle/index.js.map +1 -1
  46. package/lib/commonjs/shared/hooks/navigation/use-navigation-helpers.js +28 -6
  47. package/lib/commonjs/shared/hooks/navigation/use-navigation-helpers.js.map +1 -1
  48. package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js +1 -2
  49. package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
  50. package/lib/commonjs/shared/providers/screen/gestures/hooks/use-screen-gesture-config.js +9 -2
  51. package/lib/commonjs/shared/providers/screen/gestures/hooks/use-screen-gesture-config.js.map +1 -1
  52. package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js +4 -5
  53. package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js.map +1 -1
  54. package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js +2 -3
  55. package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js.map +1 -1
  56. package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js +4 -5
  57. package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js.map +1 -1
  58. package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js +2 -3
  59. package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js.map +1 -1
  60. package/lib/commonjs/shared/providers/screen/gestures/shared/policy.js +9 -5
  61. package/lib/commonjs/shared/providers/screen/gestures/shared/policy.js.map +1 -1
  62. package/lib/commonjs/shared/providers/stack/blank-stack-state/blank-stack-controller.js +5 -1
  63. package/lib/commonjs/shared/providers/stack/blank-stack-state/blank-stack-controller.js.map +1 -1
  64. package/lib/commonjs/shared/stores/bounds/internals/links.js +1 -1
  65. package/lib/commonjs/shared/stores/bounds/internals/links.js.map +1 -1
  66. package/lib/commonjs/shared/stores/system.store.js +1 -2
  67. package/lib/commonjs/shared/stores/system.store.js.map +1 -1
  68. package/lib/commonjs/shared/utils/animation/animate-to-progress.js +0 -22
  69. package/lib/commonjs/shared/utils/animation/animate-to-progress.js.map +1 -1
  70. package/lib/commonjs/shared/utils/navigation/close-action-replay.js +22 -0
  71. package/lib/commonjs/shared/utils/navigation/close-action-replay.js.map +1 -0
  72. package/lib/module/native-stack/views/NativeStackView.native.js +1 -1
  73. package/lib/module/native-stack/views/NativeStackView.native.js.map +1 -1
  74. package/lib/module/shared/components/boundary/components/boundary-lifecycle.js +32 -0
  75. package/lib/module/shared/components/boundary/components/boundary-lifecycle.js.map +1 -0
  76. package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +1 -13
  77. package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -1
  78. package/lib/module/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js +9 -2
  79. package/lib/module/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -1
  80. package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js +3 -2
  81. package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
  82. package/lib/module/shared/components/boundary/hooks/use-measurer.js +9 -2
  83. package/lib/module/shared/components/boundary/hooks/use-measurer.js.map +1 -1
  84. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/host.js +5 -12
  85. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/host.js.map +1 -1
  86. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +27 -45
  87. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
  88. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js +8 -0
  89. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js.map +1 -0
  90. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.js +8 -32
  91. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.js.map +1 -1
  92. package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js +15 -20
  93. package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js.map +1 -1
  94. package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +8 -0
  95. package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
  96. package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js +20 -48
  97. package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js.map +1 -1
  98. package/lib/module/shared/components/boundary/portal/components/boundary-portal/index.js.map +1 -1
  99. package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js +1 -1
  100. package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -1
  101. package/lib/module/shared/components/boundary/providers/boundary-root.provider.js +20 -18
  102. package/lib/module/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
  103. package/lib/module/shared/components/boundary/utils/refresh-signals.js +19 -5
  104. package/lib/module/shared/components/boundary/utils/refresh-signals.js.map +1 -1
  105. package/lib/module/shared/components/screen-container/layers/backdrop.js +12 -8
  106. package/lib/module/shared/components/screen-container/layers/backdrop.js.map +1 -1
  107. package/lib/module/shared/components/screen-lifecycle/hooks/helpers/close-interception-rules.js +25 -0
  108. package/lib/module/shared/components/screen-lifecycle/hooks/helpers/close-interception-rules.js.map +1 -0
  109. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-completion.js +21 -0
  110. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-completion.js.map +1 -0
  111. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js +60 -85
  112. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js.map +1 -1
  113. package/lib/module/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js +1 -5
  114. package/lib/module/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js.map +1 -1
  115. package/lib/module/shared/components/screen-lifecycle/index.js +9 -6
  116. package/lib/module/shared/components/screen-lifecycle/index.js.map +1 -1
  117. package/lib/module/shared/hooks/navigation/use-navigation-helpers.js +29 -7
  118. package/lib/module/shared/hooks/navigation/use-navigation-helpers.js.map +1 -1
  119. package/lib/module/shared/providers/helpers/measured-bounds-writes.js +1 -2
  120. package/lib/module/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
  121. package/lib/module/shared/providers/screen/gestures/hooks/use-screen-gesture-config.js +9 -2
  122. package/lib/module/shared/providers/screen/gestures/hooks/use-screen-gesture-config.js.map +1 -1
  123. package/lib/module/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js +4 -5
  124. package/lib/module/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js.map +1 -1
  125. package/lib/module/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js +2 -3
  126. package/lib/module/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js.map +1 -1
  127. package/lib/module/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js +4 -5
  128. package/lib/module/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js.map +1 -1
  129. package/lib/module/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js +2 -3
  130. package/lib/module/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js.map +1 -1
  131. package/lib/module/shared/providers/screen/gestures/shared/policy.js +9 -5
  132. package/lib/module/shared/providers/screen/gestures/shared/policy.js.map +1 -1
  133. package/lib/module/shared/providers/stack/blank-stack-state/blank-stack-controller.js +5 -1
  134. package/lib/module/shared/providers/stack/blank-stack-state/blank-stack-controller.js.map +1 -1
  135. package/lib/module/shared/stores/bounds/internals/links.js +1 -1
  136. package/lib/module/shared/stores/bounds/internals/links.js.map +1 -1
  137. package/lib/module/shared/stores/system.store.js +1 -2
  138. package/lib/module/shared/stores/system.store.js.map +1 -1
  139. package/lib/module/shared/utils/animation/animate-to-progress.js +0 -22
  140. package/lib/module/shared/utils/animation/animate-to-progress.js.map +1 -1
  141. package/lib/module/shared/utils/navigation/close-action-replay.js +16 -0
  142. package/lib/module/shared/utils/navigation/close-action-replay.js.map +1 -0
  143. package/lib/typescript/native-stack/views/NativeStackView.native.d.ts.map +1 -1
  144. package/lib/typescript/shared/components/boundary/components/boundary-lifecycle.d.ts +18 -0
  145. package/lib/typescript/shared/components/boundary/components/boundary-lifecycle.d.ts.map +1 -0
  146. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts +1 -2
  147. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts.map +1 -1
  148. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.d.ts.map +1 -1
  149. package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts +3 -2
  150. package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts.map +1 -1
  151. package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts +3 -2
  152. package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts.map +1 -1
  153. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/host.d.ts.map +1 -1
  154. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.d.ts +5 -1
  155. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.d.ts.map +1 -1
  156. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.d.ts +4 -0
  157. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.d.ts.map +1 -0
  158. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.d.ts +4 -17
  159. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.d.ts.map +1 -1
  160. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.d.ts +3 -1
  161. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.d.ts.map +1 -1
  162. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts.map +1 -1
  163. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.d.ts +5 -9
  164. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.d.ts.map +1 -1
  165. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts +2 -1
  166. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts.map +1 -1
  167. package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts +2 -1
  168. package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts.map +1 -1
  169. package/lib/typescript/shared/components/boundary/types.d.ts +6 -0
  170. package/lib/typescript/shared/components/boundary/types.d.ts.map +1 -1
  171. package/lib/typescript/shared/components/boundary/utils/refresh-signals.d.ts +1 -0
  172. package/lib/typescript/shared/components/boundary/utils/refresh-signals.d.ts.map +1 -1
  173. package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -1
  174. package/lib/typescript/shared/components/screen-lifecycle/hooks/helpers/close-interception-rules.d.ts +27 -0
  175. package/lib/typescript/shared/components/screen-lifecycle/hooks/helpers/close-interception-rules.d.ts.map +1 -0
  176. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-completion.d.ts +7 -0
  177. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-completion.d.ts.map +1 -0
  178. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition-intent.d.ts +2 -7
  179. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition-intent.d.ts.map +1 -1
  180. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-transition-start-controller.d.ts +1 -3
  181. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-transition-start-controller.d.ts.map +1 -1
  182. package/lib/typescript/shared/components/screen-lifecycle/index.d.ts.map +1 -1
  183. package/lib/typescript/shared/hooks/navigation/use-navigation-helpers.d.ts +1 -0
  184. package/lib/typescript/shared/hooks/navigation/use-navigation-helpers.d.ts.map +1 -1
  185. package/lib/typescript/shared/providers/screen/gestures/hooks/use-screen-gesture-config.d.ts.map +1 -1
  186. package/lib/typescript/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.d.ts +1 -1
  187. package/lib/typescript/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.d.ts.map +1 -1
  188. package/lib/typescript/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.d.ts.map +1 -1
  189. package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.d.ts +1 -1
  190. package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.d.ts.map +1 -1
  191. package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.d.ts.map +1 -1
  192. package/lib/typescript/shared/providers/screen/gestures/shared/policy.d.ts +2 -1
  193. package/lib/typescript/shared/providers/screen/gestures/shared/policy.d.ts.map +1 -1
  194. package/lib/typescript/shared/providers/screen/gestures/types.d.ts +2 -0
  195. package/lib/typescript/shared/providers/screen/gestures/types.d.ts.map +1 -1
  196. package/lib/typescript/shared/providers/stack/blank-stack-state/blank-stack-controller.d.ts.map +1 -1
  197. package/lib/typescript/shared/stores/system.store.d.ts +1 -2
  198. package/lib/typescript/shared/stores/system.store.d.ts.map +1 -1
  199. package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts +2 -3
  200. package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts.map +1 -1
  201. package/lib/typescript/shared/utils/navigation/close-action-replay.d.ts +4 -0
  202. package/lib/typescript/shared/utils/navigation/close-action-replay.d.ts.map +1 -0
  203. package/package.json +1 -1
  204. package/src/native-stack/views/NativeStackView.native.tsx +3 -1
  205. package/src/shared/components/boundary/components/boundary-lifecycle.tsx +53 -0
  206. package/src/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.ts +0 -14
  207. package/src/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.ts +13 -2
  208. package/src/shared/components/boundary/hooks/use-boundary-measurement.ts +7 -2
  209. package/src/shared/components/boundary/hooks/use-measurer.ts +11 -1
  210. package/src/shared/components/boundary/portal/components/boundary-portal/components/host.tsx +13 -11
  211. package/src/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.tsx +44 -55
  212. package/src/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.ts +10 -0
  213. package/src/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.ts +11 -55
  214. package/src/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.ts +20 -24
  215. package/src/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts +11 -0
  216. package/src/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.ts +20 -67
  217. package/src/shared/components/boundary/portal/components/boundary-portal/index.tsx +1 -0
  218. package/src/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.ts +3 -2
  219. package/src/shared/components/boundary/providers/boundary-root.provider.tsx +29 -20
  220. package/src/shared/components/boundary/types.ts +9 -0
  221. package/src/shared/components/boundary/utils/refresh-signals.ts +39 -6
  222. package/src/shared/components/screen-container/layers/backdrop.tsx +11 -7
  223. package/src/shared/components/screen-lifecycle/hooks/helpers/close-interception-rules.ts +64 -0
  224. package/src/shared/components/screen-lifecycle/hooks/use-close-completion.ts +28 -0
  225. package/src/shared/components/screen-lifecycle/hooks/use-close-transition-intent.ts +67 -108
  226. package/src/shared/components/screen-lifecycle/hooks/use-transition-start-controller.ts +0 -12
  227. package/src/shared/components/screen-lifecycle/index.tsx +8 -4
  228. package/src/shared/hooks/navigation/use-navigation-helpers.ts +39 -7
  229. package/src/shared/providers/helpers/measured-bounds-writes.ts +1 -1
  230. package/src/shared/providers/screen/gestures/hooks/use-screen-gesture-config.ts +9 -1
  231. package/src/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.ts +4 -6
  232. package/src/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.ts +1 -3
  233. package/src/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.ts +4 -6
  234. package/src/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.ts +2 -8
  235. package/src/shared/providers/screen/gestures/shared/policy.ts +17 -6
  236. package/src/shared/providers/screen/gestures/types.ts +2 -0
  237. package/src/shared/providers/stack/blank-stack-state/blank-stack-controller.ts +5 -1
  238. package/src/shared/stores/bounds/internals/links.ts +1 -1
  239. package/src/shared/stores/system.store.ts +1 -2
  240. package/src/shared/utils/animation/animate-to-progress.ts +1 -22
  241. package/src/shared/utils/navigation/close-action-replay.ts +25 -0
  242. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/active-pair.js +0 -30
  243. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/active-pair.js.map +0 -1
  244. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.js +0 -47
  245. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.js.map +0 -1
  246. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/active-pair.js +0 -25
  247. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/active-pair.js.map +0 -1
  248. package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.js +0 -40
  249. package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.js.map +0 -1
  250. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/active-pair.d.ts +0 -9
  251. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/active-pair.d.ts.map +0 -1
  252. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.d.ts +0 -9
  253. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.d.ts.map +0 -1
  254. package/src/shared/components/boundary/portal/components/boundary-portal/helpers/active-pair.ts +0 -36
  255. package/src/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.ts +0 -45
@@ -4,45 +4,22 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.resolvePortalOffsetStyle = void 0;
7
- var _scroll = require("../../../../../../stores/scroll.store");
8
- var _hostBounds = require("../stores/host-bounds.store");
9
- /**
10
- * The two portal coordinate cases we support:
11
- *
12
- * - same-screen: source and host live on the same screen; re-base the stored
13
- * host frame onto the source measurement's scroll snapshot.
14
- * - cross-screen: source and host live on different screens; the host is the
15
- * replacement coordinate space, so destination scroll is inherited naturally
16
- * from host placement instead of manually propagated.
17
- */
18
-
19
7
  const resolvePortalOffsetStyle = ({
20
8
  bounds,
21
- hostKey,
22
- placement
9
+ hostBounds
23
10
  }) => {
24
11
  "worklet";
25
12
 
26
- const hostBounds = (0, _hostBounds.getPortalHostBounds)(hostKey);
27
- const boundsScrollSnapshot = bounds.scroll ?? null;
28
- const hostBoundsScrollSnapshot = hostBounds?.scroll ?? null;
29
-
30
- // same-screen re-bases the static host frame onto the source scroll snapshot.
31
- // Cross-screen hosts are the chosen replacement coordinate space, so their
32
- // destination scroll is represented by where the host itself is mounted.
33
- const alignHostToBoundsScroll = placement === "same-screen";
34
- const hostSnapshotDeltaX = alignHostToBoundsScroll ? (0, _scroll.getClampedScrollAxisDelta)(boundsScrollSnapshot, hostBoundsScrollSnapshot, "horizontal") : 0;
35
- const hostSnapshotDeltaY = alignHostToBoundsScroll ? (0, _scroll.getClampedScrollAxisDelta)(boundsScrollSnapshot, hostBoundsScrollSnapshot, "vertical") : 0;
36
-
37
- // Without registered host bounds the host frame is the origin, so the source
38
- // page position becomes the offset directly.
39
- const adjustedHostPageX = hostBounds ? hostBounds.pageX - hostSnapshotDeltaX : 0;
40
- const adjustedHostPageY = hostBounds ? hostBounds.pageY - hostSnapshotDeltaY : 0;
13
+ // Both values are measured in page coordinates. Subtracting the host origin
14
+ // gives the boundary's local position inside that host, independent of which
15
+ // scroll container owns either view.
16
+ const hostPageX = hostBounds?.pageX ?? 0;
17
+ const hostPageY = hostBounds?.pageY ?? 0;
41
18
  return {
42
19
  transform: [{
43
- translateY: bounds.pageY - adjustedHostPageY
20
+ translateY: bounds.pageY - hostPageY
44
21
  }, {
45
- translateX: bounds.pageX - adjustedHostPageX
22
+ translateX: bounds.pageX - hostPageX
46
23
  }]
47
24
  };
48
25
  };
@@ -1 +1 @@
1
- {"version":3,"names":["_scroll","require","_hostBounds","resolvePortalOffsetStyle","bounds","hostKey","placement","hostBounds","getPortalHostBounds","boundsScrollSnapshot","scroll","hostBoundsScrollSnapshot","alignHostToBoundsScroll","hostSnapshotDeltaX","getClampedScrollAxisDelta","hostSnapshotDeltaY","adjustedHostPageX","pageX","adjustedHostPageY","pageY","transform","translateY","translateX","exports"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.ts"],"mappings":";;;;;;AACA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUO,MAAME,wBAAwB,GAAGA,CAAC;EACxCC,MAAM;EACNC,OAAO;EACPC;AAC+B,CAAC,KAAiB;EACjD,SAAS;;EACT,MAAMC,UAAU,GAAG,IAAAC,+BAAmB,EAACH,OAAO,CAAC;EAC/C,MAAMI,oBAAoB,GAAGL,MAAM,CAACM,MAAM,IAAI,IAAI;EAClD,MAAMC,wBAAwB,GAAGJ,UAAU,EAAEG,MAAM,IAAI,IAAI;;EAE3D;EACA;EACA;EACA,MAAME,uBAAuB,GAAGN,SAAS,KAAK,aAAa;EAE3D,MAAMO,kBAAkB,GAAGD,uBAAuB,GAC/C,IAAAE,iCAAyB,EACzBL,oBAAoB,EACpBE,wBAAwB,EACxB,YACD,CAAC,GACA,CAAC;EACJ,MAAMI,kBAAkB,GAAGH,uBAAuB,GAC/C,IAAAE,iCAAyB,EACzBL,oBAAoB,EACpBE,wBAAwB,EACxB,UACD,CAAC,GACA,CAAC;;EAEJ;EACA;EACA,MAAMK,iBAAiB,GAAGT,UAAU,GACjCA,UAAU,CAACU,KAAK,GAAGJ,kBAAkB,GACrC,CAAC;EACJ,MAAMK,iBAAiB,GAAGX,UAAU,GACjCA,UAAU,CAACY,KAAK,GAAGJ,kBAAkB,GACrC,CAAC;EAEJ,OAAO;IACNK,SAAS,EAAE,CACV;MAAEC,UAAU,EAAEjB,MAAM,CAACe,KAAK,GAAGD;IAAkB,CAAC,EAChD;MAAEI,UAAU,EAAElB,MAAM,CAACa,KAAK,GAAGD;IAAkB,CAAC;EAElD,CAAC;AACF,CAAC;AAACO,OAAA,CAAApB,wBAAA,GAAAA,wBAAA","ignoreList":[]}
1
+ {"version":3,"names":["resolvePortalOffsetStyle","bounds","hostBounds","hostPageX","pageX","hostPageY","pageY","transform","translateY","translateX","exports"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.ts"],"mappings":";;;;;;AAOO,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;AAACO,OAAA,CAAAV,wBAAA,GAAAA,wBAAA","ignoreList":[]}
@@ -13,51 +13,46 @@ const useActivePortalBoundaryHost = ({
13
13
  boundaryId,
14
14
  currentScreenKey,
15
15
  escapeHostKey,
16
+ localMeasurement,
16
17
  portalHostName,
17
18
  portalHostReady,
18
19
  slotsMap
19
20
  }) => {
20
- const [activePortal, setActivePortal] = (0, _react.useState)(null);
21
- const activePairKeyRef = (0, _react.useRef)(null);
22
- const updateActivePortal = (0, _react.useCallback)(pairKey => {
23
- if (activePairKeyRef.current === pairKey) {
24
- return;
25
- }
26
- activePairKeyRef.current = pairKey;
27
- setActivePortal(pairKey ? {
28
- pairKey
29
- } : null);
21
+ const [activePairKey, setActivePairKey] = (0, _react.useState)(null);
22
+ const updateActivePairKey = (0, _react.useCallback)(pairKey => {
23
+ setActivePairKey(pairKey);
30
24
  }, []);
31
25
  (0, _reactNativeReanimated.useAnimatedReaction)(() => {
32
26
  "worklet";
33
27
 
34
- const isBoundaryAnimating = slotsMap.get()[boundaryId] !== undefined;
35
- if (!isBoundaryAnimating) {
28
+ const pairKey = (0, _links.getPairKeyForSource)(boundaryId, currentScreenKey);
29
+ const measurement = localMeasurement.get();
30
+ if (!pairKey || measurement?.pairKey !== pairKey) {
36
31
  return null;
37
32
  }
38
- return (0, _links.getPairKeyForSource)(boundaryId, currentScreenKey);
33
+ return pairKey;
39
34
  }, (pairKey, previousPairKey) => {
40
35
  "worklet";
41
36
 
42
37
  if (pairKey === previousPairKey) {
43
38
  return;
44
39
  }
45
- (0, _reactNativeReanimated.runOnJS)(updateActivePortal)(pairKey);
40
+ (0, _reactNativeReanimated.runOnJS)(updateActivePairKey)(pairKey);
46
41
  });
47
42
  (0, _react.useLayoutEffect)(() => {
48
- if (!activePortal || !escapeHostKey) {
43
+ if (!activePairKey || !escapeHostKey) {
49
44
  portalHostName.set(null);
50
45
  portalHostReady.set(false);
51
46
  return;
52
47
  }
53
- const nextPortalHostName = (0, _naming.createBoundaryPortalHostName)(escapeHostKey, boundaryId, activePortal.pairKey);
48
+ const nextPortalHostName = (0, _naming.createBoundaryPortalHostName)(escapeHostKey, boundaryId, activePairKey);
54
49
  (0, _portalBoundaryHost.mountPortalBoundaryHost)({
55
50
  boundaryId,
56
51
  hostKey: escapeHostKey,
57
- pairKey: activePortal.pairKey,
52
+ localMeasurement,
53
+ pairKey: activePairKey,
58
54
  portalHostName: nextPortalHostName,
59
55
  portalHostReady,
60
- screenKey: currentScreenKey,
61
56
  slotsMap
62
57
  });
63
58
  portalHostName.set(nextPortalHostName);
@@ -66,7 +61,7 @@ const useActivePortalBoundaryHost = ({
66
61
  portalHostReady.set(false);
67
62
  (0, _portalBoundaryHost.unmountPortalBoundaryHostByName)(nextPortalHostName);
68
63
  };
69
- }, [activePortal, boundaryId, currentScreenKey, escapeHostKey, portalHostName, portalHostReady, slotsMap]);
64
+ }, [activePairKey, boundaryId, escapeHostKey, localMeasurement, portalHostName, portalHostReady, slotsMap]);
70
65
  };
71
66
  exports.useActivePortalBoundaryHost = useActivePortalBoundaryHost;
72
67
  //# sourceMappingURL=use-active-portal-boundary-host.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_reactNativeReanimated","_links","_naming","_portalBoundaryHost","useActivePortalBoundaryHost","boundaryId","currentScreenKey","escapeHostKey","portalHostName","portalHostReady","slotsMap","activePortal","setActivePortal","useState","activePairKeyRef","useRef","updateActivePortal","useCallback","pairKey","current","useAnimatedReaction","isBoundaryAnimating","get","undefined","getPairKeyForSource","previousPairKey","runOnJS","useLayoutEffect","set","nextPortalHostName","createBoundaryPortalHostName","mountPortalBoundaryHost","hostKey","screenKey","unmountPortalBoundaryHostByName","exports"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,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,GAAG,CAAC,IAAI,CAAC;MACxBnB,eAAe,CAACmB,GAAG,CAAC,KAAK,CAAC;MAC1B;IACD;IAEA,MAAMC,kBAAkB,GAAG,IAAAC,oCAA4B,EACtDvB,aAAa,EACbF,UAAU,EACVM,YAAY,CAACO,OACd,CAAC;IAED,IAAAa,2CAAuB,EAAC;MACvB1B,UAAU;MACV2B,OAAO,EAAEzB,aAAa;MACtBW,OAAO,EAAEP,YAAY,CAACO,OAAO;MAC7BV,cAAc,EAAEqB,kBAAkB;MAClCpB,eAAe;MACfwB,SAAS,EAAE3B,gBAAgB;MAC3BI;IACD,CAAC,CAAC;IACFF,cAAc,CAACoB,GAAG,CAACC,kBAAkB,CAAC;IAEtC,OAAO,MAAM;MACZrB,cAAc,CAACoB,GAAG,CAAC,IAAI,CAAC;MACxBnB,eAAe,CAACmB,GAAG,CAAC,KAAK,CAAC;MAC1B,IAAAM,mDAA+B,EAACL,kBAAkB,CAAC;IACpD,CAAC;EACF,CAAC,EAAE,CACFlB,YAAY,EACZN,UAAU,EACVC,gBAAgB,EAChBC,aAAa,EACbC,cAAc,EACdC,eAAe,EACfC,QAAQ,CACR,CAAC;AACH,CAAC;AAACyB,OAAA,CAAA/B,2BAAA,GAAAA,2BAAA","ignoreList":[]}
1
+ {"version":3,"names":["_react","require","_reactNativeReanimated","_links","_naming","_portalBoundaryHost","useActivePortalBoundaryHost","boundaryId","currentScreenKey","escapeHostKey","localMeasurement","portalHostName","portalHostReady","slotsMap","activePairKey","setActivePairKey","useState","updateActivePairKey","useCallback","pairKey","useAnimatedReaction","getPairKeyForSource","measurement","get","previousPairKey","runOnJS","useLayoutEffect","set","nextPortalHostName","createBoundaryPortalHostName","mountPortalBoundaryHost","hostKey","unmountPortalBoundaryHostByName","exports"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,sB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AAuB,EAAC;MACvBvB,UAAU;MACVwB,OAAO,EAAEtB,aAAa;MACtBC,gBAAgB;MAChBS,OAAO,EAAEL,aAAa;MACtBH,cAAc,EAAEiB,kBAAkB;MAClChB,eAAe;MACfC;IACD,CAAC,CAAC;IACFF,cAAc,CAACgB,GAAG,CAACC,kBAAkB,CAAC;IAEtC,OAAO,MAAM;MACZjB,cAAc,CAACgB,GAAG,CAAC,IAAI,CAAC;MACxBf,eAAe,CAACe,GAAG,CAAC,KAAK,CAAC;MAC1B,IAAAK,mDAA+B,EAACJ,kBAAkB,CAAC;IACpD,CAAC;EACF,CAAC,EAAE,CACFd,aAAa,EACbP,UAAU,EACVE,aAAa,EACbC,gBAAgB,EAChBC,cAAc,EACdC,eAAe,EACfC,QAAQ,CACR,CAAC;AACH,CAAC;AAACoB,OAAA,CAAA3B,2BAAA,GAAAA,2BAAA","ignoreList":[]}
@@ -7,6 +7,7 @@ exports.useBoundaryPortalAttachment = void 0;
7
7
  var _reactNativeReanimated = require("react-native-reanimated");
8
8
  var _descriptors = require("../../../../../../providers/screen/descriptors");
9
9
  var _styles = require("../../../../../../providers/screen/styles");
10
+ var _boundaryRoot = require("../../../../providers/boundary-root.provider");
10
11
  var _naming = require("../../../utils/naming");
11
12
  var _teleportControl = require("../../../utils/teleport-control");
12
13
  var _hostRegistry = require("../stores/host-registry.store");
@@ -14,6 +15,12 @@ var _useActivePortalBoundaryHost = require("./use-active-portal-boundary-host");
14
15
  const useBoundaryPortalAttachment = ({
15
16
  boundaryId
16
17
  }) => {
18
+ const localMeasurement = (0, _boundaryRoot.useBoundaryRootStore)(root => {
19
+ if (!root) {
20
+ throw new Error("Boundary portal attachment requires a boundary root.");
21
+ }
22
+ return root.localMeasurement;
23
+ });
17
24
  const currentScreenKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.currentScreenKey);
18
25
  const {
19
26
  slotsMap
@@ -25,6 +32,7 @@ const useBoundaryPortalAttachment = ({
25
32
  boundaryId,
26
33
  currentScreenKey,
27
34
  escapeHostKey,
35
+ localMeasurement,
28
36
  portalHostName,
29
37
  portalHostReady,
30
38
  slotsMap
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNativeReanimated","require","_descriptors","_styles","_naming","_teleportControl","_hostRegistry","_useActivePortalBoundaryHost","useBoundaryPortalAttachment","boundaryId","currentScreenKey","useDescriptorsStore","s","derivations","slotsMap","useScreenSlots","portalHostName","useSharedValue","portalHostReady","escapeHostKey","useActiveHostKey","useActivePortalBoundaryHost","teleportProps","useAnimatedProps","slot","get","pointerEvents","_pointerEvents","teleport","slotProps","props","shouldAttach","undefined","isTeleportEnabled","hostName","PORTAL_HOST_NAME_RESET_VALUE","exports"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,4BAAA,GAAAN,OAAA;AAMO,MAAMO,2BAA2B,GAAGA,CAAC;EAC3CC;AACkC,CAAC,KAAK;EACxC,MAAMC,gBAAgB,GAAG,IAAAC,gCAAmB,EAC1CC,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACH,gBACtB,CAAC;EACD,MAAM;IAAEI;EAAS,CAAC,GAAG,IAAAC,sBAAc,EAAC,CAAC;EACrC,MAAMC,cAAc,GAAG,IAAAC,qCAAc,EAAgB,IAAI,CAAC;EAC1D,MAAMC,eAAe,GAAG,IAAAD,qCAAc,EAAC,KAAK,CAAC;EAC7C,MAAME,aAAa,GAAG,IAAAC,8BAAgB,EAACV,gBAAgB,CAAC;EAExD,IAAAW,wDAA2B,EAAC;IAC3BZ,UAAU;IACVC,gBAAgB;IAChBS,aAAa;IACbH,cAAc;IACdE,eAAe;IACfJ;EACD,CAAC,CAAC;EAEF,MAAMQ,aAAa,GAAG,IAAAC,uCAAgB,EAAC,MAAM;IAC5C,SAAS;;IAET,MAAMC,IAAI,GAAGV,QAAQ,CAACW,GAAG,CAAC,CAAC,CAAChB,UAAU,CAAC;IACvC,MAAM;MACLiB,aAAa,EAAEC,cAAc;MAC7BC,QAAQ;MACR,GAAGC;IACJ,CAAC,GAAGL,IAAI,EAAEM,KAAK,IAAI,CAAC,CAAC;IACrB,MAAMC,YAAY,GACjBP,IAAI,KAAKQ,SAAS,IAClB,IAAAC,kCAAiB,EAACL,QAAQ,CAAC,IAC3BV,eAAe,CAACO,GAAG,CAAC,CAAC;IACtB,MAAMS,QAAQ,GAAGH,YAAY,GAC1Bf,cAAc,CAACS,GAAG,CAAC,CAAC,GACpBU,oCAA4B;IAE/B,OAAO;MACN,GAAGN,SAAS;MACZK;IACD,CAAC;EACF,CAAC,CAAC;EAEF,OAAO;IAAEZ;EAAc,CAAC;AACzB,CAAC;AAACc,OAAA,CAAA5B,2BAAA,GAAAA,2BAAA","ignoreList":[]}
1
+ {"version":3,"names":["_reactNativeReanimated","require","_descriptors","_styles","_boundaryRoot","_naming","_teleportControl","_hostRegistry","_useActivePortalBoundaryHost","useBoundaryPortalAttachment","boundaryId","localMeasurement","useBoundaryRootStore","root","Error","currentScreenKey","useDescriptorsStore","s","derivations","slotsMap","useScreenSlots","portalHostName","useSharedValue","portalHostReady","escapeHostKey","useActiveHostKey","useActivePortalBoundaryHost","teleportProps","useAnimatedProps","slot","get","pointerEvents","_pointerEvents","teleport","slotProps","props","shouldAttach","undefined","isTeleportEnabled","hostName","PORTAL_HOST_NAME_RESET_VALUE","exports"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,OAAA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AAAC,kCAAiB,EAACL,QAAQ,CAAC,IAC3BV,eAAe,CAACO,GAAG,CAAC,CAAC;IAEtB,MAAMS,QAAQ,GAAGH,YAAY,GAC1Bf,cAAc,CAACS,GAAG,CAAC,CAAC,GACpBU,oCAA4B;IAE/B,OAAO;MACN,GAAGN,SAAS;MACZK;IACD,CAAC;EACF,CAAC,CAAC;EAEF,OAAO;IAAEZ;EAAc,CAAC;AACzB,CAAC;AAACc,OAAA,CAAAhC,2BAAA,GAAAA,2BAAA","ignoreList":[]}
@@ -4,33 +4,22 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useHostMeasurement = void 0;
7
- var _react = require("react");
8
7
  var _reactNativeReanimated = require("react-native-reanimated");
9
- var _scroll = require("../../../../../../stores/scroll.store");
10
- var _visibilityBlockOffset = require("../../../../../../utils/visibility-block-offset");
11
- var _measuredBounds = require("../../../../utils/measured-bounds");
12
- var _hostBounds = require("../stores/host-bounds.store");
13
8
  const HOST_MEASUREMENT_RETRY_DELAY_MS = 16;
14
9
  const useHostMeasurement = ({
15
- capturesScroll,
16
- enabled,
17
- hostKey,
18
- screenKey,
19
- visibilityBlocked,
20
- viewportHeight,
21
- viewportWidth
10
+ measurementKey
22
11
  }) => {
23
12
  const hostRef = (0, _reactNativeReanimated.useAnimatedRef)();
24
- const scrollMetadata = _scroll.ScrollStore.getValue(screenKey, "metadata");
25
- const hasMeasuredHost = (0, _reactNativeReanimated.useSharedValue)(false);
13
+ const hostBounds = (0, _reactNativeReanimated.useSharedValue)(null);
14
+ const measuredKey = (0, _reactNativeReanimated.useSharedValue)(null);
26
15
  const retryToken = (0, _reactNativeReanimated.useSharedValue)(0);
27
16
  (0, _reactNativeReanimated.useAnimatedReaction)(() => {
28
17
  "worklet";
29
18
 
30
- if (!enabled) {
19
+ if (!measurementKey) {
31
20
  return null;
32
21
  }
33
- return [hasMeasuredHost.get(), retryToken.get()];
22
+ return [measurementKey, measuredKey.get(), retryToken.get()];
34
23
  }, state => {
35
24
  "worklet";
36
25
 
@@ -38,8 +27,8 @@ const useHostMeasurement = ({
38
27
  (0, _reactNativeReanimated.cancelAnimation)(retryToken);
39
28
  return;
40
29
  }
41
- const [hasAlreadyMeasured] = state;
42
- if (!enabled || hasAlreadyMeasured) {
30
+ const [requestedKey, completedKey] = state;
31
+ if (requestedKey === completedKey) {
43
32
  return;
44
33
  }
45
34
  const measured = (0, _reactNativeReanimated.measure)(hostRef);
@@ -51,44 +40,27 @@ const useHostMeasurement = ({
51
40
  return;
52
41
  }
53
42
  (0, _reactNativeReanimated.cancelAnimation)(retryToken);
54
-
55
- // A measurement taken mid rubber-band would bake the transient
56
- // overscroll displacement into the host frame. Store the at-rest
57
- // position instead; clamped scroll deltas share that basis.
58
- const currentScroll = scrollMetadata.get();
59
- const overscrollNormalized = capturesScroll ? (0, _measuredBounds.adjustedMeasuredBoundsForOverscrollDeltas)(measured, currentScroll) : measured;
60
- const correctedMeasured = (0, _measuredBounds.correctMeasuredBoundsForVisibilityGate)({
61
- measured: overscrollNormalized,
62
- visibilityBlocked: visibilityBlocked.get(),
63
- visibilityBlockOffset: (0, _visibilityBlockOffset.getVisibilityBlockOffset)(viewportHeight),
64
- viewportWidth,
65
- viewportHeight
66
- });
67
- if (correctedMeasured.width <= 0 || correctedMeasured.height <= 0) {
43
+ if (measured.width <= 0 || measured.height <= 0) {
68
44
  (0, _reactNativeReanimated.cancelAnimation)(retryToken);
69
45
  retryToken.set((0, _reactNativeReanimated.withDelay)(HOST_MEASUREMENT_RETRY_DELAY_MS, (0, _reactNativeReanimated.withTiming)(retryToken.get() + 1, {
70
46
  duration: 0
71
47
  })));
72
48
  return;
73
49
  }
74
- (0, _hostBounds.setPortalHostBounds)(hostKey, {
75
- x: correctedMeasured.x,
76
- y: correctedMeasured.y,
77
- width: correctedMeasured.width,
78
- height: correctedMeasured.height,
79
- pageX: correctedMeasured.pageX,
80
- pageY: correctedMeasured.pageY,
81
- scroll: capturesScroll ? currentScroll : null
50
+ hostBounds.set({
51
+ x: measured.x,
52
+ y: measured.y,
53
+ width: measured.width,
54
+ height: measured.height,
55
+ pageX: measured.pageX,
56
+ pageY: measured.pageY
82
57
  });
83
- hasMeasuredHost.set(true);
58
+ measuredKey.set(requestedKey);
84
59
  });
85
- (0, _react.useLayoutEffect)(() => {
86
- return () => {
87
- (0, _reactNativeReanimated.runOnUI)(_hostBounds.clearPortalHostBounds)(hostKey);
88
- };
89
- }, [hostKey]);
90
60
  return {
91
- hostRef
61
+ hostBounds,
62
+ hostRef,
63
+ measuredKey
92
64
  };
93
65
  };
94
66
  exports.useHostMeasurement = useHostMeasurement;
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_reactNativeReanimated","_scroll","_visibilityBlockOffset","_measuredBounds","_hostBounds","HOST_MEASUREMENT_RETRY_DELAY_MS","useHostMeasurement","capturesScroll","enabled","hostKey","screenKey","visibilityBlocked","viewportHeight","viewportWidth","hostRef","useAnimatedRef","scrollMetadata","ScrollStore","getValue","hasMeasuredHost","useSharedValue","retryToken","useAnimatedReaction","get","state","cancelAnimation","hasAlreadyMeasured","measured","measure","set","withDelay","withTiming","duration","currentScroll","overscrollNormalized","adjustedMeasuredBoundsForOverscrollDeltas","correctedMeasured","correctMeasuredBoundsForVisibilityGate","visibilityBlockOffset","getVisibilityBlockOffset","width","height","setPortalHostBounds","x","y","pageX","pageY","scroll","useLayoutEffect","runOnUI","clearPortalHostBounds","exports"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,sBAAA,GAAAD,OAAA;AAWA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,sBAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AAIA,IAAAK,WAAA,GAAAL,OAAA;AAKA,MAAMM,+BAA+B,GAAG,EAAE;AAYnC,MAAMC,kBAAk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AO,CAAC,CAAC;EAEb,OAAO;IACNK;EACD,CAAC;AACF,CAAC;AAACqC,OAAA,CAAA7C,kBAAA,GAAAA,kBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_reactNativeReanimated","require","HOST_MEASUREMENT_RETRY_DELAY_MS","useHostMeasurement","measurementKey","hostRef","useAnimatedRef","hostBounds","useSharedValue","measuredKey","retryToken","useAnimatedReaction","get","state","cancelAnimation","requestedKey","completedKey","measured","measure","set","withDelay","withTiming","duration","width","height","x","y","pageX","pageY","exports"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.ts"],"mappings":";;;;;;AACA,IAAAA,sBAAA,GAAAC,OAAA;AAWA,MAAMC,+BAA+B,GAAG,EAAE;AAMnC,MAAMC,kBAAkB,GAAGA,CAAC;EAClCC;AACyB,CAAC,KAAK;EAC/B,MAAMC,OAAO,GAAG,IAAAC,qCAAc,EAAO,CAAC;EACtC,MAAMC,UAAU,GAAG,IAAAC,qCAAc,EAA4B,IAAI,CAAC;EAClE,MAAMC,WAAW,GAAG,IAAAD,qCAAc,EAAgB,IAAI,CAAC;EACvD,MAAME,UAAU,GAAG,IAAAF,qCAAc,EAAC,CAAC,CAAC;EAEpC,IAAAG,0CAAmB,EAClB,MAAM;IACL,SAAS;;IACT,IAAI,CAACP,cAAc,EAAE;MACpB,OAAO,IAAI;IACZ;IAEA,OAAO,CAACA,cAAc,EAAEK,WAAW,CAACG,GAAG,CAAC,CAAC,EAAEF,UAAU,CAACE,GAAG,CAAC,CAAC,CAAC;EAC7D,CAAC,EACAC,KAAK,IAAK;IACV,SAAS;;IACT,IAAI,CAACA,KAAK,EAAE;MACX,IAAAC,sCAAe,EAACJ,UAAU,CAAC;MAC3B;IACD;IAEA,MAAM,CAACK,YAAY,EAAEC,YAAY,CAAC,GAAGH,KAAK;IAC1C,IAAIE,YAAY,KAAKC,YAAY,EAAE;MAClC;IACD;IAEA,MAAMC,QAAQ,GAAG,IAAAC,8BAAO,EAACb,OAAO,CAAC;IAEjC,IAAI,CAACY,QAAQ,EAAE;MACd,IAAAH,sCAAe,EAACJ,UAAU,CAAC;MAC3BA,UAAU,CAACS,GAAG,CACb,IAAAC,gCAAS,EACRlB,+BAA+B,EAC/B,IAAAmB,iCAAU,EAACX,UAAU,CAACE,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE;QAAEU,QAAQ,EAAE;MAAE,CAAC,CACjD,CACD,CAAC;MACD;IACD;IAEA,IAAAR,sCAAe,EAACJ,UAAU,CAAC;IAE3B,IAAIO,QAAQ,CAACM,KAAK,IAAI,CAAC,IAAIN,QAAQ,CAACO,MAAM,IAAI,CAAC,EAAE;MAChD,IAAAV,sCAAe,EAACJ,UAAU,CAAC;MAC3BA,UAAU,CAACS,GAAG,CACb,IAAAC,gCAAS,EACRlB,+BAA+B,EAC/B,IAAAmB,iCAAU,EAACX,UAAU,CAACE,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE;QAAEU,QAAQ,EAAE;MAAE,CAAC,CACjD,CACD,CAAC;MACD;IACD;IAEAf,UAAU,CAACY,GAAG,CAAC;MACdM,CAAC,EAAER,QAAQ,CAACQ,CAAC;MACbC,CAAC,EAAET,QAAQ,CAACS,CAAC;MACbH,KAAK,EAAEN,QAAQ,CAACM,KAAK;MACrBC,MAAM,EAAEP,QAAQ,CAACO,MAAM;MACvBG,KAAK,EAAEV,QAAQ,CAACU,KAAK;MACrBC,KAAK,EAAEX,QAAQ,CAACW;IACjB,CAAC,CAAC;IACFnB,WAAW,CAACU,GAAG,CAACJ,YAAY,CAAC;EAC9B,CACD,CAAC;EAED,OAAO;IACNR,UAAU;IACVF,OAAO;IACPI;EACD,CAAC;AACF,CAAC;AAACoB,OAAA,CAAA1B,kBAAA,GAAAA,kBAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_reactNativeReanimated","_interopRequireWildcard","_logger","_teleport","_useBoundaryPortalAttachment","_usePlaceholderStyles","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","AnimatedNativePortal","TeleportPortal","Animated","createAnimatedComponent","EnabledNativePortal","BoundaryPortal","exports","memo","boundaryId","children","enabled","placeholderRef","isTeleportAvailable","jsx","EnabledBoundaryPortal","__DEV__","logger","warnOnce","teleportProps","useBoundaryPortalAttachment","handleOnLayout","placeholderStyle","usePlaceholderStyles","View","ref","onLayout","nativeEvent","layout","runOnUI","style","pointerEvents","PORTAL_POINTER_EVENTS","collapsable","animatedProps","name"],"sourceRoot":"../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAOA,IAAAC,sBAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AAKA,IAAAK,4BAAA,GAAAL,OAAA;AACA,IAAAM,qBAAA,GAAAN,OAAA;AAAsE,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAE,wBAAAM,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAR,uBAAA,YAAAA,CAAAM,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ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AAC,wDAA2B,EAAC;IAAEX;EAAW,CAAC,CAAC;EACrE,MAAM;IAAEY,cAAc;IAAEC;EAAiB,CAAC,GAAG,IAAAC,0CAAoB,EAAC,CAAC;EAEnE,oBACC,IAAA1C,WAAA,CAAAiC,GAAA,EAACvC,sBAAA,CAAAiB,OAAQ,CAACgC,IAAI;IACbC,GAAG,EAAEb,cAAe;IACpBc,QAAQ,EAAEA,CAAC;MAAEC,WAAW,EAAE;QAAEC;MAAO;IAAE,CAAC,KACrC,IAAAC,8BAAO,EAACR,cAAc,CAAC,CAACO,MAAM,CAC9B;IACDE,KAAK,EAAER,gBAAiB;IACxBS,aAAa,EAAEC,+BAAsB;IACrCC,WAAW,EAAE,KAAM;IAAAvB,QAAA,eAEnB,IAAA7B,WAAA,CAAAiC,GAAA,EAACT,mBAAmB;MACnB6B,aAAa,EAAEf,aAAc;MAC7BgB,IAAI,EAAE1B,UAAW;MACjBsB,aAAa,EAAEC,+BAAsB;MAAAtB,QAAA,EAEpCA;IAAQ,CACW;EAAC,CACR,CAAC;AAElB,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","require","_reactNativeReanimated","_interopRequireWildcard","_logger","_teleport","_useBoundaryPortalAttachment","_usePlaceholderStyles","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","AnimatedNativePortal","TeleportPortal","Animated","createAnimatedComponent","EnabledNativePortal","BoundaryPortal","exports","memo","boundaryId","children","enabled","placeholderRef","isTeleportAvailable","jsx","EnabledBoundaryPortal","__DEV__","logger","warnOnce","teleportProps","useBoundaryPortalAttachment","handleOnLayout","placeholderStyle","usePlaceholderStyles","View","ref","onLayout","nativeEvent","layout","runOnUI","style","pointerEvents","PORTAL_POINTER_EVENTS","collapsable","animatedProps","name"],"sourceRoot":"../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/index.tsx"],"mappings":";;;;;;AAAA,IA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AA,eAEnB,IAAA7B,WAAA,CAAAiC,GAAA,EAACT,mBAAmB;MACnB6B,aAAa,EAAEf,aAAc;MAC7BgB,IAAI,EAAE1B,UAAW;MACjBsB,aAAa,EAAEC,+BAAsB;MAAAtB,QAAA,EAEpCA;IAAQ,CACW;EAAC,CACR,CAAC;AAElB,CAAC,CAAC","ignoreList":[]}
@@ -29,7 +29,7 @@ const emit = () => {
29
29
  }
30
30
  };
31
31
  const isSameHost = (a, b) => {
32
- 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;
32
+ 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;
33
33
  };
34
34
  const mountPortalBoundaryHost = host => {
35
35
  const previous = activeBoundaryHosts.get(host.portalHostName);
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","EMPTY_HOSTS","listeners","Set","activeBoundaryHosts","Map","snapshot","hostsByScope","buildSnapshot","host","values","hosts","hostKey","push","emit","listener","isSameHost","a","b","boundaryId","pairKey","portalHostName","portalHostReady","screenKey","slotsMap","mountPortalBoundaryHost","previous","get","set","exports","unmountPortalBoundaryHostByName","delete","subscribe","add","useActivePortalBoundaryHosts","useSyncExternalStore"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAkBA,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;AACh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CAACnB,IAAI,CAACY,cAAc,EAAEZ,IAAI,CAAC;EAClDK,IAAI,CAAC,CAAC;AACP,CAAC;AAACe,OAAA,CAAAJ,uBAAA,GAAAA,uBAAA;AAEK,MAAMK,+BAA+B,GAC3CT,cAAyC,IACrC;EACJ,IAAI,CAACA,cAAc,IAAI,CAACjB,mBAAmB,CAAC2B,MAAM,CAACV,cAAc,CAAC,EAAE;IACnE;EACD;EAEAP,IAAI,CAAC,CAAC;AACP,CAAC;AAACe,OAAA,CAAAC,+BAAA,GAAAA,+BAAA;AAEF,MAAME,SAAS,GAAIjB,QAAoB,IAAK;EAC3Cb,SAAS,CAAC+B,GAAG,CAAClB,QAAQ,CAAC;EAEvB,OAAO,MAAM;IACZb,SAAS,CAAC6B,MAAM,CAAChB,QAAQ,CAAC;EAC3B,CAAC;AACF,CAAC;AAEM,MAAMmB,4BAA4B,GAAItB,OAAe,IAAK;EAChE,OAAO,IAAAuB,2BAAoB,EAC1BH,SAAS,EACT,MAAM1B,QAAQ,CAACC,YAAY,CAACK,OAAO,CAAC,IAAIX,WAAW,EACnD,MAAMA,WACP,CAAC;AACF,CAAC;AAAC4B,OAAA,CAAAK,4BAAA,GAAAA,4BAAA","ignoreList":[]}
1
+ {"version":3,"names":["_react","require","EMPTY_HOSTS","listeners","Set","activeBoundaryHosts","Map","snapshot","hostsByScope","buildSnapshot","host","values","hosts","hostKey","push","emit","listener","isSameHost","a","b","boundaryId","localMeasurement","pairKey","portalHostName","portalHostReady","slotsMap","mountPortalBoundaryHost","previous","get","set","exports","unmountPortalBoundaryHostByName","delete","subscribe","add","useActivePortalBoundaryHosts","useSyncExternalStore"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAmBA,MAAMC,WAAuC,GAAG,EAAE;AAElD,MAAMC,SAAS,GAAG,IAAIC,GAAG,CAAa,CAAC;AACvC,MA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AAII,QAAQ,IAAIV,UAAU,CAACU,QAAQ,EAAEjB,IAAI,CAAC,EAAE;IAC3C;EACD;EAEAL,mBAAmB,CAACwB,GAAG,CAACnB,IAAI,CAACa,cAAc,EAAEb,IAAI,CAAC;EAClDK,IAAI,CAAC,CAAC;AACP,CAAC;AAACe,OAAA,CAAAJ,uBAAA,GAAAA,uBAAA;AAEK,MAAMK,+BAA+B,GAC3CR,cAAyC,IACrC;EACJ,IAAI,CAACA,cAAc,IAAI,CAAClB,mBAAmB,CAAC2B,MAAM,CAACT,cAAc,CAAC,EAAE;IACnE;EACD;EAEAR,IAAI,CAAC,CAAC;AACP,CAAC;AAACe,OAAA,CAAAC,+BAAA,GAAAA,+BAAA;AAEF,MAAME,SAAS,GAAIjB,QAAoB,IAAK;EAC3Cb,SAAS,CAAC+B,GAAG,CAAClB,QAAQ,CAAC;EAEvB,OAAO,MAAM;IACZb,SAAS,CAAC6B,MAAM,CAAChB,QAAQ,CAAC;EAC3B,CAAC;AACF,CAAC;AAEM,MAAMmB,4BAA4B,GAAItB,OAAe,IAAK;EAChE,OAAO,IAAAuB,2BAAoB,EAC1BH,SAAS,EACT,MAAM1B,QAAQ,CAACC,YAAY,CAACK,OAAO,CAAC,IAAIX,WAAW,EACnD,MAAMA,WACP,CAAC;AACF,CAAC;AAAC4B,OAAA,CAAAK,4BAAA,GAAAA,4BAAA","ignoreList":[]}
@@ -12,8 +12,9 @@ var _blankStack = require("../../../providers/stack/blank-stack.provider");
12
12
  var _linkPairs = require("../../../stores/bounds/helpers/link-pairs.helpers");
13
13
  var _createProvider = _interopRequireDefault(require("../../../utils/create-provider"));
14
14
  var _logger = require("../../../utils/logger");
15
- var _useBoundaryMeasurement = require("../hooks/use-boundary-measurement");
15
+ var _boundaryLifecycle = require("../components/boundary-lifecycle");
16
16
  var _resolvePortal = require("../portal/utils/resolve-portal");
17
+ var _jsxRuntime = require("react/jsx-runtime");
17
18
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
18
19
  // logger.warn prepends the library prefix.
19
20
  const MULTIPLE_TARGETS_WARNING = "Multiple Boundary.Target elements were rendered under the same boundary root. The first target in render order will be measured.";
@@ -43,7 +44,7 @@ const {
43
44
  escapeClipping
44
45
  });
45
46
  const currentScreenKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.currentScreenKey);
46
- const isCurrentScreenClosing = (0, _blankStack.useBlankStackStore)(store => store?.scenesByKey[currentScreenKey]?.activity === "closing");
47
+ const isCurrentScreenClosing = (0, _blankStack.useBlankStackStore)(store => portalRuntime.handoff && store?.scenesByKey[currentScreenKey]?.activity === "closing");
47
48
  const retainedBoundTagRef = (0, _react.useRef)(requestedBoundTag);
48
49
  const shouldRetainClosingBoundTag = portalRuntime.handoff && isCurrentScreenClosing;
49
50
 
@@ -54,8 +55,6 @@ const {
54
55
  retainedBoundTagRef.current = requestedBoundTag;
55
56
  }
56
57
  const boundTag = retainedBoundTagRef.current;
57
- const hasConfiguredInterpolator = (0, _descriptors.useDescriptorsStore)(s => s.derivations.hasConfiguredInterpolator);
58
- const runtimeEnabled = enabled && hasConfiguredInterpolator;
59
58
  // Associated slot styles attach whenever the boundary is enabled,
60
59
  // independent of whether an interpolator is configured for this transition.
61
60
  const shouldAttachAssociatedStyles = enabled;
@@ -64,6 +63,7 @@ const {
64
63
  const associatedStackingStyles = (0, _styles.useSlotStackingStyles)(boundTag.tag);
65
64
  const rootRef = (0, _reactNativeReanimated.useAnimatedRef)();
66
65
  const measurementRef = (0, _reactNativeReanimated.useAnimatedRef)();
66
+ const localMeasurement = (0, _reactNativeReanimated.useSharedValue)(null);
67
67
  (0, _react.useLayoutEffect)(() => {
68
68
  if (__DEV__ && targetCount > 1) {
69
69
  _logger.logger.warnOnce("boundary:multiple-targets", MULTIPLE_TARGETS_WARNING);
@@ -71,17 +71,6 @@ const {
71
71
  }, [targetCount]);
72
72
  const measuredRef = hasTarget || shouldEscapeBoundaryRootToScreenHost ? measurementRef : rootRef;
73
73
  (0, _react.useImperativeHandle)(forwardedRef, () => rootRef.current, [rootRef]);
74
- (0, _useBoundaryMeasurement.useBoundaryMeasurement)({
75
- boundTag,
76
- enabled,
77
- runtimeEnabled,
78
- currentScreenKey,
79
- measuredRef,
80
- style: hasTarget ? targetStyle : style,
81
- handoff: portalRuntime.handoff,
82
- escapeClipping: portalRuntime.escapeClipping,
83
- config
84
- });
85
74
  const shouldRenderBoundaryRootThroughPortal = shouldEscapeBoundaryRootToScreenHost && !hasTarget;
86
75
  const handoffEnabled = enabled && portalRuntime.handoff;
87
76
  // A nested active target takes the full associated style, so the root keeps
@@ -97,15 +86,28 @@ const {
97
86
  boundTag,
98
87
  currentScreenKey,
99
88
  handoffEnabled,
89
+ localMeasurement,
100
90
  measurementRef,
101
91
  portalRuntime,
102
92
  ref: rootRef,
103
93
  shouldRenderBoundaryRootThroughPortal,
104
94
  shouldRenderHandoffHost: handoffEnabled && !hasTarget
105
- }), [attachedStyle, boundTag, currentScreenKey, handoffEnabled, hasTarget, measurementRef, portalRuntime, rootRef, shouldRenderBoundaryRootThroughPortal]);
95
+ }), [attachedStyle, boundTag, currentScreenKey, handoffEnabled, hasTarget, localMeasurement, measurementRef, portalRuntime, rootRef, shouldRenderBoundaryRootThroughPortal]);
106
96
  return {
107
97
  value,
108
- children: children(value)
98
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
99
+ children: [children(value), /*#__PURE__*/(0, _jsxRuntime.jsx)(_boundaryLifecycle.BoundaryLifecycle, {
100
+ boundTag: boundTag,
101
+ config: config,
102
+ currentScreenKey: currentScreenKey,
103
+ enabled: enabled,
104
+ escapeClipping: portalRuntime.escapeClipping,
105
+ handoff: portalRuntime.handoff,
106
+ localMeasurement: localMeasurement,
107
+ measuredRef: measuredRef,
108
+ style: hasTarget ? targetStyle : style
109
+ })]
110
+ })
109
111
  };
110
112
  });
111
113
  exports.useBoundaryRootStore = useBoundaryRootStore;
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_reactNativeReanimated","_descriptors","_styles","_blankStack","_linkPairs","_createProvider","_interopRequireDefault","_logger","_useBoundaryMeasurement","_resolvePortal","e","__esModule","default","MULTIPLE_TARGETS_WARNING","TARGET_OUTSIDE_ROOT_WARNING","exports","BoundaryRootProvider","useBoundaryRootStore","createProvider","guarded","children","config","enabled","escapeClipping","forwardedRef","group","handoff","hasTarget","id","style","targetCount","targetStyle","requestedBoundTag","useMemo","createBoundTag","String","portalRuntime","resolveBoundaryPortal","currentScreenKey","useDescriptorsStore","s","derivations","isCurrentScreenClosing","useBlankStackStore","store","scenesByKey","activity","retainedBoundTagRef","useRef","shouldRetainClosingBoundTag","current","boundTag","hasConfiguredInterpolator","runtimeEnabled","shouldAttachAssociatedStyles","shouldEscapeBoundaryRootToScreenHost","associatedStyles","useComposedSlotStyles","tag","associatedStackingStyles","useSlotStackingStyles","rootRef","useAnimatedRef","measurementRef","useLayoutEffect","__DEV__","logger","warnOnce","measuredRef","useImperativeHandle","useBoundaryMeasurement","shouldRenderBoundaryRootThroughPortal","handoffEnabled","attachedStyle","undefined","value","ref","shouldRenderHandoffHost"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/providers/boundary-root.provider.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAUA,IAAAC,sBAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAIA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AAEA,IAAAM,eAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AACA,IAAAS,uBAAA,GAAAT,OAAA;AACA,IAAAU,cAAA,GAAAV,OAAA;AAGwC,SAAAO,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AASxC;AACA,MAAMG,wBAA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AM+C,aAAa,GAAGnB,4BAA4B,GAC/C3B,SAAS,GACRgC,wBAAwB,GACxBY,qCAAqC,GACpCG,SAAS,GACTlB,gBAAgB,GAClBkB,SAAS;EAEZ,MAAMC,KAAK,GAAG,IAAA1C,cAAO,EACpB,OAAO;IACNwC,aAAa;IACbtB,QAAQ;IACRb,gBAAgB;IAChBkC,cAAc;IACdT,cAAc;IACd3B,aAAa;IACbwC,GAAG,EAAEf,OAAO;IACZU,qCAAqC;IACrCM,uBAAuB,EAAEL,cAAc,IAAI,CAAC7C;EAC7C,CAAC,CAAC,EACF,CACC8C,aAAa,EACbtB,QAAQ,EACRb,gBAAgB,EAChBkC,cAAc,EACd7C,SAAS,EACToC,cAAc,EACd3B,aAAa,EACbyB,OAAO,EACPU,qCAAqC,CAEvC,CAAC;EAED,OAAO;IACNI,KAAK;IACLvD,QAAQ,EAAEA,QAAQ,CAACuD,KAAK;EACzB,CAAC;AACF,CACD,CAAC;AAAC5D,OAAA,CAAAE,oBAAA,GAAAA,oBAAA;AAAAF,OAAA,CAAAC,oBAAA,GAAAA,oBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_react","require","_reactNativeReanimated","_descriptors","_styles","_blankStack","_linkPairs","_createProvider","_interopRequireDefault","_logger","_boundaryLifecycle","_resolvePortal","_jsxRuntime","e","__esModule","default","MULTIPLE_TARGETS_WARNING","TARGET_OUTSIDE_ROOT_WARNING","exports","BoundaryRootProvider","useBoundaryRootStore","createProvider","guarded","children","config","enabled","escapeClipping","forwardedRef","group","handoff","hasTarget","id","style","targetCount","targetStyle","requestedBoundTag","useMemo","createBoundTag","String","portalRuntime","resolveBoundaryPortal","currentScreenKey","useDescriptorsStore","s","derivations","isCurrentScreenClosing","useBlankStackStore","store","scenesByKey","activity","retainedBoundTagRef","useRef","shouldRetainClosingBoundTag","current","boundTag","shouldAttachAssociatedStyles","shouldEscapeBoundaryRootToScreenHost","associatedStyles","useComposedSlotStyles","tag","associatedStackingStyles","useSlotStackingStyles","rootRef","useAnimatedRef","measurementRef","localMeasurement","useSharedValue","useLayoutEffect","__DEV__","logger","warnOnce","measuredRef","useImperativeHandle","shouldRenderBoundaryRootThroughPortal","handoffEnabled","attachedStyle","undefined","value","ref","shouldRenderHandoffHost","jsxs","Fragment","jsx","BoundaryLifecycle"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/providers/boundary-root.provider.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAUA,IAAAC,sBAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAIA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AAEA,IAAAM,eAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AACA,IAAAS,kBAAA,GAAAT,OAAA;AACA,IAAAU,cAAA,GAAAV,OAAA;AAGwC,IAAAW,WAAA,GAAAX,OAAA;AAAA,SAAAO,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAWxC;AACA,MAAMG,wBAAwB,GAC7B,kIAAkI;AAE5H,MAAMC,2BAA2B,GAAAC,OAAA,CAAAD,2BAAA,GACvC,gHAAgH;AA6B1G,MAAM;EAAEE,oBAAoB;EAAEC;AAAqB,CAAC,GAAG,IAAAC,uBAAc,EAC3E,cAAc,EACd;EAAEC,OAAO,EAAE;AAAM,CAClB,CAAC,CACA,CAAC;EACAC,QAAQ;EACRC,MAAM;EACNC,OAAO,GAAG,IAAI;EACdC,cAAc;EACdC,YAAY;EACZC,KAAK;EACLC,OAAO;EACPC,SAAS;EACTC,EAAE;EACFC,KAAK;EACLC,WAAW;EACXC;AACD,CAAC,KAAK;EACL,MAAMC,iBAAiB,GAAG,IAAAC,cAAO,EAChC,MAAM,IAAAC,yBAAc,EAACC,MAAM,CAACP,EA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iB,gBAAgB,EAAEA,gBAAiB;QACnChB,OAAO,EAAEA,OAAQ;QACjBC,cAAc,EAAEa,aAAa,CAACb,cAAe;QAC7CG,OAAO,EAAEU,aAAa,CAACV,OAAQ;QAC/BoC,gBAAgB,EAAEA,gBAAiB;QACnCM,WAAW,EAAEA,WAAY;QACzBvC,KAAK,EAAEF,SAAS,GAAGI,WAAW,GAAGF;MAAM,CACvC,CAAC;IAAA,CACD;EAEJ,CAAC;AACF,CACD,CAAC;AAACd,OAAA,CAAAE,oBAAA,GAAAA,oBAAA;AAAAF,OAAA,CAAAC,oBAAA,GAAAA,oBAAA","ignoreList":[]}
@@ -27,11 +27,12 @@ const getRefreshBoundarySignal = params => {
27
27
  linkId,
28
28
  group,
29
29
  shouldRefresh,
30
+ settled = false,
30
31
  closing,
31
32
  linkState
32
33
  } = params;
33
34
  if (!enabled) return null;
34
- if (!shouldRefresh) {
35
+ if (!shouldRefresh && (!group || !settled)) {
35
36
  return null;
36
37
  }
37
38
 
@@ -59,25 +60,38 @@ const getRefreshBoundarySignal = params => {
59
60
  // Source side:
60
61
  // When the activeId changes, trigger a refresh to ensure the source bounds are captured.
61
62
  if (sourcePairKey) {
62
- const activeId = linkState?.[sourcePairKey]?.groups?.[group]?.activeId;
63
+ const pair = linkState?.[sourcePairKey];
64
+ const groupState = pair?.groups?.[group];
65
+ const activeId = groupState?.activeId;
63
66
  if (activeId !== linkId) {
64
67
  return null;
65
68
  }
66
- return buildRefreshSignal("source", sourcePairKey, [group, linkId, closing ? "closing" : "settled"].join("|"));
69
+
70
+ // The opening member is captured by the initial handshake. A settled
71
+ // refresh is only needed after selection moves to another member.
72
+ if (!shouldRefresh && (groupState?.initialId === undefined || activeId === groupState.initialId || !!pair?.links?.[linkId]?.source)) {
73
+ return null;
74
+ }
75
+ return buildRefreshSignal("source", sourcePairKey, [group, linkId, shouldRefresh ? closing ? "closing" : "settled" : "retarget"].join("|"));
67
76
  }
68
77
  const refreshDestinationPairKey = destinationPairKey;
69
78
  if (!refreshDestinationPairKey) return null;
70
79
 
71
80
  // Destination side:
72
81
  // When the activeId changes, trigger a refresh to ensure the destination bounds are captured.
73
- const activeId = linkState?.[refreshDestinationPairKey]?.groups?.[group]?.activeId;
82
+ const pair = linkState?.[refreshDestinationPairKey];
83
+ const groupState = pair?.groups?.[group];
84
+ const activeId = groupState?.activeId;
74
85
 
75
86
  // Destination retargeting should only measure a concrete member that already
76
87
  // participates in the pair. Missing members fall back to initialId at resolve.
77
88
  if (activeId !== linkId) {
78
89
  return null;
79
90
  }
80
- return buildRefreshSignal("destination", refreshDestinationPairKey, [group, linkId, closing ? "closing" : "settled"].join("|"));
91
+ if (!shouldRefresh && (groupState?.initialId === undefined || activeId === groupState.initialId || !!pair?.links?.[linkId]?.destination)) {
92
+ return null;
93
+ }
94
+ return buildRefreshSignal("destination", refreshDestinationPairKey, [group, linkId, shouldRefresh ? closing ? "closing" : "settled" : "retarget"].join("|"));
81
95
  };
82
96
  exports.getRefreshBoundarySignal = getRefreshBoundarySignal;
83
97
  //# sourceMappingURL=refresh-signals.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["SOURCE_SIGNAL_PREFIX","DESTINATION_SIGNAL_PREFIX","buildRefreshSignal","type","pairKey","key","prefix","signal","getRefreshBoundarySignal","params","enabled","currentScreenKey","sourcePairKey","destinationPairKey","linkId","group","shouldRefresh","closing","linkState","sourcePair","participates","links","sourceRequests","join","refreshDestinationPairKey","activeId","groups","exports"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/utils/refresh-signals.ts"],"mappings":";;;;;;AAMA,MAAMA,oBAAoB,GAAG,SAAS;AACtC,MAAMC,yBAAyB,GAAG,cAAc;AAMhD,MAAMC,kBAAkB,GAAGA,CAC1BC,IAA2B,EAC3BC,OAAsB,EACtBC,GAAW,KACgB;EAC3B,SAAS;;EACT,MAAMC,MAAM,GACXH,IAAI,KAAK,QAAQ,GAAGH,oBAAoB,GAAGC,yBAAyB;EACrE,OAAO;IACNE,IAAI;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IX,aAAa,EAAE;IAClB,MAAMa,QAAQ,GAAGP,SAAS,GAAGN,aAAa,CAAC,EAAEc,MAAM,GAAGX,KAAK,CAAC,EAAEU,QAAQ;IAEtE,IAAIA,QAAQ,KAAKX,MAAM,EAAE;MACxB,OAAO,IAAI;IACZ;IAEA,OAAOZ,kBAAkB,CACxB,QAAQ,EACRU,aAAa,EACb,CAACG,KAAK,EAAED,MAAM,EAAEG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC,CAACM,IAAI,CAAC,GAAG,CAC1D,CAAC;EACF;EAEA,MAAMC,yBAAyB,GAAGX,kBAAkB;EAEpD,IAAI,CAACW,yBAAyB,EAAE,OAAO,IAAI;;EAE3C;EACA;EACA,MAAMC,QAAQ,GACbP,SAAS,GAAGM,yBAAyB,CAAC,EAAEE,MAAM,GAAGX,KAAK,CAAC,EAAEU,QAAQ;;EAElE;EACA;EACA,IAAIA,QAAQ,KAAKX,MAAM,EAAE;IACxB,OAAO,IAAI;EACZ;EAEA,OAAOZ,kBAAkB,CACxB,aAAa,EACbsB,yBAAyB,EACzB,CAACT,KAAK,EAAED,MAAM,EAAEG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC,CAACM,IAAI,CAAC,GAAG,CAC1D,CAAC;AACF,CAAC;AAACI,OAAA,CAAAnB,wBAAA,GAAAA,wBAAA","ignoreList":[]}
1
+ {"version":3,"names":["SOURCE_SIGNAL_PREFIX","DESTINATION_SIGNAL_PREFIX","buildRefreshSignal","type","pairKey","key","prefix","signal","getRefreshBoundarySignal","params","enabled","currentScreenKey","sourcePairKey","destinationPairKey","linkId","group","shouldRefresh","settled","closing","linkState","sourcePair","participates","links","sourceRequests","join","refreshDestinationPairKey","pair","groupState","groups","activeId","initialId","undefined","source","destination","exports"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/utils/refresh-signals.ts"],"mappings":";;;;;;AAMA,MAAMA,oBAAoB,GAAG,SAAS;AACtC,MAAMC,yBAAyB,GAAG,cAAc;AAMhD,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