@liveblocks/react 2.13.3-emails2 → 2.14.0-lexical1
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 +6 -3
- package/dist/_private.d.ts +6 -3
- package/dist/_private.js +18 -7
- package/dist/_private.js.map +1 -1
- package/dist/_private.mjs +21 -10
- package/dist/_private.mjs.map +1 -1
- package/dist/{chunk-BRCWZCNY.mjs → chunk-A4RI4GZW.mjs} +502 -351
- package/dist/chunk-A4RI4GZW.mjs.map +1 -0
- package/dist/{chunk-ZKHAR6BQ.mjs → chunk-CI2PWFZS.mjs} +2 -2
- package/dist/{chunk-X4DDEZYL.js → chunk-N33NEN5R.js} +496 -345
- package/dist/chunk-N33NEN5R.js.map +1 -0
- package/dist/{chunk-RWQ74ZK6.js → chunk-QJWT5TQ2.js} +2 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/index.mjs +2 -2
- package/dist/{room-Rl_QnQMY.d.mts → room-FAbgoSMw.d.mts} +60 -67
- package/dist/{room-Rl_QnQMY.d.ts → room-FAbgoSMw.d.ts} +60 -67
- package/dist/suspense.d.mts +1 -1
- package/dist/suspense.d.ts +1 -1
- package/dist/suspense.js +4 -4
- package/dist/suspense.mjs +2 -2
- package/package.json +3 -3
- package/dist/chunk-BRCWZCNY.mjs.map +0 -1
- package/dist/chunk-X4DDEZYL.js.map +0 -1
- /package/dist/{chunk-ZKHAR6BQ.mjs.map → chunk-CI2PWFZS.mjs.map} +0 -0
- /package/dist/{chunk-RWQ74ZK6.js.map → chunk-QJWT5TQ2.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }// src/version.ts
|
|
2
2
|
var PKG_NAME = "@liveblocks/react";
|
|
3
|
-
var PKG_VERSION = "2.
|
|
3
|
+
var PKG_VERSION = "2.14.0-lexical1";
|
|
4
4
|
var PKG_FORMAT = "cjs";
|
|
5
5
|
|
|
6
6
|
// src/ClientSideSuspense.tsx
|
|
@@ -19,4 +19,4 @@ function ClientSideSuspense(props) {
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
exports.PKG_NAME = PKG_NAME; exports.PKG_VERSION = PKG_VERSION; exports.PKG_FORMAT = PKG_FORMAT; exports.ClientSideSuspense = ClientSideSuspense;
|
|
22
|
-
//# sourceMappingURL=chunk-
|
|
22
|
+
//# sourceMappingURL=chunk-QJWT5TQ2.js.map
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { x as ClientContext, L as LiveblocksProvider, M as MutationContext, R as RoomContext, H as RoomProvider, U as UseStorageStatusOptions, w as UseThreadsOptions, y as createLiveblocksContext, G as createRoomContext, I as useAddReaction, aq as useAttachmentUrl, J as useBatch, K as useBroadcastEvent, N as useCanRedo, O as useCanUndo, z as useClient, ah as useCommentsErrorListener, 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, ag as useHistoryVersionData, ar as useHistoryVersions, _ as useInboxNotificationThread, at 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, ai as useOther, aj as useOthers, ak as useOthersConnectionIds, a6 as useOthersListener, al as useOthersMapped, a7 as useRedo, a8 as useRemoveReaction, a9 as useRoom, av as useRoomInfo, as as useRoomNotificationSettings, am as useSelf, aa as useStatus, an as useStorage, ab as useStorageRoot, ao as useStorageStatus, F as useSyncStatus, ac as useThreadSubscription, ap as useThreads, ad as useUndo, aw as useUnreadInboxNotificationsCount, ae as useUpdateMyPresence, af as useUpdateRoomNotificationSettings, ax as useUser, au as useUserThreads_experimental } from './room-FAbgoSMw.mjs';
|
|
2
2
|
export { Json, JsonObject, shallow } from '@liveblocks/client';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ReactNode } from 'react';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { x as ClientContext, L as LiveblocksProvider, M as MutationContext, R as RoomContext, H as RoomProvider, U as UseStorageStatusOptions, w as UseThreadsOptions, y as createLiveblocksContext, G as createRoomContext, I as useAddReaction, aq as useAttachmentUrl, J as useBatch, K as useBroadcastEvent, N as useCanRedo, O as useCanUndo, z as useClient, ah as useCommentsErrorListener, 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, ag as useHistoryVersionData, ar as useHistoryVersions, _ as useInboxNotificationThread, at 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, ai as useOther, aj as useOthers, ak as useOthersConnectionIds, a6 as useOthersListener, al as useOthersMapped, a7 as useRedo, a8 as useRemoveReaction, a9 as useRoom, av as useRoomInfo, as as useRoomNotificationSettings, am as useSelf, aa as useStatus, an as useStorage, ab as useStorageRoot, ao as useStorageStatus, F as useSyncStatus, ac as useThreadSubscription, ap as useThreads, ad as useUndo, aw as useUnreadInboxNotificationsCount, ae as useUpdateMyPresence, af as useUpdateRoomNotificationSettings, ax as useUser, au as useUserThreads_experimental } from './room-FAbgoSMw.js';
|
|
2
2
|
export { Json, JsonObject, shallow } from '@liveblocks/client';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ReactNode } from 'react';
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkQJWT5TQ2js = require('./chunk-QJWT5TQ2.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -67,12 +67,12 @@ var _chunkRWQ74ZK6js = require('./chunk-RWQ74ZK6.js');
|
|
|
67
67
|
|
|
68
68
|
|
|
69
69
|
|
|
70
|
-
var
|
|
70
|
+
var _chunkN33NEN5Rjs = require('./chunk-N33NEN5R.js');
|
|
71
71
|
|
|
72
72
|
// src/index.ts
|
|
73
73
|
var _core = require('@liveblocks/core');
|
|
74
74
|
var _client = require('@liveblocks/client');
|
|
75
|
-
_core.detectDupes.call(void 0,
|
|
75
|
+
_core.detectDupes.call(void 0, _chunkQJWT5TQ2js.PKG_NAME, _chunkQJWT5TQ2js.PKG_VERSION, _chunkQJWT5TQ2js.PKG_FORMAT);
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
|
|
@@ -138,5 +138,5 @@ _core.detectDupes.call(void 0, _chunkRWQ74ZK6js.PKG_NAME, _chunkRWQ74ZK6js.PKG_V
|
|
|
138
138
|
|
|
139
139
|
|
|
140
140
|
|
|
141
|
-
exports.ClientContext =
|
|
141
|
+
exports.ClientContext = _chunkN33NEN5Rjs.ClientContext; exports.ClientSideSuspense = _chunkQJWT5TQ2js.ClientSideSuspense; exports.LiveblocksProvider = _chunkN33NEN5Rjs.LiveblocksProvider; exports.RoomContext = _chunkN33NEN5Rjs.RoomContext; exports.RoomProvider = _chunkN33NEN5Rjs._RoomProvider; exports.createLiveblocksContext = _chunkN33NEN5Rjs.createLiveblocksContext; exports.createRoomContext = _chunkN33NEN5Rjs.createRoomContext; exports.shallow = _client.shallow; exports.useAddReaction = _chunkN33NEN5Rjs._useAddReaction; exports.useAttachmentUrl = _chunkN33NEN5Rjs.useAttachmentUrl; exports.useBatch = _chunkN33NEN5Rjs.useBatch; exports.useBroadcastEvent = _chunkN33NEN5Rjs._useBroadcastEvent; exports.useCanRedo = _chunkN33NEN5Rjs.useCanRedo; exports.useCanUndo = _chunkN33NEN5Rjs.useCanUndo; exports.useClient = _chunkN33NEN5Rjs.useClient; exports.useCommentsErrorListener = _chunkN33NEN5Rjs.useCommentsErrorListener; exports.useCreateComment = _chunkN33NEN5Rjs.useCreateComment; exports.useCreateThread = _chunkN33NEN5Rjs._useCreateThread; exports.useDeleteAllInboxNotifications = _chunkN33NEN5Rjs.useDeleteAllInboxNotifications; exports.useDeleteComment = _chunkN33NEN5Rjs.useDeleteComment; exports.useDeleteInboxNotification = _chunkN33NEN5Rjs.useDeleteInboxNotification; exports.useDeleteThread = _chunkN33NEN5Rjs._useDeleteThread; exports.useEditComment = _chunkN33NEN5Rjs.useEditComment; exports.useEditThreadMetadata = _chunkN33NEN5Rjs._useEditThreadMetadata; exports.useErrorListener = _chunkN33NEN5Rjs.useErrorListener; exports.useEventListener = _chunkN33NEN5Rjs._useEventListener; exports.useHistory = _chunkN33NEN5Rjs.useHistory; exports.useHistoryVersionData = _chunkN33NEN5Rjs.useHistoryVersionData; exports.useHistoryVersions = _chunkN33NEN5Rjs._useHistoryVersions; exports.useInboxNotificationThread = _chunkN33NEN5Rjs._useInboxNotificationThread; exports.useInboxNotifications = _chunkN33NEN5Rjs.useInboxNotifications; exports.useIsInsideRoom = _chunkN33NEN5Rjs._useIsInsideRoom; exports.useLostConnectionListener = _chunkN33NEN5Rjs.useLostConnectionListener; exports.useMarkAllInboxNotificationsAsRead = _chunkN33NEN5Rjs.useMarkAllInboxNotificationsAsRead; exports.useMarkInboxNotificationAsRead = _chunkN33NEN5Rjs.useMarkInboxNotificationAsRead; exports.useMarkThreadAsRead = _chunkN33NEN5Rjs.useMarkThreadAsRead; exports.useMarkThreadAsResolved = _chunkN33NEN5Rjs.useMarkThreadAsResolved; exports.useMarkThreadAsUnresolved = _chunkN33NEN5Rjs.useMarkThreadAsUnresolved; exports.useMutation = _chunkN33NEN5Rjs._useMutation; exports.useMyPresence = _chunkN33NEN5Rjs._useMyPresence; exports.useOther = _chunkN33NEN5Rjs._useOther; exports.useOthers = _chunkN33NEN5Rjs._useOthers; exports.useOthersConnectionIds = _chunkN33NEN5Rjs.useOthersConnectionIds; exports.useOthersListener = _chunkN33NEN5Rjs._useOthersListener; exports.useOthersMapped = _chunkN33NEN5Rjs._useOthersMapped; exports.useRedo = _chunkN33NEN5Rjs.useRedo; exports.useRemoveReaction = _chunkN33NEN5Rjs.useRemoveReaction; exports.useRoom = _chunkN33NEN5Rjs._useRoom; exports.useRoomInfo = _chunkN33NEN5Rjs.useRoomInfo; exports.useRoomNotificationSettings = _chunkN33NEN5Rjs._useRoomNotificationSettings; exports.useSelf = _chunkN33NEN5Rjs._useSelf; exports.useStatus = _chunkN33NEN5Rjs.useStatus; exports.useStorage = _chunkN33NEN5Rjs._useStorage; exports.useStorageRoot = _chunkN33NEN5Rjs._useStorageRoot; exports.useStorageStatus = _chunkN33NEN5Rjs.useStorageStatus; exports.useSyncStatus = _chunkN33NEN5Rjs.useSyncStatus; exports.useThreadSubscription = _chunkN33NEN5Rjs.useThreadSubscription; exports.useThreads = _chunkN33NEN5Rjs._useThreads; exports.useUndo = _chunkN33NEN5Rjs.useUndo; exports.useUnreadInboxNotificationsCount = _chunkN33NEN5Rjs.useUnreadInboxNotificationsCount; exports.useUpdateMyPresence = _chunkN33NEN5Rjs._useUpdateMyPresence; exports.useUpdateRoomNotificationSettings = _chunkN33NEN5Rjs.useUpdateRoomNotificationSettings; exports.useUser = _chunkN33NEN5Rjs._useUser; exports.useUserThreads_experimental = _chunkN33NEN5Rjs._useUserThreads_experimental;
|
|
142
142
|
//# sourceMappingURL=index.js.map
|
package/dist/index.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-CI2PWFZS.mjs";
|
|
7
7
|
import {
|
|
8
8
|
ClientContext,
|
|
9
9
|
LiveblocksProvider,
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
useUndo,
|
|
68
68
|
useUnreadInboxNotificationsCount,
|
|
69
69
|
useUpdateRoomNotificationSettings
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-A4RI4GZW.mjs";
|
|
71
71
|
|
|
72
72
|
// src/index.ts
|
|
73
73
|
import { detectDupes } from "@liveblocks/core";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
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
2
|
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,
|
|
3
|
+
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';
|
|
4
4
|
import * as React$1 from 'react';
|
|
5
5
|
import React__default, { PropsWithChildren } from 'react';
|
|
6
6
|
|
|
@@ -1101,7 +1101,7 @@ declare type LiveblocksContextBundle<U extends BaseUserMeta, M extends BaseMetad
|
|
|
1101
1101
|
}>;
|
|
1102
1102
|
}>;
|
|
1103
1103
|
|
|
1104
|
-
declare type ReadonlyThreadDB<M extends BaseMetadata> = Omit<ThreadDB<M>, "upsert" | "delete">;
|
|
1104
|
+
declare type ReadonlyThreadDB<M extends BaseMetadata> = Omit<ThreadDB<M>, "upsert" | "delete" | "signal">;
|
|
1105
1105
|
/**
|
|
1106
1106
|
* This class implements a lightweight, in-memory, "database" for all Thread
|
|
1107
1107
|
* instances.
|
|
@@ -1120,14 +1120,10 @@ declare type ReadonlyThreadDB<M extends BaseMetadata> = Omit<ThreadDB<M>, "upser
|
|
|
1120
1120
|
*
|
|
1121
1121
|
*/
|
|
1122
1122
|
declare class ThreadDB<M extends BaseMetadata> {
|
|
1123
|
-
private
|
|
1124
|
-
|
|
1125
|
-
private _desc;
|
|
1126
|
-
private _version;
|
|
1123
|
+
#private;
|
|
1124
|
+
readonly signal: MutableSignal<this>;
|
|
1127
1125
|
constructor();
|
|
1128
1126
|
clone(): ThreadDB<M>;
|
|
1129
|
-
/** Gets the transaction count for this DB. Increments any time the DB is modified. */
|
|
1130
|
-
get version(): number;
|
|
1131
1127
|
/** Returns an existing thread by ID. Will never return a deleted thread. */
|
|
1132
1128
|
get(threadId: string): ThreadData<M> | undefined;
|
|
1133
1129
|
/** Returns the (possibly deleted) thread by ID. */
|
|
@@ -1153,7 +1149,6 @@ declare class ThreadDB<M extends BaseMetadata> {
|
|
|
1153
1149
|
* Will never return deleted threads in the result.
|
|
1154
1150
|
*/
|
|
1155
1151
|
findMany(roomId: string | undefined, query: ThreadsQuery<M>, direction: "asc" | "desc"): ThreadData<M>[];
|
|
1156
|
-
private touch;
|
|
1157
1152
|
}
|
|
1158
1153
|
|
|
1159
1154
|
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 +1260,68 @@ declare type UsablePromise<T> = Promise<T> & ({
|
|
|
1265
1260
|
status: "fulfilled";
|
|
1266
1261
|
value: T;
|
|
1267
1262
|
});
|
|
1263
|
+
declare type RoomId = string;
|
|
1268
1264
|
/**
|
|
1269
|
-
*
|
|
1270
|
-
* -
|
|
1271
|
-
* - All deleted threads removed from the threads list
|
|
1265
|
+
* Versions by roomId
|
|
1266
|
+
* e.g. { 'room-abc': {versions: "all versions"}}
|
|
1272
1267
|
*/
|
|
1273
|
-
declare type
|
|
1268
|
+
declare type VersionsByRoomId = Record<RoomId, Record<string, HistoryVersion>>;
|
|
1269
|
+
declare type NotificationsById = Record<string, InboxNotificationData>;
|
|
1270
|
+
/**
|
|
1271
|
+
* Notification settings by room ID.
|
|
1272
|
+
* e.g. { 'room-abc': { threads: "all" },
|
|
1273
|
+
* 'room-def': { threads: "replies_and_mentions" },
|
|
1274
|
+
* 'room-xyz': { threads: "none" },
|
|
1275
|
+
* }
|
|
1276
|
+
*/
|
|
1277
|
+
declare type SettingsByRoomId = Record<RoomId, RoomNotificationSettings$1>;
|
|
1278
|
+
declare type PermissionHintsByRoomId = Record<RoomId, Set<Permission>>;
|
|
1279
|
+
declare type CleanThreadifications<M extends BaseMetadata> = CleanThreads<M> & CleanNotifications;
|
|
1280
|
+
declare type CleanThreads<M extends BaseMetadata> = {
|
|
1274
1281
|
/**
|
|
1275
1282
|
* Keep track of loading and error status of all the queries made by the client.
|
|
1276
1283
|
* e.g. 'room-abc-{"color":"red"}' - ok
|
|
1277
1284
|
* e.g. 'room-abc-{}' - loading
|
|
1278
1285
|
*/
|
|
1279
1286
|
threadsDB: ReadonlyThreadDB<M>;
|
|
1287
|
+
};
|
|
1288
|
+
declare type CleanNotifications = {
|
|
1280
1289
|
/**
|
|
1281
1290
|
* All inbox notifications in a sorted array, optimistic updates applied.
|
|
1282
1291
|
*/
|
|
1283
|
-
|
|
1292
|
+
sortedNotifications: InboxNotificationData[];
|
|
1284
1293
|
/**
|
|
1285
1294
|
* Inbox notifications by ID.
|
|
1286
1295
|
* e.g. `in_${string}`
|
|
1287
1296
|
*/
|
|
1288
1297
|
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
1298
|
};
|
|
1303
1299
|
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;
|
|
1300
|
+
#private;
|
|
1301
|
+
readonly baseThreadsDB: ThreadDB<M>;
|
|
1302
|
+
readonly baseNotificationsById: Signal<NotificationsById>;
|
|
1303
|
+
readonly baseSettingsByRoomId: Signal<SettingsByRoomId>;
|
|
1304
|
+
readonly optimisticUpdates: Signal<readonly OptimisticUpdate<M>[]>;
|
|
1305
|
+
readonly baseVersionsByRoomId: Signal<VersionsByRoomId>;
|
|
1306
|
+
readonly permissionHintsByRoomId: Signal<PermissionHintsByRoomId>;
|
|
1307
|
+
readonly outputs: {
|
|
1308
|
+
readonly threadifications: DerivedSignal<CleanThreadifications<M>>;
|
|
1309
|
+
readonly threads: DerivedSignal<CleanThreads<M>>;
|
|
1310
|
+
readonly notifications: DerivedSignal<CleanNotifications>;
|
|
1311
|
+
readonly settingsByRoomId: DerivedSignal<SettingsByRoomId>;
|
|
1312
|
+
readonly versionsByRoomId: DerivedSignal<VersionsByRoomId>;
|
|
1313
|
+
};
|
|
1320
1314
|
constructor(client: OpaqueClient);
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1315
|
+
get1_both(): CleanThreadifications<M>;
|
|
1316
|
+
subscribe1_both(callback: () => void): () => void;
|
|
1317
|
+
get1_threads(): CleanThreads<M>;
|
|
1318
|
+
subscribe1_threads(callback: () => void): () => void;
|
|
1319
|
+
get1_notifications(): CleanNotifications;
|
|
1320
|
+
subscribe1_notifications(callback: () => void): () => void;
|
|
1321
|
+
get2(): SettingsByRoomId;
|
|
1322
|
+
subscribe2(callback: () => void): () => void;
|
|
1323
|
+
get3(): VersionsByRoomId;
|
|
1324
|
+
subscribe3(callback: () => void): () => void;
|
|
1324
1325
|
/**
|
|
1325
1326
|
* Returns the async result of the given query and room id. If the query is success,
|
|
1326
1327
|
* then it will return the threads that match that provided query and room id.
|
|
@@ -1331,13 +1332,6 @@ declare class UmbrellaStore<M extends BaseMetadata> {
|
|
|
1331
1332
|
getInboxNotificationsLoadingState(): InboxNotificationsAsyncResult;
|
|
1332
1333
|
getNotificationSettingsLoadingState(roomId: string): RoomNotificationSettingsAsyncResult;
|
|
1333
1334
|
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
1335
|
/**
|
|
1342
1336
|
* Updates an existing inbox notification with a new value, replacing the
|
|
1343
1337
|
* corresponding optimistic update.
|
|
@@ -1365,17 +1359,6 @@ declare class UmbrellaStore<M extends BaseMetadata> {
|
|
|
1365
1359
|
* Creates an new thread, replacing the corresponding optimistic update.
|
|
1366
1360
|
*/
|
|
1367
1361
|
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
1362
|
patchThread(threadId: string, optimisticUpdateId: string | null, patch: {
|
|
1380
1363
|
metadata?: M;
|
|
1381
1364
|
resolved?: boolean;
|
|
@@ -1410,10 +1393,10 @@ declare class UmbrellaStore<M extends BaseMetadata> {
|
|
|
1410
1393
|
removeOptimisticUpdate(optimisticUpdateId: string): void;
|
|
1411
1394
|
fetchNotificationsDeltaUpdate(signal: AbortSignal): Promise<void>;
|
|
1412
1395
|
waitUntilNotificationsLoaded(): UsablePromise<void>;
|
|
1413
|
-
private updateRoomPermissions;
|
|
1414
1396
|
waitUntilRoomThreadsLoaded(roomId: string, query: ThreadsQuery<M> | undefined): UsablePromise<void>;
|
|
1415
1397
|
fetchRoomThreadsDeltaUpdate(roomId: string, signal: AbortSignal): Promise<void>;
|
|
1416
1398
|
waitUntilUserThreadsLoaded(query: ThreadsQuery<M> | undefined): UsablePromise<void>;
|
|
1399
|
+
private invalidateEntireStore;
|
|
1417
1400
|
fetchUserThreadsDeltaUpdate(signal: AbortSignal): Promise<void>;
|
|
1418
1401
|
waitUntilRoomVersionsLoaded(roomId: string): UsablePromise<void>;
|
|
1419
1402
|
fetchRoomVersionsDeltaUpdate(roomId: string, signal: AbortSignal): Promise<void>;
|
|
@@ -1635,6 +1618,16 @@ declare function useRoomOrNull<P extends JsonObject, S extends LsonObject, U ext
|
|
|
1635
1618
|
declare function useStatus(): Status;
|
|
1636
1619
|
/** @private - Internal API, do not rely on it. */
|
|
1637
1620
|
declare function useReportTextEditor(editor: TextEditorType, rootKey: string): void;
|
|
1621
|
+
/** @private - Internal API, do not rely on it. */
|
|
1622
|
+
declare function useYjsProvider(): IYjsProvider | undefined;
|
|
1623
|
+
/** @private - Internal API, do not rely on it. */
|
|
1624
|
+
declare function useCreateTextMention(): (userId: string, mentionId: string) => void;
|
|
1625
|
+
/** @private - Internal API, do not rely on it. */
|
|
1626
|
+
declare function useDeleteTextMention(): (mentionId: string) => void;
|
|
1627
|
+
/** @private - Internal API, do not rely on it. */
|
|
1628
|
+
declare function useResolveMentionSuggestions(): ((args: _liveblocks_core.ResolveMentionSuggestionsArgs) => _liveblocks_core.OptionalPromise<string[]>) | undefined;
|
|
1629
|
+
/** @private - Internal API, do not rely on it. */
|
|
1630
|
+
declare function useMentionSuggestionsCache(): Map<string, string[]>;
|
|
1638
1631
|
/**
|
|
1639
1632
|
* Returns the current storage status for the Room, and triggers
|
|
1640
1633
|
* a re-render whenever it changes. Can be used to render a "Saving..."
|
|
@@ -1891,7 +1884,7 @@ declare function useAttachmentUrlSuspense(attachmentId: string): {
|
|
|
1891
1884
|
/**
|
|
1892
1885
|
* @private For internal use only. Do not rely on this hook.
|
|
1893
1886
|
*/
|
|
1894
|
-
declare function useRoomPermissions(roomId: string): Set<
|
|
1887
|
+
declare function useRoomPermissions(roomId: string): Set<unknown>;
|
|
1895
1888
|
/**
|
|
1896
1889
|
* Creates a RoomProvider and a set of typed hooks to use in your app. Note
|
|
1897
1890
|
* that any RoomProvider created in this way does not need to be nested in
|
|
@@ -2368,4 +2361,4 @@ declare const _useStorageRoot: TypedBundle["useStorageRoot"];
|
|
|
2368
2361
|
*/
|
|
2369
2362
|
declare const _useUpdateMyPresence: TypedBundle["useUpdateMyPresence"];
|
|
2370
2363
|
|
|
2371
|
-
export {
|
|
2364
|
+
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 };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
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
2
|
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,
|
|
3
|
+
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';
|
|
4
4
|
import * as React$1 from 'react';
|
|
5
5
|
import React__default, { PropsWithChildren } from 'react';
|
|
6
6
|
|
|
@@ -1101,7 +1101,7 @@ declare type LiveblocksContextBundle<U extends BaseUserMeta, M extends BaseMetad
|
|
|
1101
1101
|
}>;
|
|
1102
1102
|
}>;
|
|
1103
1103
|
|
|
1104
|
-
declare type ReadonlyThreadDB<M extends BaseMetadata> = Omit<ThreadDB<M>, "upsert" | "delete">;
|
|
1104
|
+
declare type ReadonlyThreadDB<M extends BaseMetadata> = Omit<ThreadDB<M>, "upsert" | "delete" | "signal">;
|
|
1105
1105
|
/**
|
|
1106
1106
|
* This class implements a lightweight, in-memory, "database" for all Thread
|
|
1107
1107
|
* instances.
|
|
@@ -1120,14 +1120,10 @@ declare type ReadonlyThreadDB<M extends BaseMetadata> = Omit<ThreadDB<M>, "upser
|
|
|
1120
1120
|
*
|
|
1121
1121
|
*/
|
|
1122
1122
|
declare class ThreadDB<M extends BaseMetadata> {
|
|
1123
|
-
private
|
|
1124
|
-
|
|
1125
|
-
private _desc;
|
|
1126
|
-
private _version;
|
|
1123
|
+
#private;
|
|
1124
|
+
readonly signal: MutableSignal<this>;
|
|
1127
1125
|
constructor();
|
|
1128
1126
|
clone(): ThreadDB<M>;
|
|
1129
|
-
/** Gets the transaction count for this DB. Increments any time the DB is modified. */
|
|
1130
|
-
get version(): number;
|
|
1131
1127
|
/** Returns an existing thread by ID. Will never return a deleted thread. */
|
|
1132
1128
|
get(threadId: string): ThreadData<M> | undefined;
|
|
1133
1129
|
/** Returns the (possibly deleted) thread by ID. */
|
|
@@ -1153,7 +1149,6 @@ declare class ThreadDB<M extends BaseMetadata> {
|
|
|
1153
1149
|
* Will never return deleted threads in the result.
|
|
1154
1150
|
*/
|
|
1155
1151
|
findMany(roomId: string | undefined, query: ThreadsQuery<M>, direction: "asc" | "desc"): ThreadData<M>[];
|
|
1156
|
-
private touch;
|
|
1157
1152
|
}
|
|
1158
1153
|
|
|
1159
1154
|
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 +1260,68 @@ declare type UsablePromise<T> = Promise<T> & ({
|
|
|
1265
1260
|
status: "fulfilled";
|
|
1266
1261
|
value: T;
|
|
1267
1262
|
});
|
|
1263
|
+
declare type RoomId = string;
|
|
1268
1264
|
/**
|
|
1269
|
-
*
|
|
1270
|
-
* -
|
|
1271
|
-
* - All deleted threads removed from the threads list
|
|
1265
|
+
* Versions by roomId
|
|
1266
|
+
* e.g. { 'room-abc': {versions: "all versions"}}
|
|
1272
1267
|
*/
|
|
1273
|
-
declare type
|
|
1268
|
+
declare type VersionsByRoomId = Record<RoomId, Record<string, HistoryVersion>>;
|
|
1269
|
+
declare type NotificationsById = Record<string, InboxNotificationData>;
|
|
1270
|
+
/**
|
|
1271
|
+
* Notification settings by room ID.
|
|
1272
|
+
* e.g. { 'room-abc': { threads: "all" },
|
|
1273
|
+
* 'room-def': { threads: "replies_and_mentions" },
|
|
1274
|
+
* 'room-xyz': { threads: "none" },
|
|
1275
|
+
* }
|
|
1276
|
+
*/
|
|
1277
|
+
declare type SettingsByRoomId = Record<RoomId, RoomNotificationSettings$1>;
|
|
1278
|
+
declare type PermissionHintsByRoomId = Record<RoomId, Set<Permission>>;
|
|
1279
|
+
declare type CleanThreadifications<M extends BaseMetadata> = CleanThreads<M> & CleanNotifications;
|
|
1280
|
+
declare type CleanThreads<M extends BaseMetadata> = {
|
|
1274
1281
|
/**
|
|
1275
1282
|
* Keep track of loading and error status of all the queries made by the client.
|
|
1276
1283
|
* e.g. 'room-abc-{"color":"red"}' - ok
|
|
1277
1284
|
* e.g. 'room-abc-{}' - loading
|
|
1278
1285
|
*/
|
|
1279
1286
|
threadsDB: ReadonlyThreadDB<M>;
|
|
1287
|
+
};
|
|
1288
|
+
declare type CleanNotifications = {
|
|
1280
1289
|
/**
|
|
1281
1290
|
* All inbox notifications in a sorted array, optimistic updates applied.
|
|
1282
1291
|
*/
|
|
1283
|
-
|
|
1292
|
+
sortedNotifications: InboxNotificationData[];
|
|
1284
1293
|
/**
|
|
1285
1294
|
* Inbox notifications by ID.
|
|
1286
1295
|
* e.g. `in_${string}`
|
|
1287
1296
|
*/
|
|
1288
1297
|
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
1298
|
};
|
|
1303
1299
|
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;
|
|
1300
|
+
#private;
|
|
1301
|
+
readonly baseThreadsDB: ThreadDB<M>;
|
|
1302
|
+
readonly baseNotificationsById: Signal<NotificationsById>;
|
|
1303
|
+
readonly baseSettingsByRoomId: Signal<SettingsByRoomId>;
|
|
1304
|
+
readonly optimisticUpdates: Signal<readonly OptimisticUpdate<M>[]>;
|
|
1305
|
+
readonly baseVersionsByRoomId: Signal<VersionsByRoomId>;
|
|
1306
|
+
readonly permissionHintsByRoomId: Signal<PermissionHintsByRoomId>;
|
|
1307
|
+
readonly outputs: {
|
|
1308
|
+
readonly threadifications: DerivedSignal<CleanThreadifications<M>>;
|
|
1309
|
+
readonly threads: DerivedSignal<CleanThreads<M>>;
|
|
1310
|
+
readonly notifications: DerivedSignal<CleanNotifications>;
|
|
1311
|
+
readonly settingsByRoomId: DerivedSignal<SettingsByRoomId>;
|
|
1312
|
+
readonly versionsByRoomId: DerivedSignal<VersionsByRoomId>;
|
|
1313
|
+
};
|
|
1320
1314
|
constructor(client: OpaqueClient);
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1315
|
+
get1_both(): CleanThreadifications<M>;
|
|
1316
|
+
subscribe1_both(callback: () => void): () => void;
|
|
1317
|
+
get1_threads(): CleanThreads<M>;
|
|
1318
|
+
subscribe1_threads(callback: () => void): () => void;
|
|
1319
|
+
get1_notifications(): CleanNotifications;
|
|
1320
|
+
subscribe1_notifications(callback: () => void): () => void;
|
|
1321
|
+
get2(): SettingsByRoomId;
|
|
1322
|
+
subscribe2(callback: () => void): () => void;
|
|
1323
|
+
get3(): VersionsByRoomId;
|
|
1324
|
+
subscribe3(callback: () => void): () => void;
|
|
1324
1325
|
/**
|
|
1325
1326
|
* Returns the async result of the given query and room id. If the query is success,
|
|
1326
1327
|
* then it will return the threads that match that provided query and room id.
|
|
@@ -1331,13 +1332,6 @@ declare class UmbrellaStore<M extends BaseMetadata> {
|
|
|
1331
1332
|
getInboxNotificationsLoadingState(): InboxNotificationsAsyncResult;
|
|
1332
1333
|
getNotificationSettingsLoadingState(roomId: string): RoomNotificationSettingsAsyncResult;
|
|
1333
1334
|
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
1335
|
/**
|
|
1342
1336
|
* Updates an existing inbox notification with a new value, replacing the
|
|
1343
1337
|
* corresponding optimistic update.
|
|
@@ -1365,17 +1359,6 @@ declare class UmbrellaStore<M extends BaseMetadata> {
|
|
|
1365
1359
|
* Creates an new thread, replacing the corresponding optimistic update.
|
|
1366
1360
|
*/
|
|
1367
1361
|
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
1362
|
patchThread(threadId: string, optimisticUpdateId: string | null, patch: {
|
|
1380
1363
|
metadata?: M;
|
|
1381
1364
|
resolved?: boolean;
|
|
@@ -1410,10 +1393,10 @@ declare class UmbrellaStore<M extends BaseMetadata> {
|
|
|
1410
1393
|
removeOptimisticUpdate(optimisticUpdateId: string): void;
|
|
1411
1394
|
fetchNotificationsDeltaUpdate(signal: AbortSignal): Promise<void>;
|
|
1412
1395
|
waitUntilNotificationsLoaded(): UsablePromise<void>;
|
|
1413
|
-
private updateRoomPermissions;
|
|
1414
1396
|
waitUntilRoomThreadsLoaded(roomId: string, query: ThreadsQuery<M> | undefined): UsablePromise<void>;
|
|
1415
1397
|
fetchRoomThreadsDeltaUpdate(roomId: string, signal: AbortSignal): Promise<void>;
|
|
1416
1398
|
waitUntilUserThreadsLoaded(query: ThreadsQuery<M> | undefined): UsablePromise<void>;
|
|
1399
|
+
private invalidateEntireStore;
|
|
1417
1400
|
fetchUserThreadsDeltaUpdate(signal: AbortSignal): Promise<void>;
|
|
1418
1401
|
waitUntilRoomVersionsLoaded(roomId: string): UsablePromise<void>;
|
|
1419
1402
|
fetchRoomVersionsDeltaUpdate(roomId: string, signal: AbortSignal): Promise<void>;
|
|
@@ -1635,6 +1618,16 @@ declare function useRoomOrNull<P extends JsonObject, S extends LsonObject, U ext
|
|
|
1635
1618
|
declare function useStatus(): Status;
|
|
1636
1619
|
/** @private - Internal API, do not rely on it. */
|
|
1637
1620
|
declare function useReportTextEditor(editor: TextEditorType, rootKey: string): void;
|
|
1621
|
+
/** @private - Internal API, do not rely on it. */
|
|
1622
|
+
declare function useYjsProvider(): IYjsProvider | undefined;
|
|
1623
|
+
/** @private - Internal API, do not rely on it. */
|
|
1624
|
+
declare function useCreateTextMention(): (userId: string, mentionId: string) => void;
|
|
1625
|
+
/** @private - Internal API, do not rely on it. */
|
|
1626
|
+
declare function useDeleteTextMention(): (mentionId: string) => void;
|
|
1627
|
+
/** @private - Internal API, do not rely on it. */
|
|
1628
|
+
declare function useResolveMentionSuggestions(): ((args: _liveblocks_core.ResolveMentionSuggestionsArgs) => _liveblocks_core.OptionalPromise<string[]>) | undefined;
|
|
1629
|
+
/** @private - Internal API, do not rely on it. */
|
|
1630
|
+
declare function useMentionSuggestionsCache(): Map<string, string[]>;
|
|
1638
1631
|
/**
|
|
1639
1632
|
* Returns the current storage status for the Room, and triggers
|
|
1640
1633
|
* a re-render whenever it changes. Can be used to render a "Saving..."
|
|
@@ -1891,7 +1884,7 @@ declare function useAttachmentUrlSuspense(attachmentId: string): {
|
|
|
1891
1884
|
/**
|
|
1892
1885
|
* @private For internal use only. Do not rely on this hook.
|
|
1893
1886
|
*/
|
|
1894
|
-
declare function useRoomPermissions(roomId: string): Set<
|
|
1887
|
+
declare function useRoomPermissions(roomId: string): Set<unknown>;
|
|
1895
1888
|
/**
|
|
1896
1889
|
* Creates a RoomProvider and a set of typed hooks to use in your app. Note
|
|
1897
1890
|
* that any RoomProvider created in this way does not need to be nested in
|
|
@@ -2368,4 +2361,4 @@ declare const _useStorageRoot: TypedBundle["useStorageRoot"];
|
|
|
2368
2361
|
*/
|
|
2369
2362
|
declare const _useUpdateMyPresence: TypedBundle["useUpdateMyPresence"];
|
|
2370
2363
|
|
|
2371
|
-
export {
|
|
2364
|
+
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,5 @@
|
|
|
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-FAbgoSMw.mjs';
|
|
3
3
|
export { Json, JsonObject, shallow } from '@liveblocks/client';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '@liveblocks/core';
|
package/dist/suspense.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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-FAbgoSMw.js';
|
|
3
3
|
export { Json, JsonObject, shallow } from '@liveblocks/client';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '@liveblocks/core';
|