UNPKG

@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.

80 lines (76 loc) 4.34 kB
import { R as RegisterAiKnowledgeProps, w as RegisterAiToolProps } from './room-DRYXmQT5.cjs'; export { C as ClientContext, L as LiveblocksProvider, M as MutationContext, y as RoomContext, J as RoomProvider, U as UseSendAiMessageOptions, x as UseThreadsOptions, A as createLiveblocksContext, I as createRoomContext, K as useAddReaction, aD as useAiChat, aF as useAiChatMessages, aE as useAiChats, aq 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, ai as useHistoryVersionData, ar as useHistoryVersions, _ as useInboxNotificationThread, at 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, au as useNotificationSettings, aj as useOther, ak as useOthers, al as useOthersConnectionIds, a8 as useOthersListener, am as useOthersMapped, a9 as useRedo, aa as useRemoveReaction, ab as useRoom, aA as useRoomInfo, as as useRoomSubscriptionSettings, an as useSelf, ay as useSendAiMessage, ac as useStatus, ao as useStorage, ad as useStorageRoot, $ as useSubscribeToThread, H as useSyncStatus, ae as useThreadSubscription, ap as useThreads, af as useUndo, aB as useUnreadInboxNotificationsCount, a0 as useUnsubscribeFromThread, ag as useUpdateMyPresence, av as useUpdateNotificationSettings, ah as useUpdateRoomSubscriptionSettings, aC as useUser, az as useUserThreads_experimental } from './room-DRYXmQT5.cjs'; 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" /> * * <RegisterAiKnowledge * description="The current list of todos" * value={todos} /> * * 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 };