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