@tamagui/static 1.0.0-alpha.39 → 1.0.0-alpha.42
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 +17 -7
- package/dist/cjs/constants.js.map +2 -2
- package/dist/cjs/extractor/accessSafe.js +13 -7
- package/dist/cjs/extractor/accessSafe.js.map +1 -1
- package/dist/cjs/extractor/babelParse.js +13 -7
- package/dist/cjs/extractor/babelParse.js.map +1 -1
- package/dist/cjs/extractor/buildClassName.js +13 -7
- package/dist/cjs/extractor/buildClassName.js.map +1 -1
- package/dist/cjs/extractor/createEvaluator.js +19 -13
- package/dist/cjs/extractor/createEvaluator.js.map +2 -2
- package/dist/cjs/extractor/createExtractor.js +44 -40
- package/dist/cjs/extractor/createExtractor.js.map +2 -2
- package/dist/cjs/extractor/ensureImportingConcat.js +17 -11
- package/dist/cjs/extractor/ensureImportingConcat.js.map +2 -2
- package/dist/cjs/extractor/evaluateAstNode.js +13 -7
- package/dist/cjs/extractor/evaluateAstNode.js.map +1 -1
- package/dist/cjs/extractor/extractHelpers.js +13 -7
- package/dist/cjs/extractor/extractHelpers.js.map +1 -1
- package/dist/cjs/extractor/extractMediaStyle.js +16 -10
- package/dist/cjs/extractor/extractMediaStyle.js.map +1 -1
- package/dist/cjs/extractor/extractToClassNames.js +31 -26
- package/dist/cjs/extractor/extractToClassNames.js.map +2 -2
- package/dist/cjs/extractor/findTopmostFunction.js +19 -2
- package/dist/cjs/extractor/findTopmostFunction.js.map +1 -1
- package/dist/cjs/extractor/generatedUid.js +14 -8
- package/dist/cjs/extractor/generatedUid.js.map +1 -1
- package/dist/cjs/extractor/getPropValueFromAttributes.js +15 -9
- package/dist/cjs/extractor/getPropValueFromAttributes.js.map +1 -1
- package/dist/cjs/extractor/getSourceModule.js +13 -7
- package/dist/cjs/extractor/getSourceModule.js.map +1 -1
- package/dist/cjs/extractor/getStaticBindingsForScope.js +17 -11
- package/dist/cjs/extractor/getStaticBindingsForScope.js.map +1 -1
- package/dist/cjs/extractor/hoistClassNames.js +13 -7
- package/dist/cjs/extractor/hoistClassNames.js.map +1 -1
- package/dist/cjs/extractor/literalToAst.js +13 -7
- package/dist/cjs/extractor/literalToAst.js.map +1 -1
- package/dist/cjs/extractor/loadTamagui.js +12 -11
- package/dist/cjs/extractor/loadTamagui.js.map +1 -1
- package/dist/cjs/extractor/logLines.js +19 -2
- package/dist/cjs/extractor/logLines.js.map +1 -1
- package/dist/cjs/extractor/normalizeTernaries.js +15 -9
- package/dist/cjs/extractor/normalizeTernaries.js.map +1 -1
- package/dist/cjs/extractor/removeUnusedHooks.js +13 -7
- package/dist/cjs/extractor/removeUnusedHooks.js.map +1 -1
- package/dist/cjs/index.js +17 -16
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/patchReactNativeWeb.js +14 -8
- package/dist/cjs/patchReactNativeWeb.js.map +1 -1
- package/dist/cjs/types.js +18 -1
- package/dist/cjs/types.js.map +1 -1
- package/dist/esm/constants.js +4 -0
- package/dist/esm/constants.js.map +2 -2
- package/dist/esm/extractor/createEvaluator.js +1 -1
- package/dist/esm/extractor/createEvaluator.js.map +1 -1
- package/dist/esm/extractor/createExtractor.js +9 -11
- package/dist/esm/extractor/createExtractor.js.map +2 -2
- package/dist/esm/extractor/ensureImportingConcat.js +1 -1
- package/dist/esm/extractor/ensureImportingConcat.js.map +2 -2
- package/dist/esm/extractor/extractToClassNames.js +2 -3
- package/dist/esm/extractor/extractToClassNames.js.map +2 -2
- package/dist/jsx/constants.js +4 -0
- package/dist/jsx/extractor/createEvaluator.js +1 -1
- package/dist/jsx/extractor/createExtractor.js +9 -11
- package/dist/jsx/extractor/ensureImportingConcat.js +1 -1
- package/dist/jsx/extractor/extractToClassNames.js +2 -3
- package/package.json +7 -7
- package/types/constants.d.ts +2 -0
- package/types/constants.d.ts.map +1 -1
- package/types/extractor/createExtractor.d.ts +0 -1
- package/types/extractor/createExtractor.d.ts.map +1 -1
- package/types/extractor/ensureImportingConcat.d.ts.map +1 -1
- package/types/extractor/extractToClassNames.d.ts +0 -1
- package/types/extractor/extractToClassNames.d.ts.map +1 -1
package/dist/cjs/constants.js
CHANGED
|
@@ -6,28 +6,38 @@ var __getProtoOf = Object.getPrototypeOf;
|
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
8
|
var __export = (target, all) => {
|
|
9
|
-
__markAsModule(target);
|
|
10
9
|
for (var name in all)
|
|
11
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
11
|
};
|
|
13
|
-
var __reExport = (target, module2, desc) => {
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
14
13
|
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
15
14
|
for (let key of __getOwnPropNames(module2))
|
|
16
|
-
if (!__hasOwnProp.call(target, key) && key !== "default")
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
17
16
|
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
18
17
|
}
|
|
19
18
|
return target;
|
|
20
19
|
};
|
|
21
|
-
var
|
|
22
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default",
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
23
22
|
};
|
|
24
|
-
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var constants_exports = {};
|
|
29
|
+
__export(constants_exports, {
|
|
30
|
+
CONCAT_CLASSNAME_IMPORT: () => CONCAT_CLASSNAME_IMPORT,
|
|
25
31
|
CSS_FILE_NAME: () => CSS_FILE_NAME,
|
|
32
|
+
FAILED_EVAL: () => FAILED_EVAL,
|
|
26
33
|
MEDIA_SEP: () => MEDIA_SEP,
|
|
27
34
|
cacheDir: () => cacheDir
|
|
28
35
|
});
|
|
29
|
-
var import_find_cache_dir =
|
|
36
|
+
var import_find_cache_dir = __toESM(require("find-cache-dir"));
|
|
30
37
|
const CSS_FILE_NAME = "__snack.css";
|
|
31
38
|
const MEDIA_SEP = "_";
|
|
32
39
|
const cacheDir = (0, import_find_cache_dir.default)({ name: "tamagui", create: true });
|
|
40
|
+
const FAILED_EVAL = Symbol("failed_style_eval");
|
|
41
|
+
const CONCAT_CLASSNAME_IMPORT = "concatClassName";
|
|
42
|
+
module.exports = __toCommonJS(constants_exports);
|
|
33
43
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/constants.ts"],
|
|
4
|
-
"sourcesContent": ["import findCacheDir from 'find-cache-dir'\n\nexport const CSS_FILE_NAME = '__snack.css'\n\n// ENSURE THIS ISNT THE SAME AS THE SEPARATOR USED FOR STYLE KEYS\n// SEE matching one in concatClassName\nexport const MEDIA_SEP = '_'\n\n// ensure cache dir\nexport const cacheDir = findCacheDir({ name: 'tamagui', create: true })\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import findCacheDir from 'find-cache-dir'\n\nexport const CSS_FILE_NAME = '__snack.css'\n\n// ENSURE THIS ISNT THE SAME AS THE SEPARATOR USED FOR STYLE KEYS\n// SEE matching one in concatClassName\nexport const MEDIA_SEP = '_'\n\n// ensure cache dir\nexport const cacheDir = findCacheDir({ name: 'tamagui', create: true })\n\nexport const FAILED_EVAL = Symbol('failed_style_eval')\nexport const CONCAT_CLASSNAME_IMPORT = 'concatClassName'\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAAyB;AAElB,MAAM,gBAAgB;AAItB,MAAM,YAAY;AAGlB,MAAM,WAAW,mCAAa,EAAE,MAAM,WAAW,QAAQ;AAEzD,MAAM,cAAc,OAAO;AAC3B,MAAM,0BAA0B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -7,27 +7,33 @@ var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
|
7
7
|
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
8
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
9
9
|
var __export = (target, all) => {
|
|
10
|
-
__markAsModule(target);
|
|
11
10
|
for (var name in all)
|
|
12
11
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
13
12
|
};
|
|
14
|
-
var __reExport = (target, module2, desc) => {
|
|
13
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
15
14
|
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
16
15
|
for (let key of __getOwnPropNames(module2))
|
|
17
|
-
if (!__hasOwnProp.call(target, key) && key !== "default")
|
|
16
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
18
17
|
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
19
18
|
}
|
|
20
19
|
return target;
|
|
21
20
|
};
|
|
22
|
-
var
|
|
23
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default",
|
|
21
|
+
var __toESM = (module2, isNodeMode) => {
|
|
22
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
24
23
|
};
|
|
25
|
-
|
|
24
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
25
|
+
return (module2, temp) => {
|
|
26
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
27
|
+
};
|
|
28
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
29
|
+
var accessSafe_exports = {};
|
|
30
|
+
__export(accessSafe_exports, {
|
|
26
31
|
accessSafe: () => accessSafe
|
|
27
32
|
});
|
|
28
|
-
var t =
|
|
33
|
+
var t = __toESM(require("@babel/types"));
|
|
29
34
|
function accessSafe(obj, member) {
|
|
30
35
|
return t.logicalExpression("&&", t.logicalExpression("&&", t.binaryExpression("===", t.unaryExpression("typeof", obj), t.stringLiteral("object")), t.binaryExpression("!==", obj, t.nullLiteral())), t.memberExpression(obj, t.identifier(member), false));
|
|
31
36
|
}
|
|
32
37
|
__name(accessSafe, "accessSafe");
|
|
38
|
+
module.exports = __toCommonJS(accessSafe_exports);
|
|
33
39
|
//# sourceMappingURL=accessSafe.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/extractor/accessSafe.ts"],
|
|
4
4
|
"sourcesContent": ["import * as t from '@babel/types'\n\n// accessSafe wraps memberExpressions in object/null checks\n// TODO: inject this as a function? this gets pretty repetitive\nexport function accessSafe(obj: t.Expression, member: string): t.LogicalExpression {\n return t.logicalExpression(\n '&&',\n t.logicalExpression(\n '&&',\n // typeof obj === 'object\n t.binaryExpression('===', t.unaryExpression('typeof', obj), t.stringLiteral('object')),\n // obj !== null\n t.binaryExpression('!==', obj, t.nullLiteral())\n ),\n // obj.member\n t.memberExpression(obj, t.identifier(member), false)\n )\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,QAAmB;AAIZ,oBAAoB,KAAmB,QAAqC;AACjF,SAAO,EAAE,kBACP,MACA,EAAE,kBACA,MAEA,EAAE,iBAAiB,OAAO,EAAE,gBAAgB,UAAU,MAAM,EAAE,cAAc,YAE5E,EAAE,iBAAiB,OAAO,KAAK,EAAE,iBAGnC,EAAE,iBAAiB,KAAK,EAAE,WAAW,SAAS;AAAA;AAXlC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -7,26 +7,31 @@ var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
|
7
7
|
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
8
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
9
9
|
var __export = (target, all) => {
|
|
10
|
-
__markAsModule(target);
|
|
11
10
|
for (var name in all)
|
|
12
11
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
13
12
|
};
|
|
14
|
-
var __reExport = (target, module2, desc) => {
|
|
13
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
15
14
|
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
16
15
|
for (let key of __getOwnPropNames(module2))
|
|
17
|
-
if (!__hasOwnProp.call(target, key) && key !== "default")
|
|
16
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
18
17
|
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
19
18
|
}
|
|
20
19
|
return target;
|
|
21
20
|
};
|
|
22
|
-
var
|
|
23
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default",
|
|
21
|
+
var __toESM = (module2, isNodeMode) => {
|
|
22
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
24
23
|
};
|
|
25
|
-
|
|
24
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
25
|
+
return (module2, temp) => {
|
|
26
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
27
|
+
};
|
|
28
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
29
|
+
var babelParse_exports = {};
|
|
30
|
+
__export(babelParse_exports, {
|
|
26
31
|
babelParse: () => babelParse,
|
|
27
32
|
parserOptions: () => parserOptions
|
|
28
33
|
});
|
|
29
|
-
var babelParser =
|
|
34
|
+
var babelParser = __toESM(require("@babel/parser"));
|
|
30
35
|
const parserOptions = Object.freeze({
|
|
31
36
|
plugins: [
|
|
32
37
|
"asyncGenerators",
|
|
@@ -49,4 +54,5 @@ function babelParse(code) {
|
|
|
49
54
|
return parser(code.toString(), parserOptions);
|
|
50
55
|
}
|
|
51
56
|
__name(babelParse, "babelParse");
|
|
57
|
+
module.exports = __toCommonJS(babelParse_exports);
|
|
52
58
|
//# sourceMappingURL=babelParse.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/extractor/babelParse.ts"],
|
|
4
4
|
"sourcesContent": ["import * as babelParser from '@babel/parser'\n\nexport const parserOptions: babelParser.ParserOptions = Object.freeze({\n plugins: [\n 'asyncGenerators',\n 'classProperties',\n 'dynamicImport',\n 'functionBind',\n 'jsx',\n 'numericSeparator',\n 'objectRestSpread',\n 'optionalCatchBinding',\n 'decorators-legacy',\n 'typescript',\n 'optionalChaining',\n 'nullishCoalescingOperator',\n // 'objectRestSpread',\n // 'dynamicImport'\n ],\n sourceType: 'module',\n})\n\nconst parser = babelParser.parse.bind(babelParser)\n\nexport function babelParse(code: string | Buffer): any {\n return parser(code.toString(), parserOptions)\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA6B;AAEtB,MAAM,gBAA2C,OAAO,OAAO;AAAA,EACpE,SAAS;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,EAIF,YAAY;AAAA;AAGd,MAAM,SAAS,YAAY,MAAM,KAAK;AAE/B,oBAAoB,MAA4B;AACrD,SAAO,OAAO,KAAK,YAAY;AAAA;AADjB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -7,25 +7,30 @@ var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
|
7
7
|
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
8
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
9
9
|
var __export = (target, all) => {
|
|
10
|
-
__markAsModule(target);
|
|
11
10
|
for (var name in all)
|
|
12
11
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
13
12
|
};
|
|
14
|
-
var __reExport = (target, module2, desc) => {
|
|
13
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
15
14
|
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
16
15
|
for (let key of __getOwnPropNames(module2))
|
|
17
|
-
if (!__hasOwnProp.call(target, key) && key !== "default")
|
|
16
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
18
17
|
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
19
18
|
}
|
|
20
19
|
return target;
|
|
21
20
|
};
|
|
22
|
-
var
|
|
23
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default",
|
|
21
|
+
var __toESM = (module2, isNodeMode) => {
|
|
22
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
24
23
|
};
|
|
25
|
-
|
|
24
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
25
|
+
return (module2, temp) => {
|
|
26
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
27
|
+
};
|
|
28
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
29
|
+
var buildClassName_exports = {};
|
|
30
|
+
__export(buildClassName_exports, {
|
|
26
31
|
buildClassName: () => buildClassName
|
|
27
32
|
});
|
|
28
|
-
var t =
|
|
33
|
+
var t = __toESM(require("@babel/types"));
|
|
29
34
|
function buildClassName(classNameObjects) {
|
|
30
35
|
return classNameObjects.reduce((acc, val) => {
|
|
31
36
|
if (acc == null) {
|
|
@@ -59,4 +64,5 @@ function buildClassName(classNameObjects) {
|
|
|
59
64
|
}, null);
|
|
60
65
|
}
|
|
61
66
|
__name(buildClassName, "buildClassName");
|
|
67
|
+
module.exports = __toCommonJS(buildClassName_exports);
|
|
62
68
|
//# sourceMappingURL=buildClassName.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/extractor/buildClassName.ts"],
|
|
4
4
|
"sourcesContent": ["import * as t from '@babel/types'\n\nimport { ClassNameObject } from '../types'\n\nexport function buildClassName(\n classNameObjects: ClassNameObject[]\n): t.Expression | t.StringLiteral | null {\n return classNameObjects.reduce<t.Expression | null>((acc, val) => {\n if (acc == null) {\n if (\n // pass conditional expressions through\n t.isConditionalExpression(val) ||\n // pass non-null literals through\n t.isStringLiteral(val) ||\n t.isNumericLiteral(val)\n ) {\n return val\n }\n return t.logicalExpression('||', val, t.stringLiteral(''))\n }\n\n let inner: t.Expression\n if (t.isStringLiteral(val)) {\n if (t.isStringLiteral(acc)) {\n // join adjacent string literals\n return t.stringLiteral(`${acc.value} ${val.value}`)\n }\n inner = t.stringLiteral(` ${val.value}`)\n } else if (t.isLiteral(val)) {\n inner = t.binaryExpression('+', t.stringLiteral(' '), val)\n } else if (t.isConditionalExpression(val) || t.isBinaryExpression(val)) {\n if (t.isStringLiteral(acc)) {\n return t.binaryExpression('+', t.stringLiteral(`${acc.value} `), val)\n }\n inner = t.binaryExpression('+', t.stringLiteral(' '), val)\n } else if (t.isIdentifier(val) || t.isMemberExpression(val)) {\n // identifiers and member expressions make for reasonable ternaries\n inner = t.conditionalExpression(\n val,\n t.binaryExpression('+', t.stringLiteral(' '), val),\n t.stringLiteral('')\n )\n } else {\n if (t.isStringLiteral(acc)) {\n return t.binaryExpression(\n '+',\n t.stringLiteral(`${acc.value} `),\n t.logicalExpression('||', val, t.stringLiteral(''))\n )\n }\n // use a logical expression for more complex prop values\n inner = t.binaryExpression(\n '+',\n t.stringLiteral(' '),\n t.logicalExpression('||', val, t.stringLiteral(''))\n )\n }\n\n return t.binaryExpression('+', acc, inner)\n }, null)\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,QAAmB;AAIZ,wBACL,kBACuC;AACvC,SAAO,iBAAiB,OAA4B,CAAC,KAAK,QAAQ;AAChE,QAAI,OAAO,MAAM;AACf,UAEE,EAAE,wBAAwB,QAE1B,EAAE,gBAAgB,QAClB,EAAE,iBAAiB,MACnB;AACA,eAAO;AAAA;AAET,aAAO,EAAE,kBAAkB,MAAM,KAAK,EAAE,cAAc;AAAA;AAGxD,QAAI;AACJ,QAAI,EAAE,gBAAgB,MAAM;AAC1B,UAAI,EAAE,gBAAgB,MAAM;AAE1B,eAAO,EAAE,cAAc,GAAG,IAAI,SAAS,IAAI;AAAA;AAE7C,cAAQ,EAAE,cAAc,IAAI,IAAI;AAAA,eACvB,EAAE,UAAU,MAAM;AAC3B,cAAQ,EAAE,iBAAiB,KAAK,EAAE,cAAc,MAAM;AAAA,eAC7C,EAAE,wBAAwB,QAAQ,EAAE,mBAAmB,MAAM;AACtE,UAAI,EAAE,gBAAgB,MAAM;AAC1B,eAAO,EAAE,iBAAiB,KAAK,EAAE,cAAc,GAAG,IAAI,WAAW;AAAA;AAEnE,cAAQ,EAAE,iBAAiB,KAAK,EAAE,cAAc,MAAM;AAAA,eAC7C,EAAE,aAAa,QAAQ,EAAE,mBAAmB,MAAM;AAE3D,cAAQ,EAAE,sBACR,KACA,EAAE,iBAAiB,KAAK,EAAE,cAAc,MAAM,MAC9C,EAAE,cAAc;AAAA,WAEb;AACL,UAAI,EAAE,gBAAgB,MAAM;AAC1B,eAAO,EAAE,iBACP,KACA,EAAE,cAAc,GAAG,IAAI,WACvB,EAAE,kBAAkB,MAAM,KAAK,EAAE,cAAc;AAAA;AAInD,cAAQ,EAAE,iBACR,KACA,EAAE,cAAc,MAChB,EAAE,kBAAkB,MAAM,KAAK,EAAE,cAAc;AAAA;AAInD,WAAO,EAAE,iBAAiB,KAAK,KAAK;AAAA,KACnC;AAAA;AAvDW;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -7,31 +7,36 @@ var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
|
7
7
|
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
8
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
9
9
|
var __export = (target, all) => {
|
|
10
|
-
__markAsModule(target);
|
|
11
10
|
for (var name in all)
|
|
12
11
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
13
12
|
};
|
|
14
|
-
var __reExport = (target, module2, desc) => {
|
|
13
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
15
14
|
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
16
15
|
for (let key of __getOwnPropNames(module2))
|
|
17
|
-
if (!__hasOwnProp.call(target, key) && key !== "default")
|
|
16
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
18
17
|
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
19
18
|
}
|
|
20
19
|
return target;
|
|
21
20
|
};
|
|
22
|
-
var
|
|
23
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default",
|
|
21
|
+
var __toESM = (module2, isNodeMode) => {
|
|
22
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
24
23
|
};
|
|
25
|
-
|
|
24
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
25
|
+
return (module2, temp) => {
|
|
26
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
27
|
+
};
|
|
28
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
29
|
+
var createEvaluator_exports = {};
|
|
30
|
+
__export(createEvaluator_exports, {
|
|
26
31
|
createEvaluator: () => createEvaluator,
|
|
27
32
|
createSafeEvaluator: () => createSafeEvaluator
|
|
28
33
|
});
|
|
29
|
-
var import_vm =
|
|
30
|
-
var import_generator =
|
|
31
|
-
var t =
|
|
32
|
-
var
|
|
33
|
-
var import_evaluateAstNode =
|
|
34
|
-
var import_extractHelpers =
|
|
34
|
+
var import_vm = __toESM(require("vm"));
|
|
35
|
+
var import_generator = __toESM(require("@babel/generator"));
|
|
36
|
+
var t = __toESM(require("@babel/types"));
|
|
37
|
+
var import_constants = require("../constants");
|
|
38
|
+
var import_evaluateAstNode = require("./evaluateAstNode");
|
|
39
|
+
var import_extractHelpers = require("./extractHelpers");
|
|
35
40
|
function createEvaluator({
|
|
36
41
|
tamaguiConfig,
|
|
37
42
|
staticNamespace,
|
|
@@ -65,9 +70,10 @@ function createSafeEvaluator(attemptEval) {
|
|
|
65
70
|
try {
|
|
66
71
|
return attemptEval(n);
|
|
67
72
|
} catch (err) {
|
|
68
|
-
return
|
|
73
|
+
return import_constants.FAILED_EVAL;
|
|
69
74
|
}
|
|
70
75
|
};
|
|
71
76
|
}
|
|
72
77
|
__name(createSafeEvaluator, "createSafeEvaluator");
|
|
78
|
+
module.exports = __toCommonJS(createEvaluator_exports);
|
|
73
79
|
//# sourceMappingURL=createEvaluator.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/extractor/createEvaluator.ts"],
|
|
4
|
-
"sourcesContent": ["import vm from 'vm'\n\nimport generate from '@babel/generator'\nimport { NodePath } from '@babel/traverse'\nimport * as t from '@babel/types'\nimport type { TamaguiConfig } from '@tamagui/core'\n\nimport { FAILED_EVAL } from '
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import vm from 'vm'\n\nimport generate from '@babel/generator'\nimport { NodePath } from '@babel/traverse'\nimport * as t from '@babel/types'\nimport type { TamaguiConfig } from '@tamagui/core'\n\nimport { FAILED_EVAL } from '../constants'\nimport { evaluateAstNode } from './evaluateAstNode'\nimport { isValidThemeHook } from './extractHelpers'\n\nexport function createEvaluator({\n tamaguiConfig,\n staticNamespace,\n sourcePath,\n traversePath,\n shouldPrintDebug,\n}: {\n tamaguiConfig: TamaguiConfig\n staticNamespace: Record<string, any>\n sourcePath: string\n traversePath: NodePath<t.JSXElement>\n shouldPrintDebug: boolean\n}) {\n // called when evaluateAstNode encounters a dynamic-looking prop\n const evalFn = (n: t.Node) => {\n // themes\n if (\n t.isMemberExpression(n) &&\n t.isIdentifier(n.property) &&\n isValidThemeHook(traversePath, n, sourcePath)\n ) {\n const key = n.property.name\n if (shouldPrintDebug) {\n console.log(' > found theme prop', key)\n }\n console.log('SHOULD FIND THEME (NESTED NOW)', key) // tamaguiConfig.themes)\n // if (!themeKeys.has(key)) {\n // throw new Error(` > accessing non-existent theme key: ${key}`)\n // }\n return `var(--${key})`\n }\n // variable\n if (t.isIdentifier(n) && staticNamespace.hasOwnProperty(n.name)) {\n return staticNamespace[n.name]\n }\n const evalContext = vm.createContext(staticNamespace)\n const code = `(${generate(n as any).code})`\n // if (shouldPrintDebug) {\n // console.log('evaluating', { n, code, evalContext })\n // }\n return vm.runInContext(code, evalContext)\n }\n\n return (n: t.Node) => {\n return evaluateAstNode(n, evalFn)\n }\n}\n\nexport function createSafeEvaluator(attemptEval: (n: t.Node) => any) {\n return (n: t.Node) => {\n try {\n return attemptEval(n)\n } catch (err) {\n return FAILED_EVAL\n }\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAe;AAEf,uBAAqB;AAErB,QAAmB;AAGnB,uBAA4B;AAC5B,6BAAgC;AAChC,4BAAiC;AAE1B,yBAAyB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,GAOC;AAED,QAAM,SAAS,wBAAC,MAAc;AAE5B,QACE,EAAE,mBAAmB,MACrB,EAAE,aAAa,EAAE,aACjB,4CAAiB,cAAc,GAAG,aAClC;AACA,YAAM,MAAM,EAAE,SAAS;AACvB,UAAI,kBAAkB;AACpB,gBAAQ,IAAI,0BAA0B;AAAA;AAExC,cAAQ,IAAI,kCAAkC;AAI9C,aAAO,SAAS;AAAA;AAGlB,QAAI,EAAE,aAAa,MAAM,gBAAgB,eAAe,EAAE,OAAO;AAC/D,aAAO,gBAAgB,EAAE;AAAA;AAE3B,UAAM,cAAc,kBAAG,cAAc;AACrC,UAAM,OAAO,IAAI,8BAAS,GAAU;AAIpC,WAAO,kBAAG,aAAa,MAAM;AAAA,KA1BhB;AA6Bf,SAAO,CAAC,MAAc;AACpB,WAAO,4CAAgB,GAAG;AAAA;AAAA;AA5Cd;AAgDT,6BAA6B,aAAiC;AACnE,SAAO,CAAC,MAAc;AACpB,QAAI;AACF,aAAO,YAAY;AAAA,aACZ,KAAP;AACA,aAAO;AAAA;AAAA;AAAA;AALG;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -36,42 +36,45 @@ var __objRest = (source, exclude) => {
|
|
|
36
36
|
return target;
|
|
37
37
|
};
|
|
38
38
|
var __export = (target, all) => {
|
|
39
|
-
__markAsModule(target);
|
|
40
39
|
for (var name in all)
|
|
41
40
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
42
41
|
};
|
|
43
|
-
var __reExport = (target, module2, desc) => {
|
|
42
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
44
43
|
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
45
44
|
for (let key of __getOwnPropNames(module2))
|
|
46
|
-
if (!__hasOwnProp.call(target, key) && key !== "default")
|
|
45
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
47
46
|
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
48
47
|
}
|
|
49
48
|
return target;
|
|
50
49
|
};
|
|
51
|
-
var
|
|
52
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default",
|
|
50
|
+
var __toESM = (module2, isNodeMode) => {
|
|
51
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
53
52
|
};
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
54
|
+
return (module2, temp) => {
|
|
55
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
56
|
+
};
|
|
57
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
58
|
+
var createExtractor_exports = {};
|
|
59
|
+
__export(createExtractor_exports, {
|
|
56
60
|
createExtractor: () => createExtractor
|
|
57
61
|
});
|
|
58
|
-
var import_traverse =
|
|
59
|
-
var t =
|
|
60
|
-
var
|
|
61
|
-
var import_helpers =
|
|
62
|
-
var import_lodash =
|
|
63
|
-
var
|
|
64
|
-
var
|
|
65
|
-
var
|
|
66
|
-
var
|
|
67
|
-
var
|
|
68
|
-
var
|
|
69
|
-
var
|
|
70
|
-
var
|
|
71
|
-
var
|
|
72
|
-
var
|
|
73
|
-
|
|
74
|
-
const FAILED_EVAL = Symbol("failed_style_eval");
|
|
62
|
+
var import_traverse = __toESM(require("@babel/traverse"));
|
|
63
|
+
var t = __toESM(require("@babel/types"));
|
|
64
|
+
var import_core_node = require("@tamagui/core-node");
|
|
65
|
+
var import_helpers = require("@tamagui/helpers");
|
|
66
|
+
var import_lodash = require("lodash");
|
|
67
|
+
var import_constants = require("../constants");
|
|
68
|
+
var import_createEvaluator = require("./createEvaluator");
|
|
69
|
+
var import_evaluateAstNode = require("./evaluateAstNode");
|
|
70
|
+
var import_extractHelpers = require("./extractHelpers");
|
|
71
|
+
var import_findTopmostFunction = require("./findTopmostFunction");
|
|
72
|
+
var import_getStaticBindingsForScope = require("./getStaticBindingsForScope");
|
|
73
|
+
var import_literalToAst = require("./literalToAst");
|
|
74
|
+
var import_loadTamagui = require("./loadTamagui");
|
|
75
|
+
var import_logLines = require("./logLines");
|
|
76
|
+
var import_normalizeTernaries = require("./normalizeTernaries");
|
|
77
|
+
var import_removeUnusedHooks = require("./removeUnusedHooks");
|
|
75
78
|
const UNTOUCHED_PROPS = {
|
|
76
79
|
key: true,
|
|
77
80
|
style: true,
|
|
@@ -167,7 +170,7 @@ function createExtractor() {
|
|
|
167
170
|
return null;
|
|
168
171
|
}
|
|
169
172
|
let couldntParse = false;
|
|
170
|
-
const modifiedComponents = new Set();
|
|
173
|
+
const modifiedComponents = /* @__PURE__ */ new Set();
|
|
171
174
|
const bindingCache = {};
|
|
172
175
|
const callTraverse = /* @__PURE__ */ __name((a) => {
|
|
173
176
|
return fileOrPath.type === "File" ? (0, import_traverse.default)(fileOrPath, a) : fileOrPath.traverse(a);
|
|
@@ -245,7 +248,7 @@ function createExtractor() {
|
|
|
245
248
|
tagName = val.value;
|
|
246
249
|
});
|
|
247
250
|
const flatNode = getFlattenedNode({ isTextView, tag: tagName });
|
|
248
|
-
const deoptProps = new Set([
|
|
251
|
+
const deoptProps = /* @__PURE__ */ new Set([
|
|
249
252
|
...props.deoptProps ?? [],
|
|
250
253
|
...staticConfig.deoptProps ?? []
|
|
251
254
|
]);
|
|
@@ -348,9 +351,12 @@ function createExtractor() {
|
|
|
348
351
|
};
|
|
349
352
|
}
|
|
350
353
|
}).flat(4).filter(import_extractHelpers.isPresent);
|
|
354
|
+
if (shouldPrintDebug) {
|
|
355
|
+
console.log(" - attrs (before):\n", (0, import_logLines.logLines)(attrs.map(import_extractHelpers.attrStr).join(", ")));
|
|
356
|
+
}
|
|
351
357
|
function isStaticAttributeName(name) {
|
|
352
358
|
var _a3, _b2;
|
|
353
|
-
return !!(!!validStyles[name] || ((_a3 = staticConfig.validPropsExtra) == null ? void 0 : _a3[name]) || !!pseudos[name] || ((_b2 = staticConfig.variants) == null ? void 0 : _b2[name]) || tamaguiConfig.shorthands[name] || (name[0] === "$" ? !!mediaQueryConfig[name.slice(1)] : false));
|
|
359
|
+
return !!(!!validStyles[name] || ((_a3 = staticConfig.validPropsExtra) == null ? void 0 : _a3[name]) || !!import_core_node.pseudos[name] || ((_b2 = staticConfig.variants) == null ? void 0 : _b2[name]) || tamaguiConfig.shorthands[name] || (name[0] === "$" ? !!import_core_node.mediaQueryConfig[name.slice(1)] : false));
|
|
354
360
|
}
|
|
355
361
|
__name(isStaticAttributeName, "isStaticAttributeName");
|
|
356
362
|
function isExtractable(obj) {
|
|
@@ -465,7 +471,7 @@ function createExtractor() {
|
|
|
465
471
|
return attr;
|
|
466
472
|
}
|
|
467
473
|
const shortname = name.slice(1);
|
|
468
|
-
if (mediaQueryConfig[shortname]) {
|
|
474
|
+
if (import_core_node.mediaQueryConfig[shortname]) {
|
|
469
475
|
const expression = attribute.value.expression;
|
|
470
476
|
if (!t.isJSXEmptyExpression(expression)) {
|
|
471
477
|
const ternaries2 = createTernariesFromObjectProperties(t.stringLiteral(shortname), expression, {
|
|
@@ -531,7 +537,7 @@ function createExtractor() {
|
|
|
531
537
|
return attr;
|
|
532
538
|
}
|
|
533
539
|
}
|
|
534
|
-
if (styleValue !== FAILED_EVAL) {
|
|
540
|
+
if (styleValue !== import_constants.FAILED_EVAL) {
|
|
535
541
|
return {
|
|
536
542
|
type: "style",
|
|
537
543
|
value: { [name]: styleValue },
|
|
@@ -546,12 +552,12 @@ function createExtractor() {
|
|
|
546
552
|
if (shouldPrintDebug) {
|
|
547
553
|
console.log(` evalBinaryExpression lVal ${String(lVal)}, rVal ${String(rVal)}`);
|
|
548
554
|
}
|
|
549
|
-
if (lVal !== FAILED_EVAL && t.isConditionalExpression(right)) {
|
|
555
|
+
if (lVal !== import_constants.FAILED_EVAL && t.isConditionalExpression(right)) {
|
|
550
556
|
const ternary = addBinaryConditional(operator, left, right);
|
|
551
557
|
if (ternary)
|
|
552
558
|
return ternary;
|
|
553
559
|
}
|
|
554
|
-
if (rVal !== FAILED_EVAL && t.isConditionalExpression(left)) {
|
|
560
|
+
if (rVal !== import_constants.FAILED_EVAL && t.isConditionalExpression(left)) {
|
|
555
561
|
const ternary = addBinaryConditional(operator, right, left);
|
|
556
562
|
if (ternary)
|
|
557
563
|
return ternary;
|
|
@@ -648,9 +654,6 @@ function createExtractor() {
|
|
|
648
654
|
__name(getStaticLogical, "getStaticLogical");
|
|
649
655
|
}
|
|
650
656
|
__name(evaluateAttribute, "evaluateAttribute");
|
|
651
|
-
if (shouldPrintDebug) {
|
|
652
|
-
console.log(" - attrs (before):\n", (0, import_logLines.logLines)(attrs.map(import_extractHelpers.attrStr).join(", ")));
|
|
653
|
-
}
|
|
654
657
|
node.attributes = attrs.filter(isAttr).map((x) => x.value);
|
|
655
658
|
if (couldntParse) {
|
|
656
659
|
if (shouldPrintDebug) {
|
|
@@ -709,7 +712,7 @@ function createExtractor() {
|
|
|
709
712
|
}
|
|
710
713
|
const key = cur.value.name.name;
|
|
711
714
|
const value = attemptEvalSafe(cur.value.value || t.booleanLiteral(true));
|
|
712
|
-
if (value === FAILED_EVAL) {
|
|
715
|
+
if (value === import_constants.FAILED_EVAL) {
|
|
713
716
|
return acc;
|
|
714
717
|
}
|
|
715
718
|
acc[key] = value;
|
|
@@ -747,10 +750,10 @@ function createExtractor() {
|
|
|
747
750
|
attrs = attrs.reduce((acc, cur) => {
|
|
748
751
|
if (cur.type !== "attr" || !t.isJSXAttribute(cur.value) || typeof cur.value.name.name !== "string") {
|
|
749
752
|
if (cur.type === "style") {
|
|
750
|
-
|
|
751
|
-
if (!validStyles[key] && !pseudos[key]) {
|
|
753
|
+
let key = Object.keys(cur.value)[0];
|
|
754
|
+
if (!validStyles[key] && !import_core_node.pseudos[key]) {
|
|
752
755
|
if (shouldPrintDebug) {
|
|
753
|
-
console.log("
|
|
756
|
+
console.log(" - ignoring (expanded already):", key);
|
|
754
757
|
}
|
|
755
758
|
return acc;
|
|
756
759
|
}
|
|
@@ -786,7 +789,7 @@ function createExtractor() {
|
|
|
786
789
|
delete props2[key];
|
|
787
790
|
}
|
|
788
791
|
}
|
|
789
|
-
const out = postProcessStyles(props2, staticConfig, defaultTheme);
|
|
792
|
+
const out = (0, import_core_node.postProcessStyles)(props2, staticConfig, defaultTheme);
|
|
790
793
|
const next = (out == null ? void 0 : out.style) ?? props2;
|
|
791
794
|
if (shouldPrintDebug) {
|
|
792
795
|
console.log(" getStyles props >>\n", (0, import_logLines.logLines)((0, import_extractHelpers.objToStr)(props2)));
|
|
@@ -796,7 +799,7 @@ function createExtractor() {
|
|
|
796
799
|
}
|
|
797
800
|
if (staticConfig.validStyles) {
|
|
798
801
|
for (const key in next) {
|
|
799
|
-
if (!staticConfig.validStyles[key] && !pseudos[key]) {
|
|
802
|
+
if (!staticConfig.validStyles[key] && !import_core_node.pseudos[key]) {
|
|
800
803
|
delete next[key];
|
|
801
804
|
}
|
|
802
805
|
}
|
|
@@ -900,4 +903,5 @@ function createExtractor() {
|
|
|
900
903
|
};
|
|
901
904
|
}
|
|
902
905
|
__name(createExtractor, "createExtractor");
|
|
906
|
+
module.exports = __toCommonJS(createExtractor_exports);
|
|
903
907
|
//# sourceMappingURL=createExtractor.js.map
|