@webitel/ui-chats 26.8.3 → 26.8.4

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.
Files changed (105) hide show
  1. package/package.json +9 -2
  2. package/src/locale/en/en.ts +3 -0
  3. package/src/locale/es/es.ts +3 -0
  4. package/src/locale/kz/kz.ts +3 -0
  5. package/src/locale/pl/pl.ts +3 -0
  6. package/src/locale/ro/ro.ts +3 -0
  7. package/src/locale/ru/ru.ts +3 -0
  8. package/src/locale/uk/uk.ts +3 -0
  9. package/src/locale/uz/uz.ts +3 -0
  10. package/src/locale/vi/vi.ts +3 -0
  11. package/src/shared/composables/__tests__/useChatScroll.spec.ts +164 -0
  12. package/src/shared/composables/__tests__/useObserveHeightUntilStable.spec.ts +48 -0
  13. package/src/{ui/messaging → shared}/composables/useChatScroll.ts +37 -9
  14. package/src/{ui/messaging → shared}/composables/useObserveHeightUntilStable.ts +2 -0
  15. package/src/ui/index.ts +2 -2
  16. package/src/ui/messaging/components/the-messages-container.vue +2 -2
  17. package/src/v2/index.ts +4 -0
  18. package/src/v2/locale/en.ts +29 -0
  19. package/src/v2/locale/es.ts +28 -0
  20. package/src/v2/locale/kz.ts +28 -0
  21. package/src/v2/locale/pl.ts +28 -0
  22. package/src/v2/locale/ro.ts +28 -0
  23. package/src/v2/locale/ru.ts +27 -0
  24. package/src/v2/locale/uk.ts +27 -0
  25. package/src/v2/locale/useChatsV2I18n.ts +14 -0
  26. package/src/v2/locale/uz.ts +28 -0
  27. package/src/v2/locale/vi.ts +28 -0
  28. package/src/v2/scripts/__tests__/attachments.spec.ts +168 -0
  29. package/src/v2/scripts/__tests__/fixtures.ts +56 -0
  30. package/src/v2/scripts/__tests__/formatDate.spec.ts +96 -0
  31. package/src/v2/scripts/__tests__/getMessageStatus.spec.ts +214 -0
  32. package/src/v2/scripts/__tests__/isContactCentreSide.spec.ts +21 -0
  33. package/src/v2/scripts/__tests__/resolveSystemNotice.spec.ts +157 -0
  34. package/src/v2/scripts/__tests__/toHistoryItems.spec.ts +100 -0
  35. package/src/v2/scripts/attachments.ts +144 -0
  36. package/src/v2/scripts/formatDate.ts +74 -0
  37. package/src/v2/scripts/getMessageStatus.ts +58 -0
  38. package/src/v2/scripts/isContactCentreSide.ts +14 -0
  39. package/src/v2/scripts/resolveSystemNotice.ts +119 -0
  40. package/src/v2/scripts/toHistoryItems.ts +63 -0
  41. package/src/v2/scripts/toTimestamp.ts +21 -0
  42. package/src/v2/types/index.ts +74 -0
  43. package/src/v2/ui/__tests__/mountWithChats.ts +38 -0
  44. package/src/v2/ui/chat-composer/__tests__/chat-composer.spec.ts +221 -0
  45. package/src/v2/ui/chat-composer/chat-composer.vue +212 -0
  46. package/src/v2/ui/chat-history/__tests__/chat-history.spec.ts +235 -0
  47. package/src/v2/ui/chat-history/chat-history.vue +262 -0
  48. package/src/v2/ui/chat-history/components/chat-date-divider.vue +36 -0
  49. package/src/v2/ui/chat-history/components/chat-message.vue +148 -0
  50. package/src/v2/ui/chat-history/components/chat-system-notice.vue +100 -0
  51. package/src/v2/ui/chat-history/components/message-attachments.vue +162 -0
  52. package/src/v2/ui/chat-history/components/message-status.vue +31 -0
  53. package/src/v2/ui/chat-history/components/message-text.vue +37 -0
  54. package/src/v2/ui/chat-history/components/scroll-to-bottom-btn.vue +55 -0
  55. package/src/v2/ui/chat-history/gallery.ts +8 -0
  56. package/src/v2/ui/chat-thread/__tests__/chat-thread.spec.ts +122 -0
  57. package/src/v2/ui/chat-thread/chat-thread.vue +111 -0
  58. package/types/.tsbuildinfo +1 -1
  59. package/types/locale/en/en.d.ts +25 -0
  60. package/types/locale/es/es.d.ts +25 -0
  61. package/types/locale/index.d.ts +225 -0
  62. package/types/locale/kz/kz.d.ts +25 -0
  63. package/types/locale/pl/pl.d.ts +25 -0
  64. package/types/locale/ro/ro.d.ts +25 -0
  65. package/types/locale/ru/ru.d.ts +25 -0
  66. package/types/locale/uk/uk.d.ts +25 -0
  67. package/types/locale/uz/uz.d.ts +25 -0
  68. package/types/locale/vi/vi.d.ts +25 -0
  69. package/types/{ui/messaging → shared}/composables/useChatScroll.d.ts +14 -4
  70. package/types/ui/index.d.ts +2 -2
  71. package/types/v2/index.d.ts +4 -0
  72. package/types/v2/locale/en.d.ts +27 -0
  73. package/types/v2/locale/es.d.ts +26 -0
  74. package/types/v2/locale/kz.d.ts +26 -0
  75. package/types/v2/locale/pl.d.ts +26 -0
  76. package/types/v2/locale/ro.d.ts +26 -0
  77. package/types/v2/locale/ru.d.ts +26 -0
  78. package/types/v2/locale/uk.d.ts +26 -0
  79. package/types/v2/locale/useChatsV2I18n.d.ts +5 -0
  80. package/types/v2/locale/uz.d.ts +26 -0
  81. package/types/v2/locale/vi.d.ts +26 -0
  82. package/types/v2/scripts/__tests__/fixtures.d.ts +7 -0
  83. package/types/v2/scripts/attachments.d.ts +30 -0
  84. package/types/v2/scripts/formatDate.d.ts +17 -0
  85. package/types/v2/scripts/getMessageStatus.d.ts +8 -0
  86. package/types/v2/scripts/isContactCentreSide.d.ts +8 -0
  87. package/types/v2/scripts/resolveSystemNotice.d.ts +23 -0
  88. package/types/v2/scripts/toHistoryItems.d.ts +19 -0
  89. package/types/v2/scripts/toTimestamp.d.ts +7 -0
  90. package/types/v2/types/index.d.ts +54 -0
  91. package/types/v2/ui/__tests__/mountWithChats.d.ts +8 -0
  92. package/types/v2/ui/chat-composer/chat-composer.vue.d.ts +31 -0
  93. package/types/v2/ui/chat-history/chat-history.vue.d.ts +11 -0
  94. package/types/v2/ui/chat-history/components/chat-date-divider.vue.d.ts +6 -0
  95. package/types/v2/ui/chat-history/components/chat-message.vue.d.ts +10 -0
  96. package/types/v2/ui/chat-history/components/chat-system-notice.vue.d.ts +9 -0
  97. package/types/v2/ui/chat-history/components/message-attachments.vue.d.ts +7 -0
  98. package/types/v2/ui/chat-history/components/message-status.vue.d.ts +7 -0
  99. package/types/v2/ui/chat-history/components/message-text.vue.d.ts +6 -0
  100. package/types/v2/ui/chat-history/components/scroll-to-bottom-btn.vue.d.ts +12 -0
  101. package/types/v2/ui/chat-history/gallery.d.ts +6 -0
  102. package/types/v2/ui/chat-thread/chat-thread.vue.d.ts +26 -0
  103. /package/src/{ui/messaging → shared}/composables/useScrollToBottomBtn.ts +0 -0
  104. /package/types/{ui/messaging → shared}/composables/useObserveHeightUntilStable.d.ts +0 -0
  105. /package/types/{ui/messaging → shared}/composables/useScrollToBottomBtn.d.ts +0 -0
