react-native-screen-transitions 3.8.0 → 3.9.0-alpha.1

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 (528) hide show
  1. package/lib/commonjs/blank-stack/components/stack-view.js +2 -1
  2. package/lib/commonjs/blank-stack/components/stack-view.js.map +1 -1
  3. package/lib/commonjs/shared/components/{create-boundary-component → boundary}/components/boundary-target.js +21 -8
  4. package/lib/commonjs/shared/components/boundary/components/boundary-target.js.map +1 -0
  5. package/lib/commonjs/shared/components/{create-boundary-component → boundary}/create-boundary-component.js +18 -24
  6. package/lib/commonjs/shared/components/boundary/create-boundary-component.js.map +1 -0
  7. package/lib/commonjs/shared/components/boundary/hooks/use-boundary-presence.js.map +1 -0
  8. package/lib/commonjs/shared/components/boundary/hooks/use-initial-destination-measurement.js +115 -0
  9. package/lib/commonjs/shared/components/boundary/hooks/use-initial-destination-measurement.js.map +1 -0
  10. package/lib/commonjs/shared/components/{create-boundary-component → boundary}/hooks/use-initial-source-measurement.js +4 -5
  11. package/lib/commonjs/shared/components/boundary/hooks/use-initial-source-measurement.js.map +1 -0
  12. package/lib/commonjs/shared/components/{create-boundary-component → boundary}/hooks/use-measurer.js +26 -22
  13. package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js.map +1 -0
  14. package/lib/commonjs/shared/components/{create-boundary-component → boundary}/hooks/use-refresh-boundary.js +10 -7
  15. package/lib/commonjs/shared/components/boundary/hooks/use-refresh-boundary.js.map +1 -0
  16. package/lib/commonjs/shared/components/{create-boundary-component → boundary}/index.js +8 -1
  17. package/lib/commonjs/shared/components/boundary/index.js.map +1 -0
  18. package/lib/commonjs/shared/components/boundary/portal/components/host.js +99 -0
  19. package/lib/commonjs/shared/components/boundary/portal/components/host.js.map +1 -0
  20. package/lib/commonjs/shared/components/boundary/portal/components/portal-boundary-host.js +74 -0
  21. package/lib/commonjs/shared/components/boundary/portal/components/portal-boundary-host.js.map +1 -0
  22. package/lib/commonjs/shared/components/boundary/portal/components/portal-provider.js +20 -0
  23. package/lib/commonjs/shared/components/boundary/portal/components/portal-provider.js.map +1 -0
  24. package/lib/commonjs/shared/components/boundary/portal/components/portal.js +198 -0
  25. package/lib/commonjs/shared/components/boundary/portal/components/portal.js.map +1 -0
  26. package/lib/commonjs/shared/components/boundary/portal/hooks/use-host-measurement.js +74 -0
  27. package/lib/commonjs/shared/components/boundary/portal/hooks/use-host-measurement.js.map +1 -0
  28. package/lib/commonjs/shared/components/boundary/portal/index.js +27 -0
  29. package/lib/commonjs/shared/components/boundary/portal/index.js.map +1 -0
  30. package/lib/commonjs/shared/components/boundary/portal/stores/host-bounds.store.js +47 -0
  31. package/lib/commonjs/shared/components/boundary/portal/stores/host-bounds.store.js.map +1 -0
  32. package/lib/commonjs/shared/components/boundary/portal/stores/host-registry.store.js +137 -0
  33. package/lib/commonjs/shared/components/boundary/portal/stores/host-registry.store.js.map +1 -0
  34. package/lib/commonjs/shared/components/boundary/portal/stores/portal-boundary-host.store.js +60 -0
  35. package/lib/commonjs/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map +1 -0
  36. package/lib/commonjs/shared/components/boundary/portal/teleport.js +23 -0
  37. package/lib/commonjs/shared/components/boundary/portal/teleport.js.map +1 -0
  38. package/lib/commonjs/shared/components/boundary/portal/utils/attachment.js +40 -0
  39. package/lib/commonjs/shared/components/boundary/portal/utils/attachment.js.map +1 -0
  40. package/lib/commonjs/shared/components/boundary/portal/utils/naming.js +15 -0
  41. package/lib/commonjs/shared/components/boundary/portal/utils/naming.js.map +1 -0
  42. package/lib/commonjs/shared/components/boundary/portal/utils/offset-style.js +71 -0
  43. package/lib/commonjs/shared/components/boundary/portal/utils/offset-style.js.map +1 -0
  44. package/lib/commonjs/shared/components/boundary/portal/utils/teleport-control.js +16 -0
  45. package/lib/commonjs/shared/components/boundary/portal/utils/teleport-control.js.map +1 -0
  46. package/lib/commonjs/shared/components/{create-boundary-component → boundary}/providers/boundary-owner.provider.js +26 -25
  47. package/lib/commonjs/shared/components/boundary/providers/boundary-owner.provider.js.map +1 -0
  48. package/lib/commonjs/shared/components/boundary/types.js.map +1 -0
  49. package/lib/commonjs/shared/components/boundary/utils/destination-signals.js +25 -0
  50. package/lib/commonjs/shared/components/boundary/utils/destination-signals.js.map +1 -0
  51. package/lib/commonjs/shared/components/{create-boundary-component → boundary}/utils/measured-bounds.js +19 -9
  52. package/lib/commonjs/shared/components/boundary/utils/measured-bounds.js.map +1 -0
  53. package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js +105 -0
  54. package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js.map +1 -0
  55. package/lib/commonjs/shared/components/boundary/utils/source-signals.js +48 -0
  56. package/lib/commonjs/shared/components/boundary/utils/source-signals.js.map +1 -0
  57. package/lib/commonjs/shared/components/create-transition-aware-component.js +8 -3
  58. package/lib/commonjs/shared/components/create-transition-aware-component.js.map +1 -1
  59. package/lib/commonjs/shared/components/{integrations/masked-view.js → masked-view.js} +2 -2
  60. package/lib/commonjs/shared/components/masked-view.js.map +1 -0
  61. package/lib/commonjs/shared/components/screen-container/layers/content.js +9 -5
  62. package/lib/commonjs/shared/components/screen-container/layers/content.js.map +1 -1
  63. package/lib/commonjs/shared/configs/presets.js +6 -6
  64. package/lib/commonjs/shared/configs/presets.js.map +1 -1
  65. package/lib/commonjs/shared/hooks/navigation/use-stack.js +17 -2
  66. package/lib/commonjs/shared/hooks/navigation/use-stack.js.map +1 -1
  67. package/lib/commonjs/shared/index.js +4 -4
  68. package/lib/commonjs/shared/index.js.map +1 -1
  69. package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js +4 -2
  70. package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
  71. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +4 -13
  72. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  73. package/lib/commonjs/shared/providers/screen/animation/helpers/stack-progress.js +23 -12
  74. package/lib/commonjs/shared/providers/screen/animation/helpers/stack-progress.js.map +1 -1
  75. package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js +1 -0
  76. package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -1
  77. package/lib/commonjs/shared/providers/screen/descriptors/descriptors.provider.js +7 -3
  78. package/lib/commonjs/shared/providers/screen/descriptors/descriptors.provider.js.map +1 -1
  79. package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js +8 -1
  80. package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js.map +1 -1
  81. package/lib/commonjs/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js +21 -6
  82. package/lib/commonjs/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js.map +1 -1
  83. package/lib/commonjs/shared/providers/screen/origin.provider.js +41 -0
  84. package/lib/commonjs/shared/providers/screen/origin.provider.js.map +1 -0
  85. package/lib/commonjs/shared/providers/screen/styles/constants.js +2 -0
  86. package/lib/commonjs/shared/providers/screen/styles/constants.js.map +1 -1
  87. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/are-resettable-states-equal.js +58 -0
  88. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/are-resettable-states-equal.js.map +1 -0
  89. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js +7 -0
  90. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js.map +1 -1
  91. package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +2 -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/styles.provider.js +7 -5
  94. package/lib/commonjs/shared/providers/screen/styles/styles.provider.js.map +1 -1
  95. package/lib/commonjs/shared/stores/animation.store.js +2 -0
  96. package/lib/commonjs/shared/stores/animation.store.js.map +1 -1
  97. package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js +1 -10
  98. package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -1
  99. package/lib/commonjs/shared/stores/bounds/index.js.map +1 -1
  100. package/lib/commonjs/shared/stores/bounds/internals/entries.js.map +1 -1
  101. package/lib/commonjs/shared/stores/bounds/internals/links.js +36 -19
  102. package/lib/commonjs/shared/stores/bounds/internals/links.js.map +1 -1
  103. package/lib/commonjs/shared/stores/bounds/internals/resolver.js +6 -4
  104. package/lib/commonjs/shared/stores/bounds/internals/resolver.js.map +1 -1
  105. package/lib/commonjs/shared/stores/bounds/internals/state.js.map +1 -1
  106. package/lib/commonjs/shared/stores/scroll.store.js +54 -1
  107. package/lib/commonjs/shared/stores/scroll.store.js.map +1 -1
  108. package/lib/commonjs/shared/utils/bounds/helpers/create-bound-tag.js +38 -4
  109. package/lib/commonjs/shared/utils/bounds/helpers/create-bound-tag.js.map +1 -1
  110. package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js +40 -87
  111. package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
  112. package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js +6 -67
  113. package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
  114. package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js +8 -12
  115. package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
  116. package/lib/commonjs/shared/utils/bounds/helpers/styles/composers.js +235 -68
  117. package/lib/commonjs/shared/utils/bounds/helpers/styles/composers.js.map +1 -1
  118. package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js +74 -4
  119. package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
  120. package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js +5 -9
  121. package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
  122. package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js +5 -10
  123. package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
  124. package/lib/module/blank-stack/components/stack-view.js +3 -2
  125. package/lib/module/blank-stack/components/stack-view.js.map +1 -1
  126. package/lib/module/shared/components/{create-boundary-component → boundary}/components/boundary-target.js +21 -8
  127. package/lib/module/shared/components/boundary/components/boundary-target.js.map +1 -0
  128. package/lib/module/shared/components/{create-boundary-component → boundary}/create-boundary-component.js +20 -26
  129. package/lib/module/shared/components/boundary/create-boundary-component.js.map +1 -0
  130. package/lib/module/shared/components/boundary/hooks/use-boundary-presence.js.map +1 -0
  131. package/lib/module/shared/components/boundary/hooks/use-initial-destination-measurement.js +110 -0
  132. package/lib/module/shared/components/boundary/hooks/use-initial-destination-measurement.js.map +1 -0
  133. package/lib/module/shared/components/{create-boundary-component → boundary}/hooks/use-initial-source-measurement.js +4 -5
  134. package/lib/module/shared/components/boundary/hooks/use-initial-source-measurement.js.map +1 -0
  135. package/lib/module/shared/components/{create-boundary-component → boundary}/hooks/use-measurer.js +27 -23
  136. package/lib/module/shared/components/boundary/hooks/use-measurer.js.map +1 -0
  137. package/lib/module/shared/components/{create-boundary-component → boundary}/hooks/use-refresh-boundary.js +10 -7
  138. package/lib/module/shared/components/boundary/hooks/use-refresh-boundary.js.map +1 -0
  139. package/lib/module/shared/components/{create-boundary-component → boundary}/index.js +8 -1
  140. package/lib/module/shared/components/boundary/index.js.map +1 -0
  141. package/lib/module/shared/components/boundary/portal/components/host.js +94 -0
  142. package/lib/module/shared/components/boundary/portal/components/host.js.map +1 -0
  143. package/lib/module/shared/components/boundary/portal/components/portal-boundary-host.js +69 -0
  144. package/lib/module/shared/components/boundary/portal/components/portal-boundary-host.js.map +1 -0
  145. package/lib/module/shared/components/boundary/portal/components/portal-provider.js +16 -0
  146. package/lib/module/shared/components/boundary/portal/components/portal-provider.js.map +1 -0
  147. package/lib/module/shared/components/boundary/portal/components/portal.js +193 -0
  148. package/lib/module/shared/components/boundary/portal/components/portal.js.map +1 -0
  149. package/lib/module/shared/components/boundary/portal/hooks/use-host-measurement.js +69 -0
  150. package/lib/module/shared/components/boundary/portal/hooks/use-host-measurement.js.map +1 -0
  151. package/lib/module/shared/components/boundary/portal/index.js +6 -0
  152. package/lib/module/shared/components/boundary/portal/index.js.map +1 -0
  153. package/lib/module/shared/components/boundary/portal/stores/host-bounds.store.js +40 -0
  154. package/lib/module/shared/components/boundary/portal/stores/host-bounds.store.js.map +1 -0
  155. package/lib/module/shared/components/boundary/portal/stores/host-registry.store.js +126 -0
  156. package/lib/module/shared/components/boundary/portal/stores/host-registry.store.js.map +1 -0
  157. package/lib/module/shared/components/boundary/portal/stores/portal-boundary-host.store.js +53 -0
  158. package/lib/module/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map +1 -0
  159. package/lib/module/shared/components/boundary/portal/teleport.js +19 -0
  160. package/lib/module/shared/components/boundary/portal/teleport.js.map +1 -0
  161. package/lib/module/shared/components/boundary/portal/utils/attachment.js +35 -0
  162. package/lib/module/shared/components/boundary/portal/utils/attachment.js.map +1 -0
  163. package/lib/module/shared/components/boundary/portal/utils/naming.js +10 -0
  164. package/lib/module/shared/components/boundary/portal/utils/naming.js.map +1 -0
  165. package/lib/module/shared/components/boundary/portal/utils/offset-style.js +66 -0
  166. package/lib/module/shared/components/boundary/portal/utils/offset-style.js.map +1 -0
  167. package/lib/module/shared/components/boundary/portal/utils/teleport-control.js +11 -0
  168. package/lib/module/shared/components/boundary/portal/utils/teleport-control.js.map +1 -0
  169. package/lib/module/shared/components/boundary/providers/boundary-owner.provider.js +60 -0
  170. package/lib/module/shared/components/boundary/providers/boundary-owner.provider.js.map +1 -0
  171. package/lib/module/shared/components/boundary/types.js.map +1 -0
  172. package/lib/module/shared/components/boundary/utils/destination-signals.js +20 -0
  173. package/lib/module/shared/components/boundary/utils/destination-signals.js.map +1 -0
  174. package/lib/module/shared/components/{create-boundary-component → boundary}/utils/measured-bounds.js +16 -7
  175. package/lib/module/shared/components/boundary/utils/measured-bounds.js.map +1 -0
  176. package/lib/module/shared/components/boundary/utils/refresh-signals.js +100 -0
  177. package/lib/module/shared/components/boundary/utils/refresh-signals.js.map +1 -0
  178. package/lib/module/shared/components/boundary/utils/source-signals.js +43 -0
  179. package/lib/module/shared/components/boundary/utils/source-signals.js.map +1 -0
  180. package/lib/module/shared/components/create-transition-aware-component.js +8 -3
  181. package/lib/module/shared/components/create-transition-aware-component.js.map +1 -1
  182. package/lib/module/shared/components/{integrations/masked-view.js → masked-view.js} +2 -2
  183. package/lib/module/shared/components/masked-view.js.map +1 -0
  184. package/lib/module/shared/components/screen-container/layers/content.js +10 -6
  185. package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
  186. package/lib/module/shared/configs/presets.js +6 -6
  187. package/lib/module/shared/configs/presets.js.map +1 -1
  188. package/lib/module/shared/hooks/navigation/use-stack.js +19 -4
  189. package/lib/module/shared/hooks/navigation/use-stack.js.map +1 -1
  190. package/lib/module/shared/index.js +2 -2
  191. package/lib/module/shared/index.js.map +1 -1
  192. package/lib/module/shared/providers/helpers/measured-bounds-writes.js +4 -2
  193. package/lib/module/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
  194. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +5 -14
  195. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  196. package/lib/module/shared/providers/screen/animation/helpers/stack-progress.js +20 -10
  197. package/lib/module/shared/providers/screen/animation/helpers/stack-progress.js.map +1 -1
  198. package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js +1 -0
  199. package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -1
  200. package/lib/module/shared/providers/screen/descriptors/descriptors.provider.js +8 -4
  201. package/lib/module/shared/providers/screen/descriptors/descriptors.provider.js.map +1 -1
  202. package/lib/module/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js +8 -1
  203. package/lib/module/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js.map +1 -1
  204. package/lib/module/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js +20 -6
  205. package/lib/module/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js.map +1 -1
  206. package/lib/module/shared/providers/screen/origin.provider.js +33 -0
  207. package/lib/module/shared/providers/screen/origin.provider.js.map +1 -0
  208. package/lib/module/shared/providers/screen/styles/constants.js +2 -0
  209. package/lib/module/shared/providers/screen/styles/constants.js.map +1 -1
  210. package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/are-resettable-states-equal.js +53 -0
  211. package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/are-resettable-states-equal.js.map +1 -0
  212. package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js +1 -0
  213. package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js.map +1 -1
  214. package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +2 -1
  215. package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
  216. package/lib/module/shared/providers/screen/styles/styles.provider.js +7 -5
  217. package/lib/module/shared/providers/screen/styles/styles.provider.js.map +1 -1
  218. package/lib/module/shared/stores/animation.store.js +2 -0
  219. package/lib/module/shared/stores/animation.store.js.map +1 -1
  220. package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js +1 -8
  221. package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -1
  222. package/lib/module/shared/stores/bounds/index.js.map +1 -1
  223. package/lib/module/shared/stores/bounds/internals/entries.js.map +1 -1
  224. package/lib/module/shared/stores/bounds/internals/links.js +36 -19
  225. package/lib/module/shared/stores/bounds/internals/links.js.map +1 -1
  226. package/lib/module/shared/stores/bounds/internals/resolver.js +6 -4
  227. package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -1
  228. package/lib/module/shared/stores/bounds/internals/state.js.map +1 -1
  229. package/lib/module/shared/stores/scroll.store.js +50 -0
  230. package/lib/module/shared/stores/scroll.store.js.map +1 -1
  231. package/lib/module/shared/types/animation.types.js.map +1 -1
  232. package/lib/module/shared/types/bounds.types.js.map +1 -1
  233. package/lib/module/shared/utils/bounds/helpers/create-bound-tag.js +36 -3
  234. package/lib/module/shared/utils/bounds/helpers/create-bound-tag.js.map +1 -1
  235. package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js +42 -89
  236. package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
  237. package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js +6 -67
  238. package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
  239. package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js +8 -13
  240. package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
  241. package/lib/module/shared/utils/bounds/helpers/styles/composers.js +236 -69
  242. package/lib/module/shared/utils/bounds/helpers/styles/composers.js.map +1 -1
  243. package/lib/module/shared/utils/bounds/helpers/styles/compute.js +74 -4
  244. package/lib/module/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
  245. package/lib/module/shared/utils/bounds/navigation/reveal/build.js +5 -9
  246. package/lib/module/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
  247. package/lib/module/shared/utils/bounds/navigation/zoom/build.js +5 -10
  248. package/lib/module/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
  249. package/lib/typescript/blank-stack/components/stack-view.d.ts.map +1 -1
  250. package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts.map +1 -0
  251. package/lib/typescript/shared/components/boundary/create-boundary-component.d.ts.map +1 -0
  252. package/lib/typescript/shared/components/boundary/hooks/use-boundary-presence.d.ts.map +1 -0
  253. package/lib/typescript/shared/components/{create-boundary-component → boundary}/hooks/use-initial-destination-measurement.d.ts +1 -4
  254. package/lib/typescript/shared/components/boundary/hooks/use-initial-destination-measurement.d.ts.map +1 -0
  255. package/lib/typescript/shared/components/{create-boundary-component → boundary}/hooks/use-initial-source-measurement.d.ts +0 -2
  256. package/lib/typescript/shared/components/boundary/hooks/use-initial-source-measurement.d.ts.map +1 -0
  257. package/lib/typescript/shared/components/{create-boundary-component → boundary}/hooks/use-measurer.d.ts +4 -2
  258. package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts.map +1 -0
  259. package/lib/typescript/shared/components/boundary/hooks/use-refresh-boundary.d.ts +10 -0
  260. package/lib/typescript/shared/components/boundary/hooks/use-refresh-boundary.d.ts.map +1 -0
  261. package/lib/typescript/shared/components/{create-boundary-component → boundary}/index.d.ts +8 -2
  262. package/lib/typescript/shared/components/boundary/index.d.ts.map +1 -0
  263. package/lib/typescript/shared/components/boundary/portal/components/host.d.ts +7 -0
  264. package/lib/typescript/shared/components/boundary/portal/components/host.d.ts.map +1 -0
  265. package/lib/typescript/shared/components/boundary/portal/components/portal-boundary-host.d.ts +9 -0
  266. package/lib/typescript/shared/components/boundary/portal/components/portal-boundary-host.d.ts.map +1 -0
  267. package/lib/typescript/shared/components/boundary/portal/components/portal-provider.d.ts +4 -0
  268. package/lib/typescript/shared/components/boundary/portal/components/portal-provider.d.ts.map +1 -0
  269. package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts +19 -0
  270. package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts.map +1 -0
  271. package/lib/typescript/shared/components/boundary/portal/hooks/use-host-measurement.d.ts +13 -0
  272. package/lib/typescript/shared/components/boundary/portal/hooks/use-host-measurement.d.ts.map +1 -0
  273. package/lib/typescript/shared/components/boundary/portal/index.d.ts +4 -0
  274. package/lib/typescript/shared/components/boundary/portal/index.d.ts.map +1 -0
  275. package/lib/typescript/shared/components/boundary/portal/stores/host-bounds.store.d.ts +9 -0
  276. package/lib/typescript/shared/components/boundary/portal/stores/host-bounds.store.d.ts.map +1 -0
  277. package/lib/typescript/shared/components/boundary/portal/stores/host-registry.store.d.ts +19 -0
  278. package/lib/typescript/shared/components/boundary/portal/stores/host-registry.store.d.ts.map +1 -0
  279. package/lib/typescript/shared/components/boundary/portal/stores/portal-boundary-host.store.d.ts +11 -0
  280. package/lib/typescript/shared/components/boundary/portal/stores/portal-boundary-host.store.d.ts.map +1 -0
  281. package/lib/typescript/shared/components/boundary/portal/teleport.d.ts +6 -0
  282. package/lib/typescript/shared/components/boundary/portal/teleport.d.ts.map +1 -0
  283. package/lib/typescript/shared/components/boundary/portal/utils/attachment.d.ts +21 -0
  284. package/lib/typescript/shared/components/boundary/portal/utils/attachment.d.ts.map +1 -0
  285. package/lib/typescript/shared/components/boundary/portal/utils/naming.d.ts +3 -0
  286. package/lib/typescript/shared/components/boundary/portal/utils/naming.d.ts.map +1 -0
  287. package/lib/typescript/shared/components/boundary/portal/utils/offset-style.d.ts +37 -0
  288. package/lib/typescript/shared/components/boundary/portal/utils/offset-style.d.ts.map +1 -0
  289. package/lib/typescript/shared/components/boundary/portal/utils/teleport-control.d.ts +3 -0
  290. package/lib/typescript/shared/components/boundary/portal/utils/teleport-control.d.ts.map +1 -0
  291. package/lib/typescript/shared/components/{create-boundary-component → boundary}/providers/boundary-owner.provider.d.ts +14 -6
  292. package/lib/typescript/shared/components/boundary/providers/boundary-owner.provider.d.ts.map +1 -0
  293. package/lib/typescript/shared/components/boundary/types.d.ts +78 -0
  294. package/lib/typescript/shared/components/boundary/types.d.ts.map +1 -0
  295. package/lib/typescript/shared/components/{create-boundary-component → boundary}/utils/destination-signals.d.ts +2 -3
  296. package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts.map +1 -0
  297. package/lib/typescript/shared/components/boundary/utils/measured-bounds.d.ts +12 -0
  298. package/lib/typescript/shared/components/boundary/utils/measured-bounds.d.ts.map +1 -0
  299. package/lib/typescript/shared/components/{create-boundary-component → boundary}/utils/refresh-signals.d.ts +4 -3
  300. package/lib/typescript/shared/components/boundary/utils/refresh-signals.d.ts.map +1 -0
  301. package/lib/typescript/shared/components/{create-boundary-component → boundary}/utils/source-signals.d.ts +1 -2
  302. package/lib/typescript/shared/components/boundary/utils/source-signals.d.ts.map +1 -0
  303. package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -1
  304. package/lib/typescript/shared/components/masked-view.d.ts.map +1 -0
  305. package/lib/typescript/shared/components/screen-container/layers/content.d.ts.map +1 -1
  306. package/lib/typescript/shared/configs/presets.d.ts.map +1 -1
  307. package/lib/typescript/shared/hooks/navigation/use-stack.d.ts.map +1 -1
  308. package/lib/typescript/shared/index.d.ts +19 -17
  309. package/lib/typescript/shared/index.d.ts.map +1 -1
  310. package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts +3 -1
  311. package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts.map +1 -1
  312. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/types.d.ts +1 -0
  313. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/types.d.ts.map +1 -1
  314. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
  315. package/lib/typescript/shared/providers/screen/animation/helpers/stack-progress.d.ts +2 -1
  316. package/lib/typescript/shared/providers/screen/animation/helpers/stack-progress.d.ts.map +1 -1
  317. package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts +1 -0
  318. package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts.map +1 -1
  319. package/lib/typescript/shared/providers/screen/descriptors/descriptors.provider.d.ts.map +1 -1
  320. package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.d.ts +6 -1
  321. package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.d.ts.map +1 -1
  322. package/lib/typescript/shared/providers/screen/descriptors/helpers/get-ancestor-keys.d.ts +9 -3
  323. package/lib/typescript/shared/providers/screen/descriptors/helpers/get-ancestor-keys.d.ts.map +1 -1
  324. package/lib/typescript/shared/providers/screen/origin.provider.d.ts +11 -0
  325. package/lib/typescript/shared/providers/screen/origin.provider.d.ts.map +1 -0
  326. package/lib/typescript/shared/providers/screen/styles/constants.d.ts.map +1 -1
  327. package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/are-resettable-states-equal.d.ts +3 -0
  328. package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/are-resettable-states-equal.d.ts.map +1 -0
  329. package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/index.d.ts +1 -0
  330. package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/index.d.ts.map +1 -1
  331. package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts +1 -0
  332. package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts.map +1 -1
  333. package/lib/typescript/shared/providers/screen/styles/styles.provider.d.ts +1 -0
  334. package/lib/typescript/shared/providers/screen/styles/styles.provider.d.ts.map +1 -1
  335. package/lib/typescript/shared/stores/animation.store.d.ts +1 -0
  336. package/lib/typescript/shared/stores/animation.store.d.ts.map +1 -1
  337. package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts +1 -3
  338. package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts.map +1 -1
  339. package/lib/typescript/shared/stores/bounds/index.d.ts +1 -1
  340. package/lib/typescript/shared/stores/bounds/index.d.ts.map +1 -1
  341. package/lib/typescript/shared/stores/bounds/internals/entries.d.ts +2 -2
  342. package/lib/typescript/shared/stores/bounds/internals/entries.d.ts.map +1 -1
  343. package/lib/typescript/shared/stores/bounds/internals/links.d.ts +2 -2
  344. package/lib/typescript/shared/stores/bounds/internals/links.d.ts.map +1 -1
  345. package/lib/typescript/shared/stores/bounds/internals/resolver.d.ts.map +1 -1
  346. package/lib/typescript/shared/stores/bounds/internals/state.d.ts +4 -2
  347. package/lib/typescript/shared/stores/bounds/internals/state.d.ts.map +1 -1
  348. package/lib/typescript/shared/stores/bounds/types.d.ts +47 -12
  349. package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
  350. package/lib/typescript/shared/stores/scroll.store.d.ts +12 -1
  351. package/lib/typescript/shared/stores/scroll.store.d.ts.map +1 -1
  352. package/lib/typescript/shared/types/animation.types.d.ts +13 -2
  353. package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
  354. package/lib/typescript/shared/types/bounds.types.d.ts +10 -40
  355. package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
  356. package/lib/typescript/shared/types/index.d.ts +2 -2
  357. package/lib/typescript/shared/types/index.d.ts.map +1 -1
  358. package/lib/typescript/shared/utils/bounds/helpers/create-bound-tag.d.ts +2 -1
  359. package/lib/typescript/shared/utils/bounds/helpers/create-bound-tag.d.ts.map +1 -1
  360. package/lib/typescript/shared/utils/bounds/helpers/create-bounds-accessor-core.d.ts +7 -11
  361. package/lib/typescript/shared/utils/bounds/helpers/create-bounds-accessor-core.d.ts.map +1 -1
  362. package/lib/typescript/shared/utils/bounds/helpers/create-link-accessor.d.ts +0 -3
  363. package/lib/typescript/shared/utils/bounds/helpers/create-link-accessor.d.ts.map +1 -1
  364. package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts +7 -3
  365. package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts.map +1 -1
  366. package/lib/typescript/shared/utils/bounds/helpers/styles/composers.d.ts +3 -0
  367. package/lib/typescript/shared/utils/bounds/helpers/styles/composers.d.ts.map +1 -1
  368. package/lib/typescript/shared/utils/bounds/helpers/styles/compute.d.ts +1 -1
  369. package/lib/typescript/shared/utils/bounds/helpers/styles/compute.d.ts.map +1 -1
  370. package/lib/typescript/shared/utils/bounds/navigation/reveal/build.d.ts.map +1 -1
  371. package/lib/typescript/shared/utils/bounds/navigation/zoom/build.d.ts.map +1 -1
  372. package/lib/typescript/shared/utils/bounds/types/options.d.ts +93 -6
  373. package/lib/typescript/shared/utils/bounds/types/options.d.ts.map +1 -1
  374. package/package.json +8 -2
  375. package/src/blank-stack/components/stack-view.tsx +4 -3
  376. package/src/shared/components/{create-boundary-component → boundary}/components/boundary-target.tsx +28 -11
  377. package/src/shared/components/{create-boundary-component → boundary}/create-boundary-component.tsx +33 -31
  378. package/src/shared/components/boundary/hooks/use-initial-destination-measurement.ts +156 -0
  379. package/src/shared/components/{create-boundary-component → boundary}/hooks/use-initial-source-measurement.ts +5 -14
  380. package/src/shared/components/{create-boundary-component → boundary}/hooks/use-measurer.ts +42 -46
  381. package/src/shared/components/{create-boundary-component → boundary}/hooks/use-refresh-boundary.ts +16 -11
  382. package/src/shared/components/{create-boundary-component → boundary}/index.tsx +12 -0
  383. package/src/shared/components/boundary/portal/components/host.tsx +114 -0
  384. package/src/shared/components/boundary/portal/components/portal-boundary-host.tsx +97 -0
  385. package/src/shared/components/boundary/portal/components/portal-provider.tsx +14 -0
  386. package/src/shared/components/boundary/portal/components/portal.tsx +283 -0
  387. package/src/shared/components/boundary/portal/hooks/use-host-measurement.ts +102 -0
  388. package/src/shared/components/boundary/portal/index.ts +3 -0
  389. package/src/shared/components/boundary/portal/stores/host-bounds.store.ts +45 -0
  390. package/src/shared/components/boundary/portal/stores/host-registry.store.ts +182 -0
  391. package/src/shared/components/boundary/portal/stores/portal-boundary-host.store.ts +91 -0
  392. package/src/shared/components/boundary/portal/teleport.ts +21 -0
  393. package/src/shared/components/boundary/portal/utils/attachment.ts +48 -0
  394. package/src/shared/components/boundary/portal/utils/naming.ts +10 -0
  395. package/src/shared/components/boundary/portal/utils/offset-style.ts +171 -0
  396. package/src/shared/components/boundary/portal/utils/teleport-control.ts +13 -0
  397. package/src/shared/components/{create-boundary-component → boundary}/providers/boundary-owner.provider.tsx +41 -33
  398. package/src/shared/components/boundary/types.ts +92 -0
  399. package/src/shared/components/boundary/utils/destination-signals.ts +31 -0
  400. package/src/shared/components/{create-boundary-component → boundary}/utils/measured-bounds.ts +34 -11
  401. package/src/shared/components/boundary/utils/refresh-signals.ts +175 -0
  402. package/src/shared/components/boundary/utils/source-signals.ts +63 -0
  403. package/src/shared/components/create-transition-aware-component.tsx +8 -3
  404. package/src/shared/components/{integrations/masked-view.tsx → masked-view.tsx} +2 -2
  405. package/src/shared/components/screen-container/layers/content.tsx +12 -7
  406. package/src/shared/configs/presets.ts +2 -6
  407. package/src/shared/hooks/navigation/use-stack.tsx +32 -1
  408. package/src/shared/index.ts +13 -5
  409. package/src/shared/providers/helpers/measured-bounds-writes.ts +11 -1
  410. package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/types.ts +1 -0
  411. package/src/shared/providers/screen/animation/helpers/pipeline.ts +13 -19
  412. package/src/shared/providers/screen/animation/helpers/stack-progress.ts +31 -16
  413. package/src/shared/providers/screen/animation/helpers/use-build-transition-state.ts +2 -0
  414. package/src/shared/providers/screen/descriptors/descriptors.provider.tsx +7 -3
  415. package/src/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.ts +16 -0
  416. package/src/shared/providers/screen/descriptors/helpers/get-ancestor-keys.ts +31 -6
  417. package/src/shared/providers/screen/origin.provider.tsx +38 -0
  418. package/src/shared/providers/screen/styles/constants.ts +2 -0
  419. package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/are-resettable-states-equal.ts +74 -0
  420. package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/index.ts +1 -0
  421. package/src/shared/providers/screen/styles/hooks/use-maybe-block-visibility.tsx +1 -0
  422. package/src/shared/providers/screen/styles/styles.provider.tsx +5 -3
  423. package/src/shared/stores/animation.store.ts +3 -0
  424. package/src/shared/stores/bounds/helpers/link-pairs.helpers.ts +1 -10
  425. package/src/shared/stores/bounds/index.ts +2 -4
  426. package/src/shared/stores/bounds/internals/entries.ts +4 -4
  427. package/src/shared/stores/bounds/internals/links.ts +52 -18
  428. package/src/shared/stores/bounds/internals/resolver.ts +5 -3
  429. package/src/shared/stores/bounds/internals/state.ts +5 -2
  430. package/src/shared/stores/bounds/types.ts +59 -15
  431. package/src/shared/stores/scroll.store.ts +68 -0
  432. package/src/shared/types/animation.types.ts +17 -2
  433. package/src/shared/types/bounds.types.ts +22 -60
  434. package/src/shared/types/index.ts +5 -0
  435. package/src/shared/utils/bounds/helpers/create-bound-tag.ts +46 -4
  436. package/src/shared/utils/bounds/helpers/create-bounds-accessor-core.ts +65 -116
  437. package/src/shared/utils/bounds/helpers/create-link-accessor.ts +10 -80
  438. package/src/shared/utils/bounds/helpers/prepare-bound-styles.ts +10 -13
  439. package/src/shared/utils/bounds/helpers/styles/composers.ts +269 -46
  440. package/src/shared/utils/bounds/helpers/styles/compute.ts +134 -2
  441. package/src/shared/utils/bounds/navigation/reveal/build.ts +5 -7
  442. package/src/shared/utils/bounds/navigation/zoom/build.ts +5 -8
  443. package/src/shared/utils/bounds/types/options.ts +105 -6
  444. package/lib/commonjs/shared/components/create-boundary-component/components/boundary-target.js.map +0 -1
  445. package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js.map +0 -1
  446. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +0 -1
  447. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js +0 -99
  448. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js.map +0 -1
  449. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js.map +0 -1
  450. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-measurer.js.map +0 -1
  451. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map +0 -1
  452. package/lib/commonjs/shared/components/create-boundary-component/index.js.map +0 -1
  453. package/lib/commonjs/shared/components/create-boundary-component/providers/boundary-owner.provider.js.map +0 -1
  454. package/lib/commonjs/shared/components/create-boundary-component/types.js.map +0 -1
  455. package/lib/commonjs/shared/components/create-boundary-component/utils/destination-signals.js +0 -75
  456. package/lib/commonjs/shared/components/create-boundary-component/utils/destination-signals.js.map +0 -1
  457. package/lib/commonjs/shared/components/create-boundary-component/utils/measured-bounds.js.map +0 -1
  458. package/lib/commonjs/shared/components/create-boundary-component/utils/refresh-signals.js +0 -103
  459. package/lib/commonjs/shared/components/create-boundary-component/utils/refresh-signals.js.map +0 -1
  460. package/lib/commonjs/shared/components/create-boundary-component/utils/source-signals.js +0 -52
  461. package/lib/commonjs/shared/components/create-boundary-component/utils/source-signals.js.map +0 -1
  462. package/lib/commonjs/shared/components/integrations/masked-view.js.map +0 -1
  463. package/lib/commonjs/shared/utils/bounds/helpers/create-interpolators.js +0 -68
  464. package/lib/commonjs/shared/utils/bounds/helpers/create-interpolators.js.map +0 -1
  465. package/lib/commonjs/shared/utils/bounds/helpers/styles/interpolate-link-style.js +0 -30
  466. package/lib/commonjs/shared/utils/bounds/helpers/styles/interpolate-link-style.js.map +0 -1
  467. package/lib/module/shared/components/create-boundary-component/components/boundary-target.js.map +0 -1
  468. package/lib/module/shared/components/create-boundary-component/create-boundary-component.js.map +0 -1
  469. package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +0 -1
  470. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js +0 -94
  471. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js.map +0 -1
  472. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js.map +0 -1
  473. package/lib/module/shared/components/create-boundary-component/hooks/use-measurer.js.map +0 -1
  474. package/lib/module/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map +0 -1
  475. package/lib/module/shared/components/create-boundary-component/index.js.map +0 -1
  476. package/lib/module/shared/components/create-boundary-component/providers/boundary-owner.provider.js +0 -60
  477. package/lib/module/shared/components/create-boundary-component/providers/boundary-owner.provider.js.map +0 -1
  478. package/lib/module/shared/components/create-boundary-component/types.js.map +0 -1
  479. package/lib/module/shared/components/create-boundary-component/utils/destination-signals.js +0 -70
  480. package/lib/module/shared/components/create-boundary-component/utils/destination-signals.js.map +0 -1
  481. package/lib/module/shared/components/create-boundary-component/utils/measured-bounds.js.map +0 -1
  482. package/lib/module/shared/components/create-boundary-component/utils/refresh-signals.js +0 -98
  483. package/lib/module/shared/components/create-boundary-component/utils/refresh-signals.js.map +0 -1
  484. package/lib/module/shared/components/create-boundary-component/utils/source-signals.js +0 -47
  485. package/lib/module/shared/components/create-boundary-component/utils/source-signals.js.map +0 -1
  486. package/lib/module/shared/components/integrations/masked-view.js.map +0 -1
  487. package/lib/module/shared/utils/bounds/helpers/create-interpolators.js +0 -63
  488. package/lib/module/shared/utils/bounds/helpers/create-interpolators.js.map +0 -1
  489. package/lib/module/shared/utils/bounds/helpers/styles/interpolate-link-style.js +0 -26
  490. package/lib/module/shared/utils/bounds/helpers/styles/interpolate-link-style.js.map +0 -1
  491. package/lib/typescript/shared/components/create-boundary-component/components/boundary-target.d.ts.map +0 -1
  492. package/lib/typescript/shared/components/create-boundary-component/create-boundary-component.d.ts.map +0 -1
  493. package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-presence.d.ts.map +0 -1
  494. package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.d.ts.map +0 -1
  495. package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-source-measurement.d.ts.map +0 -1
  496. package/lib/typescript/shared/components/create-boundary-component/hooks/use-measurer.d.ts.map +0 -1
  497. package/lib/typescript/shared/components/create-boundary-component/hooks/use-refresh-boundary.d.ts +0 -14
  498. package/lib/typescript/shared/components/create-boundary-component/hooks/use-refresh-boundary.d.ts.map +0 -1
  499. package/lib/typescript/shared/components/create-boundary-component/index.d.ts.map +0 -1
  500. package/lib/typescript/shared/components/create-boundary-component/providers/boundary-owner.provider.d.ts.map +0 -1
  501. package/lib/typescript/shared/components/create-boundary-component/types.d.ts +0 -37
  502. package/lib/typescript/shared/components/create-boundary-component/types.d.ts.map +0 -1
  503. package/lib/typescript/shared/components/create-boundary-component/utils/destination-signals.d.ts.map +0 -1
  504. package/lib/typescript/shared/components/create-boundary-component/utils/measured-bounds.d.ts +0 -8
  505. package/lib/typescript/shared/components/create-boundary-component/utils/measured-bounds.d.ts.map +0 -1
  506. package/lib/typescript/shared/components/create-boundary-component/utils/refresh-signals.d.ts.map +0 -1
  507. package/lib/typescript/shared/components/create-boundary-component/utils/source-signals.d.ts.map +0 -1
  508. package/lib/typescript/shared/components/integrations/masked-view.d.ts.map +0 -1
  509. package/lib/typescript/shared/utils/bounds/helpers/create-interpolators.d.ts +0 -14
  510. package/lib/typescript/shared/utils/bounds/helpers/create-interpolators.d.ts.map +0 -1
  511. package/lib/typescript/shared/utils/bounds/helpers/styles/interpolate-link-style.d.ts +0 -17
  512. package/lib/typescript/shared/utils/bounds/helpers/styles/interpolate-link-style.d.ts.map +0 -1
  513. package/src/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.ts +0 -130
  514. package/src/shared/components/create-boundary-component/types.ts +0 -48
  515. package/src/shared/components/create-boundary-component/utils/destination-signals.ts +0 -129
  516. package/src/shared/components/create-boundary-component/utils/refresh-signals.ts +0 -164
  517. package/src/shared/components/create-boundary-component/utils/source-signals.ts +0 -72
  518. package/src/shared/utils/bounds/helpers/create-interpolators.ts +0 -117
  519. package/src/shared/utils/bounds/helpers/styles/interpolate-link-style.ts +0 -43
  520. /package/lib/commonjs/shared/components/{create-boundary-component → boundary}/hooks/use-boundary-presence.js +0 -0
  521. /package/lib/commonjs/shared/components/{create-boundary-component → boundary}/types.js +0 -0
  522. /package/lib/module/shared/components/{create-boundary-component → boundary}/hooks/use-boundary-presence.js +0 -0
  523. /package/lib/module/shared/components/{create-boundary-component → boundary}/types.js +0 -0
  524. /package/lib/typescript/shared/components/{create-boundary-component → boundary}/components/boundary-target.d.ts +0 -0
  525. /package/lib/typescript/shared/components/{create-boundary-component → boundary}/create-boundary-component.d.ts +0 -0
  526. /package/lib/typescript/shared/components/{create-boundary-component → boundary}/hooks/use-boundary-presence.d.ts +0 -0
  527. /package/lib/typescript/shared/components/{integrations/masked-view.d.ts → masked-view.d.ts} +0 -0
  528. /package/src/shared/components/{create-boundary-component → boundary}/hooks/use-boundary-presence.ts +0 -0
