react-native-gesture-handler 2.16.1 → 2.17.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +9 -3
- package/android/build.gradle +105 -0
- package/android/gradle.properties +7 -0
- package/android/paper/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerButtonManagerDelegate.java +7 -7
- package/android/src/main/java/com/swmansion/gesturehandler/core/NativeViewGestureHandler.kt +16 -8
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.kt +9 -5
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerInteractionManager.kt +4 -0
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootHelper.kt +1 -1
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerTouchEvent.kt +1 -0
- package/apple/RNGestureHandlerButtonComponentView.mm +10 -0
- package/apple/RNGestureHandlerModule.mm +2 -3
- package/lib/commonjs/RNGestureHandlerModule.js +4 -97
- package/lib/commonjs/RNGestureHandlerModule.js.map +1 -1
- package/lib/commonjs/RNGestureHandlerModule.web.js +109 -0
- package/lib/commonjs/RNGestureHandlerModule.web.js.map +1 -0
- package/lib/commonjs/RNRenderer.js +10 -5
- package/lib/commonjs/RNRenderer.js.map +1 -1
- package/lib/commonjs/RNRenderer.web.js +11 -0
- package/lib/commonjs/RNRenderer.web.js.map +1 -0
- package/lib/commonjs/components/GestureButtons.js +27 -12
- package/lib/commonjs/components/GestureButtons.js.map +1 -1
- package/lib/commonjs/components/GestureComponents.js +82 -19
- package/lib/commonjs/components/GestureComponents.js.map +1 -1
- package/lib/commonjs/components/GestureComponents.web.js +52 -0
- package/lib/commonjs/components/GestureComponents.web.js.map +1 -0
- package/lib/commonjs/components/GestureHandlerButton.js +3 -13
- package/lib/commonjs/components/GestureHandlerButton.js.map +1 -1
- package/lib/commonjs/components/GestureHandlerButton.web.js +24 -0
- package/lib/commonjs/components/GestureHandlerButton.web.js.map +1 -0
- package/lib/commonjs/components/GestureHandlerRootView.js +6 -0
- package/lib/commonjs/components/GestureHandlerRootView.js.map +1 -1
- package/lib/commonjs/components/{GestureHandlerRootView.native.js → GestureHandlerRootView.web.js} +1 -7
- package/lib/commonjs/components/GestureHandlerRootView.web.js.map +1 -0
- package/lib/commonjs/getReactNativeVersion.js +12 -1
- package/lib/commonjs/getReactNativeVersion.js.map +1 -1
- package/lib/commonjs/getReactNativeVersion.web.js +11 -0
- package/lib/commonjs/getReactNativeVersion.web.js.map +1 -0
- package/lib/commonjs/getShadowNodeFromRef.js +34 -5
- package/lib/commonjs/getShadowNodeFromRef.js.map +1 -1
- package/lib/commonjs/getShadowNodeFromRef.web.js +15 -0
- package/lib/commonjs/getShadowNodeFromRef.web.js.map +1 -0
- package/lib/commonjs/handlers/PressabilityDebugView.js +7 -5
- package/lib/commonjs/handlers/PressabilityDebugView.js.map +1 -1
- package/lib/commonjs/handlers/PressabilityDebugView.web.js +12 -0
- package/lib/commonjs/handlers/PressabilityDebugView.web.js.map +1 -0
- package/lib/commonjs/handlers/createHandler.js +1 -3
- package/lib/commonjs/handlers/createHandler.js.map +1 -1
- package/lib/commonjs/handlers/customDirectEventTypes.js +8 -5
- package/lib/commonjs/handlers/customDirectEventTypes.js.map +1 -1
- package/lib/commonjs/handlers/customDirectEventTypes.web.js +11 -0
- package/lib/commonjs/handlers/customDirectEventTypes.web.js.map +1 -0
- package/lib/commonjs/handlers/gestureHandlerCommon.js +3 -3
- package/lib/commonjs/handlers/gestureHandlerCommon.js.map +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.js +42 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/attachHandlers.js +83 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/attachHandlers.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/dropHandlers.js +25 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/dropHandlers.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/index.js +143 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/index.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/needsToReattach.js +25 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/needsToReattach.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/types.js +6 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/types.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js +80 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js +180 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/useDetectorUpdater.js +55 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js +47 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/utils.js +176 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/utils.js.map +1 -0
- package/lib/commonjs/handlers/gestures/gestureComposition.js +3 -1
- package/lib/commonjs/handlers/gestures/gestureComposition.js.map +1 -1
- package/lib/commonjs/handlers/gestures/gestureStateManager.js +8 -0
- package/lib/commonjs/handlers/gestures/gestureStateManager.js.map +1 -1
- package/lib/commonjs/handlers/gestures/reanimatedWrapper.js.map +1 -1
- package/lib/commonjs/utils.js +36 -0
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/commonjs/web/detectors/RotationGestureDetector.js +6 -8
- package/lib/commonjs/web/detectors/RotationGestureDetector.js.map +1 -1
- package/lib/commonjs/web/detectors/ScaleGestureDetector.js +5 -6
- package/lib/commonjs/web/detectors/ScaleGestureDetector.js.map +1 -1
- package/lib/commonjs/web/handlers/FlingGestureHandler.js +1 -0
- package/lib/commonjs/web/handlers/FlingGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/GestureHandler.js +56 -64
- package/lib/commonjs/web/handlers/GestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/LongPressGestureHandler.js +1 -0
- package/lib/commonjs/web/handlers/LongPressGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/ManualGestureHandler.js +1 -0
- package/lib/commonjs/web/handlers/ManualGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/NativeViewGestureHandler.js +7 -4
- package/lib/commonjs/web/handlers/NativeViewGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/PanGestureHandler.js +28 -18
- package/lib/commonjs/web/handlers/PanGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/PinchGestureHandler.js +1 -0
- package/lib/commonjs/web/handlers/PinchGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/RotationGestureHandler.js +1 -0
- package/lib/commonjs/web/handlers/RotationGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/TapGestureHandler.js +18 -12
- package/lib/commonjs/web/handlers/TapGestureHandler.js.map +1 -1
- package/lib/commonjs/web/interfaces.js.map +1 -1
- package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js +1 -6
- package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js.map +1 -1
- package/lib/commonjs/web/tools/PointerEventManager.js +7 -2
- package/lib/commonjs/web/tools/PointerEventManager.js.map +1 -1
- package/lib/commonjs/web/tools/PointerTracker.js +89 -57
- package/lib/commonjs/web/tools/PointerTracker.js.map +1 -1
- package/lib/commonjs/web/tools/TouchEventManager.js +6 -2
- package/lib/commonjs/web/tools/TouchEventManager.js.map +1 -1
- package/lib/commonjs/web/tools/Vector.js +2 -1
- package/lib/commonjs/web/tools/Vector.js.map +1 -1
- package/lib/commonjs/web/utils.js +31 -0
- package/lib/commonjs/web/utils.js.map +1 -1
- package/lib/module/RNGestureHandlerModule.js +4 -84
- package/lib/module/RNGestureHandlerModule.js.map +1 -1
- package/lib/module/RNGestureHandlerModule.web.js +85 -0
- package/lib/module/RNGestureHandlerModule.web.js.map +1 -0
- package/lib/module/RNRenderer.js +3 -3
- package/lib/module/RNRenderer.js.map +1 -1
- package/lib/module/RNRenderer.web.js +4 -0
- package/lib/module/RNRenderer.web.js.map +1 -0
- package/lib/module/components/GestureButtons.js +24 -6
- package/lib/module/components/GestureButtons.js.map +1 -1
- package/lib/module/components/GestureComponents.js +80 -18
- package/lib/module/components/GestureComponents.js.map +1 -1
- package/lib/module/components/GestureComponents.web.js +28 -0
- package/lib/module/components/GestureComponents.web.js.map +1 -0
- package/lib/module/components/GestureHandlerButton.js +2 -8
- package/lib/module/components/GestureHandlerButton.js.map +1 -1
- package/lib/module/components/GestureHandlerButton.web.js +9 -0
- package/lib/module/components/GestureHandlerButton.web.js.map +1 -0
- package/lib/module/components/GestureHandlerRootView.js +5 -0
- package/lib/module/components/GestureHandlerRootView.js.map +1 -1
- package/lib/module/components/{GestureHandlerRootView.native.js → GestureHandlerRootView.web.js} +1 -6
- package/lib/module/components/GestureHandlerRootView.web.js.map +1 -0
- package/lib/module/getReactNativeVersion.js +7 -1
- package/lib/module/getReactNativeVersion.js.map +1 -1
- package/lib/module/getReactNativeVersion.web.js +4 -0
- package/lib/module/getReactNativeVersion.web.js.map +1 -0
- package/lib/module/getShadowNodeFromRef.js +33 -4
- package/lib/module/getShadowNodeFromRef.js.map +1 -1
- package/lib/module/getShadowNodeFromRef.web.js +8 -0
- package/lib/module/getShadowNodeFromRef.web.js.map +1 -0
- package/lib/module/handlers/PressabilityDebugView.js +2 -4
- package/lib/module/handlers/PressabilityDebugView.js.map +1 -1
- package/lib/module/handlers/PressabilityDebugView.web.js +5 -0
- package/lib/module/handlers/PressabilityDebugView.web.js.map +1 -0
- package/lib/module/handlers/createHandler.js +2 -4
- package/lib/module/handlers/createHandler.js.map +1 -1
- package/lib/module/handlers/customDirectEventTypes.js +2 -4
- package/lib/module/handlers/customDirectEventTypes.js.map +1 -1
- package/lib/module/handlers/customDirectEventTypes.web.js +5 -0
- package/lib/module/handlers/customDirectEventTypes.web.js.map +1 -0
- package/lib/module/handlers/gestureHandlerCommon.js +1 -1
- package/lib/module/handlers/gestureHandlerCommon.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/Wrap.js +26 -0
- package/lib/module/handlers/gestures/GestureDetector/Wrap.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js +65 -0
- package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js +12 -0
- package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/index.js +115 -0
- package/lib/module/handlers/gestures/GestureDetector/index.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/needsToReattach.js +18 -0
- package/lib/module/handlers/gestures/GestureDetector/needsToReattach.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/types.js +2 -0
- package/lib/module/handlers/gestures/GestureDetector/types.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js +64 -0
- package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js +165 -0
- package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js +41 -0
- package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js +36 -0
- package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/utils.js +142 -0
- package/lib/module/handlers/gestures/GestureDetector/utils.js.map +1 -0
- package/lib/module/handlers/gestures/gestureComposition.js +3 -1
- package/lib/module/handlers/gestures/gestureComposition.js.map +1 -1
- package/lib/module/handlers/gestures/gestureStateManager.js +8 -0
- package/lib/module/handlers/gestures/gestureStateManager.js.map +1 -1
- package/lib/module/handlers/gestures/reanimatedWrapper.js.map +1 -1
- package/lib/module/utils.js +34 -0
- package/lib/module/utils.js.map +1 -1
- package/lib/module/web/detectors/RotationGestureDetector.js +6 -8
- package/lib/module/web/detectors/RotationGestureDetector.js.map +1 -1
- package/lib/module/web/detectors/ScaleGestureDetector.js +5 -6
- package/lib/module/web/detectors/ScaleGestureDetector.js.map +1 -1
- package/lib/module/web/handlers/FlingGestureHandler.js +1 -0
- package/lib/module/web/handlers/FlingGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/GestureHandler.js +56 -64
- package/lib/module/web/handlers/GestureHandler.js.map +1 -1
- package/lib/module/web/handlers/LongPressGestureHandler.js +1 -0
- package/lib/module/web/handlers/LongPressGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/ManualGestureHandler.js +1 -0
- package/lib/module/web/handlers/ManualGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/NativeViewGestureHandler.js +7 -4
- package/lib/module/web/handlers/NativeViewGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/PanGestureHandler.js +28 -18
- package/lib/module/web/handlers/PanGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/PinchGestureHandler.js +1 -0
- package/lib/module/web/handlers/PinchGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/RotationGestureHandler.js +1 -0
- package/lib/module/web/handlers/RotationGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/TapGestureHandler.js +18 -12
- package/lib/module/web/handlers/TapGestureHandler.js.map +1 -1
- package/lib/module/web/interfaces.js.map +1 -1
- package/lib/module/web/tools/GestureHandlerOrchestrator.js +1 -6
- package/lib/module/web/tools/GestureHandlerOrchestrator.js.map +1 -1
- package/lib/module/web/tools/PointerEventManager.js +8 -3
- package/lib/module/web/tools/PointerEventManager.js.map +1 -1
- package/lib/module/web/tools/PointerTracker.js +89 -57
- package/lib/module/web/tools/PointerTracker.js.map +1 -1
- package/lib/module/web/tools/TouchEventManager.js +7 -3
- package/lib/module/web/tools/TouchEventManager.js.map +1 -1
- package/lib/module/web/tools/Vector.js +2 -1
- package/lib/module/web/tools/Vector.js.map +1 -1
- package/lib/module/web/utils.js +29 -0
- package/lib/module/web/utils.js.map +1 -1
- package/lib/typescript/RNGestureHandlerModule.d.ts +2 -15
- package/lib/typescript/RNGestureHandlerModule.web.d.ts +15 -0
- package/lib/typescript/RNRenderer.d.ts +1 -3
- package/lib/typescript/RNRenderer.web.d.ts +3 -0
- package/lib/typescript/components/GestureButtons.d.ts +3 -34
- package/lib/typescript/components/GestureComponents.d.ts +21 -7
- package/lib/typescript/components/GestureComponents.web.d.ts +8 -0
- package/lib/typescript/components/GestureHandlerButton.d.ts +3 -3
- package/lib/typescript/components/GestureHandlerButton.web.d.ts +4 -0
- package/lib/typescript/getReactNativeVersion.d.ts +4 -1
- package/lib/typescript/getReactNativeVersion.web.d.ts +1 -0
- package/lib/typescript/getShadowNodeFromRef.d.ts +1 -1
- package/lib/typescript/getShadowNodeFromRef.web.d.ts +1 -0
- package/lib/typescript/handlers/PressabilityDebugView.d.ts +1 -1
- package/lib/typescript/handlers/PressabilityDebugView.web.d.ts +1 -0
- package/lib/typescript/handlers/customDirectEventTypes.d.ts +1 -2
- package/lib/typescript/handlers/customDirectEventTypes.web.d.ts +2 -0
- package/lib/typescript/handlers/gestureHandlerCommon.d.ts +3 -2
- package/lib/typescript/handlers/gestures/GestureDetector/Wrap.d.ts +13 -0
- package/lib/typescript/handlers/gestures/GestureDetector/attachHandlers.d.ts +13 -0
- package/lib/typescript/handlers/gestures/GestureDetector/dropHandlers.d.ts +2 -0
- package/lib/typescript/handlers/gestures/{GestureDetector.d.ts → GestureDetector/index.d.ts} +4 -12
- package/lib/typescript/handlers/gestures/GestureDetector/needsToReattach.d.ts +3 -0
- package/lib/typescript/handlers/gestures/GestureDetector/types.d.ts +20 -0
- package/lib/typescript/handlers/gestures/GestureDetector/updateHandlers.d.ts +4 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useAnimatedGesture.d.ts +2 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useDetectorUpdater.d.ts +5 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useViewRefHandler.d.ts +3 -0
- package/lib/typescript/handlers/gestures/GestureDetector/utils.d.ts +12 -0
- package/lib/typescript/handlers/gestures/reanimatedWrapper.d.ts +1 -1
- package/lib/typescript/utils.d.ts +10 -0
- package/lib/typescript/web/handlers/GestureHandler.d.ts +1 -0
- package/lib/typescript/web/interfaces.d.ts +1 -0
- package/lib/typescript/web/tools/PointerTracker.d.ts +34 -31
- package/lib/typescript/web/utils.d.ts +4 -0
- package/package.json +5 -5
- package/src/RNGestureHandlerModule.ts +4 -104
- package/src/RNGestureHandlerModule.web.ts +105 -0
- package/src/RNRenderer.ts +3 -3
- package/src/RNRenderer.web.ts +3 -0
- package/src/components/GestureButtons.tsx +36 -4
- package/src/components/GestureComponents.tsx +131 -24
- package/src/components/GestureComponents.web.tsx +41 -0
- package/src/components/GestureHandlerButton.tsx +4 -5
- package/src/components/GestureHandlerButton.web.tsx +6 -0
- package/src/components/GestureHandlerRootView.tsx +6 -0
- package/src/components/{GestureHandlerRootView.native.tsx → GestureHandlerRootView.web.tsx} +0 -6
- package/src/getReactNativeVersion.ts +9 -1
- package/src/getReactNativeVersion.web.ts +3 -0
- package/src/getShadowNodeFromRef.ts +41 -4
- package/src/getShadowNodeFromRef.web.ts +7 -0
- package/src/handlers/PressabilityDebugView.tsx +2 -4
- package/src/handlers/PressabilityDebugView.web.tsx +4 -0
- package/src/handlers/createHandler.tsx +1 -3
- package/src/handlers/customDirectEventTypes.ts +2 -5
- package/src/handlers/customDirectEventTypes.web.ts +5 -0
- package/src/handlers/gestureHandlerCommon.ts +4 -1
- package/src/handlers/gestures/GestureDetector/Wrap.tsx +35 -0
- package/src/handlers/gestures/GestureDetector/attachHandlers.ts +112 -0
- package/src/handlers/gestures/GestureDetector/dropHandlers.ts +14 -0
- package/src/handlers/gestures/GestureDetector/index.tsx +187 -0
- package/src/handlers/gestures/GestureDetector/needsToReattach.ts +27 -0
- package/src/handlers/gestures/GestureDetector/types.ts +32 -0
- package/src/handlers/gestures/GestureDetector/updateHandlers.ts +94 -0
- package/src/handlers/gestures/GestureDetector/useAnimatedGesture.ts +206 -0
- package/src/handlers/gestures/GestureDetector/useDetectorUpdater.ts +69 -0
- package/src/handlers/gestures/GestureDetector/useViewRefHandler.ts +54 -0
- package/src/handlers/gestures/GestureDetector/utils.ts +185 -0
- package/src/handlers/gestures/gestureComposition.ts +2 -0
- package/src/handlers/gestures/gestureStateManager.ts +12 -4
- package/src/handlers/gestures/reanimatedWrapper.ts +19 -17
- package/src/utils.ts +39 -0
- package/src/web/detectors/RotationGestureDetector.ts +6 -8
- package/src/web/detectors/ScaleGestureDetector.ts +5 -6
- package/src/web/handlers/FlingGestureHandler.ts +2 -0
- package/src/web/handlers/GestureHandler.ts +53 -62
- package/src/web/handlers/LongPressGestureHandler.ts +2 -0
- package/src/web/handlers/ManualGestureHandler.ts +2 -0
- package/src/web/handlers/NativeViewGestureHandler.ts +8 -4
- package/src/web/handlers/PanGestureHandler.ts +32 -19
- package/src/web/handlers/PinchGestureHandler.ts +2 -0
- package/src/web/handlers/RotationGestureHandler.ts +2 -0
- package/src/web/handlers/TapGestureHandler.ts +20 -12
- package/src/web/interfaces.ts +1 -0
- package/src/web/tools/GestureHandlerOrchestrator.ts +1 -7
- package/src/web/tools/PointerEventManager.ts +10 -3
- package/src/web/tools/PointerTracker.ts +81 -74
- package/src/web/tools/TouchEventManager.ts +5 -3
- package/src/web/tools/Vector.ts +2 -4
- package/src/web/utils.ts +34 -0
- package/lib/commonjs/RNGestureHandlerModule.native.js +0 -16
- package/lib/commonjs/RNGestureHandlerModule.native.js.map +0 -1
- package/lib/commonjs/RNRenderer.native.js +0 -16
- package/lib/commonjs/RNRenderer.native.js.map +0 -1
- package/lib/commonjs/components/GestureComponents.native.js +0 -115
- package/lib/commonjs/components/GestureComponents.native.js.map +0 -1
- package/lib/commonjs/components/GestureHandlerButton.native.js +0 -14
- package/lib/commonjs/components/GestureHandlerButton.native.js.map +0 -1
- package/lib/commonjs/components/GestureHandlerRootView.native.js.map +0 -1
- package/lib/commonjs/getReactNativeVersion.native.js +0 -22
- package/lib/commonjs/getReactNativeVersion.native.js.map +0 -1
- package/lib/commonjs/getShadowNodeFromRef.native.js +0 -44
- package/lib/commonjs/getShadowNodeFromRef.native.js.map +0 -1
- package/lib/commonjs/handlers/PressabilityDebugView.native.js +0 -14
- package/lib/commonjs/handlers/PressabilityDebugView.native.js.map +0 -1
- package/lib/commonjs/handlers/customDirectEventTypes.native.js +0 -14
- package/lib/commonjs/handlers/customDirectEventTypes.native.js.map +0 -1
- package/lib/commonjs/handlers/gestures/GestureDetector.js +0 -704
- package/lib/commonjs/handlers/gestures/GestureDetector.js.map +0 -1
- package/lib/module/RNGestureHandlerModule.native.js +0 -5
- package/lib/module/RNGestureHandlerModule.native.js.map +0 -1
- package/lib/module/RNRenderer.native.js +0 -4
- package/lib/module/RNRenderer.native.js.map +0 -1
- package/lib/module/components/GestureComponents.native.js +0 -90
- package/lib/module/components/GestureComponents.native.js.map +0 -1
- package/lib/module/components/GestureHandlerButton.native.js +0 -3
- package/lib/module/components/GestureHandlerButton.native.js.map +0 -1
- package/lib/module/components/GestureHandlerRootView.native.js.map +0 -1
- package/lib/module/getReactNativeVersion.native.js +0 -10
- package/lib/module/getReactNativeVersion.native.js.map +0 -1
- package/lib/module/getShadowNodeFromRef.native.js +0 -37
- package/lib/module/getShadowNodeFromRef.native.js.map +0 -1
- package/lib/module/handlers/PressabilityDebugView.native.js +0 -3
- package/lib/module/handlers/PressabilityDebugView.native.js.map +0 -1
- package/lib/module/handlers/customDirectEventTypes.native.js +0 -3
- package/lib/module/handlers/customDirectEventTypes.native.js.map +0 -1
- package/lib/module/handlers/gestures/GestureDetector.js +0 -654
- package/lib/module/handlers/gestures/GestureDetector.js.map +0 -1
- package/lib/typescript/RNGestureHandlerModule.native.d.ts +0 -2
- package/lib/typescript/RNRenderer.native.d.ts +0 -1
- package/lib/typescript/components/GestureComponents.native.d.ts +0 -22
- package/lib/typescript/components/GestureHandlerButton.native.d.ts +0 -4
- package/lib/typescript/getReactNativeVersion.native.d.ts +0 -4
- package/lib/typescript/getShadowNodeFromRef.native.d.ts +0 -1
- package/lib/typescript/handlers/PressabilityDebugView.native.d.ts +0 -1
- package/lib/typescript/handlers/customDirectEventTypes.native.d.ts +0 -1
- package/src/RNGestureHandlerModule.native.ts +0 -5
- package/src/RNRenderer.native.ts +0 -3
- package/src/components/GestureComponents.native.tsx +0 -148
- package/src/components/GestureHandlerButton.native.tsx +0 -5
- package/src/getReactNativeVersion.native.ts +0 -11
- package/src/getShadowNodeFromRef.native.ts +0 -44
- package/src/handlers/PressabilityDebugView.native.tsx +0 -2
- package/src/handlers/customDirectEventTypes.native.ts +0 -2
- package/src/handlers/gestures/GestureDetector.tsx +0 -894
- /package/lib/typescript/components/{GestureHandlerRootView.native.d.ts → GestureHandlerRootView.web.d.ts} +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Vector.ts"],"names":["DiagonalDirections","Directions","MINIMAL_FLING_VELOCITY","Vector","constructor","x","y","_magnitude","Math","hypot","isMagnitudeSufficient","unitX","unitY","fromDirection","direction","DirectionToVectorMappings","get","fromVelocity","tracker","pointerId","
|
1
|
+
{"version":3,"sources":["Vector.ts"],"names":["DiagonalDirections","Directions","MINIMAL_FLING_VELOCITY","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"],"mappings":";;AAAA,SAASA,kBAAT,EAA6BC,UAA7B,QAA+C,kBAA/C;AACA,SAASC,sBAAT,QAAuC,cAAvC;AAGA,eAAe,MAAMC,MAAN,CAAa;AAO1BC,EAAAA,WAAW,CAACC,CAAD,EAAYC,CAAZ,EAAuB;AAAA;;AAAA;;AAAA;;AAAA;;AAAA;;AAChC,SAAKD,CAAL,GAASA,CAAT;AACA,SAAKC,CAAL,GAASA,CAAT;AAEA,SAAKC,UAAL,GAAkBC,IAAI,CAACC,KAAL,CAAW,KAAKJ,CAAhB,EAAmB,KAAKC,CAAxB,CAAlB;AACA,UAAMI,qBAAqB,GAAG,KAAKH,UAAL,GAAkBL,sBAAhD;AAEA,SAAKS,KAAL,GAAaD,qBAAqB,GAAG,KAAKL,CAAL,GAAS,KAAKE,UAAjB,GAA8B,CAAhE;AACA,SAAKK,KAAL,GAAaF,qBAAqB,GAAG,KAAKJ,CAAL,GAAS,KAAKC,UAAjB,GAA8B,CAAhE;AACD;;AAEmB,SAAbM,aAAa,CAACC,SAAD,EAAqD;AACvE,WAAOC,yBAAyB,CAACC,GAA1B,CAA8BF,SAA9B,CAAP;AACD;;AAEkB,SAAZG,YAAY,CAACC,OAAD,EAA0BC,SAA1B,EAA6C;AAC9D,UAAMC,QAAQ,GAAGF,OAAO,CAACG,WAAR,CAAoBF,SAApB,CAAjB;AACA,WAAO,IAAIhB,MAAJ,CAAWiB,QAAQ,CAACf,CAApB,EAAuBe,QAAQ,CAACd,CAAhC,CAAP;AACD;;AAEY,MAATgB,SAAS,GAAG;AACd,WAAO,KAAKf,UAAZ;AACD;;AAEDgB,EAAAA,iBAAiB,CAACC,MAAD,EAAiB;AAChC,WAAO,KAAKb,KAAL,GAAaa,MAAM,CAACb,KAApB,GAA4B,KAAKC,KAAL,GAAaY,MAAM,CAACZ,KAAvD;AACD;;AAEDa,EAAAA,SAAS,CAACD,MAAD,EAAiBE,SAAjB,EAAoC;AAC3C,WAAO,KAAKH,iBAAL,CAAuBC,MAAvB,IAAiCE,SAAxC;AACD;;AArCyB;AAwC5B,MAAMX,yBAAyB,GAAG,IAAIY,GAAJ,CAGhC,CACA,CAAC1B,UAAU,CAAC2B,IAAZ,EAAkB,IAAIzB,MAAJ,CAAW,CAAC,CAAZ,EAAe,CAAf,CAAlB,CADA,EAEA,CAACF,UAAU,CAAC4B,KAAZ,EAAmB,IAAI1B,MAAJ,CAAW,CAAX,EAAc,CAAd,CAAnB,CAFA,EAGA,CAACF,UAAU,CAAC6B,EAAZ,EAAgB,IAAI3B,MAAJ,CAAW,CAAX,EAAc,CAAC,CAAf,CAAhB,CAHA,EAIA,CAACF,UAAU,CAAC8B,IAAZ,EAAkB,IAAI5B,MAAJ,CAAW,CAAX,EAAc,CAAd,CAAlB,CAJA,EAMA,CAACH,kBAAkB,CAACgC,QAApB,EAA8B,IAAI7B,MAAJ,CAAW,CAAX,EAAc,CAAC,CAAf,CAA9B,CANA,EAOA,CAACH,kBAAkB,CAACiC,UAApB,EAAgC,IAAI9B,MAAJ,CAAW,CAAX,EAAc,CAAd,CAAhC,CAPA,EAQA,CAACH,kBAAkB,CAACkC,OAApB,EAA6B,IAAI/B,MAAJ,CAAW,CAAC,CAAZ,EAAe,CAAC,CAAhB,CAA7B,CARA,EASA,CAACH,kBAAkB,CAACmC,SAApB,EAA+B,IAAIhC,MAAJ,CAAW,CAAC,CAAZ,EAAe,CAAf,CAA/B,CATA,CAHgC,CAAlC","sourcesContent":["import { DiagonalDirections, Directions } from '../../Directions';\nimport { MINIMAL_FLING_VELOCITY } from '../constants';\nimport PointerTracker from './PointerTracker';\n\nexport default class Vector {\n private readonly x;\n private readonly y;\n private readonly unitX;\n private readonly unitY;\n private readonly _magnitude;\n\n constructor(x: number, y: number) {\n this.x = x;\n this.y = y;\n\n this._magnitude = Math.hypot(this.x, this.y);\n const isMagnitudeSufficient = this._magnitude > MINIMAL_FLING_VELOCITY;\n\n this.unitX = isMagnitudeSufficient ? this.x / this._magnitude : 0;\n this.unitY = isMagnitudeSufficient ? this.y / this._magnitude : 0;\n }\n\n static fromDirection(direction: Directions | DiagonalDirections): Vector {\n return DirectionToVectorMappings.get(direction)!;\n }\n\n static fromVelocity(tracker: PointerTracker, pointerId: number) {\n const velocity = tracker.getVelocity(pointerId);\n return new Vector(velocity.x, velocity.y);\n }\n\n get magnitude() {\n return this._magnitude;\n }\n\n computeSimilarity(vector: Vector) {\n return this.unitX * vector.unitX + this.unitY * vector.unitY;\n }\n\n isSimilar(vector: Vector, threshold: number) {\n return this.computeSimilarity(vector) > threshold;\n }\n}\n\nconst DirectionToVectorMappings = new Map<\n Directions | DiagonalDirections,\n Vector\n>([\n [Directions.LEFT, new Vector(-1, 0)],\n [Directions.RIGHT, new Vector(1, 0)],\n [Directions.UP, new Vector(0, -1)],\n [Directions.DOWN, new Vector(0, 1)],\n\n [DiagonalDirections.UP_RIGHT, new Vector(1, -1)],\n [DiagonalDirections.DOWN_RIGHT, new Vector(1, 1)],\n [DiagonalDirections.UP_LEFT, new Vector(-1, -1)],\n [DiagonalDirections.DOWN_LEFT, new Vector(-1, 1)],\n]);\n"]}
|
package/lib/module/web/utils.js
CHANGED
@@ -9,4 +9,33 @@ export function isPointerInBounds(view, {
|
|
9
9
|
export const PointerTypeMapping = new Map([['mouse', PointerType.MOUSE], ['touch', PointerType.TOUCH], ['pen', PointerType.STYLUS], ['none', PointerType.OTHER]]);
|
10
10
|
export const degToRad = degrees => degrees * Math.PI / 180;
|
11
11
|
export const coneToDeviation = degrees => Math.cos(degToRad(degrees / 2));
|
12
|
+
export function calculateViewScale(view) {
|
13
|
+
var _RegExp$exec;
|
14
|
+
|
15
|
+
const styles = getComputedStyle(view);
|
16
|
+
const resultScales = {
|
17
|
+
scaleX: 1,
|
18
|
+
scaleY: 1
|
19
|
+
};
|
20
|
+
const scales = styles.scale.split(' ');
|
21
|
+
|
22
|
+
if (scales[0] !== 'none') {
|
23
|
+
resultScales.scaleX = parseFloat(scales[0]);
|
24
|
+
}
|
25
|
+
|
26
|
+
if (scales[1]) {
|
27
|
+
resultScales.scaleY = parseFloat(scales[1]);
|
28
|
+
}
|
29
|
+
|
30
|
+
const matrixElements = (_RegExp$exec = new RegExp(/matrix\((.+)\)/).exec(styles.transform)) === null || _RegExp$exec === void 0 ? void 0 : _RegExp$exec[1];
|
31
|
+
|
32
|
+
if (!matrixElements) {
|
33
|
+
return resultScales;
|
34
|
+
}
|
35
|
+
|
36
|
+
const matrixElementsArray = matrixElements.split(', ');
|
37
|
+
resultScales.scaleX *= parseFloat(matrixElementsArray[0]);
|
38
|
+
resultScales.scaleY *= parseFloat(matrixElementsArray[3]);
|
39
|
+
return resultScales;
|
40
|
+
}
|
12
41
|
//# 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"],"mappings":"AAAA,SAASA,WAAT,QAA4B,gBAA5B;AAGA,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,CAA6B,CAC7D,CAAC,OAAD,EAAUZ,WAAW,CAACa,KAAtB,CAD6D,EAE7D,CAAC,OAAD,EAAUb,WAAW,CAACc,KAAtB,CAF6D,EAG7D,CAAC,KAAD,EAAQd,WAAW,CAACe,MAApB,CAH6D,EAI7D,CAAC,MAAD,EAASf,WAAW,CAACgB,KAArB,CAJ6D,CAA7B,CAA3B;AAOP,OAAO,MAAMC,QAAQ,GAAIC,OAAD,IAAsBA,OAAO,GAAGC,IAAI,CAACC,EAAhB,GAAsB,GAA5D;AAEP,OAAO,MAAMC,eAAe,GAAIH,OAAD,IAC7BC,IAAI,CAACG,GAAL,CAASL,QAAQ,CAACC,OAAO,GAAG,CAAX,CAAjB,CADK","sourcesContent":["import { PointerType } from '../PointerType';\nimport { Point } 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"]}
|
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","scales","scale","split","parseFloat","matrixElements","RegExp","exec","transform","matrixElementsArray"],"mappings":"AAAA,SAASA,WAAT,QAA4B,gBAA5B;AAGA,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,CAA6B,CAC7D,CAAC,OAAD,EAAUZ,WAAW,CAACa,KAAtB,CAD6D,EAE7D,CAAC,OAAD,EAAUb,WAAW,CAACc,KAAtB,CAF6D,EAG7D,CAAC,KAAD,EAAQd,WAAW,CAACe,MAApB,CAH6D,EAI7D,CAAC,MAAD,EAASf,WAAW,CAACgB,KAArB,CAJ6D,CAA7B,CAA3B;AAOP,OAAO,MAAMC,QAAQ,GAAIC,OAAD,IAAsBA,OAAO,GAAGC,IAAI,CAACC,EAAhB,GAAsB,GAA5D;AAEP,OAAO,MAAMC,eAAe,GAAIH,OAAD,IAC7BC,IAAI,CAACG,GAAL,CAASL,QAAQ,CAACC,OAAO,GAAG,CAAX,CAAjB,CADK;AAGP,OAAO,SAASK,kBAAT,CAA4BrB,IAA5B,EAA+C;AAAA;;AACpD,QAAMsB,MAAM,GAAGC,gBAAgB,CAACvB,IAAD,CAA/B;AAEA,QAAMwB,YAAY,GAAG;AACnBC,IAAAA,MAAM,EAAE,CADW;AAEnBC,IAAAA,MAAM,EAAE;AAFW,GAArB;AAKA,QAAMC,MAAM,GAAGL,MAAM,CAACM,KAAP,CAAaC,KAAb,CAAmB,GAAnB,CAAf;;AAEA,MAAIF,MAAM,CAAC,CAAD,CAAN,KAAc,MAAlB,EAA0B;AACxBH,IAAAA,YAAY,CAACC,MAAb,GAAsBK,UAAU,CAACH,MAAM,CAAC,CAAD,CAAP,CAAhC;AACD;;AAED,MAAIA,MAAM,CAAC,CAAD,CAAV,EAAe;AACbH,IAAAA,YAAY,CAACE,MAAb,GAAsBI,UAAU,CAACH,MAAM,CAAC,CAAD,CAAP,CAAhC;AACD;;AAED,QAAMI,cAAc,mBAAG,IAAIC,MAAJ,CAAW,gBAAX,EAA6BC,IAA7B,CACrBX,MAAM,CAACY,SADc,CAAH,iDAAG,aAEnB,CAFmB,CAAvB;;AAIA,MAAI,CAACH,cAAL,EAAqB;AACnB,WAAOP,YAAP;AACD;;AAED,QAAMW,mBAAmB,GAAGJ,cAAc,CAACF,KAAf,CAAqB,IAArB,CAA5B;AAEAL,EAAAA,YAAY,CAACC,MAAb,IAAuBK,UAAU,CAACK,mBAAmB,CAAC,CAAD,CAApB,CAAjC;AACAX,EAAAA,YAAY,CAACE,MAAb,IAAuBI,UAAU,CAACK,mBAAmB,CAAC,CAAD,CAApB,CAAjC;AAEA,SAAOX,YAAP;AACD","sourcesContent":["import { PointerType } from '../PointerType';\nimport { Point } 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 const scales = styles.scale.split(' ');\n\n if (scales[0] !== 'none') {\n resultScales.scaleX = parseFloat(scales[0]);\n }\n\n if (scales[1]) {\n resultScales.scaleY = parseFloat(scales[1]);\n }\n\n const matrixElements = new RegExp(/matrix\\((.+)\\)/).exec(\n styles.transform\n )?.[1];\n\n if (!matrixElements) {\n return resultScales;\n }\n\n const matrixElementsArray = matrixElements.split(', ');\n\n resultScales.scaleX *= parseFloat(matrixElementsArray[0]);\n resultScales.scaleY *= parseFloat(matrixElementsArray[3]);\n\n return resultScales;\n}\n"]}
|
@@ -1,15 +1,2 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
import { Gestures } from './web/Gestures';
|
4
|
-
import type { Config } from './web/interfaces';
|
5
|
-
declare const _default: {
|
6
|
-
handleSetJSResponder(tag: number, blockNativeResponder: boolean): void;
|
7
|
-
handleClearJSResponder(): void;
|
8
|
-
createGestureHandler<T>(handlerName: keyof typeof Gestures, handlerTag: number, config: T): void;
|
9
|
-
attachGestureHandler(handlerTag: number, newView: any, _actionType: ActionType, propsRef: React.RefObject<unknown>): void;
|
10
|
-
updateGestureHandler(handlerTag: number, newConfig: Config): void;
|
11
|
-
getGestureHandlerNode(handlerTag: number): import("./web/handlers/IGestureHandler").default | import("./web_hammer/NativeViewGestureHandler").default | import("./web_hammer/PanGestureHandler").default | import("./web_hammer/TapGestureHandler").default | import("./web_hammer/LongPressGestureHandler").default | import("./web_hammer/PinchGestureHandler").default | import("./web_hammer/RotationGestureHandler").default | import("./web_hammer/FlingGestureHandler").default;
|
12
|
-
dropGestureHandler(handlerTag: number): void;
|
13
|
-
flushOperations(): void;
|
14
|
-
};
|
15
|
-
export default _default;
|
1
|
+
import Module from './specs/NativeRNGestureHandlerModule';
|
2
|
+
export default Module;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import type { ActionType } from './ActionType';
|
3
|
+
import { Gestures } from './web/Gestures';
|
4
|
+
import type { Config } from './web/interfaces';
|
5
|
+
declare const _default: {
|
6
|
+
handleSetJSResponder(tag: number, blockNativeResponder: boolean): void;
|
7
|
+
handleClearJSResponder(): void;
|
8
|
+
createGestureHandler<T>(handlerName: keyof typeof Gestures, handlerTag: number, config: T): void;
|
9
|
+
attachGestureHandler(handlerTag: number, newView: any, _actionType: ActionType, propsRef: React.RefObject<unknown>): void;
|
10
|
+
updateGestureHandler(handlerTag: number, newConfig: Config): void;
|
11
|
+
getGestureHandlerNode(handlerTag: number): import("./web/handlers/IGestureHandler").default | import("./web_hammer/NativeViewGestureHandler").default | import("./web_hammer/PanGestureHandler").default | import("./web_hammer/TapGestureHandler").default | import("./web_hammer/LongPressGestureHandler").default | import("./web_hammer/PinchGestureHandler").default | import("./web_hammer/RotationGestureHandler").default | import("./web_hammer/FlingGestureHandler").default;
|
12
|
+
dropGestureHandler(handlerTag: number): void;
|
13
|
+
flushOperations(): void;
|
14
|
+
};
|
15
|
+
export default _default;
|
@@ -84,38 +84,7 @@ export interface BorderlessButtonProps extends BaseButtonProps {
|
|
84
84
|
activeOpacity?: number;
|
85
85
|
}
|
86
86
|
export declare const RawButton: React.ForwardRefExoticComponent<RawButtonProps & NativeViewGestureHandlerProps & React.RefAttributes<React.ComponentType<any>>>;
|
87
|
-
export declare
|
88
|
-
|
89
|
-
|
90
|
-
};
|
91
|
-
private lastActive;
|
92
|
-
private longPressTimeout;
|
93
|
-
private longPressDetected;
|
94
|
-
constructor(props: BaseButtonProps);
|
95
|
-
private handleEvent;
|
96
|
-
private onLongPress;
|
97
|
-
private onHandlerStateChange;
|
98
|
-
private onGestureEvent;
|
99
|
-
render(): React.JSX.Element;
|
100
|
-
}
|
101
|
-
export declare class RectButton extends React.Component<RectButtonProps> {
|
102
|
-
static defaultProps: {
|
103
|
-
activeOpacity: number;
|
104
|
-
underlayColor: string;
|
105
|
-
};
|
106
|
-
private opacity;
|
107
|
-
constructor(props: RectButtonProps);
|
108
|
-
private onActiveStateChange;
|
109
|
-
render(): React.JSX.Element;
|
110
|
-
}
|
111
|
-
export declare class BorderlessButton extends React.Component<BorderlessButtonProps> {
|
112
|
-
static defaultProps: {
|
113
|
-
activeOpacity: number;
|
114
|
-
borderless: boolean;
|
115
|
-
};
|
116
|
-
private opacity;
|
117
|
-
constructor(props: BorderlessButtonProps);
|
118
|
-
private onActiveStateChange;
|
119
|
-
render(): React.JSX.Element;
|
120
|
-
}
|
87
|
+
export declare const BaseButton: React.ForwardRefExoticComponent<Omit<BaseButtonProps, "innerRef"> & React.RefAttributes<any>>;
|
88
|
+
export declare const RectButton: React.ForwardRefExoticComponent<Omit<RectButtonProps, "innerRef"> & React.RefAttributes<any>>;
|
89
|
+
export declare const BorderlessButton: React.ForwardRefExoticComponent<Omit<BorderlessButtonProps, "innerRef"> & React.RefAttributes<any>>;
|
121
90
|
export { default as PureNativeButton } from './GestureHandlerButton';
|
@@ -1,8 +1,22 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import {
|
3
|
-
|
4
|
-
|
5
|
-
export declare const
|
6
|
-
export
|
7
|
-
|
8
|
-
|
2
|
+
import { PropsWithChildren, ForwardedRef, RefAttributes, ReactElement } from 'react';
|
3
|
+
import { ScrollView as RNScrollView, ScrollViewProps as RNScrollViewProps, Switch as RNSwitch, SwitchProps as RNSwitchProps, TextInput as RNTextInput, TextInputProps as RNTextInputProps, DrawerLayoutAndroid as RNDrawerLayoutAndroid, DrawerLayoutAndroidProps as RNDrawerLayoutAndroidProps, FlatList as RNFlatList, FlatListProps as RNFlatListProps, RefreshControl as RNRefreshControl } from 'react-native';
|
4
|
+
import { NativeViewGestureHandlerProps } from '../handlers/NativeViewGestureHandler';
|
5
|
+
export declare const RefreshControl: React.ForwardRefExoticComponent<import("react-native").RefreshControlProps & NativeViewGestureHandlerProps & React.RefAttributes<React.ComponentType<any>>>;
|
6
|
+
export type RefreshControl = typeof RefreshControl & RNRefreshControl;
|
7
|
+
declare const GHScrollView: React.ForwardRefExoticComponent<RNScrollViewProps & {
|
8
|
+
children?: React.ReactNode;
|
9
|
+
} & NativeViewGestureHandlerProps & React.RefAttributes<React.ComponentType<any>>>;
|
10
|
+
export declare const ScrollView: React.ForwardRefExoticComponent<RNScrollViewProps & NativeViewGestureHandlerProps & React.RefAttributes<RNScrollView>>;
|
11
|
+
export type ScrollView = typeof GHScrollView & RNScrollView;
|
12
|
+
export declare const Switch: React.ForwardRefExoticComponent<RNSwitchProps & NativeViewGestureHandlerProps & React.RefAttributes<React.ComponentType<any>>>;
|
13
|
+
export type Switch = typeof Switch & RNSwitch;
|
14
|
+
export declare const TextInput: React.ForwardRefExoticComponent<RNTextInputProps & NativeViewGestureHandlerProps & React.RefAttributes<React.ComponentType<any>>>;
|
15
|
+
export type TextInput = typeof TextInput & RNTextInput;
|
16
|
+
export declare const DrawerLayoutAndroid: React.ForwardRefExoticComponent<RNDrawerLayoutAndroidProps & {
|
17
|
+
children?: React.ReactNode;
|
18
|
+
} & NativeViewGestureHandlerProps & React.RefAttributes<React.ComponentType<any>>>;
|
19
|
+
export type DrawerLayoutAndroid = typeof DrawerLayoutAndroid & RNDrawerLayoutAndroid;
|
20
|
+
export declare const FlatList: <ItemT = any>(props: React.PropsWithChildren<RNFlatListProps<ItemT> & React.RefAttributes<FlatList<ItemT>> & NativeViewGestureHandlerProps>, ref: React.ForwardedRef<FlatList<ItemT>>) => ReactElement | null;
|
21
|
+
export type FlatList<ItemT = any> = typeof FlatList & RNFlatList<ItemT>;
|
22
|
+
export {};
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { FlatListProps } from 'react-native';
|
3
|
+
export declare const ScrollView: React.ForwardRefExoticComponent<import("react-native").ScrollViewProps & import("..").NativeViewGestureHandlerProps & React.RefAttributes<React.ComponentType<any>>>;
|
4
|
+
export declare const Switch: React.ForwardRefExoticComponent<import("react-native").SwitchProps & import("..").NativeViewGestureHandlerProps & React.RefAttributes<React.ComponentType<any>>>;
|
5
|
+
export declare const TextInput: React.ForwardRefExoticComponent<import("react-native").TextInputProps & import("..").NativeViewGestureHandlerProps & React.RefAttributes<React.ComponentType<any>>>;
|
6
|
+
export declare const DrawerLayoutAndroid: () => React.JSX.Element;
|
7
|
+
export declare const RefreshControl: React.ForwardRefExoticComponent<import("react-native").ViewProps & import("..").NativeViewGestureHandlerProps & React.RefAttributes<React.ComponentType<any>>>;
|
8
|
+
export declare const FlatList: React.ForwardRefExoticComponent<FlatListProps<unknown> & React.RefAttributes<unknown>>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
2
|
-
import {
|
3
|
-
declare const _default:
|
1
|
+
import { HostComponent } from 'react-native';
|
2
|
+
import { RawButtonProps } from './GestureButtons';
|
3
|
+
declare const _default: HostComponent<RawButtonProps>;
|
4
4
|
export default _default;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function getReactNativeVersion(): void;
|
@@ -1 +1 @@
|
|
1
|
-
export declare function getShadowNodeFromRef(
|
1
|
+
export declare function getShadowNodeFromRef(ref: unknown): unknown;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function getShadowNodeFromRef(_ref: any): null;
|
@@ -1 +1 @@
|
|
1
|
-
export
|
1
|
+
export { PressabilityDebugView } from 'react-native/Libraries/Pressability/PressabilityDebug';
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function PressabilityDebugView(): null;
|
@@ -1,2 +1 @@
|
|
1
|
-
|
2
|
-
export { customDirectEventTypes };
|
1
|
+
export { customDirectEventTypes } from 'react-native/Libraries/Renderer/shims/ReactNativeViewConfigRegistry';
|
@@ -4,7 +4,7 @@ import { TouchEventType } from '../TouchEventType';
|
|
4
4
|
import { ValueOf } from '../typeUtils';
|
5
5
|
import { PointerType } from '../PointerType';
|
6
6
|
export declare const baseGestureHandlerProps: readonly ["id", "enabled", "shouldCancelWhenOutside", "hitSlop", "cancelsTouchesInView", "userSelect", "activeCursor", "mouseButton", "enableContextMenu", "touchAction", "waitFor", "simultaneousHandlers", "blocksHandlers", "onBegan", "onFailed", "onCancelled", "onActivated", "onEnded", "onGestureEvent", "onHandlerStateChange"];
|
7
|
-
export declare const
|
7
|
+
export declare const baseGestureHandlerWithDetectorProps: string[];
|
8
8
|
export interface GestureEventPayload {
|
9
9
|
handlerTag: number;
|
10
10
|
numberOfPointers: number;
|
@@ -14,7 +14,7 @@ export interface GestureEventPayload {
|
|
14
14
|
export interface HandlerStateChangeEventPayload extends GestureEventPayload {
|
15
15
|
oldState: ValueOf<typeof State>;
|
16
16
|
}
|
17
|
-
export type HitSlop = number | Partial<Record<'left' | 'right' | 'top' | 'bottom' | 'vertical' | 'horizontal', number>> | Record<'width' | 'left', number> | Record<'width' | 'right', number> | Record<'height' | 'top', number> | Record<'height' | 'bottom', number>;
|
17
|
+
export type HitSlop = number | null | undefined | Partial<Record<'left' | 'right' | 'top' | 'bottom' | 'vertical' | 'horizontal', number>> | Record<'width' | 'left', number> | Record<'width' | 'right', number> | Record<'height' | 'top', number> | Record<'height' | 'bottom', number>;
|
18
18
|
export type UserSelect = 'none' | 'auto' | 'text';
|
19
19
|
export type ActiveCursor = 'auto' | 'default' | 'none' | 'context-menu' | 'help' | 'pointer' | 'progress' | 'wait' | 'cell' | 'crosshair' | 'text' | 'vertical-text' | 'alias' | 'copy' | 'move' | 'no-drop' | 'not-allowed' | 'grab' | 'grabbing' | 'e-resize' | 'n-resize' | 'ne-resize' | 'nw-resize' | 's-resize' | 'se-resize' | 'sw-resize' | 'w-resize' | 'ew-resize' | 'ns-resize' | 'nesw-resize' | 'nwse-resize' | 'col-resize' | 'row-resize' | 'all-scroll' | 'zoom-in' | 'zoom-out';
|
20
20
|
export declare enum MouseButton {
|
@@ -46,6 +46,7 @@ export type GestureTouchEvent = {
|
|
46
46
|
eventType: TouchEventType;
|
47
47
|
allTouches: TouchData[];
|
48
48
|
changedTouches: TouchData[];
|
49
|
+
pointerType: PointerType;
|
49
50
|
};
|
50
51
|
export type GestureUpdateEvent<GestureEventPayloadT = Record<string, unknown>> = GestureEventPayload & GestureEventPayloadT;
|
51
52
|
export type GestureStateChangeEvent<GestureStateChangeEventPayloadT = Record<string, unknown>> = HandlerStateChangeEventPayload & GestureStateChangeEventPayloadT;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
export declare class Wrap extends React.Component<{
|
3
|
+
onGestureHandlerEvent?: unknown;
|
4
|
+
children?: React.ReactNode;
|
5
|
+
}> {
|
6
|
+
render(): React.FunctionComponentElement<{
|
7
|
+
collapsable: boolean;
|
8
|
+
}>;
|
9
|
+
}
|
10
|
+
export declare const AnimatedWrap: typeof Wrap | React.ComponentClass<{
|
11
|
+
onGestureHandlerEvent?: unknown;
|
12
|
+
children?: React.ReactNode;
|
13
|
+
}, any>;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { GestureType } from '../gesture';
|
3
|
+
import { ComposedGesture } from '../gestureComposition';
|
4
|
+
import { AttachedGestureState, WebEventHandler } from './types';
|
5
|
+
interface AttachHandlersConfig {
|
6
|
+
preparedGesture: AttachedGestureState;
|
7
|
+
gestureConfig: ComposedGesture | GestureType;
|
8
|
+
gesturesToAttach: GestureType[];
|
9
|
+
viewTag: number;
|
10
|
+
webEventHandlersRef: React.RefObject<WebEventHandler>;
|
11
|
+
}
|
12
|
+
export declare function attachHandlers({ preparedGesture, gestureConfig, gesturesToAttach, viewTag, webEventHandlersRef, }: AttachHandlersConfig): void;
|
13
|
+
export {};
|
package/lib/typescript/handlers/gestures/{GestureDetector.d.ts → GestureDetector/index.d.ts}
RENAMED
@@ -1,16 +1,9 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { GestureType
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import { ComposedGesture } from './gestureComposition';
|
6
|
-
export type GestureConfigReference = {
|
7
|
-
config: GestureType[];
|
8
|
-
animatedEventHandler: unknown;
|
9
|
-
animatedHandlers: SharedValue<HandlerCallbacks<Record<string, unknown>>[] | null> | null;
|
10
|
-
firstExecution: boolean;
|
11
|
-
useReanimatedHook: boolean;
|
12
|
-
};
|
2
|
+
import { GestureType } from '../gesture';
|
3
|
+
import { UserSelect, TouchAction } from '../../gestureHandlerCommon';
|
4
|
+
import { ComposedGesture } from '../gestureComposition';
|
13
5
|
interface GestureDetectorProps {
|
6
|
+
children?: React.ReactNode;
|
14
7
|
/**
|
15
8
|
* A gesture object containing the configuration and callbacks.
|
16
9
|
* Can be any of:
|
@@ -18,7 +11,6 @@ interface GestureDetectorProps {
|
|
18
11
|
* - `ComposedGesture` (`Race`, `Simultaneous`, `Exclusive`)
|
19
12
|
*/
|
20
13
|
gesture: ComposedGesture | GestureType;
|
21
|
-
children?: React.ReactNode;
|
22
14
|
/**
|
23
15
|
* #### Web only
|
24
16
|
* This parameter allows to specify which `userSelect` property should be applied to underlying view.
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { GestureType, HandlerCallbacks } from '../gesture';
|
2
|
+
import { SharedValue } from '../reanimatedWrapper';
|
3
|
+
import { HandlerStateChangeEvent } from '../../gestureHandlerCommon';
|
4
|
+
export interface AttachedGestureState {
|
5
|
+
attachedGestures: GestureType[];
|
6
|
+
animatedEventHandler: unknown;
|
7
|
+
animatedHandlers: SharedValue<HandlerCallbacks<Record<string, unknown>>[] | null> | null;
|
8
|
+
shouldUseReanimated: boolean;
|
9
|
+
isMounted: boolean;
|
10
|
+
}
|
11
|
+
export interface GestureDetectorState {
|
12
|
+
firstRender: boolean;
|
13
|
+
viewRef: React.Component | null;
|
14
|
+
previousViewTag: number;
|
15
|
+
forceRebuildReanimatedEvent: boolean;
|
16
|
+
}
|
17
|
+
export interface WebEventHandler {
|
18
|
+
onGestureHandlerEvent: (event: HandlerStateChangeEvent<unknown>) => void;
|
19
|
+
onGestureHandlerStateChange?: (event: HandlerStateChangeEvent<unknown>) => void;
|
20
|
+
}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import { GestureType } from '../gesture';
|
2
|
+
import { ComposedGesture } from '../gestureComposition';
|
3
|
+
import { AttachedGestureState } from './types';
|
4
|
+
export declare function updateHandlers(preparedGesture: AttachedGestureState, gestureConfig: ComposedGesture | GestureType, newGestures: GestureType[]): void;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { GestureType } from '../gesture';
|
3
|
+
import { ComposedGesture } from '../gestureComposition';
|
4
|
+
import { AttachedGestureState, GestureDetectorState, WebEventHandler } from './types';
|
5
|
+
export declare function useDetectorUpdater(state: GestureDetectorState, preparedGesture: AttachedGestureState, gesturesToAttach: GestureType[], gestureConfig: ComposedGesture | GestureType, webEventHandlersRef: React.RefObject<WebEventHandler>): (skipConfigUpdate?: boolean) => void;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { GestureType } from '../gesture';
|
2
|
+
import { WebEventHandler } from './types';
|
3
|
+
export declare const ALLOWED_PROPS: string[];
|
4
|
+
export declare function extractGestureRelations(gesture: GestureType): {
|
5
|
+
waitFor: number[];
|
6
|
+
simultaneousHandlers: number[];
|
7
|
+
blocksHandlers: number[];
|
8
|
+
};
|
9
|
+
export declare function checkGestureCallbacksForWorklets(gesture: GestureType): void;
|
10
|
+
export declare function validateDetectorChildren(ref: any): void;
|
11
|
+
export declare function useForceRender(): () => void;
|
12
|
+
export declare function useWebEventHandlers(): import("react").MutableRefObject<WebEventHandler>;
|
@@ -10,5 +10,5 @@ declare let Reanimated: {
|
|
10
10
|
useEvent: (callback: (event: GestureUpdateEvent | GestureStateChangeEvent) => void, events: string[], rebuild: boolean) => unknown;
|
11
11
|
useSharedValue: <T>(value: T) => SharedValue<T>;
|
12
12
|
setGestureState: (handlerTag: number, newState: number) => void;
|
13
|
-
};
|
13
|
+
} | undefined;
|
14
14
|
export { Reanimated };
|
@@ -6,3 +6,13 @@ export declare function isJestEnv(): boolean;
|
|
6
6
|
export declare function tagMessage(msg: string): string;
|
7
7
|
export declare function isFabric(): boolean;
|
8
8
|
export declare function isRemoteDebuggingEnabled(): boolean;
|
9
|
+
/**
|
10
|
+
* Recursively compares two objects for deep equality.
|
11
|
+
*
|
12
|
+
* **Note:** This function does not support cyclic references.
|
13
|
+
*
|
14
|
+
* @param obj1 - The first object to compare.
|
15
|
+
* @param obj2 - The second object to compare.
|
16
|
+
* @returns `true` if the objects are deeply equal, `false` otherwise.
|
17
|
+
*/
|
18
|
+
export declare function deepEqual(obj1: any, obj2: any): boolean;
|
@@ -67,6 +67,7 @@ export default abstract class GestureHandler implements IGestureHandler {
|
|
67
67
|
protected onPointerMoveOver(_event: AdaptedEvent): void;
|
68
68
|
protected onPointerMoveOut(_event: AdaptedEvent): void;
|
69
69
|
private tryToSendMoveEvent;
|
70
|
+
protected tryToSendTouchEvent(event: AdaptedEvent): void;
|
70
71
|
sendTouchEvent(event: AdaptedEvent): void;
|
71
72
|
sendEvent: (newState: State, oldState: State) => void;
|
72
73
|
private transformEventData;
|
@@ -88,6 +88,7 @@ interface NativeTouchEvent extends Record<string, TouchNativeArgs> {
|
|
88
88
|
changedTouches: PointerData[];
|
89
89
|
allTouches: PointerData[];
|
90
90
|
numberOfTouches: number;
|
91
|
+
pointerType: PointerType;
|
91
92
|
}
|
92
93
|
export interface ResultEvent extends Record<string, NativeEvent | number> {
|
93
94
|
nativeEvent: NativeEvent;
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import { AdaptedEvent } from '../interfaces';
|
1
|
+
import { AdaptedEvent, Point } from '../interfaces';
|
2
2
|
export interface TrackerElement {
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
abosoluteCoords: Point;
|
4
|
+
relativeCoords: Point;
|
5
|
+
timestamp: number;
|
6
6
|
velocityX: number;
|
7
7
|
velocityY: number;
|
8
8
|
}
|
@@ -11,7 +11,8 @@ export default class PointerTracker {
|
|
11
11
|
private trackedPointers;
|
12
12
|
private touchEventsIds;
|
13
13
|
private lastMovedPointerId;
|
14
|
-
private
|
14
|
+
private cachedAbsoluteAverages;
|
15
|
+
private cachedRelativeAverages;
|
15
16
|
constructor();
|
16
17
|
addToTracker(event: AdaptedEvent): void;
|
17
18
|
removeFromTracker(pointerId: number): void;
|
@@ -19,32 +20,34 @@ export default class PointerTracker {
|
|
19
20
|
private mapTouchEventId;
|
20
21
|
private removeMappedTouchId;
|
21
22
|
getMappedTouchEventId(touchEventId: number): number;
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
23
|
+
getVelocity(pointerId: number): {
|
24
|
+
x: number;
|
25
|
+
y: number;
|
26
|
+
};
|
27
|
+
getLastAbsoluteCoords(pointerId?: number): {
|
28
|
+
x: number;
|
29
|
+
y: number;
|
30
|
+
};
|
31
|
+
getLastRelativeCoords(pointerId?: number): {
|
32
|
+
x: number;
|
33
|
+
y: number;
|
34
|
+
};
|
35
|
+
getAbsoluteCoordsAverage(): {
|
36
|
+
x: number;
|
37
|
+
y: number;
|
38
|
+
};
|
39
|
+
getRelativeCoordsAverage(): {
|
40
|
+
x: number;
|
41
|
+
y: number;
|
42
|
+
};
|
43
|
+
getAbsoluteCoordsSum(ignoredPointer?: number): {
|
44
|
+
x: number;
|
45
|
+
y: number;
|
46
|
+
};
|
47
|
+
getRelativeCoordsSum(ignoredPointer?: number): {
|
48
|
+
x: number;
|
49
|
+
y: number;
|
50
|
+
};
|
48
51
|
getTrackedPointersCount(): number;
|
49
52
|
getTrackedPointersID(): number[];
|
50
53
|
getData(): Map<number, TrackerElement>;
|
@@ -4,3 +4,7 @@ export declare function isPointerInBounds(view: HTMLElement, { x, y }: Point): b
|
|
4
4
|
export declare const PointerTypeMapping: Map<string, PointerType>;
|
5
5
|
export declare const degToRad: (degrees: number) => number;
|
6
6
|
export declare const coneToDeviation: (degrees: number) => number;
|
7
|
+
export declare function calculateViewScale(view: HTMLElement): {
|
8
|
+
scaleX: number;
|
9
|
+
scaleY: number;
|
10
|
+
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "react-native-gesture-handler",
|
3
|
-
"version": "2.
|
3
|
+
"version": "2.17.0",
|
4
4
|
"description": "Experimental implementation of a new declarative API for gesture handling in react-native",
|
5
5
|
"scripts": {
|
6
6
|
"prepare": "bob build && husky install",
|
@@ -14,7 +14,8 @@
|
|
14
14
|
"format:ios": "find apple/ -iname *.h -o -iname *.m -o -iname *.cpp -o -iname *.mm | xargs clang-format -i",
|
15
15
|
"lint:js": "eslint --ext '.js,.ts,.tsx' src/ example/src FabricExample/src MacOSExample/src && yarn prettier --check './{src,example,FabricExample,MacOSExample}/**/*.{js,jsx,ts,tsx}'",
|
16
16
|
"lint:js-root": "eslint --ext '.js,.ts,.tsx' src/ && yarn prettier --check './src/**/*.{js,jsx,ts,tsx}'",
|
17
|
-
"lint:android": "./android/gradlew -p android spotlessCheck -q"
|
17
|
+
"lint:android": "./android/gradlew -p android spotlessCheck -q",
|
18
|
+
"checkIntegrity": "(cd ./FabricExample/android && ./gradlew generateCodegenArtifactsFromSchema -PskipCodegenCopyTask) && (cd ./android && ./gradlew checkIntegrityBetweenArchitectures)"
|
18
19
|
},
|
19
20
|
"react-native": "src/index.ts",
|
20
21
|
"main": "lib/commonjs/index.js",
|
@@ -62,7 +63,6 @@
|
|
62
63
|
"@egjs/hammerjs": "^2.0.17",
|
63
64
|
"hoist-non-react-statics": "^3.3.0",
|
64
65
|
"invariant": "^2.2.4",
|
65
|
-
"lodash": "^4.17.21",
|
66
66
|
"prop-types": "^15.7.2"
|
67
67
|
},
|
68
68
|
"jest": {
|
@@ -102,9 +102,9 @@
|
|
102
102
|
"prettier": "^2.7.1",
|
103
103
|
"react": "18.2.0",
|
104
104
|
"react-dom": "^16.12.0",
|
105
|
-
"react-native": "0.
|
105
|
+
"react-native": "0.74.1",
|
106
106
|
"react-native-builder-bob": "^0.17.1",
|
107
|
-
"react-native-reanimated": "^
|
107
|
+
"react-native-reanimated": "^3.12.0",
|
108
108
|
"react-native-web": "^0.11.7",
|
109
109
|
"react-test-renderer": "17.0.2",
|
110
110
|
"release-it": "^13.6.5",
|