import { JsonObject } from 'type-fest'; import * as vscode from 'vscode'; import { Notebook, WebviewConfig } from '../notebook'; interface MarkdownEngineConstructorArgs { notebook: Notebook; filePath: string; } export interface MarkdownEngineRenderOption { useRelativeFilePath: boolean; isForPreview: boolean; hideFrontMatter: boolean; triggeredBySave?: boolean; runAllCodeChunks?: boolean; emojiToSvg?: boolean; vscodePreviewPanel?: vscode.WebviewPanel | null; fileDirectoryPath?: string; } export interface MarkdownEngineOutput { html: string; markdown: string; tocHTML: string; yamlConfig: JsonObject; JSAndCssFiles: string[]; } export interface HTMLTemplateOption { isForPrint: boolean; isForPrince: boolean; offline: boolean; embedLocalImages: boolean; embedSVG?: boolean; } export declare class MarkdownEngine { private readonly filePath; private readonly fileDirectoryPath; private readonly projectDirectoryPath; private readonly notebook; private readonly fs; private headings; private tocHTML; private vscodePreviewPanel; private graphsCache; private codeChunksData; private filesCache; isPreviewInPresentationMode: boolean; constructor({ filePath, notebook }: MarkdownEngineConstructorArgs); private get protocolsWhiteListRegExp(); cacheCodeChunkResult(id: string, result: string): void; private generateScriptsForPreview; private static AutoPrismThemeMap; private static AutoPrismThemeMapForPresentation; private getPrismTheme; private generateStylesForPreview; private generateJSAndCssFilesForPreview; generateHTMLTemplateForPreview({ inputString, body, webviewScript, scripts, styles, head, config, vscodePreviewPanel, contentSecurityPolicy, isVSCodeWebExtension, }: { inputString?: string; body?: string; webviewScript?: string; scripts?: string; styles?: string; head?: string; config: WebviewConfig; vscodePreviewPanel: vscode.WebviewPanel | null | undefined; contentSecurityPolicy?: string; isVSCodeWebExtension?: boolean; }): Promise; generateHTMLTemplateForExport(html: string, yamlConfig: {} | undefined, options: HTMLTemplateOption): Promise; openInBrowser({ runAllCodeChunks }: { runAllCodeChunks?: boolean | undefined; }): Promise; htmlExport({ offline, runAllCodeChunks, }: { offline?: boolean | undefined; runAllCodeChunks?: boolean | undefined; }): Promise; chromeExport({ fileType, runAllCodeChunks, openFileAfterGeneration, }: { fileType?: string | undefined; runAllCodeChunks?: boolean | undefined; openFileAfterGeneration?: boolean | undefined; }): Promise; princeExport({ runAllCodeChunks, openFileAfterGeneration, }: { runAllCodeChunks?: boolean | undefined; openFileAfterGeneration?: boolean | undefined; }): Promise; private eBookDownloadImages; eBookExport({ fileType, runAllCodeChunks, }: { fileType: string; runAllCodeChunks?: boolean; }): Promise; pandocExport({ runAllCodeChunks, openFileAfterGeneration, }: { runAllCodeChunks?: boolean | undefined; openFileAfterGeneration?: boolean | undefined; }): Promise; markdownExport({ runAllCodeChunks }: { runAllCodeChunks?: boolean | undefined; }): Promise; private exportOnSave; private resolveFilePath; private resolvePathsInHeader; clearCaches(): void; private frontMatterToTable; private processFrontMatter; private parseSlides; private pandocRender; parseMD(inputString: string, options: MarkdownEngineRenderOption): Promise; runCodeChunks(): Promise; runCodeChunk(id: string): Promise; private modifySource; private generateRunOptions; } export {};