marko 6.0.4 → 6.0.5
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/common/helpers.d.ts +2 -2
- package/dist/debug/dom.js +138 -136
- package/dist/debug/dom.mjs +138 -136
- package/dist/debug/html.js +27 -31
- package/dist/debug/html.mjs +27 -31
- package/dist/dom/dom.d.ts +5 -0
- package/dist/dom/queue.d.ts +1 -0
- package/dist/dom/scope.d.ts +0 -1
- package/dist/dom.d.ts +1 -1
- package/dist/dom.js +85 -90
- package/dist/dom.mjs +85 -90
- package/dist/html.js +16 -25
- package/dist/html.mjs +16 -25
- package/dist/translator/index.js +572 -338
- package/dist/translator/util/css-px-props.d.ts +2 -0
- package/dist/translator/visitors/tag/native-tag.d.ts +2 -2
- package/package.json +1 -1
package/dist/html.mjs
CHANGED
@@ -11,39 +11,30 @@ function* attrTagIterator() {
|
|
11
11
|
}
|
12
12
|
|
13
13
|
// src/common/helpers.ts
|
14
|
-
function classValue(
|
15
|
-
return toDelimitedString(
|
14
|
+
function classValue(classValue2) {
|
15
|
+
return toDelimitedString(classValue2, " ", stringifyClassObject);
|
16
16
|
}
|
17
17
|
function stringifyClassObject(name, value) {
|
18
18
|
return value ? name : "";
|
19
19
|
}
|
20
|
-
function styleValue(
|
21
|
-
return toDelimitedString(
|
20
|
+
function styleValue(styleValue2) {
|
21
|
+
return toDelimitedString(styleValue2, ";", stringifyStyleObject);
|
22
22
|
}
|
23
23
|
function stringifyStyleObject(name, value) {
|
24
|
-
return value || value === 0 ? `${name}:${typeof value == "number" &&
|
24
|
+
return value || value === 0 ? `${name}:${value && typeof value == "number" && !/^(--|ta|or|li|z)|cou|nk|it|ag|we|do|w$/.test(name) ? value + "px" : value}` : "";
|
25
25
|
}
|
26
26
|
function toDelimitedString(val, delimiter, stringify) {
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
else
|
39
|
-
for (let name in val) {
|
40
|
-
let v = val[name], part = stringify(name, v);
|
41
|
-
part !== "" && (result += curDelimiter + part, curDelimiter = delimiter);
|
42
|
-
}
|
43
|
-
return result;
|
44
|
-
}
|
45
|
-
}
|
46
|
-
return "";
|
27
|
+
let str = "", sep = "", part;
|
28
|
+
if (val)
|
29
|
+
if (typeof val != "object")
|
30
|
+
str += val;
|
31
|
+
else if (Array.isArray(val))
|
32
|
+
for (let v of val)
|
33
|
+
part = toDelimitedString(v, delimiter, stringify), part && (str += sep + part, sep = delimiter);
|
34
|
+
else
|
35
|
+
for (let name in val)
|
36
|
+
part = stringify(name, val[name]), part && (str += sep + part, sep = delimiter);
|
37
|
+
return str;
|
47
38
|
}
|
48
39
|
function isEventHandler(name) {
|
49
40
|
return /^on[A-Z-]/.test(name);
|