react-native-screen-transitions 3.9.0-beta.2 → 3.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/lib/commonjs/shared/components/boundary/components/boundary-target.js +19 -14
  2. package/lib/commonjs/shared/components/boundary/components/boundary-target.js.map +1 -1
  3. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +14 -7
  4. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -1
  5. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/components/host.js +1 -0
  6. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/components/host.js.map +1 -1
  7. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +32 -2
  8. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -1
  9. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/index.js +4 -3
  10. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/index.js.map +1 -1
  11. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/host.js +3 -2
  12. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/host.js.map +1 -1
  13. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +4 -3
  14. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
  15. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js +2 -3
  16. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js.map +1 -1
  17. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +1 -0
  18. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
  19. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/index.js +1 -3
  20. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/index.js.map +1 -1
  21. package/lib/commonjs/shared/components/boundary/portal/teleport.js +2 -1
  22. package/lib/commonjs/shared/components/boundary/portal/teleport.js.map +1 -1
  23. package/lib/commonjs/shared/components/boundary/portal/utils/ownership.js +4 -1
  24. package/lib/commonjs/shared/components/boundary/portal/utils/ownership.js.map +1 -1
  25. package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js +16 -3
  26. package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
  27. package/lib/commonjs/shared/configs/index.js +2 -1
  28. package/lib/commonjs/shared/configs/index.js.map +1 -1
  29. package/lib/commonjs/shared/configs/specs.js +23 -1
  30. package/lib/commonjs/shared/configs/specs.js.map +1 -1
  31. package/lib/commonjs/shared/constants.js +4 -0
  32. package/lib/commonjs/shared/constants.js.map +1 -1
  33. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +4 -0
  34. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
  35. package/lib/commonjs/shared/providers/screen/gestures/pan/activation/use-pan-activation.js +10 -10
  36. package/lib/commonjs/shared/providers/screen/gestures/pan/activation/use-pan-activation.js.map +1 -1
  37. package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js +10 -2
  38. package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js.map +1 -1
  39. package/lib/commonjs/shared/providers/screen/gestures/pan/use-build-pan-gesture.js +1 -1
  40. package/lib/commonjs/shared/providers/screen/gestures/pan/use-build-pan-gesture.js.map +1 -1
  41. package/lib/commonjs/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js +25 -3
  42. package/lib/commonjs/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js.map +1 -1
  43. package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js +4 -6
  44. package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js.map +1 -1
  45. package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js +2 -2
  46. package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js.map +1 -1
  47. package/lib/commonjs/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.js +6 -1
  48. package/lib/commonjs/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.js.map +1 -1
  49. package/lib/commonjs/shared/providers/screen/gestures/shared/snapshot.js +2 -0
  50. package/lib/commonjs/shared/providers/screen/gestures/shared/snapshot.js.map +1 -1
  51. package/lib/commonjs/shared/providers/screen/gestures/shared/values.js +2 -0
  52. package/lib/commonjs/shared/providers/screen/gestures/shared/values.js.map +1 -1
  53. package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +11 -0
  54. package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
  55. package/lib/commonjs/shared/stores/gesture.store.js +8 -0
  56. package/lib/commonjs/shared/stores/gesture.store.js.map +1 -1
  57. package/lib/commonjs/shared/utils/animation/animate-to-progress.js +24 -7
  58. package/lib/commonjs/shared/utils/animation/animate-to-progress.js.map +1 -1
  59. package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js +5 -2
  60. package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
  61. package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js +184 -314
  62. package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
  63. package/lib/commonjs/shared/utils/bounds/navigation/zoom/config.js +13 -18
  64. package/lib/commonjs/shared/utils/bounds/navigation/zoom/config.js.map +1 -1
  65. package/lib/commonjs/shared/utils/bounds/navigation/zoom/drag.js +196 -0
  66. package/lib/commonjs/shared/utils/bounds/navigation/zoom/drag.js.map +1 -0
  67. package/lib/commonjs/shared/utils/bounds/navigation/zoom/helpers.js +97 -108
  68. package/lib/commonjs/shared/utils/bounds/navigation/zoom/helpers.js.map +1 -1
  69. package/lib/commonjs/shared/utils/bounds/navigation/zoom/mask.js +73 -0
  70. package/lib/commonjs/shared/utils/bounds/navigation/zoom/mask.js.map +1 -0
  71. package/lib/commonjs/shared/utils/bounds/navigation/zoom/targets.js +90 -0
  72. package/lib/commonjs/shared/utils/bounds/navigation/zoom/targets.js.map +1 -0
  73. package/lib/module/shared/components/boundary/components/boundary-target.js +20 -15
  74. package/lib/module/shared/components/boundary/components/boundary-target.js.map +1 -1
  75. package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +14 -7
  76. package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -1
  77. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/components/host.js +2 -1
  78. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/components/host.js.map +1 -1
  79. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +32 -2
  80. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -1
  81. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/index.js +5 -4
  82. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/index.js.map +1 -1
  83. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/host.js +3 -2
  84. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/host.js.map +1 -1
  85. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +5 -4
  86. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
  87. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js +3 -4
  88. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js.map +1 -1
  89. package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +1 -0
  90. package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
  91. package/lib/module/shared/components/boundary/portal/components/boundary-portal/index.js +1 -3
  92. package/lib/module/shared/components/boundary/portal/components/boundary-portal/index.js.map +1 -1
  93. package/lib/module/shared/components/boundary/portal/teleport.js +1 -0
  94. package/lib/module/shared/components/boundary/portal/teleport.js.map +1 -1
  95. package/lib/module/shared/components/boundary/portal/utils/ownership.js +4 -1
  96. package/lib/module/shared/components/boundary/portal/utils/ownership.js.map +1 -1
  97. package/lib/module/shared/components/boundary/providers/boundary-root.provider.js +17 -4
  98. package/lib/module/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
  99. package/lib/module/shared/configs/index.js +3 -2
  100. package/lib/module/shared/configs/index.js.map +1 -1
  101. package/lib/module/shared/configs/specs.js +22 -0
  102. package/lib/module/shared/configs/specs.js.map +1 -1
  103. package/lib/module/shared/constants.js +4 -0
  104. package/lib/module/shared/constants.js.map +1 -1
  105. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +4 -0
  106. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
  107. package/lib/module/shared/providers/screen/gestures/pan/activation/use-pan-activation.js +10 -10
  108. package/lib/module/shared/providers/screen/gestures/pan/activation/use-pan-activation.js.map +1 -1
  109. package/lib/module/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js +10 -2
  110. package/lib/module/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js.map +1 -1
  111. package/lib/module/shared/providers/screen/gestures/pan/use-build-pan-gesture.js +1 -1
  112. package/lib/module/shared/providers/screen/gestures/pan/use-build-pan-gesture.js.map +1 -1
  113. package/lib/module/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js +23 -2
  114. package/lib/module/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js.map +1 -1
  115. package/lib/module/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js +4 -6
  116. package/lib/module/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js.map +1 -1
  117. package/lib/module/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js +2 -2
  118. package/lib/module/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js.map +1 -1
  119. package/lib/module/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.js +6 -1
  120. package/lib/module/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.js.map +1 -1
  121. package/lib/module/shared/providers/screen/gestures/shared/snapshot.js +2 -0
  122. package/lib/module/shared/providers/screen/gestures/shared/snapshot.js.map +1 -1
  123. package/lib/module/shared/providers/screen/gestures/shared/values.js +2 -0
  124. package/lib/module/shared/providers/screen/gestures/shared/values.js.map +1 -1
  125. package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +11 -0
  126. package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
  127. package/lib/module/shared/stores/gesture.store.js +8 -0
  128. package/lib/module/shared/stores/gesture.store.js.map +1 -1
  129. package/lib/module/shared/types/bounds.types.js +26 -0
  130. package/lib/module/shared/types/bounds.types.js.map +1 -1
  131. package/lib/module/shared/utils/animation/animate-to-progress.js +24 -7
  132. package/lib/module/shared/utils/animation/animate-to-progress.js.map +1 -1
  133. package/lib/module/shared/utils/bounds/navigation/reveal/math.js +5 -2
  134. package/lib/module/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
  135. package/lib/module/shared/utils/bounds/navigation/zoom/build.js +188 -318
  136. package/lib/module/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
  137. package/lib/module/shared/utils/bounds/navigation/zoom/config.js +12 -17
  138. package/lib/module/shared/utils/bounds/navigation/zoom/config.js.map +1 -1
  139. package/lib/module/shared/utils/bounds/navigation/zoom/drag.js +184 -0
  140. package/lib/module/shared/utils/bounds/navigation/zoom/drag.js.map +1 -0
  141. package/lib/module/shared/utils/bounds/navigation/zoom/helpers.js +94 -102
  142. package/lib/module/shared/utils/bounds/navigation/zoom/helpers.js.map +1 -1
  143. package/lib/module/shared/utils/bounds/navigation/zoom/mask.js +68 -0
  144. package/lib/module/shared/utils/bounds/navigation/zoom/mask.js.map +1 -0
  145. package/lib/module/shared/utils/bounds/navigation/zoom/targets.js +84 -0
  146. package/lib/module/shared/utils/bounds/navigation/zoom/targets.js.map +1 -0
  147. package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts +3 -1
  148. package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts.map +1 -1
  149. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts.map +1 -1
  150. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/components/host.d.ts.map +1 -1
  151. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.d.ts.map +1 -1
  152. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/index.d.ts +1 -3
  153. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/index.d.ts.map +1 -1
  154. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/host.d.ts.map +1 -1
  155. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.d.ts.map +1 -1
  156. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.d.ts +2 -3
  157. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.d.ts.map +1 -1
  158. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts.map +1 -1
  159. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/index.d.ts +2 -3
  160. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/index.d.ts.map +1 -1
  161. package/lib/typescript/shared/components/boundary/portal/teleport.d.ts +1 -0
  162. package/lib/typescript/shared/components/boundary/portal/teleport.d.ts.map +1 -1
  163. package/lib/typescript/shared/components/boundary/portal/utils/ownership.d.ts.map +1 -1
  164. package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts +1 -0
  165. package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts.map +1 -1
  166. package/lib/typescript/shared/configs/index.d.ts +16 -0
  167. package/lib/typescript/shared/configs/index.d.ts.map +1 -1
  168. package/lib/typescript/shared/configs/specs.d.ts +19 -0
  169. package/lib/typescript/shared/configs/specs.d.ts.map +1 -1
  170. package/lib/typescript/shared/constants.d.ts.map +1 -1
  171. package/lib/typescript/shared/index.d.ts +17 -1
  172. package/lib/typescript/shared/index.d.ts.map +1 -1
  173. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts.map +1 -1
  174. package/lib/typescript/shared/providers/screen/gestures/pan/activation/use-pan-activation.d.ts +2 -0
  175. package/lib/typescript/shared/providers/screen/gestures/pan/activation/use-pan-activation.d.ts.map +1 -1
  176. package/lib/typescript/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.d.ts +2 -1
  177. package/lib/typescript/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.d.ts.map +1 -1
  178. package/lib/typescript/shared/providers/screen/gestures/pan/use-build-pan-gesture.d.ts.map +1 -1
  179. package/lib/typescript/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.d.ts +2 -0
  180. package/lib/typescript/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.d.ts.map +1 -1
  181. package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.d.ts +1 -1
  182. package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.d.ts.map +1 -1
  183. package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.d.ts.map +1 -1
  184. package/lib/typescript/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.d.ts.map +1 -1
  185. package/lib/typescript/shared/providers/screen/gestures/shared/snapshot.d.ts.map +1 -1
  186. package/lib/typescript/shared/providers/screen/gestures/shared/values.d.ts.map +1 -1
  187. package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts +4 -0
  188. package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts.map +1 -1
  189. package/lib/typescript/shared/stores/gesture.store.d.ts +4 -0
  190. package/lib/typescript/shared/stores/gesture.store.d.ts.map +1 -1
  191. package/lib/typescript/shared/types/bounds.types.d.ts +115 -88
  192. package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
  193. package/lib/typescript/shared/types/gesture.types.d.ts +10 -0
  194. package/lib/typescript/shared/types/gesture.types.d.ts.map +1 -1
  195. package/lib/typescript/shared/types/index.d.ts +1 -1
  196. package/lib/typescript/shared/types/index.d.ts.map +1 -1
  197. package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts.map +1 -1
  198. package/lib/typescript/shared/utils/bounds/navigation/reveal/math.d.ts +3 -1
  199. package/lib/typescript/shared/utils/bounds/navigation/reveal/math.d.ts.map +1 -1
  200. package/lib/typescript/shared/utils/bounds/navigation/zoom/build.d.ts +1 -1
  201. package/lib/typescript/shared/utils/bounds/navigation/zoom/build.d.ts.map +1 -1
  202. package/lib/typescript/shared/utils/bounds/navigation/zoom/config.d.ts +7 -17
  203. package/lib/typescript/shared/utils/bounds/navigation/zoom/config.d.ts.map +1 -1
  204. package/lib/typescript/shared/utils/bounds/navigation/zoom/drag.d.ts +55 -0
  205. package/lib/typescript/shared/utils/bounds/navigation/zoom/drag.d.ts.map +1 -0
  206. package/lib/typescript/shared/utils/bounds/navigation/zoom/helpers.d.ts +33 -34
  207. package/lib/typescript/shared/utils/bounds/navigation/zoom/helpers.d.ts.map +1 -1
  208. package/lib/typescript/shared/utils/bounds/navigation/zoom/mask.d.ts +27 -0
  209. package/lib/typescript/shared/utils/bounds/navigation/zoom/mask.d.ts.map +1 -0
  210. package/lib/typescript/shared/utils/bounds/navigation/zoom/targets.d.ts +22 -0
  211. package/lib/typescript/shared/utils/bounds/navigation/zoom/targets.d.ts.map +1 -0
  212. package/lib/typescript/shared/utils/bounds/navigation/zoom/types.d.ts +1 -1
  213. package/lib/typescript/shared/utils/bounds/navigation/zoom/types.d.ts.map +1 -1
  214. package/package.json +2 -2
  215. package/src/shared/components/boundary/components/boundary-target.tsx +37 -26
  216. package/src/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.ts +16 -13
  217. package/src/shared/components/boundary/portal/components/boundary-content-portal/components/host.tsx +6 -2
  218. package/src/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.ts +46 -3
  219. package/src/shared/components/boundary/portal/components/boundary-content-portal/index.tsx +8 -5
  220. package/src/shared/components/boundary/portal/components/boundary-portal/components/host.tsx +3 -2
  221. package/src/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.tsx +5 -4
  222. package/src/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.tsx +4 -5
  223. package/src/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts +5 -1
  224. package/src/shared/components/boundary/portal/components/boundary-portal/index.tsx +1 -4
  225. package/src/shared/components/boundary/portal/teleport.ts +1 -0
  226. package/src/shared/components/boundary/portal/utils/ownership.ts +5 -1
  227. package/src/shared/components/boundary/providers/boundary-root.provider.tsx +23 -3
  228. package/src/shared/configs/index.ts +2 -1
  229. package/src/shared/configs/specs.ts +23 -0
  230. package/src/shared/constants.ts +4 -0
  231. package/src/shared/index.ts +2 -0
  232. package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/index.ts +8 -0
  233. package/src/shared/providers/screen/gestures/pan/activation/use-pan-activation.ts +16 -7
  234. package/src/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.ts +18 -1
  235. package/src/shared/providers/screen/gestures/pan/use-build-pan-gesture.ts +1 -0
  236. package/src/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.ts +40 -2
  237. package/src/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.ts +7 -11
  238. package/src/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.ts +12 -15
  239. package/src/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.ts +6 -1
  240. package/src/shared/providers/screen/gestures/shared/snapshot.ts +2 -0
  241. package/src/shared/providers/screen/gestures/shared/values.ts +2 -0
  242. package/src/shared/providers/screen/styles/hooks/use-maybe-block-visibility.tsx +14 -1
  243. package/src/shared/stores/gesture.store.ts +12 -0
  244. package/src/shared/types/bounds.types.ts +119 -90
  245. package/src/shared/types/gesture.types.ts +10 -0
  246. package/src/shared/types/index.ts +2 -0
  247. package/src/shared/utils/animation/animate-to-progress.ts +23 -7
  248. package/src/shared/utils/bounds/navigation/reveal/math.ts +6 -1
  249. package/src/shared/utils/bounds/navigation/zoom/build.ts +231 -411
  250. package/src/shared/utils/bounds/navigation/zoom/config.ts +16 -18
  251. package/src/shared/utils/bounds/navigation/zoom/drag.ts +327 -0
  252. package/src/shared/utils/bounds/navigation/zoom/helpers.ts +127 -184
  253. package/src/shared/utils/bounds/navigation/zoom/mask.ts +133 -0
  254. package/src/shared/utils/bounds/navigation/zoom/targets.ts +132 -0
  255. package/src/shared/utils/bounds/navigation/zoom/types.ts +1 -1
  256. package/lib/commonjs/shared/utils/bounds/navigation/zoom/math.js +0 -25
  257. package/lib/commonjs/shared/utils/bounds/navigation/zoom/math.js.map +0 -1
  258. package/lib/module/shared/utils/bounds/navigation/zoom/math.js +0 -20
  259. package/lib/module/shared/utils/bounds/navigation/zoom/math.js.map +0 -1
  260. package/lib/typescript/shared/utils/bounds/navigation/zoom/math.d.ts +0 -8
  261. package/lib/typescript/shared/utils/bounds/navigation/zoom/math.d.ts.map +0 -1
  262. package/src/shared/utils/bounds/navigation/zoom/math.ts +0 -25
