@absolutejs/absolute 0.20.0-beta.177 → 0.20.0-beta.179

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.
Files changed (88) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/changelog.json +72 -0
  3. package/dist/angular/browser.js +17 -2
  4. package/dist/angular/browser.js.map +4 -4
  5. package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
  6. package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
  7. package/dist/angular/index.js +100 -54
  8. package/dist/angular/index.js.map +10 -9
  9. package/dist/angular/server.js +100 -54
  10. package/dist/angular/server.js.map +10 -9
  11. package/dist/build/buildWorker.js +6 -5
  12. package/dist/build.js +595 -454
  13. package/dist/build.js.map +20 -20
  14. package/dist/cli/{add-ntg96znk.js → add-8gw9mk2b.js} +1 -1
  15. package/dist/cli/{compile-w2z6c9vt.js → compile-p5yv6ecp.js} +2 -2
  16. package/dist/cli/config/server.js +45 -12
  17. package/dist/cli/{dev-8br5mr7t.js → dev-2hbcsvkp.js} +1 -1
  18. package/dist/cli/{index-420h9hq7.js → index-1ewba8ye.js} +32 -3
  19. package/dist/cli/index-5q6k5mvr.js +86 -0
  20. package/dist/cli/{index-7z1hh3fg.js → index-9dzdbbfc.js} +1 -1
  21. package/dist/cli/index.js +9 -9
  22. package/dist/cli/{islands-bx67g15t.js → islands-6zgb7501.js} +1 -1
  23. package/dist/cli/{mobile-we5q51ey.js → mobile-93vaawcz.js} +3 -3
  24. package/dist/cli/{remove-4jh862qa.js → remove-x987pvd3.js} +1 -1
  25. package/dist/cli/{start-srs11bm8.js → start-asxb79rc.js} +2 -2
  26. package/dist/cli/{typecheck-7fvww3b7.js → typecheck-m2j4tkdk.js} +165 -35
  27. package/dist/client/chunks/{index-8m2qq61n.js → index-58svs66p.js} +13 -3
  28. package/dist/client/chunks/{index-8m2qq61n.js.map → index-58svs66p.js.map} +5 -4
  29. package/dist/client/chunks/{islands-mfjmdwnb.js → islands-tcadmgcx.js} +3 -6
  30. package/dist/client/chunks/{islands-mfjmdwnb.js.map → islands-tcadmgcx.js.map} +3 -4
  31. package/dist/client/chunks/{react-sprprqzs.js → react-khr6ewhr.js} +2 -2
  32. package/dist/client/index.js +82 -6
  33. package/dist/client/index.js.map +7 -6
  34. package/dist/dev/client/handlers/islands.ts +2 -0
  35. package/dist/dev/client/handlers/react.ts +92 -111
  36. package/dist/dev/client/handlers/reactUpdateQueue.ts +153 -0
  37. package/dist/index.js +568 -427
  38. package/dist/index.js.map +20 -20
  39. package/dist/islands/browser.js +2 -2
  40. package/dist/islands/browser.js.map +3 -3
  41. package/dist/islands/index.js +56 -27
  42. package/dist/islands/index.js.map +7 -6
  43. package/dist/react/browser.js +113 -12
  44. package/dist/react/browser.js.map +10 -7
  45. package/dist/react/components/index.js +31 -7
  46. package/dist/react/components/index.js.map +5 -4
  47. package/dist/react/components/server/index.js +22 -6
  48. package/dist/react/index.js +233 -67
  49. package/dist/react/index.js.map +16 -12
  50. package/dist/react/server.js +82 -23
  51. package/dist/react/server.js.map +11 -9
  52. package/dist/src/build/compileSvelte.d.ts +12 -1
  53. package/dist/src/build/compileVue.d.ts +1 -0
  54. package/dist/src/build/islandEntries.d.ts +3 -1
  55. package/dist/src/cli/add/dependencies.d.ts +34 -6
  56. package/dist/src/cli/scripts/typecheck.d.ts +8 -0
  57. package/dist/src/cli/scripts/typecheckDiagnostics.d.ts +17 -0
  58. package/dist/src/client/preserveIslandMarkup.d.ts +4 -0
  59. package/dist/src/core/islandManifest.d.ts +6 -0
  60. package/dist/src/core/islandStylesheet.d.ts +17 -0
  61. package/dist/src/react/Island.d.ts +9 -2
  62. package/dist/src/react/IslandStyleLink.d.ts +11 -0
  63. package/dist/src/react/createIsland.d.ts +1 -1
  64. package/dist/src/react/serverComponents/nodeRendererRef.d.ts +13 -0
  65. package/dist/src/utils/requestRenderUrl.d.ts +1 -0
  66. package/dist/src/utils/resolveConvention.d.ts +1 -0
  67. package/dist/src/vue/Island.browser.d.ts +3 -1
  68. package/dist/src/vue/Island.d.ts +2 -2
  69. package/dist/src/vue/createIsland.browser.d.ts +2 -2
  70. package/dist/src/vue/createIsland.d.ts +2 -2
  71. package/dist/src/vue/islandStyleLink.d.ts +30 -0
  72. package/dist/svelte/browser.js +2 -2
  73. package/dist/svelte/browser.js.map +3 -3
  74. package/dist/svelte/index.js +94 -70
  75. package/dist/svelte/index.js.map +10 -9
  76. package/dist/svelte/server.js +65 -59
  77. package/dist/svelte/server.js.map +9 -8
  78. package/dist/types/globals.d.ts +3 -0
  79. package/dist/vue/browser.js +105 -10
  80. package/dist/vue/browser.js.map +10 -7
  81. package/dist/vue/index.js +213 -68
  82. package/dist/vue/index.js.map +15 -12
  83. package/dist/vue/server.js +81 -22
  84. package/dist/vue/server.js.map +9 -7
  85. package/package.json +1 -1
  86. package/dist/cli/index-jjfbjv1z.js +0 -65
  87. /package/dist/cli/{index-6522t968.js → index-yd672jyq.js} +0 -0
  88. /package/dist/client/chunks/{react-sprprqzs.js.map → react-khr6ewhr.js.map} +0 -0
package/dist/index.js CHANGED
@@ -6289,6 +6289,12 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
6289
6289
  logConventionRenderError(framework, "error", renderError);
6290
6290
  }
6291
6291
  return null;
6292
+ }, isPageRequest = (request) => {
6293
+ if (request.headers.get("hx-request") === "true")
6294
+ return true;
6295
+ if (request.headers.get("sec-fetch-dest") === "document")
6296
+ return true;
6297
+ return (request.headers.get("accept") ?? "").includes("text/html");
6292
6298
  }, renderConventionError = async (framework, pageName, error) => {
6293
6299
  const errorProps = buildErrorProps(error);
6294
6300
  const frameworkResponse = await tryFrameworkErrorConvention(framework, pageName, errorProps, error);
@@ -6300,12 +6306,6 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
6300
6306
  return htmlResponse;
6301
6307
  }
6302
6308
  return null;
6303
- }, isPageRequest = (request) => {
6304
- if (request.headers.get("hx-request") === "true")
6305
- return true;
6306
- if (request.headers.get("sec-fetch-dest") === "document")
6307
- return true;
6308
- return (request.headers.get("accept") ?? "").includes("text/html");
6309
6309
  }, renderStaticRouteError = async (request, error) => {
6310
6310
  if (!isPageRequest(request))
6311
6311
  return null;
@@ -6654,7 +6654,7 @@ var ISLAND_BOOTSTRAP_MANIFEST_KEY = "AbsoluteIslandBootstrap", LEGACY_ISLAND_BOO
6654
6654
  islands[framework] = entries;
6655
6655
  }
6656
6656
  return islands;
6657
- }, getIslandManifestKey = (framework, component) => `Island${toIslandFrameworkSegment(framework)}${component}`;
6657
+ }, getIslandManifestKey = (framework, component) => `Island${toIslandFrameworkSegment(framework)}${component}`, ISLAND_STYLE_PREFIX = "IslandStyle", getIslandStyleManifestEntries = (manifest) => Object.entries(manifest).filter(([key]) => key.startsWith(ISLAND_STYLE_PREFIX)), getIslandStyleManifestKey = (framework, component) => `${ISLAND_STYLE_PREFIX}${toIslandFrameworkSegment(framework)}${component}`;
6658
6658
 
6659
6659
  // src/core/islands.ts