@@ -0,0 +1,137 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useActiveHostKey = exports.unregisterHost = exports.resetHostRegistry = exports.registerHost = exports.getHostCapturesScroll = exports.getActiveScrollHost = exports.getActiveHostKey = void 0;
7
+ var _react = require("react");
8
+ var _reactNativeReanimated = require("react-native-reanimated");
9
+ const EMPTY_SNAPSHOT = {};
10
+ const listeners = new Set();
11
+ const hostStacks = new Map();
12
+ let snapshot = EMPTY_SNAPSHOT;
13
+
14
+ /**
15
+ * UI-readable mirror of each screen's active host, kept only for hosts that
16
+ * capture scroll. Measurement worklets read it to record which scroll-scoped
17
+ * host a source boundary originated from — at measure time, without any React
18
+ * subscription on the boundary itself.
19
+ */
20
+ const activeScrollHosts = (0, _reactNativeReanimated.makeMutable)({});
21
+ const getActiveHostFromStack = (screenKey, stack) => {
22
+ if (!stack || stack.length === 0) {
23
+ return screenKey;
24
+ }
25
+ for (let index = stack.length - 1; index >= 0; index--) {
26
+ const host = stack[index];
27
+ if (!host.fallback) {
28
+ return host.hostKey;
29
+ }
30
+ }
31
+ return stack[0]?.hostKey ?? screenKey;
32
+ };
33
+ const buildSnapshot = () => {
34
+ const nextSnapshot = {};
35
+ for (const [screenKey, stack] of hostStacks) {
36
+ nextSnapshot[screenKey] = getActiveHostFromStack(screenKey, stack);
37
+ }
38
+ return nextSnapshot;
39
+ };
40
+ const buildScrollHostSnapshot = () => {
41
+ const nextSnapshot = {};
42
+ for (const [screenKey, stack] of hostStacks) {
43
+ const activeHostKey = getActiveHostFromStack(screenKey, stack);
44
+ const activeHost = stack.find(host => host.hostKey === activeHostKey);
45
+ if (activeHost?.capturesScroll) {
46
+ nextSnapshot[screenKey] = {
47
+ hostKey: activeHost.hostKey,
48
+ capturesScroll: true
49
+ };
50
+ }
51
+ }
52
+ return nextSnapshot;
53
+ };
54
+ const emit = () => {
55
+ snapshot = buildSnapshot();
56
+ activeScrollHosts.set(buildScrollHostSnapshot());
57
+ for (const listener of listeners) {
58
+ listener();
59
+ }
60
+ };
61
+ const subscribe = listener => {
62
+ listeners.add(listener);
63
+ return () => {
64
+ listeners.delete(listener);
65
+ };
66
+ };
67
+ const registerHost = registration => {
68
+ const stack = hostStacks.get(registration.screenKey) ?? [];
69
+ const previousActiveHostKey = getActiveHostFromStack(registration.screenKey, stack);
70
+ const nextStack = stack.filter(host => host.hostKey !== registration.hostKey);
71
+ if (registration.fallback) {
72
+ nextStack.unshift(registration);
73
+ } else {
74
+ nextStack.push(registration);
75
+ }
76
+ hostStacks.set(registration.screenKey, nextStack);
77
+ if (previousActiveHostKey === getActiveHostFromStack(registration.screenKey, nextStack)) {
78
+ return;
79
+ }
80
+ emit();
81
+ };
82
+ exports.registerHost = registerHost;
83
+ const unregisterHost = (screenKey, hostKey) => {
84
+ const stack = hostStacks.get(screenKey);
85
+ if (!stack) {
86
+ return;
87
+ }
88
+ const previousActiveHostKey = getActiveHostFromStack(screenKey, stack);
89
+ const nextStack = stack.filter(host => host.hostKey !== hostKey);
90
+ if (nextStack.length === 0) {
91
+ hostStacks.delete(screenKey);
92
+ } else {
93
+ hostStacks.set(screenKey, nextStack);
94
+ }
95
+ if (previousActiveHostKey === getActiveHostFromStack(screenKey, nextStack)) {
96
+ return;
97
+ }
98
+ emit();
99
+ };
100
+ exports.unregisterHost = unregisterHost;
101
+ const getActiveHostKey = screenKey => {
102
+ return snapshot[screenKey] ?? screenKey;
103
+ };
104
+
105
+ /**
106
+ * The screen's active host, if it captures scroll. Worklet-safe: measurement
107
+ * code calls this on the UI thread while writing source bounds.
108
+ */
109
+ exports.getActiveHostKey = getActiveHostKey;
110
+ const getActiveScrollHost = screenKey => {
111
+ "worklet";
112
+
113
+ return activeScrollHosts.get()[screenKey] ?? null;
114
+ };
115
+ exports.getActiveScrollHost = getActiveScrollHost;
116
+ const getHostCapturesScroll = hostKey => {
117
+ for (const stack of hostStacks.values()) {
118
+ const host = stack.find(registration => registration.hostKey === hostKey);
119
+ if (host) {
120
+ return host.capturesScroll;
121
+ }
122
+ }
123
+ return false;
124
+ };
125
+ exports.getHostCapturesScroll = getHostCapturesScroll;
126
+ const useActiveHostKey = screenKey => {
127
+ return (0, _react.useSyncExternalStore)(subscribe, () => screenKey ? getActiveHostKey(screenKey) : undefined, () => undefined);
128
+ };
129
+ exports.useActiveHostKey = useActiveHostKey;
130
+ const resetHostRegistry = () => {
131
+ hostStacks.clear();
132
+ snapshot = EMPTY_SNAPSHOT;
133
+ activeScrollHosts.set({});
134
+ emit();
135
+ };
136
+ exports.resetHostRegistry = resetHostRegistry;
137
+ //# sourceMappingURL=host-registry.store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNativeReanimated","EMPTY_SNAPSHOT","listeners","Set","hostStacks","Map","snapshot","activeScrollHosts","makeMutable","getActiveHostFromStack","screenKey","stack","length","index","host","fallback","hostKey","buildSnapshot","nextSnapshot","buildScrollHostSnapshot","activeHostKey","activeHost","find","capturesScroll","emit","set","listener","subscribe","add","delete","registerHost","registration","get","previousActiveHostKey","nextStack","filter","unshift","push","exports","unregisterHost","getActiveHostKey","getActiveScrollHost","getHostCapturesScroll","values","useActiveHostKey","useSyncExternalStore","undefined","resetHostRegistry","clear"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/stores/host-registry.store.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AAYA,MAAME,cAAoC,GAAG,CAAC,CAAC;AAE/C,MAAMC,SAAS,GAAG,IAAIC,GAAG,CAAa,CAAC;AACvC,MAAMC,UAAU,GAAG,IAAIC,GAAG,CAA6B,CAAC;AAExD,IAAIC,QAA8B,GAAGL,cAAc;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA,MAAMM,iBAAiB,GAAG,IAAAC,kCAAW,EAAgC,CAAC,CAAC,CAAC;AAExE,MAAMC,sBAAsB,GAAGA,CAC9BC,SAAiB,EACjBC,KAAqC,KACjC;EACJ,IAAI,CAACA,KAAK,IAAIA,KAAK,CAACC,MAAM,KAAK,CA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BAAgB,GAAIlC,SAAyB,IAAK;EAC9D,OAAO,IAAAmC,2BAAoB,EAC1BlB,SAAS,EACT,MAAOjB,SAAS,GAAG8B,gBAAgB,CAAC9B,SAAS,CAAC,GAAGoC,SAAU,EAC3D,MAAMA,SACP,CAAC;AACF,CAAC;AAACR,OAAA,CAAAM,gBAAA,GAAAA,gBAAA;AAEK,MAAMG,iBAAiB,GAAGA,CAAA,KAAM;EACtC3C,UAAU,CAAC4C,KAAK,CAAC,CAAC;EAClB1C,QAAQ,GAAGL,cAAc;EACzBM,iBAAiB,CAACkB,GAAG,CAAC,CAAC,CAAC,CAAC;EACzBD,IAAI,CAAC,CAAC;AACP,CAAC;AAACc,OAAA,CAAAS,iBAAA,GAAAA,iBAAA","ignoreList":[]}
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useActivePortalBoundaryHosts = exports.unmountPortalBoundaryHost = exports.mountPortalBoundaryHost = void 0;
7
+ var _react = require("react");
8
+ const EMPTY_HOSTS = [];
9
+ const listeners = new Set();
10
+ const activeBoundaryHosts = new Map();
11
+ let snapshot = {
12
+ hostsByScope: {}
13
+ };
14
+ const buildSnapshot = () => {
15
+ const hostsByScope = {};
16
+ for (const host of activeBoundaryHosts.values()) {
17
+ const hosts = hostsByScope[host.hostKey] ?? [];
18
+ hosts.push(host);
19
+ hostsByScope[host.hostKey] = hosts;
20
+ }
21
+ return {
22
+ hostsByScope
23
+ };
24
+ };
25
+ const emit = () => {
26
+ snapshot = buildSnapshot();
27
+ for (const listener of listeners) {
28
+ listener();
29
+ }
30
+ };
31
+ const isSameHost = (a, b) => {
32
+ return a.boundaryId === b.boundaryId && a.capturesScroll === b.capturesScroll && a.hostKey === b.hostKey && a.pairKey === b.pairKey && a.screenKey === b.screenKey;
33
+ };
34
+ const mountPortalBoundaryHost = host => {
35
+ const previous = activeBoundaryHosts.get(host.boundaryId);
36
+ if (previous && isSameHost(previous, host)) {
37
+ return;
38
+ }
39
+ activeBoundaryHosts.set(host.boundaryId, host);
40
+ emit();
41
+ };
42
+ exports.mountPortalBoundaryHost = mountPortalBoundaryHost;
43
+ const unmountPortalBoundaryHost = boundaryId => {
44
+ if (!activeBoundaryHosts.delete(boundaryId)) {
45
+ return;
46
+ }
47
+ emit();
48
+ };
49
+ exports.unmountPortalBoundaryHost = unmountPortalBoundaryHost;
50
+ const subscribe = listener => {
51
+ listeners.add(listener);
52
+ return () => {
53
+ listeners.delete(listener);
54
+ };
55
+ };
56
+ const useActivePortalBoundaryHosts = hostKey => {
57
+ return (0, _react.useSyncExternalStore)(subscribe, () => snapshot.hostsByScope[hostKey] ?? EMPTY_HOSTS, () => EMPTY_HOSTS);
58
+ };
59
+ exports.useActivePortalBoundaryHosts = useActivePortalBoundaryHosts;
60
+ //# sourceMappingURL=portal-boundary-host.store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","EMPTY_HOSTS","listeners","Set","activeBoundaryHosts","Map","snapshot","hostsByScope","buildSnapshot","host","values","hosts","hostKey","push","emit","listener","isSameHost","a","b","boundaryId","capturesScroll","pairKey","screenKey","mountPortalBoundaryHost","previous","get","set","exports","unmountPortalBoundaryHost","delete","subscribe","add","useActivePortalBoundaryHosts","useSyncExternalStore"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/stores/portal-boundary-host.store.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAcA,MAAMC,WAAuC,GAAG,EAAE;AAElD,MAAMC,SAAS,GAAG,IAAIC,GAAG,CAAa,CAAC;AACvC,MAAMC,mBAAmB,GAAG,IAAIC,GAAG,CAAmC,CAAC;AAEvE,IAAIC,QAAwB,GAAG;EAC9BC,YAAY,EAAE,CAAC;AAChB,CAAC;AAED,MAAMC,aAAa,GAAGA,CAAA,KAAsB;EAC3C,MAAMD,YAAwD,GAAG,CAAC,CAAC;EAEnE,KAAK,MAAME,IAAI,IAAIL,mBA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C5C;EACD;EAEAL,IAAI,CAAC,CAAC;AACP,CAAC;AAACa,OAAA,CAAAC,yBAAA,GAAAA,yBAAA;AAEF,MAAME,SAAS,GAAIf,QAAoB,IAAK;EAC3Cb,SAAS,CAAC6B,GAAG,CAAChB,QAAQ,CAAC;EAEvB,OAAO,MAAM;IACZb,SAAS,CAAC2B,MAAM,CAACd,QAAQ,CAAC;EAC3B,CAAC;AACF,CAAC;AAEM,MAAMiB,4BAA4B,GAAIpB,OAAe,IAAK;EAChE,OAAO,IAAAqB,2BAAoB,EAC1BH,SAAS,EACT,MAAMxB,QAAQ,CAACC,YAAY,CAACK,OAAO,CAAC,IAAIX,WAAW,EACnD,MAAMA,WACP,CAAC;AACF,CAAC;AAAC0B,OAAA,CAAAK,4BAAA,GAAAA,4BAAA","ignoreList":[]}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.isTeleportAvailable = exports.NativePortalProvider = exports.NativePortalHost = exports.NativePortal = void 0;
7
+ /**
8
+ * `react-native-teleport` is an optional peer dependency. The require sits in a
9
+ * try/catch so Metro treats it as an optional dependency — an absent module no
10
+ * longer fails the bundle, it throws at runtime and the catch swallows it.
11
+ *
12
+ * When teleport is missing, `portal`-enabled boundaries degrade to inline
13
+ * rendering; everything else keeps working.
14
+ */
15
+ let mod = null;
16
+ try {
17
+ mod = require("react-native-teleport");
18
+ } catch {}
19
+ const isTeleportAvailable = exports.isTeleportAvailable = mod !== null;
20
+ const NativePortal = exports.NativePortal = mod?.Portal ?? null;
21
+ const NativePortalProvider = exports.NativePortalProvider = mod?.PortalProvider ?? null;
22
+ const NativePortalHost = exports.NativePortalHost = mod?.PortalHost ?? null;
23
+ //# sourceMappingURL=teleport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["mod","require","isTeleportAvailable","exports","NativePortal","Portal","NativePortalProvider","PortalProvider","NativePortalHost","PortalHost"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/portal/teleport.ts"],"mappings":";;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIA,GAAQ,GAAG,IAAI;AACnB,IAAI;EACHA,GAAG,GAAGC,OAAO,CAAC,uBAAuB,CAAC;AACvC,CAAC,CAAC,MAAM,CAAC;AAEF,MAAMC,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAGF,GAAG,KAAK,IAAI;AACxC,MAAMI,YAAuC,GAAAD,OAAA,CAAAC,YAAA,GAAGJ,GAAG,EAAEK,MAAM,IAAI,IAAI;AACnE,MAAMC,oBAA+C,GAAAH,OAAA,CAAAG,oBAAA,GAC3DN,GAAG,EAAEO,cAAc,IAAI,IAAI;AACrB,MAAMC,gBAA2C,GAAAL,OAAA,CAAAK,gBAAA,GACvDR,GAAG,EAAES,UAAU,IAAI,IAAI","ignoreList":[]}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.resolvePortalAttachmentTargets = void 0;
7
+ const resolvePortalAttachmentTargets = ({
8
+ attachment,
9
+ currentScreenKey,
10
+ nextScreenKey,
11
+ portalAttachTarget,
12
+ sourcePairKey
13
+ }) => {
14
+ const hasCurrentAttachment = attachment?.pairKey === sourcePairKey;
15
+ if (!hasCurrentAttachment || !attachment) {
16
+ return {
17
+ progressScreenKey: null,
18
+ targetScreenKey: null
19
+ };
20
+ }
21
+
22
+ // Matched-screen portals physically live in the matched destination host. If a
23
+ // closing destination is skipped by descriptor resolution, its own progress
24
+ // still owns the attach gate until this attachment is replaced or cleared.
25
+ if (portalAttachTarget === "matched-screen") {
26
+ return {
27
+ progressScreenKey: attachment.matchedScreenKey,
28
+ targetScreenKey: attachment.matchedScreenKey
29
+ };
30
+ }
31
+
32
+ // Current-screen portals stay mounted in this screen's host, but the visual
33
+ // handoff is still paced by the adjacent destination transition.
34
+ return {
35
+ progressScreenKey: nextScreenKey ?? null,
36
+ targetScreenKey: currentScreenKey
37
+ };
38
+ };
39
+ exports.resolvePortalAttachmentTargets = resolvePortalAttachmentTargets;
40
+ //# sourceMappingURL=attachment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["resolvePortalAttachmentTargets","attachment","currentScreenKey","nextScreenKey","portalAttachTarget","sourcePairKey","hasCurrentAttachment","pairKey","progressScreenKey","targetScreenKey","matchedScreenKey","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/attachment.ts"],"mappings":";;;;;;AAeO,MAAMA,8BAA8B,GAAGA,CAAC;EAC9CC,UAAU;EACVC,gBAAgB;EAChBC,aAAa;EACbC,kBAAkB;EAClBC;AACqC,CAAC,KAAK;EAC3C,MAAMC,oBAAoB,GAAGL,UAAU,EAAEM,OAAO,KAAKF,aAAa;EAElE,IAAI,CAACC,oBAAoB,IAAI,CAACL,UAAU,EAAE;IACzC,OAAO;MACNO,iBAAiB,EAAE,IAAI;MACvBC,eAAe,EAAE;IAClB,CAAC;EACF;;EAEA;EACA;EACA;EACA,IAAIL,kBAAkB,KAAK,gBAAgB,EAAE;IAC5C,OAAO;MACNI,iBAAiB,EAAEP,UAAU,CAACS,gBAAgB;MAC9CD,eAAe,EAAER,UAAU,CAACS;IAC7B,CAAC;EACF;;EAEA;EACA;EACA,OAAO;IACNF,iBAAiB,EAAEL,aAAa,IAAI,IAAI;IACxCM,eAAe,EAAEP;EAClB,CAAC;AACF,CAAC;AAACS,OAAA,CAAAX,8BAAA,GAAAA,8BAAA","ignoreList":[]}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createPortalBoundaryHostName = exports.PORTAL_HOST_NAME_RESET_VALUE = void 0;
7
+ const PORTAL_HOST_NAME_RESET_VALUE = exports.PORTAL_HOST_NAME_RESET_VALUE = null;
8
+ const PORTAL_HOST_NAME_SUFFIX = "-portal-host";
9
+ const createPortalBoundaryHostName = (hostKey, boundaryId) => {
10
+ "worklet";
11
+
12
+ return `${hostKey}-${boundaryId}${PORTAL_HOST_NAME_SUFFIX}`;
13
+ };
14
+ exports.createPortalBoundaryHostName = createPortalBoundaryHostName;
15
+ //# sourceMappingURL=naming.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["PORTAL_HOST_NAME_RESET_VALUE","exports","PORTAL_HOST_NAME_SUFFIX","createPortalBoundaryHostName","hostKey","boundaryId"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/naming.ts"],"mappings":";;;;;;AAAO,MAAMA,4BAA4B,GAAAC,OAAA,CAAAD,4BAAA,GAAG,IAAI;AAChD,MAAME,uBAAuB,GAAG,cAAc;AAEvC,MAAMC,4BAA4B,GAAGA,CAC3CC,OAAe,EACfC,UAAkB,KACd;EACJ,SAAS;;EACT,OAAO,GAAGD,OAAO,IAAIC,UAAU,GAAGH,uBAAuB,EAAE;AAC5D,CAAC;AAACD,OAAA,CAAAE,4BAAA,GAAAA,4BAAA","ignoreList":[]}
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.resolvePortalOffsetStyle = void 0;
7
+ var _reactNativeReanimated = require("react-native-reanimated");
8
+ var _scroll = require("../../../../stores/scroll.store");
9
+ var _hostBounds = require("../stores/host-bounds.store");
10
+ const resolvePortalOffsetStyle = ({
11
+ alignHostToBoundsScroll = false,
12
+ bounds,
13
+ boundsCurrentScroll,
14
+ compensateSourceScroll = false,
15
+ currentScroll,
16
+ hostCurrentScroll,
17
+ hostKey,
18
+ hostProgress = 0,
19
+ includeScrollOffsets = true,
20
+ placement,
21
+ position = "relative",
22
+ sourceCurrentScroll,
23
+ trackSourceScroll = false
24
+ }) => {
25
+ "worklet";
26
+
27
+ const hostBounds = (0, _hostBounds.getPortalHostBounds)(hostKey);
28
+ const shouldAlignHostToBoundsScroll = placement ? placement === "same-screen" : alignHostToBoundsScroll;
29
+ const shouldCompensateSourceScroll = trackSourceScroll || compensateSourceScroll;
30
+ const shouldIncludeHostScrollOffsets = placement ? placement === "cross-screen-close" : includeScrollOffsets;
31
+ const boundsScrollSnapshot = bounds.scroll ?? null;
32
+ const sourceScrollSnapshot = shouldCompensateSourceScroll ? boundsScrollSnapshot : null;
33
+ const sourceScrollDeltaX = shouldCompensateSourceScroll ? (0, _scroll.getClampedScrollAxisDelta)(sourceCurrentScroll ?? null, sourceScrollSnapshot, "horizontal") : 0;
34
+ const sourceScrollDeltaY = shouldCompensateSourceScroll ? (0, _scroll.getClampedScrollAxisDelta)(sourceCurrentScroll ?? null, sourceScrollSnapshot, "vertical") : 0;
35
+ const sourcePageX = bounds.pageX - sourceScrollDeltaX;
36
+ const sourcePageY = bounds.pageY - sourceScrollDeltaY;
37
+ const boundsScroll = shouldIncludeHostScrollOffsets ? boundsScrollSnapshot ?? boundsCurrentScroll ?? currentScroll ?? null : null;
38
+ const hostBoundsScrollSnapshot = hostBounds?.scroll ?? null;
39
+ const hostBoundsScroll = shouldIncludeHostScrollOffsets ? hostBoundsScrollSnapshot : null;
40
+ const resolvedHostCurrentScroll = hostCurrentScroll ?? boundsScroll ?? hostBoundsScroll ?? null;
41
+ const hostSnapshotDeltaX = shouldAlignHostToBoundsScroll && !shouldIncludeHostScrollOffsets ? (0, _scroll.getClampedScrollAxisDelta)(boundsScrollSnapshot, hostBoundsScrollSnapshot, "horizontal") : 0;
42
+ const hostSnapshotDeltaY = shouldAlignHostToBoundsScroll && !shouldIncludeHostScrollOffsets ? (0, _scroll.getClampedScrollAxisDelta)(boundsScrollSnapshot, hostBoundsScrollSnapshot, "vertical") : 0;
43
+ // Deltas are clamped to the layout range: iOS rubber-band offsets are
44
+ // outside the real scroll range and must not become coordinate-space deltas.
45
+ const hostScrollDeltaX = (0, _scroll.getClampedScrollAxisDelta)(resolvedHostCurrentScroll, hostBoundsScroll, "horizontal");
46
+ const hostScrollDeltaY = (0, _scroll.getClampedScrollAxisDelta)(resolvedHostCurrentScroll, hostBoundsScroll, "vertical");
47
+ const adjustedHostPageX = hostBounds ? hostBounds.pageX - hostSnapshotDeltaX - (0, _reactNativeReanimated.interpolate)(hostProgress, [0, 1], [hostScrollDeltaX, 0]) : 0;
48
+ const adjustedHostPageY = hostBounds ? hostBounds.pageY - hostSnapshotDeltaY - (0, _reactNativeReanimated.interpolate)(hostProgress, [0, 1], [hostScrollDeltaY, 0]) : 0;
49
+ const boundsScrollDeltaX = shouldIncludeHostScrollOffsets ? (0, _scroll.getClampedScrollAxisDelta)(currentScroll ?? null, boundsScroll, "horizontal") : 0;
50
+ const boundsScrollDeltaY = shouldIncludeHostScrollOffsets ? (0, _scroll.getClampedScrollAxisDelta)(currentScroll ?? null, boundsScroll, "vertical") : 0;
51
+ const offsetX = hostBounds ? sourcePageX - adjustedHostPageX : sourcePageX - boundsScrollDeltaX;
52
+ const offsetY = hostBounds ? sourcePageY - adjustedHostPageY : sourcePageY - boundsScrollDeltaY;
53
+ const transform = [{
54
+ translateY: offsetY
55
+ }, {
56
+ translateX: offsetX
57
+ }];
58
+ if (position === "absolute") {
59
+ return {
60
+ left: 0,
61
+ position: "absolute",
62
+ top: 0,
63
+ transform
64
+ };
65
+ }
66
+ return {
67
+ transform
68
+ };
69
+ };
70
+ exports.resolvePortalOffsetStyle = resolvePortalOffsetStyle;
71
+ //# sourceMappingURL=offset-style.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNativeReanimated","require","_scroll","_hostBounds","resolvePortalOffsetStyle","alignHostToBoundsScroll","bounds","boundsCurrentScroll","compensateSourceScroll","currentScroll","hostCurrentScroll","hostKey","hostProgress","includeScrollOffsets","placement","position","sourceCurrentScroll","trackSourceScroll","hostBounds","getPortalHostBounds","shouldAlignHostToBoundsScroll","shouldCompensateSourceScroll","shouldIncludeHostScrollOffsets","boundsScrollSnapshot","scroll","sourceScrollSnapshot","sourceScrollDeltaX","getClampedScrollAxisDelta","sourceScrollDeltaY","sourcePageX","pageX","sourcePageY","pageY","boundsScroll","hostBoundsScrollSnapshot","hostBoundsScroll","resolvedHostCurrentScroll","hostSnapshotDeltaX","hostSnapshotDeltaY","hostScrollDeltaX","hostScrollDeltaY","adjustedHostPageX","interpolate","adjustedHostPageY","boundsScrollDeltaX","boundsScrollDeltaY","offsetX","offsetY","transform","translateY","translateX","left","top","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/offset-style.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAF,OAAA;AAuCO,MAAMG,wBAAwB,GAAGA,CAAC;EACxCC,uBAAuB,GAAG,KAAK;EAC/BC,MAAM;EACNC,mBAAmB;EACnBC,sBAAsB,GAAG,KAAK;EAC9BC,aAAa;EACbC,iBAAiB;EACjBC,OAAO;EACPC,YAAY,GAAG,CAAC;EAChBC,oBAAoB,GAAG,IAAI;EAC3BC,SAAS;EACTC,QAAQ,GAAG,UAAU;EACrBC,mBAAmB;EACnBC,iBAAiB,GAAG;AACW,CAAC,KAAiB;EACjD,SAAS;;EACT,MAAMC,UAAU,GAAG,IAAAC,+BAAmB,EAACR,OAAO,CAAC;EAC/C,MAAMS,6BAA6B,GAAGN,SAAS,GAC5CA,SAAS,KAAK,aAAa,GAC3BT,uBAAuB;EAC1B,MAAMgB,4BAA4B,GACjCJ,iBAAiB,IAAIT,sBAAsB;EAC5C,MAAMc,8BAA8B,GAAGR,SAAS,GAC7CA,SAAS,KAAK,oBAAoB,GAClCD,oBAAoB;EACvB,MAAMU,oBAAoB,GACxBjB,MAAM,CAA6CkB,MAAM,IAAI,IAAI;EACnE,MAAMC,oBAAoB,GAAGJ,4BAA4B,GACtDE,oBAAoB,GACpB,IAAI;EACP,MAAMG,kBAAkB,GAAGL,4BAA4B,GACpD,IAAAM,iCAAyB,EACzBX,mBAAmB,IAAI,IAAI,EAC3BS,oBAAoB,EACpB,YACD,CAAC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E,CAAC,CAAC,CAAC,GACvD,CAAC;EACJ,MAAMI,iBAAiB,GAAGzB,UAAU,GACjCA,UAAU,CAACc,KAAK,GACjBM,kBAAkB,GAClB,IAAAI,kCAAW,EAAC9B,YAAY,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC4B,gBAAgB,EAAE,CAAC,CAAC,CAAC,GACvD,CAAC;EACJ,MAAMI,kBAAkB,GAAGtB,8BAA8B,GACtD,IAAAK,iCAAyB,EACzBlB,aAAa,IAAI,IAAI,EACrBwB,YAAY,EACZ,YACD,CAAC,GACA,CAAC;EACJ,MAAMY,kBAAkB,GAAGvB,8BAA8B,GACtD,IAAAK,iCAAyB,EAAClB,aAAa,IAAI,IAAI,EAAEwB,YAAY,EAAE,UAAU,CAAC,GAC1E,CAAC;EACJ,MAAMa,OAAO,GAAG5B,UAAU,GACvBW,WAAW,GAAGY,iBAAiB,GAC/BZ,WAAW,GAAGe,kBAAkB;EACnC,MAAMG,OAAO,GAAG7B,UAAU,GACvBa,WAAW,GAAGY,iBAAiB,GAC/BZ,WAAW,GAAGc,kBAAkB;EACnC,MAAMG,SAAS,GAAG,CAAC;IAAEC,UAAU,EAAEF;EAAQ,CAAC,EAAE;IAAEG,UAAU,EAAEJ;EAAQ,CAAC,CAAC;EAEpE,IAAI/B,QAAQ,KAAK,UAAU,EAAE;IAC5B,OAAO;MACNoC,IAAI,EAAE,CAAC;MACPpC,QAAQ,EAAE,UAAU;MACpBqC,GAAG,EAAE,CAAC;MACNJ;IACD,CAAC;EACF;EAEA,OAAO;IACNA;EACD,CAAC;AACF,CAAC;AAACK,OAAA,CAAAjD,wBAAA,GAAAA,wBAAA","ignoreList":[]}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.isTeleportEnabled = void 0;
7
+ const isTeleportEnabled = teleport => {
8
+ "worklet";
9
+
10
+ if (typeof teleport === "boolean") {
11
+ return teleport;
12
+ }
13
+ return teleport?.enabled !== false;
14
+ };
15
+ exports.isTeleportEnabled = isTeleportEnabled;
16
+ //# sourceMappingURL=teleport-control.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["isTeleportEnabled","teleport","enabled","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/teleport-control.ts"],"mappings":";;;;;;AAEO,MAAMA,iBAAiB,GAC7BC,QAA6C,IACzC;EACJ,SAAS;;EAET,IAAI,OAAOA,QAAQ,KAAK,SAAS,EAAE;IAClC,OAAOA,QAAQ;EAChB;EAEA,OAAOA,QAAQ,EAAEC,OAAO,KAAK,KAAK;AACnC,CAAC;AAACC,OAAA,CAAAH,iBAAA,GAAAA,iBAAA","ignoreList":[]}
@@ -5,43 +5,41 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.useBoundaryOwnerContext = exports.useBoundaryOwner = exports.TARGET_OUTSIDE_OWNER_WARNING = exports.BoundaryOwnerProvider = void 0;
7
7
  var _react = require("react");
