@pluv/crdt-yjs 0.35.0 → 0.35.1

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @pluv/crdt-yjs@0.35.0 build /home/runner/work/pluv/pluv/packages/crdt-yjs
2
+ > @pluv/crdt-yjs@0.35.1 build /home/runner/work/pluv/pluv/packages/crdt-yjs
3
3
  > tsup src/index.ts --format esm,cjs --dts
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -8,11 +8,11 @@
8
8
  CLI Target: es6
9
9
  ESM Build start
10
10
  CJS Build start
11
- ESM dist/index.mjs 10.92 KB
12
- ESM ⚡️ Build success in 110ms
13
- CJS dist/index.js 11.70 KB
14
- CJS ⚡️ Build success in 111ms
11
+ ESM dist/index.mjs 10.96 KB
12
+ ESM ⚡️ Build success in 104ms
13
+ CJS dist/index.js 11.75 KB
14
+ CJS ⚡️ Build success in 113ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 2495ms
16
+ DTS ⚡️ Build success in 2536ms
17
17
  DTS dist/index.d.mts 3.95 KB
18
18
  DTS dist/index.d.ts 3.95 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @pluv/crdt-yjs
2
2
 
3
+ ## 0.35.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 820898c: Increase undo/redo merge interval from 0s to 1s.
8
+ - @pluv/crdt@0.35.1
9
+ - @pluv/types@0.35.1
10
+
3
11
  ## 0.35.0
4
12
 
5
13
  ### Patch Changes
package/dist/index.js CHANGED
@@ -140,6 +140,7 @@ var YjsXmlText = class extends import_yjs6.XmlText {
140
140
  };
141
141
 
142
142
  // src/doc/CrdtYjsDoc.ts
143
+ var MERGE_INTERVAL_MS = 1e3;
143
144
  var CrdtYjsDoc = class extends import_crdt.AbstractCrdtDoc {
144
145
  constructor(value = {}) {
145
146
  super();
@@ -266,7 +267,7 @@ var CrdtYjsDoc = class extends import_crdt.AbstractCrdtDoc {
266
267
  this._undoManager = null;
267
268
  return this;
268
269
  }
269
- this._undoManager = new import_yjs7.UndoManager(sharedTypes, { captureTimeout: 0 });
270
+ this._undoManager = new import_yjs7.UndoManager(sharedTypes, { captureTimeout: MERGE_INTERVAL_MS });
270
271
  return this;
271
272
  }
272
273
  transact(fn) {
package/dist/index.mjs CHANGED
@@ -132,6 +132,7 @@ var YjsXmlText = class extends YXmlText {
132
132
  };
133
133
 
134
134
  // src/doc/CrdtYjsDoc.ts
135
+ var MERGE_INTERVAL_MS = 1e3;
135
136
  var CrdtYjsDoc = class extends AbstractCrdtDoc {
136
137
  constructor(value = {}) {
137
138
  super();
@@ -258,7 +259,7 @@ var CrdtYjsDoc = class extends AbstractCrdtDoc {
258
259
  this._undoManager = null;
259
260
  return this;
260
261
  }
261
- this._undoManager = new UndoManager(sharedTypes, { captureTimeout: 0 });
262
+ this._undoManager = new UndoManager(sharedTypes, { captureTimeout: MERGE_INTERVAL_MS });
262
263
  return this;
263
264
  }
264
265
  transact(fn) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluv/crdt-yjs",
3
- "version": "0.35.0",
3
+ "version": "0.35.1",
4
4
  "description": "yjs for @pluv/io",
5
5
  "author": "leedavidcs",
6
6
  "license": "MIT",
@@ -18,8 +18,8 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "js-base64": "^3.7.7",
21
- "@pluv/crdt": "^0.35.0",
22
- "@pluv/types": "^0.35.0"
21
+ "@pluv/crdt": "^0.35.1",
22
+ "@pluv/types": "^0.35.1"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "yjs": "^13.0.0"
@@ -27,10 +27,10 @@
27
27
  "devDependencies": {
28
28
  "eslint": "^8.57.1",
29
29
  "tsup": "^8.3.5",
30
- "typescript": "^5.7.2",
31
- "yjs": "^13.6.21",
32
- "@pluv/tsconfig": "^0.35.0",
33
- "eslint-config-pluv": "^0.35.0"
30
+ "typescript": "^5.7.3",
31
+ "yjs": "^13.6.23",
32
+ "@pluv/tsconfig": "^0.35.1",
33
+ "eslint-config-pluv": "^0.35.1"
34
34
  },
35
35
  "scripts": {
36
36
  "build": "tsup src/index.ts --format esm,cjs --dts",
@@ -22,6 +22,8 @@ import type { YjsType } from "../types";
22
22
  import { YjsXmlElement } from "../xmlElement/YjsXmlElement";
23
23
  import { YjsXmlText } from "../xmlText/YjsXmlText";
24
24
 
25
+ const MERGE_INTERVAL_MS = 1_000;
26
+
25
27
  export class CrdtYjsDoc<TStorage extends Record<string, YjsType<any, any>>> extends AbstractCrdtDoc<TStorage> {
26
28
  public value: YDoc = new YDoc();
27
29
 
@@ -205,7 +207,7 @@ export class CrdtYjsDoc<TStorage extends Record<string, YjsType<any, any>>> exte
205
207
  return this;
206
208
  }
207
209
 
208
- this._undoManager = new UndoManager(sharedTypes, { captureTimeout: 0 });
210
+ this._undoManager = new UndoManager(sharedTypes, { captureTimeout: MERGE_INTERVAL_MS });
209
211
 
210
212
  return this;
211
213
  }