import * as arktype_out_variants_object from 'arktype/out/variants/object';

declare class BinOpNode implements ASTNode {
    left: ASTNode;
    opToken: Token;
    right: ASTNode;
    token?: Token | undefined;
    nodeType: string;
    constructor(left: ASTNode, opToken: Token, right: ASTNode, token?: Token | undefined);
    get op(): Operations | TokenType;
}
declare class NumNode implements ASTNode {
    token: Token;
    nodeType: string;
    value: number;
    constructor(token: Token);
}
declare class StringNode implements ASTNode {
    token: Token;
    nodeType: string;
    value: string;
    constructor(token: Token);
}
declare class UnaryOpNode implements ASTNode {
    opToken: Token;
    expr: ASTNode;
    token?: Token | undefined;
    nodeType: string;
    constructor(opToken: Token, expr: ASTNode, token?: Token | undefined);
    get op(): Operations;
}
declare class ListNode implements ASTNode {
    elements: ASTNode[];
    token?: Token | undefined;
    nodeType: string;
    constructor(elements: ASTNode[], token?: Token | undefined);
}
declare class ImplicitListNode extends ListNode {
    elements: ASTNode[];
    token?: Token | undefined;
    nodeType: string;
    isImplicit: boolean;
    constructor(elements: ASTNode[], token?: Token | undefined);
}
declare class FunctionCallNode implements ASTNode {
    args: ASTNode[];
    token?: Token | undefined;
    nodeType: string;
    name: string;
    constructor(nameTokenValue: string, args: ASTNode[], token?: Token | undefined);
}
declare class NoOpNode implements ASTNode {
    token?: Token | undefined;
    nodeType: string;
    constructor(token?: Token | undefined);
}
declare class ReferenceNode implements ASTNode {
    token: Token;
    nodeType: string;
    value: string;
    constructor(token: Token);
}
declare class IdentifierNode implements ASTNode {
    token: Token;
    nodeType: string;
    name: string;
    constructor(token: Token);
}
declare class ReassignNode implements ASTNode {
    identifier: IdentifierNode | IdentifierNode[];
    value: ASTNode;
    token?: Token | undefined;
    nodeType: string;
    constructor(identifier: IdentifierNode | IdentifierNode[], value: ASTNode, token?: Token | undefined);
    baseIdentifier(): IdentifierNode;
    isAttributeAssignment(): boolean;
    identifierToString(): string;
    attributesChain(): IdentifierNode[];
    attributesStringChain(): string[];
}
/**
 * Walk the AST and call the visit function on each node
 *
 * @param node - The AST node to traverse
 * @param onVisit - Function called for each node during traversal
 *
 * @example
 * // Print all node types
 * walk(ast, (node) => console.log(node.nodeType));
 *
 * @example
 * // Collect all reference nodes
 * const refs: ReferenceNode[] = [];
 * walk(ast, (node) => {
 *   if (node instanceof ReferenceNode) refs.push(node);
 * });
 */
declare function walkAST(node: ASTNode, onVisit: (node: ASTNode) => void): void;
/**
 * Walk the AST and collect all nodes that match the predicate into a flat list
 *
 * @param ast - The AST node to traverse
 * @param predicate - Function to test each node
 * @returns Flat array of matching nodes
 *
 * @example
 * // Find all reference nodes
 * const refs = filterAST(ast, (node) => node instanceof ReferenceNode);
 *
 * @example
 * // Find references to a specific token
 * const refs = filterAST(ast, (node) =>
 *   node instanceof ReferenceNode && node.value === "color.primary"
 * );
 */
declare function filterAST<T extends ASTNode>(ast: ASTNode, predicate: (node: ASTNode) => boolean): T[];
/**
 * Collect all reference nodes from the AST
 *
 * @param ast - The AST node to traverse
 * @param targetName - Optional: only collect references matching this name
 * @returns Array of reference nodes
 *
 * @example
 * // Get all references
 * const refs = collectReferenceNodes(ast);
 *
 * @example
 * // Get references to a specific token
 * const refs = collectReferenceNodes(ast, "color.primary");
 */
declare function collectReferenceNodes(ast: ASTNode, targetName?: string): ReferenceNode[];

