UNPKG

@textbus/collaborate

Version:

Textbus is a rich text editor and framework that is highly customizable and extensible to achieve rich wysiwyg effects.

36 lines (35 loc) 1.2 kB
import { History, RootComponentRef, Scheduler } from '@textbus/core'; import { Observable } from '@tanbo/stream'; import { Item, Transaction } from 'yjs'; import { Collaborate } from './collaborate'; export declare abstract class CustomUndoManagerConfig { abstract captureTransaction?(arg0: Transaction): boolean; abstract deleteFilter?(arg0: Item): boolean; } export declare class CollabHistory implements History { private rootComponentRef; private collaborate; private scheduler; private stackSize; private undoManagerConfig; onBack: Observable<void>; onForward: Observable<void>; onChange: Observable<void>; onPush: Observable<void>; get canBack(): boolean; get canForward(): boolean; private manager; private historyItems; private index; private subscriptions; private backEvent; private forwardEvent; private changeEvent; private pushEvent; constructor(rootComponentRef: RootComponentRef, collaborate: Collaborate, scheduler: Scheduler, stackSize: number, undoManagerConfig: CustomUndoManagerConfig); listen(): void; back(): void; forward(): void; clear(): void; destroy(): void; }