@liveblocks/react 2.23.1 → 2.24.0-sub1
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/_private.cjs +7 -5
- package/dist/_private.cjs.map +1 -1
- package/dist/_private.d.cts +1 -1
- package/dist/_private.d.ts +1 -1
- package/dist/_private.js +3 -1
- package/dist/_private.js.map +1 -1
- package/dist/{chunk-B4AEWIAN.js → chunk-FBBBSMFI.js} +2 -2
- package/dist/{chunk-FV6YKJ4L.cjs → chunk-JYG2E4EZ.cjs} +2 -2
- package/dist/{chunk-FV6YKJ4L.cjs.map → chunk-JYG2E4EZ.cjs.map} +1 -1
- package/dist/{chunk-C337YEKB.cjs → chunk-VEO3XXA7.cjs} +467 -120
- package/dist/chunk-VEO3XXA7.cjs.map +1 -0
- package/dist/{chunk-URVBSXYW.js → chunk-ZWYRZR44.js} +469 -122
- package/dist/chunk-ZWYRZR44.js.map +1 -0
- package/dist/index.cjs +12 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +11 -3
- package/dist/index.js.map +1 -1
- package/dist/{room-CqmA66N2.d.cts → room-BHrloYUB.d.cts} +210 -70
- package/dist/{room-CqmA66N2.d.ts → room-BHrloYUB.d.ts} +210 -70
- package/dist/suspense.cjs +12 -4
- package/dist/suspense.cjs.map +1 -1
- package/dist/suspense.d.cts +1 -1
- package/dist/suspense.d.ts +1 -1
- package/dist/suspense.js +11 -3
- package/dist/suspense.js.map +1 -1
- package/package.json +3 -3
- package/dist/chunk-C337YEKB.cjs.map +0 -1
- package/dist/chunk-URVBSXYW.js.map +0 -1
- /package/dist/{chunk-B4AEWIAN.js.map → chunk-FBBBSMFI.js.map} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as _liveblocks_core from '@liveblocks/core';
|
|
2
|
-
import { BaseMetadata, StorageStatus, QueryMetadata, AsyncResult, DRI, AsyncSuccess, Resolve, CommentBody, CommentAttachment, PartialUnless, Patchable, InboxNotificationData,
|
|
2
|
+
import { BaseMetadata, StorageStatus, QueryMetadata, AsyncResult, DRI, AsyncSuccess, Resolve, CommentBody, CommentAttachment, PartialUnless, Patchable, InboxNotificationData, NotificationSettings, Relax, ToImmutable, PartialNotificationSettings, AsyncLoading, AsyncError, ThreadData, HistoryVersion, Client, LiveblocksError, SyncStatus, RoomEventMessage, CommentData, MutableSignal, ThreadDataWithDeleteInfo, ThreadDeleteInfo, DerivedSignal, DefaultMap, OpaqueClient, SubscriptionData, SubscriptionKey, CommentUserReaction, InboxNotificationDeleteInfo, SubscriptionDeleteInfo, RoomSubscriptionSettings as RoomSubscriptionSettings$1, ISignal, Permission, BaseUserMeta as BaseUserMeta$1, DistributiveOmit, DU, DM, TextEditorType, IYjsProvider, DP, DS, DE } from '@liveblocks/core';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import { Context, PropsWithChildren, ReactNode } from 'react';
|
|
6
|
-
import { JsonObject, LsonObject, BaseUserMeta, LiveObject, User, Json,
|
|
6
|
+
import { JsonObject, LsonObject, BaseUserMeta, LiveObject, User, Json, RoomSubscriptionSettings, Room, Status, BroadcastOptions, OthersEvent, LostConnectionEvent, History, BaseMetadata as BaseMetadata$1, Client as Client$1, ClientOptions, StorageStatus as StorageStatus$1, ThreadData as ThreadData$1, CommentData as CommentData$1 } from '@liveblocks/client';
|
|
7
7
|
|
|
8
8
|
type UseSyncStatusOptions = {
|
|
9
9
|
/**
|
|
@@ -100,9 +100,9 @@ type InboxNotificationsAsyncSuccess = PagedAsyncSuccess<InboxNotificationData[],
|
|
|
100
100
|
type InboxNotificationsAsyncResult = PagedAsyncResult<InboxNotificationData[], "inboxNotifications">;
|
|
101
101
|
type UnreadInboxNotificationsCountAsyncSuccess = AsyncSuccess<number, "count">;
|
|
102
102
|
type UnreadInboxNotificationsCountAsyncResult = AsyncResult<number, "count">;
|
|
103
|
-
type
|
|
104
|
-
type
|
|
105
|
-
type
|
|
103
|
+
type NotificationSettingsAsyncResult = AsyncResult<NotificationSettings, "settings">;
|
|
104
|
+
type RoomSubscriptionSettingsAsyncSuccess = AsyncSuccess<RoomSubscriptionSettings, "settings">;
|
|
105
|
+
type RoomSubscriptionSettingsAsyncResult = AsyncResult<RoomSubscriptionSettings, "settings">;
|
|
106
106
|
type HistoryVersionDataAsyncResult = AsyncResult<Uint8Array>;
|
|
107
107
|
type HistoryVersionsAsyncSuccess = AsyncSuccess<HistoryVersion[], "versions">;
|
|
108
108
|
type HistoryVersionsAsyncResult = AsyncResult<HistoryVersion[], "versions">;
|
|
@@ -148,12 +148,18 @@ type MutationContext<P extends JsonObject, S extends LsonObject, U extends BaseU
|
|
|
148
148
|
};
|
|
149
149
|
type ThreadSubscription = Relax<{
|
|
150
150
|
status: "not-subscribed";
|
|
151
|
+
subscribe: () => void;
|
|
152
|
+
unsubscribe: () => void;
|
|
151
153
|
} | {
|
|
152
154
|
status: "subscribed";
|
|
153
155
|
unreadSince: null;
|
|
156
|
+
subscribe: () => void;
|
|
157
|
+
unsubscribe: () => void;
|
|
154
158
|
} | {
|
|
155
159
|
status: "subscribed";
|
|
156
160
|
unreadSince: Date;
|
|
161
|
+
subscribe: () => void;
|
|
162
|
+
unsubscribe: () => void;
|
|
157
163
|
}>;
|
|
158
164
|
type SharedContextBundle<U extends BaseUserMeta> = {
|
|
159
165
|
classic: {
|
|
@@ -596,6 +602,22 @@ type RoomContextBundleCommon<P extends JsonObject, S extends LsonObject, U exten
|
|
|
596
602
|
* markThreadAsUnresolved("th_xxx");
|
|
597
603
|
*/
|
|
598
604
|
useMarkThreadAsUnresolved(): (threadId: string) => void;
|
|
605
|
+
/**
|
|
606
|
+
* Returns a function that subscribes the user to a thread.
|
|
607
|
+
*
|
|
608
|
+
* @example
|
|
609
|
+
* const subscribeToThread = useSubscribeToThread();
|
|
610
|
+
* subscribeToThread("th_xxx");
|
|
611
|
+
*/
|
|
612
|
+
useSubscribeToThread(): (threadId: string) => void;
|
|
613
|
+
/**
|
|
614
|
+
* Returns a function that unsubscribes the user from a thread.
|
|
615
|
+
*
|
|
616
|
+
* @example
|
|
617
|
+
* const unsubscribeFromThread = useUnsubscribeFromThread();
|
|
618
|
+
* unsubscribeFromThread("th_xxx");
|
|
619
|
+
*/
|
|
620
|
+
useUnsubscribeFromThread(): (threadId: string) => void;
|
|
599
621
|
/**
|
|
600
622
|
* Returns a function that adds a comment to a thread.
|
|
601
623
|
*
|
|
@@ -638,14 +660,21 @@ type RoomContextBundleCommon<P extends JsonObject, S extends LsonObject, U exten
|
|
|
638
660
|
*/
|
|
639
661
|
useRemoveReaction(): (options: CommentReactionOptions) => void;
|
|
640
662
|
/**
|
|
641
|
-
*
|
|
663
|
+
* @deprecated Renamed to `useUpdateRoomSubscriptionSettings`
|
|
664
|
+
*
|
|
665
|
+
* Returns a function that updates the user's subscription settings
|
|
666
|
+
* for the current room.
|
|
667
|
+
*/
|
|
668
|
+
useUpdateRoomNotificationSettings(): (settings: Partial<RoomSubscriptionSettings>) => void;
|
|
669
|
+
/**
|
|
670
|
+
* Returns a function that updates the user's subscription settings
|
|
642
671
|
* for the current room.
|
|
643
672
|
*
|
|
644
673
|
* @example
|
|
645
|
-
* const
|
|
646
|
-
*
|
|
674
|
+
* const updateRoomSubscriptionSettings = useUpdateRoomSubscriptionSettings();
|
|
675
|
+
* updateRoomSubscriptionSettings({ threads: "all" });
|
|
647
676
|
*/
|
|
648
|
-
|
|
677
|
+
useUpdateRoomSubscriptionSettings(): (settings: Partial<RoomSubscriptionSettings>) => void;
|
|
649
678
|
/**
|
|
650
679
|
* Returns a function that marks a thread as read.
|
|
651
680
|
*
|
|
@@ -655,10 +684,11 @@ type RoomContextBundleCommon<P extends JsonObject, S extends LsonObject, U exten
|
|
|
655
684
|
*/
|
|
656
685
|
useMarkThreadAsRead(): (threadId: string) => void;
|
|
657
686
|
/**
|
|
658
|
-
* Returns the subscription status of a thread
|
|
687
|
+
* Returns the subscription status of a thread, methods to update it, and when
|
|
688
|
+
* the thread was last read.
|
|
659
689
|
*
|
|
660
690
|
* @example
|
|
661
|
-
* const { status, unreadSince } = useThreadSubscription("th_xxx");
|
|
691
|
+
* const { status, subscribe, unsubscribe, unreadSince } = useThreadSubscription("th_xxx");
|
|
662
692
|
*/
|
|
663
693
|
useThreadSubscription(threadId: string): ThreadSubscription;
|
|
664
694
|
};
|
|
@@ -733,15 +763,25 @@ type RoomContextBundle<P extends JsonObject, S extends LsonObject, U extends Bas
|
|
|
733
763
|
*/
|
|
734
764
|
useThreads(options?: UseThreadsOptions<M>): ThreadsAsyncResult<M>;
|
|
735
765
|
/**
|
|
766
|
+
* @deprecated Renamed to `useRoomSubscriptionSettings`
|
|
767
|
+
*
|
|
736
768
|
* Returns the user's notification settings for the current room
|
|
737
769
|
* and a function to update them.
|
|
770
|
+
*/
|
|
771
|
+
useRoomNotificationSettings(): [
|
|
772
|
+
RoomSubscriptionSettingsAsyncResult,
|
|
773
|
+
(settings: Partial<RoomSubscriptionSettings>) => void
|
|
774
|
+
];
|
|
775
|
+
/**
|
|
776
|
+
* Returns the user's subscription settings for the current room
|
|
777
|
+
* and a function to update them.
|
|
738
778
|
*
|
|
739
779
|
* @example
|
|
740
|
-
* const [{ settings }, updateSettings] =
|
|
780
|
+
* const [{ settings }, updateSettings] = useRoomSubscriptionSettings();
|
|
741
781
|
*/
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
(settings: Partial<
|
|
782
|
+
useRoomSubscriptionSettings(): [
|
|
783
|
+
RoomSubscriptionSettingsAsyncResult,
|
|
784
|
+
(settings: Partial<RoomSubscriptionSettings>) => void
|
|
745
785
|
];
|
|
746
786
|
/**
|
|
747
787
|
* Returns a presigned URL for an attachment by its ID.
|
|
@@ -836,15 +876,25 @@ type RoomContextBundle<P extends JsonObject, S extends LsonObject, U extends Bas
|
|
|
836
876
|
*/
|
|
837
877
|
useHistoryVersions(): HistoryVersionsAsyncSuccess;
|
|
838
878
|
/**
|
|
879
|
+
* @deprecated Renamed to `useRoomSubscriptionSettings`
|
|
880
|
+
*
|
|
839
881
|
* Returns the user's notification settings for the current room
|
|
840
882
|
* and a function to update them.
|
|
883
|
+
*/
|
|
884
|
+
useRoomNotificationSettings(): [
|
|
885
|
+
RoomSubscriptionSettingsAsyncSuccess,
|
|
886
|
+
(settings: Partial<RoomSubscriptionSettings>) => void
|
|
887
|
+
];
|
|
888
|
+
/**
|
|
889
|
+
* Returns the user's subscription settings for the current room
|
|
890
|
+
* and a function to update them.
|
|
841
891
|
*
|
|
842
892
|
* @example
|
|
843
|
-
* const [{ settings }, updateSettings] =
|
|
893
|
+
* const [{ settings }, updateSettings] = useRoomSubscriptionSettings();
|
|
844
894
|
*/
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
(settings: Partial<
|
|
895
|
+
useRoomSubscriptionSettings(): [
|
|
896
|
+
RoomSubscriptionSettingsAsyncSuccess,
|
|
897
|
+
(settings: Partial<RoomSubscriptionSettings>) => void
|
|
848
898
|
];
|
|
849
899
|
/**
|
|
850
900
|
* Returns a presigned URL for an attachment by its ID.
|
|
@@ -919,8 +969,8 @@ type LiveblocksContextBundleCommon<M extends BaseMetadata> = {
|
|
|
919
969
|
* const [{ settings }, updateNotificationSettings] = useNotificationSettings()
|
|
920
970
|
*/
|
|
921
971
|
useNotificationSettings(): [
|
|
922
|
-
|
|
923
|
-
(settings:
|
|
972
|
+
NotificationSettingsAsyncResult,
|
|
973
|
+
(settings: PartialNotificationSettings) => void
|
|
924
974
|
];
|
|
925
975
|
/**
|
|
926
976
|
* Returns a function that updates the user's notification
|
|
@@ -929,7 +979,7 @@ type LiveblocksContextBundleCommon<M extends BaseMetadata> = {
|
|
|
929
979
|
* @example
|
|
930
980
|
* const updateNotificationSettings = useUpdateNotificationSettings()
|
|
931
981
|
*/
|
|
932
|
-
useUpdateNotificationSettings(): (settings:
|
|
982
|
+
useUpdateNotificationSettings(): (settings: PartialNotificationSettings) => void;
|
|
933
983
|
/**
|
|
934
984
|
* Returns the current Liveblocks sync status, and triggers a re-render
|
|
935
985
|
* whenever it changes. Can be used to render a "Saving..." indicator, or for
|
|
@@ -986,8 +1036,8 @@ type LiveblocksContextBundle<U extends BaseUserMeta, M extends BaseMetadata> = R
|
|
|
986
1036
|
* const [{ settings }, updateNotificationSettings] = useNotificationSettings()
|
|
987
1037
|
*/
|
|
988
1038
|
useNotificationSettings(): [
|
|
989
|
-
|
|
990
|
-
(settings:
|
|
1039
|
+
NotificationSettingsAsyncResult,
|
|
1040
|
+
(settings: PartialNotificationSettings) => void
|
|
991
1041
|
];
|
|
992
1042
|
/**
|
|
993
1043
|
* @experimental
|
|
@@ -1047,10 +1097,10 @@ declare class ThreadDB<M extends BaseMetadata> {
|
|
|
1047
1097
|
*
|
|
1048
1098
|
* Will never return deleted threads in the result.
|
|
1049
1099
|
*/
|
|
1050
|
-
findMany(roomId: string | undefined, query: ThreadsQuery<M
|
|
1100
|
+
findMany(roomId: string | undefined, query: ThreadsQuery<M> | undefined, direction: "asc" | "desc"): ThreadData<M>[];
|
|
1051
1101
|
}
|
|
1052
1102
|
|
|
1053
|
-
type OptimisticUpdate<M extends BaseMetadata> = CreateThreadOptimisticUpdate<M> | DeleteThreadOptimisticUpdate | EditThreadMetadataOptimisticUpdate<M> | MarkThreadAsResolvedOptimisticUpdate | MarkThreadAsUnresolvedOptimisticUpdate | CreateCommentOptimisticUpdate | EditCommentOptimisticUpdate | DeleteCommentOptimisticUpdate | AddReactionOptimisticUpdate | RemoveReactionOptimisticUpdate | MarkInboxNotificationAsReadOptimisticUpdate | MarkAllInboxNotificationsAsReadOptimisticUpdate | DeleteInboxNotificationOptimisticUpdate | DeleteAllInboxNotificationsOptimisticUpdate |
|
|
1103
|
+
type OptimisticUpdate<M extends BaseMetadata> = CreateThreadOptimisticUpdate<M> | DeleteThreadOptimisticUpdate | EditThreadMetadataOptimisticUpdate<M> | MarkThreadAsResolvedOptimisticUpdate | MarkThreadAsUnresolvedOptimisticUpdate | SubscribeToThreadOptimisticUpdate | UnsubscribeFromThreadOptimisticUpdate | CreateCommentOptimisticUpdate | EditCommentOptimisticUpdate | DeleteCommentOptimisticUpdate | AddReactionOptimisticUpdate | RemoveReactionOptimisticUpdate | MarkInboxNotificationAsReadOptimisticUpdate | MarkAllInboxNotificationsAsReadOptimisticUpdate | DeleteInboxNotificationOptimisticUpdate | DeleteAllInboxNotificationsOptimisticUpdate | UpdateRoomSubscriptionSettingsOptimisticUpdate | UpdateNotificationSettingsOptimisticUpdate;
|
|
1054
1104
|
type CreateThreadOptimisticUpdate<M extends BaseMetadata> = {
|
|
1055
1105
|
type: "create-thread";
|
|
1056
1106
|
id: string;
|
|
@@ -1083,6 +1133,18 @@ type MarkThreadAsUnresolvedOptimisticUpdate = {
|
|
|
1083
1133
|
threadId: string;
|
|
1084
1134
|
updatedAt: Date;
|
|
1085
1135
|
};
|
|
1136
|
+
type SubscribeToThreadOptimisticUpdate = {
|
|
1137
|
+
type: "subscribe-to-thread";
|
|
1138
|
+
id: string;
|
|
1139
|
+
threadId: string;
|
|
1140
|
+
subscribedAt: Date;
|
|
1141
|
+
};
|
|
1142
|
+
type UnsubscribeFromThreadOptimisticUpdate = {
|
|
1143
|
+
type: "unsubscribe-from-thread";
|
|
1144
|
+
id: string;
|
|
1145
|
+
threadId: string;
|
|
1146
|
+
unsubscribedAt: Date;
|
|
1147
|
+
};
|
|
1086
1148
|
type CreateCommentOptimisticUpdate = {
|
|
1087
1149
|
type: "create-comment";
|
|
1088
1150
|
id: string;
|
|
@@ -1139,16 +1201,17 @@ type DeleteAllInboxNotificationsOptimisticUpdate = {
|
|
|
1139
1201
|
id: string;
|
|
1140
1202
|
deletedAt: Date;
|
|
1141
1203
|
};
|
|
1142
|
-
type
|
|
1143
|
-
type: "update-
|
|
1204
|
+
type UpdateRoomSubscriptionSettingsOptimisticUpdate = {
|
|
1205
|
+
type: "update-room-subscription-settings";
|
|
1144
1206
|
id: string;
|
|
1145
1207
|
roomId: string;
|
|
1146
|
-
|
|
1208
|
+
userId: string;
|
|
1209
|
+
settings: Partial<RoomSubscriptionSettings$1>;
|
|
1147
1210
|
};
|
|
1148
|
-
type
|
|
1149
|
-
type: "update-
|
|
1211
|
+
type UpdateNotificationSettingsOptimisticUpdate = {
|
|
1212
|
+
type: "update-notification-settings";
|
|
1150
1213
|
id: string;
|
|
1151
|
-
settings:
|
|
1214
|
+
settings: PartialNotificationSettings;
|
|
1152
1215
|
};
|
|
1153
1216
|
/**
|
|
1154
1217
|
* Like Promise<T>, except it will have a synchronously readable `status`
|
|
@@ -1176,13 +1239,14 @@ type RoomQueryKey = string;
|
|
|
1176
1239
|
*/
|
|
1177
1240
|
type NotificationsLUT = Map<string, InboxNotificationData>;
|
|
1178
1241
|
/**
|
|
1179
|
-
*
|
|
1242
|
+
* Room subscription settings by room ID.
|
|
1180
1243
|
* e.g. { 'room-abc': { threads: "all" },
|
|
1181
1244
|
* 'room-def': { threads: "replies_and_mentions" },
|
|
1182
1245
|
* 'room-xyz': { threads: "none" },
|
|
1183
1246
|
* }
|
|
1184
1247
|
*/
|
|
1185
|
-
type
|
|
1248
|
+
type RoomSubscriptionSettingsByRoomId = Record<RoomId, RoomSubscriptionSettings$1>;
|
|
1249
|
+
type SubscriptionsByKey = Record<SubscriptionKey, SubscriptionData>;
|
|
1186
1250
|
type PermissionHintsLUT = DefaultMap<RoomId, Set<Permission>>;
|
|
1187
1251
|
type CleanThreadifications<M extends BaseMetadata> = CleanThreads<M> & CleanNotifications;
|
|
1188
1252
|
type CleanThreads<M extends BaseMetadata> = {
|
|
@@ -1204,6 +1268,21 @@ type CleanNotifications = {
|
|
|
1204
1268
|
*/
|
|
1205
1269
|
notificationsById: Record<string, InboxNotificationData>;
|
|
1206
1270
|
};
|
|
1271
|
+
type CleanThreadSubscriptions = {
|
|
1272
|
+
/**
|
|
1273
|
+
* Thread subscriptions by key (kind + subject ID).
|
|
1274
|
+
* e.g. `thread:${string}`, `$custom:${string}`, etc
|
|
1275
|
+
*/
|
|
1276
|
+
subscriptions: SubscriptionsByKey;
|
|
1277
|
+
/**
|
|
1278
|
+
* All inbox notifications in a sorted array, optimistic updates applied.
|
|
1279
|
+
*
|
|
1280
|
+
* `useThreadSubscription` returns the subscription status based on subscriptions
|
|
1281
|
+
* but also the `readAt` value of the associated notification, so we need to
|
|
1282
|
+
* expose the notifications here as well.
|
|
1283
|
+
*/
|
|
1284
|
+
notifications: InboxNotificationData[];
|
|
1285
|
+
};
|
|
1207
1286
|
declare function createStore_forNotifications(): {
|
|
1208
1287
|
signal: ISignal<NotificationsLUT>;
|
|
1209
1288
|
markAllRead: (readAt: Date) => void;
|
|
@@ -1214,9 +1293,15 @@ declare function createStore_forNotifications(): {
|
|
|
1214
1293
|
updateAssociatedNotification: (newComment: CommentData) => void;
|
|
1215
1294
|
upsert: (notification: InboxNotificationData) => void;
|
|
1216
1295
|
};
|
|
1217
|
-
declare function
|
|
1218
|
-
signal: DerivedSignal<
|
|
1219
|
-
|
|
1296
|
+
declare function createStore_forSubscriptions(updates: ISignal<readonly OptimisticUpdate<BaseMetadata>[]>, threads: ReadonlyThreadDB<BaseMetadata>): {
|
|
1297
|
+
signal: DerivedSignal<SubscriptionsByKey>;
|
|
1298
|
+
applyDelta: (newSubscriptions: SubscriptionData[], deletedSubscriptions: SubscriptionDeleteInfo[]) => void;
|
|
1299
|
+
create: (subscription: SubscriptionData) => void;
|
|
1300
|
+
delete: (subscriptionKey: SubscriptionKey) => void;
|
|
1301
|
+
};
|
|
1302
|
+
declare function createStore_forRoomSubscriptionSettings(updates: ISignal<readonly OptimisticUpdate<BaseMetadata>[]>): {
|
|
1303
|
+
signal: DerivedSignal<RoomSubscriptionSettingsByRoomId>;
|
|
1304
|
+
update: (roomId: string, settings: RoomSubscriptionSettings$1) => void;
|
|
1220
1305
|
};
|
|
1221
1306
|
declare function createStore_forHistoryVersions(): {
|
|
1222
1307
|
signal: DerivedSignal<{
|
|
@@ -1231,7 +1316,8 @@ declare function createStore_forPermissionHints(): {
|
|
|
1231
1316
|
update: (newHints: Record<string, Permission[]>) => void;
|
|
1232
1317
|
};
|
|
1233
1318
|
/**
|
|
1234
|
-
*
|
|
1319
|
+
* Notification settings
|
|
1320
|
+
*
|
|
1235
1321
|
* e.g.
|
|
1236
1322
|
* {
|
|
1237
1323
|
* email: {
|
|
@@ -1247,9 +1333,9 @@ declare function createStore_forPermissionHints(): {
|
|
|
1247
1333
|
* }
|
|
1248
1334
|
* e.g. {} when before the first successful fetch.
|
|
1249
1335
|
*/
|
|
1250
|
-
declare function
|
|
1251
|
-
signal: DerivedSignal<
|
|
1252
|
-
update: (settings:
|
|
1336
|
+
declare function createStore_forNotificationSettings(updates: ISignal<readonly OptimisticUpdate<BaseMetadata>[]>): {
|
|
1337
|
+
signal: DerivedSignal<NotificationSettings>;
|
|
1338
|
+
update: (settings: NotificationSettings) => void;
|
|
1253
1339
|
};
|
|
1254
1340
|
declare function createStore_forOptimistic<M extends BaseMetadata>(client: Client<BaseUserMeta$1, M>): {
|
|
1255
1341
|
signal: ISignal<readonly OptimisticUpdate<M>[]>;
|
|
@@ -1260,10 +1346,11 @@ declare class UmbrellaStore<M extends BaseMetadata> {
|
|
|
1260
1346
|
#private;
|
|
1261
1347
|
readonly threads: ThreadDB<M>;
|
|
1262
1348
|
readonly notifications: ReturnType<typeof createStore_forNotifications>;
|
|
1263
|
-
readonly
|
|
1349
|
+
readonly subscriptions: ReturnType<typeof createStore_forSubscriptions>;
|
|
1350
|
+
readonly roomSubscriptionSettings: ReturnType<typeof createStore_forRoomSubscriptionSettings>;
|
|
1264
1351
|
readonly historyVersions: ReturnType<typeof createStore_forHistoryVersions>;
|
|
1265
1352
|
readonly permissionHints: ReturnType<typeof createStore_forPermissionHints>;
|
|
1266
|
-
readonly
|
|
1353
|
+
readonly notificationSettings: ReturnType<typeof createStore_forNotificationSettings>;
|
|
1267
1354
|
readonly optimisticUpdates: ReturnType<typeof createStore_forOptimistic<M>>;
|
|
1268
1355
|
readonly outputs: {
|
|
1269
1356
|
readonly threadifications: DerivedSignal<CleanThreadifications<M>>;
|
|
@@ -1271,10 +1358,11 @@ declare class UmbrellaStore<M extends BaseMetadata> {
|
|
|
1271
1358
|
readonly loadingRoomThreads: DefaultMap<RoomQueryKey, LoadableResource<ThreadsAsyncResult<M>>>;
|
|
1272
1359
|
readonly loadingUserThreads: DefaultMap<UserQueryKey, LoadableResource<ThreadsAsyncResult<M>>>;
|
|
1273
1360
|
readonly notifications: DerivedSignal<CleanNotifications>;
|
|
1361
|
+
readonly threadSubscriptions: DerivedSignal<CleanThreadSubscriptions>;
|
|
1274
1362
|
readonly loadingNotifications: LoadableResource<InboxNotificationsAsyncResult>;
|
|
1275
|
-
readonly
|
|
1363
|
+
readonly roomSubscriptionSettingsByRoomId: DefaultMap<RoomId, LoadableResource<RoomSubscriptionSettingsAsyncResult>>;
|
|
1276
1364
|
readonly versionsByRoomId: DefaultMap<RoomId, LoadableResource<HistoryVersionsAsyncResult>>;
|
|
1277
|
-
readonly
|
|
1365
|
+
readonly notificationSettings: LoadableResource<NotificationSettingsAsyncResult>;
|
|
1278
1366
|
};
|
|
1279
1367
|
constructor(client: OpaqueClient);
|
|
1280
1368
|
/**
|
|
@@ -1295,6 +1383,16 @@ declare class UmbrellaStore<M extends BaseMetadata> {
|
|
|
1295
1383
|
* update.
|
|
1296
1384
|
*/
|
|
1297
1385
|
deleteAllInboxNotifications(optimisticId: string): void;
|
|
1386
|
+
/**
|
|
1387
|
+
* Creates a existing subscription, replacing the corresponding
|
|
1388
|
+
* optimistic update.
|
|
1389
|
+
*/
|
|
1390
|
+
createSubscription(subscription: SubscriptionData, optimisticId: string): void;
|
|
1391
|
+
/**
|
|
1392
|
+
* Deletes an existing subscription, replacing the corresponding
|
|
1393
|
+
* optimistic update.
|
|
1394
|
+
*/
|
|
1395
|
+
deleteSubscription(subscriptionKey: SubscriptionKey, optimisticId: string): void;
|
|
1298
1396
|
/**
|
|
1299
1397
|
* Creates an new thread, replacing the corresponding optimistic update.
|
|
1300
1398
|
*/
|
|
@@ -1321,26 +1419,26 @@ declare class UmbrellaStore<M extends BaseMetadata> {
|
|
|
1321
1419
|
createComment(newComment: CommentData, optimisticId: string): void;
|
|
1322
1420
|
editComment(threadId: string, optimisticId: string, editedComment: CommentData): void;
|
|
1323
1421
|
deleteComment(threadId: string, optimisticId: string, commentId: string, deletedAt: Date): void;
|
|
1324
|
-
updateThreadifications(threads: ThreadData<M>[], notifications: InboxNotificationData[], deletedThreads?: ThreadDeleteInfo[], deletedNotifications?: InboxNotificationDeleteInfo[]): void;
|
|
1422
|
+
updateThreadifications(threads: ThreadData<M>[], notifications: InboxNotificationData[], subscriptions: SubscriptionData[], deletedThreads?: ThreadDeleteInfo[], deletedNotifications?: InboxNotificationDeleteInfo[], deletedSubscriptions?: SubscriptionDeleteInfo[]): void;
|
|
1325
1423
|
/**
|
|
1326
|
-
* Updates existing
|
|
1424
|
+
* Updates existing subscription settings for a room with a new value,
|
|
1327
1425
|
* replacing the corresponding optimistic update.
|
|
1328
1426
|
*/
|
|
1329
|
-
|
|
1427
|
+
updateRoomSubscriptionSettings(roomId: string, optimisticId: string, settings: Readonly<RoomSubscriptionSettings$1>): void;
|
|
1330
1428
|
fetchNotificationsDeltaUpdate(signal: AbortSignal): Promise<void>;
|
|
1331
1429
|
fetchRoomThreadsDeltaUpdate(roomId: string, signal: AbortSignal): Promise<void>;
|
|
1332
1430
|
fetchUserThreadsDeltaUpdate(signal: AbortSignal): Promise<void>;
|
|
1333
1431
|
fetchRoomVersionsDeltaUpdate(roomId: string, signal: AbortSignal): Promise<void>;
|
|
1334
|
-
|
|
1432
|
+
refreshRoomSubscriptionSettings(roomId: string, signal: AbortSignal): Promise<void>;
|
|
1335
1433
|
/**
|
|
1336
|
-
* Refresh
|
|
1434
|
+
* Refresh notification settings from poller
|
|
1337
1435
|
*/
|
|
1338
|
-
|
|
1436
|
+
refreshNotificationSettings(signal: AbortSignal): Promise<void>;
|
|
1339
1437
|
/**
|
|
1340
|
-
* Updates
|
|
1438
|
+
* Updates notification settings with a new value, replacing the
|
|
1341
1439
|
* corresponding optimistic update.
|
|
1342
1440
|
*/
|
|
1343
|
-
|
|
1441
|
+
updateNotificationSettings_confirmOptimisticUpdate(settings: NotificationSettings, optimisticUpdateId: string): void;
|
|
1344
1442
|
}
|
|
1345
1443
|
|
|
1346
1444
|
/**
|
|
@@ -1457,7 +1555,7 @@ declare function useUnreadInboxNotificationsCountSuspense(): {
|
|
|
1457
1555
|
* @example
|
|
1458
1556
|
* const [{ settings }, updateNotificationSettings] = useNotificationSettings()
|
|
1459
1557
|
*/
|
|
1460
|
-
declare function useNotificationSettings(): [
|
|
1558
|
+
declare function useNotificationSettings(): [NotificationSettingsAsyncResult, (settings: PartialNotificationSettings) => void];
|
|
1461
1559
|
/**
|
|
1462
1560
|
* Returns notification settings for the current user.
|
|
1463
1561
|
*
|
|
@@ -1466,9 +1564,9 @@ declare function useNotificationSettings(): [UserNotificationSettingsAsyncResult
|
|
|
1466
1564
|
*/
|
|
1467
1565
|
declare function useNotificationSettingsSuspense(): [{
|
|
1468
1566
|
readonly isLoading: false;
|
|
1469
|
-
readonly settings: _liveblocks_core.
|
|
1567
|
+
readonly settings: _liveblocks_core.NotificationSettings;
|
|
1470
1568
|
readonly error?: undefined;
|
|
1471
|
-
}, (settings:
|
|
1569
|
+
}, (settings: PartialNotificationSettings) => void];
|
|
1472
1570
|
/**
|
|
1473
1571
|
* Returns a function that updates the user's notification
|
|
1474
1572
|
* settings for a project.
|
|
@@ -1476,7 +1574,7 @@ declare function useNotificationSettingsSuspense(): [{
|
|
|
1476
1574
|
* @example
|
|
1477
1575
|
* const updateNotificationSettings = useUpdateNotificationSettings()
|
|
1478
1576
|
*/
|
|
1479
|
-
declare function useUpdateNotificationSettings(): (settings:
|
|
1577
|
+
declare function useUpdateNotificationSettings(): (settings: PartialNotificationSettings) => void;
|
|
1480
1578
|
/**
|
|
1481
1579
|
* Returns room info from a given room ID.
|
|
1482
1580
|
*
|
|
@@ -1766,12 +1864,33 @@ declare function useMarkThreadAsUnresolved(): (threadId: string) => void;
|
|
|
1766
1864
|
*/
|
|
1767
1865
|
declare function useMarkRoomThreadAsUnresolved(roomId: string): (threadId: string) => void;
|
|
1768
1866
|
/**
|
|
1769
|
-
* Returns the
|
|
1867
|
+
* Returns a function that subscribes the user to a thread.
|
|
1868
|
+
*
|
|
1869
|
+
* @example
|
|
1870
|
+
* const subscribeToThread = useSubscribeToThread();
|
|
1871
|
+
* subscribeToThread("th_xxx");
|
|
1872
|
+
*/
|
|
1873
|
+
declare function useSubscribeToThread(): (threadId: string) => void;
|
|
1874
|
+
/**
|
|
1875
|
+
* Returns a function that unsubscribes the user from a thread.
|
|
1876
|
+
*
|
|
1877
|
+
* @example
|
|
1878
|
+
* const unsubscribeFromThread = useUnsubscribeFromThread();
|
|
1879
|
+
* unsubscribeFromThread("th_xxx");
|
|
1880
|
+
*/
|
|
1881
|
+
declare function useUnsubscribeFromThread(): (threadId: string) => void;
|
|
1882
|
+
/**
|
|
1883
|
+
* Returns the subscription status of a thread, methods to update it, and when
|
|
1884
|
+
* the thread was last read.
|
|
1770
1885
|
*
|
|
1771
1886
|
* @example
|
|
1772
|
-
* const { status, unreadSince } = useThreadSubscription("th_xxx");
|
|
1887
|
+
* const { status, subscribe, unsubscribe, unreadSince } = useThreadSubscription("th_xxx");
|
|
1773
1888
|
*/
|
|
1774
1889
|
declare function useThreadSubscription(threadId: string): ThreadSubscription;
|
|
1890
|
+
/**
|
|
1891
|
+
* @private
|
|
1892
|
+
*/
|
|
1893
|
+
declare function useRoomThreadSubscription(roomId: string, threadId: string): ThreadSubscription;
|
|
1775
1894
|
/**
|
|
1776
1895
|
* Returns the version data bianry for a given version
|
|
1777
1896
|
*
|
|
@@ -1780,14 +1899,21 @@ declare function useThreadSubscription(threadId: string): ThreadSubscription;
|
|
|
1780
1899
|
*/
|
|
1781
1900
|
declare function useHistoryVersionData(versionId: string): HistoryVersionDataAsyncResult;
|
|
1782
1901
|
/**
|
|
1783
|
-
*
|
|
1902
|
+
* @deprecated Renamed to `useUpdateRoomSubscriptionSettings`
|
|
1903
|
+
*
|
|
1904
|
+
* Returns a function that updates the user's subscription settings
|
|
1905
|
+
* for the current room.
|
|
1906
|
+
*/
|
|
1907
|
+
declare function useUpdateRoomNotificationSettings(): (settings: Partial<RoomSubscriptionSettings$1>) => void;
|
|
1908
|
+
/**
|
|
1909
|
+
* Returns a function that updates the user's subscription settings
|
|
1784
1910
|
* for the current room.
|
|
1785
1911
|
*
|
|
1786
1912
|
* @example
|
|
1787
|
-
* const
|
|
1788
|
-
*
|
|
1913
|
+
* const updateRoomSubscriptionSettings = useUpdateRoomSubscriptionSettings();
|
|
1914
|
+
* updateRoomSubscriptionSettings({ threads: "all" });
|
|
1789
1915
|
*/
|
|
1790
|
-
declare function
|
|
1916
|
+
declare function useUpdateRoomSubscriptionSettings(): (settings: Partial<RoomSubscriptionSettings$1>) => void;
|
|
1791
1917
|
/**
|
|
1792
1918
|
* Returns an array of connection IDs. This matches the values you'll get by
|
|
1793
1919
|
* using the `useOthers()` hook.
|
|
@@ -2057,21 +2183,35 @@ declare const _useThreads: TypedBundle["useThreads"];
|
|
|
2057
2183
|
*/
|
|
2058
2184
|
declare const _useThreadsSuspense: TypedBundle["suspense"]["useThreads"];
|
|
2059
2185
|
/**
|
|
2060
|
-
*
|
|
2061
|
-
* and a function to update them.
|
|
2186
|
+
* @deprecated Renamed to `useRoomSubscriptionSettings`
|
|
2062
2187
|
*
|
|
2063
|
-
*
|
|
2064
|
-
*
|
|
2188
|
+
* Returns the user's subscription settings for the current room
|
|
2189
|
+
* and a function to update them.
|
|
2065
2190
|
*/
|
|
2066
2191
|
declare const _useRoomNotificationSettings: TypedBundle["useRoomNotificationSettings"];
|
|
2067
2192
|
/**
|
|
2068
|
-
* Returns the user's
|
|
2193
|
+
* Returns the user's subscription settings for the current room
|
|
2069
2194
|
* and a function to update them.
|
|
2070
2195
|
*
|
|
2071
2196
|
* @example
|
|
2072
|
-
* const [{ settings }, updateSettings] =
|
|
2197
|
+
* const [{ settings }, updateSettings] = useRoomSubscriptionSettings();
|
|
2198
|
+
*/
|
|
2199
|
+
declare const _useRoomSubscriptionSettings: TypedBundle["useRoomSubscriptionSettings"];
|
|
2200
|
+
/**
|
|
2201
|
+
* @deprecated Renamed to `useRoomSubscriptionSettings`
|
|
2202
|
+
*
|
|
2203
|
+
* Returns the user's subscription settings for the current room
|
|
2204
|
+
* and a function to update them.
|
|
2073
2205
|
*/
|
|
2074
2206
|
declare const _useRoomNotificationSettingsSuspense: TypedBundle["suspense"]["useRoomNotificationSettings"];
|
|
2207
|
+
/**
|
|
2208
|
+
* Returns the user's subscription settings for the current room
|
|
2209
|
+
* and a function to update them.
|
|
2210
|
+
*
|
|
2211
|
+
* @example
|
|
2212
|
+
* const [{ settings }, updateSettings] = useRoomSubscriptionSettings();
|
|
2213
|
+
*/
|
|
2214
|
+
declare const _useRoomSubscriptionSettingsSuspense: TypedBundle["suspense"]["useRoomSubscriptionSettings"];
|
|
2075
2215
|
/**
|
|
2076
2216
|
* (Private beta) Returns a history of versions of the current room.
|
|
2077
2217
|
*
|
|
@@ -2313,4 +2453,4 @@ declare const _useStorageRoot: TypedBundle["useStorageRoot"];
|
|
|
2313
2453
|
*/
|
|
2314
2454
|
declare const _useUpdateMyPresence: TypedBundle["useUpdateMyPresence"];
|
|
2315
2455
|
|
|
2316
|
-
export {
|
|
2456
|
+
export { _useEventListener as $, useDeleteInboxNotification as A, useErrorListener as B, ClientContext as C, useMarkAllInboxNotificationsAsRead as D, useMarkInboxNotificationAsRead as E, useSyncStatus as F, createRoomContext as G, _RoomProvider as H, _useAddReaction as I, useBatch as J, _useBroadcastEvent as K, LiveblocksProvider as L, type MutationContext as M, useCanRedo as N, useCanUndo as O, useCreateComment as P, _useCreateThread as Q, useDeleteComment as R, _useDeleteThread as S, useEditComment as T, type UseStorageStatusOptions as U, _useEditThreadMetadata as V, useMarkThreadAsResolved as W, useMarkThreadAsUnresolved as X, useSubscribeToThread as Y, useUnsubscribeFromThread as Z, _useInboxNotificationThread as _, useAddRoomCommentReaction as a, useHistory as a0, _useIsInsideRoom as a1, useLostConnectionListener as a2, useMarkThreadAsRead as a3, _useMutation as a4, _useMyPresence as a5, _useOthersListener as a6, useRedo as a7, useRemoveReaction as a8, _useRoom as a9, _useUser as aA, _useOtherSuspense as aB, _useOthersSuspense as aC, useOthersConnectionIdsSuspense as aD, _useOthersMappedSuspense as aE, _useSelfSuspense as aF, _useStorageSuspense as aG, useStorageStatusSuspense as aH, _useThreadsSuspense as aI, useAttachmentUrlSuspense as aJ, _useHistoryVersionsSuspense as aK, _useRoomNotificationSettingsSuspense as aL, _useRoomSubscriptionSettingsSuspense as aM, useInboxNotificationsSuspense as aN, useNotificationSettingsSuspense as aO, useRoomInfoSuspense as aP, useUnreadInboxNotificationsCountSuspense as aQ, _useUserSuspense as aR, _useUserThreadsSuspense_experimental as aS, useStatus as aa, _useStorageRoot as ab, useThreadSubscription as ac, useUndo as ad, _useUpdateMyPresence as ae, useUpdateRoomNotificationSettings as af, useUpdateRoomSubscriptionSettings as ag, useHistoryVersionData as ah, _useOther as ai, _useOthers as aj, useOthersConnectionIds as ak, _useOthersMapped as al, _useSelf as am, _useStorage as an, useStorageStatus as ao, _useThreads as ap, useAttachmentUrl as aq, _useHistoryVersions as ar, _useRoomNotificationSettings as as, _useRoomSubscriptionSettings as at, useInboxNotifications as au, useNotificationSettings as av, useUpdateNotificationSettings as aw, _useUserThreads_experimental as ax, useRoomInfo as ay, useUnreadInboxNotificationsCount as az, useCreateRoomComment as b, useCreateRoomThread as c, useCreateTextMention as d, useDeleteRoomComment as e, useDeleteRoomThread as f, getUmbrellaStoreForClient as g, useDeleteTextMention as h, useEditRoomComment as i, useEditRoomThreadMetadata as j, useMarkRoomThreadAsRead as k, useMarkRoomThreadAsResolved as l, useMarkRoomThreadAsUnresolved as m, useMentionSuggestionsCache as n, useRemoveRoomCommentReaction as o, useReportTextEditor as p, useResolveMentionSuggestions as q, useRoomAttachmentUrl as r, useRoomPermissions as s, useRoomThreadSubscription as t, useClientOrNull as u, useYjsProvider as v, type UseThreadsOptions as w, createLiveblocksContext as x, useClient as y, useDeleteAllInboxNotifications as z };
|
package/dist/suspense.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkJYG2E4EZcjs = require('./chunk-JYG2E4EZ.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -65,12 +65,20 @@ var _chunkFV6YKJ4Lcjs = require('./chunk-FV6YKJ4L.cjs');
|
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
var _chunkVEO3XXA7cjs = require('./chunk-VEO3XXA7.cjs');
|
|
69
73
|
|
|
70
74
|
// src/suspense.ts
|
|
71
75
|
var _core = require('@liveblocks/core');
|
|
72
76
|
var _client = require('@liveblocks/client');
|
|
73
|
-
_core.detectDupes.call(void 0,
|
|
77
|
+
_core.detectDupes.call(void 0, _chunkJYG2E4EZcjs.PKG_NAME, _chunkJYG2E4EZcjs.PKG_VERSION, _chunkJYG2E4EZcjs.PKG_FORMAT);
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
74
82
|
|
|
75
83
|
|
|
76
84
|
|
|
@@ -135,5 +143,5 @@ _core.detectDupes.call(void 0, _chunkFV6YKJ4Lcjs.PKG_NAME, _chunkFV6YKJ4Lcjs.PKG
|
|
|
135
143
|
|
|
136
144
|
|
|
137
145
|
|
|
138
|
-
exports.ClientContext =
|
|
146
|
+
exports.ClientContext = _chunkVEO3XXA7cjs.ClientContext; exports.ClientSideSuspense = _chunkJYG2E4EZcjs.ClientSideSuspense; exports.LiveblocksProvider = _chunkVEO3XXA7cjs.LiveblocksProvider; exports.RoomContext = _chunkVEO3XXA7cjs.RoomContext; exports.RoomProvider = _chunkVEO3XXA7cjs._RoomProvider; exports.isNotificationChannelEnabled = _client.isNotificationChannelEnabled; exports.shallow = _client.shallow; exports.useAddReaction = _chunkVEO3XXA7cjs._useAddReaction; exports.useAttachmentUrl = _chunkVEO3XXA7cjs.useAttachmentUrlSuspense; exports.useBatch = _chunkVEO3XXA7cjs.useBatch; exports.useBroadcastEvent = _chunkVEO3XXA7cjs._useBroadcastEvent; exports.useCanRedo = _chunkVEO3XXA7cjs.useCanRedo; exports.useCanUndo = _chunkVEO3XXA7cjs.useCanUndo; exports.useClient = _chunkVEO3XXA7cjs.useClient; exports.useCreateComment = _chunkVEO3XXA7cjs.useCreateComment; exports.useCreateThread = _chunkVEO3XXA7cjs._useCreateThread; exports.useDeleteAllInboxNotifications = _chunkVEO3XXA7cjs.useDeleteAllInboxNotifications; exports.useDeleteComment = _chunkVEO3XXA7cjs.useDeleteComment; exports.useDeleteInboxNotification = _chunkVEO3XXA7cjs.useDeleteInboxNotification; exports.useDeleteThread = _chunkVEO3XXA7cjs._useDeleteThread; exports.useEditComment = _chunkVEO3XXA7cjs.useEditComment; exports.useEditThreadMetadata = _chunkVEO3XXA7cjs._useEditThreadMetadata; exports.useErrorListener = _chunkVEO3XXA7cjs.useErrorListener; exports.useEventListener = _chunkVEO3XXA7cjs._useEventListener; exports.useHistory = _chunkVEO3XXA7cjs.useHistory; exports.useHistoryVersions = _chunkVEO3XXA7cjs._useHistoryVersionsSuspense; exports.useInboxNotificationThread = _chunkVEO3XXA7cjs._useInboxNotificationThread; exports.useInboxNotifications = _chunkVEO3XXA7cjs.useInboxNotificationsSuspense; exports.useIsInsideRoom = _chunkVEO3XXA7cjs._useIsInsideRoom; exports.useLostConnectionListener = _chunkVEO3XXA7cjs.useLostConnectionListener; exports.useMarkAllInboxNotificationsAsRead = _chunkVEO3XXA7cjs.useMarkAllInboxNotificationsAsRead; exports.useMarkInboxNotificationAsRead = _chunkVEO3XXA7cjs.useMarkInboxNotificationAsRead; exports.useMarkThreadAsRead = _chunkVEO3XXA7cjs.useMarkThreadAsRead; exports.useMarkThreadAsResolved = _chunkVEO3XXA7cjs.useMarkThreadAsResolved; exports.useMarkThreadAsUnresolved = _chunkVEO3XXA7cjs.useMarkThreadAsUnresolved; exports.useMutation = _chunkVEO3XXA7cjs._useMutation; exports.useMyPresence = _chunkVEO3XXA7cjs._useMyPresence; exports.useNotificationSettings = _chunkVEO3XXA7cjs.useNotificationSettingsSuspense; exports.useOther = _chunkVEO3XXA7cjs._useOtherSuspense; exports.useOthers = _chunkVEO3XXA7cjs._useOthersSuspense; exports.useOthersConnectionIds = _chunkVEO3XXA7cjs.useOthersConnectionIdsSuspense; exports.useOthersListener = _chunkVEO3XXA7cjs._useOthersListener; exports.useOthersMapped = _chunkVEO3XXA7cjs._useOthersMappedSuspense; exports.useRedo = _chunkVEO3XXA7cjs.useRedo; exports.useRemoveReaction = _chunkVEO3XXA7cjs.useRemoveReaction; exports.useRoom = _chunkVEO3XXA7cjs._useRoom; exports.useRoomInfo = _chunkVEO3XXA7cjs.useRoomInfoSuspense; exports.useRoomNotificationSettings = _chunkVEO3XXA7cjs._useRoomNotificationSettingsSuspense; exports.useRoomSubscriptionSettings = _chunkVEO3XXA7cjs._useRoomSubscriptionSettingsSuspense; exports.useSelf = _chunkVEO3XXA7cjs._useSelfSuspense; exports.useStatus = _chunkVEO3XXA7cjs.useStatus; exports.useStorage = _chunkVEO3XXA7cjs._useStorageSuspense; exports.useStorageRoot = _chunkVEO3XXA7cjs._useStorageRoot; exports.useStorageStatus = _chunkVEO3XXA7cjs.useStorageStatusSuspense; exports.useSubscribeToThread = _chunkVEO3XXA7cjs.useSubscribeToThread; exports.useSyncStatus = _chunkVEO3XXA7cjs.useSyncStatus; exports.useThreadSubscription = _chunkVEO3XXA7cjs.useThreadSubscription; exports.useThreads = _chunkVEO3XXA7cjs._useThreadsSuspense; exports.useUndo = _chunkVEO3XXA7cjs.useUndo; exports.useUnreadInboxNotificationsCount = _chunkVEO3XXA7cjs.useUnreadInboxNotificationsCountSuspense; exports.useUnsubscribeFromThread = _chunkVEO3XXA7cjs.useUnsubscribeFromThread; exports.useUpdateMyPresence = _chunkVEO3XXA7cjs._useUpdateMyPresence; exports.useUpdateNotificationSettings = _chunkVEO3XXA7cjs.useUpdateNotificationSettings; exports.useUpdateRoomNotificationSettings = _chunkVEO3XXA7cjs.useUpdateRoomNotificationSettings; exports.useUpdateRoomSubscriptionSettings = _chunkVEO3XXA7cjs.useUpdateRoomSubscriptionSettings; exports.useUser = _chunkVEO3XXA7cjs._useUserSuspense; exports.useUserThreads_experimental = _chunkVEO3XXA7cjs._useUserThreadsSuspense_experimental;
|
|
139
147
|
//# sourceMappingURL=suspense.cjs.map
|
package/dist/suspense.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/liveblocks/liveblocks/packages/liveblocks-react/dist/suspense.cjs","../src/suspense.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/liveblocks/liveblocks/packages/liveblocks-react/dist/suspense.cjs","../src/suspense.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;ACxEA,wCAA4B;AAc5B,4CAAsD;AAXtD,+BAAA,0BAAY,EAAU,6BAAA,EAAa,4BAAU,CAAA;ADyE7C;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,g9IAAC","file":"/home/runner/work/liveblocks/liveblocks/packages/liveblocks-react/dist/suspense.cjs","sourcesContent":[null,"/* 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, isNotificationChannelEnabled } 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 useUpdateNotificationSettings,\n useSyncStatus,\n useErrorListener,\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 useSubscribeToThread,\n useUnsubscribeFromThread,\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 useUpdateRoomSubscriptionSettings,\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 useRoomSubscriptionSettingsSuspense as useRoomSubscriptionSettings,\n} from \"./room\";\nexport {\n useInboxNotificationsSuspense as useInboxNotifications,\n useNotificationSettingsSuspense as useNotificationSettings,\n useRoomInfoSuspense as useRoomInfo,\n useUnreadInboxNotificationsCountSuspense as useUnreadInboxNotificationsCount,\n useUserSuspense as useUser,\n useUserThreadsSuspense_experimental as useUserThreads_experimental,\n} from \"./liveblocks\";\n"]}
|