react-native-gesture-handler 2.16.0 → 2.16.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (255) hide show
  1. package/README.md +1 -0
  2. package/lib/commonjs/RNGestureHandlerModule.js +97 -4
  3. package/lib/commonjs/RNGestureHandlerModule.js.map +1 -1
  4. package/lib/commonjs/RNGestureHandlerModule.native.js +16 -0
  5. package/lib/commonjs/RNGestureHandlerModule.native.js.map +1 -0
  6. package/lib/commonjs/RNRenderer.js +5 -10
  7. package/lib/commonjs/RNRenderer.js.map +1 -1
  8. package/lib/commonjs/RNRenderer.native.js +16 -0
  9. package/lib/commonjs/RNRenderer.native.js.map +1 -0
  10. package/lib/commonjs/components/GestureComponents.js +19 -82
  11. package/lib/commonjs/components/GestureComponents.js.map +1 -1
  12. package/lib/commonjs/components/GestureComponents.native.js +115 -0
  13. package/lib/commonjs/components/GestureComponents.native.js.map +1 -0
  14. package/lib/commonjs/components/GestureHandlerButton.js +13 -3
  15. package/lib/commonjs/components/GestureHandlerButton.js.map +1 -1
  16. package/lib/commonjs/components/GestureHandlerButton.native.js +14 -0
  17. package/lib/commonjs/components/GestureHandlerButton.native.js.map +1 -0
  18. package/lib/commonjs/components/GestureHandlerRootView.js +0 -6
  19. package/lib/commonjs/components/GestureHandlerRootView.js.map +1 -1
  20. package/lib/commonjs/components/{GestureHandlerRootView.web.js → GestureHandlerRootView.native.js} +7 -1
  21. package/lib/commonjs/components/GestureHandlerRootView.native.js.map +1 -0
  22. package/lib/commonjs/getReactNativeVersion.js +1 -12
  23. package/lib/commonjs/getReactNativeVersion.js.map +1 -1
  24. package/lib/commonjs/getReactNativeVersion.native.js +22 -0
  25. package/lib/commonjs/getReactNativeVersion.native.js.map +1 -0
  26. package/lib/commonjs/getShadowNodeFromRef.js +5 -34
  27. package/lib/commonjs/getShadowNodeFromRef.js.map +1 -1
  28. package/lib/commonjs/getShadowNodeFromRef.native.js +44 -0
  29. package/lib/commonjs/getShadowNodeFromRef.native.js.map +1 -0
  30. package/lib/commonjs/handlers/PanGestureHandler.js.map +1 -1
  31. package/lib/commonjs/handlers/PressabilityDebugView.js +5 -7
  32. package/lib/commonjs/handlers/PressabilityDebugView.js.map +1 -1
  33. package/lib/commonjs/handlers/PressabilityDebugView.native.js +14 -0
  34. package/lib/commonjs/handlers/PressabilityDebugView.native.js.map +1 -0
  35. package/lib/commonjs/handlers/createHandler.js +9 -3
  36. package/lib/commonjs/handlers/createHandler.js.map +1 -1
  37. package/lib/commonjs/handlers/customDirectEventTypes.js +5 -8
  38. package/lib/commonjs/handlers/customDirectEventTypes.js.map +1 -1
  39. package/lib/commonjs/handlers/customDirectEventTypes.native.js +14 -0
  40. package/lib/commonjs/handlers/customDirectEventTypes.native.js.map +1 -0
  41. package/lib/commonjs/handlers/gestures/GestureDetector.js +15 -0
  42. package/lib/commonjs/handlers/gestures/GestureDetector.js.map +1 -1
  43. package/lib/commonjs/handlers/gestures/flingGesture.js +13 -0
  44. package/lib/commonjs/handlers/gestures/flingGesture.js.map +1 -1
  45. package/lib/commonjs/handlers/gestures/forceTouchGesture.js +17 -0
  46. package/lib/commonjs/handlers/gestures/forceTouchGesture.js.map +1 -1
  47. package/lib/commonjs/handlers/gestures/gesture.js +135 -0
  48. package/lib/commonjs/handlers/gestures/gesture.js.map +1 -1
  49. package/lib/commonjs/handlers/gestures/gestureObjects.js +66 -0
  50. package/lib/commonjs/handlers/gestures/gestureObjects.js.map +1 -1
  51. package/lib/commonjs/handlers/gestures/gestureStateManager.web.js +1 -1
  52. package/lib/commonjs/handlers/gestures/gestureStateManager.web.js.map +1 -1
  53. package/lib/commonjs/handlers/gestures/hoverGesture.js +1 -1
  54. package/lib/commonjs/handlers/gestures/hoverGesture.js.map +1 -1
  55. package/lib/commonjs/handlers/gestures/longPressGesture.js +12 -0
  56. package/lib/commonjs/handlers/gestures/longPressGesture.js.map +1 -1
  57. package/lib/commonjs/handlers/gestures/nativeGesture.js +10 -0
  58. package/lib/commonjs/handlers/gestures/nativeGesture.js.map +1 -1
  59. package/lib/commonjs/handlers/gestures/panGesture.js +76 -0
  60. package/lib/commonjs/handlers/gestures/panGesture.js.map +1 -1
  61. package/lib/commonjs/handlers/gestures/tapGesture.js +42 -0
  62. package/lib/commonjs/handlers/gestures/tapGesture.js.map +1 -1
  63. package/lib/commonjs/utils.js +5 -1
  64. package/lib/commonjs/utils.js.map +1 -1
  65. package/lib/commonjs/web/handlers/GestureHandler.js +7 -7
  66. package/lib/commonjs/web/handlers/GestureHandler.js.map +1 -1
  67. package/lib/commonjs/web/handlers/PanGestureHandler.js +3 -1
  68. package/lib/commonjs/web/handlers/PanGestureHandler.js.map +1 -1
  69. package/lib/commonjs/web/interfaces.js.map +1 -1
  70. package/lib/module/RNGestureHandlerModule.js +84 -4
  71. package/lib/module/RNGestureHandlerModule.js.map +1 -1
  72. package/lib/module/RNGestureHandlerModule.native.js +5 -0
  73. package/lib/module/RNGestureHandlerModule.native.js.map +1 -0
  74. package/lib/module/RNRenderer.js +3 -3
  75. package/lib/module/RNRenderer.js.map +1 -1
  76. package/lib/module/RNRenderer.native.js +4 -0
  77. package/lib/module/RNRenderer.native.js.map +1 -0
  78. package/lib/module/components/GestureComponents.js +18 -80
  79. package/lib/module/components/GestureComponents.js.map +1 -1
  80. package/lib/module/components/GestureComponents.native.js +90 -0
  81. package/lib/module/components/GestureComponents.native.js.map +1 -0
  82. package/lib/module/components/GestureHandlerButton.js +8 -2
  83. package/lib/module/components/GestureHandlerButton.js.map +1 -1
  84. package/lib/module/components/GestureHandlerButton.native.js +3 -0
  85. package/lib/module/components/GestureHandlerButton.native.js.map +1 -0
  86. package/lib/module/components/GestureHandlerRootView.js +0 -5
  87. package/lib/module/components/GestureHandlerRootView.js.map +1 -1
  88. package/lib/module/components/{GestureHandlerRootView.web.js → GestureHandlerRootView.native.js} +6 -1
  89. package/lib/module/components/GestureHandlerRootView.native.js.map +1 -0
  90. package/lib/module/getReactNativeVersion.js +1 -7
  91. package/lib/module/getReactNativeVersion.js.map +1 -1
  92. package/lib/module/getReactNativeVersion.native.js +10 -0
  93. package/lib/module/getReactNativeVersion.native.js.map +1 -0
  94. package/lib/module/getShadowNodeFromRef.js +4 -33
  95. package/lib/module/getShadowNodeFromRef.js.map +1 -1
  96. package/lib/module/getShadowNodeFromRef.native.js +37 -0
  97. package/lib/module/getShadowNodeFromRef.native.js.map +1 -0
  98. package/lib/module/handlers/PanGestureHandler.js.map +1 -1
  99. package/lib/module/handlers/PressabilityDebugView.js +4 -2
  100. package/lib/module/handlers/PressabilityDebugView.js.map +1 -1
  101. package/lib/module/handlers/PressabilityDebugView.native.js +3 -0
  102. package/lib/module/handlers/PressabilityDebugView.native.js.map +1 -0
  103. package/lib/module/handlers/createHandler.js +9 -3
  104. package/lib/module/handlers/createHandler.js.map +1 -1
  105. package/lib/module/handlers/customDirectEventTypes.js +4 -2
  106. package/lib/module/handlers/customDirectEventTypes.js.map +1 -1
  107. package/lib/module/handlers/customDirectEventTypes.native.js +3 -0
  108. package/lib/module/handlers/customDirectEventTypes.native.js.map +1 -0
  109. package/lib/module/handlers/gestures/GestureDetector.js +15 -0
  110. package/lib/module/handlers/gestures/GestureDetector.js.map +1 -1
  111. package/lib/module/handlers/gestures/flingGesture.js +13 -0
  112. package/lib/module/handlers/gestures/flingGesture.js.map +1 -1
  113. package/lib/module/handlers/gestures/forceTouchGesture.js +17 -0
  114. package/lib/module/handlers/gestures/forceTouchGesture.js.map +1 -1
  115. package/lib/module/handlers/gestures/gesture.js +135 -0
  116. package/lib/module/handlers/gestures/gesture.js.map +1 -1
  117. package/lib/module/handlers/gestures/gestureObjects.js +67 -0
  118. package/lib/module/handlers/gestures/gestureObjects.js.map +1 -1
  119. package/lib/module/handlers/gestures/gestureStateManager.web.js +1 -1
  120. package/lib/module/handlers/gestures/gestureStateManager.web.js.map +1 -1
  121. package/lib/module/handlers/gestures/hoverGesture.js +1 -1
  122. package/lib/module/handlers/gestures/hoverGesture.js.map +1 -1
  123. package/lib/module/handlers/gestures/longPressGesture.js +12 -0
  124. package/lib/module/handlers/gestures/longPressGesture.js.map +1 -1
  125. package/lib/module/handlers/gestures/nativeGesture.js +10 -0
  126. package/lib/module/handlers/gestures/nativeGesture.js.map +1 -1
  127. package/lib/module/handlers/gestures/panGesture.js +76 -0
  128. package/lib/module/handlers/gestures/panGesture.js.map +1 -1
  129. package/lib/module/handlers/gestures/tapGesture.js +42 -0
  130. package/lib/module/handlers/gestures/tapGesture.js.map +1 -1
  131. package/lib/module/utils.js +5 -1
  132. package/lib/module/utils.js.map +1 -1
  133. package/lib/module/web/handlers/GestureHandler.js +7 -7
  134. package/lib/module/web/handlers/GestureHandler.js.map +1 -1
  135. package/lib/module/web/handlers/PanGestureHandler.js +3 -1
  136. package/lib/module/web/handlers/PanGestureHandler.js.map +1 -1
  137. package/lib/module/web/interfaces.js.map +1 -1
  138. package/lib/typescript/RNGestureHandlerModule.d.ts +15 -2
  139. package/lib/typescript/RNGestureHandlerModule.native.d.ts +2 -0
  140. package/lib/typescript/RNRenderer.d.ts +3 -1
  141. package/lib/typescript/RNRenderer.native.d.ts +1 -0
  142. package/lib/typescript/components/GestureComponents.d.ts +7 -21
  143. package/lib/typescript/components/GestureComponents.native.d.ts +22 -0
  144. package/lib/typescript/components/GestureHandlerButton.d.ts +3 -3
  145. package/lib/typescript/components/GestureHandlerButton.native.d.ts +4 -0
  146. package/lib/typescript/getReactNativeVersion.d.ts +1 -4
  147. package/lib/typescript/getReactNativeVersion.native.d.ts +4 -0
  148. package/lib/typescript/getShadowNodeFromRef.d.ts +1 -1
  149. package/lib/typescript/getShadowNodeFromRef.native.d.ts +1 -0
  150. package/lib/typescript/handlers/PanGestureHandler.d.ts +4 -4
  151. package/lib/typescript/handlers/PressabilityDebugView.d.ts +1 -1
  152. package/lib/typescript/handlers/PressabilityDebugView.native.d.ts +1 -0
  153. package/lib/typescript/handlers/customDirectEventTypes.d.ts +2 -1
  154. package/lib/typescript/handlers/customDirectEventTypes.native.d.ts +1 -0
  155. package/lib/typescript/handlers/gestures/GestureDetector.d.ts +36 -0
  156. package/lib/typescript/handlers/gestures/flingGesture.d.ts +11 -0
  157. package/lib/typescript/handlers/gestures/forceTouchGesture.d.ts +14 -0
  158. package/lib/typescript/handlers/gestures/gesture.d.ts +113 -0
  159. package/lib/typescript/handlers/gestures/gestureObjects.d.ts +57 -0
  160. package/lib/typescript/handlers/gestures/hoverGesture.d.ts +1 -1
  161. package/lib/typescript/handlers/gestures/longPressGesture.d.ts +10 -0
  162. package/lib/typescript/handlers/gestures/nativeGesture.d.ts +8 -0
  163. package/lib/typescript/handlers/gestures/panGesture.d.ts +67 -4
  164. package/lib/typescript/handlers/gestures/tapGesture.d.ts +35 -0
  165. package/lib/typescript/web/handlers/GestureHandler.d.ts +2 -2
  166. package/lib/typescript/web/handlers/IGestureHandler.d.ts +1 -1
  167. package/lib/typescript/web/interfaces.d.ts +1 -0
  168. package/package.json +3 -2
  169. package/src/RNGestureHandlerModule.native.ts +5 -0
  170. package/src/RNGestureHandlerModule.ts +104 -4
  171. package/src/RNRenderer.native.ts +3 -0
  172. package/src/RNRenderer.ts +3 -3
  173. package/src/components/GestureComponents.native.tsx +148 -0
  174. package/src/components/GestureComponents.tsx +24 -131
  175. package/src/components/GestureHandlerButton.native.tsx +5 -0
  176. package/src/components/GestureHandlerButton.tsx +5 -4
  177. package/src/components/{GestureHandlerRootView.web.tsx → GestureHandlerRootView.native.tsx} +6 -0
  178. package/src/components/GestureHandlerRootView.tsx +0 -6
  179. package/src/getReactNativeVersion.native.ts +11 -0
  180. package/src/getReactNativeVersion.ts +1 -9
  181. package/src/getShadowNodeFromRef.native.ts +44 -0
  182. package/src/getShadowNodeFromRef.ts +4 -41
  183. package/src/handlers/PanGestureHandler.ts +8 -4
  184. package/src/handlers/PressabilityDebugView.native.tsx +2 -0
  185. package/src/handlers/PressabilityDebugView.tsx +4 -2
  186. package/src/handlers/createHandler.tsx +14 -10
  187. package/src/handlers/customDirectEventTypes.native.ts +2 -0
  188. package/src/handlers/customDirectEventTypes.ts +5 -2
  189. package/src/handlers/gestures/GestureDetector.tsx +47 -4
  190. package/src/handlers/gestures/flingGesture.ts +11 -0
  191. package/src/handlers/gestures/forceTouchGesture.ts +14 -0
  192. package/src/handlers/gestures/gesture.ts +113 -0
  193. package/src/handlers/gestures/gestureObjects.ts +57 -0
  194. package/src/handlers/gestures/gestureStateManager.web.ts +1 -1
  195. package/src/handlers/gestures/hoverGesture.ts +1 -1
  196. package/src/handlers/gestures/longPressGesture.ts +10 -0
  197. package/src/handlers/gestures/nativeGesture.ts +8 -0
  198. package/src/handlers/gestures/panGesture.ts +75 -4
  199. package/src/handlers/gestures/tapGesture.ts +35 -0
  200. package/src/utils.ts +9 -2
  201. package/src/web/handlers/GestureHandler.ts +9 -9
  202. package/src/web/handlers/IGestureHandler.ts +1 -1
  203. package/src/web/handlers/PanGestureHandler.ts +4 -0
  204. package/src/web/interfaces.ts +1 -0
  205. package/lib/commonjs/RNGestureHandlerModule.web.js +0 -109
  206. package/lib/commonjs/RNGestureHandlerModule.web.js.map +0 -1
  207. package/lib/commonjs/RNRenderer.web.js +0 -11
  208. package/lib/commonjs/RNRenderer.web.js.map +0 -1
  209. package/lib/commonjs/components/GestureComponents.web.js +0 -52
  210. package/lib/commonjs/components/GestureComponents.web.js.map +0 -1
  211. package/lib/commonjs/components/GestureHandlerButton.web.js +0 -24
  212. package/lib/commonjs/components/GestureHandlerButton.web.js.map +0 -1
  213. package/lib/commonjs/components/GestureHandlerRootView.web.js.map +0 -1
  214. package/lib/commonjs/getReactNativeVersion.web.js +0 -11
  215. package/lib/commonjs/getReactNativeVersion.web.js.map +0 -1
  216. package/lib/commonjs/getShadowNodeFromRef.web.js +0 -15
  217. package/lib/commonjs/getShadowNodeFromRef.web.js.map +0 -1
  218. package/lib/commonjs/handlers/PressabilityDebugView.web.js +0 -12
  219. package/lib/commonjs/handlers/PressabilityDebugView.web.js.map +0 -1
  220. package/lib/commonjs/handlers/customDirectEventTypes.web.js +0 -11
  221. package/lib/commonjs/handlers/customDirectEventTypes.web.js.map +0 -1
  222. package/lib/module/RNGestureHandlerModule.web.js +0 -85
  223. package/lib/module/RNGestureHandlerModule.web.js.map +0 -1
  224. package/lib/module/RNRenderer.web.js +0 -4
  225. package/lib/module/RNRenderer.web.js.map +0 -1
  226. package/lib/module/components/GestureComponents.web.js +0 -28
  227. package/lib/module/components/GestureComponents.web.js.map +0 -1
  228. package/lib/module/components/GestureHandlerButton.web.js +0 -9
  229. package/lib/module/components/GestureHandlerButton.web.js.map +0 -1
  230. package/lib/module/components/GestureHandlerRootView.web.js.map +0 -1
  231. package/lib/module/getReactNativeVersion.web.js +0 -4
  232. package/lib/module/getReactNativeVersion.web.js.map +0 -1
  233. package/lib/module/getShadowNodeFromRef.web.js +0 -8
  234. package/lib/module/getShadowNodeFromRef.web.js.map +0 -1
  235. package/lib/module/handlers/PressabilityDebugView.web.js +0 -5
  236. package/lib/module/handlers/PressabilityDebugView.web.js.map +0 -1
  237. package/lib/module/handlers/customDirectEventTypes.web.js +0 -5
  238. package/lib/module/handlers/customDirectEventTypes.web.js.map +0 -1
  239. package/lib/typescript/RNGestureHandlerModule.web.d.ts +0 -15
  240. package/lib/typescript/RNRenderer.web.d.ts +0 -3
  241. package/lib/typescript/components/GestureComponents.web.d.ts +0 -8
  242. package/lib/typescript/components/GestureHandlerButton.web.d.ts +0 -4
  243. package/lib/typescript/getReactNativeVersion.web.d.ts +0 -1
  244. package/lib/typescript/getShadowNodeFromRef.web.d.ts +0 -1
  245. package/lib/typescript/handlers/PressabilityDebugView.web.d.ts +0 -1
  246. package/lib/typescript/handlers/customDirectEventTypes.web.d.ts +0 -2
  247. package/src/RNGestureHandlerModule.web.ts +0 -105
  248. package/src/RNRenderer.web.ts +0 -3
  249. package/src/components/GestureComponents.web.tsx +0 -41
  250. package/src/components/GestureHandlerButton.web.tsx +0 -6
  251. package/src/getReactNativeVersion.web.ts +0 -3
  252. package/src/getShadowNodeFromRef.web.ts +0 -7
  253. package/src/handlers/PressabilityDebugView.web.tsx +0 -4
  254. package/src/handlers/customDirectEventTypes.web.ts +0 -5
  255. /package/lib/typescript/components/{GestureHandlerRootView.web.d.ts → GestureHandlerRootView.native.d.ts} +0 -0
