import { DataURL } from "@zsviczian/excalidraw/types/types"; import { TFile, Vault } from "obsidian"; import { MimeType } from "src/EmbeddedFileLoader"; import { ExcalidrawSettings } from "src/settings"; /** * Splits a full path including a folderpath and a filename into separate folderpath and filename components * @param filepath */ export declare function splitFolderAndFilename(filepath: string): { folderpath: string; filename: string; basename: string; }; /** * Download data as file from Obsidian, to store on local device * @param encoding * @param data * @param filename */ export declare const download: (encoding: string, data: any, filename: string) => void; /** * Generates the image filename based on the excalidraw filename * @param excalidrawPath - Full filepath of ExclidrawFile * @param newExtension - extension of IMG file in ".extension" format * @returns */ /** * Generates the image filename based on the excalidraw filename * @param path - path to the excalidraw file * @param extension - extension without the preceeding "." * @returns */ export declare function getIMGFilename(path: string, extension: string): string; /** * Create new file, if file already exists find first unique filename by adding a number to the end of the filename * @param filename * @param folderpath * @returns */ export declare function getNewUniqueFilepath(vault: Vault, filename: string, folderpath: string): string; export declare function getDrawingFilename(settings: ExcalidrawSettings): string; export declare function getEmbedFilename(notename: string, settings: ExcalidrawSettings): string; /** * Open or create a folderpath if it does not exist * @param folderpath */ export declare function checkAndCreateFolder(folderpath: string): Promise; export declare const getURLImageExtension: (url: string) => string; export declare const getMimeType: (extension: string) => MimeType; export declare const getDataURLFromURL: (url: string, mimeType: MimeType, timeout?: number) => Promise; export declare const blobToBase64: (blob: Blob) => Promise; export declare const getPDFDoc: (f: TFile) => Promise;