import { a as ConditionExpr, d as ValueExpr, P as PageSchema, R as RendererDiagnostic } from './schema-C4Hcw2Y6.js'; /** * Evaluation context passed through conditions, value lookups, and props. * * We keep the shape intentionally loose so adopters can project their own * data under any of the roots (state/props/flags/env/item). */ interface EvalContext { state?: Record; props?: Record; flags?: Record; env?: Record; item?: unknown; data?: Record; } declare function resolveValue(expr: ValueExpr, ctx: EvalContext): unknown; declare function lookupPath(path: string, ctx: EvalContext): unknown; declare function evaluateCondition(expr: ConditionExpr | undefined, ctx: EvalContext): boolean; /** * Recursively resolve `{$: "..."}` / `{$literal: ...}` inside a props object. * Plain values pass through untouched. */ declare function evaluateProps(input: unknown, ctx: EvalContext): unknown; /** * A component loader is any factory returning the framework-specific component. * Synchronous loaders are wrapped as resolved promises internally. */ type ComponentLoader = () => TComponent | Promise; interface RegistryEntry { loader: ComponentLoader; /** Optional display category / description; helpful for tooling. */ category?: string; description?: string; } interface Registry { register(name: string, loader: ComponentLoader, meta?: { category?: string; description?: string; }): void; registerAll(map: Record | RegistryEntry>): void; has(name: string): boolean; getLoader(name: string): ComponentLoader | undefined; /** Walk the schema and return the unique set of component names referenced. */ referencedNames(schema: PageSchema): Set; /** * Resolve all referenced components in advance. Returns a map of name → resolved * component. Missing names are reported via `onDiagnostic`. */ resolve(schema: PageSchema, onDiagnostic?: (d: RendererDiagnostic) => void): Promise>; } declare function createRegistry(): Registry; interface RemoteFetchOptions { url: string; /** * When the request fails or returns invalid JSON/schema, the caller receives * `fallback` instead and a diagnostic is emitted. */ fallback: PageSchema; /** Abort after `timeout` ms. Default 3000. */ timeout?: number; /** In-memory cache behavior. Default: 'default' (cache hit reused). */ cache?: 'default' | 'reload' | 'no-store'; /** Custom headers to send with the request. */ headers?: Record; /** Receives diagnostics (timeout, schema mismatch, parse error). */ onDiagnostic?: (d: RendererDiagnostic) => void; /** Custom fetch implementation (for tests / Node environments). Default: globalThis.fetch. */ fetchImpl?: typeof fetch; } declare function clearRemoteSchemaCache(): void; declare function fetchRemoteSchema(options: RemoteFetchOptions): Promise; export { type ComponentLoader as C, type EvalContext as E, type Registry as R, type RegistryEntry as a, type RemoteFetchOptions as b, clearRemoteSchemaCache as c, createRegistry as d, evaluateCondition as e, evaluateProps as f, fetchRemoteSchema as g, lookupPath as l, resolveValue as r };