@@ -1,2 +1,15 @@
1
- import Module from './specs/NativeRNGestureHandlerModule';
2
- export default Module;
1
+ import React from 'react';
2
+ import type { ActionType } from './ActionType';
3
+ import { Gestures } from './web/Gestures';
4
+ import type { Config } from './web/interfaces';
5
+ declare const _default: {
6
+ handleSetJSResponder(tag: number, blockNativeResponder: boolean): void;
7
+ handleClearJSResponder(): void;
8
+ createGestureHandler<T>(handlerName: keyof typeof Gestures, handlerTag: number, config: T): void;
9
+ attachGestureHandler(handlerTag: number, newView: any, _actionType: ActionType, propsRef: React.RefObject<unknown>): void;
10
+ updateGestureHandler(handlerTag: number, newConfig: Config): void;
11
+ getGestureHandlerNode(handlerTag: number): import("./web/handlers/IGestureHandler").default | import("./web_hammer/NativeViewGestureHandler").default | import("./web_hammer/PanGestureHandler").default | import("./web_hammer/TapGestureHandler").default | import("./web_hammer/LongPressGestureHandler").default | import("./web_hammer/PinchGestureHandler").default | import("./web_hammer/RotationGestureHandler").default | import("./web_hammer/FlingGestureHandler").default;
12
+ dropGestureHandler(handlerTag: number): void;
13
+ flushOperations(): void;
14
+ };
15
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import Module from './specs/NativeRNGestureHandlerModule';
2
+ export default Module;
@@ -1 +1,3 @@
1
- export { default as RNRenderer } from 'react-native/Libraries/Renderer/shims/ReactNative';
1
+ export declare const RNRenderer: {
2
+ findHostInstance_DEPRECATED: (_ref: any) => null;
3
+ };
@@ -0,0 +1 @@
1
+ export { default as RNRenderer } from 'react-native/Libraries/Renderer/shims/ReactNative';
@@ -1,22 +1,8 @@
1
1
  import * as React from 'react';
