/// <reference types="cheerio" />
/// <reference types="node" />
import * as child_process from "child_process";
import { BlockInfo } from "block-info";
import * as vscode from "vscode";
export declare function escapeString(str?: string): string;
export declare function unescapeString(str?: string): string;
export interface ParserConfig {
    onWillParseMarkdown?: (markdown: string) => Promise<string>;
    onDidParseMarkdown?: (html: string, opts: {
        cheerio: CheerioAPI;
    }) => Promise<string>;
    onWillTransformMarkdown?: (markdown: string) => Promise<string>;
    onDidTransformMarkdown?: (markdown: string) => Promise<string>;
}
/**
 * Do nothing and sleep for `ms` milliseconds
 * @param ms
 */
export declare function sleep(ms: number): Promise<void>;
export declare function parseYAML(yaml?: string): any;
export declare function readFile(file: string, options?: any): Promise<string>;
export declare function writeFile(file: string, text: any, options?: any): Promise<void>;
export declare function write(fd: number, text: string): Promise<void>;
export declare function tempOpen(options: any): Promise<any>;
export declare function execFile(file: string, args: string[], options?: object): Promise<string>;
/**
 * open html file in browser or open pdf file in reader ... etc
 * @param filePath
 */
export declare function openFile(filePath: string): child_process.ChildProcess;
/**
 * get the directory path of this extension.
 */
export declare const extensionDirectoryPath: string;
/**
 * compile ~/.mumi/style.less and return 'css' content.
 */
export declare function getGlobalStyles(configPath: any): Promise<string>;
/**
 * Get default config path
 * @
 */
export declare function getConfigPath(): string;
/**
 * load ~/.config/mume/mermaid_config.js file.
 */
export declare function getMermaidConfig(configPath: any): Promise<string>;
export declare const defaultMathjaxConfig: {
    extensions: string[];
    jax: string[];
    messageStyle: string;
    tex2jax: {
        processEnvironments: boolean;
        processEscapes: boolean;
    };
    TeX: {
        extensions: string[];
    };
    "HTML-CSS": {
        availableFonts: string[];
    };
};
export declare const defaultKaTeXConfig: {
    macros: {};
};
/**
 * load ~/.config/mume/mathjax_config.js file.
 */
export declare function getMathJaxConfig(configPath: any): Promise<object>;
/**
 * load ~/.config/mume/katex_config.js file
 */
export declare function getKaTeXConfig(configPath: any): Promise<object>;
export declare function getExtensionConfig(configPath: any): Promise<object>;
export declare function getParserConfig(configPath: any): Promise<ParserConfig>;
/**
 * Check whether two arrays are equal
 * @param x
 * @param y
 */
export declare function isArrayEqual(x: any, y: any): boolean;
export declare function useExternalAddFileProtocolFunction(func: (filePath: string, vscodePreviewPanel: vscode.WebviewPanel) => string): void;
/**
 * Add file:/// to file path
 * If it's for VSCode preview, add vscode-resource:/// to file path
 * @param filePath
 */
export declare function addFileProtocol(filePath: string, vscodePreviewPanel?: vscode.WebviewPanel): string;
/**
 * Remove file:// from file path
 * @param filePath
 */
export declare function removeFileProtocol(filePath: string): string;
/**
 * style.less,
 * mathjax_config.js,
 * mermaid_config.js
 * config.json
 *
 * files
 */
export declare const configs: {
    globalStyle: string;
    mathjaxConfig: object;
    katexConfig: object;
    mermaidConfig: string;
    parserConfig: ParserConfig;
    /**
     * Please note that this is not necessarily MarkdownEngineConfig
     */
    config: object;
};
export { uploadImage } from "./image-uploader";
export declare function allowUnsafe<T>(fn: () => T): T;
export declare const loadDependency: (dependencyPath: string) => any;
export declare const extractCommandFromBlockInfo: (info: BlockInfo) => any;
export declare function Function(...args: string[]): any;
export declare namespace Function {
    var prototype: Function;
}
export declare const resolveBuildPathForWebview: (libraryName: string, buildPathForWebView: string) => string;
