react-native-gesture-handler 1.10.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DrawerLayout/package.json +3 -3
- package/README.md +7 -6
- package/Swipeable/package.json +3 -3
- package/android/build.gradle +23 -1
- package/android/gradle.properties +19 -0
- package/android/lib/src/main/java/com/swmansion/gesturehandler/BaseGestureHandlerInteractionController.kt +18 -0
- package/android/lib/src/main/java/com/swmansion/gesturehandler/Extensions.kt +11 -0
- package/android/lib/src/main/java/com/swmansion/gesturehandler/FlingGestureHandler.kt +96 -0
- package/android/lib/src/main/java/com/swmansion/gesturehandler/GestureHandler.kt +710 -0
- package/android/lib/src/main/java/com/swmansion/gesturehandler/GestureHandlerInteractionController.kt +8 -0
- package/android/lib/src/main/java/com/swmansion/gesturehandler/GestureHandlerOrchestrator.kt +562 -0
- package/android/lib/src/main/java/com/swmansion/gesturehandler/GestureHandlerRegistry.kt +8 -0
- package/android/lib/src/main/java/com/swmansion/gesturehandler/GestureHandlerRegistryImpl.kt +21 -0
- package/android/lib/src/main/java/com/swmansion/gesturehandler/GestureUtils.kt +49 -0
- package/android/lib/src/main/java/com/swmansion/gesturehandler/LongPressGestureHandler.kt +97 -0
- package/android/lib/src/main/java/com/swmansion/gesturehandler/ManualGestureHandler.kt +11 -0
- package/android/lib/src/main/java/com/swmansion/gesturehandler/NativeViewGestureHandler.kt +129 -0
- package/android/lib/src/main/java/com/swmansion/gesturehandler/OnTouchEventListener.kt +9 -0
- package/android/lib/src/main/java/com/swmansion/gesturehandler/PanGestureHandler.kt +289 -0
- package/android/lib/src/main/java/com/swmansion/gesturehandler/PinchGestureHandler.kt +88 -0
- package/android/lib/src/main/java/com/swmansion/gesturehandler/{PointerEventsConfig.java → PointerEventsConfig.kt} +3 -5
- package/android/lib/src/main/java/com/swmansion/gesturehandler/RotationGestureDetector.kt +125 -0
- package/android/lib/src/main/java/com/swmansion/gesturehandler/RotationGestureHandler.kt +79 -0
- package/android/lib/src/main/java/com/swmansion/gesturehandler/TapGestureHandler.kt +167 -0
- package/android/lib/src/main/java/com/swmansion/gesturehandler/ViewConfigurationHelper.kt +10 -0
- package/android/src/main/java/com/swmansion/common/GestureHandlerStateManager.kt +5 -0
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.kt +348 -0
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEnabledRootView.kt +57 -0
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEvent.kt +59 -0
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEventDataExtractor.kt +8 -0
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerInteractionManager.kt +61 -0
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.kt +686 -0
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerPackage.kt +17 -0
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRegistry.kt +95 -0
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootHelper.kt +132 -0
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootInterface.kt +5 -0
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootView.kt +68 -0
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootViewManager.kt +34 -0
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerStateChangeEvent.kt +66 -0
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerTouchEvent.kt +69 -0
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNViewConfigurationHelper.kt +51 -0
- package/ios/Handlers/RNFlingHandler.m +78 -5
- package/ios/Handlers/RNForceTouchHandler.m +29 -4
- package/ios/Handlers/RNLongPressHandler.m +105 -3
- package/ios/Handlers/RNManualHandler.h +4 -0
- package/ios/Handlers/RNManualHandler.m +73 -0
- package/ios/Handlers/RNNativeViewHandler.m +30 -2
- package/ios/Handlers/RNPanHandler.m +64 -4
- package/ios/Handlers/RNPinchHandler.m +61 -2
- package/ios/Handlers/RNRotationHandler.m +60 -1
- package/ios/Handlers/RNTapHandler.m +55 -8
- package/ios/RNGestureHandler.h +18 -4
- package/ios/RNGestureHandler.m +123 -13
- package/ios/RNGestureHandler.xcodeproj/xcuserdata/mdk.xcuserdatad/xcschemes/RNGestureHandler.xcscheme +80 -0
- package/ios/RNGestureHandler.xcodeproj/xcuserdata/mdk.xcuserdatad/xcschemes/xcschememanagement.plist +27 -0
- package/ios/RNGestureHandlerEvents.h +9 -0
- package/ios/RNGestureHandlerEvents.m +34 -0
- package/ios/RNGestureHandlerManager.h +7 -0
- package/ios/RNGestureHandlerManager.m +62 -34
- package/ios/RNGestureHandlerModule.m +39 -3
- package/ios/RNGestureHandlerPointerTracker.h +25 -0
- package/ios/RNGestureHandlerPointerTracker.m +237 -0
- package/ios/RNGestureHandlerRegistry.h +1 -0
- package/ios/RNGestureHandlerRegistry.m +10 -0
- package/ios/RNGestureHandlerStateManager.h +5 -0
- package/ios/RNManualActivationRecognizer.h +10 -0
- package/ios/RNManualActivationRecognizer.m +80 -0
- package/ios/RNRootViewGestureRecognizer.m +1 -1
- package/ios/RNTouchEventType.h +9 -0
- package/jestSetup.js +7 -0
- package/lib/commonjs/Directions.js +15 -0
- package/lib/commonjs/Directions.js.map +1 -0
- package/lib/commonjs/EventType.js +16 -0
- package/lib/commonjs/EventType.js.map +1 -0
- package/lib/commonjs/GestureHandlerRootView.android.js +24 -0
- package/lib/commonjs/GestureHandlerRootView.android.js.map +1 -0
- package/lib/commonjs/GestureHandlerRootView.js +20 -0
- package/lib/commonjs/GestureHandlerRootView.js.map +1 -0
- package/lib/commonjs/PlatformConstants.js +15 -0
- package/lib/commonjs/PlatformConstants.js.map +1 -0
- package/lib/commonjs/PlatformConstants.web.js +14 -0
- package/lib/commonjs/PlatformConstants.web.js.map +1 -0
- package/lib/commonjs/RNGestureHandlerModule.js +22 -0
- package/lib/commonjs/RNGestureHandlerModule.js.map +1 -0
- package/lib/commonjs/RNGestureHandlerModule.web.js +80 -0
- package/lib/commonjs/RNGestureHandlerModule.web.js.map +1 -0
- package/lib/commonjs/State.js +18 -0
- package/lib/commonjs/State.js.map +1 -0
- package/lib/commonjs/components/DrawerLayout.js +535 -0
- package/lib/commonjs/components/DrawerLayout.js.map +1 -0
- package/lib/commonjs/components/GestureButtons.js +207 -0
- package/lib/commonjs/components/GestureButtons.js.map +1 -0
- package/lib/commonjs/components/GestureComponents.js +76 -0
- package/lib/commonjs/components/GestureComponents.js.map +1 -0
- package/lib/commonjs/components/GestureComponents.web.js +46 -0
- package/lib/commonjs/components/GestureComponents.web.js.map +1 -0
- package/lib/commonjs/components/GestureHandlerButton.js +13 -0
- package/lib/commonjs/components/GestureHandlerButton.js.map +1 -0
- package/lib/commonjs/components/GestureHandlerButton.web.js +24 -0
- package/lib/commonjs/components/GestureHandlerButton.web.js.map +1 -0
- package/lib/commonjs/components/Swipeable.js +365 -0
- package/lib/commonjs/components/Swipeable.js.map +1 -0
- package/lib/commonjs/components/touchables/GenericTouchable.js +278 -0
- package/lib/commonjs/components/touchables/GenericTouchable.js.map +1 -0
- package/lib/commonjs/components/touchables/TouchableHighlight.js +109 -0
- package/lib/commonjs/components/touchables/TouchableHighlight.js.map +1 -0
- package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js +100 -0
- package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js.map +1 -0
- package/lib/commonjs/components/touchables/TouchableNativeFeedback.js +12 -0
- package/lib/commonjs/components/touchables/TouchableNativeFeedback.js.map +1 -0
- package/lib/commonjs/components/touchables/TouchableOpacity.js +75 -0
- package/lib/commonjs/components/touchables/TouchableOpacity.js.map +1 -0
- package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js +26 -0
- package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js.map +1 -0
- package/lib/commonjs/components/touchables/index.js +40 -0
- package/lib/commonjs/components/touchables/index.js.map +1 -0
- package/lib/commonjs/gestureHandlerRootHOC.js +39 -0
- package/lib/commonjs/gestureHandlerRootHOC.js.map +1 -0
- package/lib/commonjs/handlers/FlingGestureHandler.js +23 -0
- package/lib/commonjs/handlers/FlingGestureHandler.js.map +1 -0
- package/lib/commonjs/handlers/ForceTouchGestureHandler.js +44 -0
- package/lib/commonjs/handlers/ForceTouchGestureHandler.js.map +1 -0
- package/lib/commonjs/handlers/LongPressGestureHandler.js +23 -0
- package/lib/commonjs/handlers/LongPressGestureHandler.js.map +1 -0
- package/lib/commonjs/handlers/NativeViewGestureHandler.js +25 -0
- package/lib/commonjs/handlers/NativeViewGestureHandler.js.map +1 -0
- package/lib/commonjs/handlers/PanGestureHandler.js +121 -0
- package/lib/commonjs/handlers/PanGestureHandler.js.map +1 -0
- package/lib/commonjs/handlers/PinchGestureHandler.js +21 -0
- package/lib/commonjs/handlers/PinchGestureHandler.js.map +1 -0
- package/lib/commonjs/handlers/RotationGestureHandler.js +21 -0
- package/lib/commonjs/handlers/RotationGestureHandler.js.map +1 -0
- package/lib/commonjs/handlers/TapGestureHandler.js +23 -0
- package/lib/commonjs/handlers/TapGestureHandler.js.map +1 -0
- package/lib/commonjs/handlers/createHandler.js +373 -0
- package/lib/commonjs/handlers/createHandler.js.map +1 -0
- package/lib/commonjs/handlers/createNativeWrapper.js +70 -0
- package/lib/commonjs/handlers/createNativeWrapper.js.map +1 -0
- package/lib/commonjs/handlers/gestureHandlerCommon.js +80 -0
- package/lib/commonjs/handlers/gestureHandlerCommon.js.map +1 -0
- package/lib/commonjs/handlers/gestureHandlerTypesCompat.js +2 -0
- package/lib/commonjs/handlers/gestureHandlerTypesCompat.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector.js +415 -0
- package/lib/commonjs/handlers/gestures/GestureDetector.js.map +1 -0
- package/lib/commonjs/handlers/gestures/eventReceiver.js +112 -0
- package/lib/commonjs/handlers/gestures/eventReceiver.js.map +1 -0
- package/lib/commonjs/handlers/gestures/flingGesture.js +34 -0
- package/lib/commonjs/handlers/gestures/flingGesture.js.map +1 -0
- package/lib/commonjs/handlers/gestures/forceTouchGesture.js +39 -0
- package/lib/commonjs/handlers/gestures/forceTouchGesture.js.map +1 -0
- package/lib/commonjs/handlers/gestures/gesture.js +177 -0
- package/lib/commonjs/handlers/gestures/gesture.js.map +1 -0
- package/lib/commonjs/handlers/gestures/gestureComposition.js +94 -0
- package/lib/commonjs/handlers/gestures/gestureComposition.js.map +1 -0
- package/lib/commonjs/handlers/gestures/gestureObjects.js +85 -0
- package/lib/commonjs/handlers/gestures/gestureObjects.js.map +1 -0
- package/lib/commonjs/handlers/gestures/gestureStateManager.js +58 -0
- package/lib/commonjs/handlers/gestures/gestureStateManager.js.map +1 -0
- package/lib/commonjs/handlers/gestures/longPressGesture.js +34 -0
- package/lib/commonjs/handlers/gestures/longPressGesture.js.map +1 -0
- package/lib/commonjs/handlers/gestures/manualGesture.js +19 -0
- package/lib/commonjs/handlers/gestures/manualGesture.js.map +1 -0
- package/lib/commonjs/handlers/gestures/nativeGesture.js +34 -0
- package/lib/commonjs/handlers/gestures/nativeGesture.js.map +1 -0
- package/lib/commonjs/handlers/gestures/panGesture.js +116 -0
- package/lib/commonjs/handlers/gestures/panGesture.js.map +1 -0
- package/lib/commonjs/handlers/gestures/pinchGesture.js +19 -0
- package/lib/commonjs/handlers/gestures/pinchGesture.js.map +1 -0
- package/lib/commonjs/handlers/gestures/reanimatedWrapper.js +24 -0
- package/lib/commonjs/handlers/gestures/reanimatedWrapper.js.map +1 -0
- package/lib/commonjs/handlers/gestures/rotationGesture.js +19 -0
- package/lib/commonjs/handlers/gestures/rotationGesture.js.map +1 -0
- package/lib/commonjs/handlers/gestures/tapGesture.js +59 -0
- package/lib/commonjs/handlers/gestures/tapGesture.js.map +1 -0
- package/lib/commonjs/handlers/handlersRegistry.js +31 -0
- package/lib/commonjs/handlers/handlersRegistry.js.map +1 -0
- package/lib/commonjs/index.js +338 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/init.js +13 -0
- package/lib/commonjs/init.js.map +1 -0
- package/lib/commonjs/mocks.js +64 -0
- package/lib/commonjs/mocks.js.map +1 -0
- package/lib/commonjs/typeUtils.js +2 -0
- package/lib/commonjs/typeUtils.js.map +1 -0
- package/lib/commonjs/utils.js +15 -0
- package/lib/commonjs/utils.js.map +1 -0
- package/lib/commonjs/web/DiscreteGestureHandler.js +105 -0
- package/lib/commonjs/web/DiscreteGestureHandler.js.map +1 -0
- package/lib/commonjs/web/DraggingGestureHandler.js +53 -0
- package/lib/commonjs/web/DraggingGestureHandler.js.map +1 -0
- package/lib/commonjs/web/Errors.js +16 -0
- package/lib/commonjs/web/Errors.js.map +1 -0
- package/lib/commonjs/web/FlingGestureHandler.js +170 -0
- package/lib/commonjs/web/FlingGestureHandler.js.map +1 -0
- package/lib/commonjs/web/GestureHandler.js +533 -0
- package/lib/commonjs/web/GestureHandler.js.map +1 -0
- package/lib/commonjs/web/IndiscreteGestureHandler.js +54 -0
- package/lib/commonjs/web/IndiscreteGestureHandler.js.map +1 -0
- package/lib/commonjs/web/LongPressGestureHandler.js +71 -0
- package/lib/commonjs/web/LongPressGestureHandler.js.map +1 -0
- package/lib/commonjs/web/NativeViewGestureHandler.js +62 -0
- package/lib/commonjs/web/NativeViewGestureHandler.js.map +1 -0
- package/lib/commonjs/web/NodeManager.js +43 -0
- package/lib/commonjs/web/NodeManager.js.map +1 -0
- package/lib/commonjs/web/PanGestureHandler.js +189 -0
- package/lib/commonjs/web/PanGestureHandler.js.map +1 -0
- package/lib/commonjs/web/PinchGestureHandler.js +40 -0
- package/lib/commonjs/web/PinchGestureHandler.js.map +1 -0
- package/lib/commonjs/web/PressGestureHandler.js +188 -0
- package/lib/commonjs/web/PressGestureHandler.js.map +1 -0
- package/lib/commonjs/web/RotationGestureHandler.js +44 -0
- package/lib/commonjs/web/RotationGestureHandler.js.map +1 -0
- package/lib/commonjs/web/TapGestureHandler.js +192 -0
- package/lib/commonjs/web/TapGestureHandler.js.map +1 -0
- package/lib/commonjs/web/constants.js +64 -0
- package/lib/commonjs/web/constants.js.map +1 -0
- package/lib/commonjs/web/utils.js +42 -0
- package/lib/commonjs/web/utils.js.map +1 -0
- package/lib/module/Directions.js +7 -0
- package/lib/module/Directions.js.map +1 -0
- package/lib/module/EventType.js +8 -0
- package/lib/module/EventType.js.map +1 -0
- package/lib/module/GestureHandlerRootView.android.js +10 -0
- package/lib/module/GestureHandlerRootView.android.js.map +1 -0
- package/lib/module/GestureHandlerRootView.js +7 -0
- package/lib/module/GestureHandlerRootView.js.map +1 -0
- package/lib/module/PlatformConstants.js +5 -0
- package/lib/module/PlatformConstants.js.map +1 -0
- package/lib/module/PlatformConstants.web.js +7 -0
- package/lib/module/PlatformConstants.web.js.map +1 -0
- package/lib/module/RNGestureHandlerModule.js +13 -0
- package/lib/module/RNGestureHandlerModule.js.map +1 -0
- package/lib/module/RNGestureHandlerModule.web.js +56 -0
- package/lib/module/RNGestureHandlerModule.web.js.map +1 -0
- package/lib/module/State.js +10 -0
- package/lib/module/State.js.map +1 -0
- package/lib/module/components/DrawerLayout.js +520 -0
- package/lib/module/components/DrawerLayout.js.map +1 -0
- package/lib/module/components/GestureButtons.js +172 -0
- package/lib/module/components/GestureButtons.js.map +1 -0
- package/lib/module/components/GestureComponents.js +53 -0
- package/lib/module/components/GestureComponents.js.map +1 -0
- package/lib/module/components/GestureComponents.web.js +25 -0
- package/lib/module/components/GestureComponents.web.js.map +1 -0
- package/{dist/src → lib/module}/components/GestureHandlerButton.js +1 -0
- package/lib/module/components/GestureHandlerButton.js.map +1 -0
- package/lib/module/components/GestureHandlerButton.web.js +9 -0
- package/lib/module/components/GestureHandlerButton.web.js.map +1 -0
- package/lib/module/components/Swipeable.js +347 -0
- package/lib/module/components/Swipeable.js.map +1 -0
- package/lib/module/components/touchables/GenericTouchable.js +262 -0
- package/lib/module/components/touchables/GenericTouchable.js.map +1 -0
- package/lib/module/components/touchables/TouchableHighlight.js +95 -0
- package/lib/module/components/touchables/TouchableHighlight.js.map +1 -0
- package/lib/module/components/touchables/TouchableNativeFeedback.android.js +84 -0
- package/lib/module/components/touchables/TouchableNativeFeedback.android.js.map +1 -0
- package/{dist/src → lib/module}/components/touchables/TouchableNativeFeedback.js +1 -0
- package/lib/module/components/touchables/TouchableNativeFeedback.js.map +1 -0
- package/lib/module/components/touchables/TouchableOpacity.js +61 -0
- package/lib/module/components/touchables/TouchableOpacity.js.map +1 -0
- package/lib/module/components/touchables/TouchableWithoutFeedback.js +10 -0
- package/lib/module/components/touchables/TouchableWithoutFeedback.js.map +1 -0
- package/{dist/src → lib/module}/components/touchables/index.js +1 -0
- package/lib/module/components/touchables/index.js.map +1 -0
- package/lib/module/gestureHandlerRootHOC.js +21 -0
- package/lib/module/gestureHandlerRootHOC.js.map +1 -0
- package/lib/module/handlers/FlingGestureHandler.js +10 -0
- package/lib/module/handlers/FlingGestureHandler.js.map +1 -0
- package/lib/module/handlers/ForceTouchGestureHandler.js +29 -0
- package/lib/module/handlers/ForceTouchGestureHandler.js.map +1 -0
- package/lib/module/handlers/LongPressGestureHandler.js +10 -0
- package/lib/module/handlers/LongPressGestureHandler.js.map +1 -0
- package/lib/module/handlers/NativeViewGestureHandler.js +11 -0
- package/lib/module/handlers/NativeViewGestureHandler.js.map +1 -0
- package/lib/module/handlers/PanGestureHandler.js +106 -0
- package/lib/module/handlers/PanGestureHandler.js.map +1 -0
- package/lib/module/handlers/PinchGestureHandler.js +9 -0
- package/lib/module/handlers/PinchGestureHandler.js.map +1 -0
- package/lib/module/handlers/RotationGestureHandler.js +9 -0
- package/lib/module/handlers/RotationGestureHandler.js.map +1 -0
- package/lib/module/handlers/TapGestureHandler.js +10 -0
- package/lib/module/handlers/TapGestureHandler.js.map +1 -0
- package/lib/module/handlers/createHandler.js +348 -0
- package/lib/module/handlers/createHandler.js.map +1 -0
- package/lib/module/handlers/createNativeWrapper.js +58 -0
- package/lib/module/handlers/createNativeWrapper.js.map +1 -0
- package/lib/module/handlers/gestureHandlerCommon.js +66 -0
- package/lib/module/handlers/gestureHandlerCommon.js.map +1 -0
- package/lib/module/handlers/gestureHandlerTypesCompat.js +2 -0
- package/lib/module/handlers/gestureHandlerTypesCompat.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector.js +378 -0
- package/lib/module/handlers/gestures/GestureDetector.js.map +1 -0
- package/lib/module/handlers/gestures/eventReceiver.js +97 -0
- package/lib/module/handlers/gestures/eventReceiver.js.map +1 -0
- package/lib/module/handlers/gestures/flingGesture.js +24 -0
- package/lib/module/handlers/gestures/flingGesture.js.map +1 -0
- package/lib/module/handlers/gestures/forceTouchGesture.js +29 -0
- package/lib/module/handlers/gestures/forceTouchGesture.js.map +1 -0
- package/lib/module/handlers/gestures/gesture.js +159 -0
- package/lib/module/handlers/gestures/gesture.js.map +1 -0
- package/lib/module/handlers/gestures/gestureComposition.js +79 -0
- package/lib/module/handlers/gestures/gestureComposition.js.map +1 -0
- package/lib/module/handlers/gestures/gestureObjects.js +67 -0
- package/lib/module/handlers/gestures/gestureObjects.js.map +1 -0
- package/lib/module/handlers/gestures/gestureStateManager.js +48 -0
- package/lib/module/handlers/gestures/gestureStateManager.js.map +1 -0
- package/lib/module/handlers/gestures/longPressGesture.js +24 -0
- package/lib/module/handlers/gestures/longPressGesture.js.map +1 -0
- package/lib/module/handlers/gestures/manualGesture.js +9 -0
- package/lib/module/handlers/gestures/manualGesture.js.map +1 -0
- package/lib/module/handlers/gestures/nativeGesture.js +24 -0
- package/lib/module/handlers/gestures/nativeGesture.js.map +1 -0
- package/lib/module/handlers/gestures/panGesture.js +106 -0
- package/lib/module/handlers/gestures/panGesture.js.map +1 -0
- package/lib/module/handlers/gestures/pinchGesture.js +9 -0
- package/lib/module/handlers/gestures/pinchGesture.js.map +1 -0
- package/lib/module/handlers/gestures/reanimatedWrapper.js +19 -0
- package/lib/module/handlers/gestures/reanimatedWrapper.js.map +1 -0
- package/lib/module/handlers/gestures/rotationGesture.js +9 -0
- package/lib/module/handlers/gestures/rotationGesture.js.map +1 -0
- package/lib/module/handlers/gestures/tapGesture.js +49 -0
- package/lib/module/handlers/gestures/tapGesture.js.map +1 -0
- package/lib/module/handlers/handlersRegistry.js +16 -0
- package/lib/module/handlers/handlersRegistry.js.map +1 -0
- package/lib/module/index.js +34 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/init.js +5 -0
- package/lib/module/init.js.map +1 -0
- package/lib/module/mocks.js +54 -0
- package/lib/module/mocks.js.map +1 -0
- package/lib/module/typeUtils.js +2 -0
- package/lib/module/typeUtils.js.map +1 -0
- package/lib/module/utils.js +8 -0
- package/lib/module/utils.js.map +1 -0
- package/lib/module/web/DiscreteGestureHandler.js +94 -0
- package/lib/module/web/DiscreteGestureHandler.js.map +1 -0
- package/lib/module/web/DraggingGestureHandler.js +40 -0
- package/lib/module/web/DraggingGestureHandler.js.map +1 -0
- package/lib/module/web/Errors.js +7 -0
- package/lib/module/web/Errors.js.map +1 -0
- package/lib/module/web/FlingGestureHandler.js +156 -0
- package/lib/module/web/FlingGestureHandler.js.map +1 -0
- package/lib/module/web/GestureHandler.js +518 -0
- package/lib/module/web/GestureHandler.js.map +1 -0
- package/lib/module/web/IndiscreteGestureHandler.js +44 -0
- package/lib/module/web/IndiscreteGestureHandler.js.map +1 -0
- package/lib/module/web/LongPressGestureHandler.js +58 -0
- package/lib/module/web/LongPressGestureHandler.js.map +1 -0
- package/lib/module/web/NativeViewGestureHandler.js +45 -0
- package/lib/module/web/NativeViewGestureHandler.js.map +1 -0
- package/lib/module/web/NodeManager.js +30 -0
- package/lib/module/web/NodeManager.js.map +1 -0
- package/lib/module/web/PanGestureHandler.js +175 -0
- package/lib/module/web/PanGestureHandler.js.map +1 -0
- package/lib/module/web/PinchGestureHandler.js +29 -0
- package/lib/module/web/PinchGestureHandler.js.map +1 -0
- package/lib/module/web/PressGestureHandler.js +174 -0
- package/lib/module/web/PressGestureHandler.js.map +1 -0
- package/lib/module/web/RotationGestureHandler.js +32 -0
- package/lib/module/web/RotationGestureHandler.js.map +1 -0
- package/lib/module/web/TapGestureHandler.js +180 -0
- package/lib/module/web/TapGestureHandler.js.map +1 -0
- package/lib/module/web/constants.js +43 -0
- package/lib/module/web/constants.js.map +1 -0
- package/lib/module/web/utils.js +19 -0
- package/lib/module/web/utils.js.map +1 -0
- package/lib/typescript/Directions.d.ts +7 -0
- package/lib/typescript/EventType.d.ts +8 -0
- package/lib/typescript/GestureHandlerRootView.android.d.ts +2 -0
- package/lib/typescript/GestureHandlerRootView.d.ts +5 -0
- package/{dist/src → lib/typescript}/PlatformConstants.d.ts +0 -0
- package/{dist/src → lib/typescript}/PlatformConstants.web.d.ts +0 -0
- package/{dist/src → lib/typescript}/RNGestureHandlerModule.d.ts +1 -8
- package/{dist/src → lib/typescript}/RNGestureHandlerModule.web.d.ts +1 -1
- package/{dist/src → lib/typescript}/State.d.ts +0 -0
- package/{dist/src → lib/typescript}/components/DrawerLayout.d.ts +52 -2
- package/{dist/src → lib/typescript}/components/GestureButtons.d.ts +37 -1
- package/lib/typescript/components/GestureComponents.d.ts +18 -0
- package/lib/typescript/components/GestureComponents.web.d.ts +7 -0
- package/{dist/src → lib/typescript}/components/GestureHandlerButton.d.ts +0 -0
- package/{dist/src → lib/typescript}/components/GestureHandlerButton.web.d.ts +1 -1
- package/lib/typescript/components/Swipeable.d.ts +150 -0
- package/{dist/src → lib/typescript}/components/touchables/GenericTouchable.d.ts +3 -3
- package/{dist/src → lib/typescript}/components/touchables/TouchableHighlight.d.ts +1 -0
- package/{dist/src → lib/typescript}/components/touchables/TouchableNativeFeedback.android.d.ts +0 -0
- package/{dist/src → lib/typescript}/components/touchables/TouchableNativeFeedback.d.ts +0 -0
- package/{dist/src → lib/typescript}/components/touchables/TouchableOpacity.d.ts +1 -0
- package/{dist/src → lib/typescript}/components/touchables/TouchableWithoutFeedback.d.ts +4 -2
- package/{dist/src → lib/typescript}/components/touchables/index.d.ts +0 -0
- package/lib/typescript/gestureHandlerRootHOC.d.ts +3 -0
- package/lib/typescript/handlers/FlingGestureHandler.d.ts +33 -0
- package/lib/typescript/handlers/ForceTouchGestureHandler.d.ts +43 -0
- package/lib/typescript/handlers/LongPressGestureHandler.d.ts +55 -0
- package/lib/typescript/handlers/NativeViewGestureHandler.d.ts +27 -0
- package/lib/typescript/handlers/PanGestureHandler.d.ts +137 -0
- package/lib/typescript/handlers/PinchGestureHandler.d.ts +28 -0
- package/lib/typescript/handlers/RotationGestureHandler.d.ts +28 -0
- package/lib/typescript/handlers/TapGestureHandler.d.ts +56 -0
- package/{dist/src → lib/typescript}/handlers/createHandler.d.ts +2 -2
- package/{dist/src → lib/typescript}/handlers/createNativeWrapper.d.ts +1 -1
- package/lib/typescript/handlers/gestureHandlerCommon.d.ts +62 -0
- package/{dist/src → lib/typescript}/handlers/gestureHandlerTypesCompat.d.ts +17 -2
- package/lib/typescript/handlers/gestures/GestureDetector.d.ts +16 -0
- package/lib/typescript/handlers/gestures/eventReceiver.d.ts +2 -0
- package/lib/typescript/handlers/gestures/flingGesture.d.ts +9 -0
- package/lib/typescript/handlers/gestures/forceTouchGesture.d.ts +10 -0
- package/lib/typescript/handlers/gestures/gesture.d.ts +90 -0
- package/lib/typescript/handlers/gestures/gestureComposition.d.ts +21 -0
- package/lib/typescript/handlers/gestures/gestureObjects.d.ts +39 -0
- package/lib/typescript/handlers/gestures/gestureStateManager.d.ts +9 -0
- package/lib/typescript/handlers/gestures/longPressGesture.d.ts +9 -0
- package/lib/typescript/handlers/gestures/manualGesture.d.ts +5 -0
- package/lib/typescript/handlers/gestures/nativeGesture.d.ts +9 -0
- package/lib/typescript/handlers/gestures/panGesture.d.ts +19 -0
- package/lib/typescript/handlers/gestures/pinchGesture.d.ts +6 -0
- package/lib/typescript/handlers/gestures/reanimatedWrapper.d.ts +14 -0
- package/lib/typescript/handlers/gestures/rotationGesture.d.ts +6 -0
- package/lib/typescript/handlers/gestures/tapGesture.d.ts +14 -0
- package/lib/typescript/handlers/handlersRegistry.d.ts +6 -0
- package/lib/typescript/index.d.ts +44 -0
- package/lib/typescript/init.d.ts +1 -0
- package/lib/typescript/mocks.d.ts +43 -0
- package/{dist/src → lib/typescript}/typeUtils.d.ts +0 -0
- package/lib/typescript/utils.d.ts +1 -0
- package/{dist/src → lib/typescript}/web/DiscreteGestureHandler.d.ts +0 -0
- package/{dist/src → lib/typescript}/web/DraggingGestureHandler.d.ts +0 -0
- package/{dist/src → lib/typescript}/web/Errors.d.ts +0 -0
- package/{dist/src → lib/typescript}/web/FlingGestureHandler.d.ts +0 -1
- package/{dist/src → lib/typescript}/web/GestureHandler.d.ts +0 -1
- package/{dist/src → lib/typescript}/web/IndiscreteGestureHandler.d.ts +0 -0
- package/{dist/src → lib/typescript}/web/LongPressGestureHandler.d.ts +0 -0
- package/{dist/src → lib/typescript}/web/NativeViewGestureHandler.d.ts +0 -0
- package/{dist/src → lib/typescript}/web/NodeManager.d.ts +0 -0
- package/{dist/src → lib/typescript}/web/PanGestureHandler.d.ts +0 -1
- package/{dist/src → lib/typescript}/web/PinchGestureHandler.d.ts +0 -1
- package/{dist/src → lib/typescript}/web/PressGestureHandler.d.ts +0 -1
- package/{dist/src → lib/typescript}/web/RotationGestureHandler.d.ts +0 -1
- package/{dist/src → lib/typescript}/web/TapGestureHandler.d.ts +0 -1
- package/{dist/src → lib/typescript}/web/constants.d.ts +0 -0
- package/{dist/src → lib/typescript}/web/utils.d.ts +0 -0
- package/package.json +38 -16
- package/src/Directions.ts +8 -2
- package/src/EventType.ts +10 -0
- package/src/GestureHandlerRootView.android.tsx +10 -25
- package/src/GestureHandlerRootView.tsx +12 -0
- package/src/PlatformConstants.ts +3 -2
- package/src/RNGestureHandlerModule.ts +15 -9
- package/src/RNGestureHandlerModule.web.ts +1 -0
- package/src/components/DrawerLayout.tsx +117 -43
- package/src/components/GestureButtons.tsx +46 -6
- package/src/components/GestureComponents.tsx +48 -41
- package/src/components/GestureComponents.web.tsx +1 -1
- package/src/components/{GestureHandlerButton.ts → GestureHandlerButton.tsx} +0 -0
- package/src/components/GestureHandlerButton.web.tsx +1 -1
- package/src/components/Swipeable.tsx +110 -22
- package/src/components/touchables/GenericTouchable.tsx +5 -3
- package/src/components/touchables/TouchableHighlight.tsx +2 -1
- package/src/components/touchables/TouchableNativeFeedback.android.tsx +2 -1
- package/src/components/touchables/{TouchableNativeFeedback.ts → TouchableNativeFeedback.tsx} +0 -0
- package/src/components/touchables/TouchableOpacity.tsx +3 -2
- package/src/components/touchables/TouchableWithoutFeedback.tsx +3 -2
- package/src/gestureHandlerRootHOC.tsx +5 -5
- package/src/handlers/FlingGestureHandler.ts +57 -0
- package/src/handlers/ForceTouchGestureHandler.ts +83 -0
- package/src/handlers/LongPressGestureHandler.ts +84 -0
- package/src/handlers/NativeViewGestureHandler.ts +31 -7
- package/src/handlers/PanGestureHandler.ts +321 -0
- package/src/handlers/PinchGestureHandler.ts +46 -0
- package/src/handlers/RotationGestureHandler.ts +46 -0
- package/src/handlers/TapGestureHandler.ts +90 -0
- package/src/handlers/createHandler.ts +61 -83
- package/src/handlers/createNativeWrapper.tsx +3 -2
- package/src/handlers/gestureHandlerCommon.ts +185 -0
- package/src/handlers/gestureHandlerTypesCompat.ts +37 -4
- package/src/handlers/gestures/GestureDetector.tsx +490 -0
- package/src/handlers/gestures/eventReceiver.ts +129 -0
- package/src/handlers/gestures/flingGesture.ts +27 -0
- package/src/handlers/gestures/forceTouchGesture.ts +32 -0
- package/src/handlers/gestures/gesture.ts +262 -0
- package/src/handlers/gestures/gestureComposition.ts +109 -0
- package/src/handlers/gestures/gestureObjects.ts +79 -0
- package/src/handlers/gestures/gestureStateManager.ts +60 -0
- package/src/handlers/gestures/longPressGesture.ts +27 -0
- package/src/handlers/gestures/manualGesture.ts +11 -0
- package/src/handlers/gestures/nativeGesture.ts +27 -0
- package/src/handlers/gestures/panGesture.ts +105 -0
- package/src/handlers/gestures/pinchGesture.ts +12 -0
- package/src/handlers/gestures/reanimatedWrapper.ts +45 -0
- package/src/handlers/gestures/rotationGesture.ts +12 -0
- package/src/handlers/gestures/tapGesture.ts +52 -0
- package/src/handlers/handlersRegistry.ts +22 -0
- package/src/index.ts +156 -0
- package/src/init.ts +5 -0
- package/src/mocks.ts +65 -0
- package/src/utils.ts +7 -0
- package/src/web/GestureHandler.ts +3 -4
- package/src/web/NativeViewGestureHandler.ts +0 -2
- package/src/web/NodeManager.ts +5 -0
- package/android/lib/src/main/java/com/swmansion/gesturehandler/BaseGestureHandlerInteractionController.java +0 -23
- package/android/lib/src/main/java/com/swmansion/gesturehandler/FlingGestureHandler.java +0 -110
- package/android/lib/src/main/java/com/swmansion/gesturehandler/GestureHandler.java +0 -531
- package/android/lib/src/main/java/com/swmansion/gesturehandler/GestureHandlerInteractionController.java +0 -8
- package/android/lib/src/main/java/com/swmansion/gesturehandler/GestureHandlerOrchestrator.java +0 -543
- package/android/lib/src/main/java/com/swmansion/gesturehandler/GestureHandlerRegistry.java +0 -10
- package/android/lib/src/main/java/com/swmansion/gesturehandler/GestureHandlerRegistryImpl.java +0 -29
- package/android/lib/src/main/java/com/swmansion/gesturehandler/GestureUtils.java +0 -53
- package/android/lib/src/main/java/com/swmansion/gesturehandler/LongPressGestureHandler.java +0 -81
- package/android/lib/src/main/java/com/swmansion/gesturehandler/NativeViewGestureHandler.java +0 -110
- package/android/lib/src/main/java/com/swmansion/gesturehandler/OnTouchEventListener.java +0 -8
- package/android/lib/src/main/java/com/swmansion/gesturehandler/PanGestureHandler.java +0 -312
- package/android/lib/src/main/java/com/swmansion/gesturehandler/PinchGestureHandler.java +0 -109
- package/android/lib/src/main/java/com/swmansion/gesturehandler/RotationGestureDetector.java +0 -169
- package/android/lib/src/main/java/com/swmansion/gesturehandler/RotationGestureHandler.java +0 -96
- package/android/lib/src/main/java/com/swmansion/gesturehandler/TapGestureHandler.java +0 -172
- package/android/lib/src/main/java/com/swmansion/gesturehandler/ViewConfigurationHelper.java +0 -10
- package/android/src/main/java/com/facebook/react/views/modal/RNGHModalUtils.java +0 -21
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.java +0 -296
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEnabledRootView.java +0 -72
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEvent.java +0 -77
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEventDataExtractor.java +0 -8
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerInteractionManager.java +0 -86
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.java +0 -731
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerPackage.java +0 -31
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRegistry.java +0 -101
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootHelper.java +0 -151
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootInterface.java +0 -7
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootView.java +0 -76
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootViewManager.java +0 -49
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerStateChangeEvent.java +0 -82
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNViewConfigurationHelper.java +0 -61
- package/dist/index.d.ts +0 -13
- package/dist/index.js +0 -16
- package/dist/src/Directions.d.ts +0 -7
- package/dist/src/Directions.js +0 -2
- package/dist/src/GestureHandlerRootView.android.d.ts +0 -4
- package/dist/src/GestureHandlerRootView.android.expo.d.ts +0 -2
- package/dist/src/GestureHandlerRootView.android.expo.js +0 -2
- package/dist/src/GestureHandlerRootView.android.js +0 -21
- package/dist/src/GestureHandlerRootView.d.ts +0 -2
- package/dist/src/GestureHandlerRootView.js +0 -2
- package/dist/src/PlatformConstants.js +0 -2
- package/dist/src/PlatformConstants.web.js +0 -5
- package/dist/src/RNGestureHandlerModule.js +0 -3
- package/dist/src/RNGestureHandlerModule.web.js +0 -47
- package/dist/src/State.js +0 -9
- package/dist/src/__mocks__/RNGestureHandlerModule.d.ts +0 -23
- package/dist/src/__mocks__/RNGestureHandlerModule.js +0 -25
- package/dist/src/components/DrawerLayout.js +0 -390
- package/dist/src/components/GestureButtons.js +0 -113
- package/dist/src/components/GestureComponents.d.ts +0 -45
- package/dist/src/components/GestureComponents.js +0 -18
- package/dist/src/components/GestureComponents.web.d.ts +0 -7
- package/dist/src/components/GestureComponents.web.js +0 -18
- package/dist/src/components/GestureHandlerButton.web.js +0 -3
- package/dist/src/components/Swipeable.d.ts +0 -82
- package/dist/src/components/Swipeable.js +0 -248
- package/dist/src/components/touchables/GenericTouchable.js +0 -209
- package/dist/src/components/touchables/TouchableHighlight.js +0 -72
- package/dist/src/components/touchables/TouchableNativeFeedback.android.js +0 -62
- package/dist/src/components/touchables/TouchableOpacity.js +0 -49
- package/dist/src/components/touchables/TouchableWithoutFeedback.js +0 -5
- package/dist/src/gestureHandlerRootHOC.d.ts +0 -3
- package/dist/src/gestureHandlerRootHOC.js +0 -17
- package/dist/src/handlers/NativeViewGestureHandler.d.ts +0 -12
- package/dist/src/handlers/NativeViewGestureHandler.js +0 -13
- package/dist/src/handlers/createHandler.js +0 -292
- package/dist/src/handlers/createNativeWrapper.js +0 -50
- package/dist/src/handlers/gestureHandlerTypesCompat.js +0 -1
- package/dist/src/handlers/gestureHandlers.d.ts +0 -158
- package/dist/src/handlers/gestureHandlers.js +0 -247
- package/dist/src/typeUtils.js +0 -1
- package/dist/src/web/DiscreteGestureHandler.js +0 -48
- package/dist/src/web/DraggingGestureHandler.js +0 -25
- package/dist/src/web/Errors.js +0 -5
- package/dist/src/web/FlingGestureHandler.js +0 -119
- package/dist/src/web/GestureHandler.js +0 -413
- package/dist/src/web/IndiscreteGestureHandler.js +0 -26
- package/dist/src/web/LongPressGestureHandler.js +0 -46
- package/dist/src/web/NativeViewGestureHandler.js +0 -39
- package/dist/src/web/NodeManager.js +0 -22
- package/dist/src/web/PanGestureHandler.js +0 -145
- package/dist/src/web/PinchGestureHandler.js +0 -19
- package/dist/src/web/PressGestureHandler.js +0 -135
- package/dist/src/web/RotationGestureHandler.js +0 -20
- package/dist/src/web/TapGestureHandler.js +0 -143
- package/dist/src/web/constants.js +0 -42
- package/dist/src/web/utils.js +0 -15
- package/index.ts +0 -103
- package/src/GestureHandlerRootView.android.expo.ts +0 -3
- package/src/GestureHandlerRootView.ts +0 -3
- package/src/__mocks__/RNGestureHandlerModule.ts +0 -27
- package/src/handlers/gestureHandlers.ts +0 -511
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { State } from '../State';
|
|
3
|
+
import { EventType } from '../EventType';
|
|
4
|
+
import { ValueOf } from '../typeUtils';
|
|
5
|
+
export declare const baseGestureHandlerProps: readonly ["id", "enabled", "shouldCancelWhenOutside", "hitSlop", "waitFor", "simultaneousHandlers", "onBegan", "onFailed", "onCancelled", "onActivated", "onEnded", "onGestureEvent", "onHandlerStateChange"];
|
|
6
|
+
export declare const baseGestureHandlerWithMonitorProps: string[];
|
|
7
|
+
export interface GestureEventPayload {
|
|
8
|
+
handlerTag: number;
|
|
9
|
+
numberOfPointers: number;
|
|
10
|
+
state: ValueOf<typeof State>;
|
|
11
|
+
}
|
|
12
|
+
export interface HandlerStateChangeEventPayload {
|
|
13
|
+
handlerTag: number;
|
|
14
|
+
numberOfPointers: number;
|
|
15
|
+
state: ValueOf<typeof State>;
|
|
16
|
+
oldState: ValueOf<typeof State>;
|
|
17
|
+
}
|
|
18
|
+
export declare type HitSlop = number | Partial<Record<'left' | 'right' | 'top' | 'bottom' | 'vertical' | 'horizontal', number>> | Record<'width' | 'left', number> | Record<'width' | 'right', number> | Record<'height' | 'top', number> | Record<'height' | 'bottom', number>;
|
|
19
|
+
export interface GestureEvent<ExtraEventPayloadT = Record<string, unknown>> {
|
|
20
|
+
nativeEvent: Readonly<GestureEventPayload & ExtraEventPayloadT>;
|
|
21
|
+
}
|
|
22
|
+
export interface HandlerStateChangeEvent<ExtraEventPayloadT = Record<string, unknown>> {
|
|
23
|
+
nativeEvent: Readonly<HandlerStateChangeEventPayload & ExtraEventPayloadT>;
|
|
24
|
+
}
|
|
25
|
+
export declare type TouchData = {
|
|
26
|
+
id: number;
|
|
27
|
+
x: number;
|
|
28
|
+
y: number;
|
|
29
|
+
absoluteX: number;
|
|
30
|
+
absoluteY: number;
|
|
31
|
+
};
|
|
32
|
+
export declare type GestureTouchEvent = {
|
|
33
|
+
handlerTag: number;
|
|
34
|
+
numberOfTouches: number;
|
|
35
|
+
state: ValueOf<typeof State>;
|
|
36
|
+
eventType: EventType;
|
|
37
|
+
allTouches: TouchData[];
|
|
38
|
+
changedTouches: TouchData[];
|
|
39
|
+
};
|
|
40
|
+
export declare type GestureUpdateEvent<GestureEventPayloadT = Record<string, unknown>> = GestureEventPayload & GestureEventPayloadT;
|
|
41
|
+
export declare type GestureStateChangeEvent<GestureStateChangeEventPayloadT = Record<string, unknown>> = HandlerStateChangeEventPayload & GestureStateChangeEventPayloadT;
|
|
42
|
+
export declare type CommonGestureConfig = {
|
|
43
|
+
enabled?: boolean;
|
|
44
|
+
shouldCancelWhenOutside?: boolean;
|
|
45
|
+
hitSlop?: HitSlop;
|
|
46
|
+
};
|
|
47
|
+
export declare type BaseGestureHandlerProps<ExtraEventPayloadT extends Record<string, unknown> = Record<string, unknown>> = CommonGestureConfig & {
|
|
48
|
+
id?: string;
|
|
49
|
+
waitFor?: React.Ref<unknown> | React.Ref<unknown>[];
|
|
50
|
+
simultaneousHandlers?: React.Ref<unknown> | React.Ref<unknown>[];
|
|
51
|
+
onBegan?: (event: HandlerStateChangeEvent) => void;
|
|
52
|
+
onFailed?: (event: HandlerStateChangeEvent) => void;
|
|
53
|
+
onCancelled?: (event: HandlerStateChangeEvent) => void;
|
|
54
|
+
onActivated?: (event: HandlerStateChangeEvent) => void;
|
|
55
|
+
onEnded?: (event: HandlerStateChangeEvent) => void;
|
|
56
|
+
onGestureEvent?: (event: GestureEvent<ExtraEventPayloadT>) => void;
|
|
57
|
+
onHandlerStateChange?: (event: HandlerStateChangeEvent<ExtraEventPayloadT>) => void;
|
|
58
|
+
};
|
|
59
|
+
export declare function filterConfig(props: Record<string, unknown>, validProps: string[], defaults?: Record<string, unknown>): {
|
|
60
|
+
[x: string]: unknown;
|
|
61
|
+
};
|
|
62
|
+
export declare function findNodeHandle(node: null | number | React.Component<any, any> | React.ComponentClass<any>): null | number | React.Component<any, any> | React.ComponentClass<any>;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { BaseButtonProps, BorderlessButtonProps, RawButtonProps, RectButtonProps } from '../components/GestureButtons';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { GestureEvent, GestureEventPayload, HandlerStateChangeEvent, HandlerStateChangeEventPayload } from './gestureHandlerCommon';
|
|
3
|
+
import { FlingGestureHandlerEventPayload, FlingGestureHandlerProps } from './FlingGestureHandler';
|
|
4
|
+
import { ForceTouchGestureHandlerEventPayload, ForceTouchGestureHandlerProps } from './ForceTouchGestureHandler';
|
|
5
|
+
import { LongPressGestureHandlerEventPayload, LongPressGestureHandlerProps } from './LongPressGestureHandler';
|
|
6
|
+
import { PanGestureHandlerEventPayload, PanGestureHandlerProps } from './PanGestureHandler';
|
|
7
|
+
import { PinchGestureHandlerEventPayload, PinchGestureHandlerProps } from './PinchGestureHandler';
|
|
8
|
+
import { RotationGestureHandlerEventPayload, RotationGestureHandlerProps } from './RotationGestureHandler';
|
|
9
|
+
import { TapGestureHandlerEventPayload, TapGestureHandlerProps } from './TapGestureHandler';
|
|
10
|
+
import { NativeViewGestureHandlerPayload, NativeViewGestureHandlerProps } from './NativeViewGestureHandler';
|
|
4
11
|
export declare type GestureHandlerGestureEventNativeEvent = GestureEventPayload;
|
|
5
12
|
export declare type GestureHandlerStateChangeNativeEvent = HandlerStateChangeEventPayload;
|
|
6
13
|
export declare type GestureHandlerGestureEvent = GestureEvent;
|
|
@@ -21,6 +28,14 @@ export declare type RotationGestureHandlerGestureEvent = GestureEvent<RotationGe
|
|
|
21
28
|
export declare type RotationGestureHandlerStateChangeEvent = HandlerStateChangeEvent<RotationGestureHandlerEventPayload>;
|
|
22
29
|
export declare type FlingGestureHandlerGestureEvent = GestureEvent<FlingGestureHandlerEventPayload>;
|
|
23
30
|
export declare type FlingGestureHandlerStateChangeEvent = HandlerStateChangeEvent<FlingGestureHandlerEventPayload>;
|
|
31
|
+
export declare type NativeViewGestureHandlerProperties = NativeViewGestureHandlerProps;
|
|
32
|
+
export declare type TapGestureHandlerProperties = TapGestureHandlerProps;
|
|
33
|
+
export declare type LongPressGestureHandlerProperties = LongPressGestureHandlerProps;
|
|
34
|
+
export declare type PanGestureHandlerProperties = PanGestureHandlerProps;
|
|
35
|
+
export declare type PinchGestureHandlerProperties = PinchGestureHandlerProps;
|
|
36
|
+
export declare type RotationGestureHandlerProperties = RotationGestureHandlerProps;
|
|
37
|
+
export declare type FlingGestureHandlerProperties = FlingGestureHandlerProps;
|
|
38
|
+
export declare type ForceTouchGestureHandlerProperties = ForceTouchGestureHandlerProps;
|
|
24
39
|
export declare type RawButtonProperties = RawButtonProps;
|
|
25
40
|
export declare type BaseButtonProperties = BaseButtonProps;
|
|
26
41
|
export declare type RectButtonProperties = RectButtonProps;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { GestureType, HandlerCallbacks } from './gesture';
|
|
3
|
+
import { SharedValue } from './reanimatedWrapper';
|
|
4
|
+
import { ComposedGesture } from './gestureComposition';
|
|
5
|
+
export declare type GestureConfigReference = {
|
|
6
|
+
config: GestureType[];
|
|
7
|
+
animatedEventHandler: unknown;
|
|
8
|
+
animatedHandlers: SharedValue<HandlerCallbacks<Record<string, unknown>>[] | null> | null;
|
|
9
|
+
firstExecution: boolean;
|
|
10
|
+
useAnimated: boolean;
|
|
11
|
+
};
|
|
12
|
+
interface GestureDetectorProps {
|
|
13
|
+
gesture?: ComposedGesture | GestureType;
|
|
14
|
+
}
|
|
15
|
+
export declare const GestureDetector: React.FunctionComponent<GestureDetectorProps>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseGesture, BaseGestureConfig } from './gesture';
|
|
2
|
+
import { FlingGestureConfig, FlingGestureHandlerEventPayload } from '../FlingGestureHandler';
|
|
3
|
+
export declare class FlingGesture extends BaseGesture<FlingGestureHandlerEventPayload> {
|
|
4
|
+
config: BaseGestureConfig & FlingGestureConfig;
|
|
5
|
+
constructor();
|
|
6
|
+
numberOfPointers(pointers: number): this;
|
|
7
|
+
direction(direction: number): this;
|
|
8
|
+
}
|
|
9
|
+
export declare type FlingGestureType = InstanceType<typeof FlingGesture>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseGestureConfig, ContinousBaseGesture } from './gesture';
|
|
2
|
+
import { ForceTouchGestureConfig, ForceTouchGestureHandlerEventPayload } from '../ForceTouchGestureHandler';
|
|
3
|
+
export declare class ForceTouchGesture extends ContinousBaseGesture<ForceTouchGestureHandlerEventPayload> {
|
|
4
|
+
config: BaseGestureConfig & ForceTouchGestureConfig;
|
|
5
|
+
constructor();
|
|
6
|
+
minForce(force: number): this;
|
|
7
|
+
maxForce(force: number): this;
|
|
8
|
+
feedbackOnActivation(value: boolean): this;
|
|
9
|
+
}
|
|
10
|
+
export declare type ForceTouchGestureType = InstanceType<typeof ForceTouchGesture>;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { FlingGestureHandlerEventPayload } from '../FlingGestureHandler';
|
|
2
|
+
import { ForceTouchGestureHandlerEventPayload } from '../ForceTouchGestureHandler';
|
|
3
|
+
import { HitSlop, CommonGestureConfig, GestureTouchEvent, GestureStateChangeEvent, GestureUpdateEvent } from '../gestureHandlerCommon';
|
|
4
|
+
import { GestureStateManagerType } from './gestureStateManager';
|
|
5
|
+
import { LongPressGestureHandlerEventPayload } from '../LongPressGestureHandler';
|
|
6
|
+
import { PanGestureHandlerEventPayload } from '../PanGestureHandler';
|
|
7
|
+
import { PinchGestureHandlerEventPayload } from '../PinchGestureHandler';
|
|
8
|
+
import { RotationGestureHandlerEventPayload } from '../RotationGestureHandler';
|
|
9
|
+
import { TapGestureHandlerEventPayload } from '../TapGestureHandler';
|
|
10
|
+
import { NativeViewGestureHandlerPayload } from '../NativeViewGestureHandler';
|
|
11
|
+
export declare type GestureType = BaseGesture<Record<string, unknown>> | BaseGesture<Record<string, never>> | BaseGesture<TapGestureHandlerEventPayload> | BaseGesture<PanGestureHandlerEventPayload> | BaseGesture<LongPressGestureHandlerEventPayload> | BaseGesture<RotationGestureHandlerEventPayload> | BaseGesture<PinchGestureHandlerEventPayload> | BaseGesture<FlingGestureHandlerEventPayload> | BaseGesture<ForceTouchGestureHandlerEventPayload> | BaseGesture<NativeViewGestureHandlerPayload>;
|
|
12
|
+
export declare type GestureRef = number | GestureType | React.RefObject<GestureType | undefined> | React.RefObject<React.ComponentType | undefined>;
|
|
13
|
+
export interface BaseGestureConfig extends CommonGestureConfig, Record<string, unknown> {
|
|
14
|
+
ref?: React.MutableRefObject<GestureType | undefined>;
|
|
15
|
+
requireToFail?: GestureRef[];
|
|
16
|
+
simultaneousWith?: GestureRef[];
|
|
17
|
+
needsPointerData?: boolean;
|
|
18
|
+
manualActivation?: boolean;
|
|
19
|
+
}
|
|
20
|
+
declare type TouchEventHandlerType = (event: GestureTouchEvent, stateManager: GestureStateManagerType) => void;
|
|
21
|
+
export declare type HandlerCallbacks<EventPayloadT extends Record<string, unknown>> = {
|
|
22
|
+
handlerTag: number;
|
|
23
|
+
onBegin?: (event: GestureStateChangeEvent<EventPayloadT>) => void;
|
|
24
|
+
onStart?: (event: GestureStateChangeEvent<EventPayloadT>) => void;
|
|
25
|
+
onEnd?: (event: GestureStateChangeEvent<EventPayloadT>, success: boolean) => void;
|
|
26
|
+
onUpdate?: (event: GestureUpdateEvent<EventPayloadT>) => void;
|
|
27
|
+
onTouchesDown?: TouchEventHandlerType;
|
|
28
|
+
onTouchesMove?: TouchEventHandlerType;
|
|
29
|
+
onTouchesUp?: TouchEventHandlerType;
|
|
30
|
+
onTouchesCancelled?: TouchEventHandlerType;
|
|
31
|
+
isWorklet: boolean[];
|
|
32
|
+
};
|
|
33
|
+
export declare const CALLBACK_TYPE: {
|
|
34
|
+
readonly UNDEFINED: 0;
|
|
35
|
+
readonly BEGAN: 1;
|
|
36
|
+
readonly START: 2;
|
|
37
|
+
readonly UPDATE: 3;
|
|
38
|
+
readonly END: 4;
|
|
39
|
+
readonly TOUCHES_DOWN: 5;
|
|
40
|
+
readonly TOUCHES_MOVE: 6;
|
|
41
|
+
readonly TOUCHES_UP: 7;
|
|
42
|
+
readonly TOUCHES_CANCELLED: 8;
|
|
43
|
+
};
|
|
44
|
+
export declare type CALLBACK_TYPE = typeof CALLBACK_TYPE[keyof typeof CALLBACK_TYPE];
|
|
45
|
+
export declare abstract class Gesture {
|
|
46
|
+
/**
|
|
47
|
+
* Return array of gestures, providing the same interface for creating and updating
|
|
48
|
+
* handlers, no matter which object was used to create gesture instance.
|
|
49
|
+
*/
|
|
50
|
+
abstract toGestureArray(): GestureType[];
|
|
51
|
+
/**
|
|
52
|
+
* Assign handlerTag to the gesture instance and set ref.current (if a ref is set)
|
|
53
|
+
*/
|
|
54
|
+
abstract initialize(): void;
|
|
55
|
+
/**
|
|
56
|
+
* Make sure that values of properties defining relations are arrays. Do any necessary
|
|
57
|
+
* preprocessing required to configure relations between handlers. Called just before
|
|
58
|
+
* updating the handler on the native side.
|
|
59
|
+
*/
|
|
60
|
+
abstract prepare(): void;
|
|
61
|
+
}
|
|
62
|
+
export declare abstract class BaseGesture<EventPayloadT extends Record<string, unknown>> extends Gesture {
|
|
63
|
+
handlerTag: number;
|
|
64
|
+
handlerName: string;
|
|
65
|
+
config: BaseGestureConfig;
|
|
66
|
+
handlers: HandlerCallbacks<EventPayloadT>;
|
|
67
|
+
private addDependency;
|
|
68
|
+
withRef(ref: React.MutableRefObject<GestureType | undefined>): this;
|
|
69
|
+
protected isWorklet(callback: TouchEventHandlerType | ((event: GestureUpdateEvent<EventPayloadT>) => void) | ((event: GestureStateChangeEvent<EventPayloadT>) => void)): boolean;
|
|
70
|
+
onBegin(callback: (event: GestureStateChangeEvent<EventPayloadT>) => void): this;
|
|
71
|
+
onStart(callback: (event: GestureStateChangeEvent<EventPayloadT>) => void): this;
|
|
72
|
+
onEnd(callback: (event: GestureStateChangeEvent<EventPayloadT>, success: boolean) => void): this;
|
|
73
|
+
onTouchesDown(callback: TouchEventHandlerType): this;
|
|
74
|
+
onTouchesMove(callback: TouchEventHandlerType): this;
|
|
75
|
+
onTouchesUp(callback: TouchEventHandlerType): this;
|
|
76
|
+
onTouchesCancelled(callback: TouchEventHandlerType): this;
|
|
77
|
+
enabled(enabled: boolean): this;
|
|
78
|
+
shouldCancelWhenOutside(value: boolean): this;
|
|
79
|
+
hitSlop(hitSlop: HitSlop): this;
|
|
80
|
+
simultaneousWithExternalGesture(...gestures: Exclude<GestureRef, number>[]): this;
|
|
81
|
+
requireExternalGestureToFail(...gestures: Exclude<GestureRef, number>[]): this;
|
|
82
|
+
initialize(): void;
|
|
83
|
+
toGestureArray(): GestureType[];
|
|
84
|
+
prepare(): void;
|
|
85
|
+
}
|
|
86
|
+
export declare abstract class ContinousBaseGesture<EventPayloadT extends Record<string, unknown>> extends BaseGesture<EventPayloadT> {
|
|
87
|
+
onUpdate(callback: (event: GestureUpdateEvent<EventPayloadT>) => void): this;
|
|
88
|
+
manualActivation(manualActivation: boolean): this;
|
|
89
|
+
}
|
|
90
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Gesture, GestureType } from './gesture';
|
|
2
|
+
export declare class ComposedGesture extends Gesture {
|
|
3
|
+
protected gestures: Gesture[];
|
|
4
|
+
protected simultaneousGestures: GestureType[];
|
|
5
|
+
protected requireGesturesToFail: GestureType[];
|
|
6
|
+
constructor(...gestures: Gesture[]);
|
|
7
|
+
protected prepareSingleGesture(gesture: Gesture, simultaneousGestures: GestureType[], requireGesturesToFail: GestureType[]): void;
|
|
8
|
+
prepare(): void;
|
|
9
|
+
initialize(): void;
|
|
10
|
+
toGestureArray(): GestureType[];
|
|
11
|
+
}
|
|
12
|
+
export declare class SimultaneousGesture extends ComposedGesture {
|
|
13
|
+
prepare(): void;
|
|
14
|
+
}
|
|
15
|
+
export declare class ExclusiveGesture extends ComposedGesture {
|
|
16
|
+
prepare(): void;
|
|
17
|
+
}
|
|
18
|
+
export declare type ComposedGestureType = InstanceType<typeof ComposedGesture>;
|
|
19
|
+
export declare type RaceGestureType = ComposedGestureType;
|
|
20
|
+
export declare type SimultaneousGestureType = InstanceType<typeof SimultaneousGesture>;
|
|
21
|
+
export declare type ExclusiveGestureType = InstanceType<typeof ExclusiveGesture>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { FlingGesture } from './flingGesture';
|
|
2
|
+
import { ForceTouchGesture } from './forceTouchGesture';
|
|
3
|
+
import { Gesture } from './gesture';
|
|
4
|
+
import { ComposedGesture, ExclusiveGesture, SimultaneousGesture } from './gestureComposition';
|
|
5
|
+
import { LongPressGesture } from './longPressGesture';
|
|
6
|
+
import { PanGesture } from './panGesture';
|
|
7
|
+
import { PinchGesture } from './pinchGesture';
|
|
8
|
+
import { RotationGesture } from './rotationGesture';
|
|
9
|
+
import { TapGesture } from './tapGesture';
|
|
10
|
+
import { NativeGesture } from './nativeGesture';
|
|
11
|
+
import { ManualGesture } from './manualGesture';
|
|
12
|
+
export declare const GestureObjects: {
|
|
13
|
+
Tap: () => TapGesture;
|
|
14
|
+
Pan: () => PanGesture;
|
|
15
|
+
Pinch: () => PinchGesture;
|
|
16
|
+
Rotation: () => RotationGesture;
|
|
17
|
+
Fling: () => FlingGesture;
|
|
18
|
+
LongPress: () => LongPressGesture;
|
|
19
|
+
ForceTouch: () => ForceTouchGesture;
|
|
20
|
+
Native: () => NativeGesture;
|
|
21
|
+
Manual: () => ManualGesture;
|
|
22
|
+
/**
|
|
23
|
+
* Builds a composed gesture consisting of gestures provided as parameters.
|
|
24
|
+
* The first one that becomes active cancels the rest of gestures.
|
|
25
|
+
*/
|
|
26
|
+
Race: (...gestures: Gesture[]) => ComposedGesture;
|
|
27
|
+
/**
|
|
28
|
+
* Builds a composed gesture that allows all base gestures to run simultaneously.
|
|
29
|
+
*/
|
|
30
|
+
Simultaneous(...gestures: Gesture[]): SimultaneousGesture;
|
|
31
|
+
/**
|
|
32
|
+
* Builds a composed gesture where only one of the provided gestures can become active.
|
|
33
|
+
* Priority is decided through the order of gestures: the first one has higher priority
|
|
34
|
+
* than the second one, second one has higher priority than the third one, and so on.
|
|
35
|
+
* For example, to make a gesture that recognizes both single and double tap you need
|
|
36
|
+
* to call Exclusive(doubleTap, singleTap).
|
|
37
|
+
*/
|
|
38
|
+
Exclusive(...gestures: Gesture[]): ExclusiveGesture;
|
|
39
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseGesture, BaseGestureConfig } from './gesture';
|
|
2
|
+
import { LongPressGestureConfig, LongPressGestureHandlerEventPayload } from '../LongPressGestureHandler';
|
|
3
|
+
export declare class LongPressGesture extends BaseGesture<LongPressGestureHandlerEventPayload> {
|
|
4
|
+
config: BaseGestureConfig & LongPressGestureConfig;
|
|
5
|
+
constructor();
|
|
6
|
+
minDuration(duration: number): this;
|
|
7
|
+
maxDistance(distance: number): this;
|
|
8
|
+
}
|
|
9
|
+
export declare type LongPressGestureType = InstanceType<typeof LongPressGesture>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseGestureConfig, BaseGesture } from './gesture';
|
|
2
|
+
import { NativeViewGestureConfig, NativeViewGestureHandlerPayload } from '../NativeViewGestureHandler';
|
|
3
|
+
export declare class NativeGesture extends BaseGesture<NativeViewGestureHandlerPayload> {
|
|
4
|
+
config: BaseGestureConfig & NativeViewGestureConfig;
|
|
5
|
+
constructor();
|
|
6
|
+
shouldActivateOnStart(value: boolean): this;
|
|
7
|
+
disallowInterruption(value: boolean): this;
|
|
8
|
+
}
|
|
9
|
+
export declare type NativeGestureType = InstanceType<typeof NativeGesture>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseGestureConfig, ContinousBaseGesture } from './gesture';
|
|
2
|
+
import { PanGestureConfig, PanGestureHandlerEventPayload } from '../PanGestureHandler';
|
|
3
|
+
export declare class PanGesture extends ContinousBaseGesture<PanGestureHandlerEventPayload> {
|
|
4
|
+
config: BaseGestureConfig & PanGestureConfig;
|
|
5
|
+
constructor();
|
|
6
|
+
activeOffsetY(offset: number | number[]): this;
|
|
7
|
+
activeOffsetX(offset: number | number[]): this;
|
|
8
|
+
failOffsetY(offset: number | number[]): this;
|
|
9
|
+
failOffsetX(offset: number | number[]): this;
|
|
10
|
+
minPointers(minPointers: number): this;
|
|
11
|
+
maxPointers(maxPointers: number): this;
|
|
12
|
+
minDistance(distance: number): this;
|
|
13
|
+
minVelocity(velocity: number): this;
|
|
14
|
+
minVelocityX(velocity: number): this;
|
|
15
|
+
minVelocityY(velocity: number): this;
|
|
16
|
+
averageTouches(value: boolean): this;
|
|
17
|
+
enableTrackpadTwoFingerGesture(value: boolean): this;
|
|
18
|
+
}
|
|
19
|
+
export declare type PanGestureType = InstanceType<typeof PanGesture>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ContinousBaseGesture } from './gesture';
|
|
2
|
+
import { PinchGestureHandlerEventPayload } from '../PinchGestureHandler';
|
|
3
|
+
export declare class PinchGesture extends ContinousBaseGesture<PinchGestureHandlerEventPayload> {
|
|
4
|
+
constructor();
|
|
5
|
+
}
|
|
6
|
+
export declare type PinchGestureType = InstanceType<typeof PinchGesture>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ComponentClass } from 'react';
|
|
2
|
+
import { GestureUpdateEvent, GestureStateChangeEvent } from '../gestureHandlerCommon';
|
|
3
|
+
export interface SharedValue<T> {
|
|
4
|
+
value: T;
|
|
5
|
+
}
|
|
6
|
+
declare let Reanimated: {
|
|
7
|
+
default: {
|
|
8
|
+
createAnimatedComponent<P extends object>(component: ComponentClass<P>, options?: unknown): ComponentClass<P>;
|
|
9
|
+
};
|
|
10
|
+
useEvent: (callback: (event: GestureUpdateEvent | GestureStateChangeEvent) => void, events: string[], rebuild: boolean) => unknown;
|
|
11
|
+
useSharedValue: <T>(value: T) => SharedValue<T>;
|
|
12
|
+
setGestureState: (handlerTag: number, newState: number) => void;
|
|
13
|
+
};
|
|
14
|
+
export { Reanimated };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ContinousBaseGesture } from './gesture';
|
|
2
|
+
import { RotationGestureHandlerEventPayload } from '../RotationGestureHandler';
|
|
3
|
+
export declare class RotationGesture extends ContinousBaseGesture<RotationGestureHandlerEventPayload> {
|
|
4
|
+
constructor();
|
|
5
|
+
}
|
|
6
|
+
export declare type RotationGestureType = InstanceType<typeof RotationGesture>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseGestureConfig, BaseGesture } from './gesture';
|
|
2
|
+
import { TapGestureConfig, TapGestureHandlerEventPayload } from '../TapGestureHandler';
|
|
3
|
+
export declare class TapGesture extends BaseGesture<TapGestureHandlerEventPayload> {
|
|
4
|
+
config: BaseGestureConfig & TapGestureConfig;
|
|
5
|
+
constructor();
|
|
6
|
+
minPointers(minPointers: number): this;
|
|
7
|
+
numberOfTaps(count: number): this;
|
|
8
|
+
maxDistance(maxDist: number): this;
|
|
9
|
+
maxDuration(duration: number): this;
|
|
10
|
+
maxDelay(delay: number): this;
|
|
11
|
+
maxDeltaX(delta: number): this;
|
|
12
|
+
maxDeltaY(delta: number): this;
|
|
13
|
+
}
|
|
14
|
+
export declare type TapGestureType = InstanceType<typeof TapGesture>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { GestureType } from './gestures/gesture';
|
|
2
|
+
export declare const handlerIDToTag: Record<string, number>;
|
|
3
|
+
export declare function getNextHandlerTag(): number;
|
|
4
|
+
export declare function registerHandler(handlerTag: number, handler: GestureType): void;
|
|
5
|
+
export declare function unregisterHandler(handlerTag: number): void;
|
|
6
|
+
export declare function findHandler(handlerTag: number): import("./gestures/gesture").BaseGesture<Record<string, unknown>> | import("./gestures/gesture").BaseGesture<Record<string, never>> | import("./gestures/gesture").BaseGesture<import("./TapGestureHandler").TapGestureHandlerEventPayload> | import("./gestures/gesture").BaseGesture<import("./PanGestureHandler").PanGestureHandlerEventPayload> | import("./gestures/gesture").BaseGesture<import("./LongPressGestureHandler").LongPressGestureHandlerEventPayload> | import("./gestures/gesture").BaseGesture<import("./RotationGestureHandler").RotationGestureHandlerEventPayload> | import("./gestures/gesture").BaseGesture<import("./PinchGestureHandler").PinchGestureHandlerEventPayload> | import("./gestures/gesture").BaseGesture<import("./FlingGestureHandler").FlingGestureHandlerEventPayload> | import("./gestures/gesture").BaseGesture<import("./ForceTouchGestureHandler").ForceTouchGestureHandlerEventPayload> | import("./gestures/gesture").BaseGesture<import("./NativeViewGestureHandler").NativeViewGestureHandlerPayload> | undefined;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export { Directions } from './Directions';
|
|
2
|
+
export { State } from './State';
|
|
3
|
+
export { default as gestureHandlerRootHOC } from './gestureHandlerRootHOC';
|
|
4
|
+
export { default as GestureHandlerRootView } from './GestureHandlerRootView';
|
|
5
|
+
export type { GestureEvent, HandlerStateChangeEvent, GestureEventPayload, HandlerStateChangeEventPayload, GestureTouchEvent, TouchData, GestureUpdateEvent, GestureStateChangeEvent, } from './handlers/gestureHandlerCommon';
|
|
6
|
+
export type { GestureType } from './handlers/gestures/gesture';
|
|
7
|
+
export type { TapGestureHandlerEventPayload, TapGestureHandlerProps, } from './handlers/TapGestureHandler';
|
|
8
|
+
export type { ForceTouchGestureHandlerEventPayload, ForceTouchGestureHandlerProps, } from './handlers/ForceTouchGestureHandler';
|
|
9
|
+
export type { LongPressGestureHandlerEventPayload, LongPressGestureHandlerProps, } from './handlers/LongPressGestureHandler';
|
|
10
|
+
export type { PanGestureHandlerEventPayload, PanGestureHandlerProps, } from './handlers/PanGestureHandler';
|
|
11
|
+
export type { PinchGestureHandlerEventPayload, PinchGestureHandlerProps, } from './handlers/PinchGestureHandler';
|
|
12
|
+
export type { RotationGestureHandlerEventPayload, RotationGestureHandlerProps, } from './handlers/RotationGestureHandler';
|
|
13
|
+
export type { FlingGestureHandlerEventPayload, FlingGestureHandlerProps, } from './handlers/FlingGestureHandler';
|
|
14
|
+
export { TapGestureHandler } from './handlers/TapGestureHandler';
|
|
15
|
+
export { ForceTouchGestureHandler } from './handlers/ForceTouchGestureHandler';
|
|
16
|
+
export { LongPressGestureHandler } from './handlers/LongPressGestureHandler';
|
|
17
|
+
export { PanGestureHandler } from './handlers/PanGestureHandler';
|
|
18
|
+
export { PinchGestureHandler } from './handlers/PinchGestureHandler';
|
|
19
|
+
export { RotationGestureHandler } from './handlers/RotationGestureHandler';
|
|
20
|
+
export { FlingGestureHandler } from './handlers/FlingGestureHandler';
|
|
21
|
+
export { default as createNativeWrapper } from './handlers/createNativeWrapper';
|
|
22
|
+
export type { NativeViewGestureHandlerPayload, NativeViewGestureHandlerProps, } from './handlers/NativeViewGestureHandler';
|
|
23
|
+
export { GestureDetector } from './handlers/gestures/GestureDetector';
|
|
24
|
+
export { GestureObjects as Gesture } from './handlers/gestures/gestureObjects';
|
|
25
|
+
export { TapGestureType as TapGesture } from './handlers/gestures/tapGesture';
|
|
26
|
+
export { PanGestureType as PanGesture } from './handlers/gestures/panGesture';
|
|
27
|
+
export { FlingGestureType as FlingGesture } from './handlers/gestures/flingGesture';
|
|
28
|
+
export { LongPressGestureType as LongPressGesture } from './handlers/gestures/longPressGesture';
|
|
29
|
+
export { PinchGestureType as PinchGesture } from './handlers/gestures/pinchGesture';
|
|
30
|
+
export { RotationGestureType as RotationGesture } from './handlers/gestures/rotationGesture';
|
|
31
|
+
export { ForceTouchGestureType as ForceTouchGesture } from './handlers/gestures/forceTouchGesture';
|
|
32
|
+
export { NativeGestureType as NativeGesture } from './handlers/gestures/nativeGesture';
|
|
33
|
+
export { ManualGestureType as ManualGesture } from './handlers/gestures/manualGesture';
|
|
34
|
+
export { ComposedGestureType as ComposedGesture, RaceGestureType as RaceGesture, SimultaneousGestureType as SimultaneousGesture, ExclusiveGestureType as ExclusiveGesture, } from './handlers/gestures/gestureComposition';
|
|
35
|
+
export { GestureStateManagerType as GestureStateManager } from './handlers/gestures/gestureStateManager';
|
|
36
|
+
export { NativeViewGestureHandler } from './handlers/NativeViewGestureHandler';
|
|
37
|
+
export type { RawButtonProps, BaseButtonProps, RectButtonProps, BorderlessButtonProps, } from './components/GestureButtons';
|
|
38
|
+
export { RawButton, BaseButton, RectButton, BorderlessButton, } from './components/GestureButtons';
|
|
39
|
+
export { TouchableHighlight, TouchableNativeFeedback, TouchableOpacity, TouchableWithoutFeedback, } from './components/touchables';
|
|
40
|
+
export { ScrollView, Switch, TextInput, DrawerLayoutAndroid, FlatList, } from './components/GestureComponents';
|
|
41
|
+
export type { GestureHandlerGestureEvent, GestureHandlerStateChangeEvent, GestureHandlerGestureEventNativeEvent, GestureHandlerStateChangeNativeEvent, NativeViewGestureHandlerGestureEvent, NativeViewGestureHandlerStateChangeEvent, TapGestureHandlerGestureEvent, TapGestureHandlerStateChangeEvent, ForceTouchGestureHandlerGestureEvent, ForceTouchGestureHandlerStateChangeEvent, LongPressGestureHandlerGestureEvent, LongPressGestureHandlerStateChangeEvent, PanGestureHandlerGestureEvent, PanGestureHandlerStateChangeEvent, PinchGestureHandlerGestureEvent, PinchGestureHandlerStateChangeEvent, RotationGestureHandlerGestureEvent, RotationGestureHandlerStateChangeEvent, FlingGestureHandlerGestureEvent, FlingGestureHandlerStateChangeEvent, NativeViewGestureHandlerProperties, TapGestureHandlerProperties, LongPressGestureHandlerProperties, PanGestureHandlerProperties, PinchGestureHandlerProperties, RotationGestureHandlerProperties, FlingGestureHandlerProperties, ForceTouchGestureHandlerProperties, RawButtonProperties, BaseButtonProperties, RectButtonProperties, BorderlessButtonProperties, } from './handlers/gestureHandlerTypesCompat';
|
|
42
|
+
export { default as Swipeable } from './components/Swipeable';
|
|
43
|
+
export type { DrawerLayoutProps, DrawerPosition, DrawerState, DrawerType, DrawerLockMode, DrawerKeyboardDismissMode, } from './components/DrawerLayout';
|
|
44
|
+
export { default as DrawerLayout } from './components/DrawerLayout';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function initialize(): void;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { TouchableHighlight, TouchableNativeFeedback, TouchableOpacity, TouchableWithoutFeedback, ScrollView, FlatList, Switch, TextInput, DrawerLayoutAndroid, View } from 'react-native';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
readonly TouchableHighlight: typeof TouchableHighlight;
|
|
4
|
+
readonly TouchableNativeFeedback: typeof TouchableNativeFeedback;
|
|
5
|
+
readonly TouchableOpacity: typeof TouchableOpacity;
|
|
6
|
+
readonly TouchableWithoutFeedback: typeof TouchableWithoutFeedback;
|
|
7
|
+
readonly ScrollView: typeof ScrollView;
|
|
8
|
+
readonly FlatList: typeof FlatList;
|
|
9
|
+
readonly Switch: typeof Switch;
|
|
10
|
+
readonly TextInput: typeof TextInput;
|
|
11
|
+
readonly DrawerLayoutAndroid: typeof DrawerLayoutAndroid;
|
|
12
|
+
readonly NativeViewGestureHandler: typeof View;
|
|
13
|
+
readonly TapGestureHandler: typeof View;
|
|
14
|
+
readonly ForceTouchGestureHandler: typeof View;
|
|
15
|
+
readonly LongPressGestureHandler: typeof View;
|
|
16
|
+
readonly PinchGestureHandler: typeof View;
|
|
17
|
+
readonly RotationGestureHandler: typeof View;
|
|
18
|
+
readonly FlingGestureHandler: typeof View;
|
|
19
|
+
readonly RawButton: typeof TouchableNativeFeedback;
|
|
20
|
+
readonly BaseButton: typeof TouchableNativeFeedback;
|
|
21
|
+
readonly RectButton: typeof TouchableNativeFeedback;
|
|
22
|
+
readonly BorderlessButton: typeof TouchableNativeFeedback;
|
|
23
|
+
readonly PanGestureHandler: typeof View;
|
|
24
|
+
readonly attachGestureHandler: () => void;
|
|
25
|
+
readonly createGestureHandler: () => void;
|
|
26
|
+
readonly dropGestureHandler: () => void;
|
|
27
|
+
readonly updateGestureHandler: () => void;
|
|
28
|
+
readonly Directions: {
|
|
29
|
+
readonly RIGHT: 1;
|
|
30
|
+
readonly LEFT: 2;
|
|
31
|
+
readonly UP: 4;
|
|
32
|
+
readonly DOWN: 8;
|
|
33
|
+
};
|
|
34
|
+
readonly State: {
|
|
35
|
+
readonly UNDETERMINED: 0;
|
|
36
|
+
readonly FAILED: 1;
|
|
37
|
+
readonly BEGAN: 2;
|
|
38
|
+
readonly CANCELLED: 3;
|
|
39
|
+
readonly ACTIVE: 4;
|
|
40
|
+
readonly END: 5;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export default _default;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function toArray<T>(object: T | T[]): T[];
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|