2
- import { PropsWithChildren, ForwardedRef, RefAttributes, ReactElement } from 'react';
3
- import { ScrollView as RNScrollView, ScrollViewProps as RNScrollViewProps, Switch as RNSwitch, SwitchProps as RNSwitchProps, TextInput as RNTextInput, TextInputProps as RNTextInputProps, DrawerLayoutAndroid as RNDrawerLayoutAndroid, DrawerLayoutAndroidProps as RNDrawerLayoutAndroidProps, FlatList as RNFlatList, FlatListProps as RNFlatListProps, RefreshControl as RNRefreshControl } from 'react-native';
4
- import { NativeViewGestureHandlerProps } from '../handlers/NativeViewGestureHandler';
5
- export declare const RefreshControl: React.ForwardRefExoticComponent<import("react-native").RefreshControlProps & NativeViewGestureHandlerProps & React.RefAttributes<React.ComponentType<any>>>;
6
- export type RefreshControl = typeof RefreshControl & RNRefreshControl;
7
- declare const GHScrollView: React.ForwardRefExoticComponent<RNScrollViewProps & {
8
- children?: React.ReactNode;
9
- } & NativeViewGestureHandlerProps & React.RefAttributes<React.ComponentType<any>>>;
10
- export declare const ScrollView: React.ForwardRefExoticComponent<RNScrollViewProps & NativeViewGestureHandlerProps & React.RefAttributes<RNScrollView>>;
11
- export type ScrollView = typeof GHScrollView & RNScrollView;
12
- export declare const Switch: React.ForwardRefExoticComponent<RNSwitchProps & NativeViewGestureHandlerProps & React.RefAttributes<React.ComponentType<any>>>;
13
- export type Switch = typeof Switch & RNSwitch;
14
- export declare const TextInput: React.ForwardRefExoticComponent<RNTextInputProps & NativeViewGestureHandlerProps & React.RefAttributes<React.ComponentType<any>>>;
15
- export type TextInput = typeof TextInput & RNTextInput;
16
- export declare const DrawerLayoutAndroid: React.ForwardRefExoticComponent<RNDrawerLayoutAndroidProps & {
17
- children?: React.ReactNode;
18
- } & NativeViewGestureHandlerProps & React.RefAttributes<React.ComponentType<any>>>;
19
- export type DrawerLayoutAndroid = typeof DrawerLayoutAndroid & RNDrawerLayoutAndroid;
20
- export declare const FlatList: <ItemT = any>(props: React.PropsWithChildren<RNFlatListProps<ItemT> & React.RefAttributes<FlatList<ItemT>> & NativeViewGestureHandlerProps>, ref: React.ForwardedRef<FlatList<ItemT>>) => ReactElement | null;
21
- export type FlatList<ItemT = any> = typeof FlatList & RNFlatList<ItemT>;
22
- export {};
2
+ import { FlatListProps } from 'react-native';
3
+ export declare const ScrollView: React.ForwardRefExoticComponent<import("react-native").ScrollViewProps & import("..").NativeViewGestureHandlerProps & React.RefAttributes<React.ComponentType<any>>>;
4
+ export declare const Switch: React.ForwardRefExoticComponent<import("react-native").SwitchProps & import("..").NativeViewGestureHandlerProps & React.RefAttributes<React.ComponentType<any>>>;
5
+ export declare const TextInput: React.ForwardRefExoticComponent<import("react-native").TextInputProps & import("..").NativeViewGestureHandlerProps & React.RefAttributes<React.ComponentType<any>>>;
6
+ export declare const DrawerLayoutAndroid: () => React.JSX.Element;
7
+ export declare const RefreshControl: React.ForwardRefExoticComponent<import("react-native").ViewProps & import("..").NativeViewGestureHandlerProps & React.RefAttributes<React.ComponentType<any>>>;
8
+ export declare const FlatList: React.ForwardRefExoticComponent<FlatListProps<unknown> & React.RefAttributes<unknown>>;
@@ -0,0 +1,22 @@
1
+ import * as React from 'react';
2
+ import { PropsWithChildren, ForwardedRef, RefAttributes, ReactElement } from 'react';
3
+ import { ScrollView as RNScrollView, ScrollViewProps as RNScrollViewProps, Switch as RNSwitch, SwitchProps as RNSwitchProps, TextInput as RNTextInput, TextInputProps as RNTextInputProps, DrawerLayoutAndroid as RNDrawerLayoutAndroid, DrawerLayoutAndroidProps as RNDrawerLayoutAndroidProps, FlatList as RNFlatList, FlatListProps as RNFlatListProps, RefreshControl as RNRefreshControl } from 'react-native';
4
+ import { NativeViewGestureHandlerProps } from '../handlers/NativeViewGestureHandler';
5
+ export declare const RefreshControl: React.ForwardRefExoticComponent<import("react-native").RefreshControlProps & NativeViewGestureHandlerProps & React.RefAttributes<React.ComponentType<any>>>;
6
+ export type RefreshControl = typeof RefreshControl & RNRefreshControl;
7
+ declare const GHScrollView: React.ForwardRefExoticComponent<RNScrollViewProps & {
8
+ children?: React.ReactNode;
9
+ } & NativeViewGestureHandlerProps & React.RefAttributes<React.ComponentType<any>>>;
10
+ export declare const ScrollView: React.ForwardRefExoticComponent<RNScrollViewProps & NativeViewGestureHandlerProps & React.RefAttributes<RNScrollView>>;
11
+ export type ScrollView = typeof GHScrollView & RNScrollView;
12
+ export declare const Switch: React.ForwardRefExoticComponent<RNSwitchProps & NativeViewGestureHandlerProps & React.RefAttributes<React.ComponentType<any>>>;
13
+ export type Switch = typeof Switch & RNSwitch;
14
+ export declare const TextInput: React.ForwardRefExoticComponent<RNTextInputProps & NativeViewGestureHandlerProps & React.RefAttributes<React.ComponentType<any>>>;
15
+ export type TextInput = typeof TextInput & RNTextInput;
16
+ export declare const DrawerLayoutAndroid: React.ForwardRefExoticComponent<RNDrawerLayoutAndroidProps & {
17
+ children?: React.ReactNode;
18
+ } & NativeViewGestureHandlerProps & React.RefAttributes<React.ComponentType<any>>>;
19
+ export type DrawerLayoutAndroid = typeof DrawerLayoutAndroid & RNDrawerLayoutAndroid;
20
+ export declare const FlatList: <ItemT = any>(props: React.PropsWithChildren<RNFlatListProps<ItemT> & React.RefAttributes<FlatList<ItemT>> & NativeViewGestureHandlerProps>, ref: React.ForwardedRef<FlatList<ItemT>>) => ReactElement | null;
21
+ export type FlatList<ItemT = any> = typeof FlatList & RNFlatList<ItemT>;
22
+ export {};
@@ -1,4 +1,4 @@
1
- import { HostComponent } from 'react-native';
2
- import { RawButtonProps } from './GestureButtons';
3
- declare const _default: HostComponent<RawButtonProps>;
1
+ import * as React from 'react';
2
+ import { View } from 'react-native';
3
+ declare const _default: React.ForwardRefExoticComponent<React.RefAttributes<View>>;
4
4
  export default _default;
