@liveblocks/react 2.18.4-uns2 → 2.20.0-blocknote
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 +5 -7
- package/dist/_private.cjs.map +1 -1
- package/dist/_private.d.cts +2 -2
- package/dist/_private.d.ts +2 -2
- package/dist/_private.js +1 -3
- package/dist/_private.js.map +1 -1
- package/dist/{chunk-EC62ST5F.cjs → chunk-C337YEKB.cjs} +10 -11
- package/dist/{chunk-OVSZW7FP.js.map → chunk-C337YEKB.cjs.map} +1 -1
- package/dist/{chunk-6WL36X3I.js → chunk-HBEGYDXZ.js} +2 -2
- package/dist/{chunk-3Q3PQKVX.cjs → chunk-UBT63VM3.cjs} +2 -2
- package/dist/chunk-UBT63VM3.cjs.map +1 -0
- package/dist/{chunk-OVSZW7FP.js → chunk-URVBSXYW.js} +3 -4
- package/dist/chunk-URVBSXYW.js.map +1 -0
- package/dist/index.cjs +4 -4
- package/dist/index.d.cts +12 -3
- package/dist/index.d.ts +12 -3
- package/dist/index.js +2 -2
- package/dist/{room-1E8LCqCD.d.cts → room-CqmA66N2.d.cts} +39 -44
- package/dist/{room-1E8LCqCD.d.ts → room-CqmA66N2.d.ts} +39 -44
- package/dist/suspense.cjs +4 -4
- package/dist/suspense.d.cts +2 -2
- package/dist/suspense.d.ts +2 -2
- package/dist/suspense.js +2 -2
- package/package.json +3 -3
- package/dist/chunk-3Q3PQKVX.cjs.map +0 -1
- package/dist/chunk-EC62ST5F.cjs.map +0 -1
- /package/dist/{chunk-6WL36X3I.js.map → chunk-HBEGYDXZ.js.map} +0 -0
|
@@ -1,19 +1,9 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { Context, PropsWithChildren, ReactNode } from 'react';
|
|
3
|
-
import { JsonObject, LsonObject, BaseUserMeta, Json, BaseMetadata, Room, LiveObject, User, RoomNotificationSettings, Status, BroadcastOptions, OthersEvent, LostConnectionEvent, History, Client as Client$1, ClientOptions, StorageStatus as StorageStatus$1, ThreadData as ThreadData$1, CommentData as CommentData$1 } from '@liveblocks/client';
|
|
4
1
|
import * as _liveblocks_core from '@liveblocks/core';
|
|
5
|
-
import {
|
|
2
|
+
import { BaseMetadata, StorageStatus, QueryMetadata, AsyncResult, DRI, AsyncSuccess, Resolve, CommentBody, CommentAttachment, PartialUnless, Patchable, InboxNotificationData, UserNotificationSettings, Relax, ToImmutable, PartialUserNotificationSettings, AsyncLoading, AsyncError, ThreadData, HistoryVersion, Client, LiveblocksError, SyncStatus, RoomEventMessage, CommentData, MutableSignal, ThreadDataWithDeleteInfo, ThreadDeleteInfo, DerivedSignal, DefaultMap, OpaqueClient, CommentUserReaction, InboxNotificationDeleteInfo, RoomNotificationSettings as RoomNotificationSettings$1, ISignal, Permission, BaseUserMeta as BaseUserMeta$1, DistributiveOmit, DU, DM, TextEditorType, IYjsProvider, DP, DS, DE } from '@liveblocks/core';
|
|
6
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
* room. Exposed for advanced use cases only.
|
|
11
|
-
*
|
|
12
|
-
* @private This is a private/advanced API. Do not rely on it.
|
|
13
|
-
*/
|
|
14
|
-
declare const RoomContext: react.Context<OpaqueRoom | null>;
|
|
15
|
-
/** @private */
|
|
16
|
-
declare function useRoomOrNull<P extends JsonObject, S extends LsonObject, U extends BaseUserMeta, E extends Json, M extends BaseMetadata>(): Room<P, S, U, E, M> | null;
|
|
4
|
+
import * as react from 'react';
|
|
5
|
+
import { Context, PropsWithChildren, ReactNode } from 'react';
|
|
6
|
+
import { JsonObject, LsonObject, BaseUserMeta, LiveObject, User, Json, RoomNotificationSettings, 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';
|
|
17
7
|
|
|
18
8
|
type UseSyncStatusOptions = {
|
|
19
9
|
/**
|
|
@@ -26,7 +16,7 @@ type UseSyncStatusOptions = {
|
|
|
26
16
|
};
|
|
27
17
|
type UseStorageStatusOptions = UseSyncStatusOptions;
|
|
28
18
|
type StorageStatusSuccess = Exclude<StorageStatus, "not-loaded" | "loading">;
|
|
29
|
-
type ThreadsQuery<M extends BaseMetadata
|
|
19
|
+
type ThreadsQuery<M extends BaseMetadata> = {
|
|
30
20
|
/**
|
|
31
21
|
* Whether to only return threads marked as resolved or unresolved. If not provided,
|
|
32
22
|
* all threads will be returned.
|
|
@@ -38,14 +28,14 @@ type ThreadsQuery<M extends BaseMetadata$1> = {
|
|
|
38
28
|
*/
|
|
39
29
|
metadata?: Partial<QueryMetadata<M>>;
|
|
40
30
|
};
|
|
41
|
-
type UseUserThreadsOptions<M extends BaseMetadata
|
|
31
|
+
type UseUserThreadsOptions<M extends BaseMetadata> = {
|
|
42
32
|
/**
|
|
43
33
|
* The query (including metadata) to filter the threads by. If provided, only threads
|
|
44
34
|
* that match the query will be returned. If not provided, all threads will be returned.
|
|
45
35
|
*/
|
|
46
36
|
query?: ThreadsQuery<M>;
|
|
47
37
|
};
|
|
48
|
-
type UseThreadsOptions<M extends BaseMetadata
|
|
38
|
+
type UseThreadsOptions<M extends BaseMetadata> = {
|
|
49
39
|
/**
|
|
50
40
|
* The query (including metadata) to filter the threads by. If provided, only threads
|
|
51
41
|
* that match the query will be returned. If not provided, all threads will be returned.
|
|
@@ -66,13 +56,13 @@ type RoomInfoAsyncResult = AsyncResult<DRI, "info">;
|
|
|
66
56
|
type RoomInfoAsyncSuccess = AsyncSuccess<DRI, "info">;
|
|
67
57
|
type AttachmentUrlAsyncResult = AsyncResult<string, "url">;
|
|
68
58
|
type AttachmentUrlAsyncSuccess = AsyncSuccess<string, "url">;
|
|
69
|
-
type CreateThreadOptions<M extends BaseMetadata
|
|
59
|
+
type CreateThreadOptions<M extends BaseMetadata> = Resolve<{
|
|
70
60
|
body: CommentBody;
|
|
71
61
|
attachments?: CommentAttachment[];
|
|
72
62
|
} & PartialUnless<M, {
|
|
73
63
|
metadata: M;
|
|
74
64
|
}>>;
|
|
75
|
-
type EditThreadMetadataOptions<M extends BaseMetadata
|
|
65
|
+
type EditThreadMetadataOptions<M extends BaseMetadata> = {
|
|
76
66
|
threadId: string;
|
|
77
67
|
metadata: Patchable<M>;
|
|
78
68
|
};
|
|
@@ -104,8 +94,8 @@ type PaginationFields = {
|
|
|
104
94
|
};
|
|
105
95
|
type PagedAsyncSuccess<T, F extends string> = Resolve<AsyncSuccess<T, F> & PaginationFields>;
|
|
106
96
|
type PagedAsyncResult<T, F extends string> = Relax<AsyncLoading<F> | AsyncError<F> | PagedAsyncSuccess<T, F>>;
|
|
107
|
-
type ThreadsAsyncSuccess<M extends BaseMetadata
|
|
108
|
-
type ThreadsAsyncResult<M extends BaseMetadata
|
|
97
|
+
type ThreadsAsyncSuccess<M extends BaseMetadata> = PagedAsyncSuccess<ThreadData<M>[], "threads">;
|
|
98
|
+
type ThreadsAsyncResult<M extends BaseMetadata> = PagedAsyncResult<ThreadData<M>[], "threads">;
|
|
109
99
|
type InboxNotificationsAsyncSuccess = PagedAsyncSuccess<InboxNotificationData[], "inboxNotifications">;
|
|
110
100
|
type InboxNotificationsAsyncResult = PagedAsyncResult<InboxNotificationData[], "inboxNotifications">;
|
|
111
101
|
type UnreadInboxNotificationsCountAsyncSuccess = AsyncSuccess<number, "count">;
|
|
@@ -268,7 +258,7 @@ type SharedContextBundle<U extends BaseUserMeta> = {
|
|
|
268
258
|
/**
|
|
269
259
|
* Properties that are the same in RoomContext and RoomContext["suspense"].
|
|
270
260
|
*/
|
|
271
|
-
type RoomContextBundleCommon<P extends JsonObject, S extends LsonObject, U extends BaseUserMeta, E extends Json, M extends BaseMetadata
|
|
261
|
+
type RoomContextBundleCommon<P extends JsonObject, S extends LsonObject, U extends BaseUserMeta, E extends Json, M extends BaseMetadata> = {
|
|
272
262
|
/**
|
|
273
263
|
* You normally don't need to directly interact with the RoomContext, but
|
|
274
264
|
* it can be necessary if you're building an advanced app where you need to
|
|
@@ -285,7 +275,12 @@ type RoomContextBundleCommon<P extends JsonObject, S extends LsonObject, U exten
|
|
|
285
275
|
* Returns the Room of the nearest RoomProvider above in the React component
|
|
286
276
|
* tree.
|
|
287
277
|
*/
|
|
288
|
-
useRoom(
|
|
278
|
+
useRoom(options?: {
|
|
279
|
+
allowOutsideRoom: false;
|
|
280
|
+
}): Room<P, S, U, E, M>;
|
|
281
|
+
useRoom(options: {
|
|
282
|
+
allowOutsideRoom: boolean;
|
|
283
|
+
}): Room<P, S, U, E, M> | null;
|
|
289
284
|
/**
|
|
290
285
|
* Returns the current connection status for the Room, and triggers
|
|
291
286
|
* a re-render whenever it changes. Can be used to render a status badge.
|
|
@@ -667,7 +662,7 @@ type RoomContextBundleCommon<P extends JsonObject, S extends LsonObject, U exten
|
|
|
667
662
|
*/
|
|
668
663
|
useThreadSubscription(threadId: string): ThreadSubscription;
|
|
669
664
|
};
|
|
670
|
-
type RoomContextBundle<P extends JsonObject, S extends LsonObject, U extends BaseUserMeta, E extends Json, M extends BaseMetadata
|
|
665
|
+
type RoomContextBundle<P extends JsonObject, S extends LsonObject, U extends BaseUserMeta, E extends Json, M extends BaseMetadata> = Resolve<RoomContextBundleCommon<P, S, U, E, M> & SharedContextBundle<U>["classic"] & {
|
|
671
666
|
/**
|
|
672
667
|
* Returns the current storage status for the Room, and triggers
|
|
673
668
|
* a re-render whenever it changes. Can be used to render a "Saving..."
|
|
@@ -863,7 +858,7 @@ type RoomContextBundle<P extends JsonObject, S extends LsonObject, U extends Bas
|
|
|
863
858
|
/**
|
|
864
859
|
* Properties that are the same in LiveblocksContext and LiveblocksContext["suspense"].
|
|
865
860
|
*/
|
|
866
|
-
type LiveblocksContextBundleCommon<M extends BaseMetadata
|
|
861
|
+
type LiveblocksContextBundleCommon<M extends BaseMetadata> = {
|
|
867
862
|
/**
|
|
868
863
|
* Makes Liveblocks features outside of rooms (e.g. Notifications) available
|
|
869
864
|
* in the component hierarchy below.
|
|
@@ -947,7 +942,7 @@ type LiveblocksContextBundleCommon<M extends BaseMetadata$1> = {
|
|
|
947
942
|
*/
|
|
948
943
|
useSyncStatus(options?: UseSyncStatusOptions): SyncStatus;
|
|
949
944
|
};
|
|
950
|
-
type LiveblocksContextBundle<U extends BaseUserMeta, M extends BaseMetadata
|
|
945
|
+
type LiveblocksContextBundle<U extends BaseUserMeta, M extends BaseMetadata> = Resolve<LiveblocksContextBundleCommon<M> & SharedContextBundle<U>["classic"] & {
|
|
951
946
|
/**
|
|
952
947
|
* Returns the inbox notifications for the current user.
|
|
953
948
|
*
|
|
@@ -1004,7 +999,7 @@ type LiveblocksContextBundle<U extends BaseUserMeta, M extends BaseMetadata$1> =
|
|
|
1004
999
|
}>;
|
|
1005
1000
|
}>;
|
|
1006
1001
|
|
|
1007
|
-
type ReadonlyThreadDB<M extends BaseMetadata
|
|
1002
|
+
type ReadonlyThreadDB<M extends BaseMetadata> = Omit<ThreadDB<M>, "upsert" | "delete" | "signal">;
|
|
1008
1003
|
/**
|
|
1009
1004
|
* This class implements a lightweight, in-memory, "database" for all Thread
|
|
1010
1005
|
* instances.
|
|
@@ -1022,7 +1017,7 @@ type ReadonlyThreadDB<M extends BaseMetadata$1> = Omit<ThreadDB<M>, "upsert" | "
|
|
|
1022
1017
|
* optimistic updates without losing the original thread contents.
|
|
1023
1018
|
*
|
|
1024
1019
|
*/
|
|
1025
|
-
declare class ThreadDB<M extends BaseMetadata
|
|
1020
|
+
declare class ThreadDB<M extends BaseMetadata> {
|
|
1026
1021
|
#private;
|
|
1027
1022
|
readonly signal: MutableSignal<this>;
|
|
1028
1023
|
constructor();
|
|
@@ -1055,8 +1050,8 @@ declare class ThreadDB<M extends BaseMetadata$1> {
|
|
|
1055
1050
|
findMany(roomId: string | undefined, query: ThreadsQuery<M>, direction: "asc" | "desc"): ThreadData<M>[];
|
|
1056
1051
|
}
|
|
1057
1052
|
|
|
1058
|
-
type OptimisticUpdate<M extends BaseMetadata
|
|
1059
|
-
type CreateThreadOptimisticUpdate<M extends BaseMetadata
|
|
1053
|
+
type OptimisticUpdate<M extends BaseMetadata> = CreateThreadOptimisticUpdate<M> | DeleteThreadOptimisticUpdate | EditThreadMetadataOptimisticUpdate<M> | MarkThreadAsResolvedOptimisticUpdate | MarkThreadAsUnresolvedOptimisticUpdate | CreateCommentOptimisticUpdate | EditCommentOptimisticUpdate | DeleteCommentOptimisticUpdate | AddReactionOptimisticUpdate | RemoveReactionOptimisticUpdate | MarkInboxNotificationAsReadOptimisticUpdate | MarkAllInboxNotificationsAsReadOptimisticUpdate | DeleteInboxNotificationOptimisticUpdate | DeleteAllInboxNotificationsOptimisticUpdate | UpdateNotificationSettingsOptimisticUpdate | UpdateUserNotificationSettingsOptimisticUpdate;
|
|
1054
|
+
type CreateThreadOptimisticUpdate<M extends BaseMetadata> = {
|
|
1060
1055
|
type: "create-thread";
|
|
1061
1056
|
id: string;
|
|
1062
1057
|
roomId: string;
|
|
@@ -1069,7 +1064,7 @@ type DeleteThreadOptimisticUpdate = {
|
|
|
1069
1064
|
threadId: string;
|
|
1070
1065
|
deletedAt: Date;
|
|
1071
1066
|
};
|
|
1072
|
-
type EditThreadMetadataOptimisticUpdate<M extends BaseMetadata
|
|
1067
|
+
type EditThreadMetadataOptimisticUpdate<M extends BaseMetadata> = {
|
|
1073
1068
|
type: "edit-thread-metadata";
|
|
1074
1069
|
id: string;
|
|
1075
1070
|
threadId: string;
|
|
@@ -1189,8 +1184,8 @@ type NotificationsLUT = Map<string, InboxNotificationData>;
|
|
|
1189
1184
|
*/
|
|
1190
1185
|
type SettingsByRoomId = Record<RoomId, RoomNotificationSettings$1>;
|
|
1191
1186
|
type PermissionHintsLUT = DefaultMap<RoomId, Set<Permission>>;
|
|
1192
|
-
type CleanThreadifications<M extends BaseMetadata
|
|
1193
|
-
type CleanThreads<M extends BaseMetadata
|
|
1187
|
+
type CleanThreadifications<M extends BaseMetadata> = CleanThreads<M> & CleanNotifications;
|
|
1188
|
+
type CleanThreads<M extends BaseMetadata> = {
|
|
1194
1189
|
/**
|
|
1195
1190
|
* Keep track of loading and error status of all the queries made by the client.
|
|
1196
1191
|
* e.g. 'room-abc-{"color":"red"}' - ok
|
|
@@ -1219,7 +1214,7 @@ declare function createStore_forNotifications(): {
|
|
|
1219
1214
|
updateAssociatedNotification: (newComment: CommentData) => void;
|
|
1220
1215
|
upsert: (notification: InboxNotificationData) => void;
|
|
1221
1216
|
};
|
|
1222
|
-
declare function createStore_forRoomNotificationSettings(updates: ISignal<readonly OptimisticUpdate<BaseMetadata
|
|
1217
|
+
declare function createStore_forRoomNotificationSettings(updates: ISignal<readonly OptimisticUpdate<BaseMetadata>[]>): {
|
|
1223
1218
|
signal: DerivedSignal<SettingsByRoomId>;
|
|
1224
1219
|
update: (roomId: string, settings: RoomNotificationSettings$1) => void;
|
|
1225
1220
|
};
|
|
@@ -1252,16 +1247,16 @@ declare function createStore_forPermissionHints(): {
|
|
|
1252
1247
|
* }
|
|
1253
1248
|
* e.g. {} when before the first successful fetch.
|
|
1254
1249
|
*/
|
|
1255
|
-
declare function createStore_forUserNotificationSettings(updates: ISignal<readonly OptimisticUpdate<BaseMetadata
|
|
1250
|
+
declare function createStore_forUserNotificationSettings(updates: ISignal<readonly OptimisticUpdate<BaseMetadata>[]>): {
|
|
1256
1251
|
signal: DerivedSignal<UserNotificationSettings>;
|
|
1257
1252
|
update: (settings: UserNotificationSettings) => void;
|
|
1258
1253
|
};
|
|
1259
|
-
declare function createStore_forOptimistic<M extends BaseMetadata
|
|
1254
|
+
declare function createStore_forOptimistic<M extends BaseMetadata>(client: Client<BaseUserMeta$1, M>): {
|
|
1260
1255
|
signal: ISignal<readonly OptimisticUpdate<M>[]>;
|
|
1261
1256
|
add: (optimisticUpdate: DistributiveOmit<OptimisticUpdate<M>, "id">) => string;
|
|
1262
1257
|
remove: (optimisticId: string) => void;
|
|
1263
1258
|
};
|
|
1264
|
-
declare class UmbrellaStore<M extends BaseMetadata
|
|
1259
|
+
declare class UmbrellaStore<M extends BaseMetadata> {
|
|
1265
1260
|
#private;
|
|
1266
1261
|
readonly threads: ThreadDB<M>;
|
|
1267
1262
|
readonly notifications: ReturnType<typeof createStore_forNotifications>;
|
|
@@ -1360,7 +1355,7 @@ declare const ClientContext: react.Context<OpaqueClient | null>;
|
|
|
1360
1355
|
*
|
|
1361
1356
|
* @private
|
|
1362
1357
|
*/
|
|
1363
|
-
declare function getUmbrellaStoreForClient<M extends BaseMetadata>(client: OpaqueClient): UmbrellaStore<M>;
|
|
1358
|
+
declare function getUmbrellaStoreForClient<M extends BaseMetadata$1>(client: OpaqueClient): UmbrellaStore<M>;
|
|
1364
1359
|
/**
|
|
1365
1360
|
* @private This is an internal API.
|
|
1366
1361
|
*/
|
|
@@ -1383,7 +1378,7 @@ declare function LiveblocksProvider<U extends BaseUserMeta = DU>(props: PropsWit
|
|
|
1383
1378
|
* LiveblocksProvider created in this way takes no props, because it uses
|
|
1384
1379
|
* settings from the given client instead.
|
|
1385
1380
|
*/
|
|
1386
|
-
declare function createLiveblocksContext<U extends BaseUserMeta = DU, M extends BaseMetadata = DM>(client: OpaqueClient): LiveblocksContextBundle<U, M>;
|
|
1381
|
+
declare function createLiveblocksContext<U extends BaseUserMeta = DU, M extends BaseMetadata$1 = DM>(client: OpaqueClient): LiveblocksContextBundle<U, M>;
|
|
1387
1382
|
/**
|
|
1388
1383
|
* Returns the inbox notifications for the current user.
|
|
1389
1384
|
*
|
|
@@ -1678,9 +1673,9 @@ declare function useOthersConnectionIds(): readonly number[];
|
|
|
1678
1673
|
/**
|
|
1679
1674
|
* @private
|
|
1680
1675
|
*/
|
|
1681
|
-
declare function useCreateRoomThread<M extends BaseMetadata>(roomId: string): (options: CreateThreadOptions<M>) => ThreadData$1<M>;
|
|
1676
|
+
declare function useCreateRoomThread<M extends BaseMetadata$1>(roomId: string): (options: CreateThreadOptions<M>) => ThreadData$1<M>;
|
|
1682
1677
|
declare function useDeleteRoomThread(roomId: string): (threadId: string) => void;
|
|
1683
|
-
declare function useEditRoomThreadMetadata<M extends BaseMetadata>(roomId: string): (options: EditThreadMetadataOptions<M>) => void;
|
|
1678
|
+
declare function useEditRoomThreadMetadata<M extends BaseMetadata$1>(roomId: string): (options: EditThreadMetadataOptions<M>) => void;
|
|
1684
1679
|
/**
|
|
1685
1680
|
* Returns a function that adds a comment to a thread.
|
|
1686
1681
|
*
|
|
@@ -1721,7 +1716,7 @@ declare function useDeleteRoomComment(roomId: string): ({ threadId, commentId }:
|
|
|
1721
1716
|
/**
|
|
1722
1717
|
* @private
|
|
1723
1718
|
*/
|
|
1724
|
-
declare function useAddRoomCommentReaction<M extends BaseMetadata>(roomId: string): ({ threadId, commentId, emoji }: CommentReactionOptions) => void;
|
|
1719
|
+
declare function useAddRoomCommentReaction<M extends BaseMetadata$1>(roomId: string): ({ threadId, commentId, emoji }: CommentReactionOptions) => void;
|
|
1725
1720
|
/**
|
|
1726
1721
|
* Returns a function that removes a reaction on a comment.
|
|
1727
1722
|
*
|
|
@@ -1847,7 +1842,7 @@ declare function useRoomPermissions(roomId: string): Set<unknown>;
|
|
|
1847
1842
|
* that any RoomProvider created in this way does not need to be nested in
|
|
1848
1843
|
* LiveblocksProvider, as it already has access to the client.
|
|
1849
1844
|
*/
|
|
1850
|
-
declare function createRoomContext<P extends JsonObject = DP, S extends LsonObject = DS, U extends BaseUserMeta = DU, E extends Json = DE, M extends BaseMetadata = DM>(client: OpaqueClient): RoomContextBundle<P, S, U, E, M>;
|
|
1845
|
+
declare function createRoomContext<P extends JsonObject = DP, S extends LsonObject = DS, U extends BaseUserMeta = DU, E extends Json = DE, M extends BaseMetadata$1 = DM>(client: OpaqueClient): RoomContextBundle<P, S, U, E, M>;
|
|
1851
1846
|
type TypedBundle = RoomContextBundle<DP, DS, DU, DE, DM>;
|
|
1852
1847
|
/**
|
|
1853
1848
|
* Makes a Room available in the component hierarchy below.
|
|
@@ -2318,4 +2313,4 @@ declare const _useStorageRoot: TypedBundle["useStorageRoot"];
|
|
|
2318
2313
|
*/
|
|
2319
2314
|
declare const _useUpdateMyPresence: TypedBundle["useUpdateMyPresence"];
|
|
2320
2315
|
|
|
2321
|
-
export {
|
|
2316
|
+
export { useLostConnectionListener as $, useErrorListener as A, useMarkAllInboxNotificationsAsRead as B, ClientContext as C, useMarkInboxNotificationAsRead as D, useSyncStatus as E, createRoomContext as F, _RoomProvider as G, _useAddReaction as H, useBatch as I, _useBroadcastEvent as J, useCanRedo as K, LiveblocksProvider as L, type MutationContext as M, useCanUndo as N, useCreateComment as O, _useCreateThread as P, useDeleteComment as Q, _useDeleteThread as R, useEditComment as S, _useEditThreadMetadata as T, type UseStorageStatusOptions as U, useMarkThreadAsResolved as V, useMarkThreadAsUnresolved as W, _useEventListener as X, useHistory as Y, _useIsInsideRoom as Z, _useInboxNotificationThread as _, useAddRoomCommentReaction as a, useMarkThreadAsRead as a0, _useMutation as a1, _useMyPresence as a2, _useOthersListener as a3, useRedo as a4, useRemoveReaction as a5, _useRoom as a6, useStatus as a7, _useStorageRoot as a8, useThreadSubscription as a9, _useSelfSuspense as aA, _useStorageSuspense as aB, useStorageStatusSuspense as aC, _useThreadsSuspense as aD, useAttachmentUrlSuspense as aE, _useHistoryVersionsSuspense as aF, _useRoomNotificationSettingsSuspense as aG, useInboxNotificationsSuspense as aH, useNotificationSettingsSuspense as aI, useRoomInfoSuspense as aJ, useUnreadInboxNotificationsCountSuspense as aK, _useUserSuspense as aL, _useUserThreadsSuspense_experimental as aM, useUndo as aa, _useUpdateMyPresence as ab, useUpdateRoomNotificationSettings as ac, useHistoryVersionData as ad, _useOther as ae, _useOthers as af, useOthersConnectionIds as ag, _useOthersMapped as ah, _useSelf as ai, _useStorage as aj, useStorageStatus as ak, _useThreads as al, useAttachmentUrl as am, _useHistoryVersions as an, _useRoomNotificationSettings as ao, useInboxNotifications as ap, useNotificationSettings as aq, useUpdateNotificationSettings as ar, _useUserThreads_experimental as as, useRoomInfo as at, useUnreadInboxNotificationsCount as au, _useUser as av, _useOtherSuspense as aw, _useOthersSuspense as ax, useOthersConnectionIdsSuspense as ay, _useOthersMappedSuspense 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, useYjsProvider as t, useClientOrNull as u, type UseThreadsOptions as v, createLiveblocksContext as w, useClient as x, useDeleteAllInboxNotifications as y, useDeleteInboxNotification as z };
|
package/dist/suspense.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkUBT63VM3cjs = require('./chunk-UBT63VM3.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -65,12 +65,12 @@ var _chunk3Q3PQKVXcjs = require('./chunk-3Q3PQKVX.cjs');
|
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
|
|
68
|
-
var
|
|
68
|
+
var _chunkC337YEKBcjs = require('./chunk-C337YEKB.cjs');
|
|
69
69
|
|
|
70
70
|
// src/suspense.ts
|
|
71
71
|
var _core = require('@liveblocks/core');
|
|
72
72
|
var _client = require('@liveblocks/client');
|
|
73
|
-
_core.detectDupes.call(void 0,
|
|
73
|
+
_core.detectDupes.call(void 0, _chunkUBT63VM3cjs.PKG_NAME, _chunkUBT63VM3cjs.PKG_VERSION, _chunkUBT63VM3cjs.PKG_FORMAT);
|
|
74
74
|
|
|
75
75
|
|
|
76
76
|
|
|
@@ -135,5 +135,5 @@ _core.detectDupes.call(void 0, _chunk3Q3PQKVXcjs.PKG_NAME, _chunk3Q3PQKVXcjs.PKG
|
|
|
135
135
|
|
|
136
136
|
|
|
137
137
|
|
|
138
|
-
exports.ClientContext =
|
|
138
|
+
exports.ClientContext = _chunkC337YEKBcjs.ClientContext; exports.ClientSideSuspense = _chunkUBT63VM3cjs.ClientSideSuspense; exports.LiveblocksProvider = _chunkC337YEKBcjs.LiveblocksProvider; exports.RoomContext = _chunkC337YEKBcjs.RoomContext; exports.RoomProvider = _chunkC337YEKBcjs._RoomProvider; exports.isNotificationChannelEnabled = _client.isNotificationChannelEnabled; exports.shallow = _client.shallow; exports.useAddReaction = _chunkC337YEKBcjs._useAddReaction; exports.useAttachmentUrl = _chunkC337YEKBcjs.useAttachmentUrlSuspense; exports.useBatch = _chunkC337YEKBcjs.useBatch; exports.useBroadcastEvent = _chunkC337YEKBcjs._useBroadcastEvent; exports.useCanRedo = _chunkC337YEKBcjs.useCanRedo; exports.useCanUndo = _chunkC337YEKBcjs.useCanUndo; exports.useClient = _chunkC337YEKBcjs.useClient; exports.useCreateComment = _chunkC337YEKBcjs.useCreateComment; exports.useCreateThread = _chunkC337YEKBcjs._useCreateThread; exports.useDeleteAllInboxNotifications = _chunkC337YEKBcjs.useDeleteAllInboxNotifications; exports.useDeleteComment = _chunkC337YEKBcjs.useDeleteComment; exports.useDeleteInboxNotification = _chunkC337YEKBcjs.useDeleteInboxNotification; exports.useDeleteThread = _chunkC337YEKBcjs._useDeleteThread; exports.useEditComment = _chunkC337YEKBcjs.useEditComment; exports.useEditThreadMetadata = _chunkC337YEKBcjs._useEditThreadMetadata; exports.useErrorListener = _chunkC337YEKBcjs.useErrorListener; exports.useEventListener = _chunkC337YEKBcjs._useEventListener; exports.useHistory = _chunkC337YEKBcjs.useHistory; exports.useHistoryVersions = _chunkC337YEKBcjs._useHistoryVersionsSuspense; exports.useInboxNotificationThread = _chunkC337YEKBcjs._useInboxNotificationThread; exports.useInboxNotifications = _chunkC337YEKBcjs.useInboxNotificationsSuspense; exports.useIsInsideRoom = _chunkC337YEKBcjs._useIsInsideRoom; exports.useLostConnectionListener = _chunkC337YEKBcjs.useLostConnectionListener; exports.useMarkAllInboxNotificationsAsRead = _chunkC337YEKBcjs.useMarkAllInboxNotificationsAsRead; exports.useMarkInboxNotificationAsRead = _chunkC337YEKBcjs.useMarkInboxNotificationAsRead; exports.useMarkThreadAsRead = _chunkC337YEKBcjs.useMarkThreadAsRead; exports.useMarkThreadAsResolved = _chunkC337YEKBcjs.useMarkThreadAsResolved; exports.useMarkThreadAsUnresolved = _chunkC337YEKBcjs.useMarkThreadAsUnresolved; exports.useMutation = _chunkC337YEKBcjs._useMutation; exports.useMyPresence = _chunkC337YEKBcjs._useMyPresence; exports.useNotificationSettings = _chunkC337YEKBcjs.useNotificationSettingsSuspense; exports.useOther = _chunkC337YEKBcjs._useOtherSuspense; exports.useOthers = _chunkC337YEKBcjs._useOthersSuspense; exports.useOthersConnectionIds = _chunkC337YEKBcjs.useOthersConnectionIdsSuspense; exports.useOthersListener = _chunkC337YEKBcjs._useOthersListener; exports.useOthersMapped = _chunkC337YEKBcjs._useOthersMappedSuspense; exports.useRedo = _chunkC337YEKBcjs.useRedo; exports.useRemoveReaction = _chunkC337YEKBcjs.useRemoveReaction; exports.useRoom = _chunkC337YEKBcjs._useRoom; exports.useRoomInfo = _chunkC337YEKBcjs.useRoomInfoSuspense; exports.useRoomNotificationSettings = _chunkC337YEKBcjs._useRoomNotificationSettingsSuspense; exports.useSelf = _chunkC337YEKBcjs._useSelfSuspense; exports.useStatus = _chunkC337YEKBcjs.useStatus; exports.useStorage = _chunkC337YEKBcjs._useStorageSuspense; exports.useStorageRoot = _chunkC337YEKBcjs._useStorageRoot; exports.useStorageStatus = _chunkC337YEKBcjs.useStorageStatusSuspense; exports.useSyncStatus = _chunkC337YEKBcjs.useSyncStatus; exports.useThreadSubscription = _chunkC337YEKBcjs.useThreadSubscription; exports.useThreads = _chunkC337YEKBcjs._useThreadsSuspense; exports.useUndo = _chunkC337YEKBcjs.useUndo; exports.useUnreadInboxNotificationsCount = _chunkC337YEKBcjs.useUnreadInboxNotificationsCountSuspense; exports.useUpdateMyPresence = _chunkC337YEKBcjs._useUpdateMyPresence; exports.useUpdateNotificationSettings = _chunkC337YEKBcjs.useUpdateNotificationSettings; exports.useUpdateRoomNotificationSettings = _chunkC337YEKBcjs.useUpdateRoomNotificationSettings; exports.useUser = _chunkC337YEKBcjs._useUserSuspense; exports.useUserThreads_experimental = _chunkC337YEKBcjs._useUserThreadsSuspense_experimental;
|
|
139
139
|
//# sourceMappingURL=suspense.cjs.map
|
package/dist/suspense.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { ClientSideSuspense } from './index.cjs';
|
|
2
|
-
export { C as ClientContext, L as LiveblocksProvider, M as MutationContext,
|
|
1
|
+
export { ClientSideSuspense, RoomContext } from './index.cjs';
|
|
2
|
+
export { C as ClientContext, L as LiveblocksProvider, M as MutationContext, G as RoomProvider, U as UseStorageStatusOptions, v as UseThreadsOptions, H as useAddReaction, aE as useAttachmentUrl, I as useBatch, J as useBroadcastEvent, K as useCanRedo, N as useCanUndo, x as useClient, O as useCreateComment, P as useCreateThread, y as useDeleteAllInboxNotifications, Q as useDeleteComment, z as useDeleteInboxNotification, R as useDeleteThread, S as useEditComment, T as useEditThreadMetadata, A as useErrorListener, X as useEventListener, Y as useHistory, aF as useHistoryVersions, _ as useInboxNotificationThread, aH as useInboxNotifications, Z as useIsInsideRoom, $ as useLostConnectionListener, B as useMarkAllInboxNotificationsAsRead, D as useMarkInboxNotificationAsRead, a0 as useMarkThreadAsRead, V as useMarkThreadAsResolved, W as useMarkThreadAsUnresolved, a1 as useMutation, a2 as useMyPresence, aI as useNotificationSettings, aw as useOther, ax as useOthers, ay as useOthersConnectionIds, a3 as useOthersListener, az as useOthersMapped, a4 as useRedo, a5 as useRemoveReaction, a6 as useRoom, aJ as useRoomInfo, aG as useRoomNotificationSettings, aA as useSelf, a7 as useStatus, aB as useStorage, a8 as useStorageRoot, aC as useStorageStatus, E as useSyncStatus, a9 as useThreadSubscription, aD as useThreads, aa as useUndo, aK as useUnreadInboxNotificationsCount, ab as useUpdateMyPresence, ar as useUpdateNotificationSettings, ac as useUpdateRoomNotificationSettings, aL as useUser, aM as useUserThreads_experimental } from './room-CqmA66N2.cjs';
|
|
3
3
|
export { Json, JsonObject, isNotificationChannelEnabled, shallow } from '@liveblocks/client';
|
|
4
4
|
import 'react/jsx-runtime';
|
|
5
5
|
import 'react';
|
package/dist/suspense.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { ClientSideSuspense } from './index.js';
|
|
2
|
-
export { C as ClientContext, L as LiveblocksProvider, M as MutationContext,
|
|
1
|
+
export { ClientSideSuspense, RoomContext } from './index.js';
|
|
2
|
+
export { C as ClientContext, L as LiveblocksProvider, M as MutationContext, G as RoomProvider, U as UseStorageStatusOptions, v as UseThreadsOptions, H as useAddReaction, aE as useAttachmentUrl, I as useBatch, J as useBroadcastEvent, K as useCanRedo, N as useCanUndo, x as useClient, O as useCreateComment, P as useCreateThread, y as useDeleteAllInboxNotifications, Q as useDeleteComment, z as useDeleteInboxNotification, R as useDeleteThread, S as useEditComment, T as useEditThreadMetadata, A as useErrorListener, X as useEventListener, Y as useHistory, aF as useHistoryVersions, _ as useInboxNotificationThread, aH as useInboxNotifications, Z as useIsInsideRoom, $ as useLostConnectionListener, B as useMarkAllInboxNotificationsAsRead, D as useMarkInboxNotificationAsRead, a0 as useMarkThreadAsRead, V as useMarkThreadAsResolved, W as useMarkThreadAsUnresolved, a1 as useMutation, a2 as useMyPresence, aI as useNotificationSettings, aw as useOther, ax as useOthers, ay as useOthersConnectionIds, a3 as useOthersListener, az as useOthersMapped, a4 as useRedo, a5 as useRemoveReaction, a6 as useRoom, aJ as useRoomInfo, aG as useRoomNotificationSettings, aA as useSelf, a7 as useStatus, aB as useStorage, a8 as useStorageRoot, aC as useStorageStatus, E as useSyncStatus, a9 as useThreadSubscription, aD as useThreads, aa as useUndo, aK as useUnreadInboxNotificationsCount, ab as useUpdateMyPresence, ar as useUpdateNotificationSettings, ac as useUpdateRoomNotificationSettings, aL as useUser, aM as useUserThreads_experimental } from './room-CqmA66N2.js';
|
|
3
3
|
export { Json, JsonObject, isNotificationChannelEnabled, shallow } from '@liveblocks/client';
|
|
4
4
|
import 'react/jsx-runtime';
|
|
5
5
|
import 'react';
|
package/dist/suspense.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
PKG_FORMAT,
|
|
4
4
|
PKG_NAME,
|
|
5
5
|
PKG_VERSION
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HBEGYDXZ.js";
|
|
7
7
|
import {
|
|
8
8
|
ClientContext,
|
|
9
9
|
LiveblocksProvider,
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
useUnreadInboxNotificationsCountSuspense,
|
|
66
66
|
useUpdateNotificationSettings,
|
|
67
67
|
useUpdateRoomNotificationSettings
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-URVBSXYW.js";
|
|
69
69
|
|
|
70
70
|
// src/suspense.ts
|
|
71
71
|
import { detectDupes } from "@liveblocks/core";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liveblocks/react",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.20.0-blocknote",
|
|
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": "module",
|
|
@@ -61,8 +61,8 @@
|
|
|
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.
|
|
65
|
-
"@liveblocks/core": "2.
|
|
64
|
+
"@liveblocks/client": "2.20.0-blocknote",
|
|
65
|
+
"@liveblocks/core": "2.20.0-blocknote"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"react": "^18 || ^19 || ^19.0.0-rc"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/liveblocks/liveblocks/packages/liveblocks-react/dist/chunk-3Q3PQKVX.cjs","../src/version.ts","../src/ClientSideSuspense.tsx"],"names":[],"mappings":"AAAA;ACGO,IAAM,SAAA,EAAW,mBAAA;AACjB,IAAM,YAAA,EAAiD,aAAA;AACvD,IAAM,WAAA,EAAgD,KAAA;ADD7D;AACA;AEJA,8BAA8C;AAkC1C,+CAAA;AAVG,SAAS,kBAAA,CAAmB,KAAA,EAAc;AAC/C,EAAA,MAAM,CAAC,OAAA,EAAS,UAAU,EAAA,EAAI,6BAAA,KAAc,CAAA;AAE5C,EAAA,8BAAA,CAAU,EAAA,GAAM;AAGd,IAAA,UAAA,CAAW,IAAI,CAAA;AAAA,EACjB,CAAA,EAAG,CAAC,CAAC,CAAA;AAEL,EAAA,uBACE,6BAAA,eAAC,EAAA,EAAS,QAAA,EAAU,KAAA,CAAM,QAAA,EACvB,QAAA,EAAA,QAAA,EACG,OAAO,KAAA,CAAM,SAAA,IAAa,WAAA,EACxB,KAAA,CAAM,QAAA,CAAS,EAAA,EACf,KAAA,CAAM,SAAA,EACR,KAAA,CAAM,SAAA,CACZ,CAAA;AAEJ;AF5BA;AACA;AACE;AACA;AACA;AACA;AACF,iJAAC","file":"/home/runner/work/liveblocks/liveblocks/packages/liveblocks-react/dist/chunk-3Q3PQKVX.cjs","sourcesContent":[null,"declare const __VERSION__: string;\ndeclare const TSUP_FORMAT: string;\n\nexport const PKG_NAME = \"@liveblocks/react\";\nexport const PKG_VERSION = typeof __VERSION__ === \"string\" && __VERSION__;\nexport const PKG_FORMAT = typeof TSUP_FORMAT === \"string\" && TSUP_FORMAT;\n","import type { ReactNode } from \"react\";\nimport { Suspense, useEffect, useState } from \"react\";\n\ntype Props = {\n fallback: ReactNode;\n children: (() => ReactNode | undefined) | ReactNode | undefined;\n};\n\n/**\n * Almost like a normal <Suspense> component, except that for server-side\n * renders, the fallback will be used.\n *\n * The child props will have to be provided in a function, i.e. change:\n *\n * <Suspense fallback={<Loading />}>\n * <MyRealComponent a={1} />\n * </Suspense>\n *\n * To:\n *\n * <ClientSideSuspense fallback={<Loading />}>\n * <MyRealComponent a={1} />\n * </ClientSideSuspense>\n *\n */\nexport function ClientSideSuspense(props: Props) {\n const [mounted, setMounted] = useState(false);\n\n useEffect(() => {\n // Effects are never executed on the server side. The point of this is to\n // delay the flipping of this boolean until after hydration has happened.\n setMounted(true);\n }, []);\n\n return (\n <Suspense fallback={props.fallback}>\n {mounted\n ? typeof props.children === \"function\"\n ? props.children()\n : props.children\n : props.fallback}\n </Suspense>\n );\n}\n"]}
|