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,393 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
import { State } from '../../State';
|
4
|
+
import { DEFAULT_TOUCH_SLOP } from '../constants';
|
5
|
+
import { WheelDevice } from '../interfaces';
|
6
|
+
import GestureHandler from './GestureHandler';
|
7
|
+
const DEFAULT_MIN_POINTERS = 1;
|
8
|
+
const DEFAULT_MAX_POINTERS = 10;
|
9
|
+
const DEFAULT_MIN_DIST_SQ = DEFAULT_TOUCH_SLOP * DEFAULT_TOUCH_SLOP;
|
10
|
+
export default class PanGestureHandler extends GestureHandler {
|
11
|
+
customActivationProperties = ['activeOffsetXStart', 'activeOffsetXEnd', 'failOffsetXStart', 'failOffsetXEnd', 'activeOffsetYStart', 'activeOffsetYEnd', 'failOffsetYStart', 'failOffsetYEnd', 'minVelocityX', 'minVelocityY', 'minVelocity'];
|
12
|
+
velocityX = 0;
|
13
|
+
velocityY = 0;
|
14
|
+
minDistSq = DEFAULT_MIN_DIST_SQ;
|
15
|
+
activeOffsetXStart = -Number.MAX_SAFE_INTEGER;
|
16
|
+
activeOffsetXEnd = Number.MIN_SAFE_INTEGER;
|
17
|
+
failOffsetXStart = Number.MIN_SAFE_INTEGER;
|
18
|
+
failOffsetXEnd = Number.MAX_SAFE_INTEGER;
|
19
|
+
activeOffsetYStart = Number.MAX_SAFE_INTEGER;
|
20
|
+
activeOffsetYEnd = Number.MIN_SAFE_INTEGER;
|
21
|
+
failOffsetYStart = Number.MIN_SAFE_INTEGER;
|
22
|
+
failOffsetYEnd = Number.MAX_SAFE_INTEGER;
|
23
|
+
minVelocityX = Number.MAX_SAFE_INTEGER;
|
24
|
+
minVelocityY = Number.MAX_SAFE_INTEGER;
|
25
|
+
minVelocitySq = Number.MAX_SAFE_INTEGER;
|
26
|
+
minPointers = DEFAULT_MIN_POINTERS;
|
27
|
+
maxPointers = DEFAULT_MAX_POINTERS;
|
28
|
+
startX = 0;
|
29
|
+
startY = 0;
|
30
|
+
offsetX = 0;
|
31
|
+
offsetY = 0;
|
32
|
+
lastX = 0;
|
33
|
+
lastY = 0;
|
34
|
+
activateAfterLongPress = 0;
|
35
|
+
activationTimeout = 0;
|
36
|
+
enableTrackpadTwoFingerGesture = false;
|
37
|
+
endWheelTimeout = 0;
|
38
|
+
wheelDevice = WheelDevice.UNDETERMINED;
|
39
|
+
updateGestureConfig({
|
40
|
+
enabled = true,
|
41
|
+
...props
|
42
|
+
}) {
|
43
|
+
this.resetConfig();
|
44
|
+
super.updateGestureConfig({
|
45
|
+
enabled: enabled,
|
46
|
+
...props
|
47
|
+
});
|
48
|
+
this.checkCustomActivationCriteria(this.customActivationProperties);
|
49
|
+
if (this.config.minDist !== undefined) {
|
50
|
+
this.minDistSq = this.config.minDist * this.config.minDist;
|
51
|
+
} else if (this.hasCustomActivationCriteria) {
|
52
|
+
this.minDistSq = Number.MAX_SAFE_INTEGER;
|
53
|
+
}
|
54
|
+
if (this.config.minPointers !== undefined) {
|
55
|
+
this.minPointers = this.config.minPointers;
|
56
|
+
}
|
57
|
+
if (this.config.maxPointers !== undefined) {
|
58
|
+
this.maxPointers = this.config.maxPointers;
|
59
|
+
}
|
60
|
+
if (this.config.minVelocity !== undefined) {
|
61
|
+
this.minVelocityX = this.config.minVelocity;
|
62
|
+
this.minVelocityY = this.config.minVelocity;
|
63
|
+
}
|
64
|
+
if (this.config.minVelocityX !== undefined) {
|
65
|
+
this.minVelocityX = this.config.minVelocityX;
|
66
|
+
}
|
67
|
+
if (this.config.minVelocityY !== undefined) {
|
68
|
+
this.minVelocityY = this.config.minVelocityY;
|
69
|
+
}
|
70
|
+
if (this.config.activateAfterLongPress !== undefined) {
|
71
|
+
this.activateAfterLongPress = this.config.activateAfterLongPress;
|
72
|
+
}
|
73
|
+
if (this.config.activeOffsetXStart !== undefined) {
|
74
|
+
this.activeOffsetXStart = this.config.activeOffsetXStart;
|
75
|
+
if (this.config.activeOffsetXEnd === undefined) {
|
76
|
+
this.activeOffsetXEnd = Number.MAX_SAFE_INTEGER;
|
77
|
+
}
|
78
|
+
}
|
79
|
+
if (this.config.activeOffsetXEnd !== undefined) {
|
80
|
+
this.activeOffsetXEnd = this.config.activeOffsetXEnd;
|
81
|
+
if (this.config.activeOffsetXStart === undefined) {
|
82
|
+
this.activeOffsetXStart = Number.MIN_SAFE_INTEGER;
|
83
|
+
}
|
84
|
+
}
|
85
|
+
if (this.config.failOffsetXStart !== undefined) {
|
86
|
+
this.failOffsetXStart = this.config.failOffsetXStart;
|
87
|
+
if (this.config.failOffsetXEnd === undefined) {
|
88
|
+
this.failOffsetXEnd = Number.MAX_SAFE_INTEGER;
|
89
|
+
}
|
90
|
+
}
|
91
|
+
if (this.config.failOffsetXEnd !== undefined) {
|
92
|
+
this.failOffsetXEnd = this.config.failOffsetXEnd;
|
93
|
+
if (this.config.failOffsetXStart === undefined) {
|
94
|
+
this.failOffsetXStart = Number.MIN_SAFE_INTEGER;
|
95
|
+
}
|
96
|
+
}
|
97
|
+
if (this.config.activeOffsetYStart !== undefined) {
|
98
|
+
this.activeOffsetYStart = this.config.activeOffsetYStart;
|
99
|
+
if (this.config.activeOffsetYEnd === undefined) {
|
100
|
+
this.activeOffsetYEnd = Number.MAX_SAFE_INTEGER;
|
101
|
+
}
|
102
|
+
}
|
103
|
+
if (this.config.activeOffsetYEnd !== undefined) {
|
104
|
+
this.activeOffsetYEnd = this.config.activeOffsetYEnd;
|
105
|
+
if (this.config.activeOffsetYStart === undefined) {
|
106
|
+
this.activeOffsetYStart = Number.MIN_SAFE_INTEGER;
|
107
|
+
}
|
108
|
+
}
|
109
|
+
if (this.config.failOffsetYStart !== undefined) {
|
110
|
+
this.failOffsetYStart = this.config.failOffsetYStart;
|
111
|
+
if (this.config.failOffsetYEnd === undefined) {
|
112
|
+
this.failOffsetYEnd = Number.MAX_SAFE_INTEGER;
|
113
|
+
}
|
114
|
+
}
|
115
|
+
if (this.config.failOffsetYEnd !== undefined) {
|
116
|
+
this.failOffsetYEnd = this.config.failOffsetYEnd;
|
117
|
+
if (this.config.failOffsetYStart === undefined) {
|
118
|
+
this.failOffsetYStart = Number.MIN_SAFE_INTEGER;
|
119
|
+
}
|
120
|
+
}
|
121
|
+
if (this.config.enableTrackpadTwoFingerGesture !== undefined) {
|
122
|
+
this.enableTrackpadTwoFingerGesture = this.config.enableTrackpadTwoFingerGesture;
|
123
|
+
}
|
124
|
+
}
|
125
|
+
resetConfig() {
|
126
|
+
super.resetConfig();
|
127
|
+
this.activeOffsetXStart = -Number.MAX_SAFE_INTEGER;
|
128
|
+
this.activeOffsetXEnd = Number.MIN_SAFE_INTEGER;
|
129
|
+
this.failOffsetXStart = Number.MIN_SAFE_INTEGER;
|
130
|
+
this.failOffsetXEnd = Number.MAX_SAFE_INTEGER;
|
131
|
+
this.activeOffsetYStart = Number.MAX_SAFE_INTEGER;
|
132
|
+
this.activeOffsetYEnd = Number.MIN_SAFE_INTEGER;
|
133
|
+
this.failOffsetYStart = Number.MIN_SAFE_INTEGER;
|
134
|
+
this.failOffsetYEnd = Number.MAX_SAFE_INTEGER;
|
135
|
+
this.minVelocityX = Number.MAX_SAFE_INTEGER;
|
136
|
+
this.minVelocityY = Number.MAX_SAFE_INTEGER;
|
137
|
+
this.minVelocitySq = Number.MAX_SAFE_INTEGER;
|
138
|
+
this.minDistSq = DEFAULT_MIN_DIST_SQ;
|
139
|
+
this.minPointers = DEFAULT_MIN_POINTERS;
|
140
|
+
this.maxPointers = DEFAULT_MAX_POINTERS;
|
141
|
+
this.activateAfterLongPress = 0;
|
142
|
+
}
|
143
|
+
transformNativeEvent() {
|
144
|
+
const translationX = this.getTranslationX();
|
145
|
+
const translationY = this.getTranslationY();
|
146
|
+
return {
|
147
|
+
...super.transformNativeEvent(),
|
148
|
+
translationX: isNaN(translationX) ? 0 : translationX,
|
149
|
+
translationY: isNaN(translationY) ? 0 : translationY,
|
150
|
+
velocityX: this.velocityX,
|
151
|
+
velocityY: this.velocityY,
|
152
|
+
stylusData: this.stylusData
|
153
|
+
};
|
154
|
+
}
|
155
|
+
getTranslationX() {
|
156
|
+
return this.lastX - this.startX + this.offsetX;
|
157
|
+
}
|
158
|
+
getTranslationY() {
|
159
|
+
return this.lastY - this.startY + this.offsetY;
|
160
|
+
}
|
161
|
+
clearActivationTimeout() {
|
162
|
+
clearTimeout(this.activationTimeout);
|
163
|
+
}
|
164
|
+
updateLastCoords() {
|
165
|
+
const {
|
166
|
+
x,
|
167
|
+
y
|
168
|
+
} = this.tracker.getAbsoluteCoordsAverage();
|
169
|
+
this.lastX = x;
|
170
|
+
this.lastY = y;
|
171
|
+
}
|
172
|
+
updateVelocity(pointerId) {
|
173
|
+
const velocities = this.tracker.getVelocity(pointerId);
|
174
|
+
this.velocityX = velocities?.x ?? 0;
|
175
|
+
this.velocityY = velocities?.y ?? 0;
|
176
|
+
}
|
177
|
+
|
178
|
+
// Events Handling
|
179
|
+
onPointerDown(event) {
|
180
|
+
if (!this.isButtonInConfig(event.button)) {
|
181
|
+
return;
|
182
|
+
}
|
183
|
+
this.tracker.addToTracker(event);
|
184
|
+
this.stylusData = event.stylusData;
|
185
|
+
super.onPointerDown(event);
|
186
|
+
this.updateLastCoords();
|
187
|
+
this.startX = this.lastX;
|
188
|
+
this.startY = this.lastY;
|
189
|
+
this.tryBegin(event);
|
190
|
+
this.checkBegan();
|
191
|
+
this.tryToSendTouchEvent(event);
|
192
|
+
}
|
193
|
+
onPointerAdd(event) {
|
194
|
+
this.tracker.addToTracker(event);
|
195
|
+
super.onPointerAdd(event);
|
196
|
+
this.tryBegin(event);
|
197
|
+
this.offsetX += this.lastX - this.startX;
|
198
|
+
this.offsetY += this.lastY - this.startY;
|
199
|
+
this.updateLastCoords();
|
200
|
+
this.startX = this.lastX;
|
201
|
+
this.startY = this.lastY;
|
202
|
+
if (this.tracker.trackedPointersCount > this.maxPointers) {
|
203
|
+
if (this.state === State.ACTIVE) {
|
204
|
+
this.cancel();
|
205
|
+
} else {
|
206
|
+
this.fail();
|
207
|
+
}
|
208
|
+
} else {
|
209
|
+
this.checkBegan();
|
210
|
+
}
|
211
|
+
}
|
212
|
+
onPointerUp(event) {
|
213
|
+
this.stylusData = event.stylusData;
|
214
|
+
super.onPointerUp(event);
|
215
|
+
if (this.state === State.ACTIVE) {
|
216
|
+
const lastCoords = this.tracker.getAbsoluteCoordsAverage();
|
217
|
+
this.lastX = lastCoords.x;
|
218
|
+
this.lastY = lastCoords.y;
|
219
|
+
}
|
220
|
+
this.tracker.removeFromTracker(event.pointerId);
|
221
|
+
if (this.tracker.trackedPointersCount === 0) {
|
222
|
+
this.clearActivationTimeout();
|
223
|
+
}
|
224
|
+
if (this.state === State.ACTIVE) {
|
225
|
+
this.end();
|
226
|
+
} else {
|
227
|
+
this.resetProgress();
|
228
|
+
this.fail();
|
229
|
+
}
|
230
|
+
}
|
231
|
+
onPointerRemove(event) {
|
232
|
+
super.onPointerRemove(event);
|
233
|
+
this.tracker.removeFromTracker(event.pointerId);
|
234
|
+
this.offsetX += this.lastX - this.startX;
|
235
|
+
this.offsetY += this.lastY - this.startY;
|
236
|
+
this.updateLastCoords();
|
237
|
+
this.startX = this.lastX;
|
238
|
+
this.startY = this.lastY;
|
239
|
+
if (!(this.state === State.ACTIVE && this.tracker.trackedPointersCount < this.minPointers)) {
|
240
|
+
this.checkBegan();
|
241
|
+
}
|
242
|
+
}
|
243
|
+
onPointerMove(event) {
|
244
|
+
this.tracker.track(event);
|
245
|
+
this.stylusData = event.stylusData;
|
246
|
+
this.updateLastCoords();
|
247
|
+
this.updateVelocity(event.pointerId);
|
248
|
+
this.checkBegan();
|
249
|
+
super.onPointerMove(event);
|
250
|
+
}
|
251
|
+
onPointerOutOfBounds(event) {
|
252
|
+
if (this.shouldCancelWhenOutside) {
|
253
|
+
return;
|
254
|
+
}
|
255
|
+
this.tracker.track(event);
|
256
|
+
this.stylusData = event.stylusData;
|
257
|
+
this.updateLastCoords();
|
258
|
+
this.updateVelocity(event.pointerId);
|
259
|
+
this.checkBegan();
|
260
|
+
if (this.state === State.ACTIVE) {
|
261
|
+
super.onPointerOutOfBounds(event);
|
262
|
+
}
|
263
|
+
}
|
264
|
+
scheduleWheelEnd(event) {
|
265
|
+
clearTimeout(this.endWheelTimeout);
|
266
|
+
this.endWheelTimeout = setTimeout(() => {
|
267
|
+
if (this.state === State.ACTIVE) {
|
268
|
+
this.end();
|
269
|
+
this.tracker.removeFromTracker(event.pointerId);
|
270
|
+
this.state = State.UNDETERMINED;
|
271
|
+
}
|
272
|
+
this.wheelDevice = WheelDevice.UNDETERMINED;
|
273
|
+
}, 30);
|
274
|
+
}
|
275
|
+
onWheel(event) {
|
276
|
+
if (this.wheelDevice === WheelDevice.MOUSE || !this.enableTrackpadTwoFingerGesture) {
|
277
|
+
return;
|
278
|
+
}
|
279
|
+
if (this.state === State.UNDETERMINED) {
|
280
|
+
this.wheelDevice = event.wheelDeltaY % 120 !== 0 ? WheelDevice.TOUCHPAD : WheelDevice.MOUSE;
|
281
|
+
if (this.wheelDevice === WheelDevice.MOUSE) {
|
282
|
+
this.scheduleWheelEnd(event);
|
283
|
+
return;
|
284
|
+
}
|
285
|
+
this.tracker.addToTracker(event);
|
286
|
+
this.updateLastCoords();
|
287
|
+
this.startX = this.lastX;
|
288
|
+
this.startY = this.lastY;
|
289
|
+
this.begin();
|
290
|
+
this.activate();
|
291
|
+
}
|
292
|
+
this.tracker.track(event);
|
293
|
+
this.updateLastCoords();
|
294
|
+
this.updateVelocity(event.pointerId);
|
295
|
+
this.tryToSendMoveEvent(false, event);
|
296
|
+
this.scheduleWheelEnd(event);
|
297
|
+
}
|
298
|
+
shouldActivate() {
|
299
|
+
const dx = this.getTranslationX();
|
300
|
+
if (this.activeOffsetXStart !== Number.MAX_SAFE_INTEGER && dx < this.activeOffsetXStart) {
|
301
|
+
return true;
|
302
|
+
}
|
303
|
+
if (this.activeOffsetXEnd !== Number.MIN_SAFE_INTEGER && dx > this.activeOffsetXEnd) {
|
304
|
+
return true;
|
305
|
+
}
|
306
|
+
const dy = this.getTranslationY();
|
307
|
+
if (this.activeOffsetYStart !== Number.MAX_SAFE_INTEGER && dy < this.activeOffsetYStart) {
|
308
|
+
return true;
|
309
|
+
}
|
310
|
+
if (this.activeOffsetYEnd !== Number.MIN_SAFE_INTEGER && dy > this.activeOffsetYEnd) {
|
311
|
+
return true;
|
312
|
+
}
|
313
|
+
const distanceSq = dx * dx + dy * dy;
|
314
|
+
if (this.minDistSq !== Number.MAX_SAFE_INTEGER && distanceSq >= this.minDistSq) {
|
315
|
+
return true;
|
316
|
+
}
|
317
|
+
const vx = this.velocityX;
|
318
|
+
if (this.minVelocityX !== Number.MAX_SAFE_INTEGER && (this.minVelocityX < 0 && vx <= this.minVelocityX || this.minVelocityX >= 0 && this.minVelocityX <= vx)) {
|
319
|
+
return true;
|
320
|
+
}
|
321
|
+
const vy = this.velocityY;
|
322
|
+
if (this.minVelocityY !== Number.MAX_SAFE_INTEGER && (this.minVelocityY < 0 && vy <= this.minVelocityY || this.minVelocityY >= 0 && this.minVelocityY <= vy)) {
|
323
|
+
return true;
|
324
|
+
}
|
325
|
+
const velocitySq = vx * vx + vy * vy;
|
326
|
+
return this.minVelocitySq !== Number.MAX_SAFE_INTEGER && velocitySq >= this.minVelocitySq;
|
327
|
+
}
|
328
|
+
shouldFail() {
|
329
|
+
const dx = this.getTranslationX();
|
330
|
+
const dy = this.getTranslationY();
|
331
|
+
const distanceSq = dx * dx + dy * dy;
|
332
|
+
if (this.activateAfterLongPress > 0 && distanceSq > DEFAULT_MIN_DIST_SQ) {
|
333
|
+
this.clearActivationTimeout();
|
334
|
+
return true;
|
335
|
+
}
|
336
|
+
if (this.failOffsetXStart !== Number.MIN_SAFE_INTEGER && dx < this.failOffsetXStart) {
|
337
|
+
return true;
|
338
|
+
}
|
339
|
+
if (this.failOffsetXEnd !== Number.MAX_SAFE_INTEGER && dx > this.failOffsetXEnd) {
|
340
|
+
return true;
|
341
|
+
}
|
342
|
+
if (this.failOffsetYStart !== Number.MIN_SAFE_INTEGER && dy < this.failOffsetYStart) {
|
343
|
+
return true;
|
344
|
+
}
|
345
|
+
return this.failOffsetYEnd !== Number.MAX_SAFE_INTEGER && dy > this.failOffsetYEnd;
|
346
|
+
}
|
347
|
+
tryBegin(event) {
|
348
|
+
if (this.state === State.UNDETERMINED && this.tracker.trackedPointersCount >= this.minPointers) {
|
349
|
+
this.resetProgress();
|
350
|
+
this.offsetX = 0;
|
351
|
+
this.offsetY = 0;
|
352
|
+
this.velocityX = 0;
|
353
|
+
this.velocityY = 0;
|
354
|
+
this.begin();
|
355
|
+
if (this.activateAfterLongPress > 0) {
|
356
|
+
this.activationTimeout = setTimeout(() => {
|
357
|
+
this.activate();
|
358
|
+
}, this.activateAfterLongPress);
|
359
|
+
}
|
360
|
+
} else {
|
361
|
+
this.updateVelocity(event.pointerId);
|
362
|
+
}
|
363
|
+
}
|
364
|
+
checkBegan() {
|
365
|
+
if (this.state === State.BEGAN) {
|
366
|
+
if (this.shouldFail()) {
|
367
|
+
this.fail();
|
368
|
+
} else if (this.shouldActivate()) {
|
369
|
+
this.activate();
|
370
|
+
}
|
371
|
+
}
|
372
|
+
}
|
373
|
+
activate(force = false) {
|
374
|
+
if (this.state !== State.ACTIVE) {
|
375
|
+
this.resetProgress();
|
376
|
+
}
|
377
|
+
super.activate(force);
|
378
|
+
}
|
379
|
+
onCancel() {
|
380
|
+
this.clearActivationTimeout();
|
381
|
+
}
|
382
|
+
onReset() {
|
383
|
+
this.clearActivationTimeout();
|
384
|
+
}
|
385
|
+
resetProgress() {
|
386
|
+
if (this.state === State.ACTIVE) {
|
387
|
+
return;
|
388
|
+
}
|
389
|
+
this.startX = this.lastX;
|
390
|
+
this.startY = this.lastY;
|
391
|
+
}
|
392
|
+
}
|
393
|
+
//# sourceMappingURL=PanGestureHandler.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["State","DEFAULT_TOUCH_SLOP","WheelDevice","GestureHandler","DEFAULT_MIN_POINTERS","DEFAULT_MAX_POINTERS","DEFAULT_MIN_DIST_SQ","PanGestureHandler","customActivationProperties","velocityX","velocityY","minDistSq","activeOffsetXStart","Number","MAX_SAFE_INTEGER","activeOffsetXEnd","MIN_SAFE_INTEGER","failOffsetXStart","failOffsetXEnd","activeOffsetYStart","activeOffsetYEnd","failOffsetYStart","failOffsetYEnd","minVelocityX","minVelocityY","minVelocitySq","minPointers","maxPointers","startX","startY","offsetX","offsetY","lastX","lastY","activateAfterLongPress","activationTimeout","enableTrackpadTwoFingerGesture","endWheelTimeout","wheelDevice","UNDETERMINED","updateGestureConfig","enabled","props","resetConfig","checkCustomActivationCriteria","config","minDist","undefined","hasCustomActivationCriteria","minVelocity","transformNativeEvent","translationX","getTranslationX","translationY","getTranslationY","isNaN","stylusData","clearActivationTimeout","clearTimeout","updateLastCoords","x","y","tracker","getAbsoluteCoordsAverage","updateVelocity","pointerId","velocities","getVelocity","onPointerDown","event","isButtonInConfig","button","addToTracker","tryBegin","checkBegan","tryToSendTouchEvent","onPointerAdd","trackedPointersCount","state","ACTIVE","cancel","fail","onPointerUp","lastCoords","removeFromTracker","end","resetProgress","onPointerRemove","onPointerMove","track","onPointerOutOfBounds","shouldCancelWhenOutside","scheduleWheelEnd","setTimeout","onWheel","MOUSE","wheelDeltaY","TOUCHPAD","begin","activate","tryToSendMoveEvent","shouldActivate","dx","dy","distanceSq","vx","vy","velocitySq","shouldFail","BEGAN","force","onCancel","onReset"],"sourceRoot":"../../../../src","sources":["web/handlers/PanGestureHandler.ts"],"mappings":";;AAAA,SAASA,KAAK,QAAQ,aAAa;AACnC,SAASC,kBAAkB,QAAQ,cAAc;AACjD,SAA2CC,WAAW,QAAQ,eAAe;AAE7E,OAAOC,cAAc,MAAM,kBAAkB;AAE7C,MAAMC,oBAAoB,GAAG,CAAC;AAC9B,MAAMC,oBAAoB,GAAG,EAAE;AAC/B,MAAMC,mBAAmB,GAAGL,kBAAkB,GAAGA,kBAAkB;AAEnE,eAAe,MAAMM,iBAAiB,SAASJ,cAA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../State';
|
4
|
+
import { DEFAULT_TOUCH_SLOP } from '../constants';
|
5
|
+
import GestureHandler from './GestureHandler';
|
6
|
+
import ScaleGestureDetector from '../detectors/ScaleGestureDetector';
|
7
|
+
export default class PinchGestureHandler extends GestureHandler {
|
8
|
+
scale = 1;
|
9
|
+
velocity = 0;
|
10
|
+
startingSpan = 0;
|
11
|
+
spanSlop = DEFAULT_TOUCH_SLOP;
|
12
|
+
scaleDetectorListener = {
|
13
|
+
onScaleBegin: detector => {
|
14
|
+
this.startingSpan = detector.currentSpan;
|
15
|
+
return true;
|
16
|
+
},
|
17
|
+
onScale: detector => {
|
18
|
+
const prevScaleFactor = this.scale;
|
19
|
+
this.scale *= detector.calculateScaleFactor(this.tracker.trackedPointersCount);
|
20
|
+
const delta = detector.timeDelta;
|
21
|
+
if (delta > 0) {
|
22
|
+
this.velocity = (this.scale - prevScaleFactor) / delta;
|
23
|
+
}
|
24
|
+
if (Math.abs(this.startingSpan - detector.currentSpan) >= this.spanSlop && this.state === State.BEGAN) {
|
25
|
+
this.activate();
|
26
|
+
}
|
27
|
+
return true;
|
28
|
+
},
|
29
|
+
onScaleEnd: _detector => {}
|
30
|
+
};
|
31
|
+
scaleGestureDetector = new ScaleGestureDetector(this.scaleDetectorListener);
|
32
|
+
init(ref, propsRef) {
|
33
|
+
super.init(ref, propsRef);
|
34
|
+
this.shouldCancelWhenOutside = false;
|
35
|
+
}
|
36
|
+
transformNativeEvent() {
|
37
|
+
return {
|
38
|
+
focalX: this.scaleGestureDetector.focusX,
|
39
|
+
focalY: this.scaleGestureDetector.focusY,
|
40
|
+
velocity: this.velocity,
|
41
|
+
scale: this.scale
|
42
|
+
};
|
43
|
+
}
|
44
|
+
onPointerDown(event) {
|
45
|
+
this.tracker.addToTracker(event);
|
46
|
+
super.onPointerDown(event);
|
47
|
+
this.tryToSendTouchEvent(event);
|
48
|
+
}
|
49
|
+
onPointerAdd(event) {
|
50
|
+
this.tracker.addToTracker(event);
|
51
|
+
super.onPointerAdd(event);
|
52
|
+
this.tryBegin();
|
53
|
+
this.scaleGestureDetector.onTouchEvent(event, this.tracker);
|
54
|
+
}
|
55
|
+
onPointerUp(event) {
|
56
|
+
super.onPointerUp(event);
|
57
|
+
this.tracker.removeFromTracker(event.pointerId);
|
58
|
+
if (this.state !== State.ACTIVE) {
|
59
|
+
return;
|
60
|
+
}
|
61
|
+
this.scaleGestureDetector.onTouchEvent(event, this.tracker);
|
62
|
+
if (this.state === State.ACTIVE) {
|
63
|
+
this.end();
|
64
|
+
} else {
|
65
|
+
this.fail();
|
66
|
+
}
|
67
|
+
}
|
68
|
+
onPointerRemove(event) {
|
69
|
+
super.onPointerRemove(event);
|
70
|
+
this.scaleGestureDetector.onTouchEvent(event, this.tracker);
|
71
|
+
this.tracker.removeFromTracker(event.pointerId);
|
72
|
+
if (this.state === State.ACTIVE && this.tracker.trackedPointersCount < 2) {
|
73
|
+
this.end();
|
74
|
+
}
|
75
|
+
}
|
76
|
+
onPointerMove(event) {
|
77
|
+
if (this.tracker.trackedPointersCount < 2) {
|
78
|
+
return;
|
79
|
+
}
|
80
|
+
this.tracker.track(event);
|
81
|
+
this.scaleGestureDetector.onTouchEvent(event, this.tracker);
|
82
|
+
super.onPointerMove(event);
|
83
|
+
}
|
84
|
+
onPointerOutOfBounds(event) {
|
85
|
+
if (this.tracker.trackedPointersCount < 2) {
|
86
|
+
return;
|
87
|
+
}
|
88
|
+
this.tracker.track(event);
|
89
|
+
this.scaleGestureDetector.onTouchEvent(event, this.tracker);
|
90
|
+
super.onPointerOutOfBounds(event);
|
91
|
+
}
|
92
|
+
tryBegin() {
|
93
|
+
if (this.state !== State.UNDETERMINED) {
|
94
|
+
return;
|
95
|
+
}
|
96
|
+
this.resetProgress();
|
97
|
+
this.begin();
|
98
|
+
}
|
99
|
+
activate(force) {
|
100
|
+
if (this.state !== State.ACTIVE) {
|
101
|
+
this.resetProgress();
|
102
|
+
}
|
103
|
+
super.activate(force);
|
104
|
+
}
|
105
|
+
onReset() {
|
106
|
+
this.resetProgress();
|
107
|
+
}
|
108
|
+
resetProgress() {
|
109
|
+
if (this.state === State.ACTIVE) {
|
110
|
+
return;
|
111
|
+
}
|
112
|
+
this.velocity = 0;
|
113
|
+
this.scale = 1;
|
114
|
+
}
|
115
|
+
}
|
116
|
+
//# sourceMappingURL=PinchGestureHandler.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["State","DEFAULT_TOUCH_SLOP","GestureHandler","ScaleGestureDetector","PinchGestureHandler","scale","velocity","startingSpan","spanSlop","scaleDetectorListener","onScaleBegin","detector","currentSpan","onScale","prevScaleFactor","calculateScaleFactor","tracker","trackedPointersCount","delta","timeDelta","Math","abs","state","BEGAN","activate","onScaleEnd","_detector","scaleGestureDetector","init","ref","propsRef","shouldCancelWhenOutside","transformNativeEvent","focalX","focusX","focalY","focusY","onPointerDown","event","addToTracker","tryToSendTouchEvent","onPointerAdd","tryBegin","onTouchEvent","onPointerUp","removeFromTracker","pointerId","ACTIVE","end","fail","onPointerRemove","onPointerMove","track","onPointerOutOfBounds","UNDETERMINED","resetProgress","begin","force","onReset"],"sourceRoot":"../../../../src","sources":["web/handlers/PinchGestureHandler.ts"],"mappings":";;AAAA,SAASA,KAAK,QAAQ,aAAa;AACnC,SAASC,kBAAkB,QAAQ,cAAc;AAGjD,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,oBAAoB,MAEpB,mCAAmC;AAE1C,eAAe,MAAMC,mBAAmB,SAASF,cAAc,CAAC;EACtDG,KAAK,GAAG,CAAC;EACTC,QAAQ,GAAG,CAAC;EAEZC,YAAY,GAAG,CAAC;EAChBC,QAAQ,GAAGP,kBAAkB;EAE7BQ,qBAAqB,GAAyB;IACpDC,YAAY,EAAGC,QAA8B,IAAc;MACzD,IAAI,CAACJ,YAAY,GAAGI,QAAQ,CAACC,WAAW;MACxC,OAAO,IAAI;IACb,CAAC;IACDC,OAAO,EAAGF,QAA8B,IAAc;MACpD,MAAMG,eAAu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|
4
|
+
import GestureHandler from './GestureHandler';
|
5
|
+
import RotationGestureDetector from '../detectors/RotationGestureDetector';
|
6
|
+
const ROTATION_RECOGNITION_THRESHOLD = Math.PI / 36;
|
7
|
+
export default class RotationGestureHandler extends GestureHandler {
|
8
|
+
rotation = 0;
|
9
|
+
velocity = 0;
|
10
|
+
cachedAnchorX = 0;
|
11
|
+
cachedAnchorY = 0;
|
12
|
+
rotationGestureListener = {
|
13
|
+
onRotationBegin: _detector => true,
|
14
|
+
onRotation: detector => {
|
15
|
+
const previousRotation = this.rotation;
|
16
|
+
this.rotation += detector.rotation;
|
17
|
+
const delta = detector.timeDelta;
|
18
|
+
if (delta > 0) {
|
19
|
+
this.velocity = (this.rotation - previousRotation) / delta;
|
20
|
+
}
|
21
|
+
if (Math.abs(this.rotation) >= ROTATION_RECOGNITION_THRESHOLD && this.state === State.BEGAN) {
|
22
|
+
this.activate();
|
23
|
+
}
|
24
|
+
return true;
|
25
|
+
},
|
26
|
+
onRotationEnd: _detector => {
|
27
|
+
this.end();
|
28
|
+
}
|
29
|
+
};
|
30
|
+
rotationGestureDetector = new RotationGestureDetector(this.rotationGestureListener);
|
31
|
+
init(ref, propsRef) {
|
32
|
+
super.init(ref, propsRef);
|
33
|
+
this.shouldCancelWhenOutside = false;
|
34
|
+
}
|
35
|
+
transformNativeEvent() {
|
36
|
+
return {
|
37
|
+
rotation: this.rotation ? this.rotation : 0,
|
38
|
+
anchorX: this.getAnchorX(),
|
39
|
+
anchorY: this.getAnchorY(),
|
40
|
+
velocity: this.velocity ? this.velocity : 0
|
41
|
+
};
|
42
|
+
}
|
43
|
+
getAnchorX() {
|
44
|
+
const anchorX = this.rotationGestureDetector.anchorX;
|
45
|
+
return anchorX ? anchorX : this.cachedAnchorX;
|
46
|
+
}
|
47
|
+
getAnchorY() {
|
48
|
+
const anchorY = this.rotationGestureDetector.anchorY;
|
49
|
+
return anchorY ? anchorY : this.cachedAnchorY;
|
50
|
+
}
|
51
|
+
onPointerDown(event) {
|
52
|
+
this.tracker.addToTracker(event);
|
53
|
+
super.onPointerDown(event);
|
54
|
+
this.tryToSendTouchEvent(event);
|
55
|
+
}
|
56
|
+
onPointerAdd(event) {
|
57
|
+
this.tracker.addToTracker(event);
|
58
|
+
super.onPointerAdd(event);
|
59
|
+
this.tryBegin();
|
60
|
+
this.rotationGestureDetector.onTouchEvent(event, this.tracker);
|
61
|
+
}
|
62
|
+
onPointerMove(event) {
|
63
|
+
if (this.tracker.trackedPointersCount < 2) {
|
64
|
+
return;
|
65
|
+
}
|
66
|
+
if (this.getAnchorX()) {
|
67
|
+
this.cachedAnchorX = this.getAnchorX();
|
68
|
+
}
|
69
|
+
if (this.getAnchorY()) {
|
70
|
+
this.cachedAnchorY = this.getAnchorY();
|
71
|
+
}
|
72
|
+
this.tracker.track(event);
|
73
|
+
this.rotationGestureDetector.onTouchEvent(event, this.tracker);
|
74
|
+
super.onPointerMove(event);
|
75
|
+
}
|
76
|
+
onPointerOutOfBounds(event) {
|
77
|
+
if (this.tracker.trackedPointersCount < 2) {
|
78
|
+
return;
|
79
|
+
}
|
80
|
+
if (this.getAnchorX()) {
|
81
|
+
this.cachedAnchorX = this.getAnchorX();
|
82
|
+
}
|
83
|
+
if (this.getAnchorY()) {
|
84
|
+
this.cachedAnchorY = this.getAnchorY();
|
85
|
+
}
|
86
|
+
this.tracker.track(event);
|
87
|
+
this.rotationGestureDetector.onTouchEvent(event, this.tracker);
|
88
|
+
super.onPointerOutOfBounds(event);
|
89
|
+
}
|
90
|
+
onPointerUp(event) {
|
91
|
+
super.onPointerUp(event);
|
92
|
+
this.tracker.removeFromTracker(event.pointerId);
|
93
|
+
this.rotationGestureDetector.onTouchEvent(event, this.tracker);
|
94
|
+
if (this.state !== State.ACTIVE) {
|
95
|
+
return;
|
96
|
+
}
|
97
|
+
if (this.state === State.ACTIVE) {
|
98
|
+
this.end();
|
99
|
+
} else {
|
100
|
+
this.fail();
|
101
|
+
}
|
102
|
+
}
|
103
|
+
onPointerRemove(event) {
|
104
|
+
super.onPointerRemove(event);
|
105
|
+
this.rotationGestureDetector.onTouchEvent(event, this.tracker);
|
106
|
+
this.tracker.removeFromTracker(event.pointerId);
|
107
|
+
}
|
108
|
+
tryBegin() {
|
109
|
+
if (this.state !== State.UNDETERMINED) {
|
110
|
+
return;
|
111
|
+
}
|
112
|
+
this.begin();
|
113
|
+
}
|
114
|
+
onReset() {
|
115
|
+
if (this.state === State.ACTIVE) {
|
116
|
+
return;
|
117
|
+
}
|
118
|
+
this.rotation = 0;
|
119
|
+
this.velocity = 0;
|
120
|
+
this.rotationGestureDetector.reset();
|
121
|
+
}
|
122
|
+
}
|
123
|
+
//# sourceMappingURL=RotationGestureHandler.js.map
|