react-native-gesture-handler 2.28.0 → 2.30.0-20251030-c99169d35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/android/build.gradle +2 -2
- package/android/paper/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerButtonManagerDelegate.java +1 -0
- package/android/paper/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerRootViewManagerDelegate.java +8 -1
- package/android/paper/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerRootViewManagerInterface.java +1 -1
- package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerOrchestrator.kt +73 -41
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.kt +5 -13
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootHelper.kt +2 -2
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootView.kt +14 -6
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootViewManager.kt +6 -0
- package/apple/Handlers/RNFlingHandler.m +7 -1
- package/apple/Handlers/RNLongPressHandler.m +6 -4
- package/apple/Handlers/RNPanHandler.m +4 -1
- package/apple/Handlers/RNTapHandler.m +2 -1
- package/lib/commonjs/components/GestureHandlerRootView.android.js.map +1 -1
- package/lib/commonjs/components/GestureHandlerRootView.js.map +1 -1
- package/lib/commonjs/components/Pressable/Pressable.js +15 -5
- package/lib/commonjs/components/Pressable/Pressable.js.map +1 -1
- package/lib/commonjs/components/Pressable/stateDefinitions.js +1 -0
- package/lib/commonjs/components/Pressable/stateDefinitions.js.map +1 -1
- package/lib/commonjs/components/ReanimatedSwipeable/ReanimatedSwipeable.js +12 -10
- package/lib/commonjs/components/ReanimatedSwipeable/ReanimatedSwipeable.js.map +1 -1
- package/lib/commonjs/handlers/NativeViewGestureHandler.js +32 -0
- package/lib/commonjs/handlers/NativeViewGestureHandler.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/index.js +2 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/index.js.map +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector/utils.js +7 -7
- package/lib/commonjs/handlers/gestures/GestureDetector/utils.js.map +1 -1
- package/lib/commonjs/handlers/gestures/flingGesture.js +1 -1
- package/lib/commonjs/handlers/gestures/gestureStateManager.js +1 -0
- package/lib/commonjs/handlers/gestures/gestureStateManager.js.map +1 -1
- package/lib/commonjs/handlers/gestures/gestureStateManager.web.js +1 -0
- package/lib/commonjs/handlers/gestures/gestureStateManager.web.js.map +1 -1
- package/lib/commonjs/handlers/gestures/nativeGesture.js +34 -0
- package/lib/commonjs/handlers/gestures/nativeGesture.js.map +1 -0
- package/lib/commonjs/specs/NativeRNGestureHandlerModule.js +9 -0
- package/lib/commonjs/specs/NativeRNGestureHandlerModule.js.map +1 -0
- package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.ts +6 -2
- package/lib/commonjs/useIsomorphicLayoutEffect.js +20 -0
- package/lib/commonjs/useIsomorphicLayoutEffect.js.map +1 -0
- package/lib/commonjs/web/handlers/{NativeViewGestureHandler.ts → NativeViewGestureHandler.js} +53 -87
- package/lib/commonjs/web/handlers/NativeViewGestureHandler.js.map +1 -0
- package/lib/commonjs/web_hammer/NativeViewGestureHandler.js +57 -0
- package/lib/commonjs/web_hammer/NativeViewGestureHandler.js.map +1 -0
- package/lib/module/components/GestureHandlerRootView.android.js.map +1 -1
- package/lib/module/components/GestureHandlerRootView.js.map +1 -1
- package/lib/module/components/Pressable/Pressable.js +15 -5
- package/lib/module/components/Pressable/Pressable.js.map +1 -1
- package/lib/module/components/Pressable/stateDefinitions.js +1 -0
- package/lib/module/components/Pressable/stateDefinitions.js.map +1 -1
- package/lib/module/components/ReanimatedSwipeable/ReanimatedSwipeable.js +6 -4
- package/lib/module/components/ReanimatedSwipeable/ReanimatedSwipeable.js.map +1 -1
- package/lib/module/handlers/NativeViewGestureHandler.js +27 -0
- package/lib/module/handlers/NativeViewGestureHandler.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/index.js +3 -2
- package/lib/module/handlers/gestures/GestureDetector/index.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js +1 -1
- package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector/utils.js +7 -7
- package/lib/module/handlers/gestures/GestureDetector/utils.js.map +1 -1
- package/lib/module/handlers/gestures/flingGesture.js +1 -1
- package/lib/module/handlers/gestures/gestureStateManager.js +1 -0
- package/lib/module/handlers/gestures/gestureStateManager.js.map +1 -1
- package/lib/module/handlers/gestures/gestureStateManager.web.js +1 -0
- package/lib/module/handlers/gestures/gestureStateManager.web.js.map +1 -1
- package/lib/module/handlers/gestures/nativeGesture.js +29 -0
- package/lib/module/handlers/gestures/nativeGesture.js.map +1 -0
- package/lib/module/specs/NativeRNGestureHandlerModule.js +5 -0
- package/lib/module/specs/NativeRNGestureHandlerModule.js.map +1 -0
- package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.ts +6 -2
- package/lib/module/useIsomorphicLayoutEffect.js +15 -0
- package/lib/module/useIsomorphicLayoutEffect.js.map +1 -0
- package/lib/module/web/handlers/{NativeViewGestureHandler.ts → NativeViewGestureHandler.js} +36 -76
- package/lib/module/web/handlers/NativeViewGestureHandler.js.map +1 -0
- package/lib/module/web_hammer/NativeViewGestureHandler.js +51 -0
- package/lib/module/web_hammer/NativeViewGestureHandler.js.map +1 -0
- package/lib/typescript/components/GestureHandlerRootView.android.d.ts +2 -2
- package/lib/typescript/components/GestureHandlerRootView.android.d.ts.map +1 -1
- package/lib/typescript/components/GestureHandlerRootView.d.ts +2 -2
- package/lib/typescript/components/GestureHandlerRootView.d.ts.map +1 -1
- package/lib/typescript/components/Pressable/Pressable.d.ts.map +1 -1
- package/lib/typescript/components/Pressable/stateDefinitions.d.ts +2 -1
- package/lib/typescript/components/Pressable/stateDefinitions.d.ts.map +1 -1
- package/lib/typescript/components/ReanimatedSwipeable/ReanimatedSwipeable.d.ts +1 -1
- package/lib/typescript/components/ReanimatedSwipeable/ReanimatedSwipeable.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/GestureDetector/index.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/GestureDetector/useAnimatedGesture.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/GestureDetector/utils.d.ts +4 -4
- package/lib/typescript/handlers/gestures/GestureDetector/utils.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/flingGesture.d.ts +1 -1
- package/lib/typescript/handlers/gestures/gestureStateManager.d.ts +2 -0
- package/lib/typescript/handlers/gestures/gestureStateManager.d.ts.map +1 -1
- package/lib/typescript/handlers/gestures/gestureStateManager.web.d.ts.map +1 -1
- package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts +3 -2
- package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/useIsomorphicLayoutEffect.d.ts +3 -0
- package/lib/typescript/useIsomorphicLayoutEffect.d.ts.map +1 -0
- package/package.json +7 -7
- package/src/components/GestureHandlerRootView.android.tsx +3 -2
- package/src/components/GestureHandlerRootView.tsx +3 -2
- package/src/components/Pressable/Pressable.tsx +16 -5
- package/src/components/Pressable/stateDefinitions.ts +1 -0
- package/src/components/ReanimatedSwipeable/ReanimatedSwipeable.tsx +17 -4
- package/src/handlers/gestures/GestureDetector/index.tsx +3 -8
- package/src/handlers/gestures/GestureDetector/useAnimatedGesture.ts +4 -1
- package/src/handlers/gestures/GestureDetector/utils.ts +14 -8
- package/src/handlers/gestures/flingGesture.ts +1 -1
- package/src/handlers/gestures/gestureStateManager.ts +4 -0
- package/src/handlers/gestures/gestureStateManager.web.ts +2 -0
- package/src/specs/RNGestureHandlerRootViewNativeComponent.ts +6 -2
- package/src/useIsomorphicLayoutEffect.tsx +19 -0
- package/lib/commonjs/handlers/NativeViewGestureHandler.ts +0 -59
- package/lib/commonjs/handlers/gestures/nativeGesture.ts +0 -33
- package/lib/commonjs/specs/NativeRNGestureHandlerModule.ts +0 -26
- package/lib/commonjs/web_hammer/NativeViewGestureHandler.ts +0 -47
- package/lib/module/handlers/NativeViewGestureHandler.ts +0 -59
- package/lib/module/handlers/gestures/nativeGesture.ts +0 -33
- package/lib/module/specs/NativeRNGestureHandlerModule.ts +0 -26
- package/lib/module/web_hammer/NativeViewGestureHandler.ts +0 -47
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
/* eslint-disable react/no-unused-prop-types */
|
|
4
|
-
import React, { useContext, useEffect,
|
|
4
|
+
import React, { useContext, useEffect, useMemo, useRef } from 'react';
|
|
5
5
|
import { Platform } from 'react-native';
|
|
6
6
|
import findNodeHandle from '../../../findNodeHandle';
|
|
7
7
|
import { isTestEnv } from '../../../utils';
|
|
@@ -15,6 +15,7 @@ import { Wrap, AnimatedWrap } from './Wrap';
|
|
|
15
15
|
import { useDetectorUpdater } from './useDetectorUpdater';
|
|
16
16
|
import { useViewRefHandler } from './useViewRefHandler';
|
|
17
17
|
import { useMountReactions } from './useMountReactions';
|
|
18
|
+
import { useIsomorphicLayoutEffect } from '../../../useIsomorphicLayoutEffect';
|
|
18
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
20
|
function propagateDetectorConfig(props, gesture) {
|
|
20
21
|
const keysToPropagate = ['userSelect', 'enableContextMenu', 'touchAction'];
|
|
@@ -78,7 +79,7 @@ export const GestureDetector = props => {
|
|
|
78
79
|
const needsToRebuildReanimatedEvent = state.firstRender || state.forceRebuildReanimatedEvent || needsToReattach(preparedGesture, gesturesToAttach);
|
|
79
80
|
state.forceRebuildReanimatedEvent = false;
|
|
80
81
|
useAnimatedGesture(preparedGesture, needsToRebuildReanimatedEvent);
|
|
81
|
-
|
|
82
|
+
useIsomorphicLayoutEffect(() => {
|
|
82
83
|
const viewTag = findNodeHandle(state.viewRef);
|
|
83
84
|
preparedGesture.isMounted = true;
|
|
84
85
|
attachHandlers({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useContext","useEffect","
|
|
1
|
+
{"version":3,"names":["React","useContext","useEffect","useMemo","useRef","Platform","findNodeHandle","isTestEnv","GestureHandlerRootViewContext","useAnimatedGesture","attachHandlers","needsToReattach","dropHandlers","useWebEventHandlers","Wrap","AnimatedWrap","useDetectorUpdater","useViewRefHandler","useMountReactions","useIsomorphicLayoutEffect","jsx","_jsx","propagateDetectorConfig","props","gesture","keysToPropagate","key","value","undefined","g","toGestureArray","config","GestureDetector","rootViewContext","__DEV__","OS","Error","gestureConfig","gesturesToAttach","shouldUseReanimated","some","webEventHandlersRef","state","firstRender","viewRef","previousViewTag","forceRebuildReanimatedEvent","current","preparedGesture","attachedGestures","animatedEventHandler","animatedHandlers","isMounted","updateAttachedGestures","refHandler","needsToRebuildReanimatedEvent","viewTag","ref","onGestureHandlerEvent","children"],"sourceRoot":"../../../../../src","sources":["handlers/gestures/GestureDetector/index.tsx"],"mappings":";;AAAA;AACA,OAAOA,KAAK,IAAIC,UAAU,EAAEC,SAAS,EAAEC,OAAO,EAAEC,MAAM,QAAQ,OAAO;AACrE,SAASC,QAAQ,QAAQ,cAAc;AACvC,OAAOC,cAAc,MAAM,yBAAyB;AAIpD,SAASC,SAAS,QAAQ,gBAAgB;AAE1C,OAAOC,6BAA6B,MAAM,wCAAwC;AAElF,SAASC,kBAAkB,QAAQ,sBAAsB;AACzD,SAASC,cAAc,QAAQ,kBAAkB;AACjD,SAASC,eAAe,QAAQ,mBAAmB;AACnD,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,mBAAmB,QAAQ,SAAS;AAC7C,SAASC,IAAI,EAAEC,YAAY,QAAQ,QAAQ;AAC3C,SA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E,EAAE,CAAC;EAEN9C,SAAS,CAAC,MAAM;IACd,IAAIwC,KAAK,CAACC,WAAW,EAAE;MACrBD,KAAK,CAACC,WAAW,GAAG,KAAK;IAC3B,CAAC,MAAM;MACLU,sBAAsB,CAAC,CAAC;IAC1B;EACF,CAAC,EAAE,CAAC9B,KAAK,CAAC,CAAC;EAEXL,iBAAiB,CAACmC,sBAAsB,EAAEL,eAAe,CAAC;EAE1D,IAAIT,mBAAmB,EAAE;IACvB,oBACElB,IAAA,CAACN,YAAY;MACX0C,GAAG,EAAEH,UAAW;MAChBI,qBAAqB,EAAEV,eAAe,CAACE,oBAAqB;MAAAS,QAAA,EAC3DpC,KAAK,CAACoC;IAAQ,CACH,CAAC;EAEnB,CAAC,MAAM;IACL,oBAAOtC,IAAA,CAACP,IAAI;MAAC2C,GAAG,EAAEH,UAAW;MAAAK,QAAA,EAAEpC,KAAK,CAACoC;IAAQ,CAAO,CAAC;EACvD;AACF,CAAC","ignoreList":[]}
|
|
@@ -115,7 +115,7 @@ export function useAnimatedGesture(preparedGesture, needsRebuild) {
|
|
|
115
115
|
runWorklet(CALLBACK_TYPE.FINALIZE, gesture, event, false);
|
|
116
116
|
}
|
|
117
117
|
} else if (isTouchEvent(event)) {
|
|
118
|
-
if (!stateControllers[i]) {
|
|
118
|
+
if (!stateControllers[i] || stateControllers[i].handlerTag !== event.handlerTag) {
|
|
119
119
|
stateControllers[i] = GestureStateManager.create(event.handlerTag);
|
|
120
120
|
}
|
|
121
121
|
if (event.eventType !== TouchEventType.UNDETERMINED) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CALLBACK_TYPE","Reanimated","GestureStateManager","State","TouchEventType","tagMessage","getHandler","type","gesture","BEGAN","onBegin","START","onStart","UPDATE","onUpdate","CHANGE","onChange","END","onEnd","FINALIZE","onFinalize","TOUCHES_DOWN","onTouchesDown","TOUCHES_MOVE","onTouchesMove","TOUCHES_UP","onTouchesUp","TOUCHES_CANCELLED","onTouchesCancelled","touchEventTypeToCallbackType","eventType","UNDEFINED","runWorklet","event","args","handler","isWorklet","console","warn","isStateChangeEvent","oldState","isTouchEvent","useAnimatedGesture","preparedGesture","needsRebuild","sharedHandlersCallbacks","useSharedValue","lastUpdateEvent","stateControllers","callback","currentCallback","value","i","length","handlerTag","UNDETERMINED","state","ACTIVE","undefined","FAILED","CANCELLED","create","changeEventCalculator","useEvent","animatedEventHandler","animatedHandlers"],"sourceRoot":"../../../../../src","sources":["handlers/gestures/GestureDetector/useAnimatedGesture.ts"],"mappings":";;AAAA,SAA2BA,aAAa,QAAQ,YAAY;AAC5D,SAASC,UAAU,QAAQ,sBAAsB;AAMjD,SACEC,mBAAmB,QAEd,wBAAwB;AAC/B,SAASC,KAAK,QAAQ,gBAAgB;AACtC,SAASC,cAAc,QAAQ,yBAAyB;AACxD,SAASC,UAAU,QAAQ,gBAAgB;AAG3C,SAASC,UAAUA,CACjBC,IAAmB,EACnBC,OAAkD,EAClD;EACA,SAAS;;EACT,QAAQD,IAAI;IACV,KAAKP,aAAa,CAACS,KAAK;MACtB,OAAOD,OAAO,CAACE,OAAO;IACxB,KAAKV,aAAa,CAACW,KAAK;MACtB,OAAOH,OAAO,CAACI,OAAO;IACxB,KAAKZ,aAAa,CAACa,MAAM;MACvB,OAAOL,OAAO,CAACM,QAAQ;IACzB,KAAKd,aAAa,CAACe,MAAM;MACvB,OAAOP,OAAO,CAACQ,QAAQ;IACzB,KAAKhB,aAAa,CAACiB,GAAG;MACpB,OAAOT,OAAO,CAACU,KAAK;IACtB,KAAKlB,aAAa,CAACmB,QAAQ;MACzB,OAAOX,OAAO,CAACY,UAAU;IAC3B,KAAKpB,aAAa,CAACqB,YAAY;MAC7B,OAAOb,OAAO,CAACc,aAAa;IAC9B,KAAKtB,aAAa,CAACuB,YAAY;MAC7B,OAAOf,OAAO,CAACgB,aAAa;IAC9B,KAAKxB,aAAa,CAACyB,UAAU;MAC3B,OAAOjB,OAAO,CAACkB,WAAW;IAC5B,KAA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ACc,GAAG,EACzB;UACA,IAAIgB,KAAK,CAACO,QAAQ,KAAKrC,KAAK,CAACsD,MAAM,EAAE;YACnCzB,UAAU,CAAChC,aAAa,CAACiB,GAAG,EAAET,OAAO,EAAEyB,KAAK,EAAE,IAAI,CAAC;UACrD;UACAD,UAAU,CAAChC,aAAa,CAACmB,QAAQ,EAAEX,OAAO,EAAEyB,KAAK,EAAE,IAAI,CAAC;QAC1D,CAAC,MAAM,IACL,CAACA,KAAK,CAACuB,KAAK,KAAKrD,KAAK,CAACwD,MAAM,IAAI1B,KAAK,CAACuB,KAAK,KAAKrD,KAAK,CAACyD,SAAS,KAChE3B,KAAK,CAACuB,KAAK,KAAKvB,KAAK,CAACO,QAAQ,EAC9B;UACA,IAAIP,KAAK,CAACO,QAAQ,KAAKrC,KAAK,CAACsD,MAAM,EAAE;YACnCzB,UAAU,CAAChC,aAAa,CAACiB,GAAG,EAAET,OAAO,EAAEyB,KAAK,EAAE,KAAK,CAAC;UACtD;UACAD,UAAU,CAAChC,aAAa,CAACmB,QAAQ,EAAEX,OAAO,EAAEyB,KAAK,EAAE,KAAK,CAAC;QAC3D;MACF,CAAC,MAAM,IAAIQ,YAAY,CAACR,KAAK,CAAC,EAAE;QAC9B,
|
|
1
|
+
{"version":3,"names":["CALLBACK_TYPE","Reanimated","GestureStateManager","State","TouchEventType","tagMessage","getHandler","type","gesture","BEGAN","onBegin","START","onStart","UPDATE","onUpdate","CHANGE","onChange","END","onEnd","FINALIZE","onFinalize","TOUCHES_DOWN","onTouchesDown","TOUCHES_MOVE","onTouchesMove","TOUCHES_UP","onTouchesUp","TOUCHES_CANCELLED","onTouchesCancelled","touchEventTypeToCallbackType","eventType","UNDEFINED","runWorklet","event","args","handler","isWorklet","console","warn","isStateChangeEvent","oldState","isTouchEvent","useAnimatedGesture","preparedGesture","needsRebuild","sharedHandlersCallbacks","useSharedValue","lastUpdateEvent","stateControllers","callback","currentCallback","value","i","length","handlerTag","UNDETERMINED","state","ACTIVE","undefined","FAILED","CANCELLED","create","changeEventCalculator","useEvent","animatedEventHandler","animatedHandlers"],"sourceRoot":"../../../../../src","sources":["handlers/gestures/GestureDetector/useAnimatedGesture.ts"],"mappings":";;AAAA,SAA2BA,aAAa,QAAQ,YAAY;AAC5D,SAASC,UAAU,QAAQ,sBAAsB;AAMjD,SACEC,mBAAmB,QAEd,wBAAwB;AAC/B,SAASC,KAAK,QAAQ,gBAAgB;AACtC,SAASC,cAAc,QAAQ,yBAAyB;AACxD,SAASC,UAAU,QAAQ,gBAAgB;AAG3C,SAASC,UAAUA,CACjBC,IAAmB,EACnBC,OAAkD,EAClD;EACA,SAAS;;EACT,QAAQD,IAAI;IACV,KAAKP,aAAa,CAACS,KAAK;MACtB,OAAOD,OAAO,CAACE,OAAO;IACxB,KAAKV,aAAa,CAACW,KAAK;MACtB,OAAOH,OAAO,CAACI,OAAO;IACxB,KAAKZ,aAAa,CAACa,MAAM;MACvB,OAAOL,OAAO,CAACM,QAAQ;IACzB,KAAKd,aAAa,CAACe,MAAM;MACvB,OAAOP,OAAO,CAACQ,QAAQ;IACzB,KAAKhB,aAAa,CAACiB,GAAG;MACpB,OAAOT,OAAO,CAACU,KAAK;IACtB,KAAKlB,aAAa,CAACmB,QAAQ;MACzB,OAAOX,OAAO,CAACY,UAAU;IAC3B,KAAKpB,aAAa,CAACqB,YAAY;MAC7B,OAAOb,OAAO,CAACc,aAAa;IAC9B,KAAKtB,aAAa,CAACuB,YAAY;MAC7B,OAAOf,OAAO,CAACgB,aAAa;IAC9B,KAAKxB,aAAa,CAACyB,UAAU;MAC3B,OAAOjB,OAAO,CAACkB,WAAW;IAC5B,KAAK1B,aAAa,CAAC2B,iBAAiB;MAClC,OAAOnB,OAAO,CAACoB,kBAAkB;EACrC;AACF;AAEA,SAASC,4BAA4BA,CACnCC,SAAyB,EACV;EACf,SAAS;;EACT,QAAQA,SAAS;IACf,KAAK1B,cAAc,CAACiB,YAAY;MAC9B,OAAOrB,aAAa,CAACqB,YAAY;I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eAAe,CAACI,KAAK,CAAC3C,OAAO,CAAC8C,UAAU,CAC1C,CACF,CAAC;UAEDP,eAAe,CAACI,KAAK,CAAC3C,OAAO,CAAC8C,UAAU,CAAC,GAAGrB,KAAK;QACnD;MACF;IACF;EACF,CAAC;;EAED;EACA,MAAMA,KAAK,GAAGhC,UAAU,CAAC8D,QAAQ,CAC/Bd,QAAQ,EACR,CAAC,6BAA6B,EAAE,uBAAuB,CAAC,EACxDL,YACF,CAAC;EAEDD,eAAe,CAACqB,oBAAoB,GAAG/B,KAAK;EAC5CU,eAAe,CAACsB,gBAAgB,GAAGpB,uBAAuB;AAC5D","ignoreList":[]}
|
|
@@ -29,16 +29,16 @@ function convertToHandlerTag(ref) {
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
function extractValidHandlerTags(interactionGroup) {
|
|
32
|
-
return interactionGroup?.map(convertToHandlerTag)?.filter(tag => tag > 0) ?? [];
|
|
32
|
+
return Array.from(new Set(interactionGroup?.map(convertToHandlerTag)?.filter(tag => tag > 0) ?? []));
|
|
33
33
|
}
|
|
34
34
|
export function extractGestureRelations(gesture) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
gesture.config.requireToFail = extractValidHandlerTags(gesture.config.requireToFail);
|
|
36
|
+
gesture.config.simultaneousWith = extractValidHandlerTags(gesture.config.simultaneousWith);
|
|
37
|
+
gesture.config.blocksHandlers = extractValidHandlerTags(gesture.config.blocksHandlers);
|
|
38
38
|
return {
|
|
39
|
-
waitFor: requireToFail,
|
|
40
|
-
simultaneousHandlers: simultaneousWith,
|
|
41
|
-
blocksHandlers: blocksHandlers
|
|
39
|
+
waitFor: gesture.config.requireToFail,
|
|
40
|
+
simultaneousHandlers: gesture.config.simultaneousWith,
|
|
41
|
+
blocksHandlers: gesture.config.blocksHandlers
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
export function checkGestureCallbacksForWorklets(gesture) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","isTestEnv","tagMessage","BaseGesture","flingGestureHandlerProps","forceTouchGestureHandlerProps","longPressGestureHandlerProps","panGestureHandlerProps","panGestureHandlerCustomNativeProps","tapGestureHandlerProps","hoverGestureHandlerProps","nativeViewGestureHandlerProps","baseGestureHandlerWithDetectorProps","isNewWebImplementationEnabled","RNRenderer","useCallback","useRef","useState","Reanimated","onGestureHandlerEvent","ALLOWED_PROPS","convertToHandlerTag","ref","handlerTag","current","extractValidHandlerTags","interactionGroup","map","filter","tag","extractGestureRelations","gesture","
|
|
1
|
+
{"version":3,"names":["Platform","isTestEnv","tagMessage","BaseGesture","flingGestureHandlerProps","forceTouchGestureHandlerProps","longPressGestureHandlerProps","panGestureHandlerProps","panGestureHandlerCustomNativeProps","tapGestureHandlerProps","hoverGestureHandlerProps","nativeViewGestureHandlerProps","baseGestureHandlerWithDetectorProps","isNewWebImplementationEnabled","RNRenderer","useCallback","useRef","useState","Reanimated","onGestureHandlerEvent","ALLOWED_PROPS","convertToHandlerTag","ref","handlerTag","current","extractValidHandlerTags","interactionGroup","Array","from","Set","map","filter","tag","extractGestureRelations","gesture","config","requireToFail","simultaneousWith","blocksHandlers","waitFor","simultaneousHandlers","checkGestureCallbacksForWorklets","__DEV__","runOnJS","areSomeNotWorklets","handlers","isWorklet","includes","areSomeWorklets","console","error","undefined","areAllNotWorklets","warn","validateDetectorChildren","OS","wrapType","_reactInternals","elementType","instance","findHostInstance_DEPRECATED","_internalFiberInstanceHandleDEV","sibling","Error","return","useForceRender","renderState","setRenderState","forceRender","useWebEventHandlers","e","nativeEvent","onGestureHandlerStateChange"],"sourceRoot":"../../../../../src","sources":["handlers/gestures/GestureDetector/utils.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AAEvC,SAASC,SAAS,EAAEC,UAAU,QAAQ,gBAAgB;AACtD,SAAqBC,WAAW,QAAqB,YAAY;AAEjE,SAASC,wBAAwB,QAAQ,2BAA2B;AACpE,SAASC,6BAA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 export class FlingGesture extends BaseGesture {
|
|
|
20
20
|
/**
|
|
21
21
|
* Expressed allowed direction of movement.
|
|
22
22
|
* Expected values are exported as constants in the Directions object.
|
|
23
|
-
* Arguments can be combined using `|` operator. Default value is set to `
|
|
23
|
+
* Arguments can be combined using `|` operator. Default value is set to `Directions.RIGHT`.
|
|
24
24
|
* @param direction
|
|
25
25
|
* @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/fling-gesture/#directionvalue-directions
|
|
26
26
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Reanimated","State","tagMessage","warningMessage","REANIMATED_AVAILABLE","useSharedValue","undefined","setGestureState","create","handlerTag","begin","BEGAN","console","warn","activate","ACTIVE","fail","FAILED","end","END","GestureStateManager"],"sourceRoot":"../../../../src","sources":["handlers/gestures/gestureStateManager.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,qBAAqB;AAChD,SAASC,KAAK,QAAQ,aAAa;AACnC,SAASC,UAAU,QAAQ,aAAa;
|
|
1
|
+
{"version":3,"names":["Reanimated","State","tagMessage","warningMessage","REANIMATED_AVAILABLE","useSharedValue","undefined","setGestureState","create","handlerTag","begin","BEGAN","console","warn","activate","ACTIVE","fail","FAILED","end","END","GestureStateManager"],"sourceRoot":"../../../../src","sources":["handlers/gestures/gestureStateManager.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,qBAAqB;AAChD,SAASC,KAAK,QAAQ,aAAa;AACnC,SAASC,UAAU,QAAQ,aAAa;AAWxC,MAAMC,cAAc,GAAGD,UAAU,CAC/B,kFACF,CAAC;;AAED;AACA;AACA,MAAME,oBAAoB,GAAGJ,UAAU,EAAEK,cAAc,KAAKC,SAAS;AACrE,MAAMC,eAAe,GAAGP,UAAU,EAAEO,eAAe;AAEnD,SAASC,MAAMA,CAACC,UAAkB,EAA2B;EAC3D,SAAS;;EACT,OAAO;IACLA,UAAU;IAEVC,KAAK,EAAEA,CAAA,KAAM;MACX,SAAS;;MACT,IAAIN,oBAAoB,EAAE;QACxB;QACA;QACAG,eAAe,CAAEE,UAAU,EAAER,KAAK,CAACU,KAAK,CAAC;MAC3C,CAAC,MAAM;QACLC,OAAO,CAACC,IAAI,CAACV,cAAc,CAAC;MAC9B;IACF,CAAC;IAEDW,QAAQ,EAAEA,CAAA,KAAM;MACd,SAAS;;MACT,IAAIV,oBAAoB,EAAE;QACxB;QACA;QACAG,eAAe,CAAEE,UAAU,EAAER,KAAK,CAACc,MAAM,CAAC;MAC5C,CAAC,MAAM;QACLH,OAAO,CAACC,IAAI,CAACV,cAAc,CAAC;MAC9B;IACF,CAAC;IAEDa,IAAI,EAAEA,CAAA,KAAM;MACV,SAAS;;MACT,IAAIZ,oBAAoB,EAAE;QACxB;QACA;QACAG,eAAe,CAAEE,UAAU,EAAER,KAAK,CAACgB,MAAM,CAAC;MAC5C,CAAC,MAAM;QACLL,OAAO,CAACC,IAAI,CAACV,cAAc,CAAC;MAC9B;IACF,CAAC;IAEDe,GAAG,EAAEA,CAAA,KAAM;MACT,SAAS;;MACT,IAAId,oBAAoB,EAAE;QACxB;QACA;QACAG,eAAe,CAAEE,UAAU,EAAER,KAAK,CAACkB,GAAG,CAAC;MACzC,CAAC,MAAM;QACLP,OAAO,CAACC,IAAI,CAACV,cAAc,CAAC;MAC9B;IACF;EACF,CAAC;AACH;AAEA,OAAO,MAAMiB,mBAAmB,GAAG;EACjCZ;AACF,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NodeManager","GestureStateManager","create","handlerTag","begin","getHandler","activate","fail","end"],"sourceRoot":"../../../../src","sources":["handlers/gestures/gestureStateManager.web.ts"],"mappings":";;AAAA,OAAOA,WAAW,MAAM,6BAA6B;AAGrD,OAAO,MAAMC,mBAAmB,GAAG;EACjCC,MAAMA,CAACC,UAAkB,EAA2B;IAClD,OAAO;
|
|
1
|
+
{"version":3,"names":["NodeManager","GestureStateManager","create","handlerTag","begin","getHandler","activate","fail","end"],"sourceRoot":"../../../../src","sources":["handlers/gestures/gestureStateManager.web.ts"],"mappings":";;AAAA,OAAOA,WAAW,MAAM,6BAA6B;AAGrD,OAAO,MAAMC,mBAAmB,GAAG;EACjCC,MAAMA,CAACC,UAAkB,EAA2B;IAClD,OAAO;MACLA,UAAU;MAEVC,KAAK,EAAEA,CAAA,KAAM;QACXJ,WAAW,CAACK,UAAU,CAACF,UAAU,CAAC,CAACC,KAAK,CAAC,CAAC;MAC5C,CAAC;MAEDE,QAAQ,EAAEA,CAAA,KAAM;QACdN,WAAW,CAACK,UAAU,CAACF,UAAU,CAAC,CAACG,QAAQ,CAAC,IAAI,CAAC;MACnD,CAAC;MAEDC,IAAI,EAAEA,CAAA,KAAM;QACVP,WAAW,CAACK,UAAU,CAACF,UAAU,CAAC,CAACI,IAAI,CAAC,CAAC;MAC3C,CAAC;MAEDC,GAAG,EAAEA,CAAA,KAAM;QACTR,WAAW,CAACK,UAAU,CAACF,UAAU,CAAC,CAACK,GAAG,CAAC,CAAC;MAC1C;IACF,CAAC;EACH;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { BaseGesture } from './gesture';
|
|
4
|
+
export class NativeGesture extends BaseGesture {
|
|
5
|
+
config = {};
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.handlerName = 'NativeViewGestureHandler';
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* When true, underlying handler will activate unconditionally when in `BEGAN` or `UNDETERMINED` state.
|
|
13
|
+
* @param value
|
|
14
|
+
*/
|
|
15
|
+
shouldActivateOnStart(value) {
|
|
16
|
+
this.config.shouldActivateOnStart = value;
|
|
17
|
+
return this;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* When true, cancels all other gesture handlers when this `NativeViewGestureHandler` receives an `ACTIVE` state event.
|
|
22
|
+
* @param value
|
|
23
|
+
*/
|
|
24
|
+
disallowInterruption(value) {
|
|
25
|
+
this.config.disallowInterruption = value;
|
|
26
|
+
return this;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=nativeGesture.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BaseGesture","NativeGesture","config","constructor","handlerName","shouldActivateOnStart","value","disallowInterruption"],"sourceRoot":"../../../../src","sources":["handlers/gestures/nativeGesture.ts"],"mappings":";;AAAA,SAA4BA,WAAW,QAAQ,WAAW;AAI1D,OAAO,MAAMC,aAAa,SAASD,WAAW,CAAkC;EACvEE,MAAM,GAAgD,CAAC,CAAC;EAE/DC,WAAWA,CAAA,EAAG;IACZ,KAAK,CAAC,CAAC;IAEP,IAAI,CAACC,WAAW,GAAG,0BAA0B;EAC/C;;EAEA;AACF;AACA;AACA;EACEC,qBAAqBA,CAACC,KAAc,EAAE;IACpC,IAAI,CAACJ,MAAM,CAACG,qBAAqB,GAAGC,KAAK;IACzC,OAAO,IAAI;EACb;;EAEA;AACF;AACA;AACA;EACEC,oBAAoBA,CAACD,KAAc,EAAE;IACnC,IAAI,CAACJ,MAAM,CAACK,oBAAoB,GAAGD,KAAK;IACxC,OAAO,IAAI;EACb;AACF","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../../src","sources":["specs/NativeRNGestureHandlerModule.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAAqB,cAAc;AAyB/D,eAAeA,mBAAmB,CAACC,YAAY,CAAO,wBAAwB,CAAC","ignoreList":[]}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
2
2
|
import type { ViewProps } from 'react-native';
|
|
3
3
|
|
|
4
|
-
interface
|
|
4
|
+
export interface RootViewNativeProps extends ViewProps {
|
|
5
|
+
unstable_forceActive?: boolean;
|
|
6
|
+
}
|
|
5
7
|
|
|
6
|
-
export default codegenNativeComponent<
|
|
8
|
+
export default codegenNativeComponent<RootViewNativeProps>(
|
|
9
|
+
'RNGestureHandlerRootView'
|
|
10
|
+
);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
// code below is modified version of the code found in:
|
|
5
|
+
// https://github.com/reduxjs/react-redux/blob/7e2fdd4ee2021e4282e12ba9fc722f09124e30cd/src/utils/useIsomorphicLayoutEffect.ts#L36
|
|
6
|
+
// React currently throws a warning when using useLayoutEffect on the server.
|
|
7
|
+
// To get around it, we can conditionally useEffect on the server (no-op) and
|
|
8
|
+
|
|
9
|
+
// useLayoutEffect in the browser.
|
|
10
|
+
const isDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');
|
|
11
|
+
|
|
12
|
+
// Under React Native, we know that we always want to use useLayoutEffect
|
|
13
|
+
const isReactNative = typeof navigator !== 'undefined' && navigator.product === 'ReactNative';
|
|
14
|
+
export const useIsomorphicLayoutEffect = isDOM || isReactNative ? React.useLayoutEffect : React.useEffect;
|
|
15
|
+
//# sourceMappingURL=useIsomorphicLayoutEffect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","isDOM","window","document","createElement","isReactNative","navigator","product","useIsomorphicLayoutEffect","useLayoutEffect","useEffect"],"sourceRoot":"../../src","sources":["useIsomorphicLayoutEffect.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB;AACA;AACA;AACA;;AAEA;AACA,MAAMC,KAAK,GAAG,CAAC,EACb,OAAOC,MAAM,KAAK,WAAW,IAC7B,OAAOA,MAAM,CAACC,QAAQ,KAAK,WAAW,IACtC,OAAOD,MAAM,CAACC,QAAQ,CAACC,aAAa,KAAK,WAAW,CACrD;;AAED;AACA,MAAMC,aAAa,GACjB,OAAOC,SAAS,KAAK,WAAW,IAAIA,SAAS,CAACC,OAAO,KAAK,aAAa;AAEzE,OAAO,MAAMC,yBAAyB,GACpCP,KAAK,IAAII,aAAa,GAAGL,KAAK,CAACS,eAAe,GAAGT,KAAK,CAACU,SAAS","ignoreList":[]}
|
|
@@ -1,101 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
1
3
|
import { Platform } from 'react-native';
|
|
2
4
|
import { State } from '../../State';
|
|
3
5
|
import { DEFAULT_TOUCH_SLOP } from '../constants';
|
|
4
|
-
import { AdaptedEvent, Config } from '../interfaces';
|
|
5
|
-
|
|
6
6
|
import GestureHandler from './GestureHandler';
|
|
7
7
|
export default class NativeViewGestureHandler extends GestureHandler {
|
|
8
|
-
private buttonRole!: boolean;
|
|
9
|
-
|
|
10
8
|
// TODO: Implement logic for activation on start
|
|
11
9
|
// @ts-ignore Logic yet to be implemented
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
public init(ref: number, propsRef: React.RefObject<unknown>): void {
|
|
10
|
+
shouldActivateOnStart = false;
|
|
11
|
+
disallowInterruption = false;
|
|
12
|
+
startX = 0;
|
|
13
|
+
startY = 0;
|
|
14
|
+
minDistSq = DEFAULT_TOUCH_SLOP * DEFAULT_TOUCH_SLOP;
|
|
15
|
+
init(ref, propsRef) {
|
|
20
16
|
super.init(ref, propsRef);
|
|
21
|
-
|
|
22
17
|
this.shouldCancelWhenOutside = true;
|
|
23
|
-
|
|
24
18
|
if (Platform.OS !== 'web') {
|
|
25
19
|
return;
|
|
26
20
|
}
|
|
27
|
-
|
|
28
|
-
const view = this.delegate.view as HTMLElement;
|
|
29
|
-
|
|
21
|
+
const view = this.delegate.view;
|
|
30
22
|
this.restoreViewStyles(view);
|
|
31
23
|
this.buttonRole = view.getAttribute('role') === 'button';
|
|
32
24
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
25
|
+
updateGestureConfig({
|
|
26
|
+
enabled = true,
|
|
27
|
+
...props
|
|
28
|
+
}) {
|
|
29
|
+
super.updateGestureConfig({
|
|
30
|
+
enabled: enabled,
|
|
31
|
+
...props
|
|
32
|
+
});
|
|
37
33
|
if (this.config.shouldActivateOnStart !== undefined) {
|
|
38
34
|
this.shouldActivateOnStart = this.config.shouldActivateOnStart;
|
|
39
35
|
}
|
|
40
36
|
if (this.config.disallowInterruption !== undefined) {
|
|
41
37
|
this.disallowInterruption = this.config.disallowInterruption;
|
|
42
38
|
}
|
|
43
|
-
|
|
44
|
-
const view = this.delegate.view as HTMLElement;
|
|
39
|
+
const view = this.delegate.view;
|
|
45
40
|
this.restoreViewStyles(view);
|
|
46
41
|
}
|
|
47
|
-
|
|
48
|
-
private restoreViewStyles(view: HTMLElement) {
|
|
42
|
+
restoreViewStyles(view) {
|
|
49
43
|
if (!view) {
|
|
50
44
|
return;
|
|
51
45
|
}
|
|
52
|
-
|
|
53
46
|
view.style['touchAction'] = 'auto';
|
|
54
47
|
// @ts-ignore Turns on defualt touch behavior on Safari
|
|
55
48
|
view.style['WebkitTouchCallout'] = 'auto';
|
|
56
49
|
}
|
|
57
|
-
|
|
58
|
-
protected onPointerDown(event: AdaptedEvent): void {
|
|
50
|
+
onPointerDown(event) {
|
|
59
51
|
this.tracker.addToTracker(event);
|
|
60
52
|
super.onPointerDown(event);
|
|
61
53
|
this.newPointerAction();
|
|
62
|
-
|
|
63
54
|
this.tryToSendTouchEvent(event);
|
|
64
55
|
}
|
|
65
|
-
|
|
66
|
-
protected onPointerAdd(event: AdaptedEvent): void {
|
|
56
|
+
onPointerAdd(event) {
|
|
67
57
|
this.tracker.addToTracker(event);
|
|
68
58
|
super.onPointerAdd(event);
|
|
69
59
|
this.newPointerAction();
|
|
70
60
|
}
|
|
71
|
-
|
|
72
|
-
private newPointerAction(): void {
|
|
61
|
+
newPointerAction() {
|
|
73
62
|
const lastCoords = this.tracker.getAbsoluteCoordsAverage();
|
|
74
63
|
this.startX = lastCoords.x;
|
|
75
64
|
this.startY = lastCoords.y;
|
|
76
|
-
|
|
77
65
|
if (this.state !== State.UNDETERMINED) {
|
|
78
66
|
return;
|
|
79
67
|
}
|
|
80
|
-
|
|
81
68
|
this.begin();
|
|
82
|
-
|
|
83
|
-
const view = this.delegate.view as HTMLElement;
|
|
69
|
+
const view = this.delegate.view;
|
|
84
70
|
const isRNGHText = view.hasAttribute('rnghtext');
|
|
85
|
-
|
|
86
71
|
if (this.buttonRole || isRNGHText) {
|
|
87
72
|
this.activate();
|
|
88
73
|
}
|
|
89
74
|
}
|
|
90
|
-
|
|
91
|
-
protected onPointerMove(event: AdaptedEvent): void {
|
|
75
|
+
onPointerMove(event) {
|
|
92
76
|
this.tracker.track(event);
|
|
93
|
-
|
|
94
77
|
const lastCoords = this.tracker.getAbsoluteCoordsAverage();
|
|
95
78
|
const dx = this.startX - lastCoords.x;
|
|
96
79
|
const dy = this.startY - lastCoords.y;
|
|
97
80
|
const distSq = dx * dx + dy * dy;
|
|
98
|
-
|
|
99
81
|
if (distSq >= this.minDistSq) {
|
|
100
82
|
if (this.buttonRole && this.state === State.ACTIVE) {
|
|
101
83
|
this.cancel();
|
|
@@ -104,26 +86,21 @@ export default class NativeViewGestureHandler extends GestureHandler {
|
|
|
104
86
|
}
|
|
105
87
|
}
|
|
106
88
|
}
|
|
107
|
-
|
|
108
|
-
protected onPointerLeave(): void {
|
|
89
|
+
onPointerLeave() {
|
|
109
90
|
if (this.state === State.BEGAN || this.state === State.ACTIVE) {
|
|
110
91
|
this.cancel();
|
|
111
92
|
}
|
|
112
93
|
}
|
|
113
|
-
|
|
114
|
-
protected onPointerUp(event: AdaptedEvent): void {
|
|
94
|
+
onPointerUp(event) {
|
|
115
95
|
super.onPointerUp(event);
|
|
116
96
|
this.onUp(event);
|
|
117
97
|
}
|
|
118
|
-
|
|
119
|
-
protected onPointerRemove(event: AdaptedEvent): void {
|
|
98
|
+
onPointerRemove(event) {
|
|
120
99
|
super.onPointerRemove(event);
|
|
121
100
|
this.onUp(event);
|
|
122
101
|
}
|
|
123
|
-
|
|
124
|
-
private onUp(event: AdaptedEvent): void {
|
|
102
|
+
onUp(event) {
|
|
125
103
|
this.tracker.removeFromTracker(event.pointerId);
|
|
126
|
-
|
|
127
104
|
if (this.tracker.trackedPointersCount === 0) {
|
|
128
105
|
if (this.state === State.ACTIVE) {
|
|
129
106
|
this.end();
|
|
@@ -132,44 +109,27 @@ export default class NativeViewGestureHandler extends GestureHandler {
|
|
|
132
109
|
}
|
|
133
110
|
}
|
|
134
111
|
}
|
|
135
|
-
|
|
136
|
-
public shouldRecognizeSimultaneously(handler: GestureHandler): boolean {
|
|
112
|
+
shouldRecognizeSimultaneously(handler) {
|
|
137
113
|
if (super.shouldRecognizeSimultaneously(handler)) {
|
|
138
114
|
return true;
|
|
139
115
|
}
|
|
140
|
-
|
|
141
|
-
if (
|
|
142
|
-
handler instanceof NativeViewGestureHandler &&
|
|
143
|
-
handler.state === State.ACTIVE &&
|
|
144
|
-
handler.disallowsInterruption()
|
|
145
|
-
) {
|
|
116
|
+
if (handler instanceof NativeViewGestureHandler && handler.state === State.ACTIVE && handler.disallowsInterruption()) {
|
|
146
117
|
return false;
|
|
147
118
|
}
|
|
148
|
-
|
|
149
119
|
const canBeInterrupted = !this.disallowInterruption;
|
|
150
|
-
|
|
151
|
-
if (
|
|
152
|
-
this.state === State.ACTIVE &&
|
|
153
|
-
handler.state === State.ACTIVE &&
|
|
154
|
-
canBeInterrupted
|
|
155
|
-
) {
|
|
120
|
+
if (this.state === State.ACTIVE && handler.state === State.ACTIVE && canBeInterrupted) {
|
|
156
121
|
return false;
|
|
157
122
|
}
|
|
158
|
-
|
|
159
|
-
return (
|
|
160
|
-
this.state === State.ACTIVE && canBeInterrupted && handler.handlerTag > 0
|
|
161
|
-
);
|
|
123
|
+
return this.state === State.ACTIVE && canBeInterrupted && handler.handlerTag > 0;
|
|
162
124
|
}
|
|
163
|
-
|
|
164
|
-
public shouldBeCancelledByOther(_handler: GestureHandler): boolean {
|
|
125
|
+
shouldBeCancelledByOther(_handler) {
|
|
165
126
|
return !this.disallowInterruption;
|
|
166
127
|
}
|
|
167
|
-
|
|
168
|
-
public disallowsInterruption(): boolean {
|
|
128
|
+
disallowsInterruption() {
|
|
169
129
|
return this.disallowInterruption;
|
|
170
130
|
}
|
|
171
|
-
|
|
172
|
-
public isButton(): boolean {
|
|
131
|
+
isButton() {
|
|
173
132
|
return this.buttonRole;
|
|
174
133
|
}
|
|
175
134
|
}
|
|
135
|
+
//# sourceMappingURL=NativeViewGestureHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Platform","State","DEFAULT_TOUCH_SLOP","GestureHandler","NativeViewGestureHandler","shouldActivateOnStart","disallowInterruption","startX","startY","minDistSq","init","ref","propsRef","shouldCancelWhenOutside","OS","view","delegate","restoreViewStyles","buttonRole","getAttribute","updateGestureConfig","enabled","props","config","undefined","style","onPointerDown","event","tracker","addToTracker","newPointerAction","tryToSendTouchEvent","onPointerAdd","lastCoords","getAbsoluteCoordsAverage","x","y","state","UNDETERMINED","begin","isRNGHText","hasAttribute","activate","onPointerMove","track","dx","dy","distSq","ACTIVE","cancel","BEGAN","onPointerLeave","onPointerUp","onUp","onPointerRemove","removeFromTracker","pointerId","trackedPointersCount","end","fail","shouldRecognizeSimultaneously","handler","disallowsInterruption","canBeInterrupted","handlerTag","shouldBeCancelledByOther","_handler","isButton"],"sourceRoot":"../../../../src","sources":["web/handlers/NativeViewGestureHandler.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,KAAK,QAAQ,aAAa;AACnC,SAASC,kBAAkB,QAAQ,cAAc;AAGjD,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,eAAe,MAAMC,wBAAwB,SAASD,cAAc,CAAC;EAGnE;EACA;EACQE,qBAAqB,GAAG,KAAK;EAC7BC,oBAAoB,GAAG,KAAK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AC,MAAM;QACL,IAAI,CAACC,IAAI,CAAC,CAAC;MACb;IACF;EACF;EAEOC,6BAA6BA,CAACC,OAAuB,EAAW;IACrE,IAAI,KAAK,CAACD,6BAA6B,CAACC,OAAO,CAAC,EAAE;MAChD,OAAO,IAAI;IACb;IAEA,IACEA,OAAO,YAAYzD,wBAAwB,IAC3CyD,OAAO,CAACxB,KAAK,KAAKpC,KAAK,CAAC+C,MAAM,IAC9Ba,OAAO,CAACC,qBAAqB,CAAC,CAAC,EAC/B;MACA,OAAO,KAAK;IACd;IAEA,MAAMC,gBAAgB,GAAG,CAAC,IAAI,CAACzD,oBAAoB;IAEnD,IACE,IAAI,CAAC+B,KAAK,KAAKpC,KAAK,CAAC+C,MAAM,IAC3Ba,OAAO,CAACxB,KAAK,KAAKpC,KAAK,CAAC+C,MAAM,IAC9Be,gBAAgB,EAChB;MACA,OAAO,KAAK;IACd;IAEA,OACE,IAAI,CAAC1B,KAAK,KAAKpC,KAAK,CAAC+C,MAAM,IAAIe,gBAAgB,IAAIF,OAAO,CAACG,UAAU,GAAG,CAAC;EAE7E;EAEOC,wBAAwBA,CAACC,QAAwB,EAAW;IACjE,OAAO,CAAC,IAAI,CAAC5D,oBAAoB;EACnC;EAEOwD,qBAAqBA,CAAA,EAAY;IACtC,OAAO,IAAI,CAACxD,oBAAoB;EAClC;EAEO6D,QAAQA,CAAA,EAAY;IACzB,OAAO,IAAI,CAACjD,UAAU;EACxB;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import DiscreteGestureHandler from './DiscreteGestureHandler';
|
|
4
|
+
import * as NodeManager from './NodeManager';
|
|
5
|
+
import PressGestureHandler from './PressGestureHandler';
|
|
6
|
+
import { TEST_MIN_IF_NOT_NAN, VEC_LEN_SQ } from './utils';
|
|
7
|
+
class NativeViewGestureHandler extends PressGestureHandler {
|
|
8
|
+
get isNative() {
|
|
9
|
+
return true;
|
|
10
|
+
}
|
|
11
|
+
onRawEvent(ev) {
|
|
12
|
+
super.onRawEvent(ev);
|
|
13
|
+
if (!ev.isFinal) {
|
|
14
|
+
// if (this.ref instanceof ScrollView) {
|
|
15
|
+
if (TEST_MIN_IF_NOT_NAN(VEC_LEN_SQ({
|
|
16
|
+
x: ev.deltaX,
|
|
17
|
+
y: ev.deltaY
|
|
18
|
+
}), 10)) {
|
|
19
|
+
// @ts-ignore FIXME(TS) config type
|
|
20
|
+
if (this.config.disallowInterruption) {
|
|
21
|
+
const gestures = Object.values(NodeManager.getNodes()).filter(gesture => {
|
|
22
|
+
const {
|
|
23
|
+
handlerTag,
|
|
24
|
+
view,
|
|
25
|
+
isGestureRunning
|
|
26
|
+
} = gesture;
|
|
27
|
+
return (
|
|
28
|
+
// Check if this gesture isn't self
|
|
29
|
+
handlerTag !== this.handlerTag &&
|
|
30
|
+
// Ensure the gesture needs to be cancelled
|
|
31
|
+
isGestureRunning &&
|
|
32
|
+
// ScrollView can cancel discrete gestures like taps and presses
|
|
33
|
+
gesture instanceof DiscreteGestureHandler &&
|
|
34
|
+
// Ensure a view exists and is a child of the current view
|
|
35
|
+
view &&
|
|
36
|
+
// @ts-ignore FIXME(TS) view type
|
|
37
|
+
this.view.contains(view)
|
|
38
|
+
);
|
|
39
|
+
});
|
|
40
|
+
// Cancel all of the gestures that passed the filter
|
|
41
|
+
for (const gesture of gestures) {
|
|
42
|
+
// TODO: Bacon: Send some cached event.
|
|
43
|
+
gesture.forceInvalidate(ev);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
export default NativeViewGestureHandler;
|
|
51
|
+
//# sourceMappingURL=NativeViewGestureHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DiscreteGestureHandler","NodeManager","PressGestureHandler","TEST_MIN_IF_NOT_NAN","VEC_LEN_SQ","NativeViewGestureHandler","isNative","onRawEvent","ev","isFinal","x","deltaX","y","deltaY","config","disallowInterruption","gestures","Object","values","getNodes","filter","gesture","handlerTag","view","isGestureRunning","contains","forceInvalidate"],"sourceRoot":"../../../src","sources":["web_hammer/NativeViewGestureHandler.ts"],"mappings":";;AAAA,OAAOA,sBAAsB,MAAM,0BAA0B;AAE7D,OAAO,KAAKC,WAAW,MAAM,eAAe;AAC5C,OAAOC,mBAAmB,MAAM,uBAAuB;AACvD,SAASC,mBAAmB,EAAEC,UAAU,QAAQ,SAAS;AAEzD,MAAMC,wBAAwB,SAASH,mBAAmB,CAAC;EACzD,IAAII,QAAQA,CAAA,EAAG;IACb,OAAO,IAAI;EACb;EAEAC,UAAUA,CAACC,EAAkB,EAAE;IAC7B,KAAK,CAACD,UAAU,CAACC,EAAE,CAAC;IACpB,IAAI,CAACA,EAAE,CAACC,OAAO,EAAE;MACf;MACA,IAAIN,mBAAmB,CAACC,UAAU,CAAC;QAAEM,CAAC,EAAEF,EAAE,CAACG,MAAM;QAAEC,CAAC,EAAEJ,EAAE,CAACK;MAAO,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE;QACvE;QACA,IAAI,IAAI,CAACC,MAAM,CAACC,oBAAoB,EAAE;UACpC,MAAMC,QAAQ,GAAGC,MAAM,CAACC,MAAM,CAACjB,WAAW,CAACkB,QAAQ,CAAC,CAAC,CAAC,CAACC,MAAM,CAC1DC,OAAO,IAAK;YACX,MAAM;cAAEC,UAAU;cAAEC,IAAI;cAAEC;YAAiB,CAAC,GAAGH,OAAO;YACtD;cACE;cACAC,UAAU,KAAK,IAAI,CAACA,UAAU;cAC9B;cACAE,gBAAgB;cAChB;cACAH,OAAO,YAAYrB,sBAAsB;cACzC;cACAuB,IAAI;cACJ;cACA,IAAI,CAACA,IAAI,CAACE,QAAQ,CAACF,IAAI;YAAC;UAE5B,CACF,CAAC;UACD;UACA,KAAK,MAAMF,OAAO,IAAIL,QAAQ,EAAE;YAC9B;YACAK,OAAO,CAACK,eAAe,CAAClB,EAAE,CAAC;UAC7B;QACF;MACF;IACF;EACF;AACF;AAEA,eAAeH,wBAAwB","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
export interface GestureHandlerRootViewProps extends PropsWithChildren<
|
|
3
|
+
import type { RootViewNativeProps } from '../specs/RNGestureHandlerRootViewNativeComponent';
|
|
4
|
+
export interface GestureHandlerRootViewProps extends PropsWithChildren<RootViewNativeProps> {
|
|
5
5
|
}
|
|
6
6
|
export default function GestureHandlerRootView({ style, ...rest }: GestureHandlerRootViewProps): React.JSX.Element;
|
|
7
7
|
//# sourceMappingURL=GestureHandlerRootView.android.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GestureHandlerRootView.android.d.ts","sourceRoot":"","sources":["../../../src/components/GestureHandlerRootView.android.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"GestureHandlerRootView.android.d.ts","sourceRoot":"","sources":["../../../src/components/GestureHandlerRootView.android.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAI1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kDAAkD,CAAC;AAG5F,MAAM,WAAW,2BACf,SAAQ,iBAAiB,CAAC,mBAAmB,CAAC;CAAG;AAEnD,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,EAC7C,KAAK,EACL,GAAG,IAAI,EACR,EAAE,2BAA2B,qBAc7B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
export interface GestureHandlerRootViewProps extends PropsWithChildren<
|
|
3
|
+
import type { RootViewNativeProps } from '../specs/RNGestureHandlerRootViewNativeComponent';
|
|
4
|
+
export interface GestureHandlerRootViewProps extends PropsWithChildren<RootViewNativeProps> {
|
|
5
5
|
}
|
|
6
6
|
export default function GestureHandlerRootView({ style, ...rest }: GestureHandlerRootViewProps): React.JSX.Element;
|
|
7
7
|
//# sourceMappingURL=GestureHandlerRootView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GestureHandlerRootView.d.ts","sourceRoot":"","sources":["../../../src/components/GestureHandlerRootView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"GestureHandlerRootView.d.ts","sourceRoot":"","sources":["../../../src/components/GestureHandlerRootView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAI1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kDAAkD,CAAC;AAE5F,MAAM,WAAW,2BACf,SAAQ,iBAAiB,CAAC,mBAAmB,CAAC;CAAG;AAEnD,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,EAC7C,KAAK,EACL,GAAG,IAAI,EACR,EAAE,2BAA2B,qBAW7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pressable.d.ts","sourceRoot":"","sources":["../../../../src/components/Pressable/Pressable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;AAGf,OAAO,EAEL,cAAc,EAEf,MAAM,kBAAkB,CAAC;AAgC1B,QAAA,MAAM,SAAS,GAAI,OAAO,cAAc,
|
|
1
|
+
{"version":3,"file":"Pressable.d.ts","sourceRoot":"","sources":["../../../../src/components/Pressable/Pressable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;AAGf,OAAO,EAEL,cAAc,EAEf,MAAM,kBAAkB,CAAC;AAgC1B,QAAA,MAAM,SAAS,GAAI,OAAO,cAAc,sBAoWvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -4,7 +4,8 @@ export declare enum StateMachineEvent {
|
|
|
4
4
|
NATIVE_BEGIN = "nativeBegin",
|
|
5
5
|
NATIVE_START = "nativeStart",
|
|
6
6
|
FINALIZE = "finalize",
|
|
7
|
-
LONG_PRESS_TOUCHES_DOWN = "longPressTouchesDown"
|
|
7
|
+
LONG_PRESS_TOUCHES_DOWN = "longPressTouchesDown",
|
|
8
|
+
CANCEL = "cancel"
|
|
8
9
|
}
|
|
9
10
|
export declare function getStatesConfig(handlePressIn: (event: PressableEvent) => void, handlePressOut: (event: PressableEvent) => void): StateDefinition[];
|
|
10
11
|
//# sourceMappingURL=stateDefinitions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stateDefinitions.d.ts","sourceRoot":"","sources":["../../../../src/components/Pressable/stateDefinitions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,oBAAY,iBAAiB;IAC3B,YAAY,gBAAgB;IAC5B,YAAY,gBAAgB;IAC5B,QAAQ,aAAa;IACrB,uBAAuB,yBAAyB;
|
|
1
|
+
{"version":3,"file":"stateDefinitions.d.ts","sourceRoot":"","sources":["../../../../src/components/Pressable/stateDefinitions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,oBAAY,iBAAiB;IAC3B,YAAY,gBAAgB;IAC5B,YAAY,gBAAgB;IAC5B,QAAQ,aAAa;IACrB,uBAAuB,yBAAyB;IAChD,MAAM,WAAW;CAClB;AAmGD,wBAAgB,eAAe,CAC7B,aAAa,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,EAC9C,cAAc,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,GAC9C,eAAe,EAAE,CAanB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ForwardedRef } from 'react';
|
|
2
|
-
import { SwipeableProps, SwipeableMethods } from '
|
|
2
|
+
import { SwipeableProps, SwipeableMethods } from './ReanimatedSwipeableProps';
|
|
3
3
|
declare const Swipeable: (props: SwipeableProps) => import("react").JSX.Element;
|
|
4
4
|
export default Swipeable;
|
|
5
5
|
export type SwipeableRef = ForwardedRef<SwipeableMethods>;
|