1 | import { NodeType } from '@remirror/pm/model';
|
2 | import { EditorView } from '@remirror/pm/view';
|
3 | import { FileUploader } from './file-uploader';
|
4 | import { UploadContext } from './upload-context';
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | interface AbstractNodeAttributes {
|
10 | id?: any;
|
11 | error?: string | null;
|
12 | }
|
13 | export declare type UploadFileHandler<NodeAttributes> = () => FileUploader<NodeAttributes>;
|
14 | export interface UploadPlaceholderPayload<NodeAttributes extends AbstractNodeAttributes> {
|
15 | context: UploadContext;
|
16 | fileUploader: FileUploader<NodeAttributes>;
|
17 | }
|
18 | export interface UploadFileProps<NodeAttributes extends AbstractNodeAttributes = object> {
|
19 | file: File;
|
20 | pos: number | undefined;
|
21 | view: EditorView;
|
22 | fileType: NodeType;
|
23 | uploadHandler: UploadFileHandler<NodeAttributes>;
|
24 | }
|
25 |
|
26 |
|
27 |
|
28 | export declare function uploadFile<NodeAttributes extends AbstractNodeAttributes>({ file, pos, view, fileType, uploadHandler, }: UploadFileProps<NodeAttributes>): void;
|
29 | export {};
|