@e280/quay
Version:
File-browser and outliner UI for the web
57 lines (56 loc) • 1.57 kB
TypeScript
import { MediaGroup } from "./group.js";
import { Cellar } from "../../../cellar/cellar.js";
import { MediaFormat } from "./schema.js";
import { CodexItem } from "../../aspects/codex/parts/codex-item.js";
export type MediaRecord = {
hash: string;
label: string;
format: MediaFormat;
mime: string;
size: number;
createdAt: number;
updatedAt: number;
};
export declare class MediaLibrary extends MediaGroup {
#private;
static open(scope?: string): Promise<MediaLibrary>;
cellar: Cellar;
constructor();
records(): AsyncGenerator<MediaRecord, void, unknown>;
findByHash(hash: string): (CodexItem<{
taxon: {
icon: import("@e280/sly").Content;
};
specimens: {
folder: {
label: string;
};
file: {
label: string;
format: MediaFormat;
previewUrl: string | null;
hash?: string;
mime?: string;
size?: number;
};
};
}, "file" | "folder"> & CodexItem<{
taxon: {
icon: import("@e280/sly").Content;
};
specimens: {
folder: {
label: string;
};
file: {
label: string;
format: MediaFormat;
previewUrl: string | null;
hash?: string;
mime?: string;
size?: number;
};
};
}, "file">) | undefined;
dispose(): void;
}