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":["ReanimatedDrawerLayout.tsx"],"names":["DRAG_TOSS","DrawerPosition","DrawerState","DrawerType","DrawerLockMode","DrawerKeyboardDismissMode","defaultProps","drawerWidth","drawerPosition","LEFT","drawerType","FRONT","edgeWidth","minSwipeDistance","overlayColor","drawerLockMode","UNLOCKED","enableTrackpadTwoFingerGesture","activeCursor","mouseButton","MouseButton","statusBarAnimation","setStatusBarHidden","StatusBar","setHidden","dismissKeyboard","Keyboard","dismiss","DrawerLayout","props","ref","containerWidth","setContainerWidth","drawerState","setDrawerState","IDLE","drawerOpened","setDrawerOpened","drawerBackgroundColor","drawerContainerStyle","contentContainerStyle","hideStatusBar","keyboardDismissMode","userSelect","enableContextMenu","renderNavigationView","onDrawerSlide","onDrawerClose","onDrawerOpen","onDrawerStateChanged","animationSpeed","animationSpeedProp","isFromLeft","sideCorrection","openValue","value","isDrawerOpen","handleContainerLayout","nativeEvent","layout","width","emitStateChanged","newState","drawerWillShow","drawerAnimatedProps","accessibilityViewIsModal","overlayAnimatedProps","pointerEvents","edgeHitSlop","setEdgeHitSlop","left","right","gestureOrientation","animateDrawer","toValue","initialVelocity","willShow","SETTLING","normalizedToValue","Extrapolation","CLAMP","normalizedInitialVelocity","overshootClamping","velocity","mass","damping","stiffness","finished","handleRelease","event","translationX","dragX","velocityX","x","touchX","gestureStartX","dragOffsetBasedOnStart","startOffsetX","projOffsetX","shouldOpen","openDrawer","options","closeDrawer","overlayDismissGesture","Gesture","Tap","maxDistance","onEnd","LOCKED_OPEN","overlayAnimatedStyle","opacity","backgroundColor","fillHitSlop","panGesture","Pan","hitSlop","minDistance","activeOffsetX","failOffsetY","simultaneousWithExternalGesture","enabled","LOCKED_CLOSED","onStart","DRAGGING","ON_DRAG","onUpdate","startedOutsideTranslation","startedInsideTranslation","adjustedTranslation","Math","max","reverseContentDirection","I18nManager","isRTL","dynamicDrawerStyles","containerStyles","transform","translateX","drawerAnimatedStyle","closedDrawerOffset","isBack","BACK","isIdle","flexDirection","containerAnimatedProps","importantForAccessibility","Platform","OS","undefined","children","styles","main","containerOnBack","containerInFront","overlay","drawerContainer","StyleSheet","create","absoluteFillObject","zIndex","flex","overflow"],"mappings":";;;;;;;AAIA;;AAUA;;AAYA;;AAYA;;AACA;;AACA;;;;;;AAxCA;AACA;AACA;AA+CA,MAAMA,SAAS,GAAG,IAAlB;IAEYC,c;;;WAAAA,c;AAAAA,EAAAA,c,CAAAA,c;AAAAA,EAAAA,c,CAAAA,c;GAAAA,c,8BAAAA,c;;IAKAC,W;;;WAAAA,W;AAAAA,EAAAA,W,CAAAA,W;AAAAA,EAAAA,W,CAAAA,W;AAAAA,EAAAA,W,CAAAA,W;GAAAA,W,2BAAAA,W;;IAMAC,U;;;WAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;GAAAA,U,0BAAAA,U;;IAMAC,c;;;WAAAA,c;AAAAA,EAAAA,c,CAAAA,c;AAAAA,EAAAA,c,CAAAA,c;AAAAA,EAAAA,c,CAAAA,c;GAAAA,c,8BAAAA,c;;IAMAC,yB;;;WA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AGLnG,oBAHK;AAHT,kBAQE,6BAAC,8BAAD,CAAU,IAAV;AAAe,IAAA,KAAK,EAAE+F;AAAtB,KACGzF,oBAAoB,CAACS,SAAD,CADvB,CARF,CAlBF,CAJF,CADF;AAsCD,CA1ckB,CAArB;eA6ce1B,Y;;;AAEf,MAAM0H,MAAM,GAAGM,wBAAWC,MAAX,CAAkB;AAC/BF,EAAAA,eAAe,EAAE,EACf,GAAGC,wBAAWE,kBADC;AAEfC,IAAAA,MAAM,EAAE,IAFO;AAGfhB,IAAAA,aAAa,EAAE;AAHA,GADc;AAM/BU,EAAAA,gBAAgB,EAAE,EAChB,GAAGG,wBAAWE,kBADE;AAEhBC,IAAAA,MAAM,EAAE;AAFQ,GANa;AAU/BP,EAAAA,eAAe,EAAE,EACf,GAAGI,wBAAWE;AADC,GAVc;AAa/BP,EAAAA,IAAI,EAAE;AACJS,IAAAA,IAAI,EAAE,CADF;AAEJD,IAAAA,MAAM,EAAE,CAFJ;AAGJE,IAAAA,QAAQ,EAAE;AAHN,GAbyB;AAkB/BP,EAAAA,OAAO,EAAE,EACP,GAAGE,wBAAWE,kBADP;AAEPC,IAAAA,MAAM,EAAE;AAFD;AAlBsB,CAAlB,CAAf","sourcesContent":["// This component is based on RN's DrawerLayoutAndroid API\n// It's cross-compatible with all platforms despite\n// `DrawerLayoutAndroid` only being available on android\n\nimport React, {\n ReactNode,\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useState,\n} from 'react';\n\nimport {\n StyleSheet,\n Keyboard,\n StatusBar,\n I18nManager,\n StatusBarAnimation,\n StyleProp,\n ViewStyle,\n LayoutChangeEvent,\n Platform,\n} from 'react-native';\n\nimport Animated, {\n Extrapolation,\n SharedValue,\n interpolate,\n runOnJS,\n useAnimatedProps,\n useAnimatedStyle,\n useDerivedValue,\n useSharedValue,\n withSpring,\n} from 'react-native-reanimated';\n\nimport { GestureObjects as Gesture } from '../handlers/gestures/gestureObjects';\nimport { GestureDetector } from '../handlers/gestures/GestureDetector';\nimport {\n UserSelect,\n ActiveCursor,\n MouseButton,\n HitSlop,\n GestureStateChangeEvent,\n} from '../handlers/gestureHandlerCommon';\nimport { PanGestureHandlerEventPayload } from '../handlers/GestureHandlerEventPayload';\n\nconst DRAG_TOSS = 0.05;\n\nexport enum DrawerPosition {\n LEFT,\n RIGHT,\n}\n\nexport enum DrawerState {\n IDLE,\n DRAGGING,\n SETTLING,\n}\n\nexport enum DrawerType {\n FRONT,\n BACK,\n SLIDE,\n}\n\nexport enum DrawerLockMode {\n UNLOCKED,\n LOCKED_CLOSED,\n LOCKED_OPEN,\n}\n\nexport enum DrawerKeyboardDismissMode {\n NONE,\n ON_DRAG,\n}\n\nexport interface DrawerLayoutProps {\n /**\n * This attribute is present in the native android implementation already and is one\n * of the required params. The gesture handler version of DrawerLayout makes it\n * possible for the function passed as `renderNavigationView` to take an\n * Animated value as a parameter that indicates the progress of drawer\n * opening/closing animation (progress value is 0 when closed and 1 when\n * opened). This can be used by the drawer component to animated its children\n * while the drawer is opening or closing.\n */\n renderNavigationView: (\n progressAnimatedValue: SharedValue<number>\n ) => ReactNode;\n\n /**\n * Determines the side from which the drawer will open.\n */\n drawerPosition?: DrawerPosition;\n\n /**\n * Width of the drawer.\n */\n drawerWidth?: number;\n\n /**\n * Background color of the drawer.\n */\n drawerBackgroundColor?: string;\n\n /**\n * Specifies the lock mode of the drawer.\n * Programatic opening/closing isn't affected by the lock mode. Defaults to `UNLOCKED`.\n * - `UNLOCKED` - the drawer will respond to gestures.\n * - `LOCKED_CLOSED` - the drawer will move freely until it settles in a closed position, then the gestures will be disabled.\n * - `LOCKED_OPEN` - the drawer will move freely until it settles in an opened position, then the gestures will be disabled.\n */\n drawerLockMode?: DrawerLockMode;\n\n /**\n * Determines if system keyboard should be closed upon dragging the drawer.\n */\n keyboardDismissMode?: DrawerKeyboardDismissMode;\n\n /**\n * Called when the drawer is closed.\n */\n onDrawerClose?: () => void;\n\n /**\n * Called when the drawer is opened.\n */\n onDrawerOpen?: () => void;\n\n /**\n * Called when the status of the drawer changes.\n */\n onDrawerStateChanged?: (\n newState: DrawerState,\n drawerWillShow: boolean\n ) => void;\n\n /**\n * Type of animation that will play when opening the drawer.\n */\n drawerType?: DrawerType;\n\n /**\n * Speed of animation that will play when letting go, or dismissing the drawer.\n * This will also be the default animation speed for programatic controlls.\n */\n animationSpeed?: number;\n\n /**\n * Defines how far from the edge of the content view the gesture should\n * activate.\n */\n edgeWidth?: number;\n\n /**\n * Minimal distance to swipe before the drawer starts moving.\n */\n minSwipeDistance?: number;\n\n /**\n * When set to true Drawer component will use\n * {@link https://reactnative.dev/docs/statusbar StatusBar} API to hide the OS\n * status bar whenever the drawer is pulled or when its in an \"open\" state.\n */\n hideStatusBar?: boolean;\n\n /**\n * @default 'slide'\n *\n * Can be used when hideStatusBar is set to true and will select the animation\n * used for hiding/showing the status bar. See\n * {@link https://reactnative.dev/docs/statusbar StatusBar} documentation for\n * more details\n */\n statusBarAnimation?: StatusBarAnimation;\n\n /**\n * @default 'rgba(0, 0, 0, 0.7)'\n *\n * Color of the background overlay.\n * Animated from `0%` to `100%` as the drawer opens.\n */\n overlayColor?: string;\n\n /**\n * Style wrapping the content.\n */\n contentContainerStyle?: StyleProp<ViewStyle>;\n\n /**\n * Style wrapping the drawer.\n */\n drawerContainerStyle?: StyleProp<ViewStyle>;\n\n /**\n * Enables two-finger gestures on supported devices, for example iPads with\n * trackpads. If not enabled the gesture will require click + drag, with\n * `enableTrackpadTwoFingerGesture` swiping with two fingers will also trigger\n * the gesture.\n */\n enableTrackpadTwoFingerGesture?: boolean;\n\n onDrawerSlide?: (position: number) => void;\n\n // Implicit `children` prop has been removed in @types/react^18.0.\n /**\n * Elements that will be rendered inside the content view.\n */\n children?: ReactNode | ((openValue?: SharedValue<number>) => ReactNode);\n\n /**\n * @default 'none'\n * Sets whether the text inside both the drawer and the context window can be selected.\n * Values: 'none' | 'text' | 'auto'\n */\n userSelect?: UserSelect;\n\n /**\n * @default 'auto'\n * Sets the displayed cursor pictogram when the drawer is being dragged.\n * Values: see CSS cursor values\n */\n activeCursor?: ActiveCursor;\n\n /**\n * @default 'MouseButton.LEFT'\n * Allows to choose which mouse button should underlying pan handler react to.\n */\n mouseButton?: MouseButton;\n\n /**\n * @default 'false if MouseButton.RIGHT is specified'\n * Allows to enable/disable context menu.\n */\n enableContextMenu?: boolean;\n}\n\nexport type DrawerMovementOption = {\n initialVelocity?: number;\n animationSpeed?: number;\n};\n\nexport interface DrawerLayoutMethods {\n openDrawer: (options?: DrawerMovementOption) => void;\n closeDrawer: (options?: DrawerMovementOption) => void;\n}\n\nconst defaultProps = {\n drawerWidth: 200,\n drawerPosition: DrawerPosition.LEFT,\n drawerType: DrawerType.FRONT,\n edgeWidth: 20,\n minSwipeDistance: 3,\n overlayColor: 'rgba(0, 0, 0, 0.7)',\n drawerLockMode: DrawerLockMode.UNLOCKED,\n enableTrackpadTwoFingerGesture: false,\n activeCursor: 'auto' as ActiveCursor,\n mouseButton: MouseButton.LEFT,\n statusBarAnimation: 'slide' as StatusBarAnimation,\n};\n\n// StatusBar.setHidden and Keyboard.dismiss cannot be directly referenced in worklets.\nconst setStatusBarHidden = StatusBar.setHidden;\nconst dismissKeyboard = Keyboard.dismiss;\n\nconst DrawerLayout = forwardRef<DrawerLayoutMethods, DrawerLayoutProps>(\n function DrawerLayout(props: DrawerLayoutProps, ref) {\n const [containerWidth, setContainerWidth] = useState(0);\n const [drawerState, setDrawerState] = useState<DrawerState>(\n DrawerState.IDLE\n );\n const [drawerOpened, setDrawerOpened] = useState(false);\n\n const {\n drawerPosition = defaultProps.drawerPosition,\n drawerWidth = defaultProps.drawerWidth,\n drawerType = defaultProps.drawerType,\n drawerBackgroundColor,\n drawerContainerStyle,\n contentContainerStyle,\n minSwipeDistance = defaultProps.minSwipeDistance,\n edgeWidth = defaultProps.edgeWidth,\n drawerLockMode = defaultProps.drawerLockMode,\n overlayColor = defaultProps.overlayColor,\n enableTrackpadTwoFingerGesture = defaultProps.enableTrackpadTwoFingerGesture,\n activeCursor = defaultProps.activeCursor,\n mouseButton = defaultProps.mouseButton,\n statusBarAnimation = defaultProps.statusBarAnimation,\n hideStatusBar,\n keyboardDismissMode,\n userSelect,\n enableContextMenu,\n renderNavigationView,\n onDrawerSlide,\n onDrawerClose,\n onDrawerOpen,\n onDrawerStateChanged,\n animationSpeed: animationSpeedProp,\n } = props;\n\n const isFromLeft = drawerPosition === DrawerPosition.LEFT;\n\n const sideCorrection = isFromLeft ? 1 : -1;\n\n // While closing the drawer when user starts gesture in the greyed out part of the window,\n // we want the drawer to follow only once the finger reaches the edge of the drawer.\n // See the diagram for reference. * = starting finger position, < = current finger position\n // 1) +---------------+ 2) +---------------+ 3) +---------------+ 4) +---------------+\n // |XXXXXXXX|......| |XXXXXXXX|......| |XXXXXXXX|......| |XXXXX|.........|\n // |XXXXXXXX|......| |XXXXXXXX|......| |XXXXXXXX|......| |XXXXX|.........|\n // |XXXXXXXX|..<*..| |XXXXXXXX|.<-*..| |XXXXXXXX|<--*..| |XXXXX|<-----*..|\n // |XXXXXXXX|......| |XXXXXXXX|......| |XXXXXXXX|......| |XXXXX|.........|\n // |XXXXXXXX|......| |XXXXXXXX|......| |XXXXXXXX|......| |XXXXX|.........|\n // +---------------+ +---------------+ +---------------+ +---------------+\n\n const openValue = useSharedValue<number>(0);\n\n useDerivedValue(() => {\n onDrawerSlide && runOnJS(onDrawerSlide)(openValue.value);\n }, []);\n\n const isDrawerOpen = useSharedValue(false);\n\n const handleContainerLayout = ({ nativeEvent }: LayoutChangeEvent) => {\n setContainerWidth(nativeEvent.layout.width);\n };\n\n const emitStateChanged = useCallback(\n (newState: DrawerState, drawerWillShow: boolean) => {\n 'worklet';\n onDrawerStateChanged &&\n runOnJS(onDrawerStateChanged)?.(newState, drawerWillShow);\n },\n [onDrawerStateChanged]\n );\n\n const drawerAnimatedProps = useAnimatedProps(() => ({\n accessibilityViewIsModal: isDrawerOpen.value,\n }));\n\n const overlayAnimatedProps = useAnimatedProps(() => ({\n pointerEvents: isDrawerOpen.value ? ('auto' as const) : ('none' as const),\n }));\n\n // While the drawer is hidden, it's hitSlop overflows onto the main view by edgeWidth\n // This way it can be swiped open even when it's hidden\n const [edgeHitSlop, setEdgeHitSlop] = useState<HitSlop>(\n isFromLeft\n ? { left: 0, width: edgeWidth }\n : { right: 0, width: edgeWidth }\n );\n\n // gestureOrientation is 1 if the gesture is expected to move from left to right and -1 otherwise\n const gestureOrientation = useMemo(\n () => sideCorrection * (drawerOpened ? -1 : 1),\n [sideCorrection, drawerOpened]\n );\n\n useEffect(() => {\n setEdgeHitSlop(\n isFromLeft\n ? { left: 0, width: edgeWidth }\n : { right: 0, width: edgeWidth }\n );\n }, [isFromLeft, edgeWidth]);\n\n const animateDrawer = useCallback(\n (toValue: number, initialVelocity: number, animationSpeed?: number) => {\n 'worklet';\n const willShow = toValue !== 0;\n isDrawerOpen.value = willShow;\n\n emitStateChanged(DrawerState.SETTLING, willShow);\n runOnJS(setDrawerState)(DrawerState.SETTLING);\n\n if (hideStatusBar) {\n runOnJS(setStatusBarHidden)(willShow, statusBarAnimation);\n }\n\n const normalizedToValue = interpolate(\n toValue,\n [0, drawerWidth],\n [0, 1],\n Extrapolation.CLAMP\n );\n\n const normalizedInitialVelocity = interpolate(\n initialVelocity,\n [0, drawerWidth],\n [0, 1],\n Extrapolation.CLAMP\n );\n\n openValue.value = withSpring(\n normalizedToValue,\n {\n overshootClamping: true,\n velocity: normalizedInitialVelocity,\n mass: animationSpeed\n ? 1 / animationSpeed\n : 1 / (animationSpeedProp ?? 1),\n damping: 40,\n stiffness: 500,\n },\n (finished) => {\n if (finished) {\n emitStateChanged(DrawerState.IDLE, willShow);\n runOnJS(setDrawerOpened)(willShow);\n runOnJS(setDrawerState)(DrawerState.IDLE);\n if (willShow) {\n onDrawerOpen && runOnJS(onDrawerOpen)?.();\n } else {\n onDrawerClose && runOnJS(onDrawerClose)?.();\n }\n }\n }\n );\n },\n [\n openValue,\n emitStateChanged,\n isDrawerOpen,\n hideStatusBar,\n onDrawerClose,\n onDrawerOpen,\n drawerWidth,\n statusBarAnimation,\n ]\n );\n\n const handleRelease = useCallback(\n (event: GestureStateChangeEvent<PanGestureHandlerEventPayload>) => {\n 'worklet';\n let { translationX: dragX, velocityX, x: touchX } = event;\n\n if (drawerPosition !== DrawerPosition.LEFT) {\n // See description in _updateAnimatedEvent about why events are flipped\n // for right-side drawer\n dragX = -dragX;\n touchX = containerWidth - touchX;\n velocityX = -velocityX;\n }\n\n const gestureStartX = touchX - dragX;\n let dragOffsetBasedOnStart = 0;\n\n if (drawerType === DrawerType.FRONT) {\n dragOffsetBasedOnStart =\n gestureStartX > drawerWidth ? gestureStartX - drawerWidth : 0;\n }\n\n const startOffsetX =\n dragX +\n dragOffsetBasedOnStart +\n (isDrawerOpen.value ? drawerWidth : 0);\n\n const projOffsetX = startOffsetX + DRAG_TOSS * velocityX;\n\n const shouldOpen = projOffsetX > drawerWidth / 2;\n\n if (shouldOpen) {\n animateDrawer(drawerWidth, velocityX);\n } else {\n animateDrawer(0, velocityX);\n }\n },\n [\n animateDrawer,\n containerWidth,\n drawerPosition,\n drawerType,\n drawerWidth,\n isDrawerOpen,\n ]\n );\n\n const openDrawer = useCallback(\n (options: DrawerMovementOption = {}) => {\n 'worklet';\n animateDrawer(\n drawerWidth,\n options.initialVelocity ?? 0,\n options.animationSpeed\n );\n },\n [animateDrawer, drawerWidth]\n );\n\n const closeDrawer = useCallback(\n (options: DrawerMovementOption = {}) => {\n 'worklet';\n animateDrawer(0, options.initialVelocity ?? 0, options.animationSpeed);\n },\n [animateDrawer]\n );\n\n const overlayDismissGesture = useMemo(\n () =>\n Gesture.Tap()\n .maxDistance(25)\n .onEnd(() => {\n if (\n isDrawerOpen.value &&\n drawerLockMode !== DrawerLockMode.LOCKED_OPEN\n ) {\n closeDrawer();\n }\n }),\n [closeDrawer, isDrawerOpen, drawerLockMode]\n );\n\n const overlayAnimatedStyle = useAnimatedStyle(() => ({\n opacity: openValue.value,\n backgroundColor: overlayColor,\n }));\n\n const fillHitSlop = useMemo(\n () => (isFromLeft ? { left: drawerWidth } : { right: drawerWidth }),\n [drawerWidth, isFromLeft]\n );\n\n const panGesture = useMemo(() => {\n return Gesture.Pan()\n .activeCursor(activeCursor)\n .mouseButton(mouseButton)\n .hitSlop(drawerOpened ? fillHitSlop : edgeHitSlop)\n .minDistance(drawerOpened ? 100 : 0)\n .activeOffsetX(gestureOrientation * minSwipeDistance)\n .failOffsetY([-15, 15])\n .simultaneousWithExternalGesture(overlayDismissGesture)\n .enableTrackpadTwoFingerGesture(enableTrackpadTwoFingerGesture)\n .enabled(\n drawerState !== DrawerState.SETTLING &&\n (drawerOpened\n ? drawerLockMode !== DrawerLockMode.LOCKED_OPEN\n : drawerLockMode !== DrawerLockMode.LOCKED_CLOSED)\n )\n .onStart(() => {\n emitStateChanged(DrawerState.DRAGGING, false);\n runOnJS(setDrawerState)(DrawerState.DRAGGING);\n if (keyboardDismissMode === DrawerKeyboardDismissMode.ON_DRAG) {\n runOnJS(dismissKeyboard)();\n }\n if (hideStatusBar) {\n runOnJS(setStatusBarHidden)(true, statusBarAnimation);\n }\n })\n .onUpdate((event) => {\n const startedOutsideTranslation = isFromLeft\n ? interpolate(\n event.x,\n [0, drawerWidth, drawerWidth + 1],\n [0, drawerWidth, drawerWidth]\n )\n : interpolate(\n event.x - containerWidth,\n [-drawerWidth - 1, -drawerWidth, 0],\n [drawerWidth, drawerWidth, 0]\n );\n\n const startedInsideTranslation =\n sideCorrection *\n (event.translationX +\n (drawerOpened ? drawerWidth * -gestureOrientation : 0));\n\n const adjustedTranslation = Math.max(\n drawerOpened ? startedOutsideTranslation : 0,\n startedInsideTranslation\n );\n\n openValue.value = interpolate(\n adjustedTranslation,\n [-drawerWidth, 0, drawerWidth],\n [1, 0, 1],\n Extrapolation.CLAMP\n );\n })\n .onEnd(handleRelease);\n }, [\n drawerLockMode,\n openValue,\n drawerWidth,\n emitStateChanged,\n gestureOrientation,\n handleRelease,\n edgeHitSlop,\n fillHitSlop,\n minSwipeDistance,\n hideStatusBar,\n keyboardDismissMode,\n overlayDismissGesture,\n drawerOpened,\n isFromLeft,\n containerWidth,\n sideCorrection,\n drawerState,\n activeCursor,\n enableTrackpadTwoFingerGesture,\n mouseButton,\n statusBarAnimation,\n ]);\n\n // When using RTL, row and row-reverse flex directions are flipped.\n const reverseContentDirection = I18nManager.isRTL\n ? isFromLeft\n : !isFromLeft;\n\n const dynamicDrawerStyles = {\n backgroundColor: drawerBackgroundColor,\n width: drawerWidth,\n };\n\n const containerStyles = useAnimatedStyle(() => {\n if (drawerType === DrawerType.FRONT) {\n return {};\n }\n\n return {\n transform: [\n {\n translateX: interpolate(\n openValue.value,\n [0, 1],\n [0, drawerWidth * sideCorrection],\n Extrapolation.CLAMP\n ),\n },\n ],\n };\n });\n\n const drawerAnimatedStyle = useAnimatedStyle(() => {\n const closedDrawerOffset = drawerWidth * -sideCorrection;\n const isBack = drawerType === DrawerType.BACK;\n const isIdle = drawerState === DrawerState.IDLE;\n\n if (isBack) {\n return {\n transform: [{ translateX: 0 }],\n flexDirection: reverseContentDirection ? 'row-reverse' : 'row',\n };\n }\n\n let translateX = 0;\n\n if (isIdle) {\n translateX = drawerOpened ? 0 : closedDrawerOffset;\n } else {\n translateX = interpolate(\n openValue.value,\n [0, 1],\n [closedDrawerOffset, 0],\n Extrapolation.CLAMP\n );\n }\n\n return {\n transform: [{ translateX }],\n flexDirection: reverseContentDirection ? 'row-reverse' : 'row',\n };\n });\n\n const containerAnimatedProps = useAnimatedProps(() => ({\n importantForAccessibility:\n Platform.OS === 'android'\n ? isDrawerOpen.value\n ? ('no-hide-descendants' as const)\n : ('yes' as const)\n : undefined,\n }));\n\n const children =\n typeof props.children === 'function'\n ? props.children(openValue) // renderer function\n : props.children;\n\n useImperativeHandle(\n ref,\n () => ({\n openDrawer,\n closeDrawer,\n }),\n [openDrawer, closeDrawer]\n );\n\n return (\n <GestureDetector\n gesture={panGesture}\n userSelect={userSelect}\n enableContextMenu={enableContextMenu}>\n <Animated.View style={styles.main} onLayout={handleContainerLayout}>\n <GestureDetector gesture={overlayDismissGesture}>\n <Animated.View\n style={[\n drawerType === DrawerType.FRONT\n ? styles.containerOnBack\n : styles.containerInFront,\n containerStyles,\n contentContainerStyle,\n ]}\n animatedProps={containerAnimatedProps}>\n {children}\n <Animated.View\n animatedProps={overlayAnimatedProps}\n style={[styles.overlay, overlayAnimatedStyle]}\n />\n </Animated.View>\n </GestureDetector>\n <Animated.View\n pointerEvents=\"box-none\"\n animatedProps={drawerAnimatedProps}\n style={[\n styles.drawerContainer,\n drawerAnimatedStyle,\n drawerContainerStyle,\n ]}>\n <Animated.View style={dynamicDrawerStyles}>\n {renderNavigationView(openValue)}\n </Animated.View>\n </Animated.View>\n </Animated.View>\n </GestureDetector>\n );\n }\n);\n\nexport default DrawerLayout;\n\nconst styles = StyleSheet.create({\n drawerContainer: {\n ...StyleSheet.absoluteFillObject,\n zIndex: 1001,\n flexDirection: 'row',\n },\n containerInFront: {\n ...StyleSheet.absoluteFillObject,\n zIndex: 1002,\n },\n containerOnBack: {\n ...StyleSheet.absoluteFillObject,\n },\n main: {\n flex: 1,\n zIndex: 0,\n overflow: 'hidden',\n },\n overlay: {\n ...StyleSheet.absoluteFillObject,\n zIndex: 1000,\n },\n});\n"]}
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_gestureObjects","_GestureDetector","_gestureHandlerCommon","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","DRAG_TOSS","DrawerPosition","exports","DrawerState","DrawerType","DrawerLockMode","DrawerKeyboardDismissMode","defaultProps","drawerWidth","drawerPosition","LEFT","drawerType","FRONT","edgeWidth","minSwipeDistance","overlayColor","drawerLockMode","UNLOCKED","enableTrackpadTwoFingerGesture","activeCursor","mouseButton","MouseButton","statusBarAnimation","setStatusBarHidden","StatusBar","setHidden","dismissKeyboard","Keyboard","dismiss","DrawerLayout","forwardRef","props","ref","containerWidth","setContainerWidth","useState","drawerState","setDrawerState","IDLE","drawerOpened","setDrawerOpened","drawerBackgroundColor","drawerContainerStyle","contentContainerStyle","hideStatusBar","keyboardDismissMode","userSelect","enableContextMenu","renderNavigationView","onDrawerSlide","onDrawerClose","onDrawerOpen","onDrawerStateChanged","animationSpeed","animationSpeedProp","isFromLeft","sideCorrection","openValue","useSharedValue","useDerivedValue","runOnJS","value","isDrawerOpen","handleContainerLayout","nativeEvent","layout","width","emitStateChanged","useCallback","newState","drawerWillShow","drawerAnimatedProps","useAnimatedProps","accessibilityViewIsModal","overlayAnimatedProps","pointerEvents","edgeHitSlop","setEdgeHitSlop","left","right","gestureOrientation","useMemo","useEffect","animateDrawer","toValue","initialVelocity","willShow","SETTLING","normalizedToValue","interpolate","Extrapolation","CLAMP","normalizedInitialVelocity","withSpring","overshootClamping","velocity","mass","damping","stiffness","finished","handleRelease","event","translationX","dragX","velocityX","x","touchX","gestureStartX","dragOffsetBasedOnStart","startOffsetX","projOffsetX","shouldOpen","openDrawer","options","closeDrawer","overlayDismissGesture","Gesture","Tap","maxDistance","onEnd","LOCKED_OPEN","overlayAnimatedStyle","useAnimatedStyle","opacity","backgroundColor","fillHitSlop","panGesture","Pan","hitSlop","minDistance","activeOffsetX","failOffsetY","simultaneousWithExternalGesture","enabled","LOCKED_CLOSED","onStart","DRAGGING","ON_DRAG","onUpdate","startedOutsideTranslation","startedInsideTranslation","adjustedTranslation","Math","max","reverseContentDirection","I18nManager","isRTL","dynamicDrawerStyles","containerStyles","transform","translateX","drawerAnimatedStyle","closedDrawerOffset","isBack","BACK","isIdle","flexDirection","containerAnimatedProps","importantForAccessibility","Platform","OS","undefined","children","useImperativeHandle","jsx","GestureDetector","gesture","jsxs","View","style","styles","main","onLayout","containerOnBack","containerInFront","animatedProps","overlay","drawerContainer","_default","StyleSheet","create","absolute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ACH;EAAC,CACD,CAAC;AAEtB,CACF,CAAC;AAAC,IAAAyH,QAAA,GAAAhL,OAAA,CAAAX,OAAA,GAEasC,YAAY;AAE3B,MAAM6I,MAAM,GAAGS,uBAAU,CAACC,MAAM,CAAC;EAC/BH,eAAe,EAAE;IACf,GAAGE,uBAAU,CAACE,kBAAkB;IAChCC,MAAM,EAAE,IAAI;IACZ1B,aAAa,EAAE;EACjB,CAAC;EACDkB,gBAAgB,EAAE;IAChB,GAAGK,uBAAU,CAACE,kBAAkB;IAChCC,MAAM,EAAE;EACV,CAAC;EACDT,eAAe,EAAE;IACf,GAAGM,uBAAU,CAACE;EAChB,CAAC;EACDV,IAAI,EAAE;IACJY,IAAI,EAAE,CAAC;IACPD,MAAM,EAAE,CAAC;IACTE,QAAQ,EAAE;EACZ,CAAC;EACDR,OAAO,EAAE;IACP,GAAGG,uBAAU,CAACE,kBAAkB;IAChCC,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
|
@@ -4,31 +4,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.default = void 0;
|
7
|
-
|
8
7
|
var _react = _interopRequireWildcard(require("react"));
|
9
|
-
|
10
8
|
var _gestureObjects = require("../handlers/gestures/gestureObjects");
|
11
|
-
|
12
9
|
var _GestureDetector = require("../handlers/gestures/GestureDetector");
|
13
|
-
|
14
10
|
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
15
|
-
|
16
11
|
var _reactNative = require("react-native");
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
12
|
+
var _utils = require("./utils");
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
14
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
15
|
+
// Similarily to the DrawerLayout component this deserves to be put in a
|
16
|
+
// separate repo. Although, keeping it here for the time being will allow us to
|
17
|
+
// move faster and fix possible issues quicker
|
23
18
|
|
24
19
|
const DRAG_TOSS = 0.05;
|
25
|
-
var SwipeDirection
|
26
|
-
|
27
|
-
(function (SwipeDirection) {
|
20
|
+
var SwipeDirection = /*#__PURE__*/function (SwipeDirection) {
|
28
21
|
SwipeDirection["LEFT"] = "left";
|
29
22
|
SwipeDirection["RIGHT"] = "right";
|
30
|
-
|
31
|
-
|
23
|
+
return SwipeDirection;
|
24
|
+
}(SwipeDirection || {});
|
32
25
|
const Swipeable = /*#__PURE__*/(0, _react.forwardRef)(function Swipeable(props, ref) {
|
33
26
|
const defaultProps = {
|
34
27
|
friction: 1,
|
@@ -61,8 +54,16 @@ const Swipeable = /*#__PURE__*/(0, _react.forwardRef)(function Swipeable(props,
|
|
61
54
|
renderLeftActions,
|
62
55
|
renderRightActions,
|
63
56
|
simultaneousWithExternalGesture,
|
57
|
+
requireExternalGestureToFail,
|
58
|
+
blocksExternalGesture,
|
59
|
+
hitSlop,
|
64
60
|
...remainingProps
|
65
61
|
} = props;
|
62
|
+
const relationProps = {
|
63
|
+
simultaneousWithExternalGesture,
|
64
|
+
requireExternalGestureToFail,
|
65
|
+
blocksExternalGesture
|
66
|
+
};
|
66
67
|
const rowState = (0, _reactNativeReanimated.useSharedValue)(0);
|
67
68
|
const userDrag = (0, _reactNativeReanimated.useSharedValue)(0);
|
68
69
|
const appliedTranslation = (0, _reactNativeReanimated.useSharedValue)(0);
|
@@ -74,8 +75,8 @@ const Swipeable = /*#__PURE__*/(0, _react.forwardRef)(function Swipeable(props,
|
|
74
75
|
const updateAnimatedEvent = (0, _react.useCallback)(() => {
|
75
76
|
'worklet';
|
76
77
|
|
77
|
-
const shouldOvershootLeft = overshootLeft
|
78
|
-
const shouldOvershootRight = overshootRight
|
78
|
+
const shouldOvershootLeft = overshootLeft ?? leftWidth.value > 0;
|
79
|
+
const shouldOvershootRight = overshootRight ?? rightWidth.value > 0;
|
79
80
|
const startOffset = rowState.value === 1 ? leftWidth.value : rowState.value === -1 ? -rightWidth.value : 0;
|
80
81
|
const offsetDrag = userDrag.value / friction + startOffset;
|
81
82
|
appliedTranslation.value = (0, _reactNativeReanimated.interpolate)(offsetDrag, [-rightWidth.value - 1, -rightWidth.value, leftWidth.value, leftWidth.value + 1], [-rightWidth.value - (shouldOvershootRight ? 1 / overshootFriction : 0), -rightWidth.value, leftWidth.value, leftWidth.value + (shouldOvershootLeft ? 1 / overshootFriction : 0)]);
|
@@ -85,22 +86,20 @@ const Swipeable = /*#__PURE__*/(0, _react.forwardRef)(function Swipeable(props,
|
|
85
86
|
const dispatchImmediateEvents = (0, _react.useCallback)((fromValue, toValue) => {
|
86
87
|
'worklet';
|
87
88
|
|
88
|
-
if (toValue
|
89
|
-
(0, _reactNativeReanimated.runOnJS)(onSwipeableWillOpen)(SwipeDirection.RIGHT);
|
90
|
-
}
|
91
|
-
|
92
|
-
} else if (onSwipeableWillClose) {
|
89
|
+
if (onSwipeableWillOpen && toValue !== 0) {
|
90
|
+
(0, _reactNativeReanimated.runOnJS)(onSwipeableWillOpen)(toValue > 0 ? SwipeDirection.RIGHT : SwipeDirection.LEFT);
|
91
|
+
}
|
92
|
+
if (onSwipeableWillClose && toValue === 0) {
|
93
93
|
(0, _reactNativeReanimated.runOnJS)(onSwipeableWillClose)(fromValue > 0 ? SwipeDirection.LEFT : SwipeDirection.RIGHT);
|
94
94
|
}
|
95
|
-
}, [onSwipeableWillClose, onSwipeableWillOpen]);
|
95
|
+
}, [onSwipeableWillClose, onSwipeableWillOpen, rowState]);
|
96
96
|
const dispatchEndEvents = (0, _react.useCallback)((fromValue, toValue) => {
|
97
97
|
'worklet';
|
98
98
|
|
99
|
-
if (toValue
|
100
|
-
(0, _reactNativeReanimated.runOnJS)(onSwipeableOpen)(SwipeDirection.RIGHT);
|
101
|
-
}
|
102
|
-
|
103
|
-
} else if (onSwipeableClose) {
|
99
|
+
if (onSwipeableOpen && toValue !== 0) {
|
100
|
+
(0, _reactNativeReanimated.runOnJS)(onSwipeableOpen)(toValue > 0 ? SwipeDirection.RIGHT : SwipeDirection.LEFT);
|
101
|
+
}
|
102
|
+
if (onSwipeableClose && toValue === 0) {
|
104
103
|
(0, _reactNativeReanimated.runOnJS)(onSwipeableClose)(fromValue > 0 ? SwipeDirection.LEFT : SwipeDirection.RIGHT);
|
105
104
|
}
|
106
105
|
}, [onSwipeableClose, onSwipeableOpen]);
|
@@ -119,7 +118,8 @@ const Swipeable = /*#__PURE__*/(0, _react.forwardRef)(function Swipeable(props,
|
|
119
118
|
const isClosing = toValue === 0;
|
120
119
|
const moveToRight = isClosing ? rowState.value < 0 : toValue > 0;
|
121
120
|
const usedWidth = isClosing ? moveToRight ? rightWidth.value : leftWidth.value : moveToRight ? leftWidth.value : rightWidth.value;
|
122
|
-
const progressSpringConfig = {
|
121
|
+
const progressSpringConfig = {
|
122
|
+
...translationSpringConfig,
|
123
123
|
restDisplacementThreshold: 0.01,
|
124
124
|
restSpeedThreshold: 0.01,
|
125
125
|
velocity: velocityX && (0, _reactNativeReanimated.interpolate)(velocityX, [-usedWidth, usedWidth], [-1, 1])
|
@@ -142,13 +142,11 @@ const Swipeable = /*#__PURE__*/(0, _react.forwardRef)(function Swipeable(props,
|
|
142
142
|
const updateElementWidths = (0, _react.useCallback)(() => {
|
143
143
|
'worklet';
|
144
144
|
|
145
|
-
var _leftLayout$pageX, _leftWrapperLayout$pa, _rightLayout$pageX, _leftWrapperLayout$pa2;
|
146
|
-
|
147
145
|
const leftLayout = (0, _reactNativeReanimated.measure)(leftLayoutRef);
|
148
146
|
const leftWrapperLayout = (0, _reactNativeReanimated.measure)(leftWrapperLayoutRef);
|
149
147
|
const rightLayout = (0, _reactNativeReanimated.measure)(rightLayoutRef);
|
150
|
-
leftWidth.value = (
|
151
|
-
rightWidth.value = rowWidth.value - (
|
148
|
+
leftWidth.value = (leftLayout?.pageX ?? 0) - (leftWrapperLayout?.pageX ?? 0);
|
149
|
+
rightWidth.value = rowWidth.value - (rightLayout?.pageX ?? rowWidth.value) + (leftWrapperLayout?.pageX ?? 0);
|
152
150
|
}, [leftLayoutRef, leftWrapperLayoutRef, rightLayoutRef, leftWidth, rightWidth, rowWidth]);
|
153
151
|
const swipeableMethods = (0, _react.useMemo)(() => ({
|
154
152
|
close() {
|
@@ -158,12 +156,10 @@ const Swipeable = /*#__PURE__*/(0, _react.forwardRef)(function Swipeable(props,
|
|
158
156
|
animateRow(0);
|
159
157
|
return;
|
160
158
|
}
|
161
|
-
|
162
159
|
(0, _reactNativeReanimated.runOnUI)(() => {
|
163
160
|
animateRow(0);
|
164
161
|
})();
|
165
162
|
},
|
166
|
-
|
167
163
|
openLeft() {
|
168
164
|
'worklet';
|
169
165
|
|
@@ -172,13 +168,11 @@ const Swipeable = /*#__PURE__*/(0, _react.forwardRef)(function Swipeable(props,
|
|
172
168
|
animateRow(leftWidth.value);
|
173
169
|
return;
|
174
170
|
}
|
175
|
-
|
176
171
|
(0, _reactNativeReanimated.runOnUI)(() => {
|
177
172
|
updateElementWidths();
|
178
173
|
animateRow(leftWidth.value);
|
179
174
|
})();
|
180
175
|
},
|
181
|
-
|
182
176
|
openRight() {
|
183
177
|
'worklet';
|
184
178
|
|
@@ -187,13 +181,11 @@ const Swipeable = /*#__PURE__*/(0, _react.forwardRef)(function Swipeable(props,
|
|
187
181
|
animateRow(-rightWidth.value);
|
188
182
|
return;
|
189
183
|
}
|
190
|
-
|
191
184
|
(0, _reactNativeReanimated.runOnUI)(() => {
|
192
185
|
updateElementWidths();
|
193
186
|
animateRow(-rightWidth.value);
|
194
187
|
})();
|
195
188
|
},
|
196
|
-
|
197
189
|
reset() {
|
198
190
|
'worklet';
|
199
191
|
|
@@ -202,13 +194,14 @@ const Swipeable = /*#__PURE__*/(0, _react.forwardRef)(function Swipeable(props,
|
|
202
194
|
appliedTranslation.value = 0;
|
203
195
|
rowState.value = 0;
|
204
196
|
}
|
205
|
-
|
206
197
|
}), [animateRow, updateElementWidths, leftWidth, rightWidth, userDrag, showLeftProgress, appliedTranslation, rowState]);
|
207
198
|
const onRowLayout = (0, _react.useCallback)(({
|
208
199
|
nativeEvent
|
209
200
|
}) => {
|
210
201
|
rowWidth.value = nativeEvent.layout.width;
|
211
|
-
}, [rowWidth]);
|
202
|
+
}, [rowWidth]);
|
203
|
+
|
204
|
+
// As stated in `Dimensions.get` docstring, this function should be called on every render
|
212
205
|
// since dimensions may change (e.g. orientation change)
|
213
206
|
|
214
207
|
const leftActionAnimation = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
@@ -216,22 +209,24 @@ const Swipeable = /*#__PURE__*/(0, _react.forwardRef)(function Swipeable(props,
|
|
216
209
|
opacity: showLeftProgress.value === 0 ? 0 : 1
|
217
210
|
};
|
218
211
|
});
|
219
|
-
const leftElement = (0, _react.useCallback)(() => /*#__PURE__*/
|
212
|
+
const leftElement = (0, _react.useCallback)(() => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeReanimated.default.View, {
|
220
213
|
ref: leftWrapperLayoutRef,
|
221
|
-
style: [styles.leftActions, leftActionAnimation]
|
222
|
-
|
223
|
-
|
224
|
-
|
214
|
+
style: [styles.leftActions, leftActionAnimation],
|
215
|
+
children: [renderLeftActions?.(showLeftProgress, appliedTranslation, swipeableMethods), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
216
|
+
ref: leftLayoutRef
|
217
|
+
})]
|
218
|
+
}), [appliedTranslation, leftActionAnimation, leftLayoutRef, leftWrapperLayoutRef, renderLeftActions, showLeftProgress, swipeableMethods]);
|
225
219
|
const rightActionAnimation = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
226
220
|
return {
|
227
221
|
opacity: showRightProgress.value === 0 ? 0 : 1
|
228
222
|
};
|
229
223
|
});
|
230
|
-
const rightElement = (0, _react.useCallback)(() => /*#__PURE__*/
|
231
|
-
style: [styles.rightActions, rightActionAnimation]
|
232
|
-
|
233
|
-
|
234
|
-
|
224
|
+
const rightElement = (0, _react.useCallback)(() => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeReanimated.default.View, {
|
225
|
+
style: [styles.rightActions, rightActionAnimation],
|
226
|
+
children: [renderRightActions?.(showRightProgress, appliedTranslation, swipeableMethods), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
227
|
+
ref: rightLayoutRef
|
228
|
+
})]
|
229
|
+
}), [appliedTranslation, renderRightActions, rightActionAnimation, rightLayoutRef, showRightProgress, swipeableMethods]);
|
235
230
|
const handleRelease = (0, _react.useCallback)(event => {
|
236
231
|
'worklet';
|
237
232
|
|
@@ -239,11 +234,10 @@ const Swipeable = /*#__PURE__*/(0, _react.forwardRef)(function Swipeable(props,
|
|
239
234
|
velocityX
|
240
235
|
} = event;
|
241
236
|
userDrag.value = event.translationX;
|
242
|
-
const leftThresholdProp = leftThreshold
|
243
|
-
const rightThresholdProp = rightThreshold
|
237
|
+
const leftThresholdProp = leftThreshold ?? leftWidth.value / 2;
|
238
|
+
const rightThresholdProp = rightThreshold ?? rightWidth.value / 2;
|
244
239
|
const translationX = (userDrag.value + DRAG_TOSS * velocityX) / friction;
|
245
240
|
let toValue = 0;
|
246
|
-
|
247
241
|
if (rowState.value === 0) {
|
248
242
|
if (translationX > leftThresholdProp) {
|
249
243
|
toValue = leftWidth.value;
|
@@ -261,7 +255,6 @@ const Swipeable = /*#__PURE__*/(0, _react.forwardRef)(function Swipeable(props,
|
|
261
255
|
toValue = -rightWidth.value;
|
262
256
|
}
|
263
257
|
}
|
264
|
-
|
265
258
|
animateRow(toValue, velocityX / friction);
|
266
259
|
}, [animateRow, friction, leftThreshold, leftWidth, rightThreshold, rightWidth, rowState, userDrag]);
|
267
260
|
const close = (0, _react.useCallback)(() => {
|
@@ -276,51 +269,32 @@ const Swipeable = /*#__PURE__*/(0, _react.forwardRef)(function Swipeable(props,
|
|
276
269
|
close();
|
277
270
|
}
|
278
271
|
});
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
}
|
283
|
-
|
284
|
-
if (Array.isArray(simultaneousWithExternalGesture)) {
|
285
|
-
tap.simultaneousWithExternalGesture(...simultaneousWithExternalGesture);
|
286
|
-
} else {
|
287
|
-
tap.simultaneousWithExternalGesture(simultaneousWithExternalGesture);
|
288
|
-
}
|
289
|
-
|
272
|
+
Object.entries(relationProps).forEach(([relationName, relation]) => {
|
273
|
+
(0, _utils.applyRelationProp)(tap, relationName, relation);
|
274
|
+
});
|
290
275
|
return tap;
|
291
276
|
}, [close, rowState, simultaneousWithExternalGesture]);
|
292
277
|
const panGesture = (0, _react.useMemo)(() => {
|
293
278
|
const pan = _gestureObjects.GestureObjects.Pan().enabled(enabled !== false).enableTrackpadTwoFingerGesture(enableTrackpadTwoFingerGesture).activeOffsetX([-dragOffsetFromRightEdge, dragOffsetFromLeftEdge]).onStart(updateElementWidths).onUpdate(event => {
|
294
279
|
userDrag.value = event.translationX;
|
295
280
|
const direction = rowState.value === -1 ? SwipeDirection.RIGHT : rowState.value === 1 ? SwipeDirection.LEFT : event.translationX > 0 ? SwipeDirection.RIGHT : SwipeDirection.LEFT;
|
296
|
-
|
297
281
|
if (!dragStarted.value) {
|
298
282
|
dragStarted.value = true;
|
299
|
-
|
300
283
|
if (rowState.value === 0 && onSwipeableOpenStartDrag) {
|
301
284
|
(0, _reactNativeReanimated.runOnJS)(onSwipeableOpenStartDrag)(direction);
|
302
285
|
} else if (onSwipeableCloseStartDrag) {
|
303
286
|
(0, _reactNativeReanimated.runOnJS)(onSwipeableCloseStartDrag)(direction);
|
304
287
|
}
|
305
288
|
}
|
306
|
-
|
307
289
|
updateAnimatedEvent();
|
308
290
|
}).onEnd(event => {
|
309
291
|
handleRelease(event);
|
310
292
|
}).onFinalize(() => {
|
311
293
|
dragStarted.value = false;
|
312
294
|
});
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
}
|
317
|
-
|
318
|
-
if (Array.isArray(simultaneousWithExternalGesture)) {
|
319
|
-
pan.simultaneousWithExternalGesture(...simultaneousWithExternalGesture);
|
320
|
-
} else {
|
321
|
-
pan.simultaneousWithExternalGesture(simultaneousWithExternalGesture);
|
322
|
-
}
|
323
|
-
|
295
|
+
Object.entries(relationProps).forEach(([relationName, relation]) => {
|
296
|
+
(0, _utils.applyRelationProp)(pan, relationName, relation);
|
297
|
+
});
|
324
298
|
return pan;
|
325
299
|
}, [dragOffsetFromLeftEdge, dragOffsetFromRightEdge, dragStarted, enableTrackpadTwoFingerGesture, enabled, handleRelease, onSwipeableCloseStartDrag, onSwipeableOpenStartDrag, rowState, updateAnimatedEvent, updateElementWidths, userDrag, simultaneousWithExternalGesture]);
|
326
300
|
(0, _react.useImperativeHandle)(ref, () => swipeableMethods, [swipeableMethods]);
|
@@ -330,36 +304,41 @@ const Swipeable = /*#__PURE__*/(0, _react.forwardRef)(function Swipeable(props,
|
|
330
304
|
}],
|
331
305
|
pointerEvents: rowState.value === 0 ? 'auto' : 'box-only'
|
332
306
|
}), [appliedTranslation, rowState]);
|
333
|
-
|
334
|
-
const swipeableComponent = /*#__PURE__*/_react.default.createElement(_GestureDetector.GestureDetector, {
|
307
|
+
const swipeableComponent = /*#__PURE__*/(0, _jsxRuntime.jsx)(_GestureDetector.GestureDetector, {
|
335
308
|
gesture: panGesture,
|
336
|
-
touchAction: "pan-y"
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
309
|
+
touchAction: "pan-y",
|
310
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeReanimated.default.View, {
|
311
|
+
...remainingProps,
|
312
|
+
onLayout: onRowLayout,
|
313
|
+
hitSlop: hitSlop ?? undefined,
|
314
|
+
style: [styles.container, containerStyle],
|
315
|
+
children: [leftElement(), rightElement(), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GestureDetector.GestureDetector, {
|
316
|
+
gesture: tapGesture,
|
317
|
+
touchAction: "pan-y",
|
318
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
319
|
+
style: [animatedStyle, childrenContainerStyle],
|
320
|
+
children: children
|
321
|
+
})
|
322
|
+
})]
|
323
|
+
})
|
324
|
+
});
|
325
|
+
return testID ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
326
|
+
testID: testID,
|
327
|
+
children: swipeableComponent
|
328
|
+
}) : swipeableComponent;
|
350
329
|
});
|
351
|
-
var _default = Swipeable;
|
352
|
-
exports.default = _default;
|
353
|
-
|
330
|
+
var _default = exports.default = Swipeable;
|
354
331
|
const styles = _reactNative.StyleSheet.create({
|
355
332
|
container: {
|
356
333
|
overflow: 'hidden'
|
357
334
|
},
|
358
|
-
leftActions: {
|
335
|
+
leftActions: {
|
336
|
+
..._reactNative.StyleSheet.absoluteFillObject,
|
359
337
|
flexDirection: _reactNative.I18nManager.isRTL ? 'row-reverse' : 'row',
|
360
338
|
overflow: 'hidden'
|
361
339
|
},
|
362
|
-
rightActions: {
|
340
|
+
rightActions: {
|
341
|
+
..._reactNative.StyleSheet.absoluteFillObject,
|
363
342
|
flexDirection: _reactNative.I18nManager.isRTL ? 'row' : 'row-reverse',
|
364
343
|
overflow: 'hidden'
|
365
344
|
}
|