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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (479) hide show
  1. package/lib/commonjs/shared/adapters/with-screen-transitions/index.js +20 -4
  2. package/lib/commonjs/shared/adapters/with-screen-transitions/index.js.map +1 -1
  3. package/lib/commonjs/shared/animation/transition-blocking.js +71 -0
  4. package/lib/commonjs/shared/animation/transition-blocking.js.map +1 -0
  5. package/lib/commonjs/shared/components/boundary/components/boundary-target.js +33 -28
  6. package/lib/commonjs/shared/components/boundary/components/boundary-target.js.map +1 -1
  7. package/lib/commonjs/shared/components/boundary/create-boundary-component.js +30 -95
  8. package/lib/commonjs/shared/components/boundary/create-boundary-component.js.map +1 -1
  9. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +75 -51
  10. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -1
  11. package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js +1 -0
  12. package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
  13. package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js +14 -2
  14. package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js.map +1 -1
  15. package/lib/commonjs/shared/components/boundary/hooks/use-register-target.js +32 -0
  16. package/lib/commonjs/shared/components/boundary/hooks/use-register-target.js.map +1 -0
  17. package/lib/commonjs/shared/components/boundary/index.js +1 -1
  18. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/components/host.js +41 -0
  19. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/components/host.js.map +1 -0
  20. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.js +14 -0
  21. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.js.map +1 -0
  22. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +224 -0
  23. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -0
  24. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/index.js +45 -0
  25. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/index.js.map +1 -0
  26. package/lib/commonjs/shared/components/boundary/portal/components/{host.js → boundary-portal/components/host.js} +20 -18
  27. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/host.js.map +1 -0
  28. package/lib/commonjs/shared/components/boundary/portal/components/{portal-boundary-host.js → boundary-portal/components/portal-boundary-host.js} +13 -12
  29. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -0
  30. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js +51 -0
  31. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js.map +1 -0
  32. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.js.map +1 -0
  33. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/host-name.js +14 -0
  34. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/host-name.js.map +1 -0
  35. package/lib/commonjs/shared/components/boundary/portal/{utils → components/boundary-portal/helpers}/offset-style.js +1 -1
  36. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.js.map +1 -0
  37. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +185 -0
  38. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -0
  39. package/lib/commonjs/shared/components/boundary/portal/{hooks → components/boundary-portal/hooks}/use-host-measurement.js +23 -5
  40. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js.map +1 -0
  41. package/lib/commonjs/shared/components/boundary/portal/{hooks → components/boundary-portal/hooks}/use-placeholder-styles.js +3 -6
  42. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-placeholder-styles.js.map +1 -0
  43. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/index.js +31 -0
  44. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/index.js.map +1 -0
  45. package/lib/commonjs/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-bounds.store.js +1 -1
  46. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.js.map +1 -0
  47. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/host-registry.store.js.map +1 -0
  48. package/lib/commonjs/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/portal-boundary-host.store.js +7 -12
  49. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -0
  50. package/lib/commonjs/shared/components/boundary/portal/index.js +1 -8
  51. package/lib/commonjs/shared/components/boundary/portal/index.js.map +1 -1
  52. package/lib/commonjs/shared/components/boundary/portal/teleport.js +4 -3
  53. package/lib/commonjs/shared/components/boundary/portal/teleport.js.map +1 -1
  54. package/lib/commonjs/shared/components/boundary/portal/utils/naming.js +1 -15
  55. package/lib/commonjs/shared/components/boundary/portal/utils/naming.js.map +1 -1
  56. package/lib/commonjs/shared/components/boundary/portal/utils/ownership.js +19 -56
  57. package/lib/commonjs/shared/components/boundary/portal/utils/ownership.js.map +1 -1
  58. package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js +90 -23
  59. package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
  60. package/lib/commonjs/shared/components/boundary/utils/destination-signals.js +41 -12
  61. package/lib/commonjs/shared/components/boundary/utils/destination-signals.js.map +1 -1
  62. package/lib/commonjs/shared/components/boundary/utils/measured-bounds.js +36 -1
  63. package/lib/commonjs/shared/components/boundary/utils/measured-bounds.js.map +1 -1
  64. package/lib/commonjs/shared/components/screen-container/layers/content.js +1 -1
  65. package/lib/commonjs/shared/configs/presets.js +2 -2
  66. package/lib/commonjs/shared/configs/presets.js.map +1 -1
  67. package/lib/commonjs/shared/constants.js +4 -0
  68. package/lib/commonjs/shared/constants.js.map +1 -1
  69. package/lib/commonjs/shared/index.js +13 -0
  70. package/lib/commonjs/shared/index.js.map +1 -1
  71. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +4 -0
  72. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
  73. package/lib/commonjs/shared/providers/screen/gestures/pan/activation/use-pan-activation.js +10 -10
  74. package/lib/commonjs/shared/providers/screen/gestures/pan/activation/use-pan-activation.js.map +1 -1
  75. package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js +10 -2
  76. package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js.map +1 -1
  77. package/lib/commonjs/shared/providers/screen/gestures/pan/use-build-pan-gesture.js +1 -1
  78. package/lib/commonjs/shared/providers/screen/gestures/pan/use-build-pan-gesture.js.map +1 -1
  79. package/lib/commonjs/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js +25 -3
  80. package/lib/commonjs/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js.map +1 -1
  81. package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js +4 -6
  82. package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js.map +1 -1
  83. package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js +2 -2
  84. package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js.map +1 -1
  85. package/lib/commonjs/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.js +6 -1
  86. package/lib/commonjs/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.js.map +1 -1
  87. package/lib/commonjs/shared/providers/screen/gestures/shared/snapshot.js +2 -0
  88. package/lib/commonjs/shared/providers/screen/gestures/shared/snapshot.js.map +1 -1
  89. package/lib/commonjs/shared/providers/screen/gestures/shared/values.js +2 -0
  90. package/lib/commonjs/shared/providers/screen/gestures/shared/values.js.map +1 -1
  91. package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +13 -1
  92. package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
  93. package/lib/commonjs/shared/providers/screen/styles/slot.provider.js +5 -3
  94. package/lib/commonjs/shared/providers/screen/styles/slot.provider.js.map +1 -1
  95. package/lib/commonjs/shared/providers/screen/styles/stores/slot-references.store.js +1 -1
  96. package/lib/commonjs/shared/providers/screen/styles/stores/slot-references.store.js.map +1 -1
  97. package/lib/commonjs/shared/stores/gesture.store.js +8 -0
  98. package/lib/commonjs/shared/stores/gesture.store.js.map +1 -1
  99. package/lib/commonjs/shared/stores/system.store.js +10 -2
  100. package/lib/commonjs/shared/stores/system.store.js.map +1 -1
  101. package/lib/commonjs/shared/utils/animation/animate-to-progress.js +24 -7
  102. package/lib/commonjs/shared/utils/animation/animate-to-progress.js.map +1 -1
  103. package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js +15 -9
  104. package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
  105. package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js +2 -2
  106. package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
  107. package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js +2 -1
  108. package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
  109. package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js +178 -315
  110. package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
  111. package/lib/commonjs/shared/utils/bounds/navigation/zoom/config.js +12 -18
  112. package/lib/commonjs/shared/utils/bounds/navigation/zoom/config.js.map +1 -1
  113. package/lib/commonjs/shared/utils/bounds/navigation/zoom/drag.js +196 -0
  114. package/lib/commonjs/shared/utils/bounds/navigation/zoom/drag.js.map +1 -0
  115. package/lib/commonjs/shared/utils/bounds/navigation/zoom/helpers.js +94 -108
  116. package/lib/commonjs/shared/utils/bounds/navigation/zoom/helpers.js.map +1 -1
  117. package/lib/commonjs/shared/utils/bounds/navigation/zoom/mask.js +72 -0
  118. package/lib/commonjs/shared/utils/bounds/navigation/zoom/mask.js.map +1 -0
  119. package/lib/commonjs/shared/utils/bounds/navigation/zoom/targets.js +55 -0
  120. package/lib/commonjs/shared/utils/bounds/navigation/zoom/targets.js.map +1 -0
  121. package/lib/module/shared/adapters/with-screen-transitions/index.js +19 -5
  122. package/lib/module/shared/adapters/with-screen-transitions/index.js.map +1 -1
  123. package/lib/module/shared/animation/transition-blocking.js +66 -0
  124. package/lib/module/shared/animation/transition-blocking.js.map +1 -0
  125. package/lib/module/shared/components/boundary/components/boundary-target.js +35 -30
  126. package/lib/module/shared/components/boundary/components/boundary-target.js.map +1 -1
  127. package/lib/module/shared/components/boundary/create-boundary-component.js +32 -97
  128. package/lib/module/shared/components/boundary/create-boundary-component.js.map +1 -1
  129. package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +79 -55
  130. package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -1
  131. package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js +1 -0
  132. package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
  133. package/lib/module/shared/components/boundary/hooks/use-measurer.js +15 -3
  134. package/lib/module/shared/components/boundary/hooks/use-measurer.js.map +1 -1
  135. package/lib/module/shared/components/boundary/hooks/use-register-target.js +27 -0
  136. package/lib/module/shared/components/boundary/hooks/use-register-target.js.map +1 -0
  137. package/lib/module/shared/components/boundary/index.js +1 -1
  138. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/components/host.js +36 -0
  139. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/components/host.js.map +1 -0
  140. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.js +9 -0
  141. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.js.map +1 -0
  142. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +219 -0
  143. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -0
  144. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/index.js +34 -0
  145. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/index.js.map +1 -0
  146. package/lib/module/shared/components/boundary/portal/components/{host.js → boundary-portal/components/host.js} +20 -18
  147. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/host.js.map +1 -0
  148. package/lib/module/shared/components/boundary/portal/components/{portal-boundary-host.js → boundary-portal/components/portal-boundary-host.js} +13 -12
  149. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -0
  150. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js +46 -0
  151. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js.map +1 -0
  152. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.js.map +1 -0
  153. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/host-name.js +9 -0
  154. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/host-name.js.map +1 -0
  155. package/lib/module/shared/components/boundary/portal/{utils → components/boundary-portal/helpers}/offset-style.js +1 -1
  156. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.js.map +1 -0
  157. package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +180 -0
  158. package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -0
  159. package/lib/module/shared/components/boundary/portal/{hooks → components/boundary-portal/hooks}/use-host-measurement.js +23 -5
  160. package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js.map +1 -0
  161. package/lib/module/shared/components/boundary/portal/{hooks → components/boundary-portal/hooks}/use-placeholder-styles.js +3 -6
  162. package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-placeholder-styles.js.map +1 -0
  163. package/lib/module/shared/components/boundary/portal/components/boundary-portal/index.js +27 -0
  164. package/lib/module/shared/components/boundary/portal/components/boundary-portal/index.js.map +1 -0
  165. package/lib/module/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-bounds.store.js +1 -1
  166. package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.js.map +1 -0
  167. package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/host-registry.store.js.map +1 -0
  168. package/lib/module/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/portal-boundary-host.store.js +5 -10
  169. package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -0
  170. package/lib/module/shared/components/boundary/portal/index.js +1 -2
  171. package/lib/module/shared/components/boundary/portal/index.js.map +1 -1
  172. package/lib/module/shared/components/boundary/portal/teleport.js +3 -2
  173. package/lib/module/shared/components/boundary/portal/teleport.js.map +1 -1
  174. package/lib/module/shared/components/boundary/portal/utils/naming.js +0 -12
  175. package/lib/module/shared/components/boundary/portal/utils/naming.js.map +1 -1
  176. package/lib/module/shared/components/boundary/portal/utils/ownership.js +16 -52
  177. package/lib/module/shared/components/boundary/portal/utils/ownership.js.map +1 -1
  178. package/lib/module/shared/components/boundary/providers/boundary-root.provider.js +87 -20
  179. package/lib/module/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
  180. package/lib/module/shared/components/boundary/utils/destination-signals.js +39 -10
  181. package/lib/module/shared/components/boundary/utils/destination-signals.js.map +1 -1
  182. package/lib/module/shared/components/boundary/utils/measured-bounds.js +34 -0
  183. package/lib/module/shared/components/boundary/utils/measured-bounds.js.map +1 -1
  184. package/lib/module/shared/components/screen-container/layers/content.js +1 -1
  185. package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
  186. package/lib/module/shared/configs/presets.js +2 -2
  187. package/lib/module/shared/configs/presets.js.map +1 -1
  188. package/lib/module/shared/constants.js +4 -0
  189. package/lib/module/shared/constants.js.map +1 -1
  190. package/lib/module/shared/index.js +1 -0
  191. package/lib/module/shared/index.js.map +1 -1
  192. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +4 -0
  193. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
  194. package/lib/module/shared/providers/screen/gestures/pan/activation/use-pan-activation.js +10 -10
  195. package/lib/module/shared/providers/screen/gestures/pan/activation/use-pan-activation.js.map +1 -1
  196. package/lib/module/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js +10 -2
  197. package/lib/module/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js.map +1 -1
  198. package/lib/module/shared/providers/screen/gestures/pan/use-build-pan-gesture.js +1 -1
  199. package/lib/module/shared/providers/screen/gestures/pan/use-build-pan-gesture.js.map +1 -1
  200. package/lib/module/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js +23 -2
  201. package/lib/module/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js.map +1 -1
  202. package/lib/module/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js +4 -6
  203. package/lib/module/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js.map +1 -1
  204. package/lib/module/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js +2 -2
  205. package/lib/module/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js.map +1 -1
  206. package/lib/module/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.js +6 -1
  207. package/lib/module/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.js.map +1 -1
  208. package/lib/module/shared/providers/screen/gestures/shared/snapshot.js +2 -0
  209. package/lib/module/shared/providers/screen/gestures/shared/snapshot.js.map +1 -1
  210. package/lib/module/shared/providers/screen/gestures/shared/values.js +2 -0
  211. package/lib/module/shared/providers/screen/gestures/shared/values.js.map +1 -1
  212. package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +13 -1
  213. package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
  214. package/lib/module/shared/providers/screen/styles/slot.provider.js +5 -3
  215. package/lib/module/shared/providers/screen/styles/slot.provider.js.map +1 -1
  216. package/lib/module/shared/providers/screen/styles/stores/slot-references.store.js +1 -1
  217. package/lib/module/shared/providers/screen/styles/stores/slot-references.store.js.map +1 -1
  218. package/lib/module/shared/stores/gesture.store.js +8 -0
  219. package/lib/module/shared/stores/gesture.store.js.map +1 -1
  220. package/lib/module/shared/stores/system.store.js +10 -2
  221. package/lib/module/shared/stores/system.store.js.map +1 -1
  222. package/lib/module/shared/types/bounds.types.js +26 -0
  223. package/lib/module/shared/types/bounds.types.js.map +1 -1
  224. package/lib/module/shared/utils/animation/animate-to-progress.js +24 -7
  225. package/lib/module/shared/utils/animation/animate-to-progress.js.map +1 -1
  226. package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js +15 -9
  227. package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
  228. package/lib/module/shared/utils/bounds/navigation/reveal/build.js +2 -2
  229. package/lib/module/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
  230. package/lib/module/shared/utils/bounds/navigation/reveal/math.js +2 -1
  231. package/lib/module/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
  232. package/lib/module/shared/utils/bounds/navigation/zoom/build.js +182 -319
  233. package/lib/module/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
  234. package/lib/module/shared/utils/bounds/navigation/zoom/config.js +11 -17
  235. package/lib/module/shared/utils/bounds/navigation/zoom/config.js.map +1 -1
  236. package/lib/module/shared/utils/bounds/navigation/zoom/drag.js +184 -0
  237. package/lib/module/shared/utils/bounds/navigation/zoom/drag.js.map +1 -0
  238. package/lib/module/shared/utils/bounds/navigation/zoom/helpers.js +91 -102
  239. package/lib/module/shared/utils/bounds/navigation/zoom/helpers.js.map +1 -1
  240. package/lib/module/shared/utils/bounds/navigation/zoom/mask.js +67 -0
  241. package/lib/module/shared/utils/bounds/navigation/zoom/mask.js.map +1 -0
  242. package/lib/module/shared/utils/bounds/navigation/zoom/targets.js +50 -0
  243. package/lib/module/shared/utils/bounds/navigation/zoom/targets.js.map +1 -0
  244. package/lib/typescript/shared/adapters/with-screen-transitions/index.d.ts +4 -1
  245. package/lib/typescript/shared/adapters/with-screen-transitions/index.d.ts.map +1 -1
  246. package/lib/typescript/shared/animation/transition-blocking.d.ts +33 -0
  247. package/lib/typescript/shared/animation/transition-blocking.d.ts.map +1 -0
  248. package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts +3 -1
  249. package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts.map +1 -1
  250. package/lib/typescript/shared/components/boundary/create-boundary-component.d.ts.map +1 -1
  251. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts +2 -1
  252. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts.map +1 -1
  253. package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts.map +1 -1
  254. package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts.map +1 -1
  255. package/lib/typescript/shared/components/boundary/hooks/use-register-target.d.ts +10 -0
  256. package/lib/typescript/shared/components/boundary/hooks/use-register-target.d.ts.map +1 -0
  257. package/lib/typescript/shared/components/boundary/index.d.ts +2 -2
  258. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/components/host.d.ts +10 -0
  259. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/components/host.d.ts.map +1 -0
  260. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.d.ts +2 -0
  261. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.d.ts.map +1 -0
  262. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.d.ts +12 -0
  263. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.d.ts.map +1 -0
  264. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/index.d.ts +9 -0
  265. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/index.d.ts.map +1 -0
  266. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/host.d.ts.map +1 -0
  267. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.d.ts.map +1 -0
  268. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.d.ts +13 -0
  269. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.d.ts.map +1 -0
  270. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.d.ts +3 -0
  271. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.d.ts.map +1 -0
  272. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/host-name.d.ts +2 -0
  273. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/host-name.d.ts.map +1 -0
  274. package/lib/typescript/shared/components/boundary/portal/{utils → components/boundary-portal/helpers}/offset-style.d.ts +1 -1
  275. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.d.ts.map +1 -0
  276. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts +12 -0
  277. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts.map +1 -0
  278. package/lib/typescript/shared/components/boundary/portal/{hooks → components/boundary-portal/hooks}/use-host-measurement.d.ts +5 -1
  279. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.d.ts.map +1 -0
  280. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-placeholder-styles.d.ts +12 -0
  281. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-placeholder-styles.d.ts.map +1 -0
  282. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/index.d.ts +12 -0
  283. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/index.d.ts.map +1 -0
  284. package/lib/typescript/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-bounds.store.d.ts +1 -1
  285. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.d.ts.map +1 -0
  286. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/host-registry.store.d.ts.map +1 -0
  287. package/lib/typescript/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/portal-boundary-host.store.d.ts +3 -3
  288. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts.map +1 -0
  289. package/lib/typescript/shared/components/boundary/portal/index.d.ts +1 -2
  290. package/lib/typescript/shared/components/boundary/portal/index.d.ts.map +1 -1
  291. package/lib/typescript/shared/components/boundary/portal/teleport.d.ts +1 -0
  292. package/lib/typescript/shared/components/boundary/portal/teleport.d.ts.map +1 -1
  293. package/lib/typescript/shared/components/boundary/portal/utils/naming.d.ts +0 -2
  294. package/lib/typescript/shared/components/boundary/portal/utils/naming.d.ts.map +1 -1
  295. package/lib/typescript/shared/components/boundary/portal/utils/ownership.d.ts +9 -10
  296. package/lib/typescript/shared/components/boundary/portal/utils/ownership.d.ts.map +1 -1
  297. package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts +22 -21
  298. package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts.map +1 -1
  299. package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts +9 -2
  300. package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts.map +1 -1
  301. package/lib/typescript/shared/components/boundary/utils/measured-bounds.d.ts +8 -0
  302. package/lib/typescript/shared/components/boundary/utils/measured-bounds.d.ts.map +1 -1
  303. package/lib/typescript/shared/constants.d.ts.map +1 -1
  304. package/lib/typescript/shared/index.d.ts +2 -1
  305. package/lib/typescript/shared/index.d.ts.map +1 -1
  306. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts.map +1 -1
  307. package/lib/typescript/shared/providers/screen/gestures/pan/activation/use-pan-activation.d.ts +2 -0
  308. package/lib/typescript/shared/providers/screen/gestures/pan/activation/use-pan-activation.d.ts.map +1 -1
  309. package/lib/typescript/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.d.ts +2 -1
  310. package/lib/typescript/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.d.ts.map +1 -1
  311. package/lib/typescript/shared/providers/screen/gestures/pan/use-build-pan-gesture.d.ts.map +1 -1
  312. package/lib/typescript/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.d.ts +2 -0
  313. package/lib/typescript/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.d.ts.map +1 -1
  314. package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.d.ts +1 -1
  315. package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.d.ts.map +1 -1
  316. package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.d.ts.map +1 -1
  317. package/lib/typescript/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.d.ts.map +1 -1
  318. package/lib/typescript/shared/providers/screen/gestures/shared/snapshot.d.ts.map +1 -1
  319. package/lib/typescript/shared/providers/screen/gestures/shared/values.d.ts.map +1 -1
  320. package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts +5 -0
  321. package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts.map +1 -1
  322. package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts +1 -0
  323. package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts.map +1 -1
  324. package/lib/typescript/shared/providers/screen/styles/stores/slot-references.store.d.ts.map +1 -1
  325. package/lib/typescript/shared/stores/gesture.store.d.ts +4 -0
  326. package/lib/typescript/shared/stores/gesture.store.d.ts.map +1 -1
  327. package/lib/typescript/shared/stores/system.store.d.ts.map +1 -1
  328. package/lib/typescript/shared/types/animation.types.d.ts +3 -3
  329. package/lib/typescript/shared/types/bounds.types.d.ts +122 -90
  330. package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
  331. package/lib/typescript/shared/types/gesture.types.d.ts +10 -0
  332. package/lib/typescript/shared/types/gesture.types.d.ts.map +1 -1
  333. package/lib/typescript/shared/types/index.d.ts +1 -1
  334. package/lib/typescript/shared/types/index.d.ts.map +1 -1
  335. package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts.map +1 -1
  336. package/lib/typescript/shared/utils/bounds/helpers/create-bounds-accessor-core.d.ts.map +1 -1
  337. package/lib/typescript/shared/utils/bounds/navigation/reveal/math.d.ts.map +1 -1
  338. package/lib/typescript/shared/utils/bounds/navigation/zoom/build.d.ts +1 -1
  339. package/lib/typescript/shared/utils/bounds/navigation/zoom/build.d.ts.map +1 -1
  340. package/lib/typescript/shared/utils/bounds/navigation/zoom/config.d.ts +7 -17
  341. package/lib/typescript/shared/utils/bounds/navigation/zoom/config.d.ts.map +1 -1
  342. package/lib/typescript/shared/utils/bounds/navigation/zoom/drag.d.ts +55 -0
  343. package/lib/typescript/shared/utils/bounds/navigation/zoom/drag.d.ts.map +1 -0
  344. package/lib/typescript/shared/utils/bounds/navigation/zoom/helpers.d.ts +31 -34
  345. package/lib/typescript/shared/utils/bounds/navigation/zoom/helpers.d.ts.map +1 -1
  346. package/lib/typescript/shared/utils/bounds/navigation/zoom/mask.d.ts +25 -0
  347. package/lib/typescript/shared/utils/bounds/navigation/zoom/mask.d.ts.map +1 -0
  348. package/lib/typescript/shared/utils/bounds/navigation/zoom/targets.d.ts +16 -0
  349. package/lib/typescript/shared/utils/bounds/navigation/zoom/targets.d.ts.map +1 -0
  350. package/lib/typescript/shared/utils/bounds/navigation/zoom/types.d.ts +1 -1
  351. package/lib/typescript/shared/utils/bounds/navigation/zoom/types.d.ts.map +1 -1
  352. package/lib/typescript/shared/utils/bounds/types/options.d.ts +6 -2
  353. package/lib/typescript/shared/utils/bounds/types/options.d.ts.map +1 -1
  354. package/package.json +1 -1
  355. package/src/shared/adapters/with-screen-transitions/index.tsx +30 -9
  356. package/src/shared/animation/transition-blocking.ts +79 -0
  357. package/src/shared/components/boundary/components/boundary-target.tsx +47 -43
  358. package/src/shared/components/boundary/create-boundary-component.tsx +35 -150
  359. package/src/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.ts +106 -81
  360. package/src/shared/components/boundary/hooks/use-boundary-measurement.ts +1 -0
  361. package/src/shared/components/boundary/hooks/use-measurer.ts +12 -4
  362. package/src/shared/components/boundary/hooks/use-register-target.ts +43 -0
  363. package/src/shared/components/boundary/index.tsx +2 -2
  364. package/src/shared/components/boundary/portal/components/boundary-content-portal/components/host.tsx +52 -0
  365. package/src/shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.ts +9 -0
  366. package/src/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.ts +317 -0
  367. package/src/shared/components/boundary/portal/components/boundary-content-portal/index.tsx +62 -0
  368. package/src/shared/components/boundary/portal/components/{host.tsx → boundary-portal/components/host.tsx} +17 -17
  369. package/src/shared/components/boundary/portal/components/{portal-boundary-host.tsx → boundary-portal/components/portal-boundary-host.tsx} +14 -13
  370. package/src/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.tsx +79 -0
  371. package/src/shared/components/boundary/portal/{utils → components/boundary-portal/helpers}/has-local-slot.ts +1 -1
  372. package/src/shared/components/boundary/portal/components/boundary-portal/helpers/host-name.ts +10 -0
  373. package/src/shared/components/boundary/portal/{utils → components/boundary-portal/helpers}/offset-style.ts +2 -2
  374. package/src/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts +254 -0
  375. package/src/shared/components/boundary/portal/{hooks → components/boundary-portal/hooks}/use-host-measurement.ts +38 -8
  376. package/src/shared/components/boundary/portal/{hooks → components/boundary-portal/hooks}/use-placeholder-styles.ts +4 -15
  377. package/src/shared/components/boundary/portal/components/boundary-portal/index.tsx +35 -0
  378. package/src/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-bounds.store.ts +2 -2
  379. package/src/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/portal-boundary-host.store.ts +10 -15
  380. package/src/shared/components/boundary/portal/index.ts +1 -2
  381. package/src/shared/components/boundary/portal/teleport.ts +3 -2
  382. package/src/shared/components/boundary/portal/utils/naming.ts +0 -19
  383. package/src/shared/components/boundary/portal/utils/ownership.ts +32 -88
  384. package/src/shared/components/boundary/providers/boundary-root.provider.tsx +218 -78
  385. package/src/shared/components/boundary/utils/destination-signals.ts +38 -14
  386. package/src/shared/components/boundary/utils/measured-bounds.ts +48 -0
  387. package/src/shared/components/screen-container/layers/content.tsx +1 -1
  388. package/src/shared/configs/presets.ts +2 -2
  389. package/src/shared/constants.ts +4 -0
  390. package/src/shared/index.ts +6 -0
  391. package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/index.ts +8 -0
  392. package/src/shared/providers/screen/gestures/pan/activation/use-pan-activation.ts +16 -7
  393. package/src/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.ts +18 -1
  394. package/src/shared/providers/screen/gestures/pan/use-build-pan-gesture.ts +1 -0
  395. package/src/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.ts +40 -2
  396. package/src/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.ts +7 -11
  397. package/src/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.ts +12 -15
  398. package/src/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.ts +6 -1
  399. package/src/shared/providers/screen/gestures/shared/snapshot.ts +2 -0
  400. package/src/shared/providers/screen/gestures/shared/values.ts +2 -0
  401. package/src/shared/providers/screen/styles/hooks/use-maybe-block-visibility.tsx +15 -1
  402. package/src/shared/providers/screen/styles/slot.provider.tsx +4 -2
  403. package/src/shared/providers/screen/styles/stores/slot-references.store.ts +2 -1
  404. package/src/shared/stores/gesture.store.ts +12 -0
  405. package/src/shared/stores/system.store.ts +10 -4
  406. package/src/shared/types/animation.types.ts +3 -3
  407. package/src/shared/types/bounds.types.ts +128 -92
  408. package/src/shared/types/gesture.types.ts +10 -0
  409. package/src/shared/types/index.ts +2 -0
  410. package/src/shared/utils/animation/animate-to-progress.ts +23 -7
  411. package/src/shared/utils/bounds/helpers/create-bounds-accessor-core.ts +18 -11
  412. package/src/shared/utils/bounds/navigation/reveal/build.ts +2 -2
  413. package/src/shared/utils/bounds/navigation/reveal/math.ts +2 -1
  414. package/src/shared/utils/bounds/navigation/zoom/build.ts +224 -412
  415. package/src/shared/utils/bounds/navigation/zoom/config.ts +15 -18
  416. package/src/shared/utils/bounds/navigation/zoom/drag.ts +327 -0
  417. package/src/shared/utils/bounds/navigation/zoom/helpers.ts +122 -184
  418. package/src/shared/utils/bounds/navigation/zoom/mask.ts +130 -0
  419. package/src/shared/utils/bounds/navigation/zoom/targets.ts +74 -0
  420. package/src/shared/utils/bounds/navigation/zoom/types.ts +1 -1
  421. package/src/shared/utils/bounds/types/options.ts +9 -2
  422. package/lib/commonjs/shared/components/boundary/portal/components/boundary-local-portal-host.js +0 -58
  423. package/lib/commonjs/shared/components/boundary/portal/components/boundary-local-portal-host.js.map +0 -1
  424. package/lib/commonjs/shared/components/boundary/portal/components/host.js.map +0 -1
  425. package/lib/commonjs/shared/components/boundary/portal/components/portal-boundary-host.js.map +0 -1
  426. package/lib/commonjs/shared/components/boundary/portal/components/portal.js +0 -272
  427. package/lib/commonjs/shared/components/boundary/portal/components/portal.js.map +0 -1
  428. package/lib/commonjs/shared/components/boundary/portal/hooks/use-host-measurement.js.map +0 -1
  429. package/lib/commonjs/shared/components/boundary/portal/hooks/use-placeholder-styles.js.map +0 -1
  430. package/lib/commonjs/shared/components/boundary/portal/stores/host-bounds.store.js.map +0 -1
  431. package/lib/commonjs/shared/components/boundary/portal/stores/host-registry.store.js.map +0 -1
  432. package/lib/commonjs/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map +0 -1
  433. package/lib/commonjs/shared/components/boundary/portal/utils/has-local-slot.js.map +0 -1
  434. package/lib/commonjs/shared/components/boundary/portal/utils/offset-style.js.map +0 -1
  435. package/lib/commonjs/shared/utils/bounds/navigation/zoom/math.js +0 -25
  436. package/lib/commonjs/shared/utils/bounds/navigation/zoom/math.js.map +0 -1
  437. package/lib/module/shared/components/boundary/portal/components/boundary-local-portal-host.js +0 -53
  438. package/lib/module/shared/components/boundary/portal/components/boundary-local-portal-host.js.map +0 -1
  439. package/lib/module/shared/components/boundary/portal/components/host.js.map +0 -1
  440. package/lib/module/shared/components/boundary/portal/components/portal-boundary-host.js.map +0 -1
  441. package/lib/module/shared/components/boundary/portal/components/portal.js +0 -267
  442. package/lib/module/shared/components/boundary/portal/components/portal.js.map +0 -1
  443. package/lib/module/shared/components/boundary/portal/hooks/use-host-measurement.js.map +0 -1
  444. package/lib/module/shared/components/boundary/portal/hooks/use-placeholder-styles.js.map +0 -1
  445. package/lib/module/shared/components/boundary/portal/stores/host-bounds.store.js.map +0 -1
  446. package/lib/module/shared/components/boundary/portal/stores/host-registry.store.js.map +0 -1
  447. package/lib/module/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map +0 -1
  448. package/lib/module/shared/components/boundary/portal/utils/has-local-slot.js.map +0 -1
  449. package/lib/module/shared/components/boundary/portal/utils/offset-style.js.map +0 -1
  450. package/lib/module/shared/utils/bounds/navigation/zoom/math.js +0 -20
  451. package/lib/module/shared/utils/bounds/navigation/zoom/math.js.map +0 -1
  452. package/lib/typescript/shared/components/boundary/portal/components/boundary-local-portal-host.d.ts +0 -8
  453. package/lib/typescript/shared/components/boundary/portal/components/boundary-local-portal-host.d.ts.map +0 -1
  454. package/lib/typescript/shared/components/boundary/portal/components/host.d.ts.map +0 -1
  455. package/lib/typescript/shared/components/boundary/portal/components/portal-boundary-host.d.ts.map +0 -1
  456. package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts +0 -20
  457. package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts.map +0 -1
  458. package/lib/typescript/shared/components/boundary/portal/hooks/use-host-measurement.d.ts.map +0 -1
  459. package/lib/typescript/shared/components/boundary/portal/hooks/use-placeholder-styles.d.ts +0 -17
  460. package/lib/typescript/shared/components/boundary/portal/hooks/use-placeholder-styles.d.ts.map +0 -1
  461. package/lib/typescript/shared/components/boundary/portal/stores/host-bounds.store.d.ts.map +0 -1
  462. package/lib/typescript/shared/components/boundary/portal/stores/host-registry.store.d.ts.map +0 -1
  463. package/lib/typescript/shared/components/boundary/portal/stores/portal-boundary-host.store.d.ts.map +0 -1
  464. package/lib/typescript/shared/components/boundary/portal/utils/has-local-slot.d.ts +0 -3
  465. package/lib/typescript/shared/components/boundary/portal/utils/has-local-slot.d.ts.map +0 -1
  466. package/lib/typescript/shared/components/boundary/portal/utils/offset-style.d.ts.map +0 -1
  467. package/lib/typescript/shared/utils/bounds/navigation/zoom/math.d.ts +0 -8
  468. package/lib/typescript/shared/utils/bounds/navigation/zoom/math.d.ts.map +0 -1
  469. package/src/shared/components/boundary/portal/components/boundary-local-portal-host.tsx +0 -66
  470. package/src/shared/components/boundary/portal/components/portal.tsx +0 -412
  471. package/src/shared/utils/bounds/navigation/zoom/math.ts +0 -25
  472. /package/lib/commonjs/shared/components/boundary/portal/{utils → components/boundary-portal/helpers}/has-local-slot.js +0 -0
  473. /package/lib/commonjs/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-registry.store.js +0 -0
  474. /package/lib/module/shared/components/boundary/portal/{utils → components/boundary-portal/helpers}/has-local-slot.js +0 -0
  475. /package/lib/module/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-registry.store.js +0 -0
  476. /package/lib/typescript/shared/components/boundary/portal/components/{host.d.ts → boundary-portal/components/host.d.ts} +0 -0
  477. /package/lib/typescript/shared/components/boundary/portal/components/{portal-boundary-host.d.ts → boundary-portal/components/portal-boundary-host.d.ts} +0 -0
  478. /package/lib/typescript/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-registry.store.d.ts +0 -0
  479. /package/src/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-registry.store.ts +0 -0