interface ToJsOptions {
    /** Whether to recursively convert nested values (default: true) */
    recursive?: boolean;
    /** Whether to use toString() for structured types (default: false) */
    stringify?: boolean;
}
declare const getResultTypeName: (result: unknown) => string;
type SupportedMethods = Record<string, MethodDefinitionDef>;
interface MethodArgumentDef {
    name: string;
    type: any;
    optional?: boolean;
}
interface MethodDefinitionDef {
    name?: string;
    function: (...args: any[]) => ISymbolType | null | undefined;
    args: MethodArgumentDef[];
    returnType: any;
}
declare abstract class BaseSymbolType implements ISymbolType {
    abstract type: string;
    value: any | null;
    config?: Config;
    static _SUPPORTED_METHODS?: SupportedMethods;
    constructor(value: any, config?: Config);
    abstract validValue(value: any): boolean;
    /**
     * Forces creating a deepCopy of provided symbol no matter if it's immutable or not.
     */
    abstract deepCopy(): ISymbolType;
    /**
     * Returns a copy of the symbol if it's mutable, otherwise returns the same instance.
     *
     * This method is used to prevent reference sharing issues when storing symbols in
     * containers like lists and dictionaries. Immutable symbols (Number, String, Boolean,
     * NumberWithUnit, Null, hex ColorSymbol) can safely share references since they
     * cannot be modified after creation. Mutable symbols (List, Dictionary, dynamic
     * ColorSymbol) need to be deep copied to prevent unintended mutations.
     *
     * @returns For immutable symbols: returns `this` (same reference)
     *          For mutable symbols: returns `this.deepCopy()` (new instance)
     */
    abstract cloneIfMutable(): ISymbolType;
    abstract toJs(options?: ToJsOptions): JsValue;
    toString(): string;
    getTypeName(): string;
    typeEquals(other: ISymbolType): boolean;
    equals(other: ISymbolType): boolean;
    hasMethod?(methodName: string, args: ISymbolType[]): boolean;
    callMethod?(methodName: string, args: ISymbolType[]): ISymbolType | null | undefined;
    hasAttribute?(_attributeName: string): boolean;
    getAttribute?(attributeName: string): ISymbolType | null;
    setAttribute?(attributeName: string, _value: ISymbolType): void;
}
/**
 * Null type to differentiate from null values from the host language
 * Methods returning `null` should return this type, also as empty variables should keep this.
 * Host language `null` or `undefined` will crash when used as values during intepretation.
 */
