marko 6.0.161 → 6.0.162
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/translator/index.js +46 -17
- package/package.json +1 -1
package/dist/translator/index.js
CHANGED
|
@@ -12791,7 +12791,12 @@ var dynamic_tag_default = {
|
|
|
12791
12791
|
},
|
|
12792
12792
|
translate: {
|
|
12793
12793
|
enter(tag) {
|
|
12794
|
-
|
|
12794
|
+
const tagExtra = tag.node.extra;
|
|
12795
|
+
if (tagExtra?.featureType === "class" && !isOutputHTML() && !(0, import_babel_utils51.getTagTemplate)(tag)) {
|
|
12796
|
+
tag.remove();
|
|
12797
|
+
return;
|
|
12798
|
+
}
|
|
12799
|
+
if (tagExtra?.defineBodySection) {
|
|
12795
12800
|
if (isOutputHTML()) {
|
|
12796
12801
|
flushBefore(tag);
|
|
12797
12802
|
}
|
|
@@ -12884,33 +12889,57 @@ var dynamic_tag_default = {
|
|
|
12884
12889
|
);
|
|
12885
12890
|
}
|
|
12886
12891
|
if (isClassAPI) {
|
|
12887
|
-
if (
|
|
12892
|
+
if ((0, import_babel_utils51.getTagTemplate)(tag)) {
|
|
12893
|
+
if (getSerializeReason(tagSection, nodeBinding)) {
|
|
12894
|
+
if (isOutputHTML()) {
|
|
12895
|
+
(0, import_babel_utils51.getProgram)().node.body.push(
|
|
12896
|
+
import_compiler62.types.markoScriptlet(
|
|
12897
|
+
[
|
|
12898
|
+
import_compiler62.types.expressionStatement(
|
|
12899
|
+
import_compiler62.types.callExpression(
|
|
12900
|
+
(0, import_babel_utils51.importNamed)(tag.hub.file, getCompatRuntimeFile(), "s"),
|
|
12901
|
+
[
|
|
12902
|
+
import_compiler62.types.identifier(tagExpression.name),
|
|
12903
|
+
import_compiler62.types.stringLiteral(
|
|
12904
|
+
(0, import_babel_utils51.loadFileForTag)(tag).metadata.marko.id
|
|
12905
|
+
)
|
|
12906
|
+
]
|
|
12907
|
+
)
|
|
12908
|
+
)
|
|
12909
|
+
],
|
|
12910
|
+
true
|
|
12911
|
+
)
|
|
12912
|
+
);
|
|
12913
|
+
} else {
|
|
12914
|
+
(0, import_babel_utils51.getProgram)().node.body.push(
|
|
12915
|
+
import_compiler62.types.expressionStatement(
|
|
12916
|
+
callRuntime(
|
|
12917
|
+
"_resume",
|
|
12918
|
+
import_compiler62.types.stringLiteral((0, import_babel_utils51.loadFileForTag)(tag).metadata.marko.id),
|
|
12919
|
+
import_compiler62.types.identifier(tagExpression.name)
|
|
12920
|
+
)
|
|
12921
|
+
)
|
|
12922
|
+
);
|
|
12923
|
+
}
|
|
12924
|
+
}
|
|
12925
|
+
} else {
|
|
12888
12926
|
(0, import_babel_utils51.getProgram)().node.body.push(
|
|
12889
12927
|
import_compiler62.types.markoScriptlet(
|
|
12890
12928
|
[
|
|
12891
12929
|
import_compiler62.types.expressionStatement(
|
|
12892
|
-
import_compiler62.types.
|
|
12893
|
-
|
|
12894
|
-
|
|
12930
|
+
import_compiler62.types.assignmentExpression(
|
|
12931
|
+
"??=",
|
|
12932
|
+
import_compiler62.types.memberExpression(
|
|
12895
12933
|
import_compiler62.types.identifier(tagExpression.name),
|
|
12896
|
-
import_compiler62.types.
|
|
12897
|
-
|
|
12934
|
+
import_compiler62.types.identifier("_")
|
|
12935
|
+
),
|
|
12936
|
+
import_compiler62.types.identifier(tagExpression.name)
|
|
12898
12937
|
)
|
|
12899
12938
|
)
|
|
12900
12939
|
],
|
|
12901
12940
|
true
|
|
12902
12941
|
)
|
|
12903
12942
|
);
|
|
12904
|
-
} else {
|
|
12905
|
-
(0, import_babel_utils51.getProgram)().node.body.push(
|
|
12906
|
-
import_compiler62.types.expressionStatement(
|
|
12907
|
-
callRuntime(
|
|
12908
|
-
"_resume",
|
|
12909
|
-
import_compiler62.types.stringLiteral((0, import_babel_utils51.loadFileForTag)(tag).metadata.marko.id),
|
|
12910
|
-
import_compiler62.types.identifier(tagExpression.name)
|
|
12911
|
-
)
|
|
12912
|
-
)
|
|
12913
|
-
);
|
|
12914
12943
|
}
|
|
12915
12944
|
}
|
|
12916
12945
|
const { properties, statements } = translateAttrs(
|