import type { ExistingRawSourceMap, RenderedChunk, RollupError } from 'rollup';
import type * as PostCSS from 'postcss';
import type { Alias } from 'types/alias';
import type { ResolveFn } from '../';
import type { ResolvedConfig } from '../config';
import type { Plugin } from '../plugin';
import type { Logger } from '../logger';
export interface CSSOptions {
    /**
     * https://github.com/css-modules/postcss-modules
     */
    modules?: CSSModulesOptions | false;
    preprocessorOptions?: Record<string, any>;
    postcss?: string | (PostCSS.ProcessOptions & {
        plugins?: PostCSS.Plugin[];
    });
    /**
     * Enables css sourcemaps during dev
     * @default false
     * @experimental
     */
    devSourcemap?: boolean;
}
export interface CSSModulesOptions {
    getJSON?: (cssFileName: string, json: Record<string, string>, outputFileName: string) => void;
    scopeBehaviour?: 'global' | 'local';
    globalModulePaths?: RegExp[];
    generateScopedName?: string | ((name: string, filename: string, css: string) => string);
    hashPrefix?: string;
    /**
     * default: null
     */
    localsConvention?: 'camelCase' | 'camelCaseOnly' | 'dashes' | 'dashesOnly' | null;
}
export declare const isCSSRequest: (request: string) => boolean;
export declare const isDirectCSSRequest: (request: string) => boolean;
export declare const isDirectRequest: (request: string) => boolean;
export declare const removedPureCssFilesCache: WeakMap<Readonly<Omit<import("../config").UserConfig, "assetsInclude" | "plugins" | "optimizeDeps" | "worker"> & {
    configFile: string | undefined;
    configFileDependencies: string[];
    inlineConfig: import("../config").InlineConfig;
    root: string;
    base: string;
    publicDir: string;
    cacheDir: string;
    command: "build" | "serve";
    mode: string;
    isWorker: boolean;
    mainConfig: Readonly<Omit<import("../config").UserConfig, "assetsInclude" | "plugins" | "optimizeDeps" | "worker"> & any> | null;
    isProduction: boolean;
    env: Record<string, any>;
    resolve: import("./resolve").ResolveOptions & {
        alias: Alias[];
    };
    plugins: readonly Plugin[];
    server: import("../server").ResolvedServerOptions;
    build: Required<import("../build").BuildOptions>;
    preview: import("../preview").ResolvedPreviewOptions;
    assetsInclude: (file: string) => boolean;
    logger: Logger;
    createResolver: (options?: Partial<import("./resolve").InternalResolveOptions> | undefined) => ResolveFn;
    optimizeDeps: import("../optimizer").DepOptimizationOptions;
    packageCache: import("../packages").PackageCache;
    worker: import("../config").ResolveWorkerOptions;
    spa: boolean;
}>, Map<string, RenderedChunk>>;
/**
 * Plugin applied before user plugins
 */
export declare function cssPlugin(config: ResolvedConfig): Plugin;
/**
 * Plugin applied after user plugins
 */
export declare function cssPostPlugin(config: ResolvedConfig): Plugin;
export declare function formatPostcssSourceMap(rawMap: ExistingRawSourceMap, file: string): Promise<ExistingRawSourceMap>;
export declare const cssUrlRE: RegExp;
export declare const cssDataUriRE: RegExp;
export declare const importCssRE: RegExp;
export declare function hoistAtRules(css: string): Promise<string>;
export interface StylePreprocessorResults {
    code: string;
    map?: ExistingRawSourceMap | undefined;
    additionalMap?: ExistingRawSourceMap | undefined;
    errors: RollupError[];
    deps: string[];
}
