@liveblocks/redux 0.17.11 → 0.18.0-beta2
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/.built-by-link-script +1 -1
- package/index.js +5 -5
- package/package.json +2 -2
package/.built-by-link-script
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
b64462e4d737517c060ecb9b9544f8028fea010a
|
package/index.js
CHANGED
|
@@ -147,10 +147,10 @@ var internalEnhancer = (options) => {
|
|
|
147
147
|
if (storageRoot) {
|
|
148
148
|
return;
|
|
149
149
|
}
|
|
150
|
-
room = client.enter(roomId);
|
|
150
|
+
room = client.enter(roomId, { initialPresence: {} });
|
|
151
151
|
broadcastInitialPresence(room, reduxState, presenceMapping);
|
|
152
152
|
unsubscribeCallbacks.push(
|
|
153
|
-
room.subscribe(
|
|
153
|
+
room.events.connection.subscribe(() => {
|
|
154
154
|
store.dispatch({
|
|
155
155
|
type: ACTION_TYPES.UPDATE_CONNECTION,
|
|
156
156
|
connection: room.getConnectionState()
|
|
@@ -158,7 +158,7 @@ var internalEnhancer = (options) => {
|
|
|
158
158
|
})
|
|
159
159
|
);
|
|
160
160
|
unsubscribeCallbacks.push(
|
|
161
|
-
room.subscribe(
|
|
161
|
+
room.events.others.subscribe(({ others }) => {
|
|
162
162
|
store.dispatch({
|
|
163
163
|
type: ACTION_TYPES.UPDATE_OTHERS,
|
|
164
164
|
others: others.toArray()
|
|
@@ -166,7 +166,7 @@ var internalEnhancer = (options) => {
|
|
|
166
166
|
})
|
|
167
167
|
);
|
|
168
168
|
unsubscribeCallbacks.push(
|
|
169
|
-
room.subscribe(
|
|
169
|
+
room.events.me.subscribe(() => {
|
|
170
170
|
if (isPatching === false) {
|
|
171
171
|
store.dispatch({
|
|
172
172
|
type: ACTION_TYPES.PATCH_REDUX_STATE,
|
|
@@ -313,7 +313,7 @@ function patchState(state, updates, mapping) {
|
|
|
313
313
|
for (const key in mapping) {
|
|
314
314
|
partialState[key] = state[key];
|
|
315
315
|
}
|
|
316
|
-
const patched = _internal.
|
|
316
|
+
const patched = _internal.legacy_patchImmutableObject.call(void 0, partialState, updates);
|
|
317
317
|
const result = {};
|
|
318
318
|
for (const key in mapping) {
|
|
319
319
|
result[key] = patched[key];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liveblocks/redux",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0-beta2",
|
|
4
4
|
"description": "A store enhancer to integrate Liveblocks into Redux stores.",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"module": "./index.mjs",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"directory": "packages/liveblocks-redux"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@liveblocks/client": "0.
|
|
30
|
+
"@liveblocks/client": "0.18.0-beta2",
|
|
31
31
|
"redux": "^4"
|
|
32
32
|
},
|
|
33
33
|
"sideEffects": false
|