@absolutejs/absolute 0.19.0-beta.994 → 0.19.0-beta.996

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
@@ -13251,7 +13251,20 @@ var resolveDevClientDir3 = () => {
13251
13251
  return "template-only";
13252
13252
  }
13253
13253
  return "full";
13254
- }, generateVueHmrId = (sourceFilePath, vueRootDir) => relative10(vueRootDir, sourceFilePath).replace(/\\/g, "/").replace(/\.vue$/, ""), extractImports = (sourceCode) => Array.from(sourceCode.matchAll(/import\s+[\s\S]+?['"]([^'"]+)['"]/g)).map((match) => match[1]).filter((importPath) => importPath !== undefined), resolveHelperTsPath = (sourceDir, helper) => {
13254
+ }, generateVueHmrId = (sourceFilePath, vueRootDir) => relative10(vueRootDir, sourceFilePath).replace(/\\/g, "/").replace(/\.vue$/, ""), extractImports = (sourceCode) => Array.from(sourceCode.matchAll(/import\s+[\s\S]+?['"]([^'"]+)['"]/g)).map((match) => match[1]).filter((importPath) => importPath !== undefined), inlineCssImports = (cssContent, cssFilePath, visited = new Set) => {
13255
+ const resolved = realpathSync(cssFilePath);
13256
+ if (visited.has(resolved))
13257
+ return "";
13258
+ visited.add(resolved);
13259
+ const importRegex = /@import\s+(?:url\(\s*)?(['"])(\.{1,2}\/[^'"]+)\1\s*\)?\s*;?/g;
13260
+ return cssContent.replace(importRegex, (match, _quote, relPath) => {
13261
+ const importedPath = resolve23(dirname15(cssFilePath), relPath);
13262
+ if (!existsSync22(importedPath))
13263
+ return match;
13264
+ const importedContent = readFileSync19(importedPath, "utf-8");
13265
+ return inlineCssImports(importedContent, importedPath, visited);
13266
+ });
13267
+ }, resolveHelperTsPath = (sourceDir, helper) => {
13255
13268
  if (helper.endsWith(".ts"))
13256
13269
  return resolve23(sourceDir, helper);
13257
13270
  const direct = resolve23(sourceDir, `${helper}.ts`);
@@ -13389,13 +13402,16 @@ var resolveDevClientDir3 = () => {
13389
13402
  }).code;
13390
13403
  return transpiler4.transformSync(rendered).replace(/(['"])(\.{1,2}\/[^'"]+)(['"])/g, (_2, quoteStart, relativeImport, quoteEnd) => `${quoteStart}${toJs(relativeImport, sourceDir)}${quoteEnd}`);
13391
13404
  };
13392
- const localCss = await Promise.all(descriptor.styles.map(async (styleBlock) => compiler.compileStyle({
13393
- filename: sourceFilePath,
13394
- id: componentId,
13395
- scoped: styleBlock.scoped,
13396
- source: styleBlock.lang ? await compileStyleSource(sourceFilePath, styleBlock.content, styleBlock.lang, stylePreprocessors) : styleBlock.content,
13397
- trim: true
13398
- }).code));
13405
+ const localCss = await Promise.all(descriptor.styles.map(async (styleBlock) => {
13406
+ const rawContent = styleBlock.lang ? await compileStyleSource(sourceFilePath, styleBlock.content, styleBlock.lang, stylePreprocessors) : styleBlock.content;
13407
+ return compiler.compileStyle({
13408
+ filename: sourceFilePath,
13409
+ id: componentId,
13410
+ scoped: styleBlock.scoped,
13411
+ source: inlineCssImports(rawContent, sourceFilePath),
13412
+ trim: true
13413
+ }).code;
13414
+ }));
13399
13415
  const allCss = [
13400
13416
  ...localCss,
13401
13417
  ...childBuildResults.flatMap((result2) => result2.cssCodes)
@@ -35681,5 +35697,5 @@ export {
35681
35697
  ANGULAR_INIT_TIMEOUT_MS
35682
35698
  };
35683
35699
 
35684
- //# debugId=A01D45F591D872F664756E2164756E21
35700
+ //# debugId=B15B054E1CF0882664756E2164756E21
35685
35701
  //# sourceMappingURL=index.js.map