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":["DrawerLayout.tsx"],"names":["DRAG_TOSS","IDLE","DRAGGING","SETTLING","DrawerLayout","Component","constructor","props","React","createRef","state","drawerPosition","drawerWidth","drawerType","dragX","dragXValue","touchX","touchXValue","drawerTranslation","containerWidth","Animated","multiply","Value","add","setValue","translationX","startPositionX","dragOffsetFromOnStartPosition","interpolate","inputRange","outputRange","openValue","extrapolate","gestureOptions","useNativeDriver","useNativeAnimations","onDrawerSlide","listener","ev","Math","floor","abs","nativeEvent","position","onGestureEvent","event","x","setState","layout","width","newState","drawerWillShow","onDrawerStateChanged","oldState","State","ACTIVE","handleRelease","emitStateChanged","drawerState","keyboardDismissMode","Keyboard","dismiss","hideStatusBar","StatusBar","setHidden","statusBarAnimation","drawerShown","drawerLockMode","closeDrawer","velocityX","gestureStartX","dragOffsetBasedOnStart","startOffsetX","projOffsetX","shouldOpen","animateDrawer","showing","accessibilityIsModalView","current","setNativeProps","accessibilityViewIsModal","pointerEventsView","pointerEvents","minSwipeDistance","edgeWidth","fromLeft","gestureOrientation","hitSlop","left","undefined","right","panGestureHandler","activeOffsetX","fromValue","toValue","velocity","speed","nextFramePosition","min","max","willShow","updateShowing","spring","bounciness","start","finished","drawerOpened","onDrawerOpen","onDrawerClose","options","forceUpdate","overlayOpacity","dynamicOverlayStyles","opacity","backgroundColor","overlayColor","onTapHandlerStateChange","styles","overlay","drawerBackgroundColor","drawerContainerStyle","contentContainerStyle","drawerSlide","containerSlide","reverseContentDirection","I18nManager","isRTL","dynamicDrawerStyles","containerStyles","containerTranslateX","transform","translateX","drawerTranslateX","closedDrawerOffset","drawerStyles","flexDirection","main","handleContainerLayout","containerOnBack","containerInFront","children","renderOverlay","drawerContainer","renderNavigationView","ref","onGestureRef","updateAnimatedEvent","shouldComponentUpdate","render","userSelect","activeCursor","mouseButton","enableContextMenu","setPanGestureRef","openingHandlerStateChange","enableTrackpadTwoFingerGesture","renderDrawer","Left","Right","StyleSheet","create","absoluteFillObject","zIndex","flex","overflow"],"mappings":";;;;;;;AAQA;;AAEA;;AACA;;AAqBA;;AAKA;;AACA;;;;;;;;;;AAEA,MAAMA,SAAS,GAAG,IAAlB;AAEA,MAAMC,IAAiB,GAAG,MAA1B;AACA,MAAMC,QAAqB,GAAG,UAA9B;AACA,MAAMC,QAAqB,GAAG,UAA9B;AAEA;AACA;AACA;;AAmLA;AACA;AACA;AACe,MAAMC,YAAN,SAA2BC,eAA3B,CAGb;AAaAC,EAAAA,WAAW,CAACC,MAAD,EAA2B;AACpC,UAAMA,MAAN;;AADoC;;AAAA;;AAAA,mEAoCHC,KAAK,CAACC,SAAN,EApCG;;AAAA,4DAqCVD,KAAK,CAACC,SAAN,EArCU;;AAAA,4DAsCVD,KAAK,CAACC,SAAN,EAtCU;;AAAA,yCAuChB,KAvCgB;;AAAA,iDA8CR,CAC5BF,KAD4B,EAE5BG,KAF4B,KAGzB;AACH;AACA,YAAM;AAAEC,QAAAA,cAAF;AAAkBC,QAAAA,WAAlB;AAA+BC,QAAAA;AAA/B,UAA8CN,KAApD;AACA,YAAM;AACJO,QAAAA,KAAK,EAAEC,UADH;AAEJC,QAAAA,MA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U/BxB,EAAAA,eAAe,EAAE,EACf,GAAGqB,wBAAWE;AADC,GAVc;AAa/BzB,EAAAA,IAAI,EAAE;AACJ2B,IAAAA,IAAI,EAAE,CADF;AAEJD,IAAAA,MAAM,EAAE,CAFJ;AAGJE,IAAAA,QAAQ,EAAE;AAHN,GAbyB;AAkB/B9C,EAAAA,OAAO,EAAE,EACP,GAAGyC,wBAAWE,kBADP;AAEPC,IAAAA,MAAM,EAAE;AAFD;AAlBsB,CAAlB,CAAf","sourcesContent":["// This component is based on RN's DrawerLayoutAndroid API\n//\n// It perhaps deserves to be put in a separate repo, but since it relies on\n// react-native-gesture-handler library which isn't very popular at the moment I\n// decided to keep it here for the time being. It will allow us to move faster\n// and fix issues that may arise in gesture handler library that could be found\n// when using the drawer component\n\nimport * as React from 'react';\nimport { Component } from 'react';\nimport invariant from 'invariant';\nimport {\n Animated,\n StyleSheet,\n View,\n Keyboard,\n StatusBar,\n I18nManager,\n StatusBarAnimation,\n StyleProp,\n ViewStyle,\n LayoutChangeEvent,\n NativeSyntheticEvent,\n} from 'react-native';\n\nimport {\n GestureEvent,\n HandlerStateChangeEvent,\n UserSelect,\n ActiveCursor,\n MouseButton,\n} from '../handlers/gestureHandlerCommon';\nimport { PanGestureHandler } from '../handlers/PanGestureHandler';\nimport type {\n PanGestureHandlerEventPayload,\n TapGestureHandlerEventPayload,\n} from '../handlers/GestureHandlerEventPayload';\nimport { TapGestureHandler } from '../handlers/TapGestureHandler';\nimport { State } from '../State';\n\nconst DRAG_TOSS = 0.05;\n\nconst IDLE: DrawerState = 'Idle';\nconst DRAGGING: DrawerState = 'Dragging';\nconst SETTLING: DrawerState = 'Settling';\n\n/**\n * @deprecated DrawerLayout is deprecated. Use Reanimated version of DrawerLayout instead.\n */\nexport type DrawerPosition = 'left' | 'right';\n\n/**\n * @deprecated DrawerLayout is deprecated. Use Reanimated version of DrawerLayout instead.\n */\nexport type DrawerState = 'Idle' | 'Dragging' | 'Settling';\n\n/**\n * @deprecated DrawerLayout is deprecated. Use Reanimated version of DrawerLayout instead.\n */\nexport type DrawerType = 'front' | 'back' | 'slide';\n\n/**\n * @deprecated DrawerLayout is deprecated. Use Reanimated version of DrawerLayout instead.\n */\nexport type DrawerLockMode = 'unlocked' | 'locked-closed' | 'locked-open';\n\n/**\n * @deprecated DrawerLayout is deprecated. Use Reanimated version of DrawerLayout instead.\n */\nexport type DrawerKeyboardDismissMode = 'none' | 'on-drag';\n\n// Animated.AnimatedInterpolation has been converted to a generic type\n// in @types/react-native 0.70. This way we can maintain compatibility\n// with all versions of @types/react-native`\ntype AnimatedInterpolation = ReturnType<Animated.Value['interpolate']>;\n\n/**\n * @deprecated DrawerLayout is deprecated. Use Reanimated version of DrawerLayout instead.\n */\nexport interface DrawerLayoutProps {\n /**\n * This attribute is present in the standard implementation already and is one\n * of the required params. Gesture handler version of DrawerLayout make 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: Animated.Value\n ) => React.ReactNode;\n\n drawerPosition?: DrawerPosition;\n\n drawerWidth?: number;\n\n drawerBackgroundColor?: string;\n\n drawerLockMode?: DrawerLockMode;\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 useNativeAnimations?: boolean;\n\n drawerType?: DrawerType;\n\n /**\n * Defines how far from the edge of the content view the gesture should\n * activate.\n */\n edgeWidth?: number;\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 black\n *\n * Color of a semi-transparent overlay to be displayed on top of the content\n * view when drawer gets open. A solid color should be used as the opacity is\n * added by the Drawer itself and the opacity of the overlay is animated (from\n * 0% to 70%).\n */\n overlayColor?: string;\n\n contentContainerStyle?: StyleProp<ViewStyle>;\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 onGestureRef?: (ref: PanGestureHandler) => void;\n\n // Implicit `children` prop has been removed in @types/react^18.0.0\n children?:\n | React.ReactNode\n | ((openValue?: AnimatedInterpolation) => React.ReactNode);\n\n /**\n * @default 'none'\n * Defines which userSelect property should be used.\n * Values: 'none'|'text'|'auto'\n */\n userSelect?: UserSelect;\n\n /**\n * @default 'auto'\n * Defines which cursor property should be used when gesture activates.\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\n/**\n * @deprecated DrawerLayout is deprecated. Use Reanimated version of DrawerLayout instead.\n */\nexport type DrawerLayoutState = {\n dragX: Animated.Value;\n touchX: Animated.Value;\n drawerTranslation: Animated.Value;\n containerWidth: number;\n drawerState: DrawerState;\n drawerOpened: boolean;\n};\n\n/**\n * @deprecated DrawerLayout is deprecated. Use Reanimated version of DrawerLayout instead.\n */\nexport type DrawerMovementOption = {\n velocity?: number;\n speed?: number;\n};\n\n/**\n * @deprecated use Reanimated version of DrawerLayout instead\n */\nexport default class DrawerLayout extends Component<\n DrawerLayoutProps,\n DrawerLayoutState\n> {\n static defaultProps = {\n drawerWidth: 200,\n drawerPosition: 'left',\n useNativeAnimations: true,\n drawerType: 'front',\n edgeWidth: 20,\n minSwipeDistance: 3,\n overlayColor: 'rgba(0, 0, 0, 0.7)',\n drawerLockMode: 'unlocked',\n enableTrackpadTwoFingerGesture: false,\n };\n\n constructor(props: DrawerLayoutProps) {\n super(props);\n\n const dragX = new Animated.Value(0);\n const touchX = new Animated.Value(0);\n const drawerTranslation = new Animated.Value(0);\n\n this.state = {\n dragX,\n touchX,\n drawerTranslation,\n containerWidth: 0,\n drawerState: IDLE,\n drawerOpened: false,\n };\n\n this.updateAnimatedEvent(props, this.state);\n }\n\n shouldComponentUpdate(props: DrawerLayoutProps, state: DrawerLayoutState) {\n if (\n this.props.drawerPosition !== props.drawerPosition ||\n this.props.drawerWidth !== props.drawerWidth ||\n this.props.drawerType !== props.drawerType ||\n this.state.containerWidth !== state.containerWidth\n ) {\n this.updateAnimatedEvent(props, state);\n }\n\n return true;\n }\n\n private openValue?: AnimatedInterpolation;\n private onGestureEvent?: (\n event: GestureEvent<PanGestureHandlerEventPayload>\n ) => void;\n private accessibilityIsModalView = React.createRef<View>();\n private pointerEventsView = React.createRef<View>();\n private panGestureHandler = React.createRef<PanGestureHandler | null>();\n private drawerShown = false;\n\n static positions = {\n Left: 'left',\n Right: 'right',\n };\n\n private updateAnimatedEvent = (\n props: DrawerLayoutProps,\n state: DrawerLayoutState\n ) => {\n // Event definition is based on\n const { drawerPosition, drawerWidth, drawerType } = props;\n const {\n dragX: dragXValue,\n touchX: touchXValue,\n drawerTranslation,\n containerWidth,\n } = state;\n\n let dragX = dragXValue;\n let touchX = touchXValue;\n\n if (drawerPosition !== 'left') {\n // Most of the code is written in a way to handle left-side drawer. In\n // order to handle right-side drawer the only thing we need to do is to\n // reverse events coming from gesture handler in a way they emulate\n // left-side drawer gestures. E.g. dragX is simply -dragX, and touchX is\n // calulcated by subtracing real touchX from the width of the container\n // (such that when touch happens at the right edge the value is simply 0)\n dragX = Animated.multiply(\n new Animated.Value(-1),\n dragXValue\n ) as Animated.Value; // TODO(TS): (for all \"as\" in this file) make sure we can map this\n touchX = Animated.add(\n new Animated.Value(containerWidth),\n Animated.multiply(new Animated.Value(-1), touchXValue)\n ) as Animated.Value; // TODO(TS): make sure we can map this;\n touchXValue.setValue(containerWidth);\n } else {\n touchXValue.setValue(0);\n }\n\n // While closing the drawer when user starts gesture outside of its area (in greyed\n // out part of the window), we want the drawer to follow only once finger reaches the\n // edge of the drawer.\n // E.g. on the diagram below drawer is illustrate by X signs and the greyed out area by\n // dots. The touch gesture starts at '*' and moves left, touch path is indicated by\n // an arrow pointing left\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 // |XXXXXXXX|......| |XXXXXXXX|......| |XXXXXXXX|......| |XXXXX|.........|\n // |XXXXXXXX|......| |XXXXXXXX|......| |XXXXXXXX|......| |XXXXX|.........|\n // +---------------+ +---------------+ +---------------+ +---------------+\n //\n // For the above to work properly we define animated value that will keep\n // start position of the gesture. Then we use that value to calculate how\n // much we need to subtract from the dragX. If the gesture started on the\n // greyed out area we take the distance from the edge of the drawer to the\n // start position. Otherwise we don't subtract at all and the drawer be\n // pulled back as soon as you start the pan.\n //\n // This is used only when drawerType is \"front\"\n //\n let translationX = dragX;\n if (drawerType === 'front') {\n const startPositionX = Animated.add(\n touchX,\n Animated.multiply(new Animated.Value(-1), dragX)\n );\n\n const dragOffsetFromOnStartPosition = startPositionX.interpolate({\n inputRange: [drawerWidth! - 1, drawerWidth!, drawerWidth! + 1],\n outputRange: [0, 0, 1],\n });\n translationX = Animated.add(\n dragX,\n dragOffsetFromOnStartPosition\n ) as Animated.Value; // TODO: as above\n }\n\n this.openValue = Animated.add(translationX, drawerTranslation).interpolate({\n inputRange: [0, drawerWidth!],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n });\n\n const gestureOptions: {\n useNativeDriver: boolean;\n // TODO: make sure it is correct\n listener?: (\n ev: NativeSyntheticEvent<PanGestureHandlerEventPayload>\n ) => void;\n } = {\n useNativeDriver: props.useNativeAnimations!,\n };\n\n if (this.props.onDrawerSlide) {\n gestureOptions.listener = (ev) => {\n const translationX = Math.floor(Math.abs(ev.nativeEvent.translationX));\n const position = translationX / this.state.containerWidth;\n\n this.props.onDrawerSlide?.(position);\n };\n }\n\n this.onGestureEvent = Animated.event(\n [{ nativeEvent: { translationX: dragXValue, x: touchXValue } }],\n gestureOptions\n );\n };\n\n private handleContainerLayout = ({ nativeEvent }: LayoutChangeEvent) => {\n this.setState({ containerWidth: nativeEvent.layout.width });\n };\n\n private emitStateChanged = (\n newState: DrawerState,\n drawerWillShow: boolean\n ) => {\n this.props.onDrawerStateChanged?.(newState, drawerWillShow);\n };\n\n private openingHandlerStateChange = ({\n nativeEvent,\n }: HandlerStateChangeEvent<PanGestureHandlerEventPayload>) => {\n if (nativeEvent.oldState === State.ACTIVE) {\n this.handleRelease({ nativeEvent });\n } else if (nativeEvent.state === State.ACTIVE) {\n this.emitStateChanged(DRAGGING, false);\n this.setState({ drawerState: DRAGGING });\n if (this.props.keyboardDismissMode === 'on-drag') {\n Keyboard.dismiss();\n }\n if (this.props.hideStatusBar) {\n StatusBar.setHidden(true, this.props.statusBarAnimation || 'slide');\n }\n }\n };\n\n private onTapHandlerStateChange = ({\n nativeEvent,\n }: HandlerStateChangeEvent<TapGestureHandlerEventPayload>) => {\n if (\n this.drawerShown &&\n nativeEvent.oldState === State.ACTIVE &&\n this.props.drawerLockMode !== 'locked-open'\n ) {\n this.closeDrawer();\n }\n };\n\n private handleRelease = ({\n nativeEvent,\n }: HandlerStateChangeEvent<PanGestureHandlerEventPayload>) => {\n const { drawerWidth, drawerPosition, drawerType } = this.props;\n const { containerWidth } = this.state;\n let { translationX: dragX, velocityX, x: touchX } = nativeEvent;\n\n if (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 === 'front') {\n dragOffsetBasedOnStart =\n gestureStartX > drawerWidth! ? gestureStartX - drawerWidth! : 0;\n }\n\n const startOffsetX =\n dragX + dragOffsetBasedOnStart + (this.drawerShown ? drawerWidth! : 0);\n const projOffsetX = startOffsetX + DRAG_TOSS * velocityX;\n\n const shouldOpen = projOffsetX > drawerWidth! / 2;\n\n if (shouldOpen) {\n this.animateDrawer(startOffsetX, drawerWidth!, velocityX);\n } else {\n this.animateDrawer(startOffsetX, 0, velocityX);\n }\n };\n\n private updateShowing = (showing: boolean) => {\n this.drawerShown = showing;\n this.accessibilityIsModalView.current?.setNativeProps({\n accessibilityViewIsModal: showing,\n });\n this.pointerEventsView.current?.setNativeProps({\n pointerEvents: showing ? 'auto' : 'none',\n });\n const { drawerPosition, minSwipeDistance, edgeWidth } = this.props;\n const fromLeft = drawerPosition === 'left';\n // gestureOrientation is 1 if the expected gesture is from left to right and\n // -1 otherwise e.g. when drawer is on the left and is closed we expect left\n // to right gesture, thus orientation will be 1.\n const gestureOrientation =\n (fromLeft ? 1 : -1) * (this.drawerShown ? -1 : 1);\n // When drawer is closed we want the hitSlop to be horizontally shorter than\n // the container size by the value of SLOP. This will make it only activate\n // when gesture happens not further than SLOP away from the edge\n const hitSlop = fromLeft\n ? { left: 0, width: showing ? undefined : edgeWidth }\n : { right: 0, width: showing ? undefined : edgeWidth };\n // @ts-ignore internal API, maybe could be fixed in handler types\n this.panGestureHandler.current?.setNativeProps({\n hitSlop,\n activeOffsetX: gestureOrientation * minSwipeDistance!,\n });\n };\n\n private animateDrawer = (\n fromValue: number | null | undefined,\n toValue: number,\n velocity: number,\n speed?: number\n ) => {\n this.state.dragX.setValue(0);\n this.state.touchX.setValue(\n this.props.drawerPosition === 'left' ? 0 : this.state.containerWidth\n );\n\n if (fromValue != null) {\n let nextFramePosition = fromValue;\n if (this.props.useNativeAnimations) {\n // When using native driver, we predict the next position of the\n // animation because it takes one frame of a roundtrip to pass RELEASE\n // event from native driver to JS before we can start animating. Without\n // it, it is more noticable that the frame is dropped.\n if (fromValue < toValue && velocity > 0) {\n nextFramePosition = Math.min(fromValue + velocity / 60.0, toValue);\n } else if (fromValue > toValue && velocity < 0) {\n nextFramePosition = Math.max(fromValue + velocity / 60.0, toValue);\n }\n }\n this.state.drawerTranslation.setValue(nextFramePosition);\n }\n\n const willShow = toValue !== 0;\n this.updateShowing(willShow);\n this.emitStateChanged(SETTLING, willShow);\n this.setState({ drawerState: SETTLING });\n if (this.props.hideStatusBar) {\n StatusBar.setHidden(willShow, this.props.statusBarAnimation || 'slide');\n }\n Animated.spring(this.state.drawerTranslation, {\n velocity,\n bounciness: 0,\n toValue,\n useNativeDriver: this.props.useNativeAnimations!,\n speed: speed ?? undefined,\n }).start(({ finished }) => {\n if (finished) {\n this.emitStateChanged(IDLE, willShow);\n this.setState({ drawerOpened: willShow });\n if (this.state.drawerState !== DRAGGING) {\n // It's possilbe that user started drag while the drawer\n // was settling, don't override state in this case\n this.setState({ drawerState: IDLE });\n }\n if (willShow) {\n this.props.onDrawerOpen?.();\n } else {\n this.props.onDrawerClose?.();\n }\n }\n });\n };\n\n openDrawer = (options: DrawerMovementOption = {}) => {\n this.animateDrawer(\n // TODO: decide if it should be null or undefined is the proper value\n undefined,\n this.props.drawerWidth!,\n options.velocity ? options.velocity : 0,\n options.speed\n );\n\n // We need to force the update, otherwise the overlay is not rerendered and\n // it would not be clickable\n this.forceUpdate();\n };\n\n closeDrawer = (options: DrawerMovementOption = {}) => {\n // TODO: decide if it should be null or undefined is the proper value\n this.animateDrawer(\n undefined,\n 0,\n options.velocity ? options.velocity : 0,\n options.speed\n );\n\n // We need to force the update, otherwise the overlay is not rerendered and\n // it would be still clickable\n this.forceUpdate();\n };\n\n private renderOverlay = () => {\n /* Overlay styles */\n invariant(this.openValue, 'should be set');\n let overlayOpacity;\n\n if (this.state.drawerState !== IDLE) {\n overlayOpacity = this.openValue;\n } else {\n overlayOpacity = this.state.drawerOpened ? 1 : 0;\n }\n\n const dynamicOverlayStyles = {\n opacity: overlayOpacity,\n backgroundColor: this.props.overlayColor,\n };\n\n return (\n <TapGestureHandler onHandlerStateChange={this.onTapHandlerStateChange}>\n <Animated.View\n pointerEvents={this.drawerShown ? 'auto' : 'none'}\n ref={this.pointerEventsView}\n style={[styles.overlay, dynamicOverlayStyles]}\n />\n </TapGestureHandler>\n );\n };\n\n private renderDrawer = () => {\n const {\n drawerBackgroundColor,\n drawerWidth,\n drawerPosition,\n drawerType,\n drawerContainerStyle,\n contentContainerStyle,\n } = this.props;\n\n const fromLeft = drawerPosition === 'left';\n const drawerSlide = drawerType !== 'back';\n const containerSlide = drawerType !== 'front';\n\n // We rely on row and row-reverse flex directions to position the drawer\n // properly. Apparently for RTL these are flipped which requires us to use\n // the opposite setting for the drawer to appear from left or right\n // according to the drawerPosition prop\n const reverseContentDirection = I18nManager.isRTL ? fromLeft : !fromLeft;\n\n const dynamicDrawerStyles = {\n backgroundColor: drawerBackgroundColor,\n width: drawerWidth,\n };\n const openValue = this.openValue;\n invariant(openValue, 'should be set');\n\n let containerStyles;\n if (containerSlide) {\n const containerTranslateX = openValue.interpolate({\n inputRange: [0, 1],\n outputRange: fromLeft ? [0, drawerWidth!] : [0, -drawerWidth!],\n extrapolate: 'clamp',\n });\n containerStyles = {\n transform: [{ translateX: containerTranslateX }],\n };\n }\n\n let drawerTranslateX: number | AnimatedInterpolation = 0;\n if (drawerSlide) {\n const closedDrawerOffset = fromLeft ? -drawerWidth! : drawerWidth!;\n if (this.state.drawerState !== IDLE) {\n drawerTranslateX = openValue.interpolate({\n inputRange: [0, 1],\n outputRange: [closedDrawerOffset, 0],\n extrapolate: 'clamp',\n });\n } else {\n drawerTranslateX = this.state.drawerOpened ? 0 : closedDrawerOffset;\n }\n }\n const drawerStyles: {\n transform: { translateX: number | AnimatedInterpolation }[];\n flexDirection: 'row-reverse' | 'row';\n } = {\n transform: [{ translateX: drawerTranslateX }],\n flexDirection: reverseContentDirection ? 'row-reverse' : 'row',\n };\n\n return (\n <Animated.View style={styles.main} onLayout={this.handleContainerLayout}>\n <Animated.View\n style={[\n drawerType === 'front'\n ? styles.containerOnBack\n : styles.containerInFront,\n containerStyles,\n contentContainerStyle,\n ]}\n importantForAccessibility={\n this.drawerShown ? 'no-hide-descendants' : 'yes'\n }>\n {typeof this.props.children === 'function'\n ? this.props.children(this.openValue)\n : this.props.children}\n {this.renderOverlay()}\n </Animated.View>\n <Animated.View\n pointerEvents=\"box-none\"\n ref={this.accessibilityIsModalView}\n accessibilityViewIsModal={this.drawerShown}\n style={[styles.drawerContainer, drawerStyles, drawerContainerStyle]}>\n <View style={dynamicDrawerStyles}>\n {this.props.renderNavigationView(this.openValue as Animated.Value)}\n </View>\n </Animated.View>\n </Animated.View>\n );\n };\n\n private setPanGestureRef = (ref: PanGestureHandler) => {\n // TODO(TS): make sure it is OK taken from\n // https://github.com/DefinitelyTyped/DefinitelyTyped/issues/31065#issuecomment-596081842\n (\n this.panGestureHandler as React.MutableRefObject<PanGestureHandler>\n ).current = ref;\n this.props.onGestureRef?.(ref);\n };\n\n render() {\n const { drawerPosition, drawerLockMode, edgeWidth, minSwipeDistance } =\n this.props;\n\n const fromLeft = drawerPosition === 'left';\n\n // gestureOrientation is 1 if the expected gesture is from left to right and\n // -1 otherwise e.g. when drawer is on the left and is closed we expect left\n // to right gesture, thus orientation will be 1.\n const gestureOrientation =\n (fromLeft ? 1 : -1) * (this.drawerShown ? -1 : 1);\n\n // When drawer is closed we want the hitSlop to be horizontally shorter than\n // the container size by the value of SLOP. This will make it only activate\n // when gesture happens not further than SLOP away from the edge\n const hitSlop = fromLeft\n ? { left: 0, width: this.drawerShown ? undefined : edgeWidth }\n : { right: 0, width: this.drawerShown ? undefined : edgeWidth };\n\n return (\n <PanGestureHandler\n // @ts-ignore could be fixed in handler types\n userSelect={this.props.userSelect}\n activeCursor={this.props.activeCursor}\n mouseButton={this.props.mouseButton}\n enableContextMenu={this.props.enableContextMenu}\n ref={this.setPanGestureRef}\n hitSlop={hitSlop}\n activeOffsetX={gestureOrientation * minSwipeDistance!}\n failOffsetY={[-15, 15]}\n onGestureEvent={this.onGestureEvent}\n onHandlerStateChange={this.openingHandlerStateChange}\n enableTrackpadTwoFingerGesture={\n this.props.enableTrackpadTwoFingerGesture\n }\n enabled={\n drawerLockMode !== 'locked-closed' && drawerLockMode !== 'locked-open'\n }>\n {this.renderDrawer()}\n </PanGestureHandler>\n );\n }\n}\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","React","_invariant","_interopRequireDefault","_reactNative","_PanGestureHandler","_TapGestureHandler","_State","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","DRAG_TOSS","IDLE","DRAGGING","SETTLING","DrawerLayout","Component","defaultProps","drawerWidth","drawerPosition","useNativeAnimations","drawerType","edgeWidth","minSwipeDistance","overlayColor","drawerLockMode","enableTrackpadTwoFingerGesture","constructor","props","dragX","Animated","Value","touchX","drawerTranslation","state","containerWidth","drawerState","drawerOpened","updateAnimatedEvent","shouldComponentUpdate","accessibilityIsModalView","createRef","pointerEventsView","panGestureHandler","drawerShown","positions","Left","Right","dragXValue","touchXValue","multiply","add","setValue","translationX","startPositionX","dragOffsetFromOnStartPosition","interpolate","inputRange","outputRange","openValue","extrapolate","gestureOptions","useNativeDriver","onDrawerSlide","listener","ev","Math","floor","abs","nativeEvent","position","onGestureEvent","event","x","handleContainerLayout","setState","layout","width","emitStateChanged","newState","drawerWillShow","onDrawerStateChanged","openingHandlerStateChange","oldState","State","ACTIVE","handleRelease","keyboardDismissMode","Keyboard","dismiss","hideStatusBar","StatusBar","setHidden","statusBarAnimation","onTapHandlerStateChange","closeDrawer","velocityX","gestureStartX","dragOffsetBasedOnStart","startOffsetX","projOffsetX","shouldOpen","animateDrawer","updateShowing","showing","current","setNativeProps","accessibilityViewIsModal","pointerEvents","fromLeft","gestureOrientation","hitSlop","left","undefined","right","activeOffsetX","fromValue","toValue","velocity","speed","nextFramePosition","min","max","willShow","spring","bounciness","start","finished","onDrawerOpen","onDrawerClose","openDrawer","options","forceUpdate","renderOverlay","invariant","overlayOpacity","dynamicOverlayStyles","opacity","backgroundColor","jsx","TapGestureHandler","onHandlerStateChange","children","View","ref","style","styles","overlay","renderDrawer","drawerBackgroundColor","drawerContainerStyle","contentContainerStyle","drawerSlide","containerSlide","reverseContentDirection","I18nManager","isRTL","dynamicDrawerStyles","containerStyles","containerTranslateX","transform","translateX","drawerTranslateX","closedDrawerOffset","drawerStyles","flexDirection","jsxs","main","onLayout","containerOnBack","containerInFront","importantForAccessibility","drawerContainer","renderNavigationView","setPanGestureRef","onGestureRef","render","PanGestureHandler","userSelect","activeCursor","mouseButton","enableContextMenu","failOffsetY","enabled","exports","StyleSheet","create","absoluteFillObject","zIndex","flex","overflow"],"sourceRoot":"../../../src","sources":["components/DrawerLayout.tsx"],"mappings":";;;;;;AAQA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA+B,IAAAC,KAAA,GAAAH,MAAA;AAE/B,IAAAI,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAqBA,IAAAK,kBAAA,GAAAL,OAAA;AAKA,IAAAM,kBAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAAiC,IAAAQ,WAAA,GAAAR,OAAA;AAAA,SAAAG,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAV,wBAAAU,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAd,uBAAA,YAAAA,CAAAU,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAR,OAAA,EAAAF,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAS,CAAA,MAAAF,CAAA,GAAAJ,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAE,CAAA,CAAAI,GAAA,CAAAX,CAAA,UAAAO,CAAA,CAAAK,GAAA,CAAAZ,CAAA,GAAAO,CAAA,CAAAM,GAAA,CAAAb,CAAA,EAAAS,CAAA,gBAAAN,CAAA,IAAAH,CAAA,gBAAAG,CAAA,OAAAW,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAG,CAAA,OAAAK,CAAA,IAAAD,CAAA,GAAAS,MAAA,C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CAAC;EACDpB,IAAI,EAAE;IACJsB,IAAI,EAAE,CAAC;IACPD,MAAM,EAAE,CAAC;IACTE,QAAQ,EAAE;EACZ,CAAC;EACD3C,OAAO,EAAE;IACP,GAAGsC,uBAAU,CAACE,kBAAkB;IAChCC,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
|
@@ -3,156 +3,120 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
+
exports.BorderlessButton = exports.BaseButton = void 0;
|
6
7
|
Object.defineProperty(exports, "PureNativeButton", {
|
7
8
|
enumerable: true,
|
8
9
|
get: function () {
|
9
10
|
return _GestureHandlerButton.default;
|
10
11
|
}
|
11
12
|
});
|
12
|
-
exports.
|
13
|
-
|
13
|
+
exports.RectButton = exports.RawButton = void 0;
|
14
14
|
var React = _interopRequireWildcard(require("react"));
|
15
|
-
|
16
15
|
var _reactNative = require("react-native");
|
17
|
-
|
18
16
|
var _createNativeWrapper = _interopRequireDefault(require("../handlers/createNativeWrapper"));
|
19
|
-
|
20
17
|
var _GestureHandlerButton = _interopRequireDefault(require("./GestureHandlerButton"));
|
21
|
-
|
22
18
|
var _State = require("../State");
|
23
|
-
|
24
19
|
var _utils = require("../utils");
|
25
|
-
|
26
|
-
function _interopRequireDefault(
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
31
|
-
|
32
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
33
|
-
|
34
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
35
|
-
|
36
|
-
const RawButton = (0, _createNativeWrapper.default)(_GestureHandlerButton.default, {
|
20
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
21
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
22
|
+
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); }
|
23
|
+
const RawButton = exports.RawButton = (0, _createNativeWrapper.default)(_GestureHandlerButton.default, {
|
37
24
|
shouldCancelWhenOutside: false,
|
38
25
|
shouldActivateOnStart: false
|
39
26
|
});
|
40
|
-
exports.RawButton = RawButton;
|
41
27
|
let IS_FABRIC = null;
|
42
|
-
|
43
28
|
class InnerBaseButton extends React.Component {
|
29
|
+
static defaultProps = {
|
30
|
+
delayLongPress: 600
|
31
|
+
};
|
44
32
|
constructor(props) {
|
45
33
|
super(props);
|
46
|
-
|
47
|
-
_defineProperty(this, "lastActive", void 0);
|
48
|
-
|
49
|
-
_defineProperty(this, "longPressTimeout", void 0);
|
50
|
-
|
51
|
-
_defineProperty(this, "longPressDetected", void 0);
|
52
|
-
|
53
|
-
_defineProperty(this, "handleEvent", ({
|
54
|
-
nativeEvent
|
55
|
-
}) => {
|
56
|
-
const {
|
57
|
-
state,
|
58
|
-
oldState,
|
59
|
-
pointerInside
|
60
|
-
} = nativeEvent;
|
61
|
-
const active = pointerInside && state === _State.State.ACTIVE;
|
62
|
-
|
63
|
-
if (active !== this.lastActive && this.props.onActiveStateChange) {
|
64
|
-
this.props.onActiveStateChange(active);
|
65
|
-
}
|
66
|
-
|
67
|
-
if (!this.longPressDetected && oldState === _State.State.ACTIVE && state !== _State.State.CANCELLED && this.lastActive && this.props.onPress) {
|
68
|
-
this.props.onPress(pointerInside);
|
69
|
-
}
|
70
|
-
|
71
|
-
if (!this.lastActive && // NativeViewGestureHandler sends different events based on platform
|
72
|
-
state === (_reactNative.Platform.OS !== 'android' ? _State.State.ACTIVE : _State.State.BEGAN) && pointerInside) {
|
73
|
-
this.longPressDetected = false;
|
74
|
-
|
75
|
-
if (this.props.onLongPress) {
|
76
|
-
this.longPressTimeout = setTimeout(this.onLongPress, this.props.delayLongPress);
|
77
|
-
}
|
78
|
-
} else if ( // Cancel longpress timeout if it's set and the finger moved out of the view
|
79
|
-
state === _State.State.ACTIVE && !pointerInside && this.longPressTimeout !== undefined) {
|
80
|
-
clearTimeout(this.longPressTimeout);
|
81
|
-
this.longPressTimeout = undefined;
|
82
|
-
} else if ( // Cancel longpress timeout if it's set and the gesture has finished
|
83
|
-
this.longPressTimeout !== undefined && (state === _State.State.END || state === _State.State.CANCELLED || state === _State.State.FAILED)) {
|
84
|
-
clearTimeout(this.longPressTimeout);
|
85
|
-
this.longPressTimeout = undefined;
|
86
|
-
}
|
87
|
-
|
88
|
-
this.lastActive = active;
|
89
|
-
});
|
90
|
-
|
91
|
-
_defineProperty(this, "onLongPress", () => {
|
92
|
-
var _this$props$onLongPre, _this$props;
|
93
|
-
|
94
|
-
this.longPressDetected = true;
|
95
|
-
(_this$props$onLongPre = (_this$props = this.props).onLongPress) === null || _this$props$onLongPre === void 0 ? void 0 : _this$props$onLongPre.call(_this$props);
|
96
|
-
});
|
97
|
-
|
98
|
-
_defineProperty(this, "onHandlerStateChange", e => {
|
99
|
-
var _this$props$onHandler, _this$props2;
|
100
|
-
|
101
|
-
(_this$props$onHandler = (_this$props2 = this.props).onHandlerStateChange) === null || _this$props$onHandler === void 0 ? void 0 : _this$props$onHandler.call(_this$props2, e);
|
102
|
-
this.handleEvent(e);
|
103
|
-
});
|
104
|
-
|
105
|
-
_defineProperty(this, "onGestureEvent", e => {
|
106
|
-
var _this$props$onGesture, _this$props3;
|
107
|
-
|
108
|
-
(_this$props$onGesture = (_this$props3 = this.props).onGestureEvent) === null || _this$props$onGesture === void 0 ? void 0 : _this$props$onGesture.call(_this$props3, e);
|
109
|
-
this.handleEvent(e); // TODO: maybe it is not correct
|
110
|
-
});
|
111
|
-
|
112
34
|
this.lastActive = false;
|
113
35
|
this.longPressDetected = false;
|
114
36
|
}
|
115
|
-
|
37
|
+
handleEvent = ({
|
38
|
+
nativeEvent
|
39
|
+
}) => {
|
40
|
+
const {
|
41
|
+
state,
|
42
|
+
oldState,
|
43
|
+
pointerInside
|
44
|
+
} = nativeEvent;
|
45
|
+
const active = pointerInside && state === _State.State.ACTIVE;
|
46
|
+
if (active !== this.lastActive && this.props.onActiveStateChange) {
|
47
|
+
this.props.onActiveStateChange(active);
|
48
|
+
}
|
49
|
+
if (!this.longPressDetected && oldState === _State.State.ACTIVE && state !== _State.State.CANCELLED && this.lastActive && this.props.onPress) {
|
50
|
+
this.props.onPress(pointerInside);
|
51
|
+
}
|
52
|
+
if (!this.lastActive &&
|
53
|
+
// NativeViewGestureHandler sends different events based on platform
|
54
|
+
state === (_reactNative.Platform.OS !== 'android' ? _State.State.ACTIVE : _State.State.BEGAN) && pointerInside) {
|
55
|
+
this.longPressDetected = false;
|
56
|
+
if (this.props.onLongPress) {
|
57
|
+
this.longPressTimeout = setTimeout(this.onLongPress, this.props.delayLongPress);
|
58
|
+
}
|
59
|
+
} else if (
|
60
|
+
// Cancel longpress timeout if it's set and the finger moved out of the view
|
61
|
+
state === _State.State.ACTIVE && !pointerInside && this.longPressTimeout !== undefined) {
|
62
|
+
clearTimeout(this.longPressTimeout);
|
63
|
+
this.longPressTimeout = undefined;
|
64
|
+
} else if (
|
65
|
+
// Cancel longpress timeout if it's set and the gesture has finished
|
66
|
+
this.longPressTimeout !== undefined && (state === _State.State.END || state === _State.State.CANCELLED || state === _State.State.FAILED)) {
|
67
|
+
clearTimeout(this.longPressTimeout);
|
68
|
+
this.longPressTimeout = undefined;
|
69
|
+
}
|
70
|
+
this.lastActive = active;
|
71
|
+
};
|
72
|
+
onLongPress = () => {
|
73
|
+
this.longPressDetected = true;
|
74
|
+
this.props.onLongPress?.();
|
75
|
+
};
|
76
|
+
|
77
|
+
// Normally, the parent would execute it's handler first, then forward the
|
78
|
+
// event to listeners. However, here our handler is virtually only forwarding
|
79
|
+
// events to listeners, so we reverse the order to keep the proper order of
|
80
|
+
// the callbacks (from "raw" ones to "processed").
|
81
|
+
onHandlerStateChange = e => {
|
82
|
+
this.props.onHandlerStateChange?.(e);
|
83
|
+
this.handleEvent(e);
|
84
|
+
};
|
85
|
+
onGestureEvent = e => {
|
86
|
+
this.props.onGestureEvent?.(e);
|
87
|
+
this.handleEvent(e); // TODO: maybe it is not correct
|
88
|
+
};
|
116
89
|
render() {
|
117
90
|
const {
|
118
91
|
rippleColor: unprocessedRippleColor,
|
119
92
|
style,
|
120
93
|
...rest
|
121
94
|
} = this.props;
|
122
|
-
|
123
95
|
if (IS_FABRIC === null) {
|
124
96
|
IS_FABRIC = (0, _utils.isFabric)();
|
125
97
|
}
|
126
|
-
|
127
|
-
|
128
|
-
return /*#__PURE__*/React.createElement(RawButton, _extends({
|
98
|
+
const rippleColor = IS_FABRIC ? unprocessedRippleColor : (0, _reactNative.processColor)(unprocessedRippleColor ?? undefined);
|
99
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(RawButton, {
|
129
100
|
ref: this.props.innerRef,
|
130
101
|
rippleColor: rippleColor,
|
131
102
|
style: [style, _reactNative.Platform.OS === 'ios' && {
|
132
103
|
cursor: undefined
|
133
|
-
}]
|
134
|
-
|
104
|
+
}],
|
105
|
+
...rest,
|
135
106
|
onGestureEvent: this.onGestureEvent,
|
136
107
|
onHandlerStateChange: this.onHandlerStateChange
|
137
|
-
})
|
108
|
+
});
|
138
109
|
}
|
139
|
-
|
140
110
|
}
|
141
|
-
|
142
|
-
_defineProperty(InnerBaseButton, "defaultProps", {
|
143
|
-
delayLongPress: 600
|
144
|
-
});
|
145
|
-
|
146
111
|
const AnimatedInnerBaseButton = _reactNative.Animated.createAnimatedComponent(InnerBaseButton);
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
}
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
}
|
155
|
-
|
112
|
+
const BaseButton = exports.BaseButton = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/(0, _jsxRuntime.jsx)(InnerBaseButton, {
|
113
|
+
innerRef: ref,
|
114
|
+
...props
|
115
|
+
}));
|
116
|
+
const AnimatedBaseButton = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedInnerBaseButton, {
|
117
|
+
innerRef: ref,
|
118
|
+
...props
|
119
|
+
}));
|
156
120
|
const btnStyles = _reactNative.StyleSheet.create({
|
157
121
|
underlay: {
|
158
122
|
position: 'absolute',
|
@@ -162,83 +126,66 @@ const btnStyles = _reactNative.StyleSheet.create({
|
|
162
126
|
top: 0
|
163
127
|
}
|
164
128
|
});
|
165
|
-
|
166
129
|
class InnerRectButton extends React.Component {
|
130
|
+
static defaultProps = {
|
131
|
+
activeOpacity: 0.105,
|
132
|
+
underlayColor: 'black'
|
133
|
+
};
|
167
134
|
constructor(props) {
|
168
135
|
super(props);
|
169
|
-
|
170
|
-
_defineProperty(this, "opacity", void 0);
|
171
|
-
|
172
|
-
_defineProperty(this, "onActiveStateChange", active => {
|
173
|
-
var _this$props$onActiveS, _this$props4;
|
174
|
-
|
175
|
-
if (_reactNative.Platform.OS !== 'android') {
|
176
|
-
this.opacity.setValue(active ? this.props.activeOpacity : 0);
|
177
|
-
}
|
178
|
-
|
179
|
-
(_this$props$onActiveS = (_this$props4 = this.props).onActiveStateChange) === null || _this$props$onActiveS === void 0 ? void 0 : _this$props$onActiveS.call(_this$props4, active);
|
180
|
-
});
|
181
|
-
|
182
136
|
this.opacity = new _reactNative.Animated.Value(0);
|
183
137
|
}
|
184
|
-
|
138
|
+
onActiveStateChange = active => {
|
139
|
+
if (_reactNative.Platform.OS !== 'android') {
|
140
|
+
this.opacity.setValue(active ? this.props.activeOpacity : 0);
|
141
|
+
}
|
142
|
+
this.props.onActiveStateChange?.(active);
|
143
|
+
};
|
185
144
|
render() {
|
186
145
|
const {
|
187
146
|
children,
|
188
147
|
style,
|
189
148
|
...rest
|
190
149
|
} = this.props;
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
return /*#__PURE__*/React.createElement(BaseButton, _extends({}, rest, {
|
150
|
+
const resolvedStyle = _reactNative.StyleSheet.flatten(style) ?? {};
|
151
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(BaseButton, {
|
152
|
+
...rest,
|
195
153
|
ref: this.props.innerRef,
|
196
154
|
style: resolvedStyle,
|
197
|
-
onActiveStateChange: this.onActiveStateChange
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
155
|
+
onActiveStateChange: this.onActiveStateChange,
|
156
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
|
157
|
+
style: [btnStyles.underlay, {
|
158
|
+
opacity: this.opacity,
|
159
|
+
backgroundColor: this.props.underlayColor,
|
160
|
+
borderRadius: resolvedStyle.borderRadius,
|
161
|
+
borderTopLeftRadius: resolvedStyle.borderTopLeftRadius,
|
162
|
+
borderTopRightRadius: resolvedStyle.borderTopRightRadius,
|
163
|
+
borderBottomLeftRadius: resolvedStyle.borderBottomLeftRadius,
|
164
|
+
borderBottomRightRadius: resolvedStyle.borderBottomRightRadius
|
165
|
+
}]
|
166
|
+
}), children]
|
167
|
+
});
|
209
168
|
}
|
210
|
-
|
211
169
|
}
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
});
|
217
|
-
|
218
|
-
const RectButton = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement(InnerRectButton, _extends({
|
219
|
-
innerRef: ref
|
220
|
-
}, props)));
|
221
|
-
exports.RectButton = RectButton;
|
222
|
-
|
170
|
+
const RectButton = exports.RectButton = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/(0, _jsxRuntime.jsx)(InnerRectButton, {
|
171
|
+
innerRef: ref,
|
172
|
+
...props
|
173
|
+
}));
|
223
174
|
class InnerBorderlessButton extends React.Component {
|
175
|
+
static defaultProps = {
|
176
|
+
activeOpacity: 0.3,
|
177
|
+
borderless: true
|
178
|
+
};
|
224
179
|
constructor(props) {
|
225
180
|
super(props);
|
226
|
-
|
227
|
-
_defineProperty(this, "opacity", void 0);
|
228
|
-
|
229
|
-
_defineProperty(this, "onActiveStateChange", active => {
|
230
|
-
var _this$props$onActiveS2, _this$props5;
|
231
|
-
|
232
|
-
if (_reactNative.Platform.OS !== 'android') {
|
233
|
-
this.opacity.setValue(active ? this.props.activeOpacity : 1);
|
234
|
-
}
|
235
|
-
|
236
|
-
(_this$props$onActiveS2 = (_this$props5 = this.props).onActiveStateChange) === null || _this$props$onActiveS2 === void 0 ? void 0 : _this$props$onActiveS2.call(_this$props5, active);
|
237
|
-
});
|
238
|
-
|
239
181
|
this.opacity = new _reactNative.Animated.Value(1);
|
240
182
|
}
|
241
|
-
|
183
|
+
onActiveStateChange = active => {
|
184
|
+
if (_reactNative.Platform.OS !== 'android') {
|
185
|
+
this.opacity.setValue(active ? this.props.activeOpacity : 1);
|
186
|
+
}
|
187
|
+
this.props.onActiveStateChange?.(active);
|
188
|
+
};
|
242
189
|
render() {
|
243
190
|
const {
|
244
191
|
children,
|
@@ -246,24 +193,19 @@ class InnerBorderlessButton extends React.Component {
|
|
246
193
|
innerRef,
|
247
194
|
...rest
|
248
195
|
} = this.props;
|
249
|
-
return /*#__PURE__*/
|
196
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedBaseButton, {
|
197
|
+
...rest,
|
250
198
|
innerRef: innerRef,
|
251
199
|
onActiveStateChange: this.onActiveStateChange,
|
252
200
|
style: [style, _reactNative.Platform.OS === 'ios' && {
|
253
201
|
opacity: this.opacity
|
254
|
-
}]
|
255
|
-
|
202
|
+
}],
|
203
|
+
children: children
|
204
|
+
});
|
256
205
|
}
|
257
|
-
|
258
206
|
}
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
});
|
264
|
-
|
265
|
-
const BorderlessButton = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement(InnerBorderlessButton, _extends({
|
266
|
-
innerRef: ref
|
267
|
-
}, props)));
|
268
|
-
exports.BorderlessButton = BorderlessButton;
|
207
|
+
const BorderlessButton = exports.BorderlessButton = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/(0, _jsxRuntime.jsx)(InnerBorderlessButton, {
|
208
|
+
innerRef: ref,
|
209
|
+
...props
|
210
|
+
}));
|
269
211
|
//# sourceMappingURL=GestureButtons.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["GestureButtons.tsx"],"names":["RawButton","GestureHandlerButton","shouldCancelWhenOutside","shouldActivateOnStart","IS_FABRIC","InnerBaseButton","React","Component","constructor","props","nativeEvent","state","oldState","pointerInside","active","State","ACTIVE","lastActive","onActiveStateChange","longPressDetected","CANCELLED","onPress","Platform","OS","BEGAN","onLongPress","longPressTimeout","setTimeout","delayLongPress","undefined","clearTimeout","END","FAILED","e","onHandlerStateChange","handleEvent","onGestureEvent","render","rippleColor","unprocessedRippleColor","style","rest","innerRef","cursor","AnimatedInnerBaseButton","Animated","createAnimatedComponent","BaseButton","forwardRef","ref","AnimatedBaseButton","btnStyles","StyleSheet","create","underlay","position","left","right","bottom","top","InnerRectButton","opacity","setValue","activeOpacity","Value","children","resolvedStyle","flatten","backgroundColor","underlayColor","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","RectButton","InnerBorderlessButton","borderless","BorderlessButton"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AAeA;;;;;;;;;;;;AAEO,MAAMA,SAAS,GAAG,kCAAoBC,6BAApB,EAA0C;AACjEC,EAAAA,uBAAuB,EAAE,KADwC;AAEjEC,EAAAA,qBAAqB,EAAE;AAF0C,CAA1C,CAAlB;;AAKP,IAAIC,SAAyB,GAAG,IAAhC;;AAEA,MAAMC,eAAN,SAA8BC,KAAK,CAACC,SAApC,CAAsE;AASpEC,EAAAA,WAAW,CAACC,KAAD,EAAgC;AACzC,UAAMA,KAAN;;AADyC;;AAAA;;AAAA;;AAAA,yCAMrB,CAAC;AACrBC,MAAAA;AADqB,KAAD,KAE0C;AAC9D,YAAM;AAAEC,QAAAA,KAAF;AAASC,QAAAA,QAAT;AAAmBC,QAAAA;AAAnB,UAAqCH,WAA3C;AACA,YAAMI,MAAM,GAAGD,aAAa,IAAIF,KAAK,KAAKI,aAAMC,MAAhD;;AAEA,UAAIF,MAAM,KAAK,KAAKG,UAAhB,IAA8B,KAAKR,KAAL,CAAWS,mBAA7C,EAAkE;AAChE,aAAKT,KAAL,CAAWS,mBAAX,CAA+BJ,MAA/B;AACD;;AAED,UACE,CAAC,KAAKK,iBAAN,IACAP,QAAQ,KAAKG,aAAMC,MADnB,IAEAL,KAAK,KAAKI,aAAMK,SAFhB,IAGA,KAAKH,UAHL,IAIA,KAAKR,KAAL,CAAWY,OALb,EAME;AACA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AAAA,QAAF;AAAYzB,MAAAA,KAAZ;AAAmBE,MAAAA,QAAnB;AAA6B,SAAGD;AAAhC,QAAyC,KAAKhC,KAApD;AAEA,wBACE,oBAAC,kBAAD,eACMgC,IADN;AAEE,MAAA,QAAQ,EAAEC,QAFZ;AAGE,MAAA,mBAAmB,EAAE,KAAKxB,mBAH5B;AAIE,MAAA,KAAK,EAAE,CAACsB,KAAD,EAAQlB,sBAASC,EAAT,KAAgB,KAAhB,IAAyB;AAAEsC,QAAAA,OAAO,EAAE,KAAKA;AAAhB,OAAjC;AAJT,QAKGI,QALH,CADF;AASD;;AAjC+E;;gBAA5EW,qB,kBACkB;AACpBb,EAAAA,aAAa,EAAE,GADK;AAEpBc,EAAAA,UAAU,EAAE;AAFQ,C;;AAmCjB,MAAMC,gBAAgB,gBAAGxE,KAAK,CAAC0C,UAAN,CAG9B,CAACvC,KAAD,EAAQwC,GAAR,kBAAgB,oBAAC,qBAAD;AAAuB,EAAA,QAAQ,EAAEA;AAAjC,GAA0CxC,KAA1C,EAHc,CAAzB","sourcesContent":["import * as React from 'react';\nimport { Animated, Platform, processColor, StyleSheet } from 'react-native';\n\nimport createNativeWrapper from '../handlers/createNativeWrapper';\nimport GestureHandlerButton from './GestureHandlerButton';\nimport { State } from '../State';\n\nimport {\n GestureEvent,\n HandlerStateChangeEvent,\n} from '../handlers/gestureHandlerCommon';\nimport type { NativeViewGestureHandlerPayload } from '../handlers/GestureHandlerEventPayload';\nimport type {\n BaseButtonWithRefProps,\n BaseButtonProps,\n RectButtonWithRefProps,\n RectButtonProps,\n BorderlessButtonWithRefProps,\n BorderlessButtonProps,\n} from './GestureButtonsProps';\nimport { isFabric } from '../utils';\n\nexport const RawButton = createNativeWrapper(GestureHandlerButton, {\n shouldCancelWhenOutside: false,\n shouldActivateOnStart: false,\n});\n\nlet IS_FABRIC: null | boolean = null;\n\nclass InnerBaseButton extends React.Component<BaseButtonWithRefProps> {\n static defaultProps = {\n delayLongPress: 600,\n };\n\n private lastActive: boolean;\n private longPressTimeout: ReturnType<typeof setTimeout> | undefined;\n private longPressDetected: boolean;\n\n constructor(props: BaseButtonWithRefProps) {\n super(props);\n this.lastActive = false;\n this.longPressDetected = false;\n }\n\n private handleEvent = ({\n nativeEvent,\n }: HandlerStateChangeEvent<NativeViewGestureHandlerPayload>) => {\n const { state, oldState, pointerInside } = nativeEvent;\n const active = pointerInside && state === State.ACTIVE;\n\n if (active !== this.lastActive && this.props.onActiveStateChange) {\n this.props.onActiveStateChange(active);\n }\n\n if (\n !this.longPressDetected &&\n oldState === State.ACTIVE &&\n state !== State.CANCELLED &&\n this.lastActive &&\n this.props.onPress\n ) {\n this.props.onPress(pointerInside);\n }\n\n if (\n !this.lastActive &&\n // NativeViewGestureHandler sends different events based on platform\n state === (Platform.OS !== 'android' ? State.ACTIVE : State.BEGAN) &&\n pointerInside\n ) {\n this.longPressDetected = false;\n if (this.props.onLongPress) {\n this.longPressTimeout = setTimeout(\n this.onLongPress,\n this.props.delayLongPress\n );\n }\n } else if (\n // Cancel longpress timeout if it's set and the finger moved out of the view\n state === State.ACTIVE &&\n !pointerInside &&\n this.longPressTimeout !== undefined\n ) {\n clearTimeout(this.longPressTimeout);\n this.longPressTimeout = undefined;\n } else if (\n // Cancel longpress timeout if it's set and the gesture has finished\n this.longPressTimeout !== undefined &&\n (state === State.END ||\n state === State.CANCELLED ||\n state === State.FAILED)\n ) {\n clearTimeout(this.longPressTimeout);\n this.longPressTimeout = undefined;\n }\n\n this.lastActive = active;\n };\n\n private onLongPress = () => {\n this.longPressDetected = true;\n this.props.onLongPress?.();\n };\n\n // Normally, the parent would execute it's handler first, then forward the\n // event to listeners. However, here our handler is virtually only forwarding\n // events to listeners, so we reverse the order to keep the proper order of\n // the callbacks (from \"raw\" ones to \"processed\").\n private onHandlerStateChange = (\n e: HandlerStateChangeEvent<NativeViewGestureHandlerPayload>\n ) => {\n this.props.onHandlerStateChange?.(e);\n this.handleEvent(e);\n };\n\n private onGestureEvent = (\n e: GestureEvent<NativeViewGestureHandlerPayload>\n ) => {\n this.props.onGestureEvent?.(e);\n this.handleEvent(\n e as HandlerStateChangeEvent<NativeViewGestureHandlerPayload>\n ); // TODO: maybe it is not correct\n };\n\n render() {\n const { rippleColor: unprocessedRippleColor, style, ...rest } = this.props;\n\n if (IS_FABRIC === null) {\n IS_FABRIC = isFabric();\n }\n\n const rippleColor = IS_FABRIC\n ? unprocessedRippleColor\n : processColor(unprocessedRippleColor ?? undefined);\n\n return (\n <RawButton\n ref={this.props.innerRef}\n rippleColor={rippleColor}\n style={[style, Platform.OS === 'ios' && { cursor: undefined }]}\n {...rest}\n onGestureEvent={this.onGestureEvent}\n onHandlerStateChange={this.onHandlerStateChange}\n />\n );\n }\n}\n\nconst AnimatedInnerBaseButton =\n Animated.createAnimatedComponent<typeof InnerBaseButton>(InnerBaseButton);\n\nexport const BaseButton = React.forwardRef<\n React.ComponentType,\n Omit<BaseButtonProps, 'innerRef'>\n>((props, ref) => <InnerBaseButton innerRef={ref} {...props} />);\n\nconst AnimatedBaseButton = React.forwardRef<\n React.ComponentType,\n BaseButtonWithRefProps\n>((props, ref) => <AnimatedInnerBaseButton innerRef={ref} {...props} />);\n\nconst btnStyles = StyleSheet.create({\n underlay: {\n position: 'absolute',\n left: 0,\n right: 0,\n bottom: 0,\n top: 0,\n },\n});\n\nclass InnerRectButton extends React.Component<RectButtonWithRefProps> {\n static defaultProps = {\n activeOpacity: 0.105,\n underlayColor: 'black',\n };\n\n private opacity: Animated.Value;\n\n constructor(props: RectButtonWithRefProps) {\n super(props);\n this.opacity = new Animated.Value(0);\n }\n\n private onActiveStateChange = (active: boolean) => {\n if (Platform.OS !== 'android') {\n this.opacity.setValue(active ? this.props.activeOpacity! : 0);\n }\n\n this.props.onActiveStateChange?.(active);\n };\n\n render() {\n const { children, style, ...rest } = this.props;\n\n const resolvedStyle = StyleSheet.flatten(style ?? {});\n\n return (\n <BaseButton\n {...rest}\n ref={this.props.innerRef}\n style={resolvedStyle}\n onActiveStateChange={this.onActiveStateChange}>\n <Animated.View\n style={[\n btnStyles.underlay,\n {\n opacity: this.opacity,\n backgroundColor: this.props.underlayColor,\n borderRadius: resolvedStyle.borderRadius,\n borderTopLeftRadius: resolvedStyle.borderTopLeftRadius,\n borderTopRightRadius: resolvedStyle.borderTopRightRadius,\n borderBottomLeftRadius: resolvedStyle.borderBottomLeftRadius,\n borderBottomRightRadius: resolvedStyle.borderBottomRightRadius,\n },\n ]}\n />\n {children}\n </BaseButton>\n );\n }\n}\n\nexport const RectButton = React.forwardRef<\n React.ComponentType,\n Omit<RectButtonProps, 'innerRef'>\n>((props, ref) => <InnerRectButton innerRef={ref} {...props} />);\n\nclass InnerBorderlessButton extends React.Component<BorderlessButtonWithRefProps> {\n static defaultProps = {\n activeOpacity: 0.3,\n borderless: true,\n };\n\n private opacity: Animated.Value;\n\n constructor(props: BorderlessButtonWithRefProps) {\n super(props);\n this.opacity = new Animated.Value(1);\n }\n\n private onActiveStateChange = (active: boolean) => {\n if (Platform.OS !== 'android') {\n this.opacity.setValue(active ? this.props.activeOpacity! : 1);\n }\n\n this.props.onActiveStateChange?.(active);\n };\n\n render() {\n const { children, style, innerRef, ...rest } = this.props;\n\n return (\n <AnimatedBaseButton\n {...rest}\n innerRef={innerRef}\n onActiveStateChange={this.onActiveStateChange}\n style={[style, Platform.OS === 'ios' && { opacity: this.opacity }]}>\n {children}\n </AnimatedBaseButton>\n );\n }\n}\n\nexport const BorderlessButton = React.forwardRef<\n React.ComponentType,\n Omit<BorderlessButtonProps, 'innerRef'>\n>((props, ref) => <InnerBorderlessButton innerRef={ref} {...props} />);\n\nexport { default as PureNativeButton } from './GestureHandlerButton';\n"]}
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_createNativeWrapper","_interopRequireDefault","_GestureHandlerButton","_State","_utils","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","RawButton","exports","createNativeWrapper","GestureHandlerButton","shouldCancelWhenOutside","shouldActivateOnStart","IS_FABRIC","InnerBaseButton","Component","defaultProps","delayLongPress","constructor","props","lastActive","longPressDetected","handleEvent","nativeEvent","state","oldState","pointerInside","active","State","ACTIVE","onActiveStateChange","CANCELLED","onPress","Platform","OS","BEGAN","onLongPress","longPressTimeout","setTimeout","undefined","clearTimeout","END","FAILED","onHandlerStateChange","onGestureEvent","render","rippleColor","unprocessedRippleColor","style","rest","isFabric","processColor","jsx","ref","innerRef","cursor","AnimatedInnerBaseButton","Animated","createAnimatedComponent","BaseButton","forwardRef","AnimatedBaseButton","btnStyles","StyleSheet","create","underlay","position","left","right","bottom","top","InnerRectButton","activeOpacity","underlayColor","opacity","Value","setValue","children","resolvedStyle","flatten","jsxs","View","backgroundColor","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","RectButton","InnerBorderlessButton","borderless","BorderlessButton"],"sourceRoot":"../../../src","sources":["components/GestureButtons.tsx"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,oBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,qBAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAeA,IAAAM,MAAA,GAAAN,OAAA;AAAoC,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAG,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAT,wBAAAS,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAb,uBAAA,YAAAA,CAAAS,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CA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,UAAU,CAG9C,CAACzC,KAAK,EAAEkC,GAAG,kBAAK,IAAAlE,WAAA,CAAAiE,GAAA,EAACqC,qBAAqB;EAACnC,QAAQ,EAAED,GAAI;EAAA,GAAKlC;AAAK,CAAG,CAAC,CAAC","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["components/GestureButtonsProps.ts"],"mappings":"","ignoreList":[]}
|