@tamagui/use-keyboard-visible 2.0.0-rc.9 → 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.
@@ -3,20 +3,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
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, {
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, {
13
14
  get: () => from[key],
14
15
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
16
  });
16
- return to;
17
- };
17
+ }
18
+ return to;
19
+ };
18
20
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
- value: !0
21
+ value: true
20
22
  }), mod);
21
23
  var index_exports = {};
22
24
  __export(index_exports, {
@@ -5,20 +5,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
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, {
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, {
15
16
  get: () => from[key],
16
17
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
18
  });
18
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
23
+ value: true
22
24
  }), mod);
23
25
  var index_exports = {};
24
26
  __export(index_exports, {
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","__export","useKeyboardVisible","import_useKeyboardVisible","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,kBAAA,EAAAA,CAAA,KAAAC,yBAAA,CAAAD;AAAA;AAAAE,MAAA,CAAAC,OAAA,GAAAV,YAAA,CAAAK,aAAmC","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","__export","useKeyboardVisible","import_useKeyboardVisible","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,kBAAA,EAAAA,CAAA,KAAAC,yBAAA,CAAAD;AAAA;AAAAE,MAAA,CAAAC,OAAA,GAAAV,YAAA,CAAAK,aAAmC","ignoreList":[]}
@@ -2,51 +2,55 @@ var __create = Object.create;
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf,
6
- __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
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, {
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, {
15
16
  get: () => from[key],
16
17
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
18
  });
18
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
26
- value: mod,
27
- enumerable: !0
28
- }) : target, mod)),
29
- __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
30
- value: !0
31
- }), mod);
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);
32
34
  var useKeyboardVisible_exports = {};
33
35
  __export(useKeyboardVisible_exports, {
34
36
  useKeyboardVisible: () => useKeyboardVisible
35
37
  });
36
38
  module.exports = __toCommonJS(useKeyboardVisible_exports);
37
- var import_react = __toESM(require("react"), 1),
38
- import_react_native = require("react-native-web");
39
+ var import_react = __toESM(require("react"), 1);
40
+ var import_react_native = require("react-native-web");
39
41
  const useKeyboardVisible = () => {
40
- const [isKeyboardVisible, setKeyboardVisible] = import_react.default.useState(!1);
41
- return import_react.default.useEffect(() => {
42
+ const [isKeyboardVisible, setKeyboardVisible] = import_react.default.useState(false);
43
+ import_react.default.useEffect(() => {
42
44
  const keyboardDidShowListener = import_react_native.Keyboard.addListener("keyboardDidShow", () => {
43
- setKeyboardVisible(!0);
44
- }),
45
- keyboardDidHideListener = import_react_native.Keyboard.addListener("keyboardDidHide", () => {
46
- setKeyboardVisible(!1);
47
- });
45
+ setKeyboardVisible(true);
46
+ });
47
+ const keyboardDidHideListener = import_react_native.Keyboard.addListener("keyboardDidHide", () => {
48
+ setKeyboardVisible(false);
49
+ });
48
50
  return () => {
49
- keyboardDidHideListener.remove(), keyboardDidShowListener.remove();
51
+ keyboardDidHideListener.remove();
52
+ keyboardDidShowListener.remove();
50
53
  };
51
- }, []), isKeyboardVisible;
54
+ }, []);
55
+ return isKeyboardVisible;
52
56
  };
@@ -4,52 +4,56 @@ var __create = Object.create;
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf,
8
- __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
9
  var __export = (target, all) => {
10
- for (var name in all) __defProp(target, name, {
11
- get: all[name],
12
- enumerable: !0
13
- });
14
- },
15
- __copyProps = (to, from, except, desc) => {
16
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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, {
17
18
  get: () => from[key],
18
19
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
20
  });
20
- return to;
21
- };
21
+ }
22
+ return to;
23
+ };
22
24
  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: !0
30
- }) : target, mod)),
31
- __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
- value: !0
33
- }), mod);
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);
34
36
  var useKeyboardVisible_exports = {};
35
37
  __export(useKeyboardVisible_exports, {
36
38
  useKeyboardVisible: () => useKeyboardVisible
37
39
  });
38
40
  module.exports = __toCommonJS(useKeyboardVisible_exports);
