import { type Mountable } from './build-context.js'; import type { LiveSignal } from './types.js'; /** A declared reactive input to `foreign`: an accessor + its dep paths. */ export interface SignalSpec { produce: (state: unknown) => T; deps: readonly string[]; } export interface ForeignSpec>> { /** host element tag (default 'div') */ tag?: string; /** declared reactive inputs — materialized to LiveSignals for `mount` */ state?: State; /** build the imperative instance into the host element */ mount: (args: { el: Element; state: { [K in keyof State]: LiveSignal ? T : unknown>; }; }) => Inst; /** tear down the instance (runs on the owning component's dispose) */ unmount?: (instance: Inst) => void; } /** * Imperative-subtree boundary. Declared `state` signals are materialized to * LiveSignals (peek + bind) and handed to `mount`, which builds a third-party * instance into the host element. The signals stay reactive: when a declared * input changes, its LiveSignal fires bound callbacks. `unmount` runs on the * owning component's dispose. Communicate OUT via `send` (closed over from the * view bag). The analyzer sees the declared deps; the imperative body is opaque. */ export declare function signalForeign>>(spec: ForeignSpec): Mountable; //# sourceMappingURL=foreign.d.ts.map