declare class NullSymbol extends BaseSymbolType {
    type: string;
    static readonly type = "Null";
    constructor(config?: Config);
    validValue(val: any): boolean;
    toString(): string;
    deepCopy(): NullSymbol;
    cloneIfMutable(): NullSymbol;
    equals(other: ISymbolType): boolean;
    static empty(): NullSymbol;
    toJs(_options?: ToJsOptions): null;
}
type NumberValue = number | null;
declare class NumberSymbol extends BaseSymbolType {
    type: string;
    static readonly type = "Number";
    static _SUPPORTED_METHODS: {
        to_string: {
            name: string;
            function: (this: NumberSymbol, radix?: NumberSymbol) => StringSymbol;
            args: {
                name: string;
                type: string;
                optional: boolean;
            }[];
            returnType: string;
        };
    };
    value: NumberValue;
    constructor(value: number | NumberSymbol | NumberWithUnitSymbol | null, config?: Config);
    validValue(val: any): boolean;
    expectSafeValue(val: any): asserts val is number;
    toString(): string;
    deepCopy(): NumberSymbol;
    cloneIfMutable(): NumberSymbol;
    static empty(): NumberSymbol;
    hasAttribute(attributeName: string): boolean;
    getAttribute(attributeName: string): ISymbolType | null;
    toStringSymbol(radix?: NumberSymbol): StringSymbol;
    toJs(_options?: ToJsOptions): NumberValue;
}
type StringValue = string | null;
declare class StringSymbol extends BaseSymbolType {
    type: string;
    static readonly type = "String";
    static _SUPPORTED_METHODS: {
        upper: {
            function: (this: StringSymbol) => StringSymbol;
            args: never[];
            returnType: string;
        };
        lower: {
            function: (this: StringSymbol) => StringSymbol;
            args: never[];
            returnType: string;
        };
        length: {
            function: (this: StringSymbol) => NumberSymbol;
            args: never[];
            returnType: string;
        };
        concat: {
            function: (this: StringSymbol, other: StringSymbol) => StringSymbol;
            args: {
                name: string;
                type: string;
            }[];
            returnType: string;
        };
        split: {
            function: (this: StringSymbol, delimiter?: StringSymbol) => ListSymbol;
            args: {
                name: string;
                type: string;
                optional: boolean;
            }[];
            returnType: string;
        };
    };
    value: StringValue;
    constructor(value: string | StringSymbol | null, config?: Config);
    validValue(val: any): boolean;
    expectSafeValue(val: any): asserts val is string;
    upper(): StringSymbol;
    deepCopy(): StringSymbol;
    cloneIfMutable(): StringSymbol;
    static empty(): StringSymbol;
    lower(): StringSymbol;
    length(): NumberSymbol;
    concat(other: StringSymbol): StringSymbol;
    split(delimiter?: StringSymbol): ListSymbol;
    toJs(_options?: ToJsOptions): StringValue;
}
type BooleanValue = boolean | null;
declare class BooleanSymbol extends BaseSymbolType {
    type: string;
    static readonly type = "Boolean";
    value: BooleanValue;
    constructor(value: boolean | BooleanSymbol | null, config?: Config);
    validValue(val: any): boolean;
    expectSafeValue(val: any): asserts val is boolean;
    deepCopy(): BooleanSymbol;
    cloneIfMutable(): BooleanSymbol;
    static empty(): BooleanSymbol;
    toJs(_options?: ToJsOptions): BooleanValue;
}
declare class ListSymbol extends BaseSymbolType {
    type: string;
    static readonly type = "List";
    static _SUPPORTED_METHODS: {
        append: {
            function: (this: ListSymbol, item: ISymbolType) => ListSymbol;
            args: {
                name: string;
                type: string;
            }[];
            returnType: string;
        };
        extend: {
            function: (this: ListSymbol, ...items: ISymbolType[]) => ListSymbol;
            args: never[];
            returnType: string;
        };
        insert: {
            function: (this: ListSymbol, index: NumberSymbol, item: ISymbolType) => ListSymbol;
            args: {
                name: string;
                type: string;
            }[];
            returnType: string;
        };
        delete: {
            function: (this: ListSymbol, index: NumberSymbol) => ListSymbol;
            args: {
                name: string;
                type: string;
            }[];
            returnType: string;
        };
        length: {
            function: (this: ListSymbol) => NumberSymbol;
            args: never[];
            returnType: string;
        };
        index: {
            function: (this: ListSymbol, item: ISymbolType) => NumberSymbol;
            args: {
                name: string;
                type: string;
            }[];
            returnType: string;
        };
        get: {
            function: (this: ListSymbol, index: NumberSymbol) => ISymbolType;
            args: {
                name: string;
                type: string;
            }[];
            returnType: string;
        };
        update: {
            function: (this: ListSymbol, index: NumberSymbol, item: ISymbolType) => ListSymbol;
            args: {
                name: string;
                type: string;
            }[];
            returnType: string;
        };
        join: {
            function: (this: ListSymbol, separator?: StringSymbol) => StringSymbol;
            args: {
                name: string;
                type: string;
                optional: boolean;
            }[];
            returnType: string;
        };
    };
    value: ISymbolType[];
    isImplicit: boolean;
    constructor(elements: ISymbolType[] | null, isImplicit?: boolean, config?: Config);
    validValue(val: any): boolean;
    toString(): string;
    append(item: ISymbolType): ListSymbol;
    extend(...items: ISymbolType[]): ListSymbol;
    insert(indexSymbol: NumberSymbol, item: ISymbolType): ListSymbol;
    delete(indexSymbol: NumberSymbol): ListSymbol;
    length(): NumberSymbol;
    index(item: ISymbolType): NumberSymbol;
    get(indexSymbol: NumberSymbol): ISymbolType;
    update(indexSymbol: NumberSymbol, item: ISymbolType): ListSymbol;
    join(separator?: StringSymbol): StringSymbol;
    deepCopy(): ListSymbol;
    cloneIfMutable(): ListSymbol;
    static empty(): ListSymbol;
    getTypeName(): string;
    toJs(options?: ToJsOptions): JsValue[];
}
type NumberWithUnitValue = number | null;
declare class NumberWithUnitSymbol extends BaseSymbolType {
    type: string;
    static readonly type = "NumberWithUnit";
    static _SUPPORTED_METHODS: {
        to_string: {
            name: string;
            function: (this: NumberWithUnitSymbol) => StringSymbol;
            args: {
                name: string;
                type: string;
                optional: boolean;
            }[];
            returnType: string;
        };
        to_number: {
            function: (this: NumberWithUnitSymbol) => NumberSymbol;
            args: never[];
            returnType: string;
        };
    };
    value: NumberWithUnitValue;
    unit: SupportedFormats;
    constructor(value: number | NumberSymbol | null, unit: SupportedFormats | string, config?: Config);
    validValue(val: any): boolean;
    static fromRecord(record: {
        value: number | string;
        unit: string;
        type?: string;
    }, config?: Config): NumberWithUnitSymbol | undefined;
    toString(): string;
    expectSafeValue(val: any): asserts val is number;
    toStringSymbol(): StringSymbol;
    to_number(): NumberSymbol;
    equals(other: ISymbolType): boolean;
    deepCopy(): NumberWithUnitSymbol;
    cloneIfMutable(): NumberWithUnitSymbol;
    static empty(): NumberWithUnitSymbol;
    hasAttribute(attributeName: string): boolean;
    getAttribute(attributeName: string): ISymbolType | null;
    getTypeName(): string;
    toJs(options?: ToJsOptions): string | {
        value: number | null;
        unit: string;
    };
}
declare class DictionarySymbol extends BaseSymbolType {
    type: string;
    static readonly type = "Dictionary";
    static _SUPPORTED_METHODS: {
        get: {
            function: (this: DictionarySymbol, key: StringSymbol) => ISymbolType;
            args: {
                name: string;
                type: string;
                optional: boolean;
            }[];
            returnType: string;
        };
        set: {
            function: (this: DictionarySymbol, key: StringSymbol, value: ISymbolType) => DictionarySymbol;
            args: {
                name: string;
                type: string;
                optional: boolean;
            }[];
            returnType: string;
        };
        delete: {
            function: (this: DictionarySymbol, key: StringSymbol) => DictionarySymbol;
            args: {
                name: string;
                type: string;
                optional: boolean;
            }[];
            returnType: string;
        };
        keys: {
            function: (this: DictionarySymbol) => ListSymbol;
            args: never[];
            returnType: string;
        };
        values: {
            function: (this: DictionarySymbol) => ListSymbol;
            args: never[];
            returnType: string;
        };
        key_exists: {
            function: (this: DictionarySymbol, key: StringSymbol) => BooleanSymbol;
            args: {
                name: string;
                type: string;
                optional: boolean;
            }[];
            returnType: string;
        };
        length: {
            function: (this: DictionarySymbol) => NumberSymbol;
            args: never[];
            returnType: string;
        };
        clear: {
            function: (this: DictionarySymbol) => DictionarySymbol;
            args: never[];
            returnType: string;
        };
    };
    value: Map<string, ISymbolType>;
    constructor(value: Map<string, ISymbolType> | Record<string, ISymbolType> | DictionarySymbol | null, config?: Config);
    validValue(val: any): boolean;
    toString(): string;
    get(key: StringSymbol): ISymbolType;
    set(key: StringSymbol, value: ISymbolType): DictionarySymbol;
    delete(key: StringSymbol): DictionarySymbol;
    keys(): ListSymbol;
    values(): ListSymbol;
    keyExists(key: StringSymbol): BooleanSymbol;
    length(): NumberSymbol;
    clear(): DictionarySymbol;
    deepCopy(): DictionarySymbol;
    cloneIfMutable(): DictionarySymbol;
    static empty(): DictionarySymbol;
    hasAttribute(attributeName: string): boolean;
    getAttribute(attributeName: string): ISymbolType | null;
    toJs(options?: ToJsOptions): Record<string, JsValue>;
}
type TokenValue = Map<string, ISymbolType> | ISymbolType[];
declare class TokenSymbol extends BaseSymbolType {
    type: string;
    static readonly type = "Token";
    static _SUPPORTED_METHODS: {
        get: {
            function: (this: TokenSymbol, keyOrIndex: StringSymbol | NumberSymbol) => ISymbolType;
            args: {
                name: string;
                type: string;
                optional: boolean;
            }[];
            returnType: string;
        };
        set: {
            function: (this: TokenSymbol, key: StringSymbol, value: ISymbolType) => TokenSymbol;
            args: {
                name: string;
                type: string;
                optional: boolean;
            }[];
            returnType: string;
        };
        keys: {
            function: (this: TokenSymbol) => ListSymbol;
            args: never[];
            returnType: string;
        };
        values: {
            function: (this: TokenSymbol) => ListSymbol;
            args: never[];
            returnType: string;
        };
        length: {
            function: (this: TokenSymbol) => NumberSymbol;
            args: never[];
            returnType: string;
        };
        append: {
            function: (this: TokenSymbol, item: ISymbolType) => TokenSymbol;
            args: {
                name: string;
                type: string;
            }[];
            returnType: string;
        };
        extend: {
            function: (this: TokenSymbol, ...items: ISymbolType[]) => TokenSymbol;
            args: never[];
            returnType: string;
        };
        insert: {
            function: (this: TokenSymbol, index: NumberSymbol, item: ISymbolType) => TokenSymbol;
            args: {
                name: string;
                type: string;
            }[];
            returnType: string;
        };
        delete: {
            function: (this: TokenSymbol, index: NumberSymbol) => TokenSymbol;
            args: {
                name: string;
                type: string;
            }[];
            returnType: string;
        };
        index: {
            function: (this: TokenSymbol, item: ISymbolType) => NumberSymbol;
            args: {
                name: string;
                type: string;
            }[];
            returnType: string;
        };
        update: {
            function: (this: TokenSymbol, index: NumberSymbol, item: ISymbolType) => TokenSymbol;
            args: {
                name: string;
                type: string;
            }[];
            returnType: string;
        };
        join: {
            function: (this: TokenSymbol, separator?: StringSymbol) => StringSymbol;
            args: {
                name: string;
                type: string;
                optional: boolean;
            }[];
            returnType: string;
        };
    };
    subType: string;
    value: TokenValue;
    constructor(subType: string, value: TokenValue | Record<string, ISymbolType> | TokenSymbol | null, config?: Config);
    validValue(val: any): boolean;
    toString(): string;
    get(keyOrIndex: StringSymbol | NumberSymbol | string | number): ISymbolType;
    set(key: StringSymbol, value: ISymbolType): TokenSymbol;
    keys(): ListSymbol;
    values(): ListSymbol;
    length(): NumberSymbol;
    append(item: ISymbolType): TokenSymbol;
    extend(...items: ISymbolType[]): TokenSymbol;
    insert(indexSymbol: NumberSymbol, item: ISymbolType): TokenSymbol;
    delete(indexSymbol: NumberSymbol): TokenSymbol;
    index(item: ISymbolType): NumberSymbol;
    update(indexSymbol: NumberSymbol, item: ISymbolType): TokenSymbol;
    join(separator?: StringSymbol): StringSymbol;
    deepCopy(): TokenSymbol;
    cloneIfMutable(): TokenSymbol;
    static empty(): TokenSymbol;
    hasAttribute(attributeName: string): boolean;
    getAttribute(attributeName: string): ISymbolType | null;
    getTypeName(): string;
    toJs(options?: ToJsOptions): JsValue[] | Record<string, JsValue>;
}
type dynamicColorValue = Record<string, ISymbolType>;
type ColorValue = string | dynamicColorValue | null;
declare class ColorSymbol extends BaseSymbolType {
    type: string;
    static readonly type = "Color";
    static _SUPPORTED_METHODS: {
        to_string: {
            name: string;
            function: (this: ColorSymbol) => StringSymbol;
            args: never[];
            returnType: string;
        };
    };
    subType: string | null;
    value: ColorValue;
    alpha: number | null;
    static empty(): ColorSymbol;
    constructor(value: ColorValue, subType?: string, alpha?: number | null, config?: Config);
    toStringSymbol(): StringSymbol;
    toString(): string;
    to(targetType: string): ColorSymbol;
    typeEquals(other: ISymbolType): boolean;
    isHex(): boolean;
    validValue(val: any): boolean;
    equals(other: ISymbolType): boolean;
    deepCopy(): ColorSymbol;
    cloneIfMutable(): ColorSymbol;
    hasAttribute(attributeName: string): boolean;
    getAttribute(attributeName: string): ISymbolType | null;
    hasMethod(methodName: string, args: ISymbolType[]): boolean;
    callMethod(methodName: string, args: ISymbolType[]): ISymbolType | null | undefined;
    getTypeName(): string;
    toJs(options?: ToJsOptions): string | Record<string, JsValue>;
}
declare const jsValueToSymbolType: (value: any, config?: Config) => ISymbolType;
/**
 * Represents a JavaScript value that can be produced from a TokenScript symbol.
 * This includes primitives, arrays, and plain objects (recursively).
 */
