react-native-gesture-handler 2.25.0 → 2.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (880) hide show
  1. package/README.md +2 -4
  2. package/RNGestureHandler.podspec +1 -0
  3. package/android/build.gradle +41 -42
  4. package/android/fabric/src/main/java/com/swmansion/gesturehandler/ReactContextExtensions.kt +1 -1
  5. package/android/gradle.properties +1 -1
  6. package/android/noreanimated/src/main/java/com/swmansion/gesturehandler/ReanimatedEventDispatcher.kt +2 -2
  7. package/android/paper/src/main/java/com/swmansion/gesturehandler/ReactContextExtensions.kt +4 -1
  8. package/android/reanimated/src/main/java/com/swmansion/gesturehandler/ReanimatedEventDispatcher.kt +1 -1
  9. package/android/{package77/src → src}/main/java/com/swmansion/gesturehandler/RNGestureHandlerPackage.kt +14 -19
  10. package/android/src/main/java/com/swmansion/gesturehandler/core/FlingGestureHandler.kt +29 -5
  11. package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandler.kt +229 -114
  12. package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerInteractionController.kt +4 -4
  13. package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerOrchestrator.kt +91 -49
  14. package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerRegistry.kt +1 -1
  15. package/android/src/main/java/com/swmansion/gesturehandler/core/GestureUtils.kt +13 -4
  16. package/android/src/main/java/com/swmansion/gesturehandler/core/HoverGestureHandler.kt +20 -6
  17. package/android/src/main/java/com/swmansion/gesturehandler/core/LongPressGestureHandler.kt +52 -21
  18. package/android/src/main/java/com/swmansion/gesturehandler/core/ManualGestureHandler.kt +12 -1
  19. package/android/src/main/java/com/swmansion/gesturehandler/core/NativeViewGestureHandler.kt +65 -35
  20. package/android/src/main/java/com/swmansion/gesturehandler/core/OnTouchEventListener.kt +3 -3
  21. package/android/src/main/java/com/swmansion/gesturehandler/core/PanGestureHandler.kt +187 -92
  22. package/android/src/main/java/com/swmansion/gesturehandler/core/PinchGestureHandler.kt +12 -5
  23. package/android/src/main/java/com/swmansion/gesturehandler/core/PointerEventsConfig.kt +1 -1
  24. package/android/src/main/java/com/swmansion/gesturehandler/core/RotationGestureDetector.kt +3 -1
  25. package/android/src/main/java/com/swmansion/gesturehandler/core/RotationGestureHandler.kt +12 -5
  26. package/android/src/main/java/com/swmansion/gesturehandler/core/StylusData.kt +1 -1
  27. package/android/src/main/java/com/swmansion/gesturehandler/core/TapGestureHandler.kt +55 -33
  28. package/android/src/main/java/com/swmansion/gesturehandler/core/Vector.kt +13 -18
  29. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.kt +27 -21
  30. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEnabledRootView.kt +7 -2
  31. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEvent.kt +13 -12
  32. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEventDispatcher.kt +189 -0
  33. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerFactoryUtil.kt +34 -0
  34. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerInteractionManager.kt +7 -11
  35. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.kt +29 -590
  36. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRegistry.kt +8 -14
  37. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootHelper.kt +26 -16
  38. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootView.kt +15 -12
  39. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootViewManager.kt +2 -4
  40. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerStateChangeEvent.kt +17 -16
  41. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerTouchEvent.kt +6 -4
  42. package/android/src/main/java/com/swmansion/gesturehandler/react/RNViewConfigurationHelper.kt +7 -5
  43. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/FlingGestureHandlerEventDataBuilder.kt +2 -1
  44. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/GestureHandlerEventDataBuilder.kt +1 -1
  45. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/HoverGestureHandlerEventDataBuilder.kt +2 -1
  46. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/LongPressGestureHandlerEventDataBuilder.kt +2 -1
  47. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/ManualGestureHandlerEventDataBuilder.kt +2 -1
  48. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/NativeGestureHandlerEventDataBuilder.kt +2 -1
  49. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/PanGestureHandlerEventDataBuilder.kt +2 -1
  50. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/PinchGestureHandlerEventDataBuilder.kt +2 -1
  51. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/RotationGestureHandlerEventDataBuilder.kt +2 -1
  52. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/TapGestureHandlerEventDataBuilder.kt +2 -1
  53. package/android/src/main/jni/CMakeLists.txt +8 -18
  54. package/android/svg/src/main/java/com/swmansion/gesturehandler/RNSVGHitTester.kt +1 -3
  55. package/apple/RNGestureHandlerButton.mm +6 -2
  56. package/package.json +29 -47
  57. package/src/components/DrawerLayout.tsx +5 -2
  58. package/src/components/GestureButtons.tsx +2 -2
  59. package/src/components/GestureComponents.web.tsx +1 -1
  60. package/src/components/GestureHandlerButton.web.tsx +3 -3
  61. package/src/components/Pressable/Pressable.tsx +362 -425
  62. package/src/components/Pressable/PressableProps.tsx +34 -0
  63. package/src/components/Pressable/StateMachine.tsx +49 -0
  64. package/src/components/Pressable/stateDefinitions.ts +125 -0
  65. package/src/components/Pressable/utils.ts +11 -7
  66. package/src/components/ReanimatedSwipeable.tsx +55 -33
  67. package/src/components/Swipeable.tsx +3 -0
  68. package/src/components/Text.tsx +5 -2
  69. package/src/components/utils.ts +26 -0
  70. package/src/getShadowNodeFromRef.ts +2 -2
  71. package/src/handlers/GestureHandlerEventPayload.ts +3 -0
  72. package/src/handlers/createHandler.tsx +1 -0
  73. package/src/handlers/gestureHandlerTypesCompat.ts +9 -0
  74. package/src/handlers/gestures/forceTouchGesture.ts +9 -0
  75. package/src/handlers/gestures/gestureObjects.ts +3 -1
  76. package/src/handlers/gestures/reanimatedWrapper.ts +0 -1
  77. package/src/handlers/utils.ts +1 -1
  78. package/src/utils.ts +0 -1
  79. package/src/web/detectors/RotationGestureDetector.ts +4 -0
  80. package/src/web/handlers/FlingGestureHandler.ts +4 -0
  81. package/src/web/handlers/GestureHandler.ts +9 -3
  82. package/src/web/handlers/PanGestureHandler.ts +25 -36
  83. package/src/web/handlers/TapGestureHandler.ts +14 -19
  84. package/src/web/tools/GestureHandlerOrchestrator.ts +1 -0
  85. package/src/web/tools/PointerEventManager.ts +1 -1
  86. package/src/web/tools/PointerTracker.ts +17 -15
  87. package/src/web/tools/Vector.ts +1 -1
  88. package/src/web_hammer/DiscreteGestureHandler.ts +1 -1
  89. package/src/web_hammer/DraggingGestureHandler.ts +1 -1
  90. package/src/web_hammer/FlingGestureHandler.ts +1 -1
  91. package/src/web_hammer/GestureHandler.ts +2 -1
  92. package/src/web_hammer/LongPressGestureHandler.ts +1 -1
  93. package/android/packageDeprecated/src/main/java/com/swmansion/gesturehandler/RNGestureHandlerPackage.kt +0 -85
  94. package/android/paper77/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerButtonManagerDelegate.java +0 -60
  95. package/android/paper77/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerButtonManagerInterface.java +0 -26
  96. package/android/paper77/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerRootViewManagerDelegate.java +0 -26
  97. package/android/paper77/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerRootViewManagerInterface.java +0 -16
  98. package/android/paper77/src/main/java/com/swmansion/gesturehandler/NativeRNGestureHandlerModuleSpec.java +0 -67
  99. package/android/paper77/src/main/java/com/swmansion/gesturehandler/ReactContextExtensions.kt +0 -13
  100. package/lib/commonjs/ActionType.js +0 -15
  101. package/lib/commonjs/ActionType.js.map +0 -1
  102. package/lib/commonjs/Directions.js +0 -28
  103. package/lib/commonjs/Directions.js.map +0 -1
  104. package/lib/commonjs/EnableNewWebImplementation.js +0 -48
  105. package/lib/commonjs/EnableNewWebImplementation.js.map +0 -1
  106. package/lib/commonjs/GestureHandlerRootViewContext.js +0 -15
  107. package/lib/commonjs/GestureHandlerRootViewContext.js.map +0 -1
  108. package/lib/commonjs/PlatformConstants.js +0 -15
  109. package/lib/commonjs/PlatformConstants.js.map +0 -1
  110. package/lib/commonjs/PlatformConstants.web.js +0 -14
  111. package/lib/commonjs/PlatformConstants.web.js.map +0 -1
  112. package/lib/commonjs/PointerType.js +0 -17
  113. package/lib/commonjs/PointerType.js.map +0 -1
  114. package/lib/commonjs/RNGestureHandlerModule.js +0 -16
  115. package/lib/commonjs/RNGestureHandlerModule.js.map +0 -1
  116. package/lib/commonjs/RNGestureHandlerModule.web.js +0 -122
  117. package/lib/commonjs/RNGestureHandlerModule.web.js.map +0 -1
  118. package/lib/commonjs/RNGestureHandlerModule.windows.js +0 -66
  119. package/lib/commonjs/RNGestureHandlerModule.windows.js.map +0 -1
  120. package/lib/commonjs/RNRenderer.js +0 -16
  121. package/lib/commonjs/RNRenderer.js.map +0 -1
  122. package/lib/commonjs/RNRenderer.web.js +0 -11
  123. package/lib/commonjs/RNRenderer.web.js.map +0 -1
  124. package/lib/commonjs/State.js +0 -18
  125. package/lib/commonjs/State.js.map +0 -1
  126. package/lib/commonjs/TouchEventType.js +0 -16
  127. package/lib/commonjs/TouchEventType.js.map +0 -1
  128. package/lib/commonjs/components/DrawerLayout.js +0 -574
  129. package/lib/commonjs/components/DrawerLayout.js.map +0 -1
  130. package/lib/commonjs/components/GestureButtons.js +0 -269
  131. package/lib/commonjs/components/GestureButtons.js.map +0 -1
  132. package/lib/commonjs/components/GestureButtonsProps.js +0 -6
  133. package/lib/commonjs/components/GestureButtonsProps.js.map +0 -1
  134. package/lib/commonjs/components/GestureComponents.js +0 -115
  135. package/lib/commonjs/components/GestureComponents.js.map +0 -1
  136. package/lib/commonjs/components/GestureComponents.web.js +0 -52
  137. package/lib/commonjs/components/GestureComponents.web.js.map +0 -1
  138. package/lib/commonjs/components/GestureHandlerButton.js +0 -14
  139. package/lib/commonjs/components/GestureHandlerButton.js.map +0 -1
  140. package/lib/commonjs/components/GestureHandlerButton.web.js +0 -24
  141. package/lib/commonjs/components/GestureHandlerButton.web.js.map +0 -1
  142. package/lib/commonjs/components/GestureHandlerRootView.android.js +0 -46
  143. package/lib/commonjs/components/GestureHandlerRootView.android.js.map +0 -1
  144. package/lib/commonjs/components/GestureHandlerRootView.js +0 -44
  145. package/lib/commonjs/components/GestureHandlerRootView.js.map +0 -1
  146. package/lib/commonjs/components/GestureHandlerRootView.web.js +0 -38
  147. package/lib/commonjs/components/GestureHandlerRootView.web.js.map +0 -1
  148. package/lib/commonjs/components/Pressable/Pressable.js +0 -370
  149. package/lib/commonjs/components/Pressable/Pressable.js.map +0 -1
  150. package/lib/commonjs/components/Pressable/PressableProps.js +0 -6
  151. package/lib/commonjs/components/Pressable/PressableProps.js.map +0 -1
  152. package/lib/commonjs/components/Pressable/index.js +0 -16
  153. package/lib/commonjs/components/Pressable/index.js.map +0 -1
  154. package/lib/commonjs/components/Pressable/utils.js +0 -114
  155. package/lib/commonjs/components/Pressable/utils.js.map +0 -1
  156. package/lib/commonjs/components/ReanimatedDrawerLayout.js +0 -393
  157. package/lib/commonjs/components/ReanimatedDrawerLayout.js.map +0 -1
  158. package/lib/commonjs/components/ReanimatedSwipeable.js +0 -367
  159. package/lib/commonjs/components/ReanimatedSwipeable.js.map +0 -1
  160. package/lib/commonjs/components/Swipeable.js +0 -415
  161. package/lib/commonjs/components/Swipeable.js.map +0 -1
  162. package/lib/commonjs/components/Text.js +0 -71
  163. package/lib/commonjs/components/Text.js.map +0 -1
  164. package/lib/commonjs/components/gestureHandlerRootHOC.js +0 -40
  165. package/lib/commonjs/components/gestureHandlerRootHOC.js.map +0 -1
  166. package/lib/commonjs/components/touchables/ExtraButtonProps.js +0 -2
  167. package/lib/commonjs/components/touchables/ExtraButtonProps.js.map +0 -1
  168. package/lib/commonjs/components/touchables/GenericTouchable.js +0 -290
  169. package/lib/commonjs/components/touchables/GenericTouchable.js.map +0 -1
  170. package/lib/commonjs/components/touchables/GenericTouchableProps.js +0 -6
  171. package/lib/commonjs/components/touchables/GenericTouchableProps.js.map +0 -1
  172. package/lib/commonjs/components/touchables/TouchableHighlight.js +0 -111
  173. package/lib/commonjs/components/touchables/TouchableHighlight.js.map +0 -1
  174. package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js +0 -102
  175. package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js.map +0 -1
  176. package/lib/commonjs/components/touchables/TouchableNativeFeedback.js +0 -16
  177. package/lib/commonjs/components/touchables/TouchableNativeFeedback.js.map +0 -1
  178. package/lib/commonjs/components/touchables/TouchableNativeFeedbackProps.js +0 -6
  179. package/lib/commonjs/components/touchables/TouchableNativeFeedbackProps.js.map +0 -1
  180. package/lib/commonjs/components/touchables/TouchableOpacity.js +0 -79
  181. package/lib/commonjs/components/touchables/TouchableOpacity.js.map +0 -1
  182. package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js +0 -37
  183. package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js.map +0 -1
  184. package/lib/commonjs/components/touchables/index.js +0 -40
  185. package/lib/commonjs/components/touchables/index.js.map +0 -1
  186. package/lib/commonjs/findNodeHandle.js +0 -12
  187. package/lib/commonjs/findNodeHandle.js.map +0 -1
  188. package/lib/commonjs/findNodeHandle.web.js +0 -48
  189. package/lib/commonjs/findNodeHandle.web.js.map +0 -1
  190. package/lib/commonjs/getShadowNodeFromRef.js +0 -52
  191. package/lib/commonjs/getShadowNodeFromRef.js.map +0 -1
  192. package/lib/commonjs/getShadowNodeFromRef.web.js +0 -15
  193. package/lib/commonjs/getShadowNodeFromRef.web.js.map +0 -1
  194. package/lib/commonjs/ghQueueMicrotask.js +0 -11
  195. package/lib/commonjs/ghQueueMicrotask.js.map +0 -1
  196. package/lib/commonjs/handlers/FlingGestureHandler.js +0 -33
  197. package/lib/commonjs/handlers/FlingGestureHandler.js.map +0 -1
  198. package/lib/commonjs/handlers/ForceTouchGestureHandler.js +0 -53
  199. package/lib/commonjs/handlers/ForceTouchGestureHandler.js.map +0 -1
  200. package/lib/commonjs/handlers/GestureHandlerEventPayload.js +0 -6
  201. package/lib/commonjs/handlers/GestureHandlerEventPayload.js.map +0 -1
  202. package/lib/commonjs/handlers/LongPressGestureHandler.js +0 -35
  203. package/lib/commonjs/handlers/LongPressGestureHandler.js.map +0 -1
  204. package/lib/commonjs/handlers/NativeViewGestureHandler.js +0 -35
  205. package/lib/commonjs/handlers/NativeViewGestureHandler.js.map +0 -1
  206. package/lib/commonjs/handlers/PanGestureHandler.js +0 -131
  207. package/lib/commonjs/handlers/PanGestureHandler.js.map +0 -1
  208. package/lib/commonjs/handlers/PinchGestureHandler.js +0 -31
  209. package/lib/commonjs/handlers/PinchGestureHandler.js.map +0 -1
  210. package/lib/commonjs/handlers/PressabilityDebugView.js +0 -14
  211. package/lib/commonjs/handlers/PressabilityDebugView.js.map +0 -1
  212. package/lib/commonjs/handlers/PressabilityDebugView.web.js +0 -12
  213. package/lib/commonjs/handlers/PressabilityDebugView.web.js.map +0 -1
  214. package/lib/commonjs/handlers/RotationGestureHandler.js +0 -31
  215. package/lib/commonjs/handlers/RotationGestureHandler.js.map +0 -1
  216. package/lib/commonjs/handlers/TapGestureHandler.js +0 -35
  217. package/lib/commonjs/handlers/TapGestureHandler.js.map +0 -1
  218. package/lib/commonjs/handlers/createHandler.js +0 -494
  219. package/lib/commonjs/handlers/createHandler.js.map +0 -1
  220. package/lib/commonjs/handlers/createNativeWrapper.js +0 -87
  221. package/lib/commonjs/handlers/createNativeWrapper.js.map +0 -1
  222. package/lib/commonjs/handlers/customDirectEventTypes.js +0 -14
  223. package/lib/commonjs/handlers/customDirectEventTypes.js.map +0 -1
  224. package/lib/commonjs/handlers/customDirectEventTypes.web.js +0 -11
  225. package/lib/commonjs/handlers/customDirectEventTypes.web.js.map +0 -1
  226. package/lib/commonjs/handlers/gestureHandlerCommon.js +0 -28
  227. package/lib/commonjs/handlers/gestureHandlerCommon.js.map +0 -1
  228. package/lib/commonjs/handlers/gestureHandlerTypesCompat.js +0 -6
  229. package/lib/commonjs/handlers/gestureHandlerTypesCompat.js.map +0 -1
  230. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.js +0 -42
  231. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.js.map +0 -1
  232. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.web.js +0 -49
  233. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.web.js.map +0 -1
  234. package/lib/commonjs/handlers/gestures/GestureDetector/attachHandlers.js +0 -87
  235. package/lib/commonjs/handlers/gestures/GestureDetector/attachHandlers.js.map +0 -1
  236. package/lib/commonjs/handlers/gestures/GestureDetector/dropHandlers.js +0 -29
  237. package/lib/commonjs/handlers/gestures/GestureDetector/dropHandlers.js.map +0 -1
  238. package/lib/commonjs/handlers/gestures/GestureDetector/index.js +0 -148
  239. package/lib/commonjs/handlers/gestures/GestureDetector/index.js.map +0 -1
  240. package/lib/commonjs/handlers/gestures/GestureDetector/needsToReattach.js +0 -25
  241. package/lib/commonjs/handlers/gestures/GestureDetector/needsToReattach.js.map +0 -1
  242. package/lib/commonjs/handlers/gestures/GestureDetector/types.js +0 -6
  243. package/lib/commonjs/handlers/gestures/GestureDetector/types.js.map +0 -1
  244. package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js +0 -77
  245. package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js.map +0 -1
  246. package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js +0 -180
  247. package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +0 -1
  248. package/lib/commonjs/handlers/gestures/GestureDetector/useDetectorUpdater.js +0 -57
  249. package/lib/commonjs/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +0 -1
  250. package/lib/commonjs/handlers/gestures/GestureDetector/useMountReactions.js +0 -48
  251. package/lib/commonjs/handlers/gestures/GestureDetector/useMountReactions.js.map +0 -1
  252. package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js +0 -49
  253. package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js.map +0 -1
  254. package/lib/commonjs/handlers/gestures/GestureDetector/utils.js +0 -172
  255. package/lib/commonjs/handlers/gestures/GestureDetector/utils.js.map +0 -1
  256. package/lib/commonjs/handlers/gestures/eventReceiver.js +0 -147
  257. package/lib/commonjs/handlers/gestures/eventReceiver.js.map +0 -1
  258. package/lib/commonjs/handlers/gestures/flingGesture.js +0 -47
  259. package/lib/commonjs/handlers/gestures/flingGesture.js.map +0 -1
  260. package/lib/commonjs/handlers/gestures/forceTouchGesture.js +0 -82
  261. package/lib/commonjs/handlers/gestures/forceTouchGesture.js.map +0 -1
  262. package/lib/commonjs/handlers/gestures/gesture.js +0 -381
  263. package/lib/commonjs/handlers/gestures/gesture.js.map +0 -1
  264. package/lib/commonjs/handlers/gestures/gestureComposition.js +0 -107
  265. package/lib/commonjs/handlers/gestures/gestureComposition.js.map +0 -1
  266. package/lib/commonjs/handlers/gestures/gestureObjects.js +0 -156
  267. package/lib/commonjs/handlers/gestures/gestureObjects.js.map +0 -1
  268. package/lib/commonjs/handlers/gestures/gestureStateManager.js +0 -75
  269. package/lib/commonjs/handlers/gestures/gestureStateManager.js.map +0 -1
  270. package/lib/commonjs/handlers/gestures/gestureStateManager.web.js +0 -32
  271. package/lib/commonjs/handlers/gestures/gestureStateManager.web.js.map +0 -1
  272. package/lib/commonjs/handlers/gestures/hoverGesture.js +0 -74
  273. package/lib/commonjs/handlers/gestures/hoverGesture.js.map +0 -1
  274. package/lib/commonjs/handlers/gestures/longPressGesture.js +0 -57
  275. package/lib/commonjs/handlers/gestures/longPressGesture.js.map +0 -1
  276. package/lib/commonjs/handlers/gestures/manualGesture.js +0 -31
  277. package/lib/commonjs/handlers/gestures/manualGesture.js.map +0 -1
  278. package/lib/commonjs/handlers/gestures/nativeGesture.js +0 -44
  279. package/lib/commonjs/handlers/gestures/nativeGesture.js.map +0 -1
  280. package/lib/commonjs/handlers/gestures/panGesture.js +0 -225
  281. package/lib/commonjs/handlers/gestures/panGesture.js.map +0 -1
  282. package/lib/commonjs/handlers/gestures/pinchGesture.js +0 -45
  283. package/lib/commonjs/handlers/gestures/pinchGesture.js.map +0 -1
  284. package/lib/commonjs/handlers/gestures/reanimatedWrapper.js +0 -37
  285. package/lib/commonjs/handlers/gestures/reanimatedWrapper.js.map +0 -1
  286. package/lib/commonjs/handlers/gestures/rotationGesture.js +0 -45
  287. package/lib/commonjs/handlers/gestures/rotationGesture.js.map +0 -1
  288. package/lib/commonjs/handlers/gestures/tapGesture.js +0 -102
  289. package/lib/commonjs/handlers/gestures/tapGesture.js.map +0 -1
  290. package/lib/commonjs/handlers/getNextHandlerTag.js +0 -12
  291. package/lib/commonjs/handlers/getNextHandlerTag.js.map +0 -1
  292. package/lib/commonjs/handlers/handlersRegistry.js +0 -66
  293. package/lib/commonjs/handlers/handlersRegistry.js.map +0 -1
  294. package/lib/commonjs/handlers/utils.js +0 -92
  295. package/lib/commonjs/handlers/utils.js.map +0 -1
  296. package/lib/commonjs/index.js +0 -298
  297. package/lib/commonjs/index.js.map +0 -1
  298. package/lib/commonjs/init.js +0 -32
  299. package/lib/commonjs/init.js.map +0 -1
  300. package/lib/commonjs/jestUtils/index.js +0 -20
  301. package/lib/commonjs/jestUtils/index.js.map +0 -1
  302. package/lib/commonjs/jestUtils/jestUtils.js +0 -383
  303. package/lib/commonjs/jestUtils/jestUtils.js.map +0 -1
  304. package/lib/commonjs/mocks.js +0 -81
  305. package/lib/commonjs/mocks.js.map +0 -1
  306. package/lib/commonjs/mountRegistry.js +0 -49
  307. package/lib/commonjs/mountRegistry.js.map +0 -1
  308. package/lib/commonjs/specs/NativeRNGestureHandlerModule.js +0 -13
  309. package/lib/commonjs/specs/NativeRNGestureHandlerModule.js.map +0 -1
  310. package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js +0 -15
  311. package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js.map +0 -1
  312. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js +0 -15
  313. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js.map +0 -1
  314. package/lib/commonjs/typeUtils.js +0 -2
  315. package/lib/commonjs/typeUtils.js.map +0 -1
  316. package/lib/commonjs/utils.js +0 -116
  317. package/lib/commonjs/utils.js.map +0 -1
  318. package/lib/commonjs/web/Gestures.js +0 -66
  319. package/lib/commonjs/web/Gestures.js.map +0 -1
  320. package/lib/commonjs/web/constants.js +0 -11
  321. package/lib/commonjs/web/constants.js.map +0 -1
  322. package/lib/commonjs/web/detectors/RotationGestureDetector.js +0 -163
  323. package/lib/commonjs/web/detectors/RotationGestureDetector.js.map +0 -1
  324. package/lib/commonjs/web/detectors/ScaleGestureDetector.js +0 -155
  325. package/lib/commonjs/web/detectors/ScaleGestureDetector.js.map +0 -1
  326. package/lib/commonjs/web/handlers/FlingGestureHandler.js +0 -190
  327. package/lib/commonjs/web/handlers/FlingGestureHandler.js.map +0 -1
  328. package/lib/commonjs/web/handlers/GestureHandler.js +0 -821
  329. package/lib/commonjs/web/handlers/GestureHandler.js.map +0 -1
  330. package/lib/commonjs/web/handlers/HoverGestureHandler.js +0 -65
  331. package/lib/commonjs/web/handlers/HoverGestureHandler.js.map +0 -1
  332. package/lib/commonjs/web/handlers/IGestureHandler.js +0 -2
  333. package/lib/commonjs/web/handlers/IGestureHandler.js.map +0 -1
  334. package/lib/commonjs/web/handlers/LongPressGestureHandler.js +0 -194
  335. package/lib/commonjs/web/handlers/LongPressGestureHandler.js.map +0 -1
  336. package/lib/commonjs/web/handlers/ManualGestureHandler.js +0 -48
  337. package/lib/commonjs/web/handlers/ManualGestureHandler.js.map +0 -1
  338. package/lib/commonjs/web/handlers/NativeViewGestureHandler.js +0 -189
  339. package/lib/commonjs/web/handlers/NativeViewGestureHandler.js.map +0 -1
  340. package/lib/commonjs/web/handlers/PanGestureHandler.js +0 -530
  341. package/lib/commonjs/web/handlers/PanGestureHandler.js.map +0 -1
  342. package/lib/commonjs/web/handlers/PinchGestureHandler.js +0 -165
  343. package/lib/commonjs/web/handlers/PinchGestureHandler.js.map +0 -1
  344. package/lib/commonjs/web/handlers/RotationGestureHandler.js +0 -173
  345. package/lib/commonjs/web/handlers/RotationGestureHandler.js.map +0 -1
  346. package/lib/commonjs/web/handlers/TapGestureHandler.js +0 -286
  347. package/lib/commonjs/web/handlers/TapGestureHandler.js.map +0 -1
  348. package/lib/commonjs/web/interfaces.js +0 -40
  349. package/lib/commonjs/web/interfaces.js.map +0 -1
  350. package/lib/commonjs/web/tools/CircularBuffer.js +0 -59
  351. package/lib/commonjs/web/tools/CircularBuffer.js.map +0 -1
  352. package/lib/commonjs/web/tools/EventManager.js +0 -133
  353. package/lib/commonjs/web/tools/EventManager.js.map +0 -1
  354. package/lib/commonjs/web/tools/GestureHandlerDelegate.js +0 -6
  355. package/lib/commonjs/web/tools/GestureHandlerDelegate.js.map +0 -1
  356. package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js +0 -340
  357. package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js.map +0 -1
  358. package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js +0 -217
  359. package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js.map +0 -1
  360. package/lib/commonjs/web/tools/InteractionManager.js +0 -119
  361. package/lib/commonjs/web/tools/InteractionManager.js.map +0 -1
  362. package/lib/commonjs/web/tools/KeyboardEventManager.js +0 -110
  363. package/lib/commonjs/web/tools/KeyboardEventManager.js.map +0 -1
  364. package/lib/commonjs/web/tools/LeastSquareSolver.js +0 -204
  365. package/lib/commonjs/web/tools/LeastSquareSolver.js.map +0 -1
  366. package/lib/commonjs/web/tools/NodeManager.js +0 -49
  367. package/lib/commonjs/web/tools/NodeManager.js.map +0 -1
  368. package/lib/commonjs/web/tools/PointerEventManager.js +0 -229
  369. package/lib/commonjs/web/tools/PointerEventManager.js.map +0 -1
  370. package/lib/commonjs/web/tools/PointerTracker.js +0 -234
  371. package/lib/commonjs/web/tools/PointerTracker.js.map +0 -1
  372. package/lib/commonjs/web/tools/Vector.js +0 -61
  373. package/lib/commonjs/web/tools/Vector.js.map +0 -1
  374. package/lib/commonjs/web/tools/VelocityTracker.js +0 -111
  375. package/lib/commonjs/web/tools/VelocityTracker.js.map +0 -1
  376. package/lib/commonjs/web/tools/WheelEventManager.js +0 -74
  377. package/lib/commonjs/web/tools/WheelEventManager.js.map +0 -1
  378. package/lib/commonjs/web/utils.js +0 -270
  379. package/lib/commonjs/web/utils.js.map +0 -1
  380. package/lib/commonjs/web_hammer/DiscreteGestureHandler.js +0 -105
  381. package/lib/commonjs/web_hammer/DiscreteGestureHandler.js.map +0 -1
  382. package/lib/commonjs/web_hammer/DraggingGestureHandler.js +0 -53
  383. package/lib/commonjs/web_hammer/DraggingGestureHandler.js.map +0 -1
  384. package/lib/commonjs/web_hammer/Errors.js +0 -16
  385. package/lib/commonjs/web_hammer/Errors.js.map +0 -1
  386. package/lib/commonjs/web_hammer/FlingGestureHandler.js +0 -170
  387. package/lib/commonjs/web_hammer/FlingGestureHandler.js.map +0 -1
  388. package/lib/commonjs/web_hammer/GestureHandler.js +0 -579
  389. package/lib/commonjs/web_hammer/GestureHandler.js.map +0 -1
  390. package/lib/commonjs/web_hammer/IndiscreteGestureHandler.js +0 -54
  391. package/lib/commonjs/web_hammer/IndiscreteGestureHandler.js.map +0 -1
  392. package/lib/commonjs/web_hammer/LongPressGestureHandler.js +0 -71
  393. package/lib/commonjs/web_hammer/LongPressGestureHandler.js.map +0 -1
  394. package/lib/commonjs/web_hammer/NativeViewGestureHandler.js +0 -66
  395. package/lib/commonjs/web_hammer/NativeViewGestureHandler.js.map +0 -1
  396. package/lib/commonjs/web_hammer/NodeManager.js +0 -48
  397. package/lib/commonjs/web_hammer/NodeManager.js.map +0 -1
  398. package/lib/commonjs/web_hammer/PanGestureHandler.js +0 -208
  399. package/lib/commonjs/web_hammer/PanGestureHandler.js.map +0 -1
  400. package/lib/commonjs/web_hammer/PinchGestureHandler.js +0 -40
  401. package/lib/commonjs/web_hammer/PinchGestureHandler.js.map +0 -1
  402. package/lib/commonjs/web_hammer/PressGestureHandler.js +0 -188
  403. package/lib/commonjs/web_hammer/PressGestureHandler.js.map +0 -1
  404. package/lib/commonjs/web_hammer/RotationGestureHandler.js +0 -44
  405. package/lib/commonjs/web_hammer/RotationGestureHandler.js.map +0 -1
  406. package/lib/commonjs/web_hammer/TapGestureHandler.js +0 -192
  407. package/lib/commonjs/web_hammer/TapGestureHandler.js.map +0 -1
  408. package/lib/commonjs/web_hammer/constants.js +0 -64
  409. package/lib/commonjs/web_hammer/constants.js.map +0 -1
  410. package/lib/commonjs/web_hammer/utils.js +0 -42
  411. package/lib/commonjs/web_hammer/utils.js.map +0 -1
  412. package/lib/module/ActionType.js +0 -7
  413. package/lib/module/ActionType.js.map +0 -1
  414. package/lib/module/Directions.js +0 -19
  415. package/lib/module/Directions.js.map +0 -1
  416. package/lib/module/EnableNewWebImplementation.js +0 -35
  417. package/lib/module/EnableNewWebImplementation.js.map +0 -1
  418. package/lib/module/GestureHandlerRootViewContext.js +0 -3
  419. package/lib/module/GestureHandlerRootViewContext.js.map +0 -1
  420. package/lib/module/PlatformConstants.js +0 -5
  421. package/lib/module/PlatformConstants.js.map +0 -1
  422. package/lib/module/PlatformConstants.web.js +0 -7
  423. package/lib/module/PlatformConstants.web.js.map +0 -1
  424. package/lib/module/PointerType.js +0 -10
  425. package/lib/module/PointerType.js.map +0 -1
  426. package/lib/module/RNGestureHandlerModule.js +0 -5
  427. package/lib/module/RNGestureHandlerModule.js.map +0 -1
  428. package/lib/module/RNGestureHandlerModule.web.js +0 -98
  429. package/lib/module/RNGestureHandlerModule.web.js.map +0 -1
  430. package/lib/module/RNGestureHandlerModule.windows.js +0 -47
  431. package/lib/module/RNGestureHandlerModule.windows.js.map +0 -1
  432. package/lib/module/RNRenderer.js +0 -4
  433. package/lib/module/RNRenderer.js.map +0 -1
  434. package/lib/module/RNRenderer.web.js +0 -4
  435. package/lib/module/RNRenderer.web.js.map +0 -1
  436. package/lib/module/State.js +0 -10
  437. package/lib/module/State.js.map +0 -1
  438. package/lib/module/TouchEventType.js +0 -8
  439. package/lib/module/TouchEventType.js.map +0 -1
  440. package/lib/module/components/DrawerLayout.js +0 -560
  441. package/lib/module/components/DrawerLayout.js.map +0 -1
  442. package/lib/module/components/GestureButtons.js +0 -237
  443. package/lib/module/components/GestureButtons.js.map +0 -1
  444. package/lib/module/components/GestureButtonsProps.js +0 -2
  445. package/lib/module/components/GestureButtonsProps.js.map +0 -1
  446. package/lib/module/components/GestureComponents.js +0 -90
  447. package/lib/module/components/GestureComponents.js.map +0 -1
  448. package/lib/module/components/GestureComponents.web.js +0 -28
  449. package/lib/module/components/GestureComponents.web.js.map +0 -1
  450. package/lib/module/components/GestureHandlerButton.js +0 -3
  451. package/lib/module/components/GestureHandlerButton.js.map +0 -1
  452. package/lib/module/components/GestureHandlerButton.web.js +0 -9
  453. package/lib/module/components/GestureHandlerButton.web.js.map +0 -1
  454. package/lib/module/components/GestureHandlerRootView.android.js +0 -27
  455. package/lib/module/components/GestureHandlerRootView.android.js.map +0 -1
  456. package/lib/module/components/GestureHandlerRootView.js +0 -26
  457. package/lib/module/components/GestureHandlerRootView.js.map +0 -1
  458. package/lib/module/components/GestureHandlerRootView.web.js +0 -21
  459. package/lib/module/components/GestureHandlerRootView.web.js.map +0 -1
  460. package/lib/module/components/Pressable/Pressable.js +0 -346
  461. package/lib/module/components/Pressable/Pressable.js.map +0 -1
  462. package/lib/module/components/Pressable/PressableProps.js +0 -2
  463. package/lib/module/components/Pressable/PressableProps.js.map +0 -1
  464. package/lib/module/components/Pressable/index.js +0 -2
  465. package/lib/module/components/Pressable/index.js.map +0 -1
  466. package/lib/module/components/Pressable/utils.js +0 -99
  467. package/lib/module/components/Pressable/utils.js.map +0 -1
  468. package/lib/module/components/ReanimatedDrawerLayout.js +0 -369
  469. package/lib/module/components/ReanimatedDrawerLayout.js.map +0 -1
  470. package/lib/module/components/ReanimatedSwipeable.js +0 -350
  471. package/lib/module/components/ReanimatedSwipeable.js.map +0 -1
  472. package/lib/module/components/Swipeable.js +0 -398
  473. package/lib/module/components/Swipeable.js.map +0 -1
  474. package/lib/module/components/Text.js +0 -53
  475. package/lib/module/components/Text.js.map +0 -1
  476. package/lib/module/components/gestureHandlerRootHOC.js +0 -22
  477. package/lib/module/components/gestureHandlerRootHOC.js.map +0 -1
  478. package/lib/module/components/touchables/ExtraButtonProps.js +0 -2
  479. package/lib/module/components/touchables/ExtraButtonProps.js.map +0 -1
  480. package/lib/module/components/touchables/GenericTouchable.js +0 -274
  481. package/lib/module/components/touchables/GenericTouchable.js.map +0 -1
  482. package/lib/module/components/touchables/GenericTouchableProps.js +0 -2
  483. package/lib/module/components/touchables/GenericTouchableProps.js.map +0 -1
  484. package/lib/module/components/touchables/TouchableHighlight.js +0 -97
  485. package/lib/module/components/touchables/TouchableHighlight.js.map +0 -1
  486. package/lib/module/components/touchables/TouchableNativeFeedback.android.js +0 -86
  487. package/lib/module/components/touchables/TouchableNativeFeedback.android.js.map +0 -1
  488. package/lib/module/components/touchables/TouchableNativeFeedback.js +0 -8
  489. package/lib/module/components/touchables/TouchableNativeFeedback.js.map +0 -1
  490. package/lib/module/components/touchables/TouchableNativeFeedbackProps.js +0 -2
  491. package/lib/module/components/touchables/TouchableNativeFeedbackProps.js.map +0 -1
  492. package/lib/module/components/touchables/TouchableOpacity.js +0 -68
  493. package/lib/module/components/touchables/TouchableOpacity.js.map +0 -1
  494. package/lib/module/components/touchables/TouchableWithoutFeedback.js +0 -22
  495. package/lib/module/components/touchables/TouchableWithoutFeedback.js.map +0 -1
  496. package/lib/module/components/touchables/index.js +0 -5
  497. package/lib/module/components/touchables/index.js.map +0 -1
  498. package/lib/module/findNodeHandle.js +0 -3
  499. package/lib/module/findNodeHandle.js.map +0 -1
  500. package/lib/module/findNodeHandle.web.js +0 -39
  501. package/lib/module/findNodeHandle.web.js.map +0 -1
  502. package/lib/module/getShadowNodeFromRef.js +0 -45
  503. package/lib/module/getShadowNodeFromRef.js.map +0 -1
  504. package/lib/module/getShadowNodeFromRef.web.js +0 -8
  505. package/lib/module/getShadowNodeFromRef.web.js.map +0 -1
  506. package/lib/module/ghQueueMicrotask.js +0 -4
  507. package/lib/module/ghQueueMicrotask.js.map +0 -1
  508. package/lib/module/handlers/FlingGestureHandler.js +0 -18
  509. package/lib/module/handlers/FlingGestureHandler.js.map +0 -1
  510. package/lib/module/handlers/ForceTouchGestureHandler.js +0 -35
  511. package/lib/module/handlers/ForceTouchGestureHandler.js.map +0 -1
  512. package/lib/module/handlers/GestureHandlerEventPayload.js +0 -2
  513. package/lib/module/handlers/GestureHandlerEventPayload.js.map +0 -1
  514. package/lib/module/handlers/LongPressGestureHandler.js +0 -20
  515. package/lib/module/handlers/LongPressGestureHandler.js.map +0 -1
  516. package/lib/module/handlers/NativeViewGestureHandler.js +0 -19
  517. package/lib/module/handlers/NativeViewGestureHandler.js.map +0 -1
  518. package/lib/module/handlers/PanGestureHandler.js +0 -114
  519. package/lib/module/handlers/PanGestureHandler.js.map +0 -1
  520. package/lib/module/handlers/PinchGestureHandler.js +0 -21
  521. package/lib/module/handlers/PinchGestureHandler.js.map +0 -1
  522. package/lib/module/handlers/PressabilityDebugView.js +0 -3
  523. package/lib/module/handlers/PressabilityDebugView.js.map +0 -1
  524. package/lib/module/handlers/PressabilityDebugView.web.js +0 -5
  525. package/lib/module/handlers/PressabilityDebugView.web.js.map +0 -1
  526. package/lib/module/handlers/RotationGestureHandler.js +0 -21
  527. package/lib/module/handlers/RotationGestureHandler.js.map +0 -1
  528. package/lib/module/handlers/TapGestureHandler.js +0 -20
  529. package/lib/module/handlers/TapGestureHandler.js.map +0 -1
  530. package/lib/module/handlers/createHandler.js +0 -460
  531. package/lib/module/handlers/createHandler.js.map +0 -1
  532. package/lib/module/handlers/createNativeWrapper.js +0 -75
  533. package/lib/module/handlers/createNativeWrapper.js.map +0 -1
  534. package/lib/module/handlers/customDirectEventTypes.js +0 -3
  535. package/lib/module/handlers/customDirectEventTypes.js.map +0 -1
  536. package/lib/module/handlers/customDirectEventTypes.web.js +0 -5
  537. package/lib/module/handlers/customDirectEventTypes.web.js.map +0 -1
  538. package/lib/module/handlers/gestureHandlerCommon.js +0 -19
  539. package/lib/module/handlers/gestureHandlerCommon.js.map +0 -1
  540. package/lib/module/handlers/gestureHandlerTypesCompat.js +0 -2
  541. package/lib/module/handlers/gestureHandlerTypesCompat.js.map +0 -1
  542. package/lib/module/handlers/gestures/GestureDetector/Wrap.js +0 -26
  543. package/lib/module/handlers/gestures/GestureDetector/Wrap.js.map +0 -1
  544. package/lib/module/handlers/gestures/GestureDetector/Wrap.web.js +0 -32
  545. package/lib/module/handlers/gestures/GestureDetector/Wrap.web.js.map +0 -1
  546. package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js +0 -68
  547. package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js.map +0 -1
  548. package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js +0 -14
  549. package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js.map +0 -1
  550. package/lib/module/handlers/gestures/GestureDetector/index.js +0 -118
  551. package/lib/module/handlers/gestures/GestureDetector/index.js.map +0 -1
  552. package/lib/module/handlers/gestures/GestureDetector/needsToReattach.js +0 -18
  553. package/lib/module/handlers/gestures/GestureDetector/needsToReattach.js.map +0 -1
  554. package/lib/module/handlers/gestures/GestureDetector/types.js +0 -2
  555. package/lib/module/handlers/gestures/GestureDetector/types.js.map +0 -1
  556. package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js +0 -61
  557. package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js.map +0 -1
  558. package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js +0 -165
  559. package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +0 -1
  560. package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js +0 -41
  561. package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +0 -1
  562. package/lib/module/handlers/gestures/GestureDetector/useMountReactions.js +0 -39
  563. package/lib/module/handlers/gestures/GestureDetector/useMountReactions.js.map +0 -1
  564. package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js +0 -36
  565. package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js.map +0 -1
  566. package/lib/module/handlers/gestures/GestureDetector/utils.js +0 -139
  567. package/lib/module/handlers/gestures/GestureDetector/utils.js.map +0 -1
  568. package/lib/module/handlers/gestures/eventReceiver.js +0 -131
  569. package/lib/module/handlers/gestures/eventReceiver.js.map +0 -1
  570. package/lib/module/handlers/gestures/flingGesture.js +0 -37
  571. package/lib/module/handlers/gestures/flingGesture.js.map +0 -1
  572. package/lib/module/handlers/gestures/forceTouchGesture.js +0 -73
  573. package/lib/module/handlers/gestures/forceTouchGesture.js.map +0 -1
  574. package/lib/module/handlers/gestures/gesture.js +0 -362
  575. package/lib/module/handlers/gestures/gesture.js.map +0 -1
  576. package/lib/module/handlers/gestures/gestureComposition.js +0 -92
  577. package/lib/module/handlers/gestures/gestureComposition.js.map +0 -1
  578. package/lib/module/handlers/gestures/gestureObjects.js +0 -138
  579. package/lib/module/handlers/gestures/gestureObjects.js.map +0 -1
  580. package/lib/module/handlers/gestures/gestureStateManager.js +0 -64
  581. package/lib/module/handlers/gestures/gestureStateManager.js.map +0 -1
  582. package/lib/module/handlers/gestures/gestureStateManager.web.js +0 -21
  583. package/lib/module/handlers/gestures/gestureStateManager.web.js.map +0 -1
  584. package/lib/module/handlers/gestures/hoverGesture.js +0 -62
  585. package/lib/module/handlers/gestures/hoverGesture.js.map +0 -1
  586. package/lib/module/handlers/gestures/longPressGesture.js +0 -47
  587. package/lib/module/handlers/gestures/longPressGesture.js.map +0 -1
  588. package/lib/module/handlers/gestures/manualGesture.js +0 -22
  589. package/lib/module/handlers/gestures/manualGesture.js.map +0 -1
  590. package/lib/module/handlers/gestures/nativeGesture.js +0 -34
  591. package/lib/module/handlers/gestures/nativeGesture.js.map +0 -1
  592. package/lib/module/handlers/gestures/panGesture.js +0 -216
  593. package/lib/module/handlers/gestures/panGesture.js.map +0 -1
  594. package/lib/module/handlers/gestures/pinchGesture.js +0 -36
  595. package/lib/module/handlers/gestures/pinchGesture.js.map +0 -1
  596. package/lib/module/handlers/gestures/reanimatedWrapper.js +0 -30
  597. package/lib/module/handlers/gestures/reanimatedWrapper.js.map +0 -1
  598. package/lib/module/handlers/gestures/rotationGesture.js +0 -36
  599. package/lib/module/handlers/gestures/rotationGesture.js.map +0 -1
  600. package/lib/module/handlers/gestures/tapGesture.js +0 -92
  601. package/lib/module/handlers/gestures/tapGesture.js.map +0 -1
  602. package/lib/module/handlers/getNextHandlerTag.js +0 -5
  603. package/lib/module/handlers/getNextHandlerTag.js.map +0 -1
  604. package/lib/module/handlers/handlersRegistry.js +0 -43
  605. package/lib/module/handlers/handlersRegistry.js.map +0 -1
  606. package/lib/module/handlers/utils.js +0 -71
  607. package/lib/module/handlers/utils.js.map +0 -1
  608. package/lib/module/index.js +0 -29
  609. package/lib/module/index.js.map +0 -1
  610. package/lib/module/init.js +0 -16
  611. package/lib/module/init.js.map +0 -1
  612. package/lib/module/jestUtils/index.js +0 -2
  613. package/lib/module/jestUtils/index.js.map +0 -1
  614. package/lib/module/jestUtils/jestUtils.js +0 -358
  615. package/lib/module/jestUtils/jestUtils.js.map +0 -1
  616. package/lib/module/mocks.js +0 -68
  617. package/lib/module/mocks.js.map +0 -1
  618. package/lib/module/mountRegistry.js +0 -40
  619. package/lib/module/mountRegistry.js.map +0 -1
  620. package/lib/module/specs/NativeRNGestureHandlerModule.js +0 -3
  621. package/lib/module/specs/NativeRNGestureHandlerModule.js.map +0 -1
  622. package/lib/module/specs/RNGestureHandlerButtonNativeComponent.js +0 -3
  623. package/lib/module/specs/RNGestureHandlerButtonNativeComponent.js.map +0 -1
  624. package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.js +0 -3
  625. package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.js.map +0 -1
  626. package/lib/module/typeUtils.js +0 -2
  627. package/lib/module/typeUtils.js.map +0 -1
  628. package/lib/module/utils.js +0 -87
  629. package/lib/module/utils.js.map +0 -1
  630. package/lib/module/web/Gestures.js +0 -39
  631. package/lib/module/web/Gestures.js.map +0 -1
  632. package/lib/module/web/constants.js +0 -3
  633. package/lib/module/web/constants.js.map +0 -1
  634. package/lib/module/web/detectors/RotationGestureDetector.js +0 -153
  635. package/lib/module/web/detectors/RotationGestureDetector.js.map +0 -1
  636. package/lib/module/web/detectors/ScaleGestureDetector.js +0 -144
  637. package/lib/module/web/detectors/ScaleGestureDetector.js.map +0 -1
  638. package/lib/module/web/handlers/FlingGestureHandler.js +0 -173
  639. package/lib/module/web/handlers/FlingGestureHandler.js.map +0 -1
  640. package/lib/module/web/handlers/GestureHandler.js +0 -801
  641. package/lib/module/web/handlers/GestureHandler.js.map +0 -1
  642. package/lib/module/web/handlers/HoverGestureHandler.js +0 -50
  643. package/lib/module/web/handlers/HoverGestureHandler.js.map +0 -1
  644. package/lib/module/web/handlers/IGestureHandler.js +0 -2
  645. package/lib/module/web/handlers/IGestureHandler.js.map +0 -1
  646. package/lib/module/web/handlers/LongPressGestureHandler.js +0 -180
  647. package/lib/module/web/handlers/LongPressGestureHandler.js.map +0 -1
  648. package/lib/module/web/handlers/ManualGestureHandler.js +0 -36
  649. package/lib/module/web/handlers/ManualGestureHandler.js.map +0 -1
  650. package/lib/module/web/handlers/NativeViewGestureHandler.js +0 -174
  651. package/lib/module/web/handlers/NativeViewGestureHandler.js.map +0 -1
  652. package/lib/module/web/handlers/PanGestureHandler.js +0 -514
  653. package/lib/module/web/handlers/PanGestureHandler.js.map +0 -1
  654. package/lib/module/web/handlers/PinchGestureHandler.js +0 -150
  655. package/lib/module/web/handlers/PinchGestureHandler.js.map +0 -1
  656. package/lib/module/web/handlers/RotationGestureHandler.js +0 -158
  657. package/lib/module/web/handlers/RotationGestureHandler.js.map +0 -1
  658. package/lib/module/web/handlers/TapGestureHandler.js +0 -271
  659. package/lib/module/web/handlers/TapGestureHandler.js.map +0 -1
  660. package/lib/module/web/interfaces.js +0 -31
  661. package/lib/module/web/interfaces.js.map +0 -1
  662. package/lib/module/web/tools/CircularBuffer.js +0 -50
  663. package/lib/module/web/tools/CircularBuffer.js.map +0 -1
  664. package/lib/module/web/tools/EventManager.js +0 -124
  665. package/lib/module/web/tools/EventManager.js.map +0 -1
  666. package/lib/module/web/tools/GestureHandlerDelegate.js +0 -2
  667. package/lib/module/web/tools/GestureHandlerDelegate.js.map +0 -1
  668. package/lib/module/web/tools/GestureHandlerOrchestrator.js +0 -326
  669. package/lib/module/web/tools/GestureHandlerOrchestrator.js.map +0 -1
  670. package/lib/module/web/tools/GestureHandlerWebDelegate.js +0 -199
  671. package/lib/module/web/tools/GestureHandlerWebDelegate.js.map +0 -1
  672. package/lib/module/web/tools/InteractionManager.js +0 -110
  673. package/lib/module/web/tools/InteractionManager.js.map +0 -1
  674. package/lib/module/web/tools/KeyboardEventManager.js +0 -96
  675. package/lib/module/web/tools/KeyboardEventManager.js.map +0 -1
  676. package/lib/module/web/tools/LeastSquareSolver.js +0 -195
  677. package/lib/module/web/tools/LeastSquareSolver.js.map +0 -1
  678. package/lib/module/web/tools/NodeManager.js +0 -40
  679. package/lib/module/web/tools/NodeManager.js.map +0 -1
  680. package/lib/module/web/tools/PointerEventManager.js +0 -212
  681. package/lib/module/web/tools/PointerEventManager.js.map +0 -1
  682. package/lib/module/web/tools/PointerTracker.js +0 -221
  683. package/lib/module/web/tools/PointerTracker.js.map +0 -1
  684. package/lib/module/web/tools/Vector.js +0 -50
  685. package/lib/module/web/tools/Vector.js.map +0 -1
  686. package/lib/module/web/tools/VelocityTracker.js +0 -98
  687. package/lib/module/web/tools/VelocityTracker.js.map +0 -1
  688. package/lib/module/web/tools/WheelEventManager.js +0 -60
  689. package/lib/module/web/tools/WheelEventManager.js.map +0 -1
  690. package/lib/module/web/utils.js +0 -243
  691. package/lib/module/web/utils.js.map +0 -1
  692. package/lib/module/web_hammer/DiscreteGestureHandler.js +0 -94
  693. package/lib/module/web_hammer/DiscreteGestureHandler.js.map +0 -1
  694. package/lib/module/web_hammer/DraggingGestureHandler.js +0 -40
  695. package/lib/module/web_hammer/DraggingGestureHandler.js.map +0 -1
  696. package/lib/module/web_hammer/Errors.js +0 -7
  697. package/lib/module/web_hammer/Errors.js.map +0 -1
  698. package/lib/module/web_hammer/FlingGestureHandler.js +0 -156
  699. package/lib/module/web_hammer/FlingGestureHandler.js.map +0 -1
  700. package/lib/module/web_hammer/GestureHandler.js +0 -563
  701. package/lib/module/web_hammer/GestureHandler.js.map +0 -1
  702. package/lib/module/web_hammer/IndiscreteGestureHandler.js +0 -44
  703. package/lib/module/web_hammer/IndiscreteGestureHandler.js.map +0 -1
  704. package/lib/module/web_hammer/LongPressGestureHandler.js +0 -58
  705. package/lib/module/web_hammer/LongPressGestureHandler.js.map +0 -1
  706. package/lib/module/web_hammer/NativeViewGestureHandler.js +0 -49
  707. package/lib/module/web_hammer/NativeViewGestureHandler.js.map +0 -1
  708. package/lib/module/web_hammer/NodeManager.js +0 -33
  709. package/lib/module/web_hammer/NodeManager.js.map +0 -1
  710. package/lib/module/web_hammer/PanGestureHandler.js +0 -194
  711. package/lib/module/web_hammer/PanGestureHandler.js.map +0 -1
  712. package/lib/module/web_hammer/PinchGestureHandler.js +0 -29
  713. package/lib/module/web_hammer/PinchGestureHandler.js.map +0 -1
  714. package/lib/module/web_hammer/PressGestureHandler.js +0 -174
  715. package/lib/module/web_hammer/PressGestureHandler.js.map +0 -1
  716. package/lib/module/web_hammer/RotationGestureHandler.js +0 -32
  717. package/lib/module/web_hammer/RotationGestureHandler.js.map +0 -1
  718. package/lib/module/web_hammer/TapGestureHandler.js +0 -180
  719. package/lib/module/web_hammer/TapGestureHandler.js.map +0 -1
  720. package/lib/module/web_hammer/constants.js +0 -43
  721. package/lib/module/web_hammer/constants.js.map +0 -1
  722. package/lib/module/web_hammer/utils.js +0 -19
  723. package/lib/module/web_hammer/utils.js.map +0 -1
  724. package/lib/typescript/ActionType.d.ts +0 -7
  725. package/lib/typescript/Directions.d.ts +0 -14
  726. package/lib/typescript/EnableNewWebImplementation.d.ts +0 -9
  727. package/lib/typescript/GestureHandlerRootViewContext.d.ts +0 -3
  728. package/lib/typescript/PlatformConstants.d.ts +0 -5
  729. package/lib/typescript/PlatformConstants.web.d.ts +0 -4
  730. package/lib/typescript/PointerType.d.ts +0 -7
  731. package/lib/typescript/RNGestureHandlerModule.d.ts +0 -2
  732. package/lib/typescript/RNGestureHandlerModule.web.d.ts +0 -15
  733. package/lib/typescript/RNGestureHandlerModule.windows.d.ts +0 -32
  734. package/lib/typescript/RNRenderer.d.ts +0 -1
  735. package/lib/typescript/RNRenderer.web.d.ts +0 -3
  736. package/lib/typescript/State.d.ts +0 -9
  737. package/lib/typescript/TouchEventType.d.ts +0 -8
  738. package/lib/typescript/components/DrawerLayout.d.ts +0 -185
  739. package/lib/typescript/components/GestureButtons.d.ts +0 -7
  740. package/lib/typescript/components/GestureButtonsProps.d.ts +0 -115
  741. package/lib/typescript/components/GestureComponents.d.ts +0 -22
  742. package/lib/typescript/components/GestureComponents.web.d.ts +0 -8
  743. package/lib/typescript/components/GestureHandlerButton.d.ts +0 -4
  744. package/lib/typescript/components/GestureHandlerButton.web.d.ts +0 -4
  745. package/lib/typescript/components/GestureHandlerRootView.android.d.ts +0 -6
  746. package/lib/typescript/components/GestureHandlerRootView.d.ts +0 -6
  747. package/lib/typescript/components/GestureHandlerRootView.web.d.ts +0 -6
  748. package/lib/typescript/components/Pressable/Pressable.d.ts +0 -5
  749. package/lib/typescript/components/Pressable/PressableProps.d.ts +0 -109
  750. package/lib/typescript/components/Pressable/index.d.ts +0 -2
  751. package/lib/typescript/components/Pressable/utils.d.ts +0 -13
  752. package/lib/typescript/components/ReanimatedDrawerLayout.d.ts +0 -167
  753. package/lib/typescript/components/ReanimatedSwipeable.d.ts +0 -137
  754. package/lib/typescript/components/Swipeable.d.ts +0 -183
  755. package/lib/typescript/components/Text.d.ts +0 -4
  756. package/lib/typescript/components/gestureHandlerRootHOC.d.ts +0 -3
  757. package/lib/typescript/components/touchables/ExtraButtonProps.d.ts +0 -7
  758. package/lib/typescript/components/touchables/GenericTouchable.d.ts +0 -55
  759. package/lib/typescript/components/touchables/GenericTouchableProps.d.ts +0 -16
  760. package/lib/typescript/components/touchables/TouchableHighlight.d.ts +0 -41
  761. package/lib/typescript/components/touchables/TouchableNativeFeedback.android.d.ts +0 -40
  762. package/lib/typescript/components/touchables/TouchableNativeFeedback.d.ts +0 -6
  763. package/lib/typescript/components/touchables/TouchableNativeFeedbackProps.d.ts +0 -8
  764. package/lib/typescript/components/touchables/TouchableOpacity.d.ts +0 -30
  765. package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts +0 -14
  766. package/lib/typescript/components/touchables/index.d.ts +0 -7
  767. package/lib/typescript/findNodeHandle.d.ts +0 -2
  768. package/lib/typescript/findNodeHandle.web.d.ts +0 -2
  769. package/lib/typescript/getShadowNodeFromRef.d.ts +0 -1
  770. package/lib/typescript/getShadowNodeFromRef.web.d.ts +0 -1
  771. package/lib/typescript/ghQueueMicrotask.d.ts +0 -1
  772. package/lib/typescript/handlers/FlingGestureHandler.d.ts +0 -39
  773. package/lib/typescript/handlers/ForceTouchGestureHandler.d.ts +0 -44
  774. package/lib/typescript/handlers/GestureHandlerEventPayload.d.ts +0 -194
  775. package/lib/typescript/handlers/LongPressGestureHandler.d.ts +0 -36
  776. package/lib/typescript/handlers/NativeViewGestureHandler.d.ts +0 -33
  777. package/lib/typescript/handlers/PanGestureHandler.d.ts +0 -100
  778. package/lib/typescript/handlers/PinchGestureHandler.d.ts +0 -17
  779. package/lib/typescript/handlers/PressabilityDebugView.d.ts +0 -1
  780. package/lib/typescript/handlers/PressabilityDebugView.web.d.ts +0 -1
  781. package/lib/typescript/handlers/RotationGestureHandler.d.ts +0 -17
  782. package/lib/typescript/handlers/TapGestureHandler.d.ts +0 -62
  783. package/lib/typescript/handlers/createHandler.d.ts +0 -11
  784. package/lib/typescript/handlers/createNativeWrapper.d.ts +0 -3
  785. package/lib/typescript/handlers/customDirectEventTypes.d.ts +0 -1
  786. package/lib/typescript/handlers/customDirectEventTypes.web.d.ts +0 -2
  787. package/lib/typescript/handlers/gestureHandlerCommon.d.ts +0 -78
  788. package/lib/typescript/handlers/gestureHandlerTypesCompat.d.ts +0 -43
  789. package/lib/typescript/handlers/gestures/GestureDetector/Wrap.d.ts +0 -13
  790. package/lib/typescript/handlers/gestures/GestureDetector/Wrap.web.d.ts +0 -7
  791. package/lib/typescript/handlers/gestures/GestureDetector/attachHandlers.d.ts +0 -13
  792. package/lib/typescript/handlers/gestures/GestureDetector/dropHandlers.d.ts +0 -2
  793. package/lib/typescript/handlers/gestures/GestureDetector/index.d.ts +0 -49
  794. package/lib/typescript/handlers/gestures/GestureDetector/needsToReattach.d.ts +0 -3
  795. package/lib/typescript/handlers/gestures/GestureDetector/types.d.ts +0 -21
  796. package/lib/typescript/handlers/gestures/GestureDetector/updateHandlers.d.ts +0 -4
  797. package/lib/typescript/handlers/gestures/GestureDetector/useAnimatedGesture.d.ts +0 -2
  798. package/lib/typescript/handlers/gestures/GestureDetector/useDetectorUpdater.d.ts +0 -5
  799. package/lib/typescript/handlers/gestures/GestureDetector/useMountReactions.d.ts +0 -2
  800. package/lib/typescript/handlers/gestures/GestureDetector/useViewRefHandler.d.ts +0 -3
  801. package/lib/typescript/handlers/gestures/GestureDetector/utils.d.ts +0 -13
  802. package/lib/typescript/handlers/gestures/eventReceiver.d.ts +0 -4
  803. package/lib/typescript/handlers/gestures/flingGesture.d.ts +0 -21
  804. package/lib/typescript/handlers/gestures/forceTouchGesture.d.ts +0 -30
  805. package/lib/typescript/handlers/gestures/gesture.d.ts +0 -218
  806. package/lib/typescript/handlers/gestures/gestureComposition.d.ts +0 -21
  807. package/lib/typescript/handlers/gestures/gestureObjects.d.ts +0 -98
  808. package/lib/typescript/handlers/gestures/gestureStateManager.d.ts +0 -11
  809. package/lib/typescript/handlers/gestures/gestureStateManager.web.d.ts +0 -4
  810. package/lib/typescript/handlers/gestures/hoverGesture.d.ts +0 -27
  811. package/lib/typescript/handlers/gestures/longPressGesture.d.ts +0 -25
  812. package/lib/typescript/handlers/gestures/manualGesture.d.ts +0 -7
  813. package/lib/typescript/handlers/gestures/nativeGesture.d.ts +0 -18
  814. package/lib/typescript/handlers/gestures/panGesture.d.ts +0 -90
  815. package/lib/typescript/handlers/gestures/pinchGesture.d.ts +0 -11
  816. package/lib/typescript/handlers/gestures/reanimatedWrapper.d.ts +0 -14
  817. package/lib/typescript/handlers/gestures/rotationGesture.d.ts +0 -12
  818. package/lib/typescript/handlers/gestures/tapGesture.d.ts +0 -50
  819. package/lib/typescript/handlers/getNextHandlerTag.d.ts +0 -1
  820. package/lib/typescript/handlers/handlersRegistry.d.ts +0 -14
  821. package/lib/typescript/handlers/utils.d.ts +0 -7
  822. package/lib/typescript/index.d.ts +0 -58
  823. package/lib/typescript/init.d.ts +0 -2
  824. package/lib/typescript/jestUtils/index.d.ts +0 -1
  825. package/lib/typescript/jestUtils/jestUtils.d.ts +0 -30
  826. package/lib/typescript/mocks.d.ts +0 -46
  827. package/lib/typescript/mountRegistry.d.ts +0 -17
  828. package/lib/typescript/specs/NativeRNGestureHandlerModule.d.ts +0 -14
  829. package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.d.ts +0 -17
  830. package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts +0 -6
  831. package/lib/typescript/typeUtils.d.ts +0 -1
  832. package/lib/typescript/utils.d.ts +0 -20
  833. package/lib/typescript/web/Gestures.d.ts +0 -36
  834. package/lib/typescript/web/constants.d.ts +0 -2
  835. package/lib/typescript/web/detectors/RotationGestureDetector.d.ts +0 -30
  836. package/lib/typescript/web/detectors/ScaleGestureDetector.d.ts +0 -29
  837. package/lib/typescript/web/handlers/FlingGestureHandler.d.ts +0 -26
  838. package/lib/typescript/web/handlers/GestureHandler.d.ts +0 -103
  839. package/lib/typescript/web/handlers/HoverGestureHandler.d.ts +0 -10
  840. package/lib/typescript/web/handlers/IGestureHandler.d.ts +0 -37
  841. package/lib/typescript/web/handlers/LongPressGestureHandler.d.ts +0 -31
  842. package/lib/typescript/web/handlers/ManualGestureHandler.d.ts +0 -10
  843. package/lib/typescript/web/handlers/NativeViewGestureHandler.d.ts +0 -26
  844. package/lib/typescript/web/handlers/PanGestureHandler.d.ts +0 -61
  845. package/lib/typescript/web/handlers/PinchGestureHandler.d.ts +0 -28
  846. package/lib/typescript/web/handlers/RotationGestureHandler.d.ts +0 -28
  847. package/lib/typescript/web/handlers/TapGestureHandler.d.ts +0 -38
  848. package/lib/typescript/web/interfaces.d.ts +0 -157
  849. package/lib/typescript/web/tools/CircularBuffer.d.ts +0 -11
  850. package/lib/typescript/web/tools/EventManager.d.ts +0 -39
  851. package/lib/typescript/web/tools/GestureHandlerDelegate.d.ts +0 -24
  852. package/lib/typescript/web/tools/GestureHandlerOrchestrator.d.ts +0 -31
  853. package/lib/typescript/web/tools/GestureHandlerWebDelegate.d.ts +0 -35
  854. package/lib/typescript/web/tools/InteractionManager.d.ts +0 -17
  855. package/lib/typescript/web/tools/KeyboardEventManager.d.ts +0 -13
  856. package/lib/typescript/web/tools/LeastSquareSolver.d.ts +0 -12
  857. package/lib/typescript/web/tools/NodeManager.d.ts +0 -12
  858. package/lib/typescript/web/tools/PointerEventManager.d.ts +0 -19
  859. package/lib/typescript/web/tools/PointerTracker.d.ts +0 -50
  860. package/lib/typescript/web/tools/Vector.d.ts +0 -15
  861. package/lib/typescript/web/tools/VelocityTracker.d.ts +0 -13
  862. package/lib/typescript/web/tools/WheelEventManager.d.ts +0 -11
  863. package/lib/typescript/web/utils.d.ts +0 -14
  864. package/lib/typescript/web_hammer/DiscreteGestureHandler.d.ts +0 -20
  865. package/lib/typescript/web_hammer/DraggingGestureHandler.d.ts +0 -15
  866. package/lib/typescript/web_hammer/Errors.d.ts +0 -3
  867. package/lib/typescript/web_hammer/FlingGestureHandler.d.ts +0 -43
  868. package/lib/typescript/web_hammer/GestureHandler.d.ts +0 -145
  869. package/lib/typescript/web_hammer/IndiscreteGestureHandler.d.ts +0 -40
  870. package/lib/typescript/web_hammer/LongPressGestureHandler.d.ts +0 -38
  871. package/lib/typescript/web_hammer/NativeViewGestureHandler.d.ts +0 -7
  872. package/lib/typescript/web_hammer/NodeManager.d.ts +0 -7
  873. package/lib/typescript/web_hammer/PanGestureHandler.d.ts +0 -56
  874. package/lib/typescript/web_hammer/PinchGestureHandler.d.ts +0 -13
  875. package/lib/typescript/web_hammer/PressGestureHandler.d.ts +0 -83
  876. package/lib/typescript/web_hammer/RotationGestureHandler.d.ts +0 -13
  877. package/lib/typescript/web_hammer/TapGestureHandler.d.ts +0 -57
  878. package/lib/typescript/web_hammer/constants.d.ts +0 -39
  879. package/lib/typescript/web_hammer/utils.d.ts +0 -9
  880. /package/android/{common → noreanimated}/src/main/java/com/swmansion/common/GestureHandlerStateManager.kt +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"sources":["interfaces.ts"],"names":["EventTypes","TouchEventType","WheelDevice"],"mappings":"AA6JA,WAAYA,UAAZ;;WAAYA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;GAAAA,U,KAAAA,U;;AAWZ,WAAYC,cAAZ;;WAAYA,c;AAAAA,EAAAA,c,CAAAA,c;AAAAA,EAAAA,c,CAAAA,c;AAAAA,EAAAA,c,CAAAA,c;AAAAA,EAAAA,c,CAAAA,c;AAAAA,EAAAA,c,CAAAA,c;GAAAA,c,KAAAA,c;;AAQZ,WAAYC,WAAZ;;WAAYA,W;AAAAA,EAAAA,W,CAAAA,W;AAAAA,EAAAA,W,CAAAA,W;AAAAA,EAAAA,W,CAAAA,W;GAAAA,W,KAAAA,W","sourcesContent":["import {\n UserSelect,\n ActiveCursor,\n MouseButton,\n TouchAction,\n} from '../handlers/gestureHandlerCommon';\nimport { Directions } from '../Directions';\nimport { State } from '../State';\nimport { PointerType } from '../PointerType';\n\nexport interface HitSlop {\n left?: number;\n right?: number;\n top?: number;\n bottom?: number;\n horizontal?: number;\n vertical?: number;\n width?: number;\n height?: number;\n}\n\nexport interface Handler {\n handlerTag: number;\n}\n\ntype ConfigArgs =\n | number\n | boolean\n | HitSlop\n | UserSelect\n | TouchAction\n | ActiveCursor\n | Directions\n | Handler[]\n | null\n | undefined;\n\nexport interface Config extends Record<string, ConfigArgs> {\n enabled: boolean;\n simultaneousHandlers?: Handler[] | null;\n waitFor?: Handler[] | null;\n blocksHandlers?: Handler[] | null;\n hitSlop?: HitSlop;\n shouldCancelWhenOutside?: boolean;\n userSelect?: UserSelect;\n activeCursor?: ActiveCursor;\n mouseButton?: MouseButton;\n enableContextMenu?: boolean;\n touchAction?: TouchAction;\n manualActivation?: boolean;\n\n activateAfterLongPress?: number;\n failOffsetXStart?: number;\n failOffsetYStart?: number;\n failOffsetXEnd?: number;\n failOffsetYEnd?: number;\n activeOffsetXStart?: number;\n activeOffsetXEnd?: number;\n activeOffsetYStart?: number;\n activeOffsetYEnd?: number;\n minPointers?: number;\n maxPointers?: number;\n minDist?: number;\n minDistSq?: number;\n minVelocity?: number;\n minVelocityX?: number;\n minVelocityY?: number;\n minVelocitySq?: number;\n maxDist?: number;\n maxDistSq?: number;\n numberOfPointers?: number;\n minDurationMs?: number;\n numberOfTaps?: number;\n maxDurationMs?: number;\n maxDelayMs?: number;\n maxDeltaX?: number;\n maxDeltaY?: number;\n shouldActivateOnStart?: boolean;\n disallowInterruption?: boolean;\n direction?: Directions;\n enableTrackpadTwoFingerGesture?: boolean;\n}\n\ntype NativeEventArgs = number | State | boolean | undefined;\ninterface NativeEvent extends Record<string, NativeEventArgs> {\n numberOfPointers: number;\n state: State;\n pointerInside: boolean | undefined;\n handlerTag: number;\n target: number;\n oldState?: State;\n pointerType: PointerType;\n}\n\nexport interface Point {\n x: number;\n y: number;\n}\n\nexport interface PointerData {\n id: number;\n x: number;\n y: number;\n absoluteX: number;\n absoluteY: number;\n}\n\ntype TouchNativeArgs = number | State | TouchEventType | PointerData[];\n\ninterface NativeTouchEvent extends Record<string, TouchNativeArgs> {\n handlerTag: number;\n state: State;\n eventType: TouchEventType;\n changedTouches: PointerData[];\n allTouches: PointerData[];\n numberOfTouches: number;\n pointerType: PointerType;\n}\n\nexport interface ResultEvent extends Record<string, NativeEvent | number> {\n nativeEvent: NativeEvent;\n timeStamp: number;\n}\n\nexport interface ResultTouchEvent\n extends Record<string, NativeTouchEvent | number> {\n nativeEvent: NativeTouchEvent;\n timeStamp: number;\n}\n\nexport interface PropsRef {\n onGestureHandlerEvent: () => void;\n onGestureHandlerStateChange: () => void;\n}\n\nexport interface StylusData {\n tiltX: number;\n tiltY: number;\n azimuthAngle: number;\n altitudeAngle: number;\n pressure: number;\n}\n\nexport interface AdaptedEvent {\n x: number;\n y: number;\n offsetX: number;\n offsetY: number;\n pointerId: number;\n eventType: EventTypes;\n pointerType: PointerType;\n time: number;\n button?: MouseButton;\n stylusData?: StylusData;\n wheelDeltaY?: number;\n}\n\nexport enum EventTypes {\n DOWN,\n ADDITIONAL_POINTER_DOWN,\n UP,\n ADDITIONAL_POINTER_UP,\n MOVE,\n ENTER,\n LEAVE,\n CANCEL,\n}\n\nexport enum TouchEventType {\n UNDETERMINED,\n DOWN,\n MOVE,\n UP,\n CANCELLED,\n}\n\nexport enum WheelDevice {\n UNDETERMINED,\n MOUSE,\n TOUCHPAD,\n}\n\nexport type GestureHandlerRef = {\n viewTag: GestureHandlerRef;\n current: HTMLElement;\n};\n\nexport type SVGRef = {\n elementRef: { current: SVGElement };\n};\n"]}
