import { InternalConfig, NormalizedConvertedTokens } from '@sugarcube-org/core';
export { SugarcubeConfig, defineConfig } from '@sugarcube-org/core';
import { ViteDevServer, Logger, Plugin } from 'vite';

/** CSS object for UnoCSS rules - matches @unocss/core CSSObject */
type CSSObject = Record<string, string | number | undefined>;
/** UnoCSS dynamic rule: [pattern, handler] */
type UnoRule = [RegExp, (match: RegExpMatchArray) => CSSObject];
interface SugarcubePluginContext {
    ready: Promise<void>;
    config: InternalConfig | null;
    tokens: NormalizedConvertedTokens | null;
    getCSS: () => string;
    reloadConfig: () => Promise<void>;
    reloadTokens: () => Promise<void>;
    getRules: () => UnoRule[];
    getTokenDirs: () => string[];
    invalidate: (server: ViteDevServer) => void;
    onReload: (fn: () => void) => void;
    tasks: Promise<void>[];
    flushTasks: () => Promise<void>;
    setLogger: (logger: Logger) => void;
}
interface SugarcubePluginOptions<T = any> {
    unoPresets?: T[];
    unoTheme?: Record<string, any>;
}
declare function sugarcubePlugin(options?: SugarcubePluginOptions): Promise<Plugin[]>;

export { type SugarcubePluginContext, sugarcubePlugin as default };
