style: format the UI shell and component styles

This commit is contained in:
Sameh Khamis committed 2026-09-13 04:26:11 -07:00
1 parent f5ef9091f0
commit 03ad8142e6
32 files changed
+4126 -1546

No files matched your search

+8 -3
View File
@@ -3,9 +3,14 @@ import { readFileSync } from 'node:fs';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
export function readStylesheet(file, ancestors = new Set()) {
const resolved = path.resolve(file instanceof URL ? fileURLToPath(file) : file);
const resolved = path.resolve(
file instanceof URL ? fileURLToPath(file) : file,
);
if (ancestors.has(resolved)) throw new Error('Circular stylesheet import');
const next = new Set(ancestors).add(resolved);
return readFileSync(resolved, 'utf8').replace(/@import ['"]([^'"]+)['"];\s*/g,
(_, imported) => readStylesheet(path.resolve(path.dirname(resolved), imported), next));
return readFileSync(resolved, 'utf8').replace(
/@import ['"]([^'"]+)['"];\s*/g,
(_, imported) =>
readStylesheet(path.resolve(path.dirname(resolved), imported), next),
);
}