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
@@ -1,112 +1,171 @@
1
1
  "use strict";
2
2
 
3
- import { findLatestPendingSourceLinkIndex, findLinkIndexForDestinationWrite, hasLinkSide, isCompletedLinkForScreenKey, isSameScreenFamily, selectSourceUpdateTargetIndex } from "../helpers/link.helpers";
4
- import { ensureTagState } from "../helpers/tag-state.helpers";
5
- import { registry } from "./state";
6
- function setSource(mode, tag, screenKey, bounds, styles = {}) {
3
+ import { createGroupTag, createPendingPairKey, ensurePairGroups, ensurePairLinks, getGroupKeyFromTag, getLinkKeyFromTag, getActiveGroupId as getPairActiveGroupId, getDestination as getPairDestination, getLink as getPairLink, getSource as getPairSource, getSourceScreenKeyFromPairKey, removePairLink } from "../helpers/link-pairs.helpers";
4
+ import { pairs } from "./state";
5
+ const toLinkKey = tag => {
7
6
  "worklet";
8
7
 
9
- registry.modify(state => {
8
+ return getLinkKeyFromTag(tag);
9
+ };
10
+ const createLinkSide = (screenKey, bounds, styles) => {
11
+ "worklet";
12
+
13
+ return {
14
+ screenKey,
15
+ bounds,
16
+ styles
17
+ };
18
+ };
19
+ const writePairLink = (state, pairKey, linkKey, link) => {
20
+ "worklet";
21
+
22
+ ensurePairLinks(state, pairKey)[linkKey] = link;
23
+ };
24
+ const writeGroup = (state, pairKey, group, activeId, initialId) => {
25
+ "worklet";
26
+
27
+ const previousInitialId = state[pairKey]?.groups?.[group]?.initialId;
28
+ ensurePairGroups(state, pairKey)[group] = {
29
+ activeId,
30
+ initialId: previousInitialId ?? initialId ?? activeId
31
+ };
32
+ };
33
+ const writeDestination = (state, pairKey, linkKey, screenKey, bounds, styles, group) => {
34
+ "worklet";
35
+
36
+ const link = getPairLink(state, pairKey, linkKey);
37
+ if (!link) return;
38
+ const destination = createLinkSide(screenKey, bounds, styles);
39
+ link.group = group ?? link.group;
40
+ link.destination = destination;
41
+ link.initialDestination ??= destination;
42
+ writePairLink(state, pairKey, linkKey, link);
43
+ if (link.group) {
44
+ writeGroup(state, pairKey, link.group, linkKey);
45
+ }
46
+ };
47
+ const promotePendingSource = (state, pairKey, linkKey) => {
48
+ "worklet";
49
+
50
+ if (getPairLink(state, pairKey, linkKey)) return;
51
+ const sourceScreenKey = getSourceScreenKeyFromPairKey(pairKey);
52
+ const pendingPairKey = createPendingPairKey(sourceScreenKey);
53
+ if (pendingPairKey === pairKey) return;
54
+ const pendingLink = getPairLink(state, pendingPairKey, linkKey);
55
+ if (!pendingLink) return;
56
+ writePairLink(state, pairKey, linkKey, pendingLink);
57
+ if (pendingLink.group) {
58
+ const pendingGroupState = state[pendingPairKey]?.groups?.[pendingLink.group];
59
+ if (pendingGroupState) {
60
+ writeGroup(state, pairKey, pendingLink.group, pendingGroupState.activeId, pendingGroupState.initialId);
61
+ }
62
+ }
63
+ removePairLink(state, pendingPairKey, linkKey);
64
+ };
65
+ function setSource(pairKey, tag, screenKey, bounds, styles = {}, group) {
66
+ "worklet";
67
+
68
+ pairs.modify(state => {
10
69
  "worklet";
11
70
 
12
- const source = {
13
- screenKey,
14
- bounds,
15
- styles
71
+ const linkKey = toLinkKey(tag);
72
+ const source = createLinkSide(screenKey, bounds, styles);
73
+ const pairLinks = ensurePairLinks(state, pairKey);
74
+ const existingLink = pairLinks[linkKey];
75
+ const link = existingLink ?? {
76
+ group,
77
+ source,
78
+ destination: null,
79
+ initialSource: source
16
80
  };
17
- if (mode === "capture") {
18
- const tagState = ensureTagState(state, tag);
19
- const stack = tagState.linkStack;
20
- const topIndex = stack.length - 1;
21
- const topLink = topIndex >= 0 ? stack[topIndex] : null;
22
- if (topLink && topLink.destination === null && isSameScreenFamily(topLink.source, source)) {
23
- topLink.source = source;
24
- if (!topLink.initialSource) {
25
- topLink.initialSource = source;
26
- }
27
- return state;
28
- }
29
- stack.push({
30
- source,
31
- destination: null,
32
- initialSource: source
33
- });
34
- return state;
35
- }
36
- const stack = state[tag]?.linkStack;
37
- if (!stack || stack.length === 0) return state;
38
- const targetIndex = selectSourceUpdateTargetIndex(stack, screenKey);
39
- if (targetIndex === -1) return state;
40
- const link = stack[targetIndex];
81
+ link.group = group ?? link.group;
41
82
  link.source = source;
42
- if (!link.initialSource) {
43
- link.initialSource = source;
83
+ link.initialSource ??= source;
84
+ pairLinks[linkKey] = link;
85
+ const pendingPairKey = createPendingPairKey(screenKey);
86
+ if (pendingPairKey !== pairKey) {
87
+ removePairLink(state, pendingPairKey, linkKey);
44
88
  }
45
89
  return state;
46
90
  });
47
91
  }
48
- function setDestination(mode, tag, screenKey, bounds, styles = {}, expectedSourceScreenKey) {
92
+ function setDestination(pairKey, tag, screenKey, bounds, styles = {}, group) {
49
93
  "worklet";
50
94
 
51
- registry.modify(state => {
95
+ pairs.modify(state => {
52
96
  "worklet";
53
97
 
54
- const stack = state[tag]?.linkStack;
55
- if (!stack || stack.length === 0) return state;
56
- const targetIndex = findLinkIndexForDestinationWrite(stack, mode === "refresh" ? screenKey : undefined, expectedSourceScreenKey);
57
- if (targetIndex === -1) return state;
58
- const link = stack[targetIndex];
59
- const destination = {
60
- screenKey,
61
- bounds,
62
- styles
63
- };
64
- link.destination = destination;
65
- if (!link.initialDestination) {
66
- link.initialDestination = destination;
67
- }
98
+ const linkKey = toLinkKey(tag);
99
+ promotePendingSource(state, pairKey, linkKey);
100
+ writeDestination(state, pairKey, linkKey, screenKey, bounds, styles, group);
68
101
  return state;
69
102
  });
70
103
  }
71
- function getMatchedLink(tag, screenKey) {
104
+ function setActiveGroupId(pairKey, group, tag) {
72
105
  "worklet";
73
106
 
74
- const tagState = registry.get()[tag];
75
- const stack = tagState?.linkStack;
76
- if (!stack || stack.length === 0) {
77
- return null;
78
- }
79
- if (!screenKey) {
80
- const lastLink = stack[stack.length - 1];
81
- return lastLink ?? null;
82
- }
83
- for (let i = stack.length - 1; i >= 0; i--) {
84
- const link = stack[i];
85
- if (isCompletedLinkForScreenKey(link, screenKey)) {
86
- return link;
87
- }
88
- }
89
- return null;
107
+ pairs.modify(state => {
108
+ "worklet";
109
+
110
+ writeGroup(state, pairKey, group, toLinkKey(tag));
111
+ return state;
112
+ });
90
113
  }
91
- function getPendingLink(tag, sourceScreenKey) {
114
+ function getActiveGroupId(pairKey, group) {
92
115
  "worklet";
93
116
 
94
- const tagState = registry.get()[tag];
95
- const stack = tagState?.linkStack;
96
- if (!stack || stack.length === 0) return null;
97
- const pendingSourceLinkIndex = findLatestPendingSourceLinkIndex(stack, sourceScreenKey);
98
- if (pendingSourceLinkIndex === -1) return null;
99
- return stack[pendingSourceLinkIndex] ?? null;
117
+ return getPairActiveGroupId(pairs.get(), pairKey, group);
118
+ }
119
+ function getLink(pairKey, tag) {
120
+ "worklet";
121
+
122
+ return getPairLink(pairs.get(), pairKey, toLinkKey(tag));
123
+ }
124
+ const isCompletedLink = link => {
125
+ "worklet";
126
+
127
+ return !!link?.destination;
128
+ };
129
+ function getResolvedLink(pairKey, tag) {
130
+ "worklet";
131
+
132
+ const state = pairs.get();
133
+ const linkKey = toLinkKey(tag);
134
+ const group = getGroupKeyFromTag(tag);
135
+ const requestedLink = getPairLink(state, pairKey, linkKey);
136
+
137
+ // Group active ids can update before the new member has a full source/destination
138
+ // link, so unresolved grouped links fall back to the initial id's measurements.
139
+ if (!group || isCompletedLink(requestedLink)) {
140
+ return {
141
+ tag,
142
+ link: requestedLink
143
+ };
144
+ }
145
+ const initialId = state[pairKey]?.groups?.[group]?.initialId;
146
+ if (initialId) {
147
+ const initialLink = getPairLink(state, pairKey, initialId);
148
+ if (isCompletedLink(initialLink)) {
149
+ return {
150
+ tag: createGroupTag(group, initialId),
151
+ link: initialLink
152
+ };
153
+ }
154
+ }
155
+ return {
156
+ tag,
157
+ link: requestedLink
158
+ };
100
159
  }
101
- function hasSourceLink(tag, screenKey) {
160
+ function getSource(pairKey, tag) {
102
161
  "worklet";
103
162
 
104
- return hasLinkSide(registry.get()[tag]?.linkStack, screenKey, "source");
163
+ return getPairSource(pairs.get(), pairKey, toLinkKey(tag));
105
164
  }
106
- function hasDestinationLink(tag, screenKey) {
165
+ function getDestination(pairKey, tag) {
107
166
  "worklet";
108
167
 
109
- return hasLinkSide(registry.get()[tag]?.linkStack, screenKey, "destination");
168
+ return getPairDestination(pairs.get(), pairKey, toLinkKey(tag));
110
169
  }
111
- export { getMatchedLink, getPendingLink, hasDestinationLink, hasSourceLink, setDestination, setSource };
170
+ export { getActiveGroupId, getDestination, getLink, getResolvedLink, getSource, setActiveGroupId, setDestination, setSource };
112
171
  //# sourceMappingURL=links.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["findLatestPendingSourceLinkIndex","findLinkIndexForDestinationWrite","hasLinkSide","isCompletedLinkForScreenKey","isSameScreenFamily","selectSourceUpdateTargetIndex","ensureTagState","registry","setSource","mode","tag","screenKey","bounds","styles","modify","state","source","tagState","stack","linkStack","topIndex","length","topLink","destination","initialSource","push","targetIndex","link","setDestination","expectedSourceScreenKey","undefined","initialDestination","getMatchedLink","get","lastLink","i","getPendingLink","sourceScreenKey","pendingSourceLinkIndex","hasSourceLink","hasDestinationLink"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/links.ts"],"mappings":";;AACA,SACCA,gCAAgC,EAChCC,gCAAgC,EAChCC,WAAW,EACXC,2BAA2B,EAC3BC,kBAAkB,EAClBC,6BAA6B,QACvB,yBAAyB;AAChC,SAASC,cAAc,QAAQ,8BAA8B;AAE7D,SAA6BC,QAAQ,QA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AU,EAAEC,SAAoB,EAAW;EACtE,SAAS;;EACT,OAAOT,WAAW,CAACK,QAAQ,CAAC0B,GAAG,CAAC,CAAC,CAACvB,GAAG,CAAC,EAAES,SAAS,EAAER,SAAS,EAAE,aAAa,CAAC;AAC7E;AAEA,SACCqB,cAAc,EACdI,cAAc,EACdI,kBAAkB,EAClBD,aAAa,EACbX,cAAc,EACdpB,SAAS","ignoreList":[]}
1
+ {"version":3,"names":["createGroupTag","createPendingPairKey","ensurePairGroups","ensurePairLinks","getGroupKeyFromTag","getLinkKeyFromTag","getActiveGroupId","getPairActiveGroupId","getDestination","getPairDestination","getLink","getPairLink","getSource","getPairSource","getSourceScreenKeyFromPairKey","removePairLink","pairs","toLinkKey","tag","createLinkSide","screenKey","bounds","styles","writePairLink","state","pairKey","linkKey","link","writeGroup","group","activeId","initialId","previousInitialId","groups","writeDestination","destination","initialDestination","promotePendingSource","sourceScreenKey","pendingPairKey","pendingLink","pendingGroupState","setSource","modify","source","pairLinks","existingLink","initialSource","setDestination","setActiveGroupId","get","isCompletedLink","getResolvedLink","requestedLink","initialLink"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/links.ts"],"mappings":";;AACA,SACCA,cAAc,EACdC,oBAAoB,EACpBC,gBAAgB,EAChBC,eAAe,EACfC,kBAAkB,EAClBC,iBAAiB,EACjBC,gBAAgB,IAAIC,oBAAoB,EACxCC,cAAc,IAAIC,kBAAkB,EACpCC,OAAO,IAAIC,WAAW,EACtBC,SAAS,IAAIC,aAAa,EAC1BC,6BAA6B,EAC7BC,cAAc,QACR,+BAA+B;AAUtC,SAASC,KAAK,QAAQ,SAAS;AAE/B,MAAMC,SAAS,GAAIC,GAAU,IAAc;EAC1C,SAAS;;EACT,OAAOb,iBAAiB,CAACa,GAAG,CAAC;AAC9B,CAAC;AAED,MAAMC,cAAc,GAAGA,CACtBC,SAAoB,EACpBC,MAA0B,EAC1BC,MAAkB,KACd;EACJ,SAAS;;EACT,OAAO;IACNF,SAAS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,MAAMuB,WAAW,GAAG3C,WAAW,CAACa,KAAK,EAAEC,OAAO,EAAEM,SAAS,CAAC;IAC1D,IAAIoB,eAAe,CAACG,WAAW,CAAC,EAAE;MACjC,OAAO;QACNpC,GAAG,EAAElB,cAAc,CAAC6B,KAAK,EAAEE,SAAS,CAAC;QACrCJ,IAAI,EAAE2B;MACP,CAAC;IACF;EACD;EAEA,OAAO;IACNpC,GAAG;IACHS,IAAI,EAAE0B;EACP,CAAC;AACF;AAEA,SAASzC,SAASA,CACjBa,OAAsB,EACtBP,GAAU,EACiB;EAC3B,SAAS;;EACT,OAAOL,aAAa,CAACG,KAAK,CAACkC,GAAG,CAAC,CAAC,EAAEzB,OAAO,EAAER,SAAS,CAACC,GAAG,CAAC,CAAC;AAC3D;AAEA,SAASV,cAAcA,CACtBiB,OAAsB,EACtBP,GAAU,EACsB;EAChC,SAAS;;EACT,OAAOT,kBAAkB,CAACO,KAAK,CAACkC,GAAG,CAAC,CAAC,EAAEzB,OAAO,EAAER,SAAS,CAACC,GAAG,CAAC,CAAC;AAChE;AAEA,SACCZ,gBAAgB,EAChBE,cAAc,EACdE,OAAO,EACP0C,eAAe,EACfxC,SAAS,EACTqC,gBAAgB,EAChBD,cAAc,EACdN,SAAS","ignoreList":[]}
@@ -1,55 +1,29 @@
1
1
  "use strict";
2
2
 
3
- import { findLatest } from "../helpers/find-latest";
4
- import { matchesScreenKey } from "../helpers/matching";
5
- import { registry } from "./state";
6
- function findCompletedLinkByDestination(stack, screenKey) {
3
+ import { createScreenPairKey } from "../helpers/link-pairs.helpers";
4
+ import { getResolvedLink } from "./links";
5
+ function resolvePairKey(context) {
7
6
  "worklet";
8
7
 
9
- if (!screenKey) return null;
10
- return findLatest(stack, link => !!link.destination && matchesScreenKey(link.destination, screenKey));
11
- }
12
- function findCompletedLinkBySource(stack, screenKey) {
13
- "worklet";
14
-
15
- if (!screenKey) return null;
16
- return findLatest(stack, link => !!link.destination && matchesScreenKey(link.source, screenKey));
17
- }
18
- function findPendingLinkBySource(stack, screenKey) {
19
- "worklet";
20
-
21
- if (!screenKey) return null;
22
- return findLatest(stack, link => link.destination === null && matchesScreenKey(link.source, screenKey));
23
- }
24
- function findEnteringTransitionLink(stack, context) {
25
- "worklet";
26
-
27
- return findCompletedLinkByDestination(stack, context.currentScreenKey) ?? findPendingLinkBySource(stack, context.previousScreenKey) ?? findCompletedLinkBySource(stack, context.previousScreenKey);
28
- }
29
- function findExitingTransitionLink(stack, context) {
30
- "worklet";
31
-
32
- return findCompletedLinkBySource(stack, context.currentScreenKey) ?? findCompletedLinkByDestination(stack, context.nextScreenKey) ?? findPendingLinkBySource(stack, context.currentScreenKey);
8
+ if (context.entering) {
9
+ if (!context.previousScreenKey || !context.currentScreenKey) return null;
10
+ return createScreenPairKey(context.previousScreenKey, context.currentScreenKey);
11
+ }
12
+ if (!context.currentScreenKey || !context.nextScreenKey) return null;
13
+ return createScreenPairKey(context.currentScreenKey, context.nextScreenKey);
33
14
  }
34
15
  function resolveTransitionPair(tag, context) {
35
16
  "worklet";
36
17
 
37
- const tagState = registry.get()[tag];
38
- const stack = tagState?.linkStack;
39
- const matchedLink = stack && stack.length > 0 ? context.entering ? findEnteringTransitionLink(stack, context) : findExitingTransitionLink(stack, context) : null;
40
- const sourceBounds = matchedLink?.source?.bounds ?? null;
41
- const destinationBounds = matchedLink?.destination?.bounds ?? null;
42
- const sourceStyles = matchedLink?.source?.styles ?? null;
43
- const destinationStyles = matchedLink?.destination?.styles ?? null;
44
- const sourceScreenKey = matchedLink?.source?.screenKey ?? null;
45
- const destinationScreenKey = matchedLink?.destination?.screenKey ?? null;
18
+ const pairKey = resolvePairKey(context);
19
+ const matchedLink = pairKey ? getResolvedLink(pairKey, tag).link : null;
46
20
  return {
47
- sourceBounds,
48
- destinationBounds,
49
- sourceStyles,
50
- destinationStyles,
51
- sourceScreenKey,
52
- destinationScreenKey
21
+ sourceBounds: matchedLink?.source.bounds ?? null,
22
+ destinationBounds: matchedLink?.destination?.bounds ?? null,
23
+ sourceStyles: matchedLink?.source.styles ?? null,
24
+ destinationStyles: matchedLink?.destination?.styles ?? null,
25
+ sourceScreenKey: matchedLink?.source.screenKey ?? null,
26
+ destinationScreenKey: matchedLink?.destination?.screenKey ?? null
53
27
  };
54
28
  }
55
29
  export { resolveTransitionPair };
@@ -1 +1 @@
1
- {"version":3,"names":["findLatest","matchesScreenKey","registry","findCompletedLinkByDestination","stack","screenKey","link","destination","findCompletedLinkBySource","source","findPendingLinkBySource","findEnteringTransitionLink","context","currentScreenKey","previousScreenKey","findExitingTransitionLink","nextScreenKey","resolveTransitionPair","tag","tagState","get","linkStack","matchedLink","length","entering","sourceBounds","bounds","destinationBounds","sourceStyles","styles","destinationStyles","sourceScreenKey","destinationScreenKey"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/resolver.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,wBAAwB;AACnD,SAASC,gBAAgB,QAAQ,qBAAqB;AAQtD,SAASC,QAAQ,QAAQ,SAAS;AAElC,SAASC,8BAA8BA,CACtCC,KAAgB,EAChBC,SAAqB,EACJ;EACjB,SAAS;;EACT,IAAI,CAACA,SAAS,EAAE,OAAO,IAAI;EAE3B,OAAOL,UAAU,CAChBI,KAAK,EACJE,IAAI,IACJ,CAAC,CAACA,IAAI,CAACC,WAAW,IAAIN,gBAAgB,CAACK,IAAI,CAACC,WAAW,EAAEF,SAAS,CACpE,CAAC;AACF;AAEA,SAASG,yBAAyBA,CACjCJ,KAAgB,EAChBC,SAAqB,EACJ;EACjB,SAAS;;EACT,IAAI,CAACA,SAAS,EAAE,OAAO,IAAI;EAE3B,OAAOL,UAAU,CAChBI,KAAK,EACJE,IAAI,IAAK,CAAC,CAACA,IAAI,CAACC,WAAW,IAAIN,gBAAgB,CAACK,IAAI,CAACG,MAAM,EAAEJ,SAAS,CACxE,CAAC;AACF;AAEA,SAASK,uBAAuBA,CAC/BN,KAAgB,EAChBC,SAAqB,EACJ;EACjB,SAAS;;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GAAGL,WAAW,EAAEf,WAAW,EAAEmB,MAAM,IAAI,IAAI;EAClE,MAAME,YAAY,GAAGN,WAAW,EAAEb,MAAM,EAAEoB,MAAM,IAAI,IAAI;EACxD,MAAMC,iBAAiB,GAAGR,WAAW,EAAEf,WAAW,EAAEsB,MAAM,IAAI,IAAI;EAClE,MAAME,eAAe,GAAGT,WAAW,EAAEb,MAAM,EAAEJ,SAAS,IAAI,IAAI;EAC9D,MAAM2B,oBAAoB,GAAGV,WAAW,EAAEf,WAAW,EAAEF,SAAS,IAAI,IAAI;EAExE,OAAO;IACNoB,YAAY;IACZE,iBAAiB;IACjBC,YAAY;IACZE,iBAAiB;IACjBC,eAAe;IACfC;EACD,CAAC;AACF;AAEA,SAASf,qBAAqB","ignoreList":[]}
1
+ {"version":3,"names":["createScreenPairKey","getResolvedLink","resolvePairKey","context","entering","previousScreenKey","currentScreenKey","nextScreenKey","resolveTransitionPair","tag","pairKey","matchedLink","link","sourceBounds","source","bounds","destinationBounds","destination","sourceStyles","styles","destinationStyles","sourceScreenKey","screenKey","destinationScreenKey"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/resolver.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAAQ,+BAA+B;AAOnE,SAASC,eAAe,QAAQ,SAAS;AAEzC,SAASC,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,OAAON,mBAAmB,CACzBG,OAAO,CAACE,iBAAiB,EACzBF,OAAO,CAACG,gBACT,CAAC;EACF;EAEA,IAAI,CAACH,OAAO,CAACG,gBAAgB,IAAI,CAACH,OAAO,CAACI,aAAa,EAAE,OAAO,IAAI;EACpE,OAAOP,mBAAmB,CAACG,OAAO,CAACG,gBAAgB,EAAEH,OAAO,CAACI,aAAa,CAAC;AAC5E;AAEA,SAASC,qBAAqBA,CAC7BC,GAAU,EACVN,OAAiC,EACR;EACzB,SAAS;;EACT,MAAMO,OAAO,GAAGR,cAAc,CAACC,OAAO,CAAC;EACvC,MAAMQ,WAAW,GAAGD,OAAO,GAAGT,eAAe,CAACS,OAAO,EAAED,GAAG,CAAC,CAACG,IAAI,GAAG,IAAI;EAEvE,OAAO;IACNC,YAAY,EAAEF,WAAW,EAAEG,MAAM,CAACC,MAAM,IAAI,IAAI;IAChDC,iBAAiB,EAAEL,WAAW,EAAEM,WAAW,EAAEF,MAAM,IAAI,IAAI;IAC3DG,YAAY,EAAEP,WAAW,EAAEG,MAAM,CAACK,MAAM,IAAI,IAAI;IAChDC,iBAAiB,EAAET,WAAW,EAAEM,WAAW,EAAEE,MAAM,IAAI,IAAI;IAC3DE,eAAe,EAAEV,WAAW,EAAEG,MAAM,CAACQ,SAAS,IAAI,IAAI;IACtDC,oBAAoB,EAAEZ,WAAW,EAAEM,WAAW,EAAEK,SAAS,IAAI;EAC9D,CAAC;AACF;AAEA,SAASd,qBAAqB","ignoreList":[]}
@@ -1,6 +1,29 @@
1
1
  "use strict";
2
2
 
3
3
  import { makeMutable } from "react-native-reanimated";
4
- export const registry = makeMutable({});
5
- export const groups = makeMutable({});
4
+ export const boundaryRegistry = makeMutable({});
5
+
6
+ /**
7
+ * Transition links scoped per screen pair.
8
+ *
9
+ * Links used to live in a flat array that acted like a global history. To find
10
+ * the right link, we had to scan for the latest pending or completed entry that
11
+ * matched a screen, which made refreshes and rapid triggers tricky to handle.
12
+ *
13
+ * Keying by screen pair fixes that: each transition lives under its pair, and
14
+ * every shared boundary id maps to a single link in that pair. Refreshing the
15
+ * source or destination just overwrites the same slot instead of pushing a new
16
+ * history entry.
17
+ *
18
+ * Example:
19
+ *
20
+ * {
21
+ * "a<>b": {
22
+ * links: {
23
+ * "unique-tag-1": { source: ..., destination: ... },
24
+ * },
25
+ * },
26
+ * }
27
+ */
28
+ export const pairs = makeMutable({});
6
29
  //# sourceMappingURL=state.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["makeMutable","registry","groups"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/state.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,yBAAyB;AAMrD,OAAO,MAAMC,QAAQ,GAAGD,WAAW,CAAgB,CAAC,CAAC,CAAC;AACtD,OAAO,MAAME,MAAM,GAAGF,WAAW,CAAc,CAAC,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["makeMutable","boundaryRegistry","pairs"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/state.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,yBAAyB;AAKrD,OAAO,MAAMC,gBAAgB,GAAGD,WAAW,CAAuB,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;AACA,OAAO,MAAME,KAAK,GAAGF,WAAW,CAAiB,CAAC,CAAC,CAAC","ignoreList":[]}
@@ -16,6 +16,7 @@ function createGestureBag() {
16
16
  y: makeMutable(0),
17
17
  normX,
18
18
  normY,
19
+ velocity: makeMutable(0),
19
20
  scale,
20
21
  normScale,
21
22
  focalX: makeMutable(0),
@@ -55,6 +56,7 @@ export const GestureStore = createStore({
55
56
  cancelAnimation(bag.y);
56
57
  cancelAnimation(bag.normX);
57
58
  cancelAnimation(bag.normY);
59
+ cancelAnimation(bag.velocity);
58
60
  cancelAnimation(bag.scale);
59
61
  cancelAnimation(bag.normScale);
60
62
  cancelAnimation(bag.focalX);
@@ -1 +1 @@
1
- {"version":3,"names":["cancelAnimation","makeMutable","createStore","createGestureBag","normX","normY","scale","normScale","dismissing","dragging","settling","active","x","y","focalX","focalY","raw","direction","normalizedX","normalizedY","isDismissing","isDragging","GestureStore","createBag","disposeBag","bag"],"sourceRoot":"../../../../src","sources":["shared/stores/gesture.store.ts"],"mappings":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Mutable","createStore","createGestureBag","normX","normY","scale","normScale","dismissing","dragging","settling","active","x","y","velocity","focalX","focalY","raw","direction","normalizedX","normalizedY","isDismissing","isDragging","GestureStore","createBag","disposeBag","bag"],"sourceRoot":"../../../../src","sources":["shared/stores/gesture.store.ts"],"mappings":";;AAAA,SACCA,eAAe,EACfC,WAAW,QAEL,yBAAyB;AAKhC,SAASC,WAAW,QAAQ,uBAAuB;AA+CnD,SAASC,gBAAgBA,CAAA,EAAoB;EAC5C,MAAMC,KAAK,GAAGH,WAAW,CAAC,CAAC,CAAC;EAC5B,MAAMI,KAAK,GAAGJ,WAAW,CAAC,CAAC,CAAC;EAC5B,MAAMK,KAAK,GAAGL,WAAW,CAAC,CAAC,CAAC;EAC5B,MAAMM,SAAS,GAAGN,WAAW,CAAC,CAAC,CAAC;EAChC,MAAMO,UAAU,GAAGP,WAAW,CAAC,CAAC,CAAC;EACjC,MAAMQ,QAAQ,GAAGR,WAAW,CAAC,CAAC,CAAC;EAC/B,MAAMS,QAAQ,GAAGT,WAAW,CAAC,CAAC,CAAC;EAC/B,MAAMU,MAAM,GAAGV,WAAW,CAAuB,IAAI,CAAC;EAEtD,OAAO;IACNW,CAAC,EAAEX,WAAW,CAAC,CAAC,CAAC;IACjBY,CAAC,EAAEZ,WAAW,CAAC,CAAC,CAAC;IACjBG,KAAK;IACLC,KAAK;IACLS,QAAQ,EAAEb,WAAW,CAAC,CAAC,CAAC;IACxBK,KAAK;IACLC,SAAS;IACTQ,MAAM,EAAEd,WAAW,CAAC,CAAC,CAAC;IACtBe,MAAM,EAAEf,WAAW,CAAC,CAAC,CAAC;IACtBgB,GAAG,EAAE;MACJL,CAAC,EAAEX,WAAW,CAAC,CAAC,CAAC;MACjBY,CAAC,EAAEZ,WAAW,CAAC,CAAC,CAAC;MACjBG,KAAK,EAAEH,WAAW,CAAC,CAAC,CAAC;MACrBI,KAAK,EAAEJ,WAAW,CAAC,CAAC,CAAC;MACrBK,KAAK,EAAEL,WAAW,CAAC,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AAe,CAAC0B,GAAG,CAAClB,UAAU,CAAC;IAC/BR,eAAe,CAAC0B,GAAG,CAACjB,QAAQ,CAAC;IAC7BT,eAAe,CAAC0B,GAAG,CAAChB,QAAQ,CAAC;IAC7BV,eAAe,CAAC0B,GAAG,CAACf,MAAM,CAAC;IAC3BX,eAAe,CAAC0B,GAAG,CAACR,SAAS,CAAC;EAC/B;AACD,CAAC,CAAC","ignoreList":[]}
@@ -41,10 +41,6 @@ import { NAVIGATION_MASK_CONTAINER_STYLE_ID, NAVIGATION_MASK_ELEMENT_STYLE_ID }
41
41
  * itself.
42
42
  */
43
43
 
44
- /**
45
- * @deprecated Use `TransitionInterpolatorOptions`.
46
- */
47
-
48
44
  /**
49
45
  * Internal normalized slot format.
50
46
  * Always uses the explicit `{ style, props }` shape (with Reanimated's full StyleProps).
@@ -1 +1 @@
1
- {"version":3,"names":["NAVIGATION_MASK_CONTAINER_STYLE_ID","NAVIGATION_MASK_ELEMENT_STYLE_ID"],"sourceRoot":"../../../../src","sources":["shared/types/animation.types.ts"],"mappings":";;AAOA,SACCA,kCAAkC,EAClCC,gCAAgC,QAC1B,cAAc;;AAMrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAqPA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;;AAgBA;AACA;AACA;;AAsBA;AACA;AACA;;AAGA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"names":["NAVIGATION_MASK_CONTAINER_STYLE_ID","NAVIGATION_MASK_ELEMENT_STYLE_ID"],"sourceRoot":"../../../../src","sources":["shared/types/animation.types.ts"],"mappings":";;AAOA,SACCA,kCAAkC,EAClCC,gCAAgC,QAC1B,cAAc;;AAMrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAmOA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;;AAgBA;AACA;AACA;;AAsBA;AACA;AACA;;AAGA;AACA;AACA","ignoreList":[]}
@@ -6,7 +6,6 @@ export let GestureActivationState = /*#__PURE__*/function (GestureActivationStat
6
6
  GestureActivationState[GestureActivationState["FAILED"] = 2] = "FAILED";
7
7
  return GestureActivationState;
8
8
  }({});
9
- export { GestureActivationState as GestureOffsetState };
10
9
 
11
10
  /**
12
11
  * Resolved boolean flags for which directions a gesture is active in.
@@ -1 +1 @@
1
- {"version":3,"names":["GestureActivationState","GestureOffsetState"],"sourceRoot":"../../../../src","sources":["shared/types/gesture.types.ts"],"mappings":";;AA8DA,WAAYA,sBAAsB,0BAAtBA,sBAAsB;EAAtBA,sBAAsB,CAAtBA,sBAAsB;EAAtBA,sBAAsB,CAAtBA,sBAAsB;EAAtBA,sBAAsB,CAAtBA,sBAAsB;EAAA,OAAtBA,sBAAsB;AAAA;AAMlC,SAASA,sBAAsB,IAAIC,kBAAkB;;AAIrD;AACA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"names":["GestureActivationState"],"sourceRoot":"../../../../src","sources":["shared/types/gesture.types.ts"],"mappings":";;AA8DA,WAAYA,sBAAsB,0BAAtBA,sBAAsB;EAAtBA,sBAAsB,CAAtBA,sBAAsB;EAAtBA,sBAAsB,CAAtBA,sBAAsB;EAAtBA,sBAAsB,CAAtBA,sBAAsB;EAAA,OAAtBA,sBAAsB;AAAA;;AAQlC;AACA;AACA;AACA","ignoreList":[]}
@@ -35,7 +35,8 @@ const createBoundsAccessorParts = ({
35
35
  });
36
36
  const computed = prepareBoundStyles({
37
37
  props,
38
- options
38
+ options,
39
+ syncGroupActiveId: true
39
40
  });
40
41
  const scopedTag = tag ?? "";
41
42
  const target = Object.isExtensible(computed) ? computed : {
@@ -1 +1 @@
1
- {"version":3,"names":["createBoundTag","createInterpolators","createLinkAccessor","prepareBoundStyles","createBoundsAccessorParts","getProps","extendResult","getMeasured","getSnapshot","getLink","interpolateStyle","interpolateBounds","computeBounds","params","props","options","id","tag","group","computed","scopedTag","target","Object","isExtensible","defineProperties","value","key","enumerable","configurable","property","fallback","fallbackOrTargetKey","createBoundsAccessorCore","assign"],"sourceRoot":"../../../../../../src","sources":["shared/utils/bounds/helpers/create-bounds-accessor-core.ts"],"mappings":";;AAKA,SAASA,cAAc,QAAQ,oBAAoB;AACnD,SAASC,mBAAmB,QAAQ,wBAAwB;AAC5D,SAASC,kBAAkB,QAAQ,wBAAwB;AAC3D,SAASC,kBAAkB,QAAQ,wBAAwB;AA0B3D,MAAMC,yBAAyB,GAAGA,CAAC;EAClCC,QAAQ;EACRC;AAC+B,CAAC,KAAK;EACrC,SAAS;;EAET,MAAM;IAAEC,WAAW;IAAEC,WAAW;IAAEC;EAAQ,CAAC,GAAGP,kBAAkB,CAACG,QAAQ,CAAC;EAC1E,MAAM;IAAEK,gBAAgB;IAAEC;EAAkB,CAAC,GAAGV,mBAAmB,CAAC;IACnEI,QAAQ;IACRI;EACD,CAAC,CAAC;EAEF,MAAMG,aAAa,GAClBC,MAAU,IACkB;IAC5B,SAAS;;IACT,MAAMC,KAAK,GAAGT,QAAQ,CAAC,CAAC;IACxB,MAAMU,OAAO,GAAIF,MAAM,IAAI;MAAEG,EAAE,EAAE;IAAG,CAAO;IAC3C,MAAMC,GAAG,GAAGjB,cAAc,CAAC;MAC1BgB,EAAE,EAAED,OAAO,CAACC,EAAE;MACdE,KAAK,EAAEH,OAAO,CAACG;IAChB,CAAC,CAAC;IAEF,MAAMC,QAAQ,GAAGhB,kBAAkB,CAAC;MACnCW,KAAK;MACLC;IACD,CAAC,CAAC;IACF,MAAMK,SAAS,GAAGH,GAAG,IAAI,EAAE;IAC3B,MAAMI,MAAM,GAAGC,MAAM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OAAOI,MAAM;EACd,CAAmB;EAEnB,OAAO;IACNT,aAAa;IACbL,WAAW;IACXC,WAAW;IACXC,OAAO;IACPC,gBAAgB;IAChBC;EACD,CAAC;AACF,CAAC;AAED,OAAO,MAAMqB,wBAAwB,GACpCnB,MAAsC,IACd;EACxB,SAAS;;EAET,MAAM;IACLD,aAAa;IACbL,WAAW;IACXC,WAAW;IACXC,OAAO;IACPC,gBAAgB;IAChBC;EACD,CAAC,GAAGP,yBAAyB,CAACS,MAAM,CAAC;EAErC,OAAOS,MAAM,CAACW,MAAM,CAACrB,aAAa,EAAE;IACnCL,WAAW;IACXC,WAAW;IACXC,OAAO;IACPC,gBAAgB;IAChBC;EACD,CAAC,CAAC;AACH,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["createBoundTag","createInterpolators","createLinkAccessor","prepareBoundStyles","createBoundsAccessorParts","getProps","extendResult","getMeasured","getSnapshot","getLink","interpolateStyle","interpolateBounds","computeBounds","params","props","options","id","tag","group","computed","syncGroupActiveId","scopedTag","target","Object","isExtensible","defineProperties","value","key","enumerable","configurable","property","fallback","fallbackOrTargetKey","createBoundsAccessorCore","assign"],"sourceRoot":"../../../../../../src","sources":["shared/utils/bounds/helpers/create-bounds-accessor-core.ts"],"mappings":";;AAKA,SAASA,cAAc,QAAQ,oBAAoB;AACnD,SAASC,mBAAmB,QAAQ,wBAAwB;AAC5D,SAASC,kBAAkB,QAAQ,wBAAwB;AAC3D,SAASC,kBAAkB,QAAQ,wBAAwB;AA0B3D,MAAMC,yBAAyB,GAAGA,CAAC;EAClCC,QAAQ;EACRC;AAC+B,CAAC,KAAK;EACrC,SAAS;;EAET,MAAM;IAAEC,WAAW;IAAEC,WAAW;IAAEC;EAAQ,CAAC,GAAGP,kBAAkB,CAACG,QAAQ,CAAC;EAC1E,MAAM;IAAEK,gBAAgB;IAAEC;EAAkB,CAAC,GAAGV,mBAAmB,CAAC;IACnEI,QAAQ;IACRI;EACD,CAAC,CAAC;EAEF,MAAMG,aAA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gB,CAACW,SAAS,EAAES,QAAQ,EAAEC,QAAQ,CAAC;QACvD,CAAC;QACDH,UAAU,EAAE,KAAK;QACjBC,YAAY,EAAE;MACf,CAAC;MACDlB,iBAAiB,EAAE;QAClBe,KAAK,EAAEA,CACNI,QAAiD,EACjDE,mBAA6D,EAC7DD,QAAiB,KACb;UACJ,SAAS;;UACT,OAAOpB,iBAAiB,CACvBU,SAAS,EACTS,QAAQ,EACRE,mBAAmB,EACnBD,QACD,CAAC;QACF,CAAC;QACDH,UAAU,EAAE,KAAK;QACjBC,YAAY,EAAE;MACf;IACD,CAAC,CAAC;IAEFvB,YAAY,GAAG;MACdgB,MAAM,EAAEA,MAAgC;MACxCR,KAAK;MACLG;IACD,CAAC,CAAC;IAEF,OAAOK,MAAM;EACd,CAAmB;EAEnB,OAAO;IACNV,aAAa;IACbL,WAAW;IACXC,WAAW;IACXC,OAAO;IACPC,gBAAgB;IAChBC;EACD,CAAC;AACF,CAAC;AAED,OAAO,MAAMsB,wBAAwB,GACpCpB,MAAsC,IACd;EACxB,SAAS;;EAET,MAAM;IACLD,aAAa;IACbL,WAAW;IACXC,WAAW;IACXC,OAAO;IACPC,gBAAgB;IAChBC;EACD,CAAC,GAAGP,yBAAyB,CAACS,MAAM,CAAC;EAErC,OAAOU,MAAM,CAACW,MAAM,CAACtB,aAAa,EAAE;IACnCL,WAAW;IACXC,WAAW;IACXC,OAAO;IACPC,gBAAgB;IAChBC;EACD,CAAC,CAAC;AACH,CAAC","ignoreList":[]}
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
 
3
3
  import { getEntry } from "../../../stores/bounds/internals/entries";
4
- import { resolveGroupLink } from "../../../stores/bounds/internals/groups";
4
+ import { getResolvedLink } from "../../../stores/bounds/internals/links";
5
5
  import { prepareBoundStyles } from "./prepare-bound-styles";
6
+ import { resolveBoundsPairKey } from "./resolve-bounds-pair-key";
6
7
  const toResolvedPair = link => {
7
8
  "worklet";
8
9
 
@@ -35,11 +36,11 @@ export const createLinkAccessor = getProps => {
35
36
 
36
37
  const props = getProps();
37
38
  const stringTag = String(tag);
38
- const screenKey = props.current?.route.key;
39
- const resolved = resolveGroupLink({
39
+ const pairKey = resolveBoundsPairKey(props);
40
+ const resolved = pairKey ? getResolvedLink(pairKey, stringTag) : {
40
41
  tag: stringTag,
41
- screenKey
42
- });
42
+ link: null
43
+ };
43
44
  const selectedTag = resolved.tag;
44
45
  const link = resolved.link;
45
46
  if (!link) return null;
@@ -1 +1 @@
1
- {"version":3,"names":["getEntry","resolveGroupLink","prepareBoundStyles","toResolvedPair","link","sourceBounds","source","bounds","destinationBounds","destination","sourceStyles","styles","destinationStyles","sourceScreenKey","screenKey","destinationScreenKey","createLinkAccessor","getProps","getMeasured","tag","key","entry","String","getSnapshot","getLink","props","stringTag","current","route","resolved","selectedTag","resolvedPair","id","initialSource","initialDestination","compute","computeOptions","options"],"sourceRoot":"../../../../../../src","sources":["shared/utils/bounds/helpers/create-link-accessor.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,0CAA0C;AACnE,SAASC,gBAAgB,QAAQ,yCAAyC;AAY1E,SAASC,kBAAkB,QAAQ,wBAAwB;AAU3D,MAAMC,cAAc,GAAIC,IAAa,IAA6B;EACjE,SAAS;;EACT,OAAO;IACNC,YAAY,EAAED,IAAI,CAACE,MAAM,CAACC,MAAM;IAChCC,iBAAiB,EAAEJ,IAAI,CAACK,WAAW,EAAEF,MAAM,IAAI,IAAI;IACnDG,YAAY,EAAEN,IAAI,CAACE,MAAM,CAACK,MAAM;IAChCC,iBAAiB,EAAER,IAAI,CAACK,WAAW,EAAEE,MAAM,IAAI,IAAI;IACnDE,eAAe,EAAET,IAAI,CAACE,MAAM,CAACQ,SAAS;IACtCC,oBAAoB,EAAEX,IAAI,CAACK,WAAW,EAAEK,SAAS,IAAI;EACtD,CAAC;AACF,CAAC;AAED,OAAO,MAAME,kBAAkB,GAAIC,QAAkB,IAAmB;EACvE,SAAS;;EAET,MAAMC,WAAW,GAAGA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CAAC,GACpE,IAAI;MACPsB,aAAa,EAAE7B,IAAI,CAAC6B,aAAa,GAC9B;QACA1B,MAAM,EAAEH,IAAI,CAAC6B,aAAa,CAAC1B,MAAM;QACjCI,MAAM,EAAEP,IAAI,CAAC6B,aAAa,CAACtB;MAC5B,CAAC,GACA,IAAI;MACPuB,kBAAkB,EAAE9B,IAAI,CAAC8B,kBAAkB,GACxC;QACA3B,MAAM,EAAEH,IAAI,CAAC8B,kBAAkB,CAAC3B,MAAM;QACtCI,MAAM,EAAEP,IAAI,CAAC8B,kBAAkB,CAACvB;MACjC,CAAC,GACA,IAAI;MACPwB,OAAO,EACNC,cAAiB,IAC4B;QAC7C,SAAS;;QACT,OAAOlC,kBAAkB,CAAC;UACzBuB,KAAK;UACLY,OAAO,EAAE;YACR,GAAGD,cAAc;YACjBJ,EAAE,EAAEF;UACL,CAAuB;UACvBC;QACD,CAAC,CAAC;MACH;IACD,CAAC;EACF,CAAC;EAED,OAAO;IACNb,WAAW;IACXK,WAAW;IACXC;EACD,CAAC;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["getEntry","getResolvedLink","prepareBoundStyles","resolveBoundsPairKey","toResolvedPair","link","sourceBounds","source","bounds","destinationBounds","destination","sourceStyles","styles","destinationStyles","sourceScreenKey","screenKey","destinationScreenKey","createLinkAccessor","getProps","getMeasured","tag","key","entry","String","getSnapshot","getLink","props","stringTag","pairKey","resolved","selectedTag","resolvedPair","id","initialSource","initialDestination","compute","computeOptions","options"],"sourceRoot":"../../../../../../src","sources":["shared/utils/bounds/helpers/create-link-accessor.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,0CAA0C;AACnE,SAASC,eAAe,QAAQ,wCAAwC;AAYxE,SAASC,kBAAkB,QAAQ,wBAAwB;AAC3D,SAASC,oBAAoB,QAAQ,2BAA2B;AAUhE,MAAMC,cAAc,GAAIC,IAAa,IAA6B;EACjE,SAAS;;EACT,OAAO;IACNC,YAAY,EAAED,IAAI,CAACE,MAAM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,IAAI;IAE1B,IAAI,CAACA,IAAI,EAAE,OAAO,IAAI;IACtB,MAAM0B,YAAY,GAAG3B,cAAc,CAACC,IAAI,CAAC;IAEzC,OAAO;MACN2B,EAAE,EAAEF,WAAW;MACfvB,MAAM,EAAEF,IAAI,CAACE,MAAM,GAChB;QAAEC,MAAM,EAAEH,IAAI,CAACE,MAAM,CAACC,MAAM;QAAEI,MAAM,EAAEP,IAAI,CAACE,MAAM,CAACK;MAAO,CAAC,GAC1D,IAAI;MACPF,WAAW,EAAEL,IAAI,CAACK,WAAW,GAC1B;QAAEF,MAAM,EAAEH,IAAI,CAACK,WAAW,CAACF,MAAM;QAAEI,MAAM,EAAEP,IAAI,CAACK,WAAW,CAACE;MAAO,CAAC,GACpE,IAAI;MACPqB,aAAa,EAAE5B,IAAI,CAAC4B,aAAa,GAC9B;QACAzB,MAAM,EAAEH,IAAI,CAAC4B,aAAa,CAACzB,MAAM;QACjCI,MAAM,EAAEP,IAAI,CAAC4B,aAAa,CAACrB;MAC5B,CAAC,GACA,IAAI;MACPsB,kBAAkB,EAAE7B,IAAI,CAAC6B,kBAAkB,GACxC;QACA1B,MAAM,EAAEH,IAAI,CAAC6B,kBAAkB,CAAC1B,MAAM;QACtCI,MAAM,EAAEP,IAAI,CAAC6B,kBAAkB,CAACtB;MACjC,CAAC,GACA,IAAI;MACPuB,OAAO,EACNC,cAAiB,IAC4B;QAC7C,SAAS;;QACT,OAAOlC,kBAAkB,CAAC;UACzBwB,KAAK;UACLW,OAAO,EAAE;YACR,GAAGD,cAAc;YACjBJ,EAAE,EAAEF;UACL,CAAuB;UACvBC;QACD,CAAC,CAAC;MACH;IACD,CAAC;EACF,CAAC;EAED,OAAO;IACNZ,WAAW;IACXK,WAAW;IACXC;EACD,CAAC;AACF,CAAC","ignoreList":[]}
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
 
3
3
  import { getEntry } from "../../../stores/bounds/internals/entries";
4
- import { getGroupActiveId, setGroupActiveId } from "../../../stores/bounds/internals/groups";
4
+ import { setActiveGroupId } from "../../../stores/bounds/internals/links";
5
5
  import { DEFAULT_BOUNDS_OPTIONS } from "../constants";
6
6
  import { createBoundTag } from "./create-bound-tag";
7
+ import { resolveBoundsPairKey } from "./resolve-bounds-pair-key";
7
8
  import { computeBoundStyles } from "./styles/compute";
8
9
  const buildBoundsOptions = ({
9
10
  props,
@@ -28,22 +29,34 @@ const buildBoundsOptions = ({
28
29
  };
29
30
  return resolved;
30
31
  };
31
- const syncGroupActiveMember = (group, id) => {
32
+ const syncActiveGroupId = params => {
32
33
  "worklet";
33
34
 
34
- if (!group || id == null || id === "") return;
35
- const normalizedId = String(id);
36
- if (getGroupActiveId(group) === normalizedId) return;
37
- setGroupActiveId(group, normalizedId);
35
+ const {
36
+ props,
37
+ id,
38
+ group
39
+ } = params;
40
+ if (id == null || id === "" || !group) return;
41
+ const pairKey = resolveBoundsPairKey(props);
42
+ if (!pairKey) return;
43
+ setActiveGroupId(pairKey, group, String(id));
38
44
  };
39
45
  export const prepareBoundStyles = ({
40
46
  props,
41
47
  options,
42
- resolvedPair
48
+ resolvedPair,
49
+ syncGroupActiveId = false
43
50
  }) => {
44
51
  "worklet";
45
52
 
46
- syncGroupActiveMember(options.group, options.id);
53
+ if (syncGroupActiveId) {
54
+ syncActiveGroupId({
55
+ props,
56
+ id: options.id,
57
+ group: options.group
58
+ });
59
+ }
47
60
  const resolved = buildBoundsOptions({
48
61
  props,
49
62
  id: options.id,