@lwc/style-compiler 2.45.1 → 2.45.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.cjs.js +910 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.js +906 -0
- package/dist/index.js.map +1 -0
- package/package.json +28 -20
- package/dist/commonjs/css-import/transform.js +0 -41
- package/dist/commonjs/css-import/transform.js.map +0 -1
- package/dist/commonjs/custom-properties/transform.js +0 -23
- package/dist/commonjs/custom-properties/transform.js.map +0 -1
- package/dist/commonjs/dir-pseudo-class/transform.js +0 -74
- package/dist/commonjs/dir-pseudo-class/transform.js.map +0 -1
- package/dist/commonjs/index.js +0 -24
- package/dist/commonjs/index.js.map +0 -1
- package/dist/commonjs/no-id-selectors/validate.js +0 -13
- package/dist/commonjs/no-id-selectors/validate.js.map +0 -1
- package/dist/commonjs/postcss-lwc-plugin.js +0 -64
- package/dist/commonjs/postcss-lwc-plugin.js.map +0 -1
- package/dist/commonjs/scope-at-rules/transform.js +0 -53
- package/dist/commonjs/scope-at-rules/transform.js.map +0 -1
- package/dist/commonjs/selector-scoping/transform.js +0 -123
- package/dist/commonjs/selector-scoping/transform.js.map +0 -1
- package/dist/commonjs/selector-scoping/validate.js +0 -50
- package/dist/commonjs/selector-scoping/validate.js.map +0 -1
- package/dist/commonjs/serialize.js +0 -430
- package/dist/commonjs/serialize.js.map +0 -1
- package/dist/commonjs/transform.js +0 -26
- package/dist/commonjs/transform.js.map +0 -1
- package/dist/commonjs/utils/dir-pseudoclass.js +0 -14
- package/dist/commonjs/utils/dir-pseudoclass.js.map +0 -1
- package/dist/commonjs/utils/message.js +0 -31
- package/dist/commonjs/utils/message.js.map +0 -1
- package/dist/commonjs/utils/rtl.js +0 -15
- package/dist/commonjs/utils/rtl.js.map +0 -1
- package/dist/commonjs/utils/selector-parser.js +0 -28
- package/dist/commonjs/utils/selector-parser.js.map +0 -1
- package/dist/commonjs/utils/selectors-scoping.js +0 -12
- package/dist/commonjs/utils/selectors-scoping.js.map +0 -1
- /package/dist/{types/css-import → css-import}/transform.d.ts +0 -0
- /package/dist/{types/custom-properties → custom-properties}/transform.d.ts +0 -0
- /package/dist/{types/dir-pseudo-class → dir-pseudo-class}/transform.d.ts +0 -0
- /package/dist/{types/index.d.ts → index.d.ts} +0 -0
- /package/dist/{types/no-id-selectors → no-id-selectors}/validate.d.ts +0 -0
- /package/dist/{types/postcss-lwc-plugin.d.ts → postcss-lwc-plugin.d.ts} +0 -0
- /package/dist/{types/scope-at-rules → scope-at-rules}/transform.d.ts +0 -0
- /package/dist/{types/selector-scoping → selector-scoping}/transform.d.ts +0 -0
- /package/dist/{types/selector-scoping → selector-scoping}/validate.d.ts +0 -0
- /package/dist/{types/serialize.d.ts → serialize.d.ts} +0 -0
- /package/dist/{types/transform.d.ts → transform.d.ts} +0 -0
- /package/dist/{types/utils → utils}/dir-pseudoclass.d.ts +0 -0
- /package/dist/{types/utils → utils}/message.d.ts +0 -0
- /package/dist/{types/utils → utils}/rtl.d.ts +0 -0
- /package/dist/{types/utils → utils}/selector-parser.d.ts +0 -0
- /package/dist/{types/utils → utils}/selectors-scoping.d.ts +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/utils/message.ts","../src/utils/selectors-scoping.ts","../src/utils/dir-pseudoclass.ts","../src/serialize.ts","../src/no-id-selectors/validate.ts","../src/css-import/transform.ts","../src/utils/rtl.ts","../src/utils/selector-parser.ts","../src/selector-scoping/validate.ts","../src/selector-scoping/transform.ts","../src/custom-properties/transform.ts","../src/dir-pseudo-class/transform.ts","../src/scope-at-rules/transform.ts","../src/postcss-lwc-plugin.ts","../src/transform.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":["process","valueParser","validateSelectors","parseValue","transformSelectorScoping","transformImport","transformCustomProperties","transformAtRules","postcssLwc"],"mappings":";;;;;;;;;AAkBA,MAAM,WAAW,GAAG,qBAAqB,CAAC;AAE1C,MAAM,WAAW,GAAG,QAAQ,CAAC;AAC7B,M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aAAa,GAAG,IAAI,CAAC;AACxC,gBAAA,WAAmB,CAAC,gBAAgB,GAAG,IAAI,CAAC;AAChD,aAAA;AACL,SAAC,CAAC,CAAC;AACP,KAAC,CAAC;AACN;;ACxEA;;;;;AAKG;AAkBG,SAAU,SAAS,CAAC,GAAW,EAAE,EAAU,EAAE,SAAiB,EAAE,EAAA;IAClE,IAAI,GAAG,KAAK,EAAE,EAAE;AACZ,QAAA,OAAO,EAAE,IAAI,EAAE,0BAA0B,EAAE,CAAC;AAC/C,KAAA;AAED,IAAA,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;IAC/B,MAAM,OAAO,GAAG,CAACC,gBAAU,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IAEzC,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAElE,OAAO,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;AAC/C;;;;;;;"}
|
package/package.json
CHANGED
@@ -1,8 +1,15 @@
|
|
1
1
|
{
|
2
|
+
"//": [
|
3
|
+
"THIS FILE IS AUTOGENERATED. If you modify it, it will be rewritten by check-and-rewrite-package-json.js",
|
4
|
+
"You can safely modify dependencies, devDependencies, keywords, etc., but other props will be overwritten."
|
5
|
+
],
|
2
6
|
"name": "@lwc/style-compiler",
|
3
|
-
"version": "2.45.
|
7
|
+
"version": "2.45.3",
|
4
8
|
"description": "Transform style sheet to be consumed by the LWC engine",
|
5
|
-
"
|
9
|
+
"keywords": [
|
10
|
+
"lwc"
|
11
|
+
],
|
12
|
+
"homepage": "https://lwc.dev",
|
6
13
|
"repository": {
|
7
14
|
"type": "git",
|
8
15
|
"url": "https://github.com/salesforce/lwc.git",
|
@@ -12,27 +19,18 @@
|
|
12
19
|
"url": "https://github.com/salesforce/lwc/issues"
|
13
20
|
},
|
14
21
|
"license": "MIT",
|
15
|
-
"
|
16
|
-
|
17
|
-
"scripts": {
|
18
|
-
"build": "tsc",
|
19
|
-
"dev": "tsc --watch --preserveWatchOutput --incremental"
|
22
|
+
"publishConfig": {
|
23
|
+
"access": "public"
|
20
24
|
},
|
25
|
+
"main": "dist/index.cjs.js",
|
26
|
+
"module": "dist/index.js",
|
27
|
+
"types": "dist/index.d.ts",
|
21
28
|
"files": [
|
22
|
-
"dist
|
29
|
+
"dist"
|
23
30
|
],
|
24
|
-
"
|
25
|
-
"
|
26
|
-
"
|
27
|
-
"postcss-selector-parser": "~6.0.11",
|
28
|
-
"postcss-value-parser": "~4.2.0",
|
29
|
-
"string.prototype.matchall": "^4.0.8"
|
30
|
-
},
|
31
|
-
"devDependencies": {
|
32
|
-
"@types/string.prototype.matchall": "^4.0.0"
|
33
|
-
},
|
34
|
-
"publishConfig": {
|
35
|
-
"access": "public"
|
31
|
+
"scripts": {
|
32
|
+
"build": "rollup --config ../../../scripts/rollup/rollup.config.js",
|
33
|
+
"dev": "rollup --config ../../../scripts/rollup/rollup.config.js --watch --no-watch.clearScreen"
|
36
34
|
},
|
37
35
|
"nx": {
|
38
36
|
"targets": {
|
@@ -42,5 +40,15 @@
|
|
42
40
|
]
|
43
41
|
}
|
44
42
|
}
|
43
|
+
},
|
44
|
+
"dependencies": {
|
45
|
+
"@lwc/shared": "2.45.3",
|
46
|
+
"postcss": "~8.4.23",
|
47
|
+
"postcss-selector-parser": "~6.0.13",
|
48
|
+
"postcss-value-parser": "~4.2.0",
|
49
|
+
"string.prototype.matchall": "^4.0.8"
|
50
|
+
},
|
51
|
+
"devDependencies": {
|
52
|
+
"@types/string.prototype.matchall": "^4.0.0"
|
45
53
|
}
|
46
54
|
}
|
@@ -1,41 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
const postcss_value_parser_1 = __importDefault(require("postcss-value-parser"));
|
7
|
-
const message_1 = require("../utils/message");
|
8
|
-
function process(root, result, isScoped) {
|
9
|
-
root.walkAtRules('import', (node) => {
|
10
|
-
if (isScoped) {
|
11
|
-
throw node.error(`Invalid import statement, imports are not allowed in *.scoped.css files.`);
|
12
|
-
}
|
13
|
-
// Ensure @import are at the top of the file
|
14
|
-
let prev = node.prev();
|
15
|
-
while (prev) {
|
16
|
-
if (prev.type === 'comment' || (prev.type === 'atrule' && prev.name === 'import')) {
|
17
|
-
prev = prev.prev();
|
18
|
-
}
|
19
|
-
else {
|
20
|
-
throw prev.error('@import must precede all other statements');
|
21
|
-
}
|
22
|
-
}
|
23
|
-
const { nodes: params } = (0, postcss_value_parser_1.default)(node.params);
|
24
|
-
// Ensure import match the following syntax:
|
25
|
-
// @import "foo";
|
26
|
-
// @import "./foo.css";
|
27
|
-
if (!params.length || params[0].type !== 'string' || !params[0].value) {
|
28
|
-
throw node.error(`Invalid import statement, unable to find imported module.`);
|
29
|
-
}
|
30
|
-
if (params.length > 1) {
|
31
|
-
throw node.error(`Invalid import statement, import statement only support a single parameter.`);
|
32
|
-
}
|
33
|
-
// Add the imported to results messages
|
34
|
-
const message = (0, message_1.importMessage)(params[0].value);
|
35
|
-
result.messages.push(message);
|
36
|
-
// Remove the import from the generated css
|
37
|
-
node.remove();
|
38
|
-
});
|
39
|
-
}
|
40
|
-
exports.default = process;
|
41
|
-
//# sourceMappingURL=transform.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"transform.js","sourceRoot":"","sources":["../../../src/css-import/transform.ts"],"names":[],"mappings":";;;;;AAOA,gFAA+C;AAE/C,8CAAiD;AAEjD,SAAwB,OAAO,CAAC,IAAU,EAAE,MAAc,EAAE,QAAiB;IACzE,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE;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Default = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
const postcss_value_parser_1 = __importDefault(require("postcss-value-parser"));
|
7
|
-
const message_1 = require("../utils/message");
|
8
|
-
function process(root, result) {
|
9
|
-
root.walkDecls((decl) => {
|
10
|
-
const valueRoot = (0, postcss_value_parser_1.default)(decl.value);
|
11
|
-
let varFound = false;
|
12
|
-
valueRoot.walk(({ type, value }) => {
|
13
|
-
if (!varFound && type === 'function' && value === 'var') {
|
14
|
-
// Add the imported to results messages
|
15
|
-
const message = (0, message_1.varFunctionMessage)(value);
|
16
|
-
result.messages.push(message);
|
17
|
-
varFound = true;
|
18
|
-
}
|
19
|
-
});
|
20
|
-
});
|
21
|
-
}
|
22
|
-
exports.default = process;
|
23
|
-
//# sourceMappingURL=transform.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"transform.js","sourceRoot":"","sources":["../../../src/custom-properties/transform.ts"],"names":[],"mappings":";;;;;AAOA,gFAA8C;AAC9C,8CAAsD;AAEtD,SAAwB,OAAO,CAAC,IAAU,EAAE,MAAc;IACtD,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE;QACpB,MAAM,SAAS,GAAG,IAAA,8BAAU,EAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;YAC/B,IAAI,CAAC,QAAQ,IAAI,IAAI,KAAK,UAAU,IAAI,KAAK,KAAK,KAAK,EAAE;gBACrD,uCAAuC;gBACvC,MAAM,OAAO,GAAG,IAAA,4BAAkB,EAAC,KAAK,CAAC,CAAC;gBAC1C,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gBAC9B,QAAQ,GAAG,IAAI,CAAC;aACnB;QACL,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC;AAbD,0BAaC"}
|
@@ -1,74 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
/*
|
4
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
5
|
-
* All rights reserved.
|
6
|
-
* SPDX-License-Identifier: MIT
|
7
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
8
|
-
*/
|
9
|
-
const postcss_selector_parser_1 = require("postcss-selector-parser");
|
10
|
-
const rtl_1 = require("../utils/rtl");
|
11
|
-
const dir_pseudoclass_1 = require("../utils/dir-pseudoclass");
|
12
|
-
function isValidDirValue(value) {
|
13
|
-
return value === 'ltr' || value === 'rtl';
|
14
|
-
}
|
15
|
-
function default_1(root) {
|
16
|
-
root.nodes.forEach((selector) => {
|
17
|
-
selector.nodes.forEach((node) => {
|
18
|
-
if (!(0, rtl_1.isDirPseudoClass)(node)) {
|
19
|
-
return;
|
20
|
-
}
|
21
|
-
const value = node.nodes.toString().trim();
|
22
|
-
if (!isValidDirValue(value)) {
|
23
|
-
throw root.error(`:dir() pseudo class expects "ltr" or "rtl" for value, but received "${value}".`, {
|
24
|
-
index: node.sourceIndex,
|
25
|
-
word: node.value,
|
26
|
-
});
|
27
|
-
}
|
28
|
-
// Set placeholders for `:dir()` so we can keep it for native shadow and
|
29
|
-
// replace it with a polyfill for synthetic shadow.
|
30
|
-
//
|
31
|
-
// Native: `:dir(ltr)`
|
32
|
-
// Synthetic: `[dir="ltr"]`
|
33
|
-
//
|
34
|
-
// The placeholders look like this: `[__dirAttributeNativeLtr__]`
|
35
|
-
// The attribute has no value because it's simpler during serialization, and there
|
36
|
-
// are only two valid values: "ltr" and "rtl".
|
37
|
-
//
|
38
|
-
// Now consider a more complex selector: `.foo:dir(ltr):not(.bar)`.
|
39
|
-
// For native shadow, we need to leave it as-is. Whereas for synthetic shadow, we need
|
40
|
-
// to convert it to: `[dir="ltr"] .foo:not(.bar)`.
|
41
|
-
// I.e. we need to use a descendant selector (' ' combinator) relying on a `dir`
|
42
|
-
// attribute added to the host element. So we need two placeholders:
|
43
|
-
// `<synthetic_placeholder> .foo<native_placeholder>:not(.bar)`
|
44
|
-
const nativeAttribute = (0, postcss_selector_parser_1.attribute)({
|
45
|
-
attribute: value === 'ltr' ? dir_pseudoclass_1.DIR_ATTRIBUTE_NATIVE_LTR : dir_pseudoclass_1.DIR_ATTRIBUTE_NATIVE_RTL,
|
46
|
-
value: undefined,
|
47
|
-
raws: {},
|
48
|
-
});
|
49
|
-
const syntheticAttribute = (0, postcss_selector_parser_1.attribute)({
|
50
|
-
attribute: value === 'ltr' ? dir_pseudoclass_1.DIR_ATTRIBUTE_SYNTHETIC_LTR : dir_pseudoclass_1.DIR_ATTRIBUTE_SYNTHETIC_RTL,
|
51
|
-
value: undefined,
|
52
|
-
raws: {},
|
53
|
-
});
|
54
|
-
node.replaceWith(nativeAttribute);
|
55
|
-
// If the selector is not empty and if the first node in the selector is not already a
|
56
|
-
// " " combinator, we need to use the descendant selector format
|
57
|
-
const shouldAddDescendantCombinator = selector.first && !(0, postcss_selector_parser_1.isCombinator)(selector.first) && selector.first.value !== ' ';
|
58
|
-
if (shouldAddDescendantCombinator) {
|
59
|
-
selector.insertBefore(selector.first, (0, postcss_selector_parser_1.combinator)({
|
60
|
-
value: ' ',
|
61
|
-
}));
|
62
|
-
// Add the [dir] attribute in front of the " " combinator, i.e. as an ancestor
|
63
|
-
selector.insertBefore(selector.first, syntheticAttribute);
|
64
|
-
}
|
65
|
-
else {
|
66
|
-
// Otherwise there's no need for the descendant selector, so we can skip adding the
|
67
|
-
// space combinator and just put the synthetic placeholder next to the native one
|
68
|
-
selector.insertBefore(nativeAttribute, syntheticAttribute);
|
69
|
-
}
|
70
|
-
});
|
71
|
-
});
|
72
|
-
}
|
73
|
-
exports.default = default_1;
|
74
|
-
//# sourceMappingURL=transform.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"transform.js","sourceRoot":"","sources":["../../../src/dir-pseudo-class/transform.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,qEAAoF;AACpF,sCAAgD;AAChD,8DAKkC;AAElC,SAAS,eAAe,CAAC,KAAa;IAClC,OAAO,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,KAAK,CAAC;AAC9C,CAAC;AAED,mBAAyB,IAAU;IAC/B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;QAC5B,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YAC5B,IAAI,CAAC,IAAA,sBAAgB,EAAC,IAAI,CAAC,EAAE;gBACzB,OAAO;aACV;YAED,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC;YAC3C,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE;gBACzB,MAAM,IAAI,CAAC,KAAK,CACZ,uEAAuE,KAAK,IAAI,EAChF;oBACI,KAAK,EAAE,IAAI,CAAC,WAAW;oBACvB,IAAI,EAAE,IAAI,CAAC,KAAK;iBACnB,CACJ,CAAC;aACL;YAED,wEAAwE;YACxE,mDAAmD;YACnD,EAAE;YACF,yBAAyB;YACzB,2BAA2B;YAC3B,EAAE;YACF,iEAAiE;YACjE,kFAAkF;YAClF,8CAA8C;YAC9C,EAAE;YACF,mEAAmE;YACnE,sFAAsF;YACtF,kDAAkD;YAClD,gFAAgF;YAChF,oEAAoE;YACpE,+DAA+D;YAE/D,MAAM,eAAe,GAAG,IAAA,mCAAS,EAAC;gBAC9B,SAAS,EAAE,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC,0CAAwB,CAAC,CAAC,CAAC,0CAAwB;gBAChF,KAAK,EAAE,SAAS;gBAChB,IAAI,EAAE,EAAE;aACX,CAAC,CAAC;YAEH,MAAM,kBAAkB,GAAG,IAAA,mCAAS,EAAC;gBACjC,SAAS,EACL,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC,6CAA2B,CAAC,CAAC,CAAC,6CAA2B;gBAC/E,KAAK,EAAE,SAAS;gBAChB,IAAI,EAAE,EAAE;aACX,CAAC,CAAC;YAEH,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;YAElC,sFAAsF;YACtF,gEAAgE;YAChE,MAAM,6BAA6B,GAC/B,QAAQ,CAAC,KAAK,IAAI,CAAC,IAAA,sCAAY,EAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,KAAK,KAAK,GAAG,CAAC;YACpF,IAAI,6BAA6B,EAAE;gBAC/B,QAAQ,CAAC,YAAY,CACjB,QAAQ,CAAC,KAAK,EACd,IAAA,oCAAU,EAAC;oBACP,KAAK,EAAE,GAAG;iBACb,CAAC,CACL,CAAC;gBACF,8EAA8E;gBAC9E,QAAQ,CAAC,YAAY,CAAC,QAAQ,CAAC,KAAK,EAAE,kBAAkB,CAAC,CAAC;aAC7D;iBAAM;gBACH,mFAAmF;gBACnF,iFAAiF;gBACjF,QAAQ,CAAC,YAAY,CAAC,eAAe,EAAE,kBAAkB,CAAC,CAAC;aAC9D;QACL,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC;AAtED,4BAsEC"}
|
package/dist/commonjs/index.js
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
-
};
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
-
/*
|
18
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
19
|
-
* All rights reserved.
|
20
|
-
* SPDX-License-Identifier: MIT
|
21
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
22
|
-
*/
|
23
|
-
__exportStar(require("./transform"), exports);
|
24
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;GAKG;AACH,8CAA4B"}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
function default_1(root) {
|
4
|
-
root.walkIds((node) => {
|
5
|
-
const message = `Invalid usage of id selector '#${node.value}'. Try using a class selector or some other selector.`;
|
6
|
-
throw root.error(message, {
|
7
|
-
index: node.sourceIndex,
|
8
|
-
word: node.value,
|
9
|
-
});
|
10
|
-
});
|
11
|
-
}
|
12
|
-
exports.default = default_1;
|
13
|
-
//# sourceMappingURL=validate.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../src/no-id-selectors/validate.ts"],"names":[],"mappings":";;AAQA,mBAAyB,IAAU;IAC/B,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAClB,MAAM,OAAO,GAAG,kCAAkC,IAAI,CAAC,KAAK,uDAAuD,CAAC;QACpH,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;YACtB,KAAK,EAAE,IAAI,CAAC,WAAW;YACvB,IAAI,EAAE,IAAI,CAAC,KAAK;SACnB,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC;AARD,4BAQC"}
|
@@ -1,64 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
const postcss_selector_parser_1 = __importDefault(require("postcss-selector-parser"));
|
7
|
-
const validate_1 = __importDefault(require("./no-id-selectors/validate"));
|
8
|
-
const transform_1 = __importDefault(require("./css-import/transform"));
|
9
|
-
const transform_2 = __importDefault(require("./selector-scoping/transform"));
|
10
|
-
const transform_3 = __importDefault(require("./custom-properties/transform"));
|
11
|
-
const transform_4 = __importDefault(require("./dir-pseudo-class/transform"));
|
12
|
-
const transform_5 = __importDefault(require("./scope-at-rules/transform"));
|
13
|
-
function shouldTransformSelector(rule) {
|
14
|
-
var _a;
|
15
|
-
// @keyframe at-rules are special, rules inside are not standard selectors and should not be
|
16
|
-
// scoped like any other rules.
|
17
|
-
return ((_a = rule.parent) === null || _a === void 0 ? void 0 : _a.type) !== 'atrule' || rule.parent.name !== 'keyframes';
|
18
|
-
}
|
19
|
-
function selectorProcessorFactory(transformConfig) {
|
20
|
-
return (0, postcss_selector_parser_1.default)((root) => {
|
21
|
-
(0, validate_1.default)(root);
|
22
|
-
(0, transform_2.default)(root, transformConfig);
|
23
|
-
(0, transform_4.default)(root);
|
24
|
-
});
|
25
|
-
}
|
26
|
-
function postCssLwcPlugin(options) {
|
27
|
-
// We need 2 types of selectors processors, since transforming the :host selector make the selector
|
28
|
-
// unusable when used in the context of the native shadow and vice-versa.
|
29
|
-
// This distinction also applies to light DOM in scoped (synthetic-like) vs unscoped (native-like) mode.
|
30
|
-
const nativeShadowSelectorProcessor = selectorProcessorFactory({
|
31
|
-
transformHost: false,
|
32
|
-
});
|
33
|
-
const syntheticShadowSelectorProcessor = selectorProcessorFactory({
|
34
|
-
transformHost: true,
|
35
|
-
});
|
36
|
-
return (root, result) => {
|
37
|
-
(0, transform_1.default)(root, result, options.scoped);
|
38
|
-
(0, transform_3.default)(root, result);
|
39
|
-
(0, transform_5.default)(root);
|
40
|
-
root.walkRules((rule) => {
|
41
|
-
if (!shouldTransformSelector(rule)) {
|
42
|
-
return;
|
43
|
-
}
|
44
|
-
// Let transform the selector with the 2 processors.
|
45
|
-
const syntheticSelector = syntheticShadowSelectorProcessor.processSync(rule);
|
46
|
-
const nativeSelector = nativeShadowSelectorProcessor.processSync(rule);
|
47
|
-
rule.selector = syntheticSelector;
|
48
|
-
// If the resulting selector are different it means that the selector use the :host selector. In
|
49
|
-
// this case we need to duplicate the CSS rule and assign the other selector.
|
50
|
-
if (syntheticSelector !== nativeSelector) {
|
51
|
-
// The cloned selector is inserted before the currently processed selector to avoid processing
|
52
|
-
// again the cloned selector.
|
53
|
-
const currentRule = rule;
|
54
|
-
const clonedRule = rule.cloneBefore();
|
55
|
-
clonedRule.selector = nativeSelector;
|
56
|
-
// Safe a reference to each other
|
57
|
-
clonedRule._isNativeHost = true;
|
58
|
-
currentRule._isSyntheticHost = true;
|
59
|
-
}
|
60
|
-
});
|
61
|
-
};
|
62
|
-
}
|
63
|
-
exports.default = postCssLwcPlugin;
|
64
|
-
//# sourceMappingURL=postcss-lwc-plugin.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"postcss-lwc-plugin.js","sourceRoot":"","sources":["../../src/postcss-lwc-plugin.ts"],"names":[],"mappings":";;;;;AAOA,sFAAsD;AAEtD,0EAA6D;AAE7D,uEAAqD;AACrD,6EAA+F;AAC/F,8EAAsE;AACtE,6EAAmE;AACnE,2EAA0D;AAE1D,SAAS,uBAAuB,CAAC,IAAU;;IACvC,4FAA4F;IAC5F,+BAA+B;IAC/B,OAAO,CAAA,MAAA,I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AAK,cAAc,EAAE;gBACtC,8FAA8F;gBAC9F,6BAA6B;gBAC7B,MAAM,WAAW,GAAG,IAAI,CAAC;gBACzB,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;gBACtC,UAAU,CAAC,QAAQ,GAAG,cAAc,CAAC;gBAErC,iCAAiC;gBAChC,UAAkB,CAAC,aAAa,GAAG,IAAI,CAAC;gBACxC,WAAmB,CAAC,gBAAgB,GAAG,IAAI,CAAC;aAChD;QACL,CAAC,CAAC,CAAC;IACP,CAAC,CAAC;AACN,CAAC;AAxCD,mCAwCC"}
|
@@ -1,53 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const selectors_scoping_1 = require("../utils/selectors-scoping");
|
4
|
-
// Subset of prefixes for animation-related names that we expect people might be using.
|
5
|
-
// The most important is -webkit, which is actually part of the spec now. All -webkit prefixes
|
6
|
-
// are listed here: https://developer.mozilla.org/en-US/docs/Web/CSS/Webkit_Extensions
|
7
|
-
// -moz is also still supported as of Firefox 95.
|
8
|
-
// We could probably get away with just doing -webkit and -moz (since -ms never seems
|
9
|
-
// to have existed for keyframes/animations, and Opera has used Blink since 2013), but
|
10
|
-
// covering all the popular ones will at least make the compiled code more consistent
|
11
|
-
// for developers who are using all the variants.
|
12
|
-
// List based on a subset from https://github.com/wooorm/vendors/blob/2f489ad/index.js
|
13
|
-
const VENDOR_PREFIXES = ['moz', 'ms', 'o', 'webkit'];
|
14
|
-
// create a list like ['animation', '-webkit-animation', ...]
|
15
|
-
function getAllNames(name) {
|
16
|
-
return new Set([name, ...VENDOR_PREFIXES.map((prefix) => `-${prefix}-${name}`)]);
|
17
|
-
}
|
18
|
-
const ANIMATION = getAllNames('animation');
|
19
|
-
const ANIMATION_NAME = getAllNames('animation-name');
|
20
|
-
function process(root) {
|
21
|
-
const knownNames = new Set();
|
22
|
-
root.walkAtRules((atRule) => {
|
23
|
-
// Note that @-webkit-keyframes, @-moz-keyframes, etc. are not actually a thing supported
|
24
|
-
// in any browser, even though you'll see it on some StackOverflow answers.
|
25
|
-
if (atRule.name === 'keyframes') {
|
26
|
-
const { params } = atRule;
|
27
|
-
knownNames.add(params);
|
28
|
-
atRule.params = `${params}-${selectors_scoping_1.SHADOW_ATTRIBUTE}`;
|
29
|
-
}
|
30
|
-
});
|
31
|
-
root.walkRules((rule) => {
|
32
|
-
rule.walkDecls((decl) => {
|
33
|
-
if (ANIMATION.has(decl.prop)) {
|
34
|
-
// Use a simple heuristic of breaking up the tokens by whitespace. We could use
|
35
|
-
// a dedicated animation prop parser (e.g.
|
36
|
-
// https://github.com/hookhookun/parse-animation-shorthand) but it's
|
37
|
-
// probably overkill.
|
38
|
-
const tokens = decl.value
|
39
|
-
.trim()
|
40
|
-
.split(/\s+/g)
|
41
|
-
.map((token) => knownNames.has(token) ? `${token}-${selectors_scoping_1.SHADOW_ATTRIBUTE}` : token);
|
42
|
-
decl.value = tokens.join(' ');
|
43
|
-
}
|
44
|
-
else if (ANIMATION_NAME.has(decl.prop)) {
|
45
|
-
if (knownNames.has(decl.value)) {
|
46
|
-
decl.value = `${decl.value}-${selectors_scoping_1.SHADOW_ATTRIBUTE}`;
|
47
|
-
}
|
48
|
-
}
|
49
|
-
});
|
50
|
-
});
|
51
|
-
}
|
52
|
-
exports.default = process;
|
53
|
-
//# sourceMappingURL=transform.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"transform.js","sourceRoot":"","sources":["../../../src/scope-at-rules/transform.ts"],"names":[],"mappings":";;AAOA,kEAA8D;AAE9D,uFAAuF;AACvF,8FAA8F;AAC9F,sFAAsF;AACtF,iDAAiD;AACjD,qFAAqF;AACrF,sFAAsF;AACtF,qFAAqF;AACrF,iDAAiD;AACjD,sFAAsF;AACtF,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC;AAErD,6DAA6D;AAC7D,SAAS,WAAW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AK,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;aACjC;iBAAM,IAAI,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;gBACtC,IAAI,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;oBAC5B,IAAI,CAAC,KAAK,GAAG,GAAG,IAAI,CAAC,KAAK,IAAI,oCAAgB,EAAE,CAAC;iBACpD;aACJ;QACL,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC;AAhCD,0BAgCC"}
|
@@ -1,123 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
/*
|
7
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
8
|
-
* All rights reserved.
|
9
|
-
* SPDX-License-Identifier: MIT
|
10
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
11
|
-
*/
|
12
|
-
const postcss_selector_parser_1 = require("postcss-selector-parser");
|
13
|
-
const rtl_1 = require("../utils/rtl");
|
14
|
-
const selectors_scoping_1 = require("../utils/selectors-scoping");
|
15
|
-
const selector_parser_1 = require("../utils/selector-parser");
|
16
|
-
const validate_1 = __importDefault(require("./validate"));
|
17
|
-
function isHostPseudoClass(node) {
|
18
|
-
return (0, postcss_selector_parser_1.isPseudoClass)(node) && node.value === ':host';
|
19
|
-
}
|
20
|
-
/**
|
21
|
-
* Add scoping attributes to all the matching selectors:
|
22
|
-
* h1 -> h1[x-foo_tmpl]
|
23
|
-
* p a -> p[x-foo_tmpl] a[x-foo_tmpl]
|
24
|
-
*/
|
25
|
-
function scopeSelector(selector) {
|
26
|
-
const compoundSelectors = [[]];
|
27
|
-
// Split the selector per compound selector. Compound selectors are interleaved with combinator nodes.
|
28
|
-
// https://drafts.csswg.org/selectors-4/#typedef-complex-selector
|
29
|
-
selector.each((node) => {
|
30
|
-
if ((0, postcss_selector_parser_1.isCombinator)(node)) {
|
31
|
-
compoundSelectors.push([]);
|
32
|
-
}
|
33
|
-
else {
|
34
|
-
const current = compoundSelectors[compoundSelectors.length - 1];
|
35
|
-
current.push(node);
|
36
|
-
}
|
37
|
-
});
|
38
|
-
for (const compoundSelector of compoundSelectors) {
|
39
|
-
// Compound selectors with only a single :dir pseudo class should be scoped, the dir pseudo
|
40
|
-
// class transform will take care of transforming it properly.
|
41
|
-
const containsSingleDirSelector = compoundSelector.length === 1 && (0, rtl_1.isDirPseudoClass)(compoundSelector[0]);
|
42
|
-
// Compound selectors containing :host have a special treatment and should not be scoped
|
43
|
-
// like the rest of the complex selectors.
|
44
|
-
const containsHost = compoundSelector.some(isHostPseudoClass);
|
45
|
-
if (!containsSingleDirSelector && !containsHost) {
|
46
|
-
let nodeToScope;
|
47
|
-
// In each compound selector we need to locate the last selector to scope.
|
48
|
-
for (const node of compoundSelector) {
|
49
|
-
if (!(0, postcss_selector_parser_1.isPseudoElement)(node)) {
|
50
|
-
nodeToScope = node;
|
51
|
-
}
|
52
|
-
}
|
53
|
-
const shadowAttribute = (0, postcss_selector_parser_1.attribute)({
|
54
|
-
attribute: selectors_scoping_1.SHADOW_ATTRIBUTE,
|
55
|
-
value: undefined,
|
56
|
-
raws: {},
|
57
|
-
});
|
58
|
-
if (nodeToScope) {
|
59
|
-
// Add the scoping attribute right after the node scope
|
60
|
-
selector.insertAfter(nodeToScope, shadowAttribute);
|
61
|
-
}
|
62
|
-
else {
|
63
|
-
// Add the scoping token in the first position of the compound selector as a fallback
|
64
|
-
// when there is no node to scope. For example: ::after {}
|
65
|
-
const [firstSelector] = compoundSelector;
|
66
|
-
selector.insertBefore(firstSelector, shadowAttribute);
|
67
|
-
// Move any whitespace before the selector (e.g. " ::after") to before the shadow attribute,
|
68
|
-
// so that the resulting selector is correct (e.g. " [attr]::after", not "[attr] ::after")
|
69
|
-
if (firstSelector && firstSelector.spaces.before) {
|
70
|
-
shadowAttribute.spaces.before = firstSelector.spaces.before;
|
71
|
-
const clonedFirstSelector = firstSelector.clone({});
|
72
|
-
clonedFirstSelector.spaces.before = '';
|
73
|
-
firstSelector.replaceWith(clonedFirstSelector);
|
74
|
-
}
|
75
|
-
}
|
76
|
-
}
|
77
|
-
}
|
78
|
-
}
|
79
|
-
/**
|
80
|
-
* Mark the :host selector with a placeholder. If the selector has a list of
|
81
|
-
* contextual selector it will generate a rule for each of them.
|
82
|
-
* :host -> [x-foo_tmpl-host]
|
83
|
-
* :host(.foo, .bar) -> [x-foo_tmpl-host].foo, [x-foo_tmpl-host].bar
|
84
|
-
*/
|
85
|
-
function transformHost(selector) {
|
86
|
-
// Locate the first :host pseudo-class
|
87
|
-
const hostNode = (0, selector_parser_1.findNode)(selector, isHostPseudoClass);
|
88
|
-
if (hostNode) {
|
89
|
-
// Store the original location of the :host in the selector
|
90
|
-
const hostIndex = selector.index(hostNode);
|
91
|
-
// Swap the :host pseudo-class with the host scoping token
|
92
|
-
const hostAttribute = (0, postcss_selector_parser_1.attribute)({
|
93
|
-
attribute: selectors_scoping_1.HOST_ATTRIBUTE,
|
94
|
-
value: undefined,
|
95
|
-
raws: {},
|
96
|
-
});
|
97
|
-
hostNode.replaceWith(hostAttribute);
|
98
|
-
// Generate a unique contextualized version of the selector for each selector pass as argument
|
99
|
-
// to the :host
|
100
|
-
const contextualSelectors = hostNode.nodes.map((contextSelectors) => {
|
101
|
-
const clonedSelector = selector.clone({});
|
102
|
-
const clonedHostNode = clonedSelector.at(hostIndex);
|
103
|
-
// Add to the compound selector previously containing the :host pseudo class
|
104
|
-
// the contextual selectors.
|
105
|
-
contextSelectors.each((node) => {
|
106
|
-
(0, selector_parser_1.trimNodeWhitespaces)(node);
|
107
|
-
clonedSelector.insertAfter(clonedHostNode, node);
|
108
|
-
});
|
109
|
-
return clonedSelector;
|
110
|
-
});
|
111
|
-
// Replace the current selector with the different variants
|
112
|
-
(0, selector_parser_1.replaceNodeWith)(selector, ...contextualSelectors);
|
113
|
-
}
|
114
|
-
}
|
115
|
-
function transformSelector(root, transformConfig) {
|
116
|
-
(0, validate_1.default)(root);
|
117
|
-
root.each(scopeSelector);
|
118
|
-
if (transformConfig.transformHost) {
|
119
|
-
root.each(transformHost);
|
120
|
-
}
|
121
|
-
}
|
122
|
-
exports.default = transformSelector;
|
123
|
-
//# sourceMappingURL=transform.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"transform.js","sourceRoot":"","sources":["../../../src/selector-scoping/transform.ts"],"names":[],"mappings":";;;;;AAAA;;;;;GAKG;AACH,qEAUiC;AAEjC,sCAAgD;AAChD,kEAA8E;AAC9E,8DAA0F;AAE1F,0DAA2C;AAS3C,SAAS,iBAAiB,CAAC,IAAU;IACjC,OAAO,IAAA,uCAAa,EAAC,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,KAAK,OAAO,CAAC;AACzD,CAAC;AAED;;;;GAIG;AACH,SAAS,aAAa,CAAC,QAAkB;IACrC,MAAM,iBAAiB,GAAkB,CAAC,EAAE,CAAC,CAAC;IAE9C,sGAAsG;IACtG,iEAAiE;IACjE,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;QACnB,IAAI,IAAA,sCAAY,EAAC,IAAI,CAAC,EAAE;YACpB,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;SAC9B;aAAM;YACH,MAAM,OAAO,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;YAChE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACtB;IACL,CAAC,CAAC,CAAC;IAEH,KAAK,MAAM,gBAAgB,IAAI,iBAAiB,EAAE;QAC9C,2FAA2F;QAC3F,8DAA8D;QAC9D,MAAM,yBAAyB,GAC3B,gBAAgB,CAAC,MAAM,KAAK,CAAC,IAAI,IAAA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