@@ -0,0 +1,4 @@
1
+ import { HostComponent } from 'react-native';
2
+ import { RawButtonProps } from './GestureButtons';
3
+ declare const _default: HostComponent<RawButtonProps>;
4
+ export default _default;
@@ -1,4 +1 @@
1
- export declare function getReactNativeVersion(): {
2
- major: number;
3
- minor: number;
4
- };
1
+ export declare function getReactNativeVersion(): void;
@@ -0,0 +1,4 @@
1
+ export declare function getReactNativeVersion(): {
2
+ major: number;
3
+ minor: number;
4
+ };
@@ -1 +1 @@
1
- export declare function getShadowNodeFromRef(ref: unknown): unknown;
1
+ export declare function getShadowNodeFromRef(_ref: any): null;
@@ -0,0 +1 @@
1
+ export declare function getShadowNodeFromRef(ref: unknown): unknown;
@@ -103,7 +103,7 @@ export interface PanGestureHandlerProps extends BaseGestureHandlerProps<PanGestu
103
103
  * to 0. If only one number `p` is given a range of `(-inf, p)` will be used
104
104
  * if `p` is higher or equal to 0 and `(-p, inf)` otherwise.
105
105
  */
106
- activeOffsetY?: number | number[];
106
+ activeOffsetY?: number | [activeOffsetYStart: number, activeOffsetYEnd: number];
107
107
  /**
108
108
  * Range along X axis (in points) where fingers travels without activation of
109
109
  * handler. Moving outside of this range implies activation of handler. Range
@@ -112,7 +112,7 @@ export interface PanGestureHandlerProps extends BaseGestureHandlerProps<PanGestu
112
112
  * to 0. If only one number `p` is given a range of `(-inf, p)` will be used
113
113
  * if `p` is higher or equal to 0 and `(-p, inf)` otherwise.
114
114
  */
