@liveblocks/react 2.25.0-aiprivatebeta9 → 3.1.0-alpha1
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-RB4LUCGL.cjs → chunk-KDGCCWHH.cjs} +137 -174
- package/dist/chunk-KDGCCWHH.cjs.map +1 -0
- package/dist/chunk-M4WXNR3Z.js +23 -0
- package/dist/chunk-M4WXNR3Z.js.map +1 -0
- package/dist/{chunk-TMKZ6U2Y.js → chunk-MXMOBMOL.js} +237 -274
- package/dist/chunk-MXMOBMOL.js.map +1 -0
- package/dist/chunk-W3ZEHJ7E.cjs +23 -0
- package/dist/chunk-W3ZEHJ7E.cjs.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-DRYXmQT5.d.cts} +150 -124
- package/dist/{room-BSt58hY4.d.ts → room-DRYXmQT5.d.ts} +150 -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-M6D2NTTI.cjs +0 -60
- package/dist/chunk-M6D2NTTI.cjs.map +0 -1
- package/dist/chunk-RB4LUCGL.cjs.map +0 -1
- package/dist/chunk-TMKZ6U2Y.js.map +0 -1
- package/dist/chunk-Z2N4O6IQ.js +0 -60
- package/dist/chunk-Z2N4O6IQ.js.map +0 -1
|
@@ -1,10 +1,60 @@
|
|
|
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
|
+
* Whether this tool should be enabled. When set to `false`, the tool will
|
|
50
|
+
* not be made available to the AI copilot for any new/future chat messages,
|
|
51
|
+
* but will still allow existing tool invocations to be rendered that are
|
|
52
|
+
* part of the historic chat record. Defaults to true.
|
|
53
|
+
*/
|
|
54
|
+
enabled?: boolean;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
type UiChatMessage = WithNavigation<AiChatMessage>;
|
|
8
58
|
type UseSyncStatusOptions = {
|
|
9
59
|
/**
|
|
10
60
|
* When setting smooth, the hook will not update immediately as status
|
|
@@ -14,8 +64,16 @@ type UseSyncStatusOptions = {
|
|
|
14
64
|
*/
|
|
15
65
|
smooth?: boolean;
|
|
16
66
|
};
|
|
17
|
-
type
|
|
18
|
-
|
|
67
|
+
type UseSendAiMessageOptions = {
|
|
68
|
+
/**
|
|
69
|
+
* The id of the copilot to use to send the message.
|
|
70
|
+
*/
|
|
71
|
+
copilotId?: string;
|
|
72
|
+
/** Stream the response as it is being generated. Defaults to true. */
|
|
73
|
+
stream?: boolean;
|
|
74
|
+
/** The maximum timeout for the answer to be generated. */
|
|
75
|
+
timeout?: number;
|
|
76
|
+
};
|
|
19
77
|
type ThreadsQuery<M extends BaseMetadata> = {
|
|
20
78
|
/**
|
|
21
79
|
* Whether to only return threads marked as resolved or unresolved. If not provided,
|
|
@@ -172,7 +230,7 @@ type SharedContextBundle<U extends BaseUserMeta> = {
|
|
|
172
230
|
/**
|
|
173
231
|
* Obtains a reference to the current Liveblocks client.
|
|
174
232
|
*/
|
|
175
|
-
useClient(): Client<U>;
|
|
233
|
+
useClient(): Client$1<U>;
|
|
176
234
|
/**
|
|
177
235
|
* Returns user info from a given user ID.
|
|
178
236
|
*
|
|
@@ -216,12 +274,32 @@ type SharedContextBundle<U extends BaseUserMeta> = {
|
|
|
216
274
|
* const syncStatus = useSyncStatus({ smooth: true });
|
|
217
275
|
*/
|
|
218
276
|
useSyncStatus(options?: UseSyncStatusOptions): SyncStatus;
|
|
277
|
+
/**
|
|
278
|
+
* Make knowledge about your application state available to any AI used in
|
|
279
|
+
* a chat or a one-off request.
|
|
280
|
+
*
|
|
281
|
+
* For example:
|
|
282
|
+
*
|
|
283
|
+
* <RegisterAiKnowledge
|
|
284
|
+
* description="The current mode of my application"
|
|
285
|
+
* value="dark" />
|
|
286
|
+
*
|
|
287
|
+
* <RegisterAiKnowledge
|
|
288
|
+
* description="The current list of todos"
|
|
289
|
+
* value={todos} />
|
|
290
|
+
*
|
|
291
|
+
* By mounting this component, the AI will get access to this knwoledge.
|
|
292
|
+
* By unmounting this component, the AI will no longer have access to it.
|
|
293
|
+
* It can choose to use or ignore this knowledge in its responses.
|
|
294
|
+
*/
|
|
295
|
+
RegisterAiKnowledge: ComponentType<RegisterAiKnowledgeProps>;
|
|
296
|
+
RegisterAiTool: ComponentType<RegisterAiToolProps>;
|
|
219
297
|
};
|
|
220
298
|
suspense: {
|
|
221
299
|
/**
|
|
222
300
|
* Obtains a reference to the current Liveblocks client.
|
|
223
301
|
*/
|
|
224
|
-
useClient(): Client<U>;
|
|
302
|
+
useClient(): Client$1<U>;
|
|
225
303
|
/**
|
|
226
304
|
* Returns user info from a given user ID.
|
|
227
305
|
*
|
|
@@ -265,6 +343,26 @@ type SharedContextBundle<U extends BaseUserMeta> = {
|
|
|
265
343
|
* const syncStatus = useSyncStatus({ smooth: true });
|
|
266
344
|
*/
|
|
267
345
|
useSyncStatus(options?: UseSyncStatusOptions): SyncStatus;
|
|
346
|
+
/**
|
|
347
|
+
* Make knowledge about your application state available to any AI used in
|
|
348
|
+
* a chat or a one-off request.
|
|
349
|
+
*
|
|
350
|
+
* For example:
|
|
351
|
+
*
|
|
352
|
+
* <RegisterAiKnowledge
|
|
353
|
+
* description="The current mode of my application"
|
|
354
|
+
* value="dark" />
|
|
355
|
+
*
|
|
356
|
+
* <RegisterAiKnowledge
|
|
357
|
+
* description="The current list of todos"
|
|
358
|
+
* value={todos} />
|
|
359
|
+
*
|
|
360
|
+
* By mounting this component, the AI will get access to this knwoledge.
|
|
361
|
+
* By unmounting this component, the AI will no longer have access to it.
|
|
362
|
+
* It can choose to use or ignore this knowledge in its responses.
|
|
363
|
+
*/
|
|
364
|
+
RegisterAiKnowledge: ComponentType<RegisterAiKnowledgeProps>;
|
|
365
|
+
RegisterAiTool: ComponentType<RegisterAiToolProps>;
|
|
268
366
|
};
|
|
269
367
|
};
|
|
270
368
|
/**
|
|
@@ -298,16 +396,6 @@ type RoomContextBundleCommon<P extends JsonObject, S extends LsonObject, U exten
|
|
|
298
396
|
* a re-render whenever it changes. Can be used to render a status badge.
|
|
299
397
|
*/
|
|
300
398
|
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
399
|
/**
|
|
312
400
|
* Returns a callback that lets you broadcast custom events to other users in the room
|
|
313
401
|
*
|
|
@@ -665,13 +753,6 @@ type RoomContextBundleCommon<P extends JsonObject, S extends LsonObject, U exten
|
|
|
665
753
|
* removeReaction({ threadId: "th_xxx", commentId: "cm_xxx", emoji: "👍" })
|
|
666
754
|
*/
|
|
667
755
|
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
756
|
/**
|
|
676
757
|
* Returns a function that updates the user's subscription settings
|
|
677
758
|
* for the current room.
|
|
@@ -699,14 +780,6 @@ type RoomContextBundleCommon<P extends JsonObject, S extends LsonObject, U exten
|
|
|
699
780
|
useThreadSubscription(threadId: string): ThreadSubscription;
|
|
700
781
|
};
|
|
701
782
|
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
783
|
/**
|
|
711
784
|
* Extract arbitrary data from the Liveblocks Storage state, using an
|
|
712
785
|
* arbitrary selector function.
|
|
@@ -768,16 +841,6 @@ type RoomContextBundle<P extends JsonObject, S extends LsonObject, U extends Bas
|
|
|
768
841
|
* const { threads, error, isLoading } = useThreads();
|
|
769
842
|
*/
|
|
770
843
|
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
844
|
/**
|
|
782
845
|
* Returns the user's subscription settings for the current room
|
|
783
846
|
* and a function to update them.
|
|
@@ -811,14 +874,6 @@ type RoomContextBundle<P extends JsonObject, S extends LsonObject, U extends Bas
|
|
|
811
874
|
*/
|
|
812
875
|
useHistoryVersionData(id: string): HistoryVersionDataAsyncResult;
|
|
813
876
|
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
877
|
/**
|
|
823
878
|
* Extract arbitrary data from the Liveblocks Storage state, using an
|
|
824
879
|
* arbitrary selector function.
|
|
@@ -881,16 +936,6 @@ type RoomContextBundle<P extends JsonObject, S extends LsonObject, U extends Bas
|
|
|
881
936
|
* const { versions } = useHistoryVersions();
|
|
882
937
|
*/
|
|
883
938
|
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
939
|
/**
|
|
895
940
|
* Returns the user's subscription settings for the current room
|
|
896
941
|
* and a function to update them.
|
|
@@ -1020,6 +1065,14 @@ type LiveblocksContextBundleCommon<M extends BaseMetadata> = {
|
|
|
1020
1065
|
* deleteAiChat("ai-chat-id");
|
|
1021
1066
|
*/
|
|
1022
1067
|
useDeleteAiChat(): (chatId: string) => void;
|
|
1068
|
+
/**
|
|
1069
|
+
* Returns a function to send a message in an AI chat.
|
|
1070
|
+
*
|
|
1071
|
+
* @example
|
|
1072
|
+
* const sendMessage = useSendAiMessage(chatId);
|
|
1073
|
+
* sendMessage("Hello, Liveblocks AI!");
|
|
1074
|
+
*/
|
|
1075
|
+
useSendAiMessage(chatId: string, options?: UseSendAiMessageOptions): (message: string) => void;
|
|
1023
1076
|
};
|
|
1024
1077
|
type LiveblocksContextBundle<U extends BaseUserMeta, M extends BaseMetadata> = Resolve<LiveblocksContextBundleCommon<M> & SharedContextBundle<U>["classic"] & {
|
|
1025
1078
|
/**
|
|
@@ -1407,7 +1460,7 @@ declare function createStore_forNotificationSettings(updates: ISignal<readonly O
|
|
|
1407
1460
|
signal: DerivedSignal<NotificationSettings>;
|
|
1408
1461
|
update: (settings: NotificationSettings) => void;
|
|
1409
1462
|
};
|
|
1410
|
-
declare function createStore_forOptimistic<M extends BaseMetadata>(client: Client<BaseUserMeta$1, M>): {
|
|
1463
|
+
declare function createStore_forOptimistic<M extends BaseMetadata>(client: Client$1<BaseUserMeta$1, M>): {
|
|
1411
1464
|
signal: ISignal<readonly OptimisticUpdate<M>[]>;
|
|
1412
1465
|
add: (optimisticUpdate: DistributiveOmit<OptimisticUpdate<M>, "id">) => string;
|
|
1413
1466
|
remove: (optimisticId: string) => void;
|
|
@@ -1514,33 +1567,43 @@ declare class UmbrellaStore<M extends BaseMetadata> {
|
|
|
1514
1567
|
updateNotificationSettings_confirmOptimisticUpdate(settings: NotificationSettings, optimisticUpdateId: string): void;
|
|
1515
1568
|
}
|
|
1516
1569
|
|
|
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
1570
|
/**
|
|
1525
1571
|
* Gets or creates a unique Umbrella store for each unique client instance.
|
|
1526
1572
|
*
|
|
1527
1573
|
* @private
|
|
1528
1574
|
*/
|
|
1529
1575
|
declare function getUmbrellaStoreForClient<M extends BaseMetadata$1>(client: OpaqueClient): UmbrellaStore<M>;
|
|
1576
|
+
/**
|
|
1577
|
+
* Returns a function that creates an AI chat.
|
|
1578
|
+
*
|
|
1579
|
+
* If you do not pass a title for the chat, it will be automatically computed
|
|
1580
|
+
* after the first AI response.
|
|
1581
|
+
*
|
|
1582
|
+
* @example
|
|
1583
|
+
* const createAiChat = useCreateAiChat();
|
|
1584
|
+
* createAiChat({ id: "ai-chat-id", title: "My AI chat" });
|
|
1585
|
+
*/
|
|
1530
1586
|
declare function useCreateAiChat(): (options: {
|
|
1531
1587
|
id: string;
|
|
1532
1588
|
title?: string;
|
|
1533
1589
|
metadata?: Record<string, string | string[]>;
|
|
1534
1590
|
}) => void;
|
|
1535
|
-
declare function useDeleteAiChat(): (chatId: string) => void;
|
|
1536
1591
|
/**
|
|
1537
|
-
*
|
|
1592
|
+
* Returns a function that deletes the AI chat with the specified id.
|
|
1593
|
+
*
|
|
1594
|
+
* @example
|
|
1595
|
+
* const deleteAiChat = useDeleteAiChat();
|
|
1596
|
+
* deleteAiChat("ai-chat-id");
|
|
1538
1597
|
*/
|
|
1539
|
-
declare function
|
|
1598
|
+
declare function useDeleteAiChat(): (chatId: string) => void;
|
|
1540
1599
|
/**
|
|
1541
|
-
*
|
|
1600
|
+
* Returns a function to send a message in an AI chat.
|
|
1601
|
+
*
|
|
1602
|
+
* @example
|
|
1603
|
+
* const sendMessage = useSendAiMessage(chatId);
|
|
1604
|
+
* sendMessage("Hello, Liveblocks AI!");
|
|
1542
1605
|
*/
|
|
1543
|
-
declare function
|
|
1606
|
+
declare function useSendAiMessage(chatId: string, options?: UseSendAiMessageOptions): (message: string) => void;
|
|
1544
1607
|
/**
|
|
1545
1608
|
* Sets up a client for connecting to Liveblocks, and is the recommended way to do
|
|
1546
1609
|
* this for React apps. You must define either `authEndpoint` or `publicApiKey`.
|
|
@@ -1745,6 +1808,13 @@ declare const _useAiChats: TypedBundle$1["useAiChats"];
|
|
|
1745
1808
|
* const { chats, error, isLoading } = useAiChats();
|
|
1746
1809
|
*/
|
|
1747
1810
|
declare const _useAiChatsSuspense: TypedBundle$1["suspense"]["useAiChats"];
|
|
1811
|
+
/**
|
|
1812
|
+
* (Private beta) Returns the information of the given chat.
|
|
1813
|
+
*
|
|
1814
|
+
* @example
|
|
1815
|
+
* const { chat, error, isLoading } = useAiChat("my-chat");
|
|
1816
|
+
*/
|
|
1817
|
+
declare const _useAiChat: TypedBundle$1["useAiChat"];
|
|
1748
1818
|
/**
|
|
1749
1819
|
* (Private beta) Returns the information of the given chat.
|
|
1750
1820
|
*
|
|
@@ -1803,27 +1873,12 @@ declare function useCreateTextMention(): (userId: string, mentionId: string) =>
|
|
|
1803
1873
|
/** @private - Internal API, do not rely on it. */
|
|
1804
1874
|
declare function useDeleteTextMention(): (mentionId: string) => void;
|
|
1805
1875
|
/** @private - Internal API, do not rely on it. */
|
|
1806
|
-
declare function useResolveMentionSuggestions(): ((args: _liveblocks_core.ResolveMentionSuggestionsArgs) => _liveblocks_core.Awaitable<string[]>) | undefined;
|
|
1876
|
+
declare function useResolveMentionSuggestions(): ((args: _liveblocks_core.ResolveMentionSuggestionsArgs) => _liveblocks_core.Awaitable<string[] | _liveblocks_core.MentionData[]>) | undefined;
|
|
1807
1877
|
/** @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;
|
|
1878
|
+
declare function useMentionSuggestionsCache(): Map<string, {
|
|
1879
|
+
kind: "user";
|
|
1880
|
+
id: string;
|
|
1881
|
+
}[]>;
|
|
1827
1882
|
/**
|
|
1828
1883
|
* Get informed when reconnecting to the Liveblocks servers is taking
|
|
1829
1884
|
* longer than usual. This typically is a sign of a client that has lost
|
|
@@ -2012,13 +2067,6 @@ declare function useRoomThreadSubscription(roomId: string, threadId: string): Th
|
|
|
2012
2067
|
* const {data} = useHistoryVersionData(versionId);
|
|
2013
2068
|
*/
|
|
2014
2069
|
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
2070
|
/**
|
|
2023
2071
|
* Returns a function that updates the user's subscription settings
|
|
2024
2072
|
* for the current room.
|
|
@@ -2043,14 +2091,6 @@ declare function useUpdateRoomSubscriptionSettings(): (settings: Partial<RoomSub
|
|
|
2043
2091
|
* // [2, 4, 7]
|
|
2044
2092
|
*/
|
|
2045
2093
|
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
2094
|
/**
|
|
2055
2095
|
* Returns a presigned URL for an attachment by its ID.
|
|
2056
2096
|
*
|
|
@@ -2296,13 +2336,6 @@ declare const _useThreads: TypedBundle["useThreads"];
|
|
|
2296
2336
|
* const { threads } = useThreads();
|
|
2297
2337
|
*/
|
|
2298
2338
|
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
2339
|
/**
|
|
2307
2340
|
* Returns the user's subscription settings for the current room
|
|
2308
2341
|
* and a function to update them.
|
|
@@ -2311,13 +2344,6 @@ declare const _useRoomNotificationSettings: TypedBundle["useRoomNotificationSett
|
|
|
2311
2344
|
* const [{ settings }, updateSettings] = useRoomSubscriptionSettings();
|
|
2312
2345
|
*/
|
|
2313
2346
|
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
2347
|
/**
|
|
2322
2348
|
* Returns the user's subscription settings for the current room
|
|
2323
2349
|
* and a function to update them.
|
|
@@ -2567,4 +2593,4 @@ declare const _useStorageRoot: TypedBundle["useStorageRoot"];
|
|
|
2567
2593
|
*/
|
|
2568
2594
|
declare const _useUpdateMyPresence: TypedBundle["useUpdateMyPresence"];
|
|
2569
2595
|
|
|
2570
|
-
export {
|
|
2596
|
+
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 _chunkW3ZEHJ7Ecjs = require('./chunk-W3ZEHJ7E.cjs');
|
|
6
7
|
|
|
7
|
-
var _chunkM6D2NTTIcjs = require('./chunk-M6D2NTTI.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -73,16 +73,12 @@ var _chunkM6D2NTTIcjs = require('./chunk-M6D2NTTI.cjs');
|
|
|
73
73
|
|
|
74
74
|
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
var _chunkRB4LUCGLcjs = require('./chunk-RB4LUCGL.cjs');
|
|
76
|
+
var _chunkKDGCCWHHcjs = require('./chunk-KDGCCWHH.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, _chunkW3ZEHJ7Ecjs.PKG_NAME, _chunkW3ZEHJ7Ecjs.PKG_VERSION, _chunkW3ZEHJ7Ecjs.PKG_FORMAT);
|
|
86
82
|
|
|
87
83
|
|
|
88
84
|
|
|
@@ -155,5 +151,5 @@ _core.detectDupes.call(void 0, _chunkM6D2NTTIcjs.PKG_NAME, _chunkM6D2NTTIcjs.PKG
|
|
|
155
151
|
|
|
156
152
|
|
|
157
153
|
|
|
158
|
-
exports.ClientContext =
|
|
154
|
+
exports.ClientContext = _chunkKDGCCWHHcjs.ClientContext; exports.ClientSideSuspense = _chunkW3ZEHJ7Ecjs.ClientSideSuspense; exports.LiveblocksProvider = _chunkKDGCCWHHcjs.LiveblocksProvider; exports.RegisterAiKnowledge = _chunkKDGCCWHHcjs.RegisterAiKnowledge; exports.RegisterAiTool = _chunkKDGCCWHHcjs.RegisterAiTool; exports.RoomContext = _chunkKDGCCWHHcjs.RoomContext; exports.RoomProvider = _chunkKDGCCWHHcjs._RoomProvider; exports.isNotificationChannelEnabled = _client.isNotificationChannelEnabled; exports.shallow = _client.shallow; exports.useAddReaction = _chunkKDGCCWHHcjs._useAddReaction; exports.useAiChat = _chunkKDGCCWHHcjs._useAiChatSuspense; exports.useAiChatMessages = _chunkKDGCCWHHcjs._useAiChatMessagesSuspense; exports.useAiChats = _chunkKDGCCWHHcjs._useAiChatsSuspense; exports.useAttachmentUrl = _chunkKDGCCWHHcjs.useAttachmentUrlSuspense; exports.useBroadcastEvent = _chunkKDGCCWHHcjs._useBroadcastEvent; exports.useCanRedo = _chunkKDGCCWHHcjs.useCanRedo; exports.useCanUndo = _chunkKDGCCWHHcjs.useCanUndo; exports.useClient = _chunkKDGCCWHHcjs.useClient; exports.useCreateAiChat = _chunkKDGCCWHHcjs.useCreateAiChat; exports.useCreateComment = _chunkKDGCCWHHcjs.useCreateComment; exports.useCreateThread = _chunkKDGCCWHHcjs._useCreateThread; exports.useDeleteAiChat = _chunkKDGCCWHHcjs.useDeleteAiChat; exports.useDeleteAllInboxNotifications = _chunkKDGCCWHHcjs.useDeleteAllInboxNotifications; exports.useDeleteComment = _chunkKDGCCWHHcjs.useDeleteComment; exports.useDeleteInboxNotification = _chunkKDGCCWHHcjs.useDeleteInboxNotification; exports.useDeleteThread = _chunkKDGCCWHHcjs._useDeleteThread; exports.useEditComment = _chunkKDGCCWHHcjs.useEditComment; exports.useEditThreadMetadata = _chunkKDGCCWHHcjs._useEditThreadMetadata; exports.useErrorListener = _chunkKDGCCWHHcjs.useErrorListener; exports.useEventListener = _chunkKDGCCWHHcjs._useEventListener; exports.useHistory = _chunkKDGCCWHHcjs.useHistory; exports.useHistoryVersions = _chunkKDGCCWHHcjs._useHistoryVersionsSuspense; exports.useInboxNotificationThread = _chunkKDGCCWHHcjs._useInboxNotificationThread; exports.useInboxNotifications = _chunkKDGCCWHHcjs.useInboxNotificationsSuspense; exports.useIsInsideRoom = _chunkKDGCCWHHcjs._useIsInsideRoom; exports.useLostConnectionListener = _chunkKDGCCWHHcjs.useLostConnectionListener; exports.useMarkAllInboxNotificationsAsRead = _chunkKDGCCWHHcjs.useMarkAllInboxNotificationsAsRead; exports.useMarkInboxNotificationAsRead = _chunkKDGCCWHHcjs.useMarkInboxNotificationAsRead; exports.useMarkThreadAsRead = _chunkKDGCCWHHcjs.useMarkThreadAsRead; exports.useMarkThreadAsResolved = _chunkKDGCCWHHcjs.useMarkThreadAsResolved; exports.useMarkThreadAsUnresolved = _chunkKDGCCWHHcjs.useMarkThreadAsUnresolved; exports.useMutation = _chunkKDGCCWHHcjs._useMutation; exports.useMyPresence = _chunkKDGCCWHHcjs._useMyPresence; exports.useNotificationSettings = _chunkKDGCCWHHcjs.useNotificationSettingsSuspense; exports.useOther = _chunkKDGCCWHHcjs._useOtherSuspense; exports.useOthers = _chunkKDGCCWHHcjs._useOthersSuspense; exports.useOthersConnectionIds = _chunkKDGCCWHHcjs.useOthersConnectionIdsSuspense; exports.useOthersListener = _chunkKDGCCWHHcjs._useOthersListener; exports.useOthersMapped = _chunkKDGCCWHHcjs._useOthersMappedSuspense; exports.useRedo = _chunkKDGCCWHHcjs.useRedo; exports.useRemoveReaction = _chunkKDGCCWHHcjs.useRemoveReaction; exports.useRoom = _chunkKDGCCWHHcjs._useRoom; exports.useRoomInfo = _chunkKDGCCWHHcjs.useRoomInfoSuspense; exports.useRoomSubscriptionSettings = _chunkKDGCCWHHcjs._useRoomSubscriptionSettingsSuspense; exports.useSelf = _chunkKDGCCWHHcjs._useSelfSuspense; exports.useSendAiMessage = _chunkKDGCCWHHcjs.useSendAiMessage; exports.useStatus = _chunkKDGCCWHHcjs.useStatus; exports.useStorage = _chunkKDGCCWHHcjs._useStorageSuspense; exports.useStorageRoot = _chunkKDGCCWHHcjs._useStorageRoot; exports.useSubscribeToThread = _chunkKDGCCWHHcjs.useSubscribeToThread; exports.useSyncStatus = _chunkKDGCCWHHcjs.useSyncStatus; exports.useThreadSubscription = _chunkKDGCCWHHcjs.useThreadSubscription; exports.useThreads = _chunkKDGCCWHHcjs._useThreadsSuspense; exports.useUndo = _chunkKDGCCWHHcjs.useUndo; exports.useUnreadInboxNotificationsCount = _chunkKDGCCWHHcjs.useUnreadInboxNotificationsCountSuspense; exports.useUnsubscribeFromThread = _chunkKDGCCWHHcjs.useUnsubscribeFromThread; exports.useUpdateMyPresence = _chunkKDGCCWHHcjs._useUpdateMyPresence; exports.useUpdateNotificationSettings = _chunkKDGCCWHHcjs.useUpdateNotificationSettings; exports.useUpdateRoomSubscriptionSettings = _chunkKDGCCWHHcjs.useUpdateRoomSubscriptionSettings; exports.useUser = _chunkKDGCCWHHcjs._useUserSuspense; exports.useUserThreads_experimental = _chunkKDGCCWHHcjs._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-DRYXmQT5.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-DRYXmQT5.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-Z2N4O6IQ.js";
|
|
5
|
+
PKG_VERSION
|
|
6
|
+
} from "./chunk-M4WXNR3Z.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-MXMOBMOL.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
|