@liveblocks/react 2.10.0 → 2.10.1-react19rc

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 (33) hide show
  1. package/dist/_private.d.mts +1 -1
  2. package/dist/_private.d.ts +1 -1
  3. package/dist/_private.js +4 -6
  4. package/dist/_private.js.map +1 -1
  5. package/dist/_private.mjs +1 -3
  6. package/dist/_private.mjs.map +1 -1
  7. package/dist/{chunk-WJLAYICR.js → chunk-3MM4G6XB.js} +729 -694
  8. package/dist/chunk-3MM4G6XB.js.map +1 -0
  9. package/dist/{chunk-PJN3AKDH.js → chunk-6Z2BEGKA.js} +2 -2
  10. package/dist/{chunk-LMENFXCS.mjs → chunk-A7GJNN4L.mjs} +723 -688
  11. package/dist/chunk-A7GJNN4L.mjs.map +1 -0
  12. package/dist/{chunk-PXKGBTHT.mjs → chunk-ZGTP66ZG.mjs} +2 -2
  13. package/dist/index.d.mts +2 -2
  14. package/dist/index.d.ts +2 -2
  15. package/dist/index.js +4 -4
  16. package/dist/index.js.map +1 -1
  17. package/dist/index.mjs +4 -4
  18. package/dist/index.mjs.map +1 -1
  19. package/dist/{liveblocks-X3qYz1Vg.d.mts → liveblocks-SAVcXwMX.d.mts} +105 -60
  20. package/dist/{liveblocks-X3qYz1Vg.d.ts → liveblocks-SAVcXwMX.d.ts} +105 -60
  21. package/dist/{suspense-pF_E-0CC.d.mts → suspense-W7Cp9ygn.d.ts} +18 -13
  22. package/dist/{suspense-qQ0vzMgn.d.ts → suspense-vGJE9Mgq.d.mts} +18 -13
  23. package/dist/suspense.d.mts +2 -2
  24. package/dist/suspense.d.ts +2 -2
  25. package/dist/suspense.js +4 -4
  26. package/dist/suspense.js.map +1 -1
  27. package/dist/suspense.mjs +4 -4
  28. package/dist/suspense.mjs.map +1 -1
  29. package/package.json +4 -4
  30. package/dist/chunk-LMENFXCS.mjs.map +0 -1
  31. package/dist/chunk-WJLAYICR.js.map +0 -1
  32. /package/dist/{chunk-PJN3AKDH.js.map → chunk-6Z2BEGKA.js.map} +0 -0
  33. /package/dist/{chunk-PXKGBTHT.mjs.map → chunk-ZGTP66ZG.mjs.map} +0 -0
@@ -1,5 +1,5 @@
1
- import { JsonObject, LsonObject, BaseUserMeta, LiveObject, User, RoomNotificationSettings, Json, Room, Status, BroadcastOptions, OthersEvent, LostConnectionEvent, History, BaseMetadata as BaseMetadata$1, Client as Client$1, ClientOptions } from '@liveblocks/client';
2
- import { BaseMetadata, CommentBody, Patchable, StorageStatus, QueryMetadata, AsyncResult, DRI, AsyncSuccess, CommentAttachment, InboxNotificationData, Resolve, ToImmutable, AsyncLoading, AsyncError, ThreadData, HistoryVersion, Client, LiveblocksError, RoomEventMessage, CommentData, PartialUnless, ThreadDataWithDeleteInfo, RoomNotificationSettings as RoomNotificationSettings$1, OpaqueClient, CommentUserReaction, ThreadDeleteInfo, InboxNotificationDeleteInfo, DistributiveOmit, DU, DM } from '@liveblocks/core';
1
+ import { JsonObject, LsonObject, BaseUserMeta, LiveObject, User, Json, RoomNotificationSettings, Room, Status, BroadcastOptions, OthersEvent, LostConnectionEvent, History, BaseMetadata as BaseMetadata$1, Client as Client$1, ClientOptions } from '@liveblocks/client';
2
+ import { BaseMetadata, CommentBody, Patchable, StorageStatus, QueryMetadata, AsyncResult, DRI, AsyncSuccess, CommentAttachment, InboxNotificationData, Resolve, ToImmutable, AsyncLoading, AsyncError, ThreadData, HistoryVersion, Client, LiveblocksError, RoomEventMessage, CommentData, PartialUnless, ThreadDataWithDeleteInfo, OpaqueClient, CommentUserReaction, ThreadDeleteInfo, InboxNotificationDeleteInfo, RoomNotificationSettings as RoomNotificationSettings$1, DistributiveOmit, DU, DM } from '@liveblocks/core';
3
3
  import React__default, { PropsWithChildren } from 'react';
4
4
 
5
5
  /**
@@ -22,6 +22,9 @@ declare class CreateThreadError<M extends BaseMetadata> extends Error {
22
22
  metadata: M;
23
23
  });
24
24
  }
25
+ /**
26
+ * @private Internal API, do not rely on it.
27
+ */
25
28
  declare class EditThreadMetadataError<M extends BaseMetadata> extends Error {
26
29
  cause: Error;
27
30
  context: {
@@ -35,6 +38,9 @@ declare class EditThreadMetadataError<M extends BaseMetadata> extends Error {
35
38
  metadata: Patchable<M>;
36
39
  });
37
40
  }
41
+ /**
42
+ * @private Internal API, do not rely on it.
43
+ */
38
44
  declare class CreateCommentError extends Error {
39
45
  cause: Error;
40
46
  context: {
@@ -50,6 +56,9 @@ declare class CreateCommentError extends Error {
50
56
  body: CommentBody;
51
57
  });
52
58
  }
59
+ /**
60
+ * @private Internal API, do not rely on it.
61
+ */
53
62
  declare class EditCommentError extends Error {
54
63
  cause: Error;
55
64
  context: {
@@ -65,6 +74,9 @@ declare class EditCommentError extends Error {
65
74
  body: CommentBody;
66
75
  });
67
76
  }
77
+ /**
78
+ * @private Internal API, do not rely on it.
79
+ */
68
80
  declare class DeleteCommentError extends Error {
69
81
  cause: Error;
70
82
  context: {
@@ -78,6 +90,9 @@ declare class DeleteCommentError extends Error {
78
90
  commentId: string;
79
91
  });
80
92
  }
93
+ /**
94
+ * @private Internal API, do not rely on it.
95
+ */
81
96
  declare class MarkInboxNotificationAsReadError extends Error {
82
97
  cause: Error;
83
98
  context: {
@@ -87,6 +102,9 @@ declare class MarkInboxNotificationAsReadError extends Error {
87
102
  inboxNotificationId: string;
88
103
  });
89
104
  }
105
+ /**
106
+ * @private Internal API, do not rely on it.
107
+ */
90
108
  declare class UpdateNotificationSettingsError extends Error {
91
109
  cause: Error;
92
110
  context: {
@@ -96,6 +114,9 @@ declare class UpdateNotificationSettingsError extends Error {
96
114
  roomId: string;
97
115
  });
98
116
  }
117
+ /**
118
+ * @private Internal API, do not rely on it.
119
+ */
99
120
  declare type CommentsError<M extends BaseMetadata> = CreateThreadError<M> | EditThreadMetadataError<M> | CreateCommentError | EditCommentError | DeleteCommentError | MarkInboxNotificationAsReadError | UpdateNotificationSettingsError;
100
121
 
101
122
  declare type UseStorageStatusOptions = {
@@ -1040,6 +1061,61 @@ declare type LiveblocksContextBundle<U extends BaseUserMeta, M extends BaseMetad
1040
1061
  }>;
1041
1062
  }>;
1042
1063
 
