@tamagui/adapt 1.61.3 → 1.62.1
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/Adapt.js +25 -51
- package/dist/cjs/Adapt.js.map +2 -2
- package/dist/cjs/Adapt.native.js +68 -0
- package/dist/cjs/Adapt.native.js.map +6 -0
- package/dist/cjs/index.js +4 -8
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.native.js +20 -0
- package/dist/cjs/index.native.js.map +6 -0
- package/dist/esm/Adapt.js +20 -40
- package/dist/esm/Adapt.js.map +2 -2
- package/package.json +3 -3
package/dist/cjs/Adapt.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:
|
|
9
|
-
}
|
|
10
|
-
|
|
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
|
-
|
|
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:
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
19
15
|
var Adapt_exports = {};
|
|
20
16
|
__export(Adapt_exports, {
|
|
21
17
|
Adapt: () => Adapt,
|
|
@@ -24,60 +20,38 @@ __export(Adapt_exports, {
|
|
|
24
20
|
useAdaptParent: () => useAdaptParent
|
|
25
21
|
});
|
|
26
22
|
module.exports = __toCommonJS(Adapt_exports);
|
|
27
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
28
|
-
|
|
29
|
-
var import_react = require("react");
|
|
30
|
-
const AdaptParentContext = (0, import_react.createContext)(null);
|
|
31
|
-
const AdaptContents = (props) => {
|
|
23
|
+
var import_core = require("@tamagui/core"), import_react = require("react"), import_jsx_runtime = require("react/jsx-runtime");
|
|
24
|
+
const AdaptParentContext = (0, import_react.createContext)(null), AdaptContents = (props) => {
|
|
32
25
|
const context = (0, import_react.useContext)(AdaptParentContext);
|
|
33
|
-
if (!
|
|
26
|
+
if (!context?.Contents)
|
|
34
27
|
throw new Error("Adapt not supported by this component");
|
|
35
|
-
}
|
|
36
28
|
return (0, import_react.createElement)(context.Contents, props);
|
|
37
29
|
};
|
|
38
|
-
AdaptContents.shouldForwardSpace =
|
|
30
|
+
AdaptContents.shouldForwardSpace = !0;
|
|
39
31
|
const useAdaptParent = ({
|
|
40
32
|
Contents
|
|
41
33
|
}) => {
|
|
42
34
|
const [when, setWhen] = (0, import_react.useState)(null);
|
|
43
|
-
const AdaptProvider = (0, import_react.useMemo)(() => {
|
|
44
|
-
const context = {
|
|
45
|
-
Contents,
|
|
46
|
-
setWhen
|
|
47
|
-
};
|
|
48
|
-
function AdaptProviderView(props) {
|
|
49
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AdaptParentContext.Provider, { value: context, children: props.children });
|
|
50
|
-
}
|
|
51
|
-
return AdaptProviderView;
|
|
52
|
-
}, [Contents]);
|
|
53
35
|
return {
|
|
54
|
-
AdaptProvider,
|
|
36
|
+
AdaptProvider: (0, import_react.useMemo)(() => {
|
|
37
|
+
const context = {
|
|
38
|
+
Contents,
|
|
39
|
+
setWhen
|
|
40
|
+
};
|
|
41
|
+
function AdaptProviderView(props) {
|
|
42
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AdaptParentContext.Provider, { value: context, children: props.children });
|
|
43
|
+
}
|
|
44
|
+
return AdaptProviderView;
|
|
45
|
+
}, [Contents]),
|
|
55
46
|
when
|
|
56
47
|
};
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
const context = (0, import_react.useContext)(AdaptParentContext);
|
|
61
|
-
const media = (0, import_core.useMedia)();
|
|
48
|
+
}, Adapt = (0, import_core.withStaticProperties)(
|
|
49
|
+
function({ platform, when, children }) {
|
|
50
|
+
const context = (0, import_react.useContext)(AdaptParentContext), media = (0, import_core.useMedia)();
|
|
62
51
|
let enabled = !platform;
|
|
63
|
-
|
|
64
|
-
enabled
|
|
65
|
-
|
|
66
|
-
enabled = !import_core.isWeb;
|
|
67
|
-
if (platform === "web")
|
|
68
|
-
enabled = import_core.isWeb;
|
|
69
|
-
if (when && !media[when]) {
|
|
70
|
-
enabled = false;
|
|
71
|
-
}
|
|
72
|
-
(0, import_core.useIsomorphicLayoutEffect)(() => {
|
|
73
|
-
if (!enabled)
|
|
74
|
-
return;
|
|
75
|
-
context == null ? void 0 : context.setWhen(when || enabled);
|
|
76
|
-
}, [when, context, enabled]);
|
|
77
|
-
if (!enabled) {
|
|
78
|
-
return null;
|
|
79
|
-
}
|
|
80
|
-
return children;
|
|
52
|
+
return platform === "touch" && (enabled = import_core.isTouchable), platform === "native" && (enabled = !import_core.isWeb), platform === "web" && (enabled = import_core.isWeb), when && !media[when] && (enabled = !1), (0, import_core.useIsomorphicLayoutEffect)(() => {
|
|
53
|
+
enabled && context?.setWhen(when || enabled);
|
|
54
|
+
}, [when, context, enabled]), enabled ? children : null;
|
|
81
55
|
},
|
|
82
56
|
{
|
|
83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,QAAS,QAAQ,OAAgB;AAAA,IAC5C,GAAG,CAAC,MAAM,SAAS,OAAO,CAAC,GAEtB,UAIE,WAHE;AAAA,EAIX;AAAA,EACA;AAAA,IACE,UAAU;AAAA,EACZ;AACF;",
|
|
5
|
+
"names": []
|
|
6
6
|
}
|
|
@@ -0,0 +1,68 @@
|
|
|
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 Adapt_exports = {};
|
|
17
|
+
__export(Adapt_exports, {
|
|
18
|
+
Adapt: () => Adapt,
|
|
19
|
+
AdaptContents: () => AdaptContents,
|
|
20
|
+
AdaptParentContext: () => AdaptParentContext,
|
|
21
|
+
useAdaptParent: () => useAdaptParent
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(Adapt_exports);
|
|
24
|
+
var import_core = require("@tamagui/core"), import_react = require("react"), import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
+
const AdaptParentContext = (0, import_react.createContext)(null), AdaptContents = (props) => {
|
|
26
|
+
const context = (0, import_react.useContext)(AdaptParentContext);
|
|
27
|
+
if (!context?.Contents)
|
|
28
|
+
throw new Error("Adapt not supported by this component");
|
|
29
|
+
return (0, import_react.createElement)(context.Contents, props);
|
|
30
|
+
};
|
|
31
|
+
AdaptContents.shouldForwardSpace = !0;
|
|
32
|
+
const useAdaptParent = ({
|
|
33
|
+
Contents
|
|
34
|
+
}) => {
|
|
35
|
+
const [when, setWhen] = (0, import_react.useState)(null);
|
|
36
|
+
return {
|
|
37
|
+
AdaptProvider: (0, import_react.useMemo)(() => {
|
|
38
|
+
const context = {
|
|
39
|
+
Contents,
|
|
40
|
+
setWhen
|
|
41
|
+
};
|
|
42
|
+
function AdaptProviderView(props) {
|
|
43
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AdaptParentContext.Provider, { value: context, children: props.children });
|
|
44
|
+
}
|
|
45
|
+
return AdaptProviderView;
|
|
46
|
+
}, [Contents]),
|
|
47
|
+
when
|
|
48
|
+
};
|
|
49
|
+
}, Adapt = (0, import_core.withStaticProperties)(
|
|
50
|
+
function({ platform, when, children }) {
|
|
51
|
+
const context = (0, import_react.useContext)(AdaptParentContext), media = (0, import_core.useMedia)();
|
|
52
|
+
let enabled = !platform;
|
|
53
|
+
return platform === "touch" && (enabled = import_core.isTouchable), platform === "native" && (enabled = !import_core.isWeb), platform === "web" && (enabled = import_core.isWeb), when && !media[when] && (enabled = !1), (0, import_core.useIsomorphicLayoutEffect)(() => {
|
|
54
|
+
enabled && context?.setWhen(when || enabled);
|
|
55
|
+
}, [when, context, enabled]), enabled ? children : null;
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
Contents: AdaptContents
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
62
|
+
0 && (module.exports = {
|
|
63
|
+
Adapt,
|
|
64
|
+
AdaptContents,
|
|
65
|
+
AdaptParentContext,
|
|
66
|
+
useAdaptParent
|
|
67
|
+
});
|
|
68
|
+
//# sourceMappingURL=Adapt.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|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AA,IACE,UAAU;AAAA,EACZ;AACF;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,18 +1,14 @@
|
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from
|
|
6
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
8
7
|
for (let key of __getOwnPropNames(from))
|
|
9
|
-
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
8
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
9
|
return to;
|
|
13
|
-
};
|
|
14
|
-
var
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
10
|
+
}, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
11
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
12
|
var src_exports = {};
|
|
17
13
|
module.exports = __toCommonJS(src_exports);
|
|
18
14
|
__reExport(src_exports, require("./Adapt"), module.exports);
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
}, __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("./Adapt"), module.exports);
|
|
16
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
17
|
+
0 && (module.exports = {
|
|
18
|
+
...require("./Adapt")
|
|
19
|
+
});
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
package/dist/esm/Adapt.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
1
|
import {
|
|
3
2
|
isTouchable,
|
|
4
3
|
isWeb,
|
|
@@ -7,57 +6,38 @@ import {
|
|
|
7
6
|
withStaticProperties
|
|
8
7
|
} from "@tamagui/core";
|
|
9
8
|
import { createContext, createElement, useContext, useMemo, useState } from "react";
|
|
10
|
-
|
|
11
|
-
const AdaptContents = (props) => {
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
const AdaptParentContext = createContext(null), AdaptContents = (props) => {
|
|
12
11
|
const context = useContext(AdaptParentContext);
|
|
13
|
-
if (!
|
|
12
|
+
if (!context?.Contents)
|
|
14
13
|
throw new Error("Adapt not supported by this component");
|
|
15
|
-
}
|
|
16
14
|
return createElement(context.Contents, props);
|
|
17
15
|
};
|
|
18
|
-
AdaptContents.shouldForwardSpace =
|
|
16
|
+
AdaptContents.shouldForwardSpace = !0;
|
|
19
17
|
const useAdaptParent = ({
|
|
20
18
|
Contents
|
|
21
19
|
}) => {
|
|
22
20
|
const [when, setWhen] = useState(null);
|
|
23
|
-
const AdaptProvider = useMemo(() => {
|
|
24
|
-
const context = {
|
|
25
|
-
Contents,
|
|
26
|
-
setWhen
|
|
27
|
-
};
|
|
28
|
-
function AdaptProviderView(props) {
|
|
29
|
-
return /* @__PURE__ */ jsx(AdaptParentContext.Provider, { value: context, children: props.children });
|
|
30
|
-
}
|
|
31
|
-
return AdaptProviderView;
|
|
32
|
-
}, [Contents]);
|
|
33
21
|
return {
|
|
34
|
-
AdaptProvider
|
|
22
|
+
AdaptProvider: useMemo(() => {
|
|
23
|
+
const context = {
|
|
24
|
+
Contents,
|
|
25
|
+
setWhen
|
|
26
|
+
};
|
|
27
|
+
function AdaptProviderView(props) {
|
|
28
|
+
return /* @__PURE__ */ jsx(AdaptParentContext.Provider, { value: context, children: props.children });
|
|
29
|
+
}
|
|
30
|
+
return AdaptProviderView;
|
|
31
|
+
}, [Contents]),
|
|
35
32
|
when
|
|
36
33
|
};
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const context = useContext(AdaptParentContext);
|
|
41
|
-
const media = useMedia();
|
|
34
|
+
}, Adapt = withStaticProperties(
|
|
35
|
+
function({ platform, when, children }) {
|
|
36
|
+
const context = useContext(AdaptParentContext), media = useMedia();
|
|
42
37
|
let enabled = !platform;
|
|
43
|
-
|
|
44
|
-
enabled
|
|
45
|
-
|
|
46
|
-
enabled = !isWeb;
|
|
47
|
-
if (platform === "web")
|
|
48
|
-
enabled = isWeb;
|
|
49
|
-
if (when && !media[when]) {
|
|
50
|
-
enabled = false;
|
|
51
|
-
}
|
|
52
|
-
useIsomorphicLayoutEffect(() => {
|
|
53
|
-
if (!enabled)
|
|
54
|
-
return;
|
|
55
|
-
context == null ? void 0 : context.setWhen(when || enabled);
|
|
56
|
-
}, [when, context, enabled]);
|
|
57
|
-
if (!enabled) {
|
|
58
|
-
return null;
|
|
59
|
-
}
|
|
60
|
-
return children;
|
|
38
|
+
return platform === "touch" && (enabled = isTouchable), platform === "native" && (enabled = !isWeb), platform === "web" && (enabled = isWeb), when && !media[when] && (enabled = !1), useIsomorphicLayoutEffect(() => {
|
|
39
|
+
enabled && context?.setWhen(when || enabled);
|
|
40
|
+
}, [when, context, enabled]), enabled ? children : null;
|
|
61
41
|
},
|
|
62
42
|
{
|
|
63
43
|
Contents: AdaptContents
|
package/dist/esm/Adapt.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Adapt.tsx"],
|
|
4
|
-
"mappings": "
|
|
5
|
-
"names": [
|
|
4
|
+
"mappings": "AAAA;AAAA,EAEE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,eAAe,eAAe,YAAY,SAAS,gBAAgB;AA8CpE;AA5BD,MAAM,qBAAqB,cAA0C,IAAI,GAGnE,gBAAgB,CAAC,UAAe;AAC3C,QAAM,UAAU,WAAW,kBAAkB;AAC7C,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,uCAAuC;AAEzD,SAAO,cAAc,QAAQ,UAAU,KAAK;AAC9C;AAEA,cAAc,qBAAqB;AAE5B,MAAM,iBAAiB,CAAC;AAAA,EAC7B;AACF,MAEM;AACJ,QAAM,CAAC,MAAM,OAAO,IAAI,SAAe,IAAI;AAmB3C,SAAO;AAAA,IACL,eAlBoB,QAAQ,MAAM;AAClC,YAAM,UAA+B;AAAA,QACnC;AAAA,QACA;AAAA,MACF;AAEA,eAAS,kBAAkB,OAA2B;AACpD,eACE,oBAAC,mBAAmB,UAAnB,EAA4B,OAAO,SACjC,gBAAM,UACT;AAAA,MAEJ;AAEA,aAAO;AAAA,IACT,GAAG,CAAC,QAAQ,CAAC;AAAA,IAIX;AAAA,EACF;AACF,GAEa,QAAQ;AAAA,EACnB,SAAe,EAAE,UAAU,MAAM,SAAS,GAAe;AACvD,UAAM,UAAU,WAAW,kBAAkB,GACvC,QAAQ,SAAS;AAEvB,QAAI,UAAU,CAAC;AAcf,WAbI,aAAa,YAAS,UAAU,cAChC,aAAa,aAAU,UAAU,CAAC,QAClC,aAAa,UAAO,UAAU,QAE9B,QAAQ,CAAC,MAAM,IAAI,MACrB,UAAU,KAGZ,0BAA0B,MAAM;AAC9B,MAAK,WACL,SAAS,QAAS,QAAQ,OAAgB;AAAA,IAC5C,GAAG,CAAC,MAAM,SAAS,OAAO,CAAC,GAEtB,UAIE,WAHE;AAAA,EAIX;AAAA,EACA;AAAA,IACE,UAAU;AAAA,EACZ;AACF;",
|
|
5
|
+
"names": []
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/adapt",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.62.1",
|
|
4
4
|
"types": "./types/index.d.ts",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@tamagui/core": "1.
|
|
29
|
+
"@tamagui/core": "1.62.1"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@tamagui/build": "1.
|
|
32
|
+
"@tamagui/build": "1.62.1"
|
|
33
33
|
},
|
|
34
34
|
"publishConfig": {
|
|
35
35
|
"access": "public"
|