@lwc/template-compiler 2.2.9-alpha.2 → 2.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lwc/template-compiler",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.12",
|
|
4
4
|
"description": "Template compiler package",
|
|
5
5
|
"homepage": "https://lwc.dev/",
|
|
6
6
|
"repository": {
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"dist/"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@lwc/errors": "2.2.
|
|
30
|
-
"@lwc/shared": "2.2.
|
|
29
|
+
"@lwc/errors": "2.2.12",
|
|
30
|
+
"@lwc/shared": "2.2.12",
|
|
31
31
|
"acorn": "~8.4.0",
|
|
32
32
|
"astring": "~1.7.0",
|
|
33
33
|
"estree-walker": "~2.0.2",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "23e7740259c45e803a58851bfd39ed074078b1e1"
|
|
42
42
|
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
4
|
-
* All rights reserved.
|
|
5
|
-
* SPDX-License-Identifier: MIT
|
|
6
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.parseClassNames = exports.parseStyleText = void 0;
|
|
10
|
-
const DECLARATION_DELIMITER = /;(?![^(]*\))/g;
|
|
11
|
-
const PROPERTY_DELIMITER = /:(.+)/;
|
|
12
|
-
// Borrowed from Vue template compiler.
|
|
13
|
-
// https://github.com/vuejs/vue/blob/531371b818b0e31a989a06df43789728f23dc4e8/src/platforms/web/util/style.js#L5-L16
|
|
14
|
-
function parseStyleText(cssText) {
|
|
15
|
-
const styleMap = {};
|
|
16
|
-
const declarations = cssText.split(DECLARATION_DELIMITER);
|
|
17
|
-
for (const declaration of declarations) {
|
|
18
|
-
if (declaration) {
|
|
19
|
-
const [prop, value] = declaration.split(PROPERTY_DELIMITER);
|
|
20
|
-
if (prop !== undefined && value !== undefined) {
|
|
21
|
-
styleMap[prop.trim()] = value.trim();
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
return styleMap;
|
|
26
|
-
}
|
|
27
|
-
exports.parseStyleText = parseStyleText;
|
|
28
|
-
const CLASSNAME_DELIMITER = /\s+/;
|
|
29
|
-
function parseClassNames(classNames) {
|
|
30
|
-
const classMap = {};
|
|
31
|
-
const classList = classNames.split(CLASSNAME_DELIMITER);
|
|
32
|
-
for (const className of classList) {
|
|
33
|
-
const normalizedClassName = className.trim();
|
|
34
|
-
if (normalizedClassName.length > 0) {
|
|
35
|
-
classMap[className] = true;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
return classMap;
|
|
39
|
-
}
|
|
40
|
-
exports.parseClassNames = parseClassNames;
|
|
41
|
-
//# sourceMappingURL=style.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../../src/parser/style.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAUH,MAAM,qBAAqB,GAAG,eAAe,CAAC;AAC9C,MAAM,kBAAkB,GAAG,OAAO,CAAC;AAEnC,uCAAuC;AACvC,oHAAoH;AACpH,SAAgB,cAAc,CAAC,OAAe;IAC1C,MAAM,QAAQ,GAAa,EAAE,CAAC;IAE9B,MAAM,YAAY,GAAG,OAAO,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAC1D,KAAK,MAAM,WAAW,IAAI,YAAY,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