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,99 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ScreenFallbackHost = exports.Host = void 0;
7
+ var _react = require("react");
8
+ var _reactNative = require("react-native");
9
+ var _reactNativeReanimated = _interopRequireDefault(require("react-native-reanimated"));
10
+ var _descriptors = require("../../../../providers/screen/descriptors");
11
+ var _useHostMeasurement = require("../hooks/use-host-measurement");
12
+ var _hostRegistry = require("../stores/host-registry.store");
13
+ var _portalBoundaryHost = require("../stores/portal-boundary-host.store");
14
+ var _portalBoundaryHost2 = require("./portal-boundary-host");
15
+ var _jsxRuntime = require("react/jsx-runtime");
16
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
17
+ let nextHostId = 0;
18
+ function HostImpl({
19
+ fallback = false,
20
+ style
21
+ }) {
22
+ const screenKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.currentScreenKey);
23
+ const generatedHostKeyRef = (0, _react.useRef)(null);
24
+ if (generatedHostKeyRef.current === null) {
25
+ generatedHostKeyRef.current = `${screenKey}-host-${nextHostId++}`;
26
+ }
27
+ const hostKey = fallback ? screenKey : generatedHostKeyRef.current;
28
+ const capturesScroll = !fallback;
29
+ const activeBoundaryHosts = (0, _portalBoundaryHost.useActivePortalBoundaryHosts)(hostKey);
30
+ const {
31
+ height: viewportHeight,
32
+ width: viewportWidth
33
+ } = (0, _reactNative.useWindowDimensions)();
34
+ const measurement = (0, _useHostMeasurement.useHostMeasurement)({
35
+ capturesScroll,
36
+ enabled: activeBoundaryHosts.length > 0,
37
+ hostKey,
38
+ screenKey
39
+ });
40
+ (0, _react.useLayoutEffect)(() => {
41
+ (0, _hostRegistry.registerHost)({
42
+ capturesScroll,
43
+ fallback,
44
+ hostKey,
45
+ screenKey
46
+ });
47
+ return () => {
48
+ (0, _hostRegistry.unregisterHost)(screenKey, hostKey);
49
+ };
50
+ }, [capturesScroll, fallback, hostKey, screenKey]);
51
+ const boundaryHosts = measurement.canRenderHosts ? activeBoundaryHosts.map(host => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
52
+ pointerEvents: "box-none",
53
+ style: [styles.boundaryHostViewport, {
54
+ width: viewportWidth,
55
+ height: viewportHeight
56
+ }],
57
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_portalBoundaryHost2.PortalBoundaryHost, {
58
+ host: host,
59
+ style: _reactNative.StyleSheet.absoluteFill
60
+ })
61
+ }, host.boundaryId)) : null;
62
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
63
+ ref: measurement.hostRef,
64
+ pointerEvents: "box-none",
65
+ style: [styles.host, {
66
+ width: viewportWidth,
67
+ height: viewportHeight
68
+ }, style],
69
+ collapsable: false,
70
+ children: boundaryHosts
71
+ });
72
+ }
73
+ const Host = exports.Host = /*#__PURE__*/(0, _react.memo)(function Host(props) {
74
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(HostImpl, {
75
+ ...props
76
+ });
77
+ });
78
+ const ScreenFallbackHost = exports.ScreenFallbackHost = /*#__PURE__*/(0, _react.memo)(function ScreenFallbackHost() {
79
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(HostImpl, {
80
+ fallback: true
81
+ });
82
+ });
83
+ const styles = _reactNative.StyleSheet.create({
84
+ host: {
85
+ elevation: 999999,
86
+ left: 0,
87
+ overflow: "visible",
88
+ position: "absolute",
89
+ top: 0,
90
+ zIndex: 999999
91
+ },
92
+ boundaryHostViewport: {
93
+ left: 0,
94
+ overflow: "visible",
95
+ position: "absolute",
96
+ top: 0
97
+ }
98
+ });
99
+ //# sourceMappingURL=host.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireDefault","_descriptors","_useHostMeasurement","_hostRegistry","_portalBoundaryHost","_portalBoundaryHost2","_jsxRuntime","e","__esModule","default","nextHostId","HostImpl","fallback","style","screenKey","useDescriptorsStore","s","derivations","currentScreenKey","generatedHostKeyRef","useRef","current","hostKey","capturesScroll","activeBoundaryHosts","useActivePortalBoundaryHosts","height","viewportHeight","width","viewportWidth","useWindowDimensions","measurement","useHostMeasurement","enabled","length","useLayoutEffect","registerHost","unregisterHost","boundaryHosts","canRenderHosts","map","host","jsx","View","pointerEvents","styles","boundaryHostViewport","children","PortalBoundaryHost","StyleSheet","absoluteFill","boundaryId","ref","hostRef","collapsable","Host","exports","memo","props","ScreenFallbackHost","create","elevation","left","overflow","position","top","zIndex"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/components/host.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAOA,IAAAE,sBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,mBAAA,GAAAL,OAAA;AACA,IAAAM,aAAA,GAAAN,OAAA;AACA,IAAAO,mBAAA,GAAAP,OAAA;AACA,IAAAQ,oBAAA,GAAAR,OAAA;AAA4D,IAAAS,WAAA,GAAAT,OAAA;AAAA,SAAAG,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE5D,IAAIG,UAAU,GAAG,CAAC;AAUlB,SAASC,QAAQA,CAAC;EAAEC,QAAQ,GAAG,KAAK;EAAEC;AAAqB,CAAC,EAAE;EAC7D,MAAMC,SAAS,GAAG,IAAAC,gCAAmB,EAAEC,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACC,gBAAgB,CAAC;EAC5E,MAAMC,mBAAmB,GAAG,IAAAC,aAAM,EAAgB,IAAI,CAAC;EAEvD,IAAID,mBAAmB,CAACE,OAAO,KAAK,IAAI,EAAE;IACzCF,mBAAmB,CAACE,OAAO,GAAG,GAAGP,SAAS,SAASJ,UAAU,EAAE,EAAE;EAClE;EAEA,MAAMY,OAAO,GAAGV,QAAQ,GAAGE,SAAS,GAAGK,mBAAmB,CAACE,OAAO;EAClE,MAAME,cAAc,GAAG,CAACX,QA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sB,OAAQ;IACzBT,aAAa,EAAC,UAAU;IACxB/B,KAAK,EAAE,CACNgC,MAAM,CAACJ,IAAI,EACX;MAAEb,KAAK,EAAEC,aAAa;MAAEH,MAAM,EAAEC;IAAe,CAAC,EAChDd,KAAK,CACJ;IACFyC,WAAW,EAAE,KAAM;IAAAP,QAAA,EAElBT;EAAa,CACA,CAAC;AAElB;AAEO,MAAMiB,IAAI,GAAAC,OAAA,CAAAD,IAAA,gBAAG,IAAAE,WAAI,EAAC,SAASF,IAAIA,CAACG,KAAsB,EAAE;EAC9D,oBAAO,IAAApD,WAAA,CAAAoC,GAAA,EAAC/B,QAAQ;IAAA,GAAK+C;EAAK,CAAG,CAAC;AAC/B,CAAC,CAAC;AAEK,MAAMC,kBAAkB,GAAAH,OAAA,CAAAG,kBAAA,gBAAG,IAAAF,WAAI,EAAC,SAASE,kBAAkBA,CAAA,EAAG;EACpE,oBAAO,IAAArD,WAAA,CAAAoC,GAAA,EAAC/B,QAAQ;IAACC,QAAQ;EAAA,CAAE,CAAC;AAC7B,CAAC,CAAC;AAEF,MAAMiC,MAAM,GAAGI,uBAAU,CAACW,MAAM,CAAC;EAChCnB,IAAI,EAAE;IACLoB,SAAS,EAAE,MAAM;IACjBC,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE,SAAS;IACnBC,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,CAAC;IACNC,MAAM,EAAE;EACT,CAAC;EACDpB,oBAAoB,EAAE;IACrBgB,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE,SAAS;IACnBC,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE;EACN;AACD,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.PortalBoundaryHost = void 0;
7
+ var _react = require("react");
8
+ var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
9
+ var _constants = require("../../../../constants");
10
+ var _animation = require("../../../../stores/animation.store");
11
+ var _linkPairs = require("../../../../stores/bounds/helpers/link-pairs.helpers");
12
+ var _links = require("../../../../stores/bounds/internals/links");
13
+ var _gesture = require("../../../../stores/gesture.store");
14
+ var _scroll = require("../../../../stores/scroll.store");
15
+ var _teleport = require("../teleport");
16
+ var _naming = require("../utils/naming");
17
+ var _offsetStyle = require("../utils/offset-style");
18
+ var _jsxRuntime = require("react/jsx-runtime");
19
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
20
+ const AnimatedPortalBoundaryHost = _teleport.NativePortalHost ? _reactNativeReanimated.default.createAnimatedComponent(_teleport.NativePortalHost) : null;
21
+ const PortalBoundaryHost = exports.PortalBoundaryHost = /*#__PURE__*/(0, _react.memo)(function PortalBoundaryHost({
22
+ host,
23
+ style
24
+ }) {
25
+ const hostName = (0, _naming.createPortalBoundaryHostName)(host.hostKey, host.boundaryId);
26
+ const hostClosing = _animation.AnimationStore.getValue(host.screenKey, "closing");
27
+ const hostProgress = _animation.AnimationStore.getValue(host.screenKey, "transitionProgress");
28
+ const hostGestureDismissing = _gesture.GestureStore.getValue(host.screenKey, "dismissing");
29
+ const hostScrollMetadata = _scroll.ScrollStore.getValue(host.screenKey, "metadata");
30
+ const sourceScrollMetadata = _scroll.ScrollStore.getValue((0, _linkPairs.getSourceScreenKeyFromPairKey)(host.pairKey), "metadata");
31
+ const hostStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
32
+ "worklet";
33
+
34
+ // Strict per-member lookup — a fallback member's source rect would
35
+ // misplace this host's teleported content.
36
+ const link = (0, _links.getLink)(host.pairKey, host.boundaryId);
37
+ if (!link?.source || !link.destination) {
38
+ return _constants.NO_STYLES;
39
+ }
40
+
41
+ // Make the coordinate case explicit before resolving the host offset.
42
+ // The resolver owns the math; this component decides which screen/scroll
43
+ // relationship the active portal is in.
44
+ const isCrossScreenPortal = link.source.screenKey !== host.screenKey;
45
+ const isHostClosing = hostClosing.get() === 1 || hostGestureDismissing.get() === 1;
46
+ const placement = !isCrossScreenPortal ? "same-screen" : isHostClosing ? "cross-screen-close" : "cross-screen-open";
47
+
48
+ // A source that originated inside its own scroll host moves with that
49
+ // ScrollView while this portal stays attached over here. Shifting the
50
+ // source rect by the clamped source scroll travel keeps the return
51
+ // landing point on the live placeholder, so the close detach is seamless.
52
+ const trackSourceScroll = isCrossScreenPortal && link.source.sourceHost?.capturesScroll === true;
53
+ return (0, _offsetStyle.resolvePortalOffsetStyle)({
54
+ bounds: link.source.bounds,
55
+ hostCurrentScroll: placement === "cross-screen-close" ? hostScrollMetadata.get() : null,
56
+ hostKey: host.hostKey,
57
+ placement,
58
+ sourceCurrentScroll: trackSourceScroll ? sourceScrollMetadata.get() : null,
59
+ hostProgress: hostProgress.get(),
60
+ trackSourceScroll
61
+ });
62
+ });
63
+
64
+ // Without `react-native-teleport` no portal ever mounts a boundary host, so
65
+ // this never renders — the guard just narrows the nullable animated host.
66
+ if (!AnimatedPortalBoundaryHost) {
67
+ return null;
68
+ }
69
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedPortalBoundaryHost, {
70
+ name: hostName,
71
+ style: [style, hostStyle]
72
+ });
73
+ });
74
+ //# sourceMappingURL=portal-boundary-host.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNativeReanimated","_interopRequireWildcard","_constants","_animation","_linkPairs","_links","_gesture","_scroll","_teleport","_naming","_offsetStyle","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","AnimatedPortalBoundaryHost","NativePortalHost","Animated","createAnimatedComponent","PortalBoundaryHost","exports","memo","host","style","hostName","createPortalBoundaryHostName","hostKey","boundaryId","hostClosing","AnimationStore","getValue","screenKey","hostProgress","hostGestureDismissing","GestureStore","hostScrollMetadata","ScrollStore","sourceScrollMetadata","getSourceScreenKeyFromPairKey","pairKey","hostStyle","useAnimatedStyle","link","getLink","source","destination","NO_STYLES","isCrossScreenPortal","isHostClosing","placement","trackSourceScroll","sourceHost","capturesScroll","resolvePortalOffsetStyle","bounds","hostCurrentScroll","sourceCurrentScroll","jsx","name"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/components/portal-boundary-host.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,sBAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AAEA,IAAAS,SAAA,GAAAT,OAAA;AACA,IAAAU,OAAA,GAAAV,OAAA;AACA,IAAAW,YAAA,GAAAX,OAAA;AAG+B,IAAAY,WAAA,GAAAZ,OAAA;AAAA,SAAAE,wBAAAW,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAb,uBAAA,YAAAA,CAAAW,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,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GAAG,CAAC,CAAC,GAC1B,IAAI;MACPwB,YAAY,EAAEA,YAAY,CAACxB,GAAG,CAAC,CAAC;MAChC0C;IACD,CAAC,CAAC;EACH,CAAC,CAAC;;EAEF;EACA;EACA,IAAI,CAACnC,0BAA0B,EAAE;IAChC,OAAO,IAAI;EACZ;EAEA,oBACC,IAAApB,WAAA,CAAA8D,GAAA,EAAC1C,0BAA0B;IAAC2C,IAAI,EAAElC,QAAS;IAACD,KAAK,EAAE,CAACA,KAAK,EAAEiB,SAAS;EAAE,CAAE,CAAC;AAE3E,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.PortalProvider = void 0;
7
+ var _react = require("react");
8
+ var _teleport = require("../teleport");
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
+ const PortalProvider = exports.PortalProvider = /*#__PURE__*/(0, _react.memo)(function PortalProvider({
11
+ children
12
+ }) {
13
+ if (!_teleport.NativePortalProvider) {
14
+ return children;
15
+ }
16
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_teleport.NativePortalProvider, {
17
+ children: children
18
+ });
19
+ });
20
+ //# sourceMappingURL=portal-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_teleport","_jsxRuntime","PortalProvider","exports","memo","children","NativePortalProvider","jsx"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/components/portal-provider.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAAmD,IAAAE,WAAA,GAAAF,OAAA;AAE5C,MAAMG,cAAc,GAAAC,OAAA,CAAAD,cAAA,gBAAG,IAAAE,WAAI,EAAC,SAASF,cAAcA,CAAC;EAC1DG;AAGD,CAAC,EAAE;EACF,IAAI,CAACC,8BAAoB,EAAE;IAC1B,OAAOD,QAAQ;EAChB;EAEA,oBAAO,IAAAJ,WAAA,CAAAM,GAAA,EAACP,SAAA,CAAAM,oBAAoB;IAAAD,QAAA,EAAEA;EAAQ,CAAuB,CAAC;AAC/D,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,198 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Portal = void 0;
7
+ var _react = require("react");
8
+ var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
9
+ var _descriptors = require("../../../../providers/screen/descriptors");
10
+ var _styles = require("../../../../providers/screen/styles");
11
+ var _animation = require("../../../../stores/animation.store");
12
+ var _linkPairs = require("../../../../stores/bounds/helpers/link-pairs.helpers");
13
+ var _links = require("../../../../stores/bounds/internals/links");
14
+ var _state = require("../../../../stores/bounds/internals/state");
15
+ var _createTransitionAwareComponent = require("../../../create-transition-aware-component");
16
+ var _hostRegistry = require("../stores/host-registry.store");
17
+ var _portalBoundaryHost = require("../stores/portal-boundary-host.store");
18
+ var _teleport = require("../teleport");
19
+ var _attachment = require("../utils/attachment");
20
+ var _naming = require("../utils/naming");
21
+ var _teleportControl = require("../utils/teleport-control");
22
+ var _jsxRuntime = require("react/jsx-runtime");
23
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
24
+ const TransitionAwareTeleport = _teleport.NativePortal ? (0, _createTransitionAwareComponent.createTransitionAwareComponent)(_teleport.NativePortal) : null;
25
+ const Portal = exports.Portal = /*#__PURE__*/(0, _react.memo)(function Portal({
26
+ id = "my-id",
27
+ children,
28
+ mode = false,
29
+ placeholderRef
30
+ }) {
31
+ // Teleporting requires the optional `react-native-teleport` peer. Without it,
32
+ // a portal-enabled boundary degrades to inline rendering (the `return
33
+ // children` path below).
34
+ const isPortalEnabled = !!mode && _teleport.isTeleportAvailable;
35
+ const portalAttachTarget = !mode || mode === true ? "current-screen" : mode.attachTo ?? "current-screen";
36
+ const {
37
+ stylesMap
38
+ } = (0, _styles.useScreenStyles)();
39
+ const sourcePairKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.sourcePairKey);
40
+ const currentScreenKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.currentScreenKey);
41
+ const nextScreenKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.nextScreenKey);
42
+ const [attachment, setAttachment] = (0, _react.useState)(_naming.PORTAL_HOST_NAME_RESET_VALUE);
43
+ const attachedHostName = (0, _reactNativeReanimated.useSharedValue)(_naming.PORTAL_HOST_NAME_RESET_VALUE);
44
+ const placeholderWidth = (0, _reactNativeReanimated.useSharedValue)(0);
45
+ const placeholderHeight = (0, _reactNativeReanimated.useSharedValue)(0);
46
+ const {
47
+ progressScreenKey,
48
+ targetScreenKey
49
+ } = (0, _attachment.resolvePortalAttachmentTargets)({
50
+ attachment,
51
+ currentScreenKey,
52
+ nextScreenKey,
53
+ portalAttachTarget,
54
+ sourcePairKey
55
+ });
56
+ const activeHostKey = (0, _hostRegistry.useActiveHostKey)(targetScreenKey);
57
+ const activeHostCapturesScroll = activeHostKey ? (0, _hostRegistry.getHostCapturesScroll)(activeHostKey) : false;
58
+ const progress = _animation.AnimationStore.getValue(progressScreenKey ?? "", "transitionProgress");
59
+ const closing = _animation.AnimationStore.getValue(progressScreenKey ?? "", "closing");
60
+ const updatePortalAttachment = (0, _react.useCallback)((matchedScreenKey, pairKey) => {
61
+ if (matchedScreenKey && pairKey) {
62
+ setAttachment(current => {
63
+ if (current?.matchedScreenKey === matchedScreenKey && current.pairKey === pairKey) {
64
+ return current;
65
+ }
66
+ return {
67
+ matchedScreenKey,
68
+ pairKey
69
+ };
70
+ });
71
+ return;
72
+ }
73
+ setAttachment(current => current ? null : current);
74
+ }, []);
75
+ (0, _react.useLayoutEffect)(() => {
76
+ if (!isPortalEnabled || !attachment || !activeHostKey || !targetScreenKey) {
77
+ attachedHostName.set(_naming.PORTAL_HOST_NAME_RESET_VALUE);
78
+ return;
79
+ }
80
+ (0, _portalBoundaryHost.mountPortalBoundaryHost)({
81
+ boundaryId: id,
82
+ capturesScroll: activeHostCapturesScroll,
83
+ hostKey: activeHostKey,
84
+ pairKey: attachment.pairKey,
85
+ screenKey: targetScreenKey
86
+ });
87
+
88
+ // The native registry parks portals whose host has not registered yet and
89
+ // re-parents the moment it does, so the host name can be handed over
90
+ // immediately — ordering belongs to the registry, not to frame counting.
91
+ // hostName rides animated props, so the handover needs no React commit.
92
+ attachedHostName.set((0, _naming.createPortalBoundaryHostName)(activeHostKey, id));
93
+ }, [activeHostKey, activeHostCapturesScroll, attachedHostName, attachment, id, isPortalEnabled, targetScreenKey]);
94
+ (0, _react.useLayoutEffect)(() => {
95
+ return () => {
96
+ attachedHostName.set(_naming.PORTAL_HOST_NAME_RESET_VALUE);
97
+ (0, _portalBoundaryHost.unmountPortalBoundaryHost)(id);
98
+ };
99
+ }, [attachedHostName, id]);
100
+ (0, _reactNativeReanimated.useAnimatedReaction)(() => {
101
+ "worklet";
102
+
103
+ if (!isPortalEnabled || !sourcePairKey) {
104
+ return null;
105
+ }
106
+ _state.pairs.get();
107
+ // Strict per-member lookup: getResolvedLink's group fallback borrows
108
+ // the initial member's link for style resolution, which would make
109
+ // every inactive group member's portal see a "complete" link and
110
+ // attach. A portal may only teleport on its OWN member's link.
111
+ const link = (0, _links.getLink)(sourcePairKey, id);
112
+ if (link?.status !== "complete") {
113
+ return null;
114
+ }
115
+
116
+ // Grouped portals teleport only while their member is the group's
117
+ // active id — retargeting detaches the previous member (its content
118
+ // returns home) and attaches the new one. Exactly one grouped member
119
+ // is teleported at a time.
120
+ if (link.group) {
121
+ const activeId = _state.pairs.get()[sourcePairKey]?.groups?.[link.group]?.activeId;
122
+ if (activeId && activeId !== (0, _linkPairs.getLinkKeyFromTag)(id)) {
123
+ return null;
124
+ }
125
+ }
126
+ return link.destination.screenKey;
127
+ }, (matchedScreenKey, previousMatchedScreenKey) => {
128
+ "worklet";
129
+
130
+ if (matchedScreenKey === previousMatchedScreenKey) {
131
+ return;
132
+ }
133
+ (0, _reactNativeReanimated.runOnJS)(updatePortalAttachment)(matchedScreenKey, sourcePairKey);
134
+ });
135
+ const teleportProps = (0, _reactNativeReanimated.useAnimatedProps)(() => {
136
+ "worklet";
137
+
138
+ // Opening waits for the destination transition to start so content is not
139
+ // re-parented before the host is visually ready. Closing stays attached
140
+ // through progress 0 so the final frame can land in the matched host.
141
+ const attachThreshold = closing.get() === 1 ? 0 : 0.001;
142
+ const {
143
+ teleport,
144
+ ...slotProps
145
+ } = stylesMap.get()[id]?.props ?? {};
146
+ const shouldTeleport = (0, _teleportControl.isTeleportEnabled)(teleport);
147
+ return {
148
+ // Preserve portal slot props from the interpolator while keeping
149
+ // hostName owned by the attachment gate below.
150
+ ...slotProps,
151
+ hostName: shouldTeleport && progress.get() >= attachThreshold ? attachedHostName.get() : _naming.PORTAL_HOST_NAME_RESET_VALUE
152
+ };
153
+ });
154
+
155
+ // Pin the placeholder to its measured size while content lives in the host,
156
+ // in the same UI frame the host name flips — no commit in between. Until the
157
+ // first layout lands (dims 0) sizing stays natural so an instant attach
158
+ // cannot collapse the slot.
159
+ const placeholderStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
160
+ "worklet";
161
+
162
+ const hostName = attachedHostName.get();
163
+ const isAttached = hostName !== null;
164
+ const width = placeholderWidth.get();
165
+ const height = placeholderHeight.get();
166
+ if (!isAttached || width === 0) {
167
+ return {
168
+ width: "auto",
169
+ height: "auto"
170
+ };
171
+ }
172
+ return {
173
+ width,
174
+ height
175
+ };
176
+ });
177
+ if (isPortalEnabled && TransitionAwareTeleport) {
178
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
179
+ ref: placeholderRef,
180
+ onLayout: event => {
181
+ placeholderWidth.set(event.nativeEvent.layout.width);
182
+ placeholderHeight.set(event.nativeEvent.layout.height);
183
+ },
184
+ style: placeholderStyle,
185
+ collapsable: false,
186
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(TransitionAwareTeleport, {
187
+ animatedProps: teleportProps,
188
+ name: id,
189
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
190
+ style: placeholderStyle,
191
+ children: children
192
+ })
193
+ })
194
+ });
195
+ }
196
+ return children;
197
+ });
198
+ //# sourceMappingURL=portal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNativeReanimated","_interopRequireWildcard","_descriptors","_styles","_animation","_linkPairs","_links","_state","_createTransitionAwareComponent","_hostRegistry","_portalBoundaryHost","_teleport","_attachment","_naming","_teleportControl","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TransitionAwareTeleport","NativePortal","createTransitionAwareComponent","Portal","exports","memo","id","children","mode","placeholderRef","isPortalEnabled","isTeleportAvailable","portalAttachTarget","attachTo","stylesMap","useScreenStyles","sourcePairKey","useDescriptorsStore","s","derivations","currentScreenKey","nextScreenKey","attachment","setAttachment","useState","PORTAL_HOST_NAME_RESET_VALUE","attachedHostName","useSharedValue","placeholderWidth","placeholderHeight","progressScreenKey","targetScreenKey","resolvePortalAttachmentTargets","activeHostKey","useActiveHostKey","activeHostCapturesScroll","getHostCapturesScroll","progress","AnimationStore","getValue","closing","updatePortalAttachment","useCallback","matchedScreenKey","pairKey","current","useLayoutEffect","mountPortalBoundaryHost","boundaryId","capturesScroll","hostKey","screenKey","createPortalBoundaryHostName","unmountPortalBoundaryHost","useAnimatedReaction","pairs","link","getLink","status","group","activeId","groups","getLinkKeyFromTag","destination","previousMatchedScreenKey","runOnJS","teleportProps","useAnimatedProps","attachThreshold","teleport","slotProps","props","shouldTeleport","isTeleportEnabled","hostName","placeholderStyle","useAnimatedStyle","isAttached","width","height","jsx","View","ref","onLayout","event","nativeEvent","layout","style","collapsable","animatedProps","name"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/components/portal.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAUA,IAAAC,sBAAA,GAAAC,uBAAA,CAAAF,OAAA;AAQA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,+BAAA,GAAAT,OAAA;AAEA,IAAAU,aAAA,GAAAV,OAAA;AAIA,IAAAW,mBAAA,GAAAX,OAAA;AAIA,IAAAY,SAAA,GAAAZ,OAAA;AACA,IAAAa,WAAA,GAAAb,OAAA;AAIA,IAAAc,OAAA,GAAAd,OAAA;AAIA,IAAAe,gBAAA,GAAAf,OAAA;AAA8D,IAAAgB,WAAA,GAAAhB,OAAA;AAAA,SAAAE,wBAAAe,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAjB,uBAAA,YAAAA,CAAAe,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA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B,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useHostMeasurement = void 0;
7
+ var _react = require("react");
8
+ var _reactNativeReanimated = require("react-native-reanimated");
9
+ var _origin = require("../../../../providers/screen/origin.provider");
10
+ var _scroll = require("../../../../stores/scroll.store");
11
+ var _measuredBounds = require("../../utils/measured-bounds");
12
+ var _hostBounds = require("../stores/host-bounds.store");
13
+ const useHostMeasurement = ({
14
+ capturesScroll,
15
+ enabled,
16
+ hostKey,
17
+ screenKey
18
+ }) => {
19
+ const hostRef = (0, _reactNativeReanimated.useAnimatedRef)();
20
+ const scrollMetadata = _scroll.ScrollStore.getValue(screenKey, "metadata");
21
+ const [canRenderHosts, setCanRenderHosts] = (0, _react.useState)(false);
22
+ const {
23
+ originRef
24
+ } = (0, _origin.useOriginContext)();
25
+ const hasMeasuredHost = (0, _reactNativeReanimated.useSharedValue)(false);
26
+ (0, _reactNativeReanimated.useAnimatedReaction)(() => {
27
+ "worklet";
28
+
29
+ if (!enabled) {
30
+ return null;
31
+ }
32
+ return hasMeasuredHost.get();
33
+ }, hasAlreadyMeasured => {
34
+ "worklet";
35
+
36
+ if (!enabled || hasAlreadyMeasured) {
37
+ return;
38
+ }
39
+ const measured = (0, _reactNativeReanimated.measure)(hostRef);
40
+ const measuredOrigin = (0, _reactNativeReanimated.measure)(originRef);
41
+ if (!measured || !measuredOrigin) {
42
+ return;
43
+ }
44
+ hasMeasuredHost.set(true);
45
+
46
+ // A measurement taken mid rubber-band would bake the transient
47
+ // overscroll displacement into the host frame. Store the at-rest
48
+ // position instead; clamped scroll deltas share that basis.
49
+ const currentScroll = scrollMetadata.get();
50
+ const overscrollNormalized = capturesScroll ? (0, _measuredBounds.adjustedMeasuredBoundsForOverscrollDeltas)(measured, currentScroll) : measured;
51
+ const normalizedMeasured = (0, _measuredBounds.normalizeMeasuredBoundsToOrigin)(overscrollNormalized, measuredOrigin);
52
+ (0, _hostBounds.setPortalHostBounds)(hostKey, {
53
+ x: normalizedMeasured.x,
54
+ y: normalizedMeasured.y,
55
+ width: normalizedMeasured.width,
56
+ height: normalizedMeasured.height,
57
+ pageX: normalizedMeasured.pageX,
58
+ pageY: normalizedMeasured.pageY,
59
+ scroll: capturesScroll ? currentScroll : null
60
+ });
61
+ (0, _reactNativeReanimated.runOnJS)(setCanRenderHosts)(true);
62
+ });
63
+ (0, _react.useLayoutEffect)(() => {
64
+ return () => {
65
+ (0, _reactNativeReanimated.runOnUI)(_hostBounds.clearPortalHostBounds)(hostKey);
66
+ };
67
+ }, [hostKey]);
68
+ return {
69
+ canRenderHosts,
70
+ hostRef
71
+ };
72
+ };
73
+ exports.useHostMeasurement = useHostMeasurement;
74
+ //# sourceMappingURL=use-host-measurement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNativeReanimated","_origin","_scroll","_measuredBounds","_hostBounds","useHostMeasurement","capturesScroll","enabled","hostKey","screenKey","hostRef","useAnimatedRef","scrollMetadata","ScrollStore","getValue","canRenderHosts","setCanRenderHosts","useState","originRef","useOriginContext","hasMeasuredHost","useSharedValue","useAnimatedReaction","get","hasAlreadyMeasured","measured","measure","measuredOrigin","set","currentScroll","overscrollNormalized","adjustedMeasuredBoundsForOverscrollDeltas","normalizedMeasured","normalizeMeasuredBoundsToOrigin","setPortalHostBounds","x","y","width","height","pageX","pageY","scroll","runOnJS","useLayoutEffect","runOnUI","clearPortalHostBounds","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/hooks/use-host-measurement.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,sBAAA,GAAAD,OAAA;AAQA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AAIA,IAAAK,WAAA,GAAAL,OAAA;AAYO,MAAMM,kBA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MACvBC,CAAC,EAAEJ,kBAAkB,CAACI,CAAC;MACvBC,KAAK,EAAEL,kBAAkB,CAACK,KAAK;MAC/BC,MAAM,EAAEN,kBAAkB,CAACM,MAAM;MACjCC,KAAK,EAAEP,kBAAkB,CAACO,KAAK;MAC/BC,KAAK,EAAER,kBAAkB,CAACQ,KAAK;MAC/BC,MAAM,EAAEnC,cAAc,GAAGuB,aAAa,GAAG;IAC1C,CAAC,CAAC;IAEF,IAAAa,8BAAO,EAAC1B,iBAAiB,CAAC,CAAC,IAAI,CAAC;EACjC,CACD,CAAC;EAED,IAAA2B,sBAAe,EAAC,MAAM;IACrB,OAAO,MAAM;MACZ,IAAAC,8BAAO,EAACC,iCAAqB,CAAC,CAACrC,OAAO,CAAC;IACxC,CAAC;EACF,CAAC,EAAE,CAACA,OAAO,CAAC,CAAC;EAEb,OAAO;IACNO,cAAc;IACdL;EACD,CAAC;AACF,CAAC;AAACoC,OAAA,CAAAzC,kBAAA,GAAAA,kBAAA","ignoreList":[]}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "Host", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _host.Host;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "Portal", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _portal.Portal;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "PortalProvider", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _portalProvider.PortalProvider;
22
+ }
23
+ });
24
+ var _host = require("./components/host");
25
+ var _portal = require("./components/portal");
26
+ var _portalProvider = require("./components/portal-provider");
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_host","require","_portal","_portalProvider"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/portal/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA","ignoreList":[]}
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.setPortalHostBounds = exports.getPortalHostBounds = exports.clearPortalHostBounds = void 0;
7
+ var _reactNativeReanimated = require("react-native-reanimated");
8
+ var _scroll = require("../../../../stores/scroll.store");
9
+ const portalHostBounds = (0, _reactNativeReanimated.makeMutable)({});
10
+ const getPortalHostBounds = hostKey => {
11
+ "worklet";
12
+
13
+ return portalHostBounds.get()[hostKey] ?? null;
14
+ };
15
+ exports.getPortalHostBounds = getPortalHostBounds;
16
+ const setPortalHostBounds = (hostKey, bounds) => {
17
+ "worklet";
18
+
19
+ const nextBounds = {
20
+ ...bounds,
21
+ scroll: (0, _scroll.cloneScrollMetadataState)(bounds.scroll)
22
+ };
23
+ portalHostBounds.set(state => {
24
+ "worklet";
25
+
26
+ return {
27
+ ...state,
28
+ [hostKey]: nextBounds
29
+ };
30
+ });
31
+ };
32
+ exports.setPortalHostBounds = setPortalHostBounds;
33
+ const clearPortalHostBounds = hostKey => {
34
+ "worklet";
35
+
36
+ portalHostBounds.set(state => {
37
+ "worklet";
38
+
39
+ const nextState = {
40
+ ...state
41
+ };
42
+ delete nextState[hostKey];
43
+ return nextState;
44
+ });
45
+ };
46
+ exports.clearPortalHostBounds = clearPortalHostBounds;
47
+ //# sourceMappingURL=host-bounds.store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNativeReanimated","require","_scroll","portalHostBounds","makeMutable","getPortalHostBounds","hostKey","get","exports","setPortalHostBounds","bounds","nextBounds","scroll","cloneScrollMetadataState","set","state","clearPortalHostBounds","nextState"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/stores/host-bounds.store.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AASA,MAAME,gBAAgB,GAAG,IAAAC,kCAAW,EAAwB,CAAC,CAAC,CAAC;AAExD,MAAMC,mBAAmB,GAAIC,OAAe,IAAK;EACvD,SAAS;;EACT,OAAOH,gBAAgB,CAACI,GAAG,CAAC,CAAC,CAACD,OAAO,CAAC,IAAI,IAAI;AAC/C,CAAC;AAACE,OAAA,CAAAH,mBAAA,GAAAA,mBAAA;AAEK,MAAMI,mBAAmB,GAAGA,CAClCH,OAAe,EACfI,MAAwB,KACpB;EACJ,SAAS;;EACT,MAAMC,UAA4B,GAAG;IACpC,GAAGD,MAAM;IACTE,MAAM,EAAE,IAAAC,gCAAwB,EAACH,MAAM,CAACE,MAAM;EAC/C,CAAC;EAEDT,gBAAgB,CAACW,GAAG,CAAEC,KAAK,IAAK;IAC/B,SAAS;;IACT,OAAO;MACN,GAAGA,KAAK;MACR,CAACT,OAAO,GAAGK;IACZ,CAAC;EACF,CAAC,CAAC;AACH,CAAC;AAACH,OAAA,CAAAC,mBAAA,GAAAA,mBAAA;AAEK,MAAMO,qBAAqB,GAAIV,OAAe,IAAK;EACzD,SAAS;;EACTH,gBAAgB,CAACW,GAAG,CAAEC,KAAK,IAAK;IAC/B,SAAS;;IACT,MAAME,SAAgC,GAAG;MAAE,GAAGF;IAAM,CAAC;IACrD,OAAOE,SAAS,CAACX,OAAO,CAAC;IACzB,OAAOW,SAAS;EACjB,CAAC,CAAC;AACH,CAAC;AAACT,OAAA,CAAAQ,qBAAA,GAAAA,qBAAA","ignoreList":[]}