/** * CSS Import Collector - Request-scoped CSS import tracking for SSR * * Collects CSS import paths discovered during module loading using * AsyncLocalStorage for proper isolation between concurrent requests. * * Usage: * const { result, cssImports } = await runWithCSSCollector(() => loadModules(...)); * // cssImports contains absolute paths to CSS files discovered during loading */ /** Canonical CSS read path paired with the authored CSS module identity. */ export interface CSSImportReference { readPath: string; moduleKey: string; /** Bound read captured by the dependency validator for contained files. */ read?: () => Promise; } /** * Run a function with CSS import collection enabled. * Returns the function result and all collected CSS import paths. */ export declare function runWithCSSCollector(fn: () => T | Promise): Promise<{ result: T; cssImports: string[]; }>; /** * Register a CSS import path discovered during module loading. * No-op if called outside of a runWithCSSCollector context. */ export declare function registerCSSImport(absolutePath: string, moduleKey?: string, read?: () => Promise): void; /** * Get all CSS imports collected so far in the current context. * Returns empty array if called outside of a runWithCSSCollector context. */ export declare function getCSSImports(): string[]; /** Return canonical CSS read paths with their authored module keys. */ export declare function getCSSImportReferences(): CSSImportReference[]; //# sourceMappingURL=css-import-collector.d.ts.map