6660
6660
  function getIslandComponent(component) {
@@ -8803,7 +8803,7 @@ import { basename as basename2, dirname as dirname6, extname as extname3, join a
8803
8803
  var serverCacheRoot2, compiledModuleCache2, originalSourcePathCache, syncIslandGeneration, transpiler, ensureRelativeImportPath = (from, target) => {
8804
8804
  const importPath = relative3(dirname6(from), target).replace(/\\/g, "/");
8805
8805
  return importPath.startsWith(".") ? importPath : `./${importPath}`;
8806
- }, processDirectoryEntries = (entries, dir, targetFileName, stack) => {
8806
+ }, escapeRegExp = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), replaceQuotedSpecifier = (code, spec, target) => code.replace(new RegExp(`(['"])${escapeRegExp(spec)}\\1`, "g"), (_match, quote) => `${quote}${target}${quote}`), processDirectoryEntries = (entries, dir, targetFileName, stack) => {
8807
8807
  for (const entry of entries) {
8808
8808
  const entryPath = join8(dir, entry.name);
8809
8809
  if (entry.isDirectory())
@@ -8848,18 +8848,21 @@ var serverCacheRoot2, compiledModuleCache2, originalSourcePathCache, syncIslandG
8848
8848
  return null;
8849
8849
  }
8850
8850
  const basePath = resolve6(dirname6(from), spec);
8851
+ const extensions = [
8852
+ ".ts",
8853
+ ".tsx",
8854
+ ".mts",
8855
+ ".cts",
8856
+ ".js",
8857
+ ".jsx",
8858
+ ".mjs",
8859
+ ".cjs",
8860
+ ".json"
8861
+ ];
8851
8862
  const candidates = [
8852
8863
  basePath,
8853
- `${basePath}.ts`,
8854
- `${basePath}.js`,
8855
- `${basePath}.mjs`,
8856
- `${basePath}.cjs`,
8857
- `${basePath}.json`,
8858
- join8(basePath, "index.ts"),
8859
- join8(basePath, "index.js"),
8860
- join8(basePath, "index.mjs"),
8861
- join8(basePath, "index.cjs"),
8862
- join8(basePath, "index.json")
8864
+ ...extensions.map((extension) => `${basePath}${extension}`),
8865
+ ...extensions.map((extension) => join8(basePath, `index${extension}`))
8863
8866
  ];
8864
8867
  const existResults = await Promise.all(candidates.map((candidate) => Bun.file(candidate).exists()));
8865
8868
  const foundIndex = existResults.indexOf(true);
@@ -8944,7 +8947,7 @@ var serverCacheRoot2, compiledModuleCache2, originalSourcePathCache, syncIslandG
8944
8947
  rewrittenModulePaths.set(spec, ensureRelativeImportPath(getCachedModulePath2(sourcePath), resolvedModuleImport));
8945
8948
  }
8946
8949
  for (const [spec, resolvedModuleImport] of rewrittenModulePaths) {
8947
- transpiled = transpiled.replaceAll(spec, resolvedModuleImport);
8950
+ transpiled = replaceQuotedSpecifier(transpiled, spec, resolvedModuleImport);
8948
8951
  }
8949
8952
  let compiledCode = compile(transpiled, {
8950
8953
  css: "injected",
@@ -8956,10 +8959,10 @@ var serverCacheRoot2, compiledModuleCache2, originalSourcePathCache, syncIslandG
8956
8959
  hmr: isDevelopmentRuntime()
8957
8960
  }).js.code;
8958
8961
  for (const [spec, compiledChildPath] of childModulePaths) {
8959
- compiledCode = compiledCode.replaceAll(spec, ensureRelativeImportPath(getCachedModulePath2(sourcePath), compiledChildPath));
8962
+ compiledCode = replaceQuotedSpecifier(compiledCode, spec, ensureRelativeImportPath(getCachedModulePath2(sourcePath), compiledChildPath));
8960
8963
  }
8961
8964
  for (const [spec, resolvedModuleImport] of rewrittenModulePaths) {
8962
- compiledCode = compiledCode.replaceAll(spec, resolvedModuleImport);
8965
+ compiledCode = replaceQuotedSpecifier(compiledCode, spec, resolvedModuleImport);
8963
8966
  }
8964
8967
  const sourceId = JSON.stringify(relative3(process.cwd(), resolutionSourcePath).replace(/\\/g, "/"));
8965
8968
  const componentName = /export default function ([\w$]+)\s*\(/.exec(compiledCode)?.[1];
@@ -9019,9 +9022,9 @@ var createVueCompiler = async () => {
9019
9022
  // src/core/vueServerModule.ts
9020
9023
  import { readFileSync as readFileSync6, realpathSync } from "fs";
9021
9024
  import { mkdir as mkdir4 } from "fs/promises";
9022
- import { dirname as dirname7, join as join9, relative as relative4, resolve as resolve7 } from "path";
9025
+ import { basename as basename3, dirname as dirname7, join as join9, relative as relative4, resolve as resolve7 } from "path";
9023
9026
  var {Transpiler } = globalThis.Bun;
9024
- var ISLAND_COMPONENT_ID_LENGTH = 8, serverCacheRoot3, compiledModuleCache3, syncIslandGeneration2, transpiler2, ensureRelativeImportPath2 = (from, target) => {
9027
+ var serverCacheRoot3, compiledModuleCache3, syncIslandGeneration2, transpiler2, ensureRelativeImportPath2 = (from, target) => {
9025
9028
  const importPath = relative4(dirname7(from), target).replace(/\\/g, "/");
9026
9029
  return importPath.startsWith(".") ? importPath : `./${importPath}`;
9027
9030
  }, getCachedModulePath3 = (sourcePath) => {
@@ -9055,7 +9058,13 @@ var ISLAND_COMPONENT_ID_LENGTH = 8, serverCacheRoot3, compiledModuleCache3, sync
9055
9058
  ].join(`
9056
9059
  `) : nonVueLines.join(`
9057
9060
  `);
9058
- }, extractRelativeVueImports = (sourceCode) => Array.from(sourceCode.matchAll(/import\s+[\s\S]+?['"]([^'"]+)['"]/g)).map((match) => match[1]).filter((importPath) => typeof importPath === "string" && importPath.startsWith(".") && importPath.endsWith(".vue")), compileVueServerModule = async (sourcePath) => {
9061
+ }, RELATIVE_SPECIFIER_PATTERN, extractRelativeImports = (code) => Array.from(new Set(Array.from(code.matchAll(RELATIVE_SPECIFIER_PATTERN), (match) => match.groups?.spec).filter((spec) => spec !== undefined))), resolveFromSource = (spec, sourcePath) => {
9062
+ try {
9063
+ return Bun.resolveSync(spec, dirname7(sourcePath));
9064
+ } catch {
9065
+ return null;
9066
+ }
9067
+ }, compileVueServerModule = async (sourcePath) => {
9059
9068
  syncIslandGeneration2();
9060
9069
  const cachedModulePath = compiledModuleCache3.get(sourcePath);
9061
9070
  if (cachedModulePath)
@@ -9063,7 +9072,7 @@ var ISLAND_COMPONENT_ID_LENGTH = 8, serverCacheRoot3, compiledModuleCache3, sync
9063
9072
  const compiler = await loadVueCompiler();
9064
9073
  const source = await Bun.file(sourcePath).text();
9065
9074
  const { descriptor } = compiler.parse(source, { filename: sourcePath });
9066
- const componentId = Bun.hash(sourcePath).toString(BASE_36_RADIX).slice(0, ISLAND_COMPONENT_ID_LENGTH);
9075
+ const componentId = toKebab(basename3(sourcePath, ".vue"));
9067
9076
  const hasScript = descriptor.script || descriptor.scriptSetup;
9068
9077
  const compiledScript = hasScript ? compiler.compileScript(descriptor, {
9069
9078
  fs: {
@@ -9088,10 +9097,10 @@ var ISLAND_COMPONENT_ID_LENGTH = 8, serverCacheRoot3, compiledModuleCache3, sync
9088
9097
  ssr: true,
9089
9098
  ssrCssVars: descriptor.cssVars
9090
9099
  }).code : "const ssrRender = () => {};";
9091
- const childImportPaths = extractRelativeVueImports(compiledScript.content);
9092
- const compiledChildren = await Promise.all(childImportPaths.map(async (relativeImport) => ({
9093
- compiledPath: await compileVueServerModule(resolve7(dirname7(sourcePath), relativeImport)),
9094
- spec: relativeImport
9100
+ const relativeImports = extractRelativeImports(compiledScript.content);
9101
+ const compiledChildren = await Promise.all(relativeImports.filter((spec) => spec.endsWith(".vue")).map(async (spec) => ({
9102
+ compiledPath: await compileVueServerModule(resolve7(dirname7(sourcePath), spec)),
9103
+ spec
9095
9104
  })));
9096
9105
  const strippedScript = stripExports(compiledScript.content);
9097
9106
  const transpiledScript = transpiler2.transformSync(strippedScript);
@@ -9103,17 +9112,28 @@ var ISLAND_COMPONENT_ID_LENGTH = 8, serverCacheRoot3, compiledModuleCache3, sync
9103
9112
  ].join(`
9104
9113
  `));
9105
9114
  const compiledModulePath = getCachedModulePath3(sourcePath);
9106
- let rewritten = assembled;
9115
+ const rewrittenSpecifiers = new Map;
9107
9116
  for (const child of compiledChildren) {
9108
- rewritten = rewritten.replaceAll(child.spec, ensureRelativeImportPath2(compiledModulePath, child.compiledPath));
9117
+ rewrittenSpecifiers.set(child.spec, ensureRelativeImportPath2(compiledModulePath, child.compiledPath));
9109
9118
  }
9119
+ for (const spec of extractRelativeImports(assembled)) {
9120
+ if (rewrittenSpecifiers.has(spec))
9121
+ continue;
9122
+ const resolvedImport = resolveFromSource(spec, sourcePath);
9123
+ if (!resolvedImport)
9124
+ continue;
9125
+ rewrittenSpecifiers.set(spec, ensureRelativeImportPath2(compiledModulePath, resolvedImport));
9126
+ }
9127
+ const rewritten = assembled.replace(RELATIVE_SPECIFIER_PATTERN, (match, prefix, quote, spec) => {
9128
+ const target = rewrittenSpecifiers.get(spec);
9129
+ return target ? `${prefix}${quote}${target}${quote}` : match;
9130
+ });
9110
9131
  await mkdir4(dirname7(compiledModulePath), { recursive: true });
9111
9132
  await writeIfChanged2(compiledModulePath, rewritten);
9112
9133
  compiledModuleCache3.set(sourcePath, compiledModulePath);
9113
9134
  return compiledModulePath;
9114
9135
  };
9115
9136
  var init_vueServerModule = __esm(() => {
9116
- init_constants();
9117
9137
  init_isFile();
9118
9138
  serverCacheRoot3 = join9(process.cwd(), ".absolutejs", "islands", "vue");
9119
9139
  compiledModuleCache3 = new Map;
@@ -9121,6 +9141,7 @@ var init_vueServerModule = __esm(() => {
9121
9141
  compiledModuleCache3.clear();
9122
9142
  });
9123
9143
  transpiler2 = new Transpiler({ loader: "ts", target: "browser" });
9144
+ RELATIVE_SPECIFIER_PATTERN = /(\bfrom\s*|\bimport\s*\(\s*|\bimport\s+)(['"])(?<spec>\.{1,2}\/[^'"]*)\2/g;
9124
9145
  });
9125
9146
 
9126
9147
  // src/core/islandMarkupAttributes.ts
@@ -9560,10 +9581,12 @@ export default component;
9560
9581
  sources[definition.framework] = frameworkSources;
9561
9582
  }
9562
9583
  return sources;
9563
- }, generateIslandEntryPoints = async ({
9584
+ }, createCssImports = (entryPath, cssPaths) => cssPaths.map((cssPath) => `import ${JSON.stringify(normalizeImportPath(entryPath, cssPath))};
9585
+ `).join(""), generateIslandEntryPoints = async ({
9564
9586
  buildInfo,
9565
9587
  buildPath,
9566
- clientPathMaps = {}
9588
+ clientPathMaps = {},
9589
+ cssPathMaps = {}
9567
9590
  }) => {
9568
9591
  const generatedRoot = join10(buildPath, "_island_entries");
9569
9592
  rmSync(generatedRoot, { force: true, recursive: true });
@@ -9574,8 +9597,9 @@ export default component;
9574
9597
  const source = buildReference ? resolveIslandSourcePath(buildInfo.resolvedRegistryPath, buildReference.source) : null;
9575
9598
  const compiledSourcePath = source && shouldUseCompiledClientPath(definition.framework, source) ? clientPathMaps[definition.framework]?.get(source) : undefined;
9576
9599
  const entrySource = source && (compiledSourcePath || !shouldUseCompiledClientPath(definition.framework, source)) ? createDirectEntrySource(entryPath, compiledSourcePath ?? source, compiledSourcePath ? undefined : buildReference?.export) : createRegistryEntrySource(entryPath, buildInfo.resolvedRegistryPath, buildInfo.hasNamedExport, definition.framework, definition.component);
9600
+ const cssPaths = source ? cssPathMaps[definition.framework]?.get(source) ?? [] : [];
9577
9601
  mkdirSync(dirname8(entryPath), { recursive: true });
9578
- writeFileSync2(entryPath, entrySource);
9602
+ writeFileSync2(entryPath, `${createCssImports(entryPath, cssPaths)}${entrySource}`);
9579
9603
  entries.push({
9580
9604
  component: definition.component,
9581
9605
  entryPath,
@@ -10269,12 +10293,27 @@ var ISLAND_MARKER = 'data-island="true"', MANIFEST_MARKER = "__ABSOLUTE_MANIFEST
10269
10293
  browserManifest[key] = value;
10270
10294
  }
10271
10295
  return browserManifest;
10272
- }, buildIslandsHeadMarkup = (manifest) => {
10296
+ }, ISLAND_MARKER_TAG, ISLAND_FRAMEWORKS, readMarkerAttribute = (tag, name) => new RegExp(`\\b${name}="([^"]*)"`).exec(tag)?.[1]?.replaceAll("&quot;", '"').replaceAll("&lt;", "<").replaceAll("&gt;", ">").replaceAll("&amp;", "&"), toIslandFramework = (value) => ISLAND_FRAMEWORKS.find((framework) => framework === value), collectRenderedIslandStyleKeys = (html) => {
10297
+ const keys = new Set;
10298
+ for (const [tag] of html.matchAll(ISLAND_MARKER_TAG)) {
10299
+ const framework = toIslandFramework(readMarkerAttribute(tag, "data-framework"));
10300
+ const component = readMarkerAttribute(tag, "data-component");
10301
+ if (framework && component)
10302
+ keys.add(getIslandStyleManifestKey(framework, component));
10303
+ }
10304
+ return keys;
10305
+ }, buildIslandStyleLinks = (manifest, html) => {
10306
+ if (html === undefined)
10307
+ return "";
10308
+ const renderedKeys = collectRenderedIslandStyleKeys(html);
10309
+ return getIslandStyleManifestEntries(manifest).filter(([key]) => renderedKeys.has(key)).filter(([, href]) => !html.includes(`href="${href}"`)).map(([key, href]) => `<link rel="stylesheet" href="${href}" data-island-style="${key}"${nonceAttr()}>`).join("");
10310
+ }, buildIslandsHeadMarkup = (manifest, html) => {
10311
+ const styleLinks = buildIslandStyleLinks(manifest, html);
10273
10312
  const manifestScript = `<script${nonceAttr()}>window.__ABSOLUTE_MANIFEST__ = ${escapeScriptContent(JSON.stringify(toBrowserManifest(manifest)))}</script>`;
10274
10313
  const islandStateScript = `<script${nonceAttr()}>window.__ABS_ISLAND_STATE__ = ${escapeScriptContent(JSON.stringify(globalThis.__ABS_ISLAND_STATE__ ?? {}))}</script>`;
10275
10314
  const bootstrapPath = getIslandBootstrapPath(manifest);
10276
10315
  const bootstrapScript = bootstrapPath ? `<script${nonceAttr()} type="module" src="${bootstrapPath}"></script>` : "";
10277
- return `${manifestScript}${islandStateScript}${bootstrapScript}`;
10316
+ return `${styleLinks}${manifestScript}${islandStateScript}${bootstrapScript}`;
10278
10317
  }, injectHeadMarkup = (html, markup) => {
10279
10318
  const closingHeadIndex = html.indexOf("</head>");
10280
10319
  if (closingHeadIndex >= 0) {
@@ -10456,7 +10495,7 @@ var ISLAND_MARKER = 'data-island="true"', MANIFEST_MARKER = "__ABSOLUTE_MANIFEST
10456
10495
  return html;
10457
10496
  }
10458
10497
  warnIfBootstrapMissing(manifest);
10459
- return injectHeadMarkup(html, buildIslandsHeadMarkup(manifest));
10498
+ return injectHeadMarkup(html, buildIslandsHeadMarkup(manifest, html));
10460
10499
  }, injectIslandPageContextStream = (stream, options) => {
10461
10500
  const manifest = globalThis.__absoluteManifest;
10462
10501
  if (!manifest)
@@ -10480,6 +10519,13 @@ var init_islandPageContext = __esm(() => {
10480
10519
  init_logger();
10481
10520
  MANIFEST_BUILD_DIR_KEY = Symbol.for("absolutejs.islandManifestBuildDir");
10482
10521
  WINDOWS_ABSOLUTE_PATH = /^[A-Za-z]:[\\/]|^\\\\/;
10522
+ ISLAND_MARKER_TAG = /<[^>]*\bdata-island="true"[^>]*>/g;
10523
+ ISLAND_FRAMEWORKS = [
10524
+ "react",
10525
+ "svelte",
10526
+ "vue",
10527
+ "angular"
10528
+ ];
10483
10529
  });
10484
10530
 
10485
10531
  // src/dev/hotResources.ts
@@ -11201,7 +11247,7 @@ var init_pageMetadata = __esm(() => {
11201
11247
  });
11202
11248
 
11203
11249
  // src/utils/spaRouteManifest.ts
11204
- import { basename as basename3 } from "path";
11250
+ import { basename as basename4 } from "path";
11205
11251
  var SPA_ROUTES_KEY = "__absoluteSpaRoutes", setSpaRouteManifest = (hosts) => {
11206
11252
  Reflect.set(globalThis, SPA_ROUTES_KEY, hosts);
11207
11253
  }, isRuntimeSpaHost = (value) => typeof value === "object" && value !== null && typeof Reflect.get(value, "framework") === "string", getSpaRouteManifest = () => {
@@ -11237,7 +11283,7 @@ var SPA_ROUTES_KEY = "__absoluteSpaRoutes", setSpaRouteManifest = (hosts) => {
11237
11283
  expression += `/${segment.replace(/[.+?^${}()|[\]\\]/g, "\\$&")}`;
11238
11284
  }
11239
11285
  return new RegExp(`${expression || "^/"}/?$`);
11240
- }, sourcePageName = (sourceFile) => basename3(sourceFile).replace(/\.[^.]+$/, "").toLowerCase(), isKnownSpaRoute = (framework, pageName, request) => {
11286
+ }, sourcePageName = (sourceFile) => basename4(sourceFile).replace(/\.[^.]+$/, "").toLowerCase(), isKnownSpaRoute = (framework, pageName, request) => {
11241
11287
  if (!request)
11242
11288
  return true;
11243
11289
  let pathname;
@@ -11556,7 +11602,7 @@ var init_idleScheduler = () => {};
11556
11602
  // src/core/serverOnlyStaticFiles.ts
11557
11603
  import { existsSync as existsSync11, readFileSync as readFileSync13 } from "fs";
11558
11604
  import { isAbsolute as isAbsolute3, join as join15, relative as relative7, sep as sep2 } from "path";
11559
- var STATIC_PLUGIN_DEFAULTS, SERVER_OUTPUTS_FILE = "server-outputs.json", RUNTIME_FILE_NAMES, SERVER_ONLY_PATTERNS, escapeRegExp = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), isStringArray = (value) => Array.isArray(value) && value.every((entry) => typeof entry === "string"), readServerOutputs = (buildDir) => {
11605
+ var STATIC_PLUGIN_DEFAULTS, SERVER_OUTPUTS_FILE = "server-outputs.json", RUNTIME_FILE_NAMES, SERVER_ONLY_PATTERNS, escapeRegExp2 = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), isStringArray = (value) => Array.isArray(value) && value.every((entry) => typeof entry === "string"), readServerOutputs = (buildDir) => {
11560
11606
  const path = join15(buildDir, SERVER_OUTPUTS_FILE);
11561
11607
  if (!existsSync11(path))
11562
11608
  return [];
@@ -11570,7 +11616,7 @@ var STATIC_PLUGIN_DEFAULTS, SERVER_OUTPUTS_FILE = "server-outputs.json", RUNTIME
11570
11616
  const outputs = readServerOutputs(buildDir);
11571
11617
  if (outputs.length === 0)
11572
11618
  return null;
11573
- return new RegExp(`^/(?:${outputs.map(escapeRegExp).join("|")})(?:\\.br|\\.gz|\\.map)?$`);
11619
+ return new RegExp(`^/(?:${outputs.map(escapeRegExp2).join("|")})(?:\\.br|\\.gz|\\.map)?$`);
11574
11620
  }, productionStaticIgnorePatterns = (buildDir, serverBundle) => {
11575
11621
  const patterns = [
11576
11622
  ...STATIC_PLUGIN_DEFAULTS,
@@ -11583,7 +11629,7 @@ var STATIC_PLUGIN_DEFAULTS, SERVER_OUTPUTS_FILE = "server-outputs.json", RUNTIME
11583
11629
  const insideBuildDir = bundlePath !== "" && !bundlePath.startsWith("..") && !isAbsolute3(bundlePath);
11584
11630
  if (insideBuildDir) {
11585
11631
  const urlPath = bundlePath.split(sep2).join("/");
11586
- patterns.push(new RegExp(`^/${escapeRegExp(urlPath)}(?:\\.br|\\.gz|\\.map)?$`));
11632
+ patterns.push(new RegExp(`^/${escapeRegExp2(urlPath)}(?:\\.br|\\.gz|\\.map)?$`));
11587
11633
  }
11588
11634
  return patterns;
11589
11635
  };
@@ -15119,6 +15165,11 @@ var getManifestKey = (folder, pascalName, isClientComponent, isReact, isVue, isS
15119
15165
  if (ext === ".css") {
15120
15166
  if (segments.includes("server"))
15121
15167
  return manifest;
15168
+ const islandStyleFramework = islandIndex > UNFOUND_INDEX ? segments[islandIndex + 1] : undefined;
15169
+ if (islandStyleFramework === "react" || islandStyleFramework === "svelte" || islandStyleFramework === "vue" || islandStyleFramework === "angular") {
15170
+ manifest[getIslandStyleManifestKey(islandStyleFramework, pascalName)] = `/${relative}`;
15171
+ return manifest;
15172
+ }
15122
15173
  const cssKey = getCssKey(pascalName, segments);
15123
15174
  if (manifest[cssKey] && manifest[cssKey] !== `/${relative}`)
15124
15175
  logWarn(`Duplicate manifest key "${cssKey}" \u2014 "${manifest[cssKey]}" will be overwritten by "/${relative}". Use unique page names across frameworks.`);
@@ -15238,7 +15289,7 @@ var init_verifyAngularCoreUniqueness = __esm(() => {
15238
15289
  // src/build/generateReactIndexes.ts
15239
15290
  import { existsSync as existsSync18, mkdirSync as mkdirSync4 } from "fs";
15240
15291
  import { readdir as readdir4, rm as rm5, writeFile as writeFile5 } from "fs/promises";
15241
- import { basename as basename4, join as join24, relative as relative10, resolve as resolve21, sep as sep4 } from "path";
15292
+ import { basename as basename5, join as join24, relative as relative10, resolve as resolve21, sep as sep4 } from "path";
15242
15293
  var {Glob: Glob2 } = globalThis.Bun;
15243
15294
  var indexContentCache, resolveDevClientDir = () => {
15244
15295
  const projectRoot = process.cwd();
@@ -15268,7 +15319,7 @@ var indexContentCache, resolveDevClientDir = () => {
15268
15319
  files.push(file);
15269
15320
  }
15270
15321
  const currentPageNames = new Set([
15271
- ...files.map((file) => basename4(file).split(".")[0]),
15322
+ ...files.map((file) => basename5(file).split(".")[0]),
15272
15323
  ...extraPages.map((page) => page.name)
15273
15324
  ]);
15274
15325
  const emptyStringArray = [];
@@ -15288,7 +15339,7 @@ var indexContentCache, resolveDevClientDir = () => {
15288
15339
  const pagesRelPath = relative10(resolve21(reactIndexesDirectory), resolve21(reactPagesDirectory)).split(sep4).join("/");
15289
15340
  const pages = [
15290
15341
  ...files.map((file) => {
15291
- const componentName = basename4(file).split(".")[0] ?? "";
15342
+ const componentName = basename5(file).split(".")[0] ?? "";
15292
15343
  return {
15293
15344
  componentName,
15294
15345
  importPath: `${pagesRelPath}/${componentName}`,
@@ -15667,7 +15718,7 @@ var init_validateSafePath = () => {};
15667
15718
  // src/build/buildReactServerComponents.ts
15668
15719
  import { createHash as createHash6 } from "crypto";
15669
15720
  import { existsSync as existsSync19, mkdirSync as mkdirSync5, readFileSync as readFileSync22, writeFileSync as writeFileSync7 } from "fs";
15670
- import { basename as basename5, dirname as dirname12, extname as extname9, join as join25, relative as relative12, resolve as resolve23 } from "path";
15721
+ import { basename as basename6, dirname as dirname12, extname as extname9, join as join25, relative as relative12, resolve as resolve23 } from "path";
15671
15722
  var {
15672
15723
  build: bunBuild,
15673
15724
  Glob: Glob3,
@@ -15798,6 +15849,22 @@ export const renderHtml = (flight, options) => {
15798
15849
 
15799
15850
  return renderToReadableStream(createElement(Root), options);
15800
15851
  };
15852
+
15853
+ // A fragment (a SuspenseSlot's resolved content) rendered to an HTML string.
15854
+ export const renderStaticHtml = async (flight) => {
15855
+ const root = createFromReadableStream(flight, {
15856
+ serverConsumerManifest: {
15857
+ moduleLoading: null,
15858
+ moduleMap,
15859
+ serverModuleMap: null
15860
+ }
15861
+ });
15862
+ const Root = () => use(root);
15863
+ const stream = await renderToReadableStream(createElement(Root));
15864
+ await stream.allReady;
15865
+
15866
+ return new Response(stream).text();
15867
+ };
15801
15868
  `;
15802
15869
  }, clientRuntimeSource = (modules) => {
15803
15870
  const loaders = modules.map((module) => ` ${JSON.stringify(module.id)}: () => import(${JSON.stringify(module.path)})`);
@@ -15823,7 +15890,7 @@ globalThis.__webpack_chunk_load__ = (id) => {
15823
15890
  }, clientEntrySource = () => `import './ReactServerClientRuntime';
15824
15891
  import { createFromReadableStream } from 'react-server-dom-webpack/client.browser';
15825
15892
  import { hydrateRoot } from 'react-dom/client';
15826
- import { createElement, use } from 'react';
15893
+ import { createElement, use, useEffect } from 'react';
15827
15894
 
15828
15895
  const encoder = new TextEncoder();
15829
15896
  const stream = new ReadableStream({
@@ -15845,9 +15912,23 @@ const stream = new ReadableStream({
15845
15912
  }
15846
15913
  });
15847
15914
  const root = createFromReadableStream(stream);
15848
- const Root = () => use(root);
15915
+ // The page's inline bootstrap holds streamed slot content back
15916
+ // (__ABS_SLOT_HYDRATION_PENDING__) so hydration compares against the HTML the
15917
+ // server rendered: a slot whose fallback is a React node would otherwise
15918
+ // mismatch, and React's client re-render would drop every patched slot.
15919
+ const releaseStreamingSlots = () => {
15920
+ self.__ABS_SLOT_HYDRATION_PENDING__ = false;
15921
+ if (typeof self.__ABS_SLOT_FLUSH__ === 'function') self.__ABS_SLOT_FLUSH__();
15922
+ };
15923
+ const Root = () => {
15924
+ useEffect(() => {
15925
+ setTimeout(releaseStreamingSlots, 0);
15926
+ }, []);
15927
+
15928
+ return use(root);
15929
+ };
15849
15930
  hydrateRoot(document, createElement(Root));
15850
- `, findOutput = (outputs, name) => outputs.find((artifact) => artifact.kind === "entry-point" && basename5(artifact.path).startsWith(`${name}.`)), toWebPath2 = (buildPath, path) => `/${relative12(buildPath, path).replace(/\\/g, "/")}`, assertFlightPackage = (projectRoot) => {
15931
+ `, findOutput = (outputs, name) => outputs.find((artifact) => artifact.kind === "entry-point" && basename6(artifact.path).startsWith(`${name}.`)), toWebPath2 = (buildPath, path) => `/${relative12(buildPath, path).replace(/\\/g, "/")}`, assertFlightPackage = (projectRoot) => {
15851
15932
  try {
15852
15933
  Bun.resolveSync("react-server-dom-webpack/package.json", projectRoot);
15853
15934
  } catch {
@@ -15862,7 +15943,7 @@ hydrateRoot(document, createElement(Root));
15862
15943
  mkdirSync5(dirname12(path), { recursive: true });
15863
15944
  writeFileSync7(path, contents);
15864
15945
  return path;
15865
- }, pageEntryName = (pagePath) => toPascal(basename5(pagePath, extname9(pagePath))), endsWithPageSuffix = (name) => name.length > REACT_SERVER_PAGE_MANIFEST_SUFFIX.length && name.endsWith(REACT_SERVER_PAGE_MANIFEST_SUFFIX), pageManifestKeys = (name, names) => {
15946
+ }, pageEntryName = (pagePath) => toPascal(basename6(pagePath, extname9(pagePath))), endsWithPageSuffix = (name) => name.length > REACT_SERVER_PAGE_MANIFEST_SUFFIX.length && name.endsWith(REACT_SERVER_PAGE_MANIFEST_SUFFIX), pageManifestKeys = (name, names) => {
15866
15947
  const doubled = `${name}${REACT_SERVER_PAGE_MANIFEST_SUFFIX}`;
15867
15948
  if (!endsWithPageSuffix(name))
15868
15949
  return { keys: [doubled] };
@@ -16132,11 +16213,11 @@ var STAMP_SETTLE_MS = 2000, createStampedFileCache = () => {
16132
16213
  var init_stampedFileCache = () => {};
16133
16214
 
16134
16215
  // src/build/scanConventions.ts
16135
- import { basename as basename6 } from "path";
16216
+ import { basename as basename7 } from "path";
16136
16217
  var {Glob: Glob4 } = globalThis.Bun;
16137
16218
  import { existsSync as existsSync20 } from "fs";
16138
- var CONVENTION_RE, isConventionFile = (fileName) => CONVENTION_RE.test(basename6(fileName)), classifyFile = (file, pageFiles, defaults, pages) => {
16139
- const fileName = basename6(file);
16219
+ var CONVENTION_RE, isConventionFile = (fileName) => CONVENTION_RE.test(basename7(fileName)), classifyFile = (file, pageFiles, defaults, pages) => {
16220
+ const fileName = basename7(file);
16140
16221
  const match = CONVENTION_RE.exec(fileName);
16141
16222
  if (!match) {
16142
16223
  pageFiles.push(file);
@@ -16297,18 +16378,18 @@ var init_htmlIncludes = () => {};
16297
16378
 
16298
16379
  // src/build/spaSideManifests.ts
16299
16380
  import { writeFile as writeFile6 } from "fs/promises";
16300
- import { basename as basename7, dirname as dirname14, relative as relative14, resolve as resolve25 } from "path";
16381
+ import { basename as basename8, dirname as dirname14, relative as relative14, resolve as resolve25 } from "path";
16301
16382
  var writeSpaSideManifests = async (spaRoutesBySource, resolveServerJsPath) => {
16302
16383
  const manifestEntries = {};
16303
16384
  await Promise.all([...spaRoutesBySource.entries()].map(async ([source, routes]) => {
16304
- const parentName = basename7(source, ".vue");
16385
+ const parentName = basename8(source, ".vue");
16305
16386
  const parentJsPath = resolveServerJsPath(parentName);
16306
16387
  if (!parentJsPath)
16307
16388
  return;
16308
16389
  const sourceDir = dirname14(source);
16309
16390
  const entries = routes.flatMap(({ path, importPath }) => {
16310
16391
  const childSourcePath = resolve25(sourceDir, importPath);
16311
- const childName = basename7(childSourcePath, ".vue");
16392
+ const childName = basename8(childSourcePath, ".vue");
16312
16393
  const childJsPath = resolveServerJsPath(childName);
16313
16394
  if (!childJsPath)
16314
16395
  return [];
@@ -16534,7 +16615,7 @@ var init_serverExternals = __esm(() => {
16534
16615
 
16535
16616
  // src/build/islandBootstrap.ts
16536
16617
  import { mkdirSync as mkdirSync6, writeFileSync as writeFileSync8 } from "fs";
16537
- import { basename as basename8, dirname as dirname16, extname as extname11, join as join27, relative as relative15 } from "path";
16618
+ import { basename as basename9, dirname as dirname16, extname as extname11, join as join27, relative as relative15 } from "path";
16538
16619
  var DEFAULT_ISLAND_BOOTSTRAP_NAME = "absoluteIslandBootstrap", DEFAULT_ISLAND_BOOTSTRAP_SOURCE = `import {
16539
16620
  createIslandManifestResolver,
16540
16621
  startIslands
@@ -16550,7 +16631,7 @@ startIslands({
16550
16631
  writeFileSync8(entryPath, DEFAULT_ISLAND_BOOTSTRAP_SOURCE);
16551
16632
  return entryPath;
16552
16633
  }, artifactStem = (artifact) => {
16553
- const fileName = basename8(artifact.path);
16634
+ const fileName = basename9(artifact.path);
16554
16635
  const stem = fileName.slice(0, fileName.length - extname11(fileName).length);
16555
16636
  const hashSuffix = artifact.hash ? `.${artifact.hash}` : "";
16556
16637
  return hashSuffix && stem.endsWith(hashSuffix) ? stem.slice(0, stem.length - hashSuffix.length) : stem;
@@ -16561,7 +16642,7 @@ startIslands({
16561
16642
  passRoot
16562
16643
  }) => {
16563
16644
  const expectedDir = passRoot === undefined ? undefined : normalizePath2(join27(buildPath, relative15(passRoot, dirname16(bootstrapPath))));
16564
- const expectedStem = basename8(bootstrapPath, extname11(bootstrapPath));
16645
+ const expectedStem = basename9(bootstrapPath, extname11(bootstrapPath));
16565
16646
  const artifact = outputs.find((output) => output.kind === "entry-point" && extname11(output.path) === ".js" && (expectedDir === undefined || normalizePath2(dirname16(output.path)) === expectedDir) && artifactStem(output) === expectedStem);
16566
16647
  if (!artifact)
16567
16648
  return;
@@ -16595,7 +16676,7 @@ var CLIENT_FRAMEWORK_PACKAGES, CLIENT_FRAMEWORKS, isPackageInstalled = (packageN
16595
16676
  vue: config.vueDirectory
16596
16677
  },
16597
16678
  projectRoot
16598
- }), escapeRegExp2 = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), packagePattern = (pattern) => pattern.endsWith("/*") ? `${escapeRegExp2(pattern.slice(0, -1))}.+` : `${escapeRegExp2(pattern)}(?:/.*)?`, missingFrameworkSpecifierPattern = (frameworks) => {
16679
+ }), escapeRegExp3 = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), packagePattern = (pattern) => pattern.endsWith("/*") ? `${escapeRegExp3(pattern.slice(0, -1))}.+` : `${escapeRegExp3(pattern)}(?:/.*)?`, missingFrameworkSpecifierPattern = (frameworks) => {
16599
16680
  const alternatives = frameworks.flatMap((framework) => CLIENT_FRAMEWORK_PACKAGES[framework].packages.map(packagePattern));
16600
16681
  return alternatives.length > 0 ? new RegExp(`^(?:${alternatives.join("|")})$`) : null;
16601
16682
  }, frameworkOf = (specifier) => CLIENT_FRAMEWORKS.find((framework) => {
@@ -18424,7 +18505,7 @@ var init_rewriteReactImports = __esm(() => {
18424
18505
  });
18425
18506
 
18426
18507
  // src/build/rewriteClientOutputs.ts
18427
- import { basename as basename9 } from "path";
18508
+ import { basename as basename10 } from "path";
18428
18509
  var reduceVendorPaths = (vendorPaths, reactPaths) => Object.fromEntries(Object.entries(vendorPaths).filter(([specifier, webPath]) => reactPaths[specifier] !== webPath)), hasEntries = (paths) => Object.keys(paths).length > 0, compileClientRewriteFamilies = (options) => {
18429
18510
  const reactPaths = options.reactPaths ?? {};
18430
18511
  const react = hasEntries(reactPaths) ? compileSpecifierRewriter(reactPaths) : undefined;
@@ -18492,7 +18573,7 @@ var reduceVendorPaths = (vendorPaths, reactPaths) => Object.fromEntries(Object.e
18492
18573
  if (!content.includes("URL("))
18493
18574
  return content;
18494
18575
  return content.replace(URL_REFERENCE_PATTERN, (match, relPath) => {
18495
- const resolvedPath = urlFileMap.get(basename9(relPath));
18576
+ const resolvedPath = urlFileMap.get(basename10(relPath));
18496
18577
  if (!resolvedPath)
18497
18578
  return match;
18498
18579
  return `new URL('${resolvedPath}', import.meta.url)`;
@@ -18785,7 +18866,7 @@ var init_fileRoutes = __esm(() => {
18785
18866
 
18786
18867
  // src/dev/lazyPages.ts
18787
18868
  import { existsSync as existsSync32 } from "fs";
18788
- import { basename as basename10, extname as extname13, isAbsolute as isAbsolute6, join as join37, resolve as resolve29 } from "path";
18869
+ import { basename as basename11, extname as extname13, isAbsolute as isAbsolute6, join as join37, resolve as resolve29 } from "path";
18789
18870
  var PAGE_EXTENSIONS2, KEY_SUFFIXES, SRC_URL_PREFIX = "/@src/", isTruthyFlag2 = (value) => value === "1" || value === "true", looksLikePath = (value) => value.includes("/") || value.includes("\\") || value.startsWith("."), probeDirForName = ({ dir, framework }, name) => {
18790
18871
  const extension = PAGE_EXTENSIONS2[framework].find((ext) => existsSync32(join37(dir, `${name}${ext}`)));
18791
18872
  return extension === undefined ? undefined : toDevPageEntry(framework, join37(dir, `${name}${extension}`));
@@ -18860,7 +18941,7 @@ var PAGE_EXTENSIONS2, KEY_SUFFIXES, SRC_URL_PREFIX = "/@src/", isTruthyFlag2 = (
18860
18941
  const resolved = resolve29(source);
18861
18942
  const entry = {
18862
18943
  framework,
18863
- name: fileRouteFor(resolved)?.name ?? toPascal(basename10(resolved, extname13(resolved))),
18944
+ name: fileRouteFor(resolved)?.name ?? toPascal(basename11(resolved, extname13(resolved))),
18864
18945
  source: resolved
18865
18946
  };
18866
18947
  return entry;
@@ -19056,7 +19137,7 @@ var init_bunStringRawUnicodePlugin = __esm(() => {
19056
19137
 
19057
19138
  // src/build/externalAssetPlugin.ts
19058
19139
  import { copyFileSync, existsSync as existsSync34, mkdirSync as mkdirSync10, statSync as statSync4 } from "fs";
19059
- import { basename as basename11, dirname as dirname21, join as join39, resolve as resolve31 } from "path";
19140
+ import { basename as basename12, dirname as dirname21, join as join39, resolve as resolve31 } from "path";
19060
19141
  var createExternalAssetPlugin = (outDir, userSourceRoots = []) => ({
19061
19142
  name: "absolute-external-asset",
19062
19143
  setup(bld) {
@@ -19081,7 +19162,7 @@ var createExternalAssetPlugin = (outDir, userSourceRoots = []) => ({
19081
19162
  continue;
19082
19163
  if (!statSync4(assetPath).isFile())
19083
19164
  continue;
19084
- const targetPath = join39(outDir, basename11(assetPath));
19165
+ const targetPath = join39(outDir, basename12(assetPath));
19085
19166
  if (existsSync34(targetPath))
19086
19167
  continue;
19087
19168
  mkdirSync10(dirname21(targetPath), { recursive: true });
@@ -19094,7 +19175,7 @@ var createExternalAssetPlugin = (outDir, userSourceRoots = []) => ({
19094
19175
  var init_externalAssetPlugin = () => {};
19095
19176
 
19096
19177
  // src/build/islandRegistryTransform.ts
19097
- import { basename as basename12 } from "path";
19178
+ import { basename as basename13 } from "path";
19098
19179
  var VALID_FRAMEWORKS, getObjectPropertyName2 = (name) => lazyTypescript.isIdentifier(name) || lazyTypescript.isStringLiteral(name) ? name.text : null, isIslandRegistryHelperImport2 = (source) => source === "@absolutejs/absolute/islands" || source.endsWith("/islands") || source.endsWith("/core/islands"), collectRegistryFactory = (sourceFile) => {
19099
19180
  const factoryNames = new Set;
19100
19181
  const namespaceNames = new Set;
@@ -19247,7 +19328,7 @@ var VALID_FRAMEWORKS, getObjectPropertyName2 = (name) => lazyTypescript.isIdenti
19247
19328
  output = output.slice(0, edit.start) + edit.text + output.slice(edit.end);
19248
19329
  }
19249
19330
  return output;
19250
- }, escapeRegExp3 = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), loaderForPath = (filePath) => {
19331
+ }, escapeRegExp4 = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), loaderForPath = (filePath) => {
19251
19332
  if (filePath.endsWith(".tsx"))
19252
19333
  return "tsx";
19253
19334
  if (filePath.endsWith(".jsx"))
@@ -19257,8 +19338,8 @@ var VALID_FRAMEWORKS, getObjectPropertyName2 = (name) => lazyTypescript.isIdenti
19257
19338
  }
19258
19339
  return "ts";
19259
19340
  }, createIslandRegistryDefinitionPlugin = (info) => {
19260
- const registryBase = basename12(info.resolvedRegistryPath).replace(/\.[mc]?[jt]sx?$/, "");
19261
- const filter = new RegExp(`(^|[/\\\\])${escapeRegExp3(registryBase)}\\.[mc]?[jt]sx?$`);
19341
+ const registryBase = basename13(info.resolvedRegistryPath).replace(/\.[mc]?[jt]sx?$/, "");
19342
+ const filter = new RegExp(`(^|[/\\\\])${escapeRegExp4(registryBase)}\\.[mc]?[jt]sx?$`);
19262
19343
  return {
19263
19344
  name: "absolute-island-registry-definitions",
19264
19345
  setup(build) {
@@ -19344,7 +19425,7 @@ var init_vueModuleOutputPath = __esm(() => {
19344
19425
 
19345
19426
  // src/build/injectVueComposableTracking.ts
19346
19427
  import { existsSync as existsSync35, readFileSync as readFileSync30, writeFileSync as writeFileSync12 } from "fs";
19347
- import { basename as basename13, isAbsolute as isAbsolute8, relative as relative19, resolve as resolve33 } from "path";
19428
+ import { basename as basename14, isAbsolute as isAbsolute8, relative as relative19, resolve as resolve33 } from "path";
19348
19429
  var VUE_HMR_RUNTIME, USE_DECLARATION, MODULE_COMMENT, LINE_TERMINATOR, STATEMENT_OPENER, SOURCE_EXTENSIONS2, CHUNK_REFERENCE, isSharedChunkFile = (fileName) => fileName.startsWith("chunk-") && fileName.endsWith(".js"), collectModuleComments = (content) => Array.from(content.matchAll(MODULE_COMMENT), (match) => ({
19349
19430
  index: match.index,
19350
19431
  path: match[1] ?? ""
@@ -19385,7 +19466,7 @@ var VUE_HMR_RUNTIME, USE_DECLARATION, MODULE_COMMENT, LINE_TERMINATOR, STATEMENT
19385
19466
  return text;
19386
19467
  return `${text.slice(0, declaration.exprStart)}__hmr_wrap(${JSON.stringify(moduleId)}, ${JSON.stringify(declaration.name)}, ${expression})${text.slice(end)}`;
19387
19468
  }, collectVueHmrOutputPaths = (vueOutputPaths, chunkOutputPaths) => {
19388
- const chunkByName = new Map(chunkOutputPaths.filter(isSharedChunkPath).map((path) => [basename13(path), path]));
19469
+ const chunkByName = new Map(chunkOutputPaths.filter(isSharedChunkPath).map((path) => [basename14(path), path]));
19389
19470
  const selected = new Set(vueOutputPaths);
19390
19471
  if (chunkByName.size === 0)
19391
19472
  return [...selected];
@@ -19445,7 +19526,7 @@ var VUE_HMR_RUNTIME, USE_DECLARATION, MODULE_COMMENT, LINE_TERMINATOR, STATEMENT
19445
19526
  const insertAt = firstDeclaration?.start ?? 0;
19446
19527
  return restore(`${wrapped.slice(0, insertAt)}${VUE_HMR_RUNTIME}
19447
19528
  ${wrapped.slice(insertAt)}`);
19448
- }, isSharedChunkPath = (path) => isSharedChunkFile(basename13(path)), resolveVueComposableModuleId = (commentPath, options) => {
19529
+ }, isSharedChunkPath = (path) => isSharedChunkFile(basename14(path)), resolveVueComposableModuleId = (commentPath, options) => {
19449
19530
  const absolutePath = resolve33(options.projectRoot, commentPath);
19450
19531
  const { vueDir, generatedVueDir } = options;
19451
19532
  if (!vueDir || !generatedVueDir)
@@ -19870,8 +19951,14 @@ var commonAncestor = (paths, fallback) => {
19870
19951
  var init_commonAncestor = () => {};
19871
19952
 
19872
19953
  // src/utils/buildDirectoryLock.ts
19873
- import { mkdirSync as mkdirSync12, unlinkSync, writeFileSync as writeFileSync14, readFileSync as readFileSync32 } from "fs";
19874
- import { dirname as dirname23, join as join44 } from "path";
19954
+ import {
19955
+ mkdirSync as mkdirSync12,
19956
+ readFileSync as readFileSync32,
19957
+ realpathSync as realpathSync3,
19958
+ unlinkSync,
19959
+ writeFileSync as writeFileSync14
19960
+ } from "fs";
19961
+ import { dirname as dirname23, join as join44, resolve as resolve36 } from "path";
19875
19962
  var heldLocks, HELD_LOCKS_ENV = "ABSOLUTE_HELD_BUILD_DIRECTORY_LOCKS", exitHandlersRegistered = false, registerExitHandlersOnce = () => {
19876
19963
  if (exitHandlersRegistered)
19877
19964
  return;
@@ -19914,6 +20001,13 @@ var heldLocks, HELD_LOCKS_ENV = "ABSOLUTE_HELD_BUILD_DIRECTORY_LOCKS", exitHandl
19914
20001
  const locks = readHeldLockEnv();
19915
20002
  locks.delete(buildDirectory);
19916
20003
  writeHeldLockEnv(locks);
20004
+ }, lockProjectRoot = (buildDirectory) => {
20005
+ const projectRoot = dirname23(resolve36(buildDirectory));
20006
+ try {
20007
+ return realpathSync3.native(projectRoot);
20008
+ } catch {
20009
+ return projectRoot;
20010
+ }
19917
20011
  }, writeLockFileSync = (lockPath, metadata) => {
19918
20012
  mkdirSync12(dirname23(lockPath), { recursive: true });
19919
20013
  writeFileSync14(lockPath, JSON.stringify(metadata, null, 2), { flag: "wx" });
@@ -19922,11 +20016,13 @@ var heldLocks, HELD_LOCKS_ENV = "ABSOLUTE_HELD_BUILD_DIRECTORY_LOCKS", exitHandl
19922
20016
  const raw = readFileSync32(lockPath, "utf-8");
19923
20017
  const parsed = JSON.parse(raw);
19924
20018
  if (typeof parsed === "object" && parsed !== null && typeof parsed.pid === "number") {
19925
- return {
20019
+ const metadata = {
19926
20020
  pid: parsed.pid,
19927
20021
  port: typeof parsed.port === "number" ? parsed.port : null,
20022
+ projectRoot: typeof parsed.projectRoot === "string" ? parsed.projectRoot : undefined,
19928
20023
  startedAt: typeof parsed.startedAt === "string" ? parsed.startedAt : new Date().toISOString()
19929
20024
  };
20025
+ return metadata;
19930
20026
  }
19931
20027
  } catch {}
19932
20028
  return null;
@@ -19947,6 +20043,11 @@ var heldLocks, HELD_LOCKS_ENV = "ABSOLUTE_HELD_BUILD_DIRECTORY_LOCKS", exitHandl
19947
20043
  unlinkSync(lockPath);
19948
20044
  console.warn(`[absolutejs] removed stale lock from PID ${pid}`);
19949
20045
  } catch {}
20046
+ }, removeForeignLockSync = (lockPath, existing) => {
20047
+ try {
20048
+ unlinkSync(lockPath);
20049
+ console.warn(`[absolutejs] removed a build lock copied from ${existing.projectRoot} (PID ${existing.pid} holds the original project, not this one)`);
20050
+ } catch {}
19950
20051
  }, LOCK_POLL_MS = 250, DEFAULT_WAIT_TIMEOUT_MS = 120000, acquireBuildDirectoryLock = async (buildDirectory, options = {}) => {
19951
20052
  registerExitHandlersOnce();
19952
20053
  if (readHeldLockEnv().has(buildDirectory)) {
@@ -19968,9 +20069,11 @@ var heldLocks, HELD_LOCKS_ENV = "ABSOLUTE_HELD_BUILD_DIRECTORY_LOCKS", exitHandl
19968
20069
  const waitTimeoutMs = options.waitTimeoutMs ?? DEFAULT_WAIT_TIMEOUT_MS;
19969
20070
  const start = Date.now();
19970
20071
  const tryCreate = () => {
20072
+ mkdirSync12(dirname23(lockPath), { recursive: true });
19971
20073
  writeLockFileSync(lockPath, {
19972
20074
  pid: process.pid,
19973
20075
  port: options.port ?? null,
20076
+ projectRoot: lockProjectRoot(buildDirectory),
19974
20077
  startedAt: new Date().toISOString()
19975
20078
  });
19976
20079
  };
@@ -19992,6 +20095,10 @@ var heldLocks, HELD_LOCKS_ENV = "ABSOLUTE_HELD_BUILD_DIRECTORY_LOCKS", exitHandl
19992
20095
  removeStaleLockSync(lockPath, existing.pid);
19993
20096
  continue;
19994
20097
  }
20098
+ if (existing.projectRoot !== undefined && existing.projectRoot !== lockProjectRoot(buildDirectory)) {
20099
+ removeForeignLockSync(lockPath, existing);
20100
+ continue;
20101
+ }
19995
20102
  if (wait && Date.now() - start < waitTimeoutMs) {
19996
20103
  await Bun.sleep(LOCK_POLL_MS);
19997
20104
  continue;
@@ -21002,7 +21109,7 @@ var init_typescript_translator = __esm(() => {
21002
21109
 
21003
21110
  // src/dev/angular/fastHmrCompiler.ts
21004
21111
  import { existsSync as existsSync37, readFileSync as readFileSync33, statSync as statSync5 } from "fs";
21005
- import { dirname as dirname25, extname as extname15, relative as relative22, resolve as resolve36 } from "path";
21112
+ import { dirname as dirname25, extname as extname15, relative as relative22, resolve as resolve37 } from "path";
21006
21113
  var fail2 = (reason, detail, location) => ({
21007
21114
  detail,
21008
21115
  ok: false,
@@ -21314,7 +21421,7 @@ var fail2 = (reason, detail, location) => ({
21314
21421
  if (!spec.startsWith(".") && !spec.startsWith("/")) {
21315
21422
  return true;
21316
21423
  }
21317
- const base = resolve36(componentDir, spec);
21424
+ const base = resolve37(componentDir, spec);
21318
21425
  const candidates = [
21319
21426
  `${base}.ts`,
21320
21427
  `${base}.tsx`,
@@ -22130,7 +22237,7 @@ var fail2 = (reason, detail, location) => ({
22130
22237
  return null;
22131
22238
  }, resolveDtsFromSpec = (spec, fromDir) => {
22132
22239
  const stripped = spec.replace(/\.[mc]?js$/, "");
22133
- const base = resolve36(fromDir, stripped);
22240
+ const base = resolve37(fromDir, stripped);
22134
22241
  const candidates = [
22135
22242
  `${base}.d.ts`,
22136
22243
  `${base}.d.mts`,
@@ -22154,7 +22261,7 @@ var fail2 = (reason, detail, location) => ({
22154
22261
  return null;
22155
22262
  }, resolveChildComponentInfo = (className, spec, componentDir, projectRoot) => {
22156
22263
  if (spec.startsWith(".") || spec.startsWith("/")) {
22157
- const base = resolve36(componentDir, spec);
22264
+ const base = resolve37(componentDir, spec);
22158
22265
  const candidates = [
22159
22266
  `${base}.ts`,
22160
22267
  `${base}.tsx`,
@@ -22373,13 +22480,13 @@ var fail2 = (reason, detail, location) => ({
22373
22480
  }
22374
22481
  if (!matches)
22375
22482
  continue;
22376
- const resolved = resolve36(componentDir, spec);
22483
+ const resolved = resolve37(componentDir, spec);
22377
22484
  for (const ext of TS_EXTENSIONS) {
22378
22485
  const candidate = resolved + ext;
22379
22486
  if (existsSync37(candidate))
22380
22487
  return candidate;
22381
22488
  }
22382
- const indexCandidate = resolve36(resolved, "index.ts");
22489
+ const indexCandidate = resolve37(resolved, "index.ts");
22383
22490
  if (existsSync37(indexCandidate))
22384
22491
  return indexCandidate;
22385
22492
  }
@@ -22624,7 +22731,7 @@ ${transpiled}
22624
22731
  return compileStyleFileIfNeeded(abs);
22625
22732
  return compileStyleFileIfNeededSync(abs);
22626
22733
  }, resolveAndReadStyleResource = async (componentDir, url) => {
22627
- const abs = resolve36(componentDir, url);
22734
+ const abs = resolve37(componentDir, url);
22628
22735
  if (!existsSync37(abs)) {
22629
22736
  const failure = {
22630
22737
  detail: `Style file not found: ${url} (looked for ${abs})`,
@@ -22668,7 +22775,7 @@ ${block}
22668
22775
  const cached = projectOptionsCache.get(projectRoot);
22669
22776
  if (cached !== undefined)
22670
22777
  return cached;
22671
- const tsconfigPath = resolve36(projectRoot, "tsconfig.json");
22778
+ const tsconfigPath = resolve37(projectRoot, "tsconfig.json");
22672
22779
  const opts = {};
22673
22780
  if (existsSync37(tsconfigPath)) {
22674
22781
  try {
@@ -22752,7 +22859,7 @@ ${block}
22752
22859
  templateText = decoratorMeta.template;
22753
22860
  templatePath = componentFilePath;
22754
22861
  } else if (decoratorMeta.templateUrl) {
22755
- const tplAbs = resolve36(componentDir, decoratorMeta.templateUrl);
22862
+ const tplAbs = resolve37(componentDir, decoratorMeta.templateUrl);
22756
22863
  if (!existsSync37(tplAbs)) {
22757
22864
  return fail2("template-resource-not-found", `Template file not found: ${tplAbs}`, { file: componentFilePath });
22758
22865
  }
@@ -23414,7 +23521,7 @@ var init_scanAngularHandlerCalls = __esm(() => {
23414
23521
 
23415
23522
  // src/build/scanAngularPageRoutes.ts
23416
23523
  import { readdirSync as readdirSync5, readFileSync as readFileSync36 } from "fs";
23417
- import { basename as basename14, join as join49 } from "path";
23524
+ import { basename as basename15, join as join49 } from "path";
23418
23525
  var SOURCE_EXTENSIONS5, SKIP_DIRS4, hasSourceExtension4 = (filePath) => {
23419
23526
  const idx = filePath.lastIndexOf(".");
23420
23527
  if (idx === -1)
@@ -23423,7 +23530,7 @@ var SOURCE_EXTENSIONS5, SKIP_DIRS4, hasSourceExtension4 = (filePath) => {
23423
23530
  }, isPageFile = (filePath) => {
23424
23531
  if (!hasSourceExtension4(filePath))
23425
23532
  return false;
23426
- const base = basename14(filePath);
23533
+ const base = basename15(filePath);
23427
23534
  if (base.endsWith(".d.ts"))
23428
23535
  return false;
23429
23536
  if (base.endsWith(".test.ts"))
@@ -23489,7 +23596,7 @@ var SOURCE_EXTENSIONS5, SKIP_DIRS4, hasSourceExtension4 = (filePath) => {
23489
23596
  continue;
23490
23597
  }
23491
23598
  const hasRoutes = hasTopLevelRoutesExport(source, file);
23492
- const base = basename14(file).replace(/\.[cm]?[tj]sx?$/, "");
23599
+ const base = basename15(file).replace(/\.[cm]?[tj]sx?$/, "");
23493
23600
  const manifestKey = toPascal(base);
23494
23601
  out.push({
23495
23602
  hasRoutes,
@@ -23736,9 +23843,9 @@ import {
23736
23843
  dirname as dirname27,
23737
23844
  isAbsolute as isAbsolute10,
23738
23845
  join as join51,
23739
- basename as basename15,
23846
+ basename as basename16,
23740
23847
  extname as extname16,
23741
- resolve as resolve37,
23848
+ resolve as resolve38,
23742
23849
  relative as relative23,
23743
23850
  sep as sep8
23744
23851
  } from "path";
@@ -23752,19 +23859,19 @@ var withResolvedSources = (map, sourceFile) => {
23752
23859
  return map;
23753
23860
  return {
23754
23861
  ...map,
23755
- sources: sources.map((source) => typeof source === "string" && !isAbsolute10(source) ? resolve37(dirname27(sourceFile), source) : source)
23862
+ sources: sources.map((source) => typeof source === "string" && !isAbsolute10(source) ? resolve38(dirname27(sourceFile), source) : source)
23756
23863
  };
23757
23864
  }, resolveDevClientDir2 = () => {
23758
23865
  const projectRoot = process.cwd();
23759
- const fromSource = resolve37(import.meta.dir, "../dev/client");
23866
+ const fromSource = resolve38(import.meta.dir, "../dev/client");
23760
23867
  if (existsSync39(fromSource) && fromSource.startsWith(projectRoot)) {
23761
23868
  return fromSource;
23762
23869
  }
23763
- const fromNodeModules = resolve37(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
23870
+ const fromNodeModules = resolve38(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
23764
23871
  if (existsSync39(fromNodeModules))
23765
23872
  return fromNodeModules;
23766
- return resolve37(import.meta.dir, "./dev/client");
23767
- }, devClientDir2, hmrClientPath3, persistentCache, sourceHashCache, transpiler3, DYNAMIC_IMPORT_PATTERN, LAZY_MODULE_REGISTRY_NAME = "absolutejs.svelte.lazy-modules", LAZY_RESOLVED_NAME = "absolutejs.svelte.lazy-resolved", LAZY_PRELOAD_MAX_DEPTH = 5, toSourceId = (path) => relative23(process.cwd(), path).replace(/\\/g, "/"), removeUnusedRequireHelper = (code) => {
23873
+ return resolve38(import.meta.dir, "./dev/client");
23874
+ }, devClientDir2, hmrClientPath3, persistentCaches, sourceHashCaches, transpiler3, DYNAMIC_IMPORT_PATTERN, LAZY_MODULE_REGISTRY_NAME = "absolutejs.svelte.lazy-modules", LAZY_RESOLVED_NAME = "absolutejs.svelte.lazy-resolved", LAZY_PRELOAD_MAX_DEPTH = 5, toSourceId = (path) => relative23(process.cwd(), path).replace(/\\/g, "/"), removeUnusedRequireHelper = (code) => {
23768
23875
  const helperStart = code.indexOf("var __require = /* @__PURE__ */");
23769
23876
  if (helperStart === -1) {
23770
23877
  return code;
@@ -23790,7 +23897,7 @@ var withResolvedSources = (map, sourceFile) => {
23790
23897
  }, resolveRelativeModule2 = async (spec, from) => {
23791
23898
  if (!spec.startsWith("."))
23792
23899
  return null;
23793
- const basePath = resolve37(dirname27(from), spec);
23900
+ const basePath = resolve38(dirname27(from), spec);
23794
23901
  const candidates = [
23795
23902
  basePath,
23796
23903
  `${basePath}.ts`,
@@ -23817,7 +23924,7 @@ var withResolvedSources = (map, sourceFile) => {
23817
23924
  const resolved = resolvePackageImport(spec);
23818
23925
  return resolved && /\.svelte(\.(?:ts|js))?$/.test(resolved) ? resolved : null;
23819
23926
  }
23820
- const basePath = resolve37(dirname27(from), spec);
23927
+ const basePath = resolve38(dirname27(from), spec);
23821
23928
  const explicit = /\.(svelte|svelte\.(?:ts|js))$/.test(basePath);
23822
23929
  if (!explicit) {
23823
23930
  const extensions = [".svelte", ".svelte.ts", ".svelte.js"];
@@ -23844,9 +23951,13 @@ var withResolvedSources = (map, sourceFile) => {
23844
23951
  client: toClient.startsWith(".") || toClient.startsWith("/") ? toClient : `./${toClient}`,
23845
23952
  server: toServer.startsWith(".") ? toServer : `./${toServer}`
23846
23953
  });
23847
- }, compileSvelte = async (entryPoints, svelteRoot, cache = new Map, isDev = false, stylePreprocessors) => {
23954
+ }, compileSvelte = async (entryPoints, svelteRoot, cache = new Map, isDev = false, stylePreprocessors, options = {}) => {
23848
23955
  const { compile, compileModule, preprocess } = await import("svelte/compiler");
23849
- const generatedDir = getFrameworkGeneratedDir("svelte");
23956
+ const externalCss = options.externalCss === true;
23957
+ const cssMode = externalCss ? "external" : "injected";
23958
+ const persistentCache = persistentCaches[cssMode];
23959
+ const sourceHashCache = sourceHashCaches[cssMode];
23960
+ const generatedDir = externalCss ? join51(getFrameworkGeneratedDir("svelte"), "islands") : getFrameworkGeneratedDir("svelte");
23850
23961
  const clientDir = join51(generatedDir, "client");
23851
23962
  const indexDir = join51(generatedDir, "indexes");
23852
23963
  const serverDir = join51(generatedDir, "server");
@@ -23861,7 +23972,7 @@ var withResolvedSources = (map, sourceFile) => {
23861
23972
  const contentHash = Bun.hash(raw).toString(BASE_36_RADIX);
23862
23973
  const prevHash = sourceHashCache.get(src);
23863
23974
  const persistent = persistentCache.get(src);
23864
- if (prevHash === contentHash && persistent && existsSync39(persistent.ssr) && existsSync39(persistent.client)) {
23975
+ if (prevHash === contentHash && persistent && existsSync39(persistent.ssr) && existsSync39(persistent.client) && (!persistent.css || existsSync39(persistent.css))) {
23865
23976
  cache.set(src, persistent);
23866
23977
  return persistent;
23867
23978
  }
@@ -23880,7 +23991,7 @@ var withResolvedSources = (map, sourceFile) => {
23880
23991
  const fileRoute = fileRouteFor(src);
23881
23992
  const rawRel = fileRoute ? "pages" : dirname27(relative23(svelteRoot, src)).replace(/\\/g, "/");
23882
23993
  const relDir = rawRel.startsWith("..") ? `_ext/${relative23(process.cwd(), dirname27(src)).replace(/\\/g, "/")}` : rawRel;
23883
- const baseName = fileRoute?.name ?? basename15(src).replace(/\.svelte(\.(ts|js))?$/, "");
23994
+ const baseName = fileRoute?.name ?? basename16(src).replace(/\.svelte(\.(ts|js))?$/, "");
23884
23995
  const staticImportPaths = Array.from(transpiledServer.matchAll(/from\s+['"]([^'"]+)['"]/g)).map((match) => match[1]).filter((path) => path !== undefined);
23885
23996
  const dynamicImportPaths = Array.from(transpiledServer.matchAll(DYNAMIC_IMPORT_PATTERN)).map((match) => match[1]).filter((path) => path !== undefined);
23886
23997
  const importPaths = Array.from(new Set([...staticImportPaths, ...dynamicImportPaths]));
@@ -23926,14 +24037,14 @@ var withResolvedSources = (map, sourceFile) => {
23926
24037
  };
23927
24038
  const generate = (mode) => {
23928
24039
  const transpiled = mode === "server" ? transpiledServer : transpiledClient;
23929
- const compiledJs = isModule ? compileModule(transpiled, {
24040
+ const compiled = isModule ? compileModule(transpiled, {
23930
24041
  dev: mode === "client" && dev,
23931
24042
  experimental: {
23932
24043
  async: transformedByLowering
23933
24044
  },
23934
24045
  filename: src
23935
- }).js : compile(transpiled, {
23936
- css: "injected",
24046
+ }) : compile(transpiled, {
24047
+ css: externalCss && mode === "client" ? "external" : "injected",
23937
24048
  dev: mode === "client" && dev,
23938
24049
  experimental: {
23939
24050
  async: transformedByLowering
@@ -23941,7 +24052,8 @@ var withResolvedSources = (map, sourceFile) => {
23941
24052
  filename: src,
23942
24053
  generate: mode,
23943
24054
  hmr: isDev
23944
- }).js;
24055
+ });
24056
+ const compiledJs = compiled.js;
23945
24057
  let code = compiledJs.code.replace(/\.svelte(?:\.(?:ts|js))?(['"])/g, ".js$1");
23946
24058
  if (mode === "client" && isDev) {
23947
24059
  const moduleKey = `/@src/${relative23(process.cwd(), src).replace(/\\/g, "/")}`;
@@ -23954,7 +24066,8 @@ var withResolvedSources = (map, sourceFile) => {
23954
24066
  code = removeUnusedRequireHelper(code);
23955
24067
  }
23956
24068
  code += islandMetadataExports;
23957
- return { code, map: compiledJs.map };
24069
+ const css = !isModule && externalCss && mode === "client" ? (compiled.css?.code ?? "").trim() : "";
24070
+ return { code, css, map: compiledJs.map };
23958
24071
  };
23959
24072
  const ssrPath = join51(serverDir, relDir, `${baseName}.js`);
23960
24073
  const clientPath = join51(clientDir, relDir, `${baseName}.js`);
@@ -23980,6 +24093,7 @@ export const ${LAZY_SOURCE_EXPORT} = ${sourceId};${componentStamp}`;
23980
24093
  ]);
23981
24094
  const inlineMap = (map) => map ? `${inlineSourceMapComment(withResolvedSources(map, src))}
23982
24095
  ` : "";
24096
+ let cssFile;
23983
24097
  if (isModule) {
23984
24098
  const generated = generate("client");
23985
24099
  const bundle = rewriteExternalImports(generated.code, "client") + inlineMap(generated.map);
@@ -23992,14 +24106,21 @@ export const ${LAZY_SOURCE_EXPORT} = ${sourceId};${componentStamp}`;
23992
24106
  const clientGen = generate("client");
23993
24107
  const serverCode = rewriteExternalImports(serverGen.code, "server");
23994
24108
  const serverBundle = serverCode + sourceExport(serverCode) + inlineMap(serverGen.map);
23995
- const clientBundle = rewriteExternalImports(clientGen.code, "client") + lazyRegistrations + inlineMap(clientGen.map);
24109
+ const cssPath = clientPath.replace(/\.js$/, ".css");
24110
+ const cssImport = clientGen.css ? `
24111
+ import ${JSON.stringify(`./${basename16(cssPath)}`)};
24112
+ ` : "";
24113
+ const clientBundle = rewriteExternalImports(clientGen.code, "client") + lazyRegistrations + cssImport + inlineMap(clientGen.map);
24114
+ cssFile = clientGen.css ? cssPath : undefined;
23996
24115
  await Promise.all([
23997
24116
  write2(ssrPath, serverBundle),
23998
- write2(clientPath, clientBundle)
24117
+ write2(clientPath, clientBundle),
24118
+ ...clientGen.css ? [write2(cssPath, clientGen.css)] : []
23999
24119
  ]);
24000
24120
  }
24001
24121
  const built = {
24002
24122
  client: clientPath,
24123
+ css: cssFile,
24003
24124
  hasAwaitSlot: loweredAwaitServerSource.transformed || loweredAwaitClientSource.transformed || loweredServerSource.transformed || loweredClientSource.transformed || hasAwaitSlotFromChildren,
24004
24125
  isModule,
24005
24126
  ssr: ssrPath
@@ -24012,7 +24133,7 @@ export const ${LAZY_SOURCE_EXPORT} = ${sourceId};${componentStamp}`;
24012
24133
  const componentRoots = roots.filter((root) => !root.isModule);
24013
24134
  await Promise.all(componentRoots.map(async ({ client, hasAwaitSlot }) => {
24014
24135
  const relClientDir = dirname27(relative23(clientDir, client));
24015
- const name = basename15(client, extname16(client));
24136
+ const name = basename16(client, extname16(client));
24016
24137
  const indexPath = join51(indexDir, relClientDir, `${name}.js`);
24017
24138
  const importRaw = relative23(dirname27(indexPath), client).split(sep8).join("/");
24018
24139
  const importPath = importRaw.startsWith(".") || importRaw.startsWith("/") ? importRaw : `./${importRaw}`;
@@ -24129,7 +24250,7 @@ if (typeof window !== "undefined") {
24129
24250
  svelteClientPaths: roots.map(({ client }) => client),
24130
24251
  svelteIndexPaths: componentRoots.map(({ client }) => {
24131
24252
  const rel = dirname27(relative23(clientDir, client));
24132
- return join51(indexDir, rel, basename15(client));
24253
+ return join51(indexDir, rel, basename16(client));
24133
24254
  }),
24134
24255
  svelteServerPaths: roots.map(({ ssr }) => ssr)
24135
24256
  };
@@ -24147,8 +24268,14 @@ var init_compileSvelte = __esm(() => {
24147
24268
  init_lazyModule();
24148
24269
  devClientDir2 = resolveDevClientDir2();
24149
24270
  hmrClientPath3 = join51(devClientDir2, "hmrClient.ts").replace(/\\/g, "/");
24150
- persistentCache = new Map;
24151
- sourceHashCache = new Map;
24271
+ persistentCaches = {
24272
+ external: new Map,
24273
+ injected: new Map
24274
+ };
24275
+ sourceHashCaches = {
24276
+ external: new Map,
24277
+ injected: new Map
24278
+ };
24152
24279
  transpiler3 = new Transpiler3({ loader: "ts", target: "browser" });
24153
24280
  DYNAMIC_IMPORT_PATTERN = /\bimport\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
24154
24281
  });
@@ -24650,8 +24777,8 @@ var init_chainInlineSourcemaps = __esm(() => {
24650
24777
  import { createHash as createHash8 } from "crypto";
24651
24778
  import { existsSync as existsSync40, readFileSync as readFileSync39 } from "fs";
24652
24779
  import { mkdir as mkdir10, rename as rename2, writeFile as writeFile11 } from "fs/promises";
24653
- import { join as join52, resolve as resolve38 } from "path";
24654
- var CACHE_DIR_NAME = "compile-cache", ABSOLUTE_CACHE_DIR_NAME2 = ".absolutejs", CACHE_FORMAT_VERSION = 3, FILE_NAME_HASH_LENGTH = 32, vueCompileCacheEnabled = () => process.env.ABSOLUTE_COMPILE_CACHE !== "0", hashContent = (content) => createHash8("sha256").update(content).digest("hex"), hashParts = (parts) => {
24780
+ import { join as join52, resolve as resolve39 } from "path";
24781
+ var CACHE_DIR_NAME = "compile-cache", ABSOLUTE_CACHE_DIR_NAME2 = ".absolutejs", CACHE_FORMAT_VERSION = 4, FILE_NAME_HASH_LENGTH = 32, vueCompileCacheEnabled = () => process.env.ABSOLUTE_COMPILE_CACHE !== "0", hashContent = (content) => createHash8("sha256").update(content).digest("hex"), hashParts = (parts) => {
24655
24782
  const hash = createHash8("sha256");
24656
24783
  for (const part of parts) {
24657
24784
  hash.update(part);
@@ -24660,8 +24787,8 @@ var CACHE_DIR_NAME = "compile-cache", ABSOLUTE_CACHE_DIR_NAME2 = ".absolutejs",
24660
24787
  return hash.digest("hex");
24661
24788
  }, readOwnPackageVersion = () => {
24662
24789
  const candidates = [
24663
- resolve38(import.meta.dir, "..", "..", "package.json"),
24664
- resolve38(import.meta.dir, "..", "package.json")
24790
+ resolve39(import.meta.dir, "..", "..", "package.json"),
24791
+ resolve39(import.meta.dir, "..", "package.json")
24665
24792
  ];
24666
24793
  for (const candidate of candidates) {
24667
24794
  try {
@@ -24742,7 +24869,7 @@ __export(exports_emitTsHelpers, {
24742
24869
  var {file: file3, Transpiler: Transpiler4, write: write3 } = globalThis.Bun;
24743
24870
  import { copyFileSync as copyFileSync2, existsSync as existsSync41, readdirSync as readdirSync6, statSync as statSync6 } from "fs";
24744
24871
  import { mkdir as mkdir11, rename as rename3, writeFile as writeFile12 } from "fs/promises";
24745
- import { dirname as dirname28, join as join53, resolve as resolve39, sep as sep9 } from "path";
24872
+ import { dirname as dirname28, join as join53, resolve as resolve40, sep as sep9 } from "path";
24746
24873
  var CACHE_DIR_NAME2 = "vue-helpers", CACHE_FORMAT_VERSION2 = 2, HASH_LENGTH4 = 24, transpiler4, cacheDir = () => join53(process.cwd(), ".absolutejs", "compile-cache", CACHE_DIR_NAME2), cacheKey2 = (sourcePath, sourceCode) => {
24747
24874
  const frameworkVersion = frameworkVersionForCache();
24748
24875
  if (!frameworkVersion || !vueCompileCacheEnabled())
@@ -24809,7 +24936,7 @@ var CACHE_DIR_NAME2 = "vue-helpers", CACHE_FORMAT_VERSION2 = 2, HASH_LENGTH4 = 2
24809
24936
  return false;
24810
24937
  }
24811
24938
  }, resolveImportTarget = (sourceDir, specifier) => {
24812
- const base = resolve39(sourceDir, specifier);
24939
+ const base = resolve40(sourceDir, specifier);
24813
24940
  return IMPORT_CANDIDATE_SUFFIXES.map((suffix) => `${base}${suffix}`).find(isFilePath) ?? base;
24814
24941
  }, rewriteMirrorImports = (code, sourcePath) => {
24815
24942
  const sourceDir = dirname28(sourcePath);
@@ -24873,16 +25000,16 @@ var init_emitTsHelpers = __esm(() => {
24873
25000
  });
24874
25001
 
24875
25002
  // src/build/inlineCssImports.ts
24876
- import { readFileSync as readFileSync40, realpathSync as realpathSync3 } from "fs";
24877
- import { dirname as dirname29, resolve as resolve40 } from "path";
25003
+ import { readFileSync as readFileSync40, realpathSync as realpathSync4 } from "fs";
25004
+ import { dirname as dirname29, resolve as resolve41 } from "path";
24878
25005
  var inlineCssImports = (cssContent, cssFilePath, visited = new Set) => {
24879
- const resolved = realpathSync3(cssFilePath);
25006
+ const resolved = realpathSync4(cssFilePath);
24880
25007
  if (visited.has(resolved))
24881
25008
  return "";
24882
25009
  visited.add(resolved);
24883
25010
  const importRegex = /@import\s+(?:url\(\s*)?(['"])(\.{1,2}\/[^'"]+)\1\s*\)?\s*;?/g;
24884
25011
  return cssContent.replace(importRegex, (match, _quote, relPath) => {
24885
- const importedPath = resolve40(dirname29(cssFilePath), relPath);
25012
+ const importedPath = resolve41(dirname29(cssFilePath), relPath);
24886
25013
  if (!isFile(importedPath))
24887
25014
  return match;
24888
25015
  const importedContent = readFileSync40(importedPath, "utf-8");
@@ -24894,8 +25021,8 @@ var init_inlineCssImports = __esm(() => {
24894
25021
  });
24895
25022
 
24896
25023
  // src/build/compileVueSfc.ts
24897
- import { existsSync as existsSync42, readFileSync as readFileSync41, realpathSync as realpathSync4 } from "fs";
24898
- import { dirname as dirname30, join as join54, relative as relative24, resolve as resolve41 } from "path";
25024
+ import { existsSync as existsSync42, readFileSync as readFileSync41, realpathSync as realpathSync5 } from "fs";
25025
+ import { dirname as dirname30, join as join54, relative as relative24, resolve as resolve42 } from "path";
24899
25026
  var {Transpiler: Transpiler5 } = globalThis.Bun;
24900
25027
  var transpiler5, toJs = (filePath, sourceDir) => {
24901
25028
  if (filePath.endsWith(".vue"))
@@ -24904,20 +25031,20 @@ var transpiler5, toJs = (filePath, sourceDir) => {
24904
25031
  return filePath.replace(/\.ts$/, ".js");
24905
25032
  if (isStylePath(filePath)) {
24906
25033
  if (sourceDir && (filePath.startsWith("./") || filePath.startsWith("../"))) {
24907
- return resolve41(sourceDir, filePath);
25034
+ return resolve42(sourceDir, filePath);
24908
25035
  }
24909
25036
  return filePath;
24910
25037
  }
24911
25038
  if (sourceDir && (filePath.startsWith("./") || filePath.startsWith("../"))) {
24912
- const directTs = resolve41(sourceDir, `${filePath}.ts`);
25039
+ const directTs = resolve42(sourceDir, `${filePath}.ts`);
24913
25040
  if (existsSync42(directTs))
24914
25041
  return `${filePath}.js`;
24915
- const indexedTs = resolve41(sourceDir, filePath, "index.ts");
25042
+ const indexedTs = resolve42(sourceDir, filePath, "index.ts");
24916
25043
  if (existsSync42(indexedTs))
24917
25044
  return `${filePath}/index.js`;
24918
25045
  }
24919
25046
  return `${filePath}.js`;
24920
- }, stripExports2 = (code) => code.replace(/export\s+default/, "const script ="), mergeVueImports2 = (code) => {
25047
+ }, mergeVueImports2 = (code) => {
24921
25048
  const lines = code.split(`
24922
25049
  `);
24923
25050
  const specifierSet = new Set;
@@ -24960,7 +25087,7 @@ const ${localName} = (source) => ${importedName}(
24960
25087
  : { ...source, loader: () => __absoluteResolveAsyncVueComponent(source.loader) },
24961
25088
  );`;
24962
25089
  return code.replace(vueImportRegex, `import { ${specifiers.join(", ")} } from 'vue';${wrapper}`);
24963
- }, toOutputImport = (specifier, sourceDir) => specifier.startsWith("./") || specifier.startsWith("../") ? vueMirrorImport(join54(sourceDir, "__importer__"), specifier, resolve41(sourceDir, specifier)) : specifier, rewriteRelativeImports = (code, sourceDir) => code.replace(/(['"])(\.{1,2}\/[^'"]+)(['"])/g, (_, quoteStart, relativeImport, quoteEnd) => `${quoteStart}${toOutputImport(toJs(relativeImport, sourceDir), sourceDir)}${quoteEnd}`), compileVueSfc = async ({
25090
+ }, toOutputImport = (specifier, sourceDir) => specifier.startsWith("./") || specifier.startsWith("../") ? vueMirrorImport(join54(sourceDir, "__importer__"), specifier, resolve42(sourceDir, specifier)) : specifier, rewriteRelativeImports = (code, sourceDir) => code.replace(/(['"])(\.{1,2}\/[^'"]+)(['"])/g, (_, quoteStart, relativeImport, quoteEnd) => `${quoteStart}${toOutputImport(toJs(relativeImport, sourceDir), sourceDir)}${quoteEnd}`), compileVueSfc = async ({
24964
25091
  clientOutputPath,
24965
25092
  componentId,
24966
25093
  hmrId,
@@ -24980,7 +25107,7 @@ const ${localName} = (source) => ${importedName}(
24980
25107
  const compiledScript = hasScript ? compiler.compileScript(descriptor, {
24981
25108
  fs: {
24982
25109
  fileExists: isFile,
24983
- realpath: realpathSync4,
25110
+ realpath: realpathSync5,
24984
25111
  readFile: (file) => {
24985
25112
  if (!isFile(file))
24986
25113
  return;
@@ -24989,19 +25116,20 @@ const ${localName} = (source) => ${importedName}(
24989
25116
  return content;
24990
25117
  }
24991
25118
  },
25119
+ genDefaultAs: "script",
24992
25120
  id: componentId,
24993
25121
  inlineTemplate: false,
24994
25122
  sourceMap: true
24995
- }) : { bindings: {}, content: "export default {};", map: undefined };
25123
+ }) : { bindings: {}, content: "const script = {};", map: undefined };
24996
25124
  const typeDependencies = "deps" in compiledScript ? compiledScript.deps ?? [] : [];
24997
25125
  for (const dep of typeDependencies) {
24998
25126
  if (dep in typeDepHashes || !existsSync42(dep))
24999
25127
  continue;
25000
25128
  typeDepHashes[dep] = hashContent(readFileSync41(dep, "utf-8"));
25001
25129
  }
25002
- const strippedScript = stripExports2(compiledScript.content);
25130
+ const scriptCode = compiledScript.content;
25003
25131
  const sourceDir = dirname30(sourceFilePath);
25004
- const transpiledScript = rewriteRelativeImports(transpiler5.transformSync(strippedScript), sourceDir);
25132
+ const transpiledScript = rewriteRelativeImports(transpiler5.transformSync(scriptCode), sourceDir);
25005
25133
  const generateRenderFunction = (ssr) => {
25006
25134
  const rendered = compiler.compileTemplate({
25007
25135
  compilerOptions: {
@@ -25067,7 +25195,7 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
25067
25195
  const inlineSourceMapFor = (finalContent) => {
25068
25196
  if (!compiledScript.map || !hasScript)
25069
25197
  return "";
25070
- const remap = buildLineRemap(strippedScript, finalContent);
25198
+ const remap = buildLineRemap(scriptCode, finalContent);
25071
25199
  const mappings = remapGeneratedLines(compiledScript.map.mappings, remap);
25072
25200
  const map = {
25073
25201
  ...compiledScript.map,
@@ -25481,24 +25609,24 @@ var init_workerPool = __esm(() => {
25481
25609
  import { existsSync as existsSync44 } from "fs";
25482
25610
  import { mkdir as mkdir12 } from "fs/promises";
25483
25611
  import {
25484
- basename as basename16,
25612
+ basename as basename17,
25485
25613
  dirname as dirname32,
25486
25614
  isAbsolute as isAbsolute11,
25487
25615
  join as join56,
25488
25616
  relative as relative25,
25489
- resolve as resolve42
25617
+ resolve as resolve43
25490
25618
  } from "path";
25491
25619
  var {file: file4, write: write4 } = globalThis.Bun;
25492
25620
  var resolveDevClientDir3 = () => {
25493
25621
  const projectRoot = process.cwd();
25494
- const fromSource = resolve42(import.meta.dir, "../dev/client");
25622
+ const fromSource = resolve43(import.meta.dir, "../dev/client");
25495
25623
  if (existsSync44(fromSource) && fromSource.startsWith(projectRoot)) {
25496
25624
  return fromSource;
25497
25625
  }
25498
- const fromNodeModules = resolve42(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
25626
+ const fromNodeModules = resolve43(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
25499
25627
  if (existsSync44(fromNodeModules))
25500
25628
  return fromNodeModules;
25501
- return resolve42(import.meta.dir, "./dev/client");
25629
+ return resolve43(import.meta.dir, "./dev/client");
25502
25630
  }, devClientDir3, hmrClientPath4, scriptCache, scriptSetupCache, templateCache, styleCache, persistentBuildCache, vueSourceHashCache, vueHmrMetadata, detectVueChangeType = (filePath, descriptor) => {
25503
25631
  const prevScript = scriptCache.get(filePath);
25504
25632
  const prevScriptSetup = scriptSetupCache.get(filePath);
@@ -25539,11 +25667,11 @@ var resolveDevClientDir3 = () => {
25539
25667
  return Array.from(new Set(found));
25540
25668
  }, resolveHelperTsPath = (sourceDir, helper) => {
25541
25669
  if (helper.endsWith(".ts"))
25542
- return resolve42(sourceDir, helper);
25543
- const direct = resolve42(sourceDir, `${helper}.ts`);
25670
+ return resolve43(sourceDir, helper);
25671
+ const direct = resolve43(sourceDir, `${helper}.ts`);
25544
25672
  if (existsSync44(direct))
25545
25673
  return direct;
25546
- const indexed = resolve42(sourceDir, helper, "index.ts");
25674
+ const indexed = resolve43(sourceDir, helper, "index.ts");
25547
25675
  if (existsSync44(indexed))
25548
25676
  return indexed;
25549
25677
  return direct;
@@ -25666,7 +25794,7 @@ var resolveDevClientDir3 = () => {
25666
25794
  throw error;
25667
25795
  }
25668
25796
  }, compileVueFileUncached = async (sourceFilePath, outputDirs, cacheMap, isEntryPoint, vueRootDir, compiler, runSfc, stylePreprocessors) => {
25669
- const fileBaseName = basename16(sourceFilePath, ".vue");
25797
+ const fileBaseName = basename17(sourceFilePath, ".vue");
25670
25798
  const componentId = toKebab(fileBaseName);
25671
25799
  vueCompileProfile.files += 1;
25672
25800
  const rawSourceContent = await timed("readMs", () => file4(sourceFilePath).text());
@@ -25703,12 +25831,12 @@ var resolveDevClientDir3 = () => {
25703
25831
  const childComponentPaths = importPaths.filter((path) => path.startsWith(".") && path.endsWith(".vue"));
25704
25832
  const packageComponentPaths = Array.from(resolvedPackageVueImports.entries());
25705
25833
  const helperModulePaths = importPaths.filter((path) => path.startsWith(".") && !path.endsWith(".vue") && !isStylePath(path));
25706
- const stylePathsImported = importPaths.filter((path) => (path.startsWith(".") || isAbsolute11(path)) && isStylePath(path)).map((path) => isAbsolute11(path) ? path : resolve42(dirname32(sourceFilePath), path));
25834
+ const stylePathsImported = importPaths.filter((path) => (path.startsWith(".") || isAbsolute11(path)) && isStylePath(path)).map((path) => isAbsolute11(path) ? path : resolve43(dirname32(sourceFilePath), path));
25707
25835
  for (const stylePath of stylePathsImported) {
25708
25836
  addStyleImporter(sourceFilePath, stylePath);
25709
25837
  }
25710
25838
  const childBuildResults = await Promise.all([
25711
- ...childComponentPaths.map((relativeChildPath) => compileVueFile(resolve42(dirname32(sourceFilePath), relativeChildPath), outputDirs, cacheMap, false, vueRootDir, compiler, runSfc, stylePreprocessors)),
25839
+ ...childComponentPaths.map((relativeChildPath) => compileVueFile(resolve43(dirname32(sourceFilePath), relativeChildPath), outputDirs, cacheMap, false, vueRootDir, compiler, runSfc, stylePreprocessors)),
25712
25840
  ...packageComponentPaths.map(([, absolutePath]) => compileVueFile(absolutePath, outputDirs, cacheMap, false, vueRootDir, compiler, runSfc, stylePreprocessors))
25713
25841
  ]);
25714
25842
  const cacheKeyStartedAt = performance.now();
@@ -25816,7 +25944,7 @@ var resolveDevClientDir3 = () => {
25816
25944
  const buildCache = new Map;
25817
25945
  const allTsHelperPaths = new Set;
25818
25946
  const expandSpaRouteChildren = async (entries) => {
25819
- const expanded = new Set(entries.map((entry) => resolve42(entry)));
25947
+ const expanded = new Set(entries.map((entry) => resolve43(entry)));
25820
25948
  const queue = [...expanded];
25821
25949
  while (queue.length > 0) {
25822
25950
  const entryPath = queue.pop();
@@ -25833,7 +25961,7 @@ var resolveDevClientDir3 = () => {
25833
25961
  });
25834
25962
  const routes = parseVueSpaRoutes(descriptor.script?.content ?? "");
25835
25963
  for (const { importPath } of routes) {
25836
- const childPath = resolve42(dirname32(entryPath), importPath);
25964
+ const childPath = resolve43(dirname32(entryPath), importPath);
25837
25965
  if (expanded.has(childPath) || !existsSync44(childPath)) {
25838
25966
  continue;
25839
25967
  }
@@ -25848,7 +25976,7 @@ var resolveDevClientDir3 = () => {
25848
25976
  vueCompileProfile.stageExpandMs = performance.now() - stageStartedAt;
25849
25977
  stageStartedAt = performance.now();
25850
25978
  const compiledPages = await Promise.all(expandedEntryPoints.map(async (entryPath) => {
25851
- const resolvedEntryPath = resolve42(entryPath);
25979
+ const resolvedEntryPath = resolve43(entryPath);
25852
25980
  const result = await compileVueFile(resolvedEntryPath, {
25853
25981
  client: clientOutputDir,
25854
25982
  css: cssOutputDir,
@@ -25865,7 +25993,7 @@ var resolveDevClientDir3 = () => {
25865
25993
  spaRoutes: result.spaRoutes
25866
25994
  };
25867
25995
  }
25868
- const entryBaseName = basename16(entryPath, ".vue");
25996
+ const entryBaseName = basename17(entryPath, ".vue");
25869
25997
  const indexOutputFile = join56(indexOutputDir, `${entryBaseName}.js`);
25870
25998
  const clientOutputFile = result.clientPath;
25871
25999
  await mkdir12(dirname32(indexOutputFile), { recursive: true });
@@ -26086,6 +26214,7 @@ var resolveDevClientDir3 = () => {
26086
26214
  hmrMetadata: new Map(vueHmrMetadata),
26087
26215
  vueClientPaths: compiledPages.map((p) => p.clientPath).filter(isString),
26088
26216
  vueCssPaths: compiledPages.flatMap((result) => result.cssPaths),
26217
+ vueCssPathsBySource: new Map(compiledPages.map((page) => [page.sourcePath, page.cssPaths])),
26089
26218
  vueIndexPaths: compiledPages.map((p) => p.indexPath).filter(isString),
26090
26219
  vueServerPaths: compiledPages.map((result) => result.serverPath),
26091
26220
  vueSpaRoutesBySource
@@ -26632,7 +26761,7 @@ __export(exports_compileAngular, {
26632
26761
  invalidateAngularJitCache: () => invalidateAngularJitCache
26633
26762
  });
26634
26763
  import { existsSync as existsSync45, readFileSync as readFileSync43, promises as fs5 } from "fs";
26635
- import { join as join57, basename as basename17, sep as sep10, dirname as dirname33, resolve as resolve43, relative as relative26 } from "path";
26764
+ import { join as join57, basename as basename18, sep as sep10, dirname as dirname33, resolve as resolve44, relative as relative26 } from "path";
26636
26765
  var {Glob: Glob8 } = globalThis.Bun;
26637
26766
  var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) => {
26638
26767
  const temporaryPath = `${path}.tmp.${process.pid}.${atomicWriteSequence++}`;
@@ -26647,10 +26776,10 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
26647
26776
  return tracePhase ? tracePhase(`compile/angular/${name}`, fn, metadata) : await fn();
26648
26777
  }, readTsconfigPathAliases = () => {
26649
26778
  try {
26650
- const configPath = resolve43(process.cwd(), "tsconfig.json");
26779
+ const configPath = resolve44(process.cwd(), "tsconfig.json");
26651
26780
  const config = lazyTypescript.readConfigFile(configPath, lazyTypescript.sys.readFile).config;
26652
26781
  const compilerOptions = config?.compilerOptions ?? {};
26653
- const baseUrl = resolve43(process.cwd(), compilerOptions.baseUrl ?? ".");
26782
+ const baseUrl = resolve44(process.cwd(), compilerOptions.baseUrl ?? ".");
26654
26783
  const aliases = Object.entries(compilerOptions.paths ?? {}).map(([pattern, replacements]) => ({ pattern, replacements }));
26655
26784
  return { aliases, baseUrl };
26656
26785
  } catch {
@@ -26670,7 +26799,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
26670
26799
  const wildcardValue = exactMatch ? "" : specifier.slice(prefix.length, specifier.length - suffix.length);
26671
26800
  for (const replacement of alias.replacements) {
26672
26801
  const candidate = replacement.replace("*", wildcardValue);
26673
- const resolved = resolveSourceFile(resolve43(baseUrl, candidate));
26802
+ const resolved = resolveSourceFile(resolve44(baseUrl, candidate));
26674
26803
  if (resolved)
26675
26804
  return resolved;
26676
26805
  }
@@ -26689,13 +26818,13 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
26689
26818
  ];
26690
26819
  return candidates.find((file) => existsSync45(file));
26691
26820
  }, createLegacyAngularAnimationUsageResolver = (rootDir) => {
26692
- const baseDir = resolve43(rootDir);
26821
+ const baseDir = resolve44(rootDir);
26693
26822
  const tsconfigAliases = readTsconfigPathAliases();
26694
26823
  const transpiler = new Bun.Transpiler({ loader: "tsx" });
26695
26824
  const scanCache = new Map;
26696
26825
  const resolveLocalImport = (specifier, fromDir) => {
26697
26826
  if (specifier.startsWith(".") || specifier.startsWith("/")) {
26698
- return resolveSourceFile(resolve43(fromDir, specifier));
26827
+ return resolveSourceFile(resolve44(fromDir, specifier));
26699
26828
  }
26700
26829
  const aliased = matchTsconfigAlias(specifier, tsconfigAliases.aliases, tsconfigAliases.baseUrl, resolveSourceFile);
26701
26830
  if (aliased)
@@ -26704,7 +26833,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
26704
26833
  const resolved = Bun.resolveSync(specifier, fromDir);
26705
26834
  if (resolved.includes("/node_modules/"))
26706
26835
  return;
26707
- const absolute = resolve43(resolved);
26836
+ const absolute = resolve44(resolved);
26708
26837
  if (!absolute.startsWith(baseDir))
26709
26838
  return;
26710
26839
  return resolveSourceFile(absolute);
@@ -26720,7 +26849,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
26720
26849
  usesLegacyAnimations: false
26721
26850
  });
26722
26851
  }
26723
- const resolved = resolve43(actualPath);
26852
+ const resolved = resolve44(actualPath);
26724
26853
  const cached = scanCache.get(resolved);
26725
26854
  if (cached)
26726
26855
  return cached;
@@ -26749,7 +26878,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
26749
26878
  const actualPath = resolveSourceFile(filePath);
26750
26879
  if (!actualPath)
26751
26880
  return false;
26752
- const resolved = resolve43(actualPath);
26881
+ const resolved = resolve44(actualPath);
26753
26882
  if (visited.has(resolved))
26754
26883
  return false;
26755
26884
  visited.add(resolved);
@@ -26767,14 +26896,14 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
26767
26896
  return (entryPath) => visit(entryPath);
26768
26897
  }, resolveDevClientDir4 = () => {
26769
26898
  const projectRoot = process.cwd();
26770
- const fromSource = resolve43(import.meta.dir, "../dev/client");
26899
+ const fromSource = resolve44(import.meta.dir, "../dev/client");
26771
26900
  if (existsSync45(fromSource) && fromSource.startsWith(projectRoot)) {
26772
26901
  return fromSource;
26773
26902
  }
26774
- const fromNodeModules = resolve43(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
26903
+ const fromNodeModules = resolve44(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
26775
26904
  if (existsSync45(fromNodeModules))
26776
26905
  return fromNodeModules;
26777
- return resolve43(import.meta.dir, "./dev/client");
26906
+ return resolve44(import.meta.dir, "./dev/client");
26778
26907
  }, devClientDir4, hmrClientPath5, formatDiagnosticMessage = (diagnostic) => {
26779
26908
  try {
26780
26909
  return lazyTypescript.flattenDiagnosticMessageText(diagnostic.messageText, `
@@ -26817,11 +26946,11 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
26817
26946
  if (hasJsLikeExtension(path))
26818
26947
  return `${path}${query}`;
26819
26948
  const importerDir = dirname33(importerOutputPath);
26820
- const fileCandidate = resolve43(importerDir, `${path}.js`);
26949
+ const fileCandidate = resolve44(importerDir, `${path}.js`);
26821
26950
  if (outputFiles?.has(fileCandidate) || existsSync45(fileCandidate)) {
26822
26951
  return `${path}.js${query}`;
26823
26952
  }
26824
- const indexCandidate = resolve43(importerDir, path, "index.js");
26953
+ const indexCandidate = resolve44(importerDir, path, "index.js");
26825
26954
  if (outputFiles?.has(indexCandidate) || existsSync45(indexCandidate)) {
26826
26955
  return `${path}/index.js${query}`;
26827
26956
  }
@@ -26849,7 +26978,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
26849
26978
  }, resolveLocalTsImport = (fromFile, specifier) => {
26850
26979
  if (!isRelativeModuleSpecifier(specifier))
26851
26980
  return null;
26852
- const basePath = resolve43(dirname33(fromFile), specifier);
26981
+ const basePath = resolve44(dirname33(fromFile), specifier);
26853
26982
  const candidates = /\.[cm]?[tj]sx?$/.test(basePath) ? [basePath] : [
26854
26983
  `${basePath}.ts`,
26855
26984
  `${basePath}.tsx`,
@@ -26860,7 +26989,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
26860
26989
  join57(basePath, "index.mts"),
26861
26990
  join57(basePath, "index.cts")
26862
26991
  ];
26863
- return candidates.map((candidate) => resolve43(candidate)).find((candidate) => existsSync45(candidate) && !candidate.endsWith(".d.ts")) ?? null;
26992
+ return candidates.map((candidate) => resolve44(candidate)).find((candidate) => existsSync45(candidate) && !candidate.endsWith(".d.ts")) ?? null;
26864
26993
  }, readFileForAotTransform = async (fileName, readFile) => {
26865
26994
  const hostSource = readFile?.(fileName);
26866
26995
  if (typeof hostSource === "string")
@@ -26895,7 +27024,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
26895
27024
  paths.push(join57(fileDir, urlMatch.replace(/['"]/g, "")));
26896
27025
  }
26897
27026
  }
26898
- return paths.map((path) => resolve43(path));
27027
+ return paths.map((path) => resolve44(path));
26899
27028
  }, readResourceCacheFile = async (cachePath) => {
26900
27029
  try {
26901
27030
  const entry = JSON.parse(await fs5.readFile(cachePath, "utf-8"));
@@ -26937,7 +27066,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
26937
27066
  transformedFiles: 0
26938
27067
  };
26939
27068
  const transformFile = async (filePath) => {
26940
- const resolvedPath = resolve43(filePath);
27069
+ const resolvedPath = resolve44(filePath);
26941
27070
  if (visited.has(resolvedPath))
26942
27071
  return;
26943
27072
  visited.add(resolvedPath);
@@ -26972,7 +27101,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
26972
27101
  return { stats, transformedSources };
26973
27102
  }, compileAngularFiles = async (inputPaths, outDir, stylePreprocessors) => {
26974
27103
  const islandMetadataByOutputPath = await traceAngularPhase("aot/island-metadata", () => new Map(inputPaths.map((inputPath) => {
26975
- const outputPath = resolve43(join57(outDir, relative26(process.cwd(), resolve43(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
27104
+ const outputPath = resolve44(join57(outDir, relative26(process.cwd(), resolve44(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
26976
27105
  return [
26977
27106
  outputPath,
26978
27107
  buildIslandMetadataExports(readFileSync43(inputPath, "utf-8"))
@@ -26983,7 +27112,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
26983
27112
  const tsLibDir = await traceAngularPhase("aot/resolve-typescript-lib", () => {
26984
27113
  const tsPath = __require.resolve("typescript");
26985
27114
  const tsRootDir = dirname33(tsPath);
26986
- return tsRootDir.endsWith("lib") ? tsRootDir : resolve43(tsRootDir, "lib");
27115
+ return tsRootDir.endsWith("lib") ? tsRootDir : resolve44(tsRootDir, "lib");
26987
27116
  });
26988
27117
  const config = await traceAngularPhase("aot/read-configuration", () => readConfiguration("./tsconfig.json"));
26989
27118
  const options = {
@@ -27014,7 +27143,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
27014
27143
  const originalGetDefaultLibFileName = host.getDefaultLibFileName;
27015
27144
  host.getDefaultLibFileName = (opts) => {
27016
27145
  const fileName = originalGetDefaultLibFileName ? originalGetDefaultLibFileName(opts) : "lib.d.ts";
27017
- return basename17(fileName);
27146
+ return basename18(fileName);
27018
27147
  };
27019
27148
  const originalGetSourceFile = host.getSourceFile;
27020
27149
  host.getSourceFile = (fileName, languageVersion, onError) => {
@@ -27025,7 +27154,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
27025
27154
  return originalGetSourceFile?.call(host, fileName, languageVersion, onError);
27026
27155
  };
27027
27156
  const emitted = {};
27028
- const resolvedOutDir = resolve43(outDir);
27157
+ const resolvedOutDir = resolve44(outDir);
27029
27158
  host.writeFile = (fileName, text) => {
27030
27159
  const relativePath = resolveRelativePath(fileName, resolvedOutDir, outDir);
27031
27160
  emitted[relativePath] = text;
@@ -27047,12 +27176,12 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
27047
27176
  if (!fileName.endsWith(".ts") || fileName.endsWith(".d.ts")) {
27048
27177
  return source;
27049
27178
  }
27050
- const resolvedPath = resolve43(fileName);
27179
+ const resolvedPath = resolve44(fileName);
27051
27180
  return transformedSources.get(resolvedPath) ?? source;
27052
27181
  };
27053
27182
  const originalGetSourceFileForCompile = host.getSourceFile;
27054
27183
  host.getSourceFile = (fileName, languageVersion, onError) => {
27055
- const source = transformedSources.get(resolve43(fileName));
27184
+ const source = transformedSources.get(resolve44(fileName));
27056
27185
  if (source) {
27057
27186
  return lazyTypescript.createSourceFile(fileName, source, languageVersion, true);
27058
27187
  }
@@ -27076,7 +27205,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
27076
27205
  content,
27077
27206
  target: join57(outDir, fileName)
27078
27207
  }));
27079
- const outputFiles = new Set(rawEntries.map(({ target }) => resolve43(target)));
27208
+ const outputFiles = new Set(rawEntries.map(({ target }) => resolve44(target)));
27080
27209
  return rawEntries.map(({ content, target }) => {
27081
27210
  let processedContent = content.replace(/from\s+(['"])(\.\.?\/[^'"]+)(\1)/g, (match, quote, path) => {
27082
27211
  const rewritten = rewriteRelativeJsSpecifier(target, path, outputFiles);
@@ -27091,7 +27220,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
27091
27220
  return cleaned ? `import { ${cleaned}, InternalInjectFlags } from '@angular/core'` : `import { InternalInjectFlags } from '@angular/core'`;
27092
27221
  });
27093
27222
  processedContent = processedContent.replace(/\b(?<!Internal)InjectFlags\b/g, "InternalInjectFlags");
27094
- processedContent += islandMetadataByOutputPath.get(resolve43(target)) ?? "";
27223
+ processedContent += islandMetadataByOutputPath.get(resolve44(target)) ?? "";
27095
27224
  processedContent = downlevelAsyncForZone(processedContent, target);
27096
27225
  return { content: processedContent, target };
27097
27226
  });
@@ -27102,7 +27231,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
27102
27231
  })), { outputs: entries.length });
27103
27232
  return await traceAngularPhase("aot/collect-output-paths", () => entries.map(({ target }) => target), { outputs: entries.length });
27104
27233
  }, jitContentCache, invalidateAngularJitCache = (filePath) => {
27105
- jitContentCache.delete(resolve43(filePath));
27234
+ jitContentCache.delete(resolve44(filePath));
27106
27235
  }, wrapperOutputCache, escapeTemplateContent = (content) => content.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$\{/g, "\\${"), findUncommentedMatch = (source, pattern) => {
27107
27236
  const re = new RegExp(pattern.source, pattern.flags.includes("g") ? pattern.flags : pattern.flags + "g");
27108
27237
  let match;
@@ -27115,7 +27244,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
27115
27244
  }
27116
27245
  return null;
27117
27246
  }, resolveAngularDeferImportSpecifier = () => {
27118
- const sourceEntry = resolve43(import.meta.dir, "../angular/components/index.ts");
27247
+ const sourceEntry = resolve44(import.meta.dir, "../angular/components/index.ts");
27119
27248
  if (existsSync45(sourceEntry)) {
27120
27249
  return sourceEntry.replace(/\\/g, "/");
27121
27250
  }
@@ -27405,10 +27534,10 @@ ${fields}
27405
27534
  return "";
27406
27535
  }
27407
27536
  }, compileAngularFileJIT = async (inputPath, outDir, rootDir, stylePreprocessors, cacheBuster) => {
27408
- const entryPath = resolve43(inputPath);
27537
+ const entryPath = resolve44(inputPath);
27409
27538
  const allOutputs = [];
27410
27539
  const visited = new Set;
27411
- const baseDir = resolve43(rootDir ?? process.cwd());
27540
+ const baseDir = resolve44(rootDir ?? process.cwd());
27412
27541
  let usesLegacyAnimations = false;
27413
27542
  const angularTranspiler = new Bun.Transpiler({
27414
27543
  loader: "ts",
@@ -27436,7 +27565,7 @@ ${fields}
27436
27565
  };
27437
27566
  const resolveLocalImport = (specifier, fromDir) => {
27438
27567
  if (specifier.startsWith(".") || specifier.startsWith("/")) {
27439
- return resolveSourceFile(resolve43(fromDir, specifier));
27568
+ return resolveSourceFile(resolve44(fromDir, specifier));
27440
27569
  }
27441
27570
  const aliased = matchTsconfigAlias(specifier, tsconfigAliases.aliases, tsconfigAliases.baseUrl, resolveSourceFile);
27442
27571
  if (aliased)
@@ -27445,7 +27574,7 @@ ${fields}
27445
27574
  const resolved = Bun.resolveSync(specifier, fromDir);
27446
27575
  if (resolved.includes("/node_modules/"))
27447
27576
  return;
27448
- const absolute = resolve43(resolved);
27577
+ const absolute = resolve44(resolved);
27449
27578
  if (!absolute.startsWith(baseDir))
27450
27579
  return;
27451
27580
  return resolveSourceFile(absolute);
@@ -27455,7 +27584,7 @@ ${fields}
27455
27584
  };
27456
27585
  const toOutputPath = (sourcePath) => {
27457
27586
  const inputDir = dirname33(sourcePath);
27458
- const fileBase = basename17(sourcePath).replace(/\.[cm]?[tj]sx?$/, ".js");
27587
+ const fileBase = basename18(sourcePath).replace(/\.[cm]?[tj]sx?$/, ".js");
27459
27588
  if (inputDir === outDir || inputDir.startsWith(`${outDir}${sep10}`)) {
27460
27589
  return join57(inputDir, fileBase);
27461
27590
  }
@@ -27497,13 +27626,13 @@ ${fields}
27497
27626
  return `${prefix}${dots}`;
27498
27627
  return `${prefix}../${dots}`;
27499
27628
  });
27500
- if (resolve43(actualPath) === entryPath) {
27629
+ if (resolve44(actualPath) === entryPath) {
27501
27630
  processedContent += buildIslandMetadataExports(sourceCode);
27502
27631
  }
27503
27632
  return processedContent;
27504
27633
  };
27505
27634
  const transpileFile = async (filePath) => {
27506
- const resolved = resolve43(filePath);
27635
+ const resolved = resolve44(filePath);
27507
27636
  if (visited.has(resolved))
27508
27637
  return;
27509
27638
  visited.add(resolved);
@@ -27511,7 +27640,7 @@ ${fields}
27511
27640
  const inputDir = dirname33(resolved);
27512
27641
  const relativeDir = inputDir.startsWith(baseDir) ? inputDir.substring(baseDir.length + 1) : inputDir;
27513
27642
  const targetDir = join57(outDir, relativeDir);
27514
- const targetPath = join57(targetDir, basename17(resolved));
27643
+ const targetPath = join57(targetDir, basename18(resolved));
27515
27644
  await fs5.mkdir(targetDir, { recursive: true });
27516
27645
  await fs5.copyFile(resolved, targetPath);
27517
27646
  allOutputs.push(targetPath);
@@ -27526,7 +27655,7 @@ ${fields}
27526
27655
  const inlined = await inlineResources(sourceCode, dirname33(actualPath), stylePreprocessors);
27527
27656
  sourceCode = inlineTemplateAndLowerDeferSync(inlined.source, dirname33(actualPath)).source;
27528
27657
  const inputDir = dirname33(actualPath);
27529
- const fileBase = basename17(actualPath).replace(/\.[cm]?[tj]sx?$/, ".js");
27658
+ const fileBase = basename18(actualPath).replace(/\.[cm]?[tj]sx?$/, ".js");
27530
27659
  const targetPath = toOutputPath(actualPath);
27531
27660
  const targetDir = dirname33(targetPath);
27532
27661
  const relativeDir = relative26(outDir, targetDir).replace(/\\/g, "/");
@@ -27555,7 +27684,7 @@ ${fields}
27555
27684
  importRewrites.set(specifier, relativeRewrite);
27556
27685
  return resolved;
27557
27686
  }).filter((path) => Boolean(path));
27558
- const isEntry = resolve43(actualPath) === resolve43(entryPath);
27687
+ const isEntry = resolve44(actualPath) === resolve44(entryPath);
27559
27688
  const contentHash = Bun.hash(sourceCode).toString(BASE_36_RADIX);
27560
27689
  const cacheKey = actualPath;
27561
27690
  const shouldWriteFile = cacheBuster && isEntry ? true : jitContentCache.get(cacheKey) !== contentHash || !existsSync45(targetPath);
@@ -27627,11 +27756,11 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
27627
27756
  const compiledRoot = compiledParent;
27628
27757
  const indexesDir = join57(compiledParent, "indexes");
27629
27758
  await traceAngularPhase("setup/create-indexes-dir", () => fs5.mkdir(indexesDir, { recursive: true }));
27630
- const aotOutputs = hmr ? [] : await traceAngularPhase("aot/compile-files", () => compileAngularFiles(entryPoints.map((entry) => resolve43(entry)), compiledRoot, stylePreprocessors), { entries: entryPoints.length });
27759
+ const aotOutputs = hmr ? [] : await traceAngularPhase("aot/compile-files", () => compileAngularFiles(entryPoints.map((entry) => resolve44(entry)), compiledRoot, stylePreprocessors), { entries: entryPoints.length });
27631
27760
  if (!hmr) {
27632
27761
  await traceAngularPhase("aot/copy-json-resources", async () => {
27633
27762
  const cwd = process.cwd();
27634
- const angularSrcDir = resolve43(outRoot);
27763
+ const angularSrcDir = resolve44(outRoot);
27635
27764
  if (!existsSync45(angularSrcDir))
27636
27765
  return;
27637
27766
  const jsonGlob = new Glob8("**/*.json");
@@ -27649,22 +27778,22 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
27649
27778
  }
27650
27779
  const usesLegacyAngularAnimations = await traceAngularPhase("setup/legacy-animation-resolver", () => createLegacyAngularAnimationUsageResolver(outRoot));
27651
27780
  const compileTasks = entryPoints.map(async (entry) => {
27652
- const resolvedEntry = resolve43(entry);
27781
+ const resolvedEntry = resolve44(entry);
27653
27782
  const relativeEntry = relative26(outRoot, resolvedEntry).replace(/\.[tj]s$/, ".js");
27654
27783
  const compileEntry = () => compileAngularFileJIT(resolvedEntry, compiledRoot, outRoot, stylePreprocessors);
27655
27784
  let outputs = hmr ? await traceAngularPhase("jit/compile-entry", compileEntry, {
27656
27785
  entry: resolvedEntry
27657
27786
  }) : aotOutputs;
27658
- const fileBase = basename17(resolvedEntry).replace(/\.[tj]s$/, "");
27787
+ const fileBase = basename18(resolvedEntry).replace(/\.[tj]s$/, "");
27659
27788
  const jsName = `${fileBase}.js`;
27660
27789
  const compiledFallbackPaths = [
27661
27790
  join57(compiledRoot, relativeEntry),
27662
27791
  join57(compiledRoot, "pages", jsName),
27663
27792
  join57(compiledRoot, jsName)
27664
- ].map((file) => resolve43(file));
27793
+ ].map((file) => resolve44(file));
27665
27794
  const resolveRawServerFile = (candidatePaths) => {
27666
27795
  const normalizedCandidates = [
27667
- ...candidatePaths.map((file) => resolve43(file)),
27796
+ ...candidatePaths.map((file) => resolve44(file)),
27668
27797
  ...compiledFallbackPaths
27669
27798
  ];
27670
27799
  let candidate = normalizedCandidates.find((file) => existsSync45(file) && file.endsWith(`${sep10}${relativeEntry}`));
@@ -27745,8 +27874,8 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
27745
27874
  const fragments = [];
27746
27875
  if (providersInjection.appProvidersSource) {
27747
27876
  const compiledAppProvidersPath = (() => {
27748
- const angularDirAbs = resolve43(outRoot);
27749
- const appSourceAbs = resolve43(providersInjection.appProvidersSource);
27877
+ const angularDirAbs = resolve44(outRoot);
27878
+ const appSourceAbs = resolve44(providersInjection.appProvidersSource);
27750
27879
  const rel = relative26(angularDirAbs, appSourceAbs).replace(/\\/g, "/");
27751
27880
  return join57(compiledParent, rel).replace(/\.[cm]?[tj]sx?$/, ".js");
27752
27881
  })();
@@ -28493,7 +28622,7 @@ var require_node = __commonJS(function(exports, module) {
28493
28622
  // src/build/compileEmber.ts
28494
28623
  import { existsSync as existsSync46 } from "fs";
28495
28624
  import { mkdir as mkdir13, rm as rm10 } from "fs/promises";
28496
- import { basename as basename18, dirname as dirname34, extname as extname17, join as join58, resolve as resolve44 } from "path";
28625
+ import { basename as basename19, dirname as dirname34, extname as extname17, join as join58, resolve as resolve45 } from "path";
28497
28626
  var {build: bunBuild3, Transpiler: Transpiler6, write: write5, file: file5 } = globalThis.Bun;
28498
28627
  var cachedPreprocessor = null, getPreprocessor = async () => {
28499
28628
  if (cachedPreprocessor)
@@ -28589,7 +28718,7 @@ export const importSync = (specifier) => {
28589
28718
  const originalImporter = stagedSourceMap.get(args.importer);
28590
28719
  if (!originalImporter)
28591
28720
  return;
28592
- const candidateBase = resolve44(dirname34(originalImporter), args.path);
28721
+ const candidateBase = resolve45(dirname34(originalImporter), args.path);
28593
28722
  const extensionsToTry = ["", ".gts", ".gjs", ".ts", ".js"];
28594
28723
  for (const ext of extensionsToTry) {
28595
28724
  const candidate = candidateBase + ext;
@@ -28648,7 +28777,7 @@ export const renderToHTML = (props = {}) => {
28648
28777
  export { PageComponent };
28649
28778
  export default PageComponent;
28650
28779
  `, compileEmberFile = async (entry, compiledRoot, cwd = process.cwd()) => {
28651
- const resolvedEntry = resolve44(entry);
28780
+ const resolvedEntry = resolve45(entry);
28652
28781
  const source = await file5(resolvedEntry).text();
28653
28782
  let preprocessed = source;
28654
28783
  if (isTemplateTagFile(resolvedEntry)) {
@@ -28659,7 +28788,7 @@ export default PageComponent;
28659
28788
  preprocessed = rewriteTemplateEvalToScope(result.code);
28660
28789
  }
28661
28790
  const transpiled = transpiler6.transformSync(preprocessed);
28662
- const baseName = basename18(resolvedEntry).replace(/\.(gjs|gts|ts|js)$/, "");
28791
+ const baseName = basename19(resolvedEntry).replace(/\.(gjs|gts|ts|js)$/, "");
28663
28792
  const tmpDir = join58(compiledRoot, "_tmp");
28664
28793
  const serverDir = join58(compiledRoot, "server");
28665
28794
  const clientDir = join58(compiledRoot, "client");
@@ -28668,8 +28797,8 @@ export default PageComponent;
28668
28797
  mkdir13(serverDir, { recursive: true }),
28669
28798
  mkdir13(clientDir, { recursive: true })
28670
28799
  ]);
28671
- const tmpPagePath = resolve44(join58(tmpDir, `${baseName}.module.js`));
28672
- const tmpHarnessPath = resolve44(join58(tmpDir, `${baseName}.harness.js`));
28800
+ const tmpPagePath = resolve45(join58(tmpDir, `${baseName}.module.js`));
28801
+ const tmpHarnessPath = resolve45(join58(tmpDir, `${baseName}.harness.js`));
28673
28802
  await Promise.all([
28674
28803
  write5(tmpPagePath, transpiled),
28675
28804
  write5(tmpHarnessPath, generateServerHarness(tmpPagePath))
@@ -28734,24 +28863,24 @@ var importFromProject = (specifier, projectRoot = process.cwd()) => {
28734
28863
 
28735
28864
  // src/build/buildReactVendor.ts
28736
28865
  import { existsSync as existsSync47, mkdirSync as mkdirSync13 } from "fs";
28737
- import { join as join59, resolve as resolve45 } from "path";
28866
+ import { join as join59, resolve as resolve46 } from "path";
28738
28867
  import { rm as rm11 } from "fs/promises";
28739
28868
  var {build: bunBuild4 } = globalThis.Bun;
28740
28869
  var resolveJsxDevRuntimeCompatPath = () => {
28741
28870
  const candidates = [
28742
- resolve45(import.meta.dir, "react", "jsxDevRuntimeCompat.js"),
28743
- resolve45(import.meta.dir, "src", "react", "jsxDevRuntimeCompat.ts"),
28744
- resolve45(import.meta.dir, "..", "react", "jsxDevRuntimeCompat.js"),
28745
- resolve45(import.meta.dir, "..", "src", "react", "jsxDevRuntimeCompat.ts"),
28746
- resolve45(import.meta.dir, "..", "..", "dist", "react", "jsxDevRuntimeCompat.js"),
28747
- resolve45(import.meta.dir, "..", "..", "src", "react", "jsxDevRuntimeCompat.ts")
28871
+ resolve46(import.meta.dir, "react", "jsxDevRuntimeCompat.js"),
28872
+ resolve46(import.meta.dir, "src", "react", "jsxDevRuntimeCompat.ts"),
28873
+ resolve46(import.meta.dir, "..", "react", "jsxDevRuntimeCompat.js"),
28874
+ resolve46(import.meta.dir, "..", "src", "react", "jsxDevRuntimeCompat.ts"),
28875
+ resolve46(import.meta.dir, "..", "..", "dist", "react", "jsxDevRuntimeCompat.js"),
28876
+ resolve46(import.meta.dir, "..", "..", "src", "react", "jsxDevRuntimeCompat.ts")
28748
28877
  ];
28749
28878
  for (const candidate of candidates) {
28750
28879
  if (existsSync47(candidate)) {
28751
28880
  return candidate.replace(/\\/g, "/");
28752
28881
  }
28753
28882
  }
28754
- return (candidates[0] ?? resolve45(import.meta.dir, "react", "jsxDevRuntimeCompat.js")).replace(/\\/g, "/");
28883
+ return (candidates[0] ?? resolve46(import.meta.dir, "react", "jsxDevRuntimeCompat.js")).replace(/\\/g, "/");
28755
28884
  }, jsxDevRuntimeCompatPath, jsxRuntimeCompatPath, reactSpecifiers, toSafeFileName = (specifier) => specifier.replace(/\//g, "_"), computeVendorPaths = () => {
28756
28885
  const paths = {};
28757
28886
  for (const specifier of reactSpecifiers) {
@@ -29206,12 +29335,12 @@ import {
29206
29335
  writeFileSync as writeFileSync16
29207
29336
  } from "fs";
29208
29337
  import {
29209
- basename as basename19,
29338
+ basename as basename20,
29210
29339
  dirname as dirname35,
29211
29340
  extname as extname18,
29212
29341
  join as join63,
29213
29342
  relative as relative27,
29214
- resolve as resolve46,
29343
+ resolve as resolve47,
29215
29344
  sep as sep11
29216
29345
  } from "path";
29217
29346
  import { cwd, env as env3, exit } from "process";
@@ -29348,7 +29477,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
29348
29477
  const copyFile = (path) => {
29349
29478
  if (!path)
29350
29479
  return;
29351
- const dest = join63(outDir, basename19(path));
29480
+ const dest = join63(outDir, basename20(path));
29352
29481
  cpSync(path, dest, { force: true });
29353
29482
  return dest;
29354
29483
  };
@@ -29374,7 +29503,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
29374
29503
  }, formatManifestKeyCollisions = (collisions, projectRoot) => collisions.map(({ key, next, previous }) => {
29375
29504
  const first = relative27(projectRoot, previous);
29376
29505
  const second = relative27(projectRoot, next);
29377
- return `Manifest key "${key}" belongs to two pages: ${first} and ${second}. Pages are looked up by file name (asset(manifest, '${key}')), so each name must be unique across htmlDirectory, htmxDirectory and the other page directories. Rename one of them, for example ${basename19(second)} to ${basename19(second).replace(key, `${key}Page`)}, and update its route.`;
29506
+ return `Manifest key "${key}" belongs to two pages: ${first} and ${second}. Pages are looked up by file name (asset(manifest, '${key}')), so each name must be unique across htmlDirectory, htmxDirectory and the other page directories. Rename one of them, for example ${basename20(second)} to ${basename20(second).replace(key, `${key}Page`)}, and update its route.`;
29378
29507
  }).join(`
29379
29508
  `), copyHtmxVendor = (htmxDir, htmxDestDir) => {
29380
29509
  mkdirSync17(htmxDestDir, { recursive: true });
@@ -29395,8 +29524,8 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
29395
29524
  if (globalThis.__absoluteVersion)
29396
29525
  return;
29397
29526
  const candidates = [
29398
- resolve46(import.meta.dir, "..", "..", "package.json"),
29399
- resolve46(import.meta.dir, "..", "package.json")
29527
+ resolve47(import.meta.dir, "..", "..", "package.json"),
29528
+ resolve47(import.meta.dir, "..", "package.json")
29400
29529
  ];
29401
29530
  const resolveCandidate = async (remaining) => {
29402
29531
  const [candidate, ...rest] = remaining;
@@ -29412,7 +29541,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
29412
29541
  };
29413
29542
  await resolveCandidate(candidates);
29414
29543
  }, SKIP_DIRS5, addWorkerPathIfExists = (file, relPath, workerPaths) => {
29415
- const absPath = resolve46(file, "..", relPath);
29544
+ const absPath = resolve47(file, "..", relPath);
29416
29545
  try {
29417
29546
  statSync7(absPath);
29418
29547
  workerPaths.add(absPath);
@@ -29503,7 +29632,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
29503
29632
  copyVueDevIndexes(vueDir, vuePagesPath, vueEntries, devIndexDir);
29504
29633
  }
29505
29634
  }, rewriteFileRouteImports = (content, indexesDir) => content.replace(/from\s*'(\.{1,2}\/[^']+)'/g, (match, specifier) => {
29506
- const target = resolve46(indexesDir, specifier);
29635
+ const target = resolve47(indexesDir, specifier);
29507
29636
  if (!isInFileRouteRoot(target))
29508
29637
  return match;
29509
29638
  return `from '/@src/${relative27(process.cwd(), target).replace(/\\/g, "/")}'`;
@@ -29521,7 +29650,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
29521
29650
  return;
29522
29651
  }
29523
29652
  const indexFiles = readDir(reactIndexesPath).filter((file) => file.endsWith(".tsx"));
29524
- const pagesRel = relative27(process.cwd(), resolve46(reactPagesPath)).replace(/\\/g, "/");
29653
+ const pagesRel = relative27(process.cwd(), resolve47(reactPagesPath)).replace(/\\/g, "/");
29525
29654
  for (const file of indexFiles) {
29526
29655
  let content = readFileSync44(join63(reactIndexesPath, file), "utf-8");
29527
29656
  content = content.replace(/from\s*['"]([^'"]*\/pages\/([^'"]+))['"]/g, (_match, _fullPath, componentName) => `from '/@src/${pagesRel}/${componentName}'`);
@@ -29530,27 +29659,27 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
29530
29659
  }
29531
29660
  }, copySvelteDevIndexes = (svelteDir, sveltePagesPath, svelteEntries, devIndexDir) => {
29532
29661
  const svelteIndexDir = join63(getFrameworkGeneratedDir("svelte"), "indexes");
29533
- const sveltePageEntries = svelteEntries.filter((file) => resolve46(file).startsWith(resolve46(sveltePagesPath)) || fileRouteFor(file) !== undefined);
29662
+ const sveltePageEntries = svelteEntries.filter((file) => resolve47(file).startsWith(resolve47(sveltePagesPath)) || fileRouteFor(file) !== undefined);
29534
29663
  for (const entry of sveltePageEntries) {
29535
- const name = fileRouteFor(entry)?.name ?? basename19(entry).replace(/\.svelte(\.(ts|js))?$/, "");
29664
+ const name = fileRouteFor(entry)?.name ?? basename20(entry).replace(/\.svelte(\.(ts|js))?$/, "");
29536
29665
  const indexFile = join63(svelteIndexDir, "pages", `${name}.js`);
29537
29666
  if (!existsSync48(indexFile))
29538
29667
  continue;
29539
29668
  let content = readFileSync44(indexFile, "utf-8");
29540
- const srcRel = relative27(process.cwd(), resolve46(entry)).replace(/\\/g, "/");
29669
+ const srcRel = relative27(process.cwd(), resolve47(entry)).replace(/\\/g, "/");
29541
29670
  content = content.replace(/import\s+Component\s+from\s+['"]([^'"]+)['"]/, `import Component from "/@src/${srcRel}"`);
29542
29671
  writeFileSync16(join63(devIndexDir, `${name}.svelte.js`), content);
29543
29672
  }
29544
29673
  }, copyVueDevIndexes = (vueDir, vuePagesPath, vueEntries, devIndexDir) => {
29545
29674
  const vueIndexDir = join63(getFrameworkGeneratedDir("vue"), "indexes");
29546
- const vuePageEntries = vueEntries.filter((file) => resolve46(file).startsWith(resolve46(vuePagesPath)));
29675
+ const vuePageEntries = vueEntries.filter((file) => resolve47(file).startsWith(resolve47(vuePagesPath)));
29547
29676
  for (const entry of vuePageEntries) {
29548
- const name = basename19(entry, ".vue");
29677
+ const name = basename20(entry, ".vue");
29549
29678
  const indexFile = join63(vueIndexDir, `${name}.js`);
29550
29679
  if (!existsSync48(indexFile))
29551
29680
  continue;
29552
29681
  let content = readFileSync44(indexFile, "utf-8");
29553
- const srcRel = relative27(process.cwd(), resolve46(entry)).replace(/\\/g, "/");
29682
+ const srcRel = relative27(process.cwd(), resolve47(entry)).replace(/\\/g, "/");
29554
29683
  content = content.replace(/import\s+Comp(?:\s*,\s*\*\s+as\s+\w+)?\s+from\s+['"]([^'"]+)['"]/, (match) => match.replace(/from\s+['"][^'"]+['"]/, `from "/@src/${srcRel}"`));
29555
29684
  writeFileSync16(join63(devIndexDir, `${name}.vue.js`), content);
29556
29685
  }
@@ -29558,7 +29687,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
29558
29687
  const urlFileMap = new Map;
29559
29688
  for (const srcPath of urlReferencedFiles) {
29560
29689
  const rel = relative27(projectRoot, srcPath).replace(/\\/g, "/");
29561
- const name = basename19(srcPath);
29690
+ const name = basename20(srcPath);
29562
29691
  const mtime = Math.round(statSync7(srcPath).mtimeMs);
29563
29692
  const url = `/@src/${rel}?v=${mtime}`;
29564
29693
  urlFileMap.set(name, url);
@@ -29568,13 +29697,13 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
29568
29697
  }, buildProdUrlFileMap = (urlReferencedFiles, buildPath, nonReactClientOutputs) => {
29569
29698
  const urlFileMap = new Map;
29570
29699
  for (const srcPath of urlReferencedFiles) {
29571
- const srcBase = basename19(srcPath).replace(/\.[^.]+$/, "");
29572
- const output = nonReactClientOutputs.find((artifact) => basename19(artifact.path).startsWith(`${srcBase}.`));
29700
+ const srcBase = basename20(srcPath).replace(/\.[^.]+$/, "");
29701
+ const output = nonReactClientOutputs.find((artifact) => basename20(artifact.path).startsWith(`${srcBase}.`));
29573
29702
  if (!output)
29574
29703
  continue;
29575
29704
  const url = `/${relative27(buildPath, output.path).replace(/\\/g, "/")}`;
29576
- urlFileMap.set(basename19(srcPath), url);
29577
- urlFileMap.set(basename19(srcPath).replace(/\.tsx?$/, ".js"), url);
29705
+ urlFileMap.set(basename20(srcPath), url);
29706
+ urlFileMap.set(basename20(srcPath).replace(/\.tsx?$/, ".js"), url);
29578
29707
  }
29579
29708
  return urlFileMap;
29580
29709
  }, buildUrlFileMap = (urlReferencedFiles, hmr, projectRoot, buildPath, nonReactClientOutputs) => {
@@ -29832,7 +29961,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
29832
29961
  if (!firstEntry)
29833
29962
  throw new Error("Expected at least one server directory entry");
29834
29963
  serverRoot = join63(firstEntry.dir, firstEntry.subdir);
29835
- serverOutDir = join63(buildPath, basename19(firstEntry.dir));
29964
+ serverOutDir = join63(buildPath, basename20(firstEntry.dir));
29836
29965
  } else if (serverDirMap.length > 1) {
29837
29966
  serverRoot = commonAncestor(serverDirMap.map((entry) => entry.dir), projectRoot);
29838
29967
  serverOutDir = buildPath;
@@ -29865,13 +29994,13 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
29865
29994
  const filterToIncrementalEntries = (entryPoints, mapToSource) => {
29866
29995
  if (!isIncremental || !incrementalFiles)
29867
29996
  return entryPoints;
29868
- const normalizedIncremental = new Set(incrementalFiles.map((f) => resolve46(f)));
29997
+ const normalizedIncremental = new Set(incrementalFiles.map((f) => resolve47(f)));
29869
29998
  const matchingEntries = [];
29870
29999
  for (const entry of entryPoints) {
29871
30000
  const sourceFile = mapToSource(entry);
29872
30001
  if (!sourceFile)
29873
30002
  continue;
29874
- if (!normalizedIncremental.has(resolve46(sourceFile)))
30003
+ if (!normalizedIncremental.has(resolve47(sourceFile)))
29875
30004
  continue;
29876
30005
  matchingEntries.push(entry);
29877
30006
  }
@@ -30005,7 +30134,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
30005
30134
  mkdirSync17(htmlConventionsOutDir, { recursive: true });
30006
30135
  const htmlPathRemap = new Map;
30007
30136
  for (const sourcePath of htmlConventionSources) {
30008
- const dest = join63(htmlConventionsOutDir, basename19(sourcePath));
30137
+ const dest = join63(htmlConventionsOutDir, basename20(sourcePath));
30009
30138
  cpSync(sourcePath, dest, { force: true });
30010
30139
  htmlPathRemap.set(sourcePath, dest);
30011
30140
  }
@@ -30057,12 +30186,12 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
30057
30186
  return scoped;
30058
30187
  return scoped.filter((entry) => {
30059
30188
  const source = mapToSource(entry);
30060
- return source !== null && deferPageEntries.except.has(resolve46(source));
30189
+ return source !== null && deferPageEntries.except.has(resolve47(source));
30061
30190
  });
30062
30191
  };
30063
30192
  const mapReactIndexToPage = (entry) => {
30064
- if (reactIndexesPath && reactPagesPath && entry.startsWith(resolve46(reactIndexesPath))) {
30065
- const pageName = basename19(entry, ".tsx");
30193
+ if (reactIndexesPath && reactPagesPath && entry.startsWith(resolve47(reactIndexesPath))) {
30194
+ const pageName = basename20(entry, ".tsx");
30066
30195
  return fileRouteNamed(pageName)?.source ?? join63(reactPagesPath, `${pageName}.tsx`);
30067
30196
  }
30068
30197
  return null;
@@ -30101,9 +30230,9 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
30101
30230
  return new Set;
30102
30231
  const resolved = new Set;
30103
30232
  for (const entry of vueEntries) {
30104
- const name = basename19(entry, ".vue");
30233
+ const name = basename20(entry, ".vue");
30105
30234
  if (ssrOnlyPageNames.has(name)) {
30106
- resolved.add(resolve46(entry));
30235
+ resolved.add(resolve47(entry));
30107
30236
  }
30108
30237
  }
30109
30238
  return resolved;
@@ -30166,7 +30295,10 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
30166
30295
  { clientPaths: angularClientPaths, serverPaths: angularServerPaths },
30167
30296
  { serverPaths: emberServerPaths },
30168
30297
  { svelteClientPaths: islandSvelteClientPaths },
30169
- { vueClientPaths: islandVueClientPaths },
30298
+ {
30299
+ vueClientPaths: islandVueClientPaths,
30300
+ vueCssPathsBySource: islandVueCssPathsBySource
30301
+ },
30170
30302
  { clientPaths: islandAngularClientPaths }
30171
30303
  ] = await Promise.all([
30172
30304
  shouldCompileSvelte ? tracePhase("compile/svelte", () => Promise.resolve().then(() => (init_compileSvelte(), {})).then((mod) => compileSvelte(svelteEntries, svelteDir, new Map, hmr, styleTransformConfig))) : {
@@ -30200,11 +30332,12 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
30200
30332
  clientPaths: [...emptyStringArray],
30201
30333
  serverPaths: [...emptyStringArray]
30202
30334
  },
30203
- shouldCompileIslandSvelte ? tracePhase("compile/island-svelte", () => Promise.resolve().then(() => (init_compileSvelte(), {})).then((mod) => compileSvelte(islandSvelteSources, svelteDir, new Map, hmr, styleTransformConfig))) : {
30335
+ shouldCompileIslandSvelte ? tracePhase("compile/island-svelte", () => Promise.resolve().then(() => (init_compileSvelte(), {})).then((mod) => compileSvelte(islandSvelteSources, svelteDir, new Map, hmr, styleTransformConfig, { externalCss: true }))) : {
30204
30336
  svelteClientPaths: [...emptyStringArray]
30205
30337
  },
30206
30338
  shouldCompileIslandVue ? tracePhase("compile/island-vue", () => Promise.resolve().then(() => (init_compileVue(), {})).then((mod) => compileVue(islandVueSources, vueDir, hmr, styleTransformConfig))) : {
30207
- vueClientPaths: [...emptyStringArray]
30339
+ vueClientPaths: [...emptyStringArray],
30340
+ vueCssPathsBySource: new Map
30208
30341
  },
30209
30342
  shouldCompileIslandAngular ? tracePhase("compile/island-angular", () => Promise.resolve().then(() => (init_compileAngular(), {})).then((mod) => compileAngular(islandAngularSources, angularDir, hmr, styleTransformConfig))) : {
30210
30343
  clientPaths: [...emptyStringArray]
@@ -30216,7 +30349,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
30216
30349
  const clientPath = islandSvelteClientPaths[idx];
30217
30350
  if (!sourcePath || !clientPath)
30218
30351
  continue;
30219
- islandSvelteClientPathMap.set(resolve46(sourcePath), clientPath);
30352
+ islandSvelteClientPathMap.set(resolve47(sourcePath), clientPath);
30220
30353
  }
30221
30354
  const islandVueClientPathMap = new Map;
30222
30355
  for (let idx = 0;idx < islandVueSources.length; idx++) {
@@ -30224,7 +30357,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
30224
30357
  const clientPath = islandVueClientPaths[idx];
30225
30358
  if (!sourcePath || !clientPath)
30226
30359
  continue;
30227
- islandVueClientPathMap.set(resolve46(sourcePath), clientPath);
30360
+ islandVueClientPathMap.set(resolve47(sourcePath), clientPath);
30228
30361
  }
30229
30362
  const islandAngularClientPathMap = new Map;
30230
30363
  for (let idx = 0;idx < islandAngularSources.length; idx++) {
@@ -30232,7 +30365,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
30232
30365
  const clientPath = islandAngularClientPaths[idx];
30233
30366
  if (!sourcePath || !clientPath)
30234
30367
  continue;
30235
- islandAngularClientPathMap.set(resolve46(sourcePath), clientPath);
30368
+ islandAngularClientPathMap.set(resolve47(sourcePath), clientPath);
30236
30369
  }
30237
30370
  const reactConventionSources = collectConventionSourceFiles(conventionsMap.react);
30238
30371
  const svelteConventionSources = collectConventionSourceFiles(conventionsMap.svelte);
@@ -30291,7 +30424,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
30291
30424
  rmSync2(destDir, { force: true, recursive: true });
30292
30425
  mkdirSync17(destDir, { recursive: true });
30293
30426
  const destPaths = await Promise.all(compiledPaths.map(async (compiledPath, idx) => {
30294
- const name = basename19(compiledPath).replace(/\.[^.]+$/, "");
30427
+ const name = basename20(compiledPath).replace(/\.[^.]+$/, "");
30295
30428
  const result = await bunBuild8({
30296
30429
  define: serverDefine,
30297
30430
  entrypoints: [compiledPath],
@@ -30360,6 +30493,9 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
30360
30493
  angular: islandAngularClientPathMap,
30361
30494
  svelte: islandSvelteClientPathMap,
30362
30495
  vue: islandVueClientPathMap
30496
+ },
30497
+ cssPathMaps: {
30498
+ vue: islandVueCssPathsBySource
30363
30499
  }
30364
30500
  })) : {
30365
30501
  entries: [],
@@ -30665,7 +30801,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
30665
30801
  globalCssEntries.length > 0 ? tracePhase("bun/global-css", () => bunBuild8(mergeBunBuildConfig({
30666
30802
  entrypoints: globalCssEntries,
30667
30803
  naming: `[dir]/[name].[hash].[ext]`,
30668
- outdir: stylesDir ? join63(buildPath, basename19(stylesDir)) : buildPath,
30804
+ outdir: stylesDir ? join63(buildPath, basename20(stylesDir)) : buildPath,
30669
30805
  plugins: [stylePreprocessorPlugin],
30670
30806
  root: stylesDir || clientRoot,
30671
30807
  target: "browser",
@@ -30674,7 +30810,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
30674
30810
  vueCssPaths.length > 0 ? tracePhase("bun/vue-css", () => bunBuild8(mergeBunBuildConfig({
30675
30811
  entrypoints: vueCssPaths,
30676
30812
  naming: `[name].[hash].[ext]`,
30677
- outdir: join63(buildPath, assetsPath ? basename19(assetsPath) : "assets", "css"),
30813
+ outdir: join63(buildPath, assetsPath ? basename20(assetsPath) : "assets", "css"),
30678
30814
  target: "browser",
30679
30815
  throw: false
30680
30816
  }, resolveBunBuildOverride(bunBuildConfig, "vueCss")))) : undefined
@@ -30704,7 +30840,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
30704
30840
  }).filter((entry) => entry.endsWith(".js.map") && !entry.includes("node_modules")).map((entry) => join63(buildPath, entry));
30705
30841
  for (const mapPath of mapFiles) {
30706
30842
  chainExternalSourcemap(mapPath);
30707
- renameSync(mapPath, join63(sourcemapDir, basename19(mapPath)));
30843
+ renameSync(mapPath, join63(sourcemapDir, basename20(mapPath)));
30708
30844
  const jsPath = mapPath.slice(0, -4);
30709
30845
  try {
30710
30846
  const javascript = readFileSync44(jsPath, "utf-8").replace(/\n?\/\/# sourceMappingURL=[^\n]*\s*$/, `
@@ -30868,7 +31004,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
30868
31004
  for (const artifact of serverOutputs) {
30869
31005
  if (extname18(artifact.path) !== ".js")
30870
31006
  continue;
30871
- const fileWithHash = basename19(artifact.path);
31007
+ const fileWithHash = basename20(artifact.path);
30872
31008
  const [baseName] = fileWithHash.split(`.${artifact.hash}.`);
30873
31009
  if (!baseName)
30874
31010
  continue;
@@ -30888,7 +31024,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
30888
31024
  for (const artifact of cssOutputs) {
30889
31025
  if (extname18(artifact.path) !== ".css")
30890
31026
  continue;
30891
- const cssName = stripHash(basename19(artifact.path), artifact.hash);
31027
+ const cssName = stripHash(basename20(artifact.path), artifact.hash);
30892
31028
  if (cssName)
30893
31029
  cssByName.set(cssName, artifact);
30894
31030
  }
@@ -30898,7 +31034,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
30898
31034
  await Promise.all(serverOutputs.map(async (artifact) => {
30899
31035
  if (extname18(artifact.path) !== ".js")
30900
31036
  return;
30901
- const pascalName = stripHash(basename19(artifact.path), artifact.hash);
31037
+ const pascalName = stripHash(basename20(artifact.path), artifact.hash);
30902
31038
  if (!pascalName)
30903
31039
  return;
30904
31040
  serverJsByPascalName.set(pascalName, artifact);
@@ -30917,12 +31053,12 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
30917
31053
  spaSideManifestPaths.push(sideManifestPath);
30918
31054
  }
30919
31055
  for (const serverPath of emberServerPaths) {
30920
- const fileBase = basename19(serverPath, ".js");
31056
+ const fileBase = basename20(serverPath, ".js");
30921
31057
  manifest[toPascal(fileBase)] = serverPath;
30922
31058
  }
30923
31059
  if (skipAngularClientBundle) {
30924
31060
  for (const clientPath of angularClientPaths) {
30925
- const fileBase = basename19(clientPath, ".js");
31061
+ const fileBase = basename20(clientPath, ".js");
30926
31062
  const relFromCwd = relative27(projectRoot, clientPath).replace(/\\/g, "/");
30927
31063
  manifest[`${toPascal(fileBase)}Index`] = `/@src/${relFromCwd}`;
30928
31064
  }
@@ -30949,7 +31085,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
30949
31085
  let html = readFileSync44(filePath, "utf-8");
30950
31086
  if (html.includes("data-hmr-client"))
30951
31087
  return;
30952
- const pageName = JSON.stringify(basename19(filePath)).replace(/</g, "\\u003c");
31088
+ const pageName = JSON.stringify(basename20(filePath)).replace(/</g, "\\u003c");
30953
31089
  const tag = `<script>window.__HMR_FRAMEWORK__="${framework}";window.__HMR_PAGE__=${pageName};</script><script data-hmr-client>${hmrClientBundle}</script>`;
30954
31090
  const bodyClose = /<\/body\s*>/i.exec(html);
30955
31091
  html = bodyClose ? html.slice(0, bodyClose.index) + tag + html.slice(bodyClose.index) : html + tag;
@@ -30958,7 +31094,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
30958
31094
  const processHtmlPages = async () => {
30959
31095
  if (!(htmlDir && htmlPagesPath))
30960
31096
  return;
30961
- const outputHtmlPages = isSingle ? join63(buildPath, "pages") : join63(buildPath, basename19(htmlDir), "pages");
31097
+ const outputHtmlPages = isSingle ? join63(buildPath, "pages") : join63(buildPath, basename20(htmlDir), "pages");
30962
31098
  mkdirSync17(outputHtmlPages, { recursive: true });
30963
31099
  cpSync(htmlPagesPath, outputHtmlPages, {
30964
31100
  force: true,
@@ -30982,13 +31118,13 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
30982
31118
  const source = readFileSync44(htmlFile, "utf8");
30983
31119
  writeFileSync16(htmlFile, injectVitalsReporterHtml(source));
30984
31120
  }
30985
- recordManifestKey(basename19(htmlFile, ".html"), htmlFile, join63(htmlPagesPath, relative27(outputHtmlPages, htmlFile)));
31121
+ recordManifestKey(basename20(htmlFile, ".html"), htmlFile, join63(htmlPagesPath, relative27(outputHtmlPages, htmlFile)));
30986
31122
  }
30987
31123
  };
30988
31124
  const processHtmxPages = async () => {
30989
31125
  if (!(htmxDir && htmxPagesPath))
30990
31126
  return;
30991
- const outputHtmxPages = isSingle ? join63(buildPath, "pages") : join63(buildPath, basename19(htmxDir), "pages");
31127
+ const outputHtmxPages = isSingle ? join63(buildPath, "pages") : join63(buildPath, basename20(htmxDir), "pages");
30992
31128
  mkdirSync17(outputHtmxPages, { recursive: true });
30993
31129
  cpSync(htmxPagesPath, outputHtmxPages, {
30994
31130
  force: true,
@@ -30996,7 +31132,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
30996
31132
  });
30997
31133
  await expandStaticPageIncludes(htmxPagesPath, outputHtmxPages);
30998
31134
  if (shouldCopyHtmx) {
30999
- const htmxDestDir = isSingle ? buildPath : join63(buildPath, basename19(htmxDir));
31135
+ const htmxDestDir = isSingle ? buildPath : join63(buildPath, basename20(htmxDir));
31000
31136
  copyHtmxVendor(htmxDir, htmxDestDir);
31001
31137
  }
31002
31138
  await updateAssetPaths(manifest, outputHtmxPages);
@@ -31016,7 +31152,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
31016
31152
  const source = readFileSync44(htmxFile, "utf8");
31017
31153
  writeFileSync16(htmxFile, injectVitalsReporterHtml(source));
31018
31154
  }
31019
- recordManifestKey(basename19(htmxFile, ".html"), htmxFile, join63(htmxPagesPath, relative27(outputHtmxPages, htmxFile)));
31155
+ recordManifestKey(basename20(htmxFile, ".html"), htmxFile, join63(htmxPagesPath, relative27(outputHtmxPages, htmxFile)));
31020
31156
  }
31021
31157
  };
31022
31158
  const processStaticConventions = async () => {
@@ -31166,7 +31302,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
31166
31302
  pageEntries,
31167
31303
  tailwindChanged: tailwindResult?.cssChanged ?? false
31168
31304
  };
31169
- }, projectTsconfig = () => existsSync48(resolve46("tsconfig.json")) ? { tsconfig: "./tsconfig.json" } : {}, build2 = async (config) => {
31305
+ }, projectTsconfig = () => existsSync48(resolve47("tsconfig.json")) ? { tsconfig: "./tsconfig.json" } : {}, build2 = async (config) => {
31170
31306
  const projectRoot = cwd();
31171
31307
  const buildPath = validateSafePath(config.buildDirectory ?? "build", projectRoot);
31172
31308
  return withBuildDirectoryLock(buildPath, () => buildUnlocked(config));
@@ -31414,7 +31550,7 @@ var init_buildEmberVendor = __esm(() => {
31414
31550
  });
31415
31551
 
31416
31552
  // src/build/workspacePackages.ts
31417
- import { readFileSync as readFileSync45, realpathSync as realpathSync5 } from "fs";
31553
+ import { readFileSync as readFileSync45, realpathSync as realpathSync6 } from "fs";
31418
31554
  import { join as join65, sep as sep12 } from "path";
31419
31555
  var NODE_MODULES_SEGMENT, verdicts, isWorkspacePackageSpecifier = (specifier, projectRoot = process.cwd()) => {
31420
31556
  const key = `${projectRoot}\x00${specifier}`;
@@ -31423,7 +31559,7 @@ var NODE_MODULES_SEGMENT, verdicts, isWorkspacePackageSpecifier = (specifier, pr
31423
31559
  return known;
31424
31560
  let verdict = false;
31425
31561
  try {
31426
- const resolved = realpathSync5(Bun.resolveSync(specifier, projectRoot));
31562
+ const resolved = realpathSync6(Bun.resolveSync(specifier, projectRoot));
31427
31563
  verdict = !resolved.includes(NODE_MODULES_SEGMENT);
31428
31564
  } catch {
31429
31565
  verdict = false;
@@ -31448,7 +31584,7 @@ var NODE_MODULES_SEGMENT, verdicts, isWorkspacePackageSpecifier = (specifier, pr
31448
31584
  const dirs = new Set;
31449
31585
  for (const name of names) {
31450
31586
  try {
31451
- const linked = realpathSync5(join65(projectRoot, "node_modules", name));
31587
+ const linked = realpathSync6(join65(projectRoot, "node_modules", name));
31452
31588
  if (!`${linked}${sep12}`.includes(NODE_MODULES_SEGMENT))
31453
31589
  dirs.add(linked);
31454
31590
  } catch {}
@@ -31564,9 +31700,9 @@ var stripStringsAndComments = (source) => {
31564
31700
  };
31565
31701
 
31566
31702
  // src/dev/dependencyGraph.ts
31567
- import { existsSync as existsSync50, readFileSync as readFileSync46, realpathSync as realpathSync6 } from "fs";
31703
+ import { existsSync as existsSync50, readFileSync as readFileSync46, realpathSync as realpathSync7 } from "fs";
31568
31704
  var {Glob: Glob11 } = globalThis.Bun;
31569
- import { resolve as resolve47 } from "path";
31705
+ import { resolve as resolve48 } from "path";
31570
31706
  var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath) => {
31571
31707
  const lower = filePath.toLowerCase();
31572
31708
  if (lower.endsWith(".ts") || lower.endsWith(".tsx") || lower.endsWith(".jsx"))
@@ -31577,17 +31713,17 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
31577
31713
  return "html";
31578
31714
  return null;
31579
31715
  }, resolveImportPath2 = (importPath, fromFile) => {
31580
- const fromDir = resolve47(fromFile, "..");
31716
+ const fromDir = resolve48(fromFile, "..");
31581
31717
  if (!importPath.startsWith(".") && !importPath.startsWith("/")) {
31582
31718
  if (!isWorkspacePackageSpecifier(importPath, fromDir))
31583
31719
  return null;
31584
31720
  try {
31585
- return realpathSync6(Bun.resolveSync(importPath, fromDir));
31721
+ return realpathSync7(Bun.resolveSync(importPath, fromDir));
31586
31722
  } catch {
31587
31723
  return null;
31588
31724
  }
31589
31725
  }
31590
- const normalized = resolve47(fromDir, importPath);
31726
+ const normalized = resolve48(fromDir, importPath);
31591
31727
  const extensions = [
31592
31728
  ".ts",
31593
31729
  ".tsx",
@@ -31617,7 +31753,7 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
31617
31753
  dependents.delete(normalizedPath);
31618
31754
  }
31619
31755
  }, addFileToGraph = (graph, filePath) => {
31620
- const normalizedPath = resolve47(filePath);
31756
+ const normalizedPath = resolve48(filePath);
31621
31757
  if (!existsSync50(normalizedPath))
31622
31758
  return;
31623
31759
  const dependencies = extractDependencies(normalizedPath);
@@ -31644,10 +31780,10 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
31644
31780
  }, IGNORED_SEGMENTS, buildInitialDependencyGraph = (graph, directories) => {
31645
31781
  const processedFiles = new Set;
31646
31782
  const glob = new Glob11("**/*.{ts,tsx,js,jsx,vue,svelte,html,htm}");
31647
- const resolvedDirs = directories.map((dir) => resolve47(dir)).filter((dir) => existsSync50(dir));
31783
+ const resolvedDirs = directories.map((dir) => resolve48(dir)).filter((dir) => existsSync50(dir));
31648
31784
  const allFiles = resolvedDirs.flatMap((dir) => Array.from(glob.scanSync({ absolute: true, cwd: dir })));
31649
31785
  for (const file of allFiles) {
31650
- const fullPath = resolve47(file);
31786
+ const fullPath = resolve48(file);
31651
31787
  if (IGNORED_SEGMENTS.some((seg) => fullPath.includes(seg)))
31652
31788
  continue;
31653
31789
  if (processedFiles.has(fullPath))
@@ -31760,7 +31896,7 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
31760
31896
  return [];
31761
31897
  }
31762
31898
  }, getAffectedFiles = (graph, changedFile) => {
31763
- const normalizedPath = resolve47(changedFile);
31899
+ const normalizedPath = resolve48(changedFile);
31764
31900
  const affected = new Set;
31765
31901
  const toProcess = [normalizedPath];
31766
31902
  const processNode = (current) => {
@@ -31791,7 +31927,7 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
31791
31927
  }, removeDependentsForFile = (graph, normalizedPath) => {
31792
31928
  graph.dependents.delete(normalizedPath);
31793
31929
  }, removeFileFromGraph = (graph, filePath) => {
31794
- const normalizedPath = resolve47(filePath);
31930
+ const normalizedPath = resolve48(filePath);
31795
31931
  removeDepsForFile(graph, normalizedPath);
31796
31932
  removeDependentsForFile(graph, normalizedPath);
31797
31933
  };
@@ -31835,12 +31971,12 @@ var globalVersionCounter = 0, createModuleVersionTracker = () => new Map, getNex
31835
31971
  };
31836
31972
 
31837
31973
  // src/dev/configResolver.ts
31838
- import { resolve as resolve48 } from "path";
31974
+ import { resolve as resolve49 } from "path";
31839
31975
  var resolveBuildPaths = (config) => {
31840
31976
  const cwd = process.cwd();
31841
31977
  const normalize = (path) => path.replace(/\\/g, "/");
31842
- const withDefault = (value, fallback) => normalize(resolve48(cwd, value ?? fallback));
31843
- const optional = (value) => value ? normalize(resolve48(cwd, value)) : undefined;
31978
+ const withDefault = (value, fallback) => normalize(resolve49(cwd, value ?? fallback));
31979
+ const optional = (value) => value ? normalize(resolve49(cwd, value)) : undefined;
31844
31980
  return {
31845
31981
  angularDir: optional(config.angularDirectory),
31846
31982
  assetsDir: optional(config.assetsDirectory),
@@ -31900,7 +32036,7 @@ var init_clientManager = __esm(() => {
31900
32036
 
31901
32037
  // src/dev/pathUtils.ts
31902
32038
  import { existsSync as existsSync51, readdirSync as readdirSync8, readFileSync as readFileSync47 } from "fs";
31903
- import { dirname as dirname36, resolve as resolve49 } from "path";
32039
+ import { dirname as dirname36, resolve as resolve50 } from "path";
31904
32040
  var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
31905
32041
  if (shouldIgnorePath(filePath, resolved)) {
31906
32042
  return "ignored";
@@ -31981,7 +32117,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
31981
32117
  return "unknown";
31982
32118
  }, collectAngularResourceDirs = (angularDir) => {
31983
32119
  const out = new Set;
31984
- const angularRoot = resolve49(angularDir);
32120
+ const angularRoot = resolve50(angularDir);
31985
32121
  const angularRootNormalized = normalizePath2(angularRoot);
31986
32122
  const walk = (dir) => {
31987
32123
  let entries;
@@ -31994,7 +32130,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
31994
32130
  if (entry.name.startsWith(".") || entry.name === "node_modules") {
31995
32131
  continue;
31996
32132
  }
31997
- const full = resolve49(dir, entry.name);
32133
+ const full = resolve50(dir, entry.name);
31998
32134
  if (entry.isDirectory()) {
31999
32135
  walk(full);
32000
32136
  continue;
@@ -32035,7 +32171,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
32035
32171
  }
32036
32172
  const componentDir = dirname36(full);
32037
32173
  for (const ref of refs) {
32038
- const refAbs = normalizePath2(resolve49(componentDir, ref));
32174
+ const refAbs = normalizePath2(resolve50(componentDir, ref));
32039
32175
  const refDir = normalizePath2(dirname36(refAbs));
32040
32176
  if (refDir === angularRootNormalized || refDir.startsWith(`${angularRootNormalized}/`)) {
32041
32177
  continue;
@@ -32052,7 +32188,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
32052
32188
  const push = (path) => {
32053
32189
  if (!path)
32054
32190
  return;
32055
- const abs = normalizePath2(resolve49(cwd, path));
32191
+ const abs = normalizePath2(resolve50(cwd, path));
32056
32192
  if (!roots.includes(abs))
32057
32193
  roots.push(abs);
32058
32194
  };
@@ -32077,7 +32213,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
32077
32213
  push(cfg.assetsDir);
32078
32214
  push(cfg.stylesDir);
32079
32215
  for (const candidate of ["src", "db", "assets", "styles"]) {
32080
- const abs = normalizePath2(resolve49(cwd, candidate));
32216
+ const abs = normalizePath2(resolve50(cwd, candidate));
32081
32217
  if (existsSync51(abs) && !roots.includes(abs))
32082
32218
  roots.push(abs);
32083
32219
  }
@@ -32089,7 +32225,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
32089
32225
  continue;
32090
32226
  if (entry.name.startsWith("."))
32091
32227
  continue;
32092
- const abs = normalizePath2(resolve49(cwd, entry.name));
32228
+ const abs = normalizePath2(resolve50(cwd, entry.name));
32093
32229
  if (roots.includes(abs))
32094
32230
  continue;
32095
32231
  if (shouldIgnorePath(abs, resolved))
@@ -32100,7 +32236,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
32100
32236
  }
32101
32237
  const registryPath = config.islands?.registry;
32102
32238
  if (registryPath) {
32103
- const registryDir = normalizePath2(dirname36(resolve49(cwd, registryPath)));
32239
+ const registryDir = normalizePath2(dirname36(resolve50(cwd, registryPath)));
32104
32240
  const isWatched = roots.some((root) => registryDir === root || registryDir.startsWith(`${root}/`));
32105
32241
  if (!isWatched && registryDir !== normalizePath2(cwd))
32106
32242
  push(registryDir);
@@ -32284,7 +32420,7 @@ var init_editorTempFiles = __esm(() => {
32284
32420
  // src/dev/fileWatcher.ts
32285
32421
  import { watch } from "fs";
32286
32422
  import { existsSync as existsSync53, readdirSync as readdirSync10, statSync as statSync8 } from "fs";
32287
- import { dirname as dirname37, join as join67, resolve as resolve50 } from "path";
32423
+ import { dirname as dirname37, join as join67, resolve as resolve51 } from "path";
32288
32424
  var safeRemoveFromGraph = (graph, fullPath) => {
32289
32425
  try {
32290
32426
  removeFileFromGraph(graph, fullPath);
@@ -32366,7 +32502,7 @@ var safeRemoveFromGraph = (graph, fullPath) => {
32366
32502
  }, addFileWatchers = (state, paths, onFileChange) => {
32367
32503
  const stylesDir = state.resolvedPaths?.stylesDir;
32368
32504
  paths.forEach((path) => {
32369
- const absolutePath = resolve50(path).replace(/\\/g, "/");
32505
+ const absolutePath = resolve51(path).replace(/\\/g, "/");
32370
32506
  if (!existsSync53(absolutePath)) {
32371
32507
  return;
32372
32508
  }
@@ -32435,7 +32571,7 @@ var safeRemoveFromGraph = (graph, fullPath) => {
32435
32571
  const watchPaths = getWatchPaths(config, state.resolvedPaths);
32436
32572
  const stylesDir = state.resolvedPaths?.stylesDir;
32437
32573
  watchPaths.forEach((path) => {
32438
- const absolutePath = resolve50(path).replace(/\\/g, "/");
32574
+ const absolutePath = resolve51(path).replace(/\\/g, "/");
32439
32575
  if (!existsSync53(absolutePath)) {
32440
32576
  return;
32441
32577
  }
@@ -32454,7 +32590,7 @@ var init_fileWatcher = __esm(() => {
32454
32590
  // src/build/svelteDeclarations.ts
32455
32591
  import { existsSync as existsSync54, readdirSync as readdirSync11, readFileSync as readFileSync48, statSync as statSync9 } from "fs";
32456
32592
  import { mkdir as mkdir15, rename as rename5, rm as rm16, writeFile as writeFile14 } from "fs/promises";
32457
- import { dirname as dirname38, join as join68, relative as relative28, resolve as resolve51 } from "path";
32593
+ import { dirname as dirname38, join as join68, relative as relative28, resolve as resolve52 } from "path";
32458
32594
  var SVELTE_DECLARATIONS_ROOT = ".absolutejs/types/svelte", FINGERPRINT_FILE = ".fingerprint", SKIPPED_DIRECTORIES, EMIT_SCRIPT = `
32459
32595
  const { resolve, sep } = require('node:path');
32460
32596
  const { shimsPath, stagingDir, svelte2tsxPath, svelteDir, tsconfigPath, typescriptPath } =
@@ -32527,7 +32663,7 @@ emitDts({
32527
32663
  projectRoot,
32528
32664
  svelteDirectory
32529
32665
  }) => {
32530
- const svelteDir = resolve51(projectRoot, svelteDirectory);
32666
+ const svelteDir = resolve52(projectRoot, svelteDirectory);
32531
32667
  const tsconfigPath = join68(projectRoot, "tsconfig.json");
32532
32668
  if (!existsSync54(svelteDir))
32533
32669
  return {
@@ -32583,13 +32719,13 @@ var init_svelteDeclarations = __esm(() => {
32583
32719
  });
32584
32720
 
32585
32721
  // src/dev/svelteDeclarationRefresher.ts
32586
- import { resolve as resolve52, sep as sep13 } from "path";
32722
+ import { resolve as resolve53, sep as sep13 } from "path";
32587
32723
  var REFRESH_DEBOUNCE_MS = 400, createSvelteDeclarationRefresher = (config) => {
32588
32724
  const { svelteDirectory } = config;
32589
32725
  if (!svelteDirectory)
32590
32726
  return null;
32591
32727
  const projectRoot = process.cwd();
32592
- const svelteRoot = resolve52(projectRoot, svelteDirectory) + sep13;
32728
+ const svelteRoot = resolve53(projectRoot, svelteDirectory) + sep13;
32593
32729
  let timer;
32594
32730
  let running = false;
32595
32731
  let pending = false;
@@ -32620,7 +32756,7 @@ var REFRESH_DEBOUNCE_MS = 400, createSvelteDeclarationRefresher = (config) => {
32620
32756
  return {
32621
32757
  refresh: schedule,
32622
32758
  onFileChange: (filePath) => {
32623
- if (resolve52(filePath).startsWith(svelteRoot))
32759
+ if (resolve53(filePath).startsWith(svelteRoot))
32624
32760
  schedule();
32625
32761
  }
32626
32762
  };
@@ -32671,13 +32807,13 @@ var init_fileRouteRefresher = __esm(() => {
32671
32807
  });
32672
32808
 
32673
32809
  // src/dev/assetStore.ts
32674
- import { resolve as resolve53 } from "path";
32810
+ import { resolve as resolve54 } from "path";
32675
32811
  import { readdir as readdir5, unlink } from "fs/promises";
32676
32812
  var mimeTypes, getMimeType = (filePath) => {
32677
32813
  const ext = filePath.slice(filePath.lastIndexOf("."));
32678
32814
  return mimeTypes[ext] ?? "application/octet-stream";
32679
32815
  }, HASHED_FILE_RE, stripHash = (webPath) => webPath.replace(/\.[a-z0-9]{8}(\.(js|css|mjs))$/, "$1"), processWalkEntry = (entry, dir, liveByIdentity, walkAndClean) => {
32680
- const fullPath = resolve53(dir, entry.name);
32816
+ const fullPath = resolve54(dir, entry.name);
32681
32817
  if (entry.isDirectory()) {
32682
32818
  return walkAndClean(fullPath);
32683
32819
  }
@@ -32693,10 +32829,10 @@ var mimeTypes, getMimeType = (filePath) => {
32693
32829
  }, cleanStaleAssets = async (store, manifest, buildDir) => {
32694
32830
  const liveByIdentity = new Map;
32695
32831
  for (const webPath of store.keys()) {
32696
- const diskPath = resolve53(buildDir, webPath.slice(1));
32832
+ const diskPath = resolve54(buildDir, webPath.slice(1));
32697
32833
  liveByIdentity.set(stripHash(diskPath), diskPath);
32698
32834
  }
32699
- const absBuildDir = resolve53(buildDir);
32835
+ const absBuildDir = resolve54(buildDir);
32700
32836
  Object.values(manifest).forEach((val) => {
32701
32837
  if (!HASHED_FILE_RE.test(val))
32702
32838
  return;
@@ -32716,13 +32852,13 @@ var mimeTypes, getMimeType = (filePath) => {
32716
32852
  }, evictMissingChunks = async (store, buildDir) => {
32717
32853
  const chunkKeys = [...store.keys()].filter((webPath) => webPath.includes("/chunk-"));
32718
32854
  await Promise.all(chunkKeys.map(async (webPath) => {
32719
- const onDisk = await Bun.file(resolve53(buildDir, webPath.slice(1))).exists().catch(() => false);
32855
+ const onDisk = await Bun.file(resolve54(buildDir, webPath.slice(1))).exists().catch(() => false);
32720
32856
  if (!onDisk)
32721
32857
  store.delete(webPath);
32722
32858
  }));
32723
32859
  }, lookupAsset = (store, path) => store.get(path), processScanEntry = (entry, dir, prefix, store, scanDir) => {
32724
32860
  if (entry.isDirectory()) {
32725
- return scanDir(resolve53(dir, entry.name), `${prefix}${entry.name}/`);
32861
+ return scanDir(resolve54(dir, entry.name), `${prefix}${entry.name}/`);
32726
32862
  }
32727
32863
  if (!entry.name.startsWith("chunk-")) {
32728
32864
  return null;
@@ -32731,7 +32867,7 @@ var mimeTypes, getMimeType = (filePath) => {
32731
32867
  if (store.has(webPath)) {
32732
32868
  return null;
32733
32869
  }
32734
- return Bun.file(resolve53(dir, entry.name)).bytes().then((bytes) => {
32870
+ return Bun.file(resolve54(dir, entry.name)).bytes().then((bytes) => {
32735
32871
  store.set(webPath, bytes);
32736
32872
  return;
32737
32873
  }).catch(() => {});
@@ -32753,7 +32889,7 @@ var mimeTypes, getMimeType = (filePath) => {
32753
32889
  for (const webPath of newIdentities.values()) {
32754
32890
  if (store.has(webPath))
32755
32891
  continue;
32756
- loadPromises.push(Bun.file(resolve53(buildDir, webPath.slice(1))).bytes().then((bytes) => {
32892
+ loadPromises.push(Bun.file(resolve54(buildDir, webPath.slice(1))).bytes().then((bytes) => {
32757
32893
  store.set(webPath, bytes);
32758
32894
  return;
32759
32895
  }).catch(() => {}));
@@ -32799,10 +32935,10 @@ var init_assetStore = __esm(() => {
32799
32935
  });
32800
32936
 
32801
32937
  // src/dev/restartScope.ts
32802
- import { realpathSync as realpathSync7, statSync as statSync10 } from "fs";
32938
+ import { realpathSync as realpathSync8, statSync as statSync10 } from "fs";
32803
32939
  var MODULE_FILE, DOCUMENT_FILE, realPath = (path) => {
32804
32940
  try {
32805
- return realpathSync7(path);
32941
+ return realpathSync8(path);
32806
32942
  } catch {
32807
32943
  return path;
32808
32944
  }
@@ -32916,9 +33052,9 @@ var init_transformCache = __esm(() => {
32916
33052
  });
32917
33053
 
32918
33054
  // src/dev/reactComponentClassifier.ts
32919
- import { resolve as resolve54 } from "path";
33055
+ import { resolve as resolve55 } from "path";
32920
33056
  var classifyComponent = (filePath) => {
32921
- const normalizedPath = resolve54(filePath);
33057
+ const normalizedPath = resolve55(filePath);
32922
33058
  if (normalizedPath.includes("/react/pages/")) {
32923
33059
  return "server";
32924
33060
  }
@@ -32930,7 +33066,7 @@ var classifyComponent = (filePath) => {
32930
33066
  var init_reactComponentClassifier = () => {};
32931
33067
 
32932
33068
  // src/dev/moduleMapper.ts
32933
- import { basename as basename20, resolve as resolve55 } from "path";
33069
+ import { basename as basename21, resolve as resolve56 } from "path";
32934
33070
  var buildModulePaths = (moduleKeys, manifest) => {
32935
33071
  const modulePaths = {};
32936
33072
  moduleKeys.forEach((key) => {
@@ -32940,7 +33076,7 @@ var buildModulePaths = (moduleKeys, manifest) => {
32940
33076
  });
32941
33077
  return modulePaths;
32942
33078
  }, processChangedFile = (sourceFile, framework, manifest, resolvedPaths, processedFiles) => {
32943
- const normalizedFile = resolve55(sourceFile);
33079
+ const normalizedFile = resolve56(sourceFile);
32944
33080
  const normalizedPath = normalizedFile.replace(/\\/g, "/");
32945
33081
  if (processedFiles.has(normalizedFile)) {
32946
33082
  return null;
@@ -32976,8 +33112,8 @@ var buildModulePaths = (moduleKeys, manifest) => {
32976
33112
  });
32977
33113
  return grouped;
32978
33114
  }, mapSourceFileToManifestKeys = (sourceFile, framework, resolvedPaths) => {
32979
- const normalizedFile = resolve55(sourceFile);
32980
- const fileName = basename20(normalizedFile);
33115
+ const normalizedFile = resolve56(sourceFile);
33116
+ const fileName = basename21(normalizedFile);
32981
33117
  const baseName = fileName.replace(/\.(tsx?|jsx?|vue|svelte|css|html)$/, "");
32982
33118
  const pascalName = toPascal(baseName);
32983
33119
  const keys = [];
@@ -33031,7 +33167,7 @@ var init_moduleMapper = __esm(() => {
33031
33167
  });
33032
33168
 
33033
33169
  // src/dev/reactServerComponentsRebuild.ts
33034
- import { relative as relative29, resolve as resolve56 } from "path";
33170
+ import { relative as relative29, resolve as resolve57 } from "path";
33035
33171
  var toError = (error) => error instanceof Error ? error : new Error(String(error)), runPass = async (state, directory) => {
33036
33172
  const { buildDir } = state.resolvedPaths;
33037
33173
  const result = await buildReactServerComponentsPass({
@@ -33053,8 +33189,8 @@ var toError = (error) => error instanceof Error ? error : new Error(String(error
33053
33189
  const directory = config.reactServerComponentsDirectory;
33054
33190
  if (!directory)
33055
33191
  return false;
33056
- const absolutePath = normalizePath2(resolve56(filePath));
33057
- if (!absolutePath.startsWith(`${normalizePath2(resolve56(directory))}/`))
33192
+ const absolutePath = normalizePath2(resolve57(filePath));
33193
+ if (!absolutePath.startsWith(`${normalizePath2(resolve57(directory))}/`))
33058
33194
  return false;
33059
33195
  state.fileHashes.set(absolutePath, currentHash);
33060
33196
  const startedAt = performance.now();
@@ -33074,7 +33210,7 @@ var init_reactServerComponentsRebuild = __esm(() => {
33074
33210
 
33075
33211
  // src/utils/spaRouteCss.ts
33076
33212
  import { readFile as readFile10 } from "fs/promises";
33077
- import { dirname as dirname39, isAbsolute as isAbsolute12, resolve as resolve57 } from "path";
33213
+ import { dirname as dirname39, isAbsolute as isAbsolute12, resolve as resolve58 } from "path";
33078
33214
  var sideManifestCache, readSideManifest = async (sideManifestPath) => {
33079
33215
  const cached = sideManifestCache.get(sideManifestPath);
33080
33216
  if (cached !== undefined)
@@ -33112,7 +33248,7 @@ var sideManifestCache, readSideManifest = async (sideManifestPath) => {
33112
33248
  }, readChildCss = async (cssPath, sideManifestPath) => {
33113
33249
  if (!cssPath)
33114
33250
  return "";
33115
- const resolvedCssPath = isAbsolute12(cssPath) ? cssPath : resolve57(dirname39(sideManifestPath), cssPath);
33251
+ const resolvedCssPath = isAbsolute12(cssPath) ? cssPath : resolve58(dirname39(sideManifestPath), cssPath);
33116
33252
  const cached = childCssCache.get(resolvedCssPath);
33117
33253
  if (cached !== undefined)
33118
33254
  return cached;
@@ -33197,7 +33333,7 @@ __export(exports_resolveOwningComponents, {
33197
33333
  resolveOwningComponents: () => resolveOwningComponents
33198
33334
  });
33199
33335
  import { readdirSync as readdirSync12, readFileSync as readFileSync50, statSync as statSync12 } from "fs";
33200
- import { dirname as dirname40, extname as extname19, join as join69, resolve as resolve58 } from "path";
33336
+ import { dirname as dirname40, extname as extname19, join as join69, resolve as resolve59 } from "path";
33201
33337
  var ENTITY_DECORATORS, isAngularSourceFile = (file) => file.endsWith(".ts") || file.endsWith(".tsx"), walkAngularSourceFiles = (root) => {
33202
33338
  const out = [];
33203
33339
  const visit = (dir) => {
@@ -33309,7 +33445,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file) => file.endsWith(".ts") || f
33309
33445
  };
33310
33446
  visit(sourceFile);
33311
33447
  return out;
33312
- }, safeNormalize = (path) => resolve58(path).replace(/\\/g, "/"), resolveOwningComponents = (params) => {
33448
+ }, safeNormalize = (path) => resolve59(path).replace(/\\/g, "/"), resolveOwningComponents = (params) => {
33313
33449
  const { changedFilePath, userAngularRoot } = params;
33314
33450
  const changedAbs = safeNormalize(changedFilePath);
33315
33451
  const out = [];
@@ -33378,7 +33514,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file) => file.endsWith(".ts") || f
33378
33514
  if (!spec.startsWith(".") && !spec.startsWith("/")) {
33379
33515
  return null;
33380
33516
  }
33381
- const base = resolve58(childDir, spec);
33517
+ const base = resolve59(childDir, spec);
33382
33518
  const candidates = [
33383
33519
  `${base}.ts`,
33384
33520
  `${base}.tsx`,
@@ -33416,7 +33552,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file) => file.endsWith(".ts") || f
33416
33552
  };
33417
33553
  if (cls.kind === "component") {
33418
33554
  for (const url of [...cls.templateUrls, ...cls.styleUrls]) {
33419
- const abs = safeNormalize(resolve58(componentDir, url));
33555
+ const abs = safeNormalize(resolve59(componentDir, url));
33420
33556
  const existing = resource.get(abs);
33421
33557
  if (existing)
33422
33558
  existing.push(entity);
@@ -33679,8 +33815,8 @@ __export(exports_moduleServer, {
33679
33815
  warmPage: () => warmPage,
33680
33816
  warnIfReactFastRefreshUnsupported: () => warnIfReactFastRefreshUnsupported
33681
33817
  });
33682
- import { existsSync as existsSync55, readFileSync as readFileSync51, realpathSync as realpathSync8, statSync as statSync13 } from "fs";
33683
- import { basename as basename21, dirname as dirname41, extname as extname20, join as join70, resolve as resolve59, relative as relative30 } from "path";
33818
+ import { existsSync as existsSync55, readFileSync as readFileSync51, realpathSync as realpathSync9, statSync as statSync13 } from "fs";
33819
+ import { basename as basename22, dirname as dirname41, extname as extname20, join as join70, resolve as resolve60, relative as relative30 } from "path";
33684
33820
  var SRC_PREFIX = "/@src/", BROWSER_DEFINE, jsTranspiler2, legacyDecoratorTsconfig, tsTranspiler2, tsxTranspiler, TRANSPILABLE, ALL_EXPORTS_RE, STRING_CONTENTS_RE, preserveTypeExports = (originalSource, transpiled, valueExports) => {
33685
33821
  const codeOnly = originalSource.replace(STRING_CONTENTS_RE, '""');
33686
33822
  const allExports = [];
@@ -33700,10 +33836,10 @@ var SRC_PREFIX = "/@src/", BROWSER_DEFINE, jsTranspiler2, legacyDecoratorTsconfi
33700
33836
  ${stubs}
33701
33837
  `;
33702
33838
  }, resolveRelativeExtension = (srcPath, projectRoot, extensions) => {
33703
- const directHit = extensions.find((ext) => existsSync55(resolve59(projectRoot, srcPath + ext)));
33839
+ const directHit = extensions.find((ext) => existsSync55(resolve60(projectRoot, srcPath + ext)));
33704
33840
  if (directHit)
33705
33841
  return srcPath + directHit;
33706
- const indexHit = extensions.find((ext) => existsSync55(resolve59(projectRoot, srcPath, `index${ext}`)));
33842
+ const indexHit = extensions.find((ext) => existsSync55(resolve60(projectRoot, srcPath, `index${ext}`)));
33707
33843
  if (indexHit)
33708
33844
  return `${srcPath}/index${indexHit}`;
33709
33845
  return srcPath;
@@ -33732,7 +33868,7 @@ ${stubs}
33732
33868
  return invalidationVersion > 0 ? `${mtime}.${invalidationVersion}` : `${mtime}`;
33733
33869
  }, srcUrl = (relPath, projectRoot) => {
33734
33870
  const base = `${SRC_PREFIX}${encodeSrcPath(relPath)}`;
33735
- const absPath = resolve59(projectRoot, relPath);
33871
+ const absPath = resolve60(projectRoot, relPath);
33736
33872
  const cached = mtimeCache.get(absPath);
33737
33873
  if (cached !== undefined)
33738
33874
  return `${base}?v=${buildVersion(cached, absPath)}`;
@@ -33744,12 +33880,12 @@ ${stubs}
33744
33880
  return base;
33745
33881
  }
33746
33882
  }, resolveRelativeImport = (relPath, fileDir, projectRoot, extensions) => {
33747
- const absPath = resolve59(fileDir, relPath);
33883
+ const absPath = resolve60(fileDir, relPath);
33748
33884
  const rel = relative30(projectRoot, absPath);
33749
33885
  const extension = extname20(rel);
33750
33886
  let srcPath = RESOLVED_MODULE_EXTENSIONS.has(extension) ? rel : resolveRelativeExtension(rel, projectRoot, extensions);
33751
33887
  if (extname20(srcPath) === ".svelte") {
33752
- srcPath = relative30(projectRoot, resolveSvelteModulePath(resolve59(projectRoot, srcPath)));
33888
+ srcPath = relative30(projectRoot, resolveSvelteModulePath(resolve60(projectRoot, srcPath)));
33753
33889
  }
33754
33890
  return srcUrl(srcPath, projectRoot);
33755
33891
  }, NODE_BUILTIN_RE, resolveAbsoluteSpecifier = (specifier, projectRoot) => {
@@ -33768,13 +33904,13 @@ ${stubs}
33768
33904
  const packageName = isScoped ? `${parts[0]}/${parts[1]}` : parts[0];
33769
33905
  const subpath = isScoped ? parts.slice(2).join("/") : parts.slice(1).join("/");
33770
33906
  if (!subpath) {
33771
- const pkgDir = resolve59(projectRoot, "node_modules", packageName ?? "");
33907
+ const pkgDir = resolve60(projectRoot, "node_modules", packageName ?? "");
33772
33908
  const pkgJsonPath = join70(pkgDir, "package.json");
33773
33909
  if (existsSync55(pkgJsonPath)) {
33774
33910
  const pkg = JSON.parse(readFileSync51(pkgJsonPath, "utf-8"));
33775
33911
  const esmEntry = typeof pkg.module === "string" && pkg.module || typeof pkg.browser === "string" && pkg.browser;
33776
33912
  if (esmEntry) {
33777
- const resolved = resolve59(pkgDir, esmEntry);
33913
+ const resolved = resolve60(pkgDir, esmEntry);
33778
33914
  if (existsSync55(resolved))
33779
33915
  return relative30(projectRoot, resolved);
33780
33916
  }
@@ -33831,12 +33967,12 @@ ${stubs}
33831
33967
  result = result.replace(/((?:from|import)\s*["'])(\/[^"']+\.(tsx?|jsx?|ts))(["'])/g, rewriteAbsoluteToSrc);
33832
33968
  result = result.replace(/(import\s*\(\s*["'])(\/[^"']+\.(tsx?|jsx?|ts))(["']\s*\))/g, rewriteAbsoluteToSrc);
33833
33969
  result = result.replace(/new\s+URL\(\s*["'](\.\.?\/[^"']+)["']\s*,\s*import\.meta\.url\s*\)/g, (_match, relPath) => {
33834
- const absPath = resolve59(fileDir, relPath);
33970
+ const absPath = resolve60(fileDir, relPath);
33835
33971
  const rel = relative30(projectRoot, absPath);
33836
33972
  return `new URL('${srcUrl(rel, projectRoot)}', import.meta.url)`;
33837
33973
  });
33838
33974
  result = result.replace(/import\.meta\.resolve\(\s*["'](\.\.?\/[^"']+)["']\s*\)/g, (_match, relPath) => {
33839
- const absPath = resolve59(fileDir, relPath);
33975
+ const absPath = resolve60(fileDir, relPath);
33840
33976
  const rel = relative30(projectRoot, absPath);
33841
33977
  return `'${srcUrl(rel, projectRoot)}'`;
33842
33978
  });
@@ -34063,7 +34199,7 @@ ${code}`;
34063
34199
  ` + ` if (!window.__SVELTE_HMR_ACCEPT__) window.__SVELTE_HMR_ACCEPT__ = {};
34064
34200
  ` + ` var __hmr_accept = function(cb) { window.__SVELTE_HMR_ACCEPT__[${JSON.stringify(moduleUrl)}] = cb; };`);
34065
34201
  return code.replace(/import\.meta\.hot\.accept\(/g, "__hmr_accept(");
34066
- }, svelteLazyRegistrations = (raw, filePath, projectRoot) => Array.from(raw.matchAll(/\bimport\s*\(\s*['"](\.[^'"]+\.svelte)['"]\s*\)/g)).map((match) => match[1]).filter((spec) => spec !== undefined).filter((spec) => existsSync55(resolve59(dirname41(filePath), spec))).map((spec) => lazyModuleRegistration(relative30(projectRoot, resolve59(dirname41(filePath), spec)).replace(/\\/g, "/"), spec)).join(""), transformSvelteFile = async (filePath, projectRoot, rewriter, stylePreprocessors) => {
34202
+ }, svelteLazyRegistrations = (raw, filePath, projectRoot) => Array.from(raw.matchAll(/\bimport\s*\(\s*['"](\.[^'"]+\.svelte)['"]\s*\)/g)).map((match) => match[1]).filter((spec) => spec !== undefined).filter((spec) => existsSync55(resolve60(dirname41(filePath), spec))).map((spec) => lazyModuleRegistration(relative30(projectRoot, resolve60(dirname41(filePath), spec)).replace(/\\/g, "/"), spec)).join(""), transformSvelteFile = async (filePath, projectRoot, rewriter, stylePreprocessors) => {
34067
34203
  const raw = readFileSync51(filePath, "utf-8");
34068
34204
  if (!svelteCompiler) {
34069
34205
  svelteCompiler = await import("svelte/compiler");
@@ -34078,8 +34214,10 @@ ${code}`;
34078
34214
  }, compileVueTemplate = (descriptor, compiledScript, filePath, componentId) => {
34079
34215
  const compiler = getLoadedVueCompiler();
34080
34216
  const scriptContent = compiledScript.content;
34081
- if (!descriptor.template)
34082
- return scriptContent;
34217
+ if (!descriptor.template) {
34218
+ return `${scriptContent}
34219
+ export default __script__;`;
34220
+ }
34083
34221
  const isScoped = descriptor.styles.some((style) => style.scoped);
34084
34222
  const templateResult = compiler.compileTemplate({
34085
34223
  compilerOptions: {
@@ -34093,8 +34231,7 @@ ${code}`;
34093
34231
  scoped: isScoped,
34094
34232
  source: descriptor.template.content
34095
34233
  });
34096
- let code = scriptContent.replace("export default", "const __script__ =");
34097
- code += `
34234
+ let code = `${scriptContent}
34098
34235
  ${templateResult.code}`;
34099
34236
  code += `
34100
34237
  __script__.render = render;`;
@@ -34136,19 +34273,20 @@ ${code}`;
34136
34273
  if (!vueCompiler) {
34137
34274
  vueCompiler = await loadVueCompiler();
34138
34275
  }
34139
- const fileName = basename21(filePath, ".vue");
34276
+ const fileName = basename22(filePath, ".vue");
34140
34277
  const componentId = toKebab(fileName);
34141
34278
  const { descriptor } = vueCompiler.parse(raw, { filename: filePath });
34142
34279
  const hasScript = descriptor.script || descriptor.scriptSetup;
34143
34280
  const compiledScript = hasScript ? vueCompiler.compileScript(descriptor, {
34144
34281
  fs: {
34145
34282
  fileExists: isFile,
34146
- realpath: realpathSync8,
34283
+ realpath: realpathSync9,
34147
34284
  readFile: (file) => isFile(file) ? readFileSync51(file, "utf-8") : undefined
34148
34285
  },
34286
+ genDefaultAs: "__script__",
34149
34287
  id: componentId,
34150
34288
  inlineTemplate: false
34151
- }) : { bindings: {}, content: "export default {};" };
34289
+ }) : { bindings: {}, content: "const __script__ = {};" };
34152
34290
  const compiledSfcScript = {
34153
34291
  bindings: compiledScript.bindings ?? {},
34154
34292
  content: compiledScript.content
@@ -34159,7 +34297,7 @@ ${code}`;
34159
34297
  code = injectVueHmr(code, filePath, projectRoot, vueDir);
34160
34298
  return rewriteImports(code, filePath, projectRoot, rewriter);
34161
34299
  }, injectVueHmr = (code, filePath, projectRoot, vueDir) => {
34162
- const hmrBase = vueDir ? resolve59(vueDir) : projectRoot;
34300
+ const hmrBase = vueDir ? resolve60(vueDir) : projectRoot;
34163
34301
  const hmrId = relative30(hmrBase, filePath).replace(/\\/g, "/").replace(/\.vue$/, "");
34164
34302
  let result = code.replace(/export\s+default\s+/, "var __hmr_comp__ = ");
34165
34303
  result += [
@@ -34308,7 +34446,7 @@ export default {};
34308
34446
  const escaped = virtualCss.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$/g, "\\$");
34309
34447
  return jsResponse(`var s=document.createElement('style');var __absNonce=(document.querySelector('script[nonce],style[nonce]')||{}).nonce;if(__absNonce)s.nonce=__absNonce;s.textContent=\`${escaped}\`;s.dataset.svelteHmr=${JSON.stringify(cssCheckPath)};var p=document.querySelector('style[data-svelte-hmr="${cssCheckPath}"]');if(p)p.remove();document.head.appendChild(s);`);
34310
34448
  }, resolveSourcePath2 = (relPath, projectRoot) => {
34311
- const filePath = resolve59(projectRoot, decodeSrcPath(relPath));
34449
+ const filePath = resolve60(projectRoot, decodeSrcPath(relPath));
34312
34450
  const ext = extname20(filePath);
34313
34451
  if (ext === ".svelte")
34314
34452
  return { ext, filePath: resolveSvelteModulePath(filePath) };
@@ -34345,14 +34483,14 @@ export default {};
34345
34483
  const absoluteCandidate = `/${tail.replace(/^\/+/, "")}`;
34346
34484
  const candidates = [
34347
34485
  absoluteCandidate,
34348
- resolve59(projectRoot, tail)
34486
+ resolve60(projectRoot, tail)
34349
34487
  ];
34350
34488
  try {
34351
34489
  await Promise.resolve().then(() => init_loadConfig());
34352
34490
  const cfg = await loadConfig();
34353
- const angularDir = cfg.angularDirectory && resolve59(projectRoot, cfg.angularDirectory);
34491
+ const angularDir = cfg.angularDirectory && resolve60(projectRoot, cfg.angularDirectory);
34354
34492
  if (angularDir)
34355
- candidates.push(resolve59(angularDir, tail));
34493
+ candidates.push(resolve60(angularDir, tail));
34356
34494
  } catch {}
34357
34495
  for (const candidate of candidates) {
34358
34496
  if (await fileExists(candidate)) {
@@ -34383,7 +34521,7 @@ export default {};
34383
34521
  if (!TRANSPILABLE.has(ext))
34384
34522
  return;
34385
34523
  const stat = statSync13(filePath);
34386
- const resolvedVueDir = vueDir ? resolve59(vueDir) : undefined;
34524
+ const resolvedVueDir = vueDir ? resolve60(vueDir) : undefined;
34387
34525
  let content = REACT_EXTENSIONS.has(ext) ? transformReactFile(filePath, projectRoot, rewriter) : transformPlainFile(filePath, projectRoot, rewriter, resolvedVueDir);
34388
34526
  const isAngularGeneratedJs = ext === ".js" && filePath.replace(/\\/g, "/").includes("/.absolutejs/generated/angular/");
34389
34527
  if (isAngularGeneratedJs) {
@@ -34439,7 +34577,7 @@ export default {};
34439
34577
  const ownMessage = source && typeof source === "object" ? Reflect.get(source, "message") : undefined;
34440
34578
  const message = typeof ownMessage === "string" ? ownMessage : String(source);
34441
34579
  return { message, ...readPosition(first) };
34442
- }, getTransformError = (filePath) => transformErrors.get(resolve59(filePath)), transformErrorResponse = (err) => {
34580
+ }, getTransformError = (filePath) => transformErrors.get(resolve60(filePath)), transformErrorResponse = (err) => {
34443
34581
  const errMsg = err instanceof Error ? err.message : String(err);
34444
34582
  return new Response(`console.error('[ModuleServer] Transform error:', ${JSON.stringify(errMsg)});`, {
34445
34583
  headers: { "Content-Type": "application/javascript" },
@@ -34462,16 +34600,16 @@ export default {};
34462
34600
  const relPath = pathname.slice(SRC_PREFIX.length);
34463
34601
  if (relPath === "bun:wrap" || relPath.startsWith("bun:wrap?"))
34464
34602
  return handleBunWrapRequest();
34465
- const virtualCssResponse = handleVirtualSvelteCss(resolve59(projectRoot, decodeSrcPath(relPath)));
34603
+ const virtualCssResponse = handleVirtualSvelteCss(resolve60(projectRoot, decodeSrcPath(relPath)));
34466
34604
  if (virtualCssResponse)
34467
34605
  return virtualCssResponse;
34468
34606
  const { filePath, ext } = resolveSourcePath2(relPath, projectRoot);
34469
34607
  try {
34470
34608
  const response = await transformAndCache(filePath, ext, projectRoot, rewriter, frameworkDirs?.vue, stylePreprocessors);
34471
- transformErrors.delete(resolve59(filePath));
34609
+ transformErrors.delete(resolve60(filePath));
34472
34610
  return response;
34473
34611
  } catch (err) {
34474
- transformErrors.set(resolve59(filePath), describeTransformError(err));
34612
+ transformErrors.set(resolve60(filePath), describeTransformError(err));
34475
34613
  return transformErrorResponse(err);
34476
34614
  }
34477
34615
  };
@@ -34481,11 +34619,11 @@ export default {};
34481
34619
  SRC_IMPORT_RE.lastIndex = 0;
34482
34620
  while ((match = SRC_IMPORT_RE.exec(content)) !== null) {
34483
34621
  if (match[1])
34484
- files.push(resolve59(projectRoot, decodeSrcPath(match[1])));
34622
+ files.push(resolve60(projectRoot, decodeSrcPath(match[1])));
34485
34623
  }
34486
34624
  return files;
34487
34625
  }, SRC_URL_PREFIX2, invalidateModule = (filePath) => {
34488
- const resolved = resolve59(filePath);
34626
+ const resolved = resolve60(filePath);
34489
34627
  transformErrors.delete(resolved);
34490
34628
  invalidate(filePath);
34491
34629
  if (resolved !== filePath)
@@ -34551,7 +34689,7 @@ export default {};
34551
34689
  return false;
34552
34690
  }
34553
34691
  await Promise.resolve().then(() => init_prepare());
34554
- patchManifestIndexes(cached.manifest, resolve59(state.resolvedPaths.buildDir, "_src_indexes"), SRC_PREFIX);
34692
+ patchManifestIndexes(cached.manifest, resolve60(state.resolvedPaths.buildDir, "_src_indexes"), SRC_PREFIX);
34555
34693
  logPageBuild(entry.source, entry.framework, Math.round(durationMs));
34556
34694
  logStartupTimingBlock("AbsoluteJS on-demand page build", [
34557
34695
  { durationMs, label: entry.name }
@@ -34719,7 +34857,7 @@ var init_rewriteImports = __esm(() => {
34719
34857
  });
34720
34858
 
34721
34859
  // src/dev/angular/hmrCompiler.ts
34722
- import { dirname as dirname42, relative as relative31, resolve as resolve60 } from "path";
34860
+ import { dirname as dirname42, relative as relative31, resolve as resolve61 } from "path";
34723
34861
  import { performance as performance2 } from "perf_hooks";
34724
34862
  var encodeHmrComponentId = (absoluteFilePath, className) => {
34725
34863
  const projectRel = relative31(process.cwd(), absoluteFilePath).replace(/\\/g, "/");
@@ -34731,7 +34869,7 @@ var encodeHmrComponentId = (absoluteFilePath, className) => {
34731
34869
  return null;
34732
34870
  const filePathRel = decoded.slice(0, separatorIndex);
34733
34871
  const className = decoded.slice(separatorIndex + 1);
34734
- const componentFilePath = resolve60(process.cwd(), filePathRel);
34872
+ const componentFilePath = resolve61(process.cwd(), filePathRel);
34735
34873
  const projectRelPath = relative31(process.cwd(), componentFilePath).replace(/\\/g, "/");
34736
34874
  const cacheKey = encodeURIComponent(`${projectRelPath}@${className}`);
34737
34875
  await Promise.resolve().then(() => init_fastHmrCompiler());
@@ -34822,11 +34960,11 @@ var exports_simpleHTMLHMR = {};
34822
34960
  __export(exports_simpleHTMLHMR, {
34823
34961
  handleHTMLUpdate: () => handleHTMLUpdate
34824
34962
  });
34825
- import { resolve as resolve61 } from "path";
34963
+ import { resolve as resolve62 } from "path";
34826
34964
  var handleHTMLUpdate = async (htmlFilePath) => {
34827
34965
  let htmlContent;
34828
34966
  try {
34829
- const resolvedPath = resolve61(htmlFilePath);
34967
+ const resolvedPath = resolve62(htmlFilePath);
34830
34968
  const file = Bun.file(resolvedPath);
34831
34969
  if (!await file.exists()) {
34832
34970
  return null;
@@ -34852,11 +34990,11 @@ var exports_simpleHTMXHMR = {};
34852
34990
  __export(exports_simpleHTMXHMR, {
34853
34991
  handleHTMXUpdate: () => handleHTMXUpdate
34854
34992
  });
34855
- import { resolve as resolve62 } from "path";
34993
+ import { resolve as resolve63 } from "path";
34856
34994
  var handleHTMXUpdate = async (htmxFilePath) => {
34857
34995
  let htmlContent;
34858
34996
  try {
34859
- const resolvedPath = resolve62(htmxFilePath);
34997
+ const resolvedPath = resolve63(htmxFilePath);
34860
34998
  const file = Bun.file(resolvedPath);
34861
34999
  if (!await file.exists()) {
34862
35000
  return null;
@@ -34878,8 +35016,8 @@ var handleHTMXUpdate = async (htmxFilePath) => {
34878
35016
  var init_simpleHTMXHMR = () => {};
34879
35017
 
34880
35018
  // src/dev/backendGraph.ts
34881
- import { readFileSync as readFileSync52, realpathSync as realpathSync9, statSync as statSync14 } from "fs";
34882
- import { dirname as dirname43, extname as extname21, resolve as resolve63 } from "path";
35019
+ import { readFileSync as readFileSync52, realpathSync as realpathSync10, statSync as statSync14 } from "fs";
35020
+ import { dirname as dirname43, extname as extname21, resolve as resolve64 } from "path";
34883
35021
  var SOURCE_FILE, VENDORED, LOADERS, fileCache, transpilers, transpilerFor = (path) => {
34884
35022
  const loader = LOADERS[extname21(path)] ?? "ts";
34885
35023
  const existing = transpilers.get(loader);
@@ -34890,11 +35028,11 @@ var SOURCE_FILE, VENDORED, LOADERS, fileCache, transpilers, transpilerFor = (pat
34890
35028
  return created;
34891
35029
  }, realPath2 = (path) => {
34892
35030
  try {
34893
- return realpathSync9(path);
35031
+ return realpathSync10(path);
34894
35032
  } catch {
34895
35033
  return path;
34896
35034
  }
34897
- }, isProjectModule = (path, root = process.cwd()) => SOURCE_FILE.test(path) && !VENDORED.test(path) && resolve63(path).startsWith(resolve63(root)), resolveImport = (specifier, fromFile) => {
35035
+ }, isProjectModule = (path, root = process.cwd()) => SOURCE_FILE.test(path) && !VENDORED.test(path) && resolve64(path).startsWith(resolve64(root)), resolveImport = (specifier, fromFile) => {
34898
35036
  try {
34899
35037
  return realPath2(Bun.resolveSync(specifier, dirname43(fromFile)));
34900
35038
  } catch {
@@ -34919,14 +35057,14 @@ var SOURCE_FILE, VENDORED, LOADERS, fileCache, transpilers, transpilerFor = (pat
34919
35057
  fileCache.set(path, { imports, mtimeMs });
34920
35058
  return imports;
34921
35059
  }, importersOf = (target, entry, loaded = loadedProjectModules(entry)) => {
34922
- const goal = realPath2(resolve63(target));
35060
+ const goal = realPath2(resolve64(target));
34923
35061
  const importers = [];
34924
35062
  for (const file of loaded)
34925
35063
  if (readImports(file).includes(goal))
34926
35064
  importers.push(file);
34927
35065
  return importers;
34928
35066
  }, loadedProjectModules = (entry, loaded = Object.keys(__require.cache), root = process.cwd()) => {
34929
- const entryPath = realPath2(resolve63(entry));
35067
+ const entryPath = realPath2(resolve64(entry));
34930
35068
  const modules = new Set([entryPath]);
34931
35069
  for (const path of loaded) {
34932
35070
  if (isAbsoluteServerEntryCopyPath(path))
@@ -35793,11 +35931,11 @@ var init_runtime = __esm(() => {
35793
35931
  });
35794
35932
 
35795
35933
  // src/dev/hot/plugin.ts
35796
- import { mkdirSync as mkdirSync19, readFileSync as readFileSync53, realpathSync as realpathSync10, writeFileSync as writeFileSync17 } from "fs";
35797
- import { extname as extname23, join as join71, relative as relative32, resolve as resolve64, sep as sep14 } from "path";
35934
+ import { mkdirSync as mkdirSync19, readFileSync as readFileSync53, realpathSync as realpathSync11, writeFileSync as writeFileSync17 } from "fs";
35935
+ import { extname as extname23, join as join71, relative as relative32, resolve as resolve65, sep as sep14 } from "path";
35798
35936
  var SOURCE, TEST_FILE, GENERATED, ABSOLUTE_ROOT, realPath3 = (path) => {
35799
35937
  try {
35800
- return realpathSync10(path);
35938
+ return realpathSync11(path);
35801
35939
  } catch {
35802
35940
  return path;
35803
35941
  }
@@ -35873,7 +36011,7 @@ var init_plugin = __esm(() => {
35873
36011
  SOURCE = /\.(?:[cm]?[jt]sx?)$/;
35874
36012
  TEST_FILE = /(?:\.(?:spec|test)\.[cm]?[jt]sx?$)|(?:[\\/]__tests__[\\/])/;
35875
36013
  GENERATED = /(?:^|[\\/])(?:build|generated|compiled|indexes|\.absolutejs|node_modules|dist)(?:[\\/]|$)/;
35876
- ABSOLUTE_ROOT = resolve64(import.meta.dir, "..", "..", "..");
36014
+ ABSOLUTE_ROOT = resolve65(import.meta.dir, "..", "..", "..");
35877
36015
  shared = globalThis.__absoluteHotPlugin ??= {
35878
36016
  analyses: new Map,
35879
36017
  installed: undefined
@@ -35882,11 +36020,11 @@ var init_plugin = __esm(() => {
35882
36020
  });
35883
36021
 
35884
36022
  // src/dev/hot/reload.ts
35885
- import { readFileSync as readFileSync54, realpathSync as realpathSync11 } from "fs";
36023
+ import { readFileSync as readFileSync54, realpathSync as realpathSync12 } from "fs";
35886
36024
  import { relative as relative33 } from "path";
35887
36025
  var MAX_PROPAGATION_STEPS = 500, realPath4 = (path) => {
35888
36026
  try {
35889
- return realpathSync11(path);
36027
+ return realpathSync12(path);
35890
36028
  } catch {
35891
36029
  return path;
35892
36030
  }
@@ -36075,7 +36213,7 @@ var init_reload = __esm(() => {
36075
36213
  // src/dev/rebuildTrigger.ts
36076
36214
  import { existsSync as existsSync56, readdirSync as readdirSync13, rmSync as rmSync4, statSync as statSync15 } from "fs";
36077
36215
  import {
36078
- basename as basename22,
36216
+ basename as basename23,
36079
36217
  dirname as dirname45,
36080
36218
  isAbsolute as isAbsolute13,
36081
36219
  join as join72,
@@ -36623,7 +36761,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
36623
36761
  if (serverDirs.length <= 1) {
36624
36762
  const dir = getFrameworkGeneratedDir(framework, projectRoot);
36625
36763
  return {
36626
- serverOutDir: resolvePath(resolvedPaths.buildDir, basename22(dir)),
36764
+ serverOutDir: resolvePath(resolvedPaths.buildDir, basename23(dir)),
36627
36765
  serverRoot: resolvePath(dir, "server")
36628
36766
  };
36629
36767
  }
@@ -36632,7 +36770,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
36632
36770
  serverRoot: commonAncestor(serverDirs.map((entry) => entry.dir), projectRoot)
36633
36771
  };
36634
36772
  }, updateServerManifestEntry = (state, artifact) => {
36635
- const fileWithHash = basename22(artifact.path);
36773
+ const fileWithHash = basename23(artifact.path);
36636
36774
  const [baseName] = fileWithHash.split(`.${artifact.hash}.`);
36637
36775
  if (!baseName) {
36638
36776
  return;
@@ -36647,7 +36785,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
36647
36785
  const prefixByDir = new Map;
36648
36786
  for (const artifact of freshOutputs) {
36649
36787
  const dir = dirname45(artifact.path);
36650
- const name = basename22(artifact.path);
36788
+ const name = basename23(artifact.path);
36651
36789
  const [prefix] = name.split(".");
36652
36790
  if (!prefix)
36653
36791
  continue;
@@ -37165,7 +37303,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
37165
37303
  await rewriteImports2(ssrPaths, angServerVendorPaths);
37166
37304
  }
37167
37305
  serverPaths.forEach((serverPath, idx) => {
37168
- const fileBase = basename22(serverPath, ".js");
37306
+ const fileBase = basename23(serverPath, ".js");
37169
37307
  const ssrPath = ssrPaths[idx] ?? serverPath;
37170
37308
  state.manifest[toPascal(fileBase)] = resolvePath(ssrPath);
37171
37309
  });
@@ -37284,7 +37422,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
37284
37422
  }, resolveAffectedPageModules = async (reactFiles) => {
37285
37423
  const pages = reactFiles.filter((file) => isReactPagePath(file) && isReactComponentPath(file) && isImportableModule(file));
37286
37424
  const entries = await Promise.all(pages.map(async (page) => [
37287
- `${basename22(page).replace(/\.[jt]sx$/, "")}Index`,
37425
+ `${basename23(page).replace(/\.[jt]sx$/, "")}Index`,
37288
37426
  await getReactModuleUrl(page)
37289
37427
  ]));
37290
37428
  return Object.fromEntries(entries);
@@ -37418,7 +37556,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
37418
37556
  for (const artifact of cssResult.outputs) {
37419
37557
  if (!artifact.path.endsWith(".css"))
37420
37558
  continue;
37421
- const cssName = stripArtifactHash(basename22(artifact.path), artifact.hash);
37559
+ const cssName = stripArtifactHash(basename23(artifact.path), artifact.hash);
37422
37560
  if (cssName)
37423
37561
  cssByName.set(cssName, artifact.path);
37424
37562
  }
@@ -37428,7 +37566,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
37428
37566
  await Promise.all(serverResult.outputs.map(async (artifact) => {
37429
37567
  if (!artifact.path.endsWith(".js"))
37430
37568
  return;
37431
- const pascalName = stripArtifactHash(basename22(artifact.path), artifact.hash);
37569
+ const pascalName = stripArtifactHash(basename23(artifact.path), artifact.hash);
37432
37570
  if (!pascalName)
37433
37571
  return;
37434
37572
  const cssBundlePath = cssByName.get(`${toKebab(pascalName)}-compiled`);
@@ -37701,7 +37839,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
37701
37839
  const duration = Date.now() - startTime;
37702
37840
  const broadcastFiles = svelteFiles.length > 0 ? svelteFiles : filesToRebuild;
37703
37841
  broadcastFiles.forEach((sveltePagePath) => {
37704
- const fileName = basename22(sveltePagePath);
37842
+ const fileName = basename23(sveltePagePath);
37705
37843
  const baseName = fileName.replace(/\.svelte$/, "");
37706
37844
  const pascalName = toPascal(baseName);
37707
37845
  const cssKey = `${pascalName}CSS`;
@@ -37784,7 +37922,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
37784
37922
  } = await compileVue(vueFiles, vueDir, true, getStyleTransformConfig(state.config));
37785
37923
  const serverEntries = [...vueServerPaths];
37786
37924
  const clientEntries = [...vueIndexPaths, ...vueClientPaths];
37787
- const cssOutDir = join72(buildDir, state.resolvedPaths.assetsDir ? basename22(state.resolvedPaths.assetsDir) : "assets", "css");
37925
+ const cssOutDir = join72(buildDir, state.resolvedPaths.assetsDir ? basename23(state.resolvedPaths.assetsDir) : "assets", "css");
37788
37926
  const { serverRoot, serverOutDir } = await computeServerOutPaths(state.resolvedPaths, "vue");
37789
37927
  const serverExternals = await getServerBundleExternals();
37790
37928
  const serverExternalsPlugins = await getServerBundleExternalsPlugins(state.config);
@@ -37961,7 +38099,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
37961
38099
  await Promise.resolve().then(() => init_compileEmber());
37962
38100
  const { serverPaths } = await compileEmber(allPageEntries, emberDir, process.cwd(), true);
37963
38101
  for (const serverPath of serverPaths) {
37964
- const fileBase = basename22(serverPath, ".js");
38102
+ const fileBase = basename23(serverPath, ".js");
37965
38103
  state.manifest[toPascal(fileBase)] = resolvePath(serverPath);
37966
38104
  }
37967
38105
  await Promise.resolve().then(() => init_ember());
@@ -38040,7 +38178,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
38040
38178
  });
38041
38179
  }
38042
38180
  }, handleScriptUpdate = (state, scriptFile, manifest, framework, duration) => {
38043
- const scriptBaseName = basename22(scriptFile).replace(/\.(ts|js|tsx|jsx)$/, "");
38181
+ const scriptBaseName = basename23(scriptFile).replace(/\.(ts|js|tsx|jsx)$/, "");
38044
38182
  const pascalName = toPascal(scriptBaseName);
38045
38183
  const scriptPath = manifest[pascalName] || null;
38046
38184
  if (!scriptPath) {
@@ -38141,7 +38279,8 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
38141
38279
  const changedIslands = await collectChangedIslands(config, filesToRebuild);
38142
38280
  const islands = changedIslands.flatMap(({ component, framework }) => {
38143
38281
  const modulePath = manifest[getIslandManifestKey(framework, component)];
38144
- return modulePath ? [{ component, framework, modulePath }] : [];
38282
+ const stylePath = manifest[getIslandStyleManifestKey(framework, component)];
38283
+ return modulePath ? [{ component, framework, modulePath, stylePath }] : [];
38145
38284
  });
38146
38285
  if (islands.length === 0)
38147
38286
  return true;
@@ -38186,7 +38325,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
38186
38325
  if (isSingle) {
38187
38326
  return resolvePath(state.resolvedPaths.buildDir, "pages");
38188
38327
  }
38189
- const dirName = framework === "html" ? basename22(config.htmlDirectory ?? "html") : basename22(config.htmxDirectory ?? "htmx");
38328
+ const dirName = framework === "html" ? basename23(config.htmlDirectory ?? "html") : basename23(config.htmxDirectory ?? "htmx");
38190
38329
  return resolvePath(state.resolvedPaths.buildDir, dirName, "pages");
38191
38330
  }, processHtmlPageUpdate = async (state, pageFile, builtHtmlPagePath, manifest, duration) => {
38192
38331
  try {
@@ -38227,7 +38366,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
38227
38366
  const shouldRefreshAllPages = htmlPageFiles.length === 0 && shouldRefreshFromIslandChange;
38228
38367
  const pageFilesToUpdate = shouldRefreshAllPages ? await scanEntryPoints(outputHtmlPages, "*.html") : htmlPageFiles;
38229
38368
  await runSequentially(pageFilesToUpdate, async (pageFile) => {
38230
- const htmlPageName = basename22(pageFile);
38369
+ const htmlPageName = basename23(pageFile);
38231
38370
  const builtHtmlPagePath = resolvePath(outputHtmlPages, htmlPageName);
38232
38371
  await processHtmlPageUpdate(state, pageFile, builtHtmlPagePath, manifest, duration);
38233
38372
  });
@@ -38236,7 +38375,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
38236
38375
  if (!cssFile) {
38237
38376
  return;
38238
38377
  }
38239
- const cssBaseName = basename22(getStyleBaseName(cssFile));
38378
+ const cssBaseName = basename23(getStyleBaseName(cssFile));
38240
38379
  const cssPascalName = toPascal(cssBaseName);
38241
38380
  const cssKey = `${cssPascalName}CSS`;
38242
38381
  const cssUrl = manifest[cssKey] || null;
@@ -38288,7 +38427,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
38288
38427
  type: "vue-update"
38289
38428
  });
38290
38429
  }, broadcastVuePageChange = async (state, config, vuePagePath, manifest, duration) => {
38291
- const fileName = basename22(vuePagePath);
38430
+ const fileName = basename23(vuePagePath);
38292
38431
  const baseName = fileName.replace(/\.vue$/, "");
38293
38432
  const pascalName = toPascal(baseName);
38294
38433
  const vueRoot = config.vueDirectory;
@@ -38335,7 +38474,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
38335
38474
  if (!cssFile) {
38336
38475
  return;
38337
38476
  }
38338
- const cssBaseName = basename22(getStyleBaseName(cssFile));
38477
+ const cssBaseName = basename23(getStyleBaseName(cssFile));
38339
38478
  const cssPascalName = toPascal(cssBaseName);
38340
38479
  const cssKey = `${cssPascalName}CSS`;
38341
38480
  const cssUrl = manifest[cssKey] || null;
@@ -38354,7 +38493,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
38354
38493
  });
38355
38494
  }, broadcastSveltePageUpdate = (state, sveltePagePath, manifest, duration) => {
38356
38495
  try {
38357
- const fileName = basename22(sveltePagePath);
38496
+ const fileName = basename23(sveltePagePath);
38358
38497
  const baseName = fileName.replace(/\.svelte$/, "");
38359
38498
  const pascalName = toPascal(baseName);
38360
38499
  const cssKey = `${pascalName}CSS`;
@@ -38405,7 +38544,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
38405
38544
  if (!cssFile) {
38406
38545
  return;
38407
38546
  }
38408
- const cssBaseName = basename22(getStyleBaseName(cssFile));
38547
+ const cssBaseName = basename23(getStyleBaseName(cssFile));
38409
38548
  const cssPascalName = toPascal(cssBaseName);
38410
38549
  const cssKey = `${cssPascalName}CSS`;
38411
38550
  const cssUrl = manifest[cssKey] || null;
@@ -38488,7 +38627,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
38488
38627
  const shouldRefreshAllPages = htmxPageFiles.length === 0 && shouldRefreshFromIslandChange;
38489
38628
  const pageFilesToUpdate = shouldRefreshAllPages ? await scanEntryPoints(outputHtmxPages, "*.html") : htmxPageFiles;
38490
38629
  await runSequentially(pageFilesToUpdate, async (htmxPageFile) => {
38491
- const htmxPageName = basename22(htmxPageFile);
38630
+ const htmxPageName = basename23(htmxPageFile);
38492
38631
  const builtHtmxPagePath = resolvePath(outputHtmxPages, htmxPageName);
38493
38632
  await processHtmxPageUpdate(state, htmxPageFile, builtHtmxPagePath, manifest, duration);
38494
38633
  });
@@ -38600,7 +38739,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
38600
38739
  html = html.slice(0, bodyClose.index) + hmrScript + html.slice(bodyClose.index);
38601
38740
  writeFs(destPath, html);
38602
38741
  }, processMarkupFileFastPath = async (state, sourceFile, outputDir, framework, startTime, updateAssetPaths, handleUpdate, readFs, writeFs) => {
38603
- const destPath = resolvePath(outputDir, basename22(sourceFile));
38742
+ const destPath = resolvePath(outputDir, basename23(sourceFile));
38604
38743
  const hmrScript = extractHmrScript(destPath, readFs);
38605
38744
  const source = await Bun.file(sourceFile).text();
38606
38745
  await Bun.write(destPath, source);
@@ -38686,9 +38825,9 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
38686
38825
  await fastPath.handler(state, config, files, startTime, onRebuildComplete);
38687
38826
  markHandledFiles(files, fastPath.framework, state.resolvedPaths, handled);
38688
38827
  });
38689
- const configPath = resolvePath(process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
38690
- if (affectedFrameworks.includes("angular") && files.includes(configPath) && !state.lastUserEditedFiles?.has(configPath)) {
38691
- handled.add(configPath);
38828
+ for (const file of files) {
38829
+ if (!handled.has(file) && detectFramework(file, state.resolvedPaths) === "unknown" && !state.lastUserEditedFiles?.has(resolvePath(file)))
38830
+ handled.add(file);
38692
38831
  }
38693
38832
  return files.every((f) => handled.has(f));
38694
38833
  }, keepReactIndexesOnModuleServer = async (state, manifest) => {
@@ -39315,7 +39454,7 @@ import {
39315
39454
  readFileSync as readFileSync55
39316
39455
  } from "fs";
39317
39456
  import { mkdir as mkdir16, readFile as readFile11, rename as rename6, rm as rm18, writeFile as writeFile15 } from "fs/promises";
39318
- import { basename as basename23, join as join74, resolve as resolve65 } from "path";
39457
+ import { basename as basename24, join as join74, resolve as resolve66 } from "path";
39319
39458
  var CACHE_ROOT2, CACHE_FORMAT_VERSION3 = 1, KEY_LENGTH = 32, LOCKFILES, computeVendorCacheKey = (inputs) => {
39320
39459
  const hash = createHash9("sha256");
39321
39460
  hash.update(String(CACHE_FORMAT_VERSION3));
@@ -39335,7 +39474,7 @@ var CACHE_ROOT2, CACHE_FORMAT_VERSION3 = 1, KEY_LENGTH = 32, LOCKFILES, computeV
39335
39474
  }
39336
39475
  for (const dir of inputs.vendorDirs) {
39337
39476
  hash.update("\x00v");
39338
- hash.update(basename23(resolve65(dir, "..")));
39477
+ hash.update(basename24(resolve66(dir, "..")));
39339
39478
  }
39340
39479
  return hash.digest("hex").slice(0, KEY_LENGTH);
39341
39480
  }, readLockfileHash = (projectRoot = process.cwd()) => {
@@ -39374,7 +39513,7 @@ var CACHE_ROOT2, CACHE_FORMAT_VERSION3 = 1, KEY_LENGTH = 32, LOCKFILES, computeV
39374
39513
  continue;
39375
39514
  copyTree(dir, join74(stagingDir, slotName(index, dir)));
39376
39515
  }
39377
- }, isVendorCachePayload = (value) => typeof value === "object" && value !== null && typeof Reflect.get(value, "depPaths") === "object", cacheDirFor = (key, projectRoot) => resolve65(projectRoot, CACHE_ROOT2, key), slotName = (index, dir) => `${index}-${basename23(resolve65(dir, ".."))}`, restoreVendorCache = async (key, vendorDirs, projectRoot = process.cwd()) => {
39516
+ }, isVendorCachePayload = (value) => typeof value === "object" && value !== null && typeof Reflect.get(value, "depPaths") === "object", cacheDirFor = (key, projectRoot) => resolve66(projectRoot, CACHE_ROOT2, key), slotName = (index, dir) => `${index}-${basename24(resolve66(dir, ".."))}`, restoreVendorCache = async (key, vendorDirs, projectRoot = process.cwd()) => {
39378
39517
  const cacheDir = cacheDirFor(key, projectRoot);
39379
39518
  const payloadPath = join74(cacheDir, "payload.json");
39380
39519
  if (!existsSync57(payloadPath))
@@ -39420,7 +39559,7 @@ var init_vendorCache = __esm(() => {
39420
39559
  // src/core/devBuild.ts
39421
39560
  import { readdir as readdir6 } from "fs/promises";
39422
39561
  import { existsSync as existsSync58, statSync as statSync16 } from "fs";
39423
- import { resolve as resolve66 } from "path";
39562
+ import { resolve as resolve67 } from "path";
39424
39563
  var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir, collectDepVendorSourceDirs = (config) => {
39425
39564
  const configuredDirs = [
39426
39565
  ...collectConfigVendorSourceDirs(config),
@@ -39444,7 +39583,7 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir, collectDepVendorSourceDirs = (
39444
39583
  return Object.keys(config).length > 0 ? config : null;
39445
39584
  }, reloadConfig = async () => {
39446
39585
  try {
39447
- const configPath = resolve66(process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
39586
+ const configPath = resolve67(process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
39448
39587
  const source = await Bun.file(configPath).text();
39449
39588
  return parseDirectoryConfig(source);
39450
39589
  } catch {
@@ -39559,7 +39698,7 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir, collectDepVendorSourceDirs = (
39559
39698
  });
39560
39699
  }
39561
39700
  }, handleCachedReload = async () => {
39562
- const serverMtime = statSync16(resolve66(Bun.main)).mtimeMs;
39701
+ const serverMtime = statSync16(resolve67(Bun.main)).mtimeMs;
39563
39702
  const lastMtime = globalThis.__hmrServerMtime;
39564
39703
  globalThis.__hmrServerMtime = serverMtime;
39565
39704
  const cached = globalThis.__hmrDevResult;
@@ -39600,8 +39739,8 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir, collectDepVendorSourceDirs = (
39600
39739
  return true;
39601
39740
  }, resolveAbsoluteVersion2 = async () => {
39602
39741
  const candidates = [
39603
- resolve66(import.meta.dir, "..", "..", "package.json"),
39604
- resolve66(import.meta.dir, "..", "package.json")
39742
+ resolve67(import.meta.dir, "..", "..", "package.json"),
39743
+ resolve67(import.meta.dir, "..", "package.json")
39605
39744
  ];
39606
39745
  const [candidate, ...remaining] = candidates;
39607
39746
  if (!candidate) {
@@ -39627,7 +39766,7 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir, collectDepVendorSourceDirs = (
39627
39766
  const entries = await readdir6(vendorDir).catch(() => emptyStringArray);
39628
39767
  await Promise.all(entries.filter((entry) => entry.endsWith(".js")).map(async (entry) => {
39629
39768
  const webPath = `/${framework}/vendor/${entry}`;
39630
- const bytes = await Bun.file(resolve66(vendorDir, entry)).bytes();
39769
+ const bytes = await Bun.file(resolve67(vendorDir, entry)).bytes();
39631
39770
  assetStore.set(webPath, bytes);
39632
39771
  }));
39633
39772
  }, devBuild = async (config) => {
@@ -39819,11 +39958,11 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir, collectDepVendorSourceDirs = (
39819
39958
  }
39820
39959
  stepStartedAt = performance.now();
39821
39960
  setBootPhase("build vendor bundles");
39822
- const reactVendorDir = resolve66(state.resolvedPaths.buildDir, "react", "vendor");
39823
- const angularVendorDir = resolve66(state.resolvedPaths.buildDir, "angular", "vendor");
39824
- const svelteVendorDir = resolve66(state.resolvedPaths.buildDir, "svelte", "vendor");
39825
- const vueVendorDir = resolve66(state.resolvedPaths.buildDir, "vue", "vendor");
39826
- const depVendorDir = resolve66(state.resolvedPaths.buildDir, "vendor");
39961
+ const reactVendorDir = resolve67(state.resolvedPaths.buildDir, "react", "vendor");
39962
+ const angularVendorDir = resolve67(state.resolvedPaths.buildDir, "angular", "vendor");
39963
+ const svelteVendorDir = resolve67(state.resolvedPaths.buildDir, "svelte", "vendor");
39964
+ const vueVendorDir = resolve67(state.resolvedPaths.buildDir, "vue", "vendor");
39965
+ const depVendorDir = resolve67(state.resolvedPaths.buildDir, "vendor");
39827
39966
  await Promise.resolve().then(() => init_buildDepVendor());
39828
39967
  const activeVendorDirs = [
39829
39968
  reactVendorEnabled ? reactVendorDir : null,
@@ -39940,7 +40079,7 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir, collectDepVendorSourceDirs = (
39940
40079
  manifest
39941
40080
  };
39942
40081
  globalThis.__hmrDevResult = result;
39943
- globalThis.__hmrServerMtime = statSync16(resolve66(Bun.main)).mtimeMs;
40082
+ globalThis.__hmrServerMtime = statSync16(resolve67(Bun.main)).mtimeMs;
39944
40083
  return result;
39945
40084
  };
39946
40085
  var init_devBuild = __esm(() => {
@@ -40195,12 +40334,12 @@ var init_hmr = __esm(() => {
40195
40334
 
40196
40335
  // src/plugins/devtoolsJson.ts
40197
40336
  import { existsSync as existsSync59, mkdirSync as mkdirSync22, readFileSync as readFileSync56, writeFileSync as writeFileSync18 } from "fs";
40198
- import { dirname as dirname46, join as join75, resolve as resolve67 } from "path";
40337
+ import { dirname as dirname46, join as join75, resolve as resolve68 } from "path";
40199
40338
  import { Elysia as Elysia11 } from "elysia";
40200
40339
  var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_KEY = "__absoluteDevtoolsWorkspaceUuid", getGlobalUuid = () => Reflect.get(globalThis, UUID_CACHE_KEY), setGlobalUuid = (uuid) => {
40201
40340
  Reflect.set(globalThis, UUID_CACHE_KEY, uuid);
40202
40341
  return uuid;
40203
- }, isUuidV4 = (value) => /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(value), resolveDevtoolsUuidCachePath = (buildDir, uuidCachePath) => resolve67(uuidCachePath ?? join75(buildDir, ".absolute", "chrome-devtools-workspace-uuid")), readCachedUuid = (cachePath) => {
40342
+ }, isUuidV4 = (value) => /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(value), resolveDevtoolsUuidCachePath = (buildDir, uuidCachePath) => resolve68(uuidCachePath ?? join75(buildDir, ".absolute", "chrome-devtools-workspace-uuid")), readCachedUuid = (cachePath) => {
40204
40343
  if (!existsSync59(cachePath))
40205
40344
  return null;
40206
40345
  try {
@@ -40226,7 +40365,7 @@ var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_K
40226
40365
  writeFileSync18(cachePath, uuid, "utf-8");
40227
40366
  return setGlobalUuid(uuid);
40228
40367
  }, devtoolsJson = (buildDir, options = {}) => {
40229
- const rootPath = resolve67(options.projectRoot ?? process.cwd());
40368
+ const rootPath = resolve68(options.projectRoot ?? process.cwd());
40230
40369
  const root = options.normalizeForWindowsContainer === false ? rootPath : normalizeDevtoolsWorkspaceRoot(rootPath);
40231
40370
  const uuid = getOrCreateUuid(buildDir, options);
40232
40371
  return new Elysia11({ name: "absolute-devtools-json" }).get(ENDPOINT, () => ({
@@ -40251,7 +40390,7 @@ var init_devtoolsJson = () => {};
40251
40390
 
40252
40391
  // src/plugins/imageOptimizer.ts
40253
40392
  import { existsSync as existsSync60 } from "fs";
40254
- import { resolve as resolve68 } from "path";
40393
+ import { resolve as resolve69 } from "path";
40255
40394
  import { Elysia as Elysia12 } from "elysia";
40256
40395
  var DEFAULT_CACHE_TTL_SECONDS = 60, MS_PER_SECOND = 1000, MAX_QUALITY = 100, avifInProgress, safeResolve = (path, baseDir) => {
40257
40396
  try {
@@ -40264,7 +40403,7 @@ var DEFAULT_CACHE_TTL_SECONDS = 60, MS_PER_SECOND = 1000, MAX_QUALITY = 100, avi
40264
40403
  }
40265
40404
  }, resolveLocalImage = (url, buildDir) => {
40266
40405
  const cleanPath = url.startsWith("/") ? url.slice(1) : url;
40267
- return safeResolve(cleanPath, buildDir) ?? safeResolve(cleanPath, resolve68(process.cwd()));
40406
+ return safeResolve(cleanPath, buildDir) ?? safeResolve(cleanPath, resolve69(process.cwd()));
40268
40407
  }, parseQueryParams = (query, allowedSizes, defaultQuality) => {
40269
40408
  const url = typeof query["url"] === "string" ? query["url"] : undefined;
40270
40409
  const wParam = typeof query["w"] === "string" ? query["w"] : undefined;
@@ -41507,7 +41646,7 @@ var init_partialPrerenderServe = __esm(() => {
41507
41646
  // src/core/prepare.ts
41508
41647
  import { createHash as createHash13 } from "crypto";
41509
41648
  import { existsSync as existsSync61, readdirSync as readdirSync15, readFileSync as readFileSync58 } from "fs";
41510
- import { basename as basename24, join as join79, relative as relative36, resolve as resolvePath4 } from "path";
41649
+ import { basename as basename25, join as join79, relative as relative36, resolve as resolvePath4 } from "path";
41511
41650
  import { Elysia as Elysia16, ElysiaError, InternalServerError, NotFound as NotFound2 } from "elysia";
41512
41651
  var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_PLUGIN_RETRY_DELAY_MS = 50, waitForStaticPluginRetry = () => new Promise((resolve) => {
41513
41652
  setTimeout(resolve, STATIC_PLUGIN_RETRY_DELAY_MS);
@@ -41790,7 +41929,7 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
41790
41929
  for (const entry of entries) {
41791
41930
  if (!entry.endsWith(".html"))
41792
41931
  continue;
41793
- const name = basename24(entry, ".html");
41932
+ const name = basename25(entry, ".html");
41794
41933
  const route = name === "index" ? "/" : `/${name}`;
41795
41934
  map.set(route, join79(prerenderDir, entry));
41796
41935
  }
@@ -41816,6 +41955,8 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
41816
41955
  const { endpoint } = resolveVitalsConfig(config.vitals);
41817
41956
  return endpoint.startsWith("/") ? createVitalsPlugin(endpoint) : new Elysia16({ name: "absolutejs-vitals-remote" });
41818
41957
  }, createNotFoundPlugin = () => new Elysia16({ name: "absolutejs-not-found" }).onError("global", NotFound2, async ({ request }) => {
41958
+ if (!isPageRequest(request))
41959
+ return;
41819
41960
  const response = await renderFirstNotFound({
41820
41961
  preferHtmx: request.headers.get("hx-request") === "true"
41821
41962
  });
@@ -42104,7 +42245,7 @@ import {
42104
42245
  watch as watch2
42105
42246
  } from "fs";
42106
42247
  import { createHash as createHash14 } from "crypto";
42107
- import { dirname as dirname48, join as join82, resolve as resolve69 } from "path";
42248
+ import { dirname as dirname48, join as join82, resolve as resolve70 } from "path";
42108
42249
  var ATOMIC_RECOVERY_WINDOW_MS = 1000, RELOAD_DEBOUNCE_MS = 80, ENTRY_IMPORT_RETRY_DELAY_MS = 250, MAX_ENTRY_IMPORT_ATTEMPTS = 3, WATCH_FALLBACK_INTERVAL_MS = 250, isAtomicWriteTemp = (filename) => isEditorTempFile(filename) || isAbsoluteServerEntryCopyPath(filename), fileHash = (path) => {
42109
42250
  try {
42110
42251
  return createHash14("sha256").update(readFileSync61(path)).digest("hex");
@@ -42132,10 +42273,10 @@ var ATOMIC_RECOVERY_WINDOW_MS = 1000, RELOAD_DEBOUNCE_MS = 80, ENTRY_IMPORT_RETR
42132
42273
  return;
42133
42274
  globalThis.__absoluteEntryWatcherStarted = true;
42134
42275
  globalThis.__absoluteEntryWatcherReady = false;
42135
- const entryPath = resolve69(originalEntry);
42276
+ const entryPath = resolve70(originalEntry);
42136
42277
  const entryDir = dirname48(entryPath);
42137
42278
  const entryBase = entryPath.slice(entryDir.length + 1);
42138
- const configPath = resolve69(process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
42279
+ const configPath = resolve70(process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
42139
42280
  const configDir = dirname48(configPath);
42140
42281
  const configBase = configPath.slice(configDir.length + 1);
42141
42282
  const recentlyHandled = new Map;
@@ -43487,7 +43628,7 @@ import {
43487
43628
  writeFileSync as writeFileSync19
43488
43629
  } from "fs";
43489
43630
  import { homedir as homedir2 } from "os";
43490
- import { basename as basename25, join as join81 } from "path";
43631
+ import { basename as basename26, join as join81 } from "path";
43491
43632
  var registeredPids = new Set;
43492
43633
  var exitHandlerRegistered = false;
43493
43634
  var instanceFilePath = (pid) => join81(instanceRegistryDir(), `${pid}.json`);
@@ -43531,7 +43672,7 @@ var resolveProjectName = (cwd) => {
43531
43672
  if (parsed !== null && typeof parsed === "object" && typeof parsed.name === "string" && parsed.name.trim().length > 0) {
43532
43673
  return parsed.name;
43533
43674
  }
43534
- return basename25(cwd) || "unknown";
43675
+ return basename26(cwd) || "unknown";
43535
43676
  };
43536
43677
 
43537
43678
  // src/utils/networking.ts
@@ -44566,7 +44707,7 @@ init_fontAssets();
44566
44707
  // src/utils/defineEnv.ts
44567
44708
  var {env: bunEnv } = globalThis.Bun;
44568
44709
  import { existsSync as existsSync64, readFileSync as readFileSync62 } from "fs";
44569
- import { resolve as resolve70 } from "path";
44710
+ import { resolve as resolve71 } from "path";
44570
44711
 
44571
44712
  // node_modules/@sinclair/typebox/build/esm/type/guard/value.mjs
44572
44713
  function IsAsyncIterator(value) {
@@ -49093,7 +49234,7 @@ ${lines.join(`
49093
49234
  };
49094
49235
  var checkEnvFileSecurity = (properties) => {
49095
49236
  const cwd = process.cwd();
49096
- const envPath = resolve70(cwd, ".env");
49237
+ const envPath = resolve71(cwd, ".env");
49097
49238
  if (!existsSync64(envPath))
49098
49239
  return;
49099
49240
  const sensitiveKeys = Object.keys(properties).filter(isSensitive);
@@ -49103,7 +49244,7 @@ var checkEnvFileSecurity = (properties) => {
49103
49244
  const presentKeys = sensitiveKeys.filter((key) => envContent.includes(`${key}=`));
49104
49245
  if (presentKeys.length === 0)
49105
49246
  return;
49106
- const gitignorePath = resolve70(cwd, ".gitignore");
49247
+ const gitignorePath = resolve71(cwd, ".gitignore");
49107
49248
  if (existsSync64(gitignorePath)) {
49108
49249
  const gitignore = readFileSync62(gitignorePath, "utf-8");
49109
49250
  if (gitignore.split(`
@@ -49138,7 +49279,7 @@ var getEnv = (key) => {
49138
49279
  };
49139
49280
  // src/utils/projectRoot.ts
49140
49281
  import { existsSync as existsSync65 } from "fs";
49141
- import { dirname as dirname49, resolve as resolve71 } from "path";
49282
+ import { dirname as dirname49, resolve as resolve72 } from "path";
49142
49283
  var CONFIG_CANDIDATES = [
49143
49284
  "absolute.config.ts",
49144
49285
  "absolute.config.js",
@@ -49147,7 +49288,7 @@ var CONFIG_CANDIDATES = [
49147
49288
  "absolute.config.mts",
49148
49289
  "absolute.config.cts"
49149
49290
  ];
49150
- var hasAbsoluteConfig = (directory) => CONFIG_CANDIDATES.some((name) => existsSync65(resolve71(directory, name)));
49291
+ var hasAbsoluteConfig = (directory) => CONFIG_CANDIDATES.some((name) => existsSync65(resolve72(directory, name)));
49151
49292
  var findProjectRoot = () => {
49152
49293
  const start = process.cwd();
49153
49294
  let packageRoot = null;
@@ -49156,7 +49297,7 @@ var findProjectRoot = () => {
49156
49297
  if (hasAbsoluteConfig(directory)) {
49157
49298
  return directory;
49158
49299
  }
49159
- if (packageRoot === null && existsSync65(resolve71(directory, "package.json"))) {
49300
+ if (packageRoot === null && existsSync65(resolve72(directory, "package.json"))) {
49160
49301
  packageRoot = directory;
49161
49302
  }
49162
49303
  const parent = dirname49(directory);
@@ -49444,5 +49585,5 @@ export {
49444
49585
  wrapPageHandlerWithStreamingSlots
49445
49586
  };
49446
49587
 
49447
- //# debugId=A5AE9016FB5A9CEA64756E2164756E21
49588
+ //# debugId=0135FA899DABAE4364756E2164756E21
49448
49589
  //# sourceMappingURL=index.js.map