/** * Rx — Reactive expression builder. * * Builds template expressions like "{{ count + 1 }}" or "{{ user.name }}" * that are evaluated client-side by the prefab renderer. * * Usage: * rx('count') → "{{ count }}" * rx('count').add(1) → "{{ count + 1 }}" * rx('user').dot('name') → "{{ user.name }}" * rx('items').length() → "{{ items | length }}" * rx('price').currency('USD') → "{{ price | currency:'USD' }}" * rx('active').then('Yes', 'No') → "{{ active ? 'Yes' : 'No' }}" */ export declare class Rx { private readonly expr; constructor(expression: string); /** Raw expression string without {{ }} wrapper */ get expression(): string; /** Serialize to "{{ expression }}" template string */ toString(): string; toJSON(): string; /** Dot-path access: rx('user').dot('name') → "{{ user.name }}" */ dot(key: string): Rx; /** Index access: rx('items').at(0) → "{{ items.0 }}" */ at(index: number | Rx): Rx; add(other: number | string | Rx): Rx; sub(other: number | string | Rx): Rx; mul(other: number | string | Rx): Rx; div(other: number | string | Rx): Rx; mod(other: number | string | Rx): Rx; eq(other: unknown): Rx; neq(other: unknown): Rx; gt(other: number | Rx): Rx; gte(other: number | Rx): Rx; lt(other: number | Rx): Rx; lte(other: number | Rx): Rx; and(other: Rx): Rx; or(other: Rx): Rx; not(): Rx; then(ifTrue: unknown, ifFalse: unknown): Rx; currency(code?: string): Rx; percent(decimals?: number): Rx; number(decimals?: number): Rx; round(decimals?: number): Rx; compact(decimals?: number): Rx; abs(): Rx; date(format?: string): Rx; time(): Rx; datetime(): Rx; upper(): Rx; lower(): Rx; truncate(maxLength: number): Rx; pluralize(word?: string): Rx; length(): Rx; join(separator?: string): Rx; first(): Rx; last(): Rx; selectattr(attr: string): Rx; rejectattr(attr: string): Rx; default(value: unknown): Rx; /** * Append an arbitrary pipe filter: `rx('x').pipe('humanName')` → `{{ x | humanName }}` * * Supports variadic args: `.pipe('date', 'long')` → `{{ x | date:'long' }}` * Use this for custom pipes registered via `registerPipe()`. */ pipe(name: string, ...args: unknown[]): Rx; } /** Create an Rx expression referencing a state key */ export declare function rx(key: string): Rx; /** Current item in a ForEach loop */ export declare const ITEM: Rx; /** Current index in a ForEach loop */ export declare const INDEX: Rx; /** Value from an interaction event (input value, checkbox state, etc.) */ export declare const EVENT: Rx; /** Error message available in on_error callbacks */ export declare const ERROR: Rx; /** Return value available in on_success callbacks */ export declare const RESULT: Rx; /** * STATE proxy — convenience for accessing state keys. * Usage: STATE.foo → rx('foo'), STATE.user.name → rx('user.name') */ export declare const STATE: Record; //# sourceMappingURL=rx.d.ts.map