import type { Readable } from "svelte/store"; import type { ConfigurableNavigator } from "../_configurable"; export interface ClipboardOptions extends ConfigurableNavigator { /** * Enabled reading for clipboard * * @default false */ read?: boolean; /** * Copy source */ source?: Source; /** * Milliseconds to reset state of `copied` ref * * @default 1500 */ copied_during?: number; /** * Whether fallback to document.execCommand('copy') if clipboard is undefined. * * @default false */ legacy?: boolean; } export interface ClipboardReturn { is_supported: Readable; text: Readable; copied: Readable; copy: Optional extends true ? (text?: string) => Promise : (text: string) => Promise; } /** * Reactive Clipboard API. * * @param options */ export declare function clipboard(options?: ClipboardOptions): ClipboardReturn; export declare function clipboard(options: ClipboardOptions): ClipboardReturn;