type JsValue = string | number | boolean | null | JsValue[] | {
    [key: string]: JsValue;
};

/**
 * Utilities for working with TokenScript schema URIs
 *
 * Handles URI construction, parsing, and manipulation for the TokenScript schema registry.
 */
type SemanticVersion = {
    major: number;
} | {
    major: number;
    minor: number;
} | {
    major: number;
    minor: number;
    patch: number;
};

type uri = string;
type specType = string;
/**
 * Base manager class that provides common functionality for managing specifications,
 * conversions, and BFS-based conversion path resolution.
 */
declare abstract class BaseManager<TSpec, TInput, TOutput> {
    protected specs: Map<uri, TSpec>;
    protected specTypes: Map<uri, specType>;
    protected conversions: Map<uri, Map<uri, (input: TInput) => TOutput>>;
    protected parentConfig?: Config;
    protected removeVersionFromUri(uri: uri): uri;
    /**
     * Check if two URIs point to the same schema (ignoring version)
     */
    protected isSameSchemaUri(uri1: uri, uri2: uri): boolean;
    /**
     * Parse semantic version from URI
     * Example: "/api/v1/schema/srgb-color/0.0.1/" -> { major: 0, minor: 0, patch: 1 }
     */
    protected parseSemverFromUri(uri: uri): SemanticVersion | null;
    /**
     * Get base URI without version
     * Example: "/api/v1/schema/srgb-color/0.0.1/" -> "/api/v1/schema/srgb-color/"
     */
    protected getBaseUri(uri: uri): uri;
    /**
     * Generate version resolution candidates from most specific to least specific
     * Example: "0.0.1" -> ["0.0.1", "0.0", "0", "latest"]
     */
    protected generateVersionCandidates(uri: uri): uri[];
    /**
     * Find the latest (highest) semantic version for a URI
     */
    protected findLatestVersion(uri: uri): uri | null;
    /**
     * Resolve URI by trying version candidates from most specific to least specific
     */
    protected resolveVersionUri(uri: uri): uri | null;
    /**
     * Find a conversion path from source to target format using BFS with version resolution
     */
    protected findConversionPath(sourceUri: uri, targetUri: uri): uri[];
    /**
     * Check if a conversion path exists between source and target URIs with version resolution
     */
    hasConversion(sourceUri: uri, targetUri: uri): boolean;
    /**
     * Get a specification by its URI with version resolution
     */
    getSpec(uri: uri): TSpec | undefined;
    /**
     * Convert input through a chain of conversions to reach the target URI with version resolution
     */
    protected convertThroughPath(input: TInput, sourceUri: uri, targetUri: uri): TOutput;
    /**
     * Register a conversion function between two URIs
     */
    protected registerConversionFunction(sourceUri: uri, targetUri: uri, conversionFn: (input: TInput) => TOutput): void;
    abstract register(uri: uri, spec: TSpec | specType): TSpec;
    protected abstract getSpecName(spec: TSpec): string;
    /**
     * Abstract method for creating a clone of the manager
     */
    abstract clone(): this;
    /**
     * Set the parent config reference
     */
    setParentConfig(config: Config): void;
    /**
     * Get the parent config reference
     */
    getParentConfig(): Config | undefined;
    /**
     * Creates interpreter configuration with full context for conversion functions and initializers.
     * Uses parent config if available to provide access to all managers and registrations.
     */
    protected createInterpreterConfig(references: Record<string, any>): {
        references: Record<string, any>;
        config?: Config;
    };
}

