import type * as d3 from 'd3'; import { Hook, INode, IPureNode } from 'markmap-common'; import { ID3SVGElement, IMarkmapOptions, IMarkmapState, IPadding } from './types'; export declare const globalCSS: string; /** * A global hook to refresh all markmaps when called. */ export declare const refreshHook: Hook<[]>; export declare class Markmap { options: { autoFit: boolean; duration: number; embedGlobalCSS: boolean; fitRatio: number; id?: string; initialExpandLevel: number; maxInitialScale: number; pan: boolean; scrollForPan: boolean; style?: (id: string) => string; toggleRecursively: boolean; zoom: boolean; color: (node: INode) => string; lineWidth: (node: INode) => number; maxWidth: number; nodeMinHeight: number; paddingX: number; spacingHorizontal: number; spacingVertical: number; }; state: IMarkmapState; svg: ID3SVGElement; styleNode: d3.Selection; g: d3.Selection; zoom: d3.ZoomBehavior; private _observer; private _disposeList; constructor(svg: string | SVGElement | ID3SVGElement, opts?: Partial); getStyleContent(): string; updateStyle(): void; handleZoom: (e: any) => void; handlePan: (e: WheelEvent) => void; toggleNode(data: INode, recursive?: boolean): Promise; handleClick: (e: MouseEvent, d: INode) => void; private _initializeData; private _relayout; setOptions(opts?: Partial): void; setData(data?: IPureNode | null, opts?: Partial): Promise; setHighlight(node?: INode | null): Promise; private _getHighlightRect; renderData(originData?: INode): Promise; transition(sel: d3.Selection): d3.Transition; /** * Fit the content to the viewport. */ fit(maxScale?: number): Promise; findElement(node: INode): { data: INode; g: SVGGElement; } | undefined; /** * Pan the content to make the provided node visible in the viewport. */ ensureVisible(node: INode, padding?: Partial): Promise; /** @deprecated Use `ensureVisible` instead */ ensureView: (node: INode, padding?: Partial) => Promise; centerNode(node: INode, padding?: Partial): Promise; /** * Scale content with it pinned at the center of the viewport. */ rescale(scale: number): Promise; destroy(): void; static create(svg: string | SVGElement | ID3SVGElement, opts?: Partial, data?: IPureNode | null): Markmap; }