@pluv/crdt-yjs 0.18.0 → 0.19.0
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/.turbo/turbo-build.log +15 -15
- package/CHANGELOG.md +7 -0
- package/dist/index.js +4 -8
- package/dist/index.mjs +4 -8
- package/package.json +7 -7
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
|
|
2
|
-
> @pluv/crdt-yjs@0.
|
|
2
|
+
> @pluv/crdt-yjs@0.19.0 build /home/runner/work/pluv/pluv/packages/crdt-yjs
|
|
3
3
|
> tsup src/index.ts --format esm,cjs --dts
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
5
|
+
CLI Building entry: src/index.ts
|
|
6
|
+
CLI Using tsconfig: tsconfig.json
|
|
7
|
+
CLI tsup v8.1.0
|
|
8
|
+
CLI Target: es6
|
|
9
|
+
ESM Build start
|
|
10
|
+
CJS Build start
|
|
11
|
+
ESM dist/index.mjs 14.61 KB
|
|
12
|
+
ESM ⚡️ Build success in 129ms
|
|
13
|
+
CJS dist/index.js 15.31 KB
|
|
14
|
+
CJS ⚡️ Build success in 129ms
|
|
15
|
+
DTS Build start
|
|
16
|
+
DTS ⚡️ Build success in 2456ms
|
|
17
|
+
DTS dist/index.d.mts 8.38 KB
|
|
18
|
+
DTS dist/index.d.ts 8.38 KB
|
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -348,16 +348,14 @@ var CrdtYjsDoc = class extends import_crdt8.AbstractCrdtDoc {
|
|
|
348
348
|
}
|
|
349
349
|
applyEncodedState(params) {
|
|
350
350
|
const { origin, update } = params;
|
|
351
|
-
if (update === null || typeof update === "undefined")
|
|
352
|
-
return this;
|
|
351
|
+
if (update === null || typeof update === "undefined") return this;
|
|
353
352
|
const uint8Update = typeof update === "string" ? (0, import_js_base64.toUint8Array)(update) : update;
|
|
354
353
|
(0, import_yjs8.applyUpdate)(this.value, uint8Update, origin);
|
|
355
354
|
return this;
|
|
356
355
|
}
|
|
357
356
|
batchApplyEncodedState(updates) {
|
|
358
357
|
const params = updates.reduce((acc, update) => {
|
|
359
|
-
if (!update)
|
|
360
|
-
return acc;
|
|
358
|
+
if (!update) return acc;
|
|
361
359
|
if (typeof update === "string") {
|
|
362
360
|
acc.push({ update });
|
|
363
361
|
return acc;
|
|
@@ -384,8 +382,7 @@ var CrdtYjsDoc = class extends import_crdt8.AbstractCrdtDoc {
|
|
|
384
382
|
this.value.destroy();
|
|
385
383
|
}
|
|
386
384
|
get(key) {
|
|
387
|
-
if (typeof key === "undefined")
|
|
388
|
-
return this._storage;
|
|
385
|
+
if (typeof key === "undefined") return this._storage;
|
|
389
386
|
return this._storage[key];
|
|
390
387
|
}
|
|
391
388
|
getEncodedState() {
|
|
@@ -415,8 +412,7 @@ var CrdtYjsDoc = class extends import_crdt8.AbstractCrdtDoc {
|
|
|
415
412
|
}
|
|
416
413
|
track() {
|
|
417
414
|
var _a;
|
|
418
|
-
if (this._undoManager)
|
|
419
|
-
this._undoManager.destroy();
|
|
415
|
+
if (this._undoManager) this._undoManager.destroy();
|
|
420
416
|
const sharedTypes = Object.values(this._storage).reduce((acc, type) => {
|
|
421
417
|
if (type instanceof CrdtYjsArray || type instanceof CrdtYjsMap || type instanceof CrdtYjsObject || type instanceof CrdtYjsText || type instanceof CrdtYjsXmlElement || type instanceof CrdtYjsXmlFragment || type instanceof CrdtYjsXmlText) {
|
|
422
418
|
acc.push(type.value);
|
package/dist/index.mjs
CHANGED
|
@@ -340,16 +340,14 @@ var CrdtYjsDoc = class extends AbstractCrdtDoc {
|
|
|
340
340
|
}
|
|
341
341
|
applyEncodedState(params) {
|
|
342
342
|
const { origin, update } = params;
|
|
343
|
-
if (update === null || typeof update === "undefined")
|
|
344
|
-
return this;
|
|
343
|
+
if (update === null || typeof update === "undefined") return this;
|
|
345
344
|
const uint8Update = typeof update === "string" ? toUint8Array(update) : update;
|
|
346
345
|
applyUpdate(this.value, uint8Update, origin);
|
|
347
346
|
return this;
|
|
348
347
|
}
|
|
349
348
|
batchApplyEncodedState(updates) {
|
|
350
349
|
const params = updates.reduce((acc, update) => {
|
|
351
|
-
if (!update)
|
|
352
|
-
return acc;
|
|
350
|
+
if (!update) return acc;
|
|
353
351
|
if (typeof update === "string") {
|
|
354
352
|
acc.push({ update });
|
|
355
353
|
return acc;
|
|
@@ -376,8 +374,7 @@ var CrdtYjsDoc = class extends AbstractCrdtDoc {
|
|
|
376
374
|
this.value.destroy();
|
|
377
375
|
}
|
|
378
376
|
get(key) {
|
|
379
|
-
if (typeof key === "undefined")
|
|
380
|
-
return this._storage;
|
|
377
|
+
if (typeof key === "undefined") return this._storage;
|
|
381
378
|
return this._storage[key];
|
|
382
379
|
}
|
|
383
380
|
getEncodedState() {
|
|
@@ -407,8 +404,7 @@ var CrdtYjsDoc = class extends AbstractCrdtDoc {
|
|
|
407
404
|
}
|
|
408
405
|
track() {
|
|
409
406
|
var _a;
|
|
410
|
-
if (this._undoManager)
|
|
411
|
-
this._undoManager.destroy();
|
|
407
|
+
if (this._undoManager) this._undoManager.destroy();
|
|
412
408
|
const sharedTypes = Object.values(this._storage).reduce((acc, type) => {
|
|
413
409
|
if (type instanceof CrdtYjsArray || type instanceof CrdtYjsMap || type instanceof CrdtYjsObject || type instanceof CrdtYjsText || type instanceof CrdtYjsXmlElement || type instanceof CrdtYjsXmlFragment || type instanceof CrdtYjsXmlText) {
|
|
414
410
|
acc.push(type.value);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pluv/crdt-yjs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "yjs for @pluv/io",
|
|
5
5
|
"author": "leedavidcs",
|
|
6
6
|
"license": "MIT",
|
|
@@ -18,19 +18,19 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"js-base64": "^3.7.7",
|
|
21
|
-
"@pluv/crdt": "^0.
|
|
22
|
-
"@pluv/types": "^0.
|
|
21
|
+
"@pluv/crdt": "^0.19.0",
|
|
22
|
+
"@pluv/types": "^0.19.0"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"yjs": "^13.0.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"eslint": "^8.57.0",
|
|
29
|
-
"tsup": "^8.0
|
|
29
|
+
"tsup": "^8.1.0",
|
|
30
30
|
"typescript": "^5.4.5",
|
|
31
|
-
"yjs": "^13.6.
|
|
32
|
-
"@pluv/tsconfig": "^0.
|
|
33
|
-
"eslint-config-pluv": "^0.
|
|
31
|
+
"yjs": "^13.6.18",
|
|
32
|
+
"@pluv/tsconfig": "^0.19.0",
|
|
33
|
+
"eslint-config-pluv": "^0.19.0"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "tsup src/index.ts --format esm,cjs --dts",
|