@liveblocks/react 2.14.0-v2encoding → 2.15.0-debug1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_private.d.mts +10 -4
- package/dist/_private.d.ts +10 -4
- package/dist/_private.js +16 -12
- package/dist/_private.js.map +1 -1
- package/dist/_private.mjs +12 -8
- package/dist/_private.mjs.map +1 -1
- package/dist/chunk-A4ABDZ5E.mjs +23 -0
- package/dist/chunk-A4ABDZ5E.mjs.map +1 -0
- package/dist/{chunk-7ZCTUIE6.js → chunk-KY7WMVMG.js} +464 -321
- package/dist/chunk-KY7WMVMG.js.map +1 -0
- package/dist/chunk-MI7M3UBZ.js +23 -0
- package/dist/chunk-MI7M3UBZ.js.map +1 -0
- package/dist/{chunk-BYPL4Y26.mjs → chunk-UJLD6FYC.mjs} +477 -334
- package/dist/chunk-UJLD6FYC.mjs.map +1 -0
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +4 -4
- package/dist/index.mjs +2 -2
- package/dist/{room-gbqt3lTY.d.mts → room-C_NzlTZP.d.mts} +56 -51
- package/dist/{room-gbqt3lTY.d.ts → room-C_NzlTZP.d.ts} +56 -51
- package/dist/suspense.d.mts +2 -1
- package/dist/suspense.d.ts +2 -1
- package/dist/suspense.js +4 -4
- package/dist/suspense.mjs +2 -2
- package/package.json +4 -6
- package/dist/chunk-7ZCTUIE6.js.map +0 -1
- package/dist/chunk-BYPL4Y26.mjs.map +0 -1
- package/dist/chunk-CAMSPWNT.mjs +0 -22
- package/dist/chunk-CAMSPWNT.mjs.map +0 -1
- package/dist/chunk-FPO6VPFA.js +0 -22
- package/dist/chunk-FPO6VPFA.js.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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-
|
|
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-C_NzlTZP.mjs';
|
|
2
2
|
export { Json, JsonObject, shallow } from '@liveblocks/client';
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
import '@liveblocks/core';
|
|
6
6
|
|
|
@@ -25,6 +25,6 @@ declare type Props = {
|
|
|
25
25
|
* </ClientSideSuspense>
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
28
|
-
declare function ClientSideSuspense(props: Props):
|
|
28
|
+
declare function ClientSideSuspense(props: Props): react_jsx_runtime.JSX.Element;
|
|
29
29
|
|
|
30
30
|
export { ClientSideSuspense };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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-
|
|
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-C_NzlTZP.js';
|
|
2
2
|
export { Json, JsonObject, shallow } from '@liveblocks/client';
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
import '@liveblocks/core';
|
|
6
6
|
|
|
@@ -25,6 +25,6 @@ declare type Props = {
|
|
|
25
25
|
* </ClientSideSuspense>
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
28
|
-
declare function ClientSideSuspense(props: Props):
|
|
28
|
+
declare function ClientSideSuspense(props: Props): react_jsx_runtime.JSX.Element;
|
|
29
29
|
|
|
30
30
|
export { ClientSideSuspense };
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkMI7M3UBZjs = require('./chunk-MI7M3UBZ.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -67,12 +67,12 @@ var _chunkFPO6VPFAjs = require('./chunk-FPO6VPFA.js');
|
|
|
67
67
|
|
|
68
68
|
|
|
69
69
|
|
|
70
|
-
var
|
|
70
|
+
var _chunkKY7WMVMGjs = require('./chunk-KY7WMVMG.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, _chunkMI7M3UBZjs.PKG_NAME, _chunkMI7M3UBZjs.PKG_VERSION, _chunkMI7M3UBZjs.PKG_FORMAT);
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
|
|
@@ -138,5 +138,5 @@ _core.detectDupes.call(void 0, _chunkFPO6VPFAjs.PKG_NAME, _chunkFPO6VPFAjs.PKG_V
|
|
|
138
138
|
|
|
139
139
|
|
|
140
140
|
|
|
141
|
-
exports.ClientContext =
|
|
141
|
+
exports.ClientContext = _chunkKY7WMVMGjs.ClientContext; exports.ClientSideSuspense = _chunkMI7M3UBZjs.ClientSideSuspense; exports.LiveblocksProvider = _chunkKY7WMVMGjs.LiveblocksProvider; exports.RoomContext = _chunkKY7WMVMGjs.RoomContext; exports.RoomProvider = _chunkKY7WMVMGjs._RoomProvider; exports.createLiveblocksContext = _chunkKY7WMVMGjs.createLiveblocksContext; exports.createRoomContext = _chunkKY7WMVMGjs.createRoomContext; exports.shallow = _client.shallow; exports.useAddReaction = _chunkKY7WMVMGjs._useAddReaction; exports.useAttachmentUrl = _chunkKY7WMVMGjs.useAttachmentUrl; exports.useBatch = _chunkKY7WMVMGjs.useBatch; exports.useBroadcastEvent = _chunkKY7WMVMGjs._useBroadcastEvent; exports.useCanRedo = _chunkKY7WMVMGjs.useCanRedo; exports.useCanUndo = _chunkKY7WMVMGjs.useCanUndo; exports.useClient = _chunkKY7WMVMGjs.useClient; exports.useCommentsErrorListener = _chunkKY7WMVMGjs.useCommentsErrorListener; exports.useCreateComment = _chunkKY7WMVMGjs.useCreateComment; exports.useCreateThread = _chunkKY7WMVMGjs._useCreateThread; exports.useDeleteAllInboxNotifications = _chunkKY7WMVMGjs.useDeleteAllInboxNotifications; exports.useDeleteComment = _chunkKY7WMVMGjs.useDeleteComment; exports.useDeleteInboxNotification = _chunkKY7WMVMGjs.useDeleteInboxNotification; exports.useDeleteThread = _chunkKY7WMVMGjs._useDeleteThread; exports.useEditComment = _chunkKY7WMVMGjs.useEditComment; exports.useEditThreadMetadata = _chunkKY7WMVMGjs._useEditThreadMetadata; exports.useErrorListener = _chunkKY7WMVMGjs.useErrorListener; exports.useEventListener = _chunkKY7WMVMGjs._useEventListener; exports.useHistory = _chunkKY7WMVMGjs.useHistory; exports.useHistoryVersionData = _chunkKY7WMVMGjs.useHistoryVersionData; exports.useHistoryVersions = _chunkKY7WMVMGjs._useHistoryVersions; exports.useInboxNotificationThread = _chunkKY7WMVMGjs._useInboxNotificationThread; exports.useInboxNotifications = _chunkKY7WMVMGjs.useInboxNotifications; exports.useIsInsideRoom = _chunkKY7WMVMGjs._useIsInsideRoom; exports.useLostConnectionListener = _chunkKY7WMVMGjs.useLostConnectionListener; exports.useMarkAllInboxNotificationsAsRead = _chunkKY7WMVMGjs.useMarkAllInboxNotificationsAsRead; exports.useMarkInboxNotificationAsRead = _chunkKY7WMVMGjs.useMarkInboxNotificationAsRead; exports.useMarkThreadAsRead = _chunkKY7WMVMGjs.useMarkThreadAsRead; exports.useMarkThreadAsResolved = _chunkKY7WMVMGjs.useMarkThreadAsResolved; exports.useMarkThreadAsUnresolved = _chunkKY7WMVMGjs.useMarkThreadAsUnresolved; exports.useMutation = _chunkKY7WMVMGjs._useMutation; exports.useMyPresence = _chunkKY7WMVMGjs._useMyPresence; exports.useOther = _chunkKY7WMVMGjs._useOther; exports.useOthers = _chunkKY7WMVMGjs._useOthers; exports.useOthersConnectionIds = _chunkKY7WMVMGjs.useOthersConnectionIds; exports.useOthersListener = _chunkKY7WMVMGjs._useOthersListener; exports.useOthersMapped = _chunkKY7WMVMGjs._useOthersMapped; exports.useRedo = _chunkKY7WMVMGjs.useRedo; exports.useRemoveReaction = _chunkKY7WMVMGjs.useRemoveReaction; exports.useRoom = _chunkKY7WMVMGjs._useRoom; exports.useRoomInfo = _chunkKY7WMVMGjs.useRoomInfo; exports.useRoomNotificationSettings = _chunkKY7WMVMGjs._useRoomNotificationSettings; exports.useSelf = _chunkKY7WMVMGjs._useSelf; exports.useStatus = _chunkKY7WMVMGjs.useStatus; exports.useStorage = _chunkKY7WMVMGjs._useStorage; exports.useStorageRoot = _chunkKY7WMVMGjs._useStorageRoot; exports.useStorageStatus = _chunkKY7WMVMGjs.useStorageStatus; exports.useSyncStatus = _chunkKY7WMVMGjs.useSyncStatus; exports.useThreadSubscription = _chunkKY7WMVMGjs.useThreadSubscription; exports.useThreads = _chunkKY7WMVMGjs._useThreads; exports.useUndo = _chunkKY7WMVMGjs.useUndo; exports.useUnreadInboxNotificationsCount = _chunkKY7WMVMGjs.useUnreadInboxNotificationsCount; exports.useUpdateMyPresence = _chunkKY7WMVMGjs._useUpdateMyPresence; exports.useUpdateRoomNotificationSettings = _chunkKY7WMVMGjs.useUpdateRoomNotificationSettings; exports.useUser = _chunkKY7WMVMGjs._useUser; exports.useUserThreads_experimental = _chunkKY7WMVMGjs._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-A4ABDZ5E.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-UJLD6FYC.mjs";
|
|
71
71
|
|
|
72
72
|
// src/index.ts
|
|
73
73
|
import { detectDupes } from "@liveblocks/core";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import { Context, PropsWithChildren, ReactNode } from 'react';
|
|
1
4
|
import { JsonObject, LsonObject, BaseUserMeta, LiveObject, User, Json, RoomNotificationSettings, Room, Status, BroadcastOptions, OthersEvent, LostConnectionEvent, History, BaseMetadata as BaseMetadata$1, Client as Client$1, ClientOptions, StorageStatus as StorageStatus$1, ThreadData as ThreadData$1, CommentData as CommentData$1 } from '@liveblocks/client';
|
|
2
5
|
import * as _liveblocks_core from '@liveblocks/core';
|
|
3
|
-
import { BaseMetadata, CommentBody, Patchable, StorageStatus, QueryMetadata, AsyncResult, DRI, AsyncSuccess, Resolve, CommentAttachment, PartialUnless, InboxNotificationData, ToImmutable, AsyncLoading, AsyncError, ThreadData, HistoryVersion, Client, SyncStatus, LiveblocksError, RoomEventMessage, CommentData, ThreadDataWithDeleteInfo,
|
|
4
|
-
import * as React$1 from 'react';
|
|
5
|
-
import React__default, { PropsWithChildren } from 'react';
|
|
6
|
+
import { BaseMetadata, CommentBody, Patchable, StorageStatus, QueryMetadata, AsyncResult, DRI, AsyncSuccess, Resolve, CommentAttachment, PartialUnless, InboxNotificationData, ToImmutable, AsyncLoading, AsyncError, ThreadData, HistoryVersion, Client, SyncStatus, LiveblocksError, RoomEventMessage, CommentData, MutableSignal, ThreadDataWithDeleteInfo, Signal, DerivedSignal, OpaqueClient, CommentUserReaction, ThreadDeleteInfo, InboxNotificationDeleteInfo, RoomNotificationSettings as RoomNotificationSettings$1, DistributiveOmit, Permission, DU, DM, OpaqueRoom, TextEditorType, IYjsProvider, DP, DS, DE } from '@liveblocks/core';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* @private Internal API, do not rely on it.
|
|
@@ -232,7 +233,7 @@ declare type RoomProviderProps<P extends JsonObject, S extends LsonObject> = Res
|
|
|
232
233
|
* The id of the room you want to connect to
|
|
233
234
|
*/
|
|
234
235
|
id: string;
|
|
235
|
-
children:
|
|
236
|
+
children: ReactNode;
|
|
236
237
|
/**
|
|
237
238
|
* Whether or not the room should connect to Liveblocks servers
|
|
238
239
|
* when the RoomProvider is rendered.
|
|
@@ -242,21 +243,6 @@ declare type RoomProviderProps<P extends JsonObject, S extends LsonObject> = Res
|
|
|
242
243
|
* only on the client side.
|
|
243
244
|
*/
|
|
244
245
|
autoConnect?: boolean;
|
|
245
|
-
/**
|
|
246
|
-
* If you're on React 17 or lower, pass in a reference to
|
|
247
|
-
* `ReactDOM.unstable_batchedUpdates` or
|
|
248
|
-
* `ReactNative.unstable_batchedUpdates` here.
|
|
249
|
-
*
|
|
250
|
-
* @example
|
|
251
|
-
* import { unstable_batchedUpdates } from "react-dom";
|
|
252
|
-
*
|
|
253
|
-
* <RoomProvider ... unstable_batchedUpdates={unstable_batchedUpdates} />
|
|
254
|
-
*
|
|
255
|
-
* This will prevent you from running into the so-called "stale props"
|
|
256
|
-
* and/or "zombie child" problem that React 17 and lower can suffer from.
|
|
257
|
-
* Not necessary when you're on React v18 or later.
|
|
258
|
-
*/
|
|
259
|
-
unstable_batchedUpdates?: (cb: () => void) => void;
|
|
260
246
|
} & PartialUnless<P, {
|
|
261
247
|
/**
|
|
262
248
|
* The initial Presence to use and announce when you enter the Room. The
|
|
@@ -379,7 +365,7 @@ declare type RoomContextBundleCommon<P extends JsonObject, S extends LsonObject,
|
|
|
379
365
|
* it can be necessary if you're building an advanced app where you need to
|
|
380
366
|
* set up a context bridge between two React renderers.
|
|
381
367
|
*/
|
|
382
|
-
RoomContext:
|
|
368
|
+
RoomContext: Context<Room<P, S, U, E, M> | null>;
|
|
383
369
|
/**
|
|
384
370
|
* Makes a Room available in the component hierarchy below.
|
|
385
371
|
* Joins the room when the component is mounted, and automatically leaves
|
|
@@ -1101,7 +1087,7 @@ declare type LiveblocksContextBundle<U extends BaseUserMeta, M extends BaseMetad
|
|
|
1101
1087
|
}>;
|
|
1102
1088
|
}>;
|
|
1103
1089
|
|
|
1104
|
-
declare type ReadonlyThreadDB<M extends BaseMetadata> = Omit<ThreadDB<M>, "upsert" | "delete">;
|
|
1090
|
+
declare type ReadonlyThreadDB<M extends BaseMetadata> = Omit<ThreadDB<M>, "upsert" | "delete" | "signal">;
|
|
1105
1091
|
/**
|
|
1106
1092
|
* This class implements a lightweight, in-memory, "database" for all Thread
|
|
1107
1093
|
* instances.
|
|
@@ -1121,10 +1107,9 @@ declare type ReadonlyThreadDB<M extends BaseMetadata> = Omit<ThreadDB<M>, "upser
|
|
|
1121
1107
|
*/
|
|
1122
1108
|
declare class ThreadDB<M extends BaseMetadata> {
|
|
1123
1109
|
#private;
|
|
1110
|
+
readonly signal: MutableSignal<this>;
|
|
1124
1111
|
constructor();
|
|
1125
1112
|
clone(): ThreadDB<M>;
|
|
1126
|
-
/** Gets the transaction count for this DB. Increments any time the DB is modified. */
|
|
1127
|
-
get version(): number;
|
|
1128
1113
|
/** Returns an existing thread by ID. Will never return a deleted thread. */
|
|
1129
1114
|
get(threadId: string): ThreadData<M> | undefined;
|
|
1130
1115
|
/** Returns the (possibly deleted) thread by ID. */
|
|
@@ -1261,47 +1246,68 @@ declare type UsablePromise<T> = Promise<T> & ({
|
|
|
1261
1246
|
status: "fulfilled";
|
|
1262
1247
|
value: T;
|
|
1263
1248
|
});
|
|
1249
|
+
declare type RoomId = string;
|
|
1250
|
+
/**
|
|
1251
|
+
* Versions by roomId
|
|
1252
|
+
* e.g. { 'room-abc': {versions: "all versions"}}
|
|
1253
|
+
*/
|
|
1254
|
+
declare type VersionsByRoomId = Record<RoomId, Record<string, HistoryVersion>>;
|
|
1255
|
+
declare type NotificationsById = Record<string, InboxNotificationData>;
|
|
1264
1256
|
/**
|
|
1265
|
-
*
|
|
1266
|
-
* -
|
|
1267
|
-
*
|
|
1257
|
+
* Notification settings by room ID.
|
|
1258
|
+
* e.g. { 'room-abc': { threads: "all" },
|
|
1259
|
+
* 'room-def': { threads: "replies_and_mentions" },
|
|
1260
|
+
* 'room-xyz': { threads: "none" },
|
|
1261
|
+
* }
|
|
1268
1262
|
*/
|
|
1269
|
-
declare type
|
|
1263
|
+
declare type SettingsByRoomId = Record<RoomId, RoomNotificationSettings$1>;
|
|
1264
|
+
declare type PermissionHintsByRoomId = Record<RoomId, Set<Permission>>;
|
|
1265
|
+
declare type CleanThreadifications<M extends BaseMetadata> = CleanThreads<M> & CleanNotifications;
|
|
1266
|
+
declare type CleanThreads<M extends BaseMetadata> = {
|
|
1270
1267
|
/**
|
|
1271
1268
|
* Keep track of loading and error status of all the queries made by the client.
|
|
1272
1269
|
* e.g. 'room-abc-{"color":"red"}' - ok
|
|
1273
1270
|
* e.g. 'room-abc-{}' - loading
|
|
1274
1271
|
*/
|
|
1275
1272
|
threadsDB: ReadonlyThreadDB<M>;
|
|
1273
|
+
};
|
|
1274
|
+
declare type CleanNotifications = {
|
|
1276
1275
|
/**
|
|
1277
1276
|
* All inbox notifications in a sorted array, optimistic updates applied.
|
|
1278
1277
|
*/
|
|
1279
|
-
|
|
1278
|
+
sortedNotifications: InboxNotificationData[];
|
|
1280
1279
|
/**
|
|
1281
1280
|
* Inbox notifications by ID.
|
|
1282
1281
|
* e.g. `in_${string}`
|
|
1283
1282
|
*/
|
|
1284
1283
|
notificationsById: Record<string, InboxNotificationData>;
|
|
1285
|
-
/**
|
|
1286
|
-
* Notification settings by room ID.
|
|
1287
|
-
* e.g. { 'room-abc': { threads: "all" },
|
|
1288
|
-
* 'room-def': { threads: "replies_and_mentions" },
|
|
1289
|
-
* 'room-xyz': { threads: "none" },
|
|
1290
|
-
* }
|
|
1291
|
-
*/
|
|
1292
|
-
settingsByRoomId: Record<string, RoomNotificationSettings$1>;
|
|
1293
|
-
/**
|
|
1294
|
-
* Versions by roomId
|
|
1295
|
-
* e.g. { 'room-abc': {versions: "all versions"}}
|
|
1296
|
-
*/
|
|
1297
|
-
versionsByRoomId: Record<string, Record<string, HistoryVersion>>;
|
|
1298
1284
|
};
|
|
1299
1285
|
declare class UmbrellaStore<M extends BaseMetadata> {
|
|
1300
1286
|
#private;
|
|
1287
|
+
readonly baseThreadsDB: ThreadDB<M>;
|
|
1288
|
+
readonly baseNotificationsById: Signal<NotificationsById>;
|
|
1289
|
+
readonly baseSettingsByRoomId: Signal<SettingsByRoomId>;
|
|
1290
|
+
readonly optimisticUpdates: Signal<readonly OptimisticUpdate<M>[]>;
|
|
1291
|
+
readonly baseVersionsByRoomId: Signal<VersionsByRoomId>;
|
|
1292
|
+
readonly permissionHintsByRoomId: Signal<PermissionHintsByRoomId>;
|
|
1293
|
+
readonly outputs: {
|
|
1294
|
+
readonly threadifications: DerivedSignal<CleanThreadifications<M>>;
|
|
1295
|
+
readonly threads: DerivedSignal<CleanThreads<M>>;
|
|
1296
|
+
readonly notifications: DerivedSignal<CleanNotifications>;
|
|
1297
|
+
readonly settingsByRoomId: DerivedSignal<SettingsByRoomId>;
|
|
1298
|
+
readonly versionsByRoomId: DerivedSignal<VersionsByRoomId>;
|
|
1299
|
+
};
|
|
1301
1300
|
constructor(client: OpaqueClient);
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1301
|
+
get1_both(): CleanThreadifications<M>;
|
|
1302
|
+
subscribe1_both(callback: () => void): () => void;
|
|
1303
|
+
get1_threads(): CleanThreads<M>;
|
|
1304
|
+
subscribe1_threads(callback: () => void): () => void;
|
|
1305
|
+
get1_notifications(): CleanNotifications;
|
|
1306
|
+
subscribe1_notifications(callback: () => void): () => void;
|
|
1307
|
+
get2(): SettingsByRoomId;
|
|
1308
|
+
subscribe2(callback: () => void): () => void;
|
|
1309
|
+
get3(): VersionsByRoomId;
|
|
1310
|
+
subscribe3(callback: () => void): () => void;
|
|
1305
1311
|
/**
|
|
1306
1312
|
* Returns the async result of the given query and room id. If the query is success,
|
|
1307
1313
|
* then it will return the threads that match that provided query and room id.
|
|
@@ -1312,8 +1318,6 @@ declare class UmbrellaStore<M extends BaseMetadata> {
|
|
|
1312
1318
|
getInboxNotificationsLoadingState(): InboxNotificationsAsyncResult;
|
|
1313
1319
|
getNotificationSettingsLoadingState(roomId: string): RoomNotificationSettingsAsyncResult;
|
|
1314
1320
|
getRoomVersionsLoadingState(roomId: string): AsyncResult<HistoryVersion[], "versions">;
|
|
1315
|
-
subscribe(callback: () => void): () => void;
|
|
1316
|
-
_getPermissions(roomId: string): Set<Permission> | undefined;
|
|
1317
1321
|
/**
|
|
1318
1322
|
* Updates an existing inbox notification with a new value, replacing the
|
|
1319
1323
|
* corresponding optimistic update.
|
|
@@ -1378,6 +1382,7 @@ declare class UmbrellaStore<M extends BaseMetadata> {
|
|
|
1378
1382
|
waitUntilRoomThreadsLoaded(roomId: string, query: ThreadsQuery<M> | undefined): UsablePromise<void>;
|
|
1379
1383
|
fetchRoomThreadsDeltaUpdate(roomId: string, signal: AbortSignal): Promise<void>;
|
|
1380
1384
|
waitUntilUserThreadsLoaded(query: ThreadsQuery<M> | undefined): UsablePromise<void>;
|
|
1385
|
+
private invalidateEntireStore;
|
|
1381
1386
|
fetchUserThreadsDeltaUpdate(signal: AbortSignal): Promise<void>;
|
|
1382
1387
|
waitUntilRoomVersionsLoaded(roomId: string): UsablePromise<void>;
|
|
1383
1388
|
fetchRoomVersionsDeltaUpdate(roomId: string, signal: AbortSignal): Promise<void>;
|
|
@@ -1391,7 +1396,7 @@ declare class UmbrellaStore<M extends BaseMetadata> {
|
|
|
1391
1396
|
*
|
|
1392
1397
|
* @private This is a private/advanced API. Do not rely on it.
|
|
1393
1398
|
*/
|
|
1394
|
-
declare const ClientContext:
|
|
1399
|
+
declare const ClientContext: react.Context<OpaqueClient | null>;
|
|
1395
1400
|
/**
|
|
1396
1401
|
* Gets or creates a unique Umbrella store for each unique client instance.
|
|
1397
1402
|
*
|
|
@@ -1414,7 +1419,7 @@ declare function useClient<U extends BaseUserMeta>(): Client$1<U, BaseMetadata$1
|
|
|
1414
1419
|
* Unlike `RoomProvider`, `LiveblocksProvider` doesn’t call Liveblocks servers when mounted,
|
|
1415
1420
|
* and it should be placed higher in your app’s component tree.
|
|
1416
1421
|
*/
|
|
1417
|
-
declare function LiveblocksProvider<U extends BaseUserMeta = DU>(props: PropsWithChildren<ClientOptions<U>>):
|
|
1422
|
+
declare function LiveblocksProvider<U extends BaseUserMeta = DU>(props: PropsWithChildren<ClientOptions<U>>): react_jsx_runtime.JSX.Element;
|
|
1418
1423
|
/**
|
|
1419
1424
|
* Creates a LiveblocksProvider and a set of typed hooks. Note that any
|
|
1420
1425
|
* LiveblocksProvider created in this way takes no props, because it uses
|
|
@@ -1588,7 +1593,7 @@ declare function useSyncStatus(options?: UseSyncStatusOptions): SyncStatus;
|
|
|
1588
1593
|
*
|
|
1589
1594
|
* @private This is a private/advanced API. Do not rely on it.
|
|
1590
1595
|
*/
|
|
1591
|
-
declare const RoomContext:
|
|
1596
|
+
declare const RoomContext: react.Context<OpaqueRoom | null>;
|
|
1592
1597
|
/** @private */
|
|
1593
1598
|
declare function useRoomOrNull<P extends JsonObject, S extends LsonObject, U extends BaseUserMeta, E extends Json, M extends BaseMetadata$1>(): Room<P, S, U, E, M> | null;
|
|
1594
1599
|
|
|
@@ -1865,7 +1870,7 @@ declare function useAttachmentUrlSuspense(attachmentId: string): {
|
|
|
1865
1870
|
/**
|
|
1866
1871
|
* @private For internal use only. Do not rely on this hook.
|
|
1867
1872
|
*/
|
|
1868
|
-
declare function useRoomPermissions(roomId: string): Set<
|
|
1873
|
+
declare function useRoomPermissions(roomId: string): Set<unknown>;
|
|
1869
1874
|
/**
|
|
1870
1875
|
* Creates a RoomProvider and a set of typed hooks to use in your app. Note
|
|
1871
1876
|
* that any RoomProvider created in this way does not need to be nested in
|
|
@@ -2010,7 +2015,7 @@ declare const _useEditThreadMetadata: TypedBundle["useEditThreadMetadata"];
|
|
|
2010
2015
|
declare const _useEventListener: TypedBundle["useEventListener"];
|
|
2011
2016
|
/**
|
|
2012
2017
|
* Returns the presence of the current user of the current room, and a function to update it.
|
|
2013
|
-
* It is different from the setState function returned by the useState hook from
|
|
2018
|
+
* It is different from the setState function returned by the useState hook from
|
|
2014
2019
|
* You don't need to pass the full presence object to update it.
|
|
2015
2020
|
*
|
|
2016
2021
|
* @example
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import { Context, PropsWithChildren, ReactNode } from 'react';
|
|
1
4
|
import { JsonObject, LsonObject, BaseUserMeta, LiveObject, User, Json, RoomNotificationSettings, Room, Status, BroadcastOptions, OthersEvent, LostConnectionEvent, History, BaseMetadata as BaseMetadata$1, Client as Client$1, ClientOptions, StorageStatus as StorageStatus$1, ThreadData as ThreadData$1, CommentData as CommentData$1 } from '@liveblocks/client';
|
|
2
5
|
import * as _liveblocks_core from '@liveblocks/core';
|
|
3
|
-
import { BaseMetadata, CommentBody, Patchable, StorageStatus, QueryMetadata, AsyncResult, DRI, AsyncSuccess, Resolve, CommentAttachment, PartialUnless, InboxNotificationData, ToImmutable, AsyncLoading, AsyncError, ThreadData, HistoryVersion, Client, SyncStatus, LiveblocksError, RoomEventMessage, CommentData, ThreadDataWithDeleteInfo,
|
|
4
|
-
import * as React$1 from 'react';
|
|
5
|
-
import React__default, { PropsWithChildren } from 'react';
|
|
6
|
+
import { BaseMetadata, CommentBody, Patchable, StorageStatus, QueryMetadata, AsyncResult, DRI, AsyncSuccess, Resolve, CommentAttachment, PartialUnless, InboxNotificationData, ToImmutable, AsyncLoading, AsyncError, ThreadData, HistoryVersion, Client, SyncStatus, LiveblocksError, RoomEventMessage, CommentData, MutableSignal, ThreadDataWithDeleteInfo, Signal, DerivedSignal, OpaqueClient, CommentUserReaction, ThreadDeleteInfo, InboxNotificationDeleteInfo, RoomNotificationSettings as RoomNotificationSettings$1, DistributiveOmit, Permission, DU, DM, OpaqueRoom, TextEditorType, IYjsProvider, DP, DS, DE } from '@liveblocks/core';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* @private Internal API, do not rely on it.
|
|
@@ -232,7 +233,7 @@ declare type RoomProviderProps<P extends JsonObject, S extends LsonObject> = Res
|
|
|
232
233
|
* The id of the room you want to connect to
|
|
233
234
|
*/
|
|
234
235
|
id: string;
|
|
235
|
-
children:
|
|
236
|
+
children: ReactNode;
|
|
236
237
|
/**
|
|
237
238
|
* Whether or not the room should connect to Liveblocks servers
|
|
238
239
|
* when the RoomProvider is rendered.
|
|
@@ -242,21 +243,6 @@ declare type RoomProviderProps<P extends JsonObject, S extends LsonObject> = Res
|
|
|
242
243
|
* only on the client side.
|
|
243
244
|
*/
|
|
244
245
|
autoConnect?: boolean;
|
|
245
|
-
/**
|
|
246
|
-
* If you're on React 17 or lower, pass in a reference to
|
|
247
|
-
* `ReactDOM.unstable_batchedUpdates` or
|
|
248
|
-
* `ReactNative.unstable_batchedUpdates` here.
|
|
249
|
-
*
|
|
250
|
-
* @example
|
|
251
|
-
* import { unstable_batchedUpdates } from "react-dom";
|
|
252
|
-
*
|
|
253
|
-
* <RoomProvider ... unstable_batchedUpdates={unstable_batchedUpdates} />
|
|
254
|
-
*
|
|
255
|
-
* This will prevent you from running into the so-called "stale props"
|
|
256
|
-
* and/or "zombie child" problem that React 17 and lower can suffer from.
|
|
257
|
-
* Not necessary when you're on React v18 or later.
|
|
258
|
-
*/
|
|
259
|
-
unstable_batchedUpdates?: (cb: () => void) => void;
|
|
260
246
|
} & PartialUnless<P, {
|
|
261
247
|
/**
|
|
262
248
|
* The initial Presence to use and announce when you enter the Room. The
|
|
@@ -379,7 +365,7 @@ declare type RoomContextBundleCommon<P extends JsonObject, S extends LsonObject,
|
|
|
379
365
|
* it can be necessary if you're building an advanced app where you need to
|
|
380
366
|
* set up a context bridge between two React renderers.
|
|
381
367
|
*/
|
|
382
|
-
RoomContext:
|
|
368
|
+
RoomContext: Context<Room<P, S, U, E, M> | null>;
|
|
383
369
|
/**
|
|
384
370
|
* Makes a Room available in the component hierarchy below.
|
|
385
371
|
* Joins the room when the component is mounted, and automatically leaves
|
|
@@ -1101,7 +1087,7 @@ declare type LiveblocksContextBundle<U extends BaseUserMeta, M extends BaseMetad
|
|
|
1101
1087
|
}>;
|
|
1102
1088
|
}>;
|
|
1103
1089
|
|
|
1104
|
-
declare type ReadonlyThreadDB<M extends BaseMetadata> = Omit<ThreadDB<M>, "upsert" | "delete">;
|
|
1090
|
+
declare type ReadonlyThreadDB<M extends BaseMetadata> = Omit<ThreadDB<M>, "upsert" | "delete" | "signal">;
|
|
1105
1091
|
/**
|
|
1106
1092
|
* This class implements a lightweight, in-memory, "database" for all Thread
|
|
1107
1093
|
* instances.
|
|
@@ -1121,10 +1107,9 @@ declare type ReadonlyThreadDB<M extends BaseMetadata> = Omit<ThreadDB<M>, "upser
|
|
|
1121
1107
|
*/
|
|
1122
1108
|
declare class ThreadDB<M extends BaseMetadata> {
|
|
1123
1109
|
#private;
|
|
1110
|
+
readonly signal: MutableSignal<this>;
|
|
1124
1111
|
constructor();
|
|
1125
1112
|
clone(): ThreadDB<M>;
|
|
1126
|
-
/** Gets the transaction count for this DB. Increments any time the DB is modified. */
|
|
1127
|
-
get version(): number;
|
|
1128
1113
|
/** Returns an existing thread by ID. Will never return a deleted thread. */
|
|
1129
1114
|
get(threadId: string): ThreadData<M> | undefined;
|
|
1130
1115
|
/** Returns the (possibly deleted) thread by ID. */
|
|
@@ -1261,47 +1246,68 @@ declare type UsablePromise<T> = Promise<T> & ({
|
|
|
1261
1246
|
status: "fulfilled";
|
|
1262
1247
|
value: T;
|
|
1263
1248
|
});
|
|
1249
|
+
declare type RoomId = string;
|
|
1250
|
+
/**
|
|
1251
|
+
* Versions by roomId
|
|
1252
|
+
* e.g. { 'room-abc': {versions: "all versions"}}
|
|
1253
|
+
*/
|
|
1254
|
+
declare type VersionsByRoomId = Record<RoomId, Record<string, HistoryVersion>>;
|
|
1255
|
+
declare type NotificationsById = Record<string, InboxNotificationData>;
|
|
1264
1256
|
/**
|
|
1265
|
-
*
|
|
1266
|
-
* -
|
|
1267
|
-
*
|
|
1257
|
+
* Notification settings by room ID.
|
|
1258
|
+
* e.g. { 'room-abc': { threads: "all" },
|
|
1259
|
+
* 'room-def': { threads: "replies_and_mentions" },
|
|
1260
|
+
* 'room-xyz': { threads: "none" },
|
|
1261
|
+
* }
|
|
1268
1262
|
*/
|
|
1269
|
-
declare type
|
|
1263
|
+
declare type SettingsByRoomId = Record<RoomId, RoomNotificationSettings$1>;
|
|
1264
|
+
declare type PermissionHintsByRoomId = Record<RoomId, Set<Permission>>;
|
|
1265
|
+
declare type CleanThreadifications<M extends BaseMetadata> = CleanThreads<M> & CleanNotifications;
|
|
1266
|
+
declare type CleanThreads<M extends BaseMetadata> = {
|
|
1270
1267
|
/**
|
|
1271
1268
|
* Keep track of loading and error status of all the queries made by the client.
|
|
1272
1269
|
* e.g. 'room-abc-{"color":"red"}' - ok
|
|
1273
1270
|
* e.g. 'room-abc-{}' - loading
|
|
1274
1271
|
*/
|
|
1275
1272
|
threadsDB: ReadonlyThreadDB<M>;
|
|
1273
|
+
};
|
|
1274
|
+
declare type CleanNotifications = {
|
|
1276
1275
|
/**
|
|
1277
1276
|
* All inbox notifications in a sorted array, optimistic updates applied.
|
|
1278
1277
|
*/
|
|
1279
|
-
|
|
1278
|
+
sortedNotifications: InboxNotificationData[];
|
|
1280
1279
|
/**
|
|
1281
1280
|
* Inbox notifications by ID.
|
|
1282
1281
|
* e.g. `in_${string}`
|
|
1283
1282
|
*/
|
|
1284
1283
|
notificationsById: Record<string, InboxNotificationData>;
|
|
1285
|
-
/**
|
|
1286
|
-
* Notification settings by room ID.
|
|
1287
|
-
* e.g. { 'room-abc': { threads: "all" },
|
|
1288
|
-
* 'room-def': { threads: "replies_and_mentions" },
|
|
1289
|
-
* 'room-xyz': { threads: "none" },
|
|
1290
|
-
* }
|
|
1291
|
-
*/
|
|
1292
|
-
settingsByRoomId: Record<string, RoomNotificationSettings$1>;
|
|
1293
|
-
/**
|
|
1294
|
-
* Versions by roomId
|
|
1295
|
-
* e.g. { 'room-abc': {versions: "all versions"}}
|
|
1296
|
-
*/
|
|
1297
|
-
versionsByRoomId: Record<string, Record<string, HistoryVersion>>;
|
|
1298
1284
|
};
|
|
1299
1285
|
declare class UmbrellaStore<M extends BaseMetadata> {
|
|
1300
1286
|
#private;
|
|
1287
|
+
readonly baseThreadsDB: ThreadDB<M>;
|
|
1288
|
+
readonly baseNotificationsById: Signal<NotificationsById>;
|
|
1289
|
+
readonly baseSettingsByRoomId: Signal<SettingsByRoomId>;
|
|
1290
|
+
readonly optimisticUpdates: Signal<readonly OptimisticUpdate<M>[]>;
|
|
1291
|
+
readonly baseVersionsByRoomId: Signal<VersionsByRoomId>;
|
|
1292
|
+
readonly permissionHintsByRoomId: Signal<PermissionHintsByRoomId>;
|
|
1293
|
+
readonly outputs: {
|
|
1294
|
+
readonly threadifications: DerivedSignal<CleanThreadifications<M>>;
|
|
1295
|
+
readonly threads: DerivedSignal<CleanThreads<M>>;
|
|
1296
|
+
readonly notifications: DerivedSignal<CleanNotifications>;
|
|
1297
|
+
readonly settingsByRoomId: DerivedSignal<SettingsByRoomId>;
|
|
1298
|
+
readonly versionsByRoomId: DerivedSignal<VersionsByRoomId>;
|
|
1299
|
+
};
|
|
1301
1300
|
constructor(client: OpaqueClient);
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1301
|
+
get1_both(): CleanThreadifications<M>;
|
|
1302
|
+
subscribe1_both(callback: () => void): () => void;
|
|
1303
|
+
get1_threads(): CleanThreads<M>;
|
|
1304
|
+
subscribe1_threads(callback: () => void): () => void;
|
|
1305
|
+
get1_notifications(): CleanNotifications;
|
|
1306
|
+
subscribe1_notifications(callback: () => void): () => void;
|
|
1307
|
+
get2(): SettingsByRoomId;
|
|
1308
|
+
subscribe2(callback: () => void): () => void;
|
|
1309
|
+
get3(): VersionsByRoomId;
|
|
1310
|
+
subscribe3(callback: () => void): () => void;
|
|
1305
1311
|
/**
|
|
1306
1312
|
* Returns the async result of the given query and room id. If the query is success,
|
|
1307
1313
|
* then it will return the threads that match that provided query and room id.
|
|
@@ -1312,8 +1318,6 @@ declare class UmbrellaStore<M extends BaseMetadata> {
|
|
|
1312
1318
|
getInboxNotificationsLoadingState(): InboxNotificationsAsyncResult;
|
|
1313
1319
|
getNotificationSettingsLoadingState(roomId: string): RoomNotificationSettingsAsyncResult;
|
|
1314
1320
|
getRoomVersionsLoadingState(roomId: string): AsyncResult<HistoryVersion[], "versions">;
|
|
1315
|
-
subscribe(callback: () => void): () => void;
|
|
1316
|
-
_getPermissions(roomId: string): Set<Permission> | undefined;
|
|
1317
1321
|
/**
|
|
1318
1322
|
* Updates an existing inbox notification with a new value, replacing the
|
|
1319
1323
|
* corresponding optimistic update.
|
|
@@ -1378,6 +1382,7 @@ declare class UmbrellaStore<M extends BaseMetadata> {
|
|
|
1378
1382
|
waitUntilRoomThreadsLoaded(roomId: string, query: ThreadsQuery<M> | undefined): UsablePromise<void>;
|
|
1379
1383
|
fetchRoomThreadsDeltaUpdate(roomId: string, signal: AbortSignal): Promise<void>;
|
|
1380
1384
|
waitUntilUserThreadsLoaded(query: ThreadsQuery<M> | undefined): UsablePromise<void>;
|
|
1385
|
+
private invalidateEntireStore;
|
|
1381
1386
|
fetchUserThreadsDeltaUpdate(signal: AbortSignal): Promise<void>;
|
|
1382
1387
|
waitUntilRoomVersionsLoaded(roomId: string): UsablePromise<void>;
|
|
1383
1388
|
fetchRoomVersionsDeltaUpdate(roomId: string, signal: AbortSignal): Promise<void>;
|
|
@@ -1391,7 +1396,7 @@ declare class UmbrellaStore<M extends BaseMetadata> {
|
|
|
1391
1396
|
*
|
|
1392
1397
|
* @private This is a private/advanced API. Do not rely on it.
|
|
1393
1398
|
*/
|
|
1394
|
-
declare const ClientContext:
|
|
1399
|
+
declare const ClientContext: react.Context<OpaqueClient | null>;
|
|
1395
1400
|
/**
|
|
1396
1401
|
* Gets or creates a unique Umbrella store for each unique client instance.
|
|
1397
1402
|
*
|
|
@@ -1414,7 +1419,7 @@ declare function useClient<U extends BaseUserMeta>(): Client$1<U, BaseMetadata$1
|
|
|
1414
1419
|
* Unlike `RoomProvider`, `LiveblocksProvider` doesn’t call Liveblocks servers when mounted,
|
|
1415
1420
|
* and it should be placed higher in your app’s component tree.
|
|
1416
1421
|
*/
|
|
1417
|
-
declare function LiveblocksProvider<U extends BaseUserMeta = DU>(props: PropsWithChildren<ClientOptions<U>>):
|
|
1422
|
+
declare function LiveblocksProvider<U extends BaseUserMeta = DU>(props: PropsWithChildren<ClientOptions<U>>): react_jsx_runtime.JSX.Element;
|
|
1418
1423
|
/**
|
|
1419
1424
|
* Creates a LiveblocksProvider and a set of typed hooks. Note that any
|
|
1420
1425
|
* LiveblocksProvider created in this way takes no props, because it uses
|
|
@@ -1588,7 +1593,7 @@ declare function useSyncStatus(options?: UseSyncStatusOptions): SyncStatus;
|
|
|
1588
1593
|
*
|
|
1589
1594
|
* @private This is a private/advanced API. Do not rely on it.
|
|
1590
1595
|
*/
|
|
1591
|
-
declare const RoomContext:
|
|
1596
|
+
declare const RoomContext: react.Context<OpaqueRoom | null>;
|
|
1592
1597
|
/** @private */
|
|
1593
1598
|
declare function useRoomOrNull<P extends JsonObject, S extends LsonObject, U extends BaseUserMeta, E extends Json, M extends BaseMetadata$1>(): Room<P, S, U, E, M> | null;
|
|
1594
1599
|
|
|
@@ -1865,7 +1870,7 @@ declare function useAttachmentUrlSuspense(attachmentId: string): {
|
|
|
1865
1870
|
/**
|
|
1866
1871
|
* @private For internal use only. Do not rely on this hook.
|
|
1867
1872
|
*/
|
|
1868
|
-
declare function useRoomPermissions(roomId: string): Set<
|
|
1873
|
+
declare function useRoomPermissions(roomId: string): Set<unknown>;
|
|
1869
1874
|
/**
|
|
1870
1875
|
* Creates a RoomProvider and a set of typed hooks to use in your app. Note
|
|
1871
1876
|
* that any RoomProvider created in this way does not need to be nested in
|
|
@@ -2010,7 +2015,7 @@ declare const _useEditThreadMetadata: TypedBundle["useEditThreadMetadata"];
|
|
|
2010
2015
|
declare const _useEventListener: TypedBundle["useEventListener"];
|
|
2011
2016
|
/**
|
|
2012
2017
|
* Returns the presence of the current user of the current room, and a function to update it.
|
|
2013
|
-
* It is different from the setState function returned by the useState hook from
|
|
2018
|
+
* It is different from the setState function returned by the useState hook from
|
|
2014
2019
|
* You don't need to pass the full presence object to update it.
|
|
2015
2020
|
*
|
|
2016
2021
|
* @example
|
package/dist/suspense.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { ClientSideSuspense } from './index.mjs';
|
|
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-
|
|
2
|
+
export { x as ClientContext, L as LiveblocksProvider, M as MutationContext, R as RoomContext, H as RoomProvider, U as UseStorageStatusOptions, w as UseThreadsOptions, I as useAddReaction, aG as useAttachmentUrl, J as useBatch, K as useBroadcastEvent, N as useCanRedo, O as useCanUndo, z as useClient, P as useCreateComment, Q as useCreateThread, A as useDeleteAllInboxNotifications, S as useDeleteComment, B as useDeleteInboxNotification, T as useDeleteThread, V as useEditComment, W as useEditThreadMetadata, Z as useErrorListener, $ as useEventListener, a0 as useHistory, aH as useHistoryVersions, _ as useInboxNotificationThread, aJ as useInboxNotifications, a1 as useIsInsideRoom, a2 as useLostConnectionListener, D as useMarkAllInboxNotificationsAsRead, E as useMarkInboxNotificationAsRead, a3 as useMarkThreadAsRead, X as useMarkThreadAsResolved, Y as useMarkThreadAsUnresolved, a4 as useMutation, a5 as useMyPresence, ay as useOther, az as useOthers, aA as useOthersConnectionIds, a6 as useOthersListener, aB as useOthersMapped, a7 as useRedo, a8 as useRemoveReaction, a9 as useRoom, aK as useRoomInfo, aI as useRoomNotificationSettings, aC as useSelf, aa as useStatus, aD as useStorage, ab as useStorageRoot, aE as useStorageStatus, F as useSyncStatus, ac as useThreadSubscription, aF as useThreads, ad as useUndo, aL as useUnreadInboxNotificationsCount, ae as useUpdateMyPresence, af as useUpdateRoomNotificationSettings, aM as useUser, aN as useUserThreads_experimental } from './room-C_NzlTZP.mjs';
|
|
3
3
|
export { Json, JsonObject, shallow } from '@liveblocks/client';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
4
5
|
import 'react';
|
|
5
6
|
import '@liveblocks/core';
|
package/dist/suspense.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { ClientSideSuspense } from './index.js';
|
|
2
|
-
export { 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-
|
|
2
|
+
export { x as ClientContext, L as LiveblocksProvider, M as MutationContext, R as RoomContext, H as RoomProvider, U as UseStorageStatusOptions, w as UseThreadsOptions, I as useAddReaction, aG as useAttachmentUrl, J as useBatch, K as useBroadcastEvent, N as useCanRedo, O as useCanUndo, z as useClient, P as useCreateComment, Q as useCreateThread, A as useDeleteAllInboxNotifications, S as useDeleteComment, B as useDeleteInboxNotification, T as useDeleteThread, V as useEditComment, W as useEditThreadMetadata, Z as useErrorListener, $ as useEventListener, a0 as useHistory, aH as useHistoryVersions, _ as useInboxNotificationThread, aJ as useInboxNotifications, a1 as useIsInsideRoom, a2 as useLostConnectionListener, D as useMarkAllInboxNotificationsAsRead, E as useMarkInboxNotificationAsRead, a3 as useMarkThreadAsRead, X as useMarkThreadAsResolved, Y as useMarkThreadAsUnresolved, a4 as useMutation, a5 as useMyPresence, ay as useOther, az as useOthers, aA as useOthersConnectionIds, a6 as useOthersListener, aB as useOthersMapped, a7 as useRedo, a8 as useRemoveReaction, a9 as useRoom, aK as useRoomInfo, aI as useRoomNotificationSettings, aC as useSelf, aa as useStatus, aD as useStorage, ab as useStorageRoot, aE as useStorageStatus, F as useSyncStatus, ac as useThreadSubscription, aF as useThreads, ad as useUndo, aL as useUnreadInboxNotificationsCount, ae as useUpdateMyPresence, af as useUpdateRoomNotificationSettings, aM as useUser, aN as useUserThreads_experimental } from './room-C_NzlTZP.js';
|
|
3
3
|
export { Json, JsonObject, shallow } from '@liveblocks/client';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
4
5
|
import 'react';
|
|
5
6
|
import '@liveblocks/core';
|
package/dist/suspense.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkMI7M3UBZjs = require('./chunk-MI7M3UBZ.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -63,12 +63,12 @@ var _chunkFPO6VPFAjs = require('./chunk-FPO6VPFA.js');
|
|
|
63
63
|
|
|
64
64
|
|
|
65
65
|
|
|
66
|
-
var
|
|
66
|
+
var _chunkKY7WMVMGjs = require('./chunk-KY7WMVMG.js');
|
|
67
67
|
|
|
68
68
|
// src/suspense.ts
|
|
69
69
|
var _core = require('@liveblocks/core');
|
|
70
70
|
var _client = require('@liveblocks/client');
|
|
71
|
-
_core.detectDupes.call(void 0,
|
|
71
|
+
_core.detectDupes.call(void 0, _chunkMI7M3UBZjs.PKG_NAME, _chunkMI7M3UBZjs.PKG_VERSION, _chunkMI7M3UBZjs.PKG_FORMAT);
|
|
72
72
|
|
|
73
73
|
|
|
74
74
|
|
|
@@ -130,5 +130,5 @@ _core.detectDupes.call(void 0, _chunkFPO6VPFAjs.PKG_NAME, _chunkFPO6VPFAjs.PKG_V
|
|
|
130
130
|
|
|
131
131
|
|
|
132
132
|
|
|
133
|
-
exports.ClientContext =
|
|
133
|
+
exports.ClientContext = _chunkKY7WMVMGjs.ClientContext; exports.ClientSideSuspense = _chunkMI7M3UBZjs.ClientSideSuspense; exports.LiveblocksProvider = _chunkKY7WMVMGjs.LiveblocksProvider; exports.RoomContext = _chunkKY7WMVMGjs.RoomContext; exports.RoomProvider = _chunkKY7WMVMGjs._RoomProvider; exports.shallow = _client.shallow; exports.useAddReaction = _chunkKY7WMVMGjs._useAddReaction; exports.useAttachmentUrl = _chunkKY7WMVMGjs.useAttachmentUrlSuspense; exports.useBatch = _chunkKY7WMVMGjs.useBatch; exports.useBroadcastEvent = _chunkKY7WMVMGjs._useBroadcastEvent; exports.useCanRedo = _chunkKY7WMVMGjs.useCanRedo; exports.useCanUndo = _chunkKY7WMVMGjs.useCanUndo; exports.useClient = _chunkKY7WMVMGjs.useClient; exports.useCreateComment = _chunkKY7WMVMGjs.useCreateComment; exports.useCreateThread = _chunkKY7WMVMGjs._useCreateThread; exports.useDeleteAllInboxNotifications = _chunkKY7WMVMGjs.useDeleteAllInboxNotifications; exports.useDeleteComment = _chunkKY7WMVMGjs.useDeleteComment; exports.useDeleteInboxNotification = _chunkKY7WMVMGjs.useDeleteInboxNotification; exports.useDeleteThread = _chunkKY7WMVMGjs._useDeleteThread; exports.useEditComment = _chunkKY7WMVMGjs.useEditComment; exports.useEditThreadMetadata = _chunkKY7WMVMGjs._useEditThreadMetadata; exports.useErrorListener = _chunkKY7WMVMGjs.useErrorListener; exports.useEventListener = _chunkKY7WMVMGjs._useEventListener; exports.useHistory = _chunkKY7WMVMGjs.useHistory; exports.useHistoryVersions = _chunkKY7WMVMGjs._useHistoryVersionsSuspense; exports.useInboxNotificationThread = _chunkKY7WMVMGjs._useInboxNotificationThread; exports.useInboxNotifications = _chunkKY7WMVMGjs.useInboxNotificationsSuspense; exports.useIsInsideRoom = _chunkKY7WMVMGjs._useIsInsideRoom; exports.useLostConnectionListener = _chunkKY7WMVMGjs.useLostConnectionListener; exports.useMarkAllInboxNotificationsAsRead = _chunkKY7WMVMGjs.useMarkAllInboxNotificationsAsRead; exports.useMarkInboxNotificationAsRead = _chunkKY7WMVMGjs.useMarkInboxNotificationAsRead; exports.useMarkThreadAsRead = _chunkKY7WMVMGjs.useMarkThreadAsRead; exports.useMarkThreadAsResolved = _chunkKY7WMVMGjs.useMarkThreadAsResolved; exports.useMarkThreadAsUnresolved = _chunkKY7WMVMGjs.useMarkThreadAsUnresolved; exports.useMutation = _chunkKY7WMVMGjs._useMutation; exports.useMyPresence = _chunkKY7WMVMGjs._useMyPresence; exports.useOther = _chunkKY7WMVMGjs._useOtherSuspense; exports.useOthers = _chunkKY7WMVMGjs._useOthersSuspense; exports.useOthersConnectionIds = _chunkKY7WMVMGjs.useOthersConnectionIdsSuspense; exports.useOthersListener = _chunkKY7WMVMGjs._useOthersListener; exports.useOthersMapped = _chunkKY7WMVMGjs._useOthersMappedSuspense; exports.useRedo = _chunkKY7WMVMGjs.useRedo; exports.useRemoveReaction = _chunkKY7WMVMGjs.useRemoveReaction; exports.useRoom = _chunkKY7WMVMGjs._useRoom; exports.useRoomInfo = _chunkKY7WMVMGjs.useRoomInfoSuspense; exports.useRoomNotificationSettings = _chunkKY7WMVMGjs._useRoomNotificationSettingsSuspense; exports.useSelf = _chunkKY7WMVMGjs._useSelfSuspense; exports.useStatus = _chunkKY7WMVMGjs.useStatus; exports.useStorage = _chunkKY7WMVMGjs._useStorageSuspense; exports.useStorageRoot = _chunkKY7WMVMGjs._useStorageRoot; exports.useStorageStatus = _chunkKY7WMVMGjs.useStorageStatusSuspense; exports.useSyncStatus = _chunkKY7WMVMGjs.useSyncStatus; exports.useThreadSubscription = _chunkKY7WMVMGjs.useThreadSubscription; exports.useThreads = _chunkKY7WMVMGjs._useThreadsSuspense; exports.useUndo = _chunkKY7WMVMGjs.useUndo; exports.useUnreadInboxNotificationsCount = _chunkKY7WMVMGjs.useUnreadInboxNotificationsCountSuspense; exports.useUpdateMyPresence = _chunkKY7WMVMGjs._useUpdateMyPresence; exports.useUpdateRoomNotificationSettings = _chunkKY7WMVMGjs.useUpdateRoomNotificationSettings; exports.useUser = _chunkKY7WMVMGjs._useUserSuspense; exports.useUserThreads_experimental = _chunkKY7WMVMGjs._useUserThreadsSuspense_experimental;
|
|
134
134
|
//# sourceMappingURL=suspense.js.map
|