115
- activeOffsetX?: number | number[];
115
+ activeOffsetX?: number | [activeOffsetXStart: number, activeOffsetXEnd: number];
116
116
  /**
117
117
  * When the finger moves outside this range (in points) along Y axis and
118
118
  * handler hasn't yet activated it will fail recognizing the gesture. Range
@@ -121,7 +121,7 @@ export interface PanGestureHandlerProps extends BaseGestureHandlerProps<PanGestu
121
121
  * to 0. If only one number `p` is given a range of `(-inf, p)` will be used
122
122
  * if `p` is higher or equal to 0 and `(-p, inf)` otherwise.
123
123
  */
124
- failOffsetY?: number | number[];
124
+ failOffsetY?: number | [failOffsetYStart: number, failOffsetYEnd: number];
125
125
  /**
126
126
  * When the finger moves outside this range (in points) along X axis and
127
127
  * handler hasn't yet activated it will fail recognizing the gesture. Range
@@ -130,7 +130,7 @@ export interface PanGestureHandlerProps extends BaseGestureHandlerProps<PanGestu
130
130
  * to 0. If only one number `p` is given a range of `(-inf, p)` will be used
131
131
  * if `p` is higher or equal to 0 and `(-p, inf)` otherwise.
132
132
  */
133
- failOffsetX?: number | number[];
133
+ failOffsetX?: number | [failOffsetXStart: number, failOffsetXEnd: number];
134
134
  }
135
135
  export declare const panHandlerName = "PanGestureHandler";
136
136
  export type PanGestureHandler = typeof PanGestureHandler;
