@amazon-devices/react-native-gesture-handler 2.0.9000000000 → 4.0.0-rn-83

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 (1300) hide show
  1. package/README.md +70 -0
  2. package/RNGestureHandler.podspec +22 -21
  3. package/ReanimatedDrawerLayout/package.json +6 -0
  4. package/ReanimatedSwipeable/package.json +6 -0
  5. package/SystemBundles/e82012a422f9e1059c6cee278b1f8d0bcc98609171576a84702a68ac119f1947.bundle +14670 -0
  6. package/SystemBundles/e82012a422f9e1059c6cee278b1f8d0bcc98609171576a84702a68ac119f1947.map +5041 -0
  7. package/SystemModules/amzn__react-native-gesture-handler-4.modules.txt +79 -0
  8. package/SystemModules/amzn__react-native-gesture-handler-4.private.modules.txt +67 -0
  9. package/SystemModules/keplerscript-system-bundle-config.json +3 -3
  10. package/android/build.gradle +104 -57
  11. package/android/{src/fabric → fabric/src/main}/java/com/swmansion/gesturehandler/ReactContextExtensions.kt +2 -0
  12. package/android/gradle.properties +3 -3
  13. package/android/noreanimated/src/main/java/com/swmansion/gesturehandler/ReanimatedEventDispatcher.kt +3 -1
  14. package/android/nosvg/src/main/java/com/swmansion/gesturehandler/RNSVGHitTester.kt +13 -0
  15. package/android/{src/paper → paper/src/main}/java/com/facebook/react/viewmanagers/RNGestureHandlerButtonManagerDelegate.java +19 -9
  16. package/android/{src/paper → paper/src/main}/java/com/facebook/react/viewmanagers/RNGestureHandlerButtonManagerInterface.java +5 -1
  17. package/android/{src/paper → paper/src/main}/java/com/facebook/react/viewmanagers/RNGestureHandlerRootViewManagerDelegate.java +3 -2
  18. package/android/{src/paper → paper/src/main}/java/com/facebook/react/viewmanagers/RNGestureHandlerRootViewManagerInterface.java +2 -1
  19. package/android/paper/src/main/java/com/swmansion/gesturehandler/NativeRNGestureHandlerModuleSpec.java +67 -0
  20. package/android/{src/paper → paper/src/main}/java/com/swmansion/gesturehandler/ReactContextExtensions.kt +4 -1
  21. package/android/reanimated/src/main/java/com/swmansion/gesturehandler/ReanimatedEventDispatcher.kt +1 -1
  22. package/android/src/main/AndroidManifest.xml +1 -3
  23. package/android/src/main/java/com/swmansion/gesturehandler/RNGestureHandlerPackage.kt +67 -8
  24. package/android/src/main/java/com/swmansion/gesturehandler/core/DiagonalDirections.kt +8 -0
  25. package/android/src/main/java/com/swmansion/gesturehandler/core/FlingGestureHandler.kt +90 -25
  26. package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandler.kt +347 -141
  27. package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerInteractionController.kt +4 -4
  28. package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerOrchestrator.kt +197 -137
  29. package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerRegistry.kt +1 -1
  30. package/android/src/main/java/com/swmansion/gesturehandler/core/GestureUtils.kt +15 -2
  31. package/android/src/main/java/com/swmansion/gesturehandler/core/HoverGestureHandler.kt +36 -6
  32. package/android/src/main/java/com/swmansion/gesturehandler/core/LongPressGestureHandler.kt +127 -17
  33. package/android/src/main/java/com/swmansion/gesturehandler/core/ManualGestureHandler.kt +12 -1
  34. package/android/src/main/java/com/swmansion/gesturehandler/core/NativeViewGestureHandler.kt +137 -46
  35. package/android/src/main/java/com/swmansion/gesturehandler/core/OnTouchEventListener.kt +3 -3
  36. package/android/src/main/java/com/swmansion/gesturehandler/core/PanGestureHandler.kt +200 -93
  37. package/android/src/main/java/com/swmansion/gesturehandler/core/PinchGestureHandler.kt +21 -14
  38. package/android/src/main/java/com/swmansion/gesturehandler/core/PointerEventsConfig.kt +1 -1
  39. package/android/src/main/java/com/swmansion/gesturehandler/core/RotationGestureDetector.kt +56 -12
  40. package/android/src/main/java/com/swmansion/gesturehandler/core/RotationGestureHandler.kt +12 -5
  41. package/android/src/main/java/com/swmansion/gesturehandler/core/ScaleGestureDetector.java +10 -0
  42. package/android/src/main/java/com/swmansion/gesturehandler/core/StylusData.kt +103 -0
  43. package/android/src/main/java/com/swmansion/gesturehandler/core/TapGestureHandler.kt +62 -36
  44. package/android/src/main/java/com/swmansion/gesturehandler/core/Vector.kt +61 -0
  45. package/android/src/main/java/com/swmansion/gesturehandler/react/Extensions.kt +1 -1
  46. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.kt +200 -50
  47. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEnabledRootView.kt +9 -4
  48. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEvent.kt +25 -27
  49. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEventDispatcher.kt +189 -0
  50. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerFactoryUtil.kt +34 -0
  51. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerInteractionManager.kt +18 -11
  52. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.kt +70 -645
  53. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRegistry.kt +8 -14
  54. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootHelper.kt +38 -19
  55. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootView.kt +16 -13
  56. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootViewManager.kt +2 -4
  57. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerStateChangeEvent.kt +34 -28
  58. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerTouchEvent.kt +11 -10
  59. package/android/src/main/java/com/swmansion/gesturehandler/react/RNViewConfigurationHelper.kt +15 -12
  60. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/FlingGestureHandlerEventDataBuilder.kt +31 -0
  61. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/GestureHandlerEventDataBuilder.kt +25 -0
  62. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/HoverGestureHandlerEventDataBuilder.kt +38 -0
  63. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/LongPressGestureHandlerEventDataBuilder.kt +34 -0
  64. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/ManualGestureHandlerEventDataBuilder.kt +6 -0
  65. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/NativeGestureHandlerEventDataBuilder.kt +19 -0
  66. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/PanGestureHandlerEventDataBuilder.kt +50 -0
  67. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/PinchGestureHandlerEventDataBuilder.kt +31 -0
  68. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/RotationGestureHandlerEventDataBuilder.kt +31 -0
  69. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/TapGestureHandlerEventDataBuilder.kt +31 -0
  70. package/android/src/main/jni/CMakeLists.txt +22 -6
  71. package/android/src/main/jni/cpp-adapter.cpp +39 -30
  72. package/android/svg/src/main/java/com/swmansion/gesturehandler/RNSVGHitTester.kt +65 -0
  73. package/{ios → apple}/Handlers/RNFlingHandler.h +1 -0
  74. package/apple/Handlers/RNFlingHandler.m +313 -0
  75. package/{ios → apple}/Handlers/RNForceTouchHandler.m +29 -8
  76. package/{ios → apple}/Handlers/RNHoverHandler.m +84 -15
  77. package/apple/Handlers/RNLongPressHandler.m +290 -0
  78. package/{ios → apple}/Handlers/RNManualHandler.m +58 -13
  79. package/{ios → apple}/Handlers/RNNativeViewHandler.mm +77 -28
  80. package/{ios → apple}/Handlers/RNPanHandler.m +166 -21
  81. package/apple/Handlers/RNPinchHandler.m +186 -0
  82. package/apple/Handlers/RNRotationHandler.m +169 -0
  83. package/{ios → apple}/Handlers/RNTapHandler.m +100 -27
  84. package/apple/RNGHStylusData.h +77 -0
  85. package/apple/RNGHStylusData.m +37 -0
  86. package/apple/RNGHUIKit.h +29 -0
  87. package/apple/RNGHVector.h +31 -0
  88. package/apple/RNGHVector.m +67 -0
  89. package/{ios → apple}/RNGestureHandler.h +23 -3
  90. package/{ios/RNGestureHandler.m → apple/RNGestureHandler.mm} +199 -21
  91. package/apple/RNGestureHandlerButton.h +39 -0
  92. package/apple/RNGestureHandlerButton.mm +214 -0
  93. package/{ios → apple}/RNGestureHandlerButtonComponentView.h +6 -1
  94. package/apple/RNGestureHandlerButtonComponentView.mm +219 -0
  95. package/{ios/RNGestureHandlerButtonManager.m → apple/RNGestureHandlerButtonManager.mm} +5 -3
  96. package/apple/RNGestureHandlerDirection.h +33 -0
  97. package/{ios → apple}/RNGestureHandlerEvents.h +21 -10
  98. package/{ios → apple}/RNGestureHandlerEvents.m +39 -13
  99. package/{ios → apple}/RNGestureHandlerManager.h +7 -2
  100. package/{ios → apple}/RNGestureHandlerManager.mm +84 -18
  101. package/apple/RNGestureHandlerModule.h +19 -0
  102. package/{ios → apple}/RNGestureHandlerModule.mm +88 -73
  103. package/{ios → apple}/RNGestureHandlerPointerTracker.h +5 -5
  104. package/{ios → apple}/RNGestureHandlerPointerTracker.m +21 -14
  105. package/apple/RNGestureHandlerPointerType.h +8 -0
  106. package/{ios → apple}/RNGestureHandlerRegistry.h +1 -1
  107. package/{ios → apple}/RNGestureHandlerRegistry.m +1 -1
  108. package/{ios → apple}/RNManualActivationRecognizer.h +8 -0
  109. package/{ios → apple}/RNManualActivationRecognizer.m +28 -7
  110. package/{ios → apple}/RNRootViewGestureRecognizer.m +77 -4
  111. package/jestSetup.js +22 -3
  112. package/kepler-compatibility.json +2 -3
  113. package/lib/commonjs/ActionType.js.map +1 -1
  114. package/lib/commonjs/Directions.js +21 -5
  115. package/lib/commonjs/Directions.js.map +1 -1
  116. package/lib/commonjs/EnableNewWebImplementation.js +11 -0
  117. package/lib/commonjs/EnableNewWebImplementation.js.map +1 -1
  118. package/lib/commonjs/GestureHandlerRootViewContext.js.map +1 -1
  119. package/lib/commonjs/PlatformConstants.js +1 -2
  120. package/lib/commonjs/PlatformConstants.js.map +1 -1
  121. package/lib/commonjs/PlatformConstants.kepler.js +12 -0
  122. package/lib/commonjs/PlatformConstants.kepler.js.map +1 -0
  123. package/lib/commonjs/PlatformConstants.web.js.map +1 -1
  124. package/lib/commonjs/PointerType.js +15 -0
  125. package/lib/commonjs/PointerType.js.map +1 -0
  126. package/lib/commonjs/RNGestureHandlerModule.js +5 -16
  127. package/lib/commonjs/RNGestureHandlerModule.js.map +1 -1
  128. package/lib/commonjs/RNGestureHandlerModule.kepler.js +4 -5
  129. package/lib/commonjs/RNGestureHandlerModule.kepler.js.map +1 -1
  130. package/lib/commonjs/RNGestureHandlerModule.web.js +25 -53
  131. package/lib/commonjs/RNGestureHandlerModule.web.js.map +1 -1
  132. package/lib/commonjs/RNGestureHandlerModule.windows.js +16 -81
  133. package/lib/commonjs/RNGestureHandlerModule.windows.js.map +1 -1
  134. package/lib/commonjs/RNRenderer.js.map +1 -1
  135. package/lib/commonjs/RNRenderer.web.js.map +1 -1
  136. package/lib/commonjs/State.js.map +1 -1
  137. package/lib/commonjs/TouchEventType.js.map +1 -1
  138. package/lib/commonjs/components/DrawerLayout.js +421 -385
  139. package/lib/commonjs/components/DrawerLayout.js.map +1 -1
  140. package/lib/commonjs/components/GestureButtons.js +138 -120
  141. package/lib/commonjs/components/GestureButtons.js.map +1 -1
  142. package/lib/commonjs/components/GestureButtonsProps.js +6 -0
  143. package/lib/commonjs/components/GestureButtonsProps.js.map +1 -0
  144. package/lib/commonjs/components/GestureComponents.js +16 -14
  145. package/lib/commonjs/components/GestureComponents.js.map +1 -1
  146. package/lib/commonjs/components/GestureComponents.web.js +10 -9
  147. package/lib/commonjs/components/GestureComponents.web.js.map +1 -1
  148. package/lib/commonjs/components/GestureHandlerButton.js.map +1 -1
  149. package/lib/commonjs/components/GestureHandlerButton.web.js +6 -6
  150. package/lib/commonjs/components/GestureHandlerButton.web.js.map +1 -1
  151. package/lib/commonjs/components/GestureHandlerRootView.android.js +20 -7
  152. package/lib/commonjs/components/GestureHandlerRootView.android.js.map +1 -1
  153. package/lib/commonjs/components/GestureHandlerRootView.js +19 -7
  154. package/lib/commonjs/components/GestureHandlerRootView.js.map +1 -1
  155. package/lib/commonjs/components/GestureHandlerRootView.kepler.js +9 -6
  156. package/lib/commonjs/components/GestureHandlerRootView.kepler.js.map +1 -1
  157. package/lib/commonjs/components/GestureHandlerRootView.web.js +18 -6
  158. package/lib/commonjs/components/GestureHandlerRootView.web.js.map +1 -1
  159. package/lib/commonjs/components/Pressable/Pressable.js +274 -0
  160. package/lib/commonjs/components/Pressable/Pressable.js.map +1 -0
  161. package/lib/commonjs/components/Pressable/PressableProps.js +6 -0
  162. package/lib/commonjs/components/Pressable/PressableProps.js.map +1 -0
  163. package/lib/commonjs/components/Pressable/StateMachine.js +44 -0
  164. package/lib/commonjs/components/Pressable/StateMachine.js.map +1 -0
  165. package/lib/commonjs/components/Pressable/index.js +14 -0
  166. package/lib/commonjs/components/Pressable/index.js.map +1 -0
  167. package/lib/commonjs/components/Pressable/stateDefinitions.js +88 -0
  168. package/lib/commonjs/components/Pressable/stateDefinitions.js.map +1 -0
  169. package/lib/commonjs/components/Pressable/utils.js +92 -0
  170. package/lib/commonjs/components/Pressable/utils.js.map +1 -0
  171. package/lib/commonjs/components/ReanimatedDrawerLayout.js +357 -0
  172. package/lib/commonjs/components/ReanimatedDrawerLayout.js.map +1 -0
  173. package/lib/commonjs/components/ReanimatedSwipeable/ReanimatedSwipeable.js +337 -0
  174. package/lib/commonjs/components/ReanimatedSwipeable/ReanimatedSwipeable.js.map +1 -0
  175. package/lib/commonjs/components/ReanimatedSwipeable/ReanimatedSwipeableProps.js +12 -0
  176. package/lib/commonjs/components/ReanimatedSwipeable/ReanimatedSwipeableProps.js.map +1 -0
  177. package/lib/commonjs/components/ReanimatedSwipeable/index.js +21 -0
  178. package/lib/commonjs/components/ReanimatedSwipeable/index.js.map +1 -0
  179. package/lib/commonjs/components/Swipeable.js +286 -261
  180. package/lib/commonjs/components/Swipeable.js.map +1 -1
  181. package/lib/commonjs/components/Text.js +60 -0
  182. package/lib/commonjs/components/Text.js.map +1 -0
  183. package/lib/commonjs/components/gestureHandlerRootHOC.js +12 -6
  184. package/lib/commonjs/components/gestureHandlerRootHOC.js.map +1 -1
  185. package/lib/commonjs/components/touchables/ExtraButtonProps.js +2 -0
  186. package/lib/commonjs/components/touchables/ExtraButtonProps.js.map +1 -0
  187. package/lib/commonjs/components/touchables/GenericTouchable.js +83 -91
  188. package/lib/commonjs/components/touchables/GenericTouchable.js.map +1 -1
  189. package/lib/commonjs/components/touchables/GenericTouchableProps.js +6 -0
  190. package/lib/commonjs/components/touchables/GenericTouchableProps.js.map +1 -0
  191. package/lib/commonjs/components/touchables/TouchableHighlight.js +51 -48
  192. package/lib/commonjs/components/touchables/TouchableHighlight.js.map +1 -1
  193. package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js +35 -35
  194. package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js.map +1 -1
  195. package/lib/commonjs/components/touchables/TouchableNativeFeedback.js +5 -1
  196. package/lib/commonjs/components/touchables/TouchableNativeFeedback.js.map +1 -1
  197. package/lib/commonjs/components/touchables/TouchableNativeFeedbackProps.js +6 -0
  198. package/lib/commonjs/components/touchables/TouchableNativeFeedbackProps.js.map +1 -0
  199. package/lib/commonjs/components/touchables/TouchableOpacity.js +39 -38
  200. package/lib/commonjs/components/touchables/TouchableOpacity.js.map +1 -1
  201. package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js +22 -7
  202. package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js.map +1 -1
  203. package/lib/commonjs/components/touchables/index.js.map +1 -1
  204. package/lib/commonjs/components/utils.js +17 -0
  205. package/lib/commonjs/components/utils.js.map +1 -0
  206. package/lib/commonjs/findNodeHandle.js +9 -0
  207. package/lib/commonjs/findNodeHandle.js.map +1 -0
  208. package/lib/commonjs/findNodeHandle.web.js +39 -0
  209. package/lib/commonjs/findNodeHandle.web.js.map +1 -0
  210. package/lib/commonjs/getShadowNodeFromRef.js +28 -4
  211. package/lib/commonjs/getShadowNodeFromRef.js.map +1 -1
  212. package/lib/commonjs/getShadowNodeFromRef.web.js.map +1 -1
  213. package/lib/commonjs/ghQueueMicrotask.js +10 -0
  214. package/lib/commonjs/ghQueueMicrotask.js.map +1 -0
  215. package/lib/commonjs/handlers/FlingGestureHandler.js +13 -0
  216. package/lib/commonjs/handlers/FlingGestureHandler.js.map +1 -1
  217. package/lib/commonjs/handlers/ForceTouchGestureHandler.js +15 -6
  218. package/lib/commonjs/handlers/ForceTouchGestureHandler.js.map +1 -1
  219. package/lib/commonjs/handlers/GestureHandlerEventPayload.js +6 -0
  220. package/lib/commonjs/handlers/GestureHandlerEventPayload.js.map +1 -0
  221. package/lib/commonjs/handlers/LongPressGestureHandler.js +14 -1
  222. package/lib/commonjs/handlers/LongPressGestureHandler.js.map +1 -1
  223. package/lib/commonjs/handlers/NativeViewGestureHandler.js +13 -0
  224. package/lib/commonjs/handlers/NativeViewGestureHandler.js.map +1 -1
  225. package/lib/commonjs/handlers/PanGestureHandler.js +13 -0
  226. package/lib/commonjs/handlers/PanGestureHandler.js.map +1 -1
  227. package/lib/commonjs/handlers/PinchGestureHandler.js +12 -0
  228. package/lib/commonjs/handlers/PinchGestureHandler.js.map +1 -1
  229. package/lib/commonjs/handlers/PressabilityDebugView.js.map +1 -1
  230. package/lib/commonjs/handlers/PressabilityDebugView.web.js.map +1 -1
  231. package/lib/commonjs/handlers/RotationGestureHandler.js +12 -0
  232. package/lib/commonjs/handlers/RotationGestureHandler.js.map +1 -1
  233. package/lib/commonjs/handlers/TapGestureHandler.js +13 -0
  234. package/lib/commonjs/handlers/TapGestureHandler.js.map +1 -1
  235. package/lib/commonjs/handlers/createHandler.js +144 -144
  236. package/lib/commonjs/handlers/createHandler.js.map +1 -1
  237. package/lib/commonjs/handlers/createNativeWrapper.js +19 -16
  238. package/lib/commonjs/handlers/createNativeWrapper.js.map +1 -1
  239. package/lib/commonjs/handlers/customDirectEventTypes.js +13 -0
  240. package/lib/commonjs/handlers/customDirectEventTypes.js.map +1 -0
  241. package/lib/commonjs/handlers/customDirectEventTypes.web.js +10 -0
  242. package/lib/commonjs/handlers/customDirectEventTypes.web.js.map +1 -0
  243. package/lib/commonjs/handlers/gestureHandlerCommon.js +13 -72
  244. package/lib/commonjs/handlers/gestureHandlerCommon.js.map +1 -1
  245. package/lib/commonjs/handlers/gestureHandlerTypesCompat.js.map +1 -1
  246. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.js +32 -0
  247. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.js.map +1 -0
  248. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.web.js +41 -0
  249. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.web.js.map +1 -0
  250. package/lib/commonjs/handlers/gestures/GestureDetector/attachHandlers.js +67 -0
  251. package/lib/commonjs/handlers/gestures/GestureDetector/attachHandlers.js.map +1 -0
  252. package/lib/commonjs/handlers/gestures/GestureDetector/dropHandlers.js +20 -0
  253. package/lib/commonjs/handlers/gestures/GestureDetector/dropHandlers.js.map +1 -0
  254. package/lib/commonjs/handlers/gestures/GestureDetector/index.js +125 -0
  255. package/lib/commonjs/handlers/gestures/GestureDetector/index.js.map +1 -0
  256. package/lib/commonjs/handlers/gestures/GestureDetector/needsToReattach.js +22 -0
  257. package/lib/commonjs/handlers/gestures/GestureDetector/needsToReattach.js.map +1 -0
  258. package/lib/commonjs/handlers/gestures/GestureDetector/types.js +6 -0
  259. package/lib/commonjs/handlers/gestures/GestureDetector/types.js.map +1 -0
  260. package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js +66 -0
  261. package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js.map +1 -0
  262. package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js +143 -0
  263. package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +1 -0
  264. package/lib/commonjs/handlers/gestures/GestureDetector/useDetectorUpdater.js +47 -0
  265. package/lib/commonjs/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +1 -0
  266. package/lib/commonjs/handlers/gestures/GestureDetector/useMountReactions.js +41 -0
  267. package/lib/commonjs/handlers/gestures/GestureDetector/useMountReactions.js.map +1 -0
  268. package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js +45 -0
  269. package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -0
  270. package/lib/commonjs/handlers/gestures/GestureDetector/utils.js +143 -0
  271. package/lib/commonjs/handlers/gestures/GestureDetector/utils.js.map +1 -0
  272. package/lib/commonjs/handlers/gestures/eventReceiver.js +15 -23
  273. package/lib/commonjs/handlers/gestures/eventReceiver.js.map +1 -1
  274. package/lib/commonjs/handlers/gestures/flingGesture.js +14 -4
  275. package/lib/commonjs/handlers/gestures/flingGesture.js.map +1 -1
  276. package/lib/commonjs/handlers/gestures/forceTouchGesture.js +30 -4
  277. package/lib/commonjs/handlers/gestures/forceTouchGesture.js.map +1 -1
  278. package/lib/commonjs/handlers/gestures/gesture.js +162 -20
  279. package/lib/commonjs/handlers/gestures/gesture.js.map +1 -1
  280. package/lib/commonjs/handlers/gestures/gestureComposition.js +9 -9
  281. package/lib/commonjs/handlers/gestures/gestureComposition.js.map +1 -1
  282. package/lib/commonjs/handlers/gestures/gestureObjects.js +59 -0
  283. package/lib/commonjs/handlers/gestures/gestureObjects.js.map +1 -1
  284. package/lib/commonjs/handlers/gestures/gestureStateManager.js +50 -40
  285. package/lib/commonjs/handlers/gestures/gestureStateManager.js.map +1 -1
  286. package/lib/commonjs/handlers/gestures/gestureStateManager.web.js +2 -1
  287. package/lib/commonjs/handlers/gestures/gestureStateManager.web.js.map +1 -1
  288. package/lib/commonjs/handlers/gestures/hoverGesture.js +2 -5
  289. package/lib/commonjs/handlers/gestures/hoverGesture.js.map +1 -1
  290. package/lib/commonjs/handlers/gestures/longPressGesture.js +22 -4
  291. package/lib/commonjs/handlers/gestures/longPressGesture.js.map +1 -1
  292. package/lib/commonjs/handlers/gestures/manualGesture.js.map +1 -1
  293. package/lib/commonjs/handlers/gestures/nativeGesture.js +11 -4
  294. package/lib/commonjs/handlers/gestures/nativeGesture.js.map +1 -1
  295. package/lib/commonjs/handlers/gestures/panGesture.js +77 -4
  296. package/lib/commonjs/handlers/gestures/panGesture.js.map +1 -1
  297. package/lib/commonjs/handlers/gestures/pinchGesture.js.map +1 -1
  298. package/lib/commonjs/handlers/gestures/reanimatedWrapper.js +1 -2
  299. package/lib/commonjs/handlers/gestures/reanimatedWrapper.js.map +1 -1
  300. package/lib/commonjs/handlers/gestures/rotationGesture.js.map +1 -1
  301. package/lib/commonjs/handlers/gestures/tapGesture.js +43 -4
  302. package/lib/commonjs/handlers/gestures/tapGesture.js.map +1 -1
  303. package/lib/commonjs/handlers/getNextHandlerTag.js +11 -0
  304. package/lib/commonjs/handlers/getNextHandlerTag.js.map +1 -0
  305. package/lib/commonjs/handlers/handlersRegistry.js +7 -9
  306. package/lib/commonjs/handlers/handlersRegistry.js.map +1 -1
  307. package/lib/commonjs/handlers/utils.js +69 -0
  308. package/lib/commonjs/handlers/utils.js.map +1 -0
  309. package/lib/commonjs/index.js +28 -0
  310. package/lib/commonjs/index.js.map +1 -1
  311. package/lib/commonjs/init.js +1 -1
  312. package/lib/commonjs/init.js.map +1 -1
  313. package/lib/commonjs/jestUtils/index.js.map +1 -1
  314. package/lib/commonjs/jestUtils/jestUtils.js +18 -14
  315. package/lib/commonjs/jestUtils/jestUtils.js.map +1 -1
  316. package/lib/commonjs/mocks/Pressable.js +13 -0
  317. package/lib/commonjs/mocks/Pressable.js.map +1 -0
  318. package/lib/commonjs/mocks/mocks.js +70 -0
  319. package/lib/commonjs/mocks/mocks.js.map +1 -0
  320. package/lib/commonjs/mocks.js.map +1 -1
  321. package/lib/commonjs/mountRegistry.js +37 -0
  322. package/lib/commonjs/mountRegistry.js.map +1 -0
  323. package/lib/commonjs/package.json +1 -0
  324. package/lib/commonjs/specs/NativeRNGestureHandlerModule.js +9 -0
  325. package/lib/commonjs/specs/NativeRNGestureHandlerModule.js.map +1 -0
  326. package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.kepler.js.map +1 -1
  327. package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.ts +24 -0
  328. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.kepler.js +17 -0
  329. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.kepler.js.map +1 -0
  330. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.ts +7 -0
  331. package/lib/commonjs/typeUtils.js.map +1 -1
  332. package/lib/commonjs/utils.js +47 -16
  333. package/lib/commonjs/utils.js.map +1 -1
  334. package/lib/commonjs/web/Gestures.js +48 -0
  335. package/lib/commonjs/web/Gestures.js.map +1 -0
  336. package/lib/commonjs/web/constants.js +2 -7
  337. package/lib/commonjs/web/constants.js.map +1 -1
  338. package/lib/commonjs/web/detectors/RotationGestureDetector.js +35 -40
  339. package/lib/commonjs/web/detectors/RotationGestureDetector.js.map +1 -1
  340. package/lib/commonjs/web/detectors/ScaleGestureDetector.js +30 -46
  341. package/lib/commonjs/web/detectors/ScaleGestureDetector.js.map +1 -1
  342. package/lib/commonjs/web/handlers/FlingGestureHandler.js +50 -34
  343. package/lib/commonjs/web/handlers/FlingGestureHandler.js.map +1 -1
  344. package/lib/commonjs/web/handlers/GestureHandler.js +218 -197
  345. package/lib/commonjs/web/handlers/GestureHandler.js.map +1 -1
  346. package/lib/commonjs/web/handlers/HoverGestureHandler.js +12 -15
  347. package/lib/commonjs/web/handlers/HoverGestureHandler.js.map +1 -1
  348. package/lib/commonjs/web/handlers/IGestureHandler.js +2 -0
  349. package/lib/commonjs/web/handlers/IGestureHandler.js.map +1 -0
  350. package/lib/commonjs/web/handlers/LongPressGestureHandler.js +57 -30
  351. package/lib/commonjs/web/handlers/LongPressGestureHandler.js.map +1 -1
  352. package/lib/commonjs/web/handlers/ManualGestureHandler.js +1 -12
  353. package/lib/commonjs/web/handlers/ManualGestureHandler.js.map +1 -1
  354. package/lib/commonjs/web/handlers/NativeViewGestureHandler.js +42 -41
  355. package/lib/commonjs/web/handlers/NativeViewGestureHandler.js.map +1 -1
  356. package/lib/commonjs/web/handlers/PanGestureHandler.js +117 -65
  357. package/lib/commonjs/web/handlers/PanGestureHandler.js.map +1 -1
  358. package/lib/commonjs/web/handlers/PinchGestureHandler.js +36 -50
  359. package/lib/commonjs/web/handlers/PinchGestureHandler.js.map +1 -1
  360. package/lib/commonjs/web/handlers/RotationGestureHandler.js +32 -49
  361. package/lib/commonjs/web/handlers/RotationGestureHandler.js.map +1 -1
  362. package/lib/commonjs/web/handlers/TapGestureHandler.js +39 -43
  363. package/lib/commonjs/web/handlers/TapGestureHandler.js.map +1 -1
  364. package/lib/commonjs/web/interfaces.js +6 -18
  365. package/lib/commonjs/web/interfaces.js.map +1 -1
  366. package/lib/commonjs/web/tools/CircularBuffer.js +12 -19
  367. package/lib/commonjs/web/tools/CircularBuffer.js.map +1 -1
  368. package/lib/commonjs/web/tools/EventManager.js +7 -8
  369. package/lib/commonjs/web/tools/EventManager.js.map +1 -1
  370. package/lib/commonjs/web/tools/GestureHandlerDelegate.js.map +1 -1
  371. package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js +121 -159
  372. package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js.map +1 -1
  373. package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js +102 -30
  374. package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js.map +1 -1
  375. package/lib/commonjs/web/tools/InteractionManager.js +44 -47
  376. package/lib/commonjs/web/tools/InteractionManager.js.map +1 -1
  377. package/lib/commonjs/web/tools/KeyboardEventManager.js +108 -0
  378. package/lib/commonjs/web/tools/KeyboardEventManager.js.map +1 -0
  379. package/lib/commonjs/web/tools/LeastSquareSolver.js +22 -30
  380. package/lib/commonjs/web/tools/LeastSquareSolver.js.map +1 -1
  381. package/lib/commonjs/web/tools/NodeManager.js +5 -7
  382. package/lib/commonjs/web/tools/NodeManager.js.map +1 -1
  383. package/lib/commonjs/web/tools/PointerEventManager.js +148 -130
  384. package/lib/commonjs/web/tools/PointerEventManager.js.map +1 -1
  385. package/lib/commonjs/web/tools/PointerTracker.js +97 -107
  386. package/lib/commonjs/web/tools/PointerTracker.js.map +1 -1
  387. package/lib/commonjs/web/tools/Vector.js +37 -0
  388. package/lib/commonjs/web/tools/Vector.js.map +1 -0
  389. package/lib/commonjs/web/tools/VelocityTracker.js +11 -15
  390. package/lib/commonjs/web/tools/VelocityTracker.js.map +1 -1
  391. package/lib/commonjs/web/tools/WheelEventManager.js +55 -0
  392. package/lib/commonjs/web/tools/WheelEventManager.js.map +1 -0
  393. package/lib/commonjs/web/utils.js +221 -0
  394. package/lib/commonjs/web/utils.js.map +1 -1
  395. package/lib/commonjs/web_hammer/DiscreteGestureHandler.js +1 -1
  396. package/lib/commonjs/web_hammer/DiscreteGestureHandler.js.map +1 -1
  397. package/lib/commonjs/web_hammer/DraggingGestureHandler.js +1 -1
  398. package/lib/commonjs/web_hammer/DraggingGestureHandler.js.map +1 -1
  399. package/lib/commonjs/web_hammer/Errors.js.map +1 -1
  400. package/lib/commonjs/web_hammer/FlingGestureHandler.js +1 -1
  401. package/lib/commonjs/web_hammer/FlingGestureHandler.js.map +1 -1
  402. package/lib/commonjs/web_hammer/GestureHandler.js +122 -129
  403. package/lib/commonjs/web_hammer/GestureHandler.js.map +1 -1
  404. package/lib/commonjs/web_hammer/IndiscreteGestureHandler.js.map +1 -1
  405. package/lib/commonjs/web_hammer/LongPressGestureHandler.js +1 -1
  406. package/lib/commonjs/web_hammer/LongPressGestureHandler.js.map +1 -1
  407. package/lib/commonjs/web_hammer/NativeViewGestureHandler.js +1 -2
  408. package/lib/commonjs/web_hammer/NativeViewGestureHandler.js.map +1 -1
  409. package/lib/commonjs/web_hammer/NodeManager.js +2 -1
  410. package/lib/commonjs/web_hammer/NodeManager.js.map +1 -1
  411. package/lib/commonjs/web_hammer/PanGestureHandler.js.map +1 -1
  412. package/lib/commonjs/web_hammer/PinchGestureHandler.js.map +1 -1
  413. package/lib/commonjs/web_hammer/PressGestureHandler.js +2 -9
  414. package/lib/commonjs/web_hammer/PressGestureHandler.js.map +1 -1
  415. package/lib/commonjs/web_hammer/RotationGestureHandler.js +1 -2
  416. package/lib/commonjs/web_hammer/RotationGestureHandler.js.map +1 -1
  417. package/lib/commonjs/web_hammer/TapGestureHandler.js +19 -27
  418. package/lib/commonjs/web_hammer/TapGestureHandler.js.map +1 -1
  419. package/lib/commonjs/web_hammer/constants.js.map +1 -1
  420. package/lib/commonjs/web_hammer/utils.js.map +1 -1
  421. package/lib/module/ActionType.js +2 -0
  422. package/lib/module/ActionType.js.map +1 -1
  423. package/lib/module/Directions.js +22 -4
  424. package/lib/module/Directions.js.map +1 -1
  425. package/lib/module/EnableNewWebImplementation.js +13 -0
  426. package/lib/module/EnableNewWebImplementation.js.map +1 -1
  427. package/lib/module/GestureHandlerRootViewContext.js +2 -0
  428. package/lib/module/GestureHandlerRootViewContext.js.map +1 -1
  429. package/lib/module/PlatformConstants.js +3 -2
  430. package/lib/module/PlatformConstants.js.map +1 -1
  431. package/lib/module/PlatformConstants.kepler.js +8 -0
  432. package/lib/module/PlatformConstants.kepler.js.map +1 -0
  433. package/lib/module/PlatformConstants.web.js +2 -0
  434. package/lib/module/PlatformConstants.web.js.map +1 -1
  435. package/lib/module/PointerType.js +11 -0
  436. package/lib/module/PointerType.js.map +1 -0
  437. package/lib/module/RNGestureHandlerModule.js +6 -15
  438. package/lib/module/RNGestureHandlerModule.js.map +1 -1
  439. package/lib/module/RNGestureHandlerModule.kepler.js +5 -3
  440. package/lib/module/RNGestureHandlerModule.kepler.js.map +1 -1
  441. package/lib/module/RNGestureHandlerModule.web.js +22 -46
  442. package/lib/module/RNGestureHandlerModule.web.js.map +1 -1
  443. package/lib/module/RNGestureHandlerModule.windows.js +16 -78
  444. package/lib/module/RNGestureHandlerModule.windows.js.map +1 -1
  445. package/lib/module/RNRenderer.js +2 -0
  446. package/lib/module/RNRenderer.js.map +1 -1
  447. package/lib/module/RNRenderer.web.js +2 -0
  448. package/lib/module/RNRenderer.web.js.map +1 -1
  449. package/lib/module/State.js +2 -0
  450. package/lib/module/State.js.map +1 -1
  451. package/lib/module/TouchEventType.js +2 -0
  452. package/lib/module/TouchEventType.js.map +1 -1
  453. package/lib/module/components/DrawerLayout.js +420 -383
  454. package/lib/module/components/DrawerLayout.js.map +1 -1
  455. package/lib/module/components/GestureButtons.js +139 -115
  456. package/lib/module/components/GestureButtons.js.map +1 -1
  457. package/lib/module/components/GestureButtonsProps.js +4 -0
  458. package/lib/module/components/GestureButtonsProps.js.map +1 -0
  459. package/lib/module/components/GestureComponents.js +17 -12
  460. package/lib/module/components/GestureComponents.js.map +1 -1
  461. package/lib/module/components/GestureComponents.web.js +11 -7
  462. package/lib/module/components/GestureComponents.web.js.map +1 -1
  463. package/lib/module/components/GestureHandlerButton.js +2 -0
  464. package/lib/module/components/GestureHandlerButton.js.map +1 -1
  465. package/lib/module/components/GestureHandlerButton.web.js +7 -4
  466. package/lib/module/components/GestureHandlerButton.web.js.map +1 -1
  467. package/lib/module/components/GestureHandlerRootView.android.js +21 -5
  468. package/lib/module/components/GestureHandlerRootView.android.js.map +1 -1
  469. package/lib/module/components/GestureHandlerRootView.js +21 -6
  470. package/lib/module/components/GestureHandlerRootView.js.map +1 -1
  471. package/lib/module/components/GestureHandlerRootView.kepler.js +10 -4
  472. package/lib/module/components/GestureHandlerRootView.kepler.js.map +1 -1
  473. package/lib/module/components/GestureHandlerRootView.web.js +20 -5
  474. package/lib/module/components/GestureHandlerRootView.web.js.map +1 -1
  475. package/lib/module/components/Pressable/Pressable.js +268 -0
  476. package/lib/module/components/Pressable/Pressable.js.map +1 -0
  477. package/lib/module/components/Pressable/PressableProps.js +4 -0
  478. package/lib/module/components/Pressable/PressableProps.js.map +1 -0
  479. package/lib/module/components/Pressable/StateMachine.js +40 -0
  480. package/lib/module/components/Pressable/StateMachine.js.map +1 -0
  481. package/lib/module/components/Pressable/index.js +4 -0
  482. package/lib/module/components/Pressable/index.js.map +1 -0
  483. package/lib/module/components/Pressable/stateDefinitions.js +83 -0
  484. package/lib/module/components/Pressable/stateDefinitions.js.map +1 -0
  485. package/lib/module/components/Pressable/utils.js +84 -0
  486. package/lib/module/components/Pressable/utils.js.map +1 -0
  487. package/lib/module/components/ReanimatedDrawerLayout.js +352 -0
  488. package/lib/module/components/ReanimatedDrawerLayout.js.map +1 -0
  489. package/lib/module/components/ReanimatedSwipeable/ReanimatedSwipeable.js +332 -0
  490. package/lib/module/components/ReanimatedSwipeable/ReanimatedSwipeable.js.map +1 -0
  491. package/lib/module/components/ReanimatedSwipeable/ReanimatedSwipeableProps.js +8 -0
  492. package/lib/module/components/ReanimatedSwipeable/ReanimatedSwipeableProps.js.map +1 -0
  493. package/lib/module/components/ReanimatedSwipeable/index.js +5 -0
  494. package/lib/module/components/ReanimatedSwipeable/index.js.map +1 -0
  495. package/lib/module/components/Swipeable.js +285 -259
  496. package/lib/module/components/Swipeable.js.map +1 -1
  497. package/lib/module/components/Text.js +55 -0
  498. package/lib/module/components/Text.js.map +1 -0
  499. package/lib/module/components/gestureHandlerRootHOC.js +14 -3
  500. package/lib/module/components/gestureHandlerRootHOC.js.map +1 -1
  501. package/lib/module/components/touchables/ExtraButtonProps.js +2 -0
  502. package/lib/module/components/touchables/ExtraButtonProps.js.map +1 -0
  503. package/lib/module/components/touchables/GenericTouchable.js +84 -89
  504. package/lib/module/components/touchables/GenericTouchable.js.map +1 -1
  505. package/lib/module/components/touchables/GenericTouchableProps.js +4 -0
  506. package/lib/module/components/touchables/GenericTouchableProps.js.map +1 -0
  507. package/lib/module/components/touchables/TouchableHighlight.js +52 -46
  508. package/lib/module/components/touchables/TouchableHighlight.js.map +1 -1
  509. package/lib/module/components/touchables/TouchableNativeFeedback.android.js +36 -33
  510. package/lib/module/components/touchables/TouchableNativeFeedback.android.js.map +1 -1
  511. package/lib/module/components/touchables/TouchableNativeFeedback.js +8 -1
  512. package/lib/module/components/touchables/TouchableNativeFeedback.js.map +1 -1
  513. package/lib/module/components/touchables/TouchableNativeFeedbackProps.js +4 -0
  514. package/lib/module/components/touchables/TouchableNativeFeedbackProps.js.map +1 -0
  515. package/lib/module/components/touchables/TouchableOpacity.js +40 -36
  516. package/lib/module/components/touchables/TouchableOpacity.js.map +1 -1
  517. package/lib/module/components/touchables/TouchableWithoutFeedback.js +23 -5
  518. package/lib/module/components/touchables/TouchableWithoutFeedback.js.map +1 -1
  519. package/lib/module/components/touchables/index.js +2 -0
  520. package/lib/module/components/touchables/index.js.map +1 -1
  521. package/lib/module/components/utils.js +13 -0
  522. package/lib/module/components/utils.js.map +1 -0
  523. package/lib/module/findNodeHandle.js +5 -0
  524. package/lib/module/findNodeHandle.js.map +1 -0
  525. package/lib/module/findNodeHandle.web.js +35 -0
  526. package/lib/module/findNodeHandle.web.js.map +1 -0
  527. package/lib/module/getShadowNodeFromRef.js +30 -4
  528. package/lib/module/getShadowNodeFromRef.js.map +1 -1
  529. package/lib/module/getShadowNodeFromRef.web.js +2 -0
  530. package/lib/module/getShadowNodeFromRef.web.js.map +1 -1
  531. package/lib/module/ghQueueMicrotask.js +6 -0
  532. package/lib/module/ghQueueMicrotask.js.map +1 -0
  533. package/lib/module/handlers/FlingGestureHandler.js +15 -0
  534. package/lib/module/handlers/FlingGestureHandler.js.map +1 -1
  535. package/lib/module/handlers/ForceTouchGestureHandler.js +17 -6
  536. package/lib/module/handlers/ForceTouchGestureHandler.js.map +1 -1
  537. package/lib/module/handlers/GestureHandlerEventPayload.js +4 -0
  538. package/lib/module/handlers/GestureHandlerEventPayload.js.map +1 -0
  539. package/lib/module/handlers/LongPressGestureHandler.js +16 -1
  540. package/lib/module/handlers/LongPressGestureHandler.js.map +1 -1
  541. package/lib/module/handlers/NativeViewGestureHandler.js +15 -0
  542. package/lib/module/handlers/NativeViewGestureHandler.js.map +1 -1
  543. package/lib/module/handlers/PanGestureHandler.js +15 -0
  544. package/lib/module/handlers/PanGestureHandler.js.map +1 -1
  545. package/lib/module/handlers/PinchGestureHandler.js +15 -0
  546. package/lib/module/handlers/PinchGestureHandler.js.map +1 -1
  547. package/lib/module/handlers/PressabilityDebugView.js +2 -0
  548. package/lib/module/handlers/PressabilityDebugView.js.map +1 -1
  549. package/lib/module/handlers/PressabilityDebugView.web.js +2 -0
  550. package/lib/module/handlers/PressabilityDebugView.web.js.map +1 -1
  551. package/lib/module/handlers/RotationGestureHandler.js +15 -0
  552. package/lib/module/handlers/RotationGestureHandler.js.map +1 -1
  553. package/lib/module/handlers/TapGestureHandler.js +15 -0
  554. package/lib/module/handlers/TapGestureHandler.js.map +1 -1
  555. package/lib/module/handlers/createHandler.js +137 -136
  556. package/lib/module/handlers/createHandler.js.map +1 -1
  557. package/lib/module/handlers/createNativeWrapper.js +19 -12
  558. package/lib/module/handlers/createNativeWrapper.js.map +1 -1
  559. package/lib/module/handlers/customDirectEventTypes.js +5 -0
  560. package/lib/module/handlers/customDirectEventTypes.js.map +1 -0
  561. package/lib/module/handlers/customDirectEventTypes.web.js +7 -0
  562. package/lib/module/handlers/customDirectEventTypes.web.js.map +1 -0
  563. package/lib/module/handlers/gestureHandlerCommon.js +15 -65
  564. package/lib/module/handlers/gestureHandlerCommon.js.map +1 -1
  565. package/lib/module/handlers/gestureHandlerTypesCompat.js +2 -0
  566. package/lib/module/handlers/gestureHandlerTypesCompat.js.map +1 -1
  567. package/lib/module/handlers/gestures/GestureDetector/Wrap.js +26 -0
  568. package/lib/module/handlers/gestures/GestureDetector/Wrap.js.map +1 -0
  569. package/lib/module/handlers/gestures/GestureDetector/Wrap.web.js +36 -0
  570. package/lib/module/handlers/gestures/GestureDetector/Wrap.web.js.map +1 -0
  571. package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js +62 -0
  572. package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js.map +1 -0
  573. package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js +15 -0
  574. package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js.map +1 -0
  575. package/lib/module/handlers/gestures/GestureDetector/index.js +117 -0
  576. package/lib/module/handlers/gestures/GestureDetector/index.js.map +1 -0
  577. package/lib/module/handlers/gestures/GestureDetector/needsToReattach.js +18 -0
  578. package/lib/module/handlers/gestures/GestureDetector/needsToReattach.js.map +1 -0
  579. package/lib/module/handlers/gestures/GestureDetector/types.js +4 -0
  580. package/lib/module/handlers/gestures/GestureDetector/types.js.map +1 -0
  581. package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js +61 -0
  582. package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js.map +1 -0
  583. package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js +139 -0
  584. package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +1 -0
  585. package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js +43 -0
  586. package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +1 -0
  587. package/lib/module/handlers/gestures/GestureDetector/useMountReactions.js +37 -0
  588. package/lib/module/handlers/gestures/GestureDetector/useMountReactions.js.map +1 -0
  589. package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js +40 -0
  590. package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -0
  591. package/lib/module/handlers/gestures/GestureDetector/utils.js +134 -0
  592. package/lib/module/handlers/gestures/GestureDetector/utils.js.map +1 -0
  593. package/lib/module/handlers/gestures/eventReceiver.js +17 -23
  594. package/lib/module/handlers/gestures/eventReceiver.js.map +1 -1
  595. package/lib/module/handlers/gestures/flingGesture.js +16 -4
  596. package/lib/module/handlers/gestures/flingGesture.js.map +1 -1
  597. package/lib/module/handlers/gestures/forceTouchGesture.js +33 -4
  598. package/lib/module/handlers/gestures/forceTouchGesture.js.map +1 -1
  599. package/lib/module/handlers/gestures/gesture.js +163 -19
  600. package/lib/module/handlers/gestures/gesture.js.map +1 -1
  601. package/lib/module/handlers/gestures/gestureComposition.js +11 -9
  602. package/lib/module/handlers/gestures/gestureComposition.js.map +1 -1
  603. package/lib/module/handlers/gestures/gestureObjects.js +62 -0
  604. package/lib/module/handlers/gestures/gestureObjects.js.map +1 -1
  605. package/lib/module/handlers/gestures/gestureStateManager.js +52 -40
  606. package/lib/module/handlers/gestures/gestureStateManager.js.map +1 -1
  607. package/lib/module/handlers/gestures/gestureStateManager.web.js +4 -1
  608. package/lib/module/handlers/gestures/gestureStateManager.web.js.map +1 -1
  609. package/lib/module/handlers/gestures/hoverGesture.js +4 -5
  610. package/lib/module/handlers/gestures/hoverGesture.js.map +1 -1
  611. package/lib/module/handlers/gestures/longPressGesture.js +24 -4
  612. package/lib/module/handlers/gestures/longPressGesture.js.map +1 -1
  613. package/lib/module/handlers/gestures/manualGesture.js +2 -0
  614. package/lib/module/handlers/gestures/manualGesture.js.map +1 -1
  615. package/lib/module/handlers/gestures/nativeGesture.js +13 -4
  616. package/lib/module/handlers/gestures/nativeGesture.js.map +1 -1
  617. package/lib/module/handlers/gestures/panGesture.js +79 -4
  618. package/lib/module/handlers/gestures/panGesture.js.map +1 -1
  619. package/lib/module/handlers/gestures/pinchGesture.js +2 -0
  620. package/lib/module/handlers/gestures/pinchGesture.js.map +1 -1
  621. package/lib/module/handlers/gestures/reanimatedWrapper.js +3 -2
  622. package/lib/module/handlers/gestures/reanimatedWrapper.js.map +1 -1
  623. package/lib/module/handlers/gestures/rotationGesture.js +2 -0
  624. package/lib/module/handlers/gestures/rotationGesture.js.map +1 -1
  625. package/lib/module/handlers/gestures/tapGesture.js +45 -4
  626. package/lib/module/handlers/gestures/tapGesture.js.map +1 -1
  627. package/lib/module/handlers/getNextHandlerTag.js +7 -0
  628. package/lib/module/handlers/getNextHandlerTag.js.map +1 -0
  629. package/lib/module/handlers/handlersRegistry.js +9 -9
  630. package/lib/module/handlers/handlersRegistry.js.map +1 -1
  631. package/lib/module/handlers/utils.js +61 -0
  632. package/lib/module/handlers/utils.js.map +1 -0
  633. package/lib/module/index.js +6 -0
  634. package/lib/module/index.js.map +1 -1
  635. package/lib/module/init.js +3 -1
  636. package/lib/module/init.js.map +1 -1
  637. package/lib/module/jestUtils/index.js +2 -0
  638. package/lib/module/jestUtils/index.js.map +1 -1
  639. package/lib/module/jestUtils/jestUtils.js +20 -14
  640. package/lib/module/jestUtils/jestUtils.js.map +1 -1
  641. package/lib/module/mocks/Pressable.js +4 -0
  642. package/lib/module/mocks/Pressable.js.map +1 -0
  643. package/lib/module/mocks/mocks.js +64 -0
  644. package/lib/module/mocks/mocks.js.map +1 -0
  645. package/lib/module/mocks.js +2 -0
  646. package/lib/module/mocks.js.map +1 -1
  647. package/lib/module/mountRegistry.js +32 -0
  648. package/lib/module/mountRegistry.js.map +1 -0
  649. package/lib/module/specs/NativeRNGestureHandlerModule.js +5 -0
  650. package/lib/module/specs/NativeRNGestureHandlerModule.js.map +1 -0
  651. package/lib/module/specs/RNGestureHandlerButtonNativeComponent.kepler.js +2 -0
  652. package/lib/module/specs/RNGestureHandlerButtonNativeComponent.kepler.js.map +1 -1
  653. package/lib/module/specs/RNGestureHandlerButtonNativeComponent.ts +24 -0
  654. package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.kepler.js +11 -0
  655. package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.kepler.js.map +1 -0
  656. package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.ts +7 -0
  657. package/lib/module/typeUtils.js +1 -1
  658. package/lib/module/typeUtils.js.map +1 -1
  659. package/lib/module/utils.js +45 -14
  660. package/lib/module/utils.js.map +1 -1
  661. package/lib/module/web/Gestures.js +42 -0
  662. package/lib/module/web/Gestures.js.map +1 -0
  663. package/lib/module/web/constants.js +3 -6
  664. package/lib/module/web/constants.js.map +1 -1
  665. package/lib/module/web/detectors/RotationGestureDetector.js +37 -40
  666. package/lib/module/web/detectors/RotationGestureDetector.js.map +1 -1
  667. package/lib/module/web/detectors/ScaleGestureDetector.js +32 -46
  668. package/lib/module/web/detectors/ScaleGestureDetector.js.map +1 -1
  669. package/lib/module/web/handlers/FlingGestureHandler.js +52 -34
  670. package/lib/module/web/handlers/FlingGestureHandler.js.map +1 -1
  671. package/lib/module/web/handlers/GestureHandler.js +218 -197
  672. package/lib/module/web/handlers/GestureHandler.js.map +1 -1
  673. package/lib/module/web/handlers/HoverGestureHandler.js +14 -15
  674. package/lib/module/web/handlers/HoverGestureHandler.js.map +1 -1
  675. package/lib/module/web/handlers/IGestureHandler.js +2 -0
  676. package/lib/module/web/handlers/IGestureHandler.js.map +1 -0
  677. package/lib/module/web/handlers/LongPressGestureHandler.js +59 -30
  678. package/lib/module/web/handlers/LongPressGestureHandler.js.map +1 -1
  679. package/lib/module/web/handlers/ManualGestureHandler.js +3 -12
  680. package/lib/module/web/handlers/ManualGestureHandler.js.map +1 -1
  681. package/lib/module/web/handlers/NativeViewGestureHandler.js +44 -41
  682. package/lib/module/web/handlers/NativeViewGestureHandler.js.map +1 -1
  683. package/lib/module/web/handlers/PanGestureHandler.js +119 -65
  684. package/lib/module/web/handlers/PanGestureHandler.js.map +1 -1
  685. package/lib/module/web/handlers/PinchGestureHandler.js +38 -50
  686. package/lib/module/web/handlers/PinchGestureHandler.js.map +1 -1
  687. package/lib/module/web/handlers/RotationGestureHandler.js +34 -49
  688. package/lib/module/web/handlers/RotationGestureHandler.js.map +1 -1
  689. package/lib/module/web/handlers/TapGestureHandler.js +41 -43
  690. package/lib/module/web/handlers/TapGestureHandler.js.map +1 -1
  691. package/lib/module/web/interfaces.js +7 -17
  692. package/lib/module/web/interfaces.js.map +1 -1
  693. package/lib/module/web/tools/CircularBuffer.js +14 -19
  694. package/lib/module/web/tools/CircularBuffer.js.map +1 -1
  695. package/lib/module/web/tools/EventManager.js +9 -8
  696. package/lib/module/web/tools/EventManager.js.map +1 -1
  697. package/lib/module/web/tools/GestureHandlerDelegate.js +2 -0
  698. package/lib/module/web/tools/GestureHandlerDelegate.js.map +1 -1
  699. package/lib/module/web/tools/GestureHandlerOrchestrator.js +123 -159
  700. package/lib/module/web/tools/GestureHandlerOrchestrator.js.map +1 -1
  701. package/lib/module/web/tools/GestureHandlerWebDelegate.js +103 -29
  702. package/lib/module/web/tools/GestureHandlerWebDelegate.js.map +1 -1
  703. package/lib/module/web/tools/InteractionManager.js +46 -47
  704. package/lib/module/web/tools/InteractionManager.js.map +1 -1
  705. package/lib/module/web/tools/KeyboardEventManager.js +102 -0
  706. package/lib/module/web/tools/KeyboardEventManager.js.map +1 -0
  707. package/lib/module/web/tools/LeastSquareSolver.js +24 -30
  708. package/lib/module/web/tools/LeastSquareSolver.js.map +1 -1
  709. package/lib/module/web/tools/NodeManager.js +7 -7
  710. package/lib/module/web/tools/NodeManager.js.map +1 -1
  711. package/lib/module/web/tools/PointerEventManager.js +151 -131
  712. package/lib/module/web/tools/PointerEventManager.js.map +1 -1
  713. package/lib/module/web/tools/PointerTracker.js +99 -107
  714. package/lib/module/web/tools/PointerTracker.js.map +1 -1
  715. package/lib/module/web/tools/Vector.js +32 -0
  716. package/lib/module/web/tools/Vector.js.map +1 -0
  717. package/lib/module/web/tools/VelocityTracker.js +13 -15
  718. package/lib/module/web/tools/VelocityTracker.js.map +1 -1
  719. package/lib/module/web/tools/WheelEventManager.js +49 -0
  720. package/lib/module/web/tools/WheelEventManager.js.map +1 -0
  721. package/lib/module/web/utils.js +215 -0
  722. package/lib/module/web/utils.js.map +1 -1
  723. package/lib/module/web_hammer/DiscreteGestureHandler.js +3 -1
  724. package/lib/module/web_hammer/DiscreteGestureHandler.js.map +1 -1
  725. package/lib/module/web_hammer/DraggingGestureHandler.js +3 -1
  726. package/lib/module/web_hammer/DraggingGestureHandler.js.map +1 -1
  727. package/lib/module/web_hammer/Errors.js +2 -0
  728. package/lib/module/web_hammer/Errors.js.map +1 -1
  729. package/lib/module/web_hammer/FlingGestureHandler.js +3 -1
  730. package/lib/module/web_hammer/FlingGestureHandler.js.map +1 -1
  731. package/lib/module/web_hammer/GestureHandler.js +121 -128
  732. package/lib/module/web_hammer/GestureHandler.js.map +1 -1
  733. package/lib/module/web_hammer/IndiscreteGestureHandler.js +2 -0
  734. package/lib/module/web_hammer/IndiscreteGestureHandler.js.map +1 -1
  735. package/lib/module/web_hammer/LongPressGestureHandler.js +3 -1
  736. package/lib/module/web_hammer/LongPressGestureHandler.js.map +1 -1
  737. package/lib/module/web_hammer/NativeViewGestureHandler.js +2 -0
  738. package/lib/module/web_hammer/NativeViewGestureHandler.js.map +1 -1
  739. package/lib/module/web_hammer/NodeManager.js +3 -1
  740. package/lib/module/web_hammer/NodeManager.js.map +1 -1
  741. package/lib/module/web_hammer/PanGestureHandler.js +2 -0
  742. package/lib/module/web_hammer/PanGestureHandler.js.map +1 -1
  743. package/lib/module/web_hammer/PinchGestureHandler.js +2 -0
  744. package/lib/module/web_hammer/PinchGestureHandler.js.map +1 -1
  745. package/lib/module/web_hammer/PressGestureHandler.js +4 -9
  746. package/lib/module/web_hammer/PressGestureHandler.js.map +1 -1
  747. package/lib/module/web_hammer/RotationGestureHandler.js +3 -2
  748. package/lib/module/web_hammer/RotationGestureHandler.js.map +1 -1
  749. package/lib/module/web_hammer/TapGestureHandler.js +21 -27
  750. package/lib/module/web_hammer/TapGestureHandler.js.map +1 -1
  751. package/lib/module/web_hammer/constants.js +2 -0
  752. package/lib/module/web_hammer/constants.js.map +1 -1
  753. package/lib/module/web_hammer/utils.js +2 -0
  754. package/lib/module/web_hammer/utils.js.map +1 -1
  755. package/lib/typescript/ActionType.d.ts +2 -1
  756. package/lib/typescript/ActionType.d.ts.map +1 -0
  757. package/lib/typescript/Directions.d.ts +9 -1
  758. package/lib/typescript/Directions.d.ts.map +1 -0
  759. package/lib/typescript/EnableNewWebImplementation.d.ts +7 -0
  760. package/lib/typescript/EnableNewWebImplementation.d.ts.map +1 -0
  761. package/lib/typescript/GestureHandlerRootViewContext.d.ts +1 -0
  762. package/lib/typescript/GestureHandlerRootViewContext.d.ts.map +1 -0
  763. package/lib/typescript/PlatformConstants.d.ts +1 -0
  764. package/lib/typescript/PlatformConstants.d.ts.map +1 -0
  765. package/lib/typescript/PlatformConstants.kepler.d.ts +5 -0
  766. package/lib/typescript/PlatformConstants.kepler.d.ts.map +1 -0
  767. package/lib/typescript/PlatformConstants.web.d.ts +1 -0
  768. package/lib/typescript/PlatformConstants.web.d.ts.map +1 -0
  769. package/lib/typescript/PointerType.d.ts +8 -0
  770. package/lib/typescript/PointerType.d.ts.map +1 -0
  771. package/lib/typescript/RNGestureHandlerModule.d.ts +3 -13
  772. package/lib/typescript/RNGestureHandlerModule.d.ts.map +1 -0
  773. package/lib/typescript/RNGestureHandlerModule.kepler.d.ts +1 -0
  774. package/lib/typescript/RNGestureHandlerModule.kepler.d.ts.map +1 -0
  775. package/lib/typescript/RNGestureHandlerModule.web.d.ts +5 -39
  776. package/lib/typescript/RNGestureHandlerModule.web.d.ts.map +1 -0
  777. package/lib/typescript/RNGestureHandlerModule.windows.d.ts +6 -21
  778. package/lib/typescript/RNGestureHandlerModule.windows.d.ts.map +1 -0
  779. package/lib/typescript/RNRenderer.d.ts +1 -0
  780. package/lib/typescript/RNRenderer.d.ts.map +1 -0
  781. package/lib/typescript/RNRenderer.web.d.ts +1 -0
  782. package/lib/typescript/RNRenderer.web.d.ts.map +1 -0
  783. package/lib/typescript/State.d.ts +2 -1
  784. package/lib/typescript/State.d.ts.map +1 -0
  785. package/lib/typescript/TouchEventType.d.ts +2 -1
  786. package/lib/typescript/TouchEventType.d.ts.map +1 -0
  787. package/lib/typescript/components/DrawerLayout.d.ts +39 -1
  788. package/lib/typescript/components/DrawerLayout.d.ts.map +1 -0
  789. package/lib/typescript/components/GestureButtons.d.ts +6 -119
  790. package/lib/typescript/components/GestureButtons.d.ts.map +1 -0
  791. package/lib/typescript/components/GestureButtonsProps.d.ts +124 -0
  792. package/lib/typescript/components/GestureButtonsProps.d.ts.map +1 -0
  793. package/lib/typescript/components/GestureComponents.d.ts +4 -3
  794. package/lib/typescript/components/GestureComponents.d.ts.map +1 -0
  795. package/lib/typescript/components/GestureComponents.web.d.ts +1 -0
  796. package/lib/typescript/components/GestureComponents.web.d.ts.map +1 -0
  797. package/lib/typescript/components/GestureHandlerButton.d.ts +2 -1
  798. package/lib/typescript/components/GestureHandlerButton.d.ts.map +1 -0
  799. package/lib/typescript/components/GestureHandlerButton.web.d.ts +1 -0
  800. package/lib/typescript/components/GestureHandlerButton.web.d.ts.map +1 -0
  801. package/lib/typescript/components/GestureHandlerRootView.android.d.ts +2 -1
  802. package/lib/typescript/components/GestureHandlerRootView.android.d.ts.map +1 -0
  803. package/lib/typescript/components/GestureHandlerRootView.d.ts +2 -1
  804. package/lib/typescript/components/GestureHandlerRootView.d.ts.map +1 -0
  805. package/lib/typescript/components/GestureHandlerRootView.kepler.d.ts +1 -0
  806. package/lib/typescript/components/GestureHandlerRootView.kepler.d.ts.map +1 -0
  807. package/lib/typescript/components/GestureHandlerRootView.web.d.ts +2 -1
  808. package/lib/typescript/components/GestureHandlerRootView.web.d.ts.map +1 -0
  809. package/lib/typescript/components/Pressable/Pressable.d.ts +5 -0
  810. package/lib/typescript/components/Pressable/Pressable.d.ts.map +1 -0
  811. package/lib/typescript/components/Pressable/PressableProps.d.ts +137 -0
  812. package/lib/typescript/components/Pressable/PressableProps.d.ts.map +1 -0
  813. package/lib/typescript/components/Pressable/StateMachine.d.ts +16 -0
  814. package/lib/typescript/components/Pressable/StateMachine.d.ts.map +1 -0
  815. package/lib/typescript/components/Pressable/index.d.ts +3 -0
  816. package/lib/typescript/components/Pressable/index.d.ts.map +1 -0
  817. package/lib/typescript/components/Pressable/stateDefinitions.d.ts +11 -0
  818. package/lib/typescript/components/Pressable/stateDefinitions.d.ts.map +1 -0
  819. package/lib/typescript/components/Pressable/utils.d.ts +11 -0
  820. package/lib/typescript/components/Pressable/utils.d.ts.map +1 -0
  821. package/lib/typescript/components/ReanimatedDrawerLayout.d.ts +168 -0
  822. package/lib/typescript/components/ReanimatedDrawerLayout.d.ts.map +1 -0
  823. package/lib/typescript/components/ReanimatedSwipeable/ReanimatedSwipeable.d.ts +6 -0
  824. package/lib/typescript/components/ReanimatedSwipeable/ReanimatedSwipeable.d.ts.map +1 -0
  825. package/lib/typescript/components/ReanimatedSwipeable/ReanimatedSwipeableProps.d.ts +150 -0
  826. package/lib/typescript/components/ReanimatedSwipeable/ReanimatedSwipeableProps.d.ts.map +1 -0
  827. package/lib/typescript/components/ReanimatedSwipeable/index.d.ts +3 -0
  828. package/lib/typescript/components/ReanimatedSwipeable/index.d.ts.map +1 -0
  829. package/lib/typescript/components/Swipeable.d.ts +14 -0
  830. package/lib/typescript/components/Swipeable.d.ts.map +1 -0
  831. package/lib/typescript/components/Text.d.ts +5 -0
  832. package/lib/typescript/components/Text.d.ts.map +1 -0
  833. package/lib/typescript/components/gestureHandlerRootHOC.d.ts +6 -1
  834. package/lib/typescript/components/gestureHandlerRootHOC.d.ts.map +1 -0
  835. package/lib/typescript/components/touchables/ExtraButtonProps.d.ts +8 -0
  836. package/lib/typescript/components/touchables/ExtraButtonProps.d.ts.map +1 -0
  837. package/lib/typescript/components/touchables/GenericTouchable.d.ts +4 -16
  838. package/lib/typescript/components/touchables/GenericTouchable.d.ts.map +1 -0
  839. package/lib/typescript/components/touchables/GenericTouchableProps.d.ts +17 -0
  840. package/lib/typescript/components/touchables/GenericTouchableProps.d.ts.map +1 -0
  841. package/lib/typescript/components/touchables/TouchableHighlight.d.ts +7 -1
  842. package/lib/typescript/components/touchables/TouchableHighlight.d.ts.map +1 -0
  843. package/lib/typescript/components/touchables/TouchableNativeFeedback.android.d.ts +6 -10
  844. package/lib/typescript/components/touchables/TouchableNativeFeedback.android.d.ts.map +1 -0
  845. package/lib/typescript/components/touchables/TouchableNativeFeedback.d.ts +6 -1
  846. package/lib/typescript/components/touchables/TouchableNativeFeedback.d.ts.map +1 -0
  847. package/lib/typescript/components/touchables/TouchableNativeFeedbackProps.d.ts +9 -0
  848. package/lib/typescript/components/touchables/TouchableNativeFeedbackProps.d.ts.map +1 -0
  849. package/lib/typescript/components/touchables/TouchableOpacity.d.ts +7 -1
  850. package/lib/typescript/components/touchables/TouchableOpacity.d.ts.map +1 -0
  851. package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts +11 -3
  852. package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts.map +1 -0
  853. package/lib/typescript/components/touchables/index.d.ts +1 -0
  854. package/lib/typescript/components/touchables/index.d.ts.map +1 -0
  855. package/lib/typescript/components/utils.d.ts +5 -0
  856. package/lib/typescript/components/utils.d.ts.map +1 -0
  857. package/lib/typescript/findNodeHandle.d.ts +3 -0
  858. package/lib/typescript/findNodeHandle.d.ts.map +1 -0
  859. package/lib/typescript/findNodeHandle.web.d.ts +3 -0
  860. package/lib/typescript/findNodeHandle.web.d.ts.map +1 -0
  861. package/lib/typescript/getShadowNodeFromRef.d.ts +2 -1
  862. package/lib/typescript/getShadowNodeFromRef.d.ts.map +1 -0
  863. package/lib/typescript/getShadowNodeFromRef.web.d.ts +1 -0
  864. package/lib/typescript/getShadowNodeFromRef.web.d.ts.map +1 -0
  865. package/lib/typescript/ghQueueMicrotask.d.ts +2 -0
  866. package/lib/typescript/ghQueueMicrotask.d.ts.map +1 -0
  867. package/lib/typescript/handlers/FlingGestureHandler.d.ts +11 -6
  868. package/lib/typescript/handlers/FlingGestureHandler.d.ts.map +1 -0
  869. package/lib/typescript/handlers/ForceTouchGestureHandler.d.ts +11 -10
  870. package/lib/typescript/handlers/ForceTouchGestureHandler.d.ts.map +1 -0
  871. package/lib/typescript/handlers/GestureHandlerEventPayload.d.ts +198 -0
  872. package/lib/typescript/handlers/GestureHandlerEventPayload.d.ts.map +1 -0
  873. package/lib/typescript/handlers/LongPressGestureHandler.d.ts +16 -36
  874. package/lib/typescript/handlers/LongPressGestureHandler.d.ts.map +1 -0
  875. package/lib/typescript/handlers/NativeViewGestureHandler.d.ts +12 -7
  876. package/lib/typescript/handlers/NativeViewGestureHandler.d.ts.map +1 -0
  877. package/lib/typescript/handlers/PanGestureHandler.d.ts +16 -55
  878. package/lib/typescript/handlers/PanGestureHandler.d.ts.map +1 -0
  879. package/lib/typescript/handlers/PinchGestureHandler.d.ts +11 -23
  880. package/lib/typescript/handlers/PinchGestureHandler.d.ts.map +1 -0
  881. package/lib/typescript/handlers/PressabilityDebugView.d.ts +1 -0
  882. package/lib/typescript/handlers/PressabilityDebugView.d.ts.map +1 -0
  883. package/lib/typescript/handlers/PressabilityDebugView.web.d.ts +1 -0
  884. package/lib/typescript/handlers/PressabilityDebugView.web.d.ts.map +1 -0
  885. package/lib/typescript/handlers/RotationGestureHandler.d.ts +11 -23
  886. package/lib/typescript/handlers/RotationGestureHandler.d.ts.map +1 -0
  887. package/lib/typescript/handlers/TapGestureHandler.d.ts +11 -6
  888. package/lib/typescript/handlers/TapGestureHandler.d.ts.map +1 -0
  889. package/lib/typescript/handlers/createHandler.d.ts +1 -0
  890. package/lib/typescript/handlers/createHandler.d.ts.map +1 -0
  891. package/lib/typescript/handlers/createNativeWrapper.d.ts +1 -0
  892. package/lib/typescript/handlers/createNativeWrapper.d.ts.map +1 -0
  893. package/lib/typescript/handlers/customDirectEventTypes.d.ts +2 -0
  894. package/lib/typescript/handlers/customDirectEventTypes.d.ts.map +1 -0
  895. package/lib/typescript/handlers/customDirectEventTypes.web.d.ts +3 -0
  896. package/lib/typescript/handlers/customDirectEventTypes.web.d.ts.map +1 -0
  897. package/lib/typescript/handlers/gestureHandlerCommon.d.ts +20 -8
  898. package/lib/typescript/handlers/gestureHandlerCommon.d.ts.map +1 -0
  899. package/lib/typescript/handlers/gestureHandlerTypesCompat.d.ts +20 -9
  900. package/lib/typescript/handlers/gestureHandlerTypesCompat.d.ts.map +1 -0
  901. package/lib/typescript/handlers/gestures/GestureDetector/Wrap.d.ts +14 -0
  902. package/lib/typescript/handlers/gestures/GestureDetector/Wrap.d.ts.map +1 -0
  903. package/lib/typescript/handlers/gestures/GestureDetector/Wrap.web.d.ts +8 -0
  904. package/lib/typescript/handlers/gestures/GestureDetector/Wrap.web.d.ts.map +1 -0
  905. package/lib/typescript/handlers/gestures/GestureDetector/attachHandlers.d.ts +14 -0
  906. package/lib/typescript/handlers/gestures/GestureDetector/attachHandlers.d.ts.map +1 -0
  907. package/lib/typescript/handlers/gestures/GestureDetector/dropHandlers.d.ts +3 -0
  908. package/lib/typescript/handlers/gestures/GestureDetector/dropHandlers.d.ts.map +1 -0
  909. package/lib/typescript/handlers/gestures/GestureDetector/index.d.ts +50 -0
  910. package/lib/typescript/handlers/gestures/GestureDetector/index.d.ts.map +1 -0
  911. package/lib/typescript/handlers/gestures/GestureDetector/needsToReattach.d.ts +4 -0
  912. package/lib/typescript/handlers/gestures/GestureDetector/needsToReattach.d.ts.map +1 -0
  913. package/lib/typescript/handlers/gestures/GestureDetector/types.d.ts +21 -0
  914. package/lib/typescript/handlers/gestures/GestureDetector/types.d.ts.map +1 -0
  915. package/lib/typescript/handlers/gestures/GestureDetector/updateHandlers.d.ts +5 -0
  916. package/lib/typescript/handlers/gestures/GestureDetector/updateHandlers.d.ts.map +1 -0
  917. package/lib/typescript/handlers/gestures/GestureDetector/useAnimatedGesture.d.ts +3 -0
  918. package/lib/typescript/handlers/gestures/GestureDetector/useAnimatedGesture.d.ts.map +1 -0
  919. package/lib/typescript/handlers/gestures/GestureDetector/useDetectorUpdater.d.ts +6 -0
  920. package/lib/typescript/handlers/gestures/GestureDetector/useDetectorUpdater.d.ts.map +1 -0
  921. package/lib/typescript/handlers/gestures/GestureDetector/useMountReactions.d.ts +3 -0
  922. package/lib/typescript/handlers/gestures/GestureDetector/useMountReactions.d.ts.map +1 -0
  923. package/lib/typescript/handlers/gestures/GestureDetector/useViewRefHandler.d.ts +4 -0
  924. package/lib/typescript/handlers/gestures/GestureDetector/useViewRefHandler.d.ts.map +1 -0
  925. package/lib/typescript/handlers/gestures/GestureDetector/utils.d.ts +13 -0
  926. package/lib/typescript/handlers/gestures/GestureDetector/utils.d.ts.map +1 -0
  927. package/lib/typescript/handlers/gestures/eventReceiver.d.ts +1 -0
  928. package/lib/typescript/handlers/gestures/eventReceiver.d.ts.map +1 -0
  929. package/lib/typescript/handlers/gestures/flingGesture.d.ts +14 -1
  930. package/lib/typescript/handlers/gestures/flingGesture.d.ts.map +1 -0
  931. package/lib/typescript/handlers/gestures/forceTouchGesture.d.ts +26 -1
  932. package/lib/typescript/handlers/gestures/forceTouchGesture.d.ts.map +1 -0
  933. package/lib/typescript/handlers/gestures/gesture.d.ts +121 -11
  934. package/lib/typescript/handlers/gestures/gesture.d.ts.map +1 -0
  935. package/lib/typescript/handlers/gestures/gestureComposition.d.ts +1 -0
  936. package/lib/typescript/handlers/gestures/gestureComposition.d.ts.map +1 -0
  937. package/lib/typescript/handlers/gestures/gestureObjects.d.ts +60 -0
  938. package/lib/typescript/handlers/gestures/gestureObjects.d.ts.map +1 -0
  939. package/lib/typescript/handlers/gestures/gestureStateManager.d.ts +6 -1
  940. package/lib/typescript/handlers/gestures/gestureStateManager.d.ts.map +1 -0
  941. package/lib/typescript/handlers/gestures/gestureStateManager.web.d.ts +1 -0
  942. package/lib/typescript/handlers/gestures/gestureStateManager.web.d.ts.map +1 -0
  943. package/lib/typescript/handlers/gestures/hoverGesture.d.ts +3 -7
  944. package/lib/typescript/handlers/gestures/hoverGesture.d.ts.map +1 -0
  945. package/lib/typescript/handlers/gestures/longPressGesture.d.ts +18 -1
  946. package/lib/typescript/handlers/gestures/longPressGesture.d.ts.map +1 -0
  947. package/lib/typescript/handlers/gestures/manualGesture.d.ts +1 -0
  948. package/lib/typescript/handlers/gestures/manualGesture.d.ts.map +1 -0
  949. package/lib/typescript/handlers/gestures/nativeGesture.d.ts +11 -1
  950. package/lib/typescript/handlers/gestures/nativeGesture.d.ts.map +1 -0
  951. package/lib/typescript/handlers/gestures/panGesture.d.ts +70 -5
  952. package/lib/typescript/handlers/gestures/panGesture.d.ts.map +1 -0
  953. package/lib/typescript/handlers/gestures/pinchGesture.d.ts +2 -1
  954. package/lib/typescript/handlers/gestures/pinchGesture.d.ts.map +1 -0
  955. package/lib/typescript/handlers/gestures/reanimatedWrapper.d.ts +2 -1
  956. package/lib/typescript/handlers/gestures/reanimatedWrapper.d.ts.map +1 -0
  957. package/lib/typescript/handlers/gestures/rotationGesture.d.ts +2 -1
  958. package/lib/typescript/handlers/gestures/rotationGesture.d.ts.map +1 -0
  959. package/lib/typescript/handlers/gestures/tapGesture.d.ts +38 -1
  960. package/lib/typescript/handlers/gestures/tapGesture.d.ts.map +1 -0
  961. package/lib/typescript/handlers/getNextHandlerTag.d.ts +2 -0
  962. package/lib/typescript/handlers/getNextHandlerTag.d.ts.map +1 -0
  963. package/lib/typescript/handlers/handlersRegistry.d.ts +3 -2
  964. package/lib/typescript/handlers/handlersRegistry.d.ts.map +1 -0
  965. package/lib/typescript/handlers/utils.d.ts +8 -0
  966. package/lib/typescript/handlers/utils.d.ts.map +1 -0
  967. package/lib/typescript/index.d.ts +16 -9
  968. package/lib/typescript/index.d.ts.map +1 -0
  969. package/lib/typescript/init.d.ts +1 -0
  970. package/lib/typescript/init.d.ts.map +1 -0
  971. package/lib/typescript/jestUtils/index.d.ts +1 -0
  972. package/lib/typescript/jestUtils/index.d.ts.map +1 -0
  973. package/lib/typescript/jestUtils/jestUtils.d.ts +10 -8
  974. package/lib/typescript/jestUtils/jestUtils.d.ts.map +1 -0
  975. package/lib/typescript/mocks/Pressable.d.ts +2 -0
  976. package/lib/typescript/mocks/Pressable.d.ts.map +1 -0
  977. package/lib/typescript/mocks/mocks.d.ts +47 -0
  978. package/lib/typescript/mocks/mocks.d.ts.map +1 -0
  979. package/lib/typescript/mocks.d.ts +4 -3
  980. package/lib/typescript/mocks.d.ts.map +1 -0
  981. package/lib/typescript/mountRegistry.d.ts +17 -0
  982. package/lib/typescript/mountRegistry.d.ts.map +1 -0
  983. package/lib/typescript/specs/NativeRNGestureHandlerModule.d.ts +15 -0
  984. package/lib/typescript/specs/NativeRNGestureHandlerModule.d.ts.map +1 -0
  985. package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.d.ts +5 -3
  986. package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.d.ts.map +1 -0
  987. package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.kepler.d.ts +2 -0
  988. package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.kepler.d.ts.map +1 -0
  989. package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts +1 -2
  990. package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts.map +1 -0
  991. package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.kepler.d.ts +7 -0
  992. package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.kepler.d.ts.map +1 -0
  993. package/lib/typescript/typeUtils.d.ts +1 -0
  994. package/lib/typescript/typeUtils.d.ts.map +1 -0
  995. package/lib/typescript/utils.d.ts +14 -5
  996. package/lib/typescript/utils.d.ts.map +1 -0
  997. package/lib/typescript/web/Gestures.d.ts +37 -0
  998. package/lib/typescript/web/Gestures.d.ts.map +1 -0
  999. package/lib/typescript/web/constants.d.ts +2 -6
  1000. package/lib/typescript/web/constants.d.ts.map +1 -0
  1001. package/lib/typescript/web/detectors/RotationGestureDetector.d.ts +8 -7
  1002. package/lib/typescript/web/detectors/RotationGestureDetector.d.ts.map +1 -0
  1003. package/lib/typescript/web/detectors/ScaleGestureDetector.d.ts +9 -8
  1004. package/lib/typescript/web/detectors/ScaleGestureDetector.d.ts.map +1 -0
  1005. package/lib/typescript/web/handlers/FlingGestureHandler.d.ts +4 -4
  1006. package/lib/typescript/web/handlers/FlingGestureHandler.d.ts.map +1 -0
  1007. package/lib/typescript/web/handlers/GestureHandler.d.ts +50 -37
  1008. package/lib/typescript/web/handlers/GestureHandler.d.ts.map +1 -0
  1009. package/lib/typescript/web/handlers/HoverGestureHandler.d.ts +4 -3
  1010. package/lib/typescript/web/handlers/HoverGestureHandler.d.ts.map +1 -0
  1011. package/lib/typescript/web/handlers/IGestureHandler.d.ts +38 -0
  1012. package/lib/typescript/web/handlers/IGestureHandler.d.ts.map +1 -0
  1013. package/lib/typescript/web/handlers/LongPressGestureHandler.d.ts +5 -0
  1014. package/lib/typescript/web/handlers/LongPressGestureHandler.d.ts.map +1 -0
  1015. package/lib/typescript/web/handlers/ManualGestureHandler.d.ts +2 -3
  1016. package/lib/typescript/web/handlers/ManualGestureHandler.d.ts.map +1 -0
  1017. package/lib/typescript/web/handlers/NativeViewGestureHandler.d.ts +3 -1
  1018. package/lib/typescript/web/handlers/NativeViewGestureHandler.d.ts.map +1 -0
  1019. package/lib/typescript/web/handlers/PanGestureHandler.d.ts +11 -2
  1020. package/lib/typescript/web/handlers/PanGestureHandler.d.ts.map +1 -0
  1021. package/lib/typescript/web/handlers/PinchGestureHandler.d.ts +2 -2
  1022. package/lib/typescript/web/handlers/PinchGestureHandler.d.ts.map +1 -0
  1023. package/lib/typescript/web/handlers/RotationGestureHandler.d.ts +2 -3
  1024. package/lib/typescript/web/handlers/RotationGestureHandler.d.ts.map +1 -0
  1025. package/lib/typescript/web/handlers/TapGestureHandler.d.ts +2 -1
  1026. package/lib/typescript/web/handlers/TapGestureHandler.d.ts.map +1 -0
  1027. package/lib/typescript/web/interfaces.d.ts +40 -22
  1028. package/lib/typescript/web/interfaces.d.ts.map +1 -0
  1029. package/lib/typescript/web/tools/CircularBuffer.d.ts +4 -3
  1030. package/lib/typescript/web/tools/CircularBuffer.d.ts.map +1 -0
  1031. package/lib/typescript/web/tools/EventManager.d.ts +20 -14
  1032. package/lib/typescript/web/tools/EventManager.d.ts.map +1 -0
  1033. package/lib/typescript/web/tools/GestureHandlerDelegate.d.ts +7 -4
  1034. package/lib/typescript/web/tools/GestureHandlerDelegate.d.ts.map +1 -0
  1035. package/lib/typescript/web/tools/GestureHandlerOrchestrator.d.ts +10 -8
  1036. package/lib/typescript/web/tools/GestureHandlerOrchestrator.d.ts.map +1 -0
  1037. package/lib/typescript/web/tools/GestureHandlerWebDelegate.d.ts +20 -5
  1038. package/lib/typescript/web/tools/GestureHandlerWebDelegate.d.ts.map +1 -0
  1039. package/lib/typescript/web/tools/InteractionManager.d.ts +10 -8
  1040. package/lib/typescript/web/tools/InteractionManager.d.ts.map +1 -0
  1041. package/lib/typescript/web/tools/KeyboardEventManager.d.ts +17 -0
  1042. package/lib/typescript/web/tools/KeyboardEventManager.d.ts.map +1 -0
  1043. package/lib/typescript/web/tools/LeastSquareSolver.d.ts +1 -0
  1044. package/lib/typescript/web/tools/LeastSquareSolver.d.ts.map +1 -0
  1045. package/lib/typescript/web/tools/NodeManager.d.ts +6 -4
  1046. package/lib/typescript/web/tools/NodeManager.d.ts.map +1 -0
  1047. package/lib/typescript/web/tools/PointerEventManager.d.ts +14 -2
  1048. package/lib/typescript/web/tools/PointerEventManager.d.ts.map +1 -0
  1049. package/lib/typescript/web/tools/PointerTracker.d.ts +33 -35
  1050. package/lib/typescript/web/tools/PointerTracker.d.ts.map +1 -0
  1051. package/lib/typescript/web/tools/Vector.d.ts +16 -0
  1052. package/lib/typescript/web/tools/Vector.d.ts.map +1 -0
  1053. package/lib/typescript/web/tools/VelocityTracker.d.ts +2 -1
  1054. package/lib/typescript/web/tools/VelocityTracker.d.ts.map +1 -0
  1055. package/lib/typescript/web/tools/WheelEventManager.d.ts +12 -0
  1056. package/lib/typescript/web/tools/WheelEventManager.d.ts.map +1 -0
  1057. package/lib/typescript/web/utils.d.ts +15 -4
  1058. package/lib/typescript/web/utils.d.ts.map +1 -0
  1059. package/lib/typescript/web_hammer/DiscreteGestureHandler.d.ts +1 -0
  1060. package/lib/typescript/web_hammer/DiscreteGestureHandler.d.ts.map +1 -0
  1061. package/lib/typescript/web_hammer/DraggingGestureHandler.d.ts +1 -0
  1062. package/lib/typescript/web_hammer/DraggingGestureHandler.d.ts.map +1 -0
  1063. package/lib/typescript/web_hammer/Errors.d.ts +1 -0
  1064. package/lib/typescript/web_hammer/Errors.d.ts.map +1 -0
  1065. package/lib/typescript/web_hammer/FlingGestureHandler.d.ts +1 -0
  1066. package/lib/typescript/web_hammer/FlingGestureHandler.d.ts.map +1 -0
  1067. package/lib/typescript/web_hammer/GestureHandler.d.ts +1 -0
  1068. package/lib/typescript/web_hammer/GestureHandler.d.ts.map +1 -0
  1069. package/lib/typescript/web_hammer/IndiscreteGestureHandler.d.ts +1 -0
  1070. package/lib/typescript/web_hammer/IndiscreteGestureHandler.d.ts.map +1 -0
  1071. package/lib/typescript/web_hammer/LongPressGestureHandler.d.ts +1 -0
  1072. package/lib/typescript/web_hammer/LongPressGestureHandler.d.ts.map +1 -0
  1073. package/lib/typescript/web_hammer/NativeViewGestureHandler.d.ts +1 -0
  1074. package/lib/typescript/web_hammer/NativeViewGestureHandler.d.ts.map +1 -0
  1075. package/lib/typescript/web_hammer/NodeManager.d.ts +5 -5
  1076. package/lib/typescript/web_hammer/NodeManager.d.ts.map +1 -0
  1077. package/lib/typescript/web_hammer/PanGestureHandler.d.ts +1 -0
  1078. package/lib/typescript/web_hammer/PanGestureHandler.d.ts.map +1 -0
  1079. package/lib/typescript/web_hammer/PinchGestureHandler.d.ts +1 -0
  1080. package/lib/typescript/web_hammer/PinchGestureHandler.d.ts.map +1 -0
  1081. package/lib/typescript/web_hammer/PressGestureHandler.d.ts +1 -0
  1082. package/lib/typescript/web_hammer/PressGestureHandler.d.ts.map +1 -0
  1083. package/lib/typescript/web_hammer/RotationGestureHandler.d.ts +1 -0
  1084. package/lib/typescript/web_hammer/RotationGestureHandler.d.ts.map +1 -0
  1085. package/lib/typescript/web_hammer/TapGestureHandler.d.ts +1 -0
  1086. package/lib/typescript/web_hammer/TapGestureHandler.d.ts.map +1 -0
  1087. package/lib/typescript/web_hammer/constants.d.ts +1 -0
  1088. package/lib/typescript/web_hammer/constants.d.ts.map +1 -0
  1089. package/lib/typescript/web_hammer/utils.d.ts +1 -0
  1090. package/lib/typescript/web_hammer/utils.d.ts.map +1 -0
  1091. package/oss-attribution/attribution.txt +0 -0
  1092. package/oss-attribution/licenseInfos.json +1 -0
  1093. package/package.json +151 -1
  1094. package/react-native.config.js +27 -0
  1095. package/scripts/gesture_handler_utils.rb +25 -0
  1096. package/src/ActionType.ts +1 -1
  1097. package/src/Directions.ts +22 -5
  1098. package/src/EnableNewWebImplementation.ts +18 -0
  1099. package/src/PlatformConstants.kepler.ts +5 -0
  1100. package/src/PointerType.ts +7 -0
  1101. package/src/RNGestureHandlerModule.kepler.ts +3 -3
  1102. package/src/RNGestureHandlerModule.ts +4 -49
  1103. package/src/RNGestureHandlerModule.web.ts +29 -51
  1104. package/src/RNGestureHandlerModule.windows.ts +18 -100
  1105. package/src/State.ts +1 -1
  1106. package/src/TouchEventType.ts +2 -1
  1107. package/src/components/DrawerLayout.tsx +58 -13
  1108. package/src/components/GestureButtons.tsx +61 -123
  1109. package/src/components/GestureButtonsProps.ts +156 -0
  1110. package/src/components/GestureComponents.tsx +11 -11
  1111. package/src/components/GestureComponents.web.tsx +1 -1
  1112. package/src/components/GestureHandlerButton.tsx +1 -1
  1113. package/src/components/GestureHandlerButton.web.tsx +3 -3
  1114. package/src/components/GestureHandlerRootView.android.tsx +15 -7
  1115. package/src/components/GestureHandlerRootView.kepler.tsx +3 -2
  1116. package/src/components/GestureHandlerRootView.tsx +12 -7
  1117. package/src/components/GestureHandlerRootView.web.tsx +11 -6
  1118. package/src/components/Pressable/Pressable.tsx +401 -0
  1119. package/src/components/Pressable/PressableProps.tsx +174 -0
  1120. package/src/components/Pressable/StateMachine.tsx +57 -0
  1121. package/src/components/Pressable/index.ts +5 -0
  1122. package/src/components/Pressable/stateDefinitions.ts +126 -0
  1123. package/src/components/Pressable/utils.ts +140 -0
  1124. package/src/components/ReanimatedDrawerLayout.tsx +754 -0
  1125. package/src/components/ReanimatedSwipeable/ReanimatedSwipeable.tsx +607 -0
  1126. package/src/components/ReanimatedSwipeable/ReanimatedSwipeableProps.ts +199 -0
  1127. package/src/components/ReanimatedSwipeable/index.ts +6 -0
  1128. package/src/components/Swipeable.tsx +59 -15
  1129. package/src/components/Text.tsx +77 -0
  1130. package/src/components/gestureHandlerRootHOC.tsx +7 -6
  1131. package/src/components/touchables/ExtraButtonProps.ts +7 -0
  1132. package/src/components/touchables/GenericTouchable.tsx +15 -41
  1133. package/src/components/touchables/GenericTouchableProps.ts +28 -0
  1134. package/src/components/touchables/TouchableHighlight.tsx +7 -4
  1135. package/src/components/touchables/TouchableNativeFeedback.android.tsx +10 -18
  1136. package/src/components/touchables/TouchableNativeFeedback.tsx +6 -1
  1137. package/src/components/touchables/TouchableNativeFeedbackProps.tsx +10 -0
  1138. package/src/components/touchables/TouchableOpacity.tsx +8 -5
  1139. package/src/components/touchables/TouchableWithoutFeedback.tsx +31 -6
  1140. package/src/components/utils.ts +26 -0
  1141. package/src/findNodeHandle.ts +3 -0
  1142. package/src/findNodeHandle.web.ts +41 -0
  1143. package/src/getShadowNodeFromRef.ts +35 -7
  1144. package/src/ghQueueMicrotask.ts +8 -0
  1145. package/src/handlers/FlingGestureHandler.ts +11 -6
  1146. package/src/handlers/ForceTouchGestureHandler.ts +10 -12
  1147. package/src/handlers/GestureHandlerEventPayload.ts +229 -0
  1148. package/src/handlers/LongPressGestureHandler.ts +17 -40
  1149. package/src/handlers/NativeViewGestureHandler.ts +11 -7
  1150. package/src/handlers/PanGestureHandler.ts +19 -62
  1151. package/src/handlers/PinchGestureHandler.ts +11 -27
  1152. package/src/handlers/RotationGestureHandler.ts +11 -27
  1153. package/src/handlers/TapGestureHandler.ts +11 -6
  1154. package/src/handlers/createHandler.tsx +96 -59
  1155. package/src/handlers/createNativeWrapper.tsx +7 -3
  1156. package/src/handlers/customDirectEventTypes.ts +2 -0
  1157. package/src/handlers/customDirectEventTypes.web.ts +5 -0
  1158. package/src/handlers/gestureHandlerCommon.ts +50 -83
  1159. package/src/handlers/gestureHandlerTypesCompat.ts +25 -30
  1160. package/src/handlers/gestures/GestureDetector/Wrap.tsx +35 -0
  1161. package/src/handlers/gestures/GestureDetector/Wrap.web.tsx +42 -0
  1162. package/src/handlers/gestures/GestureDetector/attachHandlers.ts +112 -0
  1163. package/src/handlers/gestures/GestureDetector/dropHandlers.ts +17 -0
  1164. package/src/handlers/gestures/GestureDetector/index.tsx +191 -0
  1165. package/src/handlers/gestures/GestureDetector/needsToReattach.ts +27 -0
  1166. package/src/handlers/gestures/GestureDetector/types.ts +32 -0
  1167. package/src/handlers/gestures/GestureDetector/updateHandlers.ts +92 -0
  1168. package/src/handlers/gestures/GestureDetector/useAnimatedGesture.ts +209 -0
  1169. package/src/handlers/gestures/GestureDetector/useDetectorUpdater.ts +69 -0
  1170. package/src/handlers/gestures/GestureDetector/useMountReactions.ts +51 -0
  1171. package/src/handlers/gestures/GestureDetector/useViewRefHandler.ts +58 -0
  1172. package/src/handlers/gestures/GestureDetector/utils.ts +181 -0
  1173. package/src/handlers/gestures/eventReceiver.ts +6 -5
  1174. package/src/handlers/gestures/flingGesture.ts +13 -4
  1175. package/src/handlers/gestures/forceTouchGesture.ts +25 -4
  1176. package/src/handlers/gestures/gesture.ts +151 -20
  1177. package/src/handlers/gestures/gestureComposition.ts +5 -3
  1178. package/src/handlers/gestures/gestureObjects.ts +59 -0
  1179. package/src/handlers/gestures/gestureStateManager.ts +55 -41
  1180. package/src/handlers/gestures/gestureStateManager.web.ts +3 -1
  1181. package/src/handlers/gestures/hoverGesture.ts +2 -8
  1182. package/src/handlers/gestures/longPressGesture.ts +21 -4
  1183. package/src/handlers/gestures/nativeGesture.ts +10 -4
  1184. package/src/handlers/gestures/panGesture.ts +77 -8
  1185. package/src/handlers/gestures/pinchGesture.ts +1 -1
  1186. package/src/handlers/gestures/reanimatedWrapper.ts +18 -17
  1187. package/src/handlers/gestures/rotationGesture.ts +1 -1
  1188. package/src/handlers/gestures/tapGesture.ts +37 -4
  1189. package/src/handlers/getNextHandlerTag.ts +5 -0
  1190. package/src/handlers/handlersRegistry.ts +7 -9
  1191. package/src/handlers/utils.ts +76 -0
  1192. package/src/index.ts +31 -36
  1193. package/src/init.ts +1 -1
  1194. package/src/jestUtils/jestUtils.ts +30 -22
  1195. package/src/mocks/Pressable.tsx +1 -0
  1196. package/src/mocks/mocks.tsx +70 -0
  1197. package/src/mountRegistry.ts +51 -0
  1198. package/src/specs/NativeRNGestureHandlerModule.ts +26 -0
  1199. package/src/specs/RNGestureHandlerButtonNativeComponent.ts +4 -0
  1200. package/src/specs/RNGestureHandlerRootViewNativeComponent.kepler.ts +21 -0
  1201. package/src/utils.ts +58 -13
  1202. package/src/web/Gestures.ts +41 -0
  1203. package/src/web/constants.ts +1 -7
  1204. package/src/web/detectors/RotationGestureDetector.ts +31 -29
  1205. package/src/web/detectors/ScaleGestureDetector.ts +34 -35
  1206. package/src/web/handlers/FlingGestureHandler.ts +73 -38
  1207. package/src/web/handlers/GestureHandler.ts +224 -193
  1208. package/src/web/handlers/HoverGestureHandler.ts +16 -10
  1209. package/src/web/handlers/IGestureHandler.ts +49 -0
  1210. package/src/web/handlers/LongPressGestureHandler.ts +68 -18
  1211. package/src/web/handlers/ManualGestureHandler.ts +3 -9
  1212. package/src/web/handlers/NativeViewGestureHandler.ts +44 -36
  1213. package/src/web/handlers/PanGestureHandler.ts +123 -37
  1214. package/src/web/handlers/PinchGestureHandler.ts +20 -26
  1215. package/src/web/handlers/RotationGestureHandler.ts +15 -21
  1216. package/src/web/handlers/TapGestureHandler.ts +26 -25
  1217. package/src/web/interfaces.ts +46 -22
  1218. package/src/web/tools/CircularBuffer.ts +15 -15
  1219. package/src/web/tools/EventManager.ts +24 -20
  1220. package/src/web/tools/GestureHandlerDelegate.ts +7 -4
  1221. package/src/web/tools/GestureHandlerOrchestrator.ts +183 -189
  1222. package/src/web/tools/GestureHandlerWebDelegate.ts +139 -27
  1223. package/src/web/tools/InteractionManager.ts +62 -50
  1224. package/src/web/tools/KeyboardEventManager.ts +133 -0
  1225. package/src/web/tools/LeastSquareSolver.ts +18 -18
  1226. package/src/web/tools/NodeManager.ts +11 -6
  1227. package/src/web/tools/PointerEventManager.ts +177 -144
  1228. package/src/web/tools/PointerTracker.ts +94 -106
  1229. package/src/web/tools/Vector.ts +59 -0
  1230. package/src/web/tools/VelocityTracker.ts +7 -7
  1231. package/src/web/tools/WheelEventManager.ts +48 -0
  1232. package/src/web/utils.ts +289 -4
  1233. package/src/web_hammer/DiscreteGestureHandler.ts +1 -1
  1234. package/src/web_hammer/DraggingGestureHandler.ts +1 -1
  1235. package/src/web_hammer/FlingGestureHandler.ts +1 -1
  1236. package/src/web_hammer/GestureHandler.ts +5 -3
  1237. package/src/web_hammer/LongPressGestureHandler.ts +1 -1
  1238. package/src/web_hammer/NodeManager.ts +2 -11
  1239. package/src/web_hammer/PressGestureHandler.ts +7 -4
  1240. package/README.kepler.md +0 -167
  1241. package/SystemBundles/e952783824abd1e014b5dbeb51072f473be8d0e06e0377bbc053b54e619e5f4f.bundle +0 -67492
  1242. package/SystemBundles/e952783824abd1e014b5dbeb51072f473be8d0e06e0377bbc053b54e619e5f4f.map +0 -13823
  1243. package/SystemModules/amzn__react-native-gesture-handler-2.modules.txt +0 -338
  1244. package/SystemModules/amzn__react-native-gesture-handler-2.private.modules.txt +0 -95
  1245. package/THIRD_PARTY_NOTICES.txt +0 -24
  1246. package/ios/Handlers/RNFlingHandler.m +0 -152
  1247. package/ios/Handlers/RNLongPressHandler.m +0 -183
  1248. package/ios/Handlers/RNPinchHandler.m +0 -95
  1249. package/ios/Handlers/RNRotationHandler.m +0 -93
  1250. package/ios/RNGestureHandlerButton.h +0 -19
  1251. package/ios/RNGestureHandlerButton.m +0 -77
  1252. package/ios/RNGestureHandlerButtonComponentView.mm +0 -62
  1253. package/ios/RNGestureHandlerDirection.h +0 -8
  1254. package/ios/RNGestureHandlerModule.h +0 -7
  1255. package/lib/commonjs/RNGestureHandlerModule.macos.js +0 -113
  1256. package/lib/commonjs/RNGestureHandlerModule.macos.js.map +0 -1
  1257. package/lib/commonjs/handlers/gestures/GestureDetector.js +0 -548
  1258. package/lib/commonjs/handlers/gestures/GestureDetector.js.map +0 -1
  1259. package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js +0 -11
  1260. package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js.map +0 -1
  1261. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js +0 -11
  1262. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js.map +0 -1
  1263. package/lib/commonjs/web/tools/TouchEventManager.js +0 -126
  1264. package/lib/commonjs/web/tools/TouchEventManager.js.map +0 -1
  1265. package/lib/module/RNGestureHandlerModule.macos.js +0 -104
  1266. package/lib/module/RNGestureHandlerModule.macos.js.map +0 -1
  1267. package/lib/module/handlers/gestures/GestureDetector.js +0 -538
  1268. package/lib/module/handlers/gestures/GestureDetector.js.map +0 -1
  1269. package/lib/module/specs/RNGestureHandlerButtonNativeComponent.js +0 -4
  1270. package/lib/module/specs/RNGestureHandlerButtonNativeComponent.js.map +0 -1
  1271. package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.js +0 -4
  1272. package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.js.map +0 -1
  1273. package/lib/module/web/tools/TouchEventManager.js +0 -118
  1274. package/lib/module/web/tools/TouchEventManager.js.map +0 -1
  1275. package/lib/typescript/RNGestureHandlerModule.macos.d.ts +0 -47
  1276. package/lib/typescript/handlers/gestures/GestureDetector.d.ts +0 -19
  1277. package/lib/typescript/web/tools/TouchEventManager.d.ts +0 -6
  1278. package/src/RNGestureHandlerModule.macos.ts +0 -133
  1279. package/src/handlers/gestures/GestureDetector.tsx +0 -818
  1280. package/src/web/tools/TouchEventManager.ts +0 -167
  1281. /package/android/{src/fabric → fabric/src/main}/java/com/swmansion/gesturehandler/RNGestureHandlerComponentsRegistry.java +0 -0
  1282. /package/android/{common → noreanimated}/src/main/java/com/swmansion/common/GestureHandlerStateManager.kt +0 -0
  1283. /package/{ios → apple}/Handlers/RNForceTouchHandler.h +0 -0
  1284. /package/{ios → apple}/Handlers/RNHoverHandler.h +0 -0
  1285. /package/{ios → apple}/Handlers/RNLongPressHandler.h +0 -0
  1286. /package/{ios → apple}/Handlers/RNManualHandler.h +0 -0
  1287. /package/{ios → apple}/Handlers/RNNativeViewHandler.h +0 -0
  1288. /package/{ios → apple}/Handlers/RNPanHandler.h +0 -0
  1289. /package/{ios → apple}/Handlers/RNPinchHandler.h +0 -0
  1290. /package/{ios → apple}/Handlers/RNRotationHandler.h +0 -0
  1291. /package/{ios → apple}/Handlers/RNTapHandler.h +0 -0
  1292. /package/{ios → apple}/RNGHTouchEventType.h +0 -0
  1293. /package/{ios → apple}/RNGestureHandler.xcodeproj/project.pbxproj +0 -0
  1294. /package/{ios → apple}/RNGestureHandler.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -0
  1295. /package/{ios → apple}/RNGestureHandlerActionType.h +0 -0
  1296. /package/{ios → apple}/RNGestureHandlerButtonManager.h +0 -0
  1297. /package/{ios → apple}/RNGestureHandlerRootViewComponentView.mm +0 -0
  1298. /package/{ios → apple}/RNGestureHandlerState.h +0 -0
  1299. /package/{ios → apple}/RNGestureHandlerStateManager.h +0 -0
  1300. /package/{ios → apple}/RNRootViewGestureRecognizer.h +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["invariant","DeviceEventEmitter","flingHandlerName","forceTouchHandlerName","BaseGesture","findHandlerByTestID","longPressHandlerName","nativeViewHandlerName","panHandlerName","pinchHandlerName","rotationHandlerName","tapHandlerName","State","hasProperty","withPrevAndCurrent","fireEvent","_element","_name","_data","require","_e","handlersDefaultEvents","x","y","absoluteX","absoluteY","numberOfPointers","force","duration","pointerInside","translationX","translationY","velocityX","velocityY","focalX","focalY","scale","velocity","anchorX","anchorY","rotation","isGesture","componentOrGesture","wrapWithNativeEvent","event","nativeEvent","fillOldStateChanges","previousEvent","currentEvent","isFirstEvent","oldState","UNDETERMINED","isGestureStateEvent","state","validateStateTransitions","stringify","JSON","errorMsgWithBothEvents","description","errorMsgWithCurrentEvent","BEGAN","fillMissingDefaultsFor","handlerType","handlerTag","isDiscreteHandler","fillMissingStatesTransitions","events","_events2","_events$","_events","lastEvent","length","firstEvent","shouldDuplicateFirstEvent","hasState","duplicated","unshift","shouldDuplicateLastEvent","END","FAILED","CANCELLED","push","isWithoutState","noEventsLeft","trueFn","fillEventsForCurrentState","shouldConsumeEvent","shouldTransitionToNextState","peekCurrentEvent","_events$2","peekNextEvent","_events$3","consumeCurrentEvent","shift","nextEvent","currentRequiredState","REQUIRED_EVENTS","currentStateIdx","eventData","shouldUseEvent","transformedEvents","ACTIVE","hasAllStates","iterations","nextRequiredState","e","getHandlerData","gesture","emitEvent","eventName","args","emit","handlerName","gestureHandlerComponent","props","fireGestureHandler","eventList","_","map","lastSentEvent","hasChangedState","getByGestureTestId","testID","handler","Error"],"sources":["jestUtils.ts"],"sourcesContent":["import invariant from 'invariant';\nimport { DeviceEventEmitter } from 'react-native';\nimport { ReactTestInstance } from 'react-test-renderer';\nimport {\n FlingGestureHandler,\n FlingGestureHandlerEventPayload,\n flingHandlerName,\n} from '../handlers/FlingGestureHandler';\nimport {\n ForceTouchGestureHandler,\n ForceTouchGestureHandlerEventPayload,\n forceTouchHandlerName,\n} from '../handlers/ForceTouchGestureHandler';\nimport {\n BaseGestureHandlerProps,\n GestureEvent,\n HandlerStateChangeEvent,\n} from '../handlers/gestureHandlerCommon';\nimport { FlingGesture } from '../handlers/gestures/flingGesture';\nimport { ForceTouchGesture } from '../handlers/gestures/forceTouchGesture';\nimport { BaseGesture, GestureType } from '../handlers/gestures/gesture';\nimport { LongPressGesture } from '../handlers/gestures/longPressGesture';\nimport { NativeGesture } from '../handlers/gestures/nativeGesture';\nimport { PanGesture } from '../handlers/gestures/panGesture';\nimport { PinchGesture } from '../handlers/gestures/pinchGesture';\nimport { RotationGesture } from '../handlers/gestures/rotationGesture';\nimport { TapGesture } from '../handlers/gestures/tapGesture';\nimport { findHandlerByTestID } from '../handlers/handlersRegistry';\nimport {\n LongPressGestureHandler,\n LongPressGestureHandlerEventPayload,\n longPressHandlerName,\n} from '../handlers/LongPressGestureHandler';\nimport {\n NativeViewGestureHandler,\n NativeViewGestureHandlerPayload,\n nativeViewHandlerName,\n} from '../handlers/NativeViewGestureHandler';\nimport {\n PanGestureHandler,\n PanGestureHandlerEventPayload,\n panHandlerName,\n} from '../handlers/PanGestureHandler';\nimport {\n PinchGestureHandler,\n PinchGestureHandlerEventPayload,\n pinchHandlerName,\n} from '../handlers/PinchGestureHandler';\nimport {\n RotationGestureHandler,\n RotationGestureHandlerEventPayload,\n rotationHandlerName,\n} from '../handlers/RotationGestureHandler';\nimport {\n TapGestureHandler,\n TapGestureHandlerEventPayload,\n tapHandlerName,\n} from '../handlers/TapGestureHandler';\nimport { State } from '../State';\nimport { hasProperty, withPrevAndCurrent } from '../utils';\n\n// load fireEvent conditionally, so RNGH may be used in setups without testing-library\nlet fireEvent = (\n _element: ReactTestInstance,\n _name: string,\n ..._data: any[]\n) => {\n // NOOP\n};\n\ntry {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n fireEvent = require('@testing-library/react-native').fireEvent;\n} catch (_e) {\n // do nothing if not available\n}\n\ntype GestureHandlerTestEvent<\n TEventPayload extends Record<string, unknown> = Record<string, unknown>\n> = (\n | GestureEvent<TEventPayload>\n | HandlerStateChangeEvent<TEventPayload>\n)['nativeEvent'];\n\ntype HandlerNames = keyof DefaultEventsMapping;\n\ntype WithNumberOfPointers<T> = {\n [P in keyof T]: T[P] & { numberOfPointers: number };\n};\ntype DefaultEventsMapping = WithNumberOfPointers<{\n [flingHandlerName]: FlingGestureHandlerEventPayload;\n [forceTouchHandlerName]: ForceTouchGestureHandlerEventPayload;\n [longPressHandlerName]: LongPressGestureHandlerEventPayload;\n [nativeViewHandlerName]: NativeViewGestureHandlerPayload;\n [panHandlerName]: PanGestureHandlerEventPayload;\n [pinchHandlerName]: PinchGestureHandlerEventPayload;\n [rotationHandlerName]: RotationGestureHandlerEventPayload;\n [tapHandlerName]: TapGestureHandlerEventPayload;\n}>;\n\nconst handlersDefaultEvents: DefaultEventsMapping = {\n [flingHandlerName]: {\n x: 0,\n y: 0,\n absoluteX: 0,\n absoluteY: 0,\n numberOfPointers: 1,\n },\n [forceTouchHandlerName]: {\n x: 0,\n y: 0,\n absoluteX: 0,\n absoluteY: 0,\n force: 1,\n numberOfPointers: 1,\n },\n [longPressHandlerName]: {\n x: 0,\n y: 0,\n absoluteX: 0,\n absoluteY: 0,\n duration: 100,\n numberOfPointers: 1,\n },\n [nativeViewHandlerName]: {\n pointerInside: true,\n numberOfPointers: 1,\n },\n [panHandlerName]: {\n x: 0,\n y: 0,\n absoluteX: 0,\n absoluteY: 0,\n translationX: 100,\n translationY: 0,\n velocityX: 3,\n velocityY: 0,\n numberOfPointers: 1,\n },\n [pinchHandlerName]: {\n focalX: 0,\n focalY: 0,\n scale: 2,\n velocity: 1,\n numberOfPointers: 2,\n },\n [rotationHandlerName]: {\n anchorX: 0,\n anchorY: 0,\n rotation: 3.14,\n velocity: 2,\n numberOfPointers: 2,\n },\n [tapHandlerName]: {\n x: 0,\n y: 0,\n absoluteX: 0,\n absoluteY: 0,\n numberOfPointers: 1,\n },\n};\n\nfunction isGesture(\n componentOrGesture: ReactTestInstance | GestureType\n): componentOrGesture is GestureType {\n return componentOrGesture instanceof BaseGesture;\n}\n\ninterface WrappedGestureHandlerTestEvent {\n nativeEvent: GestureHandlerTestEvent;\n}\nfunction wrapWithNativeEvent(\n event: GestureHandlerTestEvent\n): WrappedGestureHandlerTestEvent {\n return { nativeEvent: event };\n}\n\nfunction fillOldStateChanges(\n previousEvent: GestureHandlerTestEvent | null,\n currentEvent: Omit<GestureHandlerTestEvent, 'oldState'>\n): GestureHandlerTestEvent {\n const isFirstEvent = previousEvent === null;\n if (isFirstEvent) {\n return {\n oldState: State.UNDETERMINED,\n ...currentEvent,\n } as GestureHandlerTestEvent;\n }\n\n const isGestureStateEvent = previousEvent.state !== currentEvent.state;\n if (isGestureStateEvent) {\n return {\n oldState: previousEvent?.state,\n ...currentEvent,\n } as GestureHandlerTestEvent;\n } else {\n return currentEvent as GestureHandlerTestEvent;\n }\n}\n\ntype EventWithStates = Partial<\n Pick<GestureHandlerTestEvent, 'oldState' | 'state'>\n>;\nfunction validateStateTransitions(\n previousEvent: EventWithStates | null,\n currentEvent: EventWithStates\n) {\n function stringify(event: Record<string, unknown> | null) {\n return JSON.stringify(event, null, 2);\n }\n function errorMsgWithBothEvents(description: string) {\n return `${description}, invalid event: ${stringify(\n currentEvent\n )}, previous event: ${stringify(previousEvent)}`;\n }\n\n function errorMsgWithCurrentEvent(description: string) {\n return `${description}, invalid event: ${stringify(currentEvent)}`;\n }\n\n invariant(\n hasProperty(currentEvent, 'state'),\n errorMsgWithCurrentEvent('every event must have state')\n );\n\n const isFirstEvent = previousEvent === null;\n if (isFirstEvent) {\n invariant(\n currentEvent.state === State.BEGAN,\n errorMsgWithCurrentEvent('first event must have BEGAN state')\n );\n }\n\n if (previousEvent !== null) {\n if (previousEvent.state !== currentEvent.state) {\n invariant(\n hasProperty(currentEvent, 'oldState'),\n errorMsgWithCurrentEvent(\n 'when state changes, oldState field should be present'\n )\n );\n invariant(\n currentEvent.oldState === previousEvent.state,\n errorMsgWithBothEvents(\n \"when state changes, oldState should be the same as previous event' state\"\n )\n );\n }\n }\n\n return currentEvent;\n}\n\ntype EventWithoutStates = Omit<GestureHandlerTestEvent, 'oldState' | 'state'>;\ninterface HandlerInfo {\n handlerType: HandlerNames;\n handlerTag: number;\n}\nfunction fillMissingDefaultsFor({\n handlerType,\n handlerTag,\n}: HandlerInfo): (\n event: Partial<GestureHandlerTestEvent>\n) => EventWithoutStates {\n return (event) => {\n return {\n ...handlersDefaultEvents[handlerType],\n ...event,\n handlerTag,\n };\n };\n}\n\nfunction isDiscreteHandler(handlerType: HandlerNames) {\n return (\n handlerType === 'TapGestureHandler' ||\n handlerType === 'LongPressGestureHandler'\n );\n}\n\nfunction fillMissingStatesTransitions(\n events: EventWithoutStates[],\n isDiscreteHandler: boolean\n): EventWithoutStates[] {\n type Event = EventWithoutStates | null;\n const _events = [...events];\n const lastEvent = _events[_events.length - 1] ?? null;\n const firstEvent = _events[0] ?? null;\n\n const shouldDuplicateFirstEvent =\n !isDiscreteHandler && !hasState(State.BEGAN)(firstEvent);\n if (shouldDuplicateFirstEvent) {\n const duplicated = { ...firstEvent, state: State.BEGAN };\n // @ts-ignore badly typed, property may exist and we don't want to copy it\n delete duplicated.oldState;\n _events.unshift(duplicated);\n }\n\n const shouldDuplicateLastEvent =\n !hasState(State.END)(lastEvent) ||\n !hasState(State.FAILED)(lastEvent) ||\n !hasState(State.CANCELLED)(lastEvent);\n\n if (shouldDuplicateLastEvent) {\n const duplicated = { ...lastEvent, state: State.END };\n // @ts-ignore badly typed, property may exist and we don't want to copy it\n delete duplicated.oldState;\n _events.push(duplicated);\n }\n\n function isWithoutState(event: Event) {\n return event !== null && !hasProperty(event, 'state');\n }\n function hasState(state: State) {\n return (event: Event) => event !== null && event.state === state;\n }\n function noEventsLeft(event: Event) {\n return event === null;\n }\n\n function trueFn() {\n return true;\n }\n interface Args {\n shouldConsumeEvent?: (event: Event) => boolean;\n shouldTransitionToNextState?: (nextEvent: Event) => boolean;\n }\n function fillEventsForCurrentState({\n shouldConsumeEvent = trueFn,\n shouldTransitionToNextState = trueFn,\n }: Args) {\n function peekCurrentEvent(): Event {\n return _events[0] ?? null;\n }\n function peekNextEvent(): Event {\n return _events[1] ?? null;\n }\n function consumeCurrentEvent() {\n _events.shift();\n }\n const currentEvent = peekCurrentEvent();\n const nextEvent = peekNextEvent();\n const currentRequiredState = REQUIRED_EVENTS[currentStateIdx];\n\n let eventData = {};\n const shouldUseEvent = shouldConsumeEvent(currentEvent);\n if (shouldUseEvent) {\n eventData = currentEvent!;\n consumeCurrentEvent();\n }\n transformedEvents.push({ state: currentRequiredState, ...eventData });\n if (shouldTransitionToNextState(nextEvent)) {\n currentStateIdx++;\n }\n }\n\n const REQUIRED_EVENTS = [State.BEGAN, State.ACTIVE, State.END];\n\n let currentStateIdx = 0;\n const transformedEvents: EventWithoutStates[] = [];\n let hasAllStates;\n let iterations = 0;\n do {\n const nextRequiredState = REQUIRED_EVENTS[currentStateIdx];\n if (nextRequiredState === State.BEGAN) {\n fillEventsForCurrentState({\n shouldConsumeEvent: (e: Event) =>\n isWithoutState(e) || hasState(State.BEGAN)(e),\n });\n } else if (nextRequiredState === State.ACTIVE) {\n const shouldConsumeEvent = (e: Event) =>\n isWithoutState(e) || hasState(State.ACTIVE)(e);\n const shouldTransitionToNextState = (nextEvent: Event) =>\n noEventsLeft(nextEvent) ||\n hasState(State.END)(nextEvent) ||\n hasState(State.FAILED)(nextEvent) ||\n hasState(State.CANCELLED)(nextEvent);\n\n fillEventsForCurrentState({\n shouldConsumeEvent,\n shouldTransitionToNextState,\n });\n } else if (nextRequiredState === State.END) {\n fillEventsForCurrentState({});\n }\n hasAllStates = currentStateIdx === REQUIRED_EVENTS.length;\n\n invariant(\n iterations++ <= 500,\n 'exceeded max number of iterations, please report a bug in RNGH repository with your test case'\n );\n } while (!hasAllStates);\n\n return transformedEvents;\n}\n\ntype EventEmitter = (\n eventName: string,\n args: { nativeEvent: GestureHandlerTestEvent }\n) => void;\ninterface HandlerData {\n emitEvent: EventEmitter;\n handlerType: HandlerNames;\n handlerTag: number;\n}\nfunction getHandlerData(\n componentOrGesture: ReactTestInstance | GestureType\n): HandlerData {\n if (isGesture(componentOrGesture)) {\n const gesture = componentOrGesture;\n return {\n emitEvent: (eventName, args) => {\n DeviceEventEmitter.emit(eventName, args.nativeEvent);\n },\n handlerType: gesture.handlerName as HandlerNames,\n handlerTag: gesture.handlerTag,\n };\n }\n const gestureHandlerComponent = componentOrGesture;\n return {\n emitEvent: (eventName, args) => {\n fireEvent(gestureHandlerComponent, eventName, args);\n },\n handlerType: gestureHandlerComponent.props.handlerType as HandlerNames,\n handlerTag: gestureHandlerComponent.props.handlerTag as number,\n };\n}\ntype AllGestures =\n | TapGesture\n | PanGesture\n | LongPressGesture\n | RotationGesture\n | PinchGesture\n | FlingGesture\n | ForceTouchGesture\n | NativeGesture;\n\ntype AllHandlers =\n | TapGestureHandler\n | PanGestureHandler\n | LongPressGestureHandler\n | RotationGestureHandler\n | PinchGestureHandler\n | FlingGestureHandler\n | ForceTouchGestureHandler\n | NativeViewGestureHandler;\n\n// prettier-ignore\ntype ClassComponentConstructor<P> = new (props: P) => React.Component<P, any, any>;\n\ntype ExtractPayloadFromProps<T> = T extends BaseGestureHandlerProps<\n infer TPayload\n>\n ? TPayload\n : never;\n\ntype ExtractConfig<T> = T extends BaseGesture<infer TGesturePayload>\n ? TGesturePayload\n : T extends ClassComponentConstructor<infer THandlerProps>\n ? ExtractPayloadFromProps<THandlerProps>\n : Record<string, unknown>;\n\nexport function fireGestureHandler<THandler extends AllGestures | AllHandlers>(\n componentOrGesture: ReactTestInstance | GestureType,\n eventList: Partial<GestureHandlerTestEvent<ExtractConfig<THandler>>>[] = []\n): void {\n const { emitEvent, handlerType, handlerTag } =\n getHandlerData(componentOrGesture);\n\n let _ = fillMissingStatesTransitions(\n eventList,\n isDiscreteHandler(handlerType)\n );\n _ = _.map(fillMissingDefaultsFor({ handlerTag, handlerType }));\n _ = withPrevAndCurrent(_, fillOldStateChanges);\n _ = withPrevAndCurrent(_, validateStateTransitions);\n // @ts-ignore TODO\n _ = _.map(wrapWithNativeEvent);\n\n const events = _ as unknown as WrappedGestureHandlerTestEvent[];\n\n const firstEvent = events.shift()!;\n\n emitEvent('onGestureHandlerStateChange', firstEvent);\n let lastSentEvent = firstEvent;\n for (const event of events) {\n const hasChangedState =\n lastSentEvent.nativeEvent.state !== event.nativeEvent.state;\n\n if (hasChangedState) {\n emitEvent('onGestureHandlerStateChange', event);\n } else {\n emitEvent('onGestureHandlerEvent', event);\n }\n lastSentEvent = event;\n }\n}\n\nexport function getByGestureTestId(testID: string) {\n const handler = findHandlerByTestID(testID);\n if (handler === null) {\n throw new Error(`Handler with id: '${testID}' cannot be found`);\n }\n return handler;\n}\n"],"mappings":"AAAA,OAAOA,S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AK,IAAI,EAAE;IACpB,MAAM,IAAIC,KAAK,CAAC,qBAAqBF,MAAM,mBAAmB,CAAC;EACjE;EACA,OAAOC,OAAO;AAChB","ignoreList":[]}
