@liveblocks/react 2.8.3-tiptap1 → 2.9.0-rc2

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/index.d.mts CHANGED
@@ -1,4 +1,4 @@
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, ac as getUmbrellaStoreForClient, ad as selectThreads, j as useAddReaction, a5 as useAttachmentUrl, 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, a6 as useHistoryVersions, _ as useInboxNotificationThread, a7 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, a9 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, aa as useUnreadInboxNotificationsCount, S as useUpdateMyPresence, T as useUpdateRoomNotificationSettings, ab as useUser, a8 as useUserThreads_experimental } from './suspense-DJOhRXB2.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, ac as getUmbrellaStoreForClient, ad as selectThreads, j as useAddReaction, a5 as useAttachmentUrl, 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, a6 as useHistoryVersions, _ as useInboxNotificationThread, a7 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, a9 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, aa as useUnreadInboxNotificationsCount, S as useUpdateMyPresence, T as useUpdateRoomNotificationSettings, ab as useUser, a8 as useUserThreads_experimental } from './suspense-fYGGJ3D9.mjs';
2
2
  export { Json, JsonObject, shallow } from '@liveblocks/client';
3
3
  import 'react';
4
4
  import '@liveblocks/core';
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
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, ac as getUmbrellaStoreForClient, ad as selectThreads, j as useAddReaction, a5 as useAttachmentUrl, 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, a6 as useHistoryVersions, _ as useInboxNotificationThread, a7 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, a9 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, aa as useUnreadInboxNotificationsCount, S as useUpdateMyPresence, T as useUpdateRoomNotificationSettings, ab as useUser, a8 as useUserThreads_experimental } from './suspense-DJOhRXB2.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, ac as getUmbrellaStoreForClient, ad as selectThreads, j as useAddReaction, a5 as useAttachmentUrl, 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, a6 as useHistoryVersions, _ as useInboxNotificationThread, a7 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, a9 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, aa as useUnreadInboxNotificationsCount, S as useUpdateMyPresence, T as useUpdateRoomNotificationSettings, ab as useUser, a8 as useUserThreads_experimental } from './suspense-fYGGJ3D9.js';
2
2
  export { Json, JsonObject, shallow } from '@liveblocks/client';
3
3
  import 'react';
4
4
  import '@liveblocks/core';
package/dist/index.js CHANGED
@@ -67,12 +67,12 @@
67
67
 
68
68
 
69
69
 