@@ -1 +1 @@
1
- export { PressabilityDebugView } from 'react-native/Libraries/Pressability/PressabilityDebug';
1
+ export declare function PressabilityDebugView(): null;
@@ -0,0 +1 @@
1
+ export { PressabilityDebugView } from 'react-native/Libraries/Pressability/PressabilityDebug';
@@ -1 +1,2 @@
1
- export { customDirectEventTypes } from 'react-native/Libraries/Renderer/shims/ReactNativeViewConfigRegistry';
1
+ declare const customDirectEventTypes: {};
2
+ export { customDirectEventTypes };
@@ -0,0 +1 @@
1
+ export { customDirectEventTypes } from 'react-native/Libraries/Renderer/shims/ReactNativeViewConfigRegistry';
@@ -11,11 +11,47 @@ export type GestureConfigReference = {
11
11
  useReanimatedHook: boolean;
12
12
  };
13
13
  interface GestureDetectorProps {
14
+ /**
15
+ * A gesture object containing the configuration and callbacks.
16
+ * Can be any of:
17
+ * - base gestures (`Tap`, `Pan`, ...)
18
+ * - `ComposedGesture` (`Race`, `Simultaneous`, `Exclusive`)
19
+ */
14
20
  gesture: ComposedGesture | GestureType;
15
21
  children?: React.ReactNode;
22
+ /**
23
+ * #### Web only
24
+ * This parameter allows to specify which `userSelect` property should be applied to underlying view.
25
+ * Possible values are `"none" | "auto" | "text"`. Default value is set to `"none"`.
26
+ */
16
27
  userSelect?: UserSelect;
28
+ /**
29
+ * #### Web only
30
+ * Specifies whether context menu should be enabled after clicking on underlying view with right mouse button.
31
+ * Default value is set to `false`.
32
+ */
17
33
  enableContextMenu?: boolean;
34
+ /**
35
+ * #### Web only
36
+ * This parameter allows to specify which `touchAction` property should be applied to underlying view.
37
+ * Supports all CSS touch-action values (e.g. `"none"`, `"pan-y"`). Default value is set to `"none"`.
38
+ */
18
39
  touchAction?: TouchAction;
19
40
  }
41
+ /**
42
+ * `GestureDetector` is responsible for creating and updating native gesture handlers based on the config of provided gesture.
43
+ *
44
+ * ### Props
45
+ * - `gesture`
46
+ * - `userSelect` (**Web only**)
47
+ * - `enableContextMenu` (**Web only**)
48
+ * - `touchAction` (**Web only**)
49
+ *
50
+ * ### Remarks
51
+ * - Gesture Detector will use first native view in its subtree to recognize gestures, however if this view is used only to group its children it may get automatically collapsed.
52
+ * - Using the same instance of a gesture across multiple Gesture Detectors is not possible.
53
+ *
54
+ * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/gesture-detector
55
+ */
20
56
  export declare const GestureDetector: (props: GestureDetectorProps) => React.JSX.Element;
21
57
  export {};
@@ -3,7 +3,18 @@ import { FlingGestureConfig, FlingGestureHandlerEventPayload } from '../FlingGes
3
3
  export declare class FlingGesture extends BaseGesture<FlingGestureHandlerEventPayload> {
4
4
  config: BaseGestureConfig & FlingGestureConfig;
5
5
  constructor();
6
+ /**
7
+ * Determine exact number of points required to handle the fling gesture.
8
+ * @param pointers
9
+ */
6
10
  numberOfPointers(pointers: number): this;
11
+ /**
12
+ * Expressed allowed direction of movement.
13
+ * Expected values are exported as constants in the Directions object.
14
+ * Arguments can be combined using `|` operator. Default value is set to `MouseButton.LEFT`.
15
+ * @param direction
16
+ * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/fling-gesture/#directionvalue-directions
17
+ */
7
18
  direction(direction: number): this;
8
19
  }
9
20
  export type FlingGestureType = InstanceType<typeof FlingGesture>;
