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,10 +0,0 @@
1
- import type { TagID } from "../types";
2
- type GroupTag = {
3
- group: string;
4
- id: string;
5
- };
6
- export declare const parseGroupTag: (tag: string) => GroupTag | null;
7
- export declare const createGroupTag: (group: string, id: string) => TagID;
8
- export declare const getGroupName: (tagOrGroup: string) => string;
9
- export {};
10
- //# sourceMappingURL=groups.helpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"groups.helpers.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/stores/bounds/helpers/groups.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC,KAAK,QAAQ,GAAG;IACf,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,KAAG,QAAQ,GAAG,IAStD,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,EAAE,IAAI,MAAM,KAAG,KAG1D,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,YAAY,MAAM,KAAG,MAGjD,CAAC"}
@@ -1,14 +0,0 @@
1
- import type { ScreenKey, TagLink } from "../types";
2
- type LinkSide = "source" | "destination";
3
- export declare const isSameScreenFamily: (a: {
4
- screenKey: ScreenKey;
5
- }, b: {
6
- screenKey: ScreenKey;
7
- }) => boolean;
8
- export declare function findLatestPendingSourceLinkIndex(stack: TagLink[], expectedSourceScreenKey?: ScreenKey): number;
9
- export declare function selectSourceUpdateTargetIndex(stack: TagLink[], screenKey: ScreenKey): number;
10
- export declare function findLinkIndexForDestinationWrite(stack: TagLink[], destinationScreenKey?: ScreenKey, expectedSourceScreenKey?: ScreenKey): number;
11
- export declare function hasLinkSide(stack: TagLink[] | undefined, screenKey: ScreenKey, side: LinkSide): boolean;
12
- export declare function isCompletedLinkForScreenKey(link: TagLink, screenKey: ScreenKey): boolean;
13
- export {};
14
- //# sourceMappingURL=link.helpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"link.helpers.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/stores/bounds/helpers/link.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAInD,KAAK,QAAQ,GAAG,QAAQ,GAAG,aAAa,CAAC;AAEzC,eAAO,MAAM,kBAAkB,GAC9B,GAAG;IAAE,SAAS,EAAE,SAAS,CAAA;CAAE,EAC3B,GAAG;IAAE,SAAS,EAAE,SAAS,CAAA;CAAE,KACzB,OAGF,CAAC;AAEF,wBAAgB,gCAAgC,CAC/C,KAAK,EAAE,OAAO,EAAE,EAChB,uBAAuB,CAAC,EAAE,SAAS,GACjC,MAAM,CASR;AAyCD,wBAAgB,6BAA6B,CAC5C,KAAK,EAAE,OAAO,EAAE,EAChB,SAAS,EAAE,SAAS,GAClB,MAAM,CAQR;AAED,wBAAgB,gCAAgC,CAC/C,KAAK,EAAE,OAAO,EAAE,EAChB,oBAAoB,CAAC,EAAE,SAAS,EAChC,uBAAuB,CAAC,EAAE,SAAS,GACjC,MAAM,CAmBR;AAED,wBAAgB,WAAW,CAC1B,KAAK,EAAE,OAAO,EAAE,GAAG,SAAS,EAC5B,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,QAAQ,GACZ,OAAO,CAST;AAED,wBAAgB,2BAA2B,CAC1C,IAAI,EAAE,OAAO,EACb,SAAS,EAAE,SAAS,GAClB,OAAO,CAOT"}
@@ -1,3 +0,0 @@
1
- import type { ScreenIdentifier, ScreenKey } from "../types";
2
- export declare function matchesScreenKey(identifier: ScreenIdentifier | null | undefined, key: ScreenKey): boolean;
3
- //# sourceMappingURL=matching.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"matching.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/stores/bounds/helpers/matching.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE5D,wBAAgB,gBAAgB,CAC/B,UAAU,EAAE,gBAAgB,GAAG,IAAI,GAAG,SAAS,EAC/C,GAAG,EAAE,SAAS,GACZ,OAAO,CAKT"}
@@ -1,5 +0,0 @@
1
- import type { RegistryState } from "../internals/state";
2
- import type { TagID, TagState } from "../types";
3
- export declare const ensureTagState: (state: RegistryState, tag: TagID) => TagState;
4
- export declare const pruneTagState: (state: RegistryState, tag: TagID) => void;
5
- //# sourceMappingURL=tag-state.helpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tag-state.helpers.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/stores/bounds/helpers/tag-state.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGhD,eAAO,MAAM,cAAc,GAAI,OAAO,aAAa,EAAE,KAAK,KAAK,KAAG,QASjE,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,OAAO,aAAa,EAAE,KAAK,KAAK,SAQ7D,CAAC"}
@@ -1,16 +0,0 @@
1
- import type { ScreenKey, TagID, TagLink } from "../types";
2
- type ResolveGroupLinkParams = {
3
- tag: TagID;
4
- screenKey?: ScreenKey;
5
- };
6
- type ResolvedGroupLink = {
7
- tag: TagID;
8
- link: TagLink | null;
9
- };
10
- declare function setGroupActiveId(group: string, id: string): void;
11
- declare function setGroupInitialId(group: string, id: string): void;
12
- declare function getGroupActiveId(tagOrGroup: string): string | null;
13
- declare function getGroupInitialId(tagOrGroup: string): string | null;
14
- declare function resolveGroupLink({ tag, screenKey, }: ResolveGroupLinkParams): ResolvedGroupLink;
15
- export { getGroupActiveId, getGroupInitialId, resolveGroupLink, setGroupActiveId, setGroupInitialId, };
16
- //# sourceMappingURL=groups.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"groups.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/stores/bounds/internals/groups.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAI1D,KAAK,sBAAsB,GAAG;IAC7B,GAAG,EAAE,KAAK,CAAC;IACX,SAAS,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACxB,GAAG,EAAE,KAAK,CAAC;IACX,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;CACrB,CAAC;AAEF,iBAAS,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAYlD;AAED,iBAAS,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAWnD;AAED,iBAAS,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAG3D;AAED,iBAAS,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAG5D;AAGD,iBAAS,gBAAgB,CAAC,EACzB,GAAG,EACH,SAAS,GACT,EAAE,sBAAsB,GAAG,iBAAiB,CA+C5C;AAED,OAAO,EACN,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,GACjB,CAAC"}
@@ -1,83 +0,0 @@
1
- import type { MeasuredDimensions, StyleProps } from "react-native-reanimated";
2
- import { setEntry } from "../../../stores/bounds/internals/entries";
3
- import {
4
- setDestination,
5
- setSource,
6
- } from "../../../stores/bounds/internals/links";
7
-
8
- type ApplyMeasuredBoundsWritesParams = {
9
- sharedBoundTag: string;
10
- currentScreenKey: string;
11
- measured: MeasuredDimensions;
12
- preparedStyles: StyleProps;
13
- shouldSetSource?: boolean;
14
- shouldUpdateSource?: boolean;
15
- shouldSetDestination?: boolean;
16
- shouldUpdateDestination?: boolean;
17
- expectedSourceScreenKey?: string;
18
- };
19
-
20
- export const applyMeasuredBoundsWrites = (
21
- params: ApplyMeasuredBoundsWritesParams,
22
- ) => {
23
- "worklet";
24
- const {
25
- sharedBoundTag,
26
- currentScreenKey,
27
- measured,
28
- preparedStyles,
29
- shouldSetSource,
30
- shouldUpdateSource,
31
- shouldSetDestination,
32
- shouldUpdateDestination,
33
- expectedSourceScreenKey,
34
- } = params;
35
-
36
- // Set the bounds entry on every measure to avoid any stale measurements
37
- // for the public read API.
38
- setEntry(sharedBoundTag, currentScreenKey, {
39
- bounds: measured,
40
- });
41
-
42
- if (shouldSetSource) {
43
- setSource(
44
- "capture",
45
- sharedBoundTag,
46
- currentScreenKey,
47
- measured,
48
- preparedStyles,
49
- );
50
- }
51
-
52
- if (shouldUpdateSource) {
53
- setSource(
54
- "refresh",
55
- sharedBoundTag,
56
- currentScreenKey,
57
- measured,
58
- preparedStyles,
59
- );
60
- }
61
-
62
- if (shouldUpdateDestination) {
63
- setDestination(
64
- "refresh",
65
- sharedBoundTag,
66
- currentScreenKey,
67
- measured,
68
- preparedStyles,
69
- expectedSourceScreenKey,
70
- );
71
- }
72
-
73
- if (shouldSetDestination) {
74
- setDestination(
75
- "attach",
76
- sharedBoundTag,
77
- currentScreenKey,
78
- measured,
79
- preparedStyles,
80
- expectedSourceScreenKey,
81
- );
82
- }
83
- };
@@ -1,20 +0,0 @@
1
- import {
2
- getPendingLink,
3
- hasSourceLink,
4
- } from "../../../stores/bounds/internals/links";
5
-
6
- export const resolvePendingSourceKey = (
7
- sharedBoundTag: string,
8
- expectedSourceScreenKey?: string,
9
- ): string | null => {
10
- "worklet";
11
- if (
12
- expectedSourceScreenKey &&
13
- (getPendingLink(sharedBoundTag, expectedSourceScreenKey) ||
14
- hasSourceLink(sharedBoundTag, expectedSourceScreenKey))
15
- ) {
16
- return expectedSourceScreenKey;
17
- }
18
-
19
- return getPendingLink(sharedBoundTag)?.source.screenKey ?? null;
20
- };
@@ -1,48 +0,0 @@
1
- import {
2
- getPendingLink,
3
- hasDestinationLink,
4
- hasSourceLink,
5
- } from "../../../../stores/bounds/internals/links";
6
- import { resolvePendingSourceKey } from "../../helpers/resolve-pending-source-key";
7
-
8
- export type LinkContext = {
9
- /**
10
- * The source screen this measurement should pair with, if one can be
11
- * resolved. Disambiguates between multiple candidate sources in the
12
- * registry (e.g. nested or repeat presentations of the same tag).
13
- */
14
- expectedSourceScreenKey: string | undefined;
15
- /** A pending link exists waiting for a destination to attach. */
16
- hasPendingLink: boolean;
17
- /** The expected source screen has a captured source ready to attach to. */
18
- hasAttachableSourceLink: boolean;
19
- /** The current screen is already registered as the source for this tag. */
20
- hasSourceLink: boolean;
21
- /** The current screen is already registered as the destination for this tag. */
22
- hasDestinationLink: boolean;
23
- };
24
-
25
- export const createLinkContext = (params: {
26
- sharedBoundTag: string;
27
- currentScreenKey: string;
28
- preferredSourceScreenKey?: string;
29
- }): LinkContext => {
30
- "worklet";
31
- const { sharedBoundTag, currentScreenKey, preferredSourceScreenKey } = params;
32
-
33
- const expectedSourceScreenKey =
34
- resolvePendingSourceKey(sharedBoundTag, preferredSourceScreenKey) ??
35
- undefined;
36
- const hasPendingLink =
37
- getPendingLink(sharedBoundTag, expectedSourceScreenKey) !== null;
38
-
39
- return {
40
- expectedSourceScreenKey,
41
- hasPendingLink,
42
- hasAttachableSourceLink: expectedSourceScreenKey
43
- ? hasSourceLink(sharedBoundTag, expectedSourceScreenKey)
44
- : false,
45
- hasSourceLink: hasSourceLink(sharedBoundTag, currentScreenKey),
46
- hasDestinationLink: hasDestinationLink(sharedBoundTag, currentScreenKey),
47
- };
48
- };
@@ -1,101 +0,0 @@
1
- import type { MeasureIntent } from "../../types";
2
-
3
- export type MeasureIntentFlags = {
4
- captureSource: boolean;
5
- completeDestination: boolean;
6
- refreshSource: boolean;
7
- refreshDestination: boolean;
8
- };
9
-
10
- export type MeasureWritePlan = {
11
- captureSource: boolean;
12
- completeDestination: boolean;
13
- refreshSource: boolean;
14
- refreshDestination: boolean;
15
- writesAny: boolean;
16
- wantsDestinationWrite: boolean;
17
- };
18
-
19
- export const shouldBlockInitialDestinationMeasurement = (params: {
20
- enabled: boolean;
21
- hasDestinationLink: boolean;
22
- hasAttachableSourceLink: boolean;
23
- }): boolean => {
24
- "worklet";
25
- const { enabled, hasDestinationLink, hasAttachableSourceLink } = params;
26
-
27
- return enabled && hasAttachableSourceLink && !hasDestinationLink;
28
- };
29
-
30
- export const getMeasureIntentFlags = (
31
- intent?: MeasureIntent | readonly MeasureIntent[],
32
- ): MeasureIntentFlags => {
33
- "worklet";
34
- const flags: MeasureIntentFlags = {
35
- captureSource: false,
36
- completeDestination: false,
37
- refreshSource: false,
38
- refreshDestination: false,
39
- };
40
-
41
- if (!intent) {
42
- return flags;
43
- }
44
-
45
- const intents = Array.isArray(intent) ? intent : [intent];
46
-
47
- for (let i = 0; i < intents.length; i++) {
48
- switch (intents[i]) {
49
- case "capture-source":
50
- flags.captureSource = true;
51
- break;
52
- case "complete-destination":
53
- flags.completeDestination = true;
54
- break;
55
- case "refresh-source":
56
- flags.refreshSource = true;
57
- break;
58
- case "refresh-destination":
59
- flags.refreshDestination = true;
60
- break;
61
- }
62
- }
63
-
64
- return flags;
65
- };
66
-
67
- export const buildMeasurementWritePlan = (params: {
68
- intents: MeasureIntentFlags;
69
- hasPendingLink: boolean;
70
- hasSourceLink: boolean;
71
- hasDestinationLink: boolean;
72
- hasAttachableSourceLink: boolean;
73
- }): MeasureWritePlan => {
74
- "worklet";
75
- const {
76
- intents,
77
- hasPendingLink,
78
- hasSourceLink,
79
- hasDestinationLink,
80
- hasAttachableSourceLink,
81
- } = params;
82
-
83
- const captureSource = intents.captureSource;
84
- const completeDestination =
85
- intents.completeDestination && (hasPendingLink || hasAttachableSourceLink);
86
- const refreshSource = intents.refreshSource && hasSourceLink;
87
- const refreshDestination =
88
- intents.refreshDestination &&
89
- (hasDestinationLink || hasPendingLink || hasAttachableSourceLink);
90
- const writesAny =
91
- captureSource || completeDestination || refreshSource || refreshDestination;
92
-
93
- return {
94
- captureSource,
95
- completeDestination,
96
- refreshSource,
97
- refreshDestination,
98
- writesAny,
99
- wantsDestinationWrite: completeDestination || refreshDestination,
100
- };
101
- };
@@ -1,25 +0,0 @@
1
- import type { MeasuredDimensions } from "react-native-reanimated";
2
-
3
- export const isMeasurementInViewport = (
4
- measured: MeasuredDimensions,
5
- viewportWidth: number,
6
- viewportHeight: number,
7
- ): boolean => {
8
- "worklet";
9
-
10
- if (measured.width <= 0 || measured.height <= 0) {
11
- return false;
12
- }
13
-
14
- const toleranceX = viewportWidth * 0.15;
15
- const toleranceY = viewportHeight * 0.15;
16
- const centerX = measured.pageX + measured.width / 2;
17
- const centerY = measured.pageY + measured.height / 2;
18
-
19
- return (
20
- centerX >= -toleranceX &&
21
- centerX <= viewportWidth + toleranceX &&
22
- centerY >= -toleranceY &&
23
- centerY <= viewportHeight + toleranceY
24
- );
25
- };
@@ -1,14 +0,0 @@
1
- import type { BoundaryId } from "../types";
2
-
3
- type BuildBoundaryMatchKeyParams = {
4
- group?: string;
5
- id: BoundaryId;
6
- };
7
-
8
- export function buildBoundaryMatchKey(
9
- params: BuildBoundaryMatchKeyParams,
10
- ): string {
11
- "worklet";
12
- const { group, id } = params;
13
- return group ? `${group}:${id}` : String(id);
14
- }
@@ -1,112 +0,0 @@
1
- import { type ReactNode, useCallback, useMemo } from "react";
2
- import { useWindowDimensions, type View } from "react-native";
3
- import {
4
- type AnimatedRef,
5
- type MeasuredDimensions,
6
- measure,
7
- } from "react-native-reanimated";
8
- import createProvider from "../utils/create-provider";
9
-
10
- interface LayoutAnchorProviderProps {
11
- anchorRef: AnimatedRef<View>;
12
- children: ReactNode;
13
- }
14
-
15
- interface LayoutAnchorContextValue {
16
- /**
17
- * Corrects measured dimensions for parent transforms (translation and scale).
18
- * The anchor should be at (0, 0) with full screen dimensions - any difference
19
- * is from parent transforms. This function reverses those transforms to yield
20
- * the true layout position and dimensions.
21
- */
22
- correctMeasurement: (measured: MeasuredDimensions) => MeasuredDimensions;
23
- /**
24
- * Returns true when the corrected measurement is plausibly inside viewport space.
25
- * This helps reject transient off-page measurements from paged containers.
26
- */
27
- isMeasurementInViewport: (measured: MeasuredDimensions) => boolean;
28
- }
29
-
30
- /**
31
- * Provides a reference point for correcting bounds measurements.
32
- *
33
- * When a parent view has transforms applied (e.g., during screen transitions),
34
- * `measure()` returns visual positions that include those transforms. This provider
35
- * establishes an anchor point (typically the screen container at 0,0) and exposes
36
- * a `correctMeasurement` function that reverses translation and scale transforms
37
- * to yield the true layout position and dimensions.
38
- *
39
- * ## How it works
40
- *
41
- * 1. **Translation**: Subtract anchor's pageX/pageY offset
42
- * 2. **Scale**: Compare anchor's measured size to expected (screen) size to compute
43
- * scale factor, then divide positions and dimensions by that factor
44
- */
45
- const { LayoutAnchorProvider, useLayoutAnchorContext } = createProvider(
46
- "LayoutAnchor",
47
- { guarded: false },
48
- )<LayoutAnchorProviderProps, LayoutAnchorContextValue>(
49
- ({ anchorRef, children }) => {
50
- const { width: screenWidth, height: screenHeight } = useWindowDimensions();
51
-
52
- const correctMeasurement = useCallback(
53
- (measured: MeasuredDimensions): MeasuredDimensions => {
54
- "worklet";
55
- const anchor = measure(anchorRef);
56
- if (!anchor) return measured;
57
-
58
- // Compute scale factor by comparing anchor size to expected screen size.
59
- // Anchor should be full-screen (absoluteFill), so any difference is from scale.
60
- const scaleX = anchor.width > 0 ? anchor.width / screenWidth : 1;
61
- const scaleY = anchor.height > 0 ? anchor.height / screenHeight : 1;
62
-
63
- // Get element position relative to anchor (removes translation)
64
- const relativeX = measured.pageX - anchor.pageX;
65
- const relativeY = measured.pageY - anchor.pageY;
66
-
67
- // Reverse scale: divide relative position and dimensions by scale factor
68
- return {
69
- x: measured.x,
70
- y: measured.y,
71
- width: scaleX !== 1 ? measured.width / scaleX : measured.width,
72
- height: scaleY !== 1 ? measured.height / scaleY : measured.height,
73
- pageX: scaleX !== 1 ? relativeX / scaleX : relativeX,
74
- pageY: scaleY !== 1 ? relativeY / scaleY : relativeY,
75
- };
76
- },
77
- [anchorRef, screenWidth, screenHeight],
78
- );
79
-
80
- const isMeasurementInViewport = useCallback(
81
- (measured: MeasuredDimensions): boolean => {
82
- "worklet";
83
- if (measured.width <= 0 || measured.height <= 0) return false;
84
-
85
- const toleranceX = screenWidth * 0.15;
86
- const toleranceY = screenHeight * 0.15;
87
- const centerX = measured.pageX + measured.width / 2;
88
- const centerY = measured.pageY + measured.height / 2;
89
-
90
- return (
91
- centerX >= -toleranceX &&
92
- centerX <= screenWidth + toleranceX &&
93
- centerY >= -toleranceY &&
94
- centerY <= screenHeight + toleranceY
95
- );
96
- },
97
- [screenWidth, screenHeight],
98
- );
99
-
100
- const value = useMemo(
101
- () => ({ correctMeasurement, isMeasurementInViewport }),
102
- [correctMeasurement, isMeasurementInViewport],
103
- );
104
-
105
- return {
106
- value,
107
- children,
108
- };
109
- },
110
- );
111
-
112
- export { LayoutAnchorProvider, useLayoutAnchorContext };
@@ -1,55 +0,0 @@
1
- import type { EntryPatch, ScreenEntry, ScreenKey, TagState } from "../types";
2
-
3
- type EntryPatchOptionalField = "boundaryConfig";
4
-
5
- const ENTRY_PATCH_OPTIONAL_FIELDS = [
6
- "boundaryConfig",
7
- ] as const satisfies readonly EntryPatchOptionalField[];
8
-
9
- export const ensureScreenEntry = (
10
- tagState: TagState,
11
- screenKey: ScreenKey,
12
- ): ScreenEntry => {
13
- "worklet";
14
- if (!tagState.screens[screenKey]) {
15
- tagState.screens[screenKey] = {
16
- bounds: null,
17
- styles: {},
18
- };
19
- }
20
- return tagState.screens[screenKey];
21
- };
22
-
23
- export const applyEntryPatch = (entry: ScreenEntry, patch: EntryPatch) => {
24
- "worklet";
25
- if (patch.bounds !== undefined) {
26
- entry.bounds = patch.bounds;
27
- }
28
-
29
- if (patch.styles !== undefined) {
30
- entry.styles = patch.styles ?? {};
31
- }
32
-
33
- const target = entry as Record<EntryPatchOptionalField, unknown>;
34
- for (let i = 0; i < ENTRY_PATCH_OPTIONAL_FIELDS.length; i++) {
35
- const field = ENTRY_PATCH_OPTIONAL_FIELDS[i];
36
- const value = patch[field];
37
- if (value === undefined) continue;
38
-
39
- if (value === null) {
40
- delete target[field];
41
- } else {
42
- target[field] = value;
43
- }
44
- }
45
- };
46
-
47
- export const findMatchingScreenEntry = (
48
- tagState: TagState | undefined,
49
- screenKey: ScreenKey,
50
- ): ScreenEntry | null => {
51
- "worklet";
52
- if (!tagState) return null;
53
-
54
- return tagState.screens[screenKey] ?? null;
55
- };
@@ -1,22 +0,0 @@
1
- export const findLatestIndex = <T>(
2
- items: readonly T[],
3
- matches: (item: T) => boolean,
4
- ): number => {
5
- "worklet";
6
- for (let i = items.length - 1; i >= 0; i--) {
7
- if (matches(items[i])) {
8
- return i;
9
- }
10
- }
11
-
12
- return -1;
13
- };
14
-
15
- export const findLatest = <T>(
16
- items: readonly T[],
17
- matches: (item: T) => boolean,
18
- ): T | null => {
19
- "worklet";
20
- const index = findLatestIndex(items, matches);
21
- return index === -1 ? null : (items[index] ?? null);
22
- };
@@ -1,27 +0,0 @@
1
- import type { TagID } from "../types";
2
-
3
- type GroupTag = {
4
- group: string;
5
- id: string;
6
- };
7
-
8
- export const parseGroupTag = (tag: string): GroupTag | null => {
9
- "worklet";
10
- const separatorIndex = tag.indexOf(":");
11
- if (separatorIndex === -1) return null;
12
-
13
- return {
14
- group: tag.slice(0, separatorIndex),
15
- id: tag.slice(separatorIndex + 1),
16
- };
17
- };
18
-
19
- export const createGroupTag = (group: string, id: string): TagID => {
20
- "worklet";
21
- return `${group}:${id}`;
22
- };
23
-
24
- export const getGroupName = (tagOrGroup: string): string => {
25
- "worklet";
26
- return parseGroupTag(tagOrGroup)?.group ?? tagOrGroup;
27
- };