react-native-gesture-handler 2.22.1 → 2.23.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (677) hide show
  1. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.kt +14 -0
  2. package/android/src/main/jni/cpp-adapter.cpp +19 -12
  3. package/apple/RNGestureHandler.mm +15 -8
  4. package/apple/RNGestureHandlerModule.mm +17 -5
  5. package/lib/commonjs/ActionType.js +3 -3
  6. package/lib/commonjs/ActionType.js.map +1 -1
  7. package/lib/commonjs/Directions.js +11 -8
  8. package/lib/commonjs/Directions.js.map +1 -1
  9. package/lib/commonjs/EnableNewWebImplementation.js +2 -10
  10. package/lib/commonjs/EnableNewWebImplementation.js.map +1 -1
  11. package/lib/commonjs/GestureHandlerRootViewContext.js +2 -7
  12. package/lib/commonjs/GestureHandlerRootViewContext.js.map +1 -1
  13. package/lib/commonjs/PlatformConstants.js +1 -6
  14. package/lib/commonjs/PlatformConstants.js.map +1 -1
  15. package/lib/commonjs/PlatformConstants.web.js +1 -3
  16. package/lib/commonjs/PlatformConstants.web.js.map +1 -1
  17. package/lib/commonjs/PointerType.js +3 -5
  18. package/lib/commonjs/PointerType.js.map +1 -1
  19. package/lib/commonjs/RNGestureHandlerModule.js +2 -6
  20. package/lib/commonjs/RNGestureHandlerModule.js.map +1 -1
  21. package/lib/commonjs/RNGestureHandlerModule.web.js +13 -39
  22. package/lib/commonjs/RNGestureHandlerModule.web.js.map +1 -1
  23. package/lib/commonjs/RNGestureHandlerModule.windows.js +22 -32
  24. package/lib/commonjs/RNGestureHandlerModule.windows.js.map +1 -1
  25. package/lib/commonjs/RNRenderer.js +1 -3
  26. package/lib/commonjs/RNRenderer.js.map +1 -1
  27. package/lib/commonjs/RNRenderer.web.js +1 -2
  28. package/lib/commonjs/RNRenderer.web.js.map +1 -1
  29. package/lib/commonjs/State.js +4 -3
  30. package/lib/commonjs/State.js.map +1 -1
  31. package/lib/commonjs/TouchEventType.js +3 -3
  32. package/lib/commonjs/TouchEventType.js.map +1 -1
  33. package/lib/commonjs/components/DrawerLayout.js +96 -115
  34. package/lib/commonjs/components/DrawerLayout.js.map +1 -1
  35. package/lib/commonjs/components/GestureButtons.js +36 -80
  36. package/lib/commonjs/components/GestureButtons.js.map +1 -1
  37. package/lib/commonjs/components/GestureButtonsProps.js.map +1 -1
  38. package/lib/commonjs/components/GestureComponents.js +26 -37
  39. package/lib/commonjs/components/GestureComponents.js.map +1 -1
  40. package/lib/commonjs/components/GestureComponents.web.js +13 -27
  41. package/lib/commonjs/components/GestureComponents.web.js.map +1 -1
  42. package/lib/commonjs/components/GestureHandlerButton.js +2 -6
  43. package/lib/commonjs/components/GestureHandlerButton.js.map +1 -1
  44. package/lib/commonjs/components/GestureHandlerButton.web.js +4 -12
  45. package/lib/commonjs/components/GestureHandlerButton.web.js.map +1 -1
  46. package/lib/commonjs/components/GestureHandlerRootView.android.js +4 -15
  47. package/lib/commonjs/components/GestureHandlerRootView.android.js.map +1 -1
  48. package/lib/commonjs/components/GestureHandlerRootView.js +4 -14
  49. package/lib/commonjs/components/GestureHandlerRootView.js.map +1 -1
  50. package/lib/commonjs/components/GestureHandlerRootView.web.js +4 -13
  51. package/lib/commonjs/components/GestureHandlerRootView.web.js.map +1 -1
  52. package/lib/commonjs/components/Pressable/Pressable.js +46 -78
  53. package/lib/commonjs/components/Pressable/Pressable.js.map +1 -1
  54. package/lib/commonjs/components/Pressable/PressableProps.js.map +1 -1
  55. package/lib/commonjs/components/Pressable/index.js +1 -3
  56. package/lib/commonjs/components/Pressable/index.js.map +1 -1
  57. package/lib/commonjs/components/Pressable/utils.js +5 -20
  58. package/lib/commonjs/components/Pressable/utils.js.map +1 -1
  59. package/lib/commonjs/components/ReanimatedDrawerLayout.js +38 -76
  60. package/lib/commonjs/components/ReanimatedDrawerLayout.js.map +1 -1
  61. package/lib/commonjs/components/ReanimatedSwipeable.js +61 -59
  62. package/lib/commonjs/components/ReanimatedSwipeable.js.map +1 -1
  63. package/lib/commonjs/components/Swipeable.js +34 -75
  64. package/lib/commonjs/components/Swipeable.js.map +1 -1
  65. package/lib/commonjs/components/Text.js +18 -26
  66. package/lib/commonjs/components/Text.js.map +1 -1
  67. package/lib/commonjs/components/gestureHandlerRootHOC.js +5 -14
  68. package/lib/commonjs/components/gestureHandlerRootHOC.js.map +1 -1
  69. package/lib/commonjs/components/touchables/GenericTouchable.js +40 -76
  70. package/lib/commonjs/components/touchables/GenericTouchable.js.map +1 -1
  71. package/lib/commonjs/components/touchables/GenericTouchableProps.js.map +1 -1
  72. package/lib/commonjs/components/touchables/TouchableHighlight.js +20 -33
  73. package/lib/commonjs/components/touchables/TouchableHighlight.js.map +1 -1
  74. package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js +17 -31
  75. package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js.map +1 -1
  76. package/lib/commonjs/components/touchables/TouchableNativeFeedback.js +5 -4
  77. package/lib/commonjs/components/touchables/TouchableNativeFeedback.js.map +1 -1
  78. package/lib/commonjs/components/touchables/TouchableNativeFeedbackProps.js.map +1 -1
  79. package/lib/commonjs/components/touchables/TouchableOpacity.js +17 -24
  80. package/lib/commonjs/components/touchables/TouchableOpacity.js.map +1 -1
  81. package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js +12 -13
  82. package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js.map +1 -1
  83. package/lib/commonjs/components/touchables/index.js +7 -12
  84. package/lib/commonjs/components/touchables/index.js.map +1 -1
  85. package/lib/commonjs/findNodeHandle.js +1 -4
  86. package/lib/commonjs/findNodeHandle.js.map +1 -1
  87. package/lib/commonjs/findNodeHandle.web.js +9 -10
  88. package/lib/commonjs/findNodeHandle.web.js.map +1 -1
  89. package/lib/commonjs/getReactNativeVersion.js +1 -6
  90. package/lib/commonjs/getReactNativeVersion.js.map +1 -1
  91. package/lib/commonjs/getReactNativeVersion.web.js +0 -1
  92. package/lib/commonjs/getReactNativeVersion.web.js.map +1 -1
  93. package/lib/commonjs/getShadowNodeFromRef.js +13 -14
  94. package/lib/commonjs/getShadowNodeFromRef.js.map +1 -1
  95. package/lib/commonjs/getShadowNodeFromRef.web.js +0 -1
  96. package/lib/commonjs/getShadowNodeFromRef.web.js.map +1 -1
  97. package/lib/commonjs/ghQueueMicrotask.js +1 -2
  98. package/lib/commonjs/ghQueueMicrotask.js.map +1 -1
  99. package/lib/commonjs/handlers/FlingGestureHandler.js +16 -10
  100. package/lib/commonjs/handlers/FlingGestureHandler.js.map +1 -1
  101. package/lib/commonjs/handlers/ForceTouchGestureHandler.js +20 -23
  102. package/lib/commonjs/handlers/ForceTouchGestureHandler.js.map +1 -1
  103. package/lib/commonjs/handlers/GestureHandlerEventPayload.js.map +1 -1
  104. package/lib/commonjs/handlers/LongPressGestureHandler.js +16 -10
  105. package/lib/commonjs/handlers/LongPressGestureHandler.js.map +1 -1
  106. package/lib/commonjs/handlers/NativeViewGestureHandler.js +17 -12
  107. package/lib/commonjs/handlers/NativeViewGestureHandler.js.map +1 -1
  108. package/lib/commonjs/handlers/PanGestureHandler.js +20 -31
  109. package/lib/commonjs/handlers/PanGestureHandler.js.map +1 -1
  110. package/lib/commonjs/handlers/PinchGestureHandler.js +14 -8
  111. package/lib/commonjs/handlers/PinchGestureHandler.js.map +1 -1
  112. package/lib/commonjs/handlers/PressabilityDebugView.js +0 -1
  113. package/lib/commonjs/handlers/PressabilityDebugView.js.map +1 -1
  114. package/lib/commonjs/handlers/PressabilityDebugView.web.js +0 -1
  115. package/lib/commonjs/handlers/PressabilityDebugView.web.js.map +1 -1
  116. package/lib/commonjs/handlers/RotationGestureHandler.js +14 -8
  117. package/lib/commonjs/handlers/RotationGestureHandler.js.map +1 -1
  118. package/lib/commonjs/handlers/TapGestureHandler.js +16 -10
  119. package/lib/commonjs/handlers/TapGestureHandler.js.map +1 -1
  120. package/lib/commonjs/handlers/createHandler.js +55 -135
  121. package/lib/commonjs/handlers/createHandler.js.map +1 -1
  122. package/lib/commonjs/handlers/createNativeWrapper.js +17 -27
  123. package/lib/commonjs/handlers/createNativeWrapper.js.map +1 -1
  124. package/lib/commonjs/handlers/customDirectEventTypes.js +0 -1
  125. package/lib/commonjs/handlers/customDirectEventTypes.js.map +1 -1
  126. package/lib/commonjs/handlers/customDirectEventTypes.web.js +1 -2
  127. package/lib/commonjs/handlers/customDirectEventTypes.web.js.map +1 -1
  128. package/lib/commonjs/handlers/gestureHandlerCommon.js +9 -10
  129. package/lib/commonjs/handlers/gestureHandlerCommon.js.map +1 -1
  130. package/lib/commonjs/handlers/gestureHandlerTypesCompat.js.map +1 -1
  131. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.js +5 -14
  132. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.js.map +1 -1
  133. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.web.js +10 -20
  134. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.web.js.map +1 -1
  135. package/lib/commonjs/handlers/gestures/GestureDetector/attachHandlers.js +9 -29
  136. package/lib/commonjs/handlers/gestures/GestureDetector/attachHandlers.js.map +1 -1
  137. package/lib/commonjs/handlers/gestures/GestureDetector/dropHandlers.js +1 -10
  138. package/lib/commonjs/handlers/gestures/GestureDetector/dropHandlers.js.map +1 -1
  139. package/lib/commonjs/handlers/gestures/GestureDetector/index.js +12 -37
  140. package/lib/commonjs/handlers/gestures/GestureDetector/index.js.map +1 -1
  141. package/lib/commonjs/handlers/gestures/GestureDetector/needsToReattach.js +0 -3
  142. package/lib/commonjs/handlers/gestures/GestureDetector/needsToReattach.js.map +1 -1
  143. package/lib/commonjs/handlers/gestures/GestureDetector/types.js.map +1 -1
  144. package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js +12 -24
  145. package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js.map +1 -1
  146. package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js +12 -48
  147. package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +1 -1
  148. package/lib/commonjs/handlers/gestures/GestureDetector/useDetectorUpdater.js +3 -13
  149. package/lib/commonjs/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +1 -1
  150. package/lib/commonjs/handlers/gestures/GestureDetector/useMountReactions.js +2 -9
  151. package/lib/commonjs/handlers/gestures/GestureDetector/useMountReactions.js.map +1 -1
  152. package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js +8 -16
  153. package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -1
  154. package/lib/commonjs/handlers/gestures/GestureDetector/utils.js +28 -56
  155. package/lib/commonjs/handlers/gestures/GestureDetector/utils.js.map +1 -1
  156. package/lib/commonjs/handlers/gestures/eventReceiver.js +14 -46
  157. package/lib/commonjs/handlers/gestures/eventReceiver.js.map +1 -1
  158. package/lib/commonjs/handlers/gestures/flingGesture.js +5 -12
  159. package/lib/commonjs/handlers/gestures/flingGesture.js.map +1 -1
  160. package/lib/commonjs/handlers/gestures/forceTouchGesture.js +8 -19
  161. package/lib/commonjs/handlers/gestures/forceTouchGesture.js.map +1 -1
  162. package/lib/commonjs/handlers/gestures/gesture.js +44 -84
  163. package/lib/commonjs/handlers/gestures/gesture.js.map +1 -1
  164. package/lib/commonjs/handlers/gestures/gestureComposition.js +17 -31
  165. package/lib/commonjs/handlers/gestures/gestureComposition.js.map +1 -1
  166. package/lib/commonjs/handlers/gestures/gestureObjects.js +1 -27
  167. package/lib/commonjs/handlers/gestures/gestureObjects.js.map +1 -1
  168. package/lib/commonjs/handlers/gestures/gestureStateManager.js +3 -9
  169. package/lib/commonjs/handlers/gestures/gestureStateManager.js.map +1 -1
  170. package/lib/commonjs/handlers/gestures/gestureStateManager.web.js +2 -7
  171. package/lib/commonjs/handlers/gestures/gestureStateManager.web.js.map +1 -1
  172. package/lib/commonjs/handlers/gestures/hoverGesture.js +11 -25
  173. package/lib/commonjs/handlers/gestures/hoverGesture.js.map +1 -1
  174. package/lib/commonjs/handlers/gestures/longPressGesture.js +6 -14
  175. package/lib/commonjs/handlers/gestures/longPressGesture.js.map +1 -1
  176. package/lib/commonjs/handlers/gestures/manualGesture.js +0 -6
  177. package/lib/commonjs/handlers/gestures/manualGesture.js.map +1 -1
  178. package/lib/commonjs/handlers/gestures/nativeGesture.js +5 -12
  179. package/lib/commonjs/handlers/gestures/nativeGesture.js.map +1 -1
  180. package/lib/commonjs/handlers/gestures/panGesture.js +18 -43
  181. package/lib/commonjs/handlers/gestures/panGesture.js.map +1 -1
  182. package/lib/commonjs/handlers/gestures/pinchGesture.js +2 -9
  183. package/lib/commonjs/handlers/gestures/pinchGesture.js.map +1 -1
  184. package/lib/commonjs/handlers/gestures/reanimatedWrapper.js +1 -8
  185. package/lib/commonjs/handlers/gestures/reanimatedWrapper.js.map +1 -1
  186. package/lib/commonjs/handlers/gestures/rotationGesture.js +2 -9
  187. package/lib/commonjs/handlers/gestures/rotationGesture.js.map +1 -1
  188. package/lib/commonjs/handlers/gestures/tapGesture.js +10 -22
  189. package/lib/commonjs/handlers/gestures/tapGesture.js.map +1 -1
  190. package/lib/commonjs/handlers/getNextHandlerTag.js +0 -1
  191. package/lib/commonjs/handlers/getNextHandlerTag.js.map +1 -1
  192. package/lib/commonjs/handlers/handlersRegistry.js +11 -21
  193. package/lib/commonjs/handlers/handlersRegistry.js.map +1 -1
  194. package/lib/commonjs/handlers/utils.js +6 -26
  195. package/lib/commonjs/handlers/utils.js.map +1 -1
  196. package/lib/commonjs/index.js +75 -104
  197. package/lib/commonjs/index.js.map +1 -1
  198. package/lib/commonjs/init.js +4 -11
  199. package/lib/commonjs/init.js.map +1 -1
  200. package/lib/commonjs/jestUtils/index.js +4 -5
  201. package/lib/commonjs/jestUtils/index.js.map +1 -1
  202. package/lib/commonjs/jestUtils/jestUtils.js +19 -83
  203. package/lib/commonjs/jestUtils/jestUtils.js.map +1 -1
  204. package/lib/commonjs/mocks.js +5 -15
  205. package/lib/commonjs/mocks.js.map +1 -1
  206. package/lib/commonjs/mountRegistry.js +3 -12
  207. package/lib/commonjs/mountRegistry.js.map +1 -1
  208. package/lib/commonjs/specs/NativeRNGestureHandlerModule.js +1 -5
  209. package/lib/commonjs/specs/NativeRNGestureHandlerModule.js.map +1 -1
  210. package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js +2 -7
  211. package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js.map +1 -1
  212. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js +2 -7
  213. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js.map +1 -1
  214. package/lib/commonjs/typeUtils.js.map +1 -1
  215. package/lib/commonjs/utils.js +15 -30
  216. package/lib/commonjs/utils.js.map +1 -1
  217. package/lib/commonjs/web/Gestures.js +5 -23
  218. package/lib/commonjs/web/Gestures.js.map +1 -1
  219. package/lib/commonjs/web/constants.js +2 -4
  220. package/lib/commonjs/web/constants.js.map +1 -1
  221. package/lib/commonjs/web/detectors/RotationGestureDetector.js +26 -62
  222. package/lib/commonjs/web/detectors/RotationGestureDetector.js.map +1 -1
  223. package/lib/commonjs/web/detectors/ScaleGestureDetector.js +36 -65
  224. package/lib/commonjs/web/detectors/ScaleGestureDetector.js.map +1 -1
  225. package/lib/commonjs/web/handlers/FlingGestureHandler.js +12 -55
  226. package/lib/commonjs/web/handlers/FlingGestureHandler.js.map +1 -1
  227. package/lib/commonjs/web/handlers/GestureHandler.js +160 -273
  228. package/lib/commonjs/web/handlers/GestureHandler.js.map +1 -1
  229. package/lib/commonjs/web/handlers/HoverGestureHandler.js +8 -21
  230. package/lib/commonjs/web/handlers/HoverGestureHandler.js.map +1 -1
  231. package/lib/commonjs/web/handlers/IGestureHandler.js.map +1 -1
  232. package/lib/commonjs/web/handlers/LongPressGestureHandler.js +12 -53
  233. package/lib/commonjs/web/handlers/LongPressGestureHandler.js.map +1 -1
  234. package/lib/commonjs/web/handlers/ManualGestureHandler.js +1 -11
  235. package/lib/commonjs/web/handlers/ManualGestureHandler.js.map +1 -1
  236. package/lib/commonjs/web/handlers/NativeViewGestureHandler.js +21 -62
  237. package/lib/commonjs/web/handlers/NativeViewGestureHandler.js.map +1 -1
  238. package/lib/commonjs/web/handlers/PanGestureHandler.js +23 -138
  239. package/lib/commonjs/web/handlers/PanGestureHandler.js.map +1 -1
  240. package/lib/commonjs/web/handlers/PinchGestureHandler.js +19 -56
  241. package/lib/commonjs/web/handlers/PinchGestureHandler.js.map +1 -1
  242. package/lib/commonjs/web/handlers/RotationGestureHandler.js +16 -54
  243. package/lib/commonjs/web/handlers/RotationGestureHandler.js.map +1 -1
  244. package/lib/commonjs/web/handlers/TapGestureHandler.js +10 -71
  245. package/lib/commonjs/web/handlers/TapGestureHandler.js.map +1 -1
  246. package/lib/commonjs/web/interfaces.js +9 -17
  247. package/lib/commonjs/web/interfaces.js.map +1 -1
  248. package/lib/commonjs/web/tools/CircularBuffer.js +17 -29
  249. package/lib/commonjs/web/tools/CircularBuffer.js.map +1 -1
  250. package/lib/commonjs/web/tools/EventManager.js +7 -41
  251. package/lib/commonjs/web/tools/EventManager.js.map +1 -1
  252. package/lib/commonjs/web/tools/GestureHandlerDelegate.js.map +1 -1
  253. package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js +51 -118
  254. package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js.map +1 -1
  255. package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js +37 -58
  256. package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js.map +1 -1
  257. package/lib/commonjs/web/tools/InteractionManager.js +21 -40
  258. package/lib/commonjs/web/tools/InteractionManager.js.map +1 -1
  259. package/lib/commonjs/web/tools/KeyboardEventManager.js +4 -26
  260. package/lib/commonjs/web/tools/KeyboardEventManager.js.map +1 -1
  261. package/lib/commonjs/web/tools/LeastSquareSolver.js +30 -67
  262. package/lib/commonjs/web/tools/LeastSquareSolver.js.map +1 -1
  263. package/lib/commonjs/web/tools/NodeManager.js +9 -16
  264. package/lib/commonjs/web/tools/NodeManager.js.map +1 -1
  265. package/lib/commonjs/web/tools/PointerEventManager.js +10 -45
  266. package/lib/commonjs/web/tools/PointerEventManager.js.map +1 -1
  267. package/lib/commonjs/web/tools/PointerTracker.js +24 -60
  268. package/lib/commonjs/web/tools/PointerTracker.js.map +1 -1
  269. package/lib/commonjs/web/tools/Vector.js +3 -18
  270. package/lib/commonjs/web/tools/Vector.js.map +1 -1
  271. package/lib/commonjs/web/tools/VelocityTracker.js +10 -32
  272. package/lib/commonjs/web/tools/VelocityTracker.js.map +1 -1
  273. package/lib/commonjs/web/tools/WheelEventManager.js +4 -17
  274. package/lib/commonjs/web/tools/WheelEventManager.js.map +1 -1
  275. package/lib/commonjs/web/utils.js +26 -55
  276. package/lib/commonjs/web/utils.js.map +1 -1
  277. package/lib/commonjs/web_hammer/DiscreteGestureHandler.js +7 -19
  278. package/lib/commonjs/web_hammer/DiscreteGestureHandler.js.map +1 -1
  279. package/lib/commonjs/web_hammer/DraggingGestureHandler.js +3 -13
  280. package/lib/commonjs/web_hammer/DraggingGestureHandler.js.map +1 -1
  281. package/lib/commonjs/web_hammer/Errors.js +0 -3
  282. package/lib/commonjs/web_hammer/Errors.js.map +1 -1
  283. package/lib/commonjs/web_hammer/FlingGestureHandler.js +13 -44
  284. package/lib/commonjs/web_hammer/FlingGestureHandler.js.map +1 -1
  285. package/lib/commonjs/web_hammer/GestureHandler.js +55 -142
  286. package/lib/commonjs/web_hammer/GestureHandler.js.map +1 -1
  287. package/lib/commonjs/web_hammer/IndiscreteGestureHandler.js +2 -11
  288. package/lib/commonjs/web_hammer/IndiscreteGestureHandler.js.map +1 -1
  289. package/lib/commonjs/web_hammer/LongPressGestureHandler.js +5 -19
  290. package/lib/commonjs/web_hammer/LongPressGestureHandler.js.map +1 -1
  291. package/lib/commonjs/web_hammer/NativeViewGestureHandler.js +16 -24
  292. package/lib/commonjs/web_hammer/NativeViewGestureHandler.js.map +1 -1
  293. package/lib/commonjs/web_hammer/NodeManager.js +9 -16
  294. package/lib/commonjs/web_hammer/NodeManager.js.map +1 -1
  295. package/lib/commonjs/web_hammer/PanGestureHandler.js +8 -49
  296. package/lib/commonjs/web_hammer/PanGestureHandler.js.map +1 -1
  297. package/lib/commonjs/web_hammer/PinchGestureHandler.js +2 -11
  298. package/lib/commonjs/web_hammer/PinchGestureHandler.js.map +1 -1
  299. package/lib/commonjs/web_hammer/PressGestureHandler.js +15 -43
  300. package/lib/commonjs/web_hammer/PressGestureHandler.js.map +1 -1
  301. package/lib/commonjs/web_hammer/RotationGestureHandler.js +2 -13
  302. package/lib/commonjs/web_hammer/RotationGestureHandler.js.map +1 -1
  303. package/lib/commonjs/web_hammer/TapGestureHandler.js +33 -52
  304. package/lib/commonjs/web_hammer/TapGestureHandler.js.map +1 -1
  305. package/lib/commonjs/web_hammer/constants.js +13 -26
  306. package/lib/commonjs/web_hammer/constants.js.map +1 -1
  307. package/lib/commonjs/web_hammer/utils.js +4 -14
  308. package/lib/commonjs/web_hammer/utils.js.map +1 -1
  309. package/lib/module/ActionType.js +3 -1
  310. package/lib/module/ActionType.js.map +1 -1
  311. package/lib/module/Directions.js +9 -3
  312. package/lib/module/Directions.js.map +1 -1
  313. package/lib/module/EnableNewWebImplementation.js +2 -5
  314. package/lib/module/EnableNewWebImplementation.js.map +1 -1
  315. package/lib/module/GestureHandlerRootViewContext.js.map +1 -1
  316. package/lib/module/PlatformConstants.js +0 -1
  317. package/lib/module/PlatformConstants.js.map +1 -1
  318. package/lib/module/PlatformConstants.web.js +0 -1
  319. package/lib/module/PlatformConstants.web.js.map +1 -1
  320. package/lib/module/PointerType.js +3 -4
  321. package/lib/module/PointerType.js.map +1 -1
  322. package/lib/module/RNGestureHandlerModule.js +1 -0
  323. package/lib/module/RNGestureHandlerModule.js.map +1 -1
  324. package/lib/module/RNGestureHandlerModule.web.js +12 -22
  325. package/lib/module/RNGestureHandlerModule.web.js.map +1 -1
  326. package/lib/module/RNGestureHandlerModule.windows.js +18 -17
  327. package/lib/module/RNGestureHandlerModule.windows.js.map +1 -1
  328. package/lib/module/RNRenderer.js.map +1 -1
  329. package/lib/module/RNRenderer.web.js.map +1 -1
  330. package/lib/module/State.js +4 -1
  331. package/lib/module/State.js.map +1 -1
  332. package/lib/module/TouchEventType.js +3 -1
  333. package/lib/module/TouchEventType.js.map +1 -1
  334. package/lib/module/components/DrawerLayout.js +87 -99
  335. package/lib/module/components/DrawerLayout.js.map +1 -1
  336. package/lib/module/components/GestureButtons.js +27 -55
  337. package/lib/module/components/GestureButtons.js.map +1 -1
  338. package/lib/module/components/GestureButtonsProps.js.map +1 -1
  339. package/lib/module/components/GestureComponents.js +17 -12
  340. package/lib/module/components/GestureComponents.js.map +1 -1
  341. package/lib/module/components/GestureComponents.web.js +4 -4
  342. package/lib/module/components/GestureComponents.web.js.map +1 -1
  343. package/lib/module/components/GestureHandlerButton.js.map +1 -1
  344. package/lib/module/components/GestureHandlerButton.web.js +1 -2
  345. package/lib/module/components/GestureHandlerButton.web.js.map +1 -1
  346. package/lib/module/components/GestureHandlerRootView.android.js +1 -2
  347. package/lib/module/components/GestureHandlerRootView.android.js.map +1 -1
  348. package/lib/module/components/GestureHandlerRootView.js +1 -2
  349. package/lib/module/components/GestureHandlerRootView.js.map +1 -1
  350. package/lib/module/components/GestureHandlerRootView.web.js +1 -2
  351. package/lib/module/components/GestureHandlerRootView.web.js.map +1 -1
  352. package/lib/module/components/Pressable/Pressable.js +44 -61
  353. package/lib/module/components/Pressable/Pressable.js.map +1 -1
  354. package/lib/module/components/Pressable/PressableProps.js.map +1 -1
  355. package/lib/module/components/Pressable/index.js.map +1 -1
  356. package/lib/module/components/Pressable/utils.js +4 -14
  357. package/lib/module/components/Pressable/utils.js.map +1 -1
  358. package/lib/module/components/ReanimatedDrawerLayout.js +34 -56
  359. package/lib/module/components/ReanimatedDrawerLayout.js.map +1 -1
  360. package/lib/module/components/ReanimatedSwipeable.js +57 -44
  361. package/lib/module/components/ReanimatedSwipeable.js.map +1 -1
  362. package/lib/module/components/Swipeable.js +28 -59
  363. package/lib/module/components/Swipeable.js.map +1 -1
  364. package/lib/module/components/Text.js +14 -13
  365. package/lib/module/components/Text.js.map +1 -1
  366. package/lib/module/components/gestureHandlerRootHOC.js +2 -2
  367. package/lib/module/components/gestureHandlerRootHOC.js.map +1 -1
  368. package/lib/module/components/touchables/GenericTouchable.js +34 -63
  369. package/lib/module/components/touchables/GenericTouchable.js.map +1 -1
  370. package/lib/module/components/touchables/GenericTouchableProps.js.map +1 -1
  371. package/lib/module/components/touchables/TouchableHighlight.js +16 -23
  372. package/lib/module/components/touchables/TouchableHighlight.js.map +1 -1
  373. package/lib/module/components/touchables/TouchableNativeFeedback.android.js +11 -19
  374. package/lib/module/components/touchables/TouchableNativeFeedback.android.js.map +1 -1
  375. package/lib/module/components/touchables/TouchableNativeFeedback.js +6 -1
  376. package/lib/module/components/touchables/TouchableNativeFeedback.js.map +1 -1
  377. package/lib/module/components/touchables/TouchableNativeFeedbackProps.js.map +1 -1
  378. package/lib/module/components/touchables/TouchableOpacity.js +13 -14
  379. package/lib/module/components/touchables/TouchableOpacity.js.map +1 -1
  380. package/lib/module/components/touchables/TouchableWithoutFeedback.js +9 -2
  381. package/lib/module/components/touchables/TouchableWithoutFeedback.js.map +1 -1
  382. package/lib/module/components/touchables/index.js.map +1 -1
  383. package/lib/module/findNodeHandle.js.map +1 -1
  384. package/lib/module/findNodeHandle.web.js +9 -8
  385. package/lib/module/findNodeHandle.web.js.map +1 -1
  386. package/lib/module/getReactNativeVersion.js.map +1 -1
  387. package/lib/module/getReactNativeVersion.web.js.map +1 -1
  388. package/lib/module/getShadowNodeFromRef.js +13 -13
  389. package/lib/module/getShadowNodeFromRef.js.map +1 -1
  390. package/lib/module/getShadowNodeFromRef.web.js.map +1 -1
  391. package/lib/module/ghQueueMicrotask.js.map +1 -1
  392. package/lib/module/handlers/FlingGestureHandler.js +13 -0
  393. package/lib/module/handlers/FlingGestureHandler.js.map +1 -1
  394. package/lib/module/handlers/ForceTouchGestureHandler.js +16 -8
  395. package/lib/module/handlers/ForceTouchGestureHandler.js.map +1 -1
  396. package/lib/module/handlers/GestureHandlerEventPayload.js.map +1 -1
  397. package/lib/module/handlers/LongPressGestureHandler.js +13 -0
  398. package/lib/module/handlers/LongPressGestureHandler.js.map +1 -1
  399. package/lib/module/handlers/NativeViewGestureHandler.js +13 -0
  400. package/lib/module/handlers/NativeViewGestureHandler.js.map +1 -1
  401. package/lib/module/handlers/PanGestureHandler.js +15 -19
  402. package/lib/module/handlers/PanGestureHandler.js.map +1 -1
  403. package/lib/module/handlers/PinchGestureHandler.js +13 -0
  404. package/lib/module/handlers/PinchGestureHandler.js.map +1 -1
  405. package/lib/module/handlers/PressabilityDebugView.js.map +1 -1
  406. package/lib/module/handlers/PressabilityDebugView.web.js.map +1 -1
  407. package/lib/module/handlers/RotationGestureHandler.js +13 -0
  408. package/lib/module/handlers/RotationGestureHandler.js.map +1 -1
  409. package/lib/module/handlers/TapGestureHandler.js +13 -0
  410. package/lib/module/handlers/TapGestureHandler.js.map +1 -1
  411. package/lib/module/handlers/createHandler.js +54 -108
  412. package/lib/module/handlers/createHandler.js.map +1 -1
  413. package/lib/module/handlers/createNativeWrapper.js +12 -17
  414. package/lib/module/handlers/createNativeWrapper.js.map +1 -1
  415. package/lib/module/handlers/customDirectEventTypes.js.map +1 -1
  416. package/lib/module/handlers/customDirectEventTypes.web.js.map +1 -1
  417. package/lib/module/handlers/gestureHandlerCommon.js +9 -4
  418. package/lib/module/handlers/gestureHandlerCommon.js.map +1 -1
  419. package/lib/module/handlers/gestureHandlerTypesCompat.js.map +1 -1
  420. package/lib/module/handlers/gestures/GestureDetector/Wrap.js +3 -4
  421. package/lib/module/handlers/gestures/GestureDetector/Wrap.js.map +1 -1
  422. package/lib/module/handlers/gestures/GestureDetector/Wrap.web.js +5 -6
  423. package/lib/module/handlers/gestures/GestureDetector/Wrap.web.js.map +1 -1
  424. package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js +8 -16
  425. package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js.map +1 -1
  426. package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js +0 -1
  427. package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js.map +1 -1
  428. package/lib/module/handlers/gestures/GestureDetector/index.js +9 -15
  429. package/lib/module/handlers/gestures/GestureDetector/index.js.map +1 -1
  430. package/lib/module/handlers/gestures/GestureDetector/needsToReattach.js +0 -2
  431. package/lib/module/handlers/gestures/GestureDetector/needsToReattach.js.map +1 -1
  432. package/lib/module/handlers/gestures/GestureDetector/types.js.map +1 -1
  433. package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js +11 -14
  434. package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js.map +1 -1
  435. package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js +12 -39
  436. package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +1 -1
  437. package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js +5 -5
  438. package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +1 -1
  439. package/lib/module/handlers/gestures/GestureDetector/useMountReactions.js +2 -6
  440. package/lib/module/handlers/gestures/GestureDetector/useMountReactions.js.map +1 -1
  441. package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js +7 -9
  442. package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -1
  443. package/lib/module/handlers/gestures/GestureDetector/utils.js +25 -30
  444. package/lib/module/handlers/gestures/GestureDetector/utils.js.map +1 -1
  445. package/lib/module/handlers/gestures/eventReceiver.js +14 -38
  446. package/lib/module/handlers/gestures/eventReceiver.js.map +1 -1
  447. package/lib/module/handlers/gestures/flingGesture.js +5 -9
  448. package/lib/module/handlers/gestures/flingGesture.js.map +1 -1
  449. package/lib/module/handlers/gestures/forceTouchGesture.js +8 -17
  450. package/lib/module/handlers/gestures/forceTouchGesture.js.map +1 -1
  451. package/lib/module/handlers/gestures/gesture.js +44 -73
  452. package/lib/module/handlers/gestures/gesture.js.map +1 -1
  453. package/lib/module/handlers/gestures/gestureComposition.js +16 -24
  454. package/lib/module/handlers/gestures/gestureComposition.js.map +1 -1
  455. package/lib/module/handlers/gestures/gestureObjects.js +1 -14
  456. package/lib/module/handlers/gestures/gestureObjects.js.map +1 -1
  457. package/lib/module/handlers/gestures/gestureStateManager.js +3 -4
  458. package/lib/module/handlers/gestures/gestureStateManager.js.map +1 -1
  459. package/lib/module/handlers/gestures/gestureStateManager.web.js +0 -1
  460. package/lib/module/handlers/gestures/gestureStateManager.web.js.map +1 -1
  461. package/lib/module/handlers/gestures/hoverGesture.js +9 -18
  462. package/lib/module/handlers/gestures/hoverGesture.js.map +1 -1
  463. package/lib/module/handlers/gestures/longPressGesture.js +6 -11
  464. package/lib/module/handlers/gestures/longPressGesture.js.map +1 -1
  465. package/lib/module/handlers/gestures/manualGesture.js +0 -4
  466. package/lib/module/handlers/gestures/manualGesture.js.map +1 -1
  467. package/lib/module/handlers/gestures/nativeGesture.js +5 -9
  468. package/lib/module/handlers/gestures/nativeGesture.js.map +1 -1
  469. package/lib/module/handlers/gestures/panGesture.js +18 -41
  470. package/lib/module/handlers/gestures/panGesture.js.map +1 -1
  471. package/lib/module/handlers/gestures/pinchGesture.js +2 -7
  472. package/lib/module/handlers/gestures/pinchGesture.js.map +1 -1
  473. package/lib/module/handlers/gestures/reanimatedWrapper.js +0 -5
  474. package/lib/module/handlers/gestures/reanimatedWrapper.js.map +1 -1
  475. package/lib/module/handlers/gestures/rotationGesture.js +2 -7
  476. package/lib/module/handlers/gestures/rotationGesture.js.map +1 -1
  477. package/lib/module/handlers/gestures/tapGesture.js +10 -19
  478. package/lib/module/handlers/gestures/tapGesture.js.map +1 -1
  479. package/lib/module/handlers/getNextHandlerTag.js.map +1 -1
  480. package/lib/module/handlers/handlersRegistry.js +6 -8
  481. package/lib/module/handlers/handlersRegistry.js.map +1 -1
  482. package/lib/module/handlers/utils.js +4 -13
  483. package/lib/module/handlers/utils.js.map +1 -1
  484. package/lib/module/index.js.map +1 -1
  485. package/lib/module/init.js +3 -2
  486. package/lib/module/init.js.map +1 -1
  487. package/lib/module/jestUtils/index.js.map +1 -1
  488. package/lib/module/jestUtils/jestUtils.js +20 -66
  489. package/lib/module/jestUtils/jestUtils.js.map +1 -1
  490. package/lib/module/mocks.js +3 -7
  491. package/lib/module/mocks.js.map +1 -1
  492. package/lib/module/mountRegistry.js +3 -10
  493. package/lib/module/mountRegistry.js.map +1 -1
  494. package/lib/module/specs/NativeRNGestureHandlerModule.js.map +1 -1
  495. package/lib/module/specs/RNGestureHandlerButtonNativeComponent.js.map +1 -1
  496. package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.js.map +1 -1
  497. package/lib/module/typeUtils.js.map +1 -1
  498. package/lib/module/utils.js +8 -13
  499. package/lib/module/utils.js.map +1 -1
  500. package/lib/module/web/Gestures.js +2 -1
  501. package/lib/module/web/Gestures.js.map +1 -1
  502. package/lib/module/web/constants.js.map +1 -1
  503. package/lib/module/web/detectors/RotationGestureDetector.js +26 -59
  504. package/lib/module/web/detectors/RotationGestureDetector.js.map +1 -1
  505. package/lib/module/web/detectors/ScaleGestureDetector.js +36 -61
  506. package/lib/module/web/detectors/ScaleGestureDetector.js.map +1 -1
  507. package/lib/module/web/handlers/FlingGestureHandler.js +11 -45
  508. package/lib/module/web/handlers/FlingGestureHandler.js.map +1 -1
  509. package/lib/module/web/handlers/GestureHandler.js +159 -259
  510. package/lib/module/web/handlers/GestureHandler.js.map +1 -1
  511. package/lib/module/web/handlers/HoverGestureHandler.js +7 -13
  512. package/lib/module/web/handlers/HoverGestureHandler.js.map +1 -1
  513. package/lib/module/web/handlers/IGestureHandler.js.map +1 -1
  514. package/lib/module/web/handlers/LongPressGestureHandler.js +11 -46
  515. package/lib/module/web/handlers/LongPressGestureHandler.js.map +1 -1
  516. package/lib/module/web/handlers/ManualGestureHandler.js +0 -6
  517. package/lib/module/web/handlers/ManualGestureHandler.js.map +1 -1
  518. package/lib/module/web/handlers/NativeViewGestureHandler.js +20 -54
  519. package/lib/module/web/handlers/NativeViewGestureHandler.js.map +1 -1
  520. package/lib/module/web/handlers/PanGestureHandler.js +22 -129
  521. package/lib/module/web/handlers/PanGestureHandler.js.map +1 -1
  522. package/lib/module/web/handlers/PinchGestureHandler.js +18 -48
  523. package/lib/module/web/handlers/PinchGestureHandler.js.map +1 -1
  524. package/lib/module/web/handlers/RotationGestureHandler.js +15 -46
  525. package/lib/module/web/handlers/RotationGestureHandler.js.map +1 -1
  526. package/lib/module/web/handlers/TapGestureHandler.js +9 -63
  527. package/lib/module/web/handlers/TapGestureHandler.js.map +1 -1
  528. package/lib/module/web/interfaces.js +9 -14
  529. package/lib/module/web/interfaces.js.map +1 -1
  530. package/lib/module/web/tools/CircularBuffer.js +17 -27
  531. package/lib/module/web/tools/CircularBuffer.js.map +1 -1
  532. package/lib/module/web/tools/EventManager.js +7 -39
  533. package/lib/module/web/tools/EventManager.js.map +1 -1
  534. package/lib/module/web/tools/GestureHandlerDelegate.js.map +1 -1
  535. package/lib/module/web/tools/GestureHandlerOrchestrator.js +50 -111
  536. package/lib/module/web/tools/GestureHandlerOrchestrator.js.map +1 -1
  537. package/lib/module/web/tools/GestureHandlerWebDelegate.js +36 -47
  538. package/lib/module/web/tools/GestureHandlerWebDelegate.js.map +1 -1
  539. package/lib/module/web/tools/InteractionManager.js +21 -35
  540. package/lib/module/web/tools/InteractionManager.js.map +1 -1
  541. package/lib/module/web/tools/KeyboardEventManager.js +3 -19
  542. package/lib/module/web/tools/KeyboardEventManager.js.map +1 -1
  543. package/lib/module/web/tools/LeastSquareSolver.js +30 -65
  544. package/lib/module/web/tools/LeastSquareSolver.js.map +1 -1
  545. package/lib/module/web/tools/NodeManager.js +9 -14
  546. package/lib/module/web/tools/NodeManager.js.map +1 -1
  547. package/lib/module/web/tools/PointerEventManager.js +9 -35
  548. package/lib/module/web/tools/PointerEventManager.js.map +1 -1
  549. package/lib/module/web/tools/PointerTracker.js +23 -54
  550. package/lib/module/web/tools/PointerTracker.js.map +1 -1
  551. package/lib/module/web/tools/Vector.js +3 -14
  552. package/lib/module/web/tools/Vector.js.map +1 -1
  553. package/lib/module/web/tools/VelocityTracker.js +9 -26
  554. package/lib/module/web/tools/VelocityTracker.js.map +1 -1
  555. package/lib/module/web/tools/WheelEventManager.js +3 -10
  556. package/lib/module/web/tools/WheelEventManager.js.map +1 -1
  557. package/lib/module/web/utils.js +21 -40
  558. package/lib/module/web/utils.js.map +1 -1
  559. package/lib/module/web_hammer/DiscreteGestureHandler.js +4 -13
  560. package/lib/module/web_hammer/DiscreteGestureHandler.js.map +1 -1
  561. package/lib/module/web_hammer/DraggingGestureHandler.js +0 -5
  562. package/lib/module/web_hammer/DraggingGestureHandler.js.map +1 -1
  563. package/lib/module/web_hammer/Errors.js +0 -1
  564. package/lib/module/web_hammer/Errors.js.map +1 -1
  565. package/lib/module/web_hammer/FlingGestureHandler.js +10 -35
  566. package/lib/module/web_hammer/FlingGestureHandler.js.map +1 -1
  567. package/lib/module/web_hammer/GestureHandler.js +53 -130
  568. package/lib/module/web_hammer/GestureHandler.js.map +1 -1
  569. package/lib/module/web_hammer/IndiscreteGestureHandler.js +1 -6
  570. package/lib/module/web_hammer/IndiscreteGestureHandler.js.map +1 -1
  571. package/lib/module/web_hammer/LongPressGestureHandler.js +2 -11
  572. package/lib/module/web_hammer/LongPressGestureHandler.js.map +1 -1
  573. package/lib/module/web_hammer/NativeViewGestureHandler.js +12 -12
  574. package/lib/module/web_hammer/NativeViewGestureHandler.js.map +1 -1
  575. package/lib/module/web_hammer/NodeManager.js +6 -8
  576. package/lib/module/web_hammer/NodeManager.js.map +1 -1
  577. package/lib/module/web_hammer/PanGestureHandler.js +6 -40
  578. package/lib/module/web_hammer/PanGestureHandler.js.map +1 -1
  579. package/lib/module/web_hammer/PinchGestureHandler.js +0 -5
  580. package/lib/module/web_hammer/PinchGestureHandler.js.map +1 -1
  581. package/lib/module/web_hammer/PressGestureHandler.js +13 -34
  582. package/lib/module/web_hammer/PressGestureHandler.js.map +1 -1
  583. package/lib/module/web_hammer/RotationGestureHandler.js +0 -6
  584. package/lib/module/web_hammer/RotationGestureHandler.js.map +1 -1
  585. package/lib/module/web_hammer/TapGestureHandler.js +31 -45
  586. package/lib/module/web_hammer/TapGestureHandler.js.map +1 -1
  587. package/lib/module/web_hammer/constants.js +2 -1
  588. package/lib/module/web_hammer/constants.js.map +1 -1
  589. package/lib/module/web_hammer/utils.js +2 -2
  590. package/lib/module/web_hammer/utils.js.map +1 -1
  591. package/lib/typescript/components/DrawerLayout.d.ts +27 -0
  592. package/lib/typescript/components/GestureButtonsProps.d.ts +18 -2
  593. package/lib/typescript/components/Pressable/PressableProps.d.ts +3 -10
  594. package/lib/typescript/components/Pressable/index.d.ts +1 -1
  595. package/lib/typescript/components/ReanimatedSwipeable.d.ts +6 -0
  596. package/lib/typescript/components/touchables/TouchableHighlight.d.ts +5 -0
  597. package/lib/typescript/components/touchables/TouchableNativeFeedback.android.d.ts +2 -0
  598. package/lib/typescript/components/touchables/TouchableNativeFeedback.d.ts +5 -1
  599. package/lib/typescript/components/touchables/TouchableNativeFeedbackProps.d.ts +3 -0
  600. package/lib/typescript/components/touchables/TouchableOpacity.d.ts +5 -0
  601. package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts +6 -0
  602. package/lib/typescript/handlers/FlingGestureHandler.d.ts +9 -0
  603. package/lib/typescript/handlers/ForceTouchGestureHandler.d.ts +9 -0
  604. package/lib/typescript/handlers/LongPressGestureHandler.d.ts +9 -0
  605. package/lib/typescript/handlers/NativeViewGestureHandler.d.ts +9 -0
  606. package/lib/typescript/handlers/PanGestureHandler.d.ts +9 -0
  607. package/lib/typescript/handlers/PinchGestureHandler.d.ts +9 -0
  608. package/lib/typescript/handlers/RotationGestureHandler.d.ts +9 -0
  609. package/lib/typescript/handlers/TapGestureHandler.d.ts +9 -0
  610. package/lib/typescript/handlers/handlersRegistry.d.ts +1 -0
  611. package/lib/typescript/index.d.ts +1 -1
  612. package/lib/typescript/utils.d.ts +1 -1
  613. package/lib/typescript/web/detectors/RotationGestureDetector.d.ts +7 -7
  614. package/lib/typescript/web/detectors/ScaleGestureDetector.d.ts +8 -8
  615. package/lib/typescript/web/handlers/GestureHandler.d.ts +33 -28
  616. package/lib/typescript/web/handlers/IGestureHandler.d.ts +12 -13
  617. package/lib/typescript/web/tools/CircularBuffer.d.ts +3 -3
  618. package/lib/typescript/web/tools/GestureHandlerDelegate.d.ts +1 -1
  619. package/lib/typescript/web/tools/GestureHandlerOrchestrator.d.ts +2 -2
  620. package/lib/typescript/web/tools/GestureHandlerWebDelegate.d.ts +3 -2
  621. package/lib/typescript/web/tools/InteractionManager.d.ts +2 -2
  622. package/lib/typescript/web/tools/NodeManager.d.ts +1 -1
  623. package/lib/typescript/web/tools/PointerTracker.d.ts +4 -4
  624. package/lib/typescript/web/tools/VelocityTracker.d.ts +1 -1
  625. package/package.json +2 -2
  626. package/src/RNGestureHandlerModule.web.ts +2 -2
  627. package/src/components/DrawerLayout.tsx +29 -0
  628. package/src/components/GestureButtons.tsx +13 -2
  629. package/src/components/GestureButtonsProps.ts +31 -2
  630. package/src/components/Pressable/Pressable.tsx +22 -5
  631. package/src/components/Pressable/PressableProps.tsx +4 -11
  632. package/src/components/Pressable/index.ts +4 -1
  633. package/src/components/ReanimatedSwipeable.tsx +97 -66
  634. package/src/components/Text.tsx +13 -4
  635. package/src/components/touchables/TouchableHighlight.tsx +5 -0
  636. package/src/components/touchables/TouchableNativeFeedback.android.tsx +2 -0
  637. package/src/components/touchables/TouchableNativeFeedback.tsx +6 -1
  638. package/src/components/touchables/TouchableNativeFeedbackProps.tsx +3 -0
  639. package/src/components/touchables/TouchableOpacity.tsx +5 -0
  640. package/src/components/touchables/TouchableWithoutFeedback.tsx +6 -0
  641. package/src/findNodeHandle.web.ts +6 -0
  642. package/src/handlers/FlingGestureHandler.ts +10 -0
  643. package/src/handlers/ForceTouchGestureHandler.ts +9 -0
  644. package/src/handlers/LongPressGestureHandler.ts +10 -0
  645. package/src/handlers/NativeViewGestureHandler.ts +10 -0
  646. package/src/handlers/PanGestureHandler.ts +10 -0
  647. package/src/handlers/PinchGestureHandler.ts +10 -0
  648. package/src/handlers/RotationGestureHandler.ts +10 -0
  649. package/src/handlers/TapGestureHandler.ts +10 -0
  650. package/src/handlers/createHandler.tsx +11 -4
  651. package/src/handlers/gestures/GestureDetector/index.tsx +2 -2
  652. package/src/handlers/gestures/GestureDetector/useViewRefHandler.ts +3 -3
  653. package/src/handlers/gestures/GestureDetector/utils.ts +2 -2
  654. package/src/handlers/handlersRegistry.ts +7 -3
  655. package/src/index.ts +4 -1
  656. package/src/utils.ts +2 -2
  657. package/src/web/detectors/RotationGestureDetector.ts +22 -22
  658. package/src/web/detectors/ScaleGestureDetector.ts +24 -24
  659. package/src/web/handlers/FlingGestureHandler.ts +6 -7
  660. package/src/web/handlers/GestureHandler.ts +115 -105
  661. package/src/web/handlers/HoverGestureHandler.ts +2 -2
  662. package/src/web/handlers/IGestureHandler.ts +12 -13
  663. package/src/web/handlers/LongPressGestureHandler.ts +7 -7
  664. package/src/web/handlers/NativeViewGestureHandler.ts +14 -19
  665. package/src/web/handlers/PanGestureHandler.ts +17 -17
  666. package/src/web/handlers/PinchGestureHandler.ts +17 -21
  667. package/src/web/handlers/RotationGestureHandler.ts +12 -12
  668. package/src/web/handlers/TapGestureHandler.ts +4 -6
  669. package/src/web/tools/CircularBuffer.ts +15 -15
  670. package/src/web/tools/GestureHandlerDelegate.ts +1 -1
  671. package/src/web/tools/GestureHandlerOrchestrator.ts +42 -42
  672. package/src/web/tools/GestureHandlerWebDelegate.ts +32 -13
  673. package/src/web/tools/InteractionManager.ts +16 -16
  674. package/src/web/tools/NodeManager.ts +2 -2
  675. package/src/web/tools/PointerTracker.ts +20 -20
  676. package/src/web/tools/Vector.ts +1 -1
  677. package/src/web/tools/VelocityTracker.ts +1 -1