39
- var import_react = __toESM(require("react"), 1),
40
- import_react_native = require("react-native"),
41
- useKeyboardVisible = function () {
42
- var [isKeyboardVisible, setKeyboardVisible] = import_react.default.useState(!1);
43
- return import_react.default.useEffect(function () {
44
- var keyboardDidShowListener = import_react_native.Keyboard.addListener("keyboardDidShow", function () {
45
- setKeyboardVisible(!0);
46
- }),
47
- keyboardDidHideListener = import_react_native.Keyboard.addListener("keyboardDidHide", function () {
48
- setKeyboardVisible(!1);
49
- });
50
- return function () {
51
- keyboardDidHideListener.remove(), keyboardDidShowListener.remove();
52
- };
53
- }, []), isKeyboardVisible;
54
- };
41
+ var import_react = __toESM(require("react"), 1);
42
+ var import_react_native = require("react-native");
43
+ var useKeyboardVisible = function () {
44
+ var [isKeyboardVisible, setKeyboardVisible] = import_react.default.useState(false);
45
+ import_react.default.useEffect(function () {
46
+ var keyboardDidShowListener = import_react_native.Keyboard.addListener("keyboardDidShow", function () {
47
+ setKeyboardVisible(true);
48
+ });
49
+ var keyboardDidHideListener = import_react_native.Keyboard.addListener("keyboardDidHide", function () {
50
+ setKeyboardVisible(false);
51
+ });
52
+ return function () {
53
+ keyboardDidHideListener.remove();
54
+ keyboardDidShowListener.remove();
55
+ };
56
+ }, []);
57
+ return isKeyboardVisible;
58
+ };
55
59
  //# sourceMappingURL=useKeyboardVisible.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","useKeyboardVisible_exports","__export","useKeyboardVisible","module","exports","import_react","__toESM","require","import_react_native","isKeyboardVisible","setKeyboardVisible","default","useState","useEffect","keyboardDidShowListener","Keyboard","addListener","keyboardDidHideListener","remove"],"sources":["../../src/useKeyboardVisible.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAA;EAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;IAAAC,KAAA;EAAA,IAAAH,GAAA;AAAA,IAAAI,0BAAA;AAAAC,QAAA,CAAAD,0BAAA;EAAAE,kBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAkB,CAAAK,0BAClB;AAEO,IAAAK,YAAM,GAAAC,OAAA,CAAqBC,OAAe;EAAAC,mBAAA,GAAAD,OAAA;EAAAL,kBAAA,YAAAA,CAAA;IAC/C,KAAAO,iBAAO,EAAAC,kBAAmB,IAAkBL,YAAI,CAAAM,OAAA,CAAAC,QAAM,GAAS;IAE/D,OAAAP,YAAA,CAAAM,OAAA,CAAME,SAAA,CAAU,YAAM;MACpB,IAAAC,uBAAM,GAAAN,mBAA0B,CAAAO,QAAA,CAAAC,WAAS,kBAAY,cAAyB;UAC5EN,kBAAA,CAAmB,EAAI;QACzB,CAAC;QACKO,uBAAA,GAA0BT,mBAAA,CAAAO,QAAA,CAASC,WAAA,CAAY,mBAAmB,YAAM;UAC5EN,kBAAA,CAAmB,EAAK;QAC1B,CAAC;MAED,OAAO,YAAM;QACXO,uBAAA,CAAwBC,MAAA,CAAO,GAC/BJ,uBAAA,CAAwBI,MAAA,CAAO;MACjC;IACF,GAAG,EAAE,GAEET,iBAAA;EACT","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","useKeyboardVisible_exports","__export","useKeyboardVisible","module","exports","import_react","__toESM","require","import_react_native","isKeyboardVisible","setKeyboardVisible","default","useState","useEffect","keyboardDidShowListener","Keyboard","addListener","keyboardDidHideListener","remove"],"sources":["../../src/useKeyboardVisible.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,0BAAA;AAAAC,QAAA,CAAAD,0BAAA;EAAAE,kBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAkB,CAAAK,0BAAA;AAClB,IAAAK,YAAA,GAAAC,OAAyB,CAAAC,OAAA;AAElB,IAAAC,mBAAM,GAAAD,OAAoC;AAC/C,IAAAL,kBAAO,YAAAA,CAAA,EAAmB;EAE1B,KAAAO,iBAAM,EAAAC,kBAAgB,IAAAL,YAAA,CAAAM,OAAA,CAAAC,QAAA;EACpBP,YAAM,CAAAM,OAAA,CAAAE,SAAA,aAA0B;IAC9B,IAAAC,uBAAuB,GAAAN,mBAAA,CAAAO,QAAA,CAAAC,WAAA;MACxBN,kBAAA;IACD;IACE,IAAAO,uBAAwB,GAAAT,mBAAA,CAAAO,QAAA,CAAAC,WAAA;MACzBN,kBAAA;IAED;IACE;MACAO,uBAAA,CAAwBC,MAAA,CAAO;MACjCJ,uBAAA,CAAAI,MAAA;IACF,CAAG;EAEH;EACF,OAAAT,iBAAA","ignoreList":[]}
