@liveblocks/react 3.15.0-feeds1 → 3.15.0-rc1
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-JQZ4SSGD.js → chunk-7TVEKSIE.js} +725 -527
- package/dist/chunk-7TVEKSIE.js.map +1 -0
- package/dist/{chunk-FLKIHVRX.cjs → chunk-L3D3UECF.cjs} +761 -563
- package/dist/chunk-L3D3UECF.cjs.map +1 -0
- package/dist/{chunk-PQ62AG2K.cjs → chunk-SBRWCEYI.cjs} +2 -2
- package/dist/{chunk-PQ62AG2K.cjs.map → chunk-SBRWCEYI.cjs.map} +1 -1
- package/dist/{chunk-XMFQTQBJ.js → chunk-XWDDGVZ4.js} +2 -2
- 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 +4 -20
- package/dist/index.js.map +1 -1
- package/dist/{room-BFE9TLUA.d.cts → room-C3ujtNzt.d.cts} +20 -182
- package/dist/{room-BFE9TLUA.d.ts → room-C3ujtNzt.d.ts} +20 -182
- 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 +4 -20
- package/dist/suspense.js.map +1 -1
- package/package.json +3 -3
- package/dist/chunk-FLKIHVRX.cjs.map +0 -1
- package/dist/chunk-JQZ4SSGD.js.map +0 -1
- /package/dist/{chunk-XMFQTQBJ.js.map → chunk-XWDDGVZ4.js.map} +0 -0
|
@@ -8,8 +8,8 @@ function useClientOrNull() {
|
|
|
8
8
|
function useClient() {
|
|
9
9
|
return useClientOrNull() ?? raise("LiveblocksProvider is missing from the React tree.");
|
|
10
10
|
}
|
|
11
|
-
var
|
|
12
|
-
function useRoomOrNull() {
|
|
11
|
+
var GlobalRoomContext = createContext(null);
|
|
12
|
+
function useRoomOrNull(RoomContext = GlobalRoomContext) {
|
|
13
13
|
return useContext(RoomContext);
|
|
14
14
|
}
|
|
15
15
|
function useIsInsideRoom() {
|
|
@@ -512,12 +512,6 @@ function makeAiChatsQueryKey(query) {
|
|
|
512
512
|
function makeInboxNotificationsQueryKey(query) {
|
|
513
513
|
return stableStringify(query ?? {});
|
|
514
514
|
}
|
|
515
|
-
function makeFeedsQueryKey(roomId, options) {
|
|
516
|
-
return stableStringify([roomId, options ?? {}]);
|
|
517
|
-
}
|
|
518
|
-
function makeFeedMessagesQueryKey(roomId, feedId, options) {
|
|
519
|
-
return stableStringify([roomId, feedId, options ?? {}]);
|
|
520
|
-
}
|
|
521
515
|
function usify(promise) {
|
|
522
516
|
if ("status" in promise) {
|
|
523
517
|
return promise;
|
|
@@ -985,16 +979,6 @@ var UmbrellaStore = class {
|
|
|
985
979
|
#roomVersionsLastRequestedAtByRoom = /* @__PURE__ */ new Map();
|
|
986
980
|
// Notification Settings
|
|
987
981
|
#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 MutableSignal3({
|
|
993
|
-
version: 0
|
|
994
|
-
});
|
|
995
|
-
#feedMessagesSignal = new MutableSignal3({
|
|
996
|
-
version: 0
|
|
997
|
-
});
|
|
998
982
|
constructor(client) {
|
|
999
983
|
this.#client = client[kInternal2].as();
|
|
1000
984
|
this.optimisticUpdates = createStore_forOptimistic(this.#client);
|
|
@@ -1366,91 +1350,6 @@ var UmbrellaStore = class {
|
|
|
1366
1350
|
return { signal, waitUntilLoaded: resource.waitUntilLoaded };
|
|
1367
1351
|
}
|
|
1368
1352
|
);
|
|
1369
|
-
const loadingFeeds = new 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: options?.since,
|
|
1382
|
-
metadata: options?.metadata
|
|
1383
|
-
});
|
|
1384
|
-
this.upsertFeeds(roomId, result.feeds);
|
|
1385
|
-
return result.nextCursor ?? null;
|
|
1386
|
-
});
|
|
1387
|
-
const signal = 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
|
-
shallow2
|
|
1407
|
-
);
|
|
1408
|
-
return { signal, waitUntilLoaded: resource.waitUntilLoaded };
|
|
1409
|
-
}
|
|
1410
|
-
);
|
|
1411
|
-
const loadingFeedMessages = new 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: options?.limit
|
|
1424
|
-
});
|
|
1425
|
-
this.upsertFeedMessages(roomId, feedId, result.messages);
|
|
1426
|
-
return result.nextCursor ?? null;
|
|
1427
|
-
});
|
|
1428
|
-
const signal = 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
|
-
shallow2
|
|
1450
|
-
);
|
|
1451
|
-
return { signal, waitUntilLoaded: resource.waitUntilLoaded };
|
|
1452
|
-
}
|
|
1453
|
-
);
|
|
1454
1353
|
this.outputs = {
|
|
1455
1354
|
threadifications,
|
|
1456
1355
|
threads,
|
|
@@ -1466,9 +1365,7 @@ var UmbrellaStore = class {
|
|
|
1466
1365
|
aiChats,
|
|
1467
1366
|
messagesByChatId,
|
|
1468
1367
|
aiChatById,
|
|
1469
|
-
urlMetadataByUrl
|
|
1470
|
-
loadingFeeds,
|
|
1471
|
-
loadingFeedMessages
|
|
1368
|
+
urlMetadataByUrl
|
|
1472
1369
|
};
|
|
1473
1370
|
autobind(this);
|
|
1474
1371
|
}
|
|
@@ -1689,64 +1586,6 @@ var UmbrellaStore = class {
|
|
|
1689
1586
|
result.subscriptions.deleted
|
|
1690
1587
|
);
|
|
1691
1588
|
}
|
|
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
|
-
}
|
|
1750
1589
|
async fetchUnreadNotificationsCount(queryKey, signal) {
|
|
1751
1590
|
const query = JSON.parse(queryKey);
|
|
1752
1591
|
const result = await this.#client.getUnreadInboxNotificationsCount({
|
|
@@ -3519,6 +3358,7 @@ import {
|
|
|
3519
3358
|
stableStringify as stableStringify2
|
|
3520
3359
|
} from "@liveblocks/core";
|
|
3521
3360
|
import {
|
|
3361
|
+
createContext as createContext2,
|
|
3522
3362
|
useCallback as useCallback3,
|
|
3523
3363
|
useEffect as useEffect6,
|
|
3524
3364
|
useMemo as useMemo4,
|
|
@@ -3609,15 +3449,6 @@ function getCurrentUserId(client) {
|
|
|
3609
3449
|
return userId;
|
|
3610
3450
|
}
|
|
3611
3451
|
var _extras2 = /* @__PURE__ */ new WeakMap();
|
|
3612
|
-
var _bundles2 = /* @__PURE__ */ new WeakMap();
|
|
3613
|
-
function getOrCreateRoomContextBundle(client) {
|
|
3614
|
-
let bundle = _bundles2.get(client);
|
|
3615
|
-
if (!bundle) {
|
|
3616
|
-
bundle = makeRoomContextBundle(client);
|
|
3617
|
-
_bundles2.set(client, bundle);
|
|
3618
|
-
}
|
|
3619
|
-
return bundle;
|
|
3620
|
-
}
|
|
3621
3452
|
function getRoomExtrasForClient(client) {
|
|
3622
3453
|
let extras = _extras2.get(client);
|
|
3623
3454
|
if (!extras) {
|
|
@@ -3705,130 +3536,6 @@ function makeRoomExtrasForClient(client) {
|
|
|
3705
3536
|
)
|
|
3706
3537
|
};
|
|
3707
3538
|
}
|
|
3708
|
-
function makeRoomContextBundle(client) {
|
|
3709
|
-
function RoomProvider_withImplicitLiveblocksProvider(props) {
|
|
3710
|
-
return /* @__PURE__ */ jsx2(LiveblocksProviderWithClient, { client, allowNesting: true, children: /* @__PURE__ */ jsx2(RoomProvider, { ...props }) });
|
|
3711
|
-
}
|
|
3712
|
-
const shared = createSharedContext(client);
|
|
3713
|
-
const bundle = {
|
|
3714
|
-
RoomContext,
|
|
3715
|
-
RoomProvider: RoomProvider_withImplicitLiveblocksProvider,
|
|
3716
|
-
useRoom,
|
|
3717
|
-
useStatus,
|
|
3718
|
-
useBroadcastEvent,
|
|
3719
|
-
useOthersListener,
|
|
3720
|
-
useLostConnectionListener,
|
|
3721
|
-
useEventListener,
|
|
3722
|
-
useHistory,
|
|
3723
|
-
useUndo,
|
|
3724
|
-
useRedo,
|
|
3725
|
-
useCanRedo,
|
|
3726
|
-
useCanUndo,
|
|
3727
|
-
useStorageRoot,
|
|
3728
|
-
useStorage,
|
|
3729
|
-
useSelf,
|
|
3730
|
-
useMyPresence,
|
|
3731
|
-
useUpdateMyPresence,
|
|
3732
|
-
useOthers,
|
|
3733
|
-
useOthersMapped,
|
|
3734
|
-
useOthersConnectionIds,
|
|
3735
|
-
useOther,
|
|
3736
|
-
// prettier-ignore
|
|
3737
|
-
useMutation,
|
|
3738
|
-
useThreads,
|
|
3739
|
-
useFeeds,
|
|
3740
|
-
useFeedMessages,
|
|
3741
|
-
useCreateFeed,
|
|
3742
|
-
useDeleteFeed,
|
|
3743
|
-
useUpdateFeedMetadata,
|
|
3744
|
-
useCreateFeedMessage,
|
|
3745
|
-
useDeleteFeedMessage,
|
|
3746
|
-
useUpdateFeedMessage,
|
|
3747
|
-
useSearchComments,
|
|
3748
|
-
// prettier-ignore
|
|
3749
|
-
useCreateThread,
|
|
3750
|
-
useDeleteThread,
|
|
3751
|
-
useEditThreadMetadata,
|
|
3752
|
-
useMarkThreadAsResolved,
|
|
3753
|
-
useMarkThreadAsUnresolved,
|
|
3754
|
-
useSubscribeToThread,
|
|
3755
|
-
useUnsubscribeFromThread,
|
|
3756
|
-
useCreateComment,
|
|
3757
|
-
useEditComment,
|
|
3758
|
-
useEditCommentMetadata,
|
|
3759
|
-
useDeleteComment,
|
|
3760
|
-
useAddReaction,
|
|
3761
|
-
useRemoveReaction,
|
|
3762
|
-
useMarkThreadAsRead,
|
|
3763
|
-
useThreadSubscription,
|
|
3764
|
-
useAttachmentUrl,
|
|
3765
|
-
useHistoryVersions,
|
|
3766
|
-
useHistoryVersionData,
|
|
3767
|
-
useRoomSubscriptionSettings,
|
|
3768
|
-
useUpdateRoomSubscriptionSettings,
|
|
3769
|
-
...shared.classic,
|
|
3770
|
-
suspense: {
|
|
3771
|
-
RoomContext,
|
|
3772
|
-
RoomProvider: RoomProvider_withImplicitLiveblocksProvider,
|
|
3773
|
-
useRoom,
|
|
3774
|
-
useStatus,
|
|
3775
|
-
useBroadcastEvent,
|
|
3776
|
-
useOthersListener,
|
|
3777
|
-
useLostConnectionListener,
|
|
3778
|
-
useEventListener,
|
|
3779
|
-
useHistory,
|
|
3780
|
-
useUndo,
|
|
3781
|
-
useRedo,
|
|
3782
|
-
useCanRedo,
|
|
3783
|
-
useCanUndo,
|
|
3784
|
-
useStorageRoot,
|
|
3785
|
-
useStorage: useStorageSuspense,
|
|
3786
|
-
useSelf: useSelfSuspense,
|
|
3787
|
-
useMyPresence,
|
|
3788
|
-
useUpdateMyPresence,
|
|
3789
|
-
useOthers: useOthersSuspense,
|
|
3790
|
-
useOthersMapped: useOthersMappedSuspense,
|
|
3791
|
-
useOthersConnectionIds: useOthersConnectionIdsSuspense,
|
|
3792
|
-
useOther: useOtherSuspense,
|
|
3793
|
-
// prettier-ignore
|
|
3794
|
-
useMutation,
|
|
3795
|
-
useThreads: useThreadsSuspense,
|
|
3796
|
-
useFeeds: useFeedsSuspense,
|
|
3797
|
-
useFeedMessages: useFeedMessagesSuspense,
|
|
3798
|
-
useCreateFeed,
|
|
3799
|
-
useDeleteFeed,
|
|
3800
|
-
useUpdateFeedMetadata,
|
|
3801
|
-
useCreateFeedMessage,
|
|
3802
|
-
useDeleteFeedMessage,
|
|
3803
|
-
useUpdateFeedMessage,
|
|
3804
|
-
// prettier-ignore
|
|
3805
|
-
useCreateThread,
|
|
3806
|
-
useDeleteThread,
|
|
3807
|
-
useEditThreadMetadata,
|
|
3808
|
-
useMarkThreadAsResolved,
|
|
3809
|
-
useMarkThreadAsUnresolved,
|
|
3810
|
-
useSubscribeToThread,
|
|
3811
|
-
useUnsubscribeFromThread,
|
|
3812
|
-
useCreateComment,
|
|
3813
|
-
useEditComment,
|
|
3814
|
-
useEditCommentMetadata,
|
|
3815
|
-
useDeleteComment,
|
|
3816
|
-
useAddReaction,
|
|
3817
|
-
useRemoveReaction,
|
|
3818
|
-
useMarkThreadAsRead,
|
|
3819
|
-
useThreadSubscription,
|
|
3820
|
-
useAttachmentUrl: useAttachmentUrlSuspense,
|
|
3821
|
-
// TODO: useHistoryVersionData: useHistoryVersionDataSuspense,
|
|
3822
|
-
useHistoryVersions: useHistoryVersionsSuspense,
|
|
3823
|
-
useRoomSubscriptionSettings: useRoomSubscriptionSettingsSuspense,
|
|
3824
|
-
useUpdateRoomSubscriptionSettings,
|
|
3825
|
-
...shared.suspense
|
|
3826
|
-
}
|
|
3827
|
-
};
|
|
3828
|
-
return Object.defineProperty(bundle, kInternal4, {
|
|
3829
|
-
enumerable: false
|
|
3830
|
-
});
|
|
3831
|
-
}
|
|
3832
3539
|
function RoomProvider(props) {
|
|
3833
3540
|
const client = useClient();
|
|
3834
3541
|
const [cache] = useState3(
|
|
@@ -3859,7 +3566,7 @@ function RoomProvider(props) {
|
|
|
3859
3566
|
}
|
|
3860
3567
|
function RoomProviderInner(props) {
|
|
3861
3568
|
const client = useClient();
|
|
3862
|
-
const { id: roomId, stableEnterRoom } = props;
|
|
3569
|
+
const { id: roomId, stableEnterRoom, BoundRoomContext } = props;
|
|
3863
3570
|
if (process.env.NODE_ENV !== "production") {
|
|
3864
3571
|
if (!roomId) {
|
|
3865
3572
|
throw new Error(
|
|
@@ -3940,33 +3647,6 @@ function RoomProviderInner(props) {
|
|
|
3940
3647
|
(message) => void handleCommentEvent(message)
|
|
3941
3648
|
);
|
|
3942
3649
|
}, [client, room]);
|
|
3943
|
-
useEffect6(() => {
|
|
3944
|
-
const { store } = getRoomExtrasForClient(client);
|
|
3945
|
-
function handleFeedEvent(message) {
|
|
3946
|
-
switch (message.type) {
|
|
3947
|
-
case ServerMsgCode.FEEDS_ADDED:
|
|
3948
|
-
case ServerMsgCode.FEEDS_UPDATED:
|
|
3949
|
-
store.upsertFeeds(room.id, message.feeds);
|
|
3950
|
-
break;
|
|
3951
|
-
case ServerMsgCode.FEEDS_DELETED:
|
|
3952
|
-
store.deleteFeeds(room.id, message.feeds);
|
|
3953
|
-
break;
|
|
3954
|
-
case ServerMsgCode.FEED_MESSAGES_ADDED:
|
|
3955
|
-
case ServerMsgCode.FEED_MESSAGES_UPDATED:
|
|
3956
|
-
store.upsertFeedMessages(room.id, message.feedId, message.messages);
|
|
3957
|
-
break;
|
|
3958
|
-
case 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]);
|
|
3970
3650
|
useEffect6(() => {
|
|
3971
3651
|
const pair = stableEnterRoom(roomId, frozenProps);
|
|
3972
3652
|
setRoomLeavePair(pair);
|
|
@@ -3978,22 +3658,31 @@ function RoomProviderInner(props) {
|
|
|
3978
3658
|
leave();
|
|
3979
3659
|
};
|
|
3980
3660
|
}, [roomId, frozenProps, stableEnterRoom]);
|
|
3981
|
-
return /* @__PURE__ */ jsx2(
|
|
3661
|
+
return /* @__PURE__ */ jsx2(GlobalRoomContext.Provider, { value: room, children: BoundRoomContext ? /* @__PURE__ */ jsx2(BoundRoomContext.Provider, { value: room, children: props.children }) : props.children });
|
|
3982
3662
|
}
|
|
3983
|
-
function
|
|
3984
|
-
const room = useRoomOrNull();
|
|
3663
|
+
function useRoom_withRoomContext(RoomContext, options) {
|
|
3664
|
+
const room = useRoomOrNull(RoomContext);
|
|
3985
3665
|
if (room === null && !options?.allowOutsideRoom) {
|
|
3986
3666
|
throw new Error("RoomProvider is missing from the React tree.");
|
|
3987
3667
|
}
|
|
3988
3668
|
return room;
|
|
3989
3669
|
}
|
|
3990
|
-
function
|
|
3991
|
-
|
|
3670
|
+
function useRoom(options) {
|
|
3671
|
+
return useRoom_withRoomContext(
|
|
3672
|
+
GlobalRoomContext,
|
|
3673
|
+
options
|
|
3674
|
+
);
|
|
3675
|
+
}
|
|
3676
|
+
function useStatus_withRoomContext(RoomContext) {
|
|
3677
|
+
const room = useRoom_withRoomContext(RoomContext);
|
|
3992
3678
|
const subscribe = room.events.status.subscribe;
|
|
3993
3679
|
const getSnapshot = room.getStatus;
|
|
3994
3680
|
const getServerSnapshot = room.getStatus;
|
|
3995
3681
|
return useSyncExternalStore3(subscribe, getSnapshot, getServerSnapshot);
|
|
3996
3682
|
}
|
|
3683
|
+
function useStatus() {
|
|
3684
|
+
return useStatus_withRoomContext(GlobalRoomContext);
|
|
3685
|
+
}
|
|
3997
3686
|
function useReportTextEditor(editor, rootKey) {
|
|
3998
3687
|
const isReported = useRef3(false);
|
|
3999
3688
|
const room = useRoom();
|
|
@@ -4056,8 +3745,10 @@ function useMentionSuggestionsCache() {
|
|
|
4056
3745
|
const client = useClient();
|
|
4057
3746
|
return client[kInternal4].mentionSuggestionsCache;
|
|
4058
3747
|
}
|
|
4059
|
-
function
|
|
4060
|
-
const room =
|
|
3748
|
+
function useBroadcastEvent_withRoomContext(RoomContext) {
|
|
3749
|
+
const room = useRoom_withRoomContext(
|
|
3750
|
+
RoomContext
|
|
3751
|
+
);
|
|
4061
3752
|
return useCallback3(
|
|
4062
3753
|
(event, options = { shouldQueueEventIfNotReady: false }) => {
|
|
4063
3754
|
room.broadcastEvent(event, options);
|
|
@@ -4065,16 +3756,24 @@ function useBroadcastEvent() {
|
|
|
4065
3756
|
[room]
|
|
4066
3757
|
);
|
|
4067
3758
|
}
|
|
4068
|
-
function
|
|
4069
|
-
|
|
3759
|
+
function useBroadcastEvent() {
|
|
3760
|
+
return useBroadcastEvent_withRoomContext(GlobalRoomContext);
|
|
3761
|
+
}
|
|
3762
|
+
function useOthersListener_withRoomContext(RoomContext, callback) {
|
|
3763
|
+
const room = useRoom_withRoomContext(
|
|
3764
|
+
RoomContext
|
|
3765
|
+
);
|
|
4070
3766
|
const savedCallback = useLatest(callback);
|
|
4071
3767
|
useEffect6(
|
|
4072
3768
|
() => room.events.others.subscribe((event) => savedCallback.current(event)),
|
|
4073
3769
|
[room, savedCallback]
|
|
4074
3770
|
);
|
|
4075
3771
|
}
|
|
4076
|
-
function
|
|
4077
|
-
|
|
3772
|
+
function useOthersListener(callback) {
|
|
3773
|
+
return useOthersListener_withRoomContext(GlobalRoomContext, callback);
|
|
3774
|
+
}
|
|
3775
|
+
function useLostConnectionListener_withRoomContext(RoomContext, callback) {
|
|
3776
|
+
const room = useRoom_withRoomContext(RoomContext);
|
|
4078
3777
|
const savedCallback = useLatest(callback);
|
|
4079
3778
|
useEffect6(
|
|
4080
3779
|
() => room.events.lostConnection.subscribe(
|
|
@@ -4083,8 +3782,13 @@ function useLostConnectionListener(callback) {
|
|
|
4083
3782
|
[room, savedCallback]
|
|
4084
3783
|
);
|
|
4085
3784
|
}
|
|
4086
|
-
function
|
|
4087
|
-
|
|
3785
|
+
function useLostConnectionListener(callback) {
|
|
3786
|
+
return useLostConnectionListener_withRoomContext(GlobalRoomContext, callback);
|
|
3787
|
+
}
|
|
3788
|
+
function useEventListener_withRoomContext(RoomContext, callback) {
|
|
3789
|
+
const room = useRoom_withRoomContext(
|
|
3790
|
+
RoomContext
|
|
3791
|
+
);
|
|
4088
3792
|
const savedCallback = useLatest(callback);
|
|
4089
3793
|
useEffect6(() => {
|
|
4090
3794
|
const listener = (eventData) => {
|
|
@@ -4093,29 +3797,49 @@ function useEventListener(callback) {
|
|
|
4093
3797
|
return room.events.customEvent.subscribe(listener);
|
|
4094
3798
|
}, [room, savedCallback]);
|
|
4095
3799
|
}
|
|
3800
|
+
function useEventListener(callback) {
|
|
3801
|
+
return useEventListener_withRoomContext(GlobalRoomContext, callback);
|
|
3802
|
+
}
|
|
3803
|
+
function useHistory_withRoomContext(RoomContext) {
|
|
3804
|
+
return useRoom_withRoomContext(RoomContext).history;
|
|
3805
|
+
}
|
|
4096
3806
|
function useHistory() {
|
|
4097
|
-
return
|
|
3807
|
+
return useHistory_withRoomContext(GlobalRoomContext);
|
|
3808
|
+
}
|
|
3809
|
+
function useUndo_withRoomContext(RoomContext) {
|
|
3810
|
+
return useHistory_withRoomContext(RoomContext).undo;
|
|
4098
3811
|
}
|
|
4099
3812
|
function useUndo() {
|
|
4100
|
-
return
|
|
3813
|
+
return useUndo_withRoomContext(GlobalRoomContext);
|
|
3814
|
+
}
|
|
3815
|
+
function useRedo_withRoomContext(RoomContext) {
|
|
3816
|
+
return useHistory_withRoomContext(RoomContext).redo;
|
|
4101
3817
|
}
|
|
4102
3818
|
function useRedo() {
|
|
4103
|
-
return
|
|
3819
|
+
return useRedo_withRoomContext(GlobalRoomContext);
|
|
4104
3820
|
}
|
|
4105
|
-
function
|
|
4106
|
-
const room =
|
|
3821
|
+
function useCanUndo_withRoomContext(RoomContext) {
|
|
3822
|
+
const room = useRoom_withRoomContext(RoomContext);
|
|
4107
3823
|
const subscribe = room.events.history.subscribe;
|
|
4108
3824
|
const canUndo = room.history.canUndo;
|
|
4109
3825
|
return useSyncExternalStore3(subscribe, canUndo, canUndo);
|
|
4110
3826
|
}
|
|
4111
|
-
function
|
|
4112
|
-
|
|
3827
|
+
function useCanUndo() {
|
|
3828
|
+
return useCanUndo_withRoomContext(GlobalRoomContext);
|
|
3829
|
+
}
|
|
3830
|
+
function useCanRedo_withRoomContext(RoomContext) {
|
|
3831
|
+
const room = useRoom_withRoomContext(RoomContext);
|
|
4113
3832
|
const subscribe = room.events.history.subscribe;
|
|
4114
3833
|
const canRedo = room.history.canRedo;
|
|
4115
3834
|
return useSyncExternalStore3(subscribe, canRedo, canRedo);
|
|
4116
3835
|
}
|
|
4117
|
-
function
|
|
4118
|
-
|
|
3836
|
+
function useCanRedo() {
|
|
3837
|
+
return useCanRedo_withRoomContext(GlobalRoomContext);
|
|
3838
|
+
}
|
|
3839
|
+
function useSelf_withRoomContext(RoomContext, maybeSelector, isEqual) {
|
|
3840
|
+
const room = useRoom_withRoomContext(
|
|
3841
|
+
RoomContext
|
|
3842
|
+
);
|
|
4119
3843
|
const subscribe = room.events.self.subscribe;
|
|
4120
3844
|
const getSnapshot = room.getSelf;
|
|
4121
3845
|
const selector = maybeSelector ?? identity3;
|
|
@@ -4132,19 +3856,38 @@ function useSelf(maybeSelector, isEqual) {
|
|
|
4132
3856
|
isEqual
|
|
4133
3857
|
);
|
|
4134
3858
|
}
|
|
4135
|
-
function
|
|
4136
|
-
|
|
3859
|
+
function useSelf(maybeSelector, isEqual) {
|
|
3860
|
+
return useSelf_withRoomContext(
|
|
3861
|
+
GlobalRoomContext,
|
|
3862
|
+
maybeSelector,
|
|
3863
|
+
isEqual
|
|
3864
|
+
);
|
|
3865
|
+
}
|
|
3866
|
+
function useMyPresence_withRoomContext(RoomContext) {
|
|
3867
|
+
const room = useRoom_withRoomContext(
|
|
3868
|
+
RoomContext
|
|
3869
|
+
);
|
|
4137
3870
|
const subscribe = room.events.myPresence.subscribe;
|
|
4138
3871
|
const getSnapshot = room.getPresence;
|
|
4139
3872
|
const presence = useSyncExternalStore3(subscribe, getSnapshot, getSnapshot);
|
|
4140
3873
|
const setPresence = room.updatePresence;
|
|
4141
3874
|
return [presence, setPresence];
|
|
4142
3875
|
}
|
|
3876
|
+
function useMyPresence() {
|
|
3877
|
+
return useMyPresence_withRoomContext(GlobalRoomContext);
|
|
3878
|
+
}
|
|
3879
|
+
function useUpdateMyPresence_withRoomContext(RoomContext) {
|
|
3880
|
+
return useRoom_withRoomContext(
|
|
3881
|
+
RoomContext
|
|
3882
|
+
).updatePresence;
|
|
3883
|
+
}
|
|
4143
3884
|
function useUpdateMyPresence() {
|
|
4144
|
-
return
|
|
3885
|
+
return useUpdateMyPresence_withRoomContext(GlobalRoomContext);
|
|
4145
3886
|
}
|
|
4146
|
-
function
|
|
4147
|
-
const room =
|
|
3887
|
+
function useOthers_withRoomContext(RoomContext, selector, isEqual) {
|
|
3888
|
+
const room = useRoom_withRoomContext(
|
|
3889
|
+
RoomContext
|
|
3890
|
+
);
|
|
4148
3891
|
const subscribe = room.events.others.subscribe;
|
|
4149
3892
|
const getSnapshot = room.getOthers;
|
|
4150
3893
|
const getServerSnapshot = alwaysEmptyList;
|
|
@@ -4156,7 +3899,14 @@ function useOthers(selector, isEqual) {
|
|
|
4156
3899
|
isEqual
|
|
4157
3900
|
);
|
|
4158
3901
|
}
|
|
4159
|
-
function
|
|
3902
|
+
function useOthers(selector, isEqual) {
|
|
3903
|
+
return useOthers_withRoomContext(
|
|
3904
|
+
GlobalRoomContext,
|
|
3905
|
+
selector,
|
|
3906
|
+
isEqual
|
|
3907
|
+
);
|
|
3908
|
+
}
|
|
3909
|
+
function useOthersMapped_withRoomContext(RoomContext, itemSelector, itemIsEqual) {
|
|
4160
3910
|
const wrappedSelector = useCallback3(
|
|
4161
3911
|
(others) => others.map((other) => [other.connectionId, itemSelector(other)]),
|
|
4162
3912
|
[itemSelector]
|
|
@@ -4171,13 +3921,31 @@ function useOthersMapped(itemSelector, itemIsEqual) {
|
|
|
4171
3921
|
},
|
|
4172
3922
|
[itemIsEqual]
|
|
4173
3923
|
);
|
|
4174
|
-
return
|
|
3924
|
+
return useOthers_withRoomContext(
|
|
3925
|
+
RoomContext,
|
|
3926
|
+
wrappedSelector,
|
|
3927
|
+
wrappedIsEqual
|
|
3928
|
+
);
|
|
3929
|
+
}
|
|
3930
|
+
function useOthersMapped(itemSelector, itemIsEqual) {
|
|
3931
|
+
return useOthersMapped_withRoomContext(
|
|
3932
|
+
GlobalRoomContext,
|
|
3933
|
+
itemSelector,
|
|
3934
|
+
itemIsEqual
|
|
3935
|
+
);
|
|
3936
|
+
}
|
|
3937
|
+
function useOthersConnectionIds_withRoomContext(RoomContext) {
|
|
3938
|
+
return useOthers_withRoomContext(
|
|
3939
|
+
RoomContext,
|
|
3940
|
+
selectorFor_useOthersConnectionIds,
|
|
3941
|
+
shallow4
|
|
3942
|
+
);
|
|
4175
3943
|
}
|
|
4176
3944
|
function useOthersConnectionIds() {
|
|
4177
|
-
return
|
|
3945
|
+
return useOthersConnectionIds_withRoomContext(GlobalRoomContext);
|
|
4178
3946
|
}
|
|
4179
3947
|
var NOT_FOUND = Symbol();
|
|
4180
|
-
function
|
|
3948
|
+
function useOther_withRoomContext(RoomContext, connectionId, selector, isEqual) {
|
|
4181
3949
|
const wrappedSelector = useCallback3(
|
|
4182
3950
|
(others) => {
|
|
4183
3951
|
const other2 = others.find((other3) => other3.connectionId === connectionId);
|
|
@@ -4195,7 +3963,11 @@ function useOther(connectionId, selector, isEqual) {
|
|
|
4195
3963
|
},
|
|
4196
3964
|
[isEqual]
|
|
4197
3965
|
);
|
|
4198
|
-
const other =
|
|
3966
|
+
const other = useOthers_withRoomContext(
|
|
3967
|
+
RoomContext,
|
|
3968
|
+
wrappedSelector,
|
|
3969
|
+
wrappedIsEqual
|
|
3970
|
+
);
|
|
4199
3971
|
if (other === NOT_FOUND) {
|
|
4200
3972
|
throw new Error(
|
|
4201
3973
|
`No such other user with connection id ${connectionId} exists`
|
|
@@ -4203,19 +3975,34 @@ function useOther(connectionId, selector, isEqual) {
|
|
|
4203
3975
|
}
|
|
4204
3976
|
return other;
|
|
4205
3977
|
}
|
|
4206
|
-
function
|
|
4207
|
-
|
|
3978
|
+
function useOther(connectionId, selector, isEqual) {
|
|
3979
|
+
return useOther_withRoomContext(
|
|
3980
|
+
GlobalRoomContext,
|
|
3981
|
+
connectionId,
|
|
3982
|
+
selector,
|
|
3983
|
+
isEqual
|
|
3984
|
+
);
|
|
3985
|
+
}
|
|
3986
|
+
function useMutableStorageRoot_withRoomContext(RoomContext) {
|
|
3987
|
+
const room = useRoom_withRoomContext(
|
|
3988
|
+
RoomContext
|
|
3989
|
+
);
|
|
4208
3990
|
const subscribe = room.events.storageDidLoad.subscribeOnce;
|
|
4209
3991
|
const getSnapshot = room.getStorageSnapshot;
|
|
4210
3992
|
const getServerSnapshot = alwaysNull;
|
|
4211
3993
|
return useSyncExternalStore3(subscribe, getSnapshot, getServerSnapshot);
|
|
4212
3994
|
}
|
|
3995
|
+
function useStorageRoot_withRoomContext(RoomContext) {
|
|
3996
|
+
return [useMutableStorageRoot_withRoomContext(RoomContext)];
|
|
3997
|
+
}
|
|
4213
3998
|
function useStorageRoot() {
|
|
4214
|
-
return
|
|
3999
|
+
return useStorageRoot_withRoomContext(GlobalRoomContext);
|
|
4215
4000
|
}
|
|
4216
|
-
function
|
|
4217
|
-
const room =
|
|
4218
|
-
|
|
4001
|
+
function useStorage_withRoomContext(RoomContext, selector, isEqual) {
|
|
4002
|
+
const room = useRoom_withRoomContext(
|
|
4003
|
+
RoomContext
|
|
4004
|
+
);
|
|
4005
|
+
const rootOrNull = useMutableStorageRoot_withRoomContext(RoomContext);
|
|
4219
4006
|
const wrappedSelector = useCallback3(
|
|
4220
4007
|
(rootOrNull2) => rootOrNull2 !== null ? selector(rootOrNull2) : null,
|
|
4221
4008
|
[selector]
|
|
@@ -4242,8 +4029,11 @@ function useStorage(selector, isEqual) {
|
|
|
4242
4029
|
isEqual
|
|
4243
4030
|
);
|
|
4244
4031
|
}
|
|
4245
|
-
function
|
|
4246
|
-
|
|
4032
|
+
function useStorage(selector, isEqual) {
|
|
4033
|
+
return useStorage_withRoomContext(GlobalRoomContext, selector, isEqual);
|
|
4034
|
+
}
|
|
4035
|
+
function useMutation_withRoomContext(RoomContext, callback, deps) {
|
|
4036
|
+
const room = useRoom_withRoomContext(RoomContext);
|
|
4247
4037
|
return useMemo4(
|
|
4248
4038
|
() => {
|
|
4249
4039
|
return (...args) => (
|
|
@@ -4263,10 +4053,17 @@ function useMutation(callback, deps) {
|
|
|
4263
4053
|
[room, ...deps]
|
|
4264
4054
|
);
|
|
4265
4055
|
}
|
|
4266
|
-
function
|
|
4056
|
+
function useMutation(callback, deps) {
|
|
4057
|
+
return useMutation_withRoomContext(
|
|
4058
|
+
GlobalRoomContext,
|
|
4059
|
+
callback,
|
|
4060
|
+
deps
|
|
4061
|
+
);
|
|
4062
|
+
}
|
|
4063
|
+
function useThreads_withRoomContext(RoomContext, options = {}) {
|
|
4267
4064
|
const { scrollOnLoad = true } = options;
|
|
4268
4065
|
const client = useClient();
|
|
4269
|
-
const room =
|
|
4066
|
+
const room = useRoom_withRoomContext(RoomContext);
|
|
4270
4067
|
const { store, getOrCreateThreadsPollerForRoomId } = getRoomExtrasForClient(client);
|
|
4271
4068
|
const queryKey = makeRoomThreadsQueryKey(room.id, options.query);
|
|
4272
4069
|
const poller = getOrCreateThreadsPollerForRoomId(room.id);
|
|
@@ -4292,100 +4089,17 @@ function useThreads(options = {}) {
|
|
|
4292
4089
|
useScrollToCommentOnLoadEffect(scrollOnLoad, result);
|
|
4293
4090
|
return result;
|
|
4294
4091
|
}
|
|
4295
|
-
function
|
|
4296
|
-
|
|
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
|
-
useEffect6(() => {
|
|
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
|
-
useEffect6(() => {
|
|
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
|
-
assert2(!result.error, "Did not expect error");
|
|
4327
|
-
assert2(!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
|
-
assert2(!result.error, "Did not expect error");
|
|
4339
|
-
assert2(!result.isLoading, "Did not expect loading");
|
|
4340
|
-
return result;
|
|
4341
|
-
}
|
|
4342
|
-
function useCreateFeed() {
|
|
4343
|
-
const room = useRoom();
|
|
4344
|
-
return useCallback3(
|
|
4345
|
-
(feedId, options) => room.addFeed(feedId, options),
|
|
4346
|
-
[room]
|
|
4347
|
-
);
|
|
4348
|
-
}
|
|
4349
|
-
function useDeleteFeed() {
|
|
4350
|
-
const room = useRoom();
|
|
4351
|
-
return useCallback3((feedId) => room.deleteFeed(feedId), [room]);
|
|
4352
|
-
}
|
|
4353
|
-
function useUpdateFeedMetadata() {
|
|
4354
|
-
const room = useRoom();
|
|
4355
|
-
return useCallback3(
|
|
4356
|
-
(feedId, metadata) => room.updateFeed(feedId, metadata),
|
|
4357
|
-
[room]
|
|
4358
|
-
);
|
|
4359
|
-
}
|
|
4360
|
-
function useCreateFeedMessage() {
|
|
4361
|
-
const room = useRoom();
|
|
4362
|
-
return useCallback3(
|
|
4363
|
-
(feedId, data, options) => room.addFeedMessage(feedId, data, options),
|
|
4364
|
-
[room]
|
|
4365
|
-
);
|
|
4366
|
-
}
|
|
4367
|
-
function useDeleteFeedMessage() {
|
|
4368
|
-
const room = useRoom();
|
|
4369
|
-
return useCallback3(
|
|
4370
|
-
(feedId, messageId) => room.deleteFeedMessage(feedId, messageId),
|
|
4371
|
-
[room]
|
|
4372
|
-
);
|
|
4373
|
-
}
|
|
4374
|
-
function useUpdateFeedMessage() {
|
|
4375
|
-
const room = useRoom();
|
|
4376
|
-
return useCallback3(
|
|
4377
|
-
(feedId, messageId, data) => room.updateFeedMessage(feedId, messageId, data),
|
|
4378
|
-
[room]
|
|
4379
|
-
);
|
|
4092
|
+
function useThreads(options = {}) {
|
|
4093
|
+
return useThreads_withRoomContext(GlobalRoomContext, options);
|
|
4380
4094
|
}
|
|
4381
|
-
function
|
|
4095
|
+
function useSearchComments_withRoomContext(RoomContext, options) {
|
|
4382
4096
|
const [result, setResult] = useState3({
|
|
4383
4097
|
isLoading: true
|
|
4384
4098
|
});
|
|
4385
4099
|
const currentRequestInfo = useRef3(null);
|
|
4386
4100
|
const timeout = useRef3(null);
|
|
4387
4101
|
const client = useClient();
|
|
4388
|
-
const room =
|
|
4102
|
+
const room = useRoom_withRoomContext(RoomContext);
|
|
4389
4103
|
const queryKey = stableStringify2([room.id, options.query]);
|
|
4390
4104
|
useEffect6(() => {
|
|
4391
4105
|
const currentRequestId = (currentRequestInfo.current?.id ?? 0) + 1;
|
|
@@ -4429,8 +4143,14 @@ function useSearchComments(options) {
|
|
|
4429
4143
|
}, [queryKey, client, room.id]);
|
|
4430
4144
|
return result;
|
|
4431
4145
|
}
|
|
4146
|
+
function useSearchComments(options) {
|
|
4147
|
+
return useSearchComments_withRoomContext(GlobalRoomContext, options);
|
|
4148
|
+
}
|
|
4149
|
+
function useCreateThread_withRoomContext(RoomContext) {
|
|
4150
|
+
return useCreateRoomThread(useRoom_withRoomContext(RoomContext).id);
|
|
4151
|
+
}
|
|
4432
4152
|
function useCreateThread() {
|
|
4433
|
-
return
|
|
4153
|
+
return useCreateThread_withRoomContext(GlobalRoomContext);
|
|
4434
4154
|
}
|
|
4435
4155
|
function useCreateRoomThread(roomId) {
|
|
4436
4156
|
const client = useClient();
|
|
@@ -4503,8 +4223,11 @@ function useCreateRoomThread(roomId) {
|
|
|
4503
4223
|
[client, roomId]
|
|
4504
4224
|
);
|
|
4505
4225
|
}
|
|
4226
|
+
function useDeleteThread_withRoomContext(RoomContext) {
|
|
4227
|
+
return useDeleteRoomThread(useRoom_withRoomContext(RoomContext).id);
|
|
4228
|
+
}
|
|
4506
4229
|
function useDeleteThread() {
|
|
4507
|
-
return
|
|
4230
|
+
return useDeleteThread_withRoomContext(GlobalRoomContext);
|
|
4508
4231
|
}
|
|
4509
4232
|
function useDeleteRoomThread(roomId) {
|
|
4510
4233
|
const client = useClient();
|
|
@@ -4536,8 +4259,11 @@ function useDeleteRoomThread(roomId) {
|
|
|
4536
4259
|
[client, roomId]
|
|
4537
4260
|
);
|
|
4538
4261
|
}
|
|
4262
|
+
function useEditThreadMetadata_withRoomContext(RoomContext) {
|
|
4263
|
+
return useEditRoomThreadMetadata(useRoom_withRoomContext(RoomContext).id);
|
|
4264
|
+
}
|
|
4539
4265
|
function useEditThreadMetadata() {
|
|
4540
|
-
return
|
|
4266
|
+
return useEditThreadMetadata_withRoomContext(GlobalRoomContext);
|
|
4541
4267
|
}
|
|
4542
4268
|
function useEditRoomThreadMetadata(roomId) {
|
|
4543
4269
|
const client = useClient();
|
|
@@ -4576,8 +4302,13 @@ function useEditRoomThreadMetadata(roomId) {
|
|
|
4576
4302
|
[client, roomId]
|
|
4577
4303
|
);
|
|
4578
4304
|
}
|
|
4305
|
+
function useEditCommentMetadata_withRoomContext(RoomContext) {
|
|
4306
|
+
return useEditRoomCommentMetadata(
|
|
4307
|
+
useRoom_withRoomContext(RoomContext).id
|
|
4308
|
+
);
|
|
4309
|
+
}
|
|
4579
4310
|
function useEditCommentMetadata() {
|
|
4580
|
-
return
|
|
4311
|
+
return useEditCommentMetadata_withRoomContext(GlobalRoomContext);
|
|
4581
4312
|
}
|
|
4582
4313
|
function useEditRoomCommentMetadata(roomId) {
|
|
4583
4314
|
const client = useClient();
|
|
@@ -4625,8 +4356,11 @@ function useEditRoomCommentMetadata(roomId) {
|
|
|
4625
4356
|
[client, roomId]
|
|
4626
4357
|
);
|
|
4627
4358
|
}
|
|
4359
|
+
function useCreateComment_withRoomContext(RoomContext) {
|
|
4360
|
+
return useCreateRoomComment(useRoom_withRoomContext(RoomContext).id);
|
|
4361
|
+
}
|
|
4628
4362
|
function useCreateComment() {
|
|
4629
|
-
return
|
|
4363
|
+
return useCreateComment_withRoomContext(GlobalRoomContext);
|
|
4630
4364
|
}
|
|
4631
4365
|
function useCreateRoomComment(roomId) {
|
|
4632
4366
|
const client = useClient();
|
|
@@ -4684,8 +4418,11 @@ function useCreateRoomComment(roomId) {
|
|
|
4684
4418
|
[client, roomId]
|
|
4685
4419
|
);
|
|
4686
4420
|
}
|
|
4421
|
+
function useEditComment_withRoomContext(RoomContext) {
|
|
4422
|
+
return useEditRoomComment(useRoom_withRoomContext(RoomContext).id);
|
|
4423
|
+
}
|
|
4687
4424
|
function useEditComment() {
|
|
4688
|
-
return
|
|
4425
|
+
return useEditComment_withRoomContext(GlobalRoomContext);
|
|
4689
4426
|
}
|
|
4690
4427
|
function useEditRoomComment(roomId) {
|
|
4691
4428
|
const client = useClient();
|
|
@@ -4758,8 +4495,11 @@ function useEditRoomComment(roomId) {
|
|
|
4758
4495
|
[client, roomId]
|
|
4759
4496
|
);
|
|
4760
4497
|
}
|
|
4498
|
+
function useDeleteComment_withRoomContext(RoomContext) {
|
|
4499
|
+
return useDeleteRoomComment(useRoom_withRoomContext(RoomContext).id);
|
|
4500
|
+
}
|
|
4761
4501
|
function useDeleteComment() {
|
|
4762
|
-
return
|
|
4502
|
+
return useDeleteComment_withRoomContext(GlobalRoomContext);
|
|
4763
4503
|
}
|
|
4764
4504
|
function useDeleteRoomComment(roomId) {
|
|
4765
4505
|
const client = useClient();
|
|
@@ -4788,8 +4528,11 @@ function useDeleteRoomComment(roomId) {
|
|
|
4788
4528
|
[client, roomId]
|
|
4789
4529
|
);
|
|
4790
4530
|
}
|
|
4531
|
+
function useAddReaction_withRoomContext(RoomContext) {
|
|
4532
|
+
return useAddRoomCommentReaction(useRoom_withRoomContext(RoomContext).id);
|
|
4533
|
+
}
|
|
4791
4534
|
function useAddReaction() {
|
|
4792
|
-
return
|
|
4535
|
+
return useAddReaction_withRoomContext(GlobalRoomContext);
|
|
4793
4536
|
}
|
|
4794
4537
|
function useAddRoomCommentReaction(roomId) {
|
|
4795
4538
|
const client = useClient();
|
|
@@ -4834,8 +4577,11 @@ function useAddRoomCommentReaction(roomId) {
|
|
|
4834
4577
|
[client, roomId]
|
|
4835
4578
|
);
|
|
4836
4579
|
}
|
|
4580
|
+
function useRemoveReaction_withRoomContext(RoomContext) {
|
|
4581
|
+
return useRemoveRoomCommentReaction(useRoom_withRoomContext(RoomContext).id);
|
|
4582
|
+
}
|
|
4837
4583
|
function useRemoveReaction() {
|
|
4838
|
-
return
|
|
4584
|
+
return useRemoveReaction_withRoomContext(GlobalRoomContext);
|
|
4839
4585
|
}
|
|
4840
4586
|
function useRemoveRoomCommentReaction(roomId) {
|
|
4841
4587
|
const client = useClient();
|
|
@@ -4879,9 +4625,6 @@ function useRemoveRoomCommentReaction(roomId) {
|
|
|
4879
4625
|
[client, roomId]
|
|
4880
4626
|
);
|
|
4881
4627
|
}
|
|
4882
|
-
function useMarkThreadAsRead() {
|
|
4883
|
-
return useMarkRoomThreadAsRead(useRoom().id);
|
|
4884
|
-
}
|
|
4885
4628
|
function useMarkRoomThreadAsRead(roomId) {
|
|
4886
4629
|
const client = useClient();
|
|
4887
4630
|
return useCallback3(
|
|
@@ -4927,8 +4670,18 @@ function useMarkRoomThreadAsRead(roomId) {
|
|
|
4927
4670
|
[client, roomId]
|
|
4928
4671
|
);
|
|
4929
4672
|
}
|
|
4673
|
+
function useMarkThreadAsRead_withRoomContext(RoomContext) {
|
|
4674
|
+
const room = useRoom_withRoomContext(RoomContext);
|
|
4675
|
+
return useMarkRoomThreadAsRead(room.id);
|
|
4676
|
+
}
|
|
4677
|
+
function useMarkThreadAsRead() {
|
|
4678
|
+
return useMarkThreadAsRead_withRoomContext(GlobalRoomContext);
|
|
4679
|
+
}
|
|
4680
|
+
function useMarkThreadAsResolved_withRoomContext(RoomContext) {
|
|
4681
|
+
return useMarkRoomThreadAsResolved(useRoom_withRoomContext(RoomContext).id);
|
|
4682
|
+
}
|
|
4930
4683
|
function useMarkThreadAsResolved() {
|
|
4931
|
-
return
|
|
4684
|
+
return useMarkThreadAsResolved_withRoomContext(GlobalRoomContext);
|
|
4932
4685
|
}
|
|
4933
4686
|
function useMarkRoomThreadAsResolved(roomId) {
|
|
4934
4687
|
const client = useClient();
|
|
@@ -4960,8 +4713,11 @@ function useMarkRoomThreadAsResolved(roomId) {
|
|
|
4960
4713
|
[client, roomId]
|
|
4961
4714
|
);
|
|
4962
4715
|
}
|
|
4716
|
+
function useMarkThreadAsUnresolved_withRoomContext(RoomContext) {
|
|
4717
|
+
return useMarkRoomThreadAsUnresolved(useRoom_withRoomContext(RoomContext).id);
|
|
4718
|
+
}
|
|
4963
4719
|
function useMarkThreadAsUnresolved() {
|
|
4964
|
-
return
|
|
4720
|
+
return useMarkThreadAsUnresolved_withRoomContext(GlobalRoomContext);
|
|
4965
4721
|
}
|
|
4966
4722
|
function useMarkRoomThreadAsUnresolved(roomId) {
|
|
4967
4723
|
const client = useClient();
|
|
@@ -4993,8 +4749,11 @@ function useMarkRoomThreadAsUnresolved(roomId) {
|
|
|
4993
4749
|
[client, roomId]
|
|
4994
4750
|
);
|
|
4995
4751
|
}
|
|
4752
|
+
function useSubscribeToThread_withRoomContext(RoomContext) {
|
|
4753
|
+
return useSubscribeToRoomThread(useRoom_withRoomContext(RoomContext).id);
|
|
4754
|
+
}
|
|
4996
4755
|
function useSubscribeToThread() {
|
|
4997
|
-
return
|
|
4756
|
+
return useSubscribeToThread_withRoomContext(GlobalRoomContext);
|
|
4998
4757
|
}
|
|
4999
4758
|
function useSubscribeToRoomThread(roomId) {
|
|
5000
4759
|
const client = useClient();
|
|
@@ -5021,8 +4780,11 @@ function useSubscribeToRoomThread(roomId) {
|
|
|
5021
4780
|
[client, roomId]
|
|
5022
4781
|
);
|
|
5023
4782
|
}
|
|
4783
|
+
function useUnsubscribeFromThread_withRoomContext(RoomContext) {
|
|
4784
|
+
return useUnsubscribeFromRoomThread(useRoom_withRoomContext(RoomContext).id);
|
|
4785
|
+
}
|
|
5024
4786
|
function useUnsubscribeFromThread() {
|
|
5025
|
-
return
|
|
4787
|
+
return useUnsubscribeFromThread_withRoomContext(GlobalRoomContext);
|
|
5026
4788
|
}
|
|
5027
4789
|
function useUnsubscribeFromRoomThread(roomId) {
|
|
5028
4790
|
const client = useClient();
|
|
@@ -5052,8 +4814,14 @@ function useUnsubscribeFromRoomThread(roomId) {
|
|
|
5052
4814
|
[client, roomId]
|
|
5053
4815
|
);
|
|
5054
4816
|
}
|
|
4817
|
+
function useThreadSubscription_withRoomContext(RoomContext, threadId) {
|
|
4818
|
+
return useRoomThreadSubscription(
|
|
4819
|
+
useRoom_withRoomContext(RoomContext).id,
|
|
4820
|
+
threadId
|
|
4821
|
+
);
|
|
4822
|
+
}
|
|
5055
4823
|
function useThreadSubscription(threadId) {
|
|
5056
|
-
return
|
|
4824
|
+
return useThreadSubscription_withRoomContext(GlobalRoomContext, threadId);
|
|
5057
4825
|
}
|
|
5058
4826
|
function useRoomThreadSubscription(roomId, threadId) {
|
|
5059
4827
|
const client = useClient();
|
|
@@ -5093,10 +4861,10 @@ function useRoomThreadSubscription(roomId, threadId) {
|
|
|
5093
4861
|
);
|
|
5094
4862
|
return useSignal(signal, selector, shallow4);
|
|
5095
4863
|
}
|
|
5096
|
-
function
|
|
5097
|
-
const updateRoomSubscriptionSettings =
|
|
4864
|
+
function useRoomSubscriptionSettings_withRoomContext(RoomContext) {
|
|
4865
|
+
const updateRoomSubscriptionSettings = useUpdateRoomSubscriptionSettings_withRoomContext(RoomContext);
|
|
5098
4866
|
const client = useClient();
|
|
5099
|
-
const room =
|
|
4867
|
+
const room = useRoom_withRoomContext(RoomContext);
|
|
5100
4868
|
const { store, getOrCreateSubscriptionSettingsPollerForRoomId } = getRoomExtrasForClient(client);
|
|
5101
4869
|
const poller = getOrCreateSubscriptionSettingsPollerForRoomId(room.id);
|
|
5102
4870
|
useEffect6(
|
|
@@ -5124,26 +4892,32 @@ function useRoomSubscriptionSettings() {
|
|
|
5124
4892
|
return [settings, updateRoomSubscriptionSettings];
|
|
5125
4893
|
}, [settings, updateRoomSubscriptionSettings]);
|
|
5126
4894
|
}
|
|
5127
|
-
function
|
|
4895
|
+
function useRoomSubscriptionSettings() {
|
|
4896
|
+
return useRoomSubscriptionSettings_withRoomContext(GlobalRoomContext);
|
|
4897
|
+
}
|
|
4898
|
+
function useRoomSubscriptionSettingsSuspense_withRoomContext(RoomContext) {
|
|
5128
4899
|
ensureNotServerSide();
|
|
5129
4900
|
const client = useClient();
|
|
5130
4901
|
const store = getRoomExtrasForClient(client).store;
|
|
5131
|
-
const room =
|
|
4902
|
+
const room = useRoom_withRoomContext(RoomContext);
|
|
5132
4903
|
use(
|
|
5133
4904
|
store.outputs.roomSubscriptionSettingsByRoomId.getOrCreate(room.id).waitUntilLoaded()
|
|
5134
4905
|
);
|
|
5135
|
-
const [settings, updateRoomSubscriptionSettings] =
|
|
4906
|
+
const [settings, updateRoomSubscriptionSettings] = useRoomSubscriptionSettings_withRoomContext(RoomContext);
|
|
5136
4907
|
assert2(!settings.error, "Did not expect error");
|
|
5137
4908
|
assert2(!settings.isLoading, "Did not expect loading");
|
|
5138
4909
|
return useMemo4(() => {
|
|
5139
4910
|
return [settings, updateRoomSubscriptionSettings];
|
|
5140
4911
|
}, [settings, updateRoomSubscriptionSettings]);
|
|
5141
4912
|
}
|
|
5142
|
-
function
|
|
4913
|
+
function useRoomSubscriptionSettingsSuspense() {
|
|
4914
|
+
return useRoomSubscriptionSettingsSuspense_withRoomContext(GlobalRoomContext);
|
|
4915
|
+
}
|
|
4916
|
+
function useHistoryVersionData_withRoomContext(RoomContext, versionId) {
|
|
5143
4917
|
const [state, setState] = useState3({
|
|
5144
4918
|
isLoading: true
|
|
5145
4919
|
});
|
|
5146
|
-
const room =
|
|
4920
|
+
const room = useRoom_withRoomContext(RoomContext);
|
|
5147
4921
|
useEffect6(() => {
|
|
5148
4922
|
setState({ isLoading: true });
|
|
5149
4923
|
const load = async () => {
|
|
@@ -5168,9 +4942,12 @@ function useHistoryVersionData(versionId) {
|
|
|
5168
4942
|
}, [room, versionId]);
|
|
5169
4943
|
return state;
|
|
5170
4944
|
}
|
|
5171
|
-
function
|
|
4945
|
+
function useHistoryVersionData(versionId) {
|
|
4946
|
+
return useHistoryVersionData_withRoomContext(GlobalRoomContext, versionId);
|
|
4947
|
+
}
|
|
4948
|
+
function useHistoryVersions_withRoomContext(RoomContext) {
|
|
5172
4949
|
const client = useClient();
|
|
5173
|
-
const room =
|
|
4950
|
+
const room = useRoom_withRoomContext(RoomContext);
|
|
5174
4951
|
const { store, getOrCreateVersionsPollerForRoomId } = getRoomExtrasForClient(client);
|
|
5175
4952
|
const poller = getOrCreateVersionsPollerForRoomId(room.id);
|
|
5176
4953
|
useEffect6(() => {
|
|
@@ -5191,20 +4968,26 @@ function useHistoryVersions() {
|
|
|
5191
4968
|
);
|
|
5192
4969
|
return useSignal(store.outputs.versionsByRoomId.getOrCreate(room.id).signal);
|
|
5193
4970
|
}
|
|
5194
|
-
function
|
|
4971
|
+
function useHistoryVersions() {
|
|
4972
|
+
return useHistoryVersions_withRoomContext(GlobalRoomContext);
|
|
4973
|
+
}
|
|
4974
|
+
function useHistoryVersionsSuspense_withRoomContext(RoomContext) {
|
|
5195
4975
|
ensureNotServerSide();
|
|
5196
4976
|
const client = useClient();
|
|
5197
|
-
const room =
|
|
4977
|
+
const room = useRoom_withRoomContext(RoomContext);
|
|
5198
4978
|
const store = getRoomExtrasForClient(client).store;
|
|
5199
4979
|
use(store.outputs.versionsByRoomId.getOrCreate(room.id).waitUntilLoaded());
|
|
5200
|
-
const result =
|
|
4980
|
+
const result = useHistoryVersions_withRoomContext(RoomContext);
|
|
5201
4981
|
assert2(!result.error, "Did not expect error");
|
|
5202
4982
|
assert2(!result.isLoading, "Did not expect loading");
|
|
5203
4983
|
return result;
|
|
5204
4984
|
}
|
|
5205
|
-
function
|
|
4985
|
+
function useHistoryVersionsSuspense() {
|
|
4986
|
+
return useHistoryVersionsSuspense_withRoomContext(GlobalRoomContext);
|
|
4987
|
+
}
|
|
4988
|
+
function useUpdateRoomSubscriptionSettings_withRoomContext(RoomContext) {
|
|
5206
4989
|
const client = useClient();
|
|
5207
|
-
const room =
|
|
4990
|
+
const room = useRoom_withRoomContext(RoomContext);
|
|
5208
4991
|
return useCallback3(
|
|
5209
4992
|
(settings) => {
|
|
5210
4993
|
const { store, onMutationFailure, pollThreadsForRoomId } = getRoomExtrasForClient(client);
|
|
@@ -5239,61 +5022,118 @@ function useUpdateRoomSubscriptionSettings() {
|
|
|
5239
5022
|
[client, room]
|
|
5240
5023
|
);
|
|
5241
5024
|
}
|
|
5242
|
-
function
|
|
5025
|
+
function useUpdateRoomSubscriptionSettings() {
|
|
5026
|
+
return useUpdateRoomSubscriptionSettings_withRoomContext(GlobalRoomContext);
|
|
5027
|
+
}
|
|
5028
|
+
function useSuspendUntilPresenceReady_withRoomContext(RoomContext) {
|
|
5243
5029
|
ensureNotServerSide();
|
|
5244
|
-
const room =
|
|
5030
|
+
const room = useRoom_withRoomContext(RoomContext);
|
|
5245
5031
|
use(room.waitUntilPresenceReady());
|
|
5246
5032
|
}
|
|
5033
|
+
function useSelfSuspense_withRoomContext(RoomContext, selector, isEqual) {
|
|
5034
|
+
useSuspendUntilPresenceReady_withRoomContext(RoomContext);
|
|
5035
|
+
return useSelf_withRoomContext(
|
|
5036
|
+
RoomContext,
|
|
5037
|
+
selector,
|
|
5038
|
+
isEqual
|
|
5039
|
+
);
|
|
5040
|
+
}
|
|
5247
5041
|
function useSelfSuspense(selector, isEqual) {
|
|
5248
|
-
|
|
5249
|
-
|
|
5042
|
+
return useSelfSuspense_withRoomContext(
|
|
5043
|
+
GlobalRoomContext,
|
|
5044
|
+
selector,
|
|
5045
|
+
isEqual
|
|
5046
|
+
);
|
|
5047
|
+
}
|
|
5048
|
+
function useOthersSuspense_withRoomContext(RoomContext, selector, isEqual) {
|
|
5049
|
+
useSuspendUntilPresenceReady_withRoomContext(RoomContext);
|
|
5050
|
+
return useOthers_withRoomContext(
|
|
5051
|
+
RoomContext,
|
|
5250
5052
|
selector,
|
|
5251
5053
|
isEqual
|
|
5252
5054
|
);
|
|
5253
5055
|
}
|
|
5254
5056
|
function useOthersSuspense(selector, isEqual) {
|
|
5255
|
-
|
|
5256
|
-
|
|
5057
|
+
return useOthersSuspense_withRoomContext(
|
|
5058
|
+
GlobalRoomContext,
|
|
5257
5059
|
selector,
|
|
5258
5060
|
isEqual
|
|
5259
5061
|
);
|
|
5260
5062
|
}
|
|
5063
|
+
function useOthersConnectionIdsSuspense_withRoomContext(RoomContext) {
|
|
5064
|
+
useSuspendUntilPresenceReady_withRoomContext(RoomContext);
|
|
5065
|
+
return useOthersConnectionIds_withRoomContext(RoomContext);
|
|
5066
|
+
}
|
|
5261
5067
|
function useOthersConnectionIdsSuspense() {
|
|
5262
|
-
|
|
5263
|
-
|
|
5068
|
+
return useOthersConnectionIdsSuspense_withRoomContext(GlobalRoomContext);
|
|
5069
|
+
}
|
|
5070
|
+
function useOthersMappedSuspense_withRoomContext(RoomContext, itemSelector, itemIsEqual) {
|
|
5071
|
+
useSuspendUntilPresenceReady_withRoomContext(RoomContext);
|
|
5072
|
+
return useOthersMapped_withRoomContext(
|
|
5073
|
+
RoomContext,
|
|
5074
|
+
itemSelector,
|
|
5075
|
+
itemIsEqual
|
|
5076
|
+
);
|
|
5264
5077
|
}
|
|
5265
5078
|
function useOthersMappedSuspense(itemSelector, itemIsEqual) {
|
|
5266
|
-
|
|
5267
|
-
|
|
5079
|
+
return useOthersMappedSuspense_withRoomContext(
|
|
5080
|
+
GlobalRoomContext,
|
|
5081
|
+
itemSelector,
|
|
5082
|
+
itemIsEqual
|
|
5083
|
+
);
|
|
5084
|
+
}
|
|
5085
|
+
function useOtherSuspense_withRoomContext(RoomContext, connectionId, selector, isEqual) {
|
|
5086
|
+
useSuspendUntilPresenceReady_withRoomContext(RoomContext);
|
|
5087
|
+
return useOther_withRoomContext(
|
|
5088
|
+
RoomContext,
|
|
5089
|
+
connectionId,
|
|
5090
|
+
selector,
|
|
5091
|
+
isEqual
|
|
5092
|
+
);
|
|
5268
5093
|
}
|
|
5269
5094
|
function useOtherSuspense(connectionId, selector, isEqual) {
|
|
5270
|
-
|
|
5271
|
-
|
|
5095
|
+
return useOtherSuspense_withRoomContext(
|
|
5096
|
+
GlobalRoomContext,
|
|
5097
|
+
connectionId,
|
|
5098
|
+
selector,
|
|
5099
|
+
isEqual
|
|
5100
|
+
);
|
|
5272
5101
|
}
|
|
5273
|
-
function
|
|
5102
|
+
function useSuspendUntilStorageReady_withRoomContext(RoomContext) {
|
|
5274
5103
|
ensureNotServerSide();
|
|
5275
|
-
const room =
|
|
5104
|
+
const room = useRoom_withRoomContext(RoomContext);
|
|
5276
5105
|
use(room.waitUntilStorageReady());
|
|
5277
5106
|
}
|
|
5107
|
+
function useStorageSuspense_withRoomContext(RoomContext, selector, isEqual) {
|
|
5108
|
+
useSuspendUntilStorageReady_withRoomContext(RoomContext);
|
|
5109
|
+
return useStorage_withRoomContext(
|
|
5110
|
+
RoomContext,
|
|
5111
|
+
selector,
|
|
5112
|
+
isEqual
|
|
5113
|
+
);
|
|
5114
|
+
}
|
|
5278
5115
|
function useStorageSuspense(selector, isEqual) {
|
|
5279
|
-
|
|
5280
|
-
|
|
5116
|
+
return useStorageSuspense_withRoomContext(
|
|
5117
|
+
GlobalRoomContext,
|
|
5281
5118
|
selector,
|
|
5282
5119
|
isEqual
|
|
5283
5120
|
);
|
|
5284
5121
|
}
|
|
5285
|
-
function
|
|
5122
|
+
function useThreadsSuspense_withRoomContext(RoomContext, options = {}) {
|
|
5286
5123
|
ensureNotServerSide();
|
|
5287
5124
|
const client = useClient();
|
|
5288
|
-
const room =
|
|
5125
|
+
const room = useRoom_withRoomContext(RoomContext);
|
|
5289
5126
|
const { store } = getRoomExtrasForClient(client);
|
|
5290
5127
|
const queryKey = makeRoomThreadsQueryKey(room.id, options.query);
|
|
5291
5128
|
use(store.outputs.loadingRoomThreads.getOrCreate(queryKey).waitUntilLoaded());
|
|
5292
|
-
const result =
|
|
5129
|
+
const result = useThreads_withRoomContext(RoomContext, options);
|
|
5293
5130
|
assert2(!result.error, "Did not expect error");
|
|
5294
5131
|
assert2(!result.isLoading, "Did not expect loading");
|
|
5295
5132
|
return result;
|
|
5296
5133
|
}
|
|
5134
|
+
function useThreadsSuspense(options = {}) {
|
|
5135
|
+
return useThreadsSuspense_withRoomContext(GlobalRoomContext, options);
|
|
5136
|
+
}
|
|
5297
5137
|
function selectorFor_useAttachmentUrl(state) {
|
|
5298
5138
|
if (state === void 0 || state?.isLoading) {
|
|
5299
5139
|
return state ?? { isLoading: true };
|
|
@@ -5307,10 +5147,13 @@ function selectorFor_useAttachmentUrl(state) {
|
|
|
5307
5147
|
url: state.data
|
|
5308
5148
|
};
|
|
5309
5149
|
}
|
|
5310
|
-
function
|
|
5311
|
-
const room =
|
|
5150
|
+
function useAttachmentUrl_withRoomContext(RoomContext, attachmentId) {
|
|
5151
|
+
const room = useRoom_withRoomContext(RoomContext);
|
|
5312
5152
|
return useRoomAttachmentUrl(attachmentId, room.id);
|
|
5313
5153
|
}
|
|
5154
|
+
function useAttachmentUrl(attachmentId) {
|
|
5155
|
+
return useAttachmentUrl_withRoomContext(GlobalRoomContext, attachmentId);
|
|
5156
|
+
}
|
|
5314
5157
|
function useRoomAttachmentUrl(attachmentId, roomId) {
|
|
5315
5158
|
const client = useClient();
|
|
5316
5159
|
const store = client[kInternal4].httpClient.getOrCreateAttachmentUrlsStore(roomId);
|
|
@@ -5329,8 +5172,8 @@ function useRoomAttachmentUrl(attachmentId, roomId) {
|
|
|
5329
5172
|
shallow4
|
|
5330
5173
|
);
|
|
5331
5174
|
}
|
|
5332
|
-
function
|
|
5333
|
-
const room =
|
|
5175
|
+
function useAttachmentUrlSuspense_withRoomContext(RoomContext, attachmentId) {
|
|
5176
|
+
const room = useRoom_withRoomContext(RoomContext);
|
|
5334
5177
|
const { attachmentUrlsStore } = room[kInternal4];
|
|
5335
5178
|
const getAttachmentUrlState = useCallback3(
|
|
5336
5179
|
() => attachmentUrlsStore.getItemState(attachmentId),
|
|
@@ -5357,13 +5200,382 @@ function useAttachmentUrlSuspense(attachmentId) {
|
|
|
5357
5200
|
error: void 0
|
|
5358
5201
|
};
|
|
5359
5202
|
}
|
|
5203
|
+
function useAttachmentUrlSuspense(attachmentId) {
|
|
5204
|
+
return useAttachmentUrlSuspense_withRoomContext(
|
|
5205
|
+
GlobalRoomContext,
|
|
5206
|
+
attachmentId
|
|
5207
|
+
);
|
|
5208
|
+
}
|
|
5360
5209
|
function useRoomPermissions(roomId) {
|
|
5361
5210
|
const client = useClient();
|
|
5362
5211
|
const store = getRoomExtrasForClient(client).store;
|
|
5363
5212
|
return useSignal(store.permissionHints.getPermissionForRoom\u03A3(roomId));
|
|
5364
5213
|
}
|
|
5365
5214
|
function createRoomContext(client) {
|
|
5366
|
-
|
|
5215
|
+
const BoundRoomContext = createContext2(null);
|
|
5216
|
+
function RoomProvider_withImplicitLiveblocksProviderAndBoundRoomContext(props) {
|
|
5217
|
+
return /* @__PURE__ */ jsx2(LiveblocksProviderWithClient, { client, allowNesting: true, children: /* @__PURE__ */ jsx2(RoomProvider, { ...props, BoundRoomContext }) });
|
|
5218
|
+
}
|
|
5219
|
+
function useRoom_withBoundRoomContext(...args) {
|
|
5220
|
+
return useRoom_withRoomContext(
|
|
5221
|
+
BoundRoomContext,
|
|
5222
|
+
...args
|
|
5223
|
+
);
|
|
5224
|
+
}
|
|
5225
|
+
function useStatus_withBoundRoomContext() {
|
|
5226
|
+
return useStatus_withRoomContext(BoundRoomContext);
|
|
5227
|
+
}
|
|
5228
|
+
function useBroadcastEvent_withBoundRoomContext() {
|
|
5229
|
+
return useBroadcastEvent_withRoomContext(BoundRoomContext);
|
|
5230
|
+
}
|
|
5231
|
+
function useOthersListener_withBoundRoomContext(...args) {
|
|
5232
|
+
return useOthersListener_withRoomContext(BoundRoomContext, ...args);
|
|
5233
|
+
}
|
|
5234
|
+
function useLostConnectionListener_withBoundRoomContext(...args) {
|
|
5235
|
+
return useLostConnectionListener_withRoomContext(BoundRoomContext, ...args);
|
|
5236
|
+
}
|
|
5237
|
+
function useEventListener_withBoundRoomContext(...args) {
|
|
5238
|
+
return useEventListener_withRoomContext(BoundRoomContext, ...args);
|
|
5239
|
+
}
|
|
5240
|
+
function useMarkThreadAsRead_withBoundRoomContext() {
|
|
5241
|
+
return useMarkThreadAsRead_withRoomContext(BoundRoomContext);
|
|
5242
|
+
}
|
|
5243
|
+
function useHistory_withBoundRoomContext() {
|
|
5244
|
+
return useHistory_withRoomContext(BoundRoomContext);
|
|
5245
|
+
}
|
|
5246
|
+
function useUndo_withBoundRoomContext() {
|
|
5247
|
+
return useUndo_withRoomContext(BoundRoomContext);
|
|
5248
|
+
}
|
|
5249
|
+
function useRedo_withBoundRoomContext() {
|
|
5250
|
+
return useRedo_withRoomContext(BoundRoomContext);
|
|
5251
|
+
}
|
|
5252
|
+
function useCanUndo_withBoundRoomContext() {
|
|
5253
|
+
return useCanUndo_withRoomContext(BoundRoomContext);
|
|
5254
|
+
}
|
|
5255
|
+
function useCanRedo_withBoundRoomContext() {
|
|
5256
|
+
return useCanRedo_withRoomContext(BoundRoomContext);
|
|
5257
|
+
}
|
|
5258
|
+
function useStorageRoot_withBoundRoomContext() {
|
|
5259
|
+
return useStorageRoot_withRoomContext(BoundRoomContext);
|
|
5260
|
+
}
|
|
5261
|
+
function useStorage_withBoundRoomContext(...args) {
|
|
5262
|
+
return useStorage_withRoomContext(BoundRoomContext, ...args);
|
|
5263
|
+
}
|
|
5264
|
+
function useStorageSuspense_withBoundRoomContext(...args) {
|
|
5265
|
+
return useStorageSuspense_withRoomContext(BoundRoomContext, ...args);
|
|
5266
|
+
}
|
|
5267
|
+
function useSelf_withBoundRoomContext(...args) {
|
|
5268
|
+
return useSelf_withRoomContext(BoundRoomContext, ...args);
|
|
5269
|
+
}
|
|
5270
|
+
function useMyPresence_withBoundRoomContext() {
|
|
5271
|
+
return useMyPresence_withRoomContext(BoundRoomContext);
|
|
5272
|
+
}
|
|
5273
|
+
function useUpdateMyPresence_withBoundRoomContext() {
|
|
5274
|
+
return useUpdateMyPresence_withRoomContext(BoundRoomContext);
|
|
5275
|
+
}
|
|
5276
|
+
function useOthers_withBoundRoomContext(...args) {
|
|
5277
|
+
return useOthers_withRoomContext(BoundRoomContext, ...args);
|
|
5278
|
+
}
|
|
5279
|
+
function useOthersMapped_withBoundRoomContext(...args) {
|
|
5280
|
+
return useOthersMapped_withRoomContext(BoundRoomContext, ...args);
|
|
5281
|
+
}
|
|
5282
|
+
function useOthersConnectionIds_withBoundRoomContext() {
|
|
5283
|
+
return useOthersConnectionIds_withRoomContext(BoundRoomContext);
|
|
5284
|
+
}
|
|
5285
|
+
function useOther_withBoundRoomContext(...args) {
|
|
5286
|
+
return useOther_withRoomContext(BoundRoomContext, ...args);
|
|
5287
|
+
}
|
|
5288
|
+
function useSelfSuspense_withBoundRoomContext(...args) {
|
|
5289
|
+
return useSelfSuspense_withRoomContext(BoundRoomContext, ...args);
|
|
5290
|
+
}
|
|
5291
|
+
function useOthersSuspense_withBoundRoomContext(...args) {
|
|
5292
|
+
return useOthersSuspense_withRoomContext(
|
|
5293
|
+
BoundRoomContext,
|
|
5294
|
+
...args
|
|
5295
|
+
);
|
|
5296
|
+
}
|
|
5297
|
+
function useOthersMappedSuspense_withBoundRoomContext(...args) {
|
|
5298
|
+
return useOthersMappedSuspense_withRoomContext(
|
|
5299
|
+
BoundRoomContext,
|
|
5300
|
+
...args
|
|
5301
|
+
);
|
|
5302
|
+
}
|
|
5303
|
+
function useOthersConnectionIdsSuspense_withBoundRoomContext() {
|
|
5304
|
+
return useOthersConnectionIdsSuspense_withRoomContext(BoundRoomContext);
|
|
5305
|
+
}
|
|
5306
|
+
function useOtherSuspense_withBoundRoomContext(...args) {
|
|
5307
|
+
return useOtherSuspense_withRoomContext(BoundRoomContext, ...args);
|
|
5308
|
+
}
|
|
5309
|
+
function useMutation_withBoundRoomContext(...args) {
|
|
5310
|
+
return useMutation_withRoomContext(
|
|
5311
|
+
BoundRoomContext,
|
|
5312
|
+
...args
|
|
5313
|
+
);
|
|
5314
|
+
}
|
|
5315
|
+
function useThreads_withBoundRoomContext(...args) {
|
|
5316
|
+
return useThreads_withRoomContext(BoundRoomContext, ...args);
|
|
5317
|
+
}
|
|
5318
|
+
function useCreateThread_withBoundRoomContext() {
|
|
5319
|
+
return useCreateThread_withRoomContext(BoundRoomContext);
|
|
5320
|
+
}
|
|
5321
|
+
function useDeleteThread_withBoundRoomContext() {
|
|
5322
|
+
return useDeleteThread_withRoomContext(BoundRoomContext);
|
|
5323
|
+
}
|
|
5324
|
+
function useEditThreadMetadata_withBoundRoomContext() {
|
|
5325
|
+
return useEditThreadMetadata_withRoomContext(BoundRoomContext);
|
|
5326
|
+
}
|
|
5327
|
+
function useMarkThreadAsResolved_withBoundRoomContext() {
|
|
5328
|
+
return useMarkThreadAsResolved_withRoomContext(BoundRoomContext);
|
|
5329
|
+
}
|
|
5330
|
+
function useMarkThreadAsUnresolved_withBoundRoomContext() {
|
|
5331
|
+
return useMarkThreadAsUnresolved_withRoomContext(BoundRoomContext);
|
|
5332
|
+
}
|
|
5333
|
+
function useThreadsSuspense_withBoundRoomContext(...args) {
|
|
5334
|
+
return useThreadsSuspense_withRoomContext(
|
|
5335
|
+
BoundRoomContext,
|
|
5336
|
+
...args
|
|
5337
|
+
);
|
|
5338
|
+
}
|
|
5339
|
+
function useSubscribeToThread_withBoundRoomContext() {
|
|
5340
|
+
return useSubscribeToThread_withRoomContext(BoundRoomContext);
|
|
5341
|
+
}
|
|
5342
|
+
function useUnsubscribeFromThread_withBoundRoomContext() {
|
|
5343
|
+
return useUnsubscribeFromThread_withRoomContext(BoundRoomContext);
|
|
5344
|
+
}
|
|
5345
|
+
function useCreateComment_withBoundRoomContext() {
|
|
5346
|
+
return useCreateComment_withRoomContext(BoundRoomContext);
|
|
5347
|
+
}
|
|
5348
|
+
function useEditComment_withBoundRoomContext() {
|
|
5349
|
+
return useEditComment_withRoomContext(BoundRoomContext);
|
|
5350
|
+
}
|
|
5351
|
+
function useEditCommentMetadata_withBoundRoomContext() {
|
|
5352
|
+
return useEditCommentMetadata_withRoomContext(BoundRoomContext);
|
|
5353
|
+
}
|
|
5354
|
+
function useDeleteComment_withBoundRoomContext() {
|
|
5355
|
+
return useDeleteComment_withRoomContext(BoundRoomContext);
|
|
5356
|
+
}
|
|
5357
|
+
function useAddReaction_withBoundRoomContext() {
|
|
5358
|
+
return useAddReaction_withRoomContext(BoundRoomContext);
|
|
5359
|
+
}
|
|
5360
|
+
function useRemoveReaction_withBoundRoomContext() {
|
|
5361
|
+
return useRemoveReaction_withRoomContext(BoundRoomContext);
|
|
5362
|
+
}
|
|
5363
|
+
function useThreadSubscription_withBoundRoomContext(...args) {
|
|
5364
|
+
return useThreadSubscription_withRoomContext(BoundRoomContext, ...args);
|
|
5365
|
+
}
|
|
5366
|
+
function useAttachmentUrl_withBoundRoomContext(...args) {
|
|
5367
|
+
return useAttachmentUrl_withRoomContext(BoundRoomContext, ...args);
|
|
5368
|
+
}
|
|
5369
|
+
function useAttachmentUrlSuspense_withBoundRoomContext(...args) {
|
|
5370
|
+
return useAttachmentUrlSuspense_withRoomContext(BoundRoomContext, ...args);
|
|
5371
|
+
}
|
|
5372
|
+
function useSearchComments_withBoundRoomContext(...args) {
|
|
5373
|
+
return useSearchComments_withRoomContext(BoundRoomContext, ...args);
|
|
5374
|
+
}
|
|
5375
|
+
function useHistoryVersions_withBoundRoomContext() {
|
|
5376
|
+
return useHistoryVersions_withRoomContext(BoundRoomContext);
|
|
5377
|
+
}
|
|
5378
|
+
function useHistoryVersionsSuspense_withBoundRoomContext() {
|
|
5379
|
+
return useHistoryVersionsSuspense_withRoomContext(BoundRoomContext);
|
|
5380
|
+
}
|
|
5381
|
+
function useHistoryVersionData_withBoundRoomContext(...args) {
|
|
5382
|
+
return useHistoryVersionData_withRoomContext(BoundRoomContext, ...args);
|
|
5383
|
+
}
|
|
5384
|
+
function useRoomSubscriptionSettings_withBoundRoomContext() {
|
|
5385
|
+
return useRoomSubscriptionSettings_withRoomContext(BoundRoomContext);
|
|
5386
|
+
}
|
|
5387
|
+
function useRoomSubscriptionSettingsSuspense_withBoundRoomContext() {
|
|
5388
|
+
return useRoomSubscriptionSettingsSuspense_withRoomContext(
|
|
5389
|
+
BoundRoomContext
|
|
5390
|
+
);
|
|
5391
|
+
}
|
|
5392
|
+
function useUpdateRoomSubscriptionSettings_withBoundRoomContext() {
|
|
5393
|
+
return useUpdateRoomSubscriptionSettings_withRoomContext(BoundRoomContext);
|
|
5394
|
+
}
|
|
5395
|
+
const shared = createSharedContext(client);
|
|
5396
|
+
const bundle = {
|
|
5397
|
+
RoomContext: BoundRoomContext,
|
|
5398
|
+
RoomProvider: RoomProvider_withImplicitLiveblocksProviderAndBoundRoomContext,
|
|
5399
|
+
// prettier-ignore
|
|
5400
|
+
useRoom: useRoom_withBoundRoomContext,
|
|
5401
|
+
// prettier-ignore
|
|
5402
|
+
useStatus: useStatus_withBoundRoomContext,
|
|
5403
|
+
// prettier-ignore
|
|
5404
|
+
useBroadcastEvent: useBroadcastEvent_withBoundRoomContext,
|
|
5405
|
+
// prettier-ignore
|
|
5406
|
+
useOthersListener: useOthersListener_withBoundRoomContext,
|
|
5407
|
+
// prettier-ignore
|
|
5408
|
+
useLostConnectionListener: useLostConnectionListener_withBoundRoomContext,
|
|
5409
|
+
// prettier-ignore
|
|
5410
|
+
useEventListener: useEventListener_withBoundRoomContext,
|
|
5411
|
+
// prettier-ignore
|
|
5412
|
+
useHistory: useHistory_withBoundRoomContext,
|
|
5413
|
+
// prettier-ignore
|
|
5414
|
+
useUndo: useUndo_withBoundRoomContext,
|
|
5415
|
+
// prettier-ignore
|
|
5416
|
+
useRedo: useRedo_withBoundRoomContext,
|
|
5417
|
+
// prettier-ignore
|
|
5418
|
+
useCanUndo: useCanUndo_withBoundRoomContext,
|
|
5419
|
+
// prettier-ignore
|
|
5420
|
+
useCanRedo: useCanRedo_withBoundRoomContext,
|
|
5421
|
+
// prettier-ignore
|
|
5422
|
+
useStorageRoot: useStorageRoot_withBoundRoomContext,
|
|
5423
|
+
// prettier-ignore
|
|
5424
|
+
useStorage: useStorage_withBoundRoomContext,
|
|
5425
|
+
// prettier-ignore
|
|
5426
|
+
useMutation: useMutation_withBoundRoomContext,
|
|
5427
|
+
// prettier-ignore
|
|
5428
|
+
useSelf: useSelf_withBoundRoomContext,
|
|
5429
|
+
// prettier-ignore
|
|
5430
|
+
useMyPresence: useMyPresence_withBoundRoomContext,
|
|
5431
|
+
// prettier-ignore
|
|
5432
|
+
useUpdateMyPresence: useUpdateMyPresence_withBoundRoomContext,
|
|
5433
|
+
// prettier-ignore
|
|
5434
|
+
useOthers: useOthers_withBoundRoomContext,
|
|
5435
|
+
// prettier-ignore
|
|
5436
|
+
useOthersMapped: useOthersMapped_withBoundRoomContext,
|
|
5437
|
+
// prettier-ignore
|
|
5438
|
+
useOthersConnectionIds: useOthersConnectionIds_withBoundRoomContext,
|
|
5439
|
+
// prettier-ignore
|
|
5440
|
+
useOther: useOther_withBoundRoomContext,
|
|
5441
|
+
// prettier-ignore
|
|
5442
|
+
useThreads: useThreads_withBoundRoomContext,
|
|
5443
|
+
// prettier-ignore
|
|
5444
|
+
useCreateThread: useCreateThread_withBoundRoomContext,
|
|
5445
|
+
// prettier-ignore
|
|
5446
|
+
useDeleteThread: useDeleteThread_withBoundRoomContext,
|
|
5447
|
+
// prettier-ignore
|
|
5448
|
+
useEditThreadMetadata: useEditThreadMetadata_withBoundRoomContext,
|
|
5449
|
+
// prettier-ignore
|
|
5450
|
+
useMarkThreadAsResolved: useMarkThreadAsResolved_withBoundRoomContext,
|
|
5451
|
+
// prettier-ignore
|
|
5452
|
+
useMarkThreadAsUnresolved: useMarkThreadAsUnresolved_withBoundRoomContext,
|
|
5453
|
+
// prettier-ignore
|
|
5454
|
+
useSubscribeToThread: useSubscribeToThread_withBoundRoomContext,
|
|
5455
|
+
// prettier-ignore
|
|
5456
|
+
useUnsubscribeFromThread: useUnsubscribeFromThread_withBoundRoomContext,
|
|
5457
|
+
// prettier-ignore
|
|
5458
|
+
useCreateComment: useCreateComment_withBoundRoomContext,
|
|
5459
|
+
// prettier-ignore
|
|
5460
|
+
useEditComment: useEditComment_withBoundRoomContext,
|
|
5461
|
+
// prettier-ignore
|
|
5462
|
+
useEditCommentMetadata: useEditCommentMetadata_withBoundRoomContext,
|
|
5463
|
+
// prettier-ignore
|
|
5464
|
+
useDeleteComment: useDeleteComment_withBoundRoomContext,
|
|
5465
|
+
// prettier-ignore
|
|
5466
|
+
useAddReaction: useAddReaction_withBoundRoomContext,
|
|
5467
|
+
// prettier-ignore
|
|
5468
|
+
useRemoveReaction: useRemoveReaction_withBoundRoomContext,
|
|
5469
|
+
// prettier-ignore
|
|
5470
|
+
useMarkThreadAsRead: useMarkThreadAsRead_withBoundRoomContext,
|
|
5471
|
+
// prettier-ignore
|
|
5472
|
+
useThreadSubscription: useThreadSubscription_withBoundRoomContext,
|
|
5473
|
+
// prettier-ignore
|
|
5474
|
+
useAttachmentUrl: useAttachmentUrl_withBoundRoomContext,
|
|
5475
|
+
// prettier-ignore
|
|
5476
|
+
useSearchComments: useSearchComments_withBoundRoomContext,
|
|
5477
|
+
// prettier-ignore
|
|
5478
|
+
useHistoryVersions: useHistoryVersions_withBoundRoomContext,
|
|
5479
|
+
// prettier-ignore
|
|
5480
|
+
useHistoryVersionData: useHistoryVersionData_withBoundRoomContext,
|
|
5481
|
+
// prettier-ignore
|
|
5482
|
+
useRoomSubscriptionSettings: useRoomSubscriptionSettings_withBoundRoomContext,
|
|
5483
|
+
// prettier-ignore
|
|
5484
|
+
useUpdateRoomSubscriptionSettings: useUpdateRoomSubscriptionSettings_withBoundRoomContext,
|
|
5485
|
+
...shared.classic,
|
|
5486
|
+
suspense: {
|
|
5487
|
+
RoomContext: BoundRoomContext,
|
|
5488
|
+
RoomProvider: RoomProvider_withImplicitLiveblocksProviderAndBoundRoomContext,
|
|
5489
|
+
// prettier-ignore
|
|
5490
|
+
useRoom: useRoom_withBoundRoomContext,
|
|
5491
|
+
// prettier-ignore
|
|
5492
|
+
useStatus: useStatus_withBoundRoomContext,
|
|
5493
|
+
// prettier-ignore
|
|
5494
|
+
useBroadcastEvent: useBroadcastEvent_withBoundRoomContext,
|
|
5495
|
+
// prettier-ignore
|
|
5496
|
+
useOthersListener: useOthersListener_withBoundRoomContext,
|
|
5497
|
+
// prettier-ignore
|
|
5498
|
+
useLostConnectionListener: useLostConnectionListener_withBoundRoomContext,
|
|
5499
|
+
// prettier-ignore
|
|
5500
|
+
useEventListener: useEventListener_withBoundRoomContext,
|
|
5501
|
+
// prettier-ignore
|
|
5502
|
+
useHistory: useHistory_withBoundRoomContext,
|
|
5503
|
+
// prettier-ignore
|
|
5504
|
+
useUndo: useUndo_withBoundRoomContext,
|
|
5505
|
+
// prettier-ignore
|
|
5506
|
+
useRedo: useRedo_withBoundRoomContext,
|
|
5507
|
+
// prettier-ignore
|
|
5508
|
+
useCanUndo: useCanUndo_withBoundRoomContext,
|
|
5509
|
+
// prettier-ignore
|
|
5510
|
+
useCanRedo: useCanRedo_withBoundRoomContext,
|
|
5511
|
+
// prettier-ignore
|
|
5512
|
+
useStorageRoot: useStorageRoot_withBoundRoomContext,
|
|
5513
|
+
// prettier-ignore
|
|
5514
|
+
useStorage: useStorageSuspense_withBoundRoomContext,
|
|
5515
|
+
// prettier-ignore
|
|
5516
|
+
useMutation: useMutation_withBoundRoomContext,
|
|
5517
|
+
// prettier-ignore
|
|
5518
|
+
useSelf: useSelfSuspense_withBoundRoomContext,
|
|
5519
|
+
// prettier-ignore
|
|
5520
|
+
useMyPresence: useMyPresence_withBoundRoomContext,
|
|
5521
|
+
// prettier-ignore
|
|
5522
|
+
useUpdateMyPresence: useUpdateMyPresence_withBoundRoomContext,
|
|
5523
|
+
// prettier-ignore
|
|
5524
|
+
useOthers: useOthersSuspense_withBoundRoomContext,
|
|
5525
|
+
// prettier-ignore
|
|
5526
|
+
useOthersMapped: useOthersMappedSuspense_withBoundRoomContext,
|
|
5527
|
+
// prettier-ignore
|
|
5528
|
+
useOthersConnectionIds: useOthersConnectionIdsSuspense_withBoundRoomContext,
|
|
5529
|
+
// prettier-ignore
|
|
5530
|
+
useOther: useOtherSuspense_withBoundRoomContext,
|
|
5531
|
+
// prettier-ignore
|
|
5532
|
+
useThreads: useThreadsSuspense_withBoundRoomContext,
|
|
5533
|
+
// prettier-ignore
|
|
5534
|
+
useCreateThread: useCreateThread_withBoundRoomContext,
|
|
5535
|
+
// prettier-ignore
|
|
5536
|
+
useDeleteThread: useDeleteThread_withBoundRoomContext,
|
|
5537
|
+
// prettier-ignore
|
|
5538
|
+
useEditThreadMetadata: useEditThreadMetadata_withBoundRoomContext,
|
|
5539
|
+
// prettier-ignore
|
|
5540
|
+
useMarkThreadAsResolved: useMarkThreadAsResolved_withBoundRoomContext,
|
|
5541
|
+
// prettier-ignore
|
|
5542
|
+
useMarkThreadAsUnresolved: useMarkThreadAsUnresolved_withBoundRoomContext,
|
|
5543
|
+
// prettier-ignore
|
|
5544
|
+
useSubscribeToThread: useSubscribeToThread_withBoundRoomContext,
|
|
5545
|
+
// prettier-ignore
|
|
5546
|
+
useUnsubscribeFromThread: useUnsubscribeFromThread_withBoundRoomContext,
|
|
5547
|
+
// prettier-ignore
|
|
5548
|
+
useCreateComment: useCreateComment_withBoundRoomContext,
|
|
5549
|
+
// prettier-ignore
|
|
5550
|
+
useEditComment: useEditComment_withBoundRoomContext,
|
|
5551
|
+
// prettier-ignore
|
|
5552
|
+
useEditCommentMetadata: useEditCommentMetadata_withBoundRoomContext,
|
|
5553
|
+
// prettier-ignore
|
|
5554
|
+
useDeleteComment: useDeleteComment_withBoundRoomContext,
|
|
5555
|
+
// prettier-ignore
|
|
5556
|
+
useAddReaction: useAddReaction_withBoundRoomContext,
|
|
5557
|
+
// prettier-ignore
|
|
5558
|
+
useRemoveReaction: useRemoveReaction_withBoundRoomContext,
|
|
5559
|
+
// prettier-ignore
|
|
5560
|
+
useMarkThreadAsRead: useMarkThreadAsRead_withBoundRoomContext,
|
|
5561
|
+
// prettier-ignore
|
|
5562
|
+
useThreadSubscription: useThreadSubscription_withBoundRoomContext,
|
|
5563
|
+
// prettier-ignore
|
|
5564
|
+
useAttachmentUrl: useAttachmentUrlSuspense_withBoundRoomContext,
|
|
5565
|
+
// prettier-ignore
|
|
5566
|
+
useHistoryVersions: useHistoryVersionsSuspense_withBoundRoomContext,
|
|
5567
|
+
// prettier-ignore
|
|
5568
|
+
useRoomSubscriptionSettings: useRoomSubscriptionSettingsSuspense_withBoundRoomContext,
|
|
5569
|
+
// prettier-ignore
|
|
5570
|
+
useUpdateRoomSubscriptionSettings: useUpdateRoomSubscriptionSettings_withBoundRoomContext,
|
|
5571
|
+
// No Suspense version: useSearchComments
|
|
5572
|
+
// No Suspense version: useHistoryVersionData
|
|
5573
|
+
...shared.suspense
|
|
5574
|
+
}
|
|
5575
|
+
};
|
|
5576
|
+
return Object.defineProperty(bundle, kInternal4, {
|
|
5577
|
+
enumerable: false
|
|
5578
|
+
});
|
|
5367
5579
|
}
|
|
5368
5580
|
var _RoomProvider = RoomProvider;
|
|
5369
5581
|
var _useBroadcastEvent = useBroadcastEvent;
|
|
@@ -5383,10 +5595,6 @@ var _useMyPresence = useMyPresence;
|
|
|
5383
5595
|
var _useOthersMapped = useOthersMapped;
|
|
5384
5596
|
var _useOthersMappedSuspense = useOthersMappedSuspense;
|
|
5385
5597
|
var _useThreads = useThreads;
|
|
5386
|
-
var _useFeeds = useFeeds;
|
|
5387
|
-
var _useFeedMessages = useFeedMessages;
|
|
5388
|
-
var _useFeedsSuspense = useFeedsSuspense;
|
|
5389
|
-
var _useFeedMessagesSuspense = useFeedMessagesSuspense;
|
|
5390
5598
|
var _useSearchComments = useSearchComments;
|
|
5391
5599
|
var _useThreadsSuspense = useThreadsSuspense;
|
|
5392
5600
|
var _useRoomSubscriptionSettings = useRoomSubscriptionSettings;
|
|
@@ -5416,7 +5624,7 @@ export {
|
|
|
5416
5624
|
ClientContext,
|
|
5417
5625
|
useClientOrNull,
|
|
5418
5626
|
useClient,
|
|
5419
|
-
|
|
5627
|
+
GlobalRoomContext,
|
|
5420
5628
|
useLatest,
|
|
5421
5629
|
RegisterAiKnowledge,
|
|
5422
5630
|
RegisterAiTool,
|
|
@@ -5473,12 +5681,6 @@ export {
|
|
|
5473
5681
|
useCanUndo,
|
|
5474
5682
|
useCanRedo,
|
|
5475
5683
|
useOthersConnectionIds,
|
|
5476
|
-
useCreateFeed,
|
|
5477
|
-
useDeleteFeed,
|
|
5478
|
-
useUpdateFeedMetadata,
|
|
5479
|
-
useCreateFeedMessage,
|
|
5480
|
-
useDeleteFeedMessage,
|
|
5481
|
-
useUpdateFeedMessage,
|
|
5482
5684
|
useCreateRoomThread,
|
|
5483
5685
|
useDeleteRoomThread,
|
|
5484
5686
|
useEditRoomThreadMetadata,
|
|
@@ -5489,8 +5691,8 @@ export {
|
|
|
5489
5691
|
useAddRoomCommentReaction,
|
|
5490
5692
|
useRemoveReaction,
|
|
5491
5693
|
useRemoveRoomCommentReaction,
|
|
5492
|
-
useMarkThreadAsRead,
|
|
5493
5694
|
useMarkRoomThreadAsRead,
|
|
5695
|
+
useMarkThreadAsRead,
|
|
5494
5696
|
useMarkThreadAsResolved,
|
|
5495
5697
|
useMarkRoomThreadAsResolved,
|
|
5496
5698
|
useMarkThreadAsUnresolved,
|
|
@@ -5525,10 +5727,6 @@ export {
|
|
|
5525
5727
|
_useOthersMapped,
|
|
5526
5728
|
_useOthersMappedSuspense,
|
|
5527
5729
|
_useThreads,
|
|
5528
|
-
_useFeeds,
|
|
5529
|
-
_useFeedMessages,
|
|
5530
|
-
_useFeedsSuspense,
|
|
5531
|
-
_useFeedMessagesSuspense,
|
|
5532
5730
|
_useSearchComments,
|
|
5533
5731
|
_useThreadsSuspense,
|
|
5534
5732
|
_useRoomSubscriptionSettings,
|
|
@@ -5546,4 +5744,4 @@ export {
|
|
|
5546
5744
|
_useStorageRoot,
|
|
5547
5745
|
_useUpdateMyPresence
|
|
5548
5746
|
};
|
|
5549
|
-
//# sourceMappingURL=chunk-
|
|
5747
|
+
//# sourceMappingURL=chunk-7TVEKSIE.js.map
|