Work on export and moving to Vue composition API

This commit is contained in:
N-Pex 2025-06-27 16:10:25 +02:00
parent b0fae3396d
commit 9a124c5ab9
22 changed files with 660 additions and 906 deletions

View file

@ -8,16 +8,24 @@ export type KeanuEventExtension = {
replyEvent?: MatrixEvent & KeanuEventExtension;
}
export type EventAttachmentUrlType = "src" | "thumbnail";
export type EventAttachmentLoadSrcOptions = {
asBlob?: boolean;
}
export type EventAttachment = {
event: MatrixEvent & KeanuEventExtension;
name: string;
src?: string;
thumbnail?: string;
srcPromise?: Promise<string>;
thumbnailPromise?: Promise<string>;
srcSize: number;
srcProgress: number;
srcPromise?: Promise<{data: string | Blob, type: EventAttachmentUrlType}>;
thumbnail?: string;
thumbnailProgress: number;
loadSrc: () => void;
loadThumbnail: () => Promise<string>;
thumbnailPromise?: Promise<{data: string | Blob, type: EventAttachmentUrlType}>;
autoDownloadable: boolean;
loadSrc: (options?: EventAttachmentLoadSrcOptions) => Promise<{data: string | Blob, type: EventAttachmentUrlType}>;
loadThumbnail: () => Promise<{data: string | Blob, type: EventAttachmentUrlType}>;
release: (src: boolean, thumbnail: boolean) => void;
};