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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (350) hide show
  1. package/lib/commonjs/shared/adapters/with-screen-transitions/index.js +20 -4
  2. package/lib/commonjs/shared/adapters/with-screen-transitions/index.js.map +1 -1
  3. package/lib/commonjs/shared/animation/transition-blocking.js +71 -0
  4. package/lib/commonjs/shared/animation/transition-blocking.js.map +1 -0
  5. package/lib/commonjs/shared/components/boundary/components/boundary-target.js +30 -30
  6. package/lib/commonjs/shared/components/boundary/components/boundary-target.js.map +1 -1
  7. package/lib/commonjs/shared/components/boundary/create-boundary-component.js +30 -95
  8. package/lib/commonjs/shared/components/boundary/create-boundary-component.js.map +1 -1
  9. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +68 -51
  10. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -1
  11. package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js +1 -0
  12. package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
  13. package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js +14 -2
  14. package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js.map +1 -1
  15. package/lib/commonjs/shared/components/boundary/hooks/use-register-target.js +32 -0
  16. package/lib/commonjs/shared/components/boundary/hooks/use-register-target.js.map +1 -0
  17. package/lib/commonjs/shared/components/boundary/index.js +1 -1
  18. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/components/host.js +40 -0
  19. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/components/host.js.map +1 -0
  20. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.js +14 -0
  21. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.js.map +1 -0
  22. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +194 -0
  23. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -0
  24. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/index.js +44 -0
  25. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/index.js.map +1 -0
  26. package/lib/commonjs/shared/components/boundary/portal/components/{host.js → boundary-portal/components/host.js} +17 -16
  27. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/host.js.map +1 -0
  28. package/lib/commonjs/shared/components/boundary/portal/components/{portal-boundary-host.js → boundary-portal/components/portal-boundary-host.js} +11 -11
  29. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -0
  30. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js +52 -0
  31. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js.map +1 -0
  32. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.js.map +1 -0
  33. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/host-name.js +14 -0
  34. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/host-name.js.map +1 -0
  35. package/lib/commonjs/shared/components/boundary/portal/{utils → components/boundary-portal/helpers}/offset-style.js +1 -1
  36. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.js.map +1 -0
  37. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +184 -0
  38. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -0
  39. package/lib/commonjs/shared/components/boundary/portal/{hooks → components/boundary-portal/hooks}/use-host-measurement.js +23 -5
  40. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js.map +1 -0
  41. package/lib/commonjs/shared/components/boundary/portal/{hooks → components/boundary-portal/hooks}/use-placeholder-styles.js +3 -6
  42. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-placeholder-styles.js.map +1 -0
  43. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/index.js +33 -0
  44. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/index.js.map +1 -0
  45. package/lib/commonjs/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-bounds.store.js +1 -1
  46. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.js.map +1 -0
  47. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/host-registry.store.js.map +1 -0
  48. package/lib/commonjs/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/portal-boundary-host.store.js +7 -12
  49. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -0
  50. package/lib/commonjs/shared/components/boundary/portal/index.js +1 -8
  51. package/lib/commonjs/shared/components/boundary/portal/index.js.map +1 -1
  52. package/lib/commonjs/shared/components/boundary/portal/teleport.js +2 -2
  53. package/lib/commonjs/shared/components/boundary/portal/utils/naming.js +1 -15
  54. package/lib/commonjs/shared/components/boundary/portal/utils/naming.js.map +1 -1
  55. package/lib/commonjs/shared/components/boundary/portal/utils/ownership.js +19 -56
  56. package/lib/commonjs/shared/components/boundary/portal/utils/ownership.js.map +1 -1
  57. package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js +77 -23
  58. package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
  59. package/lib/commonjs/shared/components/boundary/utils/destination-signals.js +41 -12
  60. package/lib/commonjs/shared/components/boundary/utils/destination-signals.js.map +1 -1
  61. package/lib/commonjs/shared/components/boundary/utils/measured-bounds.js +36 -1
  62. package/lib/commonjs/shared/components/boundary/utils/measured-bounds.js.map +1 -1
  63. package/lib/commonjs/shared/components/screen-container/layers/content.js +1 -1
  64. package/lib/commonjs/shared/configs/presets.js +2 -2
  65. package/lib/commonjs/shared/configs/presets.js.map +1 -1
  66. package/lib/commonjs/shared/index.js +13 -0
  67. package/lib/commonjs/shared/index.js.map +1 -1
  68. package/lib/commonjs/shared/providers/screen/animation/helpers/read-screen-animation-revisions.js +6 -1
  69. package/lib/commonjs/shared/providers/screen/animation/helpers/read-screen-animation-revisions.js.map +1 -1
  70. package/lib/commonjs/shared/providers/screen/styles/helpers/collect-interpolator-shared-values.js +50 -0
  71. package/lib/commonjs/shared/providers/screen/styles/helpers/collect-interpolator-shared-values.js.map +1 -0
  72. package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +7 -1
  73. package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
  74. package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +2 -1
  75. package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
  76. package/lib/commonjs/shared/providers/screen/styles/slot.provider.js +5 -3
  77. package/lib/commonjs/shared/providers/screen/styles/slot.provider.js.map +1 -1
  78. package/lib/commonjs/shared/providers/screen/styles/stores/slot-references.store.js +1 -1
  79. package/lib/commonjs/shared/providers/screen/styles/stores/slot-references.store.js.map +1 -1
  80. package/lib/commonjs/shared/stores/system.store.js +10 -2
  81. package/lib/commonjs/shared/stores/system.store.js.map +1 -1
  82. package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js +15 -9
  83. package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
  84. package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js +2 -2
  85. package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
  86. package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js +3 -3
  87. package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
  88. package/lib/module/shared/adapters/with-screen-transitions/index.js +19 -5
  89. package/lib/module/shared/adapters/with-screen-transitions/index.js.map +1 -1
  90. package/lib/module/shared/animation/transition-blocking.js +66 -0
  91. package/lib/module/shared/animation/transition-blocking.js.map +1 -0
  92. package/lib/module/shared/components/boundary/components/boundary-target.js +32 -32
  93. package/lib/module/shared/components/boundary/components/boundary-target.js.map +1 -1
  94. package/lib/module/shared/components/boundary/create-boundary-component.js +32 -97
  95. package/lib/module/shared/components/boundary/create-boundary-component.js.map +1 -1
  96. package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +72 -55
  97. package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -1
  98. package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js +1 -0
  99. package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
  100. package/lib/module/shared/components/boundary/hooks/use-measurer.js +15 -3
  101. package/lib/module/shared/components/boundary/hooks/use-measurer.js.map +1 -1
  102. package/lib/module/shared/components/boundary/hooks/use-register-target.js +27 -0
  103. package/lib/module/shared/components/boundary/hooks/use-register-target.js.map +1 -0
  104. package/lib/module/shared/components/boundary/index.js +1 -1
  105. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/components/host.js +35 -0
  106. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/components/host.js.map +1 -0
  107. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.js +9 -0
  108. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.js.map +1 -0
  109. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +189 -0
  110. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -0
  111. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/index.js +33 -0
  112. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/index.js.map +1 -0
  113. package/lib/module/shared/components/boundary/portal/components/{host.js → boundary-portal/components/host.js} +17 -16
  114. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/host.js.map +1 -0
  115. package/lib/module/shared/components/boundary/portal/components/{portal-boundary-host.js → boundary-portal/components/portal-boundary-host.js} +11 -11
  116. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -0
  117. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js +47 -0
  118. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js.map +1 -0
  119. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.js.map +1 -0
  120. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/host-name.js +9 -0
  121. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/host-name.js.map +1 -0
  122. package/lib/module/shared/components/boundary/portal/{utils → components/boundary-portal/helpers}/offset-style.js +1 -1
  123. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.js.map +1 -0
  124. package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +179 -0
  125. package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -0
  126. package/lib/module/shared/components/boundary/portal/{hooks → components/boundary-portal/hooks}/use-host-measurement.js +23 -5
  127. package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js.map +1 -0
  128. package/lib/module/shared/components/boundary/portal/{hooks → components/boundary-portal/hooks}/use-placeholder-styles.js +3 -6
  129. package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-placeholder-styles.js.map +1 -0
  130. package/lib/module/shared/components/boundary/portal/components/boundary-portal/index.js +29 -0
  131. package/lib/module/shared/components/boundary/portal/components/boundary-portal/index.js.map +1 -0
  132. package/lib/module/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-bounds.store.js +1 -1
  133. package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.js.map +1 -0
  134. package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/host-registry.store.js.map +1 -0
  135. package/lib/module/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/portal-boundary-host.store.js +5 -10
  136. package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -0
  137. package/lib/module/shared/components/boundary/portal/index.js +1 -2
  138. package/lib/module/shared/components/boundary/portal/index.js.map +1 -1
  139. package/lib/module/shared/components/boundary/portal/teleport.js +2 -2
  140. package/lib/module/shared/components/boundary/portal/utils/naming.js +0 -12
  141. package/lib/module/shared/components/boundary/portal/utils/naming.js.map +1 -1
  142. package/lib/module/shared/components/boundary/portal/utils/ownership.js +16 -52
  143. package/lib/module/shared/components/boundary/portal/utils/ownership.js.map +1 -1
  144. package/lib/module/shared/components/boundary/providers/boundary-root.provider.js +74 -20
  145. package/lib/module/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
  146. package/lib/module/shared/components/boundary/utils/destination-signals.js +39 -10
  147. package/lib/module/shared/components/boundary/utils/destination-signals.js.map +1 -1
  148. package/lib/module/shared/components/boundary/utils/measured-bounds.js +34 -0
  149. package/lib/module/shared/components/boundary/utils/measured-bounds.js.map +1 -1
  150. package/lib/module/shared/components/screen-container/layers/content.js +1 -1
  151. package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
  152. package/lib/module/shared/configs/presets.js +2 -2
  153. package/lib/module/shared/configs/presets.js.map +1 -1
  154. package/lib/module/shared/index.js +1 -0
  155. package/lib/module/shared/index.js.map +1 -1
  156. package/lib/module/shared/providers/screen/animation/helpers/read-screen-animation-revisions.js +6 -1
  157. package/lib/module/shared/providers/screen/animation/helpers/read-screen-animation-revisions.js.map +1 -1
  158. package/lib/module/shared/providers/screen/styles/helpers/collect-interpolator-shared-values.js +45 -0
  159. package/lib/module/shared/providers/screen/styles/helpers/collect-interpolator-shared-values.js.map +1 -0
  160. package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +7 -1
  161. package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
  162. package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +2 -1
  163. package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
  164. package/lib/module/shared/providers/screen/styles/slot.provider.js +5 -3
  165. package/lib/module/shared/providers/screen/styles/slot.provider.js.map +1 -1
  166. package/lib/module/shared/providers/screen/styles/stores/slot-references.store.js +1 -1
  167. package/lib/module/shared/providers/screen/styles/stores/slot-references.store.js.map +1 -1
  168. package/lib/module/shared/stores/system.store.js +10 -2
  169. package/lib/module/shared/stores/system.store.js.map +1 -1
  170. package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js +15 -9
  171. package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
  172. package/lib/module/shared/utils/bounds/navigation/reveal/build.js +2 -2
  173. package/lib/module/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
  174. package/lib/module/shared/utils/bounds/navigation/zoom/build.js +3 -3
  175. package/lib/module/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
  176. package/lib/typescript/shared/adapters/with-screen-transitions/index.d.ts +4 -1
  177. package/lib/typescript/shared/adapters/with-screen-transitions/index.d.ts.map +1 -1
  178. package/lib/typescript/shared/animation/transition-blocking.d.ts +33 -0
  179. package/lib/typescript/shared/animation/transition-blocking.d.ts.map +1 -0
  180. package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts.map +1 -1
  181. package/lib/typescript/shared/components/boundary/create-boundary-component.d.ts.map +1 -1
  182. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts +2 -1
  183. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts.map +1 -1
  184. package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts.map +1 -1
  185. package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts.map +1 -1
  186. package/lib/typescript/shared/components/boundary/hooks/use-register-target.d.ts +10 -0
  187. package/lib/typescript/shared/components/boundary/hooks/use-register-target.d.ts.map +1 -0
  188. package/lib/typescript/shared/components/boundary/index.d.ts +2 -2
  189. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/components/host.d.ts +10 -0
  190. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/components/host.d.ts.map +1 -0
  191. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.d.ts +2 -0
  192. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.d.ts.map +1 -0
  193. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.d.ts +12 -0
  194. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.d.ts.map +1 -0
  195. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/index.d.ts +11 -0
  196. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/index.d.ts.map +1 -0
  197. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/host.d.ts.map +1 -0
  198. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.d.ts.map +1 -0
  199. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.d.ts +14 -0
  200. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.d.ts.map +1 -0
  201. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.d.ts +3 -0
  202. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.d.ts.map +1 -0
  203. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/host-name.d.ts +2 -0
  204. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/host-name.d.ts.map +1 -0
  205. package/lib/typescript/shared/components/boundary/portal/{utils → components/boundary-portal/helpers}/offset-style.d.ts +1 -1
  206. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.d.ts.map +1 -0
  207. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts +12 -0
  208. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts.map +1 -0
  209. package/lib/typescript/shared/components/boundary/portal/{hooks → components/boundary-portal/hooks}/use-host-measurement.d.ts +5 -1
  210. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.d.ts.map +1 -0
  211. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-placeholder-styles.d.ts +12 -0
  212. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-placeholder-styles.d.ts.map +1 -0
  213. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/index.d.ts +13 -0
  214. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/index.d.ts.map +1 -0
  215. package/lib/typescript/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-bounds.store.d.ts +1 -1
  216. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.d.ts.map +1 -0
  217. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/host-registry.store.d.ts.map +1 -0
  218. package/lib/typescript/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/portal-boundary-host.store.d.ts +3 -3
  219. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts.map +1 -0
  220. package/lib/typescript/shared/components/boundary/portal/index.d.ts +1 -2
  221. package/lib/typescript/shared/components/boundary/portal/index.d.ts.map +1 -1
  222. package/lib/typescript/shared/components/boundary/portal/utils/naming.d.ts +0 -2
  223. package/lib/typescript/shared/components/boundary/portal/utils/naming.d.ts.map +1 -1
  224. package/lib/typescript/shared/components/boundary/portal/utils/ownership.d.ts +9 -10
  225. package/lib/typescript/shared/components/boundary/portal/utils/ownership.d.ts.map +1 -1
  226. package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts +21 -21
  227. package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts.map +1 -1
  228. package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts +9 -2
  229. package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts.map +1 -1
  230. package/lib/typescript/shared/components/boundary/utils/measured-bounds.d.ts +8 -0
  231. package/lib/typescript/shared/components/boundary/utils/measured-bounds.d.ts.map +1 -1
  232. package/lib/typescript/shared/index.d.ts +1 -0
  233. package/lib/typescript/shared/index.d.ts.map +1 -1
  234. package/lib/typescript/shared/providers/screen/animation/helpers/read-screen-animation-revisions.d.ts +4 -1
  235. package/lib/typescript/shared/providers/screen/animation/helpers/read-screen-animation-revisions.d.ts.map +1 -1
  236. package/lib/typescript/shared/providers/screen/styles/helpers/collect-interpolator-shared-values.d.ts +4 -0
  237. package/lib/typescript/shared/providers/screen/styles/helpers/collect-interpolator-shared-values.d.ts.map +1 -0
  238. package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -1
  239. package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts +1 -0
  240. package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts.map +1 -1
  241. package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts +1 -0
  242. package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts.map +1 -1
  243. package/lib/typescript/shared/providers/screen/styles/stores/slot-references.store.d.ts.map +1 -1
  244. package/lib/typescript/shared/stores/system.store.d.ts.map +1 -1
  245. package/lib/typescript/shared/types/animation.types.d.ts +3 -3
  246. package/lib/typescript/shared/types/bounds.types.d.ts +7 -2
  247. package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
  248. package/lib/typescript/shared/utils/bounds/helpers/create-bounds-accessor-core.d.ts.map +1 -1
  249. package/lib/typescript/shared/utils/bounds/types/options.d.ts +6 -2
  250. package/lib/typescript/shared/utils/bounds/types/options.d.ts.map +1 -1
  251. package/package.json +1 -1
  252. package/src/shared/adapters/with-screen-transitions/index.tsx +30 -9
  253. package/src/shared/animation/transition-blocking.ts +79 -0
  254. package/src/shared/components/boundary/components/boundary-target.tsx +43 -50
  255. package/src/shared/components/boundary/create-boundary-component.tsx +35 -150
  256. package/src/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.ts +103 -81
  257. package/src/shared/components/boundary/hooks/use-boundary-measurement.ts +1 -0
  258. package/src/shared/components/boundary/hooks/use-measurer.ts +12 -4
  259. package/src/shared/components/boundary/hooks/use-register-target.ts +43 -0
  260. package/src/shared/components/boundary/index.tsx +2 -2
  261. package/src/shared/components/boundary/portal/components/boundary-content-portal/components/host.tsx +48 -0
  262. package/src/shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.ts +9 -0
  263. package/src/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.ts +274 -0
  264. package/src/shared/components/boundary/portal/components/boundary-content-portal/index.tsx +59 -0
  265. package/src/shared/components/boundary/portal/components/{host.tsx → boundary-portal/components/host.tsx} +14 -15
  266. package/src/shared/components/boundary/portal/components/{portal-boundary-host.tsx → boundary-portal/components/portal-boundary-host.tsx} +12 -12
  267. package/src/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.tsx +80 -0
  268. package/src/shared/components/boundary/portal/{utils → components/boundary-portal/helpers}/has-local-slot.ts +1 -1
  269. package/src/shared/components/boundary/portal/components/boundary-portal/helpers/host-name.ts +10 -0
  270. package/src/shared/components/boundary/portal/{utils → components/boundary-portal/helpers}/offset-style.ts +2 -2
  271. package/src/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts +250 -0
  272. package/src/shared/components/boundary/portal/{hooks → components/boundary-portal/hooks}/use-host-measurement.ts +38 -8
  273. package/src/shared/components/boundary/portal/{hooks → components/boundary-portal/hooks}/use-placeholder-styles.ts +4 -15
  274. package/src/shared/components/boundary/portal/components/boundary-portal/index.tsx +38 -0
  275. package/src/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-bounds.store.ts +2 -2
  276. package/src/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/portal-boundary-host.store.ts +10 -15
  277. package/src/shared/components/boundary/portal/index.ts +1 -2
  278. package/src/shared/components/boundary/portal/teleport.ts +2 -2
  279. package/src/shared/components/boundary/portal/utils/naming.ts +0 -19
  280. package/src/shared/components/boundary/portal/utils/ownership.ts +32 -88
  281. package/src/shared/components/boundary/providers/boundary-root.provider.tsx +198 -78
  282. package/src/shared/components/boundary/utils/destination-signals.ts +38 -14
  283. package/src/shared/components/boundary/utils/measured-bounds.ts +48 -0
  284. package/src/shared/components/screen-container/layers/content.tsx +1 -1
  285. package/src/shared/configs/presets.ts +2 -2
  286. package/src/shared/index.ts +4 -0
  287. package/src/shared/providers/screen/animation/helpers/read-screen-animation-revisions.ts +14 -0
  288. package/src/shared/providers/screen/styles/helpers/collect-interpolator-shared-values.ts +75 -0
  289. package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +11 -0
  290. package/src/shared/providers/screen/styles/hooks/use-maybe-block-visibility.tsx +1 -0
  291. package/src/shared/providers/screen/styles/slot.provider.tsx +4 -2
  292. package/src/shared/providers/screen/styles/stores/slot-references.store.ts +2 -1
  293. package/src/shared/stores/system.store.ts +10 -4
  294. package/src/shared/types/animation.types.ts +3 -3
  295. package/src/shared/types/bounds.types.ts +9 -2
  296. package/src/shared/utils/bounds/helpers/create-bounds-accessor-core.ts +18 -11
  297. package/src/shared/utils/bounds/navigation/reveal/build.ts +2 -2
  298. package/src/shared/utils/bounds/navigation/zoom/build.ts +3 -3
  299. package/src/shared/utils/bounds/types/options.ts +9 -2
  300. package/lib/commonjs/shared/components/boundary/portal/components/boundary-local-portal-host.js +0 -58
  301. package/lib/commonjs/shared/components/boundary/portal/components/boundary-local-portal-host.js.map +0 -1
  302. package/lib/commonjs/shared/components/boundary/portal/components/host.js.map +0 -1
  303. package/lib/commonjs/shared/components/boundary/portal/components/portal-boundary-host.js.map +0 -1
  304. package/lib/commonjs/shared/components/boundary/portal/components/portal.js +0 -272
  305. package/lib/commonjs/shared/components/boundary/portal/components/portal.js.map +0 -1
  306. package/lib/commonjs/shared/components/boundary/portal/hooks/use-host-measurement.js.map +0 -1
  307. package/lib/commonjs/shared/components/boundary/portal/hooks/use-placeholder-styles.js.map +0 -1
  308. package/lib/commonjs/shared/components/boundary/portal/stores/host-bounds.store.js.map +0 -1
  309. package/lib/commonjs/shared/components/boundary/portal/stores/host-registry.store.js.map +0 -1
  310. package/lib/commonjs/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map +0 -1
  311. package/lib/commonjs/shared/components/boundary/portal/utils/has-local-slot.js.map +0 -1
  312. package/lib/commonjs/shared/components/boundary/portal/utils/offset-style.js.map +0 -1
  313. package/lib/module/shared/components/boundary/portal/components/boundary-local-portal-host.js +0 -53
  314. package/lib/module/shared/components/boundary/portal/components/boundary-local-portal-host.js.map +0 -1
  315. package/lib/module/shared/components/boundary/portal/components/host.js.map +0 -1
  316. package/lib/module/shared/components/boundary/portal/components/portal-boundary-host.js.map +0 -1
  317. package/lib/module/shared/components/boundary/portal/components/portal.js +0 -267
  318. package/lib/module/shared/components/boundary/portal/components/portal.js.map +0 -1
  319. package/lib/module/shared/components/boundary/portal/hooks/use-host-measurement.js.map +0 -1
  320. package/lib/module/shared/components/boundary/portal/hooks/use-placeholder-styles.js.map +0 -1
  321. package/lib/module/shared/components/boundary/portal/stores/host-bounds.store.js.map +0 -1
  322. package/lib/module/shared/components/boundary/portal/stores/host-registry.store.js.map +0 -1
  323. package/lib/module/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map +0 -1
  324. package/lib/module/shared/components/boundary/portal/utils/has-local-slot.js.map +0 -1
  325. package/lib/module/shared/components/boundary/portal/utils/offset-style.js.map +0 -1
  326. package/lib/typescript/shared/components/boundary/portal/components/boundary-local-portal-host.d.ts +0 -8
  327. package/lib/typescript/shared/components/boundary/portal/components/boundary-local-portal-host.d.ts.map +0 -1
  328. package/lib/typescript/shared/components/boundary/portal/components/host.d.ts.map +0 -1
  329. package/lib/typescript/shared/components/boundary/portal/components/portal-boundary-host.d.ts.map +0 -1
  330. package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts +0 -20
  331. package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts.map +0 -1
  332. package/lib/typescript/shared/components/boundary/portal/hooks/use-host-measurement.d.ts.map +0 -1
  333. package/lib/typescript/shared/components/boundary/portal/hooks/use-placeholder-styles.d.ts +0 -17
  334. package/lib/typescript/shared/components/boundary/portal/hooks/use-placeholder-styles.d.ts.map +0 -1
  335. package/lib/typescript/shared/components/boundary/portal/stores/host-bounds.store.d.ts.map +0 -1
  336. package/lib/typescript/shared/components/boundary/portal/stores/host-registry.store.d.ts.map +0 -1
  337. package/lib/typescript/shared/components/boundary/portal/stores/portal-boundary-host.store.d.ts.map +0 -1
  338. package/lib/typescript/shared/components/boundary/portal/utils/has-local-slot.d.ts +0 -3
  339. package/lib/typescript/shared/components/boundary/portal/utils/has-local-slot.d.ts.map +0 -1
  340. package/lib/typescript/shared/components/boundary/portal/utils/offset-style.d.ts.map +0 -1
  341. package/src/shared/components/boundary/portal/components/boundary-local-portal-host.tsx +0 -66
  342. package/src/shared/components/boundary/portal/components/portal.tsx +0 -412
  343. /package/lib/commonjs/shared/components/boundary/portal/{utils → components/boundary-portal/helpers}/has-local-slot.js +0 -0
  344. /package/lib/commonjs/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-registry.store.js +0 -0
  345. /package/lib/module/shared/components/boundary/portal/{utils → components/boundary-portal/helpers}/has-local-slot.js +0 -0
  346. /package/lib/module/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-registry.store.js +0 -0
  347. /package/lib/typescript/shared/components/boundary/portal/components/{host.d.ts → boundary-portal/components/host.d.ts} +0 -0
  348. /package/lib/typescript/shared/components/boundary/portal/components/{portal-boundary-host.d.ts → boundary-portal/components/portal-boundary-host.d.ts} +0 -0
  349. /package/lib/typescript/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-registry.store.d.ts +0 -0
  350. /package/src/shared/components/boundary/portal/{stores → components/boundary-portal/stores}/host-registry.store.ts +0 -0
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useInitialDestinationMeasurement = void 0;
7
+ var _react = require("react");
7
8
  var _reactNativeReanimated = require("react-native-reanimated");
