react-native-gesture-handler 1.10.1 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (580) hide show
  1. package/DrawerLayout/package.json +3 -3
  2. package/README.md +7 -6
  3. package/Swipeable/package.json +3 -3
  4. package/android/build.gradle +48 -1
  5. package/android/common/src/main/java/com/swmansion/common/GestureHandlerStateManager.kt +5 -0
  6. package/android/gradle.properties +19 -0
  7. package/android/lib/src/main/java/com/swmansion/gesturehandler/BaseGestureHandlerInteractionController.kt +18 -0
  8. package/android/lib/src/main/java/com/swmansion/gesturehandler/Extensions.kt +11 -0
  9. package/android/lib/src/main/java/com/swmansion/gesturehandler/FlingGestureHandler.kt +96 -0
  10. package/android/lib/src/main/java/com/swmansion/gesturehandler/GestureHandler.kt +713 -0
  11. package/android/lib/src/main/java/com/swmansion/gesturehandler/GestureHandlerInteractionController.kt +8 -0
  12. package/android/lib/src/main/java/com/swmansion/gesturehandler/GestureHandlerOrchestrator.kt +562 -0
  13. package/android/lib/src/main/java/com/swmansion/gesturehandler/GestureHandlerRegistry.kt +8 -0
  14. package/android/lib/src/main/java/com/swmansion/gesturehandler/GestureHandlerRegistryImpl.kt +21 -0
  15. package/android/lib/src/main/java/com/swmansion/gesturehandler/GestureUtils.kt +49 -0
  16. package/android/lib/src/main/java/com/swmansion/gesturehandler/LongPressGestureHandler.kt +97 -0
  17. package/android/lib/src/main/java/com/swmansion/gesturehandler/ManualGestureHandler.kt +11 -0
  18. package/android/lib/src/main/java/com/swmansion/gesturehandler/NativeViewGestureHandler.kt +129 -0
  19. package/android/lib/src/main/java/com/swmansion/gesturehandler/OnTouchEventListener.kt +9 -0
  20. package/android/lib/src/main/java/com/swmansion/gesturehandler/PanGestureHandler.kt +289 -0
  21. package/android/lib/src/main/java/com/swmansion/gesturehandler/PinchGestureHandler.kt +88 -0
  22. package/android/lib/src/main/java/com/swmansion/gesturehandler/{PointerEventsConfig.java → PointerEventsConfig.kt} +3 -5
  23. package/android/lib/src/main/java/com/swmansion/gesturehandler/RotationGestureDetector.kt +125 -0
  24. package/android/lib/src/main/java/com/swmansion/gesturehandler/RotationGestureHandler.kt +79 -0
  25. package/android/lib/src/main/java/com/swmansion/gesturehandler/TapGestureHandler.kt +167 -0
  26. package/android/lib/src/main/java/com/swmansion/gesturehandler/ViewConfigurationHelper.kt +10 -0
  27. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.kt +348 -0
  28. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEnabledRootView.kt +57 -0
  29. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEvent.kt +59 -0
  30. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEventDataExtractor.kt +8 -0
  31. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerInteractionManager.kt +61 -0
  32. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.kt +686 -0
  33. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerPackage.kt +17 -0
  34. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRegistry.kt +95 -0
  35. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootHelper.kt +132 -0
  36. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootInterface.kt +5 -0
  37. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootView.kt +68 -0
  38. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootViewManager.kt +34 -0
  39. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerStateChangeEvent.kt +66 -0
  40. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerTouchEvent.kt +69 -0
  41. package/android/src/main/java/com/swmansion/gesturehandler/react/RNViewConfigurationHelper.kt +51 -0
  42. package/ios/Handlers/RNFlingHandler.m +78 -5
  43. package/ios/Handlers/RNForceTouchHandler.m +29 -4
  44. package/ios/Handlers/RNLongPressHandler.m +105 -3
  45. package/ios/Handlers/RNManualHandler.h +4 -0
  46. package/ios/Handlers/RNManualHandler.m +73 -0
  47. package/ios/Handlers/RNNativeViewHandler.m +30 -2
  48. package/ios/Handlers/RNPanHandler.m +64 -4
  49. package/ios/Handlers/RNPinchHandler.m +61 -2
  50. package/ios/Handlers/RNRotationHandler.m +60 -1
  51. package/ios/Handlers/RNTapHandler.m +55 -8
  52. package/ios/RNGestureHandler.h +18 -4
  53. package/ios/RNGestureHandler.m +123 -13
  54. package/ios/RNGestureHandler.xcodeproj/project.xcworkspace/xcuserdata/jakubpiasecki.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  55. package/ios/RNGestureHandler.xcodeproj/xcuserdata/jakubpiasecki.xcuserdatad/xcschemes/xcschememanagement.plist +19 -0
  56. package/ios/RNGestureHandlerEvents.h +9 -0
  57. package/ios/RNGestureHandlerEvents.m +34 -0
  58. package/ios/RNGestureHandlerManager.h +7 -0
  59. package/ios/RNGestureHandlerManager.m +62 -34
  60. package/ios/RNGestureHandlerModule.m +39 -3
  61. package/ios/RNGestureHandlerPointerTracker.h +25 -0
  62. package/ios/RNGestureHandlerPointerTracker.m +237 -0
  63. package/ios/RNGestureHandlerRegistry.h +1 -0
  64. package/ios/RNGestureHandlerRegistry.m +10 -0
  65. package/ios/RNGestureHandlerStateManager.h +5 -0
  66. package/ios/RNManualActivationRecognizer.h +10 -0
  67. package/ios/RNManualActivationRecognizer.m +80 -0
  68. package/ios/RNRootViewGestureRecognizer.m +1 -1
  69. package/ios/RNTouchEventType.h +9 -0
  70. package/jestSetup.js +7 -1
  71. package/lib/commonjs/Directions.js +15 -0
  72. package/lib/commonjs/Directions.js.map +1 -0
  73. package/lib/commonjs/EventType.js +16 -0
  74. package/lib/commonjs/EventType.js.map +1 -0
  75. package/lib/commonjs/GestureHandlerRootView.android.js +24 -0
  76. package/lib/commonjs/GestureHandlerRootView.android.js.map +1 -0
  77. package/lib/commonjs/GestureHandlerRootView.js +20 -0
  78. package/lib/commonjs/GestureHandlerRootView.js.map +1 -0
  79. package/lib/commonjs/PlatformConstants.js +15 -0
  80. package/lib/commonjs/PlatformConstants.js.map +1 -0
  81. package/lib/commonjs/PlatformConstants.web.js +14 -0
  82. package/lib/commonjs/PlatformConstants.web.js.map +1 -0
  83. package/lib/commonjs/RNGestureHandlerModule.js +22 -0
  84. package/lib/commonjs/RNGestureHandlerModule.js.map +1 -0
  85. package/lib/commonjs/RNGestureHandlerModule.web.js +80 -0
  86. package/lib/commonjs/RNGestureHandlerModule.web.js.map +1 -0
  87. package/lib/commonjs/State.js +18 -0
  88. package/lib/commonjs/State.js.map +1 -0
  89. package/lib/commonjs/components/DrawerLayout.js +535 -0
  90. package/lib/commonjs/components/DrawerLayout.js.map +1 -0
  91. package/lib/commonjs/components/GestureButtons.js +207 -0
  92. package/lib/commonjs/components/GestureButtons.js.map +1 -0
  93. package/lib/commonjs/components/GestureComponents.js +76 -0
  94. package/lib/commonjs/components/GestureComponents.js.map +1 -0
  95. package/lib/commonjs/components/GestureComponents.web.js +46 -0
  96. package/lib/commonjs/components/GestureComponents.web.js.map +1 -0
  97. package/lib/commonjs/components/GestureHandlerButton.js +13 -0
  98. package/lib/commonjs/components/GestureHandlerButton.js.map +1 -0
  99. package/lib/commonjs/components/GestureHandlerButton.web.js +24 -0
  100. package/lib/commonjs/components/GestureHandlerButton.web.js.map +1 -0
  101. package/lib/commonjs/components/Swipeable.js +365 -0
  102. package/lib/commonjs/components/Swipeable.js.map +1 -0
  103. package/lib/commonjs/components/touchables/GenericTouchable.js +278 -0
  104. package/lib/commonjs/components/touchables/GenericTouchable.js.map +1 -0
  105. package/lib/commonjs/components/touchables/TouchableHighlight.js +109 -0
  106. package/lib/commonjs/components/touchables/TouchableHighlight.js.map +1 -0
  107. package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js +100 -0
  108. package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js.map +1 -0
  109. package/lib/commonjs/components/touchables/TouchableNativeFeedback.js +12 -0
  110. package/lib/commonjs/components/touchables/TouchableNativeFeedback.js.map +1 -0
  111. package/lib/commonjs/components/touchables/TouchableOpacity.js +75 -0
  112. package/lib/commonjs/components/touchables/TouchableOpacity.js.map +1 -0
  113. package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js +26 -0
  114. package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js.map +1 -0
  115. package/lib/commonjs/components/touchables/index.js +40 -0
  116. package/lib/commonjs/components/touchables/index.js.map +1 -0
  117. package/lib/commonjs/gestureHandlerRootHOC.js +39 -0
  118. package/lib/commonjs/gestureHandlerRootHOC.js.map +1 -0
  119. package/lib/commonjs/handlers/FlingGestureHandler.js +23 -0
  120. package/lib/commonjs/handlers/FlingGestureHandler.js.map +1 -0
  121. package/lib/commonjs/handlers/ForceTouchGestureHandler.js +44 -0
  122. package/lib/commonjs/handlers/ForceTouchGestureHandler.js.map +1 -0
  123. package/lib/commonjs/handlers/LongPressGestureHandler.js +23 -0
  124. package/lib/commonjs/handlers/LongPressGestureHandler.js.map +1 -0
  125. package/lib/commonjs/handlers/NativeViewGestureHandler.js +25 -0
  126. package/lib/commonjs/handlers/NativeViewGestureHandler.js.map +1 -0
  127. package/lib/commonjs/handlers/PanGestureHandler.js +121 -0
  128. package/lib/commonjs/handlers/PanGestureHandler.js.map +1 -0
  129. package/lib/commonjs/handlers/PinchGestureHandler.js +21 -0
  130. package/lib/commonjs/handlers/PinchGestureHandler.js.map +1 -0
  131. package/lib/commonjs/handlers/RotationGestureHandler.js +21 -0
  132. package/lib/commonjs/handlers/RotationGestureHandler.js.map +1 -0
  133. package/lib/commonjs/handlers/TapGestureHandler.js +23 -0
  134. package/lib/commonjs/handlers/TapGestureHandler.js.map +1 -0
  135. package/lib/commonjs/handlers/createHandler.js +373 -0
  136. package/lib/commonjs/handlers/createHandler.js.map +1 -0
  137. package/lib/commonjs/handlers/createNativeWrapper.js +70 -0
  138. package/lib/commonjs/handlers/createNativeWrapper.js.map +1 -0
  139. package/lib/commonjs/handlers/gestureHandlerCommon.js +80 -0
  140. package/lib/commonjs/handlers/gestureHandlerCommon.js.map +1 -0
  141. package/lib/commonjs/handlers/gestureHandlerTypesCompat.js +2 -0
  142. package/lib/commonjs/handlers/gestureHandlerTypesCompat.js.map +1 -0
  143. package/lib/commonjs/handlers/gestures/GestureDetector.js +426 -0
  144. package/lib/commonjs/handlers/gestures/GestureDetector.js.map +1 -0
  145. package/lib/commonjs/handlers/gestures/eventReceiver.js +124 -0
  146. package/lib/commonjs/handlers/gestures/eventReceiver.js.map +1 -0
  147. package/lib/commonjs/handlers/gestures/flingGesture.js +34 -0
  148. package/lib/commonjs/handlers/gestures/flingGesture.js.map +1 -0
  149. package/lib/commonjs/handlers/gestures/forceTouchGesture.js +39 -0
  150. package/lib/commonjs/handlers/gestures/forceTouchGesture.js.map +1 -0
  151. package/lib/commonjs/handlers/gestures/gesture.js +185 -0
  152. package/lib/commonjs/handlers/gestures/gesture.js.map +1 -0
  153. package/lib/commonjs/handlers/gestures/gestureComposition.js +94 -0
  154. package/lib/commonjs/handlers/gestures/gestureComposition.js.map +1 -0
  155. package/lib/commonjs/handlers/gestures/gestureObjects.js +85 -0
  156. package/lib/commonjs/handlers/gestures/gestureObjects.js.map +1 -0
  157. package/lib/commonjs/handlers/gestures/gestureStateManager.js +58 -0
  158. package/lib/commonjs/handlers/gestures/gestureStateManager.js.map +1 -0
  159. package/lib/commonjs/handlers/gestures/longPressGesture.js +34 -0
  160. package/lib/commonjs/handlers/gestures/longPressGesture.js.map +1 -0
  161. package/lib/commonjs/handlers/gestures/manualGesture.js +19 -0
  162. package/lib/commonjs/handlers/gestures/manualGesture.js.map +1 -0
  163. package/lib/commonjs/handlers/gestures/nativeGesture.js +34 -0
  164. package/lib/commonjs/handlers/gestures/nativeGesture.js.map +1 -0
  165. package/lib/commonjs/handlers/gestures/panGesture.js +116 -0
  166. package/lib/commonjs/handlers/gestures/panGesture.js.map +1 -0
  167. package/lib/commonjs/handlers/gestures/pinchGesture.js +19 -0
  168. package/lib/commonjs/handlers/gestures/pinchGesture.js.map +1 -0
  169. package/lib/commonjs/handlers/gestures/reanimatedWrapper.js +24 -0
  170. package/lib/commonjs/handlers/gestures/reanimatedWrapper.js.map +1 -0
  171. package/lib/commonjs/handlers/gestures/rotationGesture.js +19 -0
  172. package/lib/commonjs/handlers/gestures/rotationGesture.js.map +1 -0
  173. package/lib/commonjs/handlers/gestures/tapGesture.js +59 -0
  174. package/lib/commonjs/handlers/gestures/tapGesture.js.map +1 -0
  175. package/lib/commonjs/handlers/handlersRegistry.js +31 -0
  176. package/lib/commonjs/handlers/handlersRegistry.js.map +1 -0
  177. package/lib/commonjs/index.js +338 -0
  178. package/lib/commonjs/index.js.map +1 -0
  179. package/lib/commonjs/init.js +13 -0
  180. package/lib/commonjs/init.js.map +1 -0
  181. package/lib/commonjs/mocks.js +64 -0
  182. package/lib/commonjs/mocks.js.map +1 -0
  183. package/lib/commonjs/typeUtils.js +2 -0
  184. package/lib/commonjs/typeUtils.js.map +1 -0
  185. package/lib/commonjs/utils.js +15 -0
  186. package/lib/commonjs/utils.js.map +1 -0
  187. package/lib/commonjs/web/DiscreteGestureHandler.js +105 -0
  188. package/lib/commonjs/web/DiscreteGestureHandler.js.map +1 -0
  189. package/lib/commonjs/web/DraggingGestureHandler.js +53 -0
  190. package/lib/commonjs/web/DraggingGestureHandler.js.map +1 -0
  191. package/lib/commonjs/web/Errors.js +16 -0
  192. package/lib/commonjs/web/Errors.js.map +1 -0
  193. package/lib/commonjs/web/FlingGestureHandler.js +170 -0
  194. package/lib/commonjs/web/FlingGestureHandler.js.map +1 -0
  195. package/lib/commonjs/web/GestureHandler.js +533 -0
  196. package/lib/commonjs/web/GestureHandler.js.map +1 -0
  197. package/lib/commonjs/web/IndiscreteGestureHandler.js +54 -0
  198. package/lib/commonjs/web/IndiscreteGestureHandler.js.map +1 -0
  199. package/lib/commonjs/web/LongPressGestureHandler.js +71 -0
  200. package/lib/commonjs/web/LongPressGestureHandler.js.map +1 -0
  201. package/lib/commonjs/web/NativeViewGestureHandler.js +62 -0
  202. package/lib/commonjs/web/NativeViewGestureHandler.js.map +1 -0
  203. package/lib/commonjs/web/NodeManager.js +43 -0
  204. package/lib/commonjs/web/NodeManager.js.map +1 -0
  205. package/lib/commonjs/web/PanGestureHandler.js +189 -0
  206. package/lib/commonjs/web/PanGestureHandler.js.map +1 -0
  207. package/lib/commonjs/web/PinchGestureHandler.js +40 -0
  208. package/lib/commonjs/web/PinchGestureHandler.js.map +1 -0
  209. package/lib/commonjs/web/PressGestureHandler.js +188 -0
  210. package/lib/commonjs/web/PressGestureHandler.js.map +1 -0
  211. package/lib/commonjs/web/RotationGestureHandler.js +44 -0
  212. package/lib/commonjs/web/RotationGestureHandler.js.map +1 -0
  213. package/lib/commonjs/web/TapGestureHandler.js +192 -0
  214. package/lib/commonjs/web/TapGestureHandler.js.map +1 -0
  215. package/lib/commonjs/web/constants.js +64 -0
  216. package/lib/commonjs/web/constants.js.map +1 -0
  217. package/lib/commonjs/web/utils.js +42 -0
  218. package/lib/commonjs/web/utils.js.map +1 -0
  219. package/lib/module/Directions.js +7 -0
  220. package/lib/module/Directions.js.map +1 -0
  221. package/lib/module/EventType.js +8 -0
  222. package/lib/module/EventType.js.map +1 -0
  223. package/lib/module/GestureHandlerRootView.android.js +10 -0
  224. package/lib/module/GestureHandlerRootView.android.js.map +1 -0
  225. package/lib/module/GestureHandlerRootView.js +7 -0
  226. package/lib/module/GestureHandlerRootView.js.map +1 -0
  227. package/lib/module/PlatformConstants.js +5 -0
  228. package/lib/module/PlatformConstants.js.map +1 -0
  229. package/lib/module/PlatformConstants.web.js +7 -0
  230. package/lib/module/PlatformConstants.web.js.map +1 -0
  231. package/lib/module/RNGestureHandlerModule.js +13 -0
  232. package/lib/module/RNGestureHandlerModule.js.map +1 -0
  233. package/lib/module/RNGestureHandlerModule.web.js +56 -0
  234. package/lib/module/RNGestureHandlerModule.web.js.map +1 -0
  235. package/lib/module/State.js +10 -0
  236. package/lib/module/State.js.map +1 -0
  237. package/lib/module/components/DrawerLayout.js +520 -0
  238. package/lib/module/components/DrawerLayout.js.map +1 -0
  239. package/lib/module/components/GestureButtons.js +172 -0
  240. package/lib/module/components/GestureButtons.js.map +1 -0
  241. package/lib/module/components/GestureComponents.js +53 -0
  242. package/lib/module/components/GestureComponents.js.map +1 -0
  243. package/lib/module/components/GestureComponents.web.js +25 -0
  244. package/lib/module/components/GestureComponents.web.js.map +1 -0
  245. package/{dist/src → lib/module}/components/GestureHandlerButton.js +1 -0
  246. package/lib/module/components/GestureHandlerButton.js.map +1 -0
  247. package/lib/module/components/GestureHandlerButton.web.js +9 -0
  248. package/lib/module/components/GestureHandlerButton.web.js.map +1 -0
  249. package/lib/module/components/Swipeable.js +347 -0
  250. package/lib/module/components/Swipeable.js.map +1 -0
  251. package/lib/module/components/touchables/GenericTouchable.js +262 -0
  252. package/lib/module/components/touchables/GenericTouchable.js.map +1 -0
  253. package/lib/module/components/touchables/TouchableHighlight.js +95 -0
  254. package/lib/module/components/touchables/TouchableHighlight.js.map +1 -0
  255. package/lib/module/components/touchables/TouchableNativeFeedback.android.js +84 -0
  256. package/lib/module/components/touchables/TouchableNativeFeedback.android.js.map +1 -0
  257. package/{dist/src → lib/module}/components/touchables/TouchableNativeFeedback.js +1 -0
  258. package/lib/module/components/touchables/TouchableNativeFeedback.js.map +1 -0
  259. package/lib/module/components/touchables/TouchableOpacity.js +61 -0
  260. package/lib/module/components/touchables/TouchableOpacity.js.map +1 -0
  261. package/lib/module/components/touchables/TouchableWithoutFeedback.js +10 -0
  262. package/lib/module/components/touchables/TouchableWithoutFeedback.js.map +1 -0
  263. package/{dist/src → lib/module}/components/touchables/index.js +1 -0
  264. package/lib/module/components/touchables/index.js.map +1 -0
  265. package/lib/module/gestureHandlerRootHOC.js +21 -0
  266. package/lib/module/gestureHandlerRootHOC.js.map +1 -0
  267. package/lib/module/handlers/FlingGestureHandler.js +10 -0
  268. package/lib/module/handlers/FlingGestureHandler.js.map +1 -0
  269. package/lib/module/handlers/ForceTouchGestureHandler.js +29 -0
  270. package/lib/module/handlers/ForceTouchGestureHandler.js.map +1 -0
  271. package/lib/module/handlers/LongPressGestureHandler.js +10 -0
  272. package/lib/module/handlers/LongPressGestureHandler.js.map +1 -0
  273. package/lib/module/handlers/NativeViewGestureHandler.js +11 -0
  274. package/lib/module/handlers/NativeViewGestureHandler.js.map +1 -0
  275. package/lib/module/handlers/PanGestureHandler.js +106 -0
  276. package/lib/module/handlers/PanGestureHandler.js.map +1 -0
  277. package/lib/module/handlers/PinchGestureHandler.js +9 -0
  278. package/lib/module/handlers/PinchGestureHandler.js.map +1 -0
  279. package/lib/module/handlers/RotationGestureHandler.js +9 -0
  280. package/lib/module/handlers/RotationGestureHandler.js.map +1 -0
  281. package/lib/module/handlers/TapGestureHandler.js +10 -0
  282. package/lib/module/handlers/TapGestureHandler.js.map +1 -0
  283. package/lib/module/handlers/createHandler.js +348 -0
  284. package/lib/module/handlers/createHandler.js.map +1 -0
  285. package/lib/module/handlers/createNativeWrapper.js +58 -0
  286. package/lib/module/handlers/createNativeWrapper.js.map +1 -0
  287. package/lib/module/handlers/gestureHandlerCommon.js +66 -0
  288. package/lib/module/handlers/gestureHandlerCommon.js.map +1 -0
  289. package/lib/module/handlers/gestureHandlerTypesCompat.js +2 -0
  290. package/lib/module/handlers/gestureHandlerTypesCompat.js.map +1 -0
  291. package/lib/module/handlers/gestures/GestureDetector.js +389 -0
  292. package/lib/module/handlers/gestures/GestureDetector.js.map +1 -0
  293. package/lib/module/handlers/gestures/eventReceiver.js +109 -0
  294. package/lib/module/handlers/gestures/eventReceiver.js.map +1 -0
  295. package/lib/module/handlers/gestures/flingGesture.js +24 -0
  296. package/lib/module/handlers/gestures/flingGesture.js.map +1 -0
  297. package/lib/module/handlers/gestures/forceTouchGesture.js +29 -0
  298. package/lib/module/handlers/gestures/forceTouchGesture.js.map +1 -0
  299. package/lib/module/handlers/gestures/gesture.js +167 -0
  300. package/lib/module/handlers/gestures/gesture.js.map +1 -0
  301. package/lib/module/handlers/gestures/gestureComposition.js +79 -0
  302. package/lib/module/handlers/gestures/gestureComposition.js.map +1 -0
  303. package/lib/module/handlers/gestures/gestureObjects.js +67 -0
  304. package/lib/module/handlers/gestures/gestureObjects.js.map +1 -0
  305. package/lib/module/handlers/gestures/gestureStateManager.js +48 -0
  306. package/lib/module/handlers/gestures/gestureStateManager.js.map +1 -0
  307. package/lib/module/handlers/gestures/longPressGesture.js +24 -0
  308. package/lib/module/handlers/gestures/longPressGesture.js.map +1 -0
  309. package/lib/module/handlers/gestures/manualGesture.js +9 -0
  310. package/lib/module/handlers/gestures/manualGesture.js.map +1 -0
  311. package/lib/module/handlers/gestures/nativeGesture.js +24 -0
  312. package/lib/module/handlers/gestures/nativeGesture.js.map +1 -0
  313. package/lib/module/handlers/gestures/panGesture.js +106 -0
  314. package/lib/module/handlers/gestures/panGesture.js.map +1 -0
  315. package/lib/module/handlers/gestures/pinchGesture.js +9 -0
  316. package/lib/module/handlers/gestures/pinchGesture.js.map +1 -0
  317. package/lib/module/handlers/gestures/reanimatedWrapper.js +19 -0
  318. package/lib/module/handlers/gestures/reanimatedWrapper.js.map +1 -0
  319. package/lib/module/handlers/gestures/rotationGesture.js +9 -0
  320. package/lib/module/handlers/gestures/rotationGesture.js.map +1 -0
  321. package/lib/module/handlers/gestures/tapGesture.js +49 -0
  322. package/lib/module/handlers/gestures/tapGesture.js.map +1 -0
  323. package/lib/module/handlers/handlersRegistry.js +16 -0
  324. package/lib/module/handlers/handlersRegistry.js.map +1 -0
  325. package/lib/module/index.js +34 -0
  326. package/lib/module/index.js.map +1 -0
  327. package/lib/module/init.js +5 -0
  328. package/lib/module/init.js.map +1 -0
  329. package/lib/module/mocks.js +54 -0
  330. package/lib/module/mocks.js.map +1 -0
  331. package/lib/module/typeUtils.js +2 -0
  332. package/lib/module/typeUtils.js.map +1 -0
  333. package/lib/module/utils.js +8 -0
  334. package/lib/module/utils.js.map +1 -0
  335. package/lib/module/web/DiscreteGestureHandler.js +94 -0
  336. package/lib/module/web/DiscreteGestureHandler.js.map +1 -0
  337. package/lib/module/web/DraggingGestureHandler.js +40 -0
  338. package/lib/module/web/DraggingGestureHandler.js.map +1 -0
  339. package/lib/module/web/Errors.js +7 -0
  340. package/lib/module/web/Errors.js.map +1 -0
  341. package/lib/module/web/FlingGestureHandler.js +156 -0
  342. package/lib/module/web/FlingGestureHandler.js.map +1 -0
  343. package/lib/module/web/GestureHandler.js +518 -0
  344. package/lib/module/web/GestureHandler.js.map +1 -0
  345. package/lib/module/web/IndiscreteGestureHandler.js +44 -0
  346. package/lib/module/web/IndiscreteGestureHandler.js.map +1 -0
  347. package/lib/module/web/LongPressGestureHandler.js +58 -0
  348. package/lib/module/web/LongPressGestureHandler.js.map +1 -0
  349. package/lib/module/web/NativeViewGestureHandler.js +45 -0
  350. package/lib/module/web/NativeViewGestureHandler.js.map +1 -0
  351. package/lib/module/web/NodeManager.js +30 -0
  352. package/lib/module/web/NodeManager.js.map +1 -0
  353. package/lib/module/web/PanGestureHandler.js +175 -0
  354. package/lib/module/web/PanGestureHandler.js.map +1 -0
  355. package/lib/module/web/PinchGestureHandler.js +29 -0
  356. package/lib/module/web/PinchGestureHandler.js.map +1 -0
  357. package/lib/module/web/PressGestureHandler.js +174 -0
  358. package/lib/module/web/PressGestureHandler.js.map +1 -0
  359. package/lib/module/web/RotationGestureHandler.js +32 -0
  360. package/lib/module/web/RotationGestureHandler.js.map +1 -0
  361. package/lib/module/web/TapGestureHandler.js +180 -0
  362. package/lib/module/web/TapGestureHandler.js.map +1 -0
  363. package/lib/module/web/constants.js +43 -0
  364. package/lib/module/web/constants.js.map +1 -0
  365. package/lib/module/web/utils.js +19 -0
  366. package/lib/module/web/utils.js.map +1 -0
  367. package/lib/typescript/Directions.d.ts +7 -0
  368. package/lib/typescript/EventType.d.ts +8 -0
  369. package/lib/typescript/GestureHandlerRootView.android.d.ts +2 -0
  370. package/lib/typescript/GestureHandlerRootView.d.ts +5 -0
  371. package/{dist/src → lib/typescript}/PlatformConstants.d.ts +0 -0
  372. package/{dist/src → lib/typescript}/PlatformConstants.web.d.ts +0 -0
  373. package/{dist/src → lib/typescript}/RNGestureHandlerModule.d.ts +1 -8
  374. package/{dist/src → lib/typescript}/RNGestureHandlerModule.web.d.ts +1 -1
  375. package/{dist/src → lib/typescript}/State.d.ts +0 -0
  376. package/{dist/src → lib/typescript}/components/DrawerLayout.d.ts +50 -1
  377. package/{dist/src → lib/typescript}/components/GestureButtons.d.ts +36 -0
  378. package/lib/typescript/components/GestureComponents.d.ts +18 -0
  379. package/{dist/src → lib/typescript}/components/GestureComponents.web.d.ts +4 -4
  380. package/{dist/src → lib/typescript}/components/GestureHandlerButton.d.ts +0 -0
  381. package/{dist/src → lib/typescript}/components/GestureHandlerButton.web.d.ts +0 -0
  382. package/lib/typescript/components/Swipeable.d.ts +150 -0
  383. package/{dist/src → lib/typescript}/components/touchables/GenericTouchable.d.ts +3 -3
  384. package/{dist/src → lib/typescript}/components/touchables/TouchableHighlight.d.ts +1 -0
  385. package/{dist/src → lib/typescript}/components/touchables/TouchableNativeFeedback.android.d.ts +0 -0
  386. package/{dist/src → lib/typescript}/components/touchables/TouchableNativeFeedback.d.ts +0 -0
  387. package/{dist/src → lib/typescript}/components/touchables/TouchableOpacity.d.ts +1 -0
  388. package/{dist/src → lib/typescript}/components/touchables/TouchableWithoutFeedback.d.ts +0 -0
  389. package/{dist/src → lib/typescript}/components/touchables/index.d.ts +0 -0
  390. package/{dist/src → lib/typescript}/gestureHandlerRootHOC.d.ts +0 -0
  391. package/lib/typescript/handlers/FlingGestureHandler.d.ts +33 -0
  392. package/lib/typescript/handlers/ForceTouchGestureHandler.d.ts +43 -0
  393. package/lib/typescript/handlers/LongPressGestureHandler.d.ts +55 -0
  394. package/lib/typescript/handlers/NativeViewGestureHandler.d.ts +27 -0
  395. package/lib/typescript/handlers/PanGestureHandler.d.ts +137 -0
  396. package/lib/typescript/handlers/PinchGestureHandler.d.ts +28 -0
  397. package/lib/typescript/handlers/RotationGestureHandler.d.ts +28 -0
  398. package/lib/typescript/handlers/TapGestureHandler.d.ts +56 -0
  399. package/{dist/src → lib/typescript}/handlers/createHandler.d.ts +1 -1
  400. package/{dist/src → lib/typescript}/handlers/createNativeWrapper.d.ts +0 -0
  401. package/lib/typescript/handlers/gestureHandlerCommon.d.ts +62 -0
  402. package/{dist/src → lib/typescript}/handlers/gestureHandlerTypesCompat.d.ts +8 -1
  403. package/lib/typescript/handlers/gestures/GestureDetector.d.ts +16 -0
  404. package/lib/typescript/handlers/gestures/eventReceiver.d.ts +2 -0
  405. package/lib/typescript/handlers/gestures/flingGesture.d.ts +9 -0
  406. package/lib/typescript/handlers/gestures/forceTouchGesture.d.ts +10 -0
  407. package/lib/typescript/handlers/gestures/gesture.d.ts +93 -0
  408. package/lib/typescript/handlers/gestures/gestureComposition.d.ts +21 -0
  409. package/lib/typescript/handlers/gestures/gestureObjects.d.ts +39 -0
  410. package/lib/typescript/handlers/gestures/gestureStateManager.d.ts +9 -0
  411. package/lib/typescript/handlers/gestures/longPressGesture.d.ts +9 -0
  412. package/lib/typescript/handlers/gestures/manualGesture.d.ts +5 -0
  413. package/lib/typescript/handlers/gestures/nativeGesture.d.ts +9 -0
  414. package/lib/typescript/handlers/gestures/panGesture.d.ts +19 -0
  415. package/lib/typescript/handlers/gestures/pinchGesture.d.ts +6 -0
  416. package/lib/typescript/handlers/gestures/reanimatedWrapper.d.ts +14 -0
  417. package/lib/typescript/handlers/gestures/rotationGesture.d.ts +6 -0
  418. package/lib/typescript/handlers/gestures/tapGesture.d.ts +14 -0
  419. package/lib/typescript/handlers/handlersRegistry.d.ts +6 -0
  420. package/lib/typescript/index.d.ts +44 -0
  421. package/lib/typescript/init.d.ts +1 -0
  422. package/lib/typescript/mocks.d.ts +43 -0
  423. package/{dist/src → lib/typescript}/typeUtils.d.ts +0 -0
  424. package/lib/typescript/utils.d.ts +1 -0
  425. package/{dist/src → lib/typescript}/web/DiscreteGestureHandler.d.ts +0 -0
  426. package/{dist/src → lib/typescript}/web/DraggingGestureHandler.d.ts +0 -0
  427. package/{dist/src → lib/typescript}/web/Errors.d.ts +0 -0
  428. package/{dist/src → lib/typescript}/web/FlingGestureHandler.d.ts +0 -1
  429. package/{dist/src → lib/typescript}/web/GestureHandler.d.ts +0 -1
  430. package/{dist/src → lib/typescript}/web/IndiscreteGestureHandler.d.ts +0 -0
  431. package/{dist/src → lib/typescript}/web/LongPressGestureHandler.d.ts +0 -0
  432. package/{dist/src → lib/typescript}/web/NativeViewGestureHandler.d.ts +0 -0
  433. package/{dist/src → lib/typescript}/web/NodeManager.d.ts +0 -0
  434. package/{dist/src → lib/typescript}/web/PanGestureHandler.d.ts +0 -1
  435. package/{dist/src → lib/typescript}/web/PinchGestureHandler.d.ts +0 -1
  436. package/{dist/src → lib/typescript}/web/PressGestureHandler.d.ts +0 -1
  437. package/{dist/src → lib/typescript}/web/RotationGestureHandler.d.ts +0 -1
  438. package/{dist/src → lib/typescript}/web/TapGestureHandler.d.ts +0 -1
  439. package/{dist/src → lib/typescript}/web/constants.d.ts +0 -0
  440. package/{dist/src → lib/typescript}/web/utils.d.ts +0 -0
  441. package/package.json +38 -15
  442. package/src/Directions.ts +8 -2
  443. package/src/EventType.ts +10 -0
  444. package/src/GestureHandlerRootView.android.tsx +9 -25
  445. package/src/GestureHandlerRootView.tsx +11 -2
  446. package/src/PlatformConstants.ts +3 -2
  447. package/src/RNGestureHandlerModule.ts +15 -9
  448. package/src/RNGestureHandlerModule.web.ts +1 -0
  449. package/src/components/DrawerLayout.tsx +114 -41
  450. package/src/components/GestureButtons.tsx +45 -5
  451. package/src/components/GestureComponents.tsx +47 -41
  452. package/src/components/Swipeable.tsx +108 -21
  453. package/src/components/touchables/GenericTouchable.tsx +3 -2
  454. package/src/components/touchables/TouchableOpacity.tsx +1 -1
  455. package/src/handlers/FlingGestureHandler.ts +57 -0
  456. package/src/handlers/ForceTouchGestureHandler.ts +83 -0
  457. package/src/handlers/LongPressGestureHandler.ts +84 -0
  458. package/src/handlers/NativeViewGestureHandler.ts +31 -7
  459. package/src/handlers/PanGestureHandler.ts +321 -0
  460. package/src/handlers/PinchGestureHandler.ts +46 -0
  461. package/src/handlers/RotationGestureHandler.ts +46 -0
  462. package/src/handlers/TapGestureHandler.ts +90 -0
  463. package/src/handlers/createHandler.ts +60 -81
  464. package/src/handlers/gestureHandlerCommon.ts +185 -0
  465. package/src/handlers/gestureHandlerTypesCompat.ts +19 -5
  466. package/src/handlers/gestures/GestureDetector.tsx +498 -0
  467. package/src/handlers/gestures/eventReceiver.ts +135 -0
  468. package/src/handlers/gestures/flingGesture.ts +27 -0
  469. package/src/handlers/gestures/forceTouchGesture.ts +32 -0
  470. package/src/handlers/gestures/gesture.ts +279 -0
  471. package/src/handlers/gestures/gestureComposition.ts +109 -0
  472. package/src/handlers/gestures/gestureObjects.ts +79 -0
  473. package/src/handlers/gestures/gestureStateManager.ts +60 -0
  474. package/src/handlers/gestures/longPressGesture.ts +27 -0
  475. package/src/handlers/gestures/manualGesture.ts +11 -0
  476. package/src/handlers/gestures/nativeGesture.ts +27 -0
  477. package/src/handlers/gestures/panGesture.ts +105 -0
  478. package/src/handlers/gestures/pinchGesture.ts +12 -0
  479. package/src/handlers/gestures/reanimatedWrapper.ts +45 -0
  480. package/src/handlers/gestures/rotationGesture.ts +12 -0
  481. package/src/handlers/gestures/tapGesture.ts +52 -0
  482. package/src/handlers/handlersRegistry.ts +22 -0
  483. package/src/index.ts +156 -0
  484. package/src/init.ts +5 -0
  485. package/src/mocks.ts +65 -0
  486. package/src/utils.ts +7 -0
  487. package/src/web/GestureHandler.ts +2 -3
  488. package/src/web/NativeViewGestureHandler.ts +1 -3
  489. package/src/web/NodeManager.ts +5 -0
  490. package/android/lib/src/main/java/com/swmansion/gesturehandler/BaseGestureHandlerInteractionController.java +0 -23
  491. package/android/lib/src/main/java/com/swmansion/gesturehandler/FlingGestureHandler.java +0 -110
  492. package/android/lib/src/main/java/com/swmansion/gesturehandler/GestureHandler.java +0 -531
  493. package/android/lib/src/main/java/com/swmansion/gesturehandler/GestureHandlerInteractionController.java +0 -8
  494. package/android/lib/src/main/java/com/swmansion/gesturehandler/GestureHandlerOrchestrator.java +0 -543
  495. package/android/lib/src/main/java/com/swmansion/gesturehandler/GestureHandlerRegistry.java +0 -10
  496. package/android/lib/src/main/java/com/swmansion/gesturehandler/GestureHandlerRegistryImpl.java +0 -29
  497. package/android/lib/src/main/java/com/swmansion/gesturehandler/GestureUtils.java +0 -53
  498. package/android/lib/src/main/java/com/swmansion/gesturehandler/LongPressGestureHandler.java +0 -81
  499. package/android/lib/src/main/java/com/swmansion/gesturehandler/NativeViewGestureHandler.java +0 -110
  500. package/android/lib/src/main/java/com/swmansion/gesturehandler/OnTouchEventListener.java +0 -8
  501. package/android/lib/src/main/java/com/swmansion/gesturehandler/PanGestureHandler.java +0 -312
  502. package/android/lib/src/main/java/com/swmansion/gesturehandler/PinchGestureHandler.java +0 -109
  503. package/android/lib/src/main/java/com/swmansion/gesturehandler/RotationGestureDetector.java +0 -169
  504. package/android/lib/src/main/java/com/swmansion/gesturehandler/RotationGestureHandler.java +0 -96
  505. package/android/lib/src/main/java/com/swmansion/gesturehandler/TapGestureHandler.java +0 -172
  506. package/android/lib/src/main/java/com/swmansion/gesturehandler/ViewConfigurationHelper.java +0 -10
  507. package/android/src/main/java/com/facebook/react/views/modal/RNGHModalUtils.java +0 -21
  508. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.java +0 -296
  509. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEnabledRootView.java +0 -72
  510. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEvent.java +0 -77
  511. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEventDataExtractor.java +0 -8
  512. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerInteractionManager.java +0 -86
  513. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.java +0 -731
  514. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerPackage.java +0 -31
  515. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRegistry.java +0 -101
  516. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootHelper.java +0 -151
  517. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootInterface.java +0 -7
  518. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootView.java +0 -76
  519. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootViewManager.java +0 -49
  520. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerStateChangeEvent.java +0 -82
  521. package/android/src/main/java/com/swmansion/gesturehandler/react/RNViewConfigurationHelper.java +0 -61
  522. package/dist/index.d.ts +0 -13
  523. package/dist/index.js +0 -16
  524. package/dist/src/Directions.d.ts +0 -7
  525. package/dist/src/Directions.js +0 -2
  526. package/dist/src/GestureHandlerRootView.android.d.ts +0 -4
  527. package/dist/src/GestureHandlerRootView.android.expo.d.ts +0 -2
  528. package/dist/src/GestureHandlerRootView.android.expo.js +0 -2
  529. package/dist/src/GestureHandlerRootView.android.js +0 -21
  530. package/dist/src/GestureHandlerRootView.d.ts +0 -2
  531. package/dist/src/GestureHandlerRootView.js +0 -2
  532. package/dist/src/PlatformConstants.js +0 -2
  533. package/dist/src/PlatformConstants.web.js +0 -5
  534. package/dist/src/RNGestureHandlerModule.js +0 -3
  535. package/dist/src/RNGestureHandlerModule.web.js +0 -47
  536. package/dist/src/State.js +0 -9
  537. package/dist/src/__mocks__/RNGestureHandlerModule.d.ts +0 -23
  538. package/dist/src/__mocks__/RNGestureHandlerModule.js +0 -25
  539. package/dist/src/components/DrawerLayout.js +0 -391
  540. package/dist/src/components/GestureButtons.js +0 -113
  541. package/dist/src/components/GestureComponents.d.ts +0 -45
  542. package/dist/src/components/GestureComponents.js +0 -18
  543. package/dist/src/components/GestureComponents.web.js +0 -18
  544. package/dist/src/components/GestureHandlerButton.web.js +0 -3
  545. package/dist/src/components/Swipeable.d.ts +0 -83
  546. package/dist/src/components/Swipeable.js +0 -249
  547. package/dist/src/components/touchables/GenericTouchable.js +0 -210
  548. package/dist/src/components/touchables/TouchableHighlight.js +0 -73
  549. package/dist/src/components/touchables/TouchableNativeFeedback.android.js +0 -63
  550. package/dist/src/components/touchables/TouchableOpacity.js +0 -50
  551. package/dist/src/components/touchables/TouchableWithoutFeedback.js +0 -5
  552. package/dist/src/gestureHandlerRootHOC.js +0 -17
  553. package/dist/src/handlers/NativeViewGestureHandler.d.ts +0 -12
  554. package/dist/src/handlers/NativeViewGestureHandler.js +0 -13
  555. package/dist/src/handlers/createHandler.js +0 -292
  556. package/dist/src/handlers/createNativeWrapper.js +0 -51
  557. package/dist/src/handlers/gestureHandlerTypesCompat.js +0 -1
  558. package/dist/src/handlers/gestureHandlers.d.ts +0 -158
  559. package/dist/src/handlers/gestureHandlers.js +0 -247
  560. package/dist/src/typeUtils.js +0 -1
  561. package/dist/src/web/DiscreteGestureHandler.js +0 -48
  562. package/dist/src/web/DraggingGestureHandler.js +0 -25
  563. package/dist/src/web/Errors.js +0 -5
  564. package/dist/src/web/FlingGestureHandler.js +0 -119
  565. package/dist/src/web/GestureHandler.js +0 -413
  566. package/dist/src/web/IndiscreteGestureHandler.js +0 -26
  567. package/dist/src/web/LongPressGestureHandler.js +0 -46
  568. package/dist/src/web/NativeViewGestureHandler.js +0 -39
  569. package/dist/src/web/NodeManager.js +0 -22
  570. package/dist/src/web/PanGestureHandler.js +0 -145
  571. package/dist/src/web/PinchGestureHandler.js +0 -19
  572. package/dist/src/web/PressGestureHandler.js +0 -135
  573. package/dist/src/web/RotationGestureHandler.js +0 -20
  574. package/dist/src/web/TapGestureHandler.js +0 -143
  575. package/dist/src/web/constants.js +0 -42
  576. package/dist/src/web/utils.js +0 -15
  577. package/index.ts +0 -117
  578. package/src/GestureHandlerRootView.android.expo.tsx +0 -3
  579. package/src/__mocks__/RNGestureHandlerModule.ts +0 -27
  580. package/src/handlers/gestureHandlers.ts +0 -511
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "react-native-gesture-handler",
3
- "version": "1.10.1",
3
+ "version": "2.1.0",
4
4
  "description": "Experimental implementation of a new declarative API for gesture handling in react-native",
