@liveblocks/react 2.17.0-channels1 → 2.17.0-usrnotsettings1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_private.d.mts +1 -1
- package/dist/_private.d.ts +1 -1
- package/dist/_private.js +5 -7
- package/dist/_private.js.map +1 -1
- package/dist/_private.mjs +1 -3
- package/dist/_private.mjs.map +1 -1
- package/dist/{chunk-22QRR3GV.js → chunk-4F7C4HN7.js} +168 -286
- package/dist/chunk-4F7C4HN7.js.map +1 -0
- package/dist/{chunk-RABQO63H.js → chunk-DT3BO7N5.js} +2 -2
- package/dist/{chunk-RABQO63H.js.map → chunk-DT3BO7N5.js.map} +1 -1
- package/dist/{chunk-KFACA6OH.mjs → chunk-KAFU5ZQA.mjs} +2 -2
- package/dist/{chunk-VX6Y3GQO.mjs → chunk-LOPNJCSB.mjs} +169 -287
- package/dist/chunk-LOPNJCSB.mjs.map +1 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -13
- package/dist/index.mjs.map +1 -1
- package/dist/{room-C0TyErPq.d.mts → room-DlI0Yrzf.d.mts} +72 -190
- package/dist/{room-C0TyErPq.d.ts → room-DlI0Yrzf.d.ts} +72 -190
- package/dist/suspense.d.mts +2 -2
- package/dist/suspense.d.ts +2 -2
- package/dist/suspense.js +4 -7
- package/dist/suspense.js.map +1 -1
- package/dist/suspense.mjs +8 -11
- package/dist/suspense.mjs.map +1 -1
- package/package.json +4 -4
- package/dist/chunk-22QRR3GV.js.map +0 -1
- package/dist/chunk-VX6Y3GQO.mjs.map +0 -1
- /package/dist/{chunk-KFACA6OH.mjs.map → chunk-KAFU5ZQA.mjs.map} +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { Json, JsonObject,
|
|
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-DlI0Yrzf.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 {
|
|
2
|
-
export { Json, JsonObject,
|
|
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-DlI0Yrzf.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
|
|
6
|
+
var _chunkDT3BO7N5js = require('./chunk-DT3BO7N5.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -68,17 +68,12 @@ var _chunkRABQO63Hjs = require('./chunk-RABQO63H.js');
|
|
|
68
68
|
|
|
69
69
|
|
|
70
70
|
|
|
71
|
-
|
|
72
|
-
var _chunk22QRR3GVjs = require('./chunk-22QRR3GV.js');
|
|
71
|
+
var _chunk4F7C4HN7js = require('./chunk-4F7C4HN7.js');
|
|
73
72
|
|
|
74
73
|
// src/index.ts
|
|
75
74
|
var _core = require('@liveblocks/core');
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
75
|
var _client = require('@liveblocks/client');
|
|
80
|
-
_core.detectDupes.call(void 0,
|
|
81
|
-
|
|
76
|
+
_core.detectDupes.call(void 0, _chunkDT3BO7N5js.PKG_NAME, _chunkDT3BO7N5js.PKG_VERSION, _chunkDT3BO7N5js.PKG_FORMAT);
|
|
82
77
|
|
|
83
78
|
|
|
84
79
|
|
|
@@ -146,5 +141,5 @@ _core.detectDupes.call(void 0, _chunkRABQO63Hjs.PKG_NAME, _chunkRABQO63Hjs.PKG_V
|
|
|
146
141
|
|
|
147
142
|
|
|
148
143
|
|
|
149
|
-
exports.ClientContext =
|
|
144
|
+
exports.ClientContext = _chunk4F7C4HN7js.ClientContext; exports.ClientSideSuspense = _chunkDT3BO7N5js.ClientSideSuspense; exports.LiveblocksProvider = _chunk4F7C4HN7js.LiveblocksProvider; exports.RoomContext = _chunk4F7C4HN7js.RoomContext; exports.RoomProvider = _chunk4F7C4HN7js._RoomProvider; exports.createLiveblocksContext = _chunk4F7C4HN7js.createLiveblocksContext; exports.createRoomContext = _chunk4F7C4HN7js.createRoomContext; exports.isNotificationChannelEnabled = _client.isNotificationChannelEnabled; exports.shallow = _client.shallow; exports.useAddReaction = _chunk4F7C4HN7js._useAddReaction; exports.useAttachmentUrl = _chunk4F7C4HN7js.useAttachmentUrl; exports.useBatch = _chunk4F7C4HN7js.useBatch; exports.useBroadcastEvent = _chunk4F7C4HN7js._useBroadcastEvent; exports.useCanRedo = _chunk4F7C4HN7js.useCanRedo; exports.useCanUndo = _chunk4F7C4HN7js.useCanUndo; exports.useClient = _chunk4F7C4HN7js.useClient; exports.useCreateComment = _chunk4F7C4HN7js.useCreateComment; exports.useCreateThread = _chunk4F7C4HN7js._useCreateThread; exports.useDeleteAllInboxNotifications = _chunk4F7C4HN7js.useDeleteAllInboxNotifications; exports.useDeleteComment = _chunk4F7C4HN7js.useDeleteComment; exports.useDeleteInboxNotification = _chunk4F7C4HN7js.useDeleteInboxNotification; exports.useDeleteThread = _chunk4F7C4HN7js._useDeleteThread; exports.useEditComment = _chunk4F7C4HN7js.useEditComment; exports.useEditThreadMetadata = _chunk4F7C4HN7js._useEditThreadMetadata; exports.useErrorListener = _chunk4F7C4HN7js.useErrorListener; exports.useEventListener = _chunk4F7C4HN7js._useEventListener; exports.useHistory = _chunk4F7C4HN7js.useHistory; exports.useHistoryVersionData = _chunk4F7C4HN7js.useHistoryVersionData; exports.useHistoryVersions = _chunk4F7C4HN7js._useHistoryVersions; exports.useInboxNotificationThread = _chunk4F7C4HN7js._useInboxNotificationThread; exports.useInboxNotifications = _chunk4F7C4HN7js.useInboxNotifications; exports.useIsInsideRoom = _chunk4F7C4HN7js._useIsInsideRoom; exports.useLostConnectionListener = _chunk4F7C4HN7js.useLostConnectionListener; exports.useMarkAllInboxNotificationsAsRead = _chunk4F7C4HN7js.useMarkAllInboxNotificationsAsRead; exports.useMarkInboxNotificationAsRead = _chunk4F7C4HN7js.useMarkInboxNotificationAsRead; exports.useMarkThreadAsRead = _chunk4F7C4HN7js.useMarkThreadAsRead; exports.useMarkThreadAsResolved = _chunk4F7C4HN7js.useMarkThreadAsResolved; exports.useMarkThreadAsUnresolved = _chunk4F7C4HN7js.useMarkThreadAsUnresolved; exports.useMutation = _chunk4F7C4HN7js._useMutation; exports.useMyPresence = _chunk4F7C4HN7js._useMyPresence; exports.useNotificationSettings = _chunk4F7C4HN7js.useNotificationSettings; exports.useOther = _chunk4F7C4HN7js._useOther; exports.useOthers = _chunk4F7C4HN7js._useOthers; exports.useOthersConnectionIds = _chunk4F7C4HN7js.useOthersConnectionIds; exports.useOthersListener = _chunk4F7C4HN7js._useOthersListener; exports.useOthersMapped = _chunk4F7C4HN7js._useOthersMapped; exports.useRedo = _chunk4F7C4HN7js.useRedo; exports.useRemoveReaction = _chunk4F7C4HN7js.useRemoveReaction; exports.useRoom = _chunk4F7C4HN7js._useRoom; exports.useRoomInfo = _chunk4F7C4HN7js.useRoomInfo; exports.useRoomNotificationSettings = _chunk4F7C4HN7js._useRoomNotificationSettings; exports.useSelf = _chunk4F7C4HN7js._useSelf; exports.useStatus = _chunk4F7C4HN7js.useStatus; exports.useStorage = _chunk4F7C4HN7js._useStorage; exports.useStorageRoot = _chunk4F7C4HN7js._useStorageRoot; exports.useStorageStatus = _chunk4F7C4HN7js.useStorageStatus; exports.useSyncStatus = _chunk4F7C4HN7js.useSyncStatus; exports.useThreadSubscription = _chunk4F7C4HN7js.useThreadSubscription; exports.useThreads = _chunk4F7C4HN7js._useThreads; exports.useUndo = _chunk4F7C4HN7js.useUndo; exports.useUnreadInboxNotificationsCount = _chunk4F7C4HN7js.useUnreadInboxNotificationsCount; exports.useUpdateMyPresence = _chunk4F7C4HN7js._useUpdateMyPresence; exports.useUpdateNotificationSettings = _chunk4F7C4HN7js.useUpdateNotificationSettings; exports.useUpdateRoomNotificationSettings = _chunk4F7C4HN7js.useUpdateRoomNotificationSettings; exports.useUser = _chunk4F7C4HN7js._useUser; exports.useUserThreads_experimental = _chunk4F7C4HN7js._useUserThreads_experimental;
|
|
150
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;AACA;AACA;
|
|
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-
|
|
6
|
+
} from "./chunk-KAFU5ZQA.mjs";
|
|
7
7
|
import {
|
|
8
8
|
ClientContext,
|
|
9
9
|
LiveblocksProvider,
|
|
@@ -39,9 +39,7 @@ import {
|
|
|
39
39
|
useBatch,
|
|
40
40
|
useCanRedo,
|
|
41
41
|
useCanUndo,
|
|
42
|
-
useChannelsNotificationSettings,
|
|
43
42
|
useClient,
|
|
44
|
-
useCommentsErrorListener,
|
|
45
43
|
useCreateComment,
|
|
46
44
|
useDeleteAllInboxNotifications,
|
|
47
45
|
useDeleteComment,
|
|
@@ -57,6 +55,7 @@ import {
|
|
|
57
55
|
useMarkThreadAsRead,
|
|
58
56
|
useMarkThreadAsResolved,
|
|
59
57
|
useMarkThreadAsUnresolved,
|
|
58
|
+
useNotificationSettings,
|
|
60
59
|
useOthersConnectionIds,
|
|
61
60
|
useRedo,
|
|
62
61
|
useRemoveReaction,
|
|
@@ -67,16 +66,13 @@ import {
|
|
|
67
66
|
useThreadSubscription,
|
|
68
67
|
useUndo,
|
|
69
68
|
useUnreadInboxNotificationsCount,
|
|
70
|
-
|
|
69
|
+
useUpdateNotificationSettings,
|
|
71
70
|
useUpdateRoomNotificationSettings
|
|
72
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-LOPNJCSB.mjs";
|
|
73
72
|
|
|
74
73
|
// src/index.ts
|
|
75
74
|
import { detectDupes } from "@liveblocks/core";
|
|
76
|
-
import {
|
|
77
|
-
shallow,
|
|
78
|
-
isChannelNotificationSettingEnabled
|
|
79
|
-
} from "@liveblocks/client";
|
|
75
|
+
import { shallow, isNotificationChannelEnabled } from "@liveblocks/client";
|
|
80
76
|
detectDupes(PKG_NAME, PKG_VERSION, PKG_FORMAT);
|
|
81
77
|
export {
|
|
82
78
|
ClientContext,
|
|
@@ -86,7 +82,7 @@ export {
|
|
|
86
82
|
_RoomProvider as RoomProvider,
|
|
87
83
|
createLiveblocksContext,
|
|
88
84
|
createRoomContext,
|
|
89
|
-
|
|
85
|
+
isNotificationChannelEnabled,
|
|
90
86
|
shallow,
|
|
91
87
|
_useAddReaction as useAddReaction,
|
|
92
88
|
useAttachmentUrl,
|
|
@@ -94,9 +90,7 @@ export {
|
|
|
94
90
|
_useBroadcastEvent as useBroadcastEvent,
|
|
95
91
|
useCanRedo,
|
|
96
92
|
useCanUndo,
|
|
97
|
-
useChannelsNotificationSettings,
|
|
98
93
|
useClient,
|
|
99
|
-
useCommentsErrorListener,
|
|
100
94
|
useCreateComment,
|
|
101
95
|
_useCreateThread as useCreateThread,
|
|
102
96
|
useDeleteAllInboxNotifications,
|
|
@@ -121,6 +115,7 @@ export {
|
|
|
121
115
|
useMarkThreadAsUnresolved,
|
|
122
116
|
_useMutation as useMutation,
|
|
123
117
|
_useMyPresence as useMyPresence,
|
|
118
|
+
useNotificationSettings,
|
|
124
119
|
_useOther as useOther,
|
|
125
120
|
_useOthers as useOthers,
|
|
126
121
|
useOthersConnectionIds,
|
|
@@ -141,8 +136,8 @@ export {
|
|
|
141
136
|
_useThreads as useThreads,
|
|
142
137
|
useUndo,
|
|
143
138
|
useUnreadInboxNotificationsCount,
|
|
144
|
-
useUpdateChannelsNotificationSettings,
|
|
145
139
|
_useUpdateMyPresence as useUpdateMyPresence,
|
|
140
|
+
useUpdateNotificationSettings,
|
|
146
141
|
useUpdateRoomNotificationSettings,
|
|
147
142
|
_useUser as useUser,
|
|
148
143
|
_useUserThreads_experimental as useUserThreads_experimental
|
package/dist/index.mjs.map
CHANGED
|
@@ -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 {
|
|
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,
|
|
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
|
/**
|
|
@@ -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
|
|
@@ -227,7 +110,7 @@ type InboxNotificationsAsyncSuccess = PagedAsyncSuccess<InboxNotificationData[],
|
|
|
227
110
|
type InboxNotificationsAsyncResult = PagedAsyncResult<InboxNotificationData[], "inboxNotifications">;
|
|
228
111
|
type UnreadInboxNotificationsCountAsyncSuccess = AsyncSuccess<number, "count">;
|
|
229
112
|
type UnreadInboxNotificationsCountAsyncResult = AsyncResult<number, "count">;
|
|
230
|
-
type
|
|
113
|
+
type UserNotificationSettingsAsyncResult = AsyncResult<UserNotificationSettings, "settings">;
|
|
231
114
|
type RoomNotificationSettingsAsyncSuccess = AsyncSuccess<RoomNotificationSettings, "settings">;
|
|
232
115
|
type RoomNotificationSettingsAsyncResult = AsyncResult<RoomNotificationSettings, "settings">;
|
|
233
116
|
type HistoryVersionDataAsyncResult = AsyncResult<Uint8Array>;
|
|
@@ -309,6 +192,17 @@ type SharedContextBundle<U extends BaseUserMeta> = {
|
|
|
309
192
|
* const isInsideRoom = useIsInsideRoom();
|
|
310
193
|
*/
|
|
311
194
|
useIsInsideRoom(): boolean;
|
|
195
|
+
/**
|
|
196
|
+
* useErrorListener is a React hook that allows you to respond to any
|
|
197
|
+
* Liveblocks error, for example room connection errors, errors
|
|
198
|
+
* creating/editing/deleting threads, etc.
|
|
199
|
+
*
|
|
200
|
+
* @example
|
|
201
|
+
* useErrorListener(err => {
|
|
202
|
+
* console.error(err);
|
|
203
|
+
* })
|
|
204
|
+
*/
|
|
205
|
+
useErrorListener(callback: (err: LiveblocksError) => void): void;
|
|
312
206
|
/**
|
|
313
207
|
* Returns the current Liveblocks sync status, and triggers a re-render
|
|
314
208
|
* whenever it changes. Can be used to render a "Saving..." indicator, or for
|
|
@@ -347,6 +241,17 @@ type SharedContextBundle<U extends BaseUserMeta> = {
|
|
|
347
241
|
* const isInsideRoom = useIsInsideRoom();
|
|
348
242
|
*/
|
|
349
243
|
useIsInsideRoom(): boolean;
|
|
244
|
+
/**
|
|
245
|
+
* useErrorListener is a React hook that allows you to respond to any
|
|
246
|
+
* Liveblocks error, for example room connection errors, errors
|
|
247
|
+
* creating/editing/deleting threads, etc.
|
|
248
|
+
*
|
|
249
|
+
* @example
|
|
250
|
+
* useErrorListener(err => {
|
|
251
|
+
* console.error(err);
|
|
252
|
+
* })
|
|
253
|
+
*/
|
|
254
|
+
useErrorListener(callback: (err: LiveblocksError) => void): void;
|
|
350
255
|
/**
|
|
351
256
|
* Returns the current Liveblocks sync status, and triggers a re-render
|
|
352
257
|
* whenever it changes. Can be used to render a "Saving..." indicator, or for
|
|
@@ -439,16 +344,6 @@ type RoomContextBundleCommon<P extends JsonObject, S extends LsonObject, U exten
|
|
|
439
344
|
* })
|
|
440
345
|
*/
|
|
441
346
|
useLostConnectionListener(callback: (event: LostConnectionEvent) => void): void;
|
|
442
|
-
/**
|
|
443
|
-
* useErrorListener is a React hook that allows you to respond to potential room
|
|
444
|
-
* connection errors.
|
|
445
|
-
*
|
|
446
|
-
* @example
|
|
447
|
-
* useErrorListener(er => {
|
|
448
|
-
* console.error(er);
|
|
449
|
-
* })
|
|
450
|
-
*/
|
|
451
|
-
useErrorListener(callback: (err: LiveblocksError) => void): void;
|
|
452
347
|
/**
|
|
453
348
|
* useEventListener is a React hook that allows you to respond to events broadcast
|
|
454
349
|
* by other users in the room.
|
|
@@ -772,16 +667,6 @@ type RoomContextBundleCommon<P extends JsonObject, S extends LsonObject, U exten
|
|
|
772
667
|
*/
|
|
773
668
|
useThreadSubscription(threadId: string): ThreadSubscription;
|
|
774
669
|
};
|
|
775
|
-
/**
|
|
776
|
-
* @private
|
|
777
|
-
*
|
|
778
|
-
* Private methods and variables used in the core internals, but as a user
|
|
779
|
-
* of Liveblocks, NEVER USE ANY OF THESE DIRECTLY, because bad things
|
|
780
|
-
* will probably happen if you do.
|
|
781
|
-
*/
|
|
782
|
-
type PrivateRoomContextApi = {
|
|
783
|
-
useCommentsErrorListener<M extends BaseMetadata$1>(callback: (err: CommentsError<M>) => void): void;
|
|
784
|
-
};
|
|
785
670
|
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"] & {
|
|
786
671
|
/**
|
|
787
672
|
* Returns the current storage status for the Room, and triggers
|
|
@@ -974,7 +859,7 @@ type RoomContextBundle<P extends JsonObject, S extends LsonObject, U extends Bas
|
|
|
974
859
|
*/
|
|
975
860
|
useAttachmentUrl(attachmentId: string): AttachmentUrlAsyncSuccess;
|
|
976
861
|
}>;
|
|
977
|
-
}
|
|
862
|
+
}>;
|
|
978
863
|
/**
|
|
979
864
|
* Properties that are the same in LiveblocksContext and LiveblocksContext["suspense"].
|
|
980
865
|
*/
|
|
@@ -1033,23 +918,23 @@ type LiveblocksContextBundleCommon<M extends BaseMetadata$1> = {
|
|
|
1033
918
|
*/
|
|
1034
919
|
useInboxNotificationThread(inboxNotificationId: string): ThreadData<M>;
|
|
1035
920
|
/**
|
|
1036
|
-
* Returns
|
|
921
|
+
* Returns notification settings for the current user.
|
|
1037
922
|
*
|
|
1038
923
|
* @example
|
|
1039
|
-
* const [{ settings },
|
|
924
|
+
* const [{ settings }, updateNotificationSettings] = useNotificationSettings()
|
|
1040
925
|
*/
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
(settings:
|
|
926
|
+
useNotificationSettings(): [
|
|
927
|
+
UserNotificationSettingsAsyncResult,
|
|
928
|
+
(settings: PartialUserNotificationSettings) => void
|
|
1044
929
|
];
|
|
1045
930
|
/**
|
|
1046
|
-
* Returns a function that updates the user's
|
|
931
|
+
* Returns a function that updates the user's notification
|
|
1047
932
|
* settings for a project.
|
|
1048
933
|
*
|
|
1049
934
|
* @example
|
|
1050
|
-
* const
|
|
935
|
+
* const updateNotificationSettings = useUpdateNotificationSettings()
|
|
1051
936
|
*/
|
|
1052
|
-
|
|
937
|
+
useUpdateNotificationSettings(): (settings: PartialUserNotificationSettings) => void;
|
|
1053
938
|
/**
|
|
1054
939
|
* Returns the current Liveblocks sync status, and triggers a re-render
|
|
1055
940
|
* whenever it changes. Can be used to render a "Saving..." indicator, or for
|
|
@@ -1100,14 +985,14 @@ type LiveblocksContextBundle<U extends BaseUserMeta, M extends BaseMetadata$1> =
|
|
|
1100
985
|
*/
|
|
1101
986
|
useUnreadInboxNotificationsCount(): UnreadInboxNotificationsCountAsyncSuccess;
|
|
1102
987
|
/**
|
|
1103
|
-
* Returns
|
|
988
|
+
* Returns notification settings for the current user.
|
|
1104
989
|
*
|
|
1105
990
|
* @example
|
|
1106
|
-
* const [{ settings },
|
|
991
|
+
* const [{ settings }, updateNotificationSettings] = useNotificationSettings()
|
|
1107
992
|
*/
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
(settings:
|
|
993
|
+
useNotificationSettings(): [
|
|
994
|
+
UserNotificationSettingsAsyncResult,
|
|
995
|
+
(settings: PartialUserNotificationSettings) => void
|
|
1111
996
|
];
|
|
1112
997
|
/**
|
|
1113
998
|
* @experimental
|
|
@@ -1170,7 +1055,7 @@ declare class ThreadDB<M extends BaseMetadata$1> {
|
|
|
1170
1055
|
findMany(roomId: string | undefined, query: ThreadsQuery<M>, direction: "asc" | "desc"): ThreadData<M>[];
|
|
1171
1056
|
}
|
|
1172
1057
|
|
|
1173
|
-
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;
|
|
1174
1059
|
type CreateThreadOptimisticUpdate<M extends BaseMetadata$1> = {
|
|
1175
1060
|
type: "create-thread";
|
|
1176
1061
|
id: string;
|
|
@@ -1265,10 +1150,10 @@ type UpdateNotificationSettingsOptimisticUpdate = {
|
|
|
1265
1150
|
roomId: string;
|
|
1266
1151
|
settings: Partial<RoomNotificationSettings$1>;
|
|
1267
1152
|
};
|
|
1268
|
-
type
|
|
1269
|
-
type: "update-
|
|
1153
|
+
type UpdateUserNotificationSettingsOptimisticUpdate = {
|
|
1154
|
+
type: "update-user-notification-settings";
|
|
1270
1155
|
id: string;
|
|
1271
|
-
settings:
|
|
1156
|
+
settings: PartialUserNotificationSettings;
|
|
1272
1157
|
};
|
|
1273
1158
|
/**
|
|
1274
1159
|
* Like Promise<T>, except it will have a synchronously readable `status`
|
|
@@ -1350,9 +1235,9 @@ declare function createStore_forPermissionHints(): {
|
|
|
1350
1235
|
signal: ISignal<PermissionHintsLUT>;
|
|
1351
1236
|
update: (newHints: Record<string, Permission[]>) => void;
|
|
1352
1237
|
};
|
|
1353
|
-
declare function
|
|
1354
|
-
signal: DerivedSignal<
|
|
1355
|
-
update: (settings:
|
|
1238
|
+
declare function createStore_forUserNotificationSettings(updates: ISignal<readonly OptimisticUpdate<BaseMetadata$1>[]>): {
|
|
1239
|
+
signal: DerivedSignal<UserNotificationSettings>;
|
|
1240
|
+
update: (settings: UserNotificationSettings) => void;
|
|
1356
1241
|
};
|
|
1357
1242
|
declare function createStore_forOptimistic<M extends BaseMetadata$1>(client: Client<BaseUserMeta$1, M>): {
|
|
1358
1243
|
signal: ISignal<readonly OptimisticUpdate<M>[]>;
|
|
@@ -1366,7 +1251,7 @@ declare class UmbrellaStore<M extends BaseMetadata$1> {
|
|
|
1366
1251
|
readonly roomNotificationSettings: ReturnType<typeof createStore_forRoomNotificationSettings>;
|
|
1367
1252
|
readonly historyVersions: ReturnType<typeof createStore_forHistoryVersions>;
|
|
1368
1253
|
readonly permissionHints: ReturnType<typeof createStore_forPermissionHints>;
|
|
1369
|
-
readonly
|
|
1254
|
+
readonly userNotificationSettings: ReturnType<typeof createStore_forUserNotificationSettings>;
|
|
1370
1255
|
readonly optimisticUpdates: ReturnType<typeof createStore_forOptimistic<M>>;
|
|
1371
1256
|
readonly outputs: {
|
|
1372
1257
|
readonly threadifications: DerivedSignal<CleanThreadifications<M>>;
|
|
@@ -1377,7 +1262,7 @@ declare class UmbrellaStore<M extends BaseMetadata$1> {
|
|
|
1377
1262
|
readonly loadingNotifications: LoadableResource<InboxNotificationsAsyncResult>;
|
|
1378
1263
|
readonly settingsByRoomId: DefaultMap<RoomId, LoadableResource<RoomNotificationSettingsAsyncResult>>;
|
|
1379
1264
|
readonly versionsByRoomId: DefaultMap<RoomId, LoadableResource<HistoryVersionsAsyncResult>>;
|
|
1380
|
-
readonly
|
|
1265
|
+
readonly userNotificationSettings: LoadableResource<UserNotificationSettingsAsyncResult>;
|
|
1381
1266
|
};
|
|
1382
1267
|
constructor(client: OpaqueClient);
|
|
1383
1268
|
/**
|
|
@@ -1436,14 +1321,14 @@ declare class UmbrellaStore<M extends BaseMetadata$1> {
|
|
|
1436
1321
|
fetchRoomVersionsDeltaUpdate(roomId: string, signal: AbortSignal): Promise<void>;
|
|
1437
1322
|
refreshRoomNotificationSettings(roomId: string, signal: AbortSignal): Promise<void>;
|
|
1438
1323
|
/**
|
|
1439
|
-
* Refresh
|
|
1324
|
+
* Refresh User Notification Settings from poller
|
|
1440
1325
|
*/
|
|
1441
|
-
|
|
1326
|
+
refreshUserNotificationSettings(signal: AbortSignal): Promise<void>;
|
|
1442
1327
|
/**
|
|
1443
|
-
* Updates
|
|
1328
|
+
* Updates user notification settings with a new value, replacing the
|
|
1444
1329
|
* corresponding optimistic update.
|
|
1445
1330
|
*/
|
|
1446
|
-
|
|
1331
|
+
updateUserNotificationSettings_confirmOptimisticUpdate(settings: UserNotificationSettings, optimisticUpdateId: string): void;
|
|
1447
1332
|
}
|
|
1448
1333
|
|
|
1449
1334
|
/**
|
|
@@ -1555,27 +1440,27 @@ declare function useUnreadInboxNotificationsCountSuspense(): {
|
|
|
1555
1440
|
readonly error?: undefined;
|
|
1556
1441
|
};
|
|
1557
1442
|
/**
|
|
1558
|
-
* Returns
|
|
1443
|
+
* Returns notification settings for the current user.
|
|
1559
1444
|
*
|
|
1560
1445
|
* @example
|
|
1561
|
-
* const [{ settings },
|
|
1446
|
+
* const [{ settings }, updateNotificationSettings] = useNotificationSettings()
|
|
1562
1447
|
*/
|
|
1563
|
-
declare function
|
|
1448
|
+
declare function useNotificationSettings(): [UserNotificationSettingsAsyncResult, (settings: PartialUserNotificationSettings) => void];
|
|
1564
1449
|
/**
|
|
1565
|
-
* Returns
|
|
1450
|
+
* Returns notification settings for the current user.
|
|
1566
1451
|
*
|
|
1567
1452
|
* @example
|
|
1568
|
-
* const [{ settings },
|
|
1453
|
+
* const [{ settings }, updateNotificationSettings] = useNotificationSettings()
|
|
1569
1454
|
*/
|
|
1570
|
-
declare function
|
|
1455
|
+
declare function useNotificationSettingsSuspense(): [UserNotificationSettingsAsyncResult, (settings: PartialUserNotificationSettings) => void];
|
|
1571
1456
|
/**
|
|
1572
|
-
* Returns a function that updates the user's
|
|
1457
|
+
* Returns a function that updates the user's notification
|
|
1573
1458
|
* settings for a project.
|
|
1574
1459
|
*
|
|
1575
1460
|
* @example
|
|
1576
|
-
* const
|
|
1461
|
+
* const updateNotificationSettings = useUpdateNotificationSettings()
|
|
1577
1462
|
*/
|
|
1578
|
-
declare function
|
|
1463
|
+
declare function useUpdateNotificationSettings(): (settings: PartialUserNotificationSettings) => void;
|
|
1579
1464
|
/**
|
|
1580
1465
|
* Returns room info from a given room ID.
|
|
1581
1466
|
*
|
|
@@ -1664,6 +1549,17 @@ declare const _useUserThreadsSuspense_experimental: TypedBundle$1["suspense"]["u
|
|
|
1664
1549
|
* const syncStatus = useSyncStatus({ smooth: true });
|
|
1665
1550
|
*/
|
|
1666
1551
|
declare function useSyncStatus(options?: UseSyncStatusOptions): SyncStatus;
|
|
1552
|
+
/**
|
|
1553
|
+
* useErrorListener is a React hook that allows you to respond to any
|
|
1554
|
+
* Liveblocks error, for example room connection errors, errors
|
|
1555
|
+
* creating/editing/deleting threads, etc.
|
|
1556
|
+
*
|
|
1557
|
+
* @example
|
|
1558
|
+
* useErrorListener(err => {
|
|
1559
|
+
* console.error(err);
|
|
1560
|
+
* })
|
|
1561
|
+
*/
|
|
1562
|
+
declare function useErrorListener(callback: (err: LiveblocksError) => void): void;
|
|
1667
1563
|
|
|
1668
1564
|
/**
|
|
1669
1565
|
* Returns the current connection status for the Room, and triggers
|
|
@@ -1721,16 +1617,6 @@ declare function useBatch<T>(): (callback: () => T) => T;
|
|
|
1721
1617
|
* })
|
|
1722
1618
|
*/
|
|
1723
1619
|
declare function useLostConnectionListener(callback: (event: LostConnectionEvent) => void): void;
|
|
1724
|
-
/**
|
|
1725
|
-
* useErrorListener is a React hook that allows you to respond to potential room
|
|
1726
|
-
* connection errors.
|
|
1727
|
-
*
|
|
1728
|
-
* @example
|
|
1729
|
-
* useErrorListener(er => {
|
|
1730
|
-
* console.error(er);
|
|
1731
|
-
* })
|
|
1732
|
-
*/
|
|
1733
|
-
declare function useErrorListener(callback: (err: LiveblocksError) => void): void;
|
|
1734
1620
|
/**
|
|
1735
1621
|
* Returns the room.history
|
|
1736
1622
|
*/
|
|
@@ -1768,10 +1654,6 @@ declare function useCanRedo(): boolean;
|
|
|
1768
1654
|
* // [2, 4, 7]
|
|
1769
1655
|
*/
|
|
1770
1656
|
declare function useOthersConnectionIds(): readonly number[];
|
|
1771
|
-
/**
|
|
1772
|
-
* @private Internal API, do not rely on it.
|
|
1773
|
-
*/
|
|
1774
|
-
declare function useCommentsErrorListener<M extends BaseMetadata>(callback: (error: CommentsError<M>) => void): void;
|
|
1775
1657
|
/**
|
|
1776
1658
|
* @private
|
|
1777
1659
|
*/
|
|
@@ -2415,4 +2297,4 @@ declare const _useStorageRoot: TypedBundle["useStorageRoot"];
|
|
|
2415
2297
|
*/
|
|
2416
2298
|
declare const _useUpdateMyPresence: TypedBundle["useUpdateMyPresence"];
|
|
2417
2299
|
|
|
2418
|
-
export {
|
|
2300
|
+
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 };
|