interface SpecProperty {
    type: "number" | "string" | "color";
}
interface SpecSchemaType {
    type: "object";
    properties: Record<string, SpecProperty>;
    required?: string[];
    order?: string[];
    additionalProperties?: boolean;
}
interface ColorSpecification {
    name: string;
    type: "color";
    description?: string;
    schema?: SpecSchemaType;
    initializers: Array<{
        title?: string;
        keyword: string;
        description?: string;
        script: {
            type: string;
            script: string;
        };
    }>;
    conversions: Array<{
        source: string;
        target: string;
        description?: string;
        lossless: boolean;
        script: {
            type: string;
            script: string;
        };
    }>;
}
declare const ColorSpecificationSchema: arktype_out_variants_object.ObjectType<{
    name: string;
    type: "color";
    initializers: {
        keyword: string;
        script: {
            type: string;
            script: string;
        };
        title?: string | undefined;
        description?: string | undefined;
    }[];
    conversions: {
        source: string;
        target: string;
        lossless: boolean;
        script: {
            type: string;
            script: string;
        };
        description?: string | undefined;
    }[];
    description?: string | undefined;
    schema?: {
        type: "object";
        properties: Record<string, SpecProperty>;
        required?: string[] | undefined;
        order?: string[] | undefined;
        additionalProperties?: boolean | undefined;
    } | undefined;
}, {}>;