8
9
  var _descriptors = require("../../../../providers/screen/descriptors");
9
10
  var _animation = require("../../../../stores/animation.store");
@@ -13,18 +14,18 @@ var _links = require("../../../../stores/bounds/internals/links");
13
14
  var _state = require("../../../../stores/bounds/internals/state");
14
15
  var _system = require("../../../../stores/system.store");
15
16
  var _logger = require("../../../../utils/logger");
16
- var _ownership = require("../../portal/utils/ownership");
17
17
  var _destinationSignals = require("../../utils/destination-signals");
18
- const VIEWPORT_RETRY_DELAY_MS = 100;
18
+ const HANDSHAKE_RETRY_DELAY_MS = 100;
19
19
  /**
20
- * A destination that keeps failing its measurement guards must not hold the
21
- * transition gate forever after this budget the block is released with a
22
- * warning so the open proceeds without that boundary.
20
+ * A destination whose initial handshake never completes must not hold the
21
+ * transition gate forever. After this budget, release the block with a warning
22
+ * so the open proceeds without that boundary.
23
23
  */
24
- const MAX_VIEWPORT_RETRIES = 20;
24
+ const MAX_HANDSHAKE_RETRIES = 20;
25
25
  const useInitialDestinationMeasurement = ({
26
26
  boundTag,
27
27
  enabled,
28
+ escapeClipping,
28
29
  measureBoundary
29
30
  }) => {
30
31
  const {
@@ -37,9 +38,9 @@ const useInitialDestinationMeasurement = ({
37
38
  const destinationPairKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.destinationPairKey);
38
39
  const ancestorDestinationPairKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.ancestorDestinationPairKey);
39
40
  const destinationEnabled = enabled && !nextScreenKey;
41
+ const initialDestinationPairKey = destinationPairKey ?? ancestorDestinationPairKey;
40
42
  const progress = _animation.AnimationStore.getValue(currentScreenKey, "transitionProgress");
41
43
  const {
42
- pendingLifecycleRequestKind,
43
44
  actions: {
44
45
  blockLifecycleStart,
45
46
  unblockLifecycleStart
@@ -47,93 +48,109 @@ const useInitialDestinationMeasurement = ({
47
48
  } = _system.SystemStore.getBag(currentScreenKey);
48
49
  const isBlockingLifecycleStart = (0, _reactNativeReanimated.useSharedValue)(0);
49
50
  const retryToken = (0, _reactNativeReanimated.useSharedValue)(0);
50
- const viewportRetries = (0, _reactNativeReanimated.useSharedValue)(0);
51
+ const handshakeRetries = (0, _reactNativeReanimated.useSharedValue)(0);
51
52
  const hasGivenUp = (0, _reactNativeReanimated.useSharedValue)(0);
52
- const releaseLifecycleStartBlock = () => {
53
+ const releaseLifecycleStartBlock = (0, _react.useCallback)(() => {
53
54
  "worklet";
54
55
 
55
56
  (0, _reactNativeReanimated.cancelAnimation)(retryToken);
56
57
  if (!isBlockingLifecycleStart.get()) {
57
58
  return;
58
59
  }
59
- unblockLifecycleStart();
60
60
  isBlockingLifecycleStart.set(0);
61
- };
61
+ unblockLifecycleStart();
62
+ }, [isBlockingLifecycleStart, retryToken, unblockLifecycleStart]);
63
+ (0, _react.useLayoutEffect)(() => {
64
+ if (!destinationEnabled || !initialDestinationPairKey || progress.get() > 0 || isBlockingLifecycleStart.get()) {
65
+ return;
66
+ }
67
+
68
+ // Boundary layout effects run before the parent screen's open intent. Claim
69
+ // this boundary's startup block before the transition controller can consume
70
+ // the request; the UI-thread handshake below releases it once matching is done.
71
+ blockLifecycleStart();
72
+ isBlockingLifecycleStart.set(1);
73
+ return () => {
74
+ if (escapeClipping) {
75
+ // The portal host owns the release after this boundary hands off.
76
+ return;
77
+ }
78
+
79
+ // This is an abandonment fallback, not a second release. Run it on the UI
80
+ // runtime so it serializes with the handshake's guarded release.
81
+ (0, _reactNativeReanimated.runOnUI)(releaseLifecycleStartBlock)();
82
+ };
83
+ }, [blockLifecycleStart, destinationEnabled, escapeClipping, initialDestinationPairKey, isBlockingLifecycleStart, progress, releaseLifecycleStartBlock]);
62
84
  (0, _reactNativeReanimated.useAnimatedReaction)(() => {
63
85
  "worklet";
64
86
 
65
87
  const retryTick = retryToken.get();
66
- const hasPendingOpenRequest = pendingLifecycleRequestKind.get() === _system.LifecycleTransitionRequestKind.Open;
67
88
  const isWaitingForOpenToStart = progress.get() <= 0;
68
- if (!hasPendingOpenRequest || !isWaitingForOpenToStart) {
69
- return [0, retryTick];
70
- }
71
- const measurePairKey = (0, _destinationSignals.getInitialDestinationMeasurePairKey)({
72
- enabled: destinationEnabled,
89
+ const sourceScreenKey = initialDestinationPairKey ? (0, _linkPairs.getSourceScreenKeyFromPairKey)(initialDestinationPairKey) : undefined;
90
+ const signal = (0, _destinationSignals.getInitialDestinationMeasurementSignal)({
91
+ enabled: destinationEnabled && isWaitingForOpenToStart && isBlockingLifecycleStart.get() > 0,
73
92
  destinationPairKey,
74
93
  ancestorDestinationPairKey,
75
94
  linkId: linkKey,
76
95
  group,
77
- linkState: destinationEnabled && (destinationPairKey || ancestorDestinationPairKey) ? _state.pairs.get() : undefined
96
+ destinationPresent: (0, _entries.getEntry)(tag, currentScreenKey) !== null,
97
+ sourcePresent: sourceScreenKey !== undefined && (0, _entries.getEntry)(tag, sourceScreenKey) !== null,
98
+ linkState: initialDestinationPairKey ? _state.pairs.get() : undefined
78
99
  });
79
- return [measurePairKey, retryTick];
80
- }, ([measurePairKey, retryTick], previous) => {
100
+ return [signal?.pairKey ?? null, signal?.action ?? null, retryTick];
101
+ }, ([measurePairKey, action, retryTick], previous) => {
81
102
  "worklet";
82
103
 
83
- if (!measurePairKey) {
104
+ if (!measurePairKey || !action) {
84
105
  return;
85
106
  }
86
107
  const previousMeasurePairKey = previous?.[0];
87
- const previousRetryTick = previous?.[1];
88
- const shouldAttemptMeasure = measurePairKey !== previousMeasurePairKey || retryTick !== previousRetryTick;
89
- if (!shouldAttemptMeasure) {
108
+ const previousAction = previous?.[1];
109
+ const previousRetryTick = previous?.[2];
110
+ const shouldHandleSignal = measurePairKey !== previousMeasurePairKey || action !== previousAction || retryTick !== previousRetryTick;
111
+ if (!shouldHandleSignal) {
90
112
  return;
91
113
  }
92
114
  if (hasGivenUp.get()) {
93
115
  return;
94
116
  }
95
- if (!isBlockingLifecycleStart.get()) {
96
- blockLifecycleStart();
97
- isBlockingLifecycleStart.set(1);
117
+ if (action === "release") {
118
+ releaseLifecycleStartBlock();
119
+ handshakeRetries.set(0);
120
+ return;
98
121
  }
99
- measureBoundary({
100
- type: "destination",
101
- pairKey: measurePairKey
102
- });
103
- const destinationAttached = (0, _links.getDestination)(measurePairKey, linkKey) !== null;
104
- if (destinationAttached) {
105
- const linkState = _state.pairs.get();
106
- const link = (0, _links.getLink)(measurePairKey, linkKey);
107
- const sourceScreenKey = (0, _linkPairs.getSourceScreenKeyFromPairKey)(measurePairKey);
108
- const sourceEntry = (0, _entries.getEntry)(tag, sourceScreenKey);
109
- const sourceEntryUsesDestinationEscapeHost = sourceEntry?.handoff === true && sourceEntry.escapeClipping === true;
110
- const shouldWaitForEscapeClippingHost = (0, _ownership.usesEscapeClippingHost)(link) || sourceEntryUsesDestinationEscapeHost || (0, _ownership.hasHandoffEscapeContinuation)({
111
- linkKey,
112
- linkState,
113
- sourceScreenKey
122
+ if (action === "measure") {
123
+ measureBoundary({
124
+ type: "destination",
125
+ pairKey: measurePairKey
114
126
  });
115
- if (shouldWaitForEscapeClippingHost) {
127
+ }
128
+ const link = (0, _links.getLink)(measurePairKey, linkKey);
129
+ const linkComplete = !!link?.source && !!link.destination;
130
+ if (linkComplete || action === "complete") {
131
+ (0, _reactNativeReanimated.cancelAnimation)(retryToken);
132
+ handshakeRetries.set(0);
133
+ if (escapeClipping) {
116
134
  // Screen-level escape has a second readiness phase after destination
117
- // measurement: the host must commit before the transition starts, or
135
+ // matching: the host must commit before the transition starts, or
118
136
  // the payload can disappear for a frame.
119
137
  return;
120
138
  }
121
139
  releaseLifecycleStartBlock();
122
- viewportRetries.set(0);
123
140
  return;
124
141
  }
125
- if (viewportRetries.get() >= MAX_VIEWPORT_RETRIES) {
142
+ if (handshakeRetries.get() >= MAX_HANDSHAKE_RETRIES) {
126
143
  hasGivenUp.set(1);
127
144
  releaseLifecycleStartBlock();
128
- _logger.logger.warn(`Destination boundary "${linkKey}" never produced a valid measurement after ${MAX_VIEWPORT_RETRIES} attempts; releasing the transition gate without it. The boundary is likely off-viewport (e.g. an inactive group member on a paged screen) or unmounted.`);
145
+ _logger.logger.warn(`Boundary "${linkKey}" never formed a complete source/destination link after ${MAX_HANDSHAKE_RETRIES} attempts; releasing the transition gate without it. One side is likely off-viewport or unmounted.`);
129
146
  return;
130
147
  }
131
148
 
132
- // Destination did not attach (malformed off-screen measurement); retry
133
- // after the retry token advances while the lifecycle stays blocked.
134
- viewportRetries.set(viewportRetries.get() + 1);
149
+ // Keep the lifecycle blocked while registration, measurement, or source
150
+ // attachment settles. The retry token also retries rejected destination bounds.
151
+ handshakeRetries.set(handshakeRetries.get() + 1);
135
152
  (0, _reactNativeReanimated.cancelAnimation)(retryToken);
136
- retryToken.set((0, _reactNativeReanimated.withDelay)(VIEWPORT_RETRY_DELAY_MS, (0, _reactNativeReanimated.withTiming)(retryToken.get() + 1, {
153
+ retryToken.set((0, _reactNativeReanimated.withDelay)(HANDSHAKE_RETRY_DELAY_MS, (0, _reactNativeReanimated.withTiming)(retryToken.get() + 1, {
137
154
  duration: 0
138
155
  })));
139
156
  });
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNativeReanimated","require","_descriptors","_animation","_linkPairs","_entries","_links","_state","_system","_logger","_ownership","_destinationSignals","VIEWPORT_RETRY_DELAY_MS","MAX_VIEWPORT_RETRIES","useInitialDestinationMeasurement","boundTag","enabled","measureBoundary","tag","linkKey","group","currentScreenKey","useDescriptorsStore","s","derivations","nextScreenKey","destinationPairKey","ancestorDestinationPairKey","destinationEnabled","progress","AnimationStore","getValue","pendingLifecycleRequestKind","actions","blockLifecycleStart","unblockLifecycleStart","SystemStore","getBag","isBlockingLifecycleStart","useSharedValue","retryToken","viewportRetries","hasGivenUp","releaseLifecycleStartBlock","cancelAnimation","get","set","useAnimatedReaction","retryTick","hasPendingOpenRequest","LifecycleTransitionRequestKind","Open","isWaitingForOpenToStart","measurePairKey","getInitialDestinationMeasurePairKey","linkId","linkState","pairs","undefined","previous","previousMeasurePairKey","previousRetryTick","shouldAttemptMeasure","type","pairKey","destinationAttached","getDestination","link","getLink","sourceScreenKey","getSourceScreenKeyFromPairKey","sourceEntry","getEntry","sourceEntryUsesDestinationEscapeHost","handoff","escapeClipping","shouldWaitForEscapeClippingHost","usesEscapeClippingHost","hasHandoffEscapeContinuation","logger","warn","withDelay","withTiming","duration","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AAOA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAIA,IAAAM,MAAA,GAAAN,OAAA;AAEA,IAAAO,OAAA,GAAAP,OAAA;AAIA,IAAAQ,OAAA,GAAAR,OAAA;AACA,IAAAS,UAAA,GAAAT,OAAA;AAKA,IAAAU,mBAAA,GAAAV,OAAA;AAEA,MAAMW,uBAAuB,GAAG,GAAG;AACnC;AACA;AACA;AACA;AACA;AACA,MAAMC,oBAAoB,GAAG,EAAE;AAQxB,MAAMC,gCAAgC,GAAGA,CAAC;EAChDC,QAAQ;EACRC,OAAO;EACPC;AACuC,CAAC,KAAK;EAC7C,MAAM;IAAEC,GAAG;IAAEC,OAAO;IAAEC;EAAM,CAAC,GAAGL,QAAQ;EACxC,MAAMM,gBAAgB,GAAG,IAAAC,gCAAmB,EAC1CC,CAAC,IAAKA,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G,CAAC,EAAE;MAAEsC,QAAQ,EAAE;IAAE,CAAC,CACjD,CACD,CAAC;EACF,CACD,CAAC;AACF,CAAC;AAACC,OAAA,CAAAtE,gCAAA,GAAAA,gCAAA","ignoreList":[]}
1
+ {"version":3,"names":["_react","require","_reactNativeReanimated","_descriptors","_animation","_linkPairs","_entries","_links","_state","_system","_logger","_destinationSignals","HANDSHAKE_RETRY_DELAY_MS","MAX_HANDSHAKE_RETRIES","useInitialDestinationMeasurement","boundTag","enabled","escapeClipping","measureBoundary","tag","linkKey","group","currentScreenKey","useDescriptorsStore","s","derivations","nextScreenKey","destinationPairKey","ancestorDestinationPairKey","destinationEnabled","initialDestinationPairKey","progress","AnimationStore","getValue","actions","blockLifecycleStart","unblockLifecycleStart","SystemStore","getBag","isBlockingLifecycleStart","useSharedValue","retryToken","handshakeRetries","hasGivenUp","releaseLifecycleStartBlock","useCallback","cancelAnimation","get","set","useLayoutEffect","runOnUI","useAnimatedReaction","retryTick","isWaitingForOpenToStart","sourceScreenKey","getSourceScreenKeyFromPairKey","undefined","signal","getInitialDestinationMeasurementSignal","linkId","destinationPresent","getEntry","sourcePresent","linkState","pairs","pairKey","action","measurePairKey","previous","previousMeasurePairKey","previousAction","previousRetryTick","shouldHandleSignal","type","link","getLink","linkComplete","source","destination","logger","warn","withDelay","withTiming","duration","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AAQA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAEA,IAAAQ,OAAA,GAAAR,OAAA;AACA,IAAAS,OAAA,GAAAT,OAAA;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S,EAAE;MACzBhD,eAAe,CAAC;QACfuD,IAAI,EAAE,aAAa;QACnBR,OAAO,EAAEE;MACV,CAAC,CAAC;IACH;IAEA,MAAMO,IAAI,GAAG,IAAAC,cAAO,EAACR,cAAc,EAAE/C,OAAO,CAAC;IAC7C,MAAMwD,YAAY,GAAG,CAAC,CAACF,IAAI,EAAEG,MAAM,IAAI,CAAC,CAACH,IAAI,CAACI,WAAW;IAEzD,IAAIF,YAAY,IAAIV,MAAM,KAAK,UAAU,EAAE;MAC1C,IAAApB,sCAAe,EAACL,UAAU,CAAC;MAC3BC,gBAAgB,CAACM,GAAG,CAAC,CAAC,CAAC;MACvB,IAAI/B,cAAc,EAAE;QACnB;QACA;QACA;QACA;MACD;MACA2B,0BAA0B,CAAC,CAAC;MAC5B;IACD;IAEA,IAAIF,gBAAgB,CAACK,GAAG,CAAC,CAAC,IAAIlC,qBAAqB,EAAE;MACpD8B,UAAU,CAACK,GAAG,CAAC,CAAC,CAAC;MACjBJ,0BAA0B,CAAC,CAAC;MAC5BmC,cAAM,CAACC,IAAI,CACV,aAAa5D,OAAO,2DAA2DP,qBAAqB,oGACrG,CAAC;MACD;IACD;;IAEA;IACA;IACA6B,gBAAgB,CAACM,GAAG,CAACN,gBAAgB,CAACK,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IAChD,IAAAD,sCAAe,EAACL,UAAU,CAAC;IAC3BA,UAAU,CAACO,GAAG,CACb,IAAAiC,gCAAS,EACRrE,wBAAwB,EACxB,IAAAsE,iCAAU,EAACzC,UAAU,CAACM,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE;MAAEoC,QAAQ,EAAE;IAAE,CAAC,CACjD,CACD,CAAC;EACF,CACD,CAAC;AACF,CAAC;AAACC,OAAA,CAAAtE,gCAAA,GAAAA,gCAAA","ignoreList":[]}
@@ -70,6 +70,7 @@ const useBoundaryMeasurement = ({
70
70
  (0, _useInitialDestinationMeasurement.useInitialDestinationMeasurement)({
71
71
  boundTag,
72
72
  enabled: runtimeEnabled,
73
+ escapeClipping,
73
74
  measureBoundary
74
75
  });
75
76
  (0, _useRefreshBoundary.useRefreshBoundary)({
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_styles","_useBoundaryPresence","_useInitialDestinationMeasurement","_useInitialSourceMeasurement","_useRefreshBoundary","_useMeasurer","useBoundaryMeasurement","boundTag","enabled","runtimeEnabled","currentScreenKey","measuredRef","style","targetPreparedStyles","handoff","escapeClipping","config","anchor","scaleMode","target","method","boundaryConfig","useMemo","rootPreparedStyles","prepareStyleForBounds","preparedStyles","measureBoundary","useMeasurer","measuredAnimatedRef","useBoundaryPresence","useInitialSourceMeasurement","useInitialDestinationMeasurement","useRefreshBoundary","exports"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/hooks/use-boundary-measurement.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAIA,IAAAC,OAAA,GAAAD,OAAA;AAEA,IAAAE,oBAAA,GAAAF,OAAA;AACA,IAAAG,iCAAA,GAAAH,OAAA;AACA,IAAAI,4BAAA,GAAAJ,OAAA;AACA,IAAAK,mBAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AAmBA;AACA;AACA;AACA;AACA;AACO,MAAMO,sBAAsB,GAAGA,CAAC;EACtCC,QAAQ;EACRC,OAAO;EACPC,cAAc;EACdC,gBAAgB;EAChBC,WAAW;EACXC,KAAK;EACLC,oBAAoB;EACpBC,OAAO;EACPC,cAAc;EACdC;AAC6B,CAAC,KAAK;EACnC,MAAM;IAAEC,MAAM;IAAEC,SAAS;IAAEC,MAAM;IAAEC;EAAO,CAAC,GAAGJ,MAAM;EACpD,MAAMK,cAAc,GAAG,IAAAC,cAAO,EAC7B,OAAO;IAAEL,MAAM;IAAEC,SAAS;IAAEC,MAAM;IAAEC;EAAO,CAAC,CAAC,EAC7C,CAACH,MAAM,EAAEC,SAAS,EAAEC,MAAM,EAAEC,MAAM,CACnC,CAAC;EAED,MAAMG,kBAAkB,GAAG,IAAAD,cAAO,EACjC,MAAM,IAAAE,6BAAqB,EAACZ,KAAK,CAAC,EAClC,CAACA,KAAK,CACP,CAAC;EACD,MAAMa,cAAc,GAAGZ,oBAAoB,IAAIU,kBAAkB;EAEjE,MAAMG,eAAe,GAAG,IAAAC,wBAAW,EAAC;IACnCnB,OAAO;IACPD,QAAQ;IACRG,gBAAgB;IAChBe,cAAc;IACdG,mBAAmB,EAAEjB,WAAW;IAChCG,OAAO;IACPC;EACD,CAAC,CAAC;;EAEF;EACA;EACA,IAAAc,wCAAmB,EAAC;IACnBrB,OAAO,EAAEC,cAAc;IACvBF,QAAQ;IACRG,gBAAgB;IAChBW,cAAc;IACdP,OAAO;IACPC;EACD,CAAC,CAAC;EAEF,IAAAe,wDAA2B,EAAC;IAC3BtB,OAAO,EAAEC,cAAc;IACvBiB,eAAe;IACfnB;EACD,CAAC,CAAC;EAEF,IAAAwB,kEAAgC,EAAC;IAChCxB,QAAQ;IACRC,OAAO,EAAEC,cAAc;IACvBiB;EACD,CAAC,CAAC;EAEF,IAAAM,sCAAkB,EAAC;IAClBxB,OAAO,EAAEC,cAAc;IACvBF,QAAQ;IACRmB;EACD,CAAC,CAAC;AACH,CAAC;AAACO,OAAA,CAAA3B,sBAAA,GAAAA,sBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_react","require","_styles","_useBoundaryPresence","_useInitialDestinationMeasurement","_useInitialSourceMeasurement","_useRefreshBoundary","_useMeasurer","useBoundaryMeasurement","boundTag","enabled","runtimeEnabled","currentScreenKey","measuredRef","style","targetPreparedStyles","handoff","escapeClipping","config","anchor","scaleMode","target","method","boundaryConfig","useMemo","rootPreparedStyles","prepareStyleForBounds","preparedStyles","measureBoundary","useMeasurer","measuredAnimatedRef","useBoundaryPresence","useInitialSourceMeasurement","useInitialDestinationMeasurement","useRefreshBoundary","exports"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/hooks/use-boundary-measurement.ts"],"mappings":";;;;;;AAAA,IA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vBiB,eAAe;IACfnB;EACD,CAAC,CAAC;EAEF,IAAAwB,kEAAgC,EAAC;IAChCxB,QAAQ;IACRC,OAAO,EAAEC,cAAc;IACvBM,cAAc;IACdW;EACD,CAAC,CAAC;EAEF,IAAAM,sCAAkB,EAAC;IAClBxB,OAAO,EAAEC,cAAc;IACvBF,QAAQ;IACRmB;EACD,CAAC,CAAC;AACH,CAAC;AAACO,OAAA,CAAA3B,sBAAA,GAAAA,sBAAA","ignoreList":[]}
@@ -9,8 +9,10 @@ var _reactNative = require("react-native");
9
9
  var _reactNativeReanimated = require("react-native-reanimated");
10
10
  var _measuredBoundsWrites = require("../../../providers/helpers/measured-bounds-writes");
11
11
  var _origin = require("../../../providers/screen/origin.provider");
12
+ var _styles = require("../../../providers/screen/styles");
12
13
  var _scroll = require("../../../stores/scroll.store");
13
14
  var _system = require("../../../stores/system.store");
15
+ var _visibilityBlockOffset = require("../../../utils/visibility-block-offset");
14
16
  var _measuredBounds = require("../utils/measured-bounds");
15
17
  const useMeasurer = ({
16
18
  enabled,
@@ -31,6 +33,9 @@ const useMeasurer = ({
31
33
  const {
32
34
  originRef
33
35
  } = (0, _origin.useOriginContext)();
36
+ const {
37
+ visibilityBlocked
38
+ } = (0, _styles.useScreenSlots)();
34
39
  return (0, _react.useCallback)(target => {
35
40
  "worklet";
36
41
 
@@ -38,7 +43,14 @@ const useMeasurer = ({
38
43
  const measured = (0, _measuredBounds.measureWithOverscrollAwareness)(measuredAnimatedRef, scrollState.get());
39
44
  const measuredOrigin = (0, _reactNativeReanimated.measure)(originRef);
40
45
  if (!measured || !measuredOrigin) return;
41
- const normalizedMeasured = (0, _measuredBounds.normalizeMeasuredBoundsToOrigin)(measured, measuredOrigin);
46
+ const normalizedMeasured = (0, _measuredBounds.normalizeMeasuredBoundsWithVisibilityGate)({
47
+ measured,
48
+ origin: measuredOrigin,
49
+ visibilityBlocked: escapeClipping && visibilityBlocked.get(),
50
+ visibilityBlockOffset: (0, _visibilityBlockOffset.getVisibilityBlockOffset)(viewportHeight),
51
+ viewportWidth,
52
+ viewportHeight
53
+ });
42
54
 
43
55
  /**
44
56
  * - Destination Pass -
@@ -62,7 +74,7 @@ const useMeasurer = ({
62
74
  handoff,
63
75
  escapeClipping
64
76
  });
65
- }, [enabled, boundTag, currentScreenKey, preparedStyles, measuredAnimatedRef, handoff, escapeClipping, viewportWidth, viewportHeight, scrollState, scrollMetadata, pendingLifecycleStartBlockCount, originRef]);
77
+ }, [enabled, boundTag, currentScreenKey, preparedStyles, measuredAnimatedRef, handoff, escapeClipping, viewportWidth, viewportHeight, scrollState, scrollMetadata, pendingLifecycleStartBlockCount, originRef, visibilityBlocked]);
66
78
  };
67
79
  exports.useMeasurer = useMeasurer;
68
80
  //# sourceMappingURL=use-measurer.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_measuredBoundsWrites","_origin","_scroll","_system","_measuredBounds","useMeasurer","enabled","boundTag","currentScreenKey","preparedStyles","measuredAnimatedRef","handoff","escapeClipping","width","viewportWidth","height","viewportHeight","useWindowDimensions","scrollState","ScrollStore","getValue","scrollMetadata","pendingLifecycleStartBlockCount","SystemStore","originRef","useOriginContext","useCallback","target","measured","measureWithOverscrollAwareness","get","measuredOrigin","measure","normalizedMeasured","normalizeMeasuredBoundsToOrigin","shouldGuardDestinationViewport","group","viewportAllowsDestinationWrite","type","isMeasurementInViewport","measuredWithScroll","attachScrollSnapshotToMeasuredBounds","applyMeasuredBoundsWrites","entryTag","tag","linkId","linkKey","linkWrite","exports"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/hooks/use-measurer.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAF,OAAA;AAKA,IAAAG,qBAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAEA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAA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AI,uCAAuB,EACtBN,kBAAkB,EAClBnB,aAAa,EACbE,cACD,CAAC;IAEF,IAAI,CAACqB,8BAA8B,EAAE;IAErC,MAAMG,kBAAkB,GAAG,IAAAC,oDAAoC,EAC9DR,kBAAkB,EAClBZ,cAAc,CAACS,GAAG,CAAC,CACpB,CAAC;IAED,IAAAY,+CAAyB,EAAC;MACzBC,QAAQ,EAAEpC,QAAQ,CAACqC,GAAG;MACtBC,MAAM,EAAEtC,QAAQ,CAACuC,OAAO;MACxBV,KAAK,EAAE7B,QAAQ,CAAC6B,KAAK;MACrB5B,gBAAgB;MAChBoB,QAAQ,EAAEY,kBAAkB;MAC5B/B,cAAc;MACdsC,SAAS,EAAEpB,MAAM;MACjBhB,OAAO;MACPC;IACD,CAAC,CAAC;EACH,CAAC,EACD,CACCN,OAAO,EACPC,QAAQ,EACRC,gBAAgB,EAChBC,cAAc,EACdC,mBAAmB,EACnBC,OAAO,EACPC,cAAc,EACdE,aAAa,EACbE,cAAc,EACdE,WAAW,EACXG,cAAc,EACdC,+BAA+B,EAC/BE,SAAS,CAEX,CAAC;AACF,CAAC;AAACwB,OAAA,CAAA3C,WAAA,GAAAA,WAAA","ignoreList":[]}
1
+ {"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_measuredBoundsWrites","_origin","_styles","_scroll","_system","_visibilityBlockOffset","_measuredBounds","useMeasurer","enabled","boundTag","currentScreenKey","preparedStyles","measuredAnimatedRef","handoff","escapeClipping","width","viewportWidth","height","viewportHeight","useWindowDimensions","scrollState","ScrollStore","getValue","scrollMetadata","pendingLifecycleStartBlockCount","SystemStore","originRef","useOriginContext","visibilityBlocked","useScreenSlots","useCallback","target","measured","measureWithOverscrollAwareness","get","measuredOrigin","measure","normalizedMeasured","normalizeMeasuredBoundsWithVisibilityGate","origin","visibilityBlockOffset","getVisibilityBlockOffset","shouldGuardDestinationViewport","group","viewportAllowsDestinationWrite","type","isMeasurementInViewport","measuredWithScroll","attachScrollSnapshotToMeasuredBounds","applyMeasuredBoundsWrites","entryTag","tag","linkId","linkKey","linkWrite","exports"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/hooks/use-measurer.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAF,OAAA;AAKA,IAAAG,qBAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAEA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,sBAAA,GAAAR,OAAA;AAEA,IAAAS,eAAA,GAAAT,OAAA;AAiBO,MAAMU,WAAW,GAAGA,CAAC;EAC3BC,OAAO;EACPC,QAAQ;EACRC,gBAAgB;EAChBC,cAAc;EACdC,mBAAmB;EACnBC,OAAO;EACPC;AACkB,CAAC,KAAsB;EACzC,MAAM;IAAEC,KAAK,EAAEC,aAAa;IAAEC,MAAM,EAAEC;EAAe,CAAC,GACrD,IAAAC,gCAAmB,EAAC,CAAC;EAEtB,MAAMC,WAAW,GAAGC,mBAAW,CAACC,QAAQ,CAACZ,gBAAgB,EAAE,cAAc,CAAC;EAC1E,MAAMa,cAAc,GAAGF,mBAAW,CAACC,QAAQ,CAACZ,gBAAgB,EAAE,UAAU,CAAC;EACzE,MAAMc,+BAA+B,GAAGC,mBAAW,CAACH,QAAQ,CAC3DZ,gBAAgB,EAChB,iCACD,CAAC;EACD,MAAM;IAAEgB;EAAU,CAAC,GAAG,IAAAC,wBAAgB,EAAC,CAAC;EACxC,MAAM;IAAEC;EAAkB,CAAC,GAAG,IAAAC,sBAAc,EAAC,CAAC;EAE9C,OAAO,IAAAC,kBAAW,EAChBC,MAAM,IAAK;IACX,SAAS;;IACT,IAAI,CAACvB,OAAO,EAAE;IAEd,MAAMwB,QAAQ,GAAG,IAAAC,8CAA8B,EAC9CrB,mBAAmB,EACnBQ,WAAW,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,EACbE,cAAc,EACdE,WAAW,EACXG,cAAc,EACdC,+BAA+B,EAC/BE,SAAS,EACTE,iBAAiB,CAEnB,CAAC;AACF,CAAC;AAAC2B,OAAA,CAAAhD,WAAA,GAAAA,WAAA","ignoreList":[]}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useRegisterTarget = void 0;
7
+ var _react = require("react");
8
+ var _logger = require("../../../utils/logger");
9
+ var _boundaryRoot = require("../providers/boundary-root.provider");
10
+ const useRegisterTarget = ({
11
+ targetAnimatedRef,
12
+ preparedStyles,
13
+ measurementRef
14
+ }) => {
15
+ const rootContext = (0, _boundaryRoot.useBoundaryRootContext)();
16
+ const registerTargetRef = rootContext?.registerTargetRef;
17
+ const unregisterTargetRef = rootContext?.unregisterTargetRef;
18
+ (0, _react.useLayoutEffect)(() => {
19
+ if (!registerTargetRef || !unregisterTargetRef) {
20
+ if (__DEV__) {
21
+ _logger.logger.warn(_boundaryRoot.TARGET_OUTSIDE_ROOT_WARNING);
22
+ }
23
+ return;
24
+ }
25
+ registerTargetRef(targetAnimatedRef, preparedStyles, measurementRef);
26
+ return () => {
27
+ unregisterTargetRef(targetAnimatedRef);
28
+ };
29
+ }, [registerTargetRef, unregisterTargetRef, targetAnimatedRef, preparedStyles, measurementRef]);
30
+ };
31
+ exports.useRegisterTarget = useRegisterTarget;
32
+ //# sourceMappingURL=use-register-target.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_logger","_boundaryRoot","useRegisterTarget","targetAnimatedRef","preparedStyles","measurementRef","rootContext","useBoundaryRootContext","registerTargetRef","unregisterTargetRef","useLayoutEffect","__DEV__","logger","warn","TARGET_OUTSIDE_ROOT_WARNING","exports"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/hooks/use-register-target.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAGA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AAWO,MAAMG,iBAAiB,GAAGA,CAAC;EACjCC,iBAAiB;EACjBC,cAAc;EACdC;AACoB,CAAC,KAAK;EAC1B,MAAMC,WAAW,GAAG,IAAAC,oCAAsB,EAAC,CAAC;EAC5C,MAAMC,iBAAiB,GAAGF,WAAW,EAAEE,iBAAiB;EACxD,MAAMC,mBAAmB,GAAGH,WAAW,EAAEG,mBAAmB;EAC5D,IAAAC,sBAAe,EAAC,MAAM;IACrB,IAAI,CAACF,iBAAiB,IAAI,CAACC,mBAAmB,EAAE;MAC/C,IAAIE,OAAO,EAAE;QACZC,cAAM,CAACC,IAAI,CAACC,yCAA2B,CAAC;MACzC;MACA;IACD;IAEAN,iBAAiB,CAACL,iBAAiB,EAAEC,cAAc,EAAEC,cAAc,CAAC;IACpE,OAAO,MAAM;MACZI,mBAAmB,CAACN,iBAAiB,CAAC;IACvC,CAAC;EACF,CAAC,EAAE,CACFK,iBAAiB,EACjBC,mBAAmB,EACnBN,iBAAiB,EACjBC,cAAc,EACdC,cAAc,CACd,CAAC;AACH,CAAC;AAACU,OAAA,CAAAb,iBAAA,GAAAA,iBAAA","ignoreList":[]}
@@ -48,7 +48,7 @@ _portal.Host.displayName = "Transition.Boundary.Host";
48
48
  * Use:
49
49
  * - `Boundary` for passive and pressable shared elements.
50
50
  * - `Boundary.Target` to measure a nested descendant instead of the root.
51
- * - `Boundary.Host` to make nested portal placement explicit.
51
+ * - `Boundary.Host` to make clipping-escape host placement explicit.
52
52
  */
53
53
 
54
54
  const Boundary = exports.Boundary = Object.assign(BoundaryRoot, {
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.BoundaryContentPortalHost = void 0;
7
+ var _react = require("react");
8
+ var _reactNative = require("react-native");
9
+ var _reactNativeReanimated = _interopRequireDefault(require("react-native-reanimated"));
10
+ var _teleport = require("../../../teleport");
11
+ var _hostName = require("../helpers/host-name");
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
+ const AnimatedPortalHost = _teleport.NativePortalHost ? _reactNativeReanimated.default.createAnimatedComponent(_teleport.NativePortalHost) : null;
15
+ const BoundaryContentPortalHost = exports.BoundaryContentPortalHost = /*#__PURE__*/(0, _react.memo)(function BoundaryContentPortalHost({
16
+ boundaryId,
17
+ children,
18
+ enabled,
19
+ screenKey
20
+ }) {
21
+ if (!enabled || !AnimatedPortalHost) {
22
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
23
+ children: children
24
+ });
25
+ }
26
+ const portalHostName = (0, _hostName.createBoundaryContentPortalHostName)(screenKey, boundaryId);
27
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
28
+ children: [children, /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedPortalHost, {
29
+ name: portalHostName,
30
+ style: styles.host
31
+ })]
32
+ });
33
+ });
34
+ const styles = _reactNative.StyleSheet.create({
35
+ host: {
36
+ ..._reactNative.StyleSheet.absoluteFillObject,
37
+ overflow: "visible"
38
+ }
39
+ });
40
+ //# sourceMappingURL=host.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireDefault","_teleport","_hostName","_jsxRuntime","e","__esModule","default","AnimatedPortalHost","NativePortalHost","Animated","createAnimatedComponent","BoundaryContentPortalHost","exports","memo","boundaryId","children","enabled","screenKey","jsx","Fragment","portalHostName","createBoundaryContentPortalHostName","jsxs","name","style","styles","host","StyleSheet","create","absoluteFillObject","overflow"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-content-portal/components/host.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAC,sBAAA,C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HostName = void 0;
7
+ const BOUNDARY_CONTENT_PORTAL_HOST_NAME_SUFFIX = "-content-portal-host";
8
+ const createBoundaryContentPortalHostName = (screenKey, boundaryId) => {
9
+ "worklet";
10
+
11
+ return `${screenKey}-${boundaryId}${BOUNDARY_CONTENT_PORTAL_HOST_NAME_SUFFIX}`;
12
+ };
13
+ exports.createBoundaryContentPortalHostName = createBoundaryContentPortalHostName;
14
+ //# sourceMappingURL=host-name.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["BOUNDARY_CONTENT_PORTAL_HOST_NAME_SUFFIX","createBoundaryContentPortalHostName","screenKey","boundaryId","exports"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-content-portal/helpers/host-name.ts"],"mappings":";;;;;;AAAA,MAAMA,wCAAwC,GAAG,sBAAsB;AAEhE,MAAMC,mCAAmC,GAAGA,CAClDC,SAAiB,EACjBC,UAAkB,KACd;EACJ,SAAS;;EACT,OAAO,GAAGD,SAAS,IAAIC,UAAU,GAAGH,wCAAwC,EAAE;AAC/E,CAAC;AAACI,OAAA,CAAAH,mCAAA,GAAAA,mCAAA","ignoreList":[]}
@@ -0,0 +1,194 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useBoundaryContentPortalAttachment = void 0;
7
+ var _react = require("react");
8
+ var _reactNativeReanimated = require("react-native-reanimated");
9
+ var _descriptors = require("../../../../../../providers/screen/descriptors");
10
+ var _styles = require("../../../../../../providers/screen/styles");
11
+ var _slotReferences = require("../../../../../../providers/screen/styles/stores/slot-references.store");
12
+ var _animation = require("../../../../../../stores/animation.store");
13
+ var _state = require("../../../../../../stores/bounds/internals/state");
14
+ var _naming = require("../../../utils/naming");
15
+ var _ownership = require("../../../utils/ownership");
16
+ var _shallowEqual = require("../../../utils/shallow-equal");
17
+ var _teleportControl = require("../../../utils/teleport-control");
18
+ var _visibleHost = require("../../../utils/visible-host");
19
+ var _hostName = require("../helpers/host-name");
20
+ const useBoundaryContentPortalAttachment = ({
21
+ boundaryId,
22
+ enabled
23
+ }) => {
24
+ const ownScreenSlots = (0, _styles.useScreenSlots)();
25
+ const sourcePairKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.sourcePairKey);
26
+ const currentScreenKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.currentScreenKey);
27
+ const [ownership, setOwnership] = (0, _react.useState)(null);
28
+ const styleOwnerScreenKey = ownership?.ownerScreenKey ?? currentScreenKey;
29
+ const ownerScreenSlots = (0, _slotReferences.useRegisteredScreenSlots)(styleOwnerScreenKey);
30
+ const activeScreenSlots = ownerScreenSlots ?? ownScreenSlots;
31
+ const {
32
+ nextInterpolatorReady: activeNextInterpolatorReady,
33
+ slotsMap: activeSlotsMap
34
+ } = activeScreenSlots;
35
+ const requestedPortalHostName = (0, _reactNativeReanimated.useSharedValue)(null);
36
+ const visiblePortalHostName = (0, _reactNativeReanimated.useSharedValue)(null);
37
+ const canSwitchPortalHostImmediately = (0, _reactNativeReanimated.useSharedValue)(0);
38
+ const targetScreenKey = ownership ? ownership.hostScreenKey : null;
39
+ const settledHostScreenKey = ownership?.hostScreenKey ?? null;
40
+ const settledHostProgress = _animation.AnimationStore.getValue(settledHostScreenKey ?? currentScreenKey, "progressSettled");
41
+ const settledHostAnimating = _animation.AnimationStore.getValue(settledHostScreenKey ?? currentScreenKey, "progressAnimating");
42
+ const settledHostWillAnimate = _animation.AnimationStore.getValue(settledHostScreenKey ?? currentScreenKey, "willAnimate");
43
+ const settledHostClosing = _animation.AnimationStore.getValue(settledHostScreenKey ?? currentScreenKey, "closing");
44
+ const handoffHostName = targetScreenKey !== null ? (0, _hostName.createBoundaryContentPortalHostName)(targetScreenKey, boundaryId) : null;
45
+ const updatePortalOwnership = (0, _react.useCallback)((hostScreenKey, ownerPairKey, ownerScreenKey) => {
46
+ if (hostScreenKey && ownerPairKey && ownerScreenKey) {
47
+ setOwnership(current => {
48
+ if (current?.hostScreenKey === hostScreenKey && current.ownerPairKey === ownerPairKey && current.ownerScreenKey === ownerScreenKey) {
49
+ return current;
50
+ }
51
+ return {
52
+ hostScreenKey,
53
+ ownerPairKey,
54
+ ownerScreenKey,
55
+ status: "complete"
56
+ };
57
+ });
58
+ return;
59
+ }
60
+ setOwnership(current => current ? null : current);
61
+ }, []);
62
+ (0, _react.useLayoutEffect)(() => {
63
+ if (!enabled || !ownership || !handoffHostName) {
64
+ requestedPortalHostName.set(null);
65
+ visiblePortalHostName.set(null);
66
+ return;
67
+ }
68
+ requestedPortalHostName.set(handoffHostName);
69
+ }, [enabled, handoffHostName, ownership, requestedPortalHostName, visiblePortalHostName]);
70
+ (0, _react.useLayoutEffect)(() => {
71
+ return () => {
72
+ requestedPortalHostName.set(null);
73
+ visiblePortalHostName.set(null);
74
+ };
75
+ }, [requestedPortalHostName, visiblePortalHostName]);
76
+ (0, _reactNativeReanimated.useAnimatedReaction)(() => {
77
+ "worklet";
78
+
79
+ if (!enabled || !sourcePairKey) {
80
+ return {
81
+ hostScreenKey: null,
82
+ ownerPairKey: sourcePairKey,
83
+ ownerScreenKey: null,
84
+ status: "clear"
85
+ };
86
+ }
87
+ const progressAnimating = settledHostAnimating.get();
88
+ const progressSettled = settledHostProgress.get();
89
+ const willAnimate = settledHostWillAnimate.get();
90
+ return (0, _ownership.resolveBoundaryPortalOwnership)({
91
+ boundaryId,
92
+ currentScreenKey,
93
+ handoff: true,
94
+ isSettledHostClosingComplete: (0, _ownership.isHandoffHostClosingComplete)({
95
+ closing: settledHostClosing.get(),
96
+ progressAnimating,
97
+ progressSettled,
98
+ willAnimate
99
+ }),
100
+ isSettledHostReady: progressSettled === 1 && progressAnimating === 0,
101
+ pairsState: _state.pairs.get(),
102
+ settledHostScreenKey,
103
+ sourcePairKey
104
+ });
105
+ }, (signal, previousSignal) => {
106
+ "worklet";
107
+
108
+ if ((0, _shallowEqual.shallowEqual)(previousSignal, signal)) {
109
+ return;
110
+ }
111
+ if (signal.status === "pending") {
112
+ canSwitchPortalHostImmediately.set(0);
113
+ return;
114
+ }
115
+ const hostScreenKey = signal.status === "complete" ? signal.hostScreenKey : null;
116
+ let previousOwnerPairKey;
117
+ if (previousSignal?.status === "complete") {
118
+ previousOwnerPairKey = previousSignal.ownerPairKey ?? undefined;
119
+ }
120
+ const canSwitchImmediately = (0, _ownership.canSwitchHandoffHostImmediately)({
121
+ hostScreenKey,
122
+ ownerPairKey: signal.status === "complete" ? signal.ownerPairKey : undefined,
123
+ previousOwnerPairKey
124
+ });
125
+ canSwitchPortalHostImmediately.set(canSwitchImmediately ? 1 : 0);
126
+ if (canSwitchImmediately && hostScreenKey) {
127
+ const hostName = (0, _hostName.createBoundaryContentPortalHostName)(hostScreenKey, boundaryId);
128
+ requestedPortalHostName.set(hostName);
129
+ visiblePortalHostName.set(hostName);
130
+ }
131
+ (0, _reactNativeReanimated.runOnJS)(updatePortalOwnership)(signal.hostScreenKey, signal.ownerPairKey, signal.ownerScreenKey ?? undefined);
132
+ });
133
+ (0, _reactNativeReanimated.useAnimatedReaction)(() => {
134
+ "worklet";
135
+
136
+ const slot = activeSlotsMap.get()[boundaryId];
137
+ const teleport = slot?.props?.teleport;
138
+ const shouldTeleport = (0, _teleportControl.shouldAttachBoundaryPortal)({
139
+ enabled,
140
+ teleport
141
+ });
142
+ const requestedName = requestedPortalHostName.get();
143
+ const visibleName = visiblePortalHostName.get();
144
+ const isInterpolatorReady = activeNextInterpolatorReady.get();
145
+ const nextVisibleName = (0, _visibleHost.resolveNextVisiblePortalHostName)({
146
+ canSwitchImmediately: canSwitchPortalHostImmediately.get() === 1,
147
+ isInterpolatorReady: isInterpolatorReady === 1,
148
+ requestedName,
149
+ shouldTeleport,
150
+ visibleName
151
+ });
152
+ return {
153
+ isInterpolatorReady,
154
+ nextVisibleName,
155
+ requestedName,
156
+ shouldTeleport,
157
+ teleport,
158
+ visibleName
159
+ };
160
+ }, (state, previousState) => {
161
+ "worklet";
162
+
163
+ if ((0, _shallowEqual.shallowEqual)(previousState, state)) {
164
+ return;
165
+ }
166
+ if (state.nextVisibleName !== state.visibleName) {
167
+ visiblePortalHostName.set(state.nextVisibleName);
168
+ }
169
+ });
170
+ const teleportProps = (0, _reactNativeReanimated.useAnimatedProps)(() => {
171
+ "worklet";
172
+
173
+ const slot = activeSlotsMap.get()[boundaryId];
174
+ const {
175
+ teleport,
176
+ ...slotProps
177
+ } = slot?.props ?? {};
178
+ const shouldTeleport = (0, _teleportControl.shouldAttachBoundaryPortal)({
179
+ enabled,
180
+ teleport
181
+ });
182
+ const visibleName = visiblePortalHostName.get();
183
+ return {
184
+ ...slotProps,
185
+ hostName: shouldTeleport && visibleName ? visibleName : _naming.PORTAL_HOST_NAME_RESET_VALUE
186
+ };
187
+ });
188
+ return {
189
+ teleportProps,
190
+ visiblePortalHostName
191
+ };
192
+ };
193
+ exports.useBoundaryContentPortalAttachment = useBoundaryContentPortalAttachment;
194
+ //# sourceMappingURL=use-boundary-content-portal-attachment.js.map