@tamagui/adapt 1.108.0 → 1.108.2
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 +17 -9
- package/dist/cjs/Adapt.js.map +2 -2
- package/dist/cjs/Adapt.native.js +16 -8
- package/dist/cjs/Adapt.native.js.map +2 -2
- package/dist/esm/Adapt.js +7 -7
- package/dist/esm/Adapt.js.map +1 -1
- package/dist/esm/Adapt.mjs +7 -7
- package/dist/esm/Adapt.mjs.map +1 -1
- package/dist/esm/Adapt.native.js +6 -6
- package/dist/esm/Adapt.native.js.map +2 -2
- package/package.json +5 -5
- package/src/Adapt.tsx +11 -13
- package/types/Adapt.d.ts +7 -6
- package/types/Adapt.d.ts.map +1 -1
package/dist/cjs/Adapt.js
CHANGED
|
@@ -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,7 +12,14 @@ 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 Adapt_exports = {};
|
|
16
24
|
__export(Adapt_exports, {
|
|
17
25
|
Adapt: () => Adapt,
|
|
@@ -20,22 +28,22 @@ __export(Adapt_exports, {
|
|
|
20
28
|
useAdaptParent: () => useAdaptParent
|
|
21
29
|
});
|
|
22
30
|
module.exports = __toCommonJS(Adapt_exports);
|
|
23
|
-
var
|
|
24
|
-
const AdaptParentContext =
|
|
25
|
-
const context =
|
|
31
|
+
var import_react = __toESM(require("react")), import_constants = require("@tamagui/constants"), import_core = require("@tamagui/core"), import_helpers = require("@tamagui/helpers"), import_jsx_runtime = require("react/jsx-runtime");
|
|
32
|
+
const AdaptParentContext = import_react.default.createContext(null), AdaptContents = (props) => {
|
|
33
|
+
const context = import_react.default.useContext(AdaptParentContext);
|
|
26
34
|
if (!context?.Contents)
|
|
27
35
|
throw new Error(
|
|
28
36
|
process.env.NODE_ENV === "production" ? "tamagui.dev/docs/intro/errors#warning-002" : "You're rendering a Tamagui <Adapt /> component without nesting it inside a parent that is able to adapt."
|
|
29
37
|
);
|
|
30
|
-
return
|
|
38
|
+
return import_react.default.createElement(context.Contents, props);
|
|
31
39
|
};
|
|
32
40
|
AdaptContents.shouldForwardSpace = !0;
|
|
33
41
|
const useAdaptParent = ({
|
|
34
42
|
Contents
|
|
35
43
|
}) => {
|
|
36
|
-
const [when, setWhen] =
|
|
44
|
+
const [when, setWhen] = import_react.default.useState(null);
|
|
37
45
|
return {
|
|
38
|
-
AdaptProvider:
|
|
46
|
+
AdaptProvider: import_react.default.useMemo(() => {
|
|
39
47
|
const context = {
|
|
40
48
|
Contents,
|
|
41
49
|
setWhen
|
|
@@ -49,7 +57,7 @@ const useAdaptParent = ({
|
|
|
49
57
|
};
|
|
50
58
|
}, Adapt = (0, import_helpers.withStaticProperties)(
|
|
51
59
|
function({ platform, when, children }) {
|
|
52
|
-
const context =
|
|
60
|
+
const context = import_react.default.useContext(AdaptParentContext), media = (0, import_core.useMedia)();
|
|
53
61
|
let enabled = !1;
|
|
54
62
|
return typeof when == "function" ? enabled = when({ media }) : (enabled = !platform, platform === "touch" && (enabled = import_constants.isTouchable), platform === "native" && (enabled = !import_constants.isWeb), platform === "web" && (enabled = import_constants.isWeb), platform === "ios" && (enabled = import_constants.isIos), platform === "android" && (enabled = import_constants.isAndroid), when && !media[when] && (enabled = !1)), (0, import_constants.useIsomorphicLayoutEffect)(() => {
|
|
55
63
|
enabled && context?.setWhen(when || enabled);
|
package/dist/cjs/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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB,2BAClB,mBAMO,+BAEP,cAAyB,0BACzB,iBAAqC,6BAkD7B;AA9BD,MAAM,qBAAqB,aAAAA,QAAM,cAA0C,IAAI,GAGzE,gBAAgB,CAAC,UAAe;AAC3C,QAAM,UAAU,aAAAA,QAAM,WAAW,kBAAkB;AACnD,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI;AAAA,MACR,QAAQ,IAAI,aAAa,eACrB,8CACA;AAAA,IACN;AAEF,SAAO,aAAAA,QAAM,cAAc,QAAQ,UAAU,KAAK;AACpD;AAEA,cAAc,qBAAqB;AAE5B,MAAM,iBAAiB,CAAC;AAAA,EAC7B;AACF,MAAqD;AACnD,QAAM,CAAC,MAAM,OAAO,IAAI,aAAAA,QAAM,SAAe,IAAI;AAmBjD,SAAO;AAAA,IACL,eAlBoB,aAAAA,QAAM,QAAQ,MAAM;AACxC,YAAM,UAA+B;AAAA,QACnC;AAAA,QACA;AAAA,MACF;AAEA,eAAS,kBAAkB,OAA2B;AACpD,eACE,4CAAC,mBAAmB,UAAnB,EAA4B,OAAO,SACjC,gBAAM,UACT;AAAA,MAEJ;AAEA,aAAO;AAAA,IACT,GAAG,CAAC,QAAQ,CAAC;AAAA,IAIX;AAAA,EACF;AACF,GAEa,YAAQ;AAAA,EACnB,SAAe,EAAE,UAAU,MAAM,SAAS,GAAe;AACvD,UAAM,UAAU,aAAAA,QAAM,WAAW,kBAAkB,GAC7C,YAAQ,sBAAS;AAEvB,QAAI,UAAU;AAuBd,WArBI,OAAO,QAAS,aAClB,UAAU,KAAK,EAAE,MAAM,CAAC,KAExB,UAAU,CAAC,UAEP,aAAa,YAAS,UAAU,+BAChC,aAAa,aAAU,UAAU,CAAC,yBAClC,aAAa,UAAO,UAAU,yBAC9B,aAAa,UAAO,UAAU,yBAC9B,aAAa,cAAW,UAAU,6BAElC,QAAQ,CAAC,MAAM,IAAI,MACrB,UAAU,UAId,4CAA0B,MAAM;AAC9B,MAAK,WACL,SAAS,QAAS,QAAQ,OAAgB;AAAA,IAC5C,GAAG,CAAC,MAAM,SAAS,OAAO,CAAC,GAEtB,UAID,OAAO,YAAa,aACf,SAAS,EAAE,SAAS,MAAM,CAAC,IAG7B,WAPE;AAAA,EAQX;AAAA,EACA;AAAA,IACE,UAAU;AAAA,EACZ;AACF;",
|
|
5
|
+
"names": ["React"]
|
|
6
6
|
}
|
package/dist/cjs/Adapt.native.js
CHANGED
|
@@ -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,7 +13,14 @@ 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 Adapt_exports = {};
|
|
17
25
|
__export(Adapt_exports, {
|
|
18
26
|
Adapt: () => Adapt,
|
|
@@ -21,7 +29,7 @@ __export(Adapt_exports, {
|
|
|
21
29
|
useAdaptParent: () => useAdaptParent
|
|
22
30
|
});
|
|
23
31
|
module.exports = __toCommonJS(Adapt_exports);
|
|
24
|
-
var import_jsx_runtime = require("react/jsx-runtime"),
|
|
32
|
+
var import_jsx_runtime = require("react/jsx-runtime"), import_react = __toESM(require("react")), import_constants = require("@tamagui/constants"), import_core = require("@tamagui/core"), import_helpers = require("@tamagui/helpers");
|
|
25
33
|
function _array_like_to_array(arr, len) {
|
|
26
34
|
(len == null || len > arr.length) && (len = arr.length);
|
|
27
35
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -63,15 +71,15 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
63
71
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
64
72
|
}
|
|
65
73
|
}
|
|
66
|
-
var AdaptParentContext = /* @__PURE__ */
|
|
67
|
-
var context =
|
|
74
|
+
var AdaptParentContext = /* @__PURE__ */ import_react.default.createContext(null), AdaptContents = function(props) {
|
|
75
|
+
var context = import_react.default.useContext(AdaptParentContext);
|
|
68
76
|
if (!(context != null && context.Contents))
|
|
69
77
|
throw new Error(process.env.NODE_ENV === "production" ? "tamagui.dev/docs/intro/errors#warning-002" : "You're rendering a Tamagui <Adapt /> component without nesting it inside a parent that is able to adapt.");
|
|
70
|
-
return /* @__PURE__ */
|
|
78
|
+
return /* @__PURE__ */ import_react.default.createElement(context.Contents, props);
|
|
71
79
|
};
|
|
72
80
|
AdaptContents.shouldForwardSpace = !0;
|
|
73
81
|
var useAdaptParent = function(param) {
|
|
74
|
-
var Contents = param.Contents,
|
|
82
|
+
var Contents = param.Contents, _React_useState = _sliced_to_array(import_react.default.useState(null), 2), when = _React_useState[0], setWhen = _React_useState[1], AdaptProvider = import_react.default.useMemo(function() {
|
|
75
83
|
var AdaptProviderView = function(props) {
|
|
76
84
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AdaptParentContext.Provider, {
|
|
77
85
|
value: context,
|
|
@@ -90,7 +98,7 @@ var useAdaptParent = function(param) {
|
|
|
90
98
|
when
|
|
91
99
|
};
|
|
92
100
|
}, Adapt = (0, import_helpers.withStaticProperties)(function(param) {
|
|
93
|
-
var platform = param.platform, when = param.when, children = param.children, context =
|
|
101
|
+
var platform = param.platform, when = param.when, children = param.children, context = import_react.default.useContext(AdaptParentContext), media = (0, import_core.useMedia)(), enabled = !1;
|
|
94
102
|
return typeof when == "function" ? enabled = when({
|
|
95
103
|
media
|
|
96
104
|
}) : (enabled = !platform, platform === "touch" && (enabled = import_constants.isTouchable), platform === "native" && (enabled = !import_constants.isWeb), platform === "web" && (enabled = import_constants.isWeb), platform === "ios" && (enabled = import_constants.isIos), platform === "android" && (enabled = import_constants.isAndroid), when && !media[when] && (enabled = !1)), (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Users/n8/tamagui/code/ui/adapt/src/Adapt.tsx"],
|
|
4
|
-
"mappings": "
|
|
5
|
-
"names": ["AdaptParentContext", "createContext", "AdaptContents", "props", "context", "useContext", "Contents", "Error", "process", "env", "NODE_ENV", "createElement", "shouldForwardSpace", "useAdaptParent", "useState", "when", "setWhen", "AdaptProvider", "useMemo", "AdaptProviderView", "_jsx", "Provider", "value", "children", "Adapt", "withStaticProperties", "platform", "media", "useMedia", "enabled", "isTouchable", "isWeb", "isIos", "isAndroid", "useIsomorphicLayoutEffect"]
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uDAAA,eAAkB,2BAClB,mBAMO,+BAEP,cAAyB,0BACzB,iBAAqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoB9B,IAAMA,qBAAqBC,6BAAAA,QAAMC,cAA0C,IAAA,GAGrEC,gBAAgB,SAACC,OAAAA;AAC5B,MAAMC,UAAUJ,aAAAA,QAAMK,WAAWN,kBAAAA;AACjC,MAAI,EAACK,WAAAA,QAAAA,QAASE;AACZ,UAAM,IAAIC,MACRC,QAAQC,IAAIC,aAAa,eACpB,8CACA,0GAAA;AAGT,SAAOV,6BAAAA,QAAMW,cAAcP,QAAQE,UAAUH,KAAAA;AAC/C;AAEAD,cAAcU,qBAAqB;AAE5B,IAAMC,iBAAiB,SAAA,OAAA;MAC5BP,WAAAA,MAAAA,UAEwBN,kBAAAA,iBAAAA,aAAAA,QAAMc,SAAe,IAAA,GAAA,CAAA,GAAtCC,OAAiBf,gBAAAA,CAAAA,GAAXgB,UAAWhB,gBAAAA,CAAAA,GAElBiB,gBAAgBjB,aAAAA,QAAMkB,QAAQ,WAAA;QAMzBC,oBAAT,SAA2BhB,OAAyB;AAClD,aACE,uCAAAiB,KAACrB,mBAAmBsB,UAAQ;QAACC,OAAOlB;kBACjCD,MAAMoB;;IAGb,GAXMnB,UAA+B;MACnCE;MACAU;IACF;AAUA,WAAOG;EACT,GAAG;IAACb;GAAS;AAEb,SAAO;IACLW;IACAF;EACF;AACF,GAEaS,YAAQC,qCACnB,SAAe,OAAwC;MAAtCC,WAAF,MAAEA,UAAUX,OAAZ,MAAYA,MAAMQ,WAAlB,MAAkBA,UACzBnB,UAAUJ,aAAAA,QAAMK,WAAWN,kBAAAA,GAC3B4B,YAAQC,sBAAAA,GAEVC,UAAU;AAuBd,SArBI,OAAOd,QAAS,aAClBc,UAAUd,KAAK;IAAEY;EAAM,CAAA,KAEvBE,UAAU,CAACH,UAEPA,aAAa,YAASG,UAAUC,+BAChCJ,aAAa,aAAUG,UAAU,CAACE,yBAClCL,aAAa,UAAOG,UAAUE,yBAC9BL,aAAa,UAAOG,UAAUG,yBAC9BN,aAAa,cAAWG,UAAUI,6BAElClB,QAAQ,CAACY,MAAMZ,IAAAA,MACjBc,UAAU,UAIdK,4CAA0B,WAAA;AACxB,IAAKL,YACLzB,WAAAA,QAAAA,QAASY,QAASD,QAAQc,OAAAA;EAC5B,GAAG;IAACd;IAAMX;IAASyB;GAAQ,GAEtBA,UAID,OAAON,YAAa,aACfA,SAAS;IAAEM;IAASF;EAAM,CAAA,IAG5BJ,WAPE;AAQX,GACA;EACEjB,UAAUJ;AACZ,CAAA;",
|
|
5
|
+
"names": ["AdaptParentContext", "React", "createContext", "AdaptContents", "props", "context", "useContext", "Contents", "Error", "process", "env", "NODE_ENV", "createElement", "shouldForwardSpace", "useAdaptParent", "useState", "when", "setWhen", "AdaptProvider", "useMemo", "AdaptProviderView", "_jsx", "Provider", "value", "children", "Adapt", "withStaticProperties", "platform", "media", "useMedia", "enabled", "isTouchable", "isWeb", "isIos", "isAndroid", "useIsomorphicLayoutEffect"]
|
|
6
6
|
}
|
package/dist/esm/Adapt.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import {
|
|
2
3
|
isAndroid,
|
|
3
4
|
isIos,
|
|
@@ -7,23 +8,22 @@ import {
|
|
|
7
8
|
} from "@tamagui/constants";
|
|
8
9
|
import { useMedia } from "@tamagui/core";
|
|
9
10
|
import { withStaticProperties } from "@tamagui/helpers";
|
|
10
|
-
import { createContext, createElement, useContext, useMemo, useState } from "react";
|
|
11
11
|
import { jsx } from "react/jsx-runtime";
|
|
12
|
-
const AdaptParentContext = createContext(null), AdaptContents = (props) => {
|
|
13
|
-
const context = useContext(AdaptParentContext);
|
|
12
|
+
const AdaptParentContext = React.createContext(null), AdaptContents = (props) => {
|
|
13
|
+
const context = React.useContext(AdaptParentContext);
|
|
14
14
|
if (!context?.Contents)
|
|
15
15
|
throw new Error(
|
|
16
16
|
process.env.NODE_ENV === "production" ? "tamagui.dev/docs/intro/errors#warning-002" : "You're rendering a Tamagui <Adapt /> component without nesting it inside a parent that is able to adapt."
|
|
17
17
|
);
|
|
18
|
-
return createElement(context.Contents, props);
|
|
18
|
+
return React.createElement(context.Contents, props);
|
|
19
19
|
};
|
|
20
20
|
AdaptContents.shouldForwardSpace = !0;
|
|
21
21
|
const useAdaptParent = ({
|
|
22
22
|
Contents
|
|
23
23
|
}) => {
|
|
24
|
-
const [when, setWhen] = useState(null);
|
|
24
|
+
const [when, setWhen] = React.useState(null);
|
|
25
25
|
return {
|
|
26
|
-
AdaptProvider: useMemo(() => {
|
|
26
|
+
AdaptProvider: React.useMemo(() => {
|
|
27
27
|
const context = {
|
|
28
28
|
Contents,
|
|
29
29
|
setWhen
|
|
@@ -37,7 +37,7 @@ const useAdaptParent = ({
|
|
|
37
37
|
};
|
|
38
38
|
}, Adapt = withStaticProperties(
|
|
39
39
|
function({ platform, when, children }) {
|
|
40
|
-
const context = useContext(AdaptParentContext), media = useMedia();
|
|
40
|
+
const context = React.useContext(AdaptParentContext), media = useMedia();
|
|
41
41
|
let enabled = !1;
|
|
42
42
|
return typeof when == "function" ? enabled = when({ media }) : (enabled = !platform, platform === "touch" && (enabled = isTouchable), platform === "native" && (enabled = !isWeb), platform === "web" && (enabled = isWeb), platform === "ios" && (enabled = isIos), platform === "android" && (enabled = isAndroid), when && !media[when] && (enabled = !1)), useIsomorphicLayoutEffect(() => {
|
|
43
43
|
enabled && context?.setWhen(when || enabled);
|
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": "AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,gBAAgB;AACzB,SAAS,4BAA4B;
|
|
4
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,gBAAgB;AACzB,SAAS,4BAA4B;AAkD7B;AA9BD,MAAM,qBAAqB,MAAM,cAA0C,IAAI,GAGzE,gBAAgB,CAAC,UAAe;AAC3C,QAAM,UAAU,MAAM,WAAW,kBAAkB;AACnD,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI;AAAA,MACR,QAAQ,IAAI,aAAa,eACrB,8CACA;AAAA,IACN;AAEF,SAAO,MAAM,cAAc,QAAQ,UAAU,KAAK;AACpD;AAEA,cAAc,qBAAqB;AAE5B,MAAM,iBAAiB,CAAC;AAAA,EAC7B;AACF,MAAqD;AACnD,QAAM,CAAC,MAAM,OAAO,IAAI,MAAM,SAAe,IAAI;AAmBjD,SAAO;AAAA,IACL,eAlBoB,MAAM,QAAQ,MAAM;AACxC,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,MAAM,WAAW,kBAAkB,GAC7C,QAAQ,SAAS;AAEvB,QAAI,UAAU;AAuBd,WArBI,OAAO,QAAS,aAClB,UAAU,KAAK,EAAE,MAAM,CAAC,KAExB,UAAU,CAAC,UAEP,aAAa,YAAS,UAAU,cAChC,aAAa,aAAU,UAAU,CAAC,QAClC,aAAa,UAAO,UAAU,QAC9B,aAAa,UAAO,UAAU,QAC9B,aAAa,cAAW,UAAU,YAElC,QAAQ,CAAC,MAAM,IAAI,MACrB,UAAU,MAId,0BAA0B,MAAM;AAC9B,MAAK,WACL,SAAS,QAAS,QAAQ,OAAgB;AAAA,IAC5C,GAAG,CAAC,MAAM,SAAS,OAAO,CAAC,GAEtB,UAID,OAAO,YAAa,aACf,SAAS,EAAE,SAAS,MAAM,CAAC,IAG7B,WAPE;AAAA,EAQX;AAAA,EACA;AAAA,IACE,UAAU;AAAA,EACZ;AACF;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
package/dist/esm/Adapt.mjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { isAndroid, isIos, isTouchable, isWeb, useIsomorphicLayoutEffect } from "@tamagui/constants";
|
|
2
3
|
import { useMedia } from "@tamagui/core";
|
|
3
4
|
import { withStaticProperties } from "@tamagui/helpers";
|
|
4
|
-
import { createContext, createElement, useContext, useMemo, useState } from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
const AdaptParentContext = createContext(null),
|
|
6
|
+
const AdaptParentContext = React.createContext(null),
|
|
7
7
|
AdaptContents = props => {
|
|
8
|
-
const context = useContext(AdaptParentContext);
|
|
8
|
+
const context = React.useContext(AdaptParentContext);
|
|
9
9
|
if (!context?.Contents) throw new Error(process.env.NODE_ENV === "production" ? "tamagui.dev/docs/intro/errors#warning-002" : "You're rendering a Tamagui <Adapt /> component without nesting it inside a parent that is able to adapt.");
|
|
10
|
-
return createElement(context.Contents, props);
|
|
10
|
+
return React.createElement(context.Contents, props);
|
|
11
11
|
};
|
|
12
12
|
AdaptContents.shouldForwardSpace = !0;
|
|
13
13
|
const useAdaptParent = ({
|
|
14
14
|
Contents
|
|
15
15
|
}) => {
|
|
16
|
-
const [when, setWhen] = useState(null);
|
|
16
|
+
const [when, setWhen] = React.useState(null);
|
|
17
17
|
return {
|
|
18
|
-
AdaptProvider: useMemo(() => {
|
|
18
|
+
AdaptProvider: React.useMemo(() => {
|
|
19
19
|
const context = {
|
|
20
20
|
Contents,
|
|
21
21
|
setWhen
|
|
@@ -36,7 +36,7 @@ const useAdaptParent = ({
|
|
|
36
36
|
when,
|
|
37
37
|
children
|
|
38
38
|
}) {
|
|
39
|
-
const context = useContext(AdaptParentContext),
|
|
39
|
+
const context = React.useContext(AdaptParentContext),
|
|
40
40
|
media = useMedia();
|
|
41
41
|
let enabled = !1;
|
|
42
42
|
return typeof when == "function" ? enabled = when({
|
package/dist/esm/Adapt.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isAndroid","isIos","isTouchable","isWeb","useIsomorphicLayoutEffect","useMedia","withStaticProperties","
|
|
1
|
+
{"version":3,"names":["React","isAndroid","isIos","isTouchable","isWeb","useIsomorphicLayoutEffect","useMedia","withStaticProperties","jsx","AdaptParentContext","createContext","AdaptContents","props","context","useContext","Contents","Error","process","env","NODE_ENV","createElement","shouldForwardSpace","useAdaptParent","when","setWhen","useState","AdaptProvider","useMemo","AdaptProviderView","Provider","value","children","Adapt","platform","media","enabled"],"sources":["../../src/Adapt.tsx"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,KAAA,MAAW;AAClB,SACEC,SAAA,EACAC,KAAA,EACAC,WAAA,EACAC,KAAA,EACAC,yBAAA,QACK;AAEP,SAASC,QAAA,QAAgB;AACzB,SAASC,oBAAA,QAA4B;AAkD7B,SAAAC,GAAA;AA9BD,MAAMC,kBAAA,GAAqBT,KAAA,CAAMU,aAAA,CAA0C,IAAI;EAGzEC,aAAA,GAAiBC,KAAA,IAAe;IAC3C,MAAMC,OAAA,GAAUb,KAAA,CAAMc,UAAA,CAAWL,kBAAkB;IACnD,IAAI,CAACI,OAAA,EAASE,QAAA,EACZ,MAAM,IAAIC,KAAA,CACRC,OAAA,CAAQC,GAAA,CAAIC,QAAA,KAAa,eACrB,8CACA,0GACN;IAEF,OAAOnB,KAAA,CAAMoB,aAAA,CAAcP,OAAA,CAAQE,QAAA,EAAUH,KAAK;EACpD;AAEAD,aAAA,CAAcU,kBAAA,GAAqB;AAE5B,MAAMC,cAAA,GAAiBA,CAAC;IAC7BP;EACF,MAAqD;IACnD,MAAM,CAACQ,IAAA,EAAMC,OAAO,IAAIxB,KAAA,CAAMyB,QAAA,CAAe,IAAI;IAmBjD,OAAO;MACLC,aAAA,EAlBoB1B,KAAA,CAAM2B,OAAA,CAAQ,MAAM;QACxC,MAAMd,OAAA,GAA+B;UACnCE,QAAA;UACAS;QACF;QAEA,SAASI,kBAAkBhB,KAAA,EAA2B;UACpD,OACE,eAAAJ,GAAA,CAACC,kBAAA,CAAmBoB,QAAA,EAAnB;YAA4BC,KAAA,EAAOjB,OAAA;YACjCkB,QAAA,EAAAnB,KAAA,CAAMmB;UAAA,CACT;QAEJ;QAEA,OAAOH,iBAAA;MACT,GAAG,CAACb,QAAQ,CAAC;MAIXQ;IACF;EACF;EAEaS,KAAA,GAAQzB,oBAAA,CACnB,UAAe;IAAE0B,QAAA;IAAUV,IAAA;IAAMQ;EAAS,GAAe;IACvD,MAAMlB,OAAA,GAAUb,KAAA,CAAMc,UAAA,CAAWL,kBAAkB;MAC7CyB,KAAA,GAAQ5B,QAAA,CAAS;IAEvB,IAAI6B,OAAA,GAAU;IAuBd,OArBI,OAAOZ,IAAA,IAAS,aAClBY,OAAA,GAAUZ,IAAA,CAAK;MAAEW;IAAM,CAAC,KAExBC,OAAA,GAAU,CAACF,QAAA,EAEPA,QAAA,KAAa,YAASE,OAAA,GAAUhC,WAAA,GAChC8B,QAAA,KAAa,aAAUE,OAAA,GAAU,CAAC/B,KAAA,GAClC6B,QAAA,KAAa,UAAOE,OAAA,GAAU/B,KAAA,GAC9B6B,QAAA,KAAa,UAAOE,OAAA,GAAUjC,KAAA,GAC9B+B,QAAA,KAAa,cAAWE,OAAA,GAAUlC,SAAA,GAElCsB,IAAA,IAAQ,CAACW,KAAA,CAAMX,IAAI,MACrBY,OAAA,GAAU,MAId9B,yBAAA,CAA0B,MAAM;MACzB8B,OAAA,IACLtB,OAAA,EAASW,OAAA,CAASD,IAAA,IAAQY,OAAgB;IAC5C,GAAG,CAACZ,IAAA,EAAMV,OAAA,EAASsB,OAAO,CAAC,GAEtBA,OAAA,GAID,OAAOJ,QAAA,IAAa,aACfA,QAAA,CAAS;MAAEI,OAAA;MAASD;IAAM,CAAC,IAG7BH,QAAA,GAPE;EAQX,GACA;IACEhB,QAAA,EAAUJ;EACZ,CACF","ignoreList":[]}
|
package/dist/esm/Adapt.native.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
2
3
|
import { isAndroid, isIos, isTouchable, isWeb, useIsomorphicLayoutEffect } from "@tamagui/constants";
|
|
3
4
|
import { useMedia } from "@tamagui/core";
|
|
4
5
|
import { withStaticProperties } from "@tamagui/helpers";
|
|
5
|
-
import { createContext, createElement, useContext, useMemo, useState } from "react";
|
|
6
6
|
function _array_like_to_array(arr, len) {
|
|
7
7
|
(len == null || len > arr.length) && (len = arr.length);
|
|
8
8
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -44,15 +44,15 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
44
44
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
var AdaptParentContext = /* @__PURE__ */ createContext(null), AdaptContents = function(props) {
|
|
48
|
-
var context = useContext(AdaptParentContext);
|
|
47
|
+
var AdaptParentContext = /* @__PURE__ */ React.createContext(null), AdaptContents = function(props) {
|
|
48
|
+
var context = React.useContext(AdaptParentContext);
|
|
49
49
|
if (!(context != null && context.Contents))
|
|
50
50
|
throw new Error(process.env.NODE_ENV === "production" ? "tamagui.dev/docs/intro/errors#warning-002" : "You're rendering a Tamagui <Adapt /> component without nesting it inside a parent that is able to adapt.");
|
|
51
|
-
return /* @__PURE__ */ createElement(context.Contents, props);
|
|
51
|
+
return /* @__PURE__ */ React.createElement(context.Contents, props);
|
|
52
52
|
};
|
|
53
53
|
AdaptContents.shouldForwardSpace = !0;
|
|
54
54
|
var useAdaptParent = function(param) {
|
|
55
|
-
var Contents = param.Contents,
|
|
55
|
+
var Contents = param.Contents, _React_useState = _sliced_to_array(React.useState(null), 2), when = _React_useState[0], setWhen = _React_useState[1], AdaptProvider = React.useMemo(function() {
|
|
56
56
|
var AdaptProviderView = function(props) {
|
|
57
57
|
return /* @__PURE__ */ _jsx(AdaptParentContext.Provider, {
|
|
58
58
|
value: context,
|
|
@@ -71,7 +71,7 @@ var useAdaptParent = function(param) {
|
|
|
71
71
|
when
|
|
72
72
|
};
|
|
73
73
|
}, Adapt = withStaticProperties(function(param) {
|
|
74
|
-
var platform = param.platform, when = param.when, children = param.children, context = useContext(AdaptParentContext), media = useMedia(), enabled = !1;
|
|
74
|
+
var platform = param.platform, when = param.when, children = param.children, context = React.useContext(AdaptParentContext), media = useMedia(), enabled = !1;
|
|
75
75
|
return typeof when == "function" ? enabled = when({
|
|
76
76
|
media
|
|
77
77
|
}) : (enabled = !platform, platform === "touch" && (enabled = isTouchable), platform === "native" && (enabled = !isWeb), platform === "web" && (enabled = isWeb), platform === "ios" && (enabled = isIos), platform === "android" && (enabled = isAndroid), when && !media[when] && (enabled = !1)), useIsomorphicLayoutEffect(function() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Users/n8/tamagui/code/ui/adapt/src/Adapt.tsx"],
|
|
4
|
-
"mappings": ";AAAA,
|
|
5
|
-
"names": ["isAndroid", "isIos", "isTouchable", "isWeb", "useIsomorphicLayoutEffect", "useMedia", "withStaticProperties", "
|
|
4
|
+
"mappings": ";AAAA,OAAOA,WAAW;AAClB,SACEC,WACAC,OACAC,aACAC,OACAC,iCACK;AAEP,SAASC,gBAAgB;AACzB,SAASC,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoB9B,IAAMC,qBAAqBR,sBAAMS,cAA0C,IAAA,GAGrEC,gBAAgB,SAACC,OAAAA;AAC5B,MAAMC,UAAUZ,MAAMa,WAAWL,kBAAAA;AACjC,MAAI,EAACI,WAAAA,QAAAA,QAASE;AACZ,UAAM,IAAIC,MACRC,QAAQC,IAAIC,aAAa,eACpB,8CACA,0GAAA;AAGT,SAAOlB,sBAAMmB,cAAcP,QAAQE,UAAUH,KAAAA;AAC/C;AAEAD,cAAcU,qBAAqB;AAE5B,IAAMC,iBAAiB,SAAA,OAAA;MAC5BP,WAAAA,MAAAA,UAEwBd,kBAAAA,iBAAAA,MAAMsB,SAAe,IAAA,GAAA,CAAA,GAAtCC,OAAiBvB,gBAAAA,CAAAA,GAAXwB,UAAWxB,gBAAAA,CAAAA,GAElByB,gBAAgBzB,MAAM0B,QAAQ,WAAA;QAMzBC,oBAAT,SAA2BhB,OAAyB;AAClD,aACE,qBAACH,mBAAmBoB,UAAQ;QAACC,OAAOjB;kBACjCD,MAAMmB;;IAGb,GAXMlB,UAA+B;MACnCE;MACAU;IACF;AAUA,WAAOG;EACT,GAAG;IAACb;GAAS;AAEb,SAAO;IACLW;IACAF;EACF;AACF,GAEaQ,QAAQxB,qBACnB,SAAe,OAAwC;MAAtCyB,WAAF,MAAEA,UAAUT,OAAZ,MAAYA,MAAMO,WAAlB,MAAkBA,UACzBlB,UAAUZ,MAAMa,WAAWL,kBAAAA,GAC3ByB,QAAQ3B,SAAAA,GAEV4B,UAAU;AAuBd,SArBI,OAAOX,QAAS,aAClBW,UAAUX,KAAK;IAAEU;EAAM,CAAA,KAEvBC,UAAU,CAACF,UAEPA,aAAa,YAASE,UAAU/B,cAChC6B,aAAa,aAAUE,UAAU,CAAC9B,QAClC4B,aAAa,UAAOE,UAAU9B,QAC9B4B,aAAa,UAAOE,UAAUhC,QAC9B8B,aAAa,cAAWE,UAAUjC,YAElCsB,QAAQ,CAACU,MAAMV,IAAAA,MACjBW,UAAU,MAId7B,0BAA0B,WAAA;AACxB,IAAK6B,YACLtB,WAAAA,QAAAA,QAASY,QAASD,QAAQW,OAAAA;EAC5B,GAAG;IAACX;IAAMX;IAASsB;GAAQ,GAEtBA,UAID,OAAOJ,YAAa,aACfA,SAAS;IAAEI;IAASD;EAAM,CAAA,IAG5BH,WAPE;AAQX,GACA;EACEhB,UAAUJ;AACZ,CAAA;",
|
|
5
|
+
"names": ["React", "isAndroid", "isIos", "isTouchable", "isWeb", "useIsomorphicLayoutEffect", "useMedia", "withStaticProperties", "AdaptParentContext", "createContext", "AdaptContents", "props", "context", "useContext", "Contents", "Error", "process", "env", "NODE_ENV", "createElement", "shouldForwardSpace", "useAdaptParent", "useState", "when", "setWhen", "AdaptProvider", "useMemo", "AdaptProviderView", "Provider", "value", "children", "Adapt", "platform", "media", "enabled"]
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/adapt",
|
|
3
|
-
"version": "1.108.
|
|
3
|
+
"version": "1.108.2",
|
|
4
4
|
"types": "./types/index.d.ts",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm",
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@tamagui/constants": "1.108.
|
|
31
|
-
"@tamagui/core": "1.108.
|
|
32
|
-
"@tamagui/helpers": "1.108.
|
|
30
|
+
"@tamagui/constants": "1.108.2",
|
|
31
|
+
"@tamagui/core": "1.108.2",
|
|
32
|
+
"@tamagui/helpers": "1.108.2"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@tamagui/build": "1.108.
|
|
35
|
+
"@tamagui/build": "1.108.2"
|
|
36
36
|
},
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
package/src/Adapt.tsx
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react'
|
|
1
2
|
import {
|
|
2
3
|
isAndroid,
|
|
3
4
|
isIos,
|
|
@@ -8,16 +9,15 @@ import {
|
|
|
8
9
|
import type { MediaQueryKey, UseMediaState } from '@tamagui/core'
|
|
9
10
|
import { useMedia } from '@tamagui/core'
|
|
10
11
|
import { withStaticProperties } from '@tamagui/helpers'
|
|
11
|
-
import { createContext, createElement, useContext, useMemo, useState } from 'react'
|
|
12
12
|
|
|
13
13
|
type MediaQueryKeyString = MediaQueryKey extends string ? MediaQueryKey : never
|
|
14
14
|
|
|
15
15
|
export type AdaptProps = {
|
|
16
16
|
when?: MediaQueryKeyString | ((state: { media: UseMediaState }) => boolean)
|
|
17
17
|
platform?: 'native' | 'web' | 'touch' | 'ios' | 'android'
|
|
18
|
-
children
|
|
19
|
-
|
|
|
20
|
-
| ((state: { enabled: boolean; media: UseMediaState }) =>
|
|
18
|
+
children:
|
|
19
|
+
| JSX.Element
|
|
20
|
+
| ((state: { enabled: boolean; media: UseMediaState }) => JSX.Element)
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
type When = MediaQueryKeyString | boolean | null
|
|
@@ -28,11 +28,11 @@ type AdaptParentContextI = {
|
|
|
28
28
|
setWhen: (when: When) => any
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
export const AdaptParentContext = createContext<AdaptParentContextI | null>(null)
|
|
31
|
+
export const AdaptParentContext = React.createContext<AdaptParentContextI | null>(null)
|
|
32
32
|
|
|
33
33
|
// forward props
|
|
34
34
|
export const AdaptContents = (props: any) => {
|
|
35
|
-
const context = useContext(AdaptParentContext)
|
|
35
|
+
const context = React.useContext(AdaptParentContext)
|
|
36
36
|
if (!context?.Contents) {
|
|
37
37
|
throw new Error(
|
|
38
38
|
process.env.NODE_ENV === 'production'
|
|
@@ -40,19 +40,17 @@ export const AdaptContents = (props: any) => {
|
|
|
40
40
|
: `You're rendering a Tamagui <Adapt /> component without nesting it inside a parent that is able to adapt.`
|
|
41
41
|
)
|
|
42
42
|
}
|
|
43
|
-
return createElement(context.Contents, props)
|
|
43
|
+
return React.createElement(context.Contents, props)
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
AdaptContents.shouldForwardSpace = true
|
|
47
47
|
|
|
48
48
|
export const useAdaptParent = ({
|
|
49
49
|
Contents,
|
|
50
|
-
}: {
|
|
51
|
-
|
|
52
|
-
}) => {
|
|
53
|
-
const [when, setWhen] = useState<When>(null)
|
|
50
|
+
}: { Contents: AdaptParentContextI['Contents'] }) => {
|
|
51
|
+
const [when, setWhen] = React.useState<When>(null)
|
|
54
52
|
|
|
55
|
-
const AdaptProvider = useMemo(() => {
|
|
53
|
+
const AdaptProvider = React.useMemo(() => {
|
|
56
54
|
const context: AdaptParentContextI = {
|
|
57
55
|
Contents,
|
|
58
56
|
setWhen,
|
|
@@ -77,7 +75,7 @@ export const useAdaptParent = ({
|
|
|
77
75
|
|
|
78
76
|
export const Adapt = withStaticProperties(
|
|
79
77
|
function Adapt({ platform, when, children }: AdaptProps) {
|
|
80
|
-
const context = useContext(AdaptParentContext)
|
|
78
|
+
const context = React.useContext(AdaptParentContext)
|
|
81
79
|
const media = useMedia()
|
|
82
80
|
|
|
83
81
|
let enabled = false
|
package/types/Adapt.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { MediaQueryKey, UseMediaState } from '@tamagui/core';
|
|
2
3
|
type MediaQueryKeyString = MediaQueryKey extends string ? MediaQueryKey : never;
|
|
3
4
|
export type AdaptProps = {
|
|
@@ -5,10 +6,10 @@ export type AdaptProps = {
|
|
|
5
6
|
media: UseMediaState;
|
|
6
7
|
}) => boolean);
|
|
7
8
|
platform?: 'native' | 'web' | 'touch' | 'ios' | 'android';
|
|
8
|
-
children
|
|
9
|
+
children: JSX.Element | ((state: {
|
|
9
10
|
enabled: boolean;
|
|
10
11
|
media: UseMediaState;
|
|
11
|
-
}) =>
|
|
12
|
+
}) => JSX.Element);
|
|
12
13
|
};
|
|
13
14
|
type When = MediaQueryKeyString | boolean | null;
|
|
14
15
|
type Component = (props: any) => any;
|
|
@@ -16,9 +17,9 @@ type AdaptParentContextI = {
|
|
|
16
17
|
Contents: Component;
|
|
17
18
|
setWhen: (when: When) => any;
|
|
18
19
|
};
|
|
19
|
-
export declare const AdaptParentContext:
|
|
20
|
+
export declare const AdaptParentContext: React.Context<AdaptParentContextI | null>;
|
|
20
21
|
export declare const AdaptContents: {
|
|
21
|
-
(props: any):
|
|
22
|
+
(props: any): React.FunctionComponentElement<any>;
|
|
22
23
|
shouldForwardSpace: boolean;
|
|
23
24
|
};
|
|
24
25
|
export declare const useAdaptParent: ({ Contents, }: {
|
|
@@ -29,9 +30,9 @@ export declare const useAdaptParent: ({ Contents, }: {
|
|
|
29
30
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
30
31
|
when: When;
|
|
31
32
|
};
|
|
32
|
-
export declare const Adapt: (({ platform, when, children }: AdaptProps) =>
|
|
33
|
+
export declare const Adapt: (({ platform, when, children }: AdaptProps) => JSX.Element | null) & {
|
|
33
34
|
Contents: {
|
|
34
|
-
(props: any):
|
|
35
|
+
(props: any): React.FunctionComponentElement<any>;
|
|
35
36
|
shouldForwardSpace: boolean;
|
|
36
37
|
};
|
|
37
38
|
};
|
package/types/Adapt.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Adapt.d.ts","sourceRoot":"","sources":["../src/Adapt.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Adapt.d.ts","sourceRoot":"","sources":["../src/Adapt.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAQzB,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAIjE,KAAK,mBAAmB,GAAG,aAAa,SAAS,MAAM,GAAG,aAAa,GAAG,KAAK,CAAA;AAE/E,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,CAAC,EAAE,mBAAmB,GAAG,CAAC,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,aAAa,CAAA;KAAE,KAAK,OAAO,CAAC,CAAA;IAC3E,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,CAAA;IACzD,QAAQ,EACJ,GAAG,CAAC,OAAO,GACX,CAAC,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,aAAa,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC,CAAA;CACzE,CAAA;AAED,KAAK,IAAI,GAAG,mBAAmB,GAAG,OAAO,GAAG,IAAI,CAAA;AAEhD,KAAK,SAAS,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAA;AACpC,KAAK,mBAAmB,GAAG;IACzB,QAAQ,EAAE,SAAS,CAAA;IACnB,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,GAAG,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,kBAAkB,2CAAwD,CAAA;AAGvF,eAAO,MAAM,aAAa;YAAW,GAAG;;CAUvC,CAAA;AAID,eAAO,MAAM,cAAc,kBAExB;IAAE,QAAQ,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAA;CAAE;2BASV;QAAE,QAAQ,CAAC,EAAE,GAAG,CAAA;KAAE;;CAevD,CAAA;AAED,eAAO,MAAM,KAAK,kCAC6B,UAAU;;gBA3CpB,GAAG;;;CAmFvC,CAAA"}
|