react-native-gesture-handler 2.22.1 → 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 +61 -59
- 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 +17 -27
- 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 +57 -44
- 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 +12 -17
- 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 +97 -66
- 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/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
package/lib/module/mocks.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["React","TouchableHighlight","TouchableNativeFeedback","TouchableOpacity","TouchableWithoutFeedback","ScrollView","FlatList","Switch","TextInput","DrawerLayoutAndroid","View","State","Directions","NOOP","PanGestureHandler","attachGestureHandler","createGestureHandler","dropGestureHandler","updateGestureHandler","flushOperations","install","NativeViewGestureHandler","TapGestureHandler","ForceTouchGestureHandler","LongPressGestureHandler","PinchGestureHandler","RotationGestureHandler","FlingGestureHandler","RawButton","enabled","rest","createElement","_extends","disabled","BaseButton","RectButton","BorderlessButton"],"sources":["mocks.tsx"],"sourcesContent":["import React from 'react';\nimport {\n TouchableHighlight,\n TouchableNativeFeedback,\n TouchableOpacity,\n TouchableWithoutFeedback,\n ScrollView,\n FlatList,\n Switch,\n TextInput,\n DrawerLayoutAndroid,\n View,\n} from 'react-native';\nimport { State } from './State';\nimport { Directions } from './Directions';\n\nconst NOOP = () => {\n // Do nothing\n};\nconst PanGestureHandler = View;\nconst attachGestureHandler = NOOP;\nconst createGestureHandler = NOOP;\nconst dropGestureHandler = NOOP;\nconst updateGestureHandler = NOOP;\nconst flushOperations = NOOP;\nconst install = NOOP;\nconst NativeViewGestureHandler = View;\nconst TapGestureHandler = View;\nconst ForceTouchGestureHandler = View;\nconst LongPressGestureHandler = View;\nconst PinchGestureHandler = View;\nconst RotationGestureHandler = View;\nconst FlingGestureHandler = View;\nconst RawButton = ({ enabled, ...rest }: any) => (\n <TouchableNativeFeedback disabled={!enabled} {...rest}>\n <View />\n </TouchableNativeFeedback>\n);\nconst BaseButton = RawButton;\nconst RectButton = RawButton;\nconst BorderlessButton = TouchableNativeFeedback;\n\nexport default {\n TouchableHighlight,\n TouchableNativeFeedback,\n TouchableOpacity,\n TouchableWithoutFeedback,\n ScrollView,\n FlatList,\n Switch,\n TextInput,\n DrawerLayoutAndroid,\n NativeViewGestureHandler,\n TapGestureHandler,\n ForceTouchGestureHandler,\n LongPressGestureHandler,\n PinchGestureHandler,\n RotationGestureHandler,\n FlingGestureHandler,\n RawButton,\n BaseButton,\n RectButton,\n BorderlessButton,\n PanGestureHandler,\n attachGestureHandler,\n createGestureHandler,\n dropGestureHandler,\n updateGestureHandler,\n flushOperations,\n install,\n // Probably can be removed\n Directions,\n State,\n} as const;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,kBAAkB,EAClBC,uBAAuB,EACvBC,gBAAgB,EAChBC,wBAAwB,EACxBC,UAAU,EACVC,QAAQ,EACRC,MAAM,EACNC,SAAS,EACTC,mBAAmB,EACnBC,IAAI,QACC,cAAc;AACrB,SAASC,KAAK,QAAQ,SAAS;AAC/B,SAASC,UAAU,QAAQ,cA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,oBAAoB;EACpBC,oBAAoB;EACpBC,kBAAkB;EAClBC,oBAAoB;EACpBC,eAAe;EACfC,OAAO;EACP;EACAR,UAAU;EACVD;AACF,CAAC","ignoreList":[]}
|
@@ -1,5 +1,6 @@
|
|
1
|
-
function _defineProperty(
|
2
|
-
|
1
|
+
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; }
|
2
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
3
|
+
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); }
|
3
4
|
// eslint-disable-next-line @typescript-eslint/no-extraneous-class
|
4
5
|
export class MountRegistry {
|
5
6
|
static addMountListener(listener) {
|
@@ -8,33 +9,25 @@ export class MountRegistry {
|
|
8
9
|
this.mountListeners.delete(listener);
|
9
10
|
};
|
10
11
|
}
|
11
|
-
|
12
12
|
static addUnmountListener(listener) {
|
13
13
|
this.unmountListeners.add(listener);
|
14
14
|
return () => {
|
15
15
|
this.unmountListeners.delete(listener);
|
16
16
|
};
|
17
17
|
}
|
18
|
-
|
19
18
|
static gestureHandlerWillMount(handler) {
|
20
19
|
this.mountListeners.forEach(listener => listener(handler));
|
21
20
|
}
|
22
|
-
|
23
21
|
static gestureHandlerWillUnmount(handler) {
|
24
22
|
this.unmountListeners.forEach(listener => listener(handler));
|
25
23
|
}
|
26
|
-
|
27
24
|
static gestureWillMount(gesture) {
|
28
25
|
this.mountListeners.forEach(listener => listener(gesture));
|
29
26
|
}
|
30
|
-
|
31
27
|
static gestureWillUnmount(gesture) {
|
32
28
|
this.unmountListeners.forEach(listener => listener(gesture));
|
33
29
|
}
|
34
|
-
|
35
30
|
}
|
36
|
-
|
37
31
|
_defineProperty(MountRegistry, "mountListeners", new Set());
|
38
|
-
|
39
32
|
_defineProperty(MountRegistry, "unmountListeners", new Set());
|
40
33
|
//# sourceMappingURL=mountRegistry.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["MountRegistry","addMountListener","listener","mountListeners","add","delete","addUnmountListener","unmountListeners","gestureHandlerWillMount","handler","forEach","gestureHandlerWillUnmount","gestureWillMount","gesture","gestureWillUnmount","_defineProperty","Set"],"sources":["mountRegistry.ts"],"sourcesContent":["import { GestureType } from './handlers/gestures/gesture';\n\ninterface ReactComponentWithHandlerTag extends React.Component {\n handlerTag: number;\n}\n\nexport type GestureMountListener = (\n gesture: GestureType | ReactComponentWithHandlerTag\n) => void;\n\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\nexport class MountRegistry {\n private static mountListeners = new Set<GestureMountListener>();\n private static unmountListeners = new Set<GestureMountListener>();\n\n static addMountListener(listener: GestureMountListener): () => void {\n this.mountListeners.add(listener);\n\n return () => {\n this.mountListeners.delete(listener);\n };\n }\n\n static addUnmountListener(listener: GestureMountListener): () => void {\n this.unmountListeners.add(listener);\n\n return () => {\n this.unmountListeners.delete(listener);\n };\n }\n\n static gestureHandlerWillMount(handler: React.Component) {\n this.mountListeners.forEach((listener) =>\n listener(handler as ReactComponentWithHandlerTag)\n );\n }\n\n static gestureHandlerWillUnmount(handler: React.Component) {\n this.unmountListeners.forEach((listener) =>\n listener(handler as ReactComponentWithHandlerTag)\n );\n }\n\n static gestureWillMount(gesture: GestureType) {\n this.mountListeners.forEach((listener) => listener(gesture));\n }\n\n static gestureWillUnmount(gesture: GestureType) {\n this.unmountListeners.forEach((listener) => listener(gesture));\n }\n}\n"],"mappings":";;;AAUA;AACA,OAAO,MAAMA,aAAa,CAAC;EAIzB,OAAOC,gBAAgBA,CAACC,QAA8B,EAAc;IAClE,IAAI,CAACC,cAAc,CAACC,GAAG,CAACF,QAAQ,CAAC;IAEjC,OAAO,MAAM;MACX,IAAI,CAACC,cAAc,CAACE,MAAM,CAACH,QAAQ,CAAC;IACtC,CAAC;EACH;EAEA,OAAOI,kBAAkBA,CAACJ,QAA8B,EAAc;IACpE,IAAI,CAACK,gBAAgB,CAACH,GAAG,CAACF,QAAQ,CAAC;IAEnC,OAAO,MAAM;MACX,IAAI,CAACK,gBAAgB,CAACF,MAAM,CAACH,QAAQ,CAAC;IACxC,CAAC;EACH;EAEA,OAAOM,uBAAuBA,CAACC,OAAwB,EAAE;IACvD,IAAI,CAACN,cAAc,CAACO,OAAO,CAAER,QAAQ,IACnCA,QAAQ,CAACO,OAAuC,CAClD,CAAC;EACH;EAEA,OAAOE,yBAAyBA,CAACF,OAAwB,EAAE;IACzD,IAAI,CAACF,gBAAgB,CAACG,OAAO,CAAER,QAAQ,IACrCA,QAAQ,CAACO,OAAuC,CAClD,CAAC;EACH;EAEA,OAAOG,gBAAgBA,CAACC,OAAoB,EAAE;IAC5C,IAAI,CAACV,cAAc,CAACO,OAAO,CAAER,QAAQ,IAAKA,QAAQ,CAACW,OAAO,CAAC,CAAC;EAC9D;EAEA,OAAOC,kBAAkBA,CAACD,OAAoB,EAAE;IAC9C,IAAI,CAACN,gBAAgB,CAACG,OAAO,CAAER,QAAQ,IAAKA,QAAQ,CAACW,OAAO,CAAC,CAAC;EAChE;AACF;AAACE,eAAA,CAvCYf,aAAa,oBACQ,IAAIgB,GAAG,CAAuB,CAAC;AAAAD,eAAA,CADpDf,aAAa,sBAEU,IAAIgB,GAAG,CAAuB,CAAC","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sources":["NativeRNGestureHandlerModule.ts"],"sourcesContent":["import { TurboModuleRegistry, TurboModule } from 'react-native';\nimport { Double } from 'react-native/Libraries/Types/CodegenTypes';\n\nexport interface Spec extends TurboModule {\n handleSetJSResponder: (tag: Double, blockNativeResponder: boolean) => void;\n handleClearJSResponder: () => void;\n createGestureHandler: (\n handlerName: string,\n handlerTag: Double,\n // Record<> is not supported by codegen\n // eslint-disable-next-line @typescript-eslint/ban-types\n config: Object\n ) => void;\n attachGestureHandler: (\n handlerTag: Double,\n newView: Double,\n actionType: Double\n ) => void;\n // eslint-disable-next-line @typescript-eslint/ban-types\n updateGestureHandler: (handlerTag: Double, newConfig: Object) => void;\n dropGestureHandler: (handlerTag: Double) => void;\n install: () => boolean;\n flushOperations: () => void;\n}\n\nexport default TurboModuleRegistry.getEnforcing<Spec>('RNGestureHandlerModule');\n"],"mappings":"AAAA,SAASA,mBAAmB,QAAqB,cAAc;AAyB/D,eAAeA,mBAAmB,CAACC,YAAY,CAAO,wBAAwB,CAAC","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["codegenNativeComponent"],"sources":["RNGestureHandlerButtonNativeComponent.ts"],"sourcesContent":["import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type {\n Int32,\n WithDefault,\n Float,\n} from 'react-native/Libraries/Types/CodegenTypes';\nimport type { ViewProps, ColorValue } from 'react-native';\n\ninterface NativeProps extends ViewProps {\n exclusive?: WithDefault<boolean, true>;\n foreground?: boolean;\n borderless?: boolean;\n enabled?: WithDefault<boolean, true>;\n rippleColor?: ColorValue;\n rippleRadius?: Int32;\n touchSoundDisabled?: WithDefault<boolean, false>;\n borderWidth?: Float;\n borderColor?: ColorValue;\n borderStyle?: WithDefault<string, 'solid'>;\n}\n\nexport default codegenNativeComponent<NativeProps>('RNGestureHandlerButton');\n"],"mappings":"AAAA,OAAOA,sBAAsB,MAAM,yDAAyD;AAqB5F,eAAeA,sBAAsB,CAAc,wBAAwB,CAAC","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["codegenNativeComponent"],"sources":["RNGestureHandlerRootViewNativeComponent.ts"],"sourcesContent":["import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps } from 'react-native';\n\ninterface NativeProps extends ViewProps {}\n\nexport default codegenNativeComponent<NativeProps>('RNGestureHandlerRootView');\n"],"mappings":"AAAA,OAAOA,sBAAsB,MAAM,yDAAyD;AAK5F,eAAeA,sBAAsB,CAAc,0BAA0B,CAAC","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":[],"
|
1
|
+
{"version":3,"names":[],"sources":["typeUtils.ts"],"sourcesContent":["export type ValueOf<T> = T[keyof T];\n"],"mappings":"","ignoreList":[]}
|
package/lib/module/utils.js
CHANGED
@@ -2,7 +2,6 @@ export function toArray(object) {
|
|
2
2
|
if (!Array.isArray(object)) {
|
3
3
|
return [object];
|
4
4
|
}
|
5
|
-
|
6
5
|
return object;
|
7
6
|
}
|
8
7
|
export function withPrevAndCurrent(array, mapFn) {
|
@@ -19,23 +18,24 @@ export function withPrevAndCurrent(array, mapFn) {
|
|
19
18
|
transformedArr.push(transformed);
|
20
19
|
});
|
21
20
|
return transformedArr;
|
22
|
-
}
|
21
|
+
}
|
23
22
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
24
24
|
export function hasProperty(object, key) {
|
25
25
|
return Object.prototype.hasOwnProperty.call(object, key);
|
26
26
|
}
|
27
|
-
export function
|
27
|
+
export function isTestEnv() {
|
28
28
|
// @ts-ignore Do not use `@types/node` because it will prioritise Node types over RN types which breaks the types (ex. setTimeout) in React Native projects.
|
29
|
-
return hasProperty(global, 'process') &&
|
29
|
+
return hasProperty(global, 'process') && process.env.NODE_ENV === 'test';
|
30
30
|
}
|
31
31
|
export function tagMessage(msg) {
|
32
32
|
return `[react-native-gesture-handler] ${msg}`;
|
33
|
-
}
|
34
|
-
// may not be initialized before the first render
|
33
|
+
}
|
35
34
|
|
35
|
+
// Helper method to check whether Fabric is enabled, however global.nativeFabricUIManager
|
36
|
+
// may not be initialized before the first render
|
36
37
|
export function isFabric() {
|
37
38
|
var _global;
|
38
|
-
|
39
39
|
// @ts-expect-error nativeFabricUIManager is not yet included in the RN types
|
40
40
|
return !!((_global = global) !== null && _global !== void 0 && _global.nativeFabricUIManager);
|
41
41
|
}
|
@@ -45,6 +45,7 @@ export function isRemoteDebuggingEnabled() {
|
|
45
45
|
const localGlobal = global;
|
46
46
|
return (!localGlobal.nativeCallSyncHook || !!localGlobal.__REMOTEDEV__) && !localGlobal.RN$Bridgeless;
|
47
47
|
}
|
48
|
+
|
48
49
|
/**
|
49
50
|
* Recursively compares two objects for deep equality.
|
50
51
|
*
|
@@ -54,29 +55,23 @@ export function isRemoteDebuggingEnabled() {
|
|
54
55
|
* @param obj2 - The second object to compare.
|
55
56
|
* @returns `true` if the objects are deeply equal, `false` otherwise.
|
56
57
|
*/
|
57
|
-
|
58
58
|
export function deepEqual(obj1, obj2) {
|
59
59
|
if (obj1 === obj2) {
|
60
60
|
return true;
|
61
61
|
}
|
62
|
-
|
63
62
|
if (typeof obj1 !== 'object' || typeof obj2 !== 'object' || obj1 === null || obj2 === null) {
|
64
63
|
return false;
|
65
64
|
}
|
66
|
-
|
67
65
|
const keys1 = Object.keys(obj1);
|
68
66
|
const keys2 = Object.keys(obj2);
|
69
|
-
|
70
67
|
if (keys1.length !== keys2.length) {
|
71
68
|
return false;
|
72
69
|
}
|
73
|
-
|
74
70
|
for (const key of keys1) {
|
75
71
|
if (!keys2.includes(key) || !deepEqual(obj1[key], obj2[key])) {
|
76
72
|
return false;
|
77
73
|
}
|
78
74
|
}
|
79
|
-
|
80
75
|
return true;
|
81
76
|
}
|
82
77
|
export const INT32_MAX = 2 ** 31 - 1;
|
package/lib/module/utils.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["toArray","object","Array","isArray","withPrevAndCurrent","array","mapFn","previousArr","currentArr","transformedArr","forEach","current","i","previous","transformed","push","hasProperty","key","Object","prototype","hasOwnProperty","call","isTestEnv","global","process","env","NODE_ENV","tagMessage","msg","isFabric","_global","nativeFabricUIManager","isRemoteDebuggingEnabled","localGlobal","nativeCallSyncHook","__REMOTEDEV__","RN$Bridgeless","deepEqual","obj1","obj2","keys1","keys","keys2","length","includes","INT32_MAX"],"sources":["utils.ts"],"sourcesContent":["export function toArray<T>(object: T | T[]): T[] {\n if (!Array.isArray(object)) {\n return [object];\n }\n\n return object;\n}\n\nexport type withPrevAndCurrentMapFn<T, Transformed> = (\n previous: Transformed | null,\n current: T\n) => Transformed;\nexport function withPrevAndCurrent<T, Transformed>(\n array: T[],\n mapFn: withPrevAndCurrentMapFn<T, Transformed>\n): Transformed[] {\n const previousArr: (null | Transformed)[] = [null];\n const currentArr = [...array];\n const transformedArr: Transformed[] = [];\n currentArr.forEach((current, i) => {\n // This type cast is fine and solves problem mentioned in https://github.com/software-mansion/react-native-gesture-handler/pull/2867 (namely that `previous` can be undefined).\n // Unfortunately, linter on our CI does not allow this type of casting as it is unnecessary. To bypass that we use eslint-disable.\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n const previous = previousArr[i] as Transformed | null;\n const transformed = mapFn(previous, current);\n previousArr.push(transformed);\n transformedArr.push(transformed);\n });\n return transformedArr;\n}\n\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function hasProperty(object: object, key: string) {\n return Object.prototype.hasOwnProperty.call(object, key);\n}\n\nexport function isTestEnv(): boolean {\n // @ts-ignore Do not use `@types/node` because it will prioritise Node types over RN types which breaks the types (ex. setTimeout) in React Native projects.\n return hasProperty(global, 'process') && process.env.NODE_ENV === 'test';\n}\n\nexport function tagMessage(msg: string) {\n return `[react-native-gesture-handler] ${msg}`;\n}\n\n// Helper method to check whether Fabric is enabled, however global.nativeFabricUIManager\n// may not be initialized before the first render\nexport function isFabric(): boolean {\n // @ts-expect-error nativeFabricUIManager is not yet included in the RN types\n return !!global?.nativeFabricUIManager;\n}\n\nexport function isRemoteDebuggingEnabled(): boolean {\n // react-native-reanimated checks if in remote debugging in the same way\n // @ts-ignore global is available but node types are not included\n const localGlobal = global as any;\n return (\n (!localGlobal.nativeCallSyncHook || !!localGlobal.__REMOTEDEV__) &&\n !localGlobal.RN$Bridgeless\n );\n}\n\n/**\n * Recursively compares two objects for deep equality.\n *\n * **Note:** This function does not support cyclic references.\n *\n * @param obj1 - The first object to compare.\n * @param obj2 - The second object to compare.\n * @returns `true` if the objects are deeply equal, `false` otherwise.\n */\nexport function deepEqual(obj1: any, obj2: any) {\n if (obj1 === obj2) {\n return true;\n }\n\n if (\n typeof obj1 !== 'object' ||\n typeof obj2 !== 'object' ||\n obj1 === null ||\n obj2 === null\n ) {\n return false;\n }\n\n const keys1 = Object.keys(obj1);\n const keys2 = Object.keys(obj2);\n\n if (keys1.length !== keys2.length) {\n return false;\n }\n\n for (const key of keys1) {\n if (!keys2.includes(key) || !deepEqual(obj1[key], obj2[key])) {\n return false;\n }\n }\n\n return true;\n}\n\nexport const INT32_MAX = 2 ** 31 - 1;\n"],"mappings":"AAAA,OAAO,SAASA,OAAOA,CAAIC,MAAe,EAAO;EAC/C,IAAI,CAACC,KAAK,CAACC,OAAO,CAACF,MAAM,CAAC,EAAE;IAC1B,OAAO,CAACA,MAAM,CAAC;EACjB;EAEA,OAAOA,MAAM;AACf;AAMA,OAAO,SAASG,kBAAkBA,CAChCC,KAAU,EACVC,KAA8C,EAC/B;EACf,MAAMC,WAAmC,GAAG,CAAC,IAAI,CAAC;EAClD,MAAMC,UAAU,GAAG,CAAC,GAAGH,KAAK,CAAC;EAC7B,MAAMI,cAA6B,GAAG,EAAE;EACxCD,UAAU,CAACE,OAAO,CAAC,CAACC,OAAO,EAAEC,CAAC,KAAK;IACjC;IACA;IACA;IACA,MAAMC,QAAQ,GAAGN,WAAW,CAACK,CAAC,CAAuB;IACrD,MAAME,WAAW,GAAGR,KAAK,CAACO,QAAQ,EAAEF,OAAO,CAAC;IAC5CJ,WAAW,CAACQ,IAAI,CAACD,WAAW,CAAC;IAC7BL,cAAc,CAACM,IAAI,C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AACF,IAAI,CAAC;EAE/B,IAAIC,KAAK,CAACG,MAAM,KAAKD,KAAK,CAACC,MAAM,EAAE;IACjC,OAAO,KAAK;EACd;EAEA,KAAK,MAAM1B,GAAG,IAAIuB,KAAK,EAAE;IACvB,IAAI,CAACE,KAAK,CAACE,QAAQ,CAAC3B,GAAG,CAAC,IAAI,CAACoB,SAAS,CAACC,IAAI,CAACrB,GAAG,CAAC,EAAEsB,IAAI,CAACtB,GAAG,CAAC,CAAC,EAAE;MAC5D,OAAO,KAAK;IACd;EACF;EAEA,OAAO,IAAI;AACb;AAEA,OAAO,MAAM4B,SAAS,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC","ignoreList":[]}
|
@@ -7,8 +7,9 @@ import RotationGestureHandler from './handlers/RotationGestureHandler';
|
|
7
7
|
import FlingGestureHandler from './handlers/FlingGestureHandler';
|
8
8
|
import NativeViewGestureHandler from './handlers/NativeViewGestureHandler';
|
9
9
|
import ManualGestureHandler from './handlers/ManualGestureHandler';
|
10
|
-
import HoverGestureHandler from './handlers/HoverGestureHandler';
|
10
|
+
import HoverGestureHandler from './handlers/HoverGestureHandler';
|
11
11
|
|
12
|
+
// Hammer Handlers
|
12
13
|
import HammerNativeViewGestureHandler from '../web_hammer/NativeViewGestureHandler';
|
13
14
|
import HammerPanGestureHandler from '../web_hammer/PanGestureHandler';
|
14
15
|
import HammerTapGestureHandler from '../web_hammer/TapGestureHandler';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["PanGestureHandler","TapGestureHandler","LongPressGestureHandler","PinchGestureHandler","RotationGestureHandler","FlingGestureHandler","NativeViewGestureHandler","ManualGestureHandler","HoverGestureHandler","HammerNativeViewGestureHandler","HammerPanGestureHandler","HammerTapGestureHandler","HammerLongPressGestureHandler","HammerPinchGestureHandler","HammerRotationGestureHandler","HammerFlingGestureHandler","Gestures","HammerGestures"],"sources":["Gestures.ts"],"sourcesContent":["// Gesture Handlers\nimport PanGestureHandler from './handlers/PanGestureHandler';\nimport TapGestureHandler from './handlers/TapGestureHandler';\nimport LongPressGestureHandler from './handlers/LongPressGestureHandler';\nimport PinchGestureHandler from './handlers/PinchGestureHandler';\nimport RotationGestureHandler from './handlers/RotationGestureHandler';\nimport FlingGestureHandler from './handlers/FlingGestureHandler';\nimport NativeViewGestureHandler from './handlers/NativeViewGestureHandler';\nimport ManualGestureHandler from './handlers/ManualGestureHandler';\nimport HoverGestureHandler from './handlers/HoverGestureHandler';\n\n// Hammer Handlers\nimport HammerNativeViewGestureHandler from '../web_hammer/NativeViewGestureHandler';\nimport HammerPanGestureHandler from '../web_hammer/PanGestureHandler';\nimport HammerTapGestureHandler from '../web_hammer/TapGestureHandler';\nimport HammerLongPressGestureHandler from '../web_hammer/LongPressGestureHandler';\nimport HammerPinchGestureHandler from '../web_hammer/PinchGestureHandler';\nimport HammerRotationGestureHandler from '../web_hammer/RotationGestureHandler';\nimport HammerFlingGestureHandler from '../web_hammer/FlingGestureHandler';\n\nexport const Gestures = {\n NativeViewGestureHandler,\n PanGestureHandler,\n TapGestureHandler,\n LongPressGestureHandler,\n PinchGestureHandler,\n RotationGestureHandler,\n FlingGestureHandler,\n ManualGestureHandler,\n HoverGestureHandler,\n};\n\nexport const HammerGestures = {\n NativeViewGestureHandler: HammerNativeViewGestureHandler,\n PanGestureHandler: HammerPanGestureHandler,\n TapGestureHandler: HammerTapGestureHandler,\n LongPressGestureHandler: HammerLongPressGestureHandler,\n PinchGestureHandler: HammerPinchGestureHandler,\n RotationGestureHandler: HammerRotationGestureHandler,\n FlingGestureHandler: HammerFlingGestureHandler,\n};\n"],"mappings":"AAAA;AACA,OAAOA,iBAAiB,MAAM,8BAA8B;AAC5D,OAAOC,iBAAiB,MAAM,8BAA8B;AAC5D,OAAOC,uBAAuB,MAAM,oCAAoC;AACxE,OAAOC,mBAAmB,MAAM,gCAAgC;AAChE,OAAOC,sBAAsB,MAAM,mCAAmC;AACtE,OAAOC,mBAAmB,MAAM,gCAAgC;AAChE,OAAOC,wBAAwB,MAAM,qCAAqC;AAC1E,OAAOC,oBAAoB,MAAM,iCAAiC;AAClE,OAAOC,mBAAmB,MAAM,gCAAgC;;AAEhE;AACA,OAAOC,8BAA8B,MAAM,wCAAwC;AACnF,OAAOC,uBAAuB,MAAM,iCAAiC;AACrE,OAAOC,uBAAuB,MAAM,iCAAiC;AACrE,OAAOC,6BAA6B,MAAM,uCAAuC;AACjF,OAAOC,yBAAyB,MAAM,mCAAmC;AACzE,OAAOC,4BAA4B,MAAM,sCAAsC;AAC/E,OAAOC,yBAAyB,MAAM,mCAAmC;AAEzE,OAAO,MAAMC,QAAQ,GAAG;EACtBV,wBAAwB;EACxBN,iBAAiB;EACjBC,iBAAiB;EACjBC,uBAAuB;EACvBC,mBAAmB;EACnBC,sBAAsB;EACtBC,mBAAmB;EACnBE,oBAAoB;EACpBC;AACF,CAAC;AAED,OAAO,MAAMS,cAAc,GAAG;EAC5BX,wBAAwB,EAAEG,8BAA8B;EACxDT,iBAAiB,EAAEU,uBAAuB;EAC1CT,iBAAiB,EAAEU,uBAAuB;EAC1CT,uBAAuB,EAAEU,6BAA6B;EACtDT,mBAAmB,EAAEU,yBAAyB;EAC9CT,sBAAsB,EAAEU,4BAA4B;EACpDT,mBAAmB,EAAEU;AACvB,CAAC","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["constants.ts"],"
|
1
|
+
{"version":3,"names":["DEFAULT_TOUCH_SLOP","MINIMAL_RECOGNIZABLE_MAGNITUDE"],"sources":["constants.ts"],"sourcesContent":["export const DEFAULT_TOUCH_SLOP = 15;\nexport const MINIMAL_RECOGNIZABLE_MAGNITUDE = 0.1;\n"],"mappings":"AAAA,OAAO,MAAMA,kBAAkB,GAAG,EAAE;AACpC,OAAO,MAAMC,8BAA8B,GAAG,GAAG","ignoreList":[]}
|
@@ -1,35 +1,24 @@
|
|
1
|
-
function _defineProperty(
|
2
|
-
|
1
|
+
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; }
|
2
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
3
|
+
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); }
|
3
4
|
import { EventTypes } from '../interfaces';
|
4
5
|
export default class RotationGestureDetector {
|
5
6
|
constructor(callbacks) {
|
6
7
|
_defineProperty(this, "onRotationBegin", void 0);
|
7
|
-
|
8
8
|
_defineProperty(this, "onRotation", void 0);
|
9
|
-
|
10
9
|
_defineProperty(this, "onRotationEnd", void 0);
|
11
|
-
|
12
10
|
_defineProperty(this, "currentTime", 0);
|
13
|
-
|
14
11
|
_defineProperty(this, "previousTime", 0);
|
15
|
-
|
16
12
|
_defineProperty(this, "previousAngle", 0);
|
17
|
-
|
18
|
-
_defineProperty(this, "
|
19
|
-
|
20
|
-
_defineProperty(this, "anchorX", 0);
|
21
|
-
|
22
|
-
_defineProperty(this, "anchorY", 0);
|
23
|
-
|
13
|
+
_defineProperty(this, "_rotation", 0);
|
14
|
+
_defineProperty(this, "_anchorX", 0);
|
15
|
+
_defineProperty(this, "_anchorY", 0);
|
24
16
|
_defineProperty(this, "isInProgress", false);
|
25
|
-
|
26
17
|
_defineProperty(this, "keyPointers", [NaN, NaN]);
|
27
|
-
|
28
18
|
this.onRotationBegin = callbacks.onRotationBegin;
|
29
19
|
this.onRotation = callbacks.onRotation;
|
30
20
|
this.onRotationEnd = callbacks.onRotationEnd;
|
31
21
|
}
|
32
|
-
|
33
22
|
updateCurrent(event, tracker) {
|
34
23
|
this.previousTime = this.currentTime;
|
35
24
|
this.currentTime = event.time;
|
@@ -38,57 +27,49 @@ export default class RotationGestureDetector {
|
|
38
27
|
const secondPointerCoords = tracker.getLastAbsoluteCoords(secondPointerID);
|
39
28
|
const vectorX = secondPointerCoords.x - firstPointerCoords.x;
|
40
29
|
const vectorY = secondPointerCoords.y - firstPointerCoords.y;
|
41
|
-
this.
|
42
|
-
this.
|
30
|
+
this._anchorX = (firstPointerCoords.x + secondPointerCoords.x) / 2;
|
31
|
+
this._anchorY = (firstPointerCoords.y + secondPointerCoords.y) / 2;
|
43
32
|
|
33
|
+
// Angle diff should be positive when rotating in clockwise direction
|
44
34
|
const angle = -Math.atan2(vectorY, vectorX);
|
45
|
-
this.
|
35
|
+
this._rotation = Number.isNaN(this.previousAngle) ? 0 : this.previousAngle - angle;
|
46
36
|
this.previousAngle = angle;
|
47
|
-
|
48
37
|
if (this.rotation > Math.PI) {
|
49
|
-
this.
|
38
|
+
this._rotation -= Math.PI;
|
50
39
|
} else if (this.rotation < -Math.PI) {
|
51
|
-
this.
|
40
|
+
this._rotation += Math.PI;
|
52
41
|
}
|
53
|
-
|
54
42
|
if (this.rotation > Math.PI / 2) {
|
55
|
-
this.
|
43
|
+
this._rotation -= Math.PI;
|
56
44
|
} else if (this.rotation < -Math.PI / 2) {
|
57
|
-
this.
|
45
|
+
this._rotation += Math.PI;
|
58
46
|
}
|
59
47
|
}
|
60
|
-
|
61
48
|
finish() {
|
62
49
|
if (!this.isInProgress) {
|
63
50
|
return;
|
64
51
|
}
|
65
|
-
|
66
52
|
this.isInProgress = false;
|
67
53
|
this.keyPointers = [NaN, NaN];
|
68
54
|
this.onRotationEnd(this);
|
69
55
|
}
|
70
|
-
|
71
56
|
setKeyPointers(tracker) {
|
72
57
|
if (this.keyPointers[0] && this.keyPointers[1]) {
|
73
58
|
return;
|
74
59
|
}
|
75
|
-
|
76
|
-
const pointerIDs = tracker.getData().keys();
|
60
|
+
const pointerIDs = tracker.trackedPointers.keys();
|
77
61
|
this.keyPointers[0] = pointerIDs.next().value;
|
78
62
|
this.keyPointers[1] = pointerIDs.next().value;
|
79
63
|
}
|
80
|
-
|
81
64
|
onTouchEvent(event, tracker) {
|
82
65
|
switch (event.eventType) {
|
83
66
|
case EventTypes.DOWN:
|
84
67
|
this.isInProgress = false;
|
85
68
|
break;
|
86
|
-
|
87
69
|
case EventTypes.ADDITIONAL_POINTER_DOWN:
|
88
70
|
if (this.isInProgress) {
|
89
71
|
break;
|
90
72
|
}
|
91
|
-
|
92
73
|
this.isInProgress = true;
|
93
74
|
this.previousTime = event.time;
|
94
75
|
this.previousAngle = NaN;
|
@@ -96,58 +77,44 @@ export default class RotationGestureDetector {
|
|
96
77
|
this.updateCurrent(event, tracker);
|
97
78
|
this.onRotationBegin(this);
|
98
79
|
break;
|
99
|
-
|
100
80
|
case EventTypes.MOVE:
|
101
81
|
if (!this.isInProgress) {
|
102
82
|
break;
|
103
83
|
}
|
104
|
-
|
105
84
|
this.updateCurrent(event, tracker);
|
106
85
|
this.onRotation(this);
|
107
86
|
break;
|
108
|
-
|
109
87
|
case EventTypes.ADDITIONAL_POINTER_UP:
|
110
88
|
if (!this.isInProgress) {
|
111
89
|
break;
|
112
90
|
}
|
113
|
-
|
114
91
|
if (this.keyPointers.indexOf(event.pointerId) >= 0) {
|
115
92
|
this.finish();
|
116
93
|
}
|
117
|
-
|
118
94
|
break;
|
119
|
-
|
120
95
|
case EventTypes.UP:
|
121
96
|
if (this.isInProgress) {
|
122
97
|
this.finish();
|
123
98
|
}
|
124
|
-
|
125
99
|
break;
|
126
100
|
}
|
127
|
-
|
128
101
|
return true;
|
129
102
|
}
|
130
|
-
|
131
|
-
|
132
|
-
|
103
|
+
reset() {
|
104
|
+
this.keyPointers = [NaN, NaN];
|
105
|
+
this.isInProgress = false;
|
133
106
|
}
|
134
|
-
|
135
|
-
|
136
|
-
return this.anchorX;
|
107
|
+
get anchorX() {
|
108
|
+
return this._anchorX;
|
137
109
|
}
|
138
|
-
|
139
|
-
|
140
|
-
return this.anchorY;
|
110
|
+
get anchorY() {
|
111
|
+
return this._anchorY;
|
141
112
|
}
|
142
|
-
|
143
|
-
|
144
|
-
return this.rotation;
|
113
|
+
get rotation() {
|
114
|
+
return this._rotation;
|
145
115
|
}
|
146
|
-
|
147
|
-
|
148
|
-
this.keyPointers = [NaN, NaN];
|
149
|
-
this.isInProgress = false;
|
116
|
+
get timeDelta() {
|
117
|
+
return this.currentTime + this.previousTime;
|
150
118
|
}
|
151
|
-
|
152
119
|
}
|
153
120
|
//# sourceMappingURL=RotationGestureDetector.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["EventTypes","RotationGestureDetector","constructor","callbacks","_defineProperty","NaN","onRotationBegin","onRotation","onRotationEnd","updateCurrent","event","tracker","previousTime","currentTime","time","firstPointerID","secondPointerID","keyPointers","firstPointerCoords","getLastAbsoluteCoords","secondPointerCoords","vectorX","x","vectorY","y","_anchorX","_anchorY","angle","Math","atan2","_rotation","Number","isNaN","previousAngle","rotation","PI","finish","isInProgress","setKeyPointers","pointerIDs","trackedPointers","keys","next","value","onTouchEvent","eventType","DOWN","ADDITIONAL_POINTER_DOWN","MOVE","ADDITIONAL_POINTER_UP","indexOf","pointerId","UP","reset","anchorX","anchorY","timeDelta"],"sources":["RotationGestureDetector.ts"],"sourcesContent":["import { AdaptedEvent, EventTypes } from '../interfaces';\nimport PointerTracker from '../tools/PointerTracker';\n\nexport interface RotationGestureListener {\n onRotationBegin: (detector: RotationGestureDetector) => boolean;\n onRotation: (detector: RotationGestureDetector) => boolean;\n onRotationEnd: (detector: RotationGestureDetector) => void;\n}\n\nexport default class RotationGestureDetector\n implements RotationGestureListener\n{\n onRotationBegin: (detector: RotationGestureDetector) => boolean;\n onRotation: (detector: RotationGestureDetector) => boolean;\n onRotationEnd: (detector: RotationGestureDetector) => void;\n\n private currentTime = 0;\n private previousTime = 0;\n\n private previousAngle = 0;\n private _rotation = 0;\n\n private _anchorX = 0;\n private _anchorY = 0;\n\n private isInProgress = false;\n\n private keyPointers: number[] = [NaN, NaN];\n\n constructor(callbacks: RotationGestureListener) {\n this.onRotationBegin = callbacks.onRotationBegin;\n this.onRotation = callbacks.onRotation;\n this.onRotationEnd = callbacks.onRotationEnd;\n }\n\n private updateCurrent(event: AdaptedEvent, tracker: PointerTracker): void {\n this.previousTime = this.currentTime;\n this.currentTime = event.time;\n\n const [firstPointerID, secondPointerID] = this.keyPointers;\n\n const firstPointerCoords = tracker.getLastAbsoluteCoords(firstPointerID);\n const secondPointerCoords = tracker.getLastAbsoluteCoords(secondPointerID);\n\n const vectorX: number = secondPointerCoords.x - firstPointerCoords.x;\n const vectorY: number = secondPointerCoords.y - firstPointerCoords.y;\n\n this._anchorX = (firstPointerCoords.x + secondPointerCoords.x) / 2;\n this._anchorY = (firstPointerCoords.y + secondPointerCoords.y) / 2;\n\n // Angle diff should be positive when rotating in clockwise direction\n const angle: number = -Math.atan2(vectorY, vectorX);\n\n this._rotation = Number.isNaN(this.previousAngle)\n ? 0\n : this.previousAngle - angle;\n\n this.previousAngle = angle;\n\n if (this.rotation > Math.PI) {\n this._rotation -= Math.PI;\n } else if (this.rotation < -Math.PI) {\n this._rotation += Math.PI;\n }\n\n if (this.rotation > Math.PI / 2) {\n this._rotation -= Math.PI;\n } else if (this.rotation < -Math.PI / 2) {\n this._rotation += Math.PI;\n }\n }\n\n private finish(): void {\n if (!this.isInProgress) {\n return;\n }\n\n this.isInProgress = false;\n this.keyPointers = [NaN, NaN];\n this.onRotationEnd(this);\n }\n\n private setKeyPointers(tracker: PointerTracker): void {\n if (this.keyPointers[0] && this.keyPointers[1]) {\n return;\n }\n\n const pointerIDs: IterableIterator<number> = tracker.trackedPointers.keys();\n\n this.keyPointers[0] = pointerIDs.next().value as number;\n this.keyPointers[1] = pointerIDs.next().value as number;\n }\n\n public onTouchEvent(event: AdaptedEvent, tracker: PointerTracker): boolean {\n switch (event.eventType) {\n case EventTypes.DOWN:\n this.isInProgress = false;\n break;\n\n case EventTypes.ADDITIONAL_POINTER_DOWN:\n if (this.isInProgress) {\n break;\n }\n this.isInProgress = true;\n\n this.previousTime = event.time;\n this.previousAngle = NaN;\n\n this.setKeyPointers(tracker);\n\n this.updateCurrent(event, tracker);\n this.onRotationBegin(this);\n break;\n\n case EventTypes.MOVE:\n if (!this.isInProgress) {\n break;\n }\n\n this.updateCurrent(event, tracker);\n this.onRotation(this);\n\n break;\n\n case EventTypes.ADDITIONAL_POINTER_UP:\n if (!this.isInProgress) {\n break;\n }\n\n if (this.keyPointers.indexOf(event.pointerId) >= 0) {\n this.finish();\n }\n\n break;\n\n case EventTypes.UP:\n if (this.isInProgress) {\n this.finish();\n }\n break;\n }\n\n return true;\n }\n\n public reset(): void {\n this.keyPointers = [NaN, NaN];\n this.isInProgress = false;\n }\n\n public get anchorX() {\n return this._anchorX;\n }\n\n public get anchorY() {\n return this._anchorY;\n }\n\n public get rotation() {\n return this._rotation;\n }\n\n public get timeDelta() {\n return this.currentTime + this.previousTime;\n }\n}\n"],"mappings":";;;AAAA,SAAuBA,UAAU,QAAQ,eAAe;AASxD,eAAe,MAAMC,uBAAuB,CAE5C;EAkBEC,WAAWA,CAACC,SAAkC,EAAE;IAAAC,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,sBAb1B,CAAC;IAAAA,eAAA,uBACA,CAAC;IAAAA,eAAA,wBAEA,CAAC;IAAAA,eAAA,oBACL,CAAC;IAAAA,eAAA,mBAEF,CAAC;IAAAA,eAAA,mBACD,CAAC;IAAAA,eAAA,uBAEG,KAAK;IAAAA,eAAA,sBAEI,CAACC,GAAG,EAAEA,GAAG,CAAC;IAGxC,IAAI,CAACC,eAAe,GAAGH,SAAS,CAACG,eAAe;IAChD,IAAI,CAACC,UAAU,GAAGJ,SAAS,CAACI,UAAU;IACtC,IAAI,CAACC,aAAa,GAAGL,SAAS,CAACK,aAAa;EAC9C;EAEQC,aAAaA,CAACC,KAAmB,EAAEC,OAAuB,EAAQ;IACxE,IAAI,CAACC,YAAY,GAAG,IAAI,CAACC,WAAW;IACpC,IAAI,C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