@tamagui/use-keyboard-visible 1.106.0 → 1.108.0-1722728147390
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/useKeyboardVisible.js +13 -5
- package/dist/cjs/useKeyboardVisible.js.map +2 -2
- package/dist/cjs/useKeyboardVisible.native.js +13 -5
- package/dist/cjs/useKeyboardVisible.native.js.map +2 -2
- package/dist/esm/useKeyboardVisible.js +3 -3
- package/dist/esm/useKeyboardVisible.js.map +1 -1
- package/dist/esm/useKeyboardVisible.mjs +3 -3
- package/dist/esm/useKeyboardVisible.mjs.map +1 -1
- package/dist/esm/useKeyboardVisible.native.js +3 -3
- package/dist/esm/useKeyboardVisible.native.js.map +2 -2
- package/package.json +2 -2
- package/src/useKeyboardVisible.ts +3 -3
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
6
|
var __export = (target, all) => {
|
|
6
7
|
for (var name in all)
|
|
7
8
|
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
@@ -11,16 +12,23 @@ var __export = (target, all) => {
|
|
|
11
12
|
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
13
|
return to;
|
|
13
14
|
};
|
|
14
|
-
var
|
|
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);
|
|
15
23
|
var useKeyboardVisible_exports = {};
|
|
16
24
|
__export(useKeyboardVisible_exports, {
|
|
17
25
|
useKeyboardVisible: () => useKeyboardVisible
|
|
18
26
|
});
|
|
19
27
|
module.exports = __toCommonJS(useKeyboardVisible_exports);
|
|
20
|
-
var import_react = require("react"), import_react_native = require("react-native-web");
|
|
28
|
+
var import_react = __toESM(require("react")), import_react_native = require("react-native-web");
|
|
21
29
|
const useKeyboardVisible = () => {
|
|
22
|
-
const [isKeyboardVisible, setKeyboardVisible] =
|
|
23
|
-
return
|
|
30
|
+
const [isKeyboardVisible, setKeyboardVisible] = import_react.default.useState(!1);
|
|
31
|
+
return import_react.default.useEffect(() => {
|
|
24
32
|
const keyboardDidShowListener = import_react_native.Keyboard.addListener("keyboardDidShow", () => {
|
|
25
33
|
setKeyboardVisible(!0);
|
|
26
34
|
}), keyboardDidHideListener = import_react_native.Keyboard.addListener("keyboardDidHide", () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/useKeyboardVisible.ts"],
|
|
4
|
-
"mappings": "
|
|
5
|
-
"names": []
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB,2BAClB,sBAAyB;AAElB,MAAM,qBAAqB,MAAM;AACtC,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
6
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
7
|
var __export = (target, all) => {
|
|
7
8
|
for (var name in all)
|
|
8
9
|
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
@@ -12,13 +13,20 @@ var __export = (target, all) => {
|
|
|
12
13
|
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
14
|
return to;
|
|
14
15
|
};
|
|
15
|
-
var
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
22
|
+
mod
|
|
23
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
24
|
var useKeyboardVisible_exports = {};
|
|
17
25
|
__export(useKeyboardVisible_exports, {
|
|
18
26
|
useKeyboardVisible: () => useKeyboardVisible
|
|
19
27
|
});
|
|
20
28
|
module.exports = __toCommonJS(useKeyboardVisible_exports);
|
|
21
|
-
var import_react = require("react"), import_react_native = require("react-native");
|
|
29
|
+
var import_react = __toESM(require("react")), import_react_native = require("react-native");
|
|
22
30
|
function _array_like_to_array(arr, len) {
|
|
23
31
|
(len == null || len > arr.length) && (len = arr.length);
|
|
24
32
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -61,8 +69,8 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
61
69
|
}
|
|
62
70
|
}
|
|
63
71
|
var useKeyboardVisible = function() {
|
|
64
|
-
var
|
|
65
|
-
return
|
|
72
|
+
var _React_useState = _sliced_to_array(import_react.default.useState(!1), 2), isKeyboardVisible = _React_useState[0], setKeyboardVisible = _React_useState[1];
|
|
73
|
+
return import_react.default.useEffect(function() {
|
|
66
74
|
var keyboardDidShowListener = import_react_native.Keyboard.addListener("keyboardDidShow", function() {
|
|
67
75
|
setKeyboardVisible(!0);
|
|
68
76
|
}), keyboardDidHideListener = import_react_native.Keyboard.addListener("keyboardDidHide", function() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Users/n8/tamagui/code/core/use-keyboard-visible/src/useKeyboardVisible.ts"],
|
|
4
|
-
"mappings": "
|
|
5
|
-
"names": ["useKeyboardVisible", "useState", "isKeyboardVisible", "setKeyboardVisible", "useEffect", "keyboardDidShowListener", "Keyboard", "addListener", "keyboardDidHideListener", "remove"]
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mBAAkB,2BAClB,sBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAElB,IAAMA,qBAAqB,WAAA;AAChC,MAAgDC,kBAAAA,iBAAAA,aAAAA,QAAMC,SAAS,EAAA,GAAA,CAAA,GAAxDC,oBAAyCF,gBAAAA,CAAAA,GAAtBG,qBAAsBH,gBAAAA,CAAAA;AAEhDA,sBAAAA,QAAMI,UAAU,WAAA;AACd,QAAMC,0BAA0BC,6BAASC,YAAY,mBAAmB,WAAA;AACtEJ,yBAAmB,EAAA;IACrB,CAAA,GACMK,0BAA0BF,6BAASC,YAAY,mBAAmB,WAAA;AACtEJ,yBAAmB,EAAA;IACrB,CAAA;AAEA,WAAO,WAAA;AACLK,8BAAwBC,OAAM,GAC9BJ,wBAAwBI,OAAM;IAChC;EACF,GAAG,CAAA,CAAE,GAEEP;AACT;",
|
|
5
|
+
"names": ["useKeyboardVisible", "React", "useState", "isKeyboardVisible", "setKeyboardVisible", "useEffect", "keyboardDidShowListener", "Keyboard", "addListener", "keyboardDidHideListener", "remove"]
|
|
6
6
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { Keyboard } from "react-native-web";
|
|
3
3
|
const useKeyboardVisible = () => {
|
|
4
|
-
const [isKeyboardVisible, setKeyboardVisible] = useState(!1);
|
|
5
|
-
return useEffect(() => {
|
|
4
|
+
const [isKeyboardVisible, setKeyboardVisible] = React.useState(!1);
|
|
5
|
+
return React.useEffect(() => {
|
|
6
6
|
const keyboardDidShowListener = Keyboard.addListener("keyboardDidShow", () => {
|
|
7
7
|
setKeyboardVisible(!0);
|
|
8
8
|
}), keyboardDidHideListener = Keyboard.addListener("keyboardDidHide", () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/useKeyboardVisible.ts"],
|
|
4
|
-
"mappings": "AAAA,
|
|
4
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,SAAS,gBAAgB;AAElB,MAAM,qBAAqB,MAAM;AACtC,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
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { Keyboard } from "react-native-web";
|
|
3
3
|
const useKeyboardVisible = () => {
|
|
4
|
-
const [isKeyboardVisible, setKeyboardVisible] = useState(!1);
|
|
5
|
-
return useEffect(() => {
|
|
4
|
+
const [isKeyboardVisible, setKeyboardVisible] = React.useState(!1);
|
|
5
|
+
return React.useEffect(() => {
|
|
6
6
|
const keyboardDidShowListener = Keyboard.addListener("keyboardDidShow", () => {
|
|
7
7
|
setKeyboardVisible(!0);
|
|
8
8
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
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,KAAM;EACtC,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,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { Keyboard } from "react-native";
|
|
3
3
|
function _array_like_to_array(arr, len) {
|
|
4
4
|
(len == null || len > arr.length) && (len = arr.length);
|
|
@@ -42,8 +42,8 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
var useKeyboardVisible = function() {
|
|
45
|
-
var
|
|
46
|
-
return useEffect(function() {
|
|
45
|
+
var _React_useState = _sliced_to_array(React.useState(!1), 2), isKeyboardVisible = _React_useState[0], setKeyboardVisible = _React_useState[1];
|
|
46
|
+
return React.useEffect(function() {
|
|
47
47
|
var keyboardDidShowListener = Keyboard.addListener("keyboardDidShow", function() {
|
|
48
48
|
setKeyboardVisible(!0);
|
|
49
49
|
}), keyboardDidHideListener = Keyboard.addListener("keyboardDidHide", function() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Users/n8/tamagui/code/core/use-keyboard-visible/src/useKeyboardVisible.ts"],
|
|
4
|
-
"mappings": "AAAA,
|
|
5
|
-
"names": ["
|
|
4
|
+
"mappings": "AAAA,OAAOA,WAAW;AAClB,SAASC,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAElB,IAAMC,qBAAqB,WAAA;AAChC,MAAgDF,kBAAAA,iBAAAA,MAAMG,SAAS,EAAA,GAAA,CAAA,GAAxDC,oBAAyCJ,gBAAAA,CAAAA,GAAtBK,qBAAsBL,gBAAAA,CAAAA;AAEhDA,eAAMM,UAAU,WAAA;AACd,QAAMC,0BAA0BN,SAASO,YAAY,mBAAmB,WAAA;AACtEH,yBAAmB,EAAA;IACrB,CAAA,GACMI,0BAA0BR,SAASO,YAAY,mBAAmB,WAAA;AACtEH,yBAAmB,EAAA;IACrB,CAAA;AAEA,WAAO,WAAA;AACLI,8BAAwBC,OAAM,GAC9BH,wBAAwBG,OAAM;IAChC;EACF,GAAG,CAAA,CAAE,GAEEN;AACT;",
|
|
5
|
+
"names": ["React", "Keyboard", "useKeyboardVisible", "useState", "isKeyboardVisible", "setKeyboardVisible", "useEffect", "keyboardDidShowListener", "addListener", "keyboardDidHideListener", "remove"]
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/use-keyboard-visible",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.108.0-1722728147390",
|
|
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.
|
|
30
|
+
"@tamagui/build": "1.108.0-1722728147390",
|
|
31
31
|
"react": "^18.2.0 || ^19.0.0",
|
|
32
32
|
"react-native": "0.74.1"
|
|
33
33
|
},
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react'
|
|
2
2
|
import { Keyboard } from 'react-native'
|
|
3
3
|
|
|
4
4
|
export const useKeyboardVisible = () => {
|
|
5
|
-
const [isKeyboardVisible, setKeyboardVisible] = useState(false)
|
|
5
|
+
const [isKeyboardVisible, setKeyboardVisible] = React.useState(false)
|
|
6
6
|
|
|
7
|
-
useEffect(() => {
|
|
7
|
+
React.useEffect(() => {
|
|
8
8
|
const keyboardDidShowListener = Keyboard.addListener('keyboardDidShow', () => {
|
|
9
9
|
setKeyboardVisible(true)
|
|
10
10
|
})
|