@liveblocks/zustand 0.17.6 → 0.17.7

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.
Files changed (2) hide show
  1. package/index.d.ts +9 -9
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -12,10 +12,10 @@ import { StateCreator, SetState, GetState, StoreApi } from "zustand";
12
12
  declare type ZustandState = Record<string, unknown>;
13
13
  declare type LiveblocksState<
14
14
  TState extends ZustandState,
15
- TPresence extends JsonObject,
16
- TStorage extends LsonObject,
17
- TUserMeta extends BaseUserMeta,
18
- TRoomEvent extends Json
15
+ TPresence extends JsonObject = JsonObject,
16
+ TStorage extends LsonObject = LsonObject,
17
+ TUserMeta extends BaseUserMeta = BaseUserMeta,
18
+ TRoomEvent extends Json = Json
19
19
  > = TState & {
20
20
  /**
21
21
  * Liveblocks extra state attached by the middleware
@@ -39,7 +39,7 @@ declare type LiveblocksState<
39
39
  /**
40
40
  * Other users in the room. Empty no room is currently synced
41
41
  */
42
- readonly others: Array<User<TPresence, TStorage>>;
42
+ readonly others: Array<User<TPresence, TUserMeta>>;
43
43
  /**
44
44
  * Whether or not the room storage is currently loading
45
45
  */
@@ -75,10 +75,10 @@ declare type Options<T> = {
75
75
  };
76
76
  declare function middleware<
77
77
  T extends ZustandState,
78
- TPresence extends JsonObject,
79
- TStorage extends LsonObject,
80
- TUserMeta extends BaseUserMeta,
81
- TRoomEvent extends Json
78
+ TPresence extends JsonObject = JsonObject,
79
+ TStorage extends LsonObject = LsonObject,
80
+ TUserMeta extends BaseUserMeta = BaseUserMeta,
81
+ TRoomEvent extends Json = Json
82
82
  >(
83
83
  config: StateCreator<
84
84
  T,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liveblocks/zustand",
3
- "version": "0.17.6",
3
+ "version": "0.17.7",
4
4
  "description": "A middleware to integrate Liveblocks into Zustand stores.",
5
5
  "main": "./index.js",
6
6
  "module": "./index.mjs",
@@ -20,7 +20,7 @@
20
20
  "directory": "packages/liveblocks-zustand"
21
21
  },
22
22
  "peerDependencies": {
23
- "@liveblocks/client": "0.17.6",
23
+ "@liveblocks/client": "0.17.7",
24
24
  "zustand": "^3"
25
25
  },
26
26
  "sideEffects": false