react-native-gesture-handler 3.0.0-beta.3 → 3.0.0-beta.4
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/src/main/java/com/swmansion/gesturehandler/core/GestureHandler.kt +42 -38
- package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerOrchestrator.kt +22 -4
- package/android/src/main/java/com/swmansion/gesturehandler/core/HoverGestureHandler.kt +3 -6
- package/android/src/main/java/com/swmansion/gesturehandler/core/ManualGestureHandler.kt +2 -0
- package/android/src/main/java/com/swmansion/gesturehandler/core/NativeViewGestureHandler.kt +63 -6
- package/android/src/main/java/com/swmansion/gesturehandler/core/OnJSResponderCancelListener.kt +6 -0
- package/android/src/main/java/com/swmansion/gesturehandler/core/PanGestureHandler.kt +2 -0
- package/android/src/main/java/com/swmansion/gesturehandler/core/PinchGestureHandler.kt +16 -6
- package/android/src/main/java/com/swmansion/gesturehandler/core/RotationGestureHandler.kt +17 -4
- package/android/src/main/java/com/swmansion/gesturehandler/core/ViewConfigurationHelper.kt +0 -1
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.kt +47 -6
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerInteractionManager.kt +1 -1
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootHelper.kt +18 -8
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootView.kt +15 -4
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNViewConfigurationHelper.kt +0 -6
- package/apple/Handlers/RNForceTouchHandler.m +1 -1
- package/apple/Handlers/RNHoverHandler.m +11 -11
- package/apple/Handlers/RNLongPressHandler.m +2 -2
- package/apple/Handlers/RNManualHandler.m +5 -0
- package/apple/Handlers/RNNativeViewHandler.mm +114 -53
- package/apple/Handlers/RNPanHandler.m +7 -3
- package/apple/Handlers/RNPinchHandler.m +9 -3
- package/apple/Handlers/RNRotationHandler.m +7 -2
- package/apple/Handlers/RNTapHandler.m +1 -1
- package/apple/RNGestureHandler.h +18 -0
- package/apple/RNGestureHandler.mm +32 -6
- package/apple/RNGestureHandlerButton.h +8 -0
- package/apple/RNGestureHandlerButton.mm +102 -11
- package/apple/RNGestureHandlerButtonComponentView.mm +85 -4
- package/apple/RNGestureHandlerRegistry.h +0 -1
- package/apple/RNRootViewGestureRecognizer.m +4 -15
- package/lib/module/components/GestureButtons.js +8 -8
- package/lib/module/components/GestureButtons.js.map +1 -1
- package/lib/module/components/GestureHandlerButton.web.js +51 -9
- package/lib/module/components/GestureHandlerButton.web.js.map +1 -1
- package/lib/module/components/Pressable/Pressable.js +1 -1
- package/lib/module/components/Pressable/Pressable.js.map +1 -1
- package/lib/module/components/Pressable/stateDefinitions.js +2 -0
- package/lib/module/components/Pressable/stateDefinitions.js.map +1 -1
- package/lib/module/components/touchables/GenericTouchable.js +2 -6
- package/lib/module/components/touchables/GenericTouchable.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/utils.js +11 -1
- package/lib/module/handlers/gestures/GestureDetector/utils.js.map +1 -1
- package/lib/module/handlers/gestures/flingGesture.js +8 -0
- package/lib/module/handlers/gestures/flingGesture.js.map +1 -1
- package/lib/module/handlers/gestures/forceTouchGesture.js +3 -3
- package/lib/module/handlers/gestures/gesture.js +8 -0
- package/lib/module/handlers/gestures/gesture.js.map +1 -1
- package/lib/module/handlers/gestures/gestureComposition.js +28 -0
- package/lib/module/handlers/gestures/gestureComposition.js.map +1 -1
- package/lib/module/handlers/gestures/gestureObjects.js +27 -1
- package/lib/module/handlers/gestures/gestureObjects.js.map +1 -1
- package/lib/module/handlers/gestures/gestureStateManager.js +9 -0
- package/lib/module/handlers/gestures/gestureStateManager.js.map +1 -1
- package/lib/module/handlers/gestures/hoverGesture.js +8 -0
- package/lib/module/handlers/gestures/hoverGesture.js.map +1 -1
- package/lib/module/handlers/gestures/longPressGesture.js +8 -0
- package/lib/module/handlers/gestures/longPressGesture.js.map +1 -1
- package/lib/module/handlers/gestures/manualGesture.js +8 -0
- package/lib/module/handlers/gestures/manualGesture.js.map +1 -1
- package/lib/module/handlers/gestures/nativeGesture.js +8 -0
- package/lib/module/handlers/gestures/nativeGesture.js.map +1 -1
- package/lib/module/handlers/gestures/panGesture.js +13 -0
- package/lib/module/handlers/gestures/panGesture.js.map +1 -1
- package/lib/module/handlers/gestures/pinchGesture.js +13 -0
- package/lib/module/handlers/gestures/pinchGesture.js.map +1 -1
- package/lib/module/handlers/gestures/rotationGesture.js +8 -0
- package/lib/module/handlers/gestures/rotationGesture.js.map +1 -1
- package/lib/module/handlers/gestures/tapGesture.js +8 -0
- package/lib/module/handlers/gestures/tapGesture.js.map +1 -1
- package/lib/module/v3/components/GestureButtons.js +4 -4
- package/lib/module/v3/components/GestureButtons.js.map +1 -1
- package/lib/module/v3/components/Pressable.js +3 -2
- package/lib/module/v3/components/Pressable.js.map +1 -1
- package/lib/module/v3/components/Touchable/Touchable.js +67 -29
- package/lib/module/v3/components/Touchable/Touchable.js.map +1 -1
- package/lib/module/v3/detectors/HostGestureDetector.web.js +2 -0
- package/lib/module/v3/detectors/HostGestureDetector.web.js.map +1 -1
- package/lib/module/v3/detectors/VirtualDetector/VirtualDetector.js +2 -0
- package/lib/module/v3/detectors/VirtualDetector/VirtualDetector.js.map +1 -1
- package/lib/module/v3/detectors/useNativeGestureRole.js +6 -0
- package/lib/module/v3/detectors/useNativeGestureRole.js.map +1 -0
- package/lib/module/v3/detectors/useNativeGestureRole.web.js +27 -0
- package/lib/module/v3/detectors/useNativeGestureRole.web.js.map +1 -0
- package/lib/module/v3/hooks/callbacks/useReanimatedEventHandler.js +17 -2
- package/lib/module/v3/hooks/callbacks/useReanimatedEventHandler.js.map +1 -1
- package/lib/module/v3/hooks/gestures/fling/useFlingGesture.js +2 -1
- package/lib/module/v3/hooks/gestures/fling/useFlingGesture.js.map +1 -1
- package/lib/module/v3/hooks/gestures/hover/useHoverGesture.js +2 -1
- package/lib/module/v3/hooks/gestures/hover/useHoverGesture.js.map +1 -1
- package/lib/module/v3/hooks/gestures/longPress/useLongPressGesture.js +2 -1
- package/lib/module/v3/hooks/gestures/longPress/useLongPressGesture.js.map +1 -1
- package/lib/module/v3/hooks/gestures/manual/useManualGesture.js +2 -1
- package/lib/module/v3/hooks/gestures/manual/useManualGesture.js.map +1 -1
- package/lib/module/v3/hooks/gestures/native/NativeTypes.js +1 -1
- package/lib/module/v3/hooks/gestures/native/NativeTypes.js.map +1 -1
- package/lib/module/v3/hooks/gestures/native/useNativeGesture.js +2 -1
- package/lib/module/v3/hooks/gestures/native/useNativeGesture.js.map +1 -1
- package/lib/module/v3/hooks/gestures/pan/usePanGesture.js +2 -1
- package/lib/module/v3/hooks/gestures/pan/usePanGesture.js.map +1 -1
- package/lib/module/v3/hooks/gestures/pinch/usePinchGesture.js +2 -1
- package/lib/module/v3/hooks/gestures/pinch/usePinchGesture.js.map +1 -1
- package/lib/module/v3/hooks/gestures/rotation/useRotationGesture.js +2 -1
- package/lib/module/v3/hooks/gestures/rotation/useRotationGesture.js.map +1 -1
- package/lib/module/v3/hooks/gestures/tap/useTapGesture.js +2 -1
- package/lib/module/v3/hooks/gestures/tap/useTapGesture.js.map +1 -1
- package/lib/module/v3/hooks/useGesture.js +1 -4
- package/lib/module/v3/hooks/useGesture.js.map +1 -1
- package/lib/module/v3/hooks/utils/configUtils.js +7 -3
- package/lib/module/v3/hooks/utils/configUtils.js.map +1 -1
- package/lib/module/v3/hooks/utils/index.js +1 -1
- package/lib/module/v3/hooks/utils/index.js.map +1 -1
- package/lib/module/v3/hooks/utils/propsWhiteList.js +1 -1
- package/lib/module/v3/hooks/utils/propsWhiteList.js.map +1 -1
- package/lib/module/web/constants.js +1 -0
- package/lib/module/web/constants.js.map +1 -1
- package/lib/module/web/detectors/RotationGestureDetector.js +18 -5
- package/lib/module/web/detectors/RotationGestureDetector.js.map +1 -1
- package/lib/module/web/detectors/ScaleGestureDetector.js +9 -1
- package/lib/module/web/detectors/ScaleGestureDetector.js.map +1 -1
- package/lib/module/web/handlers/GestureHandler.js +25 -5
- package/lib/module/web/handlers/GestureHandler.js.map +1 -1
- package/lib/module/web/handlers/HoverGestureHandler.js +1 -4
- package/lib/module/web/handlers/HoverGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/ManualGestureHandler.js +1 -0
- package/lib/module/web/handlers/ManualGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/NativeViewGestureHandler.js +65 -17
- package/lib/module/web/handlers/NativeViewGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/PanGestureHandler.js +1 -0
- package/lib/module/web/handlers/PanGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/PinchGestureHandler.js +4 -6
- package/lib/module/web/handlers/PinchGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/RotationGestureHandler.js +4 -3
- package/lib/module/web/handlers/RotationGestureHandler.js.map +1 -1
- package/lib/module/web/interfaces.js +6 -0
- package/lib/module/web/interfaces.js.map +1 -1
- package/lib/module/web/tools/GestureHandlerOrchestrator.js +8 -2
- package/lib/module/web/tools/GestureHandlerOrchestrator.js.map +1 -1
- package/lib/module/web/tools/GestureLifecycleEvents.js +10 -0
- package/lib/module/web/tools/GestureLifecycleEvents.js.map +1 -0
- package/lib/module/web/tools/PointerEventManager.js +9 -0
- package/lib/module/web/tools/PointerEventManager.js.map +1 -1
- package/lib/typescript/components/GestureButtons.d.ts.map +1 -1
- package/lib/typescript/components/GestureHandlerButton.web.d.ts +5 -1
- package/lib/typescript/components/GestureHandlerButton.web.d.ts.map +1 -1
- package/lib/typescript/components/Pressable/Pressable.d.ts.map +1 -1
- package/lib/typescript/components/Pressable/stateDefinitions.d.ts.map +1 -1
- package/lib/typescript/components/touchables/GenericTouchable.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/GestureDetector/utils.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/flingGesture.d.ts +6 -0
- package/lib/typescript/handlers/gestures/flingGesture.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/forceTouchGesture.d.ts +3 -3
- package/lib/typescript/handlers/gestures/gesture.d.ts +6 -0
- package/lib/typescript/handlers/gestures/gesture.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/gestureComposition.d.ts +21 -0
- package/lib/typescript/handlers/gestures/gestureComposition.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/gestureObjects.d.ts +27 -1
- package/lib/typescript/handlers/gestures/gestureObjects.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/gestureStateManager.d.ts +6 -0
- package/lib/typescript/handlers/gestures/gestureStateManager.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/hoverGesture.d.ts +6 -0
- package/lib/typescript/handlers/gestures/hoverGesture.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/longPressGesture.d.ts +6 -0
- package/lib/typescript/handlers/gestures/longPressGesture.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/manualGesture.d.ts +6 -0
- package/lib/typescript/handlers/gestures/manualGesture.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/nativeGesture.d.ts +6 -0
- package/lib/typescript/handlers/gestures/nativeGesture.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/panGesture.d.ts +9 -0
- package/lib/typescript/handlers/gestures/panGesture.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/pinchGesture.d.ts +9 -0
- package/lib/typescript/handlers/gestures/pinchGesture.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/rotationGesture.d.ts +6 -0
- package/lib/typescript/handlers/gestures/rotationGesture.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/tapGesture.d.ts +6 -0
- package/lib/typescript/handlers/gestures/tapGesture.d.ts.map +1 -1
- package/lib/typescript/v3/components/GestureButtons.d.ts +1 -0
- package/lib/typescript/v3/components/GestureButtons.d.ts.map +1 -1
- package/lib/typescript/v3/components/GestureComponents.d.ts +3 -0
- package/lib/typescript/v3/components/GestureComponents.d.ts.map +1 -1
- package/lib/typescript/v3/components/GestureComponents.web.d.ts +4 -0
- package/lib/typescript/v3/components/GestureComponents.web.d.ts.map +1 -1
- package/lib/typescript/v3/components/Pressable.d.ts.map +1 -1
- package/lib/typescript/v3/components/Touchable/Touchable.d.ts.map +1 -1
- package/lib/typescript/v3/components/Touchable/TouchableProps.d.ts +10 -1
- package/lib/typescript/v3/components/Touchable/TouchableProps.d.ts.map +1 -1
- package/lib/typescript/v3/detectors/HostGestureDetector.web.d.ts +1 -1
- package/lib/typescript/v3/detectors/HostGestureDetector.web.d.ts.map +1 -1
- package/lib/typescript/v3/detectors/VirtualDetector/VirtualDetector.d.ts.map +1 -1
- package/lib/typescript/v3/detectors/useNativeGestureRole.d.ts +3 -0
- package/lib/typescript/v3/detectors/useNativeGestureRole.d.ts.map +1 -0
- package/lib/typescript/v3/detectors/useNativeGestureRole.web.d.ts +3 -0
- package/lib/typescript/v3/detectors/useNativeGestureRole.web.d.ts.map +1 -0
- package/lib/typescript/v3/hooks/callbacks/useReanimatedEventHandler.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/gestures/fling/useFlingGesture.d.ts +1 -1
- package/lib/typescript/v3/hooks/gestures/fling/useFlingGesture.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/gestures/hover/useHoverGesture.d.ts +1 -1
- package/lib/typescript/v3/hooks/gestures/hover/useHoverGesture.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/gestures/longPress/useLongPressGesture.d.ts +1 -1
- package/lib/typescript/v3/hooks/gestures/longPress/useLongPressGesture.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/gestures/manual/useManualGesture.d.ts +1 -1
- package/lib/typescript/v3/hooks/gestures/manual/useManualGesture.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/gestures/native/NativeTypes.d.ts +7 -0
- package/lib/typescript/v3/hooks/gestures/native/NativeTypes.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/gestures/native/useNativeGesture.d.ts +1 -1
- package/lib/typescript/v3/hooks/gestures/native/useNativeGesture.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/gestures/pan/usePanGesture.d.ts +1 -1
- package/lib/typescript/v3/hooks/gestures/pan/usePanGesture.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/gestures/pinch/usePinchGesture.d.ts +1 -1
- package/lib/typescript/v3/hooks/gestures/pinch/usePinchGesture.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/gestures/rotation/useRotationGesture.d.ts +1 -1
- package/lib/typescript/v3/hooks/gestures/rotation/useRotationGesture.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/gestures/tap/useTapGesture.d.ts +1 -1
- package/lib/typescript/v3/hooks/gestures/tap/useTapGesture.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/useGesture.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/utils/configUtils.d.ts +2 -2
- package/lib/typescript/v3/hooks/utils/configUtils.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/utils/index.d.ts +1 -1
- package/lib/typescript/v3/hooks/utils/index.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/utils/propsWhiteList.d.ts +2 -2
- package/lib/typescript/v3/hooks/utils/propsWhiteList.d.ts.map +1 -1
- package/lib/typescript/v3/types/ConfigTypes.d.ts +1 -0
- package/lib/typescript/v3/types/ConfigTypes.d.ts.map +1 -1
- package/lib/typescript/web/constants.d.ts +1 -0
- package/lib/typescript/web/constants.d.ts.map +1 -1
- package/lib/typescript/web/detectors/RotationGestureDetector.d.ts.map +1 -1
- package/lib/typescript/web/detectors/ScaleGestureDetector.d.ts.map +1 -1
- package/lib/typescript/web/handlers/GestureHandler.d.ts +8 -2
- package/lib/typescript/web/handlers/GestureHandler.d.ts.map +1 -1
- package/lib/typescript/web/handlers/HoverGestureHandler.d.ts +1 -1
- package/lib/typescript/web/handlers/HoverGestureHandler.d.ts.map +1 -1
- package/lib/typescript/web/handlers/IGestureHandler.d.ts +2 -0
- package/lib/typescript/web/handlers/IGestureHandler.d.ts.map +1 -1
- package/lib/typescript/web/handlers/ManualGestureHandler.d.ts +1 -0
- package/lib/typescript/web/handlers/ManualGestureHandler.d.ts.map +1 -1
- package/lib/typescript/web/handlers/NativeViewGestureHandler.d.ts +13 -3
- package/lib/typescript/web/handlers/NativeViewGestureHandler.d.ts.map +1 -1
- package/lib/typescript/web/handlers/PanGestureHandler.d.ts +1 -0
- package/lib/typescript/web/handlers/PanGestureHandler.d.ts.map +1 -1
- package/lib/typescript/web/handlers/PinchGestureHandler.d.ts +1 -0
- package/lib/typescript/web/handlers/PinchGestureHandler.d.ts.map +1 -1
- package/lib/typescript/web/handlers/RotationGestureHandler.d.ts +1 -0
- package/lib/typescript/web/handlers/RotationGestureHandler.d.ts.map +1 -1
- package/lib/typescript/web/interfaces.d.ts +6 -0
- package/lib/typescript/web/interfaces.d.ts.map +1 -1
- package/lib/typescript/web/tools/GestureHandlerOrchestrator.d.ts +1 -0
- package/lib/typescript/web/tools/GestureHandlerOrchestrator.d.ts.map +1 -1
- package/lib/typescript/web/tools/GestureLifecycleEvents.d.ts +7 -0
- package/lib/typescript/web/tools/GestureLifecycleEvents.d.ts.map +1 -0
- package/lib/typescript/web/tools/PointerEventManager.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/GestureButtons.tsx +10 -9
- package/src/components/GestureHandlerButton.web.tsx +94 -26
- package/src/components/Pressable/Pressable.tsx +2 -1
- package/src/components/Pressable/stateDefinitions.ts +3 -0
- package/src/components/touchables/GenericTouchable.tsx +2 -5
- package/src/handlers/gestures/GestureDetector/utils.ts +11 -1
- package/src/handlers/gestures/flingGesture.ts +6 -0
- package/src/handlers/gestures/forceTouchGesture.ts +3 -3
- package/src/handlers/gestures/gesture.ts +6 -0
- package/src/handlers/gestures/gestureComposition.ts +21 -0
- package/src/handlers/gestures/gestureObjects.ts +27 -1
- package/src/handlers/gestures/gestureStateManager.ts +6 -0
- package/src/handlers/gestures/hoverGesture.ts +6 -0
- package/src/handlers/gestures/longPressGesture.ts +6 -0
- package/src/handlers/gestures/manualGesture.ts +6 -0
- package/src/handlers/gestures/nativeGesture.ts +6 -0
- package/src/handlers/gestures/panGesture.ts +9 -0
- package/src/handlers/gestures/pinchGesture.ts +9 -0
- package/src/handlers/gestures/rotationGesture.ts +6 -0
- package/src/handlers/gestures/tapGesture.ts +6 -0
- package/src/v3/components/GestureButtons.tsx +5 -5
- package/src/v3/components/Pressable.tsx +2 -1
- package/src/v3/components/Touchable/Touchable.tsx +80 -47
- package/src/v3/components/Touchable/TouchableProps.ts +15 -1
- package/src/v3/detectors/HostGestureDetector.web.tsx +4 -1
- package/src/v3/detectors/VirtualDetector/VirtualDetector.tsx +3 -0
- package/src/v3/detectors/useNativeGestureRole.ts +8 -0
- package/src/v3/detectors/useNativeGestureRole.web.ts +42 -0
- package/src/v3/hooks/callbacks/useReanimatedEventHandler.ts +23 -7
- package/src/v3/hooks/gestures/fling/useFlingGesture.ts +5 -1
- package/src/v3/hooks/gestures/hover/useHoverGesture.ts +5 -1
- package/src/v3/hooks/gestures/longPress/useLongPressGesture.ts +3 -1
- package/src/v3/hooks/gestures/manual/useManualGesture.ts +5 -1
- package/src/v3/hooks/gestures/native/NativeTypes.ts +13 -1
- package/src/v3/hooks/gestures/native/useNativeGesture.ts +5 -1
- package/src/v3/hooks/gestures/pan/usePanGesture.ts +5 -1
- package/src/v3/hooks/gestures/pinch/usePinchGesture.ts +5 -1
- package/src/v3/hooks/gestures/rotation/useRotationGesture.ts +3 -1
- package/src/v3/hooks/gestures/tap/useTapGesture.ts +5 -1
- package/src/v3/hooks/useGesture.ts +0 -4
- package/src/v3/hooks/utils/configUtils.ts +16 -5
- package/src/v3/hooks/utils/index.ts +0 -1
- package/src/v3/hooks/utils/propsWhiteList.ts +1 -0
- package/src/v3/types/ConfigTypes.ts +1 -0
- package/src/web/constants.ts +1 -0
- package/src/web/detectors/RotationGestureDetector.ts +19 -5
- package/src/web/detectors/ScaleGestureDetector.ts +9 -3
- package/src/web/handlers/GestureHandler.ts +36 -6
- package/src/web/handlers/HoverGestureHandler.ts +2 -5
- package/src/web/handlers/IGestureHandler.ts +2 -0
- package/src/web/handlers/ManualGestureHandler.ts +2 -0
- package/src/web/handlers/NativeViewGestureHandler.ts +122 -19
- package/src/web/handlers/PanGestureHandler.ts +2 -0
- package/src/web/handlers/PinchGestureHandler.ts +5 -7
- package/src/web/handlers/RotationGestureHandler.ts +5 -5
- package/src/web/interfaces.ts +7 -0
- package/src/web/tools/GestureHandlerOrchestrator.ts +11 -3
- package/src/web/tools/GestureLifecycleEvents.ts +14 -0
- package/src/web/tools/PointerEventManager.ts +12 -0
|
@@ -14,10 +14,6 @@
|
|
|
14
14
|
#import <React/RCTParagraphComponentView.h>
|
|
15
15
|
#import <React/RCTScrollViewComponentView.h>
|
|
16
16
|
|
|
17
|
-
@interface UIGestureRecognizer (GestureHandler)
|
|
18
|
-
@property (nonatomic, readonly) RNGestureHandler *gestureHandler;
|
|
19
|
-
@end
|
|
20
|
-
|
|
21
17
|
@implementation UIGestureRecognizer (GestureHandler)
|
|
22
18
|
|
|
23
19
|
- (RNGestureHandler *)gestureHandler
|
|
@@ -105,6 +101,7 @@ static NSHashTable<RNGestureHandler *> *allGestureHandlers;
|
|
|
105
101
|
self.testID = nil;
|
|
106
102
|
self.manualActivation = NO;
|
|
107
103
|
_shouldCancelWhenOutside = NO;
|
|
104
|
+
_cancelsJSResponder = YES;
|
|
108
105
|
_hitSlop = RNGHHitSlopEmpty;
|
|
109
106
|
_needsPointerData = NO;
|
|
110
107
|
_dispatchesAnimatedEvents = NO;
|
|
@@ -164,6 +161,11 @@ static NSHashTable<RNGestureHandler *> *allGestureHandlers;
|
|
|
164
161
|
self.manualActivation = [RCTConvert BOOL:prop];
|
|
165
162
|
}
|
|
166
163
|
|
|
164
|
+
prop = config[@"cancelsJSResponder"];
|
|
165
|
+
if (prop != nil) {
|
|
166
|
+
_cancelsJSResponder = [RCTConvert BOOL:prop];
|
|
167
|
+
}
|
|
168
|
+
|
|
167
169
|
prop = config[@"hitSlop"];
|
|
168
170
|
if ([prop isKindOfClass:[NSNumber class]]) {
|
|
169
171
|
_hitSlop.left = _hitSlop.right = _hitSlop.top = _hitSlop.bottom = [prop doubleValue];
|
|
@@ -286,12 +288,12 @@ static NSHashTable<RNGestureHandler *> *allGestureHandlers;
|
|
|
286
288
|
- (RNGestureHandlerEventExtraData *)eventExtraData:(UIGestureRecognizer *)recognizer
|
|
287
289
|
{
|
|
288
290
|
#if TARGET_OS_OSX
|
|
289
|
-
return [RNGestureHandlerEventExtraData forPosition:[recognizer locationInView:
|
|
291
|
+
return [RNGestureHandlerEventExtraData forPosition:[recognizer locationInView:self.coordinateView]
|
|
290
292
|
withAbsolutePosition:[recognizer locationInView:recognizer.view.window.contentView]
|
|
291
293
|
withNumberOfTouches:1
|
|
292
294
|
withPointerType:RNGestureHandlerMouse];
|
|
293
295
|
#else
|
|
294
|
-
return [RNGestureHandlerEventExtraData forPosition:[recognizer locationInView:
|
|
296
|
+
return [RNGestureHandlerEventExtraData forPosition:[recognizer locationInView:self.coordinateView]
|
|
295
297
|
withAbsolutePosition:[recognizer locationInView:recognizer.view.window]
|
|
296
298
|
withNumberOfTouches:recognizer.numberOfTouches
|
|
297
299
|
withPointerType:_pointerType];
|
|
@@ -307,6 +309,21 @@ static NSHashTable<RNGestureHandler *> *allGestureHandlers;
|
|
|
307
309
|
return [self isViewParagraphComponent:recognizer.view] ? recognizer.view.subviews[0] : recognizer.view;
|
|
308
310
|
}
|
|
309
311
|
|
|
312
|
+
- (RNGHUIView *)coordinateView
|
|
313
|
+
{
|
|
314
|
+
RNGHUIView *recognizerView = _recognizer.view;
|
|
315
|
+
if ([self usesNativeOrVirtualDetector] && recognizerView == self.hostDetectorView &&
|
|
316
|
+
recognizerView.subviews.count == 1) {
|
|
317
|
+
return recognizerView.subviews[0];
|
|
318
|
+
}
|
|
319
|
+
return recognizerView;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
- (BOOL)shouldSuppressActiveEvent:(RNGestureHandlerEventExtraData *)extraData
|
|
323
|
+
{
|
|
324
|
+
return NO;
|
|
325
|
+
}
|
|
326
|
+
|
|
310
327
|
- (void)handleGesture:(UIGestureRecognizer *)recognizer
|
|
311
328
|
{
|
|
312
329
|
[self handleGesture:recognizer fromReset:NO];
|
|
@@ -368,6 +385,10 @@ static NSHashTable<RNGestureHandler *> *allGestureHandlers;
|
|
|
368
385
|
|
|
369
386
|
RNGestureHandlerEventExtraData *eventData = [self eventExtraData:recognizer];
|
|
370
387
|
|
|
388
|
+
if (state == RNGestureHandlerStateActive && [self shouldSuppressActiveEvent:eventData]) {
|
|
389
|
+
return;
|
|
390
|
+
}
|
|
391
|
+
|
|
371
392
|
NSNumber *tag = [self chooseViewForInteraction:recognizer].reactTag;
|
|
372
393
|
|
|
373
394
|
if (tag == nil && _actionType == RNGestureHandlerActionTypeNativeDetector) {
|
|
@@ -833,4 +854,9 @@ static NSHashTable<RNGestureHandler *> *allGestureHandlers;
|
|
|
833
854
|
return NO;
|
|
834
855
|
}
|
|
835
856
|
|
|
857
|
+
- (BOOL)isContinuous
|
|
858
|
+
{
|
|
859
|
+
return NO;
|
|
860
|
+
}
|
|
861
|
+
|
|
836
862
|
@end
|
|
@@ -49,6 +49,14 @@
|
|
|
49
49
|
*/
|
|
50
50
|
- (void)applyStartAnimationState;
|
|
51
51
|
|
|
52
|
+
/**
|
|
53
|
+
* Resets all transient press/animation state so the button can be safely reused
|
|
54
|
+
* by Fabric view recycling. Cancels pending press-out blocks, removes in-flight
|
|
55
|
+
* animations, and unconditionally restores the animation target's transform/alpha
|
|
56
|
+
* and the underlay opacity to neutral values.
|
|
57
|
+
*/
|
|
58
|
+
- (void)prepareForRecycle;
|
|
59
|
+
|
|
52
60
|
/**
|
|
53
61
|
* Updates the underlay layer's corner radii with separate horizontal/vertical
|
|
54
62
|
* components per corner, supporting elliptical inner corners when border widths
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
*/
|
|
42
42
|
@implementation RNGestureHandlerButton {
|
|
43
43
|
BOOL _isTouchInsideBounds;
|
|
44
|
+
BOOL _suppressSuperControlActionDispatch;
|
|
44
45
|
CALayer *_underlayLayer;
|
|
45
46
|
CGFloat _underlayCornerRadii[8]; // [tlH, tlV, trH, trV, blH, blV, brH, brV] outer radii in points
|
|
46
47
|
UIEdgeInsets _underlayBorderInsets; // border widths for padding-box inset
|
|
@@ -79,7 +80,9 @@
|
|
|
79
80
|
|
|
80
81
|
#if !TARGET_OS_TV && !TARGET_OS_OSX
|
|
81
82
|
[self setExclusiveTouch:YES];
|
|
82
|
-
[self addTarget:self
|
|
83
|
+
[self addTarget:self
|
|
84
|
+
action:@selector(handleAnimatePressIn)
|
|
85
|
+
forControlEvents:UIControlEventTouchDown | UIControlEventTouchDragEnter];
|
|
83
86
|
[self addTarget:self
|
|
84
87
|
action:@selector(handleAnimatePressOut)
|
|
85
88
|
forControlEvents:UIControlEventTouchUpInside | UIControlEventTouchUpOutside | UIControlEventTouchDragExit |
|
|
@@ -114,6 +117,28 @@
|
|
|
114
117
|
[_underlayLayer removeAllAnimations];
|
|
115
118
|
}
|
|
116
119
|
|
|
120
|
+
- (void)prepareForRecycle
|
|
121
|
+
{
|
|
122
|
+
// Fabric reuses the same wrapper + button instance across mounts. Without
|
|
123
|
+
// this reset, residual press-in transform/alpha/underlay-opacity from a
|
|
124
|
+
// prior use leaks into the recycled view, and `updateProps:` won't undo it
|
|
125
|
+
// when defaults are unchanged between mounts.
|
|
126
|
+
[self cancelPendingPressOutAnimation];
|
|
127
|
+
|
|
128
|
+
RNGHUIView *target = self.animationTarget ?: self;
|
|
129
|
+
target.layer.transform = CATransform3DIdentity;
|
|
130
|
+
#if !TARGET_OS_OSX
|
|
131
|
+
target.alpha = 1.0;
|
|
132
|
+
#else
|
|
133
|
+
target.alphaValue = 1.0;
|
|
134
|
+
#endif
|
|
135
|
+
_underlayLayer.opacity = 0;
|
|
136
|
+
|
|
137
|
+
_isTouchInsideBounds = NO;
|
|
138
|
+
_suppressSuperControlActionDispatch = NO;
|
|
139
|
+
_pressInTimestamp = 0;
|
|
140
|
+
}
|
|
141
|
+
|
|
117
142
|
#if TARGET_OS_OSX
|
|
118
143
|
- (void)viewWillMoveToWindow:(RNGHWindow *)newWindow
|
|
119
144
|
{
|
|
@@ -172,6 +197,17 @@
|
|
|
172
197
|
_underlayLayer.presentationLayer ? [_underlayLayer.presentationLayer opacity] : _underlayLayer.opacity;
|
|
173
198
|
[_underlayLayer removeAllAnimations];
|
|
174
199
|
|
|
200
|
+
// CABasicAnimation with duration 0 resolves to the current CATransaction's
|
|
201
|
+
// default duration (0.25s), not "no animation". Snap the value directly
|
|
202
|
+
// with implicit actions disabled to get a true instant update.
|
|
203
|
+
if (durationMs <= 0) {
|
|
204
|
+
[CATransaction begin];
|
|
205
|
+
[CATransaction setDisableActions:YES];
|
|
206
|
+
_underlayLayer.opacity = toOpacity;
|
|
207
|
+
[CATransaction commit];
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
|
|
175
211
|
CABasicAnimation *anim = [CABasicAnimation animationWithKeyPath:@"opacity"];
|
|
176
212
|
anim.fromValue = @(_underlayLayer.opacity);
|
|
177
213
|
anim.toValue = @(toOpacity);
|
|
@@ -554,6 +590,7 @@ static CATransform3D RNGHCenterScaleTransform(NSRect bounds, CGFloat scale)
|
|
|
554
590
|
#if TARGET_OS_OSX
|
|
555
591
|
- (void)mouseDown:(NSEvent *)event
|
|
556
592
|
{
|
|
593
|
+
_isTouchInsideBounds = YES;
|
|
557
594
|
[self handleAnimatePressIn];
|
|
558
595
|
[super mouseDown:event];
|
|
559
596
|
}
|
|
@@ -561,6 +598,7 @@ static CATransform3D RNGHCenterScaleTransform(NSRect bounds, CGFloat scale)
|
|
|
561
598
|
- (void)mouseUp:(NSEvent *)event
|
|
562
599
|
{
|
|
563
600
|
[self handleAnimatePressOut];
|
|
601
|
+
_isTouchInsideBounds = NO;
|
|
564
602
|
[super mouseUp:event];
|
|
565
603
|
}
|
|
566
604
|
|
|
@@ -568,8 +606,13 @@ static CATransform3D RNGHCenterScaleTransform(NSRect bounds, CGFloat scale)
|
|
|
568
606
|
{
|
|
569
607
|
NSPoint locationInWindow = [event locationInWindow];
|
|
570
608
|
NSPoint locationInView = [self convertPoint:locationInWindow fromView:nil];
|
|
609
|
+
BOOL currentlyInside = NSPointInRect(locationInView, self.bounds);
|
|
571
610
|
|
|
572
|
-
if (!
|
|
611
|
+
if (currentlyInside && !_isTouchInsideBounds) {
|
|
612
|
+
_isTouchInsideBounds = YES;
|
|
613
|
+
[self handleAnimatePressIn];
|
|
614
|
+
} else if (!currentlyInside && _isTouchInsideBounds) {
|
|
615
|
+
_isTouchInsideBounds = NO;
|
|
573
616
|
[self handleAnimatePressOut];
|
|
574
617
|
}
|
|
575
618
|
}
|
|
@@ -591,9 +634,52 @@ static CATransform3D RNGHCenterScaleTransform(NSRect bounds, CGFloat scale)
|
|
|
591
634
|
return [super beginTrackingWithTouch:touch withEvent:event];
|
|
592
635
|
}
|
|
593
636
|
|
|
637
|
+
// Mirrors `sendActionsForControlEvents:` but preserves the real `UIEvent`
|
|
638
|
+
// so target-actions with a `forEvent:` parameter receive the touches.
|
|
639
|
+
// The public `sendActionsForControlEvents:` passes a nil event, which would
|
|
640
|
+
// make handlers reading `event.allTouches.count` observe 0 pointers.
|
|
641
|
+
- (void)rngh_sendActionsForControlEvents:(UIControlEvents)controlEvents withEvent:(UIEvent *)event
|
|
642
|
+
{
|
|
643
|
+
for (id target in [self allTargets]) {
|
|
644
|
+
for (NSString *actionName in [self actionsForTarget:target forControlEvent:controlEvents]) {
|
|
645
|
+
[self sendAction:NSSelectorFromString(actionName) to:target forEvent:event];
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
// UIControl's default `touchesMoved:` / `touchesEnded:` invoke
|
|
651
|
+
// `{continue|end}TrackingWithTouch:` and THEN dispatch their own Drag* / Up*
|
|
652
|
+
// actions via `sendAction:to:forEvent:` using Apple's 70-point retention-offset
|
|
653
|
+
// hit-test. That double-fires our handlers (once from our manual dispatch in
|
|
654
|
+
// the tracking hooks, once from UIControl's retention-offset path). We swallow
|
|
655
|
+
// UIControl's dispatch via this override; the flag is armed by our tracking
|
|
656
|
+
// hooks only after our own dispatch has already run.
|
|
657
|
+
- (void)sendAction:(SEL)action to:(id)target forEvent:(UIEvent *)event
|
|
658
|
+
{
|
|
659
|
+
if (_suppressSuperControlActionDispatch) {
|
|
660
|
+
return;
|
|
661
|
+
}
|
|
662
|
+
[super sendAction:action to:target forEvent:event];
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
- (void)touchesMoved:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
|
666
|
+
{
|
|
667
|
+
[super touchesMoved:touches withEvent:event];
|
|
668
|
+
_suppressSuperControlActionDispatch = NO;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
- (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
|
|
672
|
+
{
|
|
673
|
+
[super touchesEnded:touches withEvent:event];
|
|
674
|
+
_suppressSuperControlActionDispatch = NO;
|
|
675
|
+
}
|
|
676
|
+
|
|
594
677
|
- (BOOL)continueTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event
|
|
595
678
|
{
|
|
596
|
-
//
|
|
679
|
+
// We take over drag event generation to enforce strict hitslop bounds
|
|
680
|
+
// (bypassing Apple's retention offset). After our dispatch, set the
|
|
681
|
+
// suppress flag so UIControl's default post-tracking dispatch in
|
|
682
|
+
// `touchesMoved:` gets swallowed by our `sendAction:to:forEvent:` override.
|
|
597
683
|
|
|
598
684
|
CGPoint location = [touch locationInView:self];
|
|
599
685
|
CGRect hitFrame = UIEdgeInsetsInsetRect(self.bounds, self.hitTestEdgeInsets);
|
|
@@ -601,43 +687,48 @@ static CATransform3D RNGHCenterScaleTransform(NSRect bounds, CGFloat scale)
|
|
|
601
687
|
|
|
602
688
|
if (currentlyInside) {
|
|
603
689
|
if (!_isTouchInsideBounds) {
|
|
604
|
-
[self
|
|
690
|
+
[self rngh_sendActionsForControlEvents:UIControlEventTouchDragEnter withEvent:event];
|
|
605
691
|
_isTouchInsideBounds = YES;
|
|
606
692
|
}
|
|
607
693
|
|
|
608
694
|
// Targets may call `cancelTrackingWithEvent:` in response to DragEnter.
|
|
609
695
|
if (self.tracking) {
|
|
610
|
-
[self
|
|
696
|
+
[self rngh_sendActionsForControlEvents:UIControlEventTouchDragInside withEvent:event];
|
|
611
697
|
}
|
|
612
698
|
} else {
|
|
613
699
|
if (_isTouchInsideBounds) {
|
|
614
|
-
[self
|
|
700
|
+
[self rngh_sendActionsForControlEvents:UIControlEventTouchDragExit withEvent:event];
|
|
615
701
|
_isTouchInsideBounds = NO;
|
|
616
702
|
}
|
|
617
703
|
|
|
618
704
|
// Targets may call `cancelTrackingWithEvent:` in response to DragExit.
|
|
619
705
|
if (self.tracking) {
|
|
620
|
-
[self
|
|
706
|
+
[self rngh_sendActionsForControlEvents:UIControlEventTouchDragOutside withEvent:event];
|
|
621
707
|
}
|
|
622
708
|
}
|
|
623
709
|
|
|
710
|
+
_suppressSuperControlActionDispatch = YES;
|
|
711
|
+
|
|
624
712
|
// If `cancelTrackingWithEvent` was called, `self.tracking` will be NO.
|
|
625
713
|
return self.tracking;
|
|
626
714
|
}
|
|
627
715
|
|
|
628
716
|
- (void)endTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event
|
|
629
717
|
{
|
|
630
|
-
//
|
|
631
|
-
// strict bounds,
|
|
718
|
+
// Same rationale as `continueTrackingWithTouch:` — we dispatch the final
|
|
719
|
+
// Up* event ourselves using strict hitslop bounds, then set the suppress
|
|
720
|
+
// flag so UIControl's default dispatch in `touchesEnded:` gets swallowed.
|
|
632
721
|
|
|
633
722
|
if (touch != nil) {
|
|
634
723
|
CGPoint location = [touch locationInView:self];
|
|
635
724
|
CGRect hitFrame = UIEdgeInsetsInsetRect(self.bounds, self.hitTestEdgeInsets);
|
|
636
725
|
if (CGRectContainsPoint(hitFrame, location)) {
|
|
637
|
-
[self
|
|
726
|
+
[self rngh_sendActionsForControlEvents:UIControlEventTouchUpInside withEvent:event];
|
|
638
727
|
} else {
|
|
639
|
-
[self
|
|
728
|
+
[self rngh_sendActionsForControlEvents:UIControlEventTouchUpOutside withEvent:event];
|
|
640
729
|
}
|
|
730
|
+
|
|
731
|
+
_suppressSuperControlActionDispatch = YES;
|
|
641
732
|
}
|
|
642
733
|
|
|
643
734
|
_isTouchInsideBounds = NO;
|
|
@@ -34,6 +34,7 @@ static RNGestureHandlerPointerEvents RCTPointerEventsToEnum(facebook::react::Poi
|
|
|
34
34
|
|
|
35
35
|
@implementation RNGestureHandlerButtonComponentView {
|
|
36
36
|
RNGestureHandlerButton *_buttonView;
|
|
37
|
+
BOOL _needsAnimationStateReset;
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
#if TARGET_OS_OSX
|
|
@@ -67,6 +68,20 @@ static RNGestureHandlerPointerEvents RCTPointerEventsToEnum(facebook::react::Poi
|
|
|
67
68
|
return self;
|
|
68
69
|
}
|
|
69
70
|
|
|
71
|
+
- (void)prepareForRecycle
|
|
72
|
+
{
|
|
73
|
+
[self.layer removeAnimationForKey:@"transform"];
|
|
74
|
+
self.layer.transform = CATransform3DIdentity;
|
|
75
|
+
|
|
76
|
+
[_buttonView prepareForRecycle];
|
|
77
|
+
|
|
78
|
+
// Force the next updateProps: to re-run applyStartAnimationState even if
|
|
79
|
+
// the new mount's defaults match the previous mount's.
|
|
80
|
+
_needsAnimationStateReset = YES;
|
|
81
|
+
|
|
82
|
+
[super prepareForRecycle];
|
|
83
|
+
}
|
|
84
|
+
|
|
70
85
|
- (void)mountChildComponentView:(RNGHUIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index
|
|
71
86
|
{
|
|
72
87
|
[_buttonView mountChildComponentView:childComponentView index:index];
|
|
@@ -111,14 +126,65 @@ static RNGestureHandlerPointerEvents RCTPointerEventsToEnum(facebook::react::Poi
|
|
|
111
126
|
const LayoutMetrics buttonMetrics = [self buildButtonMetrics:layoutMetrics];
|
|
112
127
|
const LayoutMetrics oldbuttonMetrics = [self buildButtonMetrics:oldLayoutMetrics];
|
|
113
128
|
|
|
129
|
+
// The press-in animation sets a scale transform on `self.layer` (animationTarget
|
|
130
|
+
// is this wrapper). RN's layout path sets `self.frame = frame`, which is undefined
|
|
131
|
+
// behavior when the layer's transform is non-identity, so mid-press child re-layouts
|
|
132
|
+
// get squished against the old bounds before snapping to the new ones. Neutralize
|
|
133
|
+
// the transform and any in-flight animation around super's frame update, then
|
|
134
|
+
// restore both atomically within the same transaction.
|
|
135
|
+
CATransform3D savedTransform = self.layer.transform;
|
|
136
|
+
CAAnimation *savedTransformAnimation = [[self.layer animationForKey:@"transform"] copy];
|
|
137
|
+
BOOL hasPendingTransform = !CATransform3DIsIdentity(savedTransform) || savedTransformAnimation != nil;
|
|
138
|
+
|
|
139
|
+
if (hasPendingTransform) {
|
|
140
|
+
[CATransaction begin];
|
|
141
|
+
[CATransaction setDisableActions:YES];
|
|
142
|
+
[self.layer removeAnimationForKey:@"transform"];
|
|
143
|
+
self.layer.transform = CATransform3DIdentity;
|
|
144
|
+
}
|
|
145
|
+
|
|
114
146
|
[super updateLayoutMetrics:wrapperMetrics oldLayoutMetrics:oldWrapperMetrics];
|
|
147
|
+
|
|
148
|
+
if (hasPendingTransform) {
|
|
149
|
+
self.layer.transform = savedTransform;
|
|
150
|
+
if (savedTransformAnimation) {
|
|
151
|
+
[self.layer addAnimation:savedTransformAnimation forKey:@"transform"];
|
|
152
|
+
}
|
|
153
|
+
[CATransaction commit];
|
|
154
|
+
}
|
|
155
|
+
|
|
115
156
|
[_buttonView updateLayoutMetrics:buttonMetrics oldLayoutMetrics:oldbuttonMetrics];
|
|
116
157
|
}
|
|
117
158
|
|
|
118
159
|
- (void)finalizeUpdates:(RNComponentViewUpdateMask)updateMask
|
|
119
160
|
{
|
|
161
|
+
// super's invalidateLayer (called via finalizeUpdates) unconditionally sets
|
|
162
|
+
// self.layer.opacity to the React style.opacity, overwriting our
|
|
163
|
+
// applyStartAnimationState alpha and interrupting in-flight press
|
|
164
|
+
// animations. Save/restore around super, but only touch what super actually
|
|
165
|
+
// disturbed — re-adding an unchanged animation resets its progress.
|
|
166
|
+
float savedOpacity = self.layer.opacity;
|
|
167
|
+
CAAnimation *savedOpacityAnimation = [self.layer animationForKey:@"opacity"];
|
|
168
|
+
|
|
120
169
|
[super finalizeUpdates:updateMask];
|
|
121
170
|
|
|
171
|
+
BOOL opacityChanged = savedOpacity != self.layer.opacity;
|
|
172
|
+
BOOL animationChanged = savedOpacityAnimation != [self.layer animationForKey:@"opacity"];
|
|
173
|
+
if (opacityChanged || animationChanged) {
|
|
174
|
+
[CATransaction begin];
|
|
175
|
+
[CATransaction setDisableActions:YES];
|
|
176
|
+
if (animationChanged) {
|
|
177
|
+
[self.layer removeAnimationForKey:@"opacity"];
|
|
178
|
+
if (savedOpacityAnimation) {
|
|
179
|
+
[self.layer addAnimation:savedOpacityAnimation forKey:@"opacity"];
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
if (opacityChanged) {
|
|
183
|
+
self.layer.opacity = savedOpacity;
|
|
184
|
+
}
|
|
185
|
+
[CATransaction commit];
|
|
186
|
+
}
|
|
187
|
+
|
|
122
188
|
// Resolve per-corner border radii from props and forward to the button
|
|
123
189
|
// so its underlay CALayer gets the matching shape.
|
|
124
190
|
const auto borderMetrics = _props->resolveBorderMetrics(_layoutMetrics);
|
|
@@ -134,8 +200,6 @@ static RNGestureHandlerPointerEvents RCTPointerEventsToEnum(facebook::react::Poi
|
|
|
134
200
|
right:borderMetrics.borderWidths.right
|
|
135
201
|
bottom:borderMetrics.borderWidths.bottom
|
|
136
202
|
left:borderMetrics.borderWidths.left];
|
|
137
|
-
|
|
138
|
-
[_buttonView applyStartAnimationState];
|
|
139
203
|
}
|
|
140
204
|
|
|
141
205
|
#pragma mark - RCTComponentViewProtocol
|
|
@@ -243,6 +307,21 @@ static RNGestureHandlerPointerEvents RCTPointerEventsToEnum(facebook::react::Poi
|
|
|
243
307
|
{
|
|
244
308
|
const auto &newProps = *std::static_pointer_cast<const RNGestureHandlerButtonProps>(props);
|
|
245
309
|
|
|
310
|
+
// After recycling, treat diffing branches as a fresh mount so values that
|
|
311
|
+
// survived recycling on _buttonView (e.g. pointerEvents) get re-applied.
|
|
312
|
+
BOOL treatAsFirstMount = !oldProps || _needsAnimationStateReset;
|
|
313
|
+
_needsAnimationStateReset = NO;
|
|
314
|
+
|
|
315
|
+
// Avoid re-running applyStartAnimationState on every commit — it would
|
|
316
|
+
// interrupt in-flight press animations during mid-press re-renders.
|
|
317
|
+
BOOL shouldApplyStartAnimationState = treatAsFirstMount;
|
|
318
|
+
if (!treatAsFirstMount) {
|
|
319
|
+
const auto &oldButtonProps = *std::static_pointer_cast<const RNGestureHandlerButtonProps>(oldProps);
|
|
320
|
+
shouldApplyStartAnimationState = oldButtonProps.defaultOpacity != newProps.defaultOpacity ||
|
|
321
|
+
oldButtonProps.defaultScale != newProps.defaultScale ||
|
|
322
|
+
oldButtonProps.defaultUnderlayOpacity != newProps.defaultUnderlayOpacity;
|
|
323
|
+
}
|
|
324
|
+
|
|
246
325
|
_buttonView.userEnabled = newProps.enabled;
|
|
247
326
|
_buttonView.pressAndHoldAnimationDuration = newProps.pressAndHoldAnimationDuration;
|
|
248
327
|
_buttonView.tapAnimationDuration = newProps.tapAnimationDuration > 0 ? newProps.tapAnimationDuration : 0;
|
|
@@ -268,7 +347,7 @@ static RNGestureHandlerPointerEvents RCTPointerEventsToEnum(facebook::react::Poi
|
|
|
268
347
|
// This is necessary because pointerEvents is redefined in the spec,
|
|
269
348
|
// which shadows the base property with a different, incompatible type.
|
|
270
349
|
const auto &newViewProps = static_cast<const ViewProps &>(newProps);
|
|
271
|
-
if (
|
|
350
|
+
if (treatAsFirstMount) {
|
|
272
351
|
_buttonView.pointerEvents = RCTPointerEventsToEnum(newViewProps.pointerEvents);
|
|
273
352
|
} else {
|
|
274
353
|
const auto &oldButtonProps = *std::static_pointer_cast<const RNGestureHandlerButtonProps>(oldProps);
|
|
@@ -279,7 +358,9 @@ static RNGestureHandlerPointerEvents RCTPointerEventsToEnum(facebook::react::Poi
|
|
|
279
358
|
}
|
|
280
359
|
|
|
281
360
|
[super updateProps:props oldProps:oldProps];
|
|
282
|
-
|
|
361
|
+
if (shouldApplyStartAnimationState) {
|
|
362
|
+
[_buttonView applyStartAnimationState];
|
|
363
|
+
}
|
|
283
364
|
}
|
|
284
365
|
|
|
285
366
|
#if !TARGET_OS_OSX
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
toView:(nonnull RNGHUIView *)view
|
|
17
17
|
withActionType:(RNGestureHandlerActionType)actionType
|
|
18
18
|
withHostDetector:(nullable RNGHUIView *)hostDetector;
|
|
19
|
-
- (void)detachHandlerWithTag:(nonnull NSNumber *)handlerTag;
|
|
20
19
|
- (void)detachHandlerWithTag:(nonnull NSNumber *)handlerTag fromHostDetector:(nonnull RNGHUIView *)hostDetectorView;
|
|
21
20
|
- (void)dropHandlerWithTag:(nonnull NSNumber *)handlerTag;
|
|
22
21
|
- (void)dropAllHandlers;
|
|
@@ -33,18 +33,6 @@
|
|
|
33
33
|
return self;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
- (BOOL)shouldBeRequiredToFailByGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
|
|
37
|
-
{
|
|
38
|
-
// This method is used to implement "enabled" feature for gesture handlers. We enforce gesture
|
|
39
|
-
// recognizers that are connected with "disabled" handlers to wait for the root gesture
|
|
40
|
-
// recognizer to fail and this way we block them from acting.
|
|
41
|
-
RNGestureHandler *otherHandler = [RNGestureHandler findGestureHandlerByRecognizer:otherGestureRecognizer];
|
|
42
|
-
if (otherHandler != nil && otherHandler.enabled == NO) {
|
|
43
|
-
return YES;
|
|
44
|
-
}
|
|
45
|
-
return NO;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
36
|
- (BOOL)canPreventGestureRecognizer:(UIGestureRecognizer *)preventedGestureRecognizer
|
|
49
37
|
{
|
|
50
38
|
return ![preventedGestureRecognizer isKindOfClass:[RCTSurfaceTouchHandler class]];
|
|
@@ -53,10 +41,11 @@
|
|
|
53
41
|
- (BOOL)canBePreventedByGestureRecognizer:(UIGestureRecognizer *)preventingGestureRecognizer
|
|
54
42
|
{
|
|
55
43
|
// When this method is called it means that one of handlers has activated, in this case we want
|
|
56
|
-
// to send an info to JS so that it
|
|
57
|
-
// recognizer is from Gesture Handler
|
|
44
|
+
// to send an info to JS so that it cancels all JS responders, as long as the preventing
|
|
45
|
+
// recognizer is from Gesture Handler and it has "cancelsJSResponder" property set to
|
|
46
|
+
// true, otherwise we might break some interactions
|
|
58
47
|
RNGestureHandler *handler = [RNGestureHandler findGestureHandlerByRecognizer:preventingGestureRecognizer];
|
|
59
|
-
if (handler != nil) {
|
|
48
|
+
if (handler != nil && handler.cancelsJSResponder) {
|
|
60
49
|
[self.delegate gestureRecognizer:preventingGestureRecognizer didActivateInViewWithTouchHandler:self.view];
|
|
61
50
|
}
|
|
62
51
|
|
|
@@ -12,7 +12,7 @@ import GestureHandlerButton from './GestureHandlerButton';
|
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
export const LegacyRawButton = createNativeWrapper(GestureHandlerButton, {
|
|
14
14
|
shouldCancelWhenOutside: false,
|
|
15
|
-
shouldActivateOnStart:
|
|
15
|
+
shouldActivateOnStart: Platform.OS === 'web'
|
|
16
16
|
});
|
|
17
17
|
class InnerBaseButton extends React.Component {
|
|
18
18
|
static defaultProps = {
|
|
@@ -20,7 +20,7 @@ class InnerBaseButton extends React.Component {
|
|
|
20
20
|
};
|
|
21
21
|
constructor(props) {
|
|
22
22
|
super(props);
|
|
23
|
-
this.
|
|
23
|
+
this.lastIsPressed = false;
|
|
24
24
|
this.longPressDetected = false;
|
|
25
25
|
}
|
|
26
26
|
handleEvent = ({
|
|
@@ -31,14 +31,14 @@ class InnerBaseButton extends React.Component {
|
|
|
31
31
|
oldState,
|
|
32
32
|
pointerInside
|
|
33
33
|
} = nativeEvent;
|
|
34
|
-
const
|
|
35
|
-
if (
|
|
36
|
-
this.props.onActiveStateChange(
|
|
34
|
+
const isPressed = pointerInside && (state === State.BEGAN || state === State.ACTIVE);
|
|
35
|
+
if (isPressed !== this.lastIsPressed && this.props.onActiveStateChange) {
|
|
36
|
+
this.props.onActiveStateChange(isPressed);
|
|
37
37
|
}
|
|
38
|
-
if (!this.longPressDetected && oldState === State.ACTIVE && state !== State.CANCELLED && this.
|
|
38
|
+
if (!this.longPressDetected && oldState === State.ACTIVE && state !== State.CANCELLED && this.lastIsPressed && this.props.onPress) {
|
|
39
39
|
this.props.onPress(pointerInside);
|
|
40
40
|
}
|
|
41
|
-
if (!this.
|
|
41
|
+
if (!this.lastIsPressed && state === State.BEGAN && pointerInside) {
|
|
42
42
|
this.longPressDetected = false;
|
|
43
43
|
if (this.props.onLongPress) {
|
|
44
44
|
this.longPressTimeout = setTimeout(this.onLongPress, this.props.delayLongPress);
|
|
@@ -54,7 +54,7 @@ class InnerBaseButton extends React.Component {
|
|
|
54
54
|
clearTimeout(this.longPressTimeout);
|
|
55
55
|
this.longPressTimeout = undefined;
|
|
56
56
|
}
|
|
57
|
-
this.
|
|
57
|
+
this.lastIsPressed = isPressed;
|
|
58
58
|
};
|
|
59
59
|
onLongPress = () => {
|
|
60
60
|
this.longPressDetected = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Animated","Platform","StyleSheet","createNativeWrapper","State","GestureHandlerButton","jsx","_jsx","jsxs","_jsxs","LegacyRawButton","shouldCancelWhenOutside","shouldActivateOnStart","InnerBaseButton","Component","defaultProps","delayLongPress","constructor","props","
|
|
1
|
+
{"version":3,"names":["React","Animated","Platform","StyleSheet","createNativeWrapper","State","GestureHandlerButton","jsx","_jsx","jsxs","_jsxs","LegacyRawButton","shouldCancelWhenOutside","shouldActivateOnStart","OS","InnerBaseButton","Component","defaultProps","delayLongPress","constructor","props","lastIsPressed","longPressDetected","handleEvent","nativeEvent","state","oldState","pointerInside","isPressed","BEGAN","ACTIVE","onActiveStateChange","CANCELLED","onPress","onLongPress","longPressTimeout","setTimeout","undefined","clearTimeout","END","FAILED","onHandlerStateChange","e","onGestureEvent","render","rippleColor","style","rest","ref","innerRef","cursor","AnimatedInnerBaseButton","createAnimatedComponent","LegacyBaseButton","AnimatedBaseButton","btnStyles","create","underlay","position","left","right","bottom","top","InnerRectButton","activeOpacity","underlayColor","opacity","Value","active","setValue","children","resolvedStyle","flatten","View","backgroundColor","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","LegacyRectButton","InnerBorderlessButton","borderless","LegacyBorderlessButton","default","LegacyPureNativeButton"],"sourceRoot":"../../../src","sources":["components/GestureButtons.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,UAAU,QAAQ,cAAc;AAE7D,OAAOC,mBAAmB,MAAM,iCAAiC;AAMjE,SAASC,KAAK,QAAQ,UAAU;AAUhC,OAAOC,oBAAoB,MAAM,wBAAwB;;AAEzD;AACA;AACA;AAFA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAGA,OAAO,MAAMC,eAAe,GAAGP,mBAAmB,CAChDE,oBAAoB,EACpB;EACEM,uBAAuB,EAAE,KAAK;EAC9BC,qBAAqB,EAAEX,QAAQ,CAACY,EAAE,KAAK;AACzC,CACF,CAAC;AAED,MAAMC,eAAe,SAASf,KAAK,CAACgB,SAAS,CAAyB;EACpE,OAAOC,YAAY,GAAG;IACpBC,cAAc,EAAE;EAClB,CAAC;EAMDC,WAAWA,CAACC,KAA6B,EAAE;IACzC,KAAK,CAACA,KAAK,CAAC;IACZ,IAAI,CAACC,aAAa,GAAG,KAAK;IA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