import { ClipboardOptions } from './clipboard.types'; /** * Headless clipboard controller. Wires a trigger button to copy text to the * system clipboard and reflects a temporary `data-state="copied"` on the root * so CSS can swap an icon/label; it never applies visual styles itself. * * The text comes from (in priority order): the `text` option, or the * `[data-c42-clipboard-source]` element (its `value` for inputs/textareas, * otherwise its `textContent`). * * Markup: * ```html *
* * *
* ``` */ export declare class Clipboard { private readonly root; private readonly trigger; private readonly source; private text; private readonly timeout; private timer; private cleanups; constructor(root: HTMLElement, options?: ClipboardOptions); private resolveText; private write; private flashCopied; private emit; /** Set/override the text that the trigger copies. */ setText(text: string | null): void; /** Programmatically copy the current text. Resolves to whether it succeeded. */ copy(): Promise; /** Subscribe to a DOM event on the root element. Returns an unsubscribe fn. */ on(event: string, handler: (event: E) => void): () => void; destroy(): void; }