@@ -1,4 +1,4 @@
1
- import type { MeasuredDimensions } from "react-native-reanimated";
1
+ import type { ColorValue } from "react-native";
2
2
  import {
3
3
  NAVIGATION_MASK_CONTAINER_STYLE_ID,
4
4
  NAVIGATION_MASK_ELEMENT_STYLE_ID,
@@ -31,78 +31,142 @@ export type { BoundsLink, BoundsLinkStatus } from "../stores/bounds/types";
31
31
  */
32
32
  export type BoundsMethod = "transform" | "size" | "content";
33
33
 
34
+ /**
35
+ * Axis-specific response intensity used by {@linkcode BoundsNavigationZoomDragOptions}.
36
+ *
37
+ * `0` disables the response on an axis, `1` preserves the native zoom preset,
38
+ * and values above `1` exaggerate it.
39
+ */
40
+ export type BoundsNavigationZoomAxisResponse = {
41
+ /** Horizontal gesture response multiplier. @default 1 */
42
+ horizontal?: number;
43
+ /** Vertical gesture response multiplier. @default 1 */
44
+ vertical?: number;
45
+ };
46
+
47
+ /**
48
+ * Adjusts the intensity of zoom's native drag behavior without replacing its
49
+ * built-in curves.
50
+ *
51
+ * @see {@linkcode BoundsNavigationZoomOptions.drag}
52
+ */
53
+ export type BoundsNavigationZoomDragOptions = {
54
+ /**
55
+ * Multiplies the native rendered translation.
56
+ *
57
+ * @default { horizontal: 1, vertical: 1 }
58
+ */
59
+ translation?: BoundsNavigationZoomAxisResponse;
60
+ /**
61
+ * Multiplies the native scale displacement from `1`.
62
+ *
63
+ * @default { horizontal: 1, vertical: 1 }
64
+ */
65
+ scale?: BoundsNavigationZoomAxisResponse;
66
+ };
67
+
68
+ /**
69
+ * Legacy zoom opacity interpolation tuple.
70
+ *
71
+ * @deprecated Zoom opacity ownership now follows the native preset.
72
+ */
73
+ export type BoundsNavigationZoomOpacityRange = readonly [
74
+ inputStart: number,
75
+ inputEnd: number,
76
+ outputStart?: number,
77
+ outputEnd?: number,
78
+ ];
79
+
80
+ /**
81
+ * Legacy opening and closing zoom opacity ranges.
82
+ *
83
+ * @deprecated Zoom opacity ownership now follows the native preset.
84
+ */
85
+ export type BoundsNavigationZoomOpacityRanges = {
86
+ open?: BoundsNavigationZoomOpacityRange;
87
+ close?: BoundsNavigationZoomOpacityRange;
88
+ };
89
+
34
90
  export type BoundsNavigationZoomOptions = {
35
- target?: "bound" | "fullscreen" | MeasuredDimensions;
36
- debug?: boolean;
37
- borderRadius?: number;
38
91
  /**
39
- * Focused-screen element opacity curve.
92
+ * Geometry that the zoomed content should resolve against.
40
93
  *
41
- * `open` is used while presenting the destination screen.
42
- * `close` is used while returning to the source screen.
94
+ * `"bound"` uses the paired destination boundary. `"fullscreen"` uses the
95
+ * screen, and measured dimensions provide an explicit target rectangle.
96
+ * When omitted, zoom keeps its native full-width aspect-ratio target.
97
+ */
98
+ target?: BoundsComputeOptions["target"];
99
+ /**
100
+ * Keeps the focused screen content visible throughout the zoom.
101
+ *
102
+ * Enable this for handed-off or live content that should not use zoom's
103
+ * built-in focused-content opacity fade.
43
104
  *
44
- * Tuple order:
45
- * - `inputStart`: transition progress start
46
- * - `inputEnd`: transition progress end
47
- * - `outputStart`: opacity at `inputStart` (defaults to built-in preset)
48
- * - `outputEnd`: opacity at `inputEnd` (defaults to built-in preset)
105
+ * @default false
49
106
  */
50
- focusedElementOpacity?: BoundsNavigationZoomOpacityRanges;
107
+ keepFocusedVisible?: boolean;
51
108
  /**
52
- * Unfocused-screen matched element opacity curve.
109
+ * Expanded transition clipping radius.
53
110
  *
54
- * `open` is used while the previous screen animates out during present.
55
- * `close` is used while the previous screen animates back in during dismiss.
111
+ * Zoom interpolates from the measured source radius to this value while the
112
+ * screen is animating. This controls the visible clipping result regardless
113
+ * of whether a navigation mask is enabled.
56
114
  *
57
- * Tuple order:
58
- * - `inputStart`: transition progress start
59
- * - `inputEnd`: transition progress end
60
- * - `outputStart`: opacity at `inputStart` (defaults to built-in preset)
61
- * - `outputEnd`: opacity at `inputEnd` (defaults to built-in preset)
115
+ * @default 64
62
116
  */
63
- unfocusedElementOpacity?: BoundsNavigationZoomOpacityRanges;
117
+ borderRadius?: number;
64
118
  /**
65
- * Scale applied to the unfocused background content while the focused bound
66
- * animates above it.
119
+ * Scale applied to the unfocused screen while the zoom runs above it.
120
+ *
121
+ * @default 0.9375
67
122
  */
68
123
  backgroundScale?: number;
69
124
  /**
70
- * Maximum dynamic gesture sensitivity applied by zoom.
71
- *
72
- * Zoom lowers gesture sensitivity as the drag gets deeper so the content
73
- * handoff stays stable. This value controls the starting/highest sensitivity
74
- * in that curve.
125
+ * Color rendered behind the focused zoom content.
75
126
  *
76
- * @default 0.8
127
+ * @default "black"
77
128
  */
78
- maxSensitivity?: number;
129
+ backdropColor?: ColorValue;
79
130
  /**
80
- * Velocity-driven depth applied to the dismiss scale handoff.
131
+ * Maximum opacity reached by the zoom backdrop.
81
132
  *
82
- * Higher values make fast releases orbit farther around the final scale. Set
83
- * to `0` to remove the velocity depth effect.
133
+ * Values are clamped between `0` and `1`.
84
134
  *
85
- * @default 0.5
135
+ * @default 0.45
136
+ */
137
+ backdropOpacity?: number;
138
+ /**
139
+ * Native drag-response intensity controls.
140
+ */
141
+ drag?: BoundsNavigationZoomDragOptions;
142
+ /**
143
+ * @deprecated Ignored. Zoom no longer exposes a transition-specific debug
144
+ * overlay.
145
+ */
146
+ debug?: boolean;
147
+ /**
148
+ * @deprecated Ignored. Zoom opacity ownership now follows the native preset.
149
+ */
150
+ focusedElementOpacity?: BoundsNavigationZoomOpacityRanges;
151
+ /**
152
+ * @deprecated Ignored. Zoom opacity ownership now follows the native preset.
153
+ */
154
+ unfocusedElementOpacity?: BoundsNavigationZoomOpacityRanges;
155
+ /**
156
+ * @deprecated Ignored. Zoom now owns its gesture sensitivity curve.
157
+ */
158
+ maxSensitivity?: number;
159
+ /**
160
+ * @deprecated Ignored. Zoom now owns its velocity-depth behavior.
86
161
  */
87
162
  velocityDepth?: number;
88
163
  /**
89
- * Deprecated compatibility option.
90
- *
91
- * Gesture movement now always contributes to `progress`; use `transitionProgress`
92
- * when a recipe needs transition progress without live gesture contribution.
93
- * The zoom helper no longer reads this option.
94
- *
95
- * @deprecated Use `transitionProgress` from interpolation state instead.
164
+ * @deprecated Ignored. Gesture movement always contributes to `progress`.
96
165
  */
97
166
  gestureProgressMode?: GestureProgressMode;
98
167
  /**
99
- * Horizontal gesture drag scaling curve, applied when the active dismiss
100
- * direction is horizontal.
101
- *
102
- * Tuple order:
103
- * - `shrinkMin`: minimum scale when dragging toward dismissal
104
- * - `growMax`: maximum scale when dragging opposite dismissal
105
- * - `exponent`: curve exponent controlling how quickly scaling ramps
168
+ * @deprecated Ignored. Use `drag.scale.horizontal` to adjust response
169
+ * intensity without replacing the native curve.
106
170
  */
107
171
  horizontalDragScale?: readonly [
108
172
  shrinkMin: number,
@@ -110,13 +174,8 @@ export type BoundsNavigationZoomOptions = {
110
174
  exponent?: number,
111
175
  ];
112
176
  /**
113
- * Vertical gesture drag scaling curve, applied when the active dismiss
114
- * direction is vertical.
115
- *
116
- * Tuple order:
117
- * - `shrinkMin`: minimum scale when dragging toward dismissal
118
- * - `growMax`: maximum scale when dragging opposite dismissal
119
- * - `exponent`: curve exponent controlling how quickly scaling ramps
177
+ * @deprecated Ignored. Use `drag.scale.vertical` to adjust response intensity
178
+ * without replacing the native curve.
120
179
  */
121
180
  verticalDragScale?: readonly [
122
181
  shrinkMin: number,
@@ -124,17 +183,8 @@ export type BoundsNavigationZoomOptions = {
124
183
  exponent?: number,
125
184
  ];
126
185
  /**
127
- * Horizontal gesture drag translation curve.
128
- *
129
- * Tuple order:
130
- * - `negativeMax`: multiplier when dragging left / negative
131
- * - `positiveMax`: multiplier when dragging right / positive
132
- * - `exponent`: curve exponent controlling how quickly translation ramps
133
- *
134
- * Examples:
135
- * - `[0, 0]` disables horizontal drag translation
136
- * - `[0.5, 0.5]` halves horizontal drag travel
137
- * - `[1.2, 1.2]` amplifies horizontal drag travel
186
+ * @deprecated Ignored. Use `drag.translation.horizontal` to adjust response
187
+ * intensity without replacing the native curve.
138
188
  */
139
189
  horizontalDragTranslation?: readonly [
140
190
  negativeMax: number,
@@ -142,17 +192,8 @@ export type BoundsNavigationZoomOptions = {
142
192
  exponent?: number,
143
193
  ];
144
194
  /**
145
- * Vertical gesture drag translation curve.
146
- *
147
- * Tuple order:
148
- * - `negativeMax`: multiplier when dragging up / negative
149
- * - `positiveMax`: multiplier when dragging down / positive
150
- * - `exponent`: curve exponent controlling how quickly translation ramps
151
- *
152
- * Examples:
153
- * - `[0, 0]` disables vertical drag translation
154
- * - `[0.5, 0.5]` halves vertical drag travel
155
- * - `[1.2, 1.2]` amplifies vertical drag travel
195
+ * @deprecated Ignored. Use `drag.translation.vertical` to adjust response
196
+ * intensity without replacing the native curve.
156
197
  */
157
198
  verticalDragTranslation?: readonly [
158
199
  negativeMax: number,
@@ -161,18 +202,6 @@ export type BoundsNavigationZoomOptions = {
161
202
  ];
162
203
  };
163
204
 
164
- export type BoundsNavigationZoomOpacityRange = readonly [
165
- inputStart: number,
166
- inputEnd: number,
167
- outputStart?: number,
168
- outputEnd?: number,
169
- ];
170
-
171
- export type BoundsNavigationZoomOpacityRanges = {
172
- open?: BoundsNavigationZoomOpacityRange;
173
- close?: BoundsNavigationZoomOpacityRange;
174
- };
175
-
176
205
  export type BoundsNavigationZoomStyle = TransitionInterpolatedStyle & {
177
206
  content?: TransitionSlotStyle;
178
207
  [NAVIGATION_MASK_CONTAINER_STYLE_ID]?: TransitionSlotStyle;
@@ -150,6 +150,8 @@ export type GestureHandoffValues = {
150
150
  normScale: number;
151
151
  focalX: number;
152
152
  focalY: number;
153
+ pinchOriginX: number;
154
+ pinchOriginY: number;
153
155
  rotation: number;
154
156
  raw: RawGestureValues;
155
157
  /**
@@ -202,6 +204,14 @@ export type GestureValues = {
202
204
  * The live pinch focal point y-position in screen coordinates.
203
205
  */
204
206
  focalY: number;
207
+ /**
208
+ * The pinch focal point x-position captured when the gesture activated.
209
+ */
210
+ pinchOriginX: number;
211
+ /**
212
+ * The pinch focal point y-position captured when the gesture activated.
213
+ */
214
+ pinchOriginY: number;
205
215
  /**
206
216
  * The live two-finger rotation in radians.
207
217
  */
@@ -25,6 +25,8 @@ export type {
25
25
  BoundsNavigationAccessor,
26
26
  BoundsNavigationRevealOptions,
27
27
  BoundsNavigationRevealStyle,
28
+ BoundsNavigationZoomAxisResponse,
29
+ BoundsNavigationZoomDragOptions,
28
30
  BoundsNavigationZoomOpacityRange,
29
31
  BoundsNavigationZoomOpacityRanges,
30
32
  BoundsNavigationZoomOptions,
@@ -113,14 +113,30 @@ export const animateToProgress = ({
113
113
  entering.set(FALSE);
114
114
  }
115
115
 
116
- if (onAnimationFinish) {
117
- runOnJS(onAnimationFinish)(state.finished);
118
- }
119
-
120
- // Delay clearing progress animation by one frame to ensure final frame is painted
121
- requestAnimationFrame(() => {
116
+ if (isClosing) {
122
117
  progressAnimating.set(FALSE);
123
- });
118
+
119
+ if (onAnimationFinish) {
120
+ // Paint the terminal UI-thread host/style state before React
121
+ // removes the closing route and its native portal host.
122
+ requestAnimationFrame(() => {
123
+ "worklet";
124
+ requestAnimationFrame(() => {
125
+ "worklet";
126
+ runOnJS(onAnimationFinish)(state.finished);
127
+ });
128
+ });
129
+ }
130
+ } else {
131
+ if (onAnimationFinish) {
132
+ runOnJS(onAnimationFinish)(state.finished);
133
+ }
134
+
135
+ // Delay clearing progress animation by one frame to ensure final frame is painted
136
+ requestAnimationFrame(() => {
137
+ progressAnimating.set(FALSE);
138
+ });
139
+ }
124
140
  }),
125
141
  );
126
142
  };
@@ -2,6 +2,7 @@ import type { MeasuredDimensions } from "react-native-reanimated";
2
2
  import { EPSILON } from "../../../../constants";
3
3
  import type { Layout } from "../../../../types/screen.types";
4
4
  import { computeContentTransformGeometry } from "../../helpers/geometry";
5
+ import type { BoundsAnchor } from "../../types/options";
5
6
  import {
6
7
  DRAG_DIRECTIONAL_SCALE_EXPONENT,
7
8
  DRAG_DIRECTIONAL_SCALE_MAX,
@@ -141,7 +142,8 @@ export function resolveDismissScaleHandoff({
141
142
  "worklet";
142
143
 
143
144
  const closeProgress = 1 - progress;
144
- const scaleProgress = Math.sin((Math.PI / 2) * closeProgress);
145
+ const easeIn = 1 - Math.cos((Math.PI / 2) * closeProgress);
146
+ const scaleProgress = easeIn ** 2;
145
147
  const baseScale = releaseScale + (targetScale - releaseScale) * scaleProgress;
146
148
 
147
149
  const orbitDepth = velocityDepth * velocity;
@@ -188,11 +190,13 @@ export function resolveRevealContentBaseTransform({
188
190
  sourceBounds,
189
191
  destinationBounds,
190
192
  screenLayout,
193
+ anchor,
191
194
  }: {
192
195
  progress: number;
193
196
  sourceBounds: MeasuredDimensions;
194
197
  destinationBounds: MeasuredDimensions;
195
198
  screenLayout: Layout;
199
+ anchor?: BoundsAnchor;
196
200
  }) {
197
201
  "worklet";
198
202
 
@@ -201,6 +205,7 @@ export function resolveRevealContentBaseTransform({
201
205
  end: destinationBounds,
202
206
  entering: true,
203
207
  dimensions: screenLayout,
208
+ anchor,
204
209
  scaleMode: "uniform",
205
210
  });
206
211