You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cudr_slate-collaborative/packages/bridge/src/model/index.ts

24 lines
439 B

import Automerge from 'automerge'
import { Node, Range } from 'slate'
export type SyncDoc = Automerge.Doc<Node & Cursors>
export type CollabActionType = 'operation' | 'document'
export interface CollabAction {
type: CollabActionType
payload: any
}
export interface CursorData {
[key: string]: any
}
export interface Cursor extends Range, CursorData {
isForward: boolean
}
export interface Cursors {
[key: string]: Cursor
}