@amazon-devices/react-native-gesture-handler 2.0.9000000000 → 4.0.0-rn-83
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/README.md +70 -0
- package/RNGestureHandler.podspec +22 -21
- package/ReanimatedDrawerLayout/package.json +6 -0
- package/ReanimatedSwipeable/package.json +6 -0
- package/SystemBundles/e82012a422f9e1059c6cee278b1f8d0bcc98609171576a84702a68ac119f1947.bundle +14670 -0
- package/SystemBundles/e82012a422f9e1059c6cee278b1f8d0bcc98609171576a84702a68ac119f1947.map +5041 -0
- package/SystemModules/amzn__react-native-gesture-handler-4.modules.txt +79 -0
- package/SystemModules/amzn__react-native-gesture-handler-4.private.modules.txt +67 -0
- package/SystemModules/keplerscript-system-bundle-config.json +3 -3
- package/android/build.gradle +104 -57
- package/android/{src/fabric → fabric/src/main}/java/com/swmansion/gesturehandler/ReactContextExtensions.kt +2 -0
- package/android/gradle.properties +3 -3
- package/android/noreanimated/src/main/java/com/swmansion/gesturehandler/ReanimatedEventDispatcher.kt +3 -1
- package/android/nosvg/src/main/java/com/swmansion/gesturehandler/RNSVGHitTester.kt +13 -0
- package/android/{src/paper → paper/src/main}/java/com/facebook/react/viewmanagers/RNGestureHandlerButtonManagerDelegate.java +19 -9
- package/android/{src/paper → paper/src/main}/java/com/facebook/react/viewmanagers/RNGestureHandlerButtonManagerInterface.java +5 -1
- package/android/{src/paper → paper/src/main}/java/com/facebook/react/viewmanagers/RNGestureHandlerRootViewManagerDelegate.java +3 -2
- package/android/{src/paper → paper/src/main}/java/com/facebook/react/viewmanagers/RNGestureHandlerRootViewManagerInterface.java +2 -1
- package/android/paper/src/main/java/com/swmansion/gesturehandler/NativeRNGestureHandlerModuleSpec.java +67 -0
- package/android/{src/paper → 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/src/main/AndroidManifest.xml +1 -3
- package/android/src/main/java/com/swmansion/gesturehandler/RNGestureHandlerPackage.kt +67 -8
- package/android/src/main/java/com/swmansion/gesturehandler/core/DiagonalDirections.kt +8 -0
- package/android/src/main/java/com/swmansion/gesturehandler/core/FlingGestureHandler.kt +90 -25
- package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandler.kt +347 -141
- package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerInteractionController.kt +4 -4
- package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerOrchestrator.kt +197 -137
- package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerRegistry.kt +1 -1
- package/android/src/main/java/com/swmansion/gesturehandler/core/GestureUtils.kt +15 -2
- package/android/src/main/java/com/swmansion/gesturehandler/core/HoverGestureHandler.kt +36 -6
- package/android/src/main/java/com/swmansion/gesturehandler/core/LongPressGestureHandler.kt +127 -17
- package/android/src/main/java/com/swmansion/gesturehandler/core/ManualGestureHandler.kt +12 -1
- package/android/src/main/java/com/swmansion/gesturehandler/core/NativeViewGestureHandler.kt +137 -46
- package/android/src/main/java/com/swmansion/gesturehandler/core/OnTouchEventListener.kt +3 -3
- package/android/src/main/java/com/swmansion/gesturehandler/core/PanGestureHandler.kt +200 -93
- package/android/src/main/java/com/swmansion/gesturehandler/core/PinchGestureHandler.kt +21 -14
- package/android/src/main/java/com/swmansion/gesturehandler/core/PointerEventsConfig.kt +1 -1
- package/android/src/main/java/com/swmansion/gesturehandler/core/RotationGestureDetector.kt +56 -12
- package/android/src/main/java/com/swmansion/gesturehandler/core/RotationGestureHandler.kt +12 -5
- package/android/src/main/java/com/swmansion/gesturehandler/core/ScaleGestureDetector.java +10 -0
- package/android/src/main/java/com/swmansion/gesturehandler/core/StylusData.kt +103 -0
- package/android/src/main/java/com/swmansion/gesturehandler/core/TapGestureHandler.kt +62 -36
- package/android/src/main/java/com/swmansion/gesturehandler/core/Vector.kt +61 -0
- package/android/src/main/java/com/swmansion/gesturehandler/react/Extensions.kt +1 -1
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.kt +200 -50
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEnabledRootView.kt +9 -4
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEvent.kt +25 -27
- 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 +18 -11
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.kt +70 -645
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRegistry.kt +8 -14
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootHelper.kt +38 -19
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootView.kt +16 -13
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootViewManager.kt +2 -4
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerStateChangeEvent.kt +34 -28
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerTouchEvent.kt +11 -10
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNViewConfigurationHelper.kt +15 -12
- package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/FlingGestureHandlerEventDataBuilder.kt +31 -0
- package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/GestureHandlerEventDataBuilder.kt +25 -0
- package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/HoverGestureHandlerEventDataBuilder.kt +38 -0
- package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/LongPressGestureHandlerEventDataBuilder.kt +34 -0
- package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/ManualGestureHandlerEventDataBuilder.kt +6 -0
- package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/NativeGestureHandlerEventDataBuilder.kt +19 -0
- package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/PanGestureHandlerEventDataBuilder.kt +50 -0
- package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/PinchGestureHandlerEventDataBuilder.kt +31 -0
- package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/RotationGestureHandlerEventDataBuilder.kt +31 -0
- package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/TapGestureHandlerEventDataBuilder.kt +31 -0
- package/android/src/main/jni/CMakeLists.txt +22 -6
- package/android/src/main/jni/cpp-adapter.cpp +39 -30
- package/android/svg/src/main/java/com/swmansion/gesturehandler/RNSVGHitTester.kt +65 -0
- package/{ios → apple}/Handlers/RNFlingHandler.h +1 -0
- package/apple/Handlers/RNFlingHandler.m +313 -0
- package/{ios → apple}/Handlers/RNForceTouchHandler.m +29 -8
- package/{ios → apple}/Handlers/RNHoverHandler.m +84 -15
- package/apple/Handlers/RNLongPressHandler.m +290 -0
- package/{ios → apple}/Handlers/RNManualHandler.m +58 -13
- package/{ios → apple}/Handlers/RNNativeViewHandler.mm +77 -28
- package/{ios → apple}/Handlers/RNPanHandler.m +166 -21
- package/apple/Handlers/RNPinchHandler.m +186 -0
- package/apple/Handlers/RNRotationHandler.m +169 -0
- package/{ios → apple}/Handlers/RNTapHandler.m +100 -27
- package/apple/RNGHStylusData.h +77 -0
- package/apple/RNGHStylusData.m +37 -0
- package/apple/RNGHUIKit.h +29 -0
- package/apple/RNGHVector.h +31 -0
- package/apple/RNGHVector.m +67 -0
- package/{ios → apple}/RNGestureHandler.h +23 -3
- package/{ios/RNGestureHandler.m → apple/RNGestureHandler.mm} +199 -21
- package/apple/RNGestureHandlerButton.h +39 -0
- package/apple/RNGestureHandlerButton.mm +214 -0
- package/{ios → apple}/RNGestureHandlerButtonComponentView.h +6 -1
- package/apple/RNGestureHandlerButtonComponentView.mm +219 -0
- package/{ios/RNGestureHandlerButtonManager.m → apple/RNGestureHandlerButtonManager.mm} +5 -3
- package/apple/RNGestureHandlerDirection.h +33 -0
- package/{ios → apple}/RNGestureHandlerEvents.h +21 -10
- package/{ios → apple}/RNGestureHandlerEvents.m +39 -13
- package/{ios → apple}/RNGestureHandlerManager.h +7 -2
- package/{ios → apple}/RNGestureHandlerManager.mm +84 -18
- package/apple/RNGestureHandlerModule.h +19 -0
- package/{ios → apple}/RNGestureHandlerModule.mm +88 -73
- package/{ios → apple}/RNGestureHandlerPointerTracker.h +5 -5
- package/{ios → apple}/RNGestureHandlerPointerTracker.m +21 -14
- package/apple/RNGestureHandlerPointerType.h +8 -0
- package/{ios → apple}/RNGestureHandlerRegistry.h +1 -1
- package/{ios → apple}/RNGestureHandlerRegistry.m +1 -1
- package/{ios → apple}/RNManualActivationRecognizer.h +8 -0
- package/{ios → apple}/RNManualActivationRecognizer.m +28 -7
- package/{ios → apple}/RNRootViewGestureRecognizer.m +77 -4
- package/jestSetup.js +22 -3
- package/kepler-compatibility.json +2 -3
- package/lib/commonjs/ActionType.js.map +1 -1
- package/lib/commonjs/Directions.js +21 -5
- package/lib/commonjs/Directions.js.map +1 -1
- package/lib/commonjs/EnableNewWebImplementation.js +11 -0
- package/lib/commonjs/EnableNewWebImplementation.js.map +1 -1
- package/lib/commonjs/GestureHandlerRootViewContext.js.map +1 -1
- package/lib/commonjs/PlatformConstants.js +1 -2
- package/lib/commonjs/PlatformConstants.js.map +1 -1
- package/lib/commonjs/PlatformConstants.kepler.js +12 -0
- package/lib/commonjs/PlatformConstants.kepler.js.map +1 -0
- package/lib/commonjs/PlatformConstants.web.js.map +1 -1
- package/lib/commonjs/PointerType.js +15 -0
- package/lib/commonjs/PointerType.js.map +1 -0
- package/lib/commonjs/RNGestureHandlerModule.js +5 -16
- package/lib/commonjs/RNGestureHandlerModule.js.map +1 -1
- package/lib/commonjs/RNGestureHandlerModule.kepler.js +4 -5
- package/lib/commonjs/RNGestureHandlerModule.kepler.js.map +1 -1
- package/lib/commonjs/RNGestureHandlerModule.web.js +25 -53
- package/lib/commonjs/RNGestureHandlerModule.web.js.map +1 -1
- package/lib/commonjs/RNGestureHandlerModule.windows.js +16 -81
- package/lib/commonjs/RNGestureHandlerModule.windows.js.map +1 -1
- package/lib/commonjs/RNRenderer.js.map +1 -1
- package/lib/commonjs/RNRenderer.web.js.map +1 -1
- package/lib/commonjs/State.js.map +1 -1
- package/lib/commonjs/TouchEventType.js.map +1 -1
- package/lib/commonjs/components/DrawerLayout.js +421 -385
- package/lib/commonjs/components/DrawerLayout.js.map +1 -1
- package/lib/commonjs/components/GestureButtons.js +138 -120
- package/lib/commonjs/components/GestureButtons.js.map +1 -1
- package/lib/commonjs/components/GestureButtonsProps.js +6 -0
- package/lib/commonjs/components/GestureButtonsProps.js.map +1 -0
- package/lib/commonjs/components/GestureComponents.js +16 -14
- package/lib/commonjs/components/GestureComponents.js.map +1 -1
- package/lib/commonjs/components/GestureComponents.web.js +10 -9
- package/lib/commonjs/components/GestureComponents.web.js.map +1 -1
- package/lib/commonjs/components/GestureHandlerButton.js.map +1 -1
- package/lib/commonjs/components/GestureHandlerButton.web.js +6 -6
- package/lib/commonjs/components/GestureHandlerButton.web.js.map +1 -1
- package/lib/commonjs/components/GestureHandlerRootView.android.js +20 -7
- package/lib/commonjs/components/GestureHandlerRootView.android.js.map +1 -1
- package/lib/commonjs/components/GestureHandlerRootView.js +19 -7
- package/lib/commonjs/components/GestureHandlerRootView.js.map +1 -1
- package/lib/commonjs/components/GestureHandlerRootView.kepler.js +9 -6
- package/lib/commonjs/components/GestureHandlerRootView.kepler.js.map +1 -1
- package/lib/commonjs/components/GestureHandlerRootView.web.js +18 -6
- package/lib/commonjs/components/GestureHandlerRootView.web.js.map +1 -1
- package/lib/commonjs/components/Pressable/Pressable.js +274 -0
- package/lib/commonjs/components/Pressable/Pressable.js.map +1 -0
- package/lib/commonjs/components/Pressable/PressableProps.js +6 -0
- package/lib/commonjs/components/Pressable/PressableProps.js.map +1 -0
- package/lib/commonjs/components/Pressable/StateMachine.js +44 -0
- package/lib/commonjs/components/Pressable/StateMachine.js.map +1 -0
- package/lib/commonjs/components/Pressable/index.js +14 -0
- package/lib/commonjs/components/Pressable/index.js.map +1 -0
- package/lib/commonjs/components/Pressable/stateDefinitions.js +88 -0
- package/lib/commonjs/components/Pressable/stateDefinitions.js.map +1 -0
- package/lib/commonjs/components/Pressable/utils.js +92 -0
- package/lib/commonjs/components/Pressable/utils.js.map +1 -0
- package/lib/commonjs/components/ReanimatedDrawerLayout.js +357 -0
- package/lib/commonjs/components/ReanimatedDrawerLayout.js.map +1 -0
- package/lib/commonjs/components/ReanimatedSwipeable/ReanimatedSwipeable.js +337 -0
- package/lib/commonjs/components/ReanimatedSwipeable/ReanimatedSwipeable.js.map +1 -0
- package/lib/commonjs/components/ReanimatedSwipeable/ReanimatedSwipeableProps.js +12 -0
- package/lib/commonjs/components/ReanimatedSwipeable/ReanimatedSwipeableProps.js.map +1 -0
- package/lib/commonjs/components/ReanimatedSwipeable/index.js +21 -0
- package/lib/commonjs/components/ReanimatedSwipeable/index.js.map +1 -0
- package/lib/commonjs/components/Swipeable.js +286 -261
- package/lib/commonjs/components/Swipeable.js.map +1 -1
- package/lib/commonjs/components/Text.js +60 -0
- package/lib/commonjs/components/Text.js.map +1 -0
- package/lib/commonjs/components/gestureHandlerRootHOC.js +12 -6
- package/lib/commonjs/components/gestureHandlerRootHOC.js.map +1 -1
- package/lib/commonjs/components/touchables/ExtraButtonProps.js +2 -0
- package/lib/commonjs/components/touchables/ExtraButtonProps.js.map +1 -0
- package/lib/commonjs/components/touchables/GenericTouchable.js +83 -91
- package/lib/commonjs/components/touchables/GenericTouchable.js.map +1 -1
- package/lib/commonjs/components/touchables/GenericTouchableProps.js +6 -0
- package/lib/commonjs/components/touchables/GenericTouchableProps.js.map +1 -0
- package/lib/commonjs/components/touchables/TouchableHighlight.js +51 -48
- package/lib/commonjs/components/touchables/TouchableHighlight.js.map +1 -1
- package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js +35 -35
- package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js.map +1 -1
- package/lib/commonjs/components/touchables/TouchableNativeFeedback.js +5 -1
- package/lib/commonjs/components/touchables/TouchableNativeFeedback.js.map +1 -1
- package/lib/commonjs/components/touchables/TouchableNativeFeedbackProps.js +6 -0
- package/lib/commonjs/components/touchables/TouchableNativeFeedbackProps.js.map +1 -0
- package/lib/commonjs/components/touchables/TouchableOpacity.js +39 -38
- package/lib/commonjs/components/touchables/TouchableOpacity.js.map +1 -1
- package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js +22 -7
- package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js.map +1 -1
- 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 +9 -0
- package/lib/commonjs/findNodeHandle.js.map +1 -0
- package/lib/commonjs/findNodeHandle.web.js +39 -0
- package/lib/commonjs/findNodeHandle.web.js.map +1 -0
- package/lib/commonjs/getShadowNodeFromRef.js +28 -4
- package/lib/commonjs/getShadowNodeFromRef.js.map +1 -1
- package/lib/commonjs/getShadowNodeFromRef.web.js.map +1 -1
- package/lib/commonjs/ghQueueMicrotask.js +10 -0
- package/lib/commonjs/ghQueueMicrotask.js.map +1 -0
- package/lib/commonjs/handlers/FlingGestureHandler.js +13 -0
- package/lib/commonjs/handlers/FlingGestureHandler.js.map +1 -1
- package/lib/commonjs/handlers/ForceTouchGestureHandler.js +15 -6
- package/lib/commonjs/handlers/ForceTouchGestureHandler.js.map +1 -1
- package/lib/commonjs/handlers/GestureHandlerEventPayload.js +6 -0
- package/lib/commonjs/handlers/GestureHandlerEventPayload.js.map +1 -0
- package/lib/commonjs/handlers/LongPressGestureHandler.js +14 -1
- package/lib/commonjs/handlers/LongPressGestureHandler.js.map +1 -1
- package/lib/commonjs/handlers/NativeViewGestureHandler.js +13 -0
- package/lib/commonjs/handlers/NativeViewGestureHandler.js.map +1 -1
- package/lib/commonjs/handlers/PanGestureHandler.js +13 -0
- package/lib/commonjs/handlers/PanGestureHandler.js.map +1 -1
- package/lib/commonjs/handlers/PinchGestureHandler.js +12 -0
- package/lib/commonjs/handlers/PinchGestureHandler.js.map +1 -1
- package/lib/commonjs/handlers/PressabilityDebugView.js.map +1 -1
- package/lib/commonjs/handlers/PressabilityDebugView.web.js.map +1 -1
- package/lib/commonjs/handlers/RotationGestureHandler.js +12 -0
- package/lib/commonjs/handlers/RotationGestureHandler.js.map +1 -1
- package/lib/commonjs/handlers/TapGestureHandler.js +13 -0
- package/lib/commonjs/handlers/TapGestureHandler.js.map +1 -1
- package/lib/commonjs/handlers/createHandler.js +144 -144
- package/lib/commonjs/handlers/createHandler.js.map +1 -1
- package/lib/commonjs/handlers/createNativeWrapper.js +19 -16
- package/lib/commonjs/handlers/createNativeWrapper.js.map +1 -1
- package/lib/commonjs/handlers/customDirectEventTypes.js +13 -0
- package/lib/commonjs/handlers/customDirectEventTypes.js.map +1 -0
- package/lib/commonjs/handlers/customDirectEventTypes.web.js +10 -0
- package/lib/commonjs/handlers/customDirectEventTypes.web.js.map +1 -0
- package/lib/commonjs/handlers/gestureHandlerCommon.js +13 -72
- 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 +32 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.web.js +41 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.web.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/attachHandlers.js +67 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/attachHandlers.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/dropHandlers.js +20 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/dropHandlers.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/index.js +125 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/index.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/needsToReattach.js +22 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/needsToReattach.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/types.js +6 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/types.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js +66 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js +143 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/useDetectorUpdater.js +47 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/useMountReactions.js +41 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/useMountReactions.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js +45 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/utils.js +143 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/utils.js.map +1 -0
- package/lib/commonjs/handlers/gestures/eventReceiver.js +15 -23
- package/lib/commonjs/handlers/gestures/eventReceiver.js.map +1 -1
- package/lib/commonjs/handlers/gestures/flingGesture.js +14 -4
- package/lib/commonjs/handlers/gestures/flingGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/forceTouchGesture.js +30 -4
- package/lib/commonjs/handlers/gestures/forceTouchGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/gesture.js +162 -20
- package/lib/commonjs/handlers/gestures/gesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/gestureComposition.js +9 -9
- package/lib/commonjs/handlers/gestures/gestureComposition.js.map +1 -1
- package/lib/commonjs/handlers/gestures/gestureObjects.js +59 -0
- package/lib/commonjs/handlers/gestures/gestureObjects.js.map +1 -1
- package/lib/commonjs/handlers/gestures/gestureStateManager.js +50 -40
- package/lib/commonjs/handlers/gestures/gestureStateManager.js.map +1 -1
- package/lib/commonjs/handlers/gestures/gestureStateManager.web.js +2 -1
- package/lib/commonjs/handlers/gestures/gestureStateManager.web.js.map +1 -1
- package/lib/commonjs/handlers/gestures/hoverGesture.js +2 -5
- package/lib/commonjs/handlers/gestures/hoverGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/longPressGesture.js +22 -4
- package/lib/commonjs/handlers/gestures/longPressGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/manualGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/nativeGesture.js +11 -4
- package/lib/commonjs/handlers/gestures/nativeGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/panGesture.js +77 -4
- package/lib/commonjs/handlers/gestures/panGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/pinchGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/reanimatedWrapper.js +1 -2
- package/lib/commonjs/handlers/gestures/reanimatedWrapper.js.map +1 -1
- package/lib/commonjs/handlers/gestures/rotationGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/tapGesture.js +43 -4
- package/lib/commonjs/handlers/gestures/tapGesture.js.map +1 -1
- package/lib/commonjs/handlers/getNextHandlerTag.js +11 -0
- package/lib/commonjs/handlers/getNextHandlerTag.js.map +1 -0
- package/lib/commonjs/handlers/handlersRegistry.js +7 -9
- package/lib/commonjs/handlers/handlersRegistry.js.map +1 -1
- package/lib/commonjs/handlers/utils.js +69 -0
- package/lib/commonjs/handlers/utils.js.map +1 -0
- package/lib/commonjs/index.js +28 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/init.js +1 -1
- package/lib/commonjs/init.js.map +1 -1
- package/lib/commonjs/jestUtils/index.js.map +1 -1
- package/lib/commonjs/jestUtils/jestUtils.js +18 -14
- package/lib/commonjs/jestUtils/jestUtils.js.map +1 -1
- package/lib/commonjs/mocks/Pressable.js +13 -0
- package/lib/commonjs/mocks/Pressable.js.map +1 -0
- package/lib/commonjs/mocks/mocks.js +70 -0
- package/lib/commonjs/mocks/mocks.js.map +1 -0
- package/lib/commonjs/mocks.js.map +1 -1
- package/lib/commonjs/mountRegistry.js +37 -0
- package/lib/commonjs/mountRegistry.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/specs/NativeRNGestureHandlerModule.js +9 -0
- package/lib/commonjs/specs/NativeRNGestureHandlerModule.js.map +1 -0
- package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.kepler.js.map +1 -1
- package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.ts +24 -0
- package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.kepler.js +17 -0
- package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.kepler.js.map +1 -0
- package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.ts +7 -0
- package/lib/commonjs/typeUtils.js.map +1 -1
- package/lib/commonjs/utils.js +47 -16
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/commonjs/web/Gestures.js +48 -0
- package/lib/commonjs/web/Gestures.js.map +1 -0
- package/lib/commonjs/web/constants.js +2 -7
- package/lib/commonjs/web/constants.js.map +1 -1
- package/lib/commonjs/web/detectors/RotationGestureDetector.js +35 -40
- package/lib/commonjs/web/detectors/RotationGestureDetector.js.map +1 -1
- package/lib/commonjs/web/detectors/ScaleGestureDetector.js +30 -46
- package/lib/commonjs/web/detectors/ScaleGestureDetector.js.map +1 -1
- package/lib/commonjs/web/handlers/FlingGestureHandler.js +50 -34
- package/lib/commonjs/web/handlers/FlingGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/GestureHandler.js +218 -197
- package/lib/commonjs/web/handlers/GestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/HoverGestureHandler.js +12 -15
- package/lib/commonjs/web/handlers/HoverGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/IGestureHandler.js +2 -0
- package/lib/commonjs/web/handlers/IGestureHandler.js.map +1 -0
- package/lib/commonjs/web/handlers/LongPressGestureHandler.js +57 -30
- package/lib/commonjs/web/handlers/LongPressGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/ManualGestureHandler.js +1 -12
- package/lib/commonjs/web/handlers/ManualGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/NativeViewGestureHandler.js +42 -41
- package/lib/commonjs/web/handlers/NativeViewGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/PanGestureHandler.js +117 -65
- package/lib/commonjs/web/handlers/PanGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/PinchGestureHandler.js +36 -50
- package/lib/commonjs/web/handlers/PinchGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/RotationGestureHandler.js +32 -49
- package/lib/commonjs/web/handlers/RotationGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/TapGestureHandler.js +39 -43
- package/lib/commonjs/web/handlers/TapGestureHandler.js.map +1 -1
- package/lib/commonjs/web/interfaces.js +6 -18
- package/lib/commonjs/web/interfaces.js.map +1 -1
- package/lib/commonjs/web/tools/CircularBuffer.js +12 -19
- package/lib/commonjs/web/tools/CircularBuffer.js.map +1 -1
- package/lib/commonjs/web/tools/EventManager.js +7 -8
- 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 +121 -159
- package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js.map +1 -1
- package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js +102 -30
- package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js.map +1 -1
- package/lib/commonjs/web/tools/InteractionManager.js +44 -47
- package/lib/commonjs/web/tools/InteractionManager.js.map +1 -1
- package/lib/commonjs/web/tools/KeyboardEventManager.js +108 -0
- package/lib/commonjs/web/tools/KeyboardEventManager.js.map +1 -0
- package/lib/commonjs/web/tools/LeastSquareSolver.js +22 -30
- package/lib/commonjs/web/tools/LeastSquareSolver.js.map +1 -1
- package/lib/commonjs/web/tools/NodeManager.js +5 -7
- package/lib/commonjs/web/tools/NodeManager.js.map +1 -1
- package/lib/commonjs/web/tools/PointerEventManager.js +148 -130
- package/lib/commonjs/web/tools/PointerEventManager.js.map +1 -1
- package/lib/commonjs/web/tools/PointerTracker.js +97 -107
- package/lib/commonjs/web/tools/PointerTracker.js.map +1 -1
- package/lib/commonjs/web/tools/Vector.js +37 -0
- package/lib/commonjs/web/tools/Vector.js.map +1 -0
- package/lib/commonjs/web/tools/VelocityTracker.js +11 -15
- package/lib/commonjs/web/tools/VelocityTracker.js.map +1 -1
- package/lib/commonjs/web/tools/WheelEventManager.js +55 -0
- package/lib/commonjs/web/tools/WheelEventManager.js.map +1 -0
- package/lib/commonjs/web/utils.js +221 -0
- package/lib/commonjs/web/utils.js.map +1 -1
- package/lib/commonjs/web_hammer/DiscreteGestureHandler.js +1 -1
- package/lib/commonjs/web_hammer/DiscreteGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/DraggingGestureHandler.js +1 -1
- package/lib/commonjs/web_hammer/DraggingGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/Errors.js.map +1 -1
- package/lib/commonjs/web_hammer/FlingGestureHandler.js +1 -1
- package/lib/commonjs/web_hammer/FlingGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/GestureHandler.js +122 -129
- package/lib/commonjs/web_hammer/GestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/IndiscreteGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/LongPressGestureHandler.js +1 -1
- package/lib/commonjs/web_hammer/LongPressGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/NativeViewGestureHandler.js +1 -2
- package/lib/commonjs/web_hammer/NativeViewGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/NodeManager.js +2 -1
- package/lib/commonjs/web_hammer/NodeManager.js.map +1 -1
- package/lib/commonjs/web_hammer/PanGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/PinchGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/PressGestureHandler.js +2 -9
- package/lib/commonjs/web_hammer/PressGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/RotationGestureHandler.js +1 -2
- package/lib/commonjs/web_hammer/RotationGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/TapGestureHandler.js +19 -27
- package/lib/commonjs/web_hammer/TapGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/constants.js.map +1 -1
- package/lib/commonjs/web_hammer/utils.js.map +1 -1
- package/lib/module/ActionType.js +2 -0
- package/lib/module/ActionType.js.map +1 -1
- package/lib/module/Directions.js +22 -4
- package/lib/module/Directions.js.map +1 -1
- package/lib/module/EnableNewWebImplementation.js +13 -0
- 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 +3 -2
- package/lib/module/PlatformConstants.js.map +1 -1
- package/lib/module/PlatformConstants.kepler.js +8 -0
- package/lib/module/PlatformConstants.kepler.js.map +1 -0
- package/lib/module/PlatformConstants.web.js +2 -0
- package/lib/module/PlatformConstants.web.js.map +1 -1
- package/lib/module/PointerType.js +11 -0
- package/lib/module/PointerType.js.map +1 -0
- package/lib/module/RNGestureHandlerModule.js +6 -15
- package/lib/module/RNGestureHandlerModule.js.map +1 -1
- package/lib/module/RNGestureHandlerModule.kepler.js +5 -3
- package/lib/module/RNGestureHandlerModule.kepler.js.map +1 -1
- package/lib/module/RNGestureHandlerModule.web.js +22 -46
- package/lib/module/RNGestureHandlerModule.web.js.map +1 -1
- package/lib/module/RNGestureHandlerModule.windows.js +16 -78
- 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 +2 -0
- package/lib/module/State.js.map +1 -1
- package/lib/module/TouchEventType.js +2 -0
- package/lib/module/TouchEventType.js.map +1 -1
- package/lib/module/components/DrawerLayout.js +420 -383
- package/lib/module/components/DrawerLayout.js.map +1 -1
- package/lib/module/components/GestureButtons.js +139 -115
- package/lib/module/components/GestureButtons.js.map +1 -1
- package/lib/module/components/GestureButtonsProps.js +4 -0
- package/lib/module/components/GestureButtonsProps.js.map +1 -0
- package/lib/module/components/GestureComponents.js +17 -12
- package/lib/module/components/GestureComponents.js.map +1 -1
- package/lib/module/components/GestureComponents.web.js +11 -7
- 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 +7 -4
- package/lib/module/components/GestureHandlerButton.web.js.map +1 -1
- package/lib/module/components/GestureHandlerRootView.android.js +21 -5
- package/lib/module/components/GestureHandlerRootView.android.js.map +1 -1
- package/lib/module/components/GestureHandlerRootView.js +21 -6
- package/lib/module/components/GestureHandlerRootView.js.map +1 -1
- package/lib/module/components/GestureHandlerRootView.kepler.js +10 -4
- package/lib/module/components/GestureHandlerRootView.kepler.js.map +1 -1
- package/lib/module/components/GestureHandlerRootView.web.js +20 -5
- package/lib/module/components/GestureHandlerRootView.web.js.map +1 -1
- package/lib/module/components/Pressable/Pressable.js +268 -0
- package/lib/module/components/Pressable/Pressable.js.map +1 -0
- package/lib/module/components/Pressable/PressableProps.js +4 -0
- package/lib/module/components/Pressable/PressableProps.js.map +1 -0
- package/lib/module/components/Pressable/StateMachine.js +40 -0
- package/lib/module/components/Pressable/StateMachine.js.map +1 -0
- package/lib/module/components/Pressable/index.js +4 -0
- package/lib/module/components/Pressable/index.js.map +1 -0
- package/lib/module/components/Pressable/stateDefinitions.js +83 -0
- package/lib/module/components/Pressable/stateDefinitions.js.map +1 -0
- package/lib/module/components/Pressable/utils.js +84 -0
- package/lib/module/components/Pressable/utils.js.map +1 -0
- package/lib/module/components/ReanimatedDrawerLayout.js +352 -0
- package/lib/module/components/ReanimatedDrawerLayout.js.map +1 -0
- package/lib/module/components/ReanimatedSwipeable/ReanimatedSwipeable.js +332 -0
- package/lib/module/components/ReanimatedSwipeable/ReanimatedSwipeable.js.map +1 -0
- package/lib/module/components/ReanimatedSwipeable/ReanimatedSwipeableProps.js +8 -0
- package/lib/module/components/ReanimatedSwipeable/ReanimatedSwipeableProps.js.map +1 -0
- package/lib/module/components/ReanimatedSwipeable/index.js +5 -0
- package/lib/module/components/ReanimatedSwipeable/index.js.map +1 -0
- package/lib/module/components/Swipeable.js +285 -259
- package/lib/module/components/Swipeable.js.map +1 -1
- package/lib/module/components/Text.js +55 -0
- package/lib/module/components/Text.js.map +1 -0
- package/lib/module/components/gestureHandlerRootHOC.js +14 -3
- package/lib/module/components/gestureHandlerRootHOC.js.map +1 -1
- package/lib/module/components/touchables/ExtraButtonProps.js +2 -0
- package/lib/module/components/touchables/ExtraButtonProps.js.map +1 -0
- package/lib/module/components/touchables/GenericTouchable.js +84 -89
- package/lib/module/components/touchables/GenericTouchable.js.map +1 -1
- package/lib/module/components/touchables/GenericTouchableProps.js +4 -0
- package/lib/module/components/touchables/GenericTouchableProps.js.map +1 -0
- package/lib/module/components/touchables/TouchableHighlight.js +52 -46
- package/lib/module/components/touchables/TouchableHighlight.js.map +1 -1
- package/lib/module/components/touchables/TouchableNativeFeedback.android.js +36 -33
- package/lib/module/components/touchables/TouchableNativeFeedback.android.js.map +1 -1
- package/lib/module/components/touchables/TouchableNativeFeedback.js +8 -1
- package/lib/module/components/touchables/TouchableNativeFeedback.js.map +1 -1
- package/lib/module/components/touchables/TouchableNativeFeedbackProps.js +4 -0
- package/lib/module/components/touchables/TouchableNativeFeedbackProps.js.map +1 -0
- package/lib/module/components/touchables/TouchableOpacity.js +40 -36
- package/lib/module/components/touchables/TouchableOpacity.js.map +1 -1
- package/lib/module/components/touchables/TouchableWithoutFeedback.js +23 -5
- 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 +5 -0
- package/lib/module/findNodeHandle.js.map +1 -0
- package/lib/module/findNodeHandle.web.js +35 -0
- package/lib/module/findNodeHandle.web.js.map +1 -0
- package/lib/module/getShadowNodeFromRef.js +30 -4
- 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 +6 -0
- package/lib/module/ghQueueMicrotask.js.map +1 -0
- package/lib/module/handlers/FlingGestureHandler.js +15 -0
- package/lib/module/handlers/FlingGestureHandler.js.map +1 -1
- package/lib/module/handlers/ForceTouchGestureHandler.js +17 -6
- package/lib/module/handlers/ForceTouchGestureHandler.js.map +1 -1
- package/lib/module/handlers/GestureHandlerEventPayload.js +4 -0
- package/lib/module/handlers/GestureHandlerEventPayload.js.map +1 -0
- package/lib/module/handlers/LongPressGestureHandler.js +16 -1
- package/lib/module/handlers/LongPressGestureHandler.js.map +1 -1
- package/lib/module/handlers/NativeViewGestureHandler.js +15 -0
- package/lib/module/handlers/NativeViewGestureHandler.js.map +1 -1
- package/lib/module/handlers/PanGestureHandler.js +15 -0
- package/lib/module/handlers/PanGestureHandler.js.map +1 -1
- package/lib/module/handlers/PinchGestureHandler.js +15 -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 +15 -0
- package/lib/module/handlers/RotationGestureHandler.js.map +1 -1
- package/lib/module/handlers/TapGestureHandler.js +15 -0
- package/lib/module/handlers/TapGestureHandler.js.map +1 -1
- package/lib/module/handlers/createHandler.js +137 -136
- package/lib/module/handlers/createHandler.js.map +1 -1
- package/lib/module/handlers/createNativeWrapper.js +19 -12
- package/lib/module/handlers/createNativeWrapper.js.map +1 -1
- package/lib/module/handlers/customDirectEventTypes.js +5 -0
- package/lib/module/handlers/customDirectEventTypes.js.map +1 -0
- package/lib/module/handlers/customDirectEventTypes.web.js +7 -0
- package/lib/module/handlers/customDirectEventTypes.web.js.map +1 -0
- package/lib/module/handlers/gestureHandlerCommon.js +15 -65
- 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 +26 -0
- package/lib/module/handlers/gestures/GestureDetector/Wrap.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/Wrap.web.js +36 -0
- package/lib/module/handlers/gestures/GestureDetector/Wrap.web.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js +62 -0
- package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js +15 -0
- package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/index.js +117 -0
- package/lib/module/handlers/gestures/GestureDetector/index.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/needsToReattach.js +18 -0
- package/lib/module/handlers/gestures/GestureDetector/needsToReattach.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/types.js +4 -0
- package/lib/module/handlers/gestures/GestureDetector/types.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js +61 -0
- package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js +139 -0
- package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js +43 -0
- package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/useMountReactions.js +37 -0
- package/lib/module/handlers/gestures/GestureDetector/useMountReactions.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js +40 -0
- package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/utils.js +134 -0
- package/lib/module/handlers/gestures/GestureDetector/utils.js.map +1 -0
- package/lib/module/handlers/gestures/eventReceiver.js +17 -23
- package/lib/module/handlers/gestures/eventReceiver.js.map +1 -1
- package/lib/module/handlers/gestures/flingGesture.js +16 -4
- package/lib/module/handlers/gestures/flingGesture.js.map +1 -1
- package/lib/module/handlers/gestures/forceTouchGesture.js +33 -4
- package/lib/module/handlers/gestures/forceTouchGesture.js.map +1 -1
- package/lib/module/handlers/gestures/gesture.js +163 -19
- package/lib/module/handlers/gestures/gesture.js.map +1 -1
- package/lib/module/handlers/gestures/gestureComposition.js +11 -9
- package/lib/module/handlers/gestures/gestureComposition.js.map +1 -1
- package/lib/module/handlers/gestures/gestureObjects.js +62 -0
- package/lib/module/handlers/gestures/gestureObjects.js.map +1 -1
- package/lib/module/handlers/gestures/gestureStateManager.js +52 -40
- package/lib/module/handlers/gestures/gestureStateManager.js.map +1 -1
- package/lib/module/handlers/gestures/gestureStateManager.web.js +4 -1
- package/lib/module/handlers/gestures/gestureStateManager.web.js.map +1 -1
- package/lib/module/handlers/gestures/hoverGesture.js +4 -5
- package/lib/module/handlers/gestures/hoverGesture.js.map +1 -1
- package/lib/module/handlers/gestures/longPressGesture.js +24 -4
- package/lib/module/handlers/gestures/longPressGesture.js.map +1 -1
- package/lib/module/handlers/gestures/manualGesture.js +2 -0
- package/lib/module/handlers/gestures/manualGesture.js.map +1 -1
- package/lib/module/handlers/gestures/nativeGesture.js +13 -4
- package/lib/module/handlers/gestures/nativeGesture.js.map +1 -1
- package/lib/module/handlers/gestures/panGesture.js +79 -4
- package/lib/module/handlers/gestures/panGesture.js.map +1 -1
- package/lib/module/handlers/gestures/pinchGesture.js +2 -0
- package/lib/module/handlers/gestures/pinchGesture.js.map +1 -1
- package/lib/module/handlers/gestures/reanimatedWrapper.js +3 -2
- package/lib/module/handlers/gestures/reanimatedWrapper.js.map +1 -1
- package/lib/module/handlers/gestures/rotationGesture.js +2 -0
- package/lib/module/handlers/gestures/rotationGesture.js.map +1 -1
- package/lib/module/handlers/gestures/tapGesture.js +45 -4
- package/lib/module/handlers/gestures/tapGesture.js.map +1 -1
- package/lib/module/handlers/getNextHandlerTag.js +7 -0
- package/lib/module/handlers/getNextHandlerTag.js.map +1 -0
- package/lib/module/handlers/handlersRegistry.js +9 -9
- package/lib/module/handlers/handlersRegistry.js.map +1 -1
- package/lib/module/handlers/utils.js +61 -0
- package/lib/module/handlers/utils.js.map +1 -0
- package/lib/module/index.js +6 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/init.js +3 -1
- 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 +20 -14
- package/lib/module/jestUtils/jestUtils.js.map +1 -1
- package/lib/module/mocks/Pressable.js +4 -0
- package/lib/module/mocks/Pressable.js.map +1 -0
- package/lib/module/mocks/mocks.js +64 -0
- package/lib/module/mocks/mocks.js.map +1 -0
- package/lib/module/mocks.js +2 -0
- package/lib/module/mocks.js.map +1 -1
- package/lib/module/mountRegistry.js +32 -0
- package/lib/module/mountRegistry.js.map +1 -0
- package/lib/module/specs/NativeRNGestureHandlerModule.js +5 -0
- package/lib/module/specs/NativeRNGestureHandlerModule.js.map +1 -0
- package/lib/module/specs/RNGestureHandlerButtonNativeComponent.kepler.js +2 -0
- package/lib/module/specs/RNGestureHandlerButtonNativeComponent.kepler.js.map +1 -1
- package/lib/module/specs/RNGestureHandlerButtonNativeComponent.ts +24 -0
- package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.kepler.js +11 -0
- package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.kepler.js.map +1 -0
- package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.ts +7 -0
- package/lib/module/typeUtils.js +1 -1
- package/lib/module/typeUtils.js.map +1 -1
- package/lib/module/utils.js +45 -14
- package/lib/module/utils.js.map +1 -1
- package/lib/module/web/Gestures.js +42 -0
- package/lib/module/web/Gestures.js.map +1 -0
- package/lib/module/web/constants.js +3 -6
- package/lib/module/web/constants.js.map +1 -1
- package/lib/module/web/detectors/RotationGestureDetector.js +37 -40
- package/lib/module/web/detectors/RotationGestureDetector.js.map +1 -1
- package/lib/module/web/detectors/ScaleGestureDetector.js +32 -46
- package/lib/module/web/detectors/ScaleGestureDetector.js.map +1 -1
- package/lib/module/web/handlers/FlingGestureHandler.js +52 -34
- package/lib/module/web/handlers/FlingGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/GestureHandler.js +218 -197
- package/lib/module/web/handlers/GestureHandler.js.map +1 -1
- package/lib/module/web/handlers/HoverGestureHandler.js +14 -15
- package/lib/module/web/handlers/HoverGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/IGestureHandler.js +2 -0
- package/lib/module/web/handlers/IGestureHandler.js.map +1 -0
- package/lib/module/web/handlers/LongPressGestureHandler.js +59 -30
- package/lib/module/web/handlers/LongPressGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/ManualGestureHandler.js +3 -12
- package/lib/module/web/handlers/ManualGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/NativeViewGestureHandler.js +44 -41
- package/lib/module/web/handlers/NativeViewGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/PanGestureHandler.js +119 -65
- package/lib/module/web/handlers/PanGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/PinchGestureHandler.js +38 -50
- package/lib/module/web/handlers/PinchGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/RotationGestureHandler.js +34 -49
- package/lib/module/web/handlers/RotationGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/TapGestureHandler.js +41 -43
- package/lib/module/web/handlers/TapGestureHandler.js.map +1 -1
- package/lib/module/web/interfaces.js +7 -17
- package/lib/module/web/interfaces.js.map +1 -1
- package/lib/module/web/tools/CircularBuffer.js +14 -19
- package/lib/module/web/tools/CircularBuffer.js.map +1 -1
- package/lib/module/web/tools/EventManager.js +9 -8
- 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 +123 -159
- package/lib/module/web/tools/GestureHandlerOrchestrator.js.map +1 -1
- package/lib/module/web/tools/GestureHandlerWebDelegate.js +103 -29
- package/lib/module/web/tools/GestureHandlerWebDelegate.js.map +1 -1
- package/lib/module/web/tools/InteractionManager.js +46 -47
- package/lib/module/web/tools/InteractionManager.js.map +1 -1
- package/lib/module/web/tools/KeyboardEventManager.js +102 -0
- package/lib/module/web/tools/KeyboardEventManager.js.map +1 -0
- package/lib/module/web/tools/LeastSquareSolver.js +24 -30
- package/lib/module/web/tools/LeastSquareSolver.js.map +1 -1
- package/lib/module/web/tools/NodeManager.js +7 -7
- package/lib/module/web/tools/NodeManager.js.map +1 -1
- package/lib/module/web/tools/PointerEventManager.js +151 -131
- package/lib/module/web/tools/PointerEventManager.js.map +1 -1
- package/lib/module/web/tools/PointerTracker.js +99 -107
- package/lib/module/web/tools/PointerTracker.js.map +1 -1
- package/lib/module/web/tools/Vector.js +32 -0
- package/lib/module/web/tools/Vector.js.map +1 -0
- package/lib/module/web/tools/VelocityTracker.js +13 -15
- package/lib/module/web/tools/VelocityTracker.js.map +1 -1
- package/lib/module/web/tools/WheelEventManager.js +49 -0
- package/lib/module/web/tools/WheelEventManager.js.map +1 -0
- package/lib/module/web/utils.js +215 -0
- package/lib/module/web/utils.js.map +1 -1
- package/lib/module/web_hammer/DiscreteGestureHandler.js +3 -1
- package/lib/module/web_hammer/DiscreteGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/DraggingGestureHandler.js +3 -1
- package/lib/module/web_hammer/DraggingGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/Errors.js +2 -0
- package/lib/module/web_hammer/Errors.js.map +1 -1
- package/lib/module/web_hammer/FlingGestureHandler.js +3 -1
- package/lib/module/web_hammer/FlingGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/GestureHandler.js +121 -128
- package/lib/module/web_hammer/GestureHandler.js.map +1 -1
- package/lib/module/web_hammer/IndiscreteGestureHandler.js +2 -0
- package/lib/module/web_hammer/IndiscreteGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/LongPressGestureHandler.js +3 -1
- package/lib/module/web_hammer/LongPressGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/NativeViewGestureHandler.js +2 -0
- package/lib/module/web_hammer/NativeViewGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/NodeManager.js +3 -1
- package/lib/module/web_hammer/NodeManager.js.map +1 -1
- package/lib/module/web_hammer/PanGestureHandler.js +2 -0
- package/lib/module/web_hammer/PanGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/PinchGestureHandler.js +2 -0
- package/lib/module/web_hammer/PinchGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/PressGestureHandler.js +4 -9
- package/lib/module/web_hammer/PressGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/RotationGestureHandler.js +3 -2
- package/lib/module/web_hammer/RotationGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/TapGestureHandler.js +21 -27
- package/lib/module/web_hammer/TapGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/constants.js +2 -0
- package/lib/module/web_hammer/constants.js.map +1 -1
- package/lib/module/web_hammer/utils.js +2 -0
- package/lib/module/web_hammer/utils.js.map +1 -1
- package/lib/typescript/ActionType.d.ts +2 -1
- package/lib/typescript/ActionType.d.ts.map +1 -0
- package/lib/typescript/Directions.d.ts +9 -1
- package/lib/typescript/Directions.d.ts.map +1 -0
- package/lib/typescript/EnableNewWebImplementation.d.ts +7 -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.kepler.d.ts +5 -0
- package/lib/typescript/PlatformConstants.kepler.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 +8 -0
- package/lib/typescript/PointerType.d.ts.map +1 -0
- package/lib/typescript/RNGestureHandlerModule.d.ts +3 -13
- package/lib/typescript/RNGestureHandlerModule.d.ts.map +1 -0
- package/lib/typescript/RNGestureHandlerModule.kepler.d.ts +1 -0
- package/lib/typescript/RNGestureHandlerModule.kepler.d.ts.map +1 -0
- package/lib/typescript/RNGestureHandlerModule.web.d.ts +5 -39
- package/lib/typescript/RNGestureHandlerModule.web.d.ts.map +1 -0
- package/lib/typescript/RNGestureHandlerModule.windows.d.ts +6 -21
- 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 +2 -1
- package/lib/typescript/State.d.ts.map +1 -0
- package/lib/typescript/TouchEventType.d.ts +2 -1
- package/lib/typescript/TouchEventType.d.ts.map +1 -0
- package/lib/typescript/components/DrawerLayout.d.ts +39 -1
- package/lib/typescript/components/DrawerLayout.d.ts.map +1 -0
- package/lib/typescript/components/GestureButtons.d.ts +6 -119
- package/lib/typescript/components/GestureButtons.d.ts.map +1 -0
- package/lib/typescript/components/GestureButtonsProps.d.ts +124 -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 +2 -1
- 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 +2 -1
- package/lib/typescript/components/GestureHandlerRootView.android.d.ts.map +1 -0
- package/lib/typescript/components/GestureHandlerRootView.d.ts +2 -1
- package/lib/typescript/components/GestureHandlerRootView.d.ts.map +1 -0
- package/lib/typescript/components/GestureHandlerRootView.kepler.d.ts +1 -0
- package/lib/typescript/components/GestureHandlerRootView.kepler.d.ts.map +1 -0
- package/lib/typescript/components/GestureHandlerRootView.web.d.ts +2 -1
- package/lib/typescript/components/GestureHandlerRootView.web.d.ts.map +1 -0
- package/lib/typescript/components/Pressable/Pressable.d.ts +5 -0
- package/lib/typescript/components/Pressable/Pressable.d.ts.map +1 -0
- package/lib/typescript/components/Pressable/PressableProps.d.ts +137 -0
- package/lib/typescript/components/Pressable/PressableProps.d.ts.map +1 -0
- package/lib/typescript/components/Pressable/StateMachine.d.ts +16 -0
- package/lib/typescript/components/Pressable/StateMachine.d.ts.map +1 -0
- package/lib/typescript/components/Pressable/index.d.ts +3 -0
- package/lib/typescript/components/Pressable/index.d.ts.map +1 -0
- package/lib/typescript/components/Pressable/stateDefinitions.d.ts +11 -0
- package/lib/typescript/components/Pressable/stateDefinitions.d.ts.map +1 -0
- package/lib/typescript/components/Pressable/utils.d.ts +11 -0
- package/lib/typescript/components/Pressable/utils.d.ts.map +1 -0
- package/lib/typescript/components/ReanimatedDrawerLayout.d.ts +168 -0
- package/lib/typescript/components/ReanimatedDrawerLayout.d.ts.map +1 -0
- package/lib/typescript/components/ReanimatedSwipeable/ReanimatedSwipeable.d.ts +6 -0
- package/lib/typescript/components/ReanimatedSwipeable/ReanimatedSwipeable.d.ts.map +1 -0
- package/lib/typescript/components/ReanimatedSwipeable/ReanimatedSwipeableProps.d.ts +150 -0
- package/lib/typescript/components/ReanimatedSwipeable/ReanimatedSwipeableProps.d.ts.map +1 -0
- package/lib/typescript/components/ReanimatedSwipeable/index.d.ts +3 -0
- package/lib/typescript/components/ReanimatedSwipeable/index.d.ts.map +1 -0
- package/lib/typescript/components/Swipeable.d.ts +14 -0
- package/lib/typescript/components/Swipeable.d.ts.map +1 -0
- package/lib/typescript/components/Text.d.ts +5 -0
- package/lib/typescript/components/Text.d.ts.map +1 -0
- package/lib/typescript/components/gestureHandlerRootHOC.d.ts +6 -1
- package/lib/typescript/components/gestureHandlerRootHOC.d.ts.map +1 -0
- package/lib/typescript/components/touchables/ExtraButtonProps.d.ts +8 -0
- package/lib/typescript/components/touchables/ExtraButtonProps.d.ts.map +1 -0
- package/lib/typescript/components/touchables/GenericTouchable.d.ts +4 -16
- package/lib/typescript/components/touchables/GenericTouchable.d.ts.map +1 -0
- package/lib/typescript/components/touchables/GenericTouchableProps.d.ts +17 -0
- package/lib/typescript/components/touchables/GenericTouchableProps.d.ts.map +1 -0
- package/lib/typescript/components/touchables/TouchableHighlight.d.ts +7 -1
- package/lib/typescript/components/touchables/TouchableHighlight.d.ts.map +1 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedback.android.d.ts +6 -10
- package/lib/typescript/components/touchables/TouchableNativeFeedback.android.d.ts.map +1 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedback.d.ts +6 -1
- package/lib/typescript/components/touchables/TouchableNativeFeedback.d.ts.map +1 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedbackProps.d.ts +9 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedbackProps.d.ts.map +1 -0
- package/lib/typescript/components/touchables/TouchableOpacity.d.ts +7 -1
- package/lib/typescript/components/touchables/TouchableOpacity.d.ts.map +1 -0
- package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts +11 -3
- 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 +3 -0
- package/lib/typescript/findNodeHandle.d.ts.map +1 -0
- package/lib/typescript/findNodeHandle.web.d.ts +3 -0
- package/lib/typescript/findNodeHandle.web.d.ts.map +1 -0
- package/lib/typescript/getShadowNodeFromRef.d.ts +2 -1
- 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 +2 -0
- package/lib/typescript/ghQueueMicrotask.d.ts.map +1 -0
- package/lib/typescript/handlers/FlingGestureHandler.d.ts +11 -6
- package/lib/typescript/handlers/FlingGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/ForceTouchGestureHandler.d.ts +11 -10
- package/lib/typescript/handlers/ForceTouchGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/GestureHandlerEventPayload.d.ts +198 -0
- package/lib/typescript/handlers/GestureHandlerEventPayload.d.ts.map +1 -0
- package/lib/typescript/handlers/LongPressGestureHandler.d.ts +16 -36
- package/lib/typescript/handlers/LongPressGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/NativeViewGestureHandler.d.ts +12 -7
- package/lib/typescript/handlers/NativeViewGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/PanGestureHandler.d.ts +16 -55
- package/lib/typescript/handlers/PanGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/PinchGestureHandler.d.ts +11 -23
- 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 +11 -23
- package/lib/typescript/handlers/RotationGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/TapGestureHandler.d.ts +11 -6
- 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 +2 -0
- package/lib/typescript/handlers/customDirectEventTypes.d.ts.map +1 -0
- package/lib/typescript/handlers/customDirectEventTypes.web.d.ts +3 -0
- package/lib/typescript/handlers/customDirectEventTypes.web.d.ts.map +1 -0
- package/lib/typescript/handlers/gestureHandlerCommon.d.ts +20 -8
- package/lib/typescript/handlers/gestureHandlerCommon.d.ts.map +1 -0
- package/lib/typescript/handlers/gestureHandlerTypesCompat.d.ts +20 -9
- package/lib/typescript/handlers/gestureHandlerTypesCompat.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/Wrap.d.ts +14 -0
- package/lib/typescript/handlers/gestures/GestureDetector/Wrap.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/Wrap.web.d.ts +8 -0
- package/lib/typescript/handlers/gestures/GestureDetector/Wrap.web.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/attachHandlers.d.ts +14 -0
- package/lib/typescript/handlers/gestures/GestureDetector/attachHandlers.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/dropHandlers.d.ts +3 -0
- package/lib/typescript/handlers/gestures/GestureDetector/dropHandlers.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/index.d.ts +50 -0
- package/lib/typescript/handlers/gestures/GestureDetector/index.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/needsToReattach.d.ts +4 -0
- package/lib/typescript/handlers/gestures/GestureDetector/needsToReattach.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/types.d.ts +21 -0
- package/lib/typescript/handlers/gestures/GestureDetector/types.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/updateHandlers.d.ts +5 -0
- package/lib/typescript/handlers/gestures/GestureDetector/updateHandlers.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useAnimatedGesture.d.ts +3 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useAnimatedGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useDetectorUpdater.d.ts +6 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useDetectorUpdater.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useMountReactions.d.ts +3 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useMountReactions.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useViewRefHandler.d.ts +4 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useViewRefHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/utils.d.ts +13 -0
- 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 +14 -1
- package/lib/typescript/handlers/gestures/flingGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/forceTouchGesture.d.ts +26 -1
- package/lib/typescript/handlers/gestures/forceTouchGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/gesture.d.ts +121 -11
- 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 +60 -0
- package/lib/typescript/handlers/gestures/gestureObjects.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/gestureStateManager.d.ts +6 -1
- 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 +3 -7
- package/lib/typescript/handlers/gestures/hoverGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/longPressGesture.d.ts +18 -1
- 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 +11 -1
- package/lib/typescript/handlers/gestures/nativeGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/panGesture.d.ts +70 -5
- package/lib/typescript/handlers/gestures/panGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/pinchGesture.d.ts +2 -1
- package/lib/typescript/handlers/gestures/pinchGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/reanimatedWrapper.d.ts +2 -1
- package/lib/typescript/handlers/gestures/reanimatedWrapper.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/rotationGesture.d.ts +2 -1
- package/lib/typescript/handlers/gestures/rotationGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/tapGesture.d.ts +38 -1
- package/lib/typescript/handlers/gestures/tapGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/getNextHandlerTag.d.ts +2 -0
- package/lib/typescript/handlers/getNextHandlerTag.d.ts.map +1 -0
- package/lib/typescript/handlers/handlersRegistry.d.ts +3 -2
- package/lib/typescript/handlers/handlersRegistry.d.ts.map +1 -0
- package/lib/typescript/handlers/utils.d.ts +8 -0
- package/lib/typescript/handlers/utils.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +16 -9
- 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 +10 -8
- package/lib/typescript/jestUtils/jestUtils.d.ts.map +1 -0
- package/lib/typescript/mocks/Pressable.d.ts +2 -0
- package/lib/typescript/mocks/Pressable.d.ts.map +1 -0
- package/lib/typescript/mocks/mocks.d.ts +47 -0
- package/lib/typescript/mocks/mocks.d.ts.map +1 -0
- package/lib/typescript/mocks.d.ts +4 -3
- package/lib/typescript/mocks.d.ts.map +1 -0
- package/lib/typescript/mountRegistry.d.ts +17 -0
- package/lib/typescript/mountRegistry.d.ts.map +1 -0
- package/lib/typescript/specs/NativeRNGestureHandlerModule.d.ts +15 -0
- package/lib/typescript/specs/NativeRNGestureHandlerModule.d.ts.map +1 -0
- package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.d.ts +5 -3
- package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.d.ts.map +1 -0
- package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.kepler.d.ts +2 -0
- package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.kepler.d.ts.map +1 -0
- package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts +1 -2
- package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.kepler.d.ts +7 -0
- package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.kepler.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 +14 -5
- package/lib/typescript/utils.d.ts.map +1 -0
- package/lib/typescript/web/Gestures.d.ts +37 -0
- package/lib/typescript/web/Gestures.d.ts.map +1 -0
- package/lib/typescript/web/constants.d.ts +2 -6
- package/lib/typescript/web/constants.d.ts.map +1 -0
- package/lib/typescript/web/detectors/RotationGestureDetector.d.ts +8 -7
- package/lib/typescript/web/detectors/RotationGestureDetector.d.ts.map +1 -0
- package/lib/typescript/web/detectors/ScaleGestureDetector.d.ts +9 -8
- package/lib/typescript/web/detectors/ScaleGestureDetector.d.ts.map +1 -0
- package/lib/typescript/web/handlers/FlingGestureHandler.d.ts +4 -4
- package/lib/typescript/web/handlers/FlingGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/GestureHandler.d.ts +50 -37
- package/lib/typescript/web/handlers/GestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/HoverGestureHandler.d.ts +4 -3
- package/lib/typescript/web/handlers/HoverGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/IGestureHandler.d.ts +38 -0
- package/lib/typescript/web/handlers/IGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/LongPressGestureHandler.d.ts +5 -0
- package/lib/typescript/web/handlers/LongPressGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/ManualGestureHandler.d.ts +2 -3
- package/lib/typescript/web/handlers/ManualGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/NativeViewGestureHandler.d.ts +3 -1
- package/lib/typescript/web/handlers/NativeViewGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/PanGestureHandler.d.ts +11 -2
- package/lib/typescript/web/handlers/PanGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/PinchGestureHandler.d.ts +2 -2
- package/lib/typescript/web/handlers/PinchGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/RotationGestureHandler.d.ts +2 -3
- package/lib/typescript/web/handlers/RotationGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/TapGestureHandler.d.ts +2 -1
- package/lib/typescript/web/handlers/TapGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/interfaces.d.ts +40 -22
- package/lib/typescript/web/interfaces.d.ts.map +1 -0
- package/lib/typescript/web/tools/CircularBuffer.d.ts +4 -3
- package/lib/typescript/web/tools/CircularBuffer.d.ts.map +1 -0
- package/lib/typescript/web/tools/EventManager.d.ts +20 -14
- package/lib/typescript/web/tools/EventManager.d.ts.map +1 -0
- package/lib/typescript/web/tools/GestureHandlerDelegate.d.ts +7 -4
- package/lib/typescript/web/tools/GestureHandlerDelegate.d.ts.map +1 -0
- package/lib/typescript/web/tools/GestureHandlerOrchestrator.d.ts +10 -8
- package/lib/typescript/web/tools/GestureHandlerOrchestrator.d.ts.map +1 -0
- package/lib/typescript/web/tools/GestureHandlerWebDelegate.d.ts +20 -5
- package/lib/typescript/web/tools/GestureHandlerWebDelegate.d.ts.map +1 -0
- package/lib/typescript/web/tools/InteractionManager.d.ts +10 -8
- package/lib/typescript/web/tools/InteractionManager.d.ts.map +1 -0
- package/lib/typescript/web/tools/KeyboardEventManager.d.ts +17 -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 +6 -4
- package/lib/typescript/web/tools/NodeManager.d.ts.map +1 -0
- package/lib/typescript/web/tools/PointerEventManager.d.ts +14 -2
- package/lib/typescript/web/tools/PointerEventManager.d.ts.map +1 -0
- package/lib/typescript/web/tools/PointerTracker.d.ts +33 -35
- package/lib/typescript/web/tools/PointerTracker.d.ts.map +1 -0
- package/lib/typescript/web/tools/Vector.d.ts +16 -0
- package/lib/typescript/web/tools/Vector.d.ts.map +1 -0
- package/lib/typescript/web/tools/VelocityTracker.d.ts +2 -1
- package/lib/typescript/web/tools/VelocityTracker.d.ts.map +1 -0
- package/lib/typescript/web/tools/WheelEventManager.d.ts +12 -0
- package/lib/typescript/web/tools/WheelEventManager.d.ts.map +1 -0
- package/lib/typescript/web/utils.d.ts +15 -4
- 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 +5 -5
- 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/oss-attribution/attribution.txt +0 -0
- package/oss-attribution/licenseInfos.json +1 -0
- package/package.json +151 -1
- package/react-native.config.js +27 -0
- package/scripts/gesture_handler_utils.rb +25 -0
- package/src/ActionType.ts +1 -1
- package/src/Directions.ts +22 -5
- package/src/EnableNewWebImplementation.ts +18 -0
- package/src/PlatformConstants.kepler.ts +5 -0
- package/src/PointerType.ts +7 -0
- package/src/RNGestureHandlerModule.kepler.ts +3 -3
- package/src/RNGestureHandlerModule.ts +4 -49
- package/src/RNGestureHandlerModule.web.ts +29 -51
- package/src/RNGestureHandlerModule.windows.ts +18 -100
- package/src/State.ts +1 -1
- package/src/TouchEventType.ts +2 -1
- package/src/components/DrawerLayout.tsx +58 -13
- package/src/components/GestureButtons.tsx +61 -123
- package/src/components/GestureButtonsProps.ts +156 -0
- package/src/components/GestureComponents.tsx +11 -11
- package/src/components/GestureComponents.web.tsx +1 -1
- package/src/components/GestureHandlerButton.tsx +1 -1
- package/src/components/GestureHandlerButton.web.tsx +3 -3
- package/src/components/GestureHandlerRootView.android.tsx +15 -7
- package/src/components/GestureHandlerRootView.kepler.tsx +3 -2
- package/src/components/GestureHandlerRootView.tsx +12 -7
- package/src/components/GestureHandlerRootView.web.tsx +11 -6
- package/src/components/Pressable/Pressable.tsx +401 -0
- package/src/components/Pressable/PressableProps.tsx +174 -0
- package/src/components/Pressable/StateMachine.tsx +57 -0
- package/src/components/Pressable/index.ts +5 -0
- package/src/components/Pressable/stateDefinitions.ts +126 -0
- package/src/components/Pressable/utils.ts +140 -0
- package/src/components/ReanimatedDrawerLayout.tsx +754 -0
- package/src/components/ReanimatedSwipeable/ReanimatedSwipeable.tsx +607 -0
- package/src/components/ReanimatedSwipeable/ReanimatedSwipeableProps.ts +199 -0
- package/src/components/ReanimatedSwipeable/index.ts +6 -0
- package/src/components/Swipeable.tsx +59 -15
- package/src/components/Text.tsx +77 -0
- package/src/components/gestureHandlerRootHOC.tsx +7 -6
- package/src/components/touchables/ExtraButtonProps.ts +7 -0
- package/src/components/touchables/GenericTouchable.tsx +15 -41
- package/src/components/touchables/GenericTouchableProps.ts +28 -0
- package/src/components/touchables/TouchableHighlight.tsx +7 -4
- package/src/components/touchables/TouchableNativeFeedback.android.tsx +10 -18
- package/src/components/touchables/TouchableNativeFeedback.tsx +6 -1
- package/src/components/touchables/TouchableNativeFeedbackProps.tsx +10 -0
- package/src/components/touchables/TouchableOpacity.tsx +8 -5
- package/src/components/touchables/TouchableWithoutFeedback.tsx +31 -6
- package/src/components/utils.ts +26 -0
- package/src/findNodeHandle.ts +3 -0
- package/src/findNodeHandle.web.ts +41 -0
- package/src/getShadowNodeFromRef.ts +35 -7
- package/src/ghQueueMicrotask.ts +8 -0
- package/src/handlers/FlingGestureHandler.ts +11 -6
- package/src/handlers/ForceTouchGestureHandler.ts +10 -12
- package/src/handlers/GestureHandlerEventPayload.ts +229 -0
- package/src/handlers/LongPressGestureHandler.ts +17 -40
- package/src/handlers/NativeViewGestureHandler.ts +11 -7
- package/src/handlers/PanGestureHandler.ts +19 -62
- package/src/handlers/PinchGestureHandler.ts +11 -27
- package/src/handlers/RotationGestureHandler.ts +11 -27
- package/src/handlers/TapGestureHandler.ts +11 -6
- package/src/handlers/createHandler.tsx +96 -59
- package/src/handlers/createNativeWrapper.tsx +7 -3
- package/src/handlers/customDirectEventTypes.ts +2 -0
- package/src/handlers/customDirectEventTypes.web.ts +5 -0
- package/src/handlers/gestureHandlerCommon.ts +50 -83
- package/src/handlers/gestureHandlerTypesCompat.ts +25 -30
- package/src/handlers/gestures/GestureDetector/Wrap.tsx +35 -0
- package/src/handlers/gestures/GestureDetector/Wrap.web.tsx +42 -0
- package/src/handlers/gestures/GestureDetector/attachHandlers.ts +112 -0
- package/src/handlers/gestures/GestureDetector/dropHandlers.ts +17 -0
- package/src/handlers/gestures/GestureDetector/index.tsx +191 -0
- package/src/handlers/gestures/GestureDetector/needsToReattach.ts +27 -0
- package/src/handlers/gestures/GestureDetector/types.ts +32 -0
- package/src/handlers/gestures/GestureDetector/updateHandlers.ts +92 -0
- package/src/handlers/gestures/GestureDetector/useAnimatedGesture.ts +209 -0
- package/src/handlers/gestures/GestureDetector/useDetectorUpdater.ts +69 -0
- package/src/handlers/gestures/GestureDetector/useMountReactions.ts +51 -0
- package/src/handlers/gestures/GestureDetector/useViewRefHandler.ts +58 -0
- package/src/handlers/gestures/GestureDetector/utils.ts +181 -0
- package/src/handlers/gestures/eventReceiver.ts +6 -5
- package/src/handlers/gestures/flingGesture.ts +13 -4
- package/src/handlers/gestures/forceTouchGesture.ts +25 -4
- package/src/handlers/gestures/gesture.ts +151 -20
- package/src/handlers/gestures/gestureComposition.ts +5 -3
- package/src/handlers/gestures/gestureObjects.ts +59 -0
- package/src/handlers/gestures/gestureStateManager.ts +55 -41
- package/src/handlers/gestures/gestureStateManager.web.ts +3 -1
- package/src/handlers/gestures/hoverGesture.ts +2 -8
- package/src/handlers/gestures/longPressGesture.ts +21 -4
- package/src/handlers/gestures/nativeGesture.ts +10 -4
- package/src/handlers/gestures/panGesture.ts +77 -8
- package/src/handlers/gestures/pinchGesture.ts +1 -1
- package/src/handlers/gestures/reanimatedWrapper.ts +18 -17
- package/src/handlers/gestures/rotationGesture.ts +1 -1
- package/src/handlers/gestures/tapGesture.ts +37 -4
- package/src/handlers/getNextHandlerTag.ts +5 -0
- package/src/handlers/handlersRegistry.ts +7 -9
- package/src/handlers/utils.ts +76 -0
- package/src/index.ts +31 -36
- package/src/init.ts +1 -1
- package/src/jestUtils/jestUtils.ts +30 -22
- package/src/mocks/Pressable.tsx +1 -0
- package/src/mocks/mocks.tsx +70 -0
- package/src/mountRegistry.ts +51 -0
- package/src/specs/NativeRNGestureHandlerModule.ts +26 -0
- package/src/specs/RNGestureHandlerButtonNativeComponent.ts +4 -0
- package/src/specs/RNGestureHandlerRootViewNativeComponent.kepler.ts +21 -0
- package/src/utils.ts +58 -13
- package/src/web/Gestures.ts +41 -0
- package/src/web/constants.ts +1 -7
- package/src/web/detectors/RotationGestureDetector.ts +31 -29
- package/src/web/detectors/ScaleGestureDetector.ts +34 -35
- package/src/web/handlers/FlingGestureHandler.ts +73 -38
- package/src/web/handlers/GestureHandler.ts +224 -193
- package/src/web/handlers/HoverGestureHandler.ts +16 -10
- package/src/web/handlers/IGestureHandler.ts +49 -0
- package/src/web/handlers/LongPressGestureHandler.ts +68 -18
- package/src/web/handlers/ManualGestureHandler.ts +3 -9
- package/src/web/handlers/NativeViewGestureHandler.ts +44 -36
- package/src/web/handlers/PanGestureHandler.ts +123 -37
- package/src/web/handlers/PinchGestureHandler.ts +20 -26
- package/src/web/handlers/RotationGestureHandler.ts +15 -21
- package/src/web/handlers/TapGestureHandler.ts +26 -25
- package/src/web/interfaces.ts +46 -22
- package/src/web/tools/CircularBuffer.ts +15 -15
- package/src/web/tools/EventManager.ts +24 -20
- package/src/web/tools/GestureHandlerDelegate.ts +7 -4
- package/src/web/tools/GestureHandlerOrchestrator.ts +183 -189
- package/src/web/tools/GestureHandlerWebDelegate.ts +139 -27
- package/src/web/tools/InteractionManager.ts +62 -50
- package/src/web/tools/KeyboardEventManager.ts +133 -0
- package/src/web/tools/LeastSquareSolver.ts +18 -18
- package/src/web/tools/NodeManager.ts +11 -6
- package/src/web/tools/PointerEventManager.ts +177 -144
- package/src/web/tools/PointerTracker.ts +94 -106
- package/src/web/tools/Vector.ts +59 -0
- package/src/web/tools/VelocityTracker.ts +7 -7
- package/src/web/tools/WheelEventManager.ts +48 -0
- package/src/web/utils.ts +289 -4
- 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 +5 -3
- package/src/web_hammer/LongPressGestureHandler.ts +1 -1
- package/src/web_hammer/NodeManager.ts +2 -11
- package/src/web_hammer/PressGestureHandler.ts +7 -4
- package/README.kepler.md +0 -167
- package/SystemBundles/e952783824abd1e014b5dbeb51072f473be8d0e06e0377bbc053b54e619e5f4f.bundle +0 -67492
- package/SystemBundles/e952783824abd1e014b5dbeb51072f473be8d0e06e0377bbc053b54e619e5f4f.map +0 -13823
- package/SystemModules/amzn__react-native-gesture-handler-2.modules.txt +0 -338
- package/SystemModules/amzn__react-native-gesture-handler-2.private.modules.txt +0 -95
- package/THIRD_PARTY_NOTICES.txt +0 -24
- package/ios/Handlers/RNFlingHandler.m +0 -152
- package/ios/Handlers/RNLongPressHandler.m +0 -183
- package/ios/Handlers/RNPinchHandler.m +0 -95
- package/ios/Handlers/RNRotationHandler.m +0 -93
- package/ios/RNGestureHandlerButton.h +0 -19
- package/ios/RNGestureHandlerButton.m +0 -77
- package/ios/RNGestureHandlerButtonComponentView.mm +0 -62
- package/ios/RNGestureHandlerDirection.h +0 -8
- package/ios/RNGestureHandlerModule.h +0 -7
- package/lib/commonjs/RNGestureHandlerModule.macos.js +0 -113
- package/lib/commonjs/RNGestureHandlerModule.macos.js.map +0 -1
- package/lib/commonjs/handlers/gestures/GestureDetector.js +0 -548
- package/lib/commonjs/handlers/gestures/GestureDetector.js.map +0 -1
- package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js +0 -11
- package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js.map +0 -1
- package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js +0 -11
- package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js.map +0 -1
- package/lib/commonjs/web/tools/TouchEventManager.js +0 -126
- package/lib/commonjs/web/tools/TouchEventManager.js.map +0 -1
- package/lib/module/RNGestureHandlerModule.macos.js +0 -104
- package/lib/module/RNGestureHandlerModule.macos.js.map +0 -1
- package/lib/module/handlers/gestures/GestureDetector.js +0 -538
- package/lib/module/handlers/gestures/GestureDetector.js.map +0 -1
- package/lib/module/specs/RNGestureHandlerButtonNativeComponent.js +0 -4
- package/lib/module/specs/RNGestureHandlerButtonNativeComponent.js.map +0 -1
- package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.js +0 -4
- package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.js.map +0 -1
- package/lib/module/web/tools/TouchEventManager.js +0 -118
- package/lib/module/web/tools/TouchEventManager.js.map +0 -1
- package/lib/typescript/RNGestureHandlerModule.macos.d.ts +0 -47
- package/lib/typescript/handlers/gestures/GestureDetector.d.ts +0 -19
- package/lib/typescript/web/tools/TouchEventManager.d.ts +0 -6
- package/src/RNGestureHandlerModule.macos.ts +0 -133
- package/src/handlers/gestures/GestureDetector.tsx +0 -818
- package/src/web/tools/TouchEventManager.ts +0 -167
- /package/android/{src/fabric → fabric/src/main}/java/com/swmansion/gesturehandler/RNGestureHandlerComponentsRegistry.java +0 -0
- /package/android/{common → noreanimated}/src/main/java/com/swmansion/common/GestureHandlerStateManager.kt +0 -0
- /package/{ios → apple}/Handlers/RNForceTouchHandler.h +0 -0
- /package/{ios → apple}/Handlers/RNHoverHandler.h +0 -0
- /package/{ios → apple}/Handlers/RNLongPressHandler.h +0 -0
- /package/{ios → apple}/Handlers/RNManualHandler.h +0 -0
- /package/{ios → apple}/Handlers/RNNativeViewHandler.h +0 -0
- /package/{ios → apple}/Handlers/RNPanHandler.h +0 -0
- /package/{ios → apple}/Handlers/RNPinchHandler.h +0 -0
- /package/{ios → apple}/Handlers/RNRotationHandler.h +0 -0
- /package/{ios → apple}/Handlers/RNTapHandler.h +0 -0
- /package/{ios → apple}/RNGHTouchEventType.h +0 -0
- /package/{ios → apple}/RNGestureHandler.xcodeproj/project.pbxproj +0 -0
- /package/{ios → apple}/RNGestureHandler.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -0
- /package/{ios → apple}/RNGestureHandlerActionType.h +0 -0
- /package/{ios → apple}/RNGestureHandlerButtonManager.h +0 -0
- /package/{ios → apple}/RNGestureHandlerRootViewComponentView.mm +0 -0
- /package/{ios → apple}/RNGestureHandlerState.h +0 -0
- /package/{ios → apple}/RNGestureHandlerStateManager.h +0 -0
- /package/{ios → apple}/RNRootViewGestureRecognizer.h +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Component","invariant","Animated","StyleSheet","View","Keyboard","StatusBar","I18nManager","PanGestureHandler","TapGestureHandler","State","DRAG_TOSS","IDLE","DRAGGING","SETTLING","DrawerLayout","constructor","props","_defineProperty","createRef","state","drawerPosition","drawerWidth","drawerType","dragX","dragXValue","touchX","touchXValue","drawerTranslation","containerWidth","multiply","Value","add","setValue","translationX","startPositionX","dragOffsetFromOnStartPosition","interpolate","inputRange","outputRange","openValue","extrapolate","gestureOptions","useNativeDriver","useNativeAnimations","onDrawerSlide","listener","ev","_this$props$onDrawerS","_this$props","Math","floor","abs","nativeEvent","position","call","onGestureEvent","event","x","setState","layout","width","newState","drawerWillShow","_this$props$onDrawerS2","_this$props2","onDrawerStateChanged","oldState","ACTIVE","handleRelease","emitStateChanged","drawerState","keyboardDismissMode","dismiss","hideStatusBar","setHidden","statusBarAnimation","drawerShown","drawerLockMode","closeDrawer","velocityX","gestureStartX","dragOffsetBasedOnStart","startOffsetX","projOffsetX","shouldOpen","animateDrawer","showing","_this$accessibilityIs","_this$pointerEventsVi","_this$panGestureHandl","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","_this$props$onDrawerO","_this$props3","onDrawerOpen","_this$props$onDrawerC","_this$props4","onDrawerClose","options","forceUpdate","overlayOpacity","dynamicOverlayStyles","opacity","backgroundColor","overlayColor","createElement","onHandlerStateChange","onTapHandlerStateChange","ref","style","styles","overlay","drawerBackgroundColor","drawerContainerStyle","contentContainerStyle","drawerSlide","containerSlide","reverseContentDirection","isRTL","dynamicDrawerStyles","containerStyles","containerTranslateX","transform","translateX","drawerTranslateX","closedDrawerOffset","drawerStyles","flexDirection","main","onLayout","handleContainerLayout","containerOnBack","containerInFront","importantForAccessibility","children","renderOverlay","drawerContainer","renderNavigationView","_this$props$onGesture","_this$props5","onGestureRef","updateAnimatedEvent","shouldComponentUpdate","render","userSelect","activeCursor","setPanGestureRef","failOffsetY","openingHandlerStateChange","enableTrackpadTwoFingerGesture","enabled","renderDrawer","Left","Right","create","absoluteFillObject","zIndex","flex","overflow"],"sources":["DrawerLayout.tsx"],"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} from '../handlers/gestureHandlerCommon';\nimport {\n PanGestureHandler,\n PanGestureHandlerEventPayload,\n} from '../handlers/PanGestureHandler';\nimport {\n TapGestureHandler,\n TapGestureHandlerEventPayload,\n} 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\nexport type DrawerPosition = 'left' | 'right';\n\nexport type DrawerState = 'Idle' | 'Dragging' | 'Settling';\n\nexport type DrawerType = 'front' | 'back' | 'slide';\n\nexport type DrawerLockMode = 'unlocked' | 'locked-closed' | 'locked-open';\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']>;\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\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\nexport type DrawerMovementOption = {\n velocity?: number;\n speed?: number;\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 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"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,O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KAAK,EAAE;AACT,CAAC;AAsdH,MAAM3C,MAAM,GAAGxI,UAAU,CAACoL,MAAM,CAAC;EAC/BlB,eAAe,EAAE;IACf,GAAGlK,UAAU,CAACqL,kBAAkB;IAChCC,MAAM,EAAE,IAAI;IACZ7B,aAAa,EAAE;EACjB,CAAC;EACDK,gBAAgB,EAAE;IAChB,GAAG9J,UAAU,CAACqL,kBAAkB;IAChCC,MAAM,EAAE;EACV,CAAC;EACDzB,eAAe,EAAE;IACf,GAAG7J,UAAU,CAACqL;EAChB,CAAC;EACD3B,IAAI,EAAE;IACJ6B,IAAI,EAAE,CAAC;IACPD,MAAM,EAAE,CAAC;IACTE,QAAQ,EAAE;EACZ,CAAC;EACD/C,OAAO,EAAE;IACP,GAAGzI,UAAU,CAACqL,kBAAkB;IAChCC,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","Component","invariant","Animated","StyleSheet","View","Keyboard","StatusBar","I18nManager","PanGestureHandler","TapGestureHandler","State","jsx","_jsx","jsxs","_jsxs","DRAG_TOSS","IDLE","DRAGGING","SETTLING","DrawerLayout","defaultProps","drawerWidth","drawerPosition","useNativeAnimations","drawerType","edgeWidth","minSwipeDistance","overlayColor","drawerLockMode","enableTrackpadTwoFingerGesture","constructor","props","dragX","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","ACTIVE","handleRelease","keyboardDismissMode","dismiss","hideStatusBar","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","overlayOpacity","dynamicOverlayStyles","opacity","backgroundColor","onHandlerStateChange","children","ref","style","styles","overlay","renderDrawer","drawerBackgroundColor","drawerContainerStyle","contentContainerStyle","drawerSlide","containerSlide","reverseContentDirection","isRTL","dynamicDrawerStyles","containerStyles","containerTranslateX","transform","translateX","drawerTranslateX","closedDrawerOffset","drawerStyles","flexDirection","main","onLayout","containerOnBack","containerInFront","importantForAccessibility","drawerContainer","renderNavigationView","setPanGestureRef","onGestureRef","render","userSelect","activeCursor","mouseButton","enableContextMenu","failOffsetY","enabled","create","absoluteFillObject","zIndex","flex","overflow"],"sourceRoot":"../../../src","sources":["components/DrawerLayout.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,SAAS,QAAQ,OAAO;AACjC,OAAOC,SAAS,MAAM,WAAW;AACjC,SACEC,QAAQ,EACRC,UAAU,EACVC,IAAI,EACJC,QAAQ,EACRC,SAAS,EACTC,WAAW,QAMN,cAAc;AASrB,SAASC,iBAAiB,QAAQ,+BAA+B;AAKjE,SAASC,iBAAiB,QAAQ,+BAA+B;AACjE,SAASC,KAAK,QAAQ,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEjC,MAAMC,SAAS,GAAG,IAAI;AAEtB,MAAMC,IAAiB,GAAG,MAAM;AAChC,MAAMC,QAAqB,GAAG,UAAU;AACxC,MAAMC,QAAqB,GAAG,UAAU;;AAExC;AAC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I,CAACrD,yBAA0B;MACrDvD,8BAA8B,EAC5B,IAAI,CAACE,KAAK,CAACF,8BACZ;MACDkJ,OAAO,EACLnJ,cAAc,KAAK,eAAe,IAAIA,cAAc,KAAK,aAC1D;MAAA8G,QAAA,EACA,IAAI,CAACK,YAAY,CAAC;IAAC,CACH,CAAC;EAExB;AACF;AAEA,MAAMF,MAAM,GAAG1I,UAAU,CAAC6K,MAAM,CAAC;EAC/BX,eAAe,EAAE;IACf,GAAGlK,UAAU,CAAC8K,kBAAkB;IAChCC,MAAM,EAAE,IAAI;IACZnB,aAAa,EAAE;EACjB,CAAC;EACDI,gBAAgB,EAAE;IAChB,GAAGhK,UAAU,CAAC8K,kBAAkB;IAChCC,MAAM,EAAE;EACV,CAAC;EACDhB,eAAe,EAAE;IACf,GAAG/J,UAAU,CAAC8K;EAChB,CAAC;EACDjB,IAAI,EAAE;IACJmB,IAAI,EAAE,CAAC;IACPD,MAAM,EAAE,CAAC;IACTE,QAAQ,EAAE;EACZ,CAAC;EACDtC,OAAO,EAAE;IACP,GAAG3I,UAAU,CAAC8K,kBAAkB;IAChCC,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,97 +1,110 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
4
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
5
3
|
import * as React from 'react';
|
|
6
4
|
import { Animated, Platform, processColor, StyleSheet } from 'react-native';
|
|
7
5
|
import createNativeWrapper from '../handlers/createNativeWrapper';
|
|
8
6
|
import GestureHandlerButton from './GestureHandlerButton';
|
|
9
7
|
import { State } from '../State';
|
|
8
|
+
import { isFabric } from '../utils';
|
|
9
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
10
|
export const RawButton = createNativeWrapper(GestureHandlerButton, {
|
|
11
|
-
// @ts-ignore
|
|
11
|
+
// @ts-ignore
|
|
12
12
|
shouldCancelWhenOutside: Platform.OS === 'kepler',
|
|
13
13
|
shouldActivateOnStart: false
|
|
14
14
|
});
|
|
15
|
-
|
|
15
|
+
let IS_FABRIC = null;
|
|
16
|
+
class InnerBaseButton extends React.Component {
|
|
17
|
+
static defaultProps = {
|
|
18
|
+
delayLongPress: 600
|
|
19
|
+
};
|
|
16
20
|
constructor(props) {
|
|
17
21
|
super(props);
|
|
18
|
-
_defineProperty(this, "lastActive", void 0);
|
|
19
|
-
_defineProperty(this, "longPressTimeout", void 0);
|
|
20
|
-
_defineProperty(this, "longPressDetected", void 0);
|
|
21
|
-
_defineProperty(this, "handleEvent", ({
|
|
22
|
-
nativeEvent
|
|
23
|
-
}) => {
|
|
24
|
-
const {
|
|
25
|
-
state,
|
|
26
|
-
oldState,
|
|
27
|
-
pointerInside
|
|
28
|
-
} = nativeEvent;
|
|
29
|
-
const active = pointerInside && state === State.ACTIVE;
|
|
30
|
-
if (active !== this.lastActive && this.props.onActiveStateChange) {
|
|
31
|
-
this.props.onActiveStateChange(active);
|
|
32
|
-
}
|
|
33
|
-
if (!this.longPressDetected && oldState === State.ACTIVE && state !== State.CANCELLED && state !== State.FAILED && this.lastActive && this.props.onPress) {
|
|
34
|
-
this.props.onPress(active);
|
|
35
|
-
}
|
|
36
|
-
if (!this.lastActive &&
|
|
37
|
-
// NativeViewGestureHandler sends different events based on platform
|
|
38
|
-
state === (Platform.OS !== 'android' ? State.ACTIVE : State.BEGAN) && pointerInside) {
|
|
39
|
-
this.longPressDetected = false;
|
|
40
|
-
if (this.props.onLongPress) {
|
|
41
|
-
this.longPressTimeout = setTimeout(this.onLongPress, this.props.delayLongPress);
|
|
42
|
-
}
|
|
43
|
-
} else if (
|
|
44
|
-
// cancel longpress timeout if it's set and the finger moved out of the view
|
|
45
|
-
state === State.ACTIVE && !pointerInside && this.longPressTimeout !== undefined) {
|
|
46
|
-
clearTimeout(this.longPressTimeout);
|
|
47
|
-
this.longPressTimeout = undefined;
|
|
48
|
-
} else if (
|
|
49
|
-
// cancel longpress timeout if it's set and the gesture has finished
|
|
50
|
-
this.longPressTimeout !== undefined && (state === State.END || state === State.CANCELLED || state === State.FAILED)) {
|
|
51
|
-
clearTimeout(this.longPressTimeout);
|
|
52
|
-
this.longPressTimeout = undefined;
|
|
53
|
-
}
|
|
54
|
-
this.lastActive = active;
|
|
55
|
-
});
|
|
56
|
-
_defineProperty(this, "onLongPress", () => {
|
|
57
|
-
var _this$props$onLongPre, _this$props;
|
|
58
|
-
this.longPressDetected = true;
|
|
59
|
-
(_this$props$onLongPre = (_this$props = this.props).onLongPress) === null || _this$props$onLongPre === void 0 || _this$props$onLongPre.call(_this$props);
|
|
60
|
-
});
|
|
61
|
-
// Normally, the parent would execute it's handler first, then forward the
|
|
62
|
-
// event to listeners. However, here our handler is virtually only forwarding
|
|
63
|
-
// events to listeners, so we reverse the order to keep the proper order of
|
|
64
|
-
// the callbacks (from "raw" ones to "processed").
|
|
65
|
-
_defineProperty(this, "onHandlerStateChange", e => {
|
|
66
|
-
var _this$props$onHandler, _this$props2;
|
|
67
|
-
(_this$props$onHandler = (_this$props2 = this.props).onHandlerStateChange) === null || _this$props$onHandler === void 0 || _this$props$onHandler.call(_this$props2, e);
|
|
68
|
-
this.handleEvent(e);
|
|
69
|
-
});
|
|
70
|
-
_defineProperty(this, "onGestureEvent", e => {
|
|
71
|
-
var _this$props$onGesture, _this$props3;
|
|
72
|
-
(_this$props$onGesture = (_this$props3 = this.props).onGestureEvent) === null || _this$props$onGesture === void 0 || _this$props$onGesture.call(_this$props3, e);
|
|
73
|
-
this.handleEvent(e); // TODO: maybe it is not correct
|
|
74
|
-
});
|
|
75
22
|
this.lastActive = false;
|
|
76
23
|
this.longPressDetected = false;
|
|
77
24
|
}
|
|
25
|
+
handleEvent = ({
|
|
26
|
+
nativeEvent
|
|
27
|
+
}) => {
|
|
28
|
+
const {
|
|
29
|
+
state,
|
|
30
|
+
oldState,
|
|
31
|
+
pointerInside
|
|
32
|
+
} = nativeEvent;
|
|
33
|
+
const active = pointerInside && state === State.ACTIVE;
|
|
34
|
+
if (active !== this.lastActive && this.props.onActiveStateChange) {
|
|
35
|
+
this.props.onActiveStateChange(active);
|
|
36
|
+
}
|
|
37
|
+
if (!this.longPressDetected && oldState === State.ACTIVE && state !== State.CANCELLED && state !== State.FAILED && this.lastActive && this.props.onPress) {
|
|
38
|
+
this.props.onPress(pointerInside);
|
|
39
|
+
}
|
|
40
|
+
if (!this.lastActive &&
|
|
41
|
+
// NativeViewGestureHandler sends different events based on platform
|
|
42
|
+
state === (Platform.OS !== 'android' ? State.ACTIVE : State.BEGAN) && pointerInside) {
|
|
43
|
+
this.longPressDetected = false;
|
|
44
|
+
if (this.props.onLongPress) {
|
|
45
|
+
this.longPressTimeout = setTimeout(this.onLongPress, this.props.delayLongPress);
|
|
46
|
+
}
|
|
47
|
+
} else if (
|
|
48
|
+
// Cancel longpress timeout if it's set and the finger moved out of the view
|
|
49
|
+
state === State.ACTIVE && !pointerInside && this.longPressTimeout !== undefined) {
|
|
50
|
+
clearTimeout(this.longPressTimeout);
|
|
51
|
+
this.longPressTimeout = undefined;
|
|
52
|
+
} else if (
|
|
53
|
+
// Cancel longpress timeout if it's set and the gesture has finished
|
|
54
|
+
this.longPressTimeout !== undefined && (state === State.END || state === State.CANCELLED || state === State.FAILED)) {
|
|
55
|
+
clearTimeout(this.longPressTimeout);
|
|
56
|
+
this.longPressTimeout = undefined;
|
|
57
|
+
}
|
|
58
|
+
this.lastActive = active;
|
|
59
|
+
};
|
|
60
|
+
onLongPress = () => {
|
|
61
|
+
this.longPressDetected = true;
|
|
62
|
+
this.props.onLongPress?.();
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
// Normally, the parent would execute it's handler first, then forward the
|
|
66
|
+
// event to listeners. However, here our handler is virtually only forwarding
|
|
67
|
+
// events to listeners, so we reverse the order to keep the proper order of
|
|
68
|
+
// the callbacks (from "raw" ones to "processed").
|
|
69
|
+
onHandlerStateChange = e => {
|
|
70
|
+
this.props.onHandlerStateChange?.(e);
|
|
71
|
+
this.handleEvent(e);
|
|
72
|
+
};
|
|
73
|
+
onGestureEvent = e => {
|
|
74
|
+
this.props.onGestureEvent?.(e);
|
|
75
|
+
this.handleEvent(e); // TODO: maybe it is not correct
|
|
76
|
+
};
|
|
78
77
|
render() {
|
|
79
78
|
const {
|
|
80
|
-
rippleColor,
|
|
79
|
+
rippleColor: unprocessedRippleColor,
|
|
80
|
+
style,
|
|
81
81
|
...rest
|
|
82
82
|
} = this.props;
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
83
|
+
if (IS_FABRIC === null) {
|
|
84
|
+
IS_FABRIC = isFabric();
|
|
85
|
+
}
|
|
86
|
+
const rippleColor = IS_FABRIC ? unprocessedRippleColor : processColor(unprocessedRippleColor ?? undefined);
|
|
87
|
+
return /*#__PURE__*/_jsx(RawButton, {
|
|
88
|
+
ref: this.props.innerRef,
|
|
89
|
+
rippleColor: rippleColor,
|
|
90
|
+
style: [style, Platform.OS === 'ios' && {
|
|
91
|
+
cursor: undefined
|
|
92
|
+
}],
|
|
93
|
+
...rest,
|
|
86
94
|
onGestureEvent: this.onGestureEvent,
|
|
87
95
|
onHandlerStateChange: this.onHandlerStateChange
|
|
88
|
-
})
|
|
96
|
+
});
|
|
89
97
|
}
|
|
90
98
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
99
|
+
const AnimatedInnerBaseButton = Animated.createAnimatedComponent(InnerBaseButton);
|
|
100
|
+
export const BaseButton = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/_jsx(InnerBaseButton, {
|
|
101
|
+
innerRef: ref,
|
|
102
|
+
...props
|
|
103
|
+
}));
|
|
104
|
+
const AnimatedBaseButton = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/_jsx(AnimatedInnerBaseButton, {
|
|
105
|
+
innerRef: ref,
|
|
106
|
+
...props
|
|
107
|
+
}));
|
|
95
108
|
const btnStyles = StyleSheet.create({
|
|
96
109
|
underlay: {
|
|
97
110
|
position: 'absolute',
|
|
@@ -101,76 +114,87 @@ const btnStyles = StyleSheet.create({
|
|
|
101
114
|
top: 0
|
|
102
115
|
}
|
|
103
116
|
});
|
|
104
|
-
|
|
117
|
+
class InnerRectButton extends React.Component {
|
|
118
|
+
static defaultProps = {
|
|
119
|
+
activeOpacity: 0.105,
|
|
120
|
+
underlayColor: 'black'
|
|
121
|
+
};
|
|
105
122
|
constructor(props) {
|
|
106
123
|
super(props);
|
|
107
|
-
_defineProperty(this, "opacity", void 0);
|
|
108
|
-
_defineProperty(this, "onActiveStateChange", active => {
|
|
109
|
-
var _this$props$onActiveS, _this$props4;
|
|
110
|
-
if (Platform.OS !== 'android') {
|
|
111
|
-
this.opacity.setValue(active ? this.props.activeOpacity : 0);
|
|
112
|
-
}
|
|
113
|
-
(_this$props$onActiveS = (_this$props4 = this.props).onActiveStateChange) === null || _this$props$onActiveS === void 0 || _this$props$onActiveS.call(_this$props4, active);
|
|
114
|
-
});
|
|
115
124
|
this.opacity = new Animated.Value(0);
|
|
116
125
|
}
|
|
126
|
+
onActiveStateChange = active => {
|
|
127
|
+
if (Platform.OS !== 'android') {
|
|
128
|
+
this.opacity.setValue(active ? this.props.activeOpacity : 0);
|
|
129
|
+
}
|
|
130
|
+
this.props.onActiveStateChange?.(active);
|
|
131
|
+
};
|
|
117
132
|
render() {
|
|
118
133
|
const {
|
|
119
134
|
children,
|
|
120
135
|
style,
|
|
121
136
|
...rest
|
|
122
137
|
} = this.props;
|
|
123
|
-
const resolvedStyle = StyleSheet.flatten(style
|
|
124
|
-
return /*#__PURE__*/
|
|
138
|
+
const resolvedStyle = StyleSheet.flatten(style) ?? {};
|
|
139
|
+
return /*#__PURE__*/_jsxs(BaseButton, {
|
|
140
|
+
...rest,
|
|
141
|
+
ref: this.props.innerRef,
|
|
125
142
|
style: resolvedStyle,
|
|
126
|
-
onActiveStateChange: this.onActiveStateChange
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
143
|
+
onActiveStateChange: this.onActiveStateChange,
|
|
144
|
+
children: [/*#__PURE__*/_jsx(Animated.View, {
|
|
145
|
+
style: [btnStyles.underlay, {
|
|
146
|
+
opacity: this.opacity,
|
|
147
|
+
backgroundColor: this.props.underlayColor,
|
|
148
|
+
borderRadius: resolvedStyle.borderRadius,
|
|
149
|
+
borderTopLeftRadius: resolvedStyle.borderTopLeftRadius,
|
|
150
|
+
borderTopRightRadius: resolvedStyle.borderTopRightRadius,
|
|
151
|
+
borderBottomLeftRadius: resolvedStyle.borderBottomLeftRadius,
|
|
152
|
+
borderBottomRightRadius: resolvedStyle.borderBottomRightRadius
|
|
153
|
+
}]
|
|
154
|
+
}), children]
|
|
155
|
+
});
|
|
138
156
|
}
|
|
139
157
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
});
|
|
144
|
-
|
|
158
|
+
export const RectButton = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/_jsx(InnerRectButton, {
|
|
159
|
+
innerRef: ref,
|
|
160
|
+
...props
|
|
161
|
+
}));
|
|
162
|
+
class InnerBorderlessButton extends React.Component {
|
|
163
|
+
static defaultProps = {
|
|
164
|
+
activeOpacity: 0.3,
|
|
165
|
+
borderless: true
|
|
166
|
+
};
|
|
145
167
|
constructor(props) {
|
|
146
168
|
super(props);
|
|
147
|
-
_defineProperty(this, "opacity", void 0);
|
|
148
|
-
_defineProperty(this, "onActiveStateChange", active => {
|
|
149
|
-
var _this$props$onActiveS2, _this$props5;
|
|
150
|
-
if (Platform.OS !== 'android') {
|
|
151
|
-
this.opacity.setValue(active ? this.props.activeOpacity : 1);
|
|
152
|
-
}
|
|
153
|
-
(_this$props$onActiveS2 = (_this$props5 = this.props).onActiveStateChange) === null || _this$props$onActiveS2 === void 0 || _this$props$onActiveS2.call(_this$props5, active);
|
|
154
|
-
});
|
|
155
169
|
this.opacity = new Animated.Value(1);
|
|
156
170
|
}
|
|
171
|
+
onActiveStateChange = active => {
|
|
172
|
+
if (Platform.OS !== 'android') {
|
|
173
|
+
this.opacity.setValue(active ? this.props.activeOpacity : 1);
|
|
174
|
+
}
|
|
175
|
+
this.props.onActiveStateChange?.(active);
|
|
176
|
+
};
|
|
157
177
|
render() {
|
|
158
178
|
const {
|
|
159
179
|
children,
|
|
160
180
|
style,
|
|
181
|
+
innerRef,
|
|
161
182
|
...rest
|
|
162
183
|
} = this.props;
|
|
163
|
-
return /*#__PURE__*/
|
|
184
|
+
return /*#__PURE__*/_jsx(AnimatedBaseButton, {
|
|
185
|
+
...rest,
|
|
186
|
+
innerRef: innerRef,
|
|
164
187
|
onActiveStateChange: this.onActiveStateChange,
|
|
165
188
|
style: [style, Platform.OS === 'ios' && {
|
|
166
189
|
opacity: this.opacity
|
|
167
|
-
}]
|
|
168
|
-
|
|
190
|
+
}],
|
|
191
|
+
children: children
|
|
192
|
+
});
|
|
169
193
|
}
|
|
170
194
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
});
|
|
195
|
+
export const BorderlessButton = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/_jsx(InnerBorderlessButton, {
|
|
196
|
+
innerRef: ref,
|
|
197
|
+
...props
|
|
198
|
+
}));
|
|
175
199
|
export { default as PureNativeButton } from './GestureHandlerButton';
|
|
176
200
|
//# sourceMappingURL=GestureButtons.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Animated","Platform","processColor","StyleSheet","createNativeWrapper","GestureHandlerButton","State","RawButton","shouldCancelWhenOutside","OS","shouldActivateOnStart","BaseButton","Component","constructor","props","_defineProperty","nativeEvent","state","oldState","pointerInside","active","ACTIVE","lastActive","onActiveStateChange","longPressDetected","CANCELLED","FAILED","onPress","BEGAN","onLongPress","longPressTimeout","setTimeout","delayLongPress","undefined","clearTimeout","END","_this$props$onLongPre","_this$props","call","e","_this$props$onHandler","_this$props2","onHandlerStateChange","handleEvent","_this$props$onGesture","_this$props3","onGestureEvent","render","rippleColor","rest","createElement","_extends","AnimatedBaseButton","createAnimatedComponent","btnStyles","create","underlay","position","left","right","bottom","top","RectButton","_this$props$onActiveS","_this$props4","opacity","setValue","activeOpacity","Value","children","style","resolvedStyle","flatten","View","backgroundColor","underlayColor","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","BorderlessButton","_this$props$onActiveS2","_this$props5","borderless","default","PureNativeButton"],"sources":["GestureButtons.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n Animated,\n Platform,\n processColor,\n StyleSheet,\n StyleProp,\n ViewStyle,\n} 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 {\n NativeViewGestureHandlerPayload,\n NativeViewGestureHandlerProps,\n} from '../handlers/NativeViewGestureHandler';\n\nexport interface RawButtonProps extends NativeViewGestureHandlerProps {\n /**\n * Defines if more than one button could be pressed simultaneously. By default\n * set true.\n */\n exclusive?: boolean;\n // TODO: we should transform props in `createNativeWrapper`\n\n /**\n * Android only.\n *\n * Defines color of native ripple animation used since API level 21.\n */\n rippleColor?: any; // it was present in BaseButtonProps before but is used here in code\n\n /**\n * Android only.\n *\n * Defines radius of native ripple animation used since API level 21.\n */\n rippleRadius?: number | null;\n\n /**\n * Android only.\n *\n * Set this to true if you want the ripple animation to render outside the view bounds.\n */\n borderless?: boolean;\n\n /**\n * Android only.\n *\n * Defines whether the ripple animation should be drawn on the foreground of the view.\n */\n foreground?: boolean;\n\n /**\n * Android only.\n *\n * Set this to true if you don't want the system to play sound when the button is pressed.\n */\n touchSoundDisabled?: boolean;\n}\n\nexport interface BaseButtonProps extends RawButtonProps {\n /**\n * Called when the button gets pressed (analogous to `onPress` in\n * `TouchableHighlight` from RN core).\n */\n onPress?: (pointerInside: boolean) => void;\n\n /**\n * Called when the button gets pressed and is held for `delayLongPress`\n * milliseconds.\n */\n onLongPress?: () => void;\n\n /**\n * Called when button changes from inactive to active and vice versa. It\n * passes active state as a boolean variable as a first parameter for that\n * method.\n */\n onActiveStateChange?: (active: boolean) => void;\n style?: StyleProp<ViewStyle>;\n testID?: string;\n\n /**\n * Delay, in milliseconds, after which the `onLongPress` callback gets called.\n * Defaults to 600.\n */\n delayLongPress?: number;\n}\n\nexport interface RectButtonProps extends BaseButtonProps {\n /**\n * Background color that will be dimmed when button is in active state.\n */\n underlayColor?: string;\n\n /**\n * iOS only.\n *\n * Opacity applied to the underlay when button is in active state.\n */\n activeOpacity?: number;\n}\n\nexport interface BorderlessButtonProps extends BaseButtonProps {\n /**\n * iOS only.\n *\n * Opacity applied to the button when it is in an active state.\n */\n activeOpacity?: number;\n}\n\nexport const RawButton = createNativeWrapper(GestureHandlerButton, {\n // @ts-ignore types not correct?\n shouldCancelWhenOutside: Platform.OS === 'kepler',\n shouldActivateOnStart: false,\n});\n\nexport class BaseButton extends React.Component<BaseButtonProps> {\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: BaseButtonProps) {\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 state !== State.FAILED &&\n this.lastActive &&\n this.props.onPress\n ) {\n this.props.onPress(active);\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, ...rest } = this.props;\n\n return (\n <RawButton\n rippleColor={processColor(rippleColor)}\n {...rest}\n onGestureEvent={this.onGestureEvent}\n onHandlerStateChange={this.onHandlerStateChange}\n />\n );\n }\n}\n\nconst AnimatedBaseButton = Animated.createAnimatedComponent(BaseButton);\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\nexport class RectButton extends React.Component<RectButtonProps> {\n static defaultProps = {\n activeOpacity: 0.105,\n underlayColor: 'black',\n };\n\n private opacity: Animated.Value;\n\n constructor(props: RectButtonProps) {\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 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 class BorderlessButton extends React.Component<BorderlessButtonProps> {\n static defaultProps = {\n activeOpacity: 0.3,\n borderless: true,\n };\n\n private opacity: Animated.Value;\n\n constructor(props: BorderlessButtonProps) {\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, ...rest } = this.props;\n\n return (\n <AnimatedBaseButton\n {...rest}\n onActiveStateChange={this.onActiveStateChange}\n style={[style, Platform.OS === 'ios' && { opacity: this.opacity }]}>\n {children}\n </AnimatedBaseButton>\n );\n }\n}\n\nexport { default as PureNativeButton } from './GestureHandlerButton';\n"],"mappings":";;;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SACEC,QAAQ,EACRC,QAAQ,EACRC,YAAY,EACZC,UAAU,QAGL,cAAc;AAErB,OAAOC,mBAAmB,MAAM,iCAAiC;AACjE,OAAOC,oBAAoB,MAAM,wBAAwB;AACzD,SAASC,KAAK,QAAQ,UAAU;AA2GhC,OAAO,MAAMC,SAAS,GAAGH,mBAAmB,CAACC,oBAAoB,EAAE;EACjE;EACAG,uBAAuB,EAAEP,QAAQ,CAACQ,EAAE,KAAK,QAAQ;EACjDC,qBAAqB,EAAE;AACzB,CAAC,CAAC;AAEF,OAAO,MAAMC,UAAU,SAASZ,KAAK,CAACa,SAAS,CAAkB;EAS/DC,WAAWA,CAACC,KAAsB,EAAE;IAClC,KAAK,CAACA,KAAK,CAAC;IAACC,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,sBAKO,CAAC;MACrBC;IACwD,CAAC,KAAK;MAC9D,MAAM;QAAEC,KAAK;QAAEC,QAAQ;QAAEC;MAAc,CAAC,GAAGH,WAAW;MACtD,MAAMI,MAAM,GAAGD,aAAa,IAAIF,KAAK,KAAKX,KAAK,CAACe,MAAM;MAEtD,IAAID,MAAM,KAAK,IAAI,CAACE,UAAU,IAAI,IAAI,CAACR,KAAK,CAACS,mBAAmB,EAAE;QAChE,IAAI,CAACT,KAAK,CAACS,mBAAmB,CAACH,MAAM,CAAC;MACxC;MAEA,IACE,CAAC,IAAI,CAACI,iBAAiB,IACvBN,QAAQ,KAAKZ,KAAK,CAACe,MAAM,IACzBJ,KAAK,KAAKX,KAAK,CAACmB,SAAS,IACzBR,KAAK,KAAKX,KAAK,CAACoB,MAAM,IACtB,IAAI,CAACJ,UAAU,IACf,IAAI,CAACR,KAAK,CAAC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KACbF,IAAI;MACR1B,mBAAmB,EAAE,IAAI,CAACA,mBAAoB;MAC9C+C,KAAK,EAAE,CAACA,KAAK,EAAErE,QAAQ,CAACQ,EAAE,KAAK,KAAK,IAAI;QAAEwD,OAAO,EAAE,IAAI,CAACA;MAAQ,CAAC;IAAE,IAClEI,QACiB,CAAC;EAEzB;AACF;AAACtD,eAAA,CAjCYkE,gBAAgB,kBACL;EACpBd,aAAa,EAAE,GAAG;EAClBiB,UAAU,EAAE;AACd,CAAC;AA+BH,SAASC,OAAO,IAAIC,gBAAgB,QAAQ,wBAAwB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","Animated","Platform","processColor","StyleSheet","createNativeWrapper","GestureHandlerButton","State","isFabric","jsx","_jsx","jsxs","_jsxs","RawButton","shouldCancelWhenOutside","OS","shouldActivateOnStart","IS_FABRIC","InnerBaseButton","Component","defaultProps","delayLongPress","constructor","props","lastActive","longPressDetected","handleEvent","nativeEvent","state","oldState","pointerInside","active","ACTIVE","onActiveStateChange","CANCELLED","FAILED","onPress","BEGAN","onLongPress","longPressTimeout","setTimeout","undefined","clearTimeout","END","onHandlerStateChange","e","onGestureEvent","render","rippleColor","unprocessedRippleColor","style","rest","ref","innerRef","cursor","AnimatedInnerBaseButton","createAnimatedComponent","BaseButton","forwardRef","AnimatedBaseButton","btnStyles","create","underlay","position","left","right","bottom","top","InnerRectButton","activeOpacity","underlayColor","opacity","Value","setValue","children","resolvedStyle","flatten","View","backgroundColor","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","RectButton","InnerBorderlessButton","borderless","BorderlessButton","default","PureNativeButton"],"sourceRoot":"../../../src","sources":["components/GestureButtons.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,YAAY,EAAEC,UAAU,QAAQ,cAAc;AAE3E,OAAOC,mBAAmB,MAAM,iCAAiC;AACjE,OAAOC,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MAAE2B,QAAQ;MAAExB,KAAK;MAAEG,QAAQ;MAAE,GAAGF;IAAK,CAAC,GAAG,IAAI,CAAC5B,KAAK;IAEzD,oBACEb,IAAA,CAACiD,kBAAkB;MAAA,GACbR,IAAI;MACRE,QAAQ,EAAEA,QAAS;MACnBpB,mBAAmB,EAAE,IAAI,CAACA,mBAAoB;MAC9CiB,KAAK,EAAE,CAACA,KAAK,EAAEhD,QAAQ,CAACa,EAAE,KAAK,KAAK,IAAI;QAAEwD,OAAO,EAAE,IAAI,CAACA;MAAQ,CAAC,CAAE;MAAAG,QAAA,EAClEA;IAAQ,CACS,CAAC;EAEzB;AACF;AAEA,OAAO,MAAMa,gBAAgB,gBAAGvF,KAAK,CAAC0D,UAAU,CAG9C,CAACnC,KAAK,EAAE6B,GAAG,kBAAK1C,IAAA,CAAC2E,qBAAqB;EAAChC,QAAQ,EAAED,GAAI;EAAA,GAAK7B;AAAK,CAAG,CAAC,CAAC;AAEtE,SAASiE,OAAO,IAAIC,gBAAgB,QAAQ,wBAAwB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["components/GestureButtonsProps.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
2
3
|
import * as React from 'react';
|
|
3
4
|
import { ScrollView as RNScrollView, Switch as RNSwitch, TextInput as RNTextInput, DrawerLayoutAndroid as RNDrawerLayoutAndroid, FlatList as RNFlatList, RefreshControl as RNRefreshControl } from 'react-native';
|
|
4
5
|
import createNativeWrapper from '../handlers/createNativeWrapper';
|
|
5
6
|
import { nativeViewProps } from '../handlers/NativeViewGestureHandler';
|
|
6
7
|
import { toArray } from '../utils';
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
9
|
export const RefreshControl = createNativeWrapper(RNRefreshControl, {
|
|
8
10
|
disallowInterruption: true,
|
|
9
11
|
shouldCancelWhenOutside: false
|
|
@@ -21,19 +23,20 @@ export const ScrollView = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
21
23
|
waitFor,
|
|
22
24
|
...rest
|
|
23
25
|
} = props;
|
|
24
|
-
return /*#__PURE__*/
|
|
26
|
+
return /*#__PURE__*/_jsx(GHScrollView, {
|
|
27
|
+
...rest,
|
|
25
28
|
// @ts-ignore `ref` exists on `GHScrollView`
|
|
26
29
|
ref: ref,
|
|
27
|
-
waitFor: [...toArray(waitFor
|
|
30
|
+
waitFor: [...toArray(waitFor ?? []), refreshControlGestureRef]
|
|
28
31
|
// @ts-ignore we don't pass `refreshing` prop as we only want to override the ref
|
|
29
32
|
,
|
|
30
33
|
refreshControl: refreshControl ? /*#__PURE__*/React.cloneElement(refreshControl, {
|
|
31
34
|
// @ts-ignore for reasons unknown to me, `ref` doesn't exist on the type inferred by TS
|
|
32
35
|
ref: refreshControlGestureRef
|
|
33
36
|
}) : undefined
|
|
34
|
-
})
|
|
37
|
+
});
|
|
35
38
|
});
|
|
36
|
-
//
|
|
39
|
+
// Backward type compatibility with https://github.com/software-mansion/react-native-gesture-handler/blob/db78d3ca7d48e8ba57482d3fe9b0a15aa79d9932/react-native-gesture-handler.d.ts#L440-L457
|
|
37
40
|
// include methods of wrapped components by creating an intersection type with the RN component instead of duplicating them.
|
|
38
41
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
39
42
|
|
|
@@ -76,19 +79,21 @@ export const FlatList = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
76
79
|
return (
|
|
77
80
|
/*#__PURE__*/
|
|
78
81
|
// @ts-ignore - this function cannot have generic type so we have to ignore this error
|
|
79
|
-
|
|
80
|
-
ref: ref
|
|
81
|
-
|
|
82
|
-
renderScrollComponent: scrollProps => /*#__PURE__*/
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
_jsx(RNFlatList, {
|
|
83
|
+
ref: ref,
|
|
84
|
+
...flatListProps,
|
|
85
|
+
renderScrollComponent: scrollProps => /*#__PURE__*/_jsx(ScrollView, {
|
|
86
|
+
...scrollProps,
|
|
87
|
+
...scrollViewProps,
|
|
88
|
+
waitFor: [...toArray(waitFor ?? []), refreshControlGestureRef]
|
|
89
|
+
})
|
|
85
90
|
// @ts-ignore we don't pass `refreshing` prop as we only want to override the ref
|
|
86
91
|
,
|
|
87
92
|
refreshControl: refreshControl ? /*#__PURE__*/React.cloneElement(refreshControl, {
|
|
88
93
|
// @ts-ignore for reasons unknown to me, `ref` doesn't exist on the type inferred by TS
|
|
89
94
|
ref: refreshControlGestureRef
|
|
90
95
|
}) : undefined
|
|
91
|
-
})
|
|
96
|
+
})
|
|
92
97
|
);
|
|
93
98
|
});
|
|
94
99
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|