package/dist/esm/index.js CHANGED
@@ -1,5 +1,3 @@
1
- import { useKeyboardVisible } from "./useKeyboardVisible";
2
- export {
3
- useKeyboardVisible
4
- };
1
+ import { useKeyboardVisible } from "./useKeyboardVisible.mjs";
2
+ export { useKeyboardVisible };
5
3
  //# sourceMappingURL=index.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/index.ts"],
4
- "mappings": "AAAA,SAAS,0BAA0B;",
5
- "names": []
6
- }
1
+ {"version":3,"names":["useKeyboardVisible"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,kBAAA,QAA0B","ignoreList":[]}
@@ -1,18 +1,20 @@
1
1
  import React from "react";
2
2
  import { Keyboard } from "react-native-web";
3
3
  const useKeyboardVisible = () => {
4
- const [isKeyboardVisible, setKeyboardVisible] = React.useState(!1);
5
- return React.useEffect(() => {
4
+ const [isKeyboardVisible, setKeyboardVisible] = React.useState(false);
5
+ React.useEffect(() => {
6
6
  const keyboardDidShowListener = Keyboard.addListener("keyboardDidShow", () => {
7
- setKeyboardVisible(!0);
8
- }),
9
- keyboardDidHideListener = Keyboard.addListener("keyboardDidHide", () => {
10
- setKeyboardVisible(!1);
11
- });
7
+ setKeyboardVisible(true);
8
+ });
9
+ const keyboardDidHideListener = Keyboard.addListener("keyboardDidHide", () => {
10
+ setKeyboardVisible(false);
11
+ });
12
12
  return () => {
13
- keyboardDidHideListener.remove(), keyboardDidShowListener.remove();
13
+ keyboardDidHideListener.remove();
14
+ keyboardDidShowListener.remove();
14
15
  };
15
- }, []), isKeyboardVisible;
16
+ }, []);
17
+ return isKeyboardVisible;
16
18
  };
17
19
  export { useKeyboardVisible };
18
20
  //# sourceMappingURL=useKeyboardVisible.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","Keyboard","useKeyboardVisible","isKeyboardVisible","setKeyboardVisible","useState","useEffect","keyboardDidShowListener","addListener","keyboardDidHideListener","remove"],"sources":["../../src/useKeyboardVisible.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,KAAA,MAAW;AAClB,SAASC,QAAA,QAAgB;AAElB,MAAMC,kBAAA,GAAqBA,CAAA,KAAe;EAC/C,MAAM,CAACC,iBAAA,EAAmBC,kBAAkB,IAAIJ,KAAA,CAAMK,QAAA,CAAS,EAAK;EAEpE,OAAAL,KAAA,CAAMM,SAAA,CAAU,MAAM;IACpB,MAAMC,uBAAA,GAA0BN,QAAA,CAASO,WAAA,CAAY,mBAAmB,MAAM;QAC5EJ,kBAAA,CAAmB,EAAI;MACzB,CAAC;MACKK,uBAAA,GAA0BR,QAAA,CAASO,WAAA,CAAY,mBAAmB,MAAM;QAC5EJ,kBAAA,CAAmB,EAAK;MAC1B,CAAC;IAED,OAAO,MAAM;MACXK,uBAAA,CAAwBC,MAAA,CAAO,GAC/BH,uBAAA,CAAwBG,MAAA,CAAO;IACjC;EACF,GAAG,EAAE,GAEEP,iBAAA;AACT","ignoreList":[]}
