UNPKG

@mini-markdown-rc/editor

Version:
35 lines (34 loc) 1.46 kB
import { EditorView } from '@uiw/react-codemirror'; interface InstancesType { previewView: HTMLElement; editorView: EditorView; } declare class ScrollSynchronizer { private readonly editorElementList; private readonly previewElementList; private static readonly SCROLL_ANIMATION_DURATION; private static readonly MIN_SCROLL_DISTANCE; private static readonly BOTTOM_THRESHOLD; private computeHeightMapping; private synchronizeScroll; private getValidPreviewNodes; private getLineNumber; private isValidLineNumber; private getEditorLineInfo; private clearHeightMappings; private getScrollElements; private isScrolledToBottom; private scrollToTop; private scrollToBottom; private performProportionalScroll; private findScrollIndex; private calculateScrollPosition; handleEditorScroll(editorView: EditorView, previewView: HTMLElement | null): void; handlePreviewScroll(previewView: HTMLElement | null, editorView: EditorView): void; handleScrollTop(editorView: EditorView, previewView: HTMLElement): void; } export declare const scrollSynchronizer: ScrollSynchronizer; export declare const handleEditorScroll: ({ editorView, previewView }: InstancesType) => void; export declare const handlePreviewScroll: ({ editorView, previewView }: InstancesType) => void; export declare const handleScrollTop: ({ editorView, previewView }: InstancesType) => void; export {};