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.
26 lines
511 B
26 lines
511 B
import Automerge from 'automerge'
|
|
import { Node, Range } from 'slate'
|
|
|
|
export type SyncValue = Automerge.List<Node[]>
|
|
|
|
export type SyncDoc = Automerge.Doc<{ children: SyncValue; cursors: 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 type Cursors = {
|
|
[key: string]: Cursor
|
|
}
|