react-native-screen-transitions 3.4.0-rc.1 → 3.5.0-beta.0

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 (504) hide show
  1. package/README.md +5 -2
  2. package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js +21 -32
  3. package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js.map +1 -1
  4. package/lib/commonjs/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js +2 -2
  5. package/lib/commonjs/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js.map +1 -1
  6. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +5 -5
  7. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +1 -1
  8. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement.js +27 -0
  9. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement.js.map +1 -0
  10. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-presence.js +7 -2
  11. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +1 -1
  12. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-capture-destination-boundary.js +110 -0
  13. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-capture-destination-boundary.js.map +1 -0
  14. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-capture-source-boundary.js +40 -0
  15. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-capture-source-boundary.js.map +1 -0
  16. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-measurer.js +79 -0
  17. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-measurer.js.map +1 -0
  18. package/lib/commonjs/shared/components/create-boundary-component/hooks/{use-pre-transition-measurement.js → use-refresh-boundary.js} +26 -27
  19. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map +1 -0
  20. package/lib/commonjs/shared/components/create-transition-aware-component.js +4 -13
  21. package/lib/commonjs/shared/components/create-transition-aware-component.js.map +1 -1
  22. package/lib/commonjs/shared/components/overlay/variations/float-overlay.js +1 -0
  23. package/lib/commonjs/shared/components/overlay/variations/float-overlay.js.map +1 -1
  24. package/lib/commonjs/shared/components/screen-container/hooks/use-content-layout.js +7 -10
  25. package/lib/commonjs/shared/components/screen-container/hooks/use-content-layout.js.map +1 -1
  26. package/lib/commonjs/shared/components/screen-container/layers/backdrop.js +3 -3
  27. package/lib/commonjs/shared/components/screen-container/layers/backdrop.js.map +1 -1
  28. package/lib/commonjs/shared/components/screen-container/layers/content.js +4 -5
  29. package/lib/commonjs/shared/components/screen-container/layers/content.js.map +1 -1
  30. package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js +3 -3
  31. package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
  32. package/lib/commonjs/shared/components/screen-container/layers/surface-container.js +3 -3
  33. package/lib/commonjs/shared/components/screen-container/layers/surface-container.js.map +1 -1
  34. package/lib/commonjs/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.js +28 -0
  35. package/lib/commonjs/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.js.map +1 -0
  36. package/lib/commonjs/shared/components/screen-lifecycle/hooks/history/navigator-route-registry.js.map +1 -0
  37. package/lib/commonjs/shared/components/screen-lifecycle/hooks/{use-screen-events.js → history/use-screen-history.js} +17 -11
  38. package/lib/commonjs/shared/components/screen-lifecycle/hooks/history/use-screen-history.js.map +1 -0
  39. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js +140 -0
  40. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js.map +1 -0
  41. package/lib/commonjs/shared/components/screen-lifecycle/hooks/{use-open-transition.js → use-open-transition-intent.js} +14 -24
  42. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-open-transition-intent.js.map +1 -0
  43. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js +53 -0
  44. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js.map +1 -0
  45. package/lib/commonjs/shared/components/screen-lifecycle/index.js +17 -14
  46. package/lib/commonjs/shared/components/screen-lifecycle/index.js.map +1 -1
  47. package/lib/commonjs/shared/constants.js +6 -17
  48. package/lib/commonjs/shared/constants.js.map +1 -1
  49. package/lib/commonjs/shared/providers/register-bounds.provider.js +6 -9
  50. package/lib/commonjs/shared/providers/register-bounds.provider.js.map +1 -1
  51. package/lib/commonjs/shared/providers/screen/animation/animation.provider.js +26 -44
  52. package/lib/commonjs/shared/providers/screen/animation/animation.provider.js.map +1 -1
  53. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state.js +19 -35
  54. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state.js.map +1 -1
  55. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +64 -38
  56. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  57. package/lib/commonjs/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js.map +1 -1
  58. package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js +3 -2
  59. package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -1
  60. package/lib/commonjs/shared/providers/screen/animation/types.js +4 -0
  61. package/lib/commonjs/shared/providers/screen/animation/use-screen-animation.js +19 -5
  62. package/lib/commonjs/shared/providers/screen/animation/use-screen-animation.js.map +1 -1
  63. package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js +1 -0
  64. package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js.map +1 -1
  65. package/lib/commonjs/shared/providers/screen/styles/components/maybe-floating-container.js +29 -0
  66. package/lib/commonjs/shared/providers/screen/styles/components/maybe-floating-container.js.map +1 -0
  67. package/lib/commonjs/shared/providers/screen/styles/constants.js +36 -0
  68. package/lib/commonjs/shared/providers/screen/styles/constants.js.map +1 -0
  69. package/lib/commonjs/shared/providers/screen/styles/helpers/normalize-slots.js +49 -0
  70. package/lib/commonjs/shared/providers/screen/styles/helpers/normalize-slots.js.map +1 -0
  71. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles.js +137 -0
  72. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles.js.map +1 -0
  73. package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +75 -0
  74. package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -0
  75. package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +49 -0
  76. package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -0
  77. package/lib/commonjs/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js +31 -0
  78. package/lib/commonjs/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js.map +1 -0
  79. package/lib/commonjs/shared/providers/screen/styles/styles.provider.js +33 -107
  80. package/lib/commonjs/shared/providers/screen/styles/styles.provider.js.map +1 -1
  81. package/lib/commonjs/shared/stores/bounds/helpers/apply-measured-bounds-writes.js +13 -7
  82. package/lib/commonjs/shared/stores/bounds/helpers/apply-measured-bounds-writes.js.map +1 -1
  83. package/lib/commonjs/shared/stores/bounds/helpers/keys.js +10 -0
  84. package/lib/commonjs/shared/stores/bounds/helpers/keys.js.map +1 -1
  85. package/lib/commonjs/shared/stores/bounds/index.js +26 -25
  86. package/lib/commonjs/shared/stores/bounds/index.js.map +1 -1
  87. package/lib/commonjs/shared/stores/bounds/internals/clear.js +13 -51
  88. package/lib/commonjs/shared/stores/bounds/internals/clear.js.map +1 -1
  89. package/lib/commonjs/shared/stores/bounds/internals/groups.js +27 -0
  90. package/lib/commonjs/shared/stores/bounds/internals/groups.js.map +1 -0
  91. package/lib/commonjs/shared/stores/bounds/internals/registry.js +210 -185
  92. package/lib/commonjs/shared/stores/bounds/internals/registry.js.map +1 -1
  93. package/lib/commonjs/shared/stores/bounds/internals/resolver.js +2 -6
  94. package/lib/commonjs/shared/stores/bounds/internals/resolver.js.map +1 -1
  95. package/lib/commonjs/shared/stores/bounds/internals/state.js +2 -3
  96. package/lib/commonjs/shared/stores/bounds/internals/state.js.map +1 -1
  97. package/lib/commonjs/shared/stores/system.store.js +44 -11
  98. package/lib/commonjs/shared/stores/system.store.js.map +1 -1
  99. package/lib/commonjs/shared/utils/bounds/helpers/create-bound-tag.js +4 -0
  100. package/lib/commonjs/shared/utils/bounds/helpers/create-bound-tag.js.map +1 -1
  101. package/lib/commonjs/shared/utils/bounds/helpers/create-interpolators.js +6 -6
  102. package/lib/commonjs/shared/utils/bounds/helpers/create-interpolators.js.map +1 -1
  103. package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js +9 -3
  104. package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
  105. package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js +5 -8
  106. package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
  107. package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js +2 -8
  108. package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
  109. package/lib/commonjs/shared/utils/bounds/index.js +7 -5
  110. package/lib/commonjs/shared/utils/bounds/index.js.map +1 -1
  111. package/lib/commonjs/shared/utils/bounds/zoom/build.js +44 -142
  112. package/lib/commonjs/shared/utils/bounds/zoom/build.js.map +1 -1
  113. package/lib/commonjs/shared/utils/create-store.js +13 -4
  114. package/lib/commonjs/shared/utils/create-store.js.map +1 -1
  115. package/lib/module/shared/components/create-boundary-component/create-boundary-component.js +21 -32
  116. package/lib/module/shared/components/create-boundary-component/create-boundary-component.js.map +1 -1
  117. package/lib/module/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js +2 -2
  118. package/lib/module/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js.map +1 -1
  119. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +2 -2
  120. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +1 -1
  121. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement.js +21 -0
  122. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement.js.map +1 -0
  123. package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js +7 -2
  124. package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +1 -1
  125. package/lib/module/shared/components/create-boundary-component/hooks/use-capture-destination-boundary.js +105 -0
  126. package/lib/module/shared/components/create-boundary-component/hooks/use-capture-destination-boundary.js.map +1 -0
  127. package/lib/module/shared/components/create-boundary-component/hooks/use-capture-source-boundary.js +35 -0
  128. package/lib/module/shared/components/create-boundary-component/hooks/use-capture-source-boundary.js.map +1 -0
  129. package/lib/module/shared/components/create-boundary-component/hooks/use-measurer.js +74 -0
  130. package/lib/module/shared/components/create-boundary-component/hooks/use-measurer.js.map +1 -0
  131. package/lib/module/shared/components/create-boundary-component/hooks/{use-pre-transition-measurement.js → use-refresh-boundary.js} +24 -25
  132. package/lib/module/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map +1 -0
  133. package/lib/module/shared/components/create-transition-aware-component.js +4 -13
  134. package/lib/module/shared/components/create-transition-aware-component.js.map +1 -1
  135. package/lib/module/shared/components/overlay/variations/float-overlay.js +1 -0
  136. package/lib/module/shared/components/overlay/variations/float-overlay.js.map +1 -1
  137. package/lib/module/shared/components/screen-container/hooks/use-content-layout.js +8 -11
  138. package/lib/module/shared/components/screen-container/hooks/use-content-layout.js.map +1 -1
  139. package/lib/module/shared/components/screen-container/layers/backdrop.js +3 -3
  140. package/lib/module/shared/components/screen-container/layers/backdrop.js.map +1 -1
  141. package/lib/module/shared/components/screen-container/layers/content.js +4 -5
  142. package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
  143. package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js +3 -3
  144. package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
  145. package/lib/module/shared/components/screen-container/layers/surface-container.js +3 -3
  146. package/lib/module/shared/components/screen-container/layers/surface-container.js.map +1 -1
  147. package/lib/module/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.js +24 -0
  148. package/lib/module/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.js.map +1 -0
  149. package/lib/module/shared/components/screen-lifecycle/hooks/history/navigator-route-registry.js.map +1 -0
  150. package/lib/module/shared/components/screen-lifecycle/hooks/{use-screen-events.js → history/use-screen-history.js} +16 -10
  151. package/lib/module/shared/components/screen-lifecycle/hooks/history/use-screen-history.js.map +1 -0
  152. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js +134 -0
  153. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js.map +1 -0
  154. package/lib/module/shared/components/screen-lifecycle/hooks/{use-open-transition.js → use-open-transition-intent.js} +13 -24
  155. package/lib/module/shared/components/screen-lifecycle/hooks/use-open-transition-intent.js.map +1 -0
  156. package/lib/module/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js +48 -0
  157. package/lib/module/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js.map +1 -0
  158. package/lib/module/shared/components/screen-lifecycle/index.js +18 -15
  159. package/lib/module/shared/components/screen-lifecycle/index.js.map +1 -1
  160. package/lib/module/shared/constants.js +5 -16
  161. package/lib/module/shared/constants.js.map +1 -1
  162. package/lib/module/shared/providers/register-bounds.provider.js +6 -9
  163. package/lib/module/shared/providers/register-bounds.provider.js.map +1 -1
  164. package/lib/module/shared/providers/screen/animation/animation.provider.js +22 -43
  165. package/lib/module/shared/providers/screen/animation/animation.provider.js.map +1 -1
  166. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state.js +19 -35
  167. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state.js.map +1 -1
  168. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +65 -39
  169. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  170. package/lib/module/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js.map +1 -1
  171. package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js +3 -2
  172. package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -1
  173. package/lib/module/shared/providers/screen/animation/types.js +2 -0
  174. package/lib/module/shared/providers/screen/animation/use-screen-animation.js +19 -5
  175. package/lib/module/shared/providers/screen/animation/use-screen-animation.js.map +1 -1
  176. package/lib/module/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js +1 -0
  177. package/lib/module/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js.map +1 -1
  178. package/lib/module/shared/providers/screen/styles/components/maybe-floating-container.js +25 -0
  179. package/lib/module/shared/providers/screen/styles/components/maybe-floating-container.js.map +1 -0
  180. package/lib/module/shared/providers/screen/styles/constants.js +31 -0
  181. package/lib/module/shared/providers/screen/styles/constants.js.map +1 -0
  182. package/lib/module/shared/providers/screen/styles/helpers/normalize-slots.js +45 -0
  183. package/lib/module/shared/providers/screen/styles/helpers/normalize-slots.js.map +1 -0
  184. package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles.js +132 -0
  185. package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles.js.map +1 -0
  186. package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +70 -0
  187. package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -0
  188. package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +44 -0
  189. package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -0
  190. package/lib/module/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js +26 -0
  191. package/lib/module/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js.map +1 -0
  192. package/lib/module/shared/providers/screen/styles/styles.provider.js +34 -108
  193. package/lib/module/shared/providers/screen/styles/styles.provider.js.map +1 -1
  194. package/lib/module/shared/stores/bounds/helpers/apply-measured-bounds-writes.js +13 -7
  195. package/lib/module/shared/stores/bounds/helpers/apply-measured-bounds-writes.js.map +1 -1
  196. package/lib/module/shared/stores/bounds/helpers/keys.js +8 -0
  197. package/lib/module/shared/stores/bounds/helpers/keys.js.map +1 -1
  198. package/lib/module/shared/stores/bounds/index.js +27 -26
  199. package/lib/module/shared/stores/bounds/index.js.map +1 -1
  200. package/lib/module/shared/stores/bounds/internals/clear.js +14 -52
  201. package/lib/module/shared/stores/bounds/internals/clear.js.map +1 -1
  202. package/lib/module/shared/stores/bounds/internals/groups.js +23 -0
  203. package/lib/module/shared/stores/bounds/internals/groups.js.map +1 -0
  204. package/lib/module/shared/stores/bounds/internals/registry.js +204 -178
  205. package/lib/module/shared/stores/bounds/internals/registry.js.map +1 -1
  206. package/lib/module/shared/stores/bounds/internals/resolver.js +2 -6
  207. package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -1
  208. package/lib/module/shared/stores/bounds/internals/state.js +1 -2
  209. package/lib/module/shared/stores/bounds/internals/state.js.map +1 -1
  210. package/lib/module/shared/stores/system.store.js +43 -10
  211. package/lib/module/shared/stores/system.store.js.map +1 -1
  212. package/lib/module/shared/types/animation.types.js.map +1 -1
  213. package/lib/module/shared/utils/bounds/helpers/create-bound-tag.js +4 -0
  214. package/lib/module/shared/utils/bounds/helpers/create-bound-tag.js.map +1 -1
  215. package/lib/module/shared/utils/bounds/helpers/create-interpolators.js +6 -6
  216. package/lib/module/shared/utils/bounds/helpers/create-interpolators.js.map +1 -1
  217. package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js +9 -3
  218. package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
  219. package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js +5 -8
  220. package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
  221. package/lib/module/shared/utils/bounds/helpers/styles/compute.js +3 -9
  222. package/lib/module/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
  223. package/lib/module/shared/utils/bounds/index.js +7 -5
  224. package/lib/module/shared/utils/bounds/index.js.map +1 -1
  225. package/lib/module/shared/utils/bounds/zoom/build.js +46 -144
  226. package/lib/module/shared/utils/bounds/zoom/build.js.map +1 -1
  227. package/lib/module/shared/utils/create-store.js +13 -4
  228. package/lib/module/shared/utils/create-store.js.map +1 -1
  229. package/lib/typescript/shared/components/create-boundary-component/components/boundary-target.d.ts +3 -206
  230. package/lib/typescript/shared/components/create-boundary-component/components/boundary-target.d.ts.map +1 -1
  231. package/lib/typescript/shared/components/create-boundary-component/create-boundary-component.d.ts.map +1 -1
  232. package/lib/typescript/shared/components/create-boundary-component/helpers/resolve-pending-source-key.d.ts.map +1 -1
  233. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts +8 -8
  234. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts.map +1 -1
  235. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement.d.ts +5 -0
  236. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement.d.ts.map +1 -0
  237. package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-presence.d.ts.map +1 -1
  238. package/lib/typescript/shared/components/create-boundary-component/hooks/use-capture-destination-boundary.d.ts +13 -0
  239. package/lib/typescript/shared/components/create-boundary-component/hooks/use-capture-destination-boundary.d.ts.map +1 -0
  240. package/lib/typescript/shared/components/create-boundary-component/hooks/use-capture-source-boundary.d.ts +10 -0
  241. package/lib/typescript/shared/components/create-boundary-component/hooks/use-capture-source-boundary.d.ts.map +1 -0
  242. package/lib/typescript/shared/components/create-boundary-component/hooks/{use-boundary-measure-and-store.d.ts → use-measurer.d.ts} +6 -4
  243. package/lib/typescript/shared/components/create-boundary-component/hooks/use-measurer.d.ts.map +1 -0
  244. package/lib/typescript/shared/components/create-boundary-component/hooks/use-refresh-boundary.d.ts +14 -0
  245. package/lib/typescript/shared/components/create-boundary-component/hooks/use-refresh-boundary.d.ts.map +1 -0
  246. package/lib/typescript/shared/components/create-boundary-component/index.d.ts +2 -206
  247. package/lib/typescript/shared/components/create-boundary-component/index.d.ts.map +1 -1
  248. package/lib/typescript/shared/components/create-boundary-component/types.d.ts +6 -3
  249. package/lib/typescript/shared/components/create-boundary-component/types.d.ts.map +1 -1
  250. package/lib/typescript/shared/components/create-transition-aware-component.d.ts +5 -6
  251. package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -1
  252. package/lib/typescript/shared/components/screen-container/hooks/use-content-layout.d.ts.map +1 -1
  253. package/lib/typescript/shared/components/screen-container/layers/content.d.ts.map +1 -1
  254. package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts.map +1 -1
  255. package/lib/typescript/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.d.ts +2 -0
  256. package/lib/typescript/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.d.ts.map +1 -0
  257. package/lib/typescript/shared/components/screen-lifecycle/hooks/history/navigator-route-registry.d.ts.map +1 -0
  258. package/lib/typescript/shared/components/screen-lifecycle/hooks/history/use-screen-history.d.ts +7 -0
  259. package/lib/typescript/shared/components/screen-lifecycle/hooks/history/use-screen-history.d.ts.map +1 -0
  260. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition-intent.d.ts +11 -0
  261. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition-intent.d.ts.map +1 -0
  262. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-open-transition-intent.d.ts +8 -0
  263. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-open-transition-intent.d.ts.map +1 -0
  264. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-transition-start-controller.d.ts +11 -0
  265. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-transition-start-controller.d.ts.map +1 -0
  266. package/lib/typescript/shared/components/screen-lifecycle/index.d.ts.map +1 -1
  267. package/lib/typescript/shared/constants.d.ts +1 -14
  268. package/lib/typescript/shared/constants.d.ts.map +1 -1
  269. package/lib/typescript/shared/index.d.ts +647 -909
  270. package/lib/typescript/shared/index.d.ts.map +1 -1
  271. package/lib/typescript/shared/providers/register-bounds.provider.d.ts.map +1 -1
  272. package/lib/typescript/shared/providers/screen/animation/animation.provider.d.ts +7 -8
  273. package/lib/typescript/shared/providers/screen/animation/animation.provider.d.ts.map +1 -1
  274. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state.d.ts +0 -8
  275. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state.d.ts.map +1 -1
  276. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts +3 -3
  277. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
  278. package/lib/typescript/shared/providers/screen/animation/helpers/resolve-screen-animation-target.d.ts +4 -6
  279. package/lib/typescript/shared/providers/screen/animation/helpers/resolve-screen-animation-target.d.ts.map +1 -1
  280. package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts.map +1 -1
  281. package/lib/typescript/shared/providers/screen/animation/types.d.ts +7 -0
  282. package/lib/typescript/shared/providers/screen/animation/types.d.ts.map +1 -1
  283. package/lib/typescript/shared/providers/screen/animation/use-screen-animation.d.ts +1 -1
  284. package/lib/typescript/shared/providers/screen/animation/use-screen-animation.d.ts.map +1 -1
  285. package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.d.ts +1 -0
  286. package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.d.ts.map +1 -1
  287. package/lib/typescript/shared/providers/screen/styles/components/maybe-floating-container.d.ts +7 -0
  288. package/lib/typescript/shared/providers/screen/styles/components/maybe-floating-container.d.ts.map +1 -0
  289. package/lib/typescript/shared/providers/screen/styles/constants.d.ts +23 -0
  290. package/lib/typescript/shared/providers/screen/styles/constants.d.ts.map +1 -0
  291. package/lib/typescript/shared/providers/screen/styles/helpers/normalize-slots.d.ts +3 -0
  292. package/lib/typescript/shared/providers/screen/styles/helpers/normalize-slots.d.ts.map +1 -0
  293. package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles.d.ts +17 -0
  294. package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles.d.ts.map +1 -0
  295. package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts +3 -0
  296. package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -0
  297. package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts +9 -0
  298. package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts.map +1 -0
  299. package/lib/typescript/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.d.ts +9 -0
  300. package/lib/typescript/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.d.ts.map +1 -0
  301. package/lib/typescript/shared/providers/screen/styles/styles.provider.d.ts +2 -2
  302. package/lib/typescript/shared/providers/screen/styles/styles.provider.d.ts.map +1 -1
  303. package/lib/typescript/shared/stores/animation.store.d.ts +1 -7
  304. package/lib/typescript/shared/stores/animation.store.d.ts.map +1 -1
  305. package/lib/typescript/shared/stores/bounds/helpers/apply-measured-bounds-writes.d.ts +1 -1
  306. package/lib/typescript/shared/stores/bounds/helpers/apply-measured-bounds-writes.d.ts.map +1 -1
  307. package/lib/typescript/shared/stores/bounds/helpers/keys.d.ts +1 -0
  308. package/lib/typescript/shared/stores/bounds/helpers/keys.d.ts.map +1 -1
  309. package/lib/typescript/shared/stores/bounds/index.d.ts +28 -27
  310. package/lib/typescript/shared/stores/bounds/index.d.ts.map +1 -1
  311. package/lib/typescript/shared/stores/bounds/internals/clear.d.ts.map +1 -1
  312. package/lib/typescript/shared/stores/bounds/internals/groups.d.ts +4 -0
  313. package/lib/typescript/shared/stores/bounds/internals/groups.d.ts.map +1 -0
  314. package/lib/typescript/shared/stores/bounds/internals/registry.d.ts +12 -11
  315. package/lib/typescript/shared/stores/bounds/internals/registry.d.ts.map +1 -1
  316. package/lib/typescript/shared/stores/bounds/internals/resolver.d.ts.map +1 -1
  317. package/lib/typescript/shared/stores/bounds/internals/state.d.ts +1 -2
  318. package/lib/typescript/shared/stores/bounds/internals/state.d.ts.map +1 -1
  319. package/lib/typescript/shared/stores/bounds/types.d.ts +21 -19
  320. package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
  321. package/lib/typescript/shared/stores/gesture.store.d.ts +1 -7
  322. package/lib/typescript/shared/stores/gesture.store.d.ts.map +1 -1
  323. package/lib/typescript/shared/stores/system.store.d.ts +33 -8
  324. package/lib/typescript/shared/stores/system.store.d.ts.map +1 -1
  325. package/lib/typescript/shared/types/animation.types.d.ts +5 -25
  326. package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
  327. package/lib/typescript/shared/types/bounds.types.d.ts +7 -5
  328. package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
  329. package/lib/typescript/shared/types/screen.types.d.ts +20 -0
  330. package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
  331. package/lib/typescript/shared/utils/bounds/helpers/create-bound-tag.d.ts +6 -2
  332. package/lib/typescript/shared/utils/bounds/helpers/create-bound-tag.d.ts.map +1 -1
  333. package/lib/typescript/shared/utils/bounds/helpers/create-interpolators.d.ts.map +1 -1
  334. package/lib/typescript/shared/utils/bounds/helpers/create-link-accessor.d.ts +3 -2
  335. package/lib/typescript/shared/utils/bounds/helpers/create-link-accessor.d.ts.map +1 -1
  336. package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts +1 -1
  337. package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts.map +1 -1
  338. package/lib/typescript/shared/utils/bounds/helpers/styles/compute.d.ts.map +1 -1
  339. package/lib/typescript/shared/utils/bounds/index.d.ts.map +1 -1
  340. package/lib/typescript/shared/utils/bounds/zoom/build.d.ts +1 -1
  341. package/lib/typescript/shared/utils/bounds/zoom/build.d.ts.map +1 -1
  342. package/lib/typescript/shared/utils/bounds/zoom/types.d.ts +1 -1
  343. package/lib/typescript/shared/utils/bounds/zoom/types.d.ts.map +1 -1
  344. package/lib/typescript/shared/utils/create-store.d.ts +13 -8
  345. package/lib/typescript/shared/utils/create-store.d.ts.map +1 -1
  346. package/package.json +1 -1
  347. package/src/shared/components/create-boundary-component/create-boundary-component.tsx +21 -39
  348. package/src/shared/components/create-boundary-component/helpers/resolve-pending-source-key.ts +3 -6
  349. package/src/shared/components/create-boundary-component/hooks/helpers/measurement-rules.ts +12 -12
  350. package/src/shared/components/create-boundary-component/hooks/helpers/measurement.ts +43 -0
  351. package/src/shared/components/create-boundary-component/hooks/use-boundary-presence.ts +3 -8
  352. package/src/shared/components/create-boundary-component/hooks/use-capture-destination-boundary.ts +149 -0
  353. package/src/shared/components/create-boundary-component/hooks/use-capture-source-boundary.ts +42 -0
  354. package/src/shared/components/create-boundary-component/hooks/use-measurer.ts +144 -0
  355. package/src/shared/components/create-boundary-component/hooks/{use-pre-transition-measurement.ts → use-refresh-boundary.ts} +35 -30
  356. package/src/shared/components/create-boundary-component/types.ts +7 -3
  357. package/src/shared/components/create-transition-aware-component.tsx +4 -13
  358. package/src/shared/components/overlay/variations/float-overlay.tsx +1 -1
  359. package/src/shared/components/screen-container/hooks/use-content-layout.ts +14 -11
  360. package/src/shared/components/screen-container/layers/backdrop.tsx +3 -3
  361. package/src/shared/components/screen-container/layers/content.tsx +4 -7
  362. package/src/shared/components/screen-container/layers/maybe-masked-navigation-container.tsx +3 -5
  363. package/src/shared/components/screen-container/layers/surface-container.tsx +3 -3
  364. package/src/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.ts +29 -0
  365. package/src/shared/components/screen-lifecycle/hooks/{use-screen-events.ts → history/use-screen-history.ts} +25 -9
  366. package/src/shared/components/screen-lifecycle/hooks/use-close-transition-intent.ts +160 -0
  367. package/src/shared/components/screen-lifecycle/hooks/{use-open-transition.ts → use-open-transition-intent.ts} +19 -23
  368. package/src/shared/components/screen-lifecycle/hooks/use-transition-start-controller.ts +71 -0
  369. package/src/shared/components/screen-lifecycle/index.tsx +17 -17
  370. package/src/shared/constants.ts +3 -11
  371. package/src/shared/providers/register-bounds.provider.tsx +7 -12
  372. package/src/shared/providers/screen/animation/animation.provider.tsx +30 -68
  373. package/src/shared/providers/screen/animation/helpers/hydrate-transition-state.ts +20 -33
  374. package/src/shared/providers/screen/animation/helpers/pipeline.ts +96 -69
  375. package/src/shared/providers/screen/animation/helpers/resolve-screen-animation-target.ts +5 -7
  376. package/src/shared/providers/screen/animation/helpers/use-build-transition-state.ts +14 -2
  377. package/src/shared/providers/screen/animation/types.ts +9 -0
  378. package/src/shared/providers/screen/animation/use-screen-animation.tsx +25 -7
  379. package/src/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.ts +2 -0
  380. package/src/shared/providers/screen/styles/components/maybe-floating-container.tsx +29 -0
  381. package/src/shared/providers/screen/styles/constants.ts +34 -0
  382. package/src/shared/providers/screen/styles/helpers/normalize-slots.ts +61 -0
  383. package/src/shared/providers/screen/styles/helpers/resolve-slot-styles.ts +190 -0
  384. package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +85 -0
  385. package/src/shared/providers/screen/styles/hooks/use-maybe-block-visibility.tsx +51 -0
  386. package/src/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.tsx +40 -0
  387. package/src/shared/providers/screen/styles/styles.provider.tsx +42 -146
  388. package/src/shared/stores/bounds/helpers/apply-measured-bounds-writes.ts +15 -13
  389. package/src/shared/stores/bounds/helpers/keys.ts +8 -0
  390. package/src/shared/stores/bounds/index.ts +37 -44
  391. package/src/shared/stores/bounds/internals/clear.ts +22 -86
  392. package/src/shared/stores/bounds/internals/groups.ts +20 -0
  393. package/src/shared/stores/bounds/internals/registry.ts +280 -234
  394. package/src/shared/stores/bounds/internals/resolver.ts +1 -5
  395. package/src/shared/stores/bounds/internals/state.ts +2 -3
  396. package/src/shared/stores/bounds/types.ts +23 -21
  397. package/src/shared/stores/system.store.ts +77 -9
  398. package/src/shared/types/animation.types.ts +5 -25
  399. package/src/shared/types/bounds.types.ts +7 -8
  400. package/src/shared/types/screen.types.ts +21 -0
  401. package/src/shared/utils/bounds/helpers/create-bound-tag.ts +6 -2
  402. package/src/shared/utils/bounds/helpers/create-interpolators.ts +10 -7
  403. package/src/shared/utils/bounds/helpers/create-link-accessor.ts +12 -5
  404. package/src/shared/utils/bounds/helpers/prepare-bound-styles.ts +4 -7
  405. package/src/shared/utils/bounds/helpers/styles/compute.ts +2 -10
  406. package/src/shared/utils/bounds/index.ts +7 -6
  407. package/src/shared/utils/bounds/zoom/build.ts +53 -159
  408. package/src/shared/utils/bounds/zoom/types.ts +1 -1
  409. package/src/shared/utils/create-store.ts +39 -13
  410. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js +0 -44
  411. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js.map +0 -1
  412. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js +0 -84
  413. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js.map +0 -1
  414. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js +0 -149
  415. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js.map +0 -1
  416. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pre-transition-measurement.js.map +0 -1
  417. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/navigator-route-registry.js.map +0 -1
  418. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js +0 -29
  419. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js.map +0 -1
  420. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.js +0 -47
  421. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.js.map +0 -1
  422. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/index.js +0 -158
  423. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/index.js.map +0 -1
  424. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-high-refresh-rate.js +0 -36
  425. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-high-refresh-rate.js.map +0 -1
  426. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-open-transition.js.map +0 -1
  427. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-screen-events.js.map +0 -1
  428. package/lib/commonjs/shared/providers/screen/styles/helpers/build-resolved-style-map.js +0 -144
  429. package/lib/commonjs/shared/providers/screen/styles/helpers/build-resolved-style-map.js.map +0 -1
  430. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-interpolated-style-output.js +0 -28
  431. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-interpolated-style-output.js.map +0 -1
  432. package/lib/commonjs/shared/providers/screen/styles/helpers/split-normalized-style-maps.js +0 -39
  433. package/lib/commonjs/shared/providers/screen/styles/helpers/split-normalized-style-maps.js.map +0 -1
  434. package/lib/commonjs/shared/stores/bounds/internals/presence.js +0 -125
  435. package/lib/commonjs/shared/stores/bounds/internals/presence.js.map +0 -1
  436. package/lib/module/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js +0 -39
  437. package/lib/module/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js.map +0 -1
  438. package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js +0 -78
  439. package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js.map +0 -1
  440. package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js +0 -145
  441. package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js.map +0 -1
  442. package/lib/module/shared/components/create-boundary-component/hooks/use-pre-transition-measurement.js.map +0 -1
  443. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/navigator-route-registry.js.map +0 -1
  444. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js +0 -24
  445. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js.map +0 -1
  446. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.js +0 -42
  447. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.js.map +0 -1
  448. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/index.js +0 -153
  449. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/index.js.map +0 -1
  450. package/lib/module/shared/components/screen-lifecycle/hooks/use-high-refresh-rate.js +0 -30
  451. package/lib/module/shared/components/screen-lifecycle/hooks/use-high-refresh-rate.js.map +0 -1
  452. package/lib/module/shared/components/screen-lifecycle/hooks/use-open-transition.js.map +0 -1
  453. package/lib/module/shared/components/screen-lifecycle/hooks/use-screen-events.js.map +0 -1
  454. package/lib/module/shared/providers/screen/styles/helpers/build-resolved-style-map.js +0 -139
  455. package/lib/module/shared/providers/screen/styles/helpers/build-resolved-style-map.js.map +0 -1
  456. package/lib/module/shared/providers/screen/styles/helpers/resolve-interpolated-style-output.js +0 -23
  457. package/lib/module/shared/providers/screen/styles/helpers/resolve-interpolated-style-output.js.map +0 -1
  458. package/lib/module/shared/providers/screen/styles/helpers/split-normalized-style-maps.js +0 -34
  459. package/lib/module/shared/providers/screen/styles/helpers/split-normalized-style-maps.js.map +0 -1
  460. package/lib/module/shared/stores/bounds/internals/presence.js +0 -115
  461. package/lib/module/shared/stores/bounds/internals/presence.js.map +0 -1
  462. package/lib/typescript/shared/components/create-boundary-component/hooks/use-auto-source-measurement.d.ts +0 -10
  463. package/lib/typescript/shared/components/create-boundary-component/hooks/use-auto-source-measurement.d.ts.map +0 -1
  464. package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.d.ts.map +0 -1
  465. package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.d.ts +0 -27
  466. package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.d.ts.map +0 -1
  467. package/lib/typescript/shared/components/create-boundary-component/hooks/use-pre-transition-measurement.d.ts +0 -12
  468. package/lib/typescript/shared/components/create-boundary-component/hooks/use-pre-transition-measurement.d.ts.map +0 -1
  469. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/navigator-route-registry.d.ts.map +0 -1
  470. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.d.ts +0 -2
  471. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.d.ts.map +0 -1
  472. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.d.ts +0 -2
  473. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.d.ts.map +0 -1
  474. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/index.d.ts +0 -8
  475. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/index.d.ts.map +0 -1
  476. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-high-refresh-rate.d.ts +0 -13
  477. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-high-refresh-rate.d.ts.map +0 -1
  478. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-open-transition.d.ts +0 -12
  479. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-open-transition.d.ts.map +0 -1
  480. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-screen-events.d.ts +0 -7
  481. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-screen-events.d.ts.map +0 -1
  482. package/lib/typescript/shared/providers/screen/styles/helpers/build-resolved-style-map.d.ts +0 -11
  483. package/lib/typescript/shared/providers/screen/styles/helpers/build-resolved-style-map.d.ts.map +0 -1
  484. package/lib/typescript/shared/providers/screen/styles/helpers/resolve-interpolated-style-output.d.ts +0 -7
  485. package/lib/typescript/shared/providers/screen/styles/helpers/resolve-interpolated-style-output.d.ts.map +0 -1
  486. package/lib/typescript/shared/providers/screen/styles/helpers/split-normalized-style-maps.d.ts +0 -6
  487. package/lib/typescript/shared/providers/screen/styles/helpers/split-normalized-style-maps.d.ts.map +0 -1
  488. package/lib/typescript/shared/stores/bounds/internals/presence.d.ts +0 -12
  489. package/lib/typescript/shared/stores/bounds/internals/presence.d.ts.map +0 -1
  490. package/src/shared/components/create-boundary-component/hooks/use-auto-source-measurement.ts +0 -56
  491. package/src/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.ts +0 -154
  492. package/src/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.ts +0 -223
  493. package/src/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.ts +0 -29
  494. package/src/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.ts +0 -58
  495. package/src/shared/components/screen-lifecycle/hooks/use-close-transition/index.ts +0 -183
  496. package/src/shared/components/screen-lifecycle/hooks/use-high-refresh-rate.ts +0 -34
  497. package/src/shared/providers/screen/styles/helpers/build-resolved-style-map.ts +0 -185
  498. package/src/shared/providers/screen/styles/helpers/resolve-interpolated-style-output.ts +0 -31
  499. package/src/shared/providers/screen/styles/helpers/split-normalized-style-maps.ts +0 -44
  500. package/src/shared/stores/bounds/internals/presence.ts +0 -145
  501. /package/lib/commonjs/shared/components/screen-lifecycle/hooks/{use-close-transition/helpers → history}/navigator-route-registry.js +0 -0
  502. /package/lib/module/shared/components/screen-lifecycle/hooks/{use-close-transition/helpers → history}/navigator-route-registry.js +0 -0
  503. /package/lib/typescript/shared/components/screen-lifecycle/hooks/{use-close-transition/helpers → history}/navigator-route-registry.d.ts +0 -0
  504. /package/src/shared/components/screen-lifecycle/hooks/{use-close-transition/helpers → history}/navigator-route-registry.ts +0 -0
