@slate-yjs/core 0.2.0 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +3 -0
- package/dist/applyToSlate/index.d.ts +19 -19
- package/dist/applyToSlate/index.d.ts.map +1 -1
- package/dist/applyToSlate/textEvent.d.ts +3 -3
- package/dist/applyToSlate/textEvent.d.ts.map +1 -1
- package/dist/applyToYjs/index.d.ts +3 -3
- package/dist/applyToYjs/node/index.d.ts +3 -3
- package/dist/applyToYjs/node/insertNode.d.ts +3 -3
- package/dist/applyToYjs/node/mergeNode.d.ts +3 -3
- package/dist/applyToYjs/node/moveNode.d.ts +3 -3
- package/dist/applyToYjs/node/removeNode.d.ts +3 -3
- package/dist/applyToYjs/node/setNode.d.ts +3 -3
- package/dist/applyToYjs/node/splitNode.d.ts +3 -3
- package/dist/applyToYjs/text/index.d.ts +3 -3
- package/dist/applyToYjs/text/insertText.d.ts +3 -3
- package/dist/applyToYjs/text/removeText.d.ts +3 -3
- package/dist/applyToYjs/types.d.ts +8 -8
- package/dist/index.cjs +1280 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.global.js +10418 -0
- package/dist/index.global.js.map +1 -0
- package/dist/index.js +1257 -10
- package/dist/index.js.map +1 -1
- package/dist/model/types.d.ts +37 -37
- package/dist/plugins/index.d.ts +3 -3
- package/dist/plugins/withCursors.d.ts +38 -38
- package/dist/plugins/withYHistory.d.ts +19 -19
- package/dist/plugins/withYHistory.d.ts.map +1 -1
- package/dist/plugins/withYjs.d.ts +42 -42
- package/dist/plugins/withYjs.d.ts.map +1 -1
- package/dist/utils/clone.d.ts +4 -4
- package/dist/utils/convert.d.ts +7 -7
- package/dist/utils/delta.d.ts +7 -6
- package/dist/utils/delta.d.ts.map +1 -1
- package/dist/utils/location.d.ts +11 -11
- package/dist/utils/object.d.ts +9 -6
- package/dist/utils/object.d.ts.map +1 -1
- package/dist/utils/position.d.ts +19 -19
- package/dist/utils/slate.d.ts +2 -2
- package/dist/utils/yjs.d.ts +4 -4
- package/package.json +13 -13
- package/src/applyToSlate/index.ts +2 -2
- package/src/applyToSlate/textEvent.ts +21 -20
- package/src/plugins/withYHistory.ts +84 -61
- package/src/plugins/withYjs.ts +14 -5
- package/src/utils/delta.ts +36 -1
- package/src/utils/object.ts +65 -20
- package/test/collaboration/addMark/acrossMarks.tsx +40 -0
- package/test/collaboration/addMark/acrossMarksSame.tsx +36 -0
- package/test/collaboration/addMark/atBeginningOfDocument.tsx +27 -0
- package/test/collaboration/addMark/atEndOfDocument.tsx +30 -0
- package/test/collaboration/addMark/withOtherMarks.tsx +31 -0
- package/test/collaboration/insertNode/atBeginningOfDocument.tsx +28 -0
- package/test/collaboration/insertNode/atEndOfDocument.tsx +28 -0
- package/test/collaboration/insertNode/inTheMiddle.tsx +30 -0
- package/test/collaboration/insertText/atBeginningOfBlock.tsx +26 -0
- package/test/collaboration/insertText/atBeginningOfDocument.tsx +26 -0
- package/test/collaboration/insertText/atEndOfBlock.tsx +26 -0
- package/test/collaboration/insertText/atEndOfDocument.tsx +26 -0
- package/test/collaboration/insertText/inTheMiddle.tsx +32 -0
- package/test/collaboration/insertText/inTheMiddleOfNestedBlock.tsx +30 -0
- package/test/collaboration/insertText/insideMarks.tsx +28 -0
- package/test/collaboration/insertText/withEmptyString.tsx +25 -0
- package/test/collaboration/insertText/withEntities.tsx +28 -0
- package/test/collaboration/insertText/withMarks.tsx +25 -0
- package/test/collaboration/insertText/withUnicode.tsx +28 -0
- package/test/collaboration/mergeNode/afterADeleteBackward.tsx +27 -0
- package/test/collaboration/mergeNode/onMixedNestedNodes.tsx +29 -0
- package/test/collaboration/mergeNode/onMixedTypeNodes.tsx +27 -0
- package/test/collaboration/mergeNode/withUnicode.tsx +25 -0
- package/test/collaboration/moveNode/downward/whenBlockBecomesNested.tsx +43 -0
- package/test/collaboration/moveNode/downward/whenBlockBecomesNonNested.tsx +41 -0
- package/test/collaboration/moveNode/downward/whenBlockStaysNested.tsx +38 -0
- package/test/collaboration/moveNode/downward/whenBlockStaysNonNested.tsx +30 -0
- package/test/collaboration/moveNode/upward/whenBlockBecomesNested.tsx +43 -0
- package/test/collaboration/moveNode/upward/whenBlockBecomesNonNested.tsx +41 -0
- package/test/collaboration/moveNode/upward/whenBlockStaysNested.tsx +38 -0
- package/test/collaboration/moveNode/upward/whenBlockStaysNonNested.tsx +30 -0
- package/test/collaboration/removeMark/inTheMiddleOfText.tsx +43 -0
- package/test/collaboration/removeMark/withAddMark.tsx +31 -0
- package/test/collaboration/removeMark/withOtherMarks.tsx +47 -0
- package/test/collaboration/removeNode/atBeginningOfDocument.tsx +26 -0
- package/test/collaboration/removeNode/atEndOfDocument.tsx +26 -0
- package/test/collaboration/removeNode/nestedBlock.tsx +28 -0
- package/test/collaboration/removeNode/wrapperBlock.tsx +28 -0
- package/test/collaboration/removeText/atBeginningOfDocument.tsx +34 -0
- package/test/collaboration/removeText/atEndOfDocument.tsx +37 -0
- package/test/collaboration/removeText/withUnicode.tsx +29 -0
- package/test/collaboration/setNode/atBeginningOfDocument.tsx +27 -0
- package/test/collaboration/setNode/atEndOfDocument.tsx +27 -0
- package/test/collaboration/setNode/onDataChange.tsx +35 -0
- package/test/collaboration/setNode/onDataChangeOnInline.tsx +35 -0
- package/test/collaboration/setNode/onResetBlock.tsx +27 -0
- package/test/collaboration/setNode/withAChangeOfType.tsx +26 -0
- package/test/collaboration/splitNode/atBeginningOfDocument.tsx +28 -0
- package/test/collaboration/splitNode/atEndOfBlock.tsx +27 -0
- package/test/collaboration/splitNode/atEndOfDocument.tsx +27 -0
- package/test/collaboration/splitNode/onNonDefaultBlock.tsx +27 -0
- package/test/collaboration/splitNode/withMultipleSubNodes.tsx +32 -0
- package/test/collaboration/splitNode/withUnicode.tsx +29 -0
- package/test/index.test.ts +65 -0
- package/test/{types.d.ts → slate.d.ts} +0 -0
- package/test/withTestingElements.ts +46 -0
- package/tsconfig.json +1 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/tsup.config.ts +32 -0
- package/dist/applyToSlate/Untitled-1.d.ts +0 -101
- package/dist/applyToSlate/Untitled-1.d.ts.map +0 -1
- package/dist/applyToSlate/index.js +0 -32
- package/dist/applyToSlate/index.js.map +0 -1
- package/dist/applyToSlate/textEvent.js +0 -166
- package/dist/applyToSlate/textEvent.js.map +0 -1
- package/dist/applyToYjs/index.js +0 -17
- package/dist/applyToYjs/index.js.map +0 -1
- package/dist/applyToYjs/node/index.js +0 -15
- package/dist/applyToYjs/node/index.js.map +0 -1
- package/dist/applyToYjs/node/insertNode.js +0 -12
- package/dist/applyToYjs/node/insertNode.js.map +0 -1
- package/dist/applyToYjs/node/mergeNode.js +0 -32
- package/dist/applyToYjs/node/mergeNode.js.map +0 -1
- package/dist/applyToYjs/node/moveNode.js +0 -28
- package/dist/applyToYjs/node/moveNode.js.map +0 -1
- package/dist/applyToYjs/node/removeNode.js +0 -6
- package/dist/applyToYjs/node/removeNode.js.map +0 -1
- package/dist/applyToYjs/node/setNode.js +0 -21
- package/dist/applyToYjs/node/setNode.js.map +0 -1
- package/dist/applyToYjs/node/splitNode.js +0 -50
- package/dist/applyToYjs/node/splitNode.js.map +0 -1
- package/dist/applyToYjs/text/index.js +0 -7
- package/dist/applyToYjs/text/index.js.map +0 -1
- package/dist/applyToYjs/text/insertText.js +0 -12
- package/dist/applyToYjs/text/insertText.js.map +0 -1
- package/dist/applyToYjs/text/removeText.js +0 -6
- package/dist/applyToYjs/text/removeText.js.map +0 -1
- package/dist/applyToYjs/types.js +0 -2
- package/dist/applyToYjs/types.js.map +0 -1
- package/dist/index.modern.js +0 -2
- package/dist/index.modern.js.map +0 -1
- package/dist/index.module.js +0 -2
- package/dist/index.module.js.map +0 -1
- package/dist/index.umd.js +0 -2
- package/dist/index.umd.js.map +0 -1
- package/dist/model/types.js +0 -2
- package/dist/model/types.js.map +0 -1
- package/dist/plugins/index.js +0 -4
- package/dist/plugins/index.js.map +0 -1
- package/dist/plugins/withCursors.js +0 -145
- package/dist/plugins/withCursors.js.map +0 -1
- package/dist/plugins/withYHistory.js +0 -66
- package/dist/plugins/withYHistory.js.map +0 -1
- package/dist/plugins/withYjs.js +0 -155
- package/dist/plugins/withYjs.js.map +0 -1
- package/dist/utils/clone.js +0 -23
- package/dist/utils/clone.js.map +0 -1
- package/dist/utils/convert.js +0 -35
- package/dist/utils/convert.js.map +0 -1
- package/dist/utils/delta.js +0 -42
- package/dist/utils/delta.js.map +0 -1
- package/dist/utils/location.js +0 -111
- package/dist/utils/location.js.map +0 -1
- package/dist/utils/object.js +0 -27
- package/dist/utils/object.js.map +0 -1
- package/dist/utils/position.js +0 -140
- package/dist/utils/position.js.map +0 -1
- package/dist/utils/slate.js +0 -6
- package/dist/utils/slate.js.map +0 -1
- package/dist/utils/yjs.js +0 -7
- package/dist/utils/yjs.js.map +0 -1
- package/test/collaboration.test.ts +0 -395
- package/test/concurrent.test.ts +0 -233
- package/test/testEditor.ts +0 -134
- package/test/utils.ts +0 -64
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# @slate-yjs/core
|
|
2
|
+
|
|
3
|
+
## 0.2.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#334](https://github.com/BitPhinix/slate-yjs/pull/334) [`5172e4a`](https://github.com/BitPhinix/slate-yjs/commit/5172e4a0033db41bc3530f227c5371e9ddb22269) Thanks [@BitPhinix](https://github.com/BitPhinix)! - don't autoConnect by default
|
package/README.md
ADDED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { Editor, Operation } from 'slate';
|
|
2
|
-
import * as Y from 'yjs';
|
|
3
|
-
/**
|
|
4
|
-
* Translate a yjs event into slate operations. The editor state has to match the
|
|
5
|
-
* yText state before the event occurred.
|
|
6
|
-
*
|
|
7
|
-
* @param sharedType
|
|
8
|
-
* @param op
|
|
9
|
-
*/
|
|
10
|
-
export declare function translateYjsEvent(sharedRoot: Y.XmlText, editor: Editor, event: Y.YEvent): Operation[];
|
|
11
|
-
/**
|
|
12
|
-
* Translates yjs events into slate operations and applies them to the editor. The
|
|
13
|
-
* editor state has to match the yText state before the events occurred.
|
|
14
|
-
*
|
|
15
|
-
* @param sharedRoot
|
|
16
|
-
* @param editor
|
|
17
|
-
* @param events
|
|
18
|
-
*/
|
|
19
|
-
export declare function applyYjsEvents(sharedRoot: Y.XmlText, editor: Editor, events: Y.YEvent[]): void;
|
|
1
|
+
import { Editor, Operation } from 'slate';
|
|
2
|
+
import * as Y from 'yjs';
|
|
3
|
+
/**
|
|
4
|
+
* Translate a yjs event into slate operations. The editor state has to match the
|
|
5
|
+
* yText state before the event occurred.
|
|
6
|
+
*
|
|
7
|
+
* @param sharedType
|
|
8
|
+
* @param op
|
|
9
|
+
*/
|
|
10
|
+
export declare function translateYjsEvent(sharedRoot: Y.XmlText, editor: Editor, event: Y.YEvent<Y.XmlText>): Operation[];
|
|
11
|
+
/**
|
|
12
|
+
* Translates yjs events into slate operations and applies them to the editor. The
|
|
13
|
+
* editor state has to match the yText state before the events occurred.
|
|
14
|
+
*
|
|
15
|
+
* @param sharedRoot
|
|
16
|
+
* @param editor
|
|
17
|
+
* @param events
|
|
18
|
+
*/
|
|
19
|
+
export declare function applyYjsEvents(sharedRoot: Y.XmlText, editor: Editor, events: Y.YEvent<Y.XmlText>[]): void;
|
|
20
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/applyToSlate/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,CAAC,CAAC,OAAO,EACrB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,CAAC,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/applyToSlate/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,CAAC,CAAC,OAAO,EACrB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,GACzB,SAAS,EAAE,CAMb;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,UAAU,EAAE,CAAC,CAAC,OAAO,EACrB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,QAS9B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Editor, Operation } from 'slate';
|
|
2
|
-
import * as Y from 'yjs';
|
|
3
|
-
export declare function translateYTextEvent(sharedRoot: Y.XmlText, editor: Editor, event: Y.YTextEvent): Operation[];
|
|
1
|
+
import { Editor, Operation } from 'slate';
|
|
2
|
+
import * as Y from 'yjs';
|
|
3
|
+
export declare function translateYTextEvent(sharedRoot: Y.XmlText, editor: Editor, event: Y.YTextEvent): Operation[];
|
|
4
4
|
//# sourceMappingURL=textEvent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textEvent.d.ts","sourceRoot":"","sources":["../../src/applyToSlate/textEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAiB,SAAS,EAAc,MAAM,OAAO,CAAC;AACrE,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"textEvent.d.ts","sourceRoot":"","sources":["../../src/applyToSlate/textEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAiB,SAAS,EAAc,MAAM,OAAO,CAAC;AACrE,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AA4MzB,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,CAAC,CAAC,OAAO,EACrB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,CAAC,CAAC,UAAU,GAClB,SAAS,EAAE,CAyCb"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Node, Operation } from 'slate';
|
|
2
|
-
import * as Y from 'yjs';
|
|
3
|
-
export declare function applySlateOp(sharedRoot: Y.XmlText, slateRoot: Node, op: Operation): void;
|
|
1
|
+
import { Node, Operation } from 'slate';
|
|
2
|
+
import * as Y from 'yjs';
|
|
3
|
+
export declare function applySlateOp(sharedRoot: Y.XmlText, slateRoot: Node, op: Operation): void;
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NodeOperation } from 'slate';
|
|
2
|
-
import { OpMapper } from '../types';
|
|
3
|
-
export declare const NODE_MAPPER: OpMapper<NodeOperation>;
|
|
1
|
+
import { NodeOperation } from 'slate';
|
|
2
|
+
import { OpMapper } from '../types';
|
|
3
|
+
export declare const NODE_MAPPER: OpMapper<NodeOperation>;
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InsertNodeOperation, Node } from 'slate';
|
|
2
|
-
import * as Y from 'yjs';
|
|
3
|
-
export declare function insertNode(sharedRoot: Y.XmlText, slateRoot: Node, op: InsertNodeOperation): void;
|
|
1
|
+
import { InsertNodeOperation, Node } from 'slate';
|
|
2
|
+
import * as Y from 'yjs';
|
|
3
|
+
export declare function insertNode(sharedRoot: Y.XmlText, slateRoot: Node, op: InsertNodeOperation): void;
|
|
4
4
|
//# sourceMappingURL=insertNode.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MergeNodeOperation, Node } from 'slate';
|
|
2
|
-
import * as Y from 'yjs';
|
|
3
|
-
export declare function mergeNode(sharedRoot: Y.XmlText, slateRoot: Node, op: MergeNodeOperation): void;
|
|
1
|
+
import { MergeNodeOperation, Node } from 'slate';
|
|
2
|
+
import * as Y from 'yjs';
|
|
3
|
+
export declare function mergeNode(sharedRoot: Y.XmlText, slateRoot: Node, op: MergeNodeOperation): void;
|
|
4
4
|
//# sourceMappingURL=mergeNode.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MoveNodeOperation, Node } from 'slate';
|
|
2
|
-
import * as Y from 'yjs';
|
|
3
|
-
export declare function moveNode(sharedRoot: Y.XmlText, slateRoot: Node, op: MoveNodeOperation): void;
|
|
1
|
+
import { MoveNodeOperation, Node } from 'slate';
|
|
2
|
+
import * as Y from 'yjs';
|
|
3
|
+
export declare function moveNode(sharedRoot: Y.XmlText, slateRoot: Node, op: MoveNodeOperation): void;
|
|
4
4
|
//# sourceMappingURL=moveNode.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Node, RemoveNodeOperation } from 'slate';
|
|
2
|
-
import * as Y from 'yjs';
|
|
3
|
-
export declare function removeNode(sharedRoot: Y.XmlText, slateRoot: Node, op: RemoveNodeOperation): void;
|
|
1
|
+
import { Node, RemoveNodeOperation } from 'slate';
|
|
2
|
+
import * as Y from 'yjs';
|
|
3
|
+
export declare function removeNode(sharedRoot: Y.XmlText, slateRoot: Node, op: RemoveNodeOperation): void;
|
|
4
4
|
//# sourceMappingURL=removeNode.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Node, SetNodeOperation } from 'slate';
|
|
2
|
-
import * as Y from 'yjs';
|
|
3
|
-
export declare function setNode(sharedRoot: Y.XmlText, slateRoot: Node, op: SetNodeOperation): void;
|
|
1
|
+
import { Node, SetNodeOperation } from 'slate';
|
|
2
|
+
import * as Y from 'yjs';
|
|
3
|
+
export declare function setNode(sharedRoot: Y.XmlText, slateRoot: Node, op: SetNodeOperation): void;
|
|
4
4
|
//# sourceMappingURL=setNode.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Node, SplitNodeOperation } from 'slate';
|
|
2
|
-
import * as Y from 'yjs';
|
|
3
|
-
export declare function splitNode(sharedRoot: Y.XmlText, slateRoot: Node, op: SplitNodeOperation): void;
|
|
1
|
+
import { Node, SplitNodeOperation } from 'slate';
|
|
2
|
+
import * as Y from 'yjs';
|
|
3
|
+
export declare function splitNode(sharedRoot: Y.XmlText, slateRoot: Node, op: SplitNodeOperation): void;
|
|
4
4
|
//# sourceMappingURL=splitNode.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TextOperation } from 'slate';
|
|
2
|
-
import { OpMapper } from '../types';
|
|
3
|
-
export declare const TEXT_MAPPER: OpMapper<TextOperation>;
|
|
1
|
+
import { TextOperation } from 'slate';
|
|
2
|
+
import { OpMapper } from '../types';
|
|
3
|
+
export declare const TEXT_MAPPER: OpMapper<TextOperation>;
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InsertTextOperation, Node } from 'slate';
|
|
2
|
-
import type Y from 'yjs';
|
|
3
|
-
export declare function insertText(sharedRoot: Y.XmlText, slateRoot: Node, op: InsertTextOperation): void;
|
|
1
|
+
import { InsertTextOperation, Node } from 'slate';
|
|
2
|
+
import type Y from 'yjs';
|
|
3
|
+
export declare function insertText(sharedRoot: Y.XmlText, slateRoot: Node, op: InsertTextOperation): void;
|
|
4
4
|
//# sourceMappingURL=insertText.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Node, RemoveTextOperation } from 'slate';
|
|
2
|
-
import type Y from 'yjs';
|
|
3
|
-
export declare function removeText(sharedRoot: Y.XmlText, slateRoot: Node, op: RemoveTextOperation): void;
|
|
1
|
+
import { Node, RemoveTextOperation } from 'slate';
|
|
2
|
+
import type Y from 'yjs';
|
|
3
|
+
export declare function removeText(sharedRoot: Y.XmlText, slateRoot: Node, op: RemoveTextOperation): void;
|
|
4
4
|
//# sourceMappingURL=removeText.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Node, Operation } from 'slate';
|
|
2
|
-
import * as Y from 'yjs';
|
|
3
|
-
export declare type ApplyFunc<O extends Operation = Operation> = (sharedRoot: Y.XmlText, slateRoot: Node, op: O) => void;
|
|
4
|
-
export declare type OpMapper<O extends Operation = Operation> = {
|
|
5
|
-
[K in O['type']]: O extends {
|
|
6
|
-
type: K;
|
|
7
|
-
} ? ApplyFunc<O> : never;
|
|
8
|
-
};
|
|
1
|
+
import { Node, Operation } from 'slate';
|
|
2
|
+
import * as Y from 'yjs';
|
|
3
|
+
export declare type ApplyFunc<O extends Operation = Operation> = (sharedRoot: Y.XmlText, slateRoot: Node, op: O) => void;
|
|
4
|
+
export declare type OpMapper<O extends Operation = Operation> = {
|
|
5
|
+
[K in O['type']]: O extends {
|
|
6
|
+
type: K;
|
|
7
|
+
} ? ApplyFunc<O> : never;
|
|
8
|
+
};
|
|
9
9
|
//# sourceMappingURL=types.d.ts.map
|