import { $ as ElementLowering, A as SignalPersistence, An as ModuleDeclIR, C as serviceSpecsOf, Cn as EnumIR, Ct as RegisteredCall, D as UnloweredSpec, Dn as ExtPayload, E as UnloweredModule, En as ExtModuleItem, Et as createCallRegistry, Fn as StructIR, Ht as ItemRegistry, In as TargetLanguage, It as ExprEmitter, Ln as TransformResult, M as ScopeProvider, Mn as PropIR, N as ParseRefinement, Nn as RouteIR, O as KotlinPersistedSignal, On as ExtValue, P as ParseRefinementTarget, Pn as StatementIR, Q as ElementClaimGuard, Rn as TypeIR, Rt as ExtExprSpec, S as selectDiscovered, Sn as EmitOptions, St as ParseContext, T as renderKotlinService, Tn as ExtDecl, Tt as SignalSpec, Yt as ModuleParseContext, _ as RegisteredService, a as CompilerOptions, b as createServiceRegistry, bn as ComponentIR, bt as MemberCallLowering, c as NATIVE_COMPILER_PLUGIN_API_V2, cn as EmitFieldValidators, ct as CallSite, d as SUPPORTED_PLUGIN_API_VERSIONS, dt as DeclCallSite, en as TopLevelRecognizer, et as ElementRegistry, f as ServiceSpec, ft as DeclConstructRecognizer, g as DiscoveredSelection, h as CompilerRegistries, i as CompilerModule, j as ScopeEnterContext, jn as ParseResult, k as PersistedSignalSite, kn as JsxElementIR, l as NATIVE_COMPILER_PLUGIN_API_VERSION, ln as EmitTarget, lt as ComputedDeclSpec, m as ValidateOptions, mn as StaticAttrValue, mt as DeclEmitter, n as CompilerConfig, nt as RetagContext, o as CompilerPass, on as EmitBinding, ot as CallRecognizer, p as StubAugmentation, pn as StatementEmitOptions, pt as DeclConstructSite, qt as ModuleItemEmitter, r as CompilerContext, rt as createElementRegistry, s as CompilerPlugin, sn as EmitContext, st as CallRegistry, t as CompilerBackend, tn as createItemRegistry, tt as RegisteredElementLowering, u as NativeCompiler, ut as DeclCallRecognizer, v as ServiceRegistry, vn as AttrIR, vt as DeclVerdict, w as ServiceDescriptor, wn as ExprIR, wt as SignalDeclSpec, x as orderPlugins, xn as DeclIR, xt as MemberCallSite, y as ServiceTables, yn as ChildIR, yt as ExtDeclSpec, zt as ExtItemSpec } from "./_chunks/plugin-BnNQpFbA.js"; //#region src/built-in-plugins.d.ts /** * Compiler-shipped plugins; a discovered plugin of the same name replaces one. NONE ship: every library (including * `@pyreon/hooks`, whose plain-service table the compiler used to carry as a generated copy) owns its lowering in its own * package and is discovered from the app's declared dependencies, so a bare `transform()` lowers only the core's own * authoring contract. The `builtIn` mechanism stays — a future compiler-shipped plugin registers here. */ export declare const BUILT_IN_PLUGINS: readonly CompilerPlugin[]; //#endregion //#region src/compiler.d.ts /** * Registrations are snapshotted once and never grow during compilation. * Every invocation owns its IR and warning buffers; no global plugin registry. * Custom callbacks receive isolated IR, including runtime-owned chart metadata. * @example * const compiler = createCompiler({ plugins: [{ * name: 'diagnostics', apiVersion: 2, * transformIR(module, context) { * if (!module.components.length) context.warn('No components found') * }, * }] }) * compiler.transform(source, { target: 'swift', filename: 'App.tsx' }) */ export declare function createCompiler(config?: CompilerConfig): NativeCompiler; //#endregion //#region src/backends.d.ts /** Built-in Swift emitter adapter for explicitly delegated backend plugins. * @example * const backend = { target: 'swift-preview', emit: swiftBackend.emit } */ export declare const swiftBackend: CompilerBackend<'swift'>; /** Built-in Kotlin emitter adapter for explicitly delegated backend plugins. * @example * const backend = { target: 'kotlin-preview', emit: kotlinBackend.emit } */ export declare const kotlinBackend: CompilerBackend<'kotlin'>; //#endregion //#region src/plugin-shape.d.ts /** * Full shape check for a plugin loaded from outside (a module's default * export). `createCompiler` repeats the cheap parts; this exists so the CLI can * reject a bad package plugin BEFORE building a compiler, naming the file. */ export declare function assertPluginShape(value: unknown): asserts value is { readonly name: string; readonly apiVersion: typeof NATIVE_COMPILER_PLUGIN_API_V2; }; //#endregion //#region src/plugin-verify.d.ts interface PluginSources { /** Text of every `.swift` file the plugin's runtime half ships. */ readonly swiftSources: readonly string[]; /** Text of every `.kt` file the plugin's runtime half ships. */ readonly kotlinSources: readonly string[]; } interface ServiceTypeFinding { readonly hook: string; readonly target: 'swift' | 'kotlin'; /** The identifier the emit references; empty when none could be read. */ readonly name: string; readonly message: string; } /** `PyreonShare` from `PyreonShare()` / `PyreonCamera(presenter: …)`. */ export declare function swiftTypeOf(initializer: string): string | undefined; /** * Every runtime type or function a Kotlin declaration block references as the * service itself: `remember { PyreonShare(ctx) }` and `= rememberPyreonX(…)`. * Hoisted composition-locals (`LocalContext.current`) are platform symbols, not * the plugin's, so they are deliberately not read. */ export declare function kotlinNamesOf(lines: readonly string[]): string[]; /** * Prove that every type a plugin's service descriptors reference actually * exists in the sources the plugin ships. A type that exists only in a * validation STUB passes every compile gate and then fails the device build — * the phantom-capability class. This reads declarations, not behaviour: it * cannot prove the signature matches, only that the name is real. * * @example * verifyServiceTypes({ services }, { swiftSources, kotlinSources }) // → [] */ export declare function verifyServiceTypes(plugin: Pick, sources: PluginSources): ServiceTypeFinding[]; //#endregion //#region src/parse.d.ts /** Options for {@link parsePyreon}. */ interface ParseOptions { /** * The registries (service hooks, element lowerings) to parse against. When * omitted the ACTIVE registries are used — those of the `createCompiler` * transform in progress — else the built-in defaults. */ readonly registries?: CompilerRegistries | undefined; } export declare function parsePyreon(source: string, filename?: string, options?: ParseOptions): ParseResult; //#endregion //#region src/validate.d.ts interface ValidationResult { /** True iff the source was accepted as syntactically valid. */ ok: boolean; /** Error output from the compiler when `ok` is false. */ error?: string; /** True iff this run was skipped (tool not available + not required). */ skipped?: boolean; /** Human-readable reason for a skip. */ skipReason?: string; /** * True iff the compiler never delivered a verdict: a spawn failure, a kill * by signal, or a timeout. Such a failure says nothing about the source and * is never cached (see `isTransientProcessFailure`). */ transient?: boolean; } export declare function isSwiftcAvailable(): boolean; /** * Validate Swift source via `swiftc -parse`. Returns a structured * result with `ok` + optional error. Honors PYREON_SKIP_NATIVE_VALIDATE * (force skip) and PYREON_REQUIRE_NATIVE_VALIDATE (fail-on-absent). */ export declare function validateSwift(source: string): ValidationResult; export declare function isSwiftUIAvailable(): boolean; export declare function validateSwiftTypecheck(source: string): ValidationResult; export declare function validateSwiftWithStubs(source: string, options?: ValidateOptions): ValidationResult; /** * Type-check SEVERAL emitted files as ONE Swift module, against the same stubs * `validateSwiftWithStubs` uses. * * Every other gate compiles one file at a time, and a per-file gate is * structurally blind to a cross-file collision: two schema-bearing modules * each declared `enum PyreonSchemaError`, each compiled cleanly on its own, * and together — the only way an app ever builds them — failed with * `invalid redeclaration`. This is the question a real Xcode target asks. * * Each file keeps its own imports and its own `private` scope (they are * written as separate files, not concatenated), so a file-private helper two * modules both declare is correctly NOT a collision. */ export declare function validateSwiftFilesWithStubs(sources: readonly string[], options?: ValidateOptions): ValidationResult; export declare function isKotlincAvailable(): boolean; /** * Validate Kotlin source via `kotlinc` (full semantic analysis) against * the bundled Compose stubs (see kotlin-stubs.ts). Returns the same * structured result shape as `validateSwift`. Honors the same env vars. * * Unlike `swiftc -parse`, kotlinc has no parse-only flag — it always * performs name + type resolution. To validate without depending on * the real Jetpack Compose libraries (which would require Gradle + * Android SDK + minutes of bootstrap), we compile alongside a tiny * stubs file that mocks the API surface our emitter uses. A real * production deploy compiles against actual Compose, not against * these stubs. */ export declare function validateKotlin(source: string, options?: ValidateOptions): ValidationResult; /** * Compile SEVERAL emitted files together with `kotlinc`, against the same * stubs `validateKotlin` uses — the Kotlin twin of * `validateSwiftFilesWithStubs`. Files emitted into one Gradle source set * share a package, so two that each declare the same top-level class are a * `Redeclaration` no per-file compile can see. Written as separate files, so * a `private` top-level helper stays file-scoped exactly as in a real build. */ export declare function validateKotlinFiles(sources: readonly string[], options?: ValidateOptions): ValidationResult; //#endregion //#region src/index.d.ts /** Compile with the built-in Swift/Kotlin pipeline. */ export declare function transform(source: string, options: EmitOptions): TransformResult; //#endregion export { type AttrIR, type CallRecognizer, type CallRegistry, type CallSite, type ChildIR, type CompilerBackend, type CompilerConfig, type CompilerContext, type CompilerModule, type CompilerOptions, type CompilerPass, type CompilerPlugin, type CompilerRegistries, type ComponentIR, type ComputedDeclSpec, type DeclCallRecognizer, type DeclCallSite, type DeclConstructRecognizer, type DeclConstructSite, type DeclEmitter, type DeclIR, type DeclVerdict, type DiscoveredSelection, type ElementClaimGuard, type ElementLowering, type ElementRegistry, type EmitBinding, type EmitContext, type EmitFieldValidators, type EmitOptions, type EmitTarget, type EnumIR, type ExprEmitter, type ExprIR, type ExtDecl, type ExtDeclSpec, type ExtExprSpec, type ExtItemSpec, type ExtModuleItem, type ExtPayload, type ExtValue, type ItemRegistry, type JsxElementIR, type KotlinPersistedSignal, type MemberCallLowering, type MemberCallSite, type ModuleDeclIR, type ModuleItemEmitter, type ModuleParseContext, NATIVE_COMPILER_PLUGIN_API_V2, NATIVE_COMPILER_PLUGIN_API_VERSION, type NativeCompiler, type ParseContext, type ParseOptions, type ParseRefinement, type ParseRefinementTarget, type ParseResult, type PersistedSignalSite, type PluginSources, type PropIR, type RegisteredCall, type RegisteredElementLowering, type RegisteredService, type RetagContext, type RouteIR, SUPPORTED_PLUGIN_API_VERSIONS, type ScopeEnterContext, type ScopeProvider, type ServiceDescriptor, type ServiceRegistry, type ServiceSpec, type ServiceTables, type ServiceTypeFinding, type SignalDeclSpec, type SignalPersistence, type SignalSpec, type StatementEmitOptions, type StatementIR, type StaticAttrValue, type StructIR, type StubAugmentation, type TargetLanguage, type TopLevelRecognizer, type TransformResult, type TypeIR, type UnloweredModule, type UnloweredSpec, type ValidateOptions, type ValidationResult, createCallRegistry, createElementRegistry, createItemRegistry, createServiceRegistry, orderPlugins, renderKotlinService, selectDiscovered, serviceSpecsOf };