react-native-screen-transitions 3.4.0 → 3.5.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 (514) 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 +4 -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 -144
  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/commonjs/shared/utils/platform.js +1 -0
  116. package/lib/commonjs/shared/utils/platform.js.map +1 -1
  117. package/lib/module/shared/components/create-boundary-component/create-boundary-component.js +21 -32
  118. package/lib/module/shared/components/create-boundary-component/create-boundary-component.js.map +1 -1
  119. package/lib/module/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js +2 -2
  120. package/lib/module/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js.map +1 -1
  121. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +2 -2
  122. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +1 -1
  123. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement.js +21 -0
  124. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement.js.map +1 -0
  125. package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js +7 -2
  126. package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +1 -1
  127. package/lib/module/shared/components/create-boundary-component/hooks/use-capture-destination-boundary.js +105 -0
  128. package/lib/module/shared/components/create-boundary-component/hooks/use-capture-destination-boundary.js.map +1 -0
  129. package/lib/module/shared/components/create-boundary-component/hooks/use-capture-source-boundary.js +35 -0
  130. package/lib/module/shared/components/create-boundary-component/hooks/use-capture-source-boundary.js.map +1 -0
  131. package/lib/module/shared/components/create-boundary-component/hooks/use-measurer.js +74 -0
  132. package/lib/module/shared/components/create-boundary-component/hooks/use-measurer.js.map +1 -0
  133. package/lib/module/shared/components/create-boundary-component/hooks/{use-pre-transition-measurement.js → use-refresh-boundary.js} +24 -25
  134. package/lib/module/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map +1 -0
  135. package/lib/module/shared/components/create-transition-aware-component.js +4 -13
  136. package/lib/module/shared/components/create-transition-aware-component.js.map +1 -1
  137. package/lib/module/shared/components/overlay/variations/float-overlay.js +1 -0
  138. package/lib/module/shared/components/overlay/variations/float-overlay.js.map +1 -1
  139. package/lib/module/shared/components/screen-container/hooks/use-content-layout.js +8 -11
  140. package/lib/module/shared/components/screen-container/hooks/use-content-layout.js.map +1 -1
  141. package/lib/module/shared/components/screen-container/layers/backdrop.js +3 -3
  142. package/lib/module/shared/components/screen-container/layers/backdrop.js.map +1 -1
  143. package/lib/module/shared/components/screen-container/layers/content.js +4 -5
  144. package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
  145. package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js +4 -3
  146. package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
  147. package/lib/module/shared/components/screen-container/layers/surface-container.js +3 -3
  148. package/lib/module/shared/components/screen-container/layers/surface-container.js.map +1 -1
  149. package/lib/module/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.js +24 -0
  150. package/lib/module/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.js.map +1 -0
  151. package/lib/module/shared/components/screen-lifecycle/hooks/history/navigator-route-registry.js.map +1 -0
  152. package/lib/module/shared/components/screen-lifecycle/hooks/{use-screen-events.js → history/use-screen-history.js} +16 -10
  153. package/lib/module/shared/components/screen-lifecycle/hooks/history/use-screen-history.js.map +1 -0
  154. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js +134 -0
  155. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js.map +1 -0
  156. package/lib/module/shared/components/screen-lifecycle/hooks/{use-open-transition.js → use-open-transition-intent.js} +13 -24
  157. package/lib/module/shared/components/screen-lifecycle/hooks/use-open-transition-intent.js.map +1 -0
  158. package/lib/module/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js +48 -0
  159. package/lib/module/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js.map +1 -0
  160. package/lib/module/shared/components/screen-lifecycle/index.js +18 -15
  161. package/lib/module/shared/components/screen-lifecycle/index.js.map +1 -1
  162. package/lib/module/shared/constants.js +5 -16
  163. package/lib/module/shared/constants.js.map +1 -1
  164. package/lib/module/shared/providers/register-bounds.provider.js +6 -9
  165. package/lib/module/shared/providers/register-bounds.provider.js.map +1 -1
  166. package/lib/module/shared/providers/screen/animation/animation.provider.js +22 -43
  167. package/lib/module/shared/providers/screen/animation/animation.provider.js.map +1 -1
  168. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state.js +19 -35
  169. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state.js.map +1 -1
  170. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +65 -39
  171. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  172. package/lib/module/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js.map +1 -1
  173. package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js +3 -2
  174. package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -1
  175. package/lib/module/shared/providers/screen/animation/types.js +2 -0
  176. package/lib/module/shared/providers/screen/animation/use-screen-animation.js +19 -5
  177. package/lib/module/shared/providers/screen/animation/use-screen-animation.js.map +1 -1
  178. package/lib/module/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js +1 -0
  179. package/lib/module/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js.map +1 -1
  180. package/lib/module/shared/providers/screen/styles/components/maybe-floating-container.js +25 -0
  181. package/lib/module/shared/providers/screen/styles/components/maybe-floating-container.js.map +1 -0
  182. package/lib/module/shared/providers/screen/styles/constants.js +31 -0
  183. package/lib/module/shared/providers/screen/styles/constants.js.map +1 -0
  184. package/lib/module/shared/providers/screen/styles/helpers/normalize-slots.js +45 -0
  185. package/lib/module/shared/providers/screen/styles/helpers/normalize-slots.js.map +1 -0
  186. package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles.js +132 -0
  187. package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles.js.map +1 -0
  188. package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +70 -0
  189. package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -0
  190. package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +44 -0
  191. package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -0
  192. package/lib/module/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js +26 -0
  193. package/lib/module/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js.map +1 -0
  194. package/lib/module/shared/providers/screen/styles/styles.provider.js +34 -108
  195. package/lib/module/shared/providers/screen/styles/styles.provider.js.map +1 -1
  196. package/lib/module/shared/stores/bounds/helpers/apply-measured-bounds-writes.js +13 -7
  197. package/lib/module/shared/stores/bounds/helpers/apply-measured-bounds-writes.js.map +1 -1
  198. package/lib/module/shared/stores/bounds/helpers/keys.js +8 -0
  199. package/lib/module/shared/stores/bounds/helpers/keys.js.map +1 -1
  200. package/lib/module/shared/stores/bounds/index.js +27 -26
  201. package/lib/module/shared/stores/bounds/index.js.map +1 -1
  202. package/lib/module/shared/stores/bounds/internals/clear.js +14 -52
  203. package/lib/module/shared/stores/bounds/internals/clear.js.map +1 -1
  204. package/lib/module/shared/stores/bounds/internals/groups.js +23 -0
  205. package/lib/module/shared/stores/bounds/internals/groups.js.map +1 -0
  206. package/lib/module/shared/stores/bounds/internals/registry.js +204 -178
  207. package/lib/module/shared/stores/bounds/internals/registry.js.map +1 -1
  208. package/lib/module/shared/stores/bounds/internals/resolver.js +2 -6
  209. package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -1
  210. package/lib/module/shared/stores/bounds/internals/state.js +1 -2
  211. package/lib/module/shared/stores/bounds/internals/state.js.map +1 -1
  212. package/lib/module/shared/stores/system.store.js +43 -10
  213. package/lib/module/shared/stores/system.store.js.map +1 -1
  214. package/lib/module/shared/types/animation.types.js.map +1 -1
  215. package/lib/module/shared/utils/bounds/helpers/create-bound-tag.js +4 -0
  216. package/lib/module/shared/utils/bounds/helpers/create-bound-tag.js.map +1 -1
  217. package/lib/module/shared/utils/bounds/helpers/create-interpolators.js +6 -6
  218. package/lib/module/shared/utils/bounds/helpers/create-interpolators.js.map +1 -1
  219. package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js +9 -3
  220. package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
  221. package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js +5 -8
  222. package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
  223. package/lib/module/shared/utils/bounds/helpers/styles/compute.js +3 -9
  224. package/lib/module/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
  225. package/lib/module/shared/utils/bounds/index.js +7 -5
  226. package/lib/module/shared/utils/bounds/index.js.map +1 -1
  227. package/lib/module/shared/utils/bounds/zoom/build.js +46 -146
  228. package/lib/module/shared/utils/bounds/zoom/build.js.map +1 -1
  229. package/lib/module/shared/utils/create-store.js +13 -4
  230. package/lib/module/shared/utils/create-store.js.map +1 -1
  231. package/lib/module/shared/utils/platform.js +1 -0
  232. package/lib/module/shared/utils/platform.js.map +1 -1
  233. package/lib/typescript/shared/components/create-boundary-component/components/boundary-target.d.ts +4 -4
  234. package/lib/typescript/shared/components/create-boundary-component/components/boundary-target.d.ts.map +1 -1
  235. package/lib/typescript/shared/components/create-boundary-component/create-boundary-component.d.ts.map +1 -1
  236. package/lib/typescript/shared/components/create-boundary-component/helpers/resolve-pending-source-key.d.ts.map +1 -1
  237. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts +8 -8
  238. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts.map +1 -1
  239. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement.d.ts +5 -0
  240. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement.d.ts.map +1 -0
  241. package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-presence.d.ts.map +1 -1
  242. package/lib/typescript/shared/components/create-boundary-component/hooks/use-capture-destination-boundary.d.ts +13 -0
  243. package/lib/typescript/shared/components/create-boundary-component/hooks/use-capture-destination-boundary.d.ts.map +1 -0
  244. package/lib/typescript/shared/components/create-boundary-component/hooks/use-capture-source-boundary.d.ts +10 -0
  245. package/lib/typescript/shared/components/create-boundary-component/hooks/use-capture-source-boundary.d.ts.map +1 -0
  246. package/lib/typescript/shared/components/create-boundary-component/hooks/{use-boundary-measure-and-store.d.ts → use-measurer.d.ts} +6 -4
  247. package/lib/typescript/shared/components/create-boundary-component/hooks/use-measurer.d.ts.map +1 -0
  248. package/lib/typescript/shared/components/create-boundary-component/hooks/use-refresh-boundary.d.ts +14 -0
  249. package/lib/typescript/shared/components/create-boundary-component/hooks/use-refresh-boundary.d.ts.map +1 -0
  250. package/lib/typescript/shared/components/create-boundary-component/index.d.ts +2 -2
  251. package/lib/typescript/shared/components/create-boundary-component/types.d.ts +6 -3
  252. package/lib/typescript/shared/components/create-boundary-component/types.d.ts.map +1 -1
  253. package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -1
  254. package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts +1 -1
  255. package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts.map +1 -1
  256. package/lib/typescript/shared/components/scene-view.d.ts +1 -1
  257. package/lib/typescript/shared/components/scene-view.d.ts.map +1 -1
  258. package/lib/typescript/shared/components/screen-container/hooks/use-content-layout.d.ts.map +1 -1
  259. package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts +2 -2
  260. package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -1
  261. package/lib/typescript/shared/components/screen-container/layers/content.d.ts.map +1 -1
  262. package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts.map +1 -1
  263. package/lib/typescript/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.d.ts +2 -0
  264. package/lib/typescript/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.d.ts.map +1 -0
  265. package/lib/typescript/shared/components/screen-lifecycle/hooks/history/navigator-route-registry.d.ts.map +1 -0
  266. package/lib/typescript/shared/components/screen-lifecycle/hooks/history/use-screen-history.d.ts +7 -0
  267. package/lib/typescript/shared/components/screen-lifecycle/hooks/history/use-screen-history.d.ts.map +1 -0
  268. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition-intent.d.ts +11 -0
  269. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition-intent.d.ts.map +1 -0
  270. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-open-transition-intent.d.ts +8 -0
  271. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-open-transition-intent.d.ts.map +1 -0
  272. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-transition-start-controller.d.ts +11 -0
  273. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-transition-start-controller.d.ts.map +1 -0
  274. package/lib/typescript/shared/components/screen-lifecycle/index.d.ts.map +1 -1
  275. package/lib/typescript/shared/constants.d.ts +1 -14
  276. package/lib/typescript/shared/constants.d.ts.map +1 -1
  277. package/lib/typescript/shared/index.d.ts +4 -4
  278. package/lib/typescript/shared/providers/register-bounds.provider.d.ts.map +1 -1
  279. package/lib/typescript/shared/providers/screen/animation/animation.provider.d.ts +7 -8
  280. package/lib/typescript/shared/providers/screen/animation/animation.provider.d.ts.map +1 -1
  281. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state.d.ts +0 -8
  282. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state.d.ts.map +1 -1
  283. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts +3 -3
  284. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
  285. package/lib/typescript/shared/providers/screen/animation/helpers/resolve-screen-animation-target.d.ts +4 -6
  286. package/lib/typescript/shared/providers/screen/animation/helpers/resolve-screen-animation-target.d.ts.map +1 -1
  287. package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts.map +1 -1
  288. package/lib/typescript/shared/providers/screen/animation/types.d.ts +7 -0
  289. package/lib/typescript/shared/providers/screen/animation/types.d.ts.map +1 -1
  290. package/lib/typescript/shared/providers/screen/animation/use-screen-animation.d.ts +1 -1
  291. package/lib/typescript/shared/providers/screen/animation/use-screen-animation.d.ts.map +1 -1
  292. package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.d.ts +1 -0
  293. package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.d.ts.map +1 -1
  294. package/lib/typescript/shared/providers/screen/styles/components/maybe-floating-container.d.ts +7 -0
  295. package/lib/typescript/shared/providers/screen/styles/components/maybe-floating-container.d.ts.map +1 -0
  296. package/lib/typescript/shared/providers/screen/styles/constants.d.ts +23 -0
  297. package/lib/typescript/shared/providers/screen/styles/constants.d.ts.map +1 -0
  298. package/lib/typescript/shared/providers/screen/styles/helpers/normalize-slots.d.ts +3 -0
  299. package/lib/typescript/shared/providers/screen/styles/helpers/normalize-slots.d.ts.map +1 -0
  300. package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles.d.ts +17 -0
  301. package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles.d.ts.map +1 -0
  302. package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts +3 -0
  303. package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -0
  304. package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts +9 -0
  305. package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts.map +1 -0
  306. package/lib/typescript/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.d.ts +9 -0
  307. package/lib/typescript/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.d.ts.map +1 -0
  308. package/lib/typescript/shared/providers/screen/styles/styles.provider.d.ts +2 -2
  309. package/lib/typescript/shared/providers/screen/styles/styles.provider.d.ts.map +1 -1
  310. package/lib/typescript/shared/stores/animation.store.d.ts +1 -7
  311. package/lib/typescript/shared/stores/animation.store.d.ts.map +1 -1
  312. package/lib/typescript/shared/stores/bounds/helpers/apply-measured-bounds-writes.d.ts +1 -1
  313. package/lib/typescript/shared/stores/bounds/helpers/apply-measured-bounds-writes.d.ts.map +1 -1
  314. package/lib/typescript/shared/stores/bounds/helpers/keys.d.ts +1 -0
  315. package/lib/typescript/shared/stores/bounds/helpers/keys.d.ts.map +1 -1
  316. package/lib/typescript/shared/stores/bounds/index.d.ts +28 -27
  317. package/lib/typescript/shared/stores/bounds/index.d.ts.map +1 -1
  318. package/lib/typescript/shared/stores/bounds/internals/clear.d.ts.map +1 -1
  319. package/lib/typescript/shared/stores/bounds/internals/groups.d.ts +4 -0
  320. package/lib/typescript/shared/stores/bounds/internals/groups.d.ts.map +1 -0
  321. package/lib/typescript/shared/stores/bounds/internals/registry.d.ts +12 -11
  322. package/lib/typescript/shared/stores/bounds/internals/registry.d.ts.map +1 -1
  323. package/lib/typescript/shared/stores/bounds/internals/resolver.d.ts.map +1 -1
  324. package/lib/typescript/shared/stores/bounds/internals/state.d.ts +1 -2
  325. package/lib/typescript/shared/stores/bounds/internals/state.d.ts.map +1 -1
  326. package/lib/typescript/shared/stores/bounds/types.d.ts +21 -19
  327. package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
  328. package/lib/typescript/shared/stores/gesture.store.d.ts +1 -7
  329. package/lib/typescript/shared/stores/gesture.store.d.ts.map +1 -1
  330. package/lib/typescript/shared/stores/system.store.d.ts +33 -8
  331. package/lib/typescript/shared/stores/system.store.d.ts.map +1 -1
  332. package/lib/typescript/shared/types/animation.types.d.ts +5 -25
  333. package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
  334. package/lib/typescript/shared/types/bounds.types.d.ts +7 -5
  335. package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
  336. package/lib/typescript/shared/types/screen.types.d.ts +20 -0
  337. package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
  338. package/lib/typescript/shared/utils/bounds/helpers/create-bound-tag.d.ts +6 -2
  339. package/lib/typescript/shared/utils/bounds/helpers/create-bound-tag.d.ts.map +1 -1
  340. package/lib/typescript/shared/utils/bounds/helpers/create-interpolators.d.ts.map +1 -1
  341. package/lib/typescript/shared/utils/bounds/helpers/create-link-accessor.d.ts +3 -2
  342. package/lib/typescript/shared/utils/bounds/helpers/create-link-accessor.d.ts.map +1 -1
  343. package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts +1 -1
  344. package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts.map +1 -1
  345. package/lib/typescript/shared/utils/bounds/helpers/styles/compute.d.ts.map +1 -1
  346. package/lib/typescript/shared/utils/bounds/index.d.ts.map +1 -1
  347. package/lib/typescript/shared/utils/bounds/zoom/build.d.ts +1 -1
  348. package/lib/typescript/shared/utils/bounds/zoom/build.d.ts.map +1 -1
  349. package/lib/typescript/shared/utils/bounds/zoom/types.d.ts +1 -1
  350. package/lib/typescript/shared/utils/bounds/zoom/types.d.ts.map +1 -1
  351. package/lib/typescript/shared/utils/create-store.d.ts +13 -8
  352. package/lib/typescript/shared/utils/create-store.d.ts.map +1 -1
  353. package/lib/typescript/shared/utils/platform.d.ts +0 -3
  354. package/lib/typescript/shared/utils/platform.d.ts.map +1 -1
  355. package/package.json +1 -1
  356. package/src/shared/components/create-boundary-component/create-boundary-component.tsx +21 -39
  357. package/src/shared/components/create-boundary-component/helpers/resolve-pending-source-key.ts +3 -6
  358. package/src/shared/components/create-boundary-component/hooks/helpers/measurement-rules.ts +12 -12
  359. package/src/shared/components/create-boundary-component/hooks/helpers/measurement.ts +43 -0
  360. package/src/shared/components/create-boundary-component/hooks/use-boundary-presence.ts +3 -8
  361. package/src/shared/components/create-boundary-component/hooks/use-capture-destination-boundary.ts +149 -0
  362. package/src/shared/components/create-boundary-component/hooks/use-capture-source-boundary.ts +42 -0
  363. package/src/shared/components/create-boundary-component/hooks/use-measurer.ts +144 -0
  364. package/src/shared/components/create-boundary-component/hooks/{use-pre-transition-measurement.ts → use-refresh-boundary.ts} +35 -30
  365. package/src/shared/components/create-boundary-component/types.ts +7 -3
  366. package/src/shared/components/create-transition-aware-component.tsx +4 -13
  367. package/src/shared/components/overlay/variations/float-overlay.tsx +1 -1
  368. package/src/shared/components/screen-container/hooks/use-content-layout.ts +14 -11
  369. package/src/shared/components/screen-container/layers/backdrop.tsx +3 -3
  370. package/src/shared/components/screen-container/layers/content.tsx +4 -7
  371. package/src/shared/components/screen-container/layers/maybe-masked-navigation-container.tsx +4 -5
  372. package/src/shared/components/screen-container/layers/surface-container.tsx +3 -3
  373. package/src/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.ts +29 -0
  374. package/src/shared/components/screen-lifecycle/hooks/{use-screen-events.ts → history/use-screen-history.ts} +25 -9
  375. package/src/shared/components/screen-lifecycle/hooks/use-close-transition-intent.ts +160 -0
  376. package/src/shared/components/screen-lifecycle/hooks/{use-open-transition.ts → use-open-transition-intent.ts} +19 -23
  377. package/src/shared/components/screen-lifecycle/hooks/use-transition-start-controller.ts +71 -0
  378. package/src/shared/components/screen-lifecycle/index.tsx +17 -17
  379. package/src/shared/constants.ts +3 -11
  380. package/src/shared/providers/register-bounds.provider.tsx +7 -12
  381. package/src/shared/providers/screen/animation/animation.provider.tsx +30 -68
  382. package/src/shared/providers/screen/animation/helpers/hydrate-transition-state.ts +20 -33
  383. package/src/shared/providers/screen/animation/helpers/pipeline.ts +96 -69
  384. package/src/shared/providers/screen/animation/helpers/resolve-screen-animation-target.ts +5 -7
  385. package/src/shared/providers/screen/animation/helpers/use-build-transition-state.ts +14 -2
  386. package/src/shared/providers/screen/animation/types.ts +9 -0
  387. package/src/shared/providers/screen/animation/use-screen-animation.tsx +25 -7
  388. package/src/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.ts +2 -0
  389. package/src/shared/providers/screen/styles/components/maybe-floating-container.tsx +29 -0
  390. package/src/shared/providers/screen/styles/constants.ts +34 -0
  391. package/src/shared/providers/screen/styles/helpers/normalize-slots.ts +61 -0
  392. package/src/shared/providers/screen/styles/helpers/resolve-slot-styles.ts +190 -0
  393. package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +85 -0
  394. package/src/shared/providers/screen/styles/hooks/use-maybe-block-visibility.tsx +51 -0
  395. package/src/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.tsx +40 -0
  396. package/src/shared/providers/screen/styles/styles.provider.tsx +42 -146
  397. package/src/shared/stores/bounds/helpers/apply-measured-bounds-writes.ts +15 -13
  398. package/src/shared/stores/bounds/helpers/keys.ts +8 -0
  399. package/src/shared/stores/bounds/index.ts +37 -44
  400. package/src/shared/stores/bounds/internals/clear.ts +22 -86
  401. package/src/shared/stores/bounds/internals/groups.ts +20 -0
  402. package/src/shared/stores/bounds/internals/registry.ts +280 -234
  403. package/src/shared/stores/bounds/internals/resolver.ts +1 -5
  404. package/src/shared/stores/bounds/internals/state.ts +2 -3
  405. package/src/shared/stores/bounds/types.ts +23 -21
  406. package/src/shared/stores/system.store.ts +77 -9
  407. package/src/shared/types/animation.types.ts +5 -25
  408. package/src/shared/types/bounds.types.ts +7 -8
  409. package/src/shared/types/screen.types.ts +21 -0
  410. package/src/shared/utils/bounds/helpers/create-bound-tag.ts +6 -2
  411. package/src/shared/utils/bounds/helpers/create-interpolators.ts +10 -7
  412. package/src/shared/utils/bounds/helpers/create-link-accessor.ts +12 -5
  413. package/src/shared/utils/bounds/helpers/prepare-bound-styles.ts +4 -7
  414. package/src/shared/utils/bounds/helpers/styles/compute.ts +2 -10
  415. package/src/shared/utils/bounds/index.ts +7 -6
  416. package/src/shared/utils/bounds/zoom/build.ts +53 -162
  417. package/src/shared/utils/bounds/zoom/types.ts +1 -1
  418. package/src/shared/utils/create-store.ts +39 -13
  419. package/src/shared/utils/platform.ts +2 -0
  420. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js +0 -44
  421. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js.map +0 -1
  422. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js +0 -84
  423. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js.map +0 -1
  424. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js +0 -149
  425. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js.map +0 -1
  426. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pre-transition-measurement.js.map +0 -1
  427. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/navigator-route-registry.js.map +0 -1
  428. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js +0 -29
  429. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js.map +0 -1
  430. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.js +0 -47
  431. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.js.map +0 -1
  432. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/index.js +0 -158
  433. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/index.js.map +0 -1
  434. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-high-refresh-rate.js +0 -36
  435. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-high-refresh-rate.js.map +0 -1
  436. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-open-transition.js.map +0 -1
  437. package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-screen-events.js.map +0 -1
  438. package/lib/commonjs/shared/providers/screen/styles/helpers/build-resolved-style-map.js +0 -144
  439. package/lib/commonjs/shared/providers/screen/styles/helpers/build-resolved-style-map.js.map +0 -1
  440. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-interpolated-style-output.js +0 -28
  441. package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-interpolated-style-output.js.map +0 -1
  442. package/lib/commonjs/shared/providers/screen/styles/helpers/split-normalized-style-maps.js +0 -39
  443. package/lib/commonjs/shared/providers/screen/styles/helpers/split-normalized-style-maps.js.map +0 -1
  444. package/lib/commonjs/shared/stores/bounds/internals/presence.js +0 -125
  445. package/lib/commonjs/shared/stores/bounds/internals/presence.js.map +0 -1
  446. package/lib/module/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js +0 -39
  447. package/lib/module/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js.map +0 -1
  448. package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js +0 -78
  449. package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js.map +0 -1
  450. package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js +0 -145
  451. package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js.map +0 -1
  452. package/lib/module/shared/components/create-boundary-component/hooks/use-pre-transition-measurement.js.map +0 -1
  453. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/navigator-route-registry.js.map +0 -1
  454. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js +0 -24
  455. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js.map +0 -1
  456. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.js +0 -42
  457. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.js.map +0 -1
  458. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/index.js +0 -153
  459. package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/index.js.map +0 -1
  460. package/lib/module/shared/components/screen-lifecycle/hooks/use-high-refresh-rate.js +0 -30
  461. package/lib/module/shared/components/screen-lifecycle/hooks/use-high-refresh-rate.js.map +0 -1
  462. package/lib/module/shared/components/screen-lifecycle/hooks/use-open-transition.js.map +0 -1
  463. package/lib/module/shared/components/screen-lifecycle/hooks/use-screen-events.js.map +0 -1
  464. package/lib/module/shared/providers/screen/styles/helpers/build-resolved-style-map.js +0 -139
  465. package/lib/module/shared/providers/screen/styles/helpers/build-resolved-style-map.js.map +0 -1
  466. package/lib/module/shared/providers/screen/styles/helpers/resolve-interpolated-style-output.js +0 -23
  467. package/lib/module/shared/providers/screen/styles/helpers/resolve-interpolated-style-output.js.map +0 -1
  468. package/lib/module/shared/providers/screen/styles/helpers/split-normalized-style-maps.js +0 -34
  469. package/lib/module/shared/providers/screen/styles/helpers/split-normalized-style-maps.js.map +0 -1
  470. package/lib/module/shared/stores/bounds/internals/presence.js +0 -115
  471. package/lib/module/shared/stores/bounds/internals/presence.js.map +0 -1
  472. package/lib/typescript/shared/components/create-boundary-component/hooks/use-auto-source-measurement.d.ts +0 -10
  473. package/lib/typescript/shared/components/create-boundary-component/hooks/use-auto-source-measurement.d.ts.map +0 -1
  474. package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.d.ts.map +0 -1
  475. package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.d.ts +0 -27
  476. package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.d.ts.map +0 -1
  477. package/lib/typescript/shared/components/create-boundary-component/hooks/use-pre-transition-measurement.d.ts +0 -12
  478. package/lib/typescript/shared/components/create-boundary-component/hooks/use-pre-transition-measurement.d.ts.map +0 -1
  479. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/navigator-route-registry.d.ts.map +0 -1
  480. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.d.ts +0 -2
  481. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.d.ts.map +0 -1
  482. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.d.ts +0 -2
  483. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.d.ts.map +0 -1
  484. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/index.d.ts +0 -8
  485. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/index.d.ts.map +0 -1
  486. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-high-refresh-rate.d.ts +0 -13
  487. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-high-refresh-rate.d.ts.map +0 -1
  488. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-open-transition.d.ts +0 -12
  489. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-open-transition.d.ts.map +0 -1
  490. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-screen-events.d.ts +0 -7
  491. package/lib/typescript/shared/components/screen-lifecycle/hooks/use-screen-events.d.ts.map +0 -1
  492. package/lib/typescript/shared/providers/screen/styles/helpers/build-resolved-style-map.d.ts +0 -11
  493. package/lib/typescript/shared/providers/screen/styles/helpers/build-resolved-style-map.d.ts.map +0 -1
  494. package/lib/typescript/shared/providers/screen/styles/helpers/resolve-interpolated-style-output.d.ts +0 -7
  495. package/lib/typescript/shared/providers/screen/styles/helpers/resolve-interpolated-style-output.d.ts.map +0 -1
  496. package/lib/typescript/shared/providers/screen/styles/helpers/split-normalized-style-maps.d.ts +0 -6
  497. package/lib/typescript/shared/providers/screen/styles/helpers/split-normalized-style-maps.d.ts.map +0 -1
  498. package/lib/typescript/shared/stores/bounds/internals/presence.d.ts +0 -12
  499. package/lib/typescript/shared/stores/bounds/internals/presence.d.ts.map +0 -1
  500. package/src/shared/components/create-boundary-component/hooks/use-auto-source-measurement.ts +0 -56
  501. package/src/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.ts +0 -154
  502. package/src/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.ts +0 -223
  503. package/src/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.ts +0 -29
  504. package/src/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.ts +0 -58
  505. package/src/shared/components/screen-lifecycle/hooks/use-close-transition/index.ts +0 -183
  506. package/src/shared/components/screen-lifecycle/hooks/use-high-refresh-rate.ts +0 -34
  507. package/src/shared/providers/screen/styles/helpers/build-resolved-style-map.ts +0 -185
  508. package/src/shared/providers/screen/styles/helpers/resolve-interpolated-style-output.ts +0 -31
  509. package/src/shared/providers/screen/styles/helpers/split-normalized-style-maps.ts +0 -44
  510. package/src/shared/stores/bounds/internals/presence.ts +0 -145
  511. /package/lib/commonjs/shared/components/screen-lifecycle/hooks/{use-close-transition/helpers → history}/navigator-route-registry.js +0 -0
  512. /package/lib/module/shared/components/screen-lifecycle/hooks/{use-close-transition/helpers → history}/navigator-route-registry.js +0 -0
  513. /package/lib/typescript/shared/components/screen-lifecycle/hooks/{use-close-transition/helpers → history}/navigator-route-registry.d.ts +0 -0
  514. /package/src/shared/components/screen-lifecycle/hooks/{use-close-transition/helpers → history}/navigator-route-registry.ts +0 -0
