@liveblocks/yjs 1.1.0-yjs3 → 1.1.0-yjs4
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 +10 -2
- package/dist/index.mjs +10 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -158,11 +158,19 @@ var Awareness = class extends Observable {
|
|
|
158
158
|
return presence["__yjs"];
|
|
159
159
|
}
|
|
160
160
|
setLocalState(state) {
|
|
161
|
-
|
|
161
|
+
var _a;
|
|
162
|
+
const presence = (_a = this.room.getSelf()) == null ? void 0 : _a.presence["__yjs"];
|
|
163
|
+
this.room.updatePresence({
|
|
164
|
+
__yjs: __spreadValues(__spreadValues({}, presence || {}), state || {})
|
|
165
|
+
});
|
|
162
166
|
}
|
|
163
167
|
setLocalStateField(field, value) {
|
|
168
|
+
var _a;
|
|
169
|
+
const presence = (_a = this.room.getSelf()) == null ? void 0 : _a.presence["__yjs"];
|
|
164
170
|
const update = { [field]: value };
|
|
165
|
-
this.room.updatePresence({
|
|
171
|
+
this.room.updatePresence({
|
|
172
|
+
__yjs: __spreadValues(__spreadValues({}, presence || {}), update)
|
|
173
|
+
});
|
|
166
174
|
}
|
|
167
175
|
// Translate liveblocks presence to yjs awareness
|
|
168
176
|
getStates() {
|
package/dist/index.mjs
CHANGED
|
@@ -158,11 +158,19 @@ var Awareness = class extends Observable {
|
|
|
158
158
|
return presence["__yjs"];
|
|
159
159
|
}
|
|
160
160
|
setLocalState(state) {
|
|
161
|
-
|
|
161
|
+
var _a;
|
|
162
|
+
const presence = (_a = this.room.getSelf()) == null ? void 0 : _a.presence["__yjs"];
|
|
163
|
+
this.room.updatePresence({
|
|
164
|
+
__yjs: __spreadValues(__spreadValues({}, presence || {}), state || {})
|
|
165
|
+
});
|
|
162
166
|
}
|
|
163
167
|
setLocalStateField(field, value) {
|
|
168
|
+
var _a;
|
|
169
|
+
const presence = (_a = this.room.getSelf()) == null ? void 0 : _a.presence["__yjs"];
|
|
164
170
|
const update = { [field]: value };
|
|
165
|
-
this.room.updatePresence({
|
|
171
|
+
this.room.updatePresence({
|
|
172
|
+
__yjs: __spreadValues(__spreadValues({}, presence || {}), update)
|
|
173
|
+
});
|
|
166
174
|
}
|
|
167
175
|
// Translate liveblocks presence to yjs awareness
|
|
168
176
|
getStates() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liveblocks/yjs",
|
|
3
|
-
"version": "1.1.0-
|
|
3
|
+
"version": "1.1.0-yjs4",
|
|
4
4
|
"description": "An integration with . Liveblocks is the all-in-one toolkit to build collaborative products like Figma, Notion, and more.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@liveblocks/client": "1.1.0-
|
|
30
|
-
"@liveblocks/core": "1.1.0-
|
|
29
|
+
"@liveblocks/client": "1.1.0-yjs4",
|
|
30
|
+
"@liveblocks/core": "1.1.0-yjs4",
|
|
31
31
|
"js-base64": "^3.7.5"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|