/**
 * Properties Utilities
 *
 * Utilities for extracting and processing CSS @property definitions in styles.
 * Unlike keyframes, properties are permanent once registered and don't need cleanup.
 *
 * Property names use tasty token syntax:
 * - `$name` for regular properties → `--name`
 * - `#name` for color properties → `--name-color` (auto-sets syntax: '<color>')
 */
import { PropertyDefinition } from '../injector/types';
import { Styles } from '../styles/types';
/**
 * Validate a CSS custom property name (the part after --).
 * Returns true if the name is valid for use as a CSS custom property.
 */
export declare function isValidPropertyName(name: string): boolean;
/**
 * Result of parsing a property token.
 */
export interface ParsedPropertyToken {
    /** The CSS custom property name (e.g., '--my-prop') */
    cssName: string;
    /** Whether this is a color property */
    isColor: boolean;
    /** Whether the token was valid */
    isValid: boolean;
    /** Error message if invalid */
    error?: string;
}
/**
 * Check if styles object has local @properties definition.
 * Fast path: single property lookup.
 */
export declare function hasLocalProperties(styles: Styles): boolean;
/**
 * Extract local @properties from styles object.
 * Returns null if no local properties (fast path).
 */
export declare function extractLocalProperties(styles: Styles): Record<string, PropertyDefinition> | null;
/**
 * Parse a property token name and return the CSS property name and whether it's a color.
 * Supports tasty token syntax and validates the property name.
 *
 * Token formats:
 * - `$name` → { cssName: '--name', isColor: false }
 * - `#name` → { cssName: '--name-color', isColor: true }
 * - `--name` → { cssName: '--name', isColor: false } (legacy, auto-detect color by suffix)
 * - `name` → { cssName: '--name', isColor: false } (legacy)
 *
 * @param token - The property token to parse
 * @returns Parsed result with cssName, isColor, isValid, and optional error
 */
export declare function parsePropertyToken(token: string): ParsedPropertyToken;
/**
 * Normalize a property name to the CSS custom property format.
 *
 * @deprecated Use parsePropertyToken instead for proper token handling
 */
export declare function normalizePropertyName(name: string): string;
/**
 * Normalize a property definition to a consistent string representation.
 * Used for comparing definitions to detect changes/conflicts.
 *
 * Keys are sorted alphabetically to ensure consistent comparison:
 * { inherits: true, syntax: '<color>' } === { syntax: '<color>', inherits: true }
 */
export declare function normalizePropertyDefinition(def: PropertyDefinition): string;
/**
 * Result of getEffectiveDefinition.
 */
export interface EffectiveDefinitionResult {
    /** The CSS custom property name */
    cssName: string;
    /** The effective property definition */
    definition: PropertyDefinition;
    /** Whether this is a color property */
    isColor: boolean;
    /** Whether the token was valid */
    isValid: boolean;
    /** Error message if invalid */
    error?: string;
}
/**
 * Get the effective property definition for a token.
 * For color tokens (#name), auto-sets syntax to '<color>' and defaults initialValue to 'transparent'.
 *
 * @param token - Property token ($name, #name, --name, or plain name)
 * @param userDefinition - User-provided definition options
 * @returns Effective definition with cssName, definition, isValid, and optional error
 */
export declare function getEffectiveDefinition(token: string, userDefinition: PropertyDefinition): EffectiveDefinitionResult;
/**
 * Extract RGB triplet string from a color initial value.
 * Used when auto-creating the companion `-rgb` property for color @property definitions.
 *
 * @param initialValue - The color property's initial value (e.g., 'rgb(255 255 255)', 'transparent', '#fff')
 * @returns Space-separated RGB triplet (e.g., '255 255 255'), defaults to '0 0 0'
 */
export declare function colorInitialValueToRgb(initialValue?: string | number): string;
