react-native-gesture-handler 2.14.1 → 2.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/RNGestureHandler.podspec +2 -2
- package/android/paper/src/main/java/com/swmansion/gesturehandler/NativeRNGestureHandlerModuleSpec.java +55 -0
- package/android/src/main/java/com/swmansion/gesturehandler/RNGestureHandlerPackage.kt +64 -4
- package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerOrchestrator.kt +12 -2
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.kt +53 -19
- package/{ios → apple}/Handlers/RNFlingHandler.m +25 -5
- package/{ios → apple}/Handlers/RNForceTouchHandler.m +25 -7
- package/{ios → apple}/Handlers/RNHoverHandler.m +26 -1
- package/{ios → apple}/Handlers/RNLongPressHandler.m +24 -4
- package/{ios → apple}/Handlers/RNManualHandler.m +24 -4
- package/{ios → apple}/Handlers/RNNativeViewHandler.mm +42 -6
- package/{ios → apple}/Handlers/RNPanHandler.m +100 -15
- package/apple/Handlers/RNPinchHandler.m +162 -0
- package/{ios → apple}/Handlers/RNRotationHandler.m +71 -9
- package/{ios → apple}/Handlers/RNTapHandler.m +96 -26
- package/apple/RNGHUIKit.h +27 -0
- package/{ios → apple}/RNGestureHandler.h +3 -3
- package/{ios → apple}/RNGestureHandler.m +31 -5
- package/{ios → apple}/RNGestureHandlerButton.h +4 -1
- package/{ios → apple}/RNGestureHandlerButton.m +12 -4
- package/{ios → apple}/RNGestureHandlerButtonManager.m +4 -2
- package/{ios → apple}/RNGestureHandlerEvents.h +1 -1
- package/{ios → apple}/RNGestureHandlerManager.h +2 -2
- package/{ios → apple}/RNGestureHandlerManager.mm +46 -11
- package/apple/RNGestureHandlerModule.h +17 -0
- package/{ios → apple}/RNGestureHandlerModule.mm +46 -60
- package/{ios → apple}/RNGestureHandlerPointerTracker.h +5 -5
- package/{ios → apple}/RNGestureHandlerPointerTracker.m +19 -14
- package/{ios → apple}/RNGestureHandlerRegistry.h +1 -1
- package/{ios → apple}/RNGestureHandlerRegistry.m +1 -1
- package/{ios → apple}/RNManualActivationRecognizer.h +8 -0
- package/{ios → apple}/RNManualActivationRecognizer.m +27 -7
- package/{ios → apple}/RNRootViewGestureRecognizer.m +72 -4
- package/lib/commonjs/RNGestureHandlerModule.js +5 -18
- package/lib/commonjs/RNGestureHandlerModule.js.map +1 -1
- package/lib/commonjs/RNGestureHandlerModule.windows.js +10 -102
- package/lib/commonjs/RNGestureHandlerModule.windows.js.map +1 -1
- package/lib/commonjs/components/DrawerLayout.js +2 -0
- package/lib/commonjs/components/DrawerLayout.js.map +1 -1
- package/lib/commonjs/handlers/gestureHandlerCommon.js +1 -1
- package/lib/commonjs/handlers/gestureHandlerCommon.js.map +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector.js +11 -1
- package/lib/commonjs/handlers/gestures/GestureDetector.js.map +1 -1
- package/lib/commonjs/handlers/gestures/gesture.js +5 -0
- package/lib/commonjs/handlers/gestures/gesture.js.map +1 -1
- package/lib/commonjs/index.js +8 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/specs/NativeRNGestureHandlerModule.js +13 -0
- package/lib/commonjs/specs/NativeRNGestureHandlerModule.js.map +1 -0
- package/lib/commonjs/web/handlers/FlingGestureHandler.js +4 -0
- package/lib/commonjs/web/handlers/FlingGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/GestureHandler.js +13 -1
- package/lib/commonjs/web/handlers/GestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/LongPressGestureHandler.js +8 -6
- package/lib/commonjs/web/handlers/LongPressGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/PanGestureHandler.js +4 -0
- package/lib/commonjs/web/handlers/PanGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/TapGestureHandler.js +4 -0
- package/lib/commonjs/web/handlers/TapGestureHandler.js.map +1 -1
- package/lib/commonjs/web/interfaces.js +12 -14
- package/lib/commonjs/web/interfaces.js.map +1 -1
- package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js +35 -0
- package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js.map +1 -1
- package/lib/commonjs/web/tools/NodeManager.js +3 -2
- package/lib/commonjs/web/tools/NodeManager.js.map +1 -1
- package/lib/commonjs/web/tools/PointerEventManager.js +11 -3
- package/lib/commonjs/web/tools/PointerEventManager.js.map +1 -1
- package/lib/commonjs/web/tools/TouchEventManager.js +0 -1
- package/lib/commonjs/web/tools/TouchEventManager.js.map +1 -1
- package/lib/module/RNGestureHandlerModule.js +4 -18
- package/lib/module/RNGestureHandlerModule.js.map +1 -1
- package/lib/module/RNGestureHandlerModule.windows.js +10 -81
- package/lib/module/RNGestureHandlerModule.windows.js.map +1 -1
- package/lib/module/components/DrawerLayout.js +2 -0
- package/lib/module/components/DrawerLayout.js.map +1 -1
- package/lib/module/handlers/gestureHandlerCommon.js +1 -1
- package/lib/module/handlers/gestureHandlerCommon.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector.js +11 -1
- package/lib/module/handlers/gestures/GestureDetector.js.map +1 -1
- package/lib/module/handlers/gestures/gesture.js +5 -0
- package/lib/module/handlers/gestures/gesture.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/specs/NativeRNGestureHandlerModule.js +3 -0
- package/lib/module/specs/NativeRNGestureHandlerModule.js.map +1 -0
- package/lib/module/web/handlers/FlingGestureHandler.js +4 -0
- package/lib/module/web/handlers/FlingGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/GestureHandler.js +14 -2
- package/lib/module/web/handlers/GestureHandler.js.map +1 -1
- package/lib/module/web/handlers/LongPressGestureHandler.js +8 -5
- package/lib/module/web/handlers/LongPressGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/PanGestureHandler.js +4 -0
- package/lib/module/web/handlers/PanGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/TapGestureHandler.js +4 -0
- package/lib/module/web/handlers/TapGestureHandler.js.map +1 -1
- package/lib/module/web/interfaces.js +9 -11
- package/lib/module/web/interfaces.js.map +1 -1
- package/lib/module/web/tools/GestureHandlerWebDelegate.js +34 -0
- package/lib/module/web/tools/GestureHandlerWebDelegate.js.map +1 -1
- package/lib/module/web/tools/NodeManager.js +3 -2
- package/lib/module/web/tools/NodeManager.js.map +1 -1
- package/lib/module/web/tools/PointerEventManager.js +12 -4
- package/lib/module/web/tools/PointerEventManager.js.map +1 -1
- package/lib/module/web/tools/TouchEventManager.js +1 -2
- package/lib/module/web/tools/TouchEventManager.js.map +1 -1
- package/lib/typescript/RNGestureHandlerModule.d.ts +2 -13
- package/lib/typescript/RNGestureHandlerModule.windows.d.ts +5 -21
- package/lib/typescript/components/DrawerLayout.d.ts +11 -0
- package/lib/typescript/handlers/NativeViewGestureHandler.d.ts +1 -1
- package/lib/typescript/handlers/PanGestureHandler.d.ts +1 -1
- package/lib/typescript/handlers/gestureHandlerCommon.d.ts +4 -1
- package/lib/typescript/handlers/gestures/GestureDetector.d.ts +2 -1
- package/lib/typescript/handlers/gestures/gesture.d.ts +2 -0
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/specs/NativeRNGestureHandlerModule.d.ts +14 -0
- package/lib/typescript/web/handlers/GestureHandler.d.ts +3 -1
- package/lib/typescript/web/interfaces.d.ts +9 -9
- package/lib/typescript/web/tools/GestureHandlerDelegate.d.ts +2 -0
- package/lib/typescript/web/tools/GestureHandlerWebDelegate.d.ts +7 -0
- package/lib/typescript/web/tools/PointerEventManager.d.ts +2 -0
- package/package.json +14 -11
- package/src/RNGestureHandlerModule.ts +4 -49
- package/src/RNGestureHandlerModule.windows.ts +18 -100
- package/src/components/DrawerLayout.tsx +15 -0
- package/src/handlers/gestureHandlerCommon.ts +5 -0
- package/src/handlers/gestures/GestureDetector.tsx +16 -2
- package/src/handlers/gestures/gesture.ts +6 -0
- package/src/index.ts +1 -0
- package/src/specs/NativeRNGestureHandlerModule.ts +26 -0
- package/src/web/handlers/FlingGestureHandler.ts +4 -0
- package/src/web/handlers/GestureHandler.ts +17 -0
- package/src/web/handlers/LongPressGestureHandler.ts +8 -5
- package/src/web/handlers/PanGestureHandler.ts +4 -0
- package/src/web/handlers/TapGestureHandler.ts +4 -0
- package/src/web/interfaces.ts +10 -10
- package/src/web/tools/GestureHandlerDelegate.ts +3 -0
- package/src/web/tools/GestureHandlerWebDelegate.ts +39 -0
- package/src/web/tools/NodeManager.ts +5 -1
- package/src/web/tools/PointerEventManager.ts +18 -2
- package/src/web/tools/TouchEventManager.ts +0 -2
- package/ios/Handlers/RNPinchHandler.m +0 -95
- package/ios/RNGestureHandlerModule.h +0 -7
- package/lib/commonjs/RNGestureHandlerModule.macos.js +0 -149
- package/lib/commonjs/RNGestureHandlerModule.macos.js.map +0 -1
- package/lib/module/RNGestureHandlerModule.macos.js +0 -110
- package/lib/module/RNGestureHandlerModule.macos.js.map +0 -1
- package/lib/typescript/RNGestureHandlerModule.macos.d.ts +0 -47
- package/src/RNGestureHandlerModule.macos.ts +0 -133
- /package/{ios → apple}/Handlers/RNFlingHandler.h +0 -0
- /package/{ios → apple}/Handlers/RNForceTouchHandler.h +0 -0
- /package/{ios → apple}/Handlers/RNHoverHandler.h +0 -0
- /package/{ios → apple}/Handlers/RNLongPressHandler.h +0 -0
- /package/{ios → apple}/Handlers/RNManualHandler.h +0 -0
- /package/{ios → apple}/Handlers/RNNativeViewHandler.h +0 -0
- /package/{ios → apple}/Handlers/RNPanHandler.h +0 -0
- /package/{ios → apple}/Handlers/RNPinchHandler.h +0 -0
- /package/{ios → apple}/Handlers/RNRotationHandler.h +0 -0
- /package/{ios → apple}/Handlers/RNTapHandler.h +0 -0
- /package/{ios → apple}/RNGHTouchEventType.h +0 -0
- /package/{ios → apple}/RNGestureHandler.xcodeproj/project.pbxproj +0 -0
- /package/{ios → apple}/RNGestureHandler.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -0
- /package/{ios → apple}/RNGestureHandlerActionType.h +0 -0
- /package/{ios → apple}/RNGestureHandlerButtonComponentView.h +0 -0
- /package/{ios → apple}/RNGestureHandlerButtonComponentView.mm +0 -0
- /package/{ios → apple}/RNGestureHandlerButtonManager.h +0 -0
- /package/{ios → apple}/RNGestureHandlerDirection.h +0 -0
- /package/{ios → apple}/RNGestureHandlerEvents.m +0 -0
- /package/{ios → apple}/RNGestureHandlerRootViewComponentView.mm +0 -0
- /package/{ios → apple}/RNGestureHandlerState.h +0 -0
- /package/{ios → apple}/RNGestureHandlerStateManager.h +0 -0
- /package/{ios → apple}/RNRootViewGestureRecognizer.h +0 -0
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { isNewWebImplementationEnabled } from './EnableNewWebImplementation'; //GestureHandlers
|
|
2
|
-
|
|
3
|
-
import InteractionManager from './web/tools/InteractionManager';
|
|
4
|
-
import NodeManager from './web/tools/NodeManager';
|
|
5
|
-
import PanGestureHandler from './web/handlers/PanGestureHandler';
|
|
6
|
-
import TapGestureHandler from './web/handlers/TapGestureHandler';
|
|
7
|
-
import LongPressGestureHandler from './web/handlers/LongPressGestureHandler';
|
|
8
|
-
import PinchGestureHandler from './web/handlers/PinchGestureHandler';
|
|
9
|
-
import RotationGestureHandler from './web/handlers/RotationGestureHandler';
|
|
10
|
-
import FlingGestureHandler from './web/handlers/FlingGestureHandler';
|
|
11
|
-
import NativeViewGestureHandler from './web/handlers/NativeViewGestureHandler';
|
|
12
|
-
import ManualGestureHandler from './web/handlers/ManualGestureHandler'; //Hammer Handlers
|
|
13
|
-
|
|
14
|
-
import * as HammerNodeManager from './web_hammer/NodeManager';
|
|
15
|
-
import HammerNativeViewGestureHandler from './web_hammer/NativeViewGestureHandler';
|
|
16
|
-
import HammerPanGestureHandler from './web_hammer/PanGestureHandler';
|
|
17
|
-
import HammerTapGestureHandler from './web_hammer/TapGestureHandler';
|
|
18
|
-
import HammerLongPressGestureHandler from './web_hammer/LongPressGestureHandler';
|
|
19
|
-
import HammerPinchGestureHandler from './web_hammer/PinchGestureHandler';
|
|
20
|
-
import HammerRotationGestureHandler from './web_hammer/RotationGestureHandler';
|
|
21
|
-
import HammerFlingGestureHandler from './web_hammer/FlingGestureHandler';
|
|
22
|
-
import { GestureHandlerWebDelegate } from './web/tools/GestureHandlerWebDelegate';
|
|
23
|
-
export const Gestures = {
|
|
24
|
-
NativeViewGestureHandler,
|
|
25
|
-
PanGestureHandler,
|
|
26
|
-
TapGestureHandler,
|
|
27
|
-
LongPressGestureHandler,
|
|
28
|
-
PinchGestureHandler,
|
|
29
|
-
RotationGestureHandler,
|
|
30
|
-
FlingGestureHandler,
|
|
31
|
-
ManualGestureHandler
|
|
32
|
-
};
|
|
33
|
-
export const HammerGestures = {
|
|
34
|
-
NativeViewGestureHandler: HammerNativeViewGestureHandler,
|
|
35
|
-
PanGestureHandler: HammerPanGestureHandler,
|
|
36
|
-
TapGestureHandler: HammerTapGestureHandler,
|
|
37
|
-
LongPressGestureHandler: HammerLongPressGestureHandler,
|
|
38
|
-
PinchGestureHandler: HammerPinchGestureHandler,
|
|
39
|
-
RotationGestureHandler: HammerRotationGestureHandler,
|
|
40
|
-
FlingGestureHandler: HammerFlingGestureHandler
|
|
41
|
-
};
|
|
42
|
-
export default {
|
|
43
|
-
handleSetJSResponder(_tag, _blockNativeResponder) {// NO-OP
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
handleClearJSResponder() {// NO-OP
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
createGestureHandler(handlerName, handlerTag, config) {
|
|
50
|
-
if (isNewWebImplementationEnabled()) {
|
|
51
|
-
if (!(handlerName in Gestures)) {
|
|
52
|
-
throw new Error(`react-native-gesture-handler: ${handlerName} is not supported on web.`);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
const GestureClass = Gestures[handlerName];
|
|
56
|
-
NodeManager.createGestureHandler(handlerTag, new GestureClass(new GestureHandlerWebDelegate()));
|
|
57
|
-
InteractionManager.getInstance().configureInteractions(NodeManager.getHandler(handlerTag), config);
|
|
58
|
-
} else {
|
|
59
|
-
if (!(handlerName in HammerGestures)) {
|
|
60
|
-
throw new Error(`react-native-gesture-handler: ${handlerName} is not supported on web.`);
|
|
61
|
-
} // @ts-ignore If it doesn't exist, the error is thrown
|
|
62
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
const GestureClass = HammerGestures[handlerName]; // eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
|
66
|
-
|
|
67
|
-
HammerNodeManager.createGestureHandler(handlerTag, new GestureClass());
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
this.updateGestureHandler(handlerTag, config);
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
attachGestureHandler(handlerTag, newView, _actionType, propsRef) {
|
|
74
|
-
if (isNewWebImplementationEnabled()) {
|
|
75
|
-
NodeManager.getHandler(handlerTag).init(newView, propsRef);
|
|
76
|
-
} else {
|
|
77
|
-
HammerNodeManager.getHandler(handlerTag).setView(newView, propsRef);
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
updateGestureHandler(handlerTag, newConfig) {
|
|
82
|
-
if (isNewWebImplementationEnabled()) {
|
|
83
|
-
NodeManager.getHandler(handlerTag).updateGestureConfig(newConfig);
|
|
84
|
-
InteractionManager.getInstance().configureInteractions(NodeManager.getHandler(handlerTag), newConfig);
|
|
85
|
-
} else {
|
|
86
|
-
HammerNodeManager.getHandler(handlerTag).updateGestureConfig(newConfig);
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
|
|
90
|
-
getGestureHandlerNode(handlerTag) {
|
|
91
|
-
if (isNewWebImplementationEnabled()) {
|
|
92
|
-
return NodeManager.getHandler(handlerTag);
|
|
93
|
-
} else {
|
|
94
|
-
return HammerNodeManager.getHandler(handlerTag);
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
|
|
98
|
-
dropGestureHandler(handlerTag) {
|
|
99
|
-
if (isNewWebImplementationEnabled()) {
|
|
100
|
-
NodeManager.dropGestureHandler(handlerTag);
|
|
101
|
-
} else {
|
|
102
|
-
HammerNodeManager.dropGestureHandler(handlerTag);
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
|
|
106
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
107
|
-
flushOperations() {}
|
|
108
|
-
|
|
109
|
-
};
|
|
110
|
-
//# sourceMappingURL=RNGestureHandlerModule.macos.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["RNGestureHandlerModule.macos.ts"],"names":["isNewWebImplementationEnabled","InteractionManager","NodeManager","PanGestureHandler","TapGestureHandler","LongPressGestureHandler","PinchGestureHandler","RotationGestureHandler","FlingGestureHandler","NativeViewGestureHandler","ManualGestureHandler","HammerNodeManager","HammerNativeViewGestureHandler","HammerPanGestureHandler","HammerTapGestureHandler","HammerLongPressGestureHandler","HammerPinchGestureHandler","HammerRotationGestureHandler","HammerFlingGestureHandler","GestureHandlerWebDelegate","Gestures","HammerGestures","handleSetJSResponder","_tag","_blockNativeResponder","handleClearJSResponder","createGestureHandler","handlerName","handlerTag","config","Error","GestureClass","getInstance","configureInteractions","getHandler","updateGestureHandler","attachGestureHandler","newView","_actionType","propsRef","init","setView","newConfig","updateGestureConfig","getGestureHandlerNode","dropGestureHandler","flushOperations"],"mappings":"AACA,SAASA,6BAAT,QAA8C,8BAA9C,C,CAEA;;AACA,OAAOC,kBAAP,MAA+B,gCAA/B;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,iBAAP,MAA8B,kCAA9B;AACA,OAAOC,iBAAP,MAA8B,kCAA9B;AACA,OAAOC,uBAAP,MAAoC,wCAApC;AACA,OAAOC,mBAAP,MAAgC,oCAAhC;AACA,OAAOC,sBAAP,MAAmC,uCAAnC;AACA,OAAOC,mBAAP,MAAgC,oCAAhC;AACA,OAAOC,wBAAP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MAAAA,kBAAkB,CAAC+B,WAAnB,GAAiCC,qBAAjC,CACE/B,WAAW,CAACgC,UAAZ,CAAuBN,UAAvB,CADF,EAEEc,SAFF;AAID,KAPD,MAOO;AACL/B,MAAAA,iBAAiB,CAACuB,UAAlB,CAA6BN,UAA7B,EAAyCe,mBAAzC,CAA6DD,SAA7D;AACD;AACF,GAnEY;;AAoEbE,EAAAA,qBAAqB,CAAChB,UAAD,EAAqB;AACxC,QAAI5B,6BAA6B,EAAjC,EAAqC;AACnC,aAAOE,WAAW,CAACgC,UAAZ,CAAuBN,UAAvB,CAAP;AACD,KAFD,MAEO;AACL,aAAOjB,iBAAiB,CAACuB,UAAlB,CAA6BN,UAA7B,CAAP;AACD;AACF,GA1EY;;AA2EbiB,EAAAA,kBAAkB,CAACjB,UAAD,EAAqB;AACrC,QAAI5B,6BAA6B,EAAjC,EAAqC;AACnCE,MAAAA,WAAW,CAAC2C,kBAAZ,CAA+BjB,UAA/B;AACD,KAFD,MAEO;AACLjB,MAAAA,iBAAiB,CAACkC,kBAAlB,CAAqCjB,UAArC;AACD;AACF,GAjFY;;AAkFb;AACAkB,EAAAA,eAAe,GAAG,CAAE;;AAnFP,CAAf","sourcesContent":["import { ActionType } from './ActionType';\nimport { isNewWebImplementationEnabled } from './EnableNewWebImplementation';\n\n//GestureHandlers\nimport InteractionManager from './web/tools/InteractionManager';\nimport NodeManager from './web/tools/NodeManager';\nimport PanGestureHandler from './web/handlers/PanGestureHandler';\nimport TapGestureHandler from './web/handlers/TapGestureHandler';\nimport LongPressGestureHandler from './web/handlers/LongPressGestureHandler';\nimport PinchGestureHandler from './web/handlers/PinchGestureHandler';\nimport RotationGestureHandler from './web/handlers/RotationGestureHandler';\nimport FlingGestureHandler from './web/handlers/FlingGestureHandler';\nimport NativeViewGestureHandler from './web/handlers/NativeViewGestureHandler';\nimport ManualGestureHandler from './web/handlers/ManualGestureHandler';\n\n//Hammer Handlers\nimport * as HammerNodeManager from './web_hammer/NodeManager';\nimport HammerNativeViewGestureHandler from './web_hammer/NativeViewGestureHandler';\nimport HammerPanGestureHandler from './web_hammer/PanGestureHandler';\nimport HammerTapGestureHandler from './web_hammer/TapGestureHandler';\nimport HammerLongPressGestureHandler from './web_hammer/LongPressGestureHandler';\nimport HammerPinchGestureHandler from './web_hammer/PinchGestureHandler';\nimport HammerRotationGestureHandler from './web_hammer/RotationGestureHandler';\nimport HammerFlingGestureHandler from './web_hammer/FlingGestureHandler';\nimport { Config } from './web/interfaces';\nimport { GestureHandlerWebDelegate } from './web/tools/GestureHandlerWebDelegate';\n\nexport const Gestures = {\n NativeViewGestureHandler,\n PanGestureHandler,\n TapGestureHandler,\n LongPressGestureHandler,\n PinchGestureHandler,\n RotationGestureHandler,\n FlingGestureHandler,\n ManualGestureHandler,\n};\n\nexport const HammerGestures = {\n NativeViewGestureHandler: HammerNativeViewGestureHandler,\n PanGestureHandler: HammerPanGestureHandler,\n TapGestureHandler: HammerTapGestureHandler,\n LongPressGestureHandler: HammerLongPressGestureHandler,\n PinchGestureHandler: HammerPinchGestureHandler,\n RotationGestureHandler: HammerRotationGestureHandler,\n FlingGestureHandler: HammerFlingGestureHandler,\n};\n\nexport default {\n handleSetJSResponder(_tag: number, _blockNativeResponder: boolean) {\n // NO-OP\n },\n handleClearJSResponder() {\n // NO-OP\n },\n createGestureHandler<T>(\n handlerName: keyof typeof Gestures,\n handlerTag: number,\n config: T\n ) {\n if (isNewWebImplementationEnabled()) {\n if (!(handlerName in Gestures)) {\n throw new Error(\n `react-native-gesture-handler: ${handlerName} is not supported on web.`\n );\n }\n\n const GestureClass = Gestures[handlerName];\n NodeManager.createGestureHandler(\n handlerTag,\n new GestureClass(new GestureHandlerWebDelegate())\n );\n InteractionManager.getInstance().configureInteractions(\n NodeManager.getHandler(handlerTag),\n config as unknown as Config\n );\n } else {\n if (!(handlerName in HammerGestures)) {\n throw new Error(\n `react-native-gesture-handler: ${handlerName} is not supported on web.`\n );\n }\n\n // @ts-ignore If it doesn't exist, the error is thrown\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const GestureClass = HammerGestures[handlerName];\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n HammerNodeManager.createGestureHandler(handlerTag, new GestureClass());\n }\n\n this.updateGestureHandler(handlerTag, config as unknown as Config);\n },\n attachGestureHandler(\n handlerTag: number,\n newView: number,\n _actionType: ActionType,\n propsRef: React.RefObject<unknown>\n ) {\n if (isNewWebImplementationEnabled()) {\n NodeManager.getHandler(handlerTag).init(newView, propsRef);\n } else {\n HammerNodeManager.getHandler(handlerTag).setView(newView, propsRef);\n }\n },\n updateGestureHandler(handlerTag: number, newConfig: Config) {\n if (isNewWebImplementationEnabled()) {\n NodeManager.getHandler(handlerTag).updateGestureConfig(newConfig);\n\n InteractionManager.getInstance().configureInteractions(\n NodeManager.getHandler(handlerTag),\n newConfig\n );\n } else {\n HammerNodeManager.getHandler(handlerTag).updateGestureConfig(newConfig);\n }\n },\n getGestureHandlerNode(handlerTag: number) {\n if (isNewWebImplementationEnabled()) {\n return NodeManager.getHandler(handlerTag);\n } else {\n return HammerNodeManager.getHandler(handlerTag);\n }\n },\n dropGestureHandler(handlerTag: number) {\n if (isNewWebImplementationEnabled()) {\n NodeManager.dropGestureHandler(handlerTag);\n } else {\n HammerNodeManager.dropGestureHandler(handlerTag);\n }\n },\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n flushOperations() {},\n};\n"]}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { ActionType } from './ActionType';
|
|
2
|
-
import PanGestureHandler from './web/handlers/PanGestureHandler';
|
|
3
|
-
import TapGestureHandler from './web/handlers/TapGestureHandler';
|
|
4
|
-
import LongPressGestureHandler from './web/handlers/LongPressGestureHandler';
|
|
5
|
-
import PinchGestureHandler from './web/handlers/PinchGestureHandler';
|
|
6
|
-
import RotationGestureHandler from './web/handlers/RotationGestureHandler';
|
|
7
|
-
import FlingGestureHandler from './web/handlers/FlingGestureHandler';
|
|
8
|
-
import NativeViewGestureHandler from './web/handlers/NativeViewGestureHandler';
|
|
9
|
-
import ManualGestureHandler from './web/handlers/ManualGestureHandler';
|
|
10
|
-
import HammerNativeViewGestureHandler from './web_hammer/NativeViewGestureHandler';
|
|
11
|
-
import HammerPanGestureHandler from './web_hammer/PanGestureHandler';
|
|
12
|
-
import HammerTapGestureHandler from './web_hammer/TapGestureHandler';
|
|
13
|
-
import HammerLongPressGestureHandler from './web_hammer/LongPressGestureHandler';
|
|
14
|
-
import HammerPinchGestureHandler from './web_hammer/PinchGestureHandler';
|
|
15
|
-
import HammerRotationGestureHandler from './web_hammer/RotationGestureHandler';
|
|
16
|
-
import HammerFlingGestureHandler from './web_hammer/FlingGestureHandler';
|
|
17
|
-
import { Config } from './web/interfaces';
|
|
18
|
-
export declare const Gestures: {
|
|
19
|
-
NativeViewGestureHandler: typeof NativeViewGestureHandler;
|
|
20
|
-
PanGestureHandler: typeof PanGestureHandler;
|
|
21
|
-
TapGestureHandler: typeof TapGestureHandler;
|
|
22
|
-
LongPressGestureHandler: typeof LongPressGestureHandler;
|
|
23
|
-
PinchGestureHandler: typeof PinchGestureHandler;
|
|
24
|
-
RotationGestureHandler: typeof RotationGestureHandler;
|
|
25
|
-
FlingGestureHandler: typeof FlingGestureHandler;
|
|
26
|
-
ManualGestureHandler: typeof ManualGestureHandler;
|
|
27
|
-
};
|
|
28
|
-
export declare const HammerGestures: {
|
|
29
|
-
NativeViewGestureHandler: typeof HammerNativeViewGestureHandler;
|
|
30
|
-
PanGestureHandler: typeof HammerPanGestureHandler;
|
|
31
|
-
TapGestureHandler: typeof HammerTapGestureHandler;
|
|
32
|
-
LongPressGestureHandler: typeof HammerLongPressGestureHandler;
|
|
33
|
-
PinchGestureHandler: typeof HammerPinchGestureHandler;
|
|
34
|
-
RotationGestureHandler: typeof HammerRotationGestureHandler;
|
|
35
|
-
FlingGestureHandler: typeof HammerFlingGestureHandler;
|
|
36
|
-
};
|
|
37
|
-
declare const _default: {
|
|
38
|
-
handleSetJSResponder(_tag: number, _blockNativeResponder: boolean): void;
|
|
39
|
-
handleClearJSResponder(): void;
|
|
40
|
-
createGestureHandler<T>(handlerName: keyof typeof Gestures, handlerTag: number, config: T): void;
|
|
41
|
-
attachGestureHandler(handlerTag: number, newView: number, _actionType: ActionType, propsRef: React.RefObject<unknown>): void;
|
|
42
|
-
updateGestureHandler(handlerTag: number, newConfig: Config): void;
|
|
43
|
-
getGestureHandlerNode(handlerTag: number): NativeViewGestureHandler | PanGestureHandler | TapGestureHandler | LongPressGestureHandler | PinchGestureHandler | RotationGestureHandler | FlingGestureHandler | ManualGestureHandler | import("./web/handlers/HoverGestureHandler").default | HammerNativeViewGestureHandler | HammerPanGestureHandler | HammerTapGestureHandler | HammerLongPressGestureHandler | HammerPinchGestureHandler | HammerRotationGestureHandler | HammerFlingGestureHandler;
|
|
44
|
-
dropGestureHandler(handlerTag: number): void;
|
|
45
|
-
flushOperations(): void;
|
|
46
|
-
};
|
|
47
|
-
export default _default;
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import { ActionType } from './ActionType';
|
|
2
|
-
import { isNewWebImplementationEnabled } from './EnableNewWebImplementation';
|
|
3
|
-
|
|
4
|
-
//GestureHandlers
|
|
5
|
-
import InteractionManager from './web/tools/InteractionManager';
|
|
6
|
-
import NodeManager from './web/tools/NodeManager';
|
|
7
|
-
import PanGestureHandler from './web/handlers/PanGestureHandler';
|
|
8
|
-
import TapGestureHandler from './web/handlers/TapGestureHandler';
|
|
9
|
-
import LongPressGestureHandler from './web/handlers/LongPressGestureHandler';
|
|
10
|
-
import PinchGestureHandler from './web/handlers/PinchGestureHandler';
|
|
11
|
-
import RotationGestureHandler from './web/handlers/RotationGestureHandler';
|
|
12
|
-
import FlingGestureHandler from './web/handlers/FlingGestureHandler';
|
|
13
|
-
import NativeViewGestureHandler from './web/handlers/NativeViewGestureHandler';
|
|
14
|
-
import ManualGestureHandler from './web/handlers/ManualGestureHandler';
|
|
15
|
-
|
|
16
|
-
//Hammer Handlers
|
|
17
|
-
import * as HammerNodeManager from './web_hammer/NodeManager';
|
|
18
|
-
import HammerNativeViewGestureHandler from './web_hammer/NativeViewGestureHandler';
|
|
19
|
-
import HammerPanGestureHandler from './web_hammer/PanGestureHandler';
|
|
20
|
-
import HammerTapGestureHandler from './web_hammer/TapGestureHandler';
|
|
21
|
-
import HammerLongPressGestureHandler from './web_hammer/LongPressGestureHandler';
|
|
22
|
-
import HammerPinchGestureHandler from './web_hammer/PinchGestureHandler';
|
|
23
|
-
import HammerRotationGestureHandler from './web_hammer/RotationGestureHandler';
|
|
24
|
-
import HammerFlingGestureHandler from './web_hammer/FlingGestureHandler';
|
|
25
|
-
import { Config } from './web/interfaces';
|
|
26
|
-
import { GestureHandlerWebDelegate } from './web/tools/GestureHandlerWebDelegate';
|
|
27
|
-
|
|
28
|
-
export const Gestures = {
|
|
29
|
-
NativeViewGestureHandler,
|
|
30
|
-
PanGestureHandler,
|
|
31
|
-
TapGestureHandler,
|
|
32
|
-
LongPressGestureHandler,
|
|
33
|
-
PinchGestureHandler,
|
|
34
|
-
RotationGestureHandler,
|
|
35
|
-
FlingGestureHandler,
|
|
36
|
-
ManualGestureHandler,
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export const HammerGestures = {
|
|
40
|
-
NativeViewGestureHandler: HammerNativeViewGestureHandler,
|
|
41
|
-
PanGestureHandler: HammerPanGestureHandler,
|
|
42
|
-
TapGestureHandler: HammerTapGestureHandler,
|
|
43
|
-
LongPressGestureHandler: HammerLongPressGestureHandler,
|
|
44
|
-
PinchGestureHandler: HammerPinchGestureHandler,
|
|
45
|
-
RotationGestureHandler: HammerRotationGestureHandler,
|
|
46
|
-
FlingGestureHandler: HammerFlingGestureHandler,
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export default {
|
|
50
|
-
handleSetJSResponder(_tag: number, _blockNativeResponder: boolean) {
|
|
51
|
-
// NO-OP
|
|
52
|
-
},
|
|
53
|
-
handleClearJSResponder() {
|
|
54
|
-
// NO-OP
|
|
55
|
-
},
|
|
56
|
-
createGestureHandler<T>(
|
|
57
|
-
handlerName: keyof typeof Gestures,
|
|
58
|
-
handlerTag: number,
|
|
59
|
-
config: T
|
|
60
|
-
) {
|
|
61
|
-
if (isNewWebImplementationEnabled()) {
|
|
62
|
-
if (!(handlerName in Gestures)) {
|
|
63
|
-
throw new Error(
|
|
64
|
-
`react-native-gesture-handler: ${handlerName} is not supported on web.`
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
const GestureClass = Gestures[handlerName];
|
|
69
|
-
NodeManager.createGestureHandler(
|
|
70
|
-
handlerTag,
|
|
71
|
-
new GestureClass(new GestureHandlerWebDelegate())
|
|
72
|
-
);
|
|
73
|
-
InteractionManager.getInstance().configureInteractions(
|
|
74
|
-
NodeManager.getHandler(handlerTag),
|
|
75
|
-
config as unknown as Config
|
|
76
|
-
);
|
|
77
|
-
} else {
|
|
78
|
-
if (!(handlerName in HammerGestures)) {
|
|
79
|
-
throw new Error(
|
|
80
|
-
`react-native-gesture-handler: ${handlerName} is not supported on web.`
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
// @ts-ignore If it doesn't exist, the error is thrown
|
|
85
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
86
|
-
const GestureClass = HammerGestures[handlerName];
|
|
87
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
|
88
|
-
HammerNodeManager.createGestureHandler(handlerTag, new GestureClass());
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
this.updateGestureHandler(handlerTag, config as unknown as Config);
|
|
92
|
-
},
|
|
93
|
-
attachGestureHandler(
|
|
94
|
-
handlerTag: number,
|
|
95
|
-
newView: number,
|
|
96
|
-
_actionType: ActionType,
|
|
97
|
-
propsRef: React.RefObject<unknown>
|
|
98
|
-
) {
|
|
99
|
-
if (isNewWebImplementationEnabled()) {
|
|
100
|
-
NodeManager.getHandler(handlerTag).init(newView, propsRef);
|
|
101
|
-
} else {
|
|
102
|
-
HammerNodeManager.getHandler(handlerTag).setView(newView, propsRef);
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
updateGestureHandler(handlerTag: number, newConfig: Config) {
|
|
106
|
-
if (isNewWebImplementationEnabled()) {
|
|
107
|
-
NodeManager.getHandler(handlerTag).updateGestureConfig(newConfig);
|
|
108
|
-
|
|
109
|
-
InteractionManager.getInstance().configureInteractions(
|
|
110
|
-
NodeManager.getHandler(handlerTag),
|
|
111
|
-
newConfig
|
|
112
|
-
);
|
|
113
|
-
} else {
|
|
114
|
-
HammerNodeManager.getHandler(handlerTag).updateGestureConfig(newConfig);
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
getGestureHandlerNode(handlerTag: number) {
|
|
118
|
-
if (isNewWebImplementationEnabled()) {
|
|
119
|
-
return NodeManager.getHandler(handlerTag);
|
|
120
|
-
} else {
|
|
121
|
-
return HammerNodeManager.getHandler(handlerTag);
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
dropGestureHandler(handlerTag: number) {
|
|
125
|
-
if (isNewWebImplementationEnabled()) {
|
|
126
|
-
NodeManager.dropGestureHandler(handlerTag);
|
|
127
|
-
} else {
|
|
128
|
-
HammerNodeManager.dropGestureHandler(handlerTag);
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
132
|
-
flushOperations() {},
|
|
133
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|