8
- var _jsxRuntime = require("react/jsx-runtime");
9
- const BoundaryOwnerContext = /*#__PURE__*/(0, _react.createContext)(null);
10
- const MULTIPLE_TARGETS_WARNING = "[react-native-screen-transitions] Multiple Boundary.Target elements were rendered under the same boundary owner. The first registered target will be measured.";
11
- const TARGET_OUTSIDE_OWNER_WARNING = exports.TARGET_OUTSIDE_OWNER_WARNING = "[react-native-screen-transitions] Boundary.Target must be rendered inside a Boundary owner (Boundary.View, Boundary.Trigger, or a component created by createBoundaryComponent).";
12
- const BoundaryOwnerProvider = props => {
13
- const {
14
- value,
15
- children
16
- } = props;
17
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(BoundaryOwnerContext.Provider, {
18
- value: value,
19
- children: children
20
- });
21
- };
22
- exports.BoundaryOwnerProvider = BoundaryOwnerProvider;
23
- const useBoundaryOwnerContext = () => {
24
- return (0, _react.useContext)(BoundaryOwnerContext);
25
- };
8
+ var _createProvider = _interopRequireDefault(require("../../../utils/create-provider"));
9
+ var _logger = require("../../../utils/logger");
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
+ // logger.warn prepends the library prefix.
12
+ const MULTIPLE_TARGETS_WARNING = "Multiple Boundary.Target elements were rendered under the same boundary owner. The first registered target will be measured.";
13
+ const TARGET_OUTSIDE_OWNER_WARNING = exports.TARGET_OUTSIDE_OWNER_WARNING = "Boundary.Target must be rendered inside a Boundary owner (Boundary.View, Boundary.Trigger, or a component created by createBoundaryComponent).";
14
+ const {
15
+ BoundaryOwnerProvider,
16
+ useBoundaryOwnerContext
17
+ } = (0, _createProvider.default)("BoundaryOwner", {
18
+ guarded: false
19
+ })(props => props);
26
20
  exports.useBoundaryOwnerContext = useBoundaryOwnerContext;
