@tamagui/static 1.138.2 → 1.138.3
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/package.json +15 -15
- package/dist/extractor/buildClassName.cjs +0 -62
- package/dist/extractor/buildClassName.js +0 -72
- package/dist/extractor/buildClassName.js.map +0 -6
- package/dist/extractor/ensureImportingConcat.cjs +0 -48
- package/dist/extractor/ensureImportingConcat.js +0 -50
- package/dist/extractor/ensureImportingConcat.js.map +0 -6
- package/dist/extractor/hoistClassNames.cjs +0 -62
- package/dist/extractor/hoistClassNames.js +0 -63
- package/dist/extractor/hoistClassNames.js.map +0 -6
- package/types/extractor/buildClassName.d.ts.map +0 -1
- package/types/extractor/ensureImportingConcat.d.ts.map +0 -1
- package/types/extractor/hoistClassNames.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/static",
|
|
3
|
-
"version": "1.138.
|
|
3
|
+
"version": "1.138.3",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"types": "./types/index.d.ts",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -48,19 +48,19 @@
|
|
|
48
48
|
"@babel/template": "^7.25.0",
|
|
49
49
|
"@babel/traverse": "^7.25.4",
|
|
50
50
|
"@babel/types": "^7.25.4",
|
|
51
|
-
"@tamagui/cli-color": "1.138.
|
|
52
|
-
"@tamagui/config-default": "1.138.
|
|
53
|
-
"@tamagui/core": "1.138.
|
|
54
|
-
"@tamagui/fake-react-native": "1.138.
|
|
55
|
-
"@tamagui/generate-themes": "1.138.
|
|
56
|
-
"@tamagui/helpers": "1.138.
|
|
57
|
-
"@tamagui/helpers-node": "1.138.
|
|
58
|
-
"@tamagui/proxy-worm": "1.138.
|
|
59
|
-
"@tamagui/react-native-web-internals": "1.138.
|
|
60
|
-
"@tamagui/react-native-web-lite": "1.138.
|
|
61
|
-
"@tamagui/shorthands": "1.138.
|
|
62
|
-
"@tamagui/types": "1.138.
|
|
63
|
-
"@tamagui/web": "1.138.
|
|
51
|
+
"@tamagui/cli-color": "1.138.3",
|
|
52
|
+
"@tamagui/config-default": "1.138.3",
|
|
53
|
+
"@tamagui/core": "1.138.3",
|
|
54
|
+
"@tamagui/fake-react-native": "1.138.3",
|
|
55
|
+
"@tamagui/generate-themes": "1.138.3",
|
|
56
|
+
"@tamagui/helpers": "1.138.3",
|
|
57
|
+
"@tamagui/helpers-node": "1.138.3",
|
|
58
|
+
"@tamagui/proxy-worm": "1.138.3",
|
|
59
|
+
"@tamagui/react-native-web-internals": "1.138.3",
|
|
60
|
+
"@tamagui/react-native-web-lite": "1.138.3",
|
|
61
|
+
"@tamagui/shorthands": "1.138.3",
|
|
62
|
+
"@tamagui/types": "1.138.3",
|
|
63
|
+
"@tamagui/web": "1.138.3",
|
|
64
64
|
"babel-literal-to-ast": "^2.1.0",
|
|
65
65
|
"browserslist": "^4.22.2",
|
|
66
66
|
"check-dependency-version-consistency": "^4.1.0",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"@babel/plugin-syntax-typescript": "^7.25.4",
|
|
79
79
|
"@expo/match-media": "^0.4.0",
|
|
80
|
-
"@tamagui/build": "1.138.
|
|
80
|
+
"@tamagui/build": "1.138.3",
|
|
81
81
|
"@types/babel__core": "^7.20.5",
|
|
82
82
|
"@types/find-root": "^1.1.2",
|
|
83
83
|
"@types/node": "^22.1.0",
|
|
@@ -1,62 +0,0 @@
|
|
|
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,
|
|
6
|
-
__hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all) __defProp(target, name, {
|
|
9
|
-
get: all[name],
|
|
10
|
-
enumerable: !0
|
|
11
|
-
});
|
|
12
|
-
},
|
|
13
|
-
__copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
-
get: () => from[key],
|
|
16
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
-
});
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
26
|
-
value: mod,
|
|
27
|
-
enumerable: !0
|
|
28
|
-
}) : target, mod)),
|
|
29
|
-
__toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
30
|
-
value: !0
|
|
31
|
-
}), mod);
|
|
32
|
-
var buildClassName_exports = {};
|
|
33
|
-
__export(buildClassName_exports, {
|
|
34
|
-
buildClassName: () => buildClassName,
|
|
35
|
-
buildClassNameLogic: () => buildClassNameLogic
|
|
36
|
-
});
|
|
37
|
-
module.exports = __toCommonJS(buildClassName_exports);
|
|
38
|
-
var t = __toESM(require("@babel/types"));
|
|
39
|
-
const buildClassName = (objectsIn, extras = "") => {
|
|
40
|
-
let objects = buildClassNameLogic(objectsIn);
|
|
41
|
-
return objects ? (t.isStringLiteral(objects) ? objects.value = `${extras} ${objects.value}` : objects = t.binaryExpression("+", t.stringLiteral(extras), objects), objects) : null;
|
|
42
|
-
},
|
|
43
|
-
buildClassNameLogic = objects => objects.reduce((acc, val) => {
|
|
44
|
-
if (acc == null) return (
|
|
45
|
-
// pass conditional expressions through
|
|
46
|
-
t.isConditionalExpression(val) ||
|
|
47
|
-
// pass non-null literals through
|
|
48
|
-
t.isStringLiteral(val) || t.isNumericLiteral(val) ? val : t.logicalExpression("||", val, t.stringLiteral(""))
|
|
49
|
-
);
|
|
50
|
-
let inner;
|
|
51
|
-
if (t.isStringLiteral(val)) {
|
|
52
|
-
if (t.isStringLiteral(acc)) return t.stringLiteral(`${acc.value} ${val.value}`);
|
|
53
|
-
inner = t.stringLiteral(` ${val.value}`);
|
|
54
|
-
} else if (t.isLiteral(val)) inner = t.binaryExpression("+", t.stringLiteral(" "), val);else if (t.isConditionalExpression(val) || t.isBinaryExpression(val)) {
|
|
55
|
-
if (t.isStringLiteral(acc)) return t.binaryExpression("+", t.stringLiteral(`${acc.value} `), val);
|
|
56
|
-
inner = t.binaryExpression("+", t.stringLiteral(" "), val);
|
|
57
|
-
} else if (t.isIdentifier(val) || t.isMemberExpression(val)) inner = t.conditionalExpression(val, t.binaryExpression("+", t.stringLiteral(" "), val), t.stringLiteral(""));else {
|
|
58
|
-
if (t.isStringLiteral(acc)) return t.binaryExpression("+", t.stringLiteral(`${acc.value} `), t.logicalExpression("||", val, t.stringLiteral("")));
|
|
59
|
-
inner = t.binaryExpression("+", t.stringLiteral(" "), t.logicalExpression("||", val, t.stringLiteral("")));
|
|
60
|
-
}
|
|
61
|
-
return t.binaryExpression("+", acc, inner);
|
|
62
|
-
}, null);
|
|
@@ -1,72 +0,0 @@
|
|
|
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 buildClassName_exports = {};
|
|
24
|
-
__export(buildClassName_exports, {
|
|
25
|
-
buildClassName: () => buildClassName,
|
|
26
|
-
buildClassNameLogic: () => buildClassNameLogic
|
|
27
|
-
});
|
|
28
|
-
module.exports = __toCommonJS(buildClassName_exports);
|
|
29
|
-
var t = __toESM(require("@babel/types"));
|
|
30
|
-
const buildClassName = (objectsIn, extras = "") => {
|
|
31
|
-
let objects = buildClassNameLogic(objectsIn);
|
|
32
|
-
return objects ? (t.isStringLiteral(objects) ? objects.value = `${extras} ${objects.value}` : objects = t.binaryExpression("+", t.stringLiteral(extras), objects), objects) : null;
|
|
33
|
-
}, buildClassNameLogic = (objects) => objects.reduce((acc, val) => {
|
|
34
|
-
if (acc == null)
|
|
35
|
-
return (
|
|
36
|
-
// pass conditional expressions through
|
|
37
|
-
t.isConditionalExpression(val) || // pass non-null literals through
|
|
38
|
-
t.isStringLiteral(val) || t.isNumericLiteral(val) ? val : t.logicalExpression("||", val, t.stringLiteral(""))
|
|
39
|
-
);
|
|
40
|
-
let inner;
|
|
41
|
-
if (t.isStringLiteral(val)) {
|
|
42
|
-
if (t.isStringLiteral(acc))
|
|
43
|
-
return t.stringLiteral(`${acc.value} ${val.value}`);
|
|
44
|
-
inner = t.stringLiteral(` ${val.value}`);
|
|
45
|
-
} else if (t.isLiteral(val))
|
|
46
|
-
inner = t.binaryExpression("+", t.stringLiteral(" "), val);
|
|
47
|
-
else if (t.isConditionalExpression(val) || t.isBinaryExpression(val)) {
|
|
48
|
-
if (t.isStringLiteral(acc))
|
|
49
|
-
return t.binaryExpression("+", t.stringLiteral(`${acc.value} `), val);
|
|
50
|
-
inner = t.binaryExpression("+", t.stringLiteral(" "), val);
|
|
51
|
-
} else if (t.isIdentifier(val) || t.isMemberExpression(val))
|
|
52
|
-
inner = t.conditionalExpression(
|
|
53
|
-
val,
|
|
54
|
-
t.binaryExpression("+", t.stringLiteral(" "), val),
|
|
55
|
-
t.stringLiteral("")
|
|
56
|
-
);
|
|
57
|
-
else {
|
|
58
|
-
if (t.isStringLiteral(acc))
|
|
59
|
-
return t.binaryExpression(
|
|
60
|
-
"+",
|
|
61
|
-
t.stringLiteral(`${acc.value} `),
|
|
62
|
-
t.logicalExpression("||", val, t.stringLiteral(""))
|
|
63
|
-
);
|
|
64
|
-
inner = t.binaryExpression(
|
|
65
|
-
"+",
|
|
66
|
-
t.stringLiteral(" "),
|
|
67
|
-
t.logicalExpression("||", val, t.stringLiteral(""))
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
return t.binaryExpression("+", acc, inner);
|
|
71
|
-
}, null);
|
|
72
|
-
//# sourceMappingURL=buildClassName.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/extractor/buildClassName.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;A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G,GAAG,GAAG;AAAA,MACjD,EAAE,cAAc,EAAE;AAAA,IACpB;AAAA,OACK;AACL,QAAI,EAAE,gBAAgB,GAAG;AACvB,aAAO,EAAE;AAAA,QACP;AAAA,QACA,EAAE,cAAc,GAAG,IAAI,KAAK,GAAG;AAAA,QAC/B,EAAE,kBAAkB,MAAM,KAAK,EAAE,cAAc,EAAE,CAAC;AAAA,MACpD;AAGF,YAAQ,EAAE;AAAA,MACR;AAAA,MACA,EAAE,cAAc,GAAG;AAAA,MACnB,EAAE,kBAAkB,MAAM,KAAK,EAAE,cAAc,EAAE,CAAC;AAAA,IACpD;AAAA,EACF;AAEA,SAAO,EAAE,iBAAiB,KAAK,KAAK,KAAK;AAC3C,GAAG,IAAI;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
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,
|
|
6
|
-
__hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all) __defProp(target, name, {
|
|
9
|
-
get: all[name],
|
|
10
|
-
enumerable: !0
|
|
11
|
-
});
|
|
12
|
-
},
|
|
13
|
-
__copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
-
get: () => from[key],
|
|
16
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
-
});
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
26
|
-
value: mod,
|
|
27
|
-
enumerable: !0
|
|
28
|
-
}) : target, mod)),
|
|
29
|
-
__toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
30
|
-
value: !0
|
|
31
|
-
}), mod);
|
|
32
|
-
var ensureImportingConcat_exports = {};
|
|
33
|
-
__export(ensureImportingConcat_exports, {
|
|
34
|
-
ensureImportingConcat: () => ensureImportingConcat
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(ensureImportingConcat_exports);
|
|
37
|
-
var t = __toESM(require("@babel/types"));
|
|
38
|
-
const importConcatPkg = "@tamagui/helpers";
|
|
39
|
-
function ensureImportingConcat(path) {
|
|
40
|
-
const imported = path.get("body").find(x => x.isImportDeclaration() && x.node.source.value === importConcatPkg),
|
|
41
|
-
importSpecifier = t.importSpecifier(t.identifier("concatClassName"), t.identifier("concatClassName"));
|
|
42
|
-
if (!imported) {
|
|
43
|
-
path.node.body.push(t.importDeclaration([importSpecifier], t.stringLiteral(importConcatPkg)));
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
const specifiers = imported.node.specifiers;
|
|
47
|
-
specifiers.some(x => t.isImportSpecifier(x) && t.isIdentifier(x.imported) && x.imported.name === "concatClassName") || specifiers.push(t.importSpecifier(t.identifier("concatClassName"), t.identifier("concatClassName")));
|
|
48
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
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 ensureImportingConcat_exports = {};
|
|
24
|
-
__export(ensureImportingConcat_exports, {
|
|
25
|
-
ensureImportingConcat: () => ensureImportingConcat
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(ensureImportingConcat_exports);
|
|
28
|
-
var t = __toESM(require("@babel/types"));
|
|
29
|
-
const importConcatPkg = "@tamagui/helpers";
|
|
30
|
-
function ensureImportingConcat(path) {
|
|
31
|
-
const imported = path.get("body").find(
|
|
32
|
-
(x) => x.isImportDeclaration() && x.node.source.value === importConcatPkg
|
|
33
|
-
), importSpecifier = t.importSpecifier(
|
|
34
|
-
t.identifier("concatClassName"),
|
|
35
|
-
t.identifier("concatClassName")
|
|
36
|
-
);
|
|
37
|
-
if (!imported) {
|
|
38
|
-
path.node.body.push(
|
|
39
|
-
t.importDeclaration([importSpecifier], t.stringLiteral(importConcatPkg))
|
|
40
|
-
);
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
const specifiers = imported.node.specifiers;
|
|
44
|
-
specifiers.some(
|
|
45
|
-
(x) => t.isImportSpecifier(x) && t.isIdentifier(x.imported) && x.imported.name === "concatClassName"
|
|
46
|
-
) || specifiers.push(
|
|
47
|
-
t.importSpecifier(t.identifier("concatClassName"), t.identifier("concatClassName"))
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
//# sourceMappingURL=ensureImportingConcat.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/extractor/ensureImportingConcat.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,QAAmB;AAEnB,MAAM,kBAAkB;AAEjB,SAAS,sBAAsB,MAA2B;AAE/D,QAAM,WADW,KAAK,IAAI,MAAM,EACqC;AAAA,IACnE,CAAC,MAAM,EAAE,oBAAoB,KAAK,EAAE,KAAK,OAAO,UAAU;AAAA,EAC5D,GACM,kBAAkB,EAAE;AAAA,IACxB,EAAE,WAAW,iBAAiB;AAAA,IAC9B,EAAE,WAAW,iBAAiB;AAAA,EAChC;AAEA,MAAI,CAAC,UAAU;AACb,SAAK,KAAK,KAAK;AAAA,MACb,EAAE,kBAAkB,CAAC,eAAe,GAAG,EAAE,cAAc,eAAe,CAAC;AAAA,IACzE;AACA;AAAA,EACF;AAEA,QAAM,aAAa,SAAS,KAAK;AAQjC,EAPwB,WAAW;AAAA,IACjC,CAAC,MACC,EAAE,kBAAkB,CAAC,KACrB,EAAE,aAAa,EAAE,QAAQ,KACzB,EAAE,SAAS,SAAS;AAAA,EACxB,KAGE,WAAW;AAAA,IACT,EAAE,gBAAgB,EAAE,WAAW,iBAAiB,GAAG,EAAE,WAAW,iBAAiB,CAAC;AAAA,EACpF;AAEJ;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
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,
|
|
6
|
-
__hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all) __defProp(target, name, {
|
|
9
|
-
get: all[name],
|
|
10
|
-
enumerable: !0
|
|
11
|
-
});
|
|
12
|
-
},
|
|
13
|
-
__copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
-
get: () => from[key],
|
|
16
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
-
});
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
26
|
-
value: mod,
|
|
27
|
-
enumerable: !0
|
|
28
|
-
}) : target, mod)),
|
|
29
|
-
__toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
30
|
-
value: !0
|
|
31
|
-
}), mod);
|
|
32
|
-
var hoistClassNames_exports = {};
|
|
33
|
-
__export(hoistClassNames_exports, {
|
|
34
|
-
hoistClassNames: () => hoistClassNames
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(hoistClassNames_exports);
|
|
37
|
-
var t = __toESM(require("@babel/types"));
|
|
38
|
-
function hoistClassNames(path, existing, expr) {
|
|
39
|
-
const hoist = hoistClassNames.bind(null, path, existing);
|
|
40
|
-
if (t.isStringLiteral(expr)) {
|
|
41
|
-
if (expr.value.trim() === "") return expr;
|
|
42
|
-
if (existing[expr.value]) return existing[expr.value];
|
|
43
|
-
const identifier = replaceStringWithVariable(expr);
|
|
44
|
-
return existing[expr.value] = identifier, identifier;
|
|
45
|
-
}
|
|
46
|
-
if (t.isBinaryExpression(expr)) {
|
|
47
|
-
if (t.isPrivateName(expr.left)) throw new Error("no private name");
|
|
48
|
-
return t.binaryExpression(expr.operator, hoist(expr.left), hoist(expr.right));
|
|
49
|
-
}
|
|
50
|
-
if (t.isLogicalExpression(expr)) return t.logicalExpression(expr.operator, hoist(expr.left), hoist(expr.right));
|
|
51
|
-
if (t.isConditionalExpression(expr)) return t.conditionalExpression(expr.test, hoist(expr.consequent), hoist(expr.alternate));
|
|
52
|
-
return expr;
|
|
53
|
-
function replaceStringWithVariable(str) {
|
|
54
|
-
const uid = path.scope.generateUidIdentifier("cn"),
|
|
55
|
-
parent = path.findParent(path2 => path2.isProgram());
|
|
56
|
-
if (!parent) throw new Error("no program?");
|
|
57
|
-
const variable = t.variableDeclaration("const", [
|
|
58
|
-
// adding a space for extra safety
|
|
59
|
-
t.variableDeclarator(uid, t.stringLiteral(` ${str.value}`))]);
|
|
60
|
-
return parent.unshiftContainer("body", variable), uid;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
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 hoistClassNames_exports = {};
|
|
24
|
-
__export(hoistClassNames_exports, {
|
|
25
|
-
hoistClassNames: () => hoistClassNames
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(hoistClassNames_exports);
|
|
28
|
-
var t = __toESM(require("@babel/types"));
|
|
29
|
-
function hoistClassNames(path, existing, expr) {
|
|
30
|
-
const hoist = hoistClassNames.bind(null, path, existing);
|
|
31
|
-
if (t.isStringLiteral(expr)) {
|
|
32
|
-
if (expr.value.trim() === "")
|
|
33
|
-
return expr;
|
|
34
|
-
if (existing[expr.value])
|
|
35
|
-
return existing[expr.value];
|
|
36
|
-
const identifier = replaceStringWithVariable(expr);
|
|
37
|
-
return existing[expr.value] = identifier, identifier;
|
|
38
|
-
}
|
|
39
|
-
if (t.isBinaryExpression(expr)) {
|
|
40
|
-
if (t.isPrivateName(expr.left))
|
|
41
|
-
throw new Error("no private name");
|
|
42
|
-
return t.binaryExpression(expr.operator, hoist(expr.left), hoist(expr.right));
|
|
43
|
-
}
|
|
44
|
-
if (t.isLogicalExpression(expr))
|
|
45
|
-
return t.logicalExpression(expr.operator, hoist(expr.left), hoist(expr.right));
|
|
46
|
-
if (t.isConditionalExpression(expr))
|
|
47
|
-
return t.conditionalExpression(
|
|
48
|
-
expr.test,
|
|
49
|
-
hoist(expr.consequent),
|
|
50
|
-
hoist(expr.alternate)
|
|
51
|
-
);
|
|
52
|
-
return expr;
|
|
53
|
-
function replaceStringWithVariable(str) {
|
|
54
|
-
const uid = path.scope.generateUidIdentifier("cn"), parent = path.findParent((path2) => path2.isProgram());
|
|
55
|
-
if (!parent) throw new Error("no program?");
|
|
56
|
-
const variable = t.variableDeclaration("const", [
|
|
57
|
-
// adding a space for extra safety
|
|
58
|
-
t.variableDeclarator(uid, t.stringLiteral(` ${str.value}`))
|
|
59
|
-
]);
|
|
60
|
-
return parent.unshiftContainer("body", variable), uid;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
//# sourceMappingURL=hoistClassNames.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/extractor/hoistClassNames.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,QAAmB;AAEZ,SAAS,gBACd,MACA,UACA,MACA;AACA,QAAM,QAAQ,gBAAgB,KAAK,MAAM,MAAM,QAAQ;AACvD,MAAI,EAAE,gBAAgB,IAAI,GAAG;AAC3B,QAAI,KAAK,MAAM,KAAK,MAAM;AACxB,aAAO;AAET,QAAI,SAAS,KAAK,KAAK;AACrB,aAAO,SAAS,KAAK,KAAK;AAE5B,U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AC1B,MAAM,CAAC,EAAE,MAAM,KACZ,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,aAAa,GAAG,IAAI,CAAA;AAE1C,eAAO,MAAM,cAAc,EAAE,OAU5B,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,OAsDjC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ensureImportingConcat.d.ts","sourceRoot":"","sources":["../../src/extractor/ensureImportingConcat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AAIjC,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,QA8B9D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hoistClassNames.d.ts","sourceRoot":"","sources":["../../src/extractor/hoistClassNames.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AAEjC,wBAAgB,eAAe,CAC7B,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,EAC5B,QAAQ,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC,UAAU,CAAA;CAAE,EACzC,IAAI,EAAE,CAAC,CAAC,UAAU,OA6CnB"}
|