UNPKG

@bitrix24/b24ui-nuxt

Version:

Bitrix24 UI-Kit for developing web applications REST API for NUXT & VUE

63 lines (62 loc) 2.17 kB
import type { AppConfig } from '@nuxt/schema'; import type { UIMessage } from 'ai'; import theme from '#build/b24ui/chat-message'; import type { AvatarProps, ButtonProps, IconComponent } from '../types'; import type { ComponentConfig } from '../types/tv'; type ChatMessage = ComponentConfig<typeof theme, AppConfig, 'chatMessage'>; export interface ChatMessageProps extends UIMessage { /** * The element or component this component should render as. * @defaultValue 'article' */ as?: any; /** * @IconComponent */ icon?: IconComponent; avatar?: AvatarProps & { [key: string]: any; }; /** * @defaultValue 'message' */ variant?: ChatMessage['variants']['variant']; /** * @defaultValue 'left' */ side?: ChatMessage['variants']['side']; /** * Display a list of actions under the message. * The `label` will be used in a tooltip. * `{ size: 'sm', color: 'air-secondary-no-accent' }`{lang="ts-type"} */ actions?: (Omit<ButtonProps, 'onClick'> & { onClick?: (e: MouseEvent, message: UIMessage) => void; })[]; /** * Render the message in a compact style. * This is done automatically when used inside a `UChatPalette`{lang="ts-type"}. * @defaultValue false */ compact?: boolean; class?: any; b24ui?: ChatMessage['slots']; } export interface ChatMessageSlots { leading(props: { avatar: ChatMessageProps['avatar']; b24ui: ChatMessage['b24ui']; }): any; content(props: ChatMessageProps): any; actions(props: { actions: ChatMessageProps['actions']; }): any; } declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ChatMessageProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ChatMessageProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ChatMessageSlots>; declare const _default: typeof __VLS_export; export default _default; type __VLS_WithSlots<T, S> = T & { new (): { $slots: S; }; };