@jay-framework/compiler-jay-html 0.19.8 → 0.21.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.d.cts +1 -0
- package/dist/index.js +29 -7
- package/package.json +9 -9
package/dist/index.d.cts
CHANGED
package/dist/index.js
CHANGED
|
@@ -19715,10 +19715,22 @@ function parseProp(prop) {
|
|
|
19715
19715
|
return new WithValidations(void 0, validations);
|
|
19716
19716
|
}
|
|
19717
19717
|
const description = parseDescription(prop.description);
|
|
19718
|
+
let phase = "slow";
|
|
19719
|
+
if (prop.phase) {
|
|
19720
|
+
const validPhases = ["slow", "fast", "fast+interactive"];
|
|
19721
|
+
if (!validPhases.includes(prop.phase)) {
|
|
19722
|
+
validations.push(
|
|
19723
|
+
`Prop [${prop.name}] has invalid phase [${prop.phase}]. Valid phases are: ${validPhases.join(", ")}`
|
|
19724
|
+
);
|
|
19725
|
+
} else {
|
|
19726
|
+
phase = prop.phase;
|
|
19727
|
+
}
|
|
19728
|
+
}
|
|
19718
19729
|
const contractProp = {
|
|
19719
19730
|
name: prop.name,
|
|
19720
19731
|
dataType,
|
|
19721
19732
|
...prop.required && { required: prop.required },
|
|
19733
|
+
phase,
|
|
19722
19734
|
...description && { description },
|
|
19723
19735
|
...prop.default !== void 0 && { default: prop.default }
|
|
19724
19736
|
};
|
|
@@ -20681,14 +20693,24 @@ function renderHydrate(types2, body, importStatements, elementType, preRenderTyp
|
|
|
20681
20693
|
if (!rootElement.val) {
|
|
20682
20694
|
return new RenderFragment("", Imports.none(), rootElement.validations);
|
|
20683
20695
|
}
|
|
20684
|
-
|
|
20685
|
-
rootElement.val,
|
|
20686
|
-
context,
|
|
20687
|
-
|
|
20688
|
-
null,
|
|
20689
|
-
true
|
|
20690
|
-
// forceAdopt — root element always needs adoption
|
|
20696
|
+
const rootComponentMatch = getComponentName(
|
|
20697
|
+
rootElement.val.rawTagName,
|
|
20698
|
+
context.importedSymbols,
|
|
20699
|
+
context.headlessContractNames
|
|
20691
20700
|
);
|
|
20701
|
+
let renderedHydrate;
|
|
20702
|
+
if (rootComponentMatch !== null && rootComponentMatch.kind === "headless-instance") {
|
|
20703
|
+
renderedHydrate = renderHydrateElement(rootElement.val, context);
|
|
20704
|
+
} else {
|
|
20705
|
+
renderedHydrate = renderHydrateElementContent(
|
|
20706
|
+
rootElement.val,
|
|
20707
|
+
context,
|
|
20708
|
+
buildRenderContext(context),
|
|
20709
|
+
null,
|
|
20710
|
+
true
|
|
20711
|
+
// forceAdopt — root element always needs adoption
|
|
20712
|
+
);
|
|
20713
|
+
}
|
|
20692
20714
|
renderedHydrate = optimizeRefs(renderedHydrate, headlessImports);
|
|
20693
20715
|
const { renderedRefsManager, refsManagerImport } = renderReferenceManager(
|
|
20694
20716
|
renderedHydrate.refs,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jay-framework/compiler-jay-html",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.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.21.0",
|
|
38
|
+
"@jay-framework/compiler-shared": "^0.21.0",
|
|
39
|
+
"@jay-framework/component": "^0.21.0",
|
|
40
|
+
"@jay-framework/logger": "^0.21.0",
|
|
41
|
+
"@jay-framework/runtime": "^0.21.0",
|
|
42
|
+
"@jay-framework/secure": "^0.21.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.21.0",
|
|
56
|
+
"@jay-framework/dev-environment": "^0.21.0",
|
|
57
57
|
"@testing-library/jest-dom": "^6.2.0",
|
|
58
58
|
"@types/js-beautify": "^1",
|
|
59
59
|
"@types/node": "^20.11.5",
|