@amazon-devices/react-native-gesture-handler 2.0.1758683737 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1298) 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/6340ec90c9b9f38941444b2ca176a58b9d8116a6cd975690f53747ed00595c90.bundle +14669 -0
  6. package/SystemBundles/6340ec90c9b9f38941444b2ca176a58b9d8116a6cd975690f53747ed00595c90.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 -5
  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 +145 -142
  236. package/lib/commonjs/handlers/createHandler.js.map +1 -1
  237. package/lib/commonjs/handlers/createNativeWrapper.js +36 -22
  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 +138 -134
  556. package/lib/module/handlers/createHandler.js.map +1 -1
  557. package/lib/module/handlers/createNativeWrapper.js +36 -18
  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 -2
  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 -1
  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/package.json +1 -1
  1092. package/react-native.config.js +27 -0
  1093. package/scripts/gesture_handler_utils.rb +25 -0
  1094. package/src/ActionType.ts +1 -1
  1095. package/src/Directions.ts +22 -5
  1096. package/src/EnableNewWebImplementation.ts +18 -0
  1097. package/src/PlatformConstants.kepler.ts +5 -0
  1098. package/src/PointerType.ts +7 -0
  1099. package/src/RNGestureHandlerModule.kepler.ts +3 -3
  1100. package/src/RNGestureHandlerModule.ts +4 -49
  1101. package/src/RNGestureHandlerModule.web.ts +29 -51
  1102. package/src/RNGestureHandlerModule.windows.ts +18 -100
  1103. package/src/State.ts +1 -1
  1104. package/src/TouchEventType.ts +2 -1
  1105. package/src/components/DrawerLayout.tsx +58 -13
  1106. package/src/components/GestureButtons.tsx +61 -123
  1107. package/src/components/GestureButtonsProps.ts +156 -0
  1108. package/src/components/GestureComponents.tsx +11 -11
  1109. package/src/components/GestureComponents.web.tsx +1 -1
  1110. package/src/components/GestureHandlerButton.tsx +1 -1
  1111. package/src/components/GestureHandlerButton.web.tsx +3 -3
  1112. package/src/components/GestureHandlerRootView.android.tsx +15 -7
  1113. package/src/components/GestureHandlerRootView.kepler.tsx +3 -2
  1114. package/src/components/GestureHandlerRootView.tsx +12 -7
  1115. package/src/components/GestureHandlerRootView.web.tsx +11 -6
  1116. package/src/components/Pressable/Pressable.tsx +401 -0
  1117. package/src/components/Pressable/PressableProps.tsx +174 -0
  1118. package/src/components/Pressable/StateMachine.tsx +57 -0
  1119. package/src/components/Pressable/index.ts +5 -0
  1120. package/src/components/Pressable/stateDefinitions.ts +126 -0
  1121. package/src/components/Pressable/utils.ts +140 -0
  1122. package/src/components/ReanimatedDrawerLayout.tsx +754 -0
  1123. package/src/components/ReanimatedSwipeable/ReanimatedSwipeable.tsx +607 -0
  1124. package/src/components/ReanimatedSwipeable/ReanimatedSwipeableProps.ts +199 -0
  1125. package/src/components/ReanimatedSwipeable/index.ts +6 -0
  1126. package/src/components/Swipeable.tsx +59 -15
  1127. package/src/components/Text.tsx +77 -0
  1128. package/src/components/gestureHandlerRootHOC.tsx +7 -6
  1129. package/src/components/touchables/ExtraButtonProps.ts +7 -0
  1130. package/src/components/touchables/GenericTouchable.tsx +15 -41
  1131. package/src/components/touchables/GenericTouchableProps.ts +28 -0
  1132. package/src/components/touchables/TouchableHighlight.tsx +7 -4
  1133. package/src/components/touchables/TouchableNativeFeedback.android.tsx +10 -18
  1134. package/src/components/touchables/TouchableNativeFeedback.tsx +6 -1
  1135. package/src/components/touchables/TouchableNativeFeedbackProps.tsx +10 -0
  1136. package/src/components/touchables/TouchableOpacity.tsx +8 -5
  1137. package/src/components/touchables/TouchableWithoutFeedback.tsx +31 -6
  1138. package/src/components/utils.ts +26 -0
  1139. package/src/findNodeHandle.ts +3 -0
  1140. package/src/findNodeHandle.web.ts +41 -0
  1141. package/src/getShadowNodeFromRef.ts +35 -7
  1142. package/src/ghQueueMicrotask.ts +8 -0
  1143. package/src/handlers/FlingGestureHandler.ts +11 -6
  1144. package/src/handlers/ForceTouchGestureHandler.ts +10 -12
  1145. package/src/handlers/GestureHandlerEventPayload.ts +229 -0
  1146. package/src/handlers/LongPressGestureHandler.ts +17 -40
  1147. package/src/handlers/NativeViewGestureHandler.ts +11 -7
  1148. package/src/handlers/PanGestureHandler.ts +19 -62
  1149. package/src/handlers/PinchGestureHandler.ts +11 -27
  1150. package/src/handlers/RotationGestureHandler.ts +11 -27
  1151. package/src/handlers/TapGestureHandler.ts +11 -6
  1152. package/src/handlers/createHandler.tsx +97 -58
  1153. package/src/handlers/createNativeWrapper.tsx +18 -9
  1154. package/src/handlers/customDirectEventTypes.ts +2 -0
  1155. package/src/handlers/customDirectEventTypes.web.ts +5 -0
  1156. package/src/handlers/gestureHandlerCommon.ts +50 -83
  1157. package/src/handlers/gestureHandlerTypesCompat.ts +25 -30
  1158. package/src/handlers/gestures/GestureDetector/Wrap.tsx +35 -0
  1159. package/src/handlers/gestures/GestureDetector/Wrap.web.tsx +42 -0
  1160. package/src/handlers/gestures/GestureDetector/attachHandlers.ts +112 -0
  1161. package/src/handlers/gestures/GestureDetector/dropHandlers.ts +17 -0
  1162. package/src/handlers/gestures/GestureDetector/index.tsx +191 -0
  1163. package/src/handlers/gestures/GestureDetector/needsToReattach.ts +27 -0
  1164. package/src/handlers/gestures/GestureDetector/types.ts +32 -0
  1165. package/src/handlers/gestures/GestureDetector/updateHandlers.ts +92 -0
  1166. package/src/handlers/gestures/GestureDetector/useAnimatedGesture.ts +209 -0
  1167. package/src/handlers/gestures/GestureDetector/useDetectorUpdater.ts +69 -0
  1168. package/src/handlers/gestures/GestureDetector/useMountReactions.ts +51 -0
  1169. package/src/handlers/gestures/GestureDetector/useViewRefHandler.ts +58 -0
  1170. package/src/handlers/gestures/GestureDetector/utils.ts +181 -0
  1171. package/src/handlers/gestures/eventReceiver.ts +6 -5
  1172. package/src/handlers/gestures/flingGesture.ts +13 -4
  1173. package/src/handlers/gestures/forceTouchGesture.ts +25 -4
  1174. package/src/handlers/gestures/gesture.ts +151 -20
  1175. package/src/handlers/gestures/gestureComposition.ts +5 -3
  1176. package/src/handlers/gestures/gestureObjects.ts +59 -0
  1177. package/src/handlers/gestures/gestureStateManager.ts +55 -41
  1178. package/src/handlers/gestures/gestureStateManager.web.ts +3 -1
  1179. package/src/handlers/gestures/hoverGesture.ts +2 -8
  1180. package/src/handlers/gestures/longPressGesture.ts +21 -4
  1181. package/src/handlers/gestures/nativeGesture.ts +10 -4
  1182. package/src/handlers/gestures/panGesture.ts +77 -8
  1183. package/src/handlers/gestures/pinchGesture.ts +1 -1
  1184. package/src/handlers/gestures/reanimatedWrapper.ts +18 -17
  1185. package/src/handlers/gestures/rotationGesture.ts +1 -1
  1186. package/src/handlers/gestures/tapGesture.ts +37 -4
  1187. package/src/handlers/getNextHandlerTag.ts +5 -0
  1188. package/src/handlers/handlersRegistry.ts +7 -9
  1189. package/src/handlers/utils.ts +76 -0
  1190. package/src/index.ts +31 -36
  1191. package/src/init.ts +1 -1
  1192. package/src/jestUtils/jestUtils.ts +30 -22
  1193. package/src/mocks/Pressable.tsx +1 -0
  1194. package/src/mocks/mocks.tsx +70 -0
  1195. package/src/mountRegistry.ts +51 -0
  1196. package/src/specs/NativeRNGestureHandlerModule.ts +26 -0
  1197. package/src/specs/RNGestureHandlerButtonNativeComponent.ts +4 -0
  1198. package/src/specs/RNGestureHandlerRootViewNativeComponent.kepler.ts +21 -0
  1199. package/src/utils.ts +58 -13
  1200. package/src/web/Gestures.ts +41 -0
  1201. package/src/web/constants.ts +1 -7
  1202. package/src/web/detectors/RotationGestureDetector.ts +31 -29
  1203. package/src/web/detectors/ScaleGestureDetector.ts +34 -35
  1204. package/src/web/handlers/FlingGestureHandler.ts +73 -38
  1205. package/src/web/handlers/GestureHandler.ts +224 -193
  1206. package/src/web/handlers/HoverGestureHandler.ts +16 -10
  1207. package/src/web/handlers/IGestureHandler.ts +49 -0
  1208. package/src/web/handlers/LongPressGestureHandler.ts +68 -18
  1209. package/src/web/handlers/ManualGestureHandler.ts +3 -9
  1210. package/src/web/handlers/NativeViewGestureHandler.ts +44 -36
  1211. package/src/web/handlers/PanGestureHandler.ts +123 -37
  1212. package/src/web/handlers/PinchGestureHandler.ts +20 -26
  1213. package/src/web/handlers/RotationGestureHandler.ts +15 -21
  1214. package/src/web/handlers/TapGestureHandler.ts +26 -25
  1215. package/src/web/interfaces.ts +46 -22
  1216. package/src/web/tools/CircularBuffer.ts +15 -15
  1217. package/src/web/tools/EventManager.ts +24 -20
  1218. package/src/web/tools/GestureHandlerDelegate.ts +7 -4
  1219. package/src/web/tools/GestureHandlerOrchestrator.ts +183 -189
  1220. package/src/web/tools/GestureHandlerWebDelegate.ts +139 -27
  1221. package/src/web/tools/InteractionManager.ts +62 -50
  1222. package/src/web/tools/KeyboardEventManager.ts +133 -0
  1223. package/src/web/tools/LeastSquareSolver.ts +18 -18
  1224. package/src/web/tools/NodeManager.ts +11 -6
  1225. package/src/web/tools/PointerEventManager.ts +177 -144
  1226. package/src/web/tools/PointerTracker.ts +94 -106
  1227. package/src/web/tools/Vector.ts +59 -0
  1228. package/src/web/tools/VelocityTracker.ts +7 -7
  1229. package/src/web/tools/WheelEventManager.ts +48 -0
  1230. package/src/web/utils.ts +289 -4
  1231. package/src/web_hammer/DiscreteGestureHandler.ts +1 -1
  1232. package/src/web_hammer/DraggingGestureHandler.ts +1 -1
  1233. package/src/web_hammer/FlingGestureHandler.ts +1 -1
  1234. package/src/web_hammer/GestureHandler.ts +5 -3
  1235. package/src/web_hammer/LongPressGestureHandler.ts +1 -1
  1236. package/src/web_hammer/NodeManager.ts +2 -11
  1237. package/src/web_hammer/PressGestureHandler.ts +7 -4
  1238. package/README.kepler.md +0 -167
  1239. package/SystemBundles/88ca607de4fbd504c736d8d5ce354ea9743ea4ae485d956b5af49e9af508e705.bundle +0 -67466
  1240. package/SystemBundles/88ca607de4fbd504c736d8d5ce354ea9743ea4ae485d956b5af49e9af508e705.map +0 -1
  1241. package/SystemModules/amzn__react-native-gesture-handler-2.modules.txt +0 -338
  1242. package/SystemModules/amzn__react-native-gesture-handler-2.private.modules.txt +0 -96
  1243. package/THIRD_PARTY_NOTICES.txt +0 -578
  1244. package/ios/Handlers/RNFlingHandler.m +0 -152
  1245. package/ios/Handlers/RNLongPressHandler.m +0 -183
  1246. package/ios/Handlers/RNPinchHandler.m +0 -95
  1247. package/ios/Handlers/RNRotationHandler.m +0 -93
  1248. package/ios/RNGestureHandlerButton.h +0 -19
  1249. package/ios/RNGestureHandlerButton.m +0 -77
  1250. package/ios/RNGestureHandlerButtonComponentView.mm +0 -62
  1251. package/ios/RNGestureHandlerDirection.h +0 -8
  1252. package/ios/RNGestureHandlerModule.h +0 -7
  1253. package/lib/commonjs/RNGestureHandlerModule.macos.js +0 -113
  1254. package/lib/commonjs/RNGestureHandlerModule.macos.js.map +0 -1
  1255. package/lib/commonjs/handlers/gestures/GestureDetector.js +0 -548
  1256. package/lib/commonjs/handlers/gestures/GestureDetector.js.map +0 -1
  1257. package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js +0 -11
  1258. package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js.map +0 -1
  1259. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js +0 -11
  1260. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js.map +0 -1
  1261. package/lib/commonjs/web/tools/TouchEventManager.js +0 -126
  1262. package/lib/commonjs/web/tools/TouchEventManager.js.map +0 -1
  1263. package/lib/module/RNGestureHandlerModule.macos.js +0 -104
  1264. package/lib/module/RNGestureHandlerModule.macos.js.map +0 -1
  1265. package/lib/module/handlers/gestures/GestureDetector.js +0 -538
  1266. package/lib/module/handlers/gestures/GestureDetector.js.map +0 -1
  1267. package/lib/module/specs/RNGestureHandlerButtonNativeComponent.js +0 -4
  1268. package/lib/module/specs/RNGestureHandlerButtonNativeComponent.js.map +0 -1
  1269. package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.js +0 -4
  1270. package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.js.map +0 -1
  1271. package/lib/module/web/tools/TouchEventManager.js +0 -118
  1272. package/lib/module/web/tools/TouchEventManager.js.map +0 -1
  1273. package/lib/typescript/RNGestureHandlerModule.macos.d.ts +0 -47
  1274. package/lib/typescript/handlers/gestures/GestureDetector.d.ts +0 -19
  1275. package/lib/typescript/web/tools/TouchEventManager.d.ts +0 -6
  1276. package/src/RNGestureHandlerModule.macos.ts +0 -133
  1277. package/src/handlers/gestures/GestureDetector.tsx +0 -818
  1278. package/src/web/tools/TouchEventManager.ts +0 -167
  1279. /package/android/{src/fabric → fabric/src/main}/java/com/swmansion/gesturehandler/RNGestureHandlerComponentsRegistry.java +0 -0
  1280. /package/android/{common → noreanimated}/src/main/java/com/swmansion/common/GestureHandlerStateManager.kt +0 -0
  1281. /package/{ios → apple}/Handlers/RNForceTouchHandler.h +0 -0
  1282. /package/{ios → apple}/Handlers/RNHoverHandler.h +0 -0
  1283. /package/{ios → apple}/Handlers/RNLongPressHandler.h +0 -0
  1284. /package/{ios → apple}/Handlers/RNManualHandler.h +0 -0
  1285. /package/{ios → apple}/Handlers/RNNativeViewHandler.h +0 -0
  1286. /package/{ios → apple}/Handlers/RNPanHandler.h +0 -0
  1287. /package/{ios → apple}/Handlers/RNPinchHandler.h +0 -0
  1288. /package/{ios → apple}/Handlers/RNRotationHandler.h +0 -0
  1289. /package/{ios → apple}/Handlers/RNTapHandler.h +0 -0
  1290. /package/{ios → apple}/RNGHTouchEventType.h +0 -0
  1291. /package/{ios → apple}/RNGestureHandler.xcodeproj/project.pbxproj +0 -0
  1292. /package/{ios → apple}/RNGestureHandler.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -0
  1293. /package/{ios → apple}/RNGestureHandlerActionType.h +0 -0
  1294. /package/{ios → apple}/RNGestureHandlerButtonManager.h +0 -0
  1295. /package/{ios → apple}/RNGestureHandlerRootViewComponentView.mm +0 -0
  1296. /package/{ios → apple}/RNGestureHandlerState.h +0 -0
  1297. /package/{ios → apple}/RNGestureHandlerStateManager.h +0 -0
  1298. /package/{ios → apple}/RNRootViewGestureRecognizer.h +0 -0
