@liveblocks/redux 1.1.0-rc1 → 1.1.0
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.ts +21 -3
- package/dist/index.js +6 -3
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { JsonObject, BaseUserMeta, Client, User } from '@liveblocks/client';
|
|
1
|
+
import { JsonObject, BaseUserMeta, Client, User, Status } from '@liveblocks/client';
|
|
2
|
+
import { LegacyConnectionStatus } from '@liveblocks/core';
|
|
2
3
|
import { StoreEnhancer } from 'redux';
|
|
3
4
|
|
|
4
5
|
declare type Mapping<T> = {
|
|
@@ -14,9 +15,26 @@ declare type LiveblocksContext<TPresence extends JsonObject, TUserMeta extends B
|
|
|
14
15
|
*/
|
|
15
16
|
readonly isStorageLoading: boolean;
|
|
16
17
|
/**
|
|
17
|
-
*
|
|
18
|
+
* Legacy connection status of the room.
|
|
19
|
+
*
|
|
20
|
+
* @deprecated This API will be removed in a future version of Liveblocks.
|
|
21
|
+
* Prefer using the newer `.status` property.
|
|
22
|
+
*
|
|
23
|
+
* We recommend making the following changes if you use these APIs:
|
|
24
|
+
*
|
|
25
|
+
* OLD STATUSES NEW STATUSES
|
|
26
|
+
* closed --> initial
|
|
27
|
+
* authenticating --> connecting
|
|
28
|
+
* connecting --> connecting
|
|
29
|
+
* open --> connected
|
|
30
|
+
* unavailable --> reconnecting
|
|
31
|
+
* failed --> disconnected
|
|
18
32
|
*/
|
|
19
|
-
readonly connection:
|
|
33
|
+
readonly connection: LegacyConnectionStatus;
|
|
34
|
+
/**
|
|
35
|
+
* Connection status of the room.
|
|
36
|
+
*/
|
|
37
|
+
readonly status: Status;
|
|
20
38
|
};
|
|
21
39
|
/**
|
|
22
40
|
* @deprecated Please rename to WithLiveblocks<...>
|
package/dist/index.js
CHANGED
|
@@ -102,7 +102,8 @@ var internalEnhancer = (options) => {
|
|
|
102
102
|
case ACTION_TYPES.UPDATE_CONNECTION: {
|
|
103
103
|
return __spreadProps(__spreadValues({}, state), {
|
|
104
104
|
liveblocks: __spreadProps(__spreadValues({}, state.liveblocks), {
|
|
105
|
-
connection: action.connection
|
|
105
|
+
connection: action.connection,
|
|
106
|
+
status: action.status
|
|
106
107
|
})
|
|
107
108
|
});
|
|
108
109
|
}
|
|
@@ -135,7 +136,8 @@ var internalEnhancer = (options) => {
|
|
|
135
136
|
liveblocks: {
|
|
136
137
|
others: [],
|
|
137
138
|
isStorageLoading: false,
|
|
138
|
-
connection: "closed"
|
|
139
|
+
connection: "closed",
|
|
140
|
+
status: "initial"
|
|
139
141
|
}
|
|
140
142
|
});
|
|
141
143
|
}
|
|
@@ -157,7 +159,8 @@ var internalEnhancer = (options) => {
|
|
|
157
159
|
room.events.connection.subscribe(() => {
|
|
158
160
|
store.dispatch({
|
|
159
161
|
type: ACTION_TYPES.UPDATE_CONNECTION,
|
|
160
|
-
connection: room.getConnectionState()
|
|
162
|
+
connection: room.getConnectionState(),
|
|
163
|
+
status: room.getStatus()
|
|
161
164
|
});
|
|
162
165
|
})
|
|
163
166
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liveblocks/redux",
|
|
3
|
-
"version": "1.1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "A store enhancer to integrate Liveblocks into Redux stores. 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",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"test:watch": "jest --silent --verbose --color=always --watch"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@liveblocks/client": "1.1.0
|
|
22
|
-
"@liveblocks/core": "1.1.0
|
|
21
|
+
"@liveblocks/client": "1.1.0",
|
|
22
|
+
"@liveblocks/core": "1.1.0"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"redux": "^4"
|