@tamagui/use-keyboard-visible 2.7.7 → 3.0.0-beta.643.1
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/index.cjs +15 -18
- package/dist/cjs/index.native.cjs +27 -0
- package/dist/cjs/index.native.js +15 -17
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/useKeyboardVisible.cjs +32 -40
- package/dist/cjs/useKeyboardVisible.native.cjs +50 -0
- package/dist/cjs/useKeyboardVisible.native.js +33 -40
- package/dist/cjs/useKeyboardVisible.native.js.map +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.mjs +2 -2
- package/dist/esm/index.native.js +2 -2
- package/dist/esm/useKeyboardVisible.mjs +16 -14
- package/dist/esm/useKeyboardVisible.mjs.map +1 -1
- package/dist/esm/useKeyboardVisible.native.js +17 -15
- package/dist/esm/useKeyboardVisible.native.js.map +1 -1
- package/package.json +5 -4
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js.map +0 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,28 +1,25 @@
|
|
|
1
|
+
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
6
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
for (var name in all) __defProp(target, name, {
|
|
8
|
+
get: all[name],
|
|
9
|
+
enumerable: true
|
|
10
|
+
});
|
|
10
11
|
};
|
|
11
12
|
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
19
20
|
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: true
|
|
22
|
-
}), mod);
|
|
21
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
22
|
var index_exports = {};
|
|
24
|
-
__export(index_exports, {
|
|
25
|
-
useKeyboardVisible: () => import_useKeyboardVisible.useKeyboardVisible
|
|
26
|
-
});
|
|
23
|
+
__export(index_exports, { useKeyboardVisible: () => import_useKeyboardVisible.useKeyboardVisible });
|
|
27
24
|
module.exports = __toCommonJS(index_exports);
|
|
28
|
-
var import_useKeyboardVisible = require("./useKeyboardVisible.cjs");
|
|
25
|
+
var import_useKeyboardVisible = require("./useKeyboardVisible.cjs");
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all) __defProp(target, name, {
|
|
10
|
+
get: all[name],
|
|
11
|
+
enumerable: true
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
var __copyProps = (to, from, except, desc) => {
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
|
+
get: () => from[key],
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
24
|
+
var index_exports = {};
|
|
25
|
+
__export(index_exports, { useKeyboardVisible: () => import_useKeyboardVisible.useKeyboardVisible });
|
|
26
|
+
module.exports = __toCommonJS(index_exports);
|
|
27
|
+
var import_useKeyboardVisible = require("./useKeyboardVisible.native.js");
|
package/dist/cjs/index.native.js
CHANGED
|
@@ -1,31 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
8
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
for (var name in all) __defProp(target, name, {
|
|
10
|
+
get: all[name],
|
|
11
|
+
enumerable: true
|
|
12
|
+
});
|
|
12
13
|
};
|
|
13
14
|
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
|
+
get: () => from[key],
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
21
22
|
};
|
|
22
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
-
value: true
|
|
24
|
-
}), mod);
|
|
23
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
24
|
var index_exports = {};
|
|
26
|
-
__export(index_exports, {
|
|
27
|
-
useKeyboardVisible: () => import_useKeyboardVisible.useKeyboardVisible
|
|
28
|
-
});
|
|
25
|
+
__export(index_exports, { useKeyboardVisible: () => import_useKeyboardVisible.useKeyboardVisible });
|
|
29
26
|
module.exports = __toCommonJS(index_exports);
|
|
30
27
|
var import_useKeyboardVisible = require("./useKeyboardVisible.native.js");
|
|
28
|
+
|
|
31
29
|
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.native.js","names":[],"sources":["cjs/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\n__export(index_exports, {\n useKeyboardVisible: () => import_useKeyboardVisible.useKeyboardVisible\n});\nmodule.exports = __toCommonJS(index_exports);\nvar import_useKeyboardVisible = require(\"./useKeyboardVisible\");\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,SAAS,eAAe,EACtB,0BAA0B,0BAA0B,mBACtD,CAAC;AACD,OAAO,UAAU,aAAa,aAAa;AAC3C,IAAI,4BAA4B,QAAQ,gCAAsB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
|
|
1
2
|
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -5,52 +6,43 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
5
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
8
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
for (var name in all) __defProp(target, name, {
|
|
10
|
+
get: all[name],
|
|
11
|
+
enumerable: true
|
|
12
|
+
});
|
|
12
13
|
};
|
|
13
14
|
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
|
+
get: () => from[key],
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
21
22
|
};
|
|
22
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
-
|
|
24
|
-
|
|
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
|
|
23
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
24
|
+
value: mod,
|
|
25
|
+
enumerable: true
|
|
30
26
|
}) : target, mod));
|
|
31
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
32
|
-
value: true
|
|
33
|
-
}), mod);
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
34
28
|
var useKeyboardVisible_exports = {};
|
|
35
|
-
__export(useKeyboardVisible_exports, {
|
|
36
|
-
useKeyboardVisible: () => useKeyboardVisible
|
|
37
|
-
});
|
|
29
|
+
__export(useKeyboardVisible_exports, { useKeyboardVisible: () => useKeyboardVisible });
|
|
38
30
|
module.exports = __toCommonJS(useKeyboardVisible_exports);
|
|
39
31
|
var import_react = __toESM(require("react"), 1);
|
|
40
32
|
var import_react_native = require("react-native-web");
|
|
41
33
|
const useKeyboardVisible = () => {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
};
|
|
34
|
+
const [isKeyboardVisible, setKeyboardVisible] = import_react.default.useState(false);
|
|
35
|
+
import_react.default.useEffect(() => {
|
|
36
|
+
const keyboardDidShowListener = import_react_native.Keyboard.addListener("keyboardDidShow", () => {
|
|
37
|
+
setKeyboardVisible(true);
|
|
38
|
+
});
|
|
39
|
+
const keyboardDidHideListener = import_react_native.Keyboard.addListener("keyboardDidHide", () => {
|
|
40
|
+
setKeyboardVisible(false);
|
|
41
|
+
});
|
|
42
|
+
return () => {
|
|
43
|
+
keyboardDidHideListener.remove();
|
|
44
|
+
keyboardDidShowListener.remove();
|
|
45
|
+
};
|
|
46
|
+
}, []);
|
|
47
|
+
return isKeyboardVisible;
|
|
48
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __export = (target, all) => {
|
|
11
|
+
for (var name in all) __defProp(target, name, {
|
|
12
|
+
get: all[name],
|
|
13
|
+
enumerable: true
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
var __copyProps = (to, from, except, desc) => {
|
|
17
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
18
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
19
|
+
get: () => from[key],
|
|
20
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
return to;
|
|
24
|
+
};
|
|
25
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
26
|
+
value: mod,
|
|
27
|
+
enumerable: true
|
|
28
|
+
}) : target, mod));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
var useKeyboardVisible_exports = {};
|
|
31
|
+
__export(useKeyboardVisible_exports, { useKeyboardVisible: () => useKeyboardVisible });
|
|
32
|
+
module.exports = __toCommonJS(useKeyboardVisible_exports);
|
|
33
|
+
var import_react = __toESM(require("react"), 1);
|
|
34
|
+
var import_react_native = require("react-native");
|
|
35
|
+
var useKeyboardVisible = function() {
|
|
36
|
+
var [isKeyboardVisible, setKeyboardVisible] = import_react.default.useState(false);
|
|
37
|
+
import_react.default.useEffect(function() {
|
|
38
|
+
var keyboardDidShowListener = import_react_native.Keyboard.addListener("keyboardDidShow", function() {
|
|
39
|
+
setKeyboardVisible(true);
|
|
40
|
+
});
|
|
41
|
+
var keyboardDidHideListener = import_react_native.Keyboard.addListener("keyboardDidHide", function() {
|
|
42
|
+
setKeyboardVisible(false);
|
|
43
|
+
});
|
|
44
|
+
return function() {
|
|
45
|
+
keyboardDidHideListener.remove();
|
|
46
|
+
keyboardDidShowListener.remove();
|
|
47
|
+
};
|
|
48
|
+
}, []);
|
|
49
|
+
return isKeyboardVisible;
|
|
50
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
|
|
3
4
|
var __create = Object.create;
|
|
4
5
|
var __defProp = Object.defineProperty;
|
|
5
6
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -7,53 +8,45 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
7
8
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
9
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
10
|
var __export = (target, all) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
for (var name in all) __defProp(target, name, {
|
|
12
|
+
get: all[name],
|
|
13
|
+
enumerable: true
|
|
14
|
+
});
|
|
14
15
|
};
|
|
15
16
|
var __copyProps = (to, from, except, desc) => {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
18
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
19
|
+
get: () => from[key],
|
|
20
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
return to;
|
|
23
24
|
};
|
|
24
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
25
|
-
|
|
26
|
-
|
|
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
|
|
25
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
26
|
+
value: mod,
|
|
27
|
+
enumerable: true
|
|
32
28
|
}) : target, mod));
|
|
33
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
34
|
-
value: true
|
|
35
|
-
}), mod);
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
36
30
|
var useKeyboardVisible_exports = {};
|
|
37
|
-
__export(useKeyboardVisible_exports, {
|
|
38
|
-
useKeyboardVisible: () => useKeyboardVisible
|
|
39
|
-
});
|
|
31
|
+
__export(useKeyboardVisible_exports, { useKeyboardVisible: () => useKeyboardVisible });
|
|
40
32
|
module.exports = __toCommonJS(useKeyboardVisible_exports);
|
|
41
33
|
var import_react = __toESM(require("react"), 1);
|
|
42
34
|
var import_react_native = require("react-native");
|
|
43
|
-
var useKeyboardVisible = function
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
35
|
+
var useKeyboardVisible = function() {
|
|
36
|
+
var [isKeyboardVisible, setKeyboardVisible] = import_react.default.useState(false);
|
|
37
|
+
import_react.default.useEffect(function() {
|
|
38
|
+
var keyboardDidShowListener = import_react_native.Keyboard.addListener("keyboardDidShow", function() {
|
|
39
|
+
setKeyboardVisible(true);
|
|
40
|
+
});
|
|
41
|
+
var keyboardDidHideListener = import_react_native.Keyboard.addListener("keyboardDidHide", function() {
|
|
42
|
+
setKeyboardVisible(false);
|
|
43
|
+
});
|
|
44
|
+
return function() {
|
|
45
|
+
keyboardDidHideListener.remove();
|
|
46
|
+
keyboardDidShowListener.remove();
|
|
47
|
+
};
|
|
48
|
+
}, []);
|
|
49
|
+
return isKeyboardVisible;
|
|
58
50
|
};
|
|
51
|
+
|
|
59
52
|
//# sourceMappingURL=useKeyboardVisible.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"useKeyboardVisible.native.js","names":[],"sources":["cjs/useKeyboardVisible.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar useKeyboardVisible_exports = {};\n__export(useKeyboardVisible_exports, {\n useKeyboardVisible: () => useKeyboardVisible\n});\nmodule.exports = __toCommonJS(useKeyboardVisible_exports);\nvar import_react = __toESM(require(\"react\"), 1);\nvar import_react_native = require(\"react-native\");\nvar useKeyboardVisible = function() {\n var [isKeyboardVisible, setKeyboardVisible] = import_react.default.useState(false);\n import_react.default.useEffect(function() {\n var keyboardDidShowListener = import_react_native.Keyboard.addListener(\"keyboardDidShow\", function() {\n setKeyboardVisible(true);\n });\n var keyboardDidHideListener = import_react_native.Keyboard.addListener(\"keyboardDidHide\", function() {\n setKeyboardVisible(false);\n });\n return function() {\n keyboardDidHideListener.remove();\n keyboardDidShowListener.remove();\n };\n }, []);\n return isKeyboardVisible;\n};\n//# sourceMappingURL=useKeyboardVisible.js.map\n"],"mappings":";;;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,WAAW,KAAK,YAAY,YAAY,SAAS,OAAO,OAAO,SAAS,aAAa,GAAG,CAAC,IAAI,CAAC,GAAG,YAKnG,cAAc,CAAC,OAAO,CAAC,IAAI,aAAa,UAAU,QAAQ,WAAW;CAAE,OAAO;CAAK,YAAY;AAAK,CAAC,IAAI,QACzG,GACF;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,6BAA6B,CAAC;AAClC,SAAS,4BAA4B,EACnC,0BAA0B,mBAC5B,CAAC;AACD,OAAO,UAAU,aAAa,0BAA0B;AACxD,IAAI,eAAe,QAAQ,QAAQ,OAAO,GAAG,CAAC;AAC9C,IAAI,sBAAsB,QAAQ,cAAc;AAChD,IAAI,qBAAqB,WAAW;CAClC,IAAI,CAAC,mBAAmB,sBAAsB,aAAa,QAAQ,SAAS,KAAK;CACjF,aAAa,QAAQ,UAAU,WAAW;EACxC,IAAI,0BAA0B,oBAAoB,SAAS,YAAY,mBAAmB,WAAW;GACnG,mBAAmB,IAAI;EACzB,CAAC;EACD,IAAI,0BAA0B,oBAAoB,SAAS,YAAY,mBAAmB,WAAW;GACnG,mBAAmB,KAAK;EAC1B,CAAC;EACD,OAAO,WAAW;GAChB,wBAAwB,OAAO;GAC/B,wBAAwB,OAAO;EACjC;CACF,GAAG,CAAC,CAAC;CACL,OAAO;AACT"}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { useKeyboardVisible } from "./useKeyboardVisible.mjs";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
|
|
3
|
+
export { useKeyboardVisible };
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { useKeyboardVisible } from "./useKeyboardVisible.mjs";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
|
|
3
|
+
export { useKeyboardVisible };
|
package/dist/esm/index.native.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { useKeyboardVisible } from "./useKeyboardVisible.native.js";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
|
|
3
|
+
export { useKeyboardVisible };
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Keyboard } from "react-native-web";
|
|
3
|
+
|
|
3
4
|
const useKeyboardVisible = () => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
5
|
+
const [isKeyboardVisible, setKeyboardVisible] = React.useState(false);
|
|
6
|
+
React.useEffect(() => {
|
|
7
|
+
const keyboardDidShowListener = Keyboard.addListener("keyboardDidShow", () => {
|
|
8
|
+
setKeyboardVisible(true);
|
|
9
|
+
});
|
|
10
|
+
const keyboardDidHideListener = Keyboard.addListener("keyboardDidHide", () => {
|
|
11
|
+
setKeyboardVisible(false);
|
|
12
|
+
});
|
|
13
|
+
return () => {
|
|
14
|
+
keyboardDidHideListener.remove();
|
|
15
|
+
keyboardDidShowListener.remove();
|
|
16
|
+
};
|
|
17
|
+
}, []);
|
|
18
|
+
return isKeyboardVisible;
|
|
18
19
|
};
|
|
20
|
+
|
|
19
21
|
export { useKeyboardVisible };
|
|
20
22
|
//# sourceMappingURL=useKeyboardVisible.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"useKeyboardVisible.js","names":[],"sources":["esm/useKeyboardVisible.js"],"sourcesContent":["import React from \"react\";\nimport { Keyboard } from \"react-native-web\";\nconst useKeyboardVisible = () => {\n const [isKeyboardVisible, setKeyboardVisible] = React.useState(false);\n React.useEffect(() => {\n const keyboardDidShowListener = Keyboard.addListener(\"keyboardDidShow\", () => {\n setKeyboardVisible(true);\n });\n const keyboardDidHideListener = Keyboard.addListener(\"keyboardDidHide\", () => {\n setKeyboardVisible(false);\n });\n return () => {\n keyboardDidHideListener.remove();\n keyboardDidShowListener.remove();\n };\n }, []);\n return isKeyboardVisible;\n};\nexport {\n useKeyboardVisible\n};\n//# sourceMappingURL=useKeyboardVisible.js.map\n"],"mappings":";;;;AAEA,MAAM,2BAA2B;CAC/B,MAAM,CAAC,mBAAmB,sBAAsB,MAAM,SAAS,KAAK;CACpE,MAAM,gBAAgB;EACpB,MAAM,0BAA0B,SAAS,YAAY,yBAAyB;GAC5E,mBAAmB,IAAI;EACzB,CAAC;EACD,MAAM,0BAA0B,SAAS,YAAY,yBAAyB;GAC5E,mBAAmB,KAAK;EAC1B,CAAC;EACD,aAAa;GACX,wBAAwB,OAAO;GAC/B,wBAAwB,OAAO;EACjC;CACF,GAAG,CAAC,CAAC;CACL,OAAO;AACT"}
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Keyboard } from "react-native";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
3
|
+
|
|
4
|
+
var useKeyboardVisible = function() {
|
|
5
|
+
var [isKeyboardVisible, setKeyboardVisible] = React.useState(false);
|
|
6
|
+
React.useEffect(function() {
|
|
7
|
+
var keyboardDidShowListener = Keyboard.addListener("keyboardDidShow", function() {
|
|
8
|
+
setKeyboardVisible(true);
|
|
9
|
+
});
|
|
10
|
+
var keyboardDidHideListener = Keyboard.addListener("keyboardDidHide", function() {
|
|
11
|
+
setKeyboardVisible(false);
|
|
12
|
+
});
|
|
13
|
+
return function() {
|
|
14
|
+
keyboardDidHideListener.remove();
|
|
15
|
+
keyboardDidShowListener.remove();
|
|
16
|
+
};
|
|
17
|
+
}, []);
|
|
18
|
+
return isKeyboardVisible;
|
|
18
19
|
};
|
|
20
|
+
|
|
19
21
|
export { useKeyboardVisible };
|
|
20
22
|
//# sourceMappingURL=useKeyboardVisible.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"useKeyboardVisible.native.js","names":[],"sources":["esm/useKeyboardVisible.native.js"],"sourcesContent":["import React from \"react\";\nimport { Keyboard } from \"react-native\";\nvar useKeyboardVisible = function() {\n var [isKeyboardVisible, setKeyboardVisible] = React.useState(false);\n React.useEffect(function() {\n var keyboardDidShowListener = Keyboard.addListener(\"keyboardDidShow\", function() {\n setKeyboardVisible(true);\n });\n var keyboardDidHideListener = Keyboard.addListener(\"keyboardDidHide\", function() {\n setKeyboardVisible(false);\n });\n return function() {\n keyboardDidHideListener.remove();\n keyboardDidShowListener.remove();\n };\n }, []);\n return isKeyboardVisible;\n};\nexport {\n useKeyboardVisible\n};\n//# sourceMappingURL=useKeyboardVisible.js.map\n"],"mappings":";;;;AAEA,IAAI,qBAAqB,WAAW;CAClC,IAAI,CAAC,mBAAmB,sBAAsB,MAAM,SAAS,KAAK;CAClE,MAAM,UAAU,WAAW;EACzB,IAAI,0BAA0B,SAAS,YAAY,mBAAmB,WAAW;GAC/E,mBAAmB,IAAI;EACzB,CAAC;EACD,IAAI,0BAA0B,SAAS,YAAY,mBAAmB,WAAW;GAC/E,mBAAmB,KAAK;EAC1B,CAAC;EACD,OAAO,WAAW;GAChB,wBAAwB,OAAO;GAC/B,wBAAwB,OAAO;EACjC;CACF,GAAG,CAAC,CAAC;CACL,OAAO;AACT"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/use-keyboard-visible",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-beta.643.1",
|
|
4
4
|
"gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
|
|
5
5
|
"files": [
|
|
6
6
|
"src",
|
|
@@ -34,12 +34,13 @@
|
|
|
34
34
|
"clean:build": "tamagui-build clean:build"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@tamagui/build": "
|
|
37
|
+
"@tamagui/build": "3.0.0-beta.643.1",
|
|
38
38
|
"react": ">=19",
|
|
39
|
-
"react-native": "0.
|
|
39
|
+
"react-native": "0.86.2"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"react": ">=19"
|
|
42
|
+
"react": ">=19",
|
|
43
|
+
"react-native-web": "*"
|
|
43
44
|
},
|
|
44
45
|
"repository": {
|
|
45
46
|
"type": "git",
|
package/dist/esm/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useKeyboardVisible"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,kBAAA,QAA0B","ignoreList":[]}
|
package/dist/esm/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useKeyboardVisible"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,kBAAA,QAA0B","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useKeyboardVisible"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,kBAAA,QAA0B","ignoreList":[]}
|