@@ -7,8 +7,22 @@ export type ForceTouchGestureChangeEventPayload = {
7
7
  export declare class ForceTouchGesture extends ContinousBaseGesture<ForceTouchGestureHandlerEventPayload, ForceTouchGestureChangeEventPayload> {
8
8
  config: BaseGestureConfig & ForceTouchGestureConfig;
9
9
  constructor();
10
+ /**
11
+ * A minimal pressure that is required before gesture can activate.
12
+ * Should be a value from range [0.0, 1.0]. Default is 0.2.
13
+ * @param force
14
+ */
10
15
  minForce(force: number): this;
16
+ /**
17
+ * A maximal pressure that could be applied for gesture.
18
+ * If the pressure is greater, gesture fails. Should be a value from range [0.0, 1.0].
19
+ * @param force
20
+ */
11
21
  maxForce(force: number): this;
22
+ /**
23
+ * Value defining if haptic feedback has to be performed on activation.
24
+ * @param value
25
+ */
12
26
  feedbackOnActivation(value: boolean): this;
13
27
  onChange(callback: (event: GestureUpdateEvent<GestureUpdateEvent<ForceTouchGestureHandlerEventPayload & ForceTouchGestureChangeEventPayload>>) => void): this;
14
28
  }
@@ -77,26 +77,125 @@ export declare abstract class BaseGesture<EventPayloadT extends Record<string, u
77
77
  handlers: HandlerCallbacks<EventPayloadT>;
78
78
  constructor();
79
79
  private addDependency;
80
+ /**
81
+ * Sets a `ref` to the gesture object, allowing for interoperability with the old API.
82
+ * @param ref
83
+ */
80
84
  withRef(ref: React.MutableRefObject<GestureType | undefined>): this;
81
85
  protected isWorklet(callback: Function): boolean;
86
+ /**
87
+ * Set the callback that is being called when given gesture handler starts receiving touches.
88
+ * At the moment of this callback the handler is in `BEGAN` state and we don't know yet if it will recognize the gesture at all.
89
+ * @param callback
90
+ */
82
91
  onBegin(callback: (event: GestureStateChangeEvent<EventPayloadT>) => void): this;
92
+ /**
93
+ * Set the callback that is being called when the gesture is recognized by the handler and it transitions to the `ACTIVE` state.
94
+ * @param callback
95
+ */
83
96
  onStart(callback: (event: GestureStateChangeEvent<EventPayloadT>) => void): this;
97
+ /**
98
+ * Set the callback that is being called when the gesture that was recognized by the handler finishes and handler reaches `END` state.
99
+ * It will be called only if the handler was previously in the `ACTIVE` state.
100
+ * @param callback
101
+ */
84
102
  onEnd(callback: (event: GestureStateChangeEvent<EventPayloadT>, success: boolean) => void): this;
103
+ /**
104
+ * Set the callback that is being called when the handler finalizes handling gesture - the gesture was recognized and has finished or it failed to recognize.
105
+ * @param callback
106
+ */
85
107
  onFinalize(callback: (event: GestureStateChangeEvent<EventPayloadT>, success: boolean) => void): this;
108
+ /**
109
+ * Set the `onTouchesDown` callback which is called every time a pointer is placed on the screen.
110
+ * @param callback
111
+ */
86
112
  onTouchesDown(callback: TouchEventHandlerType): this;
113
+ /**
114
+ * Set the `onTouchesMove` callback which is called every time a pointer is moved on the screen.
115
+ * @param callback
116
+ */
87
117
  onTouchesMove(callback: TouchEventHandlerType): this;
118
+ /**
119
+ * Set the `onTouchesUp` callback which is called every time a pointer is lifted from the screen.
120
+ * @param callback
121
+ */
88
122
  onTouchesUp(callback: TouchEventHandlerType): this;
123
+ /**
124
+ * Set the `onTouchesCancelled` callback which is called every time a pointer stops being tracked, for example when the gesture finishes.
125
+ * @param callback
126
+ */
89
127
  onTouchesCancelled(callback: TouchEventHandlerType): this;
128
+ /**
129
+ * Indicates whether the given handler should be analyzing stream of touch events or not.
130
+ * @param enabled
131
+ * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/pan-gesture#enabledvalue-boolean
132
+ */
90
133
  enabled(enabled: boolean): this;
134
+ /**
135
+ * When true the handler will cancel or fail recognition (depending on its current state) whenever the finger leaves the area of the connected view.
136
+ * @param value
137
+ * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/pan-gesture#shouldcancelwhenoutsidevalue-boolean
138
+ */
91
139
  shouldCancelWhenOutside(value: boolean): this;
140
+ /**
141
+ * This parameter enables control over what part of the connected view area can be used to begin recognizing the gesture.
142
+ * When a negative number is provided the bounds of the view will reduce the area by the given number of points in each of the sides evenly.
143
+ * @param hitSlop
144
+ * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/pan-gesture#hitslopsettings
145
+ */
92
146
  hitSlop(hitSlop: HitSlop): this;
147
+ /**
148
+ * #### Web only
149
+ * This parameter allows to specify which `cursor` should be used when gesture activates.
150
+ * Supports all CSS cursor values (e.g. `"grab"`, `"zoom-in"`). Default value is set to `"auto"`.
151
+ * @param activeCursor
152
+ */
93
153
  activeCursor(activeCursor: ActiveCursor): this;
154
+ /**
155
+ * #### Web & Android only
156
+ * Allows users to choose which mouse button should handler respond to.
157
+ * Arguments can be combined using `|` operator, e.g. `mouseButton(MouseButton.LEFT | MouseButton.RIGHT)`.
158
+ * Default value is set to `MouseButton.LEFT`.
159
+ * @param mouseButton
160
+ * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/pan-gesture#mousebuttonvalue-mousebutton-web--android-only
161
+ */
94
162
  mouseButton(mouseButton: MouseButton): this;
163
+ /**
164
+ * When `react-native-reanimated` is installed, the callbacks passed to the gestures are automatically workletized and run on the UI thread when called.
165
+ * This option allows for changing this behavior: when `true`, all the callbacks will be run on the JS thread instead of the UI thread, regardless of whether they are worklets or not.
166
+ * Defaults to `false`.
167
+ * @param runOnJS
168
+ */
95
169
  runOnJS(runOnJS: boolean): this;
170
+ /**
171
+ * Allows gestures across different components to be recognized simultaneously.
172
+ * @param gestures
173
+ * @see https://docs.swmansion.com/react-native-gesture-handler/docs/fundamentals/gesture-composition/#simultaneouswithexternalgesture
174
+ */
96
175
  simultaneousWithExternalGesture(...gestures: Exclude<GestureRef, number>[]): this;
176
+ /**
177
+ * Allows to delay activation of the handler until all handlers passed as arguments to this method fail (or don't begin at all).
178
+ * @param gestures
179
+ * @see https://docs.swmansion.com/react-native-gesture-handler/docs/fundamentals/gesture-composition/#requireexternalgesturetofail
180
+ */
97
181
  requireExternalGestureToFail(...gestures: Exclude<GestureRef, number>[]): this;
182
+ /**
183
+ * Works similarily to `requireExternalGestureToFail` but the direction of the relation is reversed - instead of being one-to-many relation, it's many-to-one.
184
+ * @param gestures
185
+ * @see https://docs.swmansion.com/react-native-gesture-handler/docs/fundamentals/gesture-composition/#blocksexternalgesture
186
+ */
98
187
  blocksExternalGesture(...gestures: Exclude<GestureRef, number>[]): this;
188
+ /**
189
+ * Sets a `testID` property for gesture object, allowing for querying for it in tests.
190
+ * @param id
191
+ */
99
192
  withTestId(id: string): this;
193
+ /**
194
+ * #### iOS only
195
+ * When `true`, the handler will cancel touches for native UI components (`UIButton`, `UISwitch`, etc) it's attached to when it becomes `ACTIVE`.
196
+ * Default value is `true`.
197
+ * @param value
198
+ */
100
199
  cancelsTouchesInView(value: boolean): this;
101
200
  initialize(): void;
102
201
  toGestureArray(): GestureType[];
@@ -104,8 +203,22 @@ export declare abstract class BaseGesture<EventPayloadT extends Record<string, u
104
203
  get shouldUseReanimated(): boolean;
105
204
  }
106
205
  export declare abstract class ContinousBaseGesture<EventPayloadT extends Record<string, unknown>, EventChangePayloadT extends Record<string, unknown>> extends BaseGesture<EventPayloadT> {
206
+ /**
207
+ * Set the callback that is being called every time the gesture receives an update while it's active.
208
+ * @param callback
209
+ */
107
210
  onUpdate(callback: (event: GestureUpdateEvent<EventPayloadT>) => void): this;
211
+ /**
212
+ * Set the callback that is being called every time the gesture receives an update while it's active.
213
+ * This callback will receive information about change in value in relation to the last received event.
214
+ * @param callback
215
+ */
108
216
  onChange(callback: (event: GestureUpdateEvent<EventPayloadT & EventChangePayloadT>) => void): this;
217
+ /**
218
+ * When `true` the handler will not activate by itself even if its activation criteria are met.
219
+ * Instead you can manipulate its state using state manager.
220
+ * @param manualActivation
221
+ */
109
222
  manualActivation(manualActivation: boolean): this;
110
223
  }
111
224
  export {};