5
5
  "scripts": {
6
- "prepare": "rm -r dist/ ; yarn build",
6
+ "prepare": "bob build",
7
7
  "test": "jest",
8
8
  "build": "yarn tsc",
9
9
  "precommit": "lint-staged",
@@ -11,19 +11,24 @@
11
11
  "ts-check": "yarn tsc --noEmit",
12
12
  "lint-check": "eslint --ext '.js,.ts,.tsx' src/ && yarn prettier --check src/"
13
13
  },
14
- "react-native": "index",
15
- "main": "dist/index.js",
16
- "types": "dist/index.d.ts",
14
+ "react-native": "src/index.ts",
15
+ "main": "lib/commonjs/index.js",
16
+ "module": "lib/module/index.js",
17
+ "types": "lib/typescript/index.d.ts",
17
18
  "files": [
19
+ "src",
20
+ "lib",
21
+ "!**/__tests__",
22
+ "!**/__fixtures__",
23
+ "!**/__mocks__",
18
24
  "android/build.gradle",
25
+ "android/gradle.properties",
19
26
  "android/src/main/AndroidManifest.xml",
20
27
  "android/src/main/java/",
21
28
  "android/lib/build.gradle",
22
29
  "android/lib/src/main/java/",
30
+ "android/common/src/main/java/",
23
31
  "ios/",
24
- "src/",
25
- "dist/",
26
- "index.ts",
27
32
  "Swipeable/",
28
33
  "DrawerLayout/",
29
34
  "README.md",
@@ -46,14 +51,16 @@
46
51
  "homepage": "https://github.com/software-mansion/react-native-gesture-handler#readme",
47
52
  "dependencies": {
48
53
  "@egjs/hammerjs": "^2.0.17",
49
- "@types/hammerjs": "^2.0.38",
50
- "fbjs": "^3.0.0",
51
54
  "hoist-non-react-statics": "^3.3.0",
52
55
  "invariant": "^2.2.4",
56
+ "lodash": "^4.17.21",
53
57
  "prop-types": "^15.7.2"
54
58
  },
55
59
  "jest": {
56
- "preset": "jest-react-native"
60
+ "preset": "jest-react-native",
61
+ "modulePathIgnorePatterns": [
62
+ "<rootDir>/lib/"
63
+ ]
57
64
  },
58
65
  "devDependencies": {
59
66
  "@babel/core": "^7.12.9",
@@ -61,10 +68,11 @@
61
68
  "@babel/preset-env": "^7.12.11",
62
69
  "@babel/preset-typescript": "^7.12.7",
63
70
  "@babel/runtime": "^7.12.5",
71
+ "@types/hammerjs": "^2.0.38",
64
72
  "@types/hoist-non-react-statics": "^3.3.1",
65
73
  "@types/jest": "^26.0.19",
66
74
  "@types/react": "^17.0.0",
67
- "@types/react-native": "^0.63.44",
75
+ "@types/react-native": "^0.64.2",
68
76
  "@types/react-test-renderer": "^17.0.0",
69
77
  "@typescript-eslint/eslint-plugin": "^4.10.0",
70
78
  "@typescript-eslint/parser": "^4.10.0",
@@ -83,14 +91,16 @@
83
91
  "prettier": "^2.2.1",
84
92
  "react": "^16.8.6",
85
93
  "react-dom": "^16.12.0",
86
- "react-native": "^0.63.4",
94
+ "react-native": "^0.64.0",
95
+ "react-native-builder-bob": "^0.17.1",
96
+ "react-native-reanimated": "^2.0.0",
87
97
  "react-native-web": "^0.11.7",
88
98
  "react-test-renderer": "16.8.6",
89
99
  "release-it": "^13.6.5",
90
100
  "typescript": "^4.1.2"
91
101
  },
92
102
  "lint-staged": {
93
- "*.js": [
103
+ "*.{ts,tsx}": [
94
104
  "prettier --write"
95
105
  ]
96
106
  },
@@ -100,5 +110,18 @@
100
110
  "# check if version corresponds to changes in native files \n if git diff --name-only ${latestVersion} HEAD | egrep \"(android/.*)|(ios/.*)\" -q; then egrep '\\.0$' -q <<< ${version}; else test $? -eq 1; fi"
101
111
  ]
102
112
  }