@@ -26,6 +26,29 @@ export type PortalOwnershipSignal =
26
26
  status: "complete";
27
27
  };
28
28
 
29
+ export const isHandoffHostClosingComplete = ({
30
+ closing,
31
+ progressAnimating,
32
+ progressSettled,
33
+ willAnimate,
34
+ }: {
35
+ closing: number;
36
+ progressAnimating: number;
37
+ progressSettled: number;
38
+ willAnimate: number;
39
+ }) => {
40
+ "worklet";
41
+
42
+ // A close request marks `closing` before its animation starts. Springs can
43
+ // also enter their settle-distance threshold before their final frame.
44
+ return (
45
+ !!closing &&
46
+ willAnimate === 0 &&
47
+ progressSettled === 1 &&
48
+ progressAnimating === 0
49
+ );
50
+ };
51
+
29
52
  const hasSeenScreenKey = (screenKeys: ScreenKey[], screenKey: ScreenKey) => {
30
53
  "worklet";
31
54
  for (let index = 0; index < screenKeys.length; index++) {
@@ -36,13 +59,6 @@ const hasSeenScreenKey = (screenKeys: ScreenKey[], screenKey: ScreenKey) => {
36
59
  return false;
37
60
  };
38
61
 
39
- export const usesEscapeClippingHost = (
40
- link: TagLink | null | undefined,
41
- ): boolean => {
42
- "worklet";
43
- return link?.source?.handoff === true && link.source.escapeClipping === true;
44
- };
45
-
46
62
  const isReturningToPreviousSourceHost = ({
47
63
  hostScreenKey,
48
64
  ownerPairKey,
@@ -69,7 +85,7 @@ const isReturningToPreviousSourceHost = ({
69
85
  );
70
86
  };
71
87
 
72
- export const canSwitchBoundaryLocalHandoffImmediately = ({
88
+ export const canSwitchHandoffHostImmediately = ({
73
89
  hostScreenKey,
74
90
  ownerPairKey,
75
91
  previousOwnerPairKey,
@@ -118,7 +134,7 @@ const isActiveHandoffLink = ({
118
134
  return !activeId || activeId === linkKey;
119
135
  };
120
136
 
121
- const resolveBoundaryLocalStyleOwnerScreenKey = ({
137
+ const resolveHandoffStyleOwnerScreenKey = ({
122
138
  hostScreenKey,
123
139
  isSettledHostReady,
124
140
  settledHostScreenKey,
@@ -160,7 +176,6 @@ const clearSignal = (sourcePairKey: ScreenPairKey): PortalOwnershipSignal => {
160
176
  export const resolveBoundaryPortalOwnership = ({
161
177
  boundaryId,
162
178
  currentScreenKey,
163
- escapeClipping,
164
179
  handoff,
165
180
  isSettledHostClosingComplete = false,
166
181
  isSettledHostReady = false,
@@ -170,7 +185,6 @@ export const resolveBoundaryPortalOwnership = ({
170
185
  }: {
171
186
  boundaryId: string;
172
187
  currentScreenKey: ScreenKey;
173
- escapeClipping: boolean;
174
188
  handoff: boolean;
175
189
  isSettledHostClosingComplete?: boolean;
176
190
  isSettledHostReady?: boolean;
@@ -208,7 +222,6 @@ export const resolveBoundaryPortalOwnership = ({
208
222
 
209
223
  let hostScreenKey = link.destination.screenKey;
210
224
  let ownerPairKey = sourcePairKey;
211
- let previousOwnerPairKey: ScreenPairKey | null = null;
212
225
  const seenScreenKeys: ScreenKey[] = [
213
226
  getSourceScreenKeyFromPairKey(sourcePairKey),
214
227
  hostScreenKey,
@@ -254,7 +267,6 @@ export const resolveBoundaryPortalOwnership = ({
254
267
 
255
268
  const nextHostScreenKey = candidate.destination.screenKey;
256
269
 
257
- previousOwnerPairKey = ownerPairKey;
258
270
  ownerPairKey = candidatePairKey;
259
271
  hostScreenKey = nextHostScreenKey;
260
272
 
@@ -283,27 +295,16 @@ export const resolveBoundaryPortalOwnership = ({
283
295
  break;
284
296
  }
285
297
 
286
- const ownerLink = getPairLink(pairsState, ownerPairKey, linkKey);
287
- const ownerUsesEscapeClipping =
288
- ownerLink?.source?.escapeClipping ?? escapeClipping;
289
-
290
- if (
291
- !ownerUsesEscapeClipping &&
292
- isSettledHostClosingComplete &&
293
- settledHostScreenKey === hostScreenKey &&
294
- previousOwnerPairKey
295
- ) {
298
+ if (isSettledHostClosingComplete && settledHostScreenKey === hostScreenKey) {
296
299
  hostScreenKey = getSourceScreenKeyFromPairKey(ownerPairKey);
297
300
  }
298
301
 
299
- const ownerScreenKey = ownerUsesEscapeClipping
300
- ? getSourceScreenKeyFromPairKey(ownerPairKey)
301
- : resolveBoundaryLocalStyleOwnerScreenKey({
302
- hostScreenKey,
303
- isSettledHostReady,
304
- settledHostScreenKey,
305
- sourceScreenKey: getSourceScreenKeyFromPairKey(ownerPairKey),
306
- });
302
+ const ownerScreenKey = resolveHandoffStyleOwnerScreenKey({
303
+ hostScreenKey,
304
+ isSettledHostReady,
305
+ settledHostScreenKey,
306
+ sourceScreenKey: getSourceScreenKeyFromPairKey(ownerPairKey),
307
+ });
307
308
 
308
309
  return {
309
310
  hostScreenKey,
@@ -312,60 +313,3 @@ export const resolveBoundaryPortalOwnership = ({
312
313
  status: "complete",
313
314
  };
314
315
  };
315
-
316
- export const hasHandoffEscapeContinuation = ({
317
- linkKey,
318
- linkState,
319
- sourceScreenKey,
320
- }: {
321
- linkKey: string;
322
- linkState: LinkPairsState;
323
- sourceScreenKey: ScreenKey;
324
- }) => {
325
- "worklet";
326
- const pairKeys = Object.keys(linkState);
327
- const visitedScreenKeys: ScreenKey[] = [];
328
- let cursorScreenKey = sourceScreenKey;
329
-
330
- for (let hop = 0; hop < pairKeys.length; hop++) {
331
- if (hasSeenScreenKey(visitedScreenKeys, cursorScreenKey)) {
332
- return false;
333
- }
334
- visitedScreenKeys.push(cursorScreenKey);
335
-
336
- let previousScreenKey: ScreenKey | null = null;
337
- for (let index = 0; index < pairKeys.length; index++) {
338
- const candidatePairKey = pairKeys[index];
339
- const link = candidatePairKey
340
- ? linkState[candidatePairKey]?.links?.[linkKey]
341
- : null;
342
-
343
- if (
344
- !link?.source ||
345
- !link.destination ||
346
- link.destination.screenKey !== cursorScreenKey
347
- ) {
348
- continue;
349
- }
350
-
351
- if (usesEscapeClippingHost(link)) {
352
- return true;
353
- }
354
-
355
- if (!link.source.handoff) {
356
- return false;
357
- }
358
-
359
- previousScreenKey = link.source.screenKey;
360
- break;
361
- }
362
-
363
- if (!previousScreenKey) {
364
- return false;
365
- }
366
-
367
- cursorScreenKey = previousScreenKey;
368
- }
369
-
370
- return false;
371
- };
@@ -1,13 +1,36 @@
1
- import { type ReactNode, useCallback, useMemo, useState } from "react";
1
+ import {
2
+ type ForwardedRef,
3
+ type ReactNode,
4
+ useCallback,
5
+ useImperativeHandle,
6
+ useMemo,
7
+ useRef,
8
+ useState,
9
+ } from "react";
2
10
  import type { View } from "react-native";
3
11
  import type { AnimatedRef, StyleProps } from "react-native-reanimated";
4
12
  import { useAnimatedRef } from "react-native-reanimated";
13
+ import { useDescriptorsStore } from "../../../providers/screen/descriptors";
14
+ import {
15
+ useComposedSlotStyles,
16
+ useSlotStackingStyles,
17
+ } from "../../../providers/screen/styles";
18
+ import { createBoundTag } from "../../../stores/bounds/helpers/link-pairs.helpers";
5
19
  import type { BoundTag } from "../../../stores/bounds/types";
6
20
  import createProvider from "../../../utils/create-provider";
7
21
  import { logger } from "../../../utils/logger";
8
- import type { BoundaryPortalRuntime } from "../portal/utils/resolve-portal";
22
+ import { useBoundaryMeasurement } from "../hooks/use-boundary-measurement";
23
+ import {
24
+ type BoundaryPortalRuntime,
25
+ resolveBoundaryPortal,
26
+ } from "../portal/utils/resolve-portal";
27
+ import type {
28
+ BoundaryConfigProps,
29
+ BoundaryId,
30
+ BoundaryOwnProps,
31
+ } from "../types";
9
32
 
10
- interface BoundaryRootContextValue {
33
+ interface BoundaryRootContextValue extends BoundaryRootRenderState {
11
34
  registerTargetRef: (
12
35
  targetRef: AnimatedRef<View>,
13
36
  preparedStyles: StyleProps,
@@ -33,83 +56,200 @@ const MULTIPLE_TARGETS_WARNING =
33
56
  export const TARGET_OUTSIDE_ROOT_WARNING =
34
57
  "Boundary.Target must be rendered inside Transition.Boundary or a component created by createBoundaryComponent.";
35
58
 
36
- interface BoundaryRootProps {
37
- value: BoundaryRootContextValue;
38
- children: ReactNode;
39
- }
40
-
41
- export const { BoundaryRootProvider, useBoundaryRootContext } = createProvider(
42
- "BoundaryRoot",
43
- { guarded: false },
44
- )<BoundaryRootProps, BoundaryRootContextValue>((props) => props);
45
-
46
- export const useBoundaryRootState = (params: {
59
+ export type BoundaryRootRenderState = {
60
+ attachedStyle: unknown;
47
61
  boundTag: BoundTag;
62
+ currentScreenKey: string;
63
+ handoffEnabled: boolean;
48
64
  portalRuntime: BoundaryPortalRuntime;
49
- rootMeasurementRef?: AnimatedRef<View>;
50
- }) => {
51
- const { boundTag, portalRuntime, rootMeasurementRef } = params;
52
- const rootRef = useAnimatedRef<View>();
53
- const [targetEntry, setTargetEntry] = useState<BoundaryTargetEntry | null>(
54
- null,
55
- );
56
-
57
- const registerTargetRef = useCallback(
58
- (
59
- targetRef: AnimatedRef<View>,
60
- preparedStyles: StyleProps,
61
- measurementRef?: AnimatedRef<View>,
62
- ) => {
63
- setTargetEntry((prev) => {
64
- if (prev?.ref === targetRef) {
65
- return prev;
66
- }
67
-
68
- if (__DEV__ && prev !== null) {
69
- logger.warnOnce(
70
- "boundary:multiple-targets",
71
- MULTIPLE_TARGETS_WARNING,
72
- );
73
- }
65
+ ref: AnimatedRef<View>;
66
+ rootEscapePlaceholderRef: AnimatedRef<View>;
67
+ shouldRenderBoundaryRootThroughPortal: boolean;
68
+ shouldRenderHandoffHost: boolean;
69
+ };
70
+
71
+ type BoundaryRootProviderProps = Pick<
72
+ BoundaryOwnProps,
73
+ "enabled" | "escapeClipping" | "group" | "handoff"
74
+ > & {
75
+ children: (state: BoundaryRootRenderState) => ReactNode;
76
+ config: BoundaryConfigProps;
77
+ forwardedRef?: ForwardedRef<any>;
78
+ id: BoundaryId;
79
+ style?: unknown;
80
+ };
81
+
82
+ export const {
83
+ BoundaryRootProvider,
84
+ useBoundaryRootContext,
85
+ useBoundaryRootStore,
86
+ } = createProvider("BoundaryRoot", { guarded: false })<
87
+ BoundaryRootProviderProps,
88
+ BoundaryRootContextValue
89
+ >(
90
+ ({
91
+ children,
92
+ config,
93
+ enabled = true,
94
+ escapeClipping,
95
+ forwardedRef,
96
+ group,
97
+ handoff,
98
+ id,
99
+ style,
100
+ }) => {
101
+ const requestedBoundTag = useMemo(
102
+ () => createBoundTag(String(id), group),
103
+ [id, group],
104
+ );
105
+ const portalRuntime = resolveBoundaryPortal({
106
+ handoff,
107
+ escapeClipping,
108
+ });
109
+
110
+ const currentScreenKey = useDescriptorsStore(
111
+ (s) => s.derivations.currentScreenKey,
112
+ );
113
+ const currentActivity = useDescriptorsStore(
114
+ (s) => s.descriptors.current.activity,
115
+ );
116
+ const retainedBoundTagRef = useRef(requestedBoundTag);
117
+ const shouldRetainClosingBoundTag =
118
+ portalRuntime.handoff && currentActivity === "closing";
119
+
120
+ // Navigation can update a retained closing route's params before that
121
+ // route leaves the stack. Keep its handoff identity stable so the payload
122
+ // remains attached to the closing destination instead of being orphaned.
123
+ if (!shouldRetainClosingBoundTag) {
124
+ retainedBoundTagRef.current = requestedBoundTag;
125
+ }
126
+
127
+ const boundTag = retainedBoundTagRef.current;
128
+ const hasConfiguredInterpolator = useDescriptorsStore(
129
+ (s) => s.derivations.hasConfiguredInterpolator,
130
+ );
131
+ const runtimeEnabled = enabled && hasConfiguredInterpolator;
132
+ // Associated slot styles attach whenever the boundary is enabled,
133
+ // independent of whether an interpolator is configured for this transition.
134
+ const shouldAttachAssociatedStyles = enabled;
135
+ const shouldEscapeBoundaryRootToScreenHost = portalRuntime.escapeClipping;
136
+
137
+ const associatedStyles = useComposedSlotStyles(boundTag.tag, style);
138
+ const associatedStackingStyles = useSlotStackingStyles(boundTag.tag);
139
+ const rootRef = useAnimatedRef<View>();
140
+ const rootEscapePlaceholderRef = useAnimatedRef<View>();
141
+ const [targetEntry, setTargetEntry] = useState<BoundaryTargetEntry | null>(
142
+ null,
143
+ );
74
144
 
75
- return (
76
- prev ?? {
77
- ref: targetRef,
78
- measurementRef: measurementRef ?? targetRef,
79
- preparedStyles,
145
+ const registerTargetRef = useCallback(
146
+ (
147
+ targetRef: AnimatedRef<View>,
148
+ preparedStyles: StyleProps,
149
+ measurementRef?: AnimatedRef<View>,
150
+ ) => {
151
+ setTargetEntry((prev) => {
152
+ if (prev?.ref === targetRef) {
153
+ return prev;
80
154
  }
81
- );
82
- });
83
- },
84
- [],
85
- );
86
-
87
- const unregisterTargetRef = useCallback((targetRef: AnimatedRef<View>) => {
88
- setTargetEntry((prev) => (prev?.ref === targetRef ? null : prev));
89
- }, []);
90
-
91
- const contextValue = useMemo(
92
- () => ({
93
- registerTargetRef,
94
- unregisterTargetRef,
95
- activeTargetRef: targetEntry?.ref ?? null,
96
- boundTag,
97
- portalRuntime,
98
- }),
99
- [
100
- registerTargetRef,
101
- unregisterTargetRef,
102
- targetEntry,
155
+
156
+ if (__DEV__ && prev !== null) {
157
+ logger.warnOnce(
158
+ "boundary:multiple-targets",
159
+ MULTIPLE_TARGETS_WARNING,
160
+ );
161
+ }
162
+
163
+ return (
164
+ prev ?? {
165
+ ref: targetRef,
166
+ measurementRef: measurementRef ?? targetRef,
167
+ preparedStyles,
168
+ }
169
+ );
170
+ });
171
+ },
172
+ [],
173
+ );
174
+
175
+ const unregisterTargetRef = useCallback((targetRef: AnimatedRef<View>) => {
176
+ setTargetEntry((prev) => (prev?.ref === targetRef ? null : prev));
177
+ }, []);
178
+
179
+ const rootMeasurementRef = shouldEscapeBoundaryRootToScreenHost
180
+ ? rootEscapePlaceholderRef
181
+ : rootRef;
182
+ const measuredRef = targetEntry?.measurementRef ?? rootMeasurementRef;
183
+ const hasActiveTarget = targetEntry !== null;
184
+ const targetPreparedStyles = targetEntry?.preparedStyles;
185
+
186
+ useImperativeHandle(forwardedRef, () => rootRef.current as any, [rootRef]);
187
+
188
+ useBoundaryMeasurement({
103
189
  boundTag,
104
- portalRuntime,
105
- ],
106
- );
107
-
108
- return {
109
- ref: rootRef,
110
- contextValue,
111
- hasActiveTarget: targetEntry !== null,
112
- measuredRef: targetEntry?.measurementRef ?? rootMeasurementRef ?? rootRef,
113
- targetPreparedStyles: targetEntry?.preparedStyles,
114
- };
115
- };
190
+ enabled,
191
+ runtimeEnabled,
192
+ currentScreenKey,
193
+ measuredRef,
194
+ style,
195
+ targetPreparedStyles,
196
+ handoff: portalRuntime.handoff,
197
+ escapeClipping: portalRuntime.escapeClipping,
198
+ config,
199
+ });
200
+
201
+ const shouldRenderBoundaryRootThroughPortal =
202
+ shouldEscapeBoundaryRootToScreenHost && !hasActiveTarget;
203
+ const handoffEnabled = enabled && portalRuntime.handoff;
204
+ // A nested active target takes the full associated style, so the root keeps
205
+ // only its stacking context. Root-owned escape-clipping moves the root
206
+ // through a screen host, so its associated style is applied through the
207
+ // host instead of inline on the escaped element.
208
+ // Host-only handoff receivers still need the associated style: their
209
+ // handoff host is absolute-filled inside this root, so the root is the
210
+ // visual frame that animates the received payload.
211
+ const attachedStyle = shouldAttachAssociatedStyles
212
+ ? hasActiveTarget
213
+ ? associatedStackingStyles
214
+ : shouldRenderBoundaryRootThroughPortal
215
+ ? undefined
216
+ : associatedStyles
217
+ : undefined;
218
+
219
+ const value = useMemo<BoundaryRootContextValue>(
220
+ () => ({
221
+ attachedStyle,
222
+ activeTargetRef: targetEntry?.ref ?? null,
223
+ boundTag,
224
+ currentScreenKey,
225
+ handoffEnabled,
226
+ portalRuntime,
227
+ registerTargetRef,
228
+ ref: rootRef,
229
+ rootEscapePlaceholderRef,
230
+ shouldRenderBoundaryRootThroughPortal,
231
+ shouldRenderHandoffHost: handoffEnabled && !hasActiveTarget,
232
+ unregisterTargetRef,
233
+ }),
234
+ [
235
+ attachedStyle,
236
+ boundTag,
237
+ currentScreenKey,
238
+ handoffEnabled,
239
+ hasActiveTarget,
240
+ portalRuntime,
241
+ registerTargetRef,
242
+ rootRef,
243
+ rootEscapePlaceholderRef,
244
+ shouldRenderBoundaryRootThroughPortal,
245
+ targetEntry,
246
+ unregisterTargetRef,
247
+ ],
248
+ );
249
+
250
+ return {
251
+ value,
252
+ children: children(value),
253
+ };
254
+ },
255
+ );
@@ -7,14 +7,27 @@ import type {
7
7
  ScreenPairKey,
8
8
  } from "../../../stores/bounds/types";
9
9
 
10
- export const getInitialDestinationMeasurePairKey = (params: {
10
+ export type InitialDestinationMeasurementAction =
11
+ | "wait"
12
+ | "release"
13
+ | "measure"
14
+ | "complete";
15
+
16
+ export type InitialDestinationMeasurementSignal = {
17
+ pairKey: ScreenPairKey;
18
+ action: InitialDestinationMeasurementAction;
19
+ };
20
+
21
+ export const getInitialDestinationMeasurementSignal = (params: {
11
22
  enabled: boolean;
12
23
  destinationPairKey?: ScreenPairKey;
13
24
  ancestorDestinationPairKey?: ScreenPairKey;
14
25
  linkId: string;
15
26
  group?: string;
27
+ destinationPresent: boolean;
28
+ sourcePresent: boolean;
16
29
  linkState?: LinkPairsState;
17
- }): ScreenPairKey | null => {
30
+ }): InitialDestinationMeasurementSignal | null => {
18
31
  "worklet";
19
32
  const {
20
33
  enabled,
@@ -22,30 +35,41 @@ export const getInitialDestinationMeasurePairKey = (params: {
22
35
  ancestorDestinationPairKey,
23
36
  linkId,
24
37
  group,
38
+ destinationPresent,
39
+ sourcePresent,
25
40
  linkState,
26
41
  } = params;
27
- const measurePairKey = destinationPairKey ?? ancestorDestinationPairKey;
42
+ const pairKey = destinationPairKey ?? ancestorDestinationPairKey;
28
43
 
29
- if (!enabled || !measurePairKey) {
44
+ if (!enabled || !pairKey) {
30
45
  return null;
31
46
  }
32
47
 
33
- const linkKey = getLinkKeyFromTag(linkId);
34
- const hasDestination =
35
- linkState?.[measurePairKey]?.links?.[linkKey]?.destination;
48
+ if (!destinationPresent) {
49
+ return { pairKey, action: "wait" };
50
+ }
36
51
 
37
- if (hasDestination) {
38
- return null;
52
+ if (!sourcePresent) {
53
+ return { pairKey, action: "release" };
39
54
  }
40
55
 
56
+ const linkKey = getLinkKeyFromTag(linkId);
41
57
  const activeGroupId =
42
- group && linkState
43
- ? getActiveGroupId(linkState, measurePairKey, group)
44
- : null;
58
+ group && linkState ? getActiveGroupId(linkState, pairKey, group) : null;
45
59
 
46
60
  if (activeGroupId && activeGroupId !== linkKey) {
47
- return null;
61
+ return { pairKey, action: "release" };
62
+ }
63
+
64
+ const link = linkState?.[pairKey]?.links?.[linkKey];
65
+
66
+ if (!link?.destination) {
67
+ return { pairKey, action: "measure" };
68
+ }
69
+
70
+ if (!link.source) {
71
+ return { pairKey, action: "wait" };
48
72
  }
49
73
 
50
- return measurePairKey;
74
+ return { pairKey, action: "complete" };
51
75
  };
@@ -96,6 +96,54 @@ export const isMeasurementInViewport = (
96
96
  );
97
97
  };
98
98
 
99
+ export const normalizeMeasuredBoundsWithVisibilityGate = ({
100
+ measured,
101
+ origin,
102
+ visibilityBlocked,
103
+ visibilityBlockOffset,
104
+ viewportWidth,
105
+ viewportHeight,
106
+ }: {
107
+ measured: MeasuredDimensions;
108
+ origin: MeasuredDimensions;
109
+ visibilityBlocked: boolean;
110
+ visibilityBlockOffset: number;
111
+ viewportWidth: number;
112
+ viewportHeight: number;
113
+ }): MeasuredDimensions => {
114
+ "worklet";
115
+ const normalized = normalizeMeasuredBoundsToOrigin(measured, origin);
116
+
117
+ if (
118
+ !visibilityBlocked ||
119
+ visibilityBlockOffset <= 0 ||
120
+ isMeasurementInViewport(normalized, viewportWidth, viewportHeight)
121
+ ) {
122
+ return normalized;
123
+ }
124
+
125
+ // Fabric can expose the visibility transform to one native measurement one
126
+ // frame before the other. Prefer normal origin-relative coordinates, then
127
+ // test either side of that known frame skew while the gate is active.
128
+ const measuredAhead = {
129
+ ...normalized,
130
+ pageY: normalized.pageY - visibilityBlockOffset,
131
+ };
132
+ if (isMeasurementInViewport(measuredAhead, viewportWidth, viewportHeight)) {
133
+ return measuredAhead;
134
+ }
135
+
136
+ const originAhead = {
137
+ ...normalized,
138
+ pageY: normalized.pageY + visibilityBlockOffset,
139
+ };
140
+ if (isMeasurementInViewport(originAhead, viewportWidth, viewportHeight)) {
141
+ return originAhead;
142
+ }
143
+
144
+ return normalized;
145
+ };
146
+
99
147
  export const measureWithOverscrollAwareness = (
100
148
  ref: AnimatedRef<View>,
101
149
  scrollState: ScrollGestureState | null,
@@ -8,7 +8,7 @@ import { useGestureContext } from "../../../providers/screen/gestures";
8
8
  import { OriginProvider } from "../../../providers/screen/origin.provider";
9
9
  import { useSlotProps, useSlotStyles } from "../../../providers/screen/styles";
10
10
  import type { ScreenContentComponentProps } from "../../../types";
11
- import { ScreenFallbackHost } from "../../boundary/portal/components/host";
11
+ import { ScreenFallbackHost } from "../../boundary/portal/components/boundary-portal/components/host";
12
12
  import { useContentLayout } from "../hooks/use-content-layout";
13
13
  import { MaybeMaskedNavigationContainer } from "./maybe-masked-navigation-container";
14
14
  import { usesLayerRenderProps } from "./render-component";
@@ -434,7 +434,7 @@ export const SharedAppleMusic = ({
434
434
  const dragXScale = interpolate(normX, [0, 1], xScaleOuput);
435
435
  const dragYScale = interpolate(normY, [0, 1], yScaleOuput);
436
436
 
437
- const boundValues = bounds({ id: sharedBoundTag }).math({
437
+ const boundValues = bounds({ id: sharedBoundTag }).values({
438
438
  method: focused ? "content" : "transform",
439
439
  anchor: "top",
440
440
  scaleMode: "uniform",
@@ -453,7 +453,7 @@ export const SharedAppleMusic = ({
453
453
  * ===============================
454
454
  */
455
455
  if (focused) {
456
- const maskedValues = bounds({ id: sharedBoundTag }).math({
456
+ const maskedValues = bounds({ id: sharedBoundTag }).values({
457
457
  space: "absolute",
458
458
  method: "size",
459
459
  target: "fullscreen",
@@ -53,12 +53,16 @@ const DEFAULT_GESTURE_VALUES = {
53
53
  velocity: 0,
54
54
  focalX: 0,
55
55
  focalY: 0,
56
+ pinchOriginX: 0,
57
+ pinchOriginY: 0,
56
58
  raw: DEFAULT_RAW_GESTURE_VALUES,
57
59
  handoff: {
58
60
  ...DEFAULT_RAW_GESTURE_VALUES,
59
61
  velocity: 0,
60
62
  focalX: 0,
61
63
  focalY: 0,
64
+ pinchOriginX: 0,
65
+ pinchOriginY: 0,
62
66
  raw: DEFAULT_RAW_GESTURE_VALUES,
63
67
  active: null,
64
68
  direction: null,