21
+ exports.BoundaryOwnerProvider = BoundaryOwnerProvider;
27
22
  const useBoundaryOwner = params => {
28
23
  const {
29
24
  ownerRef,
30
- associatedTargetStyles
25
+ associatedTargetStyles,
26
+ entryTag,
27
+ portal
31
28
  } = params;
32
29
  const warnedAboutMultipleTargetsRef = (0, _react.useRef)(false);
33
30
  const [targetEntry, setTargetEntry] = (0, _react.useState)(null);
34
- const registerTargetRef = (0, _react.useCallback)((targetRef, preparedStyles) => {
31
+ const registerTargetRef = (0, _react.useCallback)((targetRef, preparedStyles, measurementRef) => {
35
32
  setTargetEntry(prev => {
36
33
  if (prev?.ref === targetRef) {
37
34
  return prev;
38
35
  }
39
36
  if (__DEV__ && prev !== null && !warnedAboutMultipleTargetsRef.current) {
40
37
  warnedAboutMultipleTargetsRef.current = true;
41
- console.warn(MULTIPLE_TARGETS_WARNING);
38
+ _logger.logger.warn(MULTIPLE_TARGETS_WARNING);
42
39
  }
43
40
  return prev ?? {
44
41
  ref: targetRef,
42
+ measurementRef: measurementRef ?? targetRef,
45
43
  preparedStyles
46
44
  };
47
45
  });
@@ -54,13 +52,16 @@ const useBoundaryOwner = params => {
54
52
  registerTargetRef,
55
53
  unregisterTargetRef,
56
54
  activeTargetRef: targetEntry?.ref ?? null,
57
- associatedTargetStyles
58
- }), [ownerRef, registerTargetRef, unregisterTargetRef, targetEntry, associatedTargetStyles]);
55
+ associatedTargetStyles,
56
+ entryTag,
57
+ portal
58
+ }), [ownerRef, registerTargetRef, unregisterTargetRef, targetEntry, associatedTargetStyles, entryTag, portal]);
59
59
  return {
60
60
  contextValue,
61
61
  hasActiveTarget: targetEntry !== null,
62
- measuredRef: targetEntry?.ref ?? ownerRef,
63
- targetPreparedStyles: targetEntry?.preparedStyles
62
+ measuredRef: targetEntry?.measurementRef ?? ownerRef,
63
+ targetPreparedStyles: targetEntry?.preparedStyles,
64
+ portal
64
65
  };
