@absolutejs/absolute 0.19.0-beta.397 → 0.19.0-beta.398
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/build.js +25 -5
- package/dist/build.js.map +4 -4
- package/dist/index.js +25 -5
- package/dist/index.js.map +4 -4
- package/dist/vue/index.js +5 -4
- package/dist/vue/index.js.map +3 -3
- package/dist/vue/server.js +5 -4
- package/dist/vue/server.js.map +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -173018,7 +173018,8 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
|
|
|
173018
173018
|
"// During HMR or after SSR dirty, use createApp (fresh mount) to avoid hydration mismatch with stale DOM",
|
|
173019
173019
|
'const isHMR = typeof window !== "undefined" && sessionStorage.getItem("__HMR_ACTIVE__");',
|
|
173020
173020
|
'const isSsrDirty = typeof window !== "undefined" && window.__SSR_DIRTY__;',
|
|
173021
|
-
|
|
173021
|
+
'const shouldHydrate = typeof window === "undefined" ? false : !(isHMR || isSsrDirty);',
|
|
173022
|
+
"const app = shouldHydrate ? createSSRApp(Comp, mergedProps) : createApp(Comp, mergedProps);",
|
|
173022
173023
|
'app.mount("#root");',
|
|
173023
173024
|
"",
|
|
173024
173025
|
"// Store app instance for HMR - used for manual component updates",
|
|
@@ -173072,6 +173073,24 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
|
|
|
173072
173073
|
"",
|
|
173073
173074
|
"// Clear preserved state after applying",
|
|
173074
173075
|
'if (typeof window !== "undefined") {',
|
|
173076
|
+
" window.__ABS_SLOT_HYDRATION_PENDING__ = shouldHydrate;",
|
|
173077
|
+
" var releaseStreamingSlots = function() {",
|
|
173078
|
+
" window.__ABS_SLOT_HYDRATION_PENDING__ = false;",
|
|
173079
|
+
' if (typeof window.__ABS_SLOT_FLUSH__ === "function") {',
|
|
173080
|
+
" window.__ABS_SLOT_FLUSH__();",
|
|
173081
|
+
" }",
|
|
173082
|
+
" };",
|
|
173083
|
+
' if (shouldHydrate && typeof requestAnimationFrame === "function") {',
|
|
173084
|
+
" requestAnimationFrame(function() {",
|
|
173085
|
+
" requestAnimationFrame(releaseStreamingSlots);",
|
|
173086
|
+
" });",
|
|
173087
|
+
' } else if (typeof window.__ABS_SLOT_FLUSH__ === "function") {',
|
|
173088
|
+
" window.__ABS_SLOT_FLUSH__();",
|
|
173089
|
+
' } else if (typeof setTimeout === "function") {',
|
|
173090
|
+
" setTimeout(releaseStreamingSlots, 0);",
|
|
173091
|
+
" }",
|
|
173092
|
+
"}",
|
|
173093
|
+
'if (typeof window !== "undefined") {',
|
|
173075
173094
|
" window.__HMR_PRESERVED_STATE__ = undefined;",
|
|
173076
173095
|
"}"
|
|
173077
173096
|
].join(`
|
|
@@ -176354,7 +176373,7 @@ var init_pageHandler3 = __esm(() => {
|
|
|
176354
176373
|
// src/vue/pageHandler.ts
|
|
176355
176374
|
import { readdir as readdir4 } from "fs/promises";
|
|
176356
176375
|
import { basename as basename11, dirname as dirname11 } from "path";
|
|
176357
|
-
var ssrDirty4 = false, isRecord9 = (value) => typeof value === "object" && value !== null, isGenericVueComponent = (value) => typeof value === "function" || isRecord9(value), readHasIslands2 = (value) => {
|
|
176376
|
+
var ssrDirty4 = false, hydrateSlotPreamble = "window.__ABS_SLOT_HYDRATION_PENDING__=true;", injectSlotPreamble = (headTag) => headTag.includes("</head>") ? headTag.replace("</head>", `<script>${hydrateSlotPreamble}</script></head>`) : `${headTag}<script>${hydrateSlotPreamble}</script>`, isRecord9 = (value) => typeof value === "object" && value !== null, isGenericVueComponent = (value) => typeof value === "function" || isRecord9(value), readHasIslands2 = (value) => {
|
|
176358
176377
|
if (!isRecord9(value))
|
|
176359
176378
|
return false;
|
|
176360
176379
|
const hasIslands = value["__ABSOLUTE_PAGE_HAS_ISLANDS__"];
|
|
@@ -176376,8 +176395,9 @@ var ssrDirty4 = false, isRecord9 = (value) => typeof value === "object" && value
|
|
|
176376
176395
|
}
|
|
176377
176396
|
}, buildDirtyResponse3 = (headTag, indexPath, maybeProps) => {
|
|
176378
176397
|
const propsScript = `window.__INITIAL_PROPS__=${JSON.stringify(maybeProps ?? {})};`;
|
|
176398
|
+
const hydratedHead = injectSlotPreamble(headTag);
|
|
176379
176399
|
const dirtyFlag = "window.__SSR_DIRTY__=true;";
|
|
176380
|
-
const html = `<!DOCTYPE html><html>${
|
|
176400
|
+
const html = `<!DOCTYPE html><html>${hydratedHead}<body><div id="root"></div>` + `<script>${propsScript}${dirtyFlag}</script>` + `<script type="module" src="${indexPath}"></script>` + `</body></html>`;
|
|
176381
176401
|
return new Response(html, {
|
|
176382
176402
|
headers: { "Content-Type": "text/html" }
|
|
176383
176403
|
});
|
|
@@ -176413,7 +176433,7 @@ var ssrDirty4 = false, isRecord9 = (value) => typeof value === "object" && value
|
|
|
176413
176433
|
render: () => h2(resolvedPage.component, maybeProps ?? null)
|
|
176414
176434
|
});
|
|
176415
176435
|
const bodyStream = renderToWebStream(app);
|
|
176416
|
-
const head = `<!DOCTYPE html><html>${headTag}<body><div id="root">`;
|
|
176436
|
+
const head = `<!DOCTYPE html><html>${injectSlotPreamble(headTag)}<body><div id="root">`;
|
|
176417
176437
|
const tail = `</div><script>window.__INITIAL_PROPS__=${JSON.stringify(maybeProps ?? {})}</script><script type="module" src="${indexPath}"></script></body></html>`;
|
|
176418
176438
|
const stream = new ReadableStream({
|
|
176419
176439
|
start(controller) {
|
|
@@ -187590,5 +187610,5 @@ export {
|
|
|
187590
187610
|
ANGULAR_INIT_TIMEOUT_MS
|
|
187591
187611
|
};
|
|
187592
187612
|
|
|
187593
|
-
//# debugId=
|
|
187613
|
+
//# debugId=900D9DFBBCD14BB164756E2164756E21
|
|
187594
187614
|
//# sourceMappingURL=index.js.map
|