@liveblocks/react 2.17.0 → 2.18.0-yjsfactory

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.17.0";
3
+ var PKG_VERSION = "2.18.0-yjsfactory";
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-K7QFAI6G.js.map
23
+ //# sourceMappingURL=chunk-ZGSNISPA.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/liveblocks/liveblocks/packages/liveblocks-react/dist/chunk-ZGSNISPA.js","../src/version.ts","../src/ClientSideSuspense.tsx"],"names":[],"mappings":"AAAA;ACGO,IAAM,SAAA,EAAW,mBAAA;AACjB,IAAM,YAAA,EAAiD,mBAAA;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-ZGSNISPA.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,5 +1,5 @@
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-DVbQkoj3.mjs';
2
- export { Json, JsonObject, shallow } from '@liveblocks/client';
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, as as useNotificationSettings, ag as useOther, ah as useOthers, ai as useOthersConnectionIds, a5 as useOthersListener, aj as useOthersMapped, a6 as useRedo, a7 as useRemoveReaction, a8 as useRoom, av 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, aw as useUnreadInboxNotificationsCount, ad as useUpdateMyPresence, at as useUpdateNotificationSettings, ae as useUpdateRoomNotificationSettings, ax as useUser, au as useUserThreads_experimental } from './room-Bf3S78LF.mjs';
2
+ export { Json, JsonObject, isNotificationChannelEnabled, shallow } from '@liveblocks/client';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import { ReactNode } from 'react';
5
5
  import '@liveblocks/core';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
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-DVbQkoj3.js';
2
- export { Json, JsonObject, shallow } from '@liveblocks/client';
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, as as useNotificationSettings, ag as useOther, ah as useOthers, ai as useOthersConnectionIds, a5 as useOthersListener, aj as useOthersMapped, a6 as useRedo, a7 as useRemoveReaction, a8 as useRoom, av 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, aw as useUnreadInboxNotificationsCount, ad as useUpdateMyPresence, at as useUpdateNotificationSettings, ae as useUpdateRoomNotificationSettings, ax as useUser, au as useUserThreads_experimental } from './room-Bf3S78LF.js';
2
+ export { Json, JsonObject, isNotificationChannelEnabled, shallow } from '@liveblocks/client';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import { ReactNode } from 'react';
5
5
  import '@liveblocks/core';
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkK7QFAI6Gjs = require('./chunk-K7QFAI6G.js');
6
+ var _chunkZGSNISPAjs = require('./chunk-ZGSNISPA.js');
7
7
 
8
8
 
9
9
 
@@ -66,12 +66,17 @@ var _chunkK7QFAI6Gjs = require('./chunk-K7QFAI6G.js');
66
66
 
67
67
 
68
68
 
69
- var _chunkJ5ZDLMBEjs = require('./chunk-J5ZDLMBE.js');
69
+
70
+
71
+ var _chunkLJCQ446Sjs = require('./chunk-LJCQ446S.js');
70
72
 
71
73
  // src/index.ts
72
74
  var _core = require('@liveblocks/core');
73
75
  var _client = require('@liveblocks/client');
74
- _core.detectDupes.call(void 0, _chunkK7QFAI6Gjs.PKG_NAME, _chunkK7QFAI6Gjs.PKG_VERSION, _chunkK7QFAI6Gjs.PKG_FORMAT);
76
+ _core.detectDupes.call(void 0, _chunkZGSNISPAjs.PKG_NAME, _chunkZGSNISPAjs.PKG_VERSION, _chunkZGSNISPAjs.PKG_FORMAT);
77
+
78
+
79
+
75
80
 
76
81
 
77
82
 
