import { $ as ElementLowering, $t as StructRefinementTarget, A as SignalPersistence, An as ModuleDeclIR, At as ModuleScanner, B as EmitPreparationResult, Bt as FieldValidators, Cn as EnumIR, D as UnloweredSpec, Dn as ExtPayload, Dt as JsxElementRewrite, En as ExtModuleItem, F as PropsTypeContext, Fn as StructIR, Ft as CallExprSite, G as MemberExprIR, Gt as ModuleFinish, H as FunctionSite, I as PropsTypeResolver, In as TargetLanguage, It as ExprEmitter, J as ReceiverLowering, Jt as ModuleItemTyping, K as MemberReadLowering, Kt as ModuleFinishTarget, L as CallExprIR, Ln as TransformResult, Lt as ExtExprIR, M as ScopeProvider, Mn as PropIR, Mt as RequestSource, N as ParseRefinement, Nn as RouteIR, Nt as ResolvedRequest, O as KotlinPersistedSignal, On as ExtValue, Ot as JsxRewriteContext, P as ParseRefinementTarget, Pn as StatementIR, Pt as CallExprRecognizer, Qt as StructRefinement, R as EmitPreparation, Rn as TypeIR, Rt as ExtExprSpec, Sn as EmitOptions, St as ParseContext, Tn as ExtDecl, Tt as SignalSpec, U as IdentifierLowering, Ut as MethodCallRecognizer, V as FunctionLowering, Vt as ItemBindings, W as IntrinsicLowering, Wt as MethodCallSite, X as ReceiverTargetLowering, Xt as ModuleReceiverLowering, Y as ReceiverSite, Yt as ModuleParseContext, Z as RefModifierLowering, Zt as ModuleReceiverSite, _n as WebViewFacade, _t as DeclValueBinding, a as CompilerOptions, an as ComponentInfo, at as AstNode, bn as ComponentIR, bt as MemberCallLowering, c as NATIVE_COMPILER_PLUGIN_API_V2, cn as EmitFieldValidators, ct as CallSite, dn as KotlinEmitContext, dt as DeclCallSite, en as TopLevelRecognizer, f as ServiceSpec, fn as MemberEmitScope, ft as DeclConstructRecognizer, gn as SwiftEmitContext, gt as DeclSwiftInit, hn as StructRegistry, ht as DeclLifecycle, i as CompilerModule, in as resolveThemeToken, it as AliasDeclSpec, j as ScopeEnterContext, jn as ParseResult, jt as RequestOptions, k as PersistedSignalSite, kn as JsxElementIR, kt as ModuleScan, l as NATIVE_COMPILER_PLUGIN_API_VERSION, ln as EmitTarget, lt as ComputedDeclSpec, m as ValidateOptions, mn as StaticAttrValue, mt as DeclEmitter, nn as DEFAULT_THEME, nt as RetagContext, o as CompilerPass, on as EmitBinding, ot as CallRecognizer, p as StubAugmentation, pn as StatementEmitOptions, pt as DeclConstructSite, q as ReceiverAssignSite, qt as ModuleItemEmitter, r as CompilerContext, rn as ThemeTable, s as CompilerPlugin, sn as EmitContext, t as CompilerBackend, un as HostStateSlot, ut as DeclCallRecognizer, vn as AttrIR, vt as DeclVerdict, w as ServiceDescriptor, wn as ExprIR, wt as SignalDeclSpec, xn as DeclIR, xt as MemberCallSite, yn as ChildIR, yt as ExtDeclSpec, z as EmitPreparationInput, zt as ExtItemSpec } from "./_chunks/plugin-BnNQpFbA.js"; //#region src/plugin-scope.d.ts interface PluginScope { /** The ext declaration bound to `name` in the component being emitted. */ declByName(name: string): ExtDecl | undefined; /** A file-scope item bound to `name`, unless this component declares the same name. */ itemByName(name: string): ExtModuleItem | undefined; /** Temporarily bind or hide names while emitting a callback; restore every name in finally. */ withBindings(bindings: readonly { readonly name: string; readonly declaration?: ExtDecl | undefined; }[], emit: () => T): T; /** The ext declarations of `(plugin, type)` in the component being emitted, frozen. */ decls(plugin: string, type: string): readonly ExtDecl[]; /** A value that lives for the component being emitted: `init` runs on first use of `key`. */ state(key: string, init: () => T): T; /** An opaque token to embed in emitted text; replaced by the value resolved for `key` once the component body has emitted. */ deferred(key: string, fallback?: string): string; /** Supply the text for every token created for `key`. */ resolveDeferred(key: string, value: string): void; /** Replace every deferred token in `text`; throws naming a key that was never resolved and has no fallback. */ finalize(text: string): string; } //#endregion //#region src/plugin-ast.d.ts /** * Pure ESTree helpers shared by the parser and by package-owned plugins (re-exported from * `@pyreon/native-compiler/plugin-api`). None reads parser state. */ type AnyNode = any; /** Walk `ExportNamedDeclaration → VariableDeclaration` OR a bare * `VariableDeclaration`, yielding the declarators. Shared by the http * collectors. */ export declare function topLevelDeclarators(node: AnyNode): AnyNode[]; export declare function readObjectProp(obj: AnyNode | undefined, name: string): AnyNode | undefined; /** Collect every string/number/boolean-literal property of an ObjectExpression * into a `name → String(value)` record. Non-literal values are dropped (the * caller decides whether a missing key is fatal). */ export declare function readLiteralEntries(obj: AnyNode | undefined): Record; /** * The raw value NODE of each non-computed property of an object literal. * * The node-level twin of {@link readLiteralEntries}, which collapses each * value to a string and therefore cannot distinguish "absent" from "present * but not a literal" — the exact distinction runtime path params turn on: a * MISSING param can only bail, while a present-but-reactive one lowers to * native string interpolation. */ export declare function readEntryNodes(obj: AnyNode | undefined): Record; /** The literal value of a string/number/boolean literal node, else undefined. */ export declare function literalScalar(v: AnyNode | undefined): string | number | boolean | undefined; /** The statically-known property name of an object-literal `Property`, else undefined. */ export declare function propName(prop: AnyNode): string | undefined; /** * The STATICALLY-KNOWN key of an object-literal / object-pattern property. * * A non-computed identifier key → its name; a string/number literal key * (`{ 'a-b': 1 }`, `{ 0: 1 }`, and the computed `{ ['a']: 1 }`) → its value. * Anything else — above all a COMPUTED identifier key `{ [kind]: … }`, whose * key is the RUNTIME VALUE of `kind`, not the string "kind" — is NOT * statically known and returns undefined. * * Every literal-config reader in this file goes through here. The class it * closes: readers tested `key.type === 'Identifier'` without `prop.computed`, * so `{ [kind]: v }` was silently read as the literal key "kind". Pair it with * {@link hasDynamicKey} to NAME the entry rather than silently skip it. */ export declare function staticPropKey(prop: AnyNode | undefined): string | undefined; /** * True when a property's key is a computed expression that is NOT a literal * (`{ [kind]: … }`, `{ [\`a${b}\`]: … }`) — i.e. the key only exists at * runtime, so no compile-time reader can know which entry it is. */ export declare function hasDynamicKey(prop: AnyNode | undefined): boolean; /** Source text of a dynamic key, for warnings (`[kind]`). */ export declare function dynamicKeyText(prop: AnyNode, ctx: { source: string; }): string; /** Strip TS type-only wrappers + parens to reach the underlying expression. */ export declare function unwrapTypeLayers(node: AnyNode | undefined): AnyNode | undefined; /** True for `null`, `undefined`, or an absent node — the entries the web drops. */ export declare function isNullishLiteral(v: AnyNode | undefined): boolean; /** * Evaluate a JSON-shaped literal AST node to its runtime value. * * Returns a WRAPPER (`{ value }`) rather than the value itself so a literal * `null` / `false` / `0` is distinguishable from "not a literal". */ export declare function readJsonLiteral(node: AnyNode | undefined): { value: unknown; } | undefined; //#endregion //#region src/expr-walk.d.ts /** * Pre-order walk over every ExprIR node reachable from `e` (descending * into JSX attrs + children, arrow bodies, call args, object fields, * etc.). `visit` runs on each node before its children, so a nested * reduce inside a reducer body is still reached. Exhaustive over the * ExprIR union. */ export declare function forEachExpr(e: ExprIR, visit: (n: ExprIR) => void): void; //#endregion //#region src/jsx-slot-attrs.d.ts /** * The warning for a JSX-valued attribute no native emitter reads, or * `undefined` when the pair is consumed (or the value is not a view). */ export declare function unconsumedSlotWarning(tag: string, attr: AttrIR): string | undefined; //#endregion //#region src/expr-utils.d.ts /** * Replace every free occurrence of identifier `name` in `expr` with * `replacement`. Returns null (CONSERVATIVE BAIL) when a nested arrow * shadows `name` — substituting inside the shadow would change * meaning, and distinguishing free-vs-bound occurrences across the * shadow boundary isn't worth the complexity for the `.update` shapes * real sources write (the param name and inner-callback param names * never collide in practice; a collision falls back to the caller's * no-lowering path with a warning). * * JSX subtrees recurse through attr/event/child expression slots — * JSX inside an `.update` callback is nonsense, but the walker stays * total so future callers can reuse it for other lowerings. */ export declare function substituteIdentifier(expr: ExprIR, name: string, replacement: ExprIR): ExprIR | null; /** * A numeric literal, or a negated one. PMTC parses `-2` as a unary minus over * `2`, so a reader that asks only `kind === 'literal'` treats every negative * constant as a runtime expression and emits a conversion around it. */ export declare function isNumericLiteralOrNegation(x: ExprIR): boolean; //#endregion //#region src/identifier-safety.d.ts /** * A LOCAL-variable base for a name that is derived from a user name * (`Val`, `Raw`): identifier-safe and never keyword-escaped, * because the emitter always appends a suffix — so `where` becomes * `whereVal`, a plain identifier on both targets — while a non-identifier * name (`'my-key'`) still yields something a declaration can carry. * Declarations/accesses of the NAME ITSELF use `swiftIdent`/`kotlinMember`, * never this. */ export declare function localBase(name: string): string; /** * Backtick-escape a Swift identifier if it collides with a reserved * keyword. Idempotent for non-keywords. * * swiftIdent('Counter') → 'Counter' * swiftIdent('guard') → '`guard`' * swiftIdent('class') → '`class`' * swiftIdent('count') → 'count' * * Apply at every identifier-position in the Swift emit: struct names, * let/var names, property accesses, function call labels, parameter * names. The escape is round-trippable — Swift accepts both * `` `guard` `` and the un-escaped form (when not a keyword), so the * emit stays human-readable for non-colliding names. */ export declare function swiftIdent(name: string): string; /** * Backtick-escape a Kotlin identifier if it collides with a reserved * keyword. Same shape as `swiftIdent` but with the Kotlin keyword set. */ export declare function kotlinIdent(name: string): string; /** * A Kotlin MEMBER name — enum entry, data-class property, named-argument * label — for a JS-side name that may be a keyword OR not an identifier at * all (`'my-key'`, `'has space'`; string-literal-union enum cases and * quoted object keys both produce these). Kotlin backtick-quotes any such * name and the serialized name stays the ORIGINAL string, so a `top-left` * enum entry or a `my-key` field round-trips through kotlinx JSON with no * `@SerialName`. A name Kotlin cannot quote even in backticks falls back to * the camelCase `safeIdent` form (the JSON key then diverges — rare, and * a compile beats a silent nothing). */ export declare function kotlinMember(name: string): string; //#endregion //#region src/spelling.d.ts /** * Pure target-spelling helpers the emitters AND package-owned plugins share (re-exported from `plugin-api`). * Nothing here reads emitter or parser state. */ /** * The Kotlin type of a TS integer `number`: `Long`, because Swift's `Int` is * 64-bit on every Apple target and one source must hold the same values on * both. Kotlin's `Int` is 32-bit; with it, `{"createdAt": 1726000000000}` * decoded on iOS and threw `Failed to parse int` on Android. */ export declare const KOTLIN_INT = "Long"; /** * A `CodingKeys` enum for a Codable struct whose field names are not all * plain Swift identifiers, or `[]` when none needs one. * * A KEYWORD name does NOT need it: `` var `where`: String `` synthesizes the * key "where" (backticks are not part of the name — verified by a real * encode/decode round trip, `identifier-safety-codable.test.ts`). Only a name * `swiftIdent` has to REWRITE (`'my-key'` → `myKey`) diverges from its JSON * key, and then every field of the struct must be listed. */ export declare function swiftCodingKeysLines(names: readonly string[], pad: string): string[]; //#endregion //#region src/string-literals.d.ts /** * Target-language string-literal quoters for the PMTC emitters. */ /** * A Kotlin STRING LITERAL for a JS string — the ONE quoting path every emit * site goes through. `JSON.stringify` is not a Kotlin quoter: it leaves `$` * unescaped (Kotlin's interpolation marker — `"due: $total"` silently READ * the signal `total`, so one source rendered differently on iOS and Android, * and an unbound name was a compile error), and it emits `\f` / `\b`, which * Kotlin's grammar does not have. Every C0/DEL control and the two JS line * separators go out as `\uXXXX`. Non-strings (numbers, booleans, null, * objects) keep `JSON.stringify` exactly as before. */ export declare function kotlinStr(v: unknown): string; /** * A Swift STRING LITERAL for a JS string — the ONE quoting path every emit * site goes through. `JSON.stringify` is not a Swift quoter: it emits `\b`, * `\f` and `\uXXXX`, none of which Swift's grammar has (Swift spells a code * point `\u{X}`), so a control character in a string was a compile error. * Backslash is escaped FIRST, which is what makes a literal `\(` in the * source inert (`\\(`) — no separate interpolation step, and no chance of * re-escaping the output of an earlier step into `\\\(`, which Swift reads as * an escaped backslash followed by a LIVE interpolation. Non-strings keep * `JSON.stringify` exactly as before. */ export declare function swiftStr(v: unknown): string; //#endregion //#region src/canonical-primitives.d.ts export declare function isCanonicalPrimitive(tag: string): boolean; //#endregion //#region src/registry-lookup.d.ts /** True when `name` is a tag a registered lowering marks usable as a style base. */ export declare function isStyleBasePrimitive(name: string): boolean; //#endregion //#region src/emit-style.d.ts interface StyleIR { /** Unique identifier — emitted as the ViewModifier struct name (Swift) * or the Modifier-helper function name (Kotlin). */ name: string; /** Declarative CSS-style properties. Each entry's CSS name maps to a * Swift/Kotlin idiom per the mapping table below. */ properties: StyleProperty[]; } interface StyleProperty { /** CSS property name in kebab-case (`background-color`, `padding`). */ name: string; /** Resolved value — Phase 0 supports literal strings + token refs. */ value: StyleValue; } type StyleValue = { kind: 'string'; value: string; } | { kind: 'number'; value: number; } | /** * Token reference — `PyreonTokens..`. The emitter * threads through to the target's canonical token access syntax. * Lets styled() refer to design-system tokens by name rather than * by value, so style updates flow through the token table. */ { kind: 'token'; group: string; entry: string; }; //#endregion export { type AliasDeclSpec, type AstNode, type AttrIR, type CallExprIR, type CallExprRecognizer, type CallExprSite, type CallRecognizer, type CallSite, type ChildIR, type CompilerBackend, type CompilerContext, type CompilerModule, type CompilerOptions, type CompilerPass, type CompilerPlugin, type ComponentIR, type ComponentInfo, type ComputedDeclSpec, DEFAULT_THEME, type DeclCallRecognizer, type DeclCallSite, type DeclConstructRecognizer, type DeclConstructSite, type DeclEmitter, type DeclIR, type DeclLifecycle, type DeclSwiftInit, type DeclValueBinding, type DeclVerdict, type ElementLowering, type EmitBinding, type EmitContext, type EmitFieldValidators, type EmitOptions, type EmitPreparation, type EmitPreparationInput, type EmitPreparationResult, type EmitTarget, type EnumIR, type ExprEmitter, type ExprIR, type ExtDecl, type ExtDeclSpec, type ExtExprIR, type ExtExprSpec, type ExtItemSpec, type ExtModuleItem, type ExtPayload, type ExtValue, type FieldValidators, type FunctionLowering, type FunctionSite, type HostStateSlot, type IdentifierLowering, type IntrinsicLowering, type ItemBindings, type JsxElementIR, type JsxElementRewrite, type JsxRewriteContext, type KotlinEmitContext, type KotlinPersistedSignal, type MemberCallLowering, type MemberCallSite, type MemberEmitScope, type MemberExprIR, type MemberReadLowering, type MethodCallRecognizer, type MethodCallSite, type ModuleDeclIR, type ModuleFinish, type ModuleFinishTarget, type ModuleItemEmitter, type ModuleItemTyping, type ModuleParseContext, type ModuleReceiverLowering, type ModuleReceiverSite, type ModuleScan, type ModuleScanner, NATIVE_COMPILER_PLUGIN_API_V2, NATIVE_COMPILER_PLUGIN_API_VERSION, type ParseContext, type ParseRefinement, type ParseRefinementTarget, type ParseResult, type PersistedSignalSite, type PluginScope, type PropIR, type PropsTypeContext, type PropsTypeResolver, type ReceiverAssignSite, type ReceiverLowering, type ReceiverSite, type ReceiverTargetLowering, type RefModifierLowering, type RequestOptions, type RequestSource, type ResolvedRequest, type RetagContext, type RouteIR, type ScopeEnterContext, type ScopeProvider, type ServiceDescriptor, type ServiceSpec, type SignalDeclSpec, type SignalPersistence, type SignalSpec, type StatementEmitOptions, type StatementIR, type StaticAttrValue, type StructIR, type StructRefinement, type StructRefinementTarget, type StructRegistry, type StubAugmentation, type StyleIR, type StyleProperty, type StyleValue, type SwiftEmitContext, type TargetLanguage, type ThemeTable, type TopLevelRecognizer, type TransformResult, type TypeIR, type UnloweredSpec, type ValidateOptions, type WebViewFacade, resolveThemeToken };