65
66
  };
66
67
  exports.useBoundaryOwner = useBoundaryOwner;
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_createProvider","_interopRequireDefault","_logger","e","__esModule","default","MULTIPLE_TARGETS_WARNING","TARGET_OUTSIDE_OWNER_WARNING","exports","BoundaryOwnerProvider","useBoundaryOwnerContext","createProvider","guarded","props","useBoundaryOwner","params","ownerRef","associatedTargetStyles","entryTag","portal","warnedAboutMultipleTargetsRef","useRef","targetEntry","setTargetEntry","useState","registerTargetRef","useCallback","targetRef","preparedStyles","measurementRef","prev","ref","__DEV__","current","logger","warn","unregisterTargetRef","contextValue","useMemo","activeTargetRef","hasActiveTarget","measuredRef","targetPreparedStyles"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/providers/boundary-owner.provider.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAIA,IAAAC,eAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAA+C,SAAAE,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AA4B/C;AACA,MAAMG,wBAAwB,GAC7B,8HAA8H;AAExH,MAAMC,4BAA4B,GAAAC,OAAA,CAAAD,4BAAA,GACxC,gJAAgJ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,EAAE,CAAC;EAEN,MAAMO,YAAY,GAAG,IAAAC,cAAO,EAC3B,OAAO;IACNtB,QAAQ;IACRS,iBAAiB;IACjBW,mBAAmB;IACnBG,eAAe,EAAEjB,WAAW,EAAES,GAAG,IAAI,IAAI;IACzCd,sBAAsB;IACtBC,QAAQ;IACRC;EACD,CAAC,CAAC,EACF,CACCH,QAAQ,EACRS,iBAAiB,EACjBW,mBAAmB,EACnBd,WAAW,EACXL,sBAAsB,EACtBC,QAAQ,EACRC,MAAM,CAER,CAAC;EAED,OAAO;IACNkB,YAAY;IACZG,eAAe,EAAElB,WAAW,KAAK,IAAI;IACrCmB,WAAW,EAAEnB,WAAW,EAAEO,cAAc,IAAIb,QAAQ;IACpD0B,oBAAoB,EAAEpB,WAAW,EAAEM,cAAc;IACjDT;EACD,CAAC;AACF,CAAC;AAACX,OAAA,CAAAM,gBAAA,GAAAA,gBAAA","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["shared/components/boundary/types.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getInitialDestinationMeasurePairKey = void 0;
7
+ const getInitialDestinationMeasurePairKey = params => {
8
+ "worklet";
9
+
10
+ const {
11
+ enabled,
12
+ destinationPairKey,
13
+ ancestorDestinationPairKey,
14
+ linkId,
15
+ linkState
16
+ } = params;
17
+ const measurePairKey = destinationPairKey ?? ancestorDestinationPairKey;
18
+ if (!enabled || !measurePairKey) {
19
+ return null;
20
+ }
21
+ const hasDestination = linkState?.[measurePairKey]?.links?.[linkId]?.destination;
22
+ return hasDestination ? null : measurePairKey;
23
+ };
24
+ exports.getInitialDestinationMeasurePairKey = getInitialDestinationMeasurePairKey;
25
+ //# sourceMappingURL=destination-signals.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["getInitialDestinationMeasurePairKey","params","enabled","destinationPairKey","ancestorDestinationPairKey","linkId","linkState","measurePairKey","hasDestination","links","destination","exports"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/utils/destination-signals.ts"],"mappings":";;;;;;AAKO,MAAMA,mCAAmC,GAAIC,MAMnD,IAA2B;EAC3B,SAAS;;EACT,MAAM;IACLC,OAAO;IACPC,kBAAkB;IAClBC,0BAA0B;IAC1BC,MAAM;IACNC;EACD,CAAC,GAAGL,MAAM;EACV,MAAMM,cAAc,GAAGJ,kBAAkB,IAAIC,0BAA0B;EAEvE,IAAI,CAACF,OAAO,IAAI,CAACK,cAAc,EAAE;IAChC,OAAO,IAAI;EACZ;EAEA,MAAMC,cAAc,GACnBF,SAAS,GAAGC,cAAc,CAAC,EAAEE,KAAK,GAAGJ,MAAM,CAAC,EAAEK,WAAW;EAE1D,OAAOF,cAAc,GAAG,IAAI,GAAGD,cAAc;AAC9C,CAAC;AAACI,OAAA,CAAAX,mCAAA,GAAAA,mCAAA","ignoreList":[]}
@@ -3,14 +3,17 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.measureWithOverscrollAwareness = exports.isMeasurementInViewport = exports.applyVisibilityBlockOffset = exports.adjustedMeasuredBoundsForOverscrollDeltas = void 0;
6
+ exports.normalizeMeasuredBoundsToOrigin = exports.measureWithOverscrollAwareness = exports.isMeasurementInViewport = exports.attachScrollSnapshotToMeasuredBounds = exports.adjustedMeasuredBoundsForOverscrollDeltas = void 0;
7
7
  var _reactNativeReanimated = require("react-native-reanimated");
