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,5 @@
1
1
  import type { WithSpringConfig } from "react-native-reanimated";
2
+ import type { TransitionSpec } from "../types/animation.types";
2
3
 
3
4
  export const DefaultSpec: WithSpringConfig = {
4
5
  stiffness: 1000,
@@ -22,3 +23,25 @@ export const FlingSpec: WithSpringConfig = {
22
23
  overshootClamping: false,
23
24
  energyThreshold: 6e-9,
24
25
  };
26
+
27
+ /**
28
+ * Paired spring configuration tuned for navigation zoom transitions.
29
+ */
30
+ export const Zoom = {
31
+ open: {
32
+ stiffness: 1000,
33
+ damping: 500,
34
+ mass: 3,
35
+ overshootClamping: false,
36
+ // @ts-expect-error Reanimated v3 spring config support.
37
+ restSpeedThreshold: 0.02,
38
+ },
39
+ close: {
40
+ stiffness: 1100,
41
+ damping: 98,
42
+ mass: 3,
43
+ overshootClamping: false,
44
+ // @ts-expect-error Reanimated v3 spring config support.
45
+ restSpeedThreshold: 0.02,
46
+ },
47
+ } satisfies TransitionSpec;
@@ -53,12 +53,16 @@ const DEFAULT_GESTURE_VALUES = {
53
53
  velocity: 0,
54
54
  focalX: 0,
55
55
  focalY: 0,
56
+ pinchOriginX: 0,
57
+ pinchOriginY: 0,
56
58
  raw: DEFAULT_RAW_GESTURE_VALUES,
57
59
  handoff: {
58
60
  ...DEFAULT_RAW_GESTURE_VALUES,
59
61
  velocity: 0,
60
62
  focalX: 0,
61
63
  focalY: 0,
64
+ pinchOriginX: 0,
65
+ pinchOriginY: 0,
62
66
  raw: DEFAULT_RAW_GESTURE_VALUES,
63
67
  active: null,
64
68
  direction: null,
@@ -63,6 +63,8 @@ export type {
63
63
  BoundsNavigationAccessor,
64
64
  BoundsNavigationRevealOptions,
65
65
  BoundsNavigationRevealStyle,
66
+ BoundsNavigationZoomAxisResponse,
67
+ BoundsNavigationZoomDragOptions,
66
68
  BoundsNavigationZoomOpacityRange,
67
69
  BoundsNavigationZoomOpacityRanges,
68
70
  BoundsNavigationZoomOptions,
@@ -78,6 +78,8 @@ export const hydrateTransitionState = (
78
78
  out.gesture.normScale = s.gesture.normScale.get();
79
79
  out.gesture.focalX = s.gesture.focalX.get();
80
80
  out.gesture.focalY = s.gesture.focalY.get();
81
+ out.gesture.pinchOriginX = s.gesture.pinchOriginX.get();
82
+ out.gesture.pinchOriginY = s.gesture.pinchOriginY.get();
81
83
  out.gesture.rotation = s.gesture.rotation.get();
82
84
  out.gesture.raw.x = s.gesture.raw.x.get();
83
85
  out.gesture.raw.y = s.gesture.raw.y.get();
@@ -121,6 +123,12 @@ export const hydrateTransitionState = (
121
123
  handoff.focalY = useHandoffSnapshot
122
124
  ? s.gesture.internal.snapshot.focalY.get()
123
125
  : out.gesture.focalY;
126
+ handoff.pinchOriginX = useHandoffSnapshot
127
+ ? s.gesture.internal.snapshot.pinchOriginX.get()
128
+ : out.gesture.pinchOriginX;
129
+ handoff.pinchOriginY = useHandoffSnapshot
130
+ ? s.gesture.internal.snapshot.pinchOriginY.get()
131
+ : out.gesture.pinchOriginY;
124
132
  handoff.rotation = useHandoffSnapshot
125
133
  ? s.gesture.internal.snapshot.rotation.get()
126
134
  : out.gesture.rotation;
@@ -6,6 +6,7 @@ import type {
6
6
  import { type SharedValue, useSharedValue } from "react-native-reanimated";
7
7
  import { GestureStore } from "../../../../../stores/gesture.store";
8
8
  import { GestureActivationState } from "../../../../../types/gesture.types";
9
+ import type { Direction } from "../../../../../types/ownership.types";
9
10
  import { useDescriptorDerivations } from "../../../descriptors";
10
11
  import type { ScreenOptionsContextValue } from "../../../options";
11
12
  import { resolvePanRuntime } from "../../shared/runtime";
@@ -47,6 +48,7 @@ export const usePanActivation = ({
47
48
  const gestureActivationState = useSharedValue<GestureActivationState>(
48
49
  GestureActivationState.PENDING,
49
50
  );
51
+ const pendingDirection = useSharedValue<Direction | null>(null);
50
52
 
51
53
  const onTouchesDown = useCallback(
52
54
  (
@@ -61,6 +63,7 @@ export const usePanActivation = ({
61
63
 
62
64
  if (!participation.canTrackGesture) {
63
65
  gestureActivationState.set(GestureActivationState.FAILED);
66
+ pendingDirection.set(null);
64
67
  stateManager?.fail();
65
68
  return;
66
69
  }
@@ -68,8 +71,15 @@ export const usePanActivation = ({
68
71
  const firstTouch = event.changedTouches[0];
69
72
  initialTouch.set({ x: firstTouch.x, y: firstTouch.y });
70
73
  gestureActivationState.set(GestureActivationState.PENDING);
74
+ pendingDirection.set(null);
71
75
  },
72
- [gestureActivationState, initialTouch, runtime, screenOptions],
76
+ [
77
+ gestureActivationState,
78
+ initialTouch,
79
+ pendingDirection,
80
+ runtime,
81
+ screenOptions,
82
+ ],
73
83
  );
74
84
 
75
85
  const onTouchesMove = useCallback(
@@ -110,6 +120,7 @@ export const usePanActivation = ({
110
120
  }
111
121
 
112
122
  if (decision.action === "fail") {
123
+ pendingDirection.set(null);
113
124
  stateManager.fail();
114
125
  return;
115
126
  }
@@ -119,12 +130,9 @@ export const usePanActivation = ({
119
130
  }
120
131
 
121
132
  if (decision.direction) {
122
- const { gestures } = resolvedRuntime.stores;
123
- gestures.active.set(decision.direction);
124
- gestures.direction.set(decision.direction);
133
+ pendingDirection.set(decision.direction);
125
134
  }
126
135
 
127
- gestureCompositionOwner.set("pan");
128
136
  stateManager.activate();
129
137
  },
130
138
  [
@@ -134,6 +142,7 @@ export const usePanActivation = ({
134
142
  dimensions,
135
143
  gestureActivationState,
136
144
  initialTouch,
145
+ pendingDirection,
137
146
  runtime,
138
147
  screenOptions,
139
148
  scrollState,
@@ -142,7 +151,7 @@ export const usePanActivation = ({
142
151
  );
143
152
 
144
153
  return useMemo(
145
- () => ({ onTouchesDown, onTouchesMove }),
146
- [onTouchesDown, onTouchesMove],
154
+ () => ({ onTouchesDown, onTouchesMove, pendingDirection }),
155
+ [onTouchesDown, onTouchesMove, pendingDirection],
147
156
  );
148
157
  };
@@ -1,6 +1,7 @@
1
1
  import { useCallback, useMemo } from "react";
2
2
  import type { SharedValue } from "react-native-reanimated";
3
3
  import { useNavigationHelpers } from "../../../../../hooks/navigation/use-navigation-helpers";
4
+ import type { Direction } from "../../../../../types/ownership.types";
4
5
  import type { ScreenOptionsContextValue } from "../../../options";
5
6
  import { usePanGestureSensitivity } from "../../hooks/use-gesture-sensitivity";
6
7
  import { resolvePanRuntime } from "../../shared/runtime";
@@ -28,6 +29,7 @@ export const usePanBehavior = (
28
29
  screenOptions: ScreenOptionsContextValue,
29
30
  dimensions: GestureDimensions,
30
31
  gestureCompositionOwner: SharedValue<GestureCompositionOwner>,
32
+ pendingDirection: SharedValue<Direction | null>,
31
33
  ): PanBehavior => {
32
34
  const { dismissScreen, requestDismiss } = useNavigationHelpers();
33
35
  const { withSensitivity, resetSensitivity } =
@@ -38,16 +40,31 @@ export const usePanBehavior = (
38
40
  const latestRuntime = resolvePanRuntime(runtime.get(), screenOptions.get());
39
41
  if (gestureCompositionOwner.get() === "pinch") {
40
42
  clearPanTrackingValues(latestRuntime.stores.gestures);
43
+ pendingDirection.set(null);
41
44
  resetSensitivity();
42
45
  return;
43
46
  }
44
47
 
48
+ const direction = pendingDirection.get();
49
+ if (direction) {
50
+ latestRuntime.stores.gestures.active.set(direction);
51
+ latestRuntime.stores.gestures.direction.set(direction);
52
+ }
53
+ pendingDirection.set(null);
54
+ gestureCompositionOwner.set("pan");
55
+
45
56
  if (latestRuntime.participation.effectiveSnapPoints.hasSnapPoints) {
46
57
  primeSnapPanRelease(latestRuntime);
47
58
  }
48
59
  startPanBase(latestRuntime);
49
60
  resetSensitivity();
50
- }, [runtime, screenOptions, resetSensitivity, gestureCompositionOwner]);
61
+ }, [
62
+ runtime,
63
+ screenOptions,
64
+ resetSensitivity,
65
+ gestureCompositionOwner,
66
+ pendingDirection,
67
+ ]);
51
68
 
52
69
  const onUpdate = useCallback(
53
70
  (rawEvent: PanGestureEvent) => {
@@ -50,6 +50,7 @@ export const useBuildPanGesture = ({
50
50
  screenOptions,
51
51
  dimensions,
52
52
  gestureCompositionOwner,
53
+ activation.pendingDirection,
53
54
  );
54
55
 
55
56
  const panGesture = useMemo(() => {
@@ -4,10 +4,36 @@ import type {
4
4
  GestureTouchEvent,
5
5
  } from "react-native-gesture-handler";
6
6
  import type { SharedValue } from "react-native-reanimated";
7
+ import type { GestureStoreMap } from "../../../../../stores/gesture.store";
7
8
  import type { ScreenOptionsContextValue } from "../../../options";
8
9
  import { resolvePinchRuntime } from "../../shared/runtime";
9
10
  import type { GestureCompositionOwner, PinchGestureRuntime } from "../../types";
10
11
 
12
+ export const updateAbsolutePinchFocalPoint = (
13
+ event: GestureTouchEvent,
14
+ gestures: GestureStoreMap,
15
+ captureOrigin: boolean,
16
+ ) => {
17
+ "worklet";
18
+ const firstTouch = event.allTouches[0];
19
+ const secondTouch = event.allTouches[1];
20
+
21
+ if (!firstTouch || !secondTouch) {
22
+ return;
23
+ }
24
+
25
+ const focalX = (firstTouch.absoluteX + secondTouch.absoluteX) / 2;
26
+ const focalY = (firstTouch.absoluteY + secondTouch.absoluteY) / 2;
27
+
28
+ gestures.focalX.set(focalX);
29
+ gestures.focalY.set(focalY);
30
+
31
+ if (captureOrigin) {
32
+ gestures.pinchOriginX.set(focalX);
33
+ gestures.pinchOriginY.set(focalY);
34
+ }
35
+ };
36
+
11
37
  interface UsePinchActivationProps {
12
38
  runtime: SharedValue<PinchGestureRuntime>;
13
39
  screenOptions: ScreenOptionsContextValue;
@@ -25,10 +51,11 @@ export const usePinchActivation = ({
25
51
  stateManager: GestureStateManager | undefined,
26
52
  ) => {
27
53
  "worklet";
28
- const { participation, policy } = resolvePinchRuntime(
54
+ const latestRuntime = resolvePinchRuntime(
29
55
  runtime.get(),
30
56
  screenOptions.get(),
31
57
  );
58
+ const { participation, policy } = latestRuntime;
32
59
 
33
60
  if (!participation.canTrackGesture || !policy.enabled) {
34
61
  stateManager?.fail();
@@ -36,6 +63,11 @@ export const usePinchActivation = ({
36
63
  }
37
64
 
38
65
  if (event.numberOfTouches === 2) {
66
+ updateAbsolutePinchFocalPoint(
67
+ event,
68
+ latestRuntime.stores.gestures,
69
+ true,
70
+ );
39
71
  if (gestureCompositionOwner.get() === null) {
40
72
  gestureCompositionOwner.set("pinch");
41
73
  }
@@ -53,10 +85,11 @@ export const usePinchActivation = ({
53
85
  const onTouchesMove = useCallback(
54
86
  (event: GestureTouchEvent, stateManager: GestureStateManager) => {
55
87
  "worklet";
56
- const { participation, policy } = resolvePinchRuntime(
88
+ const latestRuntime = resolvePinchRuntime(
57
89
  runtime.get(),
58
90
  screenOptions.get(),
59
91
  );
92
+ const { participation, policy } = latestRuntime;
60
93
 
61
94
  if (!participation.canTrackGesture || !policy.enabled) {
62
95
  stateManager.fail();
@@ -64,6 +97,11 @@ export const usePinchActivation = ({
64
97
  }
65
98
 
66
99
  if (event.numberOfTouches === 2) {
100
+ updateAbsolutePinchFocalPoint(
101
+ event,
102
+ latestRuntime.stores.gestures,
103
+ false,
104
+ );
67
105
  if (gestureCompositionOwner.get() === null) {
68
106
  gestureCompositionOwner.set("pinch");
69
107
  }
@@ -13,10 +13,7 @@ import type {
13
13
  } from "../../types";
14
14
  import { resetPinchGestureValues } from "./pinch-reset";
15
15
 
16
- export const startPinchBase = (
17
- runtime: PinchGestureRuntime,
18
- event: PinchGestureEvent,
19
- ) => {
16
+ export const startPinchBase = (runtime: PinchGestureRuntime) => {
20
17
  "worklet";
21
18
  const {
22
19
  stores: { gestures, animations },
@@ -38,8 +35,6 @@ export const startPinchBase = (
38
35
  gestures.direction.set(null);
39
36
  gestures.velocity.set(0);
40
37
  clearTransformTrackingValues(gestures);
41
- gestures.focalX.set(event.focalX);
42
- gestures.focalY.set(event.focalY);
43
38
  gestures.internal.progressBaseline.set(animations.transitionProgress.get());
44
39
  };
45
40
 
@@ -56,13 +51,14 @@ export const trackPinchGesture = (
56
51
 
57
52
  gestures.scale.set(scale);
58
53
  gestures.normScale.set(normScale);
59
- gestures.focalX.set(event.focalX);
60
- gestures.focalY.set(event.focalY);
61
54
  gestures.raw.scale.set(rawScale);
62
55
  gestures.raw.normScale.set(rawNormScale);
63
- gestures.active.set(
64
- normScale < 0 ? "pinch-in" : normScale > 0 ? "pinch-out" : null,
65
- );
56
+
57
+ if (gestures.active.get() === null) {
58
+ gestures.active.set(
59
+ normScale < 0 ? "pinch-in" : normScale > 0 ? "pinch-out" : null,
60
+ );
61
+ }
66
62
 
67
63
  return {
68
64
  scale,
@@ -30,21 +30,18 @@ export const usePinchBehavior = (
30
30
  const { withSensitivity, resetSensitivity } =
31
31
  usePinchGestureSensitivity(screenOptions);
32
32
 
33
- const onStart = useCallback(
34
- (event: PinchGestureEvent) => {
35
- "worklet";
36
- const latestRuntime = resolvePinchRuntime(
37
- runtime.get(),
38
- screenOptions.get(),
39
- );
40
- if (latestRuntime.participation.effectiveSnapPoints.hasSnapPoints) {
41
- primeSnapPinchRelease(latestRuntime);
42
- }
43
- startPinchBase(latestRuntime, event);
44
- resetSensitivity();
45
- },
46
- [runtime, screenOptions, resetSensitivity],
47
- );
33
+ const onStart = useCallback(() => {
34
+ "worklet";
35
+ const latestRuntime = resolvePinchRuntime(
36
+ runtime.get(),
37
+ screenOptions.get(),
38
+ );
39
+ if (latestRuntime.participation.effectiveSnapPoints.hasSnapPoints) {
40
+ primeSnapPinchRelease(latestRuntime);
41
+ }
42
+ startPinchBase(latestRuntime);
43
+ resetSensitivity();
44
+ }, [runtime, screenOptions, resetSensitivity]);
48
45
 
49
46
  const onUpdate = useCallback(
50
47
  (rawEvent: PinchGestureEvent) => {
@@ -214,7 +214,12 @@ export const useScrollGestureCoordination = (
214
214
  }
215
215
 
216
216
  for (const pinchGesture of pinchGestures) {
217
- gesture = gesture.requireExternalGestureToFail({
217
+ // A pinch must remain possible after the first finger lands. Making
218
+ // native scrolling wait for it to fail therefore stalls ordinary
219
+ // one-finger scrolling until touch-up. Let both recognizers run:
220
+ // the ScrollView can begin immediately, while a second finger can
221
+ // still promote the screen gesture to a pinch.
222
+ gesture = gesture.simultaneousWithExternalGesture({
218
223
  current: pinchGesture as unknown as GestureType,
219
224
  });
220
225
  }
@@ -20,6 +20,8 @@ export const snapshotGestureHandoff = (
20
20
  snapshot.normScale.set(gestures.normScale.get());
21
21
  snapshot.focalX.set(gestures.focalX.get());
22
22
  snapshot.focalY.set(gestures.focalY.get());
23
+ snapshot.pinchOriginX.set(gestures.pinchOriginX.get());
24
+ snapshot.pinchOriginY.set(gestures.pinchOriginY.get());
23
25
  snapshot.rotation.set(gestures.rotation.get());
24
26
  snapshot.raw.x.set(gestures.raw.x.get());
25
27
  snapshot.raw.y.set(gestures.raw.y.get());
@@ -34,6 +34,8 @@ export const clearFocalPoint = (gestures: GestureStoreMap) => {
34
34
  "worklet";
35
35
  gestures.focalX.set(0);
36
36
  gestures.focalY.set(0);
37
+ gestures.pinchOriginX.set(0);
38
+ gestures.pinchOriginY.set(0);
37
39
  };
38
40
 
39
41
  export const clearRawTransformValues = (gestures: GestureStoreMap) => {
@@ -14,7 +14,7 @@ import { resolveScreenVisibilityGate } from "../helpers/visibility-gate";
14
14
  export const useMaybeBlockVisibility = (isFloatingOverlay?: boolean) => {
15
15
  const { height } = useWindowDimensions();
16
16
  const { currentScreenKey } = useDescriptorDerivations();
17
- const { entering, transitionProgress } =
17
+ const { closing, entering, progressAnimating, transitionProgress } =
18
18
  AnimationStore.getBag(currentScreenKey);
19
19
  const { pendingLifecycleStartBlockCount, pendingLifecycleRequestKind } =
20
20
  SystemStore.getBag(currentScreenKey);
@@ -49,6 +49,19 @@ export const useMaybeBlockVisibility = (isFloatingOverlay?: boolean) => {
49
49
  const animatedStyle = useAnimatedStyle(() => {
50
50
  "worklet";
51
51
  const offset = getVisibilityBlockOffset(height);
52
+ // Keep opacity out of normal rendering so effects such as Liquid Glass
53
+ // retain native compositing. Once closing has fully finished, hiding the
54
+ // outgoing screen lets the handoff settle before React removes its host.
55
+ const shouldHideClosedScreen =
56
+ closing.get() === 1 &&
57
+ transitionProgress.get() <= 0 &&
58
+ progressAnimating.get() === 0;
59
+
60
+ if (shouldHideClosedScreen) {
61
+ return {
62
+ opacity: 0,
63
+ };
64
+ }
52
65
 
53
66
  return {
54
67
  transform: [
@@ -29,6 +29,8 @@ type GestureSnapshotStoreMap = {
29
29
  normScale: SharedValue<number>;
30
30
  focalX: SharedValue<number>;
31
31
  focalY: SharedValue<number>;
32
+ pinchOriginX: SharedValue<number>;
33
+ pinchOriginY: SharedValue<number>;
32
34
  rotation: SharedValue<number>;
33
35
  raw: GestureRawStoreMap;
34
36
  active: SharedValue<ActiveGesture | null>;
@@ -53,6 +55,8 @@ export type GestureStoreMap = {
53
55
  normScale: SharedValue<number>;
54
56
  focalX: SharedValue<number>;
55
57
  focalY: SharedValue<number>;
58
+ pinchOriginX: SharedValue<number>;
59
+ pinchOriginY: SharedValue<number>;
56
60
  rotation: SharedValue<number>;
57
61
  raw: GestureRawStoreMap;
58
62
  internal: GestureInternalStoreMap;
@@ -105,6 +109,8 @@ function createGestureBag(): GestureStoreMap {
105
109
  normScale,
106
110
  focalX: makeMutable(0),
107
111
  focalY: makeMutable(0),
112
+ pinchOriginX: makeMutable(0),
113
+ pinchOriginY: makeMutable(0),
108
114
  rotation: makeMutable(0),
109
115
  raw: {
110
116
  x: makeMutable(0),
@@ -130,6 +136,8 @@ function createGestureBag(): GestureStoreMap {
130
136
  normScale: makeMutable(0),
131
137
  focalX: makeMutable(0),
132
138
  focalY: makeMutable(0),
139
+ pinchOriginX: makeMutable(0),
140
+ pinchOriginY: makeMutable(0),
133
141
  rotation: makeMutable(0),
134
142
  raw: {
135
143
  x: makeMutable(0),
@@ -177,6 +185,8 @@ export const GestureStore = createStore<GestureStoreMap>({
177
185
  cancelAnimation(bag.normScale);
178
186
  cancelAnimation(bag.focalX);
179
187
  cancelAnimation(bag.focalY);
188
+ cancelAnimation(bag.pinchOriginX);
189
+ cancelAnimation(bag.pinchOriginY);
180
190
  cancelAnimation(bag.rotation);
181
191
  cancelAnimation(bag.raw.x);
182
192
  cancelAnimation(bag.raw.y);
@@ -198,6 +208,8 @@ export const GestureStore = createStore<GestureStoreMap>({
198
208
  cancelAnimation(bag.internal.snapshot.normScale);
199
209
  cancelAnimation(bag.internal.snapshot.focalX);
200
210
  cancelAnimation(bag.internal.snapshot.focalY);
211
+ cancelAnimation(bag.internal.snapshot.pinchOriginX);
212
+ cancelAnimation(bag.internal.snapshot.pinchOriginY);
201
213
  cancelAnimation(bag.internal.snapshot.rotation);
202
214
  cancelAnimation(bag.internal.snapshot.raw.x);
203
215
  cancelAnimation(bag.internal.snapshot.raw.y);