@tamagui/static 1.100.6 → 1.101.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/extractor/extractToNative.js +319 -0
- package/dist/cjs/extractor/extractToNative.js.map +6 -0
- package/dist/cjs/extractor/extractToNative.native.js +353 -0
- package/dist/cjs/extractor/extractToNative.native.js.map +6 -0
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.native.js +2 -0
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/esm/extractor/extractToNative.js +309 -0
- package/dist/esm/extractor/extractToNative.js.map +6 -0
- package/dist/esm/extractor/extractToNative.mjs +232 -0
- package/dist/esm/extractor/extractToNative.native.js +329 -0
- package/dist/esm/extractor/extractToNative.native.js.map +6 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +1 -0
- package/dist/esm/index.native.js +1 -0
- package/dist/esm/index.native.js.map +1 -1
- package/package.json +15 -14
- package/src/extractor/extractToNative.ts +504 -0
- package/src/index.ts +1 -0
- package/types/extractor/extractToNative.d.ts +13 -0
- package/types/extractor/extractToNative.d.ts.map +1 -0
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf, __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 __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);
|
|
23
|
+
var extractToNative_exports = {};
|
|
24
|
+
__export(extractToNative_exports, {
|
|
25
|
+
extractToNative: () => extractToNative,
|
|
26
|
+
getBabelParseDefinition: () => getBabelParseDefinition,
|
|
27
|
+
getBabelPlugin: () => getBabelPlugin
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(extractToNative_exports);
|
|
30
|
+
var import_node_path = require("node:path"), import_core = require("@babel/core"), import_generator = __toESM(require("@babel/generator")), import_helper_plugin_utils = require("@babel/helper-plugin-utils"), import_parser = require("@babel/parser"), import_template = __toESM(require("@babel/template")), t = __toESM(require("@babel/types")), import_static = require("@tamagui/static");
|
|
31
|
+
const importNativeView = (0, import_template.default)(`
|
|
32
|
+
const __ReactNativeView = require('react-native').View;
|
|
33
|
+
const __ReactNativeText = require('react-native').Text;
|
|
34
|
+
`), importStyleSheet = (0, import_template.default)(`
|
|
35
|
+
const __ReactNativeStyleSheet = require('react-native').StyleSheet;
|
|
36
|
+
`), importWithStyle = (0, import_template.default)(`
|
|
37
|
+
const __withStableStyle = require('@tamagui/core')._withStableStyle;
|
|
38
|
+
`), extractor = (0, import_static.createExtractor)({ platform: "native" });
|
|
39
|
+
let tamaguiBuildOptionsLoaded;
|
|
40
|
+
function extractToNative(sourceFileName, sourceCode, options) {
|
|
41
|
+
const ast = (0, import_parser.parse)(sourceCode, {
|
|
42
|
+
sourceType: "module",
|
|
43
|
+
plugins: ["jsx", "typescript"]
|
|
44
|
+
}), babelPlugin = getBabelPlugin(), out = (0, import_core.transformFromAstSync)(ast, sourceCode, {
|
|
45
|
+
plugins: [[babelPlugin, options]],
|
|
46
|
+
configFile: !1,
|
|
47
|
+
sourceFileName,
|
|
48
|
+
filename: sourceFileName
|
|
49
|
+
});
|
|
50
|
+
if (!out)
|
|
51
|
+
throw new Error("No output returned");
|
|
52
|
+
return out;
|
|
53
|
+
}
|
|
54
|
+
function getBabelPlugin() {
|
|
55
|
+
return (0, import_helper_plugin_utils.declare)((api, options) => (api.assertVersion(7), getBabelParseDefinition(options)));
|
|
56
|
+
}
|
|
57
|
+
function getBabelParseDefinition(options) {
|
|
58
|
+
return {
|
|
59
|
+
name: "tamagui",
|
|
60
|
+
visitor: {
|
|
61
|
+
Program: {
|
|
62
|
+
enter(root) {
|
|
63
|
+
let sourcePath = this.file.opts.filename;
|
|
64
|
+
if (sourcePath?.includes("node_modules") || !sourcePath?.endsWith(".jsx") && !sourcePath?.endsWith(".tsx"))
|
|
65
|
+
return;
|
|
66
|
+
process.env.SOURCE_ROOT?.endsWith("ios") && (sourcePath = sourcePath.replace("/ios", ""));
|
|
67
|
+
let hasImportedView = !1, hasImportedViewWrapper = !1;
|
|
68
|
+
const sheetStyles = {}, sheetIdentifier = root.scope.generateUidIdentifier("sheet"), firstCommentContents = (
|
|
69
|
+
// join because you can join together multiple pragmas
|
|
70
|
+
root.node.body[0]?.leadingComments?.map((comment) => comment?.value || " ").join(" ") ?? ""
|
|
71
|
+
), firstComment = firstCommentContents ? `//${firstCommentContents}` : "", { shouldPrintDebug, shouldDisable } = (0, import_static.getPragmaOptions)({
|
|
72
|
+
source: firstComment,
|
|
73
|
+
path: sourcePath
|
|
74
|
+
});
|
|
75
|
+
if (shouldDisable)
|
|
76
|
+
return;
|
|
77
|
+
!options.config && !options.components && (tamaguiBuildOptionsLoaded ||= (0, import_static.loadTamaguiBuildConfigSync)({}));
|
|
78
|
+
const finalOptions = {
|
|
79
|
+
// @ts-ignore just in case they leave it out
|
|
80
|
+
platform: "native",
|
|
81
|
+
...tamaguiBuildOptionsLoaded,
|
|
82
|
+
...options
|
|
83
|
+
}, printLog = (0, import_static.createLogger)(sourcePath, finalOptions);
|
|
84
|
+
function addSheetStyle(style, node) {
|
|
85
|
+
let key = `${`${Object.keys(sheetStyles).length}`}`;
|
|
86
|
+
if (process.env.NODE_ENV === "development") {
|
|
87
|
+
const lineNumbers = node.loc ? node.loc.start.line + (node.loc.start.line !== node.loc.end.line ? `-${node.loc.end.line}` : "") : "";
|
|
88
|
+
key += `:${(0, import_node_path.basename)(sourcePath)}:${lineNumbers}`;
|
|
89
|
+
}
|
|
90
|
+
return sheetStyles[key] = style, readStyleExpr(key);
|
|
91
|
+
}
|
|
92
|
+
function readStyleExpr(key) {
|
|
93
|
+
return (0, import_template.default)("SHEET['KEY']")({
|
|
94
|
+
SHEET: sheetIdentifier.name,
|
|
95
|
+
KEY: key
|
|
96
|
+
}).expression;
|
|
97
|
+
}
|
|
98
|
+
let res;
|
|
99
|
+
try {
|
|
100
|
+
res = extractor.parseSync(root, {
|
|
101
|
+
importsWhitelist: ["constants.js", "colors.js"],
|
|
102
|
+
extractStyledDefinitions: options.forceExtractStyleDefinitions,
|
|
103
|
+
excludeProps: /* @__PURE__ */ new Set([
|
|
104
|
+
"className",
|
|
105
|
+
"userSelect",
|
|
106
|
+
"whiteSpace",
|
|
107
|
+
"textOverflow",
|
|
108
|
+
"cursor",
|
|
109
|
+
"contain"
|
|
110
|
+
]),
|
|
111
|
+
shouldPrintDebug,
|
|
112
|
+
...finalOptions,
|
|
113
|
+
// disable this extraction for now at least, need to figure out merging theme vs non-theme
|
|
114
|
+
// because theme need to stay in render(), whereas non-theme can be extracted
|
|
115
|
+
// for now just turn it off entirely at a small perf loss
|
|
116
|
+
disableExtractInlineMedia: !0,
|
|
117
|
+
// disable extracting variables as no native concept of them (only theme values)
|
|
118
|
+
disableExtractVariables: options.experimentalFlattenThemesOnNative ? !1 : "theme",
|
|
119
|
+
sourcePath,
|
|
120
|
+
// disabling flattening for now
|
|
121
|
+
// it's flattening a plain <Paragraph>hello</Paragraph> which breaks things because themes
|
|
122
|
+
// thinking it's not really worth the effort to do much compilation on native
|
|
123
|
+
// for now just disable flatten as it can only run in narrow places on native
|
|
124
|
+
// disableFlattening: 'styled',
|
|
125
|
+
getFlattenedNode({ isTextView }) {
|
|
126
|
+
return hasImportedView || (hasImportedView = !0, root.unshiftContainer("body", importNativeView())), isTextView ? "__ReactNativeText" : "__ReactNativeView";
|
|
127
|
+
},
|
|
128
|
+
onExtractTag(props) {
|
|
129
|
+
const { isFlattened } = props;
|
|
130
|
+
if (!isFlattened)
|
|
131
|
+
return;
|
|
132
|
+
assertValidTag(props.node);
|
|
133
|
+
const stylesExpr = t.arrayExpression([]), hocStylesExpr = t.arrayExpression([]), expressions = [], finalAttrs = [], themeKeysUsed = /* @__PURE__ */ new Set();
|
|
134
|
+
function getStyleExpression(style) {
|
|
135
|
+
if (!style) return;
|
|
136
|
+
const { plain, themed } = splitThemeStyles(style);
|
|
137
|
+
let themeExpr = null;
|
|
138
|
+
if (themed && options.experimentalFlattenThemesOnNative) {
|
|
139
|
+
for (const key in themed)
|
|
140
|
+
themeKeysUsed.add(themed[key].split("$")[1]);
|
|
141
|
+
themeExpr = getThemedStyleExpression(themed);
|
|
142
|
+
}
|
|
143
|
+
const ident = addSheetStyle(plain, props.node);
|
|
144
|
+
return themeExpr ? (addStyleExpression(ident), addStyleExpression(ident, !0), themeExpr) : ident;
|
|
145
|
+
}
|
|
146
|
+
function addStyleExpression(expr, HOC = !1) {
|
|
147
|
+
Array.isArray(expr) ? (HOC ? hocStylesExpr : stylesExpr).elements.push(...expr) : (HOC ? hocStylesExpr : stylesExpr).elements.push(expr);
|
|
148
|
+
}
|
|
149
|
+
function getThemedStyleExpression(styles) {
|
|
150
|
+
const themedStylesAst = (0, import_static.literalToAst)(styles);
|
|
151
|
+
return themedStylesAst.properties.forEach((_) => {
|
|
152
|
+
const prop = _;
|
|
153
|
+
prop.value.type === "StringLiteral" && (prop.value = t.memberExpression(
|
|
154
|
+
t.identifier("theme"),
|
|
155
|
+
t.identifier(prop.value.value.slice(1) + ".get()")
|
|
156
|
+
));
|
|
157
|
+
}), themedStylesAst;
|
|
158
|
+
}
|
|
159
|
+
let hasDynamicStyle = !1;
|
|
160
|
+
for (const attr of props.attrs)
|
|
161
|
+
switch (attr.type) {
|
|
162
|
+
case "style": {
|
|
163
|
+
let styleExpr = getStyleExpression(attr.value);
|
|
164
|
+
addStyleExpression(styleExpr), options.experimentalFlattenThemesOnNative && addStyleExpression(styleExpr, !0);
|
|
165
|
+
break;
|
|
166
|
+
}
|
|
167
|
+
case "ternary": {
|
|
168
|
+
const { consequent, alternate } = attr.value, consExpr = getStyleExpression(consequent), altExpr = getStyleExpression(alternate);
|
|
169
|
+
options.experimentalFlattenThemesOnNative && (expressions.push(attr.value.test), addStyleExpression(
|
|
170
|
+
t.conditionalExpression(
|
|
171
|
+
t.identifier(`_expressions[${expressions.length - 1}]`),
|
|
172
|
+
consExpr || t.nullLiteral(),
|
|
173
|
+
altExpr || t.nullLiteral()
|
|
174
|
+
),
|
|
175
|
+
!0
|
|
176
|
+
));
|
|
177
|
+
const styleExpr = t.conditionalExpression(
|
|
178
|
+
attr.value.test,
|
|
179
|
+
consExpr || t.nullLiteral(),
|
|
180
|
+
altExpr || t.nullLiteral()
|
|
181
|
+
);
|
|
182
|
+
addStyleExpression(
|
|
183
|
+
styleExpr
|
|
184
|
+
// TODO: what is this for ?
|
|
185
|
+
// isFlattened ? simpleHash(JSON.stringify({ consequent, alternate })) : undefined
|
|
186
|
+
);
|
|
187
|
+
break;
|
|
188
|
+
}
|
|
189
|
+
case "dynamic-style": {
|
|
190
|
+
hasDynamicStyle = !0, expressions.push(attr.value), options.experimentalFlattenDynamicValues ? addStyleExpression(
|
|
191
|
+
t.objectExpression([
|
|
192
|
+
t.objectProperty(
|
|
193
|
+
t.identifier(attr.name),
|
|
194
|
+
t.identifier(`_expressions[${expressions.length - 1}]`)
|
|
195
|
+
)
|
|
196
|
+
]),
|
|
197
|
+
!0
|
|
198
|
+
) : addStyleExpression(
|
|
199
|
+
t.objectExpression([
|
|
200
|
+
t.objectProperty(
|
|
201
|
+
t.identifier(attr.name),
|
|
202
|
+
attr.value
|
|
203
|
+
)
|
|
204
|
+
])
|
|
205
|
+
);
|
|
206
|
+
break;
|
|
207
|
+
}
|
|
208
|
+
case "attr": {
|
|
209
|
+
t.isJSXSpreadAttribute(attr.value) && (0, import_static.isSimpleSpread)(attr.value) && (stylesExpr.elements.push(
|
|
210
|
+
t.memberExpression(attr.value.argument, t.identifier("style"))
|
|
211
|
+
), options.experimentalFlattenThemesOnNative && hocStylesExpr.elements.push(
|
|
212
|
+
t.memberExpression(
|
|
213
|
+
attr.value.argument,
|
|
214
|
+
t.identifier("style")
|
|
215
|
+
)
|
|
216
|
+
)), finalAttrs.push(attr.value);
|
|
217
|
+
break;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
if (props.node.attributes = finalAttrs, props.isFlattened)
|
|
221
|
+
if (options.experimentalFlattenThemesOnNative && (themeKeysUsed.size || hocStylesExpr.elements.length > 1 || hasDynamicStyle)) {
|
|
222
|
+
hasImportedViewWrapper || (root.unshiftContainer("body", importWithStyle()), hasImportedViewWrapper = !0);
|
|
223
|
+
const name = props.node.name.name, WrapperIdentifier = root.scope.generateUidIdentifier(
|
|
224
|
+
name + "Wrapper"
|
|
225
|
+
);
|
|
226
|
+
root.pushContainer(
|
|
227
|
+
"body",
|
|
228
|
+
t.variableDeclaration("const", [
|
|
229
|
+
t.variableDeclarator(
|
|
230
|
+
WrapperIdentifier,
|
|
231
|
+
t.callExpression(t.identifier("__withStableStyle"), [
|
|
232
|
+
t.identifier(name),
|
|
233
|
+
t.arrowFunctionExpression(
|
|
234
|
+
[t.identifier("theme"), t.identifier("_expressions")],
|
|
235
|
+
t.blockStatement([
|
|
236
|
+
t.returnStatement(
|
|
237
|
+
t.callExpression(
|
|
238
|
+
t.memberExpression(
|
|
239
|
+
t.identifier("React"),
|
|
240
|
+
t.identifier("useMemo")
|
|
241
|
+
),
|
|
242
|
+
[
|
|
243
|
+
t.arrowFunctionExpression(
|
|
244
|
+
[],
|
|
245
|
+
t.blockStatement([
|
|
246
|
+
t.returnStatement(
|
|
247
|
+
t.arrayExpression([...hocStylesExpr.elements])
|
|
248
|
+
)
|
|
249
|
+
])
|
|
250
|
+
),
|
|
251
|
+
t.arrayExpression([
|
|
252
|
+
t.spreadElement(t.identifier("_expressions"))
|
|
253
|
+
])
|
|
254
|
+
]
|
|
255
|
+
)
|
|
256
|
+
)
|
|
257
|
+
])
|
|
258
|
+
)
|
|
259
|
+
])
|
|
260
|
+
)
|
|
261
|
+
])
|
|
262
|
+
), props.node.name = WrapperIdentifier, props.jsxPath.node.closingElement && (props.jsxPath.node.closingElement.name = WrapperIdentifier), expressions.length && props.node.attributes.push(
|
|
263
|
+
t.jsxAttribute(
|
|
264
|
+
t.jsxIdentifier("expressions"),
|
|
265
|
+
t.jsxExpressionContainer(t.arrayExpression(expressions))
|
|
266
|
+
)
|
|
267
|
+
);
|
|
268
|
+
} else
|
|
269
|
+
props.node.attributes.push(
|
|
270
|
+
t.jsxAttribute(
|
|
271
|
+
t.jsxIdentifier("style"),
|
|
272
|
+
t.jsxExpressionContainer(
|
|
273
|
+
stylesExpr.elements.length === 1 ? stylesExpr.elements[0] : stylesExpr
|
|
274
|
+
)
|
|
275
|
+
)
|
|
276
|
+
);
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
} catch (err) {
|
|
280
|
+
if (err instanceof Error) {
|
|
281
|
+
let message = `${shouldPrintDebug === "verbose" ? err : err.message}`;
|
|
282
|
+
message.includes("Unexpected return value from visitor method") && (message = "Unexpected return value from visitor method"), console.warn("Error in Tamagui parse, skipping", message, err.stack);
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
if (!Object.keys(sheetStyles).length) {
|
|
287
|
+
shouldPrintDebug && console.info("END no styles"), res && printLog(res);
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
290
|
+
const sheetObject = (0, import_static.literalToAst)(sheetStyles), sheetOuter = (0, import_template.default)(
|
|
291
|
+
"const SHEET = __ReactNativeStyleSheet.create(null)"
|
|
292
|
+
)({
|
|
293
|
+
SHEET: sheetIdentifier.name
|
|
294
|
+
});
|
|
295
|
+
sheetOuter.declarations[0].init.arguments[0] = sheetObject, root.unshiftContainer("body", sheetOuter), root.unshiftContainer("body", importStyleSheet()), shouldPrintDebug && (console.info(`
|
|
296
|
+
-------- output code -------
|
|
297
|
+
`), console.info(
|
|
298
|
+
(0, import_generator.default)(root.parent).code.split(`
|
|
299
|
+
`).filter((x) => !x.startsWith("//")).join(`
|
|
300
|
+
`)
|
|
301
|
+
)), res && printLog(res);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
function assertValidTag(node) {
|
|
308
|
+
node.attributes.find((x) => x.type === "JSXAttribute" && x.name.name === "style") && process.env.DEBUG?.startsWith("tamagui") && console.warn("\u26A0\uFE0F Cannot pass style attribute to extracted style");
|
|
309
|
+
}
|
|
310
|
+
function splitThemeStyles(style) {
|
|
311
|
+
const themed = {}, plain = {};
|
|
312
|
+
let noTheme = !0;
|
|
313
|
+
for (const key in style) {
|
|
314
|
+
const val = style[key];
|
|
315
|
+
val && val[0] === "$" ? (themed[key] = val, noTheme = !1) : plain[key] = val;
|
|
316
|
+
}
|
|
317
|
+
return { themed: noTheme ? null : themed, plain };
|
|
318
|
+
}
|
|
319
|
+
//# sour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