@liveblocks/core 1.4.1-test2 → 1.4.1-test3
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.js +20 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
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.4.1-
|
|
9
|
+
var PKG_VERSION = "1.4.1-test3";
|
|
10
10
|
var PKG_FORMAT = "cjs";
|
|
11
11
|
|
|
12
12
|
// src/dupe-detection.ts
|
|
@@ -2343,7 +2343,15 @@ var LiveList = class _LiveList extends AbstractCrdt {
|
|
|
2343
2343
|
}
|
|
2344
2344
|
return list;
|
|
2345
2345
|
}
|
|
2346
|
-
/**
|
|
2346
|
+
/**
|
|
2347
|
+
* @internal
|
|
2348
|
+
* This function assumes that the resulting ops will be sent to the server if they have an 'opId'
|
|
2349
|
+
* so we mutate _unacknowledgedSets to avoid potential flickering
|
|
2350
|
+
* https://github.com/liveblocks/liveblocks/pull/1177
|
|
2351
|
+
*
|
|
2352
|
+
* This is quite unintuitive and should disappear as soon as
|
|
2353
|
+
* we introduce an explicit LiveList.Set operation
|
|
2354
|
+
*/
|
|
2347
2355
|
_toOps(parentId, parentKey, pool) {
|
|
2348
2356
|
if (this._id === void 0) {
|
|
2349
2357
|
throw new Error("Cannot serialize item is not attached");
|
|
@@ -2358,7 +2366,16 @@ var LiveList = class _LiveList extends AbstractCrdt {
|
|
|
2358
2366
|
};
|
|
2359
2367
|
ops.push(op);
|
|
2360
2368
|
for (const item of this._items) {
|
|
2361
|
-
|
|
2369
|
+
const parentKey2 = item._getParentKeyOrThrow();
|
|
2370
|
+
const childOps = HACK_addIntentAndDeletedIdToOperation(
|
|
2371
|
+
item._toOps(this._id, parentKey2, pool),
|
|
2372
|
+
void 0
|
|
2373
|
+
);
|
|
2374
|
+
const childOpId = childOps[0].opId;
|
|
2375
|
+
if (childOpId !== void 0) {
|
|
2376
|
+
this._unacknowledgedSets.set(parentKey2, childOpId);
|
|
2377
|
+
}
|
|
2378
|
+
ops.push(...childOps);
|
|
2362
2379
|
}
|
|
2363
2380
|
return ops;
|
|
2364
2381
|
}
|