react-native-gesture-handler 2.27.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/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 +275 -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 +38 -0
- package/lib/commonjs/components/Pressable/StateMachine.js.map +1 -0
- package/lib/commonjs/components/Pressable/index.js +14 -0
- package/lib/commonjs/components/Pressable/index.js.map +1 -0
- package/lib/commonjs/components/Pressable/stateDefinitions.js +88 -0
- package/lib/commonjs/components/Pressable/stateDefinitions.js.map +1 -0
- package/lib/commonjs/components/Pressable/utils.js +92 -0
- package/lib/commonjs/components/Pressable/utils.js.map +1 -0
- package/lib/commonjs/components/ReanimatedDrawerLayout.js +357 -0
- package/lib/commonjs/components/ReanimatedDrawerLayout.js.map +1 -0
- package/lib/commonjs/components/ReanimatedSwipeable.js +346 -0
- package/lib/commonjs/components/ReanimatedSwipeable.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.js +73 -0
- package/lib/commonjs/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 +686 -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 +269 -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 +34 -0
- package/lib/module/components/Pressable/StateMachine.js.map +1 -0
- package/lib/module/components/Pressable/index.js +4 -0
- package/lib/module/components/Pressable/index.js.map +1 -0
- package/lib/module/components/Pressable/stateDefinitions.js +83 -0
- package/lib/module/components/Pressable/stateDefinitions.js.map +1 -0
- package/lib/module/components/Pressable/utils.js +84 -0
- package/lib/module/components/Pressable/utils.js.map +1 -0
- package/lib/module/components/ReanimatedDrawerLayout.js +352 -0
- package/lib/module/components/ReanimatedDrawerLayout.js.map +1 -0
- package/lib/module/components/ReanimatedSwipeable.js +341 -0
- package/lib/module/components/ReanimatedSwipeable.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.js +68 -0
- package/lib/module/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 +679 -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 +7 -0
- package/lib/typescript/ActionType.d.ts.map +1 -0
- package/lib/typescript/ActionType.js +6 -0
- package/lib/typescript/Directions.d.ts +14 -0
- package/lib/typescript/Directions.d.ts.map +1 -0
- package/lib/typescript/Directions.js +18 -0
- package/lib/typescript/EnableNewWebImplementation.d.ts +9 -0
- package/lib/typescript/EnableNewWebImplementation.d.ts.map +1 -0
- package/lib/typescript/EnableNewWebImplementation.js +30 -0
- package/lib/typescript/GestureHandlerRootViewContext.d.ts +3 -0
- package/lib/typescript/GestureHandlerRootViewContext.d.ts.map +1 -0
- package/lib/typescript/GestureHandlerRootViewContext.js +2 -0
- package/lib/typescript/PlatformConstants.d.ts +5 -0
- package/lib/typescript/PlatformConstants.d.ts.map +1 -0
- package/lib/typescript/PlatformConstants.js +3 -0
- package/lib/typescript/PlatformConstants.web.d.ts +4 -0
- package/lib/typescript/PlatformConstants.web.d.ts.map +1 -0
- package/lib/typescript/PlatformConstants.web.js +5 -0
- package/lib/typescript/PointerType.d.ts +7 -0
- package/lib/typescript/PointerType.d.ts.map +1 -0
- package/lib/typescript/PointerType.js +8 -0
- package/lib/typescript/RNGestureHandlerModule.d.ts +2 -0
- package/lib/typescript/RNGestureHandlerModule.d.ts.map +1 -0
- package/lib/typescript/RNGestureHandlerModule.js +4 -0
- package/lib/typescript/RNGestureHandlerModule.web.d.ts +15 -0
- package/lib/typescript/RNGestureHandlerModule.web.d.ts.map +1 -0
- package/lib/typescript/RNGestureHandlerModule.web.js +92 -0
- package/lib/typescript/RNGestureHandlerModule.windows.d.ts +32 -0
- package/lib/typescript/RNGestureHandlerModule.windows.d.ts.map +1 -0
- package/lib/typescript/RNGestureHandlerModule.windows.js +47 -0
- package/lib/typescript/RNRenderer.d.ts +1 -0
- package/lib/typescript/RNRenderer.d.ts.map +1 -0
- package/lib/typescript/RNRenderer.js +3 -0
- package/lib/typescript/RNRenderer.web.d.ts +3 -0
- package/lib/typescript/RNRenderer.web.d.ts.map +1 -0
- package/lib/typescript/RNRenderer.web.js +3 -0
- package/lib/typescript/State.d.ts +9 -0
- package/lib/typescript/State.d.ts.map +1 -0
- package/lib/typescript/State.js +9 -0
- package/lib/typescript/TouchEventType.d.ts +8 -0
- package/lib/typescript/TouchEventType.d.ts.map +1 -0
- package/lib/typescript/TouchEventType.js +7 -0
- package/lib/typescript/components/DrawerLayout.d.ts +185 -0
- package/lib/typescript/components/DrawerLayout.d.ts.map +1 -0
- package/lib/typescript/components/DrawerLayout.js +417 -0
- package/lib/typescript/components/GestureButtons.d.ts +7 -0
- package/lib/typescript/components/GestureButtons.d.ts.map +1 -0
- package/lib/typescript/components/GestureButtons.js +165 -0
- package/lib/typescript/components/GestureButtonsProps.d.ts +115 -0
- package/lib/typescript/components/GestureButtonsProps.d.ts.map +1 -0
- package/lib/typescript/components/GestureButtonsProps.js +1 -0
- package/lib/typescript/components/GestureComponents.d.ts +22 -0
- package/lib/typescript/components/GestureComponents.d.ts.map +1 -0
- package/lib/typescript/components/GestureComponents.js +67 -0
- package/lib/typescript/components/GestureComponents.web.d.ts +8 -0
- package/lib/typescript/components/GestureComponents.web.d.ts.map +1 -0
- package/lib/typescript/components/GestureComponents.web.js +21 -0
- package/lib/typescript/components/GestureHandlerButton.d.ts +4 -0
- package/lib/typescript/components/GestureHandlerButton.d.ts.map +1 -0
- package/lib/typescript/components/GestureHandlerButton.js +2 -0
- package/lib/typescript/components/GestureHandlerButton.web.d.ts +4 -0
- package/lib/typescript/components/GestureHandlerButton.web.d.ts.map +1 -0
- package/lib/typescript/components/GestureHandlerButton.web.js +3 -0
- package/lib/typescript/components/GestureHandlerRootView.android.d.ts +6 -0
- package/lib/typescript/components/GestureHandlerRootView.android.d.ts.map +1 -0
- package/lib/typescript/components/GestureHandlerRootView.android.js +17 -0
- package/lib/typescript/components/GestureHandlerRootView.d.ts +6 -0
- package/lib/typescript/components/GestureHandlerRootView.d.ts.map +1 -0
- package/lib/typescript/components/GestureHandlerRootView.js +16 -0
- package/lib/typescript/components/GestureHandlerRootView.web.d.ts +6 -0
- package/lib/typescript/components/GestureHandlerRootView.web.d.ts.map +1 -0
- package/lib/typescript/components/GestureHandlerRootView.web.js +11 -0
- package/lib/typescript/components/Pressable/Pressable.d.ts +4 -0
- package/lib/typescript/components/Pressable/Pressable.d.ts.map +1 -0
- package/lib/typescript/components/Pressable/Pressable.js +231 -0
- package/lib/typescript/components/Pressable/PressableProps.d.ts +138 -0
- package/lib/typescript/components/Pressable/PressableProps.d.ts.map +1 -0
- 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 +2 -0
- package/lib/typescript/components/Pressable/index.d.ts.map +1 -0
- 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 +10 -0
- package/lib/typescript/components/Pressable/utils.d.ts.map +1 -0
- package/lib/typescript/components/Pressable/utils.js +80 -0
- package/lib/typescript/components/ReanimatedDrawerLayout.d.ts +167 -0
- package/lib/typescript/components/ReanimatedDrawerLayout.d.ts.map +1 -0
- package/lib/typescript/components/ReanimatedDrawerLayout.js +364 -0
- package/lib/typescript/components/ReanimatedSwipeable.d.ts +147 -0
- package/lib/typescript/components/ReanimatedSwipeable.d.ts.map +1 -0
- package/lib/typescript/components/ReanimatedSwipeable.js +400 -0
- package/lib/typescript/components/Swipeable.d.ts +183 -0
- package/lib/typescript/components/Swipeable.d.ts.map +1 -0
- package/lib/typescript/components/Swipeable.js +287 -0
- package/lib/typescript/components/Text.d.ts +4 -0
- package/lib/typescript/components/Text.d.ts.map +1 -0
- package/lib/typescript/components/Text.js +38 -0
- package/lib/typescript/components/gestureHandlerRootHOC.d.ts +3 -0
- package/lib/typescript/components/gestureHandlerRootHOC.d.ts.map +1 -0
- package/lib/typescript/components/gestureHandlerRootHOC.js +18 -0
- package/lib/typescript/components/touchables/ExtraButtonProps.d.ts +7 -0
- package/lib/typescript/components/touchables/ExtraButtonProps.d.ts.map +1 -0
- package/lib/typescript/components/touchables/ExtraButtonProps.js +1 -0
- package/lib/typescript/components/touchables/GenericTouchable.d.ts +55 -0
- package/lib/typescript/components/touchables/GenericTouchable.d.ts.map +1 -0
- package/lib/typescript/components/touchables/GenericTouchable.js +221 -0
- package/lib/typescript/components/touchables/GenericTouchableProps.d.ts +16 -0
- package/lib/typescript/components/touchables/GenericTouchableProps.d.ts.map +1 -0
- package/lib/typescript/components/touchables/GenericTouchableProps.js +1 -0
- package/lib/typescript/components/touchables/TouchableHighlight.d.ts +41 -0
- package/lib/typescript/components/touchables/TouchableHighlight.d.ts.map +1 -0
- package/lib/typescript/components/touchables/TouchableHighlight.js +75 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedback.android.d.ts +40 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedback.android.d.ts.map +1 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedback.android.js +65 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedback.d.ts +6 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedback.d.ts.map +1 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedback.js +6 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedbackProps.d.ts +8 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedbackProps.d.ts.map +1 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedbackProps.js +1 -0
- package/lib/typescript/components/touchables/TouchableOpacity.d.ts +30 -0
- package/lib/typescript/components/touchables/TouchableOpacity.d.ts.map +1 -0
- package/lib/typescript/components/touchables/TouchableOpacity.js +51 -0
- package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts +14 -0
- package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts.map +1 -0
- package/lib/typescript/components/touchables/TouchableWithoutFeedback.js +10 -0
- package/lib/typescript/components/touchables/index.d.ts +7 -0
- package/lib/typescript/components/touchables/index.d.ts.map +1 -0
- package/lib/typescript/components/touchables/index.js +4 -0
- package/lib/typescript/components/utils.d.ts +4 -0
- package/lib/typescript/components/utils.d.ts.map +1 -0
- package/lib/typescript/components/utils.js +11 -0
- package/lib/typescript/findNodeHandle.d.ts +2 -0
- package/lib/typescript/findNodeHandle.d.ts.map +1 -0
- package/lib/typescript/findNodeHandle.js +2 -0
- package/lib/typescript/findNodeHandle.web.d.ts +2 -0
- package/lib/typescript/findNodeHandle.web.d.ts.map +1 -0
- package/lib/typescript/findNodeHandle.web.js +31 -0
- package/lib/typescript/getShadowNodeFromRef.d.ts +1 -0
- package/lib/typescript/getShadowNodeFromRef.d.ts.map +1 -0
- package/lib/typescript/getShadowNodeFromRef.js +45 -0
- package/lib/typescript/getShadowNodeFromRef.web.d.ts +1 -0
- package/lib/typescript/getShadowNodeFromRef.web.d.ts.map +1 -0
- package/lib/typescript/getShadowNodeFromRef.web.js +7 -0
- package/lib/typescript/ghQueueMicrotask.d.ts +1 -0
- package/lib/typescript/ghQueueMicrotask.d.ts.map +1 -0
- package/lib/typescript/ghQueueMicrotask.js +7 -0
- package/lib/typescript/handlers/FlingGestureHandler.d.ts +38 -0
- package/lib/typescript/handlers/FlingGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/FlingGestureHandler.js +19 -0
- package/lib/typescript/handlers/ForceTouchGestureHandler.d.ts +44 -0
- package/lib/typescript/handlers/ForceTouchGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/ForceTouchGestureHandler.js +37 -0
- package/lib/typescript/handlers/GestureHandlerEventPayload.d.ts +197 -0
- package/lib/typescript/handlers/GestureHandlerEventPayload.d.ts.map +1 -0
- package/lib/typescript/handlers/GestureHandlerEventPayload.js +1 -0
- package/lib/typescript/handlers/LongPressGestureHandler.d.ts +35 -0
- package/lib/typescript/handlers/LongPressGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/LongPressGestureHandler.js +22 -0
- package/lib/typescript/handlers/NativeViewGestureHandler.d.ts +32 -0
- package/lib/typescript/handlers/NativeViewGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/NativeViewGestureHandler.js +20 -0
- package/lib/typescript/handlers/PanGestureHandler.d.ts +99 -0
- package/lib/typescript/handlers/PanGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/PanGestureHandler.js +128 -0
- package/lib/typescript/handlers/PinchGestureHandler.d.ts +16 -0
- package/lib/typescript/handlers/PinchGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/PinchGestureHandler.js +12 -0
- package/lib/typescript/handlers/PressabilityDebugView.d.ts +1 -0
- package/lib/typescript/handlers/PressabilityDebugView.d.ts.map +1 -0
- package/lib/typescript/handlers/PressabilityDebugView.js +2 -0
- package/lib/typescript/handlers/PressabilityDebugView.web.d.ts +1 -0
- package/lib/typescript/handlers/PressabilityDebugView.web.d.ts.map +1 -0
- package/lib/typescript/handlers/PressabilityDebugView.web.js +4 -0
- package/lib/typescript/handlers/RotationGestureHandler.d.ts +16 -0
- package/lib/typescript/handlers/RotationGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/RotationGestureHandler.js +12 -0
- package/lib/typescript/handlers/TapGestureHandler.d.ts +61 -0
- package/lib/typescript/handlers/TapGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/TapGestureHandler.js +26 -0
- package/lib/typescript/handlers/createHandler.d.ts +11 -0
- package/lib/typescript/handlers/createHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/createHandler.js +375 -0
- package/lib/typescript/handlers/createNativeWrapper.d.ts +3 -0
- package/lib/typescript/handlers/createNativeWrapper.d.ts.map +1 -0
- package/lib/typescript/handlers/createNativeWrapper.js +67 -0
- package/lib/typescript/handlers/customDirectEventTypes.d.ts +1 -0
- package/lib/typescript/handlers/customDirectEventTypes.d.ts.map +1 -0
- package/lib/typescript/handlers/customDirectEventTypes.js +2 -0
- package/lib/typescript/handlers/customDirectEventTypes.web.d.ts +2 -0
- package/lib/typescript/handlers/customDirectEventTypes.web.d.ts.map +1 -0
- package/lib/typescript/handlers/customDirectEventTypes.web.js +4 -0
- package/lib/typescript/handlers/gestureHandlerCommon.d.ts +78 -0
- package/lib/typescript/handlers/gestureHandlerCommon.d.ts.map +1 -0
- package/lib/typescript/handlers/gestureHandlerCommon.js +42 -0
- package/lib/typescript/handlers/gestureHandlerTypesCompat.d.ts +52 -0
- package/lib/typescript/handlers/gestureHandlerTypesCompat.d.ts.map +1 -0
- package/lib/typescript/handlers/gestureHandlerTypesCompat.js +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/Wrap.d.ts +13 -0
- package/lib/typescript/handlers/gestures/GestureDetector/Wrap.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/Wrap.js +22 -0
- package/lib/typescript/handlers/gestures/GestureDetector/Wrap.web.d.ts +7 -0
- package/lib/typescript/handlers/gestures/GestureDetector/Wrap.web.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/Wrap.web.js +24 -0
- package/lib/typescript/handlers/gestures/GestureDetector/attachHandlers.d.ts +13 -0
- package/lib/typescript/handlers/gestures/GestureDetector/attachHandlers.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/attachHandlers.js +55 -0
- package/lib/typescript/handlers/gestures/GestureDetector/dropHandlers.d.ts +2 -0
- package/lib/typescript/handlers/gestures/GestureDetector/dropHandlers.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/dropHandlers.js +12 -0
- package/lib/typescript/handlers/gestures/GestureDetector/index.d.ts +49 -0
- package/lib/typescript/handlers/gestures/GestureDetector/index.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/index.js +114 -0
- package/lib/typescript/handlers/gestures/GestureDetector/needsToReattach.d.ts +3 -0
- package/lib/typescript/handlers/gestures/GestureDetector/needsToReattach.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/needsToReattach.js +18 -0
- package/lib/typescript/handlers/gestures/GestureDetector/types.d.ts +20 -0
- package/lib/typescript/handlers/gestures/GestureDetector/types.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/types.js +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/updateHandlers.d.ts +4 -0
- package/lib/typescript/handlers/gestures/GestureDetector/updateHandlers.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/updateHandlers.js +54 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useAnimatedGesture.d.ts +2 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useAnimatedGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useAnimatedGesture.js +137 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useDetectorUpdater.d.ts +5 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useDetectorUpdater.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useDetectorUpdater.js +48 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useMountReactions.d.ts +2 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useMountReactions.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useMountReactions.js +35 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useViewRefHandler.d.ts +3 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useViewRefHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useViewRefHandler.js +32 -0
- package/lib/typescript/handlers/gestures/GestureDetector/utils.d.ts +12 -0
- package/lib/typescript/handlers/gestures/GestureDetector/utils.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/utils.js +140 -0
- package/lib/typescript/handlers/gestures/eventReceiver.d.ts +4 -0
- package/lib/typescript/handlers/gestures/eventReceiver.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/eventReceiver.js +105 -0
- package/lib/typescript/handlers/gestures/flingGesture.d.ts +21 -0
- package/lib/typescript/handlers/gestures/flingGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/flingGesture.js +27 -0
- package/lib/typescript/handlers/gestures/forceTouchGesture.d.ts +39 -0
- package/lib/typescript/handlers/gestures/forceTouchGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/forceTouchGesture.js +57 -0
- package/lib/typescript/handlers/gestures/gesture.d.ts +217 -0
- package/lib/typescript/handlers/gestures/gesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/gesture.js +303 -0
- package/lib/typescript/handlers/gestures/gestureComposition.d.ts +21 -0
- package/lib/typescript/handlers/gestures/gestureComposition.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/gestureComposition.js +78 -0
- package/lib/typescript/handlers/gestures/gestureObjects.d.ts +100 -0
- package/lib/typescript/handlers/gestures/gestureObjects.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/gestureObjects.js +125 -0
- package/lib/typescript/handlers/gestures/gestureStateManager.d.ts +11 -0
- package/lib/typescript/handlers/gestures/gestureStateManager.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/gestureStateManager.js +60 -0
- package/lib/typescript/handlers/gestures/gestureStateManager.web.d.ts +4 -0
- package/lib/typescript/handlers/gestures/gestureStateManager.web.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/gestureStateManager.web.js +19 -0
- package/lib/typescript/handlers/gestures/hoverGesture.d.ts +27 -0
- package/lib/typescript/handlers/gestures/hoverGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/hoverGesture.js +45 -0
- package/lib/typescript/handlers/gestures/longPressGesture.d.ts +25 -0
- package/lib/typescript/handlers/gestures/longPressGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/longPressGesture.js +35 -0
- package/lib/typescript/handlers/gestures/manualGesture.d.ts +7 -0
- package/lib/typescript/handlers/gestures/manualGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/manualGesture.js +16 -0
- package/lib/typescript/handlers/gestures/nativeGesture.d.ts +18 -0
- package/lib/typescript/handlers/gestures/nativeGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/nativeGesture.js +24 -0
- package/lib/typescript/handlers/gestures/panGesture.d.ts +90 -0
- package/lib/typescript/handlers/gestures/panGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/panGesture.js +181 -0
- package/lib/typescript/handlers/gestures/pinchGesture.d.ts +11 -0
- package/lib/typescript/handlers/gestures/pinchGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/pinchGesture.js +27 -0
- package/lib/typescript/handlers/gestures/reanimatedWrapper.d.ts +14 -0
- package/lib/typescript/handlers/gestures/reanimatedWrapper.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/reanimatedWrapper.js +23 -0
- package/lib/typescript/handlers/gestures/rotationGesture.d.ts +12 -0
- package/lib/typescript/handlers/gestures/rotationGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/rotationGesture.js +27 -0
- package/lib/typescript/handlers/gestures/tapGesture.d.ts +50 -0
- package/lib/typescript/handlers/gestures/tapGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/tapGesture.js +72 -0
- package/lib/typescript/handlers/getNextHandlerTag.d.ts +1 -0
- package/lib/typescript/handlers/getNextHandlerTag.d.ts.map +1 -0
- package/lib/typescript/handlers/getNextHandlerTag.js +4 -0
- package/lib/typescript/handlers/handlersRegistry.d.ts +14 -0
- package/lib/typescript/handlers/handlersRegistry.d.ts.map +1 -0
- package/lib/typescript/handlers/handlersRegistry.js +36 -0
- package/lib/typescript/handlers/utils.d.ts +7 -0
- package/lib/typescript/handlers/utils.d.ts.map +1 -0
- package/lib/typescript/handlers/utils.js +58 -0
- package/lib/typescript/index.d.ts +58 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/index.js +28 -0
- package/lib/typescript/init.d.ts +2 -0
- package/lib/typescript/init.d.ts.map +1 -0
- package/lib/typescript/init.js +15 -0
- package/lib/typescript/jestUtils/index.d.ts +1 -0
- package/lib/typescript/jestUtils/index.d.ts.map +1 -0
- package/lib/typescript/jestUtils/index.js +1 -0
- package/lib/typescript/jestUtils/jestUtils.d.ts +29 -0
- package/lib/typescript/jestUtils/jestUtils.d.ts.map +1 -0
- package/lib/typescript/jestUtils/jestUtils.js +290 -0
- package/lib/typescript/mocks.d.ts +46 -0
- package/lib/typescript/mocks.d.ts.map +1 -0
- package/lib/typescript/mocks.js +59 -0
- package/lib/typescript/mountRegistry.d.ts +16 -0
- package/lib/typescript/mountRegistry.d.ts.map +1 -0
- package/lib/typescript/mountRegistry.js +29 -0
- package/lib/typescript/specs/NativeRNGestureHandlerModule.d.ts +14 -0
- package/lib/typescript/specs/NativeRNGestureHandlerModule.d.ts.map +1 -0
- package/lib/typescript/specs/NativeRNGestureHandlerModule.js +2 -0
- package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.d.ts +16 -0
- package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.d.ts.map +1 -0
- package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.js +2 -0
- package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts +5 -0
- package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.js +2 -0
- package/lib/typescript/typeUtils.d.ts +1 -0
- package/lib/typescript/typeUtils.d.ts.map +1 -0
- package/lib/typescript/typeUtils.js +1 -0
- package/lib/typescript/utils.d.ts +20 -0
- package/lib/typescript/utils.d.ts.map +1 -0
- package/lib/typescript/utils.js +80 -0
- package/lib/typescript/web/Gestures.d.ts +36 -0
- package/lib/typescript/web/Gestures.d.ts.map +1 -0
- package/lib/typescript/web/Gestures.js +38 -0
- package/lib/typescript/web/constants.d.ts +2 -0
- package/lib/typescript/web/constants.d.ts.map +1 -0
- package/lib/typescript/web/constants.js +2 -0
- package/lib/typescript/web/detectors/RotationGestureDetector.d.ts +30 -0
- package/lib/typescript/web/detectors/RotationGestureDetector.d.ts.map +1 -0
- package/lib/typescript/web/detectors/RotationGestureDetector.js +122 -0
- package/lib/typescript/web/detectors/ScaleGestureDetector.d.ts +29 -0
- package/lib/typescript/web/detectors/ScaleGestureDetector.d.ts.map +1 -0
- package/lib/typescript/web/detectors/ScaleGestureDetector.js +117 -0
- package/lib/typescript/web/handlers/FlingGestureHandler.d.ts +26 -0
- package/lib/typescript/web/handlers/FlingGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/FlingGestureHandler.js +133 -0
- package/lib/typescript/web/handlers/GestureHandler.d.ts +102 -0
- package/lib/typescript/web/handlers/GestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/GestureHandler.js +656 -0
- package/lib/typescript/web/handlers/HoverGestureHandler.d.ts +10 -0
- package/lib/typescript/web/handlers/HoverGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/HoverGestureHandler.js +37 -0
- package/lib/typescript/web/handlers/IGestureHandler.d.ts +37 -0
- package/lib/typescript/web/handlers/IGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/IGestureHandler.js +1 -0
- package/lib/typescript/web/handlers/LongPressGestureHandler.d.ts +30 -0
- package/lib/typescript/web/handlers/LongPressGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/LongPressGestureHandler.js +136 -0
- package/lib/typescript/web/handlers/ManualGestureHandler.d.ts +10 -0
- package/lib/typescript/web/handlers/ManualGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/ManualGestureHandler.js +29 -0
- package/lib/typescript/web/handlers/NativeViewGestureHandler.d.ts +25 -0
- package/lib/typescript/web/handlers/NativeViewGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/NativeViewGestureHandler.js +133 -0
- package/lib/typescript/web/handlers/PanGestureHandler.d.ts +63 -0
- package/lib/typescript/web/handlers/PanGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/PanGestureHandler.js +420 -0
- package/lib/typescript/web/handlers/PinchGestureHandler.d.ts +27 -0
- package/lib/typescript/web/handlers/PinchGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/PinchGestureHandler.js +117 -0
- package/lib/typescript/web/handlers/RotationGestureHandler.d.ts +27 -0
- package/lib/typescript/web/handlers/RotationGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/RotationGestureHandler.js +122 -0
- package/lib/typescript/web/handlers/TapGestureHandler.d.ts +39 -0
- package/lib/typescript/web/handlers/TapGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/TapGestureHandler.js +202 -0
- package/lib/typescript/web/interfaces.d.ts +157 -0
- package/lib/typescript/web/interfaces.d.ts.map +1 -0
- package/lib/typescript/web/interfaces.js +25 -0
- package/lib/typescript/web/tools/CircularBuffer.d.ts +11 -0
- package/lib/typescript/web/tools/CircularBuffer.d.ts.map +1 -0
- package/lib/typescript/web/tools/CircularBuffer.js +37 -0
- package/lib/typescript/web/tools/EventManager.d.ts +39 -0
- package/lib/typescript/web/tools/EventManager.d.ts.map +1 -0
- package/lib/typescript/web/tools/EventManager.js +85 -0
- package/lib/typescript/web/tools/GestureHandlerDelegate.d.ts +24 -0
- package/lib/typescript/web/tools/GestureHandlerDelegate.d.ts.map +1 -0
- package/lib/typescript/web/tools/GestureHandlerDelegate.js +1 -0
- package/lib/typescript/web/tools/GestureHandlerOrchestrator.d.ts +31 -0
- package/lib/typescript/web/tools/GestureHandlerOrchestrator.d.ts.map +1 -0
- package/lib/typescript/web/tools/GestureHandlerOrchestrator.js +273 -0
- package/lib/typescript/web/tools/GestureHandlerWebDelegate.d.ts +35 -0
- package/lib/typescript/web/tools/GestureHandlerWebDelegate.d.ts.map +1 -0
- package/lib/typescript/web/tools/GestureHandlerWebDelegate.js +169 -0
- package/lib/typescript/web/tools/InteractionManager.d.ts +17 -0
- package/lib/typescript/web/tools/InteractionManager.d.ts.map +1 -0
- package/lib/typescript/web/tools/InteractionManager.js +91 -0
- package/lib/typescript/web/tools/KeyboardEventManager.d.ts +13 -0
- package/lib/typescript/web/tools/KeyboardEventManager.d.ts.map +1 -0
- package/lib/typescript/web/tools/KeyboardEventManager.js +73 -0
- package/lib/typescript/web/tools/LeastSquareSolver.d.ts +12 -0
- package/lib/typescript/web/tools/LeastSquareSolver.d.ts.map +1 -0
- package/lib/typescript/web/tools/LeastSquareSolver.js +147 -0
- package/lib/typescript/web/tools/NodeManager.d.ts +12 -0
- package/lib/typescript/web/tools/NodeManager.d.ts.map +1 -0
- package/lib/typescript/web/tools/NodeManager.js +28 -0
- package/lib/typescript/web/tools/PointerEventManager.d.ts +19 -0
- package/lib/typescript/web/tools/PointerEventManager.d.ts.map +1 -0
- package/lib/typescript/web/tools/PointerEventManager.js +179 -0
- package/lib/typescript/web/tools/PointerTracker.d.ts +50 -0
- package/lib/typescript/web/tools/PointerTracker.d.ts.map +1 -0
- package/lib/typescript/web/tools/PointerTracker.js +161 -0
- package/lib/typescript/web/tools/Vector.d.ts +15 -0
- package/lib/typescript/web/tools/Vector.d.ts.map +1 -0
- package/lib/typescript/web/tools/Vector.js +43 -0
- package/lib/typescript/web/tools/VelocityTracker.d.ts +13 -0
- package/lib/typescript/web/tools/VelocityTracker.d.ts.map +1 -0
- package/lib/typescript/web/tools/VelocityTracker.js +76 -0
- package/lib/typescript/web/tools/WheelEventManager.d.ts +11 -0
- package/lib/typescript/web/tools/WheelEventManager.d.ts.map +1 -0
- package/lib/typescript/web/tools/WheelEventManager.js +40 -0
- package/lib/typescript/web/utils.d.ts +14 -0
- package/lib/typescript/web/utils.d.ts.map +1 -0
- package/lib/typescript/web/utils.js +233 -0
- package/lib/typescript/web_hammer/DiscreteGestureHandler.d.ts +20 -0
- package/lib/typescript/web_hammer/DiscreteGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/DiscreteGestureHandler.js +48 -0
- package/lib/typescript/web_hammer/DraggingGestureHandler.d.ts +15 -0
- package/lib/typescript/web_hammer/DraggingGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/DraggingGestureHandler.js +25 -0
- package/lib/typescript/web_hammer/Errors.d.ts +3 -0
- package/lib/typescript/web_hammer/Errors.d.ts.map +1 -0
- package/lib/typescript/web_hammer/Errors.js +5 -0
- package/lib/typescript/web_hammer/FlingGestureHandler.d.ts +43 -0
- package/lib/typescript/web_hammer/FlingGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/FlingGestureHandler.js +119 -0
- package/lib/typescript/web_hammer/GestureHandler.d.ts +145 -0
- package/lib/typescript/web_hammer/GestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/GestureHandler.js +469 -0
- package/lib/typescript/web_hammer/IndiscreteGestureHandler.d.ts +40 -0
- package/lib/typescript/web_hammer/IndiscreteGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/IndiscreteGestureHandler.js +26 -0
- package/lib/typescript/web_hammer/LongPressGestureHandler.d.ts +38 -0
- package/lib/typescript/web_hammer/LongPressGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/LongPressGestureHandler.js +46 -0
- package/lib/typescript/web_hammer/NativeViewGestureHandler.d.ts +7 -0
- package/lib/typescript/web_hammer/NativeViewGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/NativeViewGestureHandler.js +40 -0
- package/lib/typescript/web_hammer/NodeManager.d.ts +7 -0
- package/lib/typescript/web_hammer/NodeManager.d.ts.map +1 -0
- package/lib/typescript/web_hammer/NodeManager.js +28 -0
- package/lib/typescript/web_hammer/PanGestureHandler.d.ts +56 -0
- package/lib/typescript/web_hammer/PanGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/PanGestureHandler.js +151 -0
- package/lib/typescript/web_hammer/PinchGestureHandler.d.ts +13 -0
- package/lib/typescript/web_hammer/PinchGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/PinchGestureHandler.js +19 -0
- package/lib/typescript/web_hammer/PressGestureHandler.d.ts +83 -0
- package/lib/typescript/web_hammer/PressGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/PressGestureHandler.js +133 -0
- package/lib/typescript/web_hammer/RotationGestureHandler.d.ts +13 -0
- package/lib/typescript/web_hammer/RotationGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/RotationGestureHandler.js +20 -0
- package/lib/typescript/web_hammer/TapGestureHandler.d.ts +57 -0
- package/lib/typescript/web_hammer/TapGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/TapGestureHandler.js +142 -0
- package/lib/typescript/web_hammer/constants.d.ts +39 -0
- package/lib/typescript/web_hammer/constants.d.ts.map +1 -0
- package/lib/typescript/web_hammer/constants.js +42 -0
- package/lib/typescript/web_hammer/utils.d.ts +9 -0
- package/lib/typescript/web_hammer/utils.d.ts.map +1 -0
- package/lib/typescript/web_hammer/utils.js +15 -0
- package/package.json +1 -1
@@ -0,0 +1,58 @@
|
|
1
|
+
import { Platform, findNodeHandle as findNodeHandleRN } from 'react-native';
|
2
|
+
import { handlerIDToTag } from './handlersRegistry';
|
3
|
+
import { toArray } from '../utils';
|
4
|
+
import RNGestureHandlerModule from '../RNGestureHandlerModule';
|
5
|
+
import { ghQueueMicrotask } from '../ghQueueMicrotask';
|
6
|
+
function isConfigParam(param, name) {
|
7
|
+
// param !== Object(param) returns false if `param` is a function
|
8
|
+
// or an object and returns true if `param` is null
|
9
|
+
return (param !== undefined &&
|
10
|
+
(param !== Object(param) ||
|
11
|
+
!('__isNative' in param)) &&
|
12
|
+
name !== 'onHandlerStateChange' &&
|
13
|
+
name !== 'onGestureEvent');
|
14
|
+
}
|
15
|
+
export function filterConfig(props, validProps, defaults = {}) {
|
16
|
+
const filteredConfig = { ...defaults };
|
17
|
+
for (const key of validProps) {
|
18
|
+
let value = props[key];
|
19
|
+
if (isConfigParam(value, key)) {
|
20
|
+
if (key === 'simultaneousHandlers' || key === 'waitFor') {
|
21
|
+
value = transformIntoHandlerTags(props[key]);
|
22
|
+
}
|
23
|
+
else if (key === 'hitSlop' && typeof value !== 'object') {
|
24
|
+
value = { top: value, left: value, bottom: value, right: value };
|
25
|
+
}
|
26
|
+
filteredConfig[key] = value;
|
27
|
+
}
|
28
|
+
}
|
29
|
+
return filteredConfig;
|
30
|
+
}
|
31
|
+
export function transformIntoHandlerTags(handlerIDs) {
|
32
|
+
handlerIDs = toArray(handlerIDs);
|
33
|
+
if (Platform.OS === 'web') {
|
34
|
+
return handlerIDs
|
35
|
+
.map(({ current }) => current)
|
36
|
+
.filter((handle) => handle);
|
37
|
+
}
|
38
|
+
// converts handler string IDs into their numeric tags
|
39
|
+
return handlerIDs
|
40
|
+
.map((handlerID) => handlerIDToTag[handlerID] || handlerID.current?.handlerTag || -1)
|
41
|
+
.filter((handlerTag) => handlerTag > 0);
|
42
|
+
}
|
43
|
+
export function findNodeHandle(node) {
|
44
|
+
if (Platform.OS === 'web') {
|
45
|
+
return node;
|
46
|
+
}
|
47
|
+
return findNodeHandleRN(node) ?? null;
|
48
|
+
}
|
49
|
+
let flushOperationsScheduled = false;
|
50
|
+
export function scheduleFlushOperations() {
|
51
|
+
if (!flushOperationsScheduled) {
|
52
|
+
flushOperationsScheduled = true;
|
53
|
+
ghQueueMicrotask(() => {
|
54
|
+
RNGestureHandlerModule.flushOperations();
|
55
|
+
flushOperationsScheduled = false;
|
56
|
+
});
|
57
|
+
}
|
58
|
+
}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
export { Directions } from './Directions';
|
2
|
+
export { State } from './State';
|
3
|
+
export { PointerType } from './PointerType';
|
4
|
+
export { default as gestureHandlerRootHOC } from './components/gestureHandlerRootHOC';
|
5
|
+
export { default as GestureHandlerRootView } from './components/GestureHandlerRootView';
|
6
|
+
export type { GestureEvent, HandlerStateChangeEvent, GestureEventPayload, HandlerStateChangeEventPayload, GestureTouchEvent, TouchData, GestureUpdateEvent, GestureStateChangeEvent, } from './handlers/gestureHandlerCommon';
|
7
|
+
export { MouseButton } from './handlers/gestureHandlerCommon';
|
8
|
+
export type { GestureType } from './handlers/gestures/gesture';
|
9
|
+
export type { TapGestureHandlerEventPayload, ForceTouchGestureHandlerEventPayload, LongPressGestureHandlerEventPayload, PanGestureHandlerEventPayload, PinchGestureHandlerEventPayload, RotationGestureHandlerEventPayload, NativeViewGestureHandlerPayload, FlingGestureHandlerEventPayload, } from './handlers/GestureHandlerEventPayload';
|
10
|
+
export type { TapGestureHandlerProps } from './handlers/TapGestureHandler';
|
11
|
+
export type { ForceTouchGestureHandlerProps } from './handlers/ForceTouchGestureHandler';
|
12
|
+
export type { ForceTouchGestureChangeEventPayload } from './handlers/gestures/forceTouchGesture';
|
13
|
+
export type { LongPressGestureHandlerProps } from './handlers/LongPressGestureHandler';
|
14
|
+
export type { PanGestureHandlerProps } from './handlers/PanGestureHandler';
|
15
|
+
export type { PanGestureChangeEventPayload } from './handlers/gestures/panGesture';
|
16
|
+
export type { PinchGestureHandlerProps } from './handlers/PinchGestureHandler';
|
17
|
+
export type { PinchGestureChangeEventPayload } from './handlers/gestures/pinchGesture';
|
18
|
+
export type { RotationGestureHandlerProps } from './handlers/RotationGestureHandler';
|
19
|
+
export type { FlingGestureHandlerProps } from './handlers/FlingGestureHandler';
|
20
|
+
export { TapGestureHandler } from './handlers/TapGestureHandler';
|
21
|
+
export { ForceTouchGestureHandler } from './handlers/ForceTouchGestureHandler';
|
22
|
+
export { LongPressGestureHandler } from './handlers/LongPressGestureHandler';
|
23
|
+
export { PanGestureHandler } from './handlers/PanGestureHandler';
|
24
|
+
export { PinchGestureHandler } from './handlers/PinchGestureHandler';
|
25
|
+
export { RotationGestureHandler } from './handlers/RotationGestureHandler';
|
26
|
+
export { FlingGestureHandler } from './handlers/FlingGestureHandler';
|
27
|
+
export { default as createNativeWrapper } from './handlers/createNativeWrapper';
|
28
|
+
export type { NativeViewGestureHandlerProps } from './handlers/NativeViewGestureHandler';
|
29
|
+
export { GestureDetector } from './handlers/gestures/GestureDetector';
|
30
|
+
export { GestureObjects as Gesture } from './handlers/gestures/gestureObjects';
|
31
|
+
export type { TapGestureType as TapGesture } from './handlers/gestures/tapGesture';
|
32
|
+
export type { PanGestureType as PanGesture } from './handlers/gestures/panGesture';
|
33
|
+
export type { FlingGestureType as FlingGesture } from './handlers/gestures/flingGesture';
|
34
|
+
export type { LongPressGestureType as LongPressGesture } from './handlers/gestures/longPressGesture';
|
35
|
+
export type { PinchGestureType as PinchGesture } from './handlers/gestures/pinchGesture';
|
36
|
+
export type { RotationGestureType as RotationGesture } from './handlers/gestures/rotationGesture';
|
37
|
+
export type { ForceTouchGestureType as ForceTouchGesture } from './handlers/gestures/forceTouchGesture';
|
38
|
+
export type { NativeGestureType as NativeGesture } from './handlers/gestures/nativeGesture';
|
39
|
+
export type { ManualGestureType as ManualGesture } from './handlers/gestures/manualGesture';
|
40
|
+
export type { HoverGestureType as HoverGesture } from './handlers/gestures/hoverGesture';
|
41
|
+
export type { ComposedGestureType as ComposedGesture, RaceGestureType as RaceGesture, SimultaneousGestureType as SimultaneousGesture, ExclusiveGestureType as ExclusiveGesture, } from './handlers/gestures/gestureComposition';
|
42
|
+
export type { GestureStateManagerType as GestureStateManager } from './handlers/gestures/gestureStateManager';
|
43
|
+
export { NativeViewGestureHandler } from './handlers/NativeViewGestureHandler';
|
44
|
+
export type { RawButtonProps, BaseButtonProps, RectButtonProps, BorderlessButtonProps, } from './components/GestureButtonsProps';
|
45
|
+
export { RawButton, BaseButton, RectButton, BorderlessButton, PureNativeButton, } from './components/GestureButtons';
|
46
|
+
export type { TouchableHighlightProps, TouchableOpacityProps, TouchableWithoutFeedbackProps, } from './components/touchables';
|
47
|
+
export { TouchableHighlight, TouchableNativeFeedback, TouchableOpacity, TouchableWithoutFeedback, } from './components/touchables';
|
48
|
+
export { ScrollView, Switch, TextInput, DrawerLayoutAndroid, FlatList, RefreshControl, } from './components/GestureComponents';
|
49
|
+
export { Text } from './components/Text';
|
50
|
+
export { HoverEffect } from './handlers/gestures/hoverGesture';
|
51
|
+
export type { GestureHandlerGestureEvent, GestureHandlerStateChangeEvent, GestureHandlerGestureEventNativeEvent, GestureHandlerStateChangeNativeEvent, NativeViewGestureHandlerGestureEvent, NativeViewGestureHandlerStateChangeEvent, TapGestureHandlerGestureEvent, TapGestureHandlerStateChangeEvent, ForceTouchGestureHandlerGestureEvent, ForceTouchGestureHandlerStateChangeEvent, LongPressGestureHandlerGestureEvent, LongPressGestureHandlerStateChangeEvent, PanGestureHandlerGestureEvent, PanGestureHandlerStateChangeEvent, PinchGestureHandlerGestureEvent, PinchGestureHandlerStateChangeEvent, RotationGestureHandlerGestureEvent, RotationGestureHandlerStateChangeEvent, FlingGestureHandlerGestureEvent, FlingGestureHandlerStateChangeEvent, NativeViewGestureHandlerProperties, TapGestureHandlerProperties, LongPressGestureHandlerProperties, PanGestureHandlerProperties, PinchGestureHandlerProperties, RotationGestureHandlerProperties, FlingGestureHandlerProperties, ForceTouchGestureHandlerProperties, RawButtonProperties, BaseButtonProperties, RectButtonProperties, BorderlessButtonProperties, } from './handlers/gestureHandlerTypesCompat';
|
52
|
+
export type { SwipeableProps } from './components/Swipeable';
|
53
|
+
export { default as Swipeable } from './components/Swipeable';
|
54
|
+
export type { PressableProps, PressableStateCallbackType, } from './components/Pressable';
|
55
|
+
export { default as Pressable } from './components/Pressable';
|
56
|
+
export type { DrawerLayoutProps, DrawerPosition, DrawerState, DrawerType, DrawerLockMode, DrawerKeyboardDismissMode, } from './components/DrawerLayout';
|
57
|
+
export { default as DrawerLayout } from './components/DrawerLayout';
|
58
|
+
export { enableExperimentalWebImplementation, enableLegacyWebImplementation, } from './EnableNewWebImplementation';
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AACtF,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AACxF,YAAY,EAEV,YAAY,EACZ,uBAAuB,EAEvB,mBAAmB,EACnB,8BAA8B,EAE9B,iBAAiB,EACjB,SAAS,EAET,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,YAAY,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/D,YAAY,EACV,6BAA6B,EAC7B,oCAAoC,EACpC,mCAAmC,EACnC,6BAA6B,EAC7B,+BAA+B,EAC/B,kCAAkC,EAClC,+BAA+B,EAC/B,+BAA+B,GAChC,MAAM,uCAAuC,CAAC;AAC/C,YAAY,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAC3E,YAAY,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AACzF,YAAY,EAAE,mCAAmC,EAAE,MAAM,uCAAuC,CAAC;AACjG,YAAY,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AACvF,YAAY,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAC3E,YAAY,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AACnF,YAAY,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC/E,YAAY,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AACvF,YAAY,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AACrF,YAAY,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAChF,YAAY,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AACzF,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,cAAc,IAAI,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAC/E,YAAY,EAAE,cAAc,IAAI,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACnF,YAAY,EAAE,cAAc,IAAI,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACnF,YAAY,EAAE,gBAAgB,IAAI,YAAY,EAAE,MAAM,kCAAkC,CAAC;AACzF,YAAY,EAAE,oBAAoB,IAAI,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACrG,YAAY,EAAE,gBAAgB,IAAI,YAAY,EAAE,MAAM,kCAAkC,CAAC;AACzF,YAAY,EAAE,mBAAmB,IAAI,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAClG,YAAY,EAAE,qBAAqB,IAAI,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AACxG,YAAY,EAAE,iBAAiB,IAAI,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAC5F,YAAY,EAAE,iBAAiB,IAAI,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAC5F,YAAY,EAAE,gBAAgB,IAAI,YAAY,EAAE,MAAM,kCAAkC,CAAC;AACzF,YAAY,EACV,mBAAmB,IAAI,eAAe,EACtC,eAAe,IAAI,WAAW,EAC9B,uBAAuB,IAAI,mBAAmB,EAC9C,oBAAoB,IAAI,gBAAgB,GACzC,MAAM,wCAAwC,CAAC;AAChD,YAAY,EAAE,uBAAuB,IAAI,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAC9G,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,YAAY,EACV,cAAc,EACd,eAAe,EACf,eAAe,EACf,qBAAqB,GACtB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,SAAS,EACT,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AACrC,YAAY,EACV,uBAAuB,EACvB,qBAAqB,EACrB,6BAA6B,GAC9B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,UAAU,EACV,MAAM,EACN,SAAS,EACT,mBAAmB,EACnB,QAAQ,EACR,cAAc,GACf,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,YAAY,EAEV,0BAA0B,EAC1B,8BAA8B,EAE9B,qCAAqC,EACrC,oCAAoC,EACpC,oCAAoC,EACpC,wCAAwC,EACxC,6BAA6B,EAC7B,iCAAiC,EACjC,oCAAoC,EACpC,wCAAwC,EACxC,mCAAmC,EACnC,uCAAuC,EACvC,6BAA6B,EAC7B,iCAAiC,EACjC,+BAA+B,EAC/B,mCAAmC,EACnC,kCAAkC,EAClC,sCAAsC,EACtC,+BAA+B,EAC/B,mCAAmC,EAEnC,kCAAkC,EAClC,2BAA2B,EAC3B,iCAAiC,EACjC,2BAA2B,EAC3B,6BAA6B,EAC7B,gCAAgC,EAChC,6BAA6B,EAC7B,kCAAkC,EAElC,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,sCAAsC,CAAC;AAE9C,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,YAAY,EACV,cAAc,EACd,0BAA0B,GAC3B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAE9D,YAAY,EACV,iBAAiB,EACjB,cAAc,EACd,WAAW,EACX,UAAU,EACV,cAAc,EACd,yBAAyB,GAC1B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,EACL,mCAAmC,EACnC,6BAA6B,GAC9B,MAAM,8BAA8B,CAAC"}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { initialize } from './init';
|
2
|
+
export { Directions } from './Directions';
|
3
|
+
export { State } from './State';
|
4
|
+
export { PointerType } from './PointerType';
|
5
|
+
export { default as gestureHandlerRootHOC } from './components/gestureHandlerRootHOC';
|
6
|
+
export { default as GestureHandlerRootView } from './components/GestureHandlerRootView';
|
7
|
+
export { MouseButton } from './handlers/gestureHandlerCommon';
|
8
|
+
export { TapGestureHandler } from './handlers/TapGestureHandler';
|
9
|
+
export { ForceTouchGestureHandler } from './handlers/ForceTouchGestureHandler';
|
10
|
+
export { LongPressGestureHandler } from './handlers/LongPressGestureHandler';
|
11
|
+
export { PanGestureHandler } from './handlers/PanGestureHandler';
|
12
|
+
export { PinchGestureHandler } from './handlers/PinchGestureHandler';
|
13
|
+
export { RotationGestureHandler } from './handlers/RotationGestureHandler';
|
14
|
+
export { FlingGestureHandler } from './handlers/FlingGestureHandler';
|
15
|
+
export { default as createNativeWrapper } from './handlers/createNativeWrapper';
|
16
|
+
export { GestureDetector } from './handlers/gestures/GestureDetector';
|
17
|
+
export { GestureObjects as Gesture } from './handlers/gestures/gestureObjects';
|
18
|
+
export { NativeViewGestureHandler } from './handlers/NativeViewGestureHandler';
|
19
|
+
export { RawButton, BaseButton, RectButton, BorderlessButton, PureNativeButton, } from './components/GestureButtons';
|
20
|
+
export { TouchableHighlight, TouchableNativeFeedback, TouchableOpacity, TouchableWithoutFeedback, } from './components/touchables';
|
21
|
+
export { ScrollView, Switch, TextInput, DrawerLayoutAndroid, FlatList, RefreshControl, } from './components/GestureComponents';
|
22
|
+
export { Text } from './components/Text';
|
23
|
+
export { HoverEffect } from './handlers/gestures/hoverGesture';
|
24
|
+
export { default as Swipeable } from './components/Swipeable';
|
25
|
+
export { default as Pressable } from './components/Pressable';
|
26
|
+
export { default as DrawerLayout } from './components/DrawerLayout';
|
27
|
+
export { enableExperimentalWebImplementation, enableLegacyWebImplementation, } from './EnableNewWebImplementation';
|
28
|
+
initialize();
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/init.ts"],"names":[],"mappings":"AAMA,wBAAgB,UAAU,SAEzB;AAID,wBAAgB,qBAAqB,SAKpC"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { startListening } from './handlers/gestures/eventReceiver';
|
2
|
+
import RNGestureHandlerModule from './RNGestureHandlerModule';
|
3
|
+
import { isFabric } from './utils';
|
4
|
+
let fabricInitialized = false;
|
5
|
+
export function initialize() {
|
6
|
+
startListening();
|
7
|
+
}
|
8
|
+
// Since isFabric() may give wrong results before the first render, we call this
|
9
|
+
// method during render of GestureHandlerRootView
|
10
|
+
export function maybeInitializeFabric() {
|
11
|
+
if (isFabric() && !fabricInitialized) {
|
12
|
+
RNGestureHandlerModule.install();
|
13
|
+
fabricInitialized = true;
|
14
|
+
}
|
15
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export { getByGestureTestId, fireGestureHandler } from './jestUtils';
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jestUtils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export { getByGestureTestId, fireGestureHandler } from './jestUtils';
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { ReactTestInstance } from 'react-test-renderer';
|
2
|
+
import { FlingGestureHandler } from '../handlers/FlingGestureHandler';
|
3
|
+
import { ForceTouchGestureHandler } from '../handlers/ForceTouchGestureHandler';
|
4
|
+
import { BaseGestureHandlerProps, GestureEvent, HandlerStateChangeEvent } from '../handlers/gestureHandlerCommon';
|
5
|
+
import { FlingGesture } from '../handlers/gestures/flingGesture';
|
6
|
+
import { ForceTouchGesture } from '../handlers/gestures/forceTouchGesture';
|
7
|
+
import { BaseGesture, GestureType } from '../handlers/gestures/gesture';
|
8
|
+
import { LongPressGesture } from '../handlers/gestures/longPressGesture';
|
9
|
+
import { NativeGesture } from '../handlers/gestures/nativeGesture';
|
10
|
+
import { PanGesture } from '../handlers/gestures/panGesture';
|
11
|
+
import { PinchGesture } from '../handlers/gestures/pinchGesture';
|
12
|
+
import { RotationGesture } from '../handlers/gestures/rotationGesture';
|
13
|
+
import { TapGesture } from '../handlers/gestures/tapGesture';
|
14
|
+
import { LongPressGestureHandler } from '../handlers/LongPressGestureHandler';
|
15
|
+
import type { ForceTouchGestureHandlerEventPayload, LongPressGestureHandlerEventPayload, NativeViewGestureHandlerPayload, PanGestureHandlerEventPayload, PinchGestureHandlerEventPayload, RotationGestureHandlerEventPayload, TapGestureHandlerEventPayload } from '../handlers/GestureHandlerEventPayload';
|
16
|
+
import { NativeViewGestureHandler } from '../handlers/NativeViewGestureHandler';
|
17
|
+
import { PanGestureHandler } from '../handlers/PanGestureHandler';
|
18
|
+
import { PinchGestureHandler } from '../handlers/PinchGestureHandler';
|
19
|
+
import { RotationGestureHandler } from '../handlers/RotationGestureHandler';
|
20
|
+
import { TapGestureHandler } from '../handlers/TapGestureHandler';
|
21
|
+
type GestureHandlerTestEvent<TEventPayload extends Record<string, unknown> = Record<string, unknown>> = (GestureEvent<TEventPayload> | HandlerStateChangeEvent<TEventPayload>)['nativeEvent'];
|
22
|
+
type AllGestures = TapGesture | PanGesture | LongPressGesture | RotationGesture | PinchGesture | FlingGesture | ForceTouchGesture | NativeGesture;
|
23
|
+
type AllHandlers = TapGestureHandler | PanGestureHandler | LongPressGestureHandler | RotationGestureHandler | PinchGestureHandler | FlingGestureHandler | ForceTouchGestureHandler | NativeViewGestureHandler;
|
24
|
+
type ClassComponentConstructor<P> = new (props: P) => React.Component<P, any, any>;
|
25
|
+
type ExtractPayloadFromProps<T> = T extends BaseGestureHandlerProps<infer TPayload> ? TPayload : never;
|
26
|
+
type ExtractConfig<T> = T extends BaseGesture<infer TGesturePayload> ? TGesturePayload : T extends ClassComponentConstructor<infer THandlerProps> ? ExtractPayloadFromProps<THandlerProps> : Record<string, unknown>;
|
27
|
+
export declare function fireGestureHandler<THandler extends AllGestures | AllHandlers>(componentOrGesture: ReactTestInstance | GestureType, eventList?: Partial<GestureHandlerTestEvent<ExtractConfig<THandler>>>[]): void;
|
28
|
+
export declare function getByGestureTestId(testID: string): BaseGesture<Record<string, unknown>> | BaseGesture<Record<string, never>> | BaseGesture<TapGestureHandlerEventPayload> | BaseGesture<PanGestureHandlerEventPayload> | BaseGesture<LongPressGestureHandlerEventPayload> | BaseGesture<RotationGestureHandlerEventPayload> | BaseGesture<PinchGestureHandlerEventPayload> | BaseGesture<ForceTouchGestureHandlerEventPayload> | BaseGesture<NativeViewGestureHandlerPayload> | BaseGesture<import("../handlers/GestureHandlerEventPayload").HoverGestureHandlerEventPayload>;
|
29
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"jestUtils.d.ts","sourceRoot":"","sources":["../../../src/jestUtils/jestUtils.ts"],"names":[],"mappings":"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"}
|
@@ -0,0 +1,290 @@
|
|
1
|
+
import invariant from 'invariant';
|
2
|
+
import { DeviceEventEmitter } from 'react-native';
|
3
|
+
import { flingHandlerName, } from '../handlers/FlingGestureHandler';
|
4
|
+
import { forceTouchHandlerName, } from '../handlers/ForceTouchGestureHandler';
|
5
|
+
import { BaseGesture } from '../handlers/gestures/gesture';
|
6
|
+
import { findHandlerByTestID } from '../handlers/handlersRegistry';
|
7
|
+
import { longPressHandlerName, } from '../handlers/LongPressGestureHandler';
|
8
|
+
import { nativeViewHandlerName, } from '../handlers/NativeViewGestureHandler';
|
9
|
+
import { panHandlerName, } from '../handlers/PanGestureHandler';
|
10
|
+
import { pinchHandlerName, } from '../handlers/PinchGestureHandler';
|
11
|
+
import { rotationHandlerName, } from '../handlers/RotationGestureHandler';
|
12
|
+
import { tapHandlerName, } from '../handlers/TapGestureHandler';
|
13
|
+
import { State } from '../State';
|
14
|
+
import { hasProperty, withPrevAndCurrent } from '../utils';
|
15
|
+
// Load fireEvent conditionally, so RNGH may be used in setups without testing-library
|
16
|
+
let fireEvent = (_element, _name, ..._data) => {
|
17
|
+
// NOOP
|
18
|
+
};
|
19
|
+
try {
|
20
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
21
|
+
fireEvent = require('@testing-library/react-native').fireEvent;
|
22
|
+
}
|
23
|
+
catch (_e) {
|
24
|
+
// Do nothing if not available
|
25
|
+
}
|
26
|
+
const handlersDefaultEvents = {
|
27
|
+
[flingHandlerName]: {
|
28
|
+
x: 0,
|
29
|
+
y: 0,
|
30
|
+
absoluteX: 0,
|
31
|
+
absoluteY: 0,
|
32
|
+
numberOfPointers: 1,
|
33
|
+
},
|
34
|
+
[forceTouchHandlerName]: {
|
35
|
+
x: 0,
|
36
|
+
y: 0,
|
37
|
+
absoluteX: 0,
|
38
|
+
absoluteY: 0,
|
39
|
+
force: 1,
|
40
|
+
numberOfPointers: 1,
|
41
|
+
},
|
42
|
+
[longPressHandlerName]: {
|
43
|
+
x: 0,
|
44
|
+
y: 0,
|
45
|
+
absoluteX: 0,
|
46
|
+
absoluteY: 0,
|
47
|
+
duration: 100,
|
48
|
+
numberOfPointers: 1,
|
49
|
+
},
|
50
|
+
[nativeViewHandlerName]: {
|
51
|
+
pointerInside: true,
|
52
|
+
numberOfPointers: 1,
|
53
|
+
},
|
54
|
+
[panHandlerName]: {
|
55
|
+
x: 0,
|
56
|
+
y: 0,
|
57
|
+
absoluteX: 0,
|
58
|
+
absoluteY: 0,
|
59
|
+
translationX: 100,
|
60
|
+
translationY: 0,
|
61
|
+
velocityX: 3,
|
62
|
+
velocityY: 0,
|
63
|
+
numberOfPointers: 1,
|
64
|
+
stylusData: undefined,
|
65
|
+
},
|
66
|
+
[pinchHandlerName]: {
|
67
|
+
focalX: 0,
|
68
|
+
focalY: 0,
|
69
|
+
scale: 2,
|
70
|
+
velocity: 1,
|
71
|
+
numberOfPointers: 2,
|
72
|
+
},
|
73
|
+
[rotationHandlerName]: {
|
74
|
+
anchorX: 0,
|
75
|
+
anchorY: 0,
|
76
|
+
rotation: 3.14,
|
77
|
+
velocity: 2,
|
78
|
+
numberOfPointers: 2,
|
79
|
+
},
|
80
|
+
[tapHandlerName]: {
|
81
|
+
x: 0,
|
82
|
+
y: 0,
|
83
|
+
absoluteX: 0,
|
84
|
+
absoluteY: 0,
|
85
|
+
numberOfPointers: 1,
|
86
|
+
},
|
87
|
+
};
|
88
|
+
function isGesture(componentOrGesture) {
|
89
|
+
return componentOrGesture instanceof BaseGesture;
|
90
|
+
}
|
91
|
+
function wrapWithNativeEvent(event) {
|
92
|
+
return { nativeEvent: event };
|
93
|
+
}
|
94
|
+
function fillOldStateChanges(previousEvent, currentEvent) {
|
95
|
+
const isFirstEvent = previousEvent === null;
|
96
|
+
if (isFirstEvent) {
|
97
|
+
return {
|
98
|
+
oldState: State.UNDETERMINED,
|
99
|
+
...currentEvent,
|
100
|
+
};
|
101
|
+
}
|
102
|
+
const isGestureStateEvent = previousEvent.state !== currentEvent.state;
|
103
|
+
if (isGestureStateEvent) {
|
104
|
+
return {
|
105
|
+
oldState: previousEvent?.state,
|
106
|
+
...currentEvent,
|
107
|
+
};
|
108
|
+
}
|
109
|
+
else {
|
110
|
+
return currentEvent;
|
111
|
+
}
|
112
|
+
}
|
113
|
+
function validateStateTransitions(previousEvent, currentEvent) {
|
114
|
+
function stringify(event) {
|
115
|
+
return JSON.stringify(event, null, 2);
|
116
|
+
}
|
117
|
+
function errorMsgWithBothEvents(description) {
|
118
|
+
return `${description}, invalid event: ${stringify(currentEvent)}, previous event: ${stringify(previousEvent)}`;
|
119
|
+
}
|
120
|
+
function errorMsgWithCurrentEvent(description) {
|
121
|
+
return `${description}, invalid event: ${stringify(currentEvent)}`;
|
122
|
+
}
|
123
|
+
invariant(hasProperty(currentEvent, 'state'), errorMsgWithCurrentEvent('every event must have state'));
|
124
|
+
const isFirstEvent = previousEvent === null;
|
125
|
+
if (isFirstEvent) {
|
126
|
+
invariant(currentEvent.state === State.BEGAN, errorMsgWithCurrentEvent('first event must have BEGAN state'));
|
127
|
+
}
|
128
|
+
if (previousEvent !== null) {
|
129
|
+
if (previousEvent.state !== currentEvent.state) {
|
130
|
+
invariant(hasProperty(currentEvent, 'oldState'), errorMsgWithCurrentEvent('when state changes, oldState field should be present'));
|
131
|
+
invariant(currentEvent.oldState === previousEvent.state, errorMsgWithBothEvents("when state changes, oldState should be the same as previous event' state"));
|
132
|
+
}
|
133
|
+
}
|
134
|
+
return currentEvent;
|
135
|
+
}
|
136
|
+
function fillMissingDefaultsFor({ handlerType, handlerTag, }) {
|
137
|
+
return (event) => {
|
138
|
+
return {
|
139
|
+
...handlersDefaultEvents[handlerType],
|
140
|
+
...event,
|
141
|
+
handlerTag,
|
142
|
+
};
|
143
|
+
};
|
144
|
+
}
|
145
|
+
function isDiscreteHandler(handlerType) {
|
146
|
+
return (handlerType === 'TapGestureHandler' ||
|
147
|
+
handlerType === 'LongPressGestureHandler');
|
148
|
+
}
|
149
|
+
function fillMissingStatesTransitions(events, isDiscreteHandler) {
|
150
|
+
const _events = [...events];
|
151
|
+
const lastEvent = _events[_events.length - 1] ?? null;
|
152
|
+
const firstEvent = _events[0] ?? null;
|
153
|
+
const shouldDuplicateFirstEvent = !isDiscreteHandler && !hasState(State.BEGAN)(firstEvent);
|
154
|
+
if (shouldDuplicateFirstEvent) {
|
155
|
+
const duplicated = { ...firstEvent, state: State.BEGAN };
|
156
|
+
// @ts-ignore badly typed, property may exist and we don't want to copy it
|
157
|
+
delete duplicated.oldState;
|
158
|
+
_events.unshift(duplicated);
|
159
|
+
}
|
160
|
+
const shouldDuplicateLastEvent = !hasState(State.END)(lastEvent) ||
|
161
|
+
!hasState(State.FAILED)(lastEvent) ||
|
162
|
+
!hasState(State.CANCELLED)(lastEvent);
|
163
|
+
if (shouldDuplicateLastEvent) {
|
164
|
+
const duplicated = { ...lastEvent, state: State.END };
|
165
|
+
// @ts-ignore badly typed, property may exist and we don't want to copy it
|
166
|
+
delete duplicated.oldState;
|
167
|
+
_events.push(duplicated);
|
168
|
+
}
|
169
|
+
function isWithoutState(event) {
|
170
|
+
return event !== null && !hasProperty(event, 'state');
|
171
|
+
}
|
172
|
+
function hasState(state) {
|
173
|
+
return (event) => event !== null && event.state === state;
|
174
|
+
}
|
175
|
+
function noEventsLeft(event) {
|
176
|
+
return event === null;
|
177
|
+
}
|
178
|
+
function trueFn() {
|
179
|
+
return true;
|
180
|
+
}
|
181
|
+
function fillEventsForCurrentState({ shouldConsumeEvent = trueFn, shouldTransitionToNextState = trueFn, }) {
|
182
|
+
function peekCurrentEvent() {
|
183
|
+
return _events[0] ?? null;
|
184
|
+
}
|
185
|
+
function peekNextEvent() {
|
186
|
+
return _events[1] ?? null;
|
187
|
+
}
|
188
|
+
function consumeCurrentEvent() {
|
189
|
+
_events.shift();
|
190
|
+
}
|
191
|
+
const currentEvent = peekCurrentEvent();
|
192
|
+
const nextEvent = peekNextEvent();
|
193
|
+
const currentRequiredState = REQUIRED_EVENTS[currentStateIdx];
|
194
|
+
let eventData = {};
|
195
|
+
const shouldUseEvent = shouldConsumeEvent(currentEvent);
|
196
|
+
if (shouldUseEvent) {
|
197
|
+
eventData = currentEvent;
|
198
|
+
consumeCurrentEvent();
|
199
|
+
}
|
200
|
+
transformedEvents.push({ state: currentRequiredState, ...eventData });
|
201
|
+
if (shouldTransitionToNextState(nextEvent)) {
|
202
|
+
currentStateIdx++;
|
203
|
+
}
|
204
|
+
}
|
205
|
+
const REQUIRED_EVENTS = [State.BEGAN, State.ACTIVE, State.END];
|
206
|
+
let currentStateIdx = 0;
|
207
|
+
const transformedEvents = [];
|
208
|
+
let hasAllStates;
|
209
|
+
let iterations = 0;
|
210
|
+
do {
|
211
|
+
const nextRequiredState = REQUIRED_EVENTS[currentStateIdx];
|
212
|
+
if (nextRequiredState === State.BEGAN) {
|
213
|
+
fillEventsForCurrentState({
|
214
|
+
shouldConsumeEvent: (e) => isWithoutState(e) || hasState(State.BEGAN)(e),
|
215
|
+
});
|
216
|
+
}
|
217
|
+
else if (nextRequiredState === State.ACTIVE) {
|
218
|
+
const shouldConsumeEvent = (e) => isWithoutState(e) || hasState(State.ACTIVE)(e);
|
219
|
+
const shouldTransitionToNextState = (nextEvent) => noEventsLeft(nextEvent) ||
|
220
|
+
hasState(State.END)(nextEvent) ||
|
221
|
+
hasState(State.FAILED)(nextEvent) ||
|
222
|
+
hasState(State.CANCELLED)(nextEvent);
|
223
|
+
fillEventsForCurrentState({
|
224
|
+
shouldConsumeEvent,
|
225
|
+
shouldTransitionToNextState,
|
226
|
+
});
|
227
|
+
}
|
228
|
+
else if (nextRequiredState === State.END) {
|
229
|
+
fillEventsForCurrentState({});
|
230
|
+
}
|
231
|
+
hasAllStates = currentStateIdx === REQUIRED_EVENTS.length;
|
232
|
+
invariant(iterations++ <= 500, 'exceeded max number of iterations, please report a bug in RNGH repository with your test case');
|
233
|
+
} while (!hasAllStates);
|
234
|
+
return transformedEvents;
|
235
|
+
}
|
236
|
+
function getHandlerData(componentOrGesture) {
|
237
|
+
if (isGesture(componentOrGesture)) {
|
238
|
+
const gesture = componentOrGesture;
|
239
|
+
return {
|
240
|
+
emitEvent: (eventName, args) => {
|
241
|
+
DeviceEventEmitter.emit(eventName, args.nativeEvent);
|
242
|
+
},
|
243
|
+
handlerType: gesture.handlerName,
|
244
|
+
handlerTag: gesture.handlerTag,
|
245
|
+
enabled: gesture.config.enabled,
|
246
|
+
};
|
247
|
+
}
|
248
|
+
const gestureHandlerComponent = componentOrGesture;
|
249
|
+
return {
|
250
|
+
emitEvent: (eventName, args) => {
|
251
|
+
fireEvent(gestureHandlerComponent, eventName, args);
|
252
|
+
},
|
253
|
+
handlerType: gestureHandlerComponent.props.handlerType,
|
254
|
+
handlerTag: gestureHandlerComponent.props.handlerTag,
|
255
|
+
enabled: gestureHandlerComponent.props.enabled,
|
256
|
+
};
|
257
|
+
}
|
258
|
+
export function fireGestureHandler(componentOrGesture, eventList = []) {
|
259
|
+
const { emitEvent, handlerType, handlerTag, enabled } = getHandlerData(componentOrGesture);
|
260
|
+
if (enabled === false) {
|
261
|
+
return;
|
262
|
+
}
|
263
|
+
let _ = fillMissingStatesTransitions(eventList, isDiscreteHandler(handlerType));
|
264
|
+
_ = _.map(fillMissingDefaultsFor({ handlerTag, handlerType }));
|
265
|
+
_ = withPrevAndCurrent(_, fillOldStateChanges);
|
266
|
+
_ = withPrevAndCurrent(_, validateStateTransitions);
|
267
|
+
// @ts-ignore TODO
|
268
|
+
_ = _.map(wrapWithNativeEvent);
|
269
|
+
const events = _;
|
270
|
+
const firstEvent = events.shift();
|
271
|
+
emitEvent('onGestureHandlerStateChange', firstEvent);
|
272
|
+
let lastSentEvent = firstEvent;
|
273
|
+
for (const event of events) {
|
274
|
+
const hasChangedState = lastSentEvent.nativeEvent.state !== event.nativeEvent.state;
|
275
|
+
if (hasChangedState) {
|
276
|
+
emitEvent('onGestureHandlerStateChange', event);
|
277
|
+
}
|
278
|
+
else {
|
279
|
+
emitEvent('onGestureHandlerEvent', event);
|
280
|
+
}
|
281
|
+
lastSentEvent = event;
|
282
|
+
}
|
283
|
+
}
|
284
|
+
export function getByGestureTestId(testID) {
|
285
|
+
const handler = findHandlerByTestID(testID);
|
286
|
+
if (handler === null) {
|
287
|
+
throw new Error(`Handler with id: '${testID}' cannot be found`);
|
288
|
+
}
|
289
|
+
return handler;
|
290
|
+
}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { TouchableNativeFeedback, TouchableWithoutFeedback, ScrollView, FlatList, Switch, TextInput, DrawerLayoutAndroid, View } from 'react-native';
|
3
|
+
declare const _default: {
|
4
|
+
readonly TouchableHighlight: React.ForwardRefExoticComponent<import("react-native").TouchableHighlightProps & React.RefAttributes<View>>;
|
5
|
+
readonly TouchableNativeFeedback: typeof TouchableNativeFeedback;
|
6
|
+
readonly TouchableOpacity: React.ForwardRefExoticComponent<import("react-native").TouchableOpacityProps & React.RefAttributes<View>>;
|
7
|
+
readonly TouchableWithoutFeedback: typeof TouchableWithoutFeedback;
|
8
|
+
readonly ScrollView: typeof ScrollView;
|
9
|
+
readonly FlatList: typeof FlatList;
|
10
|
+
readonly Switch: typeof Switch;
|
11
|
+
readonly TextInput: typeof TextInput;
|
12
|
+
readonly DrawerLayoutAndroid: typeof DrawerLayoutAndroid;
|
13
|
+
readonly NativeViewGestureHandler: typeof View;
|
14
|
+
readonly TapGestureHandler: typeof View;
|
15
|
+
readonly ForceTouchGestureHandler: typeof View;
|
16
|
+
readonly LongPressGestureHandler: typeof View;
|
17
|
+
readonly PinchGestureHandler: typeof View;
|
18
|
+
readonly RotationGestureHandler: typeof View;
|
19
|
+
readonly FlingGestureHandler: typeof View;
|
20
|
+
readonly RawButton: ({ enabled, ...rest }: any) => React.JSX.Element;
|
21
|
+
readonly BaseButton: ({ enabled, ...rest }: any) => React.JSX.Element;
|
22
|
+
readonly RectButton: ({ enabled, ...rest }: any) => React.JSX.Element;
|
23
|
+
readonly BorderlessButton: typeof TouchableNativeFeedback;
|
24
|
+
readonly PanGestureHandler: typeof View;
|
25
|
+
readonly attachGestureHandler: () => void;
|
26
|
+
readonly createGestureHandler: () => void;
|
27
|
+
readonly dropGestureHandler: () => void;
|
28
|
+
readonly updateGestureHandler: () => void;
|
29
|
+
readonly flushOperations: () => void;
|
30
|
+
readonly install: () => void;
|
31
|
+
readonly Directions: {
|
32
|
+
readonly RIGHT: 1;
|
33
|
+
readonly LEFT: 2;
|
34
|
+
readonly UP: 4;
|
35
|
+
readonly DOWN: 8;
|
36
|
+
};
|
37
|
+
readonly State: {
|
38
|
+
readonly UNDETERMINED: 0;
|
39
|
+
readonly FAILED: 1;
|
40
|
+
readonly BEGAN: 2;
|
41
|
+
readonly CANCELLED: 3;
|
42
|
+
readonly ACTIVE: 4;
|
43
|
+
readonly END: 5;
|
44
|
+
};
|
45
|
+
};
|
46
|
+
export default _default;
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"mocks.d.ts","sourceRoot":"","sources":["../../src/mocks.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,uBAAuB,EAEvB,wBAAwB,EACxB,UAAU,EACV,QAAQ,EACR,MAAM,EACN,SAAS,EACT,mBAAmB,EACnB,IAAI,EACL,MAAM,cAAc,CAAC;;;;;;;;;;;;;;;;;;+CAqBmB,GAAG;gDAAH,GAAG;gDAAH,GAAG;;;;;;;;;;;;;;;;;;;;;;;;AAS5C,wBA+BW"}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { TouchableHighlight, TouchableNativeFeedback, TouchableOpacity, TouchableWithoutFeedback, ScrollView, FlatList, Switch, TextInput, DrawerLayoutAndroid, View, } from 'react-native';
|
3
|
+
import { State } from './State';
|
4
|
+
import { Directions } from './Directions';
|
5
|
+
const NOOP = () => {
|
6
|
+
// Do nothing
|
7
|
+
};
|
8
|
+
const PanGestureHandler = View;
|
9
|
+
const attachGestureHandler = NOOP;
|
10
|
+
const createGestureHandler = NOOP;
|
11
|
+
const dropGestureHandler = NOOP;
|
12
|
+
const updateGestureHandler = NOOP;
|
13
|
+
const flushOperations = NOOP;
|
14
|
+
const install = NOOP;
|
15
|
+
const NativeViewGestureHandler = View;
|
16
|
+
const TapGestureHandler = View;
|
17
|
+
const ForceTouchGestureHandler = View;
|
18
|
+
const LongPressGestureHandler = View;
|
19
|
+
const PinchGestureHandler = View;
|
20
|
+
const RotationGestureHandler = View;
|
21
|
+
const FlingGestureHandler = View;
|
22
|
+
const RawButton = ({ enabled, ...rest }) => (<TouchableNativeFeedback disabled={!enabled} {...rest}>
|
23
|
+
<View />
|
24
|
+
</TouchableNativeFeedback>);
|
25
|
+
const BaseButton = RawButton;
|
26
|
+
const RectButton = RawButton;
|
27
|
+
const BorderlessButton = TouchableNativeFeedback;
|
28
|
+
export default {
|
29
|
+
TouchableHighlight,
|
30
|
+
TouchableNativeFeedback,
|
31
|
+
TouchableOpacity,
|
32
|
+
TouchableWithoutFeedback,
|
33
|
+
ScrollView,
|
34
|
+
FlatList,
|
35
|
+
Switch,
|
36
|
+
TextInput,
|
37
|
+
DrawerLayoutAndroid,
|
38
|
+
NativeViewGestureHandler,
|
39
|
+
TapGestureHandler,
|
40
|
+
ForceTouchGestureHandler,
|
41
|
+
LongPressGestureHandler,
|
42
|
+
PinchGestureHandler,
|
43
|
+
RotationGestureHandler,
|
44
|
+
FlingGestureHandler,
|
45
|
+
RawButton,
|
46
|
+
BaseButton,
|
47
|
+
RectButton,
|
48
|
+
BorderlessButton,
|
49
|
+
PanGestureHandler,
|
50
|
+
attachGestureHandler,
|
51
|
+
createGestureHandler,
|
52
|
+
dropGestureHandler,
|
53
|
+
updateGestureHandler,
|
54
|
+
flushOperations,
|
55
|
+
install,
|
56
|
+
// Probably can be removed
|
57
|
+
Directions,
|
58
|
+
State,
|
59
|
+
};
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { GestureType } from './handlers/gestures/gesture';
|
2
|
+
interface ReactComponentWithHandlerTag extends React.Component {
|
3
|
+
handlerTag: number;
|
4
|
+
}
|
5
|
+
export type GestureMountListener = (gesture: GestureType | ReactComponentWithHandlerTag) => void;
|
6
|
+
export declare class MountRegistry {
|
7
|
+
private static mountListeners;
|
8
|
+
private static unmountListeners;
|
9
|
+
static addMountListener(listener: GestureMountListener): () => void;
|
10
|
+
static addUnmountListener(listener: GestureMountListener): () => void;
|
11
|
+
static gestureHandlerWillMount(handler: React.Component): void;
|
12
|
+
static gestureHandlerWillUnmount(handler: React.Component): void;
|
13
|
+
static gestureWillMount(gesture: GestureType): void;
|
14
|
+
static gestureWillUnmount(gesture: GestureType): void;
|
15
|
+
}
|
16
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"mountRegistry.d.ts","sourceRoot":"","sources":["../../src/mountRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,UAAU,4BAA6B,SAAQ,KAAK,CAAC,SAAS;IAC5D,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,oBAAoB,GAAG,CACjC,OAAO,EAAE,WAAW,GAAG,4BAA4B,KAChD,IAAI,CAAC;AAGV,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAC,cAAc,CAAmC;IAChE,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAmC;IAElE,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,oBAAoB,GAAG,MAAM,IAAI;IAQnE,MAAM,CAAC,kBAAkB,CAAC,QAAQ,EAAE,oBAAoB,GAAG,MAAM,IAAI;IAQrE,MAAM,CAAC,uBAAuB,CAAC,OAAO,EAAE,KAAK,CAAC,SAAS;IAMvD,MAAM,CAAC,yBAAyB,CAAC,OAAO,EAAE,KAAK,CAAC,SAAS;IAMzD,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW;IAI5C,MAAM,CAAC,kBAAkB,CAAC,OAAO,EAAE,WAAW;CAG/C"}
|