@@ -4,86 +4,50 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _State = require("../../State");
9
-
10
8
  var _constants = require("../constants");
11
-
12
9
  var _interfaces = require("../interfaces");
13
-
14
10
  var _GestureHandler = _interopRequireDefault(require("./GestureHandler"));
15
-
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
18
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
19
-
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
14
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
20
15
  const DEFAULT_MIN_POINTERS = 1;
21
16
  const DEFAULT_MAX_POINTERS = 10;
22
17
  const DEFAULT_MIN_DIST_SQ = _constants.DEFAULT_TOUCH_SLOP * _constants.DEFAULT_TOUCH_SLOP;
23
-
24
18
  class PanGestureHandler extends _GestureHandler.default {
25
19
  constructor(...args) {
26
20
  super(...args);
27
-
28
21
  _defineProperty(this, "customActivationProperties", ['activeOffsetXStart', 'activeOffsetXEnd', 'failOffsetXStart', 'failOffsetXEnd', 'activeOffsetYStart', 'activeOffsetYEnd', 'failOffsetYStart', 'failOffsetYEnd', 'minVelocityX', 'minVelocityY', 'minVelocity']);
29
-
30
22
  _defineProperty(this, "velocityX", 0);
31
-
32
23
  _defineProperty(this, "velocityY", 0);
33
-
34
24
  _defineProperty(this, "minDistSq", DEFAULT_MIN_DIST_SQ);
35
-
36
25
  _defineProperty(this, "activeOffsetXStart", -Number.MAX_SAFE_INTEGER);
37
-
38
26
  _defineProperty(this, "activeOffsetXEnd", Number.MIN_SAFE_INTEGER);
39
-
40
27
  _defineProperty(this, "failOffsetXStart", Number.MIN_SAFE_INTEGER);
41
-
42
28
  _defineProperty(this, "failOffsetXEnd", Number.MAX_SAFE_INTEGER);
43
-
44
29
  _defineProperty(this, "activeOffsetYStart", Number.MAX_SAFE_INTEGER);
45
-
46
30
  _defineProperty(this, "activeOffsetYEnd", Number.MIN_SAFE_INTEGER);
47
-
48
31
  _defineProperty(this, "failOffsetYStart", Number.MIN_SAFE_INTEGER);
49
-
50
32
  _defineProperty(this, "failOffsetYEnd", Number.MAX_SAFE_INTEGER);
51
-
52
33
  _defineProperty(this, "minVelocityX", Number.MAX_SAFE_INTEGER);
53
-
54
34
  _defineProperty(this, "minVelocityY", Number.MAX_SAFE_INTEGER);
55
-
56
35
  _defineProperty(this, "minVelocitySq", Number.MAX_SAFE_INTEGER);
57
-
58
36
  _defineProperty(this, "minPointers", DEFAULT_MIN_POINTERS);
59
-
60
37
  _defineProperty(this, "maxPointers", DEFAULT_MAX_POINTERS);
61
-
62
38
  _defineProperty(this, "startX", 0);
63
-
64
39
  _defineProperty(this, "startY", 0);
65
-
66
40
  _defineProperty(this, "offsetX", 0);
67
-
68
41
  _defineProperty(this, "offsetY", 0);
69
-
70
42
  _defineProperty(this, "lastX", 0);
71
-
72
43
  _defineProperty(this, "lastY", 0);
73
-
74
44
  _defineProperty(this, "stylusData", void 0);
75
-
76
45
  _defineProperty(this, "activateAfterLongPress", 0);
77
-
78
46
  _defineProperty(this, "activationTimeout", 0);
79
-
80
47
  _defineProperty(this, "enableTrackpadTwoFingerGesture", false);
81
-
82
48
  _defineProperty(this, "endWheelTimeout", 0);
83
-
84
49
  _defineProperty(this, "wheelDevice", _interfaces.WheelDevice.UNDETERMINED);
85
50
  }
86
-
87
51
  updateGestureConfig({
88
52
  enabled = true,
89
53
  ...props
@@ -94,107 +58,82 @@ class PanGestureHandler extends _GestureHandler.default {
94
58
  ...props
95
59
  });
96
60
  this.checkCustomActivationCriteria(this.customActivationProperties);
97
-
98
61
  if (this.config.minDist !== undefined) {
99
62
  this.minDistSq = this.config.minDist * this.config.minDist;
100
63
  } else if (this.hasCustomActivationCriteria) {
101
64
  this.minDistSq = Number.MAX_SAFE_INTEGER;
102
65
  }
103
-
104
66
  if (this.config.minPointers !== undefined) {
105
67
  this.minPointers = this.config.minPointers;
106
68
  }
107
-
108
69
  if (this.config.maxPointers !== undefined) {
109
70
  this.maxPointers = this.config.maxPointers;
110
71
  }
111
-
112
72
  if (this.config.minVelocity !== undefined) {
113
73
  this.minVelocityX = this.config.minVelocity;
114
74
  this.minVelocityY = this.config.minVelocity;
115
75
  }
116
-
117
76
  if (this.config.minVelocityX !== undefined) {
118
77
  this.minVelocityX = this.config.minVelocityX;
119
78
  }
120
-
121
79
  if (this.config.minVelocityY !== undefined) {
122
80
  this.minVelocityY = this.config.minVelocityY;
123
81
  }
124
-
125
82
  if (this.config.activateAfterLongPress !== undefined) {
126
83
  this.activateAfterLongPress = this.config.activateAfterLongPress;
127
84
  }
128
-
129
85
  if (this.config.activeOffsetXStart !== undefined) {
130
86
  this.activeOffsetXStart = this.config.activeOffsetXStart;
131
-
132
87
  if (this.config.activeOffsetXEnd === undefined) {
133
88
  this.activeOffsetXEnd = Number.MAX_SAFE_INTEGER;
134
89
  }
135
90
  }
136
-
137
91
  if (this.config.activeOffsetXEnd !== undefined) {
138
92
  this.activeOffsetXEnd = this.config.activeOffsetXEnd;
139
-
140
93
  if (this.config.activeOffsetXStart === undefined) {
141
94
  this.activeOffsetXStart = Number.MIN_SAFE_INTEGER;
142
95
  }
143
96
  }
144
-
145
97
  if (this.config.failOffsetXStart !== undefined) {
146
98
  this.failOffsetXStart = this.config.failOffsetXStart;
147
-
148
99
  if (this.config.failOffsetXEnd === undefined) {
149
100
  this.failOffsetXEnd = Number.MAX_SAFE_INTEGER;
150
101
  }
151
102
  }
152
-
153
103
  if (this.config.failOffsetXEnd !== undefined) {
154
104
  this.failOffsetXEnd = this.config.failOffsetXEnd;
155
-
156
105
  if (this.config.failOffsetXStart === undefined) {
157
106
  this.failOffsetXStart = Number.MIN_SAFE_INTEGER;
158
107
  }
159
108
  }
160
-
161
109
  if (this.config.activeOffsetYStart !== undefined) {
162
110
  this.activeOffsetYStart = this.config.activeOffsetYStart;
163
-
164
111
  if (this.config.activeOffsetYEnd === undefined) {
165
112
  this.activeOffsetYEnd = Number.MAX_SAFE_INTEGER;
166
113
  }
167
114
  }
168
-
169
115
  if (this.config.activeOffsetYEnd !== undefined) {
170
116
  this.activeOffsetYEnd = this.config.activeOffsetYEnd;
171
-
172
117
  if (this.config.activeOffsetYStart === undefined) {
173
118
  this.activeOffsetYStart = Number.MIN_SAFE_INTEGER;
174
119
  }
175
120
  }
176
-
177
121
  if (this.config.failOffsetYStart !== undefined) {
178
122
  this.failOffsetYStart = this.config.failOffsetYStart;
179
-
180
123
  if (this.config.failOffsetYEnd === undefined) {
181
124
  this.failOffsetYEnd = Number.MAX_SAFE_INTEGER;
182
125
  }
183
126
  }
184
-
185
127
  if (this.config.failOffsetYEnd !== undefined) {
186
128
  this.failOffsetYEnd = this.config.failOffsetYEnd;
187
-
188
129
  if (this.config.failOffsetYStart === undefined) {
189
130
  this.failOffsetYStart = Number.MIN_SAFE_INTEGER;
190
131
  }
191
132
  }
192
-
193
133
  if (this.config.enableTrackpadTwoFingerGesture !== undefined) {
194
134
  this.enableTrackpadTwoFingerGesture = this.config.enableTrackpadTwoFingerGesture;
195
135
  }
196
136
  }
197
-
198
137
  resetConfig() {
199
138
  super.resetConfig();
200
139
  this.activeOffsetXStart = -Number.MAX_SAFE_INTEGER;
@@ -213,11 +152,11 @@ class PanGestureHandler extends _GestureHandler.default {
213
152
  this.maxPointers = DEFAULT_MAX_POINTERS;
214
153
  this.activateAfterLongPress = 0;
215
154
  }
216
-
217
155
  transformNativeEvent() {
218
156
  const translationX = this.getTranslationX();
219
157
  const translationY = this.getTranslationY();
220
- return { ...super.transformNativeEvent(),
158
+ return {
159
+ ...super.transformNativeEvent(),
221
160
  translationX: isNaN(translationX) ? 0 : translationX,
222
161
  translationY: isNaN(translationY) ? 0 : translationY,
223
162
  velocityX: this.velocityX,
@@ -225,25 +164,21 @@ class PanGestureHandler extends _GestureHandler.default {
225
164
  stylusData: this.stylusData
226
165
  };
227
166
  }
228
-
229
167
  getTranslationX() {
230
168
  return this.lastX - this.startX + this.offsetX;
231
169
  }
232
-
233
170
  getTranslationY() {
234
171
  return this.lastY - this.startY + this.offsetY;
235
172
  }
236
-
237
173
  clearActivationTimeout() {
238
174
  clearTimeout(this.activationTimeout);
239
- } // Events Handling
240
-
175
+ }
241
176
 
177
+ // Events Handling
242
178
  onPointerDown(event) {
243
179
  if (!this.isButtonInConfig(event.button)) {
244
180
  return;
245
181
  }
246
-
247
182
  this.tracker.addToTracker(event);
248
183
  this.stylusData = event.stylusData;
249
184
  super.onPointerDown(event);
@@ -256,7 +191,6 @@ class PanGestureHandler extends _GestureHandler.default {
256
191
  this.checkBegan();
257
192
  this.tryToSendTouchEvent(event);
258
193
  }
259
-
260
194
  onPointerAdd(event) {
261
195
  this.tracker.addToTracker(event);
262
196
  super.onPointerAdd(event);
@@ -268,9 +202,8 @@ class PanGestureHandler extends _GestureHandler.default {
268
202
  this.lastY = lastCoords.y;
269
203
  this.startX = this.lastX;
270
204
  this.startY = this.lastY;
271
-
272
- if (this.tracker.getTrackedPointersCount() > this.maxPointers) {
273
- if (this.currentState === _State.State.ACTIVE) {
205
+ if (this.tracker.trackedPointersCount > this.maxPointers) {
206
+ if (this.state === _State.State.ACTIVE) {
274
207
  this.cancel();
275
208
  } else {
276
209
  this.fail();
@@ -279,31 +212,25 @@ class PanGestureHandler extends _GestureHandler.default {
279
212
  this.checkBegan();
280
213
  }
281
214
  }
282
-
283
215
  onPointerUp(event) {
284
216
  this.stylusData = event.stylusData;
285
217
  super.onPointerUp(event);
286
-
287
- if (this.currentState === _State.State.ACTIVE) {
218
+ if (this.state === _State.State.ACTIVE) {
288
219
  const lastCoords = this.tracker.getAbsoluteCoordsAverage();
289
220
  this.lastX = lastCoords.x;
290
221
  this.lastY = lastCoords.y;
291
222
  }
292
-
293
223
  this.tracker.removeFromTracker(event.pointerId);
294
-
295
- if (this.tracker.getTrackedPointersCount() === 0) {
224
+ if (this.tracker.trackedPointersCount === 0) {
296
225
  this.clearActivationTimeout();
297
226
  }
298
-
299
- if (this.currentState === _State.State.ACTIVE) {
227
+ if (this.state === _State.State.ACTIVE) {
300
228
  this.end();
301
229
  } else {
302
230
  this.resetProgress();
303
231
  this.fail();
304
232
  }
305
233
  }
306
-
307
234
  onPointerRemove(event) {
308
235
  super.onPointerRemove(event);
309
236
  this.tracker.removeFromTracker(event.pointerId);
@@ -314,12 +241,10 @@ class PanGestureHandler extends _GestureHandler.default {
314
241
  this.lastY = lastCoords.y;
315
242
  this.startX = this.lastX;
316
243
  this.startY = this.lastY;
317
-
318
- if (!(this.currentState === _State.State.ACTIVE && this.tracker.getTrackedPointersCount() < this.minPointers)) {
244
+ if (!(this.state === _State.State.ACTIVE && this.tracker.trackedPointersCount < this.minPointers)) {
319
245
  this.checkBegan();
320
246
  }
321
247
  }
322
-
323
248
  onPointerMove(event) {
324
249
  this.tracker.track(event);
325
250
  this.stylusData = event.stylusData;
@@ -332,12 +257,10 @@ class PanGestureHandler extends _GestureHandler.default {
332
257
  this.checkBegan();
333
258
  super.onPointerMove(event);
334
259
  }
335
-
336
260
  onPointerOutOfBounds(event) {
337
- if (this.getShouldCancelWhenOutside()) {
261
+ if (this.shouldCancelWhenOutside) {
338
262
  return;
339
263
  }
340
-
341
264
  this.tracker.track(event);
342
265
  this.stylusData = event.stylusData;
343
266
  const lastCoords = this.tracker.getAbsoluteCoordsAverage();
@@ -347,38 +270,31 @@ class PanGestureHandler extends _GestureHandler.default {
347
270
  this.velocityX = velocity.x;
348
271
  this.velocityY = velocity.y;
349
272
  this.checkBegan();
350
-
351
- if (this.currentState === _State.State.ACTIVE) {
273
+ if (this.state === _State.State.ACTIVE) {
352
274
  super.onPointerOutOfBounds(event);
353
275
  }
354
276
  }
355
-
356
277
  scheduleWheelEnd(event) {
357
278
  clearTimeout(this.endWheelTimeout);
358
279
  this.endWheelTimeout = setTimeout(() => {
359
- if (this.currentState === _State.State.ACTIVE) {
280
+ if (this.state === _State.State.ACTIVE) {
360
281
  this.end();
361
282
  this.tracker.removeFromTracker(event.pointerId);
362
- this.currentState = _State.State.UNDETERMINED;
283
+ this.state = _State.State.UNDETERMINED;
363
284
  }
364
-
365
285
  this.wheelDevice = _interfaces.WheelDevice.UNDETERMINED;
366
286
  }, 30);
367
287
  }
368
-
369
288
  onWheel(event) {
370
289
  if (this.wheelDevice === _interfaces.WheelDevice.MOUSE || !this.enableTrackpadTwoFingerGesture) {
371
290
  return;
372
291
  }
373
-
374
- if (this.currentState === _State.State.UNDETERMINED) {
292
+ if (this.state === _State.State.UNDETERMINED) {
375
293
  this.wheelDevice = event.wheelDeltaY % 120 !== 0 ? _interfaces.WheelDevice.TOUCHPAD : _interfaces.WheelDevice.MOUSE;
376
-
377
294
  if (this.wheelDevice === _interfaces.WheelDevice.MOUSE) {
378
295
  this.scheduleWheelEnd(event);
379
296
  return;
380
297
  }
381
-
382
298
  this.tracker.addToTracker(event);
383
299
  const lastCoords = this.tracker.getAbsoluteCoordsAverage();
384
300
  this.lastX = lastCoords.x;
@@ -388,7 +304,6 @@ class PanGestureHandler extends _GestureHandler.default {
388
304
  this.begin();
389
305
  this.activate();
390
306
  }
391
-
392
307
  this.tracker.track(event);
393
308
  const lastCoords = this.tracker.getAbsoluteCoordsAverage();
394
309
  this.lastX = lastCoords.x;
@@ -399,84 +314,63 @@ class PanGestureHandler extends _GestureHandler.default {
399
314
  this.tryToSendMoveEvent(false, event);
400
315
  this.scheduleWheelEnd(event);
401
316
  }
402
-
403
317
  shouldActivate() {
404
318
  const dx = this.getTranslationX();
405
-
406
319
  if (this.activeOffsetXStart !== Number.MAX_SAFE_INTEGER && dx < this.activeOffsetXStart) {
407
320
  return true;
408
321
  }
409
-
410
322
  if (this.activeOffsetXEnd !== Number.MIN_SAFE_INTEGER && dx > this.activeOffsetXEnd) {
411
323
  return true;
412
324
  }
413
-
414
325
  const dy = this.getTranslationY();
415
-
416
326
  if (this.activeOffsetYStart !== Number.MAX_SAFE_INTEGER && dy < this.activeOffsetYStart) {
417
327
  return true;
418
328
  }
419
-
420
329
  if (this.activeOffsetYEnd !== Number.MIN_SAFE_INTEGER && dy > this.activeOffsetYEnd) {
421
330
  return true;
422
331
  }
423
-
424
332
  const distanceSq = dx * dx + dy * dy;
425
-
426
333
  if (this.minDistSq !== Number.MAX_SAFE_INTEGER && distanceSq >= this.minDistSq) {
427
334
  return true;
428
335
  }
429
-
430
336
  const vx = this.velocityX;
431
-
432
337
  if (this.minVelocityX !== Number.MAX_SAFE_INTEGER && (this.minVelocityX < 0 && vx <= this.minVelocityX || this.minVelocityX >= 0 && this.minVelocityX <= vx)) {
433
338
  return true;
434
339
  }
435
-
436
340
  const vy = this.velocityY;
437
-
438
341
  if (this.minVelocityY !== Number.MAX_SAFE_INTEGER && (this.minVelocityY < 0 && vy <= this.minVelocityY || this.minVelocityY >= 0 && this.minVelocityY <= vy)) {
439
342
  return true;
440
343
  }
441
-
442
344
  const velocitySq = vx * vx + vy * vy;
443
345
  return this.minVelocitySq !== Number.MAX_SAFE_INTEGER && velocitySq >= this.minVelocitySq;
444
346
  }
445
-
446
347
  shouldFail() {
447
348
  const dx = this.getTranslationX();
448
349
  const dy = this.getTranslationY();
449
350
  const distanceSq = dx * dx + dy * dy;
450
-
451
351
  if (this.activateAfterLongPress > 0 && distanceSq > DEFAULT_MIN_DIST_SQ) {
452
352
  this.clearActivationTimeout();
453
353
  return true;
454
354
  }
455
-
456
355
  if (this.failOffsetXStart !== Number.MIN_SAFE_INTEGER && dx < this.failOffsetXStart) {
457
356
  return true;
458
357
  }
459
-
460
358
  if (this.failOffsetXEnd !== Number.MAX_SAFE_INTEGER && dx > this.failOffsetXEnd) {
461
359
  return true;
462
360
  }
463
-
464
361
  if (this.failOffsetYStart !== Number.MIN_SAFE_INTEGER && dy < this.failOffsetYStart) {
465
362
  return true;
466
363
  }
467
-
468
364
  return this.failOffsetYEnd !== Number.MAX_SAFE_INTEGER && dy > this.failOffsetYEnd;
469
365
  }
470
-
471
366
  tryBegin(event) {
472
- if (this.currentState === _State.State.UNDETERMINED && this.tracker.getTrackedPointersCount() >= this.minPointers) {
367
+ if (this.state === _State.State.UNDETERMINED && this.tracker.trackedPointersCount >= this.minPointers) {
473
368
  this.resetProgress();
474
369
  this.offsetX = 0;
475
370
  this.offsetY = 0;
476
371
  this.velocityX = 0;
477
372
  this.velocityY = 0;
478
373
  this.begin();
479
-
480
374
  if (this.activateAfterLongPress > 0) {
481
375
  this.activationTimeout = setTimeout(() => {
482
376
  this.activate();
@@ -488,9 +382,8 @@ class PanGestureHandler extends _GestureHandler.default {
488
382
  this.velocityY = velocity.y;
489
383
  }
490
384
  }
491
-
492
385
  checkBegan() {
493
- if (this.currentState === _State.State.BEGAN) {
386
+ if (this.state === _State.State.BEGAN) {
494
387
  if (this.shouldFail()) {
495
388
  this.fail();
496
389
  } else if (this.shouldActivate()) {
@@ -498,33 +391,25 @@ class PanGestureHandler extends _GestureHandler.default {
498
391
  }
499
392
  }
500
393
  }
501
-
502
394
  activate(force = false) {
503
- if (this.currentState !== _State.State.ACTIVE) {
395
+ if (this.state !== _State.State.ACTIVE) {
504
396
  this.resetProgress();
505
397
  }
506
-
507
398
  super.activate(force);
508
399
  }
509
-
510
400
  onCancel() {
511
401
  this.clearActivationTimeout();
512
402
  }
513
-
514
403
  onReset() {
515
404
  this.clearActivationTimeout();
516
405
  }
517
-
518
406
  resetProgress() {
519
- if (this.currentState === _State.State.ACTIVE) {
407
+ if (this.state === _State.State.ACTIVE) {
520
408
  return;
521
409
  }
522
-
523
410
  this.startX = this.lastX;
524
411
  this.startY = this.lastY;
525
412
  }
526
-
527
413
  }
528
-
529
414
  exports.default = PanGestureHandler;
530
415
  //# sourceMappingURL=PanGestureHandler.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["PanGestureHandler.ts"],"names":["DEFAULT_MIN_POINTERS","DEFAULT_MAX_POINTERS","DEFAULT_MIN_DIST_SQ","DEFAULT_TOUCH_SLOP","PanGestureHandler","GestureHandler","Number","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","WheelDevice","UNDETERMINED","updateGestureConfig","enabled","props","resetConfig","checkCustomActivationCriteria","customActivationProperties","config","minDist","undefined","minDistSq","hasCustomActivationCriteria","minPointers","maxPointers","minVelocity","minVelocityX","minVelocityY","activateAfterLongPress","activeOffsetXStart","activeOffsetXEnd","failOffsetXStart","failOffsetXEnd","activeOffsetYStart","activeOffsetYEnd","failOffsetYStart","failOffsetYEnd","enableTrackpadTwoFingerGesture","minVelocitySq","transformNativeEvent","translationX","getTranslationX","translationY","getTranslationY","isNaN","velocityX","velocityY","stylusData","lastX","startX","offsetX","lastY","startY","offsetY","clearActivationTimeout","clearTimeout","activationTimeout","onPointerDown","event","isButtonInConfig","button","tracker","addToTracker","lastCoords","getAbsoluteCoordsAverage","x","y","tryBegin","checkBegan","tryToSendTouchEvent","onPointerAdd","getTrackedPointersCount","currentState","State","ACTIVE","cancel","fail","onPointerUp","removeFromTracker","pointerId","end","resetProgress","onPointerRemove","onPointerMove","track","velocity","getVelocity","onPointerOutOfBounds","getShouldCancelWhenOutside","scheduleWheelEnd","endWheelTimeout","setTimeout","wheelDevice","onWheel","MOUSE","wheelDeltaY","TOUCHPAD","begin","activate","tryToSendMoveEvent","shouldActivate","dx","dy","distanceSq","vx","vy","velocitySq","shouldFail","BEGAN","force","onCancel","onReset"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;;;;;AAEA,MAAMA,oBAAoB,GAAG,CAA7B;AACA,MAAMC,oBAAoB,GAAG,EAA7B;AACA,MAAMC,mBA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,aAAMC,MAAhC,EAAwC;AACtC,WAAKO,aAAL;AACD;;AAED,UAAMiB,QAAN,CAAeW,KAAf;AACD;;AAESC,EAAAA,QAAQ,GAAS;AACzB,SAAKxD,sBAAL;AACD;;AAESyD,EAAAA,OAAO,GAAS;AACxB,SAAKzD,sBAAL;AACD;;AAES2B,EAAAA,aAAa,GAAS;AAC9B,QAAI,KAAKT,YAAL,KAAsBC,aAAMC,MAAhC,EAAwC;AACtC;AACD;;AAED,SAAKzB,MAAL,GAAc,KAAKD,KAAnB;AACA,SAAKI,MAAL,GAAc,KAAKD,KAAnB;AACD;;AA3jB2D","sourcesContent":["import { State } from '../../State';\nimport { DEFAULT_TOUCH_SLOP } from '../constants';\nimport { AdaptedEvent, Config, StylusData, WheelDevice } from '../interfaces';\n\nimport GestureHandler from './GestureHandler';\n\nconst DEFAULT_MIN_POINTERS = 1;\nconst DEFAULT_MAX_POINTERS = 10;\nconst DEFAULT_MIN_DIST_SQ = DEFAULT_TOUCH_SLOP * DEFAULT_TOUCH_SLOP;\n\nexport default class PanGestureHandler extends GestureHandler {\n private readonly customActivationProperties: string[] = [\n 'activeOffsetXStart',\n 'activeOffsetXEnd',\n 'failOffsetXStart',\n 'failOffsetXEnd',\n 'activeOffsetYStart',\n 'activeOffsetYEnd',\n 'failOffsetYStart',\n 'failOffsetYEnd',\n 'minVelocityX',\n 'minVelocityY',\n 'minVelocity',\n ];\n\n public velocityX = 0;\n public velocityY = 0;\n\n private minDistSq = DEFAULT_MIN_DIST_SQ;\n\n private activeOffsetXStart = -Number.MAX_SAFE_INTEGER;\n private activeOffsetXEnd = Number.MIN_SAFE_INTEGER;\n private failOffsetXStart = Number.MIN_SAFE_INTEGER;\n private failOffsetXEnd = Number.MAX_SAFE_INTEGER;\n\n private activeOffsetYStart = Number.MAX_SAFE_INTEGER;\n private activeOffsetYEnd = Number.MIN_SAFE_INTEGER;\n private failOffsetYStart = Number.MIN_SAFE_INTEGER;\n private failOffsetYEnd = Number.MAX_SAFE_INTEGER;\n\n private minVelocityX = Number.MAX_SAFE_INTEGER;\n private minVelocityY = Number.MAX_SAFE_INTEGER;\n private minVelocitySq = Number.MAX_SAFE_INTEGER;\n\n private minPointers = DEFAULT_MIN_POINTERS;\n private maxPointers = DEFAULT_MAX_POINTERS;\n\n private startX = 0;\n private startY = 0;\n private offsetX = 0;\n private offsetY = 0;\n private lastX = 0;\n private lastY = 0;\n\n private stylusData: StylusData | undefined;\n\n private activateAfterLongPress = 0;\n private activationTimeout = 0;\n\n private enableTrackpadTwoFingerGesture = false;\n private endWheelTimeout = 0;\n private wheelDevice = WheelDevice.UNDETERMINED;\n\n public updateGestureConfig({ enabled = true, ...props }: Config): void {\n this.resetConfig();\n\n super.updateGestureConfig({ enabled: enabled, ...props });\n this.checkCustomActivationCriteria(this.customActivationProperties);\n\n if (this.config.minDist !== undefined) {\n this.minDistSq = this.config.minDist * this.config.minDist;\n } else if (this.hasCustomActivationCriteria) {\n this.minDistSq = Number.MAX_SAFE_INTEGER;\n }\n\n if (this.config.minPointers !== undefined) {\n this.minPointers = this.config.minPointers;\n }\n\n if (this.config.maxPointers !== undefined) {\n this.maxPointers = this.config.maxPointers;\n }\n\n if (this.config.minVelocity !== undefined) {\n this.minVelocityX = this.config.minVelocity;\n this.minVelocityY = this.config.minVelocity;\n }\n\n if (this.config.minVelocityX !== undefined) {\n this.minVelocityX = this.config.minVelocityX;\n }\n\n if (this.config.minVelocityY !== undefined) {\n this.minVelocityY = this.config.minVelocityY;\n }\n\n if (this.config.activateAfterLongPress !== undefined) {\n this.activateAfterLongPress = this.config.activateAfterLongPress;\n }\n\n if (this.config.activeOffsetXStart !== undefined) {\n this.activeOffsetXStart = this.config.activeOffsetXStart;\n\n if (this.config.activeOffsetXEnd === undefined) {\n this.activeOffsetXEnd = Number.MAX_SAFE_INTEGER;\n }\n }\n\n if (this.config.activeOffsetXEnd !== undefined) {\n this.activeOffsetXEnd = this.config.activeOffsetXEnd;\n\n if (this.config.activeOffsetXStart === undefined) {\n this.activeOffsetXStart = Number.MIN_SAFE_INTEGER;\n }\n }\n\n if (this.config.failOffsetXStart !== undefined) {\n this.failOffsetXStart = this.config.failOffsetXStart;\n\n if (this.config.failOffsetXEnd === undefined) {\n this.failOffsetXEnd = Number.MAX_SAFE_INTEGER;\n }\n }\n\n if (this.config.failOffsetXEnd !== undefined) {\n this.failOffsetXEnd = this.config.failOffsetXEnd;\n\n if (this.config.failOffsetXStart === undefined) {\n this.failOffsetXStart = Number.MIN_SAFE_INTEGER;\n }\n }\n\n if (this.config.activeOffsetYStart !== undefined) {\n this.activeOffsetYStart = this.config.activeOffsetYStart;\n\n if (this.config.activeOffsetYEnd === undefined) {\n this.activeOffsetYEnd = Number.MAX_SAFE_INTEGER;\n }\n }\n\n if (this.config.activeOffsetYEnd !== undefined) {\n this.activeOffsetYEnd = this.config.activeOffsetYEnd;\n\n if (this.config.activeOffsetYStart === undefined) {\n this.activeOffsetYStart = Number.MIN_SAFE_INTEGER;\n }\n }\n\n if (this.config.failOffsetYStart !== undefined) {\n this.failOffsetYStart = this.config.failOffsetYStart;\n\n if (this.config.failOffsetYEnd === undefined) {\n this.failOffsetYEnd = Number.MAX_SAFE_INTEGER;\n }\n }\n\n if (this.config.failOffsetYEnd !== undefined) {\n this.failOffsetYEnd = this.config.failOffsetYEnd;\n\n if (this.config.failOffsetYStart === undefined) {\n this.failOffsetYStart = Number.MIN_SAFE_INTEGER;\n }\n }\n\n if (this.config.enableTrackpadTwoFingerGesture !== undefined) {\n this.enableTrackpadTwoFingerGesture =\n this.config.enableTrackpadTwoFingerGesture;\n }\n }\n\n protected resetConfig(): void {\n super.resetConfig();\n\n this.activeOffsetXStart = -Number.MAX_SAFE_INTEGER;\n this.activeOffsetXEnd = Number.MIN_SAFE_INTEGER;\n this.failOffsetXStart = Number.MIN_SAFE_INTEGER;\n this.failOffsetXEnd = Number.MAX_SAFE_INTEGER;\n\n this.activeOffsetYStart = Number.MAX_SAFE_INTEGER;\n this.activeOffsetYEnd = Number.MIN_SAFE_INTEGER;\n this.failOffsetYStart = Number.MIN_SAFE_INTEGER;\n this.failOffsetYEnd = Number.MAX_SAFE_INTEGER;\n\n this.minVelocityX = Number.MAX_SAFE_INTEGER;\n this.minVelocityY = Number.MAX_SAFE_INTEGER;\n this.minVelocitySq = Number.MAX_SAFE_INTEGER;\n\n this.minDistSq = DEFAULT_MIN_DIST_SQ;\n\n this.minPointers = DEFAULT_MIN_POINTERS;\n this.maxPointers = DEFAULT_MAX_POINTERS;\n\n this.activateAfterLongPress = 0;\n }\n\n protected transformNativeEvent() {\n const translationX: number = this.getTranslationX();\n const translationY: number = this.getTranslationY();\n\n return {\n ...super.transformNativeEvent(),\n translationX: isNaN(translationX) ? 0 : translationX,\n translationY: isNaN(translationY) ? 0 : translationY,\n velocityX: this.velocityX,\n velocityY: this.velocityY,\n stylusData: this.stylusData,\n };\n }\n\n private getTranslationX(): number {\n return this.lastX - this.startX + this.offsetX;\n }\n private getTranslationY(): number {\n return this.lastY - this.startY + this.offsetY;\n }\n\n private clearActivationTimeout(): void {\n clearTimeout(this.activationTimeout);\n }\n\n // Events Handling\n protected onPointerDown(event: AdaptedEvent): void {\n if (!this.isButtonInConfig(event.button)) {\n return;\n }\n\n this.tracker.addToTracker(event);\n this.stylusData = event.stylusData;\n\n super.onPointerDown(event);\n\n const lastCoords = this.tracker.getAbsoluteCoordsAverage();\n this.lastX = lastCoords.x;\n this.lastY = lastCoords.y;\n\n this.startX = this.lastX;\n this.startY = this.lastY;\n\n this.tryBegin(event);\n this.checkBegan();\n\n this.tryToSendTouchEvent(event);\n }\n\n protected onPointerAdd(event: AdaptedEvent): void {\n this.tracker.addToTracker(event);\n super.onPointerAdd(event);\n this.tryBegin(event);\n\n this.offsetX += this.lastX - this.startX;\n this.offsetY += this.lastY - this.startY;\n\n const lastCoords = this.tracker.getAbsoluteCoordsAverage();\n this.lastX = lastCoords.x;\n this.lastY = lastCoords.y;\n\n this.startX = this.lastX;\n this.startY = this.lastY;\n\n if (this.tracker.getTrackedPointersCount() > this.maxPointers) {\n if (this.currentState === State.ACTIVE) {\n this.cancel();\n } else {\n this.fail();\n }\n } else {\n this.checkBegan();\n }\n }\n\n protected onPointerUp(event: AdaptedEvent): void {\n this.stylusData = event.stylusData;\n\n super.onPointerUp(event);\n if (this.currentState === State.ACTIVE) {\n const lastCoords = this.tracker.getAbsoluteCoordsAverage();\n this.lastX = lastCoords.x;\n this.lastY = lastCoords.y;\n }\n\n this.tracker.removeFromTracker(event.pointerId);\n\n if (this.tracker.getTrackedPointersCount() === 0) {\n this.clearActivationTimeout();\n }\n\n if (this.currentState === State.ACTIVE) {\n this.end();\n } else {\n this.resetProgress();\n this.fail();\n }\n }\n\n protected onPointerRemove(event: AdaptedEvent): void {\n super.onPointerRemove(event);\n this.tracker.removeFromTracker(event.pointerId);\n\n this.offsetX += this.lastX - this.startX;\n this.offsetY += this.lastY - this.startY;\n\n const lastCoords = this.tracker.getAbsoluteCoordsAverage();\n this.lastX = lastCoords.x;\n this.lastY = lastCoords.y;\n\n this.startX = this.lastX;\n this.startY = this.lastY;\n\n if (\n !(\n this.currentState === State.ACTIVE &&\n this.tracker.getTrackedPointersCount() < this.minPointers\n )\n ) {\n this.checkBegan();\n }\n }\n\n protected onPointerMove(event: AdaptedEvent): void {\n this.tracker.track(event);\n this.stylusData = event.stylusData;\n\n const lastCoords = this.tracker.getAbsoluteCoordsAverage();\n this.lastX = lastCoords.x;\n this.lastY = lastCoords.y;\n\n const velocity = this.tracker.getVelocity(event.pointerId);\n this.velocityX = velocity.x;\n this.velocityY = velocity.y;\n\n this.checkBegan();\n\n super.onPointerMove(event);\n }\n\n protected onPointerOutOfBounds(event: AdaptedEvent): void {\n if (this.getShouldCancelWhenOutside()) {\n return;\n }\n\n this.tracker.track(event);\n this.stylusData = event.stylusData;\n\n const lastCoords = this.tracker.getAbsoluteCoordsAverage();\n this.lastX = lastCoords.x;\n this.lastY = lastCoords.y;\n\n const velocity = this.tracker.getVelocity(event.pointerId);\n this.velocityX = velocity.x;\n this.velocityY = velocity.y;\n\n this.checkBegan();\n\n if (this.currentState === State.ACTIVE) {\n super.onPointerOutOfBounds(event);\n }\n }\n\n private scheduleWheelEnd(event: AdaptedEvent) {\n clearTimeout(this.endWheelTimeout);\n\n this.endWheelTimeout = setTimeout(() => {\n if (this.currentState === State.ACTIVE) {\n this.end();\n this.tracker.removeFromTracker(event.pointerId);\n this.currentState = State.UNDETERMINED;\n }\n\n this.wheelDevice = WheelDevice.UNDETERMINED;\n }, 30);\n }\n\n protected onWheel(event: AdaptedEvent): void {\n if (\n this.wheelDevice === WheelDevice.MOUSE ||\n !this.enableTrackpadTwoFingerGesture\n ) {\n return;\n }\n\n if (this.currentState === State.UNDETERMINED) {\n this.wheelDevice =\n event.wheelDeltaY! % 120 !== 0\n ? WheelDevice.TOUCHPAD\n : WheelDevice.MOUSE;\n\n if (this.wheelDevice === WheelDevice.MOUSE) {\n this.scheduleWheelEnd(event);\n return;\n }\n\n this.tracker.addToTracker(event);\n\n const lastCoords = this.tracker.getAbsoluteCoordsAverage();\n this.lastX = lastCoords.x;\n this.lastY = lastCoords.y;\n\n this.startX = this.lastX;\n this.startY = this.lastY;\n\n this.begin();\n this.activate();\n }\n this.tracker.track(event);\n\n const lastCoords = this.tracker.getAbsoluteCoordsAverage();\n this.lastX = lastCoords.x;\n this.lastY = lastCoords.y;\n\n const velocity = this.tracker.getVelocity(event.pointerId);\n this.velocityX = velocity.x;\n this.velocityY = velocity.y;\n\n this.tryToSendMoveEvent(false, event);\n this.scheduleWheelEnd(event);\n }\n\n private shouldActivate(): boolean {\n const dx: number = this.getTranslationX();\n\n if (\n this.activeOffsetXStart !== Number.MAX_SAFE_INTEGER &&\n dx < this.activeOffsetXStart\n ) {\n return true;\n }\n\n if (\n this.activeOffsetXEnd !== Number.MIN_SAFE_INTEGER &&\n dx > this.activeOffsetXEnd\n ) {\n return true;\n }\n\n const dy: number = this.getTranslationY();\n\n if (\n this.activeOffsetYStart !== Number.MAX_SAFE_INTEGER &&\n dy < this.activeOffsetYStart\n ) {\n return true;\n }\n\n if (\n this.activeOffsetYEnd !== Number.MIN_SAFE_INTEGER &&\n dy > this.activeOffsetYEnd\n ) {\n return true;\n }\n\n const distanceSq: number = dx * dx + dy * dy;\n\n if (\n this.minDistSq !== Number.MAX_SAFE_INTEGER &&\n distanceSq >= this.minDistSq\n ) {\n return true;\n }\n\n const vx: number = this.velocityX;\n\n if (\n this.minVelocityX !== Number.MAX_SAFE_INTEGER &&\n ((this.minVelocityX < 0 && vx <= this.minVelocityX) ||\n (this.minVelocityX >= 0 && this.minVelocityX <= vx))\n ) {\n return true;\n }\n\n const vy: number = this.velocityY;\n if (\n this.minVelocityY !== Number.MAX_SAFE_INTEGER &&\n ((this.minVelocityY < 0 && vy <= this.minVelocityY) ||\n (this.minVelocityY >= 0 && this.minVelocityY <= vy))\n ) {\n return true;\n }\n\n const velocitySq: number = vx * vx + vy * vy;\n\n return (\n this.minVelocitySq !== Number.MAX_SAFE_INTEGER &&\n velocitySq >= this.minVelocitySq\n );\n }\n\n private shouldFail(): boolean {\n const dx: number = this.getTranslationX();\n const dy: number = this.getTranslationY();\n const distanceSq = dx * dx + dy * dy;\n\n if (this.activateAfterLongPress > 0 && distanceSq > DEFAULT_MIN_DIST_SQ) {\n this.clearActivationTimeout();\n return true;\n }\n\n if (\n this.failOffsetXStart !== Number.MIN_SAFE_INTEGER &&\n dx < this.failOffsetXStart\n ) {\n return true;\n }\n\n if (\n this.failOffsetXEnd !== Number.MAX_SAFE_INTEGER &&\n dx > this.failOffsetXEnd\n ) {\n return true;\n }\n\n if (\n this.failOffsetYStart !== Number.MIN_SAFE_INTEGER &&\n dy < this.failOffsetYStart\n ) {\n return true;\n }\n\n return (\n this.failOffsetYEnd !== Number.MAX_SAFE_INTEGER &&\n dy > this.failOffsetYEnd\n );\n }\n\n private tryBegin(event: AdaptedEvent): void {\n if (\n this.currentState === State.UNDETERMINED &&\n this.tracker.getTrackedPointersCount() >= this.minPointers\n ) {\n this.resetProgress();\n this.offsetX = 0;\n this.offsetY = 0;\n this.velocityX = 0;\n this.velocityY = 0;\n\n this.begin();\n\n if (this.activateAfterLongPress > 0) {\n this.activationTimeout = setTimeout(() => {\n this.activate();\n }, this.activateAfterLongPress);\n }\n } else {\n const velocity = this.tracker.getVelocity(event.pointerId);\n this.velocityX = velocity.x;\n this.velocityY = velocity.y;\n }\n }\n\n private checkBegan(): void {\n if (this.currentState === State.BEGAN) {\n if (this.shouldFail()) {\n this.fail();\n } else if (this.shouldActivate()) {\n this.activate();\n }\n }\n }\n\n public activate(force = false): void {\n if (this.currentState !== State.ACTIVE) {\n this.resetProgress();\n }\n\n super.activate(force);\n }\n\n protected onCancel(): void {\n this.clearActivationTimeout();\n }\n\n protected onReset(): void {\n this.clearActivationTimeout();\n }\n\n protected resetProgress(): void {\n if (this.currentState === State.ACTIVE) {\n return;\n }\n\n this.startX = this.lastX;\n this.startY = this.lastY;\n }\n}\n"]}
1
+ {"version":3,"names":["_State","require","_constants","_interfaces","_GestureHandler","_interopRequireDefault","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","DEFAULT_MIN_POINTERS","DEFAULT_MAX_POINTERS","DEFAULT_MIN_DIST_SQ","DEFAULT_TOUCH_SLOP","PanGestureHandler","GestureHandler","constructor","args","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","WheelDevice","UNDETERMINED","updateGestureConfig","enabled","props","resetConfig","checkCustomActivationCriteria","customActivationProperties","config","minDist","undefined","minDistSq","hasCustomActivationCriteria","minPointers","maxPointers","minVelocity","minVelocityX","minVelocityY","activateAfterLongPress","activeOffsetXStart","activeOffsetXEnd","failOffsetXStart","failOffsetXEnd","activeOffsetYStart","activeOffsetYEnd","failOffsetYStart","failOffsetYEnd","enableTrackpadTwoFingerGesture","minVelocitySq","transformNativeEvent","translationX","getTranslationX","translationY","getTranslationY","isNaN","velocityX","velocityY","stylusData","lastX","startX","offsetX","lastY","startY","offsetY","clearActivationTimeout","clearTimeout","activationTimeout","onPointerDown","event","isButtonInConfig","button","tracker","addToTracker","lastCoords","getAbsoluteCoordsAverage","x","y","tryBegin","checkBegan","tryToSendTouchEvent","onPointerAdd","trackedPointersCount","state","State","ACTIVE","cancel","fail","onPointerUp","removeFromTracker","pointerId","end","resetProgress","onPointerRemove","onPointerMove","track","velocity","getVelocity","onPointerOutOfBounds","shouldCancelWhenOutside","scheduleWheelEnd","endWheelTimeout","setTimeout","wheelDevice","onWheel","MOUSE","wheelDeltaY","TOUCHPAD","begin","activate","tryToSendMoveEvent","shouldActivate","dx","dy","distanceSq","vx","vy","velocitySq","shouldFail","BEGAN","force","onCancel","onReset","exports"],"sources":["PanGestureHandler.ts"],"sourcesContent":["import { State } from '../../State';\nimport { DEFAULT_TOUCH_SLOP } from '../constants';\nimport { AdaptedEvent, Config, StylusData, WheelDevice } from '../interfaces';\n\nimport GestureHandler from './GestureHandler';\n\nconst DEFAULT_MIN_POINTERS = 1;\nconst DEFAULT_MAX_POINTERS = 10;\nconst DEFAULT_MIN_DIST_SQ = DEFAULT_TOUCH_SLOP * DEFAULT_TOUCH_SLOP;\n\nexport default class PanGestureHandler extends GestureHandler {\n private readonly customActivationProperties: string[] = [\n 'activeOffsetXStart',\n 'activeOffsetXEnd',\n 'failOffsetXStart',\n 'failOffsetXEnd',\n 'activeOffsetYStart',\n 'activeOffsetYEnd',\n 'failOffsetYStart',\n 'failOffsetYEnd',\n 'minVelocityX',\n 'minVelocityY',\n 'minVelocity',\n ];\n\n public velocityX = 0;\n public velocityY = 0;\n\n private minDistSq = DEFAULT_MIN_DIST_SQ;\n\n private activeOffsetXStart = -Number.MAX_SAFE_INTEGER;\n private activeOffsetXEnd = Number.MIN_SAFE_INTEGER;\n private failOffsetXStart = Number.MIN_SAFE_INTEGER;\n private failOffsetXEnd = Number.MAX_SAFE_INTEGER;\n\n private activeOffsetYStart = Number.MAX_SAFE_INTEGER;\n private activeOffsetYEnd = Number.MIN_SAFE_INTEGER;\n private failOffsetYStart = Number.MIN_SAFE_INTEGER;\n private failOffsetYEnd = Number.MAX_SAFE_INTEGER;\n\n private minVelocityX = Number.MAX_SAFE_INTEGER;\n private minVelocityY = Number.MAX_SAFE_INTEGER;\n private minVelocitySq = Number.MAX_SAFE_INTEGER;\n\n private minPointers = DEFAULT_MIN_POINTERS;\n private maxPointers = DEFAULT_MAX_POINTERS;\n\n private startX = 0;\n private startY = 0;\n private offsetX = 0;\n private offsetY = 0;\n private lastX = 0;\n private lastY = 0;\n\n private stylusData: StylusData | undefined;\n\n private activateAfterLongPress = 0;\n private activationTimeout = 0;\n\n private enableTrackpadTwoFingerGesture = false;\n private endWheelTimeout = 0;\n private wheelDevice = WheelDevice.UNDETERMINED;\n\n public updateGestureConfig({ enabled = true, ...props }: Config): void {\n this.resetConfig();\n\n super.updateGestureConfig({ enabled: enabled, ...props });\n this.checkCustomActivationCriteria(this.customActivationProperties);\n\n if (this.config.minDist !== undefined) {\n this.minDistSq = this.config.minDist * this.config.minDist;\n } else if (this.hasCustomActivationCriteria) {\n this.minDistSq = Number.MAX_SAFE_INTEGER;\n }\n\n if (this.config.minPointers !== undefined) {\n this.minPointers = this.config.minPointers;\n }\n\n if (this.config.maxPointers !== undefined) {\n this.maxPointers = this.config.maxPointers;\n }\n\n if (this.config.minVelocity !== undefined) {\n this.minVelocityX = this.config.minVelocity;\n this.minVelocityY = this.config.minVelocity;\n }\n\n if (this.config.minVelocityX !== undefined) {\n this.minVelocityX = this.config.minVelocityX;\n }\n\n if (this.config.minVelocityY !== undefined) {\n this.minVelocityY = this.config.minVelocityY;\n }\n\n if (this.config.activateAfterLongPress !== undefined) {\n this.activateAfterLongPress = this.config.activateAfterLongPress;\n }\n\n if (this.config.activeOffsetXStart !== undefined) {\n this.activeOffsetXStart = this.config.activeOffsetXStart;\n\n if (this.config.activeOffsetXEnd === undefined) {\n this.activeOffsetXEnd = Number.MAX_SAFE_INTEGER;\n }\n }\n\n if (this.config.activeOffsetXEnd !== undefined) {\n this.activeOffsetXEnd = this.config.activeOffsetXEnd;\n\n if (this.config.activeOffsetXStart === undefined) {\n this.activeOffsetXStart = Number.MIN_SAFE_INTEGER;\n }\n }\n\n if (this.config.failOffsetXStart !== undefined) {\n this.failOffsetXStart = this.config.failOffsetXStart;\n\n if (this.config.failOffsetXEnd === undefined) {\n this.failOffsetXEnd = Number.MAX_SAFE_INTEGER;\n }\n }\n\n if (this.config.failOffsetXEnd !== undefined) {\n this.failOffsetXEnd = this.config.failOffsetXEnd;\n\n if (this.config.failOffsetXStart === undefined) {\n this.failOffsetXStart = Number.MIN_SAFE_INTEGER;\n }\n }\n\n if (this.config.activeOffsetYStart !== undefined) {\n this.activeOffsetYStart = this.config.activeOffsetYStart;\n\n if (this.config.activeOffsetYEnd === undefined) {\n this.activeOffsetYEnd = Number.MAX_SAFE_INTEGER;\n }\n }\n\n if (this.config.activeOffsetYEnd !== undefined) {\n this.activeOffsetYEnd = this.config.activeOffsetYEnd;\n\n if (this.config.activeOffsetYStart === undefined) {\n this.activeOffsetYStart = Number.MIN_SAFE_INTEGER;\n }\n }\n\n if (this.config.failOffsetYStart !== undefined) {\n this.failOffsetYStart = this.config.failOffsetYStart;\n\n if (this.config.failOffsetYEnd === undefined) {\n this.failOffsetYEnd = Number.MAX_SAFE_INTEGER;\n }\n }\n\n if (this.config.failOffsetYEnd !== undefined) {\n this.failOffsetYEnd = this.config.failOffsetYEnd;\n\n if (this.config.failOffsetYStart === undefined) {\n this.failOffsetYStart = Number.MIN_SAFE_INTEGER;\n }\n }\n\n if (this.config.enableTrackpadTwoFingerGesture !== undefined) {\n this.enableTrackpadTwoFingerGesture =\n this.config.enableTrackpadTwoFingerGesture;\n }\n }\n\n protected resetConfig(): void {\n super.resetConfig();\n\n this.activeOffsetXStart = -Number.MAX_SAFE_INTEGER;\n this.activeOffsetXEnd = Number.MIN_SAFE_INTEGER;\n this.failOffsetXStart = Number.MIN_SAFE_INTEGER;\n this.failOffsetXEnd = Number.MAX_SAFE_INTEGER;\n\n this.activeOffsetYStart = Number.MAX_SAFE_INTEGER;\n this.activeOffsetYEnd = Number.MIN_SAFE_INTEGER;\n this.failOffsetYStart = Number.MIN_SAFE_INTEGER;\n this.failOffsetYEnd = Number.MAX_SAFE_INTEGER;\n\n this.minVelocityX = Number.MAX_SAFE_INTEGER;\n this.minVelocityY = Number.MAX_SAFE_INTEGER;\n this.minVelocitySq = Number.MAX_SAFE_INTEGER;\n\n this.minDistSq = DEFAULT_MIN_DIST_SQ;\n\n this.minPointers = DEFAULT_MIN_POINTERS;\n this.maxPointers = DEFAULT_MAX_POINTERS;\n\n this.activateAfterLongPress = 0;\n }\n\n protected transformNativeEvent() {\n const translationX: number = this.getTranslationX();\n const translationY: number = this.getTranslationY();\n\n return {\n ...super.transformNativeEvent(),\n translationX: isNaN(translationX) ? 0 : translationX,\n translationY: isNaN(translationY) ? 0 : translationY,\n velocityX: this.velocityX,\n velocityY: this.velocityY,\n stylusData: this.stylusData,\n };\n }\n\n private getTranslationX(): number {\n return this.lastX - this.startX + this.offsetX;\n }\n private getTranslationY(): number {\n return this.lastY - this.startY + this.offsetY;\n }\n\n private clearActivationTimeout(): void {\n clearTimeout(this.activationTimeout);\n }\n\n // Events Handling\n protected onPointerDown(event: AdaptedEvent): void {\n if (!this.isButtonInConfig(event.button)) {\n return;\n }\n\n this.tracker.addToTracker(event);\n this.stylusData = event.stylusData;\n\n super.onPointerDown(event);\n\n const lastCoords = this.tracker.getAbsoluteCoordsAverage();\n this.lastX = lastCoords.x;\n this.lastY = lastCoords.y;\n\n this.startX = this.lastX;\n this.startY = this.lastY;\n\n this.tryBegin(event);\n this.checkBegan();\n\n this.tryToSendTouchEvent(event);\n }\n\n protected onPointerAdd(event: AdaptedEvent): void {\n this.tracker.addToTracker(event);\n super.onPointerAdd(event);\n this.tryBegin(event);\n\n this.offsetX += this.lastX - this.startX;\n this.offsetY += this.lastY - this.startY;\n\n const lastCoords = this.tracker.getAbsoluteCoordsAverage();\n this.lastX = lastCoords.x;\n this.lastY = lastCoords.y;\n\n this.startX = this.lastX;\n this.startY = this.lastY;\n\n if (this.tracker.trackedPointersCount > this.maxPointers) {\n if (this.state === State.ACTIVE) {\n this.cancel();\n } else {\n this.fail();\n }\n } else {\n this.checkBegan();\n }\n }\n\n protected onPointerUp(event: AdaptedEvent): void {\n this.stylusData = event.stylusData;\n\n super.onPointerUp(event);\n if (this.state === State.ACTIVE) {\n const lastCoords = this.tracker.getAbsoluteCoordsAverage();\n this.lastX = lastCoords.x;\n this.lastY = lastCoords.y;\n }\n\n this.tracker.removeFromTracker(event.pointerId);\n\n if (this.tracker.trackedPointersCount === 0) {\n this.clearActivationTimeout();\n }\n\n if (this.state === State.ACTIVE) {\n this.end();\n } else {\n this.resetProgress();\n this.fail();\n }\n }\n\n protected onPointerRemove(event: AdaptedEvent): void {\n super.onPointerRemove(event);\n this.tracker.removeFromTracker(event.pointerId);\n\n this.offsetX += this.lastX - this.startX;\n this.offsetY += this.lastY - this.startY;\n\n const lastCoords = this.tracker.getAbsoluteCoordsAverage();\n this.lastX = lastCoords.x;\n this.lastY = lastCoords.y;\n\n this.startX = this.lastX;\n this.startY = this.lastY;\n\n if (\n !(\n this.state === State.ACTIVE &&\n this.tracker.trackedPointersCount < this.minPointers\n )\n ) {\n this.checkBegan();\n }\n }\n\n protected onPointerMove(event: AdaptedEvent): void {\n this.tracker.track(event);\n this.stylusData = event.stylusData;\n\n const lastCoords = this.tracker.getAbsoluteCoordsAverage();\n this.lastX = lastCoords.x;\n this.lastY = lastCoords.y;\n\n const velocity = this.tracker.getVelocity(event.pointerId);\n this.velocityX = velocity.x;\n this.velocityY = velocity.y;\n\n this.checkBegan();\n\n super.onPointerMove(event);\n }\n\n protected onPointerOutOfBounds(event: AdaptedEvent): void {\n if (this.shouldCancelWhenOutside) {\n return;\n }\n\n this.tracker.track(event);\n this.stylusData = event.stylusData;\n\n const lastCoords = this.tracker.getAbsoluteCoordsAverage();\n this.lastX = lastCoords.x;\n this.lastY = lastCoords.y;\n\n const velocity = this.tracker.getVelocity(event.pointerId);\n this.velocityX = velocity.x;\n this.velocityY = velocity.y;\n\n this.checkBegan();\n\n if (this.state === State.ACTIVE) {\n super.onPointerOutOfBounds(event);\n }\n }\n\n private scheduleWheelEnd(event: AdaptedEvent) {\n clearTimeout(this.endWheelTimeout);\n\n this.endWheelTimeout = setTimeout(() => {\n if (this.state === State.ACTIVE) {\n this.end();\n this.tracker.removeFromTracker(event.pointerId);\n this.state = State.UNDETERMINED;\n }\n\n this.wheelDevice = WheelDevice.UNDETERMINED;\n }, 30);\n }\n\n protected onWheel(event: AdaptedEvent): void {\n if (\n this.wheelDevice === WheelDevice.MOUSE ||\n !this.enableTrackpadTwoFingerGesture\n ) {\n return;\n }\n\n if (this.state === State.UNDETERMINED) {\n this.wheelDevice =\n event.wheelDeltaY! % 120 !== 0\n ? WheelDevice.TOUCHPAD\n : WheelDevice.MOUSE;\n\n if (this.wheelDevice === WheelDevice.MOUSE) {\n this.scheduleWheelEnd(event);\n return;\n }\n\n this.tracker.addToTracker(event);\n\n const lastCoords = this.tracker.getAbsoluteCoordsAverage();\n this.lastX = lastCoords.x;\n this.lastY = lastCoords.y;\n\n this.startX = this.lastX;\n this.startY = this.lastY;\n\n this.begin();\n this.activate();\n }\n this.tracker.track(event);\n\n const lastCoords = this.tracker.getAbsoluteCoordsAverage();\n this.lastX = lastCoords.x;\n this.lastY = lastCoords.y;\n\n const velocity = this.tracker.getVelocity(event.pointerId);\n this.velocityX = velocity.x;\n this.velocityY = velocity.y;\n\n this.tryToSendMoveEvent(false, event);\n this.scheduleWheelEnd(event);\n }\n\n private shouldActivate(): boolean {\n const dx: number = this.getTranslationX();\n\n if (\n this.activeOffsetXStart !== Number.MAX_SAFE_INTEGER &&\n dx < this.activeOffsetXStart\n ) {\n return true;\n }\n\n if (\n this.activeOffsetXEnd !== Number.MIN_SAFE_INTEGER &&\n dx > this.activeOffsetXEnd\n ) {\n return true;\n }\n\n const dy: number = this.getTranslationY();\n\n if (\n this.activeOffsetYStart !== Number.MAX_SAFE_INTEGER &&\n dy < this.activeOffsetYStart\n ) {\n return true;\n }\n\n if (\n this.activeOffsetYEnd !== Number.MIN_SAFE_INTEGER &&\n dy > this.activeOffsetYEnd\n ) {\n return true;\n }\n\n const distanceSq: number = dx * dx + dy * dy;\n\n if (\n this.minDistSq !== Number.MAX_SAFE_INTEGER &&\n distanceSq >= this.minDistSq\n ) {\n return true;\n }\n\n const vx: number = this.velocityX;\n\n if (\n this.minVelocityX !== Number.MAX_SAFE_INTEGER &&\n ((this.minVelocityX < 0 && vx <= this.minVelocityX) ||\n (this.minVelocityX >= 0 && this.minVelocityX <= vx))\n ) {\n return true;\n }\n\n const vy: number = this.velocityY;\n if (\n this.minVelocityY !== Number.MAX_SAFE_INTEGER &&\n ((this.minVelocityY < 0 && vy <= this.minVelocityY) ||\n (this.minVelocityY >= 0 && this.minVelocityY <= vy))\n ) {\n return true;\n }\n\n const velocitySq: number = vx * vx + vy * vy;\n\n return (\n this.minVelocitySq !== Number.MAX_SAFE_INTEGER &&\n velocitySq >= this.minVelocitySq\n );\n }\n\n private shouldFail(): boolean {\n const dx: number = this.getTranslationX();\n const dy: number = this.getTranslationY();\n const distanceSq = dx * dx + dy * dy;\n\n if (this.activateAfterLongPress > 0 && distanceSq > DEFAULT_MIN_DIST_SQ) {\n this.clearActivationTimeout();\n return true;\n }\n\n if (\n this.failOffsetXStart !== Number.MIN_SAFE_INTEGER &&\n dx < this.failOffsetXStart\n ) {\n return true;\n }\n\n if (\n this.failOffsetXEnd !== Number.MAX_SAFE_INTEGER &&\n dx > this.failOffsetXEnd\n ) {\n return true;\n }\n\n if (\n this.failOffsetYStart !== Number.MIN_SAFE_INTEGER &&\n dy < this.failOffsetYStart\n ) {\n return true;\n }\n\n return (\n this.failOffsetYEnd !== Number.MAX_SAFE_INTEGER &&\n dy > this.failOffsetYEnd\n );\n }\n\n private tryBegin(event: AdaptedEvent): void {\n if (\n this.state === State.UNDETERMINED &&\n this.tracker.trackedPointersCount >= this.minPointers\n ) {\n this.resetProgress();\n this.offsetX = 0;\n this.offsetY = 0;\n this.velocityX = 0;\n this.velocityY = 0;\n\n this.begin();\n\n if (this.activateAfterLongPress > 0) {\n this.activationTimeout = setTimeout(() => {\n this.activate();\n }, this.activateAfterLongPress);\n }\n } else {\n const velocity = this.tracker.getVelocity(event.pointerId);\n this.velocityX = velocity.x;\n this.velocityY = velocity.y;\n }\n }\n\n private checkBegan(): void {\n if (this.state === State.BEGAN) {\n if (this.shouldFail()) {\n this.fail();\n } else if (this.shouldActivate()) {\n this.activate();\n }\n }\n }\n\n public activate(force = false): void {\n if (this.state !== State.ACTIVE) {\n this.resetProgress();\n }\n\n super.activate(force);\n }\n\n protected onCancel(): void {\n this.clearActivationTimeout();\n }\n\n protected onReset(): void {\n this.clearActivationTimeout();\n }\n\n protected resetProgress(): void {\n if (this.state === State.ACTIVE) {\n return;\n }\n\n this.startX = this.lastX;\n this.startY = this.lastY;\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAEA,IAAAG,eAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAA8C,SAAAI,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,gBAAAH,CAAA,EAAAI,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAJ,CAAA,GAAAO,MAAA,CAAAC,cAAA,CAAAR,CAAA,EAAAI,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EAAAK,UAAA,MAAAC,YAAA,MAAAC,QAAA,UAAAZ,CAAA,CAAAI,CAAA,IAAAC,CAAA,EAAAL,CAAA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