react-native-screen-transitions 3.6.0-alpha.1 → 3.6.0-alpha.2

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 (433) hide show
  1. package/lib/commonjs/component-stack/components/component-screen.js +1 -7
  2. package/lib/commonjs/component-stack/components/component-screen.js.map +1 -1
  3. package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js +27 -34
  4. package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js.map +1 -1
  5. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-presence.js +4 -4
  6. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +1 -1
  7. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js +17 -19
  8. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js.map +1 -1
  9. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js +27 -7
  10. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js.map +1 -1
  11. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-measurer.js +23 -51
  12. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-measurer.js.map +1 -1
  13. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-refresh-boundary.js +33 -40
  14. package/lib/commonjs/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map +1 -1
  15. package/lib/commonjs/shared/components/create-boundary-component/index.js +3 -1
  16. package/lib/commonjs/shared/components/create-boundary-component/index.js.map +1 -1
  17. package/lib/commonjs/shared/components/create-boundary-component/utils/destination-signals.js +75 -0
  18. package/lib/commonjs/shared/components/create-boundary-component/utils/destination-signals.js.map +1 -0
  19. package/lib/commonjs/shared/components/create-boundary-component/{hooks/helpers/scroll-measurement.js → utils/measured-bounds.js} +15 -2
  20. package/lib/commonjs/shared/components/create-boundary-component/utils/measured-bounds.js.map +1 -0
  21. package/lib/commonjs/shared/components/create-boundary-component/utils/refresh-signals.js +103 -0
  22. package/lib/commonjs/shared/components/create-boundary-component/utils/refresh-signals.js.map +1 -0
  23. package/lib/commonjs/shared/components/create-boundary-component/utils/source-signals.js +52 -0
  24. package/lib/commonjs/shared/components/create-boundary-component/utils/source-signals.js.map +1 -0
  25. package/lib/commonjs/shared/components/native-screen.js +2 -13
  26. package/lib/commonjs/shared/components/native-screen.js.map +1 -1
  27. package/lib/commonjs/shared/constants.js +2 -7
  28. package/lib/commonjs/shared/constants.js.map +1 -1
  29. package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js +35 -0
  30. package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js.map +1 -0
  31. package/lib/commonjs/shared/providers/register-bounds.provider.js +48 -55
  32. package/lib/commonjs/shared/providers/register-bounds.provider.js.map +1 -1
  33. package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js +1 -10
  34. package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js.map +1 -1
  35. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +1 -6
  36. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
  37. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  38. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-activation.js +2 -2
  39. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-activation.js.map +1 -1
  40. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-lifecycle.js +9 -2
  41. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-lifecycle.js.map +1 -1
  42. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-release.js +19 -0
  43. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-release.js.map +1 -1
  44. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-reset.js +2 -0
  45. package/lib/commonjs/shared/providers/screen/gestures/pan/pan-reset.js.map +1 -1
  46. package/lib/commonjs/shared/providers/screen/gestures/pan/use-pan-behavior.js +2 -2
  47. package/lib/commonjs/shared/providers/screen/gestures/pan/use-pan-behavior.js.map +1 -1
  48. package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-activation.js +2 -2
  49. package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-activation.js.map +1 -1
  50. package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-lifecycle.js +1 -0
  51. package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-lifecycle.js.map +1 -1
  52. package/lib/commonjs/shared/providers/screen/gestures/pinch/use-pinch-behavior.js +2 -2
  53. package/lib/commonjs/shared/providers/screen/gestures/pinch/use-pinch-behavior.js.map +1 -1
  54. package/lib/commonjs/shared/providers/screen/gestures/shared/physics.js +18 -2
  55. package/lib/commonjs/shared/providers/screen/gestures/shared/physics.js.map +1 -1
  56. package/lib/commonjs/shared/providers/screen/gestures/shared/policy.js +1 -5
  57. package/lib/commonjs/shared/providers/screen/gestures/shared/policy.js.map +1 -1
  58. package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +1 -4
  59. package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
  60. package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js +125 -0
  61. package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -0
  62. package/lib/commonjs/shared/stores/bounds/index.js +6 -12
  63. package/lib/commonjs/shared/stores/bounds/index.js.map +1 -1
  64. package/lib/commonjs/shared/stores/bounds/internals/clear.js +13 -21
  65. package/lib/commonjs/shared/stores/bounds/internals/clear.js.map +1 -1
  66. package/lib/commonjs/shared/stores/bounds/internals/entries.js +49 -9
  67. package/lib/commonjs/shared/stores/bounds/internals/entries.js.map +1 -1
  68. package/lib/commonjs/shared/stores/bounds/internals/links.js +143 -82
  69. package/lib/commonjs/shared/stores/bounds/internals/links.js.map +1 -1
  70. package/lib/commonjs/shared/stores/bounds/internals/resolver.js +17 -43
  71. package/lib/commonjs/shared/stores/bounds/internals/resolver.js.map +1 -1
  72. package/lib/commonjs/shared/stores/bounds/internals/state.js +26 -3
  73. package/lib/commonjs/shared/stores/bounds/internals/state.js.map +1 -1
  74. package/lib/commonjs/shared/stores/gesture.store.js +2 -0
  75. package/lib/commonjs/shared/stores/gesture.store.js.map +1 -1
  76. package/lib/commonjs/shared/types/gesture.types.js +2 -2
  77. package/lib/commonjs/shared/types/gesture.types.js.map +1 -1
  78. package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js +2 -1
  79. package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
  80. package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js +6 -5
  81. package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
  82. package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js +21 -8
  83. package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
  84. package/lib/commonjs/shared/utils/bounds/helpers/resolve-bounds-pair-key.js +23 -0
  85. package/lib/commonjs/shared/utils/bounds/helpers/resolve-bounds-pair-key.js.map +1 -0
  86. package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js +91 -199
  87. package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
  88. package/lib/commonjs/shared/utils/bounds/navigation/reveal/config.js +15 -2
  89. package/lib/commonjs/shared/utils/bounds/navigation/reveal/config.js.map +1 -1
  90. package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js +155 -14
  91. package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
  92. package/lib/commonjs/shared/utils/navigation/resolve-scene-neighbors.js +20 -19
  93. package/lib/commonjs/shared/utils/navigation/resolve-scene-neighbors.js.map +1 -1
  94. package/lib/module/component-stack/components/component-screen.js +2 -8
  95. package/lib/module/component-stack/components/component-screen.js.map +1 -1
  96. package/lib/module/shared/components/create-boundary-component/create-boundary-component.js +27 -34
  97. package/lib/module/shared/components/create-boundary-component/create-boundary-component.js.map +1 -1
  98. package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js +4 -4
  99. package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +1 -1
  100. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js +18 -20
  101. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js.map +1 -1
  102. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js +28 -8
  103. package/lib/module/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js.map +1 -1
  104. package/lib/module/shared/components/create-boundary-component/hooks/use-measurer.js +22 -50
  105. package/lib/module/shared/components/create-boundary-component/hooks/use-measurer.js.map +1 -1
  106. package/lib/module/shared/components/create-boundary-component/hooks/use-refresh-boundary.js +33 -40
  107. package/lib/module/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map +1 -1
  108. package/lib/module/shared/components/create-boundary-component/index.js +3 -1
  109. package/lib/module/shared/components/create-boundary-component/index.js.map +1 -1
  110. package/lib/module/shared/components/create-boundary-component/utils/destination-signals.js +70 -0
  111. package/lib/module/shared/components/create-boundary-component/utils/destination-signals.js.map +1 -0
  112. package/lib/module/shared/components/create-boundary-component/{hooks/helpers/scroll-measurement.js → utils/measured-bounds.js} +13 -1
  113. package/lib/module/shared/components/create-boundary-component/utils/measured-bounds.js.map +1 -0
  114. package/lib/module/shared/components/create-boundary-component/utils/refresh-signals.js +98 -0
  115. package/lib/module/shared/components/create-boundary-component/utils/refresh-signals.js.map +1 -0
  116. package/lib/module/shared/components/create-boundary-component/utils/source-signals.js +47 -0
  117. package/lib/module/shared/components/create-boundary-component/utils/source-signals.js.map +1 -0
  118. package/lib/module/shared/components/native-screen.js +3 -14
  119. package/lib/module/shared/components/native-screen.js.map +1 -1
  120. package/lib/module/shared/constants.js +1 -6
  121. package/lib/module/shared/constants.js.map +1 -1
  122. package/lib/module/shared/providers/helpers/measured-bounds-writes.js +30 -0
  123. package/lib/module/shared/providers/helpers/measured-bounds-writes.js.map +1 -0
  124. package/lib/module/shared/providers/register-bounds.provider.js +48 -55
  125. package/lib/module/shared/providers/register-bounds.provider.js.map +1 -1
  126. package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js +1 -10
  127. package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js.map +1 -1
  128. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +1 -1
  129. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
  130. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  131. package/lib/module/shared/providers/screen/gestures/pan/pan-activation.js +2 -2
  132. package/lib/module/shared/providers/screen/gestures/pan/pan-activation.js.map +1 -1
  133. package/lib/module/shared/providers/screen/gestures/pan/pan-lifecycle.js +10 -3
  134. package/lib/module/shared/providers/screen/gestures/pan/pan-lifecycle.js.map +1 -1
  135. package/lib/module/shared/providers/screen/gestures/pan/pan-release.js +20 -1
  136. package/lib/module/shared/providers/screen/gestures/pan/pan-release.js.map +1 -1
  137. package/lib/module/shared/providers/screen/gestures/pan/pan-reset.js +2 -0
  138. package/lib/module/shared/providers/screen/gestures/pan/pan-reset.js.map +1 -1
  139. package/lib/module/shared/providers/screen/gestures/pan/use-pan-behavior.js +3 -3
  140. package/lib/module/shared/providers/screen/gestures/pan/use-pan-behavior.js.map +1 -1
  141. package/lib/module/shared/providers/screen/gestures/pinch/pinch-activation.js +3 -3
  142. package/lib/module/shared/providers/screen/gestures/pinch/pinch-activation.js.map +1 -1
  143. package/lib/module/shared/providers/screen/gestures/pinch/pinch-lifecycle.js +1 -0
  144. package/lib/module/shared/providers/screen/gestures/pinch/pinch-lifecycle.js.map +1 -1
  145. package/lib/module/shared/providers/screen/gestures/pinch/use-pinch-behavior.js +3 -3
  146. package/lib/module/shared/providers/screen/gestures/pinch/use-pinch-behavior.js.map +1 -1
  147. package/lib/module/shared/providers/screen/gestures/shared/physics.js +15 -0
  148. package/lib/module/shared/providers/screen/gestures/shared/physics.js.map +1 -1
  149. package/lib/module/shared/providers/screen/gestures/shared/policy.js +3 -3
  150. package/lib/module/shared/providers/screen/gestures/shared/policy.js.map +1 -1
  151. package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +1 -4
  152. package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
  153. package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js +105 -0
  154. package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -0
  155. package/lib/module/shared/stores/bounds/index.js +7 -13
  156. package/lib/module/shared/stores/bounds/index.js.map +1 -1
  157. package/lib/module/shared/stores/bounds/internals/clear.js +14 -22
  158. package/lib/module/shared/stores/bounds/internals/clear.js.map +1 -1
  159. package/lib/module/shared/stores/bounds/internals/entries.js +49 -9
  160. package/lib/module/shared/stores/bounds/internals/entries.js.map +1 -1
  161. package/lib/module/shared/stores/bounds/internals/links.js +139 -80
  162. package/lib/module/shared/stores/bounds/internals/links.js.map +1 -1
  163. package/lib/module/shared/stores/bounds/internals/resolver.js +17 -43
  164. package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -1
  165. package/lib/module/shared/stores/bounds/internals/state.js +25 -2
  166. package/lib/module/shared/stores/bounds/internals/state.js.map +1 -1
  167. package/lib/module/shared/stores/gesture.store.js +2 -0
  168. package/lib/module/shared/stores/gesture.store.js.map +1 -1
  169. package/lib/module/shared/types/animation.types.js +0 -4
  170. package/lib/module/shared/types/animation.types.js.map +1 -1
  171. package/lib/module/shared/types/gesture.types.js +0 -1
  172. package/lib/module/shared/types/gesture.types.js.map +1 -1
  173. package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js +2 -1
  174. package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
  175. package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js +6 -5
  176. package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
  177. package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js +21 -8
  178. package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
  179. package/lib/module/shared/utils/bounds/helpers/resolve-bounds-pair-key.js +18 -0
  180. package/lib/module/shared/utils/bounds/helpers/resolve-bounds-pair-key.js.map +1 -0
  181. package/lib/module/shared/utils/bounds/navigation/reveal/build.js +90 -198
  182. package/lib/module/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
  183. package/lib/module/shared/utils/bounds/navigation/reveal/config.js +14 -1
  184. package/lib/module/shared/utils/bounds/navigation/reveal/config.js.map +1 -1
  185. package/lib/module/shared/utils/bounds/navigation/reveal/math.js +144 -12
  186. package/lib/module/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
  187. package/lib/module/shared/utils/navigation/resolve-scene-neighbors.js +20 -19
  188. package/lib/module/shared/utils/navigation/resolve-scene-neighbors.js.map +1 -1
  189. package/lib/typescript/component-stack/components/component-screen.d.ts.map +1 -1
  190. package/lib/typescript/shared/components/create-boundary-component/create-boundary-component.d.ts +1 -0
  191. package/lib/typescript/shared/components/create-boundary-component/create-boundary-component.d.ts.map +1 -1
  192. package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-presence.d.ts +1 -1
  193. package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-presence.d.ts.map +1 -1
  194. package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.d.ts +5 -4
  195. package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.d.ts.map +1 -1
  196. package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-source-measurement.d.ts +6 -2
  197. package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-source-measurement.d.ts.map +1 -1
  198. package/lib/typescript/shared/components/create-boundary-component/hooks/use-measurer.d.ts +5 -4
  199. package/lib/typescript/shared/components/create-boundary-component/hooks/use-measurer.d.ts.map +1 -1
  200. package/lib/typescript/shared/components/create-boundary-component/hooks/use-refresh-boundary.d.ts +7 -7
  201. package/lib/typescript/shared/components/create-boundary-component/hooks/use-refresh-boundary.d.ts.map +1 -1
  202. package/lib/typescript/shared/components/create-boundary-component/index.d.ts.map +1 -1
  203. package/lib/typescript/shared/components/create-boundary-component/types.d.ts +11 -7
  204. package/lib/typescript/shared/components/create-boundary-component/types.d.ts.map +1 -1
  205. package/lib/typescript/shared/components/create-boundary-component/utils/destination-signals.d.ts +10 -0
  206. package/lib/typescript/shared/components/create-boundary-component/utils/destination-signals.d.ts.map +1 -0
  207. package/lib/typescript/shared/components/create-boundary-component/{hooks/helpers/scroll-measurement.d.ts → utils/measured-bounds.d.ts} +3 -2
  208. package/lib/typescript/shared/components/create-boundary-component/utils/measured-bounds.d.ts.map +1 -0
  209. package/lib/typescript/shared/components/create-boundary-component/utils/refresh-signals.d.ts +22 -0
  210. package/lib/typescript/shared/components/create-boundary-component/utils/refresh-signals.d.ts.map +1 -0
  211. package/lib/typescript/shared/components/create-boundary-component/utils/source-signals.d.ts +16 -0
  212. package/lib/typescript/shared/components/create-boundary-component/utils/source-signals.d.ts.map +1 -0
  213. package/lib/typescript/shared/components/native-screen.d.ts.map +1 -1
  214. package/lib/typescript/shared/constants.d.ts +0 -5
  215. package/lib/typescript/shared/constants.d.ts.map +1 -1
  216. package/lib/typescript/shared/index.d.ts +1 -1
  217. package/lib/typescript/shared/index.d.ts.map +1 -1
  218. package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts +21 -0
  219. package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts.map +1 -0
  220. package/lib/typescript/shared/providers/register-bounds.provider.d.ts.map +1 -1
  221. package/lib/typescript/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.d.ts.map +1 -1
  222. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts +0 -1
  223. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts.map +1 -1
  224. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts +1 -1
  225. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
  226. package/lib/typescript/shared/providers/screen/gestures/pan/pan-activation.d.ts.map +1 -1
  227. package/lib/typescript/shared/providers/screen/gestures/pan/pan-lifecycle.d.ts.map +1 -1
  228. package/lib/typescript/shared/providers/screen/gestures/pan/pan-release.d.ts.map +1 -1
  229. package/lib/typescript/shared/providers/screen/gestures/pan/pan-reset.d.ts +2 -1
  230. package/lib/typescript/shared/providers/screen/gestures/pan/pan-reset.d.ts.map +1 -1
  231. package/lib/typescript/shared/providers/screen/gestures/pan/use-pan-behavior.d.ts.map +1 -1
  232. package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-activation.d.ts.map +1 -1
  233. package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-lifecycle.d.ts.map +1 -1
  234. package/lib/typescript/shared/providers/screen/gestures/pinch/use-pinch-behavior.d.ts.map +1 -1
  235. package/lib/typescript/shared/providers/screen/gestures/shared/physics.d.ts +7 -0
  236. package/lib/typescript/shared/providers/screen/gestures/shared/physics.d.ts.map +1 -1
  237. package/lib/typescript/shared/providers/screen/gestures/shared/policy.d.ts +0 -10
  238. package/lib/typescript/shared/providers/screen/gestures/shared/policy.d.ts.map +1 -1
  239. package/lib/typescript/shared/providers/screen/gestures/types.d.ts +2 -0
  240. package/lib/typescript/shared/providers/screen/gestures/types.d.ts.map +1 -1
  241. package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -1
  242. package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts +18 -0
  243. package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts.map +1 -0
  244. package/lib/typescript/shared/stores/bounds/index.d.ts +6 -12
  245. package/lib/typescript/shared/stores/bounds/index.d.ts.map +1 -1
  246. package/lib/typescript/shared/stores/bounds/internals/clear.d.ts.map +1 -1
  247. package/lib/typescript/shared/stores/bounds/internals/entries.d.ts.map +1 -1
  248. package/lib/typescript/shared/stores/bounds/internals/links.d.ts +13 -10
  249. package/lib/typescript/shared/stores/bounds/internals/links.d.ts.map +1 -1
  250. package/lib/typescript/shared/stores/bounds/internals/resolver.d.ts.map +1 -1
  251. package/lib/typescript/shared/stores/bounds/internals/state.d.ts +26 -5
  252. package/lib/typescript/shared/stores/bounds/internals/state.d.ts.map +1 -1
  253. package/lib/typescript/shared/stores/bounds/types.d.ts +14 -7
  254. package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
  255. package/lib/typescript/shared/stores/gesture.store.d.ts +1 -0
  256. package/lib/typescript/shared/stores/gesture.store.d.ts.map +1 -1
  257. package/lib/typescript/shared/types/animation.types.d.ts +0 -18
  258. package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
  259. package/lib/typescript/shared/types/gesture.types.d.ts +8 -1
  260. package/lib/typescript/shared/types/gesture.types.d.ts.map +1 -1
  261. package/lib/typescript/shared/types/index.d.ts +1 -1
  262. package/lib/typescript/shared/types/index.d.ts.map +1 -1
  263. package/lib/typescript/shared/utils/bounds/helpers/create-bounds-accessor-core.d.ts.map +1 -1
  264. package/lib/typescript/shared/utils/bounds/helpers/create-link-accessor.d.ts.map +1 -1
  265. package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts +1 -1
  266. package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts.map +1 -1
  267. package/lib/typescript/shared/utils/bounds/helpers/resolve-bounds-pair-key.d.ts +4 -0
  268. package/lib/typescript/shared/utils/bounds/helpers/resolve-bounds-pair-key.d.ts.map +1 -0
  269. package/lib/typescript/shared/utils/bounds/navigation/reveal/build.d.ts.map +1 -1
  270. package/lib/typescript/shared/utils/bounds/navigation/reveal/config.d.ts +14 -1
  271. package/lib/typescript/shared/utils/bounds/navigation/reveal/config.d.ts.map +1 -1
  272. package/lib/typescript/shared/utils/bounds/navigation/reveal/math.d.ts +48 -7
  273. package/lib/typescript/shared/utils/bounds/navigation/reveal/math.d.ts.map +1 -1
  274. package/lib/typescript/shared/utils/bounds/types/options.d.ts +2 -3
  275. package/lib/typescript/shared/utils/bounds/types/options.d.ts.map +1 -1
  276. package/lib/typescript/shared/utils/navigation/resolve-scene-neighbors.d.ts +3 -2
  277. package/lib/typescript/shared/utils/navigation/resolve-scene-neighbors.d.ts.map +1 -1
  278. package/package.json +1 -1
  279. package/src/component-stack/components/component-screen.tsx +3 -11
  280. package/src/shared/components/create-boundary-component/create-boundary-component.tsx +30 -27
  281. package/src/shared/components/create-boundary-component/hooks/use-boundary-presence.ts +5 -5
  282. package/src/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.ts +25 -24
  283. package/src/shared/components/create-boundary-component/hooks/use-initial-source-measurement.ts +41 -11
  284. package/src/shared/components/create-boundary-component/hooks/use-measurer.ts +49 -64
  285. package/src/shared/components/create-boundary-component/hooks/use-refresh-boundary.ts +44 -83
  286. package/src/shared/components/create-boundary-component/index.tsx +3 -1
  287. package/src/shared/components/create-boundary-component/types.ts +13 -11
  288. package/src/shared/components/create-boundary-component/utils/destination-signals.ts +129 -0
  289. package/src/shared/components/create-boundary-component/{hooks/helpers/scroll-measurement.ts → utils/measured-bounds.ts} +25 -1
  290. package/src/shared/components/create-boundary-component/utils/refresh-signals.ts +164 -0
  291. package/src/shared/components/create-boundary-component/utils/source-signals.ts +72 -0
  292. package/src/shared/components/native-screen.tsx +3 -12
  293. package/src/shared/constants.ts +1 -6
  294. package/src/shared/index.ts +0 -3
  295. package/src/shared/providers/helpers/measured-bounds-writes.ts +67 -0
  296. package/src/shared/providers/register-bounds.provider.tsx +68 -91
  297. package/src/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.ts +0 -14
  298. package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/index.ts +1 -2
  299. package/src/shared/providers/screen/animation/helpers/pipeline.ts +1 -4
  300. package/src/shared/providers/screen/gestures/pan/pan-activation.ts +4 -1
  301. package/src/shared/providers/screen/gestures/pan/pan-lifecycle.ts +18 -2
  302. package/src/shared/providers/screen/gestures/pan/pan-release.ts +33 -0
  303. package/src/shared/providers/screen/gestures/pan/pan-reset.ts +3 -0
  304. package/src/shared/providers/screen/gestures/pan/use-pan-behavior.ts +9 -6
  305. package/src/shared/providers/screen/gestures/pinch/pinch-activation.ts +5 -2
  306. package/src/shared/providers/screen/gestures/pinch/pinch-lifecycle.ts +1 -0
  307. package/src/shared/providers/screen/gestures/pinch/use-pinch-behavior.ts +9 -6
  308. package/src/shared/providers/screen/gestures/shared/physics.ts +25 -0
  309. package/src/shared/providers/screen/gestures/shared/policy.ts +3 -5
  310. package/src/shared/providers/screen/gestures/types.ts +2 -0
  311. package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +0 -3
  312. package/src/shared/stores/bounds/helpers/link-pairs.helpers.ts +161 -0
  313. package/src/shared/stores/bounds/index.ts +10 -20
  314. package/src/shared/stores/bounds/internals/clear.ts +17 -41
  315. package/src/shared/stores/bounds/internals/entries.ts +56 -13
  316. package/src/shared/stores/bounds/internals/links.ts +222 -113
  317. package/src/shared/stores/bounds/internals/resolver.ts +23 -87
  318. package/src/shared/stores/bounds/internals/state.ts +27 -5
  319. package/src/shared/stores/bounds/types.ts +17 -7
  320. package/src/shared/stores/gesture.store.ts +3 -0
  321. package/src/shared/types/animation.types.ts +0 -23
  322. package/src/shared/types/gesture.types.ts +8 -2
  323. package/src/shared/types/index.ts +0 -4
  324. package/src/shared/utils/bounds/helpers/create-bounds-accessor-core.ts +1 -0
  325. package/src/shared/utils/bounds/helpers/create-link-accessor.ts +6 -6
  326. package/src/shared/utils/bounds/helpers/prepare-bound-styles.ts +20 -11
  327. package/src/shared/utils/bounds/helpers/resolve-bounds-pair-key.ts +22 -0
  328. package/src/shared/utils/bounds/navigation/reveal/build.ts +153 -297
  329. package/src/shared/utils/bounds/navigation/reveal/config.ts +20 -1
  330. package/src/shared/utils/bounds/navigation/reveal/math.ts +234 -18
  331. package/src/shared/utils/bounds/types/options.ts +2 -3
  332. package/src/shared/utils/navigation/resolve-scene-neighbors.ts +36 -23
  333. package/lib/commonjs/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js +0 -43
  334. package/lib/commonjs/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js.map +0 -1
  335. package/lib/commonjs/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js +0 -17
  336. package/lib/commonjs/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js.map +0 -1
  337. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js +0 -28
  338. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js.map +0 -1
  339. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +0 -75
  340. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +0 -1
  341. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement.js +0 -20
  342. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement.js.map +0 -1
  343. package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/scroll-measurement.js.map +0 -1
  344. package/lib/commonjs/shared/components/create-boundary-component/utils/build-boundary-match-key.js +0 -16
  345. package/lib/commonjs/shared/components/create-boundary-component/utils/build-boundary-match-key.js.map +0 -1
  346. package/lib/commonjs/shared/providers/layout-anchor.provider.js +0 -86
  347. package/lib/commonjs/shared/providers/layout-anchor.provider.js.map +0 -1
  348. package/lib/commonjs/shared/stores/bounds/helpers/entries.helpers.js +0 -49
  349. package/lib/commonjs/shared/stores/bounds/helpers/entries.helpers.js.map +0 -1
  350. package/lib/commonjs/shared/stores/bounds/helpers/find-latest.js +0 -25
  351. package/lib/commonjs/shared/stores/bounds/helpers/find-latest.js.map +0 -1
  352. package/lib/commonjs/shared/stores/bounds/helpers/groups.helpers.js +0 -30
  353. package/lib/commonjs/shared/stores/bounds/helpers/groups.helpers.js.map +0 -1
  354. package/lib/commonjs/shared/stores/bounds/helpers/link.helpers.js +0 -79
  355. package/lib/commonjs/shared/stores/bounds/helpers/link.helpers.js.map +0 -1
  356. package/lib/commonjs/shared/stores/bounds/helpers/matching.js +0 -13
  357. package/lib/commonjs/shared/stores/bounds/helpers/matching.js.map +0 -1
  358. package/lib/commonjs/shared/stores/bounds/helpers/tag-state.helpers.js +0 -30
  359. package/lib/commonjs/shared/stores/bounds/helpers/tag-state.helpers.js.map +0 -1
  360. package/lib/commonjs/shared/stores/bounds/internals/groups.js +0 -102
  361. package/lib/commonjs/shared/stores/bounds/internals/groups.js.map +0 -1
  362. package/lib/module/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js +0 -38
  363. package/lib/module/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js.map +0 -1
  364. package/lib/module/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js +0 -12
  365. package/lib/module/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js.map +0 -1
  366. package/lib/module/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js +0 -23
  367. package/lib/module/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js.map +0 -1
  368. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +0 -68
  369. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +0 -1
  370. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement.js +0 -15
  371. package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement.js.map +0 -1
  372. package/lib/module/shared/components/create-boundary-component/hooks/helpers/scroll-measurement.js.map +0 -1
  373. package/lib/module/shared/components/create-boundary-component/utils/build-boundary-match-key.js +0 -12
  374. package/lib/module/shared/components/create-boundary-component/utils/build-boundary-match-key.js.map +0 -1
  375. package/lib/module/shared/providers/layout-anchor.provider.js +0 -80
  376. package/lib/module/shared/providers/layout-anchor.provider.js.map +0 -1
  377. package/lib/module/shared/stores/bounds/helpers/entries.helpers.js +0 -42
  378. package/lib/module/shared/stores/bounds/helpers/entries.helpers.js.map +0 -1
  379. package/lib/module/shared/stores/bounds/helpers/find-latest.js +0 -19
  380. package/lib/module/shared/stores/bounds/helpers/find-latest.js.map +0 -1
  381. package/lib/module/shared/stores/bounds/helpers/groups.helpers.js +0 -23
  382. package/lib/module/shared/stores/bounds/helpers/groups.helpers.js.map +0 -1
  383. package/lib/module/shared/stores/bounds/helpers/link.helpers.js +0 -69
  384. package/lib/module/shared/stores/bounds/helpers/link.helpers.js.map +0 -1
  385. package/lib/module/shared/stores/bounds/helpers/matching.js +0 -9
  386. package/lib/module/shared/stores/bounds/helpers/matching.js.map +0 -1
  387. package/lib/module/shared/stores/bounds/helpers/tag-state.helpers.js +0 -24
  388. package/lib/module/shared/stores/bounds/helpers/tag-state.helpers.js.map +0 -1
  389. package/lib/module/shared/stores/bounds/internals/groups.js +0 -95
  390. package/lib/module/shared/stores/bounds/internals/groups.js.map +0 -1
  391. package/lib/typescript/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.d.ts +0 -15
  392. package/lib/typescript/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.d.ts.map +0 -1
  393. package/lib/typescript/shared/components/create-boundary-component/helpers/resolve-pending-source-key.d.ts +0 -2
  394. package/lib/typescript/shared/components/create-boundary-component/helpers/resolve-pending-source-key.d.ts.map +0 -1
  395. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.d.ts +0 -22
  396. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.d.ts.map +0 -1
  397. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts +0 -29
  398. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts.map +0 -1
  399. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement.d.ts +0 -3
  400. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement.d.ts.map +0 -1
  401. package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/scroll-measurement.d.ts.map +0 -1
  402. package/lib/typescript/shared/components/create-boundary-component/utils/build-boundary-match-key.d.ts +0 -8
  403. package/lib/typescript/shared/components/create-boundary-component/utils/build-boundary-match-key.d.ts.map +0 -1
  404. package/lib/typescript/shared/providers/layout-anchor.provider.d.ts +0 -39
  405. package/lib/typescript/shared/providers/layout-anchor.provider.d.ts.map +0 -1
  406. package/lib/typescript/shared/stores/bounds/helpers/entries.helpers.d.ts +0 -5
  407. package/lib/typescript/shared/stores/bounds/helpers/entries.helpers.d.ts.map +0 -1
  408. package/lib/typescript/shared/stores/bounds/helpers/find-latest.d.ts +0 -3
  409. package/lib/typescript/shared/stores/bounds/helpers/find-latest.d.ts.map +0 -1
  410. package/lib/typescript/shared/stores/bounds/helpers/groups.helpers.d.ts +0 -10
  411. package/lib/typescript/shared/stores/bounds/helpers/groups.helpers.d.ts.map +0 -1
  412. package/lib/typescript/shared/stores/bounds/helpers/link.helpers.d.ts +0 -14
  413. package/lib/typescript/shared/stores/bounds/helpers/link.helpers.d.ts.map +0 -1
  414. package/lib/typescript/shared/stores/bounds/helpers/matching.d.ts +0 -3
  415. package/lib/typescript/shared/stores/bounds/helpers/matching.d.ts.map +0 -1
  416. package/lib/typescript/shared/stores/bounds/helpers/tag-state.helpers.d.ts +0 -5
  417. package/lib/typescript/shared/stores/bounds/helpers/tag-state.helpers.d.ts.map +0 -1
  418. package/lib/typescript/shared/stores/bounds/internals/groups.d.ts +0 -16
  419. package/lib/typescript/shared/stores/bounds/internals/groups.d.ts.map +0 -1
  420. package/src/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.ts +0 -83
  421. package/src/shared/components/create-boundary-component/helpers/resolve-pending-source-key.ts +0 -20
  422. package/src/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.ts +0 -48
  423. package/src/shared/components/create-boundary-component/hooks/helpers/measurement-rules.ts +0 -101
  424. package/src/shared/components/create-boundary-component/hooks/helpers/measurement.ts +0 -25
  425. package/src/shared/components/create-boundary-component/utils/build-boundary-match-key.ts +0 -14
  426. package/src/shared/providers/layout-anchor.provider.tsx +0 -112
  427. package/src/shared/stores/bounds/helpers/entries.helpers.ts +0 -55
  428. package/src/shared/stores/bounds/helpers/find-latest.ts +0 -22
  429. package/src/shared/stores/bounds/helpers/groups.helpers.ts +0 -27
  430. package/src/shared/stores/bounds/helpers/link.helpers.ts +0 -131
  431. package/src/shared/stores/bounds/helpers/matching.ts +0 -11
  432. package/src/shared/stores/bounds/helpers/tag-state.helpers.ts +0 -24
  433. package/src/shared/stores/bounds/internals/groups.ts +0 -116
