@hanzogui/native 4.3.1 → 4.4.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/dist/cjs/PressBoundary.cjs +92 -0
- package/dist/cjs/PressBoundary.native.js +105 -0
- package/dist/cjs/PressBoundary.native.js.map +1 -0
- package/dist/cjs/gesture-handler.cjs +36 -0
- package/dist/cjs/gesture-handler.native.js +39 -0
- package/dist/cjs/gesture-handler.native.js.map +1 -0
- package/dist/cjs/gestureState.cjs +94 -5
- package/dist/cjs/gestureState.native.js +98 -13
- package/dist/cjs/gestureState.native.js.map +1 -1
- package/dist/cjs/index.cjs +4 -1
- package/dist/cjs/index.native.js +4 -1
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/setup-gesture-handler.cjs +44 -8
- package/dist/cjs/setup-gesture-handler.native.js +44 -8
- package/dist/cjs/setup-gesture-handler.native.js.map +1 -1
- package/dist/esm/PressBoundary.mjs +56 -0
- package/dist/esm/PressBoundary.mjs.map +1 -0
- package/dist/esm/PressBoundary.native.js +66 -0
- package/dist/esm/PressBoundary.native.js.map +1 -0
- package/dist/esm/gesture-handler.mjs +6 -0
- package/dist/esm/gesture-handler.mjs.map +1 -0
- package/dist/esm/gesture-handler.native.js +6 -0
- package/dist/esm/gesture-handler.native.js.map +1 -0
- package/dist/esm/gestureState.mjs +92 -5
- package/dist/esm/gestureState.mjs.map +1 -1
- package/dist/esm/gestureState.native.js +96 -13
- package/dist/esm/gestureState.native.js.map +1 -1
- package/dist/esm/index.js +2 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +2 -1
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js +2 -1
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/setup-gesture-handler.mjs +17 -8
- package/dist/esm/setup-gesture-handler.mjs.map +1 -1
- package/dist/esm/setup-gesture-handler.native.js +17 -8
- package/dist/esm/setup-gesture-handler.native.js.map +1 -1
- package/gesture-handler/index.cjs +1 -0
- package/gesture-handler/index.js +1 -0
- package/gesture-handler/index.native.cjs +1 -0
- package/gesture-handler/index.native.js +1 -0
- package/gesture-handler.cjs +1 -0
- package/package.json +16 -3
- package/src/PressBoundary.tsx +81 -0
- package/src/gesture-handler.ts +17 -0
- package/src/gestureState.ts +137 -6
- package/src/index.ts +12 -1
- package/src/setup-gesture-handler.ts +38 -11
- package/types/PressBoundary.d.ts +14 -0
- package/types/gesture-handler.d.ts +8 -0
- package/types/gestureState.d.ts +4 -0
- package/types/index.d.ts +3 -1
- package/types/setup-gesture-handler.d.ts +8 -1
- package/.turbo/turbo-build.log +0 -2
- package/types/burntState.d.ts.map +0 -11
- package/types/components.d.ts.map +0 -11
- package/types/gestureState.d.ts.map +0 -11
- package/types/globalState.d.ts.map +0 -11
- package/types/index.d.ts.map +0 -11
- package/types/keyboardControllerState.d.ts.map +0 -11
- package/types/linearGradientState.d.ts.map +0 -11
- package/types/nativeMenuContext.d.ts.map +0 -11
- package/types/portalState.d.ts.map +0 -11
- package/types/safeAreaState.d.ts.map +0 -11
- package/types/setup-burnt.d.ts.map +0 -11
- package/types/setup-expo-linear-gradient.d.ts.map +0 -11
- package/types/setup-gesture-handler.d.ts.map +0 -11
- package/types/setup-keyboard-controller.d.ts.map +0 -11
- package/types/setup-keyboard-controller.web.d.ts.map +0 -11
- package/types/setup-safe-area.d.ts.map +0 -11
- package/types/setup-teleport.d.ts.map +0 -11
- package/types/setup-worklets.d.ts.map +0 -11
- package/types/setup-zeego.d.ts.map +0 -11
- package/types/types.d.ts.map +0 -11
- package/types/workletsState.d.ts.map +0 -11
- package/types/zeegoState.d.ts.map +0 -11
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
28
|
+
value: mod,
|
|
29
|
+
enumerable: true
|
|
30
|
+
}) : target, mod));
|
|
31
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
32
|
+
value: true
|
|
33
|
+
}), mod);
|
|
34
|
+
var PressBoundary_exports = {};
|
|
35
|
+
__export(PressBoundary_exports, {
|
|
36
|
+
PressBoundary: () => PressBoundary
|
|
37
|
+
});
|
|
38
|
+
module.exports = __toCommonJS(PressBoundary_exports);
|
|
39
|
+
var import_react = __toESM(require("react"), 1);
|
|
40
|
+
var import_react_native = require("react-native-web");
|
|
41
|
+
var import_gestureState = require("./gestureState.cjs");
|
|
42
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
43
|
+
function composeFirst(ours, theirs) {
|
|
44
|
+
return (...args) => {
|
|
45
|
+
ours(...args);
|
|
46
|
+
theirs?.(...args);
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function composeLast(theirs, ours) {
|
|
50
|
+
return (...args) => {
|
|
51
|
+
theirs?.(...args);
|
|
52
|
+
ours(...args);
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
const PressBoundary = import_react.default.forwardRef(function PressBoundary2({
|
|
56
|
+
enabled,
|
|
57
|
+
stopPropagation,
|
|
58
|
+
debugName,
|
|
59
|
+
onTouchStart,
|
|
60
|
+
onTouchEnd,
|
|
61
|
+
onTouchCancel,
|
|
62
|
+
onResponderGrant,
|
|
63
|
+
onResponderRelease,
|
|
64
|
+
onResponderTerminate,
|
|
65
|
+
...props
|
|
66
|
+
}, forwardedRef) {
|
|
67
|
+
const tokenRef = import_react.default.useRef(null);
|
|
68
|
+
const isEnabled = enabled ?? stopPropagation ?? true;
|
|
69
|
+
const claim = import_react.default.useCallback(() => {
|
|
70
|
+
if (!isEnabled) return;
|
|
71
|
+
if (tokenRef.current) {
|
|
72
|
+
(0, import_gestureState.releaseExternalPressOwnership)(tokenRef.current, debugName);
|
|
73
|
+
}
|
|
74
|
+
tokenRef.current = (0, import_gestureState.claimExternalPressOwnership)(debugName);
|
|
75
|
+
}, [debugName, isEnabled]);
|
|
76
|
+
const release = import_react.default.useCallback(() => {
|
|
77
|
+
if (!tokenRef.current) return;
|
|
78
|
+
(0, import_gestureState.releaseExternalPressOwnership)(tokenRef.current, debugName);
|
|
79
|
+
tokenRef.current = null;
|
|
80
|
+
}, [debugName]);
|
|
81
|
+
import_react.default.useEffect(() => release, [release]);
|
|
82
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.View, {
|
|
83
|
+
ref: forwardedRef,
|
|
84
|
+
...props,
|
|
85
|
+
onTouchStart: composeFirst(claim, onTouchStart),
|
|
86
|
+
onTouchEnd: composeLast(onTouchEnd, release),
|
|
87
|
+
onTouchCancel: composeLast(onTouchCancel, release),
|
|
88
|
+
onResponderGrant: composeFirst(claim, onResponderGrant),
|
|
89
|
+
onResponderRelease: composeLast(onResponderRelease, release),
|
|
90
|
+
onResponderTerminate: composeLast(onResponderTerminate, release)
|
|
91
|
+
});
|
|
92
|
+
});
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all) __defProp(target, name, {
|
|
11
|
+
get: all[name],
|
|
12
|
+
enumerable: true
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
var __copyProps = (to, from, except, desc) => {
|
|
16
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
17
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
18
|
+
get: () => from[key],
|
|
19
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return to;
|
|
23
|
+
};
|
|
24
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
25
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
26
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
27
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
28
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
29
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
30
|
+
value: mod,
|
|
31
|
+
enumerable: true
|
|
32
|
+
}) : target, mod));
|
|
33
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
34
|
+
value: true
|
|
35
|
+
}), mod);
|
|
36
|
+
var PressBoundary_exports = {};
|
|
37
|
+
__export(PressBoundary_exports, {
|
|
38
|
+
PressBoundary: () => PressBoundary
|
|
39
|
+
});
|
|
40
|
+
module.exports = __toCommonJS(PressBoundary_exports);
|
|
41
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
|
+
var import_react = __toESM(require("react"), 1);
|
|
43
|
+
var import_react_native = require("react-native");
|
|
44
|
+
var import_gestureState = require("./gestureState.native.js");
|
|
45
|
+
function composeFirst(ours, theirs) {
|
|
46
|
+
return function () {
|
|
47
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
48
|
+
args[_key] = arguments[_key];
|
|
49
|
+
}
|
|
50
|
+
ours(...args);
|
|
51
|
+
theirs === null || theirs === void 0 ? void 0 : theirs(...args);
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
function composeLast(theirs, ours) {
|
|
55
|
+
return function () {
|
|
56
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
57
|
+
args[_key] = arguments[_key];
|
|
58
|
+
}
|
|
59
|
+
theirs === null || theirs === void 0 ? void 0 : theirs(...args);
|
|
60
|
+
ours(...args);
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
var PressBoundary = /* @__PURE__ */import_react.default.forwardRef(function PressBoundary2(param, forwardedRef) {
|
|
64
|
+
var {
|
|
65
|
+
enabled,
|
|
66
|
+
stopPropagation,
|
|
67
|
+
debugName,
|
|
68
|
+
onTouchStart,
|
|
69
|
+
onTouchEnd,
|
|
70
|
+
onTouchCancel,
|
|
71
|
+
onResponderGrant,
|
|
72
|
+
onResponderRelease,
|
|
73
|
+
onResponderTerminate,
|
|
74
|
+
...props
|
|
75
|
+
} = param;
|
|
76
|
+
var tokenRef = import_react.default.useRef(null);
|
|
77
|
+
var _ref;
|
|
78
|
+
var isEnabled = (_ref = enabled !== null && enabled !== void 0 ? enabled : stopPropagation) !== null && _ref !== void 0 ? _ref : true;
|
|
79
|
+
var claim = import_react.default.useCallback(function () {
|
|
80
|
+
if (!isEnabled) return;
|
|
81
|
+
if (tokenRef.current) {
|
|
82
|
+
(0, import_gestureState.releaseExternalPressOwnership)(tokenRef.current, debugName);
|
|
83
|
+
}
|
|
84
|
+
tokenRef.current = (0, import_gestureState.claimExternalPressOwnership)(debugName);
|
|
85
|
+
}, [debugName, isEnabled]);
|
|
86
|
+
var release = import_react.default.useCallback(function () {
|
|
87
|
+
if (!tokenRef.current) return;
|
|
88
|
+
(0, import_gestureState.releaseExternalPressOwnership)(tokenRef.current, debugName);
|
|
89
|
+
tokenRef.current = null;
|
|
90
|
+
}, [debugName]);
|
|
91
|
+
import_react.default.useEffect(function () {
|
|
92
|
+
return release;
|
|
93
|
+
}, [release]);
|
|
94
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.View, {
|
|
95
|
+
ref: forwardedRef,
|
|
96
|
+
...props,
|
|
97
|
+
onTouchStart: composeFirst(claim, onTouchStart),
|
|
98
|
+
onTouchEnd: composeLast(onTouchEnd, release),
|
|
99
|
+
onTouchCancel: composeLast(onTouchCancel, release),
|
|
100
|
+
onResponderGrant: composeFirst(claim, onResponderGrant),
|
|
101
|
+
onResponderRelease: composeLast(onResponderRelease, release),
|
|
102
|
+
onResponderTerminate: composeLast(onResponderTerminate, release)
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
//# sourceMappingURL=PressBoundary.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","PressBoundary_exports","__export","PressBoundary","module","exports","import_jsx_runtime","require","import_react","__toESM","import_react_native","import_gestureState","composeFirst","ours","theirs","_len","arguments","length","args","Array","_key","composeLast","default","forwardRef","PressBoundary2","param","forwardedRef","enabled","stopPropagation","debugName","onTouchStart","onTouchEnd","onTouchCancel","onResponderGrant","onResponderRelease","onResponderTerminate","props","tokenRef","useRef","_ref","isEnabled","claim","useCallback","current","releaseExternalPressOwnership","claimExternalPressOwnership","release","useEffect","jsx","View","ref"],"sources":["../../src/PressBoundary.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,qBAAA;AAAAC,QAAA,CAAAD,qBAAA;EAAAE,aAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAkB,CAAAK,qBAAA;AAClB,IAAAK,kBAAA,GAAAC,OAAqC;AACrC,IAAAC,YAAA,GAAAC,OAIO,CAAAF,OAAA;AA+DH,IAAAG,mBAAA,GAAAH,OAAA;AAnDJ,IAAAI,mBAA0D,GAAAJ,OAAS,2BAAY;AAC7E,SAAOK,YAAIA,CAAwBC,IAAA,EAAAC,MAAA;EACjC,OAAK,YAAO;IACZ,SAASC,IAAG,GAAIC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MAClBF,IAAA,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;IACF;IAEAP,IAAA,CAAS,GAAAK,IAAA;IACPJ,MAAO,KAAI,QAAwBA,MAAA,uBAAAA,MAAA,IAAAI,IAAA;EACjC;AACA;AAAY,SACdG,YAAAP,MAAA,EAAAD,IAAA;EACF;IAEO,KAAM,IAAAE,IAAA,GAAAC,SAET,CAAAC,MAAA,EAAAC,IAAA,GAAM,IAAAC,KAAqC,CAAAJ,IAAA,GAAAK,IAAS,MAAAA,IAAA,GACtDL,IAAA,EAAAK,IAAA;MACEF,IAAA,CAAAE,IAAA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AAe,IAAAxC,kBAAY,CAAe0C,GAAA,EAAAtC,mBAAO,CAAAuC,IAAA;IAAAC,GACjD,EAAAxB,YAAA;IAAsD,GACtDU,KAAA;IAA2DN,YAC3D,EAAAlB,YAAsB,CAAA6B,KAAA,EAAAX,YAAY;IAA6BC,UAAA,EAAAV,WAAA,CAAAU,UAAA,EAAAe,OAAA;IACjEd,aAAA,EAAAX,WAAA,CAAAW,aAAA,EAAAc,OAAA;IAEHb,gBAAA,EAAArB,YAAA,CAAA6B,KAAA,EAAAR,gBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var gesture_handler_exports = {};
|
|
24
|
+
__export(gesture_handler_exports, {
|
|
25
|
+
PressBoundary: () => import_PressBoundary.PressBoundary,
|
|
26
|
+
getGestureHandler: () => import_gestureState.getGestureHandler,
|
|
27
|
+
getGestureHandlerConfig: () => import_setup_gesture_handler.getGestureHandlerConfig,
|
|
28
|
+
setupGestureHandler: () => import_setup_gesture_handler.setupGestureHandler,
|
|
29
|
+
unstable_claimExternalPressOwnership: () => import_gestureState2.claimExternalPressOwnership,
|
|
30
|
+
unstable_releaseExternalPressOwnership: () => import_gestureState2.releaseExternalPressOwnership
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(gesture_handler_exports);
|
|
33
|
+
var import_gestureState = require("./gestureState.cjs");
|
|
34
|
+
var import_gestureState2 = require("./gestureState.cjs");
|
|
35
|
+
var import_PressBoundary = require("./PressBoundary.cjs");
|
|
36
|
+
var import_setup_gesture_handler = require("./setup-gesture-handler.cjs");
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
+
value: true
|
|
24
|
+
}), mod);
|
|
25
|
+
var gesture_handler_exports = {};
|
|
26
|
+
__export(gesture_handler_exports, {
|
|
27
|
+
PressBoundary: () => import_PressBoundary.PressBoundary,
|
|
28
|
+
getGestureHandler: () => import_gestureState.getGestureHandler,
|
|
29
|
+
getGestureHandlerConfig: () => import_setup_gesture_handler.getGestureHandlerConfig,
|
|
30
|
+
setupGestureHandler: () => import_setup_gesture_handler.setupGestureHandler,
|
|
31
|
+
unstable_claimExternalPressOwnership: () => import_gestureState2.claimExternalPressOwnership,
|
|
32
|
+
unstable_releaseExternalPressOwnership: () => import_gestureState2.releaseExternalPressOwnership
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(gesture_handler_exports);
|
|
35
|
+
var import_gestureState = require("./gestureState.native.js");
|
|
36
|
+
var import_gestureState2 = require("./gestureState.native.js");
|
|
37
|
+
var import_PressBoundary = require("./PressBoundary.native.js");
|
|
38
|
+
var import_setup_gesture_handler = require("./setup-gesture-handler.native.js");
|
|
39
|
+
//# sourceMappingURL=gesture-handler.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","gesture_handler_exports","__export","PressBoundary","import_PressBoundary","getGestureHandler","import_gestureState","getGestureHandlerConfig","import_setup_gesture_handler","setupGestureHandler","unstable_claimExternalPressOwnership","import_gestureState2","claimExternalPressOwnership","unstable_releaseExternalPressOwnership","releaseExternalPressOwnership","module","exports","require"],"sources":["../../src/gesture-handler.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,uBAAA;AAAAC,QAAA,CAAAD,uBAAA;EAAAE,aAAA,EAAAA,CAAA,KAAAC,oBAAA,CAAAD,aAAA;EAAAE,iBAAA,EAAAA,CAAA,KAAAC,mBAAA,CAAAD,iBAAA;EAAAE,uBAAA,EAAAA,CAAA,KAAAC,4BAAA,CAAAD,uBAAA;EAAAE,mBAAA,EAAAA,CAAA,KAAAD,4BAAA,CAAAC,mBAAA;EAAAC,oCAAA,EAAAA,CAAA,KAAAC,oBAAA,CAAAC,2BAAA;EAAAC,sCAAA,EAAAA,CAAA,KAAAF,oBAAA,CAAAG;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAApB,YAAkC,CAAAK,uBAAA;AAMlC,IAAAK,mBAAA,GAAAW,OAGO;AACP,IAAAN,oBAAA,GAA8BM,OAAA;AAE9B,IAAAb,oBAAA,GAAAa,OAAA,CAIO","ignoreList":[]}
|
|
@@ -22,7 +22,9 @@ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
|
22
22
|
}), mod);
|
|
23
23
|
var gestureState_exports = {};
|
|
24
24
|
__export(gestureState_exports, {
|
|
25
|
-
|
|
25
|
+
claimExternalPressOwnership: () => claimExternalPressOwnership,
|
|
26
|
+
getGestureHandler: () => getGestureHandler,
|
|
27
|
+
releaseExternalPressOwnership: () => releaseExternalPressOwnership
|
|
26
28
|
});
|
|
27
29
|
module.exports = __toCommonJS(gestureState_exports);
|
|
28
30
|
var import_globalState = require("./globalState.cjs");
|
|
@@ -32,6 +34,44 @@ const state = (0, import_globalState.createGlobalState)(`gesture`, {
|
|
|
32
34
|
GestureDetector: null,
|
|
33
35
|
ScrollView: null
|
|
34
36
|
});
|
|
37
|
+
let pressGestureDebugId = 0;
|
|
38
|
+
let externalPressDebugId = 0;
|
|
39
|
+
const pressState = {
|
|
40
|
+
owner: null,
|
|
41
|
+
ownerId: null,
|
|
42
|
+
ownerSource: null,
|
|
43
|
+
timestamp: 0
|
|
44
|
+
};
|
|
45
|
+
function resetPressOwner() {
|
|
46
|
+
pressState.owner = null;
|
|
47
|
+
pressState.ownerId = null;
|
|
48
|
+
pressState.ownerSource = null;
|
|
49
|
+
pressState.timestamp = 0;
|
|
50
|
+
}
|
|
51
|
+
function resetStaleOwner(now, debugName) {
|
|
52
|
+
if (now - pressState.timestamp > 2e3) {
|
|
53
|
+
resetPressOwner();
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function claimExternalPressOwnership(debugName) {
|
|
57
|
+
const now = Date.now();
|
|
58
|
+
resetStaleOwner(now, debugName);
|
|
59
|
+
const token = {};
|
|
60
|
+
const ownerId = ++externalPressDebugId;
|
|
61
|
+
const previousOwnerId = pressState.ownerId;
|
|
62
|
+
const previousOwnerSource = pressState.ownerSource;
|
|
63
|
+
pressState.owner = token;
|
|
64
|
+
pressState.ownerId = ownerId;
|
|
65
|
+
pressState.ownerSource = "external";
|
|
66
|
+
pressState.timestamp = now;
|
|
67
|
+
return token;
|
|
68
|
+
}
|
|
69
|
+
function releaseExternalPressOwnership(token, debugName) {
|
|
70
|
+
if (!token || pressState.owner !== token) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
resetPressOwner();
|
|
74
|
+
}
|
|
35
75
|
function getGestureHandler() {
|
|
36
76
|
return {
|
|
37
77
|
get isEnabled() {
|
|
@@ -52,16 +92,65 @@ function getGestureHandler() {
|
|
|
52
92
|
} = state.get();
|
|
53
93
|
if (!Gesture) return null;
|
|
54
94
|
const longPressDuration = config.delayLongPress ?? 500;
|
|
95
|
+
const myToken = {};
|
|
96
|
+
const myDebugId = ++pressGestureDebugId;
|
|
97
|
+
const GRACE_PERIOD_MS = process.env.TAMAGUI_RNGH_PRESS_DELAY ? +process.env.TAMAGUI_RNGH_PRESS_DELAY : 24;
|
|
98
|
+
const tryClaimOwnership = () => {
|
|
99
|
+
const now = Date.now();
|
|
100
|
+
resetStaleOwner(now, config.debugName);
|
|
101
|
+
const withinGrace = now - pressState.timestamp < GRACE_PERIOD_MS;
|
|
102
|
+
const previousOwnerId = pressState.ownerId;
|
|
103
|
+
const previousOwnerSource = pressState.ownerSource;
|
|
104
|
+
if (pressState.owner === null || withinGrace && pressState.ownerSource !== "external") {
|
|
105
|
+
pressState.owner = myToken;
|
|
106
|
+
pressState.ownerId = myDebugId;
|
|
107
|
+
pressState.ownerSource = "internal";
|
|
108
|
+
pressState.timestamp = now;
|
|
109
|
+
}
|
|
110
|
+
return pressState.owner === myToken;
|
|
111
|
+
};
|
|
112
|
+
const isOwner = () => pressState.owner === myToken;
|
|
113
|
+
const releaseOwnership = () => {
|
|
114
|
+
if (pressState.owner === myToken) {
|
|
115
|
+
resetPressOwner();
|
|
116
|
+
}
|
|
117
|
+
};
|
|
55
118
|
const tap = Gesture.Tap().runOnJS(true).maxDuration(1e4).onBegin(e => {
|
|
56
|
-
|
|
119
|
+
tryClaimOwnership();
|
|
120
|
+
setTimeout(() => {
|
|
121
|
+
if (isOwner()) {
|
|
122
|
+
config.onPressIn?.(e);
|
|
123
|
+
}
|
|
124
|
+
}, GRACE_PERIOD_MS + 1);
|
|
57
125
|
}).onEnd(e => {
|
|
58
|
-
|
|
126
|
+
if (isOwner()) {
|
|
127
|
+
config.onPress?.(e);
|
|
128
|
+
}
|
|
59
129
|
}).onFinalize(e => {
|
|
60
|
-
|
|
130
|
+
if (isOwner()) {
|
|
131
|
+
config.onPressOut?.(e);
|
|
132
|
+
releaseOwnership();
|
|
133
|
+
}
|
|
61
134
|
});
|
|
62
135
|
if (config.hitSlop) tap.hitSlop(config.hitSlop);
|
|
63
136
|
if (!config.onLongPress) return tap;
|
|
64
|
-
const longPress = Gesture.LongPress().runOnJS(true).minDuration(longPressDuration).onBegin(e =>
|
|
137
|
+
const longPress = Gesture.LongPress().runOnJS(true).minDuration(longPressDuration).onBegin(e => {
|
|
138
|
+
tryClaimOwnership();
|
|
139
|
+
setTimeout(() => {
|
|
140
|
+
if (isOwner()) {
|
|
141
|
+
config.onPressIn?.(e);
|
|
142
|
+
}
|
|
143
|
+
}, GRACE_PERIOD_MS + 1);
|
|
144
|
+
}).onStart(e => {
|
|
145
|
+
if (isOwner()) {
|
|
146
|
+
config.onLongPress?.(e);
|
|
147
|
+
}
|
|
148
|
+
}).onFinalize(e => {
|
|
149
|
+
if (isOwner()) {
|
|
150
|
+
config.onPressOut?.(e);
|
|
151
|
+
releaseOwnership();
|
|
152
|
+
}
|
|
153
|
+
});
|
|
65
154
|
if (config.hitSlop) longPress.hitSlop(config.hitSlop);
|
|
66
155
|
return Gesture.Exclusive(longPress, tap);
|
|
67
156
|
}
|
|
@@ -24,7 +24,9 @@ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
|
24
24
|
}), mod);
|
|
25
25
|
var gestureState_exports = {};
|
|
26
26
|
__export(gestureState_exports, {
|
|
27
|
-
|
|
27
|
+
claimExternalPressOwnership: () => claimExternalPressOwnership,
|
|
28
|
+
getGestureHandler: () => getGestureHandler,
|
|
29
|
+
releaseExternalPressOwnership: () => releaseExternalPressOwnership
|
|
28
30
|
});
|
|
29
31
|
module.exports = __toCommonJS(gestureState_exports);
|
|
30
32
|
var import_globalState = require("./globalState.native.js");
|
|
@@ -34,6 +36,44 @@ var state = (0, import_globalState.createGlobalState)(`gesture`, {
|
|
|
34
36
|
GestureDetector: null,
|
|
35
37
|
ScrollView: null
|
|
36
38
|
});
|
|
39
|
+
var pressGestureDebugId = 0;
|
|
40
|
+
var externalPressDebugId = 0;
|
|
41
|
+
var pressState = {
|
|
42
|
+
owner: null,
|
|
43
|
+
ownerId: null,
|
|
44
|
+
ownerSource: null,
|
|
45
|
+
timestamp: 0
|
|
46
|
+
};
|
|
47
|
+
function resetPressOwner() {
|
|
48
|
+
pressState.owner = null;
|
|
49
|
+
pressState.ownerId = null;
|
|
50
|
+
pressState.ownerSource = null;
|
|
51
|
+
pressState.timestamp = 0;
|
|
52
|
+
}
|
|
53
|
+
function resetStaleOwner(now, debugName) {
|
|
54
|
+
if (now - pressState.timestamp > 2e3) {
|
|
55
|
+
resetPressOwner();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
function claimExternalPressOwnership(debugName) {
|
|
59
|
+
var now = Date.now();
|
|
60
|
+
resetStaleOwner(now, debugName);
|
|
61
|
+
var token = {};
|
|
62
|
+
var ownerId = ++externalPressDebugId;
|
|
63
|
+
var previousOwnerId = pressState.ownerId;
|
|
64
|
+
var previousOwnerSource = pressState.ownerSource;
|
|
65
|
+
pressState.owner = token;
|
|
66
|
+
pressState.ownerId = ownerId;
|
|
67
|
+
pressState.ownerSource = "external";
|
|
68
|
+
pressState.timestamp = now;
|
|
69
|
+
return token;
|
|
70
|
+
}
|
|
71
|
+
function releaseExternalPressOwnership(token, debugName) {
|
|
72
|
+
if (!token || pressState.owner !== token) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
resetPressOwner();
|
|
76
|
+
}
|
|
37
77
|
function getGestureHandler() {
|
|
38
78
|
return {
|
|
39
79
|
get isEnabled() {
|
|
@@ -55,27 +95,72 @@ function getGestureHandler() {
|
|
|
55
95
|
if (!Gesture) return null;
|
|
56
96
|
var _config_delayLongPress;
|
|
57
97
|
var longPressDuration = (_config_delayLongPress = config.delayLongPress) !== null && _config_delayLongPress !== void 0 ? _config_delayLongPress : 500;
|
|
98
|
+
var myToken = {};
|
|
99
|
+
var myDebugId = ++pressGestureDebugId;
|
|
100
|
+
var GRACE_PERIOD_MS = process.env.TAMAGUI_RNGH_PRESS_DELAY ? +process.env.TAMAGUI_RNGH_PRESS_DELAY : 24;
|
|
101
|
+
var tryClaimOwnership = function () {
|
|
102
|
+
var now = Date.now();
|
|
103
|
+
resetStaleOwner(now, config.debugName);
|
|
104
|
+
var withinGrace = now - pressState.timestamp < GRACE_PERIOD_MS;
|
|
105
|
+
var previousOwnerId = pressState.ownerId;
|
|
106
|
+
var previousOwnerSource = pressState.ownerSource;
|
|
107
|
+
if (pressState.owner === null || withinGrace && pressState.ownerSource !== "external") {
|
|
108
|
+
pressState.owner = myToken;
|
|
109
|
+
pressState.ownerId = myDebugId;
|
|
110
|
+
pressState.ownerSource = "internal";
|
|
111
|
+
pressState.timestamp = now;
|
|
112
|
+
}
|
|
113
|
+
return pressState.owner === myToken;
|
|
114
|
+
};
|
|
115
|
+
var isOwner = function () {
|
|
116
|
+
return pressState.owner === myToken;
|
|
117
|
+
};
|
|
118
|
+
var releaseOwnership = function () {
|
|
119
|
+
if (pressState.owner === myToken) {
|
|
120
|
+
resetPressOwner();
|
|
121
|
+
}
|
|
122
|
+
};
|
|
58
123
|
var tap = Gesture.Tap().runOnJS(true).maxDuration(1e4).onBegin(function (e) {
|
|
59
|
-
|
|
60
|
-
(
|
|
124
|
+
tryClaimOwnership();
|
|
125
|
+
setTimeout(function () {
|
|
126
|
+
if (isOwner()) {
|
|
127
|
+
var _config_onPressIn;
|
|
128
|
+
(_config_onPressIn = config.onPressIn) === null || _config_onPressIn === void 0 ? void 0 : _config_onPressIn.call(config, e);
|
|
129
|
+
}
|
|
130
|
+
}, GRACE_PERIOD_MS + 1);
|
|
61
131
|
}).onEnd(function (e) {
|
|
62
|
-
|
|
63
|
-
|
|
132
|
+
if (isOwner()) {
|
|
133
|
+
var _config_onPress;
|
|
134
|
+
(_config_onPress = config.onPress) === null || _config_onPress === void 0 ? void 0 : _config_onPress.call(config, e);
|
|
135
|
+
}
|
|
64
136
|
}).onFinalize(function (e) {
|
|
65
|
-
|
|
66
|
-
|
|
137
|
+
if (isOwner()) {
|
|
138
|
+
var _config_onPressOut;
|
|
139
|
+
(_config_onPressOut = config.onPressOut) === null || _config_onPressOut === void 0 ? void 0 : _config_onPressOut.call(config, e);
|
|
140
|
+
releaseOwnership();
|
|
141
|
+
}
|
|
67
142
|
});
|
|
68
143
|
if (config.hitSlop) tap.hitSlop(config.hitSlop);
|
|
69
144
|
if (!config.onLongPress) return tap;
|
|
70
145
|
var longPress = Gesture.LongPress().runOnJS(true).minDuration(longPressDuration).onBegin(function (e) {
|
|
71
|
-
|
|
72
|
-
|
|
146
|
+
tryClaimOwnership();
|
|
147
|
+
setTimeout(function () {
|
|
148
|
+
if (isOwner()) {
|
|
149
|
+
var _config_onPressIn;
|
|
150
|
+
(_config_onPressIn = config.onPressIn) === null || _config_onPressIn === void 0 ? void 0 : _config_onPressIn.call(config, e);
|
|
151
|
+
}
|
|
152
|
+
}, GRACE_PERIOD_MS + 1);
|
|
73
153
|
}).onStart(function (e) {
|
|
74
|
-
|
|
75
|
-
|
|
154
|
+
if (isOwner()) {
|
|
155
|
+
var _config_onLongPress;
|
|
156
|
+
(_config_onLongPress = config.onLongPress) === null || _config_onLongPress === void 0 ? void 0 : _config_onLongPress.call(config, e);
|
|
157
|
+
}
|
|
76
158
|
}).onFinalize(function (e) {
|
|
77
|
-
|
|
78
|
-
|
|
159
|
+
if (isOwner()) {
|
|
160
|
+
var _config_onPressOut;
|
|
161
|
+
(_config_onPressOut = config.onPressOut) === null || _config_onPressOut === void 0 ? void 0 : _config_onPressOut.call(config, e);
|
|
162
|
+
releaseOwnership();
|
|
163
|
+
}
|
|
79
164
|
});
|
|
80
165
|
if (config.hitSlop) longPress.hitSlop(config.hitSlop);
|
|
81
166
|
return Gesture.Exclusive(longPress, tap);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","gestureState_exports","__export","getGestureHandler","module","exports","import_globalState","require","state","createGlobalState","enabled","Gesture","GestureDetector","ScrollView","isEnabled","get","set","updates","Object","assign","disable","createPressGesture","config","_config_delayLongPress","longPressDuration","delayLongPress","tap","Tap","runOnJS","maxDuration","onBegin","e","_config_onPressIn","onPressIn","call","onEnd","_config_onPress","onPress","onFinalize","_config_onPressOut","onPressOut","hitSlop","onLongPress","longPress","LongPress","minDuration"],"sources":["../../src/gestureState.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,oBAAA;AAAAC,QAAA,CAAAD,oBAAA;EAAAE,iBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","gestureState_exports","__export","claimExternalPressOwnership","getGestureHandler","releaseExternalPressOwnership","module","exports","import_globalState","require","state","createGlobalState","enabled","Gesture","GestureDetector","ScrollView","pressGestureDebugId","externalPressDebugId","pressState","owner","ownerId","ownerSource","timestamp","resetPressOwner","resetStaleOwner","now","debugName","Date","token","previousOwnerId","previousOwnerSource","isEnabled","get","set","updates","Object","assign","disable","createPressGesture","config","_config_delayLongPress","longPressDuration","delayLongPress","myToken","myDebugId","GRACE_PERIOD_MS","process","env","TAMAGUI_RNGH_PRESS_DELAY","tryClaimOwnership","withinGrace","isOwner","releaseOwnership","tap","Tap","runOnJS","maxDuration","onBegin","e","setTimeout","_config_onPressIn","onPressIn","call","onEnd","_config_onPress","onPress","onFinalize","_config_onPressOut","onPressOut","hitSlop","onLongPress","longPress","LongPress","minDuration","onStart","_config_onLongPress"],"sources":["../../src/gestureState.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,oBAAA;AAAAC,QAAA,CAAAD,oBAAA;EAAAE,2BAAA,EAAAA,CAAA,KAAAA,2BAAA;EAAAC,iBAAA,EAAAA,CAAA,KAAAA,iBAAA;EAAAC,6BAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAX,YAAkC,CAAAK,oBAAA;AAGlC,IAAAO,kBAAc,GAAAC,OAAA;AAA2C,IACvDC,KAAA,GAAS,IAAAF,kBAAA,CAAAG,iBAAA;EACTC,OAAA,EAAS;EACTC,OAAA;EACAC,eAAY;EACbC,UAAA;AAED;AACA,IAAIC,mBAAA,IAAuB;AAU3B,IAAAC,oBAAmB;AAAA,IACjBC,UAAO;EACPC,KAAA,MAAS;EACTC,OAAA,MAAa;EACbC,WAAW;EACbC,SAAA;AA6BA;AACE,SAAAC,eAAmBA,CAAA;EACnBL,UAAA,CAAWC,KAAA,OAAU;EACrBD,UAAA,CAAWE,OAAA,OAAc;EACzBF,UAAA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AAA,uBAAAA,mBAAA,CAAAb,IAAA,CAAAvB,MAAA,EAAAmB,CAAA;QACzC;MACF,GAAAQ,UAAA,WAAAR,CAAA;QACF,IAAAP,OAAA","ignoreList":[]}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -35,11 +35,14 @@ __export(index_exports, {
|
|
|
35
35
|
getWorklets: () => import_workletsState.getWorklets,
|
|
36
36
|
getZeego: () => import_zeegoState.getZeego,
|
|
37
37
|
isKeyboardControllerEnabled: () => import_keyboardControllerState.isKeyboardControllerEnabled,
|
|
38
|
-
setKeyboardControllerState: () => import_keyboardControllerState.setKeyboardControllerState
|
|
38
|
+
setKeyboardControllerState: () => import_keyboardControllerState.setKeyboardControllerState,
|
|
39
|
+
unstable_claimExternalPressOwnership: () => import_gestureState2.claimExternalPressOwnership,
|
|
40
|
+
unstable_releaseExternalPressOwnership: () => import_gestureState2.releaseExternalPressOwnership
|
|
39
41
|
});
|
|
40
42
|
module.exports = __toCommonJS(index_exports);
|
|
41
43
|
var import_portalState = require("./portalState.cjs");
|
|
42
44
|
var import_gestureState = require("./gestureState.cjs");
|
|
45
|
+
var import_gestureState2 = require("./gestureState.cjs");
|
|
43
46
|
var import_workletsState = require("./workletsState.cjs");
|
|
44
47
|
var import_safeAreaState = require("./safeAreaState.cjs");
|
|
45
48
|
var import_linearGradientState = require("./linearGradientState.cjs");
|
package/dist/cjs/index.native.js
CHANGED
|
@@ -37,11 +37,14 @@ __export(index_exports, {
|
|
|
37
37
|
getWorklets: () => import_workletsState.getWorklets,
|
|
38
38
|
getZeego: () => import_zeegoState.getZeego,
|
|
39
39
|
isKeyboardControllerEnabled: () => import_keyboardControllerState.isKeyboardControllerEnabled,
|
|
40
|
-
setKeyboardControllerState: () => import_keyboardControllerState.setKeyboardControllerState
|
|
40
|
+
setKeyboardControllerState: () => import_keyboardControllerState.setKeyboardControllerState,
|
|
41
|
+
unstable_claimExternalPressOwnership: () => import_gestureState2.claimExternalPressOwnership,
|
|
42
|
+
unstable_releaseExternalPressOwnership: () => import_gestureState2.releaseExternalPressOwnership
|
|
41
43
|
});
|
|
42
44
|
module.exports = __toCommonJS(index_exports);
|
|
43
45
|
var import_portalState = require("./portalState.native.js");
|
|
44
46
|
var import_gestureState = require("./gestureState.native.js");
|
|
47
|
+
var import_gestureState2 = require("./gestureState.native.js");
|
|
45
48
|
var import_workletsState = require("./workletsState.native.js");
|
|
46
49
|
var import_safeAreaState = require("./safeAreaState.native.js");
|
|
47
50
|
var import_linearGradientState = require("./linearGradientState.native.js");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","__export","NativeMenuContext","import_nativeMenuContext","NativePortal","import_components","NativePortalHost","NativePortalProvider","getBurnt","import_burntState","getGestureHandler","import_gestureState","getKeyboardControllerState","import_keyboardControllerState","getLinearGradient","import_linearGradientState","getPortal","import_portalState","getSafeArea","import_safeAreaState","getWorklets","import_workletsState","getZeego","import_zeegoState","isKeyboardControllerEnabled","setKeyboardControllerState","module","exports","require"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,QAAA,CAAAD,aAAA;EAAAE,iBAAA,EAAAA,CAAA,KAAAC,wBAAA,CAAAD,iBAAA;EAAAE,YAAA,EAAAA,CAAA,KAAAC,iBAAA,CAAAD,YAAA;EAAAE,gBAAA,EAAAA,CAAA,KAAAD,iBAAA,CAAAC,gBAAA;EAAAC,oBAAA,EAAAA,CAAA,KAAAF,iBAAA,CAAAE,oBAAA;EAAAC,QAAA,EAAAA,CAAA,KAAAC,iBAAA,CAAAD,QAAA;EAAAE,iBAAA,EAAAA,CAAA,KAAAC,mBAAA,CAAAD,iBAAA;EAAAE,0BAAA,EAAAA,CAAA,KAAAC,8BAAA,CAAAD,0BAAA;EAAAE,iBAAA,EAAAA,CAAA,KAAAC,0BAAA,CAAAD,iBAAA;EAAAE,SAAA,EAAAA,CAAA,KAAAC,kBAAA,CAAAD,SAAA;EAAAE,WAAA,EAAAA,CAAA,KAAAC,oBAAA,CAAAD,WAAA;EAAAE,WAAA,EAAAA,CAAA,KAAAC,oBAAA,CAAAD,WAAA;EAAAE,QAAA,EAAAA,CAAA,KAAAC,iBAAA,CAAAD,QAAA;EAAAE,2BAAA,EAAAA,CAAA,KAAAX,8BAAA,CAAAW,2BAAA;EAAAC,0BAAA,EAAAA,CAAA,KAAAZ,8BAAA,CAAAY;AAAA;AAuCAC,MAAA,CAAAC,OAAA,
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","__export","NativeMenuContext","import_nativeMenuContext","NativePortal","import_components","NativePortalHost","NativePortalProvider","getBurnt","import_burntState","getGestureHandler","import_gestureState","getKeyboardControllerState","import_keyboardControllerState","getLinearGradient","import_linearGradientState","getPortal","import_portalState","getSafeArea","import_safeAreaState","getWorklets","import_workletsState","getZeego","import_zeegoState","isKeyboardControllerEnabled","setKeyboardControllerState","unstable_claimExternalPressOwnership","import_gestureState2","claimExternalPressOwnership","unstable_releaseExternalPressOwnership","releaseExternalPressOwnership","module","exports","require"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,QAAA,CAAAD,aAAA;EAAAE,iBAAA,EAAAA,CAAA,KAAAC,wBAAA,CAAAD,iBAAA;EAAAE,YAAA,EAAAA,CAAA,KAAAC,iBAAA,CAAAD,YAAA;EAAAE,gBAAA,EAAAA,CAAA,KAAAD,iBAAA,CAAAC,gBAAA;EAAAC,oBAAA,EAAAA,CAAA,KAAAF,iBAAA,CAAAE,oBAAA;EAA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