@lwc/style-compiler 2.5.9 → 2.5.10-alpha1
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/commonjs/css-import/transform.js +2 -2
- package/dist/commonjs/css-import/transform.js.map +1 -1
- package/dist/commonjs/custom-properties/transform.js +2 -2
- package/dist/commonjs/custom-properties/transform.js.map +1 -1
- package/dist/commonjs/dir-pseudo-class/transform.js +16 -40
- package/dist/commonjs/dir-pseudo-class/transform.js.map +1 -1
- package/dist/commonjs/postcss-lwc-plugin.js +7 -7
- package/dist/commonjs/postcss-lwc-plugin.js.map +1 -1
- package/dist/commonjs/postcss-minify-plugins.js +35 -0
- package/dist/commonjs/postcss-minify-plugins.js.map +1 -0
- package/dist/commonjs/selector-scoping/transform.js +10 -10
- package/dist/commonjs/selector-scoping/transform.js.map +1 -1
- package/dist/commonjs/serialize.js +9 -37
- package/dist/commonjs/serialize.js.map +1 -1
- package/dist/commonjs/transform.js +3 -3
- package/dist/commonjs/transform.js.map +1 -1
- package/dist/commonjs/utils/rtl.js +1 -1
- package/dist/commonjs/utils/rtl.js.map +1 -1
- package/dist/types/postcss-minify-plugins.d.ts +10 -0
- package/package.json +4 -4
- package/dist/commonjs/utils/dir-pseudoclass.js +0 -14
- package/dist/commonjs/utils/dir-pseudoclass.js.map +0 -1
- package/dist/types/utils/dir-pseudoclass.d.ts +0 -4
|
@@ -20,7 +20,7 @@ function process(root, result, isScoped) {
|
|
|
20
20
|
throw prev.error('@import must precede all other statements');
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
const { nodes: params } =
|
|
23
|
+
const { nodes: params } = postcss_value_parser_1.default(node.params);
|
|
24
24
|
// Ensure import match the following syntax:
|
|
25
25
|
// @import "foo";
|
|
26
26
|
// @import "./foo.css";
|
|
@@ -31,7 +31,7 @@ function process(root, result, isScoped) {
|
|
|
31
31
|
throw node.error(`Invalid import statement, import statement only support a single parameter.`);
|
|
32
32
|
}
|
|
33
33
|
// Add the imported to results messages
|
|
34
|
-
const message =
|
|
34
|
+
const message = message_1.importMessage(params[0].value);
|
|
35
35
|
result.messages.push(message);
|
|
36
36
|
// Remove the import from the generated css
|
|
37
37
|
node.remove();
|
|
@@ -1 +1 @@
|
|
|
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;QAChC,IAAI,QAAQ,EAAE;YACV,MAAM,IAAI,CAAC,KAAK,CACZ,0EAA0E,CAC7E,CAAC;SACL;QACD,4CAA4C;QAC5C,IAAI,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QACvB,OAAO,IAAI,EAAE;YACT,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,EAAE;gBAC/E,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;aACtB;iBAAM;gBACH,MAAM,IAAI,CAAC,KAAK,CAAC,2CAA2C,CAAC,CAAC;aACjE;SACJ;QAED,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,
|
|
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;QAChC,IAAI,QAAQ,EAAE;YACV,MAAM,IAAI,CAAC,KAAK,CACZ,0EAA0E,CAC7E,CAAC;SACL;QACD,4CAA4C;QAC5C,IAAI,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QACvB,OAAO,IAAI,EAAE;YACT,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,EAAE;gBAC/E,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;aACtB;iBAAM;gBACH,MAAM,IAAI,CAAC,KAAK,CAAC,2CAA2C,CAAC,CAAC;aACjE;SACJ;QAED,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,8BAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAEnD,4CAA4C;QAC5C,qBAAqB;QACrB,2BAA2B;QAC3B,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE;YACnE,MAAM,IAAI,CAAC,KAAK,CAAC,2DAA2D,CAAC,CAAC;SACjF;QAED,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;YACnB,MAAM,IAAI,CAAC,KAAK,CACZ,6EAA6E,CAChF,CAAC;SACL;QAED,uCAAuC;QACvC,MAAM,OAAO,GAAG,uBAAa,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QAC/C,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAE9B,2CAA2C;QAC3C,IAAI,CAAC,MAAM,EAAE,CAAC;IAClB,CAAC,CAAC,CAAC;AACP,CAAC;AAvCD,0BAuCC"}
|
|
@@ -7,12 +7,12 @@ const postcss_value_parser_1 = __importDefault(require("postcss-value-parser"));
|
|
|
7
7
|
const message_1 = require("../utils/message");
|
|
8
8
|
function process(root, result) {
|
|
9
9
|
root.walkDecls((decl) => {
|
|
10
|
-
const valueRoot =
|
|
10
|
+
const valueRoot = postcss_value_parser_1.default(decl.value);
|
|
11
11
|
let varFound = false;
|
|
12
12
|
valueRoot.walk(({ type, value }) => {
|
|
13
13
|
if (!varFound && type === 'function' && value === 'var') {
|
|
14
14
|
// Add the imported to results messages
|
|
15
|
-
const message =
|
|
15
|
+
const message = message_1.varFunctionMessage(value);
|
|
16
16
|
result.messages.push(message);
|
|
17
17
|
varFound = true;
|
|
18
18
|
}
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,8BAAU,CAAC,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,4BAAkB,CAAC,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"}
|
|
@@ -8,14 +8,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
8
8
|
*/
|
|
9
9
|
const postcss_selector_parser_1 = require("postcss-selector-parser");
|
|
10
10
|
const rtl_1 = require("../utils/rtl");
|
|
11
|
-
const dir_pseudoclass_1 = require("../utils/dir-pseudoclass");
|
|
12
11
|
function isValidDirValue(value) {
|
|
13
12
|
return value === 'ltr' || value === 'rtl';
|
|
14
13
|
}
|
|
15
14
|
function default_1(root) {
|
|
16
15
|
root.nodes.forEach((selector) => {
|
|
17
16
|
selector.nodes.forEach((node) => {
|
|
18
|
-
if (!
|
|
17
|
+
if (!rtl_1.isDirPseudoClass(node)) {
|
|
19
18
|
return;
|
|
20
19
|
}
|
|
21
20
|
const value = node.nodes.toString().trim();
|
|
@@ -25,48 +24,25 @@ function default_1(root) {
|
|
|
25
24
|
word: node.value,
|
|
26
25
|
});
|
|
27
26
|
}
|
|
28
|
-
//
|
|
29
|
-
|
|
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);
|
|
27
|
+
// Remove the :dir pseudo class from the selector.
|
|
28
|
+
node.remove();
|
|
55
29
|
// If the selector is not empty and if the first node in the selector is not already a
|
|
56
|
-
// " " combinator
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
30
|
+
// " " combinator. We need to add in front of the selector a " " selector before adding
|
|
31
|
+
// the converted dir attribute.
|
|
32
|
+
const shouldInsertSpace = selector.first && !postcss_selector_parser_1.isCombinator(selector.first) && selector.first.value !== ' ';
|
|
33
|
+
if (shouldInsertSpace) {
|
|
34
|
+
selector.insertBefore(selector.first, postcss_selector_parser_1.combinator({
|
|
60
35
|
value: ' ',
|
|
61
36
|
}));
|
|
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
37
|
}
|
|
38
|
+
// Add the dir attribute in front of the selector.
|
|
39
|
+
selector.insertBefore(selector.first, postcss_selector_parser_1.attribute({
|
|
40
|
+
attribute: 'dir',
|
|
41
|
+
operator: '=',
|
|
42
|
+
quoteMark: '"',
|
|
43
|
+
value: `"${value}"`,
|
|
44
|
+
raws: {},
|
|
45
|
+
}));
|
|
70
46
|
});
|
|
71
47
|
});
|
|
72
48
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform.js","sourceRoot":"","sources":["../../../src/dir-pseudo-class/transform.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,qEAAoF;
|
|
1
|
+
{"version":3,"file":"transform.js","sourceRoot":"","sources":["../../../src/dir-pseudo-class/transform.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,qEAAoF;AAEpF,sCAAgD;AAEhD,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,sBAAgB,CAAC,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,kDAAkD;YAClD,IAAI,CAAC,MAAM,EAAE,CAAC;YAEd,sFAAsF;YACtF,uFAAuF;YACvF,+BAA+B;YAC/B,MAAM,iBAAiB,GACnB,QAAQ,CAAC,KAAK,IAAI,CAAC,sCAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,KAAK,KAAK,GAAG,CAAC;YACpF,IAAI,iBAAiB,EAAE;gBACnB,QAAQ,CAAC,YAAY,CACjB,QAAQ,CAAC,KAAK,EACd,oCAAU,CAAC;oBACP,KAAK,EAAE,GAAG;iBACb,CAAC,CACL,CAAC;aACL;YAED,kDAAkD;YAClD,QAAQ,CAAC,YAAY,CACjB,QAAQ,CAAC,KAAK,EACd,mCAAS,CAAC;gBACN,SAAS,EAAE,KAAK;gBAChB,QAAQ,EAAE,GAAG;gBACb,SAAS,EAAE,GAAG;gBACd,KAAK,EAAE,IAAI,KAAK,GAAG;gBACnB,IAAI,EAAE,EAAE;aACX,CAAC,CACL,CAAC;QACN,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC;AAhDD,4BAgDC"}
|
|
@@ -17,10 +17,10 @@ function shouldTransformSelector(rule) {
|
|
|
17
17
|
return ((_a = rule.parent) === null || _a === void 0 ? void 0 : _a.type) !== 'atrule' || rule.parent.name !== 'keyframes';
|
|
18
18
|
}
|
|
19
19
|
function selectorProcessorFactory(transformConfig) {
|
|
20
|
-
return
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
return postcss_selector_parser_1.default((root) => {
|
|
21
|
+
validate_1.default(root);
|
|
22
|
+
transform_2.default(root, transformConfig);
|
|
23
|
+
transform_4.default(root);
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
function postCssLwcPlugin(options) {
|
|
@@ -33,9 +33,9 @@ function postCssLwcPlugin(options) {
|
|
|
33
33
|
transformHost: true,
|
|
34
34
|
});
|
|
35
35
|
return (root, result) => {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
transform_1.default(root, result, options.scoped);
|
|
37
|
+
transform_3.default(root, result);
|
|
38
|
+
transform_5.default(root);
|
|
39
39
|
root.walkRules((rule) => {
|
|
40
40
|
if (!shouldTransformSelector(rule)) {
|
|
41
41
|
return;
|
|
@@ -1 +1 @@
|
|
|
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,IAAI,CAAC,MAAM,0CAAE,IAAI,MAAK,QAAQ,IAAK,IAAI,CAAC,MAAiB,CAAC,IAAI,KAAK,WAAW,CAAC;AAC1F,CAAC;AAED,SAAS,wBAAwB,CAAC,eAAsC;IACpE,OAAO,
|
|
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,IAAI,CAAC,MAAM,0CAAE,IAAI,MAAK,QAAQ,IAAK,IAAI,CAAC,MAAiB,CAAC,IAAI,KAAK,WAAW,CAAC;AAC1F,CAAC;AAED,SAAS,wBAAwB,CAAC,eAAsC;IACpE,OAAO,iCAAe,CAAC,CAAC,IAAI,EAAE,EAAE;QAC5B,kBAAmB,CAAC,IAAI,CAAC,CAAC;QAE1B,mBAAwB,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;QAChD,mBAAuB,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;AACP,CAAC;AAMD,SAAwB,gBAAgB,CAAC,OAAgC;IACrE,mGAAmG;IACnG,yEAAyE;IACzE,MAAM,6BAA6B,GAAG,wBAAwB,CAAC;QAC3D,aAAa,EAAE,KAAK;KACvB,CAAC,CAAC;IACH,MAAM,2BAA2B,GAAG,wBAAwB,CAAC;QACzD,aAAa,EAAE,IAAI;KACtB,CAAC,CAAC;IAEH,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE;QACpB,mBAAe,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;QAC9C,mBAAyB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACxC,mBAAgB,CAAC,IAAI,CAAC,CAAC;QAEvB,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE;YACpB,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,EAAE;gBAChC,OAAO;aACV;YAED,oDAAoD;YACpD,MAAM,kBAAkB,GAAG,2BAA2B,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YACzE,MAAM,oBAAoB,GAAG,6BAA6B,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YAC7E,IAAI,CAAC,QAAQ,GAAG,kBAAkB,CAAC;YACnC,gGAAgG;YAChG,6EAA6E;YAC7E,IAAI,kBAAkB,KAAK,oBAAoB,EAAE;gBAC7C,8FAA8F;gBAC9F,6BAA6B;gBAC7B,MAAM,WAAW,GAAG,IAAI,CAAC;gBACzB,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;gBACtC,UAAU,CAAC,QAAQ,GAAG,oBAAoB,CAAC;gBAE3C,iCAAiC;gBAChC,UAAkB,CAAC,aAAa,GAAG,IAAI,CAAC;gBACxC,WAAmB,CAAC,aAAa,GAAG,IAAI,CAAC;aAC7C;QACL,CAAC,CAAC,CAAC;IACP,CAAC,CAAC;AACN,CAAC;AAvCD,mCAuCC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
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 cssnano_preset_default_1 = __importDefault(require("cssnano-preset-default"));
|
|
13
|
+
const CSS_NANO_PRESET_OPTIONS = {
|
|
14
|
+
svgo: {
|
|
15
|
+
// The svgo plugin is async and need to be excluded.
|
|
16
|
+
exclude: true,
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* cssnano decided to make its APIs asynchronous with v4. Because the LWC compiler transform API is
|
|
21
|
+
* synchronous we can't use cssnano directly. For now we use the css-nano-preset-default and filter
|
|
22
|
+
* out the plugins that are async.
|
|
23
|
+
* https://github.com/cssnano/cssnano/blob/master/packages/cssnano-preset-default/src/index.js
|
|
24
|
+
*
|
|
25
|
+
* We may switch back to cssnano if/when they decide to go back to a synchronous API:
|
|
26
|
+
* https://github.com/cssnano/cssnano/issues/68
|
|
27
|
+
*/
|
|
28
|
+
function default_1() {
|
|
29
|
+
const { plugins } = cssnano_preset_default_1.default(CSS_NANO_PRESET_OPTIONS);
|
|
30
|
+
return plugins
|
|
31
|
+
.filter(([_, options]) => !options || !options.exclude)
|
|
32
|
+
.map(([plugin, options]) => plugin(options));
|
|
33
|
+
}
|
|
34
|
+
exports.default = default_1;
|
|
35
|
+
//# sourceMappingURL=postcss-minify-plugins.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postcss-minify-plugins.js","sourceRoot":"","sources":["../../src/postcss-minify-plugins.ts"],"names":[],"mappings":";;;;;AAAA;;;;;GAKG;AACH,oFAAmD;AAEnD,MAAM,uBAAuB,GAAG;IAC5B,IAAI,EAAE;QACF,oDAAoD;QACpD,OAAO,EAAE,IAAI;KAChB;CACJ,CAAC;AAEF;;;;;;;;GAQG;AACH;IACI,MAAM,EAAE,OAAO,EAAE,GAAG,gCAAa,CAAC,uBAAuB,CAAC,CAAC;IAE3D,OAAO,OAAO;SACT,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;SACtD,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;AACrD,CAAC;AAND,4BAMC"}
|
|
@@ -15,7 +15,7 @@ const rtl_1 = require("../utils/rtl");
|
|
|
15
15
|
const selectors_scoping_1 = require("../utils/selectors-scoping");
|
|
16
16
|
const selector_parser_1 = require("../utils/selector-parser");
|
|
17
17
|
function isHostPseudoClass(node) {
|
|
18
|
-
return
|
|
18
|
+
return postcss_selector_parser_1.isPseudoClass(node) && node.value === ':host';
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* Add scoping attributes to all the matching selectors:
|
|
@@ -27,7 +27,7 @@ function scopeSelector(selector) {
|
|
|
27
27
|
// Split the selector per compound selector. Compound selectors are interleaved with combinator nodes.
|
|
28
28
|
// https://drafts.csswg.org/selectors-4/#typedef-complex-selector
|
|
29
29
|
selector.each((node) => {
|
|
30
|
-
if (
|
|
30
|
+
if (postcss_selector_parser_1.isCombinator(node)) {
|
|
31
31
|
compoundSelectors.push([]);
|
|
32
32
|
}
|
|
33
33
|
else {
|
|
@@ -38,7 +38,7 @@ function scopeSelector(selector) {
|
|
|
38
38
|
for (const compoundSelector of compoundSelectors) {
|
|
39
39
|
// Compound selectors with only a single :dir pseudo class should be scoped, the dir pseudo
|
|
40
40
|
// class transform will take care of transforming it properly.
|
|
41
|
-
const containsSingleDirSelector = compoundSelector.length === 1 &&
|
|
41
|
+
const containsSingleDirSelector = compoundSelector.length === 1 && rtl_1.isDirPseudoClass(compoundSelector[0]);
|
|
42
42
|
// Compound selectors containing :host have a special treatment and should not be scoped
|
|
43
43
|
// like the rest of the complex selectors.
|
|
44
44
|
const containsHost = compoundSelector.some(isHostPseudoClass);
|
|
@@ -46,11 +46,11 @@ function scopeSelector(selector) {
|
|
|
46
46
|
let nodeToScope;
|
|
47
47
|
// In each compound selector we need to locate the last selector to scope.
|
|
48
48
|
for (const node of compoundSelector) {
|
|
49
|
-
if (!
|
|
49
|
+
if (!postcss_selector_parser_1.isPseudoElement(node)) {
|
|
50
50
|
nodeToScope = node;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
const shadowAttribute =
|
|
53
|
+
const shadowAttribute = postcss_selector_parser_1.attribute({
|
|
54
54
|
attribute: selectors_scoping_1.SHADOW_ATTRIBUTE,
|
|
55
55
|
value: undefined,
|
|
56
56
|
raws: {},
|
|
@@ -75,12 +75,12 @@ function scopeSelector(selector) {
|
|
|
75
75
|
*/
|
|
76
76
|
function transformHost(selector) {
|
|
77
77
|
// Locate the first :host pseudo-class
|
|
78
|
-
const hostNode =
|
|
78
|
+
const hostNode = selector_parser_1.findNode(selector, isHostPseudoClass);
|
|
79
79
|
if (hostNode) {
|
|
80
80
|
// Store the original location of the :host in the selector
|
|
81
81
|
const hostIndex = selector.index(hostNode);
|
|
82
82
|
// Swap the :host pseudo-class with the host scoping token
|
|
83
|
-
const hostAttribute =
|
|
83
|
+
const hostAttribute = postcss_selector_parser_1.attribute({
|
|
84
84
|
attribute: selectors_scoping_1.HOST_ATTRIBUTE,
|
|
85
85
|
value: undefined,
|
|
86
86
|
raws: {},
|
|
@@ -94,17 +94,17 @@ function transformHost(selector) {
|
|
|
94
94
|
// Add to the compound selector previously containing the :host pseudo class
|
|
95
95
|
// the contextual selectors.
|
|
96
96
|
contextSelectors.each((node) => {
|
|
97
|
-
|
|
97
|
+
selector_parser_1.trimNodeWhitespaces(node);
|
|
98
98
|
clonedSelector.insertAfter(clonedHostNode, node);
|
|
99
99
|
});
|
|
100
100
|
return clonedSelector;
|
|
101
101
|
});
|
|
102
102
|
// Replace the current selector with the different variants
|
|
103
|
-
|
|
103
|
+
selector_parser_1.replaceNodeWith(selector, ...contextualSelectors);
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
function transformSelector(root, transformConfig) {
|
|
107
|
-
|
|
107
|
+
validate_1.default(root);
|
|
108
108
|
root.each(scopeSelector);
|
|
109
109
|
if (transformConfig.transformHost) {
|
|
110
110
|
root.each(transformHost);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform.js","sourceRoot":"","sources":["../../../src/selector-scoping/transform.ts"],"names":[],"mappings":";;;;;AAAA;;;;;GAKG;AACH,qEAUiC;AAEjC,0DAA2C;AAE3C,sCAAgD;AAChD,kEAA8E;AAC9E,8DAA0F;AAS1F,SAAS,iBAAiB,CAAC,IAAU;IACjC,OAAO,
|
|
1
|
+
{"version":3,"file":"transform.js","sourceRoot":"","sources":["../../../src/selector-scoping/transform.ts"],"names":[],"mappings":";;;;;AAAA;;;;;GAKG;AACH,qEAUiC;AAEjC,0DAA2C;AAE3C,sCAAgD;AAChD,kEAA8E;AAC9E,8DAA0F;AAS1F,SAAS,iBAAiB,CAAC,IAAU;IACjC,OAAO,uCAAa,CAAC,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,sCAAY,CAAC,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,CA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S,CAAC;YAC5B,SAAS,EAAE,kCAAc;YACzB,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,EAAE;SACX,CAAC,CAAC;QACH,QAAQ,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;QAEpC,8FAA8F;QAC9F,eAAe;QACf,MAAM,mBAAmB,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,gBAAgB,EAAE,EAAE;YAChE,MAAM,cAAc,GAAG,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAa,CAAC;YACtD,MAAM,cAAc,GAAG,cAAc,CAAC,EAAE,CAAC,SAAS,CAAQ,CAAC;YAE3D,4EAA4E;YAC5E,4BAA4B;YAC3B,gBAA6B,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;gBACzC,qCAAmB,CAAC,IAAI,CAAC,CAAC;gBAC1B,cAAc,CAAC,WAAW,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;YACrD,CAAC,CAAC,CAAC;YAEH,OAAO,cAAc,CAAC;QAC1B,CAAC,CAAC,CAAC;QAEH,2DAA2D;QAC3D,iCAAe,CAAC,QAAQ,EAAE,GAAG,mBAAmB,CAAC,CAAC;KACrD;AACL,CAAC;AAED,SAAwB,iBAAiB,CAAC,IAAU,EAAE,eAAsC;IACxF,kBAAiB,CAAC,IAAI,CAAC,CAAC;IAExB,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAEzB,IAAI,eAAe,CAAC,aAAa,EAAE;QAC/B,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;KAC5B;AACL,CAAC;AARD,oCAQC"}
|
|
@@ -15,7 +15,6 @@ const string_prototype_matchall_1 = __importDefault(require("string.prototype.ma
|
|
|
15
15
|
const shared_1 = require("@lwc/shared");
|
|
16
16
|
const message_1 = require("./utils/message");
|
|
17
17
|
const selectors_scoping_1 = require("./utils/selectors-scoping");
|
|
18
|
-
const dir_pseudoclass_1 = require("./utils/dir-pseudoclass");
|
|
19
18
|
var TokenType;
|
|
20
19
|
(function (TokenType) {
|
|
21
20
|
TokenType["text"] = "text";
|
|
@@ -27,7 +26,6 @@ var TokenType;
|
|
|
27
26
|
const HOST_SELECTOR_IDENTIFIER = 'hostSelector';
|
|
28
27
|
const SHADOW_SELECTOR_IDENTIFIER = 'shadowSelector';
|
|
29
28
|
const USE_ACTUAL_HOST_SELECTOR = 'useActualHostSelector';
|
|
30
|
-
const USE_NATIVE_DIR_PSEUDOCLASS = 'useNativeDirPseudoclass';
|
|
31
29
|
const STYLESHEET_IDENTIFIER = 'stylesheet';
|
|
32
30
|
const VAR_RESOLVER_IDENTIFIER = 'varResolver';
|
|
33
31
|
function serialize(result, config) {
|
|
@@ -50,7 +48,7 @@ function serialize(result, config) {
|
|
|
50
48
|
const serializedStyle = serializeCss(result, collectVarFunctions).trim();
|
|
51
49
|
if (serializedStyle) {
|
|
52
50
|
// inline function
|
|
53
|
-
buffer += `function stylesheet(
|
|
51
|
+
buffer += `function stylesheet(${USE_ACTUAL_HOST_SELECTOR}, token) {\n`;
|
|
54
52
|
// For scoped stylesheets, we use classes, but for synthetic shadow DOM, we use attributes
|
|
55
53
|
if (config.scoped) {
|
|
56
54
|
buffer += ` var ${SHADOW_SELECTOR_IDENTIFIER} = token ? ("." + token) : "";\n`;
|
|
@@ -176,17 +174,9 @@ function serializeCss(result, collectVarFunctions) {
|
|
|
176
174
|
function tokenizeCss(data) {
|
|
177
175
|
data = data.replace(/( {2,})/gm, ' '); // remove when there are more than two spaces
|
|
178
176
|
const tokens = [];
|
|
179
|
-
const
|
|
180
|
-
selectors_scoping_1.SHADOW_ATTRIBUTE,
|
|
181
|
-
selectors_scoping_1.HOST_ATTRIBUTE,
|
|
182
|
-
dir_pseudoclass_1.DIR_ATTRIBUTE_NATIVE_LTR,
|
|
183
|
-
dir_pseudoclass_1.DIR_ATTRIBUTE_NATIVE_RTL,
|
|
184
|
-
dir_pseudoclass_1.DIR_ATTRIBUTE_SYNTHETIC_LTR,
|
|
185
|
-
dir_pseudoclass_1.DIR_ATTRIBUTE_SYNTHETIC_RTL,
|
|
186
|
-
];
|
|
187
|
-
const regex = new RegExp(`[[-](${attributes.join('|')})]?`, 'g');
|
|
177
|
+
const regex = new RegExp(`[[-](${selectors_scoping_1.SHADOW_ATTRIBUTE}|${selectors_scoping_1.HOST_ATTRIBUTE})]?`, 'g');
|
|
188
178
|
let lastIndex = 0;
|
|
189
|
-
for (const match of
|
|
179
|
+
for (const match of string_prototype_matchall_1.default(data, regex)) {
|
|
190
180
|
const index = match.index;
|
|
191
181
|
const [matchString, substring] = match;
|
|
192
182
|
if (index > lastIndex) {
|
|
@@ -194,29 +184,11 @@ function tokenizeCss(data) {
|
|
|
194
184
|
}
|
|
195
185
|
const identifier = substring === selectors_scoping_1.SHADOW_ATTRIBUTE ? SHADOW_SELECTOR_IDENTIFIER : HOST_SELECTOR_IDENTIFIER;
|
|
196
186
|
if (matchString.startsWith('[')) {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
else {
|
|
205
|
-
// :dir pseudoclass placeholder, e.g. `[__dirAttributeNativeLtr__]` or `[__dirAttributeSyntheticRtl__]`
|
|
206
|
-
const native = substring === dir_pseudoclass_1.DIR_ATTRIBUTE_NATIVE_LTR ||
|
|
207
|
-
substring === dir_pseudoclass_1.DIR_ATTRIBUTE_NATIVE_RTL;
|
|
208
|
-
const dirValue = substring === dir_pseudoclass_1.DIR_ATTRIBUTE_NATIVE_LTR ||
|
|
209
|
-
substring === dir_pseudoclass_1.DIR_ATTRIBUTE_SYNTHETIC_LTR
|
|
210
|
-
? 'ltr'
|
|
211
|
-
: 'rtl';
|
|
212
|
-
tokens.push({
|
|
213
|
-
type: TokenType.expression,
|
|
214
|
-
// use the native :dir() pseudoclass for native shadow, the [dir] attribute otherwise
|
|
215
|
-
value: native
|
|
216
|
-
? `${USE_NATIVE_DIR_PSEUDOCLASS} ? ':dir(${dirValue})' : ''`
|
|
217
|
-
: `${USE_NATIVE_DIR_PSEUDOCLASS} ? '' : '[dir="${dirValue}"]'`,
|
|
218
|
-
});
|
|
219
|
-
}
|
|
187
|
+
// attribute in a selector, e.g. `foo[__shadowAttribute__]`
|
|
188
|
+
tokens.push({
|
|
189
|
+
type: TokenType.identifier,
|
|
190
|
+
value: identifier,
|
|
191
|
+
});
|
|
220
192
|
}
|
|
221
193
|
else {
|
|
222
194
|
// suffix for an at-rule, e.g. `@keyframes spin-__shadowAttribute__`
|
|
@@ -316,7 +288,7 @@ function recursiveValueParse(node, inVarExpression = false) {
|
|
|
316
288
|
return [{ type: TokenType.text, value }];
|
|
317
289
|
}
|
|
318
290
|
function tokenizeCssDeclaration(node) {
|
|
319
|
-
const valueRoot =
|
|
291
|
+
const valueRoot = postcss_value_parser_1.default(node.value);
|
|
320
292
|
const parsed = recursiveValueParse(valueRoot);
|
|
321
293
|
return [{ type: TokenType.text, value: `${node.prop.trim()}: ` }, ...parsed];
|
|
322
294
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serialize.js","sourceRoot":"","sources":["../../src/serialize.ts"],"names":[],"mappings":";;;;;AAAA;;;;;GAKG;AACH,sDAAuD;AACvD,gFAAsD;AACtD,0FAAiD;AACjD,wCAA8C;AAE9C,6CAAwE;AACxE,iEAA6E;
|
|
1
|
+
{"version":3,"file":"serialize.js","sourceRoot":"","sources":["../../src/serialize.ts"],"names":[],"mappings":";;;;;AAAA;;;;;GAKG;AACH,sDAAuD;AACvD,gFAAsD;AACtD,0FAAiD;AACjD,wCAA8C;AAE9C,6CAAwE;AACxE,iEAA6E;AAE7E,IAAK,SAKJ;AALD,WAAK,SAAS;IACV,0BAAa,CAAA;IACb,sCAAyB,CAAA;IACzB,sCAAyB,CAAA;IACzB,gCAAmB,CAAA;AACvB,CAAC,EALI,SAAS,KAAT,SAAS,QAKb;AAMD,qEAAqE;AACrE,MAAM,wBAAwB,GA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,OAAO;gBACH,EAAE,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,KAAK,GAAG,EAAE;gBAC5C,GAAG,YAAY,CAAC,MAAM,CAAC;gBACvB,EAAE,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE;aACvC,CAAC;SACL;KACJ;IAED,wDAAwD;IACxD,OAAO,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;AAC7C,CAAC;AAED,SAAS,sBAAsB,CAAC,IAAiB;IAC7C,MAAM,SAAS,GAAG,8BAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACjD,MAAM,MAAM,GAAG,mBAAmB,CAAC,SAAS,CAAC,CAAC;IAC9C,OAAO,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,GAAG,MAAM,CAAC,CAAC;AACjF,CAAC"}
|
|
@@ -18,9 +18,9 @@ function transform(src, id, config = {}) {
|
|
|
18
18
|
return { code: 'export default undefined' };
|
|
19
19
|
}
|
|
20
20
|
const scoped = !!config.scoped;
|
|
21
|
-
const plugins = [
|
|
22
|
-
const result =
|
|
23
|
-
return { code:
|
|
21
|
+
const plugins = [postcss_lwc_plugin_1.default({ scoped })];
|
|
22
|
+
const result = postcss_1.default(plugins).process(src, { from: id }).sync();
|
|
23
|
+
return { code: serialize_1.default(result, config) };
|
|
24
24
|
}
|
|
25
25
|
exports.transform = transform;
|
|
26
26
|
//# sourceMappingURL=transform.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform.js","sourceRoot":"","sources":["../../src/transform.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;GAKG;AACH,sDAA8B;AAE9B,4DAAoC;AACpC,8EAA8C;AAY9C,SAAgB,SAAS,CAAC,GAAW,EAAE,EAAU,EAAE,SAAiB,EAAE;IAClE,IAAI,GAAG,KAAK,EAAE,EAAE;QACZ,OAAO,EAAE,IAAI,EAAE,0BAA0B,EAAE,CAAC;KAC/C;IAED,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;IAC/B,MAAM,OAAO,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"transform.js","sourceRoot":"","sources":["../../src/transform.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;GAKG;AACH,sDAA8B;AAE9B,4DAAoC;AACpC,8EAA8C;AAY9C,SAAgB,SAAS,CAAC,GAAW,EAAE,EAAU,EAAE,SAAiB,EAAE;IAClE,IAAI,GAAG,KAAK,EAAE,EAAE;QACZ,OAAO,EAAE,IAAI,EAAE,0BAA0B,EAAE,CAAC;KAC/C;IAED,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;IAC/B,MAAM,OAAO,GAAG,CAAC,4BAAU,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IAEzC,MAAM,MAAM,GAAG,iBAAO,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAElE,OAAO,EAAE,IAAI,EAAE,mBAAS,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;AAC/C,CAAC;AAXD,8BAWC"}
|
|
@@ -9,7 +9,7 @@ exports.isDirPseudoClass = void 0;
|
|
|
9
9
|
*/
|
|
10
10
|
const postcss_selector_parser_1 = require("postcss-selector-parser");
|
|
11
11
|
function isDirPseudoClass(node) {
|
|
12
|
-
return
|
|
12
|
+
return postcss_selector_parser_1.isPseudoClass(node) && node.value === ':dir';
|
|
13
13
|
}
|
|
14
14
|
exports.isDirPseudoClass = isDirPseudoClass;
|
|
15
15
|
//# sourceMappingURL=rtl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rtl.js","sourceRoot":"","sources":["../../../src/utils/rtl.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,qEAAsE;AAEtE,SAAgB,gBAAgB,CAAC,IAAU;IACvC,OAAO,
|
|
1
|
+
{"version":3,"file":"rtl.js","sourceRoot":"","sources":["../../../src/utils/rtl.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,qEAAsE;AAEtE,SAAgB,gBAAgB,CAAC,IAAU;IACvC,OAAO,uCAAa,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,KAAK,MAAM,CAAC;AACxD,CAAC;AAFD,4CAEC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* cssnano decided to make its APIs asynchronous with v4. Because the LWC compiler transform API is
|
|
3
|
+
* synchronous we can't use cssnano directly. For now we use the css-nano-preset-default and filter
|
|
4
|
+
* out the plugins that are async.
|
|
5
|
+
* https://github.com/cssnano/cssnano/blob/master/packages/cssnano-preset-default/src/index.js
|
|
6
|
+
*
|
|
7
|
+
* We may switch back to cssnano if/when they decide to go back to a synchronous API:
|
|
8
|
+
* https://github.com/cssnano/cssnano/issues/68
|
|
9
|
+
*/
|
|
10
|
+
export default function (): import("postcss").Transformer[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lwc/style-compiler",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.10-alpha1",
|
|
4
4
|
"description": "Transform style sheet to be consumed by the LWC engine",
|
|
5
5
|
"homepage": "https://lwc.dev/",
|
|
6
6
|
"repository": {
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"dist/"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@lwc/shared": "2.5.
|
|
26
|
-
"postcss": "~8.3.
|
|
25
|
+
"@lwc/shared": "2.5.10-alpha1",
|
|
26
|
+
"postcss": "~8.3.11",
|
|
27
27
|
"postcss-selector-parser": "~6.0.4",
|
|
28
28
|
"postcss-value-parser": "~4.1.0",
|
|
29
29
|
"string.prototype.matchall": "^4.0.5"
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"publishConfig": {
|
|
35
35
|
"access": "public"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "b96b2d24f545c14a5c8984ab01081290afd5dc39"
|
|
38
38
|
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DIR_ATTRIBUTE_SYNTHETIC_RTL = exports.DIR_ATTRIBUTE_SYNTHETIC_LTR = exports.DIR_ATTRIBUTE_NATIVE_RTL = exports.DIR_ATTRIBUTE_NATIVE_LTR = void 0;
|
|
4
|
-
/*
|
|
5
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
6
|
-
* All rights reserved.
|
|
7
|
-
* SPDX-License-Identifier: MIT
|
|
8
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
9
|
-
*/
|
|
10
|
-
exports.DIR_ATTRIBUTE_NATIVE_LTR = `__dirAttributeNativeLtr__`;
|
|
11
|
-
exports.DIR_ATTRIBUTE_NATIVE_RTL = `__dirAttributeNativeRtl__`;
|
|
12
|
-
exports.DIR_ATTRIBUTE_SYNTHETIC_LTR = `__dirAttributeSyntheticLtr__`;
|
|
13
|
-
exports.DIR_ATTRIBUTE_SYNTHETIC_RTL = `__dirAttributeSyntheticRtl__`;
|
|
14
|
-
//# sourceMappingURL=dir-pseudoclass.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dir-pseudoclass.js","sourceRoot":"","sources":["../../../src/utils/dir-pseudoclass.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACU,QAAA,wBAAwB,GAAG,2BAA2B,CAAC;AACvD,QAAA,wBAAwB,GAAG,2BAA2B,CAAC;AACvD,QAAA,2BAA2B,GAAG,8BAA8B,CAAC;AAC7D,QAAA,2BAA2B,GAAG,8BAA8B,CAAC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare const DIR_ATTRIBUTE_NATIVE_LTR = "__dirAttributeNativeLtr__";
|
|
2
|
-
export declare const DIR_ATTRIBUTE_NATIVE_RTL = "__dirAttributeNativeRtl__";
|
|
3
|
-
export declare const DIR_ATTRIBUTE_SYNTHETIC_LTR = "__dirAttributeSyntheticLtr__";
|
|
4
|
-
export declare const DIR_ATTRIBUTE_SYNTHETIC_RTL = "__dirAttributeSyntheticRtl__";
|