@liveblocks/react
Version:
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.
83 lines (79 loc) • 4.54 kB
TypeScript
import { R as RegisterAiKnowledgeProps, w as RegisterAiToolProps } from './room-Bff8edwh.js';
export { A as AiChatStatus, C as ClientContext, L as LiveblocksProvider, M as MutationContext, y as RoomContext, N as RoomProvider, S as SendAiMessageOptions, U as UseSendAiMessageOptions, x as UseThreadsOptions, B as createLiveblocksContext, K as createRoomContext, O as useAddReaction, aI as useAiChat, aK as useAiChatMessages, aL as useAiChatStatus, aJ as useAiChats, au as useAttachmentUrl, P as useBroadcastEvent, Q as useCanRedo, T as useCanUndo, z as useClient, aA as useCreateAiChat, V as useCreateComment, W as useCreateThread, aB as useDeleteAiChat, D as useDeleteAllInboxNotifications, X as useDeleteComment, E as useDeleteInboxNotification, Y as useDeleteThread, Z as useEditComment, $ as useEditThreadMetadata, F as useErrorListener, a4 as useEventListener, aF as useGroupInfo, a5 as useHistory, al as useHistoryVersionData, av as useHistoryVersions, _ as useInboxNotificationThread, ax 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, ay 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, aE as useRoomInfo, aw as useRoomSubscriptionSettings, at as useSearchComments, aq as useSelf, aC as useSendAiMessage, af as useStatus, ar as useStorage, ag as useStorageRoot, a2 as useSubscribeToThread, J as useSyncStatus, ah as useThreadSubscription, as as useThreads, ai as useUndo, aG as useUnreadInboxNotificationsCount, a3 as useUnsubscribeFromThread, aj as useUpdateMyPresence, az as useUpdateNotificationSettings, ak as useUpdateRoomSubscriptionSettings, aM as useUrlMetadata, aH as useUser, aD as useUserThreads_experimental } from './room-Bff8edwh.js';
export { Json, JsonObject, isNotificationChannelEnabled, shallow } from '@liveblocks/client';
import * as react_jsx_runtime from 'react/jsx-runtime';
import * as react from 'react';
import { ReactNode } from 'react';
import '@liveblocks/core';
type Props = {
fallback: ReactNode;
children: (() => ReactNode | undefined) | ReactNode | undefined;
};
/**
* Almost like a normal <Suspense> component, except that for server-side
* renders, the fallback will be used.
*
* The child props will have to be provided in a function, i.e. change:
*
* <Suspense fallback={<Loading />}>
* <MyRealComponent a={1} />
* </Suspense>
*
* To:
*
* <ClientSideSuspense fallback={<Loading />}>
* <MyRealComponent a={1} />
* </ClientSideSuspense>
*
*/
declare function ClientSideSuspense(props: Props): react_jsx_runtime.JSX.Element;
/**
* Make knowledge about your application state available to any AI used in
* a chat or a one-off request.
*
* For example:
*
* <RegisterAiKnowledge
* description="The current mode of my application"
* value="dark" />
*
* Or scoped to a specific chat:
*
* <RegisterAiKnowledge
* description="The current list of todos"
* value={todos}
* chatId="chat-1234" />
*
* By mounting this component, the AI will get access to this knwoledge.
* By unmounting this component, the AI will no longer have access to it.
* It can choose to use or ignore this knowledge in its responses.
*/
declare const RegisterAiKnowledge: react.NamedExoticComponent<RegisterAiKnowledgeProps>;
/**
* Make a tool available to your AI chat or a one-off request.
* A tool is a piece of functionality that the AI can call to perform an action
* or look up information on the user's behalf.
*
* Also, tools are used to render custom UIs for tool invocations, which are
* embedded inside the AI chat.
*
* For example:
*
* <RegisterAiTool
* name="list-todos"
* tool={defineAiTool()({ ... })}
* />
*
* Or scoped to a specific chat:
*
* <RegisterAiTool
* name="list-todos"
* tool={defineAiTool()({ ... })}
* chatId="chat-1234"
* />
*
* By mounting this component, the tool is made available.
* By unmounting this component, the tool will no longer be available.
*/
declare const RegisterAiTool: react.NamedExoticComponent<RegisterAiToolProps>;
export { ClientSideSuspense, RegisterAiKnowledge, RegisterAiKnowledgeProps, RegisterAiTool, RegisterAiToolProps };