@liveblocks/core 1.5.3-test1 → 1.6.0-subdocs1
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 +11 -5
- package/dist/index.d.ts +11 -5
- package/dist/index.js +13 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -6
- 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.
|
|
9
|
+
var PKG_VERSION = "1.6.0-subdocs1";
|
|
10
10
|
var PKG_FORMAT = "esm";
|
|
11
11
|
|
|
12
12
|
// src/dupe-detection.ts
|
|
@@ -572,6 +572,9 @@ var FSM = class {
|
|
|
572
572
|
};
|
|
573
573
|
|
|
574
574
|
// src/lib/utils.ts
|
|
575
|
+
function raise(msg) {
|
|
576
|
+
throw new Error(msg);
|
|
577
|
+
}
|
|
575
578
|
function isPlainObject(blob) {
|
|
576
579
|
return blob !== null && typeof blob === "object" && Object.prototype.toString.call(blob) === "[object Object]";
|
|
577
580
|
}
|
|
@@ -5567,10 +5570,11 @@ ${Array.from(traces).join("\n\n")}`
|
|
|
5567
5570
|
}
|
|
5568
5571
|
return messages;
|
|
5569
5572
|
}
|
|
5570
|
-
function updateYDoc(update) {
|
|
5573
|
+
function updateYDoc(update, guid) {
|
|
5571
5574
|
const clientMsg = {
|
|
5572
5575
|
type: 301 /* UPDATE_YDOC */,
|
|
5573
|
-
update
|
|
5576
|
+
update,
|
|
5577
|
+
guid
|
|
5574
5578
|
};
|
|
5575
5579
|
context.buffer.messages.push(clientMsg);
|
|
5576
5580
|
eventHub.ydoc.notify(clientMsg);
|
|
@@ -5633,13 +5637,14 @@ ${Array.from(traces).join("\n\n")}`
|
|
|
5633
5637
|
root: nn(context.root)
|
|
5634
5638
|
};
|
|
5635
5639
|
}
|
|
5636
|
-
function fetchYDoc(vector) {
|
|
5640
|
+
function fetchYDoc(vector, guid) {
|
|
5637
5641
|
if (!context.buffer.messages.find((m) => {
|
|
5638
|
-
return m.type === 300 /* FETCH_YDOC */ && m.vector === vector;
|
|
5642
|
+
return m.type === 300 /* FETCH_YDOC */ && m.vector === vector && m.guid === guid;
|
|
5639
5643
|
})) {
|
|
5640
5644
|
context.buffer.messages.push({
|
|
5641
5645
|
type: 300 /* FETCH_YDOC */,
|
|
5642
|
-
vector
|
|
5646
|
+
vector,
|
|
5647
|
+
guid
|
|
5643
5648
|
});
|
|
5644
5649
|
}
|
|
5645
5650
|
flushNowOrSoon();
|
|
@@ -6769,6 +6774,7 @@ export {
|
|
|
6769
6774
|
makePosition,
|
|
6770
6775
|
nn,
|
|
6771
6776
|
patchLiveObjectKey,
|
|
6777
|
+
raise,
|
|
6772
6778
|
shallow,
|
|
6773
6779
|
stringify,
|
|
6774
6780
|
throwUsageError,
|