@hanzogui/native 2.0.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/burntState.cjs +44 -0
- package/dist/cjs/burntState.native.js +47 -0
- package/dist/cjs/burntState.native.js.map +1 -0
- package/dist/cjs/components.cjs +66 -0
- package/dist/cjs/components.native.js +75 -0
- package/dist/cjs/components.native.js.map +1 -0
- package/dist/cjs/gestureState.cjs +65 -0
- package/dist/cjs/gestureState.native.js +81 -0
- package/dist/cjs/gestureState.native.js.map +1 -0
- package/dist/cjs/globalState.cjs +39 -0
- package/dist/cjs/globalState.native.js +42 -0
- package/dist/cjs/globalState.native.js.map +1 -0
- package/dist/cjs/index.cjs +48 -0
- package/dist/cjs/index.native.js +51 -0
- package/dist/cjs/index.native.js.map +1 -0
- package/dist/cjs/keyboardControllerState.cjs +47 -0
- package/dist/cjs/keyboardControllerState.native.js +50 -0
- package/dist/cjs/keyboardControllerState.native.js.map +1 -0
- package/dist/cjs/linearGradientState.cjs +43 -0
- package/dist/cjs/linearGradientState.native.js +46 -0
- package/dist/cjs/linearGradientState.native.js.map +1 -0
- package/dist/cjs/nativeMenuContext.cjs +27 -0
- package/dist/cjs/nativeMenuContext.native.js +30 -0
- package/dist/cjs/nativeMenuContext.native.js.map +1 -0
- package/dist/cjs/portalState.cjs +43 -0
- package/dist/cjs/portalState.native.js +46 -0
- package/dist/cjs/portalState.native.js.map +1 -0
- package/dist/cjs/safeAreaState.cjs +65 -0
- package/dist/cjs/safeAreaState.native.js +68 -0
- package/dist/cjs/safeAreaState.native.js.map +1 -0
- package/dist/cjs/setup-burnt.cjs +16 -0
- package/dist/cjs/setup-burnt.native.js +19 -0
- package/dist/cjs/setup-burnt.native.js.map +1 -0
- package/dist/cjs/setup-expo-linear-gradient.cjs +15 -0
- package/dist/cjs/setup-expo-linear-gradient.native.js +18 -0
- package/dist/cjs/setup-expo-linear-gradient.native.js.map +1 -0
- package/dist/cjs/setup-gesture-handler.cjs +27 -0
- package/dist/cjs/setup-gesture-handler.native.js +30 -0
- package/dist/cjs/setup-gesture-handler.native.js.map +1 -0
- package/dist/cjs/setup-keyboard-controller.cjs +0 -0
- package/dist/cjs/setup-keyboard-controller.native.js +33 -0
- package/dist/cjs/setup-keyboard-controller.native.js.map +1 -0
- package/dist/cjs/setup-safe-area.cjs +1 -0
- package/dist/cjs/setup-safe-area.native.js +25 -0
- package/dist/cjs/setup-safe-area.native.js.map +1 -0
- package/dist/cjs/setup-teleport.cjs +18 -0
- package/dist/cjs/setup-teleport.native.js +21 -0
- package/dist/cjs/setup-teleport.native.js.map +1 -0
- package/dist/cjs/setup-worklets.cjs +18 -0
- package/dist/cjs/setup-worklets.native.js +21 -0
- package/dist/cjs/setup-worklets.native.js.map +1 -0
- package/dist/cjs/setup-zeego.cjs +19 -0
- package/dist/cjs/setup-zeego.native.js +22 -0
- package/dist/cjs/setup-zeego.native.js.map +1 -0
- package/dist/cjs/types.cjs +16 -0
- package/dist/cjs/types.native.js +19 -0
- package/dist/cjs/types.native.js.map +1 -0
- package/dist/cjs/workletsState.cjs +46 -0
- package/dist/cjs/workletsState.native.js +49 -0
- package/dist/cjs/workletsState.native.js.map +1 -0
- package/dist/cjs/zeegoState.cjs +44 -0
- package/dist/cjs/zeegoState.native.js +47 -0
- package/dist/cjs/zeegoState.native.js.map +1 -0
- package/dist/esm/burntState.mjs +21 -0
- package/dist/esm/burntState.mjs.map +1 -0
- package/dist/esm/burntState.native.js +21 -0
- package/dist/esm/burntState.native.js.map +1 -0
- package/dist/esm/components.mjs +41 -0
- package/dist/esm/components.mjs.map +1 -0
- package/dist/esm/components.native.js +47 -0
- package/dist/esm/components.native.js.map +1 -0
- package/dist/esm/gestureState.mjs +42 -0
- package/dist/esm/gestureState.mjs.map +1 -0
- package/dist/esm/gestureState.native.js +55 -0
- package/dist/esm/gestureState.native.js.map +1 -0
- package/dist/esm/globalState.mjs +16 -0
- package/dist/esm/globalState.mjs.map +1 -0
- package/dist/esm/globalState.native.js +16 -0
- package/dist/esm/globalState.native.js.map +1 -0
- package/dist/esm/index.js +12 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/index.mjs +12 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/index.native.js +12 -0
- package/dist/esm/index.native.js.map +1 -0
- package/dist/esm/keyboardControllerState.mjs +22 -0
- package/dist/esm/keyboardControllerState.mjs.map +1 -0
- package/dist/esm/keyboardControllerState.native.js +22 -0
- package/dist/esm/keyboardControllerState.native.js.map +1 -0
- package/dist/esm/linearGradientState.mjs +20 -0
- package/dist/esm/linearGradientState.mjs.map +1 -0
- package/dist/esm/linearGradientState.native.js +20 -0
- package/dist/esm/linearGradientState.native.js.map +1 -0
- package/dist/esm/nativeMenuContext.mjs +4 -0
- package/dist/esm/nativeMenuContext.mjs.map +1 -0
- package/dist/esm/nativeMenuContext.native.js +4 -0
- package/dist/esm/nativeMenuContext.native.js.map +1 -0
- package/dist/esm/portalState.mjs +20 -0
- package/dist/esm/portalState.mjs.map +1 -0
- package/dist/esm/portalState.native.js +20 -0
- package/dist/esm/portalState.native.js.map +1 -0
- package/dist/esm/safeAreaState.mjs +42 -0
- package/dist/esm/safeAreaState.mjs.map +1 -0
- package/dist/esm/safeAreaState.native.js +42 -0
- package/dist/esm/safeAreaState.native.js.map +1 -0
- package/dist/esm/setup-burnt.mjs +17 -0
- package/dist/esm/setup-burnt.mjs.map +1 -0
- package/dist/esm/setup-burnt.native.js +17 -0
- package/dist/esm/setup-burnt.native.js.map +1 -0
- package/dist/esm/setup-expo-linear-gradient.mjs +16 -0
- package/dist/esm/setup-expo-linear-gradient.mjs.map +1 -0
- package/dist/esm/setup-expo-linear-gradient.native.js +16 -0
- package/dist/esm/setup-expo-linear-gradient.native.js.map +1 -0
- package/dist/esm/setup-gesture-handler.mjs +28 -0
- package/dist/esm/setup-gesture-handler.mjs.map +1 -0
- package/dist/esm/setup-gesture-handler.native.js +28 -0
- package/dist/esm/setup-gesture-handler.native.js.map +1 -0
- package/dist/esm/setup-keyboard-controller.mjs +2 -0
- package/dist/esm/setup-keyboard-controller.mjs.map +1 -0
- package/dist/esm/setup-keyboard-controller.native.js +31 -0
- package/dist/esm/setup-keyboard-controller.native.js.map +1 -0
- package/dist/esm/setup-safe-area.mjs +2 -0
- package/dist/esm/setup-safe-area.mjs.map +1 -0
- package/dist/esm/setup-safe-area.native.js +23 -0
- package/dist/esm/setup-safe-area.native.js.map +1 -0
- package/dist/esm/setup-teleport.mjs +19 -0
- package/dist/esm/setup-teleport.mjs.map +1 -0
- package/dist/esm/setup-teleport.native.js +19 -0
- package/dist/esm/setup-teleport.native.js.map +1 -0
- package/dist/esm/setup-worklets.mjs +19 -0
- package/dist/esm/setup-worklets.mjs.map +1 -0
- package/dist/esm/setup-worklets.native.js +19 -0
- package/dist/esm/setup-worklets.native.js.map +1 -0
- package/dist/esm/setup-zeego.mjs +20 -0
- package/dist/esm/setup-zeego.mjs.map +1 -0
- package/dist/esm/setup-zeego.native.js +20 -0
- package/dist/esm/setup-zeego.native.js.map +1 -0
- package/dist/esm/types.mjs +2 -0
- package/dist/esm/types.mjs.map +1 -0
- package/dist/esm/types.native.js +2 -0
- package/dist/esm/types.native.js.map +1 -0
- package/dist/esm/workletsState.mjs +23 -0
- package/dist/esm/workletsState.mjs.map +1 -0
- package/dist/esm/workletsState.native.js +23 -0
- package/dist/esm/workletsState.native.js.map +1 -0
- package/dist/esm/zeegoState.mjs +21 -0
- package/dist/esm/zeegoState.mjs.map +1 -0
- package/dist/esm/zeegoState.native.js +21 -0
- package/dist/esm/zeegoState.native.js.map +1 -0
- package/package.json +195 -0
- package/setup-burnt/index.cjs +2 -0
- package/setup-burnt/index.js +2 -0
- package/setup-burnt/index.native.cjs +2 -0
- package/setup-burnt/index.native.js +2 -0
- package/setup-burnt.cjs +1 -0
- package/setup-expo-linear-gradient/index.cjs +2 -0
- package/setup-expo-linear-gradient/index.js +2 -0
- package/setup-expo-linear-gradient/index.native.cjs +2 -0
- package/setup-expo-linear-gradient/index.native.js +2 -0
- package/setup-expo-linear-gradient.cjs +1 -0
- package/setup-gesture-handler/index.cjs +2 -0
- package/setup-gesture-handler/index.js +2 -0
- package/setup-gesture-handler/index.native.cjs +2 -0
- package/setup-gesture-handler/index.native.js +2 -0
- package/setup-gesture-handler.cjs +1 -0
- package/setup-keyboard-controller/index.cjs +2 -0
- package/setup-keyboard-controller/index.js +2 -0
- package/setup-keyboard-controller/index.native.cjs +2 -0
- package/setup-keyboard-controller/index.native.js +2 -0
- package/setup-keyboard-controller.cjs +1 -0
- package/setup-safe-area/index.cjs +2 -0
- package/setup-safe-area/index.js +2 -0
- package/setup-safe-area/index.native.cjs +2 -0
- package/setup-safe-area/index.native.js +2 -0
- package/setup-safe-area.cjs +1 -0
- package/setup-teleport/index.cjs +2 -0
- package/setup-teleport/index.js +2 -0
- package/setup-teleport/index.native.cjs +2 -0
- package/setup-teleport/index.native.js +2 -0
- package/setup-teleport.cjs +1 -0
- package/setup-worklets/index.cjs +2 -0
- package/setup-worklets/index.js +2 -0
- package/setup-worklets/index.native.cjs +2 -0
- package/setup-worklets/index.native.js +2 -0
- package/setup-worklets.cjs +1 -0
- package/setup-zeego/index.cjs +2 -0
- package/setup-zeego/index.js +2 -0
- package/setup-zeego/index.native.cjs +2 -0
- package/setup-zeego/index.native.js +2 -0
- package/setup-zeego.cjs +1 -0
- package/src/burntState.ts +28 -0
- package/src/components.tsx +48 -0
- package/src/gestureState.ts +91 -0
- package/src/globalState.ts +32 -0
- package/src/index.ts +77 -0
- package/src/keyboardControllerState.ts +29 -0
- package/src/linearGradientState.ts +27 -0
- package/src/nativeMenuContext.ts +4 -0
- package/src/portalState.ts +27 -0
- package/src/safeAreaState.ts +50 -0
- package/src/setup-burnt.ts +38 -0
- package/src/setup-expo-linear-gradient.ts +36 -0
- package/src/setup-gesture-handler.ts +51 -0
- package/src/setup-keyboard-controller.ts +60 -0
- package/src/setup-keyboard-controller.web.ts +6 -0
- package/src/setup-safe-area.ts +56 -0
- package/src/setup-teleport.ts +36 -0
- package/src/setup-worklets.ts +49 -0
- package/src/setup-zeego.ts +42 -0
- package/src/types.ts +88 -0
- package/src/workletsState.ts +30 -0
- package/src/zeegoState.ts +28 -0
- package/tsconfig.json +12 -0
- package/types/burntState.d.ts +9 -0
- package/types/components.d.ts +20 -0
- package/types/gestureState.d.ts +25 -0
- package/types/globalState.d.ts +8 -0
- package/types/index.d.ts +41 -0
- package/types/keyboardControllerState.d.ts +7 -0
- package/types/linearGradientState.d.ts +9 -0
- package/types/nativeMenuContext.d.ts +4 -0
- package/types/portalState.d.ts +9 -0
- package/types/safeAreaState.d.ts +13 -0
- package/types/setup-burnt.d.ts +3 -0
- package/types/setup-expo-linear-gradient.d.ts +3 -0
- package/types/setup-gesture-handler.d.ts +3 -0
- package/types/setup-keyboard-controller.d.ts +3 -0
- package/types/setup-keyboard-controller.web.d.ts +2 -0
- package/types/setup-safe-area.d.ts +3 -0
- package/types/setup-teleport.d.ts +3 -0
- package/types/setup-worklets.d.ts +3 -0
- package/types/setup-zeego.d.ts +3 -0
- package/types/types.d.ts +76 -0
- package/types/workletsState.d.ts +9 -0
- package/types/zeegoState.d.ts +9 -0
|
@@ -0,0 +1,44 @@
|
|
|
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: !0
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
__copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
+
value: !0
|
|
20
|
+
}), mod);
|
|
21
|
+
var burntState_exports = {};
|
|
22
|
+
__export(burntState_exports, {
|
|
23
|
+
getBurnt: () => getBurnt
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(burntState_exports);
|
|
26
|
+
var import_globalState = require("./globalState.cjs");
|
|
27
|
+
const state = (0, import_globalState.createGlobalState)("burnt", {
|
|
28
|
+
enabled: !1,
|
|
29
|
+
toast: null,
|
|
30
|
+
dismissAllAlerts: null
|
|
31
|
+
});
|
|
32
|
+
function getBurnt() {
|
|
33
|
+
return {
|
|
34
|
+
get isEnabled() {
|
|
35
|
+
return state.get().enabled;
|
|
36
|
+
},
|
|
37
|
+
get state() {
|
|
38
|
+
return state.get();
|
|
39
|
+
},
|
|
40
|
+
set(newState) {
|
|
41
|
+
state.set(newState);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
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: !0
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
__copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: !0
|
|
22
|
+
}), mod);
|
|
23
|
+
var burntState_exports = {};
|
|
24
|
+
__export(burntState_exports, {
|
|
25
|
+
getBurnt: () => getBurnt
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(burntState_exports);
|
|
28
|
+
var import_globalState = require("./globalState.native.js"),
|
|
29
|
+
state = (0, import_globalState.createGlobalState)("burnt", {
|
|
30
|
+
enabled: !1,
|
|
31
|
+
toast: null,
|
|
32
|
+
dismissAllAlerts: null
|
|
33
|
+
});
|
|
34
|
+
function getBurnt() {
|
|
35
|
+
return {
|
|
36
|
+
get isEnabled() {
|
|
37
|
+
return state.get().enabled;
|
|
38
|
+
},
|
|
39
|
+
get state() {
|
|
40
|
+
return state.get();
|
|
41
|
+
},
|
|
42
|
+
set(newState) {
|
|
43
|
+
state.set(newState);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=burntState.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","burntState_exports","__export","getBurnt","module","exports","import_globalState","require","state","createGlobalState","enabled","toast","dismissAllAlerts","isEnabled","get","set","newState"],"sources":["../../src/burntState.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,kBAAA;AAAAC,QAAA,CAAAD,kBAAA;EAAAE,QAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAkC,CAAAK,kBAAA;AAGlC,IAAAK,kBAAc,GAAAC,OAAA;EAAAC,KAA8B,OAAAF,kBAAS,CAAAG,iBAAA;IACnDC,OAAA,EAAS;IACTC,KAAA,EAAO;IACPC,gBAAA,EAAkB;EACpB,CAAC;AAQM,SAAST,SAAA,EAA0B;EACxC,OAAO;IACL,IAAIU,UAAA,EAAqB;MACvB,OAAOL,KAAA,CAAMM,GAAA,CAAI,EAAEJ,OAAA;IACrB;IACA,IAAIF,MAAA,EAAoB;MACtB,OAAOA,KAAA,CAAMM,GAAA,CAAI;IACnB;IACAC,IAAIC,QAAA,EAA4B;MAC9BR,KAAA,CAAMO,GAAA,CAAIC,QAAQ;IACpB;EACF;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,66 @@
|
|
|
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: !0
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
__copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
+
value: !0
|
|
20
|
+
}), mod);
|
|
21
|
+
var components_exports = {};
|
|
22
|
+
__export(components_exports, {
|
|
23
|
+
NativePortal: () => NativePortal,
|
|
24
|
+
NativePortalHost: () => NativePortalHost,
|
|
25
|
+
NativePortalProvider: () => NativePortalProvider
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(components_exports);
|
|
28
|
+
var import_portalState = require("./portalState.cjs"),
|
|
29
|
+
import_jsx_runtime = require("react/jsx-runtime");
|
|
30
|
+
function NativePortal({
|
|
31
|
+
hostName = "root",
|
|
32
|
+
children
|
|
33
|
+
}) {
|
|
34
|
+
if ((0, import_portalState.getPortal)().state.type !== "teleport") return null;
|
|
35
|
+
const {
|
|
36
|
+
Portal
|
|
37
|
+
} = globalThis.__gui_teleport;
|
|
38
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(Portal, {
|
|
39
|
+
hostName,
|
|
40
|
+
children
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function NativePortalHost({
|
|
44
|
+
name
|
|
45
|
+
}) {
|
|
46
|
+
if ((0, import_portalState.getPortal)().state.type !== "teleport") return null;
|
|
47
|
+
const {
|
|
48
|
+
PortalHost
|
|
49
|
+
} = globalThis.__gui_teleport;
|
|
50
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(PortalHost, {
|
|
51
|
+
name
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function NativePortalProvider({
|
|
55
|
+
children
|
|
56
|
+
}) {
|
|
57
|
+
if ((0, import_portalState.getPortal)().state.type !== "teleport") return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
|
|
58
|
+
children
|
|
59
|
+
});
|
|
60
|
+
const {
|
|
61
|
+
PortalProvider
|
|
62
|
+
} = globalThis.__gui_teleport;
|
|
63
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(PortalProvider, {
|
|
64
|
+
children
|
|
65
|
+
});
|
|
66
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
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: !0
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
__copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: !0
|
|
22
|
+
}), mod);
|
|
23
|
+
var components_exports = {};
|
|
24
|
+
__export(components_exports, {
|
|
25
|
+
NativePortal: () => NativePortal,
|
|
26
|
+
NativePortalHost: () => NativePortalHost,
|
|
27
|
+
NativePortalProvider: () => NativePortalProvider
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(components_exports);
|
|
30
|
+
var import_jsx_runtime = require("react/jsx-runtime"),
|
|
31
|
+
import_portalState = require("./portalState.native.js");
|
|
32
|
+
function NativePortal(param) {
|
|
33
|
+
var {
|
|
34
|
+
hostName = "root",
|
|
35
|
+
children
|
|
36
|
+
} = param,
|
|
37
|
+
state = (0, import_portalState.getPortal)().state;
|
|
38
|
+
if (state.type !== "teleport") return null;
|
|
39
|
+
var {
|
|
40
|
+
Portal
|
|
41
|
+
} = globalThis.__gui_teleport;
|
|
42
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(Portal, {
|
|
43
|
+
hostName,
|
|
44
|
+
children
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function NativePortalHost(param) {
|
|
48
|
+
var {
|
|
49
|
+
name
|
|
50
|
+
} = param,
|
|
51
|
+
state = (0, import_portalState.getPortal)().state;
|
|
52
|
+
if (state.type !== "teleport") return null;
|
|
53
|
+
var {
|
|
54
|
+
PortalHost
|
|
55
|
+
} = globalThis.__gui_teleport;
|
|
56
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(PortalHost, {
|
|
57
|
+
name
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function NativePortalProvider(param) {
|
|
61
|
+
var {
|
|
62
|
+
children
|
|
63
|
+
} = param,
|
|
64
|
+
state = (0, import_portalState.getPortal)().state;
|
|
65
|
+
if (state.type !== "teleport") return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
|
|
66
|
+
children
|
|
67
|
+
});
|
|
68
|
+
var {
|
|
69
|
+
PortalProvider
|
|
70
|
+
} = globalThis.__gui_teleport;
|
|
71
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(PortalProvider, {
|
|
72
|
+
children
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=components.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","components_exports","__export","NativePortal","NativePortalHost","NativePortalProvider","module","exports","import_jsx_runtime","require","import_portalState","param","hostName","children","state","getPortal","type","Portal","globalThis","__gui_teleport","jsx","name","PortalHost"],"sources":["../../src/components.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,kBAAA;AAAAC,QAAA,CAAAD,kBAAA;EAAAE,YAAA,EAAAA,CAAA,KAAAA,YAAA;EAAAC,gBAAA,EAAAA,CAAA,KAAAA,gBAAA;EAAAC,oBAAA,EAAAA,CAAA,KAAAA;AAAA;AACAC,MAAA,CAAAC,OAAA,GAAAX,YAA0B,CAAAK,kBAAA;AAanB,IAAAO,kBAAsB,GAAAC,OAAA;EAAAC,kBAAA,GAAAD,OAAA;AAAA,SAC3BN,YAAWA,CAAAQ,KAAA;EACX;MAAAC,QAAA;MAAAC;IAAA,IAAAF,KAAA;IAAAG,KAAA,OAAAJ,kBAAA,CAAAK,SAAA,IAAAD,KAAA;EACF,IAAiCA,KAAA,CAAAE,IAAA;EAE/B;IAAAC;EADc,IAAAC,UAAA,CAAAC,cAAY;EAG1B,OAAM,eAAc,IAAAX,kBAAmB,CAAAY,GAAA,EAAAH,MAAA;IACvCL,QAAO;IACTC;EAMO;AAEL;AAEA,SAAMT,gBAAkBA,CAAAO,KAAA;EACxB;MAAAU;IAAO,IAAAV,KAAA;IAAAG,KAAA,OAAAJ,kBAAC,CAAAK,SAAA,GAAW,CAAAD,KAAY;EACjC,IAAAA,KAAA,CAAAE,IAAA;EAMO;IAAAM;EAAS,IAAAJ,UAAuB,CAAAC,cAAkD;EAEvF,sBADc,IAAAX,kBAAY,CAChBY,GAAA,EAAAE,UAAS;IAEnBD;EACA;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,65 @@
|
|
|
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: !0
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
__copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
+
value: !0
|
|
20
|
+
}), mod);
|
|
21
|
+
var gestureState_exports = {};
|
|
22
|
+
__export(gestureState_exports, {
|
|
23
|
+
getGestureHandler: () => getGestureHandler
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(gestureState_exports);
|
|
26
|
+
var import_globalState = require("./globalState.cjs");
|
|
27
|
+
const state = (0, import_globalState.createGlobalState)("gesture", {
|
|
28
|
+
enabled: !1,
|
|
29
|
+
Gesture: null,
|
|
30
|
+
GestureDetector: null,
|
|
31
|
+
ScrollView: null
|
|
32
|
+
});
|
|
33
|
+
function getGestureHandler() {
|
|
34
|
+
return {
|
|
35
|
+
get isEnabled() {
|
|
36
|
+
return state.get().enabled;
|
|
37
|
+
},
|
|
38
|
+
get state() {
|
|
39
|
+
return state.get();
|
|
40
|
+
},
|
|
41
|
+
set(updates) {
|
|
42
|
+
Object.assign(state.get(), updates);
|
|
43
|
+
},
|
|
44
|
+
disable() {
|
|
45
|
+
state.get().enabled = !1;
|
|
46
|
+
},
|
|
47
|
+
createPressGesture(config) {
|
|
48
|
+
const {
|
|
49
|
+
Gesture
|
|
50
|
+
} = state.get();
|
|
51
|
+
if (!Gesture) return null;
|
|
52
|
+
const longPressDuration = config.delayLongPress ?? 500,
|
|
53
|
+
tap = Gesture.Tap().runOnJS(!0).maxDuration(1e4).onBegin(e => {
|
|
54
|
+
config.onPressIn?.(e);
|
|
55
|
+
}).onEnd(e => {
|
|
56
|
+
config.onPress?.(e);
|
|
57
|
+
}).onFinalize(e => {
|
|
58
|
+
config.onPressOut?.(e);
|
|
59
|
+
});
|
|
60
|
+
if (config.hitSlop && tap.hitSlop(config.hitSlop), !config.onLongPress) return tap;
|
|
61
|
+
const longPress = Gesture.LongPress().runOnJS(!0).minDuration(longPressDuration).onBegin(e => config.onPressIn?.(e)).onStart(e => config.onLongPress?.(e)).onFinalize(e => config.onPressOut?.(e));
|
|
62
|
+
return config.hitSlop && longPress.hitSlop(config.hitSlop), Gesture.Exclusive(longPress, tap);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
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: !0
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
__copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: !0
|
|
22
|
+
}), mod);
|
|
23
|
+
var gestureState_exports = {};
|
|
24
|
+
__export(gestureState_exports, {
|
|
25
|
+
getGestureHandler: () => getGestureHandler
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(gestureState_exports);
|
|
28
|
+
var import_globalState = require("./globalState.native.js"),
|
|
29
|
+
state = (0, import_globalState.createGlobalState)("gesture", {
|
|
30
|
+
enabled: !1,
|
|
31
|
+
Gesture: null,
|
|
32
|
+
GestureDetector: null,
|
|
33
|
+
ScrollView: null
|
|
34
|
+
});
|
|
35
|
+
function getGestureHandler() {
|
|
36
|
+
return {
|
|
37
|
+
get isEnabled() {
|
|
38
|
+
return state.get().enabled;
|
|
39
|
+
},
|
|
40
|
+
get state() {
|
|
41
|
+
return state.get();
|
|
42
|
+
},
|
|
43
|
+
set(updates) {
|
|
44
|
+
Object.assign(state.get(), updates);
|
|
45
|
+
},
|
|
46
|
+
disable() {
|
|
47
|
+
state.get().enabled = !1;
|
|
48
|
+
},
|
|
49
|
+
createPressGesture(config) {
|
|
50
|
+
var {
|
|
51
|
+
Gesture
|
|
52
|
+
} = state.get();
|
|
53
|
+
if (!Gesture) return null;
|
|
54
|
+
var _config_delayLongPress,
|
|
55
|
+
longPressDuration = (_config_delayLongPress = config.delayLongPress) !== null && _config_delayLongPress !== void 0 ? _config_delayLongPress : 500,
|
|
56
|
+
tap = Gesture.Tap().runOnJS(!0).maxDuration(1e4).onBegin(function (e) {
|
|
57
|
+
var _config_onPressIn;
|
|
58
|
+
(_config_onPressIn = config.onPressIn) === null || _config_onPressIn === void 0 || _config_onPressIn.call(config, e);
|
|
59
|
+
}).onEnd(function (e) {
|
|
60
|
+
var _config_onPress;
|
|
61
|
+
(_config_onPress = config.onPress) === null || _config_onPress === void 0 || _config_onPress.call(config, e);
|
|
62
|
+
}).onFinalize(function (e) {
|
|
63
|
+
var _config_onPressOut;
|
|
64
|
+
(_config_onPressOut = config.onPressOut) === null || _config_onPressOut === void 0 || _config_onPressOut.call(config, e);
|
|
65
|
+
});
|
|
66
|
+
if (config.hitSlop && tap.hitSlop(config.hitSlop), !config.onLongPress) return tap;
|
|
67
|
+
var longPress = Gesture.LongPress().runOnJS(!0).minDuration(longPressDuration).onBegin(function (e) {
|
|
68
|
+
var _config_onPressIn;
|
|
69
|
+
return (_config_onPressIn = config.onPressIn) === null || _config_onPressIn === void 0 ? void 0 : _config_onPressIn.call(config, e);
|
|
70
|
+
}).onStart(function (e) {
|
|
71
|
+
var _config_onLongPress;
|
|
72
|
+
return (_config_onLongPress = config.onLongPress) === null || _config_onLongPress === void 0 ? void 0 : _config_onLongPress.call(config, e);
|
|
73
|
+
}).onFinalize(function (e) {
|
|
74
|
+
var _config_onPressOut;
|
|
75
|
+
return (_config_onPressOut = config.onPressOut) === null || _config_onPressOut === void 0 ? void 0 : _config_onPressOut.call(config, e);
|
|
76
|
+
});
|
|
77
|
+
return config.hitSlop && longPress.hitSlop(config.hitSlop), Gesture.Exclusive(longPress, tap);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=gestureState.native.js.map
|
|
@@ -0,0 +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,GAAAT,YAAkC,CAAAK,oBAAA;AAGlC,IAAAK,kBAAc,GAAAC,OAAA;EAAAC,KAAgC,OAAAF,kBAAW,CAAAG,iBAAA;IACvDC,OAAA,EAAS;IACTC,OAAA,EAAS;IACTC,eAAA,EAAiB;IACjBC,UAAA,EAAY;EACd,CAAC;AA0BM,SAASV,kBAAA,EAA4C;EAC1D,OAAO;IACL,IAAIW,UAAA,EAAqB;MACvB,OAAON,KAAA,CAAMO,GAAA,CAAI,EAAEL,OAAA;IACrB;IACA,IAAIF,MAAA,EAAsB;MACxB,OAAOA,KAAA,CAAMO,GAAA,CAAI;IACnB;IACAC,IAAIC,OAAA,EAAsC;MACxCC,MAAA,CAAOC,MAAA,CAAOX,KAAA,CAAMO,GAAA,CAAI,GAAGE,OAAO;IACpC;IAEAG,QAAA,EAAgB;MACdZ,KAAA,CAAMO,GAAA,CAAI,EAAEL,OAAA,GAAU;IACxB;IAEAW,mBAAmBC,MAAA,EAAiC;MAClD;QAAMX;MAAE,IAAQH,KAAI,CAAAO,GAAM;MAC1B,IAAI,CAACJ,OAAA,EAAS,OAAO;MAErB,IAAAY,sBAA0B;QAAAC,iBAAO,IAAAD,sBAIb,GAAID,MACrB,CAAAG,cACA,MAAY,IACZ,IAAAF,sBAAoB,cAAAA,sBAAA;QAAAG,GAAA,GAAAf,OAAA,CAAAgB,GAAA,GAAAC,OAAA,KAAAC,WAAA,MAAAC,OAAA,WAAAC,CAAA;UACnB,IAAAC,iBAAoB;UACrB,CACAA,iBAAkB,GAAAV,MAAA,CAAAW,SAAA,cAAAD,iBAAA,eAAAA,iBAAA,CAAAE,IAAA,CAAAZ,MAAA,EAAAS,CAAA;QACjB,GAAAI,KAAA,CAAO,UAAAJ,CAAU,EAAC;UACnB,IACAK,eAAuB;UACtB,CAAAA,eAAO,GAAAd,MAAc,CAAAe,OAAA,cAAAD,eAAA,eAAAA,eAAA,CAAAF,IAAA,CAAAZ,MAAA,EAAAS,CAAA;QACvB,CAAC,EAAAO,UAAA,WAAAP,CAAA;UAKH,IAHIQ,kBAAgB;UAMpB,CAAAA,kBAAkB,GAAAjB,MAAQ,CAAAkB,UACvB,MAAQ,IACR,IAAAD,kBAAY,UACZ,KAAAA,kBAA2B,CAAAL,IAAA,CAAAZ,MAAc,EACzCS,CAAA;QAGH;MAIF,IAAAT,MAAA,CAAAmB,OAAA,IAAAf,GAAA,CAAAe,OAAA,CAAAnB,MAAA,CAAAmB,OAAA,IAAAnB,MAAA,CAAAoB,WAAA,SAAAhB,GAAA;MACF,IAAAiB,SAAA,GAAAhC,OAAA,CAAAiC,SAAA,GAAAhB,OAAA,KAAAiB,WAAA,CAAArB,iBAAA,EAAAM,OAAA,WAAAC,CAAA;QACF,IAAAC,iBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,39 @@
|
|
|
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: !0
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
__copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
+
value: !0
|
|
20
|
+
}), mod);
|
|
21
|
+
var globalState_exports = {};
|
|
22
|
+
__export(globalState_exports, {
|
|
23
|
+
createGlobalState: () => createGlobalState
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(globalState_exports);
|
|
26
|
+
function createGlobalState(key, defaultValue) {
|
|
27
|
+
const GLOBAL_KEY = `__gui_${key}__`;
|
|
28
|
+
function getGlobalState() {
|
|
29
|
+
const g = globalThis;
|
|
30
|
+
return g[GLOBAL_KEY] || (g[GLOBAL_KEY] = defaultValue), g[GLOBAL_KEY];
|
|
31
|
+
}
|
|
32
|
+
function setGlobalState(newState) {
|
|
33
|
+
globalThis[GLOBAL_KEY] = newState;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
get: getGlobalState,
|
|
37
|
+
set: setGlobalState
|
|
38
|
+
};
|
|
39
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
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: !0
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
__copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: !0
|
|
22
|
+
}), mod);
|
|
23
|
+
var globalState_exports = {};
|
|
24
|
+
__export(globalState_exports, {
|
|
25
|
+
createGlobalState: () => createGlobalState
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(globalState_exports);
|
|
28
|
+
function createGlobalState(key, defaultValue) {
|
|
29
|
+
var GLOBAL_KEY = `__gui_${key}__`;
|
|
30
|
+
function getGlobalState() {
|
|
31
|
+
var g = globalThis;
|
|
32
|
+
return g[GLOBAL_KEY] || (g[GLOBAL_KEY] = defaultValue), g[GLOBAL_KEY];
|
|
33
|
+
}
|
|
34
|
+
function setGlobalState(newState) {
|
|
35
|
+
globalThis[GLOBAL_KEY] = newState;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
get: getGlobalState,
|
|
39
|
+
set: setGlobalState
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=globalState.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","globalState_exports","__export","createGlobalState","module","exports","key","defaultValue","GLOBAL_KEY","getGlobalState","g","globalThis","setGlobalState","newState","get","set"],"sources":["../../src/globalState.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,mBAAA;AAAAC,QAAA,CAAAD,mBAAA;EAAAE,iBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAOC,MAAA,CAAAC,OAAS,GAAAT,YACd,CAAAK,mBAKA;AACA,SAAME,iBAAaA,CAAAG,GAAS,EAAAC,YAAG;EAM/B,IAAAC,UAAS,YAAoBF,GAAA;EAC3B,SAAMG,cAAIA,CAAA;IACV,IAAAC,CAAA,GAAKC,UAAE;IAMT,OAAAD,CAAA,CAAAF,UAAA,MAAAE,CAAA,CAAAF,UAAA,IAAAD,YAAA,GAAAG,CAAA,CAAAF,UAAA;EAEA;EACG,SAACI,cAAmCA,CAAAC,QAAI;IAC3CF,UAAA,CAAAH,UAAA,IAAAK,QAAA;EAEA;EAAO,OACA;IACLC,GAAA,EAAKL,cAAA;IACPM,GAAA,EAAAH;EACF","ignoreList":[]}
|
|
@@ -0,0 +1,48 @@
|
|
|
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: !0
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
__copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
+
value: !0
|
|
20
|
+
}), mod);
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
NativeMenuContext: () => import_nativeMenuContext.NativeMenuContext,
|
|
24
|
+
NativePortal: () => import_components.NativePortal,
|
|
25
|
+
NativePortalHost: () => import_components.NativePortalHost,
|
|
26
|
+
NativePortalProvider: () => import_components.NativePortalProvider,
|
|
27
|
+
getBurnt: () => import_burntState.getBurnt,
|
|
28
|
+
getGestureHandler: () => import_gestureState.getGestureHandler,
|
|
29
|
+
getKeyboardControllerState: () => import_keyboardControllerState.getKeyboardControllerState,
|
|
30
|
+
getLinearGradient: () => import_linearGradientState.getLinearGradient,
|
|
31
|
+
getPortal: () => import_portalState.getPortal,
|
|
32
|
+
getSafeArea: () => import_safeAreaState.getSafeArea,
|
|
33
|
+
getWorklets: () => import_workletsState.getWorklets,
|
|
34
|
+
getZeego: () => import_zeegoState.getZeego,
|
|
35
|
+
isKeyboardControllerEnabled: () => import_keyboardControllerState.isKeyboardControllerEnabled,
|
|
36
|
+
setKeyboardControllerState: () => import_keyboardControllerState.setKeyboardControllerState
|
|
37
|
+
});
|
|
38
|
+
module.exports = __toCommonJS(index_exports);
|
|
39
|
+
var import_portalState = require("./portalState.cjs"),
|
|
40
|
+
import_gestureState = require("./gestureState.cjs"),
|
|
41
|
+
import_workletsState = require("./workletsState.cjs"),
|
|
42
|
+
import_safeAreaState = require("./safeAreaState.cjs"),
|
|
43
|
+
import_linearGradientState = require("./linearGradientState.cjs"),
|
|
44
|
+
import_keyboardControllerState = require("./keyboardControllerState.cjs"),
|
|
45
|
+
import_zeegoState = require("./zeegoState.cjs"),
|
|
46
|
+
import_nativeMenuContext = require("./nativeMenuContext.cjs"),
|
|
47
|
+
import_burntState = require("./burntState.cjs"),
|
|
48
|
+
import_components = require("./components.cjs");
|
|
@@ -0,0 +1,51 @@
|
|
|
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: !0
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
__copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: !0
|
|
22
|
+
}), mod);
|
|
23
|
+
var index_exports = {};
|
|
24
|
+
__export(index_exports, {
|
|
25
|
+
NativeMenuContext: () => import_nativeMenuContext.NativeMenuContext,
|
|
26
|
+
NativePortal: () => import_components.NativePortal,
|
|
27
|
+
NativePortalHost: () => import_components.NativePortalHost,
|
|
28
|
+
NativePortalProvider: () => import_components.NativePortalProvider,
|
|
29
|
+
getBurnt: () => import_burntState.getBurnt,
|
|
30
|
+
getGestureHandler: () => import_gestureState.getGestureHandler,
|
|
31
|
+
getKeyboardControllerState: () => import_keyboardControllerState.getKeyboardControllerState,
|
|
32
|
+
getLinearGradient: () => import_linearGradientState.getLinearGradient,
|
|
33
|
+
getPortal: () => import_portalState.getPortal,
|
|
34
|
+
getSafeArea: () => import_safeAreaState.getSafeArea,
|
|
35
|
+
getWorklets: () => import_workletsState.getWorklets,
|
|
36
|
+
getZeego: () => import_zeegoState.getZeego,
|
|
37
|
+
isKeyboardControllerEnabled: () => import_keyboardControllerState.isKeyboardControllerEnabled,
|
|
38
|
+
setKeyboardControllerState: () => import_keyboardControllerState.setKeyboardControllerState
|
|
39
|
+
});
|
|
40
|
+
module.exports = __toCommonJS(index_exports);
|
|
41
|
+
var import_portalState = require("./portalState.native.js"),
|
|
42
|
+
import_gestureState = require("./gestureState.native.js"),
|
|
43
|
+
import_workletsState = require("./workletsState.native.js"),
|
|
44
|
+
import_safeAreaState = require("./safeAreaState.native.js"),
|
|
45
|
+
import_linearGradientState = require("./linearGradientState.native.js"),
|
|
46
|
+
import_keyboardControllerState = require("./keyboardControllerState.native.js"),
|
|
47
|
+
import_zeegoState = require("./zeegoState.native.js"),
|
|
48
|
+
import_nativeMenuContext = require("./nativeMenuContext.native.js"),
|
|
49
|
+
import_burntState = require("./burntState.native.js"),
|
|
50
|
+
import_components = require("./components.native.js");
|
|
51
|
+
//# sourceMappingURL=index.native.js.map
|
|
@@ -0,0 +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"],"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,GAAAhC,YAA0B,CAAAK,aAAA","ignoreList":[]}
|
|
@@ -0,0 +1,47 @@
|
|
|
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: !0
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
__copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
+
value: !0
|
|
20
|
+
}), mod);
|
|
21
|
+
var keyboardControllerState_exports = {};
|
|
22
|
+
__export(keyboardControllerState_exports, {
|
|
23
|
+
getKeyboardControllerState: () => getKeyboardControllerState,
|
|
24
|
+
isKeyboardControllerEnabled: () => isKeyboardControllerEnabled,
|
|
25
|
+
setKeyboardControllerState: () => setKeyboardControllerState
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(keyboardControllerState_exports);
|
|
28
|
+
var import_globalState = require("./globalState.cjs");
|
|
29
|
+
const state = (0, import_globalState.createGlobalState)("keyboard_controller", {
|
|
30
|
+
enabled: !1,
|
|
31
|
+
KeyboardProvider: null,
|
|
32
|
+
KeyboardAwareScrollView: null,
|
|
33
|
+
useKeyboardHandler: null,
|
|
34
|
+
useReanimatedKeyboardAnimation: null,
|
|
35
|
+
KeyboardController: null,
|
|
36
|
+
KeyboardEvents: null,
|
|
37
|
+
KeyboardStickyView: null
|
|
38
|
+
});
|
|
39
|
+
function isKeyboardControllerEnabled() {
|
|
40
|
+
return state.get().enabled;
|
|
41
|
+
}
|
|
42
|
+
function getKeyboardControllerState() {
|
|
43
|
+
return state.get();
|
|
44
|
+
}
|
|
45
|
+
function setKeyboardControllerState(updates) {
|
|
46
|
+
Object.assign(state.get(), updates);
|
|
47
|
+
}
|