react-native-gesture-handler 3.2.0-nightly-20260812-bd853311a → 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/react/RNGestureHandlerButtonViewManager.kt +4 -2
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerDetectorView.kt +1 -2
- 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/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/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/package.json +1 -1
- 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/android/build.gradle
CHANGED
|
@@ -60,7 +60,22 @@ if (isNewArchitectureEnabled()) {
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
apply plugin: 'com.android.library'
|
|
63
|
-
|
|
63
|
+
|
|
64
|
+
def shouldEnableAgpFallback() {
|
|
65
|
+
def agpMajorVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
|
|
66
|
+
if (agpMajorVersion <= 8) {
|
|
67
|
+
return true
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
def propertyVal = providers.gradleProperty("android.builtInKotlin").orNull
|
|
71
|
+
def isBuiltInKotlinEnabled = propertyVal != null ? propertyVal.toBoolean() : true
|
|
72
|
+
|
|
73
|
+
return !isBuiltInKotlinEnabled
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (shouldEnableAgpFallback()) {
|
|
77
|
+
apply plugin: 'kotlin-android'
|
|
78
|
+
}
|
|
64
79
|
|
|
65
80
|
if (project == rootProject) {
|
|
66
81
|
apply from: "spotless.gradle"
|
|
@@ -201,17 +216,17 @@ android {
|
|
|
201
216
|
}
|
|
202
217
|
|
|
203
218
|
sourceSets.main {
|
|
204
|
-
|
|
219
|
+
kotlin {
|
|
205
220
|
if (shouldUseCommonInterfaceFromReanimated()) {
|
|
206
|
-
|
|
221
|
+
directories.add('reanimated/src/main/java')
|
|
207
222
|
} else {
|
|
208
|
-
|
|
223
|
+
directories.add('noreanimated/src/main/java')
|
|
209
224
|
}
|
|
210
225
|
|
|
211
226
|
if (shouldUseCommonInterfaceFromRNSVG()) {
|
|
212
|
-
|
|
227
|
+
directories.add('svg/src/main/java')
|
|
213
228
|
} else {
|
|
214
|
-
|
|
229
|
+
directories.add('nosvg/src/main/java')
|
|
215
230
|
}
|
|
216
231
|
}
|
|
217
232
|
}
|
|
@@ -786,7 +786,8 @@ class RNGestureHandlerButtonViewManager :
|
|
|
786
786
|
|
|
787
787
|
private fun dispatchJSEvent(type: EventType, handler: NativeViewGestureHandler) {
|
|
788
788
|
val reactContext = context as? ReactContext ?: return
|
|
789
|
-
|
|
789
|
+
// TODO: deprecated, but its replacement is unavailable before RN 0.85 — drop when possible
|
|
790
|
+
val eventDispatcher = UIManagerHelper.getEventDispatcherForReactTag(reactContext, this.id) ?: return
|
|
790
791
|
eventDispatcher.dispatchEvent(RNGestureHandlerButtonEvent.obtain(this, handler, type))
|
|
791
792
|
|
|
792
793
|
if (type == EventType.PressIn) {
|
|
@@ -1163,7 +1164,8 @@ class RNGestureHandlerButtonViewManager :
|
|
|
1163
1164
|
private fun dispatchHoverEvent(type: EventType) {
|
|
1164
1165
|
val sample = lastHoverSample ?: return
|
|
1165
1166
|
val reactContext = context as? ReactContext ?: return
|
|
1166
|
-
|
|
1167
|
+
// TODO: deprecated, but its replacement is unavailable before RN 0.85 — drop when possible
|
|
1168
|
+
val eventDispatcher = UIManagerHelper.getEventDispatcherForReactTag(reactContext, this.id) ?: return
|
|
1167
1169
|
|
|
1168
1170
|
eventDispatcher.dispatchEvent(RNGestureHandlerButtonEvent.obtain(this, sample, type))
|
|
1169
1171
|
}
|
package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerDetectorView.kt
CHANGED
|
@@ -230,8 +230,7 @@ class RNGestureHandlerDetectorView(context: Context) : ReactViewGroup(context) {
|
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
private fun detachNativeGestureHandlers() {
|
|
233
|
-
val registry = RNGestureHandlerModule.registries[moduleId]
|
|
234
|
-
?: throw Exception("Tried to access a non-existent registry")
|
|
233
|
+
val registry = RNGestureHandlerModule.registries[moduleId] ?: return
|
|
235
234
|
|
|
236
235
|
for (tag in nativeHandlers) {
|
|
237
236
|
if (!attachedHandlers.contains(tag)) {
|
|
@@ -67,7 +67,7 @@ export interface NativeProps extends ViewProps {
|
|
|
67
67
|
| undefined;
|
|
68
68
|
|
|
69
69
|
handlerTags: CodegenTypes.Int32[];
|
|
70
|
-
moduleId
|
|
70
|
+
moduleId?: CodegenTypes.WithDefault<CodegenTypes.Int32, -1>;
|
|
71
71
|
virtualChildren: VirtualChildrenProps[];
|
|
72
72
|
|
|
73
73
|
pointerEvents?: CodegenTypes.WithDefault<
|
|
@@ -1,318 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import React
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { PressableStateMachine } from '../../components/Pressable/StateMachine';
|
|
7
|
-
import { addInsets, gestureToPressableEvent, gestureTouchToPressableEvent, isTouchWithinInset, numberAsInset, viewCenterToPressableEvent } from '../../components/Pressable/utils';
|
|
8
|
-
import { getTVProps } from '../../components/utils';
|
|
9
|
-
import { PressabilityDebugView } from '../../handlers/PressabilityDebugView';
|
|
10
|
-
import { useIsScreenReaderEnabled } from '../../useIsScreenReaderEnabled';
|
|
11
|
-
import { INT32_MAX, isTestEnv } from '../../utils';
|
|
12
|
-
import { GestureDetector } from '../detectors';
|
|
13
|
-
import { useHoverGesture, useLongPressGesture, useNativeGesture, useSimultaneousGestures } from '../hooks';
|
|
14
|
-
import { isKeyboardDismissingTap, JSResponderContext } from '../scrollViewInterop';
|
|
15
|
-
import { PureNativeButton } from './GestureButtons';
|
|
16
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
|
-
const DEFAULT_LONG_PRESS_DURATION = 500;
|
|
18
|
-
const IS_TEST_ENV = isTestEnv();
|
|
19
|
-
const Pressable = props => {
|
|
20
|
-
const {
|
|
21
|
-
testOnly_pressed,
|
|
22
|
-
hitSlop,
|
|
23
|
-
pressRetentionOffset,
|
|
24
|
-
delayHoverIn,
|
|
25
|
-
delayHoverOut,
|
|
26
|
-
delayLongPress,
|
|
27
|
-
unstable_pressDelay,
|
|
28
|
-
onHoverIn,
|
|
29
|
-
onHoverOut,
|
|
30
|
-
onPress,
|
|
31
|
-
onPressIn,
|
|
32
|
-
onPressOut,
|
|
33
|
-
onLongPress,
|
|
34
|
-
onLayout,
|
|
35
|
-
style,
|
|
36
|
-
children,
|
|
37
|
-
android_disableSound,
|
|
38
|
-
android_ripple,
|
|
39
|
-
disabled,
|
|
40
|
-
accessible,
|
|
41
|
-
simultaneousWith,
|
|
42
|
-
requireToFail,
|
|
43
|
-
block,
|
|
44
|
-
ref,
|
|
45
|
-
...remainingProps
|
|
46
|
-
} = props;
|
|
47
|
-
const [pressedState, setPressedState] = useState(testOnly_pressed ?? false);
|
|
48
|
-
const longPressTimeoutRef = useRef(null);
|
|
49
|
-
const pressDelayTimeoutRef = useRef(null);
|
|
50
|
-
const isOnPressAllowed = useRef(true);
|
|
51
|
-
const jsResponderContext = use(JSResponderContext);
|
|
52
|
-
const isCurrentlyPressed = useRef(false);
|
|
53
|
-
const dimensions = useRef({
|
|
54
|
-
width: 0,
|
|
55
|
-
height: 0
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
// When the touch that begins a press is the one dismissing the keyboard
|
|
59
|
-
// (keyboardShouldPersistTaps="never"), the press is swallowed to match RN's
|
|
60
|
-
// touchables.
|
|
61
|
-
const dropKeyboardTapRef = useRef(null);
|
|
62
|
-
const normalizedHitSlop = useMemo(() => typeof hitSlop === 'number' ? numberAsInset(hitSlop) : hitSlop ?? numberAsInset(0), [hitSlop]);
|
|
63
|
-
const normalizedPressRetentionOffset = useMemo(() => typeof pressRetentionOffset === 'number' ? numberAsInset(pressRetentionOffset) : pressRetentionOffset ?? {}, [pressRetentionOffset]);
|
|
64
|
-
const appliedHitSlop = addInsets(normalizedHitSlop, normalizedPressRetentionOffset);
|
|
65
|
-
const cancelLongPress = useCallback(() => {
|
|
66
|
-
if (longPressTimeoutRef.current) {
|
|
67
|
-
clearTimeout(longPressTimeoutRef.current);
|
|
68
|
-
longPressTimeoutRef.current = null;
|
|
69
|
-
isOnPressAllowed.current = true;
|
|
70
|
-
}
|
|
71
|
-
}, []);
|
|
72
|
-
const cancelDelayedPress = useCallback(() => {
|
|
73
|
-
if (pressDelayTimeoutRef.current) {
|
|
74
|
-
clearTimeout(pressDelayTimeoutRef.current);
|
|
75
|
-
pressDelayTimeoutRef.current = null;
|
|
76
|
-
}
|
|
77
|
-
}, []);
|
|
78
|
-
const startLongPress = useCallback(event => {
|
|
79
|
-
if (onLongPress) {
|
|
80
|
-
cancelLongPress();
|
|
81
|
-
longPressTimeoutRef.current = setTimeout(() => {
|
|
82
|
-
isOnPressAllowed.current = false;
|
|
83
|
-
onLongPress(event);
|
|
84
|
-
}, delayLongPress ?? DEFAULT_LONG_PRESS_DURATION);
|
|
85
|
-
}
|
|
86
|
-
}, [onLongPress, cancelLongPress, delayLongPress]);
|
|
87
|
-
const innerHandlePressIn = useCallback(event => {
|
|
88
|
-
onPressIn?.(event);
|
|
89
|
-
startLongPress(event);
|
|
90
|
-
setPressedState(true);
|
|
91
|
-
if (pressDelayTimeoutRef.current) {
|
|
92
|
-
clearTimeout(pressDelayTimeoutRef.current);
|
|
93
|
-
pressDelayTimeoutRef.current = null;
|
|
94
|
-
}
|
|
95
|
-
}, [onPressIn, startLongPress]);
|
|
96
|
-
const handleFinalize = useCallback(() => {
|
|
97
|
-
isCurrentlyPressed.current = false;
|
|
98
|
-
dropKeyboardTapRef.current = null;
|
|
99
|
-
cancelLongPress();
|
|
100
|
-
cancelDelayedPress();
|
|
101
|
-
setPressedState(false);
|
|
102
|
-
}, [cancelDelayedPress, cancelLongPress]);
|
|
103
|
-
const captureKeyboardDismiss = useCallback(() => {
|
|
104
|
-
dropKeyboardTapRef.current ??= isKeyboardDismissingTap(jsResponderContext);
|
|
105
|
-
}, [jsResponderContext]);
|
|
106
|
-
const handlePressIn = useCallback((event, skipBoundsCheck = false) => {
|
|
107
|
-
if (!skipBoundsCheck && !isTouchWithinInset(dimensions.current, normalizedHitSlop, event.nativeEvent.changedTouches.at(-1))) {
|
|
108
|
-
// Ignoring pressIn within pressRetentionOffset
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
isCurrentlyPressed.current = true;
|
|
112
|
-
if (unstable_pressDelay) {
|
|
113
|
-
pressDelayTimeoutRef.current = setTimeout(() => {
|
|
114
|
-
innerHandlePressIn(event);
|
|
115
|
-
}, unstable_pressDelay);
|
|
116
|
-
} else {
|
|
117
|
-
innerHandlePressIn(event);
|
|
118
|
-
}
|
|
119
|
-
}, [innerHandlePressIn, normalizedHitSlop, unstable_pressDelay]);
|
|
120
|
-
const handlePressOut = useCallback((event, success = true) => {
|
|
121
|
-
if (!isCurrentlyPressed.current) {
|
|
122
|
-
// Some prop configurations may lead to handlePressOut being called mutliple times.
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
isCurrentlyPressed.current = false;
|
|
126
|
-
if (pressDelayTimeoutRef.current) {
|
|
127
|
-
innerHandlePressIn(event);
|
|
128
|
-
}
|
|
129
|
-
onPressOut?.(event);
|
|
130
|
-
if (isOnPressAllowed.current && success) {
|
|
131
|
-
onPress?.(event);
|
|
132
|
-
}
|
|
133
|
-
handleFinalize();
|
|
134
|
-
}, [handleFinalize, innerHandlePressIn, onPress, onPressOut]);
|
|
135
|
-
const stateMachine = useMemo(() => new PressableStateMachine(), []);
|
|
136
|
-
const isScreenReaderEnabled = useIsScreenReaderEnabled();
|
|
137
|
-
useEffect(() => {
|
|
138
|
-
const configuration = getStatesConfig(handlePressIn, handlePressOut, isScreenReaderEnabled);
|
|
139
|
-
stateMachine.setStates(configuration);
|
|
140
|
-
}, [handlePressIn, handlePressOut, stateMachine, isScreenReaderEnabled]);
|
|
141
|
-
const hoverInTimeout = useRef(null);
|
|
142
|
-
const hoverOutTimeout = useRef(null);
|
|
143
|
-
const hoverGesture = useHoverGesture({
|
|
144
|
-
manualActivation: true,
|
|
145
|
-
// Prevents Hover blocking Native gesture on web
|
|
146
|
-
cancelsTouchesInView: false,
|
|
147
|
-
onBegin: event => {
|
|
148
|
-
if (hoverOutTimeout.current) {
|
|
149
|
-
clearTimeout(hoverOutTimeout.current);
|
|
150
|
-
}
|
|
151
|
-
if (delayHoverIn) {
|
|
152
|
-
hoverInTimeout.current = setTimeout(() => onHoverIn?.(gestureToPressableEvent(event)), delayHoverIn);
|
|
153
|
-
return;
|
|
154
|
-
}
|
|
155
|
-
onHoverIn?.(gestureToPressableEvent(event));
|
|
156
|
-
},
|
|
157
|
-
onFinalize: event => {
|
|
158
|
-
if (hoverInTimeout.current) {
|
|
159
|
-
clearTimeout(hoverInTimeout.current);
|
|
160
|
-
}
|
|
161
|
-
if (delayHoverOut) {
|
|
162
|
-
hoverOutTimeout.current = setTimeout(() => onHoverOut?.(gestureToPressableEvent(event)), delayHoverOut);
|
|
163
|
-
return;
|
|
164
|
-
}
|
|
165
|
-
onHoverOut?.(gestureToPressableEvent(event));
|
|
166
|
-
},
|
|
167
|
-
enabled: disabled !== true,
|
|
168
|
-
disableReanimated: true,
|
|
169
|
-
simultaneousWith,
|
|
170
|
-
block,
|
|
171
|
-
requireToFail,
|
|
172
|
-
hitSlop: appliedHitSlop
|
|
173
|
-
});
|
|
174
|
-
const pressAndTouchGesture = useLongPressGesture({
|
|
175
|
-
minDuration: Platform.OS === 'web' ? 0 : INT32_MAX,
|
|
176
|
-
// Long press handles finalize on web, thus it must activate right away
|
|
177
|
-
maxDistance: INT32_MAX,
|
|
178
|
-
// Stops long press from cancelling on touch move
|
|
179
|
-
cancelsTouchesInView: false,
|
|
180
|
-
onTouchesDown: event => {
|
|
181
|
-
captureKeyboardDismiss();
|
|
182
|
-
if (dropKeyboardTapRef.current) {
|
|
183
|
-
return;
|
|
184
|
-
}
|
|
185
|
-
const pressableEvent = gestureTouchToPressableEvent(event);
|
|
186
|
-
stateMachine.handleEvent(StateMachineEvent.LONG_PRESS_TOUCHES_DOWN, pressableEvent);
|
|
187
|
-
},
|
|
188
|
-
onTouchesUp: () => {
|
|
189
|
-
if (Platform.OS === 'android' && !isScreenReaderEnabled) {
|
|
190
|
-
// Prevents potential soft-locks
|
|
191
|
-
stateMachine.reset();
|
|
192
|
-
handleFinalize();
|
|
193
|
-
}
|
|
194
|
-
},
|
|
195
|
-
onTouchesCancel: event => {
|
|
196
|
-
const pressableEvent = gestureTouchToPressableEvent(event);
|
|
197
|
-
stateMachine.reset();
|
|
198
|
-
handlePressOut(pressableEvent, false);
|
|
199
|
-
},
|
|
200
|
-
onFinalize: event => {
|
|
201
|
-
if (Platform.OS !== 'web') {
|
|
202
|
-
return;
|
|
203
|
-
}
|
|
204
|
-
stateMachine.handleEvent(event.canceled ? StateMachineEvent.CANCEL : StateMachineEvent.FINALIZE);
|
|
205
|
-
handleFinalize();
|
|
206
|
-
},
|
|
207
|
-
enabled: disabled !== true,
|
|
208
|
-
disableReanimated: true,
|
|
209
|
-
simultaneousWith: simultaneousWith,
|
|
210
|
-
block: block,
|
|
211
|
-
requireToFail: requireToFail,
|
|
212
|
-
hitSlop: appliedHitSlop
|
|
213
|
-
});
|
|
214
|
-
|
|
215
|
-
// RNButton is placed inside ButtonGesture to enable Android's ripple and to capture non-propagating events
|
|
216
|
-
const buttonGesture = useNativeGesture({
|
|
217
|
-
onTouchesCancel: event => {
|
|
218
|
-
if (Platform.OS !== 'macos' && Platform.OS !== 'web') {
|
|
219
|
-
// On MacOS cancel occurs in middle of gesture
|
|
220
|
-
// On Web cancel occurs on mouse move, which is unwanted
|
|
221
|
-
const pressableEvent = gestureTouchToPressableEvent(event);
|
|
222
|
-
stateMachine.reset();
|
|
223
|
-
handlePressOut(pressableEvent, false);
|
|
224
|
-
}
|
|
225
|
-
},
|
|
226
|
-
onBegin: () => {
|
|
227
|
-
captureKeyboardDismiss();
|
|
228
|
-
if (dropKeyboardTapRef.current) {
|
|
229
|
-
return;
|
|
230
|
-
}
|
|
231
|
-
if (Platform.isTV) {
|
|
232
|
-
// tvOS drives this native gesture from the focus-engine Select press.
|
|
233
|
-
// The press state machine is touch-based and never
|
|
234
|
-
// receives LONG_PRESS_TOUCHES_DOWN here, so bypass it and drive the press handlers directly.
|
|
235
|
-
// A focus-driven press has no coordinates, so skip the hit-slop bounds check entirely.
|
|
236
|
-
handlePressIn(viewCenterToPressableEvent(dimensions.current), true);
|
|
237
|
-
return;
|
|
238
|
-
}
|
|
239
|
-
if (Platform.OS === 'android' && isScreenReaderEnabled) {
|
|
240
|
-
stateMachine.handleEvent(StateMachineEvent.NATIVE_BEGIN, viewCenterToPressableEvent(dimensions.current));
|
|
241
|
-
return;
|
|
242
|
-
}
|
|
243
|
-
stateMachine.handleEvent(StateMachineEvent.NATIVE_BEGIN);
|
|
244
|
-
},
|
|
245
|
-
onActivate: () => {
|
|
246
|
-
if (!Platform.isTV && Platform.OS !== 'android') {
|
|
247
|
-
stateMachine.handleEvent(StateMachineEvent.NATIVE_START);
|
|
248
|
-
}
|
|
249
|
-
},
|
|
250
|
-
onFinalize: event => {
|
|
251
|
-
// On Web we use LongPress.onFinalize instead of Native.onFinalize,
|
|
252
|
-
// as Native cancels on mouse move, and LongPress does not.
|
|
253
|
-
if (Platform.OS === 'web') {
|
|
254
|
-
return;
|
|
255
|
-
}
|
|
256
|
-
if (Platform.isTV) {
|
|
257
|
-
handlePressOut(viewCenterToPressableEvent(dimensions.current), !event.canceled);
|
|
258
|
-
handleFinalize();
|
|
259
|
-
return;
|
|
260
|
-
}
|
|
261
|
-
stateMachine.handleEvent(event.canceled ? StateMachineEvent.CANCEL : StateMachineEvent.FINALIZE);
|
|
262
|
-
handleFinalize();
|
|
263
|
-
},
|
|
264
|
-
enabled: disabled !== true,
|
|
265
|
-
disableReanimated: true,
|
|
266
|
-
simultaneousWith,
|
|
267
|
-
block,
|
|
268
|
-
requireToFail,
|
|
269
|
-
hitSlop: appliedHitSlop,
|
|
270
|
-
shouldActivateOnStart: Platform.OS === 'web'
|
|
271
|
-
});
|
|
272
|
-
const gesture = useSimultaneousGestures(buttonGesture, pressAndTouchGesture, hoverGesture);
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import PressableWithTouchable from './PressableWithTouchable';
|
|
5
|
+
import StatefulPressable from './StatefulPressable';
|
|
273
6
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
gesture: gesture,
|
|
295
|
-
children: /*#__PURE__*/_jsxs(PureNativeButton, {
|
|
296
|
-
...remainingProps,
|
|
297
|
-
ref: ref,
|
|
298
|
-
...tvProps,
|
|
299
|
-
onLayout: setDimensions,
|
|
300
|
-
accessible: accessible !== false,
|
|
301
|
-
hitSlop: appliedHitSlop,
|
|
302
|
-
enabled: disabled !== true,
|
|
303
|
-
touchSoundDisabled: android_disableSound ?? undefined,
|
|
304
|
-
rippleColor: rippleColor,
|
|
305
|
-
rippleRadius: android_ripple?.radius ?? undefined,
|
|
306
|
-
style: [pointerStyle, styleProp],
|
|
307
|
-
testOnly_onPress: IS_TEST_ENV ? onPress : undefined,
|
|
308
|
-
testOnly_onPressIn: IS_TEST_ENV ? onPressIn : undefined,
|
|
309
|
-
testOnly_onPressOut: IS_TEST_ENV ? onPressOut : undefined,
|
|
310
|
-
testOnly_onLongPress: IS_TEST_ENV ? onLongPress : undefined,
|
|
311
|
-
children: [childrenProp, __DEV__ ? /*#__PURE__*/_jsx(PressabilityDebugView, {
|
|
312
|
-
color: "red",
|
|
313
|
-
hitSlop: normalizedHitSlop
|
|
314
|
-
}) : null]
|
|
315
|
-
})
|
|
7
|
+
/**
|
|
8
|
+
* `Pressable` dispatches between two implementations:
|
|
9
|
+
*
|
|
10
|
+
* - {@link StatefulPressable} — the state-machine engine, used whenever any of
|
|
11
|
+
* the `simultaneousWith` / `requireToFail` / `block` relation props is passed,
|
|
12
|
+
* since coordinating the press with an external gesture needs the composed
|
|
13
|
+
* gesture recognizers.
|
|
14
|
+
* - {@link PressableWithTouchable} — the simpler engine built on the native
|
|
15
|
+
* button `Touchable`, used for everything else (the common case).
|
|
16
|
+
*
|
|
17
|
+
* The choice is re-evaluated each render: toggling a relation prop at runtime
|
|
18
|
+
* swaps engines, which remounts and drops any in-progress press.
|
|
19
|
+
*/
|
|
20
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
|
+
const Pressable = props => {
|
|
22
|
+
const usesRelations = props.simultaneousWith != null || props.requireToFail != null || props.block != null;
|
|
23
|
+
return usesRelations ? /*#__PURE__*/_jsx(StatefulPressable, {
|
|
24
|
+
...props
|
|
25
|
+
}) : /*#__PURE__*/_jsx(PressableWithTouchable, {
|
|
26
|
+
...props
|
|
316
27
|
});
|
|
317
28
|
};
|
|
318
29
|
export default Pressable;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","use","useCallback","useEffect","useMemo","useRef","useState","Platform","getStatesConfig","StateMachineEvent","PressableStateMachine","addInsets","gestureToPressableEvent","gestureTouchToPressableEvent","isTouchWithinInset","numberAsInset","viewCenterToPressableEvent","getTVProps","PressabilityDebugView","useIsScreenReaderEnabled","INT32_MAX","isTestEnv","GestureDetector","useHoverGesture","useLongPressGesture","useNativeGesture","useSimultaneousGestures","isKeyboardDismissingTap","JSResponderContext","PureNativeButton","jsx","_jsx","jsxs","_jsxs","DEFAULT_LONG_PRESS_DURATION","IS_TEST_ENV","Pressable","props","testOnly_pressed","hitSlop","pressRetentionOffset","delayHoverIn","delayHoverOut","delayLongPress","unstable_pressDelay","onHoverIn","onHoverOut","onPress","onPressIn","onPressOut","onLongPress","onLayout","style","children","android_disableSound","android_ripple","disabled","accessible","simultaneousWith","requireToFail","block","ref","remainingProps","pressedState","setPressedState","longPressTimeoutRef","pressDelayTimeoutRef","isOnPressAllowed","jsResponderContext","isCurrentlyPressed","dimensions","width","height","dropKeyboardTapRef","normalizedHitSlop","normalizedPressRetentionOffset","appliedHitSlop","cancelLongPress","current","clearTimeout","cancelDelayedPress","startLongPress","event","setTimeout","innerHandlePressIn","handleFinalize","captureKeyboardDismiss","handlePressIn","skipBoundsCheck","nativeEvent","changedTouches","at","handlePressOut","success","stateMachine","isScreenReaderEnabled","configuration","setStates","hoverInTimeout","hoverOutTimeout","hoverGesture","manualActivation","cancelsTouchesInView","onBegin","onFinalize","enabled","disableReanimated","pressAndTouchGesture","minDuration","OS","maxDistance","onTouchesDown","pressableEvent","handleEvent","LONG_PRESS_TOUCHES_DOWN","onTouchesUp","reset","onTouchesCancel","canceled","CANCEL","FINALIZE","buttonGesture","isTV","NATIVE_BEGIN","onActivate","NATIVE_START","shouldActivateOnStart","gesture","pointerStyle","cursor","styleProp","pressed","childrenProp","rippleColor","defaultRippleColor","undefined","color","setDimensions","layout","tvProps","touchSoundDisabled","rippleRadius","radius","testOnly_onPress","testOnly_onPressIn","testOnly_onPressOut","testOnly_onLongPress","__DEV__"],"sourceRoot":"../../../../src","sources":["v3/components/Pressable.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IACVC,GAAG,EACHC,WAAW,EACXC,SAAS,EACTC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACH,OAAO;AAOd,SAASC,QAAQ,QAAQ,cAAc;AAOvC,SACEC,eAAe,EACfC,iBAAiB,QACZ,6CAA6C;AACpD,SAASC,qBAAqB,QAAQ,yCAAyC;AAC/E,SACEC,SAAS,EACTC,uBAAuB,EACvBC,4BAA4B,EAC5BC,kBAAkB,EAClBC,aAAa,EACbC,0BAA0B,QACrB,kCA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AGI,KAAK,CAACO,WAAW,CAACiD,MAAM;EAC/C,CAAC,EACD,CAACvF,QAAQ,CACX,CAAC;EAED,MAAMwF,OAAO,GAAG1H,UAAU,CAAC6C,cAAc,CAAC;EAE1C,oBACE/B,IAAA,CAACT,eAAe;IAACyG,OAAO,EAAEA,OAAQ;IAAA1E,QAAA,eAChCpB,KAAA,CAACJ,gBAAgB;MAAA,GACXiC,cAAc;MAClBD,GAAG,EAAEA,GAA8D;MAAA,GAC/D8E,OAAO;MACXxF,QAAQ,EAAEsF,aAAc;MACxBhF,UAAU,EAAEA,UAAU,KAAK,KAAM;MACjClB,OAAO,EAAEqC,cAAe;MACxB6B,OAAO,EAAEjD,QAAQ,KAAK,IAAK;MAC3BoF,kBAAkB,EAAEtF,oBAAoB,IAAIiF,SAAU;MACtDF,WAAW,EAAEA,WAAY;MACzBQ,YAAY,EAAEtF,cAAc,EAAEuF,MAAM,IAAIP,SAAU;MAClDnF,KAAK,EAAE,CAAC4E,YAAY,EAAEE,SAAS,CAAE;MACjCa,gBAAgB,EAAE5G,WAAW,GAAGY,OAAO,GAAGwF,SAAU;MACpDS,kBAAkB,EAAE7G,WAAW,GAAGa,SAAS,GAAGuF,SAAU;MACxDU,mBAAmB,EAAE9G,WAAW,GAAGc,UAAU,GAAGsF,SAAU;MAC1DW,oBAAoB,EAAE/G,WAAW,GAAGe,WAAW,GAAGqF,SAAU;MAAAlF,QAAA,GAC3D+E,YAAY,EACZe,OAAO,gBACNpH,IAAA,CAACb,qBAAqB;QAACsH,KAAK,EAAC,KAAK;QAACjG,OAAO,EAAEmC;MAAkB,CAAE,CAAC,GAC/D,IAAI;IAAA,CACQ;EAAC,CACJ,CAAC;AAEtB,CAAC;AAED,eAAetC,SAAS","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","PressableWithTouchable","StatefulPressable","jsx","_jsx","Pressable","props","usesRelations","simultaneousWith","requireToFail","block"],"sourceRoot":"../../../../src","sources":["v3/components/Pressable.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AAGzB,OAAOC,sBAAsB,MAAM,0BAA0B;AAC7D,OAAOC,iBAAiB,MAAM,qBAAqB;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAZA,SAAAC,GAAA,IAAAC,IAAA;AAaA,MAAMC,SAAS,GAAIC,KAAqB,IAAK;EAC3C,MAAMC,aAAa,GACjBD,KAAK,CAACE,gBAAgB,IAAI,IAAI,IAC9BF,KAAK,CAACG,aAAa,IAAI,IAAI,IAC3BH,KAAK,CAACI,KAAK,IAAI,IAAI;EAErB,OAAOH,aAAa,gBAClBH,IAAA,CAACF,iBAAiB;IAAA,GAAKI;EAAK,CAAG,CAAC,gBAEhCF,IAAA,CAACH,sBAAsB;IAAA,GAAKK;EAAK,CAAG,CACrC;AACH,CAAC;AAED,eAAeD,SAAS","ignoreList":[]}
|