1
+ {"version":3,"names":["invariant","DeviceEventEmitter","flingHandlerName","forceTouchHandlerName","BaseGesture","findHandlerByTestID","longPressHandlerName","nativeViewHandlerName","panHandlerName","pinchHandlerName","rotationHandlerName","tapHandlerName","State","hasProperty","withPrevAndCurrent","fireEvent","_element","_name","_data","require","_e","handlersDefaultEvents","x","y","absoluteX","absoluteY","numberOfPointers","force","duration","pointerInside","translationX","translationY","velocityX","velocityY","stylusData","undefined","focalX","focalY","scale","velocity","anchorX","anchorY","rotation","isGesture","componentOrGesture","wrapWithNativeEvent","event","nativeEvent","fillOldStateChanges","previousEvent","currentEvent","isFirstEvent","oldState","UNDETERMINED","isGestureStateEvent","state","validateStateTransitions","stringify","JSON","errorMsgWithBothEvents","description","errorMsgWithCurrentEvent","BEGAN","fillMissingDefaultsFor","handlerType","handlerTag","isDiscreteHandler","fillMissingStatesTransitions","events","_events","lastEvent","length","firstEvent","shouldDuplicateFirstEvent","hasState","duplicated","unshift","shouldDuplicateLastEvent","END","FAILED","CANCELLED","push","isWithoutState","noEventsLeft","trueFn","fillEventsForCurrentState","shouldConsumeEvent","shouldTransitionToNextState","peekCurrentEvent","peekNextEvent","consumeCurrentEvent","shift","nextEvent","currentRequiredState","REQUIRED_EVENTS","currentStateIdx","eventData","shouldUseEvent","transformedEvents","ACTIVE","hasAllStates","iterations","nextRequiredState","e","getHandlerData","gesture","emitEvent","eventName","args","emit","handlerName","enabled","config","gestureHandlerComponent","props","fireGestureHandler","eventList","_","map","lastSentEvent","hasChangedState","getByGestureTestId","testID","handler","Error"],"sourceRoot":"../../../src","sources":["jestUtils/jestUtils.ts"],"mappings":";;AAAA,OAAOA,SAAS,MAAM,WAAW;AACjC,SAASC,kBAAkB,QAAQ,cAAc;AAEjD,SAEEC,gBAAgB,QACX,iCAAiC;AACxC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as default } from 'react-native';
4
+ //# sourceMappingURL=Pressable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Pressable","default"],"sourceRoot":"../../../src","sources":["mocks/Pressable.tsx"],"mappings":";;AAAA,SAASA,SAAS,IAAIC,OAAO,QAAQ,cAAc","ignoreList":[]}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { TouchableHighlight, TouchableNativeFeedback, TouchableOpacity, TouchableWithoutFeedback, ScrollView, FlatList, Switch, TextInput, DrawerLayoutAndroid, View } from 'react-native';
5
+ import { State } from '../State';
6
+ import { Directions } from '../Directions';
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ const NOOP = () => {
9
+ // Do nothing
10
+ };
11
+ const PanGestureHandler = View;
12
+ const attachGestureHandler = NOOP;
13
+ const createGestureHandler = NOOP;
14
+ const dropGestureHandler = NOOP;
15
+ const updateGestureHandler = NOOP;
16
+ const flushOperations = NOOP;
17
+ const install = NOOP;
18
+ const NativeViewGestureHandler = View;
19
+ const TapGestureHandler = View;
20
+ const ForceTouchGestureHandler = View;
21
+ const LongPressGestureHandler = View;
22
+ const PinchGestureHandler = View;
23
+ const RotationGestureHandler = View;
24
+ const FlingGestureHandler = View;
25
+ export const RawButton = ({
26
+ enabled,
27
+ ...rest
28
+ }) => /*#__PURE__*/_jsx(TouchableNativeFeedback, {
29
+ disabled: enabled === false,
30
+ ...rest,
31
+ children: /*#__PURE__*/_jsx(View, {})
32
+ });
33
+ export const BaseButton = RawButton;
34
+ export const RectButton = RawButton;
35
+ export const BorderlessButton = TouchableNativeFeedback;
36
+ export default {
37
+ TouchableHighlight,
38
+ TouchableNativeFeedback,
39
+ TouchableOpacity,
40
+ TouchableWithoutFeedback,
41
+ ScrollView,
42
+ FlatList,
43
+ Switch,
44
+ TextInput,
45
+ DrawerLayoutAndroid,
46
+ NativeViewGestureHandler,
47
+ TapGestureHandler,
48
+ ForceTouchGestureHandler,
49
+ LongPressGestureHandler,
50
+ PinchGestureHandler,
51
+ RotationGestureHandler,
52
+ FlingGestureHandler,
53
+ PanGestureHandler,
54
+ attachGestureHandler,
55
+ createGestureHandler,
56
+ dropGestureHandler,
57
+ updateGestureHandler,
58
+ flushOperations,
59
+ install,
60
+ // Probably can be removed
61
+ Directions,
62
+ State
63
+ };
64
+ //# sourceMappingURL=mocks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","TouchableHighlight","TouchableNativeFeedback","TouchableOpacity","TouchableWithoutFeedback","ScrollView","FlatList","Switch","TextInput","DrawerLayoutAndroid","View","State","Directions","jsx","_jsx","NOOP","PanGestureHandler","attachGestureHandler","createGestureHandler","dropGestureHandler","updateGestureHandler","flushOperations","install","NativeViewGestureHandler","TapGestureHandler","ForceTouchGestureHandler","LongPressGestureHandler","PinchGestureHandler","RotationGestureHandler","FlingGestureHandler","RawButton","enabled","rest","disabled","children","BaseButton","RectButton","BorderlessButton"],"sourceRoot":"../../../src","sources":["mocks/mocks.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,kBAAkB,EAClBC,uBAAuB,EACvBC,gBAAgB,EAChBC,wBAAwB,EACxBC,UAAU,EACVC,QAAQ,EACRC,MAAM,EACNC,SAAS,EACTC,mBAAmB,EACnBC,IAAI,QACC,cAAc;AACrB,SAASC,KAAK,QAAQ,UAAU;AAChC,SAASC,UAAU,QAAQ,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE3C,MAAMC,IAAI,GAAGA,CAAA,KAAM;EACjB;AAAA,CACD;AACD,MAAMC,iBAAiB,GAAGN,IAAI;AAC9B,MAAMO,oBAAoB,GAAGF,IAAI;AACjC,MAAMG,oBAAoB,GAAGH,IAAI;AACjC,MAAMI,kBAAkB,GAAGJ,IAAI;AAC/B,MAAMK,oBAAoB,GAAGL,IAAI;AACjC,MAAMM,eAAe,GAAGN,IAAI;AAC5B,MAAMO,OAAO,GAAGP,IAAI;AACpB,MAAMQ,wBAAwB,GAAGb,IAAI;AACrC,MAAMc,iBAAiB,GAAGd,IAAI;AAC9B,MAAMe,wBAAwB,GAAGf,IAAI;AACrC,MAAMgB,uBAAuB,GAAGhB,IAAI;AACpC,MAAMiB,mBAAmB,GAAGjB,IAAI;AAChC,MAAMkB,sBAAsB,GAAGlB,IAAI;AACnC,MAAMmB,mBAAmB,GAAGnB,IAAI;AAChC,OAAO,MAAMoB,SAAS,GAAGA,CAAC;EAAEC,OAAO;EAAE,GAAGC;AAAU,CAAC,kBACjDlB,IAAA,CAACZ,uBAAuB;EAAC+B,QAAQ,EAAEF,OAAO,KAAK,KAAM;EAAA,GAAKC,IAAI;EAAAE,QAAA,eAC5DpB,IAAA,CAACJ,IAAI,IAAE;AAAC,CACe,CAC1B;AACD,OAAO,MAAMyB,UAAU,GAAGL,SAAS;AACnC,OAAO,MAAMM,UAAU,GAAGN,SAAS;AACnC,OAAO,MAAMO,gBAAgB,GAAGnC,uBAAuB;AAEvD,eAAe;EACbD,kBAAkB;EAClBC,uBAAuB;EACvBC,gBAAgB;EAChBC,wBAAwB;EACxBC,UAAU;EACVC,QAAQ;EACRC,MAAM;EACNC,SAAS;EACTC,mBAAmB;EACnBc,wBAAwB;EACxBC,iBAAiB;EACjBC,wBAAwB;EACxBC,uBAAuB;EACvBC,mBAAmB;EACnBC,sBAAsB;EACtBC,mBAAmB;EACnBb,iBAAiB;EACjBC,oBAAoB;EACpBC,oBAAoB;EACpBC,kBAAkB;EAClBC,oBAAoB;EACpBC,eAAe;EACfC,OAAO;EACP;EACAV,UAAU;EACVD;AACF,CAAC","ignoreList":[]}
@@ -1,3 +1,5 @@
1
+ "use strict";
2
+
1
3
  import { TouchableHighlight, TouchableNativeFeedback, TouchableOpacity, TouchableWithoutFeedback, ScrollView, FlatList, Switch, TextInput, DrawerLayoutAndroid, View } from 'react-native';
2
4
  import { State } from './State';
3
5
  import { Directions } from './Directions';
@@ -1 +1 @@
1
- {"version":3,"names":["TouchableHighlight","TouchableNativeFeedback","TouchableOpacity","TouchableWithoutFeedback","ScrollView","FlatList","Switch","TextInput","DrawerLayoutAndroid","View","State","Directions","NOOP","PanGestureHandler","attachGestureHandler","createGestureHandler","dropGestureHandler","updateGestureHandler","flushOperations","NativeViewGestureHandler","TapGestureHandler","ForceTouchGestureHandler","LongPressGestureHandler","PinchGestureHandler","RotationGestureHandler","FlingGestureHandler","RawButton","BaseButton","RectButton","BorderlessButton"],"sources":["mocks.ts"],"sourcesContent":["import {\n TouchableHighlight,\n TouchableNativeFeedback,\n TouchableOpacity,\n TouchableWithoutFeedback,\n ScrollView,\n FlatList,\n Switch,\n TextInput,\n DrawerLayoutAndroid,\n View,\n} from 'react-native';\nimport { State } from './State';\nimport { Directions } from './Directions';\n\nconst NOOP = () => {\n // do nothing\n};\nconst PanGestureHandler = View;\nconst attachGestureHandler = NOOP;\nconst createGestureHandler = NOOP;\nconst dropGestureHandler = NOOP;\nconst updateGestureHandler = NOOP;\nconst flushOperations = NOOP;\nconst NativeViewGestureHandler = View;\nconst TapGestureHandler = View;\nconst ForceTouchGestureHandler = View;\nconst LongPressGestureHandler = View;\nconst PinchGestureHandler = View;\nconst RotationGestureHandler = View;\nconst FlingGestureHandler = View;\nconst RawButton = TouchableNativeFeedback;\nconst BaseButton = TouchableNativeFeedback;\nconst RectButton = TouchableNativeFeedback;\nconst BorderlessButton = TouchableNativeFeedback;\n\nexport default {\n TouchableHighlight,\n TouchableNativeFeedback,\n TouchableOpacity,\n TouchableWithoutFeedback,\n ScrollView,\n FlatList,\n Switch,\n TextInput,\n DrawerLayoutAndroid,\n NativeViewGestureHandler,\n TapGestureHandler,\n ForceTouchGestureHandler,\n LongPressGestureHandler,\n PinchGestureHandler,\n RotationGestureHandler,\n FlingGestureHandler,\n RawButton,\n BaseButton,\n RectButton,\n BorderlessButton,\n PanGestureHandler,\n attachGestureHandler,\n createGestureHandler,\n dropGestureHandler,\n updateGestureHandler,\n flushOperations,\n // probably can be removed\n Directions,\n State,\n} as const;\n"],"mappings":"AAAA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oB;EACpBC,kBAAkB;EAClBC,oBAAoB;EACpBC,eAAe;EACf;EACAP,UAAU;EACVD;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["TouchableHighlight","TouchableNativeFeedback","TouchableOpacity","TouchableWithoutFeedback","ScrollView","FlatList","Switch","TextInput","DrawerLayoutAndroid","View","State","Directions","NOOP","PanGestureHandler","attachGestureHandler","createGestureHandler","dropGestureHandler","updateGestureHandler","flushOperations","NativeViewGestureHandler","TapGestureHandler","ForceTouchGestureHandler","LongPressGestureHandler","PinchGestureHandler","RotationGestureHandler","FlingGestureHandler","RawButton","BaseButton","RectButton","BorderlessButton"],"sourceRoot":"../../src","sources":["mocks.ts"],"mappings":";;AAAA,SACEA,kBAAkB,EAClBC,uBAAuB,EACvBC,gBAAgB,EAChBC,wBAAwB,EACxBC,UAAU,EACVC,QAAQ,EACRC,MAAM,EACNC,SAAS,EACTC,mBAAmB,EACnBC,IAAI,QACC,cAAc;AACrB,SAASC,KAAK,QAAQ,SAAS;AAC/B,SAASC,UAAU,QAAQ,cAAc;AAEzC,MAAMC,IAAI,GAAGA,CAAA,KAAM;EACjB;AAAA,CACD;AACD,MAAMC,iBAAiB,GAAGJ,IAAI;AAC9B,MAAMK,oBAAoB,GAAGF,IAAI;AACjC,MAAMG,oBAAoB,GAAGH,IAAI;AACjC,MAAMI,kBAAkB,GAAGJ,IAAI;AAC/B,MAAMK,oBAAoB,GAAGL,IAAI;AACjC,MAAMM,eAAe,GAAGN,IAAI;AAC5B,MAAMO,wBAAwB,GAAGV,IAAI;AACrC,MAAMW,iBAAiB,GAAGX,IAAI;AAC9B,MAAMY,wBAAwB,GAAGZ,IAAI;AACrC,MAAMa,uBAAuB,GAAGb,IAAI;AACpC,MAAMc,mBAAmB,GAAGd,IAAI;AAChC,MAAMe,sBAAsB,GAAGf,IAAI;AACnC,MAAMgB,mBAAmB,GAAGhB,IAAI;AAChC,MAAMiB,SAAS,GAAGzB,uBAAuB;AACzC,MAAM0B,UAAU,GAAG1B,uBAAuB;AAC1C,MAAM2B,UAAU,GAAG3B,uBAAuB;AAC1C,MAAM4B,gBAAgB,GAAG5B,uBAAuB;AAEhD,eAAe;EACbD,kBAAkB;EAClBC,uBAAuB;EACvBC,gBAAgB;EAChBC,wBAAwB;EACxBC,UAAU;EACVC,QAAQ;EACRC,MAAM;EACNC,SAAS;EACTC,mBAAmB;EACnBW,wBAAwB;EACxBC,iBAAiB;EACjBC,wBAAwB;EACxBC,uBAAuB;EACvBC,mBAAmB;EACnBC,sBAAsB;EACtBC,mBAAmB;EACnBC,SAAS;EACTC,UAAU;EACVC,UAAU;EACVC,gBAAgB;EAChBhB,iBAAiB;EACjBC,oBAAoB;EACpBC,oBAAoB;EACpBC,kBAAkB;EAClBC,oBAAoB;EACpBC,eAAe;EACf;EACAP,UAAU;EACVD;AACF,CAAC","ignoreList":[]}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ // eslint-disable-next-line @typescript-eslint/no-extraneous-class
4
+ export class MountRegistry {
5
+ static mountListeners = new Set();
6
+ static unmountListeners = new Set();
7
+ static addMountListener(listener) {
8
+ this.mountListeners.add(listener);
9
+ return () => {
10
+ this.mountListeners.delete(listener);
11
+ };
12
+ }
13
+ static addUnmountListener(listener) {
14
+ this.unmountListeners.add(listener);
15
+ return () => {
16
+ this.unmountListeners.delete(listener);
17
+ };
18
+ }
19
+ static gestureHandlerWillMount(handler) {
20
+ this.mountListeners.forEach(listener => listener(handler));
21
+ }
22
+ static gestureHandlerWillUnmount(handler) {
23
+ this.unmountListeners.forEach(listener => listener(handler));
24
+ }
25
+ static gestureWillMount(gesture) {
26
+ this.mountListeners.forEach(listener => listener(gesture));
27
+ }
28
+ static gestureWillUnmount(gesture) {
29
+ this.unmountListeners.forEach(listener => listener(gesture));
30
+ }
31
+ }
32
+ //# sourceMappingURL=mountRegistry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["MountRegistry","mountListeners","Set","unmountListeners","addMountListener","listener","add","delete","addUnmountListener","gestureHandlerWillMount","handler","forEach","gestureHandlerWillUnmount","gestureWillMount","gesture","gestureWillUnmount"],"sourceRoot":"../../src","sources":["mountRegistry.ts"],"mappings":";;AAUA;AACA,OAAO,MAAMA,aAAa,CAAC;EACzB,OAAeC,cAAc,GAAG,IAAIC,GAAG,CAAuB,CAAC;EAC/D,OAAeC,gBAAgB,GAAG,IAAID,GAAG,CAAuB,CAAC;EAEjE,OAAOE,gBAAgBA,CAACC,QAA8B,EAAc;IAClE,IAAI,CAACJ,cAAc,CAACK,GAAG,CAACD,QAAQ,CAAC;IAEjC,OAAO,MAAM;MACX,IAAI,CAACJ,cAAc,CAACM,MAAM,CAACF,QAAQ,CAAC;IACtC,CAAC;EACH;EAEA,OAAOG,kBAAkBA,CAACH,QAA8B,EAAc;IACpE,IAAI,CAACF,gBAAgB,CAACG,GAAG,CAACD,QAAQ,CAAC;IAEnC,OAAO,MAAM;MACX,IAAI,CAACF,gBAAgB,CAACI,MAAM,CAACF,QAAQ,CAAC;IACxC,CAAC;EACH;EAEA,OAAOI,uBAAuBA,CAACC,OAAwB,EAAE;IACvD,IAAI,CAACT,cAAc,CAACU,OAAO,CAAEN,QAAQ,IACnCA,QAAQ,CAACK,OAAuC,CAClD,CAAC;EACH;EAEA,OAAOE,yBAAyBA,CAACF,OAAwB,EAAE;IACzD,IAAI,CAACP,gBAAgB,CAACQ,OAAO,CAAEN,QAAQ,IACrCA,QAAQ,CAACK,OAAuC,CAClD,CAAC;EACH;EAEA,OAAOG,gBAAgBA,CAACC,OAAoB,EAAE;IAC5C,IAAI,CAACb,cAAc,CAACU,OAAO,CAAEN,QAAQ,IAAKA,QAAQ,CAACS,OAAO,CAAC,CAAC;EAC9D;EAEA,OAAOC,kBAAkBA,CAACD,OAAoB,EAAE;IAC9C,IAAI,CAACX,gBAAgB,CAACQ,OAAO,CAAEN,QAAQ,IAAKA,QAAQ,CAACS,OAAO,CAAC,CAAC;EAChE;AACF","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ import { TurboModuleRegistry } from 'react-native';
4
+ export default TurboModuleRegistry.getEnforcing('RNGestureHandlerModule');
5
+ //# sourceMappingURL=NativeRNGestureHandlerModule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../../src","sources":["specs/NativeRNGestureHandlerModule.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAAqB,cAAc;AAyB/D,eAAeA,mBAAmB,CAACC,YAAY,CAAO,wBAAwB,CAAC","ignoreList":[]}
@@ -1,3 +1,5 @@
1
+ "use strict";
2
+
1
3
  // @ts-ignore
2
4
  import register from 'react-native/Libraries/Utilities/registerGeneratedViewConfig';
3
5
  const RNGestureHandlerButton = 'RNGestureHandlerButton';
@@ -1 +1 @@
1
- {"version":3,"names":["register","RNGestureHandlerButton","uiViewClassName","validAttributes","exclusive","enabled"],"sources":["RNGestureHandlerButtonNativeComponent.kepler.ts"],"sourcesContent":["import type { ViewProps } from 'react-native';\n// @ts-ignore\nimport register from 'react-native/Libraries/Utilities/registerGeneratedViewConfig';\nimport {\n // @ts-ignore types not correct?\n HostComponent,\n // @ts-ignore\n} from 'react-native/Libraries/Types/CodegenTypes';\n\ninterface NativeProps extends ViewProps {\n exclusive?: boolean;\n enabled?: boolean;\n}\n\nconst RNGestureHandlerButton = 'RNGestureHandlerButton';\n\nregister(RNGestureHandlerButton, {\n uiViewClassName: RNGestureHandlerButton,\n validAttributes: {\n exclusive: true,\n enabled: true,\n }\n});\n\nexport default (RNGestureHandlerButton as unknown) as HostComponent<\n NativeProps\n>;\n"],"mappings":"AACA;AACA,OAAOA,QAAQ,MAAM,8DAA8D;AAYnF,MAAMC,sBAAsB,GAAG,wBAAwB;AAEvDD,QAAQ,CAACC,sBAAsB,EAAE;EAC/BC,eAAe,EAAED,sBAAsB;EACvCE,eAAe,EAAE;IACfC,SAAS,EAAE,IAAI;IACfC,OAAO,EAAE;EACX;AACF,CAAC,CAAC;AAEF,eAAgBJ,sBAAsB","ignoreList":[]}
1
+ {"version":3,"names":["register","RNGestureHandlerButton","uiViewClassName","validAttributes","exclusive","enabled"],"sourceRoot":"../../../src","sources":["specs/RNGestureHandlerButtonNativeComponent.kepler.ts"],"mappings":";;AACA;AACA,OAAOA,QAAQ,MAAM,8DAA8D;AAYnF,MAAMC,sBAAsB,GAAG,wBAAwB;AAEvDD,QAAQ,CAACC,sBAAsB,EAAE;EAC/BC,eAAe,EAAED,sBAAsB;EACvCE,eAAe,EAAE;IACfC,SAAS,EAAE,IAAI;IACfC,OAAO,EAAE;EACX;AACF,CAAC,CAAC;AAEF,eAAgBJ,sBAAsB","ignoreList":[]}
@@ -0,0 +1,24 @@
1
+ // @ts-ignore
2
+ import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
3
+ import type {
4
+ Int32,
5
+ WithDefault,
6
+ Float,
7
+ // @ts-ignore
8
+ } from 'react-native/Libraries/Types/CodegenTypes';
9
+ import type { ViewProps, ColorValue } from 'react-native';
10
+
11
+ interface NativeProps extends ViewProps {
12
+ exclusive?: WithDefault<boolean, true>;
13
+ foreground?: boolean;
14
+ borderless?: boolean;
15
+ enabled?: WithDefault<boolean, true>;
16
+ rippleColor?: ColorValue;
17
+ rippleRadius?: Int32;
18
+ touchSoundDisabled?: WithDefault<boolean, false>;
19
+ borderWidth?: Float;
20
+ borderColor?: ColorValue;
21
+ borderStyle?: WithDefault<string, 'solid'>;
22
+ }
23
+
24
+ export default codegenNativeComponent<NativeProps>('RNGestureHandlerButton');
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ // @ts-ignore
4
+ import register from 'react-native/Libraries/Utilities/registerGeneratedViewConfig';
5
+ const RNGestureHandlerRootView = 'RNGestureHandlerRootView';
6
+ register(RNGestureHandlerRootView, {
7
+ uiViewClassName: RNGestureHandlerRootView,
8
+ validAttributes: {}
9
+ });
10
+ export default RNGestureHandlerRootView;
11
+ //# sourceMappingURL=RNGestureHandlerRootViewNativeComponent.kepler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["register","RNGestureHandlerRootView","uiViewClassName","validAttributes"],"sourceRoot":"../../../src","sources":["specs/RNGestureHandlerRootViewNativeComponent.kepler.ts"],"mappings":";;AACA;AACA,OAAOA,QAAQ,MAAM,8DAA8D;AASnF,MAAMC,wBAAwB,GAAG,0BAA0B;AAE3DD,QAAQ,CAACC,wBAAwB,EAAE;EACjCC,eAAe,EAAED,wBAAwB;EACzCE,eAAe,EAAE,CAAC;AACpB,CAAC,CAAC;AAEF,eAAgBF,wBAAwB","ignoreList":[]}
@@ -0,0 +1,7 @@
1
+ // @ts-ignore
2
+ import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
3
+ import type { ViewProps } from 'react-native';
4
+
5
+ interface NativeProps extends ViewProps {}
6
+
7
+ export default codegenNativeComponent<NativeProps>('RNGestureHandlerRootView');
@@ -1,2 +1,2 @@
1
-
1
+ "use strict";
2
2
  //# sourceMappingURL=typeUtils.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["typeUtils.ts"],"sourcesContent":["export type ValueOf<T> = T[keyof T];\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["typeUtils.ts"],"mappings":"","ignoreList":[]}
@@ -1,9 +1,6 @@
1
- import pack from 'react-native/package.json';
2
- const [majorStr, minorStr] = pack.version.split('.');
3
- export const REACT_NATIVE_VERSION = {
4
- major: parseInt(majorStr, 10),
5
- minor: parseInt(minorStr, 10)
6
- };
1
+ "use strict";
2
+
3
+ import React from 'react';
7
4
  export function toArray(object) {
8
5
  if (!Array.isArray(object)) {
9
6
  return [object];
@@ -15,6 +12,9 @@ export function withPrevAndCurrent(array, mapFn) {
15
12
  const currentArr = [...array];
16
13
  const transformedArr = [];
17
14
  currentArr.forEach((current, i) => {
15
+ // This type cast is fine and solves problem mentioned in https://github.com/software-mansion/react-native-gesture-handler/pull/2867 (namely that `previous` can be undefined).
16
+ // Unfortunately, linter on our CI does not allow this type of casting as it is unnecessary. To bypass that we use eslint-disable.
17
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
18
18
  const previous = previousArr[i];
19
19
  const transformed = mapFn(previous, current);
20
20
  previousArr.push(transformed);
@@ -22,29 +22,60 @@ export function withPrevAndCurrent(array, mapFn) {
22
22
  });
23
23
  return transformedArr;
24
24
  }
25
-
26
- // eslint-disable-next-line @typescript-eslint/ban-types
27
25
  export function hasProperty(object, key) {
28
26
  return Object.prototype.hasOwnProperty.call(object, key);
29
27
  }
30
- export function isJestEnv() {
28
+ export function isTestEnv() {
31
29
  // @ts-ignore Do not use `@types/node` because it will prioritise Node types over RN types which breaks the types (ex. setTimeout) in React Native projects.
32
- return hasProperty(global, 'process') && !!process.env.JEST_WORKER_ID;
30
+ return hasProperty(global, 'process') && process.env.NODE_ENV === 'test';
33
31
  }
34
32
  export function tagMessage(msg) {
35
33
  return `[react-native-gesture-handler] ${msg}`;
36
34
  }
37
35
 
38
- // helper method to check whether Fabric is enabled, however global.nativeFabricUIManager
36
+ // Helper method to check whether Fabric is enabled, however global.nativeFabricUIManager
39
37
  // may not be initialized before the first render
40
38
  export function isFabric() {
41
- var _global;
42
39
  // @ts-expect-error nativeFabricUIManager is not yet included in the RN types
43
- return !!((_global = global) !== null && _global !== void 0 && _global.nativeFabricUIManager);
40
+ return !!global?.nativeFabricUIManager;
41
+ }
42
+ export function isReact19() {
43
+ return React.version.startsWith('19.');
44
44
  }
45
45
  export function isRemoteDebuggingEnabled() {
46
46
  // react-native-reanimated checks if in remote debugging in the same way
47
47
  // @ts-ignore global is available but node types are not included
48
- return !global.nativeCallSyncHook || global.__REMOTEDEV__;
48
+ const localGlobal = global;
49
+ return (!localGlobal.nativeCallSyncHook || !!localGlobal.__REMOTEDEV__) && !localGlobal.RN$Bridgeless;
50
+ }
51
+
52
+ /**
53
+ * Recursively compares two objects for deep equality.
54
+ *
55
+ * **Note:** This function does not support cyclic references.
56
+ *
57
+ * @param obj1 - The first object to compare.
58
+ * @param obj2 - The second object to compare.
59
+ * @returns `true` if the objects are deeply equal, `false` otherwise.
60
+ */
61
+ export function deepEqual(obj1, obj2) {
62
+ if (obj1 === obj2) {
63
+ return true;
64
+ }
65
+ if (typeof obj1 !== 'object' || typeof obj2 !== 'object' || obj1 === null || obj2 === null) {
66
+ return false;
67
+ }
68
+ const keys1 = Object.keys(obj1);
69
+ const keys2 = Object.keys(obj2);
70
+ if (keys1.length !== keys2.length) {
71
+ return false;
72
+ }
73
+ for (const key of keys1) {
74
+ if (!keys2.includes(key) || !deepEqual(obj1[key], obj2[key])) {
75
+ return false;
76
+ }
77
+ }
78
+ return true;
49
79
  }
80
+ export const INT32_MAX = 2 ** 31 - 1;
50
81
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["pack","majorStr","minorStr","version","split","REACT_NATIVE_VERSION","major","parseInt","minor","toArray","object","Array","isArray","withPrevAndCurrent","array","mapFn","previousArr","currentArr","transformedArr","forEach","current","i","previous","transformed","push","hasProperty","key","Object","prototype","hasOwnProperty","call","isJestEnv","global","process","env","JEST_WORKER_ID","tagMessage","msg","isFabric","_global","nativeFabricUIManager","isRemoteDebuggingEnabled","nativeCallSyncHook","__REMOTEDEV__"],"sources":["utils.ts"],"sourcesContent":["import pack from 'react-native/package.json';\n\nconst [majorStr, minorStr] = pack.version.split('.');\nexport const REACT_NATIVE_VERSION = {\n major: parseInt(majorStr, 10),\n minor: parseInt(minorStr, 10),\n};\n\nexport function toArray<T>(object: T | T[]): T[] {\n if (!Array.isArray(object)) {\n return [object];\n }\n\n return object;\n}\n\nexport type withPrevAndCurrentMapFn<T, Transformed> = (\n previous: Transformed | null,\n current: T\n) => Transformed;\nexport function withPrevAndCurrent<T, Transformed>(\n array: T[],\n mapFn: withPrevAndCurrentMapFn<T, Transformed>\n): Transformed[] {\n const previousArr: (null | Transformed)[] = [null];\n const currentArr = [...array];\n const transformedArr: Transformed[] = [];\n currentArr.forEach((current, i) => {\n const previous = previousArr[i];\n const transformed = mapFn(previous, current);\n previousArr.push(transformed);\n transformedArr.push(transformed);\n });\n return transformedArr;\n}\n\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function hasProperty(object: object, key: string) {\n return Object.prototype.hasOwnProperty.call(object, key);\n}\n\nexport function isJestEnv(): boolean {\n // @ts-ignore Do not use `@types/node` because it will prioritise Node types over RN types which breaks the types (ex. setTimeout) in React Native projects.\n return hasProperty(global, 'process') && !!process.env.JEST_WORKER_ID;\n}\n\nexport function tagMessage(msg: string) {\n return `[react-native-gesture-handler] ${msg}`;\n}\n\n// helper method to check whether Fabric is enabled, however global.nativeFabricUIManager\n// may not be initialized before the first render\nexport function isFabric(): boolean {\n // @ts-expect-error nativeFabricUIManager is not yet included in the RN types\n return !!global?.nativeFabricUIManager;\n}\n\nexport function isRemoteDebuggingEnabled(): boolean {\n // react-native-reanimated checks if in remote debugging in the same way\n // @ts-ignore global is available but node types are not included\n return !(global as any).nativeCallSyncHook || (global as any).__REMOTEDEV__;\n}\n"],"mappings":"AAAA,OAAOA,IAAI,MAAM,2BAA2B;AAE5C,MAAM,CAACC,QAAQ,EAAEC,QAAQ,CAAC,GAAGF,IAAI,CAACG,OAAO,CAACC,KAAK,CAAC,GAAG,CAAC;AACpD,OAAO,MAAMC,oBAAoB,GAAG;EAClCC,KAAK,EAAEC,QAAQ,CAACN,QAAQ,EAAE,EAAE,CAAC;EAC7BO,KAAK,EAAED,QAAQ,CAACL,QAAQ,EAAE,EAAE;AAC9B,CAAC;AAED,OAAO,SAASO,OAAOA,CAAIC,MAAe,EAAO;EAC/C,IAAI,CAACC,KAAK,CAACC,OAAO,CAACF,MAAM,CAAC,EAAE;IAC1B,OAAO,CAACA,MAAM,CAAC;EACjB;EAEA,OAAOA,MAAM;AACf;AAMA,OAAO,SAASG,kBAAkBA,CAChCC,KAAU,EACVC,KAA8C,EAC/B;EACf,MAAMC,WAAmC,GAAG,CAAC,IAAI,CAAC;EAClD,MAAMC,UAAU,GAAG,CAAC,GAAGH,KAAK,CAAC;EAC7B,MAAMI,cAA6B,GAAG,EAAE;EACxCD,UAAU,CAACE,OAAO,CAAC,CAACC,OAAO,EAAEC,CAAC,KAAK;IACjC,MAAMC,QAAQ,GAAGN,WAAW,CAACK,CAAC,CAAC;IAC/B,MAAME,WAAW,GAAGR,KAAK,CAACO,QAAQ,EAAEF,OAAO,CAAC;IAC5CJ,WAAW,CAACQ,IAAI,CAACD,WAAW,CAAC;IAC7BL,cAAc,CAACM,IAAI,CAACD,WAAW,CAAC;EAClC,CAAC,CAAC;EACF,OAAOL,cAAc;AACvB;;AAEA;AACA,OAAO,SAASO,WAAWA,CAACf,MAAc,EAAEgB,GAAW,EAAE;EACvD,OAAOC,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACpB,MAAM,EAAEgB,GAAG,CAAC;AAC1D;AAEA,OAAO,SAASK,SAASA,CAAA,EAAY;EACnC;EACA,OAAON,WAAW,CAACO,MAAM,EAAE,SAAS,CAAC,IAAI,CAAC,CAACC,OAAO,CAACC,GAAG,CAACC,cAAc;AACvE;AAEA,OAAO,SAASC,UAAUA,CAACC,GAAW,EAAE;EACtC,OAAO,kCAAkCA,GAAG,EAAE;AAChD;;AAEA;AACA;AACA,OAAO,SAASC,QAAQA,CAAA,EAAY;EAAA,IAAAC,OAAA;EAClC;EACA,OAAO,CAAC,GAAAA,OAAA,GAACP,MAAM,cAAAO,OAAA,eAANA,OAAA,CAAQC,qBAAqB;AACxC;AAEA,OAAO,SAASC,wBAAwBA,CAAA,EAAY;EAClD;EACA;EACA,OAAO,CAAET,MAAM,CAASU,kBAAkB,IAAKV,MAAM,CAASW,aAAa;AAC7E","ignoreList":[]}
1
+ {"version":3,"names":["React","toArray","object","Array","isArray","withPrevAndCurrent","array","mapFn","previousArr","currentArr","transformedArr","forEach","current","i","previous","transformed","push","hasProperty","key","Object","prototype","hasOwnProperty","call","isTestEnv","global","process","env","NODE_ENV","tagMessage","msg","isFabric","nativeFabricUIManager","isReact19","version","startsWith","isRemoteDebuggingEnabled","localGlobal","nativeCallSyncHook","__REMOTEDEV__","RN$Bridgeless","deepEqual","obj1","obj2","keys1","keys","keys2","length","includes","INT32_MAX"],"sourceRoot":"../../src","sources":["utils.ts"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,OAAO,SAASC,OAAOA,CAAIC,MAAe,EAAO;EAC/C,IAAI,CAACC,KAAK,CAACC,OAAO,CAACF,MAAM,CAAC,EAAE;IAC1B,OAAO,CAACA,MAAM,CAAC;EACjB;EAEA,OAAOA,MAAM;AACf;AAMA,OAAO,SAASG,kBAAkBA,CAChCC,KAAU,EACVC,KAA8C,EAC/B;EACf,MAAMC,WAAmC,GAAG,CAAC,IAAI,CAAC;EAClD,MAAMC,UAAU,GAAG,CAAC,GAAGH,KAAK,CAAC;EAC7B,MAAMI,cAA6B,GAAG,EAAE;EACxCD,UAAU,CAACE,OAAO,CAAC,CAACC,OAAO,EAAEC,CAAC,KAAK;IACjC;IACA;IACA;IACA,MAAMC,QAAQ,GAAGN,WAAW,CAACK,CAAC,CAAuB;IACrD,MAAME,WAAW,GAAGR,KAAK,CAACO,QAAQ,EAAEF,OAAO,CAAC;IAC5CJ,WAAW,CAACQ,IAAI,CAACD,WAAW,CAAC;IAC7BL,cAAc,CAACM,IAAI,CAACD,WAAW,CAAC;EAClC,CAAC,CAAC;EACF,OAAOL,cAAc;AACvB;AAEA,OAAO,SAASO,WAAWA,CAACf,MAAc,EAAEgB,GAAW,EAAE;EACvD,OAAOC,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACpB,MAAM,EAAEgB,GAAG,CAAC;AAC1D;AAEA,OAAO,SAASK,SAASA,CAAA,EAAY;EACnC;EACA,OAAON,WAAW,CAACO,MAAM,EAAE,SAAS,CAAC,IAAIC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,MAAM;AAC1E;AAEA,OAAO,SAASC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;EAEA,OAAO,IAAI;AACb;AAEA,OAAO,MAAM8B,SAAS,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC","ignoreList":[]}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+
3
+ // Gesture Handlers
4
+ import PanGestureHandler from './handlers/PanGestureHandler';
5
+ import TapGestureHandler from './handlers/TapGestureHandler';
6
+ import LongPressGestureHandler from './handlers/LongPressGestureHandler';
7
+ import PinchGestureHandler from './handlers/PinchGestureHandler';
8
+ import RotationGestureHandler from './handlers/RotationGestureHandler';
9
+ import FlingGestureHandler from './handlers/FlingGestureHandler';
10
+ import NativeViewGestureHandler from './handlers/NativeViewGestureHandler';
11
+ import ManualGestureHandler from './handlers/ManualGestureHandler';
12
+ import HoverGestureHandler from './handlers/HoverGestureHandler';
13
+
14
+ // Hammer Handlers
15
+ import HammerNativeViewGestureHandler from '../web_hammer/NativeViewGestureHandler';
16
+ import HammerPanGestureHandler from '../web_hammer/PanGestureHandler';
17
+ import HammerTapGestureHandler from '../web_hammer/TapGestureHandler';
18
+ import HammerLongPressGestureHandler from '../web_hammer/LongPressGestureHandler';
19
+ import HammerPinchGestureHandler from '../web_hammer/PinchGestureHandler';
20
+ import HammerRotationGestureHandler from '../web_hammer/RotationGestureHandler';
21
+ import HammerFlingGestureHandler from '../web_hammer/FlingGestureHandler';
22
+ export const Gestures = {
23
+ NativeViewGestureHandler,
24
+ PanGestureHandler,
25
+ TapGestureHandler,
26
+ LongPressGestureHandler,
27
+ PinchGestureHandler,
28
+ RotationGestureHandler,
29
+ FlingGestureHandler,
30
+ ManualGestureHandler,
31
+ HoverGestureHandler
32
+ };
33
+ export const HammerGestures = {
34
+ NativeViewGestureHandler: HammerNativeViewGestureHandler,
35
+ PanGestureHandler: HammerPanGestureHandler,
36
+ TapGestureHandler: HammerTapGestureHandler,
37
+ LongPressGestureHandler: HammerLongPressGestureHandler,
38
+ PinchGestureHandler: HammerPinchGestureHandler,
39
+ RotationGestureHandler: HammerRotationGestureHandler,
40
+ FlingGestureHandler: HammerFlingGestureHandler
41
+ };
42
+ //# sourceMappingURL=Gestures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["PanGestureHandler","TapGestureHandler","LongPressGestureHandler","PinchGestureHandler","RotationGestureHandler","FlingGestureHandler","NativeViewGestureHandler","ManualGestureHandler","HoverGestureHandler","HammerNativeViewGestureHandler","HammerPanGestureHandler","HammerTapGestureHandler","HammerLongPressGestureHandler","HammerPinchGestureHandler","HammerRotationGestureHandler","HammerFlingGestureHandler","Gestures","HammerGestures"],"sourceRoot":"../../../src","sources":["web/Gestures.ts"],"mappings":";;AAAA;AACA,OAAOA,iBAAiB,MAAM,8BAA8B;AAC5D,OAAOC,iBAAiB,MAAM,8BAA8B;AAC5D,OAAOC,uBAAuB,MAAM,oCAAoC;AACxE,OAAOC,mBAAmB,MAAM,gCAAgC;AAChE,OAAOC,sBAAsB,MAAM,mCAAmC;AACtE,OAAOC,mBAAmB,MAAM,gCAAgC;AAChE,OAAOC,wBAAwB,MAAM,qCAAqC;AAC1E,OAAOC,oBAAoB,MAAM,iCAAiC;AAClE,OAAOC,mBAAmB,MAAM,gCAAgC;;AAEhE;AACA,OAAOC,8BAA8B,MAAM,wCAAwC;AACnF,OAAOC,uBAAuB,MAAM,iCAAiC;AACrE,OAAOC,uBAAuB,MAAM,iCAAiC;AACrE,OAAOC,6BAA6B,MAAM,uCAAuC;AACjF,OAAOC,yBAAyB,MAAM,mCAAmC;AACzE,OAAOC,4BAA4B,MAAM,sCAAsC;AAC/E,OAAOC,yBAAyB,MAAM,mCAAmC;AAEzE,OAAO,MAAMC,QAAQ,GAAG;EACtBV,wBAAwB;EACxBN,iBAAiB;EACjBC,iBAAiB;EACjBC,uBAAuB;EACvBC,mBAAmB;EACnBC,sBAAsB;EACtBC,mBAAmB;EACnBE,oBAAoB;EACpBC;AACF,CAAC;AAED,OAAO,MAAMS,cAAc,GAAG;EAC5BX,wBAAwB,EAAEG,8BAA8B;EACxDT,iBAAiB,EAAEU,uBAAuB;EAC1CT,iBAAiB,EAAEU,uBAAuB;EAC1CT,uBAAuB,EAAEU,6BAA6B;EACtDT,mBAAmB,EAAEU,yBAAyB;EAC9CT,sBAAsB,EAAEU,4BAA4B;EACpDT,mBAAmB,EAAEU;AACvB,CAAC","ignoreList":[]}
@@ -1,8 +1,5 @@
1
+ "use strict";
2
+
1
3
  export const DEFAULT_TOUCH_SLOP = 15;
2
- export const Direction = {
3
- RIGHT: 1,
4
- LEFT: 2,
5
- UP: 4,
6
- DOWN: 8
7
- };
4
+ export const MINIMAL_RECOGNIZABLE_MAGNITUDE = 0.1;
8
5
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["DEFAULT_TOUCH_SLOP","Direction","RIGHT","LEFT","UP","DOWN"],"sources":["constants.ts"],"sourcesContent":["export const DEFAULT_TOUCH_SLOP = 15;\n\nexport const Direction = {\n RIGHT: 1,\n LEFT: 2,\n UP: 4,\n DOWN: 8,\n};\n"],"mappings":"AAAA,OAAO,MAAMA,kBAAkB,GAAG,EAAE;AAEpC,OAAO,MAAMC,SAAS,GAAG;EACvBC,KAAK,EAAE,CAAC;EACRC,IAAI,EAAE,CAAC;EACPC,EAAE,EAAE,CAAC;EACLC,IAAI,EAAE;AACR,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["DEFAULT_TOUCH_SLOP","MINIMAL_RECOGNIZABLE_MAGNITUDE"],"sourceRoot":"../../../src","sources":["web/constants.ts"],"mappings":";;AAAA,OAAO,MAAMA,kBAAkB,GAAG,EAAE;AACpC,OAAO,MAAMC,8BAA8B,GAAG,GAAG","ignoreList":[]}
@@ -1,20 +1,16 @@
1
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
- function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
1
+ "use strict";
2
+
4
3
  import { EventTypes } from '../interfaces';
5
4
  export default class RotationGestureDetector {
5
+ currentTime = 0;
6
+ previousTime = 0;
7
+ previousAngle = 0;
8
+ _rotation = 0;
9
+ _anchorX = 0;
10
+ _anchorY = 0;
11
+ isInProgress = false;
12
+ keyPointers = [NaN, NaN];
6
13
  constructor(callbacks) {
7
- _defineProperty(this, "onRotationBegin", void 0);
8
- _defineProperty(this, "onRotation", void 0);
9
- _defineProperty(this, "onRotationEnd", void 0);
10
- _defineProperty(this, "currentTime", 0);
11
- _defineProperty(this, "previousTime", 0);
12
- _defineProperty(this, "previousAngle", 0);
13
- _defineProperty(this, "rotation", 0);
14
- _defineProperty(this, "anchorX", 0);
15
- _defineProperty(this, "anchorY", 0);
16
- _defineProperty(this, "isInProgress", false);
17
- _defineProperty(this, "keyPointers", [NaN, NaN]);
18
14
  this.onRotationBegin = callbacks.onRotationBegin;
19
15
  this.onRotation = callbacks.onRotation;
20
16
  this.onRotationEnd = callbacks.onRotationEnd;
@@ -23,28 +19,29 @@ export default class RotationGestureDetector {
23
19
  this.previousTime = this.currentTime;
24
20
  this.currentTime = event.time;
25
21
  const [firstPointerID, secondPointerID] = this.keyPointers;
26
- const firstPointerX = tracker.getLastX(firstPointerID);
27
- const firstPointerY = tracker.getLastY(firstPointerID);
28
- const secondPointerX = tracker.getLastX(secondPointerID);
29
- const secondPointerY = tracker.getLastY(secondPointerID);
30
- const vectorX = secondPointerX - firstPointerX;
31
- const vectorY = secondPointerY - firstPointerY;
32
- this.anchorX = (firstPointerX + secondPointerX) / 2;
33
- this.anchorY = (firstPointerY + secondPointerY) / 2;
22
+ const firstPointerCoords = tracker.getLastAbsoluteCoords(firstPointerID);
23
+ const secondPointerCoords = tracker.getLastAbsoluteCoords(secondPointerID);
24
+ if (!firstPointerCoords || !secondPointerCoords) {
25
+ return;
26
+ }
27
+ const vectorX = secondPointerCoords.x - firstPointerCoords.x;
28
+ const vectorY = secondPointerCoords.y - firstPointerCoords.y;
29
+ this._anchorX = (firstPointerCoords.x + secondPointerCoords.x) / 2;
30
+ this._anchorY = (firstPointerCoords.y + secondPointerCoords.y) / 2;
34
31
 
35
- //Angle diff should be positive when rotating in clockwise direction
32
+ // Angle diff should be positive when rotating in clockwise direction
36
33
  const angle = -Math.atan2(vectorY, vectorX);
37
- this.rotation = Number.isNaN(this.previousAngle) ? 0 : this.previousAngle - angle;
34
+ this._rotation = Number.isNaN(this.previousAngle) ? 0 : this.previousAngle - angle;
38
35
  this.previousAngle = angle;
39
36
  if (this.rotation > Math.PI) {
40
- this.rotation -= Math.PI;
37
+ this._rotation -= Math.PI;
41
38
  } else if (this.rotation < -Math.PI) {
42
- this.rotation += Math.PI;
39
+ this._rotation += Math.PI;
43
40
  }
44
41
  if (this.rotation > Math.PI / 2) {
45
- this.rotation -= Math.PI;
42
+ this._rotation -= Math.PI;
46
43
  } else if (this.rotation < -Math.PI / 2) {
47
- this.rotation += Math.PI;
44
+ this._rotation += Math.PI;
48
45
  }
49
46
  }
50
47
  finish() {
@@ -59,7 +56,7 @@ export default class RotationGestureDetector {
59
56
  if (this.keyPointers[0] && this.keyPointers[1]) {
60
57
  return;
61
58
  }
62
- const pointerIDs = tracker.getData().keys();
59
+ const pointerIDs = tracker.trackedPointers.keys();
63
60
  this.keyPointers[0] = pointerIDs.next().value;
64
61
  this.keyPointers[1] = pointerIDs.next().value;
65
62
  }
@@ -102,21 +99,21 @@ export default class RotationGestureDetector {
102
99
  }
103
100
  return true;
104
101
  }
105
- getTimeDelta() {
106
- return this.currentTime + this.previousTime;
102
+ reset() {
103
+ this.keyPointers = [NaN, NaN];
104
+ this.isInProgress = false;
107
105
  }
108
- getAnchorX() {
109
- return this.anchorX;
106
+ get anchorX() {
107
+ return this._anchorX;
110
108
  }
111
- getAnchorY() {
112
- return this.anchorY;
109
+ get anchorY() {
110
+ return this._anchorY;
113
111
  }
114
- getRotation() {
115
- return this.rotation;
112
+ get rotation() {
113
+ return this._rotation;
116
114
  }
117
- reset() {
118
- this.keyPointers = [NaN, NaN];
119
- this.isInProgress = false;
115
+ get timeDelta() {
116
+ return this.currentTime + this.previousTime;
120
117
  }
121
118
  }
122
119
  //# sourceMappingURL=RotationGestureDetector.js.map