import { I as InputFormat, a as CompileResponse, B as BehaviorSpec, A as AbstractOperation, T as TriggerDiff, O as OperationDiff, b as TestRenderer, c as TestRenderOptions, G as GeneratedTest, d as ComponentRenderer, e as ComponentRenderOptions, f as GeneratedComponent } from './service-qk1aChG9.js';
export { g as AddClassOp, h as AppendContentOp, i as BlurOp, C as CompilationService, j as CompileRequest, k as ComponentRequest, l as ComponentResponse, D as DecrementOp, m as Diagnostic, n as DiffInput, o as DiffRequest, p as DiffResponse, F as FetchOp, q as FocusOp, r as GeneratedTestOutput, H as HideOp, s as IncrementOp, L as LogOp, N as NavigateOp, t as OperationChangeKind, R as RemoveClassOp, S as SemanticJSON, u as SemanticJSONValue, v as ServiceOptions, w as SetContentOp, x as SetVariableOp, y as ShowOp, z as TargetRef, E as TestRequest, J as TestResponse, K as ToggleClassOp, M as TranslateRequest, P as TranslateResponse, Q as TriggerEventOp, V as ValidationResponse, W as WaitOp } from './service-qk1aChG9.js';
export { jsonToSemanticNode, validateSemanticJSON } from '@lokascript/framework/ir';

/**
 * Input format detection.
 *
 * Determines whether input is natural language, explicit syntax, or LLM JSON.
 */

/**
 * Detect the input format from a string.
 */
declare function detectFormat(input: string): InputFormat;

/**
 * Semantic-keyed LRU cache.
 *
 * Caches compilation results keyed by canonical semantic representation.
 * Different input languages that produce the same semantics hit the same cache.
 */

/**
 * Simple LRU cache using Map insertion order.
 */
declare class SemanticCache {
    private cache;
    private readonly maxSize;
    /** Cache hit/miss statistics */
    hits: number;
    misses: number;
    constructor(maxSize?: number);
    /**
     * Get a cached response, or undefined if not cached.
     */
    get(key: string): CompileResponse | undefined;
    /**
     * Store a response in the cache.
     */
    set(key: string, value: CompileResponse): void;
    /** Current cache size */
    get size(): number;
    /** Clear all entries */
    clear(): void;
}
/**
 * Generate a canonical cache key from a semantic node and compilation options.
 *
 * The key is based on semantic identity, not syntax — so the same behavior
 * described in English, Japanese, or explicit syntax produces the same key.
 */
declare function generateCacheKey(node: unknown, options: {
    optimization?: number;
    target?: string;
    minify?: boolean;
}): string;

/**
 * Operation Extraction
 *
 * Converts a SemanticNode (from the parsing pipeline) into a BehaviorSpec
 * containing abstract operations. This is the bridge between semantic roles
 * and framework-agnostic behavior descriptions.
 */

/**
 * Extract abstract operations from a semantic node.
 *
 * Handles event handlers (extracts trigger + recurses into body)
 * and standalone commands.
 */
declare function extractOperations(node: unknown): BehaviorSpec;

/**
 * Semantic Diff Engine
 *
 * Compares two BehaviorSpecs at the abstract operation level.
 * Uses LCS (longest common subsequence) for operation-level diffing
 * and post-processes to detect reorderings.
 */

interface DiffResult {
    identical: boolean;
    trigger: TriggerDiff | null;
    operations: OperationDiff[];
    summary: string;
}
/**
 * Compare two BehaviorSpecs and produce a structured diff.
 */
declare function diffBehaviors(a: BehaviorSpec, b: BehaviorSpec): DiffResult;
/**
 * Produce a deterministic string key for an AbstractOperation.
 * Two operations with the same key are semantically identical.
 */
declare function canonicalizeOp(op: AbstractOperation): string;

/**
 * Playwright Test Renderer
 *
 * Generates complete Playwright test files from BehaviorSpecs.
 * Each generated test creates an HTML fixture, triggers the behavior,
 * and asserts the expected DOM changes.
 */

declare class PlaywrightRenderer implements TestRenderer {
    readonly framework = "playwright";
    render(spec: BehaviorSpec, options?: TestRenderOptions): GeneratedTest;
}

/**
 * React Component Renderer
 *
 * Generates complete React functional components from BehaviorSpecs.
 * Maps abstract operations to React hooks (useState, useRef, useCallback) and JSX.
 */

declare class ReactRenderer implements ComponentRenderer {
    readonly framework = "react";
    render(spec: BehaviorSpec, options?: ComponentRenderOptions): GeneratedComponent;
}

/**
 * Vue 3 Component Renderer
 *
 * Generates Vue 3 Single File Components (SFC) with Composition API
 * (<script setup>) from BehaviorSpecs.
 * Maps abstract operations to Vue refs and template directives.
 */

declare class VueRenderer implements ComponentRenderer {
    readonly framework = "vue";
    render(spec: BehaviorSpec, options?: ComponentRenderOptions): GeneratedComponent;
}

/**
 * Svelte 5 Component Renderer
 *
 * Generates Svelte 5 components with runes ($state, $derived, $effect)
 * from BehaviorSpecs.
 * Maps abstract operations to direct state mutation and Svelte template syntax.
 */

declare class SvelteRenderer implements ComponentRenderer {
    readonly framework = "svelte";
    render(spec: BehaviorSpec, options?: ComponentRenderOptions): GeneratedComponent;
}

export { AbstractOperation, BehaviorSpec, CompileResponse, ComponentRenderOptions, ComponentRenderer, GeneratedComponent, GeneratedTest, InputFormat, OperationDiff, PlaywrightRenderer, ReactRenderer, SemanticCache, SvelteRenderer, TestRenderOptions, TestRenderer, TriggerDiff, VueRenderer, canonicalizeOp, detectFormat, diffBehaviors, extractOperations, generateCacheKey };
