@liveblocks/react 2.16.0-toolbars5 → 2.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/version.ts
2
2
  var PKG_NAME = "@liveblocks/react";
3
- var PKG_VERSION = "2.16.0-toolbars5";
3
+ var PKG_VERSION = "2.16.0";
4
4
  var PKG_FORMAT = "cjs";
5
5
 
6
6
  // src/ClientSideSuspense.tsx
@@ -20,4 +20,4 @@ function ClientSideSuspense(props) {
20
20
 
21
21
 
22
22
  exports.PKG_NAME = PKG_NAME; exports.PKG_VERSION = PKG_VERSION; exports.PKG_FORMAT = PKG_FORMAT; exports.ClientSideSuspense = ClientSideSuspense;
23
- //# sourceMappingURL=chunk-3AQRT3Y6.js.map
23
+ //# sourceMappingURL=chunk-YA4OXDFC.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/liveblocks/liveblocks/packages/liveblocks-react/dist/chunk-YA4OXDFC.js","../src/version.ts","../src/ClientSideSuspense.tsx"],"names":[],"mappings":"AAAA;ACGO,IAAM,SAAA,EAAW,mBAAA;AACjB,IAAM,YAAA,EAAiD,QAAA;AACvD,IAAM,WAAA,EAAgD,KAAA;ADD7D;AACA;AEJA,8BAA8C;AAkC1C,+CAAA;AAVG,SAAS,kBAAA,CAAmB,KAAA,EAAc;AAC/C,EAAA,MAAM,CAAC,OAAA,EAAS,UAAU,EAAA,EAAI,6BAAA,KAAc,CAAA;AAE5C,EAAA,8BAAA,CAAU,EAAA,GAAM;AAGd,IAAA,UAAA,CAAW,IAAI,CAAA;AAAA,EACjB,CAAA,EAAG,CAAC,CAAC,CAAA;AAEL,EAAA,uBACE,6BAAA,eAAC,EAAA,EAAS,QAAA,EAAU,KAAA,CAAM,QAAA,EACvB,QAAA,EAAA,QAAA,EACG,OAAO,KAAA,CAAM,SAAA,IAAa,WAAA,EACxB,KAAA,CAAM,QAAA,CAAS,EAAA,EACf,KAAA,CAAM,SAAA,EACR,KAAA,CAAM,SAAA,CACZ,CAAA;AAEJ;AF5BA;AACA;AACE;AACA;AACA;AACA;AACF,iJAAC","file":"/home/runner/work/liveblocks/liveblocks/packages/liveblocks-react/dist/chunk-YA4OXDFC.js","sourcesContent":[null,"declare const __VERSION__: string;\ndeclare const TSUP_FORMAT: string;\n\nexport const PKG_NAME = \"@liveblocks/react\";\nexport const PKG_VERSION = typeof __VERSION__ === \"string\" && __VERSION__;\nexport const PKG_FORMAT = typeof TSUP_FORMAT === \"string\" && TSUP_FORMAT;\n","import type { ReactNode } from \"react\";\nimport { Suspense, useEffect, useState } from \"react\";\n\ntype Props = {\n fallback: ReactNode;\n children: (() => ReactNode | undefined) | ReactNode | undefined;\n};\n\n/**\n * Almost like a normal <Suspense> component, except that for server-side\n * renders, the fallback will be used.\n *\n * The child props will have to be provided in a function, i.e. change:\n *\n * <Suspense fallback={<Loading />}>\n * <MyRealComponent a={1} />\n * </Suspense>\n *\n * To:\n *\n * <ClientSideSuspense fallback={<Loading />}>\n * <MyRealComponent a={1} />\n * </ClientSideSuspense>\n *\n */\nexport function ClientSideSuspense(props: Props) {\n const [mounted, setMounted] = useState(false);\n\n useEffect(() => {\n // Effects are never executed on the server side. The point of this is to\n // delay the flipping of this boolean until after hydration has happened.\n setMounted(true);\n }, []);\n\n return (\n <Suspense fallback={props.fallback}>\n {mounted\n ? typeof props.children === \"function\"\n ? props.children()\n : props.children\n : props.fallback}\n </Suspense>\n );\n}\n"]}
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- export { x as ClientContext, L as LiveblocksProvider, M as MutationContext, R as RoomContext, H as RoomProvider, U as UseStorageStatusOptions, w as UseThreadsOptions, y as createLiveblocksContext, G as createRoomContext, I as useAddReaction, aq as useAttachmentUrl, J as useBatch, K as useBroadcastEvent, N as useCanRedo, O as useCanUndo, z as useClient, ah as useCommentsErrorListener, P as useCreateComment, Q as useCreateThread, A as useDeleteAllInboxNotifications, S as useDeleteComment, B as useDeleteInboxNotification, T as useDeleteThread, V as useEditComment, W as useEditThreadMetadata, Z as useErrorListener, $ as useEventListener, a0 as useHistory, ag as useHistoryVersionData, ar as useHistoryVersions, _ as useInboxNotificationThread, at as useInboxNotifications, a1 as useIsInsideRoom, a2 as useLostConnectionListener, D as useMarkAllInboxNotificationsAsRead, E as useMarkInboxNotificationAsRead, a3 as useMarkThreadAsRead, X as useMarkThreadAsResolved, Y as useMarkThreadAsUnresolved, a4 as useMutation, a5 as useMyPresence, ai as useOther, aj as useOthers, ak as useOthersConnectionIds, a6 as useOthersListener, al as useOthersMapped, a7 as useRedo, a8 as useRemoveReaction, a9 as useRoom, av as useRoomInfo, as as useRoomNotificationSettings, am as useSelf, aa as useStatus, an as useStorage, ab as useStorageRoot, ao as useStorageStatus, F as useSyncStatus, ac as useThreadSubscription, ap as useThreads, ad as useUndo, aw as useUnreadInboxNotificationsCount, ae as useUpdateMyPresence, af as useUpdateRoomNotificationSettings, ax as useUser, au as useUserThreads_experimental } from './room-ne1TCZyH.mjs';
1
+ export { C as ClientContext, L as LiveblocksProvider, M as MutationContext, R as RoomContext, H as RoomProvider, U as UseStorageStatusOptions, w as UseThreadsOptions, x as createLiveblocksContext, G as createRoomContext, I as useAddReaction, ao as useAttachmentUrl, J as useBatch, K as useBroadcastEvent, N as useCanRedo, O as useCanUndo, y as useClient, P as useCreateComment, Q as useCreateThread, z as useDeleteAllInboxNotifications, S as useDeleteComment, A as useDeleteInboxNotification, T as useDeleteThread, V as useEditComment, W as useEditThreadMetadata, B as useErrorListener, Z as useEventListener, $ as useHistory, af as useHistoryVersionData, ap as useHistoryVersions, _ as useInboxNotificationThread, ar as useInboxNotifications, a0 as useIsInsideRoom, a1 as useLostConnectionListener, D as useMarkAllInboxNotificationsAsRead, E as useMarkInboxNotificationAsRead, a2 as useMarkThreadAsRead, X as useMarkThreadAsResolved, Y as useMarkThreadAsUnresolved, a3 as useMutation, a4 as useMyPresence, ag as useOther, ah as useOthers, ai as useOthersConnectionIds, a5 as useOthersListener, aj as useOthersMapped, a6 as useRedo, a7 as useRemoveReaction, a8 as useRoom, at as useRoomInfo, aq as useRoomNotificationSettings, ak as useSelf, a9 as useStatus, al as useStorage, aa as useStorageRoot, am as useStorageStatus, F as useSyncStatus, ab as useThreadSubscription, an as useThreads, ac as useUndo, au as useUnreadInboxNotificationsCount, ad as useUpdateMyPresence, ae as useUpdateRoomNotificationSettings, av as useUser, as as useUserThreads_experimental } from './room-Ce3twcjb.mjs';
2
2
  export { Json, JsonObject, shallow } from '@liveblocks/client';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import { ReactNode } from 'react';
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { x as ClientContext, L as LiveblocksProvider, M as MutationContext, R as RoomContext, H as RoomProvider, U as UseStorageStatusOptions, w as UseThreadsOptions, y as createLiveblocksContext, G as createRoomContext, I as useAddReaction, aq as useAttachmentUrl, J as useBatch, K as useBroadcastEvent, N as useCanRedo, O as useCanUndo, z as useClient, ah as useCommentsErrorListener, P as useCreateComment, Q as useCreateThread, A as useDeleteAllInboxNotifications, S as useDeleteComment, B as useDeleteInboxNotification, T as useDeleteThread, V as useEditComment, W as useEditThreadMetadata, Z as useErrorListener, $ as useEventListener, a0 as useHistory, ag as useHistoryVersionData, ar as useHistoryVersions, _ as useInboxNotificationThread, at as useInboxNotifications, a1 as useIsInsideRoom, a2 as useLostConnectionListener, D as useMarkAllInboxNotificationsAsRead, E as useMarkInboxNotificationAsRead, a3 as useMarkThreadAsRead, X as useMarkThreadAsResolved, Y as useMarkThreadAsUnresolved, a4 as useMutation, a5 as useMyPresence, ai as useOther, aj as useOthers, ak as useOthersConnectionIds, a6 as useOthersListener, al as useOthersMapped, a7 as useRedo, a8 as useRemoveReaction, a9 as useRoom, av as useRoomInfo, as as useRoomNotificationSettings, am as useSelf, aa as useStatus, an as useStorage, ab as useStorageRoot, ao as useStorageStatus, F as useSyncStatus, ac as useThreadSubscription, ap as useThreads, ad as useUndo, aw as useUnreadInboxNotificationsCount, ae as useUpdateMyPresence, af as useUpdateRoomNotificationSettings, ax as useUser, au as useUserThreads_experimental } from './room-ne1TCZyH.js';
1
+ export { C as ClientContext, L as LiveblocksProvider, M as MutationContext, R as RoomContext, H as RoomProvider, U as UseStorageStatusOptions, w as UseThreadsOptions, x as createLiveblocksContext, G as createRoomContext, I as useAddReaction, ao as useAttachmentUrl, J as useBatch, K as useBroadcastEvent, N as useCanRedo, O as useCanUndo, y as useClient, P as useCreateComment, Q as useCreateThread, z as useDeleteAllInboxNotifications, S as useDeleteComment, A as useDeleteInboxNotification, T as useDeleteThread, V as useEditComment, W as useEditThreadMetadata, B as useErrorListener, Z as useEventListener, $ as useHistory, af as useHistoryVersionData, ap as useHistoryVersions, _ as useInboxNotificationThread, ar as useInboxNotifications, a0 as useIsInsideRoom, a1 as useLostConnectionListener, D as useMarkAllInboxNotificationsAsRead, E as useMarkInboxNotificationAsRead, a2 as useMarkThreadAsRead, X as useMarkThreadAsResolved, Y as useMarkThreadAsUnresolved, a3 as useMutation, a4 as useMyPresence, ag as useOther, ah as useOthers, ai as useOthersConnectionIds, a5 as useOthersListener, aj as useOthersMapped, a6 as useRedo, a7 as useRemoveReaction, a8 as useRoom, at as useRoomInfo, aq as useRoomNotificationSettings, ak as useSelf, a9 as useStatus, al as useStorage, aa as useStorageRoot, am as useStorageStatus, F as useSyncStatus, ab as useThreadSubscription, an as useThreads, ac as useUndo, au as useUnreadInboxNotificationsCount, ad as useUpdateMyPresence, ae as useUpdateRoomNotificationSettings, av as useUser, as as useUserThreads_experimental } from './room-Ce3twcjb.js';
2
2
  export { Json, JsonObject, shallow } from '@liveblocks/client';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import { ReactNode } from 'react';
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _chunk3AQRT3Y6js = require('./chunk-3AQRT3Y6.js');
6
+ var _chunkYA4OXDFCjs = require('./chunk-YA4OXDFC.js');
7
7
 
8
8
 
9
9
 
@@ -66,14 +66,12 @@ var _chunk3AQRT3Y6js = require('./chunk-3AQRT3Y6.js');
66
66
 
67
67
 
68
68
 
69
-
70
- var _chunkVJYVOAD5js = require('./chunk-VJYVOAD5.js');
69
+ var _chunkNZL5WL5Ojs = require('./chunk-NZL5WL5O.js');
71
70
 
72
71
  // src/index.ts
73
72
  var _core = require('@liveblocks/core');
74
73
  var _client = require('@liveblocks/client');
75
- _core.detectDupes.call(void 0, _chunk3AQRT3Y6js.PKG_NAME, _chunk3AQRT3Y6js.PKG_VERSION, _chunk3AQRT3Y6js.PKG_FORMAT);
76
-
74
+ _core.detectDupes.call(void 0, _chunkYA4OXDFCjs.PKG_NAME, _chunkYA4OXDFCjs.PKG_VERSION, _chunkYA4OXDFCjs.PKG_FORMAT);
77
75
 
78
76
 
79
77
 
@@ -138,5 +136,5 @@ _core.detectDupes.call(void 0, _chunk3AQRT3Y6js.PKG_NAME, _chunk3AQRT3Y6js.PKG_V
138
136
 
139
137
 
140
138
 
141
- exports.ClientContext = _chunkVJYVOAD5js.ClientContext; exports.ClientSideSuspense = _chunk3AQRT3Y6js.ClientSideSuspense; exports.LiveblocksProvider = _chunkVJYVOAD5js.LiveblocksProvider; exports.RoomContext = _chunkVJYVOAD5js.RoomContext; exports.RoomProvider = _chunkVJYVOAD5js._RoomProvider; exports.createLiveblocksContext = _chunkVJYVOAD5js.createLiveblocksContext; exports.createRoomContext = _chunkVJYVOAD5js.createRoomContext; exports.shallow = _client.shallow; exports.useAddReaction = _chunkVJYVOAD5js._useAddReaction; exports.useAttachmentUrl = _chunkVJYVOAD5js.useAttachmentUrl; exports.useBatch = _chunkVJYVOAD5js.useBatch; exports.useBroadcastEvent = _chunkVJYVOAD5js._useBroadcastEvent; exports.useCanRedo = _chunkVJYVOAD5js.useCanRedo; exports.useCanUndo = _chunkVJYVOAD5js.useCanUndo; exports.useClient = _chunkVJYVOAD5js.useClient; exports.useCommentsErrorListener = _chunkVJYVOAD5js.useCommentsErrorListener; exports.useCreateComment = _chunkVJYVOAD5js.useCreateComment; exports.useCreateThread = _chunkVJYVOAD5js._useCreateThread; exports.useDeleteAllInboxNotifications = _chunkVJYVOAD5js.useDeleteAllInboxNotifications; exports.useDeleteComment = _chunkVJYVOAD5js.useDeleteComment; exports.useDeleteInboxNotification = _chunkVJYVOAD5js.useDeleteInboxNotification; exports.useDeleteThread = _chunkVJYVOAD5js._useDeleteThread; exports.useEditComment = _chunkVJYVOAD5js.useEditComment; exports.useEditThreadMetadata = _chunkVJYVOAD5js._useEditThreadMetadata; exports.useErrorListener = _chunkVJYVOAD5js.useErrorListener; exports.useEventListener = _chunkVJYVOAD5js._useEventListener; exports.useHistory = _chunkVJYVOAD5js.useHistory; exports.useHistoryVersionData = _chunkVJYVOAD5js.useHistoryVersionData; exports.useHistoryVersions = _chunkVJYVOAD5js._useHistoryVersions; exports.useInboxNotificationThread = _chunkVJYVOAD5js._useInboxNotificationThread; exports.useInboxNotifications = _chunkVJYVOAD5js.useInboxNotifications; exports.useIsInsideRoom = _chunkVJYVOAD5js._useIsInsideRoom; exports.useLostConnectionListener = _chunkVJYVOAD5js.useLostConnectionListener; exports.useMarkAllInboxNotificationsAsRead = _chunkVJYVOAD5js.useMarkAllInboxNotificationsAsRead; exports.useMarkInboxNotificationAsRead = _chunkVJYVOAD5js.useMarkInboxNotificationAsRead; exports.useMarkThreadAsRead = _chunkVJYVOAD5js.useMarkThreadAsRead; exports.useMarkThreadAsResolved = _chunkVJYVOAD5js.useMarkThreadAsResolved; exports.useMarkThreadAsUnresolved = _chunkVJYVOAD5js.useMarkThreadAsUnresolved; exports.useMutation = _chunkVJYVOAD5js._useMutation; exports.useMyPresence = _chunkVJYVOAD5js._useMyPresence; exports.useOther = _chunkVJYVOAD5js._useOther; exports.useOthers = _chunkVJYVOAD5js._useOthers; exports.useOthersConnectionIds = _chunkVJYVOAD5js.useOthersConnectionIds; exports.useOthersListener = _chunkVJYVOAD5js._useOthersListener; exports.useOthersMapped = _chunkVJYVOAD5js._useOthersMapped; exports.useRedo = _chunkVJYVOAD5js.useRedo; exports.useRemoveReaction = _chunkVJYVOAD5js.useRemoveReaction; exports.useRoom = _chunkVJYVOAD5js._useRoom; exports.useRoomInfo = _chunkVJYVOAD5js.useRoomInfo; exports.useRoomNotificationSettings = _chunkVJYVOAD5js._useRoomNotificationSettings; exports.useSelf = _chunkVJYVOAD5js._useSelf; exports.useStatus = _chunkVJYVOAD5js.useStatus; exports.useStorage = _chunkVJYVOAD5js._useStorage; exports.useStorageRoot = _chunkVJYVOAD5js._useStorageRoot; exports.useStorageStatus = _chunkVJYVOAD5js.useStorageStatus; exports.useSyncStatus = _chunkVJYVOAD5js.useSyncStatus; exports.useThreadSubscription = _chunkVJYVOAD5js.useThreadSubscription; exports.useThreads = _chunkVJYVOAD5js._useThreads; exports.useUndo = _chunkVJYVOAD5js.useUndo; exports.useUnreadInboxNotificationsCount = _chunkVJYVOAD5js.useUnreadInboxNotificationsCount; exports.useUpdateMyPresence = _chunkVJYVOAD5js._useUpdateMyPresence; exports.useUpdateRoomNotificationSettings = _chunkVJYVOAD5js.useUpdateRoomNotificationSettings; exports.useUser = _chunkVJYVOAD5js._useUser; exports.useUserThreads_experimental = _chunkVJYVOAD5js._useUserThreads_experimental;
139
+ exports.ClientContext = _chunkNZL5WL5Ojs.ClientContext; exports.ClientSideSuspense = _chunkYA4OXDFCjs.ClientSideSuspense; exports.LiveblocksProvider = _chunkNZL5WL5Ojs.LiveblocksProvider; exports.RoomContext = _chunkNZL5WL5Ojs.RoomContext; exports.RoomProvider = _chunkNZL5WL5Ojs._RoomProvider; exports.createLiveblocksContext = _chunkNZL5WL5Ojs.createLiveblocksContext; exports.createRoomContext = _chunkNZL5WL5Ojs.createRoomContext; exports.shallow = _client.shallow; exports.useAddReaction = _chunkNZL5WL5Ojs._useAddReaction; exports.useAttachmentUrl = _chunkNZL5WL5Ojs.useAttachmentUrl; exports.useBatch = _chunkNZL5WL5Ojs.useBatch; exports.useBroadcastEvent = _chunkNZL5WL5Ojs._useBroadcastEvent; exports.useCanRedo = _chunkNZL5WL5Ojs.useCanRedo; exports.useCanUndo = _chunkNZL5WL5Ojs.useCanUndo; exports.useClient = _chunkNZL5WL5Ojs.useClient; exports.useCreateComment = _chunkNZL5WL5Ojs.useCreateComment; exports.useCreateThread = _chunkNZL5WL5Ojs._useCreateThread; exports.useDeleteAllInboxNotifications = _chunkNZL5WL5Ojs.useDeleteAllInboxNotifications; exports.useDeleteComment = _chunkNZL5WL5Ojs.useDeleteComment; exports.useDeleteInboxNotification = _chunkNZL5WL5Ojs.useDeleteInboxNotification; exports.useDeleteThread = _chunkNZL5WL5Ojs._useDeleteThread; exports.useEditComment = _chunkNZL5WL5Ojs.useEditComment; exports.useEditThreadMetadata = _chunkNZL5WL5Ojs._useEditThreadMetadata; exports.useErrorListener = _chunkNZL5WL5Ojs.useErrorListener; exports.useEventListener = _chunkNZL5WL5Ojs._useEventListener; exports.useHistory = _chunkNZL5WL5Ojs.useHistory; exports.useHistoryVersionData = _chunkNZL5WL5Ojs.useHistoryVersionData; exports.useHistoryVersions = _chunkNZL5WL5Ojs._useHistoryVersions; exports.useInboxNotificationThread = _chunkNZL5WL5Ojs._useInboxNotificationThread; exports.useInboxNotifications = _chunkNZL5WL5Ojs.useInboxNotifications; exports.useIsInsideRoom = _chunkNZL5WL5Ojs._useIsInsideRoom; exports.useLostConnectionListener = _chunkNZL5WL5Ojs.useLostConnectionListener; exports.useMarkAllInboxNotificationsAsRead = _chunkNZL5WL5Ojs.useMarkAllInboxNotificationsAsRead; exports.useMarkInboxNotificationAsRead = _chunkNZL5WL5Ojs.useMarkInboxNotificationAsRead; exports.useMarkThreadAsRead = _chunkNZL5WL5Ojs.useMarkThreadAsRead; exports.useMarkThreadAsResolved = _chunkNZL5WL5Ojs.useMarkThreadAsResolved; exports.useMarkThreadAsUnresolved = _chunkNZL5WL5Ojs.useMarkThreadAsUnresolved; exports.useMutation = _chunkNZL5WL5Ojs._useMutation; exports.useMyPresence = _chunkNZL5WL5Ojs._useMyPresence; exports.useOther = _chunkNZL5WL5Ojs._useOther; exports.useOthers = _chunkNZL5WL5Ojs._useOthers; exports.useOthersConnectionIds = _chunkNZL5WL5Ojs.useOthersConnectionIds; exports.useOthersListener = _chunkNZL5WL5Ojs._useOthersListener; exports.useOthersMapped = _chunkNZL5WL5Ojs._useOthersMapped; exports.useRedo = _chunkNZL5WL5Ojs.useRedo; exports.useRemoveReaction = _chunkNZL5WL5Ojs.useRemoveReaction; exports.useRoom = _chunkNZL5WL5Ojs._useRoom; exports.useRoomInfo = _chunkNZL5WL5Ojs.useRoomInfo; exports.useRoomNotificationSettings = _chunkNZL5WL5Ojs._useRoomNotificationSettings; exports.useSelf = _chunkNZL5WL5Ojs._useSelf; exports.useStatus = _chunkNZL5WL5Ojs.useStatus; exports.useStorage = _chunkNZL5WL5Ojs._useStorage; exports.useStorageRoot = _chunkNZL5WL5Ojs._useStorageRoot; exports.useStorageStatus = _chunkNZL5WL5Ojs.useStorageStatus; exports.useSyncStatus = _chunkNZL5WL5Ojs.useSyncStatus; exports.useThreadSubscription = _chunkNZL5WL5Ojs.useThreadSubscription; exports.useThreads = _chunkNZL5WL5Ojs._useThreads; exports.useUndo = _chunkNZL5WL5Ojs.useUndo; exports.useUnreadInboxNotificationsCount = _chunkNZL5WL5Ojs.useUnreadInboxNotificationsCount; exports.useUpdateMyPresence = _chunkNZL5WL5Ojs._useUpdateMyPresence; exports.useUpdateRoomNotificationSettings = _chunkNZL5WL5Ojs.useUpdateRoomNotificationSettings; exports.useUser = _chunkNZL5WL5Ojs._useUser; exports.useUserThreads_experimental = _chunkNZL5WL5Ojs._useUserThreads_experimental;
142
140
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/liveblocks/liveblocks/packages/liveblocks-react/dist/index.js","../src/index.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACF,sDAA4B;AAC5B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,sDAA4B;AAC5B;AACA;ACtEA,wCAA4B;AAc5B,4CAAwB;AAXxB,+BAAA,yBAAY,EAAU,4BAAA,EAAa,2BAAU,CAAA;ADuE7C;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,u+HAAC","file":"/home/runner/work/liveblocks/liveblocks/packages/liveblocks-react/dist/index.js","sourcesContent":[null,"/* 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 createLiveblocksContext,\n LiveblocksProvider,\n useClient,\n useDeleteAllInboxNotifications,\n useDeleteInboxNotification,\n useInboxNotificationThread,\n useMarkAllInboxNotificationsAsRead,\n useMarkInboxNotificationAsRead,\n useSyncStatus,\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 useStatus,\n useStorageRoot,\n useThreadSubscription,\n useUndo,\n useUpdateMyPresence,\n useUpdateRoomNotificationSettings,\n useHistoryVersionData,\n} from \"./room\";\n\nexport { useCommentsErrorListener } 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 useRoomNotificationSettings,\n} from \"./room\";\nexport {\n useInboxNotifications,\n useUserThreads_experimental as useUserThreads_experimental,\n useRoomInfo,\n useUnreadInboxNotificationsCount,\n useUser,\n} from \"./liveblocks\";\n"]}
1
+ {"version":3,"sources":["/home/runner/work/liveblocks/liveblocks/packages/liveblocks-react/dist/index.js","../src/index.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACF,sDAA4B;AAC5B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,sDAA4B;AAC5B;AACA;ACrEA,wCAA4B;AAc5B,4CAAwB;AAXxB,+BAAA,yBAAY,EAAU,4BAAA,EAAa,2BAAU,CAAA;ADsE7C;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,y5HAAC","file":"/home/runner/work/liveblocks/liveblocks/packages/liveblocks-react/dist/index.js","sourcesContent":[null,"/* 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 createLiveblocksContext,\n LiveblocksProvider,\n useClient,\n useDeleteAllInboxNotifications,\n useDeleteInboxNotification,\n useErrorListener,\n useInboxNotificationThread,\n useMarkAllInboxNotificationsAsRead,\n useMarkInboxNotificationAsRead,\n useSyncStatus,\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 useEventListener,\n useHistory,\n useIsInsideRoom,\n useLostConnectionListener,\n useMarkThreadAsRead,\n useMutation,\n useMyPresence,\n useOthersListener,\n useRedo,\n useRemoveReaction,\n useRoom,\n useStatus,\n useStorageRoot,\n useThreadSubscription,\n useUndo,\n useUpdateMyPresence,\n useUpdateRoomNotificationSettings,\n useHistoryVersionData,\n} 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 useRoomNotificationSettings,\n} from \"./room\";\nexport {\n useInboxNotifications,\n useUserThreads_experimental as useUserThreads_experimental,\n useRoomInfo,\n useUnreadInboxNotificationsCount,\n useUser,\n} from \"./liveblocks\";\n"]}
package/dist/index.mjs CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  PKG_FORMAT,
4
4
  PKG_NAME,
5
5
  PKG_VERSION
6
- } from "./chunk-DMCBV3T3.mjs";
6
+ } from "./chunk-GMP4DSRI.mjs";
7
7
  import {
8
8
  ClientContext,
9
9
  LiveblocksProvider,
@@ -40,7 +40,6 @@ import {
40
40
  useCanRedo,
41
41
  useCanUndo,
42
42
  useClient,
43
- useCommentsErrorListener,
44
43
  useCreateComment,
45
44
  useDeleteAllInboxNotifications,
46
45
  useDeleteComment,
@@ -67,7 +66,7 @@ import {
67
66
  useUndo,
68
67
  useUnreadInboxNotificationsCount,
69
68
  useUpdateRoomNotificationSettings
70
- } from "./chunk-FQKGWA7O.mjs";
69
+ } from "./chunk-JZBPCFEX.mjs";
71
70
 
72
71
  // src/index.ts
73
72
  import { detectDupes } from "@liveblocks/core";
@@ -89,7 +88,6 @@ export {
89
88
  useCanRedo,
90
89
  useCanUndo,
91
90
  useClient,
92
- useCommentsErrorListener,
93
91
  useCreateComment,
94
92
  _useCreateThread as useCreateThread,
95
93
  useDeleteAllInboxNotifications,
@@ -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 createLiveblocksContext,\n LiveblocksProvider,\n useClient,\n useDeleteAllInboxNotifications,\n useDeleteInboxNotification,\n useInboxNotificationThread,\n useMarkAllInboxNotificationsAsRead,\n useMarkInboxNotificationAsRead,\n useSyncStatus,\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 useStatus,\n useStorageRoot,\n useThreadSubscription,\n useUndo,\n useUpdateMyPresence,\n useUpdateRoomNotificationSettings,\n useHistoryVersionData,\n} from \"./room\";\n\nexport { useCommentsErrorListener } 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 useRoomNotificationSettings,\n} from \"./room\";\nexport {\n useInboxNotifications,\n useUserThreads_experimental as useUserThreads_experimental,\n useRoomInfo,\n useUnreadInboxNotificationsCount,\n useUser,\n} 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 createLiveblocksContext,\n LiveblocksProvider,\n useClient,\n useDeleteAllInboxNotifications,\n useDeleteInboxNotification,\n useErrorListener,\n useInboxNotificationThread,\n useMarkAllInboxNotificationsAsRead,\n useMarkInboxNotificationAsRead,\n useSyncStatus,\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 useEventListener,\n useHistory,\n useIsInsideRoom,\n useLostConnectionListener,\n useMarkThreadAsRead,\n useMutation,\n useMyPresence,\n useOthersListener,\n useRedo,\n useRemoveReaction,\n useRoom,\n useStatus,\n useStorageRoot,\n useThreadSubscription,\n useUndo,\n useUpdateMyPresence,\n useUpdateRoomNotificationSettings,\n useHistoryVersionData,\n} 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 useRoomNotificationSettings,\n} from \"./room\";\nexport {\n useInboxNotifications,\n useUserThreads_experimental as useUserThreads_experimental,\n useRoomInfo,\n useUnreadInboxNotificationsCount,\n useUser,\n} from \"./liveblocks\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,mBAAmB;AAc5B,SAAS,eAAe;AAXxB,YAAY,UAAU,aAAa,UAAU;","names":[]}
@@ -2,7 +2,7 @@ import * as react from 'react';
2
2
  import { Context, PropsWithChildren, ReactNode } from 'react';
3
3
  import { JsonObject, LsonObject, BaseUserMeta, Json, BaseMetadata, Room, LiveObject, User, RoomNotificationSettings, Status, BroadcastOptions, OthersEvent, LostConnectionEvent, History, Client as Client$1, ClientOptions, StorageStatus as StorageStatus$1, ThreadData as ThreadData$1, CommentData as CommentData$1 } from '@liveblocks/client';
4
4
  import * as _liveblocks_core from '@liveblocks/core';
5
- import { OpaqueRoom, BaseMetadata as BaseMetadata$1, CommentBody, Patchable, StorageStatus, QueryMetadata, AsyncResult, DRI, AsyncSuccess, Resolve, CommentAttachment, PartialUnless, InboxNotificationData, ToImmutable, AsyncLoading, AsyncError, ThreadData, HistoryVersion, Client, SyncStatus, LiveblocksError, RoomEventMessage, CommentData, MutableSignal, ThreadDataWithDeleteInfo, ThreadDeleteInfo, DerivedSignal, DefaultMap, OpaqueClient, CommentUserReaction, InboxNotificationDeleteInfo, RoomNotificationSettings as RoomNotificationSettings$1, ISignal, Permission, BaseUserMeta as BaseUserMeta$1, DistributiveOmit, DU, DM, TextEditorType, IYjsProvider, DP, DS, DE } from '@liveblocks/core';
5
+ import { OpaqueRoom, BaseMetadata as BaseMetadata$1, StorageStatus, QueryMetadata, AsyncResult, DRI, AsyncSuccess, Resolve, CommentBody, CommentAttachment, PartialUnless, Patchable, InboxNotificationData, Relax, ToImmutable, AsyncLoading, AsyncError, ThreadData, HistoryVersion, Client, LiveblocksError, SyncStatus, RoomEventMessage, CommentData, MutableSignal, ThreadDataWithDeleteInfo, ThreadDeleteInfo, DerivedSignal, DefaultMap, OpaqueClient, CommentUserReaction, InboxNotificationDeleteInfo, RoomNotificationSettings as RoomNotificationSettings$1, ISignal, Permission, BaseUserMeta as BaseUserMeta$1, DistributiveOmit, DU, DM, TextEditorType, IYjsProvider, DP, DS, DE } from '@liveblocks/core';
6
6
  import * as react_jsx_runtime from 'react/jsx-runtime';
7
7
 
8
8
  /**
@@ -15,123 +15,6 @@ declare const RoomContext: react.Context<OpaqueRoom | null>;
15
15
  /** @private */
16
16
  declare function useRoomOrNull<P extends JsonObject, S extends LsonObject, U extends BaseUserMeta, E extends Json, M extends BaseMetadata>(): Room<P, S, U, E, M> | null;
17
17
 
18
- /**
19
- * @private Internal API, do not rely on it.
20
- */
21
- declare class CreateThreadError<M extends BaseMetadata$1> extends Error {
22
- cause: Error;
23
- context: {
24
- roomId: string;
25
- threadId: string;
26
- commentId: string;
27
- body: CommentBody;
28
- metadata: M;
29
- };
30
- constructor(cause: Error, context: {
31
- roomId: string;
32
- threadId: string;
33
- commentId: string;
34
- body: CommentBody;
35
- metadata: M;
36
- });
37
- }
38
- /**
39
- * @private Internal API, do not rely on it.
40
- */
41
- declare class EditThreadMetadataError<M extends BaseMetadata$1> extends Error {
42
- cause: Error;
43
- context: {
44
- roomId: string;
45
- threadId: string;
46
- metadata: Patchable<M>;
47
- };
48
- constructor(cause: Error, context: {
49
- roomId: string;
50
- threadId: string;
51
- metadata: Patchable<M>;
52
- });
53
- }
54
- /**
55
- * @private Internal API, do not rely on it.
56
- */
57
- declare class CreateCommentError extends Error {
58
- cause: Error;
59
- context: {
60
- roomId: string;
61
- threadId: string;
62
- commentId: string;
63
- body: CommentBody;
64
- };
65
- constructor(cause: Error, context: {
66
- roomId: string;
67
- threadId: string;
68
- commentId: string;
69
- body: CommentBody;
70
- });
71
- }
72
- /**
73
- * @private Internal API, do not rely on it.
74
- */
75
- declare class EditCommentError extends Error {
76
- cause: Error;
77
- context: {
78
- roomId: string;
79
- threadId: string;
80
- commentId: string;
81
- body: CommentBody;
82
- };
83
- constructor(cause: Error, context: {
84
- roomId: string;
85
- threadId: string;
86
- commentId: string;
87
- body: CommentBody;
88
- });
89
- }
90
- /**
91
- * @private Internal API, do not rely on it.
92
- */
93
- declare class DeleteCommentError extends Error {
94
- cause: Error;
95
- context: {
96
- roomId: string;
97
- threadId: string;
98
- commentId: string;
99
- };
100
- constructor(cause: Error, context: {
101
- roomId: string;
102
- threadId: string;
103
- commentId: string;
104
- });
105
- }
106
- /**
107
- * @private Internal API, do not rely on it.
108
- */
109
- declare class MarkInboxNotificationAsReadError extends Error {
110
- cause: Error;
111
- context: {
112
- inboxNotificationId: string;
113
- };
114
- constructor(cause: Error, context: {
115
- inboxNotificationId: string;
116
- });
117
- }
118
- /**
119
- * @private Internal API, do not rely on it.
120
- */
121
- declare class UpdateNotificationSettingsError extends Error {
122
- cause: Error;
123
- context: {
124
- roomId: string;
125
- };
126
- constructor(cause: Error, context: {
127
- roomId: string;
128
- });
129
- }
130
- /**
131
- * @private Internal API, do not rely on it.
132
- */
133
- type CommentsError<M extends BaseMetadata$1> = CreateThreadError<M> | EditThreadMetadataError<M> | CreateCommentError | EditCommentError | DeleteCommentError | MarkInboxNotificationAsReadError | UpdateNotificationSettingsError;
134
-
135
18
  type UseSyncStatusOptions = {
136
19
  /**
137
20
  * When setting smooth, the hook will not update immediately as status
@@ -213,12 +96,6 @@ type CommentReactionOptions = {
213
96
  commentId: string;
214
97
  emoji: string;
215
98
  };
216
- type NoPaginationFields = {
217
- hasFetchedAll?: never;
218
- isFetchingMore?: never;
219
- fetchMore?: never;
220
- fetchMoreError?: never;
221
- };
222
99
  type PaginationFields = {
223
100
  hasFetchedAll: boolean;
224
101
  isFetchingMore: boolean;
@@ -226,7 +103,7 @@ type PaginationFields = {
226
103
  fetchMoreError?: Error;
227
104
  };
228
105
  type PagedAsyncSuccess<T, F extends string> = Resolve<AsyncSuccess<T, F> & PaginationFields>;
229
- type PagedAsyncResult<T, F extends string> = Resolve<AsyncLoading<F> & NoPaginationFields> | Resolve<AsyncError<F> & NoPaginationFields> | PagedAsyncSuccess<T, F>;
106
+ type PagedAsyncResult<T, F extends string> = Relax<AsyncLoading<F> | AsyncError<F> | PagedAsyncSuccess<T, F>>;
230
107
  type ThreadsAsyncSuccess<M extends BaseMetadata$1> = PagedAsyncSuccess<ThreadData<M>[], "threads">;
231
108
  type ThreadsAsyncResult<M extends BaseMetadata$1> = PagedAsyncResult<ThreadData<M>[], "threads">;
232
109
  type InboxNotificationsAsyncSuccess = PagedAsyncSuccess<InboxNotificationData[], "inboxNotifications">;
@@ -278,16 +155,15 @@ type MutationContext<P extends JsonObject, S extends LsonObject, U extends BaseU
278
155
  addToHistory: boolean;
279
156
  }) => void;
280
157
  };
281
- type ThreadSubscription = {
158
+ type ThreadSubscription = Relax<{
282
159
  status: "not-subscribed";
283
- unreadSince?: never;
284
160
  } | {
285
161
  status: "subscribed";
286
162
  unreadSince: null;
287
163
  } | {
288
164
  status: "subscribed";
289
165
  unreadSince: Date;
290
- };
166
+ }>;
291
167
  type SharedContextBundle<U extends BaseUserMeta> = {
292
168
  classic: {
293
169
  /**
@@ -315,6 +191,17 @@ type SharedContextBundle<U extends BaseUserMeta> = {
315
191
  * const isInsideRoom = useIsInsideRoom();
316
192
  */
317
193
  useIsInsideRoom(): boolean;
194
+ /**
195
+ * useErrorListener is a React hook that allows you to respond to any
196
+ * Liveblocks error, for example room connection errors, errors
197
+ * creating/editing/deleting threads, etc.
198
+ *
199
+ * @example
200
+ * useErrorListener(err => {
201
+ * console.error(err);
202
+ * })
203
+ */
204
+ useErrorListener(callback: (err: LiveblocksError) => void): void;
318
205
  /**
319
206
  * Returns the current Liveblocks sync status, and triggers a re-render
320
207
  * whenever it changes. Can be used to render a "Saving..." indicator, or for
@@ -353,6 +240,17 @@ type SharedContextBundle<U extends BaseUserMeta> = {
353
240
  * const isInsideRoom = useIsInsideRoom();
354
241
  */
355
242
  useIsInsideRoom(): boolean;
243
+ /**
244
+ * useErrorListener is a React hook that allows you to respond to any
245
+ * Liveblocks error, for example room connection errors, errors
246
+ * creating/editing/deleting threads, etc.
247
+ *
248
+ * @example
249
+ * useErrorListener(err => {
250
+ * console.error(err);
251
+ * })
252
+ */
253
+ useErrorListener(callback: (err: LiveblocksError) => void): void;
356
254
  /**
357
255
  * Returns the current Liveblocks sync status, and triggers a re-render
358
256
  * whenever it changes. Can be used to render a "Saving..." indicator, or for
@@ -445,16 +343,6 @@ type RoomContextBundleCommon<P extends JsonObject, S extends LsonObject, U exten
445
343
  * })
446
344
  */
447
345
  useLostConnectionListener(callback: (event: LostConnectionEvent) => void): void;
448
- /**
449
- * useErrorListener is a React hook that allows you to respond to potential room
450
- * connection errors.
451
- *
452
- * @example
453
- * useErrorListener(er => {
454
- * console.error(er);
455
- * })
456
- */
457
- useErrorListener(callback: (err: LiveblocksError) => void): void;
458
346
  /**
459
347
  * useEventListener is a React hook that allows you to respond to events broadcast
460
348
  * by other users in the room.
@@ -778,16 +666,6 @@ type RoomContextBundleCommon<P extends JsonObject, S extends LsonObject, U exten
778
666
  */
779
667
  useThreadSubscription(threadId: string): ThreadSubscription;
780
668
  };
781
- /**
782
- * @private
783
- *
784
- * Private methods and variables used in the core internals, but as a user
785
- * of Liveblocks, NEVER USE ANY OF THESE DIRECTLY, because bad things
786
- * will probably happen if you do.
787
- */
788
- type PrivateRoomContextApi = {
789
- useCommentsErrorListener<M extends BaseMetadata$1>(callback: (err: CommentsError<M>) => void): void;
790
- };
791
669
  type RoomContextBundle<P extends JsonObject, S extends LsonObject, U extends BaseUserMeta, E extends Json, M extends BaseMetadata$1> = Resolve<RoomContextBundleCommon<P, S, U, E, M> & SharedContextBundle<U>["classic"] & {
792
670
  /**
793
671
  * Returns the current storage status for the Room, and triggers
@@ -980,7 +858,7 @@ type RoomContextBundle<P extends JsonObject, S extends LsonObject, U extends Bas
980
858
  */
981
859
  useAttachmentUrl(attachmentId: string): AttachmentUrlAsyncSuccess;
982
860
  }>;
983
- } & PrivateRoomContextApi>;
861
+ }>;
984
862
  /**
985
863
  * Properties that are the same in LiveblocksContext and LiveblocksContext["suspense"].
986
864
  */
