@mtchat/vue-primevue 0.1.0

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.
@@ -0,0 +1,48 @@
1
+ import { MTChatProps, Message, DialogListItem } from '@mtchat/vue';
2
+ type __VLS_Props = Omit<MTChatProps, 'theme'> & {
3
+ /** Theme: 'light', 'dark', or undefined for auto-detect via PrimeVue dark mode */
4
+ theme?: 'light' | 'dark';
5
+ };
6
+ declare function __VLS_template(): {
7
+ attrs: Partial<{}>;
8
+ slots: {
9
+ 'sidebar-action'?(_: {}): any;
10
+ 'header-menu-actions'?(_: {
11
+ dialog: DialogListItem;
12
+ closeMenu: any;
13
+ menuItemClass: any;
14
+ }): any;
15
+ };
16
+ refs: {};
17
+ rootEl: HTMLDivElement;
18
+ };
19
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
20
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
21
+ connected: () => any;
22
+ disconnected: () => any;
23
+ error: (error: Error) => any;
24
+ "message-sent": (message: Message) => any;
25
+ "dialog-selected": (dialog: DialogListItem) => any;
26
+ "dialog-joined": (dialogId: string) => any;
27
+ "dialog-left": (dialogId: string) => any;
28
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
29
+ onConnected?: (() => any) | undefined;
30
+ onDisconnected?: (() => any) | undefined;
31
+ onError?: ((error: Error) => any) | undefined;
32
+ "onMessage-sent"?: ((message: Message) => any) | undefined;
33
+ "onDialog-selected"?: ((dialog: DialogListItem) => any) | undefined;
34
+ "onDialog-joined"?: ((dialogId: string) => any) | undefined;
35
+ "onDialog-left"?: ((dialogId: string) => any) | undefined;
36
+ }>, {
37
+ theme: "light" | "dark";
38
+ showHeader: boolean;
39
+ mode: import('@mtchat/vue').ChatMode;
40
+ showSidebar: boolean;
41
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
42
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
43
+ export default _default;
44
+ type __VLS_WithTemplateSlots<T, S> = T & {
45
+ new (): {
46
+ $slots: S;
47
+ };
48
+ };
@@ -0,0 +1,49 @@
1
+ /**
2
+ * MTChat Vue PrimeVue Integration
3
+ *
4
+ * Complete MTChat SDK with PrimeVue components and theme integration.
5
+ * Uses your PrimeVue preset tokens (--p-*) for consistent styling.
6
+ *
7
+ * All types, composables and utilities are re-exported from @mtchat/vue,
8
+ * so you only need this single package.
9
+ *
10
+ * @example Basic usage
11
+ * ```vue
12
+ * <script setup>
13
+ * import { MTChatPrime, type MTChatConfig, type Message } from '@mtchat/vue-primevue'
14
+ *
15
+ * const config: MTChatConfig = {
16
+ * baseUrl: 'https://chat.example.com',
17
+ * token: userToken,
18
+ * userId: user.id,
19
+ * }
20
+ * </script>
21
+ * <template>
22
+ * <MTChatPrime :config="config" />
23
+ * </template>
24
+ * ```
25
+ *
26
+ * @example Dark theme
27
+ * ```vue
28
+ * <MTChatPrime :config="config" theme="dark" />
29
+ * ```
30
+ *
31
+ * @example Using composables
32
+ * ```ts
33
+ * import { useChat, type UseChatOptions } from '@mtchat/vue-primevue'
34
+ *
35
+ * const { messages, sendMessage } = useChat({ config })
36
+ * ```
37
+ *
38
+ * Theme customization:
39
+ * - Override PrimeVue tokens (--p-*) via your preset configuration
40
+ * - Override MTChat tokens (--mtchat-*) via CSS on .mtchat-prime class
41
+ */
42
+ export { default as MTChatPrime } from './components/MTChatPrime.vue';
43
+ export { primevueRegistry } from './registry/primevueRegistry';
44
+ export { PrimeButton, PrimeDialog, PrimeMenu, PrimeContextMenu, PrimeInput, PrimeCheckbox, PrimeRadioButton, PrimeTabs, PrimeTab, PrimeAccordion, PrimeAccordionPanel, } from './primitives';
45
+ export type { Dialog, DialogListItem, DialogParticipant, DialogAccessScope, Message, Attachment, PendingAttachment, AttachmentInput, PresignUploadResponse, AttachmentType, MTChatConfig, ScopeConfig, ChatMode, MTChatProps, Locale, ApiResponse, PaginationOptions, DialogListType, WsEvent, WsEventType, WsClientMessage, WsClientMessageType, WsEventHandler, UseChatOptions, UseChatReturn, UseFileUploadOptions, UseFileUploadReturn, ComponentRegistry, PartialRegistry, MtButtonProps, MtDialogProps, MtMenuProps, MtMenuItem, MtInputProps, MtCheckboxProps, MtRadioButtonProps, MtTabsProps, MtTabProps, MtAccordionProps, MtAccordionPanelProps, } from '@mtchat/vue';
46
+ export { useChat, useFileUpload } from '@mtchat/vue';
47
+ export { MTChatClient, MTChatApi, MTChatWebSocket } from '@mtchat/vue';
48
+ export { getAttachmentType, isAllowedFileType, isValidFileSize, formatFileSize, ATTACHMENT_LIMITS, } from '@mtchat/vue';
49
+ export { MTChat, FileViewer, Icon, provideRegistry, useRegistry } from '@mtchat/vue';