@jay-framework/compiler-jay-html 0.15.0 → 0.15.2
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/index.js +9 -7
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -21729,6 +21729,7 @@ function renderServerElementAsString(element, context, overrideCoordinate) {
|
|
|
21729
21729
|
const coordTemplate = element.getAttribute(COORD_ATTR);
|
|
21730
21730
|
const coordinate = coordTemplate || (needsCoordinate ? overrideCoordinate || null : null);
|
|
21731
21731
|
const isVoid = voidElements.has(element.rawTagName.toLowerCase());
|
|
21732
|
+
const closeTag = isVoid ? " />" : ">";
|
|
21732
21733
|
const stringParts = [];
|
|
21733
21734
|
stringParts.push(new RenderFragment(`'<${element.rawTagName}'`));
|
|
21734
21735
|
const attrs = renderServerAttributesAsString(element, context);
|
|
@@ -21736,9 +21737,9 @@ function renderServerElementAsString(element, context, overrideCoordinate) {
|
|
|
21736
21737
|
stringParts.push(attrs);
|
|
21737
21738
|
}
|
|
21738
21739
|
if (coordinate !== null) {
|
|
21739
|
-
stringParts.push(new RenderFragment(`' jay-coordinate="${coordinate}"
|
|
21740
|
+
stringParts.push(new RenderFragment(`' jay-coordinate="${coordinate}"${closeTag}'`));
|
|
21740
21741
|
} else {
|
|
21741
|
-
stringParts.push(new RenderFragment(`'
|
|
21742
|
+
stringParts.push(new RenderFragment(`'${closeTag}'`));
|
|
21742
21743
|
}
|
|
21743
21744
|
if (!isVoid) {
|
|
21744
21745
|
if (dynamicTextFragment) {
|
|
@@ -21902,6 +21903,7 @@ function renderServerElementContent(element, context, options) {
|
|
|
21902
21903
|
const needsCoordinate = options?.isRoot === true || isConditional(element) && conditionIsInteractive(element.getAttribute("if"), context.interactivePaths) || dynamicTextFragment !== null || refName !== null || hasDynamicAttributeBindings(element, variables) || hasInteractiveChildElements(childNodes) || hasMixedContentDynamicTextInteractive(childNodes, context.interactivePaths);
|
|
21903
21904
|
const coordTemplate = needsCoordinate ? element.getAttribute(COORD_ATTR) : null;
|
|
21904
21905
|
const isVoid = voidElements.has(element.rawTagName.toLowerCase());
|
|
21906
|
+
const closeTag = isVoid ? " />" : ">";
|
|
21905
21907
|
const parts = [];
|
|
21906
21908
|
parts.push(w(indent, `'<${element.rawTagName}'`));
|
|
21907
21909
|
const attrs = renderServerAttributes(element, context);
|
|
@@ -21914,12 +21916,12 @@ function renderServerElementContent(element, context, options) {
|
|
|
21914
21916
|
parts.push(
|
|
21915
21917
|
w(
|
|
21916
21918
|
indent,
|
|
21917
|
-
`' jay-coordinate="' + ${context.forEachAccumulatedPrefix} + '/${coordTemplate}"
|
|
21919
|
+
`' jay-coordinate="' + ${context.forEachAccumulatedPrefix} + '/${coordTemplate}"${closeTag}'`,
|
|
21918
21920
|
Imports.for(Import.escapeAttr)
|
|
21919
21921
|
)
|
|
21920
21922
|
);
|
|
21921
21923
|
} else {
|
|
21922
|
-
parts.push(w(indent, `' jay-coordinate="${coordTemplate}"
|
|
21924
|
+
parts.push(w(indent, `' jay-coordinate="${coordTemplate}"${closeTag}'`));
|
|
21923
21925
|
}
|
|
21924
21926
|
} else {
|
|
21925
21927
|
const coordExpr = compileCoordinateExpr(coordTemplate, context.varMappings);
|
|
@@ -21927,7 +21929,7 @@ function renderServerElementContent(element, context, options) {
|
|
|
21927
21929
|
parts.push(
|
|
21928
21930
|
w(
|
|
21929
21931
|
indent,
|
|
21930
|
-
`' jay-coordinate="' + ${context.forEachAncestorPrefix} + '/' + ${coordExpr} + '"
|
|
21932
|
+
`' jay-coordinate="' + ${context.forEachAncestorPrefix} + '/' + ${coordExpr} + '"${closeTag}'`,
|
|
21931
21933
|
Imports.for(Import.escapeAttr)
|
|
21932
21934
|
)
|
|
21933
21935
|
);
|
|
@@ -21935,14 +21937,14 @@ function renderServerElementContent(element, context, options) {
|
|
|
21935
21937
|
parts.push(
|
|
21936
21938
|
w(
|
|
21937
21939
|
indent,
|
|
21938
|
-
`' jay-coordinate="' + ${coordExpr} + '"
|
|
21940
|
+
`' jay-coordinate="' + ${coordExpr} + '"${closeTag}'`,
|
|
21939
21941
|
Imports.for(Import.escapeAttr)
|
|
21940
21942
|
)
|
|
21941
21943
|
);
|
|
21942
21944
|
}
|
|
21943
21945
|
}
|
|
21944
21946
|
} else {
|
|
21945
|
-
parts.push(w(indent, `'
|
|
21947
|
+
parts.push(w(indent, `'${closeTag}'`));
|
|
21946
21948
|
}
|
|
21947
21949
|
if (isVoid)
|
|
21948
21950
|
return mergeServerFragments(parts);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jay-framework/compiler-jay-html",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
},
|
|
35
35
|
"author": "",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@jay-framework/compiler-analyze-exported-types": "^0.15.
|
|
38
|
-
"@jay-framework/compiler-shared": "^0.15.
|
|
39
|
-
"@jay-framework/component": "^0.15.
|
|
40
|
-
"@jay-framework/logger": "^0.15.
|
|
41
|
-
"@jay-framework/runtime": "^0.15.
|
|
42
|
-
"@jay-framework/secure": "^0.15.
|
|
37
|
+
"@jay-framework/compiler-analyze-exported-types": "^0.15.2",
|
|
38
|
+
"@jay-framework/compiler-shared": "^0.15.2",
|
|
39
|
+
"@jay-framework/component": "^0.15.2",
|
|
40
|
+
"@jay-framework/logger": "^0.15.2",
|
|
41
|
+
"@jay-framework/runtime": "^0.15.2",
|
|
42
|
+
"@jay-framework/secure": "^0.15.2",
|
|
43
43
|
"@types/js-yaml": "^4.0.9",
|
|
44
44
|
"change-case": "^4.1.2",
|
|
45
45
|
"js-yaml": "^4.1.0",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@caiogondim/strip-margin": "^1.0.0",
|
|
54
|
-
"@jay-framework/4-react": "^0.15.
|
|
55
|
-
"@jay-framework/dev-environment": "^0.15.
|
|
54
|
+
"@jay-framework/4-react": "^0.15.2",
|
|
55
|
+
"@jay-framework/dev-environment": "^0.15.2",
|
|
56
56
|
"@testing-library/jest-dom": "^6.2.0",
|
|
57
57
|
"@types/js-beautify": "^1",
|
|
58
58
|
"@types/node": "^20.11.5",
|