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.
- package/README.md +1 -0
- package/lib/commonjs/RNGestureHandlerModule.js +97 -4
- package/lib/commonjs/RNGestureHandlerModule.js.map +1 -1
- package/lib/commonjs/RNGestureHandlerModule.native.js +16 -0
- package/lib/commonjs/RNGestureHandlerModule.native.js.map +1 -0
- package/lib/commonjs/RNRenderer.js +5 -10
- package/lib/commonjs/RNRenderer.js.map +1 -1
- package/lib/commonjs/RNRenderer.native.js +16 -0
- package/lib/commonjs/RNRenderer.native.js.map +1 -0
- package/lib/commonjs/components/GestureComponents.js +19 -82
- package/lib/commonjs/components/GestureComponents.js.map +1 -1
- package/lib/commonjs/components/GestureComponents.native.js +115 -0
- package/lib/commonjs/components/GestureComponents.native.js.map +1 -0
- package/lib/commonjs/components/GestureHandlerButton.js +13 -3
- package/lib/commonjs/components/GestureHandlerButton.js.map +1 -1
- package/lib/commonjs/components/GestureHandlerButton.native.js +14 -0
- package/lib/commonjs/components/GestureHandlerButton.native.js.map +1 -0
- package/lib/commonjs/components/GestureHandlerRootView.js +0 -6
- package/lib/commonjs/components/GestureHandlerRootView.js.map +1 -1
- package/lib/commonjs/components/{GestureHandlerRootView.web.js → GestureHandlerRootView.native.js} +7 -1
- package/lib/commonjs/components/GestureHandlerRootView.native.js.map +1 -0
- package/lib/commonjs/getReactNativeVersion.js +1 -12
- package/lib/commonjs/getReactNativeVersion.js.map +1 -1
- package/lib/commonjs/getReactNativeVersion.native.js +22 -0
- package/lib/commonjs/getReactNativeVersion.native.js.map +1 -0
- package/lib/commonjs/getShadowNodeFromRef.js +5 -34
- package/lib/commonjs/getShadowNodeFromRef.js.map +1 -1
- package/lib/commonjs/getShadowNodeFromRef.native.js +44 -0
- package/lib/commonjs/getShadowNodeFromRef.native.js.map +1 -0
- package/lib/commonjs/handlers/PanGestureHandler.js.map +1 -1
- package/lib/commonjs/handlers/PressabilityDebugView.js +5 -7
- package/lib/commonjs/handlers/PressabilityDebugView.js.map +1 -1
- package/lib/commonjs/handlers/PressabilityDebugView.native.js +14 -0
- package/lib/commonjs/handlers/PressabilityDebugView.native.js.map +1 -0
- package/lib/commonjs/handlers/createHandler.js +9 -3
- package/lib/commonjs/handlers/createHandler.js.map +1 -1
- package/lib/commonjs/handlers/customDirectEventTypes.js +5 -8
- package/lib/commonjs/handlers/customDirectEventTypes.js.map +1 -1
- package/lib/commonjs/handlers/customDirectEventTypes.native.js +14 -0
- package/lib/commonjs/handlers/customDirectEventTypes.native.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector.js +15 -0
- package/lib/commonjs/handlers/gestures/GestureDetector.js.map +1 -1
- package/lib/commonjs/handlers/gestures/flingGesture.js +13 -0
- package/lib/commonjs/handlers/gestures/flingGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/forceTouchGesture.js +17 -0
- package/lib/commonjs/handlers/gestures/forceTouchGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/gesture.js +135 -0
- package/lib/commonjs/handlers/gestures/gesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/gestureObjects.js +66 -0
- package/lib/commonjs/handlers/gestures/gestureObjects.js.map +1 -1
- package/lib/commonjs/handlers/gestures/gestureStateManager.web.js +1 -1
- package/lib/commonjs/handlers/gestures/gestureStateManager.web.js.map +1 -1
- package/lib/commonjs/handlers/gestures/hoverGesture.js +1 -1
- package/lib/commonjs/handlers/gestures/hoverGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/longPressGesture.js +12 -0
- package/lib/commonjs/handlers/gestures/longPressGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/nativeGesture.js +10 -0
- package/lib/commonjs/handlers/gestures/nativeGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/panGesture.js +76 -0
- package/lib/commonjs/handlers/gestures/panGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/tapGesture.js +42 -0
- package/lib/commonjs/handlers/gestures/tapGesture.js.map +1 -1
- package/lib/commonjs/utils.js +5 -1
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/commonjs/web/handlers/GestureHandler.js +7 -7
- package/lib/commonjs/web/handlers/GestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/PanGestureHandler.js +3 -1
- package/lib/commonjs/web/handlers/PanGestureHandler.js.map +1 -1
- package/lib/commonjs/web/interfaces.js.map +1 -1
- package/lib/module/RNGestureHandlerModule.js +84 -4
- package/lib/module/RNGestureHandlerModule.js.map +1 -1
- package/lib/module/RNGestureHandlerModule.native.js +5 -0
- package/lib/module/RNGestureHandlerModule.native.js.map +1 -0
- package/lib/module/RNRenderer.js +3 -3
- package/lib/module/RNRenderer.js.map +1 -1
- package/lib/module/RNRenderer.native.js +4 -0
- package/lib/module/RNRenderer.native.js.map +1 -0
- package/lib/module/components/GestureComponents.js +18 -80
- package/lib/module/components/GestureComponents.js.map +1 -1
- package/lib/module/components/GestureComponents.native.js +90 -0
- package/lib/module/components/GestureComponents.native.js.map +1 -0
- package/lib/module/components/GestureHandlerButton.js +8 -2
- package/lib/module/components/GestureHandlerButton.js.map +1 -1
- package/lib/module/components/GestureHandlerButton.native.js +3 -0
- package/lib/module/components/GestureHandlerButton.native.js.map +1 -0
- package/lib/module/components/GestureHandlerRootView.js +0 -5
- package/lib/module/components/GestureHandlerRootView.js.map +1 -1
- package/lib/module/components/{GestureHandlerRootView.web.js → GestureHandlerRootView.native.js} +6 -1
- package/lib/module/components/GestureHandlerRootView.native.js.map +1 -0
- package/lib/module/getReactNativeVersion.js +1 -7
- package/lib/module/getReactNativeVersion.js.map +1 -1
- package/lib/module/getReactNativeVersion.native.js +10 -0
- package/lib/module/getReactNativeVersion.native.js.map +1 -0
- package/lib/module/getShadowNodeFromRef.js +4 -33
- package/lib/module/getShadowNodeFromRef.js.map +1 -1
- package/lib/module/getShadowNodeFromRef.native.js +37 -0
- package/lib/module/getShadowNodeFromRef.native.js.map +1 -0
- package/lib/module/handlers/PanGestureHandler.js.map +1 -1
- package/lib/module/handlers/PressabilityDebugView.js +4 -2
- package/lib/module/handlers/PressabilityDebugView.js.map +1 -1
- package/lib/module/handlers/PressabilityDebugView.native.js +3 -0
- package/lib/module/handlers/PressabilityDebugView.native.js.map +1 -0
- package/lib/module/handlers/createHandler.js +9 -3
- package/lib/module/handlers/createHandler.js.map +1 -1
- package/lib/module/handlers/customDirectEventTypes.js +4 -2
- package/lib/module/handlers/customDirectEventTypes.js.map +1 -1
- package/lib/module/handlers/customDirectEventTypes.native.js +3 -0
- package/lib/module/handlers/customDirectEventTypes.native.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector.js +15 -0
- package/lib/module/handlers/gestures/GestureDetector.js.map +1 -1
- package/lib/module/handlers/gestures/flingGesture.js +13 -0
- package/lib/module/handlers/gestures/flingGesture.js.map +1 -1
- package/lib/module/handlers/gestures/forceTouchGesture.js +17 -0
- package/lib/module/handlers/gestures/forceTouchGesture.js.map +1 -1
- package/lib/module/handlers/gestures/gesture.js +135 -0
- package/lib/module/handlers/gestures/gesture.js.map +1 -1
- package/lib/module/handlers/gestures/gestureObjects.js +67 -0
- package/lib/module/handlers/gestures/gestureObjects.js.map +1 -1
- package/lib/module/handlers/gestures/gestureStateManager.web.js +1 -1
- package/lib/module/handlers/gestures/gestureStateManager.web.js.map +1 -1
- package/lib/module/handlers/gestures/hoverGesture.js +1 -1
- package/lib/module/handlers/gestures/hoverGesture.js.map +1 -1
- package/lib/module/handlers/gestures/longPressGesture.js +12 -0
- package/lib/module/handlers/gestures/longPressGesture.js.map +1 -1
- package/lib/module/handlers/gestures/nativeGesture.js +10 -0
- package/lib/module/handlers/gestures/nativeGesture.js.map +1 -1
- package/lib/module/handlers/gestures/panGesture.js +76 -0
- package/lib/module/handlers/gestures/panGesture.js.map +1 -1
- package/lib/module/handlers/gestures/tapGesture.js +42 -0
- package/lib/module/handlers/gestures/tapGesture.js.map +1 -1
- package/lib/module/utils.js +5 -1
- package/lib/module/utils.js.map +1 -1
- package/lib/module/web/handlers/GestureHandler.js +7 -7
- package/lib/module/web/handlers/GestureHandler.js.map +1 -1
- package/lib/module/web/handlers/PanGestureHandler.js +3 -1
- package/lib/module/web/handlers/PanGestureHandler.js.map +1 -1
- package/lib/module/web/interfaces.js.map +1 -1
- package/lib/typescript/RNGestureHandlerModule.d.ts +15 -2
- package/lib/typescript/RNGestureHandlerModule.native.d.ts +2 -0
- package/lib/typescript/RNRenderer.d.ts +3 -1
- package/lib/typescript/RNRenderer.native.d.ts +1 -0
- package/lib/typescript/components/GestureComponents.d.ts +7 -21
- package/lib/typescript/components/GestureComponents.native.d.ts +22 -0
- package/lib/typescript/components/GestureHandlerButton.d.ts +3 -3
- package/lib/typescript/components/GestureHandlerButton.native.d.ts +4 -0
- package/lib/typescript/getReactNativeVersion.d.ts +1 -4
- package/lib/typescript/getReactNativeVersion.native.d.ts +4 -0
- package/lib/typescript/getShadowNodeFromRef.d.ts +1 -1
- package/lib/typescript/getShadowNodeFromRef.native.d.ts +1 -0
- package/lib/typescript/handlers/PanGestureHandler.d.ts +4 -4
- package/lib/typescript/handlers/PressabilityDebugView.d.ts +1 -1
- package/lib/typescript/handlers/PressabilityDebugView.native.d.ts +1 -0
- package/lib/typescript/handlers/customDirectEventTypes.d.ts +2 -1
- package/lib/typescript/handlers/customDirectEventTypes.native.d.ts +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector.d.ts +36 -0
- package/lib/typescript/handlers/gestures/flingGesture.d.ts +11 -0
- package/lib/typescript/handlers/gestures/forceTouchGesture.d.ts +14 -0
- package/lib/typescript/handlers/gestures/gesture.d.ts +113 -0
- package/lib/typescript/handlers/gestures/gestureObjects.d.ts +57 -0
- package/lib/typescript/handlers/gestures/hoverGesture.d.ts +1 -1
- package/lib/typescript/handlers/gestures/longPressGesture.d.ts +10 -0
- package/lib/typescript/handlers/gestures/nativeGesture.d.ts +8 -0
- package/lib/typescript/handlers/gestures/panGesture.d.ts +67 -4
- package/lib/typescript/handlers/gestures/tapGesture.d.ts +35 -0
- package/lib/typescript/web/handlers/GestureHandler.d.ts +2 -2
- package/lib/typescript/web/handlers/IGestureHandler.d.ts +1 -1
- package/lib/typescript/web/interfaces.d.ts +1 -0
- package/package.json +3 -2
- package/src/RNGestureHandlerModule.native.ts +5 -0
- package/src/RNGestureHandlerModule.ts +104 -4
- package/src/RNRenderer.native.ts +3 -0
- package/src/RNRenderer.ts +3 -3
- package/src/components/GestureComponents.native.tsx +148 -0
- package/src/components/GestureComponents.tsx +24 -131
- package/src/components/GestureHandlerButton.native.tsx +5 -0
- package/src/components/GestureHandlerButton.tsx +5 -4
- package/src/components/{GestureHandlerRootView.web.tsx → GestureHandlerRootView.native.tsx} +6 -0
- package/src/components/GestureHandlerRootView.tsx +0 -6
- package/src/getReactNativeVersion.native.ts +11 -0
- package/src/getReactNativeVersion.ts +1 -9
- package/src/getShadowNodeFromRef.native.ts +44 -0
- package/src/getShadowNodeFromRef.ts +4 -41
- package/src/handlers/PanGestureHandler.ts +8 -4
- package/src/handlers/PressabilityDebugView.native.tsx +2 -0
- package/src/handlers/PressabilityDebugView.tsx +4 -2
- package/src/handlers/createHandler.tsx +14 -10
- package/src/handlers/customDirectEventTypes.native.ts +2 -0
- package/src/handlers/customDirectEventTypes.ts +5 -2
- package/src/handlers/gestures/GestureDetector.tsx +47 -4
- package/src/handlers/gestures/flingGesture.ts +11 -0
- package/src/handlers/gestures/forceTouchGesture.ts +14 -0
- package/src/handlers/gestures/gesture.ts +113 -0
- package/src/handlers/gestures/gestureObjects.ts +57 -0
- package/src/handlers/gestures/gestureStateManager.web.ts +1 -1
- package/src/handlers/gestures/hoverGesture.ts +1 -1
- package/src/handlers/gestures/longPressGesture.ts +10 -0
- package/src/handlers/gestures/nativeGesture.ts +8 -0
- package/src/handlers/gestures/panGesture.ts +75 -4
- package/src/handlers/gestures/tapGesture.ts +35 -0
- package/src/utils.ts +9 -2
- package/src/web/handlers/GestureHandler.ts +9 -9
- package/src/web/handlers/IGestureHandler.ts +1 -1
- package/src/web/handlers/PanGestureHandler.ts +4 -0
- package/src/web/interfaces.ts +1 -0
- package/lib/commonjs/RNGestureHandlerModule.web.js +0 -109
- package/lib/commonjs/RNGestureHandlerModule.web.js.map +0 -1
- package/lib/commonjs/RNRenderer.web.js +0 -11
- package/lib/commonjs/RNRenderer.web.js.map +0 -1
- package/lib/commonjs/components/GestureComponents.web.js +0 -52
- package/lib/commonjs/components/GestureComponents.web.js.map +0 -1
- package/lib/commonjs/components/GestureHandlerButton.web.js +0 -24
- package/lib/commonjs/components/GestureHandlerButton.web.js.map +0 -1
- package/lib/commonjs/components/GestureHandlerRootView.web.js.map +0 -1
- package/lib/commonjs/getReactNativeVersion.web.js +0 -11
- package/lib/commonjs/getReactNativeVersion.web.js.map +0 -1
- package/lib/commonjs/getShadowNodeFromRef.web.js +0 -15
- package/lib/commonjs/getShadowNodeFromRef.web.js.map +0 -1
- package/lib/commonjs/handlers/PressabilityDebugView.web.js +0 -12
- package/lib/commonjs/handlers/PressabilityDebugView.web.js.map +0 -1
- package/lib/commonjs/handlers/customDirectEventTypes.web.js +0 -11
- package/lib/commonjs/handlers/customDirectEventTypes.web.js.map +0 -1
- package/lib/module/RNGestureHandlerModule.web.js +0 -85
- package/lib/module/RNGestureHandlerModule.web.js.map +0 -1
- package/lib/module/RNRenderer.web.js +0 -4
- package/lib/module/RNRenderer.web.js.map +0 -1
- package/lib/module/components/GestureComponents.web.js +0 -28
- package/lib/module/components/GestureComponents.web.js.map +0 -1
- package/lib/module/components/GestureHandlerButton.web.js +0 -9
- package/lib/module/components/GestureHandlerButton.web.js.map +0 -1
- package/lib/module/components/GestureHandlerRootView.web.js.map +0 -1
- package/lib/module/getReactNativeVersion.web.js +0 -4
- package/lib/module/getReactNativeVersion.web.js.map +0 -1
- package/lib/module/getShadowNodeFromRef.web.js +0 -8
- package/lib/module/getShadowNodeFromRef.web.js.map +0 -1
- package/lib/module/handlers/PressabilityDebugView.web.js +0 -5
- package/lib/module/handlers/PressabilityDebugView.web.js.map +0 -1
- package/lib/module/handlers/customDirectEventTypes.web.js +0 -5
- package/lib/module/handlers/customDirectEventTypes.web.js.map +0 -1
- package/lib/typescript/RNGestureHandlerModule.web.d.ts +0 -15
- package/lib/typescript/RNRenderer.web.d.ts +0 -3
- package/lib/typescript/components/GestureComponents.web.d.ts +0 -8
- package/lib/typescript/components/GestureHandlerButton.web.d.ts +0 -4
- package/lib/typescript/getReactNativeVersion.web.d.ts +0 -1
- package/lib/typescript/getShadowNodeFromRef.web.d.ts +0 -1
- package/lib/typescript/handlers/PressabilityDebugView.web.d.ts +0 -1
- package/lib/typescript/handlers/customDirectEventTypes.web.d.ts +0 -2
- package/src/RNGestureHandlerModule.web.ts +0 -105
- package/src/RNRenderer.web.ts +0 -3
- package/src/components/GestureComponents.web.tsx +0 -41
- package/src/components/GestureHandlerButton.web.tsx +0 -6
- package/src/getReactNativeVersion.web.ts +0 -3
- package/src/getShadowNodeFromRef.web.ts +0 -7
- package/src/handlers/PressabilityDebugView.web.tsx +0 -4
- package/src/handlers/customDirectEventTypes.web.ts +0 -5
- /package/lib/typescript/components/{GestureHandlerRootView.web.d.ts → GestureHandlerRootView.native.d.ts} +0 -0
@@ -1,2 +1,15 @@
|
|
1
|
-
import
|
2
|
-
|
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 @@
|
|
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 {
|
3
|
-
|
4
|
-
import
|
5
|
-
export declare const
|
6
|
-
export
|
7
|
-
declare const
|
8
|
-
|
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
|
2
|
-
import {
|
3
|
-
declare const _default:
|
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;
|
@@ -1 +1 @@
|
|
1
|
-
export declare function getShadowNodeFromRef(
|
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
|
1
|
+
export declare function PressabilityDebugView(): null;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { PressabilityDebugView } from 'react-native/Libraries/Pressability/PressabilityDebug';
|
@@ -1 +1,2 @@
|
|
1
|
-
|
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>;
|