@@ -0,0 +1,26 @@
1
+ declare const _default: {
2
+ composer: {
3
+ placeholder: string;
4
+ attach: string;
5
+ emoji: string;
6
+ send: string;
7
+ };
8
+ history: {
9
+ today: string;
10
+ waitingForOperator: string;
11
+ deletedMessage: string;
12
+ unsupportedMessage: string;
13
+ download: string;
14
+ };
15
+ systemNotice: {
16
+ started: string;
17
+ joined: string;
18
+ accepted: string;
19
+ transferred: string;
20
+ left: string;
21
+ ended: string;
22
+ unknown: string;
23
+ system: string;
24
+ };
25
+ };
26
+ export default _default;
@@ -0,0 +1,26 @@
1
+ declare const _default: {
2
+ composer: {
3
+ placeholder: string;
4
+ attach: string;
5
+ emoji: string;
6
+ send: string;
7
+ };
8
+ history: {
9
+ today: string;
10
+ waitingForOperator: string;
11
+ deletedMessage: string;
12
+ unsupportedMessage: string;
13
+ download: string;
14
+ };
15
+ systemNotice: {
16
+ started: string;
17
+ joined: string;
18
+ accepted: string;
19
+ transferred: string;
20
+ left: string;
21
+ ended: string;
22
+ unknown: string;
23
+ system: string;
24
+ };
25
+ };
26
+ export default _default;
@@ -0,0 +1,26 @@
1
+ declare const _default: {
2
+ composer: {
3
+ placeholder: string;
4
+ attach: string;
5
+ emoji: string;
6
+ send: string;
7
+ };
8
+ history: {
9
+ today: string;
10
+ waitingForOperator: string;
11
+ deletedMessage: string;
12
+ unsupportedMessage: string;
13
+ download: string;
14
+ };
15
+ systemNotice: {
16
+ started: string;
17
+ joined: string;
18
+ accepted: string;
19
+ transferred: string;
20
+ left: string;
21
+ ended: string;
22
+ unknown: string;
23
+ system: string;
24
+ };
25
+ };
26
+ export default _default;
@@ -0,0 +1,26 @@
1
+ declare const _default: {
2
+ composer: {
3
+ placeholder: string;
4
+ attach: string;
5
+ emoji: string;
6
+ send: string;
7
+ };
8
+ history: {
9
+ today: string;
10
+ waitingForOperator: string;
11
+ deletedMessage: string;
12
+ unsupportedMessage: string;
13
+ download: string;
14
+ };
15
+ systemNotice: {
16
+ started: string;
17
+ joined: string;
18
+ accepted: string;
19
+ transferred: string;
20
+ left: string;
21
+ ended: string;
22
+ unknown: string;
23
+ system: string;
24
+ };
25
+ };
26
+ export default _default;
@@ -0,0 +1,26 @@
1
+ declare const _default: {
2
+ composer: {
3
+ placeholder: string;
4
+ attach: string;
5
+ emoji: string;
6
+ send: string;
7
+ };
8
+ history: {
9
+ today: string;
10
+ waitingForOperator: string;
11
+ deletedMessage: string;
12
+ unsupportedMessage: string;
13
+ download: string;
14
+ };
15
+ systemNotice: {
16
+ started: string;
17
+ joined: string;
18
+ accepted: string;
19
+ transferred: string;
20
+ left: string;
21
+ ended: string;
22
+ unknown: string;
23
+ system: string;
24
+ };
25
+ };
26
+ export default _default;
@@ -0,0 +1,5 @@
1
+ /** `t` scoped to the v2 namespace: `t('composer.placeholder')`. */
2
+ export declare const useChatsV2I18n: () => {
3
+ t: (path: string, named?: Record<string, unknown>) => any;
4
+ locale: any;
5
+ };
@@ -0,0 +1,26 @@
1
+ declare const _default: {
2
+ composer: {
3
+ placeholder: string;
4
+ attach: string;
5
+ emoji: string;
6
+ send: string;
7
+ };
8
+ history: {
9
+ today: string;
10
+ waitingForOperator: string;
11
+ deletedMessage: string;
12
+ unsupportedMessage: string;
13
+ download: string;
14
+ };
15
+ systemNotice: {
16
+ started: string;
17
+ joined: string;
18
+ accepted: string;
19
+ transferred: string;
20
+ left: string;
21
+ ended: string;
22
+ unknown: string;
23
+ system: string;
24
+ };
25
+ };
26
+ export default _default;
@@ -0,0 +1,26 @@
1
+ declare const _default: {
2
+ composer: {
3
+ placeholder: string;
4
+ attach: string;
5
+ emoji: string;
6
+ send: string;
7
+ };
8
+ history: {
9
+ today: string;
10
+ waitingForOperator: string;
11
+ deletedMessage: string;
12
+ unsupportedMessage: string;
13
+ download: string;
14
+ };
15
+ systemNotice: {
16
+ started: string;
17
+ joined: string;
18
+ accepted: string;
19
+ transferred: string;
20
+ left: string;
21
+ ended: string;
22
+ unknown: string;
23
+ system: string;
24
+ };
25
+ };
26
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import type { ChatParticipant, MessageModel, ThreadModel } from '../../types';
2
+ export declare const operator: ChatParticipant;
3
+ export declare const colleague: ChatParticipant;
4
+ export declare const bot: ChatParticipant;
5
+ export declare const client: ChatParticipant;
6
+ export declare const message: (overrides?: Partial<MessageModel>) => MessageModel;
7
+ export declare const thread: (overrides?: Partial<ThreadModel>) => ThreadModel;
@@ -0,0 +1,30 @@
1
+ import type { ChatDocument, ChatImage, MessageModel } from '../types';
2
+ export interface ChatFileCard {
3
+ key: string;
4
+ name: string;
5
+ size?: string;
6
+ mime?: string;
7
+ url?: string;
8
+ }
9
+ export interface ClassifiedAttachments {
10
+ images: Array<{
11
+ key: string;
12
+ image: ChatImage;
13
+ }>;
14
+ media: Array<{
15
+ key: string;
16
+ document: ChatDocument;
17
+ kind: 'audio' | 'video';
18
+ }>;
19
+ files: ChatFileCard[];
20
+ }
21
+ export interface GalleryImage {
22
+ key: string;
23
+ src: string;
24
+ }
25
+ export declare const imageKey: (message: MessageModel, image: ChatImage, index: number) => string;
26
+ export declare const isRenderableImage: (image: ChatImage) => boolean;
27
+ export declare const hasAttachments: (message: MessageModel) => boolean;
28
+ export declare const classifyAttachments: (message: MessageModel) => ClassifiedAttachments;
29
+ /** Every drawable image across the history, in history order. */
30
+ export declare const collectGalleryImages: (messages: readonly MessageModel[]) => GalleryImage[];
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Whether two instants fall on the same calendar day in `timeZone` — the
3
+ * operator's setting by default, the one the rest of the app formats with.
4
+ */
5
+ export declare const isSameDayInZone: (a: number, b: number, timeZone?: string) => boolean;
6
+ /** "Today" · "September 15" · "September 15, 2025" (AC_03.02.02). */
7
+ export declare const formatDividerDate: (timestamp: number, { locale, todayLabel, now, timeZone, }: {
8
+ locale: string;
9
+ todayLabel: string;
10
+ now?: number;
11
+ timeZone?: string;
12
+ }) => string;
13
+ /**
14
+ * 24h "HH:mm", as in DES-730, in the operator's time zone. Not the shared
15
+ * formatDate 'time' mode: its uk 'p' pattern drops the leading zero ("9:05").
16
+ */
17
+ export declare const formatMessageTime: (timestamp: number, timeZone?: string) => string;
@@ -0,0 +1,8 @@
1
+ import type { ChatMessageStatus, MessageModel, ThreadModel } from '../types';
2
+ /**
3
+ * Sent / delivered / read for the operator's own messages, against the
4
+ * client's read horizon: the lowest horizon over every client member, so a
5
+ * message counts as read only once all clients have read it.
6
+ * `null` when no ticks should show.
7
+ */
8
+ export declare const getMessageStatus: (message: MessageModel, thread: ThreadModel, selfMemberId: string) => ChatMessageStatus | null;
@@ -0,0 +1,8 @@
1
+ import type { ChatParticipant } from '../types';
2
+ /**
3
+ * ⚠ Carried over from v1 (`chat-message.vue`, `member.type === 'webitel'`);
4
+ * not confirmed for the new IM backend. This is the one place to change it.
5
+ */
6
+ export declare const INTERNAL_CONTACT_TYPE = "webitel";
7
+ /** Operators and bots speak for the contact centre; everyone else is the client. */
8
+ export declare const isContactCentreSide: (member: ChatParticipant | undefined) => boolean;
@@ -0,0 +1,23 @@
1
+ import type { ChatNoticeTone, ChatParticipant, MessageModel, ThreadModel } from '../types';
2
+ export interface SystemNoticeDefinition {
3
+ /** relative to the v2 locale namespace */
4
+ textKey: string;
5
+ tone: ChatNoticeTone;
6
+ }
7
+ /**
8
+ * ⚠ WS-22 (backend, "Need info"): only `member_added`, `member_removed` and
9
+ * `transferred` are documented. The started / accepted / closed type strings
10
+ * are assumed — confirm them there and change only this table.
11
+ */
12
+ export declare const SYSTEM_NOTICES: Record<string, SystemNoticeDefinition>;
13
+ export interface ResolvedSystemNotice {
14
+ /** null when `fallbackText` should be shown instead */
15
+ textKey: string | null;
16
+ /** the backend's own text, for types the table does not know */
17
+ fallbackText: string | null;
18
+ tone: ChatNoticeTone;
19
+ actor: ChatParticipant | undefined;
20
+ }
21
+ export declare const resolveSystemNotice: (message: MessageModel, thread: ThreadModel) => ResolvedSystemNotice;
22
+ /** Display name, or '' when the participant carries none. */
23
+ export declare const participantName: (member: ChatParticipant | undefined) => string;
@@ -0,0 +1,19 @@
1
+ import type { MessageModel } from '../types';
2
+ export type ChatHistoryItem = {
3
+ kind: 'divider';
4
+ key: string;
5
+ /** timestamp of the first item of that day */
6
+ date: number;
7
+ } | {
8
+ kind: 'message' | 'system';
9
+ key: string;
10
+ message: MessageModel;
11
+ };
12
+ /**
13
+ * Messages (oldest → newest) as render rows, with a divider before the first
14
+ * item of each calendar day in `timeZone` (the operator's setting by default).
15
+ * Items without a usable `createdAt` never open a new day.
16
+ */
17
+ export declare const toHistoryItems: (messages: readonly MessageModel[], { timeZone, }?: {
18
+ timeZone?: string;
19
+ }) => ChatHistoryItem[];
@@ -0,0 +1,7 @@
1
+ /** Backend timestamps are Unix ms as strings; `null` when absent or unusable. */
2
+ export declare const toTimestamp: (value: string | number | undefined | null) => number | null;
3
+ /**
4
+ * Per-thread message sequence numbers arrive as strings. Compare them as
5
+ * numbers: as strings, "10" sorts before "9".
6
+ */
7
+ export declare const toSeq: (value: string | number | null | undefined) => number | null;
@@ -0,0 +1,54 @@
1
+ import type { MessageModel, ThreadModel } from '@webitel/chat-web-sdk';
2
+ export type { MessageModel, ThreadModel };
3
+ export declare const ChatThreadMode: {
4
+ /** offered to the operator, not accepted yet: no composer, waiting line */
5
+ readonly Awaiting: "awaiting";
6
+ readonly Active: "active";
7
+ /** closed or otherwise not writable: no composer */
8
+ readonly Readonly: "readonly";
9
+ };
10
+ export type ChatThreadMode = (typeof ChatThreadMode)[keyof typeof ChatThreadMode];
11
+ export declare const ChatComposerAction: {
12
+ readonly Attach: "attach";
13
+ readonly Emoji: "emoji";
14
+ readonly Send: "send";
15
+ };
16
+ export type ChatComposerAction = (typeof ChatComposerAction)[keyof typeof ChatComposerAction];
17
+ export type ChatMessageStatus = 'sent' | 'delivered' | 'read';
18
+ export type ChatNoticeTone = 'positive' | 'neutral' | 'negative';
19
+ /** A thread member as it arrives on `message.sender` and `thread.members[]`. */
20
+ export type ChatParticipant = NonNullable<MessageModel['sender']>;
21
+ export type ChatImage = NonNullable<MessageModel['images']>[number];
22
+ export type ChatDocument = NonNullable<MessageModel['documents']>[number];
23
+ export type ResolveAvatarUrl = (member: ChatParticipant) => string | undefined;
24
+ export type ChatSendHandler = (text: string) => Promise<unknown>;
25
+ export type ChatAttachHandler = (files: File[]) => Promise<unknown>;
26
+ export type ChatLoadMoreHandler = () => Promise<unknown>;
27
+ export interface ChatComposerSlotProps {
28
+ /** inserts at the cursor (or appends) and updates the draft */
29
+ insertText: (text: string) => void;
30
+ focus: () => void;
31
+ disabled: boolean;
32
+ }
33
+ export interface ChatHistoryProps {
34
+ thread: ThreadModel;
35
+ /** oldest → newest; current and earlier sessions */
36
+ messages: MessageModel[];
37
+ /** thread-member id of the operator using the UI */
38
+ selfMemberId: string;
39
+ mode?: ChatThreadMode;
40
+ hasMore?: boolean;
41
+ onLoadMore?: ChatLoadMoreHandler;
42
+ resolveAvatarUrl?: ResolveAvatarUrl;
43
+ }
44
+ export interface ChatComposerProps {
45
+ onSend?: ChatSendHandler;
46
+ onAttach?: ChatAttachHandler;
47
+ actions?: ChatComposerAction[];
48
+ submitOnEnter?: boolean;
49
+ disabled?: boolean;
50
+ }
51
+ export interface ChatThreadProps extends ChatHistoryProps, ChatComposerProps {
52
+ /** controlled draft (v-model:draft); omit to let the composer own it */
53
+ draft?: string;
54
+ }
@@ -0,0 +1,8 @@
1
+ import { mount } from '@vue/test-utils';
2
+ export declare const chatsI18n: () => any;
3
+ export declare const mountWithChats: typeof mount;
4
+ export declare const deferred: <T = void>() => {
5
+ promise: Promise<T>;
6
+ resolve: (value: T) => void;
7
+ reject: (reason?: unknown) => void;
8
+ };
@@ -0,0 +1,31 @@
1
+ import { ChatComposerAction, type ChatComposerProps, type ChatComposerSlotProps } from '../../types';
2
+ type __VLS_Props = ChatComposerProps;
3
+ type __VLS_Slots = {
4
+ actions?: (props: ChatComposerSlotProps) => unknown;
5
+ };
6
+ declare function focus(): void;
7
+ declare function insertText(text: string): void;
8
+ type __VLS_ModelProps = {
9
+ 'draft'?: string;
10
+ };
11
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
12
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
13
+ focus: typeof focus;
14
+ insertText: typeof insertText;
15
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
+ "update:draft": (value: string) => any;
17
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
18
+ "onUpdate:draft"?: ((value: string) => any) | undefined;
19
+ }>, {
20
+ actions: ChatComposerAction[];
21
+ submitOnEnter: boolean;
22
+ disabled: boolean;
23
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
25
+ declare const _default: typeof __VLS_export;
26
+ export default _default;
27
+ type __VLS_WithSlots<T, S> = T & {
28
+ new (): {
29
+ $slots: S;
30
+ };
31
+ };
@@ -0,0 +1,11 @@
1
+ import { type ChatHistoryProps, ChatThreadMode, type MessageModel } from '../../types';
2
+ declare const __VLS_export: import("vue").DefineComponent<ChatHistoryProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
3
+ seen: (message: MessageModel) => any;
4
+ }, string, import("vue").PublicProps, Readonly<ChatHistoryProps> & Readonly<{
5
+ onSeen?: ((message: MessageModel) => any) | undefined;
6
+ }>, {
7
+ mode: ChatThreadMode;
8
+ hasMore: boolean;
9
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const _default: typeof __VLS_export;
11
+ export default _default;
@@ -0,0 +1,6 @@
1
+ type __VLS_Props = {
2
+ date: number;
3
+ };
4
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ declare const _default: typeof __VLS_export;
6
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import type { MessageModel, ResolveAvatarUrl, ThreadModel } from '../../../types';
2
+ type __VLS_Props = {
3
+ message: MessageModel;
4
+ thread: ThreadModel;
5
+ selfMemberId: string;
6
+ resolveAvatarUrl?: ResolveAvatarUrl;
7
+ };
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import type { MessageModel, ResolveAvatarUrl, ThreadModel } from '../../../types';
2
+ type __VLS_Props = {
3
+ message: MessageModel;
4
+ thread: ThreadModel;
5
+ resolveAvatarUrl?: ResolveAvatarUrl;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import type { MessageModel } from '../../../types';
2
+ type __VLS_Props = {
3
+ message: MessageModel;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import type { ChatMessageStatus } from '../../../types';
2
+ type __VLS_Props = {
3
+ status: ChatMessageStatus;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,6 @@
1
+ type __VLS_Props = {
2
+ text: string;
3
+ };
4
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ declare const _default: typeof __VLS_export;
6
+ export default _default;
@@ -0,0 +1,12 @@
1
+ type __VLS_Props = {
2
+ newMessageCount?: number;
3
+ };
4
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
+ scroll: () => any;
6
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
7
+ onScroll?: (() => any) | undefined;
8
+ }>, {
9
+ newMessageCount: number;
10
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import type { InjectionKey } from 'vue';
2
+ export interface ChatGallery {
3
+ /** opens the history-wide gallery at the image with this key */
4
+ open: (imageKey: string) => void;
5
+ }
6
+ export declare const ChatGalleryKey: InjectionKey<ChatGallery>;
@@ -0,0 +1,26 @@
1
+ import { ChatComposerAction, type ChatComposerSlotProps, ChatThreadMode, type ChatThreadProps, type MessageModel } from '../../types';
2
+ type __VLS_Slots = {
3
+ actions?: (props: ChatComposerSlotProps) => unknown;
4
+ };
5
+ declare const __VLS_base: import("vue").DefineComponent<ChatThreadProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ "update:draft": (draft: string) => any;
7
+ seen: (message: MessageModel) => any;
8
+ }, string, import("vue").PublicProps, Readonly<ChatThreadProps> & Readonly<{
9
+ "onUpdate:draft"?: ((draft: string) => any) | undefined;
10
+ onSeen?: ((message: MessageModel) => any) | undefined;
11
+ }>, {
12
+ actions: ChatComposerAction[];
13
+ submitOnEnter: boolean;
14
+ mode: ChatThreadMode;
15
+ draft: string;
16
+ hasMore: boolean;
17
+ disabled: boolean;
18
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
+ declare const _default: typeof __VLS_export;
21
+ export default _default;
22
+ type __VLS_WithSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };