@marko/compiler 5.39.59 → 5.39.61
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/babel-plugin/parser.js +8 -1
- package/dist/babel.js +15 -1
- package/dist/babel.web.js +15 -1
- package/internal/babel/package.json +2 -2
- package/package.json +2 -2
|
@@ -375,7 +375,14 @@ function parseMarko(file) {
|
|
|
375
375
|
},
|
|
376
376
|
|
|
377
377
|
onAttrName(part) {
|
|
378
|
-
|
|
378
|
+
let name = parser.read(part);
|
|
379
|
+
let modifier = null;
|
|
380
|
+
const modifierIndex = name.lastIndexOf(":");
|
|
381
|
+
if (~modifierIndex) {
|
|
382
|
+
modifier = name.slice(modifierIndex + 1);
|
|
383
|
+
name = name.slice(0, modifierIndex);
|
|
384
|
+
}
|
|
385
|
+
|
|
379
386
|
endAttr();
|
|
380
387
|
currentTag.node.attributes.push(
|
|
381
388
|
currentAttr = _babel.types.markoAttribute(
|
package/dist/babel.js
CHANGED
|
@@ -36779,6 +36779,9 @@ var require_marko = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
36779
36779
|
"track",
|
|
36780
36780
|
"wbr"
|
|
36781
36781
|
]);
|
|
36782
|
+
function isInlineMarkoNode(node) {
|
|
36783
|
+
return node && (node.type === "MarkoText" || node.type === "MarkoPlaceholder");
|
|
36784
|
+
}
|
|
36782
36785
|
exports.MarkoParseError = function MarkoParseError(node) {
|
|
36783
36786
|
this.token(node.source);
|
|
36784
36787
|
};
|
|
@@ -36923,7 +36926,18 @@ var require_marko = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
36923
36926
|
else if (!(bodyOverride || node.body.body.length || node.attributeTags.length) || svgElements.has(tagName)) this.token("/>");
|
|
36924
36927
|
else {
|
|
36925
36928
|
this.token(">");
|
|
36926
|
-
|
|
36929
|
+
const bodyNodes = bodyOverride || zipAttributeTagsAndBody(node);
|
|
36930
|
+
for (let i = 0; i < bodyNodes.length; i++) {
|
|
36931
|
+
const node = bodyNodes[i];
|
|
36932
|
+
if (i > 0 && isInlineMarkoNode(bodyNodes[i - 1]) && isInlineMarkoNode(node)) this.print(node, false, true);
|
|
36933
|
+
else {
|
|
36934
|
+
this.newline(1);
|
|
36935
|
+
this.indent();
|
|
36936
|
+
this.print(node, false, true);
|
|
36937
|
+
this.dedent();
|
|
36938
|
+
}
|
|
36939
|
+
}
|
|
36940
|
+
if (bodyNodes.length > 0) this.newline(1);
|
|
36927
36941
|
this.token("</");
|
|
36928
36942
|
if (!isDynamicTag) this.token(tagName);
|
|
36929
36943
|
this.token(">");
|
package/dist/babel.web.js
CHANGED
|
@@ -36469,6 +36469,9 @@ var require_marko = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
36469
36469
|
"track",
|
|
36470
36470
|
"wbr"
|
|
36471
36471
|
]);
|
|
36472
|
+
function isInlineMarkoNode(node) {
|
|
36473
|
+
return node && (node.type === "MarkoText" || node.type === "MarkoPlaceholder");
|
|
36474
|
+
}
|
|
36472
36475
|
exports.MarkoParseError = function MarkoParseError(node) {
|
|
36473
36476
|
this.token(node.source);
|
|
36474
36477
|
};
|
|
@@ -36613,7 +36616,18 @@ var require_marko = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
36613
36616
|
else if (!(bodyOverride || node.body.body.length || node.attributeTags.length) || svgElements.has(tagName)) this.token("/>");
|
|
36614
36617
|
else {
|
|
36615
36618
|
this.token(">");
|
|
36616
|
-
|
|
36619
|
+
const bodyNodes = bodyOverride || zipAttributeTagsAndBody(node);
|
|
36620
|
+
for (let i = 0; i < bodyNodes.length; i++) {
|
|
36621
|
+
const node = bodyNodes[i];
|
|
36622
|
+
if (i > 0 && isInlineMarkoNode(bodyNodes[i - 1]) && isInlineMarkoNode(node)) this.print(node, false, true);
|
|
36623
|
+
else {
|
|
36624
|
+
this.newline(1);
|
|
36625
|
+
this.indent();
|
|
36626
|
+
this.print(node, false, true);
|
|
36627
|
+
this.dedent();
|
|
36628
|
+
}
|
|
36629
|
+
}
|
|
36630
|
+
if (bodyNodes.length > 0) this.newline(1);
|
|
36617
36631
|
this.token("</");
|
|
36618
36632
|
if (!isDynamicTag) this.token(tagName);
|
|
36619
36633
|
this.token(">");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marko/compiler",
|
|
3
|
-
"version": "5.39.
|
|
3
|
+
"version": "5.39.61",
|
|
4
4
|
"description": "Marko template to JS compiler.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"babel",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"source-map-support": "^0.5.21"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
|
-
"marko": "^5.38.
|
|
85
|
+
"marko": "^5.38.31"
|
|
86
86
|
},
|
|
87
87
|
"engines": {
|
|
88
88
|
"node": "18 || 20 || >=22"
|