@@ -5,40 +5,32 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.clear = clear;
7
7
  var _keys = require("../helpers/keys");
8
- var _matching = require("../helpers/matching");
8
+ var _linkPairs = require("../helpers/link-pairs.helpers");
9
9
  var _state = require("./state");
10
- const clearRegistry = (shouldClearScreen, shouldClearLink) => {
10
+ function clear(screenKey) {
11
11
  "worklet";
12
12
 
13
- _state.registry.modify(state => {
13
+ _state.boundaryRegistry.modify(state => {
14
14
  "worklet";
15
15
 
16
16
  for (const tag in state) {
17
17
  const tagState = state[tag];
18
- for (const entryScreenKey in tagState.screens) {
19
- const screenEntry = tagState.screens[entryScreenKey];
20
- if (shouldClearScreen(entryScreenKey, screenEntry)) {
21
- delete tagState.screens[entryScreenKey];
22
- }
23
- }
24
- for (let i = tagState.linkStack.length - 1; i >= 0; i--) {
25
- const link = tagState.linkStack[i];
26
- if (shouldClearLink(link)) {
27
- tagState.linkStack.splice(i, 1);
28
- }
29
- }
30
- if (!(0, _keys.hasAnyKeys)(tagState.screens) && tagState.linkStack.length === 0) {
18
+ delete tagState.screens[screenKey];
19
+ if (!(0, _keys.hasAnyKeys)(tagState.screens)) {
31
20
  delete state[tag];
32
21
  }
33
22
  }
34
23
  return state;
35
24
  });
36
- };
37
- function clear(screenKey) {
38
- "worklet";
25
+ _state.pairs.modify(state => {
26
+ "worklet";
39
27
 
40
- clearRegistry(entryScreenKey => entryScreenKey === screenKey, link => {
41
- return (0, _matching.matchesScreenKey)(link.source, screenKey) || (0, _matching.matchesScreenKey)(link.destination, screenKey);
28
+ for (const pairKey in state) {
29
+ if ((0, _linkPairs.isScreenPairKeyForScreen)(pairKey, screenKey)) {
30
+ delete state[pairKey];
31
+ }
32
+ }
33
+ return state;
42
34
  });
43
35
  }
44
36
  //# sourceMappingURL=clear.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_keys","require","_matching","_state","clearRegistry","shouldClearScreen","shouldClearLink","registry","modify","state","tag","tagState","entryScreenKey","screens","screenEntry","i","linkStack","length","link","splice","hasAnyKeys","clear","screenKey","matchesScreenKey","source","destination"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/clear.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AASA,MAAMG,aAAa,GAAGA,CACrBC,iBAAkC,EAClCC,eAA8B,KAC1B;EACJ,SAAS;;EACTC,eAAQ,CAACC,MAAM,CAA2BC,KAAQ,IAAQ;IACzD,SAAS;;IACT,KAAK,MAAMC,GAAG,IAAID,KAAK,EAAE;MACxB,MAAME,QAAQ,GAAGF,KAAK,CAACC,GAAG,CAAC;MAE3B,KAAK,MAAME,cAAc,IAAID,QAAQ,CAACE,OAAO,EAAE;QAC9C,MAAMC,WAAW,GAAGH,QAAQ,CAACE,OAAO,CAACD,cAAc,CAAC;QACpD,IAAIP,iBAAiB,CAACO,cAAc,EAAEE,WAAW,CAAC,EAAE;UACnD,OAAOH,QAAQ,CAACE,OAAO,CAACD,cAAc,CAAC;QACxC;MACD;MAEA,KAAK,IAAIG,CAAC,GAAGJ,QAAQ,CAACK,SAAS,CAACC,MAAM,GAAG,CAAC,EAAEF,CAAC,IAAI,CAAC,EAAEA,CAAC,EAAE,EAAE;QACxD,MAAMG,IAAI,GAAGP,QAAQ,CAACK,SAAS,CAACD,CAAC,CAAC;QAClC,IAAIT,eAAe,CAACY,IAAI,CAAC,EAAE;UAC1BP,QAAQ,CAACK,SAAS,CAACG,MAAM,CAACJ,CAAC,EAAE,CAAC,CAAC;QAChC;MACD;MAEA,IAAI,CAAC,IAAAK,gBAAU,EAACT,QAAQ,CAACE,OAAO,CAAC,IAAIF,QAAQ,CAACK,SAAS,CAACC,MAAM,KAAK,CAAC,EAAE;QACrE,OAAOR,KAAK,CAACC,GAAG,CAAC;MAClB;IACD;IAEA,OAAOD,KAAK;EACb,CAAC,CAAC;AACH,CAAC;AAED,SAASY,KAAKA,CAACC,SAAoB,EAAE;EACpC,SAAS;;EACTlB,aAAa,CACXQ,cAAc,IAAKA,cAAc,KAAKU,SAAS,EAC/CJ,IAAI,IAAK;IACT,OACC,IAAAK,0BAAgB,EAACL,IAAI,CAACM,MAAM,EAAEF,SAAS,CAAC,IACxC,IAAAC,0BAAgB,EAACL,IAAI,CAACO,WAAW,EAAEH,SAAS,CAAC;EAE/C,CACD,CAAC;AACF","ignoreList":[]}
1
+ {"version":3,"names":["_keys","require","_linkPairs","_state","clear","screenKey","boundaryRegistry","modify","state","tag","tagState","screens","hasAnyKeys","pairs","pairKey","isScreenPairKeyForScreen"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/clear.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAEA,SAASG,KAAKA,CAACC,SAAoB,EAAE;EACpC,SAAS;;EAETC,uBAAgB,CAACC,MAAM,CAAkCC,KAAQ,IAAQ;IACxE,SAAS;;IACT,KAAK,MAAMC,GAAG,IAAID,KAAK,EAAE;MACxB,MAAME,QAAQ,GAAGF,KAAK,CAACC,GAAG,CAAC;MAC3B,OAAOC,QAAQ,CAACC,OAAO,CAACN,SAAS,CAAC;MAElC,IAAI,CAAC,IAAAO,gBAAU,EAACF,QAAQ,CAACC,OAAO,CAAC,EAAE;QAClC,OAAOH,KAAK,CAACC,GAAG,CAAC;MAClB;IACD;IAEA,OAAOD,KAAK;EACb,CAAC,CAAC;EAEFK,YAAK,CAACN,MAAM,CAA4BC,KAAQ,IAAQ;IACvD,SAAS;;IACT,KAAK,MAAMM,OAAO,IAAIN,KAAK,EAAE;MAC5B,IAAI,IAAAO,mCAAwB,EAACD,OAAO,EAAET,SAAS,CAAC,EAAE;QACjD,OAAOG,KAAK,CAACM,OAAO,CAAC;MACtB;IACD;IAEA,OAAON,KAAK;EACb,CAAC,CAAC;AACH","ignoreList":[]}
@@ -6,30 +6,68 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.getEntry = getEntry;
7
7
  exports.removeEntry = removeEntry;
8
8
  exports.setEntry = setEntry;
9
- var _entries = require("../helpers/entries.helpers");
10
- var _tagState = require("../helpers/tag-state.helpers");
9
+ var _keys = require("../helpers/keys");
11
10
  var _state = require("./state");
11
+ const ensureBoundaryState = (state, tag) => {
12
+ "worklet";
13
+
14
+ if (!state[tag]) {
15
+ state[tag] = {
16
+ screens: {}
17
+ };
18
+ }
19
+ return state[tag];
20
+ };
21
+ const ensureScreenEntry = (state, tag, screenKey) => {
22
+ "worklet";
23
+
24
+ const tagState = ensureBoundaryState(state, tag);
25
+ if (!tagState.screens[screenKey]) {
26
+ tagState.screens[screenKey] = {
27
+ bounds: null,
28
+ styles: {}
29
+ };
30
+ }
31
+ return tagState.screens[screenKey];
32
+ };
33
+ const applyEntryPatch = (entry, patch) => {
34
+ "worklet";
35
+
36
+ if (patch.bounds !== undefined) {
37
+ entry.bounds = patch.bounds;
38
+ }
39
+ if (patch.styles !== undefined) {
40
+ entry.styles = patch.styles ?? {};
41
+ }
42
+ if (patch.boundaryConfig === undefined) {
43
+ return;
44
+ }
45
+ if (patch.boundaryConfig === null) {
46
+ delete entry.boundaryConfig;
47
+ } else {
48
+ entry.boundaryConfig = patch.boundaryConfig;
49
+ }
50
+ };
12
51
  function getEntry(tag, key) {
13
52
  "worklet";
14
53
 
15
- return (0, _entries.findMatchingScreenEntry)(_state.registry.get()[tag], key);
54
+ return _state.boundaryRegistry.get()[tag]?.screens[key] ?? null;
16
55
  }
17
56
  function setEntry(tag, screenKey, patch) {
18
57
  "worklet";
19
58
 
20
- _state.registry.modify(state => {
59
+ _state.boundaryRegistry.modify(state => {
21
60
  "worklet";
22
61
 
23
- const tagState = (0, _tagState.ensureTagState)(state, tag);
24
- const entry = (0, _entries.ensureScreenEntry)(tagState, screenKey);
25
- (0, _entries.applyEntryPatch)(entry, patch);
62
+ const entry = ensureScreenEntry(state, tag, screenKey);
63
+ applyEntryPatch(entry, patch);
26
64
  return state;
27
65
  });
28
66
  }
29
67
  function removeEntry(tag, screenKey) {
30
68
  "worklet";
31
69
 
32
- _state.registry.modify(state => {
70
+ _state.boundaryRegistry.modify(state => {
33
71
  "worklet";
34
72
 
35
73
  const tagState = state[tag];
@@ -37,7 +75,9 @@ function removeEntry(tag, screenKey) {
37
75
  return state;
38
76
  }
39
77
  delete tagState.screens[screenKey];
40
- (0, _tagState.pruneTagState)(state, tag);
78
+ if (!(0, _keys.hasAnyKeys)(tagState.screens)) {
79
+ delete state[tag];
80
+ }
41
81
  return state;
42
82
  });
43
83
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_entries","require","_tagState","_state","getEntry","tag","key","findMatchingScreenEntry","registry","get","setEntry","screenKey","patch","modify","state","tagState","ensureTagState","entry","ensureScreenEntry","applyEntryPatch","removeEntry","screens","pruneTagState"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/entries.ts"],"mappings":";;;;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAKA,IAAAC,SAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAEA,SAASG,QAAQA,CAACC,GAAU,EAAEC,GAAc,EAAsB;EACjE,SAAS;;EACT,OAAO,IAAAC,gCAAuB,EAACC,eAAQ,CAACC,GAAG,CAAC,CAAC,CAACJ,GAAG,CAAC,EAAEC,GAAG,CAAC;AACzD;AAEA,SAASI,QAAQA,CAACL,GAAU,EAAEM,SAAoB,EAAEC,KAAiB,EAAE;EACtE,SAAS;;EACTJ,eAAQ,CAACK,MAAM,CAA2BC,KAAQ,IAAQ;IACzD,SAAS;;IACT,MAAMC,QAAQ,GAAG,IAAAC,wBAAc,EAACF,KAAK,EAAET,GAAG,CAAC;IAC3C,MAAMY,KAAK,GAAG,IAAAC,0BAAiB,EAACH,QAAQ,EAAEJ,SAAS,CAAC;IACpD,IAAAQ,wBAAe,EAACF,KAAK,EAAEL,KAAK,CAAC;IAC7B,OAAOE,KAAK;EACb,CAAC,CAAC;AACH;AAEA,SAASM,WAAWA,CAACf,GAAU,EAAEM,SAAoB,EAAE;EACtD,SAAS;;EACTH,eAAQ,CAACK,MAAM,CAA2BC,KAAQ,IAAQ;IACzD,SAAS;;IACT,MAAMC,QAAQ,GAAGD,KAAK,CAACT,GAAG,CAAC;IAC3B,IAAI,CAACU,QAAQ,EAAEM,OAAO,CAACV,SAAS,CAAC,EAAE;MAClC,OAAOG,KAAK;IACb;IAEA,OAAOC,QAAQ,CAACM,OAAO,CAACV,SAAS,CAAC;IAClC,IAAAW,uBAAa,EAACR,KAAK,EAAET,GAAG,CAAC;IAEzB,OAAOS,KAAK;EACb,CAAC,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"names":["_keys","require","_state","ensureBoundaryState","state","tag","screens","ensureScreenEntry","screenKey","tagState","bounds","styles","applyEntryPatch","entry","patch","undefined","boundaryConfig","getEntry","key","boundaryRegistry","get","setEntry","modify","removeEntry","hasAnyKeys"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/entries.ts"],"mappings":";;;;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAEA,MAAME,mBAAmB,GAAGA,CAACC,KAA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,CAAC,CAAC,CAACf,GAAG,CAAC,EAAEC,OAAO,CAACY,GAAG,CAAC,IAAI,IAAI;AACzD;AAEA,SAASG,QAAQA,CAAChB,GAAU,EAAEG,SAAoB,EAAEM,KAAiB,EAAE;EACtE,SAAS;;EACTK,uBAAgB,CAACG,MAAM,CAAkClB,KAAQ,IAAQ;IACxE,SAAS;;IACT,MAAMS,KAAK,GAAGN,iBAAiB,CAACH,KAAK,EAAEC,GAAG,EAAEG,SAAS,CAAC;IACtDI,eAAe,CAACC,KAAK,EAAEC,KAAK,CAAC;IAC7B,OAAOV,KAAK;EACb,CAAC,CAAC;AACH;AAEA,SAASmB,WAAWA,CAAClB,GAAU,EAAEG,SAAoB,EAAE;EACtD,SAAS;;EACTW,uBAAgB,CAACG,MAAM,CAAkClB,KAAQ,IAAQ;IACxE,SAAS;;IACT,MAAMK,QAAQ,GAAGL,KAAK,CAACC,GAAG,CAAC;IAC3B,IAAI,CAACI,QAAQ,EAAEH,OAAO,CAACE,SAAS,CAAC,EAAE;MAClC,OAAOJ,KAAK;IACb;IAEA,OAAOK,QAAQ,CAACH,OAAO,CAACE,SAAS,CAAC;IAClC,IAAI,CAAC,IAAAgB,gBAAU,EAACf,QAAQ,CAACH,OAAO,CAAC,EAAE;MAClC,OAAOF,KAAK,CAACC,GAAG,CAAC;IAClB;IAEA,OAAOD,KAAK;EACb,CAAC,CAAC;AACH","ignoreList":[]}
@@ -3,118 +3,179 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.getMatchedLink = getMatchedLink;
7
- exports.getPendingLink = getPendingLink;
8
- exports.hasDestinationLink = hasDestinationLink;
9
- exports.hasSourceLink = hasSourceLink;
6
+ exports.getActiveGroupId = getActiveGroupId;
7
+ exports.getDestination = getDestination;
8
+ exports.getLink = getLink;
9
+ exports.getResolvedLink = getResolvedLink;
10
+ exports.getSource = getSource;
11
+ exports.setActiveGroupId = setActiveGroupId;
10
12
  exports.setDestination = setDestination;
11
13
  exports.setSource = setSource;
12
- var _link = require("../helpers/link.helpers");
13
- var _tagState = require("../helpers/tag-state.helpers");
14
+ var _linkPairs = require("../helpers/link-pairs.helpers");
14
15
  var _state = require("./state");
15
- function setSource(mode, tag, screenKey, bounds, styles = {}) {
16
+ const toLinkKey = tag => {
16
17
  "worklet";
17
18
 
18
- _state.registry.modify(state => {
19
+ return (0, _linkPairs.getLinkKeyFromTag)(tag);
20
+ };
21
+ const createLinkSide = (screenKey, bounds, styles) => {
22
+ "worklet";
23
+
24
+ return {
25
+ screenKey,
26
+ bounds,
27
+ styles
28
+ };
29
+ };
30
+ const writePairLink = (state, pairKey, linkKey, link) => {
31
+ "worklet";
32
+
33
+ (0, _linkPairs.ensurePairLinks)(state, pairKey)[linkKey] = link;
34
+ };
35
+ const writeGroup = (state, pairKey, group, activeId, initialId) => {
36
+ "worklet";
37
+
38
+ const previousInitialId = state[pairKey]?.groups?.[group]?.initialId;
39
+ (0, _linkPairs.ensurePairGroups)(state, pairKey)[group] = {
40
+ activeId,
41
+ initialId: previousInitialId ?? initialId ?? activeId
42
+ };
43
+ };
44
+ const writeDestination = (state, pairKey, linkKey, screenKey, bounds, styles, group) => {
45
+ "worklet";
46
+
47
+ const link = (0, _linkPairs.getLink)(state, pairKey, linkKey);
48
+ if (!link) return;
49
+ const destination = createLinkSide(screenKey, bounds, styles);
50
+ link.group = group ?? link.group;
51
+ link.destination = destination;
52
+ link.initialDestination ??= destination;
53
+ writePairLink(state, pairKey, linkKey, link);
54
+ if (link.group) {
55
+ writeGroup(state, pairKey, link.group, linkKey);
56
+ }
57
+ };
58
+ const promotePendingSource = (state, pairKey, linkKey) => {
59
+ "worklet";
60
+
61
+ if ((0, _linkPairs.getLink)(state, pairKey, linkKey)) return;
62
+ const sourceScreenKey = (0, _linkPairs.getSourceScreenKeyFromPairKey)(pairKey);
63
+ const pendingPairKey = (0, _linkPairs.createPendingPairKey)(sourceScreenKey);
64
+ if (pendingPairKey === pairKey) return;
65
+ const pendingLink = (0, _linkPairs.getLink)(state, pendingPairKey, linkKey);
66
+ if (!pendingLink) return;
67
+ writePairLink(state, pairKey, linkKey, pendingLink);
68
+ if (pendingLink.group) {
69
+ const pendingGroupState = state[pendingPairKey]?.groups?.[pendingLink.group];
70
+ if (pendingGroupState) {
71
+ writeGroup(state, pairKey, pendingLink.group, pendingGroupState.activeId, pendingGroupState.initialId);
72
+ }
73
+ }
74
+ (0, _linkPairs.removePairLink)(state, pendingPairKey, linkKey);
75
+ };
76
+ function setSource(pairKey, tag, screenKey, bounds, styles = {}, group) {
77
+ "worklet";
78
+
79
+ _state.pairs.modify(state => {
19
80
  "worklet";
20
81
 
21
- const source = {
22
- screenKey,
23
- bounds,
24
- styles
82
+ const linkKey = toLinkKey(tag);
83
+ const source = createLinkSide(screenKey, bounds, styles);
84
+ const pairLinks = (0, _linkPairs.ensurePairLinks)(state, pairKey);
85
+ const existingLink = pairLinks[linkKey];
86
+ const link = existingLink ?? {
87
+ group,
88
+ source,
89
+ destination: null,
90
+ initialSource: source
25
91
  };
26
- if (mode === "capture") {
27
- const tagState = (0, _tagState.ensureTagState)(state, tag);
28
- const stack = tagState.linkStack;
29
- const topIndex = stack.length - 1;
30
- const topLink = topIndex >= 0 ? stack[topIndex] : null;
31
- if (topLink && topLink.destination === null && (0, _link.isSameScreenFamily)(topLink.source, source)) {
32
- topLink.source = source;
33
- if (!topLink.initialSource) {
34
- topLink.initialSource = source;
35
- }
36
- return state;
37
- }
38
- stack.push({
39
- source,
40
- destination: null,
41
- initialSource: source
42
- });
43
- return state;
44
- }
45
- const stack = state[tag]?.linkStack;
46
- if (!stack || stack.length === 0) return state;
47
- const targetIndex = (0, _link.selectSourceUpdateTargetIndex)(stack, screenKey);
48
- if (targetIndex === -1) return state;
49
- const link = stack[targetIndex];
92
+ link.group = group ?? link.group;
50
93
  link.source = source;
51
- if (!link.initialSource) {
52
- link.initialSource = source;
94
+ link.initialSource ??= source;
95
+ pairLinks[linkKey] = link;
96
+ const pendingPairKey = (0, _linkPairs.createPendingPairKey)(screenKey);
97
+ if (pendingPairKey !== pairKey) {
98
+ (0, _linkPairs.removePairLink)(state, pendingPairKey, linkKey);
53
99
  }
54
100
  return state;
55
101
  });
56
102
  }
57
- function setDestination(mode, tag, screenKey, bounds, styles = {}, expectedSourceScreenKey) {
103
+ function setDestination(pairKey, tag, screenKey, bounds, styles = {}, group) {
58
104
  "worklet";
59
105
 
60
- _state.registry.modify(state => {
106
+ _state.pairs.modify(state => {
61
107
  "worklet";
62
108
 
63
- const stack = state[tag]?.linkStack;
64
- if (!stack || stack.length === 0) return state;
65
- const targetIndex = (0, _link.findLinkIndexForDestinationWrite)(stack, mode === "refresh" ? screenKey : undefined, expectedSourceScreenKey);
66
- if (targetIndex === -1) return state;
67
- const link = stack[targetIndex];
68
- const destination = {
69
- screenKey,
70
- bounds,
71
- styles
72
- };
73
- link.destination = destination;
74
- if (!link.initialDestination) {
75
- link.initialDestination = destination;
76
- }
109
+ const linkKey = toLinkKey(tag);
110
+ promotePendingSource(state, pairKey, linkKey);
111
+ writeDestination(state, pairKey, linkKey, screenKey, bounds, styles, group);
77
112
  return state;
78
113
  });
79
114
  }
80
- function getMatchedLink(tag, screenKey) {
115
+ function setActiveGroupId(pairKey, group, tag) {
81
116
  "worklet";
82
117
 
83
- const tagState = _state.registry.get()[tag];
84
- const stack = tagState?.linkStack;
85
- if (!stack || stack.length === 0) {
86
- return null;
87
- }
88
- if (!screenKey) {
89
- const lastLink = stack[stack.length - 1];
90
- return lastLink ?? null;
91
- }
92
- for (let i = stack.length - 1; i >= 0; i--) {
93
- const link = stack[i];
94
- if ((0, _link.isCompletedLinkForScreenKey)(link, screenKey)) {
95
- return link;
96
- }
97
- }
98
- return null;
118
+ _state.pairs.modify(state => {
119
+ "worklet";
120
+
121
+ writeGroup(state, pairKey, group, toLinkKey(tag));
122
+ return state;
123
+ });
99
124
  }
100
- function getPendingLink(tag, sourceScreenKey) {
125
+ function getActiveGroupId(pairKey, group) {
101
126
  "worklet";
102
127
 
103
- const tagState = _state.registry.get()[tag];
104
- const stack = tagState?.linkStack;
105
- if (!stack || stack.length === 0) return null;
106
- const pendingSourceLinkIndex = (0, _link.findLatestPendingSourceLinkIndex)(stack, sourceScreenKey);
107
- if (pendingSourceLinkIndex === -1) return null;
108
- return stack[pendingSourceLinkIndex] ?? null;
128
+ return (0, _linkPairs.getActiveGroupId)(_state.pairs.get(), pairKey, group);
129
+ }
130
+ function getLink(pairKey, tag) {
131
+ "worklet";
132
+
133
+ return (0, _linkPairs.getLink)(_state.pairs.get(), pairKey, toLinkKey(tag));
134
+ }
135
+ const isCompletedLink = link => {
136
+ "worklet";
137
+
138
+ return !!link?.destination;
139
+ };
140
+ function getResolvedLink(pairKey, tag) {
141
+ "worklet";
142
+
143
+ const state = _state.pairs.get();
144
+ const linkKey = toLinkKey(tag);
145
+ const group = (0, _linkPairs.getGroupKeyFromTag)(tag);
146
+ const requestedLink = (0, _linkPairs.getLink)(state, pairKey, linkKey);
147
+
148
+ // Group active ids can update before the new member has a full source/destination
149
+ // link, so unresolved grouped links fall back to the initial id's measurements.
150
+ if (!group || isCompletedLink(requestedLink)) {
151
+ return {
152
+ tag,
153
+ link: requestedLink
154
+ };
155
+ }
156
+ const initialId = state[pairKey]?.groups?.[group]?.initialId;
157
+ if (initialId) {
158
+ const initialLink = (0, _linkPairs.getLink)(state, pairKey, initialId);
159
+ if (isCompletedLink(initialLink)) {
160
+ return {
161
+ tag: (0, _linkPairs.createGroupTag)(group, initialId),
162
+ link: initialLink
163
+ };
164
+ }
165
+ }
166
+ return {
167
+ tag,
168
+ link: requestedLink
169
+ };
109
170
  }
110
- function hasSourceLink(tag, screenKey) {
171
+ function getSource(pairKey, tag) {
111
172
  "worklet";
112
173
 
113
- return (0, _link.hasLinkSide)(_state.registry.get()[tag]?.linkStack, screenKey, "source");
174
+ return (0, _linkPairs.getSource)(_state.pairs.get(), pairKey, toLinkKey(tag));
114
175
  }
115
- function hasDestinationLink(tag, screenKey) {
176
+ function getDestination(pairKey, tag) {
116
177
  "worklet";
117
178
 
118
- return (0, _link.hasLinkSide)(_state.registry.get()[tag]?.linkStack, screenKey, "destination");
179
+ return (0, _linkPairs.getDestination)(_state.pairs.get(), pairKey, toLinkKey(tag));
119
180
  }
120
181
  //# sourceMappingURL=links.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_link","require","_tagState","_state","setSource","mode","tag","screenKey","bounds","styles","registry","modify","state","source","tagState","ensureTagState","stack","linkStack","topIndex","length","topLink","destination","isSameScreenFamily","initialSource","push","targetIndex","selectSourceUpdateTargetIndex","link","setDestination","expectedSourceScreenKey","findLinkIndexForDestinationWrite","undefined","initialDestination","getMatchedLink","get","lastLink","i","isCompletedLinkForScreenKey","getPendingLink","sourceScreenKey","pendingSourceLinkIndex","findLatestPendingSourceLinkIndex","hasSourceLink","hasLinkSide","hasDestinationLink"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/links.ts"],"mappings":";;;;;;;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AAQA,IAAAC,SAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAKA,SAASG,SAASA,CACjBC,IAAyB,EACzBC,GAAU,EACVC,SAAoB,EACpBC,MAA0B,EAC1BC,MAAkB,GAAG,CAAC,CAAC,EACtB;EACD,SAAS;;EACTC,eAAQ,CAACC,MAAM,CAA2BC,KAAQ,IAAQ;IACzD,SAAS;;IACT,MAAMC,MAAM,GAAG;MACdN,SAAS;MACTC,MAAM;MACNC;IACD,CAAC;IAED,IAAIJ,IAAI,KAAK,SAAS,EAAE;MACvB,MAAMS,QAAQ,GAAG,IAAAC,wBAAc,EAACH,KAAK,EAAEN,GAAG,CAAC;MAC3C,MAAMU,KAAK,GAAGF,QAAQ,CAACG,SAAS;MAChC,MAAMC,QAAQ,GAAGF,KAAK,CAACG,MAAM,GAAG,CAAC;MACjC,MAAMC,OAAO,GAAGF,QAAQ,IAAI,CAAC,GAAGF,KA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AAI;IACZ;EACD;EAEA,OAAO,IAAI;AACZ;AAEA,SAASW,cAAcA,CACtBhC,GAAU,EACViC,eAA2B,EACV;EACjB,SAAS;;EACT,MAAMzB,QAAQ,GAAGJ,eAAQ,CAACwB,GAAG,CAAC,CAAC,CAAC5B,GAAG,CAAC;EACpC,MAAMU,KAAK,GAAGF,QAAQ,EAAEG,SAAS;EACjC,IAAI,CAACD,KAAK,IAAIA,KAAK,CAACG,MAAM,KAAK,CAAC,EAAE,OAAO,IAAI;EAE7C,MAAMqB,sBAAsB,GAAG,IAAAC,sCAAgC,EAC9DzB,KAAK,EACLuB,eACD,CAAC;EACD,IAAIC,sBAAsB,KAAK,CAAC,CAAC,EAAE,OAAO,IAAI;EAC9C,OAAOxB,KAAK,CAACwB,sBAAsB,CAAC,IAAI,IAAI;AAC7C;AAEA,SAASE,aAAaA,CAACpC,GAAU,EAAEC,SAAoB,EAAW;EACjE,SAAS;;EACT,OAAO,IAAAoC,iBAAW,EAACjC,eAAQ,CAACwB,GAAG,CAAC,CAAC,CAAC5B,GAAG,CAAC,EAAEW,SAAS,EAAEV,SAAS,EAAE,QAAQ,CAAC;AACxE;AAEA,SAASqC,kBAAkBA,CAACtC,GAAU,EAAEC,SAAoB,EAAW;EACtE,SAAS;;EACT,OAAO,IAAAoC,iBAAW,EAACjC,eAAQ,CAACwB,GAAG,CAAC,CAAC,CAAC5B,GAAG,CAAC,EAAEW,SAAS,EAAEV,SAAS,EAAE,aAAa,CAAC;AAC7E","ignoreList":[]}
1
+ {"version":3,"names":["_linkPairs","require","_state","toLinkKey","tag","getLinkKeyFromTag","createLinkSide","screenKey","bounds","styles","writePairLink","state","pairKey","linkKey","link","ensurePairLinks","writeGroup","group","activeId","initialId","previousInitialId","groups","ensurePairGroups","writeDestination","getPairLink","destination","initialDestination","promotePendingSource","sourceScreenKey","getSourceScreenKeyFromPairKey","pendingPairKey","createPendingPairKey","pendingLink","pendingGroupState","removePairLink","setSource","pairs","modify","source","pairLinks","existingLink","initialSource","setDestination","setActiveGroupId","getActiveGroupId","getPairActiveGroupId","get","getLink","isCompletedLink","getResolvedLink","getGroupKeyFromTag","requestedLink","initialLink","createGroupTag","getSource","getPairSource","getDestination","getPairDestination"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/links.ts"],"mappings":";;;;;;;;;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAuBA,IAAAC,MAAA,GAAAD,OAAA;AAEA,MAAME,SAAS,GAAIC,GAAU,IAAc;EAC1C,SAAS;;EACT,OAAO,IAAAC,4BAAiB,EAACD,GAAG,CAAC;AAC9B,CAAC;AAED,MAAME,cAAc,GAAGA,CACtBC,SAAoB,EACpBC,MAA0B,EAC1BC,MAAkB,KACd;EACJ,SAAS;;EACT,OAAO;IACNF,SAAS;IACTC,MAAM;IACNC;EACD,CAAC;AACF,CAAC;AAED,MAAMC,aAAa,GAAGA,CACrBC,KAAqB,EACrBC,OAAsB,EACtBC,OAAgB,EAChBC,IAAa,KACT;EACJ,SAAS;;EACT,IAAAC,0BAAe,EAACJ,KAAK,EAAEC,OAAO,CAAC,CAACC,OAAO,CAAC,GAAGC,IAAI;AAChD,CAAC;AAED,MAAME,UAAU,GAAGA,CAClBL,KAAqB,EACrBC,OAAsB,EACtBK,KAAe,EACfC,QAAiB,EACjBC,SAAmB,KACf;EACJ,SAAS;;EACT,MAAMC,iBAAiB,GAAGT,KAAK,CAACC,OAAO,CAAC,EAAES,MAAM,GAAGJ,KAAK,CAAC,EAAEE,SAAS;EAEpE,IAAAG,2BAAgB,EAACX,KAAK,EAAEC,OAAO,CAAC,CAACK,KAAK,CAAC,GAAG;IACzCC,QAAQ;IACRC,SAAS,EAAEC,iBAAiB,IAAID,SAAS,IAAID;EAC9C,CAAC;AACF,CAAC;AAED,MAAMK,gBAAgB,GAAGA,CACxBZ,KAAqB,EACrBC,OAAsB,EACtBC,OAAgB,EAChBN,SAAoB,EACpBC,MAA0B,EAC1BC,MAAkB,EAClBQ,KAAgB,K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C,EAAElC,OAAO,EAAET,SAAS,CAACC,GAAG,CAAC,CAAC;AAChE","ignoreList":[]}
@@ -4,56 +4,30 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.resolveTransitionPair = resolveTransitionPair;
7
- var _findLatest = require("../helpers/find-latest");
8
- var _matching = require("../helpers/matching");
9
- var _state = require("./state");
10
- function findCompletedLinkByDestination(stack, screenKey) {
7
+ var _linkPairs = require("../helpers/link-pairs.helpers");
8
+ var _links = require("./links");
9
+ function resolvePairKey(context) {
11
10
  "worklet";
12
11
 
13
- if (!screenKey) return null;
14
- return (0, _findLatest.findLatest)(stack, link => !!link.destination && (0, _matching.matchesScreenKey)(link.destination, screenKey));
15
- }
16
- function findCompletedLinkBySource(stack, screenKey) {
17
- "worklet";
18
-
19
- if (!screenKey) return null;
20
- return (0, _findLatest.findLatest)(stack, link => !!link.destination && (0, _matching.matchesScreenKey)(link.source, screenKey));
21
- }
22
- function findPendingLinkBySource(stack, screenKey) {
23
- "worklet";
24
-
25
- if (!screenKey) return null;
26
- return (0, _findLatest.findLatest)(stack, link => link.destination === null && (0, _matching.matchesScreenKey)(link.source, screenKey));
27
- }
28
- function findEnteringTransitionLink(stack, context) {
29
- "worklet";
30
-
31
- return findCompletedLinkByDestination(stack, context.currentScreenKey) ?? findPendingLinkBySource(stack, context.previousScreenKey) ?? findCompletedLinkBySource(stack, context.previousScreenKey);
32
- }
33
- function findExitingTransitionLink(stack, context) {
34
- "worklet";
35
-
36
- return findCompletedLinkBySource(stack, context.currentScreenKey) ?? findCompletedLinkByDestination(stack, context.nextScreenKey) ?? findPendingLinkBySource(stack, context.currentScreenKey);
12
+ if (context.entering) {
13
+ if (!context.previousScreenKey || !context.currentScreenKey) return null;
14
+ return (0, _linkPairs.createScreenPairKey)(context.previousScreenKey, context.currentScreenKey);
15
+ }
16
+ if (!context.currentScreenKey || !context.nextScreenKey) return null;
17
+ return (0, _linkPairs.createScreenPairKey)(context.currentScreenKey, context.nextScreenKey);
37
18
  }
38
19
  function resolveTransitionPair(tag, context) {
39
20
  "worklet";
40
21
 
41
- const tagState = _state.registry.get()[tag];
42
- const stack = tagState?.linkStack;
43
- const matchedLink = stack && stack.length > 0 ? context.entering ? findEnteringTransitionLink(stack, context) : findExitingTransitionLink(stack, context) : null;
44
- const sourceBounds = matchedLink?.source?.bounds ?? null;
45
- const destinationBounds = matchedLink?.destination?.bounds ?? null;
46
- const sourceStyles = matchedLink?.source?.styles ?? null;
47
- const destinationStyles = matchedLink?.destination?.styles ?? null;
48
- const sourceScreenKey = matchedLink?.source?.screenKey ?? null;
49
- const destinationScreenKey = matchedLink?.destination?.screenKey ?? null;
22
+ const pairKey = resolvePairKey(context);
23
+ const matchedLink = pairKey ? (0, _links.getResolvedLink)(pairKey, tag).link : null;
50
24
  return {
51
- sourceBounds,
52
- destinationBounds,
53
- sourceStyles,
54
- destinationStyles,
55
- sourceScreenKey,
56
- destinationScreenKey
25
+ sourceBounds: matchedLink?.source.bounds ?? null,
26
+ destinationBounds: matchedLink?.destination?.bounds ?? null,
27
+ sourceStyles: matchedLink?.source.styles ?? null,
28
+ destinationStyles: matchedLink?.destination?.styles ?? null,
29
+ sourceScreenKey: matchedLink?.source.screenKey ?? null,
30
+ destinationScreenKey: matchedLink?.destination?.screenKey ?? null
57
31
  };
58
32
  }
59
33
  //# sourceMappingURL=resolver.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_findLatest","require","_matching","_state","findCompletedLinkByDestination","stack","screenKey","findLatest","link","destination","matchesScreenKey","findCompletedLinkBySource","source","findPendingLinkBySource","findEnteringTransitionLink","context","currentScreenKey","previousScreenKey","findExitingTransitionLink","nextScreenKey","resolveTransitionPair","tag","tagState","registry","get","linkStack","matchedLink","length","entering","sourceBounds","bounds","destinationBounds","sourceStyles","styles","destinationStyles","sourceScreenKey","destinationScreenKey"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/resolver.ts"],"mappings":";;;;;;AAAA,IAAAA,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B;EACjB,SAAS;;EACT,OACCJ,yBAAyB,CAACN,KAAK,EAAEU,OAAO,CAACC,gBAAgB,CAAC,IAC1DZ,8BAA8B,CAACC,KAAK,EAAEU,OAAO,CAACI,aAAa,CAAC,IAC5DN,uBAAuB,CAACR,KAAK,EAAEU,OAAO,CAACC,gBAAgB,CAAC;AAE1D;AAEA,SAASI,qBAAqBA,CAC7BC,GAAU,EACVN,OAAiC,EACR;EACzB,SAAS;;EACT,MAAMO,QAAQ,GAAGC,eAAQ,CAACC,GAAG,CAAC,CAAC,CAACH,GAAG,CAAC;EACpC,MAAMhB,KAAK,GAAGiB,QAAQ,EAAEG,SAAS;EAEjC,MAAMC,WAAW,GAChBrB,KAAK,IAAIA,KAAK,CAACsB,MAAM,GAAG,CAAC,GACtBZ,OAAO,CAACa,QAAQ,GACfd,0BAA0B,CAACT,KAAK,EAAEU,OAAO,CAAC,GAC1CG,yBAAyB,CAACb,KAAK,EAAEU,OAAO,CAAC,GAC1C,IAAI;EAER,MAAMc,YAAY,GAAGH,WAAW,EAAEd,MAAM,EAAEkB,MAAM,IAAI,IAAI;EACxD,MAAMC,iBAAiB,GAAGL,WAAW,EAAEjB,WAAW,EAAEqB,MAAM,IAAI,IAAI;EAClE,MAAME,YAAY,GAAGN,WAAW,EAAEd,MAAM,EAAEqB,MAAM,IAAI,IAAI;EACxD,MAAMC,iBAAiB,GAAGR,WAAW,EAAEjB,WAAW,EAAEwB,MAAM,IAAI,IAAI;EAClE,MAAME,eAAe,GAAGT,WAAW,EAAEd,MAAM,EAAEN,SAAS,IAAI,IAAI;EAC9D,MAAM8B,oBAAoB,GAAGV,WAAW,EAAEjB,WAAW,EAAEH,SAAS,IAAI,IAAI;EAExE,OAAO;IACNuB,YAAY;IACZE,iBAAiB;IACjBC,YAAY;IACZE,iBAAiB;IACjBC,eAAe;IACfC;EACD,CAAC;AACF","ignoreList":[]}
1
+ {"version":3,"names":["_linkPairs","require","_links","resolvePairKey","context","entering","previousScreenKey","currentScreenKey","createScreenPairKey","nextScreenKey","resolveTransitionPair","tag","pairKey","matchedLink","getResolvedLink","link","sourceBounds","source","bounds","destinationBounds","destination","sourceStyles","styles","destinationStyles","sourceScreenKey","screenKey","destinationScreenKey"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/resolver.ts"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAOA,IAAAC,MAAA,GAAAD,OAAA;AAEA,SAASE,cAAcA,CACtBC,OAAiC,EACV;EACvB,SAAS;;EAET,IAAIA,OAAO,CAACC,QAAQ,EAAE;IACrB,IAAI,CAACD,OAAO,CAACE,iBAAiB,IAAI,CAACF,OAAO,CAACG,gBAAgB,EAAE,OAAO,IAAI;IACxE,OAAO,IAAAC,8BAAmB,EACzBJ,OAAO,CAACE,iBAAiB,EACzBF,OAAO,CAACG,gBACT,CAAC;EACF;EAEA,IAAI,CAACH,OAAO,CAACG,gBAAgB,IAAI,CAACH,OAAO,CAACK,aAAa,EAAE,OAAO,IAAI;EACpE,OAAO,IAAAD,8BAAmB,EAACJ,OAAO,CAACG,gBAAgB,EAAEH,OAAO,CAACK,aAAa,CAAC;AAC5E;AAEA,SAASC,qBAAqBA,CAC7BC,GAAU,EACVP,OAAiC,EACR;EACzB,SAAS;;EACT,MAAMQ,OAAO,GAAGT,cAAc,CAACC,OAAO,CAAC;EACvC,MAAMS,WAAW,GAAGD,OAAO,GAAG,IAAAE,sBAAe,EAACF,OAAO,EAAED,GAAG,CAAC,CAACI,IAAI,GAAG,IAAI;EAEvE,OAAO;IACNC,YAAY,EAAEH,WAAW,EAAEI,MAAM,CAACC,MAAM,IAAI,IAAI;IAChDC,iBAAiB,EAAEN,WAAW,EAAEO,WAAW,EAAEF,MAAM,IAAI,IAAI;IAC3DG,YAAY,EAAER,WAAW,EAAEI,MAAM,CAACK,MAAM,IAAI,IAAI;IAChDC,iBAAiB,EAAEV,WAAW,EAAEO,WAAW,EAAEE,MAAM,IAAI,IAAI;IAC3DE,eAAe,EAAEX,WAAW,EAAEI,MAAM,CAACQ,SAAS,IAAI,IAAI;IACtDC,oBAAoB,EAAEb,WAAW,EAAEO,WAAW,EAAEK,SAAS,IAAI;EAC9D,CAAC;AACF","ignoreList":[]}
@@ -3,8 +3,31 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.registry = exports.groups = void 0;
6
+ exports.pairs = exports.boundaryRegistry = void 0;
7
7
  var _reactNativeReanimated = require("react-native-reanimated");
8
- const registry = exports.registry = (0, _reactNativeReanimated.makeMutable)({});
9
- const groups = exports.groups = (0, _reactNativeReanimated.makeMutable)({});
8
+ const boundaryRegistry = exports.boundaryRegistry = (0, _reactNativeReanimated.makeMutable)({});
9
+
10
+ /**
11
+ * Transition links scoped per screen pair.
12
+ *
13
+ * Links used to live in a flat array that acted like a global history. To find
14
+ * the right link, we had to scan for the latest pending or completed entry that
15
+ * matched a screen, which made refreshes and rapid triggers tricky to handle.
16
+ *
17
+ * Keying by screen pair fixes that: each transition lives under its pair, and
18
+ * every shared boundary id maps to a single link in that pair. Refreshing the
19
+ * source or destination just overwrites the same slot instead of pushing a new
20
+ * history entry.
21
+ *
22
+ * Example:
23
+ *
24
+ * {
25
+ * "a<>b": {
26
+ * links: {
27
+ * "unique-tag-1": { source: ..., destination: ... },
28
+ * },
29
+ * },
30
+ * }
31
+ */
32
+ const pairs = exports.pairs = (0, _reactNativeReanimated.makeMutable)({});
10
33
  //# sourceMappingURL=state.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNativeReanimated","require","registry","exports","makeMutable","groups"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/state.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AAMO,MAAMC,QAAQ,GAAAC,OAAA,CAAAD,QAAA,GAAG,IAAAE,kCAAW,EAAgB,CAAC,CAAC,CAAC;AAC/C,MAAMC,MAAM,GAAAF,OAAA,CAAAE,MAAA,GAAG,IAAAD,kCAAW,EAAc,CAAC,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_reactNativeReanimated","require","boundaryRegistry","exports","makeMutable","pairs"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/state.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AAKO,MAAMC,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAG,IAAAE,kCAAW,EAAuB,CAAC,CAAC,CAAC;;AAErE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,KAAK,GAAAF,OAAA,CAAAE,KAAA,GAAG,IAAAD,kCAAW,EAAiB,CAAC,CAAC,CAAC","ignoreList":[]}
@@ -20,6 +20,7 @@ function createGestureBag() {
20
20
  y: (0, _reactNativeReanimated.makeMutable)(0),
21
21
  normX,
22
22
  normY,
23
+ velocity: (0, _reactNativeReanimated.makeMutable)(0),
23
24
  scale,
24
25
  normScale,
25
26
  focalX: (0, _reactNativeReanimated.makeMutable)(0),
@@ -59,6 +60,7 @@ const GestureStore = exports.GestureStore = (0, _createStore.createStore)({
59
60
  (0, _reactNativeReanimated.cancelAnimation)(bag.y);
60
61
  (0, _reactNativeReanimated.cancelAnimation)(bag.normX);
61
62
  (0, _reactNativeReanimated.cancelAnimation)(bag.normY);
63
+ (0, _reactNativeReanimated.cancelAnimation)(bag.velocity);
62
64
  (0, _reactNativeReanimated.cancelAnimation)(bag.scale);
63
65
  (0, _reactNativeReanimated.cancelAnimation)(bag.normScale);
64
66
  (0, _reactNativeReanimated.cancelAnimation)(bag.focalX);