@absolutejs/absolute 0.19.0-beta.686 → 0.19.0-beta.688

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2501,11 +2501,120 @@ var init_lowerAwaitSlotSyntax = __esm(() => {
2501
2501
  AWAIT_BLOCK_RE = /\{#await\s+([^}]+)\}([\s\S]*?)\{:then(?:\s+([A-Za-z_$][\w$]*))?\}([\s\S]*?)(?:\{:catch(?:\s+([A-Za-z_$][\w$]*))?\}([\s\S]*?))?\{\/await\}/g;
2502
2502
  });
2503
2503
 
2504
+ // src/build/stylePreprocessor.ts
2505
+ import { readFile } from "fs/promises";
2506
+ import { dirname as dirname2, extname } from "path";
2507
+ var STYLE_EXTENSION_PATTERN, STYLE_MODULE_EXTENSION_PATTERN, STYLE_LANGUAGE_PATTERN, importOptionalPeer, isPreprocessableStylePath = (filePath) => STYLE_EXTENSION_PATTERN.test(filePath), isStyleModulePath = (filePath) => STYLE_MODULE_EXTENSION_PATTERN.test(filePath), isStylePath = (filePath) => /\.(css|s[ac]ss|less)$/i.test(filePath), getStyleBaseName = (filePath) => filePath.replace(/\.(css|s[ac]ss|less)$/i, ""), getStyleLanguage = (filePathOrLanguage) => {
2508
+ const normalized = filePathOrLanguage.toLowerCase();
2509
+ if (normalized === "scss" || normalized.endsWith(".scss"))
2510
+ return "scss";
2511
+ if (normalized === "sass" || normalized.endsWith(".sass"))
2512
+ return "sass";
2513
+ if (normalized === "less" || normalized.endsWith(".less"))
2514
+ return "less";
2515
+ return null;
2516
+ }, missingDependencyError = (name, filePath) => new Error(`Unable to compile ${filePath}: install optional dependency "${name}" to use this stylesheet preprocessor.`), compileStyleSource = async (filePath, source, languageHint) => {
2517
+ const language = getStyleLanguage(languageHint ?? filePath);
2518
+ const contents = source ?? await readFile(filePath, "utf-8");
2519
+ if (language === "scss" || language === "sass") {
2520
+ let sass;
2521
+ try {
2522
+ sass = await importOptionalPeer("sass");
2523
+ } catch {
2524
+ throw missingDependencyError("sass", filePath);
2525
+ }
2526
+ const result = sass.compileString(contents, {
2527
+ loadPaths: [dirname2(filePath), process.cwd()],
2528
+ style: "expanded",
2529
+ syntax: language === "sass" ? "indented" : "scss",
2530
+ url: new URL(`file://${filePath}`)
2531
+ });
2532
+ return result.css;
2533
+ }
2534
+ if (language === "less") {
2535
+ let lessModule;
2536
+ try {
2537
+ lessModule = await importOptionalPeer("less");
2538
+ } catch {
2539
+ throw missingDependencyError("less", filePath);
2540
+ }
2541
+ const less = lessModule.render ? lessModule : lessModule.default;
2542
+ const render = less?.render;
2543
+ if (!render)
2544
+ throw missingDependencyError("less", filePath);
2545
+ const result = await render(contents, {
2546
+ filename: filePath,
2547
+ paths: [dirname2(filePath), process.cwd()]
2548
+ });
2549
+ return result.css;
2550
+ }
2551
+ return contents;
2552
+ }, stylePreprocessorPlugin, createSvelteStylePreprocessor = () => ({
2553
+ style: async ({
2554
+ attributes,
2555
+ content,
2556
+ filename
2557
+ }) => {
2558
+ const language = typeof attributes.lang === "string" ? attributes.lang : typeof attributes.type === "string" ? attributes.type.replace(/^text\//, "") : null;
2559
+ if (!language || !STYLE_LANGUAGE_PATTERN.test(language))
2560
+ return;
2561
+ const path = filename ?? `style.${language}`;
2562
+ return {
2563
+ code: await compileStyleSource(path, content, language)
2564
+ };
2565
+ }
2566
+ }), compileStyleFileIfNeeded = async (filePath) => {
2567
+ if (!isPreprocessableStylePath(filePath)) {
2568
+ return readFile(filePath, "utf-8");
2569
+ }
2570
+ return compileStyleSource(filePath);
2571
+ };
2572
+ var init_stylePreprocessor = __esm(() => {
2573
+ STYLE_EXTENSION_PATTERN = /\.(s[ac]ss|less)$/i;
2574
+ STYLE_MODULE_EXTENSION_PATTERN = /\.module\.(s[ac]ss|less)$/i;
2575
+ STYLE_LANGUAGE_PATTERN = /^(s[ac]ss|less)$/i;
2576
+ importOptionalPeer = new Function("specifier", "return import(specifier)");
2577
+ stylePreprocessorPlugin = {
2578
+ name: "absolute-style-preprocessor",
2579
+ setup(build) {
2580
+ const cssModuleSources = new Map;
2581
+ build.onResolve({ filter: /^absolute-style-module:/ }, ({ path }) => ({
2582
+ namespace: "absolute-style-module",
2583
+ path: path.slice("absolute-style-module:".length)
2584
+ }));
2585
+ build.onLoad({ filter: /\.module\.css$/i, namespace: "absolute-style-module" }, async ({ path }) => {
2586
+ const sourcePath = cssModuleSources.get(path);
2587
+ if (!sourcePath) {
2588
+ throw new Error(`Unable to resolve CSS module source for ${path}`);
2589
+ }
2590
+ return {
2591
+ contents: await compileStyleSource(sourcePath),
2592
+ loader: "css"
2593
+ };
2594
+ });
2595
+ build.onLoad({ filter: STYLE_EXTENSION_PATTERN }, async ({ path }) => {
2596
+ if (isStyleModulePath(path)) {
2597
+ const cssModulePath = path.replace(STYLE_EXTENSION_PATTERN, ".css");
2598
+ cssModuleSources.set(cssModulePath, path);
2599
+ return {
2600
+ contents: `export { default } from ${JSON.stringify(`absolute-style-module:${cssModulePath}`)};`,
2601
+ loader: "js"
2602
+ };
2603
+ }
2604
+ return {
2605
+ contents: await compileStyleSource(path),
2606
+ loader: "css"
2607
+ };
2608
+ });
2609
+ }
2610
+ };
2611
+ });
2612
+
2504
2613
  // src/core/svelteServerModule.ts
2505
2614
  import { mkdir, readdir } from "fs/promises";
2506
- import { basename as basename2, dirname as dirname2, extname, join as join3, relative, resolve as resolve4 } from "path";
2615
+ import { basename as basename2, dirname as dirname3, extname as extname2, join as join3, relative, resolve as resolve4 } from "path";
2507
2616
  var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, ensureRelativeImportPath = (from, target) => {
2508
- const importPath = relative(dirname2(from), target).replace(/\\/g, "/");
2617
+ const importPath = relative(dirname3(from), target).replace(/\\/g, "/");
2509
2618
  return importPath.startsWith(".") ? importPath : `./${importPath}`;
2510
2619
  }, processDirectoryEntries = (entries, dir, targetFileName, stack) => {
2511
2620
  for (const entry of entries) {
@@ -2551,7 +2660,7 @@ var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, e
2551
2660
  if (!spec.startsWith(".")) {
2552
2661
  return null;
2553
2662
  }
2554
- const basePath = resolve4(dirname2(from), spec);
2663
+ const basePath = resolve4(dirname3(from), spec);
2555
2664
  const candidates = [
2556
2665
  basePath,
2557
2666
  `${basePath}.ts`,
@@ -2583,8 +2692,8 @@ var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, e
2583
2692
  if (!spec.startsWith(".")) {
2584
2693
  return null;
2585
2694
  }
2586
- const explicitPath = resolve4(dirname2(from), spec);
2587
- if (extname(explicitPath) === ".svelte") {
2695
+ const explicitPath = resolve4(dirname3(from), spec);
2696
+ if (extname2(explicitPath) === ".svelte") {
2588
2697
  return explicitPath;
2589
2698
  }
2590
2699
  const candidate = `${explicitPath}.svelte`;
@@ -2612,7 +2721,7 @@ var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, e
2612
2721
  const { compile, preprocess } = await import("svelte/compiler");
2613
2722
  const loweredAwaitSource = lowerSvelteAwaitSlotSyntax(source);
2614
2723
  const loweredSource = lowerSvelteIslandSyntax(loweredAwaitSource.code, "server");
2615
- const preprocessed = await preprocess(loweredSource.code, {});
2724
+ const preprocessed = await preprocess(loweredSource.code, createSvelteStylePreprocessor());
2616
2725
  let transpiled = sourcePath.endsWith(".ts") || sourcePath.endsWith(".svelte.ts") ? transpiler.transformSync(preprocessed.code) : preprocessed.code;
2617
2726
  const childImportSpecs = Array.from(transpiled.matchAll(/from\s+['"]([^'"]+)['"]/g)).map((match) => match[1]).filter((value) => value !== undefined);
2618
2727
  const resolvedChildModules = await Promise.all(childImportSpecs.map((spec) => resolveSvelteImport(spec, resolutionSourcePath)));
@@ -2662,7 +2771,7 @@ var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, e
2662
2771
  compiledCode = compiledCode.replaceAll(spec, resolvedModuleImport);
2663
2772
  }
2664
2773
  const compiledModulePath = getCachedModulePath(sourcePath);
2665
- await mkdir(dirname2(compiledModulePath), { recursive: true });
2774
+ await mkdir(dirname3(compiledModulePath), { recursive: true });
2666
2775
  await writeIfChanged(compiledModulePath, compiledCode);
2667
2776
  compiledModuleCache.set(sourcePath, compiledModulePath);
2668
2777
  return compiledModulePath;
@@ -2671,6 +2780,7 @@ var init_svelteServerModule = __esm(() => {
2671
2780
  init_resolvePackageImport();
2672
2781
  init_lowerIslandSyntax();
2673
2782
  init_lowerAwaitSlotSyntax();
2783
+ init_stylePreprocessor();
2674
2784
  serverCacheRoot = join3(process.cwd(), ".absolutejs", "islands", "svelte");
2675
2785
  compiledModuleCache = new Map;
2676
2786
  originalSourcePathCache = new Map;
@@ -2837,7 +2947,7 @@ import {
2837
2947
  rmSync,
2838
2948
  writeFileSync as writeFileSync2
2839
2949
  } from "fs";
2840
- import { dirname as dirname3, extname as extname2, join as join4, relative as relative2, resolve as resolve5 } from "path";
2950
+ import { dirname as dirname4, extname as extname3, join as join4, relative as relative2, resolve as resolve5 } from "path";
2841
2951
  import ts from "typescript";
2842
2952
  var frameworks, isRecord4 = (value) => typeof value === "object" && value !== null, resolveRegistryExport = (mod) => {
2843
2953
  if (isRecord4(mod.islandRegistry))
@@ -2846,13 +2956,13 @@ var frameworks, isRecord4 = (value) => typeof value === "object" && value !== nu
2846
2956
  return mod.default;
2847
2957
  throw new Error("Island registry module must export `islandRegistry` or a default registry object.");
2848
2958
  }, normalizeImportPath = (wrapperPath, targetPath) => {
2849
- const importPath = relative2(dirname3(wrapperPath), targetPath).replace(/\\/g, "/");
2959
+ const importPath = relative2(dirname4(wrapperPath), targetPath).replace(/\\/g, "/");
2850
2960
  return importPath.startsWith(".") ? importPath : `./${importPath}`;
2851
2961
  }, isIdentifier = (value) => /^[A-Za-z_$][A-Za-z0-9_$]*$/.test(value), resolveIslandSourcePath = (registryPath, sourcePath) => {
2852
2962
  if (sourcePath.startsWith("file://")) {
2853
2963
  return new URL(sourcePath).pathname;
2854
2964
  }
2855
- return resolve5(dirname3(registryPath), sourcePath);
2965
+ return resolve5(dirname4(registryPath), sourcePath);
2856
2966
  }, getObjectPropertyName = (name) => {
2857
2967
  if (ts.isIdentifier(name) || ts.isStringLiteral(name)) {
2858
2968
  return name.text;
@@ -2966,7 +3076,7 @@ export default component;
2966
3076
  return /\.svelte(?:\.(?:ts|js))?$/.test(sourcePath);
2967
3077
  }
2968
3078
  if (framework === "vue") {
2969
- return extname2(sourcePath) === ".vue";
3079
+ return extname3(sourcePath) === ".vue";
2970
3080
  }
2971
3081
  if (framework === "angular") {
2972
3082
  return /\.(?:ts|js|tsx|jsx|mjs|cjs)$/.test(sourcePath);
@@ -3002,7 +3112,7 @@ export default component;
3002
3112
  const source = buildReference ? resolveIslandSourcePath(buildInfo.resolvedRegistryPath, buildReference.source) : null;
3003
3113
  const compiledSourcePath = source && shouldUseCompiledClientPath(definition.framework, source) ? clientPathMaps[definition.framework]?.get(source) : undefined;
3004
3114
  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);
3005
- mkdirSync(dirname3(entryPath), { recursive: true });
3115
+ mkdirSync(dirname4(entryPath), { recursive: true });
3006
3116
  writeFileSync2(entryPath, entrySource);
3007
3117
  entries.push({
3008
3118
  component: definition.component,
@@ -3362,7 +3472,7 @@ var init_sourceMetadata = __esm(() => {
3362
3472
 
3363
3473
  // src/islands/pageMetadata.ts
3364
3474
  import { readFileSync as readFileSync4 } from "fs";
3365
- import { dirname as dirname4, resolve as resolve8 } from "path";
3475
+ import { dirname as dirname5, resolve as resolve8 } from "path";
3366
3476
  var pagePatterns, getPageDirs = (config) => [
3367
3477
  { dir: config.angularDirectory, framework: "angular" },
3368
3478
  { dir: config.reactDirectory, framework: "react" },
@@ -3381,7 +3491,7 @@ var pagePatterns, getPageDirs = (config) => [
3381
3491
  const source = definition.buildReference?.source;
3382
3492
  if (!source)
3383
3493
  continue;
3384
- const resolvedSource = source.startsWith("file://") ? new URL(source).pathname : resolve8(dirname4(buildInfo.resolvedRegistryPath), source);
3494
+ const resolvedSource = source.startsWith("file://") ? new URL(source).pathname : resolve8(dirname5(buildInfo.resolvedRegistryPath), source);
3385
3495
  lookup.set(`${definition.framework}:${definition.component}`, resolve8(resolvedSource));
3386
3496
  }
3387
3497
  return lookup;
@@ -3460,7 +3570,7 @@ var exports_generateManifest = {};
3460
3570
  __export(exports_generateManifest, {
3461
3571
  generateManifest: () => generateManifest
3462
3572
  });
3463
- import { extname as extname3 } from "path";
3573
+ import { extname as extname4 } from "path";
3464
3574
  var getManifestKey = (folder, pascalName, isClientComponent, isReact, isVue, isSvelte, isAngular) => {
3465
3575
  if (folder === "indexes")
3466
3576
  return `${pascalName}Index`;
@@ -3496,7 +3606,7 @@ var getManifestKey = (folder, pascalName, isClientComponent, isReact, isVue, isS
3496
3606
  if (!baseName)
3497
3607
  return manifest;
3498
3608
  const pascalName = toPascal(baseName);
3499
- const ext = extname3(fileWithHash);
3609
+ const ext = extname4(fileWithHash);
3500
3610
  const islandIndex = segments.findIndex((seg) => seg === "islands");
3501
3611
  if (ext === ".css") {
3502
3612
  const cssKey = getCssKey(pascalName, segments);
@@ -3989,16 +4099,18 @@ var scanCssEntryPoints = async (dir, ignore) => {
3989
4099
  if (!existsSync7(dir))
3990
4100
  return [];
3991
4101
  const entryPaths = [];
3992
- const glob = new Glob4("**/*.css");
4102
+ const glob = new Glob4("**/*.{css,scss,sass,less}");
3993
4103
  for await (const file2 of glob.scan({ absolute: true, cwd: dir })) {
3994
4104
  const normalized = normalizePath(file2);
3995
- if (ignore?.some((pattern) => normalized.includes(pattern)))
4105
+ if (isStyleModulePath(normalized) || ignore?.some((pattern) => normalized.includes(pattern)))
3996
4106
  continue;
3997
4107
  entryPaths.push(file2);
3998
4108
  }
3999
4109
  return entryPaths;
4000
4110
  };
4001
- var init_scanCssEntryPoints = () => {};
4111
+ var init_scanCssEntryPoints = __esm(() => {
4112
+ init_stylePreprocessor();
4113
+ });
4002
4114
 
4003
4115
  // src/utils/imageProcessing.ts
4004
4116
  import { existsSync as existsSync8, mkdirSync as mkdirSync3, readFileSync as readFileSync5, writeFileSync as writeFileSync4 } from "fs";
@@ -4170,7 +4282,7 @@ var exports_optimizeHtmlImages = {};
4170
4282
  __export(exports_optimizeHtmlImages, {
4171
4283
  optimizeHtmlImages: () => optimizeHtmlImages
4172
4284
  });
4173
- import { readFile, writeFile as writeFile2 } from "fs/promises";
4285
+ import { readFile as readFile2, writeFile as writeFile2 } from "fs/promises";
4174
4286
  var IMG_REGEX, getAttr = (attrs, name) => {
4175
4287
  const regex = new RegExp(`${name}\\s*=\\s*["']([^"']*)["']`, "i");
4176
4288
  const match = regex.exec(attrs);
@@ -4216,7 +4328,7 @@ var IMG_REGEX, getAttr = (attrs, name) => {
4216
4328
  }, optimizeHtmlImages = async (directory, config) => {
4217
4329
  const htmlFiles = await scanEntryPoints(directory, "*.html");
4218
4330
  const tasks = htmlFiles.map(async (filePath) => {
4219
- const original = await readFile(filePath, "utf8");
4331
+ const original = await readFile2(filePath, "utf8");
4220
4332
  if (!original.includes("data-optimized"))
4221
4333
  return;
4222
4334
  const updated = original.replace(IMG_REGEX, (match, before, after) => transformImgTag(match, before, after, config));
@@ -4255,7 +4367,7 @@ var init_telemetry = __esm(() => {
4255
4367
  // src/cli/telemetryEvent.ts
4256
4368
  import { existsSync as existsSync10, readFileSync as readFileSync7 } from "fs";
4257
4369
  import { arch, platform } from "os";
4258
- import { dirname as dirname5, join as join8, parse } from "path";
4370
+ import { dirname as dirname6, join as join8, parse } from "path";
4259
4371
  var checkCandidate = (candidate) => {
4260
4372
  if (!existsSync10(candidate)) {
4261
4373
  return null;
@@ -4280,7 +4392,7 @@ var checkCandidate = (candidate) => {
4280
4392
  if (version) {
4281
4393
  return version;
4282
4394
  }
4283
- dir = dirname5(dir);
4395
+ dir = dirname6(dir);
4284
4396
  }
4285
4397
  return "unknown";
4286
4398
  }, sendTelemetryEvent = (event, payload) => {
@@ -4318,7 +4430,7 @@ var exports_updateAssetPaths = {};
4318
4430
  __export(exports_updateAssetPaths, {
4319
4431
  updateAssetPaths: () => updateAssetPaths
4320
4432
  });
4321
- import { readFile as readFile2, writeFile as writeFile3 } from "fs/promises";
4433
+ import { readFile as readFile3, writeFile as writeFile3 } from "fs/promises";
4322
4434
  var replaceAssetRef = (match, prefix, dir, name, ext, suffix, manifest, filePath) => {
4323
4435
  if (/data-external(?:\s*=\s*["'][^"']*["'])?/i.test(match)) {
4324
4436
  return match;
@@ -4353,7 +4465,7 @@ var replaceAssetRef = (match, prefix, dir, name, ext, suffix, manifest, filePath
4353
4465
  const htmlFiles = await scanEntryPoints(directory, "*.html");
4354
4466
  const assetRegex = /((?:<script[^>]+src=|<link[^>]*?rel=["']stylesheet["'][^>]*?href=)["'])(?!\/?(?:.*\/)?htmx\.min\.js)(\/?(?:.*\/)?)([^./"']+)(?:\.[^."'/]+)?(\.(?:js|ts|css))(["'][^>]*>)/g;
4355
4467
  const tasks = htmlFiles.map(async (filePath) => {
4356
- const original = await readFile2(filePath, "utf8");
4468
+ const original = await readFile3(filePath, "utf8");
4357
4469
  const updated = original.replace(assetRegex, (match, prefix, dir, name, ext, suffix) => replaceAssetRef(match, prefix, dir, name, ext, suffix, manifest, filePath));
4358
4470
  await writeFile3(filePath, updated, "utf8");
4359
4471
  });
@@ -4568,7 +4680,7 @@ var devVendorPaths = null, getDevVendorPaths = () => devVendorPaths, setDevVendo
4568
4680
 
4569
4681
  // src/build/angularLinkerPlugin.ts
4570
4682
  import { existsSync as existsSync12, mkdirSync as mkdirSync5, readFileSync as readFileSync8, writeFileSync as writeFileSync6 } from "fs";
4571
- import { dirname as dirname6, join as join9, relative as relative4, resolve as resolve13 } from "path";
4683
+ import { dirname as dirname7, join as join9, relative as relative4, resolve as resolve13 } from "path";
4572
4684
  import { createHash } from "crypto";
4573
4685
  var CACHE_DIR, angularLinkerPlugin;
4574
4686
  var init_angularLinkerPlugin = __esm(() => {
@@ -4608,7 +4720,7 @@ var init_angularLinkerPlugin = __esm(() => {
4608
4720
  const mod = await import(linkerSpecifier);
4609
4721
  linkerPlugin = mod.createEs2015LinkerPlugin({
4610
4722
  fileSystem: {
4611
- dirname: dirname6,
4723
+ dirname: dirname7,
4612
4724
  exists: existsSync12,
4613
4725
  readFile: readFileSync8,
4614
4726
  relative: relative4,
@@ -4790,10 +4902,10 @@ __export(exports_compileSvelte, {
4790
4902
  import { existsSync as existsSync13 } from "fs";
4791
4903
  import { mkdir as mkdir2, stat } from "fs/promises";
4792
4904
  import {
4793
- dirname as dirname7,
4905
+ dirname as dirname8,
4794
4906
  join as join11,
4795
4907
  basename as basename5,
4796
- extname as extname4,
4908
+ extname as extname5,
4797
4909
  resolve as resolve16,
4798
4910
  relative as relative6,
4799
4911
  sep as sep2
@@ -4839,7 +4951,7 @@ var resolveDevClientDir2 = () => {
4839
4951
  }, resolveRelativeModule2 = async (spec, from) => {
4840
4952
  if (!spec.startsWith("."))
4841
4953
  return null;
4842
- const basePath = resolve16(dirname7(from), spec);
4954
+ const basePath = resolve16(dirname8(from), spec);
4843
4955
  const candidates = [
4844
4956
  basePath,
4845
4957
  `${basePath}.ts`,
@@ -4866,7 +4978,7 @@ var resolveDevClientDir2 = () => {
4866
4978
  const resolved = resolvePackageImport(spec);
4867
4979
  return resolved && /\.svelte(\.(?:ts|js))?$/.test(resolved) ? resolved : null;
4868
4980
  }
4869
- const basePath = resolve16(dirname7(from), spec);
4981
+ const basePath = resolve16(dirname8(from), spec);
4870
4982
  const explicit = /\.(svelte|svelte\.(?:ts|js))$/.test(basePath);
4871
4983
  if (!explicit) {
4872
4984
  const extensions = [".svelte", ".svelte.ts", ".svelte.js"];
@@ -4921,12 +5033,13 @@ var resolveDevClientDir2 = () => {
4921
5033
  const loweredServerSource = isModule ? loweredAwaitServerSource : lowerSvelteIslandSyntax(loweredAwaitServerSource.code, "server");
4922
5034
  const loweredClientSource = isModule ? loweredAwaitClientSource : lowerSvelteIslandSyntax(loweredAwaitClientSource.code, "client");
4923
5035
  const transformedByLowering = loweredAwaitServerSource.transformed || loweredAwaitClientSource.transformed || loweredServerSource.transformed || loweredClientSource.transformed;
4924
- const preprocessedServer = isModule ? loweredServerSource.code : (await preprocess(loweredServerSource.code, {})).code;
4925
- const preprocessedClient = isModule ? loweredClientSource.code : (await preprocess(loweredClientSource.code, {})).code;
5036
+ const svelteStylePreprocessor = createSvelteStylePreprocessor();
5037
+ const preprocessedServer = isModule ? loweredServerSource.code : (await preprocess(loweredServerSource.code, svelteStylePreprocessor)).code;
5038
+ const preprocessedClient = isModule ? loweredClientSource.code : (await preprocess(loweredClientSource.code, svelteStylePreprocessor)).code;
4926
5039
  const transpiledServer = src.endsWith(".ts") || src.endsWith(".svelte.ts") ? transpiler2.transformSync(preprocessedServer) : preprocessedServer;
4927
5040
  const transpiledClient = src.endsWith(".ts") || src.endsWith(".svelte.ts") ? transpiler2.transformSync(preprocessedClient) : preprocessedClient;
4928
- const rawRel = dirname7(relative6(svelteRoot, src)).replace(/\\/g, "/");
4929
- const relDir = rawRel.startsWith("..") ? `_ext/${relative6(process.cwd(), dirname7(src)).replace(/\\/g, "/")}` : rawRel;
5041
+ const rawRel = dirname8(relative6(svelteRoot, src)).replace(/\\/g, "/");
5042
+ const relDir = rawRel.startsWith("..") ? `_ext/${relative6(process.cwd(), dirname8(src)).replace(/\\/g, "/")}` : rawRel;
4930
5043
  const baseName = basename5(src).replace(/\.svelte(\.(ts|js))?$/, "");
4931
5044
  const importPaths = Array.from(transpiledServer.matchAll(/from\s+['"]([^'"]+)['"]/g)).map((match) => match[1]).filter((path) => path !== undefined);
4932
5045
  const resolvedModuleImports = await Promise.all(importPaths.map((importPath) => resolveRelativeModule2(importPath, src)));
@@ -4935,8 +5048,8 @@ var resolveDevClientDir2 = () => {
4935
5048
  const childBuilt = await Promise.all(childSources.map((child) => build2(child)));
4936
5049
  const hasAwaitSlotFromChildren = childBuilt.some((child) => child.hasAwaitSlot);
4937
5050
  const externalRewrites = new Map;
4938
- const ssrOutputDir = dirname7(join11(serverDir, relDir, `${baseName}.js`));
4939
- const clientOutputDir = dirname7(join11(clientDir, relDir, `${baseName}.js`));
5051
+ const ssrOutputDir = dirname8(join11(serverDir, relDir, `${baseName}.js`));
5052
+ const clientOutputDir = dirname8(join11(clientDir, relDir, `${baseName}.js`));
4940
5053
  for (let idx = 0;idx < importPaths.length; idx++) {
4941
5054
  const rawSpec = importPaths[idx];
4942
5055
  if (!rawSpec)
@@ -5005,8 +5118,8 @@ var resolveDevClientDir2 = () => {
5005
5118
  const ssrPath = join11(serverDir, relDir, `${baseName}.js`);
5006
5119
  const clientPath = join11(clientDir, relDir, `${baseName}.js`);
5007
5120
  await Promise.all([
5008
- mkdir2(dirname7(ssrPath), { recursive: true }),
5009
- mkdir2(dirname7(clientPath), { recursive: true })
5121
+ mkdir2(dirname8(ssrPath), { recursive: true }),
5122
+ mkdir2(dirname8(clientPath), { recursive: true })
5010
5123
  ]);
5011
5124
  if (isModule) {
5012
5125
  const bundle = rewriteExternalImports(generate("client"), "client");
@@ -5033,10 +5146,10 @@ var resolveDevClientDir2 = () => {
5033
5146
  };
5034
5147
  const roots = await Promise.all(entryPoints.map(build2));
5035
5148
  await Promise.all(roots.map(async ({ client: client2, hasAwaitSlot }) => {
5036
- const relClientDir = dirname7(relative6(clientDir, client2));
5037
- const name = basename5(client2, extname4(client2));
5149
+ const relClientDir = dirname8(relative6(clientDir, client2));
5150
+ const name = basename5(client2, extname5(client2));
5038
5151
  const indexPath = join11(indexDir, relClientDir, `${name}.js`);
5039
- const importRaw = relative6(dirname7(indexPath), client2).split(sep2).join("/");
5152
+ const importRaw = relative6(dirname8(indexPath), client2).split(sep2).join("/");
5040
5153
  const importPath = importRaw.startsWith(".") || importRaw.startsWith("/") ? importRaw : `./${importRaw}`;
5041
5154
  const hmrImports = isDev2 ? `window.__HMR_FRAMEWORK__ = "svelte";
5042
5155
  import "${hmrClientPath3}";
@@ -5107,13 +5220,13 @@ if (typeof window !== "undefined") {
5107
5220
  setTimeout(releaseStreamingSlots, 0);
5108
5221
  }
5109
5222
  }`;
5110
- await mkdir2(dirname7(indexPath), { recursive: true });
5223
+ await mkdir2(dirname8(indexPath), { recursive: true });
5111
5224
  return write(indexPath, bootstrap);
5112
5225
  }));
5113
5226
  return {
5114
5227
  svelteClientPaths: roots.map(({ client: client2 }) => client2),
5115
5228
  svelteIndexPaths: roots.map(({ client: client2 }) => {
5116
- const rel = dirname7(relative6(clientDir, client2));
5229
+ const rel = dirname8(relative6(clientDir, client2));
5117
5230
  return join11(indexDir, rel, basename5(client2));
5118
5231
  }),
5119
5232
  svelteServerPaths: roots.map(({ ssr }) => ssr)
@@ -5123,6 +5236,7 @@ var init_compileSvelte = __esm(() => {
5123
5236
  init_constants();
5124
5237
  init_resolvePackageImport();
5125
5238
  init_sourceMetadata();
5239
+ init_stylePreprocessor();
5126
5240
  init_lowerIslandSyntax();
5127
5241
  init_lowerAwaitSlotSyntax();
5128
5242
  init_renderToReadableStream();
@@ -5144,7 +5258,7 @@ __export(exports_compileVue, {
5144
5258
  });
5145
5259
  import { existsSync as existsSync14 } from "fs";
5146
5260
  import { mkdir as mkdir3 } from "fs/promises";
5147
- import { basename as basename6, dirname as dirname8, join as join12, relative as relative7, resolve as resolve17 } from "path";
5261
+ import { basename as basename6, dirname as dirname9, join as join12, relative as relative7, resolve as resolve17 } from "path";
5148
5262
  var {file: file3, write: write2, Transpiler: Transpiler2 } = globalThis.Bun;
5149
5263
  var resolveDevClientDir3 = () => {
5150
5264
  const projectRoot = process.cwd();
@@ -5255,7 +5369,7 @@ var resolveDevClientDir3 = () => {
5255
5369
  const packageComponentPaths = Array.from(resolvedPackageVueImports.entries());
5256
5370
  const helperModulePaths = importPaths.filter((path) => path.startsWith(".") && !path.endsWith(".vue"));
5257
5371
  const childBuildResults = await Promise.all([
5258
- ...childComponentPaths.map((relativeChildPath) => compileVueFile(resolve17(dirname8(sourceFilePath), relativeChildPath), outputDirs, cacheMap, false, vueRootDir, compiler)),
5372
+ ...childComponentPaths.map((relativeChildPath) => compileVueFile(resolve17(dirname9(sourceFilePath), relativeChildPath), outputDirs, cacheMap, false, vueRootDir, compiler)),
5259
5373
  ...packageComponentPaths.map(([, absolutePath]) => compileVueFile(absolutePath, outputDirs, cacheMap, false, vueRootDir, compiler))
5260
5374
  ]);
5261
5375
  const hasScript = descriptor.script || descriptor.scriptSetup;
@@ -5287,13 +5401,13 @@ var resolveDevClientDir3 = () => {
5287
5401
  ssr,
5288
5402
  ssrCssVars: descriptor.cssVars
5289
5403
  }).code.replace(/(['"])(\.{1,2}\/[^'"]+)(['"])/g, (_, quoteStart, relativeImport, quoteEnd) => `${quoteStart}${toJs(relativeImport)}${quoteEnd}`);
5290
- const localCss = descriptor.styles.map((styleBlock) => compiler.compileStyle({
5404
+ const localCss = await Promise.all(descriptor.styles.map(async (styleBlock) => compiler.compileStyle({
5291
5405
  filename: sourceFilePath,
5292
5406
  id: componentId,
5293
5407
  scoped: styleBlock.scoped,
5294
- source: styleBlock.content,
5408
+ source: styleBlock.lang ? await compileStyleSource(sourceFilePath, styleBlock.content, styleBlock.lang) : styleBlock.content,
5295
5409
  trim: true
5296
- }).code);
5410
+ }).code));
5297
5411
  const allCss = [
5298
5412
  ...localCss,
5299
5413
  ...childBuildResults.flatMap((result2) => result2.cssCodes)
@@ -5301,7 +5415,7 @@ var resolveDevClientDir3 = () => {
5301
5415
  let cssOutputPaths = [];
5302
5416
  if (isEntryPoint && allCss.length) {
5303
5417
  const cssOutputFile = join12(outputDirs.css, `${toKebab(fileBaseName)}-compiled.css`);
5304
- await mkdir3(dirname8(cssOutputFile), { recursive: true });
5418
+ await mkdir3(dirname9(cssOutputFile), { recursive: true });
5305
5419
  await write2(cssOutputFile, allCss.join(`
5306
5420
  `));
5307
5421
  cssOutputPaths = [cssOutputFile];
@@ -5333,7 +5447,7 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
5333
5447
  const serverCode = assembleModule(generateRenderFunction(true), "ssrRender", false) + islandMetadataExports;
5334
5448
  const clientOutputPath = join12(outputDirs.client, `${relativeWithoutExtension}.js`);
5335
5449
  const serverOutputPath = join12(outputDirs.server, `${relativeWithoutExtension}.js`);
5336
- const relDir = dirname8(relativeFilePath);
5450
+ const relDir = dirname9(relativeFilePath);
5337
5451
  const relDepth = relDir === "." ? 0 : relDir.split("/").length;
5338
5452
  const adjustImports = (code) => code.replace(/(from\s+['"])(\.\.\/(?:\.\.\/)*)/g, (_, prefix, dots) => {
5339
5453
  const upCount = dots.split("/").length - 1;
@@ -5345,15 +5459,15 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
5345
5459
  let result2 = code;
5346
5460
  for (const [bareImport, paths] of packageImportRewrites) {
5347
5461
  const targetPath = mode === "server" ? paths.server : paths.client;
5348
- let rel = relative7(dirname8(outputPath), targetPath).replace(/\\/g, "/");
5462
+ let rel = relative7(dirname9(outputPath), targetPath).replace(/\\/g, "/");
5349
5463
  if (!rel.startsWith("."))
5350
5464
  rel = `./${rel}`;
5351
5465
  result2 = result2.replaceAll(bareImport, rel);
5352
5466
  }
5353
5467
  return result2;
5354
5468
  };
5355
- await mkdir3(dirname8(clientOutputPath), { recursive: true });
5356
- await mkdir3(dirname8(serverOutputPath), { recursive: true });
5469
+ await mkdir3(dirname9(clientOutputPath), { recursive: true });
5470
+ await mkdir3(dirname9(serverOutputPath), { recursive: true });
5357
5471
  await write2(clientOutputPath, rewritePackageImports(adjustImports(clientCode), clientOutputPath, "client"));
5358
5472
  await write2(serverOutputPath, rewritePackageImports(adjustImports(serverCode), serverOutputPath, "server"));
5359
5473
  const result = {
@@ -5363,7 +5477,7 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
5363
5477
  hmrId,
5364
5478
  serverPath: serverOutputPath,
5365
5479
  tsHelperPaths: [
5366
- ...helperModulePaths.map((helper) => resolve17(dirname8(sourceFilePath), helper.endsWith(".ts") ? helper : `${helper}.ts`)),
5480
+ ...helperModulePaths.map((helper) => resolve17(dirname9(sourceFilePath), helper.endsWith(".ts") ? helper : `${helper}.ts`)),
5367
5481
  ...childBuildResults.flatMap((child) => child.tsHelperPaths)
5368
5482
  ]
5369
5483
  };
@@ -5395,14 +5509,14 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
5395
5509
  const entryBaseName = basename6(entryPath, ".vue");
5396
5510
  const indexOutputFile = join12(indexOutputDir, `${entryBaseName}.js`);
5397
5511
  const clientOutputFile = join12(clientOutputDir, relative7(vueRootDir, entryPath).replace(/\\/g, "/").replace(/\.vue$/, ".js"));
5398
- await mkdir3(dirname8(indexOutputFile), { recursive: true });
5512
+ await mkdir3(dirname9(indexOutputFile), { recursive: true });
5399
5513
  const vueHmrImports = isDev2 ? [
5400
5514
  `window.__HMR_FRAMEWORK__ = "vue";`,
5401
5515
  `import "${hmrClientPath4}";`
5402
5516
  ] : [];
5403
5517
  await write2(indexOutputFile, [
5404
5518
  ...vueHmrImports,
5405
- `import Comp from "${relative7(dirname8(indexOutputFile), clientOutputFile).replace(/\\/g, "/")}";`,
5519
+ `import Comp from "${relative7(dirname9(indexOutputFile), clientOutputFile).replace(/\\/g, "/")}";`,
5406
5520
  'import { createSSRApp, createApp } from "vue";',
5407
5521
  "",
5408
5522
  "// HMR State Preservation: Check for preserved state from HMR",
@@ -5525,8 +5639,8 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
5525
5639
  const relativeJsPath = relative7(vueRootDir, tsPath).replace(/\.ts$/, ".js");
5526
5640
  const outClientPath = join12(clientOutputDir, relativeJsPath);
5527
5641
  const outServerPath = join12(serverOutputDir, relativeJsPath);
5528
- await mkdir3(dirname8(outClientPath), { recursive: true });
5529
- await mkdir3(dirname8(outServerPath), { recursive: true });
5642
+ await mkdir3(dirname9(outClientPath), { recursive: true });
5643
+ await mkdir3(dirname9(outServerPath), { recursive: true });
5530
5644
  await write2(outClientPath, transpiledCode);
5531
5645
  await write2(outServerPath, transpiledCode);
5532
5646
  }));
@@ -5542,6 +5656,7 @@ var init_compileVue = __esm(() => {
5542
5656
  init_constants();
5543
5657
  init_resolvePackageImport();
5544
5658
  init_sourceMetadata();
5659
+ init_stylePreprocessor();
5545
5660
  devClientDir3 = resolveDevClientDir3();
5546
5661
  hmrClientPath4 = join12(devClientDir3, "hmrClient.ts").replace(/\\/g, "/");
5547
5662
  transpiler3 = new Transpiler2({ loader: "ts", target: "browser" });
@@ -6023,7 +6138,7 @@ __export(exports_compileAngular, {
6023
6138
  compileAngular: () => compileAngular
6024
6139
  });
6025
6140
  import { existsSync as existsSync15, readFileSync as readFileSync9, promises as fs } from "fs";
6026
- import { join as join13, basename as basename7, sep as sep3, dirname as dirname9, resolve as resolve18, relative as relative8 } from "path";
6141
+ import { join as join13, basename as basename7, sep as sep3, dirname as dirname10, resolve as resolve18, relative as relative8 } from "path";
6027
6142
  import ts2 from "typescript";
6028
6143
  import { createHash as createHash2 } from "crypto";
6029
6144
  var computeConfigHash = () => {
@@ -6087,11 +6202,7 @@ ${registrations}
6087
6202
  return fileName;
6088
6203
  }, compileAngularFile = async (inputPath, outDir) => {
6089
6204
  const islandMetadataExports = buildIslandMetadataExports(readFileSync9(inputPath, "utf-8"));
6090
- const {
6091
- readConfiguration,
6092
- performCompilation,
6093
- EmitFlags
6094
- } = await import("@angular/compiler-cli");
6205
+ const { readConfiguration, performCompilation, EmitFlags } = await import("@angular/compiler-cli");
6095
6206
  const configHash = computeConfigHash();
6096
6207
  const cached = globalThis.__angularCompilerCache;
6097
6208
  let host;
@@ -6104,7 +6215,7 @@ ${registrations}
6104
6215
  cached.lastUsed = Date.now();
6105
6216
  } else {
6106
6217
  const tsPath = __require.resolve("typescript");
6107
- const tsRootDir = dirname9(tsPath);
6218
+ const tsRootDir = dirname10(tsPath);
6108
6219
  tsLibDir = tsRootDir.endsWith("lib") ? tsRootDir : resolve18(tsRootDir, "lib");
6109
6220
  const config = readConfiguration("./tsconfig.json");
6110
6221
  options = {
@@ -6170,7 +6281,7 @@ ${registrations}
6170
6281
  const cached2 = aotTransformCache.get(resolvedPath);
6171
6282
  if (cached2 !== undefined)
6172
6283
  return cached2;
6173
- const transformed = inlineTemplateAndLowerDeferSync(source, dirname9(resolvedPath)).source;
6284
+ const transformed = inlineTemplateAndLowerDeferSync(source, dirname10(resolvedPath)).source;
6174
6285
  aotTransformCache.set(resolvedPath, transformed);
6175
6286
  return transformed;
6176
6287
  };
@@ -6212,7 +6323,7 @@ ${registrations}
6212
6323
  processedContent += islandMetadataExports;
6213
6324
  return { content: processedContent, target };
6214
6325
  });
6215
- await Promise.all(entries.map(({ target }) => fs.mkdir(dirname9(target), { recursive: true })));
6326
+ await Promise.all(entries.map(({ target }) => fs.mkdir(dirname10(target), { recursive: true })));
6216
6327
  await Promise.all(entries.map(({ target, content }) => fs.writeFile(target, content, "utf-8")));
6217
6328
  return entries.map(({ target }) => target);
6218
6329
  }, jitContentCache, wrapperOutputCache, escapeTemplateContent = (content) => content.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$\{/g, "\\${"), resolveAngularDeferImportSpecifier = () => {
@@ -6347,7 +6458,7 @@ ${fields}
6347
6458
  }, readAndEscapeFile = async (filePath) => {
6348
6459
  if (!existsSync15(filePath))
6349
6460
  return null;
6350
- const content = await fs.readFile(filePath, "utf-8");
6461
+ const content = await compileStyleFileIfNeeded(filePath);
6351
6462
  return escapeTemplateContent(content);
6352
6463
  }, inlineTemplateAndLowerDefer = async (source, fileDir) => {
6353
6464
  const templateUrlMatch = source.match(/templateUrl\s*:\s*['"]([^'"]+)['"]/);
@@ -6501,9 +6612,9 @@ ${fields}
6501
6612
  if (!existsSync15(actualPath))
6502
6613
  return;
6503
6614
  let sourceCode = await fs.readFile(actualPath, "utf-8");
6504
- const inlined = await inlineResources(sourceCode, dirname9(actualPath));
6505
- sourceCode = inlineTemplateAndLowerDeferSync(inlined.source, dirname9(actualPath)).source;
6506
- const inputDir = dirname9(actualPath);
6615
+ const inlined = await inlineResources(sourceCode, dirname10(actualPath));
6616
+ sourceCode = inlineTemplateAndLowerDeferSync(inlined.source, dirname10(actualPath)).source;
6617
+ const inputDir = dirname10(actualPath);
6507
6618
  const relativeDir = inputDir.startsWith(baseDir) ? inputDir.substring(baseDir.length + 1) : inputDir;
6508
6619
  const fileBase = basename7(actualPath).replace(/\.ts$/, ".js");
6509
6620
  const targetDir = join13(outDir, relativeDir);
@@ -6531,7 +6642,7 @@ ${fields}
6531
6642
  allOutputs.push(targetPath);
6532
6643
  jitContentCache.set(cacheKey2, contentHash);
6533
6644
  }
6534
- const inputDirForResolve = dirname9(actualPath);
6645
+ const inputDirForResolve = dirname10(actualPath);
6535
6646
  await Promise.all(localImports.map((imp) => {
6536
6647
  const importPath = resolve18(inputDirForResolve, imp);
6537
6648
  return transpileFile(importPath);
@@ -6594,7 +6705,11 @@ ${fields}
6594
6705
  const cachedWrapper = wrapperOutputCache.get(resolvedEntry);
6595
6706
  const clientFile = join13(indexesDir, jsName);
6596
6707
  if (hmr && cachedWrapper && cachedWrapper.serverHash === serverContentHash && existsSync15(clientFile)) {
6597
- return { clientPath: clientFile, indexUnchanged: true, serverPath: rawServerFile };
6708
+ return {
6709
+ clientPath: clientFile,
6710
+ indexUnchanged: true,
6711
+ serverPath: rawServerFile
6712
+ };
6598
6713
  }
6599
6714
  let rewritten = original;
6600
6715
  if (!rewritten.includes(`import '@angular/compiler';`)) {
@@ -6751,8 +6866,15 @@ if (pageHasRawStreamingSlots) {
6751
6866
  const indexHash = Bun.hash(hydration).toString(BASE_36_RADIX);
6752
6867
  const indexUnchanged = cachedWrapper?.indexHash === indexHash;
6753
6868
  await fs.writeFile(clientFile, hydration, "utf-8");
6754
- wrapperOutputCache.set(resolvedEntry, { indexHash, serverHash: serverContentHash });
6755
- return { clientPath: clientFile, indexUnchanged, serverPath: rawServerFile };
6869
+ wrapperOutputCache.set(resolvedEntry, {
6870
+ indexHash,
6871
+ serverHash: serverContentHash
6872
+ });
6873
+ return {
6874
+ clientPath: clientFile,
6875
+ indexUnchanged,
6876
+ serverPath: rawServerFile
6877
+ };
6756
6878
  });
6757
6879
  const results = await Promise.all(compileTasks);
6758
6880
  const serverPaths = results.map((r) => r.serverPath);
@@ -6767,6 +6889,7 @@ var init_compileAngular = __esm(() => {
6767
6889
  init_constants();
6768
6890
  init_sourceMetadata();
6769
6891
  init_lowerDeferSyntax();
6892
+ init_stylePreprocessor();
6770
6893
  devClientDir4 = resolveDevClientDir4();
6771
6894
  hmrClientPath5 = join13(devClientDir4, "hmrClient.ts").replace(/\\/g, "/");
6772
6895
  hmrRuntimePath = join13(devClientDir4, "handlers", "angularRuntime.ts").replace(/\\/g, "/");
@@ -7104,7 +7227,7 @@ import {
7104
7227
  statSync,
7105
7228
  writeFileSync as writeFileSync7
7106
7229
  } from "fs";
7107
- import { basename as basename8, dirname as dirname10, join as join18, relative as relative9, resolve as resolve20 } from "path";
7230
+ import { basename as basename8, dirname as dirname11, join as join18, relative as relative9, resolve as resolve20 } from "path";
7108
7231
  import { cwd, env as env3, exit } from "process";
7109
7232
  var {build: bunBuild6, Glob: Glob6 } = globalThis.Bun;
7110
7233
  var isDev2, collectConventionSourceFiles = (entry) => {
@@ -7484,7 +7607,7 @@ ${content.slice(firstUseIdx)}`;
7484
7607
  htmlDir,
7485
7608
  vueDir,
7486
7609
  angularDir,
7487
- islandBootstrapPath && dirname10(islandBootstrapPath)
7610
+ islandBootstrapPath && dirname11(islandBootstrapPath)
7488
7611
  ].filter((dir) => Boolean(dir));
7489
7612
  const clientRoot = isSingle ? sourceClientRoots[0] ?? projectRoot : commonAncestor(sourceClientRoots, projectRoot);
7490
7613
  const serverDirMap = [];
@@ -7552,7 +7675,7 @@ ${content.slice(firstUseIdx)}`;
7552
7675
  const proc = Bun.spawn(["bun", binPath, "-i", input, "-o", join18(buildPath, output)], { stderr: "pipe", stdout: "pipe" });
7553
7676
  await proc.exited;
7554
7677
  };
7555
- const tailwindPromise = tailwind && (!isIncremental || normalizedIncrementalFiles?.some((file4) => file4.endsWith(".css"))) ? compileTailwind(tailwind.input, tailwind.output) : undefined;
7678
+ const tailwindPromise = tailwind && (!isIncremental || normalizedIncrementalFiles?.some(isStylePath)) ? compileTailwind(tailwind.input, tailwind.output) : undefined;
7556
7679
  const emptyConventionResult = {
7557
7680
  conventions: undefined,
7558
7681
  pageFiles: []
@@ -7592,7 +7715,7 @@ ${content.slice(firstUseIdx)}`;
7592
7715
  if (notFoundFrameworks.length > 1) {
7593
7716
  logWarn(`Multiple frameworks define not-found convention files: ${notFoundFrameworks.join(", ")}. Only one will be used (priority: ${notFoundFrameworks[0]}). Remove not-found files from other frameworks to avoid ambiguity.`);
7594
7717
  }
7595
- const shouldIncludeHtmlAssets = !isIncremental || normalizedIncrementalFiles?.some((f) => f.includes("/html/") && (f.endsWith(".html") || f.endsWith(".css")));
7718
+ const shouldIncludeHtmlAssets = !isIncremental || normalizedIncrementalFiles?.some((f) => f.includes("/html/") && (f.endsWith(".html") || isStylePath(f)));
7596
7719
  const reactEntries = isIncremental && reactIndexesPath && reactPagesPath ? filterToIncrementalEntries(allReactEntries, (entry) => {
7597
7720
  if (entry.startsWith(resolve20(reactIndexesPath))) {
7598
7721
  const pageName = basename8(entry, ".tsx");
@@ -7816,7 +7939,7 @@ ${content.slice(firstUseIdx)}`;
7816
7939
  naming: `[dir]/[name].[hash].[ext]`,
7817
7940
  outdir: buildPath,
7818
7941
  ...hmr ? { jsx: { development: true }, reactFastRefresh: true } : {},
7819
- plugins: [],
7942
+ plugins: [stylePreprocessorPlugin],
7820
7943
  root: clientRoot,
7821
7944
  splitting: true,
7822
7945
  target: "browser",
@@ -7874,7 +7997,7 @@ ${content.slice(firstUseIdx)}`;
7874
7997
  format: "esm",
7875
7998
  naming: `[dir]/[name].[hash].[ext]`,
7876
7999
  outdir: serverOutDir,
7877
- plugins: [],
8000
+ plugins: [stylePreprocessorPlugin],
7878
8001
  root: serverRoot,
7879
8002
  target: "bun",
7880
8003
  throw: false,
@@ -7890,6 +8013,7 @@ ${content.slice(firstUseIdx)}`;
7890
8013
  naming: `[dir]/[name].[hash].[ext]`,
7891
8014
  outdir: buildPath,
7892
8015
  plugins: [
8016
+ stylePreprocessorPlugin,
7893
8017
  ...angularDir && !isDev2 ? [angularLinkerPlugin] : [],
7894
8018
  ...htmlScriptPlugin ? [htmlScriptPlugin] : []
7895
8019
  ],
@@ -7908,6 +8032,7 @@ ${content.slice(firstUseIdx)}`;
7908
8032
  naming: `[dir]/[name].[hash].[ext]`,
7909
8033
  outdir: buildPath,
7910
8034
  plugins: [
8035
+ stylePreprocessorPlugin,
7911
8036
  ...angularDir && !isDev2 ? [angularLinkerPlugin] : []
7912
8037
  ],
7913
8038
  root: islandEntryResult.generatedRoot,
@@ -7922,6 +8047,7 @@ ${content.slice(firstUseIdx)}`;
7922
8047
  outdir: stylesDir ? join18(buildPath, basename8(stylesDir)) : buildPath,
7923
8048
  root: stylesDir || clientRoot,
7924
8049
  target: "browser",
8050
+ plugins: [stylePreprocessorPlugin],
7925
8051
  throw: false
7926
8052
  }) : undefined,
7927
8053
  vueCssPaths.length > 0 ? bunBuild6({
@@ -8043,8 +8169,8 @@ ${content.slice(firstUseIdx)}`;
8043
8169
  manifest[toPascal(baseName)] = artifact.path;
8044
8170
  }
8045
8171
  const shouldCopyHtmx = !isIncremental || normalizedIncrementalFiles?.some((f) => f.includes("/htmx/") && f.endsWith(".html"));
8046
- const shouldUpdateHtmlAssetPaths = !isIncremental || normalizedIncrementalFiles?.some((f) => f.includes("/html/") && (f.endsWith(".html") || f.endsWith(".css")));
8047
- const shouldUpdateHtmxAssetPaths = !isIncremental || normalizedIncrementalFiles?.some((f) => f.includes("/htmx/") && (f.endsWith(".html") || f.endsWith(".css")));
8172
+ const shouldUpdateHtmlAssetPaths = !isIncremental || normalizedIncrementalFiles?.some((f) => f.includes("/html/") && (f.endsWith(".html") || isStylePath(f)));
8173
+ const shouldUpdateHtmxAssetPaths = !isIncremental || normalizedIncrementalFiles?.some((f) => f.includes("/htmx/") && (f.endsWith(".html") || isStylePath(f)));
8048
8174
  const hmrClientBundle = hmrClientBundlePromise ? await hmrClientBundlePromise : null;
8049
8175
  const injectHMRIntoHTMLFile = (filePath, framework) => {
8050
8176
  if (!hmrClientBundle)
@@ -8161,6 +8287,7 @@ var init_build = __esm(() => {
8161
8287
  init_scanEntryPoints();
8162
8288
  init_scanConventions();
8163
8289
  init_scanCssEntryPoints();
8290
+ init_stylePreprocessor();
8164
8291
  init_optimizeHtmlImages();
8165
8292
  init_updateAssetPaths();
8166
8293
  init_buildHMRClient();
@@ -8529,7 +8656,7 @@ var init_clientManager = __esm(() => {
8529
8656
 
8530
8657
  // src/dev/pathUtils.ts
8531
8658
  import { readdirSync } from "fs";
8532
- var detectFramework = (filePath, resolved) => {
8659
+ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
8533
8660
  if (shouldIgnorePath(filePath, resolved)) {
8534
8661
  return "ignored";
8535
8662
  }
@@ -8578,7 +8705,7 @@ var detectFramework = (filePath, resolved) => {
8578
8705
  return "angular";
8579
8706
  if (normalized.includes("/assets/"))
8580
8707
  return "assets";
8581
- if (normalized.endsWith(".css")) {
8708
+ if (STYLE_EXTENSION_PATTERN2.test(normalized)) {
8582
8709
  if (normalized.includes("/vue/") || normalized.includes("/vue-"))
8583
8710
  return "vue";
8584
8711
  if (normalized.includes("/svelte/") || normalized.includes("/svelte-"))
@@ -8661,6 +8788,7 @@ var detectFramework = (filePath, resolved) => {
8661
8788
  };
8662
8789
  var init_pathUtils = __esm(() => {
8663
8790
  init_commonAncestor();
8791
+ STYLE_EXTENSION_PATTERN2 = /\.(css|s[ac]ss|less)$/i;
8664
8792
  });
8665
8793
 
8666
8794
  // src/dev/fileWatcher.ts
@@ -8967,7 +9095,7 @@ var buildModulePaths = (moduleKeys, manifest) => {
8967
9095
  case "htmx":
8968
9096
  break;
8969
9097
  case "assets":
8970
- if (normalizedFile.endsWith(".css")) {
9098
+ if (isStylePath(normalizedFile)) {
8971
9099
  keys.push(`${pascalName}CSS`);
8972
9100
  }
8973
9101
  break;
@@ -8975,6 +9103,7 @@ var buildModulePaths = (moduleKeys, manifest) => {
8975
9103
  return keys;
8976
9104
  };
8977
9105
  var init_moduleMapper = __esm(() => {
9106
+ init_stylePreprocessor();
8978
9107
  init_reactComponentClassifier();
8979
9108
  });
8980
9109
 
@@ -9207,14 +9336,14 @@ var escapeHtml = (str) => String(str).replace(/&/g, "&amp;").replace(/</g, "&lt;
9207
9336
  import { AsyncLocalStorage as AsyncLocalStorage3 } from "async_hooks";
9208
9337
  import { mkdir as mkdir4, symlink } from "fs/promises";
9209
9338
  import { tmpdir } from "os";
9210
- import { basename as basename10, dirname as dirname11, join as join20, resolve as resolve27 } from "path";
9339
+ import { basename as basename10, dirname as dirname12, join as join20, resolve as resolve27 } from "path";
9211
9340
  var ssrDirty2 = false, lastSelector = "angular-page", isRecord8 = (value) => typeof value === "object" && value !== null, isAngularComponent = (value) => typeof value === "function", compilerImportPromise = null, ensureAngularCompiler = () => {
9212
9341
  if (!compilerImportPromise) {
9213
9342
  compilerImportPromise = import("@angular/compiler");
9214
9343
  }
9215
9344
  return compilerImportPromise;
9216
9345
  }, readAngularPageModule = (value) => isRecord8(value) ? value : null, resolveAngularSsrOutDir = () => process.env.ABSOLUTE_ANGULAR_SSR_OUTDIR ?? join20(tmpdir(), "absolutejs", "generated", "angular-ssr"), ensureAngularSsrNodeModules = async (outDir) => {
9217
- const outRoot = resolve27(dirname11(dirname11(outDir)));
9346
+ const outRoot = resolve27(dirname12(dirname12(outDir)));
9218
9347
  const nodeModulesLink = join20(outRoot, "node_modules");
9219
9348
  if (process.env.ABSOLUTE_ANGULAR_SSR_OUTDIR) {
9220
9349
  return;
@@ -9460,14 +9589,14 @@ var init_pageHandler3 = __esm(() => {
9460
9589
 
9461
9590
  // src/vue/pageHandler.ts
9462
9591
  import { readdir as readdir4 } from "fs/promises";
9463
- import { basename as basename11, dirname as dirname12 } from "path";
9592
+ import { basename as basename11, dirname as dirname13 } from "path";
9464
9593
  var ssrDirty4 = false, isRecord10 = (value) => typeof value === "object" && value !== null, isGenericVueComponent = (value) => typeof value === "function" || isRecord10(value), readHasIslands2 = (value) => {
9465
9594
  if (!isRecord10(value))
9466
9595
  return false;
9467
9596
  const hasIslands = value["__ABSOLUTE_PAGE_HAS_ISLANDS__"];
9468
9597
  return typeof hasIslands === "boolean" ? hasIslands : false;
9469
9598
  }, readDefaultExport2 = (value) => isRecord10(value) ? value.default : undefined, resolveCurrentGeneratedVueModulePath = async (pagePath) => {
9470
- const pageDirectory = dirname12(pagePath);
9599
+ const pageDirectory = dirname13(pagePath);
9471
9600
  const expectedPrefix = `${basename11(pagePath, ".js").split(".")[0]}.`;
9472
9601
  try {
9473
9602
  const pageEntries = await readdir4(pageDirectory, {
@@ -9671,7 +9800,7 @@ __export(exports_moduleServer, {
9671
9800
  SRC_URL_PREFIX: () => SRC_URL_PREFIX
9672
9801
  });
9673
9802
  import { existsSync as existsSync20, readFileSync as readFileSync13, statSync as statSync2 } from "fs";
9674
- import { basename as basename12, dirname as dirname13, extname as extname5, resolve as resolve28, relative as relative10 } from "path";
9803
+ import { basename as basename12, dirname as dirname14, extname as extname6, resolve as resolve28, relative as relative10 } from "path";
9675
9804
  var SRC_PREFIX = "/@src/", jsTranspiler2, tsTranspiler2, tsxTranspiler, TRANSPILABLE, ALL_EXPORTS_RE, STRING_CONTENTS_RE, preserveTypeExports = (originalSource, transpiled, valueExports) => {
9676
9805
  const codeOnly = originalSource.replace(STRING_CONTENTS_RE, '""');
9677
9806
  const allExports = [];
@@ -9720,9 +9849,9 @@ ${stubs}
9720
9849
  }, resolveRelativeImport = (relPath, fileDir, projectRoot, extensions) => {
9721
9850
  const absPath = resolve28(fileDir, relPath);
9722
9851
  const rel = relative10(projectRoot, absPath);
9723
- const extension = extname5(rel);
9852
+ const extension = extname6(rel);
9724
9853
  let srcPath = RESOLVED_MODULE_EXTENSIONS.has(extension) ? rel : resolveRelativeExtension(rel, projectRoot, extensions);
9725
- if (extname5(srcPath) === ".svelte") {
9854
+ if (extname6(srcPath) === ".svelte") {
9726
9855
  srcPath = relative10(projectRoot, resolveSvelteModulePath(resolve28(projectRoot, srcPath)));
9727
9856
  }
9728
9857
  return srcUrl(srcPath, projectRoot);
@@ -9756,7 +9885,7 @@ ${stubs}
9756
9885
  };
9757
9886
  result = result.replace(/^((?:import\s+[\s\S]+?\s+from|export\s+[\s\S]+?\s+from|import)\s*["'])([^"'./][^"']*)(["'])/gm, stubReplace);
9758
9887
  result = result.replace(/(import\s*\(\s*["'])([^"'./][^"']*)(["']\s*\))/g, stubReplace);
9759
- const fileDir = dirname13(filePath);
9888
+ const fileDir = dirname14(filePath);
9760
9889
  result = result.replace(/(from\s*["'])(\.\.?\/[^"']+)(["'])/g, (_match, prefix, relPath, suffix) => `${prefix}${resolveRelativeImport(relPath, fileDir, projectRoot, IMPORT_EXTENSIONS)}${suffix}`);
9761
9890
  result = result.replace(/(import\s*\(\s*["'])(\.\.?\/[^"']+)(["']\s*\))/g, (_match, prefix, relPath, suffix) => `${prefix}${resolveRelativeImport(relPath, fileDir, projectRoot, IMPORT_EXTENSIONS)}${suffix}`);
9762
9891
  result = result.replace(/(import\s*["'])(\.\.?\/[^"']+)(["']\s*;?)/g, (_match, prefix, relPath, suffix) => `${prefix}${resolveRelativeImport(relPath, fileDir, projectRoot, SIDE_EFFECT_EXTENSIONS)}${suffix}`);
@@ -9820,7 +9949,7 @@ ${transpiled}`;
9820
9949
  return rewriteImports2(transpiled, filePath, projectRoot, rewriter);
9821
9950
  }, transformPlainFile = (filePath, projectRoot, rewriter, vueDir) => {
9822
9951
  const raw = readFileSync13(filePath, "utf-8");
9823
- const ext = extname5(filePath);
9952
+ const ext = extname6(filePath);
9824
9953
  const isTS = ext === ".ts" || ext === ".tsx";
9825
9954
  const isTSX = ext === ".tsx" || ext === ".jsx";
9826
9955
  let transpiler4 = jsTranspiler2;
@@ -10210,7 +10339,7 @@ export default {};
10210
10339
  return jsResponse(`var s=document.createElement('style');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);`);
10211
10340
  }, resolveSourcePath = (relPath, projectRoot) => {
10212
10341
  const filePath = resolve28(projectRoot, relPath);
10213
- const ext = extname5(filePath);
10342
+ const ext = extname6(filePath);
10214
10343
  if (ext === ".svelte")
10215
10344
  return { ext, filePath: resolveSvelteModulePath(filePath) };
10216
10345
  if (ext)
@@ -10420,7 +10549,7 @@ var init_simpleHTMXHMR = () => {};
10420
10549
 
10421
10550
  // src/dev/rebuildTrigger.ts
10422
10551
  import { existsSync as existsSync21 } from "fs";
10423
- import { basename as basename13, dirname as dirname14, relative as relative11, resolve as resolve31 } from "path";
10552
+ import { basename as basename13, dirname as dirname15, relative as relative11, resolve as resolve31 } from "path";
10424
10553
  var moduleServerPromise, getModuleServer = () => moduleServerPromise, parseErrorLocationFromMessage = (msg) => {
10425
10554
  const pathLineCol = msg.match(/^([^\s:]+):(\d+)(?::(\d+))?/);
10426
10555
  if (pathLineCol) {
@@ -10728,7 +10857,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, parseError
10728
10857
  format: "esm",
10729
10858
  naming: "[dir]/[name].[hash].[ext]",
10730
10859
  outdir: buildDir,
10731
- plugins: [],
10860
+ plugins: [stylePreprocessorPlugin],
10732
10861
  root: clientRoot,
10733
10862
  target: "browser",
10734
10863
  throw: false
@@ -10861,7 +10990,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, parseError
10861
10990
  jsx: { development: true },
10862
10991
  naming: "[dir]/[name].[hash].[ext]",
10863
10992
  outdir: buildDir,
10864
- plugins: [],
10993
+ plugins: [stylePreprocessorPlugin],
10865
10994
  reactFastRefresh: true,
10866
10995
  root: clientRoot,
10867
10996
  splitting: true,
@@ -11053,6 +11182,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, parseError
11053
11182
  format: "esm",
11054
11183
  naming: "[dir]/[name].[hash].[ext]",
11055
11184
  outdir: serverOutDir,
11185
+ plugins: [stylePreprocessorPlugin],
11056
11186
  root: serverRoot,
11057
11187
  target: "bun",
11058
11188
  throw: false
@@ -11062,6 +11192,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, parseError
11062
11192
  format: "esm",
11063
11193
  naming: "[dir]/[name].[hash].[ext]",
11064
11194
  outdir: buildDir,
11195
+ plugins: [stylePreprocessorPlugin],
11065
11196
  root: clientRoot,
11066
11197
  target: "browser",
11067
11198
  throw: false
@@ -11182,7 +11313,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, parseError
11182
11313
  const [primarySource] = sourceFiles;
11183
11314
  try {
11184
11315
  const hasComponentChanges = reactFiles.some((file4) => file4.endsWith(".tsx") || file4.endsWith(".ts") || file4.endsWith(".jsx"));
11185
- const hasCSSChanges = reactFiles.some((file4) => file4.endsWith(".css"));
11316
+ const hasCSSChanges = reactFiles.some(isStylePath);
11186
11317
  logHmrUpdate(primarySource ?? reactFiles[0] ?? "", "react", duration);
11187
11318
  broadcastToClients(state, {
11188
11319
  data: {
@@ -11224,7 +11355,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, parseError
11224
11355
  if (!buildReference?.source) {
11225
11356
  return;
11226
11357
  }
11227
- const sourcePath = buildReference.source.startsWith("file://") ? new URL(buildReference.source).pathname : resolve31(dirname14(buildInfo.resolvedRegistryPath), buildReference.source);
11358
+ const sourcePath = buildReference.source.startsWith("file://") ? new URL(buildReference.source).pathname : resolve31(dirname15(buildInfo.resolvedRegistryPath), buildReference.source);
11228
11359
  islandFiles.add(resolve31(sourcePath));
11229
11360
  }, resolveIslandSourceFiles = async (config) => {
11230
11361
  const registryPath = config.islands?.registry;
@@ -11329,7 +11460,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, parseError
11329
11460
  if (!cssFile) {
11330
11461
  return;
11331
11462
  }
11332
- const cssBaseName = basename13(cssFile, ".css");
11463
+ const cssBaseName = basename13(getStyleBaseName(cssFile));
11333
11464
  const cssPascalName = toPascal(cssBaseName);
11334
11465
  const cssKey = `${cssPascalName}CSS`;
11335
11466
  const cssUrl = manifest[cssKey] || null;
@@ -11411,7 +11542,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, parseError
11411
11542
  return;
11412
11543
  }
11413
11544
  const vueComponentFiles = vueFiles.filter((file4) => file4.endsWith(".vue"));
11414
- const vueCssFiles = vueFiles.filter((file4) => file4.endsWith(".css"));
11545
+ const vueCssFiles = vueFiles.filter(isStylePath);
11415
11546
  const isCssOnlyChange = vueComponentFiles.length === 0 && vueCssFiles.length > 0;
11416
11547
  const vuePageFiles = vueFiles.filter((file4) => file4.replace(/\\/g, "/").includes("/pages/"));
11417
11548
  const pagesToUpdate = vuePageFiles.length > 0 ? vuePageFiles : vueComponentFiles;
@@ -11426,7 +11557,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, parseError
11426
11557
  if (!cssFile) {
11427
11558
  return;
11428
11559
  }
11429
- const cssBaseName = basename13(cssFile, ".css");
11560
+ const cssBaseName = basename13(getStyleBaseName(cssFile));
11430
11561
  const cssPascalName = toPascal(cssBaseName);
11431
11562
  const cssKey = `${cssPascalName}CSS`;
11432
11563
  const cssUrl = manifest[cssKey] || null;
@@ -11477,7 +11608,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, parseError
11477
11608
  return;
11478
11609
  }
11479
11610
  const svelteComponentFiles = svelteFiles.filter((file4) => file4.endsWith(".svelte"));
11480
- const svelteCssFiles = svelteFiles.filter((file4) => file4.endsWith(".css"));
11611
+ const svelteCssFiles = svelteFiles.filter(isStylePath);
11481
11612
  const isCssOnlyChange = svelteComponentFiles.length === 0 && svelteCssFiles.length > 0;
11482
11613
  const sveltePageFiles = svelteFiles.filter((file4) => file4.replace(/\\/g, "/").includes("/pages/"));
11483
11614
  const pagesToUpdate = sveltePageFiles.length > 0 ? sveltePageFiles : svelteComponentFiles;
@@ -11506,7 +11637,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, parseError
11506
11637
  if (!cssFile) {
11507
11638
  return;
11508
11639
  }
11509
- const cssBaseName = basename13(cssFile, ".css");
11640
+ const cssBaseName = basename13(getStyleBaseName(cssFile));
11510
11641
  const cssPascalName = toPascal(cssBaseName);
11511
11642
  const cssKey = `${cssPascalName}CSS`;
11512
11643
  const cssUrl = manifest[cssKey] || null;
@@ -11555,8 +11686,8 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, parseError
11555
11686
  if (angularFiles.length === 0) {
11556
11687
  return;
11557
11688
  }
11558
- const angularCssFiles = angularFiles.filter((file4) => file4.endsWith(".css"));
11559
- const isCssOnlyChange = angularFiles.every((file4) => file4.endsWith(".css")) && angularCssFiles.length > 0;
11689
+ const angularCssFiles = angularFiles.filter(isStylePath);
11690
+ const isCssOnlyChange = angularFiles.every(isStylePath) && angularCssFiles.length > 0;
11560
11691
  const angularPageFiles = angularFiles.filter((file4) => file4.replace(/\\/g, "/").includes("/pages/"));
11561
11692
  let pagesToUpdate = angularPageFiles;
11562
11693
  if (pagesToUpdate.length === 0 && state.dependencyGraph) {
@@ -11953,6 +12084,7 @@ var init_rebuildTrigger = __esm(() => {
11953
12084
  init_assetStore();
11954
12085
  init_pathUtils();
11955
12086
  init_webSocket();
12087
+ init_stylePreprocessor();
11956
12088
  init_pageHandler2();
11957
12089
  init_pageHandler();
11958
12090
  init_pageHandler3();
@@ -12107,7 +12239,7 @@ __export(exports_devBuild, {
12107
12239
  });
12108
12240
  import { readdir as readdir5 } from "fs/promises";
12109
12241
  import { statSync as statSync3 } from "fs";
12110
- import { dirname as dirname15, resolve as resolve32 } from "path";
12242
+ import { dirname as dirname16, resolve as resolve32 } from "path";
12111
12243
  var FRAMEWORK_DIR_KEYS, collectDepVendorSourceDirs = (config) => {
12112
12244
  const configuredDirs = [
12113
12245
  config.reactDirectory,
@@ -12117,7 +12249,7 @@ var FRAMEWORK_DIR_KEYS, collectDepVendorSourceDirs = (config) => {
12117
12249
  config.htmlDirectory,
12118
12250
  config.htmxDirectory
12119
12251
  ].filter((dir) => Boolean(dir));
12120
- return Array.from(new Set(configuredDirs.flatMap((dir) => [dir, dirname15(dir)])));
12252
+ return Array.from(new Set(configuredDirs.flatMap((dir) => [dir, dirname16(dir)])));
12121
12253
  }, parseDirectoryConfig = (source) => {
12122
12254
  const config = {};
12123
12255
  const dirPattern = /(\w+Directory)\s*:\s*['"]([^'"]+)['"]/g;
@@ -12533,7 +12665,7 @@ __export(exports_devtoolsJson, {
12533
12665
  devtoolsJson: () => devtoolsJson
12534
12666
  });
12535
12667
  import { existsSync as existsSync22, mkdirSync as mkdirSync12, readFileSync as readFileSync14, writeFileSync as writeFileSync8 } from "fs";
12536
- import { dirname as dirname16, join as join22, resolve as resolve33 } from "path";
12668
+ import { dirname as dirname17, join as join22, resolve as resolve33 } from "path";
12537
12669
  import { Elysia as Elysia3 } from "elysia";
12538
12670
  var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_KEY = "__absoluteDevtoolsWorkspaceUuid", getGlobalUuid = () => Reflect.get(globalThis, UUID_CACHE_KEY), setGlobalUuid = (uuid) => {
12539
12671
  Reflect.set(globalThis, UUID_CACHE_KEY, uuid);
@@ -12560,7 +12692,7 @@ var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_K
12560
12692
  if (cachedUuid)
12561
12693
  return setGlobalUuid(cachedUuid);
12562
12694
  const uuid = crypto.randomUUID();
12563
- mkdirSync12(dirname16(cachePath), { recursive: true });
12695
+ mkdirSync12(dirname17(cachePath), { recursive: true });
12564
12696
  writeFileSync8(cachePath, uuid, "utf-8");
12565
12697
  return setGlobalUuid(uuid);
12566
12698
  }, devtoolsJson = (buildDir, options = {}) => {
@@ -14849,7 +14981,7 @@ function Constructor(parameters, returns, options) {
14849
14981
  }
14850
14982
 
14851
14983
  // node_modules/@sinclair/typebox/build/esm/type/function/function.mjs
14852
- function Function(parameters, returns, options) {
14984
+ function Function2(parameters, returns, options) {
14853
14985
  return CreateType({ [Kind]: "Function", type: "Function", parameters, returns }, options);
14854
14986
  }
14855
14987
 
@@ -15339,7 +15471,7 @@ function FromProperties3(K, T) {
15339
15471
  }
15340
15472
  function FromSchemaType(K, T) {
15341
15473
  const options = { ...T };
15342
- return IsOptional(T) ? Optional(FromSchemaType(K, Discard(T, [OptionalKind]))) : IsReadonly(T) ? Readonly(FromSchemaType(K, Discard(T, [ReadonlyKind]))) : IsMappedResult(T) ? FromMappedResult3(K, T.properties) : IsMappedKey(T) ? FromMappedKey(K, T.keys) : IsConstructor(T) ? Constructor(FromRest2(K, T.parameters), FromSchemaType(K, T.returns), options) : IsFunction3(T) ? Function(FromRest2(K, T.parameters), FromSchemaType(K, T.returns), options) : IsAsyncIterator3(T) ? AsyncIterator(FromSchemaType(K, T.items), options) : IsIterator3(T) ? Iterator(FromSchemaType(K, T.items), options) : IsIntersect(T) ? Intersect(FromRest2(K, T.allOf), options) : IsUnion(T) ? Union(FromRest2(K, T.anyOf), options) : IsTuple(T) ? Tuple(FromRest2(K, T.items ?? []), options) : IsObject3(T) ? Object2(FromProperties3(K, T.properties), options) : IsArray3(T) ? Array2(FromSchemaType(K, T.items), options) : IsPromise2(T) ? Promise2(FromSchemaType(K, T.item), options) : T;
15474
+ return IsOptional(T) ? Optional(FromSchemaType(K, Discard(T, [OptionalKind]))) : IsReadonly(T) ? Readonly(FromSchemaType(K, Discard(T, [ReadonlyKind]))) : IsMappedResult(T) ? FromMappedResult3(K, T.properties) : IsMappedKey(T) ? FromMappedKey(K, T.keys) : IsConstructor(T) ? Constructor(FromRest2(K, T.parameters), FromSchemaType(K, T.returns), options) : IsFunction3(T) ? Function2(FromRest2(K, T.parameters), FromSchemaType(K, T.returns), options) : IsAsyncIterator3(T) ? AsyncIterator(FromSchemaType(K, T.items), options) : IsIterator3(T) ? Iterator(FromSchemaType(K, T.items), options) : IsIntersect(T) ? Intersect(FromRest2(K, T.allOf), options) : IsUnion(T) ? Union(FromRest2(K, T.anyOf), options) : IsTuple(T) ? Tuple(FromRest2(K, T.items ?? []), options) : IsObject3(T) ? Object2(FromProperties3(K, T.properties), options) : IsArray3(T) ? Array2(FromSchemaType(K, T.items), options) : IsPromise2(T) ? Promise2(FromSchemaType(K, T.item), options) : T;
15343
15475
  }
15344
15476
  function MappedFunctionReturnType(K, T) {
15345
15477
  const Acc = {};
@@ -15618,7 +15750,7 @@ function ConditionalReadonly(T, root) {
15618
15750
  return root === true ? T : Readonly(T);
15619
15751
  }
15620
15752
  function FromValue(value, root) {
15621
- return IsAsyncIterator(value) ? ConditionalReadonly(Any(), root) : IsIterator(value) ? ConditionalReadonly(Any(), root) : IsArray(value) ? Readonly(Tuple(FromArray3(value))) : IsUint8Array(value) ? Uint8Array2() : IsDate(value) ? Date2() : IsObject(value) ? ConditionalReadonly(Object2(FromProperties7(value)), root) : IsFunction(value) ? ConditionalReadonly(Function([], Unknown()), root) : IsUndefined(value) ? Undefined() : IsNull(value) ? Null() : IsSymbol(value) ? Symbol2() : IsBigInt(value) ? BigInt2() : IsNumber(value) ? Literal(value) : IsBoolean(value) ? Literal(value) : IsString(value) ? Literal(value) : Object2({});
15753
+ return IsAsyncIterator(value) ? ConditionalReadonly(Any(), root) : IsIterator(value) ? ConditionalReadonly(Any(), root) : IsArray(value) ? Readonly(Tuple(FromArray3(value))) : IsUint8Array(value) ? Uint8Array2() : IsDate(value) ? Date2() : IsObject(value) ? ConditionalReadonly(Object2(FromProperties7(value)), root) : IsFunction(value) ? ConditionalReadonly(Function2([], Unknown()), root) : IsUndefined(value) ? Undefined() : IsNull(value) ? Null() : IsSymbol(value) ? Symbol2() : IsBigInt(value) ? BigInt2() : IsNumber(value) ? Literal(value) : IsBoolean(value) ? Literal(value) : IsString(value) ? Literal(value) : Object2({});
15622
15754
  }
15623
15755
  function Const(T, options) {
15624
15756
  return CreateType(FromValue(T, true), options);
@@ -15775,7 +15907,7 @@ function IsObjectArrayLike(schema) {
15775
15907
  return IsObjectPropertyCount(schema, 0) || IsObjectPropertyCount(schema, 1) && "length" in schema.properties && IntoBooleanResult(Visit3(schema.properties["length"], length)) === ExtendsResult.True;
15776
15908
  }
15777
15909
  function IsObjectPromiseLike(schema) {
15778
- const then = Function([Any()], Any());
15910
+ const then = Function2([Any()], Any());
15779
15911
  return IsObjectPropertyCount(schema, 0) || IsObjectPropertyCount(schema, 1) && "then" in schema.properties && IntoBooleanResult(Visit3(schema.properties["then"], then)) === ExtendsResult.True;
15780
15912
  }
15781
15913
  function Property(left, right) {
@@ -16500,7 +16632,7 @@ function FromConstructor3(moduleProperties, parameters, instanceType) {
16500
16632
  return Constructor(FromTypes2(moduleProperties, parameters), FromType2(moduleProperties, instanceType));
16501
16633
  }
16502
16634
  function FromFunction3(moduleProperties, parameters, returnType) {
16503
- return Function(FromTypes2(moduleProperties, parameters), FromType2(moduleProperties, returnType));
16635
+ return Function2(FromTypes2(moduleProperties, parameters), FromType2(moduleProperties, returnType));
16504
16636
  }
16505
16637
  function FromIntersect8(moduleProperties, types) {
16506
16638
  return Intersect(FromTypes2(moduleProperties, types));
@@ -16693,7 +16825,7 @@ __export(exports_type3, {
16693
16825
  Instantiate: () => Instantiate,
16694
16826
  InstanceType: () => InstanceType,
16695
16827
  Index: () => Index,
16696
- Function: () => Function,
16828
+ Function: () => Function2,
16697
16829
  Extract: () => Extract,
16698
16830
  Extends: () => Extends,
16699
16831
  Exclude: () => Exclude,
@@ -20277,5 +20409,5 @@ export {
20277
20409
  ANGULAR_INIT_TIMEOUT_MS
20278
20410
  };
20279
20411
 
20280
- //# debugId=4CC81F5B1BD6340664756E2164756E21
20412
+ //# debugId=E79287F479D084DA64756E2164756E21
20281
20413
  //# sourceMappingURL=index.js.map