react-native-gesture-handler 2.16.0 → 2.16.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -0
- package/lib/commonjs/RNGestureHandlerModule.js +97 -4
- package/lib/commonjs/RNGestureHandlerModule.js.map +1 -1
- package/lib/commonjs/RNGestureHandlerModule.native.js +16 -0
- package/lib/commonjs/RNGestureHandlerModule.native.js.map +1 -0
- package/lib/commonjs/RNRenderer.js +5 -10
- package/lib/commonjs/RNRenderer.js.map +1 -1
- package/lib/commonjs/RNRenderer.native.js +16 -0
- package/lib/commonjs/RNRenderer.native.js.map +1 -0
- package/lib/commonjs/components/GestureComponents.js +19 -82
- package/lib/commonjs/components/GestureComponents.js.map +1 -1
- package/lib/commonjs/components/GestureComponents.native.js +115 -0
- package/lib/commonjs/components/GestureComponents.native.js.map +1 -0
- package/lib/commonjs/components/GestureHandlerButton.js +13 -3
- package/lib/commonjs/components/GestureHandlerButton.js.map +1 -1
- package/lib/commonjs/components/GestureHandlerButton.native.js +14 -0
- package/lib/commonjs/components/GestureHandlerButton.native.js.map +1 -0
- package/lib/commonjs/components/GestureHandlerRootView.js +0 -6
- package/lib/commonjs/components/GestureHandlerRootView.js.map +1 -1
- package/lib/commonjs/components/{GestureHandlerRootView.web.js → GestureHandlerRootView.native.js} +7 -1
- package/lib/commonjs/components/GestureHandlerRootView.native.js.map +1 -0
- package/lib/commonjs/getReactNativeVersion.js +1 -12
- package/lib/commonjs/getReactNativeVersion.js.map +1 -1
- package/lib/commonjs/getReactNativeVersion.native.js +22 -0
- package/lib/commonjs/getReactNativeVersion.native.js.map +1 -0
- package/lib/commonjs/getShadowNodeFromRef.js +5 -34
- package/lib/commonjs/getShadowNodeFromRef.js.map +1 -1
- package/lib/commonjs/getShadowNodeFromRef.native.js +44 -0
- package/lib/commonjs/getShadowNodeFromRef.native.js.map +1 -0
- package/lib/commonjs/handlers/PanGestureHandler.js.map +1 -1
- package/lib/commonjs/handlers/PressabilityDebugView.js +5 -7
- package/lib/commonjs/handlers/PressabilityDebugView.js.map +1 -1
- package/lib/commonjs/handlers/PressabilityDebugView.native.js +14 -0
- package/lib/commonjs/handlers/PressabilityDebugView.native.js.map +1 -0
- package/lib/commonjs/handlers/createHandler.js +9 -3
- package/lib/commonjs/handlers/createHandler.js.map +1 -1
- package/lib/commonjs/handlers/customDirectEventTypes.js +5 -8
- package/lib/commonjs/handlers/customDirectEventTypes.js.map +1 -1
- package/lib/commonjs/handlers/customDirectEventTypes.native.js +14 -0
- package/lib/commonjs/handlers/customDirectEventTypes.native.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector.js +15 -0
- package/lib/commonjs/handlers/gestures/GestureDetector.js.map +1 -1
- package/lib/commonjs/handlers/gestures/flingGesture.js +13 -0
- package/lib/commonjs/handlers/gestures/flingGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/forceTouchGesture.js +17 -0
- package/lib/commonjs/handlers/gestures/forceTouchGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/gesture.js +135 -0
- package/lib/commonjs/handlers/gestures/gesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/gestureObjects.js +66 -0
- package/lib/commonjs/handlers/gestures/gestureObjects.js.map +1 -1
- package/lib/commonjs/handlers/gestures/gestureStateManager.web.js +1 -1
- package/lib/commonjs/handlers/gestures/gestureStateManager.web.js.map +1 -1
- package/lib/commonjs/handlers/gestures/hoverGesture.js +1 -1
- package/lib/commonjs/handlers/gestures/hoverGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/longPressGesture.js +12 -0
- package/lib/commonjs/handlers/gestures/longPressGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/nativeGesture.js +10 -0
- package/lib/commonjs/handlers/gestures/nativeGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/panGesture.js +76 -0
- package/lib/commonjs/handlers/gestures/panGesture.js.map +1 -1
- package/lib/commonjs/handlers/gestures/tapGesture.js +42 -0
- package/lib/commonjs/handlers/gestures/tapGesture.js.map +1 -1
- package/lib/commonjs/utils.js +5 -1
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/commonjs/web/handlers/GestureHandler.js +7 -7
- package/lib/commonjs/web/handlers/GestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/PanGestureHandler.js +3 -1
- package/lib/commonjs/web/handlers/PanGestureHandler.js.map +1 -1
- package/lib/commonjs/web/interfaces.js.map +1 -1
- package/lib/module/RNGestureHandlerModule.js +84 -4
- package/lib/module/RNGestureHandlerModule.js.map +1 -1
- package/lib/module/RNGestureHandlerModule.native.js +5 -0
- package/lib/module/RNGestureHandlerModule.native.js.map +1 -0
- package/lib/module/RNRenderer.js +3 -3
- package/lib/module/RNRenderer.js.map +1 -1
- package/lib/module/RNRenderer.native.js +4 -0
- package/lib/module/RNRenderer.native.js.map +1 -0
- package/lib/module/components/GestureComponents.js +18 -80
- package/lib/module/components/GestureComponents.js.map +1 -1
- package/lib/module/components/GestureComponents.native.js +90 -0
- package/lib/module/components/GestureComponents.native.js.map +1 -0
- package/lib/module/components/GestureHandlerButton.js +8 -2
- package/lib/module/components/GestureHandlerButton.js.map +1 -1
- package/lib/module/components/GestureHandlerButton.native.js +3 -0
- package/lib/module/components/GestureHandlerButton.native.js.map +1 -0
- package/lib/module/components/GestureHandlerRootView.js +0 -5
- package/lib/module/components/GestureHandlerRootView.js.map +1 -1
- package/lib/module/components/{GestureHandlerRootView.web.js → GestureHandlerRootView.native.js} +6 -1
- package/lib/module/components/GestureHandlerRootView.native.js.map +1 -0
- package/lib/module/getReactNativeVersion.js +1 -7
- package/lib/module/getReactNativeVersion.js.map +1 -1
- package/lib/module/getReactNativeVersion.native.js +10 -0
- package/lib/module/getReactNativeVersion.native.js.map +1 -0
- package/lib/module/getShadowNodeFromRef.js +4 -33
- package/lib/module/getShadowNodeFromRef.js.map +1 -1
- package/lib/module/getShadowNodeFromRef.native.js +37 -0
- package/lib/module/getShadowNodeFromRef.native.js.map +1 -0
- package/lib/module/handlers/PanGestureHandler.js.map +1 -1
- package/lib/module/handlers/PressabilityDebugView.js +4 -2
- package/lib/module/handlers/PressabilityDebugView.js.map +1 -1
- package/lib/module/handlers/PressabilityDebugView.native.js +3 -0
- package/lib/module/handlers/PressabilityDebugView.native.js.map +1 -0
- package/lib/module/handlers/createHandler.js +9 -3
- package/lib/module/handlers/createHandler.js.map +1 -1
- package/lib/module/handlers/customDirectEventTypes.js +4 -2
- package/lib/module/handlers/customDirectEventTypes.js.map +1 -1
- package/lib/module/handlers/customDirectEventTypes.native.js +3 -0
- package/lib/module/handlers/customDirectEventTypes.native.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector.js +15 -0
- package/lib/module/handlers/gestures/GestureDetector.js.map +1 -1
- package/lib/module/handlers/gestures/flingGesture.js +13 -0
- package/lib/module/handlers/gestures/flingGesture.js.map +1 -1
- package/lib/module/handlers/gestures/forceTouchGesture.js +17 -0
- package/lib/module/handlers/gestures/forceTouchGesture.js.map +1 -1
- package/lib/module/handlers/gestures/gesture.js +135 -0
- package/lib/module/handlers/gestures/gesture.js.map +1 -1
- package/lib/module/handlers/gestures/gestureObjects.js +67 -0
- package/lib/module/handlers/gestures/gestureObjects.js.map +1 -1
- package/lib/module/handlers/gestures/gestureStateManager.web.js +1 -1
- package/lib/module/handlers/gestures/gestureStateManager.web.js.map +1 -1
- package/lib/module/handlers/gestures/hoverGesture.js +1 -1
- package/lib/module/handlers/gestures/hoverGesture.js.map +1 -1
- package/lib/module/handlers/gestures/longPressGesture.js +12 -0
- package/lib/module/handlers/gestures/longPressGesture.js.map +1 -1
- package/lib/module/handlers/gestures/nativeGesture.js +10 -0
- package/lib/module/handlers/gestures/nativeGesture.js.map +1 -1
- package/lib/module/handlers/gestures/panGesture.js +76 -0
- package/lib/module/handlers/gestures/panGesture.js.map +1 -1
- package/lib/module/handlers/gestures/tapGesture.js +42 -0
- package/lib/module/handlers/gestures/tapGesture.js.map +1 -1
- package/lib/module/utils.js +5 -1
- package/lib/module/utils.js.map +1 -1
- package/lib/module/web/handlers/GestureHandler.js +7 -7
- package/lib/module/web/handlers/GestureHandler.js.map +1 -1
- package/lib/module/web/handlers/PanGestureHandler.js +3 -1
- package/lib/module/web/handlers/PanGestureHandler.js.map +1 -1
- package/lib/module/web/interfaces.js.map +1 -1
- package/lib/typescript/RNGestureHandlerModule.d.ts +15 -2
- package/lib/typescript/RNGestureHandlerModule.native.d.ts +2 -0
- package/lib/typescript/RNRenderer.d.ts +3 -1
- package/lib/typescript/RNRenderer.native.d.ts +1 -0
- package/lib/typescript/components/GestureComponents.d.ts +7 -21
- package/lib/typescript/components/GestureComponents.native.d.ts +22 -0
- package/lib/typescript/components/GestureHandlerButton.d.ts +3 -3
- package/lib/typescript/components/GestureHandlerButton.native.d.ts +4 -0
- package/lib/typescript/getReactNativeVersion.d.ts +1 -4
- package/lib/typescript/getReactNativeVersion.native.d.ts +4 -0
- package/lib/typescript/getShadowNodeFromRef.d.ts +1 -1
- package/lib/typescript/getShadowNodeFromRef.native.d.ts +1 -0
- package/lib/typescript/handlers/PanGestureHandler.d.ts +4 -4
- package/lib/typescript/handlers/PressabilityDebugView.d.ts +1 -1
- package/lib/typescript/handlers/PressabilityDebugView.native.d.ts +1 -0
- package/lib/typescript/handlers/customDirectEventTypes.d.ts +2 -1
- package/lib/typescript/handlers/customDirectEventTypes.native.d.ts +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector.d.ts +36 -0
- package/lib/typescript/handlers/gestures/flingGesture.d.ts +11 -0
- package/lib/typescript/handlers/gestures/forceTouchGesture.d.ts +14 -0
- package/lib/typescript/handlers/gestures/gesture.d.ts +113 -0
- package/lib/typescript/handlers/gestures/gestureObjects.d.ts +57 -0
- package/lib/typescript/handlers/gestures/hoverGesture.d.ts +1 -1
- package/lib/typescript/handlers/gestures/longPressGesture.d.ts +10 -0
- package/lib/typescript/handlers/gestures/nativeGesture.d.ts +8 -0
- package/lib/typescript/handlers/gestures/panGesture.d.ts +67 -4
- package/lib/typescript/handlers/gestures/tapGesture.d.ts +35 -0
- package/lib/typescript/web/handlers/GestureHandler.d.ts +2 -2
- package/lib/typescript/web/handlers/IGestureHandler.d.ts +1 -1
- package/lib/typescript/web/interfaces.d.ts +1 -0
- package/package.json +3 -2
- package/src/RNGestureHandlerModule.native.ts +5 -0
- package/src/RNGestureHandlerModule.ts +104 -4
- package/src/RNRenderer.native.ts +3 -0
- package/src/RNRenderer.ts +3 -3
- package/src/components/GestureComponents.native.tsx +148 -0
- package/src/components/GestureComponents.tsx +24 -131
- package/src/components/GestureHandlerButton.native.tsx +5 -0
- package/src/components/GestureHandlerButton.tsx +5 -4
- package/src/components/{GestureHandlerRootView.web.tsx → GestureHandlerRootView.native.tsx} +6 -0
- package/src/components/GestureHandlerRootView.tsx +0 -6
- package/src/getReactNativeVersion.native.ts +11 -0
- package/src/getReactNativeVersion.ts +1 -9
- package/src/getShadowNodeFromRef.native.ts +44 -0
- package/src/getShadowNodeFromRef.ts +4 -41
- package/src/handlers/PanGestureHandler.ts +8 -4
- package/src/handlers/PressabilityDebugView.native.tsx +2 -0
- package/src/handlers/PressabilityDebugView.tsx +4 -2
- package/src/handlers/createHandler.tsx +14 -10
- package/src/handlers/customDirectEventTypes.native.ts +2 -0
- package/src/handlers/customDirectEventTypes.ts +5 -2
- package/src/handlers/gestures/GestureDetector.tsx +47 -4
- package/src/handlers/gestures/flingGesture.ts +11 -0
- package/src/handlers/gestures/forceTouchGesture.ts +14 -0
- package/src/handlers/gestures/gesture.ts +113 -0
- package/src/handlers/gestures/gestureObjects.ts +57 -0
- package/src/handlers/gestures/gestureStateManager.web.ts +1 -1
- package/src/handlers/gestures/hoverGesture.ts +1 -1
- package/src/handlers/gestures/longPressGesture.ts +10 -0
- package/src/handlers/gestures/nativeGesture.ts +8 -0
- package/src/handlers/gestures/panGesture.ts +75 -4
- package/src/handlers/gestures/tapGesture.ts +35 -0
- package/src/utils.ts +9 -2
- package/src/web/handlers/GestureHandler.ts +9 -9
- package/src/web/handlers/IGestureHandler.ts +1 -1
- package/src/web/handlers/PanGestureHandler.ts +4 -0
- package/src/web/interfaces.ts +1 -0
- package/lib/commonjs/RNGestureHandlerModule.web.js +0 -109
- package/lib/commonjs/RNGestureHandlerModule.web.js.map +0 -1
- package/lib/commonjs/RNRenderer.web.js +0 -11
- package/lib/commonjs/RNRenderer.web.js.map +0 -1
- package/lib/commonjs/components/GestureComponents.web.js +0 -52
- package/lib/commonjs/components/GestureComponents.web.js.map +0 -1
- package/lib/commonjs/components/GestureHandlerButton.web.js +0 -24
- package/lib/commonjs/components/GestureHandlerButton.web.js.map +0 -1
- package/lib/commonjs/components/GestureHandlerRootView.web.js.map +0 -1
- package/lib/commonjs/getReactNativeVersion.web.js +0 -11
- package/lib/commonjs/getReactNativeVersion.web.js.map +0 -1
- package/lib/commonjs/getShadowNodeFromRef.web.js +0 -15
- package/lib/commonjs/getShadowNodeFromRef.web.js.map +0 -1
- package/lib/commonjs/handlers/PressabilityDebugView.web.js +0 -12
- package/lib/commonjs/handlers/PressabilityDebugView.web.js.map +0 -1
- package/lib/commonjs/handlers/customDirectEventTypes.web.js +0 -11
- package/lib/commonjs/handlers/customDirectEventTypes.web.js.map +0 -1
- package/lib/module/RNGestureHandlerModule.web.js +0 -85
- package/lib/module/RNGestureHandlerModule.web.js.map +0 -1
- package/lib/module/RNRenderer.web.js +0 -4
- package/lib/module/RNRenderer.web.js.map +0 -1
- package/lib/module/components/GestureComponents.web.js +0 -28
- package/lib/module/components/GestureComponents.web.js.map +0 -1
- package/lib/module/components/GestureHandlerButton.web.js +0 -9
- package/lib/module/components/GestureHandlerButton.web.js.map +0 -1
- package/lib/module/components/GestureHandlerRootView.web.js.map +0 -1
- package/lib/module/getReactNativeVersion.web.js +0 -4
- package/lib/module/getReactNativeVersion.web.js.map +0 -1
- package/lib/module/getShadowNodeFromRef.web.js +0 -8
- package/lib/module/getShadowNodeFromRef.web.js.map +0 -1
- package/lib/module/handlers/PressabilityDebugView.web.js +0 -5
- package/lib/module/handlers/PressabilityDebugView.web.js.map +0 -1
- package/lib/module/handlers/customDirectEventTypes.web.js +0 -5
- package/lib/module/handlers/customDirectEventTypes.web.js.map +0 -1
- package/lib/typescript/RNGestureHandlerModule.web.d.ts +0 -15
- package/lib/typescript/RNRenderer.web.d.ts +0 -3
- package/lib/typescript/components/GestureComponents.web.d.ts +0 -8
- package/lib/typescript/components/GestureHandlerButton.web.d.ts +0 -4
- package/lib/typescript/getReactNativeVersion.web.d.ts +0 -1
- package/lib/typescript/getShadowNodeFromRef.web.d.ts +0 -1
- package/lib/typescript/handlers/PressabilityDebugView.web.d.ts +0 -1
- package/lib/typescript/handlers/customDirectEventTypes.web.d.ts +0 -2
- package/src/RNGestureHandlerModule.web.ts +0 -105
- package/src/RNRenderer.web.ts +0 -3
- package/src/components/GestureComponents.web.tsx +0 -41
- package/src/components/GestureHandlerButton.web.tsx +0 -6
- package/src/getReactNativeVersion.web.ts +0 -3
- package/src/getShadowNodeFromRef.web.ts +0 -7
- package/src/handlers/PressabilityDebugView.web.tsx +0 -4
- package/src/handlers/customDirectEventTypes.web.ts +0 -5
- /package/lib/typescript/components/{GestureHandlerRootView.web.d.ts → GestureHandlerRootView.native.d.ts} +0 -0
package/README.md
CHANGED
@@ -5,12 +5,105 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.default = void 0;
|
7
7
|
|
8
|
-
var
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
9
|
+
|
10
|
+
var _EnableNewWebImplementation = require("./EnableNewWebImplementation");
|
11
|
+
|
12
|
+
var _Gestures = require("./web/Gestures");
|
13
|
+
|
14
|
+
var _InteractionManager = _interopRequireDefault(require("./web/tools/InteractionManager"));
|
15
|
+
|
16
|
+
var _NodeManager = _interopRequireDefault(require("./web/tools/NodeManager"));
|
17
|
+
|
18
|
+
var HammerNodeManager = _interopRequireWildcard(require("./web_hammer/NodeManager"));
|
19
|
+
|
20
|
+
var _GestureHandlerWebDelegate = require("./web/tools/GestureHandlerWebDelegate");
|
21
|
+
|
22
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
23
|
+
|
24
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
9
25
|
|
10
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11
27
|
|
12
|
-
|
13
|
-
|
14
|
-
|
28
|
+
var _default = {
|
29
|
+
handleSetJSResponder(tag, blockNativeResponder) {
|
30
|
+
console.warn('handleSetJSResponder: ', tag, blockNativeResponder);
|
31
|
+
},
|
32
|
+
|
33
|
+
handleClearJSResponder() {
|
34
|
+
console.warn('handleClearJSResponder: ');
|
35
|
+
},
|
36
|
+
|
37
|
+
createGestureHandler(handlerName, handlerTag, config) {
|
38
|
+
if ((0, _EnableNewWebImplementation.isNewWebImplementationEnabled)()) {
|
39
|
+
if (!(handlerName in _Gestures.Gestures)) {
|
40
|
+
throw new Error(`react-native-gesture-handler: ${handlerName} is not supported on web.`);
|
41
|
+
}
|
42
|
+
|
43
|
+
const GestureClass = _Gestures.Gestures[handlerName];
|
44
|
+
|
45
|
+
_NodeManager.default.createGestureHandler(handlerTag, new GestureClass(new _GestureHandlerWebDelegate.GestureHandlerWebDelegate()));
|
46
|
+
|
47
|
+
_InteractionManager.default.getInstance().configureInteractions(_NodeManager.default.getHandler(handlerTag), config);
|
48
|
+
} else {
|
49
|
+
if (!(handlerName in _Gestures.HammerGestures)) {
|
50
|
+
throw new Error(`react-native-gesture-handler: ${handlerName} is not supported on web.`);
|
51
|
+
} // @ts-ignore If it doesn't exist, the error is thrown
|
52
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
53
|
+
|
54
|
+
|
55
|
+
const GestureClass = _Gestures.HammerGestures[handlerName]; // eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
56
|
+
|
57
|
+
HammerNodeManager.createGestureHandler(handlerTag, new GestureClass());
|
58
|
+
}
|
59
|
+
|
60
|
+
this.updateGestureHandler(handlerTag, config);
|
61
|
+
},
|
62
|
+
|
63
|
+
attachGestureHandler(handlerTag, // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
64
|
+
newView, _actionType, propsRef) {
|
65
|
+
if (!(newView instanceof HTMLElement || newView instanceof _react.default.Component)) {
|
66
|
+
return;
|
67
|
+
}
|
68
|
+
|
69
|
+
if ((0, _EnableNewWebImplementation.isNewWebImplementationEnabled)()) {
|
70
|
+
//@ts-ignore Types should be HTMLElement or React.Component
|
71
|
+
_NodeManager.default.getHandler(handlerTag).init(newView, propsRef);
|
72
|
+
} else {
|
73
|
+
//@ts-ignore Types should be HTMLElement or React.Component
|
74
|
+
HammerNodeManager.getHandler(handlerTag).setView(newView, propsRef);
|
75
|
+
}
|
76
|
+
},
|
77
|
+
|
78
|
+
updateGestureHandler(handlerTag, newConfig) {
|
79
|
+
if ((0, _EnableNewWebImplementation.isNewWebImplementationEnabled)()) {
|
80
|
+
_NodeManager.default.getHandler(handlerTag).updateGestureConfig(newConfig);
|
81
|
+
|
82
|
+
_InteractionManager.default.getInstance().configureInteractions(_NodeManager.default.getHandler(handlerTag), newConfig);
|
83
|
+
} else {
|
84
|
+
HammerNodeManager.getHandler(handlerTag).updateGestureConfig(newConfig);
|
85
|
+
}
|
86
|
+
},
|
87
|
+
|
88
|
+
getGestureHandlerNode(handlerTag) {
|
89
|
+
if ((0, _EnableNewWebImplementation.isNewWebImplementationEnabled)()) {
|
90
|
+
return _NodeManager.default.getHandler(handlerTag);
|
91
|
+
} else {
|
92
|
+
return HammerNodeManager.getHandler(handlerTag);
|
93
|
+
}
|
94
|
+
},
|
95
|
+
|
96
|
+
dropGestureHandler(handlerTag) {
|
97
|
+
if ((0, _EnableNewWebImplementation.isNewWebImplementationEnabled)()) {
|
98
|
+
_NodeManager.default.dropGestureHandler(handlerTag);
|
99
|
+
} else {
|
100
|
+
HammerNodeManager.dropGestureHandler(handlerTag);
|
101
|
+
}
|
102
|
+
},
|
103
|
+
|
104
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
105
|
+
flushOperations() {}
|
106
|
+
|
107
|
+
};
|
15
108
|
exports.default = _default;
|
16
109
|
//# sourceMappingURL=RNGestureHandlerModule.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["RNGestureHandlerModule.ts"],"names":["
|
1
|
+
{"version":3,"sources":["RNGestureHandlerModule.ts"],"names":["handleSetJSResponder","tag","blockNativeResponder","console","warn","handleClearJSResponder","createGestureHandler","handlerName","handlerTag","config","Gestures","Error","GestureClass","NodeManager","GestureHandlerWebDelegate","InteractionManager","getInstance","configureInteractions","getHandler","HammerGestures","HammerNodeManager","updateGestureHandler","attachGestureHandler","newView","_actionType","propsRef","HTMLElement","React","Component","init","setView","newConfig","updateGestureConfig","getGestureHandlerNode","dropGestureHandler","flushOperations"],"mappings":"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","sourcesContent":["import React from 'react';\n\nimport type { ActionType } from './ActionType';\nimport { isNewWebImplementationEnabled } from './EnableNewWebImplementation';\nimport { Gestures, HammerGestures } from './web/Gestures';\nimport type { Config } from './web/interfaces';\nimport InteractionManager from './web/tools/InteractionManager';\nimport NodeManager from './web/tools/NodeManager';\nimport * as HammerNodeManager from './web_hammer/NodeManager';\nimport { GestureHandlerWebDelegate } from './web/tools/GestureHandlerWebDelegate';\n\nexport default {\n handleSetJSResponder(tag: number, blockNativeResponder: boolean) {\n console.warn('handleSetJSResponder: ', tag, blockNativeResponder);\n },\n handleClearJSResponder() {\n console.warn('handleClearJSResponder: ');\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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\n newView: any,\n _actionType: ActionType,\n propsRef: React.RefObject<unknown>\n ) {\n if (\n !(newView instanceof HTMLElement || newView instanceof React.Component)\n ) {\n return;\n }\n\n if (isNewWebImplementationEnabled()) {\n //@ts-ignore Types should be HTMLElement or React.Component\n NodeManager.getHandler(handlerTag).init(newView, propsRef);\n } else {\n //@ts-ignore Types should be HTMLElement or React.Component\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"]}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.default = void 0;
|
7
|
+
|
8
|
+
var _NativeRNGestureHandlerModule = _interopRequireDefault(require("./specs/NativeRNGestureHandlerModule"));
|
9
|
+
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11
|
+
|
12
|
+
// Reexport the native module spec used by codegen. The relevant files are inluded on Android
|
13
|
+
// to ensure the compatibility with the old arch, while iOS doesn't require those at all.
|
14
|
+
var _default = _NativeRNGestureHandlerModule.default;
|
15
|
+
exports.default = _default;
|
16
|
+
//# sourceMappingURL=RNGestureHandlerModule.native.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["RNGestureHandlerModule.native.ts"],"names":["Module"],"mappings":";;;;;;;AAGA;;;;AAHA;AACA;eAGeA,qC","sourcesContent":["// Reexport the native module spec used by codegen. The relevant files are inluded on Android\n// to ensure the compatibility with the old arch, while iOS doesn't require those at all.\n\nimport Module from './specs/NativeRNGestureHandlerModule';\nexport default Module;\n"]}
|
@@ -3,14 +3,9 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
});
|
12
|
-
|
13
|
-
var _ReactNative = _interopRequireDefault(require("react-native/Libraries/Renderer/shims/ReactNative"));
|
14
|
-
|
15
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
6
|
+
exports.RNRenderer = void 0;
|
7
|
+
const RNRenderer = {
|
8
|
+
findHostInstance_DEPRECATED: _ref => null
|
9
|
+
};
|
10
|
+
exports.RNRenderer = RNRenderer;
|
16
11
|
//# sourceMappingURL=RNRenderer.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["RNRenderer.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"sources":["RNRenderer.ts"],"names":["RNRenderer","findHostInstance_DEPRECATED","_ref"],"mappings":";;;;;;AAAO,MAAMA,UAAU,GAAG;AACxBC,EAAAA,2BAA2B,EAAGC,IAAD,IAAe;AADpB,CAAnB","sourcesContent":["export const RNRenderer = {\n findHostInstance_DEPRECATED: (_ref: any) => null,\n};\n"]}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
Object.defineProperty(exports, "RNRenderer", {
|
7
|
+
enumerable: true,
|
8
|
+
get: function () {
|
9
|
+
return _ReactNative.default;
|
10
|
+
}
|
11
|
+
});
|
12
|
+
|
13
|
+
var _ReactNative = _interopRequireDefault(require("react-native/Libraries/Renderer/shims/ReactNative"));
|
14
|
+
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
16
|
+
//# sourceMappingURL=RNRenderer.native.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["RNRenderer.native.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA","sourcesContent":["// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\nexport { default as RNRenderer } from 'react-native/Libraries/Renderer/shims/ReactNative';\n"]}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.FlatList = exports.
|
6
|
+
exports.FlatList = exports.RefreshControl = exports.DrawerLayoutAndroid = exports.TextInput = exports.Switch = exports.ScrollView = void 0;
|
7
7
|
|
8
8
|
var React = _interopRequireWildcard(require("react"));
|
9
9
|
|
@@ -11,10 +11,6 @@ var _reactNative = require("react-native");
|
|
11
11
|
|
12
12
|
var _createNativeWrapper = _interopRequireDefault(require("../handlers/createNativeWrapper"));
|
13
13
|
|
14
|
-
var _NativeViewGestureHandler = require("../handlers/NativeViewGestureHandler");
|
15
|
-
|
16
|
-
var _utils = require("../utils");
|
17
|
-
|
18
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
19
15
|
|
20
16
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
@@ -23,93 +19,34 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
|
|
23
19
|
|
24
20
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
25
21
|
|
26
|
-
const
|
27
|
-
disallowInterruption:
|
28
|
-
shouldCancelWhenOutside: false
|
29
|
-
}); // eslint-disable-next-line @typescript-eslint/no-redeclare
|
30
|
-
|
31
|
-
exports.RefreshControl = RefreshControl;
|
32
|
-
const GHScrollView = (0, _createNativeWrapper.default)(_reactNative.ScrollView, {
|
33
|
-
disallowInterruption: true,
|
34
|
-
shouldCancelWhenOutside: false
|
22
|
+
const ScrollView = (0, _createNativeWrapper.default)(_reactNative.ScrollView, {
|
23
|
+
disallowInterruption: false
|
35
24
|
});
|
36
|
-
const ScrollView = /*#__PURE__*/React.forwardRef((props, ref) => {
|
37
|
-
const refreshControlGestureRef = React.useRef(null);
|
38
|
-
const {
|
39
|
-
refreshControl,
|
40
|
-
waitFor,
|
41
|
-
...rest
|
42
|
-
} = props;
|
43
|
-
return /*#__PURE__*/React.createElement(GHScrollView, _extends({}, rest, {
|
44
|
-
// @ts-ignore `ref` exists on `GHScrollView`
|
45
|
-
ref: ref,
|
46
|
-
waitFor: [...(0, _utils.toArray)(waitFor !== null && waitFor !== void 0 ? waitFor : []), refreshControlGestureRef] // @ts-ignore we don't pass `refreshing` prop as we only want to override the ref
|
47
|
-
,
|
48
|
-
refreshControl: refreshControl ? /*#__PURE__*/React.cloneElement(refreshControl, {
|
49
|
-
// @ts-ignore for reasons unknown to me, `ref` doesn't exist on the type inferred by TS
|
50
|
-
ref: refreshControlGestureRef
|
51
|
-
}) : undefined
|
52
|
-
}));
|
53
|
-
}); // backward type compatibility with https://github.com/software-mansion/react-native-gesture-handler/blob/db78d3ca7d48e8ba57482d3fe9b0a15aa79d9932/react-native-gesture-handler.d.ts#L440-L457
|
54
|
-
// include methods of wrapped components by creating an intersection type with the RN component instead of duplicating them.
|
55
|
-
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
56
|
-
|
57
25
|
exports.ScrollView = ScrollView;
|
58
26
|
const Switch = (0, _createNativeWrapper.default)(_reactNative.Switch, {
|
59
27
|
shouldCancelWhenOutside: false,
|
60
28
|
shouldActivateOnStart: true,
|
61
29
|
disallowInterruption: true
|
62
|
-
});
|
63
|
-
|
30
|
+
});
|
64
31
|
exports.Switch = Switch;
|
65
|
-
const TextInput = (0, _createNativeWrapper.default)(_reactNative.TextInput);
|
66
|
-
|
32
|
+
const TextInput = (0, _createNativeWrapper.default)(_reactNative.TextInput);
|
67
33
|
exports.TextInput = TextInput;
|
68
|
-
const DrawerLayoutAndroid = (0, _createNativeWrapper.default)(_reactNative.DrawerLayoutAndroid, {
|
69
|
-
disallowInterruption: true
|
70
|
-
}); // eslint-disable-next-line @typescript-eslint/no-redeclare
|
71
|
-
|
72
|
-
exports.DrawerLayoutAndroid = DrawerLayoutAndroid;
|
73
|
-
const FlatList = /*#__PURE__*/React.forwardRef((props, ref) => {
|
74
|
-
const refreshControlGestureRef = React.useRef(null);
|
75
|
-
const {
|
76
|
-
waitFor,
|
77
|
-
refreshControl,
|
78
|
-
...rest
|
79
|
-
} = props;
|
80
|
-
const flatListProps = {};
|
81
|
-
const scrollViewProps = {};
|
82
34
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
} else {
|
90
|
-
// @ts-ignore - this function cannot have generic type so we have to ignore this error
|
91
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
92
|
-
flatListProps[propName] = value;
|
93
|
-
}
|
94
|
-
}
|
35
|
+
const DrawerLayoutAndroid = () => {
|
36
|
+
console.warn('DrawerLayoutAndroid is not supported on web!');
|
37
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, null);
|
38
|
+
}; // RefreshControl is implemented as a functional component, rendering a View
|
39
|
+
// NativeViewGestureHandler needs to set a ref on its child, which cannot be done
|
40
|
+
// on functional components
|
95
41
|
|
96
|
-
return (
|
97
|
-
/*#__PURE__*/
|
98
|
-
// @ts-ignore - this function cannot have generic type so we have to ignore this error
|
99
|
-
React.createElement(_reactNative.FlatList, _extends({
|
100
|
-
ref: ref
|
101
|
-
}, flatListProps, {
|
102
|
-
renderScrollComponent: scrollProps => /*#__PURE__*/React.createElement(ScrollView, _extends({}, scrollProps, scrollViewProps, {
|
103
|
-
waitFor: [...(0, _utils.toArray)(waitFor !== null && waitFor !== void 0 ? waitFor : []), refreshControlGestureRef]
|
104
|
-
})) // @ts-ignore we don't pass `refreshing` prop as we only want to override the ref
|
105
|
-
,
|
106
|
-
refreshControl: refreshControl ? /*#__PURE__*/React.cloneElement(refreshControl, {
|
107
|
-
// @ts-ignore for reasons unknown to me, `ref` doesn't exist on the type inferred by TS
|
108
|
-
ref: refreshControlGestureRef
|
109
|
-
}) : undefined
|
110
|
-
}))
|
111
|
-
);
|
112
|
-
}); // eslint-disable-next-line @typescript-eslint/no-redeclare
|
113
42
|
|
43
|
+
exports.DrawerLayoutAndroid = DrawerLayoutAndroid;
|
44
|
+
const RefreshControl = (0, _createNativeWrapper.default)(_reactNative.View);
|
45
|
+
exports.RefreshControl = RefreshControl;
|
46
|
+
const FlatList = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement(_reactNative.FlatList, _extends({
|
47
|
+
ref: ref
|
48
|
+
}, props, {
|
49
|
+
renderScrollComponent: scrollProps => /*#__PURE__*/React.createElement(ScrollView, scrollProps)
|
50
|
+
})));
|
114
51
|
exports.FlatList = FlatList;
|
115
52
|
//# sourceMappingURL=GestureComponents.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["GestureComponents.tsx"],"names":["
|
1
|
+
{"version":3,"sources":["GestureComponents.tsx"],"names":["ScrollView","RNScrollView","disallowInterruption","Switch","RNSwitch","shouldCancelWhenOutside","shouldActivateOnStart","TextInput","RNTextInput","DrawerLayoutAndroid","console","warn","RefreshControl","View","FlatList","React","forwardRef","props","ref","scrollProps"],"mappings":";;;;;;;AAAA;;AACA;;AASA;;;;;;;;;;AAEO,MAAMA,UAAU,GAAG,kCAAoBC,uBAApB,EAAkC;AAC1DC,EAAAA,oBAAoB,EAAE;AADoC,CAAlC,CAAnB;;AAIA,MAAMC,MAAM,GAAG,kCAAoBC,mBAApB,EAA8B;AAClDC,EAAAA,uBAAuB,EAAE,KADyB;AAElDC,EAAAA,qBAAqB,EAAE,IAF2B;AAGlDJ,EAAAA,oBAAoB,EAAE;AAH4B,CAA9B,CAAf;;AAKA,MAAMK,SAAS,GAAG,kCAAoBC,sBAApB,CAAlB;;;AACA,MAAMC,mBAAmB,GAAG,MAAM;AACvCC,EAAAA,OAAO,CAACC,IAAR,CAAa,8CAAb;AACA,sBAAO,oBAAC,iBAAD,OAAP;AACD,CAHM,C,CAKP;AACA;AACA;;;;AACO,MAAMC,cAAc,GAAG,kCAAoBC,iBAApB,CAAvB;;AAEA,MAAMC,QAAQ,gBAAGC,KAAK,CAACC,UAAN,CACtB,CAAoBC,KAApB,EAAiDC,GAAjD,kBACE,oBAAC,qBAAD;AACE,EAAA,GAAG,EAAEA;AADP,GAEMD,KAFN;AAGE,EAAA,qBAAqB,EAAGE,WAAD,iBAAiB,oBAAC,UAAD,EAAgBA,WAAhB;AAH1C,GAFoB,CAAjB","sourcesContent":["import * as React from 'react';\nimport {\n FlatList as RNFlatList,\n Switch as RNSwitch,\n TextInput as RNTextInput,\n ScrollView as RNScrollView,\n FlatListProps,\n View,\n} from 'react-native';\n\nimport createNativeWrapper from '../handlers/createNativeWrapper';\n\nexport const ScrollView = createNativeWrapper(RNScrollView, {\n disallowInterruption: false,\n});\n\nexport const Switch = createNativeWrapper(RNSwitch, {\n shouldCancelWhenOutside: false,\n shouldActivateOnStart: true,\n disallowInterruption: true,\n});\nexport const TextInput = createNativeWrapper(RNTextInput);\nexport const DrawerLayoutAndroid = () => {\n console.warn('DrawerLayoutAndroid is not supported on web!');\n return <View />;\n};\n\n// RefreshControl is implemented as a functional component, rendering a View\n// NativeViewGestureHandler needs to set a ref on its child, which cannot be done\n// on functional components\nexport const RefreshControl = createNativeWrapper(View);\n\nexport const FlatList = React.forwardRef(\n <ItemT extends any>(props: FlatListProps<ItemT>, ref: any) => (\n <RNFlatList\n ref={ref}\n {...props}\n renderScrollComponent={(scrollProps) => <ScrollView {...scrollProps} />}\n />\n )\n);\n"]}
|
@@ -0,0 +1,115 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.FlatList = exports.DrawerLayoutAndroid = exports.TextInput = exports.Switch = exports.ScrollView = exports.RefreshControl = void 0;
|
7
|
+
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
9
|
+
|
10
|
+
var _reactNative = require("react-native");
|
11
|
+
|
12
|
+
var _createNativeWrapper = _interopRequireDefault(require("../handlers/createNativeWrapper"));
|
13
|
+
|
14
|
+
var _NativeViewGestureHandler = require("../handlers/NativeViewGestureHandler");
|
15
|
+
|
16
|
+
var _utils = require("../utils");
|
17
|
+
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
19
|
+
|
20
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
21
|
+
|
22
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
23
|
+
|
24
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
25
|
+
|
26
|
+
const RefreshControl = (0, _createNativeWrapper.default)(_reactNative.RefreshControl, {
|
27
|
+
disallowInterruption: true,
|
28
|
+
shouldCancelWhenOutside: false
|
29
|
+
}); // eslint-disable-next-line @typescript-eslint/no-redeclare
|
30
|
+
|
31
|
+
exports.RefreshControl = RefreshControl;
|
32
|
+
const GHScrollView = (0, _createNativeWrapper.default)(_reactNative.ScrollView, {
|
33
|
+
disallowInterruption: true,
|
34
|
+
shouldCancelWhenOutside: false
|
35
|
+
});
|
36
|
+
const ScrollView = /*#__PURE__*/React.forwardRef((props, ref) => {
|
37
|
+
const refreshControlGestureRef = React.useRef(null);
|
38
|
+
const {
|
39
|
+
refreshControl,
|
40
|
+
waitFor,
|
41
|
+
...rest
|
42
|
+
} = props;
|
43
|
+
return /*#__PURE__*/React.createElement(GHScrollView, _extends({}, rest, {
|
44
|
+
// @ts-ignore `ref` exists on `GHScrollView`
|
45
|
+
ref: ref,
|
46
|
+
waitFor: [...(0, _utils.toArray)(waitFor !== null && waitFor !== void 0 ? waitFor : []), refreshControlGestureRef] // @ts-ignore we don't pass `refreshing` prop as we only want to override the ref
|
47
|
+
,
|
48
|
+
refreshControl: refreshControl ? /*#__PURE__*/React.cloneElement(refreshControl, {
|
49
|
+
// @ts-ignore for reasons unknown to me, `ref` doesn't exist on the type inferred by TS
|
50
|
+
ref: refreshControlGestureRef
|
51
|
+
}) : undefined
|
52
|
+
}));
|
53
|
+
}); // backward type compatibility with https://github.com/software-mansion/react-native-gesture-handler/blob/db78d3ca7d48e8ba57482d3fe9b0a15aa79d9932/react-native-gesture-handler.d.ts#L440-L457
|
54
|
+
// include methods of wrapped components by creating an intersection type with the RN component instead of duplicating them.
|
55
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
56
|
+
|
57
|
+
exports.ScrollView = ScrollView;
|
58
|
+
const Switch = (0, _createNativeWrapper.default)(_reactNative.Switch, {
|
59
|
+
shouldCancelWhenOutside: false,
|
60
|
+
shouldActivateOnStart: true,
|
61
|
+
disallowInterruption: true
|
62
|
+
}); // eslint-disable-next-line @typescript-eslint/no-redeclare
|
63
|
+
|
64
|
+
exports.Switch = Switch;
|
65
|
+
const TextInput = (0, _createNativeWrapper.default)(_reactNative.TextInput); // eslint-disable-next-line @typescript-eslint/no-redeclare
|
66
|
+
|
67
|
+
exports.TextInput = TextInput;
|
68
|
+
const DrawerLayoutAndroid = (0, _createNativeWrapper.default)(_reactNative.DrawerLayoutAndroid, {
|
69
|
+
disallowInterruption: true
|
70
|
+
}); // eslint-disable-next-line @typescript-eslint/no-redeclare
|
71
|
+
|
72
|
+
exports.DrawerLayoutAndroid = DrawerLayoutAndroid;
|
73
|
+
const FlatList = /*#__PURE__*/React.forwardRef((props, ref) => {
|
74
|
+
const refreshControlGestureRef = React.useRef(null);
|
75
|
+
const {
|
76
|
+
waitFor,
|
77
|
+
refreshControl,
|
78
|
+
...rest
|
79
|
+
} = props;
|
80
|
+
const flatListProps = {};
|
81
|
+
const scrollViewProps = {};
|
82
|
+
|
83
|
+
for (const [propName, value] of Object.entries(rest)) {
|
84
|
+
// https://github.com/microsoft/TypeScript/issues/26255
|
85
|
+
if (_NativeViewGestureHandler.nativeViewProps.includes(propName)) {
|
86
|
+
// @ts-ignore - this function cannot have generic type so we have to ignore this error
|
87
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
88
|
+
scrollViewProps[propName] = value;
|
89
|
+
} else {
|
90
|
+
// @ts-ignore - this function cannot have generic type so we have to ignore this error
|
91
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
92
|
+
flatListProps[propName] = value;
|
93
|
+
}
|
94
|
+
}
|
95
|
+
|
96
|
+
return (
|
97
|
+
/*#__PURE__*/
|
98
|
+
// @ts-ignore - this function cannot have generic type so we have to ignore this error
|
99
|
+
React.createElement(_reactNative.FlatList, _extends({
|
100
|
+
ref: ref
|
101
|
+
}, flatListProps, {
|
102
|
+
renderScrollComponent: scrollProps => /*#__PURE__*/React.createElement(ScrollView, _extends({}, scrollProps, scrollViewProps, {
|
103
|
+
waitFor: [...(0, _utils.toArray)(waitFor !== null && waitFor !== void 0 ? waitFor : []), refreshControlGestureRef]
|
104
|
+
})) // @ts-ignore we don't pass `refreshing` prop as we only want to override the ref
|
105
|
+
,
|
106
|
+
refreshControl: refreshControl ? /*#__PURE__*/React.cloneElement(refreshControl, {
|
107
|
+
// @ts-ignore for reasons unknown to me, `ref` doesn't exist on the type inferred by TS
|
108
|
+
ref: refreshControlGestureRef
|
109
|
+
}) : undefined
|
110
|
+
}))
|
111
|
+
);
|
112
|
+
}); // eslint-disable-next-line @typescript-eslint/no-redeclare
|
113
|
+
|
114
|
+
exports.FlatList = FlatList;
|
115
|
+
//# sourceMappingURL=GestureComponents.native.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["GestureComponents.native.tsx"],"names":["RefreshControl","RNRefreshControl","disallowInterruption","shouldCancelWhenOutside","GHScrollView","RNScrollView","ScrollView","React","forwardRef","props","ref","refreshControlGestureRef","useRef","refreshControl","waitFor","rest","cloneElement","undefined","Switch","RNSwitch","shouldActivateOnStart","TextInput","RNTextInput","DrawerLayoutAndroid","RNDrawerLayoutAndroid","FlatList","flatListProps","scrollViewProps","propName","value","Object","entries","nativeViewProps","includes","scrollProps"],"mappings":"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","sourcesContent":["import * as React from 'react';\nimport {\n PropsWithChildren,\n ForwardedRef,\n RefAttributes,\n ReactElement,\n} from 'react';\nimport {\n ScrollView as RNScrollView,\n ScrollViewProps as RNScrollViewProps,\n Switch as RNSwitch,\n SwitchProps as RNSwitchProps,\n TextInput as RNTextInput,\n TextInputProps as RNTextInputProps,\n DrawerLayoutAndroid as RNDrawerLayoutAndroid,\n DrawerLayoutAndroidProps as RNDrawerLayoutAndroidProps,\n FlatList as RNFlatList,\n FlatListProps as RNFlatListProps,\n RefreshControl as RNRefreshControl,\n} from 'react-native';\n\nimport createNativeWrapper from '../handlers/createNativeWrapper';\n\nimport {\n NativeViewGestureHandlerProps,\n nativeViewProps,\n} from '../handlers/NativeViewGestureHandler';\n\nimport { toArray } from '../utils';\n\nexport const RefreshControl = createNativeWrapper(RNRefreshControl, {\n disallowInterruption: true,\n shouldCancelWhenOutside: false,\n});\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type RefreshControl = typeof RefreshControl & RNRefreshControl;\n\nconst GHScrollView = createNativeWrapper<PropsWithChildren<RNScrollViewProps>>(\n RNScrollView,\n {\n disallowInterruption: true,\n shouldCancelWhenOutside: false,\n }\n);\nexport const ScrollView = React.forwardRef<\n RNScrollView,\n RNScrollViewProps & NativeViewGestureHandlerProps\n>((props, ref) => {\n const refreshControlGestureRef = React.useRef<RefreshControl>(null);\n const { refreshControl, waitFor, ...rest } = props;\n\n return (\n <GHScrollView\n {...rest}\n // @ts-ignore `ref` exists on `GHScrollView`\n ref={ref}\n waitFor={[...toArray(waitFor ?? []), refreshControlGestureRef]}\n // @ts-ignore we don't pass `refreshing` prop as we only want to override the ref\n refreshControl={\n refreshControl\n ? React.cloneElement(refreshControl, {\n // @ts-ignore for reasons unknown to me, `ref` doesn't exist on the type inferred by TS\n ref: refreshControlGestureRef,\n })\n : undefined\n }\n />\n );\n});\n// backward type compatibility with https://github.com/software-mansion/react-native-gesture-handler/blob/db78d3ca7d48e8ba57482d3fe9b0a15aa79d9932/react-native-gesture-handler.d.ts#L440-L457\n// include methods of wrapped components by creating an intersection type with the RN component instead of duplicating them.\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type ScrollView = typeof GHScrollView & RNScrollView;\n\nexport const Switch = createNativeWrapper<RNSwitchProps>(RNSwitch, {\n shouldCancelWhenOutside: false,\n shouldActivateOnStart: true,\n disallowInterruption: true,\n});\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type Switch = typeof Switch & RNSwitch;\n\nexport const TextInput = createNativeWrapper<RNTextInputProps>(RNTextInput);\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type TextInput = typeof TextInput & RNTextInput;\n\nexport const DrawerLayoutAndroid = createNativeWrapper<\n PropsWithChildren<RNDrawerLayoutAndroidProps>\n>(RNDrawerLayoutAndroid, { disallowInterruption: true });\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type DrawerLayoutAndroid = typeof DrawerLayoutAndroid &\n RNDrawerLayoutAndroid;\n\nexport const FlatList = React.forwardRef((props, ref) => {\n const refreshControlGestureRef = React.useRef<RefreshControl>(null);\n\n const { waitFor, refreshControl, ...rest } = props;\n\n const flatListProps = {};\n const scrollViewProps = {};\n for (const [propName, value] of Object.entries(rest)) {\n // https://github.com/microsoft/TypeScript/issues/26255\n if ((nativeViewProps as readonly string[]).includes(propName)) {\n // @ts-ignore - this function cannot have generic type so we have to ignore this error\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n scrollViewProps[propName] = value;\n } else {\n // @ts-ignore - this function cannot have generic type so we have to ignore this error\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n flatListProps[propName] = value;\n }\n }\n\n return (\n // @ts-ignore - this function cannot have generic type so we have to ignore this error\n <RNFlatList\n ref={ref}\n {...flatListProps}\n renderScrollComponent={(scrollProps) => (\n <ScrollView\n {...{\n ...scrollProps,\n ...scrollViewProps,\n waitFor: [...toArray(waitFor ?? []), refreshControlGestureRef],\n }}\n />\n )}\n // @ts-ignore we don't pass `refreshing` prop as we only want to override the ref\n refreshControl={\n refreshControl\n ? React.cloneElement(refreshControl, {\n // @ts-ignore for reasons unknown to me, `ref` doesn't exist on the type inferred by TS\n ref: refreshControlGestureRef,\n })\n : undefined\n }\n />\n );\n}) as <ItemT = any>(\n props: PropsWithChildren<\n RNFlatListProps<ItemT> &\n RefAttributes<FlatList<ItemT>> &\n NativeViewGestureHandlerProps\n >,\n ref: ForwardedRef<FlatList<ItemT>>\n) => ReactElement | null;\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type FlatList<ItemT = any> = typeof FlatList & RNFlatList<ItemT>;\n"]}
|
@@ -5,10 +5,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.default = void 0;
|
7
7
|
|
8
|
-
var
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
9
9
|
|
10
|
-
|
10
|
+
var _reactNative = require("react-native");
|
11
|
+
|
12
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
13
|
+
|
14
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
15
|
+
|
16
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
17
|
+
|
18
|
+
var _default = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement(_reactNative.View, _extends({
|
19
|
+
ref: ref,
|
20
|
+
accessibilityRole: "button"
|
21
|
+
}, props)));
|
11
22
|
|
12
|
-
var _default = _RNGestureHandlerButtonNativeComponent.default;
|
13
23
|
exports.default = _default;
|
14
24
|
//# sourceMappingURL=GestureHandlerButton.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["GestureHandlerButton.tsx"],"names":["
|
1
|
+
{"version":3,"sources":["GestureHandlerButton.tsx"],"names":["React","forwardRef","props","ref"],"mappings":";;;;;;;AAAA;;AACA;;;;;;;;4BAEeA,KAAK,CAACC,UAAN,CAAuB,CAACC,KAAD,EAAQC,GAAR,kBACpC,oBAAC,iBAAD;AAAM,EAAA,GAAG,EAAEA,GAAX;AAAgB,EAAA,iBAAiB,EAAC;AAAlC,GAA+CD,KAA/C,EADa,C","sourcesContent":["import * as React from 'react';\nimport { View } from 'react-native';\n\nexport default React.forwardRef<View>((props, ref) => (\n <View ref={ref} accessibilityRole=\"button\" {...props} />\n));\n"]}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.default = void 0;
|
7
|
+
|
8
|
+
var _RNGestureHandlerButtonNativeComponent = _interopRequireDefault(require("../specs/RNGestureHandlerButtonNativeComponent"));
|
9
|
+
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11
|
+
|
12
|
+
var _default = _RNGestureHandlerButtonNativeComponent.default;
|
13
|
+
exports.default = _default;
|
14
|
+
//# sourceMappingURL=GestureHandlerButton.native.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["GestureHandlerButton.native.tsx"],"names":["RNGestureHandlerButtonNativeComponent"],"mappings":";;;;;;;AAEA;;;;eAEeA,8C","sourcesContent":["import { HostComponent } from 'react-native';\nimport { RawButtonProps } from './GestureButtons';\nimport RNGestureHandlerButtonNativeComponent from '../specs/RNGestureHandlerButtonNativeComponent';\n\nexport default RNGestureHandlerButtonNativeComponent as HostComponent<RawButtonProps>;\n"]}
|
@@ -9,8 +9,6 @@ var React = _interopRequireWildcard(require("react"));
|
|
9
9
|
|
10
10
|
var _reactNative = require("react-native");
|
11
11
|
|
12
|
-
var _init = require("../init");
|
13
|
-
|
14
12
|
var _GestureHandlerRootViewContext = _interopRequireDefault(require("../GestureHandlerRootViewContext"));
|
15
13
|
|
16
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
@@ -25,10 +23,6 @@ function GestureHandlerRootView({
|
|
25
23
|
style,
|
26
24
|
...rest
|
27
25
|
}) {
|
28
|
-
// try initialize fabric on the first render, at this point we can
|
29
|
-
// reliably check if fabric is enabled (the function contains a flag
|
30
|
-
// to make sure it's called only once)
|
31
|
-
(0, _init.maybeInitializeFabric)();
|
32
26
|
return /*#__PURE__*/React.createElement(_GestureHandlerRootViewContext.default.Provider, {
|
33
27
|
value: true
|
34
28
|
}, /*#__PURE__*/React.createElement(_reactNative.View, _extends({
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["GestureHandlerRootView.tsx"],"names":["GestureHandlerRootView","style","rest","styles","container","StyleSheet","create","flex"],"mappings":";;;;;;;AAAA;;AAEA;;AACA
|
1
|
+
{"version":3,"sources":["GestureHandlerRootView.tsx"],"names":["GestureHandlerRootView","style","rest","styles","container","StyleSheet","create","flex"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;;;;;;;;;AAKe,SAASA,sBAAT,CAAgC;AAC7CC,EAAAA,KAD6C;AAE7C,KAAGC;AAF0C,CAAhC,EAGiB;AAC9B,sBACE,oBAAC,sCAAD,CAA+B,QAA/B;AAAwC,IAAA,KAAK;AAA7C,kBACE,oBAAC,iBAAD;AAAM,IAAA,KAAK,EAAED,KAAF,aAAEA,KAAF,cAAEA,KAAF,GAAWE,MAAM,CAACC;AAA7B,KAA4CF,IAA5C,EADF,CADF;AAKD;;AAED,MAAMC,MAAM,GAAGE,wBAAWC,MAAX,CAAkB;AAC/BF,EAAAA,SAAS,EAAE;AAAEG,IAAAA,IAAI,EAAE;AAAR;AADoB,CAAlB,CAAf","sourcesContent":["import * as React from 'react';\nimport { PropsWithChildren } from 'react';\nimport { View, ViewProps, StyleSheet } from 'react-native';\nimport GestureHandlerRootViewContext from '../GestureHandlerRootViewContext';\n\nexport interface GestureHandlerRootViewProps\n extends PropsWithChildren<ViewProps> {}\n\nexport default function GestureHandlerRootView({\n style,\n ...rest\n}: GestureHandlerRootViewProps) {\n return (\n <GestureHandlerRootViewContext.Provider value>\n <View style={style ?? styles.container} {...rest} />\n </GestureHandlerRootViewContext.Provider>\n );\n}\n\nconst styles = StyleSheet.create({\n container: { flex: 1 },\n});\n"]}
|
package/lib/commonjs/components/{GestureHandlerRootView.web.js → GestureHandlerRootView.native.js}
RENAMED
@@ -9,6 +9,8 @@ var React = _interopRequireWildcard(require("react"));
|
|
9
9
|
|
10
10
|
var _reactNative = require("react-native");
|
11
11
|
|
12
|
+
var _init = require("../init");
|
13
|
+
|
12
14
|
var _GestureHandlerRootViewContext = _interopRequireDefault(require("../GestureHandlerRootViewContext"));
|
13
15
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
@@ -23,6 +25,10 @@ function GestureHandlerRootView({
|
|
23
25
|
style,
|
24
26
|
...rest
|
25
27
|
}) {
|
28
|
+
// try initialize fabric on the first render, at this point we can
|
29
|
+
// reliably check if fabric is enabled (the function contains a flag
|
30
|
+
// to make sure it's called only once)
|
31
|
+
(0, _init.maybeInitializeFabric)();
|
26
32
|
return /*#__PURE__*/React.createElement(_GestureHandlerRootViewContext.default.Provider, {
|
27
33
|
value: true
|
28
34
|
}, /*#__PURE__*/React.createElement(_reactNative.View, _extends({
|
@@ -35,4 +41,4 @@ const styles = _reactNative.StyleSheet.create({
|
|
35
41
|
flex: 1
|
36
42
|
}
|
37
43
|
});
|
38
|
-
//# sourceMappingURL=GestureHandlerRootView.
|
44
|
+
//# sourceMappingURL=GestureHandlerRootView.native.js.map
|