@absolutejs/absolute 0.19.0-beta.396 → 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/angular/index.js +2 -2
- package/dist/angular/index.js.map +1 -1
- package/dist/angular/server.js +2 -2
- package/dist/angular/server.js.map +1 -1
- package/dist/build.js +30 -8
- package/dist/build.js.map +5 -5
- package/dist/index.js +30 -8
- package/dist/index.js.map +5 -5
- 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/build.js
CHANGED
|
@@ -172081,7 +172081,9 @@ if (isHMR) {
|
|
|
172081
172081
|
}
|
|
172082
172082
|
component = mount(Component, { target, props: mergedProps });
|
|
172083
172083
|
window.__HMR_PRESERVED_STATE__ = undefined;
|
|
172084
|
-
} else if (
|
|
172084
|
+
} else if (!shouldHydrate) {
|
|
172085
|
+
component = undefined;
|
|
172086
|
+
} else if (isSsrDirty || hasIslandHtml) {
|
|
172085
172087
|
component = mount(Component, { target, props: initialProps });
|
|
172086
172088
|
} else {
|
|
172087
172089
|
component = hydrate(Component, { target, props: initialProps });
|
|
@@ -172089,7 +172091,7 @@ if (isHMR) {
|
|
|
172089
172091
|
|
|
172090
172092
|
if (typeof window !== "undefined") {
|
|
172091
172093
|
window.__SVELTE_COMPONENT__ = component;
|
|
172092
|
-
window.__SVELTE_UNMOUNT__ = function() { unmount(component); };
|
|
172094
|
+
window.__SVELTE_UNMOUNT__ = function() { if (component) { unmount(component); } };
|
|
172093
172095
|
window.__ABS_SLOT_HYDRATION_PENDING__ = shouldHydrate;
|
|
172094
172096
|
var releaseStreamingSlots = function() {
|
|
172095
172097
|
window.__ABS_SLOT_HYDRATION_PENDING__ = false;
|
|
@@ -172435,7 +172437,8 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
|
|
|
172435
172437
|
"// During HMR or after SSR dirty, use createApp (fresh mount) to avoid hydration mismatch with stale DOM",
|
|
172436
172438
|
'const isHMR = typeof window !== "undefined" && sessionStorage.getItem("__HMR_ACTIVE__");',
|
|
172437
172439
|
'const isSsrDirty = typeof window !== "undefined" && window.__SSR_DIRTY__;',
|
|
172438
|
-
|
|
172440
|
+
'const shouldHydrate = typeof window === "undefined" ? false : !(isHMR || isSsrDirty);',
|
|
172441
|
+
"const app = shouldHydrate ? createSSRApp(Comp, mergedProps) : createApp(Comp, mergedProps);",
|
|
172439
172442
|
'app.mount("#root");',
|
|
172440
172443
|
"",
|
|
172441
172444
|
"// Store app instance for HMR - used for manual component updates",
|
|
@@ -172489,6 +172492,24 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
|
|
|
172489
172492
|
"",
|
|
172490
172493
|
"// Clear preserved state after applying",
|
|
172491
172494
|
'if (typeof window !== "undefined") {',
|
|
172495
|
+
" window.__ABS_SLOT_HYDRATION_PENDING__ = shouldHydrate;",
|
|
172496
|
+
" var releaseStreamingSlots = function() {",
|
|
172497
|
+
" window.__ABS_SLOT_HYDRATION_PENDING__ = false;",
|
|
172498
|
+
' if (typeof window.__ABS_SLOT_FLUSH__ === "function") {',
|
|
172499
|
+
" window.__ABS_SLOT_FLUSH__();",
|
|
172500
|
+
" }",
|
|
172501
|
+
" };",
|
|
172502
|
+
' if (shouldHydrate && typeof requestAnimationFrame === "function") {',
|
|
172503
|
+
" requestAnimationFrame(function() {",
|
|
172504
|
+
" requestAnimationFrame(releaseStreamingSlots);",
|
|
172505
|
+
" });",
|
|
172506
|
+
' } else if (typeof window.__ABS_SLOT_FLUSH__ === "function") {',
|
|
172507
|
+
" window.__ABS_SLOT_FLUSH__();",
|
|
172508
|
+
' } else if (typeof setTimeout === "function") {',
|
|
172509
|
+
" setTimeout(releaseStreamingSlots, 0);",
|
|
172510
|
+
" }",
|
|
172511
|
+
"}",
|
|
172512
|
+
'if (typeof window !== "undefined") {',
|
|
172492
172513
|
" window.__HMR_PRESERVED_STATE__ = undefined;",
|
|
172493
172514
|
"}"
|
|
172494
172515
|
].join(`
|
|
@@ -172678,7 +172699,7 @@ ${registrations}
|
|
|
172678
172699
|
({ tsLibDir } = cached);
|
|
172679
172700
|
cached.lastUsed = Date.now();
|
|
172680
172701
|
} else {
|
|
172681
|
-
const tsPath = __require.resolve("typescript");
|
|
172702
|
+
const tsPath = __require.resolve("/home/alexkahn/abs/absolutejs/node_modules/typescript/lib/typescript.js");
|
|
172682
172703
|
const tsRootDir = dirname8(tsPath);
|
|
172683
172704
|
tsLibDir = tsRootDir.endsWith("lib") ? tsRootDir : resolve15(tsRootDir, "lib");
|
|
172684
172705
|
const config = readConfiguration("./tsconfig.json");
|
|
@@ -176352,7 +176373,7 @@ var init_pageHandler3 = __esm(() => {
|
|
|
176352
176373
|
// src/vue/pageHandler.ts
|
|
176353
176374
|
import { readdir as readdir4 } from "fs/promises";
|
|
176354
176375
|
import { basename as basename11, dirname as dirname11 } from "path";
|
|
176355
|
-
var ssrDirty4 = false, isRecord8 = (value) => typeof value === "object" && value !== null, isGenericVueComponent = (value) => typeof value === "function" || isRecord8(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>`, isRecord8 = (value) => typeof value === "object" && value !== null, isGenericVueComponent = (value) => typeof value === "function" || isRecord8(value), readHasIslands2 = (value) => {
|
|
176356
176377
|
if (!isRecord8(value))
|
|
176357
176378
|
return false;
|
|
176358
176379
|
const hasIslands = value["__ABSOLUTE_PAGE_HAS_ISLANDS__"];
|
|
@@ -176374,8 +176395,9 @@ var ssrDirty4 = false, isRecord8 = (value) => typeof value === "object" && value
|
|
|
176374
176395
|
}
|
|
176375
176396
|
}, buildDirtyResponse3 = (headTag, indexPath, maybeProps) => {
|
|
176376
176397
|
const propsScript = `window.__INITIAL_PROPS__=${JSON.stringify(maybeProps ?? {})};`;
|
|
176398
|
+
const hydratedHead = injectSlotPreamble(headTag);
|
|
176377
176399
|
const dirtyFlag = "window.__SSR_DIRTY__=true;";
|
|
176378
|
-
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>`;
|
|
176379
176401
|
return new Response(html, {
|
|
176380
176402
|
headers: { "Content-Type": "text/html" }
|
|
176381
176403
|
});
|
|
@@ -176411,7 +176433,7 @@ var ssrDirty4 = false, isRecord8 = (value) => typeof value === "object" && value
|
|
|
176411
176433
|
render: () => h2(resolvedPage.component, maybeProps ?? null)
|
|
176412
176434
|
});
|
|
176413
176435
|
const bodyStream = renderToWebStream(app);
|
|
176414
|
-
const head = `<!DOCTYPE html><html>${headTag}<body><div id="root">`;
|
|
176436
|
+
const head = `<!DOCTYPE html><html>${injectSlotPreamble(headTag)}<body><div id="root">`;
|
|
176415
176437
|
const tail = `</div><script>window.__INITIAL_PROPS__=${JSON.stringify(maybeProps ?? {})}</script><script type="module" src="${indexPath}"></script></body></html>`;
|
|
176416
176438
|
const stream = new ReadableStream({
|
|
176417
176439
|
start(controller) {
|
|
@@ -179217,5 +179239,5 @@ export {
|
|
|
179217
179239
|
build
|
|
179218
179240
|
};
|
|
179219
179241
|
|
|
179220
|
-
//# debugId=
|
|
179242
|
+
//# debugId=290EF2188A08E67164756E2164756E21
|
|
179221
179243
|
//# sourceMappingURL=build.js.map
|