@liveblocks/react 2.7.0-versions → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-GN5SQAIY.js → chunk-KNPU4P3Y.js} +1060 -664
- package/dist/chunk-KNPU4P3Y.js.map +1 -0
- package/dist/{chunk-EDJS5J5R.mjs → chunk-OKR7ROQ5.mjs} +1065 -669
- package/dist/chunk-OKR7ROQ5.mjs.map +1 -0
- package/dist/index.d.mts +2 -10
- package/dist/index.d.ts +2 -10
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -3
- package/dist/index.mjs.map +1 -1
- package/dist/{suspense-2UL0jBvg.d.mts → suspense-pL0llH_6.d.mts} +283 -30
- package/dist/{suspense-2UL0jBvg.d.ts → suspense-pL0llH_6.d.ts} +283 -30
- package/dist/suspense.d.mts +1 -1
- package/dist/suspense.d.ts +1 -1
- package/dist/suspense.js +3 -3
- package/dist/suspense.mjs +1 -1
- package/package.json +3 -3
- package/dist/chunk-EDJS5J5R.mjs.map +0 -1
- package/dist/chunk-GN5SQAIY.js.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export { b as ClientContext, C as ClientSideSuspense, X as CreateThreadError, L as LiveblocksProvider, M as MutationContext, R as RoomContext, i as RoomProvider, a as UseStorageStatusOptions, c as createLiveblocksContext, h as createRoomContext, j as useAddReaction, k as useBatch, l as useBroadcastEvent, m as useCanRedo, n as useCanUndo, u as useClient, W as useCommentsErrorListener, o as useCreateComment, p as useCreateThread, f as useDeleteAllInboxNotifications, q as useDeleteComment, g as useDeleteInboxNotification, r as useDeleteThread, s as useEditComment, t as useEditThreadMetadata, x as useErrorListener, y as useEventListener, z as useHistory, V as useHistoryVersionData, a5 as useHistoryVersions, _ as useInboxNotificationThread, a6 as useInboxNotifications, A as useIsInsideRoom, B as useLostConnectionListener, d as useMarkAllInboxNotificationsAsRead, e as useMarkInboxNotificationAsRead, D as useMarkThreadAsRead, v as useMarkThreadAsResolved, w as useMarkThreadAsUnresolved, E as useMutation, F as useMyPresence, Y as useOther, Z as useOthers, $ as useOthersConnectionIds, G as useOthersListener, a0 as useOthersMapped, H as useRedo, I as useRemoveReaction, J as useRoom, a8 as useRoomInfo, K as useRoomNotificationSettings, a1 as useSelf, N as useStatus, a2 as useStorage, O as useStorageRoot, a3 as useStorageStatus, P as useThreadSubscription, a4 as useThreads, Q as useUndo, a9 as useUnreadInboxNotificationsCount, S as useUpdateMyPresence, T as useUpdateRoomNotificationSettings, aa as useUser, a7 as useUserThreads_experimental } from './suspense-2UL0jBvg.mjs';
|
|
1
|
+
export { b as ClientContext, C as ClientSideSuspense, X as CreateThreadError, L as LiveblocksProvider, M as MutationContext, R as RoomContext, i as RoomProvider, U as UseStorageStatusOptions, a as UseThreadsOptions, c as createLiveblocksContext, h as createRoomContext, ab as getUmbrellaStoreForClient, ac as selectRoomThreads, j as useAddReaction, k as useBatch, l as useBroadcastEvent, m as useCanRedo, n as useCanUndo, u as useClient, W as useCommentsErrorListener, o as useCreateComment, p as useCreateThread, f as useDeleteAllInboxNotifications, q as useDeleteComment, g as useDeleteInboxNotification, r as useDeleteThread, s as useEditComment, t as useEditThreadMetadata, x as useErrorListener, y as useEventListener, z as useHistory, V as useHistoryVersionData, a5 as useHistoryVersions, _ as useInboxNotificationThread, a6 as useInboxNotifications, A as useIsInsideRoom, B as useLostConnectionListener, d as useMarkAllInboxNotificationsAsRead, e as useMarkInboxNotificationAsRead, D as useMarkThreadAsRead, v as useMarkThreadAsResolved, w as useMarkThreadAsUnresolved, E as useMutation, F as useMyPresence, Y as useOther, Z as useOthers, $ as useOthersConnectionIds, G as useOthersListener, a0 as useOthersMapped, H as useRedo, I as useRemoveReaction, J as useRoom, a8 as useRoomInfo, K as useRoomNotificationSettings, a1 as useSelf, N as useStatus, a2 as useStorage, O as useStorageRoot, a3 as useStorageStatus, P as useThreadSubscription, a4 as useThreads, Q as useUndo, a9 as useUnreadInboxNotificationsCount, S as useUpdateMyPresence, T as useUpdateRoomNotificationSettings, aa as useUser, a7 as useUserThreads_experimental } from './suspense-pL0llH_6.mjs';
|
|
3
2
|
export { Json, JsonObject, shallow } from '@liveblocks/client';
|
|
4
|
-
import { BaseMetadata, CacheState, ThreadData } from '@liveblocks/core';
|
|
5
3
|
import 'react';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @private Do not rely on this internal API.
|
|
9
|
-
*/
|
|
10
|
-
declare function selectedThreads<M extends BaseMetadata>(roomId: string, state: CacheState<M>, options: UseThreadsOptions<M>): ThreadData<M>[];
|
|
11
|
-
|
|
12
|
-
export { UseThreadsOptions, selectedThreads };
|
|
4
|
+
import '@liveblocks/core';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export { b as ClientContext, C as ClientSideSuspense, X as CreateThreadError, L as LiveblocksProvider, M as MutationContext, R as RoomContext, i as RoomProvider, a as UseStorageStatusOptions, c as createLiveblocksContext, h as createRoomContext, j as useAddReaction, k as useBatch, l as useBroadcastEvent, m as useCanRedo, n as useCanUndo, u as useClient, W as useCommentsErrorListener, o as useCreateComment, p as useCreateThread, f as useDeleteAllInboxNotifications, q as useDeleteComment, g as useDeleteInboxNotification, r as useDeleteThread, s as useEditComment, t as useEditThreadMetadata, x as useErrorListener, y as useEventListener, z as useHistory, V as useHistoryVersionData, a5 as useHistoryVersions, _ as useInboxNotificationThread, a6 as useInboxNotifications, A as useIsInsideRoom, B as useLostConnectionListener, d as useMarkAllInboxNotificationsAsRead, e as useMarkInboxNotificationAsRead, D as useMarkThreadAsRead, v as useMarkThreadAsResolved, w as useMarkThreadAsUnresolved, E as useMutation, F as useMyPresence, Y as useOther, Z as useOthers, $ as useOthersConnectionIds, G as useOthersListener, a0 as useOthersMapped, H as useRedo, I as useRemoveReaction, J as useRoom, a8 as useRoomInfo, K as useRoomNotificationSettings, a1 as useSelf, N as useStatus, a2 as useStorage, O as useStorageRoot, a3 as useStorageStatus, P as useThreadSubscription, a4 as useThreads, Q as useUndo, a9 as useUnreadInboxNotificationsCount, S as useUpdateMyPresence, T as useUpdateRoomNotificationSettings, aa as useUser, a7 as useUserThreads_experimental } from './suspense-2UL0jBvg.js';
|
|
1
|
+
export { b as ClientContext, C as ClientSideSuspense, X as CreateThreadError, L as LiveblocksProvider, M as MutationContext, R as RoomContext, i as RoomProvider, U as UseStorageStatusOptions, a as UseThreadsOptions, c as createLiveblocksContext, h as createRoomContext, ab as getUmbrellaStoreForClient, ac as selectRoomThreads, j as useAddReaction, k as useBatch, l as useBroadcastEvent, m as useCanRedo, n as useCanUndo, u as useClient, W as useCommentsErrorListener, o as useCreateComment, p as useCreateThread, f as useDeleteAllInboxNotifications, q as useDeleteComment, g as useDeleteInboxNotification, r as useDeleteThread, s as useEditComment, t as useEditThreadMetadata, x as useErrorListener, y as useEventListener, z as useHistory, V as useHistoryVersionData, a5 as useHistoryVersions, _ as useInboxNotificationThread, a6 as useInboxNotifications, A as useIsInsideRoom, B as useLostConnectionListener, d as useMarkAllInboxNotificationsAsRead, e as useMarkInboxNotificationAsRead, D as useMarkThreadAsRead, v as useMarkThreadAsResolved, w as useMarkThreadAsUnresolved, E as useMutation, F as useMyPresence, Y as useOther, Z as useOthers, $ as useOthersConnectionIds, G as useOthersListener, a0 as useOthersMapped, H as useRedo, I as useRemoveReaction, J as useRoom, a8 as useRoomInfo, K as useRoomNotificationSettings, a1 as useSelf, N as useStatus, a2 as useStorage, O as useStorageRoot, a3 as useStorageStatus, P as useThreadSubscription, a4 as useThreads, Q as useUndo, a9 as useUnreadInboxNotificationsCount, S as useUpdateMyPresence, T as useUpdateRoomNotificationSettings, aa as useUser, a7 as useUserThreads_experimental } from './suspense-pL0llH_6.js';
|
|
3
2
|
export { Json, JsonObject, shallow } from '@liveblocks/client';
|
|
4
|
-
import { BaseMetadata, CacheState, ThreadData } from '@liveblocks/core';
|
|
5
3
|
import 'react';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @private Do not rely on this internal API.
|
|
9
|
-
*/
|
|
10
|
-
declare function selectedThreads<M extends BaseMetadata>(roomId: string, state: CacheState<M>, options: UseThreadsOptions<M>): ThreadData<M>[];
|
|
11
|
-
|
|
12
|
-
export { UseThreadsOptions, selectedThreads };
|
|
4
|
+
import '@liveblocks/core';
|
package/dist/index.js
CHANGED
|
@@ -65,12 +65,14 @@
|
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
|
|
69
|
+
var _chunkKNPU4P3Yjs = require('./chunk-KNPU4P3Y.js');
|
|
69
70
|
|
|
70
71
|
// src/index.ts
|
|
71
72
|
var _core = require('@liveblocks/core');
|
|
72
73
|
var _client = require('@liveblocks/client');
|
|
73
|
-
_core.detectDupes.call(void 0,
|
|
74
|
+
_core.detectDupes.call(void 0, _chunkKNPU4P3Yjs.PKG_NAME, _chunkKNPU4P3Yjs.PKG_VERSION, _chunkKNPU4P3Yjs.PKG_FORMAT);
|
|
75
|
+
|
|
74
76
|
|
|
75
77
|
|
|
76
78
|
|
|
@@ -136,5 +138,5 @@ _core.detectDupes.call(void 0, _chunkGN5SQAIYjs.PKG_NAME, _chunkGN5SQAIYjs.PKG_V
|
|
|
136
138
|
|
|
137
139
|
|
|
138
140
|
|
|
139
|
-
exports.ClientContext =
|
|
141
|
+
exports.ClientContext = _chunkKNPU4P3Yjs.ClientContext; exports.ClientSideSuspense = _chunkKNPU4P3Yjs.ClientSideSuspense; exports.CreateThreadError = _chunkKNPU4P3Yjs.CreateThreadError; exports.LiveblocksProvider = _chunkKNPU4P3Yjs.LiveblocksProvider; exports.RoomContext = _chunkKNPU4P3Yjs.RoomContext; exports.RoomProvider = _chunkKNPU4P3Yjs._RoomProvider; exports.createLiveblocksContext = _chunkKNPU4P3Yjs.createLiveblocksContext; exports.createRoomContext = _chunkKNPU4P3Yjs.createRoomContext; exports.getUmbrellaStoreForClient = _chunkKNPU4P3Yjs.getUmbrellaStoreForClient; exports.selectRoomThreads = _chunkKNPU4P3Yjs.selectRoomThreads; exports.shallow = _client.shallow; exports.useAddReaction = _chunkKNPU4P3Yjs._useAddReaction; exports.useBatch = _chunkKNPU4P3Yjs.useBatch; exports.useBroadcastEvent = _chunkKNPU4P3Yjs._useBroadcastEvent; exports.useCanRedo = _chunkKNPU4P3Yjs.useCanRedo; exports.useCanUndo = _chunkKNPU4P3Yjs.useCanUndo; exports.useClient = _chunkKNPU4P3Yjs.useClient; exports.useCommentsErrorListener = _chunkKNPU4P3Yjs.useCommentsErrorListener; exports.useCreateComment = _chunkKNPU4P3Yjs.useCreateComment; exports.useCreateThread = _chunkKNPU4P3Yjs._useCreateThread; exports.useDeleteAllInboxNotifications = _chunkKNPU4P3Yjs.useDeleteAllInboxNotifications; exports.useDeleteComment = _chunkKNPU4P3Yjs.useDeleteComment; exports.useDeleteInboxNotification = _chunkKNPU4P3Yjs.useDeleteInboxNotification; exports.useDeleteThread = _chunkKNPU4P3Yjs._useDeleteThread; exports.useEditComment = _chunkKNPU4P3Yjs.useEditComment; exports.useEditThreadMetadata = _chunkKNPU4P3Yjs._useEditThreadMetadata; exports.useErrorListener = _chunkKNPU4P3Yjs.useErrorListener; exports.useEventListener = _chunkKNPU4P3Yjs._useEventListener; exports.useHistory = _chunkKNPU4P3Yjs.useHistory; exports.useHistoryVersionData = _chunkKNPU4P3Yjs.useHistoryVersionData; exports.useHistoryVersions = _chunkKNPU4P3Yjs._useHistoryVersions; exports.useInboxNotificationThread = _chunkKNPU4P3Yjs._useInboxNotificationThread; exports.useInboxNotifications = _chunkKNPU4P3Yjs.useInboxNotifications; exports.useIsInsideRoom = _chunkKNPU4P3Yjs._useIsInsideRoom; exports.useLostConnectionListener = _chunkKNPU4P3Yjs.useLostConnectionListener; exports.useMarkAllInboxNotificationsAsRead = _chunkKNPU4P3Yjs.useMarkAllInboxNotificationsAsRead; exports.useMarkInboxNotificationAsRead = _chunkKNPU4P3Yjs.useMarkInboxNotificationAsRead; exports.useMarkThreadAsRead = _chunkKNPU4P3Yjs.useMarkThreadAsRead; exports.useMarkThreadAsResolved = _chunkKNPU4P3Yjs.useMarkThreadAsResolved; exports.useMarkThreadAsUnresolved = _chunkKNPU4P3Yjs.useMarkThreadAsUnresolved; exports.useMutation = _chunkKNPU4P3Yjs._useMutation; exports.useMyPresence = _chunkKNPU4P3Yjs._useMyPresence; exports.useOther = _chunkKNPU4P3Yjs._useOther; exports.useOthers = _chunkKNPU4P3Yjs._useOthers; exports.useOthersConnectionIds = _chunkKNPU4P3Yjs.useOthersConnectionIds; exports.useOthersListener = _chunkKNPU4P3Yjs._useOthersListener; exports.useOthersMapped = _chunkKNPU4P3Yjs._useOthersMapped; exports.useRedo = _chunkKNPU4P3Yjs.useRedo; exports.useRemoveReaction = _chunkKNPU4P3Yjs.useRemoveReaction; exports.useRoom = _chunkKNPU4P3Yjs._useRoom; exports.useRoomInfo = _chunkKNPU4P3Yjs.useRoomInfo; exports.useRoomNotificationSettings = _chunkKNPU4P3Yjs.useRoomNotificationSettings; exports.useSelf = _chunkKNPU4P3Yjs._useSelf; exports.useStatus = _chunkKNPU4P3Yjs.useStatus; exports.useStorage = _chunkKNPU4P3Yjs._useStorage; exports.useStorageRoot = _chunkKNPU4P3Yjs._useStorageRoot; exports.useStorageStatus = _chunkKNPU4P3Yjs.useStorageStatus; exports.useThreadSubscription = _chunkKNPU4P3Yjs.useThreadSubscription; exports.useThreads = _chunkKNPU4P3Yjs._useThreads; exports.useUndo = _chunkKNPU4P3Yjs.useUndo; exports.useUnreadInboxNotificationsCount = _chunkKNPU4P3Yjs.useUnreadInboxNotificationsCount; exports.useUpdateMyPresence = _chunkKNPU4P3Yjs._useUpdateMyPresence; exports.useUpdateRoomNotificationSettings = _chunkKNPU4P3Yjs.useUpdateRoomNotificationSettings; exports.useUser = _chunkKNPU4P3Yjs._useUser; exports.useUserThreads_experimental = _chunkKNPU4P3Yjs._useUserThreads_experimental;
|
|
140
142
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,mBAAmB;AAc5B,SAAS,eAAe;AAXxB,YAAY,UAAU,aAAa,UAAU","sourcesContent":["/* eslint-disable simple-import-sort/exports */\nimport { detectDupes } from \"@liveblocks/core\";\n\nimport { PKG_FORMAT, PKG_NAME, PKG_VERSION } from \"./version\";\ndetectDupes(PKG_NAME, PKG_VERSION, PKG_FORMAT);\n\nexport { ClientSideSuspense } from \"./ClientSideSuspense\";\nexport type {\n MutationContext,\n UseStorageStatusOptions,\n UseThreadsOptions,\n} from \"./types\";\n\n// Re-exports from @liveblocks/client, for convenience\nexport type { Json, JsonObject } from \"@liveblocks/client\";\nexport { shallow } from \"@liveblocks/client\";\n\n// Export all the top-level hooks\nexport {\n ClientContext,\n LiveblocksProvider,\n createLiveblocksContext,\n useClient,\n useInboxNotificationThread,\n useMarkAllInboxNotificationsAsRead,\n useMarkInboxNotificationAsRead,\n useDeleteAllInboxNotifications,\n useDeleteInboxNotification,\n} from \"./liveblocks\";\nexport {\n createRoomContext,\n RoomContext,\n RoomProvider,\n useAddReaction,\n useBatch,\n useBroadcastEvent,\n useCanRedo,\n useCanUndo,\n useCreateComment,\n useCreateThread,\n useDeleteComment,\n useDeleteThread,\n useEditComment,\n useEditThreadMetadata,\n useMarkThreadAsResolved,\n useMarkThreadAsUnresolved,\n useErrorListener,\n useEventListener,\n useHistory,\n useIsInsideRoom,\n useLostConnectionListener,\n useMarkThreadAsRead,\n useMutation,\n useMyPresence,\n useOthersListener,\n useRedo,\n useRemoveReaction,\n useRoom,\n useRoomNotificationSettings,\n useStatus,\n useStorageRoot,\n useThreadSubscription,\n useUndo,\n useUpdateMyPresence,\n useUpdateRoomNotificationSettings,\n useHistoryVersionData,\n} from \"./room\";\n\nexport { useCommentsErrorListener, CreateThreadError } from \"./room\";\n\n// Export the classic (non-Suspense) versions of our hooks\n// (This part differs from src/suspense.ts)\nexport {\n useOther,\n useOthers,\n useOthersConnectionIds,\n useOthersMapped,\n useSelf,\n useStorage,\n useStorageStatus,\n useThreads,\n useHistoryVersions,\n} from \"./room\";\nexport {\n useInboxNotifications,\n useUserThreads_experimental as useUserThreads_experimental,\n useRoomInfo,\n useUnreadInboxNotificationsCount,\n useUser,\n} from \"./liveblocks\";\n\n// Private APIs (for use in react-lexical only)\nexport { getUmbrellaStoreForClient } from \"./liveblocks\";\nexport { selectRoomThreads } from \"./room\";\n"]}
|
package/dist/index.mjs
CHANGED
|
@@ -33,7 +33,8 @@ import {
|
|
|
33
33
|
_useUserThreads_experimental,
|
|
34
34
|
createLiveblocksContext,
|
|
35
35
|
createRoomContext,
|
|
36
|
-
|
|
36
|
+
getUmbrellaStoreForClient,
|
|
37
|
+
selectRoomThreads,
|
|
37
38
|
useBatch,
|
|
38
39
|
useCanRedo,
|
|
39
40
|
useCanUndo,
|
|
@@ -65,7 +66,7 @@ import {
|
|
|
65
66
|
useUndo,
|
|
66
67
|
useUnreadInboxNotificationsCount,
|
|
67
68
|
useUpdateRoomNotificationSettings
|
|
68
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-OKR7ROQ5.mjs";
|
|
69
70
|
|
|
70
71
|
// src/index.ts
|
|
71
72
|
import { detectDupes } from "@liveblocks/core";
|
|
@@ -80,7 +81,8 @@ export {
|
|
|
80
81
|
_RoomProvider as RoomProvider,
|
|
81
82
|
createLiveblocksContext,
|
|
82
83
|
createRoomContext,
|
|
83
|
-
|
|
84
|
+
getUmbrellaStoreForClient,
|
|
85
|
+
selectRoomThreads,
|
|
84
86
|
shallow,
|
|
85
87
|
_useAddReaction as useAddReaction,
|
|
86
88
|
useBatch,
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable simple-import-sort/exports */\nimport { detectDupes } from \"@liveblocks/core\";\n\nimport { PKG_FORMAT, PKG_NAME, PKG_VERSION } from \"./version\";\ndetectDupes(PKG_NAME, PKG_VERSION, PKG_FORMAT);\n\nexport { ClientSideSuspense } from \"./ClientSideSuspense\";\nexport type {\n MutationContext,\n UseStorageStatusOptions,\n UseThreadsOptions,\n} from \"./types\";\n\n// Re-exports from @liveblocks/client, for convenience\nexport type { Json, JsonObject } from \"@liveblocks/client\";\nexport { shallow } from \"@liveblocks/client\";\n\n// Export all the top-level hooks\nexport {\n ClientContext,\n LiveblocksProvider,\n createLiveblocksContext,\n useClient,\n useInboxNotificationThread,\n useMarkAllInboxNotificationsAsRead,\n useMarkInboxNotificationAsRead,\n useDeleteAllInboxNotifications,\n useDeleteInboxNotification,\n} from \"./liveblocks\";\nexport {\n createRoomContext,\n RoomContext,\n RoomProvider,\n useAddReaction,\n useBatch,\n useBroadcastEvent,\n useCanRedo,\n useCanUndo,\n useCreateComment,\n useCreateThread,\n useDeleteComment,\n useDeleteThread,\n useEditComment,\n useEditThreadMetadata,\n useMarkThreadAsResolved,\n useMarkThreadAsUnresolved,\n useErrorListener,\n useEventListener,\n useHistory,\n useIsInsideRoom,\n useLostConnectionListener,\n useMarkThreadAsRead,\n useMutation,\n useMyPresence,\n useOthersListener,\n useRedo,\n useRemoveReaction,\n useRoom,\n useRoomNotificationSettings,\n useStatus,\n useStorageRoot,\n useThreadSubscription,\n useUndo,\n useUpdateMyPresence,\n useUpdateRoomNotificationSettings,\n useHistoryVersionData,\n} from \"./room\";\n\nexport { useCommentsErrorListener, CreateThreadError } from \"./room\";\
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable simple-import-sort/exports */\nimport { detectDupes } from \"@liveblocks/core\";\n\nimport { PKG_FORMAT, PKG_NAME, PKG_VERSION } from \"./version\";\ndetectDupes(PKG_NAME, PKG_VERSION, PKG_FORMAT);\n\nexport { ClientSideSuspense } from \"./ClientSideSuspense\";\nexport type {\n MutationContext,\n UseStorageStatusOptions,\n UseThreadsOptions,\n} from \"./types\";\n\n// Re-exports from @liveblocks/client, for convenience\nexport type { Json, JsonObject } from \"@liveblocks/client\";\nexport { shallow } from \"@liveblocks/client\";\n\n// Export all the top-level hooks\nexport {\n ClientContext,\n LiveblocksProvider,\n createLiveblocksContext,\n useClient,\n useInboxNotificationThread,\n useMarkAllInboxNotificationsAsRead,\n useMarkInboxNotificationAsRead,\n useDeleteAllInboxNotifications,\n useDeleteInboxNotification,\n} from \"./liveblocks\";\nexport {\n createRoomContext,\n RoomContext,\n RoomProvider,\n useAddReaction,\n useBatch,\n useBroadcastEvent,\n useCanRedo,\n useCanUndo,\n useCreateComment,\n useCreateThread,\n useDeleteComment,\n useDeleteThread,\n useEditComment,\n useEditThreadMetadata,\n useMarkThreadAsResolved,\n useMarkThreadAsUnresolved,\n useErrorListener,\n useEventListener,\n useHistory,\n useIsInsideRoom,\n useLostConnectionListener,\n useMarkThreadAsRead,\n useMutation,\n useMyPresence,\n useOthersListener,\n useRedo,\n useRemoveReaction,\n useRoom,\n useRoomNotificationSettings,\n useStatus,\n useStorageRoot,\n useThreadSubscription,\n useUndo,\n useUpdateMyPresence,\n useUpdateRoomNotificationSettings,\n useHistoryVersionData,\n} from \"./room\";\n\nexport { useCommentsErrorListener, CreateThreadError } from \"./room\";\n\n// Export the classic (non-Suspense) versions of our hooks\n// (This part differs from src/suspense.ts)\nexport {\n useOther,\n useOthers,\n useOthersConnectionIds,\n useOthersMapped,\n useSelf,\n useStorage,\n useStorageStatus,\n useThreads,\n useHistoryVersions,\n} from \"./room\";\nexport {\n useInboxNotifications,\n useUserThreads_experimental as useUserThreads_experimental,\n useRoomInfo,\n useUnreadInboxNotificationsCount,\n useUser,\n} from \"./liveblocks\";\n\n// Private APIs (for use in react-lexical only)\nexport { getUmbrellaStoreForClient } from \"./liveblocks\";\nexport { selectRoomThreads } from \"./room\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,mBAAmB;AAc5B,SAAS,eAAe;AAXxB,YAAY,UAAU,aAAa,UAAU;","names":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { JsonObject, LsonObject, BaseUserMeta, LiveObject, User, Json, RoomNotificationSettings, Room, Status, BroadcastOptions, OthersEvent, LostConnectionEvent, History, BaseMetadata as BaseMetadata$1, Client as Client$1, ClientOptions, ThreadData as ThreadData$1, StorageStatus as StorageStatus$1, CommentData as CommentData$1 } from '@liveblocks/client';
|
|
1
2
|
import * as React$1 from 'react';
|
|
2
3
|
import React__default, { ReactNode, PropsWithChildren } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import { BaseMetadata, CommentBody, Patchable, QueryMetadata, StorageStatus, AsyncResultWithDataField, DRI, Resolve, InboxNotificationData, ToImmutable, ThreadData, HistoryVersion, Client, LiveblocksError, RoomEventMessage, CommentData, PartialUnless, OpaqueClient, DU, ClientOptions, DM, OpaqueRoom, RoomNotificationSettings as RoomNotificationSettings$1, DP, DS, DE } from '@liveblocks/core';
|
|
4
|
+
import { BaseMetadata, CommentBody, Patchable, StorageStatus, QueryMetadata, AsyncResultWithDataField, DRI, Resolve, InboxNotificationData, ToImmutable, ThreadData, HistoryVersion, Client, LiveblocksError, RoomEventMessage, CommentData, PartialUnless, ThreadDataWithDeleteInfo, RoomNotificationSettings as RoomNotificationSettings$1, ThreadDeleteInfo, InboxNotificationDeleteInfo, DistributiveOmit, CommentUserReaction, AsyncResult, OpaqueClient, DU, DM, OpaqueRoom, DP, DS, DE } from '@liveblocks/core';
|
|
5
5
|
|
|
6
6
|
declare type Props = {
|
|
7
7
|
fallback: ReactNode;
|
|
@@ -132,23 +132,31 @@ declare type UseStorageStatusOptions = {
|
|
|
132
132
|
smooth?: boolean;
|
|
133
133
|
};
|
|
134
134
|
declare type StorageStatusSuccess = Exclude<StorageStatus, "not-loaded" | "loading">;
|
|
135
|
+
declare type ThreadsQuery<M extends BaseMetadata> = {
|
|
136
|
+
/**
|
|
137
|
+
* Whether to only return threads marked as resolved or unresolved. If not provided,
|
|
138
|
+
* all threads will be returned.
|
|
139
|
+
*/
|
|
140
|
+
resolved?: boolean;
|
|
141
|
+
/**
|
|
142
|
+
* The metadata to filter the threads by. If provided, only threads with metadata that matches
|
|
143
|
+
* the provided metadata will be returned. If not provided, all threads will be returned.
|
|
144
|
+
*/
|
|
145
|
+
metadata?: Partial<QueryMetadata<M>>;
|
|
146
|
+
};
|
|
147
|
+
declare type UseUserThreadsOptions<M extends BaseMetadata> = {
|
|
148
|
+
/**
|
|
149
|
+
* The query (including metadata) to filter the threads by. If provided, only threads
|
|
150
|
+
* that match the query will be returned. If not provided, all threads will be returned.
|
|
151
|
+
*/
|
|
152
|
+
query?: ThreadsQuery<M>;
|
|
153
|
+
};
|
|
135
154
|
declare type UseThreadsOptions<M extends BaseMetadata> = {
|
|
136
155
|
/**
|
|
137
156
|
* The query (including metadata) to filter the threads by. If provided, only threads
|
|
138
157
|
* that match the query will be returned. If not provided, all threads will be returned.
|
|
139
158
|
*/
|
|
140
|
-
query?:
|
|
141
|
-
/**
|
|
142
|
-
* Whether to only return threads marked as resolved or unresolved. If not provided,
|
|
143
|
-
* all threads will be returned.
|
|
144
|
-
*/
|
|
145
|
-
resolved?: boolean;
|
|
146
|
-
/**
|
|
147
|
-
* The metadata to filter the threads by. If provided, only threads with metadata that matches
|
|
148
|
-
* the provided metadata will be returned. If not provided, all threads will be returned.
|
|
149
|
-
*/
|
|
150
|
-
metadata?: Partial<QueryMetadata<M>>;
|
|
151
|
-
};
|
|
159
|
+
query?: ThreadsQuery<M>;
|
|
152
160
|
/**
|
|
153
161
|
* Whether to scroll to a comment on load based on the URL hash. Defaults to `true`.
|
|
154
162
|
*
|
|
@@ -915,14 +923,14 @@ declare type RoomContextBundle<P extends JsonObject, S extends LsonObject, U ext
|
|
|
915
923
|
(settings: Partial<RoomNotificationSettings>) => void
|
|
916
924
|
];
|
|
917
925
|
/**
|
|
918
|
-
* Returns a history of versions of the current room.
|
|
926
|
+
* (Private beta) Returns a history of versions of the current room.
|
|
919
927
|
*
|
|
920
928
|
* @example
|
|
921
929
|
* const { versions, error, isLoading } = useHistoryVersions();
|
|
922
930
|
*/
|
|
923
931
|
useHistoryVersions(): HistoryVersionsState;
|
|
924
932
|
/**
|
|
925
|
-
* Returns the data of a specific version of the current room.
|
|
933
|
+
* (Private beta) Returns the data of a specific version of the current room.
|
|
926
934
|
*
|
|
927
935
|
* @example
|
|
928
936
|
* const { data, error, isLoading } = useHistoryVersionData(version.id);
|
|
@@ -991,7 +999,7 @@ declare type RoomContextBundle<P extends JsonObject, S extends LsonObject, U ext
|
|
|
991
999
|
*/
|
|
992
1000
|
useThreads(options?: UseThreadsOptions<M>): ThreadsStateSuccess<M>;
|
|
993
1001
|
/**
|
|
994
|
-
* Returns a history of versions of the current room.
|
|
1002
|
+
* (Private beta) Returns a history of versions of the current room.
|
|
995
1003
|
*
|
|
996
1004
|
* @example
|
|
997
1005
|
* const { versions } = useHistoryVersions();
|
|
@@ -1087,9 +1095,9 @@ declare type LiveblocksContextBundle<U extends BaseUserMeta, M extends BaseMetad
|
|
|
1087
1095
|
* @experimental
|
|
1088
1096
|
*
|
|
1089
1097
|
* This hook is experimental and could be removed or changed at any time!
|
|
1090
|
-
* Do not use unless
|
|
1098
|
+
* Do not use unless explicitly recommended by the Liveblocks team.
|
|
1091
1099
|
*/
|
|
1092
|
-
useUserThreads_experimental(): ThreadsState<M>;
|
|
1100
|
+
useUserThreads_experimental(options?: UseUserThreadsOptions<M>): ThreadsState<M>;
|
|
1093
1101
|
suspense: Resolve<LiveblocksContextBundleCommon<M> & SharedContextBundle<U>["suspense"] & {
|
|
1094
1102
|
/**
|
|
1095
1103
|
* Returns the inbox notifications for the current user.
|
|
@@ -1109,12 +1117,223 @@ declare type LiveblocksContextBundle<U extends BaseUserMeta, M extends BaseMetad
|
|
|
1109
1117
|
* @experimental
|
|
1110
1118
|
*
|
|
1111
1119
|
* This hook is experimental and could be removed or changed at any time!
|
|
1112
|
-
* Do not use unless
|
|
1120
|
+
* Do not use unless explicitly recommended by the Liveblocks team.
|
|
1113
1121
|
*/
|
|
1114
|
-
useUserThreads_experimental(): ThreadsStateSuccess<M>;
|
|
1122
|
+
useUserThreads_experimental(options?: UseUserThreadsOptions<M>): ThreadsStateSuccess<M>;
|
|
1115
1123
|
}>;
|
|
1116
1124
|
}>;
|
|
1117
1125
|
|
|
1126
|
+
declare type OptimisticUpdate<M extends BaseMetadata> = CreateThreadOptimisticUpdate<M> | DeleteThreadOptimisticUpdate | EditThreadMetadataOptimisticUpdate<M> | MarkThreadAsResolvedOptimisticUpdate | MarkThreadAsUnresolvedOptimisticUpdate | CreateCommentOptimisticUpdate | EditCommentOptimisticUpdate | DeleteCommentOptimisticUpdate | AddReactionOptimisticUpdate | RemoveReactionOptimisticUpdate | MarkInboxNotificationAsReadOptimisticUpdate | MarkAllInboxNotificationsAsReadOptimisticUpdate | DeleteInboxNotificationOptimisticUpdate | DeleteAllInboxNotificationsOptimisticUpdate | UpdateNotificationSettingsOptimisticUpdate;
|
|
1127
|
+
declare type CreateThreadOptimisticUpdate<M extends BaseMetadata> = {
|
|
1128
|
+
type: "create-thread";
|
|
1129
|
+
id: string;
|
|
1130
|
+
roomId: string;
|
|
1131
|
+
thread: ThreadData<M>;
|
|
1132
|
+
};
|
|
1133
|
+
declare type DeleteThreadOptimisticUpdate = {
|
|
1134
|
+
type: "delete-thread";
|
|
1135
|
+
id: string;
|
|
1136
|
+
roomId: string;
|
|
1137
|
+
threadId: string;
|
|
1138
|
+
deletedAt: Date;
|
|
1139
|
+
};
|
|
1140
|
+
declare type EditThreadMetadataOptimisticUpdate<M extends BaseMetadata> = {
|
|
1141
|
+
type: "edit-thread-metadata";
|
|
1142
|
+
id: string;
|
|
1143
|
+
threadId: string;
|
|
1144
|
+
metadata: Resolve<Patchable<M>>;
|
|
1145
|
+
updatedAt: Date;
|
|
1146
|
+
};
|
|
1147
|
+
declare type MarkThreadAsResolvedOptimisticUpdate = {
|
|
1148
|
+
type: "mark-thread-as-resolved";
|
|
1149
|
+
id: string;
|
|
1150
|
+
threadId: string;
|
|
1151
|
+
updatedAt: Date;
|
|
1152
|
+
};
|
|
1153
|
+
declare type MarkThreadAsUnresolvedOptimisticUpdate = {
|
|
1154
|
+
type: "mark-thread-as-unresolved";
|
|
1155
|
+
id: string;
|
|
1156
|
+
threadId: string;
|
|
1157
|
+
updatedAt: Date;
|
|
1158
|
+
};
|
|
1159
|
+
declare type CreateCommentOptimisticUpdate = {
|
|
1160
|
+
type: "create-comment";
|
|
1161
|
+
id: string;
|
|
1162
|
+
comment: CommentData;
|
|
1163
|
+
};
|
|
1164
|
+
declare type EditCommentOptimisticUpdate = {
|
|
1165
|
+
type: "edit-comment";
|
|
1166
|
+
id: string;
|
|
1167
|
+
comment: CommentData;
|
|
1168
|
+
};
|
|
1169
|
+
declare type DeleteCommentOptimisticUpdate = {
|
|
1170
|
+
type: "delete-comment";
|
|
1171
|
+
id: string;
|
|
1172
|
+
roomId: string;
|
|
1173
|
+
threadId: string;
|
|
1174
|
+
deletedAt: Date;
|
|
1175
|
+
commentId: string;
|
|
1176
|
+
};
|
|
1177
|
+
declare type AddReactionOptimisticUpdate = {
|
|
1178
|
+
type: "add-reaction";
|
|
1179
|
+
id: string;
|
|
1180
|
+
threadId: string;
|
|
1181
|
+
commentId: string;
|
|
1182
|
+
reaction: CommentUserReaction;
|
|
1183
|
+
};
|
|
1184
|
+
declare type RemoveReactionOptimisticUpdate = {
|
|
1185
|
+
type: "remove-reaction";
|
|
1186
|
+
id: string;
|
|
1187
|
+
threadId: string;
|
|
1188
|
+
commentId: string;
|
|
1189
|
+
emoji: string;
|
|
1190
|
+
userId: string;
|
|
1191
|
+
removedAt: Date;
|
|
1192
|
+
};
|
|
1193
|
+
declare type MarkInboxNotificationAsReadOptimisticUpdate = {
|
|
1194
|
+
type: "mark-inbox-notification-as-read";
|
|
1195
|
+
id: string;
|
|
1196
|
+
inboxNotificationId: string;
|
|
1197
|
+
readAt: Date;
|
|
1198
|
+
};
|
|
1199
|
+
declare type MarkAllInboxNotificationsAsReadOptimisticUpdate = {
|
|
1200
|
+
type: "mark-all-inbox-notifications-as-read";
|
|
1201
|
+
id: string;
|
|
1202
|
+
readAt: Date;
|
|
1203
|
+
};
|
|
1204
|
+
declare type DeleteInboxNotificationOptimisticUpdate = {
|
|
1205
|
+
type: "delete-inbox-notification";
|
|
1206
|
+
id: string;
|
|
1207
|
+
inboxNotificationId: string;
|
|
1208
|
+
deletedAt: Date;
|
|
1209
|
+
};
|
|
1210
|
+
declare type DeleteAllInboxNotificationsOptimisticUpdate = {
|
|
1211
|
+
type: "delete-all-inbox-notifications";
|
|
1212
|
+
id: string;
|
|
1213
|
+
deletedAt: Date;
|
|
1214
|
+
};
|
|
1215
|
+
declare type UpdateNotificationSettingsOptimisticUpdate = {
|
|
1216
|
+
type: "update-notification-settings";
|
|
1217
|
+
id: string;
|
|
1218
|
+
roomId: string;
|
|
1219
|
+
settings: Partial<RoomNotificationSettings$1>;
|
|
1220
|
+
};
|
|
1221
|
+
declare type QueryState = AsyncResult<undefined>;
|
|
1222
|
+
declare type UmbrellaStoreState<M extends BaseMetadata> = Readonly<{
|
|
1223
|
+
/**
|
|
1224
|
+
* Keep track of loading and error status of all the queries made by the client.
|
|
1225
|
+
* e.g. 'room-abc-{"color":"red"}' - ok
|
|
1226
|
+
* e.g. 'room-abc-{}' - loading
|
|
1227
|
+
*/
|
|
1228
|
+
queries: Record<string, QueryState>;
|
|
1229
|
+
/**
|
|
1230
|
+
* Optimistic updates that have not been acknowledged by the server yet.
|
|
1231
|
+
* They are applied on top of the threads in selectors.
|
|
1232
|
+
*/
|
|
1233
|
+
optimisticUpdates: readonly OptimisticUpdate<M>[];
|
|
1234
|
+
/**
|
|
1235
|
+
* Threads by ID
|
|
1236
|
+
* e.g. `th_${string}`
|
|
1237
|
+
*/
|
|
1238
|
+
threads: Record<string, ThreadDataWithDeleteInfo<M>>;
|
|
1239
|
+
/**
|
|
1240
|
+
* Inbox notifications by ID.
|
|
1241
|
+
* e.g. `in_${string}`
|
|
1242
|
+
*/
|
|
1243
|
+
inboxNotifications: Record<string, InboxNotificationData>;
|
|
1244
|
+
/**
|
|
1245
|
+
* Notification settings by room ID.
|
|
1246
|
+
* e.g. { 'room-abc': { threads: "all" },
|
|
1247
|
+
* 'room-def': { threads: "replies_and_mentions" },
|
|
1248
|
+
* 'room-xyz': { threads: "none" },
|
|
1249
|
+
* }
|
|
1250
|
+
*/
|
|
1251
|
+
notificationSettings: Record<string, RoomNotificationSettings$1>;
|
|
1252
|
+
/**
|
|
1253
|
+
* Versions per roomId
|
|
1254
|
+
* e.g. { 'room-abc': {versions: "all versions"}}
|
|
1255
|
+
*/
|
|
1256
|
+
versions: Record<string, HistoryVersion[]>;
|
|
1257
|
+
}>;
|
|
1258
|
+
declare class UmbrellaStore<M extends BaseMetadata> {
|
|
1259
|
+
private _store;
|
|
1260
|
+
constructor();
|
|
1261
|
+
get(): Readonly<UmbrellaStoreState<M>>;
|
|
1262
|
+
subscribe(callback: (state: Readonly<UmbrellaStoreState<M>>) => void): () => void;
|
|
1263
|
+
private updateThreadsCache;
|
|
1264
|
+
private updateInboxNotificationsCache;
|
|
1265
|
+
private setNotificationSettings;
|
|
1266
|
+
private setVersions;
|
|
1267
|
+
private setQueryState;
|
|
1268
|
+
private updateOptimisticUpdatesCache;
|
|
1269
|
+
/**
|
|
1270
|
+
* Updates an existing inbox notification with a new value, replacing the
|
|
1271
|
+
* corresponding optimistic update.
|
|
1272
|
+
*
|
|
1273
|
+
* This will not update anything if the inbox notification ID isn't found in
|
|
1274
|
+
* the cache.
|
|
1275
|
+
*/
|
|
1276
|
+
updateInboxNotification(inboxNotificationId: string, optimisticUpdateId: string, callback: (notification: Readonly<InboxNotificationData>) => Readonly<InboxNotificationData>): void;
|
|
1277
|
+
/**
|
|
1278
|
+
* Updates *all* inbox notifications by running a mapper function over all of
|
|
1279
|
+
* them, replacing the corresponding optimistic update.
|
|
1280
|
+
*/
|
|
1281
|
+
updateAllInboxNotifications(optimisticUpdateId: string, mapFn: (notification: Readonly<InboxNotificationData>) => Readonly<InboxNotificationData>): void;
|
|
1282
|
+
/**
|
|
1283
|
+
* Deletes an existing inbox notification, replacing the corresponding
|
|
1284
|
+
* optimistic update.
|
|
1285
|
+
*/
|
|
1286
|
+
deleteInboxNotification(inboxNotificationId: string, optimisticUpdateId: string): void;
|
|
1287
|
+
/**
|
|
1288
|
+
* Deletes *all* inbox notifications, replacing the corresponding optimistic
|
|
1289
|
+
* update.
|
|
1290
|
+
*/
|
|
1291
|
+
deleteAllInboxNotifications(optimisticUpdateId: string): void;
|
|
1292
|
+
/**
|
|
1293
|
+
* Creates an new thread, replacing the corresponding optimistic update.
|
|
1294
|
+
*/
|
|
1295
|
+
createThread(optimisticUpdateId: string, thread: Readonly<ThreadDataWithDeleteInfo<M>>): void;
|
|
1296
|
+
/**
|
|
1297
|
+
* Updates an existing thread with a new value, replacing the corresponding
|
|
1298
|
+
* optimistic update.
|
|
1299
|
+
*
|
|
1300
|
+
* This will not update anything if:
|
|
1301
|
+
* - The thread ID isn't found in the cache; or
|
|
1302
|
+
* - The thread ID was already deleted from the cache; or
|
|
1303
|
+
* - The thread ID in the cache was updated more recently than the optimistic
|
|
1304
|
+
* update's timestamp (if given)
|
|
1305
|
+
*/
|
|
1306
|
+
updateThread(threadId: string, optimisticUpdateId: string | null, callback: (thread: Readonly<ThreadDataWithDeleteInfo<M>>) => Readonly<ThreadDataWithDeleteInfo<M>>, updatedAt?: Date): void;
|
|
1307
|
+
/**
|
|
1308
|
+
* Soft-deletes an existing thread by setting its `deletedAt` value,
|
|
1309
|
+
* replacing the corresponding optimistic update.
|
|
1310
|
+
*
|
|
1311
|
+
* This will not update anything if:
|
|
1312
|
+
* - The thread ID isn't found in the cache; or
|
|
1313
|
+
* - The thread ID was already deleted from the cache
|
|
1314
|
+
*/
|
|
1315
|
+
deleteThread(threadId: string, optimisticUpdateId: string | null): void;
|
|
1316
|
+
/**
|
|
1317
|
+
* Creates an existing comment and ensures the associated notification is
|
|
1318
|
+
* updated correctly, replacing the corresponding optimistic update.
|
|
1319
|
+
*/
|
|
1320
|
+
createComment(newComment: CommentData, optimisticUpdateId: string): void;
|
|
1321
|
+
updateThreadAndNotification(thread: ThreadData<M>, inboxNotification?: InboxNotificationData): void;
|
|
1322
|
+
updateThreadsAndNotifications(threads: ThreadData<M>[], inboxNotifications: InboxNotificationData[], deletedThreads: ThreadDeleteInfo[], deletedInboxNotifications: InboxNotificationDeleteInfo[], queryKey?: string): void;
|
|
1323
|
+
/**
|
|
1324
|
+
* Updates existing notification setting for a room with a new value,
|
|
1325
|
+
* replacing the corresponding optimistic update.
|
|
1326
|
+
*/
|
|
1327
|
+
updateRoomInboxNotificationSettings2(roomId: string, optimisticUpdateId: string, settings: Readonly<RoomNotificationSettings$1>): void;
|
|
1328
|
+
updateRoomInboxNotificationSettings(roomId: string, settings: RoomNotificationSettings$1, queryKey: string): void;
|
|
1329
|
+
updateRoomVersions(roomId: string, versions: HistoryVersion[], queryKey?: string): void;
|
|
1330
|
+
addOptimisticUpdate(optimisticUpdate: DistributiveOmit<OptimisticUpdate<M>, "id">): string;
|
|
1331
|
+
removeOptimisticUpdate(optimisticUpdateId: string): void;
|
|
1332
|
+
setQueryLoading(queryKey: string): void;
|
|
1333
|
+
private setQueryOK;
|
|
1334
|
+
setQueryError(queryKey: string, error: Error): void;
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1118
1337
|
/**
|
|
1119
1338
|
* Raw access to the React context where the LiveblocksProvider stores the
|
|
1120
1339
|
* current client. Exposed for advanced use cases only.
|
|
@@ -1122,6 +1341,12 @@ declare type LiveblocksContextBundle<U extends BaseUserMeta, M extends BaseMetad
|
|
|
1122
1341
|
* @private This is a private/advanced API. Do not rely on it.
|
|
1123
1342
|
*/
|
|
1124
1343
|
declare const ClientContext: React__default.Context<OpaqueClient | null>;
|
|
1344
|
+
/**
|
|
1345
|
+
* Gets or creates a unique Umbrella store for each unique client instance.
|
|
1346
|
+
*
|
|
1347
|
+
* @private
|
|
1348
|
+
*/
|
|
1349
|
+
declare function getUmbrellaStoreForClient<M extends BaseMetadata$1>(client: OpaqueClient): UmbrellaStore<M>;
|
|
1125
1350
|
/**
|
|
1126
1351
|
* Obtains a reference to the current Liveblocks client.
|
|
1127
1352
|
*/
|
|
@@ -1250,17 +1475,39 @@ declare const _useUserSuspense: TypedBundle$1["suspense"]["useUser"];
|
|
|
1250
1475
|
* @experimental
|
|
1251
1476
|
*
|
|
1252
1477
|
* This hook is experimental and could be removed or changed at any time!
|
|
1253
|
-
* Do not use unless
|
|
1478
|
+
* Do not use unless explicitly recommended by the Liveblocks team.
|
|
1479
|
+
*
|
|
1480
|
+
* WARNING:
|
|
1481
|
+
* Please note that this hook currently returns all threads by most recently
|
|
1482
|
+
* updated threads first. This is inconsistent with the default sort order of
|
|
1483
|
+
* the useThreads() hook, which returns them in chronological order (by
|
|
1484
|
+
* creation date). In the final version, we will make these hooks behave
|
|
1485
|
+
* consistently, so expect that in the final version, you'll have to explicitly
|
|
1486
|
+
* specify the sort order to be by most recently updated first somehow.
|
|
1487
|
+
* The final API for that is still TBD.
|
|
1254
1488
|
*/
|
|
1255
1489
|
declare const _useUserThreads_experimental: TypedBundle$1["useUserThreads_experimental"];
|
|
1256
1490
|
/**
|
|
1257
1491
|
* @experimental
|
|
1258
1492
|
*
|
|
1259
1493
|
* This hook is experimental and could be removed or changed at any time!
|
|
1260
|
-
* Do not use unless
|
|
1494
|
+
* Do not use unless explicitly recommended by the Liveblocks team.
|
|
1495
|
+
*
|
|
1496
|
+
* WARNING:
|
|
1497
|
+
* Please note that this hook currently returns all threads by most recently
|
|
1498
|
+
* updated threads first. This is inconsistent with the default sort order of
|
|
1499
|
+
* the useThreads() hook, which returns them in chronological order (by
|
|
1500
|
+
* creation date). In the final version, we will make these hooks behave
|
|
1501
|
+
* consistently, so expect that in the final version, you'll have to explicitly
|
|
1502
|
+
* specify the sort order to be by most recently updated first somehow.
|
|
1503
|
+
* The final API for that is still TBD.
|
|
1261
1504
|
*/
|
|
1262
1505
|
declare const _useUserThreadsSuspense_experimental: TypedBundle$1["suspense"]["useUserThreads_experimental"];
|
|
1263
1506
|
|
|
1507
|
+
/**
|
|
1508
|
+
* @private Do not rely on this internal API.
|
|
1509
|
+
*/
|
|
1510
|
+
declare function selectRoomThreads<M extends BaseMetadata$1>(roomId: string, state: UmbrellaStoreState<M>, options: UseThreadsOptions<M>): ThreadData$1<M>[];
|
|
1264
1511
|
/**
|
|
1265
1512
|
* Raw access to the React context where the RoomProvider stores the current
|
|
1266
1513
|
* room. Exposed for advanced use cases only.
|
|
@@ -1278,7 +1525,7 @@ declare function useStatus(): Status;
|
|
|
1278
1525
|
* a re-render whenever it changes. Can be used to render a "Saving..."
|
|
1279
1526
|
* indicator.
|
|
1280
1527
|
*/
|
|
1281
|
-
declare function useStorageStatus(options?: UseStorageStatusOptions): StorageStatus;
|
|
1528
|
+
declare function useStorageStatus(options?: UseStorageStatusOptions): StorageStatus$1;
|
|
1282
1529
|
/**
|
|
1283
1530
|
* @deprecated It's recommended to use `useMutation` for writing to Storage,
|
|
1284
1531
|
* which will automatically batch all mutations.
|
|
@@ -1368,7 +1615,7 @@ declare function useCommentsErrorListener<M extends BaseMetadata$1>(callback: (e
|
|
|
1368
1615
|
* const createComment = useCreateComment();
|
|
1369
1616
|
* createComment({ threadId: "th_xxx", body: {} });
|
|
1370
1617
|
*/
|
|
1371
|
-
declare function useCreateComment(): (options: CreateCommentOptions) => CommentData;
|
|
1618
|
+
declare function useCreateComment(): (options: CreateCommentOptions) => CommentData$1;
|
|
1372
1619
|
/**
|
|
1373
1620
|
* Returns a function that edits a comment's body.
|
|
1374
1621
|
*
|
|
@@ -1434,8 +1681,14 @@ declare function useThreadSubscription(threadId: string): ThreadSubscription;
|
|
|
1434
1681
|
*/
|
|
1435
1682
|
declare function useRoomNotificationSettings(): [
|
|
1436
1683
|
RoomNotificationSettingsState,
|
|
1437
|
-
(settings: Partial<RoomNotificationSettings
|
|
1684
|
+
(settings: Partial<RoomNotificationSettings>) => void
|
|
1438
1685
|
];
|
|
1686
|
+
/**
|
|
1687
|
+
* Returns the version data bianry for a given version
|
|
1688
|
+
*
|
|
1689
|
+
* @example
|
|
1690
|
+
* const {data} = useHistoryVersionData(versionId);
|
|
1691
|
+
*/
|
|
1439
1692
|
declare function useHistoryVersionData(versionId: string): HistoryVersionDataState;
|
|
1440
1693
|
/**
|
|
1441
1694
|
* Returns a function that updates the user's notification settings
|
|
@@ -1445,7 +1698,7 @@ declare function useHistoryVersionData(versionId: string): HistoryVersionDataSta
|
|
|
1445
1698
|
* const updateRoomNotificationSettings = useUpdateRoomNotificationSettings();
|
|
1446
1699
|
* updateRoomNotificationSettings({ threads: "all" });
|
|
1447
1700
|
*/
|
|
1448
|
-
declare function useUpdateRoomNotificationSettings(): (settings: Partial<RoomNotificationSettings
|
|
1701
|
+
declare function useUpdateRoomNotificationSettings(): (settings: Partial<RoomNotificationSettings>) => void;
|
|
1449
1702
|
/**
|
|
1450
1703
|
* Returns an array of connection IDs. This matches the values you'll get by
|
|
1451
1704
|
* using the `useOthers()` hook.
|
|
@@ -1687,14 +1940,14 @@ declare const _useThreads: TypedBundle["useThreads"];
|
|
|
1687
1940
|
*/
|
|
1688
1941
|
declare const _useThreadsSuspense: TypedBundle["suspense"]["useThreads"];
|
|
1689
1942
|
/**
|
|
1690
|
-
* Returns a history of versions of the current room.
|
|
1943
|
+
* (Private beta) Returns a history of versions of the current room.
|
|
1691
1944
|
*
|
|
1692
1945
|
* @example
|
|
1693
1946
|
* const { versions, error, isLoading } = useHistoryVersions();
|
|
1694
1947
|
*/
|
|
1695
1948
|
declare const _useHistoryVersions: TypedBundle["useHistoryVersions"];
|
|
1696
1949
|
/**
|
|
1697
|
-
* Returns a history of versions of the current room.
|
|
1950
|
+
* (Private beta) Returns a history of versions of the current room.
|
|
1698
1951
|
*
|
|
1699
1952
|
* @example
|
|
1700
1953
|
* const { versions } = useHistoryVersions();
|
|
@@ -1927,4 +2180,4 @@ declare const _useStorageRoot: TypedBundle["useStorageRoot"];
|
|
|
1927
2180
|
*/
|
|
1928
2181
|
declare const _useUpdateMyPresence: TypedBundle["useUpdateMyPresence"];
|
|
1929
2182
|
|
|
1930
|
-
export { useOthersConnectionIds as $, _useIsInsideRoom as A, useLostConnectionListener as B, ClientSideSuspense as C, useMarkThreadAsRead as D, _useMutation as E, _useMyPresence as F, _useOthersListener as G, useRedo as H, useRemoveReaction as I, _useRoom as J, useRoomNotificationSettings as K, LiveblocksProvider as L, type MutationContext as M, useStatus as N, _useStorageRoot as O, useThreadSubscription as P, useUndo as Q, RoomContext as R, _useUpdateMyPresence as S, useUpdateRoomNotificationSettings as T, type
|
|
2183
|
+
export { useOthersConnectionIds as $, _useIsInsideRoom as A, useLostConnectionListener as B, ClientSideSuspense as C, useMarkThreadAsRead as D, _useMutation as E, _useMyPresence as F, _useOthersListener as G, useRedo as H, useRemoveReaction as I, _useRoom as J, useRoomNotificationSettings as K, LiveblocksProvider as L, type MutationContext as M, useStatus as N, _useStorageRoot as O, useThreadSubscription as P, useUndo as Q, RoomContext as R, _useUpdateMyPresence as S, useUpdateRoomNotificationSettings as T, type UseStorageStatusOptions as U, useHistoryVersionData as V, useCommentsErrorListener as W, CreateThreadError as X, _useOther as Y, _useOthers as Z, _useInboxNotificationThread as _, type UseThreadsOptions as a, _useOthersMapped as a0, _useSelf as a1, _useStorage as a2, useStorageStatus as a3, _useThreads as a4, _useHistoryVersions as a5, useInboxNotifications as a6, _useUserThreads_experimental as a7, useRoomInfo as a8, useUnreadInboxNotificationsCount as a9, _useUser as aa, getUmbrellaStoreForClient as ab, selectRoomThreads as ac, _useOtherSuspense as ad, _useOthersSuspense as ae, useOthersConnectionIdsSuspense as af, _useOthersMappedSuspense as ag, _useSelfSuspense as ah, _useStorageSuspense as ai, useStorageStatusSuspense as aj, _useThreadsSuspense as ak, _useHistoryVersionsSuspense as al, useInboxNotificationsSuspense as am, useRoomInfoSuspense as an, useUnreadInboxNotificationsCountSuspense as ao, _useUserSuspense as ap, _useUserThreadsSuspense_experimental as aq, ClientContext as b, createLiveblocksContext as c, useMarkAllInboxNotificationsAsRead as d, useMarkInboxNotificationAsRead as e, useDeleteAllInboxNotifications as f, useDeleteInboxNotification as g, createRoomContext as h, _RoomProvider as i, _useAddReaction as j, useBatch as k, _useBroadcastEvent as l, useCanRedo as m, useCanUndo as n, useCreateComment as o, _useCreateThread as p, useDeleteComment as q, _useDeleteThread as r, useEditComment as s, _useEditThreadMetadata as t, useClient as u, useMarkThreadAsResolved as v, useMarkThreadAsUnresolved as w, useErrorListener as x, _useEventListener as y, useHistory as z };
|