8
+ var _scroll = require("../../../stores/scroll.store");
8
9
  const SCROLL_MEASUREMENT_EPSILON = 1;
9
10
  const getOverscrollDelta = axisState => {
10
11
  "worklet";
11
12
 
12
- const maxOffset = Math.max(0, axisState.contentSize - axisState.layoutSize);
13
- const clampedOffset = Math.min(Math.max(axisState.offset, 0), maxOffset);
13
+ const clampedOffset = (0, _scroll.clampScrollAxisOffset)(axisState);
14
+ if (!axisState || clampedOffset === null) {
15
+ return 0;
16
+ }
14
17
  const delta = axisState.offset - clampedOffset;
15
18
  return Math.abs(delta) > SCROLL_MEASUREMENT_EPSILON ? delta : 0;
16
19
  };
@@ -34,18 +37,16 @@ const adjustedMeasuredBoundsForOverscrollDeltas = (measured, scrollState) => {
34
37
  };
35
38
  };
36
39
  exports.adjustedMeasuredBoundsForOverscrollDeltas = adjustedMeasuredBoundsForOverscrollDeltas;
37
- const applyVisibilityBlockOffset = (measured, offset) => {
40
+ const normalizeMeasuredBoundsToOrigin = (measured, origin) => {
38
41
  "worklet";
39
42
 
40
- if (offset === 0) {
41
- return measured;
42
- }
43
43
  return {
44
44
  ...measured,
45
- pageY: measured.pageY - offset
45
+ pageX: measured.pageX - origin.pageX,
46
+ pageY: measured.pageY - origin.pageY
46
47
  };
47
48
  };
48
- exports.applyVisibilityBlockOffset = applyVisibilityBlockOffset;
49
+ exports.normalizeMeasuredBoundsToOrigin = normalizeMeasuredBoundsToOrigin;
49
50
  const isMeasurementInViewport = (measured, viewportWidth, viewportHeight) => {
50
51
  "worklet";
51
52
 
@@ -67,4 +68,13 @@ const measureWithOverscrollAwareness = (ref, scrollState) => {
67
68
  return adjustedMeasuredBoundsForOverscrollDeltas(measured, scrollState);
68
69
  };
69
70
  exports.measureWithOverscrollAwareness = measureWithOverscrollAwareness;
71
+ const attachScrollSnapshotToMeasuredBounds = (measured, scroll) => {
72
+ "worklet";
73
+
74
+ return {
75
+ ...measured,
76
+ scroll: (0, _scroll.cloneScrollMetadataState)(scroll)
77
+ };
78
+ };
79
+ exports.attachScrollSnapshotToMeasuredBounds = attachScrollSnapshotToMeasuredBounds;
70
80
  //# sourceMappingURL=measured-bounds.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNativeReanimated","require","_scroll","SCROLL_MEASUREMENT_EPSILON","getOverscrollDelta","axisState","clampedOffset","clampScrollAxisOffset","delta","offset","Math","abs","adjustedMeasuredBoundsForOverscrollDeltas","measured","scrollState","deltaX","horizontal","deltaY","vertical","x","y","pageX","pageY","exports","normalizeMeasuredBoundsToOrigin","origin","isMeasurementInViewport","viewportWidth","viewportHeight","width","height","toleranceX","toleranceY","centerX","centerY","measureWithOverscrollAwareness","ref","measure","attachScrollSnapshotToMeasuredBounds","scroll","cloneScrollMetadataState"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/utils/measured-bounds.ts"],"mappings":";;;;;;AACA,IAAAA,sBAAA,GAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAD,OAAA;AAUA,MAAME,0BAA0B,GAAG,CAAC;AAMpC,MAAMC,kBAAkB,GACvBC,SAAoD,IACxC;EACZ,SAAS;;EACT,MAAMC,aAAa,GAAG,IAAAC,6BAAqB,EAACF,SAAS,CAAC;EACtD,IAAI,CAACA,SAAS,IAAIC,aAAa,KAAK,IAAI,EAAE;IACzC,OAAO,CAAC;EACT;EAEA,MAAME,KAAK,GAAGH,SAAS,CAACI,MAAM,GAAGH,aAAa;EAE9C,OAAOI,IAAI,CAACC,GAAG,CAACH,KAAK,CAAC,GAAGL,0BAA0B,GAAGK,KAAK,GAAG,CAAC;AAChE,CAAC;AAEM,MAAMI,yCAAyC,GAAGA,CACxDC,QAA4B,EAC5BC,WAA4D,KACpC;EACxB,SAAS;;EAET,IAAI,CAACA,WAAW,EAAE;IACjB,OAAOD,QAAQ;EAChB;EAEA,MAAME,MAAM,GAAGX,kBAAkB,CAACU,WAAW,CAACE,UAAU,CAAC;EACzD,MAAMC,MAAM,GAAGb,kBAAkB,CAACU,WAAW,CAACI,QAAQ,CAAC;EAEvD,IAAIH,MAAM,KAAK,CAAC,IAAIE,MAAM,KAAK,CAAC,EAAE;IACjC,OAAOJ,QAAQ;EAChB;EAEA,OAAO;IACN,GAAGA,QAAQ;IACXM,CAAC,EAAEN,QAAQ,CAACM,CAAC,GAAGJ,MAAM;IACtBK,CAAC,EAAEP,QAAQ,CAACO,CAAC,GAAGH,MAAM;IACtBI,KAAK,EAAER,QAAQ,CAACQ,KAAK,GAAGN,MA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