@jay-framework/stack-client-runtime 0.15.4 → 0.15.6
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.cjs +17 -3
- package/dist/index.js +17 -3
- package/package.json +8 -8
package/dist/index.cjs
CHANGED
|
@@ -122,9 +122,23 @@ function makeHeadlessInstanceComponent(preRender, componentDef, coordinateKey) {
|
|
|
122
122
|
...pluginResolvedContexts
|
|
123
123
|
);
|
|
124
124
|
const originalRender = compCore.render;
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
const isHydrating = runtime.currentConstructionContext()?.isHydrating;
|
|
126
|
+
if (isHydrating) {
|
|
127
|
+
const [hydrationDone, setHydrationDone] = component.createSignal(false);
|
|
128
|
+
compCore.render = () => {
|
|
129
|
+
const done = hydrationDone();
|
|
130
|
+
const clientVS = { ...resolvedFastVS, ...originalRender() };
|
|
131
|
+
if (!done) {
|
|
132
|
+
setHydrationDone(true);
|
|
133
|
+
return resolvedFastVS;
|
|
134
|
+
}
|
|
135
|
+
return clientVS;
|
|
136
|
+
};
|
|
137
|
+
} else {
|
|
138
|
+
compCore.render = () => {
|
|
139
|
+
return { ...resolvedFastVS, ...originalRender() };
|
|
140
|
+
};
|
|
141
|
+
}
|
|
128
142
|
return compCore;
|
|
129
143
|
};
|
|
130
144
|
return component.makeJayComponent(preRender, wrappedConstructor, ...resolvedContexts);
|
package/dist/index.js
CHANGED
|
@@ -120,9 +120,23 @@ function makeHeadlessInstanceComponent(preRender, componentDef, coordinateKey) {
|
|
|
120
120
|
...pluginResolvedContexts
|
|
121
121
|
);
|
|
122
122
|
const originalRender = compCore.render;
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
const isHydrating = currentConstructionContext()?.isHydrating;
|
|
124
|
+
if (isHydrating) {
|
|
125
|
+
const [hydrationDone, setHydrationDone] = createSignal(false);
|
|
126
|
+
compCore.render = () => {
|
|
127
|
+
const done = hydrationDone();
|
|
128
|
+
const clientVS = { ...resolvedFastVS, ...originalRender() };
|
|
129
|
+
if (!done) {
|
|
130
|
+
setHydrationDone(true);
|
|
131
|
+
return resolvedFastVS;
|
|
132
|
+
}
|
|
133
|
+
return clientVS;
|
|
134
|
+
};
|
|
135
|
+
} else {
|
|
136
|
+
compCore.render = () => {
|
|
137
|
+
return { ...resolvedFastVS, ...originalRender() };
|
|
138
|
+
};
|
|
139
|
+
}
|
|
126
140
|
return compCore;
|
|
127
141
|
};
|
|
128
142
|
return makeJayComponent(preRender, wrappedConstructor, ...resolvedContexts);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jay-framework/stack-client-runtime",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -27,15 +27,15 @@
|
|
|
27
27
|
"test:watch": "vitest"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@jay-framework/component": "^0.15.
|
|
31
|
-
"@jay-framework/fullstack-component": "^0.15.
|
|
32
|
-
"@jay-framework/runtime": "^0.15.
|
|
33
|
-
"@jay-framework/runtime-automation": "^0.15.
|
|
34
|
-
"@jay-framework/view-state-merge": "^0.15.
|
|
30
|
+
"@jay-framework/component": "^0.15.6",
|
|
31
|
+
"@jay-framework/fullstack-component": "^0.15.6",
|
|
32
|
+
"@jay-framework/runtime": "^0.15.6",
|
|
33
|
+
"@jay-framework/runtime-automation": "^0.15.6",
|
|
34
|
+
"@jay-framework/view-state-merge": "^0.15.6"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@jay-framework/dev-environment": "^0.15.
|
|
38
|
-
"@jay-framework/jay-cli": "^0.15.
|
|
37
|
+
"@jay-framework/dev-environment": "^0.15.6",
|
|
38
|
+
"@jay-framework/jay-cli": "^0.15.6",
|
|
39
39
|
"@types/express": "^5.0.2",
|
|
40
40
|
"@types/node": "^22.15.21",
|
|
41
41
|
"nodemon": "^3.0.3",
|