import type { ImageOrVideo } from 'react-native-image-crop-picker'; import type { ImageSource, Point, TextOptions } from 'react-native-photo-manipulator'; import type { FileVO, IUploadTempSource, UploadItem } from '../interface'; export declare function getThumbnailImageUrl(url?: string, width?: number, height?: number): string; export declare function isMp4(mimeType: string): boolean; export declare function isImage(mimeType: string): boolean; export declare function isCompressSupportType(mimeType: string): boolean; /** * 根据URL获取文件扩展名 * @param filePath * @returns */ export declare function getFileExt(filePath: string): string; export declare function exec(func: ((...param: any) => any) | undefined, ...params: any[]): any; /** * 根据文档的mime类型,返回占位图标 * @param type * @returns */ export declare function getDocumentPlaceholderIconByMimeType(type: string): string; /** * 生成资源唯一key * @returns */ export declare function getFileKey(): string; /** * 上传列表格式化(一般用于远程资源列表在上传中回显) */ export declare function formatUploadList(list: FileVO[]): UploadItem[]; /** * 图片、视频压缩 * @param images * @param shouldCompress * @returns */ export declare function compressImageOrVideo(images: Partial[], shouldCompress?: boolean): Promise; interface ImageSize { width: number; height: number; } declare type WatermarkText = string | TextOptions; declare type GetWatermarkMethod = (size?: ImageSize) => Promise | WatermarkText>; interface Overlay { overlay: ImageSource; position: Point; } declare type GetOverlayMethod = (size?: ImageSize) => Promise | Overlay>; export declare type WatermarkOperations = Array; /** * 添加图片水印 * @param image * @param watermark * @returns */ export declare function printWatermark(image: ImageSource, watermark?: WatermarkOperations, size?: ImageSize): Promise; export {}; //# sourceMappingURL=index.d.ts.map