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,186 +1,149 @@
1
1
  import type { MeasuredDimensions, StyleProps } from "react-native-reanimated";
2
+ import { hasAnyKeys } from "../helpers/keys";
2
3
  import { matchesScreenKey } from "../helpers/matching";
3
4
  import type {
5
+ BoundaryConfig,
6
+ EntryPatch,
7
+ MeasuredEntry,
4
8
  NavigatorKey,
9
+ ScreenEntry,
5
10
  ScreenKey,
6
- Snapshot,
7
11
  TagID,
8
12
  TagLink,
9
13
  TagState,
10
14
  } from "../types";
11
- import { createEmptyTagState, type RegistryState, registry } from "./state";
15
+ import { type RegistryState, registry } from "./state";
12
16
 
13
17
  const LINK_HISTORY_LIMIT = 3;
14
18
 
19
+ type LinkSourceWriteMode = "capture" | "refresh";
20
+ type LinkDestinationWriteMode = "attach" | "refresh";
21
+
15
22
  const ensureTagState = (state: RegistryState, tag: TagID): TagState => {
16
23
  "worklet";
17
24
  if (!state[tag]) {
18
- state[tag] = createEmptyTagState();
25
+ state[tag] = {
26
+ screens: {},
27
+ linkStack: [],
28
+ };
19
29
  }
20
30
  return state[tag];
21
31
  };
22
32
 
