@matechat/core
Version:
前端智能化场景解决方案UI库,轻松构建你的AI应用。
23 lines (22 loc) • 828 B
TypeScript
import type { MermaidConfig } from './mdCard.types';
export declare class MermaidService {
private config;
private mermaidInstance;
private isLoading;
private lastValidResult;
private viewStateMap;
private containerHeight;
constructor(config?: MermaidConfig);
private loadMermaid;
renderToContainer(container: HTMLElement, code: string, theme?: 'light' | 'dark'): Promise<void>;
private initViewState;
private applyTransform;
zoomIn(container: HTMLElement): void;
zoomOut(container: HTMLElement): void;
reset(container: HTMLElement): void;
download(container: HTMLElement, filename?: string): Promise<void>;
private onSvgMouseDown;
private onSvgMouseMove;
private onSvgMouseUp;
renderMermaid(code: string, theme?: 'light' | 'dark'): Promise<string>;
}