70
- var _chunk3DYM4PT5js = require('./chunk-3DYM4PT5.js');
70
+ var _chunkNCYGTP2Hjs = require('./chunk-NCYGTP2H.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, _chunk3DYM4PT5js.PKG_NAME, _chunk3DYM4PT5js.PKG_VERSION, _chunk3DYM4PT5js.PKG_FORMAT);
75
+ _core.detectDupes.call(void 0, _chunkNCYGTP2Hjs.PKG_NAME, _chunkNCYGTP2Hjs.PKG_VERSION, _chunkNCYGTP2Hjs.PKG_FORMAT);
76
76
 
77
77
 
78
78
 
@@ -140,5 +140,5 @@ _core.detectDupes.call(void 0, _chunk3DYM4PT5js.PKG_NAME, _chunk3DYM4PT5js.PKG_V
140
140
 
141
141
 
142
142
 
143
- exports.ClientContext = _chunk3DYM4PT5js.ClientContext; exports.ClientSideSuspense = _chunk3DYM4PT5js.ClientSideSuspense; exports.CreateThreadError = _chunk3DYM4PT5js.CreateThreadError; exports.LiveblocksProvider = _chunk3DYM4PT5js.LiveblocksProvider; exports.RoomContext = _chunk3DYM4PT5js.RoomContext; exports.RoomProvider = _chunk3DYM4PT5js._RoomProvider; exports.createLiveblocksContext = _chunk3DYM4PT5js.createLiveblocksContext; exports.createRoomContext = _chunk3DYM4PT5js.createRoomContext; exports.getUmbrellaStoreForClient = _chunk3DYM4PT5js.getUmbrellaStoreForClient; exports.selectThreads = _chunk3DYM4PT5js.selectThreads; exports.shallow = _client.shallow; exports.useAddReaction = _chunk3DYM4PT5js._useAddReaction; exports.useAttachmentUrl = _chunk3DYM4PT5js.useAttachmentUrl; exports.useBatch = _chunk3DYM4PT5js.useBatch; exports.useBroadcastEvent = _chunk3DYM4PT5js._useBroadcastEvent; exports.useCanRedo = _chunk3DYM4PT5js.useCanRedo; exports.useCanUndo = _chunk3DYM4PT5js.useCanUndo; exports.useClient = _chunk3DYM4PT5js.useClient; exports.useCommentsErrorListener = _chunk3DYM4PT5js.useCommentsErrorListener; exports.useCreateComment = _chunk3DYM4PT5js.useCreateComment; exports.useCreateThread = _chunk3DYM4PT5js._useCreateThread; exports.useDeleteAllInboxNotifications = _chunk3DYM4PT5js.useDeleteAllInboxNotifications; exports.useDeleteComment = _chunk3DYM4PT5js.useDeleteComment; exports.useDeleteInboxNotification = _chunk3DYM4PT5js.useDeleteInboxNotification; exports.useDeleteThread = _chunk3DYM4PT5js._useDeleteThread; exports.useEditComment = _chunk3DYM4PT5js.useEditComment; exports.useEditThreadMetadata = _chunk3DYM4PT5js._useEditThreadMetadata; exports.useErrorListener = _chunk3DYM4PT5js.useErrorListener; exports.useEventListener = _chunk3DYM4PT5js._useEventListener; exports.useHistory = _chunk3DYM4PT5js.useHistory; exports.useHistoryVersionData = _chunk3DYM4PT5js.useHistoryVersionData; exports.useHistoryVersions = _chunk3DYM4PT5js._useHistoryVersions; exports.useInboxNotificationThread = _chunk3DYM4PT5js._useInboxNotificationThread; exports.useInboxNotifications = _chunk3DYM4PT5js.useInboxNotifications; exports.useIsInsideRoom = _chunk3DYM4PT5js._useIsInsideRoom; exports.useLostConnectionListener = _chunk3DYM4PT5js.useLostConnectionListener; exports.useMarkAllInboxNotificationsAsRead = _chunk3DYM4PT5js.useMarkAllInboxNotificationsAsRead; exports.useMarkInboxNotificationAsRead = _chunk3DYM4PT5js.useMarkInboxNotificationAsRead; exports.useMarkThreadAsRead = _chunk3DYM4PT5js.useMarkThreadAsRead; exports.useMarkThreadAsResolved = _chunk3DYM4PT5js.useMarkThreadAsResolved; exports.useMarkThreadAsUnresolved = _chunk3DYM4PT5js.useMarkThreadAsUnresolved; exports.useMutation = _chunk3DYM4PT5js._useMutation; exports.useMyPresence = _chunk3DYM4PT5js._useMyPresence; exports.useOther = _chunk3DYM4PT5js._useOther; exports.useOthers = _chunk3DYM4PT5js._useOthers; exports.useOthersConnectionIds = _chunk3DYM4PT5js.useOthersConnectionIds; exports.useOthersListener = _chunk3DYM4PT5js._useOthersListener; exports.useOthersMapped = _chunk3DYM4PT5js._useOthersMapped; exports.useRedo = _chunk3DYM4PT5js.useRedo; exports.useRemoveReaction = _chunk3DYM4PT5js.useRemoveReaction; exports.useRoom = _chunk3DYM4PT5js._useRoom; exports.useRoomInfo = _chunk3DYM4PT5js.useRoomInfo; exports.useRoomNotificationSettings = _chunk3DYM4PT5js.useRoomNotificationSettings; exports.useSelf = _chunk3DYM4PT5js._useSelf; exports.useStatus = _chunk3DYM4PT5js.useStatus; exports.useStorage = _chunk3DYM4PT5js._useStorage; exports.useStorageRoot = _chunk3DYM4PT5js._useStorageRoot; exports.useStorageStatus = _chunk3DYM4PT5js.useStorageStatus; exports.useThreadSubscription = _chunk3DYM4PT5js.useThreadSubscription; exports.useThreads = _chunk3DYM4PT5js._useThreads; exports.useUndo = _chunk3DYM4PT5js.useUndo; exports.useUnreadInboxNotificationsCount = _chunk3DYM4PT5js.useUnreadInboxNotificationsCount; exports.useUpdateMyPresence = _chunk3DYM4PT5js._useUpdateMyPresence; exports.useUpdateRoomNotificationSettings = _chunk3DYM4PT5js.useUpdateRoomNotificationSettings; exports.useUser = _chunk3DYM4PT5js._useUser; exports.useUserThreads_experimental = _chunk3DYM4PT5js._useUserThreads_experimental;
143
+ exports.ClientContext = _chunkNCYGTP2Hjs.ClientContext; exports.ClientSideSuspense = _chunkNCYGTP2Hjs.ClientSideSuspense; exports.CreateThreadError = _chunkNCYGTP2Hjs.CreateThreadError; exports.LiveblocksProvider = _chunkNCYGTP2Hjs.LiveblocksProvider; exports.RoomContext = _chunkNCYGTP2Hjs.RoomContext; exports.RoomProvider = _chunkNCYGTP2Hjs._RoomProvider; exports.createLiveblocksContext = _chunkNCYGTP2Hjs.createLiveblocksContext; exports.createRoomContext = _chunkNCYGTP2Hjs.createRoomContext; exports.getUmbrellaStoreForClient = _chunkNCYGTP2Hjs.getUmbrellaStoreForClient; exports.selectThreads = _chunkNCYGTP2Hjs.selectThreads; exports.shallow = _client.shallow; exports.useAddReaction = _chunkNCYGTP2Hjs._useAddReaction; exports.useAttachmentUrl = _chunkNCYGTP2Hjs.useAttachmentUrl; exports.useBatch = _chunkNCYGTP2Hjs.useBatch; exports.useBroadcastEvent = _chunkNCYGTP2Hjs._useBroadcastEvent; exports.useCanRedo = _chunkNCYGTP2Hjs.useCanRedo; exports.useCanUndo = _chunkNCYGTP2Hjs.useCanUndo; exports.useClient = _chunkNCYGTP2Hjs.useClient; exports.useCommentsErrorListener = _chunkNCYGTP2Hjs.useCommentsErrorListener; exports.useCreateComment = _chunkNCYGTP2Hjs.useCreateComment; exports.useCreateThread = _chunkNCYGTP2Hjs._useCreateThread; exports.useDeleteAllInboxNotifications = _chunkNCYGTP2Hjs.useDeleteAllInboxNotifications; exports.useDeleteComment = _chunkNCYGTP2Hjs.useDeleteComment; exports.useDeleteInboxNotification = _chunkNCYGTP2Hjs.useDeleteInboxNotification; exports.useDeleteThread = _chunkNCYGTP2Hjs._useDeleteThread; exports.useEditComment = _chunkNCYGTP2Hjs.useEditComment; exports.useEditThreadMetadata = _chunkNCYGTP2Hjs._useEditThreadMetadata; exports.useErrorListener = _chunkNCYGTP2Hjs.useErrorListener; exports.useEventListener = _chunkNCYGTP2Hjs._useEventListener; exports.useHistory = _chunkNCYGTP2Hjs.useHistory; exports.useHistoryVersionData = _chunkNCYGTP2Hjs.useHistoryVersionData; exports.useHistoryVersions = _chunkNCYGTP2Hjs._useHistoryVersions; exports.useInboxNotificationThread = _chunkNCYGTP2Hjs._useInboxNotificationThread; exports.useInboxNotifications = _chunkNCYGTP2Hjs.useInboxNotifications; exports.useIsInsideRoom = _chunkNCYGTP2Hjs._useIsInsideRoom; exports.useLostConnectionListener = _chunkNCYGTP2Hjs.useLostConnectionListener; exports.useMarkAllInboxNotificationsAsRead = _chunkNCYGTP2Hjs.useMarkAllInboxNotificationsAsRead; exports.useMarkInboxNotificationAsRead = _chunkNCYGTP2Hjs.useMarkInboxNotificationAsRead; exports.useMarkThreadAsRead = _chunkNCYGTP2Hjs.useMarkThreadAsRead; exports.useMarkThreadAsResolved = _chunkNCYGTP2Hjs.useMarkThreadAsResolved; exports.useMarkThreadAsUnresolved = _chunkNCYGTP2Hjs.useMarkThreadAsUnresolved; exports.useMutation = _chunkNCYGTP2Hjs._useMutation; exports.useMyPresence = _chunkNCYGTP2Hjs._useMyPresence; exports.useOther = _chunkNCYGTP2Hjs._useOther; exports.useOthers = _chunkNCYGTP2Hjs._useOthers; exports.useOthersConnectionIds = _chunkNCYGTP2Hjs.useOthersConnectionIds; exports.useOthersListener = _chunkNCYGTP2Hjs._useOthersListener; exports.useOthersMapped = _chunkNCYGTP2Hjs._useOthersMapped; exports.useRedo = _chunkNCYGTP2Hjs.useRedo; exports.useRemoveReaction = _chunkNCYGTP2Hjs.useRemoveReaction; exports.useRoom = _chunkNCYGTP2Hjs._useRoom; exports.useRoomInfo = _chunkNCYGTP2Hjs.useRoomInfo; exports.useRoomNotificationSettings = _chunkNCYGTP2Hjs.useRoomNotificationSettings; exports.useSelf = _chunkNCYGTP2Hjs._useSelf; exports.useStatus = _chunkNCYGTP2Hjs.useStatus; exports.useStorage = _chunkNCYGTP2Hjs._useStorage; exports.useStorageRoot = _chunkNCYGTP2Hjs._useStorageRoot; exports.useStorageStatus = _chunkNCYGTP2Hjs.useStorageStatus; exports.useThreadSubscription = _chunkNCYGTP2Hjs.useThreadSubscription; exports.useThreads = _chunkNCYGTP2Hjs._useThreads; exports.useUndo = _chunkNCYGTP2Hjs.useUndo; exports.useUnreadInboxNotificationsCount = _chunkNCYGTP2Hjs.useUnreadInboxNotificationsCount; exports.useUpdateMyPresence = _chunkNCYGTP2Hjs._useUpdateMyPresence; exports.useUpdateRoomNotificationSettings = _chunkNCYGTP2Hjs.useUpdateRoomNotificationSettings; exports.useUser = _chunkNCYGTP2Hjs._useUser; exports.useUserThreads_experimental = _chunkNCYGTP2Hjs._useUserThreads_experimental;
144
144
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
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 useAttachmentUrl,\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, selectThreads } from \"./liveblocks\";\n"]}
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 useAttachmentUrl,\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 { selectThreads } from \"./umbrella-store\";\n"]}
package/dist/index.mjs CHANGED
@@ -67,7 +67,7 @@ import {
67
67
  useUndo,
68
68
  useUnreadInboxNotificationsCount,
69
69
  useUpdateRoomNotificationSettings
70
- } from "./chunk-464Q66DF.mjs";
70
+ } from "./chunk-HDWNAH6H.mjs";
71
71
 
72
72
  // src/index.ts
73
73
  import { detectDupes } from "@liveblocks/core";
@@ -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\";\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 useAttachmentUrl,\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, selectThreads } from \"./liveblocks\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,mBAAmB;AAc5B,SAAS,eAAe;AAXxB,YAAY,UAAU,aAAa,UAAU;","names":[]}
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 useAttachmentUrl,\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 { selectThreads } from \"./umbrella-store\";\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, RoomNotificationSettings, Json, Room, Status, BroadcastOptions, OthersEvent, LostConnectionEvent, History, BaseMetadata as BaseMetadata$1, ThreadData as ThreadData$1, Client as Client$1, ClientOptions, StorageStatus as StorageStatus$1, CommentData as CommentData$1 } from '@liveblocks/client';
1
+ import { JsonObject, LsonObject, BaseUserMeta, LiveObject, User, RoomNotificationSettings, Json, Room, Status, BroadcastOptions, OthersEvent, LostConnectionEvent, History, BaseMetadata as BaseMetadata$1, Client as Client$1, ClientOptions, StorageStatus as StorageStatus$1, CommentData as CommentData$1 } from '@liveblocks/client';
2
2
  import * as React$1 from 'react';
