import "./file_preview.css"; import { useRender } from "@base-ui/react/use-render"; import type { DisplayFile } from "./file_thumbnail"; import { type StyleProps } from "./style_props"; /** From the `gallery` slice, `labels` overriding. */ export interface PreviewLabels { notAvailable: string; loadFailed: string; download: string; passwordProtected: string; } export interface FilePreviewProps extends StyleProps { file: DisplayFile; labels?: Partial; /** The package stays analytics-free. */ onError?: (error: unknown, meta: { fileId: string; mimeType: string; }) => void; /** Images only. */ rotation?: number; /** `"include"` for an auth-gated proxy; omitted for presigned URLs, where it trips CORS. */ credentials?: RequestCredentials; testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } export interface GalleryLabels extends PreviewLabels { close: string; previous: string; next: string; /** A file's ⋯ menu, wherever the file is drawn. */ actions: string; /** The menu's way into the viewer. */ open: string; openExternal: string; /** The menu's verbs where the host writes the field: a new display name, another file in this one's place. */ rename: string; replace: string; /** The rename dialog: its title naming the file, its field, and its two buttons. */ renameTitle: (filename: string) => string; name: string; save: string; cancel: string; /** Verb and noun, said one way wherever removal is offered. */ remove: string; /** A function, since word order differs by language. */ removeQuestion: (filename: string) => string; rotateLeft: string; rotateRight: string; saveRotation: string; } /** * Inline preview by MIME: native media elements, `pdfjs-dist`, `@lotics/docx`, `@lotics/xlsx`, each * dynamic-imported. PDF paints to canvas, since a nested PDF browsing context is blocked in the app * sandbox. */ export declare function FilePreview(props: FilePreviewProps): import("react").ReactElement>;