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