import type { Files } from "./desktop/files"; /** The kinds of file preview. */ export declare enum FilePreviewKind { Text = 0, Directory = 1, Audio = 2, Binary = 3, Unreadable = 4 } /** An audio file's tags. A missing tag is `undefined`. */ export type AudioTags = { album: string | undefined; artist: string | undefined; /** Embedded cover art, as a `data:` URL. */ cover: string | undefined; title: string | undefined; }; export declare const FilePreview: { /** An audio file and its tags. */ Audio: (tags: AudioTags) => { kind: FilePreviewKind.Audio; tags: AudioTags; }; /** A non-text file with nothing to preview. */ Binary: () => { kind: FilePreviewKind.Binary; }; /** The first entries of a directory. Subdirectories end in `/`. */ Directory: (entries: readonly string[]) => { entries: readonly string[]; kind: FilePreviewKind.Directory; }; /** The start of a text file. */ Text: (text: string) => { kind: FilePreviewKind.Text; text: string; }; /** Missing, or not readable. */ Unreadable: () => { kind: FilePreviewKind.Unreadable; }; }; export type FilePreview = ReturnType<(typeof FilePreview)[keyof typeof FilePreview]>; /** The file calls a preview makes. */ export type PreviewDesktop = { readonly files: Pick; }; /** * Preview `path`: a directory's entries, a song's tags, or the start of a * file as text. A relative path starts at the home. Songs are told by their * contents, not their names. */ export declare const previewFile: (domicile: PreviewDesktop, path: string) => Promise;