1064
+ declare type ReadonlyThreadDB<M extends BaseMetadata> = Omit<ThreadDB<M>, "upsert" | "delete">;
1065
+ /**
1066
+ * This class implements a lightweight, in-memory, "database" for all Thread
1067
+ * instances.
1068
+ *
1069
+ * It exposes the following methods:
1070
+ *
1071
+ * - upsert: To add/update a thread
1072
+ * - upsertIfNewer: To add/update a thread. Only update an existing thread if
1073
+ * its newer
1074
+ * - delete: To mark existing threads as deleted
1075
+ * - get: To get any non-deleted thread
1076
+ * - getEvenIfDeleted: To get a thread which is possibly deleted
1077
+ * - findMany: To filter an ordered list of non-deleted threads
1078
+ * - clone: To clone the DB to mutate it further. This is used to mix in
1079
+ * optimistic updates without losing the original thread contents.
1080
+ *
1081
+ */
1082
+ declare class ThreadDB<M extends BaseMetadata> {
1083
+ private _byId;
1084
+ private _asc;
1085
+ private _desc;
1086
+ private _version;
1087
+ constructor();
1088
+ clone(): ThreadDB<M>;
1089
+ /** Gets the transaction count for this DB. Increments any time the DB is modified. */
1090
+ get version(): number;
1091
+ /** Returns an existing thread by ID. Will never return a deleted thread. */
1092
+ get(threadId: string): ThreadData<M> | undefined;
1093
+ /** Returns the (possibly deleted) thread by ID. */
1094
+ getEvenIfDeleted(threadId: string): ThreadDataWithDeleteInfo<M> | undefined;
1095
+ /** Adds or updates a thread in the DB. If the newly given thread is a deleted one, it will get deleted. */
1096
+ upsert(thread: ThreadDataWithDeleteInfo<M>): void;
1097
+ /** Like .upsert(), except it won't update if a thread by this ID already exists. */
1098
+ upsertIfNewer(thread: ThreadDataWithDeleteInfo<M>): void;
1099
+ /**
1100
+ * Marks a thread as deleted. It will no longer pop up in .findMany()
1101
+ * queries, but it can still be accessed via `.getEvenIfDeleted()`.
1102
+ */
1103
+ delete(threadId: string, deletedAt: Date): void;
1104
+ /**
1105
+ * Returns all threads matching a given roomId and query. If roomId is not
1106
+ * specified, it will return all threads matching the query, across all
1107
+ * rooms.
1108
+ *
1109
+ * Returns the results in the requested order. Please note:
1110
+ * 'asc' means by createdAt ASC
1111
+ * 'desc' means by updatedAt DESC
1112
+ *
1113
+ * Will never return deleted threads in the result.
1114
+ */
1115
+ findMany(roomId: string | undefined, query: ThreadsQuery<M>, direction: "asc" | "desc"): ThreadData<M>[];
1116
+ private touch;
1117
+ }
1118
+
1043
1119
  declare type OptimisticUpdate<M extends BaseMetadata> = CreateThreadOptimisticUpdate<M> | DeleteThreadOptimisticUpdate | EditThreadMetadataOptimisticUpdate<M> | MarkThreadAsResolvedOptimisticUpdate | MarkThreadAsUnresolvedOptimisticUpdate | CreateCommentOptimisticUpdate | EditCommentOptimisticUpdate | DeleteCommentOptimisticUpdate | AddReactionOptimisticUpdate | RemoveReactionOptimisticUpdate | MarkInboxNotificationAsReadOptimisticUpdate | MarkAllInboxNotificationsAsReadOptimisticUpdate | DeleteInboxNotificationOptimisticUpdate | DeleteAllInboxNotificationsOptimisticUpdate | UpdateNotificationSettingsOptimisticUpdate;
1044
1120
  declare type CreateThreadOptimisticUpdate<M extends BaseMetadata> = {
1045
1121
  type: "create-thread";
@@ -1135,15 +1211,6 @@ declare type UpdateNotificationSettingsOptimisticUpdate = {
1135
1211
  roomId: string;
1136
1212
  settings: Partial<RoomNotificationSettings$1>;
1137
1213
  };
1138
- declare type QueryAsyncResult = AsyncResult<undefined>;
1139
- /**
1140
- * @private Do not rely on this internal API.
1141
- */
1142
- declare function selectThreads<M extends BaseMetadata>(state: UmbrellaStoreState<M>, options: {
1143
- roomId: string | null;
1144
- query?: ThreadsQuery<M>;
1145
- orderBy: "age" | "last-update";
1146
- }): ThreadData<M>[];
1147
1214
  /**
1148
1215
  * Like Promise<T>, except it will have a synchronously readable `status`
1149
1216
  * field, indicating the status of the promise.
@@ -1169,23 +1236,11 @@ declare type UmbrellaStoreState<M extends BaseMetadata> = {
1169
1236
  * e.g. 'room-abc-{"color":"red"}' - ok
1170
1237
  * e.g. 'room-abc-{}' - loading
1171
1238
  */
1172
- queries3: Record<string, QueryAsyncResult>;
1173
- queries4: Record<string, QueryAsyncResult>;
1174
- /**
1175
- * All threads in a sorted array, optimistic updates applied, without deleted
1176
- * threads.
1177
- */
1178
- threads: ThreadData<M>[];
1179
- /**
1180
- * All threads in a map, keyed by thread ID, with all optimistic updates
1181
- * applied. Deleted threads are still in this mapping, and will have
1182
- * a deletedAt field if so.
1183
- */
1184
- threadsById: Record<string, ThreadDataWithDeleteInfo<M>>;
1239
+ threadsDB: ReadonlyThreadDB<M>;
1185
1240
  /**
1186
1241
  * All inbox notifications in a sorted array, optimistic updates applied.
1187
1242
  */
1188
- notifications: InboxNotificationData[];
1243
+ cleanedNotifications: InboxNotificationData[];
1189
1244
  /**
1190
1245
  * Inbox notifications by ID.
1191
1246
  * e.g. `in_${string}`
@@ -1203,10 +1258,12 @@ declare type UmbrellaStoreState<M extends BaseMetadata> = {
1203
1258
  * Versions by roomId
1204
1259
  * e.g. { 'room-abc': {versions: "all versions"}}
1205
1260
  */
1206
- versionsByRoomId: Record<string, HistoryVersion[]>;
1261
+ versionsByRoomId: Record<string, Record<string, HistoryVersion>>;
1207
1262
  };
