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,11 +1,12 @@
import * as Automerge from 'automerge'
import { Node } from 'slate'
import opInsert from './insert'
import opRemove from './remove'
import opSet from './set'
import opCreate from './create'
import { SyncDoc } from '../model'
const byAction = {
create: opCreate,
remove: opRemove,
@@ -15,7 +16,7 @@ const byAction = {
const rootKey = '00000000-0000-0000-0000-000000000000'
const toSlateOp = (ops: Automerge.Diff[], doc: Automerge.Doc<Node>) => {
const toSlateOp = (ops: Automerge.Diff[], doc: SyncDoc) => {
const iterate = (acc: [any, any[]], op: Automerge.Diff): any => {
const action = byAction[op.action]