import Muya from '../index'; import { TDiff } from '../utils'; import * as json1 from 'ot-json1'; import type { Doc, JSONOpList, Path } from 'ot-json1'; import type { TState } from './types'; declare class JSONState { muya: Muya; static invert(op: JSONOpList): json1.JSONOp; static compose(op1: JSONOpList, op2: JSONOpList): json1.JSONOp; static transform(op: JSONOpList, otherOp: JSONOpList, type: 'left' | 'right'): json1.JSONOpList | null | undefined; operationCache: JSONOpList[]; private isGoing; private state; constructor(muya: Muya, stateOrMarkdown: TState[] | string); apply(op: JSONOpList): void; setContent(content: TState[] | string): void; setState(state: TState[]): void; setMarkdown(markdown: string): void; insertOperation(path: Path, state: TState): void; removeOperation(path: Path): void; editOperation(path: Path, diff: TDiff[]): void; replaceOperation(path: Path, oldValue: Doc, newValue: Doc): void; private _emitStateChange; dispatch(op: JSONOpList, source?: string): void; getState(): TState[]; getMarkdown(): string; } export default JSONState;