import { Ctx } from '@milkdown/kit/ctx'; import { EditorView } from '@milkdown/kit/prose/view'; import { MediaUploadHandler } from '../../types'; export { ACCEPTED_FILE_TYPES, isAcceptedAttachmentFile } from './acceptedFiles'; export interface AttachmentConfig { onUploadFile?: MediaUploadHandler; } export declare const attachmentConfig: import('@milkdown/utils').$Ctx; /** Paste/drop: insert at cursor. Slash menu: replace the current block (e.g. empty `/file` paragraph). */ export type AttachmentInsertMode = 'atCursor' | 'replaceBlock'; /** Upload a file and insert an attachment node (no placeholder). */ export declare function uploadAndInsertAttachment(view: EditorView, file: File, upload: MediaUploadHandler, options?: { mode?: AttachmentInsertMode; range?: { from: number; to: number; }; }): Promise; /** Upload attachment files sequentially (paste/drop). */ export declare function uploadAndInsertAttachments(view: EditorView, files: File[], upload: MediaUploadHandler, options?: { abortSignal?: AbortSignal; }): Promise; /** Open native file picker and upload the selected attachment (slash menu). */ export declare function pickAndUploadAttachment(view: EditorView, upload?: MediaUploadHandler): void; export declare function pickAndUploadAttachmentFromCtx(ctx: Ctx): void;