/**
 * Style injector that works with structured style objects
 * Eliminates CSS string parsing for better performance
 */
import { StyleResult } from '../pipeline';
import { GlobalInjectResult, InjectResult, KeyframesResult, KeyframesSteps, PropertyDefinition, RawCSSResult, StyleInjectorConfig } from './types';
export declare class StyleInjector {
    private sheetManager;
    private config;
    private cleanupScheduled;
    private globalRuleCounter;
    constructor(config?: StyleInjectorConfig);
    /**
     * Allocate a className for a cacheKey without injecting styles yet.
     * This allows separating className allocation (render phase) from style injection (insertion phase).
     */
    allocateClassName(cacheKey: string, options?: {
        root?: Document | ShadowRoot;
    }): {
        className: string;
        isNewAllocation: boolean;
    };
    /**
     * Inject styles from StyleResult objects
     */
    inject(rules: StyleResult[], options?: {
        root?: Document | ShadowRoot;
        cacheKey?: string;
    }): InjectResult;
    /**
     * Inject global styles (rules without a generated tasty class selector)
     * This ensures we don't reserve a tasty class name (t{number}) for global rules,
     * which could otherwise collide with element-level styles and break lookups.
     */
    injectGlobal(rules: StyleResult[], options?: {
        root?: Document | ShadowRoot;
    }): GlobalInjectResult;
    /**
     * Inject raw CSS text directly without parsing
     * This is a low-overhead alternative to createGlobalStyle for raw CSS
     * The CSS is inserted into a separate style element to avoid conflicts with tasty's chunking
     */
    injectRawCSS(css: string, options?: {
        root?: Document | ShadowRoot;
    }): RawCSSResult;
    /**
     * Get raw CSS text for SSR
     */
    getRawCSSText(options?: {
        root?: Document | ShadowRoot;
    }): string;
    /**
     * Dispose of a className
     */
    private dispose;
    /**
     * Force bulk cleanup of unused styles
     */
    cleanup(root?: Document | ShadowRoot): void;
    /**
     * Get CSS text from all sheets (for SSR)
     */
    getCssText(options?: {
        root?: Document | ShadowRoot;
    }): string;
    /**
     * Get CSS only for the provided tasty classNames (e.g., ["t0","t3"])
     */
    getCssTextForClasses(classNames: Iterable<string>, options?: {
        root?: Document | ShadowRoot;
    }): string;
    /**
     * Get cache performance metrics
     */
    getMetrics(options?: {
        root?: Document | ShadowRoot;
    }): any;
    /**
     * Reset cache performance metrics
     */
    resetMetrics(options?: {
        root?: Document | ShadowRoot;
    }): void;
    /**
     * Define a CSS @property custom property.
     *
     * Accepts tasty token syntax for the property name:
     * - `$name` → defines `--name`
     * - `#name` → defines `--name-color` (auto-sets syntax: '<color>', defaults initialValue: 'transparent')
     * - `--name` → defines `--name` (legacy format)
     *
     * Example:
     * @property --rotation { syntax: "<angle>"; inherits: false; initial-value: 45deg; }
     *
     * Note: No caching or dispose — this defines a global property.
     *
     * If the same property is registered with different options, a warning is emitted
     * but the original definition is preserved (CSS @property cannot be redefined).
     */
    property(name: string, options?: PropertyDefinition & {
        root?: Document | ShadowRoot;
    }): void;
    /**
     * Check whether a given @property name was already injected by this injector.
     *
     * Accepts tasty token syntax:
     * - `$name` → checks `--name`
     * - `#name` → checks `--name-color`
     * - `--name` → checks `--name` (legacy format)
     */
    isPropertyDefined(name: string, options?: {
        root?: Document | ShadowRoot;
    }): boolean;
    /**
     * Inject keyframes and return object with toString() and dispose()
     *
     * Keyframes are cached by content (steps). If the same content is injected
     * multiple times with different provided names, the first injected name is reused.
     *
     * If the same name is provided with different content (collision), a unique
     * name is generated to avoid overwriting the existing keyframes.
     */
    keyframes(steps: KeyframesSteps, nameOrOptions?: string | {
        root?: Document | ShadowRoot;
        name?: string;
    }): KeyframesResult;
    /**
     * Dispose keyframes
     */
    private disposeKeyframes;
    /**
     * Destroy all resources for a root
     */
    destroy(root?: Document | ShadowRoot): void;
}
