import { ALLOWED_PASTE_MIME_TYPES } from "@testbank-inc/common"; import type { ExcalidrawElement, NonDeletedExcalidrawElement } from "@excalidraw/element/types"; import type { Spreadsheet } from "./charts"; import type { BinaryFiles } from "./types"; export type PastedMixedContent = { type: "text" | "imageUrl"; value: string; }[]; export interface ClipboardData { spreadsheet?: Spreadsheet; elements?: readonly ExcalidrawElement[]; files?: BinaryFiles; text?: string; mixedContent?: PastedMixedContent; errorMessage?: string; programmaticAPI?: boolean; } type AllowedPasteMimeTypes = typeof ALLOWED_PASTE_MIME_TYPES[number]; export declare const probablySupportsClipboardReadText: boolean; export declare const probablySupportsClipboardWriteText: boolean; export declare const probablySupportsClipboardBlob: boolean; export declare const createPasteEvent: ({ types, files, }: { types?: { [x: string]: string | File | undefined; } | undefined; files?: File[] | undefined; }) => ClipboardEvent; export declare const serializeAsClipboardJSON: ({ elements, files, }: { elements: readonly NonDeletedExcalidrawElement[]; files: BinaryFiles | null; }) => string; export declare const copyToClipboard: (elements: readonly NonDeletedExcalidrawElement[], files: BinaryFiles | null, clipboardEvent?: ClipboardEvent | null) => Promise; /** * Reads OS clipboard programmatically. May not work on all browsers. * Will prompt user for permission if not granted. */ export declare const readSystemClipboard: () => Promise<{ [x: string]: string | File | undefined; }>; /** * Attempts to parse clipboard event. */ export declare const parseClipboard: (event: ClipboardEvent, isPlainPaste?: boolean) => Promise; export declare const copyBlobToClipboardAsPng: (blob: Blob | Promise) => Promise; export declare const copyTextToSystemClipboard: (text: string | null, clipboardEvent?: ClipboardEvent | null) => Promise; export {};