react-native-gesture-handler 2.27.0 → 2.27.2
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/ReanimatedSwipeable/package.json +4 -4
- package/android/build.gradle +8 -1
- package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandler.kt +14 -8
- package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerOrchestrator.kt +10 -5
- package/apple/RNGestureHandler.h +4 -0
- package/apple/RNGestureHandler.mm +41 -6
- package/jestSetup.js +22 -3
- package/lib/commonjs/ActionType.js +15 -0
- package/lib/commonjs/ActionType.js.map +1 -0
- package/lib/commonjs/Directions.js +31 -0
- package/lib/commonjs/Directions.js.map +1 -0
- package/lib/commonjs/EnableNewWebImplementation.js +40 -0
- package/lib/commonjs/EnableNewWebImplementation.js.map +1 -0
- package/lib/commonjs/GestureHandlerRootViewContext.js +10 -0
- package/lib/commonjs/GestureHandlerRootViewContext.js.map +1 -0
- package/lib/commonjs/PlatformConstants.js +9 -0
- package/lib/commonjs/PlatformConstants.js.map +1 -0
- package/lib/commonjs/PlatformConstants.web.js +12 -0
- package/lib/commonjs/PlatformConstants.web.js.map +1 -0
- package/lib/commonjs/PointerType.js +15 -0
- package/lib/commonjs/PointerType.js.map +1 -0
- package/lib/commonjs/RNGestureHandlerModule.js +12 -0
- package/lib/commonjs/RNGestureHandlerModule.js.map +1 -0
- package/lib/commonjs/RNGestureHandlerModule.web.js +95 -0
- package/lib/commonjs/RNGestureHandlerModule.web.js.map +1 -0
- package/lib/commonjs/RNGestureHandlerModule.windows.js +56 -0
- package/lib/commonjs/RNGestureHandlerModule.windows.js.map +1 -0
- package/lib/commonjs/RNRenderer.js +14 -0
- package/lib/commonjs/RNRenderer.js.map +1 -0
- package/lib/commonjs/RNRenderer.web.js +10 -0
- package/lib/commonjs/RNRenderer.web.js.map +1 -0
- package/lib/commonjs/State.js +19 -0
- package/lib/commonjs/State.js.map +1 -0
- package/lib/commonjs/TouchEventType.js +16 -0
- package/lib/commonjs/TouchEventType.js.map +1 -0
- package/lib/commonjs/components/DrawerLayout.js +548 -0
- package/lib/commonjs/components/DrawerLayout.js.map +1 -0
- package/lib/commonjs/components/GestureButtons.js +211 -0
- package/lib/commonjs/components/GestureButtons.js.map +1 -0
- package/lib/commonjs/components/GestureButtonsProps.js +6 -0
- package/lib/commonjs/components/GestureButtonsProps.js.map +1 -0
- package/lib/commonjs/components/GestureComponents.js +106 -0
- package/lib/commonjs/components/GestureComponents.js.map +1 -0
- package/lib/commonjs/components/GestureComponents.web.js +39 -0
- package/lib/commonjs/components/GestureComponents.web.js.map +1 -0
- package/lib/commonjs/components/GestureHandlerButton.js +10 -0
- package/lib/commonjs/components/GestureHandlerButton.js.map +1 -0
- package/lib/commonjs/components/GestureHandlerButton.web.js +16 -0
- package/lib/commonjs/components/GestureHandlerButton.web.js.map +1 -0
- package/lib/commonjs/components/GestureHandlerRootView.android.js +36 -0
- package/lib/commonjs/components/GestureHandlerRootView.android.js.map +1 -0
- package/lib/commonjs/components/GestureHandlerRootView.js +35 -0
- package/lib/commonjs/components/GestureHandlerRootView.js.map +1 -0
- package/lib/commonjs/components/GestureHandlerRootView.web.js +30 -0
- package/lib/commonjs/components/GestureHandlerRootView.web.js.map +1 -0
- package/lib/commonjs/components/Pressable/Pressable.js +266 -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 +87 -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 +370 -0
- package/lib/commonjs/components/Swipeable.js.map +1 -0
- package/lib/commonjs/components/Text.js +60 -0
- package/lib/commonjs/components/Text.js.map +1 -0
- package/lib/commonjs/components/gestureHandlerRootHOC.js +34 -0
- package/lib/commonjs/components/gestureHandlerRootHOC.js.map +1 -0
- 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 +245 -0
- package/lib/commonjs/components/touchables/GenericTouchable.js.map +1 -0
- 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 +93 -0
- package/lib/commonjs/components/touchables/TouchableHighlight.js.map +1 -0
- package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js +84 -0
- package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js.map +1 -0
- package/lib/commonjs/components/touchables/TouchableNativeFeedback.js +13 -0
- package/lib/commonjs/components/touchables/TouchableNativeFeedback.js.map +1 -0
- 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 +65 -0
- package/lib/commonjs/components/touchables/TouchableOpacity.js.map +1 -0
- package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js +33 -0
- package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js.map +1 -0
- package/lib/commonjs/components/touchables/index.js +35 -0
- package/lib/commonjs/components/touchables/index.js.map +1 -0
- 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 +51 -0
- package/lib/commonjs/getShadowNodeFromRef.js.map +1 -0
- package/lib/commonjs/getShadowNodeFromRef.web.js +14 -0
- package/lib/commonjs/getShadowNodeFromRef.web.js.map +1 -0
- package/lib/commonjs/ghQueueMicrotask.js +10 -0
- package/lib/commonjs/ghQueueMicrotask.js.map +1 -0
- package/lib/commonjs/handlers/FlingGestureHandler.js +31 -0
- package/lib/commonjs/handlers/FlingGestureHandler.js.map +1 -0
- package/lib/commonjs/handlers/ForceTouchGestureHandler.js +46 -0
- package/lib/commonjs/handlers/ForceTouchGestureHandler.js.map +1 -0
- package/lib/commonjs/handlers/GestureHandlerEventPayload.js +6 -0
- package/lib/commonjs/handlers/GestureHandlerEventPayload.js.map +1 -0
- package/lib/commonjs/handlers/LongPressGestureHandler.js +33 -0
- package/lib/commonjs/handlers/LongPressGestureHandler.js.map +1 -0
- package/lib/commonjs/handlers/NativeViewGestureHandler.ts +59 -0
- package/lib/commonjs/handlers/PanGestureHandler.js +112 -0
- package/lib/commonjs/handlers/PanGestureHandler.js.map +1 -0
- package/lib/commonjs/handlers/PinchGestureHandler.js +29 -0
- package/lib/commonjs/handlers/PinchGestureHandler.js.map +1 -0
- package/lib/commonjs/handlers/PressabilityDebugView.js +13 -0
- package/lib/commonjs/handlers/PressabilityDebugView.js.map +1 -0
- package/lib/commonjs/handlers/PressabilityDebugView.web.js +11 -0
- package/lib/commonjs/handlers/PressabilityDebugView.web.js.map +1 -0
- package/lib/commonjs/handlers/RotationGestureHandler.js +29 -0
- package/lib/commonjs/handlers/RotationGestureHandler.js.map +1 -0
- package/lib/commonjs/handlers/TapGestureHandler.js +33 -0
- package/lib/commonjs/handlers/TapGestureHandler.js.map +1 -0
- package/lib/commonjs/handlers/createHandler.js +393 -0
- package/lib/commonjs/handlers/createHandler.js.map +1 -0
- package/lib/commonjs/handlers/createNativeWrapper.js +78 -0
- package/lib/commonjs/handlers/createNativeWrapper.js.map +1 -0
- 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 +27 -0
- package/lib/commonjs/handlers/gestureHandlerCommon.js.map +1 -0
- package/lib/commonjs/handlers/gestureHandlerTypesCompat.js +6 -0
- package/lib/commonjs/handlers/gestureHandlerTypesCompat.js.map +1 -0
- 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 +41 -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 +106 -0
- package/lib/commonjs/handlers/gestures/eventReceiver.js.map +1 -0
- package/lib/commonjs/handlers/gestures/flingGesture.js +37 -0
- package/lib/commonjs/handlers/gestures/flingGesture.js.map +1 -0
- package/lib/commonjs/handlers/gestures/forceTouchGesture.js +80 -0
- package/lib/commonjs/handlers/gestures/forceTouchGesture.js.map +1 -0
- package/lib/commonjs/handlers/gestures/gesture.js +338 -0
- package/lib/commonjs/handlers/gestures/gesture.js.map +1 -0
- package/lib/commonjs/handlers/gestures/gestureComposition.js +90 -0
- package/lib/commonjs/handlers/gestures/gestureComposition.js.map +1 -0
- package/lib/commonjs/handlers/gestures/gestureObjects.js +132 -0
- package/lib/commonjs/handlers/gestures/gestureObjects.js.map +1 -0
- package/lib/commonjs/handlers/gestures/gestureStateManager.js +69 -0
- package/lib/commonjs/handlers/gestures/gestureStateManager.js.map +1 -0
- package/lib/commonjs/handlers/gestures/gestureStateManager.web.js +27 -0
- package/lib/commonjs/handlers/gestures/gestureStateManager.web.js.map +1 -0
- package/lib/commonjs/handlers/gestures/hoverGesture.js +57 -0
- package/lib/commonjs/handlers/gestures/hoverGesture.js.map +1 -0
- package/lib/commonjs/handlers/gestures/longPressGesture.js +46 -0
- package/lib/commonjs/handlers/gestures/longPressGesture.js.map +1 -0
- package/lib/commonjs/handlers/gestures/manualGesture.js +25 -0
- package/lib/commonjs/handlers/gestures/manualGesture.js.map +1 -0
- package/lib/commonjs/handlers/gestures/nativeGesture.ts +33 -0
- package/lib/commonjs/handlers/gestures/panGesture.js +197 -0
- package/lib/commonjs/handlers/gestures/panGesture.js.map +1 -0
- package/lib/commonjs/handlers/gestures/pinchGesture.js +38 -0
- package/lib/commonjs/handlers/gestures/pinchGesture.js.map +1 -0
- package/lib/commonjs/handlers/gestures/reanimatedWrapper.js +29 -0
- package/lib/commonjs/handlers/gestures/reanimatedWrapper.js.map +1 -0
- package/lib/commonjs/handlers/gestures/rotationGesture.js +38 -0
- package/lib/commonjs/handlers/gestures/rotationGesture.js.map +1 -0
- package/lib/commonjs/handlers/gestures/tapGesture.js +87 -0
- package/lib/commonjs/handlers/gestures/tapGesture.js.map +1 -0
- package/lib/commonjs/handlers/getNextHandlerTag.js +11 -0
- package/lib/commonjs/handlers/getNextHandlerTag.js.map +1 -0
- package/lib/commonjs/handlers/handlersRegistry.js +50 -0
- package/lib/commonjs/handlers/handlersRegistry.js.map +1 -0
- package/lib/commonjs/handlers/utils.js +69 -0
- package/lib/commonjs/handlers/utils.js.map +1 -0
- package/lib/commonjs/index.js +269 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/init.js +25 -0
- package/lib/commonjs/init.js.map +1 -0
- package/lib/commonjs/jestUtils/index.js +19 -0
- package/lib/commonjs/jestUtils/index.js.map +1 -0
- package/lib/commonjs/jestUtils/jestUtils.js +316 -0
- package/lib/commonjs/jestUtils/jestUtils.js.map +1 -0
- 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/mountRegistry.js +37 -0
- package/lib/commonjs/mountRegistry.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/specs/NativeRNGestureHandlerModule.ts +26 -0
- package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.ts +22 -0
- package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.ts +6 -0
- package/lib/commonjs/typeUtils.js +2 -0
- package/lib/commonjs/typeUtils.js.map +1 -0
- package/lib/commonjs/utils.js +95 -0
- package/lib/commonjs/utils.js.map +1 -0
- package/lib/commonjs/web/Gestures.js +48 -0
- package/lib/commonjs/web/Gestures.js.map +1 -0
- package/lib/commonjs/web/constants.js +9 -0
- package/lib/commonjs/web/constants.js.map +1 -0
- package/lib/commonjs/web/detectors/RotationGestureDetector.js +124 -0
- package/lib/commonjs/web/detectors/RotationGestureDetector.js.map +1 -0
- package/lib/commonjs/web/detectors/ScaleGestureDetector.js +111 -0
- package/lib/commonjs/web/detectors/ScaleGestureDetector.js.map +1 -0
- package/lib/commonjs/web/handlers/FlingGestureHandler.js +143 -0
- package/lib/commonjs/web/handlers/FlingGestureHandler.js.map +1 -0
- package/lib/commonjs/web/handlers/GestureHandler.js +687 -0
- package/lib/commonjs/web/handlers/GestureHandler.js.map +1 -0
- package/lib/commonjs/web/handlers/HoverGestureHandler.js +45 -0
- package/lib/commonjs/web/handlers/HoverGestureHandler.js.map +1 -0
- 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 +146 -0
- package/lib/commonjs/web/handlers/LongPressGestureHandler.js.map +1 -0
- package/lib/commonjs/web/handlers/ManualGestureHandler.js +38 -0
- package/lib/commonjs/web/handlers/ManualGestureHandler.js.map +1 -0
- package/lib/commonjs/web/handlers/NativeViewGestureHandler.ts +175 -0
- package/lib/commonjs/web/handlers/PanGestureHandler.js +399 -0
- package/lib/commonjs/web/handlers/PanGestureHandler.js.map +1 -0
- package/lib/commonjs/web/handlers/PinchGestureHandler.js +122 -0
- package/lib/commonjs/web/handlers/PinchGestureHandler.js.map +1 -0
- package/lib/commonjs/web/handlers/RotationGestureHandler.js +129 -0
- package/lib/commonjs/web/handlers/RotationGestureHandler.js.map +1 -0
- package/lib/commonjs/web/handlers/TapGestureHandler.js +215 -0
- package/lib/commonjs/web/handlers/TapGestureHandler.js.map +1 -0
- package/lib/commonjs/web/interfaces.js +32 -0
- package/lib/commonjs/web/interfaces.js.map +1 -0
- package/lib/commonjs/web/tools/CircularBuffer.js +40 -0
- package/lib/commonjs/web/tools/CircularBuffer.js.map +1 -0
- package/lib/commonjs/web/tools/EventManager.js +94 -0
- package/lib/commonjs/web/tools/EventManager.js.map +1 -0
- package/lib/commonjs/web/tools/GestureHandlerDelegate.js +6 -0
- package/lib/commonjs/web/tools/GestureHandlerDelegate.js.map +1 -0
- package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js +267 -0
- package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js.map +1 -0
- package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js +170 -0
- package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js.map +1 -0
- package/lib/commonjs/web/tools/InteractionManager.js +96 -0
- package/lib/commonjs/web/tools/InteractionManager.js.map +1 -0
- package/lib/commonjs/web/tools/KeyboardEventManager.js +82 -0
- package/lib/commonjs/web/tools/KeyboardEventManager.js.map +1 -0
- package/lib/commonjs/web/tools/LeastSquareSolver.js +159 -0
- package/lib/commonjs/web/tools/LeastSquareSolver.js.map +1 -0
- package/lib/commonjs/web/tools/NodeManager.js +39 -0
- package/lib/commonjs/web/tools/NodeManager.js.map +1 -0
- package/lib/commonjs/web/tools/PointerEventManager.js +189 -0
- package/lib/commonjs/web/tools/PointerEventManager.js.map +1 -0
- package/lib/commonjs/web/tools/PointerTracker.js +192 -0
- package/lib/commonjs/web/tools/PointerTracker.js.map +1 -0
- 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 +85 -0
- package/lib/commonjs/web/tools/VelocityTracker.js.map +1 -0
- 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 +235 -0
- package/lib/commonjs/web/utils.js.map +1 -0
- package/lib/commonjs/web_hammer/DiscreteGestureHandler.js +93 -0
- package/lib/commonjs/web_hammer/DiscreteGestureHandler.js.map +1 -0
- package/lib/commonjs/web_hammer/DraggingGestureHandler.js +43 -0
- package/lib/commonjs/web_hammer/DraggingGestureHandler.js.map +1 -0
- package/lib/commonjs/web_hammer/Errors.js +13 -0
- package/lib/commonjs/web_hammer/Errors.js.map +1 -0
- package/lib/commonjs/web_hammer/FlingGestureHandler.js +139 -0
- package/lib/commonjs/web_hammer/FlingGestureHandler.js.map +1 -0
- package/lib/commonjs/web_hammer/GestureHandler.js +484 -0
- package/lib/commonjs/web_hammer/GestureHandler.js.map +1 -0
- package/lib/commonjs/web_hammer/IndiscreteGestureHandler.js +45 -0
- package/lib/commonjs/web_hammer/IndiscreteGestureHandler.js.map +1 -0
- package/lib/commonjs/web_hammer/LongPressGestureHandler.js +57 -0
- package/lib/commonjs/web_hammer/LongPressGestureHandler.js.map +1 -0
- package/lib/commonjs/web_hammer/NativeViewGestureHandler.ts +47 -0
- package/lib/commonjs/web_hammer/NodeManager.js +41 -0
- package/lib/commonjs/web_hammer/NodeManager.js.map +1 -0
- package/lib/commonjs/web_hammer/PanGestureHandler.js +167 -0
- package/lib/commonjs/web_hammer/PanGestureHandler.js.map +1 -0
- package/lib/commonjs/web_hammer/PinchGestureHandler.js +31 -0
- package/lib/commonjs/web_hammer/PinchGestureHandler.js.map +1 -0
- package/lib/commonjs/web_hammer/PressGestureHandler.js +153 -0
- package/lib/commonjs/web_hammer/PressGestureHandler.js.map +1 -0
- package/lib/commonjs/web_hammer/RotationGestureHandler.js +32 -0
- package/lib/commonjs/web_hammer/RotationGestureHandler.js.map +1 -0
- package/lib/commonjs/web_hammer/TapGestureHandler.js +165 -0
- package/lib/commonjs/web_hammer/TapGestureHandler.js.map +1 -0
- package/lib/commonjs/web_hammer/constants.js +51 -0
- package/lib/commonjs/web_hammer/constants.js.map +1 -0
- package/lib/commonjs/web_hammer/utils.js +32 -0
- package/lib/commonjs/web_hammer/utils.js.map +1 -0
- package/lib/module/ActionType.js +11 -0
- package/lib/module/ActionType.js.map +1 -0
- package/lib/module/Directions.js +27 -0
- package/lib/module/Directions.js.map +1 -0
- package/lib/module/EnableNewWebImplementation.js +34 -0
- package/lib/module/EnableNewWebImplementation.js.map +1 -0
- package/lib/module/GestureHandlerRootViewContext.js +5 -0
- package/lib/module/GestureHandlerRootViewContext.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 +8 -0
- package/lib/module/PlatformConstants.web.js.map +1 -0
- package/lib/module/PointerType.js +11 -0
- package/lib/module/PointerType.js.map +1 -0
- package/lib/module/RNGestureHandlerModule.js +8 -0
- package/lib/module/RNGestureHandlerModule.js.map +1 -0
- package/lib/module/RNGestureHandlerModule.web.js +90 -0
- package/lib/module/RNGestureHandlerModule.web.js.map +1 -0
- package/lib/module/RNGestureHandlerModule.windows.js +50 -0
- package/lib/module/RNGestureHandlerModule.windows.js.map +1 -0
- package/lib/module/RNRenderer.js +6 -0
- package/lib/module/RNRenderer.js.map +1 -0
- package/lib/module/RNRenderer.web.js +6 -0
- package/lib/module/RNRenderer.web.js.map +1 -0
- package/lib/module/State.js +15 -0
- package/lib/module/State.js.map +1 -0
- package/lib/module/TouchEventType.js +12 -0
- package/lib/module/TouchEventType.js.map +1 -0
- package/lib/module/components/DrawerLayout.js +541 -0
- package/lib/module/components/DrawerLayout.js.map +1 -0
- package/lib/module/components/GestureButtons.js +199 -0
- package/lib/module/components/GestureButtons.js.map +1 -0
- package/lib/module/components/GestureButtonsProps.js +4 -0
- package/lib/module/components/GestureButtonsProps.js.map +1 -0
- package/lib/module/components/GestureComponents.js +100 -0
- package/lib/module/components/GestureComponents.js.map +1 -0
- package/lib/module/components/GestureComponents.web.js +32 -0
- package/lib/module/components/GestureComponents.web.js.map +1 -0
- package/lib/module/components/GestureHandlerButton.js +5 -0
- package/lib/module/components/GestureHandlerButton.js.map +1 -0
- package/lib/module/components/GestureHandlerButton.web.js +11 -0
- package/lib/module/components/GestureHandlerButton.web.js.map +1 -0
- package/lib/module/components/GestureHandlerRootView.android.js +30 -0
- package/lib/module/components/GestureHandlerRootView.android.js.map +1 -0
- package/lib/module/components/GestureHandlerRootView.js +29 -0
- package/lib/module/components/GestureHandlerRootView.js.map +1 -0
- package/lib/module/components/GestureHandlerRootView.web.js +24 -0
- package/lib/module/components/GestureHandlerRootView.web.js.map +1 -0
- package/lib/module/components/Pressable/Pressable.js +260 -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 +82 -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 +364 -0
- package/lib/module/components/Swipeable.js.map +1 -0
- package/lib/module/components/Text.js +55 -0
- package/lib/module/components/Text.js.map +1 -0
- package/lib/module/components/gestureHandlerRootHOC.js +28 -0
- package/lib/module/components/gestureHandlerRootHOC.js.map +1 -0
- 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 +239 -0
- package/lib/module/components/touchables/GenericTouchable.js.map +1 -0
- 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 +87 -0
- package/lib/module/components/touchables/TouchableHighlight.js.map +1 -0
- package/lib/module/components/touchables/TouchableNativeFeedback.android.js +77 -0
- package/lib/module/components/touchables/TouchableNativeFeedback.android.js.map +1 -0
- package/lib/module/components/touchables/TouchableNativeFeedback.js +10 -0
- package/lib/module/components/touchables/TouchableNativeFeedback.js.map +1 -0
- 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 +59 -0
- package/lib/module/components/touchables/TouchableOpacity.js.map +1 -0
- package/lib/module/components/touchables/TouchableWithoutFeedback.js +27 -0
- package/lib/module/components/touchables/TouchableWithoutFeedback.js.map +1 -0
- package/lib/module/components/touchables/index.js +7 -0
- package/lib/module/components/touchables/index.js.map +1 -0
- 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 +47 -0
- package/lib/module/getShadowNodeFromRef.js.map +1 -0
- package/lib/module/getShadowNodeFromRef.web.js +10 -0
- package/lib/module/getShadowNodeFromRef.web.js.map +1 -0
- package/lib/module/ghQueueMicrotask.js +6 -0
- package/lib/module/ghQueueMicrotask.js.map +1 -0
- package/lib/module/handlers/FlingGestureHandler.js +26 -0
- package/lib/module/handlers/FlingGestureHandler.js.map +1 -0
- package/lib/module/handlers/ForceTouchGestureHandler.js +41 -0
- package/lib/module/handlers/ForceTouchGestureHandler.js.map +1 -0
- package/lib/module/handlers/GestureHandlerEventPayload.js +4 -0
- package/lib/module/handlers/GestureHandlerEventPayload.js.map +1 -0
- package/lib/module/handlers/LongPressGestureHandler.js +28 -0
- package/lib/module/handlers/LongPressGestureHandler.js.map +1 -0
- package/lib/module/handlers/NativeViewGestureHandler.ts +59 -0
- package/lib/module/handlers/PanGestureHandler.js +105 -0
- package/lib/module/handlers/PanGestureHandler.js.map +1 -0
- package/lib/module/handlers/PinchGestureHandler.js +25 -0
- package/lib/module/handlers/PinchGestureHandler.js.map +1 -0
- package/lib/module/handlers/PressabilityDebugView.js +5 -0
- package/lib/module/handlers/PressabilityDebugView.js.map +1 -0
- package/lib/module/handlers/PressabilityDebugView.web.js +7 -0
- package/lib/module/handlers/PressabilityDebugView.web.js.map +1 -0
- package/lib/module/handlers/RotationGestureHandler.js +25 -0
- package/lib/module/handlers/RotationGestureHandler.js.map +1 -0
- package/lib/module/handlers/TapGestureHandler.js +28 -0
- package/lib/module/handlers/TapGestureHandler.js.map +1 -0
- package/lib/module/handlers/createHandler.js +387 -0
- package/lib/module/handlers/createHandler.js.map +1 -0
- package/lib/module/handlers/createNativeWrapper.js +75 -0
- package/lib/module/handlers/createNativeWrapper.js.map +1 -0
- 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 +26 -0
- package/lib/module/handlers/gestureHandlerCommon.js.map +1 -0
- package/lib/module/handlers/gestureHandlerTypesCompat.js +4 -0
- package/lib/module/handlers/gestureHandlerTypesCompat.js.map +1 -0
- 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 +36 -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 +100 -0
- package/lib/module/handlers/gestures/eventReceiver.js.map +1 -0
- package/lib/module/handlers/gestures/flingGesture.js +32 -0
- package/lib/module/handlers/gestures/flingGesture.js.map +1 -0
- package/lib/module/handlers/gestures/forceTouchGesture.js +76 -0
- package/lib/module/handlers/gestures/forceTouchGesture.js.map +1 -0
- package/lib/module/handlers/gestures/gesture.js +332 -0
- package/lib/module/handlers/gestures/gesture.js.map +1 -0
- package/lib/module/handlers/gestures/gestureComposition.js +83 -0
- package/lib/module/handlers/gestures/gestureComposition.js.map +1 -0
- package/lib/module/handlers/gestures/gestureObjects.js +129 -0
- package/lib/module/handlers/gestures/gestureObjects.js.map +1 -0
- package/lib/module/handlers/gestures/gestureStateManager.js +65 -0
- package/lib/module/handlers/gestures/gestureStateManager.js.map +1 -0
- package/lib/module/handlers/gestures/gestureStateManager.web.js +22 -0
- package/lib/module/handlers/gestures/gestureStateManager.web.js.map +1 -0
- package/lib/module/handlers/gestures/hoverGesture.js +52 -0
- package/lib/module/handlers/gestures/hoverGesture.js.map +1 -0
- package/lib/module/handlers/gestures/longPressGesture.js +41 -0
- package/lib/module/handlers/gestures/longPressGesture.js.map +1 -0
- package/lib/module/handlers/gestures/manualGesture.js +20 -0
- package/lib/module/handlers/gestures/manualGesture.js.map +1 -0
- package/lib/module/handlers/gestures/nativeGesture.ts +33 -0
- package/lib/module/handlers/gestures/panGesture.js +192 -0
- package/lib/module/handlers/gestures/panGesture.js.map +1 -0
- package/lib/module/handlers/gestures/pinchGesture.js +33 -0
- package/lib/module/handlers/gestures/pinchGesture.js.map +1 -0
- package/lib/module/handlers/gestures/reanimatedWrapper.js +26 -0
- package/lib/module/handlers/gestures/reanimatedWrapper.js.map +1 -0
- package/lib/module/handlers/gestures/rotationGesture.js +33 -0
- package/lib/module/handlers/gestures/rotationGesture.js.map +1 -0
- package/lib/module/handlers/gestures/tapGesture.js +82 -0
- package/lib/module/handlers/gestures/tapGesture.js.map +1 -0
- package/lib/module/handlers/getNextHandlerTag.js +7 -0
- package/lib/module/handlers/getNextHandlerTag.js.map +1 -0
- package/lib/module/handlers/handlersRegistry.js +39 -0
- package/lib/module/handlers/handlersRegistry.js.map +1 -0
- package/lib/module/handlers/utils.js +61 -0
- package/lib/module/handlers/utils.js.map +1 -0
- package/lib/module/index.js +31 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/init.js +19 -0
- package/lib/module/init.js.map +1 -0
- package/lib/module/jestUtils/index.js +4 -0
- package/lib/module/jestUtils/index.js.map +1 -0
- package/lib/module/jestUtils/jestUtils.js +311 -0
- package/lib/module/jestUtils/jestUtils.js.map +1 -0
- 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/mountRegistry.js +32 -0
- package/lib/module/mountRegistry.js.map +1 -0
- package/lib/module/specs/NativeRNGestureHandlerModule.ts +26 -0
- package/lib/module/specs/RNGestureHandlerButtonNativeComponent.ts +22 -0
- package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.ts +6 -0
- package/lib/module/typeUtils.js +2 -0
- package/lib/module/typeUtils.js.map +1 -0
- package/lib/module/utils.js +81 -0
- package/lib/module/utils.js.map +1 -0
- package/lib/module/web/Gestures.js +42 -0
- package/lib/module/web/Gestures.js.map +1 -0
- package/lib/module/web/constants.js +5 -0
- package/lib/module/web/constants.js.map +1 -0
- package/lib/module/web/detectors/RotationGestureDetector.js +119 -0
- package/lib/module/web/detectors/RotationGestureDetector.js.map +1 -0
- package/lib/module/web/detectors/ScaleGestureDetector.js +106 -0
- package/lib/module/web/detectors/ScaleGestureDetector.js.map +1 -0
- package/lib/module/web/handlers/FlingGestureHandler.js +137 -0
- package/lib/module/web/handlers/FlingGestureHandler.js.map +1 -0
- package/lib/module/web/handlers/GestureHandler.js +680 -0
- package/lib/module/web/handlers/GestureHandler.js.map +1 -0
- package/lib/module/web/handlers/HoverGestureHandler.js +39 -0
- package/lib/module/web/handlers/HoverGestureHandler.js.map +1 -0
- 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 +140 -0
- package/lib/module/web/handlers/LongPressGestureHandler.js.map +1 -0
- package/lib/module/web/handlers/ManualGestureHandler.js +32 -0
- package/lib/module/web/handlers/ManualGestureHandler.js.map +1 -0
- package/lib/module/web/handlers/NativeViewGestureHandler.ts +175 -0
- package/lib/module/web/handlers/PanGestureHandler.js +393 -0
- package/lib/module/web/handlers/PanGestureHandler.js.map +1 -0
- package/lib/module/web/handlers/PinchGestureHandler.js +116 -0
- package/lib/module/web/handlers/PinchGestureHandler.js.map +1 -0
- package/lib/module/web/handlers/RotationGestureHandler.js +123 -0
- package/lib/module/web/handlers/RotationGestureHandler.js.map +1 -0
- package/lib/module/web/handlers/TapGestureHandler.js +209 -0
- package/lib/module/web/handlers/TapGestureHandler.js.map +1 -0
- package/lib/module/web/interfaces.js +28 -0
- package/lib/module/web/interfaces.js.map +1 -0
- package/lib/module/web/tools/CircularBuffer.js +35 -0
- package/lib/module/web/tools/CircularBuffer.js.map +1 -0
- package/lib/module/web/tools/EventManager.js +89 -0
- package/lib/module/web/tools/EventManager.js.map +1 -0
- package/lib/module/web/tools/GestureHandlerDelegate.js +4 -0
- package/lib/module/web/tools/GestureHandlerDelegate.js.map +1 -0
- package/lib/module/web/tools/GestureHandlerOrchestrator.js +261 -0
- package/lib/module/web/tools/GestureHandlerOrchestrator.js.map +1 -0
- package/lib/module/web/tools/GestureHandlerWebDelegate.js +164 -0
- package/lib/module/web/tools/GestureHandlerWebDelegate.js.map +1 -0
- package/lib/module/web/tools/InteractionManager.js +91 -0
- package/lib/module/web/tools/InteractionManager.js.map +1 -0
- package/lib/module/web/tools/KeyboardEventManager.js +76 -0
- package/lib/module/web/tools/KeyboardEventManager.js.map +1 -0
- package/lib/module/web/tools/LeastSquareSolver.js +154 -0
- package/lib/module/web/tools/LeastSquareSolver.js.map +1 -0
- package/lib/module/web/tools/NodeManager.js +34 -0
- package/lib/module/web/tools/NodeManager.js.map +1 -0
- package/lib/module/web/tools/PointerEventManager.js +183 -0
- package/lib/module/web/tools/PointerEventManager.js.map +1 -0
- package/lib/module/web/tools/PointerTracker.js +186 -0
- package/lib/module/web/tools/PointerTracker.js.map +1 -0
- 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 +79 -0
- package/lib/module/web/tools/VelocityTracker.js.map +1 -0
- 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 +223 -0
- package/lib/module/web/utils.js.map +1 -0
- package/lib/module/web_hammer/DiscreteGestureHandler.js +87 -0
- package/lib/module/web_hammer/DiscreteGestureHandler.js.map +1 -0
- package/lib/module/web_hammer/DraggingGestureHandler.js +37 -0
- package/lib/module/web_hammer/DraggingGestureHandler.js.map +1 -0
- package/lib/module/web_hammer/Errors.js +8 -0
- package/lib/module/web_hammer/Errors.js.map +1 -0
- package/lib/module/web_hammer/FlingGestureHandler.js +133 -0
- package/lib/module/web_hammer/FlingGestureHandler.js.map +1 -0
- package/lib/module/web_hammer/GestureHandler.js +478 -0
- package/lib/module/web_hammer/GestureHandler.js.map +1 -0
- package/lib/module/web_hammer/IndiscreteGestureHandler.js +41 -0
- package/lib/module/web_hammer/IndiscreteGestureHandler.js.map +1 -0
- package/lib/module/web_hammer/LongPressGestureHandler.js +51 -0
- package/lib/module/web_hammer/LongPressGestureHandler.js.map +1 -0
- package/lib/module/web_hammer/NativeViewGestureHandler.ts +47 -0
- package/lib/module/web_hammer/NodeManager.js +33 -0
- package/lib/module/web_hammer/NodeManager.js.map +1 -0
- package/lib/module/web_hammer/PanGestureHandler.js +162 -0
- package/lib/module/web_hammer/PanGestureHandler.js.map +1 -0
- package/lib/module/web_hammer/PinchGestureHandler.js +26 -0
- package/lib/module/web_hammer/PinchGestureHandler.js.map +1 -0
- package/lib/module/web_hammer/PressGestureHandler.js +148 -0
- package/lib/module/web_hammer/PressGestureHandler.js.map +1 -0
- package/lib/module/web_hammer/RotationGestureHandler.js +27 -0
- package/lib/module/web_hammer/RotationGestureHandler.js.map +1 -0
- package/lib/module/web_hammer/TapGestureHandler.js +160 -0
- package/lib/module/web_hammer/TapGestureHandler.js.map +1 -0
- package/lib/module/web_hammer/constants.js +46 -0
- package/lib/module/web_hammer/constants.js.map +1 -0
- package/lib/module/web_hammer/utils.js +21 -0
- package/lib/module/web_hammer/utils.js.map +1 -0
- package/lib/typescript/ActionType.d.ts +8 -0
- package/lib/typescript/ActionType.d.ts.map +1 -0
- package/lib/typescript/Directions.d.ts +15 -0
- package/lib/typescript/Directions.d.ts.map +1 -0
- package/lib/typescript/EnableNewWebImplementation.d.ts +10 -0
- package/lib/typescript/EnableNewWebImplementation.d.ts.map +1 -0
- package/lib/typescript/GestureHandlerRootViewContext.d.ts +4 -0
- package/lib/typescript/GestureHandlerRootViewContext.d.ts.map +1 -0
- package/lib/typescript/PlatformConstants.d.ts +6 -0
- package/lib/typescript/PlatformConstants.d.ts.map +1 -0
- package/lib/typescript/PlatformConstants.web.d.ts +5 -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 -0
- package/lib/typescript/RNGestureHandlerModule.d.ts.map +1 -0
- package/lib/typescript/RNGestureHandlerModule.web.d.ts +16 -0
- package/lib/typescript/RNGestureHandlerModule.web.d.ts.map +1 -0
- package/lib/typescript/RNGestureHandlerModule.windows.d.ts +33 -0
- package/lib/typescript/RNGestureHandlerModule.windows.d.ts.map +1 -0
- package/lib/typescript/RNRenderer.d.ts +2 -0
- package/lib/typescript/RNRenderer.d.ts.map +1 -0
- package/lib/typescript/RNRenderer.web.d.ts +4 -0
- package/lib/typescript/RNRenderer.web.d.ts.map +1 -0
- package/lib/typescript/State.d.ts +10 -0
- package/lib/typescript/State.d.ts.map +1 -0
- package/lib/typescript/TouchEventType.d.ts +9 -0
- package/lib/typescript/TouchEventType.d.ts.map +1 -0
- package/lib/typescript/components/DrawerLayout.d.ts +186 -0
- package/lib/typescript/components/DrawerLayout.d.ts.map +1 -0
- package/lib/typescript/components/GestureButtons.d.ts +8 -0
- 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 +23 -0
- package/lib/typescript/components/GestureComponents.d.ts.map +1 -0
- package/lib/typescript/components/GestureComponents.web.d.ts +9 -0
- package/lib/typescript/components/GestureComponents.web.d.ts.map +1 -0
- package/lib/typescript/components/GestureHandlerButton.d.ts +5 -0
- package/lib/typescript/components/GestureHandlerButton.d.ts.map +1 -0
- package/lib/typescript/components/GestureHandlerButton.web.d.ts +5 -0
- package/lib/typescript/components/GestureHandlerButton.web.d.ts.map +1 -0
- package/lib/typescript/components/GestureHandlerRootView.android.d.ts +7 -0
- package/lib/typescript/components/GestureHandlerRootView.android.d.ts.map +1 -0
- package/lib/typescript/components/GestureHandlerRootView.d.ts +7 -0
- package/lib/typescript/components/GestureHandlerRootView.d.ts.map +1 -0
- package/lib/typescript/components/GestureHandlerRootView.web.d.ts +7 -0
- 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 +10 -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 +184 -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 +4 -0
- 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 +56 -0
- 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 +42 -0
- package/lib/typescript/components/touchables/TouchableHighlight.d.ts.map +1 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedback.android.d.ts +41 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedback.android.d.ts.map +1 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedback.d.ts +7 -0
- 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 +31 -0
- package/lib/typescript/components/touchables/TouchableOpacity.d.ts.map +1 -0
- package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts +15 -0
- package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts.map +1 -0
- package/lib/typescript/components/touchables/index.d.ts +8 -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 -0
- package/lib/typescript/getShadowNodeFromRef.d.ts.map +1 -0
- package/lib/typescript/getShadowNodeFromRef.web.d.ts +2 -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 +39 -0
- package/lib/typescript/handlers/FlingGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/ForceTouchGestureHandler.d.ts +45 -0
- 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 +36 -0
- package/lib/typescript/handlers/LongPressGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/NativeViewGestureHandler.d.ts +33 -0
- package/lib/typescript/handlers/NativeViewGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/PanGestureHandler.d.ts +100 -0
- package/lib/typescript/handlers/PanGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/PinchGestureHandler.d.ts +17 -0
- package/lib/typescript/handlers/PinchGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/PressabilityDebugView.d.ts +2 -0
- package/lib/typescript/handlers/PressabilityDebugView.d.ts.map +1 -0
- package/lib/typescript/handlers/PressabilityDebugView.web.d.ts +2 -0
- package/lib/typescript/handlers/PressabilityDebugView.web.d.ts.map +1 -0
- package/lib/typescript/handlers/RotationGestureHandler.d.ts +17 -0
- package/lib/typescript/handlers/RotationGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/TapGestureHandler.d.ts +62 -0
- package/lib/typescript/handlers/TapGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/createHandler.d.ts +12 -0
- package/lib/typescript/handlers/createHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/createNativeWrapper.d.ts +4 -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 +79 -0
- package/lib/typescript/handlers/gestureHandlerCommon.d.ts.map +1 -0
- package/lib/typescript/handlers/gestureHandlerTypesCompat.d.ts +53 -0
- 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 +5 -0
- package/lib/typescript/handlers/gestures/eventReceiver.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/flingGesture.d.ts +22 -0
- package/lib/typescript/handlers/gestures/flingGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/forceTouchGesture.d.ts +40 -0
- package/lib/typescript/handlers/gestures/forceTouchGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/gesture.d.ts +218 -0
- package/lib/typescript/handlers/gestures/gesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/gestureComposition.d.ts +22 -0
- package/lib/typescript/handlers/gestures/gestureComposition.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/gestureObjects.d.ts +101 -0
- package/lib/typescript/handlers/gestures/gestureObjects.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/gestureStateManager.d.ts +12 -0
- package/lib/typescript/handlers/gestures/gestureStateManager.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/gestureStateManager.web.d.ts +5 -0
- package/lib/typescript/handlers/gestures/gestureStateManager.web.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/hoverGesture.d.ts +28 -0
- package/lib/typescript/handlers/gestures/hoverGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/longPressGesture.d.ts +26 -0
- package/lib/typescript/handlers/gestures/longPressGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/manualGesture.d.ts +8 -0
- package/lib/typescript/handlers/gestures/manualGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/nativeGesture.d.ts +19 -0
- package/lib/typescript/handlers/gestures/nativeGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/panGesture.d.ts +91 -0
- package/lib/typescript/handlers/gestures/panGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/pinchGesture.d.ts +12 -0
- package/lib/typescript/handlers/gestures/pinchGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/reanimatedWrapper.d.ts +15 -0
- package/lib/typescript/handlers/gestures/reanimatedWrapper.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/rotationGesture.d.ts +13 -0
- package/lib/typescript/handlers/gestures/rotationGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/tapGesture.d.ts +51 -0
- 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 +15 -0
- 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 +59 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/init.d.ts +3 -0
- package/lib/typescript/init.d.ts.map +1 -0
- package/lib/typescript/jestUtils/index.d.ts +2 -0
- package/lib/typescript/jestUtils/index.d.ts.map +1 -0
- package/lib/typescript/jestUtils/jestUtils.d.ts +30 -0
- 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/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 +17 -0
- package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.d.ts.map +1 -0
- package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts +6 -0
- package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/typeUtils.d.ts +2 -0
- package/lib/typescript/typeUtils.d.ts.map +1 -0
- package/lib/typescript/utils.d.ts +21 -0
- 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 +3 -0
- package/lib/typescript/web/constants.d.ts.map +1 -0
- package/lib/typescript/web/detectors/RotationGestureDetector.d.ts +31 -0
- package/lib/typescript/web/detectors/RotationGestureDetector.d.ts.map +1 -0
- package/lib/typescript/web/detectors/ScaleGestureDetector.d.ts +30 -0
- package/lib/typescript/web/detectors/ScaleGestureDetector.d.ts.map +1 -0
- package/lib/typescript/web/handlers/FlingGestureHandler.d.ts +27 -0
- package/lib/typescript/web/handlers/FlingGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/GestureHandler.d.ts +103 -0
- package/lib/typescript/web/handlers/GestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/HoverGestureHandler.d.ts +11 -0
- 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 +31 -0
- package/lib/typescript/web/handlers/LongPressGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/ManualGestureHandler.d.ts +11 -0
- package/lib/typescript/web/handlers/ManualGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/NativeViewGestureHandler.d.ts +26 -0
- package/lib/typescript/web/handlers/NativeViewGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/PanGestureHandler.d.ts +64 -0
- package/lib/typescript/web/handlers/PanGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/PinchGestureHandler.d.ts +28 -0
- package/lib/typescript/web/handlers/PinchGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/RotationGestureHandler.d.ts +28 -0
- package/lib/typescript/web/handlers/RotationGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/TapGestureHandler.d.ts +40 -0
- package/lib/typescript/web/handlers/TapGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/interfaces.d.ts +158 -0
- package/lib/typescript/web/interfaces.d.ts.map +1 -0
- package/lib/typescript/web/tools/CircularBuffer.d.ts +12 -0
- package/lib/typescript/web/tools/CircularBuffer.d.ts.map +1 -0
- package/lib/typescript/web/tools/EventManager.d.ts +40 -0
- package/lib/typescript/web/tools/EventManager.d.ts.map +1 -0
- package/lib/typescript/web/tools/GestureHandlerDelegate.d.ts +25 -0
- package/lib/typescript/web/tools/GestureHandlerDelegate.d.ts.map +1 -0
- package/lib/typescript/web/tools/GestureHandlerOrchestrator.d.ts +32 -0
- package/lib/typescript/web/tools/GestureHandlerOrchestrator.d.ts.map +1 -0
- package/lib/typescript/web/tools/GestureHandlerWebDelegate.d.ts +36 -0
- package/lib/typescript/web/tools/GestureHandlerWebDelegate.d.ts.map +1 -0
- package/lib/typescript/web/tools/InteractionManager.d.ts +18 -0
- package/lib/typescript/web/tools/InteractionManager.d.ts.map +1 -0
- package/lib/typescript/web/tools/KeyboardEventManager.d.ts +14 -0
- package/lib/typescript/web/tools/KeyboardEventManager.d.ts.map +1 -0
- package/lib/typescript/web/tools/LeastSquareSolver.d.ts +13 -0
- package/lib/typescript/web/tools/LeastSquareSolver.d.ts.map +1 -0
- package/lib/typescript/web/tools/NodeManager.d.ts +13 -0
- package/lib/typescript/web/tools/NodeManager.d.ts.map +1 -0
- package/lib/typescript/web/tools/PointerEventManager.d.ts +20 -0
- package/lib/typescript/web/tools/PointerEventManager.d.ts.map +1 -0
- package/lib/typescript/web/tools/PointerTracker.d.ts +51 -0
- 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 +14 -0
- 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 -0
- package/lib/typescript/web/utils.d.ts.map +1 -0
- package/lib/typescript/web_hammer/DiscreteGestureHandler.d.ts +21 -0
- package/lib/typescript/web_hammer/DiscreteGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/DraggingGestureHandler.d.ts +16 -0
- package/lib/typescript/web_hammer/DraggingGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/Errors.d.ts +4 -0
- package/lib/typescript/web_hammer/Errors.d.ts.map +1 -0
- package/lib/typescript/web_hammer/FlingGestureHandler.d.ts +44 -0
- package/lib/typescript/web_hammer/FlingGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/GestureHandler.d.ts +146 -0
- package/lib/typescript/web_hammer/GestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/IndiscreteGestureHandler.d.ts +41 -0
- package/lib/typescript/web_hammer/IndiscreteGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/LongPressGestureHandler.d.ts +39 -0
- package/lib/typescript/web_hammer/LongPressGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/NativeViewGestureHandler.d.ts +8 -0
- package/lib/typescript/web_hammer/NativeViewGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/NodeManager.d.ts +8 -0
- package/lib/typescript/web_hammer/NodeManager.d.ts.map +1 -0
- package/lib/typescript/web_hammer/PanGestureHandler.d.ts +57 -0
- package/lib/typescript/web_hammer/PanGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/PinchGestureHandler.d.ts +14 -0
- package/lib/typescript/web_hammer/PinchGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/PressGestureHandler.d.ts +84 -0
- package/lib/typescript/web_hammer/PressGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/RotationGestureHandler.d.ts +14 -0
- package/lib/typescript/web_hammer/RotationGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/TapGestureHandler.d.ts +58 -0
- package/lib/typescript/web_hammer/TapGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/constants.d.ts +40 -0
- package/lib/typescript/web_hammer/constants.d.ts.map +1 -0
- package/lib/typescript/web_hammer/utils.d.ts +10 -0
- package/lib/typescript/web_hammer/utils.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/components/GestureButtonsProps.ts +10 -0
- package/src/components/Pressable/Pressable.tsx +20 -31
- package/src/components/Pressable/PressableProps.tsx +2 -4
- package/src/components/Pressable/StateMachine.tsx +12 -4
- package/src/components/Pressable/stateDefinitions.ts +23 -23
- package/src/components/ReanimatedSwipeable/ReanimatedSwipeable.tsx +603 -0
- package/src/components/ReanimatedSwipeable/ReanimatedSwipeableProps.ts +199 -0
- package/src/components/ReanimatedSwipeable/index.ts +6 -0
- package/src/mocks/Pressable.tsx +1 -0
- package/src/{mocks.tsx → mocks/mocks.tsx} +7 -11
- package/src/web/handlers/GestureHandler.ts +1 -0
- package/src/components/ReanimatedSwipeable.tsx +0 -811
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_createHandler","_interopRequireDefault","require","_gestureHandlerCommon","e","__esModule","default","rotationHandlerName","exports","RotationGestureHandler","createHandler","name","allowedProps","baseGestureHandlerProps","config"],"sourceRoot":"../../../src","sources":["handlers/RotationGestureHandler.ts"],"mappings":";;;;;;AACA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,qBAAA,GAAAD,OAAA;AAGgC,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEhC;AACA;AACA;;AAIO,MAAMG,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAG,wBAAwB;;AAE3D;AACA;AACA;;AAGA;AACA;AACA;AACA;AACO,MAAME,sBAAsB,GAAAD,OAAA,CAAAC,sBAAA,GAAG,IAAAC,sBAAa,EAGjD;EACAC,IAAI,EAAEJ,mBAAmB;EACzBK,YAAY,EAAEC,6CAAuB;EACrCC,MAAM,EAAE,CAAC;AACX,CAAC,CAAC","ignoreList":[]}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.tapHandlerName = exports.tapGestureHandlerProps = exports.TapGestureHandler = void 0;
|
7
|
+
var _createHandler = _interopRequireDefault(require("./createHandler"));
|
8
|
+
var _gestureHandlerCommon = require("./gestureHandlerCommon");
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
10
|
+
const tapGestureHandlerProps = exports.tapGestureHandlerProps = ['maxDurationMs', 'maxDelayMs', 'numberOfTaps', 'maxDeltaX', 'maxDeltaY', 'maxDist', 'minPointers'];
|
11
|
+
|
12
|
+
/**
|
13
|
+
* @deprecated TapGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Tap()` instead.
|
14
|
+
*/
|
15
|
+
|
16
|
+
const tapHandlerName = exports.tapHandlerName = 'TapGestureHandler';
|
17
|
+
|
18
|
+
/**
|
19
|
+
* @deprecated TapGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Tap()` instead.
|
20
|
+
*/
|
21
|
+
|
22
|
+
/**
|
23
|
+
* @deprecated TapGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Tap()` instead.
|
24
|
+
*/
|
25
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file
|
26
|
+
const TapGestureHandler = exports.TapGestureHandler = (0, _createHandler.default)({
|
27
|
+
name: tapHandlerName,
|
28
|
+
allowedProps: [..._gestureHandlerCommon.baseGestureHandlerProps, ...tapGestureHandlerProps],
|
29
|
+
config: {
|
30
|
+
shouldCancelWhenOutside: true
|
31
|
+
}
|
32
|
+
});
|
33
|
+
//# sourceMappingURL=TapGestureHandler.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_createHandler","_interopRequireDefault","require","_gestureHandlerCommon","e","__esModule","default","tapGestureHandlerProps","exports","tapHandlerName","TapGestureHandler","createHandler","name","allowedProps","baseGestureHandlerProps","config","shouldCancelWhenOutside"],"sourceRoot":"../../../src","sources":["handlers/TapGestureHandler.ts"],"mappings":";;;;;;AACA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,qBAAA,GAAAD,OAAA;AAGgC,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEzB,MAAMG,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,GAAG,CACpC,eAAe,EACf,YAAY,EACZ,cAAc,EACd,WAAW,EACX,WAAW,EACX,SAAS,EACT,aAAa,CACL;;AAqDV;AACA;AACA;;AAKO,MAAME,cAAc,GAAAD,OAAA,CAAAC,cAAA,GAAG,mBAAmB;;AAEjD;AACA;AACA;;AAGA;AACA;AACA;AACA;AACO,MAAMC,iBAAiB,GAAAF,OAAA,CAAAE,iBAAA,GAAG,IAAAC,sBAAa,EAG5C;EACAC,IAAI,EAAEH,cAAc;EACpBI,YAAY,EAAE,CACZ,GAAGC,6CAAuB,EAC1B,GAAGP,sBAAsB,CACjB;EACVQ,MAAM,EAAE;IACNC,uBAAuB,EAAE;EAC3B;AACF,CAAC,CAAC","ignoreList":[]}
|
@@ -0,0 +1,393 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.default = createHandler;
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
8
|
+
var _reactNative = require("react-native");
|
9
|
+
var _customDirectEventTypes = require("./customDirectEventTypes");
|
10
|
+
var _RNGestureHandlerModule = _interopRequireDefault(require("../RNGestureHandlerModule"));
|
11
|
+
var _State = require("../State");
|
12
|
+
var _handlersRegistry = require("./handlersRegistry");
|
13
|
+
var _getNextHandlerTag = require("./getNextHandlerTag");
|
14
|
+
var _utils = require("./utils");
|
15
|
+
var _findNodeHandle = _interopRequireDefault(require("../findNodeHandle"));
|
16
|
+
var _utils2 = require("../utils");
|
17
|
+
var _ActionType = require("../ActionType");
|
18
|
+
var _PressabilityDebugView = require("./PressabilityDebugView");
|
19
|
+
var _GestureHandlerRootViewContext = _interopRequireDefault(require("../GestureHandlerRootViewContext"));
|
20
|
+
var _ghQueueMicrotask = require("../ghQueueMicrotask");
|
21
|
+
var _mountRegistry = require("../mountRegistry");
|
22
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
23
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
24
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
25
|
+
const UIManagerAny = _reactNative.UIManager;
|
26
|
+
_customDirectEventTypes.customDirectEventTypes.topGestureHandlerEvent = {
|
27
|
+
registrationName: 'onGestureHandlerEvent'
|
28
|
+
};
|
29
|
+
const customGHEventsConfigFabricAndroid = {
|
30
|
+
topOnGestureHandlerEvent: {
|
31
|
+
registrationName: 'onGestureHandlerEvent'
|
32
|
+
},
|
33
|
+
topOnGestureHandlerStateChange: {
|
34
|
+
registrationName: 'onGestureHandlerStateChange'
|
35
|
+
}
|
36
|
+
};
|
37
|
+
const customGHEventsConfig = {
|
38
|
+
onGestureHandlerEvent: {
|
39
|
+
registrationName: 'onGestureHandlerEvent'
|
40
|
+
},
|
41
|
+
onGestureHandlerStateChange: {
|
42
|
+
registrationName: 'onGestureHandlerStateChange'
|
43
|
+
},
|
44
|
+
// When using React Native Gesture Handler for Animated.event with useNativeDriver: true
|
45
|
+
// on Android with Fabric enabled, the native part still sends the native events to JS
|
46
|
+
// but prefixed with "top". We cannot simply rename the events above so they are prefixed
|
47
|
+
// with "top" instead of "on" because in such case Animated.events would not be registered.
|
48
|
+
// That's why we need to register another pair of event names.
|
49
|
+
// The incoming events will be queued but never handled.
|
50
|
+
// Without this piece of code below, you'll get the following JS error:
|
51
|
+
// Unsupported top level event type "topOnGestureHandlerEvent" dispatched
|
52
|
+
...((0, _utils2.isFabric)() && _reactNative.Platform.OS === 'android' && customGHEventsConfigFabricAndroid)
|
53
|
+
};
|
54
|
+
|
55
|
+
// Add gesture specific events to genericDirectEventTypes object exported from UIManager
|
56
|
+
// native module.
|
57
|
+
// Once new event types are registered with react it is possible to dispatch these
|
58
|
+
// events to all kind of native views.
|
59
|
+
UIManagerAny.genericDirectEventTypes = {
|
60
|
+
...UIManagerAny.genericDirectEventTypes,
|
61
|
+
...customGHEventsConfig
|
62
|
+
};
|
63
|
+
const UIManagerConstants = UIManagerAny.getViewManagerConfig?.('getConstants');
|
64
|
+
if (UIManagerConstants) {
|
65
|
+
UIManagerConstants.genericDirectEventTypes = {
|
66
|
+
...UIManagerConstants.genericDirectEventTypes,
|
67
|
+
...customGHEventsConfig
|
68
|
+
};
|
69
|
+
}
|
70
|
+
|
71
|
+
// Wrap JS responder calls and notify gesture handler manager
|
72
|
+
const {
|
73
|
+
setJSResponder: oldSetJSResponder = () => {
|
74
|
+
// no-op
|
75
|
+
},
|
76
|
+
clearJSResponder: oldClearJSResponder = () => {
|
77
|
+
// no-op
|
78
|
+
}
|
79
|
+
} = UIManagerAny;
|
80
|
+
UIManagerAny.setJSResponder = (tag, blockNativeResponder) => {
|
81
|
+
_RNGestureHandlerModule.default.handleSetJSResponder(tag, blockNativeResponder);
|
82
|
+
oldSetJSResponder(tag, blockNativeResponder);
|
83
|
+
};
|
84
|
+
UIManagerAny.clearJSResponder = () => {
|
85
|
+
_RNGestureHandlerModule.default.handleClearJSResponder();
|
86
|
+
oldClearJSResponder();
|
87
|
+
};
|
88
|
+
let allowTouches = true;
|
89
|
+
const DEV_ON_ANDROID = __DEV__ && _reactNative.Platform.OS === 'android';
|
90
|
+
// Toggled inspector blocks touch events in order to allow inspecting on Android
|
91
|
+
// This needs to be a global variable in order to set initial state for `allowTouches` property in Handler component
|
92
|
+
if (DEV_ON_ANDROID) {
|
93
|
+
_reactNative.DeviceEventEmitter.addListener('toggleElementInspector', () => {
|
94
|
+
allowTouches = !allowTouches;
|
95
|
+
});
|
96
|
+
}
|
97
|
+
function hasUnresolvedRefs(props) {
|
98
|
+
// TODO(TS) - add type for extract arg
|
99
|
+
const extract = refs => {
|
100
|
+
if (!Array.isArray(refs)) {
|
101
|
+
return refs && refs.current === null;
|
102
|
+
}
|
103
|
+
return refs.some(r => r && r.current === null);
|
104
|
+
};
|
105
|
+
return extract(props['simultaneousHandlers']) || extract(props['waitFor']);
|
106
|
+
}
|
107
|
+
const stateToPropMappings = {
|
108
|
+
[_State.State.UNDETERMINED]: undefined,
|
109
|
+
[_State.State.BEGAN]: 'onBegan',
|
110
|
+
[_State.State.FAILED]: 'onFailed',
|
111
|
+
[_State.State.CANCELLED]: 'onCancelled',
|
112
|
+
[_State.State.ACTIVE]: 'onActivated',
|
113
|
+
[_State.State.END]: 'onEnded'
|
114
|
+
};
|
115
|
+
|
116
|
+
// TODO(TS) fix event types
|
117
|
+
|
118
|
+
const UNRESOLVED_REFS_RETRY_LIMIT = 1;
|
119
|
+
|
120
|
+
// TODO(TS) - make sure that BaseGestureHandlerProps doesn't need other generic parameter to work with custom properties.
|
121
|
+
function createHandler({
|
122
|
+
name,
|
123
|
+
allowedProps = [],
|
124
|
+
config = {},
|
125
|
+
transformProps,
|
126
|
+
customNativeProps = []
|
127
|
+
}) {
|
128
|
+
class Handler extends React.Component {
|
129
|
+
static displayName = name;
|
130
|
+
static contextType = _GestureHandlerRootViewContext.default;
|
131
|
+
handlerTag = -1;
|
132
|
+
constructor(props) {
|
133
|
+
super(props);
|
134
|
+
this.config = {};
|
135
|
+
this.propsRef = /*#__PURE__*/React.createRef();
|
136
|
+
this.isMountedRef = /*#__PURE__*/React.createRef();
|
137
|
+
this.state = {
|
138
|
+
allowTouches
|
139
|
+
};
|
140
|
+
if (props.id) {
|
141
|
+
if (_handlersRegistry.handlerIDToTag[props.id] !== undefined) {
|
142
|
+
throw new Error(`Handler with ID "${props.id}" already registered`);
|
143
|
+
}
|
144
|
+
_handlersRegistry.handlerIDToTag[props.id] = this.handlerTag;
|
145
|
+
}
|
146
|
+
}
|
147
|
+
componentDidMount() {
|
148
|
+
const props = this.props;
|
149
|
+
this.isMountedRef.current = true;
|
150
|
+
if (DEV_ON_ANDROID) {
|
151
|
+
this.inspectorToggleListener = _reactNative.DeviceEventEmitter.addListener('toggleElementInspector', () => {
|
152
|
+
this.setState(_ => ({
|
153
|
+
allowTouches
|
154
|
+
}));
|
155
|
+
this.update(UNRESOLVED_REFS_RETRY_LIMIT);
|
156
|
+
});
|
157
|
+
}
|
158
|
+
if (hasUnresolvedRefs(props)) {
|
159
|
+
// If there are unresolved refs (e.g. ".current" has not yet been set)
|
160
|
+
// passed as `simultaneousHandlers` or `waitFor`, we enqueue a call to
|
161
|
+
// _update method that will try to update native handler props using
|
162
|
+
// queueMicrotask. This makes it so update() function gets called after all
|
163
|
+
// react components are mounted and we expect the missing ref object to
|
164
|
+
// be resolved by then.
|
165
|
+
(0, _ghQueueMicrotask.ghQueueMicrotask)(() => {
|
166
|
+
this.update(UNRESOLVED_REFS_RETRY_LIMIT);
|
167
|
+
});
|
168
|
+
}
|
169
|
+
this.createGestureHandler((0, _utils.filterConfig)(transformProps ? transformProps(this.props) : this.props, [...allowedProps, ...customNativeProps], config));
|
170
|
+
if (!this.viewNode) {
|
171
|
+
throw new Error(`[Gesture Handler] Failed to obtain view for ${Handler.displayName}. Note that old API doesn't support functional components.`);
|
172
|
+
}
|
173
|
+
this.attachGestureHandler((0, _findNodeHandle.default)(this.viewNode)); // TODO(TS) - check if this can be null
|
174
|
+
}
|
175
|
+
componentDidUpdate() {
|
176
|
+
const viewTag = (0, _findNodeHandle.default)(this.viewNode);
|
177
|
+
if (this.viewTag !== viewTag) {
|
178
|
+
this.attachGestureHandler(viewTag); // TODO(TS) - check interaction between _viewTag & findNodeHandle
|
179
|
+
}
|
180
|
+
this.update(UNRESOLVED_REFS_RETRY_LIMIT);
|
181
|
+
}
|
182
|
+
componentWillUnmount() {
|
183
|
+
this.inspectorToggleListener?.remove();
|
184
|
+
this.isMountedRef.current = false;
|
185
|
+
if (_reactNative.Platform.OS !== 'web') {
|
186
|
+
(0, _handlersRegistry.unregisterOldGestureHandler)(this.handlerTag);
|
187
|
+
}
|
188
|
+
_RNGestureHandlerModule.default.dropGestureHandler(this.handlerTag);
|
189
|
+
(0, _utils.scheduleFlushOperations)();
|
190
|
+
// We can't use this.props.id directly due to TS generic type narrowing bug, see https://github.com/microsoft/TypeScript/issues/13995 for more context
|
191
|
+
const handlerID = this.props.id;
|
192
|
+
if (handlerID) {
|
193
|
+
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
|
194
|
+
delete _handlersRegistry.handlerIDToTag[handlerID];
|
195
|
+
}
|
196
|
+
_mountRegistry.MountRegistry.gestureHandlerWillUnmount(this);
|
197
|
+
}
|
198
|
+
onGestureHandlerEvent = event => {
|
199
|
+
if (event.nativeEvent.handlerTag === this.handlerTag) {
|
200
|
+
if (typeof this.props.onGestureEvent === 'function') {
|
201
|
+
this.props.onGestureEvent?.(event);
|
202
|
+
}
|
203
|
+
} else {
|
204
|
+
this.props.onGestureHandlerEvent?.(event);
|
205
|
+
}
|
206
|
+
};
|
207
|
+
|
208
|
+
// TODO(TS) - make sure this is right type for event
|
209
|
+
onGestureHandlerStateChange = event => {
|
210
|
+
if (event.nativeEvent.handlerTag === this.handlerTag) {
|
211
|
+
if (typeof this.props.onHandlerStateChange === 'function') {
|
212
|
+
this.props.onHandlerStateChange?.(event);
|
213
|
+
}
|
214
|
+
const state = event.nativeEvent.state;
|
215
|
+
const stateEventName = stateToPropMappings[state];
|
216
|
+
const eventHandler = stateEventName && this.props[stateEventName];
|
217
|
+
if (eventHandler && typeof eventHandler === 'function') {
|
218
|
+
eventHandler(event);
|
219
|
+
}
|
220
|
+
} else {
|
221
|
+
this.props.onGestureHandlerStateChange?.(event);
|
222
|
+
}
|
223
|
+
};
|
224
|
+
refHandler = node => {
|
225
|
+
this.viewNode = node;
|
226
|
+
const child = React.Children.only(this.props.children);
|
227
|
+
// @ts-ignore Since React 19 ref is accessible as standard prop
|
228
|
+
// https://react.dev/blog/2024/04/25/react-19-upgrade-guide#deprecated-element-ref
|
229
|
+
const ref = (0, _utils2.isReact19)() ? child.props?.ref : child?.ref;
|
230
|
+
if (!ref) {
|
231
|
+
return;
|
232
|
+
}
|
233
|
+
if (typeof ref === 'function') {
|
234
|
+
ref(node);
|
235
|
+
} else {
|
236
|
+
ref.current = node;
|
237
|
+
}
|
238
|
+
};
|
239
|
+
createGestureHandler = newConfig => {
|
240
|
+
this.handlerTag = (0, _getNextHandlerTag.getNextHandlerTag)();
|
241
|
+
this.config = newConfig;
|
242
|
+
_RNGestureHandlerModule.default.createGestureHandler(name, this.handlerTag, newConfig);
|
243
|
+
};
|
244
|
+
attachGestureHandler = newViewTag => {
|
245
|
+
this.viewTag = newViewTag;
|
246
|
+
if (_reactNative.Platform.OS === 'web') {
|
247
|
+
// Typecast due to dynamic resolution, attachGestureHandler should have web version signature in this branch
|
248
|
+
_RNGestureHandlerModule.default.attachGestureHandler(this.handlerTag, newViewTag, _ActionType.ActionType.JS_FUNCTION_OLD_API,
|
249
|
+
// ignored on web
|
250
|
+
this.propsRef);
|
251
|
+
} else {
|
252
|
+
(0, _handlersRegistry.registerOldGestureHandler)(this.handlerTag, {
|
253
|
+
onGestureEvent: this.onGestureHandlerEvent,
|
254
|
+
onGestureStateChange: this.onGestureHandlerStateChange
|
255
|
+
});
|
256
|
+
const actionType = (() => {
|
257
|
+
const onGestureEvent = this.props?.onGestureEvent;
|
258
|
+
const isGestureHandlerWorklet = onGestureEvent && ('current' in onGestureEvent || 'workletEventHandler' in onGestureEvent);
|
259
|
+
const onHandlerStateChange = this.props?.onHandlerStateChange;
|
260
|
+
const isStateChangeHandlerWorklet = onHandlerStateChange && ('current' in onHandlerStateChange || 'workletEventHandler' in onHandlerStateChange);
|
261
|
+
const isReanimatedHandler = isGestureHandlerWorklet || isStateChangeHandlerWorklet;
|
262
|
+
if (isReanimatedHandler) {
|
263
|
+
// Reanimated worklet
|
264
|
+
return _ActionType.ActionType.REANIMATED_WORKLET;
|
265
|
+
} else if (onGestureEvent && '__isNative' in onGestureEvent) {
|
266
|
+
// Animated.event with useNativeDriver: true
|
267
|
+
return _ActionType.ActionType.NATIVE_ANIMATED_EVENT;
|
268
|
+
} else {
|
269
|
+
// JS callback or Animated.event with useNativeDriver: false
|
270
|
+
return _ActionType.ActionType.JS_FUNCTION_OLD_API;
|
271
|
+
}
|
272
|
+
})();
|
273
|
+
_RNGestureHandlerModule.default.attachGestureHandler(this.handlerTag, newViewTag, actionType);
|
274
|
+
}
|
275
|
+
(0, _utils.scheduleFlushOperations)();
|
276
|
+
(0, _ghQueueMicrotask.ghQueueMicrotask)(() => {
|
277
|
+
_mountRegistry.MountRegistry.gestureHandlerWillMount(this);
|
278
|
+
});
|
279
|
+
};
|
280
|
+
updateGestureHandler = newConfig => {
|
281
|
+
this.config = newConfig;
|
282
|
+
_RNGestureHandlerModule.default.updateGestureHandler(this.handlerTag, newConfig);
|
283
|
+
(0, _utils.scheduleFlushOperations)();
|
284
|
+
};
|
285
|
+
update(remainingTries) {
|
286
|
+
if (!this.isMountedRef.current) {
|
287
|
+
return;
|
288
|
+
}
|
289
|
+
const props = this.props;
|
290
|
+
|
291
|
+
// When ref is set via a function i.e. `ref={(r) => refObject.current = r}` instead of
|
292
|
+
// `ref={refObject}` it's possible that it won't be resolved in time. Seems like trying
|
293
|
+
// again is easy enough fix.
|
294
|
+
if (hasUnresolvedRefs(props) && remainingTries > 0) {
|
295
|
+
(0, _ghQueueMicrotask.ghQueueMicrotask)(() => {
|
296
|
+
this.update(remainingTries - 1);
|
297
|
+
});
|
298
|
+
} else {
|
299
|
+
const newConfig = (0, _utils.filterConfig)(transformProps ? transformProps(this.props) : this.props, [...allowedProps, ...customNativeProps], config);
|
300
|
+
if (!(0, _utils2.deepEqual)(this.config, newConfig)) {
|
301
|
+
this.updateGestureHandler(newConfig);
|
302
|
+
}
|
303
|
+
}
|
304
|
+
}
|
305
|
+
|
306
|
+
// eslint-disable-next-line @eslint-react/no-unused-class-component-members
|
307
|
+
setNativeProps(updates) {
|
308
|
+
const mergedProps = {
|
309
|
+
...this.props,
|
310
|
+
...updates
|
311
|
+
};
|
312
|
+
const newConfig = (0, _utils.filterConfig)(transformProps ? transformProps(mergedProps) : mergedProps, [...allowedProps, ...customNativeProps], config);
|
313
|
+
this.updateGestureHandler(newConfig);
|
314
|
+
}
|
315
|
+
render() {
|
316
|
+
if (__DEV__ && !this.context && !(0, _utils2.isTestEnv)() && _reactNative.Platform.OS !== 'web') {
|
317
|
+
throw new Error(name + ' must be used as a descendant of GestureHandlerRootView. Otherwise the gestures will not be recognized. See https://docs.swmansion.com/react-native-gesture-handler/docs/installation for more details.');
|
318
|
+
}
|
319
|
+
let gestureEventHandler = this.onGestureHandlerEvent;
|
320
|
+
// Another instance of https://github.com/microsoft/TypeScript/issues/13995
|
321
|
+
|
322
|
+
const {
|
323
|
+
onGestureEvent,
|
324
|
+
onGestureHandlerEvent
|
325
|
+
} = this.props;
|
326
|
+
if (onGestureEvent && typeof onGestureEvent !== 'function') {
|
327
|
+
// If it's not a method it should be an native Animated.event
|
328
|
+
// object. We set it directly as the handler for the view
|
329
|
+
// In this case nested handlers are not going to be supported
|
330
|
+
if (onGestureHandlerEvent) {
|
331
|
+
throw new Error('Nesting touch handlers with native animated driver is not supported yet');
|
332
|
+
}
|
333
|
+
gestureEventHandler = onGestureEvent;
|
334
|
+
} else {
|
335
|
+
if (onGestureHandlerEvent && typeof onGestureHandlerEvent !== 'function') {
|
336
|
+
throw new Error('Nesting touch handlers with native animated driver is not supported yet');
|
337
|
+
}
|
338
|
+
}
|
339
|
+
let gestureStateEventHandler = this.onGestureHandlerStateChange;
|
340
|
+
// Another instance of https://github.com/microsoft/TypeScript/issues/13995
|
341
|
+
|
342
|
+
const {
|
343
|
+
onHandlerStateChange,
|
344
|
+
onGestureHandlerStateChange
|
345
|
+
} = this.props;
|
346
|
+
if (onHandlerStateChange && typeof onHandlerStateChange !== 'function') {
|
347
|
+
// If it's not a method it should be an native Animated.event
|
348
|
+
// object. We set it directly as the handler for the view
|
349
|
+
// In this case nested handlers are not going to be supported
|
350
|
+
if (onGestureHandlerStateChange) {
|
351
|
+
throw new Error('Nesting touch handlers with native animated driver is not supported yet');
|
352
|
+
}
|
353
|
+
gestureStateEventHandler = onHandlerStateChange;
|
354
|
+
} else {
|
355
|
+
if (onGestureHandlerStateChange && typeof onGestureHandlerStateChange !== 'function') {
|
356
|
+
throw new Error('Nesting touch handlers with native animated driver is not supported yet');
|
357
|
+
}
|
358
|
+
}
|
359
|
+
const events = {
|
360
|
+
onGestureHandlerEvent: this.state.allowTouches ? gestureEventHandler : undefined,
|
361
|
+
onGestureHandlerStateChange: this.state.allowTouches ? gestureStateEventHandler : undefined
|
362
|
+
};
|
363
|
+
this.propsRef.current = events;
|
364
|
+
let child = null;
|
365
|
+
try {
|
366
|
+
child = React.Children.only(this.props.children);
|
367
|
+
} catch (e) {
|
368
|
+
throw new Error((0, _utils2.tagMessage)(`${name} got more than one view as a child. If you want the gesture to work on multiple views, wrap them with a common parent and attach the gesture to that view.`));
|
369
|
+
}
|
370
|
+
let grandChildren = child.props.children;
|
371
|
+
if (__DEV__ && child.type && (child.type === 'RNGestureHandlerButton' || child.type.name === 'View' || child.type.displayName === 'View')) {
|
372
|
+
grandChildren = React.Children.toArray(grandChildren);
|
373
|
+
grandChildren.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(_PressabilityDebugView.PressabilityDebugView, {
|
374
|
+
color: "mediumspringgreen",
|
375
|
+
hitSlop: child.props.hitSlop
|
376
|
+
}, "pressabilityDebugView"));
|
377
|
+
}
|
378
|
+
return /*#__PURE__*/React.cloneElement(child, {
|
379
|
+
ref: this.refHandler,
|
380
|
+
collapsable: false,
|
381
|
+
...((0, _utils2.isTestEnv)() ? {
|
382
|
+
handlerType: name,
|
383
|
+
handlerTag: this.handlerTag,
|
384
|
+
enabled: this.props.enabled
|
385
|
+
} : {}),
|
386
|
+
testID: this.props.testID ?? child.props.testID,
|
387
|
+
...events
|
388
|
+
}, grandChildren);
|
389
|
+
}
|
390
|
+
}
|
391
|
+
return Handler;
|
392
|
+
}
|
393
|
+
//# sourceMappingURL=createHandler.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_customDirectEventTypes","_RNGestureHandlerModule","_interopRequireDefault","_State","_handlersRegistry","_getNextHandlerTag","_utils","_findNodeHandle","_utils2","_ActionType","_PressabilityDebugView","_GestureHandlerRootViewContext","_ghQueueMicrotask","_mountRegistry","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","UIManagerAny","UIManager","customDirectEventTypes","topGestureHandlerEvent","registrationName","customGHEventsConfigFabricAndroid","topOnGestureHandlerEvent","topOnGestureHandlerStateChange","customGHEventsConfig","onGestureHandlerEvent","onGestureHandlerStateChange","isFabric","Platform","OS","genericDirectEventTypes","UIManagerConstants","getViewManagerConfig","setJSResponder","oldSetJSResponder","clearJSResponder","oldClearJSResponder","tag","blockNativeResponder","RNGestureHandlerModule","handleSetJSResponder","handleClearJSResponder","allowTouches","DEV_ON_ANDROID","__DEV__","DeviceEventEmitter","addListener","hasUnresolvedRefs","props","extract","refs","Array","isArray","current","some","stateToPropMappings","State","UNDETERMINED","undefined","BEGAN","FAILED","CANCELLED","ACTIVE","END","UNRESOLVED_REFS_RETRY_LIMIT","createHandler","name","allowedProps","config","transformProps","customNativeProps","Handler","Component","displayName","contextType","GestureHandlerRootViewContext","handlerTag","constructor","propsRef","createRef","isMountedRef","state","id","handlerIDToTag","Error","componentDidMount","inspectorToggleListener","setState","_","update","ghQueueMicrotask","createGestureHandler","filterConfig","viewNode","attachGestureHandler","findNodeHandle","componentDidUpdate","viewTag","componentWillUnmount","remove","unregisterOldGestureHandler","dropGestureHandler","scheduleFlushOperations","handlerID","MountRegistry","gestureHandlerWillUnmount","event","nativeEvent","onGestureEvent","onHandlerStateChange","stateEventName","eventHandler","refHandler","node","child","Children","only","children","ref","isReact19","newConfig","getNextHandlerTag","newViewTag","ActionType","JS_FUNCTION_OLD_API","registerOldGestureHandler","onGestureStateChange","actionType","isGestureHandlerWorklet","isStateChangeHandlerWorklet","isReanimatedHandler","REANIMATED_WORKLET","NATIVE_ANIMATED_EVENT","gestureHandlerWillMount","updateGestureHandler","remainingTries","deepEqual","setNativeProps","updates","mergedProps","render","context","isTestEnv","gestureEventHandler","gestureStateEventHandler","events","tagMessage","grandChildren","type","toArray","push","jsx","PressabilityDebugView","color","hitSlop","cloneElement","collapsable","handlerType","enabled","testID"],"sourceRoot":"../../../src","sources":["handlers/createHandler.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAMA,IAAAE,uBAAA,GAAAF,OAAA;AACA,IAAAG,uBAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,iBAAA,GAAAN,OAAA;AAKA,IAAAO,kBAAA,GAAAP,OAAA;AAOA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,eAAA,GAAAL,sBAAA,CAAAJ,OAAA;AAEA,IAAAU,OAAA,GAAAV,OAAA;AAOA,IAAAW,WAAA,GAAAX,OAAA;AACA,IAAAY,sBAAA,GAAAZ,OAAA;AACA,IAAAa,8BAAA,GAAAT,sBAAA,CAAAJ,OAAA;AACA,IAAAc,iBAAA,GAAAd,OAAA;AACA,IAAAe,cAAA,GAAAf,OAAA;AAAiD,IAAAgB,WAAA,GAAAhB,OAAA;AAAA,SAAAI,uBAAAa,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAlB,wBAAAkB,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAtB,uBAAA,YAAAA,CAAAkB,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAA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G;QAAQ,GAFzB,uBAGL,CACH,CAAC;MACH;MAEA,oBAAOhL,KAAK,CAACiL,YAAY,CACvBzC,KAAK,EACL;QACEI,GAAG,EAAE,IAAI,CAACN,UAAU;QACpB4C,WAAW,EAAE,KAAK;QAClB,IAAI,IAAAd,iBAAS,EAAC,CAAC,GACX;UACEe,WAAW,EAAE3F,IAAI;UACjBU,UAAU,EAAE,IAAI,CAACA,UAAU;UAC3BkF,OAAO,EAAE,IAAI,CAAC9G,KAAK,CAAC8G;QACtB,CAAC,GACD,CAAC,CAAC,CAAC;QACPC,MAAM,EAAE,IAAI,CAAC/G,KAAK,CAAC+G,MAAM,IAAI7C,KAAK,CAAClE,KAAK,CAAC+G,MAAM;QAC/C,GAAGd;MACL,CAAC,EACDE,aACF,CAAC;IACH;EACF;EACA,OAAO5E,OAAO;AAChB","ignoreList":[]}
|
@@ -0,0 +1,78 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.default = createNativeWrapper;
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
8
|
+
var React = _react;
|
9
|
+
var _NativeViewGestureHandler = require("./NativeViewGestureHandler");
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
11
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
12
|
+
/*
|
13
|
+
* This array should consist of:
|
14
|
+
* - All keys in propTypes from NativeGestureHandler
|
15
|
+
* (and all keys in GestureHandlerPropTypes)
|
16
|
+
* - 'onGestureHandlerEvent'
|
17
|
+
* - 'onGestureHandlerStateChange'
|
18
|
+
*/const NATIVE_WRAPPER_PROPS_FILTER = [..._NativeViewGestureHandler.nativeViewProps, 'onGestureHandlerEvent', 'onGestureHandlerStateChange'];
|
19
|
+
function createNativeWrapper(Component, config = {}) {
|
20
|
+
const ComponentWrapper = /*#__PURE__*/React.forwardRef((props, ref) => {
|
21
|
+
// Filter out props that should be passed to gesture handler wrapper
|
22
|
+
const {
|
23
|
+
gestureHandlerProps,
|
24
|
+
childProps
|
25
|
+
} = Object.keys(props).reduce((res, key) => {
|
26
|
+
// TS being overly protective with it's types, see https://github.com/microsoft/TypeScript/issues/26255#issuecomment-458013731 for more info
|
27
|
+
const allowedKeys = NATIVE_WRAPPER_PROPS_FILTER;
|
28
|
+
if (allowedKeys.includes(key)) {
|
29
|
+
// @ts-ignore FIXME(TS)
|
30
|
+
res.gestureHandlerProps[key] = props[key];
|
31
|
+
} else {
|
32
|
+
// @ts-ignore FIXME(TS)
|
33
|
+
res.childProps[key] = props[key];
|
34
|
+
}
|
35
|
+
return res;
|
36
|
+
}, {
|
37
|
+
gestureHandlerProps: {
|
38
|
+
...config
|
39
|
+
},
|
40
|
+
// Watch out not to modify config
|
41
|
+
childProps: {
|
42
|
+
enabled: props.enabled,
|
43
|
+
hitSlop: props.hitSlop,
|
44
|
+
testID: props.testID
|
45
|
+
}
|
46
|
+
});
|
47
|
+
const _ref = (0, _react.useRef)(null);
|
48
|
+
const _gestureHandlerRef = (0, _react.useRef)(null);
|
49
|
+
(0, _react.useImperativeHandle)(ref,
|
50
|
+
// @ts-ignore TODO(TS) decide how nulls work in this context
|
51
|
+
() => {
|
52
|
+
const node = _gestureHandlerRef.current;
|
53
|
+
// Add handlerTag for relations config
|
54
|
+
if (_ref.current && node) {
|
55
|
+
// @ts-ignore FIXME(TS) think about createHandler return type
|
56
|
+
_ref.current.handlerTag = node.handlerTag;
|
57
|
+
return _ref.current;
|
58
|
+
}
|
59
|
+
return null;
|
60
|
+
}, [_ref, _gestureHandlerRef]);
|
61
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_NativeViewGestureHandler.NativeViewGestureHandler, {
|
62
|
+
...gestureHandlerProps,
|
63
|
+
// @ts-ignore TODO(TS)
|
64
|
+
ref: _gestureHandlerRef,
|
65
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
66
|
+
...childProps,
|
67
|
+
ref: _ref
|
68
|
+
})
|
69
|
+
});
|
70
|
+
});
|
71
|
+
|
72
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
73
|
+
ComponentWrapper.displayName = Component?.displayName ||
|
74
|
+
// @ts-ignore if render doesn't exist it will return undefined and go further
|
75
|
+
Component?.render?.name || typeof Component === 'string' && Component || 'ComponentWrapper';
|
76
|
+
return ComponentWrapper;
|
77
|
+
}
|
78
|
+
//# sourceMappingURL=createNativeWrapper.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","React","_NativeViewGestureHandler","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","NATIVE_WRAPPER_PROPS_FILTER","nativeViewProps","createNativeWrapper","Component","config","ComponentWrapper","forwardRef","props","ref","gestureHandlerProps","childProps","keys","reduce","res","key","allowedKeys","includes","enabled","hitSlop","testID","_ref","useRef","_gestureHandlerRef","useImperativeHandle","node","current","handlerTag","jsx","NativeViewGestureHandler","children","displayName","render","name"],"sourceRoot":"../../../src","sources":["handlers/createNativeWrapper.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA+B,IAAAC,KAAA,GAAAH,MAAA;AAG/B,IAAAI,yBAAA,GAAAF,OAAA;AAIoC,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,w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AAAO,QAAA,eACxB,IAAAjD,WAAA,CAAA+C,GAAA,EAACxB,SAAS;QAAA,GAAKO,UAAU;QAAEF,GAAG,EAAEY;MAAK,CAAE;IAAC,CAChB,CAAC;EAE/B,CAAC,CAAC;;EAEF;EACAf,gBAAgB,CAACyB,WAAW,GAC1B3B,SAAS,EAAE2B,WAAW;EACtB;EACA3B,SAAS,EAAE4B,MAAM,EAAEC,IAAI,IACtB,OAAO7B,SAAS,KAAK,QAAQ,IAAIA,SAAU,IAC5C,kBAAkB;EAEpB,OAAOE,gBAAgB;AACzB","ignoreList":[]}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
Object.defineProperty(exports, "customDirectEventTypes", {
|
7
|
+
enumerable: true,
|
8
|
+
get: function () {
|
9
|
+
return _ReactNativeViewConfigRegistry.customDirectEventTypes;
|
10
|
+
}
|
11
|
+
});
|
12
|
+
var _ReactNativeViewConfigRegistry = require("react-native/Libraries/Renderer/shims/ReactNativeViewConfigRegistry");
|
13
|
+
//# sourceMappingURL=customDirectEventTypes.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_ReactNativeViewConfigRegistry","require"],"sourceRoot":"../../../src","sources":["handlers/customDirectEventTypes.ts"],"mappings":";;;;;;;;;;;AACA,IAAAA,8BAAA,GAAAC,OAAA","ignoreList":[]}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.customDirectEventTypes = void 0;
|
7
|
+
// customDirectEventTypes doesn't exist in react-native-web, therefore importing it
|
8
|
+
// directly in createHandler.tsx would end in crash.
|
9
|
+
const customDirectEventTypes = exports.customDirectEventTypes = {};
|
10
|
+
//# sourceMappingURL=customDirectEventTypes.web.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["customDirectEventTypes","exports"],"sourceRoot":"../../../src","sources":["handlers/customDirectEventTypes.web.ts"],"mappings":";;;;;;AAAA;AACA;AACA,MAAMA,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,GAAG,CAAC,CAAC","ignoreList":[]}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.baseGestureHandlerWithDetectorProps = exports.baseGestureHandlerProps = exports.MouseButton = void 0;
|
7
|
+
// Previous types exported gesture handlers as classes which creates an interface and variable, both named the same as class.
|
8
|
+
// Without those types, we'd introduce breaking change, forcing users to prefix every handler type specification with typeof
|
9
|
+
// e.g. React.createRef<TapGestureHandler> -> React.createRef<typeof TapGestureHandler>.
|
10
|
+
// See https://www.typescriptlang.org/docs/handbook/classes.html#constructor-functions for reference.
|
11
|
+
|
12
|
+
const commonProps = ['id', 'enabled', 'shouldCancelWhenOutside', 'hitSlop', 'cancelsTouchesInView', 'userSelect', 'activeCursor', 'mouseButton', 'enableContextMenu', 'touchAction'];
|
13
|
+
const componentInteractionProps = ['waitFor', 'simultaneousHandlers', 'blocksHandlers'];
|
14
|
+
const baseGestureHandlerProps = exports.baseGestureHandlerProps = [...commonProps, ...componentInteractionProps, 'onBegan', 'onFailed', 'onCancelled', 'onActivated', 'onEnded', 'onGestureEvent', 'onHandlerStateChange'];
|
15
|
+
const baseGestureHandlerWithDetectorProps = exports.baseGestureHandlerWithDetectorProps = [...commonProps, 'needsPointerData', 'manualActivation'];
|
16
|
+
let MouseButton = exports.MouseButton = /*#__PURE__*/function (MouseButton) {
|
17
|
+
MouseButton[MouseButton["LEFT"] = 1] = "LEFT";
|
18
|
+
MouseButton[MouseButton["RIGHT"] = 2] = "RIGHT";
|
19
|
+
MouseButton[MouseButton["MIDDLE"] = 4] = "MIDDLE";
|
20
|
+
MouseButton[MouseButton["BUTTON_4"] = 8] = "BUTTON_4";
|
21
|
+
MouseButton[MouseButton["BUTTON_5"] = 16] = "BUTTON_5";
|
22
|
+
MouseButton[MouseButton["ALL"] = 31] = "ALL";
|
23
|
+
return MouseButton;
|
24
|
+
}({}); // TODO(TS) events in handlers
|
25
|
+
// Events payloads are types instead of interfaces due to TS limitation.
|
26
|
+
// See https://github.com/microsoft/TypeScript/issues/15300 for more info.
|
27
|
+
//# sourceMappingURL=gestureHandlerCommon.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["commonProps","componentInteractionProps","baseGestureHandlerProps","exports","baseGestureHandlerWithDetectorProps","MouseButton"],"sourceRoot":"../../../src","sources":["handlers/gestureHandlerCommon.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;;AAQA,MAAMA,WAAW,GAAG,CAClB,IAAI,EACJ,SAAS,EACT,yBAAyB,EACzB,SAAS,EACT,sBAAsB,EACtB,YAAY,EACZ,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,aAAa,CACL;AAEV,MAAMC,yBAAyB,GAAG,CAChC,SAAS,EACT,sBAAsB,EACtB,gBAAgB,CACR;AAEH,MAAMC,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAG,CACrC,GAAGF,WAAW,EACd,GAAGC,yBAAyB,EAC5B,SAAS,EACT,UAAU,EACV,aAAa,EACb,aAAa,EACb,SAAS,EACT,gBAAgB,EAChB,sBAAsB,CACd;AAEH,MAAMG,mCAAmC,GAAAD,OAAA,CAAAC,mCAAA,GAAG,CACjD,GAAGJ,WAAW,EACd,kBAAkB,EAClB,kBAAkB,CACnB;AAAC,IAkEUK,WAAW,GAAAF,OAAA,CAAAE,WAAA,0BAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA,OA0BvB;AA+CA;AACA","ignoreList":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["handlers/gestureHandlerTypesCompat.ts"],"mappings":"","ignoreList":[]}
|