import "./thumbnail_grid.css"; import type * as React from "react"; import { useRender } from "@base-ui/react/use-render"; import { type DisplayFile, type UploadStatus, type UploadStatusLabels } from "./file_thumbnail"; import { type FileActsHandlers } from "./file_acts"; import { type DiffKind } from "./diff_mark"; import { type StyleProps } from "./style_props"; export interface PendingUpload { id: string; filename: string; mimeType: string; previewUrl?: string; status: UploadStatus; staleFile?: boolean; } /** A just-completed file in place, or an in-flight upload. */ export type FileUpload = { status: "complete"; id: string; file: DisplayFile; } | PendingUpload; /** Fall back to `LoticsLocale.fileUpload`. */ export interface FileThumbnailGridLabels { retryAll?: string; upload?: UploadStatusLabels; } export interface FileThumbnailGridProps extends StyleProps { files?: DisplayFile[]; /** Joins the same grid after `files`. */ uploads?: FileUpload[]; itemSize?: number; columns?: number; minItemWidth?: number; gap?: number; maxVisible?: number; singleRow?: boolean; onOverflowPress?: (hiddenCount: number) => void; overflowLabel?: (hiddenCount: number) => string; overflowTile?: boolean; partialRowAlign?: "start" | "end"; disablePress?: boolean; /** Overlays selection and makes pressable tiles announce `aria-pressed`; pass only while a press * toggles. */ selectedIds?: ReadonlySet; /** A proposal's effect per file (corner mark, fade on removal); for replacement pairs use `FileRow`, * since a grid shows membership, not pairing. */ diffs?: ReadonlyMap; /** Replaces `onFilePress` with a toggle. */ onToggleSelect?: (id: string) => void; onFilePress?: (file: DisplayFile) => void; /** A ✕ on each file's corner: a set of pending files, taken out before they are sent. */ onRemove?: (id: string) => void; /** Each stored file's ⋯ in its corner in place of the ✕ — Open and Download always, Rename, Replace and Remove * where the host writes the set — while nothing is being selected. */ fileActs?: (file: DisplayFile) => FileActsHandlers; onUploadRemove?: (id: string) => void; onRetry?: (id: string) => void; /** Shown only once one has errored. */ onRetryAll?: () => void; /** `"include"` where the files' URLs are served behind the host's session: a file's download from its ⋯. */ credentials?: RequestCredentials; labels?: FileThumbnailGridLabels; testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } export declare function FileThumbnailGrid(props: FileThumbnailGridProps): React.JSX.Element;