@@ -1600,6 +1478,17 @@ declare const _useUserThreadsSuspense_experimental: TypedBundle$1["suspense"]["u
1600
1478
  * const syncStatus = useSyncStatus({ smooth: true });
1601
1479
  */
1602
1480
  declare function useSyncStatus(options?: UseSyncStatusOptions): SyncStatus;
1481
+ /**
1482
+ * useErrorListener is a React hook that allows you to respond to any
1483
+ * Liveblocks error, for example room connection errors, errors
1484
+ * creating/editing/deleting threads, etc.
1485
+ *
1486
+ * @example
1487
+ * useErrorListener(err => {
1488
+ * console.error(err);
1489
+ * })
1490
+ */
1491
+ declare function useErrorListener(callback: (err: LiveblocksError) => void): void;
1603
1492
 
1604
1493
  /**
1605
1494
  * Returns the current connection status for the Room, and triggers
@@ -1657,16 +1546,6 @@ declare function useBatch<T>(): (callback: () => T) => T;
1657
1546
  * })
1658
1547
  */
1659
1548
  declare function useLostConnectionListener(callback: (event: LostConnectionEvent) => void): void;
1660
- /**
1661
- * useErrorListener is a React hook that allows you to respond to potential room
1662
- * connection errors.
1663
- *
1664
- * @example
1665
- * useErrorListener(er => {
1666
- * console.error(er);
1667
- * })
1668
- */
1669
- declare function useErrorListener(callback: (err: LiveblocksError) => void): void;
1670
1549
  /**
1671
1550
  * Returns the room.history
1672
1551
  */
@@ -1704,10 +1583,6 @@ declare function useCanRedo(): boolean;
1704
1583
  * // [2, 4, 7]
1705
1584
  */
1706
1585
  declare function useOthersConnectionIds(): readonly number[];
1707
- /**
1708
- * @private Internal API, do not rely on it.
1709
- */
1710
- declare function useCommentsErrorListener<M extends BaseMetadata>(callback: (error: CommentsError<M>) => void): void;
1711
1586
  /**
1712
1587
  * @private
1713
1588
  */
@@ -2351,4 +2226,4 @@ declare const _useStorageRoot: TypedBundle["useStorageRoot"];
2351
2226
  */
2352
2227
  declare const _useUpdateMyPresence: TypedBundle["useUpdateMyPresence"];
2353
2228
 
2354
- export { _useEventListener as $, useDeleteAllInboxNotifications as A, useDeleteInboxNotification as B, CreateThreadError as C, useMarkAllInboxNotificationsAsRead as D, useMarkInboxNotificationAsRead as E, useSyncStatus as F, createRoomContext as G, _RoomProvider as H, _useAddReaction as I, useBatch as J, _useBroadcastEvent as K, LiveblocksProvider as L, type MutationContext as M, useCanRedo as N, useCanUndo as O, useCreateComment as P, _useCreateThread as Q, RoomContext as R, useDeleteComment as S, _useDeleteThread as T, type UseStorageStatusOptions as U, useEditComment as V, _useEditThreadMetadata as W, useMarkThreadAsResolved as X, useMarkThreadAsUnresolved as Y, useErrorListener as Z, _useInboxNotificationThread as _, useClientOrNull as a, useHistory as a0, _useIsInsideRoom as a1, useLostConnectionListener as a2, useMarkThreadAsRead as a3, _useMutation as a4, _useMyPresence as a5, _useOthersListener as a6, useRedo as a7, useRemoveReaction as a8, _useRoom as a9, useOthersConnectionIdsSuspense as aA, _useOthersMappedSuspense as aB, _useSelfSuspense as aC, _useStorageSuspense as aD, useStorageStatusSuspense as aE, _useThreadsSuspense as aF, useAttachmentUrlSuspense as aG, _useHistoryVersionsSuspense as aH, _useRoomNotificationSettingsSuspense as aI, useInboxNotificationsSuspense as aJ, useRoomInfoSuspense as aK, useUnreadInboxNotificationsCountSuspense as aL, _useUserSuspense as aM, _useUserThreadsSuspense_experimental as aN, useStatus as aa, _useStorageRoot as ab, useThreadSubscription as ac, useUndo as ad, _useUpdateMyPresence as ae, useUpdateRoomNotificationSettings as af, useHistoryVersionData as ag, useCommentsErrorListener as ah, _useOther as ai, _useOthers as aj, useOthersConnectionIds as ak, _useOthersMapped as al, _useSelf as am, _useStorage as an, useStorageStatus as ao, _useThreads as ap, useAttachmentUrl as aq, _useHistoryVersions as ar, _useRoomNotificationSettings as as, useInboxNotifications as at, _useUserThreads_experimental as au, useRoomInfo as av, useUnreadInboxNotificationsCount as aw, _useUser as ax, _useOtherSuspense as ay, _useOthersSuspense as az, useAddRoomCommentReaction as b, useCreateRoomComment as c, useCreateRoomThread as d, useCreateTextMention as e, useDeleteRoomComment as f, getUmbrellaStoreForClient as g, useDeleteRoomThread as h, useDeleteTextMention as i, useEditRoomComment as j, useEditRoomThreadMetadata as k, useMarkRoomThreadAsRead as l, useMarkRoomThreadAsResolved as m, useMarkRoomThreadAsUnresolved as n, useMentionSuggestionsCache as o, useRemoveRoomCommentReaction as p, useReportTextEditor as q, useResolveMentionSuggestions as r, useRoomAttachmentUrl as s, useRoomPermissions as t, useRoomOrNull as u, useYjsProvider as v, type UseThreadsOptions as w, ClientContext as x, createLiveblocksContext as y, useClient as z };
2229
+ export { useHistory as $, useDeleteInboxNotification as A, useErrorListener as B, ClientContext as C, useMarkAllInboxNotificationsAsRead as D, useMarkInboxNotificationAsRead as E, useSyncStatus as F, createRoomContext as G, _RoomProvider as H, _useAddReaction as I, useBatch as J, _useBroadcastEvent as K, LiveblocksProvider as L, type MutationContext as M, useCanRedo as N, useCanUndo as O, useCreateComment as P, _useCreateThread as Q, RoomContext as R, useDeleteComment as S, _useDeleteThread as T, type UseStorageStatusOptions as U, useEditComment as V, _useEditThreadMetadata as W, useMarkThreadAsResolved as X, useMarkThreadAsUnresolved as Y, _useEventListener as Z, _useInboxNotificationThread as _, useClientOrNull as a, _useIsInsideRoom as a0, useLostConnectionListener as a1, useMarkThreadAsRead as a2, _useMutation as a3, _useMyPresence as a4, _useOthersListener as a5, useRedo as a6, useRemoveReaction as a7, _useRoom as a8, useStatus as a9, _useSelfSuspense as aA, _useStorageSuspense as aB, useStorageStatusSuspense as aC, _useThreadsSuspense as aD, useAttachmentUrlSuspense as aE, _useHistoryVersionsSuspense as aF, _useRoomNotificationSettingsSuspense as aG, useInboxNotificationsSuspense as aH, useRoomInfoSuspense as aI, useUnreadInboxNotificationsCountSuspense as aJ, _useUserSuspense as aK, _useUserThreadsSuspense_experimental as aL, _useStorageRoot as aa, useThreadSubscription as ab, useUndo as ac, _useUpdateMyPresence as ad, useUpdateRoomNotificationSettings as ae, useHistoryVersionData as af, _useOther as ag, _useOthers as ah, useOthersConnectionIds as ai, _useOthersMapped as aj, _useSelf as ak, _useStorage as al, useStorageStatus as am, _useThreads as an, useAttachmentUrl as ao, _useHistoryVersions as ap, _useRoomNotificationSettings as aq, useInboxNotifications as ar, _useUserThreads_experimental as as, useRoomInfo as at, useUnreadInboxNotificationsCount as au, _useUser as av, _useOtherSuspense as aw, _useOthersSuspense as ax, useOthersConnectionIdsSuspense as ay, _useOthersMappedSuspense as az, useAddRoomCommentReaction as b, useCreateRoomComment as c, useCreateRoomThread as d, useCreateTextMention as e, useDeleteRoomComment as f, getUmbrellaStoreForClient as g, useDeleteRoomThread as h, useDeleteTextMention as i, useEditRoomComment as j, useEditRoomThreadMetadata as k, useMarkRoomThreadAsRead as l, useMarkRoomThreadAsResolved as m, useMarkRoomThreadAsUnresolved as n, useMentionSuggestionsCache as o, useRemoveRoomCommentReaction as p, useReportTextEditor as q, useResolveMentionSuggestions as r, useRoomAttachmentUrl as s, useRoomPermissions as t, useRoomOrNull as u, useYjsProvider as v, type UseThreadsOptions as w, createLiveblocksContext as x, useClient as y, useDeleteAllInboxNotifications as z };