histoire
Version:
A fast story book powered by Vite
32 lines • 1.54 kB
TypeScript
import type { PluginApiBase } from '@histoire/shared';
/** CSS dependency with reference-only imports distinguished from live entries. */
interface CssImport {
/** Import request. */
id: string;
/** Whether directive only supplies reference metadata. */
reference: boolean;
}
/** Read quoted imports using CSS parser; tolerant scan preserves compiler errors. */
export declare function readCssImports(css: string): CssImport[];
/** Vite resolution first, with filesystem/package fallback for custom module loaders. */
export declare function resolveCssImport(api: PluginApiBase, id: string, importer: string): Promise<string | null>;
/** Preserve asset ownership when compiled CSS moves into generated output. */
export declare function loadTailwindCss(api: PluginApiBase, file: string, dependencies: Set<string>): Promise<string>;
/** Shared v4 compiler loaders record every imported source and failed file candidate. */
export declare function createTailwindLoaders(api: PluginApiBase, source: string, dependencies: Set<string>): {
base: string;
/** Resolve raw CSS; do not execute transformed browser CSS modules. */
loadStylesheet(id: string, base: string): Promise<{
path: string;
base: string;
content: string;
}>;
/** Execute compatibility plugins/configs through owning Vite module loader. */
loadModule(id: string, base: string): Promise<{
path: string;
base: string;
module: any;
}>;
};
export {};
//# sourceMappingURL=imports.d.ts.map