@liveblocks/react 2.14.0 → 2.15.0-debug1
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.d.mts +10 -4
- package/dist/_private.d.ts +10 -4
- package/dist/_private.js +27 -14
- package/dist/_private.js.map +1 -1
- package/dist/_private.mjs +30 -17
- package/dist/_private.mjs.map +1 -1
- package/dist/chunk-A4ABDZ5E.mjs +23 -0
- package/dist/chunk-A4ABDZ5E.mjs.map +1 -0
- package/dist/{chunk-X4DDEZYL.js → chunk-KY7WMVMG.js} +673 -458
- package/dist/chunk-KY7WMVMG.js.map +1 -0
- package/dist/chunk-MI7M3UBZ.js +23 -0
- package/dist/chunk-MI7M3UBZ.js.map +1 -0
- package/dist/{chunk-BRCWZCNY.mjs → chunk-UJLD6FYC.mjs} +682 -467
- package/dist/chunk-UJLD6FYC.mjs.map +1 -0
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +4 -4
- package/dist/index.mjs +2 -2
- package/dist/{room-Rl_QnQMY.d.mts → room-C_NzlTZP.d.mts} +69 -90
- package/dist/{room-Rl_QnQMY.d.ts → room-C_NzlTZP.d.ts} +69 -90
- package/dist/suspense.d.mts +2 -1
- package/dist/suspense.d.ts +2 -1
- package/dist/suspense.js +4 -4
- package/dist/suspense.mjs +2 -2
- package/package.json +4 -6
- package/dist/chunk-BRCWZCNY.mjs.map +0 -1
- package/dist/chunk-IQJWVOHM.mjs +0 -22
- package/dist/chunk-IQJWVOHM.mjs.map +0 -1
- package/dist/chunk-L2RWXPYA.js +0 -22
- package/dist/chunk-L2RWXPYA.js.map +0 -1
- package/dist/chunk-X4DDEZYL.js.map +0 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import { Context, PropsWithChildren, ReactNode } from 'react';
|
|
1
4
|
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';
|
|
2
5
|
import * as _liveblocks_core from '@liveblocks/core';
|
|
3
|
-
import { BaseMetadata, CommentBody, Patchable, StorageStatus, QueryMetadata, AsyncResult, DRI, AsyncSuccess, Resolve, CommentAttachment, PartialUnless, InboxNotificationData, ToImmutable, AsyncLoading, AsyncError, ThreadData, HistoryVersion, Client, SyncStatus, LiveblocksError, RoomEventMessage, CommentData, ThreadDataWithDeleteInfo,
|
|
4
|
-
import * as React$1 from 'react';
|
|
5
|
-
import React__default, { PropsWithChildren } from 'react';
|
|
6
|
+
import { BaseMetadata, CommentBody, Patchable, StorageStatus, QueryMetadata, AsyncResult, DRI, AsyncSuccess, Resolve, CommentAttachment, PartialUnless, InboxNotificationData, ToImmutable, AsyncLoading, AsyncError, ThreadData, HistoryVersion, Client, SyncStatus, LiveblocksError, RoomEventMessage, CommentData, MutableSignal, ThreadDataWithDeleteInfo, Signal, DerivedSignal, OpaqueClient, CommentUserReaction, ThreadDeleteInfo, InboxNotificationDeleteInfo, RoomNotificationSettings as RoomNotificationSettings$1, DistributiveOmit, Permission, DU, DM, OpaqueRoom, TextEditorType, IYjsProvider, DP, DS, DE } from '@liveblocks/core';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* @private Internal API, do not rely on it.
|
|
@@ -232,7 +233,7 @@ declare type RoomProviderProps<P extends JsonObject, S extends LsonObject> = Res
|
|
|
232
233
|
* The id of the room you want to connect to
|
|
233
234
|
*/
|
|
234
235
|
id: string;
|
|
235
|
-
children:
|
|
236
|
+
children: ReactNode;
|
|
236
237
|
/**
|
|
237
238
|
* Whether or not the room should connect to Liveblocks servers
|
|
238
239
|
* when the RoomProvider is rendered.
|
|
@@ -242,21 +243,6 @@ declare type RoomProviderProps<P extends JsonObject, S extends LsonObject> = Res
|
|
|
242
243
|
* only on the client side.
|
|
243
244
|
*/
|
|
244
245
|
autoConnect?: boolean;
|
|
245
|
-
/**
|
|
246
|
-
* If you're on React 17 or lower, pass in a reference to
|
|
247
|
-
* `ReactDOM.unstable_batchedUpdates` or
|
|
248
|
-
* `ReactNative.unstable_batchedUpdates` here.
|
|
249
|
-
*
|
|
250
|
-
* @example
|
|
251
|
-
* import { unstable_batchedUpdates } from "react-dom";
|
|
252
|
-
*
|
|
253
|
-
* <RoomProvider ... unstable_batchedUpdates={unstable_batchedUpdates} />
|
|
254
|
-
*
|
|
255
|
-
* This will prevent you from running into the so-called "stale props"
|
|
256
|
-
* and/or "zombie child" problem that React 17 and lower can suffer from.
|
|
257
|
-
* Not necessary when you're on React v18 or later.
|
|
258
|
-
*/
|
|
259
|
-
unstable_batchedUpdates?: (cb: () => void) => void;
|
|
260
246
|
} & PartialUnless<P, {
|
|
261
247
|
/**
|
|
262
248
|
* The initial Presence to use and announce when you enter the Room. The
|
|
@@ -379,7 +365,7 @@ declare type RoomContextBundleCommon<P extends JsonObject, S extends LsonObject,
|
|
|
379
365
|
* it can be necessary if you're building an advanced app where you need to
|
|
380
366
|
* set up a context bridge between two React renderers.
|
|
381
367
|
*/
|
|
382
|
-
RoomContext:
|
|
368
|
+
RoomContext: Context<Room<P, S, U, E, M> | null>;
|
|
383
369
|
/**
|
|
384
370
|
* Makes a Room available in the component hierarchy below.
|
|
385
371
|
* Joins the room when the component is mounted, and automatically leaves
|
|
@@ -1101,7 +1087,7 @@ declare type LiveblocksContextBundle<U extends BaseUserMeta, M extends BaseMetad
|
|
|
1101
1087
|
}>;
|
|
1102
1088
|
}>;
|
|
1103
1089
|
|
|
1104
|
-
declare type ReadonlyThreadDB<M extends BaseMetadata> = Omit<ThreadDB<M>, "upsert" | "delete">;
|
|
1090
|
+
declare type ReadonlyThreadDB<M extends BaseMetadata> = Omit<ThreadDB<M>, "upsert" | "delete" | "signal">;
|
|
1105
1091
|
/**
|
|
1106
1092
|
* This class implements a lightweight, in-memory, "database" for all Thread
|
|
1107
1093
|
* instances.
|
|
@@ -1120,14 +1106,10 @@ declare type ReadonlyThreadDB<M extends BaseMetadata> = Omit<ThreadDB<M>, "upser
|
|
|
1120
1106
|
*
|
|
1121
1107
|
*/
|
|
1122
1108
|
declare class ThreadDB<M extends BaseMetadata> {
|
|
1123
|
-
private
|
|
1124
|
-
|
|
1125
|
-
private _desc;
|
|
1126
|
-
private _version;
|
|
1109
|
+
#private;
|
|
1110
|
+
readonly signal: MutableSignal<this>;
|
|
1127
1111
|
constructor();
|
|
1128
1112
|
clone(): ThreadDB<M>;
|
|
1129
|
-
/** Gets the transaction count for this DB. Increments any time the DB is modified. */
|
|
1130
|
-
get version(): number;
|
|
1131
1113
|
/** Returns an existing thread by ID. Will never return a deleted thread. */
|
|
1132
1114
|
get(threadId: string): ThreadData<M> | undefined;
|
|
1133
1115
|
/** Returns the (possibly deleted) thread by ID. */
|
|
@@ -1153,7 +1135,6 @@ declare class ThreadDB<M extends BaseMetadata> {
|
|
|
1153
1135
|
* Will never return deleted threads in the result.
|
|
1154
1136
|
*/
|
|
1155
1137
|
findMany(roomId: string | undefined, query: ThreadsQuery<M>, direction: "asc" | "desc"): ThreadData<M>[];
|
|
1156
|
-
private touch;
|
|
1157
1138
|
}
|
|
1158
1139
|
|
|
1159
1140
|
declare type OptimisticUpdate<M extends BaseMetadata> = CreateThreadOptimisticUpdate<M> | DeleteThreadOptimisticUpdate | EditThreadMetadataOptimisticUpdate<M> | MarkThreadAsResolvedOptimisticUpdate | MarkThreadAsUnresolvedOptimisticUpdate | CreateCommentOptimisticUpdate | EditCommentOptimisticUpdate | DeleteCommentOptimisticUpdate | AddReactionOptimisticUpdate | RemoveReactionOptimisticUpdate | MarkInboxNotificationAsReadOptimisticUpdate | MarkAllInboxNotificationsAsReadOptimisticUpdate | DeleteInboxNotificationOptimisticUpdate | DeleteAllInboxNotificationsOptimisticUpdate | UpdateNotificationSettingsOptimisticUpdate;
|
|
@@ -1265,62 +1246,68 @@ declare type UsablePromise<T> = Promise<T> & ({
|
|
|
1265
1246
|
status: "fulfilled";
|
|
1266
1247
|
value: T;
|
|
1267
1248
|
});
|
|
1249
|
+
declare type RoomId = string;
|
|
1268
1250
|
/**
|
|
1269
|
-
*
|
|
1270
|
-
* -
|
|
1271
|
-
* - All deleted threads removed from the threads list
|
|
1251
|
+
* Versions by roomId
|
|
1252
|
+
* e.g. { 'room-abc': {versions: "all versions"}}
|
|
1272
1253
|
*/
|
|
1273
|
-
declare type
|
|
1254
|
+
declare type VersionsByRoomId = Record<RoomId, Record<string, HistoryVersion>>;
|
|
1255
|
+
declare type NotificationsById = Record<string, InboxNotificationData>;
|
|
1256
|
+
/**
|
|
1257
|
+
* Notification settings by room ID.
|
|
1258
|
+
* e.g. { 'room-abc': { threads: "all" },
|
|
1259
|
+
* 'room-def': { threads: "replies_and_mentions" },
|
|
1260
|
+
* 'room-xyz': { threads: "none" },
|
|
1261
|
+
* }
|
|
1262
|
+
*/
|
|
1263
|
+
declare type SettingsByRoomId = Record<RoomId, RoomNotificationSettings$1>;
|
|
1264
|
+
declare type PermissionHintsByRoomId = Record<RoomId, Set<Permission>>;
|
|
1265
|
+
declare type CleanThreadifications<M extends BaseMetadata> = CleanThreads<M> & CleanNotifications;
|
|
1266
|
+
declare type CleanThreads<M extends BaseMetadata> = {
|
|
1274
1267
|
/**
|
|
1275
1268
|
* Keep track of loading and error status of all the queries made by the client.
|
|
1276
1269
|
* e.g. 'room-abc-{"color":"red"}' - ok
|
|
1277
1270
|
* e.g. 'room-abc-{}' - loading
|
|
1278
1271
|
*/
|
|
1279
1272
|
threadsDB: ReadonlyThreadDB<M>;
|
|
1273
|
+
};
|
|
1274
|
+
declare type CleanNotifications = {
|
|
1280
1275
|
/**
|
|
1281
1276
|
* All inbox notifications in a sorted array, optimistic updates applied.
|
|
1282
1277
|
*/
|
|
1283
|
-
|
|
1278
|
+
sortedNotifications: InboxNotificationData[];
|
|
1284
1279
|
/**
|
|
1285
1280
|
* Inbox notifications by ID.
|
|
1286
1281
|
* e.g. `in_${string}`
|
|
1287
1282
|
*/
|
|
1288
1283
|
notificationsById: Record<string, InboxNotificationData>;
|
|
1289
|
-
/**
|
|
1290
|
-
* Notification settings by room ID.
|
|
1291
|
-
* e.g. { 'room-abc': { threads: "all" },
|
|
1292
|
-
* 'room-def': { threads: "replies_and_mentions" },
|
|
1293
|
-
* 'room-xyz': { threads: "none" },
|
|
1294
|
-
* }
|
|
1295
|
-
*/
|
|
1296
|
-
settingsByRoomId: Record<string, RoomNotificationSettings$1>;
|
|
1297
|
-
/**
|
|
1298
|
-
* Versions by roomId
|
|
1299
|
-
* e.g. { 'room-abc': {versions: "all versions"}}
|
|
1300
|
-
*/
|
|
1301
|
-
versionsByRoomId: Record<string, Record<string, HistoryVersion>>;
|
|
1302
1284
|
};
|
|
1303
1285
|
declare class UmbrellaStore<M extends BaseMetadata> {
|
|
1304
|
-
private
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
private _roomVersionsLastRequestedAtByRoom;
|
|
1319
|
-
private _roomNotificationSettings;
|
|
1286
|
+
#private;
|
|
1287
|
+
readonly baseThreadsDB: ThreadDB<M>;
|
|
1288
|
+
readonly baseNotificationsById: Signal<NotificationsById>;
|
|
1289
|
+
readonly baseSettingsByRoomId: Signal<SettingsByRoomId>;
|
|
1290
|
+
readonly optimisticUpdates: Signal<readonly OptimisticUpdate<M>[]>;
|
|
1291
|
+
readonly baseVersionsByRoomId: Signal<VersionsByRoomId>;
|
|
1292
|
+
readonly permissionHintsByRoomId: Signal<PermissionHintsByRoomId>;
|
|
1293
|
+
readonly outputs: {
|
|
1294
|
+
readonly threadifications: DerivedSignal<CleanThreadifications<M>>;
|
|
1295
|
+
readonly threads: DerivedSignal<CleanThreads<M>>;
|
|
1296
|
+
readonly notifications: DerivedSignal<CleanNotifications>;
|
|
1297
|
+
readonly settingsByRoomId: DerivedSignal<SettingsByRoomId>;
|
|
1298
|
+
readonly versionsByRoomId: DerivedSignal<VersionsByRoomId>;
|
|
1299
|
+
};
|
|
1320
1300
|
constructor(client: OpaqueClient);
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1301
|
+
get1_both(): CleanThreadifications<M>;
|
|
1302
|
+
subscribe1_both(callback: () => void): () => void;
|
|
1303
|
+
get1_threads(): CleanThreads<M>;
|
|
1304
|
+
subscribe1_threads(callback: () => void): () => void;
|
|
1305
|
+
get1_notifications(): CleanNotifications;
|
|
1306
|
+
subscribe1_notifications(callback: () => void): () => void;
|
|
1307
|
+
get2(): SettingsByRoomId;
|
|
1308
|
+
subscribe2(callback: () => void): () => void;
|
|
1309
|
+
get3(): VersionsByRoomId;
|
|
1310
|
+
subscribe3(callback: () => void): () => void;
|
|
1324
1311
|
/**
|
|
1325
1312
|
* Returns the async result of the given query and room id. If the query is success,
|
|
1326
1313
|
* then it will return the threads that match that provided query and room id.
|
|
@@ -1331,13 +1318,6 @@ declare class UmbrellaStore<M extends BaseMetadata> {
|
|
|
1331
1318
|
getInboxNotificationsLoadingState(): InboxNotificationsAsyncResult;
|
|
1332
1319
|
getNotificationSettingsLoadingState(roomId: string): RoomNotificationSettingsAsyncResult;
|
|
1333
1320
|
getRoomVersionsLoadingState(roomId: string): AsyncResult<HistoryVersion[], "versions">;
|
|
1334
|
-
subscribe(callback: () => void): () => void;
|
|
1335
|
-
_getPermissions(roomId: string): Set<Permission> | undefined;
|
|
1336
|
-
private mutateThreadsDB;
|
|
1337
|
-
private updateInboxNotificationsCache;
|
|
1338
|
-
private setNotificationSettings;
|
|
1339
|
-
private updateRoomVersions;
|
|
1340
|
-
private updateOptimisticUpdatesCache;
|
|
1341
1321
|
/**
|
|
1342
1322
|
* Updates an existing inbox notification with a new value, replacing the
|
|
1343
1323
|
* corresponding optimistic update.
|
|
@@ -1365,17 +1345,6 @@ declare class UmbrellaStore<M extends BaseMetadata> {
|
|
|
1365
1345
|
* Creates an new thread, replacing the corresponding optimistic update.
|
|
1366
1346
|
*/
|
|
1367
1347
|
createThread(optimisticUpdateId: string, thread: Readonly<ThreadDataWithDeleteInfo<M>>): void;
|
|
1368
|
-
/**
|
|
1369
|
-
* Updates an existing thread with a new value, replacing the corresponding
|
|
1370
|
-
* optimistic update.
|
|
1371
|
-
*
|
|
1372
|
-
* This will not update anything if:
|
|
1373
|
-
* - The thread ID isn't found in the cache; or
|
|
1374
|
-
* - The thread ID was already deleted from the cache; or
|
|
1375
|
-
* - The thread ID in the cache was updated more recently than the optimistic
|
|
1376
|
-
* update's timestamp (if given)
|
|
1377
|
-
*/
|
|
1378
|
-
private updateThread;
|
|
1379
1348
|
patchThread(threadId: string, optimisticUpdateId: string | null, patch: {
|
|
1380
1349
|
metadata?: M;
|
|
1381
1350
|
resolved?: boolean;
|
|
@@ -1410,10 +1379,10 @@ declare class UmbrellaStore<M extends BaseMetadata> {
|
|
|
1410
1379
|
removeOptimisticUpdate(optimisticUpdateId: string): void;
|
|
1411
1380
|
fetchNotificationsDeltaUpdate(signal: AbortSignal): Promise<void>;
|
|
1412
1381
|
waitUntilNotificationsLoaded(): UsablePromise<void>;
|
|
1413
|
-
private updateRoomPermissions;
|
|
1414
1382
|
waitUntilRoomThreadsLoaded(roomId: string, query: ThreadsQuery<M> | undefined): UsablePromise<void>;
|
|
1415
1383
|
fetchRoomThreadsDeltaUpdate(roomId: string, signal: AbortSignal): Promise<void>;
|
|
1416
1384
|
waitUntilUserThreadsLoaded(query: ThreadsQuery<M> | undefined): UsablePromise<void>;
|
|
1385
|
+
private invalidateEntireStore;
|
|
1417
1386
|
fetchUserThreadsDeltaUpdate(signal: AbortSignal): Promise<void>;
|
|
1418
1387
|
waitUntilRoomVersionsLoaded(roomId: string): UsablePromise<void>;
|
|
1419
1388
|
fetchRoomVersionsDeltaUpdate(roomId: string, signal: AbortSignal): Promise<void>;
|
|
@@ -1427,7 +1396,7 @@ declare class UmbrellaStore<M extends BaseMetadata> {
|
|
|
1427
1396
|
*
|
|
1428
1397
|
* @private This is a private/advanced API. Do not rely on it.
|
|
1429
1398
|
*/
|
|
1430
|
-
declare const ClientContext:
|
|
1399
|
+
declare const ClientContext: react.Context<OpaqueClient | null>;
|
|
1431
1400
|
/**
|
|
1432
1401
|
* Gets or creates a unique Umbrella store for each unique client instance.
|
|
1433
1402
|
*
|
|
@@ -1450,7 +1419,7 @@ declare function useClient<U extends BaseUserMeta>(): Client$1<U, BaseMetadata$1
|
|
|
1450
1419
|
* Unlike `RoomProvider`, `LiveblocksProvider` doesn’t call Liveblocks servers when mounted,
|
|
1451
1420
|
* and it should be placed higher in your app’s component tree.
|
|
1452
1421
|
*/
|
|
1453
|
-
declare function LiveblocksProvider<U extends BaseUserMeta = DU>(props: PropsWithChildren<ClientOptions<U>>):
|
|
1422
|
+
declare function LiveblocksProvider<U extends BaseUserMeta = DU>(props: PropsWithChildren<ClientOptions<U>>): react_jsx_runtime.JSX.Element;
|
|
1454
1423
|
/**
|
|
1455
1424
|
* Creates a LiveblocksProvider and a set of typed hooks. Note that any
|
|
1456
1425
|
* LiveblocksProvider created in this way takes no props, because it uses
|
|
@@ -1624,7 +1593,7 @@ declare function useSyncStatus(options?: UseSyncStatusOptions): SyncStatus;
|
|
|
1624
1593
|
*
|
|
1625
1594
|
* @private This is a private/advanced API. Do not rely on it.
|
|
1626
1595
|
*/
|
|
1627
|
-
declare const RoomContext:
|
|
1596
|
+
declare const RoomContext: react.Context<OpaqueRoom | null>;
|
|
1628
1597
|
/** @private */
|
|
1629
1598
|
declare function useRoomOrNull<P extends JsonObject, S extends LsonObject, U extends BaseUserMeta, E extends Json, M extends BaseMetadata$1>(): Room<P, S, U, E, M> | null;
|
|
1630
1599
|
|
|
@@ -1635,6 +1604,16 @@ declare function useRoomOrNull<P extends JsonObject, S extends LsonObject, U ext
|
|
|
1635
1604
|
declare function useStatus(): Status;
|
|
1636
1605
|
/** @private - Internal API, do not rely on it. */
|
|
1637
1606
|
declare function useReportTextEditor(editor: TextEditorType, rootKey: string): void;
|
|
1607
|
+
/** @private - Internal API, do not rely on it. */
|
|
1608
|
+
declare function useYjsProvider(): IYjsProvider | undefined;
|
|
1609
|
+
/** @private - Internal API, do not rely on it. */
|
|
1610
|
+
declare function useCreateTextMention(): (userId: string, mentionId: string) => void;
|
|
1611
|
+
/** @private - Internal API, do not rely on it. */
|
|
1612
|
+
declare function useDeleteTextMention(): (mentionId: string) => void;
|
|
1613
|
+
/** @private - Internal API, do not rely on it. */
|
|
1614
|
+
declare function useResolveMentionSuggestions(): ((args: _liveblocks_core.ResolveMentionSuggestionsArgs) => _liveblocks_core.OptionalPromise<string[]>) | undefined;
|
|
1615
|
+
/** @private - Internal API, do not rely on it. */
|
|
1616
|
+
declare function useMentionSuggestionsCache(): Map<string, string[]>;
|
|
1638
1617
|
/**
|
|
1639
1618
|
* Returns the current storage status for the Room, and triggers
|
|
1640
1619
|
* a re-render whenever it changes. Can be used to render a "Saving..."
|
|
@@ -1891,7 +1870,7 @@ declare function useAttachmentUrlSuspense(attachmentId: string): {
|
|
|
1891
1870
|
/**
|
|
1892
1871
|
* @private For internal use only. Do not rely on this hook.
|
|
1893
1872
|
*/
|
|
1894
|
-
declare function useRoomPermissions(roomId: string): Set<
|
|
1873
|
+
declare function useRoomPermissions(roomId: string): Set<unknown>;
|
|
1895
1874
|
/**
|
|
1896
1875
|
* Creates a RoomProvider and a set of typed hooks to use in your app. Note
|
|
1897
1876
|
* that any RoomProvider created in this way does not need to be nested in
|
|
@@ -2036,7 +2015,7 @@ declare const _useEditThreadMetadata: TypedBundle["useEditThreadMetadata"];
|
|
|
2036
2015
|
declare const _useEventListener: TypedBundle["useEventListener"];
|
|
2037
2016
|
/**
|
|
2038
2017
|
* Returns the presence of the current user of the current room, and a function to update it.
|
|
2039
|
-
* It is different from the setState function returned by the useState hook from
|
|
2018
|
+
* It is different from the setState function returned by the useState hook from
|
|
2040
2019
|
* You don't need to pass the full presence object to update it.
|
|
2041
2020
|
*
|
|
2042
2021
|
* @example
|
|
@@ -2368,4 +2347,4 @@ declare const _useStorageRoot: TypedBundle["useStorageRoot"];
|
|
|
2368
2347
|
*/
|
|
2369
2348
|
declare const _useUpdateMyPresence: TypedBundle["useUpdateMyPresence"];
|
|
2370
2349
|
|
|
2371
|
-
export {
|
|
2350
|
+
export { _useEventListener as $, useDeleteAllInboxNotifications as A, useDeleteInboxNotification as B, CreateThreadError 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, RoomContext as R, useDeleteComment as S, _useDeleteThread as T, type UseStorageStatusOptions as U, useEditComment as V, _useEditThreadMetadata as W, useMarkThreadAsResolved as X, useMarkThreadAsUnresolved as Y, useErrorListener as Z, _useInboxNotificationThread as _, useClientOrNull 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, useOthersConnectionIdsSuspense as aA, _useOthersMappedSuspense as aB, _useSelfSuspense as aC, _useStorageSuspense as aD, useStorageStatusSuspense as aE, _useThreadsSuspense as aF, useAttachmentUrlSuspense as aG, _useHistoryVersionsSuspense as aH, _useRoomNotificationSettingsSuspense as aI, useInboxNotificationsSuspense as aJ, useRoomInfoSuspense as aK, useUnreadInboxNotificationsCountSuspense as aL, _useUserSuspense as aM, _useUserThreadsSuspense_experimental as aN, useStatus as aa, _useStorageRoot as ab, useThreadSubscription as ac, useUndo as ad, _useUpdateMyPresence as ae, useUpdateRoomNotificationSettings as af, useHistoryVersionData as ag, useCommentsErrorListener 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, useInboxNotifications as at, _useUserThreads_experimental as au, useRoomInfo as av, useUnreadInboxNotificationsCount as aw, _useUser as ax, _useOtherSuspense as ay, _useOthersSuspense as az, useAddRoomCommentReaction as b, useCreateRoomComment as c, useCreateRoomThread as d, useCreateTextMention as e, useDeleteRoomComment as f, getUmbrellaStoreForClient as g, useDeleteRoomThread as h, useDeleteTextMention as i, useEditRoomComment as j, useEditRoomThreadMetadata as k, useMarkRoomThreadAsRead as l, useMarkRoomThreadAsResolved as m, useMarkRoomThreadAsUnresolved as n, useMentionSuggestionsCache as o, useRemoveRoomCommentReaction as p, useReportTextEditor as q, useResolveMentionSuggestions as r, useRoomAttachmentUrl as s, useRoomPermissions as t, useRoomOrNull as u, useYjsProvider as v, type UseThreadsOptions as w, ClientContext as x, createLiveblocksContext as y, useClient as z };
|
package/dist/suspense.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { ClientSideSuspense } from './index.mjs';
|
|
2
|
-
export {
|
|
2
|
+
export { x as ClientContext, L as LiveblocksProvider, M as MutationContext, R as RoomContext, H as RoomProvider, U as UseStorageStatusOptions, w as UseThreadsOptions, I as useAddReaction, aG as useAttachmentUrl, J as useBatch, K as useBroadcastEvent, N as useCanRedo, O as useCanUndo, z as useClient, P as useCreateComment, Q as useCreateThread, A as useDeleteAllInboxNotifications, S as useDeleteComment, B as useDeleteInboxNotification, T as useDeleteThread, V as useEditComment, W as useEditThreadMetadata, Z as useErrorListener, $ as useEventListener, a0 as useHistory, aH as useHistoryVersions, _ as useInboxNotificationThread, aJ as useInboxNotifications, a1 as useIsInsideRoom, a2 as useLostConnectionListener, D as useMarkAllInboxNotificationsAsRead, E as useMarkInboxNotificationAsRead, a3 as useMarkThreadAsRead, X as useMarkThreadAsResolved, Y as useMarkThreadAsUnresolved, a4 as useMutation, a5 as useMyPresence, ay as useOther, az as useOthers, aA as useOthersConnectionIds, a6 as useOthersListener, aB as useOthersMapped, a7 as useRedo, a8 as useRemoveReaction, a9 as useRoom, aK as useRoomInfo, aI as useRoomNotificationSettings, aC as useSelf, aa as useStatus, aD as useStorage, ab as useStorageRoot, aE as useStorageStatus, F as useSyncStatus, ac as useThreadSubscription, aF as useThreads, ad as useUndo, aL as useUnreadInboxNotificationsCount, ae as useUpdateMyPresence, af as useUpdateRoomNotificationSettings, aM as useUser, aN as useUserThreads_experimental } from './room-C_NzlTZP.mjs';
|
|
3
3
|
export { Json, JsonObject, shallow } from '@liveblocks/client';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
4
5
|
import 'react';
|
|
5
6
|
import '@liveblocks/core';
|
package/dist/suspense.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { ClientSideSuspense } from './index.js';
|
|
2
|
-
export {
|
|
2
|
+
export { x as ClientContext, L as LiveblocksProvider, M as MutationContext, R as RoomContext, H as RoomProvider, U as UseStorageStatusOptions, w as UseThreadsOptions, I as useAddReaction, aG as useAttachmentUrl, J as useBatch, K as useBroadcastEvent, N as useCanRedo, O as useCanUndo, z as useClient, P as useCreateComment, Q as useCreateThread, A as useDeleteAllInboxNotifications, S as useDeleteComment, B as useDeleteInboxNotification, T as useDeleteThread, V as useEditComment, W as useEditThreadMetadata, Z as useErrorListener, $ as useEventListener, a0 as useHistory, aH as useHistoryVersions, _ as useInboxNotificationThread, aJ as useInboxNotifications, a1 as useIsInsideRoom, a2 as useLostConnectionListener, D as useMarkAllInboxNotificationsAsRead, E as useMarkInboxNotificationAsRead, a3 as useMarkThreadAsRead, X as useMarkThreadAsResolved, Y as useMarkThreadAsUnresolved, a4 as useMutation, a5 as useMyPresence, ay as useOther, az as useOthers, aA as useOthersConnectionIds, a6 as useOthersListener, aB as useOthersMapped, a7 as useRedo, a8 as useRemoveReaction, a9 as useRoom, aK as useRoomInfo, aI as useRoomNotificationSettings, aC as useSelf, aa as useStatus, aD as useStorage, ab as useStorageRoot, aE as useStorageStatus, F as useSyncStatus, ac as useThreadSubscription, aF as useThreads, ad as useUndo, aL as useUnreadInboxNotificationsCount, ae as useUpdateMyPresence, af as useUpdateRoomNotificationSettings, aM as useUser, aN as useUserThreads_experimental } from './room-C_NzlTZP.js';
|
|
3
3
|
export { Json, JsonObject, shallow } from '@liveblocks/client';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
4
5
|
import 'react';
|
|
5
6
|
import '@liveblocks/core';
|
package/dist/suspense.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkMI7M3UBZjs = require('./chunk-MI7M3UBZ.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -63,12 +63,12 @@ var _chunkL2RWXPYAjs = require('./chunk-L2RWXPYA.js');
|
|
|
63
63
|
|
|
64
64
|
|
|
65
65
|
|
|
66
|
-
var
|
|
66
|
+
var _chunkKY7WMVMGjs = require('./chunk-KY7WMVMG.js');
|
|
67
67
|
|
|
68
68
|
// src/suspense.ts
|
|
69
69
|
var _core = require('@liveblocks/core');
|
|
70
70
|
var _client = require('@liveblocks/client');
|
|
71
|
-
_core.detectDupes.call(void 0,
|
|
71
|
+
_core.detectDupes.call(void 0, _chunkMI7M3UBZjs.PKG_NAME, _chunkMI7M3UBZjs.PKG_VERSION, _chunkMI7M3UBZjs.PKG_FORMAT);
|
|
72
72
|
|
|
73
73
|
|
|
74
74
|
|
|
@@ -130,5 +130,5 @@ _core.detectDupes.call(void 0, _chunkL2RWXPYAjs.PKG_NAME, _chunkL2RWXPYAjs.PKG_V
|
|
|
130
130
|
|
|
131
131
|
|
|
132
132
|
|
|
133
|
-
exports.ClientContext =
|
|
133
|
+
exports.ClientContext = _chunkKY7WMVMGjs.ClientContext; exports.ClientSideSuspense = _chunkMI7M3UBZjs.ClientSideSuspense; exports.LiveblocksProvider = _chunkKY7WMVMGjs.LiveblocksProvider; exports.RoomContext = _chunkKY7WMVMGjs.RoomContext; exports.RoomProvider = _chunkKY7WMVMGjs._RoomProvider; exports.shallow = _client.shallow; exports.useAddReaction = _chunkKY7WMVMGjs._useAddReaction; exports.useAttachmentUrl = _chunkKY7WMVMGjs.useAttachmentUrlSuspense; exports.useBatch = _chunkKY7WMVMGjs.useBatch; exports.useBroadcastEvent = _chunkKY7WMVMGjs._useBroadcastEvent; exports.useCanRedo = _chunkKY7WMVMGjs.useCanRedo; exports.useCanUndo = _chunkKY7WMVMGjs.useCanUndo; exports.useClient = _chunkKY7WMVMGjs.useClient; exports.useCreateComment = _chunkKY7WMVMGjs.useCreateComment; exports.useCreateThread = _chunkKY7WMVMGjs._useCreateThread; exports.useDeleteAllInboxNotifications = _chunkKY7WMVMGjs.useDeleteAllInboxNotifications; exports.useDeleteComment = _chunkKY7WMVMGjs.useDeleteComment; exports.useDeleteInboxNotification = _chunkKY7WMVMGjs.useDeleteInboxNotification; exports.useDeleteThread = _chunkKY7WMVMGjs._useDeleteThread; exports.useEditComment = _chunkKY7WMVMGjs.useEditComment; exports.useEditThreadMetadata = _chunkKY7WMVMGjs._useEditThreadMetadata; exports.useErrorListener = _chunkKY7WMVMGjs.useErrorListener; exports.useEventListener = _chunkKY7WMVMGjs._useEventListener; exports.useHistory = _chunkKY7WMVMGjs.useHistory; exports.useHistoryVersions = _chunkKY7WMVMGjs._useHistoryVersionsSuspense; exports.useInboxNotificationThread = _chunkKY7WMVMGjs._useInboxNotificationThread; exports.useInboxNotifications = _chunkKY7WMVMGjs.useInboxNotificationsSuspense; exports.useIsInsideRoom = _chunkKY7WMVMGjs._useIsInsideRoom; exports.useLostConnectionListener = _chunkKY7WMVMGjs.useLostConnectionListener; exports.useMarkAllInboxNotificationsAsRead = _chunkKY7WMVMGjs.useMarkAllInboxNotificationsAsRead; exports.useMarkInboxNotificationAsRead = _chunkKY7WMVMGjs.useMarkInboxNotificationAsRead; exports.useMarkThreadAsRead = _chunkKY7WMVMGjs.useMarkThreadAsRead; exports.useMarkThreadAsResolved = _chunkKY7WMVMGjs.useMarkThreadAsResolved; exports.useMarkThreadAsUnresolved = _chunkKY7WMVMGjs.useMarkThreadAsUnresolved; exports.useMutation = _chunkKY7WMVMGjs._useMutation; exports.useMyPresence = _chunkKY7WMVMGjs._useMyPresence; exports.useOther = _chunkKY7WMVMGjs._useOtherSuspense; exports.useOthers = _chunkKY7WMVMGjs._useOthersSuspense; exports.useOthersConnectionIds = _chunkKY7WMVMGjs.useOthersConnectionIdsSuspense; exports.useOthersListener = _chunkKY7WMVMGjs._useOthersListener; exports.useOthersMapped = _chunkKY7WMVMGjs._useOthersMappedSuspense; exports.useRedo = _chunkKY7WMVMGjs.useRedo; exports.useRemoveReaction = _chunkKY7WMVMGjs.useRemoveReaction; exports.useRoom = _chunkKY7WMVMGjs._useRoom; exports.useRoomInfo = _chunkKY7WMVMGjs.useRoomInfoSuspense; exports.useRoomNotificationSettings = _chunkKY7WMVMGjs._useRoomNotificationSettingsSuspense; exports.useSelf = _chunkKY7WMVMGjs._useSelfSuspense; exports.useStatus = _chunkKY7WMVMGjs.useStatus; exports.useStorage = _chunkKY7WMVMGjs._useStorageSuspense; exports.useStorageRoot = _chunkKY7WMVMGjs._useStorageRoot; exports.useStorageStatus = _chunkKY7WMVMGjs.useStorageStatusSuspense; exports.useSyncStatus = _chunkKY7WMVMGjs.useSyncStatus; exports.useThreadSubscription = _chunkKY7WMVMGjs.useThreadSubscription; exports.useThreads = _chunkKY7WMVMGjs._useThreadsSuspense; exports.useUndo = _chunkKY7WMVMGjs.useUndo; exports.useUnreadInboxNotificationsCount = _chunkKY7WMVMGjs.useUnreadInboxNotificationsCountSuspense; exports.useUpdateMyPresence = _chunkKY7WMVMGjs._useUpdateMyPresence; exports.useUpdateRoomNotificationSettings = _chunkKY7WMVMGjs.useUpdateRoomNotificationSettings; exports.useUser = _chunkKY7WMVMGjs._useUserSuspense; exports.useUserThreads_experimental = _chunkKY7WMVMGjs._useUserThreadsSuspense_experimental;
|
|
134
134
|
//# sourceMappingURL=suspense.js.map
|
package/dist/suspense.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
PKG_FORMAT,
|
|
4
4
|
PKG_NAME,
|
|
5
5
|
PKG_VERSION
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-A4ABDZ5E.mjs";
|
|
7
7
|
import {
|
|
8
8
|
ClientContext,
|
|
9
9
|
LiveblocksProvider,
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
useUndo,
|
|
64
64
|
useUnreadInboxNotificationsCountSuspense,
|
|
65
65
|
useUpdateRoomNotificationSettings
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-UJLD6FYC.mjs";
|
|
67
67
|
|
|
68
68
|
// src/suspense.ts
|
|
69
69
|
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.15.0-debug1",
|
|
4
4
|
"description": "A set of React hooks and providers to use Liveblocks declaratively. Liveblocks is the all-in-one toolkit to build collaborative products like Figma, Notion, and more.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -61,12 +61,11 @@
|
|
|
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.
|
|
66
|
-
"use-sync-external-store": "^1.2.2"
|
|
64
|
+
"@liveblocks/client": "2.15.0-debug1",
|
|
65
|
+
"@liveblocks/core": "2.15.0-debug1"
|
|
67
66
|
},
|
|
68
67
|
"peerDependencies": {
|
|
69
|
-
"react": "^
|
|
68
|
+
"react": "^18 || ^19 || ^19.0.0-rc"
|
|
70
69
|
},
|
|
71
70
|
"devDependencies": {
|
|
72
71
|
"@liveblocks/eslint-config": "*",
|
|
@@ -74,7 +73,6 @@
|
|
|
74
73
|
"@liveblocks/query-parser": "^0.0.4",
|
|
75
74
|
"@testing-library/jest-dom": "6.4.6",
|
|
76
75
|
"@testing-library/react": "14.1.2",
|
|
77
|
-
"@types/use-sync-external-store": "^0.0.6",
|
|
78
76
|
"date-fns": "^3.6.0",
|
|
79
77
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
80
78
|
"itertools": "^2.3.2",
|