103
- }
113
+ },
114
+ "react-native-builder-bob": {
115
+ "source": "src",
116
+ "output": "lib",
117
+ "targets": [
118
+ "commonjs",
119
+ "module",
120
+ "typescript"
121
+ ]
122
+ },
123
+ "eslintIgnore": [
124
+ "node_modules/",
125
+ "lib/"
126
+ ]
104
127
  }
package/src/Directions.ts CHANGED
@@ -1,3 +1,9 @@
1
- import RNGestureHandlerModule from './RNGestureHandlerModule';
1
+ export const Directions = {
2
+ RIGHT: 1,
3
+ LEFT: 2,
4
+ UP: 4,
5
+ DOWN: 8,
6
+ } as const;
2
7
 
3
- export default RNGestureHandlerModule.Direction;
8
+ // eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; it can be used as a type and as a value
9
+ export type Directions = typeof Directions[keyof typeof Directions];
@@ -0,0 +1,10 @@
1
+ export const EventType = {
2
+ UNDETERMINED: 0,
3
+ TOUCHES_DOWN: 1,
4
+ TOUCHES_MOVE: 2,
5
+ TOUCHES_UP: 3,
6
+ TOUCHES_CANCELLED: 4,
7
+ } as const;
8
+
9
+ // eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; it can be used as a type and as a value
10
+ export type EventType = typeof EventType[keyof typeof EventType];
@@ -1,34 +1,18 @@
1
1
  import * as React from 'react';
