@tamagui/use-keyboard-visible 1.88.22 → 1.88.23
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/esm/index.native.js
CHANGED
|
@@ -1,26 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
-
return to;
|
|
14
|
-
};
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
-
var src_exports = {};
|
|
17
|
-
__export(src_exports, {
|
|
18
|
-
useKeyboardVisible: () => import_useKeyboardVisible.useKeyboardVisible
|
|
19
|
-
});
|
|
20
|
-
module.exports = __toCommonJS(src_exports);
|
|
21
|
-
var import_useKeyboardVisible = require("./useKeyboardVisible");
|
|
22
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
23
|
-
0 && (module.exports = {
|
|
1
|
+
import { useKeyboardVisible } from "./useKeyboardVisible";
|
|
2
|
+
export {
|
|
24
3
|
useKeyboardVisible
|
|
25
|
-
}
|
|
4
|
+
};
|
|
26
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,30 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
-
return to;
|
|
14
|
-
};
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
-
var useKeyboardVisible_exports = {};
|
|
17
|
-
__export(useKeyboardVisible_exports, {
|
|
18
|
-
useKeyboardVisible: () => useKeyboardVisible
|
|
19
|
-
});
|
|
20
|
-
module.exports = __toCommonJS(useKeyboardVisible_exports);
|
|
21
|
-
var import_react = require("react"), import_react_native = require("react-native");
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
|
+
import { Keyboard } from "react-native";
|
|
22
3
|
const useKeyboardVisible = () => {
|
|
23
|
-
const [isKeyboardVisible, setKeyboardVisible] =
|
|
24
|
-
return
|
|
25
|
-
const keyboardDidShowListener =
|
|
4
|
+
const [isKeyboardVisible, setKeyboardVisible] = useState(!1);
|
|
5
|
+
return useEffect(() => {
|
|
6
|
+
const keyboardDidShowListener = Keyboard.addListener("keyboardDidShow", () => {
|
|
26
7
|
setKeyboardVisible(!0);
|
|
27
|
-
}), keyboardDidHideListener =
|
|
8
|
+
}), keyboardDidHideListener = Keyboard.addListener("keyboardDidHide", () => {
|
|
28
9
|
setKeyboardVisible(!1);
|
|
29
10
|
});
|
|
30
11
|
return () => {
|
|
@@ -32,8 +13,7 @@ const useKeyboardVisible = () => {
|
|
|
32
13
|
};
|
|
33
14
|
}, []), isKeyboardVisible;
|
|
34
15
|
};
|
|
35
|
-
|
|
36
|
-
0 && (module.exports = {
|
|
16
|
+
export {
|
|
37
17
|
useKeyboardVisible
|
|
38
|
-
}
|
|
18
|
+
};
|
|
39
19
|
//# sourceMappingURL=useKeyboardVisible.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/useKeyboardVisible.ts"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AAAA,SAAS,WAAW,gBAAgB;AACpC,SAAS,gBAAgB;AAElB,MAAM,qBAAqB,MAAM;AACtC,QAAM,CAAC,mBAAmB,kBAAkB,IAAI,SAAS,EAAK;AAE9D,mBAAU,MAAM;AACd,UAAM,0BAA0B,SAAS,YAAY,mBAAmB,MAAM;AAC5E,yBAAmB,EAAI;AAAA,IACzB,CAAC,GACK,0BAA0B,SAAS,YAAY,mBAAmB,MAAM;AAC5E,yBAAmB,EAAK;AAAA,IAC1B,CAAC;AAED,WAAO,MAAM;AACX,8BAAwB,OAAO,GAC/B,wBAAwB,OAAO;AAAA,IACjC;AAAA,EACF,GAAG,CAAC,CAAC,GAEE;AACT;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/use-keyboard-visible",
|
|
3
|
-
"version": "1.88.
|
|
3
|
+
"version": "1.88.23",
|
|
4
4
|
"types": "./types/index.d.ts",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@tamagui/build": "1.88.
|
|
30
|
+
"@tamagui/build": "1.88.23",
|
|
31
31
|
"react": "^18.2.0",
|
|
32
32
|
"react-native": "^0.72.6"
|
|
33
33
|
},
|