@liveblocks/react 2.7.0 → 2.8.0-beta1

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, ab as getUmbrellaStoreForClient, ac as selectRoomThreads, j as useAddReaction, k as useBatch, l as useBroadcastEvent, m as useCanRedo, n as useCanUndo, u as useClient, W as useCommentsErrorListener, o as useCreateComment, p as useCreateThread, f as useDeleteAllInboxNotifications, q as useDeleteComment, g as useDeleteInboxNotification, r as useDeleteThread, s as useEditComment, t as useEditThreadMetadata, x as useErrorListener, y as useEventListener, z as useHistory, V as useHistoryVersionData, a5 as useHistoryVersions, _ as useInboxNotificationThread, a6 as useInboxNotifications, A as useIsInsideRoom, B as useLostConnectionListener, d as useMarkAllInboxNotificationsAsRead, e as useMarkInboxNotificationAsRead, D as useMarkThreadAsRead, v as useMarkThreadAsResolved, w as useMarkThreadAsUnresolved, E as useMutation, F as useMyPresence, Y as useOther, Z as useOthers, $ as useOthersConnectionIds, G as useOthersListener, a0 as useOthersMapped, H as useRedo, I as useRemoveReaction, J as useRoom, a8 as useRoomInfo, K as useRoomNotificationSettings, a1 as useSelf, N as useStatus, a2 as useStorage, O as useStorageRoot, a3 as useStorageStatus, P as useThreadSubscription, a4 as useThreads, Q as useUndo, a9 as useUnreadInboxNotificationsCount, S as useUpdateMyPresence, T as useUpdateRoomNotificationSettings, aa as useUser, a7 as useUserThreads_experimental } from './suspense-pL0llH_6.mjs';
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-j9RIyQIe.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, ab as getUmbrellaStoreForClient, ac as selectRoomThreads, j as useAddReaction, k as useBatch, l as useBroadcastEvent, m as useCanRedo, n as useCanUndo, u as useClient, W as useCommentsErrorListener, o as useCreateComment, p as useCreateThread, f as useDeleteAllInboxNotifications, q as useDeleteComment, g as useDeleteInboxNotification, r as useDeleteThread, s as useEditComment, t as useEditThreadMetadata, x as useErrorListener, y as useEventListener, z as useHistory, V as useHistoryVersionData, a5 as useHistoryVersions, _ as useInboxNotificationThread, a6 as useInboxNotifications, A as useIsInsideRoom, B as useLostConnectionListener, d as useMarkAllInboxNotificationsAsRead, e as useMarkInboxNotificationAsRead, D as useMarkThreadAsRead, v as useMarkThreadAsResolved, w as useMarkThreadAsUnresolved, E as useMutation, F as useMyPresence, Y as useOther, Z as useOthers, $ as useOthersConnectionIds, G as useOthersListener, a0 as useOthersMapped, H as useRedo, I as useRemoveReaction, J as useRoom, a8 as useRoomInfo, K as useRoomNotificationSettings, a1 as useSelf, N as useStatus, a2 as useStorage, O as useStorageRoot, a3 as useStorageStatus, P as useThreadSubscription, a4 as useThreads, Q as useUndo, a9 as useUnreadInboxNotificationsCount, S as useUpdateMyPresence, T as useUpdateRoomNotificationSettings, aa as useUser, a7 as useUserThreads_experimental } from './suspense-pL0llH_6.js';
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-j9RIyQIe.js';
2
2
  export { Json, JsonObject, shallow } from '@liveblocks/client';
3
3
  import 'react';
4
4
  import '@liveblocks/core';
package/dist/index.js CHANGED
@@ -66,12 +66,14 @@
66
66
 
67
67
 
68
68
 
69
- var _chunkKNPU4P3Yjs = require('./chunk-KNPU4P3Y.js');
69
+
70
+ var _chunkBYZWUB6Mjs = require('./chunk-BYZWUB6M.js');
70
71
 
71
72
  // src/index.ts
72
73
  var _core = require('@liveblocks/core');
73
74
  var _client = require('@liveblocks/client');
74
- _core.detectDupes.call(void 0, _chunkKNPU4P3Yjs.PKG_NAME, _chunkKNPU4P3Yjs.PKG_VERSION, _chunkKNPU4P3Yjs.PKG_FORMAT);
75
+ _core.detectDupes.call(void 0, _chunkBYZWUB6Mjs.PKG_NAME, _chunkBYZWUB6Mjs.PKG_VERSION, _chunkBYZWUB6Mjs.PKG_FORMAT);
76
+
75
77
 
76
78
 
77
79
 
