react-native-gesture-handler 3.2.0-nightly-20260811-cc704f09a → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +21 -6
- package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandler.kt +30 -66
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.kt +4 -2
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerDetectorView.kt +1 -2
- package/apple/RNGestureHandler.mm +31 -23
- package/apple/RNGestureHandlerButtonComponentView.mm +10 -6
- package/lib/module/components/GestureHandlerButton.web.js +3 -2
- package/lib/module/components/GestureHandlerButton.web.js.map +1 -1
- package/lib/module/components/ReanimatedDrawerLayout.js +3 -0
- package/lib/module/components/ReanimatedDrawerLayout.js.map +1 -1
- package/lib/module/components/touchables/TouchableOpacity.js +1 -0
- package/lib/module/components/touchables/TouchableOpacity.js.map +1 -1
- package/lib/module/handlers/hitSlop.js +101 -0
- package/lib/module/handlers/hitSlop.js.map +1 -0
- package/lib/module/handlers/utils.js +3 -7
- package/lib/module/handlers/utils.js.map +1 -1
- package/lib/module/specs/RNGestureHandlerDetectorNativeComponent.ts +1 -1
- package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.ts +1 -1
- package/lib/module/v3/components/Pressable.js +23 -312
- package/lib/module/v3/components/Pressable.js.map +1 -1
- package/lib/module/v3/components/PressableWithTouchable.js +259 -0
- package/lib/module/v3/components/PressableWithTouchable.js.map +1 -0
- package/lib/module/v3/components/StatefulPressable.js +338 -0
- package/lib/module/v3/components/StatefulPressable.js.map +1 -0
- package/lib/module/v3/components/pointerStyle.js +6 -0
- package/lib/module/v3/components/pointerStyle.js.map +1 -0
- package/lib/module/v3/components/pointerStyle.web.js +9 -0
- package/lib/module/v3/components/pointerStyle.web.js.map +1 -0
- package/lib/module/v3/hooks/utils/configUtils.js +3 -1
- package/lib/module/v3/hooks/utils/configUtils.js.map +1 -1
- package/lib/module/v3/hooks/utils/reanimatedUtils.js +14 -3
- package/lib/module/v3/hooks/utils/reanimatedUtils.js.map +1 -1
- package/lib/module/web/handlers/GestureHandler.js +21 -44
- package/lib/module/web/handlers/GestureHandler.js.map +1 -1
- package/lib/module/web/interfaces.js.map +1 -1
- package/lib/typescript/components/GestureComponents.web.d.ts +12 -4
- package/lib/typescript/components/GestureComponents.web.d.ts.map +1 -1
- package/lib/typescript/components/GestureHandlerButton.web.d.ts.map +1 -1
- package/lib/typescript/components/ReanimatedDrawerLayout.d.ts.map +1 -1
- package/lib/typescript/components/touchables/TouchableHighlight.d.ts +1 -1
- package/lib/typescript/components/touchables/TouchableHighlight.d.ts.map +1 -1
- package/lib/typescript/components/touchables/TouchableOpacity.d.ts.map +1 -1
- package/lib/typescript/handlers/hitSlop.d.ts +51 -0
- package/lib/typescript/handlers/hitSlop.d.ts.map +1 -0
- package/lib/typescript/handlers/utils.d.ts.map +1 -1
- package/lib/typescript/mocks/hostDetector.d.ts +5 -2
- package/lib/typescript/mocks/hostDetector.d.ts.map +1 -1
- package/lib/typescript/specs/RNGestureHandlerDetectorNativeComponent.d.ts +1 -1
- package/lib/typescript/specs/RNGestureHandlerDetectorNativeComponent.d.ts.map +1 -1
- package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts +1 -1
- package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/v3/components/GestureComponents.web.d.ts +16 -8
- package/lib/typescript/v3/components/GestureComponents.web.d.ts.map +1 -1
- package/lib/typescript/v3/components/Pressable.d.ts +13 -0
- package/lib/typescript/v3/components/Pressable.d.ts.map +1 -1
- package/lib/typescript/v3/components/PressableWithTouchable.d.ts +5 -0
- package/lib/typescript/v3/components/PressableWithTouchable.d.ts.map +1 -0
- package/lib/typescript/v3/components/StatefulPressable.d.ts +5 -0
- package/lib/typescript/v3/components/StatefulPressable.d.ts.map +1 -0
- package/lib/typescript/v3/components/pointerStyle.d.ts +3 -0
- package/lib/typescript/v3/components/pointerStyle.d.ts.map +1 -0
- package/lib/typescript/v3/components/pointerStyle.web.d.ts +3 -0
- package/lib/typescript/v3/components/pointerStyle.web.d.ts.map +1 -0
- package/lib/typescript/v3/detectors/ReanimatedNativeDetector.d.ts +3 -1
- package/lib/typescript/v3/detectors/ReanimatedNativeDetector.d.ts.map +1 -1
- package/lib/typescript/v3/detectors/ReanimatedNativeDetector.web.d.ts +3 -1
- package/lib/typescript/v3/detectors/ReanimatedNativeDetector.web.d.ts.map +1 -1
- package/lib/typescript/v3/detectors/common.d.ts +2 -2
- package/lib/typescript/v3/detectors/common.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/utils/configUtils.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/utils/reanimatedUtils.d.ts.map +1 -1
- package/lib/typescript/v3/types/ConfigTypes.d.ts +2 -1
- package/lib/typescript/v3/types/ConfigTypes.d.ts.map +1 -1
- package/lib/typescript/v3/types/EventTypes.d.ts +3 -2
- package/lib/typescript/v3/types/EventTypes.d.ts.map +1 -1
- package/lib/typescript/web/handlers/GestureHandler.d.ts +0 -1
- package/lib/typescript/web/handlers/GestureHandler.d.ts.map +1 -1
- package/lib/typescript/web/interfaces.d.ts +3 -12
- package/lib/typescript/web/interfaces.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/components/GestureHandlerButton.web.tsx +3 -2
- package/src/components/ReanimatedDrawerLayout.tsx +3 -0
- package/src/components/touchables/TouchableOpacity.tsx +1 -0
- package/src/handlers/hitSlop.ts +146 -0
- package/src/handlers/utils.ts +4 -2
- package/src/specs/RNGestureHandlerDetectorNativeComponent.ts +1 -1
- package/src/specs/RNGestureHandlerRootViewNativeComponent.ts +1 -1
- package/src/v3/components/Pressable.tsx +28 -448
- package/src/v3/components/PressableWithTouchable.tsx +326 -0
- package/src/v3/components/StatefulPressable.tsx +476 -0
- package/src/v3/components/pointerStyle.ts +5 -0
- package/src/v3/components/pointerStyle.web.ts +6 -0
- package/src/v3/hooks/utils/configUtils.ts +7 -1
- package/src/v3/hooks/utils/reanimatedUtils.ts +17 -8
- package/src/v3/types/ConfigTypes.ts +2 -1
- package/src/v3/types/EventTypes.ts +7 -3
- package/src/web/handlers/GestureHandler.ts +26 -77
- package/src/web/interfaces.ts +3 -13
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { FlatListProps } from 'react-native';
|
|
3
3
|
export declare const ScrollView: {
|
|
4
|
-
(props: import("react-native").ScrollViewProps & {
|
|
4
|
+
(props: Omit<import("react-native").ScrollViewProps, "ref"> & {
|
|
5
|
+
ref?: React.Ref<import("react-native").ScrollViewInstance> | undefined;
|
|
6
|
+
} & {
|
|
5
7
|
disableReanimated?: boolean | undefined;
|
|
6
8
|
useAnimated?: boolean | undefined;
|
|
7
9
|
testID?: string | undefined;
|
|
@@ -28,7 +30,7 @@ export declare const ScrollView: {
|
|
|
28
30
|
} | {
|
|
29
31
|
bottom: number | import("../types").SharedValue<number>;
|
|
30
32
|
height: number | import("../types").SharedValue<number>;
|
|
31
|
-
} | null | undefined;
|
|
33
|
+
} | [left: number | import("../types").SharedValue<number> | import("../types").SharedValue<null> | null, top: number | import("../types").SharedValue<number> | import("../types").SharedValue<null> | null, right: number | import("../types").SharedValue<number> | import("../types").SharedValue<null> | null, bottom: number | import("../types").SharedValue<number> | import("../types").SharedValue<null> | null, width: number | import("../types").SharedValue<number> | import("../types").SharedValue<null> | null, height: number | import("../types").SharedValue<number> | import("../types").SharedValue<null> | null] | null | undefined;
|
|
32
34
|
activeCursor?: import("../..").ActiveCursor | import("../types").SharedValue<import("../..").ActiveCursor> | undefined;
|
|
33
35
|
mouseButton?: import("../..").MouseButton | import("../types").SharedValue<import("../..").MouseButton> | undefined;
|
|
34
36
|
cancelsTouchesInView?: boolean | import("../types").SharedValue<boolean> | undefined;
|
|
@@ -38,7 +40,9 @@ export declare const ScrollView: {
|
|
|
38
40
|
displayName: any;
|
|
39
41
|
};
|
|
40
42
|
export declare const Switch: {
|
|
41
|
-
(props: import("react-native").SwitchProps & {
|
|
43
|
+
(props: Omit<import("react-native").SwitchProps, "ref"> & {
|
|
44
|
+
ref?: React.Ref<import("react-native").SwitchInstance> | undefined;
|
|
45
|
+
} & {
|
|
42
46
|
disableReanimated?: boolean | undefined;
|
|
43
47
|
useAnimated?: boolean | undefined;
|
|
44
48
|
testID?: string | undefined;
|
|
@@ -65,7 +69,7 @@ export declare const Switch: {
|
|
|
65
69
|
} | {
|
|
66
70
|
bottom: number | import("../types").SharedValue<number>;
|
|
67
71
|
height: number | import("../types").SharedValue<number>;
|
|
68
|
-
} | null | undefined;
|
|
72
|
+
} | [left: number | import("../types").SharedValue<number> | import("../types").SharedValue<null> | null, top: number | import("../types").SharedValue<number> | import("../types").SharedValue<null> | null, right: number | import("../types").SharedValue<number> | import("../types").SharedValue<null> | null, bottom: number | import("../types").SharedValue<number> | import("../types").SharedValue<null> | null, width: number | import("../types").SharedValue<number> | import("../types").SharedValue<null> | null, height: number | import("../types").SharedValue<number> | import("../types").SharedValue<null> | null] | null | undefined;
|
|
69
73
|
activeCursor?: import("../..").ActiveCursor | import("../types").SharedValue<import("../..").ActiveCursor> | undefined;
|
|
70
74
|
mouseButton?: import("../..").MouseButton | import("../types").SharedValue<import("../..").MouseButton> | undefined;
|
|
71
75
|
cancelsTouchesInView?: boolean | import("../types").SharedValue<boolean> | undefined;
|
|
@@ -75,7 +79,9 @@ export declare const Switch: {
|
|
|
75
79
|
displayName: any;
|
|
76
80
|
};
|
|
77
81
|
export declare const TextInput: {
|
|
78
|
-
(props: import("react-native").TextInputProps & {
|
|
82
|
+
(props: Omit<import("react-native").TextInputProps, "ref"> & {
|
|
83
|
+
ref?: React.Ref<import("react-native").TextInputInstance> | undefined;
|
|
84
|
+
} & {
|
|
79
85
|
disableReanimated?: boolean | undefined;
|
|
80
86
|
useAnimated?: boolean | undefined;
|
|
81
87
|
testID?: string | undefined;
|
|
@@ -102,7 +108,7 @@ export declare const TextInput: {
|
|
|
102
108
|
} | {
|
|
103
109
|
bottom: number | import("../types").SharedValue<number>;
|
|
104
110
|
height: number | import("../types").SharedValue<number>;
|
|
105
|
-
} | null | undefined;
|
|
111
|
+
} | [left: number | import("../types").SharedValue<number> | import("../types").SharedValue<null> | null, top: number | import("../types").SharedValue<number> | import("../types").SharedValue<null> | null, right: number | import("../types").SharedValue<number> | import("../types").SharedValue<null> | null, bottom: number | import("../types").SharedValue<number> | import("../types").SharedValue<null> | null, width: number | import("../types").SharedValue<number> | import("../types").SharedValue<null> | null, height: number | import("../types").SharedValue<number> | import("../types").SharedValue<null> | null] | null | undefined;
|
|
106
112
|
activeCursor?: import("../..").ActiveCursor | import("../types").SharedValue<import("../..").ActiveCursor> | undefined;
|
|
107
113
|
mouseButton?: import("../..").MouseButton | import("../types").SharedValue<import("../..").MouseButton> | undefined;
|
|
108
114
|
cancelsTouchesInView?: boolean | import("../types").SharedValue<boolean> | undefined;
|
|
@@ -113,7 +119,9 @@ export declare const TextInput: {
|
|
|
113
119
|
};
|
|
114
120
|
export declare const DrawerLayoutAndroid: () => React.JSX.Element;
|
|
115
121
|
export declare const RefreshControl: {
|
|
116
|
-
(props: import("react-native").ViewProps & {
|
|
122
|
+
(props: Omit<import("react-native").ViewProps, "ref"> & {
|
|
123
|
+
ref?: React.Ref<import("react-native").ViewInstance> | undefined;
|
|
124
|
+
} & {
|
|
117
125
|
disableReanimated?: boolean | undefined;
|
|
118
126
|
useAnimated?: boolean | undefined;
|
|
119
127
|
testID?: string | undefined;
|
|
@@ -140,7 +148,7 @@ export declare const RefreshControl: {
|
|
|
140
148
|
} | {
|
|
141
149
|
bottom: number | import("../types").SharedValue<number>;
|
|
142
150
|
height: number | import("../types").SharedValue<number>;
|
|
143
|
-
} | null | undefined;
|
|
151
|
+
} | [left: number | import("../types").SharedValue<number> | import("../types").SharedValue<null> | null, top: number | import("../types").SharedValue<number> | import("../types").SharedValue<null> | null, right: number | import("../types").SharedValue<number> | import("../types").SharedValue<null> | null, bottom: number | import("../types").SharedValue<number> | import("../types").SharedValue<null> | null, width: number | import("../types").SharedValue<number> | import("../types").SharedValue<null> | null, height: number | import("../types").SharedValue<number> | import("../types").SharedValue<null> | null] | null | undefined;
|
|
144
152
|
activeCursor?: import("../..").ActiveCursor | import("../types").SharedValue<import("../..").ActiveCursor> | undefined;
|
|
145
153
|
mouseButton?: import("../..").MouseButton | import("../types").SharedValue<import("../..").MouseButton> | undefined;
|
|
146
154
|
cancelsTouchesInView?: boolean | import("../types").SharedValue<boolean> | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GestureComponents.web.d.ts","sourceRoot":"","sources":["../../../../src/v3/components/GestureComponents.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAWlD,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"GestureComponents.web.d.ts","sourceRoot":"","sources":["../../../../src/v3/components/GestureComponents.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAWlD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAErB,CAAC;AAEH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIjB,CAAC;AAEH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAmC,CAAC;AAE1D,eAAO,MAAM,mBAAmB,yBAG/B,CAAC;AAKF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA4B,CAAC;AAExD,eAAO,MAAM,QAAQ,GAAI,KAAK,EAAG,OAAO,aAAa,CAAC,KAAK,CAAC,sBAK3D,CAAC"}
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { PressableProps } from '../../components/Pressable/PressableProps';
|
|
3
|
+
/**
|
|
4
|
+
* `Pressable` dispatches between two implementations:
|
|
5
|
+
*
|
|
6
|
+
* - {@link StatefulPressable} — the state-machine engine, used whenever any of
|
|
7
|
+
* the `simultaneousWith` / `requireToFail` / `block` relation props is passed,
|
|
8
|
+
* since coordinating the press with an external gesture needs the composed
|
|
9
|
+
* gesture recognizers.
|
|
10
|
+
* - {@link PressableWithTouchable} — the simpler engine built on the native
|
|
11
|
+
* button `Touchable`, used for everything else (the common case).
|
|
12
|
+
*
|
|
13
|
+
* The choice is re-evaluated each render: toggling a relation prop at runtime
|
|
14
|
+
* swaps engines, which remounts and drops any in-progress press.
|
|
15
|
+
*/
|
|
3
16
|
declare const Pressable: (props: PressableProps) => React.JSX.Element;
|
|
4
17
|
export default Pressable;
|
|
5
18
|
//# sourceMappingURL=Pressable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pressable.d.ts","sourceRoot":"","sources":["../../../../src/v3/components/Pressable.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Pressable.d.ts","sourceRoot":"","sources":["../../../../src/v3/components/Pressable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAIhF;;;;;;;;;;;;GAYG;AACH,QAAA,MAAM,SAAS,GAAI,OAAO,cAAc,sBAWvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PressableProps } from '../../components/Pressable/PressableProps';
|
|
3
|
+
declare const PressableWithTouchable: (props: PressableProps) => React.JSX.Element;
|
|
4
|
+
export default PressableWithTouchable;
|
|
5
|
+
//# sourceMappingURL=PressableWithTouchable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PressableWithTouchable.d.ts","sourceRoot":"","sources":["../../../../src/v3/components/PressableWithTouchable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAI3D,OAAO,KAAK,EAGV,cAAc,EACf,MAAM,2CAA2C,CAAC;AAoDnD,QAAA,MAAM,sBAAsB,GAAI,OAAO,cAAc,sBAuQpD,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PressableProps } from '../../components/Pressable/PressableProps';
|
|
3
|
+
declare const StatefulPressable: (props: PressableProps) => React.JSX.Element;
|
|
4
|
+
export default StatefulPressable;
|
|
5
|
+
//# sourceMappingURL=StatefulPressable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatefulPressable.d.ts","sourceRoot":"","sources":["../../../../src/v3/components/StatefulPressable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AASf,OAAO,KAAK,EAGV,cAAc,EACf,MAAM,2CAA2C,CAAC;AAkCnD,QAAA,MAAM,iBAAiB,GAAI,OAAO,cAAc,sBAma/C,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pointerStyle.d.ts","sourceRoot":"","sources":["../../../../src/v3/components/pointerStyle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAI9C,eAAO,MAAM,YAAY,EAAE,SAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pointerStyle.web.d.ts","sourceRoot":"","sources":["../../../../src/v3/components/pointerStyle.web.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAK9C,eAAO,MAAM,YAAY,EAAE,SAAiC,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type RNGestureHandlerDetectorNativeComponentProps } from './HostGestureDetector';
|
|
2
2
|
declare function LeanReanimatedNativeDetector(props: RNGestureHandlerDetectorNativeComponentProps): import("react").JSX.Element;
|
|
3
|
-
export declare const ReanimatedNativeDetector: import("react").ComponentClass<RNGestureHandlerDetectorNativeComponentProps,
|
|
3
|
+
export declare const ReanimatedNativeDetector: typeof LeanReanimatedNativeDetector | import("react").ComponentClass<Omit<RNGestureHandlerDetectorNativeComponentProps, "ref"> & {
|
|
4
|
+
ref?: React.Ref<import("react-native").HostInstance> | undefined;
|
|
5
|
+
}, any> | undefined;
|
|
4
6
|
export {};
|
|
5
7
|
//# sourceMappingURL=ReanimatedNativeDetector.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReanimatedNativeDetector.d.ts","sourceRoot":"","sources":["../../../../src/v3/detectors/ReanimatedNativeDetector.tsx"],"names":[],"mappings":"AAKA,OAA4B,EAC1B,KAAK,4CAA4C,EAClD,MAAM,uBAAuB,CAAC;AA0B/B,iBAAS,4BAA4B,CACnC,KAAK,EAAE,4CAA4C,+BAuDpD;AAED,eAAO,MAAM,wBAAwB
|
|
1
|
+
{"version":3,"file":"ReanimatedNativeDetector.d.ts","sourceRoot":"","sources":["../../../../src/v3/detectors/ReanimatedNativeDetector.tsx"],"names":[],"mappings":"AAKA,OAA4B,EAC1B,KAAK,4CAA4C,EAClD,MAAM,uBAAuB,CAAC;AA0B/B,iBAAS,4BAA4B,CACnC,KAAK,EAAE,4CAA4C,+BAuDpD;AAED,eAAO,MAAM,wBAAwB;;mBAE+B,CAAC"}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
export declare const ReanimatedNativeDetector: import("react").ComponentClass<import("./HostGestureDetector").RNGestureHandlerDetectorNativeComponentProps,
|
|
1
|
+
export declare const ReanimatedNativeDetector: import("react").ComponentClass<Omit<import("./HostGestureDetector").RNGestureHandlerDetectorNativeComponentProps, "ref"> & {
|
|
2
|
+
ref?: React.Ref<import("react-native").HostInstance> | undefined;
|
|
3
|
+
}, any> | undefined;
|
|
2
4
|
//# sourceMappingURL=ReanimatedNativeDetector.web.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReanimatedNativeDetector.web.d.ts","sourceRoot":"","sources":["../../../../src/v3/detectors/ReanimatedNativeDetector.web.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,wBAAwB
|
|
1
|
+
{"version":3,"file":"ReanimatedNativeDetector.web.d.ts","sourceRoot":"","sources":["../../../../src/v3/detectors/ReanimatedNativeDetector.web.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,wBAAwB;;mBAC6B,CAAC"}
|
|
@@ -25,10 +25,10 @@ export interface VirtualDetectorProps<TConfig, THandlerData, TExtendedHandlerDat
|
|
|
25
25
|
}
|
|
26
26
|
export type GestureDetectorProps<TConfig, THandlerData, TExtendedHandlerData extends THandlerData> = NativeDetectorProps<TConfig, THandlerData, TExtendedHandlerData> | InterceptingGestureDetectorProps<TConfig, THandlerData, TExtendedHandlerData> | LegacyDetectorProps;
|
|
27
27
|
export declare const AnimatedNativeDetector: React.ComponentType<RNGestureHandlerDetectorNativeComponentProps>;
|
|
28
|
-
export declare const nativeDetectorStyles: {
|
|
28
|
+
export declare const nativeDetectorStyles: Readonly<{
|
|
29
29
|
detector: {
|
|
30
30
|
display: "contents";
|
|
31
31
|
};
|
|
32
|
-
}
|
|
32
|
+
}>;
|
|
33
33
|
export {};
|
|
34
34
|
//# sourceMappingURL=common.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/v3/detectors/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAA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AM,WAAW,oBAAoB,CACnC,OAAO,EACP,YAAY,EACZ,oBAAoB,SAAS,YAAY,CACzC,SAAQ,0BAA0B;IAClC,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAAC;CAC/D;AAED,MAAM,MAAM,oBAAoB,CAC9B,OAAO,EACP,YAAY,EACZ,oBAAoB,SAAS,YAAY,IAEvC,mBAAmB,CAAC,OAAO,EAAE,YAAY,EAAE,oBAAoB,CAAC,GAChE,gCAAgC,CAC9B,OAAO,EACP,YAAY,EACZ,oBAAoB,CACrB,GACD,mBAAmB,CAAC;AAExB,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,aAAa,CAAC,4CAA4C,CAC9C,CAAC;AAExD,eAAO,MAAM,oBAAoB;;;;EAI/B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configUtils.d.ts","sourceRoot":"","sources":["../../../../../src/v3/hooks/utils/configUtils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"configUtils.d.ts","sourceRoot":"","sources":["../../../../../src/v3/hooks/utils/configUtils.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,iBAAiB,EACjB,0BAA0B,EAC1B,OAAO,EACP,iBAAiB,EAClB,MAAM,aAAa,CAAC;AAYrB,wBAAgB,gBAAgB,CAC9B,OAAO,EACP,YAAY,EACZ,oBAAoB,SAAS,YAAY,EACzC,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,YAAY,EAAE,oBAAoB,CAAC,GAAG,OAAO,CAOxE;AAED,wBAAgB,0BAA0B,CACxC,OAAO,SAAS,MAAM,EACtB,YAAY,EACZ,oBAAoB,SAAS,YAAY,EACzC,MAAM,EAAE,iBAAiB,CAAC,OAAO,EAAE,YAAY,EAAE,oBAAoB,CAAC,QA6CvE;AAED,wBAAgB,0BAA0B,CACxC,OAAO,SAAS,MAAM,EACtB,YAAY,EACZ,oBAAoB,SAAS,YAAY,EAEzC,WAAW,EAAE,iBAAiB,EAC9B,MAAM,EAAE,iBAAiB,CAAC,OAAO,EAAE,YAAY,EAAE,oBAAoB,CAAC,kEAqCvE;AA6CD,wBAAgB,0BAA0B,CACxC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvC,YAAY,EACZ,eAAe,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,EACzD,oBAAoB,SAAS,YAAY,GAAG,YAAY,EAExD,MAAM,EAAE,0BAA0B,CAChC,iBAAiB,CAAC,OAAO,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAC/D,EACD,YAAY,GAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAyB,EACjE,gBAAgB,GAAE,CAChB,MAAM,EAAE,eAAe,KACpB,eAA2C,GAC/C,iBAAiB,CAAC,eAAe,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAmBxE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reanimatedUtils.d.ts","sourceRoot":"","sources":["../../../../../src/v3/hooks/utils/reanimatedUtils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"reanimatedUtils.d.ts","sourceRoot":"","sources":["../../../../../src/v3/hooks/utils/reanimatedUtils.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,iBAAiB,EACjB,OAAO,EACP,WAAW,EACX,cAAc,EACf,MAAM,aAAa,CAAC;AAiBrB,eAAO,MAAM,mBAAmB,QAAQ,CAAC;AAKzC,wBAAgB,gBAAgB,CAC9B,OAAO,EACP,YAAY,EACZ,oBAAoB,SAAS,YAAY,EAEzC,MAAM,EAAE,iBAAiB,CAAC,OAAO,EAAE,YAAY,EAAE,oBAAoB,CAAC,EACtE,UAAU,EAAE,MAAM,QA0CnB;AAED,wBAAgB,kBAAkB,CAChC,OAAO,EACP,YAAY,EACZ,oBAAoB,SAAS,YAAY,EAEzC,MAAM,EAAE,iBAAiB,CAAC,OAAO,EAAE,YAAY,EAAE,oBAAoB,CAAC,EACtE,UAAU,EAAE,MAAM,QAsBnB;AAED,wBAAgB,uBAAuB,CACrC,OAAO,EACP,YAAY,EACZ,oBAAoB,SAAS,YAAY,EACzC,MAAM,EAAE,iBAAiB,CAAC,OAAO,EAAE,YAAY,EAAE,oBAAoB,CAAC,WAUvE;AAED,wBAAgB,gBAAgB,CAAC,CAAC,EAChC,CAAC,EAAE,cAAc,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG,SAAS,GACxC,CAAC,CAIH;AAED,wBAAgB,sBAAsB,CACpC,OAAO,EACP,YAAY,EACZ,oBAAoB,SAAS,YAAY,EAEzC,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,YAAY,EAAE,oBAAoB,CAAC,GAC5D,WAAW,CAAC,OAAO,CAAC,EAAE,CAWxB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ActiveCursor, GestureTouchEvent, HitSlop, MouseButton, TouchAction, UserSelect } from '../../handlers/gestureHandlerCommon';
|
|
2
|
+
import type { NormalizedHitSlop } from '../../handlers/hitSlop';
|
|
2
3
|
import type { AnimatedEvent, ChangeCalculatorType, GestureEndEvent, GestureEvent } from './EventTypes';
|
|
3
4
|
import type { WithSharedValue } from './ReanimatedTypes';
|
|
4
5
|
export type GestureEventCallback<THandlerData> = (event: GestureEvent<THandlerData>) => void;
|
|
@@ -39,7 +40,7 @@ export type CommonGestureConfig = {
|
|
|
39
40
|
runOnJS?: boolean | undefined;
|
|
40
41
|
enabled?: boolean | undefined;
|
|
41
42
|
shouldCancelWhenOutside?: boolean | undefined;
|
|
42
|
-
hitSlop?: HitSlop | undefined;
|
|
43
|
+
hitSlop?: HitSlop | NormalizedHitSlop | undefined;
|
|
43
44
|
activeCursor?: ActiveCursor | undefined;
|
|
44
45
|
mouseButton?: MouseButton | undefined;
|
|
45
46
|
cancelsTouchesInView?: boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"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AE,OAAO,GAAG,iBAAiB,GAAG,SAAS,CAAC;IAClD,YAAY,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;IACxC,WAAW,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IACtC,oBAAoB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3C,kBAAkB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACzC,gBAAgB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACxC,EACD,YAAY,GAAG,WAAW,CAC3B,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,2BAA2B,EAAE,OAAO,CAAC;IACrC,wBAAwB,EAAE,OAAO,CAAC;CACnC,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type { BaseSyntheticEvent } from 'react';
|
|
2
1
|
import type { GestureTouchEvent } from '../../handlers/gestureHandlerCommon';
|
|
3
2
|
import type { PointerType } from '../../PointerType';
|
|
4
3
|
import type { State } from '../../State';
|
|
5
|
-
export type NativeEventWrapper<T> =
|
|
4
|
+
export type NativeEventWrapper<T> = {
|
|
5
|
+
nativeEvent: T;
|
|
6
|
+
};
|
|
6
7
|
export type ButtonEvent = Readonly<{
|
|
7
8
|
pointerInside: boolean;
|
|
8
9
|
x: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventTypes.d.ts","sourceRoot":"","sources":["../../../../src/v3/types/EventTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"EventTypes.d.ts","sourceRoot":"","sources":["../../../../src/v3/types/EventTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAMzC,MAAM,MAAM,kBAAkB,CAAC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AAE,WAAW,CAAC,oBAAoB,CAAC,EAC1C,QAAQ,EAAE,WAAW,CAAC,oBAAoB,CAAC,GAAG,IAAI,KAC/C,OAAO,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC,CAAC"}
|
|
@@ -97,7 +97,6 @@ export default abstract class GestureHandler implements IGestureHandler {
|
|
|
97
97
|
private maybeUpdateEnabled;
|
|
98
98
|
setGestureConfig(config: Config): void;
|
|
99
99
|
updateGestureConfig(config: Partial<Config>): void;
|
|
100
|
-
private validateHitSlops;
|
|
101
100
|
private checkHitSlop;
|
|
102
101
|
isButtonInConfig(mouseButton: MouseButton | undefined): number | true | undefined;
|
|
103
102
|
protected resetConfig(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GestureHandler.d.ts","sourceRoot":"","sources":["../../../../src/web/handlers/GestureHandler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EACV,YAAY,EAEZ,WAAW,EACX,UAAU,EACX,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"GestureHandler.d.ts","sourceRoot":"","sources":["../../../../src/web/handlers/GestureHandler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EACV,YAAY,EAEZ,WAAW,EACX,UAAU,EACX,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAElE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAGpC,OAAO,KAAK,EAGV,WAAW,EACX,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EACV,YAAY,EACZ,MAAM,EAEN,YAAY,EAEZ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SAAA,EAEtC;IAED,IAAW,iBAAiB,YAE3B;IACD,SAAS,KAAK,iBAAiB,CAAC,KAAK,SAAA,EAEpC;IAED,IAAW,YAAY,6BAEtB;IAED,IAAW,WAAW,4BAErB;IAED,IAAW,UAAU,2BAEpB;IAED,IAAW,IAAI,IAIW,iBAAiB,CAF1C;IAED,SAAS,KAAK,IAAI,CAAC,KAAK,EAAE,iBAAiB,EAE1C;IAED;;OAEG;IACH,SAAgB,YAAY,EAAE,OAAO,CAAS;IAEvC,oBAAoB,IAAI,MAAM,EAAE;IAIvC,OAAO,CAAC,UAAU;CAOnB"}
|
|
@@ -1,29 +1,20 @@
|
|
|
1
1
|
import type { RefObject } from 'react';
|
|
2
2
|
import type { Directions } from '../Directions';
|
|
3
3
|
import type { ActiveCursor, GestureTouchEvent, MouseButton, StylusData, TouchAction, UserSelect } from '../handlers/gestureHandlerCommon';
|
|
4
|
+
import type { NormalizedHitSlop } from '../handlers/hitSlop';
|
|
4
5
|
import type { PointerType } from '../PointerType';
|
|
5
6
|
import type { State } from '../State';
|
|
6
7
|
import type { GestureStateChangeEventWithHandlerData, GestureUpdateEventWithHandlerData } from '../v3/types';
|
|
7
|
-
export interface HitSlop {
|
|
8
|
-
left?: number | undefined;
|
|
9
|
-
right?: number | undefined;
|
|
10
|
-
top?: number | undefined;
|
|
11
|
-
bottom?: number | undefined;
|
|
12
|
-
horizontal?: number | undefined;
|
|
13
|
-
vertical?: number | undefined;
|
|
14
|
-
width?: number | undefined;
|
|
15
|
-
height?: number | undefined;
|
|
16
|
-
}
|
|
17
8
|
export interface Handler {
|
|
18
9
|
handlerTag: number;
|
|
19
10
|
}
|
|
20
|
-
type ConfigArgs = number | boolean | string |
|
|
11
|
+
type ConfigArgs = number | boolean | string | NormalizedHitSlop | UserSelect | TouchAction | ActiveCursor | Directions | Handler[] | null | undefined;
|
|
21
12
|
export interface Config extends Record<string, ConfigArgs> {
|
|
22
13
|
enabled: boolean;
|
|
23
14
|
simultaneousHandlers?: Handler[] | null | undefined;
|
|
24
15
|
waitFor?: Handler[] | null | undefined;
|
|
25
16
|
blocksHandlers?: Handler[] | null | undefined;
|
|
26
|
-
hitSlop?:
|
|
17
|
+
hitSlop?: NormalizedHitSlop | null | undefined;
|
|
27
18
|
shouldCancelWhenOutside?: boolean | undefined;
|
|
28
19
|
userSelect?: UserSelect | undefined;
|
|
29
20
|
activeCursor?: ActiveCursor | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/web/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EACV,YAAY,EACZ,iBAAiB,EACjB,WAAW,EACX,UAAU,EACV,WAAW,EACX,UAAU,EACX,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/web/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EACV,YAAY,EACZ,iBAAiB,EACjB,WAAW,EACX,UAAU,EACV,WAAW,EACX,UAAU,EACX,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,KAAK,EACV,sCAAsC,EACtC,iCAAiC,EAClC,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,OAAO;IACtB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,KAA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WAAW,YAAY;IAC3B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,UAAU,CAAC;IACtB,WAAW,EAAE,WAAW,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IACjC,UAAU,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC;AAED,oBAAY,UAAU;IACpB,IAAI,IAAA;IACJ,uBAAuB,IAAA;IACvB,EAAE,IAAA;IACF,qBAAqB,IAAA;IACrB,IAAI,IAAA;IACJ,KAAK,IAAA;IACL,KAAK,IAAA;IACL,MAAM,IAAA;CACP;AAED,oBAAY,WAAW;IACrB,YAAY,IAAA;IACZ,KAAK,IAAA;IACL,QAAQ,IAAA;CACT;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,OAAO,EAAE,WAAW,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG;IACnB,UAAU,EAAE;QAAE,OAAO,EAAE,UAAU,CAAA;KAAE,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;AAErD,oBAAY,iBAAiB;IAC3B,MAAM,yBAAyB;IAC/B,MAAM,WAAW;IACjB,UAAU,eAAe;CAC1B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-gesture-handler",
|
|
3
|
-
"version": "3.2.0
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "Declarative API exposing native platform touch and gesture system to React Native",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "jest",
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
"@babel/core": "^7.25.2",
|
|
74
74
|
"@babel/preset-env": "^7.25.3",
|
|
75
75
|
"@babel/preset-typescript": "^7.12.7",
|
|
76
|
-
"@react-native/babel-preset": "0.
|
|
77
|
-
"@react-native/jest-preset": "0.
|
|
76
|
+
"@react-native/babel-preset": "0.87.0",
|
|
77
|
+
"@react-native/jest-preset": "0.87.0",
|
|
78
78
|
"@testing-library/react-native": "^12.5.1",
|
|
79
79
|
"@types/invariant": "^2.2.37",
|
|
80
80
|
"@types/jest": "^29.5.12",
|
|
@@ -95,10 +95,10 @@
|
|
|
95
95
|
"madge": "^6.1.0",
|
|
96
96
|
"prettier": "3.3.3",
|
|
97
97
|
"react": "19.2.3",
|
|
98
|
-
"react-native": "0.
|
|
98
|
+
"react-native": "0.87.0",
|
|
99
99
|
"react-native-builder-bob": "^0.40.13",
|
|
100
|
-
"react-native-reanimated": "
|
|
101
|
-
"react-native-worklets": "patch:react-native-worklets@npm%3A0.
|
|
100
|
+
"react-native-reanimated": "4.6.0-nightly-20260811-248dee712",
|
|
101
|
+
"react-native-worklets": "patch:react-native-worklets@npm%3A0.12.0-nightly-20260810-fb9cb5596#~/.yarn/patches/react-native-worklets-npm-0.12.0-nightly-20260810-fb9cb5596-f08a72b88e.patch",
|
|
102
102
|
"react-test-renderer": "19.2.3",
|
|
103
103
|
"typescript": "~6.0.3"
|
|
104
104
|
},
|
|
@@ -3,6 +3,7 @@ import type { ColorValue, NativeSyntheticEvent, ViewProps } from 'react-native';
|
|
|
3
3
|
import { View } from 'react-native';
|
|
4
4
|
|
|
5
5
|
import { ActionType } from '../ActionType';
|
|
6
|
+
import { normalizeHitSlop } from '../handlers/hitSlop';
|
|
6
7
|
import { PointerType } from '../PointerType';
|
|
7
8
|
import RNGestureHandlerModule from '../RNGestureHandlerModule.web';
|
|
8
9
|
import { useIsomorphicLayoutEffect } from '../useIsomorphicLayoutEffect';
|
|
@@ -188,7 +189,7 @@ export const ButtonComponent = ({
|
|
|
188
189
|
disallowInterruption: true,
|
|
189
190
|
yieldsToContinuousGestures: true,
|
|
190
191
|
testID: gestureTestID,
|
|
191
|
-
hitSlop: gestureHitSlop,
|
|
192
|
+
hitSlop: normalizeHitSlop(gestureHitSlop),
|
|
192
193
|
hasLongPressHandler,
|
|
193
194
|
longPressDuration,
|
|
194
195
|
});
|
|
@@ -199,7 +200,7 @@ export const ButtonComponent = ({
|
|
|
199
200
|
disallowInterruption: true,
|
|
200
201
|
yieldsToContinuousGestures: true,
|
|
201
202
|
testID: gestureTestID,
|
|
202
|
-
hitSlop: gestureHitSlop,
|
|
203
|
+
hitSlop: normalizeHitSlop(gestureHitSlop),
|
|
203
204
|
hasLongPressHandler,
|
|
204
205
|
longPressDuration,
|
|
205
206
|
};
|
|
@@ -281,7 +281,10 @@ const defaultProps = {
|
|
|
281
281
|
};
|
|
282
282
|
|
|
283
283
|
// StatusBar.setHidden and Keyboard.dismiss cannot be directly referenced in worklets.
|
|
284
|
+
//
|
|
285
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
284
286
|
const setStatusBarHidden = StatusBar.setHidden;
|
|
287
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
285
288
|
const dismissKeyboard = Keyboard.dismiss;
|
|
286
289
|
|
|
287
290
|
const DrawerLayout = function DrawerLayout(
|
|
@@ -39,6 +39,7 @@ export default class TouchableOpacity extends Component<TouchableOpacityProps> {
|
|
|
39
39
|
Animated.timing(this.opacity, {
|
|
40
40
|
toValue: value,
|
|
41
41
|
duration: duration,
|
|
42
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
42
43
|
easing: Easing.inOut(Easing.quad),
|
|
43
44
|
useNativeDriver: this.props.useNativeAnimations ?? true,
|
|
44
45
|
}).start();
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import type { HitSlop } from './gestureHandlerCommon';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Canonical representation of `hitSlop`, shared by every platform:
|
|
5
|
+
* `[left, top, right, bottom, width, height]`, where `null` marks an edge that
|
|
6
|
+
* the user did not specify.
|
|
7
|
+
*
|
|
8
|
+
* The public `HitSlop` type accepts a number, `horizontal`/`vertical`
|
|
9
|
+
* shorthands and per-edge values; normalizing all of that here means each
|
|
10
|
+
* platform only ever parses these six slots. `width` and `height` cannot be
|
|
11
|
+
* flattened into the four edges because they are resolved against the measured
|
|
12
|
+
* view bounds at hit-test time, so they are carried through as-is.
|
|
13
|
+
*/
|
|
14
|
+
export type CanonicalHitSlop = [
|
|
15
|
+
left: number | null,
|
|
16
|
+
top: number | null,
|
|
17
|
+
right: number | null,
|
|
18
|
+
bottom: number | null,
|
|
19
|
+
width: number | null,
|
|
20
|
+
height: number | null,
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* What actually travels to the platforms: either a plain number, which every
|
|
25
|
+
* reader expands into four equal edges itself, or the six canonical slots.
|
|
26
|
+
* A number stays a number on purpose — it avoids the array wrapper the bridge
|
|
27
|
+
* would otherwise allocate for the far more common uniform case.
|
|
28
|
+
*/
|
|
29
|
+
export type NormalizedHitSlop = number | CanonicalHitSlop;
|
|
30
|
+
|
|
31
|
+
const CLEARED_HIT_SLOP: CanonicalHitSlop = [null, null, null, null, null, null];
|
|
32
|
+
|
|
33
|
+
export const HIT_SLOP_LEFT_IDX = 0;
|
|
34
|
+
export const HIT_SLOP_TOP_IDX = 1;
|
|
35
|
+
export const HIT_SLOP_RIGHT_IDX = 2;
|
|
36
|
+
export const HIT_SLOP_BOTTOM_IDX = 3;
|
|
37
|
+
export const HIT_SLOP_WIDTH_IDX = 4;
|
|
38
|
+
export const HIT_SLOP_HEIGHT_IDX = 5;
|
|
39
|
+
|
|
40
|
+
type HitSlopEdge =
|
|
41
|
+
| 'left'
|
|
42
|
+
| 'right'
|
|
43
|
+
| 'top'
|
|
44
|
+
| 'bottom'
|
|
45
|
+
| 'vertical'
|
|
46
|
+
| 'horizontal'
|
|
47
|
+
| 'width'
|
|
48
|
+
| 'height';
|
|
49
|
+
|
|
50
|
+
type HitSlopObject = Partial<Record<HitSlopEdge, number | undefined>>;
|
|
51
|
+
|
|
52
|
+
function validateHitSlop(hitSlop: CanonicalHitSlop) {
|
|
53
|
+
'worklet';
|
|
54
|
+
const [left, top, right, bottom, width, height] = hitSlop;
|
|
55
|
+
|
|
56
|
+
// Unlike the edges, `width` and `height` are absolute sizes rather than
|
|
57
|
+
// deltas, so a negative value describes an inverted region that no pointer
|
|
58
|
+
// can fall into.
|
|
59
|
+
if (width !== null && width < 0) {
|
|
60
|
+
throw new Error("HitSlop error: 'width' cannot be negative");
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (height !== null && height < 0) {
|
|
64
|
+
throw new Error("HitSlop error: 'height' cannot be negative");
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (width !== null && left !== null && right !== null) {
|
|
68
|
+
throw new Error(
|
|
69
|
+
"HitSlop error: cannot have all of 'left', 'right' and 'width' defined"
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (width !== null && left === null && right === null) {
|
|
74
|
+
throw new Error(
|
|
75
|
+
"HitSlop error: when 'width' is defined, either 'left' or 'right' has to be defined"
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (height !== null && top !== null && bottom !== null) {
|
|
80
|
+
throw new Error(
|
|
81
|
+
"HitSlop error: cannot have all of 'top', 'bottom' and 'height' defined"
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (height !== null && top === null && bottom === null) {
|
|
86
|
+
throw new Error(
|
|
87
|
+
"HitSlop error: when 'height' is defined, either 'top' or 'bottom' has to be defined"
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Converts the user-facing `hitSlop` into `CanonicalHitSlop`.
|
|
94
|
+
*
|
|
95
|
+
* `undefined` is passed through so that the property stays out of partial
|
|
96
|
+
* config updates (the platforms leave the previous value alone when the key is
|
|
97
|
+
* missing), while an explicit `null` becomes six unset slots, which is how the
|
|
98
|
+
* platforms already represent a cleared hit slop.
|
|
99
|
+
*
|
|
100
|
+
* A plain number is forwarded untouched, so the uniform case never allocates an
|
|
101
|
+
* array on the way to the platforms.
|
|
102
|
+
*
|
|
103
|
+
* Already normalized values are returned as-is, which keeps the function
|
|
104
|
+
* idempotent.
|
|
105
|
+
*
|
|
106
|
+
* Runs on the UI thread as well, since `hitSlop` can be a shared value.
|
|
107
|
+
*/
|
|
108
|
+
export function normalizeHitSlop(
|
|
109
|
+
hitSlop: HitSlop | NormalizedHitSlop
|
|
110
|
+
): NormalizedHitSlop | undefined {
|
|
111
|
+
'worklet';
|
|
112
|
+
|
|
113
|
+
if (hitSlop === undefined) {
|
|
114
|
+
return undefined;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// An explicit `null` means "clear it", which is what six unset slots already
|
|
118
|
+
// describe. It is sent that way rather than as a bare `null` because the iOS
|
|
119
|
+
// TurboModule bridge drops null-valued keys, making a clear indistinguishable
|
|
120
|
+
// from an absent one.
|
|
121
|
+
if (hitSlop === null) {
|
|
122
|
+
return CLEARED_HIT_SLOP;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
if (typeof hitSlop === 'number' || Array.isArray(hitSlop)) {
|
|
126
|
+
return hitSlop;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
const slop = hitSlop as HitSlopObject;
|
|
130
|
+
const { horizontal, vertical } = slop;
|
|
131
|
+
|
|
132
|
+
const normalized: CanonicalHitSlop = [
|
|
133
|
+
slop.left ?? horizontal ?? null,
|
|
134
|
+
slop.top ?? vertical ?? null,
|
|
135
|
+
slop.right ?? horizontal ?? null,
|
|
136
|
+
slop.bottom ?? vertical ?? null,
|
|
137
|
+
slop.width ?? null,
|
|
138
|
+
slop.height ?? null,
|
|
139
|
+
];
|
|
140
|
+
|
|
141
|
+
if (__DEV__) {
|
|
142
|
+
validateHitSlop(normalized);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
return normalized;
|
|
146
|
+
}
|