@jay-framework/compiler-jay-html 0.19.7 → 0.20.0
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 +20 -4
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -20502,7 +20502,21 @@ function renderHydrateElementContent(element, context, renderContext, coordinate
|
|
|
20502
20502
|
childRefs.push(frag.refs);
|
|
20503
20503
|
}
|
|
20504
20504
|
} else {
|
|
20505
|
-
const
|
|
20505
|
+
const htmlChild2 = child;
|
|
20506
|
+
const isComponent = getComponentName(
|
|
20507
|
+
htmlChild2.rawTagName,
|
|
20508
|
+
context.importedSymbols,
|
|
20509
|
+
context.headlessContractNames
|
|
20510
|
+
) !== null;
|
|
20511
|
+
const isNonInteractiveConditional = isConditional(htmlChild2) && !conditionIsInteractive(htmlChild2.getAttribute("if"), context.interactivePaths);
|
|
20512
|
+
const needsWrap = !isComponent && !isNonInteractiveConditional;
|
|
20513
|
+
const frag = needsWrap ? renderHydrateElementContent(
|
|
20514
|
+
htmlChild2,
|
|
20515
|
+
context,
|
|
20516
|
+
buildRenderContext(context),
|
|
20517
|
+
null,
|
|
20518
|
+
true
|
|
20519
|
+
) : renderHydrateNode(child, context);
|
|
20506
20520
|
if (frag.rendered.trim()) {
|
|
20507
20521
|
childParts.push(frag.rendered);
|
|
20508
20522
|
childImports = childImports.plus(frag.imports);
|
|
@@ -22987,7 +23001,7 @@ function renderServerElementContent(element, context, options) {
|
|
|
22987
23001
|
}
|
|
22988
23002
|
}
|
|
22989
23003
|
const refName = element.attributes.ref ? camelCase(element.attributes.ref) : null;
|
|
22990
|
-
const needsCoordinate = options?.isRoot === true || isConditional(element) || dynamicTextFragment !== null || refName !== null || hasDynamicAttributeBindings(element, variables) || hasInteractiveChildElements(childNodes) || hasMixedContentDynamicTextInteractive(childNodes, context.interactivePaths);
|
|
23004
|
+
const needsCoordinate = options?.isRoot === true || isConditional(element) || dynamicTextFragment !== null || refName !== null || hasDynamicAttributeBindings(element, variables) || hasInteractiveChildElements(childNodes) || hasMixedContentDynamicTextInteractive(childNodes, context.interactivePaths) || context.parentHasInteractiveChildren;
|
|
22991
23005
|
const coordTemplate = needsCoordinate ? element.getAttribute(COORD_ATTR) : null;
|
|
22992
23006
|
const isVoid = voidElements.has(element.rawTagName.toLowerCase());
|
|
22993
23007
|
const closeTag = isVoid ? " />" : ">";
|
|
@@ -23025,7 +23039,8 @@ function renderServerElementContent(element, context, options) {
|
|
|
23025
23039
|
} else {
|
|
23026
23040
|
const childContext = {
|
|
23027
23041
|
...context,
|
|
23028
|
-
indent: new Indent(indent.curr + " ")
|
|
23042
|
+
indent: new Indent(indent.curr + " "),
|
|
23043
|
+
parentHasInteractiveChildren: hasInteractiveChildElements(childNodes)
|
|
23029
23044
|
};
|
|
23030
23045
|
const asyncGroups = collectAsyncGroups(childNodes);
|
|
23031
23046
|
const processedAsyncProps = /* @__PURE__ */ new Set();
|
|
@@ -23176,7 +23191,8 @@ function generateServerElementFile(jayFile, _options) {
|
|
|
23176
23191
|
headlessInstanceCounter: { count: 0 },
|
|
23177
23192
|
varMappings: {},
|
|
23178
23193
|
insideForEach: false,
|
|
23179
|
-
interactivePaths: buildInteractivePaths(jayFile.contract)
|
|
23194
|
+
interactivePaths: buildInteractivePaths(jayFile.contract),
|
|
23195
|
+
parentHasInteractiveChildren: false
|
|
23180
23196
|
};
|
|
23181
23197
|
const rendered = renderServerElementContent(rootElement.val, context, {
|
|
23182
23198
|
isRoot: true
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jay-framework/compiler-jay-html",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
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.
|
|
38
|
-
"@jay-framework/compiler-shared": "^0.
|
|
39
|
-
"@jay-framework/component": "^0.
|
|
40
|
-
"@jay-framework/logger": "^0.
|
|
41
|
-
"@jay-framework/runtime": "^0.
|
|
42
|
-
"@jay-framework/secure": "^0.
|
|
37
|
+
"@jay-framework/compiler-analyze-exported-types": "^0.20.0",
|
|
38
|
+
"@jay-framework/compiler-shared": "^0.20.0",
|
|
39
|
+
"@jay-framework/component": "^0.20.0",
|
|
40
|
+
"@jay-framework/logger": "^0.20.0",
|
|
41
|
+
"@jay-framework/runtime": "^0.20.0",
|
|
42
|
+
"@jay-framework/secure": "^0.20.0",
|
|
43
43
|
"@types/js-yaml": "^4.0.9",
|
|
44
44
|
"change-case": "^4.1.2",
|
|
45
45
|
"he": "^1.2.0",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@caiogondim/strip-margin": "^1.0.0",
|
|
55
|
-
"@jay-framework/4-react": "^0.
|
|
56
|
-
"@jay-framework/dev-environment": "^0.
|
|
55
|
+
"@jay-framework/4-react": "^0.20.0",
|
|
56
|
+
"@jay-framework/dev-environment": "^0.20.0",
|
|
57
57
|
"@testing-library/jest-dom": "^6.2.0",
|
|
58
58
|
"@types/js-beautify": "^1",
|
|
59
59
|
"@types/node": "^20.11.5",
|