@epam/ai-dial-conversation-messages 0.0.0-dev.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,71 @@
1
+ import { MessageRating, MessageRole } from '@epam/ai-dial-chat-shared';
2
+ /** Tooltip labels for each message action button. All fields are optional; omitting a field falls back to the built-in default. */
3
+ export interface MessageActionTooltips {
4
+ /** Tooltip for the Edit button. */
5
+ edit?: string;
6
+ /** Tooltip for the Delete button. */
7
+ delete?: string;
8
+ /** Tooltip for the Regenerate button. */
9
+ regenerate?: string;
10
+ /** Tooltip for the Copy button in its default state. */
11
+ copy?: string;
12
+ /** Tooltip shown on the Copy button immediately after copying. */
13
+ copied?: string;
14
+ /** Tooltip for the Copy as Markdown button in its default state. */
15
+ copyMarkdown?: string;
16
+ /** Tooltip shown on the Copy as Markdown button immediately after copying. */
17
+ copiedMarkdown?: string;
18
+ /** Tooltip for the Like button. */
19
+ like?: string;
20
+ /** Tooltip for the Dislike button. */
21
+ dislike?: string;
22
+ }
23
+ /** Accessible labels for each message action button. All fields are optional; omitting a field falls back to the built-in English default. */
24
+ export interface MessageActionAriaLabels {
25
+ /** aria-label for the Edit button. */
26
+ editMessage?: string;
27
+ /** aria-label for the Delete button. */
28
+ deleteMessage?: string;
29
+ /** aria-label for the Regenerate button. */
30
+ regenerateResponse?: string;
31
+ /** aria-label for the Copy button. */
32
+ copyResponse?: string;
33
+ /** aria-label for the Copy as Markdown button. */
34
+ copyAsMarkdown?: string;
35
+ /** aria-label for the Like button. */
36
+ likeResponse?: string;
37
+ /** aria-label for the Dislike button. */
38
+ dislikeResponse?: string;
39
+ }
40
+ /** Props accepted by the `MessageActions` component. */
41
+ export interface MessageActionsProps {
42
+ /** Which action set to render — `'User'` shows Edit/Delete, `'Agent'` shows Regenerate/Copy/Markdown/Like/Dislike. Defaults to `'User'`. */
43
+ role?: MessageRole;
44
+ /** Extra class name(s) merged onto the root wrapper element. */
45
+ className?: string;
46
+ /** When `true`, actions are always visible instead of appearing only on group hover. */
47
+ isAlwaysVisible?: boolean;
48
+ /** Override tooltip labels for individual action buttons. */
49
+ tooltips?: MessageActionTooltips;
50
+ /** Override accessible labels (aria-label) for individual action buttons. */
51
+ ariaLabels?: MessageActionAriaLabels;
52
+ /** Called when the user clicks the Edit button (User source only). */
53
+ onEdit?: () => void;
54
+ /** Called when the user hovers over the Edit button (User source only). Useful for preloading the edit UI. */
55
+ onEditHover?: () => void;
56
+ /** Called when the user clicks the Delete button (User source only). */
57
+ onDelete?: () => void;
58
+ /** Called when the user clicks the Regenerate button (Agent source only). */
59
+ onRegenerate?: () => void;
60
+ /** Called when the user clicks the Copy button (Agent source only). */
61
+ onCopy?: () => void;
62
+ /** Called when the user clicks the Copy Markdown button (Agent source only). */
63
+ onCopyMarkdown?: () => void;
64
+ /** Called when the user clicks the Like button (Agent source only). */
65
+ onLike?: () => void;
66
+ /** Called when the user clicks the Dislike button (Agent source only). */
67
+ onDislike?: () => void;
68
+ /** Currently active rating for this message, if any. When set, the matching button is visually highlighted. */
69
+ activeRating?: MessageRating;
70
+ }
71
+ //# sourceMappingURL=MessageActions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessageActions.d.ts","sourceRoot":"","sources":["../../src/models/MessageActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAEvE,mIAAmI;AACnI,MAAM,WAAW,qBAAqB;IACpC,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yCAAyC;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oEAAoE;IACpE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB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M,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,+GAA+G;IAC/G,YAAY,CAAC,EAAE,aAAa,CAAC;CAC9B"}
@@ -0,0 +1,182 @@
1
+ import { CodeBlockTheme, DisplayAttachment, MessageRole, StarterOption } from '@epam/ai-dial-chat-shared';
2
+ import { ReactNode } from 'react';
3
+ import { Components } from 'react-markdown';
4
+ import { BubblePosition } from '../types/bubble-position';
5
+ import { MessageActionsProps } from './MessageActions';
6
+ /** CSS custom-property overrides for message bubble components. */
7
+ export interface MessageBubbleColors {
8
+ /** Background color of the user message bubble. */
9
+ userBackground?: string;
10
+ /** Text color applied to all message bubbles. */
11
+ text?: string;
12
+ /** Border color of the divider line above quick-reply starter buttons. Falls back to `--color-secondary` when omitted. */
13
+ startersDivider?: string;
14
+ }
15
+ /** Typography overrides for message bubble components. */
16
+ export interface MessageBubbleTypography {
17
+ /** Tailwind (or custom) class applied to message text — takes precedence over the individual font properties below. */
18
+ fontClassName?: string;
19
+ /** Font family of message text (CSS value, e.g. `"'Inter', sans-serif"`). Ignored when `fontClassName` is set. */
20
+ fontFamily?: string;
21
+ /** Font size of message text (CSS value, e.g. `'16px'`). Ignored when `fontClassName` is set. */
22
+ fontSize?: string;
23
+ /** Font weight of message text. Ignored when `fontClassName` is set. */
24
+ fontWeight?: string | number;
25
+ /** Line height of message text (CSS value, e.g. `'1.5'`). Ignored when `fontClassName` is set. */
26
+ lineHeight?: string;
27
+ }
28
+ /** Combined style overrides (colors and typography) for message bubble components. */
29
+ export interface MessageBubbleStyles {
30
+ /** Color overrides applied as CSS custom properties. */
31
+ colors?: MessageBubbleColors;
32
+ /** Typography overrides applied via CSS custom properties. */
33
+ typography?: MessageBubbleTypography;
34
+ }
35
+ /** Shared props for user and assistant message bubble components. */
36
+ interface BaseMessageBubbleProps {
37
+ /** Plain-text (or Markdown) content of the message. */
38
+ text: string;
39
+ /** Extra class name(s) merged onto the outer row wrapper. */
40
+ className?: string;
41
+ /** Extra class name(s) merged onto the bubble element itself. */
42
+ bubbleClassName?: string;
43
+ /** Color and typography overrides applied as CSS custom properties. */
44
+ styles?: MessageBubbleStyles;
45
+ /** Props forwarded to the `MessageActions` bar rendered below the bubble. */
46
+ actions?: MessageActionsProps;
47
+ /** When `true`, the actions bar is always visible instead of appearing only on group hover. */
48
+ hasAlwaysVisibleActions?: boolean;
49
+ /** When `true`, assistant markdown text reveals newly appended content smoothly. */
50
+ isStreaming?: boolean;
51
+ /** Display attachments associated with the message. Rendered above text for user messages and below text for assistant messages. */
52
+ attachments?: DisplayAttachment[];
53
+ }
54
+ /** Props accepted by the `UserMessageBubble` component. */
55
+ export interface UserMessageBubbleProps extends BaseMessageBubbleProps {
56
+ /** Position within a message group — controls which corner is rounded. Defaults to `BubblePosition.Bottom`. */
57
+ position?: BubblePosition;
58
+ /** Maximum number of text lines shown while a long user message is collapsed. Defaults to `10`. */
59
+ collapsedLineCount?: number;
60
+ /** Button label shown when a collapsed user message can be expanded. Defaults to `"Show more"`. */
61
+ showMoreLabel?: string;
62
+ /** Button label shown when an expanded user message can be collapsed. Defaults to `"Show less"`. */
63
+ showLessLabel?: string;
64
+ /** Accessible label for the expand button. Defaults to the `showMoreLabel` value. */
65
+ showMoreAriaLabel?: string;
66
+ /** Accessible label for the collapse button. Defaults to the `showLessLabel` value. */
67
+ showLessAriaLabel?: string;
68
+ /** Called when the user clicks an attachment card. Passed through to `AttachmentTray`. */
69
+ onAttachmentClick?: (attachment: DisplayAttachment) => void;
70
+ /** Accessible label forwarded to each attachment card's root when it is interactive. */
71
+ attachmentClickLabel?: string;
72
+ }
73
+ /** Props accepted by the `AssistantMessageBubble` component. */
74
+ export interface AssistantMessageBubbleProps extends BaseMessageBubbleProps {
75
+ /** Called when the user clicks an attachment card in the assistant bubble's tray. */
76
+ onAttachmentClick?: (attachment: DisplayAttachment) => void;
77
+ /** Accessible label forwarded to each attachment card's root when it is interactive. */
78
+ attachmentClickLabel?: string;
79
+ /**
80
+ * react-markdown component overrides merged on top of the built-in map.
81
+ * Pass a custom `p` (or other element) renderer here to inject React nodes
82
+ * — such as citation markers — into specific markdown elements.
83
+ */
84
+ markdownComponents?: Components;
85
+ /**
86
+ * Quick-reply buttons derived from the assistant message's `form_schema`.
87
+ * Rendered below the message text when the array is non-empty.
88
+ */
89
+ starters?: StarterOption[];
90
+ /** Called with the selected `StarterOption` when a quick-reply button is clicked. */
91
+ onSelectStarter?: (starter: StarterOption) => void;
92
+ /** Accessible label for the quick-reply buttons list. Defaults to `"Quick reply buttons"`. */
93
+ startersAriaLabel?: string;
94
+ /** Content rendered between the message body and the actions bar (e.g. a stages panel). */
95
+ afterContent?: ReactNode;
96
+ /**
97
+ * Resolved URL for the deployment icon shown in the message header.
98
+ * When absent (e.g. legacy messages without a stored `deploymentId`), no icon is rendered.
99
+ */
100
+ deploymentIconUrl?: string;
101
+ /** Human-readable deployment name shown as the icon's accessible label. */
102
+ deploymentDisplayName?: string;
103
+ /**
104
+ * Label shown with a shimmer animation while `isStreaming` is true and the message text is still empty.
105
+ * Pass a translated string from the consuming app. Defaults to `'Thinking'`.
106
+ */
107
+ thinkingLabel?: string;
108
+ /** Accessible label for the copy button in code blocks. Forwarded to `MDMessageViewer`. */
109
+ codeBlockCopyLabel?: string;
110
+ /** Accessible label for the copy button after copying. Forwarded to `MDMessageViewer`. */
111
+ codeBlockCopiedLabel?: string;
112
+ /** Syntax highlight color theme for code blocks. Forwarded to `MDMessageViewer`. Defaults to `'dark'`. */
113
+ codeBlockTheme?: CodeBlockTheme;
114
+ }
115
+ /** Props accepted by the `MessageBubble` role-switching wrapper. */
116
+ export interface MessageBubbleProps extends BaseMessageBubbleProps {
117
+ /** Whether the message was authored by the user or the assistant. */
118
+ role: MessageRole;
119
+ /** Position within a message group — controls which corner is rounded (user messages only). Defaults to `BubblePosition.Bottom`. */
120
+ position?: BubblePosition;
121
+ /** Maximum number of text lines shown while a long user message is collapsed. Forwarded to `UserMessageBubble`; ignored for assistant messages. */
122
+ collapsedLineCount?: number;
123
+ /** Button label shown when a collapsed user message can be expanded. Forwarded to `UserMessageBubble`; ignored for assistant messages. */
124
+ showMoreLabel?: string;
125
+ /** Button label shown when an expanded user message can be collapsed. Forwarded to `UserMessageBubble`; ignored for assistant messages. */
126
+ showLessLabel?: string;
127
+ /** Accessible label for the expand button. Forwarded to `UserMessageBubble`; ignored for assistant messages. */
128
+ showMoreAriaLabel?: string;
129
+ /** Accessible label for the collapse button. Forwarded to `UserMessageBubble`; ignored for assistant messages. */
130
+ showLessAriaLabel?: string;
131
+ /**
132
+ * Quick-reply buttons derived from the assistant message's `form_schema`.
133
+ * Forwarded to `AssistantMessageBubble`; ignored for user messages.
134
+ */
135
+ starters?: StarterOption[];
136
+ /** Called with the selected `StarterOption` when a quick-reply button is clicked. Forwarded to `AssistantMessageBubble`. */
137
+ onSelectStarter?: (starter: StarterOption) => void;
138
+ /** Accessible label for the quick-reply buttons list. Forwarded to `AssistantMessageBubble`; ignored for user messages. */
139
+ startersAriaLabel?: string;
140
+ /** Content rendered between the message body and the actions bar. Forwarded to `AssistantMessageBubble`; ignored for user messages. */
141
+ afterContent?: ReactNode;
142
+ /**
143
+ * Resolved deployment icon URL. Forwarded to `AssistantMessageBubble` when role is `Assistant`;
144
+ * used to render the `StatusMessageBubble` icon when role is `Status`.
145
+ * Omitted for legacy messages that pre-date this feature.
146
+ */
147
+ deploymentIconUrl?: string;
148
+ /** Human-readable deployment name. Forwarded to `AssistantMessageBubble`; used in status message text when role is `Status`. */
149
+ deploymentDisplayName?: string;
150
+ /**
151
+ * Bold prefix text for the status message banner.
152
+ * Only used when `role === MessageRole.Status`. Defaults to `"Model switched."`.
153
+ */
154
+ statusTitleText?: string;
155
+ /**
156
+ * Full description text for the status message banner, e.g. "The model has been switched from GPT to Imagen."
157
+ * Required when `role === MessageRole.Status`.
158
+ */
159
+ statusBodyText?: string;
160
+ /**
161
+ * Label shown with a shimmer animation while `isStreaming` is true and the message text is still empty.
162
+ * Forwarded to `AssistantMessageBubble`. Defaults to `'Thinking'`.
163
+ */
164
+ thinkingLabel?: string;
165
+ /**
166
+ * react-markdown component overrides forwarded to `AssistantMessageBubble`.
167
+ * Ignored for user and status messages.
168
+ */
169
+ markdownComponents?: Components;
170
+ /** Accessible label for the copy button in code blocks. Forwarded to `AssistantMessageBubble`. */
171
+ codeBlockCopyLabel?: string;
172
+ /** Accessible label for the copy button after copying. Forwarded to `AssistantMessageBubble`. */
173
+ codeBlockCopiedLabel?: string;
174
+ /** Syntax highlight color theme for code blocks. Forwarded to `AssistantMessageBubble`. Defaults to `'dark'`. */
175
+ codeBlockTheme?: CodeBlockTheme;
176
+ /** Called when the user clicks an attachment card. Forwarded to both `UserMessageBubble` and `AssistantMessageBubble`. */
177
+ onAttachmentClick?: (attachment: DisplayAttachment) => void;
178
+ /** Accessible label forwarded to each attachment card's root when it is interactive. Forwarded to both `UserMessageBubble` and `AssistantMessageBubble`. */
179
+ attachmentClickLabel?: string;
180
+ }
181
+ export {};
182
+ //# sourceMappingURL=MessageBubble.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessageBubble.d.ts","sourceRoot":"","sources":["../../src/models/MessageBubble.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EACjB,WAAW,EACX,aAAa,EACd,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,mEAAmE;AACnE,MAAM,WAAW,mBAAmB;IAClC,mDAAmD;IACnD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iDAAiD;IACjD,IAAI,CAAC,EAA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ceColors {
3
+ /** Button background color in the default state. */
4
+ background?: string;
5
+ /** Button border color in the default state. */
6
+ border?: string;
7
+ /** Label text color. */
8
+ text?: string;
9
+ /** Button background color on hover and active. */
10
+ backgroundHover?: string;
11
+ /** Button border color on hover and active. */
12
+ borderHover?: string;
13
+ }
14
+ /** Typography overrides for the `MessageSource` component. */
15
+ export interface MessageSourceTypography {
16
+ /** Tailwind (or custom) class applied to the button — takes precedence over the individual font properties below. */
17
+ fontClassName?: string;
18
+ /** Font size of the label (CSS value, e.g. `'10px'`). Ignored when `fontClassName` is set. */
19
+ fontSize?: string;
20
+ /** Font weight of the label. Ignored when `fontClassName` is set. */
21
+ fontWeight?: string | number;
22
+ /** Line height of the label (CSS value, e.g. `'0.75rem'`). Ignored when `fontClassName` is set. */
23
+ lineHeight?: string;
24
+ }
25
+ /** Combined style overrides (colors and typography) for the `MessageSource` component. */
26
+ export interface MessageSourceStyles {
27
+ /** Color overrides applied as CSS custom properties. */
28
+ colors?: MessageSourceColors;
29
+ /** Typography overrides applied via CSS custom properties. */
30
+ typography?: MessageSourceTypography;
31
+ }
32
+ /** Props accepted by the `MessageSource` component. */
33
+ export interface MessageSourceProps {
34
+ /** Text label displayed inside the button. */
35
+ label: string;
36
+ /** Extra class name(s) merged onto the button element. */
37
+ className?: string;
38
+ /** Called when the user clicks the source button. */
39
+ onClick?: () => void;
40
+ /** Color and typography overrides applied as CSS custom properties. */
41
+ styles?: MessageSourceStyles;
42
+ }
43
+ //# sourceMappingURL=MessageSource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessageSource.d.ts","sourceRoot":"","sources":["../../src/models/MessageSource.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,MAAM,WAAW,mBAAmB;IAClC,oDAAoD;IACpD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gDAAgD;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wBAAwB;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,8DAA8D;AAC9D,MAAM,WAAW,uBAAuB;IACtC,qHAAqH;IACrH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,8FAA8F;IAC9F,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,mGAAmG;IACnG,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,0FAA0F;AAC1F,MAAM,WAAW,mBAAmB;IAClC,wDAAwD;IACxD,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,8DAA8D;IAC9D,UAAU,CAAC,EAAE,uBAAuB,CAAC;CACtC;AAED,uDAAuD;AACvD,MAAM,WAAW,kBAAkB;IACjC,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,uEAAuE;IACvE,MAAM,CAAC,EAAE,mBAAmB,CAAC;CAC9B"}
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "@epam/ai-dial-conversation-messages",
3
+ "version": "0.0.0-dev.0",
4
+ "license": "Apache-2.0",
5
+ "type": "module",
6
+ "main": "./index.js",
7
+ "module": "./index.js",
8
+ "types": "./index.d.ts",
9
+ "exports": {
10
+ "./package.json": "./package.json",
11
+ "./styles.css": "./style.css",
12
+ ".": {
13
+ "types": "./index.d.ts",
14
+ "import": "./index.js",
15
+ "default": "./index.js"
16
+ }
17
+ },
18
+ "peerDependencies": {
19
+ "react": "^19.0.0",
20
+ "@tabler/icons-react": "^3.0.0",
21
+ "@epam/ai-dial-ui-kit": "0.12.0-dev.21",
22
+ "@epam/ai-dial-chat-shared": "0.0.0-dev.0",
23
+ "@epam/ai-dial-conversation-input": "0.0.0-dev.0",
24
+ "react-markdown": "^10.0.0"
25
+ }
26
+ }
@@ -0,0 +1,6 @@
1
+ declare class IntersectionObserverMock {
2
+ observe(): void;
3
+ unobserve(): void;
4
+ disconnect(): void;
5
+ }
6
+ //# sourceMappingURL=test-setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-setup.d.ts","sourceRoot":"","sources":["../src/test-setup.ts"],"names":[],"mappings":"AACA,cAAM,wBAAwB;IAC5B,OAAO;IACP,SAAS;IACT,UAAU;CACX"}
@@ -0,0 +1,8 @@
1
+ /** Controls which corners of the message bubble are rounded, allowing adjacent bubbles to visually group together. */
2
+ export declare enum BubblePosition {
3
+ /** First bubble in a group — rounds the top-right corner. */
4
+ Bottom = "Bottom",
5
+ /** Subsequent bubble in a group — rounds the bottom-right corner. */
6
+ Top = "Top"
7
+ }
8
+ //# sourceMappingURL=bubble-position.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bubble-position.d.ts","sourceRoot":"","sources":["../../src/types/bubble-position.ts"],"names":[],"mappings":"AAAA,sHAAsH;AACtH,oBAAY,cAAc;IACxB,6DAA6D;IAC7D,MAAM,WAAW;IACjB,qEAAqE;IACrE,GAAG,QAAQ;CACZ"}