1
+ {"version":3,"names":["React","Keyboard","useKeyboardVisible","isKeyboardVisible","setKeyboardVisible","useState","useEffect","keyboardDidShowListener","addListener","keyboardDidHideListener","remove"],"sources":["../../src/useKeyboardVisible.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,KAAA,MAAW;AAClB,SAASC,QAAA,QAAgB;AAElB,MAAMC,kBAAA,GAAqBA,CAAA,KAAe;EAC/C,MAAM,CAACC,iBAAA,EAAmBC,kBAAkB,IAAIJ,KAAA,CAAMK,QAAA,CAAS,KAAK;EAEpEL,KAAA,CAAMM,SAAA,CAAU,MAAM;IACpB,MAAMC,uBAAA,GAA0BN,QAAA,CAASO,WAAA,CAAY,mBAAmB,MAAM;MAC5EJ,kBAAA,CAAmB,IAAI;IACzB,CAAC;IACD,MAAMK,uBAAA,GAA0BR,QAAA,CAASO,WAAA,CAAY,mBAAmB,MAAM;MAC5EJ,kBAAA,CAAmB,KAAK;IAC1B,CAAC;IAED,OAAO,MAAM;MACXK,uBAAA,CAAwBC,MAAA,CAAO;MAC/BH,uBAAA,CAAwBG,MAAA,CAAO;IACjC;EACF,GAAG,EAAE;EAEL,OAAOP,iBAAA;AACT","ignoreList":[]}
@@ -1,18 +1,20 @@
1
1
  import React from "react";
2
2
  import { Keyboard } from "react-native";
3
3
  var useKeyboardVisible = function () {
4
- var [isKeyboardVisible, setKeyboardVisible] = React.useState(!1);
5
- return React.useEffect(function () {
4
+ var [isKeyboardVisible, setKeyboardVisible] = React.useState(false);
5
+ React.useEffect(function () {
6
6
  var keyboardDidShowListener = Keyboard.addListener("keyboardDidShow", function () {
7
- setKeyboardVisible(!0);
8
- }),
9
- keyboardDidHideListener = Keyboard.addListener("keyboardDidHide", function () {
10
- setKeyboardVisible(!1);
11
- });
7
+ setKeyboardVisible(true);
8
+ });
9
+ var keyboardDidHideListener = Keyboard.addListener("keyboardDidHide", function () {
10
+ setKeyboardVisible(false);
11
+ });
12
12
  return function () {
13
- keyboardDidHideListener.remove(), keyboardDidShowListener.remove();
13
+ keyboardDidHideListener.remove();
14
+ keyboardDidShowListener.remove();
14
15
  };
15
- }, []), isKeyboardVisible;
16
+ }, []);
17
+ return isKeyboardVisible;
16
18
  };
17
19
  export { useKeyboardVisible };
18
20
  //# sourceMappingURL=useKeyboardVisible.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","Keyboard","useKeyboardVisible","isKeyboardVisible","setKeyboardVisible","useState","useEffect","keyboardDidShowListener","addListener","keyboardDidHideListener","remove"],"sources":["../../src/useKeyboardVisible.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,KAAA,MAAW;AAClB,SAASC,QAAA,QAAgB;AAElB,IAAAC,kBAAM,YAAAA,CAAA,EAAoC;EAC/C,KAAAC,iBAAO,EAAAC,kBAAmB,IAAkBJ,KAAI,CAAAK,QAAM,GAAS;EAE/D,OAAAL,KAAA,CAAMM,SAAA,CAAU,YAAM;IACpB,IAAAC,uBAAM,GAAAN,QAA0B,CAAAO,WAAS,kBAAY,cAAyB;QAC5EJ,kBAAA,CAAmB,EAAI;MACzB,CAAC;MACKK,uBAAA,GAA0BR,QAAA,CAASO,WAAA,CAAY,mBAAmB,YAAM;QAC5EJ,kBAAA,CAAmB,EAAK;MAC1B,CAAC;IAED,OAAO,YAAM;MACXK,uBAAA,CAAwBC,MAAA,CAAO,GAC/BH,uBAAA,CAAwBG,MAAA,CAAO;IACjC;EACF,GAAG,EAAE,GAEEP,iBAAA;AACT","ignoreList":[]}