type uriType$1 = string;
type Specs$1 = Map<uriType$1, ColorSpecification>;
interface FormatColorOptions {
    decimalPlaces?: number;
    removeTrailingZeros?: boolean;
}
declare class ColorManager extends BaseManager<ColorSpecification, ColorSymbol, ColorSymbol> {
    private initializers;
    constructor(defaultSpecs?: Specs$1);
    protected getSpecName(spec: ColorSpecification): string;
    /**
     * Creates a clone of this class to be passed down to initializers and conversion functions
     * Links properties to the parent config.
     */
    clone(): this;
    registerRootInitializers(_uri: uriType$1, spec: ColorSpecification): void;
    registerConversions(uri: uriType$1, spec: ColorSpecification): void;
    register(uri: uriType$1, spec: ColorSpecification | string): ColorSpecification;
    getSpecByType(type: string): ColorSpecification | undefined;
    getSpecFromColor(color: ColorSymbol): ColorSpecification | undefined;
    hasInitializer(keyword: string): boolean;
    executeInitializer(keyword: string, args: Array<ISymbolType>): ColorSymbol;
    hasConversionByType(sourceType: string, targetType: string): boolean;
    convertTo(color: ColorSymbol, targetUri: string): ColorSymbol;
    convertToByType(color: ColorSymbol, targetType: string): ColorSymbol;
    setAttribute(color: ColorSymbol, node: ReassignNode, attributeValue: ISymbolType): ColorSymbol;
    /**
     * Formats a number value, rounding to specified decimal places and optionally removing trailing zeros.
     *
     * @param value - The numeric value to format
     * @param decimalPlaces - Number of decimal places to round to
     * @param removeTrailingZeros - Whether to remove trailing zeros
     * @returns Formatted number string
     */
    private formatNumber;
    /**
     * Formats a ColorSymbol as a string representation using the appropriate schema-defined format.
     *
     * For hex colors (string values), returns the hex string as-is.
     * For dynamic colors (object values), uses the schema's `order` property to determine
     * parameter order and formats as a function call (e.g., "hsl(0, 100, 50.0)").
     * If alpha is set and less than 1, it is included as the fourth parameter.
     *
     * @param color - The ColorSymbol to format
     * @param opts - Formatting options for numeric values
     * @returns Formatted string representation of the color, or empty string if formatting fails
     *
     * @example
     * ```typescript
     * // Hex color
     * const hexColor = new ColorSymbol("#ff0000", "Hex");
     * manager.formatColorMethod(hexColor); // "#ff0000"
     *
     * // HSL color with schema order ["h", "s", "l"]
     * const hslColor = new ColorSymbol({ h: 0, s: 100, l: 50.123456 }, "HSL");
     * manager.formatColorMethod(hslColor); // "hsl(0, 100, 50.12)"
     *
     * // RGB color with alpha
     * const rgbColor = new ColorSymbol({ r: 255, g: 0, b: 0 }, "RGB", undefined, 0.5);
     * manager.formatColorMethod(rgbColor); // "rgb(255, 0, 0, 0.5)"
     * ```
     */
    formatColorMethod(color: ColorSymbol, opts?: FormatColorOptions): string;
}