@@ -18,7 +18,6 @@ import { BoundStore } from "../stores/bounds";
18
18
  import { applyMeasuredBoundsWrites } from "../stores/bounds/helpers/apply-measured-bounds-writes";
19
19
  import { prepareStyleForBounds } from "../utils/bounds/helpers/styles/styles";
20
20
  import createProvider from "../utils/create-provider";
21
- import { useLayoutAnchorContext } from "./layout-anchor.provider";
22
21
  import { useDescriptorDerivations, useDescriptors } from "./screen/descriptors";
23
22
 
24
23
  interface MaybeMeasureAndStoreParams {
@@ -246,7 +245,6 @@ const registerBoundsBundle = createProvider("RegisterBounds", {
246
245
  useDescriptorDerivations();
247
246
  const currentScreenKey = current.route.key;
248
247
  const selectedNextRouteId = getRouteParamId(next?.route);
249
- const layoutAnchor = useLayoutAnchorContext();
250
248
 
251
249
  // Context & signals
252
250
  const parentContext = useRegisterBoundsContext();
@@ -278,7 +276,7 @@ const registerBoundsBundle = createProvider("RegisterBounds", {
278
276
  }
279
277
 
280
278
  if (shouldSetSource && isAnimating.get()) {
281
- const existing = BoundStore.getSnapshot(
279
+ const existing = BoundStore.entry.getMeasured(
282
280
  sharedBoundTag,
283
281
  currentScreenKey,
284
282
  );
@@ -299,12 +297,13 @@ const registerBoundsBundle = createProvider("RegisterBounds", {
299
297
  return;
300
298
  }
301
299
 
302
- const hasPendingLink = BoundStore.hasPendingLink(sharedBoundTag);
303
- const hasSourceLink = BoundStore.hasSourceLink(
300
+ const hasPendingLink =
301
+ BoundStore.link.getPending(sharedBoundTag) !== null;
302
+ const hasSourceLink = BoundStore.link.hasSource(
304
303
  sharedBoundTag,
305
304
  currentScreenKey,
306
305
  );
307
- const hasDestinationLink = BoundStore.hasDestinationLink(
306
+ const hasDestinationLink = BoundStore.link.hasDestination(
308
307
  sharedBoundTag,
309
308
  currentScreenKey,
310
309
  );
@@ -338,21 +337,17 @@ const registerBoundsBundle = createProvider("RegisterBounds", {
338
337
  return;
339
338
  }
340
339
 
341
- const correctedMeasured = layoutAnchor
342
- ? layoutAnchor.correctMeasurement(measured)
343
- : measured;
344
-
345
340
  emitUpdate();
346
341
 
347
342
  applyMeasuredBoundsWrites({
348
343
  sharedBoundTag,
349
344
  currentScreenKey,
350
- measured: correctedMeasured,
345
+ measured,
351
346
  preparedStyles,
352
347
  ancestorKeys,
353
348
  navigatorKey,
354
349
  ancestorNavigatorKeys,
355
- shouldRegisterSnapshot: true,
350
+ shouldWriteEntry: true,
356
351
  shouldSetSource: canSetSource,
357
352
  shouldUpdateSource: canUpdateSource,
358
353
  shouldSetDestination: canSetDestination,
@@ -1,7 +1,7 @@
1
- import { createContext, type ReactNode, useContext, useMemo } from "react";
2
- import { type DerivedValue, useDerivedValue } from "react-native-reanimated";
3
- import type { ScreenInterpolationProps } from "../../../types/animation.types";
1
+ import { type ReactNode, useContext } from "react";
2
+ import createProvider from "../../../utils/create-provider";
4
3
  import { useScreenAnimationPipeline } from "./helpers/pipeline";
4
+ import type { ScreenAnimationSource } from "./types";
5
5
 
6
6
  type Props = {
7
7
  children: ReactNode;
@@ -10,15 +10,20 @@ type Props = {
10
10
  export type ScreenAnimationContextValue = ReturnType<
11
11
  typeof useScreenAnimationPipeline
12
12
  > & {
13
- screenAnimation: DerivedValue<ScreenInterpolationProps>;
14
- ancestorScreenAnimations: DerivedValue<ScreenInterpolationProps>[];
13
+ ancestorScreenAnimationSources: ScreenAnimationSource[];
15
14
  };
16
15
 
17
- const ScreenAnimationContext =
18
- createContext<ScreenAnimationContextValue | null>(null);
19
- ScreenAnimationContext.displayName = "ScreenAnimation";
16
+ export type ScreenAnimationContextResult = {
17
+ value: ScreenAnimationContextValue;
18
+ };
20
19
 
21
- function ScreenAnimationProvider({ children }: Props) {
20
+ export const {
21
+ ScreenAnimationProvider,
22
+ ScreenAnimationContext,
23
+ useScreenAnimationContext,
24
+ } = createProvider("ScreenAnimation", {
25
+ guarded: true,
26
+ })<Props, ScreenAnimationContextValue>((): ScreenAnimationContextResult => {
22
27
  const parentContext = useContext(ScreenAnimationContext);
23
28
 
24
29
  const {
@@ -28,66 +33,23 @@ function ScreenAnimationProvider({ children }: Props) {
28
33
  boundsAccessor,
29
34
  } = useScreenAnimationPipeline();
30
35
 
31
- const screenAnimation = useDerivedValue<ScreenInterpolationProps>(() => {
32
- "worklet";
33
- const props = screenInterpolatorProps.value;
34
- return {
35
- ...props,
36
- bounds: boundsAccessor,
37
- };
38
- });
39
-
40
- const ancestorScreenAnimations = useMemo(() => {
41
- if (!parentContext) {
42
- return [];
43
- }
44
-
45
- return [
46
- parentContext.screenAnimation,
47
- ...parentContext.ancestorScreenAnimations,
48
- ];
49
- }, [parentContext]);
50
-
51
- const value = useMemo(
52
- () => ({
53
- screenInterpolatorProps,
54
- nextInterpolator,
55
- currentInterpolator,
56
- boundsAccessor,
57
- screenAnimation,
58
- ancestorScreenAnimations,
59
- }),
60
- [
36
+ const ancestorScreenAnimationSources = parentContext
37
+ ? [
38
+ {
39
+ screenInterpolatorProps: parentContext.screenInterpolatorProps,
40
+ boundsAccessor: parentContext.boundsAccessor,
41
+ },
42
+ ...parentContext.ancestorScreenAnimationSources,
43
+ ]
44
+ : [];
45
+
46
+ return {
47
+ value: {
61
48
  screenInterpolatorProps,
62
49
  nextInterpolator,
63
50
  currentInterpolator,
64
51
  boundsAccessor,
65
- screenAnimation,
66
- ancestorScreenAnimations,
67
- ],
68
- );
69
-
70
- return (
71
- <ScreenAnimationContext.Provider value={value}>
72
- {children}
73
- </ScreenAnimationContext.Provider>
74
- );
75
- }
76
-
77
- function useScreenAnimationContext(): ScreenAnimationContextValue {
78
- const context = useContext(ScreenAnimationContext);
79
-
80
- if (!context) {
81
- throw new Error(
82
- "ScreenAnimation context must be used within a ScreenAnimationProvider",
83
- );
84
- }
85
-
86
- return context;
87
- }
88
-
89
- export {
90
- ScreenAnimationContext,
91
- ScreenAnimationProvider,
92
- useScreenAnimationContext,
93
- };
52
+ ancestorScreenAnimationSources,
53
+ },
54
+ };
55
+ });
@@ -46,10 +46,6 @@ const computeSettled = (params: {
46
46
  return animating || dismissing || closing ? FALSE : TRUE;
47
47
  };
48
48
 
49
- /**
50
- * Computes the animated snap index based on progress and snap points.
51
- * Returns -1 if no snap points, otherwise interpolates between indices.
52
- */
53
49
  const computeSnapIndex = (progress: number, snapPoints: number[]): number => {
54
50
  "worklet";
55
51
  if (snapPoints.length === 0) return -1;
@@ -67,14 +63,6 @@ const computeSnapIndex = (progress: number, snapPoints: number[]): number => {
67
63
  return snapPoints.length - 1;
68
64
  };
69
65
 
70
- /**
71
- * Determines whether the screen transition is logically settled.
72
- *
73
- * A transition is considered logically settled when:
74
- * - The `settled` flag is explicitly set, OR
75
- * - The screen is not being dragged AND the progress is within
76
- * {@link ANIMATION_SNAP_THRESHOLD} of the target progress.
77
- */
78
66
  export const computeLogicallySettled = ({
79
67
  progress,
80
68
  targetProgress,
@@ -102,26 +90,25 @@ export const hydrateTransitionState = (
102
90
  ): ScreenTransitionState => {
103
91
  "worklet";
104
92
  const out = s.unwrapped;
105
- out.progress = s.progress.value;
106
- out.willAnimate = s.willAnimate.value;
107
- out.closing = s.closing.value;
108
- out.entering = s.entering.value;
109
- out.gesture.x = s.gesture.x.value;
110
- out.gesture.y = s.gesture.y.value;
111
- out.gesture.normX = s.gesture.normX.value;
112
- out.gesture.normY = s.gesture.normY.value;
113
- out.gesture.dismissing = s.gesture.dismissing.value;
114
- out.gesture.dragging = s.gesture.dragging.value;
115
- out.gesture.direction = s.gesture.direction.value;
93
+ out.progress = s.progress.get();
94
+ out.willAnimate = s.willAnimate.get();
95
+ out.closing = s.closing.get();
96
+ out.entering = s.entering.get();
97
+ out.gesture.x = s.gesture.x.get();
98
+ out.gesture.y = s.gesture.y.get();
99
+ out.gesture.normX = s.gesture.normX.get();
100
+ out.gesture.normY = s.gesture.normY.get();
101
+ out.gesture.dismissing = s.gesture.dismissing.get();
102
+ out.gesture.dragging = s.gesture.dragging.get();
103
+ out.gesture.direction = s.gesture.direction.get();
116
104
 
117
105
  const isGestureSettling =
118
106
  Math.abs(out.gesture.normX) > EPSILON ||
119
107
  Math.abs(out.gesture.normY) > EPSILON;
120
108
 
121
109
  out.animating =
122
- s.animating.value || out.gesture.dragging || isGestureSettling ? 1 : 0;
110
+ s.animating.get() || out.gesture.dragging || isGestureSettling ? 1 : 0;
123
111
 
124
- // Deprecated aliases (kept for backwards compatibility)
125
112
  out.gesture.normalizedX = out.gesture.normX;
126
113
  out.gesture.normalizedY = out.gesture.normY;
127
114
  out.gesture.isDismissing = out.gesture.dismissing;
@@ -134,24 +121,24 @@ export const hydrateTransitionState = (
134
121
  });
135
122
  out.logicallySettled = computeLogicallySettled({
136
123
  progress: out.progress,
137
- targetProgress: s.targetProgress.value,
124
+ targetProgress: s.targetProgress.get(),
138
125
  settled: out.settled,
139
126
  dragging: out.gesture.dragging,
140
127
  });
141
128
 
142
- if (s.settled.value !== out.settled) {
143
- s.settled.value = out.settled;
129
+ if (s.settled.get() !== out.settled) {
130
+ s.settled.set(out.settled);
144
131
  }
145
132
 
146
- if (s.logicallySettled.value !== out.logicallySettled) {
147
- s.logicallySettled.value = out.logicallySettled;
133
+ if (s.logicallySettled.get() !== out.logicallySettled) {
134
+ s.logicallySettled.set(out.logicallySettled);
148
135
  }
149
136
 
150
137
  out.meta = s.meta;
151
138
  out.layouts.screen.width = dimensions.width;
152
139
  out.layouts.screen.height = dimensions.height;
153
140
 
154
- const content = s.measuredContentLayout.value;
141
+ const content = s.measuredContentLayout.get();
155
142
  if (content) {
156
143
  if (!out.layouts.content) {
157
144
  out.layouts.content = {
@@ -167,8 +154,8 @@ export const hydrateTransitionState = (
167
154
  }
168
155
 
169
156
  const resolvedAutoSnap =
170
- s.hasAutoSnapPoint && s.resolvedAutoSnapPoint.value > 0
171
- ? s.resolvedAutoSnapPoint.value
157
+ s.hasAutoSnapPoint && s.resolvedAutoSnapPoint.get() > 0
158
+ ? s.resolvedAutoSnapPoint.get()
172
159
  : null;
173
160
 
174
161
  const resolvedSnapPoints =
@@ -1,8 +1,8 @@
1
1
  import { useMemo } from "react";
2
2
  import { useWindowDimensions } from "react-native";
3
3
  import {
4
- type DerivedValue,
5
- useDerivedValue,
4
+ type SharedValue,
5
+ useAnimatedReaction,
6
6
  useSharedValue,
7
7
  } from "react-native-reanimated";
8
8
  import { useSafeAreaInsets } from "react-native-safe-area-context";
@@ -12,28 +12,42 @@ import type {
12
12
  ScreenInterpolationProps,
13
13
  ScreenStyleInterpolator,
14
14
  } from "../../../../types/animation.types";
15
- import type {
16
- BoundsAccessor,
17
- BoundsInterpolationProps,
18
- } from "../../../../types/bounds.types";
15
+ import type { BoundsAccessor } from "../../../../types/bounds.types";
19
16
 
20
17
  import { createBoundsAccessor } from "../../../../utils/bounds";
21
- import { resolveNavigationMaskEnabled } from "../../../../utils/resolve-screen-transition-options";
22
18
  import { useDescriptors } from "../../descriptors";
23
19
  import { derivations } from "./derivations";
24
20
  import { hasTransitionsEnabled } from "./has-transitions-enabled";
25
21
  import { hydrateTransitionState } from "./hydrate-transition-state";
26
22
  import { useBuildTransitionState } from "./use-build-transition-state";
27
23
 
28
- type BaseInterpolatorProps = Omit<ScreenInterpolationProps, "bounds">;
24
+ export type ScreenInterpolatorFrame = Omit<ScreenInterpolationProps, "bounds">;
29
25
 
30
26
  interface ScreenAnimationPipeline {
31
- screenInterpolatorProps: DerivedValue<BaseInterpolatorProps>;
27
+ screenInterpolatorProps: SharedValue<ScreenInterpolatorFrame>;
32
28
  nextInterpolator: ScreenStyleInterpolator | undefined;
33
29
  currentInterpolator: ScreenStyleInterpolator | undefined;
34
30
  boundsAccessor: BoundsAccessor;
35
31
  }
36
32
 
33
+ const createInitialBaseInterpolatorProps = (
34
+ dimensions: ScreenInterpolatorFrame["layouts"]["screen"],
35
+ insets: ScreenInterpolatorFrame["insets"],
36
+ ): ScreenInterpolatorFrame => ({
37
+ layouts: { screen: dimensions, navigationMaskEnabled: false },
38
+ insets,
39
+ previous: undefined,
40
+ current: DEFAULT_SCREEN_TRANSITION_STATE,
41
+ next: undefined,
42
+ progress: 0,
43
+ stackProgress: 0,
44
+ snapIndex: -1,
45
+ logicallySettled: 1,
46
+ focused: true,
47
+ active: DEFAULT_SCREEN_TRANSITION_STATE,
48
+ inactive: undefined,
49
+ });
50
+
37
51
  export function useScreenAnimationPipeline(): ScreenAnimationPipeline {
38
52
  const { flags, stackProgress: rootStackProgress, routeKeys } = useStack();
39
53
  const dimensions = useWindowDimensions();
@@ -58,81 +72,94 @@ export function useScreenAnimationPipeline(): ScreenAnimationPipeline {
58
72
  !!nextRouteKey &&
59
73
  hasTransitionsEnabled(nextDescriptor?.options, transitionsAlwaysOn);
60
74
 
61
- const currentNavigationMaskEnabled = resolveNavigationMaskEnabled(
62
- currDescriptor?.options ?? {},
75
+ const screenInterpolatorProps = useSharedValue<ScreenInterpolatorFrame>(
76
+ createInitialBaseInterpolatorProps(dimensions, insets),
63
77
  );
64
78
 
65
- const boundsFrameProps = useSharedValue<BoundsInterpolationProps>({
66
- layouts: { screen: dimensions },
67
- insets,
68
- previous: undefined,
69
- current: DEFAULT_SCREEN_TRANSITION_STATE,
70
- next: undefined,
71
- progress: 0,
72
- stackProgress: 0,
73
- snapIndex: -1,
74
- logicallySettled: 1,
75
- focused: true,
76
- active: DEFAULT_SCREEN_TRANSITION_STATE,
77
- navigationMaskEnabled: currentNavigationMaskEnabled,
78
- inactive: undefined,
79
- });
80
-
81
79
  const boundsAccessor = useMemo(() => {
82
80
  return createBoundsAccessor(() => {
83
81
  "worklet";
84
- return boundsFrameProps.value;
82
+ return screenInterpolatorProps.get();
85
83
  });
86
- }, [boundsFrameProps]);
87
-
88
- const screenInterpolatorProps = useDerivedValue<BaseInterpolatorProps>(() => {
89
- "worklet";
84
+ }, [screenInterpolatorProps]);
90
85
 
91
- const previous = prevAnimation
92
- ? hydrateTransitionState(prevAnimation, dimensions)
93
- : undefined;
86
+ useAnimatedReaction(
87
+ () => {
88
+ "worklet";
94
89
 
95
- const next =
96
- nextAnimation && nextHasTransitions
97
- ? hydrateTransitionState(nextAnimation, dimensions)
90
+ const previous = prevAnimation
91
+ ? hydrateTransitionState(prevAnimation, dimensions)
98
92
  : undefined;
99
93
 
100
- const current = currentAnimation
101
- ? hydrateTransitionState(currentAnimation, dimensions)
102
- : DEFAULT_SCREEN_TRANSITION_STATE;
103
-
104
- const { progress, ...helpers } = derivations({
105
- previous,
106
- current,
107
- next,
108
- });
109
-
110
- // Compute relative stack progress: total - currentIndex
111
- // This gives us the sum of progress values from current screen onwards
112
- // Falls back to current progress if index is invalid
113
- const stackProgress =
114
- currentIndex >= 0 ? rootStackProgress.value - currentIndex : progress;
115
-
116
- const nextProps: BaseInterpolatorProps = {
117
- layouts: current.layouts,
118
- insets,
94
+ const next =
95
+ nextAnimation && nextHasTransitions
96
+ ? hydrateTransitionState(nextAnimation, dimensions)
97
+ : undefined;
98
+
99
+ const current = currentAnimation
100
+ ? hydrateTransitionState(currentAnimation, dimensions)
101
+ : DEFAULT_SCREEN_TRANSITION_STATE;
102
+
103
+ const { progress, ...helpers } = derivations({
104
+ previous,
105
+ current,
106
+ next,
107
+ });
108
+
109
+ const stackProgress =
110
+ currentIndex >= 0 ? rootStackProgress.get() - currentIndex : progress;
111
+
112
+ const focused = helpers.focused;
113
+ const active = helpers.active;
114
+ const inactive = helpers.inactive;
115
+ const snapIndex = current.snapIndex;
116
+ const logicallySettled = active.logicallySettled;
117
+
118
+ return {
119
+ previous,
120
+ current,
121
+ next,
122
+ progress,
123
+ stackProgress,
124
+ snapIndex,
125
+ logicallySettled,
126
+ focused,
127
+ active,
128
+ inactive,
129
+ };
130
+ },
131
+ ({
119
132
  previous,
120
133
  current,
121
134
  next,
122
135
  progress,
123
136
  stackProgress,
124
- snapIndex: current.snapIndex,
125
- logicallySettled: helpers.active.logicallySettled,
126
- ...helpers,
127
- };
128
-
129
- boundsFrameProps.value = {
130
- ...nextProps,
131
- navigationMaskEnabled: currentNavigationMaskEnabled,
132
- };
133
-
134
- return nextProps;
135
- });
137
+ snapIndex,
138
+ logicallySettled,
139
+ focused,
140
+ active,
141
+ inactive,
142
+ }) => {
143
+ "worklet";
144
+
145
+ screenInterpolatorProps.modify((frame) => {
146
+ "worklet";
147
+ frame.layouts = current.layouts;
148
+ frame.insets = insets;
149
+ frame.previous = previous;
150
+ frame.current = current;
151
+ frame.next = next;
152
+ frame.progress = progress;
153
+ frame.stackProgress = stackProgress;
154
+ frame.snapIndex = snapIndex;
155
+ frame.logicallySettled = logicallySettled;
156
+ frame.focused = focused;
157
+ frame.active = active;
158
+ frame.inactive = inactive;
159
+ return frame;
160
+ });
161
+ },
162
+ );
136
163
 
137
164
  const nextInterpolator = nextDescriptor?.options.screenStyleInterpolator;
138
165
  const currentInterpolator = currDescriptor?.options.screenStyleInterpolator;
@@ -1,11 +1,9 @@
1
- import type { DerivedValue } from "react-native-reanimated";
2
- import type { ScreenInterpolationProps } from "../../../../types/animation.types";
3
1
  import type { ScreenAnimationTarget } from "../types";
4
2
 
5
- type Params = {
3
+ type Params<T> = {
6
4
  target: ScreenAnimationTarget | undefined;
7
- self: DerivedValue<ScreenInterpolationProps>;
8
- ancestors: DerivedValue<ScreenInterpolationProps>[];
5
+ self: T;
6
+ ancestors: T[];
9
7
  };
10
8
 
11
9
  const isAncestorTarget = (
@@ -14,11 +12,11 @@ const isAncestorTarget = (
14
12
  return typeof target === "object" && target !== null && "ancestor" in target;
15
13
  };
16
14
 
17
- export function resolveScreenAnimationTarget({
15
+ export function resolveScreenAnimationTarget<T>({
18
16
  target,
19
17
  self,
20
18
  ancestors,
21
- }: Params): DerivedValue<ScreenInterpolationProps> {
19
+ }: Params<T>): T {
22
20
  if (!target || target === "self") {
23
21
  return self;
24
22
  }
@@ -42,6 +42,7 @@ export const useBuildTransitionState = (
42
42
  const meta = descriptor?.options?.meta;
43
43
  const route = descriptor?.route;
44
44
  const gestureEnabled = descriptor?.options?.gestureEnabled;
45
+ const navigationMaskEnabled = !!descriptor?.options?.navigationMaskEnabled;
45
46
  const snapPoints = descriptor?.options?.snapPoints;
46
47
 
47
48
  const shouldUseNeutralNextGestures =
@@ -79,7 +80,18 @@ export const useBuildTransitionState = (
79
80
  : GestureStore.getBag(key),
80
81
  route: plainRoute,
81
82
  meta: plainMeta,
82
- unwrapped: createScreenTransitionState(plainRoute, plainMeta),
83
+ unwrapped: createScreenTransitionState(
84
+ plainRoute,
85
+ plainMeta,
86
+ navigationMaskEnabled,
87
+ ),
83
88
  };
84
- }, [key, meta, route, shouldUseNeutralNextGestures, snapPoints]);
89
+ }, [
90
+ key,
91
+ meta,
92
+ route,
93
+ shouldUseNeutralNextGestures,
94
+ snapPoints,
95
+ navigationMaskEnabled,
96
+ ]);
85
97
  };
@@ -1,5 +1,14 @@
1
+ import type { SharedValue } from "react-native-reanimated";
2
+ import type { BoundsAccessor } from "../../../types/bounds.types";
3
+ import type { ScreenInterpolatorFrame } from "./helpers/pipeline";
4
+
1
5
  export type ScreenAnimationTarget =
2
6
  | "self"
3
7
  | "parent"
4
8
  | "root"
5
9
  | { ancestor: number };
10
+
11
+ export type ScreenAnimationSource = {
12
+ screenInterpolatorProps: SharedValue<ScreenInterpolatorFrame>;
13
+ boundsAccessor: BoundsAccessor;
14
+ };
@@ -1,19 +1,37 @@
1
- import type { DerivedValue } from "react-native-reanimated";
1
+ import { type DerivedValue, useDerivedValue } from "react-native-reanimated";
2
2
  import type { ScreenInterpolationProps } from "../../../types/animation.types";
3
3
  import { useScreenAnimationContext } from "./animation.provider";
4
4
  import { resolveScreenAnimationTarget } from "./helpers/resolve-screen-animation-target";
5
- import type { ScreenAnimationTarget } from "./types";
5
+ import type { ScreenAnimationSource, ScreenAnimationTarget } from "./types";
6
6
 
7
7
  export type { ScreenAnimationTarget } from "./types";
8
8
 
9
9
  export function useScreenAnimation(
10
10
  target?: ScreenAnimationTarget,
11
11
  ): DerivedValue<ScreenInterpolationProps> {
12
- const { screenAnimation, ancestorScreenAnimations } =
13
- useScreenAnimationContext();
14
- return resolveScreenAnimationTarget({
12
+ const {
13
+ screenInterpolatorProps,
14
+ boundsAccessor,
15
+ ancestorScreenAnimationSources,
16
+ } = useScreenAnimationContext();
17
+
18
+ const source = resolveScreenAnimationTarget<ScreenAnimationSource>({
15
19
  target,
16
- self: screenAnimation,
17
- ancestors: ancestorScreenAnimations,
20
+ self: {
21
+ screenInterpolatorProps,
22
+ boundsAccessor,
23
+ },
24
+ ancestors: ancestorScreenAnimationSources,
25
+ });
26
+
27
+ return useDerivedValue<ScreenInterpolationProps>(() => {
28
+ "worklet";
29
+
30
+ const props = source.screenInterpolatorProps.get();
31
+
32
+ return {
33
+ ...props,
34
+ bounds: source.boundsAccessor,
35
+ };
18
36
  });
19
37
  }
@@ -4,6 +4,7 @@ export interface DescriptorDerivations {
4
4
  previousScreenKey?: string;
5
5
  currentScreenKey: string;
6
6
  nextScreenKey?: string;
7
+ parentScreenKey?: string;
7
8
  isFirstKey: boolean;
8
9
  isTopMostScreen: boolean;
9
10
  ancestorKeys: string[];
@@ -55,6 +56,7 @@ export function deriveDescriptorDerivations({
55
56
  previousScreenKey,
56
57
  currentScreenKey,
57
58
  nextScreenKey,
59
+ parentScreenKey: ancestorKeys[0],
58
60
  isFirstKey,
59
61
  isTopMostScreen,
60
62
  ancestorKeys,
@@ -0,0 +1,29 @@
1
+ import { memo } from "react";
2
+ import { StyleSheet, View } from "react-native";
3
+
4
+ interface MaybeFloatingContainerProps {
5
+ children: React.ReactNode;
6
+ isFloatingOverlay?: boolean;
7
+ }
8
+
9
+ export const MaybeFloatingContainer = memo(function MaybeFloatingContainer({
10
+ children,
11
+ isFloatingOverlay,
12
+ }: MaybeFloatingContainerProps) {
13
+ if (!isFloatingOverlay) {
14
+ return children;
15
+ }
16
+
17
+ return (
18
+ <View style={styles.float} pointerEvents="box-none">
19
+ {children}
20
+ </View>
21
+ );
22
+ });
23
+
24
+ const styles = StyleSheet.create({
25
+ float: {
26
+ ...StyleSheet.absoluteFill,
27
+ zIndex: 999,
28
+ },
29
+ });