feat: update to slate 0.58 && fix site build

This commit is contained in:
cudr
2020-05-11 09:21:49 +03:00
parent 0fd9390a99
commit 6adf4082dc
30 changed files with 180 additions and 107 deletions

View File

@@ -1,7 +1,9 @@
import Automerge from 'automerge'
import { Node, Range } from 'slate'
export type SyncDoc = Automerge.Doc<Node & Cursors>
export type SyncValue = Automerge.List<Node[]>
export type SyncDoc = Automerge.Doc<{ children: SyncValue; cursors: Cursors }>
export type CollabActionType = 'operation' | 'document'
@@ -18,6 +20,6 @@ export interface Cursor extends Range, CursorData {
isForward: boolean
}
export interface Cursors {
export type Cursors = {
[key: string]: Cursor
}