@@ -1,8 +0,0 @@
1
- import { type SharedValue } from "react-native-reanimated";
2
- import { type BaseDescriptor } from "../../../../providers/screen/descriptors";
3
- import type { AnimationStoreMap } from "../../../../stores/animation.store";
4
- /**
5
- * Unified close handler that branches on stack type.
6
- */
7
- export declare function useCloseTransition(current: BaseDescriptor, animations: AnimationStoreMap, targetProgress: SharedValue<number>, activate: () => void, deactivate: () => void): void;
8
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/components/screen-lifecycle/hooks/use-close-transition/index.ts"],"names":[],"mappings":"AACA,OAAO,EAEN,KAAK,WAAW,EAGhB,MAAM,yBAAyB,CAAC;AAKjC,OAAO,EACN,KAAK,cAAc,EAEnB,MAAM,0CAA0C,CAAC;AAGlD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAgI5E;;GAEG;AACH,wBAAgB,kBAAkB,CACjC,OAAO,EAAE,cAAc,EACvB,UAAU,EAAE,iBAAiB,EAC7B,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,EACnC,QAAQ,EAAE,MAAM,IAAI,EACpB,UAAU,EAAE,MAAM,IAAI,QA6BtB"}
@@ -1,13 +0,0 @@
1
- import type { BaseDescriptor } from "../../../providers/screen/descriptors";
2
- /**
3
- * Maintainer Notes:
4
- * Marking as experimental for now since, I'll be honest, I'm not sure if this does much. This was taken
5
- * right from this https://github.com/software-mansion/react-native-reanimated/issues/4738
6
- *
7
- * Not noticing much of a difference in prod.
8
- */
9
- export declare const useHighRefreshRate: (current: BaseDescriptor) => {
10
- activateHighRefreshRate: () => void;
11
- deactivateHighRefreshRate: () => void;
12
- };
13
- //# sourceMappingURL=use-high-refresh-rate.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-high-refresh-rate.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/components/screen-lifecycle/hooks/use-high-refresh-rate.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAE5E;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAAI,SAAS,cAAc;;;CAsBzD,CAAC"}
@@ -1,12 +0,0 @@
1
- import type { SharedValue } from "react-native-reanimated";
2
- import type { BaseDescriptor } from "../../../providers/screen/descriptors";
3
- import type { AnimationStoreMap } from "../../../stores/animation.store";
4
- /**
5
- * Handles opening animation on mount.
6
- * Returns activate/deactivate functions for high refresh rate.
7
- */
8
- export declare function useOpenTransition(current: BaseDescriptor, animations: AnimationStoreMap, targetProgressValue: SharedValue<number>, isFirstKey: boolean): {
9
- activateHighRefreshRate: () => void;
10
- deactivateHighRefreshRate: () => void;
11
- };
12
- //# sourceMappingURL=use-open-transition.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-open-transition.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/components/screen-lifecycle/hooks/use-open-transition.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AA4BzE;;;GAGG;AACH,wBAAgB,iBAAiB,CAChC,OAAO,EAAE,cAAc,EACvB,UAAU,EAAE,iBAAiB,EAC7B,mBAAmB,EAAE,WAAW,CAAC,MAAM,CAAC,EACxC,UAAU,EAAE,OAAO;;;EAkDnB"}
@@ -1,7 +0,0 @@
1
- import type { BaseDescriptor } from "../../../providers/screen/descriptors";
2
- import type { AnimationStoreMap } from "../../../stores/animation.store";
3
- /**
4
- * Updates the HistoryStore for navigation history tracking.
5
- */
6
- export declare function useScreenEvents(current: BaseDescriptor, previous: BaseDescriptor | undefined, animations: AnimationStoreMap): void;
7
- //# sourceMappingURL=use-screen-events.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-screen-events.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/components/screen-lifecycle/hooks/use-screen-events.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAwBzE;;GAEG;AACH,wBAAgB,eAAe,CAC9B,OAAO,EAAE,cAAc,EACvB,QAAQ,EAAE,cAAc,GAAG,SAAS,EACpC,UAAU,EAAE,iBAAiB,QAsC7B"}
@@ -1,11 +0,0 @@
1
- import type { NormalizedTransitionInterpolatedStyle } from "../../../../types/animation.types";
2
- export type StyleKeySet = Record<string, true>;
3
- export declare const buildResolvedStyleMap: ({ currentStylesMap, fallbackStylesMap, previousStyleKeysBySlot, }: {
4
- currentStylesMap: NormalizedTransitionInterpolatedStyle;
5
- fallbackStylesMap: NormalizedTransitionInterpolatedStyle;
6
- previousStyleKeysBySlot: Record<string, StyleKeySet>;
7
- }) => {
8
- resolvedStylesMap: NormalizedTransitionInterpolatedStyle;
9
- nextPreviousStyleKeysBySlot: Record<string, StyleKeySet>;
10
- };
11
- //# sourceMappingURL=build-resolved-style-map.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"build-resolved-style-map.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/providers/screen/styles/helpers/build-resolved-style-map.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACX,qCAAqC,EAErC,MAAM,mCAAmC,CAAC;AAE3C,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AAyG/C,eAAO,MAAM,qBAAqB,GAAI,mEAInC;IACF,gBAAgB,EAAE,qCAAqC,CAAC;IACxD,iBAAiB,EAAE,qCAAqC,CAAC;IACzD,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;CACrD,KAAG;IACH,iBAAiB,EAAE,qCAAqC,CAAC;IACzD,2BAA2B,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;CA+DzD,CAAC"}
@@ -1,7 +0,0 @@
1
- import type { NormalizedTransitionInterpolatedStyle, TransitionInterpolatedStyle } from "../../../../types/animation.types";
2
- export type ResolvedInterpolatedStyleOutput = {
3
- stylesMap: NormalizedTransitionInterpolatedStyle;
4
- wasLegacy: boolean;
5
- };
6
- export declare const resolveInterpolatedStyleOutput: (raw: TransitionInterpolatedStyle | null | undefined) => ResolvedInterpolatedStyleOutput;
7
- //# sourceMappingURL=resolve-interpolated-style-output.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolve-interpolated-style-output.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/providers/screen/styles/helpers/resolve-interpolated-style-output.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACX,qCAAqC,EACrC,2BAA2B,EAC3B,MAAM,mCAAmC,CAAC;AAG3C,MAAM,MAAM,+BAA+B,GAAG;IAC7C,SAAS,EAAE,qCAAqC,CAAC;IACjD,SAAS,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,8BAA8B,GAC1C,KAAK,2BAA2B,GAAG,IAAI,GAAG,SAAS,KACjD,+BAgBF,CAAC"}
@@ -1,6 +0,0 @@
1
- import type { NormalizedTransitionInterpolatedStyle } from "../../../../types/animation.types";
2
- export declare const splitNormalizedStyleMaps: (stylesMap: NormalizedTransitionInterpolatedStyle) => {
3
- layerStylesMap: NormalizedTransitionInterpolatedStyle;
4
- elementStylesMap: NormalizedTransitionInterpolatedStyle;
5
- };
6
- //# sourceMappingURL=split-normalized-style-maps.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"split-normalized-style-maps.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/providers/screen/styles/helpers/split-normalized-style-maps.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,mCAAmC,CAAC;AAgB/F,eAAO,MAAM,wBAAwB,GACpC,WAAW,qCAAqC,KAC9C;IACF,cAAc,EAAE,qCAAqC,CAAC;IACtD,gBAAgB,EAAE,qCAAqC,CAAC;CAmBxD,CAAC"}
@@ -1,12 +0,0 @@
1
- import type { BoundaryConfig, PresenceState, ScreenKey, TagID } from "../types";
2
- import { type GroupsState } from "./state";
3
- declare function registerBoundaryPresence(tag: TagID, screenKey: ScreenKey, ancestorKeys?: ScreenKey[], boundaryConfig?: BoundaryConfig, navigatorKey?: string, ancestorNavigatorKeys?: string[]): void;
4
- declare function unregisterBoundaryPresence(tag: TagID, screenKey: ScreenKey): void;
5
- declare function hasBoundaryPresence(tag: TagID, screenKey: ScreenKey): boolean;
6
- declare function getBoundaryPresence(): import("react-native-reanimated/lib/typescript/commonTypes").Mutable<PresenceState>;
7
- declare function getBoundaryConfig(tag: TagID, screenKey: ScreenKey): BoundaryConfig | null;
8
- declare function setGroupActiveId(group: string, id: string): void;
9
- declare function getGroupActiveId(group: string): string | null;
10
- declare function getGroups(): import("react-native-reanimated/lib/typescript/commonTypes").Mutable<GroupsState>;
11
- export { registerBoundaryPresence, unregisterBoundaryPresence, hasBoundaryPresence, getBoundaryPresence, getBoundaryConfig, setGroupActiveId, getGroupActiveId, getGroups, };
12
- //# sourceMappingURL=presence.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"presence.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/stores/bounds/internals/presence.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAChF,OAAO,EAAE,KAAK,WAAW,EAAoB,MAAM,SAAS,CAAC;AAE7D,iBAAS,wBAAwB,CAChC,GAAG,EAAE,KAAK,EACV,SAAS,EAAE,SAAS,EACpB,YAAY,CAAC,EAAE,SAAS,EAAE,EAC1B,cAAc,CAAC,EAAE,cAAc,EAC/B,YAAY,CAAC,EAAE,MAAM,EACrB,qBAAqB,CAAC,EAAE,MAAM,EAAE,QAwBhC;AAED,iBAAS,0BAA0B,CAAC,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,QA6BnE;AAED,iBAAS,mBAAmB,CAAC,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,GAAG,OAAO,CAgBtE;AAED,iBAAS,mBAAmB,wFAG3B;AAED,iBAAS,iBAAiB,CACzB,GAAG,EAAE,KAAK,EACV,SAAS,EAAE,SAAS,GAClB,cAAc,GAAG,IAAI,CAmBvB;AAED,iBAAS,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAUlD;AAED,iBAAS,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGtD;AAED,iBAAS,SAAS,sFAGjB;AAED,OAAO,EACN,wBAAwB,EACxB,0BAA0B,EAC1B,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,SAAS,GACT,CAAC"}
@@ -1,56 +0,0 @@
1
- import { useAnimatedReaction } from "react-native-reanimated";
2
- import { BoundStore } from "../../../stores/bounds";
3
- import type { BoundaryId, MaybeMeasureAndStoreParams } from "../types";
4
- import { resolveAutoSourceCaptureSignal } from "./helpers/measurement-rules";
5
-
6
- export const useAutoSourceMeasurement = (params: {
7
- enabled: boolean;
8
- sharedBoundTag: string;
9
- id: BoundaryId;
10
- group?: string;
11
- nextScreenKey?: string;
12
- maybeMeasureAndStore: (options: MaybeMeasureAndStoreParams) => void;
13
- }) => {
14
- const {
15
- enabled,
16
- sharedBoundTag,
17
- id,
18
- group,
19
- nextScreenKey,
20
- maybeMeasureAndStore,
21
- } = params;
22
- const boundaryPresence = BoundStore.getBoundaryPresence();
23
-
24
- useAnimatedReaction(
25
- () => {
26
- "worklet";
27
- return resolveAutoSourceCaptureSignal({
28
- enabled,
29
- nextScreenKey,
30
- tagPresence: boundaryPresence.value[sharedBoundTag],
31
- });
32
- },
33
- (captureSignal, previousCaptureSignal) => {
34
- "worklet";
35
- if (!enabled) return;
36
- if (!nextScreenKey) return;
37
- if (!captureSignal || captureSignal === previousCaptureSignal) return;
38
- const currentGroupActiveId = group
39
- ? BoundStore.getGroupActiveId(group)
40
- : null;
41
- if (group && currentGroupActiveId !== String(id)) {
42
- return;
43
- }
44
- maybeMeasureAndStore({ intent: "capture-source" });
45
- },
46
- [
47
- enabled,
48
- id,
49
- group,
50
- nextScreenKey,
51
- sharedBoundTag,
52
- boundaryPresence,
53
- maybeMeasureAndStore,
54
- ],
55
- );
56
- };
@@ -1,154 +0,0 @@
1
- import type { View } from "react-native";
2
- import {
3
- type AnimatedRef,
4
- type MeasuredDimensions,
5
- measure,
6
- type StyleProps,
7
- } from "react-native-reanimated";
8
- import useStableCallbackValue from "../../../hooks/use-stable-callback-value";
9
- import { useLayoutAnchorContext } from "../../../providers/layout-anchor.provider";
10
- import { BoundStore } from "../../../stores/bounds";
11
- import { applyMeasuredBoundsWrites } from "../../../stores/bounds/helpers/apply-measured-bounds-writes";
12
- import { resolvePendingSourceKey } from "../helpers/resolve-pending-source-key";
13
- import type { MaybeMeasureAndStoreParams } from "../types";
14
- import {
15
- getMeasurementIntentFlags,
16
- resolveMeasurementWritePlan,
17
- } from "./helpers/measurement-rules";
18
-
19
- const SNAPSHOT_EPSILON = 0.5;
20
-
21
- const areMeasurementsEqual = (
22
- a: MeasuredDimensions,
23
- b: MeasuredDimensions,
24
- ): boolean => {
25
- "worklet";
26
-
27
- return (
28
- Math.abs(a.x - b.x) <= SNAPSHOT_EPSILON &&
29
- Math.abs(a.y - b.y) <= SNAPSHOT_EPSILON &&
30
- Math.abs(a.pageX - b.pageX) <= SNAPSHOT_EPSILON &&
31
- Math.abs(a.pageY - b.pageY) <= SNAPSHOT_EPSILON &&
32
- Math.abs(a.width - b.width) <= SNAPSHOT_EPSILON &&
33
- Math.abs(a.height - b.height) <= SNAPSHOT_EPSILON
34
- );
35
- };
36
-
37
- export const useBoundaryMeasureAndStore = (params: {
38
- enabled: boolean;
39
- sharedBoundTag: string;
40
- preferredSourceScreenKey?: string;
41
- currentScreenKey: string;
42
- ancestorKeys: string[];
43
- navigatorKey?: string;
44
- ancestorNavigatorKeys?: string[];
45
- preparedStyles: StyleProps;
46
- measuredAnimatedRef: AnimatedRef<View>;
47
- }) => {
48
- const {
49
- enabled,
50
- sharedBoundTag,
51
- preferredSourceScreenKey,
52
- currentScreenKey,
53
- ancestorKeys,
54
- navigatorKey,
55
- ancestorNavigatorKeys,
56
- preparedStyles,
57
- measuredAnimatedRef,
58
- } = params;
59
-
60
- const layoutAnchor = useLayoutAnchorContext();
61
-
62
- return useStableCallbackValue(
63
- ({ intent }: MaybeMeasureAndStoreParams = {}) => {
64
- "worklet";
65
- if (!enabled) return;
66
-
67
- const intents = getMeasurementIntentFlags(intent);
68
-
69
- const expectedSourceScreenKey: string | undefined =
70
- resolvePendingSourceKey(sharedBoundTag, preferredSourceScreenKey) ||
71
- undefined;
72
-
73
- const hasPendingLink = expectedSourceScreenKey
74
- ? BoundStore.hasPendingLinkFromSource(
75
- sharedBoundTag,
76
- expectedSourceScreenKey,
77
- )
78
- : BoundStore.hasPendingLink(sharedBoundTag);
79
- const hasAttachableSourceLink = expectedSourceScreenKey
80
- ? BoundStore.hasSourceLink(sharedBoundTag, expectedSourceScreenKey)
81
- : false;
82
- const hasSourceLink = BoundStore.hasSourceLink(
83
- sharedBoundTag,
84
- currentScreenKey,
85
- );
86
- const hasDestinationLink = BoundStore.hasDestinationLink(
87
- sharedBoundTag,
88
- currentScreenKey,
89
- );
90
-
91
- const writePlan = resolveMeasurementWritePlan({
92
- intents,
93
- hasPendingLink,
94
- hasSourceLink,
95
- hasDestinationLink,
96
- hasAttachableSourceLink,
97
- });
98
-
99
- if (!writePlan.writesAny) {
100
- return;
101
- }
102
-
103
- const measured = measure(measuredAnimatedRef);
104
- if (!measured) return;
105
-
106
- const correctedMeasured = layoutAnchor
107
- ? layoutAnchor.correctMeasurement(measured)
108
- : measured;
109
-
110
- const destinationInViewport =
111
- !writePlan.wantsDestinationWrite ||
112
- !layoutAnchor ||
113
- !layoutAnchor.isMeasurementInViewport ||
114
- layoutAnchor.isMeasurementInViewport(correctedMeasured);
115
-
116
- if (
117
- !destinationInViewport &&
118
- !writePlan.captureSource &&
119
- !writePlan.refreshSource
120
- ) {
121
- return;
122
- }
123
-
124
- const existingSnapshot = BoundStore.getSnapshot(
125
- sharedBoundTag,
126
- currentScreenKey,
127
- );
128
- const hasSnapshotChanged =
129
- !existingSnapshot ||
130
- !areMeasurementsEqual(existingSnapshot.bounds, correctedMeasured);
131
- const shouldWriteSnapshot = hasSnapshotChanged;
132
-
133
- applyMeasuredBoundsWrites({
134
- sharedBoundTag,
135
- currentScreenKey,
136
- measured: correctedMeasured,
137
- preparedStyles,
138
- ancestorKeys,
139
- navigatorKey,
140
- ancestorNavigatorKeys,
141
- expectedSourceScreenKey,
142
- shouldRegisterSnapshot: shouldWriteSnapshot,
143
- shouldSetSource: writePlan.captureSource,
144
- shouldUpdateSource: writePlan.refreshSource && hasSnapshotChanged,
145
- shouldUpdateDestination:
146
- writePlan.refreshDestination &&
147
- destinationInViewport &&
148
- hasSnapshotChanged,
149
- shouldSetDestination:
150
- writePlan.completeDestination && destinationInViewport,
151
- });
152
- },
153
- );
154
- };
@@ -1,223 +0,0 @@
1
- import { useLayoutEffect } from "react";
2
- import {
3
- runOnUI,
4
- type SharedValue,
5
- useAnimatedReaction,
6
- useSharedValue,
7
- } from "react-native-reanimated";
8
- import { AnimationStore } from "../../../stores/animation.store";
9
- import { BoundStore } from "../../../stores/bounds";
10
- import { resolvePendingSourceKey } from "../helpers/resolve-pending-source-key";
11
- import type { BoundaryId, MaybeMeasureAndStoreParams } from "../types";
12
- import {
13
- resolvePendingDestinationCaptureSignal,
14
- resolvePendingDestinationRetrySignal,
15
- } from "./helpers/measurement-rules";
16
-
17
- /**
18
- * The current v3.4 behavior intentionally favors correctness over efficiency:
19
- * when destination layout races transition start, this hook may re-measure
20
- * multiple times to recover a usable pair for `navigation.zoom()`.
21
- *
22
- * This works well enough for now, but it is not the ideal architecture. A more
23
- * complete v4 solution should allow open-animation deferral and broader
24
- * readiness coordination so we can avoid repeated measurement work while still
25
- * handling multiple transition scenarios correctly. Until that system exists,
26
- * `navigation.zoom()` remains fast in practice, just not as performant as it
27
- * could be.
28
- *
29
- * For now, you may notice a slight stutter towards the end of the animation.
30
- */
31
- export const usePendingDestinationMeasurement = (params: {
32
- sharedBoundTag: string;
33
- enabled: boolean;
34
- id: BoundaryId;
35
- group?: string;
36
- currentScreenKey: string;
37
- expectedSourceScreenKey?: string;
38
- animating: SharedValue<number>;
39
- maybeMeasureAndStore: (options: MaybeMeasureAndStoreParams) => void;
40
- }) => {
41
- const {
42
- sharedBoundTag,
43
- enabled,
44
- id,
45
- group,
46
- currentScreenKey,
47
- expectedSourceScreenKey,
48
- animating,
49
- maybeMeasureAndStore,
50
- } = params;
51
-
52
- const progress = AnimationStore.getValue(currentScreenKey, "progress");
53
- const closing = AnimationStore.getValue(currentScreenKey, "closing");
54
-
55
- const retryCount = useSharedValue(0);
56
- const MAX_RETRIES = 4;
57
- const RETRY_PROGRESS_BUCKETS = 8;
58
- const RETRY_PROGRESS_MAX = 1.05;
59
-
60
- useLayoutEffect(() => {
61
- if (!enabled) return;
62
-
63
- runOnUI(() => {
64
- "worklet";
65
- if (closing.get()) {
66
- return;
67
- }
68
-
69
- const currentGroupActiveId = group
70
- ? BoundStore.getGroupActiveId(group)
71
- : null;
72
- if (group && currentGroupActiveId !== String(id)) {
73
- return;
74
- }
75
-
76
- const resolvedSourceKey = resolvePendingSourceKey(
77
- sharedBoundTag,
78
- expectedSourceScreenKey,
79
- );
80
- const hasAttachableSourceLink = resolvedSourceKey
81
- ? BoundStore.hasPendingLinkFromSource(
82
- sharedBoundTag,
83
- resolvedSourceKey,
84
- ) || BoundStore.hasSourceLink(sharedBoundTag, resolvedSourceKey)
85
- : false;
86
-
87
- if (!hasAttachableSourceLink) {
88
- return;
89
- }
90
-
91
- if (BoundStore.hasDestinationLink(sharedBoundTag, currentScreenKey)) {
92
- return;
93
- }
94
-
95
- maybeMeasureAndStore({ intent: "complete-destination" });
96
- })();
97
- }, [
98
- enabled,
99
- id,
100
- group,
101
- sharedBoundTag,
102
- currentScreenKey,
103
- expectedSourceScreenKey,
104
- closing,
105
- maybeMeasureAndStore,
106
- ]);
107
-
108
- /**
109
- * This exessive retry for groups with {target:"bound"} will have to change in v4.
110
- * .navigation.zoom() is stable and works great for non groups and groups that are non {target: "bound"}.
111
- *
112
- * The retry logic is needed for dst screen when we do an initialScrollIndex, the system is competing with the (i assume) useLayoutEffect
113
- * in the scrollable, causing a race here and giving us wrong measurements. I believe, in simialr fashion to how
114
- * system.store defers the screen from animating, we could possibly do the same here. Registering it up, once we get valid measurements, we can
115
- * un defer? Is that the word? Undefer the screen, removing this block compeltely, avoiding any potential flickers ( which currently happens.)
116
- *
117
- * You can replicate this bug by dismissing dst, as dst reaches its ending tail (0.01->0.10), if we tap again, we notice a flicker.
118
- */
119
- useAnimatedReaction(
120
- () => {
121
- "worklet";
122
- if (closing.get()) {
123
- return 0;
124
- }
125
- const resolvedSourceKey = resolvePendingSourceKey(
126
- sharedBoundTag,
127
- expectedSourceScreenKey,
128
- );
129
- return resolvePendingDestinationCaptureSignal({
130
- enabled,
131
- resolvedSourceKey,
132
- hasAttachableSourceLink: resolvedSourceKey
133
- ? BoundStore.hasPendingLinkFromSource(
134
- sharedBoundTag,
135
- resolvedSourceKey,
136
- ) || BoundStore.hasSourceLink(sharedBoundTag, resolvedSourceKey)
137
- : false,
138
- hasDestinationLink: BoundStore.hasDestinationLink(
139
- sharedBoundTag,
140
- currentScreenKey,
141
- ),
142
- });
143
- },
144
- (captureSignal, previousCaptureSignal) => {
145
- "worklet";
146
- if (!enabled) return;
147
- if (!captureSignal || captureSignal === previousCaptureSignal) {
148
- return;
149
- }
150
-
151
- const currentGroupActiveId = group
152
- ? BoundStore.getGroupActiveId(group)
153
- : null;
154
-
155
- if (group && currentGroupActiveId !== String(id)) {
156
- return;
157
- }
158
-
159
- maybeMeasureAndStore({ intent: "complete-destination" });
160
- },
161
- [
162
- enabled,
163
- id,
164
- group,
165
- sharedBoundTag,
166
- expectedSourceScreenKey,
167
- closing,
168
- maybeMeasureAndStore,
169
- ],
170
- );
171
-
172
- useAnimatedReaction(
173
- () => {
174
- "worklet";
175
- if (closing.get()) {
176
- return 0;
177
- }
178
- const resolvedSourceKey = resolvePendingSourceKey(
179
- sharedBoundTag,
180
- expectedSourceScreenKey,
181
- );
182
- return resolvePendingDestinationRetrySignal({
183
- enabled,
184
- retryCount: retryCount.get(),
185
- maxRetries: MAX_RETRIES,
186
- isAnimating: !!animating.get(),
187
- hasDestinationLink: BoundStore.hasDestinationLink(
188
- sharedBoundTag,
189
- currentScreenKey,
190
- ),
191
- progress: progress.get(),
192
- retryProgressMax: RETRY_PROGRESS_MAX,
193
- retryProgressBuckets: RETRY_PROGRESS_BUCKETS,
194
- resolvedSourceKey,
195
- hasAttachableSourceLink: resolvedSourceKey
196
- ? BoundStore.hasPendingLinkFromSource(
197
- sharedBoundTag,
198
- resolvedSourceKey,
199
- ) || BoundStore.hasSourceLink(sharedBoundTag, resolvedSourceKey)
200
- : false,
201
- });
202
- },
203
- (captureSignal) => {
204
- "worklet";
205
- // if (!group) return;
206
- if (!enabled) return;
207
- if (!captureSignal) {
208
- retryCount.set(0);
209
- return;
210
- }
211
- const currentGroupActiveId = group
212
- ? BoundStore.getGroupActiveId(group)
213
- : null;
214
- if (group && currentGroupActiveId !== String(id)) {
215
- return;
216
- }
217
-
218
- if (retryCount.get() >= MAX_RETRIES) return;
219
- retryCount.set(retryCount.get() + 1);
220
- maybeMeasureAndStore({ intent: "complete-destination" });
221
- },
222
- );
223
- };
@@ -1,29 +0,0 @@
1
- import { runOnUI } from "react-native-reanimated";
2
- import { AnimationStore } from "../../../../../stores/animation.store";
3
- import { BoundStore } from "../../../../../stores/bounds";
4
- import { GestureStore } from "../../../../../stores/gesture.store";
5
- import { SystemStore } from "../../../../../stores/system.store";
6
-
7
- export const resetStoresForScreen = (
8
- routeKey: string,
9
- isBranchScreen: boolean,
10
- branchNavigatorKey?: string,
11
- ) => {
12
- AnimationStore.clearBag(routeKey);
13
- GestureStore.clearBag(routeKey);
14
- SystemStore.clearBag(routeKey);
15
-
16
- runOnUI(() => {
17
- "worklet";
18
- if (!isBranchScreen) return;
19
-
20
- BoundStore.clear(routeKey);
21
-
22
- if (branchNavigatorKey) {
23
- BoundStore.clearByBranch(branchNavigatorKey);
24
- return;
25
- }
26
-
27
- BoundStore.clearByAncestor(routeKey);
28
- })();
29
- };
@@ -1,58 +0,0 @@
1
- import { useEffect } from "react";
2
- import { HistoryStore } from "../../../../../stores/history.store";
3
-
4
- const mountedRoutesByNavigator = new Map<string, Set<string>>();
5
-
6
- function registerMountedRoute(navigatorKey: string, routeKey: string): void {
7
- if (!navigatorKey || !routeKey) return;
8
-
9
- let routes = mountedRoutesByNavigator.get(navigatorKey);
10
- if (!routes) {
11
- routes = new Set();
12
- mountedRoutesByNavigator.set(navigatorKey, routes);
13
- }
14
-
15
- routes.add(routeKey);
16
- }
17
-
18
- /**
19
- * Removes the route from its navigator set.
20
- * Returns true when the navigator has no mounted routes left.
21
- */
22
- function unregisterMountedRoute(
23
- navigatorKey: string,
24
- routeKey: string,
25
- ): boolean {
26
- if (!navigatorKey || !routeKey) return false;
27
-
28
- const routes = mountedRoutesByNavigator.get(navigatorKey);
29
- if (!routes) return false;
30
-
31
- routes.delete(routeKey);
32
-
33
- if (routes.size > 0) {
34
- return false;
35
- }
36
-
37
- mountedRoutesByNavigator.delete(navigatorKey);
38
- return true;
39
- }
40
-
41
- export const useNavigatorHistoryRegistry = (
42
- navigatorKey: string,
43
- routeKey: string,
44
- ) => {
45
- useEffect(() => {
46
- registerMountedRoute(navigatorKey, routeKey);
47
-
48
- return () => {
49
- const shouldClearNavigator = unregisterMountedRoute(
50
- navigatorKey,
51
- routeKey,
52
- );
53
- if (shouldClearNavigator) {
54
- HistoryStore.clearNavigator(navigatorKey);
55
- }
56
- };
57
- }, [navigatorKey, routeKey]);
58
- };