/**
 * CSS Rule Patch Operations
 *
 * Utilities for deterministic diffing and patching of CSS rules.
 * Used by the designer assistant for propose/apply flow.
 */
import type { CustomCssRule } from './types';
/**
 * A patch operation for CSS rules.
 */
export type CssRulePatch = {
    op: 'add';
    rule: CustomCssRule;
} | {
    op: 'remove';
    ruleId: string;
} | {
    op: 'update';
    ruleId: string;
    changes: Partial<Omit<CustomCssRule, 'id'>>;
};
/**
 * Generate a unique ID for a new CSS rule.
 * Uses timestamp + random suffix for uniqueness.
 */
export declare function generateCssRuleId(): string;
/**
 * Apply a single patch operation to a rules array.
 *
 * @param rules - Current rules array
 * @param patch - Patch operation to apply
 * @returns New rules array with patch applied
 */
export declare function applyCssRulePatch(rules: CustomCssRule[], patch: CssRulePatch): CustomCssRule[];
/**
 * Apply multiple patches in order.
 *
 * @param rules - Current rules array
 * @param patches - Array of patches to apply
 * @returns New rules array with all patches applied
 */
export declare function applyCssRulePatches(rules: CustomCssRule[], patches: CssRulePatch[]): CustomCssRule[];
/**
 * Generate a deterministic diff between two rule arrays.
 * Produces the minimal set of patches to transform `before` into `after`.
 *
 * @param before - Original rules array
 * @param after - Target rules array
 * @returns Array of patches to transform before into after
 */
export declare function diffCssRules(before: CustomCssRule[], after: CustomCssRule[]): CssRulePatch[];