2
- import { PropsWithChildren } from 'react';
3
- import { View, requireNativeComponent } from 'react-native';
2
+ import { requireNativeComponent } from 'react-native';
3
+ import { GestureHandlerRootViewProps } from './GestureHandlerRootView';
4
4
 
5
5
  const GestureHandlerRootViewNative = requireNativeComponent(
6
6
  'GestureHandlerRootView'
7
7
  );
8
8
 
9
- const GestureHandlerRootViewContext = React.createContext(false);
10
-
11
- type Props = PropsWithChildren<Record<string, unknown>>;
12
-
13
- export default function GestureHandlerRootView({ children, ...rest }: Props) {
9
+ export default function GestureHandlerRootView({
10
+ children,
11
+ ...rest
12
+ }: GestureHandlerRootViewProps) {
14
13
  return (
15
- <GestureHandlerRootViewContext.Consumer>
16
- {(available) => {
17
- if (available) {
18
- // If we already have a parent wrapped in the gesture handler root view,
19
- // We don't need to wrap it again in root view
20
- // We still wrap it in a normal view so our styling stays the same
21
- return <View {...rest}>{children}</View>;
22
- }
23
-
24
- return (
25
- <GestureHandlerRootViewContext.Provider value>
26
- <GestureHandlerRootViewNative {...rest}>
27
- {children}
28
- </GestureHandlerRootViewNative>
29
- </GestureHandlerRootViewContext.Provider>
30
- );
31
- }}
32
- </GestureHandlerRootViewContext.Consumer>
14
+ <GestureHandlerRootViewNative {...rest}>
15
+ {children}
16
+ </GestureHandlerRootViewNative>
33
17
  );
34
18
  }
@@ -1,3 +1,12 @@
1
- import { View } from 'react-native';
1
+ import * as React from 'react';
2
+ import { PropsWithChildren } from 'react';
3
+ import { View, ViewProps } from 'react-native';
2
4
 
3
- export default View;
5
+ export interface GestureHandlerRootViewProps
6
+ extends PropsWithChildren<ViewProps> {}
7
+
8
+ export default function GestureHandlerRootView({
9
+ ...rest
10
+ }: GestureHandlerRootViewProps) {
11
+ return <View {...rest} />;
12
+ }
@@ -1,7 +1,8 @@
1
- import { NativeModules } from 'react-native';
1
+ import { NativeModules, Platform } from 'react-native';
2
2
 
3
3
  type PlatformConstants = {
4
4
  forceTouchAvailable: boolean;
5
5
  };
6
6
 
7
- export default NativeModules.PlatformConstants as PlatformConstants;
7
+ export default (NativeModules?.PlatformConstants ??
8
+ Platform.constants) as PlatformConstants;
@@ -1,16 +1,18 @@
1
1
  import { NativeModules } from 'react-native';
2
-
3
2
  const { RNGestureHandlerModule } = NativeModules;
4
3
 
5
- type Directions = Readonly<{
6
- RIGHT: 1;
7
- LEFT: 2;
8
- UP: 4;
9
- DOWN: 8;
10
- }>;
4
+ if (RNGestureHandlerModule == null) {
5
+ console.error(
6
+ `react-native-gesture-handler module was not found. Make sure you're running your app on the native platform and your code is linked properly (cd ios && pod install && cd ..).
7
+
8
+ For installation instructions, please refer to https://docs.swmansion.com/react-native-gesture-handler/docs/#installation`
9
+ .split('\n')
10
+ .map((line) => line.trim())
11
+ .join('\n')
12
+ );
13
+ }
11
14
 
12
15
  export type RNGestureHandlerModuleProps = {
13
- Direction: Directions;
14
16
  handleSetJSResponder: (tag: number, blockNativeResponder: boolean) => void;
15
17
  handleClearJSResponder: () => void;
16
18
  createGestureHandler: (
@@ -18,7 +20,11 @@ export type RNGestureHandlerModuleProps = {
18
20
  handlerTag: number,
19
21
  config: Readonly<Record<string, unknown>>
20
22
  ) => void;
21
- attachGestureHandler: (handlerTag: number, newView: number) => void;
23
+ attachGestureHandler: (
24
+ handlerTag: number,
25
+ newView: number,
26
+ usingDeviceEvents: boolean
27
+ ) => void;
22
28
  updateGestureHandler: (
23
29
  handlerTag: number,
24
30
  newConfig: Readonly<Record<string, unknown>>
@@ -44,6 +44,7 @@ export default {
44
44
  attachGestureHandler(
45
45
  handlerTag: number,
46
46
  newView: number,
47
+ _usingDeviceEvents: boolean,
47
48
  propsRef: React.RefObject<unknown>
48
49
  ) {
49
50
  NodeManager.getHandler(handlerTag).setView(newView, propsRef);
@@ -1,10 +1,10 @@
1
1
  // This component is based on RN's DrawerLayoutAndroid API
2
2
  //
3
- // It perhaps deserves to be put in a separate repo, but since it relies
4
- // on react-native-gesture-handler library which isn't very popular at the
5
- // moment I decided to keep it here for the time being. It will allow us
6
- // to move faster and fix issues that may arise in gesture handler library
7
- // that could be found when using the drawer component
3
+ // It perhaps deserves to be put in a separate repo, but since it relies on
4
+ // react-native-gesture-handler library which isn't very popular at the moment I
5
+ // decided to keep it here for the time being. It will allow us to move faster
6
+ // and fix issues that may arise in gesture handler library that could be found
7
+ // when using the drawer component
8
8
 
9
9
  import * as React from 'react';
10
10
  import { Component } from 'react';
@@ -25,12 +25,16 @@ import {
25
25
 
26
26
  import {
27
27
  GestureEvent,
28
+ HandlerStateChangeEvent,
29
+ } from '../handlers/gestureHandlerCommon';
30
+ import {
28
31
  PanGestureHandler,
29
32
  PanGestureHandlerEventPayload,
33
+ } from '../handlers/PanGestureHandler';
34
+ import {
30
35
  TapGestureHandler,
31
- HandlerStateChangeEvent,
32
36
  TapGestureHandlerEventPayload,
33
- } from '../handlers/gestureHandlers';
37
+ } from '../handlers/TapGestureHandler';
34
38
  import { State } from '../State';
35
39
 
36
40
  const DRAG_TOSS = 0.05;
@@ -50,16 +54,42 @@ export type DrawerLockMode = 'unlocked' | 'locked-closed' | 'locked-open';
50
54
  export type DrawerKeyboardDismissMode = 'none' | 'on-drag';
51
55
 
52
56
  export interface DrawerLayoutProps {
57
+ /**
58
+ * This attribute is present in the standard implementation already and is one
59
+ * of the required params. Gesture handler version of DrawerLayout make it
60
+ * possible for the function passed as `renderNavigationView` to take an
61
+ * Animated value as a parameter that indicates the progress of drawer
62
+ * opening/closing animation (progress value is 0 when closed and 1 when
63
+ * opened). This can be used by the drawer component to animated its children
64
+ * while the drawer is opening or closing.
65
+ */
53
66
  renderNavigationView: (
54
67
  progressAnimatedValue: Animated.Value
55
68
  ) => React.ReactNode;
69
+
56
70
  drawerPosition?: DrawerPosition;
71
+
57
72
  drawerWidth?: number;
73
+
58
74
  drawerBackgroundColor?: string;
75
+
59
76
  drawerLockMode?: DrawerLockMode;
77
+
60
78
  keyboardDismissMode?: DrawerKeyboardDismissMode;
79
+
80
+ /**
81
+ * Called when the drawer is closed.
82
+ */
61
83
  onDrawerClose?: () => void;
84
+
85
+ /**
86
+ * Called when the drawer is opened.
87
+ */
62
88
  onDrawerOpen?: () => void;
89
+
90
+ /**
91
+ * Called when the status of the drawer changes.
92
+ */
63
93
  onDrawerStateChanged?: (
64
94
  newState: DrawerState,
65
95
  drawerWillShow: boolean
@@ -67,15 +97,56 @@ export interface DrawerLayoutProps {
67
97
  useNativeAnimations?: boolean;
68
98
 
69
99
  drawerType?: DrawerType;
100
+
101
+ /**
102
+ * Defines how far from the edge of the content view the gesture should
103
+ * activate.
104
+ */
70
105
  edgeWidth?: number;
106
+
71
107
  minSwipeDistance?: number;
108
+
109
+ /**
110
+ * When set to true Drawer component will use
111
+ * {@link https://reactnative.dev/docs/statusbar StatusBar} API to hide the OS
112
+ * status bar whenever the drawer is pulled or when its in an "open" state.
113
+ */
72
114
  hideStatusBar?: boolean;
115
+
116
+ /**
117
+ * @default 'slide'
118
+ *
119
+ * Can be used when hideStatusBar is set to true and will select the animation
120
+ * used for hiding/showing the status bar. See
121
+ * {@link https://reactnative.dev/docs/statusbar StatusBar} documentation for
122
+ * more details
123
+ */
73
124
  statusBarAnimation?: StatusBarAnimation;
125
+
126
+ /**
127
+ * @default black
128
+ *
129
+ * Color of a semi-transparent overlay to be displayed on top of the content
130
+ * view when drawer gets open. A solid color should be used as the opacity is
131
+ * added by the Drawer itself and the opacity of the overlay is animated (from
132
+ * 0% to 70%).
133
+ */
74
134
  overlayColor?: string;
135
+
75
136
  contentContainerStyle?: StyleProp<ViewStyle>;
137
+
76
138
  drawerContainerStyle?: StyleProp<ViewStyle>;
139
+
140
+ /**
141
+ * Enables two-finger gestures on supported devices, for example iPads with
142
+ * trackpads. If not enabled the gesture will require click + drag, with
143
+ * `enableTrackpadTwoFingerGesture` swiping with two fingers will also trigger
144
+ * the gesture.
145
+ */
77
146
  enableTrackpadTwoFingerGesture?: boolean;
147
+
78
148
  onDrawerSlide?: (position: number) => void;
149
+
79
150
  onGestureRef?: (ref: PanGestureHandler) => void;
80
151
  }
81
152
 
@@ -168,13 +239,12 @@ export default class DrawerLayout extends Component<
168
239
  let touchX = touchXValue;
169
240
 
170
241
  if (drawerPosition !== 'left') {
171
- // Most of the code is written in a way to handle left-side drawer.
172
- // In order to handle right-side drawer the only thing we need to
173
- // do is to reverse events coming from gesture handler in a way they
174
- // emulate left-side drawer gestures. E.g. dragX is simply -dragX, and
175
- // touchX is calulcated by subtracing real touchX from the width of the
176
- // container (such that when touch happens at the right edge the value
177
- // is simply 0)
242
+ // Most of the code is written in a way to handle left-side drawer. In
243
+ // order to handle right-side drawer the only thing we need to do is to
244
+ // reverse events coming from gesture handler in a way they emulate
245
+ // left-side drawer gestures. E.g. dragX is simply -dragX, and touchX is
246
+ // calulcated by subtracing real touchX from the width of the container
247
+ // (such that when touch happens at the right edge the value is simply 0)
178
248
  dragX = Animated.multiply(
179
249
  new Animated.Value(-1),
180
250
  dragXValue
@@ -204,11 +274,12 @@ export default class DrawerLayout extends Component<
204
274
  // |XXXXXXXX|......| |XXXXXXXX|......| |XXXXXXXX|......| |XXXXX|.........|
205
275
  // +---------------+ +---------------+ +---------------+ +---------------+
206
276
  //
207
- // For the above to work properly we define animated value that will keep start position
208
- // of the gesture. Then we use that value to calculate how much we need to subtract from
209
- // the dragX. If the gesture started on the greyed out area we take the distance from the
210
- // edge of the drawer to the start position. Otherwise we don't subtract at all and the
211
- // drawer be pulled back as soon as you start the pan.
277
+ // For the above to work properly we define animated value that will keep
278
+ // start position of the gesture. Then we use that value to calculate how
279
+ // much we need to subtract from the dragX. If the gesture started on the
280
+ // greyed out area we take the distance from the edge of the drawer to the
281
+ // start position. Otherwise we don't subtract at all and the drawer be
282
+ // pulled back as soon as you start the pan.
212
283
  //
213
284
  // This is used only when drawerType is "front"
214
285
  //
@@ -345,14 +416,14 @@ export default class DrawerLayout extends Component<
345
416
  });
346
417
  const { drawerPosition, minSwipeDistance, edgeWidth } = this.props;
347
418
  const fromLeft = drawerPosition === 'left';
348
- // gestureOrientation is 1 if the expected gesture is from left to right and -1 otherwise
349
- // e.g. when drawer is on the left and is closed we expect left to right gesture, thus
350
- // orientation will be 1.
419
+ // gestureOrientation is 1 if the expected gesture is from left to right and
420
+ // -1 otherwise e.g. when drawer is on the left and is closed we expect left
421
+ // to right gesture, thus orientation will be 1.
351
422
  const gestureOrientation =
352
423
  (fromLeft ? 1 : -1) * (this.drawerShown ? -1 : 1);
353
- // When drawer is closed we want the hitSlop to be horizontally shorter
354
- // than the container size by the value of SLOP. This will make it only
355
- // activate when gesture happens not further than SLOP away from the edge
424
+ // When drawer is closed we want the hitSlop to be horizontally shorter than
425
+ // the container size by the value of SLOP. This will make it only activate
426
+ // when gesture happens not further than SLOP away from the edge
356
427
  const hitSlop = fromLeft
357
428
  ? { left: 0, width: showing ? undefined : edgeWidth }
358
429
  : { right: 0, width: showing ? undefined : edgeWidth };
@@ -377,10 +448,10 @@ export default class DrawerLayout extends Component<
377
448
  if (fromValue != null) {
378
449
  let nextFramePosition = fromValue;
379
450
  if (this.props.useNativeAnimations) {
380
- // When using native driver, we predict the next position of the animation
381
- // because it takes one frame of a roundtrip to pass RELEASE event from
382
- // native driver to JS before we can start animating. Without it, it is more
383
- // noticable that the frame is dropped.
451
+ // When using native driver, we predict the next position of the
452
+ // animation because it takes one frame of a roundtrip to pass RELEASE
453
+ // event from native driver to JS before we can start animating. Without
454
+ // it, it is more noticable that the frame is dropped.
384
455
  if (fromValue < toValue && velocity > 0) {
385
456
  nextFramePosition = Math.min(fromValue + velocity / 60.0, toValue);
386
457
  } else if (fromValue > toValue && velocity < 0) {
@@ -422,7 +493,8 @@ export default class DrawerLayout extends Component<
422
493
  options.velocity ? options.velocity : 0
423
494
  );
424
495
 
425
- // We need to force the update, otherwise the overlay is not rerendered and it would not be clickable
496
+ // We need to force the update, otherwise the overlay is not rerendered and
497
+ // it would not be clickable
426
498
  this.forceUpdate();
427
499
  };
428
500
 
@@ -430,7 +502,8 @@ export default class DrawerLayout extends Component<
430
502
  // TODO: decide if it should be null or undefined is the proper value
431
503
  this.animateDrawer(undefined, 0, options.velocity ? options.velocity : 0);
432
504
 
433
- // We need to force the update, otherwise the overlay is not rerendered and it would be still clickable
505
+ // We need to force the update, otherwise the overlay is not rerendered and
506
+ // it would be still clickable
434
507
  this.forceUpdate();
435
508
  };
436
509
 
@@ -474,8 +547,8 @@ export default class DrawerLayout extends Component<
474
547
 
475
548
  // we rely on row and row-reverse flex directions to position the drawer
476
549
  // properly. Apparently for RTL these are flipped which requires us to use
477
- // the opposite setting for the drawer to appear from left or right according
478
- // to the drawerPosition prop
550
+ // the opposite setting for the drawer to appear from left or right
551
+ // according to the drawerPosition prop
479
552
  const reverseContentDirection = I18nManager.isRTL ? fromLeft : !fromLeft;
480
553
 
481
554
  const dynamicDrawerStyles = {
@@ -546,8 +619,8 @@ export default class DrawerLayout extends Component<
546
619
  };
547
620
 
548
621
  private setPanGestureRef = (ref: PanGestureHandler) => {
549
- // TODO(TS): make sure it is OK
550
- // taken from https://github.com/DefinitelyTyped/DefinitelyTyped/issues/31065#issuecomment-596081842
622
+ // TODO(TS): make sure it is OK taken from
623
+ // https://github.com/DefinitelyTyped/DefinitelyTyped/issues/31065#issuecomment-596081842
551
624
  (this
552
625
  .panGestureHandler as React.MutableRefObject<PanGestureHandler>).current = ref;
553
626
  this.props.onGestureRef?.(ref);
@@ -563,15 +636,15 @@ export default class DrawerLayout extends Component<
563
636
 
564
637
  const fromLeft = drawerPosition === 'left';
565
638
 
566
- // gestureOrientation is 1 if the expected gesture is from left to right and -1 otherwise
567
- // e.g. when drawer is on the left and is closed we expect left to right gesture, thus
568
- // orientation will be 1.
639
+ // gestureOrientation is 1 if the expected gesture is from left to right and
640
+ // -1 otherwise e.g. when drawer is on the left and is closed we expect left
641
+ // to right gesture, thus orientation will be 1.
569
642
  const gestureOrientation =
570
643
  (fromLeft ? 1 : -1) * (this.drawerShown ? -1 : 1);
571
644
 
572
- // When drawer is closed we want the hitSlop to be horizontally shorter
573
- // than the container size by the value of SLOP. This will make it only
574
- // activate when gesture happens not further than SLOP away from the edge
645
+ // When drawer is closed we want the hitSlop to be horizontally shorter than
646
+ // the container size by the value of SLOP. This will make it only activate
647
+ // when gesture happens not further than SLOP away from the edge
575
648
  const hitSlop = fromLeft
576
649
  ? { left: 0, width: this.drawerShown ? undefined : edgeWidth }
577
650
  : { right: 0, width: this.drawerShown ? undefined : edgeWidth };
@@ -15,32 +15,72 @@ import { State } from '../State';
15
15
  import {
16
16
  GestureEvent,
17
17
  HandlerStateChangeEvent,
18
- } from '../handlers/gestureHandlers';
18
+ } from '../handlers/gestureHandlerCommon';
19
19
  import {
20
20
  NativeViewGestureHandlerPayload,
21
21
  NativeViewGestureHandlerProps,
22
22
  } from '../handlers/NativeViewGestureHandler';
23
23
 
24
24
  export interface RawButtonProps extends NativeViewGestureHandlerProps {
25
+ /**
26
+ * Defines if more than one button could be pressed simultaneously. By default
27
+ * set true.
28
+ */
25
29
  exclusive?: boolean;
26
30
  // TODO: we should transform props in `createNativeWrapper`
31
+
32
+ /**
33
+ * Android only.
34
+ *
35
+ * Defines color of native ripple animation used since API level 21.
36
+ */
27
37
  rippleColor?: any; // it was present in BaseButtonProps before but is used here in code
28
38
  }
29
39
 
30
40
  export interface BaseButtonProps extends RawButtonProps {
41
+ /**
42
+ * Called when the button gets pressed (analogous to `onPress` in
43
+ * `TouchableHighlight` from RN core).
44
+ */
31
45
  onPress?: (pointerInside: boolean) => void;
46
+
47
+ /**
48
+ * Called when button changes from inactive to active and vice versa. It
49
+ * passes active state as a boolean variable as a first parameter for that
50
+ * method.
51
+ */
32
52
  onActiveStateChange?: (active: boolean) => void;
33
53
  style?: StyleProp<ViewStyle>;
34
54
  testID?: string;
35
55
  }
36
56
 
37
57
  export interface RectButtonProps extends BaseButtonProps {
58
+ /**
59
+ * Background color that will be dimmed when button is in active state.
60
+ */
38
61
  underlayColor?: string;
62
+
63
+ /**
64
+ * iOS only.
65
+ *
66
+ * Opacity applied to the underlay when button is in active state.
67
+ */
39
68
  activeOpacity?: number;
40
69
  }
41
70
 
42
71
  export interface BorderlessButtonProps extends BaseButtonProps {
72
+ /**
73
+ * Android only.
74
+ *
75
+ * Set this to false if you want the ripple animation to render only within view bounds.
76
+ */
43
77
  borderless?: boolean;
78
+
79
+ /**
80
+ * iOS only.
81
+ *
82
+ * Opacity applied to the button when it is in an active state.
83
+ */
44
84
  activeOpacity?: number;
45
85
  }
46
86
 
@@ -79,10 +119,10 @@ export class BaseButton extends React.Component<BaseButtonProps> {
79
119
  this.lastActive = active;
80
120
  };
81
121
 
82
- // Normally, the parent would execute it's handler first,
83
- // then forward the event to listeners. However, here our handler
84
- // is virtually only forwarding events to listeners, so we reverse the order
85
- // to keep the proper order of the callbacks (from "raw" ones to "processed").
122
+ // Normally, the parent would execute it's handler first, then forward the
123
+ // event to listeners. However, here our handler is virtually only forwarding
124
+ // events to listeners, so we reverse the order to keep the proper order of
125
+ // the callbacks (from "raw" ones to "processed").
86
126
  private onHandlerStateChange = (
87
127
  e: HandlerStateChangeEvent<NativeViewGestureHandlerPayload>
88
128
  ) => {