@liveblocks/react 2.25.0-aiprivatebeta8 → 3.0.0
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/_private/package.json +2 -2
- package/dist/_private.cjs +19 -10
- package/dist/_private.cjs.map +1 -1
- package/dist/_private.d.cts +6 -3
- package/dist/_private.d.ts +6 -3
- package/dist/_private.js +15 -6
- package/dist/_private.js.map +1 -1
- package/dist/{chunk-MT7DJTSL.js → chunk-CS6KYNXH.js} +235 -274
- package/dist/chunk-CS6KYNXH.js.map +1 -0
- package/dist/{chunk-G2EOFP6S.cjs → chunk-UR7FENGR.cjs} +138 -177
- package/dist/chunk-UR7FENGR.cjs.map +1 -0
- package/dist/chunk-WMTIZOZ3.cjs +23 -0
- package/dist/chunk-WMTIZOZ3.cjs.map +1 -0
- package/dist/chunk-XVEMIR32.js +23 -0
- package/dist/chunk-XVEMIR32.js.map +1 -0
- package/dist/index.cjs +4 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +32 -19
- package/dist/index.d.ts +32 -19
- package/dist/index.js +10 -12
- package/dist/index.js.map +1 -1
- package/dist/{room-BSt58hY4.d.cts → room-Du6_Cy1X.d.cts} +143 -124
- package/dist/{room-BSt58hY4.d.ts → room-Du6_Cy1X.d.ts} +143 -124
- package/dist/suspense.cjs +4 -8
- package/dist/suspense.cjs.map +1 -1
- package/dist/suspense.d.cts +2 -2
- package/dist/suspense.d.ts +2 -2
- package/dist/suspense.js +8 -12
- package/dist/suspense.js.map +1 -1
- package/package.json +13 -3
- package/suspense/package.json +2 -2
- package/dist/chunk-CP5NPU7C.cjs +0 -60
- package/dist/chunk-CP5NPU7C.cjs.map +0 -1
- package/dist/chunk-EAKXSMWI.js +0 -60
- package/dist/chunk-EAKXSMWI.js.map +0 -1
- package/dist/chunk-G2EOFP6S.cjs.map +0 -1
- package/dist/chunk-MT7DJTSL.js.map +0 -1
|
@@ -1,10 +1,53 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ComponentType, Context, PropsWithChildren, ReactNode } from 'react';
|
|
3
|
+
import { BaseUserMeta, Client, JsonObject, LsonObject, LiveObject, User, Json, RoomSubscriptionSettings, Room, Status, BroadcastOptions, OthersEvent, LostConnectionEvent, History, BaseMetadata as BaseMetadata$1, ClientOptions, ThreadData as ThreadData$1, CommentData as CommentData$1 } from '@liveblocks/client';
|
|
1
4
|
import * as _liveblocks_core from '@liveblocks/core';
|
|
2
|
-
import {
|
|
5
|
+
import { OpaqueClient, OpaqueRoom, AiKnowledgeSource, AiOpaqueToolDefinition, BaseMetadata, QueryMetadata, AsyncResult, DRI, AsyncSuccess, Resolve, CommentBody, CommentAttachment, PartialUnless, Patchable, InboxNotificationData, NotificationSettings, Relax, ToImmutable, PartialNotificationSettings, AsyncLoading, AsyncError, ThreadData, HistoryVersion, AiChat, Client as Client$1, LiveblocksError, SyncStatus, RoomEventMessage, CommentData, WithNavigation, AiChatMessage, MutableSignal, ThreadDataWithDeleteInfo, ThreadDeleteInfo, DerivedSignal, DefaultMap, MessageId, SubscriptionData, SubscriptionKey, CommentUserReaction, InboxNotificationDeleteInfo, SubscriptionDeleteInfo, RoomSubscriptionSettings as RoomSubscriptionSettings$1, ISignal, Permission, BaseUserMeta as BaseUserMeta$1, DistributiveOmit, DU, DM, TextEditorType, IYjsProvider, DP, DS, DE } from '@liveblocks/core';
|
|
3
6
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
-
import * as react from 'react';
|
|
5
|
-
import { Context, PropsWithChildren, ReactNode } from 'react';
|
|
6
|
-
import { JsonObject, LsonObject, BaseUserMeta, LiveObject, User, Json, RoomSubscriptionSettings, Room, Status, BroadcastOptions, OthersEvent, LostConnectionEvent, History, BaseMetadata as BaseMetadata$1, Client as Client$1, ClientOptions, StorageStatus as StorageStatus$1, ThreadData as ThreadData$1, CommentData as CommentData$1 } from '@liveblocks/client';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Raw access to the React context where the LiveblocksProvider stores the
|
|
10
|
+
* current client. Exposed for advanced use cases only.
|
|
11
|
+
*
|
|
12
|
+
* @private This is a private/advanced API. Do not rely on it.
|
|
13
|
+
*/
|
|
14
|
+
declare const ClientContext: react.Context<OpaqueClient | null>;
|
|
15
|
+
/**
|
|
16
|
+
* @private This is an internal API.
|
|
17
|
+
*/
|
|
18
|
+
declare function useClientOrNull<U extends BaseUserMeta>(): Client<U> | null;
|
|
19
|
+
/**
|
|
20
|
+
* Obtains a reference to the current Liveblocks client.
|
|
21
|
+
*/
|
|
22
|
+
declare function useClient<U extends BaseUserMeta>(): Client<U>;
|
|
23
|
+
/**
|
|
24
|
+
* Raw access to the React context where the RoomProvider stores the current
|
|
25
|
+
* room. Exposed for advanced use cases only.
|
|
26
|
+
*
|
|
27
|
+
* @private This is a private/advanced API. Do not rely on it.
|
|
28
|
+
*/
|
|
29
|
+
declare const RoomContext: react.Context<OpaqueRoom | null>;
|
|
30
|
+
|
|
31
|
+
type RegisterAiKnowledgeProps = AiKnowledgeSource & {
|
|
32
|
+
/**
|
|
33
|
+
* An optional unique key for this knowledge source. If multiple components
|
|
34
|
+
* register knowledge under the same key, the last one to mount takes
|
|
35
|
+
* precedence.
|
|
36
|
+
*/
|
|
37
|
+
id?: string;
|
|
38
|
+
};
|
|
39
|
+
type RegisterAiToolProps = {
|
|
40
|
+
name: string;
|
|
41
|
+
tool: AiOpaqueToolDefinition;
|
|
42
|
+
/**
|
|
43
|
+
* When provided, the tool will only be available for this chatId. If not
|
|
44
|
+
* provided, this tool will globally be made available to any AiChat
|
|
45
|
+
* instance.
|
|
46
|
+
*/
|
|
47
|
+
chatId?: string;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
type UiChatMessage = WithNavigation<AiChatMessage>;
|
|
8
51
|
type UseSyncStatusOptions = {
|
|
9
52
|
/**
|
|
10
53
|
* When setting smooth, the hook will not update immediately as status
|
|
@@ -14,8 +57,16 @@ type UseSyncStatusOptions = {
|
|
|
14
57
|
*/
|
|
15
58
|
smooth?: boolean;
|
|
16
59
|
};
|
|
17
|
-
type
|
|
18
|
-
|
|
60
|
+
type UseSendAiMessageOptions = {
|
|
61
|
+
/**
|
|
62
|
+
* The id of the copilot to use to send the message.
|
|
63
|
+
*/
|
|
64
|
+
copilotId?: string;
|
|
65
|
+
/** Stream the response as it is being generated. Defaults to true. */
|
|
66
|
+
stream?: boolean;
|
|
67
|
+
/** The maximum timeout for the answer to be generated. */
|
|
68
|
+
timeout?: number;
|
|
69
|
+
};
|
|
19
70
|
type ThreadsQuery<M extends BaseMetadata> = {
|
|
20
71
|
/**
|
|
21
72
|
* Whether to only return threads marked as resolved or unresolved. If not provided,
|
|
@@ -172,7 +223,7 @@ type SharedContextBundle<U extends BaseUserMeta> = {
|
|
|
172
223
|
/**
|
|
173
224
|
* Obtains a reference to the current Liveblocks client.
|
|
174
225
|
*/
|
|
175
|
-
useClient(): Client<U>;
|
|
226
|
+
useClient(): Client$1<U>;
|
|
176
227
|
/**
|
|
177
228
|
* Returns user info from a given user ID.
|
|
178
229
|
*
|
|
@@ -216,12 +267,32 @@ type SharedContextBundle<U extends BaseUserMeta> = {
|
|
|
216
267
|
* const syncStatus = useSyncStatus({ smooth: true });
|
|
217
268
|
*/
|
|
218
269
|
useSyncStatus(options?: UseSyncStatusOptions): SyncStatus;
|
|
270
|
+
/**
|
|
271
|
+
* Make knowledge about your application state available to any AI used in
|
|
272
|
+
* a chat or a one-off request.
|
|
273
|
+
*
|
|
274
|
+
* For example:
|
|
275
|
+
*
|
|
276
|
+
* <RegisterAiKnowledge
|
|
277
|
+
* description="The current mode of my application"
|
|
278
|
+
* value="dark" />
|
|
279
|
+
*
|
|
280
|
+
* <RegisterAiKnowledge
|
|
281
|
+
* description="The current list of todos"
|
|
282
|
+
* value={todos} />
|
|
283
|
+
*
|
|
284
|
+
* By mounting this component, the AI will get access to this knwoledge.
|
|
285
|
+
* By unmounting this component, the AI will no longer have access to it.
|
|
286
|
+
* It can choose to use or ignore this knowledge in its responses.
|
|
287
|
+
*/
|
|
288
|
+
RegisterAiKnowledge: ComponentType<RegisterAiKnowledgeProps>;
|
|
289
|
+
RegisterAiTool: ComponentType<RegisterAiToolProps>;
|
|
219
290
|
};
|
|
220
291
|
suspense: {
|
|
221
292
|
/**
|
|
222
293
|
* Obtains a reference to the current Liveblocks client.
|
|
223
294
|
*/
|
|
224
|
-
useClient(): Client<U>;
|
|
295
|
+
useClient(): Client$1<U>;
|
|
225
296
|
/**
|
|
226
297
|
* Returns user info from a given user ID.
|
|
227
298
|
*
|
|
@@ -265,6 +336,26 @@ type SharedContextBundle<U extends BaseUserMeta> = {
|
|
|
265
336
|
* const syncStatus = useSyncStatus({ smooth: true });
|
|
266
337
|
*/
|
|
267
338
|
useSyncStatus(options?: UseSyncStatusOptions): SyncStatus;
|
|
339
|
+
/**
|
|
340
|
+
* Make knowledge about your application state available to any AI used in
|
|
341
|
+
* a chat or a one-off request.
|
|
342
|
+
*
|
|
343
|
+
* For example:
|
|
344
|
+
*
|
|
345
|
+
* <RegisterAiKnowledge
|
|
346
|
+
* description="The current mode of my application"
|
|
347
|
+
* value="dark" />
|
|
348
|
+
*
|
|
349
|
+
* <RegisterAiKnowledge
|
|
350
|
+
* description="The current list of todos"
|
|
351
|
+
* value={todos} />
|
|
352
|
+
*
|
|
353
|
+
* By mounting this component, the AI will get access to this knwoledge.
|
|
354
|
+
* By unmounting this component, the AI will no longer have access to it.
|
|
355
|
+
* It can choose to use or ignore this knowledge in its responses.
|
|
356
|
+
*/
|
|
357
|
+
RegisterAiKnowledge: ComponentType<RegisterAiKnowledgeProps>;
|
|
358
|
+
RegisterAiTool: ComponentType<RegisterAiToolProps>;
|
|
268
359
|
};
|
|
269
360
|
};
|
|
270
361
|
/**
|
|
@@ -298,16 +389,6 @@ type RoomContextBundleCommon<P extends JsonObject, S extends LsonObject, U exten
|
|
|
298
389
|
* a re-render whenever it changes. Can be used to render a status badge.
|
|
299
390
|
*/
|
|
300
391
|
useStatus(): Status;
|
|
301
|
-
/**
|
|
302
|
-
* @deprecated It's recommended to use `useMutation` for writing to Storage,
|
|
303
|
-
* which will automatically batch all mutations.
|
|
304
|
-
*
|
|
305
|
-
* Returns a function that batches modifications made during the given function.
|
|
306
|
-
* All the modifications are sent to other clients in a single message.
|
|
307
|
-
* All the modifications are merged in a single history item (undo/redo).
|
|
308
|
-
* All the subscribers are called only after the batch is over.
|
|
309
|
-
*/
|
|
310
|
-
useBatch<T>(): (callback: () => T) => T;
|
|
311
392
|
/**
|
|
312
393
|
* Returns a callback that lets you broadcast custom events to other users in the room
|
|
313
394
|
*
|
|
@@ -665,13 +746,6 @@ type RoomContextBundleCommon<P extends JsonObject, S extends LsonObject, U exten
|
|
|
665
746
|
* removeReaction({ threadId: "th_xxx", commentId: "cm_xxx", emoji: "👍" })
|
|
666
747
|
*/
|
|
667
748
|
useRemoveReaction(): (options: CommentReactionOptions) => void;
|
|
668
|
-
/**
|
|
669
|
-
* @deprecated Renamed to `useUpdateRoomSubscriptionSettings`
|
|
670
|
-
*
|
|
671
|
-
* Returns a function that updates the user's subscription settings
|
|
672
|
-
* for the current room.
|
|
673
|
-
*/
|
|
674
|
-
useUpdateRoomNotificationSettings(): (settings: Partial<RoomSubscriptionSettings>) => void;
|
|
675
749
|
/**
|
|
676
750
|
* Returns a function that updates the user's subscription settings
|
|
677
751
|
* for the current room.
|
|
@@ -699,14 +773,6 @@ type RoomContextBundleCommon<P extends JsonObject, S extends LsonObject, U exten
|
|
|
699
773
|
useThreadSubscription(threadId: string): ThreadSubscription;
|
|
700
774
|
};
|
|
701
775
|
type RoomContextBundle<P extends JsonObject, S extends LsonObject, U extends BaseUserMeta, E extends Json, M extends BaseMetadata> = Resolve<RoomContextBundleCommon<P, S, U, E, M> & SharedContextBundle<U>["classic"] & {
|
|
702
|
-
/**
|
|
703
|
-
* Returns the current storage status for the Room, and triggers
|
|
704
|
-
* a re-render whenever it changes. Can be used to render a "Saving..."
|
|
705
|
-
* indicator.
|
|
706
|
-
*
|
|
707
|
-
* @deprecated Prefer useSyncStatus()
|
|
708
|
-
*/
|
|
709
|
-
useStorageStatus(options?: UseStorageStatusOptions): StorageStatus;
|
|
710
776
|
/**
|
|
711
777
|
* Extract arbitrary data from the Liveblocks Storage state, using an
|
|
712
778
|
* arbitrary selector function.
|
|
@@ -768,16 +834,6 @@ type RoomContextBundle<P extends JsonObject, S extends LsonObject, U extends Bas
|
|
|
768
834
|
* const { threads, error, isLoading } = useThreads();
|
|
769
835
|
*/
|
|
770
836
|
useThreads(options?: UseThreadsOptions<M>): ThreadsAsyncResult<M>;
|
|
771
|
-
/**
|
|
772
|
-
* @deprecated Renamed to `useRoomSubscriptionSettings`
|
|
773
|
-
*
|
|
774
|
-
* Returns the user's notification settings for the current room
|
|
775
|
-
* and a function to update them.
|
|
776
|
-
*/
|
|
777
|
-
useRoomNotificationSettings(): [
|
|
778
|
-
RoomSubscriptionSettingsAsyncResult,
|
|
779
|
-
(settings: Partial<RoomSubscriptionSettings>) => void
|
|
780
|
-
];
|
|
781
837
|
/**
|
|
782
838
|
* Returns the user's subscription settings for the current room
|
|
783
839
|
* and a function to update them.
|
|
@@ -811,14 +867,6 @@ type RoomContextBundle<P extends JsonObject, S extends LsonObject, U extends Bas
|
|
|
811
867
|
*/
|
|
812
868
|
useHistoryVersionData(id: string): HistoryVersionDataAsyncResult;
|
|
813
869
|
suspense: Resolve<RoomContextBundleCommon<P, S, U, E, M> & SharedContextBundle<U>["suspense"] & {
|
|
814
|
-
/**
|
|
815
|
-
* Returns the current storage status for the Room, and triggers
|
|
816
|
-
* a re-render whenever it changes. Can be used to render a "Saving..."
|
|
817
|
-
* indicator.
|
|
818
|
-
*
|
|
819
|
-
* @deprecated Prefer useSyncStatus()
|
|
820
|
-
*/
|
|
821
|
-
useStorageStatus(options?: UseStorageStatusOptions): StorageStatusSuccess;
|
|
822
870
|
/**
|
|
823
871
|
* Extract arbitrary data from the Liveblocks Storage state, using an
|
|
824
872
|
* arbitrary selector function.
|
|
@@ -881,16 +929,6 @@ type RoomContextBundle<P extends JsonObject, S extends LsonObject, U extends Bas
|
|
|
881
929
|
* const { versions } = useHistoryVersions();
|
|
882
930
|
*/
|
|
883
931
|
useHistoryVersions(): HistoryVersionsAsyncSuccess;
|
|
884
|
-
/**
|
|
885
|
-
* @deprecated Renamed to `useRoomSubscriptionSettings`
|
|
886
|
-
*
|
|
887
|
-
* Returns the user's notification settings for the current room
|
|
888
|
-
* and a function to update them.
|
|
889
|
-
*/
|
|
890
|
-
useRoomNotificationSettings(): [
|
|
891
|
-
RoomSubscriptionSettingsAsyncSuccess,
|
|
892
|
-
(settings: Partial<RoomSubscriptionSettings>) => void
|
|
893
|
-
];
|
|
894
932
|
/**
|
|
895
933
|
* Returns the user's subscription settings for the current room
|
|
896
934
|
* and a function to update them.
|
|
@@ -1020,6 +1058,14 @@ type LiveblocksContextBundleCommon<M extends BaseMetadata> = {
|
|
|
1020
1058
|
* deleteAiChat("ai-chat-id");
|
|
1021
1059
|
*/
|
|
1022
1060
|
useDeleteAiChat(): (chatId: string) => void;
|
|
1061
|
+
/**
|
|
1062
|
+
* Returns a function to send a message in an AI chat.
|
|
1063
|
+
*
|
|
1064
|
+
* @example
|
|
1065
|
+
* const sendMessage = useSendAiMessage(chatId);
|
|
1066
|
+
* sendMessage("Hello, Liveblocks AI!");
|
|
1067
|
+
*/
|
|
1068
|
+
useSendAiMessage(chatId: string, options?: UseSendAiMessageOptions): (message: string) => void;
|
|
1023
1069
|
};
|
|
1024
1070
|
type LiveblocksContextBundle<U extends BaseUserMeta, M extends BaseMetadata> = Resolve<LiveblocksContextBundleCommon<M> & SharedContextBundle<U>["classic"] & {
|
|
1025
1071
|
/**
|
|
@@ -1407,7 +1453,7 @@ declare function createStore_forNotificationSettings(updates: ISignal<readonly O
|
|
|
1407
1453
|
signal: DerivedSignal<NotificationSettings>;
|
|
1408
1454
|
update: (settings: NotificationSettings) => void;
|
|
1409
1455
|
};
|
|
1410
|
-
declare function createStore_forOptimistic<M extends BaseMetadata>(client: Client<BaseUserMeta$1, M>): {
|
|
1456
|
+
declare function createStore_forOptimistic<M extends BaseMetadata>(client: Client$1<BaseUserMeta$1, M>): {
|
|
1411
1457
|
signal: ISignal<readonly OptimisticUpdate<M>[]>;
|
|
1412
1458
|
add: (optimisticUpdate: DistributiveOmit<OptimisticUpdate<M>, "id">) => string;
|
|
1413
1459
|
remove: (optimisticId: string) => void;
|
|
@@ -1514,33 +1560,43 @@ declare class UmbrellaStore<M extends BaseMetadata> {
|
|
|
1514
1560
|
updateNotificationSettings_confirmOptimisticUpdate(settings: NotificationSettings, optimisticUpdateId: string): void;
|
|
1515
1561
|
}
|
|
1516
1562
|
|
|
1517
|
-
/**
|
|
1518
|
-
* Raw access to the React context where the LiveblocksProvider stores the
|
|
1519
|
-
* current client. Exposed for advanced use cases only.
|
|
1520
|
-
*
|
|
1521
|
-
* @private This is a private/advanced API. Do not rely on it.
|
|
1522
|
-
*/
|
|
1523
|
-
declare const ClientContext: react.Context<OpaqueClient | null>;
|
|
1524
1563
|
/**
|
|
1525
1564
|
* Gets or creates a unique Umbrella store for each unique client instance.
|
|
1526
1565
|
*
|
|
1527
1566
|
* @private
|
|
1528
1567
|
*/
|
|
1529
1568
|
declare function getUmbrellaStoreForClient<M extends BaseMetadata$1>(client: OpaqueClient): UmbrellaStore<M>;
|
|
1569
|
+
/**
|
|
1570
|
+
* Returns a function that creates an AI chat.
|
|
1571
|
+
*
|
|
1572
|
+
* If you do not pass a title for the chat, it will be automatically computed
|
|
1573
|
+
* after the first AI response.
|
|
1574
|
+
*
|
|
1575
|
+
* @example
|
|
1576
|
+
* const createAiChat = useCreateAiChat();
|
|
1577
|
+
* createAiChat({ id: "ai-chat-id", title: "My AI chat" });
|
|
1578
|
+
*/
|
|
1530
1579
|
declare function useCreateAiChat(): (options: {
|
|
1531
1580
|
id: string;
|
|
1532
1581
|
title?: string;
|
|
1533
1582
|
metadata?: Record<string, string | string[]>;
|
|
1534
1583
|
}) => void;
|
|
1535
|
-
declare function useDeleteAiChat(): (chatId: string) => void;
|
|
1536
1584
|
/**
|
|
1537
|
-
*
|
|
1585
|
+
* Returns a function that deletes the AI chat with the specified id.
|
|
1586
|
+
*
|
|
1587
|
+
* @example
|
|
1588
|
+
* const deleteAiChat = useDeleteAiChat();
|
|
1589
|
+
* deleteAiChat("ai-chat-id");
|
|
1538
1590
|
*/
|
|
1539
|
-
declare function
|
|
1591
|
+
declare function useDeleteAiChat(): (chatId: string) => void;
|
|
1540
1592
|
/**
|
|
1541
|
-
*
|
|
1593
|
+
* Returns a function to send a message in an AI chat.
|
|
1594
|
+
*
|
|
1595
|
+
* @example
|
|
1596
|
+
* const sendMessage = useSendAiMessage(chatId);
|
|
1597
|
+
* sendMessage("Hello, Liveblocks AI!");
|
|
1542
1598
|
*/
|
|
1543
|
-
declare function
|
|
1599
|
+
declare function useSendAiMessage(chatId: string, options?: UseSendAiMessageOptions): (message: string) => void;
|
|
1544
1600
|
/**
|
|
1545
1601
|
* Sets up a client for connecting to Liveblocks, and is the recommended way to do
|
|
1546
1602
|
* this for React apps. You must define either `authEndpoint` or `publicApiKey`.
|
|
@@ -1745,6 +1801,13 @@ declare const _useAiChats: TypedBundle$1["useAiChats"];
|
|
|
1745
1801
|
* const { chats, error, isLoading } = useAiChats();
|
|
1746
1802
|
*/
|
|
1747
1803
|
declare const _useAiChatsSuspense: TypedBundle$1["suspense"]["useAiChats"];
|
|
1804
|
+
/**
|
|
1805
|
+
* (Private beta) Returns the information of the given chat.
|
|
1806
|
+
*
|
|
1807
|
+
* @example
|
|
1808
|
+
* const { chat, error, isLoading } = useAiChat("my-chat");
|
|
1809
|
+
*/
|
|
1810
|
+
declare const _useAiChat: TypedBundle$1["useAiChat"];
|
|
1748
1811
|
/**
|
|
1749
1812
|
* (Private beta) Returns the information of the given chat.
|
|
1750
1813
|
*
|
|
@@ -1803,27 +1866,12 @@ declare function useCreateTextMention(): (userId: string, mentionId: string) =>
|
|
|
1803
1866
|
/** @private - Internal API, do not rely on it. */
|
|
1804
1867
|
declare function useDeleteTextMention(): (mentionId: string) => void;
|
|
1805
1868
|
/** @private - Internal API, do not rely on it. */
|
|
1806
|
-
declare function useResolveMentionSuggestions(): ((args: _liveblocks_core.ResolveMentionSuggestionsArgs) => _liveblocks_core.Awaitable<string[]>) | undefined;
|
|
1869
|
+
declare function useResolveMentionSuggestions(): ((args: _liveblocks_core.ResolveMentionSuggestionsArgs) => _liveblocks_core.Awaitable<string[] | _liveblocks_core.MentionData[]>) | undefined;
|
|
1807
1870
|
/** @private - Internal API, do not rely on it. */
|
|
1808
|
-
declare function useMentionSuggestionsCache(): Map<string,
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
* indicator.
|
|
1813
|
-
*
|
|
1814
|
-
* @deprecated Prefer useSyncStatus()
|
|
1815
|
-
*/
|
|
1816
|
-
declare function useStorageStatus(options?: UseStorageStatusOptions): StorageStatus$1;
|
|
1817
|
-
/**
|
|
1818
|
-
* @deprecated It's recommended to use `useMutation` for writing to Storage,
|
|
1819
|
-
* which will automatically batch all mutations.
|
|
1820
|
-
*
|
|
1821
|
-
* Returns a function that batches modifications made during the given function.
|
|
1822
|
-
* All the modifications are sent to other clients in a single message.
|
|
1823
|
-
* All the modifications are merged in a single history item (undo/redo).
|
|
1824
|
-
* All the subscribers are called only after the batch is over.
|
|
1825
|
-
*/
|
|
1826
|
-
declare function useBatch<T>(): (callback: () => T) => T;
|
|
1871
|
+
declare function useMentionSuggestionsCache(): Map<string, {
|
|
1872
|
+
kind: "user";
|
|
1873
|
+
id: string;
|
|
1874
|
+
}[]>;
|
|
1827
1875
|
/**
|
|
1828
1876
|
* Get informed when reconnecting to the Liveblocks servers is taking
|
|
1829
1877
|
* longer than usual. This typically is a sign of a client that has lost
|
|
@@ -2012,13 +2060,6 @@ declare function useRoomThreadSubscription(roomId: string, threadId: string): Th
|
|
|
2012
2060
|
* const {data} = useHistoryVersionData(versionId);
|
|
2013
2061
|
*/
|
|
2014
2062
|
declare function useHistoryVersionData(versionId: string): HistoryVersionDataAsyncResult;
|
|
2015
|
-
/**
|
|
2016
|
-
* @deprecated Renamed to `useUpdateRoomSubscriptionSettings`
|
|
2017
|
-
*
|
|
2018
|
-
* Returns a function that updates the user's subscription settings
|
|
2019
|
-
* for the current room.
|
|
2020
|
-
*/
|
|
2021
|
-
declare function useUpdateRoomNotificationSettings(): (settings: Partial<RoomSubscriptionSettings$1>) => void;
|
|
2022
2063
|
/**
|
|
2023
2064
|
* Returns a function that updates the user's subscription settings
|
|
2024
2065
|
* for the current room.
|
|
@@ -2043,14 +2084,6 @@ declare function useUpdateRoomSubscriptionSettings(): (settings: Partial<RoomSub
|
|
|
2043
2084
|
* // [2, 4, 7]
|
|
2044
2085
|
*/
|
|
2045
2086
|
declare function useOthersConnectionIdsSuspense(): readonly number[];
|
|
2046
|
-
/**
|
|
2047
|
-
* Returns the current storage status for the Room, and triggers
|
|
2048
|
-
* a re-render whenever it changes. Can be used to render a "Saving..."
|
|
2049
|
-
* indicator.
|
|
2050
|
-
*
|
|
2051
|
-
* @deprecated Prefer useSyncStatus()
|
|
2052
|
-
*/
|
|
2053
|
-
declare function useStorageStatusSuspense(options?: UseStorageStatusOptions): StorageStatusSuccess;
|
|
2054
2087
|
/**
|
|
2055
2088
|
* Returns a presigned URL for an attachment by its ID.
|
|
2056
2089
|
*
|
|
@@ -2296,13 +2329,6 @@ declare const _useThreads: TypedBundle["useThreads"];
|
|
|
2296
2329
|
* const { threads } = useThreads();
|
|
2297
2330
|
*/
|
|
2298
2331
|
declare const _useThreadsSuspense: TypedBundle["suspense"]["useThreads"];
|
|
2299
|
-
/**
|
|
2300
|
-
* @deprecated Renamed to `useRoomSubscriptionSettings`
|
|
2301
|
-
*
|
|
2302
|
-
* Returns the user's subscription settings for the current room
|
|
2303
|
-
* and a function to update them.
|
|
2304
|
-
*/
|
|
2305
|
-
declare const _useRoomNotificationSettings: TypedBundle["useRoomNotificationSettings"];
|
|
2306
2332
|
/**
|
|
2307
2333
|
* Returns the user's subscription settings for the current room
|
|
2308
2334
|
* and a function to update them.
|
|
@@ -2311,13 +2337,6 @@ declare const _useRoomNotificationSettings: TypedBundle["useRoomNotificationSett
|
|
|
2311
2337
|
* const [{ settings }, updateSettings] = useRoomSubscriptionSettings();
|
|
2312
2338
|
*/
|
|
2313
2339
|
declare const _useRoomSubscriptionSettings: TypedBundle["useRoomSubscriptionSettings"];
|
|
2314
|
-
/**
|
|
2315
|
-
* @deprecated Renamed to `useRoomSubscriptionSettings`
|
|
2316
|
-
*
|
|
2317
|
-
* Returns the user's subscription settings for the current room
|
|
2318
|
-
* and a function to update them.
|
|
2319
|
-
*/
|
|
2320
|
-
declare const _useRoomNotificationSettingsSuspense: TypedBundle["suspense"]["useRoomNotificationSettings"];
|
|
2321
2340
|
/**
|
|
2322
2341
|
* Returns the user's subscription settings for the current room
|
|
2323
2342
|
* and a function to update them.
|
|
@@ -2567,4 +2586,4 @@ declare const _useStorageRoot: TypedBundle["useStorageRoot"];
|
|
|
2567
2586
|
*/
|
|
2568
2587
|
declare const _useUpdateMyPresence: TypedBundle["useUpdateMyPresence"];
|
|
2569
2588
|
|
|
2570
|
-
export {
|
|
2589
|
+
export { useSubscribeToThread as $, createLiveblocksContext as A, useDeleteAllInboxNotifications as B, ClientContext as C, useDeleteInboxNotification as D, useErrorListener as E, useMarkAllInboxNotificationsAsRead as F, useMarkInboxNotificationAsRead as G, useSyncStatus as H, createRoomContext as I, _RoomProvider as J, _useAddReaction as K, LiveblocksProvider as L, type MutationContext as M, _useBroadcastEvent as N, useCanRedo as O, useCanUndo as P, useCreateComment as Q, type RegisterAiKnowledgeProps as R, _useCreateThread as S, useDeleteComment as T, type UseSendAiMessageOptions as U, _useDeleteThread as V, useEditComment as W, _useEditThreadMetadata as X, useMarkThreadAsResolved as Y, useMarkThreadAsUnresolved as Z, _useInboxNotificationThread as _, useAddRoomCommentReaction as a, useUnsubscribeFromThread as a0, _useEventListener as a1, useHistory as a2, _useIsInsideRoom as a3, useLostConnectionListener as a4, useMarkThreadAsRead as a5, _useMutation as a6, _useMyPresence as a7, _useOthersListener as a8, useRedo as a9, useRoomInfo as aA, useUnreadInboxNotificationsCount as aB, _useUser as aC, _useAiChat as aD, _useAiChats as aE, _useAiChatMessages as aF, _useOtherSuspense as aG, _useOthersSuspense as aH, useOthersConnectionIdsSuspense as aI, _useOthersMappedSuspense as aJ, _useSelfSuspense as aK, _useStorageSuspense as aL, _useThreadsSuspense as aM, useAttachmentUrlSuspense as aN, _useHistoryVersionsSuspense as aO, _useRoomSubscriptionSettingsSuspense as aP, useInboxNotificationsSuspense as aQ, useNotificationSettingsSuspense as aR, useRoomInfoSuspense as aS, useUnreadInboxNotificationsCountSuspense as aT, _useUserSuspense as aU, _useUserThreadsSuspense_experimental as aV, _useAiChatsSuspense as aW, _useAiChatMessagesSuspense as aX, _useAiChatSuspense as aY, useRemoveReaction as aa, _useRoom as ab, useStatus as ac, _useStorageRoot as ad, useThreadSubscription as ae, useUndo as af, _useUpdateMyPresence as ag, useUpdateRoomSubscriptionSettings as ah, useHistoryVersionData as ai, _useOther as aj, _useOthers as ak, useOthersConnectionIds as al, _useOthersMapped as am, _useSelf as an, _useStorage as ao, _useThreads as ap, useAttachmentUrl as aq, _useHistoryVersions as ar, _useRoomSubscriptionSettings as as, useInboxNotifications as at, useNotificationSettings as au, useUpdateNotificationSettings as av, useCreateAiChat as aw, useDeleteAiChat as ax, useSendAiMessage as ay, _useUserThreads_experimental as az, useCreateRoomComment as b, useCreateRoomThread as c, useCreateTextMention as d, useDeleteRoomComment as e, useDeleteRoomThread as f, getUmbrellaStoreForClient as g, useDeleteTextMention as h, useEditRoomComment as i, useEditRoomThreadMetadata as j, useMarkRoomThreadAsRead as k, useMarkRoomThreadAsResolved as l, useMarkRoomThreadAsUnresolved as m, useMentionSuggestionsCache as n, useRemoveRoomCommentReaction as o, useReportTextEditor as p, useResolveMentionSuggestions as q, useRoomAttachmentUrl as r, useRoomPermissions as s, useRoomThreadSubscription as t, useClientOrNull as u, useYjsProvider as v, type RegisterAiToolProps as w, type UseThreadsOptions as x, RoomContext as y, useClient as z };
|
package/dist/suspense.cjs
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
var _chunkWMTIZOZ3cjs = require('./chunk-WMTIZOZ3.cjs');
|
|
6
7
|
|
|
7
|
-
var _chunkCP5NPU7Ccjs = require('./chunk-CP5NPU7C.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -73,16 +73,12 @@ var _chunkCP5NPU7Ccjs = require('./chunk-CP5NPU7C.cjs');
|
|
|
73
73
|
|
|
74
74
|
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
var _chunkG2EOFP6Scjs = require('./chunk-G2EOFP6S.cjs');
|
|
76
|
+
var _chunkUR7FENGRcjs = require('./chunk-UR7FENGR.cjs');
|
|
79
77
|
|
|
80
78
|
// src/suspense.ts
|
|
81
79
|
var _core = require('@liveblocks/core');
|
|
82
80
|
var _client = require('@liveblocks/client');
|
|
83
|
-
_core.detectDupes.call(void 0,
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
_core.detectDupes.call(void 0, _chunkWMTIZOZ3cjs.PKG_NAME, _chunkWMTIZOZ3cjs.PKG_VERSION, _chunkWMTIZOZ3cjs.PKG_FORMAT);
|
|
86
82
|
|
|
87
83
|
|
|
88
84
|
|
|
@@ -155,5 +151,5 @@ _core.detectDupes.call(void 0, _chunkCP5NPU7Ccjs.PKG_NAME, _chunkCP5NPU7Ccjs.PKG
|
|
|
155
151
|
|
|
156
152
|
|
|
157
153
|
|
|
158
|
-
exports.ClientContext =
|
|
154
|
+
exports.ClientContext = _chunkUR7FENGRcjs.ClientContext; exports.ClientSideSuspense = _chunkWMTIZOZ3cjs.ClientSideSuspense; exports.LiveblocksProvider = _chunkUR7FENGRcjs.LiveblocksProvider; exports.RegisterAiKnowledge = _chunkUR7FENGRcjs.RegisterAiKnowledge; exports.RegisterAiTool = _chunkUR7FENGRcjs.RegisterAiTool; exports.RoomContext = _chunkUR7FENGRcjs.RoomContext; exports.RoomProvider = _chunkUR7FENGRcjs._RoomProvider; exports.isNotificationChannelEnabled = _client.isNotificationChannelEnabled; exports.shallow = _client.shallow; exports.useAddReaction = _chunkUR7FENGRcjs._useAddReaction; exports.useAiChat = _chunkUR7FENGRcjs._useAiChatSuspense; exports.useAiChatMessages = _chunkUR7FENGRcjs._useAiChatMessagesSuspense; exports.useAiChats = _chunkUR7FENGRcjs._useAiChatsSuspense; exports.useAttachmentUrl = _chunkUR7FENGRcjs.useAttachmentUrlSuspense; exports.useBroadcastEvent = _chunkUR7FENGRcjs._useBroadcastEvent; exports.useCanRedo = _chunkUR7FENGRcjs.useCanRedo; exports.useCanUndo = _chunkUR7FENGRcjs.useCanUndo; exports.useClient = _chunkUR7FENGRcjs.useClient; exports.useCreateAiChat = _chunkUR7FENGRcjs.useCreateAiChat; exports.useCreateComment = _chunkUR7FENGRcjs.useCreateComment; exports.useCreateThread = _chunkUR7FENGRcjs._useCreateThread; exports.useDeleteAiChat = _chunkUR7FENGRcjs.useDeleteAiChat; exports.useDeleteAllInboxNotifications = _chunkUR7FENGRcjs.useDeleteAllInboxNotifications; exports.useDeleteComment = _chunkUR7FENGRcjs.useDeleteComment; exports.useDeleteInboxNotification = _chunkUR7FENGRcjs.useDeleteInboxNotification; exports.useDeleteThread = _chunkUR7FENGRcjs._useDeleteThread; exports.useEditComment = _chunkUR7FENGRcjs.useEditComment; exports.useEditThreadMetadata = _chunkUR7FENGRcjs._useEditThreadMetadata; exports.useErrorListener = _chunkUR7FENGRcjs.useErrorListener; exports.useEventListener = _chunkUR7FENGRcjs._useEventListener; exports.useHistory = _chunkUR7FENGRcjs.useHistory; exports.useHistoryVersions = _chunkUR7FENGRcjs._useHistoryVersionsSuspense; exports.useInboxNotificationThread = _chunkUR7FENGRcjs._useInboxNotificationThread; exports.useInboxNotifications = _chunkUR7FENGRcjs.useInboxNotificationsSuspense; exports.useIsInsideRoom = _chunkUR7FENGRcjs._useIsInsideRoom; exports.useLostConnectionListener = _chunkUR7FENGRcjs.useLostConnectionListener; exports.useMarkAllInboxNotificationsAsRead = _chunkUR7FENGRcjs.useMarkAllInboxNotificationsAsRead; exports.useMarkInboxNotificationAsRead = _chunkUR7FENGRcjs.useMarkInboxNotificationAsRead; exports.useMarkThreadAsRead = _chunkUR7FENGRcjs.useMarkThreadAsRead; exports.useMarkThreadAsResolved = _chunkUR7FENGRcjs.useMarkThreadAsResolved; exports.useMarkThreadAsUnresolved = _chunkUR7FENGRcjs.useMarkThreadAsUnresolved; exports.useMutation = _chunkUR7FENGRcjs._useMutation; exports.useMyPresence = _chunkUR7FENGRcjs._useMyPresence; exports.useNotificationSettings = _chunkUR7FENGRcjs.useNotificationSettingsSuspense; exports.useOther = _chunkUR7FENGRcjs._useOtherSuspense; exports.useOthers = _chunkUR7FENGRcjs._useOthersSuspense; exports.useOthersConnectionIds = _chunkUR7FENGRcjs.useOthersConnectionIdsSuspense; exports.useOthersListener = _chunkUR7FENGRcjs._useOthersListener; exports.useOthersMapped = _chunkUR7FENGRcjs._useOthersMappedSuspense; exports.useRedo = _chunkUR7FENGRcjs.useRedo; exports.useRemoveReaction = _chunkUR7FENGRcjs.useRemoveReaction; exports.useRoom = _chunkUR7FENGRcjs._useRoom; exports.useRoomInfo = _chunkUR7FENGRcjs.useRoomInfoSuspense; exports.useRoomSubscriptionSettings = _chunkUR7FENGRcjs._useRoomSubscriptionSettingsSuspense; exports.useSelf = _chunkUR7FENGRcjs._useSelfSuspense; exports.useSendAiMessage = _chunkUR7FENGRcjs.useSendAiMessage; exports.useStatus = _chunkUR7FENGRcjs.useStatus; exports.useStorage = _chunkUR7FENGRcjs._useStorageSuspense; exports.useStorageRoot = _chunkUR7FENGRcjs._useStorageRoot; exports.useSubscribeToThread = _chunkUR7FENGRcjs.useSubscribeToThread; exports.useSyncStatus = _chunkUR7FENGRcjs.useSyncStatus; exports.useThreadSubscription = _chunkUR7FENGRcjs.useThreadSubscription; exports.useThreads = _chunkUR7FENGRcjs._useThreadsSuspense; exports.useUndo = _chunkUR7FENGRcjs.useUndo; exports.useUnreadInboxNotificationsCount = _chunkUR7FENGRcjs.useUnreadInboxNotificationsCountSuspense; exports.useUnsubscribeFromThread = _chunkUR7FENGRcjs.useUnsubscribeFromThread; exports.useUpdateMyPresence = _chunkUR7FENGRcjs._useUpdateMyPresence; exports.useUpdateNotificationSettings = _chunkUR7FENGRcjs.useUpdateNotificationSettings; exports.useUpdateRoomSubscriptionSettings = _chunkUR7FENGRcjs.useUpdateRoomSubscriptionSettings; exports.useUser = _chunkUR7FENGRcjs._useUserSuspense; exports.useUserThreads_experimental = _chunkUR7FENGRcjs._useUserThreadsSuspense_experimental;
|
|
159
155
|
//# sourceMappingURL=suspense.cjs.map
|
package/dist/suspense.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/liveblocks/liveblocks/packages/liveblocks-react/dist/suspense.cjs","../src/suspense.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/liveblocks/liveblocks/packages/liveblocks-react/dist/suspense.cjs","../src/suspense.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;AC5EA,wCAA4B;AAc5B,4CAAsD;AAXtD,+BAAA,0BAAY,EAAU,6BAAA,EAAa,4BAAU,CAAA;AD6E7C;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,opJAAC","file":"/home/runner/work/liveblocks/liveblocks/packages/liveblocks-react/dist/suspense.cjs","sourcesContent":[null,"/* eslint-disable simple-import-sort/exports */\nimport { detectDupes } from \"@liveblocks/core\";\n\nimport { PKG_FORMAT, PKG_NAME, PKG_VERSION } from \"./version\";\ndetectDupes(PKG_NAME, PKG_VERSION, PKG_FORMAT);\n\nexport { ClientSideSuspense } from \"./ClientSideSuspense\";\nexport type {\n MutationContext,\n UseSendAiMessageOptions,\n UseThreadsOptions,\n} from \"./types\";\n\n// Re-exports from @liveblocks/client, for convenience\nexport type { Json, JsonObject } from \"@liveblocks/client\";\nexport { shallow, isNotificationChannelEnabled } from \"@liveblocks/client\";\n\n// Export all the top-level hooks\nexport { ClientContext, RoomContext, useClient } from \"./contexts\";\nexport { RegisterAiKnowledge, RegisterAiTool } from \"./ai\";\nexport type { RegisterAiKnowledgeProps, RegisterAiToolProps } from \"./types/ai\";\nexport {\n LiveblocksProvider,\n useInboxNotificationThread,\n useMarkAllInboxNotificationsAsRead,\n useMarkInboxNotificationAsRead,\n useDeleteAllInboxNotifications,\n useDeleteInboxNotification,\n useUpdateNotificationSettings,\n useCreateAiChat,\n useDeleteAiChat,\n useSendAiMessage,\n useSyncStatus,\n useErrorListener,\n} from \"./liveblocks\";\nexport {\n RoomProvider,\n useAddReaction,\n useBroadcastEvent,\n useCanRedo,\n useCanUndo,\n useCreateComment,\n useCreateThread,\n useDeleteComment,\n useDeleteThread,\n useEditComment,\n useEditThreadMetadata,\n useMarkThreadAsResolved,\n useMarkThreadAsUnresolved,\n useSubscribeToThread,\n useUnsubscribeFromThread,\n useEventListener,\n useHistory,\n useIsInsideRoom,\n useLostConnectionListener,\n useMarkThreadAsRead,\n useMutation,\n useMyPresence,\n useOthersListener,\n useRedo,\n useRemoveReaction,\n useRoom,\n useStatus,\n useStorageRoot,\n useThreadSubscription,\n useUndo,\n useUpdateMyPresence,\n useUpdateRoomSubscriptionSettings,\n} from \"./room\";\n\n// Export the Suspense versions of our hooks\n// (This part differs from src/index.ts)\nexport {\n useOtherSuspense as useOther,\n useOthersSuspense as useOthers,\n useOthersConnectionIdsSuspense as useOthersConnectionIds,\n useOthersMappedSuspense as useOthersMapped,\n useSelfSuspense as useSelf,\n useStorageSuspense as useStorage,\n useThreadsSuspense as useThreads,\n useAttachmentUrlSuspense as useAttachmentUrl,\n useHistoryVersionsSuspense as useHistoryVersions,\n useRoomSubscriptionSettingsSuspense as useRoomSubscriptionSettings,\n} from \"./room\";\nexport {\n useInboxNotificationsSuspense as useInboxNotifications,\n useNotificationSettingsSuspense as useNotificationSettings,\n useRoomInfoSuspense as useRoomInfo,\n useUnreadInboxNotificationsCountSuspense as useUnreadInboxNotificationsCount,\n useUserSuspense as useUser,\n useUserThreadsSuspense_experimental as useUserThreads_experimental,\n useAiChatsSuspense as useAiChats,\n useAiChatMessagesSuspense as useAiChatMessages,\n useAiChatSuspense as useAiChat,\n} from \"./liveblocks\";\n"]}
|
package/dist/suspense.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { ClientSideSuspense, RegisterAiKnowledge,
|
|
2
|
-
export { C as ClientContext, L as LiveblocksProvider, M as MutationContext,
|
|
1
|
+
export { ClientSideSuspense, RegisterAiKnowledge, RegisterAiTool } from './index.cjs';
|
|
2
|
+
export { C as ClientContext, L as LiveblocksProvider, M as MutationContext, R as RegisterAiKnowledgeProps, w as RegisterAiToolProps, y as RoomContext, J as RoomProvider, U as UseSendAiMessageOptions, x as UseThreadsOptions, K as useAddReaction, aY as useAiChat, aX as useAiChatMessages, aW as useAiChats, aN as useAttachmentUrl, N as useBroadcastEvent, O as useCanRedo, P as useCanUndo, z as useClient, aw as useCreateAiChat, Q as useCreateComment, S as useCreateThread, ax as useDeleteAiChat, B as useDeleteAllInboxNotifications, T as useDeleteComment, D as useDeleteInboxNotification, V as useDeleteThread, W as useEditComment, X as useEditThreadMetadata, E as useErrorListener, a1 as useEventListener, a2 as useHistory, aO as useHistoryVersions, _ as useInboxNotificationThread, aQ as useInboxNotifications, a3 as useIsInsideRoom, a4 as useLostConnectionListener, F as useMarkAllInboxNotificationsAsRead, G as useMarkInboxNotificationAsRead, a5 as useMarkThreadAsRead, Y as useMarkThreadAsResolved, Z as useMarkThreadAsUnresolved, a6 as useMutation, a7 as useMyPresence, aR as useNotificationSettings, aG as useOther, aH as useOthers, aI as useOthersConnectionIds, a8 as useOthersListener, aJ as useOthersMapped, a9 as useRedo, aa as useRemoveReaction, ab as useRoom, aS as useRoomInfo, aP as useRoomSubscriptionSettings, aK as useSelf, ay as useSendAiMessage, ac as useStatus, aL as useStorage, ad as useStorageRoot, $ as useSubscribeToThread, H as useSyncStatus, ae as useThreadSubscription, aM as useThreads, af as useUndo, aT as useUnreadInboxNotificationsCount, a0 as useUnsubscribeFromThread, ag as useUpdateMyPresence, av as useUpdateNotificationSettings, ah as useUpdateRoomSubscriptionSettings, aU as useUser, aV as useUserThreads_experimental } from './room-Du6_Cy1X.cjs';
|
|
3
3
|
export { Json, JsonObject, isNotificationChannelEnabled, shallow } from '@liveblocks/client';
|
|
4
4
|
import 'react/jsx-runtime';
|
|
5
5
|
import 'react';
|
package/dist/suspense.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { ClientSideSuspense, RegisterAiKnowledge,
|
|
2
|
-
export { C as ClientContext, L as LiveblocksProvider, M as MutationContext,
|
|
1
|
+
export { ClientSideSuspense, RegisterAiKnowledge, RegisterAiTool } from './index.js';
|
|
2
|
+
export { C as ClientContext, L as LiveblocksProvider, M as MutationContext, R as RegisterAiKnowledgeProps, w as RegisterAiToolProps, y as RoomContext, J as RoomProvider, U as UseSendAiMessageOptions, x as UseThreadsOptions, K as useAddReaction, aY as useAiChat, aX as useAiChatMessages, aW as useAiChats, aN as useAttachmentUrl, N as useBroadcastEvent, O as useCanRedo, P as useCanUndo, z as useClient, aw as useCreateAiChat, Q as useCreateComment, S as useCreateThread, ax as useDeleteAiChat, B as useDeleteAllInboxNotifications, T as useDeleteComment, D as useDeleteInboxNotification, V as useDeleteThread, W as useEditComment, X as useEditThreadMetadata, E as useErrorListener, a1 as useEventListener, a2 as useHistory, aO as useHistoryVersions, _ as useInboxNotificationThread, aQ as useInboxNotifications, a3 as useIsInsideRoom, a4 as useLostConnectionListener, F as useMarkAllInboxNotificationsAsRead, G as useMarkInboxNotificationAsRead, a5 as useMarkThreadAsRead, Y as useMarkThreadAsResolved, Z as useMarkThreadAsUnresolved, a6 as useMutation, a7 as useMyPresence, aR as useNotificationSettings, aG as useOther, aH as useOthers, aI as useOthersConnectionIds, a8 as useOthersListener, aJ as useOthersMapped, a9 as useRedo, aa as useRemoveReaction, ab as useRoom, aS as useRoomInfo, aP as useRoomSubscriptionSettings, aK as useSelf, ay as useSendAiMessage, ac as useStatus, aL as useStorage, ad as useStorageRoot, $ as useSubscribeToThread, H as useSyncStatus, ae as useThreadSubscription, aM as useThreads, af as useUndo, aT as useUnreadInboxNotificationsCount, a0 as useUnsubscribeFromThread, ag as useUpdateMyPresence, av as useUpdateNotificationSettings, ah as useUpdateRoomSubscriptionSettings, aU as useUser, aV as useUserThreads_experimental } from './room-Du6_Cy1X.js';
|
|
3
3
|
export { Json, JsonObject, isNotificationChannelEnabled, shallow } from '@liveblocks/client';
|
|
4
4
|
import 'react/jsx-runtime';
|
|
5
5
|
import 'react';
|
package/dist/suspense.js
CHANGED
|
@@ -2,12 +2,13 @@ import {
|
|
|
2
2
|
ClientSideSuspense,
|
|
3
3
|
PKG_FORMAT,
|
|
4
4
|
PKG_NAME,
|
|
5
|
-
PKG_VERSION
|
|
6
|
-
|
|
7
|
-
} from "./chunk-EAKXSMWI.js";
|
|
5
|
+
PKG_VERSION
|
|
6
|
+
} from "./chunk-XVEMIR32.js";
|
|
8
7
|
import {
|
|
9
8
|
ClientContext,
|
|
10
9
|
LiveblocksProvider,
|
|
10
|
+
RegisterAiKnowledge,
|
|
11
|
+
RegisterAiTool,
|
|
11
12
|
RoomContext,
|
|
12
13
|
_RoomProvider,
|
|
13
14
|
_useAddReaction,
|
|
@@ -29,7 +30,6 @@ import {
|
|
|
29
30
|
_useOthersMappedSuspense,
|
|
30
31
|
_useOthersSuspense,
|
|
31
32
|
_useRoom,
|
|
32
|
-
_useRoomNotificationSettingsSuspense,
|
|
33
33
|
_useRoomSubscriptionSettingsSuspense,
|
|
34
34
|
_useSelfSuspense,
|
|
35
35
|
_useStorageRoot,
|
|
@@ -39,7 +39,6 @@ import {
|
|
|
39
39
|
_useUserSuspense,
|
|
40
40
|
_useUserThreadsSuspense_experimental,
|
|
41
41
|
useAttachmentUrlSuspense,
|
|
42
|
-
useBatch,
|
|
43
42
|
useCanRedo,
|
|
44
43
|
useCanUndo,
|
|
45
44
|
useClient,
|
|
@@ -64,8 +63,8 @@ import {
|
|
|
64
63
|
useRedo,
|
|
65
64
|
useRemoveReaction,
|
|
66
65
|
useRoomInfoSuspense,
|
|
66
|
+
useSendAiMessage,
|
|
67
67
|
useStatus,
|
|
68
|
-
useStorageStatusSuspense,
|
|
69
68
|
useSubscribeToThread,
|
|
70
69
|
useSyncStatus,
|
|
71
70
|
useThreadSubscription,
|
|
@@ -73,9 +72,8 @@ import {
|
|
|
73
72
|
useUnreadInboxNotificationsCountSuspense,
|
|
74
73
|
useUnsubscribeFromThread,
|
|
75
74
|
useUpdateNotificationSettings,
|
|
76
|
-
useUpdateRoomNotificationSettings,
|
|
77
75
|
useUpdateRoomSubscriptionSettings
|
|
78
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-CS6KYNXH.js";
|
|
79
77
|
|
|
80
78
|
// src/suspense.ts
|
|
81
79
|
import { detectDupes } from "@liveblocks/core";
|
|
@@ -86,6 +84,7 @@ export {
|
|
|
86
84
|
ClientSideSuspense,
|
|
87
85
|
LiveblocksProvider,
|
|
88
86
|
RegisterAiKnowledge,
|
|
87
|
+
RegisterAiTool,
|
|
89
88
|
RoomContext,
|
|
90
89
|
_RoomProvider as RoomProvider,
|
|
91
90
|
isNotificationChannelEnabled,
|
|
@@ -95,7 +94,6 @@ export {
|
|
|
95
94
|
_useAiChatMessagesSuspense as useAiChatMessages,
|
|
96
95
|
_useAiChatsSuspense as useAiChats,
|
|
97
96
|
useAttachmentUrlSuspense as useAttachmentUrl,
|
|
98
|
-
useBatch,
|
|
99
97
|
_useBroadcastEvent as useBroadcastEvent,
|
|
100
98
|
useCanRedo,
|
|
101
99
|
useCanUndo,
|
|
@@ -135,13 +133,12 @@ export {
|
|
|
135
133
|
useRemoveReaction,
|
|
136
134
|
_useRoom as useRoom,
|
|
137
135
|
useRoomInfoSuspense as useRoomInfo,
|
|
138
|
-
_useRoomNotificationSettingsSuspense as useRoomNotificationSettings,
|
|
139
136
|
_useRoomSubscriptionSettingsSuspense as useRoomSubscriptionSettings,
|
|
140
137
|
_useSelfSuspense as useSelf,
|
|
138
|
+
useSendAiMessage,
|
|
141
139
|
useStatus,
|
|
142
140
|
_useStorageSuspense as useStorage,
|
|
143
141
|
_useStorageRoot as useStorageRoot,
|
|
144
|
-
useStorageStatusSuspense as useStorageStatus,
|
|
145
142
|
useSubscribeToThread,
|
|
146
143
|
useSyncStatus,
|
|
147
144
|
useThreadSubscription,
|
|
@@ -151,7 +148,6 @@ export {
|
|
|
151
148
|
useUnsubscribeFromThread,
|
|
152
149
|
_useUpdateMyPresence as useUpdateMyPresence,
|
|
153
150
|
useUpdateNotificationSettings,
|
|
154
|
-
useUpdateRoomNotificationSettings,
|
|
155
151
|
useUpdateRoomSubscriptionSettings,
|
|
156
152
|
_useUserSuspense as useUser,
|
|
157
153
|
_useUserThreadsSuspense_experimental as useUserThreads_experimental
|