@@ -1,50 +0,0 @@
1
- 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; }
2
-
3
- export default class CircularBuffer {
4
- constructor(size) {
5
- _defineProperty(this, "capacity", void 0);
6
-
7
- _defineProperty(this, "buffer", void 0);
8
-
9
- _defineProperty(this, "index", void 0);
10
-
11
- _defineProperty(this, "_size", void 0);
12
-
13
- this.capacity = size;
14
- this.buffer = new Array(size);
15
- this.index = 0;
16
- this._size = 0;
17
- }
18
-
19
- push(element) {
20
- this.buffer[this.index] = element;
21
- this.index = (this.index + 1) % this.capacity;
22
- this._size = Math.min(this.size + 1, this.capacity);
23
- }
24
-
25
- get(at) {
26
- if (this._size === this.capacity) {
27
- let index = (this.index + at) % this.capacity;
28
-
29
- if (index < 0) {
30
- index += this.capacity;
31
- }
32
-
33
- return this.buffer[index];
34
- } else {
35
- return this.buffer[at];
36
- }
37
- }
38
-
39
- clear() {
40
- this.buffer = new Array(this.capacity);
41
- this.index = 0;
42
- this._size = 0;
43
- }
44
-
45
- get size() {
46
- return this._size;
47
- }
48
-
49
- }
50
- //# sourceMappingURL=CircularBuffer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["CircularBuffer.ts"],"names":["CircularBuffer","constructor","size","capacity","buffer","Array","index","_size","push","element","Math","min","get","at","clear"],"mappings":";;AAAA,eAAe,MAAMA,cAAN,CAAwB;AAMrCC,EAAAA,WAAW,CAACC,IAAD,EAAe;AAAA;;AAAA;;AAAA;;AAAA;;AACxB,SAAKC,QAAL,GAAgBD,IAAhB;AACA,SAAKE,MAAL,GAAc,IAAIC,KAAJ,CAAaH,IAAb,CAAd;AACA,SAAKI,KAAL,GAAa,CAAb;AACA,SAAKC,KAAL,GAAa,CAAb;AACD;;AAEMC,EAAAA,IAAI,CAACC,OAAD,EAAmB;AAC5B,SAAKL,MAAL,CAAY,KAAKE,KAAjB,IAA0BG,OAA1B;AACA,SAAKH,KAAL,GAAa,CAAC,KAAKA,KAAL,GAAa,CAAd,IAAmB,KAAKH,QAArC;AACA,SAAKI,KAAL,GAAaG,IAAI,CAACC,GAAL,CAAS,KAAKT,IAAL,GAAY,CAArB,EAAwB,KAAKC,QAA7B,CAAb;AACD;;AAEMS,EAAAA,GAAG,CAACC,EAAD,EAAgB;AACxB,QAAI,KAAKN,KAAL,KAAe,KAAKJ,QAAxB,EAAkC;AAChC,UAAIG,KAAK,GAAG,CAAC,KAAKA,KAAL,GAAaO,EAAd,IAAoB,KAAKV,QAArC;;AACA,UAAIG,KAAK,GAAG,CAAZ,EAAe;AACbA,QAAAA,KAAK,IAAI,KAAKH,QAAd;AACD;;AAED,aAAO,KAAKC,MAAL,CAAYE,KAAZ,CAAP;AACD,KAPD,MAOO;AACL,aAAO,KAAKF,MAAL,CAAYS,EAAZ,CAAP;AACD;AACF;;AAEMC,EAAAA,KAAK,GAAS;AACnB,SAAKV,MAAL,GAAc,IAAIC,KAAJ,CAAa,KAAKF,QAAlB,CAAd;AACA,SAAKG,KAAL,GAAa,CAAb;AACA,SAAKC,KAAL,GAAa,CAAb;AACD;;AAEc,MAAJL,IAAI,GAAG;AAChB,WAAO,KAAKK,KAAZ;AACD;;AAxCoC","sourcesContent":["export default class CircularBuffer<T> {\n private capacity: number;\n private buffer: T[];\n private index: number;\n private _size: number;\n\n constructor(size: number) {\n this.capacity = size;\n this.buffer = new Array<T>(size);\n this.index = 0;\n this._size = 0;\n }\n\n public push(element: T): void {\n this.buffer[this.index] = element;\n this.index = (this.index + 1) % this.capacity;\n this._size = Math.min(this.size + 1, this.capacity);\n }\n\n public get(at: number): T {\n if (this._size === this.capacity) {\n let index = (this.index + at) % this.capacity;\n if (index < 0) {\n index += this.capacity;\n }\n\n return this.buffer[index];\n } else {\n return this.buffer[at];\n }\n }\n\n public clear(): void {\n this.buffer = new Array<T>(this.capacity);\n this.index = 0;\n this._size = 0;\n }\n\n public get size() {\n return this._size;\n }\n}\n"]}
@@ -1,124 +0,0 @@
1
- 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; }
2
-
3
- /* eslint-disable @typescript-eslint/no-empty-function */
4
- export default class EventManager {
5
- constructor(view) {
6
- _defineProperty(this, "view", void 0);
7
-
8
- _defineProperty(this, "pointersInBounds", []);
9
-
10
- _defineProperty(this, "activePointersCounter", void 0);
11
-
12
- this.view = view;
13
- this.activePointersCounter = 0;
14
- }
15
-
16
- onPointerDown(_event) {}
17
-
18
- onPointerAdd(_event) {}
19
-
20
- onPointerUp(_event) {}
21
-
22
- onPointerRemove(_event) {}
23
-
24
- onPointerMove(_event) {}
25
-
26
- onPointerLeave(_event) {} // Called only when pointer is pressed (or touching)
27
-
28
-
29
- onPointerEnter(_event) {} // Called only when pointer is pressed (or touching)
30
-
31
-
32
- onPointerCancel(_event) {// When pointer cancel is triggered and there are more pointers on the view, only one pointer is cancelled
33
- // Because we want all pointers to be cancelled by that event, we are doing it manually by reseting handler and changing activePointersCounter to 0
34
- // Events that correspond to removing the pointer (pointerup, touchend) have condition, that they don't perform any action when activePointersCounter
35
- // is equal to 0. This prevents counter from going to negative values, when pointers are removed from view after one of them has been cancelled
36
- }
37
-
38
- onPointerOutOfBounds(_event) {}
39
-
40
- onPointerMoveOver(_event) {}
41
-
42
- onPointerMoveOut(_event) {}
43
-
44
- onWheel(_event) {}
45
-
46
- setOnPointerDown(callback) {
47
- this.onPointerDown = callback;
48
- }
49
-
50
- setOnPointerAdd(callback) {
51
- this.onPointerAdd = callback;
52
- }
53
-
54
- setOnPointerUp(callback) {
55
- this.onPointerUp = callback;
56
- }
57
-
58
- setOnPointerRemove(callback) {
59
- this.onPointerRemove = callback;
60
- }
61
-
62
- setOnPointerMove(callback) {
63
- this.onPointerMove = callback;
64
- }
65
-
66
- setOnPointerLeave(callback) {
67
- this.onPointerLeave = callback;
68
- }
69
-
70
- setOnPointerEnter(callback) {
71
- this.onPointerEnter = callback;
72
- }
73
-
74
- setOnPointerCancel(callback) {
75
- this.onPointerCancel = callback;
76
- }
77
-
78
- setOnPointerOutOfBounds(callback) {
79
- this.onPointerOutOfBounds = callback;
80
- }
81
-
82
- setOnPointerMoveOver(callback) {
83
- this.onPointerMoveOver = callback;
84
- }
85
-
86
- setOnPointerMoveOut(callback) {
87
- this.onPointerMoveOut = callback;
88
- }
89
-
90
- setOnWheel(callback) {
91
- this.onWheel = callback;
92
- }
93
-
94
- markAsInBounds(pointerId) {
95
- if (this.pointersInBounds.indexOf(pointerId) >= 0) {
96
- return;
97
- }
98
-
99
- this.pointersInBounds.push(pointerId);
100
- }
101
-
102
- markAsOutOfBounds(pointerId) {
103
- const index = this.pointersInBounds.indexOf(pointerId);
104
-
105
- if (index < 0) {
106
- return;
107
- }
108
-
109
- this.pointersInBounds.splice(index, 1);
110
- }
111
-
112
- resetManager() {
113
- // Reseting activePointersCounter is necessary to make gestures such as pinch work properly
114
- // There are gestures that end when there is still one active pointer (like pinch/rotation)
115
- // When these gestures end, they are reset, but they still receive events from pointer that is active
116
- // This causes trouble, since only onPointerDown registers gesture in orchestrator, and while gestures receive
117
- // Events from active pointer after they finished, next pointerdown event will be registered as additional pointer, not the first one
118
- // This casues trouble like gestures getting stuck in END state, even though they should have gone to UNDETERMINED
119
- this.activePointersCounter = 0;
120
- this.pointersInBounds = [];
121
- }
122
-
123
- }
124
- //# sourceMappingURL=EventManager.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["EventManager.ts"],"names":["EventManager","constructor","view","activePointersCounter","onPointerDown","_event","onPointerAdd","onPointerUp","onPointerRemove","onPointerMove","onPointerLeave","onPointerEnter","onPointerCancel","onPointerOutOfBounds","onPointerMoveOver","onPointerMoveOut","onWheel","setOnPointerDown","callback","setOnPointerAdd","setOnPointerUp","setOnPointerRemove","setOnPointerMove","setOnPointerLeave","setOnPointerEnter","setOnPointerCancel","setOnPointerOutOfBounds","setOnPointerMoveOver","setOnPointerMoveOut","setOnWheel","markAsInBounds","pointerId","pointersInBounds","indexOf","push","markAsOutOfBounds","index","splice","resetManager"],"mappings":";;AAAA;AAKA,eAAe,MAAeA,YAAf,CAA+B;AAK5CC,EAAAA,WAAW,CAACC,IAAD,EAAU;AAAA;;AAAA,8CAHkB,EAGlB;;AAAA;;AACnB,SAAKA,IAAL,GAAYA,IAAZ;AACA,SAAKC,qBAAL,GAA6B,CAA7B;AACD;;AAUSC,EAAAA,aAAa,CAACC,MAAD,EAA6B,CAAE;;AAC5CC,EAAAA,YAAY,CAACD,MAAD,EAA6B,CAAE;;AAC3CE,EAAAA,WAAW,CAACF,MAAD,EAA6B,CAAE;;AAC1CG,EAAAA,eAAe,CAACH,MAAD,EAA6B,CAAE;;AAC9CI,EAAAA,aAAa,CAACJ,MAAD,EAA6B,CAAE;;AAC5CK,EAAAA,cAAc,CAACL,MAAD,EAA6B,CAAE,CAvBX,CAuBY;;;AAC9CM,EAAAA,cAAc,CAACN,MAAD,EAA6B,CAAE,CAxBX,CAwBY;;;AAC9CO,EAAAA,eAAe,CAACP,MAAD,EAA6B,CACpD;AACA;AACA;AACA;AACD;;AACSQ,EAAAA,oBAAoB,CAACR,MAAD,EAA6B,CAAE;;AACnDS,EAAAA,iBAAiB,CAACT,MAAD,EAA6B,CAAE;;AAChDU,EAAAA,gBAAgB,CAACV,MAAD,EAA6B,CAAE;;AAC/CW,EAAAA,OA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J,SAAD,EAA0B;AACnD,UAAMK,KAAa,GAAG,KAAKJ,gBAAL,CAAsBC,OAAtB,CAA8BF,SAA9B,CAAtB;;AAEA,QAAIK,KAAK,GAAG,CAAZ,EAAe;AACb;AACD;;AAED,SAAKJ,gBAAL,CAAsBK,MAAtB,CAA6BD,KAA7B,EAAoC,CAApC;AACD;;AAEME,EAAAA,YAAY,GAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AAEA,SAAKnC,qBAAL,GAA6B,CAA7B;AACA,SAAK6B,gBAAL,GAAwB,EAAxB;AACD;;AArG2C","sourcesContent":["/* eslint-disable @typescript-eslint/no-empty-function */\nimport { AdaptedEvent, EventTypes } from '../interfaces';\n\ntype PointerEventCallback = (event: AdaptedEvent) => void;\n\nexport default abstract class EventManager<T> {\n protected readonly view: T;\n protected pointersInBounds: number[] = [];\n protected activePointersCounter: number;\n\n constructor(view: T) {\n this.view = view;\n this.activePointersCounter = 0;\n }\n\n public abstract registerListeners(): void;\n public abstract unregisterListeners(): void;\n\n protected abstract mapEvent(\n event: Event,\n eventType: EventTypes\n ): AdaptedEvent;\n\n protected onPointerDown(_event: AdaptedEvent): void {}\n protected onPointerAdd(_event: AdaptedEvent): void {}\n protected onPointerUp(_event: AdaptedEvent): void {}\n protected onPointerRemove(_event: AdaptedEvent): void {}\n protected onPointerMove(_event: AdaptedEvent): void {}\n protected onPointerLeave(_event: AdaptedEvent): void {} // Called only when pointer is pressed (or touching)\n protected onPointerEnter(_event: AdaptedEvent): void {} // Called only when pointer is pressed (or touching)\n protected onPointerCancel(_event: AdaptedEvent): void {\n // When pointer cancel is triggered and there are more pointers on the view, only one pointer is cancelled\n // Because we want all pointers to be cancelled by that event, we are doing it manually by reseting handler and changing activePointersCounter to 0\n // Events that correspond to removing the pointer (pointerup, touchend) have condition, that they don't perform any action when activePointersCounter\n // is equal to 0. This prevents counter from going to negative values, when pointers are removed from view after one of them has been cancelled\n }\n protected onPointerOutOfBounds(_event: AdaptedEvent): void {}\n protected onPointerMoveOver(_event: AdaptedEvent): void {}\n protected onPointerMoveOut(_event: AdaptedEvent): void {}\n protected onWheel(_event: AdaptedEvent): void {}\n\n public setOnPointerDown(callback: PointerEventCallback): void {\n this.onPointerDown = callback;\n }\n public setOnPointerAdd(callback: PointerEventCallback): void {\n this.onPointerAdd = callback;\n }\n public setOnPointerUp(callback: PointerEventCallback): void {\n this.onPointerUp = callback;\n }\n public setOnPointerRemove(callback: PointerEventCallback): void {\n this.onPointerRemove = callback;\n }\n public setOnPointerMove(callback: PointerEventCallback): void {\n this.onPointerMove = callback;\n }\n public setOnPointerLeave(callback: PointerEventCallback): void {\n this.onPointerLeave = callback;\n }\n public setOnPointerEnter(callback: PointerEventCallback): void {\n this.onPointerEnter = callback;\n }\n public setOnPointerCancel(callback: PointerEventCallback): void {\n this.onPointerCancel = callback;\n }\n public setOnPointerOutOfBounds(callback: PointerEventCallback): void {\n this.onPointerOutOfBounds = callback;\n }\n public setOnPointerMoveOver(callback: PointerEventCallback): void {\n this.onPointerMoveOver = callback;\n }\n public setOnPointerMoveOut(callback: PointerEventCallback): void {\n this.onPointerMoveOut = callback;\n }\n public setOnWheel(callback: PointerEventCallback): void {\n this.onWheel = callback;\n }\n\n protected markAsInBounds(pointerId: number): void {\n if (this.pointersInBounds.indexOf(pointerId) >= 0) {\n return;\n }\n\n this.pointersInBounds.push(pointerId);\n }\n\n protected markAsOutOfBounds(pointerId: number): void {\n const index: number = this.pointersInBounds.indexOf(pointerId);\n\n if (index < 0) {\n return;\n }\n\n this.pointersInBounds.splice(index, 1);\n }\n\n public resetManager(): void {\n // Reseting activePointersCounter is necessary to make gestures such as pinch work properly\n // There are gestures that end when there is still one active pointer (like pinch/rotation)\n // When these gestures end, they are reset, but they still receive events from pointer that is active\n // This causes trouble, since only onPointerDown registers gesture in orchestrator, and while gestures receive\n // Events from active pointer after they finished, next pointerdown event will be registered as additional pointer, not the first one\n // This casues trouble like gestures getting stuck in END state, even though they should have gone to UNDETERMINED\n\n this.activePointersCounter = 0;\n this.pointersInBounds = [];\n }\n}\n"]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=GestureHandlerDelegate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
@@ -1,326 +0,0 @@
1
- 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; }
2
-
3
- import { PointerType } from '../../PointerType';
4
- import { State } from '../../State';
5
- import PointerTracker from './PointerTracker';
6
- export default class GestureHandlerOrchestrator {
7
- // Private beacuse of Singleton
8
- // eslint-disable-next-line no-useless-constructor, @typescript-eslint/no-empty-function
9
- constructor() {
10
- _defineProperty(this, "gestureHandlers", []);
11
-
12
- _defineProperty(this, "awaitingHandlers", []);
13
-
14
- _defineProperty(this, "awaitingHandlersTags", new Set());
15
-
16
- _defineProperty(this, "handlingChangeSemaphore", 0);
17
-
18
- _defineProperty(this, "activationIndex", 0);
19
- }
20
-
21
- scheduleFinishedHandlersCleanup() {
22
- if (this.handlingChangeSemaphore === 0) {
23
- this.cleanupFinishedHandlers();
24
- }
25
- }
26
-
27
- cleanHandler(handler) {
28
- handler.reset();
29
- handler.active = false;
30
- handler.awaiting = false;
31
- handler.activationIndex = Number.MAX_VALUE;
32
- }
33
-
34
- removeHandlerFromOrchestrator(handler) {
35
- const indexInGestureHandlers = this.gestureHandlers.indexOf(handler);
36
- const indexInAwaitingHandlers = this.awaitingHandlers.indexOf(handler);
37
-
38
- if (indexInGestureHandlers >= 0) {
39
- this.gestureHandlers.splice(indexInGestureHandlers, 1);
40
- }
41
-
42
- if (indexInAwaitingHandlers >= 0) {
43
- this.awaitingHandlers.splice(indexInAwaitingHandlers, 1);
44
- this.awaitingHandlersTags.delete(handler.handlerTag);
45
- }
46
- }
47
-
48
- cleanupFinishedHandlers() {
49
- const handlersToRemove = new Set();
50
-
51
- for (let i = this.gestureHandlers.length - 1; i >= 0; --i) {
52
- const handler = this.gestureHandlers[i];
53
-
54
- if (this.isFinished(handler.state) && !handler.awaiting) {
55
- this.cleanHandler(handler);
56
- handlersToRemove.add(handler);
57
- }
58
- }
59
-
60
- this.gestureHandlers = this.gestureHandlers.filter(handler => !handlersToRemove.has(handler));
61
- }
62
-
63
- hasOtherHandlerToWaitFor(handler) {
64
- const hasToWaitFor = otherHandler => {
65
- return !this.isFinished(otherHandler.state) && this.shouldHandlerWaitForOther(handler, otherHandler);
66
- };
67
-
68
- return this.gestureHandlers.some(hasToWaitFor);
69
- }
70
-
71
- shouldBeCancelledByFinishedHandler(handler) {
72
- const shouldBeCancelled = otherHandler => {
73
- return this.shouldHandlerWaitForOther(handler, otherHandler) && otherHandler.state === State.END;
74
- };
75
-
76
- return this.gestureHandlers.some(shouldBeCancelled);
77
- }
78
-
79
- tryActivate(handler) {
80
- if (this.shouldBeCancelledByFinishedHandler(handler)) {
81
- handler.cancel();
82
- return;
83
- }
84
-
85
- if (this.hasOtherHandlerToWaitFor(handler)) {
86
- this.addAwaitingHandler(handler);
87
- return;
88
- }
89
-
90
- const handlerState = handler.state;
91
-
92
- if (handlerState === State.CANCELLED || handlerState === State.FAILED) {
93
- return;
94
- }
95
-
96
- if (this.shouldActivate(handler)) {
97
- this.makeActive(handler);
98
- return;
99
- }
100
-
101
- if (handlerState === State.ACTIVE) {
102
- handler.fail();
103
- return;
104
- }
105
-
106
- if (handlerState === State.BEGAN) {
107
- handler.cancel();
108
- }
109
- }
110
-
111
- shouldActivate(handler) {
112
- const shouldBeCancelledBy = otherHandler => {
113
- return this.shouldHandlerBeCancelledBy(handler, otherHandler);
114
- };
115
-
116
- return !this.gestureHandlers.some(shouldBeCancelledBy);
117
- }
118
-
119
- cleanupAwaitingHandlers(handler) {
120
- const shouldWait = otherHandler => {
121
- return !otherHandler.awaiting && this.shouldHandlerWaitForOther(otherHandler, handler);
122
- };
123
-
124
- for (const otherHandler of this.awaitingHandlers) {
125
- if (shouldWait(otherHandler)) {
126
- this.cleanHandler(otherHandler);
127
- this.awaitingHandlersTags.delete(otherHandler.handlerTag);
128
- }
129
- }
130
-
131
- this.awaitingHandlers = this.awaitingHandlers.filter(otherHandler => this.awaitingHandlersTags.has(otherHandler.handlerTag));
132
- }
133
-
134
- onHandlerStateChange(handler, newState, oldState, sendIfDisabled) {
135
- if (!handler.enabled && !sendIfDisabled) {
136
- return;
137
- }
138
-
139
- this.handlingChangeSemaphore += 1;
140
-
141
- if (this.isFinished(newState)) {
142
- for (const otherHandler of this.awaitingHandlers) {
143
- if (!this.shouldHandlerWaitForOther(otherHandler, handler) || !this.awaitingHandlersTags.has(otherHandler.handlerTag)) {
144
- continue;
145
- }
146
-
147
- if (newState !== State.END) {
148
- this.tryActivate(otherHandler);
149
- continue;
150
- }
151
-
152
- otherHandler.cancel();
153
-
154
- if (otherHandler.state === State.END) {
155
- // Handle edge case, where discrete gestures end immediately after activation thus
156
- // their state is set to END and when the gesture they are waiting for activates they
157
- // should be cancelled, however `cancel` was never sent as gestures were already in the END state.
158
- // Send synthetic BEGAN -> CANCELLED to properly handle JS logic
159
- otherHandler.sendEvent(State.CANCELLED, State.BEGAN);
160
- }
161
-
162
- otherHandler.awaiting = false;
163
- }
164
- }
165
-
166
- if (newState === State.ACTIVE) {
167
- this.tryActivate(handler);
168
- } else if (oldState === State.ACTIVE || oldState === State.END) {
169
- if (handler.active) {
170
- handler.sendEvent(newState, oldState);
171
- } else if (oldState === State.ACTIVE && (newState === State.CANCELLED || newState === State.FAILED)) {
172
- handler.sendEvent(newState, State.BEGAN);
173
- }
174
- } else if (oldState !== State.UNDETERMINED || newState !== State.CANCELLED) {
175
- handler.sendEvent(newState, oldState);
176
- }
177
-
178
- this.handlingChangeSemaphore -= 1;
179
- this.scheduleFinishedHandlersCleanup();
180
-
181
- if (!this.awaitingHandlers.includes(handler)) {
182
- this.cleanupAwaitingHandlers(handler);
183
- }
184
- }
185
-
186
- makeActive(handler) {
187
- const currentState = handler.state;
188
- handler.active = true;
189
- handler.shouldResetProgress = true;
190
- handler.activationIndex = this.activationIndex++;
191
-
192
- for (let i = this.gestureHandlers.length - 1; i >= 0; --i) {
193
- if (this.shouldHandlerBeCancelledBy(this.gestureHandlers[i], handler)) {
194
- this.gestureHandlers[i].cancel();
195
- }
196
- }
197
-
198
- for (const otherHandler of this.awaitingHandlers) {
199
- if (this.shouldHandlerBeCancelledBy(otherHandler, handler)) {
200
- otherHandler.awaiting = false;
201
- }
202
- }
203
-
204
- handler.sendEvent(State.ACTIVE, State.BEGAN);
205
-
206
- if (currentState !== State.ACTIVE) {
207
- handler.sendEvent(State.END, State.ACTIVE);
208
-
209
- if (currentState !== State.END) {
210
- handler.sendEvent(State.UNDETERMINED, State.END);
211
- }
212
- }
213
-
214
- if (!handler.awaiting) {
215
- return;
216
- }
217
-
218
- handler.awaiting = false;
219
- this.awaitingHandlers = this.awaitingHandlers.filter(otherHandler => otherHandler !== handler);
220
- }
221
-
222
- addAwaitingHandler(handler) {
223
- if (this.awaitingHandlers.includes(handler)) {
224
- return;
225
- }
226
-
227
- this.awaitingHandlers.push(handler);
228
- this.awaitingHandlersTags.add(handler.handlerTag);
229
- handler.awaiting = true;
230
- handler.activationIndex = this.activationIndex++;
231
- }
232
-
233
- recordHandlerIfNotPresent(handler) {
234
- if (this.gestureHandlers.includes(handler)) {
235
- return;
236
- }
237
-
238
- this.gestureHandlers.push(handler);
239
- handler.active = false;
240
- handler.awaiting = false;
241
- handler.activationIndex = Number.MAX_SAFE_INTEGER;
242
- }
243
-
244
- shouldHandlerWaitForOther(handler, otherHandler) {
245
- return handler !== otherHandler && (handler.shouldWaitForHandlerFailure(otherHandler) || otherHandler.shouldRequireToWaitForFailure(handler));
246
- }
247
-
248
- canRunSimultaneously(gh1, gh2) {
249
- return gh1 === gh2 || gh1.shouldRecognizeSimultaneously(gh2) || gh2.shouldRecognizeSimultaneously(gh1);
250
- }
251
-
252
- shouldHandlerBeCancelledBy(handler, otherHandler) {
253
- if (this.canRunSimultaneously(handler, otherHandler)) {
254
- return false;
255
- }
256
-
257
- if (handler.awaiting || handler.state === State.ACTIVE) {
258
- return handler.shouldBeCancelledByOther(otherHandler);
259
- }
260
-
261
- const handlerPointers = handler.getTrackedPointersID();
262
- const otherPointers = otherHandler.getTrackedPointersID();
263
-
264
- if (!PointerTracker.shareCommonPointers(handlerPointers, otherPointers) && handler.delegate.view !== otherHandler.delegate.view) {
265
- return this.checkOverlap(handler, otherHandler);
266
- }
267
-
268
- return true;
269
- }
270
-
271
- checkOverlap(handler, otherHandler) {
272
- // If handlers don't have common pointers, default return value is false.
273
- // However, if at least on pointer overlaps with both handlers, we return true
274
- // This solves issue in overlapping parents example
275
- // TODO: Find better way to handle that issue, for example by activation order and handler cancelling
276
- const isPointerWithinBothBounds = pointer => {
277
- const point = handler.tracker.getLastAbsoluteCoords(pointer);
278
- return handler.delegate.isPointerInBounds(point) && otherHandler.delegate.isPointerInBounds(point);
279
- };
280
-
281
- return handler.getTrackedPointersID().some(isPointerWithinBothBounds);
282
- }
283
-
284
- isFinished(state) {
285
- return state === State.END || state === State.FAILED || state === State.CANCELLED;
286
- } // This function is called when handler receives touchdown event
287
- // If handler is using mouse or pen as a pointer and any handler receives touch event,
288
- // mouse/pen event dissappears - it doesn't send onPointerCancel nor onPointerUp (and others)
289
- // This became a problem because handler was left at active state without any signal to end or fail
290
- // To handle this, when new touch event is received, we loop through active handlers and check which type of
291
- // pointer they're using. If there are any handler with mouse/pen as a pointer, we cancel them
292
-
293
-
294
- cancelMouseAndPenGestures(currentHandler) {
295
- this.gestureHandlers.forEach(handler => {
296
- if (handler.pointerType !== PointerType.MOUSE && handler.pointerType !== PointerType.STYLUS) {
297
- return;
298
- }
299
-
300
- if (handler !== currentHandler) {
301
- handler.cancel();
302
- } else {
303
- // Handler that received touch event should have its pointer tracker reset
304
- // This allows handler to smoothly change from mouse/pen to touch
305
- // The drawback is, that when we try to use mouse/pen one more time, it doesn't send onPointerDown at the first time
306
- // so it is required to click two times to get handler to work
307
- //
308
- // However, handler will receive manually created onPointerEnter that is triggered in EventManager in onPointerMove method.
309
- // There may be possibility to use that fact to make handler respond properly to first mouse click
310
- handler.tracker.resetTracker();
311
- }
312
- });
313
- }
314
-
315
- static get instance() {
316
- if (!GestureHandlerOrchestrator._instance) {
317
- GestureHandlerOrchestrator._instance = new GestureHandlerOrchestrator();
318
- }
319
-
320
- return GestureHandlerOrchestrator._instance;
321
- }
322
-
323
- }
324
-
325
- _defineProperty(GestureHandlerOrchestrator, "_instance", void 0);
326
- //# sourceMappingURL=GestureHandlerOrchestrator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["GestureHandlerOrchestrator.ts"],"names":["PointerType","State","PointerTracker","GestureHandlerOrchestrator","constructor","Set","scheduleFinishedHandlersCleanup","handlingChangeSemaphore","cleanupFinishedHandlers","cleanHandler","handler","reset","active","awaiting","activationIndex","Number","MAX_VALUE","removeHandlerFromOrchestrator","indexInGestureHandlers","gestureHandlers","indexOf","indexInAwaitingHandlers","awaitingHandlers","splice","awaitingHandlersTags","delete","handlerTag","handlersToRemove","i","length","isFinished","state","add","filter","has","hasOtherHandlerToWaitFor","hasToWaitFor","otherHandler","shouldHandlerWaitForOther","some","shouldBeCancelledByFinishedHandler","shouldBeCancelled","END","tryActivate","cancel","addAwaitingHandler","handlerState","CANCELLED","FAILED","shouldActivate","makeActive","ACTIVE","fail","BEGAN","shouldBeCancelledBy","shouldHandlerBeCancelledBy","cleanupAwaitingHandlers","shouldWait","onHandlerStateChange","newState","oldState","sendIfDisabled","enabled","sendEvent","UNDETERMINED","includes","currentState","shouldResetProgress","push","recordHandlerIfNotPresent","MAX_SAFE_INTEGER","shouldWaitForHandlerFailure","shouldRequireToWaitForFailure","canRunSimultaneously","gh1","gh2","shouldRecognizeSimultaneously","shouldBeCancelledByOther","handlerPointers","getTrackedPointersID","otherPointers","shareCommonPointers","delegate","view","checkOverlap","isPointerWithinBothBounds","pointer","point","tracker","getLastAbsoluteCoords","isPointerInBounds","cancelMouseAndPenGestures","currentHandler","forEach","pointerType","MOUSE","STYLUS","resetTracker","instance","_instance"],"mappings":";;AAAA,SAASA,WAAT,QAA4B,mBAA5B;AACA,SAASC,KAAT,QAAsB,aAAtB;AAGA,OAAOC,cAAP,MAA2B,kBAA3B;AAEA,eAAe,MAAMC,0BAAN,CAAiC;AAU9C;AACA;AACQC,EAAAA,WAAW,GAAG;AAAA,6CATuB,EASvB;;AAAA,8CARwB,EAQxB;;AAAA,kDAPsB,IAAIC,GAAJ,EAOtB;;AAAA,qDALY,CAKZ;;AAAA,6CAJI,CAIJ;AAAE;;AAEhBC,EAAAA,+BAA+B,GAAS;AAC9C,QAAI,KAAKC,uBAAL,KAAiC,CAArC,EAAwC;AACtC,WAAKC,uBAAL;AACD;AACF;;AAEOC,EAAAA,YAAY,CAACC,OAAD,EAAiC;AACnDA,IAAAA,OAAO,CAACC,KAAR;AACAD,IAAAA,OAAO,CAACE,MAAR,GAAiB,KAAjB;AACAF,IAAAA,OAAO,CAACG,QAAR,GAAmB,KAAnB;AACAH,IAAAA,OAAO,CAACI,eAAR,GAA0BC,MAAM,CAACC,SAAjC;AACD;;AAEMC,EAAAA,6BAA6B,CAACP,OAAD,EAAiC;AACnE,UAAMQ,sBAAsB,GAAG,KAAKC,eAAL,CAAqBC,OAArB,CAA6BV,OAA7B,CAA/B;AACA,UAAMW,uBAAuB,GAAG,KAAKC,gBAAL,CAAsBF,OAAtB,CAA8BV,OAA9B,CAAhC;;AAEA,QAAIQ,sBAAsB,IAAI,CAA9B,EAAiC;AAC/B,WAAKC,eAAL,CAAqBI,MAArB,CAA4BL,sBAA5B,EAAoD,CAApD;AACD;;AAED,QAAIG,uBAAuB,IAAI,CAA/B,EAAkC;AAChC,WAAKC,gBAAL,CAAsBC,MAAtB,CAA6BF,uBAA7B,EAAsD,CAAtD;AACA,WAAKG,oBAAL,CAA0BC,MAA1B,CAAiCf,OAAO,CAACgB,UAAzC;AACD;AACF;;AAEOlB,EAAA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AFD,MAEO;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACAlC,QAAAA,OAAO,CAAC8E,OAAR,CAAgBS,YAAhB;AACD;AACF,KApBD;AAqBD;;AAEyB,aAARC,QAAQ,GAA+B;AACvD,QAAI,CAAC/F,0BAA0B,CAACgG,SAAhC,EAA2C;AACzChG,MAAAA,0BAA0B,CAACgG,SAA3B,GAAuC,IAAIhG,0BAAJ,EAAvC;AACD;;AAED,WAAOA,0BAA0B,CAACgG,SAAlC;AACD;;AA/X6C;;gBAA3BhG,0B","sourcesContent":["import { PointerType } from '../../PointerType';\nimport { State } from '../../State';\n\nimport type IGestureHandler from '../handlers/IGestureHandler';\nimport PointerTracker from './PointerTracker';\n\nexport default class GestureHandlerOrchestrator {\n private static _instance: GestureHandlerOrchestrator;\n\n private gestureHandlers: IGestureHandler[] = [];\n private awaitingHandlers: IGestureHandler[] = [];\n private awaitingHandlersTags: Set<number> = new Set();\n\n private handlingChangeSemaphore = 0;\n private activationIndex = 0;\n\n // Private beacuse of Singleton\n // eslint-disable-next-line no-useless-constructor, @typescript-eslint/no-empty-function\n private constructor() {}\n\n private scheduleFinishedHandlersCleanup(): void {\n if (this.handlingChangeSemaphore === 0) {\n this.cleanupFinishedHandlers();\n }\n }\n\n private cleanHandler(handler: IGestureHandler): void {\n handler.reset();\n handler.active = false;\n handler.awaiting = false;\n handler.activationIndex = Number.MAX_VALUE;\n }\n\n public removeHandlerFromOrchestrator(handler: IGestureHandler): void {\n const indexInGestureHandlers = this.gestureHandlers.indexOf(handler);\n const indexInAwaitingHandlers = this.awaitingHandlers.indexOf(handler);\n\n if (indexInGestureHandlers >= 0) {\n this.gestureHandlers.splice(indexInGestureHandlers, 1);\n }\n\n if (indexInAwaitingHandlers >= 0) {\n this.awaitingHandlers.splice(indexInAwaitingHandlers, 1);\n this.awaitingHandlersTags.delete(handler.handlerTag);\n }\n }\n\n private cleanupFinishedHandlers(): void {\n const handlersToRemove = new Set<IGestureHandler>();\n\n for (let i = this.gestureHandlers.length - 1; i >= 0; --i) {\n const handler = this.gestureHandlers[i];\n\n if (this.isFinished(handler.state) && !handler.awaiting) {\n this.cleanHandler(handler);\n handlersToRemove.add(handler);\n }\n }\n\n this.gestureHandlers = this.gestureHandlers.filter(\n (handler) => !handlersToRemove.has(handler)\n );\n }\n\n private hasOtherHandlerToWaitFor(handler: IGestureHandler): boolean {\n const hasToWaitFor = (otherHandler: IGestureHandler) => {\n return (\n !this.isFinished(otherHandler.state) &&\n this.shouldHandlerWaitForOther(handler, otherHandler)\n );\n };\n\n return this.gestureHandlers.some(hasToWaitFor);\n }\n\n private shouldBeCancelledByFinishedHandler(\n handler: IGestureHandler\n ): boolean {\n const shouldBeCancelled = (otherHandler: IGestureHandler) => {\n return (\n this.shouldHandlerWaitForOther(handler, otherHandler) &&\n otherHandler.state === State.END\n );\n };\n\n return this.gestureHandlers.some(shouldBeCancelled);\n }\n\n private tryActivate(handler: IGestureHandler): void {\n if (this.shouldBeCancelledByFinishedHandler(handler)) {\n handler.cancel();\n return;\n }\n\n if (this.hasOtherHandlerToWaitFor(handler)) {\n this.addAwaitingHandler(handler);\n return;\n }\n\n const handlerState = handler.state;\n\n if (handlerState === State.CANCELLED || handlerState === State.FAILED) {\n return;\n }\n\n if (this.shouldActivate(handler)) {\n this.makeActive(handler);\n return;\n }\n\n if (handlerState === State.ACTIVE) {\n handler.fail();\n return;\n }\n\n if (handlerState === State.BEGAN) {\n handler.cancel();\n }\n }\n\n private shouldActivate(handler: IGestureHandler): boolean {\n const shouldBeCancelledBy = (otherHandler: IGestureHandler) => {\n return this.shouldHandlerBeCancelledBy(handler, otherHandler);\n };\n\n return !this.gestureHandlers.some(shouldBeCancelledBy);\n }\n\n private cleanupAwaitingHandlers(handler: IGestureHandler): void {\n const shouldWait = (otherHandler: IGestureHandler) => {\n return (\n !otherHandler.awaiting &&\n this.shouldHandlerWaitForOther(otherHandler, handler)\n );\n };\n\n for (const otherHandler of this.awaitingHandlers) {\n if (shouldWait(otherHandler)) {\n this.cleanHandler(otherHandler);\n this.awaitingHandlersTags.delete(otherHandler.handlerTag);\n }\n }\n\n this.awaitingHandlers = this.awaitingHandlers.filter((otherHandler) =>\n this.awaitingHandlersTags.has(otherHandler.handlerTag)\n );\n }\n\n public onHandlerStateChange(\n handler: IGestureHandler,\n newState: State,\n oldState: State,\n sendIfDisabled?: boolean\n ): void {\n if (!handler.enabled && !sendIfDisabled) {\n return;\n }\n\n this.handlingChangeSemaphore += 1;\n\n if (this.isFinished(newState)) {\n for (const otherHandler of this.awaitingHandlers) {\n if (\n !this.shouldHandlerWaitForOther(otherHandler, handler) ||\n !this.awaitingHandlersTags.has(otherHandler.handlerTag)\n ) {\n continue;\n }\n\n if (newState !== State.END) {\n this.tryActivate(otherHandler);\n continue;\n }\n\n otherHandler.cancel();\n\n if (otherHandler.state === State.END) {\n // Handle edge case, where discrete gestures end immediately after activation thus\n // their state is set to END and when the gesture they are waiting for activates they\n // should be cancelled, however `cancel` was never sent as gestures were already in the END state.\n // Send synthetic BEGAN -> CANCELLED to properly handle JS logic\n otherHandler.sendEvent(State.CANCELLED, State.BEGAN);\n }\n\n otherHandler.awaiting = false;\n }\n }\n\n if (newState === State.ACTIVE) {\n this.tryActivate(handler);\n } else if (oldState === State.ACTIVE || oldState === State.END) {\n if (handler.active) {\n handler.sendEvent(newState, oldState);\n } else if (\n oldState === State.ACTIVE &&\n (newState === State.CANCELLED || newState === State.FAILED)\n ) {\n handler.sendEvent(newState, State.BEGAN);\n }\n } else if (\n oldState !== State.UNDETERMINED ||\n newState !== State.CANCELLED\n ) {\n handler.sendEvent(newState, oldState);\n }\n\n this.handlingChangeSemaphore -= 1;\n\n this.scheduleFinishedHandlersCleanup();\n\n if (!this.awaitingHandlers.includes(handler)) {\n this.cleanupAwaitingHandlers(handler);\n }\n }\n\n private makeActive(handler: IGestureHandler): void {\n const currentState = handler.state;\n\n handler.active = true;\n handler.shouldResetProgress = true;\n handler.activationIndex = this.activationIndex++;\n\n for (let i = this.gestureHandlers.length - 1; i >= 0; --i) {\n if (this.shouldHandlerBeCancelledBy(this.gestureHandlers[i], handler)) {\n this.gestureHandlers[i].cancel();\n }\n }\n\n for (const otherHandler of this.awaitingHandlers) {\n if (this.shouldHandlerBeCancelledBy(otherHandler, handler)) {\n otherHandler.awaiting = false;\n }\n }\n\n handler.sendEvent(State.ACTIVE, State.BEGAN);\n\n if (currentState !== State.ACTIVE) {\n handler.sendEvent(State.END, State.ACTIVE);\n if (currentState !== State.END) {\n handler.sendEvent(State.UNDETERMINED, State.END);\n }\n }\n\n if (!handler.awaiting) {\n return;\n }\n\n handler.awaiting = false;\n\n this.awaitingHandlers = this.awaitingHandlers.filter(\n (otherHandler) => otherHandler !== handler\n );\n }\n\n private addAwaitingHandler(handler: IGestureHandler): void {\n if (this.awaitingHandlers.includes(handler)) {\n return;\n }\n\n this.awaitingHandlers.push(handler);\n this.awaitingHandlersTags.add(handler.handlerTag);\n\n handler.awaiting = true;\n handler.activationIndex = this.activationIndex++;\n }\n\n public recordHandlerIfNotPresent(handler: IGestureHandler): void {\n if (this.gestureHandlers.includes(handler)) {\n return;\n }\n\n this.gestureHandlers.push(handler);\n\n handler.active = false;\n handler.awaiting = false;\n handler.activationIndex = Number.MAX_SAFE_INTEGER;\n }\n\n private shouldHandlerWaitForOther(\n handler: IGestureHandler,\n otherHandler: IGestureHandler\n ): boolean {\n return (\n handler !== otherHandler &&\n (handler.shouldWaitForHandlerFailure(otherHandler) ||\n otherHandler.shouldRequireToWaitForFailure(handler))\n );\n }\n\n private canRunSimultaneously(\n gh1: IGestureHandler,\n gh2: IGestureHandler\n ): boolean {\n return (\n gh1 === gh2 ||\n gh1.shouldRecognizeSimultaneously(gh2) ||\n gh2.shouldRecognizeSimultaneously(gh1)\n );\n }\n\n private shouldHandlerBeCancelledBy(\n handler: IGestureHandler,\n otherHandler: IGestureHandler\n ): boolean {\n if (this.canRunSimultaneously(handler, otherHandler)) {\n return false;\n }\n\n if (handler.awaiting || handler.state === State.ACTIVE) {\n return handler.shouldBeCancelledByOther(otherHandler);\n }\n\n const handlerPointers: number[] = handler.getTrackedPointersID();\n const otherPointers: number[] = otherHandler.getTrackedPointersID();\n\n if (\n !PointerTracker.shareCommonPointers(handlerPointers, otherPointers) &&\n handler.delegate.view !== otherHandler.delegate.view\n ) {\n return this.checkOverlap(handler, otherHandler);\n }\n\n return true;\n }\n\n private checkOverlap(\n handler: IGestureHandler,\n otherHandler: IGestureHandler\n ): boolean {\n // If handlers don't have common pointers, default return value is false.\n // However, if at least on pointer overlaps with both handlers, we return true\n // This solves issue in overlapping parents example\n\n // TODO: Find better way to handle that issue, for example by activation order and handler cancelling\n\n const isPointerWithinBothBounds = (pointer: number) => {\n const point = handler.tracker.getLastAbsoluteCoords(pointer);\n\n return (\n handler.delegate.isPointerInBounds(point) &&\n otherHandler.delegate.isPointerInBounds(point)\n );\n };\n\n return handler.getTrackedPointersID().some(isPointerWithinBothBounds);\n }\n\n private isFinished(state: State): boolean {\n return (\n state === State.END || state === State.FAILED || state === State.CANCELLED\n );\n }\n\n // This function is called when handler receives touchdown event\n // If handler is using mouse or pen as a pointer and any handler receives touch event,\n // mouse/pen event dissappears - it doesn't send onPointerCancel nor onPointerUp (and others)\n // This became a problem because handler was left at active state without any signal to end or fail\n // To handle this, when new touch event is received, we loop through active handlers and check which type of\n // pointer they're using. If there are any handler with mouse/pen as a pointer, we cancel them\n public cancelMouseAndPenGestures(currentHandler: IGestureHandler): void {\n this.gestureHandlers.forEach((handler: IGestureHandler) => {\n if (\n handler.pointerType !== PointerType.MOUSE &&\n handler.pointerType !== PointerType.STYLUS\n ) {\n return;\n }\n\n if (handler !== currentHandler) {\n handler.cancel();\n } else {\n // Handler that received touch event should have its pointer tracker reset\n // This allows handler to smoothly change from mouse/pen to touch\n // The drawback is, that when we try to use mouse/pen one more time, it doesn't send onPointerDown at the first time\n // so it is required to click two times to get handler to work\n //\n // However, handler will receive manually created onPointerEnter that is triggered in EventManager in onPointerMove method.\n // There may be possibility to use that fact to make handler respond properly to first mouse click\n handler.tracker.resetTracker();\n }\n });\n }\n\n public static get instance(): GestureHandlerOrchestrator {\n if (!GestureHandlerOrchestrator._instance) {\n GestureHandlerOrchestrator._instance = new GestureHandlerOrchestrator();\n }\n\n return GestureHandlerOrchestrator._instance;\n }\n}\n"]}