1
+ {"version":3,"names":["React","Keyboard","useKeyboardVisible","isKeyboardVisible","setKeyboardVisible","useState","useEffect","keyboardDidShowListener","addListener","keyboardDidHideListener","remove"],"sources":["../../src/useKeyboardVisible.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,KAAA,MAAW;AAClB,SAASC,QAAA,QAAgB;AAElB,IAAAC,kBAAM,YAAAA,CAAA,EAAoC;EAC/C,KAAAC,iBAAO,EAAAC,kBAAmB,IAAkBJ,KAAI,CAAAK,QAAM,MAAS;EAE/DL,KAAA,CAAMM,SAAA,CAAU,YAAM;IACpB,IAAAC,uBAAM,GAAAN,QAA0B,CAAAO,WAAS,kBAAY,cAAyB;MAC5EJ,kBAAA,CAAmB,IAAI;IACzB,CAAC;IACD,IAAAK,uBAAM,GAAAR,QAA0B,CAAAO,WAAS,kBAAY,cAAyB;MAC5EJ,kBAAA,CAAmB,KAAK;IAC1B,CAAC;IAED,OAAO,YAAM;MACXK,uBAAA,CAAwBC,MAAA,CAAO;MAC/BH,uBAAA,CAAwBG,MAAA,CAAO;IACjC;EACF,GAAG,EAAE;EAEL,OAAOP,iBAAA;AACT","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/use-keyboard-visible",
3
- "version": "2.0.0-rc.9",
3
+ "version": "2.0.0",
4
4
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
5
5
  "files": [
6
6
  "src",
@@ -17,10 +17,11 @@
17
17
  ".": {
18
18
  "types": "./types/index.d.ts",
19
19
  "react-native": "./dist/esm/index.native.js",
20
+ "browser": "./dist/esm/index.mjs",
20
21
  "module": "./dist/esm/index.mjs",
21
22
  "import": "./dist/esm/index.mjs",
22
23
  "require": "./dist/cjs/index.cjs",
23
- "default": "./dist/cjs/index.native.js"
24
+ "default": "./dist/esm/index.mjs"
24
25
  }
25
26
  },
26
27
  "publishConfig": {
@@ -33,12 +34,11 @@
33
34
  "clean:build": "tamagui-build clean:build"
34
35
  },
35
36
  "devDependencies": {
36
- "@tamagui/build": "2.0.0-rc.9",
37
+ "@tamagui/build": "2.0.0",
37
38
  "react": ">=19",
38
- "react-native": "0.81.5"
39
+ "react-native": "0.83.2"
39
40
  },
40
41
  "peerDependencies": {
41
- "react": ">=19",
42
- "react-native": "*"
42
+ "react": ">=19"
43
43
  }
44
44
  }
@@ -4,8 +4,8 @@
4
4
  "sources": [
5
5
  "src/index.ts"
6
6
  ],
7
+ "version": 3,
7
8
  "sourcesContent": [
8
9
  "export { useKeyboardVisible } from './useKeyboardVisible'\n"
9
- ],
10
- "version": 3
10
+ ]
11
11
  }
@@ -4,8 +4,8 @@
4
4
  "sources": [
5
5
  "src/useKeyboardVisible.ts"
6
6
  ],
7
+ "version": 3,
7
8
  "sourcesContent": [
8
9
  "import React from 'react'\nimport { Keyboard } from 'react-native'\n\nexport const useKeyboardVisible = (): boolean => {\n const [isKeyboardVisible, setKeyboardVisible] = React.useState(false)\n\n React.useEffect(() => {\n const keyboardDidShowListener = Keyboard.addListener('keyboardDidShow', () => {\n setKeyboardVisible(true)\n })\n const keyboardDidHideListener = Keyboard.addListener('keyboardDidHide', () => {\n setKeyboardVisible(false)\n })\n\n return () => {\n keyboardDidHideListener.remove()\n keyboardDidShowListener.remove()\n }\n }, [])\n\n return isKeyboardVisible\n}\n"
9
- ],
10
- "version": 3
10
+ ]
11
11
  }
