@absolutejs/absolute 0.19.0-beta.395 → 0.19.0-beta.396

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.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 childBuilt = cache.get(resolved);
172536
- if (!childBuilt)
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, childBuilt.ssr).replace(/\\/g, "/");
172540
- const toClient = relative6(clientOutputDir, childBuilt.client).replace(/\\/g, "/");
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 = { client: clientPath, ssr: ssrPath };
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,7 +172662,7 @@ if (isHMR) {
172656
172662
  }
172657
172663
  component = mount(Component, { target, props: mergedProps });
172658
172664
  window.__HMR_PRESERVED_STATE__ = undefined;
172659
- } else if (isSsrDirty || hasIslandHtml) {
172665
+ } else if (isSsrDirty || hasIslandHtml || !shouldHydrate) {
172660
172666
  component = mount(Component, { target, props: initialProps });
172661
172667
  } else {
172662
172668
  component = hydrate(Component, { target, props: initialProps });
@@ -172665,17 +172671,20 @@ if (isHMR) {
172665
172671
  if (typeof window !== "undefined") {
172666
172672
  window.__SVELTE_COMPONENT__ = component;
172667
172673
  window.__SVELTE_UNMOUNT__ = function() { unmount(component); };
172674
+ window.__ABS_SLOT_HYDRATION_PENDING__ = shouldHydrate;
172668
172675
  var releaseStreamingSlots = function() {
172669
172676
  window.__ABS_SLOT_HYDRATION_PENDING__ = false;
172670
172677
  if (typeof window.__ABS_SLOT_FLUSH__ === "function") {
172671
172678
  window.__ABS_SLOT_FLUSH__();
172672
172679
  }
172673
172680
  };
172674
- if (typeof requestAnimationFrame === "function") {
172681
+ if (shouldHydrate && typeof requestAnimationFrame === "function") {
172675
172682
  requestAnimationFrame(function() {
172676
172683
  requestAnimationFrame(releaseStreamingSlots);
172677
172684
  });
172678
- } else {
172685
+ } else if (typeof window.__ABS_SLOT_FLUSH__ === "function") {
172686
+ window.__ABS_SLOT_FLUSH__();
172687
+ } else if (typeof setTimeout === "function") {
172679
172688
  setTimeout(releaseStreamingSlots, 0);
172680
172689
  }
172681
172690
  }`;
@@ -173250,7 +173259,7 @@ ${registrations}
173250
173259
  ({ tsLibDir } = cached);
173251
173260
  cached.lastUsed = Date.now();
173252
173261
  } else {
173253
- const tsPath = __require.resolve("/home/alexkahn/abs/absolutejs/node_modules/typescript/lib/typescript.js");
173262
+ const tsPath = __require.resolve("typescript");
173254
173263
  const tsRootDir = dirname9(tsPath);
173255
173264
  tsLibDir = tsRootDir.endsWith("lib") ? tsRootDir : resolve18(tsRootDir, "lib");
173256
173265
  const config = readConfiguration("./tsconfig.json");
@@ -187579,5 +187588,5 @@ export {
187579
187588
  ANGULAR_INIT_TIMEOUT_MS
187580
187589
  };
187581
187590
 
187582
- //# debugId=B70D75E3BEC8B7C164756E2164756E21
187591
+ //# debugId=D6C7DB70CE4735CB64756E2164756E21
187583
187592
  //# sourceMappingURL=index.js.map