import "./media_view.css"; import type * as React from "react"; import { useRender } from "@base-ui/react/use-render"; import type { GalleryLabels } from "./file_preview"; import type { DisplayFile } from "./file_thumbnail"; import { type StyleProps } from "./style_props"; export interface MediaViewProps extends StyleProps { file: DisplayFile; /** What the file is to the record (its field's name): the picture's and the player's name. */ accessibilityLabel: string; /** Replace on the file's ⋯ over the frame's corner: the files picked, the caller's to upload. */ onReplace?: (files: File[]) => void; /** Rename on the file's ⋯: the whole new name, its extension the file's own; a throw keeps the dialog open. */ onRename?: (filename: string) => void | Promise; /** Remove on the file's ⋯, confirmed. */ onRemove?: () => void; /** Default fetch-and-save, sending `credentials`. */ onDownload?: () => void; credentials?: RequestCredentials; /** The picker's filter, e.g. `"image/*,video/*"`. */ accept?: string; /** A replacement is on its way: the frame keeps the file it shows under a spinner, its ⋯ waits. */ uploading?: boolean; labels?: Partial; testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } /** * THE ONE FILE A FIELD HOLDS, SHOWN WHOLE — a record's picture read in its body: an image at its own * ratio, a clip playable in place resting on its still, a recording in its player, any other file as its * kind's card. The frame takes the column's width up to the media height, its ratio read off the loaded * picture or clip so a portrait clip stands upright rather than letterboxed. Its ⋯ over the frame's corner opens * it in the viewer and downloads it; Rename, Replace and Remove where the host passes them. Many files are * `FileThumbnailGrid`'s. */ export declare function MediaView(props: MediaViewProps): React.ReactElement>;