3
3
  import React__default, { ReactNode, PropsWithChildren } from 'react';
4
- import { BaseMetadata, CommentBody, Patchable, StorageStatus, QueryMetadata, AsyncResult, DRI, AsyncSuccess, CommentAttachment, Resolve, ToImmutable, ThreadData, InboxNotificationData, HistoryVersion, Client, LiveblocksError, RoomEventMessage, CommentData, PartialUnless, ThreadDataWithDeleteInfo, RoomNotificationSettings as RoomNotificationSettings$1, CommentUserReaction, ThreadDeleteInfo, InboxNotificationDeleteInfo, DistributiveOmit, OpaqueClient, DU, DM, OpaqueRoom, DP, DS, DE } from '@liveblocks/core';
4
+ import { BaseMetadata, CommentBody, Patchable, StorageStatus, QueryMetadata, AsyncResult, DRI, AsyncSuccess, CommentAttachment, InboxNotificationData, Resolve, ToImmutable, AsyncLoading, AsyncError, ThreadData, HistoryVersion, Client, LiveblocksError, RoomEventMessage, CommentData, PartialUnless, ThreadDataWithDeleteInfo, RoomNotificationSettings as RoomNotificationSettings$1, OpaqueClient, CommentUserReaction, ThreadDeleteInfo, InboxNotificationDeleteInfo, DistributiveOmit, DU, DM, OpaqueRoom, DP, DS, DE } from '@liveblocks/core';
5
5
 
