@absolutejs/absolute 0.19.0-beta.395 → 0.19.0-beta.397
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 +22 -11
- package/dist/build.js.map +3 -3
- package/dist/index.js +22 -11
- package/dist/index.js.map +3 -3
- package/dist/src/build/compileSvelte.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -172515,7 +172515,8 @@ var resolveDevClientDir2 = () => {
|
|
|
172515
172515
|
const resolvedModuleImports = await Promise.all(importPaths.map((importPath) => resolveRelativeModule2(importPath, src)));
|
|
172516
172516
|
const resolvedImports = await Promise.all(importPaths.map((importPath) => resolveSvelte(importPath, src)));
|
|
172517
172517
|
const childSources = resolvedImports.filter((path) => path !== null);
|
|
172518
|
-
await Promise.all(childSources.map((child) => build2(child)));
|
|
172518
|
+
const childBuilt = await Promise.all(childSources.map((child) => build2(child)));
|
|
172519
|
+
const hasAwaitSlotFromChildren = childBuilt.some((child) => child.hasAwaitSlot);
|
|
172519
172520
|
const externalRewrites = new Map;
|
|
172520
172521
|
const ssrOutputDir = dirname7(join11(serverDir, relDir, `${baseName}.js`));
|
|
172521
172522
|
const clientOutputDir = dirname7(join11(clientDir, relDir, `${baseName}.js`));
|
|
@@ -172532,12 +172533,12 @@ var resolveDevClientDir2 = () => {
|
|
|
172532
172533
|
const childRel = relative6(svelteRoot, resolved).replace(/\\/g, "/");
|
|
172533
172534
|
if (!childRel.startsWith(".."))
|
|
172534
172535
|
continue;
|
|
172535
|
-
const
|
|
172536
|
-
if (!
|
|
172536
|
+
const childBuilt2 = cache.get(resolved);
|
|
172537
|
+
if (!childBuilt2)
|
|
172537
172538
|
continue;
|
|
172538
172539
|
const origSpec = rawSpec.replace(/\.svelte(?:\.(?:ts|js))?$/, ".js");
|
|
172539
|
-
const toServer = relative6(ssrOutputDir,
|
|
172540
|
-
const toClient = relative6(clientOutputDir,
|
|
172540
|
+
const toServer = relative6(ssrOutputDir, childBuilt2.ssr).replace(/\\/g, "/");
|
|
172541
|
+
const toClient = relative6(clientOutputDir, childBuilt2.client).replace(/\\/g, "/");
|
|
172541
172542
|
externalRewrites.set(origSpec, {
|
|
172542
172543
|
client: toClient.startsWith(".") ? toClient : `./${toClient}`,
|
|
172543
172544
|
server: toServer.startsWith(".") ? toServer : `./${toServer}`
|
|
@@ -172604,13 +172605,17 @@ var resolveDevClientDir2 = () => {
|
|
|
172604
172605
|
write(clientPath, clientBundle)
|
|
172605
172606
|
]);
|
|
172606
172607
|
}
|
|
172607
|
-
const built = {
|
|
172608
|
+
const built = {
|
|
172609
|
+
client: clientPath,
|
|
172610
|
+
ssr: ssrPath,
|
|
172611
|
+
hasAwaitSlot: loweredAwaitServerSource.transformed || loweredAwaitClientSource.transformed || loweredServerSource.transformed || loweredClientSource.transformed || hasAwaitSlotFromChildren
|
|
172612
|
+
};
|
|
172608
172613
|
cache.set(src, built);
|
|
172609
172614
|
persistentCache.set(src, built);
|
|
172610
172615
|
return built;
|
|
172611
172616
|
};
|
|
172612
172617
|
const roots = await Promise.all(entryPoints.map(build2));
|
|
172613
|
-
await Promise.all(roots.map(async ({ client: client2 }) => {
|
|
172618
|
+
await Promise.all(roots.map(async ({ client: client2, hasAwaitSlot }) => {
|
|
172614
172619
|
const relClientDir = dirname7(relative6(clientDir, client2));
|
|
172615
172620
|
const name = basename5(client2, extname4(client2));
|
|
172616
172621
|
const indexPath = join11(indexDir, relClientDir, `${name}.js`);
|
|
@@ -172626,6 +172631,7 @@ var initialProps = (typeof window !== "undefined" && window.__INITIAL_PROPS__) ?
|
|
|
172626
172631
|
var isHMR = typeof window !== "undefined" && window.__SVELTE_COMPONENT__ !== undefined;
|
|
172627
172632
|
var isSsrDirty = typeof window !== "undefined" && window.__SSR_DIRTY__;
|
|
172628
172633
|
var hasIslandHtml = false;
|
|
172634
|
+
var shouldHydrate = typeof window === "undefined" ? false : ${hasAwaitSlot ? "false" : "true"};
|
|
172629
172635
|
var component;
|
|
172630
172636
|
var target = document.getElementById(${JSON.stringify(SVELTE_PAGE_ROOT_ID)}) || document.body;
|
|
172631
172637
|
|
|
@@ -172656,6 +172662,8 @@ if (isHMR) {
|
|
|
172656
172662
|
}
|
|
172657
172663
|
component = mount(Component, { target, props: mergedProps });
|
|
172658
172664
|
window.__HMR_PRESERVED_STATE__ = undefined;
|
|
172665
|
+
} else if (!shouldHydrate) {
|
|
172666
|
+
component = undefined;
|
|
172659
172667
|
} else if (isSsrDirty || hasIslandHtml) {
|
|
172660
172668
|
component = mount(Component, { target, props: initialProps });
|
|
172661
172669
|
} else {
|
|
@@ -172664,18 +172672,21 @@ if (isHMR) {
|
|
|
172664
172672
|
|
|
172665
172673
|
if (typeof window !== "undefined") {
|
|
172666
172674
|
window.__SVELTE_COMPONENT__ = component;
|
|
172667
|
-
window.__SVELTE_UNMOUNT__ = function() { unmount(component); };
|
|
172675
|
+
window.__SVELTE_UNMOUNT__ = function() { if (component) { unmount(component); } };
|
|
172676
|
+
window.__ABS_SLOT_HYDRATION_PENDING__ = shouldHydrate;
|
|
172668
172677
|
var releaseStreamingSlots = function() {
|
|
172669
172678
|
window.__ABS_SLOT_HYDRATION_PENDING__ = false;
|
|
172670
172679
|
if (typeof window.__ABS_SLOT_FLUSH__ === "function") {
|
|
172671
172680
|
window.__ABS_SLOT_FLUSH__();
|
|
172672
172681
|
}
|
|
172673
172682
|
};
|
|
172674
|
-
if (typeof requestAnimationFrame === "function") {
|
|
172683
|
+
if (shouldHydrate && typeof requestAnimationFrame === "function") {
|
|
172675
172684
|
requestAnimationFrame(function() {
|
|
172676
172685
|
requestAnimationFrame(releaseStreamingSlots);
|
|
172677
172686
|
});
|
|
172678
|
-
} else {
|
|
172687
|
+
} else if (typeof window.__ABS_SLOT_FLUSH__ === "function") {
|
|
172688
|
+
window.__ABS_SLOT_FLUSH__();
|
|
172689
|
+
} else if (typeof setTimeout === "function") {
|
|
172679
172690
|
setTimeout(releaseStreamingSlots, 0);
|
|
172680
172691
|
}
|
|
172681
172692
|
}`;
|
|
@@ -187579,5 +187590,5 @@ export {
|
|
|
187579
187590
|
ANGULAR_INIT_TIMEOUT_MS
|
|
187580
187591
|
};
|
|
187581
187592
|
|
|
187582
|
-
//# debugId=
|
|
187593
|
+
//# debugId=6A030229535DDFD264756E2164756E21
|
|
187583
187594
|
//# sourceMappingURL=index.js.map
|