import { Block, FileToken } from './types'; export declare class Renderer { documentId: string; meta?: Record; blockMap: Record; parentId?: string; fileTokens: Record; nextBlock?: Block | null; /** * Current Block */ currentBlock?: Block | null; indent: number; debug: boolean; outputUnsupported: boolean; constructor(doc: any, options?: { debug?: boolean; outputUnsupported?: boolean; }); /** * Parse Feishu doc to new format * @returns Text of new format content. */ parse(): string; parseBlock(block: Block, indent: number): string; /** * Wrap with sub indent, after the function, will restore the old indent * @param indent * @param fn */ withSubIndent(fn: () => void): void; /** * Add a file token to context * @param type * @param token */ addFileToken(type: 'file' | 'image' | 'board', token: string): void; } /** * 去掉末尾 1 个换行 * @param str * @returns */ export declare const trimLastNewline: (str: string) => string; /** * Escape HTML tags into HTML entities * * This for avoid Feishu paragraph text has `<` or `>` charactor, will break the HTML structure. * In some Static Site Generator (VitePress, Docusaurus), the used JSX and Vue template, will cause the HTML structure broken. * * - `>` -> `>` (Danger, > in Markdown is used for blockquote) * - `<` -> `<` * * This method must make sure used to escape the Plain Text, not the Markdown Text. * * @param plainText * @returns text with escaped HTML tags */ export declare const escapeHTMLTags: (plainText: string) => string;