react-native-gesture-handler 3.0.0-beta.1 → 3.0.0-beta.3
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/ReanimatedDrawerLayout/package.json +1 -1
- package/ReanimatedSwipeable/package.json +1 -1
- package/android/src/main/java/com/swmansion/gesturehandler/RNGestureHandlerPackage.kt +0 -5
- package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandler.kt +43 -17
- package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerOrchestrator.kt +8 -4
- package/android/src/main/java/com/swmansion/gesturehandler/core/NativeViewGestureHandler.kt +4 -6
- package/android/src/main/java/com/swmansion/gesturehandler/core/RotationGestureHandler.kt +10 -7
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.kt +382 -129
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerDetectorView.kt +60 -6
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerDetectorViewManager.kt +1 -1
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerInteractionManager.kt +2 -0
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.kt +4 -10
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRegistry.kt +2 -1
- package/apple/Handlers/RNFlingHandler.m +7 -7
- package/apple/Handlers/RNForceTouchHandler.m +2 -2
- package/apple/Handlers/RNHoverHandler.m +38 -7
- package/apple/Handlers/RNLongPressHandler.m +21 -8
- package/apple/Handlers/RNManualHandler.m +2 -2
- package/apple/Handlers/RNNativeViewHandler.mm +67 -13
- package/apple/Handlers/RNPanHandler.m +4 -4
- package/apple/Handlers/RNPinchHandler.m +11 -4
- package/apple/Handlers/RNRotationHandler.m +11 -4
- package/apple/Handlers/RNTapHandler.m +6 -4
- package/apple/RNGHUIKit.h +2 -0
- package/apple/RNGestureHandler.h +16 -1
- package/apple/RNGestureHandler.mm +78 -4
- package/apple/RNGestureHandlerButton.h +42 -1
- package/apple/RNGestureHandlerButton.mm +619 -49
- package/apple/RNGestureHandlerButtonComponentView.mm +52 -2
- package/apple/RNGestureHandlerDetector.mm +29 -11
- package/apple/RNGestureHandlerEvents.h +3 -1
- package/apple/RNGestureHandlerEvents.mm +8 -3
- package/apple/RNGestureHandlerManager.h +2 -0
- package/apple/RNGestureHandlerManager.mm +49 -3
- package/apple/RNGestureHandlerModule.mm +17 -10
- package/apple/RNGestureHandlerRegistry.h +3 -0
- package/apple/RNGestureHandlerRegistry.m +43 -11
- package/apple/RNManualActivationRecognizer.m +1 -1
- package/jest-utils/package.json +1 -1
- package/jestSetup.js +6 -16
- package/lib/module/RNGestureHandlerModule.web.js +2 -1
- package/lib/module/RNGestureHandlerModule.web.js.map +1 -1
- package/lib/module/RNGestureHandlerModule.windows.js +5 -6
- package/lib/module/RNGestureHandlerModule.windows.js.map +1 -1
- package/lib/module/components/GestureButtons.js +30 -13
- package/lib/module/components/GestureButtons.js.map +1 -1
- package/lib/module/components/GestureComponents.js +6 -8
- package/lib/module/components/GestureComponents.js.map +1 -1
- package/lib/module/components/GestureComponents.web.js +3 -4
- package/lib/module/components/GestureComponents.web.js.map +1 -1
- package/lib/module/components/GestureHandlerButton.js +2 -135
- package/lib/module/components/GestureHandlerButton.js.map +1 -1
- package/lib/module/components/GestureHandlerButton.web.js +118 -6
- package/lib/module/components/GestureHandlerButton.web.js.map +1 -1
- package/lib/module/components/GestureHandlerRootView.android.js.map +1 -1
- package/lib/module/components/GestureHandlerRootView.js +2 -2
- package/lib/module/components/GestureHandlerRootView.js.map +1 -1
- package/lib/module/components/GestureHandlerRootView.web.js +2 -2
- package/lib/module/components/GestureHandlerRootView.web.js.map +1 -1
- package/lib/module/components/Pressable/Pressable.js +16 -10
- package/lib/module/components/Pressable/Pressable.js.map +1 -1
- package/lib/module/components/Pressable/index.js.map +1 -1
- package/lib/module/components/Pressable/stateDefinitions.js +14 -3
- package/lib/module/components/Pressable/stateDefinitions.js.map +1 -1
- package/lib/module/components/Pressable/utils.js +1 -1
- package/lib/module/components/Pressable/utils.js.map +1 -1
- package/lib/module/components/ReanimatedDrawerLayout.js +11 -10
- package/lib/module/components/ReanimatedDrawerLayout.js.map +1 -1
- package/lib/module/components/ReanimatedSwipeable/ReanimatedSwipeable.js +16 -16
- package/lib/module/components/ReanimatedSwipeable/ReanimatedSwipeable.js.map +1 -1
- package/lib/module/components/ReanimatedSwipeable/ReanimatedSwipeableProps.js.map +1 -1
- package/lib/module/components/ReanimatedSwipeable/index.js +1 -1
- package/lib/module/components/ReanimatedSwipeable/index.js.map +1 -1
- package/lib/module/components/Text.js +33 -23
- package/lib/module/components/Text.js.map +1 -1
- package/lib/module/components/touchables/GenericTouchable.js +9 -13
- package/lib/module/components/touchables/GenericTouchable.js.map +1 -1
- package/lib/module/components/touchables/TouchableHighlight.js +1 -1
- package/lib/module/components/touchables/TouchableHighlight.js.map +1 -1
- package/lib/module/components/touchables/TouchableNativeFeedback.android.js +1 -1
- package/lib/module/components/touchables/TouchableNativeFeedback.android.js.map +1 -1
- package/lib/module/components/touchables/TouchableOpacity.js +2 -2
- package/lib/module/components/touchables/TouchableOpacity.js.map +1 -1
- package/lib/module/components/touchables/TouchableWithoutFeedback.js +3 -4
- package/lib/module/components/touchables/TouchableWithoutFeedback.js.map +1 -1
- package/lib/module/components/touchables/index.js +2 -2
- package/lib/module/components/touchables/index.js.map +1 -1
- package/lib/module/findNodeHandle.web.js +4 -2
- package/lib/module/findNodeHandle.web.js.map +1 -1
- package/lib/module/handlers/FlingGestureHandler.js.map +1 -1
- package/lib/module/handlers/ForceTouchGestureHandler.js +1 -1
- package/lib/module/handlers/ForceTouchGestureHandler.js.map +1 -1
- package/lib/module/handlers/LongPressGestureHandler.js.map +1 -1
- package/lib/module/handlers/NativeViewGestureHandler.js.map +1 -1
- package/lib/module/handlers/PanGestureHandler.js.map +1 -1
- package/lib/module/handlers/PinchGestureHandler.js.map +1 -1
- package/lib/module/handlers/RotationGestureHandler.js.map +1 -1
- package/lib/module/handlers/TapGestureHandler.js.map +1 -1
- package/lib/module/handlers/createHandler.js +10 -10
- package/lib/module/handlers/createHandler.js.map +1 -1
- package/lib/module/handlers/createNativeWrapper.js +7 -3
- package/lib/module/handlers/createNativeWrapper.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/Wrap.js +1 -1
- package/lib/module/handlers/gestures/GestureDetector/Wrap.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/Wrap.web.js +5 -4
- package/lib/module/handlers/gestures/GestureDetector/Wrap.web.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js +5 -5
- package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js +2 -2
- package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/index.js +6 -6
- package/lib/module/handlers/gestures/GestureDetector/index.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js +3 -3
- package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js +3 -3
- package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js +4 -3
- package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/useMountReactions.js +2 -2
- package/lib/module/handlers/gestures/GestureDetector/useMountReactions.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js +2 -2
- package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/utils.js +7 -7
- package/lib/module/handlers/gestures/GestureDetector/utils.js.map +1 -1
- package/lib/module/handlers/gestures/eventReceiver.js.map +1 -1
- package/lib/module/handlers/gestures/flingGesture.js.map +1 -1
- package/lib/module/handlers/gestures/forceTouchGesture.js.map +1 -1
- package/lib/module/handlers/gestures/gesture.js +1 -1
- package/lib/module/handlers/gestures/gesture.js.map +1 -1
- package/lib/module/handlers/gestures/gestureComposition.js.map +1 -1
- package/lib/module/handlers/gestures/gestureObjects.js +3 -3
- package/lib/module/handlers/gestures/gestureObjects.js.map +1 -1
- package/lib/module/handlers/gestures/hoverGesture.js.map +1 -1
- package/lib/module/handlers/gestures/longPressGesture.js.map +1 -1
- package/lib/module/handlers/gestures/nativeGesture.js.map +1 -1
- package/lib/module/handlers/gestures/panGesture.js.map +1 -1
- package/lib/module/handlers/gestures/pinchGesture.js.map +1 -1
- package/lib/module/handlers/gestures/reanimatedWrapper.js.map +1 -1
- package/lib/module/handlers/gestures/rotationGesture.js.map +1 -1
- package/lib/module/handlers/gestures/tapGesture.js.map +1 -1
- package/lib/module/handlers/handlersRegistry.js.map +1 -1
- package/lib/module/handlers/utils.js +4 -4
- package/lib/module/handlers/utils.js.map +1 -1
- package/lib/module/index.js +15 -16
- package/lib/module/index.js.map +1 -1
- package/lib/module/jestUtils/index.js +1 -1
- package/lib/module/jestUtils/index.js.map +1 -1
- package/lib/module/jestUtils/jestUtils.js +0 -1
- package/lib/module/jestUtils/jestUtils.js.map +1 -1
- package/lib/module/mocks/GestureButtons.js +8 -5
- package/lib/module/mocks/GestureButtons.js.map +1 -1
- package/lib/module/mocks/Touchables.js +4 -0
- package/lib/module/mocks/Touchables.js.map +1 -0
- package/lib/module/mocks/gestureComponents.js +1 -12
- package/lib/module/mocks/gestureComponents.js.map +1 -1
- package/lib/module/specs/NativeRNGestureHandlerModule.js.map +1 -1
- package/lib/module/specs/RNGestureHandlerButtonNativeComponent.ts +49 -6
- package/lib/module/specs/RNGestureHandlerDetectorNativeComponent.ts +23 -11
- package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.ts +2 -2
- package/lib/module/useIsScreenReaderEnabled.js +26 -0
- package/lib/module/useIsScreenReaderEnabled.js.map +1 -0
- package/lib/module/v3/NativeProxy.js.map +1 -1
- package/lib/module/v3/NativeProxy.web.js.map +1 -1
- package/lib/module/v3/components/GestureButtons.js +41 -25
- package/lib/module/v3/components/GestureButtons.js.map +1 -1
- package/lib/module/v3/components/GestureComponents.js +3 -3
- package/lib/module/v3/components/GestureComponents.js.map +1 -1
- package/lib/module/v3/components/GestureComponents.web.js +3 -4
- package/lib/module/v3/components/GestureComponents.web.js.map +1 -1
- package/lib/module/v3/components/Pressable.js +15 -15
- package/lib/module/v3/components/Pressable.js.map +1 -1
- package/lib/module/v3/components/Touchable/Touchable.js +94 -0
- package/lib/module/v3/components/Touchable/Touchable.js.map +1 -0
- package/lib/module/v3/components/Touchable/TouchableProps.js +4 -0
- package/lib/module/v3/components/Touchable/TouchableProps.js.map +1 -0
- package/lib/module/v3/components/index.js +3 -2
- package/lib/module/v3/components/index.js.map +1 -1
- package/lib/module/v3/createNativeWrapper.js +3 -3
- package/lib/module/v3/createNativeWrapper.js.map +1 -1
- package/lib/module/v3/detectors/GestureDetector.js +1 -1
- package/lib/module/v3/detectors/GestureDetector.js.map +1 -1
- package/lib/module/v3/detectors/HostGestureDetector.web.js +12 -10
- package/lib/module/v3/detectors/HostGestureDetector.web.js.map +1 -1
- package/lib/module/v3/detectors/NativeDetector.js +3 -3
- package/lib/module/v3/detectors/NativeDetector.js.map +1 -1
- package/lib/module/v3/detectors/ReanimatedNativeDetector.js +1 -1
- package/lib/module/v3/detectors/ReanimatedNativeDetector.js.map +1 -1
- package/lib/module/v3/detectors/VirtualDetector/InterceptingGestureDetector.js +15 -9
- package/lib/module/v3/detectors/VirtualDetector/InterceptingGestureDetector.js.map +1 -1
- package/lib/module/v3/detectors/VirtualDetector/VirtualDetector.js +8 -5
- package/lib/module/v3/detectors/VirtualDetector/VirtualDetector.js.map +1 -1
- package/lib/module/v3/detectors/VirtualDetector/useInterceptingDetectorContext.js.map +1 -1
- package/lib/module/v3/detectors/common.js +0 -3
- package/lib/module/v3/detectors/common.js.map +1 -1
- package/lib/module/v3/detectors/index.js +1 -1
- package/lib/module/v3/detectors/index.js.map +1 -1
- package/lib/module/v3/detectors/useEnsureGestureHandlerRootView.js.map +1 -1
- package/lib/module/v3/detectors/utils.js.map +1 -1
- package/lib/module/v3/gestureStateManager.js +0 -5
- package/lib/module/v3/gestureStateManager.js.map +1 -1
- package/lib/module/v3/gestureStateManager.web.js +0 -14
- package/lib/module/v3/gestureStateManager.web.js.map +1 -1
- package/lib/module/v3/hooks/callbacks/eventHandler.js +23 -19
- package/lib/module/v3/hooks/callbacks/eventHandler.js.map +1 -1
- package/lib/module/v3/hooks/callbacks/useGestureEventHandler.js +2 -2
- package/lib/module/v3/hooks/callbacks/useGestureEventHandler.js.map +1 -1
- package/lib/module/v3/hooks/callbacks/useReanimatedEventHandler.js +2 -2
- package/lib/module/v3/hooks/callbacks/useReanimatedEventHandler.js.map +1 -1
- package/lib/module/v3/hooks/composition/index.js +2 -2
- package/lib/module/v3/hooks/composition/index.js.map +1 -1
- package/lib/module/v3/hooks/composition/useCompetingGestures.js.map +1 -1
- package/lib/module/v3/hooks/composition/useComposedGesture.js +1 -1
- package/lib/module/v3/hooks/composition/useComposedGesture.js.map +1 -1
- package/lib/module/v3/hooks/composition/useExclusiveGestures.js.map +1 -1
- package/lib/module/v3/hooks/composition/useSimultaneousGestures.js.map +1 -1
- package/lib/module/v3/hooks/gestures/fling/{FlingProperties.js → FlingTypes.js} +1 -1
- package/lib/module/v3/hooks/gestures/fling/FlingTypes.js.map +1 -0
- package/lib/module/v3/hooks/gestures/fling/useFlingGesture.js.map +1 -1
- package/lib/module/v3/hooks/gestures/hover/{HoverProperties.js → HoverTypes.js} +1 -1
- package/lib/module/v3/hooks/gestures/hover/{HoverProperties.js.map → HoverTypes.js.map} +1 -1
- package/lib/module/v3/hooks/gestures/hover/useHoverGesture.js +8 -1
- package/lib/module/v3/hooks/gestures/hover/useHoverGesture.js.map +1 -1
- package/lib/module/v3/hooks/gestures/index.js +4 -0
- package/lib/module/v3/hooks/gestures/index.js.map +1 -1
- package/lib/module/v3/hooks/gestures/longPress/{LongPressProperties.js → LongPressTypes.js} +1 -1
- package/lib/module/v3/hooks/gestures/longPress/LongPressTypes.js.map +1 -0
- package/lib/module/v3/hooks/gestures/longPress/useLongPressGesture.js.map +1 -1
- package/lib/module/v3/hooks/gestures/manual/ManualTypes.js +4 -0
- package/lib/module/v3/hooks/gestures/manual/ManualTypes.js.map +1 -0
- package/lib/module/v3/hooks/gestures/manual/useManualGesture.js.map +1 -1
- package/lib/module/v3/hooks/gestures/native/{NativeProperties.js → NativeTypes.js} +1 -1
- package/lib/module/v3/hooks/gestures/native/NativeTypes.js.map +1 -0
- package/lib/module/v3/hooks/gestures/native/useNativeGesture.js.map +1 -1
- package/lib/module/v3/hooks/gestures/pan/{PanProperties.js → PanTypes.js} +1 -1
- package/lib/module/v3/hooks/gestures/pan/PanTypes.js.map +1 -0
- package/lib/module/v3/hooks/gestures/pan/usePanGesture.js +7 -0
- package/lib/module/v3/hooks/gestures/pan/usePanGesture.js.map +1 -1
- package/lib/module/v3/hooks/gestures/pinch/PinchTypes.js +4 -0
- package/lib/module/v3/hooks/gestures/pinch/PinchTypes.js.map +1 -0
- package/lib/module/v3/hooks/gestures/pinch/usePinchGesture.js +7 -2
- package/lib/module/v3/hooks/gestures/pinch/usePinchGesture.js.map +1 -1
- package/lib/module/v3/hooks/gestures/rotation/RotationTypes.js +4 -0
- package/lib/module/v3/hooks/gestures/rotation/RotationTypes.js.map +1 -0
- package/lib/module/v3/hooks/gestures/rotation/useRotationGesture.js +7 -1
- package/lib/module/v3/hooks/gestures/rotation/useRotationGesture.js.map +1 -1
- package/lib/module/v3/hooks/gestures/tap/{TapProperties.js → TapTypes.js} +1 -1
- package/lib/module/v3/hooks/gestures/tap/TapTypes.js.map +1 -0
- package/lib/module/v3/hooks/gestures/tap/useTapGesture.js.map +1 -1
- package/lib/module/v3/hooks/useGesture.js +10 -4
- package/lib/module/v3/hooks/useGesture.js.map +1 -1
- package/lib/module/v3/hooks/useGestureCallbacks.js +4 -4
- package/lib/module/v3/hooks/useGestureCallbacks.js.map +1 -1
- package/lib/module/v3/hooks/utils/configUtils.js +2 -2
- package/lib/module/v3/hooks/utils/configUtils.js.map +1 -1
- package/lib/module/v3/hooks/utils/eventHandlersUtils.js +3 -7
- package/lib/module/v3/hooks/utils/eventHandlersUtils.js.map +1 -1
- package/lib/module/v3/hooks/utils/eventUtils.js +10 -0
- package/lib/module/v3/hooks/utils/eventUtils.js.map +1 -1
- package/lib/module/v3/hooks/utils/index.js +5 -5
- package/lib/module/v3/hooks/utils/index.js.map +1 -1
- package/lib/module/v3/hooks/utils/propsWhiteList.js +9 -7
- package/lib/module/v3/hooks/utils/propsWhiteList.js.map +1 -1
- package/lib/module/v3/hooks/utils/reanimatedUtils.js +1 -1
- package/lib/module/v3/hooks/utils/reanimatedUtils.js.map +1 -1
- package/lib/module/v3/index.js +3 -3
- package/lib/module/v3/index.js.map +1 -1
- package/lib/module/v3/types/GestureTypes.js.map +1 -1
- package/lib/module/v3/types/index.js +1 -1
- package/lib/module/v3/types/index.js.map +1 -1
- package/lib/module/web/Gestures.js +6 -6
- package/lib/module/web/Gestures.js.map +1 -1
- package/lib/module/web/detectors/RotationGestureDetector.js +4 -7
- package/lib/module/web/detectors/RotationGestureDetector.js.map +1 -1
- package/lib/module/web/detectors/ScaleGestureDetector.js +1 -1
- package/lib/module/web/detectors/ScaleGestureDetector.js.map +1 -1
- package/lib/module/web/handlers/FlingGestureHandler.js +3 -3
- package/lib/module/web/handlers/FlingGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/GestureHandler.js +35 -58
- package/lib/module/web/handlers/GestureHandler.js.map +1 -1
- package/lib/module/web/handlers/HoverGestureHandler.js +1 -1
- package/lib/module/web/handlers/HoverGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/LongPressGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/NativeViewGestureHandler.js +1 -1
- package/lib/module/web/handlers/NativeViewGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/PanGestureHandler.js +1 -1
- package/lib/module/web/handlers/PanGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/PinchGestureHandler.js +7 -8
- package/lib/module/web/handlers/PinchGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/RotationGestureHandler.js +26 -32
- package/lib/module/web/handlers/RotationGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/TapGestureHandler.js.map +1 -1
- package/lib/module/web/tools/GestureHandlerOrchestrator.js.map +1 -1
- package/lib/module/web/tools/GestureHandlerWebDelegate.js +62 -17
- package/lib/module/web/tools/GestureHandlerWebDelegate.js.map +1 -1
- package/lib/module/web/tools/InteractionManager.js.map +1 -1
- package/lib/module/web/tools/KeyboardEventManager.js +1 -1
- package/lib/module/web/tools/KeyboardEventManager.js.map +1 -1
- package/lib/module/web/tools/PointerEventManager.js +7 -7
- package/lib/module/web/tools/PointerEventManager.js.map +1 -1
- package/lib/module/web/tools/WheelEventManager.js +2 -2
- package/lib/module/web/tools/WheelEventManager.js.map +1 -1
- package/lib/module/web/utils.js +22 -1
- package/lib/module/web/utils.js.map +1 -1
- package/lib/typescript/RNGestureHandlerModule.web.d.ts +1 -1
- package/lib/typescript/RNGestureHandlerModule.web.d.ts.map +1 -1
- package/lib/typescript/RNGestureHandlerModule.windows.d.ts +8 -8
- package/lib/typescript/RNGestureHandlerModule.windows.d.ts.map +1 -1
- package/lib/typescript/components/GestureButtons.d.ts +16 -5
- package/lib/typescript/components/GestureButtons.d.ts.map +1 -1
- package/lib/typescript/components/GestureButtonsProps.d.ts +21 -21
- package/lib/typescript/components/GestureButtonsProps.d.ts.map +1 -1
- package/lib/typescript/components/GestureComponents.d.ts +44 -14
- package/lib/typescript/components/GestureComponents.d.ts.map +1 -1
- package/lib/typescript/components/GestureComponents.web.d.ts +26 -6
- package/lib/typescript/components/GestureComponents.web.d.ts.map +1 -1
- package/lib/typescript/components/GestureHandlerButton.d.ts +114 -2
- package/lib/typescript/components/GestureHandlerButton.d.ts.map +1 -1
- package/lib/typescript/components/GestureHandlerButton.web.d.ts +16 -2
- package/lib/typescript/components/GestureHandlerButton.web.d.ts.map +1 -1
- package/lib/typescript/components/GestureHandlerRootView.android.d.ts +1 -1
- package/lib/typescript/components/GestureHandlerRootView.android.d.ts.map +1 -1
- package/lib/typescript/components/GestureHandlerRootView.d.ts +1 -1
- package/lib/typescript/components/GestureHandlerRootView.d.ts.map +1 -1
- package/lib/typescript/components/GestureHandlerRootView.web.d.ts +2 -2
- package/lib/typescript/components/GestureHandlerRootView.web.d.ts.map +1 -1
- package/lib/typescript/components/Pressable/Pressable.d.ts +6 -3
- package/lib/typescript/components/Pressable/Pressable.d.ts.map +1 -1
- package/lib/typescript/components/Pressable/PressableProps.d.ts +8 -8
- package/lib/typescript/components/Pressable/PressableProps.d.ts.map +1 -1
- package/lib/typescript/components/Pressable/StateMachine.d.ts +1 -1
- package/lib/typescript/components/Pressable/StateMachine.d.ts.map +1 -1
- package/lib/typescript/components/Pressable/index.d.ts +1 -1
- package/lib/typescript/components/Pressable/index.d.ts.map +1 -1
- package/lib/typescript/components/Pressable/stateDefinitions.d.ts +3 -3
- package/lib/typescript/components/Pressable/stateDefinitions.d.ts.map +1 -1
- package/lib/typescript/components/Pressable/utils.d.ts +8 -7
- package/lib/typescript/components/Pressable/utils.d.ts.map +1 -1
- package/lib/typescript/components/ReanimatedDrawerLayout.d.ts +9 -5
- package/lib/typescript/components/ReanimatedDrawerLayout.d.ts.map +1 -1
- package/lib/typescript/components/ReanimatedSwipeable/ReanimatedSwipeable.d.ts +2 -2
- package/lib/typescript/components/ReanimatedSwipeable/ReanimatedSwipeable.d.ts.map +1 -1
- package/lib/typescript/components/ReanimatedSwipeable/ReanimatedSwipeableProps.d.ts +9 -11
- package/lib/typescript/components/ReanimatedSwipeable/ReanimatedSwipeableProps.d.ts.map +1 -1
- package/lib/typescript/components/ReanimatedSwipeable/index.d.ts +1 -1
- package/lib/typescript/components/ReanimatedSwipeable/index.d.ts.map +1 -1
- package/lib/typescript/components/Text.d.ts +15 -3
- package/lib/typescript/components/Text.d.ts.map +1 -1
- package/lib/typescript/components/touchables/ExtraButtonProps.d.ts +5 -5
- package/lib/typescript/components/touchables/ExtraButtonProps.d.ts.map +1 -1
- package/lib/typescript/components/touchables/GenericTouchable.d.ts +2 -2
- package/lib/typescript/components/touchables/GenericTouchable.d.ts.map +1 -1
- package/lib/typescript/components/touchables/GenericTouchableProps.d.ts +2 -2
- package/lib/typescript/components/touchables/GenericTouchableProps.d.ts.map +1 -1
- package/lib/typescript/components/touchables/TouchableHighlight.d.ts +3 -3
- package/lib/typescript/components/touchables/TouchableHighlight.d.ts.map +1 -1
- package/lib/typescript/components/touchables/TouchableNativeFeedback.android.d.ts +2 -2
- package/lib/typescript/components/touchables/TouchableNativeFeedback.android.d.ts.map +1 -1
- package/lib/typescript/components/touchables/TouchableNativeFeedbackProps.d.ts +1 -1
- package/lib/typescript/components/touchables/TouchableNativeFeedbackProps.d.ts.map +1 -1
- package/lib/typescript/components/touchables/TouchableOpacity.d.ts +3 -2
- package/lib/typescript/components/touchables/TouchableOpacity.d.ts.map +1 -1
- package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts +4 -3
- package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts.map +1 -1
- package/lib/typescript/components/touchables/index.d.ts +3 -3
- package/lib/typescript/components/touchables/index.d.ts.map +1 -1
- package/lib/typescript/components/utils.d.ts +1 -1
- package/lib/typescript/components/utils.d.ts.map +1 -1
- package/lib/typescript/findNodeHandle.web.d.ts.map +1 -1
- package/lib/typescript/handlers/FlingGestureHandler.d.ts +1 -1
- package/lib/typescript/handlers/FlingGestureHandler.d.ts.map +1 -1
- package/lib/typescript/handlers/ForceTouchGestureHandler.d.ts +3 -2
- package/lib/typescript/handlers/ForceTouchGestureHandler.d.ts.map +1 -1
- package/lib/typescript/handlers/GestureHandlerEventPayload.d.ts +3 -3
- package/lib/typescript/handlers/GestureHandlerEventPayload.d.ts.map +1 -1
- package/lib/typescript/handlers/LongPressGestureHandler.d.ts +2 -2
- package/lib/typescript/handlers/LongPressGestureHandler.d.ts.map +1 -1
- package/lib/typescript/handlers/NativeViewGestureHandler.d.ts +3 -3
- package/lib/typescript/handlers/NativeViewGestureHandler.d.ts.map +1 -1
- package/lib/typescript/handlers/PanGestureHandler.d.ts +1 -1
- package/lib/typescript/handlers/PanGestureHandler.d.ts.map +1 -1
- package/lib/typescript/handlers/PinchGestureHandler.d.ts +2 -2
- package/lib/typescript/handlers/PinchGestureHandler.d.ts.map +1 -1
- package/lib/typescript/handlers/RotationGestureHandler.d.ts +2 -2
- package/lib/typescript/handlers/RotationGestureHandler.d.ts.map +1 -1
- package/lib/typescript/handlers/TapGestureHandler.d.ts +1 -1
- package/lib/typescript/handlers/TapGestureHandler.d.ts.map +1 -1
- package/lib/typescript/handlers/createHandler.d.ts +1 -1
- package/lib/typescript/handlers/createHandler.d.ts.map +1 -1
- package/lib/typescript/handlers/createNativeWrapper.d.ts +10 -2
- package/lib/typescript/handlers/createNativeWrapper.d.ts.map +1 -1
- package/lib/typescript/handlers/gestureHandlerCommon.d.ts +27 -27
- package/lib/typescript/handlers/gestureHandlerCommon.d.ts.map +1 -1
- package/lib/typescript/handlers/gestureHandlerTypesCompat.d.ts +3 -3
- package/lib/typescript/handlers/gestureHandlerTypesCompat.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/GestureDetector/Wrap.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/GestureDetector/Wrap.web.d.ts +7 -6
- package/lib/typescript/handlers/gestures/GestureDetector/Wrap.web.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/GestureDetector/attachHandlers.d.ts +5 -5
- package/lib/typescript/handlers/gestures/GestureDetector/attachHandlers.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/GestureDetector/dropHandlers.d.ts +1 -1
- package/lib/typescript/handlers/gestures/GestureDetector/dropHandlers.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/GestureDetector/index.d.ts +3 -3
- package/lib/typescript/handlers/gestures/GestureDetector/index.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/GestureDetector/needsToReattach.d.ts +2 -2
- package/lib/typescript/handlers/gestures/GestureDetector/needsToReattach.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/GestureDetector/types.d.ts +2 -2
- package/lib/typescript/handlers/gestures/GestureDetector/types.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/GestureDetector/updateHandlers.d.ts +3 -3
- package/lib/typescript/handlers/gestures/GestureDetector/updateHandlers.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/GestureDetector/useAnimatedGesture.d.ts +1 -1
- package/lib/typescript/handlers/gestures/GestureDetector/useAnimatedGesture.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/GestureDetector/useDetectorUpdater.d.ts +5 -5
- package/lib/typescript/handlers/gestures/GestureDetector/useDetectorUpdater.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/GestureDetector/useMountReactions.d.ts +1 -1
- package/lib/typescript/handlers/gestures/GestureDetector/useMountReactions.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/GestureDetector/useViewRefHandler.d.ts +2 -2
- package/lib/typescript/handlers/gestures/GestureDetector/useViewRefHandler.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/GestureDetector/utils.d.ts +2 -2
- package/lib/typescript/handlers/gestures/GestureDetector/utils.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/eventReceiver.d.ts +1 -1
- package/lib/typescript/handlers/gestures/eventReceiver.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/flingGesture.d.ts +3 -2
- package/lib/typescript/handlers/gestures/flingGesture.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/forceTouchGesture.d.ts +4 -3
- package/lib/typescript/handlers/gestures/forceTouchGesture.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/gesture.d.ts +3 -3
- package/lib/typescript/handlers/gestures/gesture.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/gestureComposition.d.ts +2 -1
- package/lib/typescript/handlers/gestures/gestureComposition.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/gestureObjects.d.ts +4 -4
- package/lib/typescript/handlers/gestures/gestureObjects.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/gestureStateManager.web.d.ts +1 -1
- package/lib/typescript/handlers/gestures/gestureStateManager.web.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/hoverGesture.d.ts +3 -2
- package/lib/typescript/handlers/gestures/hoverGesture.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/longPressGesture.d.ts +3 -2
- package/lib/typescript/handlers/gestures/longPressGesture.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/manualGesture.d.ts +1 -1
- package/lib/typescript/handlers/gestures/manualGesture.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/nativeGesture.d.ts +3 -2
- package/lib/typescript/handlers/gestures/nativeGesture.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/panGesture.d.ts +4 -3
- package/lib/typescript/handlers/gestures/panGesture.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/pinchGesture.d.ts +2 -2
- package/lib/typescript/handlers/gestures/pinchGesture.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/reanimatedWrapper.d.ts +3 -3
- package/lib/typescript/handlers/gestures/reanimatedWrapper.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/rotationGesture.d.ts +2 -2
- package/lib/typescript/handlers/gestures/rotationGesture.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/tapGesture.d.ts +3 -2
- package/lib/typescript/handlers/gestures/tapGesture.d.ts.map +1 -1
- package/lib/typescript/handlers/handlersRegistry.d.ts +6 -6
- package/lib/typescript/handlers/handlersRegistry.d.ts.map +1 -1
- package/lib/typescript/handlers/utils.d.ts +1 -1
- package/lib/typescript/handlers/utils.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +41 -42
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/jestUtils/index.d.ts +1 -1
- package/lib/typescript/jestUtils/jestUtils.d.ts +22 -21
- package/lib/typescript/jestUtils/jestUtils.d.ts.map +1 -1
- package/lib/typescript/mocks/GestureButtons.d.ts +5 -5
- package/lib/typescript/mocks/GestureButtons.d.ts.map +1 -1
- package/lib/typescript/mocks/Touchables.d.ts +2 -0
- package/lib/typescript/mocks/Touchables.d.ts.map +1 -0
- package/lib/typescript/mocks/gestureComponents.d.ts +1 -13
- package/lib/typescript/mocks/gestureComponents.d.ts.map +1 -1
- package/lib/typescript/mountRegistry.d.ts +1 -1
- package/lib/typescript/mountRegistry.d.ts.map +1 -1
- package/lib/typescript/specs/NativeRNGestureHandlerModule.d.ts +2 -2
- package/lib/typescript/specs/NativeRNGestureHandlerModule.d.ts.map +1 -1
- package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.d.ts +36 -3
- package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.d.ts.map +1 -1
- package/lib/typescript/specs/RNGestureHandlerDetectorNativeComponent.d.ts +8 -8
- package/lib/typescript/specs/RNGestureHandlerDetectorNativeComponent.d.ts.map +1 -1
- package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts +1 -1
- package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/useIsScreenReaderEnabled.d.ts +2 -0
- package/lib/typescript/useIsScreenReaderEnabled.d.ts.map +1 -0
- package/lib/typescript/useIsomorphicLayoutEffect.d.ts +1 -1
- package/lib/typescript/useIsomorphicLayoutEffect.d.ts.map +1 -1
- package/lib/typescript/v3/NativeProxy.d.ts +3 -3
- package/lib/typescript/v3/NativeProxy.d.ts.map +1 -1
- package/lib/typescript/v3/NativeProxy.web.d.ts +3 -3
- package/lib/typescript/v3/NativeProxy.web.d.ts.map +1 -1
- package/lib/typescript/v3/components/GestureButtons.d.ts +20 -11
- package/lib/typescript/v3/components/GestureButtons.d.ts.map +1 -1
- package/lib/typescript/v3/components/GestureButtonsProps.d.ts +25 -85
- package/lib/typescript/v3/components/GestureButtonsProps.d.ts.map +1 -1
- package/lib/typescript/v3/components/GestureComponents.d.ts +24 -38
- package/lib/typescript/v3/components/GestureComponents.d.ts.map +1 -1
- package/lib/typescript/v3/components/GestureComponents.web.d.ts +22 -34
- package/lib/typescript/v3/components/GestureComponents.web.d.ts.map +1 -1
- package/lib/typescript/v3/components/Pressable.d.ts +1 -1
- package/lib/typescript/v3/components/Pressable.d.ts.map +1 -1
- package/lib/typescript/v3/components/Touchable/Touchable.d.ts +4 -0
- package/lib/typescript/v3/components/Touchable/Touchable.d.ts.map +1 -0
- package/lib/typescript/v3/components/Touchable/TouchableProps.d.ts +31 -0
- package/lib/typescript/v3/components/Touchable/TouchableProps.d.ts.map +1 -0
- package/lib/typescript/v3/components/index.d.ts +5 -3
- package/lib/typescript/v3/components/index.d.ts.map +1 -1
- package/lib/typescript/v3/createNativeWrapper.d.ts +3 -7
- package/lib/typescript/v3/createNativeWrapper.d.ts.map +1 -1
- package/lib/typescript/v3/detectors/GestureDetector.d.ts +3 -3
- package/lib/typescript/v3/detectors/GestureDetector.d.ts.map +1 -1
- package/lib/typescript/v3/detectors/HostGestureDetector.web.d.ts +10 -6
- package/lib/typescript/v3/detectors/HostGestureDetector.web.d.ts.map +1 -1
- package/lib/typescript/v3/detectors/NativeDetector.d.ts +2 -2
- package/lib/typescript/v3/detectors/NativeDetector.d.ts.map +1 -1
- package/lib/typescript/v3/detectors/ReanimatedNativeDetector.d.ts.map +1 -1
- package/lib/typescript/v3/detectors/VirtualDetector/InterceptingGestureDetector.d.ts +2 -2
- package/lib/typescript/v3/detectors/VirtualDetector/InterceptingGestureDetector.d.ts.map +1 -1
- package/lib/typescript/v3/detectors/VirtualDetector/VirtualDetector.d.ts +2 -2
- package/lib/typescript/v3/detectors/VirtualDetector/VirtualDetector.d.ts.map +1 -1
- package/lib/typescript/v3/detectors/VirtualDetector/useInterceptingDetectorContext.d.ts +1 -1
- package/lib/typescript/v3/detectors/VirtualDetector/useInterceptingDetectorContext.d.ts.map +1 -1
- package/lib/typescript/v3/detectors/common.d.ts +14 -15
- package/lib/typescript/v3/detectors/common.d.ts.map +1 -1
- package/lib/typescript/v3/detectors/index.d.ts +1 -1
- package/lib/typescript/v3/detectors/index.d.ts.map +1 -1
- package/lib/typescript/v3/detectors/useEnsureGestureHandlerRootView.d.ts.map +1 -1
- package/lib/typescript/v3/detectors/utils.d.ts +2 -2
- package/lib/typescript/v3/detectors/utils.d.ts.map +1 -1
- package/lib/typescript/v3/gestureStateManager.d.ts +0 -1
- package/lib/typescript/v3/gestureStateManager.d.ts.map +1 -1
- package/lib/typescript/v3/gestureStateManager.web.d.ts +1 -1
- package/lib/typescript/v3/gestureStateManager.web.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/callbacks/eventHandler.d.ts +6 -6
- package/lib/typescript/v3/hooks/callbacks/eventHandler.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/callbacks/useGestureEventHandler.d.ts +2 -2
- package/lib/typescript/v3/hooks/callbacks/useGestureEventHandler.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/callbacks/useReanimatedEventHandler.d.ts +3 -3
- package/lib/typescript/v3/hooks/callbacks/useReanimatedEventHandler.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/composition/index.d.ts +2 -2
- package/lib/typescript/v3/hooks/composition/index.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/composition/useCompetingGestures.d.ts +1 -1
- package/lib/typescript/v3/hooks/composition/useCompetingGestures.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/composition/useComposedGesture.d.ts +1 -1
- package/lib/typescript/v3/hooks/composition/useComposedGesture.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/composition/useExclusiveGestures.d.ts +1 -1
- package/lib/typescript/v3/hooks/composition/useExclusiveGestures.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/composition/useSimultaneousGestures.d.ts +1 -1
- package/lib/typescript/v3/hooks/composition/useSimultaneousGestures.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/gestures/fling/FlingTypes.d.ts +36 -0
- package/lib/typescript/v3/hooks/gestures/fling/FlingTypes.d.ts.map +1 -0
- package/lib/typescript/v3/hooks/gestures/fling/useFlingGesture.d.ts +1 -14
- package/lib/typescript/v3/hooks/gestures/fling/useFlingGesture.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/gestures/hover/HoverTypes.d.ts +38 -0
- package/lib/typescript/v3/hooks/gestures/hover/HoverTypes.d.ts.map +1 -0
- package/lib/typescript/v3/hooks/gestures/hover/useHoverGesture.d.ts +1 -19
- package/lib/typescript/v3/hooks/gestures/hover/useHoverGesture.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/gestures/index.d.ts +19 -28
- package/lib/typescript/v3/hooks/gestures/index.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/gestures/longPress/{LongPressProperties.d.ts → LongPressTypes.d.ts} +16 -1
- package/lib/typescript/v3/hooks/gestures/longPress/LongPressTypes.d.ts.map +1 -0
- package/lib/typescript/v3/hooks/gestures/longPress/useLongPressGesture.d.ts +1 -14
- package/lib/typescript/v3/hooks/gestures/longPress/useLongPressGesture.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/gestures/manual/ManualTypes.d.ts +10 -0
- package/lib/typescript/v3/hooks/gestures/manual/ManualTypes.d.ts.map +1 -0
- package/lib/typescript/v3/hooks/gestures/manual/useManualGesture.d.ts +1 -9
- package/lib/typescript/v3/hooks/gestures/manual/useManualGesture.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/gestures/native/NativeTypes.d.ts +26 -0
- package/lib/typescript/v3/hooks/gestures/native/NativeTypes.d.ts.map +1 -0
- package/lib/typescript/v3/hooks/gestures/native/useNativeGesture.d.ts +2 -12
- package/lib/typescript/v3/hooks/gestures/native/useNativeGesture.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/gestures/pan/{PanProperties.d.ts → PanTypes.d.ts} +25 -1
- package/lib/typescript/v3/hooks/gestures/pan/PanTypes.d.ts.map +1 -0
- package/lib/typescript/v3/hooks/gestures/pan/usePanGesture.d.ts +1 -21
- package/lib/typescript/v3/hooks/gestures/pan/usePanGesture.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/gestures/pinch/PinchTypes.d.ts +17 -0
- package/lib/typescript/v3/hooks/gestures/pinch/PinchTypes.d.ts.map +1 -0
- package/lib/typescript/v3/hooks/gestures/pinch/usePinchGesture.d.ts +1 -15
- package/lib/typescript/v3/hooks/gestures/pinch/usePinchGesture.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/gestures/rotation/RotationTypes.d.ts +17 -0
- package/lib/typescript/v3/hooks/gestures/rotation/RotationTypes.d.ts.map +1 -0
- package/lib/typescript/v3/hooks/gestures/rotation/useRotationGesture.d.ts +1 -15
- package/lib/typescript/v3/hooks/gestures/rotation/useRotationGesture.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/gestures/tap/{TapProperties.d.ts → TapTypes.d.ts} +14 -1
- package/lib/typescript/v3/hooks/gestures/tap/TapTypes.d.ts.map +1 -0
- package/lib/typescript/v3/hooks/gestures/tap/useTapGesture.d.ts +1 -14
- package/lib/typescript/v3/hooks/gestures/tap/useTapGesture.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/useGesture.d.ts +2 -2
- package/lib/typescript/v3/hooks/useGesture.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/useGestureCallbacks.d.ts +4 -4
- package/lib/typescript/v3/hooks/useGestureCallbacks.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/utils/configUtils.d.ts +4 -4
- package/lib/typescript/v3/hooks/utils/configUtils.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/utils/eventHandlersUtils.d.ts +4 -4
- package/lib/typescript/v3/hooks/utils/eventHandlersUtils.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/utils/eventUtils.d.ts +8 -6
- package/lib/typescript/v3/hooks/utils/eventUtils.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/utils/index.d.ts +5 -5
- package/lib/typescript/v3/hooks/utils/index.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/utils/propsWhiteList.d.ts +6 -5
- package/lib/typescript/v3/hooks/utils/propsWhiteList.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/utils/reanimatedUtils.d.ts +4 -4
- package/lib/typescript/v3/hooks/utils/reanimatedUtils.d.ts.map +1 -1
- package/lib/typescript/v3/hooks/utils/relationUtils.d.ts +2 -2
- package/lib/typescript/v3/hooks/utils/relationUtils.d.ts.map +1 -1
- package/lib/typescript/v3/index.d.ts +6 -6
- package/lib/typescript/v3/index.d.ts.map +1 -1
- package/lib/typescript/v3/types/ConfigTypes.d.ts +35 -34
- package/lib/typescript/v3/types/ConfigTypes.d.ts.map +1 -1
- package/lib/typescript/v3/types/DetectorTypes.d.ts +10 -6
- package/lib/typescript/v3/types/DetectorTypes.d.ts.map +1 -1
- package/lib/typescript/v3/types/EventTypes.d.ts +11 -8
- package/lib/typescript/v3/types/EventTypes.d.ts.map +1 -1
- package/lib/typescript/v3/types/GestureTypes.d.ts +16 -16
- package/lib/typescript/v3/types/GestureTypes.d.ts.map +1 -1
- package/lib/typescript/v3/types/NativeWrapperType.d.ts +7 -4
- package/lib/typescript/v3/types/NativeWrapperType.d.ts.map +1 -1
- package/lib/typescript/v3/types/ReanimatedTypes.d.ts +1 -1
- package/lib/typescript/v3/types/ReanimatedTypes.d.ts.map +1 -1
- package/lib/typescript/v3/types/UtilityTypes.d.ts +7 -7
- package/lib/typescript/v3/types/UtilityTypes.d.ts.map +1 -1
- package/lib/typescript/v3/types/index.d.ts +6 -6
- package/lib/typescript/v3/types/index.d.ts.map +1 -1
- package/lib/typescript/web/Gestures.d.ts +6 -6
- package/lib/typescript/web/Gestures.d.ts.map +1 -1
- package/lib/typescript/web/detectors/RotationGestureDetector.d.ts +2 -2
- package/lib/typescript/web/detectors/RotationGestureDetector.d.ts.map +1 -1
- package/lib/typescript/web/detectors/ScaleGestureDetector.d.ts +2 -2
- package/lib/typescript/web/detectors/ScaleGestureDetector.d.ts.map +1 -1
- package/lib/typescript/web/handlers/FlingGestureHandler.d.ts +3 -3
- package/lib/typescript/web/handlers/FlingGestureHandler.d.ts.map +1 -1
- package/lib/typescript/web/handlers/GestureHandler.d.ts +9 -8
- package/lib/typescript/web/handlers/GestureHandler.d.ts.map +1 -1
- package/lib/typescript/web/handlers/HoverGestureHandler.d.ts +3 -3
- package/lib/typescript/web/handlers/HoverGestureHandler.d.ts.map +1 -1
- package/lib/typescript/web/handlers/IGestureHandler.d.ts +6 -6
- package/lib/typescript/web/handlers/IGestureHandler.d.ts.map +1 -1
- package/lib/typescript/web/handlers/LongPressGestureHandler.d.ts +4 -4
- package/lib/typescript/web/handlers/LongPressGestureHandler.d.ts.map +1 -1
- package/lib/typescript/web/handlers/ManualGestureHandler.d.ts +3 -3
- package/lib/typescript/web/handlers/ManualGestureHandler.d.ts.map +1 -1
- package/lib/typescript/web/handlers/NativeViewGestureHandler.d.ts +6 -6
- package/lib/typescript/web/handlers/NativeViewGestureHandler.d.ts.map +1 -1
- package/lib/typescript/web/handlers/PanGestureHandler.d.ts +4 -4
- package/lib/typescript/web/handlers/PanGestureHandler.d.ts.map +1 -1
- package/lib/typescript/web/handlers/PinchGestureHandler.d.ts +4 -4
- package/lib/typescript/web/handlers/PinchGestureHandler.d.ts.map +1 -1
- package/lib/typescript/web/handlers/RotationGestureHandler.d.ts +5 -6
- package/lib/typescript/web/handlers/RotationGestureHandler.d.ts.map +1 -1
- package/lib/typescript/web/handlers/TapGestureHandler.d.ts +3 -3
- package/lib/typescript/web/handlers/TapGestureHandler.d.ts.map +1 -1
- package/lib/typescript/web/interfaces.d.ts +32 -32
- package/lib/typescript/web/interfaces.d.ts.map +1 -1
- package/lib/typescript/web/tools/EventManager.d.ts +1 -1
- package/lib/typescript/web/tools/EventManager.d.ts.map +1 -1
- package/lib/typescript/web/tools/GestureHandlerDelegate.d.ts +4 -0
- package/lib/typescript/web/tools/GestureHandlerDelegate.d.ts.map +1 -1
- package/lib/typescript/web/tools/GestureHandlerOrchestrator.d.ts.map +1 -1
- package/lib/typescript/web/tools/GestureHandlerWebDelegate.d.ts +6 -1
- package/lib/typescript/web/tools/GestureHandlerWebDelegate.d.ts.map +1 -1
- package/lib/typescript/web/tools/InteractionManager.d.ts +2 -2
- package/lib/typescript/web/tools/InteractionManager.d.ts.map +1 -1
- package/lib/typescript/web/tools/KeyboardEventManager.d.ts +2 -1
- package/lib/typescript/web/tools/KeyboardEventManager.d.ts.map +1 -1
- package/lib/typescript/web/tools/NodeManager.d.ts +3 -3
- package/lib/typescript/web/tools/NodeManager.d.ts.map +1 -1
- package/lib/typescript/web/tools/PointerEventManager.d.ts +2 -1
- package/lib/typescript/web/tools/PointerEventManager.d.ts.map +1 -1
- package/lib/typescript/web/tools/PointerTracker.d.ts +1 -1
- package/lib/typescript/web/tools/PointerTracker.d.ts.map +1 -1
- package/lib/typescript/web/tools/Vector.d.ts +1 -1
- package/lib/typescript/web/tools/Vector.d.ts.map +1 -1
- package/lib/typescript/web/tools/VelocityTracker.d.ts +1 -1
- package/lib/typescript/web/tools/VelocityTracker.d.ts.map +1 -1
- package/lib/typescript/web/tools/WheelEventManager.d.ts +1 -1
- package/lib/typescript/web/tools/WheelEventManager.d.ts.map +1 -1
- package/lib/typescript/web/utils.d.ts +2 -1
- package/lib/typescript/web/utils.d.ts.map +1 -1
- package/package.json +11 -11
- package/react-native.config.js +0 -1
- package/shared/shadowNodes/react/renderer/components/rngesturehandler_codegen/ComponentDescriptors.h +0 -1
- package/shared/shadowNodes/react/renderer/components/rngesturehandler_codegen/RNGestureHandlerDetectorShadowNode.cpp +88 -30
- package/shared/shadowNodes/react/renderer/components/rngesturehandler_codegen/RNGestureHandlerDetectorShadowNode.h +8 -0
- package/src/RNGestureHandlerModule.web.ts +2 -2
- package/src/RNGestureHandlerModule.windows.ts +8 -10
- package/src/components/GestureButtons.tsx +47 -36
- package/src/components/GestureButtonsProps.ts +22 -21
- package/src/components/GestureComponents.tsx +28 -35
- package/src/components/GestureComponents.web.tsx +9 -12
- package/src/components/GestureHandlerButton.tsx +150 -144
- package/src/components/GestureHandlerButton.web.tsx +151 -3
- package/src/components/GestureHandlerRootView.android.tsx +2 -1
- package/src/components/GestureHandlerRootView.tsx +5 -4
- package/src/components/GestureHandlerRootView.web.tsx +6 -4
- package/src/components/Pressable/Pressable.tsx +34 -27
- package/src/components/Pressable/PressableProps.tsx +13 -12
- package/src/components/Pressable/StateMachine.tsx +1 -1
- package/src/components/Pressable/index.ts +1 -1
- package/src/components/Pressable/stateDefinitions.ts +28 -5
- package/src/components/Pressable/utils.ts +16 -12
- package/src/components/ReanimatedDrawerLayout.tsx +415 -426
- package/src/components/ReanimatedSwipeable/ReanimatedSwipeable.tsx +30 -30
- package/src/components/ReanimatedSwipeable/ReanimatedSwipeableProps.ts +10 -13
- package/src/components/ReanimatedSwipeable/index.ts +2 -2
- package/src/components/Text.tsx +51 -52
- package/src/components/touchables/ExtraButtonProps.ts +5 -5
- package/src/components/touchables/GenericTouchable.tsx +17 -20
- package/src/components/touchables/GenericTouchableProps.ts +4 -3
- package/src/components/touchables/TouchableHighlight.tsx +8 -8
- package/src/components/touchables/TouchableNativeFeedback.android.tsx +5 -3
- package/src/components/touchables/TouchableNativeFeedbackProps.tsx +2 -1
- package/src/components/touchables/TouchableOpacity.tsx +5 -9
- package/src/components/touchables/TouchableWithoutFeedback.tsx +17 -24
- package/src/components/touchables/index.ts +3 -3
- package/src/components/utils.ts +1 -1
- package/src/findNodeHandle.web.ts +12 -2
- package/src/handlers/FlingGestureHandler.ts +3 -5
- package/src/handlers/ForceTouchGestureHandler.ts +6 -6
- package/src/handlers/GestureHandlerEventPayload.ts +3 -3
- package/src/handlers/LongPressGestureHandler.ts +3 -5
- package/src/handlers/NativeViewGestureHandler.ts +5 -7
- package/src/handlers/PanGestureHandler.ts +3 -5
- package/src/handlers/PinchGestureHandler.ts +3 -5
- package/src/handlers/RotationGestureHandler.ts +3 -5
- package/src/handlers/TapGestureHandler.ts +3 -5
- package/src/handlers/createHandler.tsx +19 -22
- package/src/handlers/createNativeWrapper.tsx +12 -7
- package/src/handlers/gestureHandlerCommon.ts +31 -29
- package/src/handlers/gestureHandlerTypesCompat.ts +5 -5
- package/src/handlers/gestures/GestureDetector/Wrap.tsx +2 -1
- package/src/handlers/gestures/GestureDetector/Wrap.web.tsx +34 -30
- package/src/handlers/gestures/GestureDetector/attachHandlers.ts +14 -13
- package/src/handlers/gestures/GestureDetector/dropHandlers.ts +3 -3
- package/src/handlers/gestures/GestureDetector/index.tsx +11 -10
- package/src/handlers/gestures/GestureDetector/needsToReattach.ts +2 -2
- package/src/handlers/gestures/GestureDetector/types.ts +2 -2
- package/src/handlers/gestures/GestureDetector/updateHandlers.ts +7 -7
- package/src/handlers/gestures/GestureDetector/useAnimatedGesture.ts +11 -12
- package/src/handlers/gestures/GestureDetector/useDetectorUpdater.ts +9 -8
- package/src/handlers/gestures/GestureDetector/useMountReactions.ts +5 -4
- package/src/handlers/gestures/GestureDetector/useViewRefHandler.ts +5 -4
- package/src/handlers/gestures/GestureDetector/utils.ts +13 -13
- package/src/handlers/gestures/eventReceiver.ts +8 -8
- package/src/handlers/gestures/flingGesture.ts +3 -2
- package/src/handlers/gestures/forceTouchGesture.ts +4 -3
- package/src/handlers/gestures/gesture.ts +9 -9
- package/src/handlers/gestures/gestureComposition.ts +2 -1
- package/src/handlers/gestures/gestureObjects.ts +4 -4
- package/src/handlers/gestures/gestureStateManager.web.ts +1 -1
- package/src/handlers/gestures/hoverGesture.ts +3 -2
- package/src/handlers/gestures/longPressGesture.ts +3 -2
- package/src/handlers/gestures/manualGesture.ts +1 -1
- package/src/handlers/gestures/nativeGesture.ts +3 -2
- package/src/handlers/gestures/panGesture.ts +4 -3
- package/src/handlers/gestures/pinchGesture.ts +2 -2
- package/src/handlers/gestures/reanimatedWrapper.ts +7 -6
- package/src/handlers/gestures/rotationGesture.ts +2 -2
- package/src/handlers/gestures/tapGesture.ts +3 -2
- package/src/handlers/handlersRegistry.ts +13 -6
- package/src/handlers/utils.ts +6 -5
- package/src/index.ts +111 -118
- package/src/jestUtils/index.ts +1 -1
- package/src/jestUtils/jestUtils.ts +45 -50
- package/src/mocks/GestureButtons.tsx +9 -5
- package/src/mocks/Touchables.tsx +6 -0
- package/src/mocks/gestureComponents.tsx +7 -22
- package/src/mountRegistry.ts +1 -1
- package/src/specs/NativeRNGestureHandlerModule.ts +3 -2
- package/src/specs/RNGestureHandlerButtonNativeComponent.ts +49 -6
- package/src/specs/RNGestureHandlerDetectorNativeComponent.ts +23 -11
- package/src/specs/RNGestureHandlerRootViewNativeComponent.ts +2 -2
- package/src/useIsScreenReaderEnabled.ts +31 -0
- package/src/v3/NativeProxy.ts +13 -5
- package/src/v3/NativeProxy.web.ts +13 -5
- package/src/v3/components/GestureButtons.tsx +52 -28
- package/src/v3/components/GestureButtonsProps.ts +38 -110
- package/src/v3/components/GestureComponents.tsx +29 -34
- package/src/v3/components/GestureComponents.web.tsx +7 -10
- package/src/v3/components/Pressable.tsx +33 -29
- package/src/v3/components/Touchable/Touchable.tsx +134 -0
- package/src/v3/components/Touchable/TouchableProps.ts +41 -0
- package/src/v3/components/index.ts +12 -13
- package/src/v3/createNativeWrapper.tsx +14 -16
- package/src/v3/detectors/GestureDetector.tsx +17 -9
- package/src/v3/detectors/HostGestureDetector.web.tsx +32 -22
- package/src/v3/detectors/NativeDetector.tsx +12 -10
- package/src/v3/detectors/ReanimatedNativeDetector.tsx +4 -5
- package/src/v3/detectors/VirtualDetector/InterceptingGestureDetector.tsx +66 -34
- package/src/v3/detectors/VirtualDetector/VirtualDetector.tsx +29 -13
- package/src/v3/detectors/VirtualDetector/useInterceptingDetectorContext.ts +2 -1
- package/src/v3/detectors/common.ts +40 -20
- package/src/v3/detectors/index.ts +1 -1
- package/src/v3/detectors/useEnsureGestureHandlerRootView.ts +1 -0
- package/src/v3/detectors/utils.ts +4 -3
- package/src/v3/gestureStateManager.ts +0 -6
- package/src/v3/gestureStateManager.web.ts +2 -17
- package/src/v3/hooks/callbacks/eventHandler.ts +87 -47
- package/src/v3/hooks/callbacks/useGestureEventHandler.ts +21 -9
- package/src/v3/hooks/callbacks/useReanimatedEventHandler.ts +19 -11
- package/src/v3/hooks/composition/index.ts +2 -2
- package/src/v3/hooks/composition/useCompetingGestures.ts +2 -1
- package/src/v3/hooks/composition/useComposedGesture.ts +6 -6
- package/src/v3/hooks/composition/useExclusiveGestures.ts +2 -1
- package/src/v3/hooks/composition/useSimultaneousGestures.ts +2 -1
- package/src/v3/hooks/gestures/fling/FlingTypes.ts +60 -0
- package/src/v3/hooks/gestures/fling/useFlingGesture.ts +7 -34
- package/src/v3/hooks/gestures/hover/HoverTypes.ts +76 -0
- package/src/v3/hooks/gestures/hover/useHoverGesture.ts +24 -55
- package/src/v3/hooks/gestures/index.ts +111 -32
- package/src/v3/hooks/gestures/longPress/{LongPressProperties.ts → LongPressTypes.ts} +39 -0
- package/src/v3/hooks/gestures/longPress/useLongPressGesture.ts +10 -43
- package/src/v3/hooks/gestures/manual/ManualTypes.ts +28 -0
- package/src/v3/hooks/gestures/manual/useManualGesture.ts +7 -28
- package/src/v3/hooks/gestures/native/NativeTypes.ts +50 -0
- package/src/v3/hooks/gestures/native/useNativeGesture.ts +11 -38
- package/src/v3/hooks/gestures/pan/{PanProperties.ts → PanTypes.ts} +55 -0
- package/src/v3/hooks/gestures/pan/usePanGesture.ts +29 -54
- package/src/v3/hooks/gestures/pinch/PinchTypes.ts +40 -0
- package/src/v3/hooks/gestures/pinch/usePinchGesture.ts +21 -40
- package/src/v3/hooks/gestures/rotation/RotationTypes.ts +41 -0
- package/src/v3/hooks/gestures/rotation/useRotationGesture.ts +21 -38
- package/src/v3/hooks/gestures/tap/{TapProperties.ts → TapTypes.ts} +32 -0
- package/src/v3/hooks/gestures/tap/useTapGesture.ts +9 -35
- package/src/v3/hooks/useGesture.ts +26 -13
- package/src/v3/hooks/useGestureCallbacks.ts +14 -9
- package/src/v3/hooks/utils/configUtils.ts +46 -18
- package/src/v3/hooks/utils/eventHandlersUtils.ts +23 -20
- package/src/v3/hooks/utils/eventUtils.ts +63 -21
- package/src/v3/hooks/utils/index.ts +15 -20
- package/src/v3/hooks/utils/propsWhiteList.ts +23 -12
- package/src/v3/hooks/utils/reanimatedUtils.ts +22 -10
- package/src/v3/hooks/utils/relationUtils.ts +3 -3
- package/src/v3/index.ts +51 -45
- package/src/v3/types/ConfigTypes.ts +47 -36
- package/src/v3/types/DetectorTypes.ts +29 -7
- package/src/v3/types/EventTypes.ts +27 -16
- package/src/v3/types/GestureTypes.ts +49 -22
- package/src/v3/types/NativeWrapperType.ts +21 -6
- package/src/v3/types/ReanimatedTypes.ts +1 -1
- package/src/v3/types/UtilityTypes.ts +7 -7
- package/src/v3/types/index.ts +32 -36
- package/src/web/Gestures.ts +6 -6
- package/src/web/detectors/RotationGestureDetector.ts +8 -9
- package/src/web/detectors/ScaleGestureDetector.ts +4 -4
- package/src/web/handlers/FlingGestureHandler.ts +6 -7
- package/src/web/handlers/GestureHandler.ts +66 -119
- package/src/web/handlers/HoverGestureHandler.ts +5 -5
- package/src/web/handlers/IGestureHandler.ts +6 -6
- package/src/web/handlers/LongPressGestureHandler.ts +4 -5
- package/src/web/handlers/ManualGestureHandler.ts +3 -3
- package/src/web/handlers/NativeViewGestureHandler.ts +8 -8
- package/src/web/handlers/PanGestureHandler.ts +7 -7
- package/src/web/handlers/PinchGestureHandler.ts +17 -15
- package/src/web/handlers/RotationGestureHandler.ts +29 -42
- package/src/web/handlers/TapGestureHandler.ts +4 -4
- package/src/web/interfaces.ts +35 -35
- package/src/web/tools/EventManager.ts +1 -1
- package/src/web/tools/GestureHandlerDelegate.ts +4 -0
- package/src/web/tools/GestureHandlerOrchestrator.ts +0 -1
- package/src/web/tools/GestureHandlerWebDelegate.ts +82 -23
- package/src/web/tools/InteractionManager.ts +3 -2
- package/src/web/tools/KeyboardEventManager.ts +3 -2
- package/src/web/tools/NodeManager.ts +2 -2
- package/src/web/tools/PointerEventManager.ts +18 -9
- package/src/web/tools/PointerTracker.ts +1 -1
- package/src/web/tools/Vector.ts +1 -1
- package/src/web/tools/VelocityTracker.ts +1 -1
- package/src/web/tools/WheelEventManager.ts +3 -2
- package/src/web/utils.ts +28 -2
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonWrapperViewManager.kt +0 -30
- package/apple/RNGestureHandlerButtonManager.h +0 -5
- package/apple/RNGestureHandlerButtonManager.mm +0 -60
- package/apple/RNGestureHandlerButtonWrapper.h +0 -19
- package/apple/RNGestureHandlerButtonWrapper.mm +0 -46
- package/lib/commonjs/ActionType.js +0 -22
- package/lib/commonjs/ActionType.js.map +0 -1
- package/lib/commonjs/Directions.js +0 -38
- package/lib/commonjs/Directions.js.map +0 -1
- package/lib/commonjs/GestureHandlerRootViewContext.js +0 -10
- package/lib/commonjs/GestureHandlerRootViewContext.js.map +0 -1
- package/lib/commonjs/PlatformConstants.js +0 -9
- package/lib/commonjs/PlatformConstants.js.map +0 -1
- package/lib/commonjs/PlatformConstants.web.js +0 -12
- package/lib/commonjs/PlatformConstants.web.js.map +0 -1
- package/lib/commonjs/PointerType.js +0 -15
- package/lib/commonjs/PointerType.js.map +0 -1
- package/lib/commonjs/RNGestureHandlerModule.js +0 -12
- package/lib/commonjs/RNGestureHandlerModule.js.map +0 -1
- package/lib/commonjs/RNGestureHandlerModule.web.js +0 -73
- package/lib/commonjs/RNGestureHandlerModule.web.js.map +0 -1
- package/lib/commonjs/RNGestureHandlerModule.windows.js +0 -53
- package/lib/commonjs/RNGestureHandlerModule.windows.js.map +0 -1
- package/lib/commonjs/RNRenderer.js +0 -14
- package/lib/commonjs/RNRenderer.js.map +0 -1
- package/lib/commonjs/RNRenderer.web.js +0 -10
- package/lib/commonjs/RNRenderer.web.js.map +0 -1
- package/lib/commonjs/State.js +0 -19
- package/lib/commonjs/State.js.map +0 -1
- package/lib/commonjs/TouchEventType.js +0 -16
- package/lib/commonjs/TouchEventType.js.map +0 -1
- package/lib/commonjs/components/GestureButtons.js +0 -220
- package/lib/commonjs/components/GestureButtons.js.map +0 -1
- package/lib/commonjs/components/GestureButtonsProps.js +0 -6
- package/lib/commonjs/components/GestureButtonsProps.js.map +0 -1
- package/lib/commonjs/components/GestureComponents.js +0 -127
- package/lib/commonjs/components/GestureComponents.js.map +0 -1
- package/lib/commonjs/components/GestureComponents.web.js +0 -61
- package/lib/commonjs/components/GestureComponents.web.js.map +0 -1
- package/lib/commonjs/components/GestureHandlerButton.js +0 -144
- package/lib/commonjs/components/GestureHandlerButton.js.map +0 -1
- package/lib/commonjs/components/GestureHandlerButton.web.js +0 -16
- package/lib/commonjs/components/GestureHandlerButton.web.js.map +0 -1
- package/lib/commonjs/components/GestureHandlerRootView.android.js +0 -32
- package/lib/commonjs/components/GestureHandlerRootView.android.js.map +0 -1
- package/lib/commonjs/components/GestureHandlerRootView.js +0 -30
- package/lib/commonjs/components/GestureHandlerRootView.js.map +0 -1
- package/lib/commonjs/components/GestureHandlerRootView.web.js +0 -30
- package/lib/commonjs/components/GestureHandlerRootView.web.js.map +0 -1
- package/lib/commonjs/components/Pressable/Pressable.js +0 -270
- package/lib/commonjs/components/Pressable/Pressable.js.map +0 -1
- package/lib/commonjs/components/Pressable/PressableProps.js +0 -6
- package/lib/commonjs/components/Pressable/PressableProps.js.map +0 -1
- package/lib/commonjs/components/Pressable/StateMachine.js +0 -44
- package/lib/commonjs/components/Pressable/StateMachine.js.map +0 -1
- package/lib/commonjs/components/Pressable/index.js +0 -14
- package/lib/commonjs/components/Pressable/index.js.map +0 -1
- package/lib/commonjs/components/Pressable/stateDefinitions.js +0 -88
- package/lib/commonjs/components/Pressable/stateDefinitions.js.map +0 -1
- package/lib/commonjs/components/Pressable/utils.js +0 -92
- package/lib/commonjs/components/Pressable/utils.js.map +0 -1
- package/lib/commonjs/components/ReanimatedDrawerLayout.js +0 -377
- package/lib/commonjs/components/ReanimatedDrawerLayout.js.map +0 -1
- package/lib/commonjs/components/ReanimatedSwipeable/ReanimatedSwipeable.js +0 -347
- package/lib/commonjs/components/ReanimatedSwipeable/ReanimatedSwipeable.js.map +0 -1
- package/lib/commonjs/components/ReanimatedSwipeable/ReanimatedSwipeableProps.js +0 -12
- package/lib/commonjs/components/ReanimatedSwipeable/ReanimatedSwipeableProps.js.map +0 -1
- package/lib/commonjs/components/ReanimatedSwipeable/index.js +0 -21
- package/lib/commonjs/components/ReanimatedSwipeable/index.js.map +0 -1
- package/lib/commonjs/components/Text.js +0 -60
- package/lib/commonjs/components/Text.js.map +0 -1
- package/lib/commonjs/components/touchables/ExtraButtonProps.js +0 -2
- package/lib/commonjs/components/touchables/ExtraButtonProps.js.map +0 -1
- package/lib/commonjs/components/touchables/GenericTouchable.js +0 -245
- package/lib/commonjs/components/touchables/GenericTouchable.js.map +0 -1
- package/lib/commonjs/components/touchables/GenericTouchableProps.js +0 -6
- package/lib/commonjs/components/touchables/GenericTouchableProps.js.map +0 -1
- package/lib/commonjs/components/touchables/TouchableHighlight.js +0 -93
- package/lib/commonjs/components/touchables/TouchableHighlight.js.map +0 -1
- package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js +0 -84
- package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js.map +0 -1
- package/lib/commonjs/components/touchables/TouchableNativeFeedback.js +0 -13
- package/lib/commonjs/components/touchables/TouchableNativeFeedback.js.map +0 -1
- package/lib/commonjs/components/touchables/TouchableNativeFeedbackProps.js +0 -6
- package/lib/commonjs/components/touchables/TouchableNativeFeedbackProps.js.map +0 -1
- package/lib/commonjs/components/touchables/TouchableOpacity.js +0 -65
- package/lib/commonjs/components/touchables/TouchableOpacity.js.map +0 -1
- package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js +0 -33
- package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js.map +0 -1
- package/lib/commonjs/components/touchables/index.js +0 -35
- package/lib/commonjs/components/touchables/index.js.map +0 -1
- package/lib/commonjs/components/utils.js +0 -17
- package/lib/commonjs/components/utils.js.map +0 -1
- package/lib/commonjs/findNodeHandle.js +0 -9
- package/lib/commonjs/findNodeHandle.js.map +0 -1
- package/lib/commonjs/findNodeHandle.web.js +0 -39
- package/lib/commonjs/findNodeHandle.web.js.map +0 -1
- package/lib/commonjs/getShadowNodeFromRef.js +0 -51
- package/lib/commonjs/getShadowNodeFromRef.js.map +0 -1
- package/lib/commonjs/getShadowNodeFromRef.web.js +0 -14
- package/lib/commonjs/getShadowNodeFromRef.web.js.map +0 -1
- package/lib/commonjs/ghQueueMicrotask.js +0 -10
- package/lib/commonjs/ghQueueMicrotask.js.map +0 -1
- package/lib/commonjs/global.d.js +0 -6
- package/lib/commonjs/global.d.js.map +0 -1
- package/lib/commonjs/globals.js +0 -6
- package/lib/commonjs/globals.js.map +0 -1
- package/lib/commonjs/handlers/FlingGestureHandler.js +0 -31
- package/lib/commonjs/handlers/FlingGestureHandler.js.map +0 -1
- package/lib/commonjs/handlers/ForceTouchGestureHandler.js +0 -46
- package/lib/commonjs/handlers/ForceTouchGestureHandler.js.map +0 -1
- package/lib/commonjs/handlers/GestureHandlerEventPayload.js +0 -6
- package/lib/commonjs/handlers/GestureHandlerEventPayload.js.map +0 -1
- package/lib/commonjs/handlers/LongPressGestureHandler.js +0 -33
- package/lib/commonjs/handlers/LongPressGestureHandler.js.map +0 -1
- package/lib/commonjs/handlers/NativeViewGestureHandler.js +0 -32
- package/lib/commonjs/handlers/NativeViewGestureHandler.js.map +0 -1
- package/lib/commonjs/handlers/PanGestureHandler.js +0 -112
- package/lib/commonjs/handlers/PanGestureHandler.js.map +0 -1
- package/lib/commonjs/handlers/PinchGestureHandler.js +0 -29
- package/lib/commonjs/handlers/PinchGestureHandler.js.map +0 -1
- package/lib/commonjs/handlers/PressabilityDebugView.js +0 -13
- package/lib/commonjs/handlers/PressabilityDebugView.js.map +0 -1
- package/lib/commonjs/handlers/PressabilityDebugView.web.js +0 -11
- package/lib/commonjs/handlers/PressabilityDebugView.web.js.map +0 -1
- package/lib/commonjs/handlers/RotationGestureHandler.js +0 -29
- package/lib/commonjs/handlers/RotationGestureHandler.js.map +0 -1
- package/lib/commonjs/handlers/TapGestureHandler.js +0 -33
- package/lib/commonjs/handlers/TapGestureHandler.js.map +0 -1
- package/lib/commonjs/handlers/createHandler.js +0 -334
- package/lib/commonjs/handlers/createHandler.js.map +0 -1
- package/lib/commonjs/handlers/createNativeWrapper.js +0 -78
- package/lib/commonjs/handlers/createNativeWrapper.js.map +0 -1
- package/lib/commonjs/handlers/customDirectEventTypes.js +0 -13
- package/lib/commonjs/handlers/customDirectEventTypes.js.map +0 -1
- package/lib/commonjs/handlers/customDirectEventTypes.web.js +0 -10
- package/lib/commonjs/handlers/customDirectEventTypes.web.js.map +0 -1
- package/lib/commonjs/handlers/gestureHandlerCommon.js +0 -27
- package/lib/commonjs/handlers/gestureHandlerCommon.js.map +0 -1
- package/lib/commonjs/handlers/gestureHandlerTypesCompat.js +0 -6
- package/lib/commonjs/handlers/gestureHandlerTypesCompat.js.map +0 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.js +0 -32
- package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.js.map +0 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.web.js +0 -41
- package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.web.js.map +0 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/attachHandlers.js +0 -68
- package/lib/commonjs/handlers/gestures/GestureDetector/attachHandlers.js.map +0 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/dropHandlers.js +0 -20
- package/lib/commonjs/handlers/gestures/GestureDetector/dropHandlers.js.map +0 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/index.js +0 -122
- package/lib/commonjs/handlers/gestures/GestureDetector/index.js.map +0 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/needsToReattach.js +0 -22
- package/lib/commonjs/handlers/gestures/GestureDetector/needsToReattach.js.map +0 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/types.js +0 -6
- package/lib/commonjs/handlers/gestures/GestureDetector/types.js.map +0 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js +0 -67
- package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js.map +0 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js +0 -143
- package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +0 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/useDetectorUpdater.js +0 -47
- package/lib/commonjs/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +0 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/useMountReactions.js +0 -41
- package/lib/commonjs/handlers/gestures/GestureDetector/useMountReactions.js.map +0 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js +0 -41
- package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js.map +0 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/utils.js +0 -145
- package/lib/commonjs/handlers/gestures/GestureDetector/utils.js.map +0 -1
- package/lib/commonjs/handlers/gestures/eventReceiver.js +0 -106
- package/lib/commonjs/handlers/gestures/eventReceiver.js.map +0 -1
- package/lib/commonjs/handlers/gestures/flingGesture.js +0 -37
- package/lib/commonjs/handlers/gestures/flingGesture.js.map +0 -1
- package/lib/commonjs/handlers/gestures/forceTouchGesture.js +0 -80
- package/lib/commonjs/handlers/gestures/forceTouchGesture.js.map +0 -1
- package/lib/commonjs/handlers/gestures/gesture.js +0 -344
- package/lib/commonjs/handlers/gestures/gesture.js.map +0 -1
- package/lib/commonjs/handlers/gestures/gestureComposition.js +0 -90
- package/lib/commonjs/handlers/gestures/gestureComposition.js.map +0 -1
- package/lib/commonjs/handlers/gestures/gestureObjects.js +0 -132
- package/lib/commonjs/handlers/gestures/gestureObjects.js.map +0 -1
- package/lib/commonjs/handlers/gestures/gestureStateManager.js +0 -50
- package/lib/commonjs/handlers/gestures/gestureStateManager.js.map +0 -1
- package/lib/commonjs/handlers/gestures/gestureStateManager.web.js +0 -36
- package/lib/commonjs/handlers/gestures/gestureStateManager.web.js.map +0 -1
- package/lib/commonjs/handlers/gestures/hoverGesture.js +0 -57
- package/lib/commonjs/handlers/gestures/hoverGesture.js.map +0 -1
- package/lib/commonjs/handlers/gestures/longPressGesture.js +0 -46
- package/lib/commonjs/handlers/gestures/longPressGesture.js.map +0 -1
- package/lib/commonjs/handlers/gestures/manualGesture.js +0 -25
- package/lib/commonjs/handlers/gestures/manualGesture.js.map +0 -1
- package/lib/commonjs/handlers/gestures/nativeGesture.js +0 -34
- package/lib/commonjs/handlers/gestures/nativeGesture.js.map +0 -1
- package/lib/commonjs/handlers/gestures/panGesture.js +0 -197
- package/lib/commonjs/handlers/gestures/panGesture.js.map +0 -1
- package/lib/commonjs/handlers/gestures/pinchGesture.js +0 -38
- package/lib/commonjs/handlers/gestures/pinchGesture.js.map +0 -1
- package/lib/commonjs/handlers/gestures/reanimatedWrapper.js +0 -32
- package/lib/commonjs/handlers/gestures/reanimatedWrapper.js.map +0 -1
- package/lib/commonjs/handlers/gestures/rotationGesture.js +0 -38
- package/lib/commonjs/handlers/gestures/rotationGesture.js.map +0 -1
- package/lib/commonjs/handlers/gestures/tapGesture.js +0 -87
- package/lib/commonjs/handlers/gestures/tapGesture.js.map +0 -1
- package/lib/commonjs/handlers/getNextHandlerTag.js +0 -11
- package/lib/commonjs/handlers/getNextHandlerTag.js.map +0 -1
- package/lib/commonjs/handlers/handlersRegistry.js +0 -74
- package/lib/commonjs/handlers/handlersRegistry.js.map +0 -1
- package/lib/commonjs/handlers/utils.js +0 -79
- package/lib/commonjs/handlers/utils.js.map +0 -1
- package/lib/commonjs/index.js +0 -284
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/init.js +0 -11
- package/lib/commonjs/init.js.map +0 -1
- package/lib/commonjs/jestUtils/index.js +0 -19
- package/lib/commonjs/jestUtils/index.js.map +0 -1
- package/lib/commonjs/jestUtils/jestUtils.js +0 -350
- package/lib/commonjs/jestUtils/jestUtils.js.map +0 -1
- package/lib/commonjs/mocks/GestureButtons.js +0 -23
- package/lib/commonjs/mocks/GestureButtons.js.map +0 -1
- package/lib/commonjs/mocks/Pressable.js +0 -13
- package/lib/commonjs/mocks/Pressable.js.map +0 -1
- package/lib/commonjs/mocks/gestureComponents.js +0 -19
- package/lib/commonjs/mocks/gestureComponents.js.map +0 -1
- package/lib/commonjs/mocks/hostDetector.js +0 -10
- package/lib/commonjs/mocks/hostDetector.js.map +0 -1
- package/lib/commonjs/mocks/module.js +0 -30
- package/lib/commonjs/mocks/module.js.map +0 -1
- package/lib/commonjs/mountRegistry.js +0 -37
- package/lib/commonjs/mountRegistry.js.map +0 -1
- package/lib/commonjs/package.json +0 -1
- package/lib/commonjs/specs/NativeRNGestureHandlerModule.js +0 -9
- package/lib/commonjs/specs/NativeRNGestureHandlerModule.js.map +0 -1
- package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.ts +0 -27
- package/lib/commonjs/specs/RNGestureHandlerButtonWrapperNativeComponent.ts +0 -11
- package/lib/commonjs/specs/RNGestureHandlerDetectorNativeComponent.ts +0 -74
- package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.ts +0 -15
- package/lib/commonjs/typeUtils.js +0 -2
- package/lib/commonjs/typeUtils.js.map +0 -1
- package/lib/commonjs/useIsomorphicLayoutEffect.js +0 -20
- package/lib/commonjs/useIsomorphicLayoutEffect.js.map +0 -1
- package/lib/commonjs/utils.js +0 -83
- package/lib/commonjs/utils.js.map +0 -1
- package/lib/commonjs/v3/NativeProxy.js +0 -48
- package/lib/commonjs/v3/NativeProxy.js.map +0 -1
- package/lib/commonjs/v3/NativeProxy.web.js +0 -29
- package/lib/commonjs/v3/NativeProxy.web.js.map +0 -1
- package/lib/commonjs/v3/components/GestureButtons.js +0 -153
- package/lib/commonjs/v3/components/GestureButtons.js.map +0 -1
- package/lib/commonjs/v3/components/GestureButtonsProps.js +0 -6
- package/lib/commonjs/v3/components/GestureButtonsProps.js.map +0 -1
- package/lib/commonjs/v3/components/GestureComponents.js +0 -124
- package/lib/commonjs/v3/components/GestureComponents.js.map +0 -1
- package/lib/commonjs/v3/components/GestureComponents.web.js +0 -39
- package/lib/commonjs/v3/components/GestureComponents.web.js.map +0 -1
- package/lib/commonjs/v3/components/Pressable.js +0 -283
- package/lib/commonjs/v3/components/Pressable.js.map +0 -1
- package/lib/commonjs/v3/components/index.js +0 -76
- package/lib/commonjs/v3/components/index.js.map +0 -1
- package/lib/commonjs/v3/createNativeWrapper.js +0 -70
- package/lib/commonjs/v3/createNativeWrapper.js.map +0 -1
- package/lib/commonjs/v3/detectors/GestureDetector.js +0 -24
- package/lib/commonjs/v3/detectors/GestureDetector.js.map +0 -1
- package/lib/commonjs/v3/detectors/HostGestureDetector.js +0 -11
- package/lib/commonjs/v3/detectors/HostGestureDetector.js.map +0 -1
- package/lib/commonjs/v3/detectors/HostGestureDetector.web.js +0 -113
- package/lib/commonjs/v3/detectors/HostGestureDetector.web.js.map +0 -1
- package/lib/commonjs/v3/detectors/NativeDetector.js +0 -76
- package/lib/commonjs/v3/detectors/NativeDetector.js.map +0 -1
- package/lib/commonjs/v3/detectors/ReanimatedNativeDetector.js +0 -74
- package/lib/commonjs/v3/detectors/ReanimatedNativeDetector.js.map +0 -1
- package/lib/commonjs/v3/detectors/ReanimatedNativeDetector.web.js +0 -11
- package/lib/commonjs/v3/detectors/ReanimatedNativeDetector.web.js.map +0 -1
- package/lib/commonjs/v3/detectors/VirtualDetector/InterceptingGestureDetector.js +0 -167
- package/lib/commonjs/v3/detectors/VirtualDetector/InterceptingGestureDetector.js.map +0 -1
- package/lib/commonjs/v3/detectors/VirtualDetector/VirtualDetector.js +0 -74
- package/lib/commonjs/v3/detectors/VirtualDetector/VirtualDetector.js.map +0 -1
- package/lib/commonjs/v3/detectors/VirtualDetector/useInterceptingDetectorContext.js +0 -19
- package/lib/commonjs/v3/detectors/VirtualDetector/useInterceptingDetectorContext.js.map +0 -1
- package/lib/commonjs/v3/detectors/common.js +0 -22
- package/lib/commonjs/v3/detectors/common.js.map +0 -1
- package/lib/commonjs/v3/detectors/index.js +0 -34
- package/lib/commonjs/v3/detectors/index.js.map +0 -1
- package/lib/commonjs/v3/detectors/useEnsureGestureHandlerRootView.js +0 -17
- package/lib/commonjs/v3/detectors/useEnsureGestureHandlerRootView.js.map +0 -1
- package/lib/commonjs/v3/detectors/utils.js +0 -130
- package/lib/commonjs/v3/detectors/utils.js.map +0 -1
- package/lib/commonjs/v3/gestureStateManager.js +0 -42
- package/lib/commonjs/v3/gestureStateManager.js.map +0 -1
- package/lib/commonjs/v3/gestureStateManager.web.js +0 -54
- package/lib/commonjs/v3/gestureStateManager.web.js.map +0 -1
- package/lib/commonjs/v3/hooks/callbacks/eventHandler.js +0 -80
- package/lib/commonjs/v3/hooks/callbacks/eventHandler.js.map +0 -1
- package/lib/commonjs/v3/hooks/callbacks/stateChangeHandler.js +0 -50
- package/lib/commonjs/v3/hooks/callbacks/stateChangeHandler.js.map +0 -1
- package/lib/commonjs/v3/hooks/callbacks/touchEventHandler.js +0 -22
- package/lib/commonjs/v3/hooks/callbacks/touchEventHandler.js.map +0 -1
- package/lib/commonjs/v3/hooks/callbacks/updateHandler.js +0 -30
- package/lib/commonjs/v3/hooks/callbacks/updateHandler.js.map +0 -1
- package/lib/commonjs/v3/hooks/callbacks/useGestureEventHandler.js +0 -21
- package/lib/commonjs/v3/hooks/callbacks/useGestureEventHandler.js.map +0 -1
- package/lib/commonjs/v3/hooks/callbacks/useReanimatedEventHandler.js +0 -39
- package/lib/commonjs/v3/hooks/callbacks/useReanimatedEventHandler.js.map +0 -1
- package/lib/commonjs/v3/hooks/composition/index.js +0 -27
- package/lib/commonjs/v3/hooks/composition/index.js.map +0 -1
- package/lib/commonjs/v3/hooks/composition/useCompetingGestures.js +0 -12
- package/lib/commonjs/v3/hooks/composition/useCompetingGestures.js.map +0 -1
- package/lib/commonjs/v3/hooks/composition/useComposedGesture.js +0 -52
- package/lib/commonjs/v3/hooks/composition/useComposedGesture.js.map +0 -1
- package/lib/commonjs/v3/hooks/composition/useExclusiveGestures.js +0 -14
- package/lib/commonjs/v3/hooks/composition/useExclusiveGestures.js.map +0 -1
- package/lib/commonjs/v3/hooks/composition/useSimultaneousGestures.js +0 -13
- package/lib/commonjs/v3/hooks/composition/useSimultaneousGestures.js.map +0 -1
- package/lib/commonjs/v3/hooks/gestures/fling/FlingProperties.js +0 -8
- package/lib/commonjs/v3/hooks/gestures/fling/FlingProperties.js.map +0 -1
- package/lib/commonjs/v3/hooks/gestures/fling/useFlingGesture.js +0 -14
- package/lib/commonjs/v3/hooks/gestures/fling/useFlingGesture.js.map +0 -1
- package/lib/commonjs/v3/hooks/gestures/hover/HoverProperties.js +0 -8
- package/lib/commonjs/v3/hooks/gestures/hover/HoverProperties.js.map +0 -1
- package/lib/commonjs/v3/hooks/gestures/hover/useHoverGesture.js +0 -27
- package/lib/commonjs/v3/hooks/gestures/hover/useHoverGesture.js.map +0 -1
- package/lib/commonjs/v3/hooks/gestures/index.js +0 -69
- package/lib/commonjs/v3/hooks/gestures/index.js.map +0 -1
- package/lib/commonjs/v3/hooks/gestures/longPress/LongPressProperties.js +0 -8
- package/lib/commonjs/v3/hooks/gestures/longPress/LongPressProperties.js.map +0 -1
- package/lib/commonjs/v3/hooks/gestures/longPress/useLongPressGesture.js +0 -21
- package/lib/commonjs/v3/hooks/gestures/longPress/useLongPressGesture.js.map +0 -1
- package/lib/commonjs/v3/hooks/gestures/manual/ManualProperties.js +0 -2
- package/lib/commonjs/v3/hooks/gestures/manual/ManualProperties.js.map +0 -1
- package/lib/commonjs/v3/hooks/gestures/manual/useManualGesture.js +0 -14
- package/lib/commonjs/v3/hooks/gestures/manual/useManualGesture.js.map +0 -1
- package/lib/commonjs/v3/hooks/gestures/native/NativeProperties.js +0 -8
- package/lib/commonjs/v3/hooks/gestures/native/NativeProperties.js.map +0 -1
- package/lib/commonjs/v3/hooks/gestures/native/useNativeGesture.js +0 -14
- package/lib/commonjs/v3/hooks/gestures/native/useNativeGesture.js.map +0 -1
- package/lib/commonjs/v3/hooks/gestures/pan/PanProperties.js +0 -8
- package/lib/commonjs/v3/hooks/gestures/pan/PanProperties.js.map +0 -1
- package/lib/commonjs/v3/hooks/gestures/pan/usePanGesture.js +0 -79
- package/lib/commonjs/v3/hooks/gestures/pan/usePanGesture.js.map +0 -1
- package/lib/commonjs/v3/hooks/gestures/pinch/PinchProperties.js +0 -2
- package/lib/commonjs/v3/hooks/gestures/pinch/PinchProperties.js.map +0 -1
- package/lib/commonjs/v3/hooks/gestures/pinch/usePinchGesture.js +0 -27
- package/lib/commonjs/v3/hooks/gestures/pinch/usePinchGesture.js.map +0 -1
- package/lib/commonjs/v3/hooks/gestures/rotation/RotationProperties.js +0 -2
- package/lib/commonjs/v3/hooks/gestures/rotation/RotationProperties.js.map +0 -1
- package/lib/commonjs/v3/hooks/gestures/rotation/useRotationGesture.js +0 -26
- package/lib/commonjs/v3/hooks/gestures/rotation/useRotationGesture.js.map +0 -1
- package/lib/commonjs/v3/hooks/gestures/tap/TapProperties.js +0 -8
- package/lib/commonjs/v3/hooks/gestures/tap/TapProperties.js.map +0 -1
- package/lib/commonjs/v3/hooks/gestures/tap/useTapGesture.js +0 -15
- package/lib/commonjs/v3/hooks/gestures/tap/useTapGesture.js.map +0 -1
- package/lib/commonjs/v3/hooks/index.js +0 -28
- package/lib/commonjs/v3/hooks/index.js.map +0 -1
- package/lib/commonjs/v3/hooks/useGesture.js +0 -80
- package/lib/commonjs/v3/hooks/useGesture.js.map +0 -1
- package/lib/commonjs/v3/hooks/useGestureCallbacks.js +0 -53
- package/lib/commonjs/v3/hooks/useGestureCallbacks.js.map +0 -1
- package/lib/commonjs/v3/hooks/utils/configUtils.js +0 -73
- package/lib/commonjs/v3/hooks/utils/configUtils.js.map +0 -1
- package/lib/commonjs/v3/hooks/utils/eventHandlersUtils.js +0 -96
- package/lib/commonjs/v3/hooks/utils/eventHandlersUtils.js.map +0 -1
- package/lib/commonjs/v3/hooks/utils/eventUtils.js +0 -73
- package/lib/commonjs/v3/hooks/utils/eventUtils.js.map +0 -1
- package/lib/commonjs/v3/hooks/utils/index.js +0 -168
- package/lib/commonjs/v3/hooks/utils/index.js.map +0 -1
- package/lib/commonjs/v3/hooks/utils/propsWhiteList.js +0 -31
- package/lib/commonjs/v3/hooks/utils/propsWhiteList.js.map +0 -1
- package/lib/commonjs/v3/hooks/utils/reanimatedUtils.js +0 -85
- package/lib/commonjs/v3/hooks/utils/reanimatedUtils.js.map +0 -1
- package/lib/commonjs/v3/hooks/utils/relationUtils.js +0 -51
- package/lib/commonjs/v3/hooks/utils/relationUtils.js.map +0 -1
- package/lib/commonjs/v3/index.js +0 -178
- package/lib/commonjs/v3/index.js.map +0 -1
- package/lib/commonjs/v3/types/ConfigTypes.js +0 -6
- package/lib/commonjs/v3/types/ConfigTypes.js.map +0 -1
- package/lib/commonjs/v3/types/DetectorTypes.js +0 -6
- package/lib/commonjs/v3/types/DetectorTypes.js.map +0 -1
- package/lib/commonjs/v3/types/EventTypes.js +0 -6
- package/lib/commonjs/v3/types/EventTypes.js.map +0 -1
- package/lib/commonjs/v3/types/GestureTypes.js +0 -28
- package/lib/commonjs/v3/types/GestureTypes.js.map +0 -1
- package/lib/commonjs/v3/types/NativeWrapperType.js +0 -6
- package/lib/commonjs/v3/types/NativeWrapperType.js.map +0 -1
- package/lib/commonjs/v3/types/ReanimatedTypes.js +0 -2
- package/lib/commonjs/v3/types/ReanimatedTypes.js.map +0 -1
- package/lib/commonjs/v3/types/UtilityTypes.js +0 -6
- package/lib/commonjs/v3/types/UtilityTypes.js.map +0 -1
- package/lib/commonjs/v3/types/index.js +0 -19
- package/lib/commonjs/v3/types/index.js.map +0 -1
- package/lib/commonjs/web/Gestures.js +0 -30
- package/lib/commonjs/web/Gestures.js.map +0 -1
- package/lib/commonjs/web/constants.js +0 -9
- package/lib/commonjs/web/constants.js.map +0 -1
- package/lib/commonjs/web/detectors/RotationGestureDetector.js +0 -124
- package/lib/commonjs/web/detectors/RotationGestureDetector.js.map +0 -1
- package/lib/commonjs/web/detectors/ScaleGestureDetector.js +0 -111
- package/lib/commonjs/web/detectors/ScaleGestureDetector.js.map +0 -1
- package/lib/commonjs/web/handlers/FlingGestureHandler.js +0 -141
- package/lib/commonjs/web/handlers/FlingGestureHandler.js.map +0 -1
- package/lib/commonjs/web/handlers/GestureHandler.js +0 -857
- package/lib/commonjs/web/handlers/GestureHandler.js.map +0 -1
- package/lib/commonjs/web/handlers/HoverGestureHandler.js +0 -50
- package/lib/commonjs/web/handlers/HoverGestureHandler.js.map +0 -1
- package/lib/commonjs/web/handlers/IGestureHandler.js +0 -2
- package/lib/commonjs/web/handlers/IGestureHandler.js.map +0 -1
- package/lib/commonjs/web/handlers/LongPressGestureHandler.js +0 -144
- package/lib/commonjs/web/handlers/LongPressGestureHandler.js.map +0 -1
- package/lib/commonjs/web/handlers/ManualGestureHandler.js +0 -42
- package/lib/commonjs/web/handlers/ManualGestureHandler.js.map +0 -1
- package/lib/commonjs/web/handlers/NativeViewGestureHandler.js +0 -147
- package/lib/commonjs/web/handlers/NativeViewGestureHandler.js.map +0 -1
- package/lib/commonjs/web/handlers/PanGestureHandler.js +0 -386
- package/lib/commonjs/web/handlers/PanGestureHandler.js.map +0 -1
- package/lib/commonjs/web/handlers/PinchGestureHandler.js +0 -126
- package/lib/commonjs/web/handlers/PinchGestureHandler.js.map +0 -1
- package/lib/commonjs/web/handlers/RotationGestureHandler.js +0 -133
- package/lib/commonjs/web/handlers/RotationGestureHandler.js.map +0 -1
- package/lib/commonjs/web/handlers/TapGestureHandler.js +0 -213
- package/lib/commonjs/web/handlers/TapGestureHandler.js.map +0 -1
- package/lib/commonjs/web/interfaces.js +0 -25
- package/lib/commonjs/web/interfaces.js.map +0 -1
- package/lib/commonjs/web/tools/CircularBuffer.js +0 -40
- package/lib/commonjs/web/tools/CircularBuffer.js.map +0 -1
- package/lib/commonjs/web/tools/EventManager.js +0 -102
- package/lib/commonjs/web/tools/EventManager.js.map +0 -1
- package/lib/commonjs/web/tools/GestureHandlerDelegate.js +0 -2
- package/lib/commonjs/web/tools/GestureHandlerDelegate.js.map +0 -1
- package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js +0 -269
- package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js.map +0 -1
- package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js +0 -219
- package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js.map +0 -1
- package/lib/commonjs/web/tools/InteractionManager.js +0 -83
- package/lib/commonjs/web/tools/InteractionManager.js.map +0 -1
- package/lib/commonjs/web/tools/KeyboardEventManager.js +0 -108
- package/lib/commonjs/web/tools/KeyboardEventManager.js.map +0 -1
- package/lib/commonjs/web/tools/LeastSquareSolver.js +0 -159
- package/lib/commonjs/web/tools/LeastSquareSolver.js.map +0 -1
- package/lib/commonjs/web/tools/NodeManager.js +0 -45
- package/lib/commonjs/web/tools/NodeManager.js.map +0 -1
- package/lib/commonjs/web/tools/PointerEventManager.js +0 -186
- package/lib/commonjs/web/tools/PointerEventManager.js.map +0 -1
- package/lib/commonjs/web/tools/PointerTracker.js +0 -192
- package/lib/commonjs/web/tools/PointerTracker.js.map +0 -1
- package/lib/commonjs/web/tools/Vector.js +0 -37
- package/lib/commonjs/web/tools/Vector.js.map +0 -1
- package/lib/commonjs/web/tools/VelocityTracker.js +0 -85
- package/lib/commonjs/web/tools/VelocityTracker.js.map +0 -1
- package/lib/commonjs/web/tools/WheelEventManager.js +0 -55
- package/lib/commonjs/web/tools/WheelEventManager.js.map +0 -1
- package/lib/commonjs/web/utils.js +0 -235
- package/lib/commonjs/web/utils.js.map +0 -1
- package/lib/module/specs/RNGestureHandlerButtonWrapperNativeComponent.ts +0 -11
- package/lib/module/v3/hooks/callbacks/stateChangeHandler.js +0 -46
- package/lib/module/v3/hooks/callbacks/stateChangeHandler.js.map +0 -1
- package/lib/module/v3/hooks/callbacks/touchEventHandler.js +0 -18
- package/lib/module/v3/hooks/callbacks/touchEventHandler.js.map +0 -1
- package/lib/module/v3/hooks/callbacks/updateHandler.js +0 -26
- package/lib/module/v3/hooks/callbacks/updateHandler.js.map +0 -1
- package/lib/module/v3/hooks/gestures/fling/FlingProperties.js.map +0 -1
- package/lib/module/v3/hooks/gestures/longPress/LongPressProperties.js.map +0 -1
- package/lib/module/v3/hooks/gestures/manual/ManualProperties.js +0 -2
- package/lib/module/v3/hooks/gestures/manual/ManualProperties.js.map +0 -1
- package/lib/module/v3/hooks/gestures/native/NativeProperties.js.map +0 -1
- package/lib/module/v3/hooks/gestures/pan/PanProperties.js.map +0 -1
- package/lib/module/v3/hooks/gestures/pinch/PinchProperties.js +0 -2
- package/lib/module/v3/hooks/gestures/pinch/PinchProperties.js.map +0 -1
- package/lib/module/v3/hooks/gestures/rotation/RotationProperties.js +0 -2
- package/lib/module/v3/hooks/gestures/rotation/RotationProperties.js.map +0 -1
- package/lib/module/v3/hooks/gestures/tap/TapProperties.js.map +0 -1
- package/lib/typescript/specs/RNGestureHandlerButtonWrapperNativeComponent.d.ts +0 -6
- package/lib/typescript/specs/RNGestureHandlerButtonWrapperNativeComponent.d.ts.map +0 -1
- package/lib/typescript/v3/hooks/callbacks/stateChangeHandler.d.ts +0 -4
- package/lib/typescript/v3/hooks/callbacks/stateChangeHandler.d.ts.map +0 -1
- package/lib/typescript/v3/hooks/callbacks/touchEventHandler.d.ts +0 -3
- package/lib/typescript/v3/hooks/callbacks/touchEventHandler.d.ts.map +0 -1
- package/lib/typescript/v3/hooks/callbacks/updateHandler.d.ts +0 -4
- package/lib/typescript/v3/hooks/callbacks/updateHandler.d.ts.map +0 -1
- package/lib/typescript/v3/hooks/gestures/fling/FlingProperties.d.ts +0 -23
- package/lib/typescript/v3/hooks/gestures/fling/FlingProperties.d.ts.map +0 -1
- package/lib/typescript/v3/hooks/gestures/hover/HoverProperties.d.ts +0 -18
- package/lib/typescript/v3/hooks/gestures/hover/HoverProperties.d.ts.map +0 -1
- package/lib/typescript/v3/hooks/gestures/longPress/LongPressProperties.d.ts.map +0 -1
- package/lib/typescript/v3/hooks/gestures/manual/ManualProperties.d.ts +0 -2
- package/lib/typescript/v3/hooks/gestures/manual/ManualProperties.d.ts.map +0 -1
- package/lib/typescript/v3/hooks/gestures/native/NativeProperties.d.ts +0 -16
- package/lib/typescript/v3/hooks/gestures/native/NativeProperties.d.ts.map +0 -1
- package/lib/typescript/v3/hooks/gestures/pan/PanProperties.d.ts.map +0 -1
- package/lib/typescript/v3/hooks/gestures/pinch/PinchProperties.d.ts +0 -2
- package/lib/typescript/v3/hooks/gestures/pinch/PinchProperties.d.ts.map +0 -1
- package/lib/typescript/v3/hooks/gestures/rotation/RotationProperties.d.ts +0 -2
- package/lib/typescript/v3/hooks/gestures/rotation/RotationProperties.d.ts.map +0 -1
- package/lib/typescript/v3/hooks/gestures/tap/TapProperties.d.ts.map +0 -1
- package/shared/shadowNodes/react/renderer/components/rngesturehandler_codegen/RNGestureHandlerButtonWrapperComponentDescriptor.h +0 -32
- package/shared/shadowNodes/react/renderer/components/rngesturehandler_codegen/RNGestureHandlerButtonWrapperShadowNode.cpp +0 -98
- package/shared/shadowNodes/react/renderer/components/rngesturehandler_codegen/RNGestureHandlerButtonWrapperShadowNode.h +0 -56
- package/shared/shadowNodes/react/renderer/components/rngesturehandler_codegen/RNGestureHandlerButtonWrapperState.h +0 -32
- package/src/specs/RNGestureHandlerButtonWrapperNativeComponent.ts +0 -11
- package/src/v3/hooks/callbacks/stateChangeHandler.ts +0 -70
- package/src/v3/hooks/callbacks/touchEventHandler.ts +0 -32
- package/src/v3/hooks/callbacks/updateHandler.ts +0 -53
- package/src/v3/hooks/gestures/fling/FlingProperties.ts +0 -26
- package/src/v3/hooks/gestures/hover/HoverProperties.ts +0 -22
- package/src/v3/hooks/gestures/manual/ManualProperties.ts +0 -1
- package/src/v3/hooks/gestures/native/NativeProperties.ts +0 -19
- package/src/v3/hooks/gestures/pinch/PinchProperties.ts +0 -1
- package/src/v3/hooks/gestures/rotation/RotationProperties.ts +0 -1
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _PointerType = require("../../PointerType");
|
|
8
|
-
var _State = require("../../State");
|
|
9
|
-
var _PointerTracker = _interopRequireDefault(require("./PointerTracker"));
|
|
10
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
-
class GestureHandlerOrchestrator {
|
|
12
|
-
gestureHandlers = [];
|
|
13
|
-
awaitingHandlers = [];
|
|
14
|
-
awaitingHandlersTags = new Set();
|
|
15
|
-
handlingChangeSemaphore = 0;
|
|
16
|
-
activationIndex = 0;
|
|
17
|
-
|
|
18
|
-
// Private beacuse of Singleton
|
|
19
|
-
// eslint-disable-next-line no-useless-constructor, @typescript-eslint/no-empty-function
|
|
20
|
-
constructor() {}
|
|
21
|
-
scheduleFinishedHandlersCleanup() {
|
|
22
|
-
if (this.handlingChangeSemaphore === 0) {
|
|
23
|
-
queueMicrotask(() => {
|
|
24
|
-
this.cleanupFinishedHandlers();
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
cleanHandler(handler) {
|
|
29
|
-
handler.reset();
|
|
30
|
-
handler.active = false;
|
|
31
|
-
handler.awaiting = false;
|
|
32
|
-
handler.activationIndex = Number.MAX_VALUE;
|
|
33
|
-
}
|
|
34
|
-
removeHandlerFromOrchestrator(handler) {
|
|
35
|
-
const indexInGestureHandlers = this.gestureHandlers.indexOf(handler);
|
|
36
|
-
const indexInAwaitingHandlers = this.awaitingHandlers.indexOf(handler);
|
|
37
|
-
if (indexInGestureHandlers >= 0) {
|
|
38
|
-
this.gestureHandlers.splice(indexInGestureHandlers, 1);
|
|
39
|
-
}
|
|
40
|
-
if (indexInAwaitingHandlers >= 0) {
|
|
41
|
-
this.awaitingHandlers.splice(indexInAwaitingHandlers, 1);
|
|
42
|
-
this.awaitingHandlersTags.delete(handler.handlerTag);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
cleanupFinishedHandlers() {
|
|
46
|
-
const handlersToRemove = new Set();
|
|
47
|
-
for (let i = this.gestureHandlers.length - 1; i >= 0; --i) {
|
|
48
|
-
const handler = this.gestureHandlers[i];
|
|
49
|
-
if (this.isFinished(handler.state) && !handler.awaiting) {
|
|
50
|
-
this.cleanHandler(handler);
|
|
51
|
-
handlersToRemove.add(handler);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
this.gestureHandlers = this.gestureHandlers.filter(handler => !handlersToRemove.has(handler));
|
|
55
|
-
}
|
|
56
|
-
hasOtherHandlerToWaitFor(handler) {
|
|
57
|
-
const hasToWaitFor = otherHandler => {
|
|
58
|
-
return !this.isFinished(otherHandler.state) && this.shouldHandlerWaitForOther(handler, otherHandler);
|
|
59
|
-
};
|
|
60
|
-
return this.gestureHandlers.some(hasToWaitFor);
|
|
61
|
-
}
|
|
62
|
-
shouldBeCancelledByFinishedHandler(handler) {
|
|
63
|
-
const shouldBeCancelled = otherHandler => {
|
|
64
|
-
return this.shouldHandlerWaitForOther(handler, otherHandler) && otherHandler.state === _State.State.END;
|
|
65
|
-
};
|
|
66
|
-
return this.gestureHandlers.some(shouldBeCancelled);
|
|
67
|
-
}
|
|
68
|
-
tryActivate(handler) {
|
|
69
|
-
if (this.shouldBeCancelledByFinishedHandler(handler)) {
|
|
70
|
-
handler.cancel();
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
if (this.hasOtherHandlerToWaitFor(handler)) {
|
|
74
|
-
this.addAwaitingHandler(handler);
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
const handlerState = handler.state;
|
|
78
|
-
if (handlerState === _State.State.CANCELLED || handlerState === _State.State.FAILED) {
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
if (this.shouldActivate(handler)) {
|
|
82
|
-
this.makeActive(handler);
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
if (handlerState === _State.State.ACTIVE) {
|
|
86
|
-
handler.fail();
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
if (handlerState === _State.State.BEGAN) {
|
|
90
|
-
handler.cancel();
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
shouldActivate(handler) {
|
|
94
|
-
const shouldBeCancelledBy = otherHandler => {
|
|
95
|
-
return this.shouldHandlerBeCancelledBy(handler, otherHandler);
|
|
96
|
-
};
|
|
97
|
-
return !this.gestureHandlers.some(shouldBeCancelledBy);
|
|
98
|
-
}
|
|
99
|
-
cleanupAwaitingHandlers(handler) {
|
|
100
|
-
const shouldWait = otherHandler => {
|
|
101
|
-
return !otherHandler.awaiting && this.shouldHandlerWaitForOther(otherHandler, handler);
|
|
102
|
-
};
|
|
103
|
-
for (const otherHandler of this.awaitingHandlers) {
|
|
104
|
-
if (shouldWait(otherHandler)) {
|
|
105
|
-
this.cleanHandler(otherHandler);
|
|
106
|
-
this.awaitingHandlersTags.delete(otherHandler.handlerTag);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
this.awaitingHandlers = this.awaitingHandlers.filter(otherHandler => this.awaitingHandlersTags.has(otherHandler.handlerTag));
|
|
110
|
-
}
|
|
111
|
-
onHandlerStateChange(handler, newState, oldState, sendIfDisabled) {
|
|
112
|
-
if (!handler.enabled && !sendIfDisabled) {
|
|
113
|
-
return;
|
|
114
|
-
}
|
|
115
|
-
this.handlingChangeSemaphore += 1;
|
|
116
|
-
if (this.isFinished(newState)) {
|
|
117
|
-
for (const otherHandler of this.awaitingHandlers) {
|
|
118
|
-
if (!this.shouldHandlerWaitForOther(otherHandler, handler) || !this.awaitingHandlersTags.has(otherHandler.handlerTag)) {
|
|
119
|
-
continue;
|
|
120
|
-
}
|
|
121
|
-
if (newState !== _State.State.END) {
|
|
122
|
-
this.tryActivate(otherHandler);
|
|
123
|
-
continue;
|
|
124
|
-
}
|
|
125
|
-
otherHandler.cancel();
|
|
126
|
-
if (otherHandler.state === _State.State.END) {
|
|
127
|
-
// Handle edge case, where discrete gestures end immediately after activation thus
|
|
128
|
-
// their state is set to END and when the gesture they are waiting for activates they
|
|
129
|
-
// should be cancelled, however `cancel` was never sent as gestures were already in the END state.
|
|
130
|
-
// Send synthetic BEGAN -> CANCELLED to properly handle JS logic
|
|
131
|
-
otherHandler.sendEvent(_State.State.CANCELLED, _State.State.BEGAN);
|
|
132
|
-
}
|
|
133
|
-
otherHandler.awaiting = false;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
if (newState === _State.State.ACTIVE) {
|
|
137
|
-
this.tryActivate(handler);
|
|
138
|
-
} else if (oldState === _State.State.ACTIVE || oldState === _State.State.END) {
|
|
139
|
-
if (handler.active) {
|
|
140
|
-
handler.sendEvent(newState, oldState);
|
|
141
|
-
} else if (oldState === _State.State.ACTIVE && (newState === _State.State.CANCELLED || newState === _State.State.FAILED)) {
|
|
142
|
-
handler.sendEvent(newState, _State.State.BEGAN);
|
|
143
|
-
}
|
|
144
|
-
} else if (oldState !== _State.State.UNDETERMINED || newState !== _State.State.CANCELLED) {
|
|
145
|
-
handler.sendEvent(newState, oldState);
|
|
146
|
-
}
|
|
147
|
-
this.handlingChangeSemaphore -= 1;
|
|
148
|
-
this.scheduleFinishedHandlersCleanup();
|
|
149
|
-
if (!this.awaitingHandlers.includes(handler)) {
|
|
150
|
-
this.cleanupAwaitingHandlers(handler);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
makeActive(handler) {
|
|
154
|
-
const currentState = handler.state;
|
|
155
|
-
handler.active = true;
|
|
156
|
-
handler.shouldResetProgress = true;
|
|
157
|
-
handler.activationIndex = this.activationIndex++;
|
|
158
|
-
for (let i = this.gestureHandlers.length - 1; i >= 0; --i) {
|
|
159
|
-
if (this.shouldHandlerBeCancelledBy(this.gestureHandlers[i], handler)) {
|
|
160
|
-
this.gestureHandlers[i].cancel();
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
for (const otherHandler of this.awaitingHandlers) {
|
|
164
|
-
if (this.shouldHandlerBeCancelledBy(otherHandler, handler)) {
|
|
165
|
-
otherHandler.awaiting = false;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
handler.sendEvent(_State.State.ACTIVE, _State.State.BEGAN);
|
|
169
|
-
if (currentState !== _State.State.ACTIVE) {
|
|
170
|
-
handler.sendEvent(_State.State.END, _State.State.ACTIVE);
|
|
171
|
-
if (currentState !== _State.State.END) {
|
|
172
|
-
handler.sendEvent(_State.State.UNDETERMINED, _State.State.END);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
if (!handler.awaiting) {
|
|
176
|
-
return;
|
|
177
|
-
}
|
|
178
|
-
handler.awaiting = false;
|
|
179
|
-
this.awaitingHandlers = this.awaitingHandlers.filter(otherHandler => otherHandler !== handler);
|
|
180
|
-
}
|
|
181
|
-
addAwaitingHandler(handler) {
|
|
182
|
-
if (this.awaitingHandlers.includes(handler)) {
|
|
183
|
-
return;
|
|
184
|
-
}
|
|
185
|
-
this.awaitingHandlers.push(handler);
|
|
186
|
-
this.awaitingHandlersTags.add(handler.handlerTag);
|
|
187
|
-
handler.awaiting = true;
|
|
188
|
-
handler.activationIndex = this.activationIndex++;
|
|
189
|
-
}
|
|
190
|
-
recordHandlerIfNotPresent(handler) {
|
|
191
|
-
if (this.gestureHandlers.includes(handler)) {
|
|
192
|
-
return;
|
|
193
|
-
}
|
|
194
|
-
this.gestureHandlers.push(handler);
|
|
195
|
-
handler.active = false;
|
|
196
|
-
handler.awaiting = false;
|
|
197
|
-
handler.activationIndex = Number.MAX_SAFE_INTEGER;
|
|
198
|
-
}
|
|
199
|
-
shouldHandlerWaitForOther(handler, otherHandler) {
|
|
200
|
-
return handler !== otherHandler && (handler.shouldWaitForHandlerFailure(otherHandler) || otherHandler.shouldRequireToWaitForFailure(handler));
|
|
201
|
-
}
|
|
202
|
-
canRunSimultaneously(gh1, gh2) {
|
|
203
|
-
return gh1 === gh2 || gh1.shouldRecognizeSimultaneously(gh2) || gh2.shouldRecognizeSimultaneously(gh1);
|
|
204
|
-
}
|
|
205
|
-
shouldHandlerBeCancelledBy(handler, otherHandler) {
|
|
206
|
-
if (this.canRunSimultaneously(handler, otherHandler)) {
|
|
207
|
-
return false;
|
|
208
|
-
}
|
|
209
|
-
if (handler.awaiting || handler.state === _State.State.ACTIVE) {
|
|
210
|
-
return handler.shouldBeCancelledByOther(otherHandler);
|
|
211
|
-
}
|
|
212
|
-
const handlerPointers = handler.getTrackedPointersID();
|
|
213
|
-
const otherPointers = otherHandler.getTrackedPointersID();
|
|
214
|
-
if (!_PointerTracker.default.shareCommonPointers(handlerPointers, otherPointers) && handler.delegate.view !== otherHandler.delegate.view) {
|
|
215
|
-
return this.checkOverlap(handler, otherHandler);
|
|
216
|
-
}
|
|
217
|
-
return true;
|
|
218
|
-
}
|
|
219
|
-
checkOverlap(handler, otherHandler) {
|
|
220
|
-
// If handlers don't have common pointers, default return value is false.
|
|
221
|
-
// However, if at least on pointer overlaps with both handlers, we return true
|
|
222
|
-
// This solves issue in overlapping parents example
|
|
223
|
-
|
|
224
|
-
// TODO: Find better way to handle that issue, for example by activation order and handler cancelling
|
|
225
|
-
|
|
226
|
-
const isPointerWithinBothBounds = pointer => {
|
|
227
|
-
const point = handler.tracker.getLastAbsoluteCoords(pointer);
|
|
228
|
-
return point && handler.delegate.isPointerInBounds(point) && otherHandler.delegate.isPointerInBounds(point);
|
|
229
|
-
};
|
|
230
|
-
return handler.getTrackedPointersID().some(isPointerWithinBothBounds);
|
|
231
|
-
}
|
|
232
|
-
isFinished(state) {
|
|
233
|
-
return state === _State.State.END || state === _State.State.FAILED || state === _State.State.CANCELLED;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
// This function is called when handler receives touchdown event
|
|
237
|
-
// If handler is using mouse or pen as a pointer and any handler receives touch event,
|
|
238
|
-
// mouse/pen event dissappears - it doesn't send onPointerCancel nor onPointerUp (and others)
|
|
239
|
-
// This became a problem because handler was left at active state without any signal to end or fail
|
|
240
|
-
// To handle this, when new touch event is received, we loop through active handlers and check which type of
|
|
241
|
-
// pointer they're using. If there are any handler with mouse/pen as a pointer, we cancel them
|
|
242
|
-
cancelMouseAndPenGestures(currentHandler) {
|
|
243
|
-
this.gestureHandlers.forEach(handler => {
|
|
244
|
-
if (handler.pointerType !== _PointerType.PointerType.MOUSE && handler.pointerType !== _PointerType.PointerType.STYLUS) {
|
|
245
|
-
return;
|
|
246
|
-
}
|
|
247
|
-
if (handler !== currentHandler) {
|
|
248
|
-
handler.cancel();
|
|
249
|
-
} else {
|
|
250
|
-
// Handler that received touch event should have its pointer tracker reset
|
|
251
|
-
// This allows handler to smoothly change from mouse/pen to touch
|
|
252
|
-
// The drawback is, that when we try to use mouse/pen one more time, it doesn't send onPointerDown at the first time
|
|
253
|
-
// so it is required to click two times to get handler to work
|
|
254
|
-
//
|
|
255
|
-
// However, handler will receive manually created onPointerEnter that is triggered in EventManager in onPointerMove method.
|
|
256
|
-
// There may be possibility to use that fact to make handler respond properly to first mouse click
|
|
257
|
-
handler.tracker.resetTracker();
|
|
258
|
-
}
|
|
259
|
-
});
|
|
260
|
-
}
|
|
261
|
-
static get instance() {
|
|
262
|
-
if (!GestureHandlerOrchestrator._instance) {
|
|
263
|
-
GestureHandlerOrchestrator._instance = new GestureHandlerOrchestrator();
|
|
264
|
-
}
|
|
265
|
-
return GestureHandlerOrchestrator._instance;
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
exports.default = GestureHandlerOrchestrator;
|
|
269
|
-
//# sourceMappingURL=GestureHandlerOrchestrator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_PointerType","require","_State","_PointerTracker","_interopRequireDefault","e","__esModule","default","GestureHandlerOrchestrator","gestureHandlers","awaitingHandlers","awaitingHandlersTags","Set","handlingChangeSemaphore","activationIndex","constructor","scheduleFinishedHandlersCleanup","queueMicrotask","cleanupFinishedHandlers","cleanHandler","handler","reset","active","awaiting","Number","MAX_VALUE","removeHandlerFromOrchestrator","indexInGestureHandlers","indexOf","indexInAwaitingHandlers","splice","delete","handlerTag","handlersToRemove","i","length","isFinished","state","add","filter","has","hasOtherHandlerToWaitFor","hasToWaitFor","otherHandler","shouldHandlerWaitForOther","some","shouldBeCancelledByFinishedHandler","shouldBeCancelled","State","END","tryActivate","cancel","addAwaitingHandler","handlerState","CANCELLED","FAILED","shouldActivate","makeActive","ACTIVE","fail","BEGAN","shouldBeCancelledBy","shouldHandlerBeCancelledBy","cleanupAwaitingHandlers","shouldWait","onHandlerStateChange","newState","oldState","sendIfDisabled","enabled","sendEvent","UNDETERMINED","includes","currentState","shouldResetProgress","push","recordHandlerIfNotPresent","MAX_SAFE_INTEGER","shouldWaitForHandlerFailure","shouldRequireToWaitForFailure","canRunSimultaneously","gh1","gh2","shouldRecognizeSimultaneously","shouldBeCancelledByOther","handlerPointers","getTrackedPointersID","otherPointers","PointerTracker","shareCommonPointers","delegate","view","checkOverlap","isPointerWithinBothBounds","pointer","point","tracker","getLastAbsoluteCoords","isPointerInBounds","cancelMouseAndPenGestures","currentHandler","forEach","pointerType","PointerType","MOUSE","STYLUS","resetTracker","instance","_instance","exports"],"sourceRoot":"../../../../src","sources":["web/tools/GestureHandlerOrchestrator.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAGA,IAAAE,eAAA,GAAAC,sBAAA,CAAAH,OAAA;AAA8C,SAAAG,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,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AACnG,0BAA0B,CAACoG,SAAS,EAAE;MACzCpG,0BAA0B,CAACoG,SAAS,GAAG,IAAIpG,0BAA0B,CAAC,CAAC;IACzE;IAEA,OAAOA,0BAA0B,CAACoG,SAAS;EAC7C;AACF;AAACC,OAAA,CAAAtG,OAAA,GAAAC,0BAAA","ignoreList":[]}
|
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.GestureHandlerWebDelegate = void 0;
|
|
7
|
-
var _findNodeHandle = _interopRequireDefault(require("../../findNodeHandle"));
|
|
8
|
-
var _PointerEventManager = _interopRequireDefault(require("./PointerEventManager"));
|
|
9
|
-
var _State = require("../../State");
|
|
10
|
-
var _utils = require("../utils");
|
|
11
|
-
var _gestureHandlerCommon = require("../../handlers/gestureHandlerCommon");
|
|
12
|
-
var _KeyboardEventManager = _interopRequireDefault(require("./KeyboardEventManager"));
|
|
13
|
-
var _WheelEventManager = _interopRequireDefault(require("./WheelEventManager"));
|
|
14
|
-
var _utils2 = require("../../utils");
|
|
15
|
-
var _types = require("../../v3/types");
|
|
16
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
-
class GestureHandlerWebDelegate {
|
|
18
|
-
isInitialized = false;
|
|
19
|
-
_view = null;
|
|
20
|
-
eventManagers = [];
|
|
21
|
-
defaultViewStyles = {
|
|
22
|
-
userSelect: '',
|
|
23
|
-
touchAction: ''
|
|
24
|
-
};
|
|
25
|
-
areContextMenuListenersAdded = false;
|
|
26
|
-
wasContextMenuEnabled = false;
|
|
27
|
-
init(viewRef, handler) {
|
|
28
|
-
if (!viewRef) {
|
|
29
|
-
throw new Error(`Cannot find HTML Element for handler ${handler.handlerTag}`);
|
|
30
|
-
}
|
|
31
|
-
this.gestureHandler = handler;
|
|
32
|
-
this.view = (0, _findNodeHandle.default)(viewRef);
|
|
33
|
-
this.defaultViewStyles = {
|
|
34
|
-
userSelect: this.view.style.userSelect,
|
|
35
|
-
touchAction: this.view.style.touchAction
|
|
36
|
-
};
|
|
37
|
-
const shouldSendHoverEvents = handler.name === _types.SingleGestureName.Hover;
|
|
38
|
-
this.eventManagers.push(new _PointerEventManager.default(this.view, shouldSendHoverEvents));
|
|
39
|
-
this.eventManagers.push(new _KeyboardEventManager.default(this.view));
|
|
40
|
-
this.eventManagers.push(new _WheelEventManager.default(this.view));
|
|
41
|
-
this.eventManagers.forEach(manager => this.gestureHandler.attachEventManager(manager));
|
|
42
|
-
this.updateDOM();
|
|
43
|
-
this.isInitialized = true;
|
|
44
|
-
}
|
|
45
|
-
detach() {
|
|
46
|
-
this.restoreDefaultViewStyles();
|
|
47
|
-
this.defaultViewStyles = {
|
|
48
|
-
userSelect: '',
|
|
49
|
-
touchAction: ''
|
|
50
|
-
};
|
|
51
|
-
this.eventManagers.forEach(manager => {
|
|
52
|
-
manager.setEnabled(false);
|
|
53
|
-
});
|
|
54
|
-
this.removeContextMenuListeners();
|
|
55
|
-
this._view = null;
|
|
56
|
-
this.eventManagers = [];
|
|
57
|
-
this.isInitialized = false;
|
|
58
|
-
}
|
|
59
|
-
restoreDefaultViewStyles() {
|
|
60
|
-
this.ensureView(this.view);
|
|
61
|
-
this.view.style['userSelect'] = this.defaultViewStyles.userSelect;
|
|
62
|
-
this.view.style['webkitUserSelect'] = this.defaultViewStyles.userSelect;
|
|
63
|
-
this.view.style['touchAction'] = this.defaultViewStyles.touchAction;
|
|
64
|
-
// @ts-ignore This one disables default events on Safari
|
|
65
|
-
this.view.style['WebkitTouchCallout'] = this.defaultViewStyles.touchAction;
|
|
66
|
-
}
|
|
67
|
-
updateDOM() {
|
|
68
|
-
this.setUserSelect();
|
|
69
|
-
this.setTouchAction();
|
|
70
|
-
this.setContextMenu();
|
|
71
|
-
}
|
|
72
|
-
isPointerInBounds({
|
|
73
|
-
x,
|
|
74
|
-
y
|
|
75
|
-
}) {
|
|
76
|
-
if (!this.view) {
|
|
77
|
-
return false;
|
|
78
|
-
}
|
|
79
|
-
return (0, _utils.isPointerInBounds)(this.view, {
|
|
80
|
-
x,
|
|
81
|
-
y
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
measureView() {
|
|
85
|
-
if (!this.view) {
|
|
86
|
-
throw new Error((0, _utils2.tagMessage)('Cannot measure a null view'));
|
|
87
|
-
}
|
|
88
|
-
const rect = this.view.getBoundingClientRect();
|
|
89
|
-
return {
|
|
90
|
-
pageX: rect.left,
|
|
91
|
-
pageY: rect.top,
|
|
92
|
-
width: rect.width,
|
|
93
|
-
height: rect.height
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
reset() {
|
|
97
|
-
this.eventManagers.forEach(manager => manager.resetManager());
|
|
98
|
-
}
|
|
99
|
-
tryResetCursor() {
|
|
100
|
-
const activeCursor = this.gestureHandler.activeCursor;
|
|
101
|
-
if (activeCursor && activeCursor !== 'auto' && this.gestureHandler.state === _State.State.ACTIVE && this.view) {
|
|
102
|
-
this.view.style.cursor = 'auto';
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
shouldDisableContextMenu() {
|
|
106
|
-
return this.gestureHandler.enableContextMenu === undefined && this.gestureHandler.isButtonInConfig(_gestureHandlerCommon.MouseButton.RIGHT) || this.gestureHandler.enableContextMenu === false;
|
|
107
|
-
}
|
|
108
|
-
addContextMenuListeners() {
|
|
109
|
-
this.ensureView(this.view);
|
|
110
|
-
if (this.areContextMenuListenersAdded) {
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
if (this.shouldDisableContextMenu()) {
|
|
114
|
-
this.wasContextMenuEnabled = false;
|
|
115
|
-
this.view.addEventListener('contextmenu', this.disableContextMenu);
|
|
116
|
-
this.areContextMenuListenersAdded = true;
|
|
117
|
-
} else if (this.gestureHandler.enableContextMenu) {
|
|
118
|
-
this.wasContextMenuEnabled = true;
|
|
119
|
-
this.view.addEventListener('contextmenu', this.enableContextMenu);
|
|
120
|
-
this.areContextMenuListenersAdded = true;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
removeContextMenuListeners() {
|
|
124
|
-
if (!this.initialized || !this.areContextMenuListenersAdded) {
|
|
125
|
-
return;
|
|
126
|
-
}
|
|
127
|
-
this.ensureView(this.view);
|
|
128
|
-
if (!this.areContextMenuListenersAdded) {
|
|
129
|
-
return;
|
|
130
|
-
}
|
|
131
|
-
if (!this.wasContextMenuEnabled) {
|
|
132
|
-
this.view.removeEventListener('contextmenu', this.disableContextMenu);
|
|
133
|
-
this.areContextMenuListenersAdded = false;
|
|
134
|
-
} else {
|
|
135
|
-
this.view.removeEventListener('contextmenu', this.enableContextMenu);
|
|
136
|
-
this.areContextMenuListenersAdded = false;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
disableContextMenu(e) {
|
|
140
|
-
e.preventDefault();
|
|
141
|
-
}
|
|
142
|
-
enableContextMenu(e) {
|
|
143
|
-
e.stopPropagation();
|
|
144
|
-
}
|
|
145
|
-
setUserSelect() {
|
|
146
|
-
const userSelect = this.gestureHandler.userSelect;
|
|
147
|
-
this.ensureView(this.view);
|
|
148
|
-
this.view.style['userSelect'] = this.gestureHandler.enabled ? userSelect ?? 'none' : this.defaultViewStyles.userSelect;
|
|
149
|
-
this.view.style['webkitUserSelect'] = this.gestureHandler.enabled ? userSelect ?? 'none' : this.defaultViewStyles.userSelect;
|
|
150
|
-
}
|
|
151
|
-
setTouchAction() {
|
|
152
|
-
const touchAction = this.gestureHandler.touchAction;
|
|
153
|
-
this.ensureView(this.view);
|
|
154
|
-
this.view.style['touchAction'] = this.gestureHandler.enabled ? touchAction ?? 'none' : this.defaultViewStyles.touchAction;
|
|
155
|
-
|
|
156
|
-
// @ts-ignore This one disables default events on Safari
|
|
157
|
-
this.view.style['WebkitTouchCallout'] = this.gestureHandler.enabled ? touchAction ?? 'none' : this.defaultViewStyles.touchAction;
|
|
158
|
-
}
|
|
159
|
-
setContextMenu() {
|
|
160
|
-
if (!this.gestureHandler.enabled) {
|
|
161
|
-
this.removeContextMenuListeners();
|
|
162
|
-
return;
|
|
163
|
-
}
|
|
164
|
-
if (!this.wasContextMenuEnabled) {
|
|
165
|
-
this.removeContextMenuListeners();
|
|
166
|
-
}
|
|
167
|
-
this.addContextMenuListeners();
|
|
168
|
-
}
|
|
169
|
-
onEnabledChange() {
|
|
170
|
-
if (!this.isInitialized) {
|
|
171
|
-
return;
|
|
172
|
-
}
|
|
173
|
-
this.updateDOM();
|
|
174
|
-
this.eventManagers.forEach(manager => {
|
|
175
|
-
manager.setEnabled(this.gestureHandler.enabled);
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
onBegin() {
|
|
179
|
-
// no-op for now
|
|
180
|
-
}
|
|
181
|
-
onActivate() {
|
|
182
|
-
this.ensureView(this.view);
|
|
183
|
-
if ((!this.view.style.cursor || this.view.style.cursor === 'auto') && this.gestureHandler.activeCursor) {
|
|
184
|
-
this.view.style.cursor = this.gestureHandler.activeCursor;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
onEnd() {
|
|
188
|
-
this.tryResetCursor();
|
|
189
|
-
}
|
|
190
|
-
onCancel() {
|
|
191
|
-
this.tryResetCursor();
|
|
192
|
-
}
|
|
193
|
-
onFail() {
|
|
194
|
-
this.tryResetCursor();
|
|
195
|
-
}
|
|
196
|
-
destroy() {
|
|
197
|
-
this.removeContextMenuListeners();
|
|
198
|
-
this.eventManagers.forEach(manager => {
|
|
199
|
-
manager.unregisterListeners();
|
|
200
|
-
});
|
|
201
|
-
this.isInitialized = false;
|
|
202
|
-
}
|
|
203
|
-
ensureView(view) {
|
|
204
|
-
if (!view) {
|
|
205
|
-
throw new Error((0, _utils2.tagMessage)('Expected delegate view to be HTMLElement'));
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
get view() {
|
|
209
|
-
return this._view;
|
|
210
|
-
}
|
|
211
|
-
set view(value) {
|
|
212
|
-
this._view = value;
|
|
213
|
-
}
|
|
214
|
-
get initialized() {
|
|
215
|
-
return this.isInitialized;
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
exports.GestureHandlerWebDelegate = GestureHandlerWebDelegate;
|
|
219
|
-
//# sourceMappingURL=GestureHandlerWebDelegate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_findNodeHandle","_interopRequireDefault","require","_PointerEventManager","_State","_utils","_gestureHandlerCommon","_KeyboardEventManager","_WheelEventManager","_utils2","_types","e","__esModule","default","GestureHandlerWebDelegate","isInitialized","_view","eventManagers","defaultViewStyles","userSelect","touchAction","areContextMenuListenersAdded","wasContextMenuEnabled","init","viewRef","handler","Error","handlerTag","gestureHandler","view","findNodeHandle","style","shouldSendHoverEvents","name","SingleGestureName","Hover","push","PointerEventManager","KeyboardEventManager","WheelEventManager","forEach","manager","attachEventManager","updateDOM","detach","restoreDefaultViewStyles","setEnabled","removeContextMenuListeners","ensureView","setUserSelect","setTouchAction","setContextMenu","isPointerInBounds","x","y","measureView","tagMessage","rect","getBoundingClientRect","pageX","left","pageY","top","width","height","reset","resetManager","tryResetCursor","activeCursor","state","State","ACTIVE","cursor","shouldDisableContextMenu","enableContextMenu","undefined","isButtonInConfig","MouseButton","RIGHT","addContextMenuListeners","addEventListener","disableContextMenu","initialized","removeEventListener","preventDefault","stopPropagation","enabled","onEnabledChange","onBegin","onActivate","onEnd","onCancel","onFail","destroy","unregisterListeners","value","exports"],"sourceRoot":"../../../../src","sources":["web/tools/GestureHandlerWebDelegate.ts"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AAMA,IAAAC,oBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAEA,IAAAI,qBAAA,GAAAJ,OAAA;AACA,IAAAK,qBAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,kBAAA,G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AC;IAEF,IAAI,CAAC/E,aAAa,GAAG,KAAK;EAC5B;EAEQiC,UAAUA,CAACnB,IAAS,EAA+B;IACzD,IAAI,CAACA,IAAI,EAAE;MACT,MAAM,IAAIH,KAAK,CAAC,IAAA8B,kBAAU,EAAC,0CAA0C,CAAC,CAAC;IACzE;EACF;EAEA,IAAW3B,IAAIA,CAAA,EAAuB;IACpC,OAAO,IAAI,CAACb,KAAK;EACnB;EAEA,IAAWa,IAAIA,CAACkE,KAAkB,EAAE;IAClC,IAAI,CAAC/E,KAAK,GAAG+E,KAAK;EACpB;EAEA,IAAIb,WAAWA,CAAA,EAAY;IACzB,OAAO,IAAI,CAACnE,aAAa;EAC3B;AACF;AAACiF,OAAA,CAAAlF,yBAAA,GAAAA,yBAAA","ignoreList":[]}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _types = require("../../v3/types");
|
|
8
|
-
class InteractionManager {
|
|
9
|
-
waitForRelations = new Map();
|
|
10
|
-
simultaneousRelations = new Map();
|
|
11
|
-
blocksHandlersRelations = new Map();
|
|
12
|
-
|
|
13
|
-
// Private becaues of singleton
|
|
14
|
-
// eslint-disable-next-line no-useless-constructor, @typescript-eslint/no-empty-function
|
|
15
|
-
constructor() {}
|
|
16
|
-
configureInteractions(handler, config) {
|
|
17
|
-
this.dropRelationsForHandlerWithTag(handler.handlerTag);
|
|
18
|
-
if (config.waitFor) {
|
|
19
|
-
const waitFor = [];
|
|
20
|
-
config.waitFor.forEach(otherHandler => {
|
|
21
|
-
waitFor.push(typeof otherHandler === 'number' ? otherHandler : otherHandler.handlerTag);
|
|
22
|
-
});
|
|
23
|
-
this.waitForRelations.set(handler.handlerTag, waitFor);
|
|
24
|
-
}
|
|
25
|
-
if (config.simultaneousHandlers) {
|
|
26
|
-
const simultaneousHandlers = [];
|
|
27
|
-
config.simultaneousHandlers.forEach(otherHandler => {
|
|
28
|
-
simultaneousHandlers.push(typeof otherHandler === 'number' ? otherHandler : otherHandler.handlerTag);
|
|
29
|
-
});
|
|
30
|
-
this.simultaneousRelations.set(handler.handlerTag, simultaneousHandlers);
|
|
31
|
-
}
|
|
32
|
-
if (config.blocksHandlers) {
|
|
33
|
-
const blocksHandlers = [];
|
|
34
|
-
config.blocksHandlers.forEach(otherHandler => {
|
|
35
|
-
blocksHandlers.push(typeof otherHandler === 'number' ? otherHandler : otherHandler.handlerTag);
|
|
36
|
-
});
|
|
37
|
-
this.blocksHandlersRelations.set(handler.handlerTag, blocksHandlers);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
shouldWaitForHandlerFailure(handler, otherHandler) {
|
|
41
|
-
const waitFor = this.waitForRelations.get(handler.handlerTag);
|
|
42
|
-
return waitFor?.find(tag => {
|
|
43
|
-
return tag === otherHandler.handlerTag;
|
|
44
|
-
}) !== undefined;
|
|
45
|
-
}
|
|
46
|
-
shouldRecognizeSimultaneously(handler, otherHandler) {
|
|
47
|
-
const simultaneousHandlers = this.simultaneousRelations.get(handler.handlerTag);
|
|
48
|
-
return simultaneousHandlers?.find(tag => {
|
|
49
|
-
return tag === otherHandler.handlerTag;
|
|
50
|
-
}) !== undefined;
|
|
51
|
-
}
|
|
52
|
-
shouldRequireHandlerToWaitForFailure(handler, otherHandler) {
|
|
53
|
-
const waitFor = this.blocksHandlersRelations.get(handler.handlerTag);
|
|
54
|
-
return waitFor?.find(tag => {
|
|
55
|
-
return tag === otherHandler.handlerTag;
|
|
56
|
-
}) !== undefined;
|
|
57
|
-
}
|
|
58
|
-
shouldHandlerBeCancelledBy(_handler, otherHandler) {
|
|
59
|
-
// We check constructor name instead of using `instanceof` in order do avoid circular dependencies
|
|
60
|
-
const isNativeHandler = otherHandler.name === _types.SingleGestureName.Native;
|
|
61
|
-
const isActive = otherHandler.active;
|
|
62
|
-
const isButton = otherHandler.isButton?.() === true;
|
|
63
|
-
return isNativeHandler && isActive && !isButton;
|
|
64
|
-
}
|
|
65
|
-
dropRelationsForHandlerWithTag(handlerTag) {
|
|
66
|
-
this.waitForRelations.delete(handlerTag);
|
|
67
|
-
this.simultaneousRelations.delete(handlerTag);
|
|
68
|
-
this.blocksHandlersRelations.delete(handlerTag);
|
|
69
|
-
}
|
|
70
|
-
reset() {
|
|
71
|
-
this.waitForRelations.clear();
|
|
72
|
-
this.simultaneousRelations.clear();
|
|
73
|
-
this.blocksHandlersRelations.clear();
|
|
74
|
-
}
|
|
75
|
-
static get instance() {
|
|
76
|
-
if (!this._instance) {
|
|
77
|
-
this._instance = new InteractionManager();
|
|
78
|
-
}
|
|
79
|
-
return this._instance;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
exports.default = InteractionManager;
|
|
83
|
-
//# sourceMappingURL=InteractionManager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_types","require","InteractionManager","waitForRelations","Map","simultaneousRelations","blocksHandlersRelations","constructor","configureInteractions","handler","config","dropRelationsForHandlerWithTag","handlerTag","waitFor","forEach","otherHandler","push","set","simultaneousHandlers","blocksHandlers","shouldWaitForHandlerFailure","get","find","tag","undefined","shouldRecognizeSimultaneously","shouldRequireHandlerToWaitForFailure","shouldHandlerBeCancelledBy","_handler","isNativeHandler","name","SingleGestureName","Native","isActive","active","isButton","delete","reset","clear","instance","_instance","exports","default"],"sourceRoot":"../../../../src","sources":["web/tools/InteractionManager.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAIe,MAAMC,kBAAkB,CAAC;EAErBC,gBAAgB,GAA0B,IAAIC,GAAG,CAAC,CAAC;EACnDC,qBAAqB,GAA0B,IAAID,GAAG,CAAC,CAAC;EACxDE,uBAAuB,GAA0B,IAAIF,GAAG,CAAC,CAAC;;EAE3E;EACA;EACQG,WAAWA,CAAA,EAAG,CAAC;EAEhBC,qBAAqBA,CAC1B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