@tamagui/focusable 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/focusable.native.js +0 -14
- package/dist/esm/focusable.native.js.map +2 -2
- package/dist/esm/focusableInputHOC.native.js +13 -31
- package/dist/esm/focusableInputHOC.native.js.map +1 -1
- package/dist/esm/index.native.js +3 -23
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/registerFocusable.native.js +2 -25
- package/dist/esm/registerFocusable.native.js.map +1 -1
- package/dist/jsx/focusable.native.js +0 -14
- package/dist/jsx/focusable.native.js.map +2 -2
- package/dist/jsx/focusableInputHOC.native.js +13 -31
- package/dist/jsx/focusableInputHOC.native.js.map +1 -1
- package/dist/jsx/index.native.js +3 -23
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/registerFocusable.native.js +2 -25
- package/dist/jsx/registerFocusable.native.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,15 +1 @@
|
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
return to;
|
|
11
|
-
};
|
|
12
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
13
|
-
var focusable_exports = {};
|
|
14
|
-
module.exports = __toCommonJS(focusable_exports);
|
|
15
1
|
//# sourceMappingURL=focusable.js.map
|
|
@@ -1,34 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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 focusableInputHOC_exports = {};
|
|
17
|
-
__export(focusableInputHOC_exports, {
|
|
18
|
-
focusableInputHOC: () => focusableInputHOC,
|
|
19
|
-
useFocusable: () => useFocusable
|
|
20
|
-
});
|
|
21
|
-
module.exports = __toCommonJS(focusableInputHOC_exports);
|
|
22
|
-
var import_compose_refs = require("@tamagui/compose-refs"), import_web = require("@tamagui/web"), import_react = require("react"), import_registerFocusable = require("./registerFocusable"), import_jsx_runtime = require("react/jsx-runtime");
|
|
1
|
+
import { composeRefs } from "@tamagui/compose-refs";
|
|
2
|
+
import { useEvent } from "@tamagui/web";
|
|
3
|
+
import { useCallback, useEffect, useRef } from "react";
|
|
4
|
+
import { registerFocusable } from "./registerFocusable";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
23
6
|
function useFocusable({
|
|
24
7
|
isInput,
|
|
25
8
|
props,
|
|
26
9
|
ref
|
|
27
10
|
}) {
|
|
28
|
-
const { id, onChangeText, value, defaultValue } = props, inputValue =
|
|
11
|
+
const { id, onChangeText, value, defaultValue } = props, inputValue = useRef(value || defaultValue || ""), unregisterFocusable = useRef(), inputRef = useCallback(
|
|
29
12
|
(input) => {
|
|
30
13
|
var _a;
|
|
31
|
-
id && input && ((_a = unregisterFocusable.current) == null || _a.call(unregisterFocusable), unregisterFocusable.current =
|
|
14
|
+
id && input && ((_a = unregisterFocusable.current) == null || _a.call(unregisterFocusable), unregisterFocusable.current = registerFocusable(id, {
|
|
32
15
|
focus: input.focus,
|
|
33
16
|
...isInput && {
|
|
34
17
|
// react-native doesn't support programmatic .select()
|
|
@@ -39,13 +22,13 @@ function useFocusable({
|
|
|
39
22
|
}));
|
|
40
23
|
},
|
|
41
24
|
[isInput, id]
|
|
42
|
-
), combinedRefs =
|
|
43
|
-
return
|
|
25
|
+
), combinedRefs = composeRefs(ref, inputRef);
|
|
26
|
+
return useEffect(() => () => {
|
|
44
27
|
var _a;
|
|
45
28
|
(_a = unregisterFocusable.current) == null || _a.call(unregisterFocusable);
|
|
46
29
|
}, []), {
|
|
47
30
|
ref: combinedRefs,
|
|
48
|
-
onChangeText:
|
|
31
|
+
onChangeText: useEvent((value2) => {
|
|
49
32
|
inputValue.current = value2, onChangeText == null || onChangeText(value2);
|
|
50
33
|
})
|
|
51
34
|
};
|
|
@@ -61,12 +44,11 @@ function focusableInputHOC(Component) {
|
|
|
61
44
|
...props,
|
|
62
45
|
onChangeText
|
|
63
46
|
} : props;
|
|
64
|
-
return /* @__PURE__ */
|
|
47
|
+
return /* @__PURE__ */ jsx(Component, { ref: combinedRef, ...finalProps });
|
|
65
48
|
});
|
|
66
49
|
}
|
|
67
|
-
|
|
68
|
-
0 && (module.exports = {
|
|
50
|
+
export {
|
|
69
51
|
focusableInputHOC,
|
|
70
52
|
useFocusable
|
|
71
|
-
}
|
|
53
|
+
};
|
|
72
54
|
//# sourceMappingURL=focusableInputHOC.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/focusableInputHOC.tsx"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AAAA,SAAS,mBAAmB;AAE5B,SAAS,gBAAgB;AACzB,SA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}
|
package/dist/esm/index.native.js
CHANGED
|
@@ -1,24 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
return to;
|
|
11
|
-
}, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
12
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
13
|
-
var src_exports = {};
|
|
14
|
-
module.exports = __toCommonJS(src_exports);
|
|
15
|
-
__reExport(src_exports, require("./registerFocusable"), module.exports);
|
|
16
|
-
__reExport(src_exports, require("./focusableInputHOC"), module.exports);
|
|
17
|
-
__reExport(src_exports, require("./focusable"), module.exports);
|
|
18
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
19
|
-
0 && (module.exports = {
|
|
20
|
-
...require("./registerFocusable"),
|
|
21
|
-
...require("./focusableInputHOC"),
|
|
22
|
-
...require("./focusable")
|
|
23
|
-
});
|
|
1
|
+
export * from "./registerFocusable";
|
|
2
|
+
export * from "./focusableInputHOC";
|
|
3
|
+
export * from "./focusable";
|
|
24
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,25 +1,3 @@
|
|
|
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 registerFocusable_native_exports = {};
|
|
17
|
-
__export(registerFocusable_native_exports, {
|
|
18
|
-
focusFocusable: () => focusFocusable,
|
|
19
|
-
registerFocusable: () => registerFocusable,
|
|
20
|
-
unregisterFocusable: () => unregisterFocusable
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(registerFocusable_native_exports);
|
|
23
1
|
const InputsMap = /* @__PURE__ */ new Map(), registerFocusable = (id, input) => (process.env.NODE_ENV === "development" && InputsMap.has(id) && console.warn(`Warning, duplicate ID for input: ${id}`), InputsMap.set(id, input), () => {
|
|
24
2
|
InputsMap.delete(id);
|
|
25
3
|
}), unregisterFocusable = (id) => {
|
|
@@ -32,10 +10,9 @@ const InputsMap = /* @__PURE__ */ new Map(), registerFocusable = (id, input) =>
|
|
|
32
10
|
}
|
|
33
11
|
select || !input.focusAndSelect ? input.focus() : input.focusAndSelect();
|
|
34
12
|
};
|
|
35
|
-
|
|
36
|
-
0 && (module.exports = {
|
|
13
|
+
export {
|
|
37
14
|
focusFocusable,
|
|
38
15
|
registerFocusable,
|
|
39
16
|
unregisterFocusable
|
|
40
|
-
}
|
|
17
|
+
};
|
|
41
18
|
//# sourceMappingURL=registerFocusable.native.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/registerFocusable.native.ts"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AAIA,MAAM,YAAY,oBAAI,IAAuB,GAEhC,oBAAoB,CAAC,IAAY,WACxC,QAAQ,IAAI,aAAa,iBACvB,UAAU,IAAI,EAAE,KAClB,QAAQ,KAAK,oCAAoC,EAAE,EAAE,GAGzD,UAAU,IAAI,IAAI,KAAK,GAChB,MAAM;AACX,YAAU,OAAO,EAAE;AACrB,IAGW,sBAAsB,CAAC,OAAe;AACjD,YAAU,OAAO,EAAE;AACrB,GAEa,iBAAiB,CAAC,IAAY,SAAS,OAAU;AAC5D,QAAM,QAAQ,UAAU,IAAI,EAAE;AAC9B,MAAI,CAAC,OAAO;AACV,IAAI,QAAQ,IAAI,aAAa,iBAC3B,QAAQ,KAAK,yBAAyB,EAAE;AAE1C;AAAA,EACF;AACA,EAAI,UAAU,CAAC,MAAM,iBACnB,MAAM,MAAM,IAEZ,MAAM,eAAe;AAEzB;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,15 +1 @@
|
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
return to;
|
|
11
|
-
};
|
|
12
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
13
|
-
var focusable_exports = {};
|
|
14
|
-
module.exports = __toCommonJS(focusable_exports);
|
|
15
1
|
//# sourceMappingURL=focusable.js.map
|
|
@@ -1,34 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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 focusableInputHOC_exports = {};
|
|
17
|
-
__export(focusableInputHOC_exports, {
|
|
18
|
-
focusableInputHOC: () => focusableInputHOC,
|
|
19
|
-
useFocusable: () => useFocusable
|
|
20
|
-
});
|
|
21
|
-
module.exports = __toCommonJS(focusableInputHOC_exports);
|
|
22
|
-
var import_compose_refs = require("@tamagui/compose-refs"), import_web = require("@tamagui/web"), import_react = require("react"), import_registerFocusable = require("./registerFocusable"), import_jsx_runtime = require("react/jsx-runtime");
|
|
1
|
+
import { composeRefs } from "@tamagui/compose-refs";
|
|
2
|
+
import { useEvent } from "@tamagui/web";
|
|
3
|
+
import { useCallback, useEffect, useRef } from "react";
|
|
4
|
+
import { registerFocusable } from "./registerFocusable";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
23
6
|
function useFocusable({
|
|
24
7
|
isInput,
|
|
25
8
|
props,
|
|
26
9
|
ref
|
|
27
10
|
}) {
|
|
28
|
-
const { id, onChangeText, value, defaultValue } = props, inputValue =
|
|
11
|
+
const { id, onChangeText, value, defaultValue } = props, inputValue = useRef(value || defaultValue || ""), unregisterFocusable = useRef(), inputRef = useCallback(
|
|
29
12
|
(input) => {
|
|
30
13
|
var _a;
|
|
31
|
-
id && input && ((_a = unregisterFocusable.current) == null || _a.call(unregisterFocusable), unregisterFocusable.current =
|
|
14
|
+
id && input && ((_a = unregisterFocusable.current) == null || _a.call(unregisterFocusable), unregisterFocusable.current = registerFocusable(id, {
|
|
32
15
|
focus: input.focus,
|
|
33
16
|
...isInput && {
|
|
34
17
|
// react-native doesn't support programmatic .select()
|
|
@@ -39,13 +22,13 @@ function useFocusable({
|
|
|
39
22
|
}));
|
|
40
23
|
},
|
|
41
24
|
[isInput, id]
|
|
42
|
-
), combinedRefs =
|
|
43
|
-
return
|
|
25
|
+
), combinedRefs = composeRefs(ref, inputRef);
|
|
26
|
+
return useEffect(() => () => {
|
|
44
27
|
var _a;
|
|
45
28
|
(_a = unregisterFocusable.current) == null || _a.call(unregisterFocusable);
|
|
46
29
|
}, []), {
|
|
47
30
|
ref: combinedRefs,
|
|
48
|
-
onChangeText:
|
|
31
|
+
onChangeText: useEvent((value2) => {
|
|
49
32
|
inputValue.current = value2, onChangeText == null || onChangeText(value2);
|
|
50
33
|
})
|
|
51
34
|
};
|
|
@@ -61,12 +44,11 @@ function focusableInputHOC(Component) {
|
|
|
61
44
|
...props,
|
|
62
45
|
onChangeText
|
|
63
46
|
} : props;
|
|
64
|
-
return /* @__PURE__ */
|
|
47
|
+
return /* @__PURE__ */ jsx(Component, { ref: combinedRef, ...finalProps });
|
|
65
48
|
});
|
|
66
49
|
}
|
|
67
|
-
|
|
68
|
-
0 && (module.exports = {
|
|
50
|
+
export {
|
|
69
51
|
focusableInputHOC,
|
|
70
52
|
useFocusable
|
|
71
|
-
}
|
|
53
|
+
};
|
|
72
54
|
//# sourceMappingURL=focusableInputHOC.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/focusableInputHOC.tsx"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AAAA,S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;AACH;",
|
|
5
5
|
"names": ["value"]
|
|
6
6
|
}
|
package/dist/jsx/index.native.js
CHANGED
|
@@ -1,24 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
return to;
|
|
11
|
-
}, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
12
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
13
|
-
var src_exports = {};
|
|
14
|
-
module.exports = __toCommonJS(src_exports);
|
|
15
|
-
__reExport(src_exports, require("./registerFocusable"), module.exports);
|
|
16
|
-
__reExport(src_exports, require("./focusableInputHOC"), module.exports);
|
|
17
|
-
__reExport(src_exports, require("./focusable"), module.exports);
|
|
18
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
19
|
-
0 && (module.exports = {
|
|
20
|
-
...require("./registerFocusable"),
|
|
21
|
-
...require("./focusableInputHOC"),
|
|
22
|
-
...require("./focusable")
|
|
23
|
-
});
|
|
1
|
+
export * from "./registerFocusable";
|
|
2
|
+
export * from "./focusableInputHOC";
|
|
3
|
+
export * from "./focusable";
|
|
24
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,25 +1,3 @@
|
|
|
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 registerFocusable_native_exports = {};
|
|
17
|
-
__export(registerFocusable_native_exports, {
|
|
18
|
-
focusFocusable: () => focusFocusable,
|
|
19
|
-
registerFocusable: () => registerFocusable,
|
|
20
|
-
unregisterFocusable: () => unregisterFocusable
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(registerFocusable_native_exports);
|
|
23
1
|
const InputsMap = /* @__PURE__ */ new Map(), registerFocusable = (id, input) => (process.env.NODE_ENV === "development" && InputsMap.has(id) && console.warn(`Warning, duplicate ID for input: ${id}`), InputsMap.set(id, input), () => {
|
|
24
2
|
InputsMap.delete(id);
|
|
25
3
|
}), unregisterFocusable = (id) => {
|
|
@@ -32,10 +10,9 @@ const InputsMap = /* @__PURE__ */ new Map(), registerFocusable = (id, input) =>
|
|
|
32
10
|
}
|
|
33
11
|
select || !input.focusAndSelect ? input.focus() : input.focusAndSelect();
|
|
34
12
|
};
|
|
35
|
-
|
|
36
|
-
0 && (module.exports = {
|
|
13
|
+
export {
|
|
37
14
|
focusFocusable,
|
|
38
15
|
registerFocusable,
|
|
39
16
|
unregisterFocusable
|
|
40
|
-
}
|
|
17
|
+
};
|
|
41
18
|
//# sourceMappingURL=registerFocusable.native.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/registerFocusable.native.ts"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AAIA,MAAM,YAAY,oBAAI,IAAuB,GAEhC,oBAAoB,CAAC,IAAY,WACxC,QAAQ,IAAI,aAAa,iBACvB,UAAU,IAAI,EAAE,KAClB,QAAQ,KAAK,oCAAoC,EAAE,EAAE,GAGzD,UAAU,IAAI,IAAI,KAAK,GAChB,MAAM;AACX,YAAU,OAAO,EAAE;AACrB,IAGW,sBAAsB,CAAC,OAAe;AACjD,YAAU,OAAO,EAAE;AACrB,GAEa,iBAAiB,CAAC,IAAY,SAAS,OAAU;AAC5D,QAAM,QAAQ,UAAU,IAAI,EAAE;AAC9B,MAAI,CAAC,OAAO;AACV,IAAI,QAAQ,IAAI,aAAa,iBAC3B,QAAQ,KAAK,yBAAyB,EAAE;AAE1C;AAAA,EACF;AACA,EAAI,UAAU,CAAC,MAAM,iBACnB,MAAM,MAAM,IAEZ,MAAM,eAAe;AAEzB;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/focusable",
|
|
3
|
-
"version": "1.88.
|
|
3
|
+
"version": "1.88.23",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"types": "./types/index.d.ts",
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
"clean:build": "tamagui-build clean:build"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@tamagui/compose-refs": "1.88.
|
|
26
|
-
"@tamagui/web": "1.88.
|
|
25
|
+
"@tamagui/compose-refs": "1.88.23",
|
|
26
|
+
"@tamagui/web": "1.88.23"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"react": "*"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@tamagui/build": "1.88.
|
|
32
|
+
"@tamagui/build": "1.88.23",
|
|
33
33
|
"react": "^18.2.0"
|
|
34
34
|
},
|
|
35
35
|
"publishConfig": {
|