import type { DomicileHost } from "../domicile-host"; import type { On } from "./subscribe"; /** * One copy: an id, whether it is an image, enough of it to recognize, for an * image a small picture of it as a `data:` URL, and whether it is what the * clipboard holds. */ export type ClipboardEntry = { readonly current: boolean; readonly id: number; readonly image: boolean; readonly preview: string; readonly thumbnail: string | undefined; }; export type ClipboardListeners = { change: () => void; }; export type Clipboard = { /** Newest first; `undefined` until the compositor says. */ readonly entries: readonly ClipboardEntry[] | undefined; /** Put entry `id` back on the clipboard. An id since dropped sets nothing. */ copy: (id: number) => void; on: On; /** * Drop entry `id` and its copy. Removing the current entry also empties the * clipboard. An id since dropped removes nothing. */ remove: (id: number) => void; }; export type ClipboardHost = Pick; export declare const clipboard: (host: ClipboardHost) => Clipboard;