@liveblocks/react 3.8.0-tiptap1 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_private.cjs +7 -7
- package/dist/_private.d.cts +2 -2
- package/dist/_private.d.ts +2 -2
- package/dist/_private.js +1 -1
- package/dist/{chunk-OKYUUXNY.js → chunk-2R44HQCN.js} +180 -39
- package/dist/chunk-2R44HQCN.js.map +1 -0
- package/dist/{chunk-ZU7C6DJE.cjs → chunk-6MZ5AS3V.cjs} +2 -2
- package/dist/{chunk-ZU7C6DJE.cjs.map → chunk-6MZ5AS3V.cjs.map} +1 -1
- package/dist/{chunk-RCYYHORY.js → chunk-C65QJNZB.js} +2 -2
- package/dist/{chunk-4GCS3365.cjs → chunk-IQBSX6NS.cjs} +204 -63
- package/dist/chunk-IQBSX6NS.cjs.map +1 -0
- package/dist/index.cjs +6 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/{room-BtcL74U0.d.cts → room-C97RX2dB.d.cts} +102 -2
- package/dist/{room-BtcL74U0.d.ts → room-C97RX2dB.d.ts} +102 -2
- package/dist/suspense.cjs +6 -4
- package/dist/suspense.cjs.map +1 -1
- package/dist/suspense.d.cts +1 -1
- package/dist/suspense.d.ts +1 -1
- package/dist/suspense.js +4 -2
- package/dist/suspense.js.map +1 -1
- package/package.json +3 -3
- package/dist/chunk-4GCS3365.cjs.map +0 -1
- package/dist/chunk-OKYUUXNY.js.map +0 -1
- /package/dist/{chunk-RCYYHORY.js.map → chunk-C65QJNZB.js.map} +0 -0
|
@@ -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 = "3.8.0
|
|
3
|
+
var PKG_VERSION = "3.8.0";
|
|
4
4
|
var PKG_FORMAT = "cjs";
|
|
5
5
|
|
|
6
6
|
// src/ClientSideSuspense.tsx
|
|
@@ -20,4 +20,4 @@ function ClientSideSuspense(props) {
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
exports.PKG_NAME = PKG_NAME; exports.PKG_VERSION = PKG_VERSION; exports.PKG_FORMAT = PKG_FORMAT; exports.ClientSideSuspense = ClientSideSuspense;
|
|
23
|
-
//# sourceMappingURL=chunk-
|
|
23
|
+
//# sourceMappingURL=chunk-6MZ5AS3V.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/liveblocks/liveblocks/packages/liveblocks-react/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/liveblocks/liveblocks/packages/liveblocks-react/dist/chunk-6MZ5AS3V.cjs","../src/version.ts","../src/ClientSideSuspense.tsx"],"names":[],"mappings":"AAAA;ACGO,IAAM,SAAA,EAAW,mBAAA;AACjB,IAAM,YAAA,EAAiD,OAAA;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-6MZ5AS3V.cjs","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"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/version.ts
|
|
2
2
|
var PKG_NAME = "@liveblocks/react";
|
|
3
|
-
var PKG_VERSION = "3.8.0
|
|
3
|
+
var PKG_VERSION = "3.8.0";
|
|
4
4
|
var PKG_FORMAT = "esm";
|
|
5
5
|
|
|
6
6
|
// src/ClientSideSuspense.tsx
|
|
@@ -20,4 +20,4 @@ export {
|
|
|
20
20
|
PKG_FORMAT,
|
|
21
21
|
ClientSideSuspense
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=chunk-
|
|
23
|
+
//# sourceMappingURL=chunk-C65QJNZB.js.map
|
|
@@ -186,6 +186,7 @@ function useSignal(signal, selector, isEqual) {
|
|
|
186
186
|
|
|
187
187
|
|
|
188
188
|
|
|
189
|
+
|
|
189
190
|
// src/config.ts
|
|
190
191
|
var SECONDS = 1e3;
|
|
191
192
|
var MINUTES = 60 * SECONDS;
|
|
@@ -216,21 +217,6 @@ function ASYNC_OK(fieldOrData, data) {
|
|
|
216
217
|
}
|
|
217
218
|
}
|
|
218
219
|
|
|
219
|
-
// src/lib/itertools.ts
|
|
220
|
-
function find(it, predicate) {
|
|
221
|
-
for (const item of it) {
|
|
222
|
-
if (predicate(item)) return item;
|
|
223
|
-
}
|
|
224
|
-
return void 0;
|
|
225
|
-
}
|
|
226
|
-
function count(it, predicate) {
|
|
227
|
-
let total = 0;
|
|
228
|
-
for (const item of it) {
|
|
229
|
-
if (predicate(item)) total++;
|
|
230
|
-
}
|
|
231
|
-
return total;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
220
|
// src/lib/ssr.ts
|
|
235
221
|
function ensureNotServerSide() {
|
|
236
222
|
if (typeof window === "undefined") {
|
|
@@ -324,6 +310,14 @@ function autobind(self) {
|
|
|
324
310
|
} while ((obj = Reflect.getPrototypeOf(obj)) && obj !== Object.prototype);
|
|
325
311
|
}
|
|
326
312
|
|
|
313
|
+
// src/lib/itertools.ts
|
|
314
|
+
function find(it, predicate) {
|
|
315
|
+
for (const item of it) {
|
|
316
|
+
if (predicate(item)) return item;
|
|
317
|
+
}
|
|
318
|
+
return void 0;
|
|
319
|
+
}
|
|
320
|
+
|
|
327
321
|
// src/lib/querying.ts
|
|
328
322
|
|
|
329
323
|
function makeThreadsFilter(query) {
|
|
@@ -347,10 +341,15 @@ function matchesOperator(value, op) {
|
|
|
347
341
|
return value === void 0;
|
|
348
342
|
} else if (_core.isStartsWithOperator.call(void 0, op)) {
|
|
349
343
|
return typeof value === "string" && value.startsWith(op.startsWith);
|
|
344
|
+
} else if (_core.isNumberOperator.call(void 0, op)) {
|
|
345
|
+
return typeof value === "number" && matchesNumberOperator(value, op);
|
|
350
346
|
} else {
|
|
351
347
|
return value === op;
|
|
352
348
|
}
|
|
353
349
|
}
|
|
350
|
+
function matchesNumberOperator(value, op) {
|
|
351
|
+
return (op.lt === void 0 || value < op.lt) && (op.gt === void 0 || value > op.gt) && (op.lte === void 0 || value <= op.lte) && (op.gte === void 0 || value >= op.gte);
|
|
352
|
+
}
|
|
354
353
|
function makeInboxNotificationsFilter(query) {
|
|
355
354
|
return (inboxNotification) => matchesInboxNotificationsQuery(inboxNotification, query);
|
|
356
355
|
}
|
|
@@ -722,6 +721,21 @@ function createStore_forNotifications() {
|
|
|
722
721
|
upsert
|
|
723
722
|
};
|
|
724
723
|
}
|
|
724
|
+
function createStore_forUnreadNotificationsCount() {
|
|
725
|
+
const baseSignal = new (0, _core.MutableSignal)(
|
|
726
|
+
/* @__PURE__ */ new Map()
|
|
727
|
+
);
|
|
728
|
+
function update(queryKey, count) {
|
|
729
|
+
baseSignal.mutate((lut) => {
|
|
730
|
+
lut.set(queryKey, count);
|
|
731
|
+
});
|
|
732
|
+
}
|
|
733
|
+
return {
|
|
734
|
+
signal: _core.DerivedSignal.from(baseSignal, (c) => Object.fromEntries(c)),
|
|
735
|
+
// Mutations
|
|
736
|
+
update
|
|
737
|
+
};
|
|
738
|
+
}
|
|
725
739
|
function createStore_forSubscriptions(updates, threads) {
|
|
726
740
|
const baseSignal = new (0, _core.MutableSignal)(/* @__PURE__ */ new Map());
|
|
727
741
|
function applyDelta(newSubscriptions, deletedSubscriptions) {
|
|
@@ -914,6 +928,7 @@ var UmbrellaStore = class {
|
|
|
914
928
|
|
|
915
929
|
|
|
916
930
|
|
|
931
|
+
|
|
917
932
|
//
|
|
918
933
|
// Output signals.
|
|
919
934
|
// (Readonly, clean, consistent. With optimistic updates applied.)
|
|
@@ -958,6 +973,7 @@ var UmbrellaStore = class {
|
|
|
958
973
|
this.optimisticUpdates.signal
|
|
959
974
|
);
|
|
960
975
|
this.historyVersions = createStore_forHistoryVersions();
|
|
976
|
+
this.unreadNotificationsCount = createStore_forUnreadNotificationsCount();
|
|
961
977
|
const threadifications = _core.DerivedSignal.from(
|
|
962
978
|
this.threads.signal,
|
|
963
979
|
this.notifications.signal,
|
|
@@ -1114,6 +1130,35 @@ var UmbrellaStore = class {
|
|
|
1114
1130
|
};
|
|
1115
1131
|
}
|
|
1116
1132
|
);
|
|
1133
|
+
const unreadNotificationsCount = new (0, _core.DefaultMap)(
|
|
1134
|
+
(queryKey) => {
|
|
1135
|
+
const query = JSON.parse(queryKey);
|
|
1136
|
+
const resource = new SinglePageResource(async () => {
|
|
1137
|
+
const result = await this.#client.getUnreadInboxNotificationsCount({
|
|
1138
|
+
query
|
|
1139
|
+
});
|
|
1140
|
+
this.unreadNotificationsCount.update(queryKey, result);
|
|
1141
|
+
});
|
|
1142
|
+
const signal = _core.DerivedSignal.from(
|
|
1143
|
+
() => {
|
|
1144
|
+
const result = resource.get();
|
|
1145
|
+
if (result.isLoading || result.error) {
|
|
1146
|
+
return result;
|
|
1147
|
+
} else {
|
|
1148
|
+
return ASYNC_OK(
|
|
1149
|
+
"count",
|
|
1150
|
+
_core.nn.call(void 0, this.unreadNotificationsCount.signal.get()[queryKey])
|
|
1151
|
+
);
|
|
1152
|
+
}
|
|
1153
|
+
},
|
|
1154
|
+
_core.shallow
|
|
1155
|
+
);
|
|
1156
|
+
return {
|
|
1157
|
+
signal,
|
|
1158
|
+
waitUntilLoaded: resource.waitUntilLoaded
|
|
1159
|
+
};
|
|
1160
|
+
}
|
|
1161
|
+
);
|
|
1117
1162
|
const roomSubscriptionSettingsByRoomId = new (0, _core.DefaultMap)(
|
|
1118
1163
|
(roomId) => {
|
|
1119
1164
|
const resource = new SinglePageResource(async () => {
|
|
@@ -1262,6 +1307,7 @@ var UmbrellaStore = class {
|
|
|
1262
1307
|
loadingUserThreads,
|
|
1263
1308
|
notifications,
|
|
1264
1309
|
loadingNotifications,
|
|
1310
|
+
unreadNotificationsCount,
|
|
1265
1311
|
roomSubscriptionSettingsByRoomId,
|
|
1266
1312
|
versionsByRoomId,
|
|
1267
1313
|
notificationSettings,
|
|
@@ -1469,6 +1515,14 @@ var UmbrellaStore = class {
|
|
|
1469
1515
|
result.subscriptions.deleted
|
|
1470
1516
|
);
|
|
1471
1517
|
}
|
|
1518
|
+
async fetchUnreadNotificationsCount(queryKey, signal) {
|
|
1519
|
+
const query = JSON.parse(queryKey);
|
|
1520
|
+
const result = await this.#client.getUnreadInboxNotificationsCount({
|
|
1521
|
+
query,
|
|
1522
|
+
signal
|
|
1523
|
+
});
|
|
1524
|
+
this.unreadNotificationsCount.update(queryKey, result);
|
|
1525
|
+
}
|
|
1472
1526
|
async fetchRoomThreadsDeltaUpdate(roomId, signal) {
|
|
1473
1527
|
const lastRequestedAt = this.#roomThreadsLastRequestedAtByRoom.get(roomId);
|
|
1474
1528
|
if (lastRequestedAt === void 0) {
|
|
@@ -1983,16 +2037,10 @@ var _umbrellaStores = /* @__PURE__ */ new WeakMap();
|
|
|
1983
2037
|
var _extras = /* @__PURE__ */ new WeakMap();
|
|
1984
2038
|
var _bundles = /* @__PURE__ */ new WeakMap();
|
|
1985
2039
|
function selectorFor_useUnreadInboxNotificationsCount(result) {
|
|
1986
|
-
if (!result.
|
|
2040
|
+
if (!("count" in result) || result.count === void 0) {
|
|
1987
2041
|
return result;
|
|
1988
2042
|
}
|
|
1989
|
-
return ASYNC_OK(
|
|
1990
|
-
"count",
|
|
1991
|
-
count(
|
|
1992
|
-
result.inboxNotifications,
|
|
1993
|
-
(n) => n.readAt === null || n.readAt < n.notifiedAt
|
|
1994
|
-
)
|
|
1995
|
-
);
|
|
2043
|
+
return ASYNC_OK("count", result.count);
|
|
1996
2044
|
}
|
|
1997
2045
|
function selectorFor_useUser(state, userId) {
|
|
1998
2046
|
if (state === void 0 || _optionalChain([state, 'optionalAccess', _10 => _10.isLoading])) {
|
|
@@ -2091,6 +2139,22 @@ function makeLiveblocksExtrasForClient(client) {
|
|
|
2091
2139
|
config.NOTIFICATIONS_POLL_INTERVAL,
|
|
2092
2140
|
{ maxStaleTimeMs: config.NOTIFICATIONS_MAX_STALE_TIME }
|
|
2093
2141
|
);
|
|
2142
|
+
const unreadNotificationsCountPollersByQueryKey = new (0, _core.DefaultMap)(
|
|
2143
|
+
(queryKey) => _core.makePoller.call(void 0,
|
|
2144
|
+
async (signal) => {
|
|
2145
|
+
try {
|
|
2146
|
+
return await store.fetchUnreadNotificationsCount(queryKey, signal);
|
|
2147
|
+
} catch (err) {
|
|
2148
|
+
_core.console.warn(
|
|
2149
|
+
`Polling unread inbox notifications countfailed: ${String(err)}`
|
|
2150
|
+
);
|
|
2151
|
+
throw err;
|
|
2152
|
+
}
|
|
2153
|
+
},
|
|
2154
|
+
config.NOTIFICATIONS_POLL_INTERVAL,
|
|
2155
|
+
{ maxStaleTimeMs: config.NOTIFICATIONS_MAX_STALE_TIME }
|
|
2156
|
+
)
|
|
2157
|
+
);
|
|
2094
2158
|
const userThreadsPoller = _core.makePoller.call(void 0,
|
|
2095
2159
|
async (signal) => {
|
|
2096
2160
|
try {
|
|
@@ -2121,7 +2185,8 @@ function makeLiveblocksExtrasForClient(client) {
|
|
|
2121
2185
|
store,
|
|
2122
2186
|
notificationsPoller,
|
|
2123
2187
|
userThreadsPoller,
|
|
2124
|
-
notificationSettingsPoller
|
|
2188
|
+
notificationSettingsPoller,
|
|
2189
|
+
unreadNotificationsCountPollersByQueryKey
|
|
2125
2190
|
};
|
|
2126
2191
|
}
|
|
2127
2192
|
function makeLiveblocksContextBundle(client) {
|
|
@@ -2151,6 +2216,7 @@ function makeLiveblocksContextBundle(client) {
|
|
|
2151
2216
|
useAiChats,
|
|
2152
2217
|
useAiChat,
|
|
2153
2218
|
useAiChatMessages,
|
|
2219
|
+
useAiChatStatus,
|
|
2154
2220
|
useCreateAiChat,
|
|
2155
2221
|
useDeleteAiChat,
|
|
2156
2222
|
useSendAiMessage,
|
|
@@ -2170,6 +2236,7 @@ function makeLiveblocksContextBundle(client) {
|
|
|
2170
2236
|
useAiChats: useAiChatsSuspense,
|
|
2171
2237
|
useAiChat: useAiChatSuspense,
|
|
2172
2238
|
useAiChatMessages: useAiChatMessagesSuspense,
|
|
2239
|
+
useAiChatStatus,
|
|
2173
2240
|
useCreateAiChat,
|
|
2174
2241
|
useDeleteAiChat,
|
|
2175
2242
|
useSendAiMessage,
|
|
@@ -2223,19 +2290,39 @@ function useInboxNotificationsSuspense_withClient(client, options) {
|
|
|
2223
2290
|
return result;
|
|
2224
2291
|
}
|
|
2225
2292
|
function useUnreadInboxNotificationsCount_withClient(client, options) {
|
|
2226
|
-
|
|
2227
|
-
|
|
2293
|
+
const { store, unreadNotificationsCountPollersByQueryKey: pollers } = getLiveblocksExtrasForClient(client);
|
|
2294
|
+
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess', _15 => _15.query]));
|
|
2295
|
+
const poller = pollers.getOrCreate(queryKey);
|
|
2296
|
+
_react.useEffect.call(void 0,
|
|
2297
|
+
() => void store.outputs.unreadNotificationsCount.getOrCreate(queryKey).waitUntilLoaded()
|
|
2298
|
+
// NOTE: Deliberately *not* using a dependency array here!
|
|
2299
|
+
//
|
|
2300
|
+
// It is important to call waitUntil on *every* render.
|
|
2301
|
+
// This is harmless though, on most renders, except:
|
|
2302
|
+
// 1. The very first render, in which case we'll want to trigger the initial page fetch.
|
|
2303
|
+
// 2. All other subsequent renders now "just" return the same promise (a quick operation).
|
|
2304
|
+
// 3. If ever the promise would fail, then after 5 seconds it would reset, and on the very
|
|
2305
|
+
// *next* render after that, a *new* fetch/promise will get created.
|
|
2306
|
+
);
|
|
2307
|
+
_react.useEffect.call(void 0, () => {
|
|
2308
|
+
poller.inc();
|
|
2309
|
+
poller.pollNowIfStale();
|
|
2310
|
+
return () => {
|
|
2311
|
+
poller.dec();
|
|
2312
|
+
};
|
|
2313
|
+
}, [poller]);
|
|
2314
|
+
return useSignal(
|
|
2315
|
+
store.outputs.unreadNotificationsCount.getOrCreate(queryKey).signal,
|
|
2228
2316
|
selectorFor_useUnreadInboxNotificationsCount,
|
|
2229
|
-
_core.shallow
|
|
2230
|
-
options
|
|
2317
|
+
_core.shallow
|
|
2231
2318
|
);
|
|
2232
2319
|
}
|
|
2233
2320
|
function useUnreadInboxNotificationsCountSuspense_withClient(client, options) {
|
|
2234
2321
|
ensureNotServerSide();
|
|
2235
2322
|
const store = getLiveblocksExtrasForClient(client).store;
|
|
2236
|
-
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess',
|
|
2323
|
+
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess', _16 => _16.query]));
|
|
2237
2324
|
use(
|
|
2238
|
-
store.outputs.
|
|
2325
|
+
store.outputs.unreadNotificationsCount.getOrCreate(queryKey).waitUntilLoaded()
|
|
2239
2326
|
);
|
|
2240
2327
|
const result = useUnreadInboxNotificationsCount_withClient(client, options);
|
|
2241
2328
|
_core.assert.call(void 0, !result.isLoading, "Did not expect loading");
|
|
@@ -2245,7 +2332,7 @@ function useUnreadInboxNotificationsCountSuspense_withClient(client, options) {
|
|
|
2245
2332
|
function useMarkInboxNotificationAsRead_withClient(client) {
|
|
2246
2333
|
return _react.useCallback.call(void 0,
|
|
2247
2334
|
(inboxNotificationId) => {
|
|
2248
|
-
const { store } = getLiveblocksExtrasForClient(client);
|
|
2335
|
+
const { store, unreadNotificationsCountPollersByQueryKey } = getLiveblocksExtrasForClient(client);
|
|
2249
2336
|
const readAt = /* @__PURE__ */ new Date();
|
|
2250
2337
|
const optimisticId = store.optimisticUpdates.add({
|
|
2251
2338
|
type: "mark-inbox-notification-as-read",
|
|
@@ -2259,6 +2346,10 @@ function useMarkInboxNotificationAsRead_withClient(client) {
|
|
|
2259
2346
|
readAt,
|
|
2260
2347
|
optimisticId
|
|
2261
2348
|
);
|
|
2349
|
+
for (const poller of unreadNotificationsCountPollersByQueryKey.values()) {
|
|
2350
|
+
poller.markAsStale();
|
|
2351
|
+
poller.pollNowIfStale();
|
|
2352
|
+
}
|
|
2262
2353
|
},
|
|
2263
2354
|
(err) => {
|
|
2264
2355
|
store.optimisticUpdates.remove(optimisticId);
|
|
@@ -2277,7 +2368,7 @@ function useMarkInboxNotificationAsRead_withClient(client) {
|
|
|
2277
2368
|
}
|
|
2278
2369
|
function useMarkAllInboxNotificationsAsRead_withClient(client) {
|
|
2279
2370
|
return _react.useCallback.call(void 0, () => {
|
|
2280
|
-
const { store } = getLiveblocksExtrasForClient(client);
|
|
2371
|
+
const { store, unreadNotificationsCountPollersByQueryKey } = getLiveblocksExtrasForClient(client);
|
|
2281
2372
|
const readAt = /* @__PURE__ */ new Date();
|
|
2282
2373
|
const optimisticId = store.optimisticUpdates.add({
|
|
2283
2374
|
type: "mark-all-inbox-notifications-as-read",
|
|
@@ -2286,6 +2377,10 @@ function useMarkAllInboxNotificationsAsRead_withClient(client) {
|
|
|
2286
2377
|
client.markAllInboxNotificationsAsRead().then(
|
|
2287
2378
|
() => {
|
|
2288
2379
|
store.markAllInboxNotificationsRead(optimisticId, readAt);
|
|
2380
|
+
for (const poller of unreadNotificationsCountPollersByQueryKey.values()) {
|
|
2381
|
+
poller.markAsStale();
|
|
2382
|
+
poller.pollNowIfStale();
|
|
2383
|
+
}
|
|
2289
2384
|
},
|
|
2290
2385
|
(err) => {
|
|
2291
2386
|
store.optimisticUpdates.remove(optimisticId);
|
|
@@ -2301,7 +2396,7 @@ function useMarkAllInboxNotificationsAsRead_withClient(client) {
|
|
|
2301
2396
|
function useDeleteInboxNotification_withClient(client) {
|
|
2302
2397
|
return _react.useCallback.call(void 0,
|
|
2303
2398
|
(inboxNotificationId) => {
|
|
2304
|
-
const { store } = getLiveblocksExtrasForClient(client);
|
|
2399
|
+
const { store, unreadNotificationsCountPollersByQueryKey } = getLiveblocksExtrasForClient(client);
|
|
2305
2400
|
const deletedAt = /* @__PURE__ */ new Date();
|
|
2306
2401
|
const optimisticId = store.optimisticUpdates.add({
|
|
2307
2402
|
type: "delete-inbox-notification",
|
|
@@ -2311,6 +2406,10 @@ function useDeleteInboxNotification_withClient(client) {
|
|
|
2311
2406
|
client.deleteInboxNotification(inboxNotificationId).then(
|
|
2312
2407
|
() => {
|
|
2313
2408
|
store.deleteInboxNotification(inboxNotificationId, optimisticId);
|
|
2409
|
+
for (const poller of unreadNotificationsCountPollersByQueryKey.values()) {
|
|
2410
|
+
poller.markAsStale();
|
|
2411
|
+
poller.pollNowIfStale();
|
|
2412
|
+
}
|
|
2314
2413
|
},
|
|
2315
2414
|
(err) => {
|
|
2316
2415
|
store.optimisticUpdates.remove(optimisticId);
|
|
@@ -2326,7 +2425,7 @@ function useDeleteInboxNotification_withClient(client) {
|
|
|
2326
2425
|
}
|
|
2327
2426
|
function useDeleteAllInboxNotifications_withClient(client) {
|
|
2328
2427
|
return _react.useCallback.call(void 0, () => {
|
|
2329
|
-
const { store } = getLiveblocksExtrasForClient(client);
|
|
2428
|
+
const { store, unreadNotificationsCountPollersByQueryKey } = getLiveblocksExtrasForClient(client);
|
|
2330
2429
|
const deletedAt = /* @__PURE__ */ new Date();
|
|
2331
2430
|
const optimisticId = store.optimisticUpdates.add({
|
|
2332
2431
|
type: "delete-all-inbox-notifications",
|
|
@@ -2335,6 +2434,10 @@ function useDeleteAllInboxNotifications_withClient(client) {
|
|
|
2335
2434
|
client.deleteAllInboxNotifications().then(
|
|
2336
2435
|
() => {
|
|
2337
2436
|
store.deleteAllInboxNotifications(optimisticId);
|
|
2437
|
+
for (const poller of unreadNotificationsCountPollersByQueryKey.values()) {
|
|
2438
|
+
poller.markAsStale();
|
|
2439
|
+
poller.pollNowIfStale();
|
|
2440
|
+
}
|
|
2338
2441
|
},
|
|
2339
2442
|
(err) => {
|
|
2340
2443
|
store.optimisticUpdates.remove(optimisticId);
|
|
@@ -2388,7 +2491,7 @@ function useUpdateNotificationSettings_withClient(client) {
|
|
|
2388
2491
|
store.optimisticUpdates.remove(optimisticUpdateId);
|
|
2389
2492
|
if (err instanceof _core.HttpError) {
|
|
2390
2493
|
if (err.status === 422) {
|
|
2391
|
-
const msg = [_optionalChain([err, 'access',
|
|
2494
|
+
const msg = [_optionalChain([err, 'access', _17 => _17.details, 'optionalAccess', _18 => _18.error]), _optionalChain([err, 'access', _19 => _19.details, 'optionalAccess', _20 => _20.reason])].filter(Boolean).join("\n");
|
|
2392
2495
|
_core.console.error(msg);
|
|
2393
2496
|
}
|
|
2394
2497
|
client[_core.kInternal].emitError(
|
|
@@ -2623,7 +2726,7 @@ function useGroupInfoSuspense_withClient(client, groupId) {
|
|
|
2623
2726
|
function useAiChats(options) {
|
|
2624
2727
|
const client = useClient();
|
|
2625
2728
|
const store = getUmbrellaStoreForClient(client);
|
|
2626
|
-
const queryKey = makeAiChatsQueryKey(_optionalChain([options, 'optionalAccess',
|
|
2729
|
+
const queryKey = makeAiChatsQueryKey(_optionalChain([options, 'optionalAccess', _21 => _21.query]));
|
|
2627
2730
|
useEnsureAiConnection(client);
|
|
2628
2731
|
_react.useEffect.call(void 0,
|
|
2629
2732
|
() => void store.outputs.aiChats.getOrCreate(queryKey).waitUntilLoaded()
|
|
@@ -2647,7 +2750,7 @@ function useAiChatsSuspense(options) {
|
|
|
2647
2750
|
const client = useClient();
|
|
2648
2751
|
const store = getUmbrellaStoreForClient(client);
|
|
2649
2752
|
useEnsureAiConnection(client);
|
|
2650
|
-
const queryKey = makeAiChatsQueryKey(_optionalChain([options, 'optionalAccess',
|
|
2753
|
+
const queryKey = makeAiChatsQueryKey(_optionalChain([options, 'optionalAccess', _22 => _22.query]));
|
|
2651
2754
|
use(store.outputs.aiChats.getOrCreate(queryKey).waitUntilLoaded());
|
|
2652
2755
|
const result = useAiChats(options);
|
|
2653
2756
|
_core.assert.call(void 0, !result.error, "Did not expect error");
|
|
@@ -2659,7 +2762,7 @@ function useAiChatMessages(chatId, options) {
|
|
|
2659
2762
|
const store = getUmbrellaStoreForClient(client);
|
|
2660
2763
|
useEnsureAiConnection(client);
|
|
2661
2764
|
_react.useEffect.call(void 0,
|
|
2662
|
-
() => void store.outputs.messagesByChatId.getOrCreate(chatId).getOrCreate(_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2765
|
+
() => void store.outputs.messagesByChatId.getOrCreate(chatId).getOrCreate(_nullishCoalesce(_optionalChain([options, 'optionalAccess', _23 => _23.branchId]), () => ( null))).waitUntilLoaded()
|
|
2663
2766
|
// NOTE: Deliberately *not* using a dependency array here!
|
|
2664
2767
|
//
|
|
2665
2768
|
// It is important to call waitUntil on *every* render.
|
|
@@ -2670,7 +2773,7 @@ function useAiChatMessages(chatId, options) {
|
|
|
2670
2773
|
// *next* render after that, a *new* fetch/promise will get created.
|
|
2671
2774
|
);
|
|
2672
2775
|
return useSignal(
|
|
2673
|
-
store.outputs.messagesByChatId.getOrCreate(chatId).getOrCreate(_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2776
|
+
store.outputs.messagesByChatId.getOrCreate(chatId).getOrCreate(_nullishCoalesce(_optionalChain([options, 'optionalAccess', _24 => _24.branchId]), () => ( null))).signal
|
|
2674
2777
|
);
|
|
2675
2778
|
}
|
|
2676
2779
|
function useAiChatMessagesSuspense(chatId, options) {
|
|
@@ -2679,7 +2782,7 @@ function useAiChatMessagesSuspense(chatId, options) {
|
|
|
2679
2782
|
const store = getUmbrellaStoreForClient(client);
|
|
2680
2783
|
useEnsureAiConnection(client);
|
|
2681
2784
|
use(
|
|
2682
|
-
store.outputs.messagesByChatId.getOrCreate(chatId).getOrCreate(_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2785
|
+
store.outputs.messagesByChatId.getOrCreate(chatId).getOrCreate(_nullishCoalesce(_optionalChain([options, 'optionalAccess', _25 => _25.branchId]), () => ( null))).waitUntilLoaded()
|
|
2683
2786
|
);
|
|
2684
2787
|
const result = useAiChatMessages(chatId, options);
|
|
2685
2788
|
_core.assert.call(void 0, !result.error, "Did not expect error");
|
|
@@ -2746,6 +2849,43 @@ function useDeleteAiChat() {
|
|
|
2746
2849
|
[client]
|
|
2747
2850
|
);
|
|
2748
2851
|
}
|
|
2852
|
+
var LOADING = Object.freeze({ status: "loading" });
|
|
2853
|
+
var IDLE = Object.freeze({ status: "idle" });
|
|
2854
|
+
function useAiChatStatus(chatId, branchId) {
|
|
2855
|
+
const client = useClient();
|
|
2856
|
+
const store = getUmbrellaStoreForClient(client);
|
|
2857
|
+
useEnsureAiConnection(client);
|
|
2858
|
+
_react.useEffect.call(void 0,
|
|
2859
|
+
() => void store.outputs.messagesByChatId.getOrCreate(chatId).getOrCreate(_nullishCoalesce(branchId, () => ( null))).waitUntilLoaded()
|
|
2860
|
+
);
|
|
2861
|
+
return useSignal(
|
|
2862
|
+
// Signal
|
|
2863
|
+
store.outputs.messagesByChatId.getOrCreate(chatId).getOrCreate(_nullishCoalesce(branchId, () => ( null))).signal,
|
|
2864
|
+
// Selector
|
|
2865
|
+
(result) => {
|
|
2866
|
+
if (result.isLoading) return LOADING;
|
|
2867
|
+
if (result.error) return IDLE;
|
|
2868
|
+
const messages = result.messages;
|
|
2869
|
+
const lastMessage = messages[messages.length - 1];
|
|
2870
|
+
if (_optionalChain([lastMessage, 'optionalAccess', _26 => _26.role]) !== "assistant") return IDLE;
|
|
2871
|
+
if (lastMessage.status !== "generating" && lastMessage.status !== "awaiting-tool")
|
|
2872
|
+
return IDLE;
|
|
2873
|
+
const contentSoFar = lastMessage.contentSoFar;
|
|
2874
|
+
const lastPart = contentSoFar[contentSoFar.length - 1];
|
|
2875
|
+
if (_optionalChain([lastPart, 'optionalAccess', _27 => _27.type]) === "tool-invocation") {
|
|
2876
|
+
return {
|
|
2877
|
+
status: "generating",
|
|
2878
|
+
partType: "tool-invocation",
|
|
2879
|
+
toolName: lastPart.name
|
|
2880
|
+
};
|
|
2881
|
+
} else {
|
|
2882
|
+
return { status: "generating", partType: _optionalChain([lastPart, 'optionalAccess', _28 => _28.type]) };
|
|
2883
|
+
}
|
|
2884
|
+
},
|
|
2885
|
+
// Consider { status: "generating", partType: "text" } and { status: "generating", partType: "text" } equal
|
|
2886
|
+
_core.shallow
|
|
2887
|
+
);
|
|
2888
|
+
}
|
|
2749
2889
|
function useSendAiMessage(chatId, options) {
|
|
2750
2890
|
const client = useClient();
|
|
2751
2891
|
return _react.useCallback.call(void 0,
|
|
@@ -2762,7 +2902,7 @@ function useSendAiMessage(chatId, options) {
|
|
|
2762
2902
|
"chatId must be provided to either `useSendAiMessage` or its returned function."
|
|
2763
2903
|
)));
|
|
2764
2904
|
const messages = client[_core.kInternal].ai.signals.getChatMessagesForBranch\u03A3(resolvedChatId).get();
|
|
2765
|
-
if (process.env.NODE_ENV !== "production" && !messageOptionsCopilotId && !_optionalChain([options, 'optionalAccess',
|
|
2905
|
+
if (process.env.NODE_ENV !== "production" && !messageOptionsCopilotId && !_optionalChain([options, 'optionalAccess', _29 => _29.copilotId])) {
|
|
2766
2906
|
_core.console.warn(
|
|
2767
2907
|
`No copilot ID was provided to useSendAiMessage when sending the message "${messageText.slice(
|
|
2768
2908
|
0,
|
|
@@ -2774,8 +2914,8 @@ To ensure the correct copilot ID is used, specify it either through the hook as
|
|
|
2774
2914
|
)}\u2026", copilotId: "co_xxx" })'`
|
|
2775
2915
|
);
|
|
2776
2916
|
}
|
|
2777
|
-
const resolvedCopilotId = _nullishCoalesce(_nullishCoalesce(messageOptionsCopilotId, () => ( _optionalChain([options, 'optionalAccess',
|
|
2778
|
-
const lastMessageId = _nullishCoalesce(_optionalChain([messages, 'access',
|
|
2917
|
+
const resolvedCopilotId = _nullishCoalesce(_nullishCoalesce(messageOptionsCopilotId, () => ( _optionalChain([options, 'optionalAccess', _30 => _30.copilotId]))), () => ( client[_core.kInternal].ai.getLastUsedCopilotId(resolvedChatId)));
|
|
2918
|
+
const lastMessageId = _nullishCoalesce(_optionalChain([messages, 'access', _31 => _31[messages.length - 1], 'optionalAccess', _32 => _32.id]), () => ( null));
|
|
2779
2919
|
const content = [{ type: "text", text: messageText }];
|
|
2780
2920
|
const newMessageId = client[_core.kInternal].ai[_core.kInternal].context.messagesStore.createOptimistically(
|
|
2781
2921
|
resolvedChatId,
|
|
@@ -2795,10 +2935,10 @@ To ensure the correct copilot ID is used, specify it either through the hook as
|
|
|
2795
2935
|
{ id: newMessageId, parentMessageId: lastMessageId, content },
|
|
2796
2936
|
targetMessageId,
|
|
2797
2937
|
{
|
|
2798
|
-
stream: _nullishCoalesce(messageOptions.stream, () => ( _optionalChain([options, 'optionalAccess',
|
|
2938
|
+
stream: _nullishCoalesce(messageOptions.stream, () => ( _optionalChain([options, 'optionalAccess', _33 => _33.stream]))),
|
|
2799
2939
|
copilotId: resolvedCopilotId,
|
|
2800
|
-
timeout: _nullishCoalesce(messageOptions.timeout, () => ( _optionalChain([options, 'optionalAccess',
|
|
2801
|
-
knowledge: _nullishCoalesce(messageOptions.knowledge, () => ( _optionalChain([options, 'optionalAccess',
|
|
2940
|
+
timeout: _nullishCoalesce(messageOptions.timeout, () => ( _optionalChain([options, 'optionalAccess', _34 => _34.timeout]))),
|
|
2941
|
+
knowledge: _nullishCoalesce(messageOptions.knowledge, () => ( _optionalChain([options, 'optionalAccess', _35 => _35.knowledge])))
|
|
2802
2942
|
}
|
|
2803
2943
|
);
|
|
2804
2944
|
return newMessage;
|
|
@@ -2806,10 +2946,10 @@ To ensure the correct copilot ID is used, specify it either through the hook as
|
|
|
2806
2946
|
[
|
|
2807
2947
|
client,
|
|
2808
2948
|
chatId,
|
|
2809
|
-
_optionalChain([options, 'optionalAccess',
|
|
2810
|
-
_optionalChain([options, 'optionalAccess',
|
|
2811
|
-
_optionalChain([options, 'optionalAccess',
|
|
2812
|
-
_optionalChain([options, 'optionalAccess',
|
|
2949
|
+
_optionalChain([options, 'optionalAccess', _36 => _36.copilotId]),
|
|
2950
|
+
_optionalChain([options, 'optionalAccess', _37 => _37.stream]),
|
|
2951
|
+
_optionalChain([options, 'optionalAccess', _38 => _38.timeout]),
|
|
2952
|
+
_optionalChain([options, 'optionalAccess', _39 => _39.knowledge])
|
|
2813
2953
|
]
|
|
2814
2954
|
);
|
|
2815
2955
|
}
|
|
@@ -2845,7 +2985,7 @@ function createSharedContext(client) {
|
|
|
2845
2985
|
}
|
|
2846
2986
|
function useEnsureNoLiveblocksProvider(options) {
|
|
2847
2987
|
const existing = useClientOrNull();
|
|
2848
|
-
if (!_optionalChain([options, 'optionalAccess',
|
|
2988
|
+
if (!_optionalChain([options, 'optionalAccess', _40 => _40.allowNesting]) && existing !== null) {
|
|
2849
2989
|
throw new Error(
|
|
2850
2990
|
"You cannot nest multiple LiveblocksProvider instances in the same React tree."
|
|
2851
2991
|
);
|
|
@@ -3009,7 +3149,7 @@ var _useAiChatSuspense = useAiChatSuspense;
|
|
|
3009
3149
|
var _useAiChatMessages = useAiChatMessages;
|
|
3010
3150
|
var _useAiChatMessagesSuspense = useAiChatMessagesSuspense;
|
|
3011
3151
|
function useSyncStatus_withClient(client, options) {
|
|
3012
|
-
const smooth = useInitial(_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3152
|
+
const smooth = useInitial(_nullishCoalesce(_optionalChain([options, 'optionalAccess', _41 => _41.smooth]), () => ( false)));
|
|
3013
3153
|
if (smooth) {
|
|
3014
3154
|
return useSyncStatusSmooth_withClient(client);
|
|
3015
3155
|
} else {
|
|
@@ -3188,8 +3328,8 @@ function makeRoomExtrasForClient(client) {
|
|
|
3188
3328
|
if (innerError.status === 403) {
|
|
3189
3329
|
const detailedMessage = [
|
|
3190
3330
|
innerError.message,
|
|
3191
|
-
_optionalChain([innerError, 'access',
|
|
3192
|
-
_optionalChain([innerError, 'access',
|
|
3331
|
+
_optionalChain([innerError, 'access', _42 => _42.details, 'optionalAccess', _43 => _43.suggestion]),
|
|
3332
|
+
_optionalChain([innerError, 'access', _44 => _44.details, 'optionalAccess', _45 => _45.docs])
|
|
3193
3333
|
].filter(Boolean).join("\n");
|
|
3194
3334
|
_core.console.error(detailedMessage);
|
|
3195
3335
|
}
|
|
@@ -3484,7 +3624,7 @@ function RoomProviderInner(props) {
|
|
|
3484
3624
|
}
|
|
3485
3625
|
function useRoom(options) {
|
|
3486
3626
|
const room = useRoomOrNull();
|
|
3487
|
-
if (room === null && !_optionalChain([options, 'optionalAccess',
|
|
3627
|
+
if (room === null && !_optionalChain([options, 'optionalAccess', _46 => _46.allowOutsideRoom])) {
|
|
3488
3628
|
throw new Error("RoomProvider is missing from the React tree.");
|
|
3489
3629
|
}
|
|
3490
3630
|
return room;
|
|
@@ -3834,7 +3974,7 @@ function useCreateRoomThread(roomId) {
|
|
|
3834
3974
|
thread: newThread,
|
|
3835
3975
|
roomId
|
|
3836
3976
|
});
|
|
3837
|
-
const attachmentIds = _optionalChain([attachments, 'optionalAccess',
|
|
3977
|
+
const attachmentIds = _optionalChain([attachments, 'optionalAccess', _47 => _47.map, 'call', _48 => _48((attachment) => attachment.id)]);
|
|
3838
3978
|
client[_core.kInternal].httpClient.createThread({
|
|
3839
3979
|
roomId,
|
|
3840
3980
|
threadId,
|
|
@@ -3874,7 +4014,7 @@ function useDeleteRoomThread(roomId) {
|
|
|
3874
4014
|
const { store, onMutationFailure } = getRoomExtrasForClient(client);
|
|
3875
4015
|
const userId = getCurrentUserId(client);
|
|
3876
4016
|
const existing = store.outputs.threads.get().get(threadId);
|
|
3877
|
-
if (_optionalChain([existing, 'optionalAccess',
|
|
4017
|
+
if (_optionalChain([existing, 'optionalAccess', _49 => _49.comments, 'optionalAccess', _50 => _50[0], 'optionalAccess', _51 => _51.userId]) !== userId) {
|
|
3878
4018
|
throw new Error("Only the thread creator can delete the thread");
|
|
3879
4019
|
}
|
|
3880
4020
|
const optimisticId = store.optimisticUpdates.add({
|
|
@@ -3962,7 +4102,7 @@ function useCreateRoomComment(roomId) {
|
|
|
3962
4102
|
type: "create-comment",
|
|
3963
4103
|
comment
|
|
3964
4104
|
});
|
|
3965
|
-
const attachmentIds = _optionalChain([attachments, 'optionalAccess',
|
|
4105
|
+
const attachmentIds = _optionalChain([attachments, 'optionalAccess', _52 => _52.map, 'call', _53 => _53((attachment) => attachment.id)]);
|
|
3966
4106
|
client[_core.kInternal].httpClient.createComment({ roomId, threadId, commentId, body, attachmentIds }).then(
|
|
3967
4107
|
(newComment) => {
|
|
3968
4108
|
store.createComment(newComment, optimisticId);
|
|
@@ -4018,7 +4158,7 @@ function useEditRoomComment(roomId) {
|
|
|
4018
4158
|
attachments: _nullishCoalesce(attachments, () => ( []))
|
|
4019
4159
|
}
|
|
4020
4160
|
});
|
|
4021
|
-
const attachmentIds = _optionalChain([attachments, 'optionalAccess',
|
|
4161
|
+
const attachmentIds = _optionalChain([attachments, 'optionalAccess', _54 => _54.map, 'call', _55 => _55((attachment) => attachment.id)]);
|
|
4022
4162
|
client[_core.kInternal].httpClient.editComment({ roomId, threadId, commentId, body, attachmentIds }).then(
|
|
4023
4163
|
(editedComment) => {
|
|
4024
4164
|
store.editComment(threadId, optimisticId, editedComment);
|
|
@@ -4359,7 +4499,7 @@ function useRoomThreadSubscription(roomId, threadId) {
|
|
|
4359
4499
|
}
|
|
4360
4500
|
return {
|
|
4361
4501
|
status: "subscribed",
|
|
4362
|
-
unreadSince: _nullishCoalesce(_optionalChain([notification, 'optionalAccess',
|
|
4502
|
+
unreadSince: _nullishCoalesce(_optionalChain([notification, 'optionalAccess', _56 => _56.readAt]), () => ( null)),
|
|
4363
4503
|
subscribe,
|
|
4364
4504
|
unsubscribe
|
|
4365
4505
|
};
|
|
@@ -4570,7 +4710,7 @@ function useThreadsSuspense(options = {}) {
|
|
|
4570
4710
|
return result;
|
|
4571
4711
|
}
|
|
4572
4712
|
function selectorFor_useAttachmentUrl(state) {
|
|
4573
|
-
if (state === void 0 || _optionalChain([state, 'optionalAccess',
|
|
4713
|
+
if (state === void 0 || _optionalChain([state, 'optionalAccess', _57 => _57.isLoading])) {
|
|
4574
4714
|
return _nullishCoalesce(state, () => ( { isLoading: true }));
|
|
4575
4715
|
}
|
|
4576
4716
|
if (state.error) {
|
|
@@ -4797,5 +4937,6 @@ var _useUpdateMyPresence = useUpdateMyPresence;
|
|
|
4797
4937
|
|
|
4798
4938
|
|
|
4799
4939
|
|
|
4800
|
-
|
|
4801
|
-
|
|
4940
|
+
|
|
4941
|
+
exports.ClientContext = ClientContext; exports.useClientOrNull = useClientOrNull; exports.useClient = useClient; exports.RoomContext = RoomContext; exports.useLatest = useLatest; exports.RegisterAiKnowledge = RegisterAiKnowledge; exports.RegisterAiTool = RegisterAiTool; exports.useSyncExternalStoreWithSelector = useSyncExternalStoreWithSelector; exports.useSignal = useSignal; exports.getUmbrellaStoreForClient = getUmbrellaStoreForClient; exports.useCreateAiChat = useCreateAiChat; exports.useDeleteAiChat = useDeleteAiChat; exports.useAiChatStatus = useAiChatStatus; exports.useSendAiMessage = useSendAiMessage; exports.LiveblocksProvider = LiveblocksProvider; exports.createLiveblocksContext = createLiveblocksContext; exports.useInboxNotifications = useInboxNotifications; exports.useInboxNotificationsSuspense = useInboxNotificationsSuspense; exports.useMarkAllInboxNotificationsAsRead = useMarkAllInboxNotificationsAsRead; exports.useMarkInboxNotificationAsRead = useMarkInboxNotificationAsRead; exports.useDeleteAllInboxNotifications = useDeleteAllInboxNotifications; exports.useDeleteInboxNotification = useDeleteInboxNotification; exports.useUnreadInboxNotificationsCount = useUnreadInboxNotificationsCount; exports.useUnreadInboxNotificationsCountSuspense = useUnreadInboxNotificationsCountSuspense; exports.useNotificationSettings = useNotificationSettings; exports.useNotificationSettingsSuspense = useNotificationSettingsSuspense; exports.useUpdateNotificationSettings = useUpdateNotificationSettings; exports.useRoomInfo = useRoomInfo; exports.useRoomInfoSuspense = useRoomInfoSuspense; exports.useGroupInfo = useGroupInfo; exports.useGroupInfoSuspense = useGroupInfoSuspense; exports._useInboxNotificationThread = _useInboxNotificationThread; exports._useUser = _useUser; exports._useUserSuspense = _useUserSuspense; exports._useUserThreads_experimental = _useUserThreads_experimental; exports._useUserThreadsSuspense_experimental = _useUserThreadsSuspense_experimental; exports._useAiChats = _useAiChats; exports._useAiChatsSuspense = _useAiChatsSuspense; exports._useAiChat = _useAiChat; exports._useAiChatSuspense = _useAiChatSuspense; exports._useAiChatMessages = _useAiChatMessages; exports._useAiChatMessagesSuspense = _useAiChatMessagesSuspense; exports.useSyncStatus = useSyncStatus; exports.useErrorListener = useErrorListener; exports.useStatus = useStatus; exports.useReportTextEditor = useReportTextEditor; exports.useYjsProvider = useYjsProvider; exports.useCreateTextMention = useCreateTextMention; exports.useDeleteTextMention = useDeleteTextMention; exports.useResolveMentionSuggestions = useResolveMentionSuggestions; exports.useMentionSuggestionsCache = useMentionSuggestionsCache; exports.useLostConnectionListener = useLostConnectionListener; exports.useHistory = useHistory; exports.useUndo = useUndo; exports.useRedo = useRedo; exports.useCanUndo = useCanUndo; exports.useCanRedo = useCanRedo; exports.useOthersConnectionIds = useOthersConnectionIds; exports.useCreateRoomThread = useCreateRoomThread; exports.useDeleteRoomThread = useDeleteRoomThread; exports.useEditRoomThreadMetadata = useEditRoomThreadMetadata; exports.useCreateComment = useCreateComment; exports.useCreateRoomComment = useCreateRoomComment; exports.useEditComment = useEditComment; exports.useEditRoomComment = useEditRoomComment; exports.useDeleteComment = useDeleteComment; exports.useDeleteRoomComment = useDeleteRoomComment; exports.useAddRoomCommentReaction = useAddRoomCommentReaction; exports.useRemoveReaction = useRemoveReaction; exports.useRemoveRoomCommentReaction = useRemoveRoomCommentReaction; exports.useMarkThreadAsRead = useMarkThreadAsRead; exports.useMarkRoomThreadAsRead = useMarkRoomThreadAsRead; exports.useMarkThreadAsResolved = useMarkThreadAsResolved; exports.useMarkRoomThreadAsResolved = useMarkRoomThreadAsResolved; exports.useMarkThreadAsUnresolved = useMarkThreadAsUnresolved; exports.useMarkRoomThreadAsUnresolved = useMarkRoomThreadAsUnresolved; exports.useSubscribeToThread = useSubscribeToThread; exports.useUnsubscribeFromThread = useUnsubscribeFromThread; exports.useThreadSubscription = useThreadSubscription; exports.useRoomThreadSubscription = useRoomThreadSubscription; exports.useHistoryVersionData = useHistoryVersionData; exports.useUpdateRoomSubscriptionSettings = useUpdateRoomSubscriptionSettings; exports.useOthersConnectionIdsSuspense = useOthersConnectionIdsSuspense; exports.useAttachmentUrl = useAttachmentUrl; exports.useRoomAttachmentUrl = useRoomAttachmentUrl; exports.useAttachmentUrlSuspense = useAttachmentUrlSuspense; exports.useRoomPermissions = useRoomPermissions; exports.createRoomContext = createRoomContext; exports._RoomProvider = _RoomProvider; exports._useBroadcastEvent = _useBroadcastEvent; exports._useOthersListener = _useOthersListener; exports._useRoom = _useRoom; exports._useIsInsideRoom = _useIsInsideRoom; exports._useAddReaction = _useAddReaction; exports._useMutation = _useMutation; exports._useCreateThread = _useCreateThread; exports._useDeleteThread = _useDeleteThread; exports._useEditThreadMetadata = _useEditThreadMetadata; exports._useEventListener = _useEventListener; exports._useMyPresence = _useMyPresence; exports._useOthersMapped = _useOthersMapped; exports._useOthersMappedSuspense = _useOthersMappedSuspense; exports._useThreads = _useThreads; exports._useThreadsSuspense = _useThreadsSuspense; exports._useRoomSubscriptionSettings = _useRoomSubscriptionSettings; exports._useRoomSubscriptionSettingsSuspense = _useRoomSubscriptionSettingsSuspense; exports._useHistoryVersions = _useHistoryVersions; exports._useHistoryVersionsSuspense = _useHistoryVersionsSuspense; exports._useOther = _useOther; exports._useOthers = _useOthers; exports._useOtherSuspense = _useOtherSuspense; exports._useOthersSuspense = _useOthersSuspense; exports._useStorage = _useStorage; exports._useStorageSuspense = _useStorageSuspense; exports._useSelf = _useSelf; exports._useSelfSuspense = _useSelfSuspense; exports._useStorageRoot = _useStorageRoot; exports._useUpdateMyPresence = _useUpdateMyPresence;
|
|
4942
|
+
//# sourceMappingURL=chunk-IQBSX6NS.cjs.map
|