@@ -1,538 +0,0 @@
1
- var _Reanimated$default$c, _Reanimated$default;
2
- import React, { useContext, useEffect, useRef, useState } from 'react';
3
- import { BaseGesture, CALLBACK_TYPE } from './gesture';
4
- import { Reanimated } from './reanimatedWrapper';
5
- import { registerHandler, unregisterHandler } from '../handlersRegistry';
6
- import RNGestureHandlerModule from '../../RNGestureHandlerModule';
7
- import { baseGestureHandlerWithMonitorProps, filterConfig, findNodeHandle, scheduleFlushOperations } from '../gestureHandlerCommon';
8
- import { GestureStateManager } from './gestureStateManager';
9
- import { flingGestureHandlerProps } from '../FlingGestureHandler';
10
- import { forceTouchGestureHandlerProps } from '../ForceTouchGestureHandler';
11
- import { longPressGestureHandlerProps } from '../LongPressGestureHandler';
12
- import { panGestureHandlerProps, panGestureHandlerCustomNativeProps } from '../PanGestureHandler';
13
- import { tapGestureHandlerProps } from '../TapGestureHandler';
14
- import { hoverGestureHandlerProps } from './hoverGesture';
15
- import { State } from '../../State';
16
- import { TouchEventType } from '../../TouchEventType';
17
- import { ActionType } from '../../ActionType';
18
- import { isFabric, isJestEnv, REACT_NATIVE_VERSION, tagMessage } from '../../utils';
19
- import { getShadowNodeFromRef } from '../../getShadowNodeFromRef';
20
- import { Platform } from 'react-native';
21
- import { onGestureHandlerEvent } from './eventReceiver';
22
- import { RNRenderer } from '../../RNRenderer';
23
- import { isNewWebImplementationEnabled } from '../../EnableNewWebImplementation';
24
- import { nativeViewGestureHandlerProps } from '../NativeViewGestureHandler';
25
- import GestureHandlerRootViewContext from '../../GestureHandlerRootViewContext';
26
- const ALLOWED_PROPS = [...baseGestureHandlerWithMonitorProps, ...tapGestureHandlerProps, ...panGestureHandlerProps, ...panGestureHandlerCustomNativeProps, ...longPressGestureHandlerProps, ...forceTouchGestureHandlerProps, ...flingGestureHandlerProps, ...hoverGestureHandlerProps, ...nativeViewGestureHandlerProps];
27
- function convertToHandlerTag(ref) {
28
- if (typeof ref === 'number') {
29
- return ref;
30
- } else if (ref instanceof BaseGesture) {
31
- return ref.handlerTag;
32
- } else {
33
- var _ref$current$handlerT, _ref$current;
34
- // @ts-ignore in this case it should be a ref either to gesture object or
35
- // a gesture handler component, in both cases handlerTag property exists
36
- return (_ref$current$handlerT = (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.handlerTag) !== null && _ref$current$handlerT !== void 0 ? _ref$current$handlerT : -1;
37
- }
38
- }
39
- function extractValidHandlerTags(interactionGroup) {
40
- var _interactionGroup$map, _interactionGroup$map2;
41
- return (_interactionGroup$map = interactionGroup === null || interactionGroup === void 0 || (_interactionGroup$map2 = interactionGroup.map(convertToHandlerTag)) === null || _interactionGroup$map2 === void 0 ? void 0 : _interactionGroup$map2.filter(tag => tag > 0)) !== null && _interactionGroup$map !== void 0 ? _interactionGroup$map : [];
42
- }
43
- function dropHandlers(preparedGesture) {
44
- for (const handler of preparedGesture.config) {
45
- RNGestureHandlerModule.dropGestureHandler(handler.handlerTag);
46
- unregisterHandler(handler.handlerTag, handler.config.testId);
47
- }
48
- scheduleFlushOperations();
49
- }
50
- function checkGestureCallbacksForWorklets(gesture) {
51
- // if a gesture is explicitly marked to run on the JS thread there is no need to check
52
- // if callbacks are worklets as the user is aware they will be ran on the JS thread
53
- if (gesture.config.runOnJS) {
54
- return;
55
- }
56
- const areSomeNotWorklets = gesture.handlers.isWorklet.includes(false);
57
- const areSomeWorklets = gesture.handlers.isWorklet.includes(true);
58
-
59
- // if some of the callbacks are worklets and some are not, and the gesture is not
60
- // explicitly marked with `.runOnJS(true)` show an error
61
- if (areSomeNotWorklets && areSomeWorklets) {
62
- console.error(tagMessage(`Some of the callbacks in the gesture are worklets and some are not. Either make sure that all calbacks are marked as 'worklet' if you wish to run them on the UI thread or use '.runOnJS(true)' modifier on the gesture explicitly to run all callbacks on the JS thread.`));
63
- }
64
- }
65
- function attachHandlers({
66
- preparedGesture,
67
- gestureConfig,
68
- gesture,
69
- viewTag,
70
- webEventHandlersRef,
71
- mountedRef
72
- }) {
73
- if (!preparedGesture.firstExecution) {
74
- gestureConfig.initialize();
75
- } else {
76
- preparedGesture.firstExecution = false;
77
- }
78
-
79
- // use queueMicrotask to extract handlerTags, because all refs should be initialized
80
- // when it's ran
81
- queueMicrotask(() => {
82
- if (!mountedRef.current) {
83
- return;
84
- }
85
- gestureConfig.prepare();
86
- });
87
- for (const handler of gesture) {
88
- checkGestureCallbacksForWorklets(handler);
89
- RNGestureHandlerModule.createGestureHandler(handler.handlerName, handler.handlerTag, filterConfig(handler.config, ALLOWED_PROPS));
90
- registerHandler(handler.handlerTag, handler, handler.config.testId);
91
- }
92
-
93
- // use queueMicrotask to extract handlerTags, because all refs should be initialized
94
- // when it's ran
95
- queueMicrotask(() => {
96
- if (!mountedRef.current) {
97
- return;
98
- }
99
- for (const handler of gesture) {
100
- let requireToFail = [];
101
- if (handler.config.requireToFail) {
102
- requireToFail = extractValidHandlerTags(handler.config.requireToFail);
103
- }
104
- let simultaneousWith = [];
105
- if (handler.config.simultaneousWith) {
106
- simultaneousWith = extractValidHandlerTags(handler.config.simultaneousWith);
107
- }
108
- RNGestureHandlerModule.updateGestureHandler(handler.handlerTag, filterConfig(handler.config, ALLOWED_PROPS, {
109
- simultaneousHandlers: simultaneousWith,
110
- waitFor: requireToFail
111
- }));
112
- }
113
- scheduleFlushOperations();
114
- });
115
- preparedGesture.config = gesture;
116
- for (const gesture of preparedGesture.config) {
117
- const actionType = gesture.shouldUseReanimated ? ActionType.REANIMATED_WORKLET : ActionType.JS_FUNCTION_NEW_API;
118
- if (Platform.OS === 'web') {
119
- RNGestureHandlerModule.attachGestureHandler(gesture.handlerTag, viewTag, ActionType.JS_FUNCTION_OLD_API,
120
- // ignored on web
121
- webEventHandlersRef);
122
- } else {
123
- RNGestureHandlerModule.attachGestureHandler(gesture.handlerTag, viewTag, actionType);
124
- }
125
- }
126
- if (preparedGesture.animatedHandlers) {
127
- const isAnimatedGesture = g => g.shouldUseReanimated;
128
- preparedGesture.animatedHandlers.value = gesture.filter(isAnimatedGesture).map(g => g.handlers);
129
- }
130
- }
131
- function updateHandlers(preparedGesture, gestureConfig, gesture, mountedRef) {
132
- gestureConfig.prepare();
133
- for (let i = 0; i < gesture.length; i++) {
134
- const handler = preparedGesture.config[i];
135
- checkGestureCallbacksForWorklets(handler);
136
-
137
- // only update handlerTag when it's actually different, it may be the same
138
- // if gesture config object is wrapped with useMemo
139
- if (gesture[i].handlerTag !== handler.handlerTag) {
140
- gesture[i].handlerTag = handler.handlerTag;
141
- gesture[i].handlers.handlerTag = handler.handlerTag;
142
- }
143
- }
144
-
145
- // use queueMicrotask to extract handlerTags, because when it's ran, all refs should be updated
146
- // and handlerTags in BaseGesture references should be updated in the loop above (we need to wait
147
- // in case of external relations)
148
- queueMicrotask(() => {
149
- if (!mountedRef.current) {
150
- return;
151
- }
152
- for (let i = 0; i < gesture.length; i++) {
153
- const handler = preparedGesture.config[i];
154
- handler.config = gesture[i].config;
155
- handler.handlers = gesture[i].handlers;
156
- const requireToFail = extractValidHandlerTags(handler.config.requireToFail);
157
- const simultaneousWith = extractValidHandlerTags(handler.config.simultaneousWith);
158
- RNGestureHandlerModule.updateGestureHandler(handler.handlerTag, filterConfig(handler.config, ALLOWED_PROPS, {
159
- simultaneousHandlers: simultaneousWith,
160
- waitFor: requireToFail
161
- }));
162
- registerHandler(handler.handlerTag, handler, handler.config.testId);
163
- }
164
- if (preparedGesture.animatedHandlers) {
165
- var _preparedGesture$anim;
166
- const previousHandlersValue = (_preparedGesture$anim = preparedGesture.animatedHandlers.value) !== null && _preparedGesture$anim !== void 0 ? _preparedGesture$anim : [];
167
- const newHandlersValue = preparedGesture.config.filter(g => g.shouldUseReanimated) // ignore gestures that shouldn't run on UI
168
- .map(g => g.handlers);
169
-
170
- // if amount of gesture configs changes, we need to update the callbacks in shared value
171
- let shouldUpdateSharedValue = previousHandlersValue.length !== newHandlersValue.length;
172
- if (!shouldUpdateSharedValue) {
173
- // if the amount is the same, we need to check if any of the configs inside has changed
174
- for (let i = 0; i < newHandlersValue.length; i++) {
175
- if (
176
- // we can use the `gestureId` prop as it's unique for every config instance
177
- newHandlersValue[i].gestureId !== previousHandlersValue[i].gestureId) {
178
- shouldUpdateSharedValue = true;
179
- break;
180
- }
181
- }
182
- }
183
- if (shouldUpdateSharedValue) {
184
- preparedGesture.animatedHandlers.value = newHandlersValue;
185
- }
186
- }
187
- scheduleFlushOperations();
188
- });
189
- }
190
- function needsToReattach(preparedGesture, gesture) {
191
- if (gesture.length !== preparedGesture.config.length) {
192
- return true;
193
- }
194
- for (let i = 0; i < gesture.length; i++) {
195
- if (gesture[i].handlerName !== preparedGesture.config[i].handlerName || gesture[i].shouldUseReanimated !== preparedGesture.config[i].shouldUseReanimated) {
196
- return true;
197
- }
198
- }
199
- return false;
200
- }
201
- function isStateChangeEvent(event) {
202
- 'worklet';
203
-
204
- // @ts-ignore Yes, the oldState prop is missing on GestureTouchEvent, that's the point
205
- return event.oldState != null;
206
- }
207
- function isTouchEvent(event) {
208
- 'worklet';
209
-
210
- return event.eventType != null;
211
- }
212
- function getHandler(type, gesture) {
213
- 'worklet';
214
-
215
- switch (type) {
216
- case CALLBACK_TYPE.BEGAN:
217
- return gesture.onBegin;
218
- case CALLBACK_TYPE.START:
219
- return gesture.onStart;
220
- case CALLBACK_TYPE.UPDATE:
221
- return gesture.onUpdate;
222
- case CALLBACK_TYPE.CHANGE:
223
- return gesture.onChange;
224
- case CALLBACK_TYPE.END:
225
- return gesture.onEnd;
226
- case CALLBACK_TYPE.FINALIZE:
227
- return gesture.onFinalize;
228
- case CALLBACK_TYPE.TOUCHES_DOWN:
229
- return gesture.onTouchesDown;
230
- case CALLBACK_TYPE.TOUCHES_MOVE:
231
- return gesture.onTouchesMove;
232
- case CALLBACK_TYPE.TOUCHES_UP:
233
- return gesture.onTouchesUp;
234
- case CALLBACK_TYPE.TOUCHES_CANCELLED:
235
- return gesture.onTouchesCancelled;
236
- }
237
- }
238
- function touchEventTypeToCallbackType(eventType) {
239
- 'worklet';
240
-
241
- switch (eventType) {
242
- case TouchEventType.TOUCHES_DOWN:
243
- return CALLBACK_TYPE.TOUCHES_DOWN;
244
- case TouchEventType.TOUCHES_MOVE:
245
- return CALLBACK_TYPE.TOUCHES_MOVE;
246
- case TouchEventType.TOUCHES_UP:
247
- return CALLBACK_TYPE.TOUCHES_UP;
248
- case TouchEventType.TOUCHES_CANCELLED:
249
- return CALLBACK_TYPE.TOUCHES_CANCELLED;
250
- }
251
- return CALLBACK_TYPE.UNDEFINED;
252
- }
253
- function runWorklet(type, gesture, event, ...args) {
254
- 'worklet';
255
-
256
- const handler = getHandler(type, gesture);
257
- if (gesture.isWorklet[type]) {
258
- // @ts-ignore Logic below makes sure the correct event is send to the
259
- // correct handler.
260
- handler === null || handler === void 0 || handler(event, ...args);
261
- } else if (handler) {
262
- console.warn(tagMessage('Animated gesture callback must be a worklet'));
263
- }
264
- }
265
- function useAnimatedGesture(preparedGesture, needsRebuild) {
266
- if (!Reanimated) {
267
- return;
268
- }
269
-
270
- // Hooks are called conditionally, but the condition is whether the
271
- // react-native-reanimated is installed, which shouldn't change while running
272
- // eslint-disable-next-line react-hooks/rules-of-hooks
273
- const sharedHandlersCallbacks = Reanimated.useSharedValue(null);
274
-
275
- // eslint-disable-next-line react-hooks/rules-of-hooks
276
- const lastUpdateEvent = Reanimated.useSharedValue([]);
277
-
278
- // not every gesture needs a state controller, init them lazily
279
- const stateControllers = [];
280
- const callback = event => {
281
- 'worklet';
282
-
283
- const currentCallback = sharedHandlersCallbacks.value;
284
- if (!currentCallback) {
285
- return;
286
- }
287
- for (let i = 0; i < currentCallback.length; i++) {
288
- const gesture = currentCallback[i];
289
- if (event.handlerTag === gesture.handlerTag) {
290
- if (isStateChangeEvent(event)) {
291
- if (event.oldState === State.UNDETERMINED && event.state === State.BEGAN) {
292
- runWorklet(CALLBACK_TYPE.BEGAN, gesture, event);
293
- } else if ((event.oldState === State.BEGAN || event.oldState === State.UNDETERMINED) && event.state === State.ACTIVE) {
294
- runWorklet(CALLBACK_TYPE.START, gesture, event);
295
- lastUpdateEvent.value[gesture.handlerTag] = undefined;
296
- } else if (event.oldState !== event.state && event.state === State.END) {
297
- if (event.oldState === State.ACTIVE) {
298
- runWorklet(CALLBACK_TYPE.END, gesture, event, true);
299
- }
300
- runWorklet(CALLBACK_TYPE.FINALIZE, gesture, event, true);
301
- } else if ((event.state === State.FAILED || event.state === State.CANCELLED) && event.state !== event.oldState) {
302
- if (event.oldState === State.ACTIVE) {
303
- runWorklet(CALLBACK_TYPE.END, gesture, event, false);
304
- }
305
- runWorklet(CALLBACK_TYPE.FINALIZE, gesture, event, false);
306
- }
307
- } else if (isTouchEvent(event)) {
308
- if (!stateControllers[i]) {
309
- stateControllers[i] = GestureStateManager.create(event.handlerTag);
310
- }
311
- if (event.eventType !== TouchEventType.UNDETERMINED) {
312
- runWorklet(touchEventTypeToCallbackType(event.eventType), gesture, event, stateControllers[i]);
313
- }
314
- } else {
315
- runWorklet(CALLBACK_TYPE.UPDATE, gesture, event);
316
- if (gesture.onChange && gesture.changeEventCalculator) {
317
- var _gesture$changeEventC;
318
- runWorklet(CALLBACK_TYPE.CHANGE, gesture, (_gesture$changeEventC = gesture.changeEventCalculator) === null || _gesture$changeEventC === void 0 ? void 0 : _gesture$changeEventC.call(gesture, event, lastUpdateEvent.value[gesture.handlerTag]));
319
- lastUpdateEvent.value[gesture.handlerTag] = event;
320
- }
321
- }
322
- }
323
- }
324
- };
325
-
326
- // eslint-disable-next-line react-hooks/rules-of-hooks
327
- const event = Reanimated.useEvent(callback, ['onGestureHandlerStateChange', 'onGestureHandlerEvent'], needsRebuild);
328
- preparedGesture.animatedEventHandler = event;
329
- preparedGesture.animatedHandlers = sharedHandlersCallbacks;
330
- }
331
-
332
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
333
- function validateDetectorChildren(ref) {
334
- // finds the first native view under the Wrap component and traverses the fiber tree upwards
335
- // to check whether there is more than one native view as a pseudo-direct child of GestureDetector
336
- // i.e. this is not ok:
337
- // Wrap
338
- // |
339
- // / \
340
- // / \
341
- // / \
342
- // / \
343
- // NativeView NativeView
344
- //
345
- // but this is fine:
346
- // Wrap
347
- // |
348
- // NativeView
349
- // |
350
- // / \
351
- // / \
352
- // / \
353
- // / \
354
- // NativeView NativeView
355
- if (__DEV__ && Platform.OS !== 'web') {
356
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
357
- const wrapType = REACT_NATIVE_VERSION.minor > 63 || REACT_NATIVE_VERSION.major > 0 ?
358
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
359
- ref._reactInternals.elementType :
360
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
361
- ref._reactInternalFiber.elementType;
362
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
363
- let instance = RNRenderer.findHostInstance_DEPRECATED(ref)._internalFiberInstanceHandleDEV;
364
-
365
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
366
- while (instance && instance.elementType !== wrapType) {
367
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
368
- if (instance.sibling) {
369
- throw new Error('GestureDetector has more than one native view as its children. This can happen if you are using a custom component that renders multiple views, like React.Fragment. You should wrap content of GestureDetector with a <View> or <Animated.View>.');
370
- }
371
-
372
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
373
- instance = instance.return;
374
- }
375
- }
376
- }
377
- const applyUserSelectProp = (userSelect, gesture) => {
378
- for (const g of gesture.toGestureArray()) {
379
- g.config.userSelect = userSelect;
380
- }
381
- };
382
- export const GestureDetector = props => {
383
- const rootViewContext = useContext(GestureHandlerRootViewContext);
384
- if (__DEV__ && !rootViewContext && !isJestEnv() && Platform.OS !== 'web') {
385
- throw new Error('GestureDetector must be used as a descendant of GestureHandlerRootView. Otherwise the gestures will not be recognized. See https://docs.swmansion.com/react-native-gesture-handler/docs/installation for more details.');
386
- }
387
- const gestureConfig = props.gesture;
388
- if (props.userSelect) {
389
- applyUserSelectProp(props.userSelect, gestureConfig);
390
- }
391
- const gesture = gestureConfig.toGestureArray();
392
- const useReanimatedHook = gesture.some(g => g.shouldUseReanimated);
393
-
394
- // store state in ref to prevent unnecessary renders
395
- const state = useRef({
396
- firstRender: true,
397
- viewRef: null,
398
- previousViewTag: -1,
399
- forceReattach: false
400
- }).current;
401
- const mountedRef = useRef(false);
402
- const webEventHandlersRef = useRef({
403
- onGestureHandlerEvent: e => {
404
- onGestureHandlerEvent(e.nativeEvent);
405
- },
406
- onGestureHandlerStateChange: isNewWebImplementationEnabled() ? e => {
407
- onGestureHandlerEvent(e.nativeEvent);
408
- } : undefined
409
- });
410
- const [renderState, setRenderState] = useState(false);
411
- function forceRender() {
412
- setRenderState(!renderState);
413
- }
414
- const preparedGesture = React.useRef({
415
- config: gesture,
416
- animatedEventHandler: null,
417
- animatedHandlers: null,
418
- firstExecution: true,
419
- useReanimatedHook: useReanimatedHook
420
- }).current;
421
- if (useReanimatedHook !== preparedGesture.useReanimatedHook) {
422
- throw new Error(tagMessage('You cannot change the thread the callbacks are ran on while the app is running'));
423
- }
424
- function onHandlersUpdate(skipConfigUpdate) {
425
- // if the underlying view has changed we need to reattach handlers to the new view
426
- const viewTag = findNodeHandle(state.viewRef);
427
- const forceReattach = viewTag !== state.previousViewTag;
428
- if (forceReattach || needsToReattach(preparedGesture, gesture)) {
429
- validateDetectorChildren(state.viewRef);
430
- dropHandlers(preparedGesture);
431
- attachHandlers({
432
- preparedGesture,
433
- gestureConfig,
434
- gesture,
435
- webEventHandlersRef,
436
- viewTag,
437
- mountedRef
438
- });
439
- state.previousViewTag = viewTag;
440
- state.forceReattach = forceReattach;
441
- if (forceReattach) {
442
- forceRender();
443
- }
444
- } else if (!skipConfigUpdate) {
445
- updateHandlers(preparedGesture, gestureConfig, gesture, mountedRef);
446
- }
447
- }
448
-
449
- // Reanimated event should be rebuilt only when gestures are reattached, otherwise
450
- // config update will be enough as all necessary items are stored in shared values anyway
451
- const needsToRebuildReanimatedEvent = preparedGesture.firstExecution || needsToReattach(preparedGesture, gesture) || state.forceReattach;
452
- state.forceReattach = false;
453
- if (preparedGesture.firstExecution) {
454
- gestureConfig.initialize();
455
- }
456
- if (useReanimatedHook) {
457
- // Whether animatedGesture or gesture is used shouldn't change while the app is running
458
- // eslint-disable-next-line react-hooks/rules-of-hooks
459
- useAnimatedGesture(preparedGesture, needsToRebuildReanimatedEvent);
460
- }
461
- useEffect(() => {
462
- const viewTag = findNodeHandle(state.viewRef);
463
- state.firstRender = true;
464
- mountedRef.current = true;
465
- validateDetectorChildren(state.viewRef);
466
- attachHandlers({
467
- preparedGesture,
468
- gestureConfig,
469
- gesture,
470
- webEventHandlersRef,
471
- viewTag,
472
- mountedRef
473
- });
474
- return () => {
475
- mountedRef.current = false;
476
- dropHandlers(preparedGesture);
477
- };
478
- }, []);
479
- useEffect(() => {
480
- if (!state.firstRender) {
481
- onHandlersUpdate();
482
- } else {
483
- state.firstRender = false;
484
- }
485
- }, [props]);
486
- const refFunction = ref => {
487
- if (ref !== null) {
488
- // @ts-ignore Just setting the view ref
489
- state.viewRef = ref;
490
-
491
- // if it's the first render, also set the previousViewTag to prevent reattaching gestures when not needed
492
- if (state.previousViewTag === -1) {
493
- state.previousViewTag = findNodeHandle(state.viewRef);
494
- }
495
-
496
- // pass true as `skipConfigUpdate`, here we only want to trigger the eventual reattaching of handlers
497
- // in case the view has changed, while config update would be handled be the `useEffect` above
498
- onHandlersUpdate(true);
499
- if (isFabric()) {
500
- const node = getShadowNodeFromRef(ref);
501
- if (global.isFormsStackingContext(node) === false) {
502
- console.error(tagMessage('GestureDetector has received a child that may get view-flattened. ' + '\nTo prevent it from misbehaving you need to wrap the child with a `<View collapsable={false}>`.'));
503
- }
504
- }
505
- }
506
- };
507
- if (useReanimatedHook) {
508
- return /*#__PURE__*/React.createElement(AnimatedWrap, {
509
- ref: refFunction,
510
- onGestureHandlerEvent: preparedGesture.animatedEventHandler
511
- }, props.children);
512
- } else {
513
- return /*#__PURE__*/React.createElement(Wrap, {
514
- ref: refFunction
515
- }, props.children);
516
- }
517
- };
518
- class Wrap extends React.Component {
519
- render() {
520
- try {
521
- // I don't think that fighting with types over such a simple function is worth it
522
- // The only thing it does is add 'collapsable: false' to the child component
523
- // to make sure it is in the native view hierarchy so the detector can find
524
- // correct viewTag to attach to.
525
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
526
- const child = React.Children.only(this.props.children);
527
- return /*#__PURE__*/React.cloneElement(child, {
528
- collapsable: false
529
- },
530
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
531
- child.props.children);
532
- } catch (e) {
533
- throw new Error(tagMessage(`GestureDetector got more than one view as a child. If you want the gesture to work on multiple views, wrap them with a common parent and attach the gesture to that view.`));
534
- }
535
- }
536
- }
537
- const AnimatedWrap = (_Reanimated$default$c = Reanimated === null || Reanimated === void 0 || (_Reanimated$default = Reanimated.default) === null || _Reanimated$default === void 0 ? void 0 : _Reanimated$default.createAnimatedComponent(Wrap)) !== null && _Reanimated$default$c !== void 0 ? _Reanimated$default$c : Wrap;
538
- //# sourceMappingURL=GestureDetector.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","useContext","useEffect","useRef","useState","BaseGesture","CALLBACK_TYPE","Reanimated","registerHandler","unregisterHandler","RNGestureHandlerModule","baseGestureHandlerWithMonitorProps","filterConfig","findNodeHandle","scheduleFlushOperations","GestureStateManager","flingGestureHandlerProps","forceTouchGestureHandlerProps","longPressGestureHandlerProps","panGestureHandlerProps","panGestureHandlerCustomNativeProps","tapGestureHandlerProps","hoverGestureHandlerProps","State","TouchEventType","ActionType","isFabric","isJestEnv","REACT_NATIVE_VERSION","tagMessage","getShadowNodeFromRef","Platform","onGestureHandlerEvent","RNRenderer","isNewWebImplementationEnabled","nativeViewGestureHandlerProps","GestureHandlerRootViewContext","ALLOWED_PROPS","convertToHandlerTag","ref","handlerTag","_ref$current$handlerT","_ref$current","current","extractValidHandlerTags","interactionGroup","_interactionGroup$map","_interactionGroup$map2","map","filter","tag","dropHandlers","preparedGesture","handler","config","dropGestureHandler","testId","checkGestureCallbacksForWorklets","gesture","runOnJS","areSomeNotWorklets","handlers","isWorklet","includes","areSomeWorklets","console","error","attachHandlers","gestureConfig","viewTag","webEventHandlersRef","mountedRef","firstExecution","initialize","queueMicrotask","prepare","createGestureHandler","handlerName","requireToFail","simultaneousWith","updateGestureHandler","simultaneousHandlers","waitFor","actionType","shouldUseReanimated","REANIMATED_WORKLET","JS_FUNCTION_NEW_API","OS","attachGestureHandler","JS_FUNCTION_OLD_API","animatedHandlers","isAnimatedGesture","g","value","updateHandlers","i","length","_preparedGesture$anim","previousHandlersValue","newHandlersValue","shouldUpdateSharedValue","gestureId","needsToReattach","isStateChangeEvent","event","oldState","isTouchEvent","eventType","getHandler","type","BEGAN","onBegin","START","onStart","UPDATE","onUpdate","CHANGE","onChange","END","onEnd","FINALIZE","onFinalize","TOUCHES_DOWN","onTouchesDown","TOUCHES_MOVE","onTouchesMove","TOUCHES_UP","onTouchesUp","TOUCHES_CANCELLED","onTouchesCancelled","touchEventTypeToCallbackType","UNDEFINED","runWorklet","args","warn","useAnimatedGesture","needsRebuild","sharedHandlersCallbacks","useSharedValue","lastUpdateEvent","stateControllers","callback","currentCallback","UNDETERMINED","state","ACTIVE","undefined","FAILED","CANCELLED","create","changeEventCalculator","_gesture$changeEventC","call","useEvent","animatedEventHandler","validateDetectorChildren","__DEV__","wrapType","minor","major","_reactInternals","elementType","_reactInternalFiber","instance","findHostInstance_DEPRECATED","_internalFiberInstanceHandleDEV","sibling","Error","return","applyUserSelectProp","userSelect","toGestureArray","GestureDetector","props","rootViewContext","useReanimatedHook","some","firstRender","viewRef","previousViewTag","forceReattach","e","nativeEvent","onGestureHandlerStateChange","renderState","setRenderState","forceRender","onHandlersUpdate","skipConfigUpdate","needsToRebuildReanimatedEvent","refFunction","node","global","isFormsStackingContext","createElement","AnimatedWrap","children","Wrap","Component","render","child","Children","only","cloneElement","collapsable","_Reanimated$default$c","_Reanimated$default","default","createAnimatedComponent"],"sources":["GestureDetector.tsx"],"sourcesContent":["import React, { useContext, useEffect, useRef, useState } from 'react';\nimport {\n GestureType,\n HandlerCallbacks,\n BaseGesture,\n GestureRef,\n CALLBACK_TYPE,\n} from './gesture';\nimport { Reanimated, SharedValue } from './reanimatedWrapper';\nimport { registerHandler, unregisterHandler } from '../handlersRegistry';\nimport RNGestureHandlerModule from '../../RNGestureHandlerModule';\nimport {\n baseGestureHandlerWithMonitorProps,\n filterConfig,\n findNodeHandle,\n GestureTouchEvent,\n GestureUpdateEvent,\n GestureStateChangeEvent,\n HandlerStateChangeEvent,\n scheduleFlushOperations,\n UserSelect,\n} from '../gestureHandlerCommon';\nimport {\n GestureStateManager,\n GestureStateManagerType,\n} from './gestureStateManager';\nimport { flingGestureHandlerProps } from '../FlingGestureHandler';\nimport { forceTouchGestureHandlerProps } from '../ForceTouchGestureHandler';\nimport { longPressGestureHandlerProps } from '../LongPressGestureHandler';\nimport {\n panGestureHandlerProps,\n panGestureHandlerCustomNativeProps,\n} from '../PanGestureHandler';\nimport { tapGestureHandlerProps } from '../TapGestureHandler';\nimport { hoverGestureHandlerProps } from './hoverGesture';\nimport { State } from '../../State';\nimport { TouchEventType } from '../../TouchEventType';\nimport { ComposedGesture } from './gestureComposition';\nimport { ActionType } from '../../ActionType';\nimport {\n isFabric,\n isJestEnv,\n REACT_NATIVE_VERSION,\n tagMessage,\n} from '../../utils';\nimport { getShadowNodeFromRef } from '../../getShadowNodeFromRef';\nimport { Platform } from 'react-native';\nimport type RNGestureHandlerModuleWeb from '../../RNGestureHandlerModule.web';\nimport { onGestureHandlerEvent } from './eventReceiver';\nimport { RNRenderer } from '../../RNRenderer';\nimport { isNewWebImplementationEnabled } from '../../EnableNewWebImplementation';\nimport { nativeViewGestureHandlerProps } from '../NativeViewGestureHandler';\nimport GestureHandlerRootViewContext from '../../GestureHandlerRootViewContext';\n\ndeclare const global: {\n isFormsStackingContext: (node: unknown) => boolean | null; // JSI function\n};\n\nconst ALLOWED_PROPS = [\n ...baseGestureHandlerWithMonitorProps,\n ...tapGestureHandlerProps,\n ...panGestureHandlerProps,\n ...panGestureHandlerCustomNativeProps,\n ...longPressGestureHandlerProps,\n ...forceTouchGestureHandlerProps,\n ...flingGestureHandlerProps,\n ...hoverGestureHandlerProps,\n ...nativeViewGestureHandlerProps,\n];\n\nexport type GestureConfigReference = {\n config: GestureType[];\n animatedEventHandler: unknown;\n animatedHandlers: SharedValue<\n HandlerCallbacks<Record<string, unknown>>[] | null\n > | null;\n firstExecution: boolean;\n useReanimatedHook: boolean;\n};\n\nfunction convertToHandlerTag(ref: GestureRef): number {\n if (typeof ref === 'number') {\n return ref;\n } else if (ref instanceof BaseGesture) {\n return ref.handlerTag;\n } else {\n // @ts-ignore in this case it should be a ref either to gesture object or\n // a gesture handler component, in both cases handlerTag property exists\n return ref.current?.handlerTag ?? -1;\n }\n}\n\nfunction extractValidHandlerTags(interactionGroup: GestureRef[] | undefined) {\n return (\n interactionGroup?.map(convertToHandlerTag)?.filter((tag) => tag > 0) ?? []\n );\n}\n\nfunction dropHandlers(preparedGesture: GestureConfigReference) {\n for (const handler of preparedGesture.config) {\n RNGestureHandlerModule.dropGestureHandler(handler.handlerTag);\n\n unregisterHandler(handler.handlerTag, handler.config.testId);\n }\n\n scheduleFlushOperations();\n}\n\nfunction checkGestureCallbacksForWorklets(gesture: GestureType) {\n // if a gesture is explicitly marked to run on the JS thread there is no need to check\n // if callbacks are worklets as the user is aware they will be ran on the JS thread\n if (gesture.config.runOnJS) {\n return;\n }\n\n const areSomeNotWorklets = gesture.handlers.isWorklet.includes(false);\n const areSomeWorklets = gesture.handlers.isWorklet.includes(true);\n\n // if some of the callbacks are worklets and some are not, and the gesture is not\n // explicitly marked with `.runOnJS(true)` show an error\n if (areSomeNotWorklets && areSomeWorklets) {\n console.error(\n tagMessage(\n `Some of the callbacks in the gesture are worklets and some are not. Either make sure that all calbacks are marked as 'worklet' if you wish to run them on the UI thread or use '.runOnJS(true)' modifier on the gesture explicitly to run all callbacks on the JS thread.`\n )\n );\n }\n}\n\ninterface WebEventHandler {\n onGestureHandlerEvent: (event: HandlerStateChangeEvent<unknown>) => void;\n onGestureHandlerStateChange?: (\n event: HandlerStateChangeEvent<unknown>\n ) => void;\n}\n\ninterface AttachHandlersConfig {\n preparedGesture: GestureConfigReference;\n gestureConfig: ComposedGesture | GestureType;\n gesture: GestureType[];\n viewTag: number;\n webEventHandlersRef: React.RefObject<WebEventHandler>;\n mountedRef: React.RefObject<boolean>;\n}\n\nfunction attachHandlers({\n preparedGesture,\n gestureConfig,\n gesture,\n viewTag,\n webEventHandlersRef,\n mountedRef,\n}: AttachHandlersConfig) {\n if (!preparedGesture.firstExecution) {\n gestureConfig.initialize();\n } else {\n preparedGesture.firstExecution = false;\n }\n\n // use queueMicrotask to extract handlerTags, because all refs should be initialized\n // when it's ran\n queueMicrotask(() => {\n if (!mountedRef.current) {\n return;\n }\n gestureConfig.prepare();\n });\n\n for (const handler of gesture) {\n checkGestureCallbacksForWorklets(handler);\n RNGestureHandlerModule.createGestureHandler(\n handler.handlerName,\n handler.handlerTag,\n filterConfig(handler.config, ALLOWED_PROPS)\n );\n\n registerHandler(handler.handlerTag, handler, handler.config.testId);\n }\n\n // use queueMicrotask to extract handlerTags, because all refs should be initialized\n // when it's ran\n queueMicrotask(() => {\n if (!mountedRef.current) {\n return;\n }\n for (const handler of gesture) {\n let requireToFail: number[] = [];\n if (handler.config.requireToFail) {\n requireToFail = extractValidHandlerTags(handler.config.requireToFail);\n }\n\n let simultaneousWith: number[] = [];\n if (handler.config.simultaneousWith) {\n simultaneousWith = extractValidHandlerTags(\n handler.config.simultaneousWith\n );\n }\n\n RNGestureHandlerModule.updateGestureHandler(\n handler.handlerTag,\n filterConfig(handler.config, ALLOWED_PROPS, {\n simultaneousHandlers: simultaneousWith,\n waitFor: requireToFail,\n })\n );\n }\n\n scheduleFlushOperations();\n });\n\n preparedGesture.config = gesture;\n\n for (const gesture of preparedGesture.config) {\n const actionType = gesture.shouldUseReanimated\n ? ActionType.REANIMATED_WORKLET\n : ActionType.JS_FUNCTION_NEW_API;\n\n if (Platform.OS === 'web') {\n (\n RNGestureHandlerModule.attachGestureHandler as typeof RNGestureHandlerModuleWeb.attachGestureHandler\n )(\n gesture.handlerTag,\n viewTag,\n ActionType.JS_FUNCTION_OLD_API, // ignored on web\n webEventHandlersRef\n );\n } else {\n RNGestureHandlerModule.attachGestureHandler(\n gesture.handlerTag,\n viewTag,\n actionType\n );\n }\n }\n\n if (preparedGesture.animatedHandlers) {\n const isAnimatedGesture = (g: GestureType) => g.shouldUseReanimated;\n\n preparedGesture.animatedHandlers.value = gesture\n .filter(isAnimatedGesture)\n .map((g) => g.handlers) as unknown as HandlerCallbacks<\n Record<string, unknown>\n >[];\n }\n}\n\nfunction updateHandlers(\n preparedGesture: GestureConfigReference,\n gestureConfig: ComposedGesture | GestureType,\n gesture: GestureType[],\n mountedRef: React.RefObject<boolean>\n) {\n gestureConfig.prepare();\n\n for (let i = 0; i < gesture.length; i++) {\n const handler = preparedGesture.config[i];\n checkGestureCallbacksForWorklets(handler);\n\n // only update handlerTag when it's actually different, it may be the same\n // if gesture config object is wrapped with useMemo\n if (gesture[i].handlerTag !== handler.handlerTag) {\n gesture[i].handlerTag = handler.handlerTag;\n gesture[i].handlers.handlerTag = handler.handlerTag;\n }\n }\n\n // use queueMicrotask to extract handlerTags, because when it's ran, all refs should be updated\n // and handlerTags in BaseGesture references should be updated in the loop above (we need to wait\n // in case of external relations)\n queueMicrotask(() => {\n if (!mountedRef.current) {\n return;\n }\n for (let i = 0; i < gesture.length; i++) {\n const handler = preparedGesture.config[i];\n\n handler.config = gesture[i].config;\n handler.handlers = gesture[i].handlers;\n\n const requireToFail = extractValidHandlerTags(\n handler.config.requireToFail\n );\n\n const simultaneousWith = extractValidHandlerTags(\n handler.config.simultaneousWith\n );\n\n RNGestureHandlerModule.updateGestureHandler(\n handler.handlerTag,\n filterConfig(handler.config, ALLOWED_PROPS, {\n simultaneousHandlers: simultaneousWith,\n waitFor: requireToFail,\n })\n );\n\n registerHandler(handler.handlerTag, handler, handler.config.testId);\n }\n\n if (preparedGesture.animatedHandlers) {\n const previousHandlersValue =\n preparedGesture.animatedHandlers.value ?? [];\n const newHandlersValue = preparedGesture.config\n .filter((g) => g.shouldUseReanimated) // ignore gestures that shouldn't run on UI\n .map((g) => g.handlers) as unknown as HandlerCallbacks<\n Record<string, unknown>\n >[];\n\n // if amount of gesture configs changes, we need to update the callbacks in shared value\n let shouldUpdateSharedValue =\n previousHandlersValue.length !== newHandlersValue.length;\n\n if (!shouldUpdateSharedValue) {\n // if the amount is the same, we need to check if any of the configs inside has changed\n for (let i = 0; i < newHandlersValue.length; i++) {\n if (\n // we can use the `gestureId` prop as it's unique for every config instance\n newHandlersValue[i].gestureId !== previousHandlersValue[i].gestureId\n ) {\n shouldUpdateSharedValue = true;\n break;\n }\n }\n }\n\n if (shouldUpdateSharedValue) {\n preparedGesture.animatedHandlers.value = newHandlersValue;\n }\n }\n\n scheduleFlushOperations();\n });\n}\n\nfunction needsToReattach(\n preparedGesture: GestureConfigReference,\n gesture: GestureType[]\n) {\n if (gesture.length !== preparedGesture.config.length) {\n return true;\n }\n for (let i = 0; i < gesture.length; i++) {\n if (\n gesture[i].handlerName !== preparedGesture.config[i].handlerName ||\n gesture[i].shouldUseReanimated !==\n preparedGesture.config[i].shouldUseReanimated\n ) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction isStateChangeEvent(\n event: GestureUpdateEvent | GestureStateChangeEvent | GestureTouchEvent\n): event is GestureStateChangeEvent {\n 'worklet';\n // @ts-ignore Yes, the oldState prop is missing on GestureTouchEvent, that's the point\n return event.oldState != null;\n}\n\nfunction isTouchEvent(\n event: GestureUpdateEvent | GestureStateChangeEvent | GestureTouchEvent\n): event is GestureTouchEvent {\n 'worklet';\n return event.eventType != null;\n}\n\nfunction getHandler(\n type: CALLBACK_TYPE,\n gesture: HandlerCallbacks<Record<string, unknown>>\n) {\n 'worklet';\n switch (type) {\n case CALLBACK_TYPE.BEGAN:\n return gesture.onBegin;\n case CALLBACK_TYPE.START:\n return gesture.onStart;\n case CALLBACK_TYPE.UPDATE:\n return gesture.onUpdate;\n case CALLBACK_TYPE.CHANGE:\n return gesture.onChange;\n case CALLBACK_TYPE.END:\n return gesture.onEnd;\n case CALLBACK_TYPE.FINALIZE:\n return gesture.onFinalize;\n case CALLBACK_TYPE.TOUCHES_DOWN:\n return gesture.onTouchesDown;\n case CALLBACK_TYPE.TOUCHES_MOVE:\n return gesture.onTouchesMove;\n case CALLBACK_TYPE.TOUCHES_UP:\n return gesture.onTouchesUp;\n case CALLBACK_TYPE.TOUCHES_CANCELLED:\n return gesture.onTouchesCancelled;\n }\n}\n\nfunction touchEventTypeToCallbackType(\n eventType: TouchEventType\n): CALLBACK_TYPE {\n 'worklet';\n switch (eventType) {\n case TouchEventType.TOUCHES_DOWN:\n return CALLBACK_TYPE.TOUCHES_DOWN;\n case TouchEventType.TOUCHES_MOVE:\n return CALLBACK_TYPE.TOUCHES_MOVE;\n case TouchEventType.TOUCHES_UP:\n return CALLBACK_TYPE.TOUCHES_UP;\n case TouchEventType.TOUCHES_CANCELLED:\n return CALLBACK_TYPE.TOUCHES_CANCELLED;\n }\n return CALLBACK_TYPE.UNDEFINED;\n}\n\nfunction runWorklet(\n type: CALLBACK_TYPE,\n gesture: HandlerCallbacks<Record<string, unknown>>,\n event: GestureStateChangeEvent | GestureUpdateEvent | GestureTouchEvent,\n ...args: any[]\n) {\n 'worklet';\n const handler = getHandler(type, gesture);\n if (gesture.isWorklet[type]) {\n // @ts-ignore Logic below makes sure the correct event is send to the\n // correct handler.\n handler?.(event, ...args);\n } else if (handler) {\n console.warn(tagMessage('Animated gesture callback must be a worklet'));\n }\n}\n\nfunction useAnimatedGesture(\n preparedGesture: GestureConfigReference,\n needsRebuild: boolean\n) {\n if (!Reanimated) {\n return;\n }\n\n // Hooks are called conditionally, but the condition is whether the\n // react-native-reanimated is installed, which shouldn't change while running\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const sharedHandlersCallbacks = Reanimated.useSharedValue<\n HandlerCallbacks<Record<string, unknown>>[] | null\n >(null);\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const lastUpdateEvent = Reanimated.useSharedValue<\n (GestureUpdateEvent | undefined)[]\n >([]);\n\n // not every gesture needs a state controller, init them lazily\n const stateControllers: GestureStateManagerType[] = [];\n\n const callback = (\n event: GestureStateChangeEvent | GestureUpdateEvent | GestureTouchEvent\n ) => {\n 'worklet';\n\n const currentCallback = sharedHandlersCallbacks.value;\n if (!currentCallback) {\n return;\n }\n\n for (let i = 0; i < currentCallback.length; i++) {\n const gesture = currentCallback[i];\n\n if (event.handlerTag === gesture.handlerTag) {\n if (isStateChangeEvent(event)) {\n if (\n event.oldState === State.UNDETERMINED &&\n event.state === State.BEGAN\n ) {\n runWorklet(CALLBACK_TYPE.BEGAN, gesture, event);\n } else if (\n (event.oldState === State.BEGAN ||\n event.oldState === State.UNDETERMINED) &&\n event.state === State.ACTIVE\n ) {\n runWorklet(CALLBACK_TYPE.START, gesture, event);\n lastUpdateEvent.value[gesture.handlerTag] = undefined;\n } else if (\n event.oldState !== event.state &&\n event.state === State.END\n ) {\n if (event.oldState === State.ACTIVE) {\n runWorklet(CALLBACK_TYPE.END, gesture, event, true);\n }\n runWorklet(CALLBACK_TYPE.FINALIZE, gesture, event, true);\n } else if (\n (event.state === State.FAILED || event.state === State.CANCELLED) &&\n event.state !== event.oldState\n ) {\n if (event.oldState === State.ACTIVE) {\n runWorklet(CALLBACK_TYPE.END, gesture, event, false);\n }\n runWorklet(CALLBACK_TYPE.FINALIZE, gesture, event, false);\n }\n } else if (isTouchEvent(event)) {\n if (!stateControllers[i]) {\n stateControllers[i] = GestureStateManager.create(event.handlerTag);\n }\n\n if (event.eventType !== TouchEventType.UNDETERMINED) {\n runWorklet(\n touchEventTypeToCallbackType(event.eventType),\n gesture,\n event,\n stateControllers[i]\n );\n }\n } else {\n runWorklet(CALLBACK_TYPE.UPDATE, gesture, event);\n\n if (gesture.onChange && gesture.changeEventCalculator) {\n runWorklet(\n CALLBACK_TYPE.CHANGE,\n gesture,\n gesture.changeEventCalculator?.(\n event,\n lastUpdateEvent.value[gesture.handlerTag]\n )\n );\n\n lastUpdateEvent.value[gesture.handlerTag] = event;\n }\n }\n }\n }\n };\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const event = Reanimated.useEvent(\n callback,\n ['onGestureHandlerStateChange', 'onGestureHandlerEvent'],\n needsRebuild\n );\n\n preparedGesture.animatedEventHandler = event;\n preparedGesture.animatedHandlers = sharedHandlersCallbacks;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction validateDetectorChildren(ref: any) {\n // finds the first native view under the Wrap component and traverses the fiber tree upwards\n // to check whether there is more than one native view as a pseudo-direct child of GestureDetector\n // i.e. this is not ok:\n // Wrap\n // |\n // / \\\n // / \\\n // / \\\n // / \\\n // NativeView NativeView\n //\n // but this is fine:\n // Wrap\n // |\n // NativeView\n // |\n // / \\\n // / \\\n // / \\\n // / \\\n // NativeView NativeView\n if (__DEV__ && Platform.OS !== 'web') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const wrapType =\n REACT_NATIVE_VERSION.minor > 63 || REACT_NATIVE_VERSION.major > 0\n ? // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n ref._reactInternals.elementType\n : // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n ref._reactInternalFiber.elementType;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n let instance =\n RNRenderer.findHostInstance_DEPRECATED(\n ref\n )._internalFiberInstanceHandleDEV;\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n while (instance && instance.elementType !== wrapType) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (instance.sibling) {\n throw new Error(\n 'GestureDetector has more than one native view as its children. This can happen if you are using a custom component that renders multiple views, like React.Fragment. You should wrap content of GestureDetector with a <View> or <Animated.View>.'\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access\n instance = instance.return;\n }\n }\n}\n\nconst applyUserSelectProp = (\n userSelect: UserSelect,\n gesture: ComposedGesture | GestureType\n): void => {\n for (const g of gesture.toGestureArray()) {\n g.config.userSelect = userSelect;\n }\n};\n\ninterface GestureDetectorProps {\n gesture: ComposedGesture | GestureType;\n userSelect?: UserSelect;\n children?: React.ReactNode;\n}\ninterface GestureDetectorState {\n firstRender: boolean;\n viewRef: React.Component | null;\n previousViewTag: number;\n forceReattach: boolean;\n}\nexport const GestureDetector = (props: GestureDetectorProps) => {\n const rootViewContext = useContext(GestureHandlerRootViewContext);\n if (__DEV__ && !rootViewContext && !isJestEnv() && Platform.OS !== 'web') {\n throw new Error(\n 'GestureDetector must be used as a descendant of GestureHandlerRootView. Otherwise the gestures will not be recognized. See https://docs.swmansion.com/react-native-gesture-handler/docs/installation for more details.'\n );\n }\n\n const gestureConfig = props.gesture;\n\n if (props.userSelect) {\n applyUserSelectProp(props.userSelect, gestureConfig);\n }\n\n const gesture = gestureConfig.toGestureArray();\n const useReanimatedHook = gesture.some((g) => g.shouldUseReanimated);\n\n // store state in ref to prevent unnecessary renders\n const state = useRef<GestureDetectorState>({\n firstRender: true,\n viewRef: null,\n previousViewTag: -1,\n forceReattach: false,\n }).current;\n const mountedRef = useRef(false);\n const webEventHandlersRef = useRef<WebEventHandler>({\n onGestureHandlerEvent: (e: HandlerStateChangeEvent<unknown>) => {\n onGestureHandlerEvent(e.nativeEvent);\n },\n onGestureHandlerStateChange: isNewWebImplementationEnabled()\n ? (e: HandlerStateChangeEvent<unknown>) => {\n onGestureHandlerEvent(e.nativeEvent);\n }\n : undefined,\n });\n\n const [renderState, setRenderState] = useState(false);\n function forceRender() {\n setRenderState(!renderState);\n }\n\n const preparedGesture = React.useRef<GestureConfigReference>({\n config: gesture,\n animatedEventHandler: null,\n animatedHandlers: null,\n firstExecution: true,\n useReanimatedHook: useReanimatedHook,\n }).current;\n\n if (useReanimatedHook !== preparedGesture.useReanimatedHook) {\n throw new Error(\n tagMessage(\n 'You cannot change the thread the callbacks are ran on while the app is running'\n )\n );\n }\n\n function onHandlersUpdate(skipConfigUpdate?: boolean) {\n // if the underlying view has changed we need to reattach handlers to the new view\n const viewTag = findNodeHandle(state.viewRef) as number;\n const forceReattach = viewTag !== state.previousViewTag;\n\n if (forceReattach || needsToReattach(preparedGesture, gesture)) {\n validateDetectorChildren(state.viewRef);\n dropHandlers(preparedGesture);\n attachHandlers({\n preparedGesture,\n gestureConfig,\n gesture,\n webEventHandlersRef,\n viewTag,\n mountedRef,\n });\n\n state.previousViewTag = viewTag;\n state.forceReattach = forceReattach;\n if (forceReattach) {\n forceRender();\n }\n } else if (!skipConfigUpdate) {\n updateHandlers(preparedGesture, gestureConfig, gesture, mountedRef);\n }\n }\n\n // Reanimated event should be rebuilt only when gestures are reattached, otherwise\n // config update will be enough as all necessary items are stored in shared values anyway\n const needsToRebuildReanimatedEvent =\n preparedGesture.firstExecution ||\n needsToReattach(preparedGesture, gesture) ||\n state.forceReattach;\n\n state.forceReattach = false;\n\n if (preparedGesture.firstExecution) {\n gestureConfig.initialize();\n }\n\n if (useReanimatedHook) {\n // Whether animatedGesture or gesture is used shouldn't change while the app is running\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useAnimatedGesture(preparedGesture, needsToRebuildReanimatedEvent);\n }\n\n useEffect(() => {\n const viewTag = findNodeHandle(state.viewRef) as number;\n state.firstRender = true;\n mountedRef.current = true;\n\n validateDetectorChildren(state.viewRef);\n\n attachHandlers({\n preparedGesture,\n gestureConfig,\n gesture,\n webEventHandlersRef,\n viewTag,\n mountedRef,\n });\n\n return () => {\n mountedRef.current = false;\n dropHandlers(preparedGesture);\n };\n }, []);\n\n useEffect(() => {\n if (!state.firstRender) {\n onHandlersUpdate();\n } else {\n state.firstRender = false;\n }\n }, [props]);\n\n const refFunction = (ref: unknown) => {\n if (ref !== null) {\n // @ts-ignore Just setting the view ref\n state.viewRef = ref;\n\n // if it's the first render, also set the previousViewTag to prevent reattaching gestures when not needed\n if (state.previousViewTag === -1) {\n state.previousViewTag = findNodeHandle(state.viewRef) as number;\n }\n\n // pass true as `skipConfigUpdate`, here we only want to trigger the eventual reattaching of handlers\n // in case the view has changed, while config update would be handled be the `useEffect` above\n onHandlersUpdate(true);\n\n if (isFabric()) {\n const node = getShadowNodeFromRef(ref);\n if (global.isFormsStackingContext(node) === false) {\n console.error(\n tagMessage(\n 'GestureDetector has received a child that may get view-flattened. ' +\n '\\nTo prevent it from misbehaving you need to wrap the child with a `<View collapsable={false}>`.'\n )\n );\n }\n }\n }\n };\n\n if (useReanimatedHook) {\n return (\n <AnimatedWrap\n ref={refFunction}\n onGestureHandlerEvent={preparedGesture.animatedEventHandler}>\n {props.children}\n </AnimatedWrap>\n );\n } else {\n return <Wrap ref={refFunction}>{props.children}</Wrap>;\n }\n};\n\nclass Wrap extends React.Component<{\n onGestureHandlerEvent?: unknown;\n // implicit `children` prop has been removed in @types/react^18.0.0\n children?: React.ReactNode;\n}> {\n render() {\n try {\n // I don't think that fighting with types over such a simple function is worth it\n // The only thing it does is add 'collapsable: false' to the child component\n // to make sure it is in the native view hierarchy so the detector can find\n // correct viewTag to attach to.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const child: any = React.Children.only(this.props.children);\n return React.cloneElement(\n child,\n { collapsable: false },\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n child.props.children\n );\n } catch (e) {\n throw new Error(\n tagMessage(\n `GestureDetector got more than one view as a child. If you want the gesture to work on multiple views, wrap them with a common parent and attach the gesture to that view.`\n )\n );\n }\n }\n}\n\nconst AnimatedWrap = Reanimated?.default?.createAnimatedComponent(Wrap) ?? Wrap;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,UAAU,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACtE,SAGEC,WAAW,EAEXC,aAAa,QACR,WAAW;AAClB,SAASC,UAAU,QAAqB,qBAAqB;AAC7D,SAASC,eAAe,EAAEC,iBAAiB,QAAQ,qBAAqB;AACxE,OAAOC,sBAAsB,MAAM,8BAA8B;AACjE,SACEC,kCAAkC,EAClCC,YAAY,EACZC,cAAc,EAKdC,uBAAuB,QAElB,yBAAyB;AAChC,SACEC,mBAAmB,QAEd,uBAAuB;AAC9B,SAASC,wBAAwB,QAAQ,wBAAwB;AACjE,SAASC,6BAA6B,QAAQ,6BAA6B;AAC3E,SAASC,4BAA4B,QAAQ,4BAA4B;AACzE,SACEC,sBAAsB,EACtBC,kCAAkC,QAC7B,sBAAsB;AAC7B,SAASC,sBAAsB,QAAQ,sBAAsB;AAC7D,SAASC,wBAAwB,QAAQ,gBAAgB;AACzD,SAASC,KAAK,QAAQ,aAAa;AACnC,SAASC,cAAc,QAAQ,sBAAsB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IkJ,iBAAiB,EAAE;IACrB,oBACE/K,KAAA,CAAAkM,aAAA,CAACC,YAAY;MACX5J,GAAG,EAAEuJ,WAAY;MACjB9J,qBAAqB,EAAEoB,eAAe,CAACsG;IAAqB,GAC3DmB,KAAK,CAACuB,QACK,CAAC;EAEnB,CAAC,MAAM;IACL,oBAAOpM,KAAA,CAAAkM,aAAA,CAACG,IAAI;MAAC9J,GAAG,EAAEuJ;IAAY,GAAEjB,KAAK,CAACuB,QAAe,CAAC;EACxD;AACF,CAAC;AAED,MAAMC,IAAI,SAASrM,KAAK,CAACsM,SAAS,CAI/B;EACDC,MAAMA,CAAA,EAAG;IACP,IAAI;MACF;MACA;MACA;MACA;MACA;MACA,MAAMC,KAAU,GAAGxM,KAAK,CAACyM,QAAQ,CAACC,IAAI,CAAC,IAAI,CAAC7B,KAAK,CAACuB,QAAQ,CAAC;MAC3D,oBAAOpM,KAAK,CAAC2M,YAAY,CACvBH,KAAK,EACL;QAAEI,WAAW,EAAE;MAAM,CAAC;MACtB;MACAJ,KAAK,CAAC3B,KAAK,CAACuB,QACd,CAAC;IACH,CAAC,CAAC,OAAOf,CAAC,EAAE;MACV,MAAM,IAAId,KAAK,CACb1I,UAAU,CACR,2KACF,CACF,CAAC;IACH;EACF;AACF;AAEA,MAAMsK,YAAY,IAAAU,qBAAA,GAAGtM,UAAU,aAAVA,UAAU,gBAAAuM,mBAAA,GAAVvM,UAAU,CAAEwM,OAAO,cAAAD,mBAAA,uBAAnBA,mBAAA,CAAqBE,uBAAuB,CAACX,IAAI,CAAC,cAAAQ,qBAAA,cAAAA,qBAAA,GAAIR,IAAI","ignoreList":[]}
@@ -1,4 +0,0 @@
1
- // @ts-ignore
2
- import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
3
- export default codegenNativeComponent('RNGestureHandlerButton');
4
- //# sourceMappingURL=RNGestureHandlerButtonNativeComponent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["codegenNativeComponent"],"sources":["RNGestureHandlerButtonNativeComponent.ts"],"sourcesContent":["// @ts-ignore\nimport codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type {\n Int32,\n WithDefault,\n // @ts-ignore\n} from 'react-native/Libraries/Types/CodegenTypes';\nimport type { ViewProps, ColorValue } from 'react-native';\n\ninterface NativeProps extends ViewProps {\n exclusive?: WithDefault<boolean, true>;\n foreground?: boolean;\n borderless?: boolean;\n enabled?: WithDefault<boolean, true>;\n rippleColor?: ColorValue;\n rippleRadius?: Int32;\n touchSoundDisabled?: WithDefault<boolean, false>;\n}\n\nexport default codegenNativeComponent<NativeProps>('RNGestureHandlerButton');\n"],"mappings":"AAAA;AACA,OAAOA,sBAAsB,MAAM,yDAAyD;AAkB5F,eAAeA,sBAAsB,CAAc,wBAAwB,CAAC","ignoreList":[]}