@liveblocks/react 3.8.0 → 3.9.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-2R44HQCN.js → chunk-J2LMX3A6.js} +142 -48
- package/dist/chunk-J2LMX3A6.js.map +1 -0
- package/dist/{chunk-IQBSX6NS.cjs → chunk-NGMOQDHX.cjs} +168 -74
- package/dist/chunk-NGMOQDHX.cjs.map +1 -0
- package/dist/{chunk-6MZ5AS3V.cjs → chunk-QYVDIZ6C.cjs} +2 -2
- package/dist/{chunk-6MZ5AS3V.cjs.map → chunk-QYVDIZ6C.cjs.map} +1 -1
- package/dist/{chunk-C65QJNZB.js → chunk-SCL5CBWP.js} +2 -2
- package/dist/index.cjs +6 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -3
- package/dist/index.d.ts +6 -3
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/{room-C97RX2dB.d.cts → room-BZvk8RRP.d.cts} +59 -8
- package/dist/{room-C97RX2dB.d.ts → room-BZvk8RRP.d.ts} +59 -8
- 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-2R44HQCN.js.map +0 -1
- package/dist/chunk-IQBSX6NS.cjs.map +0 -1
- /package/dist/{chunk-C65QJNZB.js.map → chunk-SCL5CBWP.js.map} +0 -0
|
@@ -39,23 +39,28 @@ function useRandom() {
|
|
|
39
39
|
var RegisterAiKnowledge = _react.memo.call(void 0, function RegisterAiKnowledge2(props) {
|
|
40
40
|
const layerId = _react.useId.call(void 0, );
|
|
41
41
|
const ai = useAi();
|
|
42
|
-
const { description, value } = props;
|
|
42
|
+
const { description, value, chatId } = props;
|
|
43
43
|
const [layerKey, setLayerKey] = _react.useState.call(void 0, );
|
|
44
44
|
_react.useEffect.call(void 0, () => {
|
|
45
|
-
const layerKey2 = ai.registerKnowledgeLayer(layerId);
|
|
45
|
+
const { layerKey: layerKey2, deregister } = ai.registerKnowledgeLayer(layerId, chatId);
|
|
46
46
|
setLayerKey(layerKey2);
|
|
47
47
|
return () => {
|
|
48
|
-
|
|
48
|
+
deregister();
|
|
49
49
|
setLayerKey(void 0);
|
|
50
50
|
};
|
|
51
|
-
}, [ai, layerId]);
|
|
51
|
+
}, [ai, layerId, chatId]);
|
|
52
52
|
const randomKey = useRandom();
|
|
53
53
|
const knowledgeKey = _nullishCoalesce(props.id, () => ( randomKey));
|
|
54
54
|
_react.useEffect.call(void 0, () => {
|
|
55
55
|
if (layerKey !== void 0) {
|
|
56
|
-
ai.updateKnowledge(
|
|
56
|
+
ai.updateKnowledge(
|
|
57
|
+
layerKey,
|
|
58
|
+
{ description, value },
|
|
59
|
+
knowledgeKey,
|
|
60
|
+
chatId
|
|
61
|
+
);
|
|
57
62
|
}
|
|
58
|
-
}, [ai, layerKey, knowledgeKey, description, value]);
|
|
63
|
+
}, [ai, layerKey, knowledgeKey, description, value, chatId]);
|
|
59
64
|
return null;
|
|
60
65
|
});
|
|
61
66
|
var RegisterAiTool = _react.memo.call(void 0, function RegisterAiTool2({
|
|
@@ -320,11 +325,19 @@ function find(it, predicate) {
|
|
|
320
325
|
|
|
321
326
|
// src/lib/querying.ts
|
|
322
327
|
|
|
323
|
-
|
|
324
|
-
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
function makeThreadsFilter(query, subscriptions) {
|
|
333
|
+
return (thread) => matchesThreadsQuery(thread, query, subscriptions) && matchesMetadata(thread, query);
|
|
325
334
|
}
|
|
326
|
-
function matchesThreadsQuery(thread, q) {
|
|
327
|
-
|
|
335
|
+
function matchesThreadsQuery(thread, q, subscriptions) {
|
|
336
|
+
let subscription = void 0;
|
|
337
|
+
if (subscriptions) {
|
|
338
|
+
subscription = _optionalChain([subscriptions, 'optionalAccess', _2 => _2[_core.getSubscriptionKey.call(void 0, "thread", thread.id)]]);
|
|
339
|
+
}
|
|
340
|
+
return (q.resolved === void 0 || thread.resolved === q.resolved) && (q.subscribed === void 0 || q.subscribed === true && subscription !== void 0 || q.subscribed === false && subscription === void 0);
|
|
328
341
|
}
|
|
329
342
|
function matchesMetadata(thread, q) {
|
|
330
343
|
const metadata = thread.metadata;
|
|
@@ -404,7 +417,7 @@ var ThreadDB = class _ThreadDB {
|
|
|
404
417
|
/** Returns an existing thread by ID. Will never return a deleted thread. */
|
|
405
418
|
get(threadId) {
|
|
406
419
|
const thread = this.getEvenIfDeleted(threadId);
|
|
407
|
-
return _optionalChain([thread, 'optionalAccess',
|
|
420
|
+
return _optionalChain([thread, 'optionalAccess', _3 => _3.deletedAt]) ? void 0 : thread;
|
|
408
421
|
}
|
|
409
422
|
/** Returns the (possibly deleted) thread by ID. */
|
|
410
423
|
getEvenIfDeleted(threadId) {
|
|
@@ -470,15 +483,17 @@ var ThreadDB = class _ThreadDB {
|
|
|
470
483
|
* 'desc' means by updatedAt DESC
|
|
471
484
|
*
|
|
472
485
|
* Will never return deleted threads in the result.
|
|
486
|
+
*
|
|
487
|
+
* Subscriptions are needed to filter threads based on the user's subscriptions.
|
|
473
488
|
*/
|
|
474
|
-
findMany(roomId, query, direction) {
|
|
489
|
+
findMany(roomId, query, direction, subscriptions) {
|
|
475
490
|
const index = direction === "desc" ? this.#desc : this.#asc;
|
|
476
491
|
const crit = [];
|
|
477
492
|
if (roomId !== void 0) {
|
|
478
493
|
crit.push((t) => t.roomId === roomId);
|
|
479
494
|
}
|
|
480
495
|
if (query !== void 0) {
|
|
481
|
-
crit.push(makeThreadsFilter(query));
|
|
496
|
+
crit.push(makeThreadsFilter(query, subscriptions));
|
|
482
497
|
}
|
|
483
498
|
return Array.from(index.filter((t) => crit.every((pred) => pred(t))));
|
|
484
499
|
}
|
|
@@ -538,7 +553,7 @@ var PaginatedResource = class {
|
|
|
538
553
|
}
|
|
539
554
|
async #fetchMore() {
|
|
540
555
|
const state = this.#signal.get();
|
|
541
|
-
if (!_optionalChain([state, 'access',
|
|
556
|
+
if (!_optionalChain([state, 'access', _4 => _4.data, 'optionalAccess', _5 => _5.cursor]) || state.data.isFetchingMore) {
|
|
542
557
|
return;
|
|
543
558
|
}
|
|
544
559
|
this.#patch({ isFetchingMore: true });
|
|
@@ -559,7 +574,7 @@ var PaginatedResource = class {
|
|
|
559
574
|
}
|
|
560
575
|
fetchMore() {
|
|
561
576
|
const state = this.#signal.get();
|
|
562
|
-
if (!_optionalChain([state, 'access',
|
|
577
|
+
if (!_optionalChain([state, 'access', _6 => _6.data, 'optionalAccess', _7 => _7.cursor])) return noop;
|
|
563
578
|
if (!this.#pendingFetchMore) {
|
|
564
579
|
this.#pendingFetchMore = this.#fetchMore().finally(() => {
|
|
565
580
|
this.#pendingFetchMore = null;
|
|
@@ -609,10 +624,12 @@ var SinglePageResource = class {
|
|
|
609
624
|
#signal;
|
|
610
625
|
|
|
611
626
|
#fetchPage;
|
|
612
|
-
|
|
627
|
+
#autoRetry = true;
|
|
628
|
+
constructor(fetchPage, autoRetry2 = true) {
|
|
613
629
|
this.#signal = new (0, _core.Signal)(ASYNC_LOADING);
|
|
614
630
|
this.signal = this.#signal.asReadonly();
|
|
615
631
|
this.#fetchPage = fetchPage;
|
|
632
|
+
this.#autoRetry = autoRetry2;
|
|
616
633
|
autobind(this);
|
|
617
634
|
}
|
|
618
635
|
get() {
|
|
@@ -623,11 +640,7 @@ var SinglePageResource = class {
|
|
|
623
640
|
if (this.#cachedPromise) {
|
|
624
641
|
return this.#cachedPromise;
|
|
625
642
|
}
|
|
626
|
-
const initialFetcher$ = _core.autoRetry.call(void 0,
|
|
627
|
-
() => this.#fetchPage(),
|
|
628
|
-
5,
|
|
629
|
-
[5e3, 5e3, 1e4, 15e3]
|
|
630
|
-
);
|
|
643
|
+
const initialFetcher$ = this.#autoRetry ? _core.autoRetry.call(void 0, () => this.#fetchPage(), 5, [5e3, 5e3, 1e4, 15e3]) : this.#fetchPage();
|
|
631
644
|
const promise = usify(initialFetcher$);
|
|
632
645
|
promise.then(
|
|
633
646
|
() => {
|
|
@@ -635,10 +648,12 @@ var SinglePageResource = class {
|
|
|
635
648
|
},
|
|
636
649
|
(err) => {
|
|
637
650
|
this.#signal.set(ASYNC_ERR(err));
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
651
|
+
if (this.#autoRetry) {
|
|
652
|
+
setTimeout(() => {
|
|
653
|
+
this.#cachedPromise = null;
|
|
654
|
+
this.#signal.set(ASYNC_LOADING);
|
|
655
|
+
}, 5e3);
|
|
656
|
+
}
|
|
642
657
|
}
|
|
643
658
|
);
|
|
644
659
|
this.#cachedPromise = promise;
|
|
@@ -817,6 +832,19 @@ function createStore_forHistoryVersions() {
|
|
|
817
832
|
update
|
|
818
833
|
};
|
|
819
834
|
}
|
|
835
|
+
function createStore_forUrlsMetadata() {
|
|
836
|
+
const baseSignal = new (0, _core.MutableSignal)(/* @__PURE__ */ new Map());
|
|
837
|
+
function update(url, metadata) {
|
|
838
|
+
baseSignal.mutate((lut) => {
|
|
839
|
+
lut.set(url, metadata);
|
|
840
|
+
});
|
|
841
|
+
}
|
|
842
|
+
return {
|
|
843
|
+
signal: _core.DerivedSignal.from(baseSignal, (m) => Object.fromEntries(m)),
|
|
844
|
+
// Mutations
|
|
845
|
+
update
|
|
846
|
+
};
|
|
847
|
+
}
|
|
820
848
|
function createStore_forPermissionHints() {
|
|
821
849
|
const permissionsByRoomId = new (0, _core.DefaultMap)(
|
|
822
850
|
() => new (0, _core.Signal)(/* @__PURE__ */ new Set())
|
|
@@ -929,6 +957,7 @@ var UmbrellaStore = class {
|
|
|
929
957
|
|
|
930
958
|
|
|
931
959
|
|
|
960
|
+
|
|
932
961
|
//
|
|
933
962
|
// Output signals.
|
|
934
963
|
// (Readonly, clean, consistent. With optimistic updates applied.)
|
|
@@ -974,6 +1003,7 @@ var UmbrellaStore = class {
|
|
|
974
1003
|
);
|
|
975
1004
|
this.historyVersions = createStore_forHistoryVersions();
|
|
976
1005
|
this.unreadNotificationsCount = createStore_forUnreadNotificationsCount();
|
|
1006
|
+
this.urlsMetadata = createStore_forUrlsMetadata();
|
|
977
1007
|
const threadifications = _core.DerivedSignal.from(
|
|
978
1008
|
this.threads.signal,
|
|
979
1009
|
this.notifications.signal,
|
|
@@ -1021,11 +1051,13 @@ var UmbrellaStore = class {
|
|
|
1021
1051
|
if (result.isLoading || result.error) {
|
|
1022
1052
|
return result;
|
|
1023
1053
|
}
|
|
1054
|
+
const subscriptions = threadSubscriptions.get().subscriptions;
|
|
1024
1055
|
const threads2 = this.outputs.threads.get().findMany(
|
|
1025
1056
|
void 0,
|
|
1026
1057
|
// Do _not_ filter by roomId
|
|
1027
1058
|
_nullishCoalesce(query, () => ( {})),
|
|
1028
|
-
"desc"
|
|
1059
|
+
"desc",
|
|
1060
|
+
subscriptions
|
|
1029
1061
|
);
|
|
1030
1062
|
const page = result.data;
|
|
1031
1063
|
return {
|
|
@@ -1069,7 +1101,8 @@ var UmbrellaStore = class {
|
|
|
1069
1101
|
if (result.isLoading || result.error) {
|
|
1070
1102
|
return result;
|
|
1071
1103
|
}
|
|
1072
|
-
const
|
|
1104
|
+
const subscriptions = threadSubscriptions.get().subscriptions;
|
|
1105
|
+
const threads2 = this.outputs.threads.get().findMany(roomId, _nullishCoalesce(query, () => ( {})), "asc", subscriptions);
|
|
1073
1106
|
const page = result.data;
|
|
1074
1107
|
return {
|
|
1075
1108
|
isLoading: false,
|
|
@@ -1300,6 +1333,22 @@ var UmbrellaStore = class {
|
|
|
1300
1333
|
}, _core.shallow);
|
|
1301
1334
|
return { signal, waitUntilLoaded: resource.waitUntilLoaded };
|
|
1302
1335
|
});
|
|
1336
|
+
const urlMetadataByUrl = new (0, _core.DefaultMap)(
|
|
1337
|
+
(url) => {
|
|
1338
|
+
const resource = new SinglePageResource(async () => {
|
|
1339
|
+
const metadata = await this.#client[_core.kInternal].httpClient.getUrlMetadata(url);
|
|
1340
|
+
this.urlsMetadata.update(url, metadata);
|
|
1341
|
+
}, false);
|
|
1342
|
+
const signal = _core.DerivedSignal.from(() => {
|
|
1343
|
+
const result = resource.get();
|
|
1344
|
+
if (result.isLoading || result.error) {
|
|
1345
|
+
return result;
|
|
1346
|
+
}
|
|
1347
|
+
return ASYNC_OK("metadata", _core.nn.call(void 0, this.urlsMetadata.signal.get()[url]));
|
|
1348
|
+
}, _core.shallow);
|
|
1349
|
+
return { signal, waitUntilLoaded: resource.waitUntilLoaded };
|
|
1350
|
+
}
|
|
1351
|
+
);
|
|
1303
1352
|
this.outputs = {
|
|
1304
1353
|
threadifications,
|
|
1305
1354
|
threads,
|
|
@@ -1314,7 +1363,8 @@ var UmbrellaStore = class {
|
|
|
1314
1363
|
threadSubscriptions,
|
|
1315
1364
|
aiChats,
|
|
1316
1365
|
messagesByChatId,
|
|
1317
|
-
aiChatById
|
|
1366
|
+
aiChatById,
|
|
1367
|
+
urlMetadataByUrl
|
|
1318
1368
|
};
|
|
1319
1369
|
autobind(this);
|
|
1320
1370
|
}
|
|
@@ -1795,7 +1845,12 @@ function applyOptimisticUpdates_forSubscriptions(subscriptionsLUT, threads, opti
|
|
|
1795
1845
|
if (!update.settings.threads) {
|
|
1796
1846
|
continue;
|
|
1797
1847
|
}
|
|
1798
|
-
const roomThreads = threads.findMany(
|
|
1848
|
+
const roomThreads = threads.findMany(
|
|
1849
|
+
update.roomId,
|
|
1850
|
+
void 0,
|
|
1851
|
+
"desc",
|
|
1852
|
+
void 0
|
|
1853
|
+
);
|
|
1799
1854
|
for (const thread of roomThreads) {
|
|
1800
1855
|
const subscriptionKey = _core.getSubscriptionKey.call(void 0, "thread", thread.id);
|
|
1801
1856
|
switch (update.settings.threads) {
|
|
@@ -1886,7 +1941,7 @@ function applyUpsertComment(thread, comment) {
|
|
|
1886
1941
|
updatedAt: new Date(
|
|
1887
1942
|
Math.max(
|
|
1888
1943
|
thread.updatedAt.getTime(),
|
|
1889
|
-
_optionalChain([comment, 'access',
|
|
1944
|
+
_optionalChain([comment, 'access', _8 => _8.editedAt, 'optionalAccess', _9 => _9.getTime, 'call', _10 => _10()]) || comment.createdAt.getTime()
|
|
1890
1945
|
)
|
|
1891
1946
|
),
|
|
1892
1947
|
comments: updatedComments
|
|
@@ -2043,7 +2098,7 @@ function selectorFor_useUnreadInboxNotificationsCount(result) {
|
|
|
2043
2098
|
return ASYNC_OK("count", result.count);
|
|
2044
2099
|
}
|
|
2045
2100
|
function selectorFor_useUser(state, userId) {
|
|
2046
|
-
if (state === void 0 || _optionalChain([state, 'optionalAccess',
|
|
2101
|
+
if (state === void 0 || _optionalChain([state, 'optionalAccess', _11 => _11.isLoading])) {
|
|
2047
2102
|
return _nullishCoalesce(state, () => ( { isLoading: true }));
|
|
2048
2103
|
}
|
|
2049
2104
|
if (state.error) {
|
|
@@ -2061,7 +2116,7 @@ function selectorFor_useUser(state, userId) {
|
|
|
2061
2116
|
};
|
|
2062
2117
|
}
|
|
2063
2118
|
function selectorFor_useRoomInfo(state, roomId) {
|
|
2064
|
-
if (state === void 0 || _optionalChain([state, 'optionalAccess',
|
|
2119
|
+
if (state === void 0 || _optionalChain([state, 'optionalAccess', _12 => _12.isLoading])) {
|
|
2065
2120
|
return _nullishCoalesce(state, () => ( { isLoading: true }));
|
|
2066
2121
|
}
|
|
2067
2122
|
if (state.error) {
|
|
@@ -2079,7 +2134,7 @@ function selectorFor_useRoomInfo(state, roomId) {
|
|
|
2079
2134
|
};
|
|
2080
2135
|
}
|
|
2081
2136
|
function selectorFor_useGroupInfo(state, groupId) {
|
|
2082
|
-
if (state === void 0 || _optionalChain([state, 'optionalAccess',
|
|
2137
|
+
if (state === void 0 || _optionalChain([state, 'optionalAccess', _13 => _13.isLoading])) {
|
|
2083
2138
|
return _nullishCoalesce(state, () => ( { isLoading: true }));
|
|
2084
2139
|
}
|
|
2085
2140
|
if (state.error) {
|
|
@@ -2220,6 +2275,7 @@ function makeLiveblocksContextBundle(client) {
|
|
|
2220
2275
|
useCreateAiChat,
|
|
2221
2276
|
useDeleteAiChat,
|
|
2222
2277
|
useSendAiMessage,
|
|
2278
|
+
useUrlMetadata,
|
|
2223
2279
|
...shared.classic,
|
|
2224
2280
|
suspense: {
|
|
2225
2281
|
LiveblocksProvider: LiveblocksProvider2,
|
|
@@ -2240,6 +2296,7 @@ function makeLiveblocksContextBundle(client) {
|
|
|
2240
2296
|
useCreateAiChat,
|
|
2241
2297
|
useDeleteAiChat,
|
|
2242
2298
|
useSendAiMessage,
|
|
2299
|
+
useUrlMetadata: useUrlMetadataSuspense,
|
|
2243
2300
|
...shared.suspense
|
|
2244
2301
|
}
|
|
2245
2302
|
};
|
|
@@ -2247,7 +2304,7 @@ function makeLiveblocksContextBundle(client) {
|
|
|
2247
2304
|
}
|
|
2248
2305
|
function useInboxNotifications_withClient(client, selector, isEqual, options) {
|
|
2249
2306
|
const { store, notificationsPoller: poller } = getLiveblocksExtrasForClient(client);
|
|
2250
|
-
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess',
|
|
2307
|
+
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess', _14 => _14.query]));
|
|
2251
2308
|
_react.useEffect.call(void 0,
|
|
2252
2309
|
() => void store.outputs.loadingNotifications.getOrCreate(queryKey).waitUntilLoaded()
|
|
2253
2310
|
// NOTE: Deliberately *not* using a dependency array here!
|
|
@@ -2275,7 +2332,7 @@ function useInboxNotifications_withClient(client, selector, isEqual, options) {
|
|
|
2275
2332
|
function useInboxNotificationsSuspense_withClient(client, options) {
|
|
2276
2333
|
ensureNotServerSide();
|
|
2277
2334
|
const store = getLiveblocksExtrasForClient(client).store;
|
|
2278
|
-
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess',
|
|
2335
|
+
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess', _15 => _15.query]));
|
|
2279
2336
|
use(
|
|
2280
2337
|
store.outputs.loadingNotifications.getOrCreate(queryKey).waitUntilLoaded()
|
|
2281
2338
|
);
|
|
@@ -2291,7 +2348,7 @@ function useInboxNotificationsSuspense_withClient(client, options) {
|
|
|
2291
2348
|
}
|
|
2292
2349
|
function useUnreadInboxNotificationsCount_withClient(client, options) {
|
|
2293
2350
|
const { store, unreadNotificationsCountPollersByQueryKey: pollers } = getLiveblocksExtrasForClient(client);
|
|
2294
|
-
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess',
|
|
2351
|
+
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess', _16 => _16.query]));
|
|
2295
2352
|
const poller = pollers.getOrCreate(queryKey);
|
|
2296
2353
|
_react.useEffect.call(void 0,
|
|
2297
2354
|
() => void store.outputs.unreadNotificationsCount.getOrCreate(queryKey).waitUntilLoaded()
|
|
@@ -2320,7 +2377,7 @@ function useUnreadInboxNotificationsCount_withClient(client, options) {
|
|
|
2320
2377
|
function useUnreadInboxNotificationsCountSuspense_withClient(client, options) {
|
|
2321
2378
|
ensureNotServerSide();
|
|
2322
2379
|
const store = getLiveblocksExtrasForClient(client).store;
|
|
2323
|
-
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess',
|
|
2380
|
+
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess', _17 => _17.query]));
|
|
2324
2381
|
use(
|
|
2325
2382
|
store.outputs.unreadNotificationsCount.getOrCreate(queryKey).waitUntilLoaded()
|
|
2326
2383
|
);
|
|
@@ -2491,7 +2548,7 @@ function useUpdateNotificationSettings_withClient(client) {
|
|
|
2491
2548
|
store.optimisticUpdates.remove(optimisticUpdateId);
|
|
2492
2549
|
if (err instanceof _core.HttpError) {
|
|
2493
2550
|
if (err.status === 422) {
|
|
2494
|
-
const msg = [_optionalChain([err, 'access',
|
|
2551
|
+
const msg = [_optionalChain([err, 'access', _18 => _18.details, 'optionalAccess', _19 => _19.error]), _optionalChain([err, 'access', _20 => _20.details, 'optionalAccess', _21 => _21.reason])].filter(Boolean).join("\n");
|
|
2495
2552
|
_core.console.error(msg);
|
|
2496
2553
|
}
|
|
2497
2554
|
client[_core.kInternal].emitError(
|
|
@@ -2726,7 +2783,7 @@ function useGroupInfoSuspense_withClient(client, groupId) {
|
|
|
2726
2783
|
function useAiChats(options) {
|
|
2727
2784
|
const client = useClient();
|
|
2728
2785
|
const store = getUmbrellaStoreForClient(client);
|
|
2729
|
-
const queryKey = makeAiChatsQueryKey(_optionalChain([options, 'optionalAccess',
|
|
2786
|
+
const queryKey = makeAiChatsQueryKey(_optionalChain([options, 'optionalAccess', _22 => _22.query]));
|
|
2730
2787
|
useEnsureAiConnection(client);
|
|
2731
2788
|
_react.useEffect.call(void 0,
|
|
2732
2789
|
() => void store.outputs.aiChats.getOrCreate(queryKey).waitUntilLoaded()
|
|
@@ -2750,7 +2807,7 @@ function useAiChatsSuspense(options) {
|
|
|
2750
2807
|
const client = useClient();
|
|
2751
2808
|
const store = getUmbrellaStoreForClient(client);
|
|
2752
2809
|
useEnsureAiConnection(client);
|
|
2753
|
-
const queryKey = makeAiChatsQueryKey(_optionalChain([options, 'optionalAccess',
|
|
2810
|
+
const queryKey = makeAiChatsQueryKey(_optionalChain([options, 'optionalAccess', _23 => _23.query]));
|
|
2754
2811
|
use(store.outputs.aiChats.getOrCreate(queryKey).waitUntilLoaded());
|
|
2755
2812
|
const result = useAiChats(options);
|
|
2756
2813
|
_core.assert.call(void 0, !result.error, "Did not expect error");
|
|
@@ -2762,7 +2819,7 @@ function useAiChatMessages(chatId, options) {
|
|
|
2762
2819
|
const store = getUmbrellaStoreForClient(client);
|
|
2763
2820
|
useEnsureAiConnection(client);
|
|
2764
2821
|
_react.useEffect.call(void 0,
|
|
2765
|
-
() => void store.outputs.messagesByChatId.getOrCreate(chatId).getOrCreate(_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2822
|
+
() => void store.outputs.messagesByChatId.getOrCreate(chatId).getOrCreate(_nullishCoalesce(_optionalChain([options, 'optionalAccess', _24 => _24.branchId]), () => ( null))).waitUntilLoaded()
|
|
2766
2823
|
// NOTE: Deliberately *not* using a dependency array here!
|
|
2767
2824
|
//
|
|
2768
2825
|
// It is important to call waitUntil on *every* render.
|
|
@@ -2773,7 +2830,7 @@ function useAiChatMessages(chatId, options) {
|
|
|
2773
2830
|
// *next* render after that, a *new* fetch/promise will get created.
|
|
2774
2831
|
);
|
|
2775
2832
|
return useSignal(
|
|
2776
|
-
store.outputs.messagesByChatId.getOrCreate(chatId).getOrCreate(_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2833
|
+
store.outputs.messagesByChatId.getOrCreate(chatId).getOrCreate(_nullishCoalesce(_optionalChain([options, 'optionalAccess', _25 => _25.branchId]), () => ( null))).signal
|
|
2777
2834
|
);
|
|
2778
2835
|
}
|
|
2779
2836
|
function useAiChatMessagesSuspense(chatId, options) {
|
|
@@ -2782,7 +2839,7 @@ function useAiChatMessagesSuspense(chatId, options) {
|
|
|
2782
2839
|
const store = getUmbrellaStoreForClient(client);
|
|
2783
2840
|
useEnsureAiConnection(client);
|
|
2784
2841
|
use(
|
|
2785
|
-
store.outputs.messagesByChatId.getOrCreate(chatId).getOrCreate(_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2842
|
+
store.outputs.messagesByChatId.getOrCreate(chatId).getOrCreate(_nullishCoalesce(_optionalChain([options, 'optionalAccess', _26 => _26.branchId]), () => ( null))).waitUntilLoaded()
|
|
2786
2843
|
);
|
|
2787
2844
|
const result = useAiChatMessages(chatId, options);
|
|
2788
2845
|
_core.assert.call(void 0, !result.error, "Did not expect error");
|
|
@@ -2817,6 +2874,32 @@ function useAiChatSuspense(chatId) {
|
|
|
2817
2874
|
_core.assert.call(void 0, !result.isLoading, "Did not expect loading");
|
|
2818
2875
|
return result;
|
|
2819
2876
|
}
|
|
2877
|
+
function useUrlMetadata(url) {
|
|
2878
|
+
const client = useClient();
|
|
2879
|
+
const store = getUmbrellaStoreForClient(client);
|
|
2880
|
+
_react.useEffect.call(void 0,
|
|
2881
|
+
() => void store.outputs.urlMetadataByUrl.getOrCreate(url).waitUntilLoaded()
|
|
2882
|
+
// NOTE: Deliberately *not* using a dependency array here!
|
|
2883
|
+
//
|
|
2884
|
+
// It is important to call waitUntil on *every* render.
|
|
2885
|
+
// This is harmless though, on most renders, except:
|
|
2886
|
+
// 1. The very first render, in which case we'll want to trigger the initial page fetch.
|
|
2887
|
+
// 2. All other subsequent renders now "just" return the same promise (a quick operation).
|
|
2888
|
+
// 3. If ever the promise would fail, then after 5 seconds it would reset, and on the very
|
|
2889
|
+
// *next* render after that, a *new* fetch/promise will get created.
|
|
2890
|
+
);
|
|
2891
|
+
return useSignal(store.outputs.urlMetadataByUrl.getOrCreate(url).signal);
|
|
2892
|
+
}
|
|
2893
|
+
function useUrlMetadataSuspense(url) {
|
|
2894
|
+
ensureNotServerSide();
|
|
2895
|
+
const client = useClient();
|
|
2896
|
+
const store = getUmbrellaStoreForClient(client);
|
|
2897
|
+
use(store.outputs.urlMetadataByUrl.getOrCreate(url).waitUntilLoaded());
|
|
2898
|
+
const result = useUrlMetadata(url);
|
|
2899
|
+
_core.assert.call(void 0, !result.error, "Did not expect error");
|
|
2900
|
+
_core.assert.call(void 0, !result.isLoading, "Did not expect loading");
|
|
2901
|
+
return result;
|
|
2902
|
+
}
|
|
2820
2903
|
function useCreateAiChat() {
|
|
2821
2904
|
const client = useClient();
|
|
2822
2905
|
return _react.useCallback.call(void 0,
|
|
@@ -2849,6 +2932,7 @@ function useDeleteAiChat() {
|
|
|
2849
2932
|
[client]
|
|
2850
2933
|
);
|
|
2851
2934
|
}
|
|
2935
|
+
var DISCONNECTED = Object.freeze({ status: "disconnected" });
|
|
2852
2936
|
var LOADING = Object.freeze({ status: "loading" });
|
|
2853
2937
|
var IDLE = Object.freeze({ status: "idle" });
|
|
2854
2938
|
function useAiChatStatus(chatId, branchId) {
|
|
@@ -2858,7 +2942,14 @@ function useAiChatStatus(chatId, branchId) {
|
|
|
2858
2942
|
_react.useEffect.call(void 0,
|
|
2859
2943
|
() => void store.outputs.messagesByChatId.getOrCreate(chatId).getOrCreate(_nullishCoalesce(branchId, () => ( null))).waitUntilLoaded()
|
|
2860
2944
|
);
|
|
2861
|
-
|
|
2945
|
+
const isAvailable = useSignal(
|
|
2946
|
+
// Subscribe to connection status signal
|
|
2947
|
+
client[_core.kInternal].ai.signals.status\u03A3,
|
|
2948
|
+
// "Disconnected" means the AI service is not available
|
|
2949
|
+
// as it represents a final error status.
|
|
2950
|
+
(status) => status !== "disconnected"
|
|
2951
|
+
);
|
|
2952
|
+
const chatStatus = useSignal(
|
|
2862
2953
|
// Signal
|
|
2863
2954
|
store.outputs.messagesByChatId.getOrCreate(chatId).getOrCreate(_nullishCoalesce(branchId, () => ( null))).signal,
|
|
2864
2955
|
// Selector
|
|
@@ -2867,24 +2958,31 @@ function useAiChatStatus(chatId, branchId) {
|
|
|
2867
2958
|
if (result.error) return IDLE;
|
|
2868
2959
|
const messages = result.messages;
|
|
2869
2960
|
const lastMessage = messages[messages.length - 1];
|
|
2870
|
-
if (_optionalChain([lastMessage, 'optionalAccess',
|
|
2961
|
+
if (_optionalChain([lastMessage, 'optionalAccess', _27 => _27.role]) !== "assistant") return IDLE;
|
|
2871
2962
|
if (lastMessage.status !== "generating" && lastMessage.status !== "awaiting-tool")
|
|
2872
2963
|
return IDLE;
|
|
2873
2964
|
const contentSoFar = lastMessage.contentSoFar;
|
|
2874
2965
|
const lastPart = contentSoFar[contentSoFar.length - 1];
|
|
2875
|
-
if (_optionalChain([lastPart, 'optionalAccess',
|
|
2966
|
+
if (_optionalChain([lastPart, 'optionalAccess', _28 => _28.type]) === "tool-invocation") {
|
|
2876
2967
|
return {
|
|
2877
2968
|
status: "generating",
|
|
2878
2969
|
partType: "tool-invocation",
|
|
2879
2970
|
toolName: lastPart.name
|
|
2880
2971
|
};
|
|
2881
2972
|
} else {
|
|
2882
|
-
return {
|
|
2973
|
+
return {
|
|
2974
|
+
status: "generating",
|
|
2975
|
+
partType: _optionalChain([lastPart, 'optionalAccess', _29 => _29.type])
|
|
2976
|
+
};
|
|
2883
2977
|
}
|
|
2884
2978
|
},
|
|
2885
2979
|
// Consider { status: "generating", partType: "text" } and { status: "generating", partType: "text" } equal
|
|
2886
2980
|
_core.shallow
|
|
2887
2981
|
);
|
|
2982
|
+
if (!isAvailable) {
|
|
2983
|
+
return DISCONNECTED;
|
|
2984
|
+
}
|
|
2985
|
+
return chatStatus;
|
|
2888
2986
|
}
|
|
2889
2987
|
function useSendAiMessage(chatId, options) {
|
|
2890
2988
|
const client = useClient();
|
|
@@ -2902,7 +3000,7 @@ function useSendAiMessage(chatId, options) {
|
|
|
2902
3000
|
"chatId must be provided to either `useSendAiMessage` or its returned function."
|
|
2903
3001
|
)));
|
|
2904
3002
|
const messages = client[_core.kInternal].ai.signals.getChatMessagesForBranch\u03A3(resolvedChatId).get();
|
|
2905
|
-
if (process.env.NODE_ENV !== "production" && !messageOptionsCopilotId && !_optionalChain([options, 'optionalAccess',
|
|
3003
|
+
if (process.env.NODE_ENV !== "production" && !messageOptionsCopilotId && !_optionalChain([options, 'optionalAccess', _30 => _30.copilotId])) {
|
|
2906
3004
|
_core.console.warn(
|
|
2907
3005
|
`No copilot ID was provided to useSendAiMessage when sending the message "${messageText.slice(
|
|
2908
3006
|
0,
|
|
@@ -2914,8 +3012,8 @@ To ensure the correct copilot ID is used, specify it either through the hook as
|
|
|
2914
3012
|
)}\u2026", copilotId: "co_xxx" })'`
|
|
2915
3013
|
);
|
|
2916
3014
|
}
|
|
2917
|
-
const resolvedCopilotId = _nullishCoalesce(_nullishCoalesce(messageOptionsCopilotId, () => ( _optionalChain([options, 'optionalAccess',
|
|
2918
|
-
const lastMessageId = _nullishCoalesce(_optionalChain([messages, 'access',
|
|
3015
|
+
const resolvedCopilotId = _nullishCoalesce(_nullishCoalesce(messageOptionsCopilotId, () => ( _optionalChain([options, 'optionalAccess', _31 => _31.copilotId]))), () => ( client[_core.kInternal].ai.getLastUsedCopilotId(resolvedChatId)));
|
|
3016
|
+
const lastMessageId = _nullishCoalesce(_optionalChain([messages, 'access', _32 => _32[messages.length - 1], 'optionalAccess', _33 => _33.id]), () => ( null));
|
|
2919
3017
|
const content = [{ type: "text", text: messageText }];
|
|
2920
3018
|
const newMessageId = client[_core.kInternal].ai[_core.kInternal].context.messagesStore.createOptimistically(
|
|
2921
3019
|
resolvedChatId,
|
|
@@ -2935,22 +3033,14 @@ To ensure the correct copilot ID is used, specify it either through the hook as
|
|
|
2935
3033
|
{ id: newMessageId, parentMessageId: lastMessageId, content },
|
|
2936
3034
|
targetMessageId,
|
|
2937
3035
|
{
|
|
2938
|
-
stream: _nullishCoalesce(messageOptions.stream, () => ( _optionalChain([options, 'optionalAccess',
|
|
3036
|
+
stream: _nullishCoalesce(messageOptions.stream, () => ( _optionalChain([options, 'optionalAccess', _34 => _34.stream]))),
|
|
2939
3037
|
copilotId: resolvedCopilotId,
|
|
2940
|
-
timeout: _nullishCoalesce(messageOptions.timeout, () => ( _optionalChain([options, 'optionalAccess',
|
|
2941
|
-
knowledge: _nullishCoalesce(messageOptions.knowledge, () => ( _optionalChain([options, 'optionalAccess', _35 => _35.knowledge])))
|
|
3038
|
+
timeout: _nullishCoalesce(messageOptions.timeout, () => ( _optionalChain([options, 'optionalAccess', _35 => _35.timeout])))
|
|
2942
3039
|
}
|
|
2943
3040
|
);
|
|
2944
3041
|
return newMessage;
|
|
2945
3042
|
},
|
|
2946
|
-
[
|
|
2947
|
-
client,
|
|
2948
|
-
chatId,
|
|
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])
|
|
2953
|
-
]
|
|
3043
|
+
[client, chatId, _optionalChain([options, 'optionalAccess', _36 => _36.copilotId]), _optionalChain([options, 'optionalAccess', _37 => _37.stream]), _optionalChain([options, 'optionalAccess', _38 => _38.timeout])]
|
|
2954
3044
|
);
|
|
2955
3045
|
}
|
|
2956
3046
|
function createSharedContext(client) {
|
|
@@ -2985,7 +3075,7 @@ function createSharedContext(client) {
|
|
|
2985
3075
|
}
|
|
2986
3076
|
function useEnsureNoLiveblocksProvider(options) {
|
|
2987
3077
|
const existing = useClientOrNull();
|
|
2988
|
-
if (!_optionalChain([options, 'optionalAccess',
|
|
3078
|
+
if (!_optionalChain([options, 'optionalAccess', _39 => _39.allowNesting]) && existing !== null) {
|
|
2989
3079
|
throw new Error(
|
|
2990
3080
|
"You cannot nest multiple LiveblocksProvider instances in the same React tree."
|
|
2991
3081
|
);
|
|
@@ -3148,8 +3238,10 @@ var _useAiChat = useAiChat;
|
|
|
3148
3238
|
var _useAiChatSuspense = useAiChatSuspense;
|
|
3149
3239
|
var _useAiChatMessages = useAiChatMessages;
|
|
3150
3240
|
var _useAiChatMessagesSuspense = useAiChatMessagesSuspense;
|
|
3241
|
+
var _useUrlMetadata = useUrlMetadata;
|
|
3242
|
+
var _useUrlMetadataSuspense = useUrlMetadataSuspense;
|
|
3151
3243
|
function useSyncStatus_withClient(client, options) {
|
|
3152
|
-
const smooth = useInitial(_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3244
|
+
const smooth = useInitial(_nullishCoalesce(_optionalChain([options, 'optionalAccess', _40 => _40.smooth]), () => ( false)));
|
|
3153
3245
|
if (smooth) {
|
|
3154
3246
|
return useSyncStatusSmooth_withClient(client);
|
|
3155
3247
|
} else {
|
|
@@ -3328,8 +3420,8 @@ function makeRoomExtrasForClient(client) {
|
|
|
3328
3420
|
if (innerError.status === 403) {
|
|
3329
3421
|
const detailedMessage = [
|
|
3330
3422
|
innerError.message,
|
|
3331
|
-
_optionalChain([innerError, 'access',
|
|
3332
|
-
_optionalChain([innerError, 'access',
|
|
3423
|
+
_optionalChain([innerError, 'access', _41 => _41.details, 'optionalAccess', _42 => _42.suggestion]),
|
|
3424
|
+
_optionalChain([innerError, 'access', _43 => _43.details, 'optionalAccess', _44 => _44.docs])
|
|
3333
3425
|
].filter(Boolean).join("\n");
|
|
3334
3426
|
_core.console.error(detailedMessage);
|
|
3335
3427
|
}
|
|
@@ -3624,7 +3716,7 @@ function RoomProviderInner(props) {
|
|
|
3624
3716
|
}
|
|
3625
3717
|
function useRoom(options) {
|
|
3626
3718
|
const room = useRoomOrNull();
|
|
3627
|
-
if (room === null && !_optionalChain([options, 'optionalAccess',
|
|
3719
|
+
if (room === null && !_optionalChain([options, 'optionalAccess', _45 => _45.allowOutsideRoom])) {
|
|
3628
3720
|
throw new Error("RoomProvider is missing from the React tree.");
|
|
3629
3721
|
}
|
|
3630
3722
|
return room;
|
|
@@ -3974,7 +4066,7 @@ function useCreateRoomThread(roomId) {
|
|
|
3974
4066
|
thread: newThread,
|
|
3975
4067
|
roomId
|
|
3976
4068
|
});
|
|
3977
|
-
const attachmentIds = _optionalChain([attachments, 'optionalAccess',
|
|
4069
|
+
const attachmentIds = _optionalChain([attachments, 'optionalAccess', _46 => _46.map, 'call', _47 => _47((attachment) => attachment.id)]);
|
|
3978
4070
|
client[_core.kInternal].httpClient.createThread({
|
|
3979
4071
|
roomId,
|
|
3980
4072
|
threadId,
|
|
@@ -4014,7 +4106,7 @@ function useDeleteRoomThread(roomId) {
|
|
|
4014
4106
|
const { store, onMutationFailure } = getRoomExtrasForClient(client);
|
|
4015
4107
|
const userId = getCurrentUserId(client);
|
|
4016
4108
|
const existing = store.outputs.threads.get().get(threadId);
|
|
4017
|
-
if (_optionalChain([existing, 'optionalAccess',
|
|
4109
|
+
if (_optionalChain([existing, 'optionalAccess', _48 => _48.comments, 'optionalAccess', _49 => _49[0], 'optionalAccess', _50 => _50.userId]) !== userId) {
|
|
4018
4110
|
throw new Error("Only the thread creator can delete the thread");
|
|
4019
4111
|
}
|
|
4020
4112
|
const optimisticId = store.optimisticUpdates.add({
|
|
@@ -4102,7 +4194,7 @@ function useCreateRoomComment(roomId) {
|
|
|
4102
4194
|
type: "create-comment",
|
|
4103
4195
|
comment
|
|
4104
4196
|
});
|
|
4105
|
-
const attachmentIds = _optionalChain([attachments, 'optionalAccess',
|
|
4197
|
+
const attachmentIds = _optionalChain([attachments, 'optionalAccess', _51 => _51.map, 'call', _52 => _52((attachment) => attachment.id)]);
|
|
4106
4198
|
client[_core.kInternal].httpClient.createComment({ roomId, threadId, commentId, body, attachmentIds }).then(
|
|
4107
4199
|
(newComment) => {
|
|
4108
4200
|
store.createComment(newComment, optimisticId);
|
|
@@ -4158,7 +4250,7 @@ function useEditRoomComment(roomId) {
|
|
|
4158
4250
|
attachments: _nullishCoalesce(attachments, () => ( []))
|
|
4159
4251
|
}
|
|
4160
4252
|
});
|
|
4161
|
-
const attachmentIds = _optionalChain([attachments, 'optionalAccess',
|
|
4253
|
+
const attachmentIds = _optionalChain([attachments, 'optionalAccess', _53 => _53.map, 'call', _54 => _54((attachment) => attachment.id)]);
|
|
4162
4254
|
client[_core.kInternal].httpClient.editComment({ roomId, threadId, commentId, body, attachmentIds }).then(
|
|
4163
4255
|
(editedComment) => {
|
|
4164
4256
|
store.editComment(threadId, optimisticId, editedComment);
|
|
@@ -4499,7 +4591,7 @@ function useRoomThreadSubscription(roomId, threadId) {
|
|
|
4499
4591
|
}
|
|
4500
4592
|
return {
|
|
4501
4593
|
status: "subscribed",
|
|
4502
|
-
unreadSince: _nullishCoalesce(_optionalChain([notification, 'optionalAccess',
|
|
4594
|
+
unreadSince: _nullishCoalesce(_optionalChain([notification, 'optionalAccess', _55 => _55.readAt]), () => ( null)),
|
|
4503
4595
|
subscribe,
|
|
4504
4596
|
unsubscribe
|
|
4505
4597
|
};
|
|
@@ -4710,7 +4802,7 @@ function useThreadsSuspense(options = {}) {
|
|
|
4710
4802
|
return result;
|
|
4711
4803
|
}
|
|
4712
4804
|
function selectorFor_useAttachmentUrl(state) {
|
|
4713
|
-
if (state === void 0 || _optionalChain([state, 'optionalAccess',
|
|
4805
|
+
if (state === void 0 || _optionalChain([state, 'optionalAccess', _56 => _56.isLoading])) {
|
|
4714
4806
|
return _nullishCoalesce(state, () => ( { isLoading: true }));
|
|
4715
4807
|
}
|
|
4716
4808
|
if (state.error) {
|
|
@@ -4938,5 +5030,7 @@ var _useUpdateMyPresence = useUpdateMyPresence;
|
|
|
4938
5030
|
|
|
4939
5031
|
|
|
4940
5032
|
|
|
4941
|
-
|
|
4942
|
-
|
|
5033
|
+
|
|
5034
|
+
|
|
5035
|
+
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._useUrlMetadata = _useUrlMetadata; exports._useUrlMetadataSuspense = _useUrlMetadataSuspense; 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;
|
|
5036
|
+
//# sourceMappingURL=chunk-NGMOQDHX.cjs.map
|