@liveblocks/react 2.25.0-aiprivatebeta1 → 2.25.0-aiprivatebeta11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_private.cjs +5 -5
- package/dist/_private.cjs.map +1 -1
- package/dist/_private.d.cts +2 -2
- package/dist/_private.d.ts +2 -2
- package/dist/_private.js +1 -1
- package/dist/_private.js.map +1 -1
- package/dist/{chunk-GSA4MPRG.cjs → chunk-A4EPET3Z.cjs} +2 -2
- package/dist/{chunk-GSA4MPRG.cjs.map → chunk-A4EPET3Z.cjs.map} +1 -1
- package/dist/{chunk-ZGVKI7OM.cjs → chunk-CTSFL4KT.cjs} +193 -49
- package/dist/chunk-CTSFL4KT.cjs.map +1 -0
- package/dist/{chunk-EDEUY3EM.js → chunk-OWSOT5S6.js} +2 -2
- package/dist/{chunk-E6PCFJWE.js → chunk-X7TWWGKZ.js} +287 -143
- package/dist/chunk-X7TWWGKZ.js.map +1 -0
- package/dist/index.cjs +12 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -12
- package/dist/index.d.ts +3 -12
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/dist/{room-DmsjrDvP.d.cts → room-BdfI6Vy7.d.cts} +215 -24
- package/dist/{room-DmsjrDvP.d.ts → room-BdfI6Vy7.d.ts} +215 -24
- package/dist/suspense.cjs +12 -4
- 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 +10 -2
- package/dist/suspense.js.map +1 -1
- package/package.json +13 -3
- package/dist/chunk-E6PCFJWE.js.map +0 -1
- package/dist/chunk-ZGVKI7OM.cjs.map +0 -1
- /package/dist/{chunk-EDEUY3EM.js.map → chunk-OWSOT5S6.js.map} +0 -0
|
@@ -1,9 +1,97 @@
|
|
|
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, StorageStatus as StorageStatus$1, ThreadData as ThreadData$1, CommentData as CommentData$1 } from '@liveblocks/client';
|
|
1
4
|
import * as _liveblocks_core from '@liveblocks/core';
|
|
2
|
-
import { BaseMetadata, StorageStatus, QueryMetadata, AsyncResult, DRI, AsyncSuccess, Resolve, CommentBody, CommentAttachment, PartialUnless, Patchable, InboxNotificationData, NotificationSettings, Relax, ToImmutable, PartialNotificationSettings, AsyncLoading, AsyncError, ThreadData, HistoryVersion, AiChat, UiChatMessage, Client, LiveblocksError, SyncStatus, RoomEventMessage, CommentData, MutableSignal, ThreadDataWithDeleteInfo, ThreadDeleteInfo, DerivedSignal, DefaultMap, MessageId,
|
|
5
|
+
import { OpaqueClient, OpaqueRoom, AiKnowledgeSource, AiOpaqueToolDefinition, BaseMetadata, StorageStatus, QueryMetadata, AsyncResult, DRI, AsyncSuccess, Resolve, CommentBody, CommentAttachment, PartialUnless, Patchable, InboxNotificationData, NotificationSettings, Relax, ToImmutable, PartialNotificationSettings, AsyncLoading, AsyncError, ThreadData, HistoryVersion, AiChat, UiChatMessage, Client as Client$1, LiveblocksError, SyncStatus, RoomEventMessage, CommentData, 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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
+
/**
|
|
40
|
+
* Make knowledge about your application state available to any AI used in
|
|
41
|
+
* a chat or a one-off request.
|
|
42
|
+
*
|
|
43
|
+
* For example:
|
|
44
|
+
*
|
|
45
|
+
* <RegisterAiKnowledge
|
|
46
|
+
* description="The current mode of my application"
|
|
47
|
+
* value="dark" />
|
|
48
|
+
*
|
|
49
|
+
* <RegisterAiKnowledge
|
|
50
|
+
* description="The current list of todos"
|
|
51
|
+
* value={todos} />
|
|
52
|
+
*
|
|
53
|
+
* By mounting this component, the AI will get access to this knwoledge.
|
|
54
|
+
* By unmounting this component, the AI will no longer have access to it.
|
|
55
|
+
* It can choose to use or ignore this knowledge in its responses.
|
|
56
|
+
*/
|
|
57
|
+
declare const RegisterAiKnowledge: react.NamedExoticComponent<RegisterAiKnowledgeProps>;
|
|
58
|
+
type RegisterAiToolProps = {
|
|
59
|
+
name: string;
|
|
60
|
+
tool: AiOpaqueToolDefinition;
|
|
61
|
+
/**
|
|
62
|
+
* When provided, the tool will only be available for this chatId. If not
|
|
63
|
+
* provided, this tool will globally be made available to any AiChat
|
|
64
|
+
* instance.
|
|
65
|
+
*/
|
|
66
|
+
chatId?: string;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Make a tool available to your AI chat or a one-off request.
|
|
70
|
+
* A tool is a piece of functionality that the AI can call to perform an action
|
|
71
|
+
* or look up information on the user's behalf.
|
|
72
|
+
*
|
|
73
|
+
* Also, tools are used to render custom UIs for tool invocations, which are
|
|
74
|
+
* embedded inside the AI chat.
|
|
75
|
+
*
|
|
76
|
+
* For example:
|
|
77
|
+
*
|
|
78
|
+
* <RegisterAiTool
|
|
79
|
+
* name="list-todos"
|
|
80
|
+
* tool={defineAiTool()({ ... })}
|
|
81
|
+
* />
|
|
82
|
+
*
|
|
83
|
+
* Or scoped to a specific chat:
|
|
84
|
+
*
|
|
85
|
+
* <RegisterAiTool
|
|
86
|
+
* name="list-todos"
|
|
87
|
+
* tool={defineAiTool()({ ... })}
|
|
88
|
+
* chatId="chat-1234"
|
|
89
|
+
* />
|
|
90
|
+
*
|
|
91
|
+
* By mounting this component, the tool is made available.
|
|
92
|
+
* By unmounting this component, the tool will no longer be available.
|
|
93
|
+
*/
|
|
94
|
+
declare const RegisterAiTool: react.NamedExoticComponent<RegisterAiToolProps>;
|
|
7
95
|
|
|
8
96
|
type UseSyncStatusOptions = {
|
|
9
97
|
/**
|
|
@@ -14,6 +102,12 @@ type UseSyncStatusOptions = {
|
|
|
14
102
|
*/
|
|
15
103
|
smooth?: boolean;
|
|
16
104
|
};
|
|
105
|
+
type SendAiMessageOptions = {
|
|
106
|
+
/**
|
|
107
|
+
* The id of the copilot to use to send the message.
|
|
108
|
+
*/
|
|
109
|
+
copilotId?: string;
|
|
110
|
+
};
|
|
17
111
|
type UseStorageStatusOptions = UseSyncStatusOptions;
|
|
18
112
|
type StorageStatusSuccess = Exclude<StorageStatus, "not-loaded" | "loading">;
|
|
19
113
|
type ThreadsQuery<M extends BaseMetadata> = {
|
|
@@ -108,6 +202,8 @@ type HistoryVersionsAsyncSuccess = AsyncSuccess<HistoryVersion[], "versions">;
|
|
|
108
202
|
type HistoryVersionsAsyncResult = AsyncResult<HistoryVersion[], "versions">;
|
|
109
203
|
type AiChatsAsyncSuccess = PagedAsyncSuccess<AiChat[], "chats">;
|
|
110
204
|
type AiChatsAsyncResult = PagedAsyncResult<AiChat[], "chats">;
|
|
205
|
+
type AiChatAsyncSuccess = AsyncSuccess<AiChat, "chat">;
|
|
206
|
+
type AiChatAsyncResult = AsyncResult<AiChat, "chat">;
|
|
111
207
|
type AiChatMessagesAsyncSuccess = AsyncSuccess<readonly UiChatMessage[], "messages">;
|
|
112
208
|
type AiChatMessagesAsyncResult = AsyncResult<readonly UiChatMessage[], "messages">;
|
|
113
209
|
type RoomProviderProps<P extends JsonObject, S extends LsonObject> = Resolve<{
|
|
@@ -170,7 +266,7 @@ type SharedContextBundle<U extends BaseUserMeta> = {
|
|
|
170
266
|
/**
|
|
171
267
|
* Obtains a reference to the current Liveblocks client.
|
|
172
268
|
*/
|
|
173
|
-
useClient(): Client<U>;
|
|
269
|
+
useClient(): Client$1<U>;
|
|
174
270
|
/**
|
|
175
271
|
* Returns user info from a given user ID.
|
|
176
272
|
*
|
|
@@ -214,12 +310,32 @@ type SharedContextBundle<U extends BaseUserMeta> = {
|
|
|
214
310
|
* const syncStatus = useSyncStatus({ smooth: true });
|
|
215
311
|
*/
|
|
216
312
|
useSyncStatus(options?: UseSyncStatusOptions): SyncStatus;
|
|
313
|
+
/**
|
|
314
|
+
* Make knowledge about your application state available to any AI used in
|
|
315
|
+
* a chat or a one-off request.
|
|
316
|
+
*
|
|
317
|
+
* For example:
|
|
318
|
+
*
|
|
319
|
+
* <RegisterAiKnowledge
|
|
320
|
+
* description="The current mode of my application"
|
|
321
|
+
* value="dark" />
|
|
322
|
+
*
|
|
323
|
+
* <RegisterAiKnowledge
|
|
324
|
+
* description="The current list of todos"
|
|
325
|
+
* value={todos} />
|
|
326
|
+
*
|
|
327
|
+
* By mounting this component, the AI will get access to this knwoledge.
|
|
328
|
+
* By unmounting this component, the AI will no longer have access to it.
|
|
329
|
+
* It can choose to use or ignore this knowledge in its responses.
|
|
330
|
+
*/
|
|
331
|
+
RegisterAiKnowledge: ComponentType<RegisterAiKnowledgeProps>;
|
|
332
|
+
RegisterAiTool: ComponentType<RegisterAiToolProps>;
|
|
217
333
|
};
|
|
218
334
|
suspense: {
|
|
219
335
|
/**
|
|
220
336
|
* Obtains a reference to the current Liveblocks client.
|
|
221
337
|
*/
|
|
222
|
-
useClient(): Client<U>;
|
|
338
|
+
useClient(): Client$1<U>;
|
|
223
339
|
/**
|
|
224
340
|
* Returns user info from a given user ID.
|
|
225
341
|
*
|
|
@@ -263,6 +379,26 @@ type SharedContextBundle<U extends BaseUserMeta> = {
|
|
|
263
379
|
* const syncStatus = useSyncStatus({ smooth: true });
|
|
264
380
|
*/
|
|
265
381
|
useSyncStatus(options?: UseSyncStatusOptions): SyncStatus;
|
|
382
|
+
/**
|
|
383
|
+
* Make knowledge about your application state available to any AI used in
|
|
384
|
+
* a chat or a one-off request.
|
|
385
|
+
*
|
|
386
|
+
* For example:
|
|
387
|
+
*
|
|
388
|
+
* <RegisterAiKnowledge
|
|
389
|
+
* description="The current mode of my application"
|
|
390
|
+
* value="dark" />
|
|
391
|
+
*
|
|
392
|
+
* <RegisterAiKnowledge
|
|
393
|
+
* description="The current list of todos"
|
|
394
|
+
* value={todos} />
|
|
395
|
+
*
|
|
396
|
+
* By mounting this component, the AI will get access to this knwoledge.
|
|
397
|
+
* By unmounting this component, the AI will no longer have access to it.
|
|
398
|
+
* It can choose to use or ignore this knowledge in its responses.
|
|
399
|
+
*/
|
|
400
|
+
RegisterAiKnowledge: ComponentType<RegisterAiKnowledgeProps>;
|
|
401
|
+
RegisterAiTool: ComponentType<RegisterAiToolProps>;
|
|
266
402
|
};
|
|
267
403
|
};
|
|
268
404
|
/**
|
|
@@ -998,12 +1134,17 @@ type LiveblocksContextBundleCommon<M extends BaseMetadata> = {
|
|
|
998
1134
|
/**
|
|
999
1135
|
* Returns a function that creates an AI chat.
|
|
1000
1136
|
*
|
|
1137
|
+
* If you do not pass a title for the chat, it will be automatically computed
|
|
1138
|
+
* after the first AI response.
|
|
1139
|
+
*
|
|
1001
1140
|
* @example
|
|
1002
1141
|
* const createAiChat = useCreateAiChat();
|
|
1003
|
-
* createAiChat({ id: "ai-chat-id" });
|
|
1142
|
+
* createAiChat({ id: "ai-chat-id", title: "My AI chat" });
|
|
1004
1143
|
*/
|
|
1005
1144
|
useCreateAiChat(): (options: {
|
|
1006
1145
|
id: string;
|
|
1146
|
+
title?: string;
|
|
1147
|
+
metadata?: Record<string, string | string[]>;
|
|
1007
1148
|
}) => void;
|
|
1008
1149
|
/**
|
|
1009
1150
|
* Returns a function that deletes the AI chat with the specified id.
|
|
@@ -1013,6 +1154,14 @@ type LiveblocksContextBundleCommon<M extends BaseMetadata> = {
|
|
|
1013
1154
|
* deleteAiChat("ai-chat-id");
|
|
1014
1155
|
*/
|
|
1015
1156
|
useDeleteAiChat(): (chatId: string) => void;
|
|
1157
|
+
/**
|
|
1158
|
+
* Returns a function to send a message in an AI chat.
|
|
1159
|
+
*
|
|
1160
|
+
* @example
|
|
1161
|
+
* const sendMessage = useSendAiMessage(chatId);
|
|
1162
|
+
* sendMessage("Hello, Liveblocks AI!");
|
|
1163
|
+
*/
|
|
1164
|
+
useSendAiMessage(chatId: string, options?: SendAiMessageOptions): (message: string) => void;
|
|
1016
1165
|
};
|
|
1017
1166
|
type LiveblocksContextBundle<U extends BaseUserMeta, M extends BaseMetadata> = Resolve<LiveblocksContextBundleCommon<M> & SharedContextBundle<U>["classic"] & {
|
|
1018
1167
|
/**
|
|
@@ -1050,6 +1199,13 @@ type LiveblocksContextBundle<U extends BaseUserMeta, M extends BaseMetadata> = R
|
|
|
1050
1199
|
* const { messages, error, isLoading } = useAiChatMessages("my-chat");
|
|
1051
1200
|
*/
|
|
1052
1201
|
useAiChatMessages(chatId: string): AiChatMessagesAsyncResult;
|
|
1202
|
+
/**
|
|
1203
|
+
* (Private beta) Returns the information of the given chat.
|
|
1204
|
+
*
|
|
1205
|
+
* @example
|
|
1206
|
+
* const { chat, error, isLoading } = useAiChat("my-chat");
|
|
1207
|
+
*/
|
|
1208
|
+
useAiChat(chatId: string): AiChatAsyncResult;
|
|
1053
1209
|
suspense: Resolve<LiveblocksContextBundleCommon<M> & SharedContextBundle<U>["suspense"] & {
|
|
1054
1210
|
/**
|
|
1055
1211
|
* Returns the inbox notifications for the current user.
|
|
@@ -1096,6 +1252,13 @@ type LiveblocksContextBundle<U extends BaseUserMeta, M extends BaseMetadata> = R
|
|
|
1096
1252
|
* const { messages } = useAiChatMessages("my-chat");
|
|
1097
1253
|
*/
|
|
1098
1254
|
useAiChatMessages(chatId: string): AiChatMessagesAsyncSuccess;
|
|
1255
|
+
/**
|
|
1256
|
+
* (Private beta) Returns the information of the given chat.
|
|
1257
|
+
*
|
|
1258
|
+
* @example
|
|
1259
|
+
* const { chat, error, isLoading } = useAiChat("my-chat");
|
|
1260
|
+
*/
|
|
1261
|
+
useAiChat(chatId: string): AiChatAsyncSuccess;
|
|
1099
1262
|
}>;
|
|
1100
1263
|
}>;
|
|
1101
1264
|
|
|
@@ -1297,7 +1460,6 @@ type NotificationsLUT = Map<string, InboxNotificationData>;
|
|
|
1297
1460
|
*/
|
|
1298
1461
|
type RoomSubscriptionSettingsByRoomId = Record<RoomId, RoomSubscriptionSettings$1>;
|
|
1299
1462
|
type SubscriptionsByKey = Record<SubscriptionKey, SubscriptionData>;
|
|
1300
|
-
type PermissionHintsLUT = DefaultMap<RoomId, Set<Permission>>;
|
|
1301
1463
|
type CleanThreadifications<M extends BaseMetadata> = CleanThreads<M> & CleanNotifications;
|
|
1302
1464
|
type CleanThreads<M extends BaseMetadata> = {
|
|
1303
1465
|
/**
|
|
@@ -1362,7 +1524,7 @@ declare function createStore_forHistoryVersions(): {
|
|
|
1362
1524
|
update: (roomId: string, versions: HistoryVersion[]) => void;
|
|
1363
1525
|
};
|
|
1364
1526
|
declare function createStore_forPermissionHints(): {
|
|
1365
|
-
|
|
1527
|
+
getPermissionForRoomΣ: (roomId: string) => ISignal<Set<Permission>>;
|
|
1366
1528
|
update: (newHints: Record<string, Permission[]>) => void;
|
|
1367
1529
|
};
|
|
1368
1530
|
/**
|
|
@@ -1387,7 +1549,7 @@ declare function createStore_forNotificationSettings(updates: ISignal<readonly O
|
|
|
1387
1549
|
signal: DerivedSignal<NotificationSettings>;
|
|
1388
1550
|
update: (settings: NotificationSettings) => void;
|
|
1389
1551
|
};
|
|
1390
|
-
declare function createStore_forOptimistic<M extends BaseMetadata>(client: Client<BaseUserMeta$1, M>): {
|
|
1552
|
+
declare function createStore_forOptimistic<M extends BaseMetadata>(client: Client$1<BaseUserMeta$1, M>): {
|
|
1391
1553
|
signal: ISignal<readonly OptimisticUpdate<M>[]>;
|
|
1392
1554
|
add: (optimisticUpdate: DistributiveOmit<OptimisticUpdate<M>, "id">) => string;
|
|
1393
1555
|
remove: (optimisticId: string) => void;
|
|
@@ -1415,6 +1577,7 @@ declare class UmbrellaStore<M extends BaseMetadata> {
|
|
|
1415
1577
|
readonly notificationSettings: LoadableResource<NotificationSettingsAsyncResult>;
|
|
1416
1578
|
readonly aiChats: LoadableResource<AiChatsAsyncResult>;
|
|
1417
1579
|
readonly messagesByChatId: DefaultMap<string, DefaultMap<MessageId | null, LoadableResource<AiChatMessagesAsyncResult>>>;
|
|
1580
|
+
readonly aiChatById: DefaultMap<string, LoadableResource<AiChatAsyncResult>>;
|
|
1418
1581
|
};
|
|
1419
1582
|
constructor(client: OpaqueClient);
|
|
1420
1583
|
/**
|
|
@@ -1493,31 +1656,45 @@ declare class UmbrellaStore<M extends BaseMetadata> {
|
|
|
1493
1656
|
updateNotificationSettings_confirmOptimisticUpdate(settings: NotificationSettings, optimisticUpdateId: string): void;
|
|
1494
1657
|
}
|
|
1495
1658
|
|
|
1496
|
-
/**
|
|
1497
|
-
* Raw access to the React context where the LiveblocksProvider stores the
|
|
1498
|
-
* current client. Exposed for advanced use cases only.
|
|
1499
|
-
*
|
|
1500
|
-
* @private This is a private/advanced API. Do not rely on it.
|
|
1501
|
-
*/
|
|
1502
|
-
declare const ClientContext: react.Context<OpaqueClient | null>;
|
|
1503
1659
|
/**
|
|
1504
1660
|
* Gets or creates a unique Umbrella store for each unique client instance.
|
|
1505
1661
|
*
|
|
1506
1662
|
* @private
|
|
1507
1663
|
*/
|
|
1508
1664
|
declare function getUmbrellaStoreForClient<M extends BaseMetadata$1>(client: OpaqueClient): UmbrellaStore<M>;
|
|
1665
|
+
/**
|
|
1666
|
+
* Returns a function that creates an AI chat.
|
|
1667
|
+
*
|
|
1668
|
+
* If you do not pass a title for the chat, it will be automatically computed
|
|
1669
|
+
* after the first AI response.
|
|
1670
|
+
*
|
|
1671
|
+
* @example
|
|
1672
|
+
* const createAiChat = useCreateAiChat();
|
|
1673
|
+
* createAiChat({ id: "ai-chat-id", title: "My AI chat" });
|
|
1674
|
+
*/
|
|
1509
1675
|
declare function useCreateAiChat(): (options: {
|
|
1510
1676
|
id: string;
|
|
1677
|
+
title?: string;
|
|
1678
|
+
metadata?: Record<string, string | string[]>;
|
|
1511
1679
|
}) => void;
|
|
1512
|
-
declare function useDeleteAiChat(): (chatId: string) => void;
|
|
1513
1680
|
/**
|
|
1514
|
-
*
|
|
1681
|
+
* Returns a function that deletes the AI chat with the specified id.
|
|
1682
|
+
*
|
|
1683
|
+
* @example
|
|
1684
|
+
* const deleteAiChat = useDeleteAiChat();
|
|
1685
|
+
* deleteAiChat("ai-chat-id");
|
|
1515
1686
|
*/
|
|
1516
|
-
declare function
|
|
1687
|
+
declare function useDeleteAiChat(): (chatId: string) => void;
|
|
1517
1688
|
/**
|
|
1518
|
-
*
|
|
1689
|
+
* Returns a function to send a message in an AI chat.
|
|
1690
|
+
*
|
|
1691
|
+
* @example
|
|
1692
|
+
* const sendMessage = useSendAiMessage(chatId);
|
|
1693
|
+
* sendMessage("Hello, Liveblocks AI!");
|
|
1519
1694
|
*/
|
|
1520
|
-
declare function
|
|
1695
|
+
declare function useSendAiMessage(chatId: string, options?: {
|
|
1696
|
+
copilotId?: string;
|
|
1697
|
+
}): (message: string) => void;
|
|
1521
1698
|
/**
|
|
1522
1699
|
* Sets up a client for connecting to Liveblocks, and is the recommended way to do
|
|
1523
1700
|
* this for React apps. You must define either `authEndpoint` or `publicApiKey`.
|
|
@@ -1722,6 +1899,20 @@ declare const _useAiChats: TypedBundle$1["useAiChats"];
|
|
|
1722
1899
|
* const { chats, error, isLoading } = useAiChats();
|
|
1723
1900
|
*/
|
|
1724
1901
|
declare const _useAiChatsSuspense: TypedBundle$1["suspense"]["useAiChats"];
|
|
1902
|
+
/**
|
|
1903
|
+
* (Private beta) Returns the information of the given chat.
|
|
1904
|
+
*
|
|
1905
|
+
* @example
|
|
1906
|
+
* const { chat, error, isLoading } = useAiChat("my-chat");
|
|
1907
|
+
*/
|
|
1908
|
+
declare const _useAiChat: TypedBundle$1["useAiChat"];
|
|
1909
|
+
/**
|
|
1910
|
+
* (Private beta) Returns the information of the given chat.
|
|
1911
|
+
*
|
|
1912
|
+
* @example
|
|
1913
|
+
* const { chat, error, isLoading } = useAiChat("my-chat");
|
|
1914
|
+
*/
|
|
1915
|
+
declare const _useAiChatSuspense: TypedBundle$1["suspense"]["useAiChat"];
|
|
1725
1916
|
/**
|
|
1726
1917
|
* (Private beta) Returns the messages in the given chat.
|
|
1727
1918
|
*
|
|
@@ -2046,7 +2237,7 @@ declare function useAttachmentUrlSuspense(attachmentId: string): {
|
|
|
2046
2237
|
/**
|
|
2047
2238
|
* @private For internal use only. Do not rely on this hook.
|
|
2048
2239
|
*/
|
|
2049
|
-
declare function useRoomPermissions(roomId: string): Set<
|
|
2240
|
+
declare function useRoomPermissions(roomId: string): Set<_liveblocks_core.Permission>;
|
|
2050
2241
|
/**
|
|
2051
2242
|
* Creates a RoomProvider and a set of typed hooks to use in your app. Note
|
|
2052
2243
|
* that any RoomProvider created in this way does not need to be nested in
|
|
@@ -2537,4 +2728,4 @@ declare const _useStorageRoot: TypedBundle["useStorageRoot"];
|
|
|
2537
2728
|
*/
|
|
2538
2729
|
declare const _useUpdateMyPresence: TypedBundle["useUpdateMyPresence"];
|
|
2539
2730
|
|
|
2540
|
-
export {
|
|
2731
|
+
export { _useEditThreadMetadata as $, RoomContext as A, useClient as B, ClientContext as C, createLiveblocksContext as D, useDeleteAllInboxNotifications as E, useDeleteInboxNotification as F, useErrorListener as G, useMarkAllInboxNotificationsAsRead as H, useMarkInboxNotificationAsRead as I, useSyncStatus as J, createRoomContext as K, LiveblocksProvider as L, type MutationContext as M, _RoomProvider as N, _useAddReaction as O, useBatch as P, _useBroadcastEvent as Q, RegisterAiKnowledge as R, useCanRedo as S, useCanUndo as T, type UseStorageStatusOptions as U, useCreateComment as V, _useCreateThread as W, useDeleteComment as X, _useDeleteThread as Y, useEditComment as Z, _useInboxNotificationThread as _, useAddRoomCommentReaction as a, useUnreadInboxNotificationsCountSuspense as a$, useMarkThreadAsResolved as a0, useMarkThreadAsUnresolved as a1, useSubscribeToThread as a2, useUnsubscribeFromThread as a3, _useEventListener as a4, useHistory as a5, _useIsInsideRoom as a6, useLostConnectionListener as a7, useMarkThreadAsRead as a8, _useMutation as a9, useNotificationSettings as aA, useUpdateNotificationSettings as aB, useCreateAiChat as aC, useDeleteAiChat as aD, useSendAiMessage as aE, _useUserThreads_experimental as aF, useRoomInfo as aG, useUnreadInboxNotificationsCount as aH, _useUser as aI, _useAiChat as aJ, _useAiChats as aK, _useAiChatMessages as aL, _useOtherSuspense as aM, _useOthersSuspense as aN, useOthersConnectionIdsSuspense as aO, _useOthersMappedSuspense as aP, _useSelfSuspense as aQ, _useStorageSuspense as aR, useStorageStatusSuspense as aS, _useThreadsSuspense as aT, useAttachmentUrlSuspense as aU, _useHistoryVersionsSuspense as aV, _useRoomNotificationSettingsSuspense as aW, _useRoomSubscriptionSettingsSuspense as aX, useInboxNotificationsSuspense as aY, useNotificationSettingsSuspense as aZ, useRoomInfoSuspense as a_, _useMyPresence as aa, _useOthersListener as ab, useRedo as ac, useRemoveReaction as ad, _useRoom as ae, useStatus as af, _useStorageRoot as ag, useThreadSubscription as ah, useUndo as ai, _useUpdateMyPresence as aj, useUpdateRoomNotificationSettings as ak, useUpdateRoomSubscriptionSettings as al, useHistoryVersionData as am, _useOther as an, _useOthers as ao, useOthersConnectionIds as ap, _useOthersMapped as aq, _useSelf as ar, _useStorage as as, useStorageStatus as at, _useThreads as au, useAttachmentUrl as av, _useHistoryVersions as aw, _useRoomNotificationSettings as ax, _useRoomSubscriptionSettings as ay, useInboxNotifications as az, useCreateRoomComment as b, _useUserSuspense as b0, _useUserThreadsSuspense_experimental as b1, _useAiChatsSuspense as b2, _useAiChatMessagesSuspense as b3, _useAiChatSuspense as b4, 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 UseThreadsOptions as w, RegisterAiTool as x, type RegisterAiKnowledgeProps as y, type RegisterAiToolProps as z };
|
package/dist/suspense.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkA4EPET3Zcjs = require('./chunk-A4EPET3Z.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -73,12 +73,20 @@ var _chunkGSA4MPRGcjs = require('./chunk-GSA4MPRG.cjs');
|
|
|
73
73
|
|
|
74
74
|
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
var _chunkCTSFL4KTcjs = require('./chunk-CTSFL4KT.cjs');
|
|
77
81
|
|
|
78
82
|
// src/suspense.ts
|
|
79
83
|
var _core = require('@liveblocks/core');
|
|
80
84
|
var _client = require('@liveblocks/client');
|
|
81
|
-
_core.detectDupes.call(void 0,
|
|
85
|
+
_core.detectDupes.call(void 0, _chunkA4EPET3Zcjs.PKG_NAME, _chunkA4EPET3Zcjs.PKG_VERSION, _chunkA4EPET3Zcjs.PKG_FORMAT);
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
82
90
|
|
|
83
91
|
|
|
84
92
|
|
|
@@ -151,5 +159,5 @@ _core.detectDupes.call(void 0, _chunkGSA4MPRGcjs.PKG_NAME, _chunkGSA4MPRGcjs.PKG
|
|
|
151
159
|
|
|
152
160
|
|
|
153
161
|
|
|
154
|
-
exports.ClientContext =
|
|
162
|
+
exports.ClientContext = _chunkCTSFL4KTcjs.ClientContext; exports.ClientSideSuspense = _chunkA4EPET3Zcjs.ClientSideSuspense; exports.LiveblocksProvider = _chunkCTSFL4KTcjs.LiveblocksProvider; exports.RegisterAiKnowledge = _chunkCTSFL4KTcjs.RegisterAiKnowledge; exports.RegisterAiTool = _chunkCTSFL4KTcjs.RegisterAiTool; exports.RoomContext = _chunkCTSFL4KTcjs.RoomContext; exports.RoomProvider = _chunkCTSFL4KTcjs._RoomProvider; exports.isNotificationChannelEnabled = _client.isNotificationChannelEnabled; exports.shallow = _client.shallow; exports.useAddReaction = _chunkCTSFL4KTcjs._useAddReaction; exports.useAiChat = _chunkCTSFL4KTcjs._useAiChatSuspense; exports.useAiChatMessages = _chunkCTSFL4KTcjs._useAiChatMessagesSuspense; exports.useAiChats = _chunkCTSFL4KTcjs._useAiChatsSuspense; exports.useAttachmentUrl = _chunkCTSFL4KTcjs.useAttachmentUrlSuspense; exports.useBatch = _chunkCTSFL4KTcjs.useBatch; exports.useBroadcastEvent = _chunkCTSFL4KTcjs._useBroadcastEvent; exports.useCanRedo = _chunkCTSFL4KTcjs.useCanRedo; exports.useCanUndo = _chunkCTSFL4KTcjs.useCanUndo; exports.useClient = _chunkCTSFL4KTcjs.useClient; exports.useCreateAiChat = _chunkCTSFL4KTcjs.useCreateAiChat; exports.useCreateComment = _chunkCTSFL4KTcjs.useCreateComment; exports.useCreateThread = _chunkCTSFL4KTcjs._useCreateThread; exports.useDeleteAiChat = _chunkCTSFL4KTcjs.useDeleteAiChat; exports.useDeleteAllInboxNotifications = _chunkCTSFL4KTcjs.useDeleteAllInboxNotifications; exports.useDeleteComment = _chunkCTSFL4KTcjs.useDeleteComment; exports.useDeleteInboxNotification = _chunkCTSFL4KTcjs.useDeleteInboxNotification; exports.useDeleteThread = _chunkCTSFL4KTcjs._useDeleteThread; exports.useEditComment = _chunkCTSFL4KTcjs.useEditComment; exports.useEditThreadMetadata = _chunkCTSFL4KTcjs._useEditThreadMetadata; exports.useErrorListener = _chunkCTSFL4KTcjs.useErrorListener; exports.useEventListener = _chunkCTSFL4KTcjs._useEventListener; exports.useHistory = _chunkCTSFL4KTcjs.useHistory; exports.useHistoryVersions = _chunkCTSFL4KTcjs._useHistoryVersionsSuspense; exports.useInboxNotificationThread = _chunkCTSFL4KTcjs._useInboxNotificationThread; exports.useInboxNotifications = _chunkCTSFL4KTcjs.useInboxNotificationsSuspense; exports.useIsInsideRoom = _chunkCTSFL4KTcjs._useIsInsideRoom; exports.useLostConnectionListener = _chunkCTSFL4KTcjs.useLostConnectionListener; exports.useMarkAllInboxNotificationsAsRead = _chunkCTSFL4KTcjs.useMarkAllInboxNotificationsAsRead; exports.useMarkInboxNotificationAsRead = _chunkCTSFL4KTcjs.useMarkInboxNotificationAsRead; exports.useMarkThreadAsRead = _chunkCTSFL4KTcjs.useMarkThreadAsRead; exports.useMarkThreadAsResolved = _chunkCTSFL4KTcjs.useMarkThreadAsResolved; exports.useMarkThreadAsUnresolved = _chunkCTSFL4KTcjs.useMarkThreadAsUnresolved; exports.useMutation = _chunkCTSFL4KTcjs._useMutation; exports.useMyPresence = _chunkCTSFL4KTcjs._useMyPresence; exports.useNotificationSettings = _chunkCTSFL4KTcjs.useNotificationSettingsSuspense; exports.useOther = _chunkCTSFL4KTcjs._useOtherSuspense; exports.useOthers = _chunkCTSFL4KTcjs._useOthersSuspense; exports.useOthersConnectionIds = _chunkCTSFL4KTcjs.useOthersConnectionIdsSuspense; exports.useOthersListener = _chunkCTSFL4KTcjs._useOthersListener; exports.useOthersMapped = _chunkCTSFL4KTcjs._useOthersMappedSuspense; exports.useRedo = _chunkCTSFL4KTcjs.useRedo; exports.useRemoveReaction = _chunkCTSFL4KTcjs.useRemoveReaction; exports.useRoom = _chunkCTSFL4KTcjs._useRoom; exports.useRoomInfo = _chunkCTSFL4KTcjs.useRoomInfoSuspense; exports.useRoomNotificationSettings = _chunkCTSFL4KTcjs._useRoomNotificationSettingsSuspense; exports.useRoomSubscriptionSettings = _chunkCTSFL4KTcjs._useRoomSubscriptionSettingsSuspense; exports.useSelf = _chunkCTSFL4KTcjs._useSelfSuspense; exports.useSendAiMessage = _chunkCTSFL4KTcjs.useSendAiMessage; exports.useStatus = _chunkCTSFL4KTcjs.useStatus; exports.useStorage = _chunkCTSFL4KTcjs._useStorageSuspense; exports.useStorageRoot = _chunkCTSFL4KTcjs._useStorageRoot; exports.useStorageStatus = _chunkCTSFL4KTcjs.useStorageStatusSuspense; exports.useSubscribeToThread = _chunkCTSFL4KTcjs.useSubscribeToThread; exports.useSyncStatus = _chunkCTSFL4KTcjs.useSyncStatus; exports.useThreadSubscription = _chunkCTSFL4KTcjs.useThreadSubscription; exports.useThreads = _chunkCTSFL4KTcjs._useThreadsSuspense; exports.useUndo = _chunkCTSFL4KTcjs.useUndo; exports.useUnreadInboxNotificationsCount = _chunkCTSFL4KTcjs.useUnreadInboxNotificationsCountSuspense; exports.useUnsubscribeFromThread = _chunkCTSFL4KTcjs.useUnsubscribeFromThread; exports.useUpdateMyPresence = _chunkCTSFL4KTcjs._useUpdateMyPresence; exports.useUpdateNotificationSettings = _chunkCTSFL4KTcjs.useUpdateNotificationSettings; exports.useUpdateRoomNotificationSettings = _chunkCTSFL4KTcjs.useUpdateRoomNotificationSettings; exports.useUpdateRoomSubscriptionSettings = _chunkCTSFL4KTcjs.useUpdateRoomSubscriptionSettings; exports.useUser = _chunkCTSFL4KTcjs._useUserSuspense; exports.useUserThreads_experimental = _chunkCTSFL4KTcjs._useUserThreadsSuspense_experimental;
|
|
155
163
|
//# 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;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;
|
|
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;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;AChFA,wCAA4B;AAc5B,4CAAsD;AAXtD,+BAAA,0BAAY,EAAU,6BAAA,EAAa,4BAAU,CAAA;ADiF7C;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;AACA;AACA;AACA;AACA;AACF,y8JAAC","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 UseStorageStatusOptions,\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 \"./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 useBatch,\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 useUpdateRoomNotificationSettings,\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 useStorageStatusSuspense as useStorageStatus,\n useThreadsSuspense as useThreads,\n useAttachmentUrlSuspense as useAttachmentUrl,\n useHistoryVersionsSuspense as useHistoryVersions,\n useRoomNotificationSettingsSuspense as useRoomNotificationSettings,\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
|
|
2
|
-
export { C as ClientContext, L as LiveblocksProvider, M as MutationContext,
|
|
1
|
+
export { ClientSideSuspense } from './index.cjs';
|
|
2
|
+
export { C as ClientContext, L as LiveblocksProvider, M as MutationContext, R as RegisterAiKnowledge, y as RegisterAiKnowledgeProps, x as RegisterAiTool, z as RegisterAiToolProps, A as RoomContext, N as RoomProvider, U as UseStorageStatusOptions, w as UseThreadsOptions, O as useAddReaction, b4 as useAiChat, b3 as useAiChatMessages, b2 as useAiChats, aU as useAttachmentUrl, P as useBatch, Q as useBroadcastEvent, S as useCanRedo, T as useCanUndo, B as useClient, aC as useCreateAiChat, V as useCreateComment, W as useCreateThread, aD as useDeleteAiChat, E as useDeleteAllInboxNotifications, X as useDeleteComment, F as useDeleteInboxNotification, Y as useDeleteThread, Z as useEditComment, $ as useEditThreadMetadata, G as useErrorListener, a4 as useEventListener, a5 as useHistory, aV as useHistoryVersions, _ as useInboxNotificationThread, aY as useInboxNotifications, a6 as useIsInsideRoom, a7 as useLostConnectionListener, H as useMarkAllInboxNotificationsAsRead, I as useMarkInboxNotificationAsRead, a8 as useMarkThreadAsRead, a0 as useMarkThreadAsResolved, a1 as useMarkThreadAsUnresolved, a9 as useMutation, aa as useMyPresence, aZ as useNotificationSettings, aM as useOther, aN as useOthers, aO as useOthersConnectionIds, ab as useOthersListener, aP as useOthersMapped, ac as useRedo, ad as useRemoveReaction, ae as useRoom, a_ as useRoomInfo, aW as useRoomNotificationSettings, aX as useRoomSubscriptionSettings, aQ as useSelf, aE as useSendAiMessage, af as useStatus, aR as useStorage, ag as useStorageRoot, aS as useStorageStatus, a2 as useSubscribeToThread, J as useSyncStatus, ah as useThreadSubscription, aT as useThreads, ai as useUndo, a$ as useUnreadInboxNotificationsCount, a3 as useUnsubscribeFromThread, aj as useUpdateMyPresence, aB as useUpdateNotificationSettings, ak as useUpdateRoomNotificationSettings, al as useUpdateRoomSubscriptionSettings, b0 as useUser, b1 as useUserThreads_experimental } from './room-BdfI6Vy7.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
|
|
2
|
-
export { C as ClientContext, L as LiveblocksProvider, M as MutationContext,
|
|
1
|
+
export { ClientSideSuspense } from './index.js';
|
|
2
|
+
export { C as ClientContext, L as LiveblocksProvider, M as MutationContext, R as RegisterAiKnowledge, y as RegisterAiKnowledgeProps, x as RegisterAiTool, z as RegisterAiToolProps, A as RoomContext, N as RoomProvider, U as UseStorageStatusOptions, w as UseThreadsOptions, O as useAddReaction, b4 as useAiChat, b3 as useAiChatMessages, b2 as useAiChats, aU as useAttachmentUrl, P as useBatch, Q as useBroadcastEvent, S as useCanRedo, T as useCanUndo, B as useClient, aC as useCreateAiChat, V as useCreateComment, W as useCreateThread, aD as useDeleteAiChat, E as useDeleteAllInboxNotifications, X as useDeleteComment, F as useDeleteInboxNotification, Y as useDeleteThread, Z as useEditComment, $ as useEditThreadMetadata, G as useErrorListener, a4 as useEventListener, a5 as useHistory, aV as useHistoryVersions, _ as useInboxNotificationThread, aY as useInboxNotifications, a6 as useIsInsideRoom, a7 as useLostConnectionListener, H as useMarkAllInboxNotificationsAsRead, I as useMarkInboxNotificationAsRead, a8 as useMarkThreadAsRead, a0 as useMarkThreadAsResolved, a1 as useMarkThreadAsUnresolved, a9 as useMutation, aa as useMyPresence, aZ as useNotificationSettings, aM as useOther, aN as useOthers, aO as useOthersConnectionIds, ab as useOthersListener, aP as useOthersMapped, ac as useRedo, ad as useRemoveReaction, ae as useRoom, a_ as useRoomInfo, aW as useRoomNotificationSettings, aX as useRoomSubscriptionSettings, aQ as useSelf, aE as useSendAiMessage, af as useStatus, aR as useStorage, ag as useStorageRoot, aS as useStorageStatus, a2 as useSubscribeToThread, J as useSyncStatus, ah as useThreadSubscription, aT as useThreads, ai as useUndo, a$ as useUnreadInboxNotificationsCount, a3 as useUnsubscribeFromThread, aj as useUpdateMyPresence, aB as useUpdateNotificationSettings, ak as useUpdateRoomNotificationSettings, al as useUpdateRoomSubscriptionSettings, b0 as useUser, b1 as useUserThreads_experimental } from './room-BdfI6Vy7.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
|
@@ -3,14 +3,17 @@ import {
|
|
|
3
3
|
PKG_FORMAT,
|
|
4
4
|
PKG_NAME,
|
|
5
5
|
PKG_VERSION
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-OWSOT5S6.js";
|
|
7
7
|
import {
|
|
8
8
|
ClientContext,
|
|
9
9
|
LiveblocksProvider,
|
|
10
|
+
RegisterAiKnowledge,
|
|
11
|
+
RegisterAiTool,
|
|
10
12
|
RoomContext,
|
|
11
13
|
_RoomProvider,
|
|
12
14
|
_useAddReaction,
|
|
13
15
|
_useAiChatMessagesSuspense,
|
|
16
|
+
_useAiChatSuspense,
|
|
14
17
|
_useAiChatsSuspense,
|
|
15
18
|
_useBroadcastEvent,
|
|
16
19
|
_useCreateThread,
|
|
@@ -62,6 +65,7 @@ import {
|
|
|
62
65
|
useRedo,
|
|
63
66
|
useRemoveReaction,
|
|
64
67
|
useRoomInfoSuspense,
|
|
68
|
+
useSendAiMessage,
|
|
65
69
|
useStatus,
|
|
66
70
|
useStorageStatusSuspense,
|
|
67
71
|
useSubscribeToThread,
|
|
@@ -73,7 +77,7 @@ import {
|
|
|
73
77
|
useUpdateNotificationSettings,
|
|
74
78
|
useUpdateRoomNotificationSettings,
|
|
75
79
|
useUpdateRoomSubscriptionSettings
|
|
76
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-X7TWWGKZ.js";
|
|
77
81
|
|
|
78
82
|
// src/suspense.ts
|
|
79
83
|
import { detectDupes } from "@liveblocks/core";
|
|
@@ -83,11 +87,14 @@ export {
|
|
|
83
87
|
ClientContext,
|
|
84
88
|
ClientSideSuspense,
|
|
85
89
|
LiveblocksProvider,
|
|
90
|
+
RegisterAiKnowledge,
|
|
91
|
+
RegisterAiTool,
|
|
86
92
|
RoomContext,
|
|
87
93
|
_RoomProvider as RoomProvider,
|
|
88
94
|
isNotificationChannelEnabled,
|
|
89
95
|
shallow,
|
|
90
96
|
_useAddReaction as useAddReaction,
|
|
97
|
+
_useAiChatSuspense as useAiChat,
|
|
91
98
|
_useAiChatMessagesSuspense as useAiChatMessages,
|
|
92
99
|
_useAiChatsSuspense as useAiChats,
|
|
93
100
|
useAttachmentUrlSuspense as useAttachmentUrl,
|
|
@@ -134,6 +141,7 @@ export {
|
|
|
134
141
|
_useRoomNotificationSettingsSuspense as useRoomNotificationSettings,
|
|
135
142
|
_useRoomSubscriptionSettingsSuspense as useRoomSubscriptionSettings,
|
|
136
143
|
_useSelfSuspense as useSelf,
|
|
144
|
+
useSendAiMessage,
|
|
137
145
|
useStatus,
|
|
138
146
|
_useStorageSuspense as useStorage,
|
|
139
147
|
_useStorageRoot as useStorageRoot,
|
package/dist/suspense.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/suspense.ts"],"sourcesContent":["/* 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 UseStorageStatusOptions,\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 {\n
|
|
1
|
+
{"version":3,"sources":["../src/suspense.ts"],"sourcesContent":["/* 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 UseStorageStatusOptions,\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 \"./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 useBatch,\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 useUpdateRoomNotificationSettings,\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 useStorageStatusSuspense as useStorageStatus,\n useThreadsSuspense as useThreads,\n useAttachmentUrlSuspense as useAttachmentUrl,\n useHistoryVersionsSuspense as useHistoryVersions,\n useRoomNotificationSettingsSuspense as useRoomNotificationSettings,\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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,mBAAmB;AAc5B,SAAS,SAAS,oCAAoC;AAXtD,YAAY,UAAU,aAAa,UAAU;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liveblocks/react",
|
|
3
|
-
"version": "2.25.0-
|
|
3
|
+
"version": "2.25.0-aiprivatebeta11",
|
|
4
4
|
"description": "A set of React hooks and providers to use Liveblocks declaratively. Liveblocks is the all-in-one toolkit to build collaborative products like Figma, Notion, and more.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -61,12 +61,22 @@
|
|
|
61
61
|
"showdeps": "depcruise src --include-only '^src' --exclude='__tests__' --output-type dot | dot -T svg > /tmp/dependency-graph.svg && open /tmp/dependency-graph.svg"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@liveblocks/client": "2.25.0-
|
|
65
|
-
"@liveblocks/core": "2.25.0-
|
|
64
|
+
"@liveblocks/client": "2.25.0-aiprivatebeta11",
|
|
65
|
+
"@liveblocks/core": "2.25.0-aiprivatebeta11"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
|
+
"@types/react": "*",
|
|
69
|
+
"@types/react-dom": "*",
|
|
68
70
|
"react": "^18 || ^19 || ^19.0.0-rc"
|
|
69
71
|
},
|
|
72
|
+
"peerDependenciesMeta": {
|
|
73
|
+
"@types/react": {
|
|
74
|
+
"optional": true
|
|
75
|
+
},
|
|
76
|
+
"@types/react-dom": {
|
|
77
|
+
"optional": true
|
|
78
|
+
}
|
|
79
|
+
},
|
|
70
80
|
"devDependencies": {
|
|
71
81
|
"@liveblocks/eslint-config": "*",
|
|
72
82
|
"@liveblocks/jest-config": "*",
|