@liveblocks/react 3.15.0-components1 → 3.15.0-thread1
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-Z3NTUAGP.cjs → chunk-K5JM2QXZ.cjs} +222 -724
- package/dist/chunk-K5JM2QXZ.cjs.map +1 -0
- package/dist/{chunk-Z7VSK4H7.cjs → chunk-MULOYM2M.cjs} +2 -2
- package/dist/{chunk-Z7VSK4H7.cjs.map → chunk-MULOYM2M.cjs.map} +1 -1
- package/dist/{chunk-VMPATNNT.js → chunk-OIXSZEIN.js} +2 -2
- package/dist/{chunk-B5F24HAT.js → chunk-SVZO3VVV.js} +223 -725
- package/dist/chunk-SVZO3VVV.js.map +1 -0
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/{room-C3ujtNzt.d.cts → room-DamZM98T.d.cts} +9 -11
- package/dist/{room-C3ujtNzt.d.ts → room-DamZM98T.d.ts} +9 -11
- package/dist/suspense.cjs +4 -4
- package/dist/suspense.cjs.map +1 -1
- package/dist/suspense.d.cts +1 -1
- package/dist/suspense.d.ts +1 -1
- package/dist/suspense.js +4 -4
- package/dist/suspense.js.map +1 -1
- package/package.json +3 -3
- package/dist/chunk-B5F24HAT.js.map +0 -1
- package/dist/chunk-Z3NTUAGP.cjs.map +0 -1
- /package/dist/{chunk-VMPATNNT.js.map → chunk-OIXSZEIN.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 RoomContext = createContext(null);
|
|
12
|
+
function useRoomOrNull() {
|
|
13
13
|
return useContext(RoomContext);
|
|
14
14
|
}
|
|
15
15
|
function useIsInsideRoom() {
|
|
@@ -3358,7 +3358,6 @@ import {
|
|
|
3358
3358
|
stableStringify as stableStringify2
|
|
3359
3359
|
} from "@liveblocks/core";
|
|
3360
3360
|
import {
|
|
3361
|
-
createContext as createContext2,
|
|
3362
3361
|
useCallback as useCallback3,
|
|
3363
3362
|
useEffect as useEffect6,
|
|
3364
3363
|
useMemo as useMemo4,
|
|
@@ -3449,6 +3448,15 @@ function getCurrentUserId(client) {
|
|
|
3449
3448
|
return userId;
|
|
3450
3449
|
}
|
|
3451
3450
|
var _extras2 = /* @__PURE__ */ new WeakMap();
|
|
3451
|
+
var _bundles2 = /* @__PURE__ */ new WeakMap();
|
|
3452
|
+
function getOrCreateRoomContextBundle(client) {
|
|
3453
|
+
let bundle = _bundles2.get(client);
|
|
3454
|
+
if (!bundle) {
|
|
3455
|
+
bundle = makeRoomContextBundle(client);
|
|
3456
|
+
_bundles2.set(client, bundle);
|
|
3457
|
+
}
|
|
3458
|
+
return bundle;
|
|
3459
|
+
}
|
|
3452
3460
|
function getRoomExtrasForClient(client) {
|
|
3453
3461
|
let extras = _extras2.get(client);
|
|
3454
3462
|
if (!extras) {
|
|
@@ -3536,6 +3544,114 @@ function makeRoomExtrasForClient(client) {
|
|
|
3536
3544
|
)
|
|
3537
3545
|
};
|
|
3538
3546
|
}
|
|
3547
|
+
function makeRoomContextBundle(client) {
|
|
3548
|
+
function RoomProvider_withImplicitLiveblocksProvider(props) {
|
|
3549
|
+
return /* @__PURE__ */ jsx2(LiveblocksProviderWithClient, { client, allowNesting: true, children: /* @__PURE__ */ jsx2(RoomProvider, { ...props }) });
|
|
3550
|
+
}
|
|
3551
|
+
const shared = createSharedContext(client);
|
|
3552
|
+
const bundle = {
|
|
3553
|
+
RoomContext,
|
|
3554
|
+
RoomProvider: RoomProvider_withImplicitLiveblocksProvider,
|
|
3555
|
+
useRoom,
|
|
3556
|
+
useStatus,
|
|
3557
|
+
useBroadcastEvent,
|
|
3558
|
+
useOthersListener,
|
|
3559
|
+
useLostConnectionListener,
|
|
3560
|
+
useEventListener,
|
|
3561
|
+
useHistory,
|
|
3562
|
+
useUndo,
|
|
3563
|
+
useRedo,
|
|
3564
|
+
useCanRedo,
|
|
3565
|
+
useCanUndo,
|
|
3566
|
+
useStorageRoot,
|
|
3567
|
+
useStorage,
|
|
3568
|
+
useSelf,
|
|
3569
|
+
useMyPresence,
|
|
3570
|
+
useUpdateMyPresence,
|
|
3571
|
+
useOthers,
|
|
3572
|
+
useOthersMapped,
|
|
3573
|
+
useOthersConnectionIds,
|
|
3574
|
+
useOther,
|
|
3575
|
+
// prettier-ignore
|
|
3576
|
+
useMutation,
|
|
3577
|
+
useThreads,
|
|
3578
|
+
useSearchComments,
|
|
3579
|
+
// prettier-ignore
|
|
3580
|
+
useCreateThread,
|
|
3581
|
+
useDeleteThread,
|
|
3582
|
+
useEditThreadMetadata,
|
|
3583
|
+
useMarkThreadAsResolved,
|
|
3584
|
+
useMarkThreadAsUnresolved,
|
|
3585
|
+
useSubscribeToThread,
|
|
3586
|
+
useUnsubscribeFromThread,
|
|
3587
|
+
useCreateComment,
|
|
3588
|
+
useEditComment,
|
|
3589
|
+
useEditCommentMetadata,
|
|
3590
|
+
useDeleteComment,
|
|
3591
|
+
useAddReaction,
|
|
3592
|
+
useRemoveReaction,
|
|
3593
|
+
useMarkThreadAsRead,
|
|
3594
|
+
useThreadSubscription,
|
|
3595
|
+
useAttachmentUrl,
|
|
3596
|
+
useHistoryVersions,
|
|
3597
|
+
useHistoryVersionData,
|
|
3598
|
+
useRoomSubscriptionSettings,
|
|
3599
|
+
useUpdateRoomSubscriptionSettings,
|
|
3600
|
+
...shared.classic,
|
|
3601
|
+
suspense: {
|
|
3602
|
+
RoomContext,
|
|
3603
|
+
RoomProvider: RoomProvider_withImplicitLiveblocksProvider,
|
|
3604
|
+
useRoom,
|
|
3605
|
+
useStatus,
|
|
3606
|
+
useBroadcastEvent,
|
|
3607
|
+
useOthersListener,
|
|
3608
|
+
useLostConnectionListener,
|
|
3609
|
+
useEventListener,
|
|
3610
|
+
useHistory,
|
|
3611
|
+
useUndo,
|
|
3612
|
+
useRedo,
|
|
3613
|
+
useCanRedo,
|
|
3614
|
+
useCanUndo,
|
|
3615
|
+
useStorageRoot,
|
|
3616
|
+
useStorage: useStorageSuspense,
|
|
3617
|
+
useSelf: useSelfSuspense,
|
|
3618
|
+
useMyPresence,
|
|
3619
|
+
useUpdateMyPresence,
|
|
3620
|
+
useOthers: useOthersSuspense,
|
|
3621
|
+
useOthersMapped: useOthersMappedSuspense,
|
|
3622
|
+
useOthersConnectionIds: useOthersConnectionIdsSuspense,
|
|
3623
|
+
useOther: useOtherSuspense,
|
|
3624
|
+
// prettier-ignore
|
|
3625
|
+
useMutation,
|
|
3626
|
+
useThreads: useThreadsSuspense,
|
|
3627
|
+
// prettier-ignore
|
|
3628
|
+
useCreateThread,
|
|
3629
|
+
useDeleteThread,
|
|
3630
|
+
useEditThreadMetadata,
|
|
3631
|
+
useMarkThreadAsResolved,
|
|
3632
|
+
useMarkThreadAsUnresolved,
|
|
3633
|
+
useSubscribeToThread,
|
|
3634
|
+
useUnsubscribeFromThread,
|
|
3635
|
+
useCreateComment,
|
|
3636
|
+
useEditComment,
|
|
3637
|
+
useEditCommentMetadata,
|
|
3638
|
+
useDeleteComment,
|
|
3639
|
+
useAddReaction,
|
|
3640
|
+
useRemoveReaction,
|
|
3641
|
+
useMarkThreadAsRead,
|
|
3642
|
+
useThreadSubscription,
|
|
3643
|
+
useAttachmentUrl: useAttachmentUrlSuspense,
|
|
3644
|
+
// TODO: useHistoryVersionData: useHistoryVersionDataSuspense,
|
|
3645
|
+
useHistoryVersions: useHistoryVersionsSuspense,
|
|
3646
|
+
useRoomSubscriptionSettings: useRoomSubscriptionSettingsSuspense,
|
|
3647
|
+
useUpdateRoomSubscriptionSettings,
|
|
3648
|
+
...shared.suspense
|
|
3649
|
+
}
|
|
3650
|
+
};
|
|
3651
|
+
return Object.defineProperty(bundle, kInternal4, {
|
|
3652
|
+
enumerable: false
|
|
3653
|
+
});
|
|
3654
|
+
}
|
|
3539
3655
|
function RoomProvider(props) {
|
|
3540
3656
|
const client = useClient();
|
|
3541
3657
|
const [cache] = useState3(
|
|
@@ -3566,7 +3682,7 @@ function RoomProvider(props) {
|
|
|
3566
3682
|
}
|
|
3567
3683
|
function RoomProviderInner(props) {
|
|
3568
3684
|
const client = useClient();
|
|
3569
|
-
const { id: roomId, stableEnterRoom
|
|
3685
|
+
const { id: roomId, stableEnterRoom } = props;
|
|
3570
3686
|
if (process.env.NODE_ENV !== "production") {
|
|
3571
3687
|
if (!roomId) {
|
|
3572
3688
|
throw new Error(
|
|
@@ -3658,31 +3774,22 @@ function RoomProviderInner(props) {
|
|
|
3658
3774
|
leave();
|
|
3659
3775
|
};
|
|
3660
3776
|
}, [roomId, frozenProps, stableEnterRoom]);
|
|
3661
|
-
return /* @__PURE__ */ jsx2(
|
|
3777
|
+
return /* @__PURE__ */ jsx2(RoomContext.Provider, { value: room, children: props.children });
|
|
3662
3778
|
}
|
|
3663
|
-
function
|
|
3664
|
-
const room = useRoomOrNull(
|
|
3779
|
+
function useRoom(options) {
|
|
3780
|
+
const room = useRoomOrNull();
|
|
3665
3781
|
if (room === null && !options?.allowOutsideRoom) {
|
|
3666
3782
|
throw new Error("RoomProvider is missing from the React tree.");
|
|
3667
3783
|
}
|
|
3668
3784
|
return room;
|
|
3669
3785
|
}
|
|
3670
|
-
function
|
|
3671
|
-
|
|
3672
|
-
GlobalRoomContext,
|
|
3673
|
-
options
|
|
3674
|
-
);
|
|
3675
|
-
}
|
|
3676
|
-
function useStatus_withRoomContext(RoomContext) {
|
|
3677
|
-
const room = useRoom_withRoomContext(RoomContext);
|
|
3786
|
+
function useStatus() {
|
|
3787
|
+
const room = useRoom();
|
|
3678
3788
|
const subscribe = room.events.status.subscribe;
|
|
3679
3789
|
const getSnapshot = room.getStatus;
|
|
3680
3790
|
const getServerSnapshot = room.getStatus;
|
|
3681
3791
|
return useSyncExternalStore3(subscribe, getSnapshot, getServerSnapshot);
|
|
3682
3792
|
}
|
|
3683
|
-
function useStatus() {
|
|
3684
|
-
return useStatus_withRoomContext(GlobalRoomContext);
|
|
3685
|
-
}
|
|
3686
3793
|
function useReportTextEditor(editor, rootKey) {
|
|
3687
3794
|
const isReported = useRef3(false);
|
|
3688
3795
|
const room = useRoom();
|
|
@@ -3745,10 +3852,8 @@ function useMentionSuggestionsCache() {
|
|
|
3745
3852
|
const client = useClient();
|
|
3746
3853
|
return client[kInternal4].mentionSuggestionsCache;
|
|
3747
3854
|
}
|
|
3748
|
-
function
|
|
3749
|
-
const room =
|
|
3750
|
-
RoomContext
|
|
3751
|
-
);
|
|
3855
|
+
function useBroadcastEvent() {
|
|
3856
|
+
const room = useRoom();
|
|
3752
3857
|
return useCallback3(
|
|
3753
3858
|
(event, options = { shouldQueueEventIfNotReady: false }) => {
|
|
3754
3859
|
room.broadcastEvent(event, options);
|
|
@@ -3756,24 +3861,16 @@ function useBroadcastEvent_withRoomContext(RoomContext) {
|
|
|
3756
3861
|
[room]
|
|
3757
3862
|
);
|
|
3758
3863
|
}
|
|
3759
|
-
function
|
|
3760
|
-
|
|
3761
|
-
}
|
|
3762
|
-
function useOthersListener_withRoomContext(RoomContext, callback) {
|
|
3763
|
-
const room = useRoom_withRoomContext(
|
|
3764
|
-
RoomContext
|
|
3765
|
-
);
|
|
3864
|
+
function useOthersListener(callback) {
|
|
3865
|
+
const room = useRoom();
|
|
3766
3866
|
const savedCallback = useLatest(callback);
|
|
3767
3867
|
useEffect6(
|
|
3768
3868
|
() => room.events.others.subscribe((event) => savedCallback.current(event)),
|
|
3769
3869
|
[room, savedCallback]
|
|
3770
3870
|
);
|
|
3771
3871
|
}
|
|
3772
|
-
function
|
|
3773
|
-
|
|
3774
|
-
}
|
|
3775
|
-
function useLostConnectionListener_withRoomContext(RoomContext, callback) {
|
|
3776
|
-
const room = useRoom_withRoomContext(RoomContext);
|
|
3872
|
+
function useLostConnectionListener(callback) {
|
|
3873
|
+
const room = useRoom();
|
|
3777
3874
|
const savedCallback = useLatest(callback);
|
|
3778
3875
|
useEffect6(
|
|
3779
3876
|
() => room.events.lostConnection.subscribe(
|
|
@@ -3782,13 +3879,8 @@ function useLostConnectionListener_withRoomContext(RoomContext, callback) {
|
|
|
3782
3879
|
[room, savedCallback]
|
|
3783
3880
|
);
|
|
3784
3881
|
}
|
|
3785
|
-
function
|
|
3786
|
-
|
|
3787
|
-
}
|
|
3788
|
-
function useEventListener_withRoomContext(RoomContext, callback) {
|
|
3789
|
-
const room = useRoom_withRoomContext(
|
|
3790
|
-
RoomContext
|
|
3791
|
-
);
|
|
3882
|
+
function useEventListener(callback) {
|
|
3883
|
+
const room = useRoom();
|
|
3792
3884
|
const savedCallback = useLatest(callback);
|
|
3793
3885
|
useEffect6(() => {
|
|
3794
3886
|
const listener = (eventData) => {
|
|
@@ -3797,49 +3889,29 @@ function useEventListener_withRoomContext(RoomContext, callback) {
|
|
|
3797
3889
|
return room.events.customEvent.subscribe(listener);
|
|
3798
3890
|
}, [room, savedCallback]);
|
|
3799
3891
|
}
|
|
3800
|
-
function useEventListener(callback) {
|
|
3801
|
-
return useEventListener_withRoomContext(GlobalRoomContext, callback);
|
|
3802
|
-
}
|
|
3803
|
-
function useHistory_withRoomContext(RoomContext) {
|
|
3804
|
-
return useRoom_withRoomContext(RoomContext).history;
|
|
3805
|
-
}
|
|
3806
3892
|
function useHistory() {
|
|
3807
|
-
return
|
|
3808
|
-
}
|
|
3809
|
-
function useUndo_withRoomContext(RoomContext) {
|
|
3810
|
-
return useHistory_withRoomContext(RoomContext).undo;
|
|
3893
|
+
return useRoom().history;
|
|
3811
3894
|
}
|
|
3812
3895
|
function useUndo() {
|
|
3813
|
-
return
|
|
3814
|
-
}
|
|
3815
|
-
function useRedo_withRoomContext(RoomContext) {
|
|
3816
|
-
return useHistory_withRoomContext(RoomContext).redo;
|
|
3896
|
+
return useHistory().undo;
|
|
3817
3897
|
}
|
|
3818
3898
|
function useRedo() {
|
|
3819
|
-
return
|
|
3899
|
+
return useHistory().redo;
|
|
3820
3900
|
}
|
|
3821
|
-
function
|
|
3822
|
-
const room =
|
|
3901
|
+
function useCanUndo() {
|
|
3902
|
+
const room = useRoom();
|
|
3823
3903
|
const subscribe = room.events.history.subscribe;
|
|
3824
3904
|
const canUndo = room.history.canUndo;
|
|
3825
3905
|
return useSyncExternalStore3(subscribe, canUndo, canUndo);
|
|
3826
3906
|
}
|
|
3827
|
-
function
|
|
3828
|
-
|
|
3829
|
-
}
|
|
3830
|
-
function useCanRedo_withRoomContext(RoomContext) {
|
|
3831
|
-
const room = useRoom_withRoomContext(RoomContext);
|
|
3907
|
+
function useCanRedo() {
|
|
3908
|
+
const room = useRoom();
|
|
3832
3909
|
const subscribe = room.events.history.subscribe;
|
|
3833
3910
|
const canRedo = room.history.canRedo;
|
|
3834
3911
|
return useSyncExternalStore3(subscribe, canRedo, canRedo);
|
|
3835
3912
|
}
|
|
3836
|
-
function
|
|
3837
|
-
|
|
3838
|
-
}
|
|
3839
|
-
function useSelf_withRoomContext(RoomContext, maybeSelector, isEqual) {
|
|
3840
|
-
const room = useRoom_withRoomContext(
|
|
3841
|
-
RoomContext
|
|
3842
|
-
);
|
|
3913
|
+
function useSelf(maybeSelector, isEqual) {
|
|
3914
|
+
const room = useRoom();
|
|
3843
3915
|
const subscribe = room.events.self.subscribe;
|
|
3844
3916
|
const getSnapshot = room.getSelf;
|
|
3845
3917
|
const selector = maybeSelector ?? identity3;
|
|
@@ -3856,38 +3928,19 @@ function useSelf_withRoomContext(RoomContext, maybeSelector, isEqual) {
|
|
|
3856
3928
|
isEqual
|
|
3857
3929
|
);
|
|
3858
3930
|
}
|
|
3859
|
-
function
|
|
3860
|
-
|
|
3861
|
-
GlobalRoomContext,
|
|
3862
|
-
maybeSelector,
|
|
3863
|
-
isEqual
|
|
3864
|
-
);
|
|
3865
|
-
}
|
|
3866
|
-
function useMyPresence_withRoomContext(RoomContext) {
|
|
3867
|
-
const room = useRoom_withRoomContext(
|
|
3868
|
-
RoomContext
|
|
3869
|
-
);
|
|
3931
|
+
function useMyPresence() {
|
|
3932
|
+
const room = useRoom();
|
|
3870
3933
|
const subscribe = room.events.myPresence.subscribe;
|
|
3871
3934
|
const getSnapshot = room.getPresence;
|
|
3872
3935
|
const presence = useSyncExternalStore3(subscribe, getSnapshot, getSnapshot);
|
|
3873
3936
|
const setPresence = room.updatePresence;
|
|
3874
3937
|
return [presence, setPresence];
|
|
3875
3938
|
}
|
|
3876
|
-
function useMyPresence() {
|
|
3877
|
-
return useMyPresence_withRoomContext(GlobalRoomContext);
|
|
3878
|
-
}
|
|
3879
|
-
function useUpdateMyPresence_withRoomContext(RoomContext) {
|
|
3880
|
-
return useRoom_withRoomContext(
|
|
3881
|
-
RoomContext
|
|
3882
|
-
).updatePresence;
|
|
3883
|
-
}
|
|
3884
3939
|
function useUpdateMyPresence() {
|
|
3885
|
-
return
|
|
3940
|
+
return useRoom().updatePresence;
|
|
3886
3941
|
}
|
|
3887
|
-
function
|
|
3888
|
-
const room =
|
|
3889
|
-
RoomContext
|
|
3890
|
-
);
|
|
3942
|
+
function useOthers(selector, isEqual) {
|
|
3943
|
+
const room = useRoom();
|
|
3891
3944
|
const subscribe = room.events.others.subscribe;
|
|
3892
3945
|
const getSnapshot = room.getOthers;
|
|
3893
3946
|
const getServerSnapshot = alwaysEmptyList;
|
|
@@ -3899,14 +3952,7 @@ function useOthers_withRoomContext(RoomContext, selector, isEqual) {
|
|
|
3899
3952
|
isEqual
|
|
3900
3953
|
);
|
|
3901
3954
|
}
|
|
3902
|
-
function
|
|
3903
|
-
return useOthers_withRoomContext(
|
|
3904
|
-
GlobalRoomContext,
|
|
3905
|
-
selector,
|
|
3906
|
-
isEqual
|
|
3907
|
-
);
|
|
3908
|
-
}
|
|
3909
|
-
function useOthersMapped_withRoomContext(RoomContext, itemSelector, itemIsEqual) {
|
|
3955
|
+
function useOthersMapped(itemSelector, itemIsEqual) {
|
|
3910
3956
|
const wrappedSelector = useCallback3(
|
|
3911
3957
|
(others) => others.map((other) => [other.connectionId, itemSelector(other)]),
|
|
3912
3958
|
[itemSelector]
|
|
@@ -3921,31 +3967,13 @@ function useOthersMapped_withRoomContext(RoomContext, itemSelector, itemIsEqual)
|
|
|
3921
3967
|
},
|
|
3922
3968
|
[itemIsEqual]
|
|
3923
3969
|
);
|
|
3924
|
-
return
|
|
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
|
-
);
|
|
3970
|
+
return useOthers(wrappedSelector, wrappedIsEqual);
|
|
3943
3971
|
}
|
|
3944
3972
|
function useOthersConnectionIds() {
|
|
3945
|
-
return
|
|
3973
|
+
return useOthers(selectorFor_useOthersConnectionIds, shallow4);
|
|
3946
3974
|
}
|
|
3947
3975
|
var NOT_FOUND = Symbol();
|
|
3948
|
-
function
|
|
3976
|
+
function useOther(connectionId, selector, isEqual) {
|
|
3949
3977
|
const wrappedSelector = useCallback3(
|
|
3950
3978
|
(others) => {
|
|
3951
3979
|
const other2 = others.find((other3) => other3.connectionId === connectionId);
|
|
@@ -3963,11 +3991,7 @@ function useOther_withRoomContext(RoomContext, connectionId, selector, isEqual)
|
|
|
3963
3991
|
},
|
|
3964
3992
|
[isEqual]
|
|
3965
3993
|
);
|
|
3966
|
-
const other =
|
|
3967
|
-
RoomContext,
|
|
3968
|
-
wrappedSelector,
|
|
3969
|
-
wrappedIsEqual
|
|
3970
|
-
);
|
|
3994
|
+
const other = useOthers(wrappedSelector, wrappedIsEqual);
|
|
3971
3995
|
if (other === NOT_FOUND) {
|
|
3972
3996
|
throw new Error(
|
|
3973
3997
|
`No such other user with connection id ${connectionId} exists`
|
|
@@ -3975,34 +3999,19 @@ function useOther_withRoomContext(RoomContext, connectionId, selector, isEqual)
|
|
|
3975
3999
|
}
|
|
3976
4000
|
return other;
|
|
3977
4001
|
}
|
|
3978
|
-
function
|
|
3979
|
-
|
|
3980
|
-
GlobalRoomContext,
|
|
3981
|
-
connectionId,
|
|
3982
|
-
selector,
|
|
3983
|
-
isEqual
|
|
3984
|
-
);
|
|
3985
|
-
}
|
|
3986
|
-
function useMutableStorageRoot_withRoomContext(RoomContext) {
|
|
3987
|
-
const room = useRoom_withRoomContext(
|
|
3988
|
-
RoomContext
|
|
3989
|
-
);
|
|
4002
|
+
function useMutableStorageRoot() {
|
|
4003
|
+
const room = useRoom();
|
|
3990
4004
|
const subscribe = room.events.storageDidLoad.subscribeOnce;
|
|
3991
4005
|
const getSnapshot = room.getStorageSnapshot;
|
|
3992
4006
|
const getServerSnapshot = alwaysNull;
|
|
3993
4007
|
return useSyncExternalStore3(subscribe, getSnapshot, getServerSnapshot);
|
|
3994
4008
|
}
|
|
3995
|
-
function useStorageRoot_withRoomContext(RoomContext) {
|
|
3996
|
-
return [useMutableStorageRoot_withRoomContext(RoomContext)];
|
|
3997
|
-
}
|
|
3998
4009
|
function useStorageRoot() {
|
|
3999
|
-
return
|
|
4010
|
+
return [useMutableStorageRoot()];
|
|
4000
4011
|
}
|
|
4001
|
-
function
|
|
4002
|
-
const room =
|
|
4003
|
-
|
|
4004
|
-
);
|
|
4005
|
-
const rootOrNull = useMutableStorageRoot_withRoomContext(RoomContext);
|
|
4012
|
+
function useStorage(selector, isEqual) {
|
|
4013
|
+
const room = useRoom();
|
|
4014
|
+
const rootOrNull = useMutableStorageRoot();
|
|
4006
4015
|
const wrappedSelector = useCallback3(
|
|
4007
4016
|
(rootOrNull2) => rootOrNull2 !== null ? selector(rootOrNull2) : null,
|
|
4008
4017
|
[selector]
|
|
@@ -4029,11 +4038,8 @@ function useStorage_withRoomContext(RoomContext, selector, isEqual) {
|
|
|
4029
4038
|
isEqual
|
|
4030
4039
|
);
|
|
4031
4040
|
}
|
|
4032
|
-
function
|
|
4033
|
-
|
|
4034
|
-
}
|
|
4035
|
-
function useMutation_withRoomContext(RoomContext, callback, deps) {
|
|
4036
|
-
const room = useRoom_withRoomContext(RoomContext);
|
|
4041
|
+
function useMutation(callback, deps) {
|
|
4042
|
+
const room = useRoom();
|
|
4037
4043
|
return useMemo4(
|
|
4038
4044
|
() => {
|
|
4039
4045
|
return (...args) => (
|
|
@@ -4053,17 +4059,10 @@ function useMutation_withRoomContext(RoomContext, callback, deps) {
|
|
|
4053
4059
|
[room, ...deps]
|
|
4054
4060
|
);
|
|
4055
4061
|
}
|
|
4056
|
-
function
|
|
4057
|
-
return useMutation_withRoomContext(
|
|
4058
|
-
GlobalRoomContext,
|
|
4059
|
-
callback,
|
|
4060
|
-
deps
|
|
4061
|
-
);
|
|
4062
|
-
}
|
|
4063
|
-
function useThreads_withRoomContext(RoomContext, options = {}) {
|
|
4062
|
+
function useThreads(options = {}) {
|
|
4064
4063
|
const { scrollOnLoad = true } = options;
|
|
4065
4064
|
const client = useClient();
|
|
4066
|
-
const room =
|
|
4065
|
+
const room = useRoom();
|
|
4067
4066
|
const { store, getOrCreateThreadsPollerForRoomId } = getRoomExtrasForClient(client);
|
|
4068
4067
|
const queryKey = makeRoomThreadsQueryKey(room.id, options.query);
|
|
4069
4068
|
const poller = getOrCreateThreadsPollerForRoomId(room.id);
|
|
@@ -4089,17 +4088,14 @@ function useThreads_withRoomContext(RoomContext, options = {}) {
|
|
|
4089
4088
|
useScrollToCommentOnLoadEffect(scrollOnLoad, result);
|
|
4090
4089
|
return result;
|
|
4091
4090
|
}
|
|
4092
|
-
function
|
|
4093
|
-
return useThreads_withRoomContext(GlobalRoomContext, options);
|
|
4094
|
-
}
|
|
4095
|
-
function useSearchComments_withRoomContext(RoomContext, options) {
|
|
4091
|
+
function useSearchComments(options) {
|
|
4096
4092
|
const [result, setResult] = useState3({
|
|
4097
4093
|
isLoading: true
|
|
4098
4094
|
});
|
|
4099
4095
|
const currentRequestInfo = useRef3(null);
|
|
4100
4096
|
const timeout = useRef3(null);
|
|
4101
4097
|
const client = useClient();
|
|
4102
|
-
const room =
|
|
4098
|
+
const room = useRoom();
|
|
4103
4099
|
const queryKey = stableStringify2([room.id, options.query]);
|
|
4104
4100
|
useEffect6(() => {
|
|
4105
4101
|
const currentRequestId = (currentRequestInfo.current?.id ?? 0) + 1;
|
|
@@ -4143,14 +4139,8 @@ function useSearchComments_withRoomContext(RoomContext, options) {
|
|
|
4143
4139
|
}, [queryKey, client, room.id]);
|
|
4144
4140
|
return result;
|
|
4145
4141
|
}
|
|
4146
|
-
function useSearchComments(options) {
|
|
4147
|
-
return useSearchComments_withRoomContext(GlobalRoomContext, options);
|
|
4148
|
-
}
|
|
4149
|
-
function useCreateThread_withRoomContext(RoomContext) {
|
|
4150
|
-
return useCreateRoomThread(useRoom_withRoomContext(RoomContext).id);
|
|
4151
|
-
}
|
|
4152
4142
|
function useCreateThread() {
|
|
4153
|
-
return
|
|
4143
|
+
return useCreateRoomThread(useRoom().id);
|
|
4154
4144
|
}
|
|
4155
4145
|
function useCreateRoomThread(roomId) {
|
|
4156
4146
|
const client = useClient();
|
|
@@ -4223,11 +4213,8 @@ function useCreateRoomThread(roomId) {
|
|
|
4223
4213
|
[client, roomId]
|
|
4224
4214
|
);
|
|
4225
4215
|
}
|
|
4226
|
-
function useDeleteThread_withRoomContext(RoomContext) {
|
|
4227
|
-
return useDeleteRoomThread(useRoom_withRoomContext(RoomContext).id);
|
|
4228
|
-
}
|
|
4229
4216
|
function useDeleteThread() {
|
|
4230
|
-
return
|
|
4217
|
+
return useDeleteRoomThread(useRoom().id);
|
|
4231
4218
|
}
|
|
4232
4219
|
function useDeleteRoomThread(roomId) {
|
|
4233
4220
|
const client = useClient();
|
|
@@ -4259,11 +4246,8 @@ function useDeleteRoomThread(roomId) {
|
|
|
4259
4246
|
[client, roomId]
|
|
4260
4247
|
);
|
|
4261
4248
|
}
|
|
4262
|
-
function useEditThreadMetadata_withRoomContext(RoomContext) {
|
|
4263
|
-
return useEditRoomThreadMetadata(useRoom_withRoomContext(RoomContext).id);
|
|
4264
|
-
}
|
|
4265
4249
|
function useEditThreadMetadata() {
|
|
4266
|
-
return
|
|
4250
|
+
return useEditRoomThreadMetadata(useRoom().id);
|
|
4267
4251
|
}
|
|
4268
4252
|
function useEditRoomThreadMetadata(roomId) {
|
|
4269
4253
|
const client = useClient();
|
|
@@ -4302,13 +4286,8 @@ function useEditRoomThreadMetadata(roomId) {
|
|
|
4302
4286
|
[client, roomId]
|
|
4303
4287
|
);
|
|
4304
4288
|
}
|
|
4305
|
-
function useEditCommentMetadata_withRoomContext(RoomContext) {
|
|
4306
|
-
return useEditRoomCommentMetadata(
|
|
4307
|
-
useRoom_withRoomContext(RoomContext).id
|
|
4308
|
-
);
|
|
4309
|
-
}
|
|
4310
4289
|
function useEditCommentMetadata() {
|
|
4311
|
-
return
|
|
4290
|
+
return useEditRoomCommentMetadata(useRoom().id);
|
|
4312
4291
|
}
|
|
4313
4292
|
function useEditRoomCommentMetadata(roomId) {
|
|
4314
4293
|
const client = useClient();
|
|
@@ -4356,11 +4335,8 @@ function useEditRoomCommentMetadata(roomId) {
|
|
|
4356
4335
|
[client, roomId]
|
|
4357
4336
|
);
|
|
4358
4337
|
}
|
|
4359
|
-
function useCreateComment_withRoomContext(RoomContext) {
|
|
4360
|
-
return useCreateRoomComment(useRoom_withRoomContext(RoomContext).id);
|
|
4361
|
-
}
|
|
4362
4338
|
function useCreateComment() {
|
|
4363
|
-
return
|
|
4339
|
+
return useCreateRoomComment(useRoom().id);
|
|
4364
4340
|
}
|
|
4365
4341
|
function useCreateRoomComment(roomId) {
|
|
4366
4342
|
const client = useClient();
|
|
@@ -4418,11 +4394,8 @@ function useCreateRoomComment(roomId) {
|
|
|
4418
4394
|
[client, roomId]
|
|
4419
4395
|
);
|
|
4420
4396
|
}
|
|
4421
|
-
function useEditComment_withRoomContext(RoomContext) {
|
|
4422
|
-
return useEditRoomComment(useRoom_withRoomContext(RoomContext).id);
|
|
4423
|
-
}
|
|
4424
4397
|
function useEditComment() {
|
|
4425
|
-
return
|
|
4398
|
+
return useEditRoomComment(useRoom().id);
|
|
4426
4399
|
}
|
|
4427
4400
|
function useEditRoomComment(roomId) {
|
|
4428
4401
|
const client = useClient();
|
|
@@ -4495,11 +4468,8 @@ function useEditRoomComment(roomId) {
|
|
|
4495
4468
|
[client, roomId]
|
|
4496
4469
|
);
|
|
4497
4470
|
}
|
|
4498
|
-
function useDeleteComment_withRoomContext(RoomContext) {
|
|
4499
|
-
return useDeleteRoomComment(useRoom_withRoomContext(RoomContext).id);
|
|
4500
|
-
}
|
|
4501
4471
|
function useDeleteComment() {
|
|
4502
|
-
return
|
|
4472
|
+
return useDeleteRoomComment(useRoom().id);
|
|
4503
4473
|
}
|
|
4504
4474
|
function useDeleteRoomComment(roomId) {
|
|
4505
4475
|
const client = useClient();
|
|
@@ -4528,11 +4498,8 @@ function useDeleteRoomComment(roomId) {
|
|
|
4528
4498
|
[client, roomId]
|
|
4529
4499
|
);
|
|
4530
4500
|
}
|
|
4531
|
-
function useAddReaction_withRoomContext(RoomContext) {
|
|
4532
|
-
return useAddRoomCommentReaction(useRoom_withRoomContext(RoomContext).id);
|
|
4533
|
-
}
|
|
4534
4501
|
function useAddReaction() {
|
|
4535
|
-
return
|
|
4502
|
+
return useAddRoomCommentReaction(useRoom().id);
|
|
4536
4503
|
}
|
|
4537
4504
|
function useAddRoomCommentReaction(roomId) {
|
|
4538
4505
|
const client = useClient();
|
|
@@ -4577,11 +4544,8 @@ function useAddRoomCommentReaction(roomId) {
|
|
|
4577
4544
|
[client, roomId]
|
|
4578
4545
|
);
|
|
4579
4546
|
}
|
|
4580
|
-
function useRemoveReaction_withRoomContext(RoomContext) {
|
|
4581
|
-
return useRemoveRoomCommentReaction(useRoom_withRoomContext(RoomContext).id);
|
|
4582
|
-
}
|
|
4583
4547
|
function useRemoveReaction() {
|
|
4584
|
-
return
|
|
4548
|
+
return useRemoveRoomCommentReaction(useRoom().id);
|
|
4585
4549
|
}
|
|
4586
4550
|
function useRemoveRoomCommentReaction(roomId) {
|
|
4587
4551
|
const client = useClient();
|
|
@@ -4625,6 +4589,9 @@ function useRemoveRoomCommentReaction(roomId) {
|
|
|
4625
4589
|
[client, roomId]
|
|
4626
4590
|
);
|
|
4627
4591
|
}
|
|
4592
|
+
function useMarkThreadAsRead() {
|
|
4593
|
+
return useMarkRoomThreadAsRead(useRoom().id);
|
|
4594
|
+
}
|
|
4628
4595
|
function useMarkRoomThreadAsRead(roomId) {
|
|
4629
4596
|
const client = useClient();
|
|
4630
4597
|
return useCallback3(
|
|
@@ -4670,18 +4637,8 @@ function useMarkRoomThreadAsRead(roomId) {
|
|
|
4670
4637
|
[client, roomId]
|
|
4671
4638
|
);
|
|
4672
4639
|
}
|
|
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
|
-
}
|
|
4683
4640
|
function useMarkThreadAsResolved() {
|
|
4684
|
-
return
|
|
4641
|
+
return useMarkRoomThreadAsResolved(useRoom().id);
|
|
4685
4642
|
}
|
|
4686
4643
|
function useMarkRoomThreadAsResolved(roomId) {
|
|
4687
4644
|
const client = useClient();
|
|
@@ -4713,11 +4670,8 @@ function useMarkRoomThreadAsResolved(roomId) {
|
|
|
4713
4670
|
[client, roomId]
|
|
4714
4671
|
);
|
|
4715
4672
|
}
|
|
4716
|
-
function useMarkThreadAsUnresolved_withRoomContext(RoomContext) {
|
|
4717
|
-
return useMarkRoomThreadAsUnresolved(useRoom_withRoomContext(RoomContext).id);
|
|
4718
|
-
}
|
|
4719
4673
|
function useMarkThreadAsUnresolved() {
|
|
4720
|
-
return
|
|
4674
|
+
return useMarkRoomThreadAsUnresolved(useRoom().id);
|
|
4721
4675
|
}
|
|
4722
4676
|
function useMarkRoomThreadAsUnresolved(roomId) {
|
|
4723
4677
|
const client = useClient();
|
|
@@ -4749,11 +4703,8 @@ function useMarkRoomThreadAsUnresolved(roomId) {
|
|
|
4749
4703
|
[client, roomId]
|
|
4750
4704
|
);
|
|
4751
4705
|
}
|
|
4752
|
-
function useSubscribeToThread_withRoomContext(RoomContext) {
|
|
4753
|
-
return useSubscribeToRoomThread(useRoom_withRoomContext(RoomContext).id);
|
|
4754
|
-
}
|
|
4755
4706
|
function useSubscribeToThread() {
|
|
4756
|
-
return
|
|
4707
|
+
return useSubscribeToRoomThread(useRoom().id);
|
|
4757
4708
|
}
|
|
4758
4709
|
function useSubscribeToRoomThread(roomId) {
|
|
4759
4710
|
const client = useClient();
|
|
@@ -4780,11 +4731,8 @@ function useSubscribeToRoomThread(roomId) {
|
|
|
4780
4731
|
[client, roomId]
|
|
4781
4732
|
);
|
|
4782
4733
|
}
|
|
4783
|
-
function useUnsubscribeFromThread_withRoomContext(RoomContext) {
|
|
4784
|
-
return useUnsubscribeFromRoomThread(useRoom_withRoomContext(RoomContext).id);
|
|
4785
|
-
}
|
|
4786
4734
|
function useUnsubscribeFromThread() {
|
|
4787
|
-
return
|
|
4735
|
+
return useUnsubscribeFromRoomThread(useRoom().id);
|
|
4788
4736
|
}
|
|
4789
4737
|
function useUnsubscribeFromRoomThread(roomId) {
|
|
4790
4738
|
const client = useClient();
|
|
@@ -4814,14 +4762,8 @@ function useUnsubscribeFromRoomThread(roomId) {
|
|
|
4814
4762
|
[client, roomId]
|
|
4815
4763
|
);
|
|
4816
4764
|
}
|
|
4817
|
-
function useThreadSubscription_withRoomContext(RoomContext, threadId) {
|
|
4818
|
-
return useRoomThreadSubscription(
|
|
4819
|
-
useRoom_withRoomContext(RoomContext).id,
|
|
4820
|
-
threadId
|
|
4821
|
-
);
|
|
4822
|
-
}
|
|
4823
4765
|
function useThreadSubscription(threadId) {
|
|
4824
|
-
return
|
|
4766
|
+
return useRoomThreadSubscription(useRoom().id, threadId);
|
|
4825
4767
|
}
|
|
4826
4768
|
function useRoomThreadSubscription(roomId, threadId) {
|
|
4827
4769
|
const client = useClient();
|
|
@@ -4861,10 +4803,10 @@ function useRoomThreadSubscription(roomId, threadId) {
|
|
|
4861
4803
|
);
|
|
4862
4804
|
return useSignal(signal, selector, shallow4);
|
|
4863
4805
|
}
|
|
4864
|
-
function
|
|
4865
|
-
const updateRoomSubscriptionSettings =
|
|
4806
|
+
function useRoomSubscriptionSettings() {
|
|
4807
|
+
const updateRoomSubscriptionSettings = useUpdateRoomSubscriptionSettings();
|
|
4866
4808
|
const client = useClient();
|
|
4867
|
-
const room =
|
|
4809
|
+
const room = useRoom();
|
|
4868
4810
|
const { store, getOrCreateSubscriptionSettingsPollerForRoomId } = getRoomExtrasForClient(client);
|
|
4869
4811
|
const poller = getOrCreateSubscriptionSettingsPollerForRoomId(room.id);
|
|
4870
4812
|
useEffect6(
|
|
@@ -4892,32 +4834,26 @@ function useRoomSubscriptionSettings_withRoomContext(RoomContext) {
|
|
|
4892
4834
|
return [settings, updateRoomSubscriptionSettings];
|
|
4893
4835
|
}, [settings, updateRoomSubscriptionSettings]);
|
|
4894
4836
|
}
|
|
4895
|
-
function
|
|
4896
|
-
return useRoomSubscriptionSettings_withRoomContext(GlobalRoomContext);
|
|
4897
|
-
}
|
|
4898
|
-
function useRoomSubscriptionSettingsSuspense_withRoomContext(RoomContext) {
|
|
4837
|
+
function useRoomSubscriptionSettingsSuspense() {
|
|
4899
4838
|
ensureNotServerSide();
|
|
4900
4839
|
const client = useClient();
|
|
4901
4840
|
const store = getRoomExtrasForClient(client).store;
|
|
4902
|
-
const room =
|
|
4841
|
+
const room = useRoom();
|
|
4903
4842
|
use(
|
|
4904
4843
|
store.outputs.roomSubscriptionSettingsByRoomId.getOrCreate(room.id).waitUntilLoaded()
|
|
4905
4844
|
);
|
|
4906
|
-
const [settings, updateRoomSubscriptionSettings] =
|
|
4845
|
+
const [settings, updateRoomSubscriptionSettings] = useRoomSubscriptionSettings();
|
|
4907
4846
|
assert2(!settings.error, "Did not expect error");
|
|
4908
4847
|
assert2(!settings.isLoading, "Did not expect loading");
|
|
4909
4848
|
return useMemo4(() => {
|
|
4910
4849
|
return [settings, updateRoomSubscriptionSettings];
|
|
4911
4850
|
}, [settings, updateRoomSubscriptionSettings]);
|
|
4912
4851
|
}
|
|
4913
|
-
function
|
|
4914
|
-
return useRoomSubscriptionSettingsSuspense_withRoomContext(GlobalRoomContext);
|
|
4915
|
-
}
|
|
4916
|
-
function useHistoryVersionData_withRoomContext(RoomContext, versionId) {
|
|
4852
|
+
function useHistoryVersionData(versionId) {
|
|
4917
4853
|
const [state, setState] = useState3({
|
|
4918
4854
|
isLoading: true
|
|
4919
4855
|
});
|
|
4920
|
-
const room =
|
|
4856
|
+
const room = useRoom();
|
|
4921
4857
|
useEffect6(() => {
|
|
4922
4858
|
setState({ isLoading: true });
|
|
4923
4859
|
const load = async () => {
|
|
@@ -4942,12 +4878,9 @@ function useHistoryVersionData_withRoomContext(RoomContext, versionId) {
|
|
|
4942
4878
|
}, [room, versionId]);
|
|
4943
4879
|
return state;
|
|
4944
4880
|
}
|
|
4945
|
-
function
|
|
4946
|
-
return useHistoryVersionData_withRoomContext(GlobalRoomContext, versionId);
|
|
4947
|
-
}
|
|
4948
|
-
function useHistoryVersions_withRoomContext(RoomContext) {
|
|
4881
|
+
function useHistoryVersions() {
|
|
4949
4882
|
const client = useClient();
|
|
4950
|
-
const room =
|
|
4883
|
+
const room = useRoom();
|
|
4951
4884
|
const { store, getOrCreateVersionsPollerForRoomId } = getRoomExtrasForClient(client);
|
|
4952
4885
|
const poller = getOrCreateVersionsPollerForRoomId(room.id);
|
|
4953
4886
|
useEffect6(() => {
|
|
@@ -4968,26 +4901,20 @@ function useHistoryVersions_withRoomContext(RoomContext) {
|
|
|
4968
4901
|
);
|
|
4969
4902
|
return useSignal(store.outputs.versionsByRoomId.getOrCreate(room.id).signal);
|
|
4970
4903
|
}
|
|
4971
|
-
function
|
|
4972
|
-
return useHistoryVersions_withRoomContext(GlobalRoomContext);
|
|
4973
|
-
}
|
|
4974
|
-
function useHistoryVersionsSuspense_withRoomContext(RoomContext) {
|
|
4904
|
+
function useHistoryVersionsSuspense() {
|
|
4975
4905
|
ensureNotServerSide();
|
|
4976
4906
|
const client = useClient();
|
|
4977
|
-
const room =
|
|
4907
|
+
const room = useRoom();
|
|
4978
4908
|
const store = getRoomExtrasForClient(client).store;
|
|
4979
4909
|
use(store.outputs.versionsByRoomId.getOrCreate(room.id).waitUntilLoaded());
|
|
4980
|
-
const result =
|
|
4910
|
+
const result = useHistoryVersions();
|
|
4981
4911
|
assert2(!result.error, "Did not expect error");
|
|
4982
4912
|
assert2(!result.isLoading, "Did not expect loading");
|
|
4983
4913
|
return result;
|
|
4984
4914
|
}
|
|
4985
|
-
function
|
|
4986
|
-
return useHistoryVersionsSuspense_withRoomContext(GlobalRoomContext);
|
|
4987
|
-
}
|
|
4988
|
-
function useUpdateRoomSubscriptionSettings_withRoomContext(RoomContext) {
|
|
4915
|
+
function useUpdateRoomSubscriptionSettings() {
|
|
4989
4916
|
const client = useClient();
|
|
4990
|
-
const room =
|
|
4917
|
+
const room = useRoom();
|
|
4991
4918
|
return useCallback3(
|
|
4992
4919
|
(settings) => {
|
|
4993
4920
|
const { store, onMutationFailure, pollThreadsForRoomId } = getRoomExtrasForClient(client);
|
|
@@ -5022,118 +4949,61 @@ function useUpdateRoomSubscriptionSettings_withRoomContext(RoomContext) {
|
|
|
5022
4949
|
[client, room]
|
|
5023
4950
|
);
|
|
5024
4951
|
}
|
|
5025
|
-
function
|
|
5026
|
-
return useUpdateRoomSubscriptionSettings_withRoomContext(GlobalRoomContext);
|
|
5027
|
-
}
|
|
5028
|
-
function useSuspendUntilPresenceReady_withRoomContext(RoomContext) {
|
|
4952
|
+
function useSuspendUntilPresenceReady() {
|
|
5029
4953
|
ensureNotServerSide();
|
|
5030
|
-
const room =
|
|
4954
|
+
const room = useRoom();
|
|
5031
4955
|
use(room.waitUntilPresenceReady());
|
|
5032
4956
|
}
|
|
5033
|
-
function useSelfSuspense_withRoomContext(RoomContext, selector, isEqual) {
|
|
5034
|
-
useSuspendUntilPresenceReady_withRoomContext(RoomContext);
|
|
5035
|
-
return useSelf_withRoomContext(
|
|
5036
|
-
RoomContext,
|
|
5037
|
-
selector,
|
|
5038
|
-
isEqual
|
|
5039
|
-
);
|
|
5040
|
-
}
|
|
5041
4957
|
function useSelfSuspense(selector, isEqual) {
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
selector,
|
|
5045
|
-
isEqual
|
|
5046
|
-
);
|
|
5047
|
-
}
|
|
5048
|
-
function useOthersSuspense_withRoomContext(RoomContext, selector, isEqual) {
|
|
5049
|
-
useSuspendUntilPresenceReady_withRoomContext(RoomContext);
|
|
5050
|
-
return useOthers_withRoomContext(
|
|
5051
|
-
RoomContext,
|
|
4958
|
+
useSuspendUntilPresenceReady();
|
|
4959
|
+
return useSelf(
|
|
5052
4960
|
selector,
|
|
5053
4961
|
isEqual
|
|
5054
4962
|
);
|
|
5055
4963
|
}
|
|
5056
4964
|
function useOthersSuspense(selector, isEqual) {
|
|
5057
|
-
|
|
5058
|
-
|
|
4965
|
+
useSuspendUntilPresenceReady();
|
|
4966
|
+
return useOthers(
|
|
5059
4967
|
selector,
|
|
5060
4968
|
isEqual
|
|
5061
4969
|
);
|
|
5062
4970
|
}
|
|
5063
|
-
function useOthersConnectionIdsSuspense_withRoomContext(RoomContext) {
|
|
5064
|
-
useSuspendUntilPresenceReady_withRoomContext(RoomContext);
|
|
5065
|
-
return useOthersConnectionIds_withRoomContext(RoomContext);
|
|
5066
|
-
}
|
|
5067
4971
|
function useOthersConnectionIdsSuspense() {
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
function useOthersMappedSuspense_withRoomContext(RoomContext, itemSelector, itemIsEqual) {
|
|
5071
|
-
useSuspendUntilPresenceReady_withRoomContext(RoomContext);
|
|
5072
|
-
return useOthersMapped_withRoomContext(
|
|
5073
|
-
RoomContext,
|
|
5074
|
-
itemSelector,
|
|
5075
|
-
itemIsEqual
|
|
5076
|
-
);
|
|
4972
|
+
useSuspendUntilPresenceReady();
|
|
4973
|
+
return useOthersConnectionIds();
|
|
5077
4974
|
}
|
|
5078
4975
|
function useOthersMappedSuspense(itemSelector, itemIsEqual) {
|
|
5079
|
-
|
|
5080
|
-
|
|
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
|
-
);
|
|
4976
|
+
useSuspendUntilPresenceReady();
|
|
4977
|
+
return useOthersMapped(itemSelector, itemIsEqual);
|
|
5093
4978
|
}
|
|
5094
4979
|
function useOtherSuspense(connectionId, selector, isEqual) {
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
connectionId,
|
|
5098
|
-
selector,
|
|
5099
|
-
isEqual
|
|
5100
|
-
);
|
|
4980
|
+
useSuspendUntilPresenceReady();
|
|
4981
|
+
return useOther(connectionId, selector, isEqual);
|
|
5101
4982
|
}
|
|
5102
|
-
function
|
|
4983
|
+
function useSuspendUntilStorageReady() {
|
|
5103
4984
|
ensureNotServerSide();
|
|
5104
|
-
const room =
|
|
4985
|
+
const room = useRoom();
|
|
5105
4986
|
use(room.waitUntilStorageReady());
|
|
5106
4987
|
}
|
|
5107
|
-
function useStorageSuspense_withRoomContext(RoomContext, selector, isEqual) {
|
|
5108
|
-
useSuspendUntilStorageReady_withRoomContext(RoomContext);
|
|
5109
|
-
return useStorage_withRoomContext(
|
|
5110
|
-
RoomContext,
|
|
5111
|
-
selector,
|
|
5112
|
-
isEqual
|
|
5113
|
-
);
|
|
5114
|
-
}
|
|
5115
4988
|
function useStorageSuspense(selector, isEqual) {
|
|
5116
|
-
|
|
5117
|
-
|
|
4989
|
+
useSuspendUntilStorageReady();
|
|
4990
|
+
return useStorage(
|
|
5118
4991
|
selector,
|
|
5119
4992
|
isEqual
|
|
5120
4993
|
);
|
|
5121
4994
|
}
|
|
5122
|
-
function
|
|
4995
|
+
function useThreadsSuspense(options = {}) {
|
|
5123
4996
|
ensureNotServerSide();
|
|
5124
4997
|
const client = useClient();
|
|
5125
|
-
const room =
|
|
4998
|
+
const room = useRoom();
|
|
5126
4999
|
const { store } = getRoomExtrasForClient(client);
|
|
5127
5000
|
const queryKey = makeRoomThreadsQueryKey(room.id, options.query);
|
|
5128
5001
|
use(store.outputs.loadingRoomThreads.getOrCreate(queryKey).waitUntilLoaded());
|
|
5129
|
-
const result =
|
|
5002
|
+
const result = useThreads(options);
|
|
5130
5003
|
assert2(!result.error, "Did not expect error");
|
|
5131
5004
|
assert2(!result.isLoading, "Did not expect loading");
|
|
5132
5005
|
return result;
|
|
5133
5006
|
}
|
|
5134
|
-
function useThreadsSuspense(options = {}) {
|
|
5135
|
-
return useThreadsSuspense_withRoomContext(GlobalRoomContext, options);
|
|
5136
|
-
}
|
|
5137
5007
|
function selectorFor_useAttachmentUrl(state) {
|
|
5138
5008
|
if (state === void 0 || state?.isLoading) {
|
|
5139
5009
|
return state ?? { isLoading: true };
|
|
@@ -5147,12 +5017,9 @@ function selectorFor_useAttachmentUrl(state) {
|
|
|
5147
5017
|
url: state.data
|
|
5148
5018
|
};
|
|
5149
5019
|
}
|
|
5150
|
-
function useAttachmentUrl_withRoomContext(RoomContext, attachmentId) {
|
|
5151
|
-
const room = useRoom_withRoomContext(RoomContext);
|
|
5152
|
-
return useRoomAttachmentUrl(attachmentId, room.id);
|
|
5153
|
-
}
|
|
5154
5020
|
function useAttachmentUrl(attachmentId) {
|
|
5155
|
-
|
|
5021
|
+
const room = useRoom();
|
|
5022
|
+
return useRoomAttachmentUrl(attachmentId, room.id);
|
|
5156
5023
|
}
|
|
5157
5024
|
function useRoomAttachmentUrl(attachmentId, roomId) {
|
|
5158
5025
|
const client = useClient();
|
|
@@ -5172,8 +5039,8 @@ function useRoomAttachmentUrl(attachmentId, roomId) {
|
|
|
5172
5039
|
shallow4
|
|
5173
5040
|
);
|
|
5174
5041
|
}
|
|
5175
|
-
function
|
|
5176
|
-
const room =
|
|
5042
|
+
function useAttachmentUrlSuspense(attachmentId) {
|
|
5043
|
+
const room = useRoom();
|
|
5177
5044
|
const { attachmentUrlsStore } = room[kInternal4];
|
|
5178
5045
|
const getAttachmentUrlState = useCallback3(
|
|
5179
5046
|
() => attachmentUrlsStore.getItemState(attachmentId),
|
|
@@ -5200,382 +5067,13 @@ function useAttachmentUrlSuspense_withRoomContext(RoomContext, attachmentId) {
|
|
|
5200
5067
|
error: void 0
|
|
5201
5068
|
};
|
|
5202
5069
|
}
|
|
5203
|
-
function useAttachmentUrlSuspense(attachmentId) {
|
|
5204
|
-
return useAttachmentUrlSuspense_withRoomContext(
|
|
5205
|
-
GlobalRoomContext,
|
|
5206
|
-
attachmentId
|
|
5207
|
-
);
|
|
5208
|
-
}
|
|
5209
5070
|
function useRoomPermissions(roomId) {
|
|
5210
5071
|
const client = useClient();
|
|
5211
5072
|
const store = getRoomExtrasForClient(client).store;
|
|
5212
5073
|
return useSignal(store.permissionHints.getPermissionForRoom\u03A3(roomId));
|
|
5213
5074
|
}
|
|
5214
5075
|
function createRoomContext(client) {
|
|
5215
|
-
|
|
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
|
-
});
|
|
5076
|
+
return getOrCreateRoomContextBundle(client);
|
|
5579
5077
|
}
|
|
5580
5078
|
var _RoomProvider = RoomProvider;
|
|
5581
5079
|
var _useBroadcastEvent = useBroadcastEvent;
|
|
@@ -5624,7 +5122,7 @@ export {
|
|
|
5624
5122
|
ClientContext,
|
|
5625
5123
|
useClientOrNull,
|
|
5626
5124
|
useClient,
|
|
5627
|
-
|
|
5125
|
+
RoomContext,
|
|
5628
5126
|
useLatest,
|
|
5629
5127
|
RegisterAiKnowledge,
|
|
5630
5128
|
RegisterAiTool,
|
|
@@ -5691,8 +5189,8 @@ export {
|
|
|
5691
5189
|
useAddRoomCommentReaction,
|
|
5692
5190
|
useRemoveReaction,
|
|
5693
5191
|
useRemoveRoomCommentReaction,
|
|
5694
|
-
useMarkRoomThreadAsRead,
|
|
5695
5192
|
useMarkThreadAsRead,
|
|
5193
|
+
useMarkRoomThreadAsRead,
|
|
5696
5194
|
useMarkThreadAsResolved,
|
|
5697
5195
|
useMarkRoomThreadAsResolved,
|
|
5698
5196
|
useMarkThreadAsUnresolved,
|
|
@@ -5744,4 +5242,4 @@ export {
|
|
|
5744
5242
|
_useStorageRoot,
|
|
5745
5243
|
_useUpdateMyPresence
|
|
5746
5244
|
};
|
|
5747
|
-
//# sourceMappingURL=chunk-
|
|
5245
|
+
//# sourceMappingURL=chunk-SVZO3VVV.js.map
|