@slate-yjs/core 1.0.6 → 1.0.8

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @slate-yjs/core
2
2
 
3
+ ## 1.0.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [#480](https://github.com/slate-yjs/slate-yjs/pull/480) [`9287f17`](https://github.com/slate-yjs/slate-yjs/commit/9287f172487db3dd677304089570a1aa80385cdd) Thanks [@juliankrispel](https://github.com/juliankrispel)! - Restore the previous origin when the callback passed to `YjsEditor.withOrigin` throws. If applying a remote update threw, the editor kept the remote origin, so local edits were no longer recorded or written to Yjs, even after reconnecting.
8
+
9
+ ## 1.0.7
10
+
11
+ ### Patch Changes
12
+
13
+ - [#466](https://github.com/slate-yjs/slate-yjs/pull/466) [`cf2de60`](https://github.com/slate-yjs/slate-yjs/commit/cf2de604dc39de90c5fbc89a5a55783737a0e8fe) Thanks [@juliankrispel](https://github.com/juliankrispel)! - Copy the shorter side when splitting a node. A split copied everything after the split point into a new Yjs node, so pressing Enter at the start of a block moved all of it, and remote cursors and concurrent typing in it jumped to the split point. Stored positions at the end of a text are also kept on the right side of a split. Fixes [#299](https://github.com/slate-yjs/slate-yjs/issues/299) for splits near the start or end of a block.
14
+
3
15
  ## 1.0.6
4
16
 
5
17
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"splitNode.d.ts","sourceRoot":"","sources":["../../../src/applyToYjs/node/splitNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAQ,MAAM,OAAO,CAAC;AACvD,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAUzB,wBAAgB,SAAS,CACvB,UAAU,EAAE,CAAC,CAAC,OAAO,EACrB,SAAS,EAAE,IAAI,EACf,EAAE,EAAE,kBAAkB,GACrB,IAAI,CAiFN"}
1
+ {"version":3,"file":"splitNode.d.ts","sourceRoot":"","sources":["../../../src/applyToYjs/node/splitNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAQ,MAAM,OAAO,CAAC;AACvD,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAUzB,wBAAgB,SAAS,CACvB,UAAU,EAAE,CAAC,CAAC,OAAO,EACrB,SAAS,EAAE,IAAI,EACf,EAAE,EAAE,kBAAkB,GACrB,IAAI,CA6GN"}
@@ -1,4 +1,4 @@
1
1
  import { InsertTextOperation, Node } from 'slate';
2
- import type Y from 'yjs';
2
+ import type * as Y from 'yjs';
3
3
  export declare function insertText(sharedRoot: Y.XmlText, slateRoot: Node, op: InsertTextOperation): void;
4
4
  //# sourceMappingURL=insertText.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"insertText.d.ts","sourceRoot":"","sources":["../../../src/applyToYjs/text/insertText.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,IAAI,EAAQ,MAAM,OAAO,CAAC;AACxD,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAIzB,wBAAgB,UAAU,CACxB,UAAU,EAAE,CAAC,CAAC,OAAO,EACrB,SAAS,EAAE,IAAI,EACf,EAAE,EAAE,mBAAmB,GACtB,IAAI,CAiBN"}
1
+ {"version":3,"file":"insertText.d.ts","sourceRoot":"","sources":["../../../src/applyToYjs/text/insertText.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,IAAI,EAAQ,MAAM,OAAO,CAAC;AACxD,OAAO,KAAK,KAAK,CAAC,MAAM,KAAK,CAAC;AAI9B,wBAAgB,UAAU,CACxB,UAAU,EAAE,CAAC,CAAC,OAAO,EACrB,SAAS,EAAE,IAAI,EACf,EAAE,EAAE,mBAAmB,GACtB,IAAI,CAiBN"}
@@ -1,4 +1,4 @@
1
1
  import { Node, RemoveTextOperation } from 'slate';
2
- import type Y from 'yjs';
2
+ import type * as Y from 'yjs';
3
3
  export declare function removeText(sharedRoot: Y.XmlText, slateRoot: Node, op: RemoveTextOperation): void;
4
4
  //# sourceMappingURL=removeText.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"removeText.d.ts","sourceRoot":"","sources":["../../../src/applyToYjs/text/removeText.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,wBAAgB,UAAU,CACxB,UAAU,EAAE,CAAC,CAAC,OAAO,EACrB,SAAS,EAAE,IAAI,EACf,EAAE,EAAE,mBAAmB,GACtB,IAAI,CAON"}
1
+ {"version":3,"file":"removeText.d.ts","sourceRoot":"","sources":["../../../src/applyToYjs/text/removeText.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,KAAK,CAAC,MAAM,KAAK,CAAC;AAG9B,wBAAgB,UAAU,CACxB,UAAU,EAAE,CAAC,CAAC,OAAO,EACrB,SAAS,EAAE,IAAI,EACf,EAAE,EAAE,mBAAmB,GACtB,IAAI,CAON"}
@@ -1,7 +1,7 @@
1
1
  import { Node, Operation } from 'slate';
2
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> = {
3
+ export type ApplyFunc<O extends Operation = Operation> = (sharedRoot: Y.XmlText, slateRoot: Node, op: O) => void;
4
+ export type OpMapper<O extends Operation = Operation> = {
5
5
  [K in O['type']]: O extends {
6
6
  type: K;
7
7
  } ? ApplyFunc<O> : never;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/applyToYjs/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,oBAAY,SAAS,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,IAAI,CACvD,UAAU,EAAE,CAAC,CAAC,OAAO,EACrB,SAAS,EAAE,IAAI,EACf,EAAE,EAAE,CAAC,KACF,IAAI,CAAC;AAEV,oBAAY,QAAQ,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,IAAI;KACrD,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS;QAAE,IAAI,EAAE,CAAC,CAAA;KAAE,GAAG,SAAS,CAAC,CAAC,CAAC,GAAG,KAAK;CAC/D,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/applyToYjs/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,IAAI,CACvD,UAAU,EAAE,CAAC,CAAC,OAAO,EACrB,SAAS,EAAE,IAAI,EACf,EAAE,EAAE,CAAC,KACF,IAAI,CAAC;AAEV,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,IAAI;KACrD,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS;QAAE,IAAI,EAAE,CAAC,CAAA;KAAE,GAAG,SAAS,CAAC,CAAC,CAAC,GAAG,KAAK;CAC/D,CAAC"}