package/dist/cjs/index.js DELETED
@@ -1,21 +0,0 @@
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)
7
- __defProp(target, name, { get: all[name], enumerable: !0 });
8
- }, __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from == "object" || typeof from == "function")
10
- for (let key of __getOwnPropNames(from))
11
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
- var index_exports = {};
16
- __export(index_exports, {
17
- useKeyboardVisible: () => import_useKeyboardVisible.useKeyboardVisible
18
- });
19
- module.exports = __toCommonJS(index_exports);
20
- var import_useKeyboardVisible = require("./useKeyboardVisible");
21
- //# sourceMappingURL=index.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/index.ts"],
4
- "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gCAAmC;",
5
- "names": []
6
- }
@@ -1,42 +0,0 @@
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, __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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
16
- // If the importer is in node compatibility mode or this is not an ESM
17
- // file that has been converted to a CommonJS file using a Babel-
18
- // compatible transform (i.e. "__esModule" has not been set), then set
19
- // "default" to the CommonJS "module.exports" for node compatibility.
20
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
21
- mod
22
- )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
23
- var useKeyboardVisible_exports = {};
24
- __export(useKeyboardVisible_exports, {
25
- useKeyboardVisible: () => useKeyboardVisible
26
- });
27
- module.exports = __toCommonJS(useKeyboardVisible_exports);
28
- var import_react = __toESM(require("react"), 1), import_react_native = require("react-native-web");
29
- const useKeyboardVisible = () => {
30
- const [isKeyboardVisible, setKeyboardVisible] = import_react.default.useState(!1);
31
- return import_react.default.useEffect(() => {
32
- const keyboardDidShowListener = import_react_native.Keyboard.addListener("keyboardDidShow", () => {
33
- setKeyboardVisible(!0);
34
- }), keyboardDidHideListener = import_react_native.Keyboard.addListener("keyboardDidHide", () => {
35
- setKeyboardVisible(!1);
36
- });
37
- return () => {
38
- keyboardDidHideListener.remove(), keyboardDidShowListener.remove();
39
- };
40
- }, []), isKeyboardVisible;
41
- };
42
- //# sourceMappingURL=useKeyboardVisible.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/useKeyboardVisible.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB,8BAClB,sBAAyB;AAElB,MAAM,qBAAqB,MAAe;AAC/C,QAAM,CAAC,mBAAmB,kBAAkB,IAAI,aAAAA,QAAM,SAAS,EAAK;AAEpE,sBAAAA,QAAM,UAAU,MAAM;AACpB,UAAM,0BAA0B,6BAAS,YAAY,mBAAmB,MAAM;AAC5E,yBAAmB,EAAI;AAAA,IACzB,CAAC,GACK,0BAA0B,6BAAS,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
- "names": ["React"]
6
- }
@@ -1,19 +0,0 @@
1
- import React from "react";
2
- import { Keyboard } from "react-native-web";
3
- const useKeyboardVisible = () => {
4
- const [isKeyboardVisible, setKeyboardVisible] = React.useState(!1);
5
- return React.useEffect(() => {
6
- const keyboardDidShowListener = Keyboard.addListener("keyboardDidShow", () => {
7
- setKeyboardVisible(!0);
8
- }), keyboardDidHideListener = Keyboard.addListener("keyboardDidHide", () => {
9
- setKeyboardVisible(!1);
10
- });
11
- return () => {
12
- keyboardDidHideListener.remove(), keyboardDidShowListener.remove();
13
- };
14
- }, []), isKeyboardVisible;
15
- };
16
- export {
17
- useKeyboardVisible
18
- };
19
- //# sourceMappingURL=useKeyboardVisible.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/useKeyboardVisible.ts"],
4
- "mappings": "AAAA,OAAO,WAAW;AAClB,SAAS,gBAAgB;AAElB,MAAM,qBAAqB,MAAe;AAC/C,QAAM,CAAC,mBAAmB,kBAAkB,IAAI,MAAM,SAAS,EAAK;AAEpE,eAAM,UAAU,MAAM;AACpB,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
- "names": []
6
- }