react-native-gesture-handler 2.22.0 → 2.23.0
Sign up to get free protection for your applications and to get access to all the features.
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.kt +14 -0
- package/android/src/main/jni/cpp-adapter.cpp +19 -12
- package/apple/RNGestureHandler.mm +15 -8
- package/apple/RNGestureHandlerModule.mm +17 -5
- package/lib/commonjs/ActionType.js +3 -3
- package/lib/commonjs/ActionType.js.map +1 -1
- package/lib/commonjs/Directions.js +11 -8
- package/lib/commonjs/Directions.js.map +1 -1
- package/lib/commonjs/EnableNewWebImplementation.js +2 -10
- package/lib/commonjs/EnableNewWebImplementation.js.map +1 -1
- package/lib/commonjs/GestureHandlerRootViewContext.js +2 -7
- package/lib/commonjs/GestureHandlerRootViewContext.js.map +1 -1
- package/lib/commonjs/PlatformConstants.js +1 -6
- package/lib/commonjs/PlatformConstants.js.map +1 -1
- package/lib/commonjs/PlatformConstants.web.js +1 -3
- package/lib/commonjs/PlatformConstants.web.js.map +1 -1
- package/lib/commonjs/PointerType.js +3 -5
- package/lib/commonjs/PointerType.js.map +1 -1
- package/lib/commonjs/RNGestureHandlerModule.js +2 -6
- package/lib/commonjs/RNGestureHandlerModule.js.map +1 -1
- package/lib/commonjs/RNGestureHandlerModule.web.js +13 -39
- package/lib/commonjs/RNGestureHandlerModule.web.js.map +1 -1
- package/lib/commonjs/RNGestureHandlerModule.windows.js +22 -32
- package/lib/commonjs/RNGestureHandlerModule.windows.js.map +1 -1
- package/lib/commonjs/RNRenderer.js +1 -3
- package/lib/commonjs/RNRenderer.js.map +1 -1
- package/lib/commonjs/RNRenderer.web.js +1 -2
- package/lib/commonjs/RNRenderer.web.js.map +1 -1
- package/lib/commonjs/State.js +4 -3
- package/lib/commonjs/State.js.map +1 -1
- package/lib/commonjs/TouchEventType.js +3 -3
- package/lib/commonjs/TouchEventType.js.map +1 -1
- package/lib/commonjs/components/DrawerLayout.js +96 -115
- package/lib/commonjs/components/DrawerLayout.js.map +1 -1
- package/lib/commonjs/components/GestureButtons.js +36 -80
- package/lib/commonjs/components/GestureButtons.js.map +1 -1
- package/lib/commonjs/components/GestureButtonsProps.js.map +1 -1
- package/lib/commonjs/components/GestureComponents.js +26 -37
- package/lib/commonjs/components/GestureComponents.js.map +1 -1
- package/lib/commonjs/components/GestureComponents.web.js +13 -27
- package/lib/commonjs/components/GestureComponents.web.js.map +1 -1
- package/lib/commonjs/components/GestureHandlerButton.js +2 -6
- package/lib/commonjs/components/GestureHandlerButton.js.map +1 -1
- package/lib/commonjs/components/GestureHandlerButton.web.js +4 -12
- package/lib/commonjs/components/GestureHandlerButton.web.js.map +1 -1
- package/lib/commonjs/components/GestureHandlerRootView.android.js +4 -15
- package/lib/commonjs/components/GestureHandlerRootView.android.js.map +1 -1
- package/lib/commonjs/components/GestureHandlerRootView.js +4 -14
- package/lib/commonjs/components/GestureHandlerRootView.js.map +1 -1
- package/lib/commonjs/components/GestureHandlerRootView.web.js +4 -13
- package/lib/commonjs/components/GestureHandlerRootView.web.js.map +1 -1
- package/lib/commonjs/components/Pressable/Pressable.js +46 -78
- package/lib/commonjs/components/Pressable/Pressable.js.map +1 -1
- package/lib/commonjs/components/Pressable/PressableProps.js.map +1 -1
- package/lib/commonjs/components/Pressable/index.js +1 -3
- package/lib/commonjs/components/Pressable/index.js.map +1 -1
- package/lib/commonjs/components/Pressable/utils.js +5 -20
- package/lib/commonjs/components/Pressable/utils.js.map +1 -1
- package/lib/commonjs/components/ReanimatedDrawerLayout.js +38 -76
- package/lib/commonjs/components/ReanimatedDrawerLayout.js.map +1 -1
- package/lib/commonjs/components/ReanimatedSwipeable.js +133 -98
- package/lib/commonjs/components/ReanimatedSwipeable.js.map +1 -1
- package/lib/commonjs/components/Swipeable.js +34 -75
- package/lib/commonjs/components/Swipeable.js.map +1 -1
- package/lib/commonjs/components/Text.js +18 -26
- package/lib/commonjs/components/Text.js.map +1 -1
- package/lib/commonjs/components/gestureHandlerRootHOC.js +5 -14
- package/lib/commonjs/components/gestureHandlerRootHOC.js.map +1 -1
- package/lib/commonjs/components/touchables/GenericTouchable.js +40 -76
- package/lib/commonjs/components/touchables/GenericTouchable.js.map +1 -1
- package/lib/commonjs/components/touchables/GenericTouchableProps.js.map +1 -1
- package/lib/commonjs/components/touchables/TouchableHighlight.js +20 -33
- package/lib/commonjs/components/touchables/TouchableHighlight.js.map +1 -1
- package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js +17 -31
- package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js.map +1 -1
- package/lib/commonjs/components/touchables/TouchableNativeFeedback.js +5 -4
- package/lib/commonjs/components/touchables/TouchableNativeFeedback.js.map +1 -1
- package/lib/commonjs/components/touchables/TouchableNativeFeedbackProps.js.map +1 -1
- package/lib/commonjs/components/touchables/TouchableOpacity.js +17 -24
- package/lib/commonjs/components/touchables/TouchableOpacity.js.map +1 -1
- package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js +12 -13
- package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js.map +1 -1
- package/lib/commonjs/components/touchables/index.js +7 -12
- package/lib/commonjs/components/touchables/index.js.map +1 -1
- package/lib/commonjs/findNodeHandle.js +1 -4
- package/lib/commonjs/findNodeHandle.js.map +1 -1
- package/lib/commonjs/findNodeHandle.web.js +9 -10
- package/lib/commonjs/findNodeHandle.web.js.map +1 -1
- package/lib/commonjs/getReactNativeVersion.js +1 -6
- package/lib/commonjs/getReactNativeVersion.js.map +1 -1
- package/lib/commonjs/getReactNativeVersion.web.js +0 -1
- package/lib/commonjs/getReactNativeVersion.web.js.map +1 -1
- package/lib/commonjs/getShadowNodeFromRef.js +13 -14
- package/lib/commonjs/getShadowNodeFromRef.js.map +1 -1
- package/lib/commonjs/getShadowNodeFromRef.web.js +0 -1
- package/lib/commonjs/getShadowNodeFromRef.web.js.map +1 -1
- package/lib/commonjs/ghQueueMicrotask.js +1 -2
- package/lib/commonjs/ghQueueMicrotask.js.map +1 -1
- package/lib/commonjs/handlers/FlingGestureHandler.js +16 -10
- package/lib/commonjs/handlers/FlingGestureHandler.js.map +1 -1
- package/lib/commonjs/handlers/ForceTouchGestureHandler.js +20 -23
- package/lib/commonjs/handlers/ForceTouchGestureHandler.js.map +1 -1
- package/lib/commonjs/handlers/GestureHandlerEventPayload.js.map +1 -1
- package/lib/commonjs/handlers/LongPressGestureHandler.js +16 -10
- package/lib/commonjs/handlers/LongPressGestureHandler.js.map +1 -1
- package/lib/commonjs/handlers/NativeViewGestureHandler.js +17 -12
- package/lib/commonjs/handlers/NativeViewGestureHandler.js.map +1 -1
- package/lib/commonjs/handlers/PanGestureHandler.js +20 -31
- package/lib/commonjs/handlers/PanGestureHandler.js.map +1 -1
- package/lib/commonjs/handlers/PinchGestureHandler.js +14 -8
- package/lib/commonjs/handlers/PinchGestureHandler.js.map +1 -1
- package/lib/commonjs/handlers/PressabilityDebugView.js +0 -1
- package/lib/commonjs/handlers/PressabilityDebugView.js.map +1 -1
- package/lib/commonjs/handlers/PressabilityDebugView.web.js +0 -1
- package/lib/commonjs/handlers/PressabilityDebugView.web.js.map +1 -1
- package/lib/commonjs/handlers/RotationGestureHandler.js +14 -8
- package/lib/commonjs/handlers/RotationGestureHandler.js.map +1 -1
- package/lib/commonjs/handlers/TapGestureHandler.js +16 -10
- package/lib/commonjs/handlers/TapGestureHandler.js.map +1 -1
- package/lib/commonjs/handlers/createHandler.js +55 -135
- package/lib/commonjs/handlers/createHandler.js.map +1 -1
- package/lib/commonjs/handlers/createNativeWrapper.js +33 -32
- package/lib/commonjs/handlers/createNativeWrapper.js.map +1 -1
- package/lib/commonjs/handlers/customDirectEventTypes.js +0 -1
- package/lib/commonjs/handlers/customDirectEventTypes.js.map +1 -1
- package/lib/commonjs/handlers/customDirectEventTypes.web.js +1 -2
- package/lib/commonjs/handlers/customDirectEventTypes.web.js.map +1 -1
- package/lib/commonjs/handlers/gestureHandlerCommon.js +9 -10
- package/lib/commonjs/handlers/gestureHandlerCommon.js.map +1 -1
- package/lib/commonjs/handlers/gestureHandlerTypesCompat.js.map +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.js +5 -14
- package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.js.map +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.web.js +10 -20
- package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.web.js.map +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/attachHandlers.js +9 -29
- package/lib/commonjs/handlers/gestures/GestureDetector/attachHandlers.js.map +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/dropHandlers.js +1 -10
- package/lib/commonjs/handlers/gestures/GestureDetector/dropHandlers.js.map +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/index.js +12 -37
- package/lib/commonjs/handlers/gestures/GestureDetector/index.js.map +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/needsToReattach.js +0 -3
- package/lib/commonjs/handlers/gestures/GestureDetector/needsToReattach.js.map +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/types.js.map +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js +12 -24
- package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js.map +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js +12 -48
- package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/useDetectorUpdater.js +3 -13
- package/lib/commonjs/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/useMountReactions.js +2 -9
- package/lib/commonjs/handlers/gestures/GestureDetector/useMountReactions.js.map +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js +8 -16
- package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/utils.js +28 -56
- package/lib/commonjs/handlers/gestures/GestureDetector/utils.js.map +1 -1
- package/lib/commonjs/handlers/gestures/eventReceiver.js +14 -46
- package/lib/commonjs/handlers/gestures/eventReceiver.js.map +1 -1
- package/lib/commonjs/handlers/gestures/flingGesture.js +5 -12
- package/lib/commonjs/handlers/gestures/flingGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/forceTouchGesture.js +8 -19
- package/lib/commonjs/handlers/gestures/forceTouchGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/gesture.js +44 -84
- package/lib/commonjs/handlers/gestures/gesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/gestureComposition.js +17 -31
- package/lib/commonjs/handlers/gestures/gestureComposition.js.map +1 -1
- package/lib/commonjs/handlers/gestures/gestureObjects.js +1 -27
- package/lib/commonjs/handlers/gestures/gestureObjects.js.map +1 -1
- package/lib/commonjs/handlers/gestures/gestureStateManager.js +3 -9
- package/lib/commonjs/handlers/gestures/gestureStateManager.js.map +1 -1
- package/lib/commonjs/handlers/gestures/gestureStateManager.web.js +2 -7
- package/lib/commonjs/handlers/gestures/gestureStateManager.web.js.map +1 -1
- package/lib/commonjs/handlers/gestures/hoverGesture.js +11 -25
- package/lib/commonjs/handlers/gestures/hoverGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/longPressGesture.js +6 -14
- package/lib/commonjs/handlers/gestures/longPressGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/manualGesture.js +0 -6
- package/lib/commonjs/handlers/gestures/manualGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/nativeGesture.js +5 -12
- package/lib/commonjs/handlers/gestures/nativeGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/panGesture.js +18 -43
- package/lib/commonjs/handlers/gestures/panGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/pinchGesture.js +2 -9
- package/lib/commonjs/handlers/gestures/pinchGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/reanimatedWrapper.js +1 -8
- package/lib/commonjs/handlers/gestures/reanimatedWrapper.js.map +1 -1
- package/lib/commonjs/handlers/gestures/rotationGesture.js +2 -9
- package/lib/commonjs/handlers/gestures/rotationGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/tapGesture.js +10 -22
- package/lib/commonjs/handlers/gestures/tapGesture.js.map +1 -1
- package/lib/commonjs/handlers/getNextHandlerTag.js +0 -1
- package/lib/commonjs/handlers/getNextHandlerTag.js.map +1 -1
- package/lib/commonjs/handlers/handlersRegistry.js +11 -21
- package/lib/commonjs/handlers/handlersRegistry.js.map +1 -1
- package/lib/commonjs/handlers/utils.js +6 -26
- package/lib/commonjs/handlers/utils.js.map +1 -1
- package/lib/commonjs/index.js +75 -104
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/init.js +4 -11
- package/lib/commonjs/init.js.map +1 -1
- package/lib/commonjs/jestUtils/index.js +4 -5
- package/lib/commonjs/jestUtils/index.js.map +1 -1
- package/lib/commonjs/jestUtils/jestUtils.js +19 -83
- package/lib/commonjs/jestUtils/jestUtils.js.map +1 -1
- package/lib/commonjs/mocks.js +5 -15
- package/lib/commonjs/mocks.js.map +1 -1
- package/lib/commonjs/mountRegistry.js +3 -12
- package/lib/commonjs/mountRegistry.js.map +1 -1
- package/lib/commonjs/specs/NativeRNGestureHandlerModule.js +1 -5
- package/lib/commonjs/specs/NativeRNGestureHandlerModule.js.map +1 -1
- package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js +2 -7
- package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js.map +1 -1
- package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js +2 -7
- package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js.map +1 -1
- package/lib/commonjs/typeUtils.js.map +1 -1
- package/lib/commonjs/utils.js +15 -30
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/commonjs/web/Gestures.js +5 -23
- package/lib/commonjs/web/Gestures.js.map +1 -1
- package/lib/commonjs/web/constants.js +2 -4
- package/lib/commonjs/web/constants.js.map +1 -1
- package/lib/commonjs/web/detectors/RotationGestureDetector.js +26 -62
- package/lib/commonjs/web/detectors/RotationGestureDetector.js.map +1 -1
- package/lib/commonjs/web/detectors/ScaleGestureDetector.js +36 -65
- package/lib/commonjs/web/detectors/ScaleGestureDetector.js.map +1 -1
- package/lib/commonjs/web/handlers/FlingGestureHandler.js +12 -55
- package/lib/commonjs/web/handlers/FlingGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/GestureHandler.js +160 -273
- package/lib/commonjs/web/handlers/GestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/HoverGestureHandler.js +8 -21
- package/lib/commonjs/web/handlers/HoverGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/IGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/LongPressGestureHandler.js +12 -53
- package/lib/commonjs/web/handlers/LongPressGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/ManualGestureHandler.js +1 -11
- package/lib/commonjs/web/handlers/ManualGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/NativeViewGestureHandler.js +21 -62
- package/lib/commonjs/web/handlers/NativeViewGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/PanGestureHandler.js +23 -138
- package/lib/commonjs/web/handlers/PanGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/PinchGestureHandler.js +19 -56
- package/lib/commonjs/web/handlers/PinchGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/RotationGestureHandler.js +16 -54
- package/lib/commonjs/web/handlers/RotationGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/TapGestureHandler.js +10 -71
- package/lib/commonjs/web/handlers/TapGestureHandler.js.map +1 -1
- package/lib/commonjs/web/interfaces.js +9 -17
- package/lib/commonjs/web/interfaces.js.map +1 -1
- package/lib/commonjs/web/tools/CircularBuffer.js +17 -29
- package/lib/commonjs/web/tools/CircularBuffer.js.map +1 -1
- package/lib/commonjs/web/tools/EventManager.js +7 -41
- package/lib/commonjs/web/tools/EventManager.js.map +1 -1
- package/lib/commonjs/web/tools/GestureHandlerDelegate.js.map +1 -1
- package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js +51 -118
- package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js.map +1 -1
- package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js +37 -58
- package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js.map +1 -1
- package/lib/commonjs/web/tools/InteractionManager.js +21 -40
- package/lib/commonjs/web/tools/InteractionManager.js.map +1 -1
- package/lib/commonjs/web/tools/KeyboardEventManager.js +4 -26
- package/lib/commonjs/web/tools/KeyboardEventManager.js.map +1 -1
- package/lib/commonjs/web/tools/LeastSquareSolver.js +30 -67
- package/lib/commonjs/web/tools/LeastSquareSolver.js.map +1 -1
- package/lib/commonjs/web/tools/NodeManager.js +9 -16
- package/lib/commonjs/web/tools/NodeManager.js.map +1 -1
- package/lib/commonjs/web/tools/PointerEventManager.js +10 -45
- package/lib/commonjs/web/tools/PointerEventManager.js.map +1 -1
- package/lib/commonjs/web/tools/PointerTracker.js +24 -60
- package/lib/commonjs/web/tools/PointerTracker.js.map +1 -1
- package/lib/commonjs/web/tools/Vector.js +3 -18
- package/lib/commonjs/web/tools/Vector.js.map +1 -1
- package/lib/commonjs/web/tools/VelocityTracker.js +10 -32
- package/lib/commonjs/web/tools/VelocityTracker.js.map +1 -1
- package/lib/commonjs/web/tools/WheelEventManager.js +4 -17
- package/lib/commonjs/web/tools/WheelEventManager.js.map +1 -1
- package/lib/commonjs/web/utils.js +26 -55
- package/lib/commonjs/web/utils.js.map +1 -1
- package/lib/commonjs/web_hammer/DiscreteGestureHandler.js +7 -19
- package/lib/commonjs/web_hammer/DiscreteGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/DraggingGestureHandler.js +3 -13
- package/lib/commonjs/web_hammer/DraggingGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/Errors.js +0 -3
- package/lib/commonjs/web_hammer/Errors.js.map +1 -1
- package/lib/commonjs/web_hammer/FlingGestureHandler.js +13 -44
- package/lib/commonjs/web_hammer/FlingGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/GestureHandler.js +55 -142
- package/lib/commonjs/web_hammer/GestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/IndiscreteGestureHandler.js +2 -11
- package/lib/commonjs/web_hammer/IndiscreteGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/LongPressGestureHandler.js +5 -19
- package/lib/commonjs/web_hammer/LongPressGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/NativeViewGestureHandler.js +16 -24
- package/lib/commonjs/web_hammer/NativeViewGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/NodeManager.js +9 -16
- package/lib/commonjs/web_hammer/NodeManager.js.map +1 -1
- package/lib/commonjs/web_hammer/PanGestureHandler.js +8 -49
- package/lib/commonjs/web_hammer/PanGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/PinchGestureHandler.js +2 -11
- package/lib/commonjs/web_hammer/PinchGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/PressGestureHandler.js +15 -43
- package/lib/commonjs/web_hammer/PressGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/RotationGestureHandler.js +2 -13
- package/lib/commonjs/web_hammer/RotationGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/TapGestureHandler.js +33 -52
- package/lib/commonjs/web_hammer/TapGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/constants.js +13 -26
- package/lib/commonjs/web_hammer/constants.js.map +1 -1
- package/lib/commonjs/web_hammer/utils.js +4 -14
- package/lib/commonjs/web_hammer/utils.js.map +1 -1
- package/lib/module/ActionType.js +3 -1
- package/lib/module/ActionType.js.map +1 -1
- package/lib/module/Directions.js +9 -3
- package/lib/module/Directions.js.map +1 -1
- package/lib/module/EnableNewWebImplementation.js +2 -5
- package/lib/module/EnableNewWebImplementation.js.map +1 -1
- package/lib/module/GestureHandlerRootViewContext.js.map +1 -1
- package/lib/module/PlatformConstants.js +0 -1
- package/lib/module/PlatformConstants.js.map +1 -1
- package/lib/module/PlatformConstants.web.js +0 -1
- package/lib/module/PlatformConstants.web.js.map +1 -1
- package/lib/module/PointerType.js +3 -4
- package/lib/module/PointerType.js.map +1 -1
- package/lib/module/RNGestureHandlerModule.js +1 -0
- package/lib/module/RNGestureHandlerModule.js.map +1 -1
- package/lib/module/RNGestureHandlerModule.web.js +12 -22
- package/lib/module/RNGestureHandlerModule.web.js.map +1 -1
- package/lib/module/RNGestureHandlerModule.windows.js +18 -17
- package/lib/module/RNGestureHandlerModule.windows.js.map +1 -1
- package/lib/module/RNRenderer.js.map +1 -1
- package/lib/module/RNRenderer.web.js.map +1 -1
- package/lib/module/State.js +4 -1
- package/lib/module/State.js.map +1 -1
- package/lib/module/TouchEventType.js +3 -1
- package/lib/module/TouchEventType.js.map +1 -1
- package/lib/module/components/DrawerLayout.js +87 -99
- package/lib/module/components/DrawerLayout.js.map +1 -1
- package/lib/module/components/GestureButtons.js +27 -55
- package/lib/module/components/GestureButtons.js.map +1 -1
- package/lib/module/components/GestureButtonsProps.js.map +1 -1
- package/lib/module/components/GestureComponents.js +17 -12
- package/lib/module/components/GestureComponents.js.map +1 -1
- package/lib/module/components/GestureComponents.web.js +4 -4
- package/lib/module/components/GestureComponents.web.js.map +1 -1
- package/lib/module/components/GestureHandlerButton.js.map +1 -1
- package/lib/module/components/GestureHandlerButton.web.js +1 -2
- package/lib/module/components/GestureHandlerButton.web.js.map +1 -1
- package/lib/module/components/GestureHandlerRootView.android.js +1 -2
- package/lib/module/components/GestureHandlerRootView.android.js.map +1 -1
- package/lib/module/components/GestureHandlerRootView.js +1 -2
- package/lib/module/components/GestureHandlerRootView.js.map +1 -1
- package/lib/module/components/GestureHandlerRootView.web.js +1 -2
- package/lib/module/components/GestureHandlerRootView.web.js.map +1 -1
- package/lib/module/components/Pressable/Pressable.js +44 -61
- package/lib/module/components/Pressable/Pressable.js.map +1 -1
- package/lib/module/components/Pressable/PressableProps.js.map +1 -1
- package/lib/module/components/Pressable/index.js.map +1 -1
- package/lib/module/components/Pressable/utils.js +4 -14
- package/lib/module/components/Pressable/utils.js.map +1 -1
- package/lib/module/components/ReanimatedDrawerLayout.js +34 -56
- package/lib/module/components/ReanimatedDrawerLayout.js.map +1 -1
- package/lib/module/components/ReanimatedSwipeable.js +130 -84
- package/lib/module/components/ReanimatedSwipeable.js.map +1 -1
- package/lib/module/components/Swipeable.js +28 -59
- package/lib/module/components/Swipeable.js.map +1 -1
- package/lib/module/components/Text.js +14 -13
- package/lib/module/components/Text.js.map +1 -1
- package/lib/module/components/gestureHandlerRootHOC.js +2 -2
- package/lib/module/components/gestureHandlerRootHOC.js.map +1 -1
- package/lib/module/components/touchables/GenericTouchable.js +34 -63
- package/lib/module/components/touchables/GenericTouchable.js.map +1 -1
- package/lib/module/components/touchables/GenericTouchableProps.js.map +1 -1
- package/lib/module/components/touchables/TouchableHighlight.js +16 -23
- package/lib/module/components/touchables/TouchableHighlight.js.map +1 -1
- package/lib/module/components/touchables/TouchableNativeFeedback.android.js +11 -19
- package/lib/module/components/touchables/TouchableNativeFeedback.android.js.map +1 -1
- package/lib/module/components/touchables/TouchableNativeFeedback.js +6 -1
- package/lib/module/components/touchables/TouchableNativeFeedback.js.map +1 -1
- package/lib/module/components/touchables/TouchableNativeFeedbackProps.js.map +1 -1
- package/lib/module/components/touchables/TouchableOpacity.js +13 -14
- package/lib/module/components/touchables/TouchableOpacity.js.map +1 -1
- package/lib/module/components/touchables/TouchableWithoutFeedback.js +9 -2
- package/lib/module/components/touchables/TouchableWithoutFeedback.js.map +1 -1
- package/lib/module/components/touchables/index.js.map +1 -1
- package/lib/module/findNodeHandle.js.map +1 -1
- package/lib/module/findNodeHandle.web.js +9 -8
- package/lib/module/findNodeHandle.web.js.map +1 -1
- package/lib/module/getReactNativeVersion.js.map +1 -1
- package/lib/module/getReactNativeVersion.web.js.map +1 -1
- package/lib/module/getShadowNodeFromRef.js +13 -13
- package/lib/module/getShadowNodeFromRef.js.map +1 -1
- package/lib/module/getShadowNodeFromRef.web.js.map +1 -1
- package/lib/module/ghQueueMicrotask.js.map +1 -1
- package/lib/module/handlers/FlingGestureHandler.js +13 -0
- package/lib/module/handlers/FlingGestureHandler.js.map +1 -1
- package/lib/module/handlers/ForceTouchGestureHandler.js +16 -8
- package/lib/module/handlers/ForceTouchGestureHandler.js.map +1 -1
- package/lib/module/handlers/GestureHandlerEventPayload.js.map +1 -1
- package/lib/module/handlers/LongPressGestureHandler.js +13 -0
- package/lib/module/handlers/LongPressGestureHandler.js.map +1 -1
- package/lib/module/handlers/NativeViewGestureHandler.js +13 -0
- package/lib/module/handlers/NativeViewGestureHandler.js.map +1 -1
- package/lib/module/handlers/PanGestureHandler.js +15 -19
- package/lib/module/handlers/PanGestureHandler.js.map +1 -1
- package/lib/module/handlers/PinchGestureHandler.js +13 -0
- package/lib/module/handlers/PinchGestureHandler.js.map +1 -1
- package/lib/module/handlers/PressabilityDebugView.js.map +1 -1
- package/lib/module/handlers/PressabilityDebugView.web.js.map +1 -1
- package/lib/module/handlers/RotationGestureHandler.js +13 -0
- package/lib/module/handlers/RotationGestureHandler.js.map +1 -1
- package/lib/module/handlers/TapGestureHandler.js +13 -0
- package/lib/module/handlers/TapGestureHandler.js.map +1 -1
- package/lib/module/handlers/createHandler.js +54 -108
- package/lib/module/handlers/createHandler.js.map +1 -1
- package/lib/module/handlers/createNativeWrapper.js +28 -22
- package/lib/module/handlers/createNativeWrapper.js.map +1 -1
- package/lib/module/handlers/customDirectEventTypes.js.map +1 -1
- package/lib/module/handlers/customDirectEventTypes.web.js.map +1 -1
- package/lib/module/handlers/gestureHandlerCommon.js +9 -4
- package/lib/module/handlers/gestureHandlerCommon.js.map +1 -1
- package/lib/module/handlers/gestureHandlerTypesCompat.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/Wrap.js +3 -4
- package/lib/module/handlers/gestures/GestureDetector/Wrap.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/Wrap.web.js +5 -6
- package/lib/module/handlers/gestures/GestureDetector/Wrap.web.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js +8 -16
- package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js +0 -1
- package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/index.js +9 -15
- package/lib/module/handlers/gestures/GestureDetector/index.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/needsToReattach.js +0 -2
- package/lib/module/handlers/gestures/GestureDetector/needsToReattach.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/types.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js +11 -14
- package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js +12 -39
- package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js +5 -5
- package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/useMountReactions.js +2 -6
- package/lib/module/handlers/gestures/GestureDetector/useMountReactions.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js +7 -9
- package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/utils.js +25 -30
- package/lib/module/handlers/gestures/GestureDetector/utils.js.map +1 -1
- package/lib/module/handlers/gestures/eventReceiver.js +14 -38
- package/lib/module/handlers/gestures/eventReceiver.js.map +1 -1
- package/lib/module/handlers/gestures/flingGesture.js +5 -9
- package/lib/module/handlers/gestures/flingGesture.js.map +1 -1
- package/lib/module/handlers/gestures/forceTouchGesture.js +8 -17
- package/lib/module/handlers/gestures/forceTouchGesture.js.map +1 -1
- package/lib/module/handlers/gestures/gesture.js +44 -73
- package/lib/module/handlers/gestures/gesture.js.map +1 -1
- package/lib/module/handlers/gestures/gestureComposition.js +16 -24
- package/lib/module/handlers/gestures/gestureComposition.js.map +1 -1
- package/lib/module/handlers/gestures/gestureObjects.js +1 -14
- package/lib/module/handlers/gestures/gestureObjects.js.map +1 -1
- package/lib/module/handlers/gestures/gestureStateManager.js +3 -4
- package/lib/module/handlers/gestures/gestureStateManager.js.map +1 -1
- package/lib/module/handlers/gestures/gestureStateManager.web.js +0 -1
- package/lib/module/handlers/gestures/gestureStateManager.web.js.map +1 -1
- package/lib/module/handlers/gestures/hoverGesture.js +9 -18
- package/lib/module/handlers/gestures/hoverGesture.js.map +1 -1
- package/lib/module/handlers/gestures/longPressGesture.js +6 -11
- package/lib/module/handlers/gestures/longPressGesture.js.map +1 -1
- package/lib/module/handlers/gestures/manualGesture.js +0 -4
- package/lib/module/handlers/gestures/manualGesture.js.map +1 -1
- package/lib/module/handlers/gestures/nativeGesture.js +5 -9
- package/lib/module/handlers/gestures/nativeGesture.js.map +1 -1
- package/lib/module/handlers/gestures/panGesture.js +18 -41
- package/lib/module/handlers/gestures/panGesture.js.map +1 -1
- package/lib/module/handlers/gestures/pinchGesture.js +2 -7
- package/lib/module/handlers/gestures/pinchGesture.js.map +1 -1
- package/lib/module/handlers/gestures/reanimatedWrapper.js +0 -5
- package/lib/module/handlers/gestures/reanimatedWrapper.js.map +1 -1
- package/lib/module/handlers/gestures/rotationGesture.js +2 -7
- package/lib/module/handlers/gestures/rotationGesture.js.map +1 -1
- package/lib/module/handlers/gestures/tapGesture.js +10 -19
- package/lib/module/handlers/gestures/tapGesture.js.map +1 -1
- package/lib/module/handlers/getNextHandlerTag.js.map +1 -1
- package/lib/module/handlers/handlersRegistry.js +6 -8
- package/lib/module/handlers/handlersRegistry.js.map +1 -1
- package/lib/module/handlers/utils.js +4 -13
- package/lib/module/handlers/utils.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/init.js +3 -2
- package/lib/module/init.js.map +1 -1
- package/lib/module/jestUtils/index.js.map +1 -1
- package/lib/module/jestUtils/jestUtils.js +20 -66
- package/lib/module/jestUtils/jestUtils.js.map +1 -1
- package/lib/module/mocks.js +3 -7
- package/lib/module/mocks.js.map +1 -1
- package/lib/module/mountRegistry.js +3 -10
- package/lib/module/mountRegistry.js.map +1 -1
- package/lib/module/specs/NativeRNGestureHandlerModule.js.map +1 -1
- package/lib/module/specs/RNGestureHandlerButtonNativeComponent.js.map +1 -1
- package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.js.map +1 -1
- package/lib/module/typeUtils.js.map +1 -1
- package/lib/module/utils.js +8 -13
- package/lib/module/utils.js.map +1 -1
- package/lib/module/web/Gestures.js +2 -1
- package/lib/module/web/Gestures.js.map +1 -1
- package/lib/module/web/constants.js.map +1 -1
- package/lib/module/web/detectors/RotationGestureDetector.js +26 -59
- package/lib/module/web/detectors/RotationGestureDetector.js.map +1 -1
- package/lib/module/web/detectors/ScaleGestureDetector.js +36 -61
- package/lib/module/web/detectors/ScaleGestureDetector.js.map +1 -1
- package/lib/module/web/handlers/FlingGestureHandler.js +11 -45
- package/lib/module/web/handlers/FlingGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/GestureHandler.js +159 -259
- package/lib/module/web/handlers/GestureHandler.js.map +1 -1
- package/lib/module/web/handlers/HoverGestureHandler.js +7 -13
- package/lib/module/web/handlers/HoverGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/IGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/LongPressGestureHandler.js +11 -46
- package/lib/module/web/handlers/LongPressGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/ManualGestureHandler.js +0 -6
- package/lib/module/web/handlers/ManualGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/NativeViewGestureHandler.js +20 -54
- package/lib/module/web/handlers/NativeViewGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/PanGestureHandler.js +22 -129
- package/lib/module/web/handlers/PanGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/PinchGestureHandler.js +18 -48
- package/lib/module/web/handlers/PinchGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/RotationGestureHandler.js +15 -46
- package/lib/module/web/handlers/RotationGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/TapGestureHandler.js +9 -63
- package/lib/module/web/handlers/TapGestureHandler.js.map +1 -1
- package/lib/module/web/interfaces.js +9 -14
- package/lib/module/web/interfaces.js.map +1 -1
- package/lib/module/web/tools/CircularBuffer.js +17 -27
- package/lib/module/web/tools/CircularBuffer.js.map +1 -1
- package/lib/module/web/tools/EventManager.js +7 -39
- package/lib/module/web/tools/EventManager.js.map +1 -1
- package/lib/module/web/tools/GestureHandlerDelegate.js.map +1 -1
- package/lib/module/web/tools/GestureHandlerOrchestrator.js +50 -111
- package/lib/module/web/tools/GestureHandlerOrchestrator.js.map +1 -1
- package/lib/module/web/tools/GestureHandlerWebDelegate.js +36 -47
- package/lib/module/web/tools/GestureHandlerWebDelegate.js.map +1 -1
- package/lib/module/web/tools/InteractionManager.js +21 -35
- package/lib/module/web/tools/InteractionManager.js.map +1 -1
- package/lib/module/web/tools/KeyboardEventManager.js +3 -19
- package/lib/module/web/tools/KeyboardEventManager.js.map +1 -1
- package/lib/module/web/tools/LeastSquareSolver.js +30 -65
- package/lib/module/web/tools/LeastSquareSolver.js.map +1 -1
- package/lib/module/web/tools/NodeManager.js +9 -14
- package/lib/module/web/tools/NodeManager.js.map +1 -1
- package/lib/module/web/tools/PointerEventManager.js +9 -35
- package/lib/module/web/tools/PointerEventManager.js.map +1 -1
- package/lib/module/web/tools/PointerTracker.js +23 -54
- package/lib/module/web/tools/PointerTracker.js.map +1 -1
- package/lib/module/web/tools/Vector.js +3 -14
- package/lib/module/web/tools/Vector.js.map +1 -1
- package/lib/module/web/tools/VelocityTracker.js +9 -26
- package/lib/module/web/tools/VelocityTracker.js.map +1 -1
- package/lib/module/web/tools/WheelEventManager.js +3 -10
- package/lib/module/web/tools/WheelEventManager.js.map +1 -1
- package/lib/module/web/utils.js +21 -40
- package/lib/module/web/utils.js.map +1 -1
- package/lib/module/web_hammer/DiscreteGestureHandler.js +4 -13
- package/lib/module/web_hammer/DiscreteGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/DraggingGestureHandler.js +0 -5
- package/lib/module/web_hammer/DraggingGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/Errors.js +0 -1
- package/lib/module/web_hammer/Errors.js.map +1 -1
- package/lib/module/web_hammer/FlingGestureHandler.js +10 -35
- package/lib/module/web_hammer/FlingGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/GestureHandler.js +53 -130
- package/lib/module/web_hammer/GestureHandler.js.map +1 -1
- package/lib/module/web_hammer/IndiscreteGestureHandler.js +1 -6
- package/lib/module/web_hammer/IndiscreteGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/LongPressGestureHandler.js +2 -11
- package/lib/module/web_hammer/LongPressGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/NativeViewGestureHandler.js +12 -12
- package/lib/module/web_hammer/NativeViewGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/NodeManager.js +6 -8
- package/lib/module/web_hammer/NodeManager.js.map +1 -1
- package/lib/module/web_hammer/PanGestureHandler.js +6 -40
- package/lib/module/web_hammer/PanGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/PinchGestureHandler.js +0 -5
- package/lib/module/web_hammer/PinchGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/PressGestureHandler.js +13 -34
- package/lib/module/web_hammer/PressGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/RotationGestureHandler.js +0 -6
- package/lib/module/web_hammer/RotationGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/TapGestureHandler.js +31 -45
- package/lib/module/web_hammer/TapGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/constants.js +2 -1
- package/lib/module/web_hammer/constants.js.map +1 -1
- package/lib/module/web_hammer/utils.js +2 -2
- package/lib/module/web_hammer/utils.js.map +1 -1
- package/lib/typescript/components/DrawerLayout.d.ts +27 -0
- package/lib/typescript/components/GestureButtonsProps.d.ts +18 -2
- package/lib/typescript/components/Pressable/PressableProps.d.ts +3 -10
- package/lib/typescript/components/Pressable/index.d.ts +1 -1
- package/lib/typescript/components/ReanimatedSwipeable.d.ts +6 -0
- package/lib/typescript/components/touchables/TouchableHighlight.d.ts +5 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedback.android.d.ts +2 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedback.d.ts +5 -1
- package/lib/typescript/components/touchables/TouchableNativeFeedbackProps.d.ts +3 -0
- package/lib/typescript/components/touchables/TouchableOpacity.d.ts +5 -0
- package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts +6 -0
- package/lib/typescript/handlers/FlingGestureHandler.d.ts +9 -0
- package/lib/typescript/handlers/ForceTouchGestureHandler.d.ts +9 -0
- package/lib/typescript/handlers/LongPressGestureHandler.d.ts +9 -0
- package/lib/typescript/handlers/NativeViewGestureHandler.d.ts +9 -0
- package/lib/typescript/handlers/PanGestureHandler.d.ts +9 -0
- package/lib/typescript/handlers/PinchGestureHandler.d.ts +9 -0
- package/lib/typescript/handlers/RotationGestureHandler.d.ts +9 -0
- package/lib/typescript/handlers/TapGestureHandler.d.ts +9 -0
- package/lib/typescript/handlers/handlersRegistry.d.ts +1 -0
- package/lib/typescript/index.d.ts +1 -1
- package/lib/typescript/utils.d.ts +1 -1
- package/lib/typescript/web/detectors/RotationGestureDetector.d.ts +7 -7
- package/lib/typescript/web/detectors/ScaleGestureDetector.d.ts +8 -8
- package/lib/typescript/web/handlers/GestureHandler.d.ts +33 -28
- package/lib/typescript/web/handlers/IGestureHandler.d.ts +12 -13
- package/lib/typescript/web/tools/CircularBuffer.d.ts +3 -3
- package/lib/typescript/web/tools/GestureHandlerDelegate.d.ts +1 -1
- package/lib/typescript/web/tools/GestureHandlerOrchestrator.d.ts +2 -2
- package/lib/typescript/web/tools/GestureHandlerWebDelegate.d.ts +3 -2
- package/lib/typescript/web/tools/InteractionManager.d.ts +2 -2
- package/lib/typescript/web/tools/NodeManager.d.ts +1 -1
- package/lib/typescript/web/tools/PointerTracker.d.ts +4 -4
- package/lib/typescript/web/tools/VelocityTracker.d.ts +1 -1
- package/package.json +2 -2
- package/src/RNGestureHandlerModule.web.ts +2 -2
- package/src/components/DrawerLayout.tsx +29 -0
- package/src/components/GestureButtons.tsx +13 -2
- package/src/components/GestureButtonsProps.ts +31 -2
- package/src/components/Pressable/Pressable.tsx +22 -5
- package/src/components/Pressable/PressableProps.tsx +4 -11
- package/src/components/Pressable/index.ts +4 -1
- package/src/components/ReanimatedSwipeable.tsx +194 -113
- package/src/components/Text.tsx +13 -4
- package/src/components/touchables/TouchableHighlight.tsx +5 -0
- package/src/components/touchables/TouchableNativeFeedback.android.tsx +2 -0
- package/src/components/touchables/TouchableNativeFeedback.tsx +6 -1
- package/src/components/touchables/TouchableNativeFeedbackProps.tsx +3 -0
- package/src/components/touchables/TouchableOpacity.tsx +5 -0
- package/src/components/touchables/TouchableWithoutFeedback.tsx +6 -0
- package/src/findNodeHandle.web.ts +6 -0
- package/src/handlers/FlingGestureHandler.ts +10 -0
- package/src/handlers/ForceTouchGestureHandler.ts +9 -0
- package/src/handlers/LongPressGestureHandler.ts +10 -0
- package/src/handlers/NativeViewGestureHandler.ts +10 -0
- package/src/handlers/PanGestureHandler.ts +10 -0
- package/src/handlers/PinchGestureHandler.ts +10 -0
- package/src/handlers/RotationGestureHandler.ts +10 -0
- package/src/handlers/TapGestureHandler.ts +10 -0
- package/src/handlers/createHandler.tsx +11 -4
- package/src/handlers/createNativeWrapper.tsx +10 -4
- package/src/handlers/gestures/GestureDetector/index.tsx +2 -2
- package/src/handlers/gestures/GestureDetector/useViewRefHandler.ts +3 -3
- package/src/handlers/gestures/GestureDetector/utils.ts +2 -2
- package/src/handlers/handlersRegistry.ts +7 -3
- package/src/index.ts +4 -1
- package/src/utils.ts +2 -2
- package/src/web/detectors/RotationGestureDetector.ts +22 -22
- package/src/web/detectors/ScaleGestureDetector.ts +24 -24
- package/src/web/handlers/FlingGestureHandler.ts +6 -7
- package/src/web/handlers/GestureHandler.ts +115 -105
- package/src/web/handlers/HoverGestureHandler.ts +2 -2
- package/src/web/handlers/IGestureHandler.ts +12 -13
- package/src/web/handlers/LongPressGestureHandler.ts +7 -7
- package/src/web/handlers/NativeViewGestureHandler.ts +14 -19
- package/src/web/handlers/PanGestureHandler.ts +17 -17
- package/src/web/handlers/PinchGestureHandler.ts +17 -21
- package/src/web/handlers/RotationGestureHandler.ts +12 -12
- package/src/web/handlers/TapGestureHandler.ts +4 -6
- package/src/web/tools/CircularBuffer.ts +15 -15
- package/src/web/tools/GestureHandlerDelegate.ts +1 -1
- package/src/web/tools/GestureHandlerOrchestrator.ts +42 -42
- package/src/web/tools/GestureHandlerWebDelegate.ts +32 -13
- package/src/web/tools/InteractionManager.ts +16 -16
- package/src/web/tools/NodeManager.ts +2 -2
- package/src/web/tools/PointerTracker.ts +20 -20
- package/src/web/tools/Vector.ts +1 -1
- package/src/web/tools/VelocityTracker.ts +1 -1
@@ -9,6 +9,7 @@ import React, {
|
|
9
9
|
useImperativeHandle,
|
10
10
|
useMemo,
|
11
11
|
} from 'react';
|
12
|
+
import { GestureRef } from '../handlers/gestures/gesture';
|
12
13
|
import { GestureObjects as Gesture } from '../handlers/gestures/gestureObjects';
|
13
14
|
import { GestureDetector } from '../handlers/gestures/GestureDetector';
|
14
15
|
import {
|
@@ -18,9 +19,13 @@ import {
|
|
18
19
|
import type { PanGestureHandlerProps } from '../handlers/PanGestureHandler';
|
19
20
|
import type { PanGestureHandlerEventPayload } from '../handlers/GestureHandlerEventPayload';
|
20
21
|
import Animated, {
|
22
|
+
ReduceMotion,
|
21
23
|
SharedValue,
|
22
24
|
interpolate,
|
25
|
+
measure,
|
23
26
|
runOnJS,
|
27
|
+
runOnUI,
|
28
|
+
useAnimatedRef,
|
24
29
|
useAnimatedStyle,
|
25
30
|
useSharedValue,
|
26
31
|
withSpring,
|
@@ -198,6 +203,14 @@ export interface SwipeableProps
|
|
198
203
|
* apply `flex: 1`
|
199
204
|
*/
|
200
205
|
childrenContainerStyle?: StyleProp<ViewStyle>;
|
206
|
+
|
207
|
+
/**
|
208
|
+
* A gesture object or an array of gesture objects containing the configuration and callbacks to be
|
209
|
+
* used with the swipeable's gesture handler.
|
210
|
+
*/
|
211
|
+
simultaneousWithExternalGesture?:
|
212
|
+
| Exclude<GestureRef, number>
|
213
|
+
| Exclude<GestureRef, number>[];
|
201
214
|
}
|
202
215
|
|
203
216
|
export interface SwipeableMethods {
|
@@ -243,6 +256,7 @@ const Swipeable = forwardRef<SwipeableMethods, SwipeableProps>(
|
|
243
256
|
onSwipeableClose,
|
244
257
|
renderLeftActions,
|
245
258
|
renderRightActions,
|
259
|
+
simultaneousWithExternalGesture,
|
246
260
|
...remainingProps
|
247
261
|
} = props;
|
248
262
|
|
@@ -256,20 +270,9 @@ const Swipeable = forwardRef<SwipeableMethods, SwipeableProps>(
|
|
256
270
|
const leftWidth = useSharedValue<number>(0);
|
257
271
|
const rightWidth = useSharedValue<number>(0);
|
258
272
|
|
259
|
-
// used for synchronizing layout measurements between JS and UI
|
260
|
-
const rightOffset = useSharedValue<number | null>(null);
|
261
|
-
|
262
273
|
const showLeftProgress = useSharedValue<number>(0);
|
263
274
|
const showRightProgress = useSharedValue<number>(0);
|
264
275
|
|
265
|
-
const updateRightElementWidth = useCallback(() => {
|
266
|
-
'worklet';
|
267
|
-
if (rightOffset.value === null) {
|
268
|
-
rightOffset.value = rowWidth.value;
|
269
|
-
}
|
270
|
-
rightWidth.value = Math.max(0, rowWidth.value - rightOffset.value);
|
271
|
-
}, [rightOffset, rightWidth, rowWidth]);
|
272
|
-
|
273
276
|
const updateAnimatedEvent = useCallback(() => {
|
274
277
|
'worklet';
|
275
278
|
|
@@ -371,11 +374,12 @@ const Swipeable = forwardRef<SwipeableMethods, SwipeableProps>(
|
|
371
374
|
'worklet';
|
372
375
|
|
373
376
|
const translationSpringConfig = {
|
374
|
-
|
375
|
-
|
376
|
-
stiffness:
|
377
|
+
mass: 2,
|
378
|
+
damping: 1000,
|
379
|
+
stiffness: 700,
|
377
380
|
velocity: velocityX,
|
378
381
|
overshootClamping: true,
|
382
|
+
reduceMotion: ReduceMotion.System,
|
379
383
|
...animationOptions,
|
380
384
|
};
|
381
385
|
|
@@ -411,16 +415,17 @@ const Swipeable = forwardRef<SwipeableMethods, SwipeableProps>(
|
|
411
415
|
}
|
412
416
|
);
|
413
417
|
|
414
|
-
const progressTarget = toValue === 0 ? 0 : 1;
|
418
|
+
const progressTarget = toValue === 0 ? 0 : 1 * Math.sign(toValue);
|
419
|
+
|
420
|
+
showLeftProgress.value = withSpring(
|
421
|
+
Math.max(progressTarget, 0),
|
422
|
+
progressSpringConfig
|
423
|
+
);
|
415
424
|
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
showRightProgress.value =
|
421
|
-
rightWidth.value > 0
|
422
|
-
? withSpring(progressTarget, progressSpringConfig)
|
423
|
-
: 0;
|
425
|
+
showRightProgress.value = withSpring(
|
426
|
+
Math.max(-progressTarget, 0),
|
427
|
+
progressSpringConfig
|
428
|
+
);
|
424
429
|
|
425
430
|
dispatchImmediateEvents(frozenRowState, toValue);
|
426
431
|
|
@@ -439,20 +444,66 @@ const Swipeable = forwardRef<SwipeableMethods, SwipeableProps>(
|
|
439
444
|
]
|
440
445
|
);
|
441
446
|
|
447
|
+
const leftLayoutRef = useAnimatedRef();
|
448
|
+
const leftWrapperLayoutRef = useAnimatedRef();
|
449
|
+
const rightLayoutRef = useAnimatedRef();
|
450
|
+
|
451
|
+
const updateElementWidths = useCallback(() => {
|
452
|
+
'worklet';
|
453
|
+
const leftLayout = measure(leftLayoutRef);
|
454
|
+
const leftWrapperLayout = measure(leftWrapperLayoutRef);
|
455
|
+
const rightLayout = measure(rightLayoutRef);
|
456
|
+
leftWidth.value =
|
457
|
+
(leftLayout?.pageX ?? 0) - (leftWrapperLayout?.pageX ?? 0);
|
458
|
+
|
459
|
+
rightWidth.value =
|
460
|
+
rowWidth.value -
|
461
|
+
(rightLayout?.pageX ?? rowWidth.value) +
|
462
|
+
(leftWrapperLayout?.pageX ?? 0);
|
463
|
+
}, [
|
464
|
+
leftLayoutRef,
|
465
|
+
leftWrapperLayoutRef,
|
466
|
+
rightLayoutRef,
|
467
|
+
leftWidth,
|
468
|
+
rightWidth,
|
469
|
+
rowWidth,
|
470
|
+
]);
|
471
|
+
|
442
472
|
const swipeableMethods = useMemo<SwipeableMethods>(
|
443
473
|
() => ({
|
444
474
|
close() {
|
445
475
|
'worklet';
|
446
|
-
|
476
|
+
if (_WORKLET) {
|
477
|
+
animateRow(0);
|
478
|
+
return;
|
479
|
+
}
|
480
|
+
runOnUI(() => {
|
481
|
+
animateRow(0);
|
482
|
+
})();
|
447
483
|
},
|
448
484
|
openLeft() {
|
449
485
|
'worklet';
|
450
|
-
|
486
|
+
if (_WORKLET) {
|
487
|
+
updateElementWidths();
|
488
|
+
animateRow(leftWidth.value);
|
489
|
+
return;
|
490
|
+
}
|
491
|
+
runOnUI(() => {
|
492
|
+
updateElementWidths();
|
493
|
+
animateRow(leftWidth.value);
|
494
|
+
})();
|
451
495
|
},
|
452
496
|
openRight() {
|
453
497
|
'worklet';
|
454
|
-
|
455
|
-
|
498
|
+
if (_WORKLET) {
|
499
|
+
updateElementWidths();
|
500
|
+
animateRow(-rightWidth.value);
|
501
|
+
return;
|
502
|
+
}
|
503
|
+
runOnUI(() => {
|
504
|
+
updateElementWidths();
|
505
|
+
animateRow(-rightWidth.value);
|
506
|
+
})();
|
456
507
|
},
|
457
508
|
reset() {
|
458
509
|
'worklet';
|
@@ -463,14 +514,14 @@ const Swipeable = forwardRef<SwipeableMethods, SwipeableProps>(
|
|
463
514
|
},
|
464
515
|
}),
|
465
516
|
[
|
517
|
+
animateRow,
|
518
|
+
updateElementWidths,
|
466
519
|
leftWidth,
|
467
|
-
|
468
|
-
rowWidth,
|
520
|
+
rightWidth,
|
469
521
|
userDrag,
|
470
522
|
showLeftProgress,
|
471
523
|
appliedTranslation,
|
472
524
|
rowState,
|
473
|
-
animateRow,
|
474
525
|
]
|
475
526
|
);
|
476
527
|
|
@@ -481,49 +532,61 @@ const Swipeable = forwardRef<SwipeableMethods, SwipeableProps>(
|
|
481
532
|
[rowWidth]
|
482
533
|
);
|
483
534
|
|
535
|
+
// As stated in `Dimensions.get` docstring, this function should be called on every render
|
536
|
+
// since dimensions may change (e.g. orientation change)
|
537
|
+
|
538
|
+
const leftActionAnimation = useAnimatedStyle(() => {
|
539
|
+
return {
|
540
|
+
opacity: showLeftProgress.value === 0 ? 0 : 1,
|
541
|
+
};
|
542
|
+
});
|
543
|
+
|
484
544
|
const leftElement = useCallback(
|
485
545
|
() => (
|
486
|
-
<Animated.View
|
546
|
+
<Animated.View
|
547
|
+
ref={leftWrapperLayoutRef}
|
548
|
+
style={[styles.leftActions, leftActionAnimation]}>
|
487
549
|
{renderLeftActions?.(
|
488
550
|
showLeftProgress,
|
489
551
|
appliedTranslation,
|
490
552
|
swipeableMethods
|
491
553
|
)}
|
492
|
-
<View
|
493
|
-
onLayout={({ nativeEvent }) =>
|
494
|
-
(leftWidth.value = nativeEvent.layout.x)
|
495
|
-
}
|
496
|
-
/>
|
554
|
+
<Animated.View ref={leftLayoutRef} />
|
497
555
|
</Animated.View>
|
498
556
|
),
|
499
557
|
[
|
500
558
|
appliedTranslation,
|
501
|
-
|
559
|
+
leftActionAnimation,
|
560
|
+
leftLayoutRef,
|
561
|
+
leftWrapperLayoutRef,
|
502
562
|
renderLeftActions,
|
503
563
|
showLeftProgress,
|
504
564
|
swipeableMethods,
|
505
565
|
]
|
506
566
|
);
|
507
567
|
|
568
|
+
const rightActionAnimation = useAnimatedStyle(() => {
|
569
|
+
return {
|
570
|
+
opacity: showRightProgress.value === 0 ? 0 : 1,
|
571
|
+
};
|
572
|
+
});
|
573
|
+
|
508
574
|
const rightElement = useCallback(
|
509
575
|
() => (
|
510
|
-
<Animated.View style={[styles.rightActions]}>
|
576
|
+
<Animated.View style={[styles.rightActions, rightActionAnimation]}>
|
511
577
|
{renderRightActions?.(
|
512
578
|
showRightProgress,
|
513
579
|
appliedTranslation,
|
514
580
|
swipeableMethods
|
515
581
|
)}
|
516
|
-
<View
|
517
|
-
onLayout={({ nativeEvent }) => {
|
518
|
-
rightOffset.value = nativeEvent.layout.x;
|
519
|
-
}}
|
520
|
-
/>
|
582
|
+
<Animated.View ref={rightLayoutRef} />
|
521
583
|
</Animated.View>
|
522
584
|
),
|
523
585
|
[
|
524
586
|
appliedTranslation,
|
525
587
|
renderRightActions,
|
526
|
-
|
588
|
+
rightActionAnimation,
|
589
|
+
rightLayoutRef,
|
527
590
|
showRightProgress,
|
528
591
|
swipeableMethods,
|
529
592
|
]
|
@@ -535,8 +598,6 @@ const Swipeable = forwardRef<SwipeableMethods, SwipeableProps>(
|
|
535
598
|
const { velocityX } = event;
|
536
599
|
userDrag.value = event.translationX;
|
537
600
|
|
538
|
-
updateRightElementWidth();
|
539
|
-
|
540
601
|
const leftThresholdProp = leftThreshold ?? leftWidth.value / 2;
|
541
602
|
const rightThresholdProp = rightThreshold ?? rightWidth.value / 2;
|
542
603
|
|
@@ -574,7 +635,6 @@ const Swipeable = forwardRef<SwipeableMethods, SwipeableProps>(
|
|
574
635
|
rightWidth,
|
575
636
|
rowState,
|
576
637
|
userDrag,
|
577
|
-
updateRightElementWidth,
|
578
638
|
]
|
579
639
|
);
|
580
640
|
|
@@ -585,75 +645,94 @@ const Swipeable = forwardRef<SwipeableMethods, SwipeableProps>(
|
|
585
645
|
|
586
646
|
const dragStarted = useSharedValue<boolean>(false);
|
587
647
|
|
588
|
-
const tapGesture = useMemo(
|
589
|
-
()
|
590
|
-
|
591
|
-
|
592
|
-
.
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
}),
|
597
|
-
[close, rowState]
|
598
|
-
);
|
648
|
+
const tapGesture = useMemo(() => {
|
649
|
+
const tap = Gesture.Tap()
|
650
|
+
.shouldCancelWhenOutside(true)
|
651
|
+
.onStart(() => {
|
652
|
+
if (rowState.value !== 0) {
|
653
|
+
close();
|
654
|
+
}
|
655
|
+
});
|
599
656
|
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
.enabled(enabled !== false)
|
604
|
-
.enableTrackpadTwoFingerGesture(enableTrackpadTwoFingerGesture)
|
605
|
-
.activeOffsetX([-dragOffsetFromRightEdge, dragOffsetFromLeftEdge])
|
606
|
-
.onStart(() => {
|
607
|
-
updateRightElementWidth();
|
608
|
-
})
|
609
|
-
.onUpdate(
|
610
|
-
(event: GestureUpdateEvent<PanGestureHandlerEventPayload>) => {
|
611
|
-
userDrag.value = event.translationX;
|
612
|
-
|
613
|
-
const direction =
|
614
|
-
rowState.value === -1
|
615
|
-
? SwipeDirection.RIGHT
|
616
|
-
: rowState.value === 1
|
617
|
-
? SwipeDirection.LEFT
|
618
|
-
: event.translationX > 0
|
619
|
-
? SwipeDirection.RIGHT
|
620
|
-
: SwipeDirection.LEFT;
|
621
|
-
|
622
|
-
if (!dragStarted.value) {
|
623
|
-
dragStarted.value = true;
|
624
|
-
if (rowState.value === 0 && onSwipeableOpenStartDrag) {
|
625
|
-
runOnJS(onSwipeableOpenStartDrag)(direction);
|
626
|
-
} else if (onSwipeableCloseStartDrag) {
|
627
|
-
runOnJS(onSwipeableCloseStartDrag)(direction);
|
628
|
-
}
|
629
|
-
}
|
657
|
+
if (!simultaneousWithExternalGesture) {
|
658
|
+
return tap;
|
659
|
+
}
|
630
660
|
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
661
|
+
if (Array.isArray(simultaneousWithExternalGesture)) {
|
662
|
+
tap.simultaneousWithExternalGesture(...simultaneousWithExternalGesture);
|
663
|
+
} else {
|
664
|
+
tap.simultaneousWithExternalGesture(simultaneousWithExternalGesture);
|
665
|
+
}
|
666
|
+
|
667
|
+
return tap;
|
668
|
+
}, [close, rowState, simultaneousWithExternalGesture]);
|
669
|
+
|
670
|
+
const panGesture = useMemo(() => {
|
671
|
+
const pan = Gesture.Pan()
|
672
|
+
.enabled(enabled !== false)
|
673
|
+
.enableTrackpadTwoFingerGesture(enableTrackpadTwoFingerGesture)
|
674
|
+
.activeOffsetX([-dragOffsetFromRightEdge, dragOffsetFromLeftEdge])
|
675
|
+
.onStart(updateElementWidths)
|
676
|
+
.onUpdate(
|
677
|
+
(event: GestureUpdateEvent<PanGestureHandlerEventPayload>) => {
|
678
|
+
userDrag.value = event.translationX;
|
679
|
+
|
680
|
+
const direction =
|
681
|
+
rowState.value === -1
|
682
|
+
? SwipeDirection.RIGHT
|
683
|
+
: rowState.value === 1
|
684
|
+
? SwipeDirection.LEFT
|
685
|
+
: event.translationX > 0
|
686
|
+
? SwipeDirection.RIGHT
|
687
|
+
: SwipeDirection.LEFT;
|
688
|
+
|
689
|
+
if (!dragStarted.value) {
|
690
|
+
dragStarted.value = true;
|
691
|
+
if (rowState.value === 0 && onSwipeableOpenStartDrag) {
|
692
|
+
runOnJS(onSwipeableOpenStartDrag)(direction);
|
693
|
+
} else if (onSwipeableCloseStartDrag) {
|
694
|
+
runOnJS(onSwipeableCloseStartDrag)(direction);
|
695
|
+
}
|
637
696
|
}
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
697
|
+
|
698
|
+
updateAnimatedEvent();
|
699
|
+
}
|
700
|
+
)
|
701
|
+
.onEnd(
|
702
|
+
(event: GestureStateChangeEvent<PanGestureHandlerEventPayload>) => {
|
703
|
+
handleRelease(event);
|
704
|
+
}
|
705
|
+
)
|
706
|
+
.onFinalize(() => {
|
707
|
+
dragStarted.value = false;
|
708
|
+
});
|
709
|
+
|
710
|
+
if (!simultaneousWithExternalGesture) {
|
711
|
+
return pan;
|
712
|
+
}
|
713
|
+
|
714
|
+
if (Array.isArray(simultaneousWithExternalGesture)) {
|
715
|
+
pan.simultaneousWithExternalGesture(...simultaneousWithExternalGesture);
|
716
|
+
} else {
|
717
|
+
pan.simultaneousWithExternalGesture(simultaneousWithExternalGesture);
|
718
|
+
}
|
719
|
+
|
720
|
+
return pan;
|
721
|
+
}, [
|
722
|
+
dragOffsetFromLeftEdge,
|
723
|
+
dragOffsetFromRightEdge,
|
724
|
+
dragStarted,
|
725
|
+
enableTrackpadTwoFingerGesture,
|
726
|
+
enabled,
|
727
|
+
handleRelease,
|
728
|
+
onSwipeableCloseStartDrag,
|
729
|
+
onSwipeableOpenStartDrag,
|
730
|
+
rowState,
|
731
|
+
updateAnimatedEvent,
|
732
|
+
updateElementWidths,
|
733
|
+
userDrag,
|
734
|
+
simultaneousWithExternalGesture,
|
735
|
+
]);
|
657
736
|
|
658
737
|
useImperativeHandle(ref, () => swipeableMethods, [swipeableMethods]);
|
659
738
|
|
@@ -700,9 +779,11 @@ const styles = StyleSheet.create({
|
|
700
779
|
leftActions: {
|
701
780
|
...StyleSheet.absoluteFillObject,
|
702
781
|
flexDirection: I18nManager.isRTL ? 'row-reverse' : 'row',
|
782
|
+
overflow: 'hidden',
|
703
783
|
},
|
704
784
|
rightActions: {
|
705
785
|
...StyleSheet.absoluteFillObject,
|
706
786
|
flexDirection: I18nManager.isRTL ? 'row' : 'row-reverse',
|
787
|
+
overflow: 'hidden',
|
707
788
|
},
|
708
789
|
});
|
package/src/components/Text.tsx
CHANGED
@@ -11,11 +11,13 @@ import {
|
|
11
11
|
TextProps as RNTextProps,
|
12
12
|
} from 'react-native';
|
13
13
|
|
14
|
-
import { Gesture
|
14
|
+
import { GestureObjects as Gesture } from '../handlers/gestures/gestureObjects';
|
15
|
+
import { GestureDetector } from '../handlers/gestures/GestureDetector';
|
15
16
|
|
16
17
|
export const Text = forwardRef(
|
17
18
|
(props: RNTextProps, ref: ForwardedRef<RNText>) => {
|
18
|
-
const { onPress, ...rest } = props;
|
19
|
+
const { onPress, onLongPress, ...rest } = props;
|
20
|
+
|
19
21
|
const textRef = useRef<RNText | null>(null);
|
20
22
|
const native = Gesture.Native().runOnJS(true);
|
21
23
|
|
@@ -49,10 +51,17 @@ export const Text = forwardRef(
|
|
49
51
|
);
|
50
52
|
}, []);
|
51
53
|
|
52
|
-
return (
|
54
|
+
return onPress || onLongPress ? (
|
53
55
|
<GestureDetector gesture={native}>
|
54
|
-
<RNText
|
56
|
+
<RNText
|
57
|
+
onPress={onPress}
|
58
|
+
onLongPress={onLongPress}
|
59
|
+
ref={refHandler}
|
60
|
+
{...rest}
|
61
|
+
/>
|
55
62
|
</GestureDetector>
|
63
|
+
) : (
|
64
|
+
<RNText ref={ref} {...rest} />
|
56
65
|
);
|
57
66
|
}
|
58
67
|
);
|
@@ -19,10 +19,15 @@ interface State {
|
|
19
19
|
};
|
20
20
|
}
|
21
21
|
|
22
|
+
/**
|
23
|
+
* @deprecated TouchableHighlight will be removed in the future version of Gesture Handler.
|
24
|
+
*/
|
22
25
|
export type TouchableHighlightProps = RNTouchableHighlightProps &
|
23
26
|
GenericTouchableProps;
|
24
27
|
|
25
28
|
/**
|
29
|
+
* @deprecated TouchableHighlight will be removed in the future version of Gesture Handler.
|
30
|
+
*
|
26
31
|
* TouchableHighlight follows RN's implementation
|
27
32
|
*/
|
28
33
|
export default class TouchableHighlight extends Component<
|
@@ -8,6 +8,8 @@ import {
|
|
8
8
|
} from './TouchableNativeFeedbackProps';
|
9
9
|
|
10
10
|
/**
|
11
|
+
* @deprecated TouchableNativeFeedback will be removed in the future version of Gesture Handler.
|
12
|
+
*
|
11
13
|
* TouchableNativeFeedback behaves slightly different than RN's TouchableNativeFeedback.
|
12
14
|
* There's small difference with handling long press ripple since RN's implementation calls
|
13
15
|
* ripple animation via bridge. This solution leaves all animations' handling for native components so
|
@@ -1,3 +1,8 @@
|
|
1
|
-
import { TouchableNativeFeedback } from 'react-native';
|
1
|
+
import { TouchableNativeFeedback as RNTouchableNativeFeedback } from 'react-native';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @deprecated TouchableNativeFeedback will be removed in the future version of Gesture Handler.
|
5
|
+
*/
|
6
|
+
const TouchableNativeFeedback = RNTouchableNativeFeedback;
|
2
7
|
|
3
8
|
export default TouchableNativeFeedback;
|
@@ -8,5 +8,8 @@ export type TouchableNativeFeedbackExtraProps = {
|
|
8
8
|
foreground?: boolean;
|
9
9
|
};
|
10
10
|
|
11
|
+
/**
|
12
|
+
* @deprecated TouchableNativeFeedback will be removed in the future version of Gesture Handler.
|
13
|
+
*/
|
11
14
|
export type TouchableNativeFeedbackProps = RNTouchableNativeFeedbackProps &
|
12
15
|
GenericTouchableProps;
|
@@ -10,12 +10,17 @@ import type { GenericTouchableProps } from './GenericTouchableProps';
|
|
10
10
|
import * as React from 'react';
|
11
11
|
import { Component } from 'react';
|
12
12
|
|
13
|
+
/**
|
14
|
+
* @deprecated TouchableOpacity will be removed in the future version of Gesture Handler.
|
15
|
+
*/
|
13
16
|
export type TouchableOpacityProps = RNTouchableOpacityProps &
|
14
17
|
GenericTouchableProps & {
|
15
18
|
useNativeAnimations?: boolean;
|
16
19
|
};
|
17
20
|
|
18
21
|
/**
|
22
|
+
* @deprecated TouchableOpacity will be removed in the future version of Gesture Handler.
|
23
|
+
*
|
19
24
|
* TouchableOpacity bases on timing animation which has been used in RN's core
|
20
25
|
*/
|
21
26
|
export default class TouchableOpacity extends Component<TouchableOpacityProps> {
|
@@ -3,8 +3,14 @@ import { PropsWithChildren } from 'react';
|
|
3
3
|
import GenericTouchable from './GenericTouchable';
|
4
4
|
import type { GenericTouchableProps } from './GenericTouchableProps';
|
5
5
|
|
6
|
+
/**
|
7
|
+
* @deprecated TouchableWithoutFeedback will be removed in the future version of Gesture Handler.
|
8
|
+
*/
|
6
9
|
export type TouchableWithoutFeedbackProps = GenericTouchableProps;
|
7
10
|
|
11
|
+
/**
|
12
|
+
* @deprecated TouchableWithoutFeedback will be removed in the future version of Gesture Handler.
|
13
|
+
*/
|
8
14
|
const TouchableWithoutFeedback = React.forwardRef<
|
9
15
|
GenericTouchable,
|
10
16
|
PropsWithChildren<TouchableWithoutFeedbackProps>
|
@@ -1,9 +1,15 @@
|
|
1
|
+
import { FlatList } from 'react-native';
|
1
2
|
import type { GestureHandlerRef, SVGRef } from './web/interfaces';
|
2
3
|
import { isRNSVGElement } from './web/utils';
|
3
4
|
|
4
5
|
export default function findNodeHandle(
|
5
6
|
viewRef: GestureHandlerRef | SVGRef | HTMLElement | SVGElement
|
6
7
|
): HTMLElement | SVGElement | number {
|
8
|
+
// TODO: Remove this once we remove old API.
|
9
|
+
if (viewRef instanceof FlatList) {
|
10
|
+
// @ts-ignore This is the only way to get the scroll ref from FlatList.
|
11
|
+
return viewRef._listRef._scrollRef.firstChild;
|
12
|
+
}
|
7
13
|
// Old API assumes that child handler is HTMLElement.
|
8
14
|
// However, if we nest handlers, we will get ref to another handler.
|
9
15
|
// In that case, we want to recursively call findNodeHandle with new handler viewTag (which can also be ref to another handler).
|
@@ -33,13 +33,23 @@ export interface FlingGestureConfig {
|
|
33
33
|
numberOfPointers?: number;
|
34
34
|
}
|
35
35
|
|
36
|
+
/**
|
37
|
+
* @deprecated FlingGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Fling()` instead.
|
38
|
+
*/
|
36
39
|
export interface FlingGestureHandlerProps
|
37
40
|
extends BaseGestureHandlerProps<FlingGestureHandlerEventPayload>,
|
38
41
|
FlingGestureConfig {}
|
39
42
|
|
40
43
|
export const flingHandlerName = 'FlingGestureHandler';
|
41
44
|
|
45
|
+
/**
|
46
|
+
* @deprecated FlingGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Fling()` instead.
|
47
|
+
*/
|
42
48
|
export type FlingGestureHandler = typeof FlingGestureHandler;
|
49
|
+
|
50
|
+
/**
|
51
|
+
* @deprecated FlingGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Fling()` instead.
|
52
|
+
*/
|
43
53
|
// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file
|
44
54
|
export const FlingGestureHandler = createHandler<
|
45
55
|
FlingGestureHandlerProps,
|
@@ -50,16 +50,25 @@ export interface ForceTouchGestureConfig {
|
|
50
50
|
feedbackOnActivation?: boolean;
|
51
51
|
}
|
52
52
|
|
53
|
+
/**
|
54
|
+
* @deprecated ForceTouchGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.ForceTouch()` instead.
|
55
|
+
*/
|
53
56
|
export interface ForceTouchGestureHandlerProps
|
54
57
|
extends BaseGestureHandlerProps<ForceTouchGestureHandlerEventPayload>,
|
55
58
|
ForceTouchGestureConfig {}
|
56
59
|
|
60
|
+
/**
|
61
|
+
* @deprecated ForceTouchGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.ForceTouch()` instead.
|
62
|
+
*/
|
57
63
|
export type ForceTouchGestureHandler = typeof ForceTouchGestureHandler & {
|
58
64
|
forceTouchAvailable: boolean;
|
59
65
|
};
|
60
66
|
|
61
67
|
export const forceTouchHandlerName = 'ForceTouchGestureHandler';
|
62
68
|
|
69
|
+
/**
|
70
|
+
* @deprecated ForceTouchGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.ForceTouch()` instead.
|
71
|
+
*/
|
63
72
|
// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file
|
64
73
|
export const ForceTouchGestureHandler = PlatformConstants?.forceTouchAvailable
|
65
74
|
? createHandler<
|
@@ -32,13 +32,23 @@ export interface LongPressGestureConfig {
|
|
32
32
|
numberOfPointers?: number;
|
33
33
|
}
|
34
34
|
|
35
|
+
/**
|
36
|
+
* @deprecated LongPressGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.LongPress()` instead.
|
37
|
+
*/
|
35
38
|
export interface LongPressGestureHandlerProps
|
36
39
|
extends BaseGestureHandlerProps<LongPressGestureHandlerEventPayload>,
|
37
40
|
LongPressGestureConfig {}
|
38
41
|
|
39
42
|
export const longPressHandlerName = 'LongPressGestureHandler';
|
40
43
|
|
44
|
+
/**
|
45
|
+
* @deprecated LongPressGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.LongPress()` instead.
|
46
|
+
*/
|
41
47
|
export type LongPressGestureHandler = typeof LongPressGestureHandler;
|
48
|
+
|
49
|
+
/**
|
50
|
+
* @deprecated LongPressGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.LongPress()` instead.
|
51
|
+
*/
|
42
52
|
// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file
|
43
53
|
export const LongPressGestureHandler = createHandler<
|
44
54
|
LongPressGestureHandlerProps,
|