declare const FunctionSpecificationSchema: arktype_out_variants_object.ObjectType<{
    name: string;
    type: "function";
    script: {
        type: string;
        script: string;
    };
    keyword: string;
    input?: {
        type: "object";
        properties?: Record<string, unknown> | undefined;
    } | undefined;
    description?: string | undefined;
    requirements?: string[] | undefined;
}, {}>;
interface FunctionSpecification {
    name: string;
    type: "function";
    input?: {
        type: "object";
        properties?: Record<string, unknown>;
    };
    script: {
        type: string;
        script: string;
    };
    keyword: string;
    description?: string;
    requirements?: string[];
}

type functionName = string;
type FunctionImpl = (...args: ISymbolType[]) => ISymbolType;
declare class FunctionsManager extends BaseManager<FunctionSpecification, ISymbolType[], ISymbolType> {
    private functionMap;
    constructor();
    protected getSpecName(spec: FunctionSpecification): string;
    clone(): this;
    register(name: functionName, spec: FunctionSpecification | string): FunctionSpecification;
    private setupBuiltinFunctions;
    private registerFunction;
    private registerDynamicFunction;
    getFunction(name: string): FunctionImpl | undefined;
    hasFunction(name: string): boolean;
    getFunctionNames(): string[];
}

interface ScriptBlock {
    type?: string;
    script: string;
}
interface Conversion {
    source: string;
    target: string;
    script: ScriptBlock;
    description?: string;
}
declare const UnitSpecificationSchema: arktype_out_variants_object.ObjectType<{
    name: string;
    type: "absolute" | "relative";
    keyword: string;
    description?: string | undefined;
    conversions?: {
        source: string;
        target: string;
        script: {
            script: string;
            type?: string | undefined;
        };
        description?: string | undefined;
    }[] | undefined;
    to_absolute?: {
        script: string;
        type?: string | undefined;
    } | undefined;
}, {}>;
interface UnitSpecification {
    name: string;
    type: "absolute" | "relative";
    keyword: string;
    description?: string;
    conversions?: Conversion[];
    to_absolute?: ScriptBlock;
}

type uriType = string;
type unitKey = string;
type Specs = Map<uriType, UnitSpecification>;
declare class UnitManager extends BaseManager<UnitSpecification, NumberWithUnitSymbol, NumberWithUnitSymbol> {
    private unitKeywords;
    constructor(defaultSpecs?: Specs);
    protected getSpecName(spec: UnitSpecification): string;
    /**
     * Creates a clone of this class to be passed down to initializers and conversion functions
     * Links properties to the parent config.
     */
    clone(): this;
    registerConversions(uri: uriType, spec: UnitSpecification): void;
    register(uri: uriType, spec: UnitSpecification | string): UnitSpecification;
    getSpecByKeyword(keyword: unitKey): UnitSpecification | undefined;
    getUriByKeyword(keyword: unitKey): string | undefined;
    convertTo(unit: NumberWithUnitSymbol, targetUri: uriType): NumberWithUnitSymbol;
    private isOneNumberRelative;
    private convertRelative;
    convertToCommonFormat(inputs: Array<NumberSymbol | NumberWithUnitSymbol>): Array<NumberSymbol | NumberWithUnitSymbol>;
}

interface LanguageOptions {
    MAX_ITERATIONS: number;
}
interface ConfigOptions {
    languageOptions?: LanguageOptions;
    colorManager?: ColorManager;
    unitManager?: UnitManager;
    functionsManager?: FunctionsManager;
}
declare const DEFAULT_LANGUAGE_OPTIONS: LanguageOptions;
declare class Config {
    languageOptions: LanguageOptions;
    colorManager: ColorManager;
    unitManager: UnitManager;
    functionsManager: FunctionsManager;
    constructor(options?: ConfigOptions);
    getType(baseType: string, subType?: string): ISymbolType;
    isTypeDefined(baseType: string, subType?: string): boolean;
    clone(): Config;
    registerSchemas(schemas: Array<{
        uri: string;
        schema: ColorSpecification | FunctionSpecification;
    }>): Config;
}

