@tamagui/adapt 1.115.5 → 1.116.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/Adapt.cjs +124 -47
- package/dist/cjs/Adapt.cjs.map +1 -1
- package/dist/cjs/Adapt.native.js +100 -41
- package/dist/cjs/Adapt.native.js.map +2 -2
- package/dist/esm/Adapt.js +95 -35
- package/dist/esm/Adapt.js.map +1 -1
- package/dist/esm/Adapt.mjs +120 -46
- package/dist/esm/Adapt.mjs.map +1 -1
- package/dist/esm/Adapt.native.js +98 -41
- package/dist/esm/Adapt.native.js.map +2 -2
- package/package.json +6 -5
- package/src/Adapt.tsx +206 -71
- package/types/Adapt.d.ts +48 -25
- package/types/Adapt.d.ts.map +1 -1
package/dist/cjs/Adapt.cjs
CHANGED
|
@@ -33,61 +33,138 @@ var Adapt_exports = {};
|
|
|
33
33
|
__export(Adapt_exports, {
|
|
34
34
|
Adapt: () => Adapt,
|
|
35
35
|
AdaptContents: () => AdaptContents,
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
AdaptContext: () => AdaptContext,
|
|
37
|
+
AdaptParent: () => AdaptParent,
|
|
38
|
+
AdaptPortalContents: () => AdaptPortalContents,
|
|
39
|
+
useAdaptContext: () => useAdaptContext,
|
|
40
|
+
useAdaptIsActive: () => useAdaptIsActive
|
|
38
41
|
});
|
|
39
42
|
module.exports = __toCommonJS(Adapt_exports);
|
|
40
|
-
var
|
|
41
|
-
import_constants = require("@tamagui/constants"),
|
|
43
|
+
var import_constants = require("@tamagui/constants"),
|
|
42
44
|
import_core = require("@tamagui/core"),
|
|
43
45
|
import_helpers = require("@tamagui/helpers"),
|
|
46
|
+
import_portal = require("@tamagui/portal"),
|
|
47
|
+
import_react = __toESM(require("react")),
|
|
44
48
|
import_jsx_runtime = require("react/jsx-runtime");
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
49
|
+
const CurrentAdaptContextScope = (0, import_react.createContext)(""),
|
|
50
|
+
AdaptContext = (0, import_core.createStyledContext)({
|
|
51
|
+
Contents: null,
|
|
52
|
+
scopeName: "",
|
|
53
|
+
portalName: "",
|
|
54
|
+
platform: null,
|
|
55
|
+
setPlatform: null,
|
|
56
|
+
when: null,
|
|
57
|
+
setChildren: null,
|
|
58
|
+
setWhen: null
|
|
59
|
+
}),
|
|
60
|
+
ProvideAdaptContext = ({
|
|
61
|
+
children,
|
|
62
|
+
...context
|
|
63
|
+
}) => {
|
|
64
|
+
const scope = context.scopeName || "";
|
|
65
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(CurrentAdaptContextScope.Provider, {
|
|
66
|
+
value: scope,
|
|
67
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(AdaptContext.Provider, {
|
|
68
|
+
scope,
|
|
69
|
+
...context,
|
|
70
|
+
children
|
|
71
|
+
})
|
|
72
|
+
});
|
|
73
|
+
},
|
|
74
|
+
useAdaptContext = (scope = "") => {
|
|
75
|
+
const contextScope = (0, import_react.useContext)(CurrentAdaptContextScope);
|
|
76
|
+
return AdaptContext.useStyledContext(scope === "" && contextScope || scope);
|
|
77
|
+
},
|
|
78
|
+
AdaptPortals = /* @__PURE__ */new Map(),
|
|
79
|
+
AdaptParent = ({
|
|
80
|
+
children,
|
|
81
|
+
Contents,
|
|
82
|
+
scope,
|
|
83
|
+
portal
|
|
84
|
+
}) => {
|
|
85
|
+
const portalName = `AdaptPortal${scope}`,
|
|
86
|
+
id = (0, import_react.useId)();
|
|
87
|
+
let FinalContents = Contents || AdaptPortals.get(id);
|
|
88
|
+
FinalContents || (FinalContents = () => /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_portal.PortalHost, {
|
|
89
|
+
name: portalName,
|
|
90
|
+
forwardProps: typeof portal == "boolean" ? void 0 : portal?.forwardProps
|
|
91
|
+
}), AdaptPortals.set(id, FinalContents)), (0, import_react.useEffect)(() => () => {
|
|
92
|
+
AdaptPortals.delete(id);
|
|
93
|
+
}, []);
|
|
94
|
+
const [when, setWhen] = import_react.default.useState(null),
|
|
95
|
+
[platform, setPlatform] = import_react.default.useState(null),
|
|
96
|
+
[children2, setChildren] = import_react.default.useState(null);
|
|
97
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(ProvideAdaptContext, {
|
|
98
|
+
Contents: FinalContents,
|
|
99
|
+
when,
|
|
100
|
+
platform,
|
|
101
|
+
setPlatform,
|
|
102
|
+
setWhen,
|
|
103
|
+
setChildren,
|
|
104
|
+
portalName,
|
|
105
|
+
scopeName: scope,
|
|
106
|
+
children
|
|
107
|
+
});
|
|
108
|
+
},
|
|
109
|
+
AdaptContents = ({
|
|
110
|
+
scope,
|
|
111
|
+
...rest
|
|
112
|
+
}) => {
|
|
113
|
+
const context = useAdaptContext(scope);
|
|
48
114
|
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.");
|
|
49
|
-
return import_react.default.createElement(context.Contents,
|
|
115
|
+
return import_react.default.createElement(context.Contents, {
|
|
116
|
+
...rest,
|
|
117
|
+
key: "stable"
|
|
118
|
+
});
|
|
50
119
|
};
|
|
51
120
|
AdaptContents.shouldForwardSpace = !0;
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
};
|
|
121
|
+
const Adapt = (0, import_helpers.withStaticProperties)(function (props) {
|
|
122
|
+
const {
|
|
123
|
+
platform,
|
|
124
|
+
when,
|
|
125
|
+
children,
|
|
126
|
+
scope
|
|
127
|
+
} = props,
|
|
128
|
+
context = useAdaptContext(scope),
|
|
129
|
+
scopeName = scope ?? context.scopeName,
|
|
130
|
+
enabled = useAdaptIsActiveGiven(props);
|
|
131
|
+
(0, import_constants.useIsomorphicLayoutEffect)(() => {
|
|
132
|
+
context?.setWhen(when || enabled), context?.setPlatform(platform || null);
|
|
133
|
+
}, [when, platform, context, enabled]), (0, import_constants.useIsomorphicLayoutEffect)(() => () => {
|
|
134
|
+
context?.setWhen(null);
|
|
135
|
+
}, []);
|
|
136
|
+
let output;
|
|
137
|
+
if (typeof children == "function") {
|
|
138
|
+
const Component = context?.Contents;
|
|
139
|
+
output = children(Component ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(Component, {}) : null);
|
|
140
|
+
} else output = children;
|
|
141
|
+
return (0, import_react.useEffect)(() => {
|
|
142
|
+
typeof children == "function" && output !== void 0 && context?.setChildren(output);
|
|
143
|
+
}, [output]), /* @__PURE__ */(0, import_jsx_runtime.jsx)(CurrentAdaptContextScope.Provider, {
|
|
144
|
+
value: scopeName,
|
|
145
|
+
children: enabled ? output : null
|
|
146
|
+
});
|
|
147
|
+
}, {
|
|
148
|
+
Contents: AdaptContents
|
|
149
|
+
}),
|
|
150
|
+
AdaptPortalContents = props => {
|
|
151
|
+
const {
|
|
152
|
+
portalName
|
|
153
|
+
} = useAdaptContext(props.scope);
|
|
154
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_portal.PortalItem, {
|
|
155
|
+
hostName: portalName,
|
|
156
|
+
children: props.children
|
|
157
|
+
});
|
|
72
158
|
},
|
|
73
|
-
|
|
74
|
-
platform,
|
|
159
|
+
useAdaptIsActiveGiven = ({
|
|
75
160
|
when,
|
|
76
|
-
|
|
77
|
-
}) {
|
|
78
|
-
const
|
|
79
|
-
media = (0, import_core.useMedia)();
|
|
161
|
+
platform
|
|
162
|
+
}) => {
|
|
163
|
+
const media = (0, import_core.useMedia)();
|
|
80
164
|
let enabled = !1;
|
|
81
|
-
return typeof when == "
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}, [when, context, enabled]), enabled ? typeof children == "function" ? children({
|
|
88
|
-
enabled,
|
|
89
|
-
media
|
|
90
|
-
}) : children : null;
|
|
91
|
-
}, {
|
|
92
|
-
Contents: AdaptContents
|
|
93
|
-
});
|
|
165
|
+
return 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 && typeof when == "string" && !media[when] && (enabled = !1), enabled;
|
|
166
|
+
},
|
|
167
|
+
useAdaptIsActive = scope => {
|
|
168
|
+
const props = useAdaptContext(scope);
|
|
169
|
+
return useAdaptIsActiveGiven(props);
|
|
170
|
+
};
|
package/dist/cjs/Adapt.cjs.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Adapt.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAMO,+BAEP,cAA8C,0BAC9C,iBAAqC,6BACrC,gBAAuC,4BACvC,eAAmE,2BAwD7D;AArBN,MAAM,+BAA2B,4BAAc,EAAE,GAEpC,mBAAe,iCAAyC;AAAA,EACnE,UAAU;AAAA,EACV,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,aAAa;AAAA,EACb,MAAM;AAAA,EACN,aAAa;AAAA,EACb,SAAS;AACX,CAAC,GAEK,sBAAsB,CAAC;AAAA,EAC3B;AAAA,EACA,GAAG;AACL,MAA+C;AAC7C,QAAM,QAAQ,QAAQ,aAAa;AAEnC,SACE,4CAAC,yBAAyB,UAAz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UAAU,6BAElC,QAAQ,OAAO,QAAS,YAAY,CAAC,MAAM,IAAI,MACjD,UAAU,KAGL;AACT,GAEa,mBAAmB,CAAC,UAAmB;AAClD,QAAM,QAAQ,gBAAgB,KAAK;AACnC,SAAO,sBAAsB,KAAK;AACpC;",
|
|
5
5
|
"names": ["React"]
|
|
6
6
|
}
|
package/dist/cjs/Adapt.native.js
CHANGED
|
@@ -25,62 +25,121 @@ var Adapt_exports = {};
|
|
|
25
25
|
__export(Adapt_exports, {
|
|
26
26
|
Adapt: () => Adapt,
|
|
27
27
|
AdaptContents: () => AdaptContents,
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
AdaptContext: () => AdaptContext,
|
|
29
|
+
AdaptParent: () => AdaptParent,
|
|
30
|
+
AdaptPortalContents: () => AdaptPortalContents,
|
|
31
|
+
useAdaptContext: () => useAdaptContext,
|
|
32
|
+
useAdaptIsActive: () => useAdaptIsActive
|
|
30
33
|
});
|
|
31
34
|
module.exports = __toCommonJS(Adapt_exports);
|
|
32
|
-
var import_jsx_runtime = require("react/jsx-runtime"),
|
|
33
|
-
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime"), import_constants = require("@tamagui/constants"), import_core = require("@tamagui/core"), import_helpers = require("@tamagui/helpers"), import_portal = require("@tamagui/portal"), import_react = __toESM(require("react")), CurrentAdaptContextScope = /* @__PURE__ */ (0, import_react.createContext)(""), AdaptContext = (0, import_core.createStyledContext)({
|
|
36
|
+
Contents: null,
|
|
37
|
+
scopeName: "",
|
|
38
|
+
portalName: "",
|
|
39
|
+
platform: null,
|
|
40
|
+
setPlatform: null,
|
|
41
|
+
when: null,
|
|
42
|
+
setChildren: null,
|
|
43
|
+
setWhen: null
|
|
44
|
+
}), ProvideAdaptContext = function(param) {
|
|
45
|
+
var { children, ...context } = param, scope = context.scopeName || "";
|
|
46
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CurrentAdaptContextScope.Provider, {
|
|
47
|
+
value: scope,
|
|
48
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AdaptContext.Provider, {
|
|
49
|
+
scope,
|
|
50
|
+
...context,
|
|
51
|
+
children
|
|
52
|
+
})
|
|
53
|
+
});
|
|
54
|
+
}, useAdaptContext = function() {
|
|
55
|
+
var scope = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", contextScope = (0, import_react.useContext)(CurrentAdaptContextScope), context = AdaptContext.useStyledContext(scope === "" && contextScope || scope);
|
|
56
|
+
return context;
|
|
57
|
+
}, AdaptPortals = /* @__PURE__ */ new Map(), AdaptParent = function(param) {
|
|
58
|
+
var { children, Contents, scope, portal } = param, portalName = `AdaptPortal${scope}`, id = (0, import_react.useId)(), FinalContents = Contents || AdaptPortals.get(id);
|
|
59
|
+
FinalContents || (FinalContents = function() {
|
|
60
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_portal.PortalHost, {
|
|
61
|
+
name: portalName,
|
|
62
|
+
forwardProps: typeof portal == "boolean" || portal == null ? void 0 : portal.forwardProps
|
|
63
|
+
});
|
|
64
|
+
}, AdaptPortals.set(id, FinalContents)), (0, import_react.useEffect)(function() {
|
|
65
|
+
return function() {
|
|
66
|
+
AdaptPortals.delete(id);
|
|
67
|
+
};
|
|
68
|
+
}, []);
|
|
69
|
+
var [when, setWhen] = import_react.default.useState(null), [platform, setPlatform] = import_react.default.useState(null), [children2, setChildren] = import_react.default.useState(null);
|
|
70
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ProvideAdaptContext, {
|
|
71
|
+
Contents: FinalContents,
|
|
72
|
+
when,
|
|
73
|
+
platform,
|
|
74
|
+
setPlatform,
|
|
75
|
+
setWhen,
|
|
76
|
+
setChildren,
|
|
77
|
+
portalName,
|
|
78
|
+
scopeName: scope,
|
|
79
|
+
children
|
|
80
|
+
});
|
|
81
|
+
}, AdaptContents = function(param) {
|
|
82
|
+
var { scope, ...rest } = param, context = useAdaptContext(scope);
|
|
34
83
|
if (!(context != null && context.Contents))
|
|
35
84
|
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.");
|
|
36
|
-
return /* @__PURE__ */ import_react.default.createElement(context.Contents,
|
|
85
|
+
return /* @__PURE__ */ import_react.default.createElement(context.Contents, {
|
|
86
|
+
...rest,
|
|
87
|
+
key: "stable"
|
|
88
|
+
});
|
|
37
89
|
};
|
|
38
90
|
AdaptContents.shouldForwardSpace = !0;
|
|
39
|
-
var
|
|
40
|
-
var {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
setWhen
|
|
44
|
-
};
|
|
45
|
-
function AdaptProviderView(props) {
|
|
46
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AdaptParentContext.Provider, {
|
|
47
|
-
value: context,
|
|
48
|
-
children: props.children
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
return AdaptProviderView;
|
|
52
|
-
}, [
|
|
53
|
-
Contents
|
|
54
|
-
]);
|
|
55
|
-
return {
|
|
56
|
-
AdaptProvider,
|
|
57
|
-
when
|
|
58
|
-
};
|
|
59
|
-
}, Adapt = (0, import_helpers.withStaticProperties)(function(param) {
|
|
60
|
-
var { platform, when, children } = param, context = import_react.default.useContext(AdaptParentContext), media = (0, import_core.useMedia)(), enabled = !1;
|
|
61
|
-
return typeof when == "function" ? enabled = when({
|
|
62
|
-
media
|
|
63
|
-
}) : (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() {
|
|
64
|
-
if (enabled)
|
|
65
|
-
return context == null || context.setWhen(when || enabled), function() {
|
|
66
|
-
context == null || context.setWhen(null);
|
|
67
|
-
};
|
|
91
|
+
var Adapt = (0, import_helpers.withStaticProperties)(function(props) {
|
|
92
|
+
var { platform, when, children, scope } = props, context = useAdaptContext(scope), scopeName = scope ?? context.scopeName, enabled = useAdaptIsActiveGiven(props);
|
|
93
|
+
(0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
94
|
+
context == null || context.setWhen(when || enabled), context == null || context.setPlatform(platform || null);
|
|
68
95
|
}, [
|
|
69
96
|
when,
|
|
97
|
+
platform,
|
|
70
98
|
context,
|
|
71
99
|
enabled
|
|
72
|
-
]),
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
100
|
+
]), (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
101
|
+
return function() {
|
|
102
|
+
context == null || context.setWhen(null);
|
|
103
|
+
};
|
|
104
|
+
}, []);
|
|
105
|
+
var output;
|
|
106
|
+
if (typeof children == "function") {
|
|
107
|
+
var Component = context == null ? void 0 : context.Contents;
|
|
108
|
+
output = children(Component ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, {}) : null);
|
|
109
|
+
} else
|
|
110
|
+
output = children;
|
|
111
|
+
return (0, import_react.useEffect)(function() {
|
|
112
|
+
typeof children == "function" && output !== void 0 && (context == null || context.setChildren(output));
|
|
113
|
+
}, [
|
|
114
|
+
output
|
|
115
|
+
]), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CurrentAdaptContextScope.Provider, {
|
|
116
|
+
value: scopeName,
|
|
117
|
+
children: enabled ? output : null
|
|
118
|
+
});
|
|
76
119
|
}, {
|
|
77
120
|
Contents: AdaptContents
|
|
78
|
-
})
|
|
121
|
+
}), AdaptPortalContents = function(props) {
|
|
122
|
+
var { portalName } = useAdaptContext(props.scope);
|
|
123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_portal.PortalItem, {
|
|
124
|
+
// passthrough={!isWeb && !isActive}
|
|
125
|
+
hostName: portalName,
|
|
126
|
+
children: props.children
|
|
127
|
+
});
|
|
128
|
+
}, useAdaptIsActiveGiven = function(param) {
|
|
129
|
+
var { when, platform } = param, media = (0, import_core.useMedia)(), enabled = !1;
|
|
130
|
+
return 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 && typeof when == "string" && !media[when] && (enabled = !1), enabled;
|
|
131
|
+
}, useAdaptIsActive = function(scope) {
|
|
132
|
+
var props = useAdaptContext(scope);
|
|
133
|
+
return useAdaptIsActiveGiven(props);
|
|
134
|
+
};
|
|
79
135
|
// Annotate the CommonJS export names for ESM import in node:
|
|
80
136
|
0 && (module.exports = {
|
|
81
137
|
Adapt,
|
|
82
138
|
AdaptContents,
|
|
83
|
-
|
|
84
|
-
|
|
139
|
+
AdaptContext,
|
|
140
|
+
AdaptParent,
|
|
141
|
+
AdaptPortalContents,
|
|
142
|
+
useAdaptContext,
|
|
143
|
+
useAdaptIsActive
|
|
85
144
|
});
|
|
86
145
|
//# sourceMappingURL=Adapt.js.map
|
|
@@ -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": ["
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uDAAA,mBAMO,+BAEP,cAA8C,0BAC9C,iBAAqC,6BACrC,gBAAuC,4BACvC,eAAmE,2BAmC7DA,2BAA2BC,gDAAc,EAAA,GAElCC,mBAAeC,iCAAyC;EACnEC,UAAU;EACVC,WAAW;EACXC,YAAY;EACZC,UAAU;EACVC,aAAa;EACbC,MAAM;EACNC,aAAa;EACbC,SAAS;AACX,CAAA,GAEMC,sBAAsB,SAAA,OAAA;MAAC,EAC3BC,UACA,GAAGC,QAAAA,IACqC,OAClCC,QAAQD,QAAQT,aAAa;AAEnC,SACE,uCAAAW,KAA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BAAgBiC,MAAMrC,KAAK;AAMlD,SACE,uCAAAC,KAAC2C,0BAAAA;;IAECC,UAAUtD;cAET8C,MAAMvC;;AAGb,GAEMyC,wBAAwB,SAAA,OAAA;MAAC,EAC7B7C,MACAF,SAAQ,IAC8B,OAChCsD,YAAQC,sBAAAA,GAEVT,UAAU;AAEd,SAAI9C,aAAa,YAAS8C,UAAUU,+BAChCxD,aAAa,aAAU8C,UAAU,CAACW,yBAClCzD,aAAa,UAAO8C,UAAUW,yBAC9BzD,aAAa,UAAO8C,UAAUY,yBAC9B1D,aAAa,cAAW8C,UAAUa,6BAElCzD,QAAQ,OAAOA,QAAS,YAAY,CAACoD,MAAMpD,IAAAA,MAC7C4C,UAAU,KAGLA;AACT,GAEac,mBAAmB,SAACpD,OAAAA;AAC/B,MAAMqC,QAAQjC,gBAAgBJ,KAAAA;AAC9B,SAAOuC,sBAAsBF,KAAAA;AAC/B;",
|
|
5
|
+
"names": ["CurrentAdaptContextScope", "createContext", "AdaptContext", "createStyledContext", "Contents", "scopeName", "portalName", "platform", "setPlatform", "when", "setChildren", "setWhen", "ProvideAdaptContext", "children", "context", "scope", "_jsx", "Provider", "value", "useAdaptContext", "contextScope", "useContext", "useStyledContext", "AdaptPortals", "Map", "AdaptParent", "portal", "id", "useId", "FinalContents", "get", "PortalHost", "name", "forwardProps", "undefined", "set", "useEffect", "delete", "React", "useState", "children2", "AdaptContents", "rest", "Error", "process", "env", "NODE_ENV", "createElement", "key", "shouldForwardSpace", "Adapt", "withStaticProperties", "props", "enabled", "useAdaptIsActiveGiven", "useIsomorphicLayoutEffect", "output", "Component", "AdaptPortalContents", "PortalItem", "hostName", "media", "useMedia", "isTouchable", "isWeb", "isIos", "isAndroid", "useAdaptIsActive"]
|
|
6
6
|
}
|
package/dist/esm/Adapt.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import {
|
|
3
2
|
isAndroid,
|
|
4
3
|
isIos,
|
|
@@ -6,54 +5,115 @@ import {
|
|
|
6
5
|
isWeb,
|
|
7
6
|
useIsomorphicLayoutEffect
|
|
8
7
|
} from "@tamagui/constants";
|
|
9
|
-
import { useMedia } from "@tamagui/core";
|
|
8
|
+
import { createStyledContext, useMedia } from "@tamagui/core";
|
|
10
9
|
import { withStaticProperties } from "@tamagui/helpers";
|
|
10
|
+
import { PortalHost, PortalItem } from "@tamagui/portal";
|
|
11
|
+
import React, { createContext, useContext, useEffect, useId } from "react";
|
|
11
12
|
import { jsx } from "react/jsx-runtime";
|
|
12
|
-
const
|
|
13
|
-
|
|
13
|
+
const CurrentAdaptContextScope = createContext(""), AdaptContext = createStyledContext({
|
|
14
|
+
Contents: null,
|
|
15
|
+
scopeName: "",
|
|
16
|
+
portalName: "",
|
|
17
|
+
platform: null,
|
|
18
|
+
setPlatform: null,
|
|
19
|
+
when: null,
|
|
20
|
+
setChildren: null,
|
|
21
|
+
setWhen: null
|
|
22
|
+
}), ProvideAdaptContext = ({
|
|
23
|
+
children,
|
|
24
|
+
...context
|
|
25
|
+
}) => {
|
|
26
|
+
const scope = context.scopeName || "";
|
|
27
|
+
return /* @__PURE__ */ jsx(CurrentAdaptContextScope.Provider, { value: scope, children: /* @__PURE__ */ jsx(AdaptContext.Provider, { scope, ...context, children }) });
|
|
28
|
+
}, useAdaptContext = (scope = "") => {
|
|
29
|
+
const contextScope = useContext(CurrentAdaptContextScope);
|
|
30
|
+
return AdaptContext.useStyledContext(
|
|
31
|
+
scope === "" && contextScope || scope
|
|
32
|
+
);
|
|
33
|
+
}, AdaptPortals = /* @__PURE__ */ new Map(), AdaptParent = ({ children, Contents, scope, portal }) => {
|
|
34
|
+
const portalName = `AdaptPortal${scope}`, id = useId();
|
|
35
|
+
let FinalContents = Contents || AdaptPortals.get(id);
|
|
36
|
+
FinalContents || (FinalContents = () => /* @__PURE__ */ jsx(
|
|
37
|
+
PortalHost,
|
|
38
|
+
{
|
|
39
|
+
name: portalName,
|
|
40
|
+
forwardProps: typeof portal == "boolean" ? void 0 : portal?.forwardProps
|
|
41
|
+
}
|
|
42
|
+
), AdaptPortals.set(id, FinalContents)), useEffect(() => () => {
|
|
43
|
+
AdaptPortals.delete(id);
|
|
44
|
+
}, []);
|
|
45
|
+
const [when, setWhen] = React.useState(null), [platform, setPlatform] = React.useState(null), [children2, setChildren] = React.useState(null);
|
|
46
|
+
return /* @__PURE__ */ jsx(
|
|
47
|
+
ProvideAdaptContext,
|
|
48
|
+
{
|
|
49
|
+
Contents: FinalContents,
|
|
50
|
+
when,
|
|
51
|
+
platform,
|
|
52
|
+
setPlatform,
|
|
53
|
+
setWhen,
|
|
54
|
+
setChildren,
|
|
55
|
+
portalName,
|
|
56
|
+
scopeName: scope,
|
|
57
|
+
children
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
}, AdaptContents = ({ scope, ...rest }) => {
|
|
61
|
+
const context = useAdaptContext(scope);
|
|
14
62
|
if (!context?.Contents)
|
|
15
63
|
throw new Error(
|
|
16
64
|
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
65
|
);
|
|
18
|
-
return React.createElement(context.Contents,
|
|
66
|
+
return React.createElement(context.Contents, { ...rest, key: "stable" });
|
|
19
67
|
};
|
|
20
68
|
AdaptContents.shouldForwardSpace = !0;
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}, Adapt = withStaticProperties(
|
|
39
|
-
function({ platform, when, children }) {
|
|
40
|
-
const context = React.useContext(AdaptParentContext), media = useMedia();
|
|
41
|
-
let enabled = !1;
|
|
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
|
-
if (enabled)
|
|
44
|
-
return context?.setWhen(when || enabled), () => {
|
|
45
|
-
context?.setWhen(null);
|
|
46
|
-
};
|
|
47
|
-
}, [when, context, enabled]), enabled ? typeof children == "function" ? children({ enabled, media }) : children : null;
|
|
69
|
+
const Adapt = withStaticProperties(
|
|
70
|
+
function(props) {
|
|
71
|
+
const { platform, when, children, scope } = props, context = useAdaptContext(scope), scopeName = scope ?? context.scopeName, enabled = useAdaptIsActiveGiven(props);
|
|
72
|
+
useIsomorphicLayoutEffect(() => {
|
|
73
|
+
context?.setWhen(when || enabled), context?.setPlatform(platform || null);
|
|
74
|
+
}, [when, platform, context, enabled]), useIsomorphicLayoutEffect(() => () => {
|
|
75
|
+
context?.setWhen(null);
|
|
76
|
+
}, []);
|
|
77
|
+
let output;
|
|
78
|
+
if (typeof children == "function") {
|
|
79
|
+
const Component = context?.Contents;
|
|
80
|
+
output = children(Component ? /* @__PURE__ */ jsx(Component, {}) : null);
|
|
81
|
+
} else
|
|
82
|
+
output = children;
|
|
83
|
+
return useEffect(() => {
|
|
84
|
+
typeof children == "function" && output !== void 0 && context?.setChildren(output);
|
|
85
|
+
}, [output]), /* @__PURE__ */ jsx(CurrentAdaptContextScope.Provider, { value: scopeName, children: enabled ? output : null });
|
|
48
86
|
},
|
|
49
87
|
{
|
|
50
88
|
Contents: AdaptContents
|
|
51
89
|
}
|
|
52
|
-
)
|
|
90
|
+
), AdaptPortalContents = (props) => {
|
|
91
|
+
const { portalName } = useAdaptContext(props.scope);
|
|
92
|
+
return /* @__PURE__ */ jsx(
|
|
93
|
+
PortalItem,
|
|
94
|
+
{
|
|
95
|
+
hostName: portalName,
|
|
96
|
+
children: props.children
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
}, useAdaptIsActiveGiven = ({
|
|
100
|
+
when,
|
|
101
|
+
platform
|
|
102
|
+
}) => {
|
|
103
|
+
const media = useMedia();
|
|
104
|
+
let enabled = !1;
|
|
105
|
+
return platform === "touch" && (enabled = isTouchable), platform === "native" && (enabled = !isWeb), platform === "web" && (enabled = isWeb), platform === "ios" && (enabled = isIos), platform === "android" && (enabled = isAndroid), when && typeof when == "string" && !media[when] && (enabled = !1), enabled;
|
|
106
|
+
}, useAdaptIsActive = (scope) => {
|
|
107
|
+
const props = useAdaptContext(scope);
|
|
108
|
+
return useAdaptIsActiveGiven(props);
|
|
109
|
+
};
|
|
53
110
|
export {
|
|
54
111
|
Adapt,
|
|
55
112
|
AdaptContents,
|
|
56
|
-
|
|
57
|
-
|
|
113
|
+
AdaptContext,
|
|
114
|
+
AdaptParent,
|
|
115
|
+
AdaptPortalContents,
|
|
116
|
+
useAdaptContext,
|
|
117
|
+
useAdaptIsActive
|
|
58
118
|
};
|
|
59
119
|
//# sourceMappingURL=Adapt.js.map
|
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
|
|
4
|
+
"mappings": "AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,qBAAqB,gBAAgB;AAC9C,SAAS,4BAA4B;AACrC,SAAS,YAAY,kBAAkB;AACvC,OAAO,SAAS,eAAe,YAAY,WAAW,aAAa;AAwD7D;AArBN,MAAM,2BAA2B,cAAc,EAAE,GAEpC,eAAe,oBAAyC;AAAA,EACnE,UAAU;AAAA,EACV,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,aAAa;AAAA,EACb,MAAM;AAAA,EACN,aAAa;AAAA,EACb,SAAS;AACX,CAAC,GAEK,sBAAs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