import { NativeSignal } from "native-signal/weak"; export interface BindOptions { /** * Which DOM event to listen to. * Defaults to "input" for text-like elements, "change" for select/checkbox/radio. * Override explicitly if needed. */ event?: "input" | "change"; /** * Value coercion to apply when reading from the DOM element. * Defaults are inferred from element type: * checkbox → boolean * number / range → number * select[multiple]→ string[] * everything else → string */ coerce?: "string" | "number" | "boolean" | "array"; } type BindableElement = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement; /** * Bind a form element to a NativeSignal bidirectionally. * * - DOM → Signal: listens for the appropriate event and updates the signal. * - Signal → DOM: subscribes to the signal and updates the element value. * * @returns An unsubscribe function to unbind signal and element. */ export declare function bind(el: BindableElement, signal: NativeSignal, opts?: BindOptions): () => void; /** * Create a bound input element in one call. * * @example * const [input, cleanup] = boundInput("text", mySignal, { placeholder: "Search…" }); * root.appendChild(input); */ export declare function boundInput(type: HTMLInputElement["type"], signal: NativeSignal, attrs?: Record, opts?: BindOptions): [HTMLInputElement, () => void]; /** * Create a bound