import { BlockModel } from '@blockeditor/store'; /** * When the attachment is uploading, the `sourceId` is `undefined`. * And we can query the upload status by the `isAttachmentLoading` function. * * Other collaborators will see an error attachment block when the blob has not finished uploading. * This issue can be resolve by sync the upload status through the awareness system in the future. * * When the attachment is uploaded, the `sourceId` is the id of the blob. * * If there are no `sourceId` and the `isAttachmentLoading` function returns `false`, * it means that the attachment is failed to upload. */ /** * @deprecated */ type BackwardCompatibleUndefined = undefined; export type AttachmentBlockProps = { name: string; size: number; /** * MIME type */ type: string; caption?: string; sourceId?: string; /** * Whether to show the attachment as an embed view. */ embed: boolean | BackwardCompatibleUndefined; }; export declare const defaultAttachmentProps: AttachmentBlockProps; export declare const AttachmentBlockSchema: { version: number; model: { role: "root" | "hub" | "content"; props: import("@blockeditor/store").PropsGetter; flavour: "affine:attachment"; } & { version: number; role: "content"; parent: string[]; }; onUpgrade?: ((data: AttachmentBlockProps, previousVersion: number, latestVersion: number) => void) | undefined; transformer?: (() => import("@blockeditor/store").BaseBlockTransformer) | undefined; }; export declare class AttachmentBlockModel extends BlockModel { } export {}; //# sourceMappingURL=attachment-model.d.ts.map