6
6
  declare type Props = {
7
7
  fallback: ReactNode;
@@ -202,10 +202,24 @@ declare type CommentReactionOptions = {
202
202
  commentId: string;
203
203
  emoji: string;
204
204
  };
205
- declare type ThreadsAsyncSuccess<M extends BaseMetadata> = AsyncSuccess<ThreadData<M>[], "threads">;
206
- declare type ThreadsAsyncResult<M extends BaseMetadata> = AsyncResult<ThreadData<M>[], "threads">;
207
- declare type InboxNotificationsAsyncSuccess = AsyncSuccess<InboxNotificationData[], "inboxNotifications">;
208
- declare type InboxNotificationsAsyncResult = AsyncResult<InboxNotificationData[], "inboxNotifications">;
205
+ declare type NoPaginationFields = {
206
+ hasFetchedAll?: never;
207
+ isFetchingMore?: never;
208
+ fetchMore?: never;
209
+ fetchMoreError?: never;
210
+ };
211
+ declare type PaginationFields = {
212
+ hasFetchedAll: boolean;
213
+ isFetchingMore: boolean;
214
+ fetchMore: () => void;
215
+ fetchMoreError?: Error;
216
+ };
217
+ declare type PagedAsyncSuccess<T, F extends string> = Resolve<AsyncSuccess<T, F> & PaginationFields>;
218
+ declare type PagedAsyncResult<T, F extends string> = Resolve<AsyncLoading<F> & NoPaginationFields> | Resolve<AsyncError<F> & NoPaginationFields> | PagedAsyncSuccess<T, F>;
219
+ declare type ThreadsAsyncSuccess<M extends BaseMetadata> = PagedAsyncSuccess<ThreadData<M>[], "threads">;
220
+ declare type ThreadsAsyncResult<M extends BaseMetadata> = PagedAsyncResult<ThreadData<M>[], "threads">;
221
+ declare type InboxNotificationsAsyncSuccess = PagedAsyncSuccess<InboxNotificationData[], "inboxNotifications">;
222
+ declare type InboxNotificationsAsyncResult = PagedAsyncResult<InboxNotificationData[], "inboxNotifications">;
209
223
  declare type UnreadInboxNotificationsCountAsyncSuccess = AsyncSuccess<number, "count">;
210
224
  declare type UnreadInboxNotificationsCountAsyncResult = AsyncResult<number, "count">;
211
225
  declare type RoomNotificationSettingsAsyncSuccess = AsyncSuccess<RoomNotificationSettings, "settings">;
@@ -1146,6 +1160,28 @@ declare type UpdateNotificationSettingsOptimisticUpdate = {
1146
1160
  settings: Partial<RoomNotificationSettings$1>;
1147
1161
  };
1148
1162
  declare type QueryAsyncResult = AsyncResult<undefined>;
1163
+ /**
1164
+ * @private Do not rely on this internal API.
1165
+ */
1166
+ declare function selectThreads<M extends BaseMetadata>(state: UmbrellaStoreState<M>, options: {
1167
+ roomId: string | null;
1168
+ query?: ThreadsQuery<M>;
1169
+ orderBy: "age" | "last-update";
1170
+ }): ThreadData<M>[];
1171
+ /**
1172
+ * Like Promise<T>, except it will have a synchronously readable `status`
1173
+ * field, indicating the status of the promise.
1174
+ * This is compatible with React's `use()` promises, hence the name.
1175
+ */
1176
+ declare type UsablePromise<T> = Promise<T> & ({
1177
+ status: "pending";
1178
+ } | {
1179
+ status: "rejected";
1180
+ reason: Error;
1181
+ } | {
1182
+ status: "fulfilled";
1183
+ value: T;
1184
+ });
1149
1185
  /**
1150
1186
  * Externally observable state of the store, which will have:
1151
1187
  * - Optimistic updates applied
@@ -1157,7 +1193,6 @@ declare type UmbrellaStoreState<M extends BaseMetadata> = {
1157
1193
  * e.g. 'room-abc-{"color":"red"}' - ok
1158
1194
  * e.g. 'room-abc-{}' - loading
1159
1195
  */
1160
- queries2: Record<string, QueryAsyncResult>;
1161
1196
  queries3: Record<string, QueryAsyncResult>;
1162
1197
  queries4: Record<string, QueryAsyncResult>;
1163
1198
  /**
@@ -1174,12 +1209,12 @@ declare type UmbrellaStoreState<M extends BaseMetadata> = {
1174
1209
  /**
1175
1210
  * All inbox notifications in a sorted array, optimistic updates applied.
1176
1211
  */
1177
- inboxNotifications: InboxNotificationData[];
1212
+ notifications: InboxNotificationData[];
1178
1213
  /**
1179
1214
  * Inbox notifications by ID.
1180
1215
  * e.g. `in_${string}`
1181
1216
  */
1182
- inboxNotificationsById: Record<string, InboxNotificationData>;
1217
+ notificationsById: Record<string, InboxNotificationData>;
1183
1218
  /**
1184
1219
  * Notification settings by room ID.
1185
1220
  * e.g. { 'room-abc': { threads: "all" },
@@ -1187,7 +1222,7 @@ declare type UmbrellaStoreState<M extends BaseMetadata> = {
1187
1222
  * 'room-xyz': { threads: "none" },
1188
1223
  * }
1189
1224
  */
1190
- notificationSettingsByRoomId: Record<string, RoomNotificationSettings$1>;
1225
+ settingsByRoomId: Record<string, RoomNotificationSettings$1>;
1191
1226
  /**
1192
1227
  * Versions by roomId
1193
1228
  * e.g. { 'room-abc': {versions: "all versions"}}
@@ -1195,20 +1230,28 @@ declare type UmbrellaStoreState<M extends BaseMetadata> = {
1195
1230
  versionsByRoomId: Record<string, HistoryVersion[]>;
1196
1231
  };
1197
1232
  declare class UmbrellaStore<M extends BaseMetadata> {
1233
+ private _client?;
1198
1234
  private _store;
1199
1235
  private _prevState;
1200
1236
  private _stateCached;
1201
- constructor();
1237
+ private _notificationsLastRequestedAt;
1238
+ private _notifications;
1239
+ private _roomThreadsLastRequestedAtByRoom;
1240
+ private _roomThreads;
1241
+ private _userThreadsLastRequestedAt;
1242
+ private _userThreads;
1243
+ constructor(client?: OpaqueClient);
1202
1244
  private get;
1203
1245
  batch(callback: () => void): void;
1204
1246
  getFullState(): UmbrellaStoreState<M>;
1205
1247
  /**
1206
- * Returns the async result of the given queryKey. If the query is success,
1207
- * then it will return the entire store's state in the payload.
1248
+ * Returns the async result of the given query and room id. If the query is success,
1249
+ * then it will return the threads that match that provided query and room id.
1250
+ *
1208
1251
  */
1209
- getThreadsAsync(queryKey: string): AsyncResult<UmbrellaStoreState<M>, "fullState">;
1210
- getUserThreadsAsync(queryKey: string): AsyncResult<UmbrellaStoreState<M>, "fullState">;
1211
- getInboxNotificationsAsync(): AsyncResult<InboxNotificationData[], "inboxNotifications">;
1252
+ getRoomThreadsAsync(roomId: string, query: ThreadsQuery<M> | undefined): ThreadsAsyncResult<M>;
1253
+ getUserThreadsAsync(query: ThreadsQuery<M> | undefined): ThreadsAsyncResult<M>;
1254
+ getInboxNotificationsAsync(): InboxNotificationsAsyncResult;
1212
1255
  getNotificationSettingsAsync(roomId: string): RoomNotificationSettingsAsyncResult;
1213
1256
  getVersionsAsync(roomId: string): AsyncResult<HistoryVersion[], "versions">;
1214
1257
  /**
@@ -1229,8 +1272,6 @@ declare class UmbrellaStore<M extends BaseMetadata> {
1229
1272
  private updateInboxNotificationsCache;
1230
1273
  private setNotificationSettings;
1231
1274
  private setVersions;
1232
- private setQuery1State;
1233
- private setQuery2State;
1234
1275
  private setQuery3State;
1235
1276
  private setQuery4State;
1236
1277
  private updateOptimisticUpdatesCache;
@@ -1295,6 +1336,7 @@ declare class UmbrellaStore<M extends BaseMetadata> {
1295
1336
  editComment(threadId: string, optimisticUpdateId: string, editedComment: CommentData): void;
1296
1337
  deleteComment(threadId: string, optimisticUpdateId: string, commentId: string, deletedAt: Date): void;
1297
1338
  updateThreadAndNotification(thread: ThreadData<M>, inboxNotification?: InboxNotificationData): void;
1339
+ updateThreadsAndNotifications(threads: ThreadData<M>[], inboxNotifications: InboxNotificationData[]): void;
1298
1340
  updateThreadsAndNotifications(threads: ThreadData<M>[], inboxNotifications: InboxNotificationData[], deletedThreads: ThreadDeleteInfo[], deletedInboxNotifications: InboxNotificationDeleteInfo[]): void;
1299
1341
  /**
1300
1342
  * Updates existing notification setting for a room with a new value,
@@ -1305,18 +1347,18 @@ declare class UmbrellaStore<M extends BaseMetadata> {
1305
1347
  updateRoomVersions(roomId: string, versions: HistoryVersion[], queryKey?: string): void;
1306
1348
  addOptimisticUpdate(optimisticUpdate: DistributiveOmit<OptimisticUpdate<M>, "id">): string;
1307
1349
  removeOptimisticUpdate(optimisticUpdateId: string): void;
1308
- setQuery1Loading(): void;
1309
- setQuery1OK(): void;
1310
- setQuery1Error(error: Error): void;
1311
- setQuery2Loading(queryKey: string): void;
1312
- setQuery2OK(queryKey: string): void;
1313
- setQuery2Error(queryKey: string, error: Error): void;
1314
1350
  setQuery3Loading(queryKey: string): void;
1315
1351
  private setQuery3OK;
1316
1352
  setQuery3Error(queryKey: string, error: Error): void;
1317
1353
  setQuery4Loading(queryKey: string): void;
1318
1354
  private setQuery4OK;
1319
1355
  setQuery4Error(queryKey: string, error: Error): void;
1356
+ fetchNotificationsDeltaUpdate(): Promise<void>;
1357
+ waitUntilNotificationsLoaded(): UsablePromise<void>;
1358
+ waitUntilRoomThreadsLoaded(roomId: string, query: ThreadsQuery<M> | undefined): UsablePromise<void>;
1359
+ fetchRoomThreadsDeltaUpdate(roomId: string): Promise<void>;
1360
+ waitUntilUserThreadsLoaded(query: ThreadsQuery<M> | undefined): UsablePromise<void>;
1361
+ fetchUserThreadsDeltaUpdate(): Promise<void>;
1320
1362
  }
1321
1363
 
1322
1364
  /**
@@ -1326,14 +1368,6 @@ declare class UmbrellaStore<M extends BaseMetadata> {
1326
1368
  * @private This is a private/advanced API. Do not rely on it.
1327
1369
  */
1328
1370
  declare const ClientContext: React__default.Context<OpaqueClient | null>;
1329
- /**
1330
- * @private Do not rely on this internal API.
1331
- */
1332
- declare function selectThreads<M extends BaseMetadata$1>(state: UmbrellaStoreState<M>, options: {
1333
- roomId: string | null;
1334
- query?: ThreadsQuery<M>;
1335
- orderBy: "age" | "last-update";
1336
- }): ThreadData$1<M>[];
1337
1371
  /**
1338
1372
  * Gets or creates a unique Umbrella store for each unique client instance.
1339
1373
  *
@@ -1365,7 +1399,7 @@ declare function createLiveblocksContext<U extends BaseUserMeta = DU, M extends
1365
1399
  * @example
1366
1400
  * const { inboxNotifications, error, isLoading } = useInboxNotifications();
1367
1401
  */
1368
- declare function useInboxNotifications(): AsyncResult<InboxNotificationData[], "inboxNotifications">;
1402
+ declare function useInboxNotifications(): InboxNotificationsAsyncResult;
1369
1403
  /**
1370
1404
  * Returns the inbox notifications for the current user.
1371
1405
  *
@@ -1376,6 +1410,10 @@ declare function useInboxNotificationsSuspense(): {
1376
1410
  readonly isLoading: false;
1377
1411
  readonly inboxNotifications: InboxNotificationData[];
1378
1412
  readonly error?: undefined;
1413
+ hasFetchedAll: boolean;
1414
+ isFetchingMore: boolean;
1415
+ fetchMore: () => void;
1416
+ fetchMoreError?: Error | undefined;
1379
1417
  };
1380
1418
  /**
1381
1419
  * Returns a function that marks all of the current user's inbox notifications as read.
@@ -1,7 +1,7 @@
1
- import { JsonObject, LsonObject, BaseUserMeta, LiveObject, User, RoomNotificationSettings, Json, Room, Status, BroadcastOptions, OthersEvent, LostConnectionEvent, History, BaseMetadata as BaseMetadata$1, ThreadData as ThreadData$1, Client as Client$1, ClientOptions, StorageStatus as StorageStatus$1, CommentData as CommentData$1 } from '@liveblocks/client';
1
+ import { JsonObject, LsonObject, BaseUserMeta, LiveObject, User, RoomNotificationSettings, Json, Room, Status, BroadcastOptions, OthersEvent, LostConnectionEvent, History, BaseMetadata as BaseMetadata$1, Client as Client$1, ClientOptions, StorageStatus as StorageStatus$1, CommentData as CommentData$1 } from '@liveblocks/client';
2
2
  import * as React$1 from 'react';
3
3
  import React__default, { ReactNode, PropsWithChildren } from 'react';
4
- import { BaseMetadata, CommentBody, Patchable, StorageStatus, QueryMetadata, AsyncResult, DRI, AsyncSuccess, CommentAttachment, Resolve, ToImmutable, ThreadData, InboxNotificationData, HistoryVersion, Client, LiveblocksError, RoomEventMessage, CommentData, PartialUnless, ThreadDataWithDeleteInfo, RoomNotificationSettings as RoomNotificationSettings$1, CommentUserReaction, ThreadDeleteInfo, InboxNotificationDeleteInfo, DistributiveOmit, OpaqueClient, DU, DM, OpaqueRoom, DP, DS, DE } from '@liveblocks/core';
4
+ import { BaseMetadata, CommentBody, Patchable, StorageStatus, QueryMetadata, AsyncResult, DRI, AsyncSuccess, CommentAttachment, InboxNotificationData, Resolve, ToImmutable, AsyncLoading, AsyncError, ThreadData, HistoryVersion, Client, LiveblocksError, RoomEventMessage, CommentData, PartialUnless, ThreadDataWithDeleteInfo, RoomNotificationSettings as RoomNotificationSettings$1, OpaqueClient, CommentUserReaction, ThreadDeleteInfo, InboxNotificationDeleteInfo, DistributiveOmit, DU, DM, OpaqueRoom, DP, DS, DE } from '@liveblocks/core';
5
5
 
6
6
  declare type Props = {
7
7
  fallback: ReactNode;
@@ -202,10 +202,24 @@ declare type CommentReactionOptions = {
202
202
  commentId: string;
203
203
  emoji: string;
204
204
  };
205
- declare type ThreadsAsyncSuccess<M extends BaseMetadata> = AsyncSuccess<ThreadData<M>[], "threads">;
206
- declare type ThreadsAsyncResult<M extends BaseMetadata> = AsyncResult<ThreadData<M>[], "threads">;
207
- declare type InboxNotificationsAsyncSuccess = AsyncSuccess<InboxNotificationData[], "inboxNotifications">;
208
- declare type InboxNotificationsAsyncResult = AsyncResult<InboxNotificationData[], "inboxNotifications">;
205
+ declare type NoPaginationFields = {
206
+ hasFetchedAll?: never;
207
+ isFetchingMore?: never;
208
+ fetchMore?: never;
209
+ fetchMoreError?: never;
210
+ };
211
+ declare type PaginationFields = {
212
+ hasFetchedAll: boolean;
213
+ isFetchingMore: boolean;
214
+ fetchMore: () => void;
215
+ fetchMoreError?: Error;
216
+ };
217
+ declare type PagedAsyncSuccess<T, F extends string> = Resolve<AsyncSuccess<T, F> & PaginationFields>;
218
+ declare type PagedAsyncResult<T, F extends string> = Resolve<AsyncLoading<F> & NoPaginationFields> | Resolve<AsyncError<F> & NoPaginationFields> | PagedAsyncSuccess<T, F>;
219
+ declare type ThreadsAsyncSuccess<M extends BaseMetadata> = PagedAsyncSuccess<ThreadData<M>[], "threads">;
220
+ declare type ThreadsAsyncResult<M extends BaseMetadata> = PagedAsyncResult<ThreadData<M>[], "threads">;
221
+ declare type InboxNotificationsAsyncSuccess = PagedAsyncSuccess<InboxNotificationData[], "inboxNotifications">;
222
+ declare type InboxNotificationsAsyncResult = PagedAsyncResult<InboxNotificationData[], "inboxNotifications">;
209
223
  declare type UnreadInboxNotificationsCountAsyncSuccess = AsyncSuccess<number, "count">;
210
224
  declare type UnreadInboxNotificationsCountAsyncResult = AsyncResult<number, "count">;
211
225
  declare type RoomNotificationSettingsAsyncSuccess = AsyncSuccess<RoomNotificationSettings, "settings">;
@@ -1146,6 +1160,28 @@ declare type UpdateNotificationSettingsOptimisticUpdate = {
1146
1160
  settings: Partial<RoomNotificationSettings$1>;
1147
1161
  };
1148
1162
  declare type QueryAsyncResult = AsyncResult<undefined>;
1163
+ /**
1164
+ * @private Do not rely on this internal API.
1165
+ */
1166
+ declare function selectThreads<M extends BaseMetadata>(state: UmbrellaStoreState<M>, options: {
1167
+ roomId: string | null;
1168
+ query?: ThreadsQuery<M>;
1169
+ orderBy: "age" | "last-update";
1170
+ }): ThreadData<M>[];
1171
+ /**
1172
+ * Like Promise<T>, except it will have a synchronously readable `status`
1173
+ * field, indicating the status of the promise.
1174
+ * This is compatible with React's `use()` promises, hence the name.
1175
+ */
1176
+ declare type UsablePromise<T> = Promise<T> & ({
1177
+ status: "pending";
1178
+ } | {
1179
+ status: "rejected";
1180
+ reason: Error;
1181
+ } | {
1182
+ status: "fulfilled";
1183
+ value: T;
1184
+ });
1149
1185
  /**
1150
1186
  * Externally observable state of the store, which will have:
1151
1187
  * - Optimistic updates applied
@@ -1157,7 +1193,6 @@ declare type UmbrellaStoreState<M extends BaseMetadata> = {
1157
1193
  * e.g. 'room-abc-{"color":"red"}' - ok
1158
1194
  * e.g. 'room-abc-{}' - loading
1159
1195
  */
1160
- queries2: Record<string, QueryAsyncResult>;
1161
1196
  queries3: Record<string, QueryAsyncResult>;
1162
1197
  queries4: Record<string, QueryAsyncResult>;
1163
1198
  /**
@@ -1174,12 +1209,12 @@ declare type UmbrellaStoreState<M extends BaseMetadata> = {
1174
1209
  /**
1175
1210
  * All inbox notifications in a sorted array, optimistic updates applied.
1176
1211
  */
1177
- inboxNotifications: InboxNotificationData[];
1212
+ notifications: InboxNotificationData[];
1178
1213
  /**
1179
1214
  * Inbox notifications by ID.
1180
1215
  * e.g. `in_${string}`
1181
1216
  */
1182
- inboxNotificationsById: Record<string, InboxNotificationData>;
1217
+ notificationsById: Record<string, InboxNotificationData>;
1183
1218
  /**
1184
1219
  * Notification settings by room ID.
1185
1220
  * e.g. { 'room-abc': { threads: "all" },
@@ -1187,7 +1222,7 @@ declare type UmbrellaStoreState<M extends BaseMetadata> = {
1187
1222
  * 'room-xyz': { threads: "none" },
1188
1223
  * }
1189
1224
  */
1190
- notificationSettingsByRoomId: Record<string, RoomNotificationSettings$1>;
1225
+ settingsByRoomId: Record<string, RoomNotificationSettings$1>;
1191
1226
  /**
1192
1227
  * Versions by roomId
1193
1228
  * e.g. { 'room-abc': {versions: "all versions"}}
@@ -1195,20 +1230,28 @@ declare type UmbrellaStoreState<M extends BaseMetadata> = {
1195
1230
  versionsByRoomId: Record<string, HistoryVersion[]>;
1196
1231
  };
1197
1232
  declare class UmbrellaStore<M extends BaseMetadata> {
1233
+ private _client?;
1198
1234
  private _store;
1199
1235
  private _prevState;
1200
1236
  private _stateCached;
1201
- constructor();
1237
+ private _notificationsLastRequestedAt;
1238
+ private _notifications;
1239
+ private _roomThreadsLastRequestedAtByRoom;
1240
+ private _roomThreads;
1241
+ private _userThreadsLastRequestedAt;
1242
+ private _userThreads;
1243
+ constructor(client?: OpaqueClient);
1202
1244
  private get;
1203
1245
  batch(callback: () => void): void;
1204
1246
  getFullState(): UmbrellaStoreState<M>;
1205
1247
  /**
1206
- * Returns the async result of the given queryKey. If the query is success,
1207
- * then it will return the entire store's state in the payload.
1248
+ * Returns the async result of the given query and room id. If the query is success,
1249
+ * then it will return the threads that match that provided query and room id.
1250
+ *
1208
1251
  */
1209
- getThreadsAsync(queryKey: string): AsyncResult<UmbrellaStoreState<M>, "fullState">;
1210
- getUserThreadsAsync(queryKey: string): AsyncResult<UmbrellaStoreState<M>, "fullState">;
1211
- getInboxNotificationsAsync(): AsyncResult<InboxNotificationData[], "inboxNotifications">;
1252
+ getRoomThreadsAsync(roomId: string, query: ThreadsQuery<M> | undefined): ThreadsAsyncResult<M>;
1253
+ getUserThreadsAsync(query: ThreadsQuery<M> | undefined): ThreadsAsyncResult<M>;
1254
+ getInboxNotificationsAsync(): InboxNotificationsAsyncResult;
1212
1255
  getNotificationSettingsAsync(roomId: string): RoomNotificationSettingsAsyncResult;
1213
1256
  getVersionsAsync(roomId: string): AsyncResult<HistoryVersion[], "versions">;
1214
1257
  /**
@@ -1229,8 +1272,6 @@ declare class UmbrellaStore<M extends BaseMetadata> {
1229
1272
  private updateInboxNotificationsCache;
1230
1273
  private setNotificationSettings;
1231
1274
  private setVersions;
1232
- private setQuery1State;
1233
- private setQuery2State;
1234
1275
  private setQuery3State;
1235
1276
  private setQuery4State;
1236
1277
  private updateOptimisticUpdatesCache;
@@ -1295,6 +1336,7 @@ declare class UmbrellaStore<M extends BaseMetadata> {
1295
1336
  editComment(threadId: string, optimisticUpdateId: string, editedComment: CommentData): void;
1296
1337
  deleteComment(threadId: string, optimisticUpdateId: string, commentId: string, deletedAt: Date): void;
1297
1338
  updateThreadAndNotification(thread: ThreadData<M>, inboxNotification?: InboxNotificationData): void;
1339
+ updateThreadsAndNotifications(threads: ThreadData<M>[], inboxNotifications: InboxNotificationData[]): void;
1298
1340
  updateThreadsAndNotifications(threads: ThreadData<M>[], inboxNotifications: InboxNotificationData[], deletedThreads: ThreadDeleteInfo[], deletedInboxNotifications: InboxNotificationDeleteInfo[]): void;
1299
1341
  /**
1300
1342
  * Updates existing notification setting for a room with a new value,
@@ -1305,18 +1347,18 @@ declare class UmbrellaStore<M extends BaseMetadata> {
1305
1347
  updateRoomVersions(roomId: string, versions: HistoryVersion[], queryKey?: string): void;
1306
1348
  addOptimisticUpdate(optimisticUpdate: DistributiveOmit<OptimisticUpdate<M>, "id">): string;
1307
1349
  removeOptimisticUpdate(optimisticUpdateId: string): void;
1308
- setQuery1Loading(): void;
1309
- setQuery1OK(): void;
1310
- setQuery1Error(error: Error): void;
1311
- setQuery2Loading(queryKey: string): void;
1312
- setQuery2OK(queryKey: string): void;
1313
- setQuery2Error(queryKey: string, error: Error): void;
1314
1350
  setQuery3Loading(queryKey: string): void;
1315
1351
  private setQuery3OK;
1316
1352
  setQuery3Error(queryKey: string, error: Error): void;
1317
1353
  setQuery4Loading(queryKey: string): void;
1318
1354
  private setQuery4OK;
1319
1355
  setQuery4Error(queryKey: string, error: Error): void;
1356
+ fetchNotificationsDeltaUpdate(): Promise<void>;
1357
+ waitUntilNotificationsLoaded(): UsablePromise<void>;
1358
+ waitUntilRoomThreadsLoaded(roomId: string, query: ThreadsQuery<M> | undefined): UsablePromise<void>;
1359
+ fetchRoomThreadsDeltaUpdate(roomId: string): Promise<void>;
1360
+ waitUntilUserThreadsLoaded(query: ThreadsQuery<M> | undefined): UsablePromise<void>;
1361
+ fetchUserThreadsDeltaUpdate(): Promise<void>;
1320
1362
  }
1321
1363
 
1322
1364
  /**
@@ -1326,14 +1368,6 @@ declare class UmbrellaStore<M extends BaseMetadata> {
1326
1368
  * @private This is a private/advanced API. Do not rely on it.
1327
1369
  */
1328
1370
  declare const ClientContext: React__default.Context<OpaqueClient | null>;
1329
- /**
1330
- * @private Do not rely on this internal API.
1331
- */
1332
- declare function selectThreads<M extends BaseMetadata$1>(state: UmbrellaStoreState<M>, options: {
1333
- roomId: string | null;
1334
- query?: ThreadsQuery<M>;
1335
- orderBy: "age" | "last-update";
1336
- }): ThreadData$1<M>[];
1337
1371
  /**
1338
1372
  * Gets or creates a unique Umbrella store for each unique client instance.
1339
1373
  *
@@ -1365,7 +1399,7 @@ declare function createLiveblocksContext<U extends BaseUserMeta = DU, M extends
1365
1399
  * @example
1366
1400
  * const { inboxNotifications, error, isLoading } = useInboxNotifications();
1367
1401
  */
1368
- declare function useInboxNotifications(): AsyncResult<InboxNotificationData[], "inboxNotifications">;
1402
+ declare function useInboxNotifications(): InboxNotificationsAsyncResult;
1369
1403
  /**
1370
1404
  * Returns the inbox notifications for the current user.
1371
1405
  *
@@ -1376,6 +1410,10 @@ declare function useInboxNotificationsSuspense(): {
1376
1410
  readonly isLoading: false;
1377
1411
  readonly inboxNotifications: InboxNotificationData[];
1378
1412
  readonly error?: undefined;
1413
+ hasFetchedAll: boolean;
1414
+ isFetchingMore: boolean;
1415
+ fetchMore: () => void;
1416
+ fetchMoreError?: Error | undefined;
1379
1417
  };
1380
1418
  /**
1381
1419
  * Returns a function that marks all of the current user's inbox notifications as read.
@@ -1,4 +1,4 @@
1
- export { b as ClientContext, C as ClientSideSuspense, L as LiveblocksProvider, M as MutationContext, R as RoomContext, i as RoomProvider, U as UseStorageStatusOptions, a as UseThreadsOptions, j as useAddReaction, am as useAttachmentUrl, k as useBatch, l as useBroadcastEvent, m as useCanRedo, n as useCanUndo, u as useClient, 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, an as useHistoryVersions, _ as useInboxNotificationThread, ao 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, ae as useOther, af as useOthers, ag as useOthersConnectionIds, G as useOthersListener, ah as useOthersMapped, H as useRedo, I as useRemoveReaction, J as useRoom, ap as useRoomInfo, K as useRoomNotificationSettings, ai as useSelf, N as useStatus, aj as useStorage, O as useStorageRoot, ak as useStorageStatus, P as useThreadSubscription, al as useThreads, Q as useUndo, aq as useUnreadInboxNotificationsCount, S as useUpdateMyPresence, T as useUpdateRoomNotificationSettings, ar as useUser, as as useUserThreads_experimental } from './suspense-DJOhRXB2.mjs';
1
+ export { b as ClientContext, C as ClientSideSuspense, L as LiveblocksProvider, M as MutationContext, R as RoomContext, i as RoomProvider, U as UseStorageStatusOptions, a as UseThreadsOptions, j as useAddReaction, am as useAttachmentUrl, k as useBatch, l as useBroadcastEvent, m as useCanRedo, n as useCanUndo, u as useClient, 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, an as useHistoryVersions, _ as useInboxNotificationThread, ao 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, ae as useOther, af as useOthers, ag as useOthersConnectionIds, G as useOthersListener, ah as useOthersMapped, H as useRedo, I as useRemoveReaction, J as useRoom, ap as useRoomInfo, K as useRoomNotificationSettings, ai as useSelf, N as useStatus, aj as useStorage, O as useStorageRoot, ak as useStorageStatus, P as useThreadSubscription, al as useThreads, Q as useUndo, aq as useUnreadInboxNotificationsCount, S as useUpdateMyPresence, T as useUpdateRoomNotificationSettings, ar as useUser, as as useUserThreads_experimental } from './suspense-fYGGJ3D9.mjs';
2
2
  export { Json, JsonObject, shallow } from '@liveblocks/client';
3
3
  import 'react';
4
4
  import '@liveblocks/core';
@@ -1,4 +1,4 @@
1
- export { b as ClientContext, C as ClientSideSuspense, L as LiveblocksProvider, M as MutationContext, R as RoomContext, i as RoomProvider, U as UseStorageStatusOptions, a as UseThreadsOptions, j as useAddReaction, am as useAttachmentUrl, k as useBatch, l as useBroadcastEvent, m as useCanRedo, n as useCanUndo, u as useClient, 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, an as useHistoryVersions, _ as useInboxNotificationThread, ao 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, ae as useOther, af as useOthers, ag as useOthersConnectionIds, G as useOthersListener, ah as useOthersMapped, H as useRedo, I as useRemoveReaction, J as useRoom, ap as useRoomInfo, K as useRoomNotificationSettings, ai as useSelf, N as useStatus, aj as useStorage, O as useStorageRoot, ak as useStorageStatus, P as useThreadSubscription, al as useThreads, Q as useUndo, aq as useUnreadInboxNotificationsCount, S as useUpdateMyPresence, T as useUpdateRoomNotificationSettings, ar as useUser, as as useUserThreads_experimental } from './suspense-DJOhRXB2.js';
1
+ export { b as ClientContext, C as ClientSideSuspense, L as LiveblocksProvider, M as MutationContext, R as RoomContext, i as RoomProvider, U as UseStorageStatusOptions, a as UseThreadsOptions, j as useAddReaction, am as useAttachmentUrl, k as useBatch, l as useBroadcastEvent, m as useCanRedo, n as useCanUndo, u as useClient, 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, an as useHistoryVersions, _ as useInboxNotificationThread, ao 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, ae as useOther, af as useOthers, ag as useOthersConnectionIds, G as useOthersListener, ah as useOthersMapped, H as useRedo, I as useRemoveReaction, J as useRoom, ap as useRoomInfo, K as useRoomNotificationSettings, ai as useSelf, N as useStatus, aj as useStorage, O as useStorageRoot, ak as useStorageStatus, P as useThreadSubscription, al as useThreads, Q as useUndo, aq as useUnreadInboxNotificationsCount, S as useUpdateMyPresence, T as useUpdateRoomNotificationSettings, ar as useUser, as as useUserThreads_experimental } from './suspense-fYGGJ3D9.js';
2
2
  export { Json, JsonObject, shallow } from '@liveblocks/client';
3
3
  import 'react';
4
4
  import '@liveblocks/core';
package/dist/suspense.js CHANGED
@@ -60,12 +60,12 @@
60
60
 
61
61
 
62
62
 
63
- var _chunk3DYM4PT5js = require('./chunk-3DYM4PT5.js');
63
+ var _chunkNCYGTP2Hjs = require('./chunk-NCYGTP2H.js');
64
64
 
65
65
  // src/suspense.ts
66
66
  var _core = require('@liveblocks/core');
67
67
  var _client = require('@liveblocks/client');
68
- _core.detectDupes.call(void 0, _chunk3DYM4PT5js.PKG_NAME, _chunk3DYM4PT5js.PKG_VERSION, _chunk3DYM4PT5js.PKG_FORMAT);
68
+ _core.detectDupes.call(void 0, _chunkNCYGTP2Hjs.PKG_NAME, _chunkNCYGTP2Hjs.PKG_VERSION, _chunkNCYGTP2Hjs.PKG_FORMAT);
69
69
 
70
70
 
71
71
 
@@ -126,5 +126,5 @@ _core.detectDupes.call(void 0, _chunk3DYM4PT5js.PKG_NAME, _chunk3DYM4PT5js.PKG_V
126
126
 
127
127
 
128
128
 
129
- exports.ClientContext = _chunk3DYM4PT5js.ClientContext; exports.ClientSideSuspense = _chunk3DYM4PT5js.ClientSideSuspense; exports.LiveblocksProvider = _chunk3DYM4PT5js.LiveblocksProvider; exports.RoomContext = _chunk3DYM4PT5js.RoomContext; exports.RoomProvider = _chunk3DYM4PT5js._RoomProvider; exports.shallow = _client.shallow; exports.useAddReaction = _chunk3DYM4PT5js._useAddReaction; exports.useAttachmentUrl = _chunk3DYM4PT5js.useAttachmentUrlSuspense; exports.useBatch = _chunk3DYM4PT5js.useBatch; exports.useBroadcastEvent = _chunk3DYM4PT5js._useBroadcastEvent; exports.useCanRedo = _chunk3DYM4PT5js.useCanRedo; exports.useCanUndo = _chunk3DYM4PT5js.useCanUndo; exports.useClient = _chunk3DYM4PT5js.useClient; exports.useCreateComment = _chunk3DYM4PT5js.useCreateComment; exports.useCreateThread = _chunk3DYM4PT5js._useCreateThread; exports.useDeleteAllInboxNotifications = _chunk3DYM4PT5js.useDeleteAllInboxNotifications; exports.useDeleteComment = _chunk3DYM4PT5js.useDeleteComment; exports.useDeleteInboxNotification = _chunk3DYM4PT5js.useDeleteInboxNotification; exports.useDeleteThread = _chunk3DYM4PT5js._useDeleteThread; exports.useEditComment = _chunk3DYM4PT5js.useEditComment; exports.useEditThreadMetadata = _chunk3DYM4PT5js._useEditThreadMetadata; exports.useErrorListener = _chunk3DYM4PT5js.useErrorListener; exports.useEventListener = _chunk3DYM4PT5js._useEventListener; exports.useHistory = _chunk3DYM4PT5js.useHistory; exports.useHistoryVersions = _chunk3DYM4PT5js._useHistoryVersionsSuspense; exports.useInboxNotificationThread = _chunk3DYM4PT5js._useInboxNotificationThread; exports.useInboxNotifications = _chunk3DYM4PT5js.useInboxNotificationsSuspense; exports.useIsInsideRoom = _chunk3DYM4PT5js._useIsInsideRoom; exports.useLostConnectionListener = _chunk3DYM4PT5js.useLostConnectionListener; exports.useMarkAllInboxNotificationsAsRead = _chunk3DYM4PT5js.useMarkAllInboxNotificationsAsRead; exports.useMarkInboxNotificationAsRead = _chunk3DYM4PT5js.useMarkInboxNotificationAsRead; exports.useMarkThreadAsRead = _chunk3DYM4PT5js.useMarkThreadAsRead; exports.useMarkThreadAsResolved = _chunk3DYM4PT5js.useMarkThreadAsResolved; exports.useMarkThreadAsUnresolved = _chunk3DYM4PT5js.useMarkThreadAsUnresolved; exports.useMutation = _chunk3DYM4PT5js._useMutation; exports.useMyPresence = _chunk3DYM4PT5js._useMyPresence; exports.useOther = _chunk3DYM4PT5js._useOtherSuspense; exports.useOthers = _chunk3DYM4PT5js._useOthersSuspense; exports.useOthersConnectionIds = _chunk3DYM4PT5js.useOthersConnectionIdsSuspense; exports.useOthersListener = _chunk3DYM4PT5js._useOthersListener; exports.useOthersMapped = _chunk3DYM4PT5js._useOthersMappedSuspense; exports.useRedo = _chunk3DYM4PT5js.useRedo; exports.useRemoveReaction = _chunk3DYM4PT5js.useRemoveReaction; exports.useRoom = _chunk3DYM4PT5js._useRoom; exports.useRoomInfo = _chunk3DYM4PT5js.useRoomInfoSuspense; exports.useRoomNotificationSettings = _chunk3DYM4PT5js.useRoomNotificationSettings; exports.useSelf = _chunk3DYM4PT5js._useSelfSuspense; exports.useStatus = _chunk3DYM4PT5js.useStatus; exports.useStorage = _chunk3DYM4PT5js._useStorageSuspense; exports.useStorageRoot = _chunk3DYM4PT5js._useStorageRoot; exports.useStorageStatus = _chunk3DYM4PT5js.useStorageStatusSuspense; exports.useThreadSubscription = _chunk3DYM4PT5js.useThreadSubscription; exports.useThreads = _chunk3DYM4PT5js._useThreadsSuspense; exports.useUndo = _chunk3DYM4PT5js.useUndo; exports.useUnreadInboxNotificationsCount = _chunk3DYM4PT5js.useUnreadInboxNotificationsCountSuspense; exports.useUpdateMyPresence = _chunk3DYM4PT5js._useUpdateMyPresence; exports.useUpdateRoomNotificationSettings = _chunk3DYM4PT5js.useUpdateRoomNotificationSettings; exports.useUser = _chunk3DYM4PT5js._useUserSuspense; exports.useUserThreads_experimental = _chunk3DYM4PT5js._useUserThreadsSuspense_experimental;
129
+ exports.ClientContext = _chunkNCYGTP2Hjs.ClientContext; exports.ClientSideSuspense = _chunkNCYGTP2Hjs.ClientSideSuspense; exports.LiveblocksProvider = _chunkNCYGTP2Hjs.LiveblocksProvider; exports.RoomContext = _chunkNCYGTP2Hjs.RoomContext; exports.RoomProvider = _chunkNCYGTP2Hjs._RoomProvider; exports.shallow = _client.shallow; exports.useAddReaction = _chunkNCYGTP2Hjs._useAddReaction; exports.useAttachmentUrl = _chunkNCYGTP2Hjs.useAttachmentUrlSuspense; exports.useBatch = _chunkNCYGTP2Hjs.useBatch; exports.useBroadcastEvent = _chunkNCYGTP2Hjs._useBroadcastEvent; exports.useCanRedo = _chunkNCYGTP2Hjs.useCanRedo; exports.useCanUndo = _chunkNCYGTP2Hjs.useCanUndo; exports.useClient = _chunkNCYGTP2Hjs.useClient; exports.useCreateComment = _chunkNCYGTP2Hjs.useCreateComment; exports.useCreateThread = _chunkNCYGTP2Hjs._useCreateThread; exports.useDeleteAllInboxNotifications = _chunkNCYGTP2Hjs.useDeleteAllInboxNotifications; exports.useDeleteComment = _chunkNCYGTP2Hjs.useDeleteComment; exports.useDeleteInboxNotification = _chunkNCYGTP2Hjs.useDeleteInboxNotification; exports.useDeleteThread = _chunkNCYGTP2Hjs._useDeleteThread; exports.useEditComment = _chunkNCYGTP2Hjs.useEditComment; exports.useEditThreadMetadata = _chunkNCYGTP2Hjs._useEditThreadMetadata; exports.useErrorListener = _chunkNCYGTP2Hjs.useErrorListener; exports.useEventListener = _chunkNCYGTP2Hjs._useEventListener; exports.useHistory = _chunkNCYGTP2Hjs.useHistory; exports.useHistoryVersions = _chunkNCYGTP2Hjs._useHistoryVersionsSuspense; exports.useInboxNotificationThread = _chunkNCYGTP2Hjs._useInboxNotificationThread; exports.useInboxNotifications = _chunkNCYGTP2Hjs.useInboxNotificationsSuspense; exports.useIsInsideRoom = _chunkNCYGTP2Hjs._useIsInsideRoom; exports.useLostConnectionListener = _chunkNCYGTP2Hjs.useLostConnectionListener; exports.useMarkAllInboxNotificationsAsRead = _chunkNCYGTP2Hjs.useMarkAllInboxNotificationsAsRead; exports.useMarkInboxNotificationAsRead = _chunkNCYGTP2Hjs.useMarkInboxNotificationAsRead; exports.useMarkThreadAsRead = _chunkNCYGTP2Hjs.useMarkThreadAsRead; exports.useMarkThreadAsResolved = _chunkNCYGTP2Hjs.useMarkThreadAsResolved; exports.useMarkThreadAsUnresolved = _chunkNCYGTP2Hjs.useMarkThreadAsUnresolved; exports.useMutation = _chunkNCYGTP2Hjs._useMutation; exports.useMyPresence = _chunkNCYGTP2Hjs._useMyPresence; exports.useOther = _chunkNCYGTP2Hjs._useOtherSuspense; exports.useOthers = _chunkNCYGTP2Hjs._useOthersSuspense; exports.useOthersConnectionIds = _chunkNCYGTP2Hjs.useOthersConnectionIdsSuspense; exports.useOthersListener = _chunkNCYGTP2Hjs._useOthersListener; exports.useOthersMapped = _chunkNCYGTP2Hjs._useOthersMappedSuspense; exports.useRedo = _chunkNCYGTP2Hjs.useRedo; exports.useRemoveReaction = _chunkNCYGTP2Hjs.useRemoveReaction; exports.useRoom = _chunkNCYGTP2Hjs._useRoom; exports.useRoomInfo = _chunkNCYGTP2Hjs.useRoomInfoSuspense; exports.useRoomNotificationSettings = _chunkNCYGTP2Hjs.useRoomNotificationSettings; exports.useSelf = _chunkNCYGTP2Hjs._useSelfSuspense; exports.useStatus = _chunkNCYGTP2Hjs.useStatus; exports.useStorage = _chunkNCYGTP2Hjs._useStorageSuspense; exports.useStorageRoot = _chunkNCYGTP2Hjs._useStorageRoot; exports.useStorageStatus = _chunkNCYGTP2Hjs.useStorageStatusSuspense; exports.useThreadSubscription = _chunkNCYGTP2Hjs.useThreadSubscription; exports.useThreads = _chunkNCYGTP2Hjs._useThreadsSuspense; exports.useUndo = _chunkNCYGTP2Hjs.useUndo; exports.useUnreadInboxNotificationsCount = _chunkNCYGTP2Hjs.useUnreadInboxNotificationsCountSuspense; exports.useUpdateMyPresence = _chunkNCYGTP2Hjs._useUpdateMyPresence; exports.useUpdateRoomNotificationSettings = _chunkNCYGTP2Hjs.useUpdateRoomNotificationSettings; exports.useUser = _chunkNCYGTP2Hjs._useUserSuspense; exports.useUserThreads_experimental = _chunkNCYGTP2Hjs._useUserThreadsSuspense_experimental;
130
130
  //# sourceMappingURL=suspense.js.map
package/dist/suspense.mjs CHANGED
@@ -60,7 +60,7 @@ import {
60
60
  useUndo,
61
61
  useUnreadInboxNotificationsCountSuspense,
62
62
  useUpdateRoomNotificationSettings
63
- } from "./chunk-464Q66DF.mjs";
63
+ } from "./chunk-HDWNAH6H.mjs";
64
64
 
65
65
  // src/suspense.ts
66
66
  import { detectDupes } from "@liveblocks/core";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liveblocks/react",
3
- "version": "2.8.3-tiptap1",
3
+ "version": "2.9.0-rc2",
4
4
  "description": "A set of React hooks and providers to use Liveblocks declaratively. Liveblocks is the all-in-one toolkit to build collaborative products like Figma, Notion, and more.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "commonjs",
@@ -49,8 +49,8 @@
49
49
  "showdeps": "depcruise src --include-only '^src' --exclude='__tests__' --output-type dot | dot -T svg > /tmp/dependency-graph.svg && open /tmp/dependency-graph.svg"
50
50
  },
51
51
  "dependencies": {
52
- "@liveblocks/client": "2.8.3-tiptap1",
53
- "@liveblocks/core": "2.8.3-tiptap1",
52
+ "@liveblocks/client": "2.9.0-rc2",
53
+ "@liveblocks/core": "2.9.0-rc2",
54
54
  "use-sync-external-store": "^1.2.2"
55
55
  },
56
56
  "peerDependencies": {