@liveblocks/core 1.5.2 → 1.5.3-test1
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/dist/index.d.mts +2 -10
- package/dist/index.d.ts +2 -10
- package/dist/index.js +15 -18
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -18
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6,7 +6,7 @@ var __export = (target, all) => {
|
|
|
6
6
|
|
|
7
7
|
// src/version.ts
|
|
8
8
|
var PKG_NAME = "@liveblocks/core";
|
|
9
|
-
var PKG_VERSION = "1.5.
|
|
9
|
+
var PKG_VERSION = "1.5.3-test1";
|
|
10
10
|
var PKG_FORMAT = "esm";
|
|
11
11
|
|
|
12
12
|
// src/dupe-detection.ts
|
|
@@ -3759,17 +3759,14 @@ var LiveObject = class _LiveObject extends AbstractCrdt {
|
|
|
3759
3759
|
}
|
|
3760
3760
|
const opId = pool?.generateOpId();
|
|
3761
3761
|
const ops = [];
|
|
3762
|
-
const op =
|
|
3762
|
+
const op = {
|
|
3763
3763
|
type: 4 /* CREATE_OBJECT */,
|
|
3764
3764
|
id: this._id,
|
|
3765
3765
|
opId,
|
|
3766
3766
|
parentId,
|
|
3767
3767
|
parentKey,
|
|
3768
3768
|
data: {}
|
|
3769
|
-
}
|
|
3770
|
-
// Root object
|
|
3771
|
-
{ type: 4 /* CREATE_OBJECT */, id: this._id, opId, data: {} }
|
|
3772
|
-
);
|
|
3769
|
+
};
|
|
3773
3770
|
ops.push(op);
|
|
3774
3771
|
for (const [key, value] of this._map) {
|
|
3775
3772
|
if (isLiveNode(value)) {
|
|
@@ -4377,18 +4374,18 @@ function getTreesDiffOperations(currentItems, newItems) {
|
|
|
4377
4374
|
});
|
|
4378
4375
|
break;
|
|
4379
4376
|
case 0 /* OBJECT */:
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
);
|
|
4377
|
+
if (crdt.parentId === void 0 || crdt.parentKey === void 0) {
|
|
4378
|
+
throw new Error(
|
|
4379
|
+
"Internal error. Cannot serialize storage root into an operation"
|
|
4380
|
+
);
|
|
4381
|
+
}
|
|
4382
|
+
ops.push({
|
|
4383
|
+
type: 4 /* CREATE_OBJECT */,
|
|
4384
|
+
id,
|
|
4385
|
+
parentId: crdt.parentId,
|
|
4386
|
+
parentKey: crdt.parentKey,
|
|
4387
|
+
data: crdt.data
|
|
4388
|
+
});
|
|
4392
4389
|
break;
|
|
4393
4390
|
case 2 /* MAP */:
|
|
4394
4391
|
ops.push({
|