react-native-gesture-handler 2.25.0 → 2.26.0
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/RNGestureHandler.podspec +1 -0
- package/android/build.gradle +41 -42
- package/android/fabric/src/main/java/com/swmansion/gesturehandler/ReactContextExtensions.kt +1 -1
- package/android/gradle.properties +1 -1
- package/android/noreanimated/src/main/java/com/swmansion/gesturehandler/ReanimatedEventDispatcher.kt +2 -2
- package/android/paper/src/main/java/com/swmansion/gesturehandler/ReactContextExtensions.kt +4 -1
- package/android/reanimated/src/main/java/com/swmansion/gesturehandler/ReanimatedEventDispatcher.kt +1 -1
- package/android/{package77/src → src}/main/java/com/swmansion/gesturehandler/RNGestureHandlerPackage.kt +14 -19
- package/android/src/main/java/com/swmansion/gesturehandler/core/FlingGestureHandler.kt +29 -5
- package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandler.kt +229 -114
- package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerInteractionController.kt +4 -4
- package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerOrchestrator.kt +91 -49
- package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerRegistry.kt +1 -1
- package/android/src/main/java/com/swmansion/gesturehandler/core/GestureUtils.kt +13 -4
- package/android/src/main/java/com/swmansion/gesturehandler/core/HoverGestureHandler.kt +20 -6
- package/android/src/main/java/com/swmansion/gesturehandler/core/LongPressGestureHandler.kt +52 -21
- package/android/src/main/java/com/swmansion/gesturehandler/core/ManualGestureHandler.kt +12 -1
- package/android/src/main/java/com/swmansion/gesturehandler/core/NativeViewGestureHandler.kt +65 -35
- package/android/src/main/java/com/swmansion/gesturehandler/core/OnTouchEventListener.kt +3 -3
- package/android/src/main/java/com/swmansion/gesturehandler/core/PanGestureHandler.kt +187 -92
- package/android/src/main/java/com/swmansion/gesturehandler/core/PinchGestureHandler.kt +12 -5
- package/android/src/main/java/com/swmansion/gesturehandler/core/PointerEventsConfig.kt +1 -1
- package/android/src/main/java/com/swmansion/gesturehandler/core/RotationGestureDetector.kt +3 -1
- package/android/src/main/java/com/swmansion/gesturehandler/core/RotationGestureHandler.kt +12 -5
- package/android/src/main/java/com/swmansion/gesturehandler/core/StylusData.kt +1 -1
- package/android/src/main/java/com/swmansion/gesturehandler/core/TapGestureHandler.kt +55 -33
- package/android/src/main/java/com/swmansion/gesturehandler/core/Vector.kt +13 -18
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.kt +27 -21
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEnabledRootView.kt +7 -2
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEvent.kt +13 -12
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEventDispatcher.kt +189 -0
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerFactoryUtil.kt +34 -0
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerInteractionManager.kt +7 -11
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.kt +29 -590
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRegistry.kt +8 -14
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootHelper.kt +26 -16
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootView.kt +15 -12
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootViewManager.kt +2 -4
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerStateChangeEvent.kt +17 -16
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerTouchEvent.kt +6 -4
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNViewConfigurationHelper.kt +7 -5
- package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/FlingGestureHandlerEventDataBuilder.kt +2 -1
- package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/GestureHandlerEventDataBuilder.kt +1 -1
- package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/HoverGestureHandlerEventDataBuilder.kt +2 -1
- package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/LongPressGestureHandlerEventDataBuilder.kt +2 -1
- package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/ManualGestureHandlerEventDataBuilder.kt +2 -1
- package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/NativeGestureHandlerEventDataBuilder.kt +2 -1
- package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/PanGestureHandlerEventDataBuilder.kt +2 -1
- package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/PinchGestureHandlerEventDataBuilder.kt +2 -1
- package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/RotationGestureHandlerEventDataBuilder.kt +2 -1
- package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/TapGestureHandlerEventDataBuilder.kt +2 -1
- package/android/src/main/jni/CMakeLists.txt +10 -1
- package/android/svg/src/main/java/com/swmansion/gesturehandler/RNSVGHitTester.kt +1 -3
- package/apple/RNGestureHandlerButton.mm +6 -2
- package/lib/commonjs/ActionType.js +3 -3
- package/lib/commonjs/ActionType.js.map +1 -1
- package/lib/commonjs/Directions.js +11 -8
- package/lib/commonjs/Directions.js.map +1 -1
- package/lib/commonjs/EnableNewWebImplementation.js +2 -10
- package/lib/commonjs/EnableNewWebImplementation.js.map +1 -1
- package/lib/commonjs/GestureHandlerRootViewContext.js +2 -7
- package/lib/commonjs/GestureHandlerRootViewContext.js.map +1 -1
- package/lib/commonjs/PlatformConstants.js +1 -7
- package/lib/commonjs/PlatformConstants.js.map +1 -1
- package/lib/commonjs/PlatformConstants.web.js +1 -3
- package/lib/commonjs/PlatformConstants.web.js.map +1 -1
- package/lib/commonjs/PointerType.js +3 -5
- package/lib/commonjs/PointerType.js.map +1 -1
- package/lib/commonjs/RNGestureHandlerModule.js +2 -6
- package/lib/commonjs/RNGestureHandlerModule.js.map +1 -1
- package/lib/commonjs/RNGestureHandlerModule.web.js +10 -37
- package/lib/commonjs/RNGestureHandlerModule.web.js.map +1 -1
- package/lib/commonjs/RNGestureHandlerModule.windows.js +22 -32
- package/lib/commonjs/RNGestureHandlerModule.windows.js.map +1 -1
- package/lib/commonjs/RNRenderer.js +1 -3
- package/lib/commonjs/RNRenderer.js.map +1 -1
- package/lib/commonjs/RNRenderer.web.js +1 -2
- package/lib/commonjs/RNRenderer.web.js.map +1 -1
- package/lib/commonjs/State.js +4 -3
- package/lib/commonjs/State.js.map +1 -1
- package/lib/commonjs/TouchEventType.js +3 -3
- package/lib/commonjs/TouchEventType.js.map +1 -1
- package/lib/commonjs/components/DrawerLayout.js +436 -462
- package/lib/commonjs/components/DrawerLayout.js.map +1 -1
- package/lib/commonjs/components/GestureButtons.js +123 -181
- package/lib/commonjs/components/GestureButtons.js.map +1 -1
- package/lib/commonjs/components/GestureButtonsProps.js.map +1 -1
- package/lib/commonjs/components/GestureComponents.js +36 -45
- package/lib/commonjs/components/GestureComponents.js.map +1 -1
- package/lib/commonjs/components/GestureComponents.web.js +19 -32
- package/lib/commonjs/components/GestureComponents.web.js.map +1 -1
- package/lib/commonjs/components/GestureHandlerButton.js +2 -6
- package/lib/commonjs/components/GestureHandlerButton.js.map +1 -1
- package/lib/commonjs/components/GestureHandlerButton.web.js +6 -14
- package/lib/commonjs/components/GestureHandlerButton.web.js.map +1 -1
- package/lib/commonjs/components/GestureHandlerRootView.android.js +10 -20
- package/lib/commonjs/components/GestureHandlerRootView.android.js.map +1 -1
- package/lib/commonjs/components/GestureHandlerRootView.js +10 -19
- package/lib/commonjs/components/GestureHandlerRootView.js.map +1 -1
- package/lib/commonjs/components/GestureHandlerRootView.web.js +10 -18
- package/lib/commonjs/components/GestureHandlerRootView.web.js.map +1 -1
- package/lib/commonjs/components/Pressable/Pressable.js +72 -118
- package/lib/commonjs/components/Pressable/Pressable.js.map +1 -1
- package/lib/commonjs/components/Pressable/PressableProps.js.map +1 -1
- package/lib/commonjs/components/Pressable/index.js +1 -3
- package/lib/commonjs/components/Pressable/index.js.map +1 -1
- package/lib/commonjs/components/Pressable/utils.js +16 -38
- package/lib/commonjs/components/Pressable/utils.js.map +1 -1
- package/lib/commonjs/components/ReanimatedDrawerLayout.js +72 -108
- package/lib/commonjs/components/ReanimatedDrawerLayout.js.map +1 -1
- package/lib/commonjs/components/ReanimatedSwipeable.js +81 -102
- package/lib/commonjs/components/ReanimatedSwipeable.js.map +1 -1
- package/lib/commonjs/components/Swipeable.js +290 -335
- package/lib/commonjs/components/Swipeable.js.map +1 -1
- package/lib/commonjs/components/Text.js +23 -34
- package/lib/commonjs/components/Text.js.map +1 -1
- package/lib/commonjs/components/gestureHandlerRootHOC.js +11 -17
- package/lib/commonjs/components/gestureHandlerRootHOC.js.map +1 -1
- package/lib/commonjs/components/touchables/ExtraButtonProps.js.map +1 -1
- package/lib/commonjs/components/touchables/GenericTouchable.js +95 -140
- package/lib/commonjs/components/touchables/GenericTouchable.js.map +1 -1
- package/lib/commonjs/components/touchables/GenericTouchableProps.js.map +1 -1
- package/lib/commonjs/components/touchables/TouchableHighlight.js +51 -69
- package/lib/commonjs/components/touchables/TouchableHighlight.js.map +1 -1
- package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js +38 -56
- package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js.map +1 -1
- package/lib/commonjs/components/touchables/TouchableNativeFeedback.js +1 -4
- package/lib/commonjs/components/touchables/TouchableNativeFeedback.js.map +1 -1
- package/lib/commonjs/components/touchables/TouchableNativeFeedbackProps.js.map +1 -1
- package/lib/commonjs/components/touchables/TouchableOpacity.js +39 -53
- package/lib/commonjs/components/touchables/TouchableOpacity.js.map +1 -1
- package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js +11 -15
- package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js.map +1 -1
- package/lib/commonjs/components/touchables/index.js +7 -12
- package/lib/commonjs/components/touchables/index.js.map +1 -1
- package/lib/commonjs/components/utils.js +17 -0
- package/lib/commonjs/components/utils.js.map +1 -0
- package/lib/commonjs/findNodeHandle.js +1 -4
- package/lib/commonjs/findNodeHandle.js.map +1 -1
- package/lib/commonjs/findNodeHandle.web.js +7 -16
- package/lib/commonjs/findNodeHandle.web.js.map +1 -1
- package/lib/commonjs/getShadowNodeFromRef.js +19 -20
- package/lib/commonjs/getShadowNodeFromRef.js.map +1 -1
- package/lib/commonjs/getShadowNodeFromRef.web.js +0 -1
- package/lib/commonjs/getShadowNodeFromRef.web.js.map +1 -1
- package/lib/commonjs/ghQueueMicrotask.js +1 -2
- package/lib/commonjs/ghQueueMicrotask.js.map +1 -1
- package/lib/commonjs/handlers/FlingGestureHandler.js +9 -11
- package/lib/commonjs/handlers/FlingGestureHandler.js.map +1 -1
- package/lib/commonjs/handlers/ForceTouchGestureHandler.js +16 -23
- package/lib/commonjs/handlers/ForceTouchGestureHandler.js.map +1 -1
- package/lib/commonjs/handlers/GestureHandlerEventPayload.js.map +1 -1
- package/lib/commonjs/handlers/LongPressGestureHandler.js +9 -11
- package/lib/commonjs/handlers/LongPressGestureHandler.js.map +1 -1
- package/lib/commonjs/handlers/NativeViewGestureHandler.ts +59 -0
- package/lib/commonjs/handlers/PanGestureHandler.js +13 -32
- package/lib/commonjs/handlers/PanGestureHandler.js.map +1 -1
- package/lib/commonjs/handlers/PinchGestureHandler.js +7 -9
- package/lib/commonjs/handlers/PinchGestureHandler.js.map +1 -1
- package/lib/commonjs/handlers/PressabilityDebugView.js +0 -1
- package/lib/commonjs/handlers/PressabilityDebugView.js.map +1 -1
- package/lib/commonjs/handlers/PressabilityDebugView.web.js +0 -1
- package/lib/commonjs/handlers/PressabilityDebugView.web.js.map +1 -1
- package/lib/commonjs/handlers/RotationGestureHandler.js +7 -9
- package/lib/commonjs/handlers/RotationGestureHandler.js.map +1 -1
- package/lib/commonjs/handlers/TapGestureHandler.js +9 -11
- package/lib/commonjs/handlers/TapGestureHandler.js.map +1 -1
- package/lib/commonjs/handlers/createHandler.js +128 -229
- package/lib/commonjs/handlers/createHandler.js.map +1 -1
- package/lib/commonjs/handlers/createNativeWrapper.js +26 -35
- package/lib/commonjs/handlers/createNativeWrapper.js.map +1 -1
- package/lib/commonjs/handlers/customDirectEventTypes.js +0 -1
- package/lib/commonjs/handlers/customDirectEventTypes.js.map +1 -1
- package/lib/commonjs/handlers/customDirectEventTypes.web.js +1 -2
- package/lib/commonjs/handlers/customDirectEventTypes.web.js.map +1 -1
- package/lib/commonjs/handlers/gestureHandlerCommon.js +9 -10
- package/lib/commonjs/handlers/gestureHandlerCommon.js.map +1 -1
- package/lib/commonjs/handlers/gestureHandlerTypesCompat.js.map +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.js +5 -15
- package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.js.map +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.web.js +14 -22
- package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.web.js.map +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/attachHandlers.js +9 -29
- package/lib/commonjs/handlers/gestures/GestureDetector/attachHandlers.js.map +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/dropHandlers.js +1 -10
- package/lib/commonjs/handlers/gestures/GestureDetector/dropHandlers.js.map +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/index.js +19 -42
- package/lib/commonjs/handlers/gestures/GestureDetector/index.js.map +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/needsToReattach.js +0 -3
- package/lib/commonjs/handlers/gestures/GestureDetector/needsToReattach.js.map +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/types.js.map +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js +15 -26
- package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js.map +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js +13 -50
- package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/useDetectorUpdater.js +3 -13
- package/lib/commonjs/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/useMountReactions.js +2 -9
- package/lib/commonjs/handlers/gestures/GestureDetector/useMountReactions.js.map +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js +6 -14
- package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/utils.js +23 -52
- package/lib/commonjs/handlers/gestures/GestureDetector/utils.js.map +1 -1
- package/lib/commonjs/handlers/gestures/eventReceiver.js +14 -55
- package/lib/commonjs/handlers/gestures/eventReceiver.js.map +1 -1
- package/lib/commonjs/handlers/gestures/flingGesture.js +3 -13
- package/lib/commonjs/handlers/gestures/flingGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/forceTouchGesture.js +6 -20
- package/lib/commonjs/handlers/gestures/forceTouchGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/gesture.js +50 -93
- package/lib/commonjs/handlers/gestures/gesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/gestureComposition.js +17 -34
- package/lib/commonjs/handlers/gestures/gestureComposition.js.map +1 -1
- package/lib/commonjs/handlers/gestures/gestureObjects.js +1 -27
- package/lib/commonjs/handlers/gestures/gestureObjects.js.map +1 -1
- package/lib/commonjs/handlers/gestures/gestureStateManager.js +5 -11
- package/lib/commonjs/handlers/gestures/gestureStateManager.js.map +1 -1
- package/lib/commonjs/handlers/gestures/gestureStateManager.web.js +2 -7
- package/lib/commonjs/handlers/gestures/gestureStateManager.web.js.map +1 -1
- package/lib/commonjs/handlers/gestures/hoverGesture.js +9 -26
- package/lib/commonjs/handlers/gestures/hoverGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/longPressGesture.js +4 -15
- package/lib/commonjs/handlers/gestures/longPressGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/manualGesture.js +0 -6
- package/lib/commonjs/handlers/gestures/manualGesture.js.map +1 -1
- package/lib/{module/handlers/gestures/nativeGesture.js → commonjs/handlers/gestures/nativeGesture.ts} +12 -13
- package/lib/commonjs/handlers/gestures/panGesture.js +16 -44
- package/lib/commonjs/handlers/gestures/panGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/pinchGesture.js +2 -9
- package/lib/commonjs/handlers/gestures/pinchGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/reanimatedWrapper.js +2 -10
- package/lib/commonjs/handlers/gestures/reanimatedWrapper.js.map +1 -1
- package/lib/commonjs/handlers/gestures/rotationGesture.js +2 -9
- package/lib/commonjs/handlers/gestures/rotationGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/tapGesture.js +8 -23
- package/lib/commonjs/handlers/gestures/tapGesture.js.map +1 -1
- package/lib/commonjs/handlers/getNextHandlerTag.js +0 -1
- package/lib/commonjs/handlers/getNextHandlerTag.js.map +1 -1
- package/lib/commonjs/handlers/handlersRegistry.js +7 -23
- package/lib/commonjs/handlers/handlersRegistry.js.map +1 -1
- package/lib/commonjs/handlers/utils.js +8 -31
- package/lib/commonjs/handlers/utils.js.map +1 -1
- package/lib/commonjs/index.js +75 -104
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/init.js +4 -11
- package/lib/commonjs/init.js.map +1 -1
- package/lib/commonjs/jestUtils/index.js +4 -5
- package/lib/commonjs/jestUtils/index.js.map +1 -1
- package/lib/commonjs/jestUtils/jestUtils.js +24 -91
- package/lib/commonjs/jestUtils/jestUtils.js.map +1 -1
- package/lib/commonjs/mocks.js +10 -18
- package/lib/commonjs/mocks.js.map +1 -1
- package/lib/commonjs/mountRegistry.js +2 -14
- package/lib/commonjs/mountRegistry.js.map +1 -1
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/specs/NativeRNGestureHandlerModule.ts +26 -0
- package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.ts +22 -0
- package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.ts +6 -0
- package/lib/commonjs/typeUtils.js.map +1 -1
- package/lib/commonjs/utils.js +14 -35
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/commonjs/web/Gestures.js +5 -23
- package/lib/commonjs/web/Gestures.js.map +1 -1
- package/lib/commonjs/web/constants.js +2 -4
- package/lib/commonjs/web/constants.js.map +1 -1
- package/lib/commonjs/web/detectors/RotationGestureDetector.js +10 -52
- package/lib/commonjs/web/detectors/RotationGestureDetector.js.map +1 -1
- package/lib/commonjs/web/detectors/ScaleGestureDetector.js +11 -55
- package/lib/commonjs/web/detectors/ScaleGestureDetector.js.map +1 -1
- package/lib/commonjs/web/handlers/FlingGestureHandler.js +9 -59
- package/lib/commonjs/web/handlers/FlingGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/GestureHandler.js +91 -226
- package/lib/commonjs/web/handlers/GestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/HoverGestureHandler.js +3 -23
- package/lib/commonjs/web/handlers/HoverGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/IGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/LongPressGestureHandler.js +11 -59
- package/lib/commonjs/web/handlers/LongPressGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/ManualGestureHandler.js +1 -11
- package/lib/commonjs/web/handlers/ManualGestureHandler.js.map +1 -1
- package/lib/{module/web/handlers/NativeViewGestureHandler.js → commonjs/web/handlers/NativeViewGestureHandler.ts} +49 -48
- package/lib/commonjs/web/handlers/PanGestureHandler.js +33 -155
- package/lib/commonjs/web/handlers/PanGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/PinchGestureHandler.js +25 -68
- package/lib/commonjs/web/handlers/PinchGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/RotationGestureHandler.js +23 -67
- package/lib/commonjs/web/handlers/RotationGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/TapGestureHandler.js +18 -87
- package/lib/commonjs/web/handlers/TapGestureHandler.js.map +1 -1
- package/lib/commonjs/web/interfaces.js +9 -17
- package/lib/commonjs/web/interfaces.js.map +1 -1
- package/lib/commonjs/web/tools/CircularBuffer.js +0 -19
- package/lib/commonjs/web/tools/CircularBuffer.js.map +1 -1
- package/lib/commonjs/web/tools/EventManager.js +5 -44
- package/lib/commonjs/web/tools/EventManager.js.map +1 -1
- package/lib/commonjs/web/tools/GestureHandlerDelegate.js.map +1 -1
- package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js +13 -86
- package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js.map +1 -1
- package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js +14 -61
- package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js.map +1 -1
- package/lib/commonjs/web/tools/InteractionManager.js +12 -35
- package/lib/commonjs/web/tools/InteractionManager.js.map +1 -1
- package/lib/commonjs/web/tools/KeyboardEventManager.js +24 -52
- package/lib/commonjs/web/tools/KeyboardEventManager.js.map +1 -1
- package/lib/commonjs/web/tools/LeastSquareSolver.js +24 -69
- package/lib/commonjs/web/tools/LeastSquareSolver.js.map +1 -1
- package/lib/commonjs/web/tools/NodeManager.js +5 -15
- package/lib/commonjs/web/tools/NodeManager.js.map +1 -1
- package/lib/commonjs/web/tools/PointerEventManager.js +119 -159
- package/lib/commonjs/web/tools/PointerEventManager.js.map +1 -1
- package/lib/commonjs/web/tools/PointerTracker.js +20 -63
- package/lib/commonjs/web/tools/PointerTracker.js.map +1 -1
- package/lib/commonjs/web/tools/Vector.js +1 -25
- package/lib/commonjs/web/tools/Vector.js.map +1 -1
- package/lib/commonjs/web/tools/VelocityTracker.js +10 -36
- package/lib/commonjs/web/tools/VelocityTracker.js.map +1 -1
- package/lib/commonjs/web/tools/WheelEventManager.js +15 -34
- package/lib/commonjs/web/tools/WheelEventManager.js.map +1 -1
- package/lib/commonjs/web/utils.js +32 -67
- package/lib/commonjs/web/utils.js.map +1 -1
- package/lib/commonjs/web_hammer/DiscreteGestureHandler.js +8 -20
- package/lib/commonjs/web_hammer/DiscreteGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/DraggingGestureHandler.js +4 -14
- package/lib/commonjs/web_hammer/DraggingGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/Errors.js +0 -3
- package/lib/commonjs/web_hammer/Errors.js.map +1 -1
- package/lib/commonjs/web_hammer/FlingGestureHandler.js +14 -45
- package/lib/commonjs/web_hammer/FlingGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/GestureHandler.js +149 -244
- package/lib/commonjs/web_hammer/GestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/IndiscreteGestureHandler.js +2 -11
- package/lib/commonjs/web_hammer/IndiscreteGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/LongPressGestureHandler.js +6 -20
- package/lib/commonjs/web_hammer/LongPressGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/NativeViewGestureHandler.ts +47 -0
- package/lib/commonjs/web_hammer/NodeManager.js +9 -16
- package/lib/commonjs/web_hammer/NodeManager.js.map +1 -1
- package/lib/commonjs/web_hammer/PanGestureHandler.js +8 -49
- package/lib/commonjs/web_hammer/PanGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/PinchGestureHandler.js +2 -11
- package/lib/commonjs/web_hammer/PinchGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/PressGestureHandler.js +14 -49
- package/lib/commonjs/web_hammer/PressGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/RotationGestureHandler.js +3 -15
- package/lib/commonjs/web_hammer/RotationGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/TapGestureHandler.js +43 -70
- package/lib/commonjs/web_hammer/TapGestureHandler.js.map +1 -1
- package/lib/commonjs/web_hammer/constants.js +13 -26
- package/lib/commonjs/web_hammer/constants.js.map +1 -1
- package/lib/commonjs/web_hammer/utils.js +4 -14
- package/lib/commonjs/web_hammer/utils.js.map +1 -1
- package/lib/module/ActionType.js +5 -1
- package/lib/module/ActionType.js.map +1 -1
- package/lib/module/Directions.js +11 -3
- package/lib/module/Directions.js.map +1 -1
- package/lib/module/EnableNewWebImplementation.js +4 -5
- package/lib/module/EnableNewWebImplementation.js.map +1 -1
- package/lib/module/GestureHandlerRootViewContext.js +2 -0
- package/lib/module/GestureHandlerRootViewContext.js.map +1 -1
- package/lib/module/PlatformConstants.js +2 -2
- package/lib/module/PlatformConstants.js.map +1 -1
- package/lib/module/PlatformConstants.web.js +2 -1
- package/lib/module/PlatformConstants.web.js.map +1 -1
- package/lib/module/PointerType.js +4 -3
- package/lib/module/PointerType.js.map +1 -1
- package/lib/module/RNGestureHandlerModule.js +3 -0
- package/lib/module/RNGestureHandlerModule.js.map +1 -1
- package/lib/module/RNGestureHandlerModule.web.js +12 -20
- package/lib/module/RNGestureHandlerModule.web.js.map +1 -1
- package/lib/module/RNGestureHandlerModule.windows.js +20 -17
- package/lib/module/RNGestureHandlerModule.windows.js.map +1 -1
- package/lib/module/RNRenderer.js +2 -0
- package/lib/module/RNRenderer.js.map +1 -1
- package/lib/module/RNRenderer.web.js +2 -0
- package/lib/module/RNRenderer.web.js.map +1 -1
- package/lib/module/State.js +6 -1
- package/lib/module/State.js.map +1 -1
- package/lib/module/TouchEventType.js +5 -1
- package/lib/module/TouchEventType.js.map +1 -1
- package/lib/module/components/DrawerLayout.js +427 -446
- package/lib/module/components/DrawerLayout.js.map +1 -1
- package/lib/module/components/GestureButtons.js +119 -157
- package/lib/module/components/GestureButtons.js.map +1 -1
- package/lib/module/components/GestureButtonsProps.js +2 -0
- package/lib/module/components/GestureButtonsProps.js.map +1 -1
- package/lib/module/components/GestureComponents.js +29 -19
- package/lib/module/components/GestureComponents.js.map +1 -1
- package/lib/module/components/GestureComponents.web.js +13 -9
- package/lib/module/components/GestureComponents.web.js.map +1 -1
- package/lib/module/components/GestureHandlerButton.js +2 -0
- package/lib/module/components/GestureHandlerButton.js.map +1 -1
- package/lib/module/components/GestureHandlerButton.web.js +6 -4
- package/lib/module/components/GestureHandlerButton.web.js.map +1 -1
- package/lib/module/components/GestureHandlerRootView.android.js +9 -6
- package/lib/module/components/GestureHandlerRootView.android.js.map +1 -1
- package/lib/module/components/GestureHandlerRootView.js +9 -6
- package/lib/module/components/GestureHandlerRootView.js.map +1 -1
- package/lib/module/components/GestureHandlerRootView.web.js +9 -6
- package/lib/module/components/GestureHandlerRootView.web.js.map +1 -1
- package/lib/module/components/Pressable/Pressable.js +70 -98
- package/lib/module/components/Pressable/Pressable.js.map +1 -1
- package/lib/module/components/Pressable/PressableProps.js +2 -0
- package/lib/module/components/Pressable/PressableProps.js.map +1 -1
- package/lib/module/components/Pressable/index.js +2 -0
- package/lib/module/components/Pressable/index.js.map +1 -1
- package/lib/module/components/Pressable/utils.js +17 -32
- package/lib/module/components/Pressable/utils.js.map +1 -1
- package/lib/module/components/ReanimatedDrawerLayout.js +71 -88
- package/lib/module/components/ReanimatedDrawerLayout.js.map +1 -1
- package/lib/module/components/ReanimatedSwipeable.js +78 -87
- package/lib/module/components/ReanimatedSwipeable.js.map +1 -1
- package/lib/module/components/Swipeable.js +286 -320
- package/lib/module/components/Swipeable.js.map +1 -1
- package/lib/module/components/Text.js +22 -20
- package/lib/module/components/Text.js.map +1 -1
- package/lib/module/components/gestureHandlerRootHOC.js +11 -5
- package/lib/module/components/gestureHandlerRootHOC.js.map +1 -1
- package/lib/module/components/touchables/ExtraButtonProps.js +1 -1
- package/lib/module/components/touchables/ExtraButtonProps.js.map +1 -1
- package/lib/module/components/touchables/GenericTouchable.js +92 -127
- package/lib/module/components/touchables/GenericTouchable.js.map +1 -1
- package/lib/module/components/touchables/GenericTouchableProps.js +2 -0
- package/lib/module/components/touchables/GenericTouchableProps.js.map +1 -1
- package/lib/module/components/touchables/TouchableHighlight.js +48 -58
- package/lib/module/components/touchables/TouchableHighlight.js.map +1 -1
- package/lib/module/components/touchables/TouchableNativeFeedback.android.js +34 -43
- package/lib/module/components/touchables/TouchableNativeFeedback.android.js.map +1 -1
- package/lib/module/components/touchables/TouchableNativeFeedback.js +3 -1
- package/lib/module/components/touchables/TouchableNativeFeedback.js.map +1 -1
- package/lib/module/components/touchables/TouchableNativeFeedbackProps.js +2 -0
- package/lib/module/components/touchables/TouchableNativeFeedbackProps.js.map +1 -1
- package/lib/module/components/touchables/TouchableOpacity.js +34 -43
- package/lib/module/components/touchables/TouchableOpacity.js.map +1 -1
- package/lib/module/components/touchables/TouchableWithoutFeedback.js +9 -4
- package/lib/module/components/touchables/TouchableWithoutFeedback.js.map +1 -1
- package/lib/module/components/touchables/index.js +2 -0
- package/lib/module/components/touchables/index.js.map +1 -1
- package/lib/module/components/utils.js +13 -0
- package/lib/module/components/utils.js.map +1 -0
- package/lib/module/findNodeHandle.js +2 -0
- package/lib/module/findNodeHandle.js.map +1 -1
- package/lib/module/findNodeHandle.web.js +9 -13
- package/lib/module/findNodeHandle.web.js.map +1 -1
- package/lib/module/getShadowNodeFromRef.js +21 -19
- package/lib/module/getShadowNodeFromRef.js.map +1 -1
- package/lib/module/getShadowNodeFromRef.web.js +2 -0
- package/lib/module/getShadowNodeFromRef.web.js.map +1 -1
- package/lib/module/ghQueueMicrotask.js +2 -0
- package/lib/module/ghQueueMicrotask.js.map +1 -1
- package/lib/module/handlers/FlingGestureHandler.js +8 -0
- package/lib/module/handlers/FlingGestureHandler.js.map +1 -1
- package/lib/module/handlers/ForceTouchGestureHandler.js +14 -8
- package/lib/module/handlers/ForceTouchGestureHandler.js.map +1 -1
- package/lib/module/handlers/GestureHandlerEventPayload.js +2 -0
- package/lib/module/handlers/GestureHandlerEventPayload.js.map +1 -1
- package/lib/module/handlers/LongPressGestureHandler.js +8 -0
- package/lib/module/handlers/LongPressGestureHandler.js.map +1 -1
- package/lib/module/handlers/NativeViewGestureHandler.ts +59 -0
- package/lib/module/handlers/PanGestureHandler.js +10 -19
- package/lib/module/handlers/PanGestureHandler.js.map +1 -1
- package/lib/module/handlers/PinchGestureHandler.js +4 -0
- package/lib/module/handlers/PinchGestureHandler.js.map +1 -1
- package/lib/module/handlers/PressabilityDebugView.js +2 -0
- package/lib/module/handlers/PressabilityDebugView.js.map +1 -1
- package/lib/module/handlers/PressabilityDebugView.web.js +2 -0
- package/lib/module/handlers/PressabilityDebugView.web.js.map +1 -1
- package/lib/module/handlers/RotationGestureHandler.js +4 -0
- package/lib/module/handlers/RotationGestureHandler.js.map +1 -1
- package/lib/module/handlers/TapGestureHandler.js +8 -0
- package/lib/module/handlers/TapGestureHandler.js.map +1 -1
- package/lib/module/handlers/createHandler.js +127 -200
- package/lib/module/handlers/createHandler.js.map +1 -1
- package/lib/module/handlers/createNativeWrapper.js +22 -22
- package/lib/module/handlers/createNativeWrapper.js.map +1 -1
- package/lib/module/handlers/customDirectEventTypes.js +2 -0
- package/lib/module/handlers/customDirectEventTypes.js.map +1 -1
- package/lib/module/handlers/customDirectEventTypes.web.js +2 -0
- package/lib/module/handlers/customDirectEventTypes.web.js.map +1 -1
- package/lib/module/handlers/gestureHandlerCommon.js +11 -4
- package/lib/module/handlers/gestureHandlerCommon.js.map +1 -1
- package/lib/module/handlers/gestureHandlerTypesCompat.js +2 -0
- package/lib/module/handlers/gestureHandlerTypesCompat.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/Wrap.js +4 -4
- package/lib/module/handlers/gestures/GestureDetector/Wrap.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/Wrap.web.js +12 -8
- package/lib/module/handlers/gestures/GestureDetector/Wrap.web.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js +10 -16
- package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js +2 -1
- package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/index.js +18 -19
- package/lib/module/handlers/gestures/GestureDetector/index.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/needsToReattach.js +2 -2
- package/lib/module/handlers/gestures/GestureDetector/needsToReattach.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/types.js +2 -0
- package/lib/module/handlers/gestures/GestureDetector/types.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js +16 -16
- package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js +15 -41
- package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js +7 -5
- package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/useMountReactions.js +4 -6
- package/lib/module/handlers/gestures/GestureDetector/useMountReactions.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js +7 -7
- package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/utils.js +21 -26
- package/lib/module/handlers/gestures/GestureDetector/utils.js.map +1 -1
- package/lib/module/handlers/gestures/eventReceiver.js +16 -47
- package/lib/module/handlers/gestures/eventReceiver.js.map +1 -1
- package/lib/module/handlers/gestures/flingGesture.js +4 -9
- package/lib/module/handlers/gestures/flingGesture.js.map +1 -1
- package/lib/module/handlers/gestures/forceTouchGesture.js +7 -17
- package/lib/module/handlers/gestures/forceTouchGesture.js.map +1 -1
- package/lib/module/handlers/gestures/gesture.js +51 -81
- package/lib/module/handlers/gestures/gesture.js.map +1 -1
- package/lib/module/handlers/gestures/gestureComposition.js +17 -26
- package/lib/module/handlers/gestures/gestureComposition.js.map +1 -1
- package/lib/module/handlers/gestures/gestureObjects.js +3 -14
- package/lib/module/handlers/gestures/gestureObjects.js.map +1 -1
- package/lib/module/handlers/gestures/gestureStateManager.js +7 -6
- package/lib/module/handlers/gestures/gestureStateManager.js.map +1 -1
- package/lib/module/handlers/gestures/gestureStateManager.web.js +2 -1
- package/lib/module/handlers/gestures/gestureStateManager.web.js.map +1 -1
- package/lib/module/handlers/gestures/hoverGesture.js +8 -18
- package/lib/module/handlers/gestures/hoverGesture.js.map +1 -1
- package/lib/module/handlers/gestures/longPressGesture.js +5 -11
- package/lib/module/handlers/gestures/longPressGesture.js.map +1 -1
- package/lib/module/handlers/gestures/manualGesture.js +2 -4
- package/lib/module/handlers/gestures/manualGesture.js.map +1 -1
- package/lib/module/handlers/gestures/nativeGesture.ts +33 -0
- package/lib/module/handlers/gestures/panGesture.js +17 -41
- package/lib/module/handlers/gestures/panGesture.js.map +1 -1
- package/lib/module/handlers/gestures/pinchGesture.js +4 -7
- package/lib/module/handlers/gestures/pinchGesture.js.map +1 -1
- package/lib/module/handlers/gestures/reanimatedWrapper.js +2 -6
- package/lib/module/handlers/gestures/reanimatedWrapper.js.map +1 -1
- package/lib/module/handlers/gestures/rotationGesture.js +4 -7
- package/lib/module/handlers/gestures/rotationGesture.js.map +1 -1
- package/lib/module/handlers/gestures/tapGesture.js +9 -19
- package/lib/module/handlers/gestures/tapGesture.js.map +1 -1
- package/lib/module/handlers/getNextHandlerTag.js +2 -0
- package/lib/module/handlers/getNextHandlerTag.js.map +1 -1
- package/lib/module/handlers/handlersRegistry.js +3 -7
- package/lib/module/handlers/handlersRegistry.js.map +1 -1
- package/lib/module/handlers/utils.js +8 -18
- package/lib/module/handlers/utils.js.map +1 -1
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/init.js +5 -2
- package/lib/module/init.js.map +1 -1
- package/lib/module/jestUtils/index.js +2 -0
- package/lib/module/jestUtils/index.js.map +1 -1
- package/lib/module/jestUtils/jestUtils.js +27 -74
- package/lib/module/jestUtils/jestUtils.js.map +1 -1
- package/lib/module/mocks.js +9 -9
- package/lib/module/mocks.js.map +1 -1
- package/lib/module/mountRegistry.js +3 -11
- package/lib/module/mountRegistry.js.map +1 -1
- package/lib/module/specs/NativeRNGestureHandlerModule.ts +26 -0
- package/lib/module/specs/RNGestureHandlerButtonNativeComponent.ts +22 -0
- package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.ts +6 -0
- package/lib/module/typeUtils.js +1 -1
- package/lib/module/typeUtils.js.map +1 -1
- package/lib/module/utils.js +8 -14
- package/lib/module/utils.js.map +1 -1
- package/lib/module/web/Gestures.js +4 -1
- package/lib/module/web/Gestures.js.map +1 -1
- package/lib/module/web/constants.js +2 -0
- package/lib/module/web/constants.js.map +1 -1
- package/lib/module/web/detectors/RotationGestureDetector.js +11 -48
- package/lib/module/web/detectors/RotationGestureDetector.js.map +1 -1
- package/lib/module/web/detectors/ScaleGestureDetector.js +12 -50
- package/lib/module/web/detectors/ScaleGestureDetector.js.map +1 -1
- package/lib/module/web/handlers/FlingGestureHandler.js +9 -48
- package/lib/module/web/handlers/FlingGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/GestureHandler.js +90 -212
- package/lib/module/web/handlers/GestureHandler.js.map +1 -1
- package/lib/module/web/handlers/HoverGestureHandler.js +3 -14
- package/lib/module/web/handlers/HoverGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/IGestureHandler.js +1 -1
- package/lib/module/web/handlers/IGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/LongPressGestureHandler.js +11 -51
- package/lib/module/web/handlers/LongPressGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/ManualGestureHandler.js +2 -6
- package/lib/module/web/handlers/ManualGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/NativeViewGestureHandler.ts +175 -0
- package/lib/module/web/handlers/PanGestureHandler.js +33 -145
- package/lib/module/web/handlers/PanGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/PinchGestureHandler.js +25 -59
- package/lib/module/web/handlers/PinchGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/RotationGestureHandler.js +23 -58
- package/lib/module/web/handlers/RotationGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/TapGestureHandler.js +18 -78
- package/lib/module/web/handlers/TapGestureHandler.js.map +1 -1
- package/lib/module/web/interfaces.js +10 -13
- package/lib/module/web/interfaces.js.map +1 -1
- package/lib/module/web/tools/CircularBuffer.js +1 -16
- package/lib/module/web/tools/CircularBuffer.js.map +1 -1
- package/lib/module/web/tools/EventManager.js +6 -41
- package/lib/module/web/tools/EventManager.js.map +1 -1
- package/lib/module/web/tools/GestureHandlerDelegate.js +2 -0
- package/lib/module/web/tools/GestureHandlerDelegate.js.map +1 -1
- package/lib/module/web/tools/GestureHandlerOrchestrator.js +13 -78
- package/lib/module/web/tools/GestureHandlerOrchestrator.js.map +1 -1
- package/lib/module/web/tools/GestureHandlerWebDelegate.js +14 -49
- package/lib/module/web/tools/GestureHandlerWebDelegate.js.map +1 -1
- package/lib/module/web/tools/InteractionManager.js +13 -32
- package/lib/module/web/tools/InteractionManager.js.map +1 -1
- package/lib/module/web/tools/KeyboardEventManager.js +24 -44
- package/lib/module/web/tools/KeyboardEventManager.js.map +1 -1
- package/lib/module/web/tools/LeastSquareSolver.js +25 -66
- package/lib/module/web/tools/LeastSquareSolver.js.map +1 -1
- package/lib/module/web/tools/NodeManager.js +6 -12
- package/lib/module/web/tools/NodeManager.js.map +1 -1
- package/lib/module/web/tools/PointerEventManager.js +119 -148
- package/lib/module/web/tools/PointerEventManager.js.map +1 -1
- package/lib/module/web/tools/PointerTracker.js +20 -56
- package/lib/module/web/tools/PointerTracker.js.map +1 -1
- package/lib/module/web/tools/Vector.js +2 -20
- package/lib/module/web/tools/Vector.js.map +1 -1
- package/lib/module/web/tools/VelocityTracker.js +10 -29
- package/lib/module/web/tools/VelocityTracker.js.map +1 -1
- package/lib/module/web/tools/WheelEventManager.js +15 -26
- package/lib/module/web/tools/WheelEventManager.js.map +1 -1
- package/lib/module/web/utils.js +29 -49
- package/lib/module/web/utils.js.map +1 -1
- package/lib/module/web_hammer/DiscreteGestureHandler.js +6 -13
- package/lib/module/web_hammer/DiscreteGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/DraggingGestureHandler.js +2 -5
- package/lib/module/web_hammer/DraggingGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/Errors.js +2 -1
- package/lib/module/web_hammer/Errors.js.map +1 -1
- package/lib/module/web_hammer/FlingGestureHandler.js +12 -35
- package/lib/module/web_hammer/FlingGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/GestureHandler.js +148 -233
- package/lib/module/web_hammer/GestureHandler.js.map +1 -1
- package/lib/module/web_hammer/IndiscreteGestureHandler.js +3 -6
- package/lib/module/web_hammer/IndiscreteGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/LongPressGestureHandler.js +4 -11
- package/lib/module/web_hammer/LongPressGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/NativeViewGestureHandler.ts +47 -0
- package/lib/module/web_hammer/NodeManager.js +8 -8
- package/lib/module/web_hammer/NodeManager.js.map +1 -1
- package/lib/module/web_hammer/PanGestureHandler.js +8 -40
- package/lib/module/web_hammer/PanGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/PinchGestureHandler.js +2 -5
- package/lib/module/web_hammer/PinchGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/PressGestureHandler.js +13 -39
- package/lib/module/web_hammer/PressGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/RotationGestureHandler.js +3 -8
- package/lib/module/web_hammer/RotationGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/TapGestureHandler.js +42 -62
- package/lib/module/web_hammer/TapGestureHandler.js.map +1 -1
- package/lib/module/web_hammer/constants.js +4 -1
- package/lib/module/web_hammer/constants.js.map +1 -1
- package/lib/module/web_hammer/utils.js +4 -2
- package/lib/module/web_hammer/utils.js.map +1 -1
- package/lib/typescript/ActionType.d.ts +1 -0
- package/lib/typescript/ActionType.d.ts.map +1 -0
- package/lib/typescript/Directions.d.ts +1 -0
- package/lib/typescript/Directions.d.ts.map +1 -0
- package/lib/typescript/EnableNewWebImplementation.d.ts +1 -0
- package/lib/typescript/EnableNewWebImplementation.d.ts.map +1 -0
- package/lib/typescript/GestureHandlerRootViewContext.d.ts +1 -0
- package/lib/typescript/GestureHandlerRootViewContext.d.ts.map +1 -0
- package/lib/typescript/PlatformConstants.d.ts +1 -0
- package/lib/typescript/PlatformConstants.d.ts.map +1 -0
- package/lib/typescript/PlatformConstants.web.d.ts +1 -0
- package/lib/typescript/PlatformConstants.web.d.ts.map +1 -0
- package/lib/typescript/PointerType.d.ts +1 -0
- package/lib/typescript/PointerType.d.ts.map +1 -0
- package/lib/typescript/RNGestureHandlerModule.d.ts +1 -0
- package/lib/typescript/RNGestureHandlerModule.d.ts.map +1 -0
- package/lib/typescript/RNGestureHandlerModule.web.d.ts +1 -0
- package/lib/typescript/RNGestureHandlerModule.web.d.ts.map +1 -0
- package/lib/typescript/RNGestureHandlerModule.windows.d.ts +1 -0
- package/lib/typescript/RNGestureHandlerModule.windows.d.ts.map +1 -0
- package/lib/typescript/RNRenderer.d.ts +1 -0
- package/lib/typescript/RNRenderer.d.ts.map +1 -0
- package/lib/typescript/RNRenderer.web.d.ts +1 -0
- package/lib/typescript/RNRenderer.web.d.ts.map +1 -0
- package/lib/typescript/State.d.ts +1 -0
- package/lib/typescript/State.d.ts.map +1 -0
- package/lib/typescript/TouchEventType.d.ts +1 -0
- package/lib/typescript/TouchEventType.d.ts.map +1 -0
- package/lib/typescript/components/DrawerLayout.d.ts +1 -0
- package/lib/typescript/components/DrawerLayout.d.ts.map +1 -0
- package/lib/typescript/components/GestureButtons.d.ts +1 -0
- package/lib/typescript/components/GestureButtons.d.ts.map +1 -0
- package/lib/typescript/components/GestureButtonsProps.d.ts +1 -0
- package/lib/typescript/components/GestureButtonsProps.d.ts.map +1 -0
- package/lib/typescript/components/GestureComponents.d.ts +4 -3
- package/lib/typescript/components/GestureComponents.d.ts.map +1 -0
- package/lib/typescript/components/GestureComponents.web.d.ts +1 -0
- package/lib/typescript/components/GestureComponents.web.d.ts.map +1 -0
- package/lib/typescript/components/GestureHandlerButton.d.ts +1 -0
- package/lib/typescript/components/GestureHandlerButton.d.ts.map +1 -0
- package/lib/typescript/components/GestureHandlerButton.web.d.ts +1 -0
- package/lib/typescript/components/GestureHandlerButton.web.d.ts.map +1 -0
- package/lib/typescript/components/GestureHandlerRootView.android.d.ts +1 -0
- package/lib/typescript/components/GestureHandlerRootView.android.d.ts.map +1 -0
- package/lib/typescript/components/GestureHandlerRootView.d.ts +1 -0
- package/lib/typescript/components/GestureHandlerRootView.d.ts.map +1 -0
- package/lib/typescript/components/GestureHandlerRootView.web.d.ts +1 -0
- package/lib/typescript/components/GestureHandlerRootView.web.d.ts.map +1 -0
- package/lib/typescript/components/Pressable/Pressable.d.ts +1 -0
- package/lib/typescript/components/Pressable/Pressable.d.ts.map +1 -0
- package/lib/typescript/components/Pressable/PressableProps.d.ts +17 -1
- package/lib/typescript/components/Pressable/PressableProps.d.ts.map +1 -0
- package/lib/typescript/components/Pressable/index.d.ts +1 -0
- package/lib/typescript/components/Pressable/index.d.ts.map +1 -0
- package/lib/typescript/components/Pressable/utils.d.ts +1 -0
- package/lib/typescript/components/Pressable/utils.d.ts.map +1 -0
- package/lib/typescript/components/ReanimatedDrawerLayout.d.ts +1 -0
- package/lib/typescript/components/ReanimatedDrawerLayout.d.ts.map +1 -0
- package/lib/typescript/components/ReanimatedSwipeable.d.ts +13 -2
- package/lib/typescript/components/ReanimatedSwipeable.d.ts.map +1 -0
- package/lib/typescript/components/Swipeable.d.ts +1 -0
- package/lib/typescript/components/Swipeable.d.ts.map +1 -0
- package/lib/typescript/components/Text.d.ts +1 -0
- package/lib/typescript/components/Text.d.ts.map +1 -0
- package/lib/typescript/components/gestureHandlerRootHOC.d.ts +1 -0
- package/lib/typescript/components/gestureHandlerRootHOC.d.ts.map +1 -0
- package/lib/typescript/components/touchables/ExtraButtonProps.d.ts +1 -0
- package/lib/typescript/components/touchables/ExtraButtonProps.d.ts.map +1 -0
- package/lib/typescript/components/touchables/GenericTouchable.d.ts +1 -0
- package/lib/typescript/components/touchables/GenericTouchable.d.ts.map +1 -0
- package/lib/typescript/components/touchables/GenericTouchableProps.d.ts +1 -0
- package/lib/typescript/components/touchables/GenericTouchableProps.d.ts.map +1 -0
- package/lib/typescript/components/touchables/TouchableHighlight.d.ts +1 -0
- package/lib/typescript/components/touchables/TouchableHighlight.d.ts.map +1 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedback.android.d.ts +1 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedback.android.d.ts.map +1 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedback.d.ts +1 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedback.d.ts.map +1 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedbackProps.d.ts +1 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedbackProps.d.ts.map +1 -0
- package/lib/typescript/components/touchables/TouchableOpacity.d.ts +1 -0
- package/lib/typescript/components/touchables/TouchableOpacity.d.ts.map +1 -0
- package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts +2 -1
- package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts.map +1 -0
- package/lib/typescript/components/touchables/index.d.ts +1 -0
- package/lib/typescript/components/touchables/index.d.ts.map +1 -0
- package/lib/typescript/components/utils.d.ts +5 -0
- package/lib/typescript/components/utils.d.ts.map +1 -0
- package/lib/typescript/findNodeHandle.d.ts +1 -0
- package/lib/typescript/findNodeHandle.d.ts.map +1 -0
- package/lib/typescript/findNodeHandle.web.d.ts +1 -0
- package/lib/typescript/findNodeHandle.web.d.ts.map +1 -0
- package/lib/typescript/getShadowNodeFromRef.d.ts +1 -0
- package/lib/typescript/getShadowNodeFromRef.d.ts.map +1 -0
- package/lib/typescript/getShadowNodeFromRef.web.d.ts +1 -0
- package/lib/typescript/getShadowNodeFromRef.web.d.ts.map +1 -0
- package/lib/typescript/ghQueueMicrotask.d.ts +1 -0
- package/lib/typescript/ghQueueMicrotask.d.ts.map +1 -0
- package/lib/typescript/handlers/FlingGestureHandler.d.ts +1 -1
- package/lib/typescript/handlers/FlingGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/ForceTouchGestureHandler.d.ts +1 -0
- package/lib/typescript/handlers/ForceTouchGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/GestureHandlerEventPayload.d.ts +1 -0
- package/lib/typescript/handlers/GestureHandlerEventPayload.d.ts.map +1 -0
- package/lib/typescript/handlers/LongPressGestureHandler.d.ts +1 -1
- package/lib/typescript/handlers/LongPressGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/NativeViewGestureHandler.d.ts +1 -1
- package/lib/typescript/handlers/NativeViewGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/PanGestureHandler.d.ts +1 -1
- package/lib/typescript/handlers/PanGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/PinchGestureHandler.d.ts +1 -1
- package/lib/typescript/handlers/PinchGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/PressabilityDebugView.d.ts +1 -0
- package/lib/typescript/handlers/PressabilityDebugView.d.ts.map +1 -0
- package/lib/typescript/handlers/PressabilityDebugView.web.d.ts +1 -0
- package/lib/typescript/handlers/PressabilityDebugView.web.d.ts.map +1 -0
- package/lib/typescript/handlers/RotationGestureHandler.d.ts +1 -1
- package/lib/typescript/handlers/RotationGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/TapGestureHandler.d.ts +1 -1
- package/lib/typescript/handlers/TapGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/createHandler.d.ts +1 -0
- package/lib/typescript/handlers/createHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/createNativeWrapper.d.ts +1 -0
- package/lib/typescript/handlers/createNativeWrapper.d.ts.map +1 -0
- package/lib/typescript/handlers/customDirectEventTypes.d.ts +1 -0
- package/lib/typescript/handlers/customDirectEventTypes.d.ts.map +1 -0
- package/lib/typescript/handlers/customDirectEventTypes.web.d.ts +1 -0
- package/lib/typescript/handlers/customDirectEventTypes.web.d.ts.map +1 -0
- package/lib/typescript/handlers/gestureHandlerCommon.d.ts +1 -0
- package/lib/typescript/handlers/gestureHandlerCommon.d.ts.map +1 -0
- package/lib/typescript/handlers/gestureHandlerTypesCompat.d.ts +1 -0
- package/lib/typescript/handlers/gestureHandlerTypesCompat.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/Wrap.d.ts +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/Wrap.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/Wrap.web.d.ts +3 -2
- package/lib/typescript/handlers/gestures/GestureDetector/Wrap.web.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/attachHandlers.d.ts +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/attachHandlers.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/dropHandlers.d.ts +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/dropHandlers.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/index.d.ts +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/index.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/needsToReattach.d.ts +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/needsToReattach.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/types.d.ts +1 -1
- package/lib/typescript/handlers/gestures/GestureDetector/types.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/updateHandlers.d.ts +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/updateHandlers.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useAnimatedGesture.d.ts +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useAnimatedGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useDetectorUpdater.d.ts +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useDetectorUpdater.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useMountReactions.d.ts +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useMountReactions.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useViewRefHandler.d.ts +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useViewRefHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/utils.d.ts +1 -1
- package/lib/typescript/handlers/gestures/GestureDetector/utils.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/eventReceiver.d.ts +1 -0
- package/lib/typescript/handlers/gestures/eventReceiver.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/flingGesture.d.ts +1 -0
- package/lib/typescript/handlers/gestures/flingGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/forceTouchGesture.d.ts +1 -0
- package/lib/typescript/handlers/gestures/forceTouchGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/gesture.d.ts +1 -1
- package/lib/typescript/handlers/gestures/gesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/gestureComposition.d.ts +1 -0
- package/lib/typescript/handlers/gestures/gestureComposition.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/gestureObjects.d.ts +1 -0
- package/lib/typescript/handlers/gestures/gestureObjects.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/gestureStateManager.d.ts +1 -0
- package/lib/typescript/handlers/gestures/gestureStateManager.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/gestureStateManager.web.d.ts +1 -0
- package/lib/typescript/handlers/gestures/gestureStateManager.web.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/hoverGesture.d.ts +1 -0
- package/lib/typescript/handlers/gestures/hoverGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/longPressGesture.d.ts +1 -0
- package/lib/typescript/handlers/gestures/longPressGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/manualGesture.d.ts +1 -0
- package/lib/typescript/handlers/gestures/manualGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/nativeGesture.d.ts +1 -0
- package/lib/typescript/handlers/gestures/nativeGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/panGesture.d.ts +1 -0
- package/lib/typescript/handlers/gestures/panGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/pinchGesture.d.ts +1 -0
- package/lib/typescript/handlers/gestures/pinchGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/reanimatedWrapper.d.ts +1 -0
- package/lib/typescript/handlers/gestures/reanimatedWrapper.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/rotationGesture.d.ts +1 -0
- package/lib/typescript/handlers/gestures/rotationGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/tapGesture.d.ts +1 -0
- package/lib/typescript/handlers/gestures/tapGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/getNextHandlerTag.d.ts +1 -0
- package/lib/typescript/handlers/getNextHandlerTag.d.ts.map +1 -0
- package/lib/typescript/handlers/handlersRegistry.d.ts +1 -0
- package/lib/typescript/handlers/handlersRegistry.d.ts.map +1 -0
- package/lib/typescript/handlers/utils.d.ts +1 -0
- package/lib/typescript/handlers/utils.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/init.d.ts +1 -0
- package/lib/typescript/init.d.ts.map +1 -0
- package/lib/typescript/jestUtils/index.d.ts +1 -0
- package/lib/typescript/jestUtils/index.d.ts.map +1 -0
- package/lib/typescript/jestUtils/jestUtils.d.ts +1 -1
- package/lib/typescript/jestUtils/jestUtils.d.ts.map +1 -0
- package/lib/typescript/mocks.d.ts +1 -0
- package/lib/typescript/mocks.d.ts.map +1 -0
- package/lib/typescript/mountRegistry.d.ts +1 -1
- package/lib/typescript/mountRegistry.d.ts.map +1 -0
- package/lib/typescript/specs/NativeRNGestureHandlerModule.d.ts +1 -0
- package/lib/typescript/specs/NativeRNGestureHandlerModule.d.ts.map +1 -0
- package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.d.ts +1 -1
- package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.d.ts.map +1 -0
- package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts +1 -1
- package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/typeUtils.d.ts +1 -0
- package/lib/typescript/typeUtils.d.ts.map +1 -0
- package/lib/typescript/utils.d.ts +1 -0
- package/lib/typescript/utils.d.ts.map +1 -0
- package/lib/typescript/web/Gestures.d.ts +1 -0
- package/lib/typescript/web/Gestures.d.ts.map +1 -0
- package/lib/typescript/web/constants.d.ts +1 -0
- package/lib/typescript/web/constants.d.ts.map +1 -0
- package/lib/typescript/web/detectors/RotationGestureDetector.d.ts +1 -0
- package/lib/typescript/web/detectors/RotationGestureDetector.d.ts.map +1 -0
- package/lib/typescript/web/detectors/ScaleGestureDetector.d.ts +1 -0
- package/lib/typescript/web/detectors/ScaleGestureDetector.d.ts.map +1 -0
- package/lib/typescript/web/handlers/FlingGestureHandler.d.ts +1 -0
- package/lib/typescript/web/handlers/FlingGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/GestureHandler.d.ts +1 -1
- package/lib/typescript/web/handlers/GestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/HoverGestureHandler.d.ts +1 -0
- package/lib/typescript/web/handlers/HoverGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/IGestureHandler.d.ts +1 -0
- package/lib/typescript/web/handlers/IGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/LongPressGestureHandler.d.ts +1 -1
- package/lib/typescript/web/handlers/LongPressGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/ManualGestureHandler.d.ts +1 -0
- package/lib/typescript/web/handlers/ManualGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/NativeViewGestureHandler.d.ts +1 -1
- package/lib/typescript/web/handlers/NativeViewGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/PanGestureHandler.d.ts +1 -0
- package/lib/typescript/web/handlers/PanGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/PinchGestureHandler.d.ts +1 -1
- package/lib/typescript/web/handlers/PinchGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/RotationGestureHandler.d.ts +1 -1
- package/lib/typescript/web/handlers/RotationGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/TapGestureHandler.d.ts +1 -0
- package/lib/typescript/web/handlers/TapGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/interfaces.d.ts +1 -0
- package/lib/typescript/web/interfaces.d.ts.map +1 -0
- package/lib/typescript/web/tools/CircularBuffer.d.ts +1 -0
- package/lib/typescript/web/tools/CircularBuffer.d.ts.map +1 -0
- package/lib/typescript/web/tools/EventManager.d.ts +1 -0
- package/lib/typescript/web/tools/EventManager.d.ts.map +1 -0
- package/lib/typescript/web/tools/GestureHandlerDelegate.d.ts +1 -0
- package/lib/typescript/web/tools/GestureHandlerDelegate.d.ts.map +1 -0
- package/lib/typescript/web/tools/GestureHandlerOrchestrator.d.ts +1 -0
- package/lib/typescript/web/tools/GestureHandlerOrchestrator.d.ts.map +1 -0
- package/lib/typescript/web/tools/GestureHandlerWebDelegate.d.ts +1 -0
- package/lib/typescript/web/tools/GestureHandlerWebDelegate.d.ts.map +1 -0
- package/lib/typescript/web/tools/InteractionManager.d.ts +1 -0
- package/lib/typescript/web/tools/InteractionManager.d.ts.map +1 -0
- package/lib/typescript/web/tools/KeyboardEventManager.d.ts +1 -0
- package/lib/typescript/web/tools/KeyboardEventManager.d.ts.map +1 -0
- package/lib/typescript/web/tools/LeastSquareSolver.d.ts +1 -0
- package/lib/typescript/web/tools/LeastSquareSolver.d.ts.map +1 -0
- package/lib/typescript/web/tools/NodeManager.d.ts +1 -0
- package/lib/typescript/web/tools/NodeManager.d.ts.map +1 -0
- package/lib/typescript/web/tools/PointerEventManager.d.ts +1 -0
- package/lib/typescript/web/tools/PointerEventManager.d.ts.map +1 -0
- package/lib/typescript/web/tools/PointerTracker.d.ts +1 -0
- package/lib/typescript/web/tools/PointerTracker.d.ts.map +1 -0
- package/lib/typescript/web/tools/Vector.d.ts +1 -0
- package/lib/typescript/web/tools/Vector.d.ts.map +1 -0
- package/lib/typescript/web/tools/VelocityTracker.d.ts +1 -0
- package/lib/typescript/web/tools/VelocityTracker.d.ts.map +1 -0
- package/lib/typescript/web/tools/WheelEventManager.d.ts +1 -0
- package/lib/typescript/web/tools/WheelEventManager.d.ts.map +1 -0
- package/lib/typescript/web/utils.d.ts +1 -0
- package/lib/typescript/web/utils.d.ts.map +1 -0
- package/lib/typescript/web_hammer/DiscreteGestureHandler.d.ts +1 -0
- package/lib/typescript/web_hammer/DiscreteGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/DraggingGestureHandler.d.ts +1 -0
- package/lib/typescript/web_hammer/DraggingGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/Errors.d.ts +1 -0
- package/lib/typescript/web_hammer/Errors.d.ts.map +1 -0
- package/lib/typescript/web_hammer/FlingGestureHandler.d.ts +1 -0
- package/lib/typescript/web_hammer/FlingGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/GestureHandler.d.ts +1 -0
- package/lib/typescript/web_hammer/GestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/IndiscreteGestureHandler.d.ts +1 -0
- package/lib/typescript/web_hammer/IndiscreteGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/LongPressGestureHandler.d.ts +1 -0
- package/lib/typescript/web_hammer/LongPressGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/NativeViewGestureHandler.d.ts +1 -0
- package/lib/typescript/web_hammer/NativeViewGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/NodeManager.d.ts +1 -0
- package/lib/typescript/web_hammer/NodeManager.d.ts.map +1 -0
- package/lib/typescript/web_hammer/PanGestureHandler.d.ts +1 -0
- package/lib/typescript/web_hammer/PanGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/PinchGestureHandler.d.ts +1 -0
- package/lib/typescript/web_hammer/PinchGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/PressGestureHandler.d.ts +1 -0
- package/lib/typescript/web_hammer/PressGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/RotationGestureHandler.d.ts +1 -0
- package/lib/typescript/web_hammer/RotationGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/TapGestureHandler.d.ts +1 -0
- package/lib/typescript/web_hammer/TapGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/constants.d.ts +1 -0
- package/lib/typescript/web_hammer/constants.d.ts.map +1 -0
- package/lib/typescript/web_hammer/utils.d.ts +1 -0
- package/lib/typescript/web_hammer/utils.d.ts.map +1 -0
- package/package.json +27 -47
- package/src/components/DrawerLayout.tsx +5 -2
- package/src/components/GestureButtons.tsx +2 -2
- package/src/components/GestureComponents.web.tsx +1 -1
- package/src/components/GestureHandlerButton.web.tsx +3 -3
- package/src/components/Pressable/Pressable.tsx +34 -9
- package/src/components/Pressable/PressableProps.tsx +19 -0
- package/src/components/ReanimatedSwipeable.tsx +55 -33
- package/src/components/Swipeable.tsx +3 -0
- package/src/components/Text.tsx +5 -2
- package/src/components/utils.ts +26 -0
- package/src/getShadowNodeFromRef.ts +2 -2
- package/src/handlers/createHandler.tsx +1 -0
- package/src/handlers/gestures/reanimatedWrapper.ts +0 -1
- package/src/handlers/utils.ts +1 -1
- package/src/utils.ts +0 -1
- package/src/web_hammer/DiscreteGestureHandler.ts +1 -1
- package/src/web_hammer/DraggingGestureHandler.ts +1 -1
- package/src/web_hammer/FlingGestureHandler.ts +1 -1
- package/src/web_hammer/GestureHandler.ts +2 -1
- package/src/web_hammer/LongPressGestureHandler.ts +1 -1
- package/README.md +0 -71
- package/android/packageDeprecated/src/main/java/com/swmansion/gesturehandler/RNGestureHandlerPackage.kt +0 -85
- package/android/paper77/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerButtonManagerDelegate.java +0 -60
- package/android/paper77/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerButtonManagerInterface.java +0 -26
- package/android/paper77/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerRootViewManagerDelegate.java +0 -26
- package/android/paper77/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerRootViewManagerInterface.java +0 -16
- package/android/paper77/src/main/java/com/swmansion/gesturehandler/NativeRNGestureHandlerModuleSpec.java +0 -67
- package/android/paper77/src/main/java/com/swmansion/gesturehandler/ReactContextExtensions.kt +0 -13
- package/lib/commonjs/handlers/NativeViewGestureHandler.js +0 -35
- package/lib/commonjs/handlers/NativeViewGestureHandler.js.map +0 -1
- package/lib/commonjs/handlers/gestures/nativeGesture.js +0 -44
- package/lib/commonjs/handlers/gestures/nativeGesture.js.map +0 -1
- package/lib/commonjs/specs/NativeRNGestureHandlerModule.js +0 -13
- package/lib/commonjs/specs/NativeRNGestureHandlerModule.js.map +0 -1
- package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js +0 -15
- package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js.map +0 -1
- package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js +0 -15
- package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js.map +0 -1
- package/lib/commonjs/web/handlers/NativeViewGestureHandler.js +0 -189
- package/lib/commonjs/web/handlers/NativeViewGestureHandler.js.map +0 -1
- package/lib/commonjs/web_hammer/NativeViewGestureHandler.js +0 -66
- package/lib/commonjs/web_hammer/NativeViewGestureHandler.js.map +0 -1
- package/lib/module/handlers/NativeViewGestureHandler.js +0 -19
- package/lib/module/handlers/NativeViewGestureHandler.js.map +0 -1
- package/lib/module/handlers/gestures/nativeGesture.js.map +0 -1
- package/lib/module/specs/NativeRNGestureHandlerModule.js +0 -3
- package/lib/module/specs/NativeRNGestureHandlerModule.js.map +0 -1
- package/lib/module/specs/RNGestureHandlerButtonNativeComponent.js +0 -3
- package/lib/module/specs/RNGestureHandlerButtonNativeComponent.js.map +0 -1
- package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.js +0 -3
- package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.js.map +0 -1
- package/lib/module/web/handlers/NativeViewGestureHandler.js.map +0 -1
- package/lib/module/web_hammer/NativeViewGestureHandler.js +0 -49
- package/lib/module/web_hammer/NativeViewGestureHandler.js.map +0 -1
- /package/android/{common → noreanimated}/src/main/java/com/swmansion/common/GestureHandlerStateManager.kt +0 -0
@@ -1,19 +1,9 @@
|
|
1
|
-
|
1
|
+
"use strict";
|
2
2
|
|
3
3
|
import { DiagonalDirections, Directions } from '../../Directions';
|
4
4
|
import { MINIMAL_RECOGNIZABLE_MAGNITUDE } from '../constants';
|
5
5
|
export default class Vector {
|
6
6
|
constructor(x, y) {
|
7
|
-
_defineProperty(this, "x", void 0);
|
8
|
-
|
9
|
-
_defineProperty(this, "y", void 0);
|
10
|
-
|
11
|
-
_defineProperty(this, "unitX", void 0);
|
12
|
-
|
13
|
-
_defineProperty(this, "unitY", void 0);
|
14
|
-
|
15
|
-
_defineProperty(this, "_magnitude", void 0);
|
16
|
-
|
17
7
|
this.x = x;
|
18
8
|
this.y = y;
|
19
9
|
this._magnitude = Math.hypot(this.x, this.y);
|
@@ -21,30 +11,22 @@ export default class Vector {
|
|
21
11
|
this.unitX = isMagnitudeSufficient ? this.x / this._magnitude : 0;
|
22
12
|
this.unitY = isMagnitudeSufficient ? this.y / this._magnitude : 0;
|
23
13
|
}
|
24
|
-
|
25
14
|
static fromDirection(direction) {
|
26
|
-
|
27
|
-
|
28
|
-
return (_DirectionToVectorMap = DirectionToVectorMappings.get(direction)) !== null && _DirectionToVectorMap !== void 0 ? _DirectionToVectorMap : new Vector(0, 0);
|
15
|
+
return DirectionToVectorMappings.get(direction) ?? new Vector(0, 0);
|
29
16
|
}
|
30
|
-
|
31
17
|
static fromVelocity(tracker, pointerId) {
|
32
18
|
const velocity = tracker.getVelocity(pointerId);
|
33
19
|
return new Vector(velocity.x, velocity.y);
|
34
20
|
}
|
35
|
-
|
36
21
|
get magnitude() {
|
37
22
|
return this._magnitude;
|
38
23
|
}
|
39
|
-
|
40
24
|
computeSimilarity(vector) {
|
41
25
|
return this.unitX * vector.unitX + this.unitY * vector.unitY;
|
42
26
|
}
|
43
|
-
|
44
27
|
isSimilar(vector, threshold) {
|
45
28
|
return this.computeSimilarity(vector) > threshold;
|
46
29
|
}
|
47
|
-
|
48
30
|
}
|
49
31
|
const DirectionToVectorMappings = new Map([[Directions.LEFT, new Vector(-1, 0)], [Directions.RIGHT, new Vector(1, 0)], [Directions.UP, new Vector(0, -1)], [Directions.DOWN, new Vector(0, 1)], [DiagonalDirections.UP_RIGHT, new Vector(1, -1)], [DiagonalDirections.DOWN_RIGHT, new Vector(1, 1)], [DiagonalDirections.UP_LEFT, new Vector(-1, -1)], [DiagonalDirections.DOWN_LEFT, new Vector(-1, 1)]]);
|
50
32
|
//# sourceMappingURL=Vector.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["DiagonalDirections","Directions","MINIMAL_RECOGNIZABLE_MAGNITUDE","Vector","constructor","x","y","_magnitude","Math","hypot","isMagnitudeSufficient","unitX","unitY","fromDirection","direction","DirectionToVectorMappings","get","fromVelocity","tracker","pointerId","velocity","getVelocity","magnitude","computeSimilarity","vector","isSimilar","threshold","Map","LEFT","RIGHT","UP","DOWN","UP_RIGHT","DOWN_RIGHT","UP_LEFT","DOWN_LEFT"],"sourceRoot":"../../../../src","sources":["web/tools/Vector.ts"],"mappings":";;AAAA,SAASA,kBAAkB,EAAEC,UAAU,QAAQ,kBAAkB;AACjE,S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GE,SAAS;EACnD;AACF;AAEA,MAAMX,yBAAyB,GAAG,IAAIY,GAAG,CAGvC,CACA,CAAC1B,UAAU,CAAC2B,IAAI,EAAE,IAAIzB,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EACpC,CAACF,UAAU,CAAC4B,KAAK,EAAE,IAAI1B,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EACpC,CAACF,UAAU,CAAC6B,EAAE,EAAE,IAAI3B,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAClC,CAACF,UAAU,CAAC8B,IAAI,EAAE,IAAI5B,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAEnC,CAACH,kBAAkB,CAACgC,QAAQ,EAAE,IAAI7B,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAChD,CAACH,kBAAkB,CAACiC,UAAU,EAAE,IAAI9B,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EACjD,CAACH,kBAAkB,CAACkC,OAAO,EAAE,IAAI/B,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAChD,CAACH,kBAAkB,CAACmC,SAAS,EAAE,IAAIhC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAClD,CAAC","ignoreList":[]}
|
@@ -1,32 +1,25 @@
|
|
1
|
-
|
1
|
+
"use strict";
|
2
2
|
|
3
3
|
import CircularBuffer from './CircularBuffer';
|
4
4
|
import LeastSquareSolver from './LeastSquareSolver';
|
5
5
|
export default class VelocityTracker {
|
6
|
+
assumePointerMoveStoppedMilliseconds = 40;
|
7
|
+
historySize = 20;
|
8
|
+
horizonMilliseconds = 300;
|
9
|
+
minSampleSize = 3;
|
6
10
|
constructor() {
|
7
|
-
_defineProperty(this, "assumePointerMoveStoppedMilliseconds", 40);
|
8
|
-
|
9
|
-
_defineProperty(this, "historySize", 20);
|
10
|
-
|
11
|
-
_defineProperty(this, "horizonMilliseconds", 300);
|
12
|
-
|
13
|
-
_defineProperty(this, "minSampleSize", 3);
|
14
|
-
|
15
|
-
_defineProperty(this, "samples", void 0);
|
16
|
-
|
17
11
|
this.samples = new CircularBuffer(this.historySize);
|
18
12
|
}
|
19
|
-
|
20
13
|
add(event) {
|
21
14
|
this.samples.push(event);
|
22
|
-
}
|
15
|
+
}
|
16
|
+
|
17
|
+
// Returns an estimate of the velocity of the object being tracked by the
|
23
18
|
// tracker given the current information available to the tracker.
|
24
19
|
//
|
25
20
|
// Information is added using [addPosition].
|
26
21
|
//
|
27
22
|
// Returns null if there is no data on which to base an estimate.
|
28
|
-
|
29
|
-
|
30
23
|
getVelocityEstimate() {
|
31
24
|
const x = [];
|
32
25
|
const y = [];
|
@@ -35,24 +28,21 @@ export default class VelocityTracker {
|
|
35
28
|
let sampleCount = 0;
|
36
29
|
let index = this.samples.size - 1;
|
37
30
|
const newestSample = this.samples.get(index);
|
38
|
-
|
39
31
|
if (!newestSample) {
|
40
32
|
return null;
|
41
33
|
}
|
34
|
+
let previousSample = newestSample;
|
42
35
|
|
43
|
-
|
36
|
+
// Starting with the most recent PointAtTime sample, iterate backwards while
|
44
37
|
// the samples represent continuous motion.
|
45
|
-
|
46
38
|
while (sampleCount < this.samples.size) {
|
47
39
|
const sample = this.samples.get(index);
|
48
40
|
const age = newestSample.time - sample.time;
|
49
41
|
const delta = Math.abs(sample.time - previousSample.time);
|
50
42
|
previousSample = sample;
|
51
|
-
|
52
43
|
if (age > this.horizonMilliseconds || delta > this.assumePointerMoveStoppedMilliseconds) {
|
53
44
|
break;
|
54
45
|
}
|
55
|
-
|
56
46
|
x.push(sample.x);
|
57
47
|
y.push(sample.y);
|
58
48
|
w.push(1);
|
@@ -60,15 +50,12 @@ export default class VelocityTracker {
|
|
60
50
|
sampleCount++;
|
61
51
|
index--;
|
62
52
|
}
|
63
|
-
|
64
53
|
if (sampleCount >= this.minSampleSize) {
|
65
54
|
const xSolver = new LeastSquareSolver(time, x, w);
|
66
55
|
const xFit = xSolver.solve(2);
|
67
|
-
|
68
56
|
if (xFit !== null) {
|
69
57
|
const ySolver = new LeastSquareSolver(time, y, w);
|
70
58
|
const yFit = ySolver.solve(2);
|
71
|
-
|
72
59
|
if (yFit !== null) {
|
73
60
|
const xVelocity = xFit.coefficients[1] * 1000;
|
74
61
|
const yVelocity = yFit.coefficients[1] * 1000;
|
@@ -76,23 +63,17 @@ export default class VelocityTracker {
|
|
76
63
|
}
|
77
64
|
}
|
78
65
|
}
|
79
|
-
|
80
66
|
return null;
|
81
67
|
}
|
82
|
-
|
83
68
|
get velocity() {
|
84
69
|
const estimate = this.getVelocityEstimate();
|
85
|
-
|
86
70
|
if (estimate !== null) {
|
87
71
|
return estimate;
|
88
72
|
}
|
89
|
-
|
90
73
|
return [0, 0];
|
91
74
|
}
|
92
|
-
|
93
75
|
reset() {
|
94
76
|
this.samples.clear();
|
95
77
|
}
|
96
|
-
|
97
78
|
}
|
98
79
|
//# sourceMappingURL=VelocityTracker.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["CircularBuffer","LeastSquareSolver","VelocityTracker","assumePointerMoveStoppedMilliseconds","historySize","horizonMilliseconds","minSampleSize","constructor","samples","add","event","push","getVelocityEstimate","x","y","w","time","sampleCount","index","size","newestSample","get","previousSample","sample","age","delta","Math","abs","xSolver","xFit","solve","ySolver","yFit","xVelocity","coefficients","yVelocity","velocity","estimate","reset","clear"],"sourceRoot":"../../../../src","sources":["web/tools/VelocityTracker.ts"],"mappings":";;AACA,OAAOA,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,iBAAiB,MAAM,qBAAqB;AAEnD,eAAe,MAAMC,eAAe,CAAC;EAC3BC,oCAAoC,GAAG,EAAE;EACzCC,WAAW,GAAG,EAAE;EAChBC,mBAAmB,GAAG,GAAG;EACzBC,aAAa,GAAG,CAAC;EAIzBC,WAAWA,CAAA,EAAG;IACZ,IAAI,C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ACL,IAAI,CAAC,CAACa,GAAG,CAAC;MAEfP,WAAW,EAAE;MACbC,KAAK,EAAE;IACT;IAEA,IAAID,WAAW,IAAI,IAAI,CAACX,aAAa,EAAE;MACrC,MAAMsB,OAAO,GAAG,IAAI3B,iBAAiB,CAACe,IAAI,EAAEH,CAAC,EAAEE,CAAC,CAAC;MACjD,MAAMc,IAAI,GAAGD,OAAO,CAACE,KAAK,CAAC,CAAC,CAAC;MAE7B,IAAID,IAAI,KAAK,IAAI,EAAE;QACjB,MAAME,OAAO,GAAG,IAAI9B,iBAAiB,CAACe,IAAI,EAAEF,CAAC,EAAEC,CAAC,CAAC;QACjD,MAAMiB,IAAI,GAAGD,OAAO,CAACD,KAAK,CAAC,CAAC,CAAC;QAE7B,IAAIE,IAAI,KAAK,IAAI,EAAE;UACjB,MAAMC,SAAS,GAAGJ,IAAI,CAACK,YAAY,CAAC,CAAC,CAAC,GAAG,IAAI;UAC7C,MAAMC,SAAS,GAAGH,IAAI,CAACE,YAAY,CAAC,CAAC,CAAC,GAAG,IAAI;UAE7C,OAAO,CAACD,SAAS,EAAEE,SAAS,CAAC;QAC/B;MACF;IACF;IAEA,OAAO,IAAI;EACb;EAEA,IAAWC,QAAQA,CAAA,EAAqB;IACtC,MAAMC,QAAQ,GAAG,IAAI,CAACzB,mBAAmB,CAAC,CAAC;IAC3C,IAAIyB,QAAQ,KAAK,IAAI,EAAE;MACrB,OAAOA,QAAQ;IACjB;IACA,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;EACf;EAEOC,KAAKA,CAAA,EAAS;IACnB,IAAI,CAAC9B,OAAO,CAAC+B,KAAK,CAAC,CAAC;EACtB;AACF","ignoreList":[]}
|
@@ -1,42 +1,33 @@
|
|
1
|
-
|
1
|
+
"use strict";
|
2
2
|
|
3
3
|
import EventManager from './EventManager';
|
4
4
|
import { EventTypes } from '../interfaces';
|
5
5
|
import { PointerType } from '../../PointerType';
|
6
6
|
export default class WheelEventManager extends EventManager {
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
wheelDelta = {
|
8
|
+
x: 0,
|
9
|
+
y: 0
|
10
|
+
};
|
11
|
+
resetDelta = _event => {
|
12
|
+
this.wheelDelta = {
|
11
13
|
x: 0,
|
12
14
|
y: 0
|
13
|
-
}
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
_defineProperty(this, "wheelCallback", event => {
|
23
|
-
this.wheelDelta.x += event.deltaX;
|
24
|
-
this.wheelDelta.y += event.deltaY;
|
25
|
-
const adaptedEvent = this.mapEvent(event);
|
26
|
-
this.onWheel(adaptedEvent);
|
27
|
-
});
|
28
|
-
}
|
29
|
-
|
15
|
+
};
|
16
|
+
};
|
17
|
+
wheelCallback = event => {
|
18
|
+
this.wheelDelta.x += event.deltaX;
|
19
|
+
this.wheelDelta.y += event.deltaY;
|
20
|
+
const adaptedEvent = this.mapEvent(event);
|
21
|
+
this.onWheel(adaptedEvent);
|
22
|
+
};
|
30
23
|
registerListeners() {
|
31
24
|
this.view.addEventListener('pointermove', this.resetDelta);
|
32
25
|
this.view.addEventListener('wheel', this.wheelCallback);
|
33
26
|
}
|
34
|
-
|
35
27
|
unregisterListeners() {
|
36
28
|
this.view.removeEventListener('pointermove', this.resetDelta);
|
37
29
|
this.view.removeEventListener('wheel', this.wheelCallback);
|
38
30
|
}
|
39
|
-
|
40
31
|
mapEvent(event) {
|
41
32
|
return {
|
42
33
|
x: event.clientX + this.wheelDelta.x,
|
@@ -51,10 +42,8 @@ export default class WheelEventManager extends EventManager {
|
|
51
42
|
wheelDeltaY: event.wheelDeltaY
|
52
43
|
};
|
53
44
|
}
|
54
|
-
|
55
45
|
resetManager() {
|
56
46
|
super.resetManager();
|
57
47
|
}
|
58
|
-
|
59
48
|
}
|
60
49
|
//# sourceMappingURL=WheelEventManager.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"names":["EventManager","EventTypes","PointerType","WheelEventManager","wheelDelta","x","y","resetDelta","_event","wheelCallback","event","deltaX","deltaY","adaptedEvent","mapEvent","onWheel","registerListeners","view","addEventListener","unregisterListeners","removeEventListener","clientX","clientY","offsetX","offsetY","pointerId","eventType","MOVE","pointerType","OTHER","time","timeStamp","wheelDeltaY","resetManager"],"sourceRoot":"../../../../src","sources":["web/tools/WheelEventManager.ts"],"mappings":";;AAAA,OAAOA,YAAY,MAAM,gBAAgB;AACzC,SAAuBC,UAAU,QAAQ,eAAe;AACxD,SAASC,WAAW,QAAQ,mBAAmB;AAE/C,eAAe,MAAMC,iBAAiB,SAASH,YAAY,CAAc;EAC/DI,UAAU,GAAG;IAAEC,CAAC,EAAE,CAAC;IAAEC,CAAC,EAAE;EAAE,CAAC;EAE3BC,UAAU,GAAIC,MAAoB,IAAK;IAC7C,IAAI,CAACJ,UAAU,GAAG;MAAEC,CAAC,EAAE,CAAC;MAAEC,CAAC,EAAE;IAAE,CAAC;EAClC,CAAC;EAEOG,aAAa,GAAIC,KAAiB,IAAK;IAC7C,IAAI,CAACN,UAAU,CAACC,CAAC,IAAIK,KAAK,CAACC,MAAM;IACjC,IAAI,CAACP,UAAU,CAACE,CAAC,IAAII,KAAK,CAACE,MAAM;IAEjC,MAAMC,YAAY,GAAG,IAAI,CAACC,QAAQ,CAACJ,KAAK,CAAC;IACzC,IAAI,CAACK,OAAO,CAACF,YAAY,CAAC;EAC5B,CAAC;EAEMG,iBAAiBA,CAAA,EAAS;IAC/B,IAAI,CAACC,IAAI,CAACC,gBAAgB,CAAC,aAAa,EAAE,IAAI,CAACX,UAAU,CAAC;IAC1D,IAAI,CAACU,IAAI,CAACC,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAACT,aAAa,CAAC;EACzD;EAEOU,mBAAmBA,CAAA,EAAS;IACjC,IAAI,CAACF,IAAI,CAACG,mBAAmB,CAAC,aAAa,EAAE,IAAI,CAACb,UAAU,CAAC;IAC7D,IAAI,CAACU,IAAI,CAACG,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAACX,aAAa,CAAC;EAC5D;EAEUK,QAAQA,CAACJ,KAAiB,EAAgB;IAClD,OAAO;MACLL,CAAC,EAAEK,KAAK,CAACW,OAAO,GAAG,IAAI,CAACjB,UAAU,CAACC,CAAC;MACpCC,CAAC,EAAEI,KAAK,CAACY,OAAO,GAAG,IAAI,CAAClB,UAAU,CAACE,CAAC;MACpCiB,OAAO,EAAEb,KAAK,CAACa,OAAO,GAAGb,KAAK,CAACC,MAAM;MACrCa,OAAO,EAAEd,KAAK,CAACc,OAAO,GAAGd,KAAK,CAACE,MAAM;MACrCa,SAAS,EAAE,CAAC,CAAC;MACbC,SAAS,EAAEzB,UAAU,CAAC0B,IAAI;MAC1BC,WAAW,EAAE1B,WAAW,CAAC2B,KAAK;MAC9BC,IAAI,EAAEpB,KAAK,CAACqB,SAAS;MACrB;MACAC,WAAW,EAAEtB,KAAK,CAACsB;IACrB,CAAC;EACH;EAEOC,YAAYA,CAAA,EAAS;IAC1B,KAAK,CAACA,YAAY,CAAC,CAAC;EACtB;AACF","ignoreList":[]}
|
package/lib/module/web/utils.js
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
1
3
|
import { PointerType } from '../PointerType';
|
2
4
|
export function isPointerInBounds(view, {
|
3
5
|
x,
|
@@ -10,50 +12,44 @@ export const PointerTypeMapping = new Map([['mouse', PointerType.MOUSE], ['touch
|
|
10
12
|
export const degToRad = degrees => degrees * Math.PI / 180;
|
11
13
|
export const coneToDeviation = degrees => Math.cos(degToRad(degrees / 2));
|
12
14
|
export function calculateViewScale(view) {
|
13
|
-
var _RegExp$exec;
|
14
|
-
|
15
15
|
const styles = getComputedStyle(view);
|
16
16
|
const resultScales = {
|
17
17
|
scaleX: 1,
|
18
18
|
scaleY: 1
|
19
|
-
};
|
19
|
+
};
|
20
20
|
|
21
|
+
// Get scales from scale property
|
21
22
|
if (styles.scale !== undefined && styles.scale !== 'none') {
|
22
23
|
const scales = styles.scale.split(' ');
|
23
|
-
|
24
24
|
if (scales[0]) {
|
25
25
|
resultScales.scaleX = parseFloat(scales[0]);
|
26
26
|
}
|
27
|
-
|
28
27
|
resultScales.scaleY = scales[1] ? parseFloat(scales[1]) : parseFloat(scales[0]);
|
29
|
-
}
|
30
|
-
|
31
|
-
|
32
|
-
const matrixElements = (_RegExp$exec = new RegExp(/matrix\((.+)\)/).exec(styles.transform)) === null || _RegExp$exec === void 0 ? void 0 : _RegExp$exec[1];
|
28
|
+
}
|
33
29
|
|
30
|
+
// Get scales from transform property
|
31
|
+
const matrixElements = new RegExp(/matrix\((.+)\)/).exec(styles.transform)?.[1];
|
34
32
|
if (matrixElements) {
|
35
33
|
const matrixElementsArray = matrixElements.split(', ');
|
36
34
|
resultScales.scaleX *= parseFloat(matrixElementsArray[0]);
|
37
35
|
resultScales.scaleY *= parseFloat(matrixElementsArray[3]);
|
38
36
|
}
|
39
|
-
|
40
37
|
return resultScales;
|
41
38
|
}
|
42
39
|
export function tryExtractStylusData(event) {
|
43
40
|
const pointerType = PointerTypeMapping.get(event.pointerType);
|
44
|
-
|
45
41
|
if (pointerType !== PointerType.STYLUS) {
|
46
42
|
return;
|
47
|
-
}
|
48
|
-
|
49
|
-
|
50
|
-
const eventAzimuthAngle = event.azimuthAngle; // @ts-ignore This property exists (https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent#instance_properties)
|
43
|
+
}
|
51
44
|
|
45
|
+
// @ts-ignore This property exists (https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent#instance_properties)
|
46
|
+
const eventAzimuthAngle = event.azimuthAngle;
|
47
|
+
// @ts-ignore This property exists (https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent#instance_properties)
|
52
48
|
const eventAltitudeAngle = event.altitudeAngle;
|
53
|
-
|
54
49
|
if (event.tiltX === 0 && event.tiltY === 0) {
|
55
50
|
// If we are in this branch, it means that either tilt properties are not supported and we have to calculate them from altitude and azimuth angles,
|
56
51
|
// or stylus is perpendicular to the screen and we can use altitude / azimuth instead of tilt
|
52
|
+
|
57
53
|
// If azimuth and altitude are undefined in this branch, it means that we are either perpendicular to the screen,
|
58
54
|
// or that none of the position sets is supported. In that case, we can treat stylus as perpendicular
|
59
55
|
if (eventAzimuthAngle === undefined || eventAltitudeAngle === undefined) {
|
@@ -65,7 +61,6 @@ export function tryExtractStylusData(event) {
|
|
65
61
|
pressure: event.pressure
|
66
62
|
};
|
67
63
|
}
|
68
|
-
|
69
64
|
const {
|
70
65
|
tiltX,
|
71
66
|
tiltY
|
@@ -78,7 +73,6 @@ export function tryExtractStylusData(event) {
|
|
78
73
|
pressure: event.pressure
|
79
74
|
};
|
80
75
|
}
|
81
|
-
|
82
76
|
const {
|
83
77
|
altitudeAngle,
|
84
78
|
azimuthAngle
|
@@ -90,17 +84,18 @@ export function tryExtractStylusData(event) {
|
|
90
84
|
altitudeAngle,
|
91
85
|
pressure: event.pressure
|
92
86
|
};
|
93
|
-
}
|
87
|
+
}
|
88
|
+
|
89
|
+
// `altitudeAngle` and `azimuthAngle` are experimental properties, which are not supported on Firefox and Safari.
|
94
90
|
// Given that, we use `tilt` properties and algorithm that converts one value to another.
|
95
91
|
//
|
96
92
|
// Source: https://w3c.github.io/pointerevents/#converting-between-tiltx-tilty-and-altitudeangle-azimuthangle
|
97
|
-
|
98
93
|
function tilt2spherical(tiltX, tiltY) {
|
99
94
|
const tiltXrad = tiltX * Math.PI / 180;
|
100
|
-
const tiltYrad = tiltY * Math.PI / 180;
|
95
|
+
const tiltYrad = tiltY * Math.PI / 180;
|
101
96
|
|
97
|
+
// calculate azimuth angle
|
102
98
|
let azimuthAngle = 0;
|
103
|
-
|
104
99
|
if (tiltX === 0) {
|
105
100
|
if (tiltY > 0) {
|
106
101
|
azimuthAngle = Math.PI / 2;
|
@@ -119,15 +114,13 @@ function tilt2spherical(tiltX, tiltY) {
|
|
119
114
|
const tanX = Math.tan(tiltXrad);
|
120
115
|
const tanY = Math.tan(tiltYrad);
|
121
116
|
azimuthAngle = Math.atan2(tanY, tanX);
|
122
|
-
|
123
117
|
if (azimuthAngle < 0) {
|
124
118
|
azimuthAngle += 2 * Math.PI;
|
125
119
|
}
|
126
|
-
}
|
127
|
-
|
120
|
+
}
|
128
121
|
|
122
|
+
// calculate altitude angle
|
129
123
|
let altitudeAngle = 0;
|
130
|
-
|
131
124
|
if (Math.abs(tiltX) === 90 || Math.abs(tiltY) === 90) {
|
132
125
|
altitudeAngle = 0;
|
133
126
|
} else if (tiltX === 0) {
|
@@ -138,70 +131,59 @@ function tilt2spherical(tiltX, tiltY) {
|
|
138
131
|
// Non-boundary case: neither tiltX nor tiltY is equal to 0 or +-90
|
139
132
|
altitudeAngle = Math.atan(1.0 / Math.sqrt(Math.pow(Math.tan(tiltXrad), 2) + Math.pow(Math.tan(tiltYrad), 2)));
|
140
133
|
}
|
141
|
-
|
142
134
|
return {
|
143
135
|
altitudeAngle: altitudeAngle,
|
144
136
|
azimuthAngle: azimuthAngle
|
145
137
|
};
|
146
|
-
}
|
138
|
+
}
|
139
|
+
|
140
|
+
// If we are on a platform that doesn't support `tiltX` and `tiltY`, we have to calculate them from `altitude` and `azimuth` angles.
|
147
141
|
//
|
148
142
|
// Source: https://w3c.github.io/pointerevents/#converting-between-tiltx-tilty-and-altitudeangle-azimuthangle
|
149
|
-
|
150
|
-
|
151
143
|
function spherical2tilt(altitudeAngle, azimuthAngle) {
|
152
144
|
const radToDeg = 180 / Math.PI;
|
153
145
|
let tiltXrad = 0;
|
154
146
|
let tiltYrad = 0;
|
155
|
-
|
156
147
|
if (altitudeAngle === 0) {
|
157
148
|
// the pen is in the X-Y plane
|
158
149
|
if (azimuthAngle === 0 || azimuthAngle === 2 * Math.PI) {
|
159
150
|
// pen is on positive X axis
|
160
151
|
tiltXrad = Math.PI / 2;
|
161
152
|
}
|
162
|
-
|
163
153
|
if (azimuthAngle === Math.PI / 2) {
|
164
154
|
// pen is on positive Y axis
|
165
155
|
tiltYrad = Math.PI / 2;
|
166
156
|
}
|
167
|
-
|
168
157
|
if (azimuthAngle === Math.PI) {
|
169
158
|
// pen is on negative X axis
|
170
159
|
tiltXrad = -Math.PI / 2;
|
171
160
|
}
|
172
|
-
|
173
161
|
if (azimuthAngle === 3 * Math.PI / 2) {
|
174
162
|
// pen is on negative Y axis
|
175
163
|
tiltYrad = -Math.PI / 2;
|
176
164
|
}
|
177
|
-
|
178
165
|
if (azimuthAngle > 0 && azimuthAngle < Math.PI / 2) {
|
179
166
|
tiltXrad = Math.PI / 2;
|
180
167
|
tiltYrad = Math.PI / 2;
|
181
168
|
}
|
182
|
-
|
183
169
|
if (azimuthAngle > Math.PI / 2 && azimuthAngle < Math.PI) {
|
184
170
|
tiltXrad = -Math.PI / 2;
|
185
171
|
tiltYrad = Math.PI / 2;
|
186
172
|
}
|
187
|
-
|
188
173
|
if (azimuthAngle > Math.PI && azimuthAngle < 3 * Math.PI / 2) {
|
189
174
|
tiltXrad = -Math.PI / 2;
|
190
175
|
tiltYrad = -Math.PI / 2;
|
191
176
|
}
|
192
|
-
|
193
177
|
if (azimuthAngle > 3 * Math.PI / 2 && azimuthAngle < 2 * Math.PI) {
|
194
178
|
tiltXrad = Math.PI / 2;
|
195
179
|
tiltYrad = -Math.PI / 2;
|
196
180
|
}
|
197
181
|
}
|
198
|
-
|
199
182
|
if (altitudeAngle !== 0) {
|
200
183
|
const tanAlt = Math.tan(altitudeAngle);
|
201
184
|
tiltXrad = Math.atan(Math.cos(azimuthAngle) / tanAlt);
|
202
185
|
tiltYrad = Math.atan(Math.sin(azimuthAngle) / tanAlt);
|
203
186
|
}
|
204
|
-
|
205
187
|
const tiltX = Math.round(tiltXrad * radToDeg);
|
206
188
|
const tiltY = Math.round(tiltYrad * radToDeg);
|
207
189
|
return {
|
@@ -209,8 +191,9 @@ function spherical2tilt(altitudeAngle, azimuthAngle) {
|
|
209
191
|
tiltY
|
210
192
|
};
|
211
193
|
}
|
194
|
+
export const RNSVGElements = new Set(['Circle', 'ClipPath', 'Ellipse', 'ForeignObject', 'G', 'Image', 'Line', 'Marker', 'Mask', 'Path', 'Pattern', 'Polygon', 'Polyline', 'Rect', 'Svg', 'Symbol', 'TSpan', 'Text', 'TextPath', 'Use']);
|
212
195
|
|
213
|
-
|
196
|
+
// This function helps us determine whether given node is SVGElement or not. In our implementation of
|
214
197
|
// findNodeHandle, we can encounter such element in 2 forms - SVG tag or ref to SVG Element. Since Gesture Handler
|
215
198
|
// does not depend on SVG, we use our simplified SVGRef type that has `elementRef` field. This is something that is present
|
216
199
|
// in actual SVG ref object.
|
@@ -219,25 +202,22 @@ export const RNSVGElements = new Set(['Circle', 'ClipPath', 'Ellipse', 'ForeignO
|
|
219
202
|
// corresponds to one of the possible SVG elements. Then we also check if `elementRef` field exists.
|
220
203
|
// By doing both steps we decrease probability of detecting situations where, for example, user makes custom `Circle` and
|
221
204
|
// we treat it as SVG.
|
222
|
-
|
223
205
|
export function isRNSVGElement(viewRef) {
|
224
206
|
const componentClassName = Object.getPrototypeOf(viewRef).constructor.name;
|
225
207
|
return RNSVGElements.has(componentClassName) && Object.hasOwn(viewRef, 'elementRef');
|
226
|
-
}
|
208
|
+
}
|
209
|
+
|
210
|
+
// This function checks if given node is SVGElement. Unlike the function above, this one
|
227
211
|
// operates on React Nodes, not DOM nodes.
|
228
212
|
//
|
229
213
|
// Second condition was introduced to handle case where SVG element was wrapped with
|
230
214
|
// `createAnimatedComponent` from Reanimated.
|
231
|
-
|
232
215
|
export function isRNSVGNode(node) {
|
233
|
-
var _node$ref, _Object$getPrototypeO, _node$type;
|
234
|
-
|
235
216
|
// If `ref` has `rngh` field, it means that component comes from Gesture Handler. This is a special case for
|
236
217
|
// `Text` component, which is present in `RNSVGElements` set, yet we don't want to treat it as SVG.
|
237
|
-
if (
|
218
|
+
if (node.ref?.rngh) {
|
238
219
|
return false;
|
239
220
|
}
|
240
|
-
|
241
|
-
return ((_Object$getPrototypeO = Object.getPrototypeOf(node === null || node === void 0 ? void 0 : node.type)) === null || _Object$getPrototypeO === void 0 ? void 0 : _Object$getPrototypeO.name) === 'WebShape' || RNSVGElements.has(node === null || node === void 0 ? void 0 : (_node$type = node.type) === null || _node$type === void 0 ? void 0 : _node$type.displayName);
|
221
|
+
return Object.getPrototypeOf(node?.type)?.name === 'WebShape' || RNSVGElements.has(node?.type?.displayName);
|
242
222
|
}
|
243
223
|
//# sourceMappingURL=utils.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["utils.ts"],"names":["PointerType","isPointerInBounds","view","x","y","rect","getBoundingClientRect","left","right","top","bottom","PointerTypeMapping","Map","MOUSE","TOUCH","STYLUS","OTHER","degToRad","degrees","Math","PI","coneToDeviation","cos","calculateViewScale","styles","getComputedStyle","resultScales","scaleX","scaleY","scale","undefined","scales","split","parseFloat","matrixElements","RegExp","exec","transform","matrixElementsArray","tryExtractStylusData","event","pointerType","get","eventAzimuthAngle","azimuthAngle","eventAltitudeAngle","altitudeAngle","tiltX","tiltY","pressure","spherical2tilt","tilt2spherical","tiltXrad","tiltYrad","abs","tanX","tan","tanY","atan2","atan","sqrt","pow","radToDeg","tanAlt","sin","round","RNSVGElements","Set","isRNSVGElement","viewRef","componentClassName","Object","getPrototypeOf","constructor","name","has","hasOwn","isRNSVGNode","node","ref","rngh","type","displayName"],"mappings":"AAAA,SAASA,WAAT,QAA4B,gBAA5B;AAQA,OAAO,SAASC,iBAAT,CAA2BC,IAA3B,EAA8C;AAAEC,EAAAA,CAAF;AAAKC,EAAAA;AAAL,CAA9C,EAAwE;AAC7E,QAAMC,IAAa,GAAGH,IAAI,CAACI,qBAAL,EAAtB;AAEA,SAAOH,CAAC,IAAIE,IAAI,CAACE,IAAV,IAAkBJ,CAAC,IAAIE,IAAI,CAACG,KAA5B,IAAqCJ,CAAC,IAAIC,IAAI,CAACI,GAA/C,IAAsDL,CAAC,IAAIC,IAAI,CAACK,MAAvE;AACD;AAED,OAAO,MAAMC,kBAAkB,GAAG,IAAIC,GAAJ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AAASC,IAAAA;AAAT,GAAP;AACD;;AAED,OAAO,MAAMkB,aAAa,GAAG,IAAIC,GAAJ,CAAQ,CACnC,QADmC,EAEnC,UAFmC,EAGnC,SAHmC,EAInC,eAJmC,EAKnC,GALmC,EAMnC,OANmC,EAOnC,MAPmC,EAQnC,QARmC,EASnC,MATmC,EAUnC,MAVmC,EAWnC,SAXmC,EAYnC,SAZmC,EAanC,UAbmC,EAcnC,MAdmC,EAenC,KAfmC,EAgBnC,QAhBmC,EAiBnC,OAjBmC,EAkBnC,MAlBmC,EAmBnC,UAnBmC,EAoBnC,KApBmC,CAAR,CAAtB,C,CAuBP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,cAAT,CAAwBC,OAAxB,EAA6D;AAClE,QAAMC,kBAAkB,GAAGC,MAAM,CAACC,cAAP,CAAsBH,OAAtB,EAA+BI,WAA/B,CAA2CC,IAAtE;AAEA,SACER,aAAa,CAACS,GAAd,CAAkBL,kBAAlB,KACAC,MAAM,CAACK,MAAP,CAAcP,OAAd,EAAuB,YAAvB,CAFF;AAID,C,CAED;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASQ,WAAT,CAAqBC,IAArB,EAAgC;AAAA;;AACrC;AACA;AACA,mBAAIA,IAAI,CAACC,GAAT,sCAAI,UAAUC,IAAd,EAAoB;AAClB,WAAO,KAAP;AACD;;AAED,SACE,0BAAAT,MAAM,CAACC,cAAP,CAAsBM,IAAtB,aAAsBA,IAAtB,uBAAsBA,IAAI,CAAEG,IAA5B,iFAAmCP,IAAnC,MAA4C,UAA5C,IACAR,aAAa,CAACS,GAAd,CAAkBG,IAAlB,aAAkBA,IAAlB,qCAAkBA,IAAI,CAAEG,IAAxB,+CAAkB,WAAYC,WAA9B,CAFF;AAID","sourcesContent":["import { PointerType } from '../PointerType';\nimport type {\n GestureHandlerRef,\n Point,\n StylusData,\n SVGRef,\n} from './interfaces';\n\nexport function isPointerInBounds(view: HTMLElement, { x, y }: Point): boolean {\n const rect: DOMRect = view.getBoundingClientRect();\n\n return x >= rect.left && x <= rect.right && y >= rect.top && y <= rect.bottom;\n}\n\nexport const PointerTypeMapping = new Map<string, PointerType>([\n ['mouse', PointerType.MOUSE],\n ['touch', PointerType.TOUCH],\n ['pen', PointerType.STYLUS],\n ['none', PointerType.OTHER],\n]);\n\nexport const degToRad = (degrees: number) => (degrees * Math.PI) / 180;\n\nexport const coneToDeviation = (degrees: number) =>\n Math.cos(degToRad(degrees / 2));\n\nexport function calculateViewScale(view: HTMLElement) {\n const styles = getComputedStyle(view);\n\n const resultScales = {\n scaleX: 1,\n scaleY: 1,\n };\n\n // Get scales from scale property\n if (styles.scale !== undefined && styles.scale !== 'none') {\n const scales = styles.scale.split(' ');\n\n if (scales[0]) {\n resultScales.scaleX = parseFloat(scales[0]);\n }\n\n resultScales.scaleY = scales[1]\n ? parseFloat(scales[1])\n : parseFloat(scales[0]);\n }\n\n // Get scales from transform property\n const matrixElements = new RegExp(/matrix\\((.+)\\)/).exec(\n styles.transform\n )?.[1];\n\n if (matrixElements) {\n const matrixElementsArray = matrixElements.split(', ');\n\n resultScales.scaleX *= parseFloat(matrixElementsArray[0]);\n resultScales.scaleY *= parseFloat(matrixElementsArray[3]);\n }\n\n return resultScales;\n}\n\nexport function tryExtractStylusData(\n event: PointerEvent\n): StylusData | undefined {\n const pointerType = PointerTypeMapping.get(event.pointerType);\n\n if (pointerType !== PointerType.STYLUS) {\n return;\n }\n\n // @ts-ignore This property exists (https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent#instance_properties)\n const eventAzimuthAngle: number | undefined = event.azimuthAngle;\n // @ts-ignore This property exists (https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent#instance_properties)\n const eventAltitudeAngle: number | undefined = event.altitudeAngle;\n\n if (event.tiltX === 0 && event.tiltY === 0) {\n // If we are in this branch, it means that either tilt properties are not supported and we have to calculate them from altitude and azimuth angles,\n // or stylus is perpendicular to the screen and we can use altitude / azimuth instead of tilt\n\n // If azimuth and altitude are undefined in this branch, it means that we are either perpendicular to the screen,\n // or that none of the position sets is supported. In that case, we can treat stylus as perpendicular\n if (eventAzimuthAngle === undefined || eventAltitudeAngle === undefined) {\n return {\n tiltX: 0,\n tiltY: 0,\n azimuthAngle: Math.PI / 2,\n altitudeAngle: Math.PI / 2,\n pressure: event.pressure,\n };\n }\n\n const { tiltX, tiltY } = spherical2tilt(\n eventAltitudeAngle,\n eventAzimuthAngle\n );\n\n return {\n tiltX,\n tiltY,\n azimuthAngle: eventAzimuthAngle,\n altitudeAngle: eventAltitudeAngle,\n pressure: event.pressure,\n };\n }\n\n const { altitudeAngle, azimuthAngle } = tilt2spherical(\n event.tiltX,\n event.tiltY\n );\n\n return {\n tiltX: event.tiltX,\n tiltY: event.tiltY,\n azimuthAngle,\n altitudeAngle,\n pressure: event.pressure,\n };\n}\n\n// `altitudeAngle` and `azimuthAngle` are experimental properties, which are not supported on Firefox and Safari.\n// Given that, we use `tilt` properties and algorithm that converts one value to another.\n//\n// Source: https://w3c.github.io/pointerevents/#converting-between-tiltx-tilty-and-altitudeangle-azimuthangle\nfunction tilt2spherical(tiltX: number, tiltY: number) {\n const tiltXrad = (tiltX * Math.PI) / 180;\n const tiltYrad = (tiltY * Math.PI) / 180;\n\n // calculate azimuth angle\n let azimuthAngle = 0;\n\n if (tiltX === 0) {\n if (tiltY > 0) {\n azimuthAngle = Math.PI / 2;\n } else if (tiltY < 0) {\n azimuthAngle = (3 * Math.PI) / 2;\n }\n } else if (tiltY === 0) {\n if (tiltX < 0) {\n azimuthAngle = Math.PI;\n }\n } else if (Math.abs(tiltX) === 90 || Math.abs(tiltY) === 90) {\n // not enough information to calculate azimuth\n azimuthAngle = 0;\n } else {\n // Non-boundary case: neither tiltX nor tiltY is equal to 0 or +-90\n const tanX = Math.tan(tiltXrad);\n const tanY = Math.tan(tiltYrad);\n\n azimuthAngle = Math.atan2(tanY, tanX);\n if (azimuthAngle < 0) {\n azimuthAngle += 2 * Math.PI;\n }\n }\n\n // calculate altitude angle\n let altitudeAngle = 0;\n\n if (Math.abs(tiltX) === 90 || Math.abs(tiltY) === 90) {\n altitudeAngle = 0;\n } else if (tiltX === 0) {\n altitudeAngle = Math.PI / 2 - Math.abs(tiltYrad);\n } else if (tiltY === 0) {\n altitudeAngle = Math.PI / 2 - Math.abs(tiltXrad);\n } else {\n // Non-boundary case: neither tiltX nor tiltY is equal to 0 or +-90\n altitudeAngle = Math.atan(\n 1.0 /\n Math.sqrt(\n Math.pow(Math.tan(tiltXrad), 2) + Math.pow(Math.tan(tiltYrad), 2)\n )\n );\n }\n\n return { altitudeAngle: altitudeAngle, azimuthAngle: azimuthAngle };\n}\n\n// If we are on a platform that doesn't support `tiltX` and `tiltY`, we have to calculate them from `altitude` and `azimuth` angles.\n//\n// Source: https://w3c.github.io/pointerevents/#converting-between-tiltx-tilty-and-altitudeangle-azimuthangle\nfunction spherical2tilt(altitudeAngle: number, azimuthAngle: number) {\n const radToDeg = 180 / Math.PI;\n\n let tiltXrad = 0;\n let tiltYrad = 0;\n\n if (altitudeAngle === 0) {\n // the pen is in the X-Y plane\n if (azimuthAngle === 0 || azimuthAngle === 2 * Math.PI) {\n // pen is on positive X axis\n tiltXrad = Math.PI / 2;\n }\n if (azimuthAngle === Math.PI / 2) {\n // pen is on positive Y axis\n tiltYrad = Math.PI / 2;\n }\n if (azimuthAngle === Math.PI) {\n // pen is on negative X axis\n tiltXrad = -Math.PI / 2;\n }\n if (azimuthAngle === (3 * Math.PI) / 2) {\n // pen is on negative Y axis\n tiltYrad = -Math.PI / 2;\n }\n if (azimuthAngle > 0 && azimuthAngle < Math.PI / 2) {\n tiltXrad = Math.PI / 2;\n tiltYrad = Math.PI / 2;\n }\n if (azimuthAngle > Math.PI / 2 && azimuthAngle < Math.PI) {\n tiltXrad = -Math.PI / 2;\n tiltYrad = Math.PI / 2;\n }\n if (azimuthAngle > Math.PI && azimuthAngle < (3 * Math.PI) / 2) {\n tiltXrad = -Math.PI / 2;\n tiltYrad = -Math.PI / 2;\n }\n if (azimuthAngle > (3 * Math.PI) / 2 && azimuthAngle < 2 * Math.PI) {\n tiltXrad = Math.PI / 2;\n tiltYrad = -Math.PI / 2;\n }\n }\n\n if (altitudeAngle !== 0) {\n const tanAlt = Math.tan(altitudeAngle);\n\n tiltXrad = Math.atan(Math.cos(azimuthAngle) / tanAlt);\n tiltYrad = Math.atan(Math.sin(azimuthAngle) / tanAlt);\n }\n\n const tiltX = Math.round(tiltXrad * radToDeg);\n const tiltY = Math.round(tiltYrad * radToDeg);\n\n return { tiltX, tiltY };\n}\n\nexport const RNSVGElements = new Set([\n 'Circle',\n 'ClipPath',\n 'Ellipse',\n 'ForeignObject',\n 'G',\n 'Image',\n 'Line',\n 'Marker',\n 'Mask',\n 'Path',\n 'Pattern',\n 'Polygon',\n 'Polyline',\n 'Rect',\n 'Svg',\n 'Symbol',\n 'TSpan',\n 'Text',\n 'TextPath',\n 'Use',\n]);\n\n// This function helps us determine whether given node is SVGElement or not. In our implementation of\n// findNodeHandle, we can encounter such element in 2 forms - SVG tag or ref to SVG Element. Since Gesture Handler\n// does not depend on SVG, we use our simplified SVGRef type that has `elementRef` field. This is something that is present\n// in actual SVG ref object.\n//\n// In order to make sure that node passed into this function is in fact SVG element, first we check if its constructor name\n// corresponds to one of the possible SVG elements. Then we also check if `elementRef` field exists.\n// By doing both steps we decrease probability of detecting situations where, for example, user makes custom `Circle` and\n// we treat it as SVG.\nexport function isRNSVGElement(viewRef: SVGRef | GestureHandlerRef) {\n const componentClassName = Object.getPrototypeOf(viewRef).constructor.name;\n\n return (\n RNSVGElements.has(componentClassName) &&\n Object.hasOwn(viewRef, 'elementRef')\n );\n}\n\n// This function checks if given node is SVGElement. Unlike the function above, this one\n// operates on React Nodes, not DOM nodes.\n//\n// Second condition was introduced to handle case where SVG element was wrapped with\n// `createAnimatedComponent` from Reanimated.\nexport function isRNSVGNode(node: any) {\n // If `ref` has `rngh` field, it means that component comes from Gesture Handler. This is a special case for\n // `Text` component, which is present in `RNSVGElements` set, yet we don't want to treat it as SVG.\n if (node.ref?.rngh) {\n return false;\n }\n\n return (\n Object.getPrototypeOf(node?.type)?.name === 'WebShape' ||\n RNSVGElements.has(node?.type?.displayName)\n );\n}\n"]}
|
1
|
+
{"version":3,"names":["PointerType","isPointerInBounds","view","x","y","rect","getBoundingClientRect","left","right","top","bottom","PointerTypeMapping","Map","MOUSE","TOUCH","STYLUS","OTHER","degToRad","degrees","Math","PI","coneToDeviation","cos","calculateViewScale","styles","getComputedStyle","resultScales","scaleX","scaleY","scale","undefined","scales","split","parseFloat","matrixElements","RegExp","exec","transform","matrixElementsArray","tryExtractStylusData","event","pointerType","get","eventAzimuthAngle","azimuthAngle","eventAltitudeAngle","altitudeAngle","tiltX","tiltY","pressure","spherical2tilt","tilt2spherical","tiltXrad","tiltYrad","abs","tanX","tan","tanY","atan2","atan","sqrt","pow","radToDeg","tanAlt","sin","round","RNSVGElements","Set","isRNSVGElement","viewRef","componentClassName","Object","getPrototypeOf","constructor","name","has","hasOwn","isRNSVGNode","node","ref","rngh","type","displayName"],"sourceRoot":"../../../src","sources":["web/utils.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,gBAAgB;AAQ5C,OAAO,SAASC,iBAAiBA,CAACC,IAAiB,EAAE;EAAEC,CAAC;EAAEC;AAAS,CAAC,EAAW;EAC7E,MAAMC,IAAa,GAAGH,IAAI,CAACI,qBAAqB,CAAC,CAAC;EAElD,OAAOH,CAAC,IAAIE,IAAI,CAACE,IAAI,IAAIJ,CAAC,IAAIE,IAAI,CAACG,KAAK,IAAIJ,CAAC,IAAIC,IAAI,CAACI,GAAG,IAAIL,CAAC,IAAIC,IAAI,CAACK,MAAM;AAC/E;AAEA,OAAO,MAAMC,kBAAkB,GAAG,IAAIC,GAAG,CAAsB,CAC7D,CAAC,OAAO,EAAEZ,WAAW,CAACa,KAAK,CAAC,EAC5B,CAAC,OAAO,EAAEb,WAAW,CAACc,KAAK,CAAC,EAC5B,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