@@ -138,5 +140,5 @@ _core.detectDupes.call(void 0, _chunkKNPU4P3Yjs.PKG_NAME, _chunkKNPU4P3Yjs.PKG_V
138
140
 
139
141
 
140
142
 
141
- exports.ClientContext = _chunkKNPU4P3Yjs.ClientContext; exports.ClientSideSuspense = _chunkKNPU4P3Yjs.ClientSideSuspense; exports.CreateThreadError = _chunkKNPU4P3Yjs.CreateThreadError; exports.LiveblocksProvider = _chunkKNPU4P3Yjs.LiveblocksProvider; exports.RoomContext = _chunkKNPU4P3Yjs.RoomContext; exports.RoomProvider = _chunkKNPU4P3Yjs._RoomProvider; exports.createLiveblocksContext = _chunkKNPU4P3Yjs.createLiveblocksContext; exports.createRoomContext = _chunkKNPU4P3Yjs.createRoomContext; exports.getUmbrellaStoreForClient = _chunkKNPU4P3Yjs.getUmbrellaStoreForClient; exports.selectRoomThreads = _chunkKNPU4P3Yjs.selectRoomThreads; exports.shallow = _client.shallow; exports.useAddReaction = _chunkKNPU4P3Yjs._useAddReaction; exports.useBatch = _chunkKNPU4P3Yjs.useBatch; exports.useBroadcastEvent = _chunkKNPU4P3Yjs._useBroadcastEvent; exports.useCanRedo = _chunkKNPU4P3Yjs.useCanRedo; exports.useCanUndo = _chunkKNPU4P3Yjs.useCanUndo; exports.useClient = _chunkKNPU4P3Yjs.useClient; exports.useCommentsErrorListener = _chunkKNPU4P3Yjs.useCommentsErrorListener; exports.useCreateComment = _chunkKNPU4P3Yjs.useCreateComment; exports.useCreateThread = _chunkKNPU4P3Yjs._useCreateThread; exports.useDeleteAllInboxNotifications = _chunkKNPU4P3Yjs.useDeleteAllInboxNotifications; exports.useDeleteComment = _chunkKNPU4P3Yjs.useDeleteComment; exports.useDeleteInboxNotification = _chunkKNPU4P3Yjs.useDeleteInboxNotification; exports.useDeleteThread = _chunkKNPU4P3Yjs._useDeleteThread; exports.useEditComment = _chunkKNPU4P3Yjs.useEditComment; exports.useEditThreadMetadata = _chunkKNPU4P3Yjs._useEditThreadMetadata; exports.useErrorListener = _chunkKNPU4P3Yjs.useErrorListener; exports.useEventListener = _chunkKNPU4P3Yjs._useEventListener; exports.useHistory = _chunkKNPU4P3Yjs.useHistory; exports.useHistoryVersionData = _chunkKNPU4P3Yjs.useHistoryVersionData; exports.useHistoryVersions = _chunkKNPU4P3Yjs._useHistoryVersions; exports.useInboxNotificationThread = _chunkKNPU4P3Yjs._useInboxNotificationThread; exports.useInboxNotifications = _chunkKNPU4P3Yjs.useInboxNotifications; exports.useIsInsideRoom = _chunkKNPU4P3Yjs._useIsInsideRoom; exports.useLostConnectionListener = _chunkKNPU4P3Yjs.useLostConnectionListener; exports.useMarkAllInboxNotificationsAsRead = _chunkKNPU4P3Yjs.useMarkAllInboxNotificationsAsRead; exports.useMarkInboxNotificationAsRead = _chunkKNPU4P3Yjs.useMarkInboxNotificationAsRead; exports.useMarkThreadAsRead = _chunkKNPU4P3Yjs.useMarkThreadAsRead; exports.useMarkThreadAsResolved = _chunkKNPU4P3Yjs.useMarkThreadAsResolved; exports.useMarkThreadAsUnresolved = _chunkKNPU4P3Yjs.useMarkThreadAsUnresolved; exports.useMutation = _chunkKNPU4P3Yjs._useMutation; exports.useMyPresence = _chunkKNPU4P3Yjs._useMyPresence; exports.useOther = _chunkKNPU4P3Yjs._useOther; exports.useOthers = _chunkKNPU4P3Yjs._useOthers; exports.useOthersConnectionIds = _chunkKNPU4P3Yjs.useOthersConnectionIds; exports.useOthersListener = _chunkKNPU4P3Yjs._useOthersListener; exports.useOthersMapped = _chunkKNPU4P3Yjs._useOthersMapped; exports.useRedo = _chunkKNPU4P3Yjs.useRedo; exports.useRemoveReaction = _chunkKNPU4P3Yjs.useRemoveReaction; exports.useRoom = _chunkKNPU4P3Yjs._useRoom; exports.useRoomInfo = _chunkKNPU4P3Yjs.useRoomInfo; exports.useRoomNotificationSettings = _chunkKNPU4P3Yjs.useRoomNotificationSettings; exports.useSelf = _chunkKNPU4P3Yjs._useSelf; exports.useStatus = _chunkKNPU4P3Yjs.useStatus; exports.useStorage = _chunkKNPU4P3Yjs._useStorage; exports.useStorageRoot = _chunkKNPU4P3Yjs._useStorageRoot; exports.useStorageStatus = _chunkKNPU4P3Yjs.useStorageStatus; exports.useThreadSubscription = _chunkKNPU4P3Yjs.useThreadSubscription; exports.useThreads = _chunkKNPU4P3Yjs._useThreads; exports.useUndo = _chunkKNPU4P3Yjs.useUndo; exports.useUnreadInboxNotificationsCount = _chunkKNPU4P3Yjs.useUnreadInboxNotificationsCount; exports.useUpdateMyPresence = _chunkKNPU4P3Yjs._useUpdateMyPresence; exports.useUpdateRoomNotificationSettings = _chunkKNPU4P3Yjs.useUpdateRoomNotificationSettings; exports.useUser = _chunkKNPU4P3Yjs._useUser; exports.useUserThreads_experimental = _chunkKNPU4P3Yjs._useUserThreads_experimental;
143
+ exports.ClientContext = _chunkBYZWUB6Mjs.ClientContext; exports.ClientSideSuspense = _chunkBYZWUB6Mjs.ClientSideSuspense; exports.CreateThreadError = _chunkBYZWUB6Mjs.CreateThreadError; exports.LiveblocksProvider = _chunkBYZWUB6Mjs.LiveblocksProvider; exports.RoomContext = _chunkBYZWUB6Mjs.RoomContext; exports.RoomProvider = _chunkBYZWUB6Mjs._RoomProvider; exports.createLiveblocksContext = _chunkBYZWUB6Mjs.createLiveblocksContext; exports.createRoomContext = _chunkBYZWUB6Mjs.createRoomContext; exports.getUmbrellaStoreForClient = _chunkBYZWUB6Mjs.getUmbrellaStoreForClient; exports.selectThreads = _chunkBYZWUB6Mjs.selectThreads; exports.shallow = _client.shallow; exports.useAddReaction = _chunkBYZWUB6Mjs._useAddReaction; exports.useAttachmentUrl = _chunkBYZWUB6Mjs.useAttachmentUrl; exports.useBatch = _chunkBYZWUB6Mjs.useBatch; exports.useBroadcastEvent = _chunkBYZWUB6Mjs._useBroadcastEvent; exports.useCanRedo = _chunkBYZWUB6Mjs.useCanRedo; exports.useCanUndo = _chunkBYZWUB6Mjs.useCanUndo; exports.useClient = _chunkBYZWUB6Mjs.useClient; exports.useCommentsErrorListener = _chunkBYZWUB6Mjs.useCommentsErrorListener; exports.useCreateComment = _chunkBYZWUB6Mjs.useCreateComment; exports.useCreateThread = _chunkBYZWUB6Mjs._useCreateThread; exports.useDeleteAllInboxNotifications = _chunkBYZWUB6Mjs.useDeleteAllInboxNotifications; exports.useDeleteComment = _chunkBYZWUB6Mjs.useDeleteComment; exports.useDeleteInboxNotification = _chunkBYZWUB6Mjs.useDeleteInboxNotification; exports.useDeleteThread = _chunkBYZWUB6Mjs._useDeleteThread; exports.useEditComment = _chunkBYZWUB6Mjs.useEditComment; exports.useEditThreadMetadata = _chunkBYZWUB6Mjs._useEditThreadMetadata; exports.useErrorListener = _chunkBYZWUB6Mjs.useErrorListener; exports.useEventListener = _chunkBYZWUB6Mjs._useEventListener; exports.useHistory = _chunkBYZWUB6Mjs.useHistory; exports.useHistoryVersionData = _chunkBYZWUB6Mjs.useHistoryVersionData; exports.useHistoryVersions = _chunkBYZWUB6Mjs._useHistoryVersions; exports.useInboxNotificationThread = _chunkBYZWUB6Mjs._useInboxNotificationThread; exports.useInboxNotifications = _chunkBYZWUB6Mjs.useInboxNotifications; exports.useIsInsideRoom = _chunkBYZWUB6Mjs._useIsInsideRoom; exports.useLostConnectionListener = _chunkBYZWUB6Mjs.useLostConnectionListener; exports.useMarkAllInboxNotificationsAsRead = _chunkBYZWUB6Mjs.useMarkAllInboxNotificationsAsRead; exports.useMarkInboxNotificationAsRead = _chunkBYZWUB6Mjs.useMarkInboxNotificationAsRead; exports.useMarkThreadAsRead = _chunkBYZWUB6Mjs.useMarkThreadAsRead; exports.useMarkThreadAsResolved = _chunkBYZWUB6Mjs.useMarkThreadAsResolved; exports.useMarkThreadAsUnresolved = _chunkBYZWUB6Mjs.useMarkThreadAsUnresolved; exports.useMutation = _chunkBYZWUB6Mjs._useMutation; exports.useMyPresence = _chunkBYZWUB6Mjs._useMyPresence; exports.useOther = _chunkBYZWUB6Mjs._useOther; exports.useOthers = _chunkBYZWUB6Mjs._useOthers; exports.useOthersConnectionIds = _chunkBYZWUB6Mjs.useOthersConnectionIds; exports.useOthersListener = _chunkBYZWUB6Mjs._useOthersListener; exports.useOthersMapped = _chunkBYZWUB6Mjs._useOthersMapped; exports.useRedo = _chunkBYZWUB6Mjs.useRedo; exports.useRemoveReaction = _chunkBYZWUB6Mjs.useRemoveReaction; exports.useRoom = _chunkBYZWUB6Mjs._useRoom; exports.useRoomInfo = _chunkBYZWUB6Mjs.useRoomInfo; exports.useRoomNotificationSettings = _chunkBYZWUB6Mjs.useRoomNotificationSettings; exports.useSelf = _chunkBYZWUB6Mjs._useSelf; exports.useStatus = _chunkBYZWUB6Mjs.useStatus; exports.useStorage = _chunkBYZWUB6Mjs._useStorage; exports.useStorageRoot = _chunkBYZWUB6Mjs._useStorageRoot; exports.useStorageStatus = _chunkBYZWUB6Mjs.useStorageStatus; exports.useThreadSubscription = _chunkBYZWUB6Mjs.useThreadSubscription; exports.useThreads = _chunkBYZWUB6Mjs._useThreads; exports.useUndo = _chunkBYZWUB6Mjs.useUndo; exports.useUnreadInboxNotificationsCount = _chunkBYZWUB6Mjs.useUnreadInboxNotificationsCount; exports.useUpdateMyPresence = _chunkBYZWUB6Mjs._useUpdateMyPresence; exports.useUpdateRoomNotificationSettings = _chunkBYZWUB6Mjs.useUpdateRoomNotificationSettings; exports.useUser = _chunkBYZWUB6Mjs._useUser; exports.useUserThreads_experimental = _chunkBYZWUB6Mjs._useUserThreads_experimental;
142
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 useHistoryVersions,\n} from \"./room\";\nexport {\n useInboxNotifications,\n useUserThreads_experimental as useUserThreads_experimental,\n useRoomInfo,\n useUnreadInboxNotificationsCount,\n useUser,\n} from \"./liveblocks\";\n\n// Private APIs (for use in react-lexical only)\nexport { getUmbrellaStoreForClient } from \"./liveblocks\";\nexport { selectRoomThreads } from \"./room\";\n"]}
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"]}
package/dist/index.mjs CHANGED
@@ -34,7 +34,8 @@ import {
34
34
  createLiveblocksContext,
35
35
  createRoomContext,
36
36
  getUmbrellaStoreForClient,
37
- selectRoomThreads,
37
+ selectThreads,
38
+ useAttachmentUrl,
38
39
  useBatch,
39
40
  useCanRedo,
40
41
  useCanUndo,
@@ -66,7 +67,7 @@ import {
66
67
  useUndo,
67
68
  useUnreadInboxNotificationsCount,
68
69
  useUpdateRoomNotificationSettings
69
- } from "./chunk-OKR7ROQ5.mjs";
70
+ } from "./chunk-WVLHQ6LC.mjs";
70
71
 
