/** * Form participation utility for custom elements. * * Since @bquery/bquery does not support `static formAssociated = true`, * this module provides a hidden-input proxy pattern that allows custom * elements to participate in native `
` submission. */ export type FormProxyOptions = { /** * Optional callback invoked just before native form submission to * return the most-current value. Lets components avoid stale state * caused by missed `setValue` calls during fast user interaction * (e.g. slider drag-end racing with submit). */ getLiveValue?: () => string; }; export type FormProxy = { /** Update the proxied form value */ setValue(value: string): void; /** Update the proxied name attribute */ setName(name: string): void; /** Enable or disable the proxy */ setDisabled(disabled: boolean): void; /** Remove the proxy from the DOM */ cleanup(): void; }; /** * Creates a hidden `` in the light DOM immediately * after the host element. The hidden input mirrors name/value/disabled * so that the custom element data is included in native form submission. * * Pass `options.getLiveValue` to refresh the value lazily on the * `formdata` event of the closest ancestor ``. */ export declare function createFormProxy(host: HTMLElement, name: string, value: string, disabled?: boolean, options?: FormProxyOptions): FormProxy; //# sourceMappingURL=form.d.ts.map