@liveblocks/react 2.1.1-test2 → 2.2.1
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/{chunk-PAHCU5NM.mjs → chunk-BIKCNKTX.mjs} +212 -17
- package/dist/chunk-BIKCNKTX.mjs.map +1 -0
- package/dist/{chunk-KLG2CYJW.js → chunk-ZW45NQYM.js} +211 -16
- package/dist/chunk-ZW45NQYM.js.map +1 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -1
- package/dist/index.mjs.map +1 -1
- package/dist/{suspense-qP2VFyHd.d.mts → suspense-53yNOBIC.d.mts} +62 -46
- package/dist/{suspense-qP2VFyHd.d.ts → suspense-53yNOBIC.d.ts} +62 -46
- package/dist/suspense.d.mts +1 -1
- package/dist/suspense.d.ts +1 -1
- package/dist/suspense.js +7 -3
- package/dist/suspense.js.map +1 -1
- package/dist/suspense.mjs +5 -1
- package/dist/suspense.mjs.map +1 -1
- package/package.json +4 -4
- package/dist/chunk-KLG2CYJW.js.map +0 -1
- package/dist/chunk-PAHCU5NM.mjs.map +0 -1
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.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 {
|
|
1
|
+
{"version":3,"sources":["../src/index.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 createLiveblocksContext,\n useClient,\n useInboxNotificationThread,\n useMarkAllInboxNotificationsAsRead,\n useMarkInboxNotificationAsRead,\n} from \"./liveblocks\";\nexport {\n createRoomContext,\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 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\nexport { useCommentsErrorListener, CreateThreadError } from \"./room\";\nexport { selectedThreads } from \"./comments/lib/selected-threads\";\n\n// Export the classic (non-Suspense) versions of our hooks\n// (This part differs from src/suspense.ts)\nexport {\n useOther,\n useOthers,\n useOthersConnectionIds,\n useOthersMapped,\n useSelf,\n useStorage,\n useStorageStatus,\n useThreads,\n} from \"./room\";\nexport {\n useInboxNotifications,\n useRoomInfo,\n useUnreadInboxNotificationsCount,\n useUser,\n} from \"./liveblocks\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,mBAAmB;AAc5B,SAAS,eAAe;AAXxB,YAAY,UAAU,aAAa,UAAU;","names":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import React__default, { ReactNode, PropsWithChildren } from 'react';
|
|
3
|
-
import { JsonObject, LsonObject, BaseUserMeta, LiveObject, User, Json, RoomNotificationSettings, Room, Status, BroadcastOptions, OthersEvent, LostConnectionEvent, History, Client, BaseMetadata as BaseMetadata$1 } from '@liveblocks/client';
|
|
4
|
-
import { BaseMetadata, CommentBody, Patchable, QueryMetadata, StorageStatus, DRI, InboxNotificationData, Resolve, ToImmutable, ThreadData, LiveblocksError, RoomEventMessage, CommentData, PartialUnless, OpaqueClient, DU, ClientOptions, DM, OpaqueRoom, RoomNotificationSettings as RoomNotificationSettings$1, DP, DS, DE } from '@liveblocks/core';
|
|
3
|
+
import { JsonObject, LsonObject, BaseUserMeta, LiveObject, User, Json, RoomNotificationSettings, Room, Status, BroadcastOptions, OthersEvent, LostConnectionEvent, History, Client as Client$1, BaseMetadata as BaseMetadata$1 } from '@liveblocks/client';
|
|
4
|
+
import { BaseMetadata, CommentBody, Patchable, QueryMetadata, StorageStatus, DRI, InboxNotificationData, Resolve, ToImmutable, ThreadData, Client, LiveblocksError, RoomEventMessage, CommentData, PartialUnless, OpaqueClient, DU, ClientOptions, DM, OpaqueRoom, RoomNotificationSettings as RoomNotificationSettings$1, DP, DS, DE } from '@liveblocks/core';
|
|
5
5
|
|
|
6
6
|
declare type Props = {
|
|
7
7
|
fallback: ReactNode;
|
|
@@ -122,6 +122,15 @@ declare class UpdateNotificationSettingsError extends Error {
|
|
|
122
122
|
}
|
|
123
123
|
declare type CommentsError<M extends BaseMetadata> = CreateThreadError<M> | EditThreadMetadataError<M> | CreateCommentError | EditCommentError | DeleteCommentError | MarkInboxNotificationAsReadError | UpdateNotificationSettingsError;
|
|
124
124
|
|
|
125
|
+
declare type UseStorageStatusOptions = {
|
|
126
|
+
/**
|
|
127
|
+
* When setting smooth, the hook will not update immediately as status
|
|
128
|
+
* changes. This is because in typical applications, these states can change
|
|
129
|
+
* quickly between synchronizing and synchronized. If you use this hook to
|
|
130
|
+
* build a "Saving changes..." style UI, prefer setting `smooth: true`.
|
|
131
|
+
*/
|
|
132
|
+
smooth?: boolean;
|
|
133
|
+
};
|
|
125
134
|
declare type StorageStatusSuccess = Exclude<StorageStatus, "not-loaded" | "loading">;
|
|
126
135
|
declare type UseThreadsOptions<M extends BaseMetadata> = {
|
|
127
136
|
/**
|
|
@@ -129,6 +138,11 @@ declare type UseThreadsOptions<M extends BaseMetadata> = {
|
|
|
129
138
|
* that match the query will be returned. If not provided, all threads will be returned.
|
|
130
139
|
*/
|
|
131
140
|
query?: {
|
|
141
|
+
/**
|
|
142
|
+
* Whether to only return threads marked as resolved or unresolved. If not provided,
|
|
143
|
+
* all threads will be returned.
|
|
144
|
+
*/
|
|
145
|
+
resolved?: boolean;
|
|
132
146
|
/**
|
|
133
147
|
* The metadata to filter the threads by. If provided, only threads with metadata that matches
|
|
134
148
|
* the provided metadata will be returned. If not provided, all threads will be returned.
|
|
@@ -340,6 +354,10 @@ declare type ThreadSubscription = {
|
|
|
340
354
|
};
|
|
341
355
|
declare type SharedContextBundle<U extends BaseUserMeta> = {
|
|
342
356
|
classic: {
|
|
357
|
+
/**
|
|
358
|
+
* Obtains a reference to the current Liveblocks client.
|
|
359
|
+
*/
|
|
360
|
+
useClient(): Client<U>;
|
|
343
361
|
/**
|
|
344
362
|
* Returns user info from a given user ID.
|
|
345
363
|
*
|
|
@@ -356,6 +374,10 @@ declare type SharedContextBundle<U extends BaseUserMeta> = {
|
|
|
356
374
|
useRoomInfo(roomId: string): RoomInfoState;
|
|
357
375
|
};
|
|
358
376
|
suspense: {
|
|
377
|
+
/**
|
|
378
|
+
* Obtains a reference to the current Liveblocks client.
|
|
379
|
+
*/
|
|
380
|
+
useClient(): Client<U>;
|
|
359
381
|
/**
|
|
360
382
|
* Returns user info from a given user ID.
|
|
361
383
|
*
|
|
@@ -702,6 +724,22 @@ declare type RoomContextBundleCommon<P extends JsonObject, S extends LsonObject,
|
|
|
702
724
|
* editThreadMetadata({ threadId: "th_xxx", metadata: {} })
|
|
703
725
|
*/
|
|
704
726
|
useEditThreadMetadata(): (options: EditThreadMetadataOptions<M>) => void;
|
|
727
|
+
/**
|
|
728
|
+
* Returns a function that marks a thread as resolved.
|
|
729
|
+
*
|
|
730
|
+
* @example
|
|
731
|
+
* const markThreadAsResolved = useMarkThreadAsResolved();
|
|
732
|
+
* markThreadAsResolved("th_xxx");
|
|
733
|
+
*/
|
|
734
|
+
useMarkThreadAsResolved(): (threadId: string) => void;
|
|
735
|
+
/**
|
|
736
|
+
* Returns a function that marks a thread as unresolved.
|
|
737
|
+
*
|
|
738
|
+
* @example
|
|
739
|
+
* const markThreadAsUnresolved = useMarkThreadAsUnresolved();
|
|
740
|
+
* markThreadAsUnresolved("th_xxx");
|
|
741
|
+
*/
|
|
742
|
+
useMarkThreadAsUnresolved(): (threadId: string) => void;
|
|
705
743
|
/**
|
|
706
744
|
* Returns a function that adds a comment to a thread.
|
|
707
745
|
*
|
|
@@ -744,8 +782,6 @@ declare type RoomContextBundleCommon<P extends JsonObject, S extends LsonObject,
|
|
|
744
782
|
*/
|
|
745
783
|
useRemoveReaction(): (options: CommentReactionOptions) => void;
|
|
746
784
|
/**
|
|
747
|
-
* @beta
|
|
748
|
-
*
|
|
749
785
|
* Returns a function that updates the user's notification settings
|
|
750
786
|
* for the current room.
|
|
751
787
|
*
|
|
@@ -786,7 +822,7 @@ declare type RoomContextBundle<P extends JsonObject, S extends LsonObject, U ext
|
|
|
786
822
|
* a re-render whenever it changes. Can be used to render a "Saving..."
|
|
787
823
|
* indicator.
|
|
788
824
|
*/
|
|
789
|
-
useStorageStatus(): StorageStatus;
|
|
825
|
+
useStorageStatus(options?: UseStorageStatusOptions): StorageStatus;
|
|
790
826
|
/**
|
|
791
827
|
* Extract arbitrary data from the Liveblocks Storage state, using an
|
|
792
828
|
* arbitrary selector function.
|
|
@@ -849,8 +885,6 @@ declare type RoomContextBundle<P extends JsonObject, S extends LsonObject, U ext
|
|
|
849
885
|
*/
|
|
850
886
|
useThreads(options?: UseThreadsOptions<M>): ThreadsState<M>;
|
|
851
887
|
/**
|
|
852
|
-
* @beta
|
|
853
|
-
*
|
|
854
888
|
* Returns the user's notification settings for the current room
|
|
855
889
|
* and a function to update them.
|
|
856
890
|
*
|
|
@@ -867,7 +901,7 @@ declare type RoomContextBundle<P extends JsonObject, S extends LsonObject, U ext
|
|
|
867
901
|
* a re-render whenever it changes. Can be used to render a "Saving..."
|
|
868
902
|
* indicator.
|
|
869
903
|
*/
|
|
870
|
-
useStorageStatus(): StorageStatusSuccess;
|
|
904
|
+
useStorageStatus(options?: UseStorageStatusOptions): StorageStatusSuccess;
|
|
871
905
|
/**
|
|
872
906
|
* Extract arbitrary data from the Liveblocks Storage state, using an
|
|
873
907
|
* arbitrary selector function.
|
|
@@ -924,8 +958,6 @@ declare type RoomContextBundle<P extends JsonObject, S extends LsonObject, U ext
|
|
|
924
958
|
*/
|
|
925
959
|
useThreads(options?: UseThreadsOptions<M>): ThreadsStateSuccess<M>;
|
|
926
960
|
/**
|
|
927
|
-
* @beta
|
|
928
|
-
*
|
|
929
961
|
* Returns the user's notification settings for the current room
|
|
930
962
|
* and a function to update them.
|
|
931
963
|
*
|
|
@@ -948,8 +980,6 @@ declare type LiveblocksContextBundleCommon<M extends BaseMetadata> = {
|
|
|
948
980
|
*/
|
|
949
981
|
LiveblocksProvider(props: PropsWithChildren): JSX.Element;
|
|
950
982
|
/**
|
|
951
|
-
* @beta
|
|
952
|
-
*
|
|
953
983
|
* Returns a function that marks an inbox notification as read.
|
|
954
984
|
*
|
|
955
985
|
* @example
|
|
@@ -958,8 +988,6 @@ declare type LiveblocksContextBundleCommon<M extends BaseMetadata> = {
|
|
|
958
988
|
*/
|
|
959
989
|
useMarkInboxNotificationAsRead(): (inboxNotificationId: string) => void;
|
|
960
990
|
/**
|
|
961
|
-
* @beta
|
|
962
|
-
*
|
|
963
991
|
* Returns a function that marks all inbox notifications as read.
|
|
964
992
|
*
|
|
965
993
|
* @example
|
|
@@ -968,8 +996,6 @@ declare type LiveblocksContextBundleCommon<M extends BaseMetadata> = {
|
|
|
968
996
|
*/
|
|
969
997
|
useMarkAllInboxNotificationsAsRead(): () => void;
|
|
970
998
|
/**
|
|
971
|
-
* @beta
|
|
972
|
-
*
|
|
973
999
|
* Returns the thread associated with a `"thread"` inbox notification.
|
|
974
1000
|
*
|
|
975
1001
|
* @example
|
|
@@ -979,8 +1005,6 @@ declare type LiveblocksContextBundleCommon<M extends BaseMetadata> = {
|
|
|
979
1005
|
};
|
|
980
1006
|
declare type LiveblocksContextBundle<U extends BaseUserMeta, M extends BaseMetadata> = Resolve<LiveblocksContextBundleCommon<M> & SharedContextBundle<U>["classic"] & {
|
|
981
1007
|
/**
|
|
982
|
-
* @beta
|
|
983
|
-
*
|
|
984
1008
|
* Returns the inbox notifications for the current user.
|
|
985
1009
|
*
|
|
986
1010
|
* @example
|
|
@@ -988,8 +1012,6 @@ declare type LiveblocksContextBundle<U extends BaseUserMeta, M extends BaseMetad
|
|
|
988
1012
|
*/
|
|
989
1013
|
useInboxNotifications(): InboxNotificationsState;
|
|
990
1014
|
/**
|
|
991
|
-
* @beta
|
|
992
|
-
*
|
|
993
1015
|
* Returns the number of unread inbox notifications for the current user.
|
|
994
1016
|
*
|
|
995
1017
|
* @example
|
|
@@ -998,8 +1020,6 @@ declare type LiveblocksContextBundle<U extends BaseUserMeta, M extends BaseMetad
|
|
|
998
1020
|
useUnreadInboxNotificationsCount(): UnreadInboxNotificationsCountState;
|
|
999
1021
|
suspense: Resolve<LiveblocksContextBundleCommon<M> & SharedContextBundle<U>["suspense"] & {
|
|
1000
1022
|
/**
|
|
1001
|
-
* @beta
|
|
1002
|
-
*
|
|
1003
1023
|
* Returns the inbox notifications for the current user.
|
|
1004
1024
|
*
|
|
1005
1025
|
* @example
|
|
@@ -1007,8 +1027,6 @@ declare type LiveblocksContextBundle<U extends BaseUserMeta, M extends BaseMetad
|
|
|
1007
1027
|
*/
|
|
1008
1028
|
useInboxNotifications(): InboxNotificationsStateSuccess;
|
|
1009
1029
|
/**
|
|
1010
|
-
* @beta
|
|
1011
|
-
*
|
|
1012
1030
|
* Returns the number of unread inbox notifications for the current user.
|
|
1013
1031
|
*
|
|
1014
1032
|
* @example
|
|
@@ -1028,7 +1046,7 @@ declare const ClientContext: React__default.Context<OpaqueClient | null>;
|
|
|
1028
1046
|
/**
|
|
1029
1047
|
* Obtains a reference to the current Liveblocks client.
|
|
1030
1048
|
*/
|
|
1031
|
-
declare function useClient<U extends BaseUserMeta>(): Client<U>;
|
|
1049
|
+
declare function useClient<U extends BaseUserMeta>(): Client$1<U>;
|
|
1032
1050
|
/**
|
|
1033
1051
|
* Sets up a client for connecting to Liveblocks, and is the recommended way to do
|
|
1034
1052
|
* this for React apps. You must define either `authEndpoint` or `publicApiKey`.
|
|
@@ -1045,8 +1063,6 @@ declare function LiveblocksProvider<U extends BaseUserMeta = DU>(props: PropsWit
|
|
|
1045
1063
|
*/
|
|
1046
1064
|
declare function createLiveblocksContext<U extends BaseUserMeta = DU, M extends BaseMetadata$1 = DM>(client: OpaqueClient): LiveblocksContextBundle<U, M>;
|
|
1047
1065
|
/**
|
|
1048
|
-
* @beta
|
|
1049
|
-
*
|
|
1050
1066
|
* Returns the inbox notifications for the current user.
|
|
1051
1067
|
*
|
|
1052
1068
|
* @example
|
|
@@ -1054,8 +1070,6 @@ declare function createLiveblocksContext<U extends BaseUserMeta = DU, M extends
|
|
|
1054
1070
|
*/
|
|
1055
1071
|
declare function useInboxNotifications(): InboxNotificationsState;
|
|
1056
1072
|
/**
|
|
1057
|
-
* @beta
|
|
1058
|
-
*
|
|
1059
1073
|
* Returns the inbox notifications for the current user.
|
|
1060
1074
|
*
|
|
1061
1075
|
* @example
|
|
@@ -1063,8 +1077,6 @@ declare function useInboxNotifications(): InboxNotificationsState;
|
|
|
1063
1077
|
*/
|
|
1064
1078
|
declare function useInboxNotificationsSuspense(): InboxNotificationsStateSuccess;
|
|
1065
1079
|
/**
|
|
1066
|
-
* @beta
|
|
1067
|
-
*
|
|
1068
1080
|
* Returns a function that marks all inbox notifications as read.
|
|
1069
1081
|
*
|
|
1070
1082
|
* @example
|
|
@@ -1073,8 +1085,6 @@ declare function useInboxNotificationsSuspense(): InboxNotificationsStateSuccess
|
|
|
1073
1085
|
*/
|
|
1074
1086
|
declare function useMarkAllInboxNotificationsAsRead(): () => void;
|
|
1075
1087
|
/**
|
|
1076
|
-
* @beta
|
|
1077
|
-
*
|
|
1078
1088
|
* Returns a function that marks an inbox notification as read.
|
|
1079
1089
|
*
|
|
1080
1090
|
* @example
|
|
@@ -1083,8 +1093,6 @@ declare function useMarkAllInboxNotificationsAsRead(): () => void;
|
|
|
1083
1093
|
*/
|
|
1084
1094
|
declare function useMarkInboxNotificationAsRead(): (inboxNotificationId: string) => void;
|
|
1085
1095
|
/**
|
|
1086
|
-
* @beta
|
|
1087
|
-
*
|
|
1088
1096
|
* Returns the number of unread inbox notifications for the current user.
|
|
1089
1097
|
*
|
|
1090
1098
|
* @example
|
|
@@ -1092,8 +1100,6 @@ declare function useMarkInboxNotificationAsRead(): (inboxNotificationId: string)
|
|
|
1092
1100
|
*/
|
|
1093
1101
|
declare function useUnreadInboxNotificationsCount(): UnreadInboxNotificationsCountState;
|
|
1094
1102
|
/**
|
|
1095
|
-
* @beta
|
|
1096
|
-
*
|
|
1097
1103
|
* Returns the number of unread inbox notifications for the current user.
|
|
1098
1104
|
*
|
|
1099
1105
|
* @example
|
|
@@ -1116,8 +1122,6 @@ declare function useRoomInfo(roomId: string): RoomInfoState;
|
|
|
1116
1122
|
declare function useRoomInfoSuspense(roomId: string): RoomInfoStateSuccess;
|
|
1117
1123
|
declare type TypedBundle$1 = LiveblocksContextBundle<DU, DM>;
|
|
1118
1124
|
/**
|
|
1119
|
-
* @beta
|
|
1120
|
-
*
|
|
1121
1125
|
* Returns the thread associated with a `"thread"` inbox notification.
|
|
1122
1126
|
*
|
|
1123
1127
|
* @example
|
|
@@ -1156,7 +1160,7 @@ declare function useStatus(): Status;
|
|
|
1156
1160
|
* a re-render whenever it changes. Can be used to render a "Saving..."
|
|
1157
1161
|
* indicator.
|
|
1158
1162
|
*/
|
|
1159
|
-
declare function useStorageStatus(): StorageStatus;
|
|
1163
|
+
declare function useStorageStatus(options?: UseStorageStatusOptions): StorageStatus;
|
|
1160
1164
|
/**
|
|
1161
1165
|
* @deprecated It's recommended to use `useMutation` for writing to Storage,
|
|
1162
1166
|
* which will automatically batch all mutations.
|
|
@@ -1280,6 +1284,22 @@ declare function useRemoveReaction(): ({ threadId, commentId, emoji }: CommentRe
|
|
|
1280
1284
|
* markThreadAsRead("th_xxx");
|
|
1281
1285
|
*/
|
|
1282
1286
|
declare function useMarkThreadAsRead(): (threadId: string) => void;
|
|
1287
|
+
/**
|
|
1288
|
+
* Returns a function that marks a thread as resolved.
|
|
1289
|
+
*
|
|
1290
|
+
* @example
|
|
1291
|
+
* const markThreadAsResolved = useMarkThreadAsResolved();
|
|
1292
|
+
* markThreadAsResolved("th_xxx");
|
|
1293
|
+
*/
|
|
1294
|
+
declare function useMarkThreadAsResolved(): (threadId: string) => void;
|
|
1295
|
+
/**
|
|
1296
|
+
* Returns a function that marks a thread as unresolved.
|
|
1297
|
+
*
|
|
1298
|
+
* @example
|
|
1299
|
+
* const markThreadAsUnresolved = useMarkThreadAsUnresolved();
|
|
1300
|
+
* markThreadAsUnresolved("th_xxx");
|
|
1301
|
+
*/
|
|
1302
|
+
declare function useMarkThreadAsUnresolved(): (threadId: string) => void;
|
|
1283
1303
|
/**
|
|
1284
1304
|
* Returns the subscription status of a thread.
|
|
1285
1305
|
*
|
|
@@ -1288,8 +1308,6 @@ declare function useMarkThreadAsRead(): (threadId: string) => void;
|
|
|
1288
1308
|
*/
|
|
1289
1309
|
declare function useThreadSubscription(threadId: string): ThreadSubscription;
|
|
1290
1310
|
/**
|
|
1291
|
-
* @beta
|
|
1292
|
-
*
|
|
1293
1311
|
* Returns the user's notification settings for the current room
|
|
1294
1312
|
* and a function to update them.
|
|
1295
1313
|
*
|
|
@@ -1301,8 +1319,6 @@ declare function useRoomNotificationSettings(): [
|
|
|
1301
1319
|
(settings: Partial<RoomNotificationSettings$1>) => void
|
|
1302
1320
|
];
|
|
1303
1321
|
/**
|
|
1304
|
-
* @beta
|
|
1305
|
-
*
|
|
1306
1322
|
* Returns a function that updates the user's notification settings
|
|
1307
1323
|
* for the current room.
|
|
1308
1324
|
*
|
|
@@ -1331,7 +1347,7 @@ declare function useOthersConnectionIdsSuspense(): readonly number[];
|
|
|
1331
1347
|
* a re-render whenever it changes. Can be used to render a "Saving..."
|
|
1332
1348
|
* indicator.
|
|
1333
1349
|
*/
|
|
1334
|
-
declare function useStorageStatusSuspense(): StorageStatusSuccess;
|
|
1350
|
+
declare function useStorageStatusSuspense(options?: UseStorageStatusOptions): StorageStatusSuccess;
|
|
1335
1351
|
/**
|
|
1336
1352
|
* Creates a RoomProvider and a set of typed hooks to use in your app. Note
|
|
1337
1353
|
* that any RoomProvider created in this way does not need to be nested in
|
|
@@ -1771,4 +1787,4 @@ declare const _useStorageRoot: TypedBundle["useStorageRoot"];
|
|
|
1771
1787
|
*/
|
|
1772
1788
|
declare const _useUpdateMyPresence: TypedBundle["useUpdateMyPresence"];
|
|
1773
1789
|
|
|
1774
|
-
export {
|
|
1790
|
+
export { useStorageStatus as $, _useMutation as A, _useMyPresence as B, ClientSideSuspense as C, _useOthersListener as D, useRedo as E, useRemoveReaction as F, _useRoom as G, useRoomNotificationSettings as H, useStatus as I, _useStorageRoot as J, useThreadSubscription as K, LiveblocksProvider as L, type MutationContext as M, useUndo as N, _useUpdateMyPresence as O, useUpdateRoomNotificationSettings as P, useCommentsErrorListener as Q, RoomContext as R, CreateThreadError as S, _useOther as T, type UseThreadsOptions as U, _useOthers as V, useOthersConnectionIds as W, _useOthersMapped as X, _useSelf as Y, _useStorage as Z, _useInboxNotificationThread as _, type UseStorageStatusOptions as a, _useThreads as a0, useInboxNotifications as a1, useRoomInfo as a2, useUnreadInboxNotificationsCount as a3, _useUser as a4, _useOtherSuspense as a5, _useOthersSuspense as a6, useOthersConnectionIdsSuspense as a7, _useOthersMappedSuspense as a8, _useSelfSuspense as a9, _useStorageSuspense as aa, useStorageStatusSuspense as ab, _useThreadsSuspense as ac, useInboxNotificationsSuspense as ad, useRoomInfoSuspense as ae, useUnreadInboxNotificationsCountSuspense as af, _useUserSuspense as ag, ClientContext as b, createLiveblocksContext as c, useMarkAllInboxNotificationsAsRead as d, useMarkInboxNotificationAsRead as e, createRoomContext as f, _RoomProvider as g, _useAddReaction as h, useBatch as i, _useBroadcastEvent as j, useCanRedo as k, useCanUndo as l, useCreateComment as m, _useCreateThread as n, useDeleteComment as o, _useDeleteThread as p, useEditComment as q, _useEditThreadMetadata as r, useMarkThreadAsResolved as s, useMarkThreadAsUnresolved as t, useClient as u, useErrorListener as v, _useEventListener as w, useHistory as x, useLostConnectionListener as y, useMarkThreadAsRead as z };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import React__default, { ReactNode, PropsWithChildren } from 'react';
|
|
3
|
-
import { JsonObject, LsonObject, BaseUserMeta, LiveObject, User, Json, RoomNotificationSettings, Room, Status, BroadcastOptions, OthersEvent, LostConnectionEvent, History, Client, BaseMetadata as BaseMetadata$1 } from '@liveblocks/client';
|
|
4
|
-
import { BaseMetadata, CommentBody, Patchable, QueryMetadata, StorageStatus, DRI, InboxNotificationData, Resolve, ToImmutable, ThreadData, LiveblocksError, RoomEventMessage, CommentData, PartialUnless, OpaqueClient, DU, ClientOptions, DM, OpaqueRoom, RoomNotificationSettings as RoomNotificationSettings$1, DP, DS, DE } from '@liveblocks/core';
|
|
3
|
+
import { JsonObject, LsonObject, BaseUserMeta, LiveObject, User, Json, RoomNotificationSettings, Room, Status, BroadcastOptions, OthersEvent, LostConnectionEvent, History, Client as Client$1, BaseMetadata as BaseMetadata$1 } from '@liveblocks/client';
|
|
4
|
+
import { BaseMetadata, CommentBody, Patchable, QueryMetadata, StorageStatus, DRI, InboxNotificationData, Resolve, ToImmutable, ThreadData, Client, LiveblocksError, RoomEventMessage, CommentData, PartialUnless, OpaqueClient, DU, ClientOptions, DM, OpaqueRoom, RoomNotificationSettings as RoomNotificationSettings$1, DP, DS, DE } from '@liveblocks/core';
|
|
5
5
|
|
|
6
6
|
declare type Props = {
|
|
7
7
|
fallback: ReactNode;
|
|
@@ -122,6 +122,15 @@ declare class UpdateNotificationSettingsError extends Error {
|
|
|
122
122
|
}
|
|
123
123
|
declare type CommentsError<M extends BaseMetadata> = CreateThreadError<M> | EditThreadMetadataError<M> | CreateCommentError | EditCommentError | DeleteCommentError | MarkInboxNotificationAsReadError | UpdateNotificationSettingsError;
|
|
124
124
|
|
|
125
|
+
declare type UseStorageStatusOptions = {
|
|
126
|
+
/**
|
|
127
|
+
* When setting smooth, the hook will not update immediately as status
|
|
128
|
+
* changes. This is because in typical applications, these states can change
|
|
129
|
+
* quickly between synchronizing and synchronized. If you use this hook to
|
|
130
|
+
* build a "Saving changes..." style UI, prefer setting `smooth: true`.
|
|
131
|
+
*/
|
|
132
|
+
smooth?: boolean;
|
|
133
|
+
};
|
|
125
134
|
declare type StorageStatusSuccess = Exclude<StorageStatus, "not-loaded" | "loading">;
|
|
126
135
|
declare type UseThreadsOptions<M extends BaseMetadata> = {
|
|
127
136
|
/**
|
|
@@ -129,6 +138,11 @@ declare type UseThreadsOptions<M extends BaseMetadata> = {
|
|
|
129
138
|
* that match the query will be returned. If not provided, all threads will be returned.
|
|
130
139
|
*/
|
|
131
140
|
query?: {
|
|
141
|
+
/**
|
|
142
|
+
* Whether to only return threads marked as resolved or unresolved. If not provided,
|
|
143
|
+
* all threads will be returned.
|
|
144
|
+
*/
|
|
145
|
+
resolved?: boolean;
|
|
132
146
|
/**
|
|
133
147
|
* The metadata to filter the threads by. If provided, only threads with metadata that matches
|
|
134
148
|
* the provided metadata will be returned. If not provided, all threads will be returned.
|
|
@@ -340,6 +354,10 @@ declare type ThreadSubscription = {
|
|
|
340
354
|
};
|
|
341
355
|
declare type SharedContextBundle<U extends BaseUserMeta> = {
|
|
342
356
|
classic: {
|
|
357
|
+
/**
|
|
358
|
+
* Obtains a reference to the current Liveblocks client.
|
|
359
|
+
*/
|
|
360
|
+
useClient(): Client<U>;
|
|
343
361
|
/**
|
|
344
362
|
* Returns user info from a given user ID.
|
|
345
363
|
*
|
|
@@ -356,6 +374,10 @@ declare type SharedContextBundle<U extends BaseUserMeta> = {
|
|
|
356
374
|
useRoomInfo(roomId: string): RoomInfoState;
|
|
357
375
|
};
|
|
358
376
|
suspense: {
|
|
377
|
+
/**
|
|
378
|
+
* Obtains a reference to the current Liveblocks client.
|
|
379
|
+
*/
|
|
380
|
+
useClient(): Client<U>;
|
|
359
381
|
/**
|
|
360
382
|
* Returns user info from a given user ID.
|
|
361
383
|
*
|
|
@@ -702,6 +724,22 @@ declare type RoomContextBundleCommon<P extends JsonObject, S extends LsonObject,
|
|
|
702
724
|
* editThreadMetadata({ threadId: "th_xxx", metadata: {} })
|
|
703
725
|
*/
|
|
704
726
|
useEditThreadMetadata(): (options: EditThreadMetadataOptions<M>) => void;
|
|
727
|
+
/**
|
|
728
|
+
* Returns a function that marks a thread as resolved.
|
|
729
|
+
*
|
|
730
|
+
* @example
|
|
731
|
+
* const markThreadAsResolved = useMarkThreadAsResolved();
|
|
732
|
+
* markThreadAsResolved("th_xxx");
|
|
733
|
+
*/
|
|
734
|
+
useMarkThreadAsResolved(): (threadId: string) => void;
|
|
735
|
+
/**
|
|
736
|
+
* Returns a function that marks a thread as unresolved.
|
|
737
|
+
*
|
|
738
|
+
* @example
|
|
739
|
+
* const markThreadAsUnresolved = useMarkThreadAsUnresolved();
|
|
740
|
+
* markThreadAsUnresolved("th_xxx");
|
|
741
|
+
*/
|
|
742
|
+
useMarkThreadAsUnresolved(): (threadId: string) => void;
|
|
705
743
|
/**
|
|
706
744
|
* Returns a function that adds a comment to a thread.
|
|
707
745
|
*
|
|
@@ -744,8 +782,6 @@ declare type RoomContextBundleCommon<P extends JsonObject, S extends LsonObject,
|
|
|
744
782
|
*/
|
|
745
783
|
useRemoveReaction(): (options: CommentReactionOptions) => void;
|
|
746
784
|
/**
|
|
747
|
-
* @beta
|
|
748
|
-
*
|
|
749
785
|
* Returns a function that updates the user's notification settings
|
|
750
786
|
* for the current room.
|
|
751
787
|
*
|
|
@@ -786,7 +822,7 @@ declare type RoomContextBundle<P extends JsonObject, S extends LsonObject, U ext
|
|
|
786
822
|
* a re-render whenever it changes. Can be used to render a "Saving..."
|
|
787
823
|
* indicator.
|
|
788
824
|
*/
|
|
789
|
-
useStorageStatus(): StorageStatus;
|
|
825
|
+
useStorageStatus(options?: UseStorageStatusOptions): StorageStatus;
|
|
790
826
|
/**
|
|
791
827
|
* Extract arbitrary data from the Liveblocks Storage state, using an
|
|
792
828
|
* arbitrary selector function.
|
|
@@ -849,8 +885,6 @@ declare type RoomContextBundle<P extends JsonObject, S extends LsonObject, U ext
|
|
|
849
885
|
*/
|
|
850
886
|
useThreads(options?: UseThreadsOptions<M>): ThreadsState<M>;
|
|
851
887
|
/**
|
|
852
|
-
* @beta
|
|
853
|
-
*
|
|
854
888
|
* Returns the user's notification settings for the current room
|
|
855
889
|
* and a function to update them.
|
|
856
890
|
*
|
|
@@ -867,7 +901,7 @@ declare type RoomContextBundle<P extends JsonObject, S extends LsonObject, U ext
|
|
|
867
901
|
* a re-render whenever it changes. Can be used to render a "Saving..."
|
|
868
902
|
* indicator.
|
|
869
903
|
*/
|
|
870
|
-
useStorageStatus(): StorageStatusSuccess;
|
|
904
|
+
useStorageStatus(options?: UseStorageStatusOptions): StorageStatusSuccess;
|
|
871
905
|
/**
|
|
872
906
|
* Extract arbitrary data from the Liveblocks Storage state, using an
|
|
873
907
|
* arbitrary selector function.
|
|
@@ -924,8 +958,6 @@ declare type RoomContextBundle<P extends JsonObject, S extends LsonObject, U ext
|
|
|
924
958
|
*/
|
|
925
959
|
useThreads(options?: UseThreadsOptions<M>): ThreadsStateSuccess<M>;
|
|
926
960
|
/**
|
|
927
|
-
* @beta
|
|
928
|
-
*
|
|
929
961
|
* Returns the user's notification settings for the current room
|
|
930
962
|
* and a function to update them.
|
|
931
963
|
*
|
|
@@ -948,8 +980,6 @@ declare type LiveblocksContextBundleCommon<M extends BaseMetadata> = {
|
|
|
948
980
|
*/
|
|
949
981
|
LiveblocksProvider(props: PropsWithChildren): JSX.Element;
|
|
950
982
|
/**
|
|
951
|
-
* @beta
|
|
952
|
-
*
|
|
953
983
|
* Returns a function that marks an inbox notification as read.
|
|
954
984
|
*
|
|
955
985
|
* @example
|
|
@@ -958,8 +988,6 @@ declare type LiveblocksContextBundleCommon<M extends BaseMetadata> = {
|
|
|
958
988
|
*/
|
|
959
989
|
useMarkInboxNotificationAsRead(): (inboxNotificationId: string) => void;
|
|
960
990
|
/**
|
|
961
|
-
* @beta
|
|
962
|
-
*
|
|
963
991
|
* Returns a function that marks all inbox notifications as read.
|
|
964
992
|
*
|
|
965
993
|
* @example
|
|
@@ -968,8 +996,6 @@ declare type LiveblocksContextBundleCommon<M extends BaseMetadata> = {
|
|
|
968
996
|
*/
|
|
969
997
|
useMarkAllInboxNotificationsAsRead(): () => void;
|
|
970
998
|
/**
|
|
971
|
-
* @beta
|
|
972
|
-
*
|
|
973
999
|
* Returns the thread associated with a `"thread"` inbox notification.
|
|
974
1000
|
*
|
|
975
1001
|
* @example
|
|
@@ -979,8 +1005,6 @@ declare type LiveblocksContextBundleCommon<M extends BaseMetadata> = {
|
|
|
979
1005
|
};
|
|
980
1006
|
declare type LiveblocksContextBundle<U extends BaseUserMeta, M extends BaseMetadata> = Resolve<LiveblocksContextBundleCommon<M> & SharedContextBundle<U>["classic"] & {
|
|
981
1007
|
/**
|
|
982
|
-
* @beta
|
|
983
|
-
*
|
|
984
1008
|
* Returns the inbox notifications for the current user.
|
|
985
1009
|
*
|
|
986
1010
|
* @example
|
|
@@ -988,8 +1012,6 @@ declare type LiveblocksContextBundle<U extends BaseUserMeta, M extends BaseMetad
|
|
|
988
1012
|
*/
|
|
989
1013
|
useInboxNotifications(): InboxNotificationsState;
|
|
990
1014
|
/**
|
|
991
|
-
* @beta
|
|
992
|
-
*
|
|
993
1015
|
* Returns the number of unread inbox notifications for the current user.
|
|
994
1016
|
*
|
|
995
1017
|
* @example
|
|
@@ -998,8 +1020,6 @@ declare type LiveblocksContextBundle<U extends BaseUserMeta, M extends BaseMetad
|
|
|
998
1020
|
useUnreadInboxNotificationsCount(): UnreadInboxNotificationsCountState;
|
|
999
1021
|
suspense: Resolve<LiveblocksContextBundleCommon<M> & SharedContextBundle<U>["suspense"] & {
|
|
1000
1022
|
/**
|
|
1001
|
-
* @beta
|
|
1002
|
-
*
|
|
1003
1023
|
* Returns the inbox notifications for the current user.
|
|
1004
1024
|
*
|
|
1005
1025
|
* @example
|
|
@@ -1007,8 +1027,6 @@ declare type LiveblocksContextBundle<U extends BaseUserMeta, M extends BaseMetad
|
|
|
1007
1027
|
*/
|
|
1008
1028
|
useInboxNotifications(): InboxNotificationsStateSuccess;
|
|
1009
1029
|
/**
|
|
1010
|
-
* @beta
|
|
1011
|
-
*
|
|
1012
1030
|
* Returns the number of unread inbox notifications for the current user.
|
|
1013
1031
|
*
|
|
1014
1032
|
* @example
|
|
@@ -1028,7 +1046,7 @@ declare const ClientContext: React__default.Context<OpaqueClient | null>;
|
|
|
1028
1046
|
/**
|
|
1029
1047
|
* Obtains a reference to the current Liveblocks client.
|
|
1030
1048
|
*/
|
|
1031
|
-
declare function useClient<U extends BaseUserMeta>(): Client<U>;
|
|
1049
|
+
declare function useClient<U extends BaseUserMeta>(): Client$1<U>;
|
|
1032
1050
|
/**
|
|
1033
1051
|
* Sets up a client for connecting to Liveblocks, and is the recommended way to do
|
|
1034
1052
|
* this for React apps. You must define either `authEndpoint` or `publicApiKey`.
|
|
@@ -1045,8 +1063,6 @@ declare function LiveblocksProvider<U extends BaseUserMeta = DU>(props: PropsWit
|
|
|
1045
1063
|
*/
|
|
1046
1064
|
declare function createLiveblocksContext<U extends BaseUserMeta = DU, M extends BaseMetadata$1 = DM>(client: OpaqueClient): LiveblocksContextBundle<U, M>;
|
|
1047
1065
|
/**
|
|
1048
|
-
* @beta
|
|
1049
|
-
*
|
|
1050
1066
|
* Returns the inbox notifications for the current user.
|
|
1051
1067
|
*
|
|
1052
1068
|
* @example
|
|
@@ -1054,8 +1070,6 @@ declare function createLiveblocksContext<U extends BaseUserMeta = DU, M extends
|
|
|
1054
1070
|
*/
|
|
1055
1071
|
declare function useInboxNotifications(): InboxNotificationsState;
|
|
1056
1072
|
/**
|
|
1057
|
-
* @beta
|
|
1058
|
-
*
|
|
1059
1073
|
* Returns the inbox notifications for the current user.
|
|
1060
1074
|
*
|
|
1061
1075
|
* @example
|
|
@@ -1063,8 +1077,6 @@ declare function useInboxNotifications(): InboxNotificationsState;
|
|
|
1063
1077
|
*/
|
|
1064
1078
|
declare function useInboxNotificationsSuspense(): InboxNotificationsStateSuccess;
|
|
1065
1079
|
/**
|
|
1066
|
-
* @beta
|
|
1067
|
-
*
|
|
1068
1080
|
* Returns a function that marks all inbox notifications as read.
|
|
1069
1081
|
*
|
|
1070
1082
|
* @example
|
|
@@ -1073,8 +1085,6 @@ declare function useInboxNotificationsSuspense(): InboxNotificationsStateSuccess
|
|
|
1073
1085
|
*/
|
|
1074
1086
|
declare function useMarkAllInboxNotificationsAsRead(): () => void;
|
|
1075
1087
|
/**
|
|
1076
|
-
* @beta
|
|
1077
|
-
*
|
|
1078
1088
|
* Returns a function that marks an inbox notification as read.
|
|
1079
1089
|
*
|
|
1080
1090
|
* @example
|
|
@@ -1083,8 +1093,6 @@ declare function useMarkAllInboxNotificationsAsRead(): () => void;
|
|
|
1083
1093
|
*/
|
|
1084
1094
|
declare function useMarkInboxNotificationAsRead(): (inboxNotificationId: string) => void;
|
|
1085
1095
|
/**
|
|
1086
|
-
* @beta
|
|
1087
|
-
*
|
|
1088
1096
|
* Returns the number of unread inbox notifications for the current user.
|
|
1089
1097
|
*
|
|
1090
1098
|
* @example
|
|
@@ -1092,8 +1100,6 @@ declare function useMarkInboxNotificationAsRead(): (inboxNotificationId: string)
|
|
|
1092
1100
|
*/
|
|
1093
1101
|
declare function useUnreadInboxNotificationsCount(): UnreadInboxNotificationsCountState;
|
|
1094
1102
|
/**
|
|
1095
|
-
* @beta
|
|
1096
|
-
*
|
|
1097
1103
|
* Returns the number of unread inbox notifications for the current user.
|
|
1098
1104
|
*
|
|
1099
1105
|
* @example
|
|
@@ -1116,8 +1122,6 @@ declare function useRoomInfo(roomId: string): RoomInfoState;
|
|
|
1116
1122
|
declare function useRoomInfoSuspense(roomId: string): RoomInfoStateSuccess;
|
|
1117
1123
|
declare type TypedBundle$1 = LiveblocksContextBundle<DU, DM>;
|
|
1118
1124
|
/**
|
|
1119
|
-
* @beta
|
|
1120
|
-
*
|
|
1121
1125
|
* Returns the thread associated with a `"thread"` inbox notification.
|
|
1122
1126
|
*
|
|
1123
1127
|
* @example
|
|
@@ -1156,7 +1160,7 @@ declare function useStatus(): Status;
|
|
|
1156
1160
|
* a re-render whenever it changes. Can be used to render a "Saving..."
|
|
1157
1161
|
* indicator.
|
|
1158
1162
|
*/
|
|
1159
|
-
declare function useStorageStatus(): StorageStatus;
|
|
1163
|
+
declare function useStorageStatus(options?: UseStorageStatusOptions): StorageStatus;
|
|
1160
1164
|
/**
|
|
1161
1165
|
* @deprecated It's recommended to use `useMutation` for writing to Storage,
|
|
1162
1166
|
* which will automatically batch all mutations.
|
|
@@ -1280,6 +1284,22 @@ declare function useRemoveReaction(): ({ threadId, commentId, emoji }: CommentRe
|
|
|
1280
1284
|
* markThreadAsRead("th_xxx");
|
|
1281
1285
|
*/
|
|
1282
1286
|
declare function useMarkThreadAsRead(): (threadId: string) => void;
|
|
1287
|
+
/**
|
|
1288
|
+
* Returns a function that marks a thread as resolved.
|
|
1289
|
+
*
|
|
1290
|
+
* @example
|
|
1291
|
+
* const markThreadAsResolved = useMarkThreadAsResolved();
|
|
1292
|
+
* markThreadAsResolved("th_xxx");
|
|
1293
|
+
*/
|
|
1294
|
+
declare function useMarkThreadAsResolved(): (threadId: string) => void;
|
|
1295
|
+
/**
|
|
1296
|
+
* Returns a function that marks a thread as unresolved.
|
|
1297
|
+
*
|
|
1298
|
+
* @example
|
|
1299
|
+
* const markThreadAsUnresolved = useMarkThreadAsUnresolved();
|
|
1300
|
+
* markThreadAsUnresolved("th_xxx");
|
|
1301
|
+
*/
|
|
1302
|
+
declare function useMarkThreadAsUnresolved(): (threadId: string) => void;
|
|
1283
1303
|
/**
|
|
1284
1304
|
* Returns the subscription status of a thread.
|
|
1285
1305
|
*
|
|
@@ -1288,8 +1308,6 @@ declare function useMarkThreadAsRead(): (threadId: string) => void;
|
|
|
1288
1308
|
*/
|
|
1289
1309
|
declare function useThreadSubscription(threadId: string): ThreadSubscription;
|
|
1290
1310
|
/**
|
|
1291
|
-
* @beta
|
|
1292
|
-
*
|
|
1293
1311
|
* Returns the user's notification settings for the current room
|
|
1294
1312
|
* and a function to update them.
|
|
1295
1313
|
*
|
|
@@ -1301,8 +1319,6 @@ declare function useRoomNotificationSettings(): [
|
|
|
1301
1319
|
(settings: Partial<RoomNotificationSettings$1>) => void
|
|
1302
1320
|
];
|
|
1303
1321
|
/**
|
|
1304
|
-
* @beta
|
|
1305
|
-
*
|
|
1306
1322
|
* Returns a function that updates the user's notification settings
|
|
1307
1323
|
* for the current room.
|
|
1308
1324
|
*
|
|
@@ -1331,7 +1347,7 @@ declare function useOthersConnectionIdsSuspense(): readonly number[];
|
|
|
1331
1347
|
* a re-render whenever it changes. Can be used to render a "Saving..."
|
|
1332
1348
|
* indicator.
|
|
1333
1349
|
*/
|
|
1334
|
-
declare function useStorageStatusSuspense(): StorageStatusSuccess;
|
|
1350
|
+
declare function useStorageStatusSuspense(options?: UseStorageStatusOptions): StorageStatusSuccess;
|
|
1335
1351
|
/**
|
|
1336
1352
|
* Creates a RoomProvider and a set of typed hooks to use in your app. Note
|
|
1337
1353
|
* that any RoomProvider created in this way does not need to be nested in
|
|
@@ -1771,4 +1787,4 @@ declare const _useStorageRoot: TypedBundle["useStorageRoot"];
|
|
|
1771
1787
|
*/
|
|
1772
1788
|
declare const _useUpdateMyPresence: TypedBundle["useUpdateMyPresence"];
|
|
1773
1789
|
|
|
1774
|
-
export {
|
|
1790
|
+
export { useStorageStatus as $, _useMutation as A, _useMyPresence as B, ClientSideSuspense as C, _useOthersListener as D, useRedo as E, useRemoveReaction as F, _useRoom as G, useRoomNotificationSettings as H, useStatus as I, _useStorageRoot as J, useThreadSubscription as K, LiveblocksProvider as L, type MutationContext as M, useUndo as N, _useUpdateMyPresence as O, useUpdateRoomNotificationSettings as P, useCommentsErrorListener as Q, RoomContext as R, CreateThreadError as S, _useOther as T, type UseThreadsOptions as U, _useOthers as V, useOthersConnectionIds as W, _useOthersMapped as X, _useSelf as Y, _useStorage as Z, _useInboxNotificationThread as _, type UseStorageStatusOptions as a, _useThreads as a0, useInboxNotifications as a1, useRoomInfo as a2, useUnreadInboxNotificationsCount as a3, _useUser as a4, _useOtherSuspense as a5, _useOthersSuspense as a6, useOthersConnectionIdsSuspense as a7, _useOthersMappedSuspense as a8, _useSelfSuspense as a9, _useStorageSuspense as aa, useStorageStatusSuspense as ab, _useThreadsSuspense as ac, useInboxNotificationsSuspense as ad, useRoomInfoSuspense as ae, useUnreadInboxNotificationsCountSuspense as af, _useUserSuspense as ag, ClientContext as b, createLiveblocksContext as c, useMarkAllInboxNotificationsAsRead as d, useMarkInboxNotificationAsRead as e, createRoomContext as f, _RoomProvider as g, _useAddReaction as h, useBatch as i, _useBroadcastEvent as j, useCanRedo as k, useCanUndo as l, useCreateComment as m, _useCreateThread as n, useDeleteComment as o, _useDeleteThread as p, useEditComment as q, _useEditThreadMetadata as r, useMarkThreadAsResolved as s, useMarkThreadAsUnresolved as t, useClient as u, useErrorListener as v, _useEventListener as w, useHistory as x, useLostConnectionListener as y, useMarkThreadAsRead as z };
|
package/dist/suspense.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { b as ClientContext, C as ClientSideSuspense, L as LiveblocksProvider, M as MutationContext, R as RoomContext, g as RoomProvider, a as UseStorageStatusOptions, U as UseThreadsOptions, h as useAddReaction, i as useBatch, j as useBroadcastEvent, k as useCanRedo, l as useCanUndo, u as useClient, m as useCreateComment, n as useCreateThread, o as useDeleteComment, p as useDeleteThread, q as useEditComment, r as useEditThreadMetadata, v as useErrorListener, w as useEventListener, x as useHistory, _ as useInboxNotificationThread, ad as useInboxNotifications, y as useLostConnectionListener, d as useMarkAllInboxNotificationsAsRead, e as useMarkInboxNotificationAsRead, z as useMarkThreadAsRead, s as useMarkThreadAsResolved, t as useMarkThreadAsUnresolved, A as useMutation, B as useMyPresence, a5 as useOther, a6 as useOthers, a7 as useOthersConnectionIds, D as useOthersListener, a8 as useOthersMapped, E as useRedo, F as useRemoveReaction, G as useRoom, ae as useRoomInfo, H as useRoomNotificationSettings, a9 as useSelf, I as useStatus, aa as useStorage, J as useStorageRoot, ab as useStorageStatus, K as useThreadSubscription, ac as useThreads, N as useUndo, af as useUnreadInboxNotificationsCount, O as useUpdateMyPresence, P as useUpdateRoomNotificationSettings, ag as useUser } from './suspense-53yNOBIC.mjs';
|
|
2
2
|
export { Json, JsonObject, shallow } from '@liveblocks/client';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '@liveblocks/core';
|