@liveblocks/react 3.14.1 → 3.15.0-feeds1
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-J5D7MJT7.cjs → chunk-FLKIHVRX.cjs} +344 -40
- package/dist/chunk-FLKIHVRX.cjs.map +1 -0
- package/dist/{chunk-EB7KWKMS.js → chunk-JQZ4SSGD.js} +306 -2
- package/dist/chunk-JQZ4SSGD.js.map +1 -0
- package/dist/{chunk-MH5YSKF5.cjs → chunk-PQ62AG2K.cjs} +2 -2
- package/dist/{chunk-MH5YSKF5.cjs.map → chunk-PQ62AG2K.cjs.map} +1 -1
- package/dist/{chunk-FDVJKZZ5.js → chunk-XMFQTQBJ.js} +2 -2
- package/dist/index.cjs +20 -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 +18 -2
- package/dist/index.js.map +1 -1
- package/dist/{room-DamZM98T.d.cts → room-BFE9TLUA.d.cts} +174 -10
- package/dist/{room-DamZM98T.d.ts → room-BFE9TLUA.d.ts} +174 -10
- package/dist/suspense.cjs +20 -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 +18 -2
- package/dist/suspense.js.map +1 -1
- package/package.json +3 -3
- package/dist/chunk-EB7KWKMS.js.map +0 -1
- package/dist/chunk-J5D7MJT7.cjs.map +0 -1
- /package/dist/{chunk-FDVJKZZ5.js.map → chunk-XMFQTQBJ.js.map} +0 -0
|
@@ -512,6 +512,12 @@ function makeAiChatsQueryKey(query) {
|
|
|
512
512
|
function makeInboxNotificationsQueryKey(query) {
|
|
513
513
|
return _core.stableStringify.call(void 0, _nullishCoalesce(query, () => ( {})));
|
|
514
514
|
}
|
|
515
|
+
function makeFeedsQueryKey(roomId, options) {
|
|
516
|
+
return _core.stableStringify.call(void 0, [roomId, _nullishCoalesce(options, () => ( {}))]);
|
|
517
|
+
}
|
|
518
|
+
function makeFeedMessagesQueryKey(roomId, feedId, options) {
|
|
519
|
+
return _core.stableStringify.call(void 0, [roomId, feedId, _nullishCoalesce(options, () => ( {}))]);
|
|
520
|
+
}
|
|
515
521
|
function usify(promise) {
|
|
516
522
|
if ("status" in promise) {
|
|
517
523
|
return promise;
|
|
@@ -979,6 +985,16 @@ var UmbrellaStore = class {
|
|
|
979
985
|
#roomVersionsLastRequestedAtByRoom = /* @__PURE__ */ new Map();
|
|
980
986
|
// Notification Settings
|
|
981
987
|
#notificationSettings;
|
|
988
|
+
// Feeds
|
|
989
|
+
#feedsByRoomId = /* @__PURE__ */ new Map();
|
|
990
|
+
#feedMessagesByFeedId = /* @__PURE__ */ new Map();
|
|
991
|
+
// Signals for feeds and feed messages to trigger reactivity
|
|
992
|
+
#feedsSignal = new (0, _core.MutableSignal)({
|
|
993
|
+
version: 0
|
|
994
|
+
});
|
|
995
|
+
#feedMessagesSignal = new (0, _core.MutableSignal)({
|
|
996
|
+
version: 0
|
|
997
|
+
});
|
|
982
998
|
constructor(client) {
|
|
983
999
|
this.#client = client[_core.kInternal].as();
|
|
984
1000
|
this.optimisticUpdates = createStore_forOptimistic(this.#client);
|
|
@@ -1350,6 +1366,91 @@ var UmbrellaStore = class {
|
|
|
1350
1366
|
return { signal, waitUntilLoaded: resource.waitUntilLoaded };
|
|
1351
1367
|
}
|
|
1352
1368
|
);
|
|
1369
|
+
const loadingFeeds = new (0, _core.DefaultMap)(
|
|
1370
|
+
(queryKey) => {
|
|
1371
|
+
const [roomId, options] = JSON.parse(queryKey);
|
|
1372
|
+
const resource = new PaginatedResource(async (cursor) => {
|
|
1373
|
+
const room = this.#client.getRoom(roomId);
|
|
1374
|
+
if (room === null) {
|
|
1375
|
+
throw new Error(
|
|
1376
|
+
`Room '${roomId}' is not available on client. Make sure you're calling useFeeds inside a RoomProvider.`
|
|
1377
|
+
);
|
|
1378
|
+
}
|
|
1379
|
+
const result = await room.fetchFeeds({
|
|
1380
|
+
cursor,
|
|
1381
|
+
since: _optionalChain([options, 'optionalAccess', _8 => _8.since]),
|
|
1382
|
+
metadata: _optionalChain([options, 'optionalAccess', _9 => _9.metadata])
|
|
1383
|
+
});
|
|
1384
|
+
this.upsertFeeds(roomId, result.feeds);
|
|
1385
|
+
return _nullishCoalesce(result.nextCursor, () => ( null));
|
|
1386
|
+
});
|
|
1387
|
+
const signal = _core.DerivedSignal.from(
|
|
1388
|
+
resource.signal,
|
|
1389
|
+
this.#feedsSignal,
|
|
1390
|
+
(resourceResult, _signalState) => {
|
|
1391
|
+
if (resourceResult.isLoading || resourceResult.error) {
|
|
1392
|
+
return resourceResult;
|
|
1393
|
+
}
|
|
1394
|
+
const feedsMap = this.#feedsByRoomId.get(roomId);
|
|
1395
|
+
const feeds = feedsMap ? Array.from(feedsMap.values()) : [];
|
|
1396
|
+
const page = resourceResult.data;
|
|
1397
|
+
return {
|
|
1398
|
+
isLoading: false,
|
|
1399
|
+
feeds,
|
|
1400
|
+
hasFetchedAll: page.hasFetchedAll,
|
|
1401
|
+
isFetchingMore: page.isFetchingMore,
|
|
1402
|
+
fetchMoreError: page.fetchMoreError,
|
|
1403
|
+
fetchMore: page.fetchMore
|
|
1404
|
+
};
|
|
1405
|
+
},
|
|
1406
|
+
_core.shallow2
|
|
1407
|
+
);
|
|
1408
|
+
return { signal, waitUntilLoaded: resource.waitUntilLoaded };
|
|
1409
|
+
}
|
|
1410
|
+
);
|
|
1411
|
+
const loadingFeedMessages = new (0, _core.DefaultMap)(
|
|
1412
|
+
(queryKey) => {
|
|
1413
|
+
const [roomId, feedId, options] = JSON.parse(queryKey);
|
|
1414
|
+
const resource = new PaginatedResource(async (cursor) => {
|
|
1415
|
+
const room = this.#client.getRoom(roomId);
|
|
1416
|
+
if (room === null) {
|
|
1417
|
+
throw new Error(
|
|
1418
|
+
`Room '${roomId}' is not available on client. Make sure you're calling useFeedMessages inside a RoomProvider.`
|
|
1419
|
+
);
|
|
1420
|
+
}
|
|
1421
|
+
const result = await room.fetchFeedMessages(feedId, {
|
|
1422
|
+
cursor,
|
|
1423
|
+
limit: _optionalChain([options, 'optionalAccess', _10 => _10.limit])
|
|
1424
|
+
});
|
|
1425
|
+
this.upsertFeedMessages(roomId, feedId, result.messages);
|
|
1426
|
+
return _nullishCoalesce(result.nextCursor, () => ( null));
|
|
1427
|
+
});
|
|
1428
|
+
const signal = _core.DerivedSignal.from(
|
|
1429
|
+
resource.signal,
|
|
1430
|
+
this.#feedMessagesSignal,
|
|
1431
|
+
(resourceResult, _signalState) => {
|
|
1432
|
+
if (resourceResult.isLoading || resourceResult.error) {
|
|
1433
|
+
return resourceResult;
|
|
1434
|
+
}
|
|
1435
|
+
const messagesMap = this.#feedMessagesByFeedId.get(feedId);
|
|
1436
|
+
const messages = messagesMap ? Array.from(messagesMap.values()).sort(
|
|
1437
|
+
(a, b) => a.timestamp - b.timestamp
|
|
1438
|
+
) : [];
|
|
1439
|
+
const page = resourceResult.data;
|
|
1440
|
+
return {
|
|
1441
|
+
isLoading: false,
|
|
1442
|
+
messages,
|
|
1443
|
+
hasFetchedAll: page.hasFetchedAll,
|
|
1444
|
+
isFetchingMore: page.isFetchingMore,
|
|
1445
|
+
fetchMoreError: page.fetchMoreError,
|
|
1446
|
+
fetchMore: page.fetchMore
|
|
1447
|
+
};
|
|
1448
|
+
},
|
|
1449
|
+
_core.shallow2
|
|
1450
|
+
);
|
|
1451
|
+
return { signal, waitUntilLoaded: resource.waitUntilLoaded };
|
|
1452
|
+
}
|
|
1453
|
+
);
|
|
1353
1454
|
this.outputs = {
|
|
1354
1455
|
threadifications,
|
|
1355
1456
|
threads,
|
|
@@ -1365,7 +1466,9 @@ var UmbrellaStore = class {
|
|
|
1365
1466
|
aiChats,
|
|
1366
1467
|
messagesByChatId,
|
|
1367
1468
|
aiChatById,
|
|
1368
|
-
urlMetadataByUrl
|
|
1469
|
+
urlMetadataByUrl,
|
|
1470
|
+
loadingFeeds,
|
|
1471
|
+
loadingFeedMessages
|
|
1369
1472
|
};
|
|
1370
1473
|
autobind(this);
|
|
1371
1474
|
}
|
|
@@ -1586,6 +1689,64 @@ var UmbrellaStore = class {
|
|
|
1586
1689
|
result.subscriptions.deleted
|
|
1587
1690
|
);
|
|
1588
1691
|
}
|
|
1692
|
+
/**
|
|
1693
|
+
* Upserts feeds in the cache (for list/added/updated operations).
|
|
1694
|
+
*/
|
|
1695
|
+
upsertFeeds(roomId, feeds) {
|
|
1696
|
+
let feedsMap = this.#feedsByRoomId.get(roomId);
|
|
1697
|
+
if (!feedsMap) {
|
|
1698
|
+
feedsMap = /* @__PURE__ */ new Map();
|
|
1699
|
+
this.#feedsByRoomId.set(roomId, feedsMap);
|
|
1700
|
+
}
|
|
1701
|
+
for (const feed of feeds) {
|
|
1702
|
+
feedsMap.set(feed.feedId, feed);
|
|
1703
|
+
}
|
|
1704
|
+
this.#feedsSignal.mutate((state) => {
|
|
1705
|
+
state.version++;
|
|
1706
|
+
});
|
|
1707
|
+
}
|
|
1708
|
+
/**
|
|
1709
|
+
* Removes feeds from the cache (for deleted operations).
|
|
1710
|
+
*/
|
|
1711
|
+
deleteFeeds(roomId, feeds) {
|
|
1712
|
+
const feedsMap = this.#feedsByRoomId.get(roomId);
|
|
1713
|
+
if (!feedsMap) return;
|
|
1714
|
+
for (const feed of feeds) {
|
|
1715
|
+
feedsMap.delete(feed.feedId);
|
|
1716
|
+
}
|
|
1717
|
+
this.#feedsSignal.mutate((state) => {
|
|
1718
|
+
state.version++;
|
|
1719
|
+
});
|
|
1720
|
+
}
|
|
1721
|
+
/**
|
|
1722
|
+
* Upserts feed messages in the cache (for list/added/updated operations).
|
|
1723
|
+
*/
|
|
1724
|
+
upsertFeedMessages(_roomId, feedId, messages) {
|
|
1725
|
+
let messagesMap = this.#feedMessagesByFeedId.get(feedId);
|
|
1726
|
+
if (!messagesMap) {
|
|
1727
|
+
messagesMap = /* @__PURE__ */ new Map();
|
|
1728
|
+
this.#feedMessagesByFeedId.set(feedId, messagesMap);
|
|
1729
|
+
}
|
|
1730
|
+
for (const message of messages) {
|
|
1731
|
+
messagesMap.set(message.id, message);
|
|
1732
|
+
}
|
|
1733
|
+
this.#feedMessagesSignal.mutate((state) => {
|
|
1734
|
+
state.version++;
|
|
1735
|
+
});
|
|
1736
|
+
}
|
|
1737
|
+
/**
|
|
1738
|
+
* Removes feed messages from the cache (for deleted operations).
|
|
1739
|
+
*/
|
|
1740
|
+
deleteFeedMessages(_roomId, feedId, messages) {
|
|
1741
|
+
const messagesMap = this.#feedMessagesByFeedId.get(feedId);
|
|
1742
|
+
if (!messagesMap) return;
|
|
1743
|
+
for (const message of messages) {
|
|
1744
|
+
messagesMap.delete(message.id);
|
|
1745
|
+
}
|
|
1746
|
+
this.#feedMessagesSignal.mutate((state) => {
|
|
1747
|
+
state.version++;
|
|
1748
|
+
});
|
|
1749
|
+
}
|
|
1589
1750
|
async fetchUnreadNotificationsCount(queryKey, signal) {
|
|
1590
1751
|
const query = JSON.parse(queryKey);
|
|
1591
1752
|
const result = await this.#client.getUnreadInboxNotificationsCount({
|
|
@@ -1996,7 +2157,7 @@ function applyUpsertComment(thread, comment) {
|
|
|
1996
2157
|
updatedAt: new Date(
|
|
1997
2158
|
Math.max(
|
|
1998
2159
|
thread.updatedAt.getTime(),
|
|
1999
|
-
_optionalChain([comment, 'access',
|
|
2160
|
+
_optionalChain([comment, 'access', _11 => _11.editedAt, 'optionalAccess', _12 => _12.getTime, 'call', _13 => _13()]) || comment.createdAt.getTime()
|
|
2000
2161
|
)
|
|
2001
2162
|
),
|
|
2002
2163
|
comments: updatedComments
|
|
@@ -2153,7 +2314,7 @@ function selectorFor_useUnreadInboxNotificationsCount(result) {
|
|
|
2153
2314
|
return ASYNC_OK("count", result.count);
|
|
2154
2315
|
}
|
|
2155
2316
|
function selectorFor_useUser(state, userId) {
|
|
2156
|
-
if (state === void 0 || _optionalChain([state, 'optionalAccess',
|
|
2317
|
+
if (state === void 0 || _optionalChain([state, 'optionalAccess', _14 => _14.isLoading])) {
|
|
2157
2318
|
return _nullishCoalesce(state, () => ( { isLoading: true }));
|
|
2158
2319
|
}
|
|
2159
2320
|
if (state.error) {
|
|
@@ -2171,7 +2332,7 @@ function selectorFor_useUser(state, userId) {
|
|
|
2171
2332
|
};
|
|
2172
2333
|
}
|
|
2173
2334
|
function selectorFor_useRoomInfo(state, roomId) {
|
|
2174
|
-
if (state === void 0 || _optionalChain([state, 'optionalAccess',
|
|
2335
|
+
if (state === void 0 || _optionalChain([state, 'optionalAccess', _15 => _15.isLoading])) {
|
|
2175
2336
|
return _nullishCoalesce(state, () => ( { isLoading: true }));
|
|
2176
2337
|
}
|
|
2177
2338
|
if (state.error) {
|
|
@@ -2189,7 +2350,7 @@ function selectorFor_useRoomInfo(state, roomId) {
|
|
|
2189
2350
|
};
|
|
2190
2351
|
}
|
|
2191
2352
|
function selectorFor_useGroupInfo(state, groupId) {
|
|
2192
|
-
if (state === void 0 || _optionalChain([state, 'optionalAccess',
|
|
2353
|
+
if (state === void 0 || _optionalChain([state, 'optionalAccess', _16 => _16.isLoading])) {
|
|
2193
2354
|
return _nullishCoalesce(state, () => ( { isLoading: true }));
|
|
2194
2355
|
}
|
|
2195
2356
|
if (state.error) {
|
|
@@ -2359,7 +2520,7 @@ function makeLiveblocksContextBundle(client) {
|
|
|
2359
2520
|
}
|
|
2360
2521
|
function useInboxNotifications_withClient(client, selector, isEqual, options) {
|
|
2361
2522
|
const { store, notificationsPoller: poller } = getLiveblocksExtrasForClient(client);
|
|
2362
|
-
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess',
|
|
2523
|
+
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess', _17 => _17.query]));
|
|
2363
2524
|
_react.useEffect.call(void 0,
|
|
2364
2525
|
() => void store.outputs.loadingNotifications.getOrCreate(queryKey).waitUntilLoaded()
|
|
2365
2526
|
// NOTE: Deliberately *not* using a dependency array here!
|
|
@@ -2387,7 +2548,7 @@ function useInboxNotifications_withClient(client, selector, isEqual, options) {
|
|
|
2387
2548
|
function useInboxNotificationsSuspense_withClient(client, options) {
|
|
2388
2549
|
ensureNotServerSide();
|
|
2389
2550
|
const store = getLiveblocksExtrasForClient(client).store;
|
|
2390
|
-
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess',
|
|
2551
|
+
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess', _18 => _18.query]));
|
|
2391
2552
|
use(
|
|
2392
2553
|
store.outputs.loadingNotifications.getOrCreate(queryKey).waitUntilLoaded()
|
|
2393
2554
|
);
|
|
@@ -2403,7 +2564,7 @@ function useInboxNotificationsSuspense_withClient(client, options) {
|
|
|
2403
2564
|
}
|
|
2404
2565
|
function useUnreadInboxNotificationsCount_withClient(client, options) {
|
|
2405
2566
|
const { store, unreadNotificationsCountPollersByQueryKey: pollers } = getLiveblocksExtrasForClient(client);
|
|
2406
|
-
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess',
|
|
2567
|
+
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess', _19 => _19.query]));
|
|
2407
2568
|
const poller = pollers.getOrCreate(queryKey);
|
|
2408
2569
|
_react.useEffect.call(void 0,
|
|
2409
2570
|
() => void store.outputs.unreadNotificationsCount.getOrCreate(queryKey).waitUntilLoaded()
|
|
@@ -2432,7 +2593,7 @@ function useUnreadInboxNotificationsCount_withClient(client, options) {
|
|
|
2432
2593
|
function useUnreadInboxNotificationsCountSuspense_withClient(client, options) {
|
|
2433
2594
|
ensureNotServerSide();
|
|
2434
2595
|
const store = getLiveblocksExtrasForClient(client).store;
|
|
2435
|
-
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess',
|
|
2596
|
+
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess', _20 => _20.query]));
|
|
2436
2597
|
use(
|
|
2437
2598
|
store.outputs.unreadNotificationsCount.getOrCreate(queryKey).waitUntilLoaded()
|
|
2438
2599
|
);
|
|
@@ -2603,7 +2764,7 @@ function useUpdateNotificationSettings_withClient(client) {
|
|
|
2603
2764
|
store.optimisticUpdates.remove(optimisticUpdateId);
|
|
2604
2765
|
if (err instanceof _core.HttpError) {
|
|
2605
2766
|
if (err.status === 422) {
|
|
2606
|
-
const msg = [_optionalChain([err, 'access',
|
|
2767
|
+
const msg = [_optionalChain([err, 'access', _21 => _21.details, 'optionalAccess', _22 => _22.error]), _optionalChain([err, 'access', _23 => _23.details, 'optionalAccess', _24 => _24.reason])].filter(Boolean).join("\n");
|
|
2607
2768
|
_core.console.error(msg);
|
|
2608
2769
|
}
|
|
2609
2770
|
client[_core.kInternal].emitError(
|
|
@@ -2838,7 +2999,7 @@ function useGroupInfoSuspense_withClient(client, groupId) {
|
|
|
2838
2999
|
function useAiChats(options) {
|
|
2839
3000
|
const client = useClient();
|
|
2840
3001
|
const store = getUmbrellaStoreForClient(client);
|
|
2841
|
-
const queryKey = makeAiChatsQueryKey(_optionalChain([options, 'optionalAccess',
|
|
3002
|
+
const queryKey = makeAiChatsQueryKey(_optionalChain([options, 'optionalAccess', _25 => _25.query]));
|
|
2842
3003
|
useEnsureAiConnection(client);
|
|
2843
3004
|
_react.useEffect.call(void 0,
|
|
2844
3005
|
() => void store.outputs.aiChats.getOrCreate(queryKey).waitUntilLoaded()
|
|
@@ -2862,7 +3023,7 @@ function useAiChatsSuspense(options) {
|
|
|
2862
3023
|
const client = useClient();
|
|
2863
3024
|
const store = getUmbrellaStoreForClient(client);
|
|
2864
3025
|
useEnsureAiConnection(client);
|
|
2865
|
-
const queryKey = makeAiChatsQueryKey(_optionalChain([options, 'optionalAccess',
|
|
3026
|
+
const queryKey = makeAiChatsQueryKey(_optionalChain([options, 'optionalAccess', _26 => _26.query]));
|
|
2866
3027
|
use(store.outputs.aiChats.getOrCreate(queryKey).waitUntilLoaded());
|
|
2867
3028
|
const result = useAiChats(options);
|
|
2868
3029
|
_core.assert.call(void 0, !result.error, "Did not expect error");
|
|
@@ -2874,7 +3035,7 @@ function useAiChatMessages(chatId, options) {
|
|
|
2874
3035
|
const store = getUmbrellaStoreForClient(client);
|
|
2875
3036
|
useEnsureAiConnection(client);
|
|
2876
3037
|
_react.useEffect.call(void 0,
|
|
2877
|
-
() => void store.outputs.messagesByChatId.getOrCreate(chatId).getOrCreate(_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3038
|
+
() => void store.outputs.messagesByChatId.getOrCreate(chatId).getOrCreate(_nullishCoalesce(_optionalChain([options, 'optionalAccess', _27 => _27.branchId]), () => ( null))).waitUntilLoaded()
|
|
2878
3039
|
// NOTE: Deliberately *not* using a dependency array here!
|
|
2879
3040
|
//
|
|
2880
3041
|
// It is important to call waitUntil on *every* render.
|
|
@@ -2885,7 +3046,7 @@ function useAiChatMessages(chatId, options) {
|
|
|
2885
3046
|
// *next* render after that, a *new* fetch/promise will get created.
|
|
2886
3047
|
);
|
|
2887
3048
|
return useSignal(
|
|
2888
|
-
store.outputs.messagesByChatId.getOrCreate(chatId).getOrCreate(_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3049
|
+
store.outputs.messagesByChatId.getOrCreate(chatId).getOrCreate(_nullishCoalesce(_optionalChain([options, 'optionalAccess', _28 => _28.branchId]), () => ( null))).signal
|
|
2889
3050
|
);
|
|
2890
3051
|
}
|
|
2891
3052
|
function useAiChatMessagesSuspense(chatId, options) {
|
|
@@ -2894,7 +3055,7 @@ function useAiChatMessagesSuspense(chatId, options) {
|
|
|
2894
3055
|
const store = getUmbrellaStoreForClient(client);
|
|
2895
3056
|
useEnsureAiConnection(client);
|
|
2896
3057
|
use(
|
|
2897
|
-
store.outputs.messagesByChatId.getOrCreate(chatId).getOrCreate(_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3058
|
+
store.outputs.messagesByChatId.getOrCreate(chatId).getOrCreate(_nullishCoalesce(_optionalChain([options, 'optionalAccess', _29 => _29.branchId]), () => ( null))).waitUntilLoaded()
|
|
2898
3059
|
);
|
|
2899
3060
|
const result = useAiChatMessages(chatId, options);
|
|
2900
3061
|
_core.assert.call(void 0, !result.error, "Did not expect error");
|
|
@@ -3013,12 +3174,12 @@ function useAiChatStatus(chatId, branchId) {
|
|
|
3013
3174
|
if (result.error) return IDLE;
|
|
3014
3175
|
const messages = result.messages;
|
|
3015
3176
|
const lastMessage = messages[messages.length - 1];
|
|
3016
|
-
if (_optionalChain([lastMessage, 'optionalAccess',
|
|
3177
|
+
if (_optionalChain([lastMessage, 'optionalAccess', _30 => _30.role]) !== "assistant") return IDLE;
|
|
3017
3178
|
if (lastMessage.status !== "generating" && lastMessage.status !== "awaiting-tool")
|
|
3018
3179
|
return IDLE;
|
|
3019
3180
|
const contentSoFar = lastMessage.contentSoFar;
|
|
3020
3181
|
const lastPart = contentSoFar[contentSoFar.length - 1];
|
|
3021
|
-
if (_optionalChain([lastPart, 'optionalAccess',
|
|
3182
|
+
if (_optionalChain([lastPart, 'optionalAccess', _31 => _31.type]) === "tool-invocation") {
|
|
3022
3183
|
return {
|
|
3023
3184
|
status: "generating",
|
|
3024
3185
|
partType: "tool-invocation",
|
|
@@ -3027,7 +3188,7 @@ function useAiChatStatus(chatId, branchId) {
|
|
|
3027
3188
|
} else {
|
|
3028
3189
|
return {
|
|
3029
3190
|
status: "generating",
|
|
3030
|
-
partType: _optionalChain([lastPart, 'optionalAccess',
|
|
3191
|
+
partType: _optionalChain([lastPart, 'optionalAccess', _32 => _32.type])
|
|
3031
3192
|
};
|
|
3032
3193
|
}
|
|
3033
3194
|
},
|
|
@@ -3055,7 +3216,7 @@ function useSendAiMessage(chatId, options) {
|
|
|
3055
3216
|
"chatId must be provided to either `useSendAiMessage` or its returned function."
|
|
3056
3217
|
)));
|
|
3057
3218
|
const messages = client[_core.kInternal].ai.signals.getChatMessagesForBranch\u03A3(resolvedChatId).get();
|
|
3058
|
-
if (process.env.NODE_ENV !== "production" && !messageOptionsCopilotId && !_optionalChain([options, 'optionalAccess',
|
|
3219
|
+
if (process.env.NODE_ENV !== "production" && !messageOptionsCopilotId && !_optionalChain([options, 'optionalAccess', _33 => _33.copilotId])) {
|
|
3059
3220
|
_core.console.warn(
|
|
3060
3221
|
`No copilot ID was provided to useSendAiMessage when sending the message "${messageText.slice(
|
|
3061
3222
|
0,
|
|
@@ -3067,8 +3228,8 @@ To ensure the correct copilot ID is used, specify it either through the hook as
|
|
|
3067
3228
|
)}\u2026", copilotId: "co_xxx" })'`
|
|
3068
3229
|
);
|
|
3069
3230
|
}
|
|
3070
|
-
const resolvedCopilotId = _nullishCoalesce(_nullishCoalesce(messageOptionsCopilotId, () => ( _optionalChain([options, 'optionalAccess',
|
|
3071
|
-
const lastMessageId = _nullishCoalesce(_optionalChain([messages, 'access',
|
|
3231
|
+
const resolvedCopilotId = _nullishCoalesce(_nullishCoalesce(messageOptionsCopilotId, () => ( _optionalChain([options, 'optionalAccess', _34 => _34.copilotId]))), () => ( client[_core.kInternal].ai.getLastUsedCopilotId(resolvedChatId)));
|
|
3232
|
+
const lastMessageId = _nullishCoalesce(_optionalChain([messages, 'access', _35 => _35[messages.length - 1], 'optionalAccess', _36 => _36.id]), () => ( null));
|
|
3072
3233
|
const content = [{ type: "text", text: messageText }];
|
|
3073
3234
|
const newMessageId = client[_core.kInternal].ai[_core.kInternal].context.messagesStore.createOptimistically(
|
|
3074
3235
|
resolvedChatId,
|
|
@@ -3088,14 +3249,14 @@ To ensure the correct copilot ID is used, specify it either through the hook as
|
|
|
3088
3249
|
{ id: newMessageId, parentMessageId: lastMessageId, content },
|
|
3089
3250
|
targetMessageId,
|
|
3090
3251
|
{
|
|
3091
|
-
stream: _nullishCoalesce(messageOptions.stream, () => ( _optionalChain([options, 'optionalAccess',
|
|
3252
|
+
stream: _nullishCoalesce(messageOptions.stream, () => ( _optionalChain([options, 'optionalAccess', _37 => _37.stream]))),
|
|
3092
3253
|
copilotId: resolvedCopilotId,
|
|
3093
|
-
timeout: _nullishCoalesce(messageOptions.timeout, () => ( _optionalChain([options, 'optionalAccess',
|
|
3254
|
+
timeout: _nullishCoalesce(messageOptions.timeout, () => ( _optionalChain([options, 'optionalAccess', _38 => _38.timeout])))
|
|
3094
3255
|
}
|
|
3095
3256
|
);
|
|
3096
3257
|
return newMessage;
|
|
3097
3258
|
},
|
|
3098
|
-
[client, chatId, _optionalChain([options, 'optionalAccess',
|
|
3259
|
+
[client, chatId, _optionalChain([options, 'optionalAccess', _39 => _39.copilotId]), _optionalChain([options, 'optionalAccess', _40 => _40.stream]), _optionalChain([options, 'optionalAccess', _41 => _41.timeout])]
|
|
3099
3260
|
);
|
|
3100
3261
|
}
|
|
3101
3262
|
function createSharedContext(client) {
|
|
@@ -3130,7 +3291,7 @@ function createSharedContext(client) {
|
|
|
3130
3291
|
}
|
|
3131
3292
|
function useEnsureNoLiveblocksProvider(options) {
|
|
3132
3293
|
const existing = useClientOrNull();
|
|
3133
|
-
if (!_optionalChain([options, 'optionalAccess',
|
|
3294
|
+
if (!_optionalChain([options, 'optionalAccess', _42 => _42.allowNesting]) && existing !== null) {
|
|
3134
3295
|
throw new Error(
|
|
3135
3296
|
"You cannot nest multiple LiveblocksProvider instances in the same React tree."
|
|
3136
3297
|
);
|
|
@@ -3293,7 +3454,7 @@ var _useAiChatMessagesSuspense = useAiChatMessagesSuspense;
|
|
|
3293
3454
|
var _useUrlMetadata = useUrlMetadata;
|
|
3294
3455
|
var _useUrlMetadataSuspense = useUrlMetadataSuspense;
|
|
3295
3456
|
function useSyncStatus_withClient(client, options) {
|
|
3296
|
-
const smooth = useInitial(_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3457
|
+
const smooth = useInitial(_nullishCoalesce(_optionalChain([options, 'optionalAccess', _43 => _43.smooth]), () => ( false)));
|
|
3297
3458
|
if (smooth) {
|
|
3298
3459
|
return useSyncStatusSmooth_withClient(client);
|
|
3299
3460
|
} else {
|
|
@@ -3473,8 +3634,8 @@ function makeRoomExtrasForClient(client) {
|
|
|
3473
3634
|
if (innerError.status === 403) {
|
|
3474
3635
|
const detailedMessage = [
|
|
3475
3636
|
innerError.message,
|
|
3476
|
-
_optionalChain([innerError, 'access',
|
|
3477
|
-
_optionalChain([innerError, 'access',
|
|
3637
|
+
_optionalChain([innerError, 'access', _44 => _44.details, 'optionalAccess', _45 => _45.suggestion]),
|
|
3638
|
+
_optionalChain([innerError, 'access', _46 => _46.details, 'optionalAccess', _47 => _47.docs])
|
|
3478
3639
|
].filter(Boolean).join("\n");
|
|
3479
3640
|
_core.console.error(detailedMessage);
|
|
3480
3641
|
}
|
|
@@ -3575,6 +3736,14 @@ function makeRoomContextBundle(client) {
|
|
|
3575
3736
|
// prettier-ignore
|
|
3576
3737
|
useMutation,
|
|
3577
3738
|
useThreads,
|
|
3739
|
+
useFeeds,
|
|
3740
|
+
useFeedMessages,
|
|
3741
|
+
useCreateFeed,
|
|
3742
|
+
useDeleteFeed,
|
|
3743
|
+
useUpdateFeedMetadata,
|
|
3744
|
+
useCreateFeedMessage,
|
|
3745
|
+
useDeleteFeedMessage,
|
|
3746
|
+
useUpdateFeedMessage,
|
|
3578
3747
|
useSearchComments,
|
|
3579
3748
|
// prettier-ignore
|
|
3580
3749
|
useCreateThread,
|
|
@@ -3624,6 +3793,14 @@ function makeRoomContextBundle(client) {
|
|
|
3624
3793
|
// prettier-ignore
|
|
3625
3794
|
useMutation,
|
|
3626
3795
|
useThreads: useThreadsSuspense,
|
|
3796
|
+
useFeeds: useFeedsSuspense,
|
|
3797
|
+
useFeedMessages: useFeedMessagesSuspense,
|
|
3798
|
+
useCreateFeed,
|
|
3799
|
+
useDeleteFeed,
|
|
3800
|
+
useUpdateFeedMetadata,
|
|
3801
|
+
useCreateFeedMessage,
|
|
3802
|
+
useDeleteFeedMessage,
|
|
3803
|
+
useUpdateFeedMessage,
|
|
3627
3804
|
// prettier-ignore
|
|
3628
3805
|
useCreateThread,
|
|
3629
3806
|
useDeleteThread,
|
|
@@ -3763,6 +3940,33 @@ function RoomProviderInner(props) {
|
|
|
3763
3940
|
(message) => void handleCommentEvent(message)
|
|
3764
3941
|
);
|
|
3765
3942
|
}, [client, room]);
|
|
3943
|
+
_react.useEffect.call(void 0, () => {
|
|
3944
|
+
const { store } = getRoomExtrasForClient(client);
|
|
3945
|
+
function handleFeedEvent(message) {
|
|
3946
|
+
switch (message.type) {
|
|
3947
|
+
case _core.ServerMsgCode.FEEDS_ADDED:
|
|
3948
|
+
case _core.ServerMsgCode.FEEDS_UPDATED:
|
|
3949
|
+
store.upsertFeeds(room.id, message.feeds);
|
|
3950
|
+
break;
|
|
3951
|
+
case _core.ServerMsgCode.FEEDS_DELETED:
|
|
3952
|
+
store.deleteFeeds(room.id, message.feeds);
|
|
3953
|
+
break;
|
|
3954
|
+
case _core.ServerMsgCode.FEED_MESSAGES_ADDED:
|
|
3955
|
+
case _core.ServerMsgCode.FEED_MESSAGES_UPDATED:
|
|
3956
|
+
store.upsertFeedMessages(room.id, message.feedId, message.messages);
|
|
3957
|
+
break;
|
|
3958
|
+
case _core.ServerMsgCode.FEED_MESSAGES_DELETED:
|
|
3959
|
+
store.deleteFeedMessages(room.id, message.feedId, message.messages);
|
|
3960
|
+
break;
|
|
3961
|
+
// FEEDS_LIST and FEED_MESSAGES_LIST are handled by fetch promise resolution in room.ts
|
|
3962
|
+
default:
|
|
3963
|
+
break;
|
|
3964
|
+
}
|
|
3965
|
+
}
|
|
3966
|
+
return room.events.feeds.subscribe(
|
|
3967
|
+
(message) => void handleFeedEvent(message)
|
|
3968
|
+
);
|
|
3969
|
+
}, [client, room]);
|
|
3766
3970
|
_react.useEffect.call(void 0, () => {
|
|
3767
3971
|
const pair = stableEnterRoom(roomId, frozenProps);
|
|
3768
3972
|
setRoomLeavePair(pair);
|
|
@@ -3778,7 +3982,7 @@ function RoomProviderInner(props) {
|
|
|
3778
3982
|
}
|
|
3779
3983
|
function useRoom(options) {
|
|
3780
3984
|
const room = useRoomOrNull();
|
|
3781
|
-
if (room === null && !_optionalChain([options, 'optionalAccess',
|
|
3985
|
+
if (room === null && !_optionalChain([options, 'optionalAccess', _48 => _48.allowOutsideRoom])) {
|
|
3782
3986
|
throw new Error("RoomProvider is missing from the React tree.");
|
|
3783
3987
|
}
|
|
3784
3988
|
return room;
|
|
@@ -4088,6 +4292,92 @@ function useThreads(options = {}) {
|
|
|
4088
4292
|
useScrollToCommentOnLoadEffect(scrollOnLoad, result);
|
|
4089
4293
|
return result;
|
|
4090
4294
|
}
|
|
4295
|
+
function useFeeds(options) {
|
|
4296
|
+
const room = useRoom();
|
|
4297
|
+
const client = useClient();
|
|
4298
|
+
const { store } = getRoomExtrasForClient(client);
|
|
4299
|
+
const queryKey = makeFeedsQueryKey(room.id, options);
|
|
4300
|
+
const loadableResource = store.outputs.loadingFeeds.getOrCreate(queryKey);
|
|
4301
|
+
_react.useEffect.call(void 0, () => {
|
|
4302
|
+
void loadableResource.waitUntilLoaded();
|
|
4303
|
+
});
|
|
4304
|
+
return useSignal(loadableResource.signal);
|
|
4305
|
+
}
|
|
4306
|
+
function useFeedMessages(feedId, options) {
|
|
4307
|
+
const room = useRoom();
|
|
4308
|
+
const client = useClient();
|
|
4309
|
+
const { store } = getRoomExtrasForClient(client);
|
|
4310
|
+
const queryKey = makeFeedMessagesQueryKey(room.id, feedId, options);
|
|
4311
|
+
_react.useEffect.call(void 0, () => {
|
|
4312
|
+
void store.outputs.loadingFeedMessages.getOrCreate(queryKey).waitUntilLoaded();
|
|
4313
|
+
});
|
|
4314
|
+
return useSignal(
|
|
4315
|
+
store.outputs.loadingFeedMessages.getOrCreate(queryKey).signal
|
|
4316
|
+
);
|
|
4317
|
+
}
|
|
4318
|
+
function useFeedsSuspense(options) {
|
|
4319
|
+
ensureNotServerSide();
|
|
4320
|
+
const client = useClient();
|
|
4321
|
+
const room = useRoom();
|
|
4322
|
+
const { store } = getRoomExtrasForClient(client);
|
|
4323
|
+
const queryKey = makeFeedsQueryKey(room.id, options);
|
|
4324
|
+
use(store.outputs.loadingFeeds.getOrCreate(queryKey).waitUntilLoaded());
|
|
4325
|
+
const result = useFeeds(options);
|
|
4326
|
+
_core.assert.call(void 0, !result.error, "Did not expect error");
|
|
4327
|
+
_core.assert.call(void 0, !result.isLoading, "Did not expect loading");
|
|
4328
|
+
return result;
|
|
4329
|
+
}
|
|
4330
|
+
function useFeedMessagesSuspense(feedId, options) {
|
|
4331
|
+
ensureNotServerSide();
|
|
4332
|
+
const client = useClient();
|
|
4333
|
+
const room = useRoom();
|
|
4334
|
+
const { store } = getRoomExtrasForClient(client);
|
|
4335
|
+
const queryKey = makeFeedMessagesQueryKey(room.id, feedId, options);
|
|
4336
|
+
use(store.outputs.loadingFeedMessages.getOrCreate(queryKey).waitUntilLoaded());
|
|
4337
|
+
const result = useFeedMessages(feedId, options);
|
|
4338
|
+
_core.assert.call(void 0, !result.error, "Did not expect error");
|
|
4339
|
+
_core.assert.call(void 0, !result.isLoading, "Did not expect loading");
|
|
4340
|
+
return result;
|
|
4341
|
+
}
|
|
4342
|
+
function useCreateFeed() {
|
|
4343
|
+
const room = useRoom();
|
|
4344
|
+
return _react.useCallback.call(void 0,
|
|
4345
|
+
(feedId, options) => room.addFeed(feedId, options),
|
|
4346
|
+
[room]
|
|
4347
|
+
);
|
|
4348
|
+
}
|
|
4349
|
+
function useDeleteFeed() {
|
|
4350
|
+
const room = useRoom();
|
|
4351
|
+
return _react.useCallback.call(void 0, (feedId) => room.deleteFeed(feedId), [room]);
|
|
4352
|
+
}
|
|
4353
|
+
function useUpdateFeedMetadata() {
|
|
4354
|
+
const room = useRoom();
|
|
4355
|
+
return _react.useCallback.call(void 0,
|
|
4356
|
+
(feedId, metadata) => room.updateFeed(feedId, metadata),
|
|
4357
|
+
[room]
|
|
4358
|
+
);
|
|
4359
|
+
}
|
|
4360
|
+
function useCreateFeedMessage() {
|
|
4361
|
+
const room = useRoom();
|
|
4362
|
+
return _react.useCallback.call(void 0,
|
|
4363
|
+
(feedId, data, options) => room.addFeedMessage(feedId, data, options),
|
|
4364
|
+
[room]
|
|
4365
|
+
);
|
|
4366
|
+
}
|
|
4367
|
+
function useDeleteFeedMessage() {
|
|
4368
|
+
const room = useRoom();
|
|
4369
|
+
return _react.useCallback.call(void 0,
|
|
4370
|
+
(feedId, messageId) => room.deleteFeedMessage(feedId, messageId),
|
|
4371
|
+
[room]
|
|
4372
|
+
);
|
|
4373
|
+
}
|
|
4374
|
+
function useUpdateFeedMessage() {
|
|
4375
|
+
const room = useRoom();
|
|
4376
|
+
return _react.useCallback.call(void 0,
|
|
4377
|
+
(feedId, messageId, data) => room.updateFeedMessage(feedId, messageId, data),
|
|
4378
|
+
[room]
|
|
4379
|
+
);
|
|
4380
|
+
}
|
|
4091
4381
|
function useSearchComments(options) {
|
|
4092
4382
|
const [result, setResult] = _react.useState.call(void 0, {
|
|
4093
4383
|
isLoading: true
|
|
@@ -4098,7 +4388,7 @@ function useSearchComments(options) {
|
|
|
4098
4388
|
const room = useRoom();
|
|
4099
4389
|
const queryKey = _core.stableStringify.call(void 0, [room.id, options.query]);
|
|
4100
4390
|
_react.useEffect.call(void 0, () => {
|
|
4101
|
-
const currentRequestId = (_nullishCoalesce(_optionalChain([currentRequestInfo, 'access',
|
|
4391
|
+
const currentRequestId = (_nullishCoalesce(_optionalChain([currentRequestInfo, 'access', _49 => _49.current, 'optionalAccess', _50 => _50.id]), () => ( 0))) + 1;
|
|
4102
4392
|
const controller = new AbortController();
|
|
4103
4393
|
currentRequestInfo.current = { id: currentRequestId, controller };
|
|
4104
4394
|
setResult((result2) => {
|
|
@@ -4115,12 +4405,12 @@ function useSearchComments(options) {
|
|
|
4115
4405
|
{ signal: controller.signal }
|
|
4116
4406
|
).then(({ data }) => {
|
|
4117
4407
|
if (controller.signal.aborted) return;
|
|
4118
|
-
if (_optionalChain([currentRequestInfo, 'access',
|
|
4408
|
+
if (_optionalChain([currentRequestInfo, 'access', _51 => _51.current, 'optionalAccess', _52 => _52.id]) !== currentRequestId) return;
|
|
4119
4409
|
setResult({ isLoading: false, results: data });
|
|
4120
4410
|
currentRequestInfo.current = null;
|
|
4121
4411
|
}).catch((err) => {
|
|
4122
4412
|
if (controller.signal.aborted) return;
|
|
4123
|
-
if (_optionalChain([currentRequestInfo, 'access',
|
|
4413
|
+
if (_optionalChain([currentRequestInfo, 'access', _53 => _53.current, 'optionalAccess', _54 => _54.id]) !== currentRequestId) return;
|
|
4124
4414
|
setResult({ isLoading: false, error: err });
|
|
4125
4415
|
currentRequestInfo.current = null;
|
|
4126
4416
|
});
|
|
@@ -4181,7 +4471,7 @@ function useCreateRoomThread(roomId) {
|
|
|
4181
4471
|
thread: newThread,
|
|
4182
4472
|
roomId
|
|
4183
4473
|
});
|
|
4184
|
-
const attachmentIds = _optionalChain([attachments, 'optionalAccess',
|
|
4474
|
+
const attachmentIds = _optionalChain([attachments, 'optionalAccess', _55 => _55.map, 'call', _56 => _56((attachment) => attachment.id)]);
|
|
4185
4475
|
client[_core.kInternal].httpClient.createThread({
|
|
4186
4476
|
roomId,
|
|
4187
4477
|
threadId,
|
|
@@ -4223,7 +4513,7 @@ function useDeleteRoomThread(roomId) {
|
|
|
4223
4513
|
const { store, onMutationFailure } = getRoomExtrasForClient(client);
|
|
4224
4514
|
const userId = getCurrentUserId(client);
|
|
4225
4515
|
const existing = store.outputs.threads.get().get(threadId);
|
|
4226
|
-
if (_optionalChain([existing, 'optionalAccess',
|
|
4516
|
+
if (_optionalChain([existing, 'optionalAccess', _57 => _57.comments, 'optionalAccess', _58 => _58[0], 'optionalAccess', _59 => _59.userId]) !== userId) {
|
|
4227
4517
|
throw new Error("Only the thread creator can delete the thread");
|
|
4228
4518
|
}
|
|
4229
4519
|
const optimisticId = store.optimisticUpdates.add({
|
|
@@ -4364,7 +4654,7 @@ function useCreateRoomComment(roomId) {
|
|
|
4364
4654
|
type: "create-comment",
|
|
4365
4655
|
comment
|
|
4366
4656
|
});
|
|
4367
|
-
const attachmentIds = _optionalChain([attachments, 'optionalAccess',
|
|
4657
|
+
const attachmentIds = _optionalChain([attachments, 'optionalAccess', _60 => _60.map, 'call', _61 => _61((attachment) => attachment.id)]);
|
|
4368
4658
|
client[_core.kInternal].httpClient.createComment({
|
|
4369
4659
|
roomId,
|
|
4370
4660
|
threadId,
|
|
@@ -4439,7 +4729,7 @@ function useEditRoomComment(roomId) {
|
|
|
4439
4729
|
metadata: updatedMetadata
|
|
4440
4730
|
}
|
|
4441
4731
|
});
|
|
4442
|
-
const attachmentIds = _optionalChain([attachments, 'optionalAccess',
|
|
4732
|
+
const attachmentIds = _optionalChain([attachments, 'optionalAccess', _62 => _62.map, 'call', _63 => _63((attachment) => attachment.id)]);
|
|
4443
4733
|
client[_core.kInternal].httpClient.editComment({
|
|
4444
4734
|
roomId,
|
|
4445
4735
|
threadId,
|
|
@@ -4794,7 +5084,7 @@ function useRoomThreadSubscription(roomId, threadId) {
|
|
|
4794
5084
|
}
|
|
4795
5085
|
return {
|
|
4796
5086
|
status: "subscribed",
|
|
4797
|
-
unreadSince: _nullishCoalesce(_optionalChain([notification, 'optionalAccess',
|
|
5087
|
+
unreadSince: _nullishCoalesce(_optionalChain([notification, 'optionalAccess', _64 => _64.readAt]), () => ( null)),
|
|
4798
5088
|
subscribe,
|
|
4799
5089
|
unsubscribe
|
|
4800
5090
|
};
|
|
@@ -5005,7 +5295,7 @@ function useThreadsSuspense(options = {}) {
|
|
|
5005
5295
|
return result;
|
|
5006
5296
|
}
|
|
5007
5297
|
function selectorFor_useAttachmentUrl(state) {
|
|
5008
|
-
if (state === void 0 || _optionalChain([state, 'optionalAccess',
|
|
5298
|
+
if (state === void 0 || _optionalChain([state, 'optionalAccess', _65 => _65.isLoading])) {
|
|
5009
5299
|
return _nullishCoalesce(state, () => ( { isLoading: true }));
|
|
5010
5300
|
}
|
|
5011
5301
|
if (state.error) {
|
|
@@ -5093,6 +5383,10 @@ var _useMyPresence = useMyPresence;
|
|
|
5093
5383
|
var _useOthersMapped = useOthersMapped;
|
|
5094
5384
|
var _useOthersMappedSuspense = useOthersMappedSuspense;
|
|
5095
5385
|
var _useThreads = useThreads;
|
|
5386
|
+
var _useFeeds = useFeeds;
|
|
5387
|
+
var _useFeedMessages = useFeedMessages;
|
|
5388
|
+
var _useFeedsSuspense = useFeedsSuspense;
|
|
5389
|
+
var _useFeedMessagesSuspense = useFeedMessagesSuspense;
|
|
5096
5390
|
var _useSearchComments = useSearchComments;
|
|
5097
5391
|
var _useThreadsSuspense = useThreadsSuspense;
|
|
5098
5392
|
var _useRoomSubscriptionSettings = useRoomSubscriptionSettings;
|
|
@@ -5241,5 +5535,15 @@ var _useUpdateMyPresence = useUpdateMyPresence;
|
|
|
5241
5535
|
|
|
5242
5536
|
|
|
5243
5537
|
|
|
5244
|
-
|
|
5245
|
-
|
|
5538
|
+
|
|
5539
|
+
|
|
5540
|
+
|
|
5541
|
+
|
|
5542
|
+
|
|
5543
|
+
|
|
5544
|
+
|
|
5545
|
+
|
|
5546
|
+
|
|
5547
|
+
|
|
5548
|
+
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.useCreateFeed = useCreateFeed; exports.useDeleteFeed = useDeleteFeed; exports.useUpdateFeedMetadata = useUpdateFeedMetadata; exports.useCreateFeedMessage = useCreateFeedMessage; exports.useDeleteFeedMessage = useDeleteFeedMessage; exports.useUpdateFeedMessage = useUpdateFeedMessage; exports.useCreateRoomThread = useCreateRoomThread; exports.useDeleteRoomThread = useDeleteRoomThread; exports.useEditRoomThreadMetadata = useEditRoomThreadMetadata; exports.useCreateRoomComment = useCreateRoomComment; 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._useCreateComment = _useCreateComment; exports._useEditComment = _useEditComment; exports._useEditCommentMetadata = _useEditCommentMetadata; exports._useEventListener = _useEventListener; exports._useMyPresence = _useMyPresence; exports._useOthersMapped = _useOthersMapped; exports._useOthersMappedSuspense = _useOthersMappedSuspense; exports._useThreads = _useThreads; exports._useFeeds = _useFeeds; exports._useFeedMessages = _useFeedMessages; exports._useFeedsSuspense = _useFeedsSuspense; exports._useFeedMessagesSuspense = _useFeedMessagesSuspense; exports._useSearchComments = _useSearchComments; 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;
|
|
5549
|
+
//# sourceMappingURL=chunk-FLKIHVRX.cjs.map
|