23
- const isSameScreenFamily = (
24
- a: { screenKey: ScreenKey; ancestorKeys?: ScreenKey[] },
25
- b: { screenKey: ScreenKey; ancestorKeys?: ScreenKey[] },
26
- ): boolean => {
33
+ const ensureScreenEntry = (
34
+ tagState: TagState,
35
+ screenKey: ScreenKey,
36
+ ): ScreenEntry => {
27
37
  "worklet";
28
- return (
29
- a.screenKey === b.screenKey ||
30
- (a.ancestorKeys?.includes(b.screenKey) ?? false) ||
31
- (b.ancestorKeys?.includes(a.screenKey) ?? false)
32
- );
38
+ if (!tagState.screens[screenKey]) {
39
+ tagState.screens[screenKey] = {
40
+ bounds: null,
41
+ styles: {},
42
+ };
43
+ }
44
+ return tagState.screens[screenKey];
33
45
  };
34
46
 
35
- const trimLinkHistory = (tagState: TagState) => {
47
+ const hasMeasuredEntry = (
48
+ entry: ScreenEntry | undefined,
49
+ ): entry is MeasuredEntry => {
36
50
  "worklet";
37
- const overLimit = tagState.linkStack.length - LINK_HISTORY_LIMIT;
38
- if (overLimit <= 0) return;
39
- tagState.linkStack.splice(0, overLimit);
51
+ return entry?.bounds !== null && entry?.bounds !== undefined;
40
52
  };
41
53
 
42
- function getSnapshot(tag: TagID, key: ScreenKey): Snapshot | null {
54
+ const pruneTagState = (state: RegistryState, tag: TagID) => {
43
55
  "worklet";
44
- const tagState = registry.value[tag];
45
- if (!tagState) return null;
56
+ const tagState = state[tag];
57
+ if (!tagState) return;
46
58
 
47
- if (tagState.snapshots[key]) {
48
- const snap = tagState.snapshots[key];
49
- return { bounds: snap.bounds, styles: snap.styles };
59
+ if (!hasAnyKeys(tagState.screens) && tagState.linkStack.length === 0) {
60
+ delete state[tag];
50
61
  }
62
+ };
51
63
 
52
- for (const screenKey in tagState.snapshots) {
53
- const snap = tagState.snapshots[screenKey];
54
- if (snap.ancestorKeys?.includes(key)) {
55
- return { bounds: snap.bounds, styles: snap.styles };
56
- }
57
- }
58
-
59
- return null;
60
- }
61
-
62
- function registerSnapshot(
63
- tag: TagID,
64
- screenKey: ScreenKey,
65
- bounds: MeasuredDimensions,
66
- styles: StyleProps = {},
67
- ancestorKeys?: ScreenKey[],
68
- navigatorKey?: NavigatorKey,
69
- ancestorNavigatorKeys?: NavigatorKey[],
70
- ) {
64
+ const applyEntryPatch = (entry: ScreenEntry, patch: EntryPatch) => {
71
65
  "worklet";
72
- registry.modify(<T extends RegistryState>(state: T): T => {
73
- "worklet";
74
- const tagState = ensureTagState(state, tag);
75
- tagState.snapshots[screenKey] = {
76
- bounds,
77
- styles,
78
- ancestorKeys,
79
- navigatorKey,
80
- ancestorNavigatorKeys,
81
- };
82
- return state;
83
- });
84
- }
66
+ if (patch.bounds !== undefined) {
67
+ entry.bounds = patch.bounds;
68
+ }
85
69
 
86
- function setLinkSource(
87
- tag: TagID,
88
- screenKey: ScreenKey,
89
- bounds: MeasuredDimensions,
90
- styles: StyleProps = {},
91
- ancestorKeys?: ScreenKey[],
92
- navigatorKey?: NavigatorKey,
93
- ancestorNavigatorKeys?: NavigatorKey[],
94
- ) {
95
- "worklet";
96
- registry.modify(<T extends RegistryState>(state: T): T => {
97
- "worklet";
98
- const tagState = ensureTagState(state, tag);
99
- const stack = tagState.linkStack;
100
- const topIndex = stack.length - 1;
101
- const topLink = topIndex >= 0 ? stack[topIndex] : null;
70
+ if (patch.styles !== undefined) {
71
+ entry.styles = patch.styles ?? {};
72
+ }
102
73
 
103
- const source = {
104
- screenKey,
105
- ancestorKeys,
106
- navigatorKey,
107
- ancestorNavigatorKeys,
108
- bounds,
109
- styles,
110
- };
74
+ if (patch.boundaryConfig !== undefined) {
75
+ if (patch.boundaryConfig === null) {
76
+ delete entry.boundaryConfig;
77
+ } else {
78
+ entry.boundaryConfig = patch.boundaryConfig;
79
+ }
80
+ }
111
81
 
112
- if (
113
- topLink &&
114
- topLink.destination === null &&
115
- isSameScreenFamily(topLink.source, source)
116
- ) {
117
- topLink.source = source;
118
- return state;
82
+ if (patch.ancestorKeys !== undefined) {
83
+ if (patch.ancestorKeys === null) {
84
+ delete entry.ancestorKeys;
85
+ } else {
86
+ entry.ancestorKeys = patch.ancestorKeys;
119
87
  }
88
+ }
120
89
 
121
- stack.push({ source, destination: null });
122
- trimLinkHistory(tagState);
90
+ if (patch.navigatorKey !== undefined) {
91
+ if (patch.navigatorKey === null) {
92
+ delete entry.navigatorKey;
93
+ } else {
94
+ entry.navigatorKey = patch.navigatorKey;
95
+ }
96
+ }
123
97
 
124
- return state;
125
- });
126
- }
98
+ if (patch.ancestorNavigatorKeys !== undefined) {
99
+ if (patch.ancestorNavigatorKeys === null) {
100
+ delete entry.ancestorNavigatorKeys;
101
+ } else {
102
+ entry.ancestorNavigatorKeys = patch.ancestorNavigatorKeys;
103
+ }
104
+ }
105
+ };
127
106
 
128
- function updateLinkSource(
129
- tag: TagID,
107
+ const findMatchingScreenEntry = (
108
+ tagState: TagState | undefined,
130
109
  screenKey: ScreenKey,
131
- bounds: MeasuredDimensions,
132
- styles: StyleProps = {},
133
- ancestorKeys?: ScreenKey[],
134
- navigatorKey?: NavigatorKey,
135
- ancestorNavigatorKeys?: NavigatorKey[],
136
- ) {
110
+ shouldMatch: (entry: ScreenEntry) => boolean,
111
+ ): ScreenEntry | null => {
137
112
  "worklet";
138
- registry.modify(<T extends RegistryState>(state: T): T => {
139
- "worklet";
140
- const tagState = state[tag];
141
- const stack = tagState?.linkStack;
142
- if (!stack || stack.length === 0) return state;
143
-
144
- let targetIndex = -1;
145
-
146
- for (let i = stack.length - 1; i >= 0; i--) {
147
- const link = stack[i];
148
- if (link.destination && matchesScreenKey(link.source, screenKey)) {
149
- targetIndex = i;
150
- break;
151
- }
152
- }
113
+ if (!tagState) return null;
153
114
 
154
- if (targetIndex === -1) {
155
- for (let i = stack.length - 1; i >= 0; i--) {
156
- if (matchesScreenKey(stack[i].source, screenKey)) {
157
- targetIndex = i;
158
- break;
159
- }
160
- }
161
- }
115
+ const direct = tagState.screens[screenKey];
116
+ if (direct && shouldMatch(direct)) {
117
+ return direct;
118
+ }
162
119
 
163
- if (targetIndex === -1) {
164
- return state;
120
+ for (const entryScreenKey in tagState.screens) {
121
+ const entry = tagState.screens[entryScreenKey];
122
+ if (!shouldMatch(entry)) continue;
123
+ if (entry.ancestorKeys?.includes(screenKey)) {
124
+ return entry;
165
125
  }
126
+ }
166
127
 
167
- stack[targetIndex].source = {
168
- screenKey,
169
- ancestorKeys,
170
- navigatorKey,
171
- ancestorNavigatorKeys,
172
- bounds,
173
- styles,
174
- };
128
+ return null;
129
+ };
175
130
 
176
- return state;
177
- });
178
- }
131
+ const isSameScreenFamily = (
132
+ a: { screenKey: ScreenKey; ancestorKeys?: ScreenKey[] },
133
+ b: { screenKey: ScreenKey; ancestorKeys?: ScreenKey[] },
134
+ ): boolean => {
135
+ "worklet";
136
+ return (
137
+ a.screenKey === b.screenKey ||
138
+ (a.ancestorKeys?.includes(b.screenKey) ?? false) ||
139
+ (b.ancestorKeys?.includes(a.screenKey) ?? false)
140
+ );
141
+ };
179
142
 
180
- const findLatestPendingIndex = (
143
+ function findLatestPendingIndex(
181
144
  stack: TagLink[],
182
145
  expectedSourceScreenKey?: ScreenKey,
183
- ): number => {
146
+ ): number {
184
147
  "worklet";
185
148
  for (let i = stack.length - 1; i >= 0; i--) {
186
149
  const link = stack[i];
@@ -194,12 +157,12 @@ const findLatestPendingIndex = (
194
157
  return i;
195
158
  }
196
159
  return -1;
197
- };
160
+ }
198
161
 
199
- const findLatestSourceIndex = (
162
+ function findLatestSourceIndex(
200
163
  stack: TagLink[],
201
164
  expectedSourceScreenKey?: ScreenKey,
202
- ): number => {
165
+ ): number {
203
166
  "worklet";
204
167
  if (!expectedSourceScreenKey) return -1;
205
168
 
@@ -210,33 +173,136 @@ const findLatestSourceIndex = (
210
173
  }
211
174
 
212
175
  return -1;
213
- };
176
+ }
177
+
178
+ function findLatestCompletedSourceIndex(
179
+ stack: TagLink[],
180
+ screenKey?: ScreenKey,
181
+ ): number {
182
+ "worklet";
183
+ if (!screenKey) return -1;
184
+
185
+ for (let i = stack.length - 1; i >= 0; i--) {
186
+ const link = stack[i];
187
+ if (link.destination && matchesScreenKey(link.source, screenKey)) {
188
+ return i;
189
+ }
190
+ }
191
+
192
+ return -1;
193
+ }
194
+
195
+ function findLatestCompletedDestinationIndex(
196
+ stack: TagLink[],
197
+ screenKey?: ScreenKey,
198
+ ): number {
199
+ "worklet";
200
+ if (!screenKey) return -1;
201
+
202
+ for (let i = stack.length - 1; i >= 0; i--) {
203
+ const link = stack[i];
204
+ if (link.destination && matchesScreenKey(link.destination, screenKey)) {
205
+ return i;
206
+ }
207
+ }
208
+
209
+ return -1;
210
+ }
211
+
212
+ function selectSourceUpdateTargetIndex(
213
+ stack: TagLink[],
214
+ screenKey: ScreenKey,
215
+ ): number {
216
+ "worklet";
217
+ const completedIndex = findLatestCompletedSourceIndex(stack, screenKey);
218
+ if (completedIndex !== -1) {
219
+ return completedIndex;
220
+ }
221
+
222
+ return findLatestSourceIndex(stack, screenKey);
223
+ }
224
+
225
+ function selectDestinationWriteTargetIndex(
226
+ stack: TagLink[],
227
+ screenKey?: ScreenKey,
228
+ expectedSourceScreenKey?: ScreenKey,
229
+ ): number {
230
+ "worklet";
231
+ const completedIndex = findLatestCompletedDestinationIndex(stack, screenKey);
232
+ if (completedIndex !== -1) {
233
+ return completedIndex;
234
+ }
235
+
236
+ const pendingIndex = findLatestPendingIndex(stack, expectedSourceScreenKey);
237
+ if (pendingIndex !== -1) {
238
+ return pendingIndex;
239
+ }
214
240
 
215
- function setLinkDestination(
241
+ return findLatestSourceIndex(stack, expectedSourceScreenKey);
242
+ }
243
+
244
+ function getEntry(tag: TagID, key: ScreenKey): ScreenEntry | null {
245
+ "worklet";
246
+ return findMatchingScreenEntry(registry.get()[tag], key, () => true);
247
+ }
248
+
249
+ function getMeasuredEntry(tag: TagID, key: ScreenKey): MeasuredEntry | null {
250
+ "worklet";
251
+ const entry = findMatchingScreenEntry(registry.get()[tag], key, (candidate) =>
252
+ hasMeasuredEntry(candidate),
253
+ );
254
+ return (entry as MeasuredEntry | null) ?? null;
255
+ }
256
+
257
+ function getEntryConfig(
258
+ tag: TagID,
259
+ screenKey: ScreenKey,
260
+ ): BoundaryConfig | null {
261
+ "worklet";
262
+ return getEntry(tag, screenKey)?.boundaryConfig ?? null;
263
+ }
264
+
265
+ function setEntry(tag: TagID, screenKey: ScreenKey, patch: EntryPatch) {
266
+ "worklet";
267
+ registry.modify(<T extends RegistryState>(state: T): T => {
268
+ "worklet";
269
+ const tagState = ensureTagState(state, tag);
270
+ const entry = ensureScreenEntry(tagState, screenKey);
271
+ applyEntryPatch(entry, patch);
272
+ return state;
273
+ });
274
+ }
275
+
276
+ function removeEntry(tag: TagID, screenKey: ScreenKey) {
277
+ "worklet";
278
+ registry.modify(<T extends RegistryState>(state: T): T => {
279
+ "worklet";
280
+ const tagState = state[tag];
281
+ if (!tagState?.screens[screenKey]) {
282
+ return state;
283
+ }
284
+
285
+ delete tagState.screens[screenKey];
286
+ pruneTagState(state, tag);
287
+
288
+ return state;
289
+ });
290
+ }
291
+
292
+ function setSource(
293
+ mode: LinkSourceWriteMode,
216
294
  tag: TagID,
217
295
  screenKey: ScreenKey,
218
296
  bounds: MeasuredDimensions,
219
297
  styles: StyleProps = {},
220
298
  ancestorKeys?: ScreenKey[],
221
- expectedSourceScreenKey?: ScreenKey,
222
299
  navigatorKey?: NavigatorKey,
223
300
  ancestorNavigatorKeys?: NavigatorKey[],
224
301
  ) {
225
302
  "worklet";
226
303
  registry.modify(<T extends RegistryState>(state: T): T => {
227
304
  "worklet";
228
- const tagState = state[tag];
229
- const stack = tagState?.linkStack;
230
- if (!stack || stack.length === 0) return state;
231
-
232
- let targetIndex = findLatestPendingIndex(stack, expectedSourceScreenKey);
233
- if (targetIndex === -1) {
234
- targetIndex = findLatestSourceIndex(stack, expectedSourceScreenKey);
235
- }
236
- if (targetIndex === -1) return state;
237
-
238
- const targetLink = stack[targetIndex];
239
- targetLink.destination = {
305
+ const source = {
240
306
  screenKey,
241
307
  ancestorKeys,
242
308
  navigatorKey,
@@ -245,11 +311,44 @@ function setLinkDestination(
245
311
  styles,
246
312
  };
247
313
 
314
+ if (mode === "capture") {
315
+ const tagState = ensureTagState(state, tag);
316
+ const stack = tagState.linkStack;
317
+ const topIndex = stack.length - 1;
318
+ const topLink = topIndex >= 0 ? stack[topIndex] : null;
319
+
320
+ if (
321
+ topLink &&
322
+ topLink.destination === null &&
323
+ isSameScreenFamily(topLink.source, source)
324
+ ) {
325
+ topLink.source = source;
326
+ return state;
327
+ }
328
+
329
+ stack.push({ source, destination: null });
330
+
331
+ const overLimit = tagState.linkStack.length - LINK_HISTORY_LIMIT;
332
+ if (overLimit > 0) {
333
+ tagState.linkStack.splice(0, overLimit);
334
+ }
335
+
336
+ return state;
337
+ }
338
+
339
+ const stack = state[tag]?.linkStack;
340
+ if (!stack || stack.length === 0) return state;
341
+ const targetIndex = selectSourceUpdateTargetIndex(stack, screenKey);
342
+ if (targetIndex === -1) return state;
343
+
344
+ stack[targetIndex].source = source;
345
+
248
346
  return state;
249
347
  });
250
348
  }
251
349
 
252
- function updateLinkDestination(
350
+ function setDestination(
351
+ mode: LinkDestinationWriteMode,
253
352
  tag: TagID,
254
353
  screenKey: ScreenKey,
255
354
  bounds: MeasuredDimensions,
@@ -262,31 +361,14 @@ function updateLinkDestination(
262
361
  "worklet";
263
362
  registry.modify(<T extends RegistryState>(state: T): T => {
264
363
  "worklet";
265
- const tagState = state[tag];
266
- const stack = tagState?.linkStack;
364
+ const stack = state[tag]?.linkStack;
267
365
  if (!stack || stack.length === 0) return state;
268
-
269
- let targetIndex = -1;
270
-
271
- for (let i = stack.length - 1; i >= 0; i--) {
272
- const link = stack[i];
273
- if (link.destination && matchesScreenKey(link.destination, screenKey)) {
274
- targetIndex = i;
275
- break;
276
- }
277
- }
278
-
279
- if (targetIndex === -1) {
280
- targetIndex = findLatestPendingIndex(stack, expectedSourceScreenKey);
281
- }
282
-
283
- if (targetIndex === -1) {
284
- targetIndex = findLatestSourceIndex(stack, expectedSourceScreenKey);
285
- }
286
-
287
- if (targetIndex === -1) {
288
- return state;
289
- }
366
+ const targetIndex = selectDestinationWriteTargetIndex(
367
+ stack,
368
+ mode === "refresh" ? screenKey : undefined,
369
+ expectedSourceScreenKey,
370
+ );
371
+ if (targetIndex === -1) return state;
290
372
 
291
373
  stack[targetIndex].destination = {
292
374
  screenKey,
@@ -303,7 +385,7 @@ function updateLinkDestination(
303
385
 
304
386
  function getActiveLink(tag: TagID, screenKey?: ScreenKey): TagLink | null {
305
387
  "worklet";
306
- const tagState = registry.value[tag];
388
+ const tagState = registry.get()[tag];
307
389
  const stack = tagState?.linkStack;
308
390
  if (!stack || stack.length === 0) {
309
391
  return null;
@@ -328,58 +410,23 @@ function getActiveLink(tag: TagID, screenKey?: ScreenKey): TagLink | null {
328
410
  return null;
329
411
  }
330
412
 
331
- function hasPendingLink(tag: TagID): boolean {
332
- "worklet";
333
- const tagState = registry.value[tag];
334
- const stack = tagState?.linkStack;
335
- if (!stack || stack.length === 0) return false;
336
-
337
- for (let i = stack.length - 1; i >= 0; i--) {
338
- if (stack[i].destination === null) {
339
- return true;
340
- }
341
- }
342
-
343
- return false;
344
- }
345
-
346
- function hasPendingLinkFromSource(
413
+ function getPendingLink(
347
414
  tag: TagID,
348
- sourceScreenKey: ScreenKey,
349
- ): boolean {
350
- "worklet";
351
- const tagState = registry.value[tag];
352
- const stack = tagState?.linkStack;
353
- if (!stack || stack.length === 0) return false;
354
-
355
- for (let i = stack.length - 1; i >= 0; i--) {
356
- const link = stack[i];
357
- if (link.destination !== null) continue;
358
- if (matchesScreenKey(link.source, sourceScreenKey)) return true;
359
- }
360
-
361
- return false;
362
- }
363
-
364
- function getLatestPendingSourceScreenKey(tag: TagID): ScreenKey | null {
415
+ sourceScreenKey?: ScreenKey,
416
+ ): TagLink | null {
365
417
  "worklet";
366
- const tagState = registry.value[tag];
418
+ const tagState = registry.get()[tag];
367
419
  const stack = tagState?.linkStack;
368
420
  if (!stack || stack.length === 0) return null;
369
421
 
370
- for (let i = stack.length - 1; i >= 0; i--) {
371
- const link = stack[i];
372
- if (link.destination === null) {
373
- return link.source.screenKey;
374
- }
375
- }
376
-
377
- return null;
422
+ const targetIndex = findLatestPendingIndex(stack, sourceScreenKey);
423
+ if (targetIndex === -1) return null;
424
+ return stack[targetIndex] ?? null;
378
425
  }
379
426
 
380
427
  function hasSourceLink(tag: TagID, screenKey: ScreenKey): boolean {
381
428
  "worklet";
382
- const tagState = registry.value[tag];
429
+ const tagState = registry.get()[tag];
383
430
  const stack = tagState?.linkStack;
384
431
  if (!stack || stack.length === 0) return false;
385
432
 
@@ -392,7 +439,7 @@ function hasSourceLink(tag: TagID, screenKey: ScreenKey): boolean {
392
439
 
393
440
  function hasDestinationLink(tag: TagID, screenKey: ScreenKey): boolean {
394
441
  "worklet";
395
- const tagState = registry.value[tag];
442
+ const tagState = registry.get()[tag];
396
443
  const stack = tagState?.linkStack;
397
444
  if (!stack || stack.length === 0) return false;
398
445
 
@@ -404,16 +451,15 @@ function hasDestinationLink(tag: TagID, screenKey: ScreenKey): boolean {
404
451
  }
405
452
 
406
453
  export {
407
- getSnapshot,
408
- registerSnapshot,
409
- setLinkSource,
410
- updateLinkSource,
411
- setLinkDestination,
412
- updateLinkDestination,
413
454
  getActiveLink,
414
- hasPendingLink,
415
- hasPendingLinkFromSource,
416
- getLatestPendingSourceScreenKey,
417
- hasSourceLink,
455
+ getEntry,
456
+ getEntryConfig,
457
+ getMeasuredEntry,
458
+ getPendingLink,
418
459
  hasDestinationLink,
460
+ hasSourceLink,
461
+ removeEntry,
462
+ setDestination,
463
+ setEntry,
464
+ setSource,
419
465
  };
@@ -70,11 +70,10 @@ function resolveTransitionPair(
70
70
  context: ResolveTransitionContext,
71
71
  ): ResolvedTransitionPair {
72
72
  "worklet";
73
- const tagState = registry.value[tag];
73
+ const tagState = registry.get()[tag];
74
74
  const stack = tagState?.linkStack;
75
75
 
76
76
  let matchedLink: TagLink | null = null;
77
- let usedPending = false;
78
77
 
79
78
  if (tagState && stack && stack.length > 0) {
80
79
  if (context.entering) {
@@ -88,7 +87,6 @@ function resolveTransitionPair(
88
87
  tagState,
89
88
  context.previousScreenKey,
90
89
  );
91
- usedPending = !!matchedLink;
92
90
  }
93
91
 
94
92
  if (!matchedLink) {
@@ -122,7 +120,6 @@ function resolveTransitionPair(
122
120
  tagState,
123
121
  context.currentScreenKey,
124
122
  );
125
- usedPending = !!matchedLink;
126
123
  }
127
124
  }
128
125
  }
@@ -141,7 +138,6 @@ function resolveTransitionPair(
141
138
  destinationStyles,
142
139
  sourceScreenKey,
143
140
  destinationScreenKey,
144
- usedPending,
145
141
  };
146
142
  }
147
143
 
@@ -1,10 +1,10 @@
1
1
  import { makeMutable } from "react-native-reanimated";
2
- import type { GroupState, PresenceState, TagID, TagState } from "../types";
2
+ import type { GroupState, TagID, TagState } from "../types";
3
3
 
4
4
  export const createEmptyTagState = (): TagState => {
5
5
  "worklet";
6
6
  return {
7
- snapshots: {},
7
+ screens: {},
8
8
  linkStack: [],
9
9
  };
10
10
  };
@@ -13,5 +13,4 @@ export type RegistryState = Record<TagID, TagState>;
13
13
  export type GroupsState = Record<string, GroupState>;
14
14
 
15
15
  export const registry = makeMutable<RegistryState>({});
16
- export const presence = makeMutable<PresenceState>({});
17
16
  export const groups = makeMutable<GroupsState>({});