export type { ExecutionContext, TypedExecutionContext, EvaluationType, HyperScriptValueType, ValidationResult, ValidationError, TypedResult, EnhancedError, PerformanceCharacteristics, ASTNode, ParseError, ExpressionNode, CommandNode as BaseCommandNode, EventHandlerNode, BehaviorNode, DefNode, } from './base-types';
import type { ExecutionContext, ASTNode, ExpressionNode, EvaluationType, ParseError } from './base-types';
export type ElementType = 'command' | 'expression' | 'feature' | 'keyword' | 'special_symbol';
export type ElementStatus = 'Draft' | 'Review' | 'Approved' | 'Deprecated';
export type ExpressionCategory = 'Arithmetic' | 'Logical' | 'Comparison' | 'Reference' | 'Conversion' | 'Special';
export type Associativity = 'Left' | 'Right' | 'None';
export interface ExtendedExecutionContext extends ExecutionContext {
    variables?: Map<string, unknown>;
    events?: Map<string, {
        target: HTMLElement;
        event: string;
        handler: Function;
    }>;
    parent?: ExtendedExecutionContext;
    meta?: Record<string, unknown>;
    flags?: {
        halted: boolean;
        breaking: boolean;
        continuing: boolean;
        returning: boolean;
        async: boolean;
    };
}
export interface CommandNode extends ASTNode {
    type: 'command';
    name: string;
    args: ExpressionNode[];
    body?: StatementNode[];
    implicitTarget?: ExpressionNode;
    isBlocking: boolean;
    modifiers?: Record<string, ExpressionNode>;
}
export interface FeatureNode extends ASTNode {
    type: 'feature';
    name: string;
    trigger?: string;
    body: StatementNode[];
    scope: 'global' | 'local' | 'behavior';
}
export interface StatementNode extends ASTNode {
    type: 'statement';
    command: CommandNode;
    conditions?: ExpressionNode[];
}
export interface Runtime {
    executeCommand(command: CommandNode, context: ExecutionContext): Promise<unknown>;
    evaluateExpression(expression: ExpressionNode, context: ExecutionContext): Promise<unknown>;
    createContext(parent?: ExecutionContext): ExecutionContext;
    registerCommand(name: string, implementation: BaseCommandImplementation): void;
    registerExpression(name: string, implementation: ExpressionImplementation): void;
    registerFeature(name: string, implementation: FeatureImplementation): void;
}
export interface BaseCommandImplementation {
    name: string;
    syntax: string;
    execute: (context: ExecutionContext, ...args: unknown[]) => Promise<unknown>;
    isBlocking: boolean;
    hasBody: boolean;
    implicitTarget?: string;
    implicitResult?: 'it' | 'result' | 'none';
    validate?: (args: unknown[]) => string | null;
}
export interface LegacyValidationResult<T = unknown> {
    success: boolean;
    data?: T;
    error?: import('./base-types').ValidationError;
}
export interface CommandImplementation<TInput = unknown, TOutput = unknown, TContext = import('./base-types').ExecutionContext> {
    metadata: {
        name: string;
        description: string;
        examples: string[];
        syntax: string;
        category: string;
        version: string;
    };
    validation: {
        validate(input: unknown): import('./base-types').ValidationResult<TInput>;
    };
    execute(input: TInput, context: TContext): Promise<TOutput>;
}
export interface ExpressionImplementation {
    name: string;
    category: ExpressionCategory;
    evaluatesTo: EvaluationType;
    evaluate: (context: ExecutionContext, ...args: unknown[]) => Promise<unknown>;
    precedence?: number;
    associativity?: Associativity;
    operators?: string[];
    validate?: (args: unknown[]) => string | null;
}
export interface FeatureImplementation {
    name: string;
    trigger?: string;
    install: (runtime: Runtime) => void;
    uninstall?: (runtime: Runtime) => void;
    scope: 'global' | 'local' | 'behavior';
}
export interface Token {
    kind: string;
    value: string;
    start: number;
    end: number;
    line: number;
    column: number;
}
export interface ParseWarning {
    type: string;
    message: string;
    suggestions: string[];
    severity: 'info' | 'warning' | 'error';
    code?: string;
    line?: number;
    column?: number;
}
export interface ParseResult<T = ASTNode> {
    success: boolean;
    node?: T;
    ast?: T;
    error?: ParseError;
    warnings?: ParseWarning[];
    tokens: Token[];
}
export interface Parser {
    parse(input: string): ParseResult<FeatureNode[]>;
    parseExpression(input: string): ParseResult<ExpressionNode>;
    parseCommand(input: string): ParseResult<CommandNode>;
    tokenize(input: string): Token[];
}
export interface LSPElement {
    id: number;
    name: string;
    description: string;
    syntax_canonical: string;
    status: ElementStatus;
    tags: string[];
    examples: LSPExample[];
}
export interface LSPCommand extends LSPElement {
    purpose: string;
    has_body: boolean;
    is_blocking: boolean;
    implicit_target?: string;
    implicit_result_target?: string;
    arguments?: LSPArgument[];
}
export interface LSPExpression extends LSPElement {
    category: ExpressionCategory;
    evaluates_to_type: EvaluationType;
    precedence?: number;
    associativity?: Associativity;
    operators?: string[];
}
export interface LSPFeature extends LSPElement {
    trigger?: string;
    structure_description?: string;
    scope_impact?: string;
}
export interface LSPExample {
    id: number;
    element_id: number;
    element_type: ElementType;
    example: string;
    description?: string;
    difficulty?: 'Beginner' | 'Intermediate' | 'Advanced';
    html_context?: string;
}
export interface LSPArgument {
    name: string;
    type: string;
    description: string;
    optional: boolean;
    default_value?: unknown;
}
export interface HyperscriptEvent extends CustomEvent {
    detail: {
        element: HTMLElement;
        context: ExecutionContext;
        command?: string;
        result?: unknown;
        error?: Error;
    };
}
export interface HyperscriptConfig {
    strict?: boolean;
    debug?: boolean;
    commands?: Record<string, BaseCommandImplementation>;
    expressions?: Record<string, ExpressionImplementation>;
    features?: Record<string, FeatureImplementation>;
    globals?: Record<string, unknown>;
    events?: {
        bubbling?: boolean;
        delegation?: boolean;
        passive?: boolean;
    };
    performance?: {
        cacheParsing?: boolean;
        lazyLoading?: boolean;
        bundleOptimization?: boolean;
    };
}
//# sourceMappingURL=core.d.ts.map