react-native-gesture-handler 2.25.0 → 2.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/RNGestureHandler.podspec +1 -0
- package/android/build.gradle +41 -42
- package/android/fabric/src/main/java/com/swmansion/gesturehandler/ReactContextExtensions.kt +1 -1
- package/android/gradle.properties +1 -1
- package/android/noreanimated/src/main/java/com/swmansion/gesturehandler/ReanimatedEventDispatcher.kt +2 -2
- package/android/paper/src/main/java/com/swmansion/gesturehandler/ReactContextExtensions.kt +4 -1
- package/android/reanimated/src/main/java/com/swmansion/gesturehandler/ReanimatedEventDispatcher.kt +1 -1
- package/android/{package77/src → src}/main/java/com/swmansion/gesturehandler/RNGestureHandlerPackage.kt +14 -19
- package/android/src/main/java/com/swmansion/gesturehandler/core/FlingGestureHandler.kt +29 -5
- package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandler.kt +229 -114
- package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerInteractionController.kt +4 -4
- package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerOrchestrator.kt +91 -49
- package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerRegistry.kt +1 -1
- package/android/src/main/java/com/swmansion/gesturehandler/core/GestureUtils.kt +13 -4
- package/android/src/main/java/com/swmansion/gesturehandler/core/HoverGestureHandler.kt +20 -6
- package/android/src/main/java/com/swmansion/gesturehandler/core/LongPressGestureHandler.kt +52 -21
- package/android/src/main/java/com/swmansion/gesturehandler/core/ManualGestureHandler.kt +12 -1
- package/android/src/main/java/com/swmansion/gesturehandler/core/NativeViewGestureHandler.kt +65 -35
- package/android/src/main/java/com/swmansion/gesturehandler/core/OnTouchEventListener.kt +3 -3
- package/android/src/main/java/com/swmansion/gesturehandler/core/PanGestureHandler.kt +187 -92
- package/android/src/main/java/com/swmansion/gesturehandler/core/PinchGestureHandler.kt +12 -5
- package/android/src/main/java/com/swmansion/gesturehandler/core/PointerEventsConfig.kt +1 -1
- package/android/src/main/java/com/swmansion/gesturehandler/core/RotationGestureDetector.kt +3 -1
- package/android/src/main/java/com/swmansion/gesturehandler/core/RotationGestureHandler.kt +12 -5
- package/android/src/main/java/com/swmansion/gesturehandler/core/StylusData.kt +1 -1
- package/android/src/main/java/com/swmansion/gesturehandler/core/TapGestureHandler.kt +55 -33
- package/android/src/main/java/com/swmansion/gesturehandler/core/Vector.kt +13 -18
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.kt +27 -21
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEnabledRootView.kt +7 -2
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEvent.kt +13 -12
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEventDispatcher.kt +189 -0
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerFactoryUtil.kt +34 -0
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerInteractionManager.kt +7 -11
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.kt +29 -590
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRegistry.kt +8 -14
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootHelper.kt +26 -16
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootView.kt +15 -12
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootViewManager.kt +2 -4
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerStateChangeEvent.kt +17 -16
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerTouchEvent.kt +6 -4
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNViewConfigurationHelper.kt +7 -5
- package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/FlingGestureHandlerEventDataBuilder.kt +2 -1
- package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/GestureHandlerEventDataBuilder.kt +1 -1
- package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/HoverGestureHandlerEventDataBuilder.kt +2 -1
- package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/LongPressGestureHandlerEventDataBuilder.kt +2 -1
- package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/ManualGestureHandlerEventDataBuilder.kt +2 -1
- package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/NativeGestureHandlerEventDataBuilder.kt +2 -1
- package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/PanGestureHandlerEventDataBuilder.kt +2 -1
- package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/PinchGestureHandlerEventDataBuilder.kt +2 -1
- package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/RotationGestureHandlerEventDataBuilder.kt +2 -1
- package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/TapGestureHandlerEventDataBuilder.kt +2 -1
- package/android/src/main/jni/CMakeLists.txt +10 -1
- package/android/svg/src/main/java/com/swmansion/gesturehandler/RNSVGHitTester.kt +1 -3
- package/apple/RNGestureHandlerButton.mm +6 -2
- 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 -7
- 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 +10 -37
- 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 +436 -462
- package/lib/commonjs/components/DrawerLayout.js.map +1 -1
- package/lib/commonjs/components/GestureButtons.js +123 -181
- package/lib/commonjs/components/GestureButtons.js.map +1 -1
- package/lib/commonjs/components/GestureButtonsProps.js.map +1 -1
- package/lib/commonjs/components/GestureComponents.js +36 -45
- package/lib/commonjs/components/GestureComponents.js.map +1 -1
- package/lib/commonjs/components/GestureComponents.web.js +19 -32
- 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 +6 -14
- package/lib/commonjs/components/GestureHandlerButton.web.js.map +1 -1
- package/lib/commonjs/components/GestureHandlerRootView.android.js +10 -20
- package/lib/commonjs/components/GestureHandlerRootView.android.js.map +1 -1
- package/lib/commonjs/components/GestureHandlerRootView.js +10 -19
- package/lib/commonjs/components/GestureHandlerRootView.js.map +1 -1
- package/lib/commonjs/components/GestureHandlerRootView.web.js +10 -18
- package/lib/commonjs/components/GestureHandlerRootView.web.js.map +1 -1
- package/lib/commonjs/components/Pressable/Pressable.js +72 -118
- 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 +16 -38
- package/lib/commonjs/components/Pressable/utils.js.map +1 -1
- package/lib/commonjs/components/ReanimatedDrawerLayout.js +72 -108
- package/lib/commonjs/components/ReanimatedDrawerLayout.js.map +1 -1
- package/lib/commonjs/components/ReanimatedSwipeable.js +81 -102
- package/lib/commonjs/components/ReanimatedSwipeable.js.map +1 -1
- package/lib/commonjs/components/Swipeable.js +290 -335
- package/lib/commonjs/components/Swipeable.js.map +1 -1
- package/lib/commonjs/components/Text.js +23 -34
- package/lib/commonjs/components/Text.js.map +1 -1
- package/lib/commonjs/components/gestureHandlerRootHOC.js +11 -17
- package/lib/commonjs/components/gestureHandlerRootHOC.js.map +1 -1
- package/lib/commonjs/components/touchables/ExtraButtonProps.js.map +1 -1
- package/lib/commonjs/components/touchables/GenericTouchable.js +95 -140
- 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 +51 -69
- package/lib/commonjs/components/touchables/TouchableHighlight.js.map +1 -1
- package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js +38 -56
- package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js.map +1 -1
- package/lib/commonjs/components/touchables/TouchableNativeFeedback.js +1 -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 +39 -53
- package/lib/commonjs/components/touchables/TouchableOpacity.js.map +1 -1
- package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js +11 -15
- 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/components/utils.js +17 -0
- package/lib/commonjs/components/utils.js.map +1 -0
- package/lib/commonjs/findNodeHandle.js +1 -4
- package/lib/commonjs/findNodeHandle.js.map +1 -1
- package/lib/commonjs/findNodeHandle.web.js +7 -16
- package/lib/commonjs/findNodeHandle.web.js.map +1 -1
- package/lib/commonjs/getShadowNodeFromRef.js +19 -20
- 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 +9 -11
- package/lib/commonjs/handlers/FlingGestureHandler.js.map +1 -1
- package/lib/commonjs/handlers/ForceTouchGestureHandler.js +16 -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 +9 -11
- package/lib/commonjs/handlers/LongPressGestureHandler.js.map +1 -1
- package/lib/commonjs/handlers/NativeViewGestureHandler.ts +59 -0
- package/lib/commonjs/handlers/PanGestureHandler.js +13 -32
- package/lib/commonjs/handlers/PanGestureHandler.js.map +1 -1
- package/lib/commonjs/handlers/PinchGestureHandler.js +7 -9
- 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 +7 -9
- package/lib/commonjs/handlers/RotationGestureHandler.js.map +1 -1
- package/lib/commonjs/handlers/TapGestureHandler.js +9 -11
- package/lib/commonjs/handlers/TapGestureHandler.js.map +1 -1
- package/lib/commonjs/handlers/createHandler.js +128 -229
- package/lib/commonjs/handlers/createHandler.js.map +1 -1
- package/lib/commonjs/handlers/createNativeWrapper.js +26 -35
- 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 -15
- package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.js.map +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.web.js +14 -22
- 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 +19 -42
- 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 +15 -26
- package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js.map +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js +13 -50
- 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 +6 -14
- package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/utils.js +23 -52
- package/lib/commonjs/handlers/gestures/GestureDetector/utils.js.map +1 -1
- package/lib/commonjs/handlers/gestures/eventReceiver.js +14 -55
- package/lib/commonjs/handlers/gestures/eventReceiver.js.map +1 -1
- package/lib/commonjs/handlers/gestures/flingGesture.js +3 -13
- package/lib/commonjs/handlers/gestures/flingGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/forceTouchGesture.js +6 -20
- package/lib/commonjs/handlers/gestures/forceTouchGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/gesture.js +50 -93
- package/lib/commonjs/handlers/gestures/gesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/gestureComposition.js +17 -34
- 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 +5 -11
- 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 +9 -26
- package/lib/commonjs/handlers/gestures/hoverGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/longPressGesture.js +4 -15
- 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/{module/handlers/gestures/nativeGesture.js → commonjs/handlers/gestures/nativeGesture.ts} +12 -13
- package/lib/commonjs/handlers/gestures/panGesture.js +16 -44
- 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 +2 -10
- 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 +8 -23
- 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 +7 -23
- package/lib/commonjs/handlers/handlersRegistry.js.map +1 -1
- package/lib/commonjs/handlers/utils.js +8 -31
- 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 +24 -91
- package/lib/commonjs/jestUtils/jestUtils.js.map +1 -1
- package/lib/commonjs/mocks.js +10 -18
- package/lib/commonjs/mocks.js.map +1 -1
- package/lib/commonjs/mountRegistry.js +2 -14
- package/lib/commonjs/mountRegistry.js.map +1 -1
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/specs/NativeRNGestureHandlerModule.ts +26 -0
- package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.ts +22 -0
- package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.ts +6 -0
- package/lib/commonjs/typeUtils.js.map +1 -1
- package/lib/commonjs/utils.js +14 -35
- 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 +10 -52
- package/lib/commonjs/web/detectors/RotationGestureDetector.js.map +1 -1
- package/lib/commonjs/web/detectors/ScaleGestureDetector.js +11 -55
- package/lib/commonjs/web/detectors/ScaleGestureDetector.js.map +1 -1
- package/lib/commonjs/web/handlers/FlingGestureHandler.js +9 -59
- package/lib/commonjs/web/handlers/FlingGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/GestureHandler.js +91 -226
- package/lib/commonjs/web/handlers/GestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/HoverGestureHandler.js +3 -23
- 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 +11 -59
- 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/{module/web/handlers/NativeViewGestureHandler.js → commonjs/web/handlers/NativeViewGestureHandler.ts} +49 -48
- package/lib/commonjs/web/handlers/PanGestureHandler.js +33 -155
- package/lib/commonjs/web/handlers/PanGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/PinchGestureHandler.js +25 -68
- package/lib/commonjs/web/handlers/PinchGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/RotationGestureHandler.js +23 -67
- package/lib/commonjs/web/handlers/RotationGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/TapGestureHandler.js +18 -87
- 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 +0 -19
- package/lib/commonjs/web/tools/CircularBuffer.js.map +1 -1
- package/lib/commonjs/web/tools/EventManager.js +5 -44
- 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 +13 -86
- package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js.map +1 -1
- package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js +14 -61
- package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js.map +1 -1
- package/lib/commonjs/web/tools/InteractionManager.js +12 -35
- package/lib/commonjs/web/tools/InteractionManager.js.map +1 -1
- package/lib/commonjs/web/tools/KeyboardEventManager.js +24 -52
- package/lib/commonjs/web/tools/KeyboardEventManager.js.map +1 -1
- package/lib/commonjs/web/tools/LeastSquareSolver.js +24 -69
- package/lib/commonjs/web/tools/LeastSquareSolver.js.map +1 -1
- package/lib/commonjs/web/tools/NodeManager.js +5 -15
- package/lib/commonjs/web/tools/NodeManager.js.map +1 -1
- package/lib/commonjs/web/tools/PointerEventManager.js +119 -159
- package/lib/commonjs/web/tools/PointerEventManager.js.map +1 -1
- package/lib/commonjs/web/tools/PointerTracker.js +20 -63
- package/lib/commonjs/web/tools/PointerTracker.js.map +1 -1
- package/lib/commonjs/web/tools/Vector.js +1 -25
- package/lib/commonjs/web/tools/Vector.js.map +1 -1
- package/lib/commonjs/web/tools/VelocityTracker.js +10 -36
- package/lib/commonjs/web/tools/VelocityTracker.js.map +1 -1
- package/lib/commonjs/web/tools/WheelEventManager.js +15 -34
- package/lib/commonjs/web/tools/WheelEventManager.js.map +1 -1
- package/lib/commonjs/web/utils.js +32 -67
- package/lib/commonjs/web/utils.js.map +1 -1
- package/lib/commonjs/web_hammer/DiscreteGestureHandler.js +8 -20
- package/lib/commonjs/web_hammer/DiscreteGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/DraggingGestureHandler.js +4 -14
- 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 +14 -45
- package/lib/commonjs/web_hammer/FlingGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/GestureHandler.js +149 -244
- 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 +6 -20
- package/lib/commonjs/web_hammer/LongPressGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/NativeViewGestureHandler.ts +47 -0
- 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 +14 -49
- package/lib/commonjs/web_hammer/PressGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/RotationGestureHandler.js +3 -15
- package/lib/commonjs/web_hammer/RotationGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/TapGestureHandler.js +43 -70
- 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 +5 -1
- package/lib/module/ActionType.js.map +1 -1
- package/lib/module/Directions.js +11 -3
- package/lib/module/Directions.js.map +1 -1
- package/lib/module/EnableNewWebImplementation.js +4 -5
- package/lib/module/EnableNewWebImplementation.js.map +1 -1
- package/lib/module/GestureHandlerRootViewContext.js +2 -0
- package/lib/module/GestureHandlerRootViewContext.js.map +1 -1
- package/lib/module/PlatformConstants.js +2 -2
- package/lib/module/PlatformConstants.js.map +1 -1
- package/lib/module/PlatformConstants.web.js +2 -1
- package/lib/module/PlatformConstants.web.js.map +1 -1
- package/lib/module/PointerType.js +4 -3
- package/lib/module/PointerType.js.map +1 -1
- package/lib/module/RNGestureHandlerModule.js +3 -0
- package/lib/module/RNGestureHandlerModule.js.map +1 -1
- package/lib/module/RNGestureHandlerModule.web.js +12 -20
- package/lib/module/RNGestureHandlerModule.web.js.map +1 -1
- package/lib/module/RNGestureHandlerModule.windows.js +20 -17
- package/lib/module/RNGestureHandlerModule.windows.js.map +1 -1
- package/lib/module/RNRenderer.js +2 -0
- package/lib/module/RNRenderer.js.map +1 -1
- package/lib/module/RNRenderer.web.js +2 -0
- package/lib/module/RNRenderer.web.js.map +1 -1
- package/lib/module/State.js +6 -1
- package/lib/module/State.js.map +1 -1
- package/lib/module/TouchEventType.js +5 -1
- package/lib/module/TouchEventType.js.map +1 -1
- package/lib/module/components/DrawerLayout.js +427 -446
- package/lib/module/components/DrawerLayout.js.map +1 -1
- package/lib/module/components/GestureButtons.js +119 -157
- package/lib/module/components/GestureButtons.js.map +1 -1
- package/lib/module/components/GestureButtonsProps.js +2 -0
- package/lib/module/components/GestureButtonsProps.js.map +1 -1
- package/lib/module/components/GestureComponents.js +29 -19
- package/lib/module/components/GestureComponents.js.map +1 -1
- package/lib/module/components/GestureComponents.web.js +13 -9
- package/lib/module/components/GestureComponents.web.js.map +1 -1
- package/lib/module/components/GestureHandlerButton.js +2 -0
- package/lib/module/components/GestureHandlerButton.js.map +1 -1
- package/lib/module/components/GestureHandlerButton.web.js +6 -4
- package/lib/module/components/GestureHandlerButton.web.js.map +1 -1
- package/lib/module/components/GestureHandlerRootView.android.js +9 -6
- package/lib/module/components/GestureHandlerRootView.android.js.map +1 -1
- package/lib/module/components/GestureHandlerRootView.js +9 -6
- package/lib/module/components/GestureHandlerRootView.js.map +1 -1
- package/lib/module/components/GestureHandlerRootView.web.js +9 -6
- package/lib/module/components/GestureHandlerRootView.web.js.map +1 -1
- package/lib/module/components/Pressable/Pressable.js +70 -98
- package/lib/module/components/Pressable/Pressable.js.map +1 -1
- package/lib/module/components/Pressable/PressableProps.js +2 -0
- package/lib/module/components/Pressable/PressableProps.js.map +1 -1
- package/lib/module/components/Pressable/index.js +2 -0
- package/lib/module/components/Pressable/index.js.map +1 -1
- package/lib/module/components/Pressable/utils.js +17 -32
- package/lib/module/components/Pressable/utils.js.map +1 -1
- package/lib/module/components/ReanimatedDrawerLayout.js +71 -88
- package/lib/module/components/ReanimatedDrawerLayout.js.map +1 -1
- package/lib/module/components/ReanimatedSwipeable.js +78 -87
- package/lib/module/components/ReanimatedSwipeable.js.map +1 -1
- package/lib/module/components/Swipeable.js +286 -320
- package/lib/module/components/Swipeable.js.map +1 -1
- package/lib/module/components/Text.js +22 -20
- package/lib/module/components/Text.js.map +1 -1
- package/lib/module/components/gestureHandlerRootHOC.js +11 -5
- package/lib/module/components/gestureHandlerRootHOC.js.map +1 -1
- package/lib/module/components/touchables/ExtraButtonProps.js +1 -1
- package/lib/module/components/touchables/ExtraButtonProps.js.map +1 -1
- package/lib/module/components/touchables/GenericTouchable.js +92 -127
- package/lib/module/components/touchables/GenericTouchable.js.map +1 -1
- package/lib/module/components/touchables/GenericTouchableProps.js +2 -0
- package/lib/module/components/touchables/GenericTouchableProps.js.map +1 -1
- package/lib/module/components/touchables/TouchableHighlight.js +48 -58
- package/lib/module/components/touchables/TouchableHighlight.js.map +1 -1
- package/lib/module/components/touchables/TouchableNativeFeedback.android.js +34 -43
- package/lib/module/components/touchables/TouchableNativeFeedback.android.js.map +1 -1
- package/lib/module/components/touchables/TouchableNativeFeedback.js +3 -1
- package/lib/module/components/touchables/TouchableNativeFeedback.js.map +1 -1
- package/lib/module/components/touchables/TouchableNativeFeedbackProps.js +2 -0
- package/lib/module/components/touchables/TouchableNativeFeedbackProps.js.map +1 -1
- package/lib/module/components/touchables/TouchableOpacity.js +34 -43
- package/lib/module/components/touchables/TouchableOpacity.js.map +1 -1
- package/lib/module/components/touchables/TouchableWithoutFeedback.js +9 -4
- package/lib/module/components/touchables/TouchableWithoutFeedback.js.map +1 -1
- package/lib/module/components/touchables/index.js +2 -0
- package/lib/module/components/touchables/index.js.map +1 -1
- package/lib/module/components/utils.js +13 -0
- package/lib/module/components/utils.js.map +1 -0
- package/lib/module/findNodeHandle.js +2 -0
- package/lib/module/findNodeHandle.js.map +1 -1
- package/lib/module/findNodeHandle.web.js +9 -13
- package/lib/module/findNodeHandle.web.js.map +1 -1
- package/lib/module/getShadowNodeFromRef.js +21 -19
- package/lib/module/getShadowNodeFromRef.js.map +1 -1
- package/lib/module/getShadowNodeFromRef.web.js +2 -0
- package/lib/module/getShadowNodeFromRef.web.js.map +1 -1
- package/lib/module/ghQueueMicrotask.js +2 -0
- package/lib/module/ghQueueMicrotask.js.map +1 -1
- package/lib/module/handlers/FlingGestureHandler.js +8 -0
- package/lib/module/handlers/FlingGestureHandler.js.map +1 -1
- package/lib/module/handlers/ForceTouchGestureHandler.js +14 -8
- package/lib/module/handlers/ForceTouchGestureHandler.js.map +1 -1
- package/lib/module/handlers/GestureHandlerEventPayload.js +2 -0
- package/lib/module/handlers/GestureHandlerEventPayload.js.map +1 -1
- package/lib/module/handlers/LongPressGestureHandler.js +8 -0
- package/lib/module/handlers/LongPressGestureHandler.js.map +1 -1
- package/lib/module/handlers/NativeViewGestureHandler.ts +59 -0
- package/lib/module/handlers/PanGestureHandler.js +10 -19
- package/lib/module/handlers/PanGestureHandler.js.map +1 -1
- package/lib/module/handlers/PinchGestureHandler.js +4 -0
- package/lib/module/handlers/PinchGestureHandler.js.map +1 -1
- package/lib/module/handlers/PressabilityDebugView.js +2 -0
- package/lib/module/handlers/PressabilityDebugView.js.map +1 -1
- package/lib/module/handlers/PressabilityDebugView.web.js +2 -0
- package/lib/module/handlers/PressabilityDebugView.web.js.map +1 -1
- package/lib/module/handlers/RotationGestureHandler.js +4 -0
- package/lib/module/handlers/RotationGestureHandler.js.map +1 -1
- package/lib/module/handlers/TapGestureHandler.js +8 -0
- package/lib/module/handlers/TapGestureHandler.js.map +1 -1
- package/lib/module/handlers/createHandler.js +127 -200
- package/lib/module/handlers/createHandler.js.map +1 -1
- package/lib/module/handlers/createNativeWrapper.js +22 -22
- package/lib/module/handlers/createNativeWrapper.js.map +1 -1
- package/lib/module/handlers/customDirectEventTypes.js +2 -0
- package/lib/module/handlers/customDirectEventTypes.js.map +1 -1
- package/lib/module/handlers/customDirectEventTypes.web.js +2 -0
- package/lib/module/handlers/customDirectEventTypes.web.js.map +1 -1
- package/lib/module/handlers/gestureHandlerCommon.js +11 -4
- package/lib/module/handlers/gestureHandlerCommon.js.map +1 -1
- package/lib/module/handlers/gestureHandlerTypesCompat.js +2 -0
- package/lib/module/handlers/gestureHandlerTypesCompat.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/Wrap.js +4 -4
- package/lib/module/handlers/gestures/GestureDetector/Wrap.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/Wrap.web.js +12 -8
- package/lib/module/handlers/gestures/GestureDetector/Wrap.web.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js +10 -16
- package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js +2 -1
- package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/index.js +18 -19
- package/lib/module/handlers/gestures/GestureDetector/index.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/needsToReattach.js +2 -2
- package/lib/module/handlers/gestures/GestureDetector/needsToReattach.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/types.js +2 -0
- package/lib/module/handlers/gestures/GestureDetector/types.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js +16 -16
- package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js +15 -41
- package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js +7 -5
- package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/useMountReactions.js +4 -6
- package/lib/module/handlers/gestures/GestureDetector/useMountReactions.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js +7 -7
- package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/utils.js +21 -26
- package/lib/module/handlers/gestures/GestureDetector/utils.js.map +1 -1
- package/lib/module/handlers/gestures/eventReceiver.js +16 -47
- package/lib/module/handlers/gestures/eventReceiver.js.map +1 -1
- package/lib/module/handlers/gestures/flingGesture.js +4 -9
- package/lib/module/handlers/gestures/flingGesture.js.map +1 -1
- package/lib/module/handlers/gestures/forceTouchGesture.js +7 -17
- package/lib/module/handlers/gestures/forceTouchGesture.js.map +1 -1
- package/lib/module/handlers/gestures/gesture.js +51 -81
- package/lib/module/handlers/gestures/gesture.js.map +1 -1
- package/lib/module/handlers/gestures/gestureComposition.js +17 -26
- package/lib/module/handlers/gestures/gestureComposition.js.map +1 -1
- package/lib/module/handlers/gestures/gestureObjects.js +3 -14
- package/lib/module/handlers/gestures/gestureObjects.js.map +1 -1
- package/lib/module/handlers/gestures/gestureStateManager.js +7 -6
- package/lib/module/handlers/gestures/gestureStateManager.js.map +1 -1
- package/lib/module/handlers/gestures/gestureStateManager.web.js +2 -1
- package/lib/module/handlers/gestures/gestureStateManager.web.js.map +1 -1
- package/lib/module/handlers/gestures/hoverGesture.js +8 -18
- package/lib/module/handlers/gestures/hoverGesture.js.map +1 -1
- package/lib/module/handlers/gestures/longPressGesture.js +5 -11
- package/lib/module/handlers/gestures/longPressGesture.js.map +1 -1
- package/lib/module/handlers/gestures/manualGesture.js +2 -4
- package/lib/module/handlers/gestures/manualGesture.js.map +1 -1
- package/lib/module/handlers/gestures/nativeGesture.ts +33 -0
- package/lib/module/handlers/gestures/panGesture.js +17 -41
- package/lib/module/handlers/gestures/panGesture.js.map +1 -1
- package/lib/module/handlers/gestures/pinchGesture.js +4 -7
- package/lib/module/handlers/gestures/pinchGesture.js.map +1 -1
- package/lib/module/handlers/gestures/reanimatedWrapper.js +2 -6
- package/lib/module/handlers/gestures/reanimatedWrapper.js.map +1 -1
- package/lib/module/handlers/gestures/rotationGesture.js +4 -7
- package/lib/module/handlers/gestures/rotationGesture.js.map +1 -1
- package/lib/module/handlers/gestures/tapGesture.js +9 -19
- package/lib/module/handlers/gestures/tapGesture.js.map +1 -1
- package/lib/module/handlers/getNextHandlerTag.js +2 -0
- package/lib/module/handlers/getNextHandlerTag.js.map +1 -1
- package/lib/module/handlers/handlersRegistry.js +3 -7
- package/lib/module/handlers/handlersRegistry.js.map +1 -1
- package/lib/module/handlers/utils.js +8 -18
- package/lib/module/handlers/utils.js.map +1 -1
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/init.js +5 -2
- package/lib/module/init.js.map +1 -1
- package/lib/module/jestUtils/index.js +2 -0
- package/lib/module/jestUtils/index.js.map +1 -1
- package/lib/module/jestUtils/jestUtils.js +27 -74
- package/lib/module/jestUtils/jestUtils.js.map +1 -1
- package/lib/module/mocks.js +9 -9
- package/lib/module/mocks.js.map +1 -1
- package/lib/module/mountRegistry.js +3 -11
- package/lib/module/mountRegistry.js.map +1 -1
- package/lib/module/specs/NativeRNGestureHandlerModule.ts +26 -0
- package/lib/module/specs/RNGestureHandlerButtonNativeComponent.ts +22 -0
- package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.ts +6 -0
- package/lib/module/typeUtils.js +1 -1
- package/lib/module/typeUtils.js.map +1 -1
- package/lib/module/utils.js +8 -14
- package/lib/module/utils.js.map +1 -1
- package/lib/module/web/Gestures.js +4 -1
- package/lib/module/web/Gestures.js.map +1 -1
- package/lib/module/web/constants.js +2 -0
- package/lib/module/web/constants.js.map +1 -1
- package/lib/module/web/detectors/RotationGestureDetector.js +11 -48
- package/lib/module/web/detectors/RotationGestureDetector.js.map +1 -1
- package/lib/module/web/detectors/ScaleGestureDetector.js +12 -50
- package/lib/module/web/detectors/ScaleGestureDetector.js.map +1 -1
- package/lib/module/web/handlers/FlingGestureHandler.js +9 -48
- package/lib/module/web/handlers/FlingGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/GestureHandler.js +90 -212
- package/lib/module/web/handlers/GestureHandler.js.map +1 -1
- package/lib/module/web/handlers/HoverGestureHandler.js +3 -14
- package/lib/module/web/handlers/HoverGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/IGestureHandler.js +1 -1
- package/lib/module/web/handlers/IGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/LongPressGestureHandler.js +11 -51
- package/lib/module/web/handlers/LongPressGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/ManualGestureHandler.js +2 -6
- package/lib/module/web/handlers/ManualGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/NativeViewGestureHandler.ts +175 -0
- package/lib/module/web/handlers/PanGestureHandler.js +33 -145
- package/lib/module/web/handlers/PanGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/PinchGestureHandler.js +25 -59
- package/lib/module/web/handlers/PinchGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/RotationGestureHandler.js +23 -58
- package/lib/module/web/handlers/RotationGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/TapGestureHandler.js +18 -78
- package/lib/module/web/handlers/TapGestureHandler.js.map +1 -1
- package/lib/module/web/interfaces.js +10 -13
- package/lib/module/web/interfaces.js.map +1 -1
- package/lib/module/web/tools/CircularBuffer.js +1 -16
- package/lib/module/web/tools/CircularBuffer.js.map +1 -1
- package/lib/module/web/tools/EventManager.js +6 -41
- package/lib/module/web/tools/EventManager.js.map +1 -1
- package/lib/module/web/tools/GestureHandlerDelegate.js +2 -0
- package/lib/module/web/tools/GestureHandlerDelegate.js.map +1 -1
- package/lib/module/web/tools/GestureHandlerOrchestrator.js +13 -78
- package/lib/module/web/tools/GestureHandlerOrchestrator.js.map +1 -1
- package/lib/module/web/tools/GestureHandlerWebDelegate.js +14 -49
- package/lib/module/web/tools/GestureHandlerWebDelegate.js.map +1 -1
- package/lib/module/web/tools/InteractionManager.js +13 -32
- package/lib/module/web/tools/InteractionManager.js.map +1 -1
- package/lib/module/web/tools/KeyboardEventManager.js +24 -44
- package/lib/module/web/tools/KeyboardEventManager.js.map +1 -1
- package/lib/module/web/tools/LeastSquareSolver.js +25 -66
- package/lib/module/web/tools/LeastSquareSolver.js.map +1 -1
- package/lib/module/web/tools/NodeManager.js +6 -12
- package/lib/module/web/tools/NodeManager.js.map +1 -1
- package/lib/module/web/tools/PointerEventManager.js +119 -148
- package/lib/module/web/tools/PointerEventManager.js.map +1 -1
- package/lib/module/web/tools/PointerTracker.js +20 -56
- package/lib/module/web/tools/PointerTracker.js.map +1 -1
- package/lib/module/web/tools/Vector.js +2 -20
- package/lib/module/web/tools/Vector.js.map +1 -1
- package/lib/module/web/tools/VelocityTracker.js +10 -29
- package/lib/module/web/tools/VelocityTracker.js.map +1 -1
- package/lib/module/web/tools/WheelEventManager.js +15 -26
- package/lib/module/web/tools/WheelEventManager.js.map +1 -1
- package/lib/module/web/utils.js +29 -49
- package/lib/module/web/utils.js.map +1 -1
- package/lib/module/web_hammer/DiscreteGestureHandler.js +6 -13
- package/lib/module/web_hammer/DiscreteGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/DraggingGestureHandler.js +2 -5
- package/lib/module/web_hammer/DraggingGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/Errors.js +2 -1
- package/lib/module/web_hammer/Errors.js.map +1 -1
- package/lib/module/web_hammer/FlingGestureHandler.js +12 -35
- package/lib/module/web_hammer/FlingGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/GestureHandler.js +148 -233
- package/lib/module/web_hammer/GestureHandler.js.map +1 -1
- package/lib/module/web_hammer/IndiscreteGestureHandler.js +3 -6
- package/lib/module/web_hammer/IndiscreteGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/LongPressGestureHandler.js +4 -11
- package/lib/module/web_hammer/LongPressGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/NativeViewGestureHandler.ts +47 -0
- package/lib/module/web_hammer/NodeManager.js +8 -8
- package/lib/module/web_hammer/NodeManager.js.map +1 -1
- package/lib/module/web_hammer/PanGestureHandler.js +8 -40
- package/lib/module/web_hammer/PanGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/PinchGestureHandler.js +2 -5
- package/lib/module/web_hammer/PinchGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/PressGestureHandler.js +13 -39
- package/lib/module/web_hammer/PressGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/RotationGestureHandler.js +3 -8
- package/lib/module/web_hammer/RotationGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/TapGestureHandler.js +42 -62
- package/lib/module/web_hammer/TapGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/constants.js +4 -1
- package/lib/module/web_hammer/constants.js.map +1 -1
- package/lib/module/web_hammer/utils.js +4 -2
- package/lib/module/web_hammer/utils.js.map +1 -1
- package/lib/typescript/ActionType.d.ts +1 -0
- package/lib/typescript/ActionType.d.ts.map +1 -0
- package/lib/typescript/Directions.d.ts +1 -0
- package/lib/typescript/Directions.d.ts.map +1 -0
- package/lib/typescript/EnableNewWebImplementation.d.ts +1 -0
- package/lib/typescript/EnableNewWebImplementation.d.ts.map +1 -0
- package/lib/typescript/GestureHandlerRootViewContext.d.ts +1 -0
- package/lib/typescript/GestureHandlerRootViewContext.d.ts.map +1 -0
- package/lib/typescript/PlatformConstants.d.ts +1 -0
- package/lib/typescript/PlatformConstants.d.ts.map +1 -0
- package/lib/typescript/PlatformConstants.web.d.ts +1 -0
- package/lib/typescript/PlatformConstants.web.d.ts.map +1 -0
- package/lib/typescript/PointerType.d.ts +1 -0
- package/lib/typescript/PointerType.d.ts.map +1 -0
- package/lib/typescript/RNGestureHandlerModule.d.ts +1 -0
- package/lib/typescript/RNGestureHandlerModule.d.ts.map +1 -0
- package/lib/typescript/RNGestureHandlerModule.web.d.ts +1 -0
- package/lib/typescript/RNGestureHandlerModule.web.d.ts.map +1 -0
- package/lib/typescript/RNGestureHandlerModule.windows.d.ts +1 -0
- package/lib/typescript/RNGestureHandlerModule.windows.d.ts.map +1 -0
- package/lib/typescript/RNRenderer.d.ts +1 -0
- package/lib/typescript/RNRenderer.d.ts.map +1 -0
- package/lib/typescript/RNRenderer.web.d.ts +1 -0
- package/lib/typescript/RNRenderer.web.d.ts.map +1 -0
- package/lib/typescript/State.d.ts +1 -0
- package/lib/typescript/State.d.ts.map +1 -0
- package/lib/typescript/TouchEventType.d.ts +1 -0
- package/lib/typescript/TouchEventType.d.ts.map +1 -0
- package/lib/typescript/components/DrawerLayout.d.ts +1 -0
- package/lib/typescript/components/DrawerLayout.d.ts.map +1 -0
- package/lib/typescript/components/GestureButtons.d.ts +1 -0
- package/lib/typescript/components/GestureButtons.d.ts.map +1 -0
- package/lib/typescript/components/GestureButtonsProps.d.ts +1 -0
- package/lib/typescript/components/GestureButtonsProps.d.ts.map +1 -0
- package/lib/typescript/components/GestureComponents.d.ts +4 -3
- package/lib/typescript/components/GestureComponents.d.ts.map +1 -0
- package/lib/typescript/components/GestureComponents.web.d.ts +1 -0
- package/lib/typescript/components/GestureComponents.web.d.ts.map +1 -0
- package/lib/typescript/components/GestureHandlerButton.d.ts +1 -0
- package/lib/typescript/components/GestureHandlerButton.d.ts.map +1 -0
- package/lib/typescript/components/GestureHandlerButton.web.d.ts +1 -0
- package/lib/typescript/components/GestureHandlerButton.web.d.ts.map +1 -0
- package/lib/typescript/components/GestureHandlerRootView.android.d.ts +1 -0
- package/lib/typescript/components/GestureHandlerRootView.android.d.ts.map +1 -0
- package/lib/typescript/components/GestureHandlerRootView.d.ts +1 -0
- package/lib/typescript/components/GestureHandlerRootView.d.ts.map +1 -0
- package/lib/typescript/components/GestureHandlerRootView.web.d.ts +1 -0
- package/lib/typescript/components/GestureHandlerRootView.web.d.ts.map +1 -0
- package/lib/typescript/components/Pressable/Pressable.d.ts +1 -0
- package/lib/typescript/components/Pressable/Pressable.d.ts.map +1 -0
- package/lib/typescript/components/Pressable/PressableProps.d.ts +17 -1
- package/lib/typescript/components/Pressable/PressableProps.d.ts.map +1 -0
- package/lib/typescript/components/Pressable/index.d.ts +1 -0
- package/lib/typescript/components/Pressable/index.d.ts.map +1 -0
- package/lib/typescript/components/Pressable/utils.d.ts +1 -0
- package/lib/typescript/components/Pressable/utils.d.ts.map +1 -0
- package/lib/typescript/components/ReanimatedDrawerLayout.d.ts +1 -0
- package/lib/typescript/components/ReanimatedDrawerLayout.d.ts.map +1 -0
- package/lib/typescript/components/ReanimatedSwipeable.d.ts +13 -2
- package/lib/typescript/components/ReanimatedSwipeable.d.ts.map +1 -0
- package/lib/typescript/components/Swipeable.d.ts +1 -0
- package/lib/typescript/components/Swipeable.d.ts.map +1 -0
- package/lib/typescript/components/Text.d.ts +1 -0
- package/lib/typescript/components/Text.d.ts.map +1 -0
- package/lib/typescript/components/gestureHandlerRootHOC.d.ts +1 -0
- package/lib/typescript/components/gestureHandlerRootHOC.d.ts.map +1 -0
- package/lib/typescript/components/touchables/ExtraButtonProps.d.ts +1 -0
- package/lib/typescript/components/touchables/ExtraButtonProps.d.ts.map +1 -0
- package/lib/typescript/components/touchables/GenericTouchable.d.ts +1 -0
- package/lib/typescript/components/touchables/GenericTouchable.d.ts.map +1 -0
- package/lib/typescript/components/touchables/GenericTouchableProps.d.ts +1 -0
- package/lib/typescript/components/touchables/GenericTouchableProps.d.ts.map +1 -0
- package/lib/typescript/components/touchables/TouchableHighlight.d.ts +1 -0
- package/lib/typescript/components/touchables/TouchableHighlight.d.ts.map +1 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedback.android.d.ts +1 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedback.android.d.ts.map +1 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedback.d.ts +1 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedback.d.ts.map +1 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedbackProps.d.ts +1 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedbackProps.d.ts.map +1 -0
- package/lib/typescript/components/touchables/TouchableOpacity.d.ts +1 -0
- package/lib/typescript/components/touchables/TouchableOpacity.d.ts.map +1 -0
- package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts +2 -1
- package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts.map +1 -0
- package/lib/typescript/components/touchables/index.d.ts +1 -0
- package/lib/typescript/components/touchables/index.d.ts.map +1 -0
- package/lib/typescript/components/utils.d.ts +5 -0
- package/lib/typescript/components/utils.d.ts.map +1 -0
- package/lib/typescript/findNodeHandle.d.ts +1 -0
- package/lib/typescript/findNodeHandle.d.ts.map +1 -0
- package/lib/typescript/findNodeHandle.web.d.ts +1 -0
- package/lib/typescript/findNodeHandle.web.d.ts.map +1 -0
- package/lib/typescript/getShadowNodeFromRef.d.ts +1 -0
- package/lib/typescript/getShadowNodeFromRef.d.ts.map +1 -0
- package/lib/typescript/getShadowNodeFromRef.web.d.ts +1 -0
- package/lib/typescript/getShadowNodeFromRef.web.d.ts.map +1 -0
- package/lib/typescript/ghQueueMicrotask.d.ts +1 -0
- package/lib/typescript/ghQueueMicrotask.d.ts.map +1 -0
- package/lib/typescript/handlers/FlingGestureHandler.d.ts +1 -1
- package/lib/typescript/handlers/FlingGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/ForceTouchGestureHandler.d.ts +1 -0
- package/lib/typescript/handlers/ForceTouchGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/GestureHandlerEventPayload.d.ts +1 -0
- package/lib/typescript/handlers/GestureHandlerEventPayload.d.ts.map +1 -0
- package/lib/typescript/handlers/LongPressGestureHandler.d.ts +1 -1
- package/lib/typescript/handlers/LongPressGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/NativeViewGestureHandler.d.ts +1 -1
- package/lib/typescript/handlers/NativeViewGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/PanGestureHandler.d.ts +1 -1
- package/lib/typescript/handlers/PanGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/PinchGestureHandler.d.ts +1 -1
- package/lib/typescript/handlers/PinchGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/PressabilityDebugView.d.ts +1 -0
- package/lib/typescript/handlers/PressabilityDebugView.d.ts.map +1 -0
- package/lib/typescript/handlers/PressabilityDebugView.web.d.ts +1 -0
- package/lib/typescript/handlers/PressabilityDebugView.web.d.ts.map +1 -0
- package/lib/typescript/handlers/RotationGestureHandler.d.ts +1 -1
- package/lib/typescript/handlers/RotationGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/TapGestureHandler.d.ts +1 -1
- package/lib/typescript/handlers/TapGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/createHandler.d.ts +1 -0
- package/lib/typescript/handlers/createHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/createNativeWrapper.d.ts +1 -0
- package/lib/typescript/handlers/createNativeWrapper.d.ts.map +1 -0
- package/lib/typescript/handlers/customDirectEventTypes.d.ts +1 -0
- package/lib/typescript/handlers/customDirectEventTypes.d.ts.map +1 -0
- package/lib/typescript/handlers/customDirectEventTypes.web.d.ts +1 -0
- package/lib/typescript/handlers/customDirectEventTypes.web.d.ts.map +1 -0
- package/lib/typescript/handlers/gestureHandlerCommon.d.ts +1 -0
- package/lib/typescript/handlers/gestureHandlerCommon.d.ts.map +1 -0
- package/lib/typescript/handlers/gestureHandlerTypesCompat.d.ts +1 -0
- package/lib/typescript/handlers/gestureHandlerTypesCompat.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/Wrap.d.ts +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/Wrap.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/Wrap.web.d.ts +3 -2
- package/lib/typescript/handlers/gestures/GestureDetector/Wrap.web.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/attachHandlers.d.ts +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/attachHandlers.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/dropHandlers.d.ts +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/dropHandlers.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/index.d.ts +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/index.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/needsToReattach.d.ts +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/needsToReattach.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/types.d.ts +1 -1
- package/lib/typescript/handlers/gestures/GestureDetector/types.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/updateHandlers.d.ts +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/updateHandlers.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useAnimatedGesture.d.ts +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useAnimatedGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useDetectorUpdater.d.ts +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useDetectorUpdater.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useMountReactions.d.ts +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useMountReactions.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useViewRefHandler.d.ts +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useViewRefHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/utils.d.ts +1 -1
- package/lib/typescript/handlers/gestures/GestureDetector/utils.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/eventReceiver.d.ts +1 -0
- package/lib/typescript/handlers/gestures/eventReceiver.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/flingGesture.d.ts +1 -0
- package/lib/typescript/handlers/gestures/flingGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/forceTouchGesture.d.ts +1 -0
- package/lib/typescript/handlers/gestures/forceTouchGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/gesture.d.ts +1 -1
- package/lib/typescript/handlers/gestures/gesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/gestureComposition.d.ts +1 -0
- package/lib/typescript/handlers/gestures/gestureComposition.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/gestureObjects.d.ts +1 -0
- package/lib/typescript/handlers/gestures/gestureObjects.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/gestureStateManager.d.ts +1 -0
- package/lib/typescript/handlers/gestures/gestureStateManager.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/gestureStateManager.web.d.ts +1 -0
- package/lib/typescript/handlers/gestures/gestureStateManager.web.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/hoverGesture.d.ts +1 -0
- package/lib/typescript/handlers/gestures/hoverGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/longPressGesture.d.ts +1 -0
- package/lib/typescript/handlers/gestures/longPressGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/manualGesture.d.ts +1 -0
- package/lib/typescript/handlers/gestures/manualGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/nativeGesture.d.ts +1 -0
- package/lib/typescript/handlers/gestures/nativeGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/panGesture.d.ts +1 -0
- package/lib/typescript/handlers/gestures/panGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/pinchGesture.d.ts +1 -0
- package/lib/typescript/handlers/gestures/pinchGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/reanimatedWrapper.d.ts +1 -0
- package/lib/typescript/handlers/gestures/reanimatedWrapper.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/rotationGesture.d.ts +1 -0
- package/lib/typescript/handlers/gestures/rotationGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/tapGesture.d.ts +1 -0
- package/lib/typescript/handlers/gestures/tapGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/getNextHandlerTag.d.ts +1 -0
- package/lib/typescript/handlers/getNextHandlerTag.d.ts.map +1 -0
- package/lib/typescript/handlers/handlersRegistry.d.ts +1 -0
- package/lib/typescript/handlers/handlersRegistry.d.ts.map +1 -0
- package/lib/typescript/handlers/utils.d.ts +1 -0
- package/lib/typescript/handlers/utils.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/init.d.ts +1 -0
- package/lib/typescript/init.d.ts.map +1 -0
- package/lib/typescript/jestUtils/index.d.ts +1 -0
- package/lib/typescript/jestUtils/index.d.ts.map +1 -0
- package/lib/typescript/jestUtils/jestUtils.d.ts +1 -1
- package/lib/typescript/jestUtils/jestUtils.d.ts.map +1 -0
- package/lib/typescript/mocks.d.ts +1 -0
- package/lib/typescript/mocks.d.ts.map +1 -0
- package/lib/typescript/mountRegistry.d.ts +1 -1
- package/lib/typescript/mountRegistry.d.ts.map +1 -0
- package/lib/typescript/specs/NativeRNGestureHandlerModule.d.ts +1 -0
- package/lib/typescript/specs/NativeRNGestureHandlerModule.d.ts.map +1 -0
- package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.d.ts +1 -1
- package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.d.ts.map +1 -0
- package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts +1 -1
- package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/typeUtils.d.ts +1 -0
- package/lib/typescript/typeUtils.d.ts.map +1 -0
- package/lib/typescript/utils.d.ts +1 -0
- package/lib/typescript/utils.d.ts.map +1 -0
- package/lib/typescript/web/Gestures.d.ts +1 -0
- package/lib/typescript/web/Gestures.d.ts.map +1 -0
- package/lib/typescript/web/constants.d.ts +1 -0
- package/lib/typescript/web/constants.d.ts.map +1 -0
- package/lib/typescript/web/detectors/RotationGestureDetector.d.ts +1 -0
- package/lib/typescript/web/detectors/RotationGestureDetector.d.ts.map +1 -0
- package/lib/typescript/web/detectors/ScaleGestureDetector.d.ts +1 -0
- package/lib/typescript/web/detectors/ScaleGestureDetector.d.ts.map +1 -0
- package/lib/typescript/web/handlers/FlingGestureHandler.d.ts +1 -0
- package/lib/typescript/web/handlers/FlingGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/GestureHandler.d.ts +1 -1
- package/lib/typescript/web/handlers/GestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/HoverGestureHandler.d.ts +1 -0
- package/lib/typescript/web/handlers/HoverGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/IGestureHandler.d.ts +1 -0
- package/lib/typescript/web/handlers/IGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/LongPressGestureHandler.d.ts +1 -1
- package/lib/typescript/web/handlers/LongPressGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/ManualGestureHandler.d.ts +1 -0
- package/lib/typescript/web/handlers/ManualGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/NativeViewGestureHandler.d.ts +1 -1
- package/lib/typescript/web/handlers/NativeViewGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/PanGestureHandler.d.ts +1 -0
- package/lib/typescript/web/handlers/PanGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/PinchGestureHandler.d.ts +1 -1
- package/lib/typescript/web/handlers/PinchGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/RotationGestureHandler.d.ts +1 -1
- package/lib/typescript/web/handlers/RotationGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/TapGestureHandler.d.ts +1 -0
- package/lib/typescript/web/handlers/TapGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/interfaces.d.ts +1 -0
- package/lib/typescript/web/interfaces.d.ts.map +1 -0
- package/lib/typescript/web/tools/CircularBuffer.d.ts +1 -0
- package/lib/typescript/web/tools/CircularBuffer.d.ts.map +1 -0
- package/lib/typescript/web/tools/EventManager.d.ts +1 -0
- package/lib/typescript/web/tools/EventManager.d.ts.map +1 -0
- package/lib/typescript/web/tools/GestureHandlerDelegate.d.ts +1 -0
- package/lib/typescript/web/tools/GestureHandlerDelegate.d.ts.map +1 -0
- package/lib/typescript/web/tools/GestureHandlerOrchestrator.d.ts +1 -0
- package/lib/typescript/web/tools/GestureHandlerOrchestrator.d.ts.map +1 -0
- package/lib/typescript/web/tools/GestureHandlerWebDelegate.d.ts +1 -0
- package/lib/typescript/web/tools/GestureHandlerWebDelegate.d.ts.map +1 -0
- package/lib/typescript/web/tools/InteractionManager.d.ts +1 -0
- package/lib/typescript/web/tools/InteractionManager.d.ts.map +1 -0
- package/lib/typescript/web/tools/KeyboardEventManager.d.ts +1 -0
- package/lib/typescript/web/tools/KeyboardEventManager.d.ts.map +1 -0
- package/lib/typescript/web/tools/LeastSquareSolver.d.ts +1 -0
- package/lib/typescript/web/tools/LeastSquareSolver.d.ts.map +1 -0
- package/lib/typescript/web/tools/NodeManager.d.ts +1 -0
- package/lib/typescript/web/tools/NodeManager.d.ts.map +1 -0
- package/lib/typescript/web/tools/PointerEventManager.d.ts +1 -0
- package/lib/typescript/web/tools/PointerEventManager.d.ts.map +1 -0
- package/lib/typescript/web/tools/PointerTracker.d.ts +1 -0
- package/lib/typescript/web/tools/PointerTracker.d.ts.map +1 -0
- package/lib/typescript/web/tools/Vector.d.ts +1 -0
- package/lib/typescript/web/tools/Vector.d.ts.map +1 -0
- package/lib/typescript/web/tools/VelocityTracker.d.ts +1 -0
- package/lib/typescript/web/tools/VelocityTracker.d.ts.map +1 -0
- package/lib/typescript/web/tools/WheelEventManager.d.ts +1 -0
- package/lib/typescript/web/tools/WheelEventManager.d.ts.map +1 -0
- package/lib/typescript/web/utils.d.ts +1 -0
- package/lib/typescript/web/utils.d.ts.map +1 -0
- package/lib/typescript/web_hammer/DiscreteGestureHandler.d.ts +1 -0
- package/lib/typescript/web_hammer/DiscreteGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/DraggingGestureHandler.d.ts +1 -0
- package/lib/typescript/web_hammer/DraggingGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/Errors.d.ts +1 -0
- package/lib/typescript/web_hammer/Errors.d.ts.map +1 -0
- package/lib/typescript/web_hammer/FlingGestureHandler.d.ts +1 -0
- package/lib/typescript/web_hammer/FlingGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/GestureHandler.d.ts +1 -0
- package/lib/typescript/web_hammer/GestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/IndiscreteGestureHandler.d.ts +1 -0
- package/lib/typescript/web_hammer/IndiscreteGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/LongPressGestureHandler.d.ts +1 -0
- package/lib/typescript/web_hammer/LongPressGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/NativeViewGestureHandler.d.ts +1 -0
- package/lib/typescript/web_hammer/NativeViewGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/NodeManager.d.ts +1 -0
- package/lib/typescript/web_hammer/NodeManager.d.ts.map +1 -0
- package/lib/typescript/web_hammer/PanGestureHandler.d.ts +1 -0
- package/lib/typescript/web_hammer/PanGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/PinchGestureHandler.d.ts +1 -0
- package/lib/typescript/web_hammer/PinchGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/PressGestureHandler.d.ts +1 -0
- package/lib/typescript/web_hammer/PressGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/RotationGestureHandler.d.ts +1 -0
- package/lib/typescript/web_hammer/RotationGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/TapGestureHandler.d.ts +1 -0
- package/lib/typescript/web_hammer/TapGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/constants.d.ts +1 -0
- package/lib/typescript/web_hammer/constants.d.ts.map +1 -0
- package/lib/typescript/web_hammer/utils.d.ts +1 -0
- package/lib/typescript/web_hammer/utils.d.ts.map +1 -0
- package/package.json +27 -47
- package/src/components/DrawerLayout.tsx +5 -2
- package/src/components/GestureButtons.tsx +2 -2
- package/src/components/GestureComponents.web.tsx +1 -1
- package/src/components/GestureHandlerButton.web.tsx +3 -3
- package/src/components/Pressable/Pressable.tsx +34 -9
- package/src/components/Pressable/PressableProps.tsx +19 -0
- package/src/components/ReanimatedSwipeable.tsx +55 -33
- package/src/components/Swipeable.tsx +3 -0
- package/src/components/Text.tsx +5 -2
- package/src/components/utils.ts +26 -0
- package/src/getShadowNodeFromRef.ts +2 -2
- package/src/handlers/createHandler.tsx +1 -0
- package/src/handlers/gestures/reanimatedWrapper.ts +0 -1
- package/src/handlers/utils.ts +1 -1
- package/src/utils.ts +0 -1
- package/src/web_hammer/DiscreteGestureHandler.ts +1 -1
- package/src/web_hammer/DraggingGestureHandler.ts +1 -1
- package/src/web_hammer/FlingGestureHandler.ts +1 -1
- package/src/web_hammer/GestureHandler.ts +2 -1
- package/src/web_hammer/LongPressGestureHandler.ts +1 -1
- package/README.md +0 -71
- package/android/packageDeprecated/src/main/java/com/swmansion/gesturehandler/RNGestureHandlerPackage.kt +0 -85
- package/android/paper77/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerButtonManagerDelegate.java +0 -60
- package/android/paper77/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerButtonManagerInterface.java +0 -26
- package/android/paper77/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerRootViewManagerDelegate.java +0 -26
- package/android/paper77/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerRootViewManagerInterface.java +0 -16
- package/android/paper77/src/main/java/com/swmansion/gesturehandler/NativeRNGestureHandlerModuleSpec.java +0 -67
- package/android/paper77/src/main/java/com/swmansion/gesturehandler/ReactContextExtensions.kt +0 -13
- package/lib/commonjs/handlers/NativeViewGestureHandler.js +0 -35
- package/lib/commonjs/handlers/NativeViewGestureHandler.js.map +0 -1
- package/lib/commonjs/handlers/gestures/nativeGesture.js +0 -44
- package/lib/commonjs/handlers/gestures/nativeGesture.js.map +0 -1
- package/lib/commonjs/specs/NativeRNGestureHandlerModule.js +0 -13
- package/lib/commonjs/specs/NativeRNGestureHandlerModule.js.map +0 -1
- package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js +0 -15
- package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js.map +0 -1
- package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js +0 -15
- package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js.map +0 -1
- package/lib/commonjs/web/handlers/NativeViewGestureHandler.js +0 -189
- package/lib/commonjs/web/handlers/NativeViewGestureHandler.js.map +0 -1
- package/lib/commonjs/web_hammer/NativeViewGestureHandler.js +0 -66
- package/lib/commonjs/web_hammer/NativeViewGestureHandler.js.map +0 -1
- package/lib/module/handlers/NativeViewGestureHandler.js +0 -19
- package/lib/module/handlers/NativeViewGestureHandler.js.map +0 -1
- package/lib/module/handlers/gestures/nativeGesture.js.map +0 -1
- package/lib/module/specs/NativeRNGestureHandlerModule.js +0 -3
- package/lib/module/specs/NativeRNGestureHandlerModule.js.map +0 -1
- package/lib/module/specs/RNGestureHandlerButtonNativeComponent.js +0 -3
- package/lib/module/specs/RNGestureHandlerButtonNativeComponent.js.map +0 -1
- package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.js +0 -3
- package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.js.map +0 -1
- package/lib/module/web/handlers/NativeViewGestureHandler.js.map +0 -1
- package/lib/module/web_hammer/NativeViewGestureHandler.js +0 -49
- package/lib/module/web_hammer/NativeViewGestureHandler.js.map +0 -1
- /package/android/{common → noreanimated}/src/main/java/com/swmansion/common/GestureHandlerStateManager.kt +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useAnimatedGesture.ts"],"names":["getHandler","type","gesture","CALLBACK_TYPE","BEGAN","onBegin","START","onStart","UPDATE","onUpdate","CHANGE","onChange","END","onEnd","FINALIZE","onFinalize","TOUCHES_DOWN","onTouchesDown","TOUCHES_MOVE","onTouchesMove","TOUCHES_UP","onTouchesUp","TOUCHES_CANCELLED","onTouchesCancelled","touchEventTypeToCallbackType","eventType","TouchEventType","UNDEFINED","runWorklet","event","args","handler","isWorklet","console","warn","isStateChangeEvent","oldState","isTouchEvent","useAnimatedGesture","preparedGesture","needsRebuild","Reanimated","sharedHandlersCallbacks","useSharedValue","lastUpdateEvent","stateControllers","callback","currentCallback","value","i","length","handlerTag","State","UNDETERMINED","state","ACTIVE","undefined","FAILED","CANCELLED","GestureStateManager","create","changeEventCalculator","useEvent","animatedEventHandler","animatedHandlers"],"mappings":";;;;;;;AAAA;;AACA;;AAMA;;AAIA;;AACA;;AACA;;AAGA,SAASA,UAAT,CACEC,IADF,EAEEC,OAFF,EAGE;AACA;;AACA,UAAQD,IAAR;AACE,SAAKE,uBAAcC,KAAnB;AACE,aAAOF,OAAO,CA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,gBAAgB,CAACI,CAAD,CAArB,EAA0B;AACxBJ,UAAAA,gBAAgB,CAACI,CAAD,CAAhB,GAAsBU,yCAAoBC,MAApB,CAA2B/B,KAAK,CAACsB,UAAjC,CAAtB;AACD;;AAED,YAAItB,KAAK,CAACJ,SAAN,KAAoBC,+BAAe2B,YAAvC,EAAqD;AACnDzB,UAAAA,UAAU,CACRJ,4BAA4B,CAACK,KAAK,CAACJ,SAAP,CADpB,EAERvB,OAFQ,EAGR2B,KAHQ,EAIRgB,gBAAgB,CAACI,CAAD,CAJR,CAAV;AAMD;AACF,OAbM,MAaA;AACLrB,QAAAA,UAAU,CAACzB,uBAAcK,MAAf,EAAuBN,OAAvB,EAAgC2B,KAAhC,CAAV;;AAEA,YAAI3B,OAAO,CAACS,QAAR,IAAoBT,OAAO,CAAC2D,qBAAhC,EAAuD;AAAA;;AACrDjC,UAAAA,UAAU,CACRzB,uBAAcO,MADN,EAERR,OAFQ,2BAGRA,OAAO,CAAC2D,qBAHA,0DAGR,2BAAA3D,OAAO,EACL2B,KADK,EAELe,eAAe,CAACI,KAAhB,CAAsB9C,OAAO,CAACiD,UAA9B,CAFK,CAHC,CAAV;AASAP,UAAAA,eAAe,CAACI,KAAhB,CAAsB9C,OAAO,CAACiD,UAA9B,IAA4CtB,KAA5C;AACD;AACF;AACF;AACF,GA7ED,CApBA,CAmGA;;;AACA,QAAMA,KAAK,GAAGY,8BAAWqB,QAAX,CACZhB,QADY,EAEZ,CAAC,6BAAD,EAAgC,uBAAhC,CAFY,EAGZN,YAHY,CAAd;;AAMAD,EAAAA,eAAe,CAACwB,oBAAhB,GAAuClC,KAAvC;AACAU,EAAAA,eAAe,CAACyB,gBAAhB,GAAmCtB,uBAAnC;AACD","sourcesContent":["import { HandlerCallbacks, CALLBACK_TYPE } from '../gesture';\nimport { Reanimated } from '../reanimatedWrapper';\nimport {\n GestureTouchEvent,\n GestureUpdateEvent,\n GestureStateChangeEvent,\n} from '../../gestureHandlerCommon';\nimport {\n GestureStateManager,\n GestureStateManagerType,\n} from '../gestureStateManager';\nimport { State } from '../../../State';\nimport { TouchEventType } from '../../../TouchEventType';\nimport { tagMessage } from '../../../utils';\nimport { AttachedGestureState } from './types';\n\nfunction getHandler(\n type: CALLBACK_TYPE,\n gesture: HandlerCallbacks<Record<string, unknown>>\n) {\n 'worklet';\n switch (type) {\n case CALLBACK_TYPE.BEGAN:\n return gesture.onBegin;\n case CALLBACK_TYPE.START:\n return gesture.onStart;\n case CALLBACK_TYPE.UPDATE:\n return gesture.onUpdate;\n case CALLBACK_TYPE.CHANGE:\n return gesture.onChange;\n case CALLBACK_TYPE.END:\n return gesture.onEnd;\n case CALLBACK_TYPE.FINALIZE:\n return gesture.onFinalize;\n case CALLBACK_TYPE.TOUCHES_DOWN:\n return gesture.onTouchesDown;\n case CALLBACK_TYPE.TOUCHES_MOVE:\n return gesture.onTouchesMove;\n case CALLBACK_TYPE.TOUCHES_UP:\n return gesture.onTouchesUp;\n case CALLBACK_TYPE.TOUCHES_CANCELLED:\n return gesture.onTouchesCancelled;\n }\n}\n\nfunction touchEventTypeToCallbackType(\n eventType: TouchEventType\n): CALLBACK_TYPE {\n 'worklet';\n switch (eventType) {\n case TouchEventType.TOUCHES_DOWN:\n return CALLBACK_TYPE.TOUCHES_DOWN;\n case TouchEventType.TOUCHES_MOVE:\n return CALLBACK_TYPE.TOUCHES_MOVE;\n case TouchEventType.TOUCHES_UP:\n return CALLBACK_TYPE.TOUCHES_UP;\n case TouchEventType.TOUCHES_CANCELLED:\n return CALLBACK_TYPE.TOUCHES_CANCELLED;\n }\n return CALLBACK_TYPE.UNDEFINED;\n}\n\nfunction runWorklet(\n type: CALLBACK_TYPE,\n gesture: HandlerCallbacks<Record<string, unknown>>,\n event: GestureStateChangeEvent | GestureUpdateEvent | GestureTouchEvent,\n ...args: unknown[]\n) {\n 'worklet';\n const handler = getHandler(type, gesture);\n if (gesture.isWorklet[type]) {\n // @ts-ignore Logic below makes sure the correct event is send to the\n // correct handler.\n handler?.(event, ...args);\n } else if (handler) {\n console.warn(tagMessage('Animated gesture callback must be a worklet'));\n }\n}\n\nfunction isStateChangeEvent(\n event: GestureUpdateEvent | GestureStateChangeEvent | GestureTouchEvent\n): event is GestureStateChangeEvent {\n 'worklet';\n // @ts-ignore Yes, the oldState prop is missing on GestureTouchEvent, that's the point\n return event.oldState != null;\n}\n\nfunction isTouchEvent(\n event: GestureUpdateEvent | GestureStateChangeEvent | GestureTouchEvent\n): event is GestureTouchEvent {\n 'worklet';\n return event.eventType != null;\n}\n\nexport function useAnimatedGesture(\n preparedGesture: AttachedGestureState,\n needsRebuild: boolean\n) {\n if (!Reanimated) {\n return;\n }\n\n // Hooks are called conditionally, but the condition is whether the\n // react-native-reanimated is installed, which shouldn't change while running\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const sharedHandlersCallbacks = Reanimated.useSharedValue<\n HandlerCallbacks<Record<string, unknown>>[] | null\n >(null);\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const lastUpdateEvent = Reanimated.useSharedValue<\n (GestureUpdateEvent | undefined)[]\n >([]);\n\n // not every gesture needs a state controller, init them lazily\n const stateControllers: GestureStateManagerType[] = [];\n\n const callback = (\n event: GestureStateChangeEvent | GestureUpdateEvent | GestureTouchEvent\n ) => {\n 'worklet';\n\n const currentCallback = sharedHandlersCallbacks.value;\n if (!currentCallback) {\n return;\n }\n\n for (let i = 0; i < currentCallback.length; i++) {\n const gesture = currentCallback[i];\n\n if (event.handlerTag !== gesture.handlerTag) {\n continue;\n }\n\n if (isStateChangeEvent(event)) {\n if (\n event.oldState === State.UNDETERMINED &&\n event.state === State.BEGAN\n ) {\n runWorklet(CALLBACK_TYPE.BEGAN, gesture, event);\n } else if (\n (event.oldState === State.BEGAN ||\n event.oldState === State.UNDETERMINED) &&\n event.state === State.ACTIVE\n ) {\n runWorklet(CALLBACK_TYPE.START, gesture, event);\n lastUpdateEvent.value[gesture.handlerTag] = undefined;\n } else if (\n event.oldState !== event.state &&\n event.state === State.END\n ) {\n if (event.oldState === State.ACTIVE) {\n runWorklet(CALLBACK_TYPE.END, gesture, event, true);\n }\n runWorklet(CALLBACK_TYPE.FINALIZE, gesture, event, true);\n } else if (\n (event.state === State.FAILED || event.state === State.CANCELLED) &&\n event.state !== event.oldState\n ) {\n if (event.oldState === State.ACTIVE) {\n runWorklet(CALLBACK_TYPE.END, gesture, event, false);\n }\n runWorklet(CALLBACK_TYPE.FINALIZE, gesture, event, false);\n }\n } else if (isTouchEvent(event)) {\n if (!stateControllers[i]) {\n stateControllers[i] = GestureStateManager.create(event.handlerTag);\n }\n\n if (event.eventType !== TouchEventType.UNDETERMINED) {\n runWorklet(\n touchEventTypeToCallbackType(event.eventType),\n gesture,\n event,\n stateControllers[i]\n );\n }\n } else {\n runWorklet(CALLBACK_TYPE.UPDATE, gesture, event);\n\n if (gesture.onChange && gesture.changeEventCalculator) {\n runWorklet(\n CALLBACK_TYPE.CHANGE,\n gesture,\n gesture.changeEventCalculator?.(\n event,\n lastUpdateEvent.value[gesture.handlerTag]\n )\n );\n\n lastUpdateEvent.value[gesture.handlerTag] = event;\n }\n }\n }\n };\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const event = Reanimated.useEvent(\n callback,\n ['onGestureHandlerStateChange', 'onGestureHandlerEvent'],\n needsRebuild\n );\n\n preparedGesture.animatedEventHandler = event;\n preparedGesture.animatedHandlers = sharedHandlersCallbacks;\n}\n"]}
|
1
|
+
{"version":3,"names":["_gesture","require","_reanimatedWrapper","_gestureStateManager","_State","_TouchEventType","_utils","getHandler","type","gesture","CALLBACK_TYPE","BEGAN","onBegin","START","onStart","UPDATE","onUpdate","CHANGE","onChange","END","onEnd","FINALIZE","onFinalize","TOUCHES_DOWN","onTouchesDown","TOUCHES_MOVE","onTouchesMove","TOUCHES_UP","onTouchesUp","TOUCHES_CANCELLED","onTouchesCancelled","touchEventTypeToCallbackType","eventType","TouchEventType","UNDEFINED","runWorklet","event","args","handler","isWorklet","console","warn","tagMessage","isStateChangeEvent","oldState","isTouchEvent","useAnimatedGesture","preparedGesture","needsRebuild","Reanimated","sharedHandlersCallbacks","useSharedValue","lastUpdateEvent","stateControllers","callback","currentCallback","value","i","length","handlerTag","State","UNDETERMINED","state","ACTIVE","undefined","FAILED","CANCELLED","GestureStateManager","create","changeEventCalculator","useEvent","animatedEventHandler","animatedHandlers"],"sourceRoot":"../../../../../src","sources":["handlers/gestures/GestureDetector/useAnimatedGesture.ts"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAD,OAAA;AAMA,IAAAE,oBAAA,GAAAF,OAAA;AAIA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAGA,SAASM,UAAUA,CACjBC,IAAmB,EACnBC,OAAkD,EAClD;EACA,SAAS;;EACT,QAAQD,IAAI;IACV,KAAKE,sBAAa,CAACC,KAAK;MACtB,OAAOF,OAAO,CAACG,OAAO;IACxB,KAAKF,sBAAa,CAACG,KAAK;MACtB,OAAOJ,OAAO,CAACK,OAAO;IACxB,KAAKJ,sBAAa,CAACK,MAAM;MACvB,OAAON,OAAO,CAACO,QAAQ;IACzB,KAAKN,sBAAa,CAACO,MAAM;MACvB,OAAOR,OAAO,CAACS,QAAQ;IACzB,KAAKR,sBAAa,CAACS,GAAG;MACpB,OAAOV,OAAO,CAACW,KAAK;IACtB,KAAKV,sBAAa,CAACW,QAAQ;MACzB,OAAOZ,OAAO,CAACa,UAAU;IAC3B,KAAKZ,sBAAa,CAACa,YAAY;MAC7B,OAAOd,OAAO,CAACe,aAAa;IAC9B,KAAKd,sBAAa,CAACe,YAAY;MAC7B,OAAOhB,OAAO,CAACiB,aAAa;IAC9B,KAAKhB,sBAAa,CAACiB,UAAU;MAC3B,OAAOlB,OAAO,CAACmB,WAAW;IAC5B,KAAKlB,sBAAa,CAACmB,iBAAiB;MAClC,OAAOpB,OAAO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AE;UACrDlC,UAAU,CACRzB,sBAAa,CAACO,MAAM,EACpBR,OAAO,EACPA,OAAO,CAAC4D,qBAAqB,GAC3BjC,KAAK,EACLgB,eAAe,CAACI,KAAK,CAAC/C,OAAO,CAACkD,UAAU,CAC1C,CACF,CAAC;UAEDP,eAAe,CAACI,KAAK,CAAC/C,OAAO,CAACkD,UAAU,CAAC,GAAGvB,KAAK;QACnD;MACF;IACF;EACF,CAAC;;EAED;EACA,MAAMA,KAAK,GAAGa,6BAAU,CAACqB,QAAQ,CAC/BhB,QAAQ,EACR,CAAC,6BAA6B,EAAE,uBAAuB,CAAC,EACxDN,YACF,CAAC;EAEDD,eAAe,CAACwB,oBAAoB,GAAGnC,KAAK;EAC5CW,eAAe,CAACyB,gBAAgB,GAAGtB,uBAAuB;AAC5D","ignoreList":[]}
|
@@ -4,34 +4,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.useDetectorUpdater = useDetectorUpdater;
|
7
|
-
|
8
7
|
var _react = require("react");
|
9
|
-
|
10
8
|
var _attachHandlers = require("./attachHandlers");
|
11
|
-
|
12
9
|
var _updateHandlers = require("./updateHandlers");
|
13
|
-
|
14
10
|
var _needsToReattach = require("./needsToReattach");
|
15
|
-
|
16
11
|
var _dropHandlers = require("./dropHandlers");
|
17
|
-
|
18
12
|
var _utils = require("./utils");
|
19
|
-
|
20
13
|
var _findNodeHandle = _interopRequireDefault(require("../../../findNodeHandle"));
|
21
|
-
|
22
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
23
|
-
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
24
15
|
// Returns a function that's responsible for updating the attached gestures
|
25
16
|
// If the view has changed, it will reattach the handlers to the new view
|
26
17
|
// If the view remains the same, it will update the handlers with the new config
|
27
18
|
function useDetectorUpdater(state, preparedGesture, gesturesToAttach, gestureConfig, webEventHandlersRef) {
|
28
19
|
const forceRender = (0, _utils.useForceRender)();
|
29
|
-
const updateAttachedGestures = (0, _react.useCallback)(
|
20
|
+
const updateAttachedGestures = (0, _react.useCallback)(
|
21
|
+
// skipConfigUpdate is used to prevent unnecessary updates when only checking if the view has changed
|
30
22
|
skipConfigUpdate => {
|
31
23
|
// If the underlying view has changed we need to reattach handlers to the new view
|
32
24
|
const viewTag = (0, _findNodeHandle.default)(state.viewRef);
|
33
25
|
const didUnderlyingViewChange = viewTag !== state.previousViewTag;
|
34
|
-
|
35
26
|
if (didUnderlyingViewChange || (0, _needsToReattach.needsToReattach)(preparedGesture, gesturesToAttach)) {
|
36
27
|
(0, _utils.validateDetectorChildren)(state.viewRef);
|
37
28
|
(0, _dropHandlers.dropHandlers)(preparedGesture);
|
@@ -42,7 +33,6 @@ function useDetectorUpdater(state, preparedGesture, gesturesToAttach, gestureCon
|
|
42
33
|
webEventHandlersRef,
|
43
34
|
viewTag
|
44
35
|
});
|
45
|
-
|
46
36
|
if (didUnderlyingViewChange) {
|
47
37
|
state.previousViewTag = viewTag;
|
48
38
|
state.forceRebuildReanimatedEvent = true;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["_react","require","_attachHandlers","_updateHandlers","_needsToReattach","_dropHandlers","_utils","_findNodeHandle","_interopRequireDefault","e","__esModule","default","useDetectorUpdater","state","preparedGesture","gesturesToAttach","gestureConfig","webEventHandlersRef","forceRender","useForceRender","updateAttachedGestures","useCallback","skipConfigUpdate","viewTag","findNodeHandle","viewRef","didUnderlyingViewChange","previousViewTag","needsToReattach","validateDetectorChildren","dropHandlers","attachHandlers","forceRebuildReanimatedEvent","updateHandlers"],"sourceRoot":"../../../../../src","sources":["handlers/gestures/GestureDetector/useDetectorUpdater.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AASA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAH,O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CAEvB,CAAC;EAED,OAAOG,sBAAsB;AAC/B","ignoreList":[]}
|
@@ -4,27 +4,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.useMountReactions = useMountReactions;
|
7
|
-
|
8
7
|
var _utils = require("../../utils");
|
9
|
-
|
10
8
|
var _mountRegistry = require("../../../mountRegistry");
|
11
|
-
|
12
9
|
var _react = require("react");
|
13
|
-
|
14
10
|
function shouldUpdateDetector(relation, gesture) {
|
15
11
|
if (relation === undefined) {
|
16
12
|
return false;
|
17
13
|
}
|
18
|
-
|
19
14
|
for (const tag of (0, _utils.transformIntoHandlerTags)(relation)) {
|
20
15
|
if (tag === gesture.handlerTag) {
|
21
16
|
return true;
|
22
17
|
}
|
23
18
|
}
|
24
|
-
|
25
19
|
return false;
|
26
20
|
}
|
27
|
-
|
28
21
|
function useMountReactions(updateDetector, state) {
|
29
22
|
(0, _react.useEffect)(() => {
|
30
23
|
return _mountRegistry.MountRegistry.addMountListener(gesture => {
|
@@ -35,10 +28,10 @@ function useMountReactions(updateDetector, state) {
|
|
35
28
|
const blocksHandlers = attachedGesture.config.blocksHandlers;
|
36
29
|
const requireToFail = attachedGesture.config.requireToFail;
|
37
30
|
const simultaneousWith = attachedGesture.config.simultaneousWith;
|
38
|
-
|
39
31
|
if (shouldUpdateDetector(blocksHandlers, gesture) || shouldUpdateDetector(requireToFail, gesture) || shouldUpdateDetector(simultaneousWith, gesture)) {
|
40
|
-
updateDetector();
|
32
|
+
updateDetector();
|
41
33
|
|
34
|
+
// We can safely return here, if any other gestures should be updated, they will be by the above call
|
42
35
|
return;
|
43
36
|
}
|
44
37
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["_utils","require","_mountRegistry","_react","shouldUpdateDetector","relation","gesture","undefined","tag","transformIntoHandlerTags","handlerTag","useMountReactions","updateDetector","state","useEffect","MountRegistry","addMountListener","attachedGesture","attachedGestures","blocksHandlers","config","requireToFail","simultaneousWith"],"sourceRoot":"../../../../../src","sources":["handlers/gestures/GestureDetector/useMountReactions.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAGA,SAASG,oBAAoBA,CAC3BC,QAAkC,EAClCC,OAA+B,EAC/B;EACA,IAAID,QAAQ,KAAKE,SAAS,EAAE;IAC1B,OAAO,KAAK;EACd;EAEA,KAAK,MAAMC,GAAG,IAAI,IAAAC,+BAAwB,EAACJ,QAAQ,CAAC,EAAE;IACpD,IAAIG,GAAG,KAAKF,OAAO,CAACI,UAAU,EAAE;MAC9B,OAAO,IAAI;IACb;EACF;EAEA,OAAO,KAAK;AACd;AAEO,SAASC,iBAAiBA,CAC/BC,cAA0B,EAC1BC,KAA2B,EAC3B;EACA,IAAAC,gBAAS,EAAC,MAAM;IACd,OAAOC,4BAAa,CAACC,gBAAgB,CAAEV,OAAO,IAAK;MACjD;MACA;MACA;MACA,KAAK,MAAMW,eAAe,IAAIJ,KAAK,CAACK,gBAAgB,EAAE;QACpD,MAAMC,cAAc,GAAGF,eAAe,CAACG,MAAM,CAACD,cAAc;QAC5D,MAAME,aAAa,GAAGJ,eAAe,CAACG,MAAM,CAACC,aAAa;QAC1D,MAAMC,gBAAgB,GAAGL,eAAe,CAACG,MAAM,CAACE,gBAAgB;QAEhE,IACElB,oBAAoB,CAACe,cAAc,EAAEb,OAAO,CAAC,IAC7CF,oBAAoB,CAACiB,aAAa,EAAEf,OAAO,CAAC,IAC5CF,oBAAoB,CAACkB,gBAAgB,EAAEhB,OAAO,CAAC,EAC/C;UACAM,cAAc,CAAC,CAAC;;UAEhB;UACA;QACF;MACF;IACF,CAAC,CAAC;EACJ,CAAC,EAAE,CAACA,cAAc,EAAEC,KAAK,CAAC,CAAC;AAC7B","ignoreList":[]}
|
@@ -4,17 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.useViewRefHandler = useViewRefHandler;
|
7
|
-
|
8
7
|
var _utils = require("../../../utils");
|
9
|
-
|
10
8
|
var _getShadowNodeFromRef = require("../../../getShadowNodeFromRef");
|
11
|
-
|
12
9
|
var _react = require("react");
|
13
|
-
|
14
10
|
var _findNodeHandle = _interopRequireDefault(require("../../../findNodeHandle"));
|
15
|
-
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17
|
-
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
18
12
|
// Ref handler for the Wrap component attached under the GestureDetector.
|
19
13
|
// It's responsible for setting the viewRef on the state and triggering the reattaching of handlers
|
20
14
|
// if the view has changed.
|
@@ -23,22 +17,20 @@ function useViewRefHandler(state, updateAttachedGestures) {
|
|
23
17
|
if (ref === null) {
|
24
18
|
return;
|
25
19
|
}
|
20
|
+
state.viewRef = ref;
|
26
21
|
|
27
|
-
|
28
|
-
|
22
|
+
// if it's the first render, also set the previousViewTag to prevent reattaching gestures when not needed
|
29
23
|
if (state.previousViewTag === -1) {
|
30
24
|
state.previousViewTag = (0, _findNodeHandle.default)(state.viewRef);
|
31
|
-
}
|
32
|
-
// in case the view has changed. If the view doesn't change, the update will be handled by detector.
|
33
|
-
|
25
|
+
}
|
34
26
|
|
27
|
+
// Pass true as `skipConfigUpdate`. Here we only want to trigger the eventual reattaching of handlers
|
28
|
+
// in case the view has changed. If the view doesn't change, the update will be handled by detector.
|
35
29
|
if (!state.firstRender) {
|
36
30
|
updateAttachedGestures(true);
|
37
31
|
}
|
38
|
-
|
39
32
|
if (__DEV__ && (0, _utils.isFabric)() && global.isViewFlatteningDisabled) {
|
40
33
|
const node = (0, _getShadowNodeFromRef.getShadowNodeFromRef)(ref);
|
41
|
-
|
42
34
|
if (global.isViewFlatteningDisabled(node) === false) {
|
43
35
|
console.error((0, _utils.tagMessage)('GestureDetector has received a child that may get view-flattened. ' + '\nTo prevent it from misbehaving you need to wrap the child with a `<View collapsable={false}>`.'));
|
44
36
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["_utils","require","_getShadowNodeFromRef","_react","_findNodeHandle","_interopRequireDefault","e","__esModule","default","useViewRefHandler","state","updateAttachedGestures","refHandler","useCallback","ref","viewRef","previousViewTag","findNodeHandle","firstRender","__DEV__","isFabric","global","isViewFlatteningDisabled","node","getShadowNodeFromRef","console","error","tagMessage"],"sourceRoot":"../../../../../src","sources":["handlers/gestures/GestureDetector/useViewRefHandler.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,qBAAA,GAAAD,OAAA;AAGA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,eAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAAqD,SAAAI,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAMrD;AACA;AACA;AACO,SAASG,iBAAiBA,CAC/BC,KAA2B,EAC3BC,sBAA4D,EAC5D;EACA,MAAMC,UAAU,GAAG,IAAAC,kBAAW,EAC3BC,GAA2B,IAAK;IAC/B,IAAIA,GAAG,KAAK,IAAI,EAAE;MAChB;IACF;IAEAJ,KAAK,CAACK,OAAO,GAAGD,GAAG;;IAEnB;IACA,IAAIJ,KAAK,CAACM,eAAe,KAAK,CAAC,CAAC,EAAE;MAChCN,KAAK,CAACM,eAAe,GAAG,IAAAC,uBAAc,EAACP,KAAK,CAACK,OAAO,CAAW;IACjE;;IAEA;IACA;IACA,IAAI,CAACL,KAAK,CAACQ,WAAW,EAAE;MACtBP,sBAAsB,CAAC,IAAI,CAAC;IAC9B;IAEA,IAAIQ,OAAO,IAAI,IAAAC,eAAQ,EAAC,CAAC,IAAIC,MAAM,CAACC,wBAAwB,EAAE;MAC5D,MAAMC,IAAI,GAAG,IAAAC,0CAAoB,EAACV,GAAG,CAAC;MACtC,IAAIO,MAAM,CAACC,wBAAwB,CAACC,IAAI,CAAC,KAAK,KAAK,EAAE;QACnDE,OAAO,CAACC,KAAK,CACX,IAAAC,iBAAU,EACR,oEAAoE,GAClE,kGACJ,CACF,CAAC;MACH;IACF;EACF,CAAC,EACD,CAACjB,KAAK,EAAEC,sBAAsB,CAChC,CAAC;EAED,OAAOC,UAAU;AACnB","ignoreList":[]}
|
@@ -3,68 +3,43 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.ALLOWED_PROPS = void 0;
|
7
7
|
exports.checkGestureCallbacksForWorklets = checkGestureCallbacksForWorklets;
|
8
|
-
exports.
|
8
|
+
exports.extractGestureRelations = extractGestureRelations;
|
9
9
|
exports.useForceRender = useForceRender;
|
10
10
|
exports.useWebEventHandlers = useWebEventHandlers;
|
11
|
-
exports.
|
12
|
-
|
11
|
+
exports.validateDetectorChildren = validateDetectorChildren;
|
13
12
|
var _reactNative = require("react-native");
|
14
|
-
|
15
13
|
var _utils = require("../../../utils");
|
16
|
-
|
17
14
|
var _gesture = require("../gesture");
|
18
|
-
|
19
15
|
var _FlingGestureHandler = require("../../FlingGestureHandler");
|
20
|
-
|
21
16
|
var _ForceTouchGestureHandler = require("../../ForceTouchGestureHandler");
|
22
|
-
|
23
17
|
var _LongPressGestureHandler = require("../../LongPressGestureHandler");
|
24
|
-
|
25
18
|
var _PanGestureHandler = require("../../PanGestureHandler");
|
26
|
-
|
27
19
|
var _TapGestureHandler = require("../../TapGestureHandler");
|
28
|
-
|
29
20
|
var _hoverGesture = require("../hoverGesture");
|
30
|
-
|
31
21
|
var _NativeViewGestureHandler = require("../../NativeViewGestureHandler");
|
32
|
-
|
33
22
|
var _gestureHandlerCommon = require("../../gestureHandlerCommon");
|
34
|
-
|
35
23
|
var _EnableNewWebImplementation = require("../../../EnableNewWebImplementation");
|
36
|
-
|
37
24
|
var _RNRenderer = require("../../../RNRenderer");
|
38
|
-
|
39
25
|
var _react = require("react");
|
40
|
-
|
41
26
|
var _reanimatedWrapper = require("../reanimatedWrapper");
|
42
|
-
|
43
27
|
var _eventReceiver = require("../eventReceiver");
|
44
|
-
|
45
|
-
const ALLOWED_PROPS = [..._gestureHandlerCommon.baseGestureHandlerWithDetectorProps, ..._TapGestureHandler.tapGestureHandlerProps, ..._PanGestureHandler.panGestureHandlerProps, ..._PanGestureHandler.panGestureHandlerCustomNativeProps, ..._LongPressGestureHandler.longPressGestureHandlerProps, ..._ForceTouchGestureHandler.forceTouchGestureHandlerProps, ..._FlingGestureHandler.flingGestureHandlerProps, ..._hoverGesture.hoverGestureHandlerProps, ..._NativeViewGestureHandler.nativeViewGestureHandlerProps];
|
46
|
-
exports.ALLOWED_PROPS = ALLOWED_PROPS;
|
47
|
-
|
28
|
+
const ALLOWED_PROPS = exports.ALLOWED_PROPS = [..._gestureHandlerCommon.baseGestureHandlerWithDetectorProps, ..._TapGestureHandler.tapGestureHandlerProps, ..._PanGestureHandler.panGestureHandlerProps, ..._PanGestureHandler.panGestureHandlerCustomNativeProps, ..._LongPressGestureHandler.longPressGestureHandlerProps, ..._ForceTouchGestureHandler.forceTouchGestureHandlerProps, ..._FlingGestureHandler.flingGestureHandlerProps, ..._hoverGesture.hoverGestureHandlerProps, ..._NativeViewGestureHandler.nativeViewGestureHandlerProps];
|
48
29
|
function convertToHandlerTag(ref) {
|
49
30
|
if (typeof ref === 'number') {
|
50
31
|
return ref;
|
51
32
|
} else if (ref instanceof _gesture.BaseGesture) {
|
52
33
|
return ref.handlerTag;
|
53
34
|
} else {
|
54
|
-
var _ref$current$handlerT, _ref$current;
|
55
|
-
|
56
35
|
// @ts-ignore in this case it should be a ref either to gesture object or
|
57
36
|
// a gesture handler component, in both cases handlerTag property exists
|
58
|
-
return
|
37
|
+
return ref.current?.handlerTag ?? -1;
|
59
38
|
}
|
60
39
|
}
|
61
|
-
|
62
40
|
function extractValidHandlerTags(interactionGroup) {
|
63
|
-
|
64
|
-
|
65
|
-
return (_interactionGroup$map = interactionGroup === null || interactionGroup === void 0 ? void 0 : (_interactionGroup$map2 = interactionGroup.map(convertToHandlerTag)) === null || _interactionGroup$map2 === void 0 ? void 0 : _interactionGroup$map2.filter(tag => tag > 0)) !== null && _interactionGroup$map !== void 0 ? _interactionGroup$map : [];
|
41
|
+
return interactionGroup?.map(convertToHandlerTag)?.filter(tag => tag > 0) ?? [];
|
66
42
|
}
|
67
|
-
|
68
43
|
function extractGestureRelations(gesture) {
|
69
44
|
const requireToFail = extractValidHandlerTags(gesture.config.requireToFail);
|
70
45
|
const simultaneousWith = extractValidHandlerTags(gesture.config.simultaneousWith);
|
@@ -75,40 +50,36 @@ function extractGestureRelations(gesture) {
|
|
75
50
|
blocksHandlers: blocksHandlers
|
76
51
|
};
|
77
52
|
}
|
78
|
-
|
79
53
|
function checkGestureCallbacksForWorklets(gesture) {
|
80
54
|
if (!__DEV__) {
|
81
55
|
return;
|
82
|
-
}
|
56
|
+
}
|
57
|
+
// If a gesture is explicitly marked to run on the JS thread there is no need to check
|
83
58
|
// if callbacks are worklets as the user is aware they will be ran on the JS thread
|
84
|
-
|
85
|
-
|
86
59
|
if (gesture.config.runOnJS) {
|
87
60
|
return;
|
88
61
|
}
|
89
|
-
|
90
62
|
const areSomeNotWorklets = gesture.handlers.isWorklet.includes(false);
|
91
|
-
const areSomeWorklets = gesture.handlers.isWorklet.includes(true);
|
92
|
-
// explicitly marked with `.runOnJS(true)` show an error
|
63
|
+
const areSomeWorklets = gesture.handlers.isWorklet.includes(true);
|
93
64
|
|
65
|
+
// If some of the callbacks are worklets and some are not, and the gesture is not
|
66
|
+
// explicitly marked with `.runOnJS(true)` show an error
|
94
67
|
if (areSomeNotWorklets && areSomeWorklets) {
|
95
68
|
console.error((0, _utils.tagMessage)(`Some of the callbacks in the gesture are worklets and some are not. Either make sure that all calbacks are marked as 'worklet' if you wish to run them on the UI thread or use '.runOnJS(true)' modifier on the gesture explicitly to run all callbacks on the JS thread.`));
|
96
69
|
}
|
97
|
-
|
98
70
|
if (_reanimatedWrapper.Reanimated === undefined) {
|
99
71
|
// If Reanimated is not available, we can't run worklets, so we shouldn't show the warning
|
100
72
|
return;
|
101
73
|
}
|
102
|
-
|
103
|
-
|
74
|
+
const areAllNotWorklets = !areSomeWorklets && areSomeNotWorklets;
|
75
|
+
// If none of the callbacks are worklets and the gesture is not explicitly marked with
|
104
76
|
// `.runOnJS(true)` show a warning
|
105
|
-
|
106
77
|
if (areAllNotWorklets && !(0, _utils.isTestEnv)()) {
|
107
78
|
console.warn((0, _utils.tagMessage)(`None of the callbacks in the gesture are worklets. If you wish to run them on the JS thread use '.runOnJS(true)' modifier on the gesture to make this explicit. Otherwise, mark the callbacks as 'worklet' to run them on the UI thread.`));
|
108
79
|
}
|
109
|
-
}
|
110
|
-
|
80
|
+
}
|
111
81
|
|
82
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
112
83
|
function validateDetectorChildren(ref) {
|
113
84
|
// Finds the first native view under the Wrap component and traverses the fiber tree upwards
|
114
85
|
// to check whether there is more than one native view as a pseudo-direct child of GestureDetector
|
@@ -133,24 +104,25 @@ function validateDetectorChildren(ref) {
|
|
133
104
|
// NativeView NativeView
|
134
105
|
if (__DEV__ && _reactNative.Platform.OS !== 'web') {
|
135
106
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
136
|
-
const wrapType =
|
137
|
-
|
138
|
-
|
139
|
-
let instance = _RNRenderer.RNRenderer.findHostInstance_DEPRECATED(ref)._internalFiberInstanceHandleDEV; // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
107
|
+
const wrapType =
|
108
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
109
|
+
ref._reactInternals.elementType;
|
140
110
|
|
111
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
112
|
+
let instance = _RNRenderer.RNRenderer.findHostInstance_DEPRECATED(ref)._internalFiberInstanceHandleDEV;
|
141
113
|
|
114
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
142
115
|
while (instance && instance.elementType !== wrapType) {
|
143
116
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
144
117
|
if (instance.sibling) {
|
145
118
|
throw new Error('GestureDetector has more than one native view as its children. This can happen if you are using a custom component that renders multiple views, like React.Fragment. You should wrap content of GestureDetector with a <View> or <Animated.View>.');
|
146
|
-
}
|
147
|
-
|
119
|
+
}
|
148
120
|
|
121
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
149
122
|
instance = instance.return;
|
150
123
|
}
|
151
124
|
}
|
152
125
|
}
|
153
|
-
|
154
126
|
function useForceRender() {
|
155
127
|
const [renderState, setRenderState] = (0, _react.useState)(false);
|
156
128
|
const forceRender = (0, _react.useCallback)(() => {
|
@@ -158,7 +130,6 @@ function useForceRender() {
|
|
158
130
|
}, [renderState, setRenderState]);
|
159
131
|
return forceRender;
|
160
132
|
}
|
161
|
-
|
162
133
|
function useWebEventHandlers() {
|
163
134
|
return (0, _react.useRef)({
|
164
135
|
onGestureHandlerEvent: e => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["utils.ts"],"names":["ALLOWED_PROPS","baseGestureHandlerWithDetectorProps","tapGestureHandlerProps","panGestureHandlerProps","panGestureHandlerCustomNativeProps","longPressGestureHandlerProps","forceTouchGestureHandlerProps","flingGestureHandlerProps","hoverGestureHandlerProps","nativeViewGestureHandlerProps","convertToHandlerTag","ref","BaseGesture","handlerTag","current","extractValidHandlerTags","interactionGroup","map","filter","tag","extractGestureRelations","gesture","requireToFail","config","simultaneousWith","blocksHandlers","waitFor","simultaneousHandlers","checkGestureCallbacksForWorklets","__DEV__","runOnJS","areSomeNotWorklets","handlers","isWorklet","includes","areSomeWorklets","console","error","Reanimated","undefined","areAllNotWorklets","warn","validateDetectorChildren","Platform","OS","wrapType","_reactInternals","elementType","instance","RNRenderer","findHostInstance_DEPRECATED","_internalFiberInstanceHandleDEV","sibling","Error","return","useForceRender","renderState","setRenderState","forceRender","useWebEventHandlers","onGestureHandlerEvent","e","nativeEvent","onGestureHandlerStateChange"],"mappings":";;;;;;;;;;;;AAAA;;AAEA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AAIA;;AACA;;AACA;;AACA;;AAIA;;AACA;;AACA;;AACA;;AACA;;AAGO,MAAMA,aAAa,GAAG,CAC3B,GAAGC,yDADwB,EAE3B,GAAGC,yCAFwB,EAG3B,GAAGC,yCAHwB,EAI3B,GAAGC,qDAJwB,EAK3B,GAAGC,qDALwB,EAM3B,GAAGC,uDANwB,EAO3B,GAAGC,6CAPwB,EAQ3B,GAAGC,sCARwB,EAS3B,GAAGC,uDATwB,CAAtB;;;AAYP,SAASC,mBAAT,CAA6BC,GAA7B,EAAsD;AACpD,MAAI,OAAOA,GAAP,KAAe,QAAnB,EAA6B;AAC3B,WAAOA,GAAP;AACD,GAFD,MAEO,IAAIA,GAAG,YAAYC,oBAAnB,EAAgC;AACrC,WAAOD,GAAG,CAACE,UAAX;AACD,GAFM,MAEA;AAAA;;AACL;AACA;AACA,oDAAOF,GAAG,CAACG,OAAX,iDAAO,aAAaD,UAApB,yEAAkC,CAAC,CAAnC;AACD;AACF;;AAED,SAASE,uBAAT,CAAiCC,gBAAjC,EAA6E;AAAA;;AAC3E,kCACEA,gBADF,aACEA,gBADF,iDACEA,gBAAgB,CAAEC,GAAlB,CAAsBP,mBAAtB,CADF,2DACE,uBAA4CQ,MAA5C,CAAoDC,GAAD,IAASA,GAAG,GAAG,CAAlE,CADF,yEAC0E,EAD1E;AAGD;;AAEM,SAASC,uBAAT,CAAiCC,OAAjC,EAAuD;AAC5D,QAAMC,aAAa,GAAGP,uBAAuB,CAACM,OAAO,CAACE,MAAR,CAAeD,aAAhB,CAA7C;AACA,QAAME,gBAAgB,GAAGT,uBAAuB,CAC9CM,OAAO,CAACE,MAA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G,CAACmC,eAAJ,CAAoBC,WAFtB,CAFoC,CAMpC;;AACA,QAAIC,QAAQ,GACVC,uBAAWC,2BAAX,CACEvC,GADF,EAEEwC,+BAHJ,CAPoC,CAYpC;;;AACA,WAAOH,QAAQ,IAAIA,QAAQ,CAACD,WAAT,KAAyBF,QAA5C,EAAsD;AACpD;AACA,UAAIG,QAAQ,CAACI,OAAb,EAAsB;AACpB,cAAM,IAAIC,KAAJ,CACJ,mPADI,CAAN;AAGD,OANmD,CAQpD;;;AACAL,MAAAA,QAAQ,GAAGA,QAAQ,CAACM,MAApB;AACD;AACF;AACF;;AAEM,SAASC,cAAT,GAA0B;AAC/B,QAAM,CAACC,WAAD,EAAcC,cAAd,IAAgC,qBAAS,KAAT,CAAtC;AACA,QAAMC,WAAW,GAAG,wBAAY,MAAM;AACpCD,IAAAA,cAAc,CAAC,CAACD,WAAF,CAAd;AACD,GAFmB,EAEjB,CAACA,WAAD,EAAcC,cAAd,CAFiB,CAApB;AAIA,SAAOC,WAAP;AACD;;AAEM,SAASC,mBAAT,GAA+B;AACpC,SAAO,mBAAwB;AAC7BC,IAAAA,qBAAqB,EAAGC,CAAD,IAAyC;AAC9D,gDAAsBA,CAAC,CAACC,WAAxB;AACD,KAH4B;AAI7BC,IAAAA,2BAA2B,EAAE,mEACxBF,CAAD,IAAyC;AACvC,gDAAsBA,CAAC,CAACC,WAAxB;AACD,KAHwB,GAIzBvB;AARyB,GAAxB,CAAP;AAUD","sourcesContent":["import { Platform } from 'react-native';\n\nimport { isTestEnv, tagMessage } from '../../../utils';\nimport { GestureRef, BaseGesture, GestureType } from '../gesture';\n\nimport { flingGestureHandlerProps } from '../../FlingGestureHandler';\nimport { forceTouchGestureHandlerProps } from '../../ForceTouchGestureHandler';\nimport { longPressGestureHandlerProps } from '../../LongPressGestureHandler';\nimport {\n panGestureHandlerProps,\n panGestureHandlerCustomNativeProps,\n} from '../../PanGestureHandler';\nimport { tapGestureHandlerProps } from '../../TapGestureHandler';\nimport { hoverGestureHandlerProps } from '../hoverGesture';\nimport { nativeViewGestureHandlerProps } from '../../NativeViewGestureHandler';\nimport {\n HandlerStateChangeEvent,\n baseGestureHandlerWithDetectorProps,\n} from '../../gestureHandlerCommon';\nimport { isNewWebImplementationEnabled } from '../../../EnableNewWebImplementation';\nimport { RNRenderer } from '../../../RNRenderer';\nimport { useCallback, useRef, useState } from 'react';\nimport { Reanimated } from '../reanimatedWrapper';\nimport { onGestureHandlerEvent } from '../eventReceiver';\nimport { WebEventHandler } from './types';\n\nexport const ALLOWED_PROPS = [\n ...baseGestureHandlerWithDetectorProps,\n ...tapGestureHandlerProps,\n ...panGestureHandlerProps,\n ...panGestureHandlerCustomNativeProps,\n ...longPressGestureHandlerProps,\n ...forceTouchGestureHandlerProps,\n ...flingGestureHandlerProps,\n ...hoverGestureHandlerProps,\n ...nativeViewGestureHandlerProps,\n];\n\nfunction convertToHandlerTag(ref: GestureRef): number {\n if (typeof ref === 'number') {\n return ref;\n } else if (ref instanceof BaseGesture) {\n return ref.handlerTag;\n } else {\n // @ts-ignore in this case it should be a ref either to gesture object or\n // a gesture handler component, in both cases handlerTag property exists\n return ref.current?.handlerTag ?? -1;\n }\n}\n\nfunction extractValidHandlerTags(interactionGroup: GestureRef[] | undefined) {\n return (\n interactionGroup?.map(convertToHandlerTag)?.filter((tag) => tag > 0) ?? []\n );\n}\n\nexport function extractGestureRelations(gesture: GestureType) {\n const requireToFail = extractValidHandlerTags(gesture.config.requireToFail);\n const simultaneousWith = extractValidHandlerTags(\n gesture.config.simultaneousWith\n );\n const blocksHandlers = extractValidHandlerTags(gesture.config.blocksHandlers);\n\n return {\n waitFor: requireToFail,\n simultaneousHandlers: simultaneousWith,\n blocksHandlers: blocksHandlers,\n };\n}\n\nexport function checkGestureCallbacksForWorklets(gesture: GestureType) {\n if (!__DEV__) {\n return;\n }\n // If a gesture is explicitly marked to run on the JS thread there is no need to check\n // if callbacks are worklets as the user is aware they will be ran on the JS thread\n if (gesture.config.runOnJS) {\n return;\n }\n\n const areSomeNotWorklets = gesture.handlers.isWorklet.includes(false);\n const areSomeWorklets = gesture.handlers.isWorklet.includes(true);\n\n // If some of the callbacks are worklets and some are not, and the gesture is not\n // explicitly marked with `.runOnJS(true)` show an error\n if (areSomeNotWorklets && areSomeWorklets) {\n console.error(\n tagMessage(\n `Some of the callbacks in the gesture are worklets and some are not. Either make sure that all calbacks are marked as 'worklet' if you wish to run them on the UI thread or use '.runOnJS(true)' modifier on the gesture explicitly to run all callbacks on the JS thread.`\n )\n );\n }\n\n if (Reanimated === undefined) {\n // If Reanimated is not available, we can't run worklets, so we shouldn't show the warning\n return;\n }\n\n const areAllNotWorklets = !areSomeWorklets && areSomeNotWorklets;\n // If none of the callbacks are worklets and the gesture is not explicitly marked with\n // `.runOnJS(true)` show a warning\n if (areAllNotWorklets && !isTestEnv()) {\n console.warn(\n tagMessage(\n `None of the callbacks in the gesture are worklets. If you wish to run them on the JS thread use '.runOnJS(true)' modifier on the gesture to make this explicit. Otherwise, mark the callbacks as 'worklet' to run them on the UI thread.`\n )\n );\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function validateDetectorChildren(ref: any) {\n // Finds the first native view under the Wrap component and traverses the fiber tree upwards\n // to check whether there is more than one native view as a pseudo-direct child of GestureDetector\n // i.e. this is not ok:\n // Wrap\n // |\n // / \\\n // / \\\n // / \\\n // / \\\n // NativeView NativeView\n //\n // but this is fine:\n // Wrap\n // |\n // NativeView\n // |\n // / \\\n // / \\\n // / \\\n // / \\\n // NativeView NativeView\n if (__DEV__ && Platform.OS !== 'web') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const wrapType =\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n ref._reactInternals.elementType;\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n let instance =\n RNRenderer.findHostInstance_DEPRECATED(\n ref\n )._internalFiberInstanceHandleDEV;\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n while (instance && instance.elementType !== wrapType) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (instance.sibling) {\n throw new Error(\n 'GestureDetector has more than one native view as its children. This can happen if you are using a custom component that renders multiple views, like React.Fragment. You should wrap content of GestureDetector with a <View> or <Animated.View>.'\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access\n instance = instance.return;\n }\n }\n}\n\nexport function useForceRender() {\n const [renderState, setRenderState] = useState(false);\n const forceRender = useCallback(() => {\n setRenderState(!renderState);\n }, [renderState, setRenderState]);\n\n return forceRender;\n}\n\nexport function useWebEventHandlers() {\n return useRef<WebEventHandler>({\n onGestureHandlerEvent: (e: HandlerStateChangeEvent<unknown>) => {\n onGestureHandlerEvent(e.nativeEvent);\n },\n onGestureHandlerStateChange: isNewWebImplementationEnabled()\n ? (e: HandlerStateChangeEvent<unknown>) => {\n onGestureHandlerEvent(e.nativeEvent);\n }\n : undefined,\n });\n}\n"]}
|
1
|
+
{"version":3,"names":["_reactNative","require","_utils","_gesture","_FlingGestureHandler","_ForceTouchGestureHandler","_LongPressGestureHandler","_PanGestureHandler","_TapGestureHandler","_hoverGesture","_NativeViewGestureHandler","_gestureHandlerCommon","_EnableNewWebImplementation","_RNRenderer","_react","_reanimatedWrapper","_eventReceiver","ALLOWED_PROPS","exports","baseGestureHandlerWithDetectorProps","tapGestureHandlerProps","panGestureHandlerProps","panGestureHandlerCustomNativeProps","longPressGestureHandlerProps","forceTouchGestureHandlerProps","flingGestureHandlerProps","hoverGestureHandlerProps","nativeViewGestureHandlerProps","convertToHandlerTag","ref","BaseGesture","handlerTag","current","extractValidHandlerTags","interactionGroup","map","filter","tag","extractGestureRelations","gesture","requireToFail","config","simultaneousWith","blocksHandlers","waitFor","simultaneousHandlers","checkGestureCallbacksForWorklets","__DEV__","runOnJS","areSomeNotWorklets","handlers","isWorklet","includes","areSomeWorklets","console","error","tagMessage","Reanimated","undefined","areAllNotWorklets","isTestEnv","warn","validateDetectorChildren","Platform","OS","wrapType","_reactInternals","elementType","instance","RNRenderer","findHostInstance_DEPRECATED","_internalFiberInstanceHandleDEV","sibling","Error","return","useForceRender","renderState","setRenderState","useState","forceRender","useCallback","useWebEventHandlers","useRef","onGestureHandlerEvent","e","nativeEvent","onGestureHandlerStateChange","isNewWebImplementationEnabled"],"sourceRoot":"../../../../../src","sources":["handlers/gestures/GestureDetector/utils.ts"],"mappings":";;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAEA,IAAAG,oBAAA,GAAAH,OAAA;AACA,IAAAI,yBAAA,GAAAJ,OAAA;AACA,IAAAK,wBAAA,GAAAL,OAAA;AACA,IAAAM,kBAAA,GAAAN,OAAA;AAIA,IAAAO,kBAAA,GAAAP,OAAA;AACA,IAAAQ,aAAA,GAAAR,OAAA;AACA,IAAAS,yBAAA,GAAAT,OAAA;AACA,IAAAU,qBAAA,GAAAV,OAAA;AAIA,IAAAW,2BAAA,GAAAX,OAAA;AACA,IAAAY,WAAA,GAAAZ,OAAA;AACA,IAAAa,MAAA,GAAAb,OAAA;AACA,IAAAc,kBAAA,GAAAd,OAAA;AACA,IAAAe,cAAA,GAAAf,OAAA;AAGO,MAAMgB,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG,CAC3B,GAAGE,yDAAmC,EACtC,GAAGC,yCAAsB,EACzB,GAAGC,yCAAsB,EACzB,GAAGC,qDAAkC,EACrC,GAAGC,qDAA4B,EAC/B,GAAGC,uDAA6B,EAChC,GAAGC,6CAAwB,EAC3B,GAAGC,sCAAwB,EAC3B,GAAGC,uDAA6B,CACjC;AAED,SAASC,mBAAmBA,CAACC,GAAe,EAAU;EACpD,IAAI,OAAOA,GAAG,KAAK,QAAQ,EAAE;IAC3B,OAAOA,GAAG;EACZ,CAAC,MAAM,IAAIA,GAAG,YAAYC,oBAAW,EAA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ACtC,CAAC;IACDC,2BAA2B,EAAE,IAAAC,yDAA6B,EAAC,CAAC,GACvDH,CAAmC,IAAK;MACvC,IAAAD,oCAAqB,EAACC,CAAC,CAACC,WAAW,CAAC;IACtC,CAAC,GACD3B;EACN,CAAC,CAAC;AACJ","ignoreList":[]}
|
@@ -6,139 +6,98 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
exports.onGestureHandlerEvent = onGestureHandlerEvent;
|
7
7
|
exports.startListening = startListening;
|
8
8
|
exports.stopListening = stopListening;
|
9
|
-
|
10
9
|
var _reactNative = require("react-native");
|
11
|
-
|
12
10
|
var _State = require("../../State");
|
13
|
-
|
14
11
|
var _TouchEventType = require("../../TouchEventType");
|
15
|
-
|
16
12
|
var _handlersRegistry = require("../handlersRegistry");
|
17
|
-
|
18
13
|
var _gestureStateManager = require("./gestureStateManager");
|
19
|
-
|
20
14
|
let gestureHandlerEventSubscription = null;
|
21
15
|
let gestureHandlerStateChangeEventSubscription = null;
|
22
16
|
const gestureStateManagers = new Map();
|
23
17
|
const lastUpdateEvent = [];
|
24
|
-
|
25
18
|
function isStateChangeEvent(event) {
|
26
19
|
// @ts-ignore oldState doesn't exist on GestureTouchEvent and that's the point
|
27
20
|
return event.oldState != null;
|
28
21
|
}
|
29
|
-
|
30
22
|
function isTouchEvent(event) {
|
31
23
|
return event.eventType != null;
|
32
24
|
}
|
33
|
-
|
34
25
|
function onGestureHandlerEvent(event) {
|
35
|
-
var _handler$handlers7, _handler$handlers7$on, _handler$handlers8, _handler$handlers8$on, _handler$handlers9, _handler$handlers9$on, _handler$handlers10, _handler$handlers10$o;
|
36
|
-
|
37
26
|
const handler = (0, _handlersRegistry.findHandler)(event.handlerTag);
|
38
|
-
|
39
27
|
if (handler) {
|
40
28
|
if (isStateChangeEvent(event)) {
|
41
29
|
if (event.oldState === _State.State.UNDETERMINED && event.state === _State.State.BEGAN) {
|
42
|
-
|
43
|
-
|
44
|
-
(_handler$handlers$onB = (_handler$handlers = handler.handlers).onBegin) === null || _handler$handlers$onB === void 0 ? void 0 : _handler$handlers$onB.call(_handler$handlers, event);
|
30
|
+
handler.handlers.onBegin?.(event);
|
45
31
|
} else if ((event.oldState === _State.State.BEGAN || event.oldState === _State.State.UNDETERMINED) && event.state === _State.State.ACTIVE) {
|
46
|
-
|
47
|
-
|
48
|
-
(_handler$handlers$onS = (_handler$handlers2 = handler.handlers).onStart) === null || _handler$handlers$onS === void 0 ? void 0 : _handler$handlers$onS.call(_handler$handlers2, event);
|
32
|
+
handler.handlers.onStart?.(event);
|
49
33
|
lastUpdateEvent[handler.handlers.handlerTag] = event;
|
50
34
|
} else if (event.oldState !== event.state && event.state === _State.State.END) {
|
51
|
-
var _handler$handlers$onF, _handler$handlers4;
|
52
|
-
|
53
35
|
if (event.oldState === _State.State.ACTIVE) {
|
54
|
-
|
55
|
-
|
56
|
-
(_handler$handlers$onE = (_handler$handlers3 = handler.handlers).onEnd) === null || _handler$handlers$onE === void 0 ? void 0 : _handler$handlers$onE.call(_handler$handlers3, event, true);
|
36
|
+
handler.handlers.onEnd?.(event, true);
|
57
37
|
}
|
58
|
-
|
59
|
-
(_handler$handlers$onF = (_handler$handlers4 = handler.handlers).onFinalize) === null || _handler$handlers$onF === void 0 ? void 0 : _handler$handlers$onF.call(_handler$handlers4, event, true);
|
38
|
+
handler.handlers.onFinalize?.(event, true);
|
60
39
|
lastUpdateEvent[handler.handlers.handlerTag] = undefined;
|
61
40
|
} else if ((event.state === _State.State.FAILED || event.state === _State.State.CANCELLED) && event.oldState !== event.state) {
|
62
|
-
var _handler$handlers$onF2, _handler$handlers6;
|
63
|
-
|
64
41
|
if (event.oldState === _State.State.ACTIVE) {
|
65
|
-
|
66
|
-
|
67
|
-
(_handler$handlers$onE2 = (_handler$handlers5 = handler.handlers).onEnd) === null || _handler$handlers$onE2 === void 0 ? void 0 : _handler$handlers$onE2.call(_handler$handlers5, event, false);
|
42
|
+
handler.handlers.onEnd?.(event, false);
|
68
43
|
}
|
69
|
-
|
70
|
-
(_handler$handlers$onF2 = (_handler$handlers6 = handler.handlers).onFinalize) === null || _handler$handlers$onF2 === void 0 ? void 0 : _handler$handlers$onF2.call(_handler$handlers6, event, false);
|
44
|
+
handler.handlers.onFinalize?.(event, false);
|
71
45
|
gestureStateManagers.delete(event.handlerTag);
|
72
46
|
lastUpdateEvent[handler.handlers.handlerTag] = undefined;
|
73
47
|
}
|
74
48
|
} else if (isTouchEvent(event)) {
|
75
49
|
if (!gestureStateManagers.has(event.handlerTag)) {
|
76
50
|
gestureStateManagers.set(event.handlerTag, _gestureStateManager.GestureStateManager.create(event.handlerTag));
|
77
|
-
}
|
78
|
-
|
51
|
+
}
|
79
52
|
|
53
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
80
54
|
const manager = gestureStateManagers.get(event.handlerTag);
|
81
|
-
|
82
55
|
switch (event.eventType) {
|
83
56
|
case _TouchEventType.TouchEventType.TOUCHES_DOWN:
|
84
|
-
|
57
|
+
handler.handlers?.onTouchesDown?.(event, manager);
|
85
58
|
break;
|
86
|
-
|
87
59
|
case _TouchEventType.TouchEventType.TOUCHES_MOVE:
|
88
|
-
|
60
|
+
handler.handlers?.onTouchesMove?.(event, manager);
|
89
61
|
break;
|
90
|
-
|
91
62
|
case _TouchEventType.TouchEventType.TOUCHES_UP:
|
92
|
-
|
63
|
+
handler.handlers?.onTouchesUp?.(event, manager);
|
93
64
|
break;
|
94
|
-
|
95
65
|
case _TouchEventType.TouchEventType.TOUCHES_CANCELLED:
|
96
|
-
|
66
|
+
handler.handlers?.onTouchesCancelled?.(event, manager);
|
97
67
|
break;
|
98
68
|
}
|
99
69
|
} else {
|
100
|
-
|
101
|
-
|
102
|
-
(_handler$handlers$onU = (_handler$handlers11 = handler.handlers).onUpdate) === null || _handler$handlers$onU === void 0 ? void 0 : _handler$handlers$onU.call(_handler$handlers11, event);
|
103
|
-
|
70
|
+
handler.handlers.onUpdate?.(event);
|
104
71
|
if (handler.handlers.onChange && handler.handlers.changeEventCalculator) {
|
105
|
-
|
106
|
-
|
107
|
-
(_handler$handlers$onC = (_handler$handlers12 = handler.handlers).onChange) === null || _handler$handlers$onC === void 0 ? void 0 : _handler$handlers$onC.call(_handler$handlers12, (_handler$handlers$cha = (_handler$handlers13 = handler.handlers).changeEventCalculator) === null || _handler$handlers$cha === void 0 ? void 0 : _handler$handlers$cha.call(_handler$handlers13, event, lastUpdateEvent[handler.handlers.handlerTag]));
|
72
|
+
handler.handlers.onChange?.(handler.handlers.changeEventCalculator?.(event, lastUpdateEvent[handler.handlers.handlerTag]));
|
108
73
|
lastUpdateEvent[handler.handlers.handlerTag] = event;
|
109
74
|
}
|
110
75
|
}
|
111
76
|
} else {
|
112
77
|
const oldHandler = (0, _handlersRegistry.findOldGestureHandler)(event.handlerTag);
|
113
|
-
|
114
78
|
if (oldHandler) {
|
115
79
|
const nativeEvent = {
|
116
80
|
nativeEvent: event
|
117
81
|
};
|
118
|
-
|
119
82
|
if (isStateChangeEvent(event)) {
|
120
83
|
oldHandler.onGestureStateChange(nativeEvent);
|
121
84
|
} else {
|
122
85
|
oldHandler.onGestureEvent(nativeEvent);
|
123
86
|
}
|
124
|
-
|
125
87
|
return;
|
126
88
|
}
|
127
89
|
}
|
128
90
|
}
|
129
|
-
|
130
91
|
function startListening() {
|
131
92
|
stopListening();
|
132
93
|
gestureHandlerEventSubscription = _reactNative.DeviceEventEmitter.addListener('onGestureHandlerEvent', onGestureHandlerEvent);
|
133
94
|
gestureHandlerStateChangeEventSubscription = _reactNative.DeviceEventEmitter.addListener('onGestureHandlerStateChange', onGestureHandlerEvent);
|
134
95
|
}
|
135
|
-
|
136
96
|
function stopListening() {
|
137
97
|
if (gestureHandlerEventSubscription) {
|
138
98
|
gestureHandlerEventSubscription.remove();
|
139
99
|
gestureHandlerEventSubscription = null;
|
140
100
|
}
|
141
|
-
|
142
101
|
if (gestureHandlerStateChangeEventSubscription) {
|
143
102
|
gestureHandlerStateChangeEventSubscription.remove();
|
144
103
|
gestureHandlerStateChangeEventSubscription = null;
|