71
72
  // src/index.ts
72
73
  import { detectDupes } from "@liveblocks/core";
@@ -82,9 +83,10 @@ export {
82
83
  createLiveblocksContext,
83
84
  createRoomContext,
84
85
  getUmbrellaStoreForClient,
85
- selectRoomThreads,
86
+ selectThreads,
86
87
  shallow,
87
88
  _useAddReaction as useAddReaction,
89
+ useAttachmentUrl,
88
90
  useBatch,
89
91
  _useBroadcastEvent as useBroadcastEvent,
90
92
  useCanRedo,
@@ -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 useHistoryVersions,\n} from \"./room\";\nexport {\n useInboxNotifications,\n useUserThreads_experimental as useUserThreads_experimental,\n useRoomInfo,\n useUnreadInboxNotificationsCount,\n useUser,\n} from \"./liveblocks\";\n\n// Private APIs (for use in react-lexical only)\nexport { getUmbrellaStoreForClient } from \"./liveblocks\";\nexport { selectRoomThreads } from \"./room\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,mBAAmB;AAc5B,SAAS,eAAe;AAXxB,YAAY,UAAU,aAAa,UAAU;","names":[]}
1
+ {"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,7 +1,7 @@
1
- import { JsonObject, LsonObject, BaseUserMeta, LiveObject, User, Json, RoomNotificationSettings, Room, Status, BroadcastOptions, OthersEvent, LostConnectionEvent, History, BaseMetadata as BaseMetadata$1, Client as Client$1, ClientOptions, ThreadData as ThreadData$1, StorageStatus as StorageStatus$1, CommentData as CommentData$1 } from '@liveblocks/client';
1
+ import { JsonObject, LsonObject, BaseUserMeta, LiveObject, User, Json, RoomNotificationSettings, 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';
2
2
  import * as React$1 from 'react';
3
3
  import React__default, { ReactNode, PropsWithChildren } from 'react';
4
- import { BaseMetadata, CommentBody, Patchable, StorageStatus, QueryMetadata, AsyncResultWithDataField, DRI, Resolve, InboxNotificationData, ToImmutable, ThreadData, HistoryVersion, Client, LiveblocksError, RoomEventMessage, CommentData, PartialUnless, ThreadDataWithDeleteInfo, RoomNotificationSettings as RoomNotificationSettings$1, ThreadDeleteInfo, InboxNotificationDeleteInfo, DistributiveOmit, CommentUserReaction, AsyncResult, OpaqueClient, DU, DM, OpaqueRoom, DP, DS, DE } from '@liveblocks/core';
4
+ import { BaseMetadata, CommentBody, Patchable, StorageStatus, QueryMetadata, AsyncResultWithDataField, DRI, Resolve, CommentAttachment, InboxNotificationData, ToImmutable, ThreadData, HistoryVersion, Client, LiveblocksError, RoomEventMessage, CommentData, PartialUnless, ThreadDataWithDeleteInfo, RoomNotificationSettings as RoomNotificationSettings$1, CommentUserReaction, ThreadDeleteInfo, InboxNotificationDeleteInfo, DistributiveOmit, AsyncResult, OpaqueClient, DU, DM, OpaqueRoom, DP, DS, DE } from '@liveblocks/core';
5
5
 
6
6
  declare type Props = {
7
7
  fallback: ReactNode;
@@ -166,7 +166,6 @@ declare type UseThreadsOptions<M extends BaseMetadata> = {
166
166
  */
167
167
  scrollOnLoad?: boolean;
168
168
  };
169
-
170
169
  declare type UserAsyncResult<T> = AsyncResultWithDataField<T, "user">;
171
170
  declare type UserAsyncSuccess<T> = Resolve<UserAsyncResult<T> & {
172
171
  readonly isLoading: false;
@@ -177,8 +176,14 @@ declare type RoomInfoAsyncSuccess = Resolve<RoomInfoAsyncResult & {
177
176
  readonly isLoading: false;
178
177
  readonly error?: undefined;
179
178
  }>;
179
+ declare type AttachmentUrlAsyncResult = AsyncResultWithDataField<string, "url">;
180
+ declare type AttachmentUrlAsyncSuccess = Resolve<AttachmentUrlAsyncResult & {
181
+ readonly isLoading: false;
182
+ readonly error?: undefined;
183
+ }>;
180
184
  declare type CreateThreadOptions<M extends BaseMetadata> = Resolve<{
181
185
  body: CommentBody;
186
+ attachments?: CommentAttachment[];
182
187
  } & PartialUnless<M, {
183
188
  metadata: M;
184
189
  }>>;
@@ -189,11 +194,13 @@ declare type EditThreadMetadataOptions<M extends BaseMetadata> = {
189
194
  declare type CreateCommentOptions = {
190
195
  threadId: string;
191
196
  body: CommentBody;
197
+ attachments?: CommentAttachment[];
192
198
  };
193
199
  declare type EditCommentOptions = {
194
200
  threadId: string;
195
201
  commentId: string;
196
202
  body: CommentBody;
203
+ attachments?: CommentAttachment[];
197
204
  };
198
205
  declare type DeleteCommentOptions = {
199
206
  threadId: string;
@@ -922,6 +929,13 @@ declare type RoomContextBundle<P extends JsonObject, S extends LsonObject, U ext
922
929
  RoomNotificationSettingsState,
923
930
  (settings: Partial<RoomNotificationSettings>) => void
924
931
  ];
932
+ /**
933
+ * Returns a presigned URL for an attachment by its ID.
934
+ *
935
+ * @example
936
+ * const { url, error, isLoading } = useAttachmentUrl("at_xxx");
937
+ */
938
+ useAttachmentUrl(attachmentId: string): AttachmentUrlAsyncResult;
925
939
  /**
926
940
  * (Private beta) Returns a history of versions of the current room.
927
941
  *
@@ -1016,6 +1030,13 @@ declare type RoomContextBundle<P extends JsonObject, S extends LsonObject, U ext
1016
1030
  RoomNotificationSettingsStateSuccess,
1017
1031
  (settings: Partial<RoomNotificationSettings>) => void
1018
1032
  ];
1033
+ /**
1034
+ * Returns a presigned URL for an attachment by its ID.
1035
+ *
1036
+ * @example
1037
+ * const { url } = useAttachmentUrl("at_xxx");
1038
+ */
1039
+ useAttachmentUrl(attachmentId: string): AttachmentUrlAsyncSuccess;
1019
1040
  }>;
1020
1041
  } & PrivateRoomContextApi>;
1021
1042
  /**
@@ -1219,7 +1240,12 @@ declare type UpdateNotificationSettingsOptimisticUpdate = {
1219
1240
  settings: Partial<RoomNotificationSettings$1>;
1220
1241
  };
1221
1242
  declare type QueryState = AsyncResult<undefined>;
1222
- declare type UmbrellaStoreState<M extends BaseMetadata> = Readonly<{
1243
+ /**
1244
+ * Externally observable state of the store, which will have:
1245
+ * - Optimistic updates applied
1246
+ * - All deleted threads removed from the threads list
1247
+ */
1248
+ declare type UmbrellaStoreState<M extends BaseMetadata> = {
1223
1249
  /**
1224
1250
  * Keep track of loading and error status of all the queries made by the client.
1225
1251
  * e.g. 'room-abc-{"color":"red"}' - ok
@@ -1227,20 +1253,25 @@ declare type UmbrellaStoreState<M extends BaseMetadata> = Readonly<{
1227
1253
  */
1228
1254
  queries: Record<string, QueryState>;
1229
1255
  /**
1230
- * Optimistic updates that have not been acknowledged by the server yet.
1231
- * They are applied on top of the threads in selectors.
1256
+ * All threads in a sorted array, optimistic updates applied, without deleted
1257
+ * threads.
1258
+ */
1259
+ threads: ThreadData<M>[];
1260
+ /**
1261
+ * All threads in a map, keyed by thread ID, with all optimistic updates
1262
+ * applied. Deleted threads are still in this mapping, and will have
1263
+ * a deletedAt field if so.
1232
1264
  */
1233
- optimisticUpdates: readonly OptimisticUpdate<M>[];
1265
+ threadsById: Record<string, ThreadDataWithDeleteInfo<M>>;
1234
1266
  /**
1235
- * Threads by ID
1236
- * e.g. `th_${string}`
1267
+ * All inbox notifications in a sorted array, optimistic updates applied.
1237
1268
  */
1238
- threads: Record<string, ThreadDataWithDeleteInfo<M>>;
1269
+ inboxNotifications: InboxNotificationData[];
1239
1270
  /**
1240
1271
  * Inbox notifications by ID.
1241
1272
  * e.g. `in_${string}`
1242
1273
  */
1243
- inboxNotifications: Record<string, InboxNotificationData>;
1274
+ inboxNotificationsById: Record<string, InboxNotificationData>;
1244
1275
  /**
1245
1276
  * Notification settings by room ID.
1246
1277
  * e.g. { 'room-abc': { threads: "all" },
@@ -1248,18 +1279,36 @@ declare type UmbrellaStoreState<M extends BaseMetadata> = Readonly<{
1248
1279
  * 'room-xyz': { threads: "none" },
1249
1280
  * }
1250
1281
  */
1251
- notificationSettings: Record<string, RoomNotificationSettings$1>;
1282
+ notificationSettingsByRoomId: Record<string, RoomNotificationSettings$1>;
1252
1283
  /**
1253
- * Versions per roomId
1284
+ * Versions by roomId
1254
1285
  * e.g. { 'room-abc': {versions: "all versions"}}
1255
1286
  */
1256
- versions: Record<string, HistoryVersion[]>;
1257
- }>;
1287
+ versionsByRoomId: Record<string, HistoryVersion[]>;
1288
+ };
1258
1289
  declare class UmbrellaStore<M extends BaseMetadata> {
1259
1290
  private _store;
1291
+ private _prevState;
1292
+ private _stateCached;
1260
1293
  constructor();
1261
- get(): Readonly<UmbrellaStoreState<M>>;
1262
- subscribe(callback: (state: Readonly<UmbrellaStoreState<M>>) => void): () => void;
1294
+ private get;
1295
+ getThreads(): UmbrellaStoreState<M>;
1296
+ getInboxNotifications(): UmbrellaStoreState<M>;
1297
+ getNotificationSettings(): UmbrellaStoreState<M>;
1298
+ getVersions(): UmbrellaStoreState<M>;
1299
+ /**
1300
+ * @private Only used by the E2E test suite.
1301
+ */
1302
+ _hasOptimisticUpdates(): boolean;
1303
+ private subscribe;
1304
+ /**
1305
+ * @private Only used by the E2E test suite.
1306
+ */
1307
+ _subscribeOptimisticUpdates(callback: () => void): () => void;
1308
+ subscribeThreads(callback: () => void): () => void;
1309
+ subscribeInboxNotifications(callback: () => void): () => void;
1310
+ subscribeNotificationSettings(callback: () => void): () => void;
1311
+ subscribeVersions(callback: () => void): () => void;
1263
1312
  private updateThreadsCache;
1264
1313
  private updateInboxNotificationsCache;
1265
1314
  private setNotificationSettings;
@@ -1303,7 +1352,13 @@ declare class UmbrellaStore<M extends BaseMetadata> {
1303
1352
  * - The thread ID in the cache was updated more recently than the optimistic
1304
1353
  * update's timestamp (if given)
1305
1354
  */
1306
- updateThread(threadId: string, optimisticUpdateId: string | null, callback: (thread: Readonly<ThreadDataWithDeleteInfo<M>>) => Readonly<ThreadDataWithDeleteInfo<M>>, updatedAt?: Date): void;
1355
+ private updateThread;
1356
+ patchThread(threadId: string, optimisticUpdateId: string | null, patch: {
1357
+ metadata?: M;
1358
+ resolved?: boolean;
1359
+ }, updatedAt: Date): void;
1360
+ addReaction(threadId: string, optimisticUpdateId: string | null, commentId: string, reaction: CommentUserReaction, createdAt: Date): void;
1361
+ removeReaction(threadId: string, optimisticUpdateId: string | null, commentId: string, emoji: string, userId: string, removedAt: Date): void;
1307
1362
  /**
1308
1363
  * Soft-deletes an existing thread by setting its `deletedAt` value,
1309
1364
  * replacing the corresponding optimistic update.
@@ -1318,6 +1373,8 @@ declare class UmbrellaStore<M extends BaseMetadata> {
1318
1373
  * updated correctly, replacing the corresponding optimistic update.
1319
1374
  */
1320
1375
  createComment(newComment: CommentData, optimisticUpdateId: string): void;
1376
+ editComment(threadId: string, optimisticUpdateId: string, editedComment: CommentData): void;
1377
+ deleteComment(threadId: string, optimisticUpdateId: string, commentId: string, deletedAt: Date): void;
1321
1378
  updateThreadAndNotification(thread: ThreadData<M>, inboxNotification?: InboxNotificationData): void;
1322
1379
  updateThreadsAndNotifications(threads: ThreadData<M>[], inboxNotifications: InboxNotificationData[], deletedThreads: ThreadDeleteInfo[], deletedInboxNotifications: InboxNotificationDeleteInfo[], queryKey?: string): void;
1323
1380
  /**
@@ -1341,6 +1398,14 @@ declare class UmbrellaStore<M extends BaseMetadata> {
1341
1398
  * @private This is a private/advanced API. Do not rely on it.
1342
1399
  */
1343
1400
  declare const ClientContext: React__default.Context<OpaqueClient | null>;
1401
+ /**
1402
+ * @private Do not rely on this internal API.
1403
+ */
1404
+ declare function selectThreads<M extends BaseMetadata$1>(state: UmbrellaStoreState<M>, options: {
1405
+ roomId: string | null;
1406
+ query?: ThreadsQuery<M>;
1407
+ orderBy: "age" | "last-update";
1408
+ }): ThreadData$1<M>[];
1344
1409
  /**
1345
1410
  * Gets or creates a unique Umbrella store for each unique client instance.
1346
1411
  *
@@ -1504,10 +1569,6 @@ declare const _useUserThreads_experimental: TypedBundle$1["useUserThreads_experi
1504
1569
  */
1505
1570
  declare const _useUserThreadsSuspense_experimental: TypedBundle$1["suspense"]["useUserThreads_experimental"];
1506
1571
 
1507
- /**
1508
- * @private Do not rely on this internal API.
1509
- */
1510
- declare function selectRoomThreads<M extends BaseMetadata$1>(roomId: string, state: UmbrellaStoreState<M>, options: UseThreadsOptions<M>): ThreadData$1<M>[];
1511
1572
  /**
1512
1573
  * Raw access to the React context where the RoomProvider stores the current
1513
1574
  * room. Exposed for advanced use cases only.
@@ -1515,6 +1576,7 @@ declare function selectRoomThreads<M extends BaseMetadata$1>(roomId: string, sta
1515
1576
  * @private This is a private/advanced API. Do not rely on it.
1516
1577
  */
1517
1578
  declare const RoomContext: React$1.Context<OpaqueRoom | null>;
1579
+
1518
1580
  /**
1519
1581
  * Returns the current connection status for the Room, and triggers
1520
1582
  * a re-render whenever it changes. Can be used to render a status badge.
@@ -1720,6 +1782,24 @@ declare function useOthersConnectionIdsSuspense(): readonly number[];
1720
1782
  * indicator.
1721
1783
  */
1722
1784
  declare function useStorageStatusSuspense(options?: UseStorageStatusOptions): StorageStatusSuccess;
1785
+ /**
1786
+ * Returns a presigned URL for an attachment by its ID.
1787
+ *
1788
+ * @example
1789
+ * const { url, error, isLoading } = useAttachmentUrl("at_xxx");
1790
+ */
1791
+ declare function useAttachmentUrl(attachmentId: string): AttachmentUrlAsyncResult;
1792
+ /**
1793
+ * Returns a presigned URL for an attachment by its ID.
1794
+ *
1795
+ * @example
1796
+ * const { url } = useAttachmentUrl("at_xxx");
1797
+ */
1798
+ declare function useAttachmentUrlSuspense(attachmentId: string): {
1799
+ readonly isLoading: false;
1800
+ readonly url: string;
1801
+ readonly error: undefined;
1802
+ };
1723
1803
  /**
1724
1804
  * Creates a RoomProvider and a set of typed hooks to use in your app. Note
1725
1805
  * that any RoomProvider created in this way does not need to be nested in
@@ -2180,4 +2260,4 @@ declare const _useStorageRoot: TypedBundle["useStorageRoot"];
2180
2260
  */
2181
2261
  declare const _useUpdateMyPresence: TypedBundle["useUpdateMyPresence"];
2182
2262
 
2183
- export { useOthersConnectionIds as $, _useIsInsideRoom as A, useLostConnectionListener as B, ClientSideSuspense as C, useMarkThreadAsRead as D, _useMutation as E, _useMyPresence as F, _useOthersListener as G, useRedo as H, useRemoveReaction as I, _useRoom as J, useRoomNotificationSettings as K, LiveblocksProvider as L, type MutationContext as M, useStatus as N, _useStorageRoot as O, useThreadSubscription as P, useUndo as Q, RoomContext as R, _useUpdateMyPresence as S, useUpdateRoomNotificationSettings as T, type UseStorageStatusOptions as U, useHistoryVersionData as V, useCommentsErrorListener as W, CreateThreadError as X, _useOther as Y, _useOthers as Z, _useInboxNotificationThread as _, type UseThreadsOptions as a, _useOthersMapped as a0, _useSelf as a1, _useStorage as a2, useStorageStatus as a3, _useThreads as a4, _useHistoryVersions as a5, useInboxNotifications as a6, _useUserThreads_experimental as a7, useRoomInfo as a8, useUnreadInboxNotificationsCount as a9, _useUser as aa, getUmbrellaStoreForClient as ab, selectRoomThreads as ac, _useOtherSuspense as ad, _useOthersSuspense as ae, useOthersConnectionIdsSuspense as af, _useOthersMappedSuspense as ag, _useSelfSuspense as ah, _useStorageSuspense as ai, useStorageStatusSuspense as aj, _useThreadsSuspense as ak, _useHistoryVersionsSuspense as al, useInboxNotificationsSuspense as am, useRoomInfoSuspense as an, useUnreadInboxNotificationsCountSuspense as ao, _useUserSuspense as ap, _useUserThreadsSuspense_experimental as aq, ClientContext as b, createLiveblocksContext as c, useMarkAllInboxNotificationsAsRead as d, useMarkInboxNotificationAsRead as e, useDeleteAllInboxNotifications as f, useDeleteInboxNotification as g, createRoomContext as h, _RoomProvider as i, _useAddReaction as j, useBatch as k, _useBroadcastEvent as l, useCanRedo as m, useCanUndo as n, useCreateComment as o, _useCreateThread as p, useDeleteComment as q, _useDeleteThread as r, useEditComment as s, _useEditThreadMetadata as t, useClient as u, useMarkThreadAsResolved as v, useMarkThreadAsUnresolved as w, useErrorListener as x, _useEventListener as y, useHistory as z };
2263
+ export { useOthersConnectionIds as $, _useIsInsideRoom as A, useLostConnectionListener as B, ClientSideSuspense as C, useMarkThreadAsRead as D, _useMutation as E, _useMyPresence as F, _useOthersListener as G, useRedo as H, useRemoveReaction as I, _useRoom as J, useRoomNotificationSettings as K, LiveblocksProvider as L, type MutationContext as M, useStatus as N, _useStorageRoot as O, useThreadSubscription as P, useUndo as Q, RoomContext as R, _useUpdateMyPresence as S, useUpdateRoomNotificationSettings as T, type UseStorageStatusOptions as U, useHistoryVersionData as V, useCommentsErrorListener as W, CreateThreadError as X, _useOther as Y, _useOthers as Z, _useInboxNotificationThread as _, type UseThreadsOptions as a, _useOthersMapped as a0, _useSelf as a1, _useStorage as a2, useStorageStatus as a3, _useThreads as a4, useAttachmentUrl as a5, _useHistoryVersions as a6, useInboxNotifications as a7, _useUserThreads_experimental as a8, useRoomInfo as a9, useUnreadInboxNotificationsCount as aa, _useUser as ab, getUmbrellaStoreForClient as ac, selectThreads as ad, _useOtherSuspense as ae, _useOthersSuspense as af, useOthersConnectionIdsSuspense as ag, _useOthersMappedSuspense as ah, _useSelfSuspense as ai, _useStorageSuspense as aj, useStorageStatusSuspense as ak, _useThreadsSuspense as al, useAttachmentUrlSuspense as am, _useHistoryVersionsSuspense as an, useInboxNotificationsSuspense as ao, useRoomInfoSuspense as ap, useUnreadInboxNotificationsCountSuspense as aq, _useUserSuspense as ar, _useUserThreadsSuspense_experimental as as, ClientContext as b, createLiveblocksContext as c, useMarkAllInboxNotificationsAsRead as d, useMarkInboxNotificationAsRead as e, useDeleteAllInboxNotifications as f, useDeleteInboxNotification as g, createRoomContext as h, _RoomProvider as i, _useAddReaction as j, useBatch as k, _useBroadcastEvent as l, useCanRedo as m, useCanUndo as n, useCreateComment as o, _useCreateThread as p, useDeleteComment as q, _useDeleteThread as r, useEditComment as s, _useEditThreadMetadata as t, useClient as u, useMarkThreadAsResolved as v, useMarkThreadAsUnresolved as w, useErrorListener as x, _useEventListener as y, useHistory as z };