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
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["_gesture","require","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","extendRelation","currentRelation","extendWith","undefined","ComposedGesture","Gesture","constructor","gestures","prepareSingleGesture","gesture","simultaneousGestures","requireGesturesToFail","BaseGesture","newConfig","config","simultaneousWith","requireToFail","prepare","initialize","toGestureArray","flatMap","exports","SimultaneousGesture","simultaneousArrays","map","filter","x","length","ExclusiveGesture","gestureArrays","concat"],"sources":["gestureComposition.ts"],"sourcesContent":["import { BaseGesture, Gesture, GestureRef, GestureType } from './gesture';\n\nfunction extendRelation(\n currentRelation: GestureRef[] | undefined,\n extendWith: GestureType[]\n) {\n if (currentRelation === undefined) {\n return [...extendWith];\n } else {\n return [...currentRelation, ...extendWith];\n }\n}\n\nexport class ComposedGesture extends Gesture {\n protected gestures: Gesture[] = [];\n protected simultaneousGestures: GestureType[] = [];\n protected requireGesturesToFail: GestureType[] = [];\n\n constructor(...gestures: Gesture[]) {\n super();\n this.gestures = gestures;\n }\n\n protected prepareSingleGesture(\n gesture: Gesture,\n simultaneousGestures: GestureType[],\n requireGesturesToFail: GestureType[]\n ) {\n if (gesture instanceof BaseGesture) {\n const newConfig = { ...gesture.config };\n\n // No need to extend `blocksHandlers` here, because it's not changed in composition.\n // The same effect is achieved by reversing the order of 2 gestures in `Exclusive`\n newConfig.simultaneousWith = extendRelation(\n newConfig.simultaneousWith,\n simultaneousGestures\n );\n newConfig.requireToFail = extendRelation(\n newConfig.requireToFail,\n requireGesturesToFail\n );\n\n gesture.config = newConfig;\n } else if (gesture instanceof ComposedGesture) {\n gesture.simultaneousGestures = simultaneousGestures;\n gesture.requireGesturesToFail = requireGesturesToFail;\n gesture.prepare();\n }\n }\n\n prepare() {\n for (const gesture of this.gestures) {\n this.prepareSingleGesture(\n gesture,\n this.simultaneousGestures,\n this.requireGesturesToFail\n );\n }\n }\n\n initialize() {\n for (const gesture of this.gestures) {\n gesture.initialize();\n }\n }\n\n toGestureArray(): GestureType[] {\n return this.gestures.flatMap((gesture) => gesture.toGestureArray());\n }\n}\n\nexport class SimultaneousGesture extends ComposedGesture {\n prepare() {\n // This piece of magic works something like this:\n // for every gesture in the array\n const simultaneousArrays = this.gestures.map((gesture) =>\n // we take the array it's in\n this.gestures\n // and make a copy without it\n .filter((x) => x !== gesture)\n // then we flatmap the result to get list of raw (not composed) gestures\n // this way we don't make the gestures simultaneous with themselves, which is\n // important when the gesture is `ExclusiveGesture` - we don't want to make\n // exclusive gestures simultaneous\n .flatMap((x) => x.toGestureArray())\n );\n\n for (let i = 0; i < this.gestures.length; i++) {\n this.prepareSingleGesture(\n this.gestures[i],\n simultaneousArrays[i],\n this.requireGesturesToFail\n );\n }\n }\n}\n\nexport class ExclusiveGesture extends ComposedGesture {\n prepare() {\n // Transforms the array of gestures into array of grouped raw (not composed) gestures\n // i.e. [gesture1, gesture2, ComposedGesture(gesture3, gesture4)] -> [[gesture1], [gesture2], [gesture3, gesture4]]\n const gestureArrays = this.gestures.map((gesture) =>\n gesture.toGestureArray()\n );\n\n let requireToFail: GestureType[] = [];\n\n for (let i = 0; i < this.gestures.length; i++) {\n this.prepareSingleGesture(\n this.gestures[i],\n this.simultaneousGestures,\n this.requireGesturesToFail.concat(requireToFail)\n );\n\n // Every group gets to wait for all groups before it\n requireToFail = requireToFail.concat(gestureArrays[i]);\n }\n }\n}\n\nexport type ComposedGestureType = InstanceType<typeof ComposedGesture>;\nexport type RaceGestureType = ComposedGestureType;\nexport type SimultaneousGestureType = InstanceType<typeof SimultaneousGesture>;\nexport type ExclusiveGestureType = InstanceType<typeof ExclusiveGesture>;\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAA0E,SAAAC,gBAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAD,CAAA,GAAAI,MAAA,CAAAC,cAAA,CAAAL,CAAA,EAAAC,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EAAAK,UAAA,MAAAC,YAAA,MAAAC,QAAA,UAAAT,CAAA,CAAAC,CAAA,IAAAC,CAAA,EAAAF,CAAA;AAAA,SAAAG,eAAAD,CAAA,QAAAQ,CAAA,GAAAC,YAAA,CAAAT,CAAA,uCAAAQ,CAAA,GAAAA,CAAA,GAAAA,CAAA;AAAA,SAAAC,aAAAT,CAAA,EAAAD,CAAA,2BAAAC,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAF,CAAA,GAAAE,CAAA,CAAAU,MAAA,CAAAC,WAAA,kBAAAb,CAAA,QAAAU,CAAA,GAAAV,CAAA,CAAAc,IAAA,CAAAZ,CAAA,EAAAD,CAAA,uCAAAS,CAAA,SAAAA,CAAA,YAAAK,SAAA,yEAAAd,CAAA,GAAAe,MAAA,GAAAC,MAAA,EAAAf,CAAA;AAE1E,SAASgB,cAAcA,CACrBC,eAAyC,EACzCC,UAAyB,EACzB;EACA,IAAID,eAAe,KAAKE,SAAS,EAAE;IACjC,OAAO,CAAC,GAAGD,UAAU,CAAC;EACxB,CAAC,MAAM;IACL,OAAO,CAAC,GAAGD,eAAe,EAAE,GAAGC,UAAU,CAAC;EAC5C;AACF;AAEO,MAAME,eAAe,SAASC,gBAAO,CAAC;EAK3CC,WAAWA,CAAC,GAAGC,QAAmB,EAAE;IAClC,KAAK,CAAC,CAAC;IAAC1B,eAAA,mBALsB,EAAE;IAAAA,eAAA,+BACc,EAAE;IAAAA,eAAA,gCACD,EAAE;IAIjD,IAAI,CAAC0B,QAAQ,GAAGA,QAAQ;EAC1B;EAEUC,oBAAoBA,CAC5BC,OAAgB,EAChBC,oBAAmC,EACnCC,qBAAoC,EACpC;IACA,IAAIF,OAAO,YAAYG,oBAAW,EAAE;MAClC,MAAMC,SAAS,GAAG;QAAE,GAAGJ,OAAO,CAACK;MAAO,CAAC;;MAEvC;MACA;MACAD,SAAS,CAACE,gBAAgB,GAAGf,cAAc,CACzCa,SAAS,CAACE,gBAAgB,EAC1BL,oBACF,CAAC;MACDG,SAAS,CAACG,aAAa,GAAGhB,cAAc,CACtCa,SAAS,CAACG,aAAa,EACvBL,qBACF,CAAC;MAEDF,OAAO,CAACK,MAAM,GAAGD,SAAS;IAC5B,CAAC,MAAM,IAAIJ,OAAO,YAAYL,eAAe,EAAE;MAC7CK,OAAO,CAACC,oBAAoB,GAAGA,oBAAoB;MACnDD,OAAO,CAACE,qBAAqB,GAAGA,qBAAqB;MACrDF,OAAO,CAACQ,OAAO,CAAC,CAAC;IACnB;EACF;EAEAA,OAAOA,CAAA,EAAG;IACR,KAAK,MAAMR,OAAO,IAAI,IAAI,CAACF,QAAQ,EAAE;MACnC,IAAI,CAACC,oBAAoB,CACvBC,OAAO,EACP,IAAI,CAACC,oBAAoB,EACzB,IAAI,CAACC,qBACP,CAAC;IACH;EACF;EAEAO,UAAUA,CAAA,EAAG;IACX,KAAK,MAAMT,OAAO,IAAI,IAAI,CAACF,QAAQ,EAAE;MACnCE,OAAO,CAACS,UAAU,CAAC,CAAC;IACtB;EACF;EAEAC,cAAcA,CAAA,EAAkB;IAC9B,OAAO,IAAI,CAACZ,QAAQ,CAACa,OAAO,CAAEX,OAAO,IAAKA,OAAO,CAACU,cAAc,CAAC,CAAC,CAAC;EACrE;AACF;AAACE,OAAA,CAAAjB,eAAA,GAAAA,eAAA;AAEM,MAAMkB,mBAAmB,SAASlB,eAAe,CAAC;EACvDa,OAAOA,CAAA,EAAG;IACR;IACA;IACA,MAAMM,kBAAkB,GAAG,IAAI,CAAChB,QAAQ,CAACiB,GAAG,CAAEf,OAAO;IACnD;IACA,IAAI,CAACF;IACH;IAAA,CACCkB,MAAM,CAAEC,CAAC,IAAKA,CAAC,KAAKjB,OAAO;IAC5B;IACA;IACA;IACA;IAAA,CACCW,OAAO,CAAEM,CAAC,IAAKA,CAAC,CAACP,cAAc,CAAC,CAAC,CACtC,CAAC;IAED,KAAK,IAAI3B,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAG,IAAI,CAACe,QAAQ,CAACoB,MAAM,EAAEnC,CAAC,EAAE,EAAE;MAC7C,IAAI,CAACgB,oBAAoB,CACvB,IAAI,CAACD,QAAQ,CAACf,CAAC,CAAC,EAChB+B,kBAAkB,CAAC/B,CAAC,CAAC,EACrB,IAAI,CAACmB,qBACP,CAAC;IACH;EACF;AACF;AAACU,OAAA,CAAAC,mBAAA,GAAAA,mBAAA;AAEM,MAAMM,gBAAgB,SAASxB,eAAe,CAAC;EACpDa,OAAOA,CAAA,EAAG;IACR;IACA;IACA,MAAMY,aAAa,GAAG,IAAI,CAACtB,QAAQ,CAACiB,GAAG,CAAEf,OAAO,IAC9CA,OAAO,CAACU,cAAc,CAAC,CACzB,CAAC;IAED,IAAIH,aAA4B,GAAG,EAAE;IAErC,KAAK,IAAIxB,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAG,IAAI,CAACe,QAAQ,CAACoB,MAAM,EAAEnC,CAAC,EAAE,EAAE;MAC7C,IAAI,CAACgB,oBAAoB,CACvB,IAAI,CAACD,QAAQ,CAACf,CAAC,CAAC,EAChB,IAAI,CAACkB,oBAAoB,EACzB,IAAI,CAACC,qBAAqB,CAACmB,MAAM,CAACd,aAAa,CACjD,CAAC;;MAED;MACAA,aAAa,GAAGA,aAAa,CAACc,MAAM,CAACD,aAAa,CAACrC,CAAC,CAAC,CAAC;IACxD;EACF;AACF;AAAC6B,OAAA,CAAAO,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
@@ -4,29 +4,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.GestureObjects = void 0;
|
7
|
-
|
8
7
|
var _flingGesture = require("./flingGesture");
|
9
|
-
|
10
8
|
var _forceTouchGesture = require("./forceTouchGesture");
|
11
|
-
|
12
9
|
var _gestureComposition = require("./gestureComposition");
|
13
|
-
|
14
10
|
var _longPressGesture = require("./longPressGesture");
|
15
|
-
|
16
11
|
var _panGesture = require("./panGesture");
|
17
|
-
|
18
12
|
var _pinchGesture = require("./pinchGesture");
|
19
|
-
|
20
13
|
var _rotationGesture = require("./rotationGesture");
|
21
|
-
|
22
14
|
var _tapGesture = require("./tapGesture");
|
23
|
-
|
24
15
|
var _nativeGesture = require("./nativeGesture");
|
25
|
-
|
26
16
|
var _manualGesture = require("./manualGesture");
|
27
|
-
|
28
17
|
var _hoverGesture = require("./hoverGesture");
|
29
|
-
|
30
18
|
/**
|
31
19
|
* `Gesture` is the object that allows you to create and compose gestures.
|
32
20
|
*
|
@@ -35,7 +23,7 @@ var _hoverGesture = require("./hoverGesture");
|
|
35
23
|
*
|
36
24
|
* @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/gesture
|
37
25
|
*/
|
38
|
-
const GestureObjects = {
|
26
|
+
const GestureObjects = exports.GestureObjects = {
|
39
27
|
/**
|
40
28
|
* A discrete gesture that recognizes one or many taps.
|
41
29
|
* @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/tap-gesture
|
@@ -43,7 +31,6 @@ const GestureObjects = {
|
|
43
31
|
Tap: () => {
|
44
32
|
return new _tapGesture.TapGesture();
|
45
33
|
},
|
46
|
-
|
47
34
|
/**
|
48
35
|
* A continuous gesture that can recognize a panning (dragging) gesture and track its movement.
|
49
36
|
* @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/pan-gesture
|
@@ -51,7 +38,6 @@ const GestureObjects = {
|
|
51
38
|
Pan: () => {
|
52
39
|
return new _panGesture.PanGesture();
|
53
40
|
},
|
54
|
-
|
55
41
|
/**
|
56
42
|
* A continuous gesture that recognizes pinch gesture. It allows for tracking the distance between two fingers and use that information to scale or zoom your content.
|
57
43
|
* @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/pinch-gesture
|
@@ -59,7 +45,6 @@ const GestureObjects = {
|
|
59
45
|
Pinch: () => {
|
60
46
|
return new _pinchGesture.PinchGesture();
|
61
47
|
},
|
62
|
-
|
63
48
|
/**
|
64
49
|
* A continuous gesture that can recognize rotation and track its movement.
|
65
50
|
* @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/rotation-gesture
|
@@ -67,7 +52,6 @@ const GestureObjects = {
|
|
67
52
|
Rotation: () => {
|
68
53
|
return new _rotationGesture.RotationGesture();
|
69
54
|
},
|
70
|
-
|
71
55
|
/**
|
72
56
|
* A discrete gesture that activates when the movement is sufficiently fast.
|
73
57
|
* @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/fling-gesture
|
@@ -75,7 +59,6 @@ const GestureObjects = {
|
|
75
59
|
Fling: () => {
|
76
60
|
return new _flingGesture.FlingGesture();
|
77
61
|
},
|
78
|
-
|
79
62
|
/**
|
80
63
|
* A discrete gesture that activates when the corresponding view is pressed for a sufficiently long time.
|
81
64
|
* @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/long-press-gesture
|
@@ -83,7 +66,6 @@ const GestureObjects = {
|
|
83
66
|
LongPress: () => {
|
84
67
|
return new _longPressGesture.LongPressGesture();
|
85
68
|
},
|
86
|
-
|
87
69
|
/**
|
88
70
|
* #### iOS only
|
89
71
|
* A continuous gesture that recognizes force of a touch. It allows for tracking pressure of touch on some iOS devices.
|
@@ -92,7 +74,6 @@ const GestureObjects = {
|
|
92
74
|
ForceTouch: () => {
|
93
75
|
return new _forceTouchGesture.ForceTouchGesture();
|
94
76
|
},
|
95
|
-
|
96
77
|
/**
|
97
78
|
* A gesture that allows other touch handling components to participate in RNGH's gesture system.
|
98
79
|
* When used, the other component should be the direct child of a `GestureDetector`.
|
@@ -101,7 +82,6 @@ const GestureObjects = {
|
|
101
82
|
Native: () => {
|
102
83
|
return new _nativeGesture.NativeGesture();
|
103
84
|
},
|
104
|
-
|
105
85
|
/**
|
106
86
|
* A plain gesture that has no specific activation criteria nor event data set.
|
107
87
|
* Its state has to be controlled manually using a state manager.
|
@@ -111,7 +91,6 @@ const GestureObjects = {
|
|
111
91
|
Manual: () => {
|
112
92
|
return new _manualGesture.ManualGesture();
|
113
93
|
},
|
114
|
-
|
115
94
|
/**
|
116
95
|
* A continuous gesture that can recognize hovering above the view it's attached to.
|
117
96
|
* The hover effect may be activated by moving a mouse or a stylus over the view.
|
@@ -121,7 +100,6 @@ const GestureObjects = {
|
|
121
100
|
Hover: () => {
|
122
101
|
return new _hoverGesture.HoverGesture();
|
123
102
|
},
|
124
|
-
|
125
103
|
/**
|
126
104
|
* Builds a composed gesture consisting of gestures provided as parameters.
|
127
105
|
* The first one that becomes active cancels the rest of gestures.
|
@@ -130,7 +108,6 @@ const GestureObjects = {
|
|
130
108
|
Race: (...gestures) => {
|
131
109
|
return new _gestureComposition.ComposedGesture(...gestures);
|
132
110
|
},
|
133
|
-
|
134
111
|
/**
|
135
112
|
* Builds a composed gesture that allows all base gestures to run simultaneously.
|
136
113
|
* @see https://docs.swmansion.com/react-native-gesture-handler/docs/fundamentals/gesture-composition/#simultaneous
|
@@ -138,7 +115,6 @@ const GestureObjects = {
|
|
138
115
|
Simultaneous(...gestures) {
|
139
116
|
return new _gestureComposition.SimultaneousGesture(...gestures);
|
140
117
|
},
|
141
|
-
|
142
118
|
/**
|
143
119
|
* Builds a composed gesture where only one of the provided gestures can become active.
|
144
120
|
* Priority is decided through the order of gestures: the first one has higher priority
|
@@ -150,7 +126,5 @@ const GestureObjects = {
|
|
150
126
|
Exclusive(...gestures) {
|
151
127
|
return new _gestureComposition.ExclusiveGesture(...gestures);
|
152
128
|
}
|
153
|
-
|
154
129
|
};
|
155
|
-
exports.GestureObjects = GestureObjects;
|
156
130
|
//# sourceMappingURL=gestureObjects.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["_flingGesture","require","_forceTouchGesture","_gestureComposition","_longPressGesture","_panGesture","_pinchGesture","_rotationGesture","_tapGesture","_nativeGesture","_manualGesture","_hoverGesture","GestureObjects","exports","Tap","TapGesture","Pan","PanGesture","Pinch","PinchGesture","Rotation","RotationGesture","Fling","FlingGesture","LongPress","LongPressGesture","ForceTouch","ForceTouchGesture","Native","NativeGesture","Manual","ManualGesture","Hover","HoverGesture","Race","gestures","ComposedGesture","Simultaneous","SimultaneousGesture","Exclusive","ExclusiveGesture"],"sources":["gestureObjects.ts"],"sourcesContent":["import { FlingGesture } from './flingGesture';\nimport { ForceTouchGesture } from './forceTouchGesture';\nimport { Gesture } from './gesture';\nimport {\n ComposedGesture,\n ExclusiveGesture,\n SimultaneousGesture,\n} from './gestureComposition';\nimport { LongPressGesture } from './longPressGesture';\nimport { PanGesture } from './panGesture';\nimport { PinchGesture } from './pinchGesture';\nimport { RotationGesture } from './rotationGesture';\nimport { TapGesture } from './tapGesture';\nimport { NativeGesture } from './nativeGesture';\nimport { ManualGesture } from './manualGesture';\nimport { HoverGesture } from './hoverGesture';\n\n/**\n * `Gesture` is the object that allows you to create and compose gestures.\n *\n * ### Remarks\n * - Consider wrapping your gesture configurations with `useMemo`, as it will reduce the amount of work Gesture Handler has to do under the hood when updating gestures.\n *\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/gesture\n */\nexport const GestureObjects = {\n /**\n * A discrete gesture that recognizes one or many taps.\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/tap-gesture\n */\n Tap: () => {\n return new TapGesture();\n },\n\n /**\n * A continuous gesture that can recognize a panning (dragging) gesture and track its movement.\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/pan-gesture\n */\n Pan: () => {\n return new PanGesture();\n },\n\n /**\n * A continuous gesture that recognizes pinch gesture. It allows for tracking the distance between two fingers and use that information to scale or zoom your content.\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/pinch-gesture\n */\n Pinch: () => {\n return new PinchGesture();\n },\n\n /**\n * A continuous gesture that can recognize rotation and track its movement.\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/rotation-gesture\n */\n Rotation: () => {\n return new RotationGesture();\n },\n\n /**\n * A discrete gesture that activates when the movement is sufficiently fast.\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/fling-gesture\n */\n Fling: () => {\n return new FlingGesture();\n },\n\n /**\n * A discrete gesture that activates when the corresponding view is pressed for a sufficiently long time.\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/long-press-gesture\n */\n LongPress: () => {\n return new LongPressGesture();\n },\n\n /**\n * #### iOS only\n * A continuous gesture that recognizes force of a touch. It allows for tracking pressure of touch on some iOS devices.\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/force-touch-gesture\n */\n ForceTouch: () => {\n return new ForceTouchGesture();\n },\n\n /**\n * A gesture that allows other touch handling components to participate in RNGH's gesture system.\n * When used, the other component should be the direct child of a `GestureDetector`.\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/native-gesture\n */\n Native: () => {\n return new NativeGesture();\n },\n\n /**\n * A plain gesture that has no specific activation criteria nor event data set.\n * Its state has to be controlled manually using a state manager.\n * It will not fail when all the pointers are lifted from the screen.\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/manual-gesture\n */\n Manual: () => {\n return new ManualGesture();\n },\n\n /**\n * A continuous gesture that can recognize hovering above the view it's attached to.\n * The hover effect may be activated by moving a mouse or a stylus over the view.\n *\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/hover-gesture\n */\n Hover: () => {\n return new HoverGesture();\n },\n\n /**\n * Builds a composed gesture consisting of gestures provided as parameters.\n * The first one that becomes active cancels the rest of gestures.\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/fundamentals/gesture-composition/#race\n */\n Race: (...gestures: Gesture[]) => {\n return new ComposedGesture(...gestures);\n },\n\n /**\n * Builds a composed gesture that allows all base gestures to run simultaneously.\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/fundamentals/gesture-composition/#simultaneous\n */\n Simultaneous(...gestures: Gesture[]) {\n return new SimultaneousGesture(...gestures);\n },\n\n /**\n * Builds a composed gesture where only one of the provided gestures can become active.\n * Priority is decided through the order of gestures: the first one has higher priority\n * than the second one, second one has higher priority than the third one, and so on.\n * For example, to make a gesture that recognizes both single and double tap you need\n * to call Exclusive(doubleTap, singleTap).\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/fundamentals/gesture-composition/#exclusive\n */\n Exclusive(...gestures: Gesture[]) {\n return new ExclusiveGesture(...gestures);\n },\n};\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAD,OAAA;AAEA,IAAAE,mBAAA,GAAAF,OAAA;AAKA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,gBAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AACA,IAAAQ,cAAA,GAAAR,OAAA;AACA,IAAAS,cAAA,GAAAT,OAAA;AACA,IAAAU,aAAA,GAAAV,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMW,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG;EAC5B;AACF;AACA;AACA;EACEE,GAAG,EAAEA,CAAA,KAAM;IACT,OAAO,IAAIC,sBAAU,CAAC,CAAC;EACzB,CAAC;EAED;AACF;AACA;AACA;EACEC,GAAG,EAAEA,CAAA,KAAM;IACT,OAAO,IAAIC,sBAAU,CAAC,CAAC;EACzB,CAAC;EAED;AACF;AACA;AACA;EACEC,KAAK,EAAEA,CAAA,KAAM;IACX,OAAO,IAAIC,0BAAY,CAAC,CAAC;EAC3B,CAAC;EAED;AACF;AACA;AACA;EACEC,QAAQ,EAAEA,CAAA,KAAM;IACd,OAAO,IAAIC,gCAAe,CAAC,CAAC;EAC9B,CAAC;EAED;AACF;AACA;AACA;EACEC,KAAK,EAAEA,CAAA,KAAM;IACX,OAAO,IAAIC,0BAAY,CAAC,CAAC;EAC3B,CAAC;EAED;AACF;AACA;AACA;EACEC,SAAS,EAAEA,CAAA,KAAM;IACf,OAAO,IAAIC,kCAAgB,CAAC,CAAC;EAC/B,CAAC;EAED;AACF;AACA;AACA;AACA;EACEC,UAAU,EAAEA,CAAA,KAAM;IAChB,OAAO,IAAIC,oCAAiB,CAAC,CAAC;EAChC,CAAC;EAED;AACF;AACA;AACA;AACA;EACEC,MAAM,EAAEA,CAAA,KAAM;IACZ,OAAO,IAAIC,4BAAa,CAAC,CAAC;EAC5B,CAAC;EAED;AACF;AACA;AACA;AACA;AACA;EACEC,MAAM,EAAEA,CAAA,KAAM;IACZ,OAAO,IAAIC,4BAAa,CAAC,CAAC;EAC5B,CAAC;EAED;AACF;AACA;AACA;AACA;AACA;EACEC,KAAK,EAAEA,CAAA,KAAM;IACX,OAAO,IAAIC,0BAAY,CAAC,CAAC;EAC3B,CAAC;EAED;AACF;AACA;AACA;AACA;EACEC,IAAI,EAAEA,CAAC,GAAGC,QAAmB,KAAK;IAChC,OAAO,IAAIC,mCAAe,CAAC,GAAGD,QAAQ,CAAC;EACzC,CAAC;EAED;AACF;AACA;AACA;EACEE,YAAYA,CAAC,GAAGF,QAAmB,EAAE;IACnC,OAAO,IAAIG,uCAAmB,CAAC,GAAGH,QAAQ,CAAC;EAC7C,CAAC;EAED;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACEI,SAASA,CAAC,GAAGJ,QAAmB,EAAE;IAChC,OAAO,IAAIK,oCAAgB,CAAC,GAAGL,QAAQ,CAAC;EAC1C;AACF,CAAC","ignoreList":[]}
|
@@ -4,19 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.GestureStateManager = void 0;
|
7
|
-
|
8
7
|
var _reanimatedWrapper = require("./reanimatedWrapper");
|
9
|
-
|
10
8
|
var _State = require("../../State");
|
11
|
-
|
12
9
|
var _utils = require("../../utils");
|
10
|
+
const warningMessage = (0, _utils.tagMessage)('react-native-reanimated is required in order to use synchronous state management');
|
13
11
|
|
14
|
-
|
12
|
+
// Check if reanimated module is available, but look for useSharedValue as conditional
|
15
13
|
// require of reanimated can sometimes return content of `utils.ts` file (?)
|
16
|
-
|
17
14
|
const REANIMATED_AVAILABLE = (_reanimatedWrapper.Reanimated === null || _reanimatedWrapper.Reanimated === void 0 ? void 0 : _reanimatedWrapper.Reanimated.useSharedValue) !== undefined;
|
18
15
|
const setGestureState = _reanimatedWrapper.Reanimated === null || _reanimatedWrapper.Reanimated === void 0 ? void 0 : _reanimatedWrapper.Reanimated.setGestureState;
|
19
|
-
|
20
16
|
function create(handlerTag) {
|
21
17
|
'worklet';
|
22
18
|
|
@@ -67,9 +63,7 @@ function create(handlerTag) {
|
|
67
63
|
}
|
68
64
|
};
|
69
65
|
}
|
70
|
-
|
71
|
-
const GestureStateManager = {
|
66
|
+
const GestureStateManager = exports.GestureStateManager = {
|
72
67
|
create
|
73
68
|
};
|
74
|
-
exports.GestureStateManager = GestureStateManager;
|
75
69
|
//# sourceMappingURL=gestureStateManager.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["_reanimatedWrapper","require","_State","_utils","warningMessage","tagMessage","REANIMATED_AVAILABLE","Reanimated","useSharedValue","undefined","setGestureState","create","handlerTag","begin","State","BEGAN","console","warn","activate","ACTIVE","fail","FAILED","end","END","GestureStateManager","exports"],"sources":["gestureStateManager.ts"],"sourcesContent":["import { Reanimated } from './reanimatedWrapper';\nimport { State } from '../../State';\nimport { tagMessage } from '../../utils';\n\nexport interface GestureStateManagerType {\n begin: () => void;\n activate: () => void;\n fail: () => void;\n end: () => void;\n}\n\nconst warningMessage = tagMessage(\n 'react-native-reanimated is required in order to use synchronous state management'\n);\n\n// Check if reanimated module is available, but look for useSharedValue as conditional\n// require of reanimated can sometimes return content of `utils.ts` file (?)\nconst REANIMATED_AVAILABLE = Reanimated?.useSharedValue !== undefined;\nconst setGestureState = Reanimated?.setGestureState;\n\nfunction create(handlerTag: number): GestureStateManagerType {\n 'worklet';\n return {\n begin: () => {\n 'worklet';\n if (REANIMATED_AVAILABLE) {\n // When Reanimated is available, setGestureState should be defined\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n setGestureState!(handlerTag, State.BEGAN);\n } else {\n console.warn(warningMessage);\n }\n },\n\n activate: () => {\n 'worklet';\n if (REANIMATED_AVAILABLE) {\n // When Reanimated is available, setGestureState should be defined\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n setGestureState!(handlerTag, State.ACTIVE);\n } else {\n console.warn(warningMessage);\n }\n },\n\n fail: () => {\n 'worklet';\n if (REANIMATED_AVAILABLE) {\n // When Reanimated is available, setGestureState should be defined\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n setGestureState!(handlerTag, State.FAILED);\n } else {\n console.warn(warningMessage);\n }\n },\n\n end: () => {\n 'worklet';\n if (REANIMATED_AVAILABLE) {\n // When Reanimated is available, setGestureState should be defined\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n setGestureState!(handlerTag, State.END);\n } else {\n console.warn(warningMessage);\n }\n },\n };\n}\n\nexport const GestureStateManager = {\n create,\n};\n"],"mappings":";;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AASA,MAAMG,cAAc,GAAG,IAAAC,iBAAU,EAC/B,kFACF,CAAC;;AAED;AACA;AACA,MAAMC,oBAAoB,GAAG,CAAAC,6BAAU,aAAVA,6BAAU,uBAAVA,6BAAU,CAAEC,cAAc,MAAKC,SAAS;AACrE,MAAMC,eAAe,GAAGH,6BAAU,aAAVA,6BAAU,uBAAVA,6BAAU,CAAEG,eAAe;AAEnD,SAASC,MAAMA,CAACC,UAAkB,EAA2B;EAC3D,SAAS;;EACT,OAAO;IACLC,KAAK,EAAEA,CAAA,KAAM;MACX,SAAS;;MACT,IAAIP,oBAAoB,EAAE;QACxB;QACA;QACAI,eAAe,CAAEE,UAAU,EAAEE,YAAK,CAACC,KAAK,CAAC;MAC3C,CAAC,MAAM;QACLC,OAAO,CAACC,IAAI,CAACb,cAAc,CAAC;MAC9B;IACF,CAAC;IAEDc,QAAQ,EAAEA,CAAA,KAAM;MACd,SAAS;;MACT,IAAIZ,oBAAoB,EAAE;QACxB;QACA;QACAI,eAAe,CAAEE,UAAU,EAAEE,YAAK,CAACK,MAAM,CAAC;MAC5C,CAAC,MAAM;QACLH,OAAO,CAACC,IAAI,CAACb,cAAc,CAAC;MAC9B;IACF,CAAC;IAEDgB,IAAI,EAAEA,CAAA,KAAM;MACV,SAAS;;MACT,IAAId,oBAAoB,EAAE;QACxB;QACA;QACAI,eAAe,CAAEE,UAAU,EAAEE,YAAK,CAACO,MAAM,CAAC;MAC5C,CAAC,MAAM;QACLL,OAAO,CAACC,IAAI,CAACb,cAAc,CAAC;MAC9B;IACF,CAAC;IAEDkB,GAAG,EAAEA,CAAA,KAAM;MACT,SAAS;;MACT,IAAIhB,oBAAoB,EAAE;QACxB;QACA;QACAI,eAAe,CAAEE,UAAU,EAAEE,YAAK,CAACS,GAAG,CAAC;MACzC,CAAC,MAAM;QACLP,OAAO,CAACC,IAAI,CAACb,cAAc,CAAC;MAC9B;IACF;EACF,CAAC;AACH;AAEO,MAAMoB,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAG;EACjCb;AACF,CAAC","ignoreList":[]}
|
@@ -4,12 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.GestureStateManager = void 0;
|
7
|
-
|
8
7
|
var _NodeManager = _interopRequireDefault(require("../../web/tools/NodeManager"));
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
const GestureStateManager = {
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
9
|
+
const GestureStateManager = exports.GestureStateManager = {
|
13
10
|
create(handlerTag) {
|
14
11
|
return {
|
15
12
|
begin: () => {
|
@@ -26,7 +23,5 @@ const GestureStateManager = {
|
|
26
23
|
}
|
27
24
|
};
|
28
25
|
}
|
29
|
-
|
30
26
|
};
|
31
|
-
exports.GestureStateManager = GestureStateManager;
|
32
27
|
//# sourceMappingURL=gestureStateManager.web.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["_NodeManager","_interopRequireDefault","require","e","__esModule","default","GestureStateManager","exports","create","handlerTag","begin","NodeManager","getHandler","activate","fail","end"],"sources":["gestureStateManager.web.ts"],"sourcesContent":["import NodeManager from '../../web/tools/NodeManager';\nimport { GestureStateManagerType } from './gestureStateManager';\n\nexport const GestureStateManager = {\n create(handlerTag: number): GestureStateManagerType {\n return {\n begin: () => {\n NodeManager.getHandler(handlerTag).begin();\n },\n\n activate: () => {\n NodeManager.getHandler(handlerTag).activate(true);\n },\n\n fail: () => {\n NodeManager.getHandler(handlerTag).fail();\n },\n\n end: () => {\n NodeManager.getHandler(handlerTag).end();\n },\n };\n },\n};\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAsD,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAG/C,MAAMG,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAG;EACjCE,MAAMA,CAACC,UAAkB,EAA2B;IAClD,OAAO;MACLC,KAAK,EAAEA,CAAA,KAAM;QACXC,oBAAW,CAACC,UAAU,CAACH,UAAU,CAAC,CAACC,KAAK,CAAC,CAAC;MAC5C,CAAC;MAEDG,QAAQ,EAAEA,CAAA,KAAM;QACdF,oBAAW,CAACC,UAAU,CAACH,UAAU,CAAC,CAACI,QAAQ,CAAC,IAAI,CAAC;MACnD,CAAC;MAEDC,IAAI,EAAEA,CAAA,KAAM;QACVH,oBAAW,CAACC,UAAU,CAACH,UAAU,CAAC,CAACK,IAAI,CAAC,CAAC;MAC3C,CAAC;MAEDC,GAAG,EAAEA,CAAA,KAAM;QACTJ,oBAAW,CAACC,UAAU,CAACH,UAAU,CAAC,CAACM,GAAG,CAAC,CAAC;MAC1C;IACF,CAAC;EACH;AACF,CAAC","ignoreList":[]}
|
@@ -3,29 +3,22 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
7
|
-
|
6
|
+
exports.hoverGestureHandlerProps = exports.HoverGesture = exports.HoverEffect = void 0;
|
8
7
|
var _gesture = require("./gesture");
|
9
|
-
|
10
|
-
function
|
11
|
-
|
12
|
-
let HoverEffect
|
13
|
-
exports.HoverEffect = HoverEffect;
|
14
|
-
|
15
|
-
(function (HoverEffect) {
|
8
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
9
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
10
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
11
|
+
let HoverEffect = exports.HoverEffect = /*#__PURE__*/function (HoverEffect) {
|
16
12
|
HoverEffect[HoverEffect["NONE"] = 0] = "NONE";
|
17
13
|
HoverEffect[HoverEffect["LIFT"] = 1] = "LIFT";
|
18
14
|
HoverEffect[HoverEffect["HIGHLIGHT"] = 2] = "HIGHLIGHT";
|
19
|
-
|
20
|
-
|
21
|
-
const hoverGestureHandlerProps = ['hoverEffect'];
|
22
|
-
exports.hoverGestureHandlerProps = hoverGestureHandlerProps;
|
23
|
-
|
15
|
+
return HoverEffect;
|
16
|
+
}({});
|
17
|
+
const hoverGestureHandlerProps = exports.hoverGestureHandlerProps = ['hoverEffect'];
|
24
18
|
function changeEventCalculator(current, previous) {
|
25
19
|
'worklet';
|
26
20
|
|
27
21
|
let changePayload;
|
28
|
-
|
29
22
|
if (previous === undefined) {
|
30
23
|
changePayload = {
|
31
24
|
changeX: current.x,
|
@@ -37,38 +30,31 @@ function changeEventCalculator(current, previous) {
|
|
37
30
|
changeY: current.y - previous.y
|
38
31
|
};
|
39
32
|
}
|
40
|
-
|
41
|
-
|
33
|
+
return {
|
34
|
+
...current,
|
42
35
|
...changePayload
|
43
36
|
};
|
44
37
|
}
|
45
|
-
|
46
38
|
class HoverGesture extends _gesture.ContinousBaseGesture {
|
47
39
|
constructor() {
|
48
40
|
super();
|
49
|
-
|
50
41
|
_defineProperty(this, "config", {});
|
51
|
-
|
52
42
|
this.handlerName = 'HoverGestureHandler';
|
53
43
|
}
|
44
|
+
|
54
45
|
/**
|
55
46
|
* #### iOS only
|
56
47
|
* Sets the visual hover effect.
|
57
48
|
*/
|
58
|
-
|
59
|
-
|
60
49
|
effect(effect) {
|
61
50
|
this.config.hoverEffect = effect;
|
62
51
|
return this;
|
63
52
|
}
|
64
|
-
|
65
53
|
onChange(callback) {
|
66
54
|
// @ts-ignore TS being overprotective, HoverGestureHandlerEventPayload is Record
|
67
55
|
this.handlers.changeEventCalculator = changeEventCalculator;
|
68
56
|
return super.onChange(callback);
|
69
57
|
}
|
70
|
-
|
71
58
|
}
|
72
|
-
|
73
59
|
exports.HoverGesture = HoverGesture;
|
74
60
|
//# sourceMappingURL=hoverGesture.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["_gesture","require","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","HoverEffect","exports","hoverGestureHandlerProps","changeEventCalculator","current","previous","changePayload","undefined","changeX","x","changeY","y","HoverGesture","ContinousBaseGesture","constructor","handlerName","effect","config","hoverEffect","onChange","callback","handlers"],"sources":["hoverGesture.ts"],"sourcesContent":["import { BaseGestureConfig, ContinousBaseGesture } from './gesture';\nimport { GestureUpdateEvent } from '../gestureHandlerCommon';\nimport type { HoverGestureHandlerEventPayload } from '../GestureHandlerEventPayload';\n\nexport type HoverGestureChangeEventPayload = {\n changeX: number;\n changeY: number;\n};\n\nexport enum HoverEffect {\n NONE = 0,\n LIFT = 1,\n HIGHLIGHT = 2,\n}\n\nexport interface HoverGestureConfig {\n hoverEffect?: HoverEffect;\n}\n\nexport const hoverGestureHandlerProps = ['hoverEffect'] as const;\n\nfunction changeEventCalculator(\n current: GestureUpdateEvent<HoverGestureHandlerEventPayload>,\n previous?: GestureUpdateEvent<HoverGestureHandlerEventPayload>\n) {\n 'worklet';\n let changePayload: HoverGestureChangeEventPayload;\n if (previous === undefined) {\n changePayload = {\n changeX: current.x,\n changeY: current.y,\n };\n } else {\n changePayload = {\n changeX: current.x - previous.x,\n changeY: current.y - previous.y,\n };\n }\n\n return { ...current, ...changePayload };\n}\n\nexport class HoverGesture extends ContinousBaseGesture<\n HoverGestureHandlerEventPayload,\n HoverGestureChangeEventPayload\n> {\n public config: BaseGestureConfig & HoverGestureConfig = {};\n\n constructor() {\n super();\n\n this.handlerName = 'HoverGestureHandler';\n }\n\n /**\n * #### iOS only\n * Sets the visual hover effect.\n */\n effect(effect: HoverEffect) {\n this.config.hoverEffect = effect;\n return this;\n }\n\n onChange(\n callback: (\n event: GestureUpdateEvent<\n HoverGestureHandlerEventPayload & HoverGestureChangeEventPayload\n >\n ) => void\n ) {\n // @ts-ignore TS being overprotective, HoverGestureHandlerEventPayload is Record\n this.handlers.changeEventCalculator = changeEventCalculator;\n return super.onChange(callback);\n }\n}\n\nexport type HoverGestureType = InstanceType<typeof HoverGesture>;\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAAoE,SAAAC,gBAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAD,CAAA,GAAAI,MAAA,CAAAC,cAAA,CAAAL,CAAA,EAAAC,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EAAAK,UAAA,MAAAC,YAAA,MAAAC,QAAA,UAAAT,CAAA,CAAAC,CAAA,IAAAC,CAAA,EAAAF,CAAA;AAAA,SAAAG,eAAAD,CAAA,QAAAQ,CAAA,GAAAC,YAAA,CAAAT,CAAA,uCAAAQ,CAAA,GAAAA,CAAA,GAAAA,CAAA;AAAA,SAAAC,aAAAT,CAAA,EAAAD,CAAA,2BAAAC,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAF,CAAA,GAAAE,CAAA,CAAAU,MAAA,CAAAC,WAAA,kBAAAb,CAAA,QAAAU,CAAA,GAAAV,CAAA,CAAAc,IAAA,CAAAZ,CAAA,EAAAD,CAAA,uCAAAS,CAAA,SAAAA,CAAA,YAAAK,SAAA,yEAAAd,CAAA,GAAAe,MAAA,GAAAC,MAAA,EAAAf,CAAA;AAAA,IASxDgB,WAAW,GAAAC,OAAA,CAAAD,WAAA,0BAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;AAUhB,MAAME,wBAAwB,GAAAD,OAAA,CAAAC,wBAAA,GAAG,CAAC,aAAa,CAAU;AAEhE,SAASC,qBAAqBA,CAC5BC,OAA4D,EAC5DC,QAA8D,EAC9D;EACA,SAAS;;EACT,IAAIC,aAA6C;EACjD,IAAID,QAAQ,KAAKE,SAAS,EAAE;IAC1BD,aAAa,GAAG;MACdE,OAAO,EAAEJ,OAAO,CAACK,CAAC;MAClBC,OAAO,EAAEN,OAAO,CAACO;IACnB,CAAC;EACH,CAAC,MAAM;IACLL,aAAa,GAAG;MACdE,OAAO,EAAEJ,OAAO,CAACK,CAAC,GAAGJ,QAAQ,CAACI,CAAC;MAC/BC,OAAO,EAAEN,OAAO,CAACO,CAAC,GAAGN,QAAQ,CAACM;IAChC,CAAC;EACH;EAEA,OAAO;IAAE,GAAGP,OAAO;IAAE,GAAGE;EAAc,CAAC;AACzC;AAEO,MAAMM,YAAY,SAASC,6BAAoB,CAGpD;EAGAC,WAAWA,CAAA,EAAG;IACZ,KAAK,CAAC,CAAC;IAACjC,eAAA,iBAH8C,CAAC,CAAC;IAKxD,IAAI,CAACkC,WAAW,GAAG,qBAAqB;EAC1C;;EAEA;AACF;AACA;AACA;EACEC,MAAMA,CAACA,MAAmB,EAAE;IAC1B,IAAI,CAACC,MAAM,CAACC,WAAW,GAAGF,MAAM;IAChC,OAAO,IAAI;EACb;EAEAG,QAAQA,CACNC,QAIS,EACT;IACA;IACA,IAAI,CAACC,QAAQ,CAAClB,qBAAqB,GAAGA,qBAAqB;IAC3D,OAAO,KAAK,CAACgB,QAAQ,CAACC,QAAQ,CAAC;EACjC;AACF;AAACnB,OAAA,CAAAW,YAAA,GAAAA,YAAA","ignoreList":[]}
|
@@ -4,54 +4,46 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.LongPressGesture = void 0;
|
7
|
-
|
8
7
|
var _gesture = require("./gesture");
|
9
|
-
|
10
|
-
function
|
11
|
-
|
8
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
9
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
10
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
12
11
|
class LongPressGesture extends _gesture.BaseGesture {
|
13
12
|
constructor() {
|
14
13
|
super();
|
15
|
-
|
16
14
|
_defineProperty(this, "config", {});
|
17
|
-
|
18
15
|
this.handlerName = 'LongPressGestureHandler';
|
19
16
|
this.shouldCancelWhenOutside(true);
|
20
17
|
}
|
18
|
+
|
21
19
|
/**
|
22
20
|
* Minimum time, expressed in milliseconds, that a finger must remain pressed on the corresponding view.
|
23
21
|
* The default value is 500.
|
24
22
|
* @param duration
|
25
23
|
*/
|
26
|
-
|
27
|
-
|
28
24
|
minDuration(duration) {
|
29
25
|
this.config.minDurationMs = duration;
|
30
26
|
return this;
|
31
27
|
}
|
28
|
+
|
32
29
|
/**
|
33
30
|
* Maximum distance, expressed in points, that defines how far the finger is allowed to travel during a long press gesture.
|
34
31
|
* @param distance
|
35
32
|
* @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/long-press-gesture#maxdistancevalue-number
|
36
33
|
*/
|
37
|
-
|
38
|
-
|
39
34
|
maxDistance(distance) {
|
40
35
|
this.config.maxDist = distance;
|
41
36
|
return this;
|
42
37
|
}
|
38
|
+
|
43
39
|
/**
|
44
40
|
* Determine exact number of points required to handle the long press gesture.
|
45
41
|
* @param pointers
|
46
42
|
*/
|
47
|
-
|
48
|
-
|
49
43
|
numberOfPointers(pointers) {
|
50
44
|
this.config.numberOfPointers = pointers;
|
51
45
|
return this;
|
52
46
|
}
|
53
|
-
|
54
47
|
}
|
55
|
-
|
56
48
|
exports.LongPressGesture = LongPressGesture;
|
57
49
|
//# sourceMappingURL=longPressGesture.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["_gesture","require","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","LongPressGesture","BaseGesture","constructor","handlerName","shouldCancelWhenOutside","minDuration","duration","config","minDurationMs","maxDistance","distance","maxDist","numberOfPointers","pointers","exports"],"sources":["longPressGesture.ts"],"sourcesContent":["import { BaseGesture, BaseGestureConfig } from './gesture';\nimport { LongPressGestureConfig } from '../LongPressGestureHandler';\nimport type { LongPressGestureHandlerEventPayload } from '../GestureHandlerEventPayload';\n\nexport class LongPressGesture extends BaseGesture<LongPressGestureHandlerEventPayload> {\n public config: BaseGestureConfig & LongPressGestureConfig = {};\n\n constructor() {\n super();\n\n this.handlerName = 'LongPressGestureHandler';\n this.shouldCancelWhenOutside(true);\n }\n\n /**\n * Minimum time, expressed in milliseconds, that a finger must remain pressed on the corresponding view.\n * The default value is 500.\n * @param duration\n */\n minDuration(duration: number) {\n this.config.minDurationMs = duration;\n return this;\n }\n\n /**\n * Maximum distance, expressed in points, that defines how far the finger is allowed to travel during a long press gesture.\n * @param distance\n * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/long-press-gesture#maxdistancevalue-number\n */\n maxDistance(distance: number) {\n this.config.maxDist = distance;\n return this;\n }\n\n /**\n * Determine exact number of points required to handle the long press gesture.\n * @param pointers\n */\n numberOfPointers(pointers: number) {\n this.config.numberOfPointers = pointers;\n return this;\n }\n}\n\nexport type LongPressGestureType = InstanceType<typeof LongPressGesture>;\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAA2D,SAAAC,gBAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAD,CAAA,GAAAI,MAAA,CAAAC,cAAA,CAAAL,CAAA,EAAAC,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EAAAK,UAAA,MAAAC,YAAA,MAAAC,QAAA,UAAAT,CAAA,CAAAC,CAAA,IAAAC,CAAA,EAAAF,CAAA;AAAA,SAAAG,eAAAD,CAAA,QAAAQ,CAAA,GAAAC,YAAA,CAAAT,CAAA,uCAAAQ,CAAA,GAAAA,CAAA,GAAAA,CAAA;AAAA,SAAAC,aAAAT,CAAA,EAAAD,CAAA,2BAAAC,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAF,CAAA,GAAAE,CAAA,CAAAU,MAAA,CAAAC,WAAA,kBAAAb,CAAA,QAAAU,CAAA,GAAAV,CAAA,CAAAc,IAAA,CAAAZ,CAAA,EAAAD,CAAA,uCAAAS,CAAA,SAAAA,CAAA,YAAAK,SAAA,yEAAAd,CAAA,GAAAe,MAAA,GAAAC,MAAA,EAAAf,CAAA;AAIpD,MAAMgB,gBAAgB,SAASC,oBAAW,CAAsC;EAGrFC,WAAWA,CAAA,EAAG;IACZ,KAAK,CAAC,CAAC;IAACrB,eAAA,iBAHkD,CAAC,CAAC;IAK5D,IAAI,CAACsB,WAAW,GAAG,yBAAyB;IAC5C,IAAI,CAACC,uBAAuB,CAAC,IAAI,CAAC;EACpC;;EAEA;AACF;AACA;AACA;AACA;EACEC,WAAWA,CAACC,QAAgB,EAAE;IAC5B,IAAI,CAACC,MAAM,CAACC,aAAa,GAAGF,QAAQ;IACpC,OAAO,IAAI;EACb;;EAEA;AACF;AACA;AACA;AACA;EACEG,WAAWA,CAACC,QAAgB,EAAE;IAC5B,IAAI,CAACH,MAAM,CAACI,OAAO,GAAGD,QAAQ;IAC9B,OAAO,IAAI;EACb;;EAEA;AACF;AACA;AACA;EACEE,gBAAgBA,CAACC,QAAgB,EAAE;IACjC,IAAI,CAACN,MAAM,CAACK,gBAAgB,GAAGC,QAAQ;IACvC,OAAO,IAAI;EACb;AACF;AAACC,OAAA,CAAAd,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
@@ -4,28 +4,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.ManualGesture = void 0;
|
7
|
-
|
8
7
|
var _gesture = require("./gesture");
|
9
|
-
|
10
8
|
function changeEventCalculator(current, _previous) {
|
11
9
|
'worklet';
|
12
10
|
|
13
11
|
return current;
|
14
12
|
}
|
15
|
-
|
16
13
|
class ManualGesture extends _gesture.ContinousBaseGesture {
|
17
14
|
constructor() {
|
18
15
|
super();
|
19
16
|
this.handlerName = 'ManualGestureHandler';
|
20
17
|
}
|
21
|
-
|
22
18
|
onChange(callback) {
|
23
19
|
// @ts-ignore TS being overprotective, Record<string, never> is Record
|
24
20
|
this.handlers.changeEventCalculator = changeEventCalculator;
|
25
21
|
return super.onChange(callback);
|
26
22
|
}
|
27
|
-
|
28
23
|
}
|
29
|
-
|
30
24
|
exports.ManualGesture = ManualGesture;
|
31
25
|
//# sourceMappingURL=manualGesture.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["_gesture","require","changeEventCalculator","current","_previous","ManualGesture","ContinousBaseGesture","constructor","handlerName","onChange","callback","handlers","exports"],"sources":["manualGesture.ts"],"sourcesContent":["import { GestureUpdateEvent } from '../gestureHandlerCommon';\nimport { ContinousBaseGesture } from './gesture';\n\nfunction changeEventCalculator(\n current: GestureUpdateEvent<Record<string, never>>,\n _previous?: GestureUpdateEvent<Record<string, never>>\n) {\n 'worklet';\n return current;\n}\n\nexport class ManualGesture extends ContinousBaseGesture<\n Record<string, never>,\n Record<string, never>\n> {\n constructor() {\n super();\n\n this.handlerName = 'ManualGestureHandler';\n }\n\n onChange(\n callback: (event: GestureUpdateEvent<Record<string, never>>) => void\n ) {\n // @ts-ignore TS being overprotective, Record<string, never> is Record\n this.handlers.changeEventCalculator = changeEventCalculator;\n return super.onChange(callback);\n }\n}\n\nexport type ManualGestureType = InstanceType<typeof ManualGesture>;\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AAEA,SAASC,qBAAqBA,CAC5BC,OAAkD,EAClDC,SAAqD,EACrD;EACA,SAAS;;EACT,OAAOD,OAAO;AAChB;AAEO,MAAME,aAAa,SAASC,6BAAoB,CAGrD;EACAC,WAAWA,CAAA,EAAG;IACZ,KAAK,CAAC,CAAC;IAEP,IAAI,CAACC,WAAW,GAAG,sBAAsB;EAC3C;EAEAC,QAAQA,CACNC,QAAoE,EACpE;IACA;IACA,IAAI,CAACC,QAAQ,CAACT,qBAAqB,GAAGA,qBAAqB;IAC3D,OAAO,KAAK,CAACO,QAAQ,CAACC,QAAQ,CAAC;EACjC;AACF;AAACE,OAAA,CAAAP,aAAA,GAAAA,aAAA","ignoreList":[]}
|
@@ -4,41 +4,34 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.NativeGesture = void 0;
|
7
|
-
|
8
7
|
var _gesture = require("./gesture");
|
9
|
-
|
10
|
-
function
|
11
|
-
|
8
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
9
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
10
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
12
11
|
class NativeGesture extends _gesture.BaseGesture {
|
13
12
|
constructor() {
|
14
13
|
super();
|
15
|
-
|
16
14
|
_defineProperty(this, "config", {});
|
17
|
-
|
18
15
|
this.handlerName = 'NativeViewGestureHandler';
|
19
16
|
}
|
17
|
+
|
20
18
|
/**
|
21
19
|
* When true, underlying handler will activate unconditionally when in `BEGAN` or `UNDETERMINED` state.
|
22
20
|
* @param value
|
23
21
|
*/
|
24
|
-
|
25
|
-
|
26
22
|
shouldActivateOnStart(value) {
|
27
23
|
this.config.shouldActivateOnStart = value;
|
28
24
|
return this;
|
29
25
|
}
|
26
|
+
|
30
27
|
/**
|
31
28
|
* When true, cancels all other gesture handlers when this `NativeViewGestureHandler` receives an `ACTIVE` state event.
|
32
29
|
* @param value
|
33
30
|
*/
|
34
|
-
|
35
|
-
|
36
31
|
disallowInterruption(value) {
|
37
32
|
this.config.disallowInterruption = value;
|
38
33
|
return this;
|
39
34
|
}
|
40
|
-
|
41
35
|
}
|
42
|
-
|
43
36
|
exports.NativeGesture = NativeGesture;
|
44
37
|
//# sourceMappingURL=nativeGesture.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["_gesture","require","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","NativeGesture","BaseGesture","constructor","handlerName","shouldActivateOnStart","config","disallowInterruption","exports"],"sources":["nativeGesture.ts"],"sourcesContent":["import { BaseGestureConfig, BaseGesture } from './gesture';\nimport { NativeViewGestureConfig } from '../NativeViewGestureHandler';\nimport type { NativeViewGestureHandlerPayload } from '../GestureHandlerEventPayload';\n\nexport class NativeGesture extends BaseGesture<NativeViewGestureHandlerPayload> {\n public config: BaseGestureConfig & NativeViewGestureConfig = {};\n\n constructor() {\n super();\n\n this.handlerName = 'NativeViewGestureHandler';\n }\n\n /**\n * When true, underlying handler will activate unconditionally when in `BEGAN` or `UNDETERMINED` state.\n * @param value\n */\n shouldActivateOnStart(value: boolean) {\n this.config.shouldActivateOnStart = value;\n return this;\n }\n\n /**\n * When true, cancels all other gesture handlers when this `NativeViewGestureHandler` receives an `ACTIVE` state event.\n * @param value\n */\n disallowInterruption(value: boolean) {\n this.config.disallowInterruption = value;\n return this;\n }\n}\n\nexport type NativeGestureType = InstanceType<typeof NativeGesture>;\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAA2D,SAAAC,gBAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAD,CAAA,GAAAI,MAAA,CAAAC,cAAA,CAAAL,CAAA,EAAAC,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EAAAK,UAAA,MAAAC,YAAA,MAAAC,QAAA,UAAAT,CAAA,CAAAC,CAAA,IAAAC,CAAA,EAAAF,CAAA;AAAA,SAAAG,eAAAD,CAAA,QAAAQ,CAAA,GAAAC,YAAA,CAAAT,CAAA,uCAAAQ,CAAA,GAAAA,CAAA,GAAAA,CAAA;AAAA,SAAAC,aAAAT,CAAA,EAAAD,CAAA,2BAAAC,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAF,CAAA,GAAAE,CAAA,CAAAU,MAAA,CAAAC,WAAA,kBAAAb,CAAA,QAAAU,CAAA,GAAAV,CAAA,CAAAc,IAAA,CAAAZ,CAAA,EAAAD,CAAA,uCAAAS,CAAA,SAAAA,CAAA,YAAAK,SAAA,yEAAAd,CAAA,GAAAe,MAAA,GAAAC,MAAA,EAAAf,CAAA;AAIpD,MAAMgB,aAAa,SAASC,oBAAW,CAAkC;EAG9EC,WAAWA,CAAA,EAAG;IACZ,KAAK,CAAC,CAAC;IAACrB,eAAA,iBAHmD,CAAC,CAAC;IAK7D,IAAI,CAACsB,WAAW,GAAG,0BAA0B;EAC/C;;EAEA;AACF;AACA;AACA;EACEC,qBAAqBA,CAAChB,KAAc,EAAE;IACpC,IAAI,CAACiB,MAAM,CAACD,qBAAqB,GAAGhB,KAAK;IACzC,OAAO,IAAI;EACb;;EAEA;AACF;AACA;AACA;EACEkB,oBAAoBA,CAAClB,KAAc,EAAE;IACnC,IAAI,CAACiB,MAAM,CAACC,oBAAoB,GAAGlB,KAAK;IACxC,OAAO,IAAI;EACb;AACF;AAACmB,OAAA,CAAAP,aAAA,GAAAA,aAAA","ignoreList":[]}
|