@tamagui/static 1.0.0-alpha.11 → 1.0.0-alpha.12
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 +33 -0
- package/dist/cjs/constants.js.map +7 -0
- package/dist/cjs/extractor/accessSafe.js +33 -0
- package/dist/cjs/extractor/accessSafe.js.map +7 -0
- package/dist/cjs/extractor/babelParse.js +52 -0
- package/dist/cjs/extractor/babelParse.js.map +7 -0
- package/dist/cjs/extractor/buildClassName.js +62 -0
- package/dist/cjs/extractor/buildClassName.js.map +7 -0
- package/dist/cjs/extractor/createEvaluator.js +73 -0
- package/dist/cjs/extractor/createEvaluator.js.map +7 -0
- package/dist/cjs/extractor/createExtractor.js +903 -0
- package/dist/cjs/extractor/createExtractor.js.map +7 -0
- package/dist/cjs/extractor/ensureImportingConcat.js +46 -0
- package/dist/cjs/extractor/ensureImportingConcat.js.map +7 -0
- package/dist/cjs/extractor/evaluateAstNode.js +116 -0
- package/dist/cjs/extractor/evaluateAstNode.js.map +7 -0
- package/dist/cjs/extractor/extractHelpers.js +118 -0
- package/dist/cjs/extractor/extractHelpers.js.map +7 -0
- package/dist/cjs/extractor/extractMediaStyle.js +187 -0
- package/dist/cjs/extractor/extractMediaStyle.js.map +7 -0
- package/dist/cjs/extractor/extractToClassNames.js +272 -0
- package/dist/cjs/extractor/extractToClassNames.js.map +7 -0
- package/dist/cjs/extractor/findTopmostFunction.js +29 -0
- package/dist/cjs/extractor/findTopmostFunction.js.map +7 -0
- package/dist/cjs/extractor/generatedUid.js +50 -0
- package/dist/cjs/extractor/generatedUid.js.map +7 -0
- package/dist/cjs/extractor/getPropValueFromAttributes.js +71 -0
- package/dist/cjs/extractor/getPropValueFromAttributes.js.map +7 -0
- package/dist/cjs/extractor/getSourceModule.js +91 -0
- package/dist/cjs/extractor/getSourceModule.js.map +7 -0
- package/dist/cjs/extractor/getStaticBindingsForScope.js +150 -0
- package/dist/cjs/extractor/getStaticBindingsForScope.js.map +7 -0
- package/dist/cjs/extractor/hoistClassNames.js +66 -0
- package/dist/cjs/extractor/hoistClassNames.js.map +7 -0
- package/dist/cjs/extractor/literalToAst.js +56 -0
- package/dist/cjs/extractor/literalToAst.js.map +7 -0
- package/dist/cjs/extractor/loadTamagui.js +63 -0
- package/dist/cjs/extractor/loadTamagui.js.map +7 -0
- package/dist/cjs/extractor/logLines.js +23 -0
- package/dist/cjs/extractor/logLines.js.map +7 -0
- package/dist/cjs/extractor/normalizeTernaries.js +102 -0
- package/dist/cjs/extractor/normalizeTernaries.js.map +7 -0
- package/dist/cjs/extractor/removeUnusedHooks.js +101 -0
- package/dist/cjs/extractor/removeUnusedHooks.js.map +7 -0
- package/dist/cjs/index.js +37 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/patchReactNativeWeb.js +129 -0
- package/dist/cjs/patchReactNativeWeb.js.map +7 -0
- package/dist/cjs/types.js +4 -0
- package/dist/cjs/types.js.map +7 -0
- package/dist/{constants.js → esm/constants.js} +0 -0
- package/dist/{constants.js.map → esm/constants.js.map} +1 -1
- package/dist/{extractor → esm/extractor}/accessSafe.js +0 -0
- package/dist/{extractor → esm/extractor}/accessSafe.js.map +1 -1
- package/dist/{extractor → esm/extractor}/babelParse.js +0 -0
- package/dist/{extractor → esm/extractor}/babelParse.js.map +1 -1
- package/dist/{extractor → esm/extractor}/buildClassName.js +0 -0
- package/dist/{extractor → esm/extractor}/buildClassName.js.map +1 -1
- package/dist/{extractor → esm/extractor}/createEvaluator.js +0 -0
- package/dist/{extractor → esm/extractor}/createEvaluator.js.map +1 -1
- package/dist/{extractor → esm/extractor}/createExtractor.js +0 -0
- package/dist/{extractor → esm/extractor}/createExtractor.js.map +1 -1
- package/dist/{extractor → esm/extractor}/ensureImportingConcat.js +0 -0
- package/dist/{extractor → esm/extractor}/ensureImportingConcat.js.map +1 -1
- package/dist/{extractor → esm/extractor}/evaluateAstNode.js +0 -0
- package/dist/{extractor → esm/extractor}/evaluateAstNode.js.map +1 -1
- package/dist/{extractor → esm/extractor}/extractHelpers.js +0 -0
- package/dist/{extractor → esm/extractor}/extractHelpers.js.map +1 -1
- package/dist/{extractor → esm/extractor}/extractMediaStyle.js +0 -0
- package/dist/{extractor → esm/extractor}/extractMediaStyle.js.map +1 -1
- package/dist/{extractor → esm/extractor}/extractToClassNames.js +0 -0
- package/dist/{extractor → esm/extractor}/extractToClassNames.js.map +1 -1
- package/dist/{extractor → esm/extractor}/findTopmostFunction.js +0 -0
- package/dist/{extractor → esm/extractor}/findTopmostFunction.js.map +1 -1
- package/dist/{extractor → esm/extractor}/generatedUid.js +0 -0
- package/dist/{extractor → esm/extractor}/generatedUid.js.map +1 -1
- package/dist/{extractor → esm/extractor}/getPropValueFromAttributes.js +0 -0
- package/dist/{extractor → esm/extractor}/getPropValueFromAttributes.js.map +1 -1
- package/dist/{extractor → esm/extractor}/getSourceModule.js +0 -0
- package/dist/{extractor → esm/extractor}/getSourceModule.js.map +1 -1
- package/dist/{extractor → esm/extractor}/getStaticBindingsForScope.js +0 -0
- package/dist/{extractor → esm/extractor}/getStaticBindingsForScope.js.map +1 -1
- package/dist/{extractor → esm/extractor}/hoistClassNames.js +0 -0
- package/dist/{extractor → esm/extractor}/hoistClassNames.js.map +1 -1
- package/dist/{extractor → esm/extractor}/literalToAst.js +0 -0
- package/dist/{extractor → esm/extractor}/literalToAst.js.map +1 -1
- package/dist/{extractor → esm/extractor}/loadTamagui.js +0 -0
- package/dist/{extractor → esm/extractor}/loadTamagui.js.map +1 -1
- package/dist/{extractor → esm/extractor}/logLines.js +0 -0
- package/dist/{extractor → esm/extractor}/logLines.js.map +1 -1
- package/dist/{extractor → esm/extractor}/normalizeTernaries.js +0 -0
- package/dist/{extractor → esm/extractor}/normalizeTernaries.js.map +1 -1
- package/dist/{extractor → esm/extractor}/removeUnusedHooks.js +0 -0
- package/dist/{extractor → esm/extractor}/removeUnusedHooks.js.map +1 -1
- package/dist/{index.js → esm/index.js} +0 -0
- package/dist/{index.js.map → esm/index.js.map} +1 -1
- package/dist/{patchReactNativeWeb.js → esm/patchReactNativeWeb.js} +0 -0
- package/dist/{patchReactNativeWeb.js.map → esm/patchReactNativeWeb.js.map} +1 -1
- package/dist/{types.js → esm/types.js} +0 -0
- package/dist/{types.js.map → esm/types.js.map} +0 -0
- package/dist/jsx/constants.js +9 -0
- package/dist/jsx/extractor/accessSafe.js +10 -0
- package/dist/jsx/extractor/babelParse.js +29 -0
- package/dist/jsx/extractor/buildClassName.js +39 -0
- package/dist/jsx/extractor/createEvaluator.js +50 -0
- package/dist/jsx/extractor/createExtractor.js +839 -0
- package/dist/jsx/extractor/ensureImportingConcat.js +23 -0
- package/dist/jsx/extractor/evaluateAstNode.js +93 -0
- package/dist/jsx/extractor/extractHelpers.js +93 -0
- package/dist/jsx/extractor/extractMediaStyle.js +150 -0
- package/dist/jsx/extractor/extractToClassNames.js +232 -0
- package/dist/jsx/extractor/findTopmostFunction.js +22 -0
- package/dist/jsx/extractor/generatedUid.js +27 -0
- package/dist/jsx/extractor/getPropValueFromAttributes.js +48 -0
- package/dist/jsx/extractor/getSourceModule.js +68 -0
- package/dist/jsx/extractor/getStaticBindingsForScope.js +127 -0
- package/dist/jsx/extractor/hoistClassNames.js +43 -0
- package/dist/jsx/extractor/literalToAst.js +33 -0
- package/dist/jsx/extractor/loadTamagui.js +40 -0
- package/dist/jsx/extractor/logLines.js +16 -0
- package/dist/jsx/extractor/normalizeTernaries.js +51 -0
- package/dist/jsx/extractor/removeUnusedHooks.js +77 -0
- package/dist/jsx/index.js +13 -0
- package/dist/jsx/patchReactNativeWeb.js +106 -0
- package/dist/jsx/types.js +0 -0
- package/package.json +14 -13
- package/types/constants.d.ts +4 -0
- package/types/constants.d.ts.map +1 -0
- package/types/extractor/accessSafe.d.ts +3 -0
- package/types/extractor/accessSafe.d.ts.map +1 -0
- package/types/extractor/babelParse.d.ts +5 -0
- package/types/extractor/babelParse.d.ts.map +1 -0
- package/types/extractor/buildClassName.d.ts +4 -0
- package/types/extractor/buildClassName.d.ts.map +1 -0
- package/types/extractor/createEvaluator.d.ts +12 -0
- package/types/extractor/createEvaluator.d.ts.map +1 -0
- package/types/extractor/createExtractor.d.ts +34 -0
- package/types/extractor/createExtractor.d.ts.map +1 -0
- package/types/extractor/ensureImportingConcat.d.ts +4 -0
- package/types/extractor/ensureImportingConcat.d.ts.map +1 -0
- package/types/extractor/evaluateAstNode.d.ts +3 -0
- package/types/extractor/evaluateAstNode.d.ts.map +1 -0
- package/types/extractor/extractHelpers.d.ts +12 -0
- package/types/extractor/extractHelpers.d.ts.map +1 -0
- package/types/extractor/extractMediaStyle.d.ts +10 -0
- package/types/extractor/extractMediaStyle.d.ts.map +1 -0
- package/types/extractor/extractToClassNames.d.ts +22 -0
- package/types/extractor/extractToClassNames.d.ts.map +1 -0
- package/types/extractor/findTopmostFunction.d.ts +4 -0
- package/types/extractor/findTopmostFunction.d.ts.map +1 -0
- package/types/extractor/generatedUid.d.ts +5 -0
- package/types/extractor/generatedUid.d.ts.map +1 -0
- package/types/extractor/getPropValueFromAttributes.d.ts +3 -0
- package/types/extractor/getPropValueFromAttributes.d.ts.map +1 -0
- package/types/extractor/getSourceModule.d.ts +16 -0
- package/types/extractor/getSourceModule.d.ts.map +1 -0
- package/types/extractor/getStaticBindingsForScope.d.ts +4 -0
- package/types/extractor/getStaticBindingsForScope.d.ts.map +1 -0
- package/types/extractor/hoistClassNames.d.ts +6 -0
- package/types/extractor/hoistClassNames.d.ts.map +1 -0
- package/types/extractor/literalToAst.d.ts +3 -0
- package/types/extractor/literalToAst.d.ts.map +1 -0
- package/types/extractor/loadTamagui.d.ts +9 -0
- package/types/extractor/loadTamagui.d.ts.map +1 -0
- package/types/extractor/logLines.d.ts +2 -0
- package/types/extractor/logLines.d.ts.map +1 -0
- package/types/extractor/normalizeTernaries.d.ts +3 -0
- package/types/extractor/normalizeTernaries.d.ts.map +1 -0
- package/types/extractor/removeUnusedHooks.d.ts +3 -0
- package/types/extractor/removeUnusedHooks.d.ts.map +1 -0
- package/types/index.d.ts +8 -0
- package/types/index.d.ts.map +1 -0
- package/types/patchReactNativeWeb.d.ts +2 -0
- package/types/patchReactNativeWeb.d.ts.map +1 -0
- package/types/types.d.ts +79 -0
- package/types/types.d.ts.map +1 -0
- package/dist/index.cjs +0 -2139
- package/dist/index.cjs.map +0 -7
- package/types.d.ts +0 -220
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import * as t from "@babel/types";
|
|
4
|
+
function getSourceModule(itemName, itemBinding) {
|
|
5
|
+
if (!itemBinding.constant) {
|
|
6
|
+
return null;
|
|
7
|
+
}
|
|
8
|
+
let sourceModule;
|
|
9
|
+
let imported;
|
|
10
|
+
let local;
|
|
11
|
+
let destructured;
|
|
12
|
+
let usesImportSyntax = false;
|
|
13
|
+
const itemNode = itemBinding.path.node;
|
|
14
|
+
if (t.isImportDefaultSpecifier(itemNode) || t.isImportSpecifier(itemNode)) {
|
|
15
|
+
if (t.isImportDeclaration(itemBinding.path.parent)) {
|
|
16
|
+
sourceModule = itemBinding.path.parent.source.value;
|
|
17
|
+
local = itemNode.local.name;
|
|
18
|
+
usesImportSyntax = true;
|
|
19
|
+
if (t.isImportSpecifier(itemNode)) {
|
|
20
|
+
imported = itemNode.imported["name"];
|
|
21
|
+
destructured = true;
|
|
22
|
+
} else {
|
|
23
|
+
imported = itemNode.local.name;
|
|
24
|
+
destructured = false;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
} else if (t.isVariableDeclarator(itemNode) && itemNode.init != null && t.isCallExpression(itemNode.init) && t.isIdentifier(itemNode.init.callee) && itemNode.init.callee.name === "require" && itemNode.init.arguments.length === 1) {
|
|
28
|
+
const firstArg = itemNode.init.arguments[0];
|
|
29
|
+
if (!t.isStringLiteral(firstArg)) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
sourceModule = firstArg.value;
|
|
33
|
+
if (t.isIdentifier(itemNode.id)) {
|
|
34
|
+
local = itemNode.id.name;
|
|
35
|
+
imported = itemNode.id.name;
|
|
36
|
+
destructured = false;
|
|
37
|
+
} else if (t.isObjectPattern(itemNode.id)) {
|
|
38
|
+
for (const objProp of itemNode.id.properties) {
|
|
39
|
+
if (t.isObjectProperty(objProp) && t.isIdentifier(objProp.value) && objProp.value.name === itemName) {
|
|
40
|
+
local = objProp.value.name;
|
|
41
|
+
imported = objProp.key.name;
|
|
42
|
+
destructured = true;
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
if (!local || !imported) {
|
|
47
|
+
console.error("could not find prop with value `%s`", itemName);
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
} else {
|
|
51
|
+
console.error("Unhandled id type: %s", itemNode.id.type);
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
} else {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
destructured,
|
|
59
|
+
imported,
|
|
60
|
+
local,
|
|
61
|
+
sourceModule,
|
|
62
|
+
usesImportSyntax
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
__name(getSourceModule, "getSourceModule");
|
|
66
|
+
export {
|
|
67
|
+
getSourceModule
|
|
68
|
+
};
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import { dirname, extname, resolve } from "path";
|
|
4
|
+
import * as t from "@babel/types";
|
|
5
|
+
import { existsSync } from "fs-extra";
|
|
6
|
+
import { evaluateAstNode } from "./evaluateAstNode";
|
|
7
|
+
import { getSourceModule } from "./getSourceModule";
|
|
8
|
+
const isLocalImport = /* @__PURE__ */ __name((path) => path.startsWith(".") || path.startsWith("/"), "isLocalImport");
|
|
9
|
+
function resolveImportPath(sourcePath, path) {
|
|
10
|
+
const sourceDir = dirname(sourcePath);
|
|
11
|
+
if (isLocalImport(path)) {
|
|
12
|
+
if (extname(path) === "") {
|
|
13
|
+
path += ".js";
|
|
14
|
+
}
|
|
15
|
+
return resolve(sourceDir, path);
|
|
16
|
+
}
|
|
17
|
+
return path;
|
|
18
|
+
}
|
|
19
|
+
__name(resolveImportPath, "resolveImportPath");
|
|
20
|
+
function importModule(path) {
|
|
21
|
+
const filenames = [path.replace(".js", ".tsx"), path.replace(".js", ".ts"), path];
|
|
22
|
+
for (const file of filenames) {
|
|
23
|
+
if (existsSync(file)) {
|
|
24
|
+
return require(file);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
__name(importModule, "importModule");
|
|
30
|
+
function getStaticBindingsForScope(scope, whitelist = [], sourcePath, bindingCache, shouldPrintDebug) {
|
|
31
|
+
const bindings = scope.getAllBindings();
|
|
32
|
+
const ret = {};
|
|
33
|
+
if (shouldPrintDebug) {
|
|
34
|
+
console.log(" ", Object.keys(bindings).length, "variables in scope");
|
|
35
|
+
}
|
|
36
|
+
const program = scope.getProgramParent().block;
|
|
37
|
+
for (const node of program.body) {
|
|
38
|
+
if (t.isImportDeclaration(node)) {
|
|
39
|
+
const importPath = node.source.value;
|
|
40
|
+
if (!node.specifiers.length)
|
|
41
|
+
continue;
|
|
42
|
+
if (!isLocalImport(importPath)) {
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
const moduleName = resolveImportPath(sourcePath, importPath);
|
|
46
|
+
const isOnWhitelist = whitelist.some((test) => moduleName.endsWith(test));
|
|
47
|
+
if (!isOnWhitelist)
|
|
48
|
+
continue;
|
|
49
|
+
const src = importModule(moduleName);
|
|
50
|
+
if (!src)
|
|
51
|
+
continue;
|
|
52
|
+
for (const specifier of node.specifiers) {
|
|
53
|
+
if (t.isImportSpecifier(specifier) && t.isIdentifier(specifier.imported)) {
|
|
54
|
+
if (typeof src[specifier.imported.name] !== "undefined") {
|
|
55
|
+
const val = src[specifier.local.name];
|
|
56
|
+
ret[specifier.local.name] = val;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
if (!bindingCache) {
|
|
63
|
+
throw new Error("bindingCache is a required param");
|
|
64
|
+
}
|
|
65
|
+
for (const k in bindings) {
|
|
66
|
+
const binding = bindings[k];
|
|
67
|
+
const sourceModule = getSourceModule(k, binding);
|
|
68
|
+
if (sourceModule) {
|
|
69
|
+
if (!sourceModule.sourceModule) {
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
const moduleName = resolveImportPath(sourcePath, sourceModule.sourceModule);
|
|
73
|
+
const isOnWhitelist = whitelist.some((test) => moduleName.endsWith(test));
|
|
74
|
+
if (isOnWhitelist) {
|
|
75
|
+
const src = importModule(moduleName);
|
|
76
|
+
if (!src) {
|
|
77
|
+
console.log(`\u26A0\uFE0F missing file ${moduleName} via ${sourcePath} import ${sourceModule.sourceModule}?`);
|
|
78
|
+
return {};
|
|
79
|
+
}
|
|
80
|
+
if (sourceModule.destructured) {
|
|
81
|
+
if (sourceModule.imported) {
|
|
82
|
+
ret[k] = src[sourceModule.imported];
|
|
83
|
+
}
|
|
84
|
+
} else {
|
|
85
|
+
ret[k] = src;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
const { parent, parentPath } = binding.path;
|
|
91
|
+
if (!t.isVariableDeclaration(parent) || parent.kind !== "const") {
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
const dec = parent.declarations.find((d) => t.isIdentifier(d.id) && d.id.name === k);
|
|
95
|
+
if (!dec || !dec.init) {
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
if (typeof dec.id.start !== "number" || typeof dec.id.end !== "number") {
|
|
99
|
+
console.error("dec.id.start/end is not a number");
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
if (!t.isIdentifier(dec.id)) {
|
|
103
|
+
console.error("dec is not an identifier");
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
const cacheKey = `${dec.id.name}_${dec.id.start}-${dec.id.end}`;
|
|
107
|
+
if (bindingCache.hasOwnProperty(cacheKey)) {
|
|
108
|
+
ret[k] = bindingCache[cacheKey];
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
if (bindingCache.hasOwnProperty(cacheKey)) {
|
|
112
|
+
ret[k] = bindingCache[cacheKey];
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
try {
|
|
116
|
+
ret[k] = evaluateAstNode(dec.init, void 0, shouldPrintDebug);
|
|
117
|
+
bindingCache[cacheKey] = ret[k];
|
|
118
|
+
continue;
|
|
119
|
+
} catch (e) {
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return ret;
|
|
123
|
+
}
|
|
124
|
+
__name(getStaticBindingsForScope, "getStaticBindingsForScope");
|
|
125
|
+
export {
|
|
126
|
+
getStaticBindingsForScope
|
|
127
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import * as t from "@babel/types";
|
|
4
|
+
function hoistClassNames(path, existing, expr) {
|
|
5
|
+
const hoist = hoistClassNames.bind(null, path, existing);
|
|
6
|
+
if (t.isStringLiteral(expr)) {
|
|
7
|
+
if (expr.value.trim() === "") {
|
|
8
|
+
return expr;
|
|
9
|
+
}
|
|
10
|
+
if (existing[expr.value]) {
|
|
11
|
+
return existing[expr.value];
|
|
12
|
+
}
|
|
13
|
+
const identifier = replaceStringWithVariable(expr);
|
|
14
|
+
existing[expr.value] = identifier;
|
|
15
|
+
return identifier;
|
|
16
|
+
}
|
|
17
|
+
if (t.isBinaryExpression(expr)) {
|
|
18
|
+
return t.binaryExpression(expr.operator, hoist(expr.left), hoist(expr.right));
|
|
19
|
+
}
|
|
20
|
+
if (t.isLogicalExpression(expr)) {
|
|
21
|
+
return t.logicalExpression(expr.operator, hoist(expr.left), hoist(expr.right));
|
|
22
|
+
}
|
|
23
|
+
if (t.isConditionalExpression(expr)) {
|
|
24
|
+
return t.conditionalExpression(expr.test, hoist(expr.consequent), hoist(expr.alternate));
|
|
25
|
+
}
|
|
26
|
+
return expr;
|
|
27
|
+
function replaceStringWithVariable(str) {
|
|
28
|
+
const uid = path.scope.generateUidIdentifier("cn");
|
|
29
|
+
const parent = path.findParent((path2) => path2.isProgram());
|
|
30
|
+
if (!parent)
|
|
31
|
+
throw new Error(`no program?`);
|
|
32
|
+
const variable = t.variableDeclaration("const", [
|
|
33
|
+
t.variableDeclarator(uid, t.stringLiteral(` ${str.value}`))
|
|
34
|
+
]);
|
|
35
|
+
parent.unshiftContainer("body", variable);
|
|
36
|
+
return uid;
|
|
37
|
+
}
|
|
38
|
+
__name(replaceStringWithVariable, "replaceStringWithVariable");
|
|
39
|
+
}
|
|
40
|
+
__name(hoistClassNames, "hoistClassNames");
|
|
41
|
+
export {
|
|
42
|
+
hoistClassNames
|
|
43
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import * as t from "@babel/types";
|
|
4
|
+
function literalToAst(literal) {
|
|
5
|
+
if (literal === null) {
|
|
6
|
+
return t.nullLiteral();
|
|
7
|
+
}
|
|
8
|
+
switch (typeof literal) {
|
|
9
|
+
case "function":
|
|
10
|
+
throw new Error("Unsupported");
|
|
11
|
+
case "number":
|
|
12
|
+
return t.numericLiteral(literal);
|
|
13
|
+
case "string":
|
|
14
|
+
return t.stringLiteral(literal);
|
|
15
|
+
case "boolean":
|
|
16
|
+
return t.booleanLiteral(literal);
|
|
17
|
+
case "undefined":
|
|
18
|
+
return t.unaryExpression("void", t.numericLiteral(0), true);
|
|
19
|
+
default:
|
|
20
|
+
if (Array.isArray(literal)) {
|
|
21
|
+
return t.arrayExpression(literal.map(literalToAst));
|
|
22
|
+
}
|
|
23
|
+
return t.objectExpression(Object.keys(literal).filter((k) => {
|
|
24
|
+
return typeof literal[k] !== "undefined";
|
|
25
|
+
}).map((k) => {
|
|
26
|
+
return t.objectProperty(t.stringLiteral(k), literalToAst(literal[k]));
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
__name(literalToAst, "literalToAst");
|
|
31
|
+
export {
|
|
32
|
+
literalToAst
|
|
33
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import { join } from "path";
|
|
4
|
+
import { createTamagui } from "@tamagui/core-node";
|
|
5
|
+
let loadedTamagui = null;
|
|
6
|
+
function loadTamagui(props) {
|
|
7
|
+
if (loadedTamagui) {
|
|
8
|
+
return loadedTamagui;
|
|
9
|
+
}
|
|
10
|
+
process.env.IS_STATIC = "is_static";
|
|
11
|
+
const proxyWorm = require("@tamagui/fake-react-native");
|
|
12
|
+
const Mod = require("module");
|
|
13
|
+
const og = Mod.prototype.require;
|
|
14
|
+
Mod.prototype.require = function(path) {
|
|
15
|
+
if (path.startsWith("react-native") && !path.startsWith("react-native-web/dist/cjs/exports")) {
|
|
16
|
+
return proxyWorm;
|
|
17
|
+
}
|
|
18
|
+
return og.apply(this, arguments);
|
|
19
|
+
};
|
|
20
|
+
const configPath = join(process.cwd(), props.config);
|
|
21
|
+
const tamaguiConfigExport = require(configPath);
|
|
22
|
+
const tamaguiConfig = tamaguiConfigExport["default"] || tamaguiConfigExport;
|
|
23
|
+
const components = {};
|
|
24
|
+
for (const module of props.components) {
|
|
25
|
+
const exported = require(module);
|
|
26
|
+
Object.assign(components, exported);
|
|
27
|
+
}
|
|
28
|
+
process.env.IS_STATIC = void 0;
|
|
29
|
+
Mod.prototype.require = og;
|
|
30
|
+
createTamagui(tamaguiConfig);
|
|
31
|
+
loadedTamagui = {
|
|
32
|
+
components,
|
|
33
|
+
tamaguiConfig
|
|
34
|
+
};
|
|
35
|
+
return loadedTamagui;
|
|
36
|
+
}
|
|
37
|
+
__name(loadTamagui, "loadTamagui");
|
|
38
|
+
export {
|
|
39
|
+
loadTamagui
|
|
40
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
const logLines = /* @__PURE__ */ __name((str) => {
|
|
4
|
+
let lines = [""];
|
|
5
|
+
const items = str.split(" ");
|
|
6
|
+
for (const item of items) {
|
|
7
|
+
if (item.length + lines[lines.length - 1].length > 100) {
|
|
8
|
+
lines.push("");
|
|
9
|
+
}
|
|
10
|
+
lines[lines.length - 1] += item + " ";
|
|
11
|
+
}
|
|
12
|
+
return lines.map((line, i) => " " + (i == 0 ? "" : " ") + line.trim()).join("\n");
|
|
13
|
+
}, "logLines");
|
|
14
|
+
export {
|
|
15
|
+
logLines
|
|
16
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import generate from "@babel/generator";
|
|
4
|
+
import * as t from "@babel/types";
|
|
5
|
+
import invariant from "invariant";
|
|
6
|
+
function normalizeTernaries(ternaries) {
|
|
7
|
+
invariant(Array.isArray(ternaries), "extractStaticTernaries expects param 1 to be an array of ternaries");
|
|
8
|
+
if (ternaries.length === 0) {
|
|
9
|
+
return [];
|
|
10
|
+
}
|
|
11
|
+
const ternariesByKey = {};
|
|
12
|
+
for (let idx = -1, len = ternaries.length; ++idx < len; ) {
|
|
13
|
+
const { test, consequent, alternate, remove, ...rest } = ternaries[idx];
|
|
14
|
+
let ternaryTest = test;
|
|
15
|
+
if (t.isExpressionStatement(test)) {
|
|
16
|
+
ternaryTest = test.expression;
|
|
17
|
+
}
|
|
18
|
+
let shouldSwap = false;
|
|
19
|
+
if (t.isUnaryExpression(test) && test.operator === "!") {
|
|
20
|
+
ternaryTest = test.argument;
|
|
21
|
+
shouldSwap = true;
|
|
22
|
+
} else if (t.isBinaryExpression(test)) {
|
|
23
|
+
if (test.operator === "!==" || test.operator === "!=") {
|
|
24
|
+
ternaryTest = t.binaryExpression(test.operator, test.left, test.right);
|
|
25
|
+
shouldSwap = true;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
const key = generate(ternaryTest).code;
|
|
29
|
+
if (!ternariesByKey[key]) {
|
|
30
|
+
ternariesByKey[key] = {
|
|
31
|
+
...rest,
|
|
32
|
+
alternate: {},
|
|
33
|
+
consequent: {},
|
|
34
|
+
test: ternaryTest,
|
|
35
|
+
remove
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
const altStyle = (shouldSwap ? consequent : alternate) ?? {};
|
|
39
|
+
const consStyle = (shouldSwap ? alternate : consequent) ?? {};
|
|
40
|
+
Object.assign(ternariesByKey[key].alternate, altStyle);
|
|
41
|
+
Object.assign(ternariesByKey[key].consequent, consStyle);
|
|
42
|
+
}
|
|
43
|
+
const ternaryExpression = Object.keys(ternariesByKey).map((key) => {
|
|
44
|
+
return ternariesByKey[key];
|
|
45
|
+
});
|
|
46
|
+
return ternaryExpression;
|
|
47
|
+
}
|
|
48
|
+
__name(normalizeTernaries, "normalizeTernaries");
|
|
49
|
+
export {
|
|
50
|
+
normalizeTernaries
|
|
51
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import * as t from "@babel/types";
|
|
4
|
+
const hooks = {
|
|
5
|
+
useMedia: true,
|
|
6
|
+
useTheme: true
|
|
7
|
+
};
|
|
8
|
+
function removeUnusedHooks(compFn, shouldPrintDebug) {
|
|
9
|
+
compFn.scope.crawl();
|
|
10
|
+
let bodyStatements = compFn?.get("body");
|
|
11
|
+
if (!bodyStatements) {
|
|
12
|
+
console.log("no body statemnts?", compFn);
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
if (!Array.isArray(bodyStatements)) {
|
|
16
|
+
if (bodyStatements.isFunctionExpression()) {
|
|
17
|
+
bodyStatements = bodyStatements.scope.path.get("body");
|
|
18
|
+
} else {
|
|
19
|
+
bodyStatements = bodyStatements.get("body");
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
if (!bodyStatements || !Array.isArray(bodyStatements)) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
const statements = bodyStatements;
|
|
26
|
+
for (const statement of statements) {
|
|
27
|
+
if (!statement.isVariableDeclaration()) {
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
const declarations = statement.get("declarations");
|
|
31
|
+
if (!Array.isArray(declarations)) {
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
const isBindingReferenced = /* @__PURE__ */ __name((name) => {
|
|
35
|
+
return !!statement.scope.getBinding(name)?.referenced;
|
|
36
|
+
}, "isBindingReferenced");
|
|
37
|
+
for (const declarator of declarations) {
|
|
38
|
+
const id = declarator.get("id");
|
|
39
|
+
const init = declarator.node.init;
|
|
40
|
+
if (Array.isArray(id) || Array.isArray(init)) {
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
const shouldRemove = (() => {
|
|
44
|
+
const isHook = t.isCallExpression(init) && t.isIdentifier(init.callee) && hooks[init.callee.name];
|
|
45
|
+
if (!isHook) {
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
if (t.isIdentifier(id.node)) {
|
|
49
|
+
const name = id.node.name;
|
|
50
|
+
return !isBindingReferenced(name);
|
|
51
|
+
} else if (t.isObjectPattern(id.node)) {
|
|
52
|
+
const propPaths = id.get("properties");
|
|
53
|
+
return propPaths.every((prop) => {
|
|
54
|
+
if (!prop.isObjectProperty())
|
|
55
|
+
return false;
|
|
56
|
+
const value = prop.get("value");
|
|
57
|
+
if (Array.isArray(value) || !value.isIdentifier())
|
|
58
|
+
return false;
|
|
59
|
+
const name = value.node.name;
|
|
60
|
+
return !isBindingReferenced(name);
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
return false;
|
|
64
|
+
})();
|
|
65
|
+
if (shouldRemove) {
|
|
66
|
+
declarator.remove();
|
|
67
|
+
if (shouldPrintDebug) {
|
|
68
|
+
console.log(` [\u{1FA9D}] removed ${id.node["name"] ?? ""}`);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
__name(removeUnusedHooks, "removeUnusedHooks");
|
|
75
|
+
export {
|
|
76
|
+
removeUnusedHooks
|
|
77
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
process.env.TAMAGUI_COMPILE_PROCESS = "1";
|
|
2
|
+
import { TamaguiOptions } from "./types";
|
|
3
|
+
import { createExtractor } from "./extractor/createExtractor";
|
|
4
|
+
import { literalToAst } from "./extractor/literalToAst";
|
|
5
|
+
export * from "./constants";
|
|
6
|
+
export * from "./extractor/extractToClassNames";
|
|
7
|
+
export * from "./extractor/extractHelpers";
|
|
8
|
+
export * from "./patchReactNativeWeb";
|
|
9
|
+
export {
|
|
10
|
+
TamaguiOptions,
|
|
11
|
+
createExtractor,
|
|
12
|
+
literalToAst
|
|
13
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import * as fs from "fs";
|
|
4
|
+
import path from "path";
|
|
5
|
+
function patchReactNativeWeb() {
|
|
6
|
+
const rootDir = require.resolve("react-native-web").replace(/\/dist.*/, "");
|
|
7
|
+
const modulePath = path.join(rootDir, "dist", "tamagui-exports.js");
|
|
8
|
+
const cjsPath = path.join(rootDir, "dist", "cjs", "tamagui-exports.js");
|
|
9
|
+
const isEqual = (() => {
|
|
10
|
+
let res = false;
|
|
11
|
+
try {
|
|
12
|
+
res = fs.readFileSync(modulePath, "utf-8") === moduleExports && fs.readFileSync(cjsPath, "utf-8") == cjsExports;
|
|
13
|
+
} catch {
|
|
14
|
+
res = false;
|
|
15
|
+
}
|
|
16
|
+
return res;
|
|
17
|
+
})();
|
|
18
|
+
if (!isEqual) {
|
|
19
|
+
console.log("\u{1F95A} Tamagui patching react-native-web to share atomic styling primitives");
|
|
20
|
+
console.log(" > adding", modulePath);
|
|
21
|
+
console.log(" > adding", cjsPath);
|
|
22
|
+
fs.writeFileSync(modulePath, moduleExports);
|
|
23
|
+
fs.writeFileSync(cjsPath, cjsExports);
|
|
24
|
+
}
|
|
25
|
+
const moduleEntry = path.join(rootDir, "dist", "index.js");
|
|
26
|
+
const moduleEntrySrc = fs.readFileSync(moduleEntry, "utf-8");
|
|
27
|
+
if (!moduleEntrySrc.includes("// tamagui-patch-v4")) {
|
|
28
|
+
fs.writeFileSync(moduleEntry, `${removePatch(moduleEntrySrc)}
|
|
29
|
+
|
|
30
|
+
// tamagui-patch-v4
|
|
31
|
+
import * as TExports from './tamagui-exports'
|
|
32
|
+
export const TamaguiExports = TExports
|
|
33
|
+
// tamagui-patch-end
|
|
34
|
+
`);
|
|
35
|
+
}
|
|
36
|
+
const cjsEntry = path.join(rootDir, "dist", "cjs", "index.js");
|
|
37
|
+
const cjsEntrySrc = fs.readFileSync(cjsEntry, "utf-8");
|
|
38
|
+
if (!cjsEntrySrc.includes("// tamagui-patch-v4")) {
|
|
39
|
+
fs.writeFileSync(cjsEntry, `${removePatch(cjsEntrySrc)}
|
|
40
|
+
|
|
41
|
+
// tamagui-patch-v4
|
|
42
|
+
exports.TamaguiExports = _interopRequireDefault(require("./tamagui-exports"));
|
|
43
|
+
// tamagui-patch-end
|
|
44
|
+
`);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
__name(patchReactNativeWeb, "patchReactNativeWeb");
|
|
48
|
+
function removePatch(source) {
|
|
49
|
+
return source.replace(/\/\/ tamagui-patch([.\s\S]*)/g, "");
|
|
50
|
+
}
|
|
51
|
+
__name(removePatch, "removePatch");
|
|
52
|
+
const forwardedPropsObj = `{
|
|
53
|
+
...fwdProps.defaultProps,
|
|
54
|
+
...fwdProps.accessibilityProps,
|
|
55
|
+
...fwdProps.clickProps,
|
|
56
|
+
...fwdProps.focusProps,
|
|
57
|
+
...fwdProps.keyboardProps,
|
|
58
|
+
...fwdProps.mouseProps,
|
|
59
|
+
...fwdProps.touchProps,
|
|
60
|
+
...fwdProps.styleProps,
|
|
61
|
+
href: true,
|
|
62
|
+
lang: true,
|
|
63
|
+
onScroll: true,
|
|
64
|
+
onWheel: true,
|
|
65
|
+
pointerEvents: true
|
|
66
|
+
}
|
|
67
|
+
`;
|
|
68
|
+
const moduleExports = `
|
|
69
|
+
export { atomic } from './exports/StyleSheet/compile'
|
|
70
|
+
export { default as createCompileableStyle } from './exports/StyleSheet/createCompileableStyle'
|
|
71
|
+
export { default as createReactDOMStyle } from './exports/StyleSheet/createReactDOMStyle'
|
|
72
|
+
export { default as i18Style } from './exports/StyleSheet/i18nStyle'
|
|
73
|
+
export { default as createDOMProps } from './modules/createDOMProps'
|
|
74
|
+
export { default as AccessibilityUtil } from './modules/AccessibilityUtil'
|
|
75
|
+
export { default as createElement } from './exports/createElement'
|
|
76
|
+
export { default as css } from './exports/StyleSheet/css'
|
|
77
|
+
export { default as TextAncestorContext } from './exports/Text/TextAncestorContext'
|
|
78
|
+
export { default as pick } from './modules/pick'
|
|
79
|
+
export { default as useElementLayout } from './modules/useElementLayout'
|
|
80
|
+
export { default as useMergeRefs } from './modules/useMergeRefs'
|
|
81
|
+
export { default as usePlatformMethods } from './modules/usePlatformMethods'
|
|
82
|
+
export { default as useResponderEvents } from './modules/useResponderEvents'
|
|
83
|
+
import * as fwdProps from './modules/forwardedProps'
|
|
84
|
+
export const forwardedProps = ${forwardedPropsObj}
|
|
85
|
+
`;
|
|
86
|
+
const cjsExports = `
|
|
87
|
+
exports.atomic = require('./exports/StyleSheet/compile').atomic
|
|
88
|
+
exports.createCompileableStyle = require('./exports/StyleSheet/createCompileableStyle')
|
|
89
|
+
exports.createReactDOMStyle = require('./exports/StyleSheet/createReactDOMStyle')
|
|
90
|
+
exports.i18Style = require('./exports/StyleSheet/i18nStyle')
|
|
91
|
+
exports.createDOMProps = require('./modules/createDOMProps')
|
|
92
|
+
exports.AccessibilityUtil = require('./modules/AccessibilityUtil')
|
|
93
|
+
exports.createElement = require('./exports/createElement')
|
|
94
|
+
exports.css = require('./exports/StyleSheet/css')
|
|
95
|
+
exports.TextAncestorContext = require('./exports/Text/TextAncestorContext')
|
|
96
|
+
exports.pick = require('./modules/pick')
|
|
97
|
+
exports.useElementLayout = require('./modules/useElementLayout')
|
|
98
|
+
exports.useMergeRefs = require('./modules/useMergeRefs')
|
|
99
|
+
exports.usePlatformMethods = require('./modules/usePlatformMethods')
|
|
100
|
+
exports.useResponderEvents = require('./modules/useResponderEvents')
|
|
101
|
+
const fwdProps = require('./modules/forwardedProps')
|
|
102
|
+
exports.forwardedProps = ${forwardedPropsObj}
|
|
103
|
+
`;
|
|
104
|
+
export {
|
|
105
|
+
patchReactNativeWeb
|
|
106
|
+
};
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/static",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.12",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
5
|
+
"typings": "types",
|
|
6
|
+
"main": "dist/cjs",
|
|
7
|
+
"module": "dist/esm",
|
|
8
|
+
"module:jsx": "dist/_jsx",
|
|
8
9
|
"files": [
|
|
9
|
-
"types
|
|
10
|
-
"
|
|
11
|
-
"
|
|
10
|
+
"types",
|
|
11
|
+
"src",
|
|
12
|
+
"dist"
|
|
12
13
|
],
|
|
13
14
|
"scripts": {
|
|
14
15
|
"build": "tamagui-build",
|
|
@@ -53,11 +54,11 @@
|
|
|
53
54
|
"@babel/traverse": "^7.15.4",
|
|
54
55
|
"@dish/babel-preset": "^0.0.6",
|
|
55
56
|
"@expo/match-media": "^0.1.0",
|
|
56
|
-
"@tamagui/build": "^1.0.0-alpha.
|
|
57
|
-
"@tamagui/core": "^1.0.0-alpha.
|
|
58
|
-
"@tamagui/core-node": "^1.0.0-alpha.
|
|
57
|
+
"@tamagui/build": "^1.0.0-alpha.12",
|
|
58
|
+
"@tamagui/core": "^1.0.0-alpha.12",
|
|
59
|
+
"@tamagui/core-node": "^1.0.0-alpha.12",
|
|
59
60
|
"@tamagui/fake-react-native": "^1.0.0-alpha.2",
|
|
60
|
-
"@tamagui/helpers": "^1.0.0-alpha.
|
|
61
|
+
"@tamagui/helpers": "^1.0.0-alpha.12",
|
|
61
62
|
"babel-literal-to-ast": "^2.1.0",
|
|
62
63
|
"esbuild": "^0.13.12",
|
|
63
64
|
"esbuild-register": "^3.1.2",
|
|
@@ -65,10 +66,10 @@
|
|
|
65
66
|
"fs-extra": "^9.0.0",
|
|
66
67
|
"invariant": "^2.2.4",
|
|
67
68
|
"lodash": "^4.17.20",
|
|
68
|
-
"tamagui": "^1.0.0-alpha.
|
|
69
|
+
"tamagui": "^1.0.0-alpha.12"
|
|
69
70
|
},
|
|
70
71
|
"peerDependencies": {
|
|
71
72
|
"react-native-web": "*"
|
|
72
73
|
},
|
|
73
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "d50261a4e08d2212395af4f2d8f49555fc780c3e"
|
|
74
75
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,gBAAgB,CAAA;AAI1C,eAAO,MAAM,SAAS,MAAM,CAAA;AAG5B,eAAO,MAAM,QAAQ,KAAkD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accessSafe.d.ts","sourceRoot":"","sources":["../../src/extractor/accessSafe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AAIjC,wBAAgB,UAAU,CAAC,GAAG,EAAE,CAAC,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC,CAAC,iBAAiB,CAajF"}
|
|
@@ -0,0 +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,aAkBtC,CAAA;AAIF,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,GAAG,CAErD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildClassName.d.ts","sourceRoot":"","sources":["../../src/extractor/buildClassName.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AAEjC,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE1C,wBAAgB,cAAc,CAC5B,gBAAgB,EAAE,eAAe,EAAE,GAClC,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,aAAa,GAAG,IAAI,CAsDvC"}
|