declare enum Operations {
    SUBTRACT = "-",
    ADD = "+",
    MULTIPLY = "*",
    DIVIDE = "/",
    POWER = "^",
    LOGIC_AND = "&&",
    LOGIC_OR = "||",
    LOGIC_NOT = "!"
}
declare enum SupportedFormats {
    PX = "px",
    EM = "em",
    REM = "rem",
    VW = "vw",
    VH = "vh",
    PT = "pt",
    IN = "in",
    CM = "cm",
    MM = "mm",
    DEG = "deg",
    PERCENTAGE = "%"
}
declare enum ReservedKeyword {
    TRUE = "true",
    FALSE = "false",
    NULL = "null",
    UNDEFINED = "undefined",
    WHILE = "while",
    IF = "if",
    ELSE = "else",
    ELIF = "elif",
    RETURN = "return",
    VARIABLE = "variable"
}
declare enum TokenType {
    REFERENCE = "REFERENCE",
    NUMBER = "NUMBER",
    OPERATION = "OPERATION",
    FORMAT = "FORMAT",
    LPAREN = "LPAREN",
    RPAREN = "RPAREN",
    EOF = "EOF",
    COMMA = "COMMA",
    HEX_COLOR = "HEX_COLOR",
    STRING = "STRING",
    EXPLICIT_STRING = "EXPLICIT_STRING",
    ASSIGN = "ASSIGN",
    IS_EQ = "IS_EQ",
    IS_GT = "GT",
    IS_LT = "LT",
    IS_GT_EQ = "IS_GT_EQ",
    IS_LT_EQ = "IS_LT_EQ",
    IS_NOT_EQ = "IS_NOT_EQ",
    RESERVED_KEYWORD = "RESERVED_KEYWORD",
    SEMICOLON = "SEMICOLON",
    LOGIC_NOT = "LOGIC_NOT",
    COLON = "COLON",
    DOT = "DOT",
    LOGIC_AND = "LOGIC_AND",
    LOGIC_OR = "LOGIC_OR",
    LBLOCK = "LBLOCK",
    RBLOCK = "RBLOCK"
}
interface Token {
    type: TokenType;
    value: any;
    line: number;
    pos: number;
    endPos: number;
}
interface ASTNode {
    token?: Token;
    nodeType: string;
}
interface ISymbolType {
    type: string;
    value: any;
    cloneIfMutable(): ISymbolType;
    deepCopy(): ISymbolType;
    typeEquals(other: ISymbolType): boolean;
    equals(other: ISymbolType): boolean;
    validValue(value: any): boolean;
    toJSON?(): any;
    toString(): string;
    getTypeName(): string;
    toJs(options?: {
        recursive?: boolean;
        stringify?: boolean;
    }): any;
    hasMethod?(methodName: string, args: ISymbolType[]): boolean;
    callMethod?(methodName: string, args: ISymbolType[]): ISymbolType | null | undefined;
    hasAttribute?(attributeName: string): boolean;
    getAttribute?(attributeName: string): ISymbolType | null;
    setAttribute?(attributeName: string, value: ISymbolType, config?: Config): void;
}
declare const UNINTERPRETED_KEYWORDS: string[];
type ReferenceRecordValue = string | number | ISymbolType;
type ReferenceRecord = Record<string, ReferenceRecordValue | Array<ReferenceRecordValue>>;

export { type ASTNode as A, BaseSymbolType as B, type ConfigOptions as C, DEFAULT_LANGUAGE_OPTIONS as D, FunctionCallNode as E, FunctionsManager as F, ImplicitListNode as G, ListNode as H, type ISymbolType as I, type JsValue as J, NoOpNode as K, type LanguageOptions as L, NumNode as M, NullSymbol as N, Operations as O, ReferenceNode as P, StringNode as Q, ReservedKeyword as R, StringSymbol as S, TokenSymbol as T, UnitManager as U, UnaryOpNode as V, type SpecProperty as W, Config as a, ColorManager as b, collectReferenceNodes as c, type ColorSpecification as d, ColorSpecificationSchema as e, filterAST as f, type FunctionSpecification as g, FunctionSpecificationSchema as h, type UnitSpecification as i, UnitSpecificationSchema as j, BooleanSymbol as k, ColorSymbol as l, DictionarySymbol as m, getResultTypeName as n, jsValueToSymbolType as o, ListSymbol as p, NumberSymbol as q, NumberWithUnitSymbol as r, SupportedFormats as s, TokenType as t, type Token as u, UNINTERPRETED_KEYWORDS as v, walkAST as w, type ReferenceRecordValue as x, type ReferenceRecord as y, BinOpNode as z };