1208
1263
  declare class UmbrellaStore<M extends BaseMetadata> {
1209
- private _client?;
1264
+ private _client;
1265
+ private _rawThreadsDB;
1266
+ private _prevVersion;
1210
1267
  private _store;
1211
1268
  private _prevState;
1212
1269
  private _stateCached;
@@ -1216,7 +1273,10 @@ declare class UmbrellaStore<M extends BaseMetadata> {
1216
1273
  private _roomThreads;
1217
1274
  private _userThreadsLastRequestedAt;
1218
1275
  private _userThreads;
1219
- constructor(client?: OpaqueClient);
1276
+ private _roomVersions;
1277
+ private _roomVersionsLastRequestedAtByRoom;
1278
+ private _roomNotificationSettings;
1279
+ constructor(client: OpaqueClient);
1220
1280
  private get;
1221
1281
  batch(callback: () => void): void;
1222
1282
  getFullState(): UmbrellaStoreState<M>;
@@ -1225,31 +1285,20 @@ declare class UmbrellaStore<M extends BaseMetadata> {
1225
1285
  * then it will return the threads that match that provided query and room id.
1226
1286
  *
1227
1287
  */
1228
- getRoomThreadsAsync(roomId: string, query: ThreadsQuery<M> | undefined): ThreadsAsyncResult<M>;
1229
- getUserThreadsAsync(query: ThreadsQuery<M> | undefined): ThreadsAsyncResult<M>;
1230
- getInboxNotificationsAsync(): InboxNotificationsAsyncResult;
1231
- getNotificationSettingsAsync(roomId: string): RoomNotificationSettingsAsyncResult;
1232
- getVersionsAsync(roomId: string): AsyncResult<HistoryVersion[], "versions">;
1288
+ getRoomThreadsLoadingState(roomId: string, query: ThreadsQuery<M> | undefined): ThreadsAsyncResult<M>;
1289
+ getUserThreadsLoadingState(query: ThreadsQuery<M> | undefined): ThreadsAsyncResult<M>;
1290
+ getInboxNotificationsLoadingState(): InboxNotificationsAsyncResult;
1291
+ getNotificationSettingsLoadingState(roomId: string): RoomNotificationSettingsAsyncResult;
1292
+ getRoomVersionsLoadingState(roomId: string): AsyncResult<HistoryVersion[], "versions">;
1233
1293
  /**
1234
1294
  * @private Only used by the E2E test suite.
1235
1295
  */
1236
1296
  _hasOptimisticUpdates(): boolean;
1237
- private subscribe;
1238
- /**
1239
- * @private Only used by the E2E test suite.
1240
- */
1241
- _subscribeOptimisticUpdates(callback: () => void): () => void;
1242
- subscribeThreads(callback: () => void): () => void;
1243
- subscribeUserThreads(callback: () => void): () => void;
1244
- subscribeThreadsOrInboxNotifications(callback: () => void): () => void;
1245
- subscribeNotificationSettings(callback: () => void): () => void;
1246
- subscribeVersions(callback: () => void): () => void;
1247
- private updateThreadsCache;
1297
+ subscribe(callback: () => void): () => void;
1298
+ private mutateThreadsDB;
1248
1299
  private updateInboxNotificationsCache;
1249
1300
  private setNotificationSettings;
1250
- private setVersions;
1251
- private setQuery3State;
1252
- private setQuery4State;
1301
+ private updateRoomVersions;
1253
1302
  private updateOptimisticUpdatesCache;
1254
1303
  /**
1255
1304
  * Updates an existing inbox notification with a new value, replacing the
@@ -1318,23 +1367,19 @@ declare class UmbrellaStore<M extends BaseMetadata> {
1318
1367
  * Updates existing notification setting for a room with a new value,
1319
1368
  * replacing the corresponding optimistic update.
1320
1369
  */
1321
- updateRoomInboxNotificationSettings2(roomId: string, optimisticUpdateId: string, settings: Readonly<RoomNotificationSettings$1>): void;
1322
- updateRoomInboxNotificationSettings(roomId: string, settings: RoomNotificationSettings$1, queryKey: string): void;
1323
- updateRoomVersions(roomId: string, versions: HistoryVersion[], queryKey?: string): void;
1370
+ updateRoomNotificationSettings_confirmOptimisticUpdate(roomId: string, optimisticUpdateId: string, settings: Readonly<RoomNotificationSettings$1>): void;
1324
1371
  addOptimisticUpdate(optimisticUpdate: DistributiveOmit<OptimisticUpdate<M>, "id">): string;
1325
1372
  removeOptimisticUpdate(optimisticUpdateId: string): void;
1326
- setQuery3Loading(queryKey: string): void;
1327
- private setQuery3OK;
1328
- setQuery3Error(queryKey: string, error: Error): void;
1329
- setQuery4Loading(queryKey: string): void;
1330
- private setQuery4OK;
1331
- setQuery4Error(queryKey: string, error: Error): void;
1332
- fetchNotificationsDeltaUpdate(): Promise<void>;
1373
+ fetchNotificationsDeltaUpdate(signal: AbortSignal): Promise<void>;
1333
1374
  waitUntilNotificationsLoaded(): UsablePromise<void>;
1334
1375
  waitUntilRoomThreadsLoaded(roomId: string, query: ThreadsQuery<M> | undefined): UsablePromise<void>;
1335
- fetchRoomThreadsDeltaUpdate(roomId: string): Promise<void>;
1376
+ fetchRoomThreadsDeltaUpdate(roomId: string, signal: AbortSignal): Promise<void>;
1336
1377
  waitUntilUserThreadsLoaded(query: ThreadsQuery<M> | undefined): UsablePromise<void>;
1337
- fetchUserThreadsDeltaUpdate(): Promise<void>;
1378
+ fetchUserThreadsDeltaUpdate(signal: AbortSignal): Promise<void>;
1379
+ waitUntilRoomVersionsLoaded(roomId: string): UsablePromise<void>;
1380
+ fetchRoomVersionsDeltaUpdate(roomId: string, signal: AbortSignal): Promise<void>;
1381
+ waitUntilRoomNotificationSettingsLoaded(roomId: string): UsablePromise<void>;
1382
+ refreshRoomNotificationSettings(roomId: string, signal: AbortSignal): Promise<void>;
1338
1383
  }
1339
1384
 
1340
1385
  /**
@@ -1519,4 +1564,4 @@ declare const _useUserThreads_experimental: TypedBundle["useUserThreads_experime
1519
1564
  */
1520
1565
  declare const _useUserThreadsSuspense_experimental: TypedBundle["suspense"]["useUserThreads_experimental"];
1521
1566
 
1522
- export { type AttachmentUrlAsyncResult as A, CreateThreadError as C, type DeleteCommentOptions as D, type EditCommentOptions as E, type HistoryVersionDataAsyncResult as H, LiveblocksProvider as L, type MutationContext as M, type RoomNotificationSettingsAsyncResult as R, type StorageStatusSuccess as S, type ThreadSubscription as T, type UseStorageStatusOptions as U, _useInboxNotificationThread as _, type CommentsError as a, type CreateCommentOptions as b, type CommentReactionOptions as c, type RoomContextBundle as d, type UseThreadsOptions as e, ClientContext as f, getUmbrellaStoreForClient as g, createLiveblocksContext as h, useMarkAllInboxNotificationsAsRead as i, useMarkInboxNotificationAsRead as j, useDeleteAllInboxNotifications as k, useDeleteInboxNotification as l, useInboxNotifications as m, _useUserThreads_experimental as n, useRoomInfo as o, useUnreadInboxNotificationsCount as p, _useUser as q, useInboxNotificationsSuspense as r, selectThreads as s, useRoomInfoSuspense as t, useClient as u, useUnreadInboxNotificationsCountSuspense as v, _useUserSuspense as w, _useUserThreadsSuspense_experimental as x };
1567
+ export { type AttachmentUrlAsyncResult as A, CreateThreadError as C, type DeleteCommentOptions as D, type EditCommentOptions as E, type HistoryVersionDataAsyncResult as H, LiveblocksProvider as L, type MutationContext as M, type RoomContextBundle as R, type StorageStatusSuccess as S, type ThreadSubscription as T, type UseStorageStatusOptions as U, _useInboxNotificationThread as _, type CommentsError as a, type CreateCommentOptions as b, type CommentReactionOptions as c, type UseThreadsOptions as d, ClientContext as e, createLiveblocksContext as f, getUmbrellaStoreForClient as g, useMarkAllInboxNotificationsAsRead as h, useMarkInboxNotificationAsRead as i, useDeleteAllInboxNotifications as j, useDeleteInboxNotification as k, useInboxNotifications as l, _useUserThreads_experimental as m, useRoomInfo as n, useUnreadInboxNotificationsCount as o, _useUser as p, useInboxNotificationsSuspense as q, useRoomInfoSuspense as r, useUnreadInboxNotificationsCountSuspense as s, _useUserSuspense as t, useClient as u, _useUserThreadsSuspense_experimental as v };
@@ -1,4 +1,4 @@
1
- import { U as UseStorageStatusOptions, a as CommentsError, b as CreateCommentOptions, E as EditCommentOptions, D as DeleteCommentOptions, c as CommentReactionOptions, T as ThreadSubscription, R as RoomNotificationSettingsAsyncResult, H as HistoryVersionDataAsyncResult, S as StorageStatusSuccess, A as AttachmentUrlAsyncResult, d as RoomContextBundle } from './liveblocks-X3qYz1Vg.mjs';
1
+ import { U as UseStorageStatusOptions, a as CommentsError, b as CreateCommentOptions, E as EditCommentOptions, D as DeleteCommentOptions, c as CommentReactionOptions, T as ThreadSubscription, H as HistoryVersionDataAsyncResult, S as StorageStatusSuccess, A as AttachmentUrlAsyncResult, R as RoomContextBundle } from './liveblocks-SAVcXwMX.js';
2
2
  import { Status, StorageStatus, LostConnectionEvent, History, BaseMetadata, CommentData, RoomNotificationSettings, JsonObject, LsonObject, BaseUserMeta, Json, User } from '@liveblocks/client';
3
3
  import * as React from 'react';
4
4
  import { ReactNode } from 'react';
@@ -192,17 +192,6 @@ declare function useMarkThreadAsUnresolved(): (threadId: string) => void;
192
192
  * const { status, unreadSince } = useThreadSubscription("th_xxx");
193
193
  */
194
194
  declare function useThreadSubscription(threadId: string): ThreadSubscription;
195
- /**
196
- * Returns the user's notification settings for the current room
197
- * and a function to update them.
198
- *
199
- * @example
200
- * const [{ settings }, updateSettings] = useRoomNotificationSettings();
201
- */
202
- declare function useRoomNotificationSettings(): [
203
- RoomNotificationSettingsAsyncResult,
204
- (settings: Partial<RoomNotificationSettings>) => void
205
- ];
206
195
  /**
207
196
  * Returns the version data bianry for a given version
208
197
  *
@@ -477,6 +466,22 @@ declare const _useThreads: TypedBundle["useThreads"];
477
466
  * const { threads } = useThreads();
478
467
  */
479
468
  declare const _useThreadsSuspense: TypedBundle["suspense"]["useThreads"];
469
+ /**
470
+ * Returns the user's notification settings for the current room
471
+ * and a function to update them.
472
+ *
473
+ * @example
474
+ * const [{ settings }, updateSettings] = useRoomNotificationSettings();
475
+ */
476
+ declare const _useRoomNotificationSettings: TypedBundle["useRoomNotificationSettings"];
477
+ /**
478
+ * Returns the user's notification settings for the current room
479
+ * and a function to update them.
480
+ *
481
+ * @example
482
+ * const [{ settings }, updateSettings] = useRoomNotificationSettings();
483
+ */
484
+ declare const _useRoomNotificationSettingsSuspense: TypedBundle["suspense"]["useRoomNotificationSettings"];
480
485
  /**
481
486
  * (Private beta) Returns a history of versions of the current room.
482
487
  *
@@ -718,4 +723,4 @@ declare const _useStorageRoot: TypedBundle["useStorageRoot"];
718
723
  */
719
724
  declare const _useUpdateMyPresence: TypedBundle["useUpdateMyPresence"];
720
725
 
721
- export { _useStorageSuspense as $, useRoomNotificationSettings as A, useStatus as B, ClientSideSuspense as C, _useStorageRoot as D, useThreadSubscription as E, useUndo as F, _useUpdateMyPresence as G, useUpdateRoomNotificationSettings as H, useHistoryVersionData as I, useCommentsErrorListener as J, _useOther as K, _useOthers as L, useOthersConnectionIds as M, _useOthersMapped as N, _useSelf as O, _useStorage as P, useStorageStatus as Q, RoomContext as R, _useThreads as S, useAttachmentUrl as T, _useHistoryVersions as U, _useOtherSuspense as V, _useOthersSuspense as W, useOthersConnectionIdsSuspense as X, _useOthersMappedSuspense as Y, _useSelfSuspense as Z, _RoomProvider as _, _useAddReaction as a, useStorageStatusSuspense as a0, _useThreadsSuspense as a1, useAttachmentUrlSuspense as a2, _useHistoryVersionsSuspense as a3, _useBroadcastEvent as b, createRoomContext as c, useCanRedo as d, useCanUndo as e, useCreateComment as f, _useCreateThread as g, useDeleteComment as h, _useDeleteThread as i, useEditComment as j, _useEditThreadMetadata as k, useMarkThreadAsResolved as l, useMarkThreadAsUnresolved as m, useErrorListener as n, _useEventListener as o, useHistory as p, _useIsInsideRoom as q, useLostConnectionListener as r, useMarkThreadAsRead as s, _useMutation as t, useBatch as u, _useMyPresence as v, _useOthersListener as w, useRedo as x, useRemoveReaction as y, _useRoom as z };
726
+ export { _useStorageSuspense as $, useStatus as A, _useStorageRoot as B, ClientSideSuspense as C, useThreadSubscription as D, useUndo as E, _useUpdateMyPresence as F, useUpdateRoomNotificationSettings as G, useHistoryVersionData as H, useCommentsErrorListener as I, _useOther as J, _useOthers as K, useOthersConnectionIds as L, _useOthersMapped as M, _useSelf as N, _useStorage as O, useStorageStatus as P, _useThreads as Q, RoomContext as R, useAttachmentUrl as S, _useHistoryVersions as T, _useRoomNotificationSettings as U, _useOtherSuspense as V, _useOthersSuspense as W, useOthersConnectionIdsSuspense as X, _useOthersMappedSuspense as Y, _useSelfSuspense as Z, _RoomProvider as _, _useAddReaction as a, useStorageStatusSuspense as a0, _useThreadsSuspense as a1, useAttachmentUrlSuspense as a2, _useHistoryVersionsSuspense as a3, _useRoomNotificationSettingsSuspense as a4, _useBroadcastEvent as b, createRoomContext as c, useCanRedo as d, useCanUndo as e, useCreateComment as f, _useCreateThread as g, useDeleteComment as h, _useDeleteThread as i, useEditComment as j, _useEditThreadMetadata as k, useMarkThreadAsResolved as l, useMarkThreadAsUnresolved as m, useErrorListener as n, _useEventListener as o, useHistory as p, _useIsInsideRoom as q, useLostConnectionListener as r, useMarkThreadAsRead as s, _useMutation as t, useBatch as u, _useMyPresence as v, _useOthersListener as w, useRedo as x, useRemoveReaction as y, _useRoom as z };
@@ -1,4 +1,4 @@
1
- import { U as UseStorageStatusOptions, a as CommentsError, b as CreateCommentOptions, E as EditCommentOptions, D as DeleteCommentOptions, c as CommentReactionOptions, T as ThreadSubscription, R as RoomNotificationSettingsAsyncResult, H as HistoryVersionDataAsyncResult, S as StorageStatusSuccess, A as AttachmentUrlAsyncResult, d as RoomContextBundle } from './liveblocks-X3qYz1Vg.js';
1
+ import { U as UseStorageStatusOptions, a as CommentsError, b as CreateCommentOptions, E as EditCommentOptions, D as DeleteCommentOptions, c as CommentReactionOptions, T as ThreadSubscription, H as HistoryVersionDataAsyncResult, S as StorageStatusSuccess, A as AttachmentUrlAsyncResult, R as RoomContextBundle } from './liveblocks-SAVcXwMX.mjs';
2
2
  import { Status, StorageStatus, LostConnectionEvent, History, BaseMetadata, CommentData, RoomNotificationSettings, JsonObject, LsonObject, BaseUserMeta, Json, User } from '@liveblocks/client';
3
3
  import * as React from 'react';
4
4
  import { ReactNode } from 'react';
@@ -192,17 +192,6 @@ declare function useMarkThreadAsUnresolved(): (threadId: string) => void;
192
192
  * const { status, unreadSince } = useThreadSubscription("th_xxx");
193
193
  */
194
194
  declare function useThreadSubscription(threadId: string): ThreadSubscription;
195
- /**
196
- * Returns the user's notification settings for the current room
197
- * and a function to update them.
198
- *
199
- * @example
200
- * const [{ settings }, updateSettings] = useRoomNotificationSettings();
201
- */
202
- declare function useRoomNotificationSettings(): [
203
- RoomNotificationSettingsAsyncResult,
204
- (settings: Partial<RoomNotificationSettings>) => void
205
- ];
206
195
  /**
207
196
  * Returns the version data bianry for a given version
208
197
  *
@@ -477,6 +466,22 @@ declare const _useThreads: TypedBundle["useThreads"];
477
466
  * const { threads } = useThreads();
478
467
  */
479
468
  declare const _useThreadsSuspense: TypedBundle["suspense"]["useThreads"];
469
+ /**
470
+ * Returns the user's notification settings for the current room
471
+ * and a function to update them.
472
+ *
473
+ * @example
474
+ * const [{ settings }, updateSettings] = useRoomNotificationSettings();
475
+ */
476
+ declare const _useRoomNotificationSettings: TypedBundle["useRoomNotificationSettings"];
477
+ /**
478
+ * Returns the user's notification settings for the current room
479
+ * and a function to update them.
480
+ *
481
+ * @example
482
+ * const [{ settings }, updateSettings] = useRoomNotificationSettings();
483
+ */
484
+ declare const _useRoomNotificationSettingsSuspense: TypedBundle["suspense"]["useRoomNotificationSettings"];
480
485
  /**
481
486
  * (Private beta) Returns a history of versions of the current room.
482
487
  *
@@ -718,4 +723,4 @@ declare const _useStorageRoot: TypedBundle["useStorageRoot"];
718
723
  */
719
724
  declare const _useUpdateMyPresence: TypedBundle["useUpdateMyPresence"];
720
725
 
721
- export { _useStorageSuspense as $, useRoomNotificationSettings as A, useStatus as B, ClientSideSuspense as C, _useStorageRoot as D, useThreadSubscription as E, useUndo as F, _useUpdateMyPresence as G, useUpdateRoomNotificationSettings as H, useHistoryVersionData as I, useCommentsErrorListener as J, _useOther as K, _useOthers as L, useOthersConnectionIds as M, _useOthersMapped as N, _useSelf as O, _useStorage as P, useStorageStatus as Q, RoomContext as R, _useThreads as S, useAttachmentUrl as T, _useHistoryVersions as U, _useOtherSuspense as V, _useOthersSuspense as W, useOthersConnectionIdsSuspense as X, _useOthersMappedSuspense as Y, _useSelfSuspense as Z, _RoomProvider as _, _useAddReaction as a, useStorageStatusSuspense as a0, _useThreadsSuspense as a1, useAttachmentUrlSuspense as a2, _useHistoryVersionsSuspense as a3, _useBroadcastEvent as b, createRoomContext as c, useCanRedo as d, useCanUndo as e, useCreateComment as f, _useCreateThread as g, useDeleteComment as h, _useDeleteThread as i, useEditComment as j, _useEditThreadMetadata as k, useMarkThreadAsResolved as l, useMarkThreadAsUnresolved as m, useErrorListener as n, _useEventListener as o, useHistory as p, _useIsInsideRoom as q, useLostConnectionListener as r, useMarkThreadAsRead as s, _useMutation as t, useBatch as u, _useMyPresence as v, _useOthersListener as w, useRedo as x, useRemoveReaction as y, _useRoom as z };
726
+ export { _useStorageSuspense as $, useStatus as A, _useStorageRoot as B, ClientSideSuspense as C, useThreadSubscription as D, useUndo as E, _useUpdateMyPresence as F, useUpdateRoomNotificationSettings as G, useHistoryVersionData as H, useCommentsErrorListener as I, _useOther as J, _useOthers as K, useOthersConnectionIds as L, _useOthersMapped as M, _useSelf as N, _useStorage as O, useStorageStatus as P, _useThreads as Q, RoomContext as R, useAttachmentUrl as S, _useHistoryVersions as T, _useRoomNotificationSettings as U, _useOtherSuspense as V, _useOthersSuspense as W, useOthersConnectionIdsSuspense as X, _useOthersMappedSuspense as Y, _useSelfSuspense as Z, _RoomProvider as _, _useAddReaction as a, useStorageStatusSuspense as a0, _useThreadsSuspense as a1, useAttachmentUrlSuspense as a2, _useHistoryVersionsSuspense as a3, _useRoomNotificationSettingsSuspense as a4, _useBroadcastEvent as b, createRoomContext as c, useCanRedo as d, useCanUndo as e, useCreateComment as f, _useCreateThread as g, useDeleteComment as h, _useDeleteThread as i, useEditComment as j, _useEditThreadMetadata as k, useMarkThreadAsResolved as l, useMarkThreadAsUnresolved as m, useErrorListener as n, _useEventListener as o, useHistory as p, _useIsInsideRoom as q, useLostConnectionListener as r, useMarkThreadAsRead as s, _useMutation as t, useBatch as u, _useMyPresence as v, _useOthersListener as w, useRedo as x, useRemoveReaction as y, _useRoom as z };
@@ -1,5 +1,5 @@
1
- export { C as ClientSideSuspense, R as RoomContext, _ as RoomProvider, a as useAddReaction, a2 as useAttachmentUrl, u as useBatch, b as useBroadcastEvent, d as useCanRedo, e as useCanUndo, f as useCreateComment, g as useCreateThread, h as useDeleteComment, i as useDeleteThread, j as useEditComment, k as useEditThreadMetadata, n as useErrorListener, o as useEventListener, p as useHistory, a3 as useHistoryVersions, q as useIsInsideRoom, r as useLostConnectionListener, s as useMarkThreadAsRead, l as useMarkThreadAsResolved, m as useMarkThreadAsUnresolved, t as useMutation, v as useMyPresence, V as useOther, W as useOthers, X as useOthersConnectionIds, w as useOthersListener, Y as useOthersMapped, x as useRedo, y as useRemoveReaction, z as useRoom, A as useRoomNotificationSettings, Z as useSelf, B as useStatus, $ as useStorage, D as useStorageRoot, a0 as useStorageStatus, E as useThreadSubscription, a1 as useThreads, F as useUndo, G as useUpdateMyPresence, H as useUpdateRoomNotificationSettings } from './suspense-pF_E-0CC.mjs';
2
- export { f as ClientContext, L as LiveblocksProvider, M as MutationContext, U as UseStorageStatusOptions, e as UseThreadsOptions, u as useClient, k as useDeleteAllInboxNotifications, l as useDeleteInboxNotification, _ as useInboxNotificationThread, r as useInboxNotifications, i as useMarkAllInboxNotificationsAsRead, j as useMarkInboxNotificationAsRead, t as useRoomInfo, v as useUnreadInboxNotificationsCount, w as useUser, x as useUserThreads_experimental } from './liveblocks-X3qYz1Vg.mjs';
1
+ export { C as ClientSideSuspense, R as RoomContext, _ as RoomProvider, a as useAddReaction, a2 as useAttachmentUrl, u as useBatch, b as useBroadcastEvent, d as useCanRedo, e as useCanUndo, f as useCreateComment, g as useCreateThread, h as useDeleteComment, i as useDeleteThread, j as useEditComment, k as useEditThreadMetadata, n as useErrorListener, o as useEventListener, p as useHistory, a3 as useHistoryVersions, q as useIsInsideRoom, r as useLostConnectionListener, s as useMarkThreadAsRead, l as useMarkThreadAsResolved, m as useMarkThreadAsUnresolved, t as useMutation, v as useMyPresence, V as useOther, W as useOthers, X as useOthersConnectionIds, w as useOthersListener, Y as useOthersMapped, x as useRedo, y as useRemoveReaction, z as useRoom, a4 as useRoomNotificationSettings, Z as useSelf, A as useStatus, $ as useStorage, B as useStorageRoot, a0 as useStorageStatus, D as useThreadSubscription, a1 as useThreads, E as useUndo, F as useUpdateMyPresence, G as useUpdateRoomNotificationSettings } from './suspense-vGJE9Mgq.mjs';
2
+ export { e as ClientContext, L as LiveblocksProvider, M as MutationContext, U as UseStorageStatusOptions, d as UseThreadsOptions, u as useClient, j as useDeleteAllInboxNotifications, k as useDeleteInboxNotification, _ as useInboxNotificationThread, q as useInboxNotifications, h as useMarkAllInboxNotificationsAsRead, i as useMarkInboxNotificationAsRead, r as useRoomInfo, s as useUnreadInboxNotificationsCount, t as useUser, v as useUserThreads_experimental } from './liveblocks-SAVcXwMX.mjs';
3
3
  export { Json, JsonObject, shallow } from '@liveblocks/client';
4
4
  import 'react';
5
5
  import '@liveblocks/core';
@@ -1,5 +1,5 @@
1
- export { C as ClientSideSuspense, R as RoomContext, _ as RoomProvider, a as useAddReaction, a2 as useAttachmentUrl, u as useBatch, b as useBroadcastEvent, d as useCanRedo, e as useCanUndo, f as useCreateComment, g as useCreateThread, h as useDeleteComment, i as useDeleteThread, j as useEditComment, k as useEditThreadMetadata, n as useErrorListener, o as useEventListener, p as useHistory, a3 as useHistoryVersions, q as useIsInsideRoom, r as useLostConnectionListener, s as useMarkThreadAsRead, l as useMarkThreadAsResolved, m as useMarkThreadAsUnresolved, t as useMutation, v as useMyPresence, V as useOther, W as useOthers, X as useOthersConnectionIds, w as useOthersListener, Y as useOthersMapped, x as useRedo, y as useRemoveReaction, z as useRoom, A as useRoomNotificationSettings, Z as useSelf, B as useStatus, $ as useStorage, D as useStorageRoot, a0 as useStorageStatus, E as useThreadSubscription, a1 as useThreads, F as useUndo, G as useUpdateMyPresence, H as useUpdateRoomNotificationSettings } from './suspense-qQ0vzMgn.js';
2
- export { f as ClientContext, L as LiveblocksProvider, M as MutationContext, U as UseStorageStatusOptions, e as UseThreadsOptions, u as useClient, k as useDeleteAllInboxNotifications, l as useDeleteInboxNotification, _ as useInboxNotificationThread, r as useInboxNotifications, i as useMarkAllInboxNotificationsAsRead, j as useMarkInboxNotificationAsRead, t as useRoomInfo, v as useUnreadInboxNotificationsCount, w as useUser, x as useUserThreads_experimental } from './liveblocks-X3qYz1Vg.js';
1
+ export { C as ClientSideSuspense, R as RoomContext, _ as RoomProvider, a as useAddReaction, a2 as useAttachmentUrl, u as useBatch, b as useBroadcastEvent, d as useCanRedo, e as useCanUndo, f as useCreateComment, g as useCreateThread, h as useDeleteComment, i as useDeleteThread, j as useEditComment, k as useEditThreadMetadata, n as useErrorListener, o as useEventListener, p as useHistory, a3 as useHistoryVersions, q as useIsInsideRoom, r as useLostConnectionListener, s as useMarkThreadAsRead, l as useMarkThreadAsResolved, m as useMarkThreadAsUnresolved, t as useMutation, v as useMyPresence, V as useOther, W as useOthers, X as useOthersConnectionIds, w as useOthersListener, Y as useOthersMapped, x as useRedo, y as useRemoveReaction, z as useRoom, a4 as useRoomNotificationSettings, Z as useSelf, A as useStatus, $ as useStorage, B as useStorageRoot, a0 as useStorageStatus, D as useThreadSubscription, a1 as useThreads, E as useUndo, F as useUpdateMyPresence, G as useUpdateRoomNotificationSettings } from './suspense-W7Cp9ygn.js';
2
+ export { e as ClientContext, L as LiveblocksProvider, M as MutationContext, U as UseStorageStatusOptions, d as UseThreadsOptions, u as useClient, j as useDeleteAllInboxNotifications, k as useDeleteInboxNotification, _ as useInboxNotificationThread, q as useInboxNotifications, h as useMarkAllInboxNotificationsAsRead, i as useMarkInboxNotificationAsRead, r as useRoomInfo, s as useUnreadInboxNotificationsCount, t as useUser, v as useUserThreads_experimental } from './liveblocks-SAVcXwMX.js';
3
3
  export { Json, JsonObject, shallow } from '@liveblocks/client';
4
4
  import 'react';
5
5
  import '@liveblocks/core';
package/dist/suspense.js CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkPJN3AKDHjs = require('./chunk-PJN3AKDH.js');
6
+ var _chunk6Z2BEGKAjs = require('./chunk-6Z2BEGKA.js');
7
7
 
8
8
 
9
9
 
@@ -62,12 +62,12 @@ var _chunkPJN3AKDHjs = require('./chunk-PJN3AKDH.js');
62
62
 
63
63
 
64
64
 
65
- var _chunkWJLAYICRjs = require('./chunk-WJLAYICR.js');
65
+ var _chunk3MM4G6XBjs = require('./chunk-3MM4G6XB.js');
66
66
 
67
67
  // src/suspense.ts
68
68
  var _core = require('@liveblocks/core');
69
69
  var _client = require('@liveblocks/client');
70
- _core.detectDupes.call(void 0, _chunkPJN3AKDHjs.PKG_NAME, _chunkPJN3AKDHjs.PKG_VERSION, _chunkPJN3AKDHjs.PKG_FORMAT);
70
+ _core.detectDupes.call(void 0, _chunk6Z2BEGKAjs.PKG_NAME, _chunk6Z2BEGKAjs.PKG_VERSION, _chunk6Z2BEGKAjs.PKG_FORMAT);
71
71
 
72
72
 
73
73
 
@@ -128,5 +128,5 @@ _core.detectDupes.call(void 0, _chunkPJN3AKDHjs.PKG_NAME, _chunkPJN3AKDHjs.PKG_V
128
128
 
129
129
 
130
130
 
131
- exports.ClientContext = _chunkWJLAYICRjs.ClientContext; exports.ClientSideSuspense = _chunkPJN3AKDHjs.ClientSideSuspense; exports.LiveblocksProvider = _chunkWJLAYICRjs.LiveblocksProvider; exports.RoomContext = _chunkWJLAYICRjs.RoomContext; exports.RoomProvider = _chunkWJLAYICRjs._RoomProvider; exports.shallow = _client.shallow; exports.useAddReaction = _chunkWJLAYICRjs._useAddReaction; exports.useAttachmentUrl = _chunkWJLAYICRjs.useAttachmentUrlSuspense; exports.useBatch = _chunkWJLAYICRjs.useBatch; exports.useBroadcastEvent = _chunkWJLAYICRjs._useBroadcastEvent; exports.useCanRedo = _chunkWJLAYICRjs.useCanRedo; exports.useCanUndo = _chunkWJLAYICRjs.useCanUndo; exports.useClient = _chunkWJLAYICRjs.useClient; exports.useCreateComment = _chunkWJLAYICRjs.useCreateComment; exports.useCreateThread = _chunkWJLAYICRjs._useCreateThread; exports.useDeleteAllInboxNotifications = _chunkWJLAYICRjs.useDeleteAllInboxNotifications; exports.useDeleteComment = _chunkWJLAYICRjs.useDeleteComment; exports.useDeleteInboxNotification = _chunkWJLAYICRjs.useDeleteInboxNotification; exports.useDeleteThread = _chunkWJLAYICRjs._useDeleteThread; exports.useEditComment = _chunkWJLAYICRjs.useEditComment; exports.useEditThreadMetadata = _chunkWJLAYICRjs._useEditThreadMetadata; exports.useErrorListener = _chunkWJLAYICRjs.useErrorListener; exports.useEventListener = _chunkWJLAYICRjs._useEventListener; exports.useHistory = _chunkWJLAYICRjs.useHistory; exports.useHistoryVersions = _chunkWJLAYICRjs._useHistoryVersionsSuspense; exports.useInboxNotificationThread = _chunkWJLAYICRjs._useInboxNotificationThread; exports.useInboxNotifications = _chunkWJLAYICRjs.useInboxNotificationsSuspense; exports.useIsInsideRoom = _chunkWJLAYICRjs._useIsInsideRoom; exports.useLostConnectionListener = _chunkWJLAYICRjs.useLostConnectionListener; exports.useMarkAllInboxNotificationsAsRead = _chunkWJLAYICRjs.useMarkAllInboxNotificationsAsRead; exports.useMarkInboxNotificationAsRead = _chunkWJLAYICRjs.useMarkInboxNotificationAsRead; exports.useMarkThreadAsRead = _chunkWJLAYICRjs.useMarkThreadAsRead; exports.useMarkThreadAsResolved = _chunkWJLAYICRjs.useMarkThreadAsResolved; exports.useMarkThreadAsUnresolved = _chunkWJLAYICRjs.useMarkThreadAsUnresolved; exports.useMutation = _chunkWJLAYICRjs._useMutation; exports.useMyPresence = _chunkWJLAYICRjs._useMyPresence; exports.useOther = _chunkWJLAYICRjs._useOtherSuspense; exports.useOthers = _chunkWJLAYICRjs._useOthersSuspense; exports.useOthersConnectionIds = _chunkWJLAYICRjs.useOthersConnectionIdsSuspense; exports.useOthersListener = _chunkWJLAYICRjs._useOthersListener; exports.useOthersMapped = _chunkWJLAYICRjs._useOthersMappedSuspense; exports.useRedo = _chunkWJLAYICRjs.useRedo; exports.useRemoveReaction = _chunkWJLAYICRjs.useRemoveReaction; exports.useRoom = _chunkWJLAYICRjs._useRoom; exports.useRoomInfo = _chunkWJLAYICRjs.useRoomInfoSuspense; exports.useRoomNotificationSettings = _chunkWJLAYICRjs.useRoomNotificationSettings; exports.useSelf = _chunkWJLAYICRjs._useSelfSuspense; exports.useStatus = _chunkWJLAYICRjs.useStatus; exports.useStorage = _chunkWJLAYICRjs._useStorageSuspense; exports.useStorageRoot = _chunkWJLAYICRjs._useStorageRoot; exports.useStorageStatus = _chunkWJLAYICRjs.useStorageStatusSuspense; exports.useThreadSubscription = _chunkWJLAYICRjs.useThreadSubscription; exports.useThreads = _chunkWJLAYICRjs._useThreadsSuspense; exports.useUndo = _chunkWJLAYICRjs.useUndo; exports.useUnreadInboxNotificationsCount = _chunkWJLAYICRjs.useUnreadInboxNotificationsCountSuspense; exports.useUpdateMyPresence = _chunkWJLAYICRjs._useUpdateMyPresence; exports.useUpdateRoomNotificationSettings = _chunkWJLAYICRjs.useUpdateRoomNotificationSettings; exports.useUser = _chunkWJLAYICRjs._useUserSuspense; exports.useUserThreads_experimental = _chunkWJLAYICRjs._useUserThreadsSuspense_experimental;
131
+ exports.ClientContext = _chunk3MM4G6XBjs.ClientContext; exports.ClientSideSuspense = _chunk6Z2BEGKAjs.ClientSideSuspense; exports.LiveblocksProvider = _chunk3MM4G6XBjs.LiveblocksProvider; exports.RoomContext = _chunk3MM4G6XBjs.RoomContext; exports.RoomProvider = _chunk3MM4G6XBjs._RoomProvider; exports.shallow = _client.shallow; exports.useAddReaction = _chunk3MM4G6XBjs._useAddReaction; exports.useAttachmentUrl = _chunk3MM4G6XBjs.useAttachmentUrlSuspense; exports.useBatch = _chunk3MM4G6XBjs.useBatch; exports.useBroadcastEvent = _chunk3MM4G6XBjs._useBroadcastEvent; exports.useCanRedo = _chunk3MM4G6XBjs.useCanRedo; exports.useCanUndo = _chunk3MM4G6XBjs.useCanUndo; exports.useClient = _chunk3MM4G6XBjs.useClient; exports.useCreateComment = _chunk3MM4G6XBjs.useCreateComment; exports.useCreateThread = _chunk3MM4G6XBjs._useCreateThread; exports.useDeleteAllInboxNotifications = _chunk3MM4G6XBjs.useDeleteAllInboxNotifications; exports.useDeleteComment = _chunk3MM4G6XBjs.useDeleteComment; exports.useDeleteInboxNotification = _chunk3MM4G6XBjs.useDeleteInboxNotification; exports.useDeleteThread = _chunk3MM4G6XBjs._useDeleteThread; exports.useEditComment = _chunk3MM4G6XBjs.useEditComment; exports.useEditThreadMetadata = _chunk3MM4G6XBjs._useEditThreadMetadata; exports.useErrorListener = _chunk3MM4G6XBjs.useErrorListener; exports.useEventListener = _chunk3MM4G6XBjs._useEventListener; exports.useHistory = _chunk3MM4G6XBjs.useHistory; exports.useHistoryVersions = _chunk3MM4G6XBjs._useHistoryVersionsSuspense; exports.useInboxNotificationThread = _chunk3MM4G6XBjs._useInboxNotificationThread; exports.useInboxNotifications = _chunk3MM4G6XBjs.useInboxNotificationsSuspense; exports.useIsInsideRoom = _chunk3MM4G6XBjs._useIsInsideRoom; exports.useLostConnectionListener = _chunk3MM4G6XBjs.useLostConnectionListener; exports.useMarkAllInboxNotificationsAsRead = _chunk3MM4G6XBjs.useMarkAllInboxNotificationsAsRead; exports.useMarkInboxNotificationAsRead = _chunk3MM4G6XBjs.useMarkInboxNotificationAsRead; exports.useMarkThreadAsRead = _chunk3MM4G6XBjs.useMarkThreadAsRead; exports.useMarkThreadAsResolved = _chunk3MM4G6XBjs.useMarkThreadAsResolved; exports.useMarkThreadAsUnresolved = _chunk3MM4G6XBjs.useMarkThreadAsUnresolved; exports.useMutation = _chunk3MM4G6XBjs._useMutation; exports.useMyPresence = _chunk3MM4G6XBjs._useMyPresence; exports.useOther = _chunk3MM4G6XBjs._useOtherSuspense; exports.useOthers = _chunk3MM4G6XBjs._useOthersSuspense; exports.useOthersConnectionIds = _chunk3MM4G6XBjs.useOthersConnectionIdsSuspense; exports.useOthersListener = _chunk3MM4G6XBjs._useOthersListener; exports.useOthersMapped = _chunk3MM4G6XBjs._useOthersMappedSuspense; exports.useRedo = _chunk3MM4G6XBjs.useRedo; exports.useRemoveReaction = _chunk3MM4G6XBjs.useRemoveReaction; exports.useRoom = _chunk3MM4G6XBjs._useRoom; exports.useRoomInfo = _chunk3MM4G6XBjs.useRoomInfoSuspense; exports.useRoomNotificationSettings = _chunk3MM4G6XBjs._useRoomNotificationSettingsSuspense; exports.useSelf = _chunk3MM4G6XBjs._useSelfSuspense; exports.useStatus = _chunk3MM4G6XBjs.useStatus; exports.useStorage = _chunk3MM4G6XBjs._useStorageSuspense; exports.useStorageRoot = _chunk3MM4G6XBjs._useStorageRoot; exports.useStorageStatus = _chunk3MM4G6XBjs.useStorageStatusSuspense; exports.useThreadSubscription = _chunk3MM4G6XBjs.useThreadSubscription; exports.useThreads = _chunk3MM4G6XBjs._useThreadsSuspense; exports.useUndo = _chunk3MM4G6XBjs.useUndo; exports.useUnreadInboxNotificationsCount = _chunk3MM4G6XBjs.useUnreadInboxNotificationsCountSuspense; exports.useUpdateMyPresence = _chunk3MM4G6XBjs._useUpdateMyPresence; exports.useUpdateRoomNotificationSettings = _chunk3MM4G6XBjs.useUpdateRoomNotificationSettings; exports.useUser = _chunk3MM4G6XBjs._useUserSuspense; exports.useUserThreads_experimental = _chunk3MM4G6XBjs._useUserThreadsSuspense_experimental;
132
132
  //# sourceMappingURL=suspense.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/suspense.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,mBAAmB;AAc5B,SAAS,eAAe;AAXxB,YAAY,UAAU,aAAa,UAAU","sourcesContent":["/* eslint-disable simple-import-sort/exports */\nimport { detectDupes } from \"@liveblocks/core\";\n\nimport { PKG_FORMAT, PKG_NAME, PKG_VERSION } from \"./version\";\ndetectDupes(PKG_NAME, PKG_VERSION, PKG_FORMAT);\n\nexport { ClientSideSuspense } from \"./ClientSideSuspense\";\nexport type {\n MutationContext,\n UseStorageStatusOptions,\n UseThreadsOptions,\n} from \"./types\";\n\n// Re-exports from @liveblocks/client, for convenience\nexport type { Json, JsonObject } from \"@liveblocks/client\";\nexport { shallow } from \"@liveblocks/client\";\n\n// Export all the top-level hooks\nexport {\n ClientContext,\n LiveblocksProvider,\n useClient,\n useInboxNotificationThread,\n useMarkAllInboxNotificationsAsRead,\n useMarkInboxNotificationAsRead,\n useDeleteAllInboxNotifications,\n useDeleteInboxNotification,\n} from \"./liveblocks\";\nexport {\n RoomContext,\n RoomProvider,\n useAddReaction,\n useBatch,\n useBroadcastEvent,\n useCanRedo,\n useCanUndo,\n useCreateComment,\n useCreateThread,\n useDeleteComment,\n useDeleteThread,\n useEditComment,\n useEditThreadMetadata,\n useMarkThreadAsResolved,\n useMarkThreadAsUnresolved,\n useErrorListener,\n useEventListener,\n useHistory,\n useIsInsideRoom,\n useLostConnectionListener,\n useMarkThreadAsRead,\n useMutation,\n useMyPresence,\n useOthersListener,\n useRedo,\n useRemoveReaction,\n useRoom,\n useRoomNotificationSettings,\n useStatus,\n useStorageRoot,\n useThreadSubscription,\n useUndo,\n useUpdateMyPresence,\n useUpdateRoomNotificationSettings,\n} from \"./room\";\n\n// Export the Suspense versions of our hooks\n// (This part differs from src/index.ts)\nexport {\n useOtherSuspense as useOther,\n useOthersSuspense as useOthers,\n useOthersConnectionIdsSuspense as useOthersConnectionIds,\n useOthersMappedSuspense as useOthersMapped,\n useSelfSuspense as useSelf,\n useStorageSuspense as useStorage,\n useStorageStatusSuspense as useStorageStatus,\n useThreadsSuspense as useThreads,\n useAttachmentUrlSuspense as useAttachmentUrl,\n useHistoryVersionsSuspense as useHistoryVersions,\n} from \"./room\";\nexport {\n useInboxNotificationsSuspense as useInboxNotifications,\n useRoomInfoSuspense as useRoomInfo,\n useUnreadInboxNotificationsCountSuspense as useUnreadInboxNotificationsCount,\n useUserSuspense as useUser,\n useUserThreadsSuspense_experimental as useUserThreads_experimental,\n} from \"./liveblocks\";\n"]}
1
+ {"version":3,"sources":["../src/suspense.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,mBAAmB;AAc5B,SAAS,eAAe;AAXxB,YAAY,UAAU,aAAa,UAAU","sourcesContent":["/* eslint-disable simple-import-sort/exports */\nimport { detectDupes } from \"@liveblocks/core\";\n\nimport { PKG_FORMAT, PKG_NAME, PKG_VERSION } from \"./version\";\ndetectDupes(PKG_NAME, PKG_VERSION, PKG_FORMAT);\n\nexport { ClientSideSuspense } from \"./ClientSideSuspense\";\nexport type {\n MutationContext,\n UseStorageStatusOptions,\n UseThreadsOptions,\n} from \"./types\";\n\n// Re-exports from @liveblocks/client, for convenience\nexport type { Json, JsonObject } from \"@liveblocks/client\";\nexport { shallow } from \"@liveblocks/client\";\n\n// Export all the top-level hooks\nexport {\n ClientContext,\n LiveblocksProvider,\n useClient,\n useInboxNotificationThread,\n useMarkAllInboxNotificationsAsRead,\n useMarkInboxNotificationAsRead,\n useDeleteAllInboxNotifications,\n useDeleteInboxNotification,\n} from \"./liveblocks\";\nexport {\n RoomContext,\n RoomProvider,\n useAddReaction,\n useBatch,\n useBroadcastEvent,\n useCanRedo,\n useCanUndo,\n useCreateComment,\n useCreateThread,\n useDeleteComment,\n useDeleteThread,\n useEditComment,\n useEditThreadMetadata,\n useMarkThreadAsResolved,\n useMarkThreadAsUnresolved,\n useErrorListener,\n useEventListener,\n useHistory,\n useIsInsideRoom,\n useLostConnectionListener,\n useMarkThreadAsRead,\n useMutation,\n useMyPresence,\n useOthersListener,\n useRedo,\n useRemoveReaction,\n useRoom,\n useStatus,\n useStorageRoot,\n useThreadSubscription,\n useUndo,\n useUpdateMyPresence,\n useUpdateRoomNotificationSettings,\n} from \"./room\";\n\n// Export the Suspense versions of our hooks\n// (This part differs from src/index.ts)\nexport {\n useOtherSuspense as useOther,\n useOthersSuspense as useOthers,\n useOthersConnectionIdsSuspense as useOthersConnectionIds,\n useOthersMappedSuspense as useOthersMapped,\n useSelfSuspense as useSelf,\n useStorageSuspense as useStorage,\n useStorageStatusSuspense as useStorageStatus,\n useThreadsSuspense as useThreads,\n useAttachmentUrlSuspense as useAttachmentUrl,\n useHistoryVersionsSuspense as useHistoryVersions,\n useRoomNotificationSettingsSuspense as useRoomNotificationSettings,\n} from \"./room\";\nexport {\n useInboxNotificationsSuspense as useInboxNotifications,\n useRoomInfoSuspense as useRoomInfo,\n useUnreadInboxNotificationsCountSuspense as useUnreadInboxNotificationsCount,\n useUserSuspense as useUser,\n useUserThreadsSuspense_experimental as useUserThreads_experimental,\n} from \"./liveblocks\";\n"]}
package/dist/suspense.mjs CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  PKG_FORMAT,
4
4
  PKG_NAME,
5
5
  PKG_VERSION
6
- } from "./chunk-PXKGBTHT.mjs";
6
+ } from "./chunk-ZGTP66ZG.mjs";
7
7
  import {
8
8
  ClientContext,
9
9
  LiveblocksProvider,
@@ -25,6 +25,7 @@ import {
25
25
  _useOthersMappedSuspense,
26
26
  _useOthersSuspense,
27
27
  _useRoom,
28
+ _useRoomNotificationSettingsSuspense,
28
29
  _useSelfSuspense,
29
30
  _useStorageRoot,
30
31
  _useStorageSuspense,
@@ -55,14 +56,13 @@ import {
55
56
  useRedo,
56
57
  useRemoveReaction,
57
58
  useRoomInfoSuspense,
58
- useRoomNotificationSettings,
59
59
  useStatus,
60
60
  useStorageStatusSuspense,
61
61
  useThreadSubscription,
62
62
  useUndo,
63
63
  useUnreadInboxNotificationsCountSuspense,
64
64
  useUpdateRoomNotificationSettings
65
- } from "./chunk-LMENFXCS.mjs";
65
+ } from "./chunk-A7GJNN4L.mjs";
66
66
 
67
67
  // src/suspense.ts
68
68
  import { detectDupes } from "@liveblocks/core";
@@ -114,7 +114,7 @@ export {
114
114
  useRemoveReaction,
115
115
  _useRoom as useRoom,
116
116
  useRoomInfoSuspense as useRoomInfo,
117
- useRoomNotificationSettings,
117
+ _useRoomNotificationSettingsSuspense as useRoomNotificationSettings,
118
118
  _useSelfSuspense as useSelf,
119
119
  useStatus,
120
120
  _useStorageSuspense as useStorage,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/suspense.ts"],"sourcesContent":["/* eslint-disable simple-import-sort/exports */\nimport { detectDupes } from \"@liveblocks/core\";\n\nimport { PKG_FORMAT, PKG_NAME, PKG_VERSION } from \"./version\";\ndetectDupes(PKG_NAME, PKG_VERSION, PKG_FORMAT);\n\nexport { ClientSideSuspense } from \"./ClientSideSuspense\";\nexport type {\n MutationContext,\n UseStorageStatusOptions,\n UseThreadsOptions,\n} from \"./types\";\n\n// Re-exports from @liveblocks/client, for convenience\nexport type { Json, JsonObject } from \"@liveblocks/client\";\nexport { shallow } from \"@liveblocks/client\";\n\n// Export all the top-level hooks\nexport {\n ClientContext,\n LiveblocksProvider,\n useClient,\n useInboxNotificationThread,\n useMarkAllInboxNotificationsAsRead,\n useMarkInboxNotificationAsRead,\n useDeleteAllInboxNotifications,\n useDeleteInboxNotification,\n} from \"./liveblocks\";\nexport {\n RoomContext,\n RoomProvider,\n useAddReaction,\n useBatch,\n useBroadcastEvent,\n useCanRedo,\n useCanUndo,\n useCreateComment,\n useCreateThread,\n useDeleteComment,\n useDeleteThread,\n useEditComment,\n useEditThreadMetadata,\n useMarkThreadAsResolved,\n useMarkThreadAsUnresolved,\n useErrorListener,\n useEventListener,\n useHistory,\n useIsInsideRoom,\n useLostConnectionListener,\n useMarkThreadAsRead,\n useMutation,\n useMyPresence,\n useOthersListener,\n useRedo,\n useRemoveReaction,\n useRoom,\n useRoomNotificationSettings,\n useStatus,\n useStorageRoot,\n useThreadSubscription,\n useUndo,\n useUpdateMyPresence,\n useUpdateRoomNotificationSettings,\n} from \"./room\";\n\n// Export the Suspense versions of our hooks\n// (This part differs from src/index.ts)\nexport {\n useOtherSuspense as useOther,\n useOthersSuspense as useOthers,\n useOthersConnectionIdsSuspense as useOthersConnectionIds,\n useOthersMappedSuspense as useOthersMapped,\n useSelfSuspense as useSelf,\n useStorageSuspense as useStorage,\n useStorageStatusSuspense as useStorageStatus,\n useThreadsSuspense as useThreads,\n useAttachmentUrlSuspense as useAttachmentUrl,\n useHistoryVersionsSuspense as useHistoryVersions,\n} from \"./room\";\nexport {\n useInboxNotificationsSuspense as useInboxNotifications,\n useRoomInfoSuspense as useRoomInfo,\n useUnreadInboxNotificationsCountSuspense as useUnreadInboxNotificationsCount,\n useUserSuspense as useUser,\n useUserThreadsSuspense_experimental as useUserThreads_experimental,\n} from \"./liveblocks\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,mBAAmB;AAc5B,SAAS,eAAe;AAXxB,YAAY,UAAU,aAAa,UAAU;","names":[]}
1
+ {"version":3,"sources":["../src/suspense.ts"],"sourcesContent":["/* eslint-disable simple-import-sort/exports */\nimport { detectDupes } from \"@liveblocks/core\";\n\nimport { PKG_FORMAT, PKG_NAME, PKG_VERSION } from \"./version\";\ndetectDupes(PKG_NAME, PKG_VERSION, PKG_FORMAT);\n\nexport { ClientSideSuspense } from \"./ClientSideSuspense\";\nexport type {\n MutationContext,\n UseStorageStatusOptions,\n UseThreadsOptions,\n} from \"./types\";\n\n// Re-exports from @liveblocks/client, for convenience\nexport type { Json, JsonObject } from \"@liveblocks/client\";\nexport { shallow } from \"@liveblocks/client\";\n\n// Export all the top-level hooks\nexport {\n ClientContext,\n LiveblocksProvider,\n useClient,\n useInboxNotificationThread,\n useMarkAllInboxNotificationsAsRead,\n useMarkInboxNotificationAsRead,\n useDeleteAllInboxNotifications,\n useDeleteInboxNotification,\n} from \"./liveblocks\";\nexport {\n RoomContext,\n RoomProvider,\n useAddReaction,\n useBatch,\n useBroadcastEvent,\n useCanRedo,\n useCanUndo,\n useCreateComment,\n useCreateThread,\n useDeleteComment,\n useDeleteThread,\n useEditComment,\n useEditThreadMetadata,\n useMarkThreadAsResolved,\n useMarkThreadAsUnresolved,\n useErrorListener,\n useEventListener,\n useHistory,\n useIsInsideRoom,\n useLostConnectionListener,\n useMarkThreadAsRead,\n useMutation,\n useMyPresence,\n useOthersListener,\n useRedo,\n useRemoveReaction,\n useRoom,\n useStatus,\n useStorageRoot,\n useThreadSubscription,\n useUndo,\n useUpdateMyPresence,\n useUpdateRoomNotificationSettings,\n} from \"./room\";\n\n// Export the Suspense versions of our hooks\n// (This part differs from src/index.ts)\nexport {\n useOtherSuspense as useOther,\n useOthersSuspense as useOthers,\n useOthersConnectionIdsSuspense as useOthersConnectionIds,\n useOthersMappedSuspense as useOthersMapped,\n useSelfSuspense as useSelf,\n useStorageSuspense as useStorage,\n useStorageStatusSuspense as useStorageStatus,\n useThreadsSuspense as useThreads,\n useAttachmentUrlSuspense as useAttachmentUrl,\n useHistoryVersionsSuspense as useHistoryVersions,\n useRoomNotificationSettingsSuspense as useRoomNotificationSettings,\n} from \"./room\";\nexport {\n useInboxNotificationsSuspense as useInboxNotifications,\n useRoomInfoSuspense as useRoomInfo,\n useUnreadInboxNotificationsCountSuspense as useUnreadInboxNotificationsCount,\n useUserSuspense as useUser,\n useUserThreadsSuspense_experimental as useUserThreads_experimental,\n} from \"./liveblocks\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,mBAAmB;AAc5B,SAAS,eAAe;AAXxB,YAAY,UAAU,aAAa,UAAU;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liveblocks/react",
3
- "version": "2.10.0",
3
+ "version": "2.10.1-react19rc",
4
4
  "description": "A set of React hooks and providers to use Liveblocks declaratively. Liveblocks is the all-in-one toolkit to build collaborative products like Figma, Notion, and more.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "commonjs",
@@ -61,12 +61,12 @@
61
61
  "showdeps": "depcruise src --include-only '^src' --exclude='__tests__' --output-type dot | dot -T svg > /tmp/dependency-graph.svg && open /tmp/dependency-graph.svg"
62
62
  },
63
63
  "dependencies": {
64
- "@liveblocks/client": "2.10.0",
65
- "@liveblocks/core": "2.10.0",
64
+ "@liveblocks/client": "2.10.1-react19rc",
65
+ "@liveblocks/core": "2.10.1-react19rc",
66
66
  "use-sync-external-store": "^1.2.2"
67
67
  },
68
68
  "peerDependencies": {
69
- "react": "^16.14.0 || ^17 || ^18"
69
+ "react": "^16.14.0 || ^17 || ^18 || ^19 || ^19.0.0-rc"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@liveblocks/eslint-config": "*",