@@ -10,24 +10,80 @@ import { TapGesture } from './tapGesture';
10
10
  import { NativeGesture } from './nativeGesture';
11
11
  import { ManualGesture } from './manualGesture';
12
12
  import { HoverGesture } from './hoverGesture';
13
+ /**
14
+ * `Gesture` is the object that allows you to create and compose gestures.
15
+ *
16
+ * ### Remarks
17
+ * - Consider wrapping your gesture configurations with `useMemo`, as it will reduce the amount of work Gesture Handler has to do under the hood when updating gestures.
18
+ *
19
+ * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/gesture
20
+ */
13
21
  export declare const GestureObjects: {
22
+ /**
23
+ * A discrete gesture that recognizes one or many taps.
24
+ * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/tap-gesture
25
+ */
14
26
  Tap: () => TapGesture;
27
+ /**
28
+ * A continuous gesture that can recognize a panning (dragging) gesture and track its movement.
29
+ * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/pan-gesture
30
+ */
15
31
  Pan: () => PanGesture;
32
+ /**
33
+ * A continuous gesture that recognizes pinch gesture. It allows for tracking the distance between two fingers and use that information to scale or zoom your content.
34
+ * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/pinch-gesture
35
+ */
16
36
  Pinch: () => PinchGesture;
37
+ /**
38
+ * A continuous gesture that can recognize rotation and track its movement.
39
+ * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/rotation-gesture
40
+ */
17
41
  Rotation: () => RotationGesture;
42
+ /**
43
+ * A discrete gesture that activates when the movement is sufficiently fast.
44
+ * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/fling-gesture
45
+ */
18
46
  Fling: () => FlingGesture;
47
+ /**
48
+ * A discrete gesture that activates when the corresponding view is pressed for a sufficiently long time.
49
+ * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/long-press-gesture
50
+ */
19
51
  LongPress: () => LongPressGesture;
52
+ /**
53
+ * #### iOS only
54
+ * A continuous gesture that recognizes force of a touch. It allows for tracking pressure of touch on some iOS devices.
55
+ * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/force-touch-gesture
56
+ */
20
57
  ForceTouch: () => ForceTouchGesture;
58
+ /**
59
+ * A gesture that allows other touch handling components to participate in RNGH's gesture system.
60
+ * When used, the other component should be the direct child of a `GestureDetector`.
61
+ * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/native-gesture
62
+ */
21
63
  Native: () => NativeGesture;
64
+ /**
65
+ * A plain gesture that has no specific activation criteria nor event data set.
66
+ * Its state has to be controlled manually using a state manager.
67
+ * It will not fail when all the pointers are lifted from the screen.
68
+ * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/manual-gesture
69
+ */
22
70
  Manual: () => ManualGesture;
71
+ /**
72
+ * A continuous gesture that can recognize hovering above the view it's attached to.
73
+ * The hover effect may be activated by moving a mouse or a stylus over the view.
74
+ *
75
+ * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/hover-gesture
76
+ */
23
77
  Hover: () => HoverGesture;
24
78
  /**
25
79
  * Builds a composed gesture consisting of gestures provided as parameters.
26
80
  * The first one that becomes active cancels the rest of gestures.
81
+ * @see https://docs.swmansion.com/react-native-gesture-handler/docs/fundamentals/gesture-composition/#race
27
82
  */
28
83
  Race: (...gestures: Gesture[]) => ComposedGesture;
29
84
  /**
30
85
  * Builds a composed gesture that allows all base gestures to run simultaneously.
86
+ * @see https://docs.swmansion.com/react-native-gesture-handler/docs/fundamentals/gesture-composition/#simultaneous
31
87
  */
32
88
  Simultaneous(...gestures: Gesture[]): SimultaneousGesture;
33
89
  /**
@@ -36,6 +92,7 @@ export declare const GestureObjects: {
36
92
  * than the second one, second one has higher priority than the third one, and so on.
37
93
  * For example, to make a gesture that recognizes both single and double tap you need
38
94
  * to call Exclusive(doubleTap, singleTap).
95
+ * @see https://docs.swmansion.com/react-native-gesture-handler/docs/fundamentals/gesture-composition/#exclusive
39
96
  */
40
97
  Exclusive(...gestures: Gesture[]): ExclusiveGesture;
41
98
  };
@@ -23,8 +23,8 @@ export declare class HoverGesture extends ContinousBaseGesture<HoverGestureHandl
23
23
  config: BaseGestureConfig & HoverGestureConfig;
24
24
  constructor();
25
25
  /**
26
+ * #### iOS only
26
27
  * Sets the visual hover effect.
27
- * iOS only
28
28
  */
29
29
  effect(effect: HoverEffect): this;
30
30
  onChange(callback: (event: GestureUpdateEvent<HoverGestureHandlerEventPayload & HoverGestureChangeEventPayload>) => void): this;
@@ -3,7 +3,17 @@ import { LongPressGestureConfig, LongPressGestureHandlerEventPayload } from '../
3
3
  export declare class LongPressGesture extends BaseGesture<LongPressGestureHandlerEventPayload> {
4
4
  config: BaseGestureConfig & LongPressGestureConfig;
5
5
  constructor();
6
+ /**
7
+ * Minimum time, expressed in milliseconds, that a finger must remain pressed on the corresponding view.
8
+ * The default value is 500.
9
+ * @param duration
10
+ */
6
11
  minDuration(duration: number): this;
12
+ /**
13
+ * Maximum distance, expressed in points, that defines how far the finger is allowed to travel during a long press gesture.
14
+ * @param distance
15
+ * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/long-press-gesture#maxdistancevalue-number
16
+ */
7
17
  maxDistance(distance: number): this;
8
18
  }
9
19
  export type LongPressGestureType = InstanceType<typeof LongPressGesture>;
@@ -3,7 +3,15 @@ import { NativeViewGestureConfig, NativeViewGestureHandlerPayload } from '../Nat
3
3
  export declare class NativeGesture extends BaseGesture<NativeViewGestureHandlerPayload> {
4
4
  config: BaseGestureConfig & NativeViewGestureConfig;
5
5
  constructor();
6
+ /**
7
+ * When true, underlying handler will activate unconditionally when in `BEGAN` or `UNDETERMINED` state.
8
+ * @param value
9
+ */
6
10
  shouldActivateOnStart(value: boolean): this;
11
+ /**
12
+ * When true, cancels all other gesture handlers when this `NativeViewGestureHandler` receives an `ACTIVE` state event.
13
+ * @param value
14
+ */
7
15
  disallowInterruption(value: boolean): this;
8
16
  }
9
17
  export type NativeGestureType = InstanceType<typeof NativeGesture>;