@kerebron/extension-yjs 0.4.8 → 0.4.10

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.
@@ -4,27 +4,9 @@ import { yPositionPlugin } from './yPositionPlugin.js';
4
4
  import { redo, undo, yUndoPlugin } from './yUndoPlugin.js';
5
5
  import { initProseMirrorDoc } from './convertUtils.js';
6
6
  export class ExtensionYjs extends Extension {
7
- constructor() {
8
- super(...arguments);
9
- Object.defineProperty(this, "name", {
10
- enumerable: true,
11
- configurable: true,
12
- writable: true,
13
- value: 'yjs'
14
- });
15
- Object.defineProperty(this, "conflicts", {
16
- enumerable: true,
17
- configurable: true,
18
- writable: true,
19
- value: ['history']
20
- });
21
- Object.defineProperty(this, "requires", {
22
- enumerable: true,
23
- configurable: true,
24
- writable: true,
25
- value: ['remote-selection']
26
- });
27
- }
7
+ name = 'yjs';
8
+ conflicts = ['history'];
9
+ requires = ['remote-selection'];
28
10
  // declare type Command = (state: EditorState, dispatch?: (tr: Transaction) => void, view?: EditorView) => boolean;
29
11
  getCommandFactories() {
30
12
  return {
@@ -199,6 +199,17 @@ export const getRelativeSelection = (pmbinding, state) => ({
199
199
  * @protected
200
200
  */
201
201
  export class ProsemirrorBinding {
202
+ mapping;
203
+ ydoc;
204
+ isOMark;
205
+ type;
206
+ mux;
207
+ prosemirrorView;
208
+ _beforeTransactionSelection;
209
+ beforeAllTransactions;
210
+ afterAllTransactions;
211
+ _observeFunction;
212
+ _domSelectionInView = false;
202
213
  get beforeTransactionSelection() {
203
214
  return this._beforeTransactionSelection;
204
215
  }
@@ -206,72 +217,7 @@ export class ProsemirrorBinding {
206
217
  this._beforeTransactionSelection = value;
207
218
  }
208
219
  constructor(yXmlFragment, mapping = new Map()) {
209
- Object.defineProperty(this, "mapping", {
210
- enumerable: true,
211
- configurable: true,
212
- writable: true,
213
- value: mapping
214
- });
215
- Object.defineProperty(this, "ydoc", {
216
- enumerable: true,
217
- configurable: true,
218
- writable: true,
219
- value: void 0
220
- });
221
- Object.defineProperty(this, "isOMark", {
222
- enumerable: true,
223
- configurable: true,
224
- writable: true,
225
- value: void 0
226
- });
227
- Object.defineProperty(this, "type", {
228
- enumerable: true,
229
- configurable: true,
230
- writable: true,
231
- value: void 0
232
- });
233
- Object.defineProperty(this, "mux", {
234
- enumerable: true,
235
- configurable: true,
236
- writable: true,
237
- value: void 0
238
- });
239
- Object.defineProperty(this, "prosemirrorView", {
240
- enumerable: true,
241
- configurable: true,
242
- writable: true,
243
- value: void 0
244
- });
245
- Object.defineProperty(this, "_beforeTransactionSelection", {
246
- enumerable: true,
247
- configurable: true,
248
- writable: true,
249
- value: void 0
250
- });
251
- Object.defineProperty(this, "beforeAllTransactions", {
252
- enumerable: true,
253
- configurable: true,
254
- writable: true,
255
- value: void 0
256
- });
257
- Object.defineProperty(this, "afterAllTransactions", {
258
- enumerable: true,
259
- configurable: true,
260
- writable: true,
261
- value: void 0
262
- });
263
- Object.defineProperty(this, "_observeFunction", {
264
- enumerable: true,
265
- configurable: true,
266
- writable: true,
267
- value: void 0
268
- });
269
- Object.defineProperty(this, "_domSelectionInView", {
270
- enumerable: true,
271
- configurable: true,
272
- writable: true,
273
- value: false
274
- });
220
+ this.mapping = mapping;
275
221
  this.type = yXmlFragment;
276
222
  this.prosemirrorView = null;
277
223
  this.mux = createMutex();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kerebron/extension-yjs",
3
- "version": "0.4.8",
3
+ "version": "0.4.10",
4
4
  "license": "MIT",
5
5
  "module": "./esm/ExtensionYjs.js",
6
6
  "exports": {
@@ -13,8 +13,8 @@
13
13
  },
14
14
  "scripts": {},
15
15
  "dependencies": {
16
- "@kerebron/editor": "0.4.8",
17
- "@kerebron/extension-basic-editor": "0.4.8",
16
+ "@kerebron/editor": "0.4.10",
17
+ "@kerebron/extension-basic-editor": "0.4.10",
18
18
  "lib0": "0.2.109",
19
19
  "prosemirror-model": "1.25.3",
20
20
  "prosemirror-state": "1.4.3",