@@ -136,5 +141,5 @@ _core.detectDupes.call(void 0, _chunkK7QFAI6Gjs.PKG_NAME, _chunkK7QFAI6Gjs.PKG_V
136
141
 
137
142
 
138
143
 
139
- exports.ClientContext = _chunkJ5ZDLMBEjs.ClientContext; exports.ClientSideSuspense = _chunkK7QFAI6Gjs.ClientSideSuspense; exports.LiveblocksProvider = _chunkJ5ZDLMBEjs.LiveblocksProvider; exports.RoomContext = _chunkJ5ZDLMBEjs.RoomContext; exports.RoomProvider = _chunkJ5ZDLMBEjs._RoomProvider; exports.createLiveblocksContext = _chunkJ5ZDLMBEjs.createLiveblocksContext; exports.createRoomContext = _chunkJ5ZDLMBEjs.createRoomContext; exports.shallow = _client.shallow; exports.useAddReaction = _chunkJ5ZDLMBEjs._useAddReaction; exports.useAttachmentUrl = _chunkJ5ZDLMBEjs.useAttachmentUrl; exports.useBatch = _chunkJ5ZDLMBEjs.useBatch; exports.useBroadcastEvent = _chunkJ5ZDLMBEjs._useBroadcastEvent; exports.useCanRedo = _chunkJ5ZDLMBEjs.useCanRedo; exports.useCanUndo = _chunkJ5ZDLMBEjs.useCanUndo; exports.useClient = _chunkJ5ZDLMBEjs.useClient; exports.useCreateComment = _chunkJ5ZDLMBEjs.useCreateComment; exports.useCreateThread = _chunkJ5ZDLMBEjs._useCreateThread; exports.useDeleteAllInboxNotifications = _chunkJ5ZDLMBEjs.useDeleteAllInboxNotifications; exports.useDeleteComment = _chunkJ5ZDLMBEjs.useDeleteComment; exports.useDeleteInboxNotification = _chunkJ5ZDLMBEjs.useDeleteInboxNotification; exports.useDeleteThread = _chunkJ5ZDLMBEjs._useDeleteThread; exports.useEditComment = _chunkJ5ZDLMBEjs.useEditComment; exports.useEditThreadMetadata = _chunkJ5ZDLMBEjs._useEditThreadMetadata; exports.useErrorListener = _chunkJ5ZDLMBEjs.useErrorListener; exports.useEventListener = _chunkJ5ZDLMBEjs._useEventListener; exports.useHistory = _chunkJ5ZDLMBEjs.useHistory; exports.useHistoryVersionData = _chunkJ5ZDLMBEjs.useHistoryVersionData; exports.useHistoryVersions = _chunkJ5ZDLMBEjs._useHistoryVersions; exports.useInboxNotificationThread = _chunkJ5ZDLMBEjs._useInboxNotificationThread; exports.useInboxNotifications = _chunkJ5ZDLMBEjs.useInboxNotifications; exports.useIsInsideRoom = _chunkJ5ZDLMBEjs._useIsInsideRoom; exports.useLostConnectionListener = _chunkJ5ZDLMBEjs.useLostConnectionListener; exports.useMarkAllInboxNotificationsAsRead = _chunkJ5ZDLMBEjs.useMarkAllInboxNotificationsAsRead; exports.useMarkInboxNotificationAsRead = _chunkJ5ZDLMBEjs.useMarkInboxNotificationAsRead; exports.useMarkThreadAsRead = _chunkJ5ZDLMBEjs.useMarkThreadAsRead; exports.useMarkThreadAsResolved = _chunkJ5ZDLMBEjs.useMarkThreadAsResolved; exports.useMarkThreadAsUnresolved = _chunkJ5ZDLMBEjs.useMarkThreadAsUnresolved; exports.useMutation = _chunkJ5ZDLMBEjs._useMutation; exports.useMyPresence = _chunkJ5ZDLMBEjs._useMyPresence; exports.useOther = _chunkJ5ZDLMBEjs._useOther; exports.useOthers = _chunkJ5ZDLMBEjs._useOthers; exports.useOthersConnectionIds = _chunkJ5ZDLMBEjs.useOthersConnectionIds; exports.useOthersListener = _chunkJ5ZDLMBEjs._useOthersListener; exports.useOthersMapped = _chunkJ5ZDLMBEjs._useOthersMapped; exports.useRedo = _chunkJ5ZDLMBEjs.useRedo; exports.useRemoveReaction = _chunkJ5ZDLMBEjs.useRemoveReaction; exports.useRoom = _chunkJ5ZDLMBEjs._useRoom; exports.useRoomInfo = _chunkJ5ZDLMBEjs.useRoomInfo; exports.useRoomNotificationSettings = _chunkJ5ZDLMBEjs._useRoomNotificationSettings; exports.useSelf = _chunkJ5ZDLMBEjs._useSelf; exports.useStatus = _chunkJ5ZDLMBEjs.useStatus; exports.useStorage = _chunkJ5ZDLMBEjs._useStorage; exports.useStorageRoot = _chunkJ5ZDLMBEjs._useStorageRoot; exports.useStorageStatus = _chunkJ5ZDLMBEjs.useStorageStatus; exports.useSyncStatus = _chunkJ5ZDLMBEjs.useSyncStatus; exports.useThreadSubscription = _chunkJ5ZDLMBEjs.useThreadSubscription; exports.useThreads = _chunkJ5ZDLMBEjs._useThreads; exports.useUndo = _chunkJ5ZDLMBEjs.useUndo; exports.useUnreadInboxNotificationsCount = _chunkJ5ZDLMBEjs.useUnreadInboxNotificationsCount; exports.useUpdateMyPresence = _chunkJ5ZDLMBEjs._useUpdateMyPresence; exports.useUpdateRoomNotificationSettings = _chunkJ5ZDLMBEjs.useUpdateRoomNotificationSettings; exports.useUser = _chunkJ5ZDLMBEjs._useUser; exports.useUserThreads_experimental = _chunkJ5ZDLMBEjs._useUserThreads_experimental;
144
+ exports.ClientContext = _chunkLJCQ446Sjs.ClientContext; exports.ClientSideSuspense = _chunkZGSNISPAjs.ClientSideSuspense; exports.LiveblocksProvider = _chunkLJCQ446Sjs.LiveblocksProvider; exports.RoomContext = _chunkLJCQ446Sjs.RoomContext; exports.RoomProvider = _chunkLJCQ446Sjs._RoomProvider; exports.createLiveblocksContext = _chunkLJCQ446Sjs.createLiveblocksContext; exports.createRoomContext = _chunkLJCQ446Sjs.createRoomContext; exports.isNotificationChannelEnabled = _client.isNotificationChannelEnabled; exports.shallow = _client.shallow; exports.useAddReaction = _chunkLJCQ446Sjs._useAddReaction; exports.useAttachmentUrl = _chunkLJCQ446Sjs.useAttachmentUrl; exports.useBatch = _chunkLJCQ446Sjs.useBatch; exports.useBroadcastEvent = _chunkLJCQ446Sjs._useBroadcastEvent; exports.useCanRedo = _chunkLJCQ446Sjs.useCanRedo; exports.useCanUndo = _chunkLJCQ446Sjs.useCanUndo; exports.useClient = _chunkLJCQ446Sjs.useClient; exports.useCreateComment = _chunkLJCQ446Sjs.useCreateComment; exports.useCreateThread = _chunkLJCQ446Sjs._useCreateThread; exports.useDeleteAllInboxNotifications = _chunkLJCQ446Sjs.useDeleteAllInboxNotifications; exports.useDeleteComment = _chunkLJCQ446Sjs.useDeleteComment; exports.useDeleteInboxNotification = _chunkLJCQ446Sjs.useDeleteInboxNotification; exports.useDeleteThread = _chunkLJCQ446Sjs._useDeleteThread; exports.useEditComment = _chunkLJCQ446Sjs.useEditComment; exports.useEditThreadMetadata = _chunkLJCQ446Sjs._useEditThreadMetadata; exports.useErrorListener = _chunkLJCQ446Sjs.useErrorListener; exports.useEventListener = _chunkLJCQ446Sjs._useEventListener; exports.useHistory = _chunkLJCQ446Sjs.useHistory; exports.useHistoryVersionData = _chunkLJCQ446Sjs.useHistoryVersionData; exports.useHistoryVersions = _chunkLJCQ446Sjs._useHistoryVersions; exports.useInboxNotificationThread = _chunkLJCQ446Sjs._useInboxNotificationThread; exports.useInboxNotifications = _chunkLJCQ446Sjs.useInboxNotifications; exports.useIsInsideRoom = _chunkLJCQ446Sjs._useIsInsideRoom; exports.useLostConnectionListener = _chunkLJCQ446Sjs.useLostConnectionListener; exports.useMarkAllInboxNotificationsAsRead = _chunkLJCQ446Sjs.useMarkAllInboxNotificationsAsRead; exports.useMarkInboxNotificationAsRead = _chunkLJCQ446Sjs.useMarkInboxNotificationAsRead; exports.useMarkThreadAsRead = _chunkLJCQ446Sjs.useMarkThreadAsRead; exports.useMarkThreadAsResolved = _chunkLJCQ446Sjs.useMarkThreadAsResolved; exports.useMarkThreadAsUnresolved = _chunkLJCQ446Sjs.useMarkThreadAsUnresolved; exports.useMutation = _chunkLJCQ446Sjs._useMutation; exports.useMyPresence = _chunkLJCQ446Sjs._useMyPresence; exports.useNotificationSettings = _chunkLJCQ446Sjs.useNotificationSettings; exports.useOther = _chunkLJCQ446Sjs._useOther; exports.useOthers = _chunkLJCQ446Sjs._useOthers; exports.useOthersConnectionIds = _chunkLJCQ446Sjs.useOthersConnectionIds; exports.useOthersListener = _chunkLJCQ446Sjs._useOthersListener; exports.useOthersMapped = _chunkLJCQ446Sjs._useOthersMapped; exports.useRedo = _chunkLJCQ446Sjs.useRedo; exports.useRemoveReaction = _chunkLJCQ446Sjs.useRemoveReaction; exports.useRoom = _chunkLJCQ446Sjs._useRoom; exports.useRoomInfo = _chunkLJCQ446Sjs.useRoomInfo; exports.useRoomNotificationSettings = _chunkLJCQ446Sjs._useRoomNotificationSettings; exports.useSelf = _chunkLJCQ446Sjs._useSelf; exports.useStatus = _chunkLJCQ446Sjs.useStatus; exports.useStorage = _chunkLJCQ446Sjs._useStorage; exports.useStorageRoot = _chunkLJCQ446Sjs._useStorageRoot; exports.useStorageStatus = _chunkLJCQ446Sjs.useStorageStatus; exports.useSyncStatus = _chunkLJCQ446Sjs.useSyncStatus; exports.useThreadSubscription = _chunkLJCQ446Sjs.useThreadSubscription; exports.useThreads = _chunkLJCQ446Sjs._useThreads; exports.useUndo = _chunkLJCQ446Sjs.useUndo; exports.useUnreadInboxNotificationsCount = _chunkLJCQ446Sjs.useUnreadInboxNotificationsCount; exports.useUpdateMyPresence = _chunkLJCQ446Sjs._useUpdateMyPresence; exports.useUpdateNotificationSettings = _chunkLJCQ446Sjs.useUpdateNotificationSettings; exports.useUpdateRoomNotificationSettings = _chunkLJCQ446Sjs.useUpdateRoomNotificationSettings; exports.useUser = _chunkLJCQ446Sjs._useUser; exports.useUserThreads_experimental = _chunkLJCQ446Sjs._useUserThreads_experimental;
140
145
  //# 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;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"]}
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;AACA;AACF,sDAA4B;AAC5B;AACA;ACvEA,wCAA4B;AAc5B,4CAAsD;AAXtD,+BAAA,yBAAY,EAAU,4BAAA,EAAa,2BAAU,CAAA;ADwE7C;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;AACA;AACA;AACF,0oIAAC","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, isNotificationChannelEnabled } 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 useNotificationSettings,\n useUpdateNotificationSettings,\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-XHQ4VJ7B.mjs";
6
+ } from "./chunk-6GCMTETG.mjs";
7
7
  import {
8
8
  ClientContext,
9
9
  LiveblocksProvider,
@@ -55,6 +55,7 @@ import {
55
55
  useMarkThreadAsRead,
56
56
  useMarkThreadAsResolved,
57
57
  useMarkThreadAsUnresolved,
58
+ useNotificationSettings,
58
59
  useOthersConnectionIds,
59
60
  useRedo,
60
61
  useRemoveReaction,
@@ -65,12 +66,13 @@ import {
65
66
  useThreadSubscription,
66
67
  useUndo,
67
68
  useUnreadInboxNotificationsCount,
69
+ useUpdateNotificationSettings,
68
70
  useUpdateRoomNotificationSettings
69
- } from "./chunk-4KNGHD4I.mjs";
71
+ } from "./chunk-OSTPNTQF.mjs";
70
72
 
71
73
  // src/index.ts
72
74
  import { detectDupes } from "@liveblocks/core";
73
- import { shallow } from "@liveblocks/client";
75
+ import { shallow, isNotificationChannelEnabled } from "@liveblocks/client";
74
76
  detectDupes(PKG_NAME, PKG_VERSION, PKG_FORMAT);
75
77
  export {
76
78
  ClientContext,
@@ -80,6 +82,7 @@ export {
80
82
  _RoomProvider as RoomProvider,
81
83
  createLiveblocksContext,
82
84
  createRoomContext,
85
+ isNotificationChannelEnabled,
83
86
  shallow,
84
87
  _useAddReaction as useAddReaction,
85
88
  useAttachmentUrl,
@@ -112,6 +115,7 @@ export {
112
115
  useMarkThreadAsUnresolved,
113
116
  _useMutation as useMutation,
114
117
  _useMyPresence as useMyPresence,
118
+ useNotificationSettings,
115
119
  _useOther as useOther,
116
120
  _useOthers as useOthers,
117
121
  useOthersConnectionIds,
@@ -133,6 +137,7 @@ export {
133
137
  useUndo,
134
138
  useUnreadInboxNotificationsCount,
135
139
  _useUpdateMyPresence as useUpdateMyPresence,
140
+ useUpdateNotificationSettings,
136
141
  useUpdateRoomNotificationSettings,
137
142
  _useUser as useUser,
138
143
  _useUserThreads_experimental as useUserThreads_experimental
@@ -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 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":[]}
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, isNotificationChannelEnabled } 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 useNotificationSettings,\n useUpdateNotificationSettings,\n useUserThreads_experimental as useUserThreads_experimental,\n useRoomInfo,\n useUnreadInboxNotificationsCount,\n useUser,\n} from \"./liveblocks\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,mBAAmB;AAc5B,SAAS,SAAS,oCAAoC;AAXtD,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, 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';
5
+ import { OpaqueRoom, BaseMetadata as BaseMetadata$1, StorageStatus, QueryMetadata, AsyncResult, DRI, AsyncSuccess, Resolve, CommentBody, CommentAttachment, PartialUnless, Patchable, InboxNotificationData, UserNotificationSettings, Relax, ToImmutable, PartialUserNotificationSettings, 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
  /**
@@ -110,6 +110,7 @@ type InboxNotificationsAsyncSuccess = PagedAsyncSuccess<InboxNotificationData[],
110
110
  type InboxNotificationsAsyncResult = PagedAsyncResult<InboxNotificationData[], "inboxNotifications">;
111
111
  type UnreadInboxNotificationsCountAsyncSuccess = AsyncSuccess<number, "count">;
112
112
  type UnreadInboxNotificationsCountAsyncResult = AsyncResult<number, "count">;
113
+ type UserNotificationSettingsAsyncResult = AsyncResult<UserNotificationSettings, "settings">;
113
114
  type RoomNotificationSettingsAsyncSuccess = AsyncSuccess<RoomNotificationSettings, "settings">;
114
115
  type RoomNotificationSettingsAsyncResult = AsyncResult<RoomNotificationSettings, "settings">;
115
116
  type HistoryVersionDataAsyncResult = AsyncResult<Uint8Array>;
@@ -916,6 +917,24 @@ type LiveblocksContextBundleCommon<M extends BaseMetadata$1> = {
916
917
  * const thread = useInboxNotificationThread("in_xxx");
917
918
  */
918
919
  useInboxNotificationThread(inboxNotificationId: string): ThreadData<M>;
920
+ /**
921
+ * Returns notification settings for the current user.
922
+ *
923
+ * @example
924
+ * const [{ settings }, updateNotificationSettings] = useNotificationSettings()
925
+ */
926
+ useNotificationSettings(): [
927
+ UserNotificationSettingsAsyncResult,
928
+ (settings: PartialUserNotificationSettings) => void
929
+ ];
930
+ /**
931
+ * Returns a function that updates the user's notification
932
+ * settings for a project.
933
+ *
934
+ * @example
935
+ * const updateNotificationSettings = useUpdateNotificationSettings()
936
+ */
937
+ useUpdateNotificationSettings(): (settings: PartialUserNotificationSettings) => void;
919
938
  /**
920
939
  * Returns the current Liveblocks sync status, and triggers a re-render
921
940
  * whenever it changes. Can be used to render a "Saving..." indicator, or for
@@ -965,6 +984,16 @@ type LiveblocksContextBundle<U extends BaseUserMeta, M extends BaseMetadata$1> =
965
984
  * const { count } = useUnreadInboxNotificationsCount();
966
985
  */
967
986
  useUnreadInboxNotificationsCount(): UnreadInboxNotificationsCountAsyncSuccess;
987
+ /**
988
+ * Returns notification settings for the current user.
989
+ *
990
+ * @example
991
+ * const [{ settings }, updateNotificationSettings] = useNotificationSettings()
992
+ */
993
+ useNotificationSettings(): [
994
+ UserNotificationSettingsAsyncResult,
995
+ (settings: PartialUserNotificationSettings) => void
996
+ ];
968
997
  /**
969
998
  * @experimental
970
999
  *
@@ -1026,7 +1055,7 @@ declare class ThreadDB<M extends BaseMetadata$1> {
1026
1055
  findMany(roomId: string | undefined, query: ThreadsQuery<M>, direction: "asc" | "desc"): ThreadData<M>[];
1027
1056
  }
1028
1057
 
1029
- type OptimisticUpdate<M extends BaseMetadata$1> = CreateThreadOptimisticUpdate<M> | DeleteThreadOptimisticUpdate | EditThreadMetadataOptimisticUpdate<M> | MarkThreadAsResolvedOptimisticUpdate | MarkThreadAsUnresolvedOptimisticUpdate | CreateCommentOptimisticUpdate | EditCommentOptimisticUpdate | DeleteCommentOptimisticUpdate | AddReactionOptimisticUpdate | RemoveReactionOptimisticUpdate | MarkInboxNotificationAsReadOptimisticUpdate | MarkAllInboxNotificationsAsReadOptimisticUpdate | DeleteInboxNotificationOptimisticUpdate | DeleteAllInboxNotificationsOptimisticUpdate | UpdateNotificationSettingsOptimisticUpdate;
1058
+ type OptimisticUpdate<M extends BaseMetadata$1> = CreateThreadOptimisticUpdate<M> | DeleteThreadOptimisticUpdate | EditThreadMetadataOptimisticUpdate<M> | MarkThreadAsResolvedOptimisticUpdate | MarkThreadAsUnresolvedOptimisticUpdate | CreateCommentOptimisticUpdate | EditCommentOptimisticUpdate | DeleteCommentOptimisticUpdate | AddReactionOptimisticUpdate | RemoveReactionOptimisticUpdate | MarkInboxNotificationAsReadOptimisticUpdate | MarkAllInboxNotificationsAsReadOptimisticUpdate | DeleteInboxNotificationOptimisticUpdate | DeleteAllInboxNotificationsOptimisticUpdate | UpdateNotificationSettingsOptimisticUpdate | UpdateUserNotificationSettingsOptimisticUpdate;
1030
1059
  type CreateThreadOptimisticUpdate<M extends BaseMetadata$1> = {
1031
1060
  type: "create-thread";
1032
1061
  id: string;
@@ -1121,6 +1150,11 @@ type UpdateNotificationSettingsOptimisticUpdate = {
1121
1150
  roomId: string;
1122
1151
  settings: Partial<RoomNotificationSettings$1>;
1123
1152
  };
1153
+ type UpdateUserNotificationSettingsOptimisticUpdate = {
1154
+ type: "update-user-notification-settings";
1155
+ id: string;
1156
+ settings: PartialUserNotificationSettings;
1157
+ };
1124
1158
  /**
1125
1159
  * Like Promise<T>, except it will have a synchronously readable `status`
1126
1160
  * field, indicating the status of the promise.
@@ -1201,6 +1235,10 @@ declare function createStore_forPermissionHints(): {
1201
1235
  signal: ISignal<PermissionHintsLUT>;
1202
1236
  update: (newHints: Record<string, Permission[]>) => void;
1203
1237
  };
1238
+ declare function createStore_forUserNotificationSettings(updates: ISignal<readonly OptimisticUpdate<BaseMetadata$1>[]>): {
1239
+ signal: DerivedSignal<UserNotificationSettings>;
1240
+ update: (settings: UserNotificationSettings) => void;
1241
+ };
1204
1242
  declare function createStore_forOptimistic<M extends BaseMetadata$1>(client: Client<BaseUserMeta$1, M>): {
1205
1243
  signal: ISignal<readonly OptimisticUpdate<M>[]>;
1206
1244
  add: (optimisticUpdate: DistributiveOmit<OptimisticUpdate<M>, "id">) => string;
@@ -1213,6 +1251,7 @@ declare class UmbrellaStore<M extends BaseMetadata$1> {
1213
1251
  readonly roomNotificationSettings: ReturnType<typeof createStore_forRoomNotificationSettings>;
1214
1252
  readonly historyVersions: ReturnType<typeof createStore_forHistoryVersions>;
1215
1253
  readonly permissionHints: ReturnType<typeof createStore_forPermissionHints>;
1254
+ readonly userNotificationSettings: ReturnType<typeof createStore_forUserNotificationSettings>;
1216
1255
  readonly optimisticUpdates: ReturnType<typeof createStore_forOptimistic<M>>;
1217
1256
  readonly outputs: {
1218
1257
  readonly threadifications: DerivedSignal<CleanThreadifications<M>>;
@@ -1223,6 +1262,7 @@ declare class UmbrellaStore<M extends BaseMetadata$1> {
1223
1262
  readonly loadingNotifications: LoadableResource<InboxNotificationsAsyncResult>;
1224
1263
  readonly settingsByRoomId: DefaultMap<RoomId, LoadableResource<RoomNotificationSettingsAsyncResult>>;
1225
1264
  readonly versionsByRoomId: DefaultMap<RoomId, LoadableResource<HistoryVersionsAsyncResult>>;
1265
+ readonly userNotificationSettings: LoadableResource<UserNotificationSettingsAsyncResult>;
1226
1266
  };
1227
1267
  constructor(client: OpaqueClient);
1228
1268
  /**
@@ -1280,6 +1320,15 @@ declare class UmbrellaStore<M extends BaseMetadata$1> {
1280
1320
  fetchUserThreadsDeltaUpdate(signal: AbortSignal): Promise<void>;
1281
1321
  fetchRoomVersionsDeltaUpdate(roomId: string, signal: AbortSignal): Promise<void>;
1282
1322
  refreshRoomNotificationSettings(roomId: string, signal: AbortSignal): Promise<void>;
1323
+ /**
1324
+ * Refresh User Notification Settings from poller
1325
+ */
1326
+ refreshUserNotificationSettings(signal: AbortSignal): Promise<void>;
1327
+ /**
1328
+ * Updates user notification settings with a new value, replacing the
1329
+ * corresponding optimistic update.
1330
+ */
1331
+ updateUserNotificationSettings_confirmOptimisticUpdate(settings: UserNotificationSettings, optimisticUpdateId: string): void;
1283
1332
  }
1284
1333
 
1285
1334
  /**
@@ -1390,6 +1439,32 @@ declare function useUnreadInboxNotificationsCountSuspense(): {
1390
1439
  readonly count: number;
1391
1440
  readonly error?: undefined;
1392
1441
  };
1442
+ /**
1443
+ * Returns notification settings for the current user.
1444
+ *
1445
+ * @example
1446
+ * const [{ settings }, updateNotificationSettings] = useNotificationSettings()
1447
+ */
1448
+ declare function useNotificationSettings(): [UserNotificationSettingsAsyncResult, (settings: PartialUserNotificationSettings) => void];
1449
+ /**
1450
+ * Returns notification settings for the current user.
1451
+ *
1452
+ * @example
1453
+ * const [{ settings }, updateNotificationSettings] = useNotificationSettings()
1454
+ */
1455
+ declare function useNotificationSettingsSuspense(): [{
1456
+ readonly isLoading: false;
1457
+ readonly settings: _liveblocks_core.UserNotificationSettings;
1458
+ readonly error?: undefined;
1459
+ }, (settings: PartialUserNotificationSettings) => void];
1460
+ /**
1461
+ * Returns a function that updates the user's notification
1462
+ * settings for a project.
1463
+ *
1464
+ * @example
1465
+ * const updateNotificationSettings = useUpdateNotificationSettings()
1466
+ */
1467
+ declare function useUpdateNotificationSettings(): (settings: PartialUserNotificationSettings) => void;
1393
1468
  /**
1394
1469
  * Returns room info from a given room ID.
1395
1470
  *
@@ -2226,4 +2301,4 @@ declare const _useStorageRoot: TypedBundle["useStorageRoot"];
2226
2301
  */
2227
2302
  declare const _useUpdateMyPresence: TypedBundle["useUpdateMyPresence"];
2228
2303
 
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 };
2304
+ 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, 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, useNotificationSettingsSuspense as aK, useRoomInfoSuspense as aL, useUnreadInboxNotificationsCountSuspense as aM, _useUserSuspense as aN, _useUserThreadsSuspense_experimental as aO, _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, useNotificationSettings as as, useUpdateNotificationSettings 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, createLiveblocksContext as x, useClient as y, useDeleteAllInboxNotifications as z };
@@ -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, 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';
5
+ import { OpaqueRoom, BaseMetadata as BaseMetadata$1, StorageStatus, QueryMetadata, AsyncResult, DRI, AsyncSuccess, Resolve, CommentBody, CommentAttachment, PartialUnless, Patchable, InboxNotificationData, UserNotificationSettings, Relax, ToImmutable, PartialUserNotificationSettings, 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
  /**
@@ -110,6 +110,7 @@ type InboxNotificationsAsyncSuccess = PagedAsyncSuccess<InboxNotificationData[],
110
110
  type InboxNotificationsAsyncResult = PagedAsyncResult<InboxNotificationData[], "inboxNotifications">;
111
111
  type UnreadInboxNotificationsCountAsyncSuccess = AsyncSuccess<number, "count">;
112
112
  type UnreadInboxNotificationsCountAsyncResult = AsyncResult<number, "count">;
113
+ type UserNotificationSettingsAsyncResult = AsyncResult<UserNotificationSettings, "settings">;
113
114
  type RoomNotificationSettingsAsyncSuccess = AsyncSuccess<RoomNotificationSettings, "settings">;
114
115
  type RoomNotificationSettingsAsyncResult = AsyncResult<RoomNotificationSettings, "settings">;
115
116
  type HistoryVersionDataAsyncResult = AsyncResult<Uint8Array>;
@@ -916,6 +917,24 @@ type LiveblocksContextBundleCommon<M extends BaseMetadata$1> = {
916
917
  * const thread = useInboxNotificationThread("in_xxx");
917
918
  */
918
919
  useInboxNotificationThread(inboxNotificationId: string): ThreadData<M>;
920
+ /**
921
+ * Returns notification settings for the current user.
922
+ *
923
+ * @example
924
+ * const [{ settings }, updateNotificationSettings] = useNotificationSettings()
925
+ */
926
+ useNotificationSettings(): [
927
+ UserNotificationSettingsAsyncResult,
928
+ (settings: PartialUserNotificationSettings) => void
929
+ ];
930
+ /**
931
+ * Returns a function that updates the user's notification
932
+ * settings for a project.
933
+ *
934
+ * @example
935
+ * const updateNotificationSettings = useUpdateNotificationSettings()
936
+ */
937
+ useUpdateNotificationSettings(): (settings: PartialUserNotificationSettings) => void;
919
938
  /**
920
939
  * Returns the current Liveblocks sync status, and triggers a re-render
921
940
  * whenever it changes. Can be used to render a "Saving..." indicator, or for
@@ -965,6 +984,16 @@ type LiveblocksContextBundle<U extends BaseUserMeta, M extends BaseMetadata$1> =
965
984
  * const { count } = useUnreadInboxNotificationsCount();
966
985
  */
967
986
  useUnreadInboxNotificationsCount(): UnreadInboxNotificationsCountAsyncSuccess;
987
+ /**
988
+ * Returns notification settings for the current user.
989
+ *
990
+ * @example
991
+ * const [{ settings }, updateNotificationSettings] = useNotificationSettings()
992
+ */
993
+ useNotificationSettings(): [
994
+ UserNotificationSettingsAsyncResult,
995
+ (settings: PartialUserNotificationSettings) => void
996
+ ];
968
997
  /**
969
998
  * @experimental
970
999
  *
@@ -1026,7 +1055,7 @@ declare class ThreadDB<M extends BaseMetadata$1> {
1026
1055
  findMany(roomId: string | undefined, query: ThreadsQuery<M>, direction: "asc" | "desc"): ThreadData<M>[];
1027
1056
  }
1028
1057
 
1029
- type OptimisticUpdate<M extends BaseMetadata$1> = CreateThreadOptimisticUpdate<M> | DeleteThreadOptimisticUpdate | EditThreadMetadataOptimisticUpdate<M> | MarkThreadAsResolvedOptimisticUpdate | MarkThreadAsUnresolvedOptimisticUpdate | CreateCommentOptimisticUpdate | EditCommentOptimisticUpdate | DeleteCommentOptimisticUpdate | AddReactionOptimisticUpdate | RemoveReactionOptimisticUpdate | MarkInboxNotificationAsReadOptimisticUpdate | MarkAllInboxNotificationsAsReadOptimisticUpdate | DeleteInboxNotificationOptimisticUpdate | DeleteAllInboxNotificationsOptimisticUpdate | UpdateNotificationSettingsOptimisticUpdate;
1058
+ type OptimisticUpdate<M extends BaseMetadata$1> = CreateThreadOptimisticUpdate<M> | DeleteThreadOptimisticUpdate | EditThreadMetadataOptimisticUpdate<M> | MarkThreadAsResolvedOptimisticUpdate | MarkThreadAsUnresolvedOptimisticUpdate | CreateCommentOptimisticUpdate | EditCommentOptimisticUpdate | DeleteCommentOptimisticUpdate | AddReactionOptimisticUpdate | RemoveReactionOptimisticUpdate | MarkInboxNotificationAsReadOptimisticUpdate | MarkAllInboxNotificationsAsReadOptimisticUpdate | DeleteInboxNotificationOptimisticUpdate | DeleteAllInboxNotificationsOptimisticUpdate | UpdateNotificationSettingsOptimisticUpdate | UpdateUserNotificationSettingsOptimisticUpdate;
1030
1059
  type CreateThreadOptimisticUpdate<M extends BaseMetadata$1> = {
1031
1060
  type: "create-thread";
1032
1061
  id: string;
@@ -1121,6 +1150,11 @@ type UpdateNotificationSettingsOptimisticUpdate = {
1121
1150
  roomId: string;
1122
1151
  settings: Partial<RoomNotificationSettings$1>;
1123
1152
  };
1153
+ type UpdateUserNotificationSettingsOptimisticUpdate = {
1154
+ type: "update-user-notification-settings";
1155
+ id: string;
1156
+ settings: PartialUserNotificationSettings;
1157
+ };
1124
1158
  /**
1125
1159
  * Like Promise<T>, except it will have a synchronously readable `status`
1126
1160
  * field, indicating the status of the promise.
@@ -1201,6 +1235,10 @@ declare function createStore_forPermissionHints(): {
1201
1235
  signal: ISignal<PermissionHintsLUT>;
1202
1236
  update: (newHints: Record<string, Permission[]>) => void;
1203
1237
  };
1238
+ declare function createStore_forUserNotificationSettings(updates: ISignal<readonly OptimisticUpdate<BaseMetadata$1>[]>): {
1239
+ signal: DerivedSignal<UserNotificationSettings>;
1240
+ update: (settings: UserNotificationSettings) => void;
1241
+ };
1204
1242
  declare function createStore_forOptimistic<M extends BaseMetadata$1>(client: Client<BaseUserMeta$1, M>): {
1205
1243
  signal: ISignal<readonly OptimisticUpdate<M>[]>;
1206
1244
  add: (optimisticUpdate: DistributiveOmit<OptimisticUpdate<M>, "id">) => string;
@@ -1213,6 +1251,7 @@ declare class UmbrellaStore<M extends BaseMetadata$1> {
1213
1251
  readonly roomNotificationSettings: ReturnType<typeof createStore_forRoomNotificationSettings>;
1214
1252
  readonly historyVersions: ReturnType<typeof createStore_forHistoryVersions>;
1215
1253
  readonly permissionHints: ReturnType<typeof createStore_forPermissionHints>;
1254
+ readonly userNotificationSettings: ReturnType<typeof createStore_forUserNotificationSettings>;
1216
1255
  readonly optimisticUpdates: ReturnType<typeof createStore_forOptimistic<M>>;
1217
1256
  readonly outputs: {
1218
1257
  readonly threadifications: DerivedSignal<CleanThreadifications<M>>;
@@ -1223,6 +1262,7 @@ declare class UmbrellaStore<M extends BaseMetadata$1> {
1223
1262
  readonly loadingNotifications: LoadableResource<InboxNotificationsAsyncResult>;
1224
1263
  readonly settingsByRoomId: DefaultMap<RoomId, LoadableResource<RoomNotificationSettingsAsyncResult>>;
1225
1264
  readonly versionsByRoomId: DefaultMap<RoomId, LoadableResource<HistoryVersionsAsyncResult>>;
1265
+ readonly userNotificationSettings: LoadableResource<UserNotificationSettingsAsyncResult>;
1226
1266
  };
1227
1267
  constructor(client: OpaqueClient);
1228
1268
  /**
@@ -1280,6 +1320,15 @@ declare class UmbrellaStore<M extends BaseMetadata$1> {
1280
1320
  fetchUserThreadsDeltaUpdate(signal: AbortSignal): Promise<void>;
1281
1321
  fetchRoomVersionsDeltaUpdate(roomId: string, signal: AbortSignal): Promise<void>;
1282
1322
  refreshRoomNotificationSettings(roomId: string, signal: AbortSignal): Promise<void>;
1323
+ /**
1324
+ * Refresh User Notification Settings from poller
1325
+ */
1326
+ refreshUserNotificationSettings(signal: AbortSignal): Promise<void>;
1327
+ /**
1328
+ * Updates user notification settings with a new value, replacing the
1329
+ * corresponding optimistic update.
1330
+ */
1331
+ updateUserNotificationSettings_confirmOptimisticUpdate(settings: UserNotificationSettings, optimisticUpdateId: string): void;
1283
1332
  }
1284
1333
 
1285
1334
  /**
@@ -1390,6 +1439,32 @@ declare function useUnreadInboxNotificationsCountSuspense(): {
1390
1439
  readonly count: number;
1391
1440
  readonly error?: undefined;
1392
1441
  };
1442
+ /**
1443
+ * Returns notification settings for the current user.
1444
+ *
1445
+ * @example
1446
+ * const [{ settings }, updateNotificationSettings] = useNotificationSettings()
1447
+ */
1448
+ declare function useNotificationSettings(): [UserNotificationSettingsAsyncResult, (settings: PartialUserNotificationSettings) => void];
1449
+ /**
1450
+ * Returns notification settings for the current user.
1451
+ *
1452
+ * @example
1453
+ * const [{ settings }, updateNotificationSettings] = useNotificationSettings()
1454
+ */
1455
+ declare function useNotificationSettingsSuspense(): [{
1456
+ readonly isLoading: false;
1457
+ readonly settings: _liveblocks_core.UserNotificationSettings;
1458
+ readonly error?: undefined;
1459
+ }, (settings: PartialUserNotificationSettings) => void];
1460
+ /**
1461
+ * Returns a function that updates the user's notification
1462
+ * settings for a project.
1463
+ *
1464
+ * @example
1465
+ * const updateNotificationSettings = useUpdateNotificationSettings()
1466
+ */
1467
+ declare function useUpdateNotificationSettings(): (settings: PartialUserNotificationSettings) => void;
1393
1468
  /**
1394
1469
  * Returns room info from a given room ID.
1395
1470
  *
@@ -2226,4 +2301,4 @@ declare const _useStorageRoot: TypedBundle["useStorageRoot"];
2226
2301
  */
2227
2302
  declare const _useUpdateMyPresence: TypedBundle["useUpdateMyPresence"];
2228
2303
 
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 };
2304
+ 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, 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, useNotificationSettingsSuspense as aK, useRoomInfoSuspense as aL, useUnreadInboxNotificationsCountSuspense as aM, _useUserSuspense as aN, _useUserThreadsSuspense_experimental as aO, _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, useNotificationSettings as as, useUpdateNotificationSettings 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, createLiveblocksContext as x, useClient as y, useDeleteAllInboxNotifications as z };
@@ -1,6 +1,6 @@
1
1
  export { ClientSideSuspense } from './index.mjs';
