@lexical/yjs 0.2.6 → 0.2.9

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.
Files changed (2) hide show
  1. package/LexicalYjs.d.ts +12 -9
  2. package/package.json +3 -3
package/LexicalYjs.d.ts CHANGED
@@ -8,7 +8,6 @@
8
8
  import type {
9
9
  Doc,
10
10
  RelativePosition,
11
- TextOperation,
12
11
  UndoManager,
13
12
  XmlElement,
14
13
  XmlText,
@@ -26,7 +25,6 @@ import type {
26
25
  TextNode,
27
26
  IntentionallyMarkedAsDirtyElement,
28
27
  } from 'lexical';
29
- // @ts-expect-error: todo
30
28
  export type YjsEvent = Record<string, any>;
31
29
  export type UserState = {
32
30
  anchorPos: null | RelativePosition;
@@ -121,30 +119,35 @@ export declare class CollabDecoratorNode {
121
119
  destroy(binding: Binding): void;
122
120
  }
123
121
  export declare class CollabLineBreakNode {
124
- _map: YMap;
122
+ _map: YMap<unknown>;
125
123
  _key: NodeKey;
126
124
  _parent: CollabElementNode;
127
125
  _type: 'linebreak';
128
- constructor(map: YMap, parent: CollabElementNode);
126
+ constructor(map: YMap<unknown>, parent: CollabElementNode);
129
127
  getNode(): null | LineBreakNode;
130
128
  getKey(): NodeKey;
131
- getSharedType(): YMap;
129
+ getSharedType(): YMap<unknown>;
132
130
  getType(): string;
133
131
  getSize(): number;
134
132
  getOffset(): number;
135
133
  destroy(binding: Binding): void;
136
134
  }
137
135
  export declare class CollabTextNode {
138
- _map: YMap;
136
+ _map: YMap<unknown>;
139
137
  _key: NodeKey;
140
138
  _parent: CollabElementNode;
141
139
  _text: string;
142
140
  _type: string;
143
141
  _normalized: boolean;
144
- constructor(map: YMap, text: string, parent: CollabElementNode, type: string);
142
+ constructor(
143
+ map: YMap<unknown>,
144
+ text: string,
145
+ parent: CollabElementNode,
146
+ type: string,
147
+ );
145
148
  getPrevNode(nodeMap: null | NodeMap): null | TextNode;
146
149
  getNode(): null | TextNode;
147
- getSharedType(): YMap;
150
+ getSharedType(): YMap<unknown>;
148
151
  getType(): string;
149
152
  getKey(): NodeKey;
150
153
  getSize(): number;
@@ -185,7 +188,7 @@ export declare class CollabElementNode {
185
188
  binding: Binding,
186
189
  keysChanged: null | Set<string>,
187
190
  ): void;
188
- applyChildrenYjsDelta(binding: Binding, deltas: Array<TextOperation>): void;
191
+ applyChildrenYjsDelta(binding: Binding, deltas: Array<unknown>): void;
189
192
  syncChildrenFromYjs(binding: Binding): void;
190
193
  syncPropertiesFromLexical(
191
194
  binding: Binding,
package/package.json CHANGED
@@ -11,13 +11,13 @@
11
11
  "crdt"
12
12
  ],
13
13
  "license": "MIT",
14
- "version": "0.2.6",
14
+ "version": "0.2.9",
15
15
  "main": "LexicalYjs.js",
16
16
  "dependencies": {
17
- "@lexical/offset": "0.2.6"
17
+ "@lexical/offset": "0.2.9"
18
18
  },
19
19
  "peerDependencies": {
20
- "lexical": "0.2.6",
20
+ "lexical": "0.2.9",
21
21
  "yjs": ">=13.5.22"
22
22
  },
23
23
  "repository": {