react-native-gesture-handler 2.26.0 → 2.27.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +69 -0
- package/android/src/main/jni/CMakeLists.txt +7 -26
- package/lib/commonjs/components/Pressable/Pressable.js +139 -188
- package/lib/commonjs/components/Pressable/Pressable.js.map +1 -1
- package/lib/commonjs/components/Pressable/StateMachine.js +38 -0
- package/lib/commonjs/components/Pressable/StateMachine.js.map +1 -0
- package/lib/commonjs/components/Pressable/stateDefinitions.js +88 -0
- package/lib/commonjs/components/Pressable/stateDefinitions.js.map +1 -0
- package/lib/commonjs/components/Pressable/utils.js +1 -1
- package/lib/commonjs/components/Pressable/utils.js.map +1 -1
- package/lib/commonjs/handlers/gestures/forceTouchGesture.js +12 -0
- package/lib/commonjs/handlers/gestures/forceTouchGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/gestureObjects.js +3 -1
- package/lib/commonjs/handlers/gestures/gestureObjects.js.map +1 -1
- package/lib/commonjs/web/detectors/RotationGestureDetector.js +3 -0
- package/lib/commonjs/web/detectors/RotationGestureDetector.js.map +1 -1
- package/lib/commonjs/web/handlers/FlingGestureHandler.js +3 -0
- package/lib/commonjs/web/handlers/FlingGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/GestureHandler.js +6 -6
- package/lib/commonjs/web/handlers/GestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/PanGestureHandler.js +24 -33
- package/lib/commonjs/web/handlers/PanGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/TapGestureHandler.js +15 -17
- package/lib/commonjs/web/handlers/TapGestureHandler.js.map +1 -1
- package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js +1 -1
- package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js.map +1 -1
- package/lib/commonjs/web/tools/PointerEventManager.js +1 -1
- package/lib/commonjs/web/tools/PointerEventManager.js.map +1 -1
- package/lib/commonjs/web/tools/PointerTracker.js +12 -11
- package/lib/commonjs/web/tools/PointerTracker.js.map +1 -1
- package/lib/commonjs/web/tools/Vector.js +1 -1
- package/lib/commonjs/web/tools/Vector.js.map +1 -1
- package/lib/module/components/Pressable/Pressable.js +141 -190
- package/lib/module/components/Pressable/Pressable.js.map +1 -1
- package/lib/module/components/Pressable/StateMachine.js +34 -0
- package/lib/module/components/Pressable/StateMachine.js.map +1 -0
- package/lib/module/components/Pressable/stateDefinitions.js +83 -0
- package/lib/module/components/Pressable/stateDefinitions.js.map +1 -0
- package/lib/module/components/Pressable/utils.js +1 -1
- package/lib/module/components/Pressable/utils.js.map +1 -1
- package/lib/module/handlers/gestures/forceTouchGesture.js +13 -0
- package/lib/module/handlers/gestures/forceTouchGesture.js.map +1 -1
- package/lib/module/handlers/gestures/gestureObjects.js +3 -1
- package/lib/module/handlers/gestures/gestureObjects.js.map +1 -1
- package/lib/module/web/detectors/RotationGestureDetector.js +3 -0
- package/lib/module/web/detectors/RotationGestureDetector.js.map +1 -1
- package/lib/module/web/handlers/FlingGestureHandler.js +3 -0
- package/lib/module/web/handlers/FlingGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/GestureHandler.js +6 -6
- package/lib/module/web/handlers/GestureHandler.js.map +1 -1
- package/lib/module/web/handlers/PanGestureHandler.js +24 -33
- package/lib/module/web/handlers/PanGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/TapGestureHandler.js +15 -17
- package/lib/module/web/handlers/TapGestureHandler.js.map +1 -1
- package/lib/module/web/tools/GestureHandlerOrchestrator.js +1 -1
- package/lib/module/web/tools/GestureHandlerOrchestrator.js.map +1 -1
- package/lib/module/web/tools/PointerEventManager.js +1 -1
- package/lib/module/web/tools/PointerEventManager.js.map +1 -1
- package/lib/module/web/tools/PointerTracker.js +12 -11
- package/lib/module/web/tools/PointerTracker.js.map +1 -1
- package/lib/module/web/tools/Vector.js +1 -1
- package/lib/module/web/tools/Vector.js.map +1 -1
- package/lib/typescript/ActionType.d.ts +0 -1
- package/lib/typescript/ActionType.js +6 -0
- package/lib/typescript/Directions.d.ts +0 -1
- package/lib/typescript/Directions.js +18 -0
- package/lib/typescript/EnableNewWebImplementation.d.ts +0 -1
- package/lib/typescript/EnableNewWebImplementation.js +30 -0
- package/lib/typescript/GestureHandlerRootViewContext.d.ts +0 -1
- package/lib/typescript/GestureHandlerRootViewContext.js +2 -0
- package/lib/typescript/PlatformConstants.d.ts +0 -1
- package/lib/typescript/PlatformConstants.js +3 -0
- package/lib/typescript/PlatformConstants.web.d.ts +0 -1
- package/lib/typescript/PlatformConstants.web.js +5 -0
- package/lib/typescript/PointerType.d.ts +0 -1
- package/lib/typescript/PointerType.js +8 -0
- package/lib/typescript/RNGestureHandlerModule.d.ts +0 -1
- package/lib/typescript/RNGestureHandlerModule.js +4 -0
- package/lib/typescript/RNGestureHandlerModule.web.d.ts +0 -1
- package/lib/typescript/RNGestureHandlerModule.web.js +92 -0
- package/lib/typescript/RNGestureHandlerModule.windows.d.ts +0 -1
- package/lib/typescript/RNGestureHandlerModule.windows.js +47 -0
- package/lib/typescript/RNRenderer.d.ts +0 -1
- package/lib/typescript/RNRenderer.js +3 -0
- package/lib/typescript/RNRenderer.web.d.ts +0 -1
- package/lib/typescript/RNRenderer.web.js +3 -0
- package/lib/typescript/State.d.ts +0 -1
- package/lib/typescript/State.js +9 -0
- package/lib/typescript/TouchEventType.d.ts +0 -1
- package/lib/typescript/TouchEventType.js +7 -0
- package/lib/typescript/components/DrawerLayout.d.ts +0 -1
- package/lib/typescript/components/DrawerLayout.js +417 -0
- package/lib/typescript/components/GestureButtons.d.ts +0 -1
- package/lib/typescript/components/GestureButtons.js +165 -0
- package/lib/typescript/components/GestureButtonsProps.d.ts +0 -1
- package/lib/typescript/components/GestureButtonsProps.js +1 -0
- package/lib/typescript/components/GestureComponents.d.ts +0 -1
- package/lib/typescript/components/GestureComponents.js +67 -0
- package/lib/typescript/components/GestureComponents.web.d.ts +0 -1
- package/lib/typescript/components/GestureComponents.web.js +21 -0
- package/lib/typescript/components/GestureHandlerButton.d.ts +0 -1
- package/lib/typescript/components/GestureHandlerButton.js +2 -0
- package/lib/typescript/components/GestureHandlerButton.web.d.ts +0 -1
- package/lib/typescript/components/GestureHandlerButton.web.js +3 -0
- package/lib/typescript/components/GestureHandlerRootView.android.d.ts +0 -1
- package/lib/typescript/components/GestureHandlerRootView.android.js +17 -0
- package/lib/typescript/components/GestureHandlerRootView.d.ts +0 -1
- package/lib/typescript/components/GestureHandlerRootView.js +16 -0
- package/lib/typescript/components/GestureHandlerRootView.web.d.ts +0 -1
- package/lib/typescript/components/GestureHandlerRootView.web.js +11 -0
- package/lib/typescript/components/Pressable/Pressable.d.ts +1 -3
- package/lib/typescript/components/Pressable/Pressable.d.ts.map +1 -1
- package/lib/typescript/components/Pressable/Pressable.js +231 -0
- package/lib/typescript/components/Pressable/PressableProps.d.ts +15 -2
- package/lib/typescript/components/Pressable/PressableProps.d.ts.map +1 -1
- package/lib/typescript/components/Pressable/PressableProps.js +1 -0
- package/lib/typescript/components/Pressable/StateMachine.d.ts +14 -0
- package/lib/typescript/components/Pressable/StateMachine.d.ts.map +1 -0
- package/lib/typescript/components/Pressable/StateMachine.js +34 -0
- package/lib/typescript/components/Pressable/index.d.ts +0 -1
- package/lib/typescript/components/Pressable/index.js +1 -0
- package/lib/typescript/components/Pressable/stateDefinitions.d.ts +9 -0
- package/lib/typescript/components/Pressable/stateDefinitions.d.ts.map +1 -0
- package/lib/typescript/components/Pressable/stateDefinitions.js +104 -0
- package/lib/typescript/components/Pressable/utils.d.ts +3 -7
- package/lib/typescript/components/Pressable/utils.d.ts.map +1 -1
- package/lib/typescript/components/Pressable/utils.js +80 -0
- package/lib/typescript/components/ReanimatedDrawerLayout.d.ts +0 -1
- package/lib/typescript/components/ReanimatedDrawerLayout.js +364 -0
- package/lib/typescript/components/ReanimatedSwipeable.d.ts +0 -1
- package/lib/typescript/components/ReanimatedSwipeable.js +400 -0
- package/lib/typescript/components/Swipeable.d.ts +0 -1
- package/lib/typescript/components/Swipeable.js +287 -0
- package/lib/typescript/components/Text.d.ts +0 -1
- package/lib/typescript/components/Text.js +38 -0
- package/lib/typescript/components/gestureHandlerRootHOC.d.ts +0 -1
- package/lib/typescript/components/gestureHandlerRootHOC.js +18 -0
- package/lib/typescript/components/touchables/ExtraButtonProps.d.ts +0 -1
- package/lib/typescript/components/touchables/ExtraButtonProps.js +1 -0
- package/lib/typescript/components/touchables/GenericTouchable.d.ts +0 -1
- package/lib/typescript/components/touchables/GenericTouchable.js +221 -0
- package/lib/typescript/components/touchables/GenericTouchableProps.d.ts +0 -1
- package/lib/typescript/components/touchables/GenericTouchableProps.js +1 -0
- package/lib/typescript/components/touchables/TouchableHighlight.d.ts +0 -1
- package/lib/typescript/components/touchables/TouchableHighlight.js +75 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedback.android.d.ts +0 -1
- package/lib/typescript/components/touchables/TouchableNativeFeedback.android.js +65 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedback.d.ts +0 -1
- package/lib/typescript/components/touchables/TouchableNativeFeedback.js +6 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedbackProps.d.ts +0 -1
- package/lib/typescript/components/touchables/TouchableNativeFeedbackProps.js +1 -0
- package/lib/typescript/components/touchables/TouchableOpacity.d.ts +0 -1
- package/lib/typescript/components/touchables/TouchableOpacity.js +51 -0
- package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts +0 -1
- package/lib/typescript/components/touchables/TouchableWithoutFeedback.js +10 -0
- package/lib/typescript/components/touchables/index.d.ts +0 -1
- package/lib/typescript/components/touchables/index.js +4 -0
- package/lib/typescript/components/utils.d.ts +0 -1
- package/lib/typescript/components/utils.js +11 -0
- package/lib/typescript/findNodeHandle.d.ts +0 -1
- package/lib/typescript/findNodeHandle.js +2 -0
- package/lib/typescript/findNodeHandle.web.d.ts +0 -1
- package/lib/typescript/findNodeHandle.web.js +31 -0
- package/lib/typescript/getShadowNodeFromRef.d.ts +0 -1
- package/lib/typescript/getShadowNodeFromRef.js +45 -0
- package/lib/typescript/getShadowNodeFromRef.web.d.ts +0 -1
- package/lib/typescript/getShadowNodeFromRef.web.js +7 -0
- package/lib/typescript/ghQueueMicrotask.d.ts +0 -1
- package/lib/typescript/ghQueueMicrotask.js +7 -0
- package/lib/typescript/handlers/FlingGestureHandler.d.ts +0 -1
- package/lib/typescript/handlers/FlingGestureHandler.js +19 -0
- package/lib/typescript/handlers/ForceTouchGestureHandler.d.ts +0 -1
- package/lib/typescript/handlers/ForceTouchGestureHandler.js +37 -0
- package/lib/typescript/handlers/GestureHandlerEventPayload.d.ts +3 -1
- package/lib/typescript/handlers/GestureHandlerEventPayload.d.ts.map +1 -1
- package/lib/typescript/handlers/GestureHandlerEventPayload.js +1 -0
- package/lib/typescript/handlers/LongPressGestureHandler.d.ts +0 -1
- package/lib/typescript/handlers/LongPressGestureHandler.js +22 -0
- package/lib/typescript/handlers/NativeViewGestureHandler.d.ts +0 -1
- package/lib/typescript/handlers/NativeViewGestureHandler.js +20 -0
- package/lib/typescript/handlers/PanGestureHandler.d.ts +0 -1
- package/lib/typescript/handlers/PanGestureHandler.js +128 -0
- package/lib/typescript/handlers/PinchGestureHandler.d.ts +0 -1
- package/lib/typescript/handlers/PinchGestureHandler.js +12 -0
- package/lib/typescript/handlers/PressabilityDebugView.d.ts +0 -1
- package/lib/typescript/handlers/PressabilityDebugView.js +2 -0
- package/lib/typescript/handlers/PressabilityDebugView.web.d.ts +0 -1
- package/lib/typescript/handlers/PressabilityDebugView.web.js +4 -0
- package/lib/typescript/handlers/RotationGestureHandler.d.ts +0 -1
- package/lib/typescript/handlers/RotationGestureHandler.js +12 -0
- package/lib/typescript/handlers/TapGestureHandler.d.ts +0 -1
- package/lib/typescript/handlers/TapGestureHandler.js +26 -0
- package/lib/typescript/handlers/createHandler.d.ts +0 -1
- package/lib/typescript/handlers/createHandler.js +375 -0
- package/lib/typescript/handlers/createNativeWrapper.d.ts +0 -1
- package/lib/typescript/handlers/createNativeWrapper.js +67 -0
- package/lib/typescript/handlers/customDirectEventTypes.d.ts +0 -1
- package/lib/typescript/handlers/customDirectEventTypes.js +2 -0
- package/lib/typescript/handlers/customDirectEventTypes.web.d.ts +0 -1
- package/lib/typescript/handlers/customDirectEventTypes.web.js +4 -0
- package/lib/typescript/handlers/gestureHandlerCommon.d.ts +0 -1
- package/lib/typescript/handlers/gestureHandlerCommon.js +42 -0
- package/lib/typescript/handlers/gestureHandlerTypesCompat.d.ts +9 -1
- package/lib/typescript/handlers/gestureHandlerTypesCompat.d.ts.map +1 -1
- package/lib/typescript/handlers/gestureHandlerTypesCompat.js +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/Wrap.d.ts +0 -1
- package/lib/typescript/handlers/gestures/GestureDetector/Wrap.js +22 -0
- package/lib/typescript/handlers/gestures/GestureDetector/Wrap.web.d.ts +0 -1
- package/lib/typescript/handlers/gestures/GestureDetector/Wrap.web.js +24 -0
- package/lib/typescript/handlers/gestures/GestureDetector/attachHandlers.d.ts +0 -1
- package/lib/typescript/handlers/gestures/GestureDetector/attachHandlers.js +55 -0
- package/lib/typescript/handlers/gestures/GestureDetector/dropHandlers.d.ts +0 -1
- package/lib/typescript/handlers/gestures/GestureDetector/dropHandlers.js +12 -0
- package/lib/typescript/handlers/gestures/GestureDetector/index.d.ts +0 -1
- package/lib/typescript/handlers/gestures/GestureDetector/index.js +114 -0
- package/lib/typescript/handlers/gestures/GestureDetector/needsToReattach.d.ts +0 -1
- package/lib/typescript/handlers/gestures/GestureDetector/needsToReattach.js +18 -0
- package/lib/typescript/handlers/gestures/GestureDetector/types.d.ts +0 -1
- package/lib/typescript/handlers/gestures/GestureDetector/types.js +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/updateHandlers.d.ts +0 -1
- package/lib/typescript/handlers/gestures/GestureDetector/updateHandlers.js +54 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useAnimatedGesture.d.ts +0 -1
- package/lib/typescript/handlers/gestures/GestureDetector/useAnimatedGesture.js +137 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useDetectorUpdater.d.ts +0 -1
- package/lib/typescript/handlers/gestures/GestureDetector/useDetectorUpdater.js +48 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useMountReactions.d.ts +0 -1
- package/lib/typescript/handlers/gestures/GestureDetector/useMountReactions.js +35 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useViewRefHandler.d.ts +0 -1
- package/lib/typescript/handlers/gestures/GestureDetector/useViewRefHandler.js +32 -0
- package/lib/typescript/handlers/gestures/GestureDetector/utils.d.ts +0 -1
- package/lib/typescript/handlers/gestures/GestureDetector/utils.js +140 -0
- package/lib/typescript/handlers/gestures/eventReceiver.d.ts +0 -1
- package/lib/typescript/handlers/gestures/eventReceiver.js +105 -0
- package/lib/typescript/handlers/gestures/flingGesture.d.ts +0 -1
- package/lib/typescript/handlers/gestures/flingGesture.js +27 -0
- package/lib/typescript/handlers/gestures/forceTouchGesture.d.ts +9 -1
- package/lib/typescript/handlers/gestures/forceTouchGesture.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/forceTouchGesture.js +57 -0
- package/lib/typescript/handlers/gestures/gesture.d.ts +0 -1
- package/lib/typescript/handlers/gestures/gesture.js +303 -0
- package/lib/typescript/handlers/gestures/gestureComposition.d.ts +0 -1
- package/lib/typescript/handlers/gestures/gestureComposition.js +78 -0
- package/lib/typescript/handlers/gestures/gestureObjects.d.ts +3 -2
- package/lib/typescript/handlers/gestures/gestureObjects.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/gestureObjects.js +125 -0
- package/lib/typescript/handlers/gestures/gestureStateManager.d.ts +0 -1
- package/lib/typescript/handlers/gestures/gestureStateManager.js +60 -0
- package/lib/typescript/handlers/gestures/gestureStateManager.web.d.ts +0 -1
- package/lib/typescript/handlers/gestures/gestureStateManager.web.js +19 -0
- package/lib/typescript/handlers/gestures/hoverGesture.d.ts +0 -1
- package/lib/typescript/handlers/gestures/hoverGesture.js +45 -0
- package/lib/typescript/handlers/gestures/longPressGesture.d.ts +0 -1
- package/lib/typescript/handlers/gestures/longPressGesture.js +35 -0
- package/lib/typescript/handlers/gestures/manualGesture.d.ts +0 -1
- package/lib/typescript/handlers/gestures/manualGesture.js +16 -0
- package/lib/typescript/handlers/gestures/nativeGesture.d.ts +0 -1
- package/lib/typescript/handlers/gestures/nativeGesture.js +24 -0
- package/lib/typescript/handlers/gestures/panGesture.d.ts +0 -1
- package/lib/typescript/handlers/gestures/panGesture.js +181 -0
- package/lib/typescript/handlers/gestures/pinchGesture.d.ts +0 -1
- package/lib/typescript/handlers/gestures/pinchGesture.js +27 -0
- package/lib/typescript/handlers/gestures/reanimatedWrapper.d.ts +0 -1
- package/lib/typescript/handlers/gestures/reanimatedWrapper.js +23 -0
- package/lib/typescript/handlers/gestures/rotationGesture.d.ts +0 -1
- package/lib/typescript/handlers/gestures/rotationGesture.js +27 -0
- package/lib/typescript/handlers/gestures/tapGesture.d.ts +0 -1
- package/lib/typescript/handlers/gestures/tapGesture.js +72 -0
- package/lib/typescript/handlers/getNextHandlerTag.d.ts +0 -1
- package/lib/typescript/handlers/getNextHandlerTag.js +4 -0
- package/lib/typescript/handlers/handlersRegistry.d.ts +0 -1
- package/lib/typescript/handlers/handlersRegistry.js +36 -0
- package/lib/typescript/handlers/utils.d.ts +0 -1
- package/lib/typescript/handlers/utils.js +58 -0
- package/lib/typescript/index.d.ts +0 -1
- package/lib/typescript/index.js +28 -0
- package/lib/typescript/init.d.ts +0 -1
- package/lib/typescript/init.js +15 -0
- package/lib/typescript/jestUtils/index.d.ts +0 -1
- package/lib/typescript/jestUtils/index.js +1 -0
- package/lib/typescript/jestUtils/jestUtils.d.ts +0 -1
- package/lib/typescript/jestUtils/jestUtils.js +290 -0
- package/lib/typescript/mocks.d.ts +0 -1
- package/lib/typescript/mocks.js +59 -0
- package/lib/typescript/mountRegistry.d.ts +0 -1
- package/lib/typescript/mountRegistry.js +29 -0
- package/lib/typescript/specs/NativeRNGestureHandlerModule.d.ts +0 -1
- package/lib/typescript/specs/NativeRNGestureHandlerModule.js +2 -0
- package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.d.ts +0 -1
- package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.js +2 -0
- package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts +0 -1
- package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.js +2 -0
- package/lib/typescript/typeUtils.d.ts +0 -1
- package/lib/typescript/typeUtils.js +1 -0
- package/lib/typescript/utils.d.ts +0 -1
- package/lib/typescript/utils.js +80 -0
- package/lib/typescript/web/Gestures.d.ts +0 -1
- package/lib/typescript/web/Gestures.js +38 -0
- package/lib/typescript/web/constants.d.ts +0 -1
- package/lib/typescript/web/constants.js +2 -0
- package/lib/typescript/web/detectors/RotationGestureDetector.d.ts +0 -1
- package/lib/typescript/web/detectors/RotationGestureDetector.d.ts.map +1 -1
- package/lib/typescript/web/detectors/RotationGestureDetector.js +122 -0
- package/lib/typescript/web/detectors/ScaleGestureDetector.d.ts +0 -1
- package/lib/typescript/web/detectors/ScaleGestureDetector.js +117 -0
- package/lib/typescript/web/handlers/FlingGestureHandler.d.ts +0 -1
- package/lib/typescript/web/handlers/FlingGestureHandler.d.ts.map +1 -1
- package/lib/typescript/web/handlers/FlingGestureHandler.js +133 -0
- package/lib/typescript/web/handlers/GestureHandler.d.ts +0 -1
- package/lib/typescript/web/handlers/GestureHandler.d.ts.map +1 -1
- package/lib/typescript/web/handlers/GestureHandler.js +656 -0
- package/lib/typescript/web/handlers/HoverGestureHandler.d.ts +0 -1
- package/lib/typescript/web/handlers/HoverGestureHandler.js +37 -0
- package/lib/typescript/web/handlers/IGestureHandler.d.ts +0 -1
- package/lib/typescript/web/handlers/IGestureHandler.js +1 -0
- package/lib/typescript/web/handlers/LongPressGestureHandler.d.ts +0 -1
- package/lib/typescript/web/handlers/LongPressGestureHandler.js +136 -0
- package/lib/typescript/web/handlers/ManualGestureHandler.d.ts +0 -1
- package/lib/typescript/web/handlers/ManualGestureHandler.js +29 -0
- package/lib/typescript/web/handlers/NativeViewGestureHandler.d.ts +0 -1
- package/lib/typescript/web/handlers/NativeViewGestureHandler.js +133 -0
- package/lib/typescript/web/handlers/PanGestureHandler.d.ts +2 -1
- package/lib/typescript/web/handlers/PanGestureHandler.d.ts.map +1 -1
- package/lib/typescript/web/handlers/PanGestureHandler.js +420 -0
- package/lib/typescript/web/handlers/PinchGestureHandler.d.ts +0 -1
- package/lib/typescript/web/handlers/PinchGestureHandler.js +117 -0
- package/lib/typescript/web/handlers/RotationGestureHandler.d.ts +0 -1
- package/lib/typescript/web/handlers/RotationGestureHandler.js +122 -0
- package/lib/typescript/web/handlers/TapGestureHandler.d.ts +1 -1
- package/lib/typescript/web/handlers/TapGestureHandler.d.ts.map +1 -1
- package/lib/typescript/web/handlers/TapGestureHandler.js +202 -0
- package/lib/typescript/web/interfaces.d.ts +0 -1
- package/lib/typescript/web/interfaces.js +25 -0
- package/lib/typescript/web/tools/CircularBuffer.d.ts +0 -1
- package/lib/typescript/web/tools/CircularBuffer.js +37 -0
- package/lib/typescript/web/tools/EventManager.d.ts +0 -1
- package/lib/typescript/web/tools/EventManager.js +85 -0
- package/lib/typescript/web/tools/GestureHandlerDelegate.d.ts +0 -1
- package/lib/typescript/web/tools/GestureHandlerDelegate.js +1 -0
- package/lib/typescript/web/tools/GestureHandlerOrchestrator.d.ts +0 -1
- package/lib/typescript/web/tools/GestureHandlerOrchestrator.d.ts.map +1 -1
- package/lib/typescript/web/tools/GestureHandlerOrchestrator.js +273 -0
- package/lib/typescript/web/tools/GestureHandlerWebDelegate.d.ts +0 -1
- package/lib/typescript/web/tools/GestureHandlerWebDelegate.js +169 -0
- package/lib/typescript/web/tools/InteractionManager.d.ts +0 -1
- package/lib/typescript/web/tools/InteractionManager.js +91 -0
- package/lib/typescript/web/tools/KeyboardEventManager.d.ts +0 -1
- package/lib/typescript/web/tools/KeyboardEventManager.js +73 -0
- package/lib/typescript/web/tools/LeastSquareSolver.d.ts +0 -1
- package/lib/typescript/web/tools/LeastSquareSolver.js +147 -0
- package/lib/typescript/web/tools/NodeManager.d.ts +0 -1
- package/lib/typescript/web/tools/NodeManager.js +28 -0
- package/lib/typescript/web/tools/PointerEventManager.d.ts +0 -1
- package/lib/typescript/web/tools/PointerEventManager.js +179 -0
- package/lib/typescript/web/tools/PointerTracker.d.ts +3 -4
- package/lib/typescript/web/tools/PointerTracker.d.ts.map +1 -1
- package/lib/typescript/web/tools/PointerTracker.js +161 -0
- package/lib/typescript/web/tools/Vector.d.ts +1 -2
- package/lib/typescript/web/tools/Vector.js +43 -0
- package/lib/typescript/web/tools/VelocityTracker.d.ts +0 -1
- package/lib/typescript/web/tools/VelocityTracker.js +76 -0
- package/lib/typescript/web/tools/WheelEventManager.d.ts +0 -1
- package/lib/typescript/web/tools/WheelEventManager.js +40 -0
- package/lib/typescript/web/utils.d.ts +0 -1
- package/lib/typescript/web/utils.js +233 -0
- package/lib/typescript/web_hammer/DiscreteGestureHandler.d.ts +0 -1
- package/lib/typescript/web_hammer/DiscreteGestureHandler.js +48 -0
- package/lib/typescript/web_hammer/DraggingGestureHandler.d.ts +0 -1
- package/lib/typescript/web_hammer/DraggingGestureHandler.js +25 -0
- package/lib/typescript/web_hammer/Errors.d.ts +0 -1
- package/lib/typescript/web_hammer/Errors.js +5 -0
- package/lib/typescript/web_hammer/FlingGestureHandler.d.ts +0 -1
- package/lib/typescript/web_hammer/FlingGestureHandler.js +119 -0
- package/lib/typescript/web_hammer/GestureHandler.d.ts +0 -1
- package/lib/typescript/web_hammer/GestureHandler.js +469 -0
- package/lib/typescript/web_hammer/IndiscreteGestureHandler.d.ts +0 -1
- package/lib/typescript/web_hammer/IndiscreteGestureHandler.js +26 -0
- package/lib/typescript/web_hammer/LongPressGestureHandler.d.ts +0 -1
- package/lib/typescript/web_hammer/LongPressGestureHandler.js +46 -0
- package/lib/typescript/web_hammer/NativeViewGestureHandler.d.ts +0 -1
- package/lib/typescript/web_hammer/NativeViewGestureHandler.js +40 -0
- package/lib/typescript/web_hammer/NodeManager.d.ts +0 -1
- package/lib/typescript/web_hammer/NodeManager.js +28 -0
- package/lib/typescript/web_hammer/PanGestureHandler.d.ts +0 -1
- package/lib/typescript/web_hammer/PanGestureHandler.js +151 -0
- package/lib/typescript/web_hammer/PinchGestureHandler.d.ts +0 -1
- package/lib/typescript/web_hammer/PinchGestureHandler.js +19 -0
- package/lib/typescript/web_hammer/PressGestureHandler.d.ts +0 -1
- package/lib/typescript/web_hammer/PressGestureHandler.js +133 -0
- package/lib/typescript/web_hammer/RotationGestureHandler.d.ts +0 -1
- package/lib/typescript/web_hammer/RotationGestureHandler.js +20 -0
- package/lib/typescript/web_hammer/TapGestureHandler.d.ts +0 -1
- package/lib/typescript/web_hammer/TapGestureHandler.js +142 -0
- package/lib/typescript/web_hammer/constants.d.ts +0 -1
- package/lib/typescript/web_hammer/constants.js +42 -0
- package/lib/typescript/web_hammer/utils.d.ts +0 -1
- package/lib/typescript/web_hammer/utils.js +15 -0
- package/package.json +4 -2
- package/src/components/Pressable/Pressable.tsx +357 -445
- package/src/components/Pressable/PressableProps.tsx +15 -0
- package/src/components/Pressable/StateMachine.tsx +49 -0
- package/src/components/Pressable/stateDefinitions.ts +125 -0
- package/src/components/Pressable/utils.ts +11 -7
- package/src/handlers/GestureHandlerEventPayload.ts +3 -0
- package/src/handlers/gestureHandlerTypesCompat.ts +9 -0
- package/src/handlers/gestures/forceTouchGesture.ts +9 -0
- package/src/handlers/gestures/gestureObjects.ts +3 -1
- package/src/web/detectors/RotationGestureDetector.ts +4 -0
- package/src/web/handlers/FlingGestureHandler.ts +4 -0
- package/src/web/handlers/GestureHandler.ts +9 -3
- package/src/web/handlers/PanGestureHandler.ts +25 -36
- package/src/web/handlers/TapGestureHandler.ts +14 -19
- package/src/web/tools/GestureHandlerOrchestrator.ts +1 -0
- package/src/web/tools/PointerEventManager.ts +1 -1
- package/src/web/tools/PointerTracker.ts +17 -15
- package/src/web/tools/Vector.ts +1 -1
@@ -0,0 +1,45 @@
|
|
1
|
+
// Used by GestureDetector (unsupported on web at the moment) to check whether the
|
2
|
+
// attached view may get flattened on Fabric. This implementation causes errors
|
3
|
+
// on web due to the static resolution of `require` statements by webpack breaking
|
4
|
+
// the conditional importing. Solved by making .web file.
|
5
|
+
let findHostInstance_DEPRECATED;
|
6
|
+
let getInternalInstanceHandleFromPublicInstance;
|
7
|
+
export function getShadowNodeFromRef(ref) {
|
8
|
+
// Load findHostInstance_DEPRECATED lazily because it may not be available before render
|
9
|
+
if (findHostInstance_DEPRECATED === undefined) {
|
10
|
+
try {
|
11
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
12
|
+
const ReactFabric = require('react-native/Libraries/Renderer/shims/ReactFabric');
|
13
|
+
// Since RN 0.77 ReactFabric exports findHostInstance_DEPRECATED in default object so we're trying to
|
14
|
+
// access it first, then fallback on named export
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
16
|
+
findHostInstance_DEPRECATED =
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
18
|
+
ReactFabric?.default?.findHostInstance_DEPRECATED ||
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
20
|
+
ReactFabric?.findHostInstance_DEPRECATED;
|
21
|
+
}
|
22
|
+
catch (e) {
|
23
|
+
findHostInstance_DEPRECATED = (_ref) => null;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
// Load findHostInstance_DEPRECATED lazily because it may not be available before render
|
27
|
+
if (getInternalInstanceHandleFromPublicInstance === undefined) {
|
28
|
+
try {
|
29
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
30
|
+
getInternalInstanceHandleFromPublicInstance =
|
31
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
32
|
+
require('react-native/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance')
|
33
|
+
.getInternalInstanceHandleFromPublicInstance ??
|
34
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-return
|
35
|
+
((ref) => ref._internalInstanceHandle);
|
36
|
+
}
|
37
|
+
catch (e) {
|
38
|
+
getInternalInstanceHandleFromPublicInstance = (ref) =>
|
39
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-return
|
40
|
+
ref._internalInstanceHandle;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
// @ts-ignore Fabric
|
44
|
+
return getInternalInstanceHandleFromPublicInstance(findHostInstance_DEPRECATED(ref)).stateNode.node;
|
45
|
+
}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
// Used by GestureDetector (unsupported on web at the moment) to check whether the
|
2
|
+
// attached view may get flattened on Fabric. Original implementation causes errors
|
3
|
+
// on web due to the static resolution of `require` statements by webpack breaking
|
4
|
+
// the conditional importing.
|
5
|
+
export function getShadowNodeFromRef(_ref) {
|
6
|
+
return null;
|
7
|
+
}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
// We check for typeof requestAnimationFrame because of SSR
|
2
|
+
// Functions are bound to null to avoid issues with scope when using Metro inline requires.
|
3
|
+
export const ghQueueMicrotask = typeof setImmediate === 'function'
|
4
|
+
? setImmediate.bind(null)
|
5
|
+
: typeof requestAnimationFrame === 'function'
|
6
|
+
? requestAnimationFrame.bind(null)
|
7
|
+
: queueMicrotask.bind(null);
|
@@ -36,4 +36,3 @@ export type FlingGestureHandler = typeof FlingGestureHandler;
|
|
36
36
|
* @deprecated FlingGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Fling()` instead.
|
37
37
|
*/
|
38
38
|
export declare const FlingGestureHandler: import("react").ComponentType<FlingGestureHandlerProps & import("react").RefAttributes<any>>;
|
39
|
-
//# sourceMappingURL=FlingGestureHandler.d.ts.map
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import createHandler from './createHandler';
|
2
|
+
import { baseGestureHandlerProps, } from './gestureHandlerCommon';
|
3
|
+
export const flingGestureHandlerProps = [
|
4
|
+
'numberOfPointers',
|
5
|
+
'direction',
|
6
|
+
];
|
7
|
+
export const flingHandlerName = 'FlingGestureHandler';
|
8
|
+
/**
|
9
|
+
* @deprecated FlingGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Fling()` instead.
|
10
|
+
*/
|
11
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file
|
12
|
+
export const FlingGestureHandler = createHandler({
|
13
|
+
name: flingHandlerName,
|
14
|
+
allowedProps: [
|
15
|
+
...baseGestureHandlerProps,
|
16
|
+
...flingGestureHandlerProps,
|
17
|
+
],
|
18
|
+
config: {},
|
19
|
+
});
|
@@ -42,4 +42,3 @@ export declare const forceTouchHandlerName = "ForceTouchGestureHandler";
|
|
42
42
|
*/
|
43
43
|
export declare const ForceTouchGestureHandler: typeof ForceTouchFallback | React.ComponentType<ForceTouchGestureHandlerProps & React.RefAttributes<any>>;
|
44
44
|
export {};
|
45
|
-
//# sourceMappingURL=ForceTouchGestureHandler.d.ts.map
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { tagMessage } from '../utils';
|
3
|
+
import PlatformConstants from '../PlatformConstants';
|
4
|
+
import createHandler from './createHandler';
|
5
|
+
import { baseGestureHandlerProps, } from './gestureHandlerCommon';
|
6
|
+
export const forceTouchGestureHandlerProps = [
|
7
|
+
'minForce',
|
8
|
+
'maxForce',
|
9
|
+
'feedbackOnActivation',
|
10
|
+
];
|
11
|
+
// implicit `children` prop has been removed in @types/react^18.0.0
|
12
|
+
class ForceTouchFallback extends React.Component {
|
13
|
+
static forceTouchAvailable = false;
|
14
|
+
componentDidMount() {
|
15
|
+
console.warn(tagMessage('ForceTouchGestureHandler is not available on this platform. Please use ForceTouchGestureHandler.forceTouchAvailable to conditionally render other components that would provide a fallback behavior specific to your usecase'));
|
16
|
+
}
|
17
|
+
render() {
|
18
|
+
return this.props.children;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
export const forceTouchHandlerName = 'ForceTouchGestureHandler';
|
22
|
+
/**
|
23
|
+
* @deprecated ForceTouchGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.ForceTouch()` instead.
|
24
|
+
*/
|
25
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file
|
26
|
+
export const ForceTouchGestureHandler = PlatformConstants?.forceTouchAvailable
|
27
|
+
? createHandler({
|
28
|
+
name: forceTouchHandlerName,
|
29
|
+
allowedProps: [
|
30
|
+
...baseGestureHandlerProps,
|
31
|
+
...forceTouchGestureHandlerProps,
|
32
|
+
],
|
33
|
+
config: {},
|
34
|
+
})
|
35
|
+
: ForceTouchFallback;
|
36
|
+
ForceTouchGestureHandler.forceTouchAvailable =
|
37
|
+
PlatformConstants?.forceTouchAvailable || false;
|
@@ -5,6 +5,9 @@ export type FlingGestureHandlerEventPayload = {
|
|
5
5
|
absoluteX: number;
|
6
6
|
absoluteY: number;
|
7
7
|
};
|
8
|
+
/**
|
9
|
+
* @deprecated ForceTouch gesture is deprecated and will be removed in the future.
|
10
|
+
*/
|
8
11
|
export type ForceTouchGestureHandlerEventPayload = {
|
9
12
|
x: number;
|
10
13
|
y: number;
|
@@ -192,4 +195,3 @@ export type HoverGestureHandlerEventPayload = {
|
|
192
195
|
*/
|
193
196
|
stylusData?: StylusData;
|
194
197
|
};
|
195
|
-
//# sourceMappingURL=GestureHandlerEventPayload.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"GestureHandlerEventPayload.d.ts","sourceRoot":"","sources":["../../../src/handlers/GestureHandlerEventPayload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,MAAM,MAAM,+BAA+B,GAAG;IAC5C,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,oCAAoC,GAAG;IACjD,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,mCAAmC,GAAG;IAChD;;;;OAIG;IACH,CAAC,EAAE,MAAM,CAAC;IAEV;;;;OAIG;IACH,CAAC,EAAE,MAAM,CAAC;IAEV;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C;;OAEG;IACH,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C;;;;OAIG;IACH,CAAC,EAAE,MAAM,CAAC;IAEV;;;;OAIG;IACH,CAAC,EAAE,MAAM,CAAC;IAEV;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,kCAAkC,GAAG;IAC/C;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C;;;OAGG;IACH,CAAC,EAAE,MAAM,CAAC;IAEV;;;OAGG;IACH,CAAC,EAAE,MAAM,CAAC;IAEV;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,CAAC"}
|
1
|
+
{"version":3,"file":"GestureHandlerEventPayload.d.ts","sourceRoot":"","sources":["../../../src/handlers/GestureHandlerEventPayload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,MAAM,MAAM,+BAA+B,GAAG;IAC5C,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG;IACjD,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,mCAAmC,GAAG;IAChD;;;;OAIG;IACH,CAAC,EAAE,MAAM,CAAC;IAEV;;;;OAIG;IACH,CAAC,EAAE,MAAM,CAAC;IAEV;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C;;OAEG;IACH,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C;;;;OAIG;IACH,CAAC,EAAE,MAAM,CAAC;IAEV;;;;OAIG;IACH,CAAC,EAAE,MAAM,CAAC;IAEV;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,kCAAkC,GAAG;IAC/C;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C;;;OAGG;IACH,CAAC,EAAE,MAAM,CAAC;IAEV;;;OAGG;IACH,CAAC,EAAE,MAAM,CAAC;IAEV;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -33,4 +33,3 @@ export type LongPressGestureHandler = typeof LongPressGestureHandler;
|
|
33
33
|
* @deprecated LongPressGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.LongPress()` instead.
|
34
34
|
*/
|
35
35
|
export declare const LongPressGestureHandler: import("react").ComponentType<LongPressGestureHandlerProps & import("react").RefAttributes<any>>;
|
36
|
-
//# sourceMappingURL=LongPressGestureHandler.d.ts.map
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import createHandler from './createHandler';
|
2
|
+
import { baseGestureHandlerProps, } from './gestureHandlerCommon';
|
3
|
+
export const longPressGestureHandlerProps = [
|
4
|
+
'minDurationMs',
|
5
|
+
'maxDist',
|
6
|
+
'numberOfPointers',
|
7
|
+
];
|
8
|
+
export const longPressHandlerName = 'LongPressGestureHandler';
|
9
|
+
/**
|
10
|
+
* @deprecated LongPressGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.LongPress()` instead.
|
11
|
+
*/
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file
|
13
|
+
export const LongPressGestureHandler = createHandler({
|
14
|
+
name: longPressHandlerName,
|
15
|
+
allowedProps: [
|
16
|
+
...baseGestureHandlerProps,
|
17
|
+
...longPressGestureHandlerProps,
|
18
|
+
],
|
19
|
+
config: {
|
20
|
+
shouldCancelWhenOutside: true,
|
21
|
+
},
|
22
|
+
});
|
@@ -30,4 +30,3 @@ export type NativeViewGestureHandler = typeof NativeViewGestureHandler;
|
|
30
30
|
* @deprecated NativeViewGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Native()` instead.
|
31
31
|
*/
|
32
32
|
export declare const NativeViewGestureHandler: import("react").ComponentType<NativeViewGestureHandlerProps & import("react").RefAttributes<any>>;
|
33
|
-
//# sourceMappingURL=NativeViewGestureHandler.d.ts.map
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import createHandler from './createHandler';
|
2
|
+
import { baseGestureHandlerProps, } from './gestureHandlerCommon';
|
3
|
+
export const nativeViewGestureHandlerProps = [
|
4
|
+
'shouldActivateOnStart',
|
5
|
+
'disallowInterruption',
|
6
|
+
];
|
7
|
+
export const nativeViewProps = [
|
8
|
+
...baseGestureHandlerProps,
|
9
|
+
...nativeViewGestureHandlerProps,
|
10
|
+
];
|
11
|
+
export const nativeViewHandlerName = 'NativeViewGestureHandler';
|
12
|
+
/**
|
13
|
+
* @deprecated NativeViewGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Native()` instead.
|
14
|
+
*/
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file
|
16
|
+
export const NativeViewGestureHandler = createHandler({
|
17
|
+
name: nativeViewHandlerName,
|
18
|
+
allowedProps: nativeViewProps,
|
19
|
+
config: {},
|
20
|
+
});
|
@@ -97,4 +97,3 @@ export type PanGestureHandler = typeof PanGestureHandler;
|
|
97
97
|
export declare const PanGestureHandler: import("react").ComponentType<PanGestureHandlerProps & import("react").RefAttributes<any>>;
|
98
98
|
export declare function managePanProps(props: PanGestureHandlerProps): PanGestureHandlerProps & Partial<Record<"failOffsetXStart" | "failOffsetYStart" | "failOffsetXEnd" | "failOffsetYEnd" | "activeOffsetXStart" | "activeOffsetXEnd" | "activeOffsetYStart" | "activeOffsetYEnd", number>>;
|
99
99
|
export {};
|
100
|
-
//# sourceMappingURL=PanGestureHandler.d.ts.map
|
@@ -0,0 +1,128 @@
|
|
1
|
+
import createHandler from './createHandler';
|
2
|
+
import { baseGestureHandlerProps, } from './gestureHandlerCommon';
|
3
|
+
export const panGestureHandlerProps = [
|
4
|
+
'activeOffsetY',
|
5
|
+
'activeOffsetX',
|
6
|
+
'failOffsetY',
|
7
|
+
'failOffsetX',
|
8
|
+
'minDist',
|
9
|
+
'minVelocity',
|
10
|
+
'minVelocityX',
|
11
|
+
'minVelocityY',
|
12
|
+
'minPointers',
|
13
|
+
'maxPointers',
|
14
|
+
'avgTouches',
|
15
|
+
'enableTrackpadTwoFingerGesture',
|
16
|
+
'activateAfterLongPress',
|
17
|
+
];
|
18
|
+
export const panGestureHandlerCustomNativeProps = [
|
19
|
+
'activeOffsetYStart',
|
20
|
+
'activeOffsetYEnd',
|
21
|
+
'activeOffsetXStart',
|
22
|
+
'activeOffsetXEnd',
|
23
|
+
'failOffsetYStart',
|
24
|
+
'failOffsetYEnd',
|
25
|
+
'failOffsetXStart',
|
26
|
+
'failOffsetXEnd',
|
27
|
+
];
|
28
|
+
export const panHandlerName = 'PanGestureHandler';
|
29
|
+
/**
|
30
|
+
* @deprecated PanGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Pan()` instead.
|
31
|
+
*/
|
32
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file
|
33
|
+
export const PanGestureHandler = createHandler({
|
34
|
+
name: panHandlerName,
|
35
|
+
allowedProps: [
|
36
|
+
...baseGestureHandlerProps,
|
37
|
+
...panGestureHandlerProps,
|
38
|
+
],
|
39
|
+
config: {},
|
40
|
+
transformProps: managePanProps,
|
41
|
+
customNativeProps: panGestureHandlerCustomNativeProps,
|
42
|
+
});
|
43
|
+
function validatePanGestureHandlerProps(props) {
|
44
|
+
if (Array.isArray(props.activeOffsetX) &&
|
45
|
+
(props.activeOffsetX[0] > 0 || props.activeOffsetX[1] < 0)) {
|
46
|
+
throw new Error(`First element of activeOffsetX should be negative, a the second one should be positive`);
|
47
|
+
}
|
48
|
+
if (Array.isArray(props.activeOffsetY) &&
|
49
|
+
(props.activeOffsetY[0] > 0 || props.activeOffsetY[1] < 0)) {
|
50
|
+
throw new Error(`First element of activeOffsetY should be negative, a the second one should be positive`);
|
51
|
+
}
|
52
|
+
if (Array.isArray(props.failOffsetX) &&
|
53
|
+
(props.failOffsetX[0] > 0 || props.failOffsetX[1] < 0)) {
|
54
|
+
throw new Error(`First element of failOffsetX should be negative, a the second one should be positive`);
|
55
|
+
}
|
56
|
+
if (Array.isArray(props.failOffsetY) &&
|
57
|
+
(props.failOffsetY[0] > 0 || props.failOffsetY[1] < 0)) {
|
58
|
+
throw new Error(`First element of failOffsetY should be negative, a the second one should be positive`);
|
59
|
+
}
|
60
|
+
if (props.minDist && (props.failOffsetX || props.failOffsetY)) {
|
61
|
+
throw new Error(`It is not supported to use minDist with failOffsetX or failOffsetY, use activeOffsetX and activeOffsetY instead`);
|
62
|
+
}
|
63
|
+
if (props.minDist && (props.activeOffsetX || props.activeOffsetY)) {
|
64
|
+
throw new Error(`It is not supported to use minDist with activeOffsetX or activeOffsetY`);
|
65
|
+
}
|
66
|
+
}
|
67
|
+
function transformPanGestureHandlerProps(props) {
|
68
|
+
const res = { ...props };
|
69
|
+
if (props.activeOffsetX !== undefined) {
|
70
|
+
delete res.activeOffsetX;
|
71
|
+
if (Array.isArray(props.activeOffsetX)) {
|
72
|
+
res.activeOffsetXStart = props.activeOffsetX[0];
|
73
|
+
res.activeOffsetXEnd = props.activeOffsetX[1];
|
74
|
+
}
|
75
|
+
else if (props.activeOffsetX < 0) {
|
76
|
+
res.activeOffsetXStart = props.activeOffsetX;
|
77
|
+
}
|
78
|
+
else {
|
79
|
+
res.activeOffsetXEnd = props.activeOffsetX;
|
80
|
+
}
|
81
|
+
}
|
82
|
+
if (props.activeOffsetY !== undefined) {
|
83
|
+
delete res.activeOffsetY;
|
84
|
+
if (Array.isArray(props.activeOffsetY)) {
|
85
|
+
res.activeOffsetYStart = props.activeOffsetY[0];
|
86
|
+
res.activeOffsetYEnd = props.activeOffsetY[1];
|
87
|
+
}
|
88
|
+
else if (props.activeOffsetY < 0) {
|
89
|
+
res.activeOffsetYStart = props.activeOffsetY;
|
90
|
+
}
|
91
|
+
else {
|
92
|
+
res.activeOffsetYEnd = props.activeOffsetY;
|
93
|
+
}
|
94
|
+
}
|
95
|
+
if (props.failOffsetX !== undefined) {
|
96
|
+
delete res.failOffsetX;
|
97
|
+
if (Array.isArray(props.failOffsetX)) {
|
98
|
+
res.failOffsetXStart = props.failOffsetX[0];
|
99
|
+
res.failOffsetXEnd = props.failOffsetX[1];
|
100
|
+
}
|
101
|
+
else if (props.failOffsetX < 0) {
|
102
|
+
res.failOffsetXStart = props.failOffsetX;
|
103
|
+
}
|
104
|
+
else {
|
105
|
+
res.failOffsetXEnd = props.failOffsetX;
|
106
|
+
}
|
107
|
+
}
|
108
|
+
if (props.failOffsetY !== undefined) {
|
109
|
+
delete res.failOffsetY;
|
110
|
+
if (Array.isArray(props.failOffsetY)) {
|
111
|
+
res.failOffsetYStart = props.failOffsetY[0];
|
112
|
+
res.failOffsetYEnd = props.failOffsetY[1];
|
113
|
+
}
|
114
|
+
else if (props.failOffsetY < 0) {
|
115
|
+
res.failOffsetYStart = props.failOffsetY;
|
116
|
+
}
|
117
|
+
else {
|
118
|
+
res.failOffsetYEnd = props.failOffsetY;
|
119
|
+
}
|
120
|
+
}
|
121
|
+
return res;
|
122
|
+
}
|
123
|
+
export function managePanProps(props) {
|
124
|
+
if (__DEV__) {
|
125
|
+
validatePanGestureHandlerProps(props);
|
126
|
+
}
|
127
|
+
return transformPanGestureHandlerProps(props);
|
128
|
+
}
|
@@ -14,4 +14,3 @@ export type PinchGestureHandler = typeof PinchGestureHandler;
|
|
14
14
|
* @deprecated PinchGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Pinch()` instead.
|
15
15
|
*/
|
16
16
|
export declare const PinchGestureHandler: import("react").ComponentType<PinchGestureHandlerProps & import("react").RefAttributes<any>>;
|
17
|
-
//# sourceMappingURL=PinchGestureHandler.d.ts.map
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import createHandler from './createHandler';
|
2
|
+
import { baseGestureHandlerProps, } from './gestureHandlerCommon';
|
3
|
+
export const pinchHandlerName = 'PinchGestureHandler';
|
4
|
+
/**
|
5
|
+
* @deprecated PinchGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Pinch()` instead.
|
6
|
+
*/
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file
|
8
|
+
export const PinchGestureHandler = createHandler({
|
9
|
+
name: pinchHandlerName,
|
10
|
+
allowedProps: baseGestureHandlerProps,
|
11
|
+
config: {},
|
12
|
+
});
|
@@ -14,4 +14,3 @@ export type RotationGestureHandler = typeof RotationGestureHandler;
|
|
14
14
|
* @deprecated RotationGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Rotation()` instead.
|
15
15
|
*/
|
16
16
|
export declare const RotationGestureHandler: import("react").ComponentType<RotationGestureHandlerProps & import("react").RefAttributes<any>>;
|
17
|
-
//# sourceMappingURL=RotationGestureHandler.d.ts.map
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import createHandler from './createHandler';
|
2
|
+
import { baseGestureHandlerProps, } from './gestureHandlerCommon';
|
3
|
+
export const rotationHandlerName = 'RotationGestureHandler';
|
4
|
+
/**
|
5
|
+
* @deprecated RotationGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Rotation()` instead.
|
6
|
+
*/
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file
|
8
|
+
export const RotationGestureHandler = createHandler({
|
9
|
+
name: rotationHandlerName,
|
10
|
+
allowedProps: baseGestureHandlerProps,
|
11
|
+
config: {},
|
12
|
+
});
|
@@ -59,4 +59,3 @@ export type TapGestureHandler = typeof TapGestureHandler;
|
|
59
59
|
* @deprecated TapGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Tap()` instead.
|
60
60
|
*/
|
61
61
|
export declare const TapGestureHandler: import("react").ComponentType<TapGestureHandlerProps & import("react").RefAttributes<any>>;
|
62
|
-
//# sourceMappingURL=TapGestureHandler.d.ts.map
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import createHandler from './createHandler';
|
2
|
+
import { baseGestureHandlerProps, } from './gestureHandlerCommon';
|
3
|
+
export const tapGestureHandlerProps = [
|
4
|
+
'maxDurationMs',
|
5
|
+
'maxDelayMs',
|
6
|
+
'numberOfTaps',
|
7
|
+
'maxDeltaX',
|
8
|
+
'maxDeltaY',
|
9
|
+
'maxDist',
|
10
|
+
'minPointers',
|
11
|
+
];
|
12
|
+
export const tapHandlerName = 'TapGestureHandler';
|
13
|
+
/**
|
14
|
+
* @deprecated TapGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Tap()` instead.
|
15
|
+
*/
|
16
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file
|
17
|
+
export const TapGestureHandler = createHandler({
|
18
|
+
name: tapHandlerName,
|
19
|
+
allowedProps: [
|
20
|
+
...baseGestureHandlerProps,
|
21
|
+
...tapGestureHandlerProps,
|
22
|
+
],
|
23
|
+
config: {
|
24
|
+
shouldCancelWhenOutside: true,
|
25
|
+
},
|
26
|
+
});
|
@@ -9,4 +9,3 @@ type CreateHandlerArgs<HandlerPropsT extends Record<string, unknown>> = Readonly
|
|
9
9
|
}>;
|
10
10
|
export default function createHandler<T extends BaseGestureHandlerProps<U>, U extends Record<string, unknown>>({ name, allowedProps, config, transformProps, customNativeProps, }: CreateHandlerArgs<T>): React.ComponentType<T & React.RefAttributes<any>>;
|
11
11
|
export {};
|
12
|
-
//# sourceMappingURL=createHandler.d.ts.map
|