2
- export { C as ClientContext, L as LiveblocksProvider, M as MutationContext, R as RoomContext, H as RoomProvider, U as UseStorageStatusOptions, w as UseThreadsOptions, I as useAddReaction, aE 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 useHistoryVersions, _ as useInboxNotificationThread, aH 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, aw as useOther, ax as useOthers, ay as useOthersConnectionIds, a5 as useOthersListener, az as useOthersMapped, a6 as useRedo, a7 as useRemoveReaction, a8 as useRoom, aI as useRoomInfo, aG as useRoomNotificationSettings, aA as useSelf, a9 as useStatus, aB as useStorage, aa as useStorageRoot, aC as useStorageStatus, F as useSyncStatus, ab as useThreadSubscription, aD as useThreads, ac as useUndo, aJ as useUnreadInboxNotificationsCount, ad as useUpdateMyPresence, ae as useUpdateRoomNotificationSettings, aK as useUser, aL as useUserThreads_experimental } from './room-DVbQkoj3.mjs';
3
- export { Json, JsonObject, shallow } from '@liveblocks/client';
2
+ export { C as ClientContext, L as LiveblocksProvider, M as MutationContext, R as RoomContext, H as RoomProvider, U as UseStorageStatusOptions, w as UseThreadsOptions, I as useAddReaction, aG as useAttachmentUrl, J as useBatch, K as useBroadcastEvent, N as useCanRedo, O as useCanUndo, 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, aH as useHistoryVersions, _ as useInboxNotificationThread, aJ 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, aK as useNotificationSettings, ay as useOther, az as useOthers, aA as useOthersConnectionIds, a5 as useOthersListener, aB as useOthersMapped, a6 as useRedo, a7 as useRemoveReaction, a8 as useRoom, aL as useRoomInfo, aI as useRoomNotificationSettings, aC as useSelf, a9 as useStatus, aD as useStorage, aa as useStorageRoot, aE as useStorageStatus, F as useSyncStatus, ab as useThreadSubscription, aF as useThreads, ac as useUndo, aM as useUnreadInboxNotificationsCount, ad as useUpdateMyPresence, at as useUpdateNotificationSettings, ae as useUpdateRoomNotificationSettings, aN as useUser, aO as useUserThreads_experimental } from './room-Bf3S78LF.mjs';
3
+ export { Json, JsonObject, isNotificationChannelEnabled, shallow } from '@liveblocks/client';
4
4
  import 'react/jsx-runtime';
5
5
  import 'react';
6
6
  import '@liveblocks/core';
@@ -1,6 +1,6 @@
1
1
  export { ClientSideSuspense } from './index.js';
2
- export { C as ClientContext, L as LiveblocksProvider, M as MutationContext, R as RoomContext, H as RoomProvider, U as UseStorageStatusOptions, w as UseThreadsOptions, I as useAddReaction, aE 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 useHistoryVersions, _ as useInboxNotificationThread, aH 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, aw as useOther, ax as useOthers, ay as useOthersConnectionIds, a5 as useOthersListener, az as useOthersMapped, a6 as useRedo, a7 as useRemoveReaction, a8 as useRoom, aI as useRoomInfo, aG as useRoomNotificationSettings, aA as useSelf, a9 as useStatus, aB as useStorage, aa as useStorageRoot, aC as useStorageStatus, F as useSyncStatus, ab as useThreadSubscription, aD as useThreads, ac as useUndo, aJ as useUnreadInboxNotificationsCount, ad as useUpdateMyPresence, ae as useUpdateRoomNotificationSettings, aK as useUser, aL as useUserThreads_experimental } from './room-DVbQkoj3.js';
3
- export { Json, JsonObject, shallow } from '@liveblocks/client';
2
+ export { C as ClientContext, L as LiveblocksProvider, M as MutationContext, R as RoomContext, H as RoomProvider, U as UseStorageStatusOptions, w as UseThreadsOptions, I as useAddReaction, aG as useAttachmentUrl, J as useBatch, K as useBroadcastEvent, N as useCanRedo, O as useCanUndo, 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, aH as useHistoryVersions, _ as useInboxNotificationThread, aJ 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, aK as useNotificationSettings, ay as useOther, az as useOthers, aA as useOthersConnectionIds, a5 as useOthersListener, aB as useOthersMapped, a6 as useRedo, a7 as useRemoveReaction, a8 as useRoom, aL as useRoomInfo, aI as useRoomNotificationSettings, aC as useSelf, a9 as useStatus, aD as useStorage, aa as useStorageRoot, aE as useStorageStatus, F as useSyncStatus, ab as useThreadSubscription, aF as useThreads, ac as useUndo, aM as useUnreadInboxNotificationsCount, ad as useUpdateMyPresence, at as useUpdateNotificationSettings, ae as useUpdateRoomNotificationSettings, aN as useUser, aO as useUserThreads_experimental } from './room-Bf3S78LF.js';
3
+ export { Json, JsonObject, isNotificationChannelEnabled, shallow } from '@liveblocks/client';
4
4
  import 'react/jsx-runtime';
5
5
  import 'react';
6
6
  import '@liveblocks/core';