@liveblocks/react 3.16.0-feeds1 → 3.16.0-flow2
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 +13 -7
- package/dist/_private.cjs.map +1 -1
- package/dist/_private.d.cts +11 -3
- package/dist/_private.d.ts +11 -3
- package/dist/_private.js +7 -1
- package/dist/_private.js.map +1 -1
- package/dist/{chunk-LYXD3YYH.js → chunk-2AIWAOIV.js} +2 -2
- package/dist/{chunk-2HO3EZRC.js → chunk-2VF57BZV.js} +39 -462
- package/dist/chunk-2VF57BZV.js.map +1 -0
- package/dist/{chunk-6D2LQWB5.cjs → chunk-6JXSC2A6.cjs} +2 -2
- package/dist/{chunk-6D2LQWB5.cjs.map → chunk-6JXSC2A6.cjs.map} +1 -1
- package/dist/{chunk-6VGVFTSY.cjs → chunk-QEGVIJNN.cjs} +74 -497
- package/dist/chunk-QEGVIJNN.cjs.map +1 -0
- package/dist/index.cjs +4 -20
- 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 +2 -18
- package/dist/index.js.map +1 -1
- package/dist/{room-C2TwdMi3.d.cts → room-BvPZu216.d.cts} +19 -195
- package/dist/{room-C2TwdMi3.d.ts → room-BvPZu216.d.ts} +19 -195
- package/dist/suspense.cjs +4 -20
- 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 +2 -18
- package/dist/suspense.js.map +1 -1
- package/package.json +3 -3
- package/dist/chunk-2HO3EZRC.js.map +0 -1
- package/dist/chunk-6VGVFTSY.cjs.map +0 -1
- /package/dist/{chunk-LYXD3YYH.js.map → chunk-2AIWAOIV.js.map} +0 -0
|
@@ -27,6 +27,25 @@ function useLatest(value) {
|
|
|
27
27
|
return ref;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
// src/lib/use-initial.ts
|
|
31
|
+
|
|
32
|
+
function useInitial(value, roomId) {
|
|
33
|
+
return _react.useMemo.call(void 0, () => value, [roomId]);
|
|
34
|
+
}
|
|
35
|
+
function useInitialUnlessFunction(latestValue, roomId) {
|
|
36
|
+
const frozenValue = useInitial(latestValue, roomId);
|
|
37
|
+
const ref = useLatest(latestValue);
|
|
38
|
+
const wrapper = _react.useCallback.call(void 0,
|
|
39
|
+
(...args) => ref.current(...args),
|
|
40
|
+
[ref]
|
|
41
|
+
);
|
|
42
|
+
if (typeof frozenValue === "function") {
|
|
43
|
+
return wrapper;
|
|
44
|
+
} else {
|
|
45
|
+
return frozenValue;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
30
49
|
// src/ai.tsx
|
|
31
50
|
|
|
32
51
|
|
|
@@ -231,25 +250,6 @@ function ensureNotServerSide() {
|
|
|
231
250
|
}
|
|
232
251
|
}
|
|
233
252
|
|
|
234
|
-
// src/lib/use-initial.ts
|
|
235
|
-
|
|
236
|
-
function useInitial(value, roomId) {
|
|
237
|
-
return _react.useMemo.call(void 0, () => value, [roomId]);
|
|
238
|
-
}
|
|
239
|
-
function useInitialUnlessFunction(latestValue, roomId) {
|
|
240
|
-
const frozenValue = useInitial(latestValue, roomId);
|
|
241
|
-
const ref = useLatest(latestValue);
|
|
242
|
-
const wrapper = _react.useCallback.call(void 0,
|
|
243
|
-
(...args) => ref.current(...args),
|
|
244
|
-
[ref]
|
|
245
|
-
);
|
|
246
|
-
if (typeof frozenValue === "function") {
|
|
247
|
-
return wrapper;
|
|
248
|
-
} else {
|
|
249
|
-
return frozenValue;
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
|
|
253
253
|
// src/lib/use-polyfill.ts
|
|
254
254
|
|
|
255
255
|
var reactUse = React[" use ".trim().toString()];
|
|
@@ -512,12 +512,6 @@ 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
|
-
}
|
|
521
515
|
function usify(promise) {
|
|
522
516
|
if ("status" in promise) {
|
|
523
517
|
return promise;
|
|
@@ -542,12 +536,10 @@ var PaginatedResource = class {
|
|
|
542
536
|
|
|
543
537
|
#fetchPage;
|
|
544
538
|
#pendingFetchMore;
|
|
545
|
-
|
|
546
|
-
constructor(fetchPage, options) {
|
|
539
|
+
constructor(fetchPage) {
|
|
547
540
|
this.#signal = new (0, _core.Signal)(ASYNC_LOADING);
|
|
548
541
|
this.#fetchPage = fetchPage;
|
|
549
542
|
this.#pendingFetchMore = null;
|
|
550
|
-
this.#autoRetry = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _4 => _4.autoRetry]), () => ( true));
|
|
551
543
|
this.signal = this.#signal.asReadonly();
|
|
552
544
|
autobind(this);
|
|
553
545
|
}
|
|
@@ -561,7 +553,7 @@ var PaginatedResource = class {
|
|
|
561
553
|
}
|
|
562
554
|
async #fetchMore() {
|
|
563
555
|
const state = this.#signal.get();
|
|
564
|
-
if (!_optionalChain([state, 'access',
|
|
556
|
+
if (!_optionalChain([state, 'access', _4 => _4.data, 'optionalAccess', _5 => _5.cursor]) || state.data.isFetchingMore) {
|
|
565
557
|
return;
|
|
566
558
|
}
|
|
567
559
|
this.#patch({ isFetchingMore: true });
|
|
@@ -584,7 +576,7 @@ var PaginatedResource = class {
|
|
|
584
576
|
}
|
|
585
577
|
fetchMore() {
|
|
586
578
|
const state = this.#signal.get();
|
|
587
|
-
if (!_optionalChain([state, 'access',
|
|
579
|
+
if (!_optionalChain([state, 'access', _6 => _6.data, 'optionalAccess', _7 => _7.cursor])) return noop;
|
|
588
580
|
if (!this.#pendingFetchMore) {
|
|
589
581
|
this.#pendingFetchMore = this.#fetchMore();
|
|
590
582
|
}
|
|
@@ -595,17 +587,14 @@ var PaginatedResource = class {
|
|
|
595
587
|
if (this.#cachedPromise) {
|
|
596
588
|
return this.#cachedPromise;
|
|
597
589
|
}
|
|
598
|
-
const initialPageFetch$ =
|
|
590
|
+
const initialPageFetch$ = _core.autoRetry.call(void 0,
|
|
599
591
|
() => this.#fetchPage(
|
|
600
592
|
/* cursor */
|
|
601
593
|
void 0
|
|
602
594
|
),
|
|
603
595
|
5,
|
|
604
596
|
[5e3, 5e3, 1e4, 15e3]
|
|
605
|
-
)
|
|
606
|
-
/* cursor */
|
|
607
|
-
void 0
|
|
608
|
-
));
|
|
597
|
+
);
|
|
609
598
|
const promise = usify(initialPageFetch$);
|
|
610
599
|
promise.then(
|
|
611
600
|
(cursor) => {
|
|
@@ -621,12 +610,10 @@ var PaginatedResource = class {
|
|
|
621
610
|
},
|
|
622
611
|
(err) => {
|
|
623
612
|
this.#signal.set(ASYNC_ERR(err));
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
}, 5e3);
|
|
629
|
-
}
|
|
613
|
+
setTimeout(() => {
|
|
614
|
+
this.#cachedPromise = null;
|
|
615
|
+
this.#signal.set(ASYNC_LOADING);
|
|
616
|
+
}, 5e3);
|
|
630
617
|
}
|
|
631
618
|
);
|
|
632
619
|
this.#cachedPromise = promise;
|
|
@@ -925,82 +912,6 @@ function createStore_forOptimistic(client) {
|
|
|
925
912
|
remove
|
|
926
913
|
};
|
|
927
914
|
}
|
|
928
|
-
function createStore_forFeeds() {
|
|
929
|
-
const signal = new (0, _core.MutableSignal)(/* @__PURE__ */ new Map());
|
|
930
|
-
function upsert(roomId, feeds) {
|
|
931
|
-
signal.mutate((map) => {
|
|
932
|
-
let roomMap = map.get(roomId);
|
|
933
|
-
if (!roomMap) {
|
|
934
|
-
roomMap = /* @__PURE__ */ new Map();
|
|
935
|
-
map.set(roomId, roomMap);
|
|
936
|
-
}
|
|
937
|
-
for (const feed of feeds) {
|
|
938
|
-
roomMap.set(feed.feedId, feed);
|
|
939
|
-
}
|
|
940
|
-
});
|
|
941
|
-
}
|
|
942
|
-
function deleteOne(roomId, feedId) {
|
|
943
|
-
signal.mutate((map) => {
|
|
944
|
-
_optionalChain([map, 'access', _9 => _9.get, 'call', _10 => _10(roomId), 'optionalAccess', _11 => _11.delete, 'call', _12 => _12(feedId)]);
|
|
945
|
-
});
|
|
946
|
-
}
|
|
947
|
-
function findMany(feedsByRoomId, roomId, options) {
|
|
948
|
-
const filtered = Array.from(
|
|
949
|
-
_nullishCoalesce(_optionalChain([feedsByRoomId, 'access', _13 => _13.get, 'call', _14 => _14(roomId), 'optionalAccess', _15 => _15.values, 'call', _16 => _16()]), () => ( []))
|
|
950
|
-
).filter((feed) => {
|
|
951
|
-
if (_optionalChain([options, 'optionalAccess', _17 => _17.since]) !== void 0 && feed.updatedAt < options.since && feed.createdAt < options.since) {
|
|
952
|
-
return false;
|
|
953
|
-
}
|
|
954
|
-
if (_optionalChain([options, 'optionalAccess', _18 => _18.metadata]) !== void 0) {
|
|
955
|
-
const meta = feed.metadata;
|
|
956
|
-
if (!Object.entries(options.metadata).every(([k, v]) => meta[k] === v)) {
|
|
957
|
-
return false;
|
|
958
|
-
}
|
|
959
|
-
}
|
|
960
|
-
return true;
|
|
961
|
-
});
|
|
962
|
-
filtered.sort((a, b) => {
|
|
963
|
-
const byTime = a.createdAt - b.createdAt;
|
|
964
|
-
if (byTime !== 0) return byTime;
|
|
965
|
-
return a.feedId < b.feedId ? -1 : a.feedId > b.feedId ? 1 : 0;
|
|
966
|
-
});
|
|
967
|
-
return filtered;
|
|
968
|
-
}
|
|
969
|
-
return { signal, upsert, delete: deleteOne, findMany };
|
|
970
|
-
}
|
|
971
|
-
function createStore_forFeedMessages() {
|
|
972
|
-
const signal = new (0, _core.MutableSignal)(
|
|
973
|
-
/* @__PURE__ */ new Map()
|
|
974
|
-
);
|
|
975
|
-
function upsert(feedId, messages) {
|
|
976
|
-
signal.mutate((map) => {
|
|
977
|
-
let feedMap = map.get(feedId);
|
|
978
|
-
if (!feedMap) {
|
|
979
|
-
feedMap = /* @__PURE__ */ new Map();
|
|
980
|
-
map.set(feedId, feedMap);
|
|
981
|
-
}
|
|
982
|
-
for (const msg of messages) {
|
|
983
|
-
feedMap.set(msg.id, msg);
|
|
984
|
-
}
|
|
985
|
-
});
|
|
986
|
-
}
|
|
987
|
-
function deleteOne(feedId, messageIds) {
|
|
988
|
-
signal.mutate((map) => {
|
|
989
|
-
const feedMap = map.get(feedId);
|
|
990
|
-
if (feedMap) {
|
|
991
|
-
for (const id of messageIds) {
|
|
992
|
-
feedMap.delete(id);
|
|
993
|
-
}
|
|
994
|
-
}
|
|
995
|
-
});
|
|
996
|
-
}
|
|
997
|
-
function findMany(messagesByFeedId, feedId) {
|
|
998
|
-
return Array.from(_nullishCoalesce(_optionalChain([messagesByFeedId, 'access', _19 => _19.get, 'call', _20 => _20(feedId), 'optionalAccess', _21 => _21.values, 'call', _22 => _22()]), () => ( []))).sort(
|
|
999
|
-
(a, b) => a.createdAt - b.createdAt
|
|
1000
|
-
);
|
|
1001
|
-
}
|
|
1002
|
-
return { signal, upsert, delete: deleteOne, findMany };
|
|
1003
|
-
}
|
|
1004
915
|
var UmbrellaStore = class {
|
|
1005
916
|
#client;
|
|
1006
917
|
//
|
|
@@ -1068,9 +979,6 @@ var UmbrellaStore = class {
|
|
|
1068
979
|
#roomVersionsLastRequestedAtByRoom = /* @__PURE__ */ new Map();
|
|
1069
980
|
// Notification Settings
|
|
1070
981
|
#notificationSettings;
|
|
1071
|
-
// Feeds
|
|
1072
|
-
#feeds = createStore_forFeeds();
|
|
1073
|
-
#feedMessages = createStore_forFeedMessages();
|
|
1074
982
|
constructor(client) {
|
|
1075
983
|
this.#client = client[_core.kInternal].as();
|
|
1076
984
|
this.optimisticUpdates = createStore_forOptimistic(this.#client);
|
|
@@ -1442,97 +1350,6 @@ var UmbrellaStore = class {
|
|
|
1442
1350
|
return { signal, waitUntilLoaded: resource.waitUntilLoaded };
|
|
1443
1351
|
}
|
|
1444
1352
|
);
|
|
1445
|
-
const loadingFeeds = new (0, _core.DefaultMap)(
|
|
1446
|
-
(queryKey) => {
|
|
1447
|
-
const [roomId, options] = JSON.parse(queryKey);
|
|
1448
|
-
const resource = new PaginatedResource(
|
|
1449
|
-
async (cursor) => {
|
|
1450
|
-
const room = this.#client.getRoom(roomId);
|
|
1451
|
-
if (room === null) {
|
|
1452
|
-
throw new Error(
|
|
1453
|
-
`Room '${roomId}' is not available on client. Make sure you're calling useFeeds inside a RoomProvider.`
|
|
1454
|
-
);
|
|
1455
|
-
}
|
|
1456
|
-
const result = await room.fetchFeeds({
|
|
1457
|
-
cursor,
|
|
1458
|
-
since: _optionalChain([options, 'optionalAccess', _23 => _23.since]),
|
|
1459
|
-
metadata: _optionalChain([options, 'optionalAccess', _24 => _24.metadata]),
|
|
1460
|
-
limit: _optionalChain([options, 'optionalAccess', _25 => _25.limit])
|
|
1461
|
-
});
|
|
1462
|
-
this.upsertFeeds(roomId, result.feeds);
|
|
1463
|
-
return _nullishCoalesce(result.nextCursor, () => ( null));
|
|
1464
|
-
},
|
|
1465
|
-
{ autoRetry: false }
|
|
1466
|
-
);
|
|
1467
|
-
const signal = _core.DerivedSignal.from(
|
|
1468
|
-
resource.signal,
|
|
1469
|
-
this.#feeds.signal,
|
|
1470
|
-
(resourceResult, feedsByRoomId) => {
|
|
1471
|
-
if (resourceResult.isLoading || resourceResult.error) {
|
|
1472
|
-
return resourceResult;
|
|
1473
|
-
}
|
|
1474
|
-
const feeds = this.#feeds.findMany(feedsByRoomId, roomId, options);
|
|
1475
|
-
const page = resourceResult.data;
|
|
1476
|
-
return {
|
|
1477
|
-
isLoading: false,
|
|
1478
|
-
feeds,
|
|
1479
|
-
hasFetchedAll: page.hasFetchedAll,
|
|
1480
|
-
isFetchingMore: page.isFetchingMore,
|
|
1481
|
-
fetchMoreError: page.fetchMoreError,
|
|
1482
|
-
fetchMore: page.fetchMore
|
|
1483
|
-
};
|
|
1484
|
-
},
|
|
1485
|
-
_core.shallow2
|
|
1486
|
-
);
|
|
1487
|
-
return { signal, waitUntilLoaded: resource.waitUntilLoaded };
|
|
1488
|
-
}
|
|
1489
|
-
);
|
|
1490
|
-
const loadingFeedMessages = new (0, _core.DefaultMap)(
|
|
1491
|
-
(queryKey) => {
|
|
1492
|
-
const [roomId, feedId, options] = JSON.parse(queryKey);
|
|
1493
|
-
const resource = new PaginatedResource(
|
|
1494
|
-
async (cursor) => {
|
|
1495
|
-
const room = this.#client.getRoom(roomId);
|
|
1496
|
-
if (room === null) {
|
|
1497
|
-
throw new Error(
|
|
1498
|
-
`Room '${roomId}' is not available on client. Make sure you're calling useFeedMessages inside a RoomProvider.`
|
|
1499
|
-
);
|
|
1500
|
-
}
|
|
1501
|
-
const result = await room.fetchFeedMessages(feedId, {
|
|
1502
|
-
cursor,
|
|
1503
|
-
limit: _optionalChain([options, 'optionalAccess', _26 => _26.limit])
|
|
1504
|
-
});
|
|
1505
|
-
this.upsertFeedMessages(roomId, feedId, result.messages);
|
|
1506
|
-
return _nullishCoalesce(result.nextCursor, () => ( null));
|
|
1507
|
-
},
|
|
1508
|
-
{ autoRetry: false }
|
|
1509
|
-
);
|
|
1510
|
-
const signal = _core.DerivedSignal.from(
|
|
1511
|
-
resource.signal,
|
|
1512
|
-
this.#feedMessages.signal,
|
|
1513
|
-
(resourceResult, messagesByFeedId) => {
|
|
1514
|
-
if (resourceResult.isLoading || resourceResult.error) {
|
|
1515
|
-
return resourceResult;
|
|
1516
|
-
}
|
|
1517
|
-
const messages = this.#feedMessages.findMany(
|
|
1518
|
-
messagesByFeedId,
|
|
1519
|
-
feedId
|
|
1520
|
-
);
|
|
1521
|
-
const page = resourceResult.data;
|
|
1522
|
-
return {
|
|
1523
|
-
isLoading: false,
|
|
1524
|
-
messages,
|
|
1525
|
-
hasFetchedAll: page.hasFetchedAll,
|
|
1526
|
-
isFetchingMore: page.isFetchingMore,
|
|
1527
|
-
fetchMoreError: page.fetchMoreError,
|
|
1528
|
-
fetchMore: page.fetchMore
|
|
1529
|
-
};
|
|
1530
|
-
},
|
|
1531
|
-
_core.shallow2
|
|
1532
|
-
);
|
|
1533
|
-
return { signal, waitUntilLoaded: resource.waitUntilLoaded };
|
|
1534
|
-
}
|
|
1535
|
-
);
|
|
1536
1353
|
this.outputs = {
|
|
1537
1354
|
threadifications,
|
|
1538
1355
|
threads,
|
|
@@ -1548,9 +1365,7 @@ var UmbrellaStore = class {
|
|
|
1548
1365
|
aiChats,
|
|
1549
1366
|
messagesByChatId,
|
|
1550
1367
|
aiChatById,
|
|
1551
|
-
urlMetadataByUrl
|
|
1552
|
-
loadingFeeds,
|
|
1553
|
-
loadingFeedMessages
|
|
1368
|
+
urlMetadataByUrl
|
|
1554
1369
|
};
|
|
1555
1370
|
autobind(this);
|
|
1556
1371
|
}
|
|
@@ -1771,30 +1586,6 @@ var UmbrellaStore = class {
|
|
|
1771
1586
|
result.subscriptions.deleted
|
|
1772
1587
|
);
|
|
1773
1588
|
}
|
|
1774
|
-
/**
|
|
1775
|
-
* Upserts feeds in the cache (for list/added/updated operations).
|
|
1776
|
-
*/
|
|
1777
|
-
upsertFeeds(roomId, feeds) {
|
|
1778
|
-
this.#feeds.upsert(roomId, feeds);
|
|
1779
|
-
}
|
|
1780
|
-
/**
|
|
1781
|
-
* Removes a feed from the cache (for deleted operations).
|
|
1782
|
-
*/
|
|
1783
|
-
deleteFeed(roomId, feedId) {
|
|
1784
|
-
this.#feeds.delete(roomId, feedId);
|
|
1785
|
-
}
|
|
1786
|
-
/**
|
|
1787
|
-
* Upserts feed messages in the cache (for list/added/updated operations).
|
|
1788
|
-
*/
|
|
1789
|
-
upsertFeedMessages(_roomId, feedId, messages) {
|
|
1790
|
-
this.#feedMessages.upsert(feedId, messages);
|
|
1791
|
-
}
|
|
1792
|
-
/**
|
|
1793
|
-
* Removes feed messages from the cache (for deleted operations).
|
|
1794
|
-
*/
|
|
1795
|
-
deleteFeedMessages(_roomId, feedId, messageIds) {
|
|
1796
|
-
this.#feedMessages.delete(feedId, messageIds);
|
|
1797
|
-
}
|
|
1798
1589
|
async fetchUnreadNotificationsCount(queryKey, signal) {
|
|
1799
1590
|
const query = JSON.parse(queryKey);
|
|
1800
1591
|
const result = await this.#client.getUnreadInboxNotificationsCount({
|
|
@@ -2205,7 +1996,7 @@ function applyUpsertComment(thread, comment) {
|
|
|
2205
1996
|
updatedAt: new Date(
|
|
2206
1997
|
Math.max(
|
|
2207
1998
|
thread.updatedAt.getTime(),
|
|
2208
|
-
_optionalChain([comment, 'access',
|
|
1999
|
+
_optionalChain([comment, 'access', _8 => _8.editedAt, 'optionalAccess', _9 => _9.getTime, 'call', _10 => _10()]) || comment.createdAt.getTime()
|
|
2209
2000
|
)
|
|
2210
2001
|
),
|
|
2211
2002
|
comments: updatedComments
|
|
@@ -2362,7 +2153,7 @@ function selectorFor_useUnreadInboxNotificationsCount(result) {
|
|
|
2362
2153
|
return ASYNC_OK("count", result.count);
|
|
2363
2154
|
}
|
|
2364
2155
|
function selectorFor_useUser(state, userId) {
|
|
2365
|
-
if (state === void 0 || _optionalChain([state, 'optionalAccess',
|
|
2156
|
+
if (state === void 0 || _optionalChain([state, 'optionalAccess', _11 => _11.isLoading])) {
|
|
2366
2157
|
return _nullishCoalesce(state, () => ( { isLoading: true }));
|
|
2367
2158
|
}
|
|
2368
2159
|
if (state.error) {
|
|
@@ -2380,7 +2171,7 @@ function selectorFor_useUser(state, userId) {
|
|
|
2380
2171
|
};
|
|
2381
2172
|
}
|
|
2382
2173
|
function selectorFor_useRoomInfo(state, roomId) {
|
|
2383
|
-
if (state === void 0 || _optionalChain([state, 'optionalAccess',
|
|
2174
|
+
if (state === void 0 || _optionalChain([state, 'optionalAccess', _12 => _12.isLoading])) {
|
|
2384
2175
|
return _nullishCoalesce(state, () => ( { isLoading: true }));
|
|
2385
2176
|
}
|
|
2386
2177
|
if (state.error) {
|
|
@@ -2398,7 +2189,7 @@ function selectorFor_useRoomInfo(state, roomId) {
|
|
|
2398
2189
|
};
|
|
2399
2190
|
}
|
|
2400
2191
|
function selectorFor_useGroupInfo(state, groupId) {
|
|
2401
|
-
if (state === void 0 || _optionalChain([state, 'optionalAccess',
|
|
2192
|
+
if (state === void 0 || _optionalChain([state, 'optionalAccess', _13 => _13.isLoading])) {
|
|
2402
2193
|
return _nullishCoalesce(state, () => ( { isLoading: true }));
|
|
2403
2194
|
}
|
|
2404
2195
|
if (state.error) {
|
|
@@ -2568,7 +2359,7 @@ function makeLiveblocksContextBundle(client) {
|
|
|
2568
2359
|
}
|
|
2569
2360
|
function useInboxNotifications_withClient(client, selector, isEqual, options) {
|
|
2570
2361
|
const { store, notificationsPoller: poller } = getLiveblocksExtrasForClient(client);
|
|
2571
|
-
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess',
|
|
2362
|
+
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess', _14 => _14.query]));
|
|
2572
2363
|
_react.useEffect.call(void 0,
|
|
2573
2364
|
() => void store.outputs.loadingNotifications.getOrCreate(queryKey).waitUntilLoaded()
|
|
2574
2365
|
// NOTE: Deliberately *not* using a dependency array here!
|
|
@@ -2596,7 +2387,7 @@ function useInboxNotifications_withClient(client, selector, isEqual, options) {
|
|
|
2596
2387
|
function useInboxNotificationsSuspense_withClient(client, options) {
|
|
2597
2388
|
ensureNotServerSide();
|
|
2598
2389
|
const store = getLiveblocksExtrasForClient(client).store;
|
|
2599
|
-
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess',
|
|
2390
|
+
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess', _15 => _15.query]));
|
|
2600
2391
|
use(
|
|
2601
2392
|
store.outputs.loadingNotifications.getOrCreate(queryKey).waitUntilLoaded()
|
|
2602
2393
|
);
|
|
@@ -2612,7 +2403,7 @@ function useInboxNotificationsSuspense_withClient(client, options) {
|
|
|
2612
2403
|
}
|
|
2613
2404
|
function useUnreadInboxNotificationsCount_withClient(client, options) {
|
|
2614
2405
|
const { store, unreadNotificationsCountPollersByQueryKey: pollers } = getLiveblocksExtrasForClient(client);
|
|
2615
|
-
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess',
|
|
2406
|
+
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess', _16 => _16.query]));
|
|
2616
2407
|
const poller = pollers.getOrCreate(queryKey);
|
|
2617
2408
|
_react.useEffect.call(void 0,
|
|
2618
2409
|
() => void store.outputs.unreadNotificationsCount.getOrCreate(queryKey).waitUntilLoaded()
|
|
@@ -2641,7 +2432,7 @@ function useUnreadInboxNotificationsCount_withClient(client, options) {
|
|
|
2641
2432
|
function useUnreadInboxNotificationsCountSuspense_withClient(client, options) {
|
|
2642
2433
|
ensureNotServerSide();
|
|
2643
2434
|
const store = getLiveblocksExtrasForClient(client).store;
|
|
2644
|
-
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess',
|
|
2435
|
+
const queryKey = makeInboxNotificationsQueryKey(_optionalChain([options, 'optionalAccess', _17 => _17.query]));
|
|
2645
2436
|
use(
|
|
2646
2437
|
store.outputs.unreadNotificationsCount.getOrCreate(queryKey).waitUntilLoaded()
|
|
2647
2438
|
);
|
|
@@ -2812,7 +2603,7 @@ function useUpdateNotificationSettings_withClient(client) {
|
|
|
2812
2603
|
store.optimisticUpdates.remove(optimisticUpdateId);
|
|
2813
2604
|
if (err instanceof _core.HttpError) {
|
|
2814
2605
|
if (err.status === 422) {
|
|
2815
|
-
const msg = [_optionalChain([err, 'access',
|
|
2606
|
+
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");
|
|
2816
2607
|
_core.console.error(msg);
|
|
2817
2608
|
}
|
|
2818
2609
|
client[_core.kInternal].emitError(
|
|
@@ -3047,7 +2838,7 @@ function useGroupInfoSuspense_withClient(client, groupId) {
|
|
|
3047
2838
|
function useAiChats(options) {
|
|
3048
2839
|
const client = useClient();
|
|
3049
2840
|
const store = getUmbrellaStoreForClient(client);
|
|
3050
|
-
const queryKey = makeAiChatsQueryKey(_optionalChain([options, 'optionalAccess',
|
|
2841
|
+
const queryKey = makeAiChatsQueryKey(_optionalChain([options, 'optionalAccess', _22 => _22.query]));
|
|
3051
2842
|
useEnsureAiConnection(client);
|
|
3052
2843
|
_react.useEffect.call(void 0,
|
|
3053
2844
|
() => void store.outputs.aiChats.getOrCreate(queryKey).waitUntilLoaded()
|
|
@@ -3071,7 +2862,7 @@ function useAiChatsSuspense(options) {
|
|
|
3071
2862
|
const client = useClient();
|
|
3072
2863
|
const store = getUmbrellaStoreForClient(client);
|
|
3073
2864
|
useEnsureAiConnection(client);
|
|
3074
|
-
const queryKey = makeAiChatsQueryKey(_optionalChain([options, 'optionalAccess',
|
|
2865
|
+
const queryKey = makeAiChatsQueryKey(_optionalChain([options, 'optionalAccess', _23 => _23.query]));
|
|
3075
2866
|
use(store.outputs.aiChats.getOrCreate(queryKey).waitUntilLoaded());
|
|
3076
2867
|
const result = useAiChats(options);
|
|
3077
2868
|
_core.assert.call(void 0, !result.error, "Did not expect error");
|
|
@@ -3083,7 +2874,7 @@ function useAiChatMessages(chatId, options) {
|
|
|
3083
2874
|
const store = getUmbrellaStoreForClient(client);
|
|
3084
2875
|
useEnsureAiConnection(client);
|
|
3085
2876
|
_react.useEffect.call(void 0,
|
|
3086
|
-
() => void store.outputs.messagesByChatId.getOrCreate(chatId).getOrCreate(_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2877
|
+
() => void store.outputs.messagesByChatId.getOrCreate(chatId).getOrCreate(_nullishCoalesce(_optionalChain([options, 'optionalAccess', _24 => _24.branchId]), () => ( null))).waitUntilLoaded()
|
|
3087
2878
|
// NOTE: Deliberately *not* using a dependency array here!
|
|
3088
2879
|
//
|
|
3089
2880
|
// It is important to call waitUntil on *every* render.
|
|
@@ -3094,7 +2885,7 @@ function useAiChatMessages(chatId, options) {
|
|
|
3094
2885
|
// *next* render after that, a *new* fetch/promise will get created.
|
|
3095
2886
|
);
|
|
3096
2887
|
return useSignal(
|
|
3097
|
-
store.outputs.messagesByChatId.getOrCreate(chatId).getOrCreate(_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2888
|
+
store.outputs.messagesByChatId.getOrCreate(chatId).getOrCreate(_nullishCoalesce(_optionalChain([options, 'optionalAccess', _25 => _25.branchId]), () => ( null))).signal
|
|
3098
2889
|
);
|
|
3099
2890
|
}
|
|
3100
2891
|
function useAiChatMessagesSuspense(chatId, options) {
|
|
@@ -3103,7 +2894,7 @@ function useAiChatMessagesSuspense(chatId, options) {
|
|
|
3103
2894
|
const store = getUmbrellaStoreForClient(client);
|
|
3104
2895
|
useEnsureAiConnection(client);
|
|
3105
2896
|
use(
|
|
3106
|
-
store.outputs.messagesByChatId.getOrCreate(chatId).getOrCreate(_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2897
|
+
store.outputs.messagesByChatId.getOrCreate(chatId).getOrCreate(_nullishCoalesce(_optionalChain([options, 'optionalAccess', _26 => _26.branchId]), () => ( null))).waitUntilLoaded()
|
|
3107
2898
|
);
|
|
3108
2899
|
const result = useAiChatMessages(chatId, options);
|
|
3109
2900
|
_core.assert.call(void 0, !result.error, "Did not expect error");
|
|
@@ -3222,12 +3013,12 @@ function useAiChatStatus(chatId, branchId) {
|
|
|
3222
3013
|
if (result.error) return IDLE;
|
|
3223
3014
|
const messages = result.messages;
|
|
3224
3015
|
const lastMessage = messages[messages.length - 1];
|
|
3225
|
-
if (_optionalChain([lastMessage, 'optionalAccess',
|
|
3016
|
+
if (_optionalChain([lastMessage, 'optionalAccess', _27 => _27.role]) !== "assistant") return IDLE;
|
|
3226
3017
|
if (lastMessage.status !== "generating" && lastMessage.status !== "awaiting-tool")
|
|
3227
3018
|
return IDLE;
|
|
3228
3019
|
const contentSoFar = lastMessage.contentSoFar;
|
|
3229
3020
|
const lastPart = contentSoFar[contentSoFar.length - 1];
|
|
3230
|
-
if (_optionalChain([lastPart, 'optionalAccess',
|
|
3021
|
+
if (_optionalChain([lastPart, 'optionalAccess', _28 => _28.type]) === "tool-invocation") {
|
|
3231
3022
|
return {
|
|
3232
3023
|
status: "generating",
|
|
3233
3024
|
partType: "tool-invocation",
|
|
@@ -3236,7 +3027,7 @@ function useAiChatStatus(chatId, branchId) {
|
|
|
3236
3027
|
} else {
|
|
3237
3028
|
return {
|
|
3238
3029
|
status: "generating",
|
|
3239
|
-
partType: _optionalChain([lastPart, 'optionalAccess',
|
|
3030
|
+
partType: _optionalChain([lastPart, 'optionalAccess', _29 => _29.type])
|
|
3240
3031
|
};
|
|
3241
3032
|
}
|
|
3242
3033
|
},
|
|
@@ -3264,7 +3055,7 @@ function useSendAiMessage(chatId, options) {
|
|
|
3264
3055
|
"chatId must be provided to either `useSendAiMessage` or its returned function."
|
|
3265
3056
|
)));
|
|
3266
3057
|
const messages = client[_core.kInternal].ai.signals.getChatMessagesForBranch\u03A3(resolvedChatId).get();
|
|
3267
|
-
if (process.env.NODE_ENV !== "production" && !messageOptionsCopilotId && !_optionalChain([options, 'optionalAccess',
|
|
3058
|
+
if (process.env.NODE_ENV !== "production" && !messageOptionsCopilotId && !_optionalChain([options, 'optionalAccess', _30 => _30.copilotId])) {
|
|
3268
3059
|
_core.console.warn(
|
|
3269
3060
|
`No copilot ID was provided to useSendAiMessage when sending the message "${messageText.slice(
|
|
3270
3061
|
0,
|
|
@@ -3276,8 +3067,8 @@ To ensure the correct copilot ID is used, specify it either through the hook as
|
|
|
3276
3067
|
)}\u2026", copilotId: "co_xxx" })'`
|
|
3277
3068
|
);
|
|
3278
3069
|
}
|
|
3279
|
-
const resolvedCopilotId = _nullishCoalesce(_nullishCoalesce(messageOptionsCopilotId, () => ( _optionalChain([options, 'optionalAccess',
|
|
3280
|
-
const lastMessageId = _nullishCoalesce(_optionalChain([messages, 'access',
|
|
3070
|
+
const resolvedCopilotId = _nullishCoalesce(_nullishCoalesce(messageOptionsCopilotId, () => ( _optionalChain([options, 'optionalAccess', _31 => _31.copilotId]))), () => ( client[_core.kInternal].ai.getLastUsedCopilotId(resolvedChatId)));
|
|
3071
|
+
const lastMessageId = _nullishCoalesce(_optionalChain([messages, 'access', _32 => _32[messages.length - 1], 'optionalAccess', _33 => _33.id]), () => ( null));
|
|
3281
3072
|
const content = [{ type: "text", text: messageText }];
|
|
3282
3073
|
const newMessageId = client[_core.kInternal].ai[_core.kInternal].context.messagesStore.createOptimistically(
|
|
3283
3074
|
resolvedChatId,
|
|
@@ -3297,14 +3088,14 @@ To ensure the correct copilot ID is used, specify it either through the hook as
|
|
|
3297
3088
|
{ id: newMessageId, parentMessageId: lastMessageId, content },
|
|
3298
3089
|
targetMessageId,
|
|
3299
3090
|
{
|
|
3300
|
-
stream: _nullishCoalesce(messageOptions.stream, () => ( _optionalChain([options, 'optionalAccess',
|
|
3091
|
+
stream: _nullishCoalesce(messageOptions.stream, () => ( _optionalChain([options, 'optionalAccess', _34 => _34.stream]))),
|
|
3301
3092
|
copilotId: resolvedCopilotId,
|
|
3302
|
-
timeout: _nullishCoalesce(messageOptions.timeout, () => ( _optionalChain([options, 'optionalAccess',
|
|
3093
|
+
timeout: _nullishCoalesce(messageOptions.timeout, () => ( _optionalChain([options, 'optionalAccess', _35 => _35.timeout])))
|
|
3303
3094
|
}
|
|
3304
3095
|
);
|
|
3305
3096
|
return newMessage;
|
|
3306
3097
|
},
|
|
3307
|
-
[client, chatId, _optionalChain([options, 'optionalAccess',
|
|
3098
|
+
[client, chatId, _optionalChain([options, 'optionalAccess', _36 => _36.copilotId]), _optionalChain([options, 'optionalAccess', _37 => _37.stream]), _optionalChain([options, 'optionalAccess', _38 => _38.timeout])]
|
|
3308
3099
|
);
|
|
3309
3100
|
}
|
|
3310
3101
|
function createSharedContext(client) {
|
|
@@ -3339,7 +3130,7 @@ function createSharedContext(client) {
|
|
|
3339
3130
|
}
|
|
3340
3131
|
function useEnsureNoLiveblocksProvider(options) {
|
|
3341
3132
|
const existing = useClientOrNull();
|
|
3342
|
-
if (!_optionalChain([options, 'optionalAccess',
|
|
3133
|
+
if (!_optionalChain([options, 'optionalAccess', _39 => _39.allowNesting]) && existing !== null) {
|
|
3343
3134
|
throw new Error(
|
|
3344
3135
|
"You cannot nest multiple LiveblocksProvider instances in the same React tree."
|
|
3345
3136
|
);
|
|
@@ -3502,7 +3293,7 @@ var _useAiChatMessagesSuspense = useAiChatMessagesSuspense;
|
|
|
3502
3293
|
var _useUrlMetadata = useUrlMetadata;
|
|
3503
3294
|
var _useUrlMetadataSuspense = useUrlMetadataSuspense;
|
|
3504
3295
|
function useSyncStatus_withClient(client, options) {
|
|
3505
|
-
const smooth = useInitial(_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3296
|
+
const smooth = useInitial(_nullishCoalesce(_optionalChain([options, 'optionalAccess', _40 => _40.smooth]), () => ( false)));
|
|
3506
3297
|
if (smooth) {
|
|
3507
3298
|
return useSyncStatusSmooth_withClient(client);
|
|
3508
3299
|
} else {
|
|
@@ -3674,8 +3465,8 @@ function makeRoomExtrasForClient(client) {
|
|
|
3674
3465
|
if (innerError.status === 403) {
|
|
3675
3466
|
const detailedMessage = [
|
|
3676
3467
|
innerError.message,
|
|
3677
|
-
_optionalChain([innerError, 'access',
|
|
3678
|
-
_optionalChain([innerError, 'access',
|
|
3468
|
+
_optionalChain([innerError, 'access', _41 => _41.details, 'optionalAccess', _42 => _42.suggestion]),
|
|
3469
|
+
_optionalChain([innerError, 'access', _43 => _43.details, 'optionalAccess', _44 => _44.docs])
|
|
3679
3470
|
].filter(Boolean).join("\n");
|
|
3680
3471
|
_core.console.error(detailedMessage);
|
|
3681
3472
|
}
|
|
@@ -3856,33 +3647,6 @@ function RoomProviderInner(props) {
|
|
|
3856
3647
|
(message) => void handleCommentEvent(message)
|
|
3857
3648
|
);
|
|
3858
3649
|
}, [client, room]);
|
|
3859
|
-
_react.useEffect.call(void 0, () => {
|
|
3860
|
-
const { store } = getRoomExtrasForClient(client);
|
|
3861
|
-
function handleFeedEvent(message) {
|
|
3862
|
-
switch (message.type) {
|
|
3863
|
-
case _core.ServerMsgCode.FEEDS_ADDED:
|
|
3864
|
-
case _core.ServerMsgCode.FEEDS_UPDATED:
|
|
3865
|
-
store.upsertFeeds(room.id, message.feeds);
|
|
3866
|
-
break;
|
|
3867
|
-
case _core.ServerMsgCode.FEED_DELETED:
|
|
3868
|
-
store.deleteFeed(room.id, message.feedId);
|
|
3869
|
-
break;
|
|
3870
|
-
case _core.ServerMsgCode.FEED_MESSAGES_ADDED:
|
|
3871
|
-
case _core.ServerMsgCode.FEED_MESSAGES_UPDATED:
|
|
3872
|
-
store.upsertFeedMessages(room.id, message.feedId, message.messages);
|
|
3873
|
-
break;
|
|
3874
|
-
case _core.ServerMsgCode.FEED_MESSAGES_DELETED:
|
|
3875
|
-
store.deleteFeedMessages(room.id, message.feedId, message.messageIds);
|
|
3876
|
-
break;
|
|
3877
|
-
// FEEDS_LIST and FEED_MESSAGES_LIST are handled by fetch promise resolution in room.ts
|
|
3878
|
-
default:
|
|
3879
|
-
break;
|
|
3880
|
-
}
|
|
3881
|
-
}
|
|
3882
|
-
return room.events.feeds.subscribe(
|
|
3883
|
-
(message) => void handleFeedEvent(message)
|
|
3884
|
-
);
|
|
3885
|
-
}, [client, room]);
|
|
3886
3650
|
_react.useEffect.call(void 0, () => {
|
|
3887
3651
|
const pair = stableEnterRoom(roomId, frozenProps);
|
|
3888
3652
|
setRoomLeavePair(pair);
|
|
@@ -3898,7 +3662,7 @@ function RoomProviderInner(props) {
|
|
|
3898
3662
|
}
|
|
3899
3663
|
function useRoom_withRoomContext(RoomContext, options) {
|
|
3900
3664
|
const room = useRoomOrNull(RoomContext);
|
|
3901
|
-
if (room === null && !_optionalChain([options, 'optionalAccess',
|
|
3665
|
+
if (room === null && !_optionalChain([options, 'optionalAccess', _45 => _45.allowOutsideRoom])) {
|
|
3902
3666
|
throw new Error("RoomProvider is missing from the React tree.");
|
|
3903
3667
|
}
|
|
3904
3668
|
return room;
|
|
@@ -4325,126 +4089,6 @@ function useThreads_withRoomContext(RoomContext, options = {}) {
|
|
|
4325
4089
|
useScrollToCommentOnLoadEffect(scrollOnLoad, result);
|
|
4326
4090
|
return result;
|
|
4327
4091
|
}
|
|
4328
|
-
function useFeeds_withRoomContext(RoomContext, options) {
|
|
4329
|
-
const room = useRoom_withRoomContext(RoomContext);
|
|
4330
|
-
const client = useClient();
|
|
4331
|
-
const { store } = getRoomExtrasForClient(client);
|
|
4332
|
-
const queryKey = makeFeedsQueryKey(room.id, options);
|
|
4333
|
-
const loadableResource = store.outputs.loadingFeeds.getOrCreate(queryKey);
|
|
4334
|
-
_react.useEffect.call(void 0, () => {
|
|
4335
|
-
void loadableResource.waitUntilLoaded();
|
|
4336
|
-
}, [room, loadableResource]);
|
|
4337
|
-
return useSignal(loadableResource.signal);
|
|
4338
|
-
}
|
|
4339
|
-
function useFeeds(options) {
|
|
4340
|
-
return useFeeds_withRoomContext(GlobalRoomContext, options);
|
|
4341
|
-
}
|
|
4342
|
-
function useFeedMessages_withRoomContext(RoomContext, feedId, options) {
|
|
4343
|
-
const room = useRoom_withRoomContext(RoomContext);
|
|
4344
|
-
const client = useClient();
|
|
4345
|
-
const { store } = getRoomExtrasForClient(client);
|
|
4346
|
-
const queryKey = makeFeedMessagesQueryKey(room.id, feedId, options);
|
|
4347
|
-
_react.useEffect.call(void 0, () => {
|
|
4348
|
-
void store.outputs.loadingFeedMessages.getOrCreate(queryKey).waitUntilLoaded();
|
|
4349
|
-
});
|
|
4350
|
-
return useSignal(
|
|
4351
|
-
store.outputs.loadingFeedMessages.getOrCreate(queryKey).signal
|
|
4352
|
-
);
|
|
4353
|
-
}
|
|
4354
|
-
function useFeedMessages(feedId, options) {
|
|
4355
|
-
return useFeedMessages_withRoomContext(GlobalRoomContext, feedId, options);
|
|
4356
|
-
}
|
|
4357
|
-
function useFeedsSuspense_withRoomContext(RoomContext, options) {
|
|
4358
|
-
ensureNotServerSide();
|
|
4359
|
-
const client = useClient();
|
|
4360
|
-
const room = useRoom_withRoomContext(RoomContext);
|
|
4361
|
-
const { store } = getRoomExtrasForClient(client);
|
|
4362
|
-
const queryKey = makeFeedsQueryKey(room.id, options);
|
|
4363
|
-
use(store.outputs.loadingFeeds.getOrCreate(queryKey).waitUntilLoaded());
|
|
4364
|
-
const result = useFeeds_withRoomContext(RoomContext, options);
|
|
4365
|
-
_core.assert.call(void 0, !result.error, "Did not expect error");
|
|
4366
|
-
_core.assert.call(void 0, !result.isLoading, "Did not expect loading");
|
|
4367
|
-
return result;
|
|
4368
|
-
}
|
|
4369
|
-
function useFeedsSuspense(options) {
|
|
4370
|
-
return useFeedsSuspense_withRoomContext(GlobalRoomContext, options);
|
|
4371
|
-
}
|
|
4372
|
-
function useFeedMessagesSuspense_withRoomContext(RoomContext, feedId, options) {
|
|
4373
|
-
ensureNotServerSide();
|
|
4374
|
-
const client = useClient();
|
|
4375
|
-
const room = useRoom_withRoomContext(RoomContext);
|
|
4376
|
-
const { store } = getRoomExtrasForClient(client);
|
|
4377
|
-
const queryKey = makeFeedMessagesQueryKey(room.id, feedId, options);
|
|
4378
|
-
use(store.outputs.loadingFeedMessages.getOrCreate(queryKey).waitUntilLoaded());
|
|
4379
|
-
const result = useFeedMessages_withRoomContext(RoomContext, feedId, options);
|
|
4380
|
-
_core.assert.call(void 0, !result.error, "Did not expect error");
|
|
4381
|
-
_core.assert.call(void 0, !result.isLoading, "Did not expect loading");
|
|
4382
|
-
return result;
|
|
4383
|
-
}
|
|
4384
|
-
function useFeedMessagesSuspense(feedId, options) {
|
|
4385
|
-
return useFeedMessagesSuspense_withRoomContext(
|
|
4386
|
-
GlobalRoomContext,
|
|
4387
|
-
feedId,
|
|
4388
|
-
options
|
|
4389
|
-
);
|
|
4390
|
-
}
|
|
4391
|
-
function useCreateFeed_withRoomContext(RoomContext) {
|
|
4392
|
-
const room = useRoom_withRoomContext(RoomContext);
|
|
4393
|
-
return _react.useCallback.call(void 0,
|
|
4394
|
-
(feedId, options) => room.addFeed(feedId, options),
|
|
4395
|
-
[room]
|
|
4396
|
-
);
|
|
4397
|
-
}
|
|
4398
|
-
function useCreateFeed() {
|
|
4399
|
-
return useCreateFeed_withRoomContext(GlobalRoomContext);
|
|
4400
|
-
}
|
|
4401
|
-
function useDeleteFeed_withRoomContext(RoomContext) {
|
|
4402
|
-
const room = useRoom_withRoomContext(RoomContext);
|
|
4403
|
-
return _react.useCallback.call(void 0, (feedId) => room.deleteFeed(feedId), [room]);
|
|
4404
|
-
}
|
|
4405
|
-
function useDeleteFeed() {
|
|
4406
|
-
return useDeleteFeed_withRoomContext(GlobalRoomContext);
|
|
4407
|
-
}
|
|
4408
|
-
function useUpdateFeedMetadata_withRoomContext(RoomContext) {
|
|
4409
|
-
const room = useRoom_withRoomContext(RoomContext);
|
|
4410
|
-
return _react.useCallback.call(void 0,
|
|
4411
|
-
(feedId, metadata) => room.updateFeed(feedId, metadata),
|
|
4412
|
-
[room]
|
|
4413
|
-
);
|
|
4414
|
-
}
|
|
4415
|
-
function useUpdateFeedMetadata() {
|
|
4416
|
-
return useUpdateFeedMetadata_withRoomContext(GlobalRoomContext);
|
|
4417
|
-
}
|
|
4418
|
-
function useCreateFeedMessage_withRoomContext(RoomContext) {
|
|
4419
|
-
const room = useRoom_withRoomContext(RoomContext);
|
|
4420
|
-
return _react.useCallback.call(void 0,
|
|
4421
|
-
(feedId, data, options) => room.addFeedMessage(feedId, data, options),
|
|
4422
|
-
[room]
|
|
4423
|
-
);
|
|
4424
|
-
}
|
|
4425
|
-
function useCreateFeedMessage() {
|
|
4426
|
-
return useCreateFeedMessage_withRoomContext(GlobalRoomContext);
|
|
4427
|
-
}
|
|
4428
|
-
function useDeleteFeedMessage_withRoomContext(RoomContext) {
|
|
4429
|
-
const room = useRoom_withRoomContext(RoomContext);
|
|
4430
|
-
return _react.useCallback.call(void 0,
|
|
4431
|
-
(feedId, messageId) => room.deleteFeedMessage(feedId, messageId),
|
|
4432
|
-
[room]
|
|
4433
|
-
);
|
|
4434
|
-
}
|
|
4435
|
-
function useDeleteFeedMessage() {
|
|
4436
|
-
return useDeleteFeedMessage_withRoomContext(GlobalRoomContext);
|
|
4437
|
-
}
|
|
4438
|
-
function useUpdateFeedMessage_withRoomContext(RoomContext) {
|
|
4439
|
-
const room = useRoom_withRoomContext(RoomContext);
|
|
4440
|
-
return _react.useCallback.call(void 0,
|
|
4441
|
-
(feedId, messageId, data, options) => room.updateFeedMessage(feedId, messageId, data, options),
|
|
4442
|
-
[room]
|
|
4443
|
-
);
|
|
4444
|
-
}
|
|
4445
|
-
function useUpdateFeedMessage() {
|
|
4446
|
-
return useUpdateFeedMessage_withRoomContext(GlobalRoomContext);
|
|
4447
|
-
}
|
|
4448
4092
|
function useThreads(options = {}) {
|
|
4449
4093
|
return useThreads_withRoomContext(GlobalRoomContext, options);
|
|
4450
4094
|
}
|
|
@@ -4458,7 +4102,7 @@ function useSearchComments_withRoomContext(RoomContext, options) {
|
|
|
4458
4102
|
const room = useRoom_withRoomContext(RoomContext);
|
|
4459
4103
|
const queryKey = _core.stableStringify.call(void 0, [room.id, options.query]);
|
|
4460
4104
|
_react.useEffect.call(void 0, () => {
|
|
4461
|
-
const currentRequestId = (_nullishCoalesce(_optionalChain([currentRequestInfo, 'access',
|
|
4105
|
+
const currentRequestId = (_nullishCoalesce(_optionalChain([currentRequestInfo, 'access', _46 => _46.current, 'optionalAccess', _47 => _47.id]), () => ( 0))) + 1;
|
|
4462
4106
|
const controller = new AbortController();
|
|
4463
4107
|
currentRequestInfo.current = { id: currentRequestId, controller };
|
|
4464
4108
|
setResult((result2) => {
|
|
@@ -4475,12 +4119,12 @@ function useSearchComments_withRoomContext(RoomContext, options) {
|
|
|
4475
4119
|
{ signal: controller.signal }
|
|
4476
4120
|
).then(({ data }) => {
|
|
4477
4121
|
if (controller.signal.aborted) return;
|
|
4478
|
-
if (_optionalChain([currentRequestInfo, 'access',
|
|
4122
|
+
if (_optionalChain([currentRequestInfo, 'access', _48 => _48.current, 'optionalAccess', _49 => _49.id]) !== currentRequestId) return;
|
|
4479
4123
|
setResult({ isLoading: false, results: data });
|
|
4480
4124
|
currentRequestInfo.current = null;
|
|
4481
4125
|
}).catch((err) => {
|
|
4482
4126
|
if (controller.signal.aborted) return;
|
|
4483
|
-
if (_optionalChain([currentRequestInfo, 'access',
|
|
4127
|
+
if (_optionalChain([currentRequestInfo, 'access', _50 => _50.current, 'optionalAccess', _51 => _51.id]) !== currentRequestId) return;
|
|
4484
4128
|
setResult({ isLoading: false, error: err });
|
|
4485
4129
|
currentRequestInfo.current = null;
|
|
4486
4130
|
});
|
|
@@ -4547,7 +4191,7 @@ function useCreateRoomThread(roomId) {
|
|
|
4547
4191
|
thread: newThread,
|
|
4548
4192
|
roomId
|
|
4549
4193
|
});
|
|
4550
|
-
const attachmentIds = _optionalChain([attachments, 'optionalAccess',
|
|
4194
|
+
const attachmentIds = _optionalChain([attachments, 'optionalAccess', _52 => _52.map, 'call', _53 => _53((attachment) => attachment.id)]);
|
|
4551
4195
|
client[_core.kInternal].httpClient.createThread({
|
|
4552
4196
|
roomId,
|
|
4553
4197
|
threadId,
|
|
@@ -4592,7 +4236,7 @@ function useDeleteRoomThread(roomId) {
|
|
|
4592
4236
|
const { store, onMutationFailure } = getRoomExtrasForClient(client);
|
|
4593
4237
|
const userId = getCurrentUserId(client);
|
|
4594
4238
|
const existing = store.outputs.threads.get().get(threadId);
|
|
4595
|
-
if (_optionalChain([existing, 'optionalAccess',
|
|
4239
|
+
if (_optionalChain([existing, 'optionalAccess', _54 => _54.comments, 'optionalAccess', _55 => _55[0], 'optionalAccess', _56 => _56.userId]) !== userId) {
|
|
4596
4240
|
throw new Error("Only the thread creator can delete the thread");
|
|
4597
4241
|
}
|
|
4598
4242
|
const optimisticId = store.optimisticUpdates.add({
|
|
@@ -4744,7 +4388,7 @@ function useCreateRoomComment(roomId) {
|
|
|
4744
4388
|
type: "create-comment",
|
|
4745
4389
|
comment
|
|
4746
4390
|
});
|
|
4747
|
-
const attachmentIds = _optionalChain([attachments, 'optionalAccess',
|
|
4391
|
+
const attachmentIds = _optionalChain([attachments, 'optionalAccess', _57 => _57.map, 'call', _58 => _58((attachment) => attachment.id)]);
|
|
4748
4392
|
client[_core.kInternal].httpClient.createComment({
|
|
4749
4393
|
roomId,
|
|
4750
4394
|
threadId,
|
|
@@ -4822,7 +4466,7 @@ function useEditRoomComment(roomId) {
|
|
|
4822
4466
|
metadata: updatedMetadata
|
|
4823
4467
|
}
|
|
4824
4468
|
});
|
|
4825
|
-
const attachmentIds = _optionalChain([attachments, 'optionalAccess',
|
|
4469
|
+
const attachmentIds = _optionalChain([attachments, 'optionalAccess', _59 => _59.map, 'call', _60 => _60((attachment) => attachment.id)]);
|
|
4826
4470
|
client[_core.kInternal].httpClient.editComment({
|
|
4827
4471
|
roomId,
|
|
4828
4472
|
threadId,
|
|
@@ -5208,7 +4852,7 @@ function useRoomThreadSubscription(roomId, threadId) {
|
|
|
5208
4852
|
}
|
|
5209
4853
|
return {
|
|
5210
4854
|
status: "subscribed",
|
|
5211
|
-
unreadSince: _nullishCoalesce(_optionalChain([notification, 'optionalAccess',
|
|
4855
|
+
unreadSince: _nullishCoalesce(_optionalChain([notification, 'optionalAccess', _61 => _61.readAt]), () => ( null)),
|
|
5212
4856
|
subscribe,
|
|
5213
4857
|
unsubscribe
|
|
5214
4858
|
};
|
|
@@ -5386,6 +5030,9 @@ function useSuspendUntilPresenceReady_withRoomContext(RoomContext) {
|
|
|
5386
5030
|
const room = useRoom_withRoomContext(RoomContext);
|
|
5387
5031
|
use(room.waitUntilPresenceReady());
|
|
5388
5032
|
}
|
|
5033
|
+
function useSuspendUntilPresenceReady() {
|
|
5034
|
+
return useSuspendUntilPresenceReady_withRoomContext(GlobalRoomContext);
|
|
5035
|
+
}
|
|
5389
5036
|
function useSelfSuspense_withRoomContext(RoomContext, selector, isEqual) {
|
|
5390
5037
|
useSuspendUntilPresenceReady_withRoomContext(RoomContext);
|
|
5391
5038
|
return useSelf_withRoomContext(
|
|
@@ -5460,6 +5107,9 @@ function useSuspendUntilStorageReady_withRoomContext(RoomContext) {
|
|
|
5460
5107
|
const room = useRoom_withRoomContext(RoomContext);
|
|
5461
5108
|
use(room.waitUntilStorageReady());
|
|
5462
5109
|
}
|
|
5110
|
+
function useSuspendUntilStorageReady() {
|
|
5111
|
+
return useSuspendUntilStorageReady_withRoomContext(GlobalRoomContext);
|
|
5112
|
+
}
|
|
5463
5113
|
function useStorageSuspense_withRoomContext(RoomContext, selector, isEqual) {
|
|
5464
5114
|
useSuspendUntilStorageReady_withRoomContext(RoomContext);
|
|
5465
5115
|
return useStorage_withRoomContext(
|
|
@@ -5491,7 +5141,7 @@ function useThreadsSuspense(options = {}) {
|
|
|
5491
5141
|
return useThreadsSuspense_withRoomContext(GlobalRoomContext, options);
|
|
5492
5142
|
}
|
|
5493
5143
|
function selectorFor_useAttachmentUrl(state) {
|
|
5494
|
-
if (state === void 0 || _optionalChain([state, 'optionalAccess',
|
|
5144
|
+
if (state === void 0 || _optionalChain([state, 'optionalAccess', _62 => _62.isLoading])) {
|
|
5495
5145
|
return _nullishCoalesce(state, () => ( { isLoading: true }));
|
|
5496
5146
|
}
|
|
5497
5147
|
if (state.error) {
|
|
@@ -5748,36 +5398,6 @@ function createRoomContext(client) {
|
|
|
5748
5398
|
function useUpdateRoomSubscriptionSettings_withBoundRoomContext() {
|
|
5749
5399
|
return useUpdateRoomSubscriptionSettings_withRoomContext(BoundRoomContext);
|
|
5750
5400
|
}
|
|
5751
|
-
function useFeeds_withBoundRoomContext(...args) {
|
|
5752
|
-
return useFeeds_withRoomContext(BoundRoomContext, ...args);
|
|
5753
|
-
}
|
|
5754
|
-
function useFeedMessages_withBoundRoomContext(...args) {
|
|
5755
|
-
return useFeedMessages_withRoomContext(BoundRoomContext, ...args);
|
|
5756
|
-
}
|
|
5757
|
-
function useFeedsSuspense_withBoundRoomContext(...args) {
|
|
5758
|
-
return useFeedsSuspense_withRoomContext(BoundRoomContext, ...args);
|
|
5759
|
-
}
|
|
5760
|
-
function useFeedMessagesSuspense_withBoundRoomContext(...args) {
|
|
5761
|
-
return useFeedMessagesSuspense_withRoomContext(BoundRoomContext, ...args);
|
|
5762
|
-
}
|
|
5763
|
-
function useCreateFeed_withBoundRoomContext() {
|
|
5764
|
-
return useCreateFeed_withRoomContext(BoundRoomContext);
|
|
5765
|
-
}
|
|
5766
|
-
function useDeleteFeed_withBoundRoomContext() {
|
|
5767
|
-
return useDeleteFeed_withRoomContext(BoundRoomContext);
|
|
5768
|
-
}
|
|
5769
|
-
function useUpdateFeedMetadata_withBoundRoomContext() {
|
|
5770
|
-
return useUpdateFeedMetadata_withRoomContext(BoundRoomContext);
|
|
5771
|
-
}
|
|
5772
|
-
function useCreateFeedMessage_withBoundRoomContext() {
|
|
5773
|
-
return useCreateFeedMessage_withRoomContext(BoundRoomContext);
|
|
5774
|
-
}
|
|
5775
|
-
function useDeleteFeedMessage_withBoundRoomContext() {
|
|
5776
|
-
return useDeleteFeedMessage_withRoomContext(BoundRoomContext);
|
|
5777
|
-
}
|
|
5778
|
-
function useUpdateFeedMessage_withBoundRoomContext() {
|
|
5779
|
-
return useUpdateFeedMessage_withRoomContext(BoundRoomContext);
|
|
5780
|
-
}
|
|
5781
5401
|
const shared = createSharedContext(client);
|
|
5782
5402
|
const bundle = {
|
|
5783
5403
|
RoomContext: BoundRoomContext,
|
|
@@ -5827,22 +5447,6 @@ function createRoomContext(client) {
|
|
|
5827
5447
|
// prettier-ignore
|
|
5828
5448
|
useThreads: useThreads_withBoundRoomContext,
|
|
5829
5449
|
// prettier-ignore
|
|
5830
|
-
useFeeds: useFeeds_withBoundRoomContext,
|
|
5831
|
-
// prettier-ignore
|
|
5832
|
-
useFeedMessages: useFeedMessages_withBoundRoomContext,
|
|
5833
|
-
// prettier-ignore
|
|
5834
|
-
useCreateFeed: useCreateFeed_withBoundRoomContext,
|
|
5835
|
-
// prettier-ignore
|
|
5836
|
-
useDeleteFeed: useDeleteFeed_withBoundRoomContext,
|
|
5837
|
-
// prettier-ignore
|
|
5838
|
-
useUpdateFeedMetadata: useUpdateFeedMetadata_withBoundRoomContext,
|
|
5839
|
-
// prettier-ignore
|
|
5840
|
-
useCreateFeedMessage: useCreateFeedMessage_withBoundRoomContext,
|
|
5841
|
-
// prettier-ignore
|
|
5842
|
-
useDeleteFeedMessage: useDeleteFeedMessage_withBoundRoomContext,
|
|
5843
|
-
// prettier-ignore
|
|
5844
|
-
useUpdateFeedMessage: useUpdateFeedMessage_withBoundRoomContext,
|
|
5845
|
-
// prettier-ignore
|
|
5846
5450
|
useCreateThread: useCreateThread_withBoundRoomContext,
|
|
5847
5451
|
// prettier-ignore
|
|
5848
5452
|
useDeleteThread: useDeleteThread_withBoundRoomContext,
|
|
@@ -5933,22 +5537,6 @@ function createRoomContext(client) {
|
|
|
5933
5537
|
// prettier-ignore
|
|
5934
5538
|
useThreads: useThreadsSuspense_withBoundRoomContext,
|
|
5935
5539
|
// prettier-ignore
|
|
5936
|
-
useFeeds: useFeedsSuspense_withBoundRoomContext,
|
|
5937
|
-
// prettier-ignore
|
|
5938
|
-
useFeedMessages: useFeedMessagesSuspense_withBoundRoomContext,
|
|
5939
|
-
// prettier-ignore
|
|
5940
|
-
useCreateFeed: useCreateFeed_withBoundRoomContext,
|
|
5941
|
-
// prettier-ignore
|
|
5942
|
-
useDeleteFeed: useDeleteFeed_withBoundRoomContext,
|
|
5943
|
-
// prettier-ignore
|
|
5944
|
-
useUpdateFeedMetadata: useUpdateFeedMetadata_withBoundRoomContext,
|
|
5945
|
-
// prettier-ignore
|
|
5946
|
-
useCreateFeedMessage: useCreateFeedMessage_withBoundRoomContext,
|
|
5947
|
-
// prettier-ignore
|
|
5948
|
-
useDeleteFeedMessage: useDeleteFeedMessage_withBoundRoomContext,
|
|
5949
|
-
// prettier-ignore
|
|
5950
|
-
useUpdateFeedMessage: useUpdateFeedMessage_withBoundRoomContext,
|
|
5951
|
-
// prettier-ignore
|
|
5952
5540
|
useCreateThread: useCreateThread_withBoundRoomContext,
|
|
5953
5541
|
// prettier-ignore
|
|
5954
5542
|
useDeleteThread: useDeleteThread_withBoundRoomContext,
|
|
@@ -6013,10 +5601,6 @@ var _useMyPresence = useMyPresence;
|
|
|
6013
5601
|
var _useOthersMapped = useOthersMapped;
|
|
6014
5602
|
var _useOthersMappedSuspense = useOthersMappedSuspense;
|
|
6015
5603
|
var _useThreads = useThreads;
|
|
6016
|
-
var _useFeeds = useFeeds;
|
|
6017
|
-
var _useFeedMessages = useFeedMessages;
|
|
6018
|
-
var _useFeedsSuspense = useFeedsSuspense;
|
|
6019
|
-
var _useFeedMessagesSuspense = useFeedMessagesSuspense;
|
|
6020
5604
|
var _useSearchComments = useSearchComments;
|
|
6021
5605
|
var _useThreadsSuspense = useThreadsSuspense;
|
|
6022
5606
|
var _useRoomSubscriptionSettings = useRoomSubscriptionSettings;
|
|
@@ -6168,12 +5752,5 @@ var _useUpdateMyPresence = useUpdateMyPresence;
|
|
|
6168
5752
|
|
|
6169
5753
|
|
|
6170
5754
|
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
exports.ClientContext = ClientContext; exports.useClientOrNull = useClientOrNull; exports.useClient = useClient; exports.GlobalRoomContext = GlobalRoomContext; 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.useMarkRoomThreadAsRead = useMarkRoomThreadAsRead; exports.useMarkThreadAsRead = useMarkThreadAsRead; 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;
|
|
6179
|
-
//# sourceMappingURL=chunk-6VGVFTSY.cjs.map
|
|
5755
|
+
exports.ClientContext = ClientContext; exports.useClientOrNull = useClientOrNull; exports.useClient = useClient; exports.GlobalRoomContext = GlobalRoomContext; exports.useLatest = useLatest; exports.useInitial = useInitial; 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.useCreateRoomComment = useCreateRoomComment; exports.useEditRoomComment = useEditRoomComment; exports.useDeleteComment = useDeleteComment; exports.useDeleteRoomComment = useDeleteRoomComment; exports.useAddRoomCommentReaction = useAddRoomCommentReaction; exports.useRemoveReaction = useRemoveReaction; exports.useRemoveRoomCommentReaction = useRemoveRoomCommentReaction; exports.useMarkRoomThreadAsRead = useMarkRoomThreadAsRead; exports.useMarkThreadAsRead = useMarkThreadAsRead; 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.useSuspendUntilPresenceReady = useSuspendUntilPresenceReady; exports.useOthersConnectionIdsSuspense = useOthersConnectionIdsSuspense; exports.useSuspendUntilStorageReady = useSuspendUntilStorageReady; 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._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;
|
|
5756
|
+
//# sourceMappingURL=chunk-QEGVIJNN.cjs.map
|