@tamagui/static 1.0.0-beta.202 → 1.0.0-beta.203
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/constants.js +8 -0
- package/dist/cjs/extractor/accessSafe.js +4 -0
- package/dist/cjs/extractor/babelParse.js +5 -0
- package/dist/cjs/extractor/babelParse.js.map +2 -2
- package/dist/cjs/extractor/buildClassName.js +4 -0
- package/dist/cjs/extractor/createEvaluator.js +5 -0
- package/dist/cjs/extractor/createExtractor.js +840 -772
- package/dist/cjs/extractor/createExtractor.js.map +2 -2
- package/dist/cjs/extractor/ensureImportingConcat.js +4 -0
- package/dist/cjs/extractor/evaluateAstNode.js +4 -0
- package/dist/cjs/extractor/extractHelpers.js +11 -0
- package/dist/cjs/extractor/extractMediaStyle.js +7 -2
- package/dist/cjs/extractor/extractMediaStyle.js.map +2 -2
- package/dist/cjs/extractor/extractToClassNames.js +19 -10
- package/dist/cjs/extractor/extractToClassNames.js.map +2 -2
- package/dist/cjs/extractor/findTopmostFunction.js +4 -0
- package/dist/cjs/extractor/generatedUid.js +4 -0
- package/dist/cjs/extractor/getPrefixLogs.js +4 -0
- package/dist/cjs/extractor/getPropValueFromAttributes.js +4 -0
- package/dist/cjs/extractor/getSourceModule.js +4 -0
- package/dist/cjs/extractor/getStaticBindingsForScope.js +4 -0
- package/dist/cjs/extractor/hoistClassNames.js +4 -0
- package/dist/cjs/extractor/literalToAst.js +5 -0
- package/dist/cjs/extractor/loadTamagui.js +67 -47
- package/dist/cjs/extractor/loadTamagui.js.map +2 -2
- package/dist/cjs/extractor/logLines.js +4 -0
- package/dist/cjs/extractor/normalizeTernaries.js +4 -0
- package/dist/cjs/extractor/removeUnusedHooks.js +4 -0
- package/dist/cjs/extractor/timer.js +46 -0
- package/dist/cjs/extractor/timer.js.map +7 -0
- package/dist/cjs/extractor/validHTMLAttributes.js +4 -0
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/patchReactNativeWeb.js +23 -7
- package/dist/cjs/patchReactNativeWeb.js.map +2 -2
- package/dist/esm/extractor/babelParse.js.map +2 -2
- package/dist/esm/extractor/createExtractor.js +850 -785
- package/dist/esm/extractor/createExtractor.js.map +2 -2
- package/dist/esm/extractor/extractMediaStyle.js +2 -2
- package/dist/esm/extractor/extractMediaStyle.js.map +2 -2
- package/dist/esm/extractor/extractToClassNames.js +15 -10
- package/dist/esm/extractor/extractToClassNames.js.map +2 -2
- package/dist/esm/extractor/loadTamagui.js +63 -47
- package/dist/esm/extractor/loadTamagui.js.map +2 -2
- package/dist/esm/extractor/timer.js +24 -0
- package/dist/esm/extractor/timer.js.map +7 -0
- package/dist/esm/patchReactNativeWeb.js +19 -7
- package/dist/esm/patchReactNativeWeb.js.map +2 -2
- package/dist/jsx/extractor/createExtractor.js +850 -785
- package/dist/jsx/extractor/extractMediaStyle.js +2 -2
- package/dist/jsx/extractor/extractToClassNames.js +15 -10
- package/dist/jsx/extractor/loadTamagui.js +63 -47
- package/dist/jsx/extractor/timer.js +23 -0
- package/dist/jsx/patchReactNativeWeb.js +19 -7
- package/package.json +23 -23
- package/types/extractor/babelParse.d.ts.map +1 -1
- package/types/extractor/createExtractor.d.ts +2 -0
- package/types/extractor/createExtractor.d.ts.map +1 -1
- package/types/extractor/extractMediaStyle.d.ts +1 -1
- package/types/extractor/extractMediaStyle.d.ts.map +1 -1
- package/types/extractor/extractToClassNames.d.ts +2 -1
- package/types/extractor/extractToClassNames.d.ts.map +1 -1
- package/types/extractor/loadTamagui.d.ts.map +1 -1
- package/types/extractor/timer.d.ts +5 -0
- package/types/extractor/timer.d.ts.map +1 -0
- package/types/patchReactNativeWeb.d.ts.map +1 -1
|
@@ -57,8 +57,8 @@ function extractMediaStyle(ternary, jsxPath, tamaguiConfig, sourcePath, importan
|
|
|
57
57
|
rules: [styleRule]
|
|
58
58
|
};
|
|
59
59
|
});
|
|
60
|
-
if (shouldPrintDebug) {
|
|
61
|
-
console.log(" media styles:", importance, singleMediaStyles.map((x) => x.identifier).join(", "));
|
|
60
|
+
if (shouldPrintDebug === "verbose") {
|
|
61
|
+
console.log(" media styles:", importance, styleObj, singleMediaStyles.map((x) => x.identifier).join(", "));
|
|
62
62
|
}
|
|
63
63
|
mediaStyles = [...mediaStyles, ...singleMediaStyles];
|
|
64
64
|
}
|
|
@@ -18,6 +18,7 @@ import { getPrefixLogs } from "./getPrefixLogs";
|
|
|
18
18
|
import { hoistClassNames } from "./hoistClassNames";
|
|
19
19
|
import { literalToAst } from "./literalToAst";
|
|
20
20
|
import { logLines } from "./logLines";
|
|
21
|
+
import { timer } from "./timer";
|
|
21
22
|
const mergeStyleGroups = {
|
|
22
23
|
shadowOpacity: true,
|
|
23
24
|
shadowRadius: true,
|
|
@@ -31,10 +32,12 @@ function extractToClassNames({
|
|
|
31
32
|
sourcePath,
|
|
32
33
|
options,
|
|
33
34
|
shouldPrintDebug,
|
|
35
|
+
cssLoaderPath,
|
|
34
36
|
threaded,
|
|
35
37
|
cssPath
|
|
36
38
|
}) {
|
|
37
39
|
var _a;
|
|
40
|
+
const tm = timer();
|
|
38
41
|
if (typeof source !== "string") {
|
|
39
42
|
throw new Error("`source` must be a string of javascript");
|
|
40
43
|
}
|
|
@@ -49,6 +52,7 @@ function extractToClassNames({
|
|
|
49
52
|
console.error("babel parse error:", sourcePath);
|
|
50
53
|
throw err;
|
|
51
54
|
}
|
|
55
|
+
tm.mark(`babel-parse`, shouldPrintDebug === "verbose");
|
|
52
56
|
const cssMap = /* @__PURE__ */ new Map();
|
|
53
57
|
const existingHoists = {};
|
|
54
58
|
let hasFlattened = false;
|
|
@@ -109,9 +113,6 @@ function extractToClassNames({
|
|
|
109
113
|
switch (attr.type) {
|
|
110
114
|
case "style":
|
|
111
115
|
if (!isFlattened) {
|
|
112
|
-
if (!attr.name) {
|
|
113
|
-
throw new Error(`No name`);
|
|
114
|
-
}
|
|
115
116
|
const { hoverStyle, pressStyle, focusStyle } = attr.value;
|
|
116
117
|
const pseudos = [
|
|
117
118
|
["hoverStyle", hoverStyle],
|
|
@@ -187,9 +188,6 @@ function extractToClassNames({
|
|
|
187
188
|
break;
|
|
188
189
|
}
|
|
189
190
|
}
|
|
190
|
-
if (shouldPrintDebug) {
|
|
191
|
-
console.log(" finalClassNames\n", logLines(finalClassNames.map((x) => x["value"]).join(" ")));
|
|
192
|
-
}
|
|
193
191
|
function addTernaryStyle(ternary, a, b) {
|
|
194
192
|
const cCN = a.map((x) => x.identifier).join(" ");
|
|
195
193
|
const aCN = b.map((x) => x.identifier).join(" ");
|
|
@@ -200,9 +198,15 @@ function extractToClassNames({
|
|
|
200
198
|
}
|
|
201
199
|
}
|
|
202
200
|
__name(addTernaryStyle, "addTernaryStyle");
|
|
201
|
+
if (shouldPrintDebug) {
|
|
202
|
+
console.log(" finalClassNames\n", logLines(finalClassNames.map((x) => x["value"]).join(" ")));
|
|
203
|
+
}
|
|
203
204
|
node.attributes = finalAttrs;
|
|
204
205
|
if (finalClassNames.length) {
|
|
205
|
-
|
|
206
|
+
let names = buildClassName(finalClassNames);
|
|
207
|
+
if (t.isStringLiteral(names)) {
|
|
208
|
+
names.value = concatClassName(names.value);
|
|
209
|
+
}
|
|
206
210
|
const nameExpr = names ? hoistClassNames(jsxPath, existingHoists, names) : null;
|
|
207
211
|
let expr = nameExpr;
|
|
208
212
|
if (nameExpr && !t.isIdentifier(nameExpr)) {
|
|
@@ -249,7 +253,7 @@ function extractToClassNames({
|
|
|
249
253
|
if (styles) {
|
|
250
254
|
const cssQuery = threaded ? `cssData=${Buffer.from(styles).toString("base64")}` : `cssPath=${cssPath}`;
|
|
251
255
|
const remReq = loader.remainingRequest;
|
|
252
|
-
const importPath = `${cssPath}
|
|
256
|
+
const importPath = `${cssPath}!=!${cssLoaderPath}?${cssQuery}!${remReq}`;
|
|
253
257
|
ast.program.body.unshift(t.importDeclaration([], t.stringLiteral(importPath)));
|
|
254
258
|
}
|
|
255
259
|
const result = generate(ast, {
|
|
@@ -265,13 +269,14 @@ function extractToClassNames({
|
|
|
265
269
|
}
|
|
266
270
|
if (shouldLogTiming) {
|
|
267
271
|
const memUsed = mem ? Math.round((process.memoryUsage().heapUsed - mem.heapUsed) / 1024 / 1204 * 10) / 10 : 0;
|
|
268
|
-
const timing = `${Date.now() - start}`.padStart(3);
|
|
269
272
|
const path2 = basename(sourcePath).replace(/\.[jt]sx?$/, "").slice(0, 22).trim().padStart(24);
|
|
270
273
|
const numOptimized = `${res.optimized}`.padStart(3);
|
|
271
274
|
const numFound = `${res.found}`.padStart(3);
|
|
272
275
|
const numFlattened = `${res.flattened}`.padStart(3);
|
|
273
276
|
const memory = process.env.DEBUG && memUsed > 10 ? ` ${memUsed}MB` : "";
|
|
274
|
-
const
|
|
277
|
+
const timing = Date.now() - start;
|
|
278
|
+
const timingWarning = timing > 50 ? "\u26A0\uFE0F" : timing > 150 ? "\u2622\uFE0F" : "";
|
|
279
|
+
const timingStr = `${timing}ms${timingWarning}`.padStart(6);
|
|
275
280
|
console.log(`${getPrefixLogs(options)} ${path2} ${numFound} \xB7 ${numOptimized} \xB7 ${numFlattened} ${timingStr} ${memory ? `(${memory})` : ""}`);
|
|
276
281
|
}
|
|
277
282
|
return {
|
|
@@ -7,56 +7,72 @@ function loadTamagui(props) {
|
|
|
7
7
|
if (loadedTamagui) {
|
|
8
8
|
return loadedTamagui;
|
|
9
9
|
}
|
|
10
|
-
process.env.IS_STATIC = "is_static";
|
|
11
|
-
const proxyWorm = require("@tamagui/proxy-worm");
|
|
12
|
-
const rnw = require("react-native-web");
|
|
13
|
-
const Mod = require("module");
|
|
14
|
-
const og = Mod.prototype.require;
|
|
15
|
-
Mod.prototype.require = function(path) {
|
|
16
|
-
if (path.endsWith(".css")) {
|
|
17
|
-
return {};
|
|
18
|
-
}
|
|
19
|
-
if (path === "@gorhom/bottom-sheet" || path.startsWith("react-native-reanimated")) {
|
|
20
|
-
return proxyWorm;
|
|
21
|
-
}
|
|
22
|
-
if (path.startsWith("react-native") && !path.startsWith("react-native-web/dist/cjs/exports")) {
|
|
23
|
-
return rnw;
|
|
24
|
-
}
|
|
25
|
-
try {
|
|
26
|
-
return og.apply(this, arguments);
|
|
27
|
-
} catch (err) {
|
|
28
|
-
console.error("Tamagui error loading file:\n");
|
|
29
|
-
console.log(" ", path, "\n");
|
|
30
|
-
console.log(err.message);
|
|
31
|
-
console.log(err.stack);
|
|
32
|
-
process.exit(1);
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
10
|
const configPath = join(process.cwd(), props.config);
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
11
|
+
const { unregister } = require("esbuild-register/dist/node").register({
|
|
12
|
+
target: "es2019",
|
|
13
|
+
format: "cjs"
|
|
14
|
+
});
|
|
15
|
+
try {
|
|
16
|
+
process.env.IS_STATIC = "is_static";
|
|
17
|
+
const proxyWorm = require("@tamagui/proxy-worm");
|
|
18
|
+
const rnw = require("react-native-web");
|
|
19
|
+
const Mod = require("module");
|
|
20
|
+
const og = Mod.prototype.require;
|
|
21
|
+
Mod.prototype.require = function(path) {
|
|
22
|
+
if (path.endsWith(".css")) {
|
|
23
|
+
return {};
|
|
24
|
+
}
|
|
25
|
+
if (path === "@gorhom/bottom-sheet" || path.startsWith("react-native-reanimated")) {
|
|
26
|
+
return proxyWorm;
|
|
27
|
+
}
|
|
28
|
+
if (path.startsWith("react-native") && !path.startsWith("react-native-web/dist/cjs/exports")) {
|
|
29
|
+
return rnw;
|
|
30
|
+
}
|
|
31
|
+
try {
|
|
32
|
+
return og.apply(this, arguments);
|
|
33
|
+
} catch (err) {
|
|
34
|
+
console.error("Tamagui error loading file:\n");
|
|
35
|
+
console.log(" ", path, "\n");
|
|
36
|
+
console.log(err.message);
|
|
37
|
+
console.log(err.stack);
|
|
38
|
+
process.exit(1);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
const exp = require(configPath);
|
|
42
|
+
const tamaguiConfig = exp["default"] || exp;
|
|
43
|
+
if (!tamaguiConfig || !tamaguiConfig.parsed) {
|
|
44
|
+
try {
|
|
45
|
+
const confPath = require.resolve(configPath);
|
|
46
|
+
console.log(`Received:`, tamaguiConfig);
|
|
47
|
+
throw new Error(`Can't find valid config in ${confPath}`);
|
|
48
|
+
} catch (err) {
|
|
49
|
+
throw err;
|
|
50
|
+
}
|
|
45
51
|
}
|
|
52
|
+
const components = {};
|
|
53
|
+
for (const moduleName of props.components) {
|
|
54
|
+
const exported = require(moduleName);
|
|
55
|
+
for (const Name in exported) {
|
|
56
|
+
const val = exported[Name];
|
|
57
|
+
const staticConfig = val == null ? void 0 : val.staticConfig;
|
|
58
|
+
if (staticConfig) {
|
|
59
|
+
Object.assign(components, { [Name]: { staticConfig } });
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
process.env.IS_STATIC = void 0;
|
|
64
|
+
Mod.prototype.require = og;
|
|
65
|
+
createTamagui(tamaguiConfig);
|
|
66
|
+
loadedTamagui = {
|
|
67
|
+
components,
|
|
68
|
+
tamaguiConfig
|
|
69
|
+
};
|
|
70
|
+
return loadedTamagui;
|
|
71
|
+
} catch (err) {
|
|
72
|
+
throw err;
|
|
73
|
+
} finally {
|
|
74
|
+
unregister();
|
|
46
75
|
}
|
|
47
|
-
const components = {};
|
|
48
|
-
for (const module of props.components) {
|
|
49
|
-
const exported = require(module);
|
|
50
|
-
Object.assign(components, exported);
|
|
51
|
-
}
|
|
52
|
-
process.env.IS_STATIC = void 0;
|
|
53
|
-
Mod.prototype.require = og;
|
|
54
|
-
createTamagui(tamaguiConfig);
|
|
55
|
-
loadedTamagui = {
|
|
56
|
-
components,
|
|
57
|
-
tamaguiConfig
|
|
58
|
-
};
|
|
59
|
-
return loadedTamagui;
|
|
60
76
|
}
|
|
61
77
|
__name(loadTamagui, "loadTamagui");
|
|
62
78
|
export {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
const timer = /* @__PURE__ */ __name(() => {
|
|
4
|
+
const start = Date.now();
|
|
5
|
+
let last = start;
|
|
6
|
+
return {
|
|
7
|
+
mark: (name, print = false) => {
|
|
8
|
+
if (print) {
|
|
9
|
+
const took = Date.now() - last;
|
|
10
|
+
last = Date.now();
|
|
11
|
+
console.log(`Time ${name}: ${took}ms`);
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
done: (print = false) => {
|
|
15
|
+
if (print) {
|
|
16
|
+
console.log(`Total time: ${Date.now() - start}ms`);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
}, "timer");
|
|
21
|
+
export {
|
|
22
|
+
timer
|
|
23
|
+
};
|
|
@@ -15,6 +15,8 @@ function patchReactNativeWeb() {
|
|
|
15
15
|
}
|
|
16
16
|
const patches = [
|
|
17
17
|
{
|
|
18
|
+
id: "dom-props",
|
|
19
|
+
filePath: ["modules", "createDOMProps", "index.js"],
|
|
18
20
|
replacee: ` if (dataSet != null) {`,
|
|
19
21
|
replacer: `
|
|
20
22
|
if (props.dataSet && props.dataSet.className) {
|
|
@@ -22,15 +24,25 @@ function patchReactNativeWeb() {
|
|
|
22
24
|
classList = className
|
|
23
25
|
dataSet = dataSetRest
|
|
24
26
|
}
|
|
27
|
+
if (props.dataSet && props.dataSet.id) {
|
|
28
|
+
domProps['id'] = props.dataSet.id
|
|
29
|
+
}
|
|
25
30
|
if (dataSet != null) {`
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
id: "forward-props",
|
|
34
|
+
filePath: ["modules", "forwardedProps", "index.js"],
|
|
35
|
+
replacee: `dataSet: true,`,
|
|
36
|
+
replacer: `id: true, dataSet: true,`
|
|
26
37
|
}
|
|
27
38
|
];
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
for (const
|
|
39
|
+
for (const { filePath, replacee, replacer } of patches) {
|
|
40
|
+
const files = [
|
|
41
|
+
path.join(rootDir, "dist", ...filePath),
|
|
42
|
+
path.join(rootDir, "dist", "cjs", ...filePath)
|
|
43
|
+
];
|
|
44
|
+
for (const file of files) {
|
|
45
|
+
const contents = fs.readFileSync(file, "utf-8");
|
|
34
46
|
if (contents.includes(replacer)) {
|
|
35
47
|
continue;
|
|
36
48
|
}
|
|
@@ -42,7 +54,7 @@ function patchReactNativeWeb() {
|
|
|
42
54
|
continue;
|
|
43
55
|
}
|
|
44
56
|
console.log(" | patch " + path.relative(rootDir, file));
|
|
45
|
-
fs.writeFileSync(file, contents.
|
|
57
|
+
fs.writeFileSync(file, contents.replace(replacee, replacer));
|
|
46
58
|
}
|
|
47
59
|
}
|
|
48
60
|
const moduleEntry = path.join(rootDir, "dist", "index.js");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/static",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.203+bdbb1f11",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"typings": "types",
|
|
6
6
|
"main": "dist/cjs",
|
|
@@ -27,11 +27,31 @@
|
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
29
|
"license": "MIT",
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@babel/core": "^7.15.5",
|
|
32
|
+
"@babel/generator": "^7.15.4",
|
|
33
|
+
"@babel/helper-plugin-utils": "^7.14.5",
|
|
34
|
+
"@babel/parser": "^7.15.7",
|
|
35
|
+
"@babel/traverse": "^7.15.4",
|
|
36
|
+
"@expo/match-media": "^0.1.0",
|
|
37
|
+
"@tamagui/build": "^1.0.0-beta.203+bdbb1f11",
|
|
38
|
+
"@tamagui/core-node": "^1.0.0-beta.203+bdbb1f11",
|
|
39
|
+
"@tamagui/fake-react-native": "^1.0.0-beta.203+bdbb1f11",
|
|
40
|
+
"@tamagui/helpers": "^1.0.0-beta.203+bdbb1f11",
|
|
41
|
+
"@tamagui/proxy-worm": "^1.0.0-beta.203+bdbb1f11",
|
|
42
|
+
"babel-literal-to-ast": "^2.1.0",
|
|
43
|
+
"esbuild": "^0.14.36",
|
|
44
|
+
"esbuild-register": "^3.3.2",
|
|
45
|
+
"find-cache-dir": "^3.3.2",
|
|
46
|
+
"fs-extra": "^9.1.0",
|
|
47
|
+
"invariant": "^2.2.4",
|
|
48
|
+
"lodash": "^4.17.21",
|
|
49
|
+
"tamagui": "^1.0.0-beta.203+bdbb1f11"
|
|
50
|
+
},
|
|
30
51
|
"devDependencies": {
|
|
31
52
|
"@babel/plugin-syntax-typescript": "^7.14.5",
|
|
32
53
|
"@babel/types": "^7.15.6",
|
|
33
54
|
"@dish/babel-preset": "^0.0.6",
|
|
34
|
-
"@dish/proxy-worm": "^0.0.4",
|
|
35
55
|
"@testing-library/react": "13.0.0-alpha.4",
|
|
36
56
|
"@types/jest": "*",
|
|
37
57
|
"@types/node": "^16.11.9",
|
|
@@ -50,28 +70,8 @@
|
|
|
50
70
|
"typescript": "^4.5.2",
|
|
51
71
|
"webpack": "^5.72.0"
|
|
52
72
|
},
|
|
53
|
-
"dependencies": {
|
|
54
|
-
"@babel/core": "^7.15.5",
|
|
55
|
-
"@babel/generator": "^7.15.4",
|
|
56
|
-
"@babel/helper-plugin-utils": "^7.14.5",
|
|
57
|
-
"@babel/parser": "^7.15.7",
|
|
58
|
-
"@babel/traverse": "^7.15.4",
|
|
59
|
-
"@expo/match-media": "^0.1.0",
|
|
60
|
-
"@tamagui/build": "^1.0.0-beta.202+a1a54793",
|
|
61
|
-
"@tamagui/core-node": "^1.0.0-beta.202+a1a54793",
|
|
62
|
-
"@tamagui/fake-react-native": "^1.0.0-beta.202+a1a54793",
|
|
63
|
-
"@tamagui/helpers": "^1.0.0-beta.202+a1a54793",
|
|
64
|
-
"babel-literal-to-ast": "^2.1.0",
|
|
65
|
-
"esbuild": "^0.14.36",
|
|
66
|
-
"esbuild-register": "^3.1.2",
|
|
67
|
-
"find-cache-dir": "^3.3.2",
|
|
68
|
-
"fs-extra": "^9.1.0",
|
|
69
|
-
"invariant": "^2.2.4",
|
|
70
|
-
"lodash": "^4.17.21",
|
|
71
|
-
"tamagui": "^1.0.0-beta.202+a1a54793"
|
|
72
|
-
},
|
|
73
73
|
"peerDependencies": {
|
|
74
74
|
"react-native-web": "*"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "bdbb1f11fae44e3a78133373ef108adccaa68924"
|
|
77
77
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"babelParse.d.ts","sourceRoot":"","sources":["../../src/extractor/babelParse.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,WAAW,MAAM,eAAe,CAAA;AAE5C,eAAO,MAAM,aAAa,EAAE,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"babelParse.d.ts","sourceRoot":"","sources":["../../src/extractor/babelParse.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,WAAW,MAAM,eAAe,CAAA;AAE5C,eAAO,MAAM,aAAa,EAAE,WAAW,CAAC,aAgBtC,CAAA;AAIF,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,GAAG,CAErD"}
|
|
@@ -16,6 +16,8 @@ export declare function createExtractor(): {
|
|
|
16
16
|
[key: string]: string | {
|
|
17
17
|
[key: string]: any;
|
|
18
18
|
};
|
|
19
|
+
}, {
|
|
20
|
+
[key: string]: import("@tamagui/core-node").GenericFont<string | number>;
|
|
19
21
|
}>;
|
|
20
22
|
parse: (fileOrPath: NodePath<t.Program> | t.File, { config, importsWhitelist, evaluateVars, shouldPrintDebug, sourcePath, onExtractTag, getFlattenedNode, disable, disableExtraction, disableExtractInlineMedia, disableExtractVariables, disableDebugAttr, prefixLogs, excludeProps, ...props }: ExtractorParseProps) => {
|
|
21
23
|
flattened: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createExtractor.d.ts","sourceRoot":"","sources":["../../src/extractor/createExtractor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createExtractor.d.ts","sourceRoot":"","sources":["../../src/extractor/createExtractor.ts"],"names":[],"mappings":"AAEA,OAAiB,EAAE,QAAQ,EAAW,MAAM,iBAAiB,CAAA;AAC7D,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AACjC,OAAO,EAGL,qBAAqB,EAOtB,MAAM,oBAAoB,CAAA;AAK3B,OAAO,EAIL,mBAAmB,EAEpB,MAAM,UAAU,CAAA;AAqCjB,oBAAY,SAAS,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAA;AAI1D,wBAAgB,eAAe;;;;;;;;;;;;;;;;wBAqBb,SAAS,EAAE,OAAO,CAAC,GAAG,MAAM,kPAiBrC,mBAAmB;;;;;;EAy/C3B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NodePath } from '@babel/traverse';
|
|
2
2
|
import * as t from '@babel/types';
|
|
3
|
-
import
|
|
3
|
+
import { TamaguiInternalConfig } from '@tamagui/core-node';
|
|
4
4
|
import { StyleObject, Ternary } from '../types';
|
|
5
5
|
export declare function extractMediaStyle(ternary: Ternary, jsxPath: NodePath<t.JSXElement>, tamaguiConfig: TamaguiInternalConfig, sourcePath: string, importance?: number, shouldPrintDebug?: boolean | 'verbose'): {
|
|
6
6
|
mediaStyles: StyleObject[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extractMediaStyle.d.ts","sourceRoot":"","sources":["../../src/extractor/extractMediaStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC1C,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AACjC,OAAO,
|
|
1
|
+
{"version":3,"file":"extractMediaStyle.d.ts","sourceRoot":"","sources":["../../src/extractor/extractMediaStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC1C,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AACjC,OAAO,EAAE,qBAAqB,EAAwC,MAAM,oBAAoB,CAAA;AAIhG,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAG/C,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,EAC/B,aAAa,EAAE,qBAAqB,EACpC,UAAU,EAAE,MAAM,EAClB,UAAU,SAAI,EACd,gBAAgB,GAAE,OAAO,GAAG,SAAiB;;;SAyE9C;AAiFD,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,EAC/B,IAAI,EAAE,CAAC,CAAC,UAAU,EAClB,UAAU,EAAE,MAAM,WAiBnB"}
|
|
@@ -10,8 +10,9 @@ export declare type ExtractedResponse = {
|
|
|
10
10
|
ast: t.File;
|
|
11
11
|
map: any;
|
|
12
12
|
};
|
|
13
|
-
export declare function extractToClassNames({ loader, extractor, source, sourcePath, options, shouldPrintDebug, threaded, cssPath, }: {
|
|
13
|
+
export declare function extractToClassNames({ loader, extractor, source, sourcePath, options, shouldPrintDebug, cssLoaderPath, threaded, cssPath, }: {
|
|
14
14
|
loader: LoaderContext<any>;
|
|
15
|
+
cssLoaderPath: string;
|
|
15
16
|
extractor: Extractor;
|
|
16
17
|
source: string | Buffer;
|
|
17
18
|
sourcePath: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extractToClassNames.d.ts","sourceRoot":"","sources":["../../src/extractor/extractToClassNames.ts"],"names":[],"mappings":";AAKA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AAKjC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAGvC,OAAO,EAAgC,cAAc,EAAW,MAAM,UAAU,CAAA;AAGhF,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"extractToClassNames.d.ts","sourceRoot":"","sources":["../../src/extractor/extractToClassNames.ts"],"names":[],"mappings":";AAKA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AAKjC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAGvC,OAAO,EAAgC,cAAc,EAAW,MAAM,UAAU,CAAA;AAGhF,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAiB7C,oBAAY,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,GAAG,EAAE,CAAC,CAAC,IAAI,CAAA;IACX,GAAG,EAAE,GAAG,CAAA;CACT,CAAA;AAED,wBAAgB,mBAAmB,CAAC,EAClC,MAAM,EACN,SAAS,EACT,MAAM,EACN,UAAU,EACV,OAAO,EACP,gBAAgB,EAChB,aAAa,EACb,QAAQ,EACR,OAAO,GACR,EAAE;IACD,MAAM,EAAE,aAAa,CAAC,GAAG,CAAC,CAAA;IAC1B,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,cAAc,CAAA;IACvB,gBAAgB,EAAE,OAAO,GAAG,SAAS,CAAA;IACrC,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,GAAG,iBAAiB,GAAG,IAAI,CAkY3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadTamagui.d.ts","sourceRoot":"","sources":["../../src/extractor/loadTamagui.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAK5E,wBAAgB,WAAW,CAAC,KAAK,EAAE;IAAE,UAAU,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG;IAC5E,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAA;IAC5C,aAAa,EAAE,qBAAqB,CAAA;CACrC,
|
|
1
|
+
{"version":3,"file":"loadTamagui.d.ts","sourceRoot":"","sources":["../../src/extractor/loadTamagui.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAK5E,wBAAgB,WAAW,CAAC,KAAK,EAAE;IAAE,UAAU,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG;IAC5E,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAA;IAC5C,aAAa,EAAE,qBAAqB,CAAA;CACrC,CAuHA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timer.d.ts","sourceRoot":"","sources":["../../src/extractor/timer.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK;iBAID,MAAM;;CAatB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patchReactNativeWeb.d.ts","sourceRoot":"","sources":["../src/patchReactNativeWeb.ts"],"names":[],"mappings":"AAUA,wBAAgB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"patchReactNativeWeb.d.ts","sourceRoot":"","sources":["../src/patchReactNativeWeb.ts"],"names":[],"mappings":"AAUA,wBAAgB,mBAAmB,SA8FlC"}
|