import { Item } from '../baseItem.js'; import { ItemSettings } from '../itemSettings.js'; import { ItemType } from '../itemType.js'; import { AlignmentType } from '../../enums/alignment.js'; export type FileItemType = { type: typeof ItemType.FILE; extra: FileItemExtra; } & Item; /** * File Extra */ export type FileItemProperties = { name: string; path: string; mimetype: string; size: number; altText?: string; content: string; url?: string; }; export type FileItemMetadata = { id: string; name: string; path: string; size: number; updatedAt: string; parent?: { id: string; name: string; }; }; export interface FileItemExtra { [ItemType.FILE]: FileItemProperties; } export declare const getFileExtra: (extra: U) => U[typeof ItemType.FILE]; export declare const buildFileExtra: (extra: FileItemProperties) => FileItemExtra; /** * Extract extension from filename. * @param fileName Name of the file to get the extension from * @param options Options object, currently contains `includeDot` to return the extension with a leading dot, for easy concatenation, this option is true by default * @returns */ export declare const getFileExtension: (fileName: string, { includeDot }?: { includeDot?: boolean | undefined; }) => string | undefined; /** * File Settings */ export interface FileItemSettings extends ItemSettings { maxWidth?: MaxWidth; alignment?: AlignmentType; } export declare enum MaxWidth { ExtraSmall = "xs", Small = "sm", Medium = "md", Large = "lg", ExtraLarge = "xl" } export declare const DEFAULT_FILE_MAX_WIDTH_SETTING = MaxWidth.Medium;