@jigoooo/shared-ui
Version:
A reusable React component library and design system with TypeScript support, built on Vite for seamless integration and optimized performance.
23 lines (22 loc) • 1.08 kB
TypeScript
export declare function convertBlobToBase64(blob: Blob): Promise<string>;
export declare const isImageFile: (file: File) => boolean;
export declare const getImageBlobToFetch: (url: string) => Promise<Blob>;
export declare const blobToDataURL: (blob: Blob, callback: (dataUrl: string | ArrayBuffer | null) => void) => void;
export declare const fileSizeFormatter: (sizeInBytes: number) => {
sizeInKB: number;
sizeInMB: number;
isUnder1MB: boolean;
};
export declare const fileSizeInMB: (sizeInBytes: number) => number;
export declare function isExtensionAllowed({ extensions, fileName, }: {
extensions: string[];
fileName: string;
}): boolean;
export declare function isExtensionNotAllowed({ extensions, fileName, mergedCompare, }: {
extensions?: string[];
fileName: string;
mergedCompare: boolean;
}): boolean;
export declare function extractBase64ImageSrc(str: string): string[];
export declare function getExtensionFromMimeType(mimeType: string): string;
export declare function base64ToFile(base64String: string, baseFilename: string): File | null;