@epam/ai-dial-conversation-messages 1.1.0-dev.45 → 1.1.0-dev.456
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.
- package/components/MessageActions/MessageActions.d.ts.map +1 -1
- package/components/MessageBubble/AssistantMessageBubble.d.ts.map +1 -1
- package/components/MessageBubble/MessageBubble.d.ts.map +1 -1
- package/components/MessageBubble/StatusMessageBubble.d.ts +1 -5
- package/components/MessageBubble/StatusMessageBubble.d.ts.map +1 -1
- package/components/MessageBubble/UserMessageBubble.d.ts.map +1 -1
- package/hooks/useInlineStartIndent/useInlineStartIndent.d.ts +14 -0
- package/hooks/useInlineStartIndent/useInlineStartIndent.d.ts.map +1 -0
- package/index.css +1 -1
- package/index.d.ts +0 -1
- package/index.d.ts.map +1 -1
- package/index.js +274 -866
- package/models/message-actions.d.ts +31 -22
- package/models/message-actions.d.ts.map +1 -1
- package/models/message-bubble.d.ts +79 -70
- package/models/message-bubble.d.ts.map +1 -1
- package/models/message-source.d.ts +8 -8
- package/models/message-source.d.ts.map +1 -1
- package/package.json +4 -4
- package/types/bubble-position.d.ts +3 -3
- package/types/bubble-position.d.ts.map +1 -1
- package/components/MessageSource/MessageSource.d.ts +0 -5
- package/components/MessageSource/MessageSource.d.ts.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MessageRating, MessageRole } from '@epam/ai-dial-chat-shared';
|
|
2
|
-
/** Tooltip
|
|
2
|
+
/** Tooltip overrides for each action button. Omitted fields fall back to built-in defaults. */
|
|
3
3
|
export interface MessageActionTooltips {
|
|
4
4
|
/** Tooltip for the Edit button. */
|
|
5
5
|
edit?: string;
|
|
@@ -20,7 +20,7 @@ export interface MessageActionTooltips {
|
|
|
20
20
|
/** Tooltip for the Dislike button. */
|
|
21
21
|
dislike?: string;
|
|
22
22
|
}
|
|
23
|
-
/**
|
|
23
|
+
/** aria-label overrides for each action button. Omitted fields fall back to built-in English defaults. */
|
|
24
24
|
export interface MessageActionAriaLabels {
|
|
25
25
|
/** aria-label for the Edit button. */
|
|
26
26
|
editMessage?: string;
|
|
@@ -36,47 +36,56 @@ export interface MessageActionAriaLabels {
|
|
|
36
36
|
likeResponse?: string;
|
|
37
37
|
/** aria-label for the Dislike button. */
|
|
38
38
|
dislikeResponse?: string;
|
|
39
|
-
/**
|
|
39
|
+
/** aria-label for the toolbar container. */
|
|
40
40
|
actionsGroup?: string;
|
|
41
|
-
/**
|
|
41
|
+
/** Announced after copying the response text. */
|
|
42
42
|
copiedStatus?: string;
|
|
43
|
-
/**
|
|
43
|
+
/** Announced after copying the response as Markdown. */
|
|
44
44
|
copiedMarkdownStatus?: string;
|
|
45
45
|
}
|
|
46
|
-
/** Tooltip and
|
|
46
|
+
/** Tooltip and aria-label overrides for `MessageActions`. */
|
|
47
47
|
export interface MessageActionLabels {
|
|
48
|
-
/**
|
|
48
|
+
/** Tooltip overrides per button. */
|
|
49
49
|
tooltips?: MessageActionTooltips;
|
|
50
|
-
/**
|
|
50
|
+
/** aria-label overrides per button. */
|
|
51
51
|
ariaLabels?: MessageActionAriaLabels;
|
|
52
52
|
}
|
|
53
|
-
/**
|
|
53
|
+
/** Color overrides for `MessageActions`, applied as CSS custom properties with app theme fallbacks. */
|
|
54
|
+
export interface MessageActionColors {
|
|
55
|
+
/** Icon color of the active Like/Dislike button. Fallback: `--text-accent`. */
|
|
56
|
+
activeRatingText?: string;
|
|
57
|
+
}
|
|
58
|
+
/** Props for the `MessageActions` component. */
|
|
54
59
|
export interface MessageActionsProps {
|
|
55
|
-
/** Which
|
|
60
|
+
/** Which actions are shown. `'User'` = Edit/Delete; `'Agent'` = Regenerate/Copy/Like/Dislike. Defaults to `'User'`. */
|
|
56
61
|
role?: MessageRole;
|
|
57
|
-
/** Extra class
|
|
62
|
+
/** Extra class(es) on the root element. */
|
|
58
63
|
className?: string;
|
|
59
|
-
/**
|
|
64
|
+
/** Shows actions permanently instead of on group hover only. */
|
|
60
65
|
isAlwaysVisible?: boolean;
|
|
61
|
-
/**
|
|
66
|
+
/** Disables every action button in the toolbar. Defaults to `false`. */
|
|
67
|
+
isDisabled?: boolean;
|
|
68
|
+
/** Tooltip and aria-label overrides. */
|
|
62
69
|
labels?: MessageActionLabels;
|
|
63
|
-
/**
|
|
70
|
+
/** Fires on Edit click. User role only. */
|
|
64
71
|
onEdit?: () => void;
|
|
65
|
-
/**
|
|
72
|
+
/** Fires on Edit hover; useful for preloading the edit UI. User role only. */
|
|
66
73
|
onEditHover?: () => void;
|
|
67
|
-
/**
|
|
74
|
+
/** Fires on Delete click. User role only. */
|
|
68
75
|
onDelete?: () => void;
|
|
69
|
-
/**
|
|
76
|
+
/** Fires on Regenerate click. Agent role only. */
|
|
70
77
|
onRegenerate?: () => void;
|
|
71
|
-
/**
|
|
78
|
+
/** Fires on Copy click. Agent role only. */
|
|
72
79
|
onCopy?: () => void;
|
|
73
|
-
/**
|
|
80
|
+
/** Fires on Copy Markdown click. Agent role only. */
|
|
74
81
|
onCopyMarkdown?: () => void;
|
|
75
|
-
/**
|
|
82
|
+
/** Fires on Like click. Agent role only. */
|
|
76
83
|
onLike?: () => void;
|
|
77
|
-
/**
|
|
84
|
+
/** Fires on Dislike click. Agent role only. */
|
|
78
85
|
onDislike?: () => void;
|
|
79
|
-
/**
|
|
86
|
+
/** Active rating; highlights the matching Like/Dislike button when set. */
|
|
80
87
|
activeRating?: MessageRating;
|
|
88
|
+
/** Color overrides. */
|
|
89
|
+
colors?: MessageActionColors;
|
|
81
90
|
}
|
|
82
91
|
//# sourceMappingURL=message-actions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-actions.d.ts","sourceRoot":"","sources":["../../src/models/message-actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAEvE
|
|
1
|
+
{"version":3,"file":"message-actions.d.ts","sourceRoot":"","sources":["../../src/models/message-actions.ts"],"names":[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jC,uCAAuC;IACvC,UAAU,CAAC,EAAE,uBAAuB,CAAC;CACtC;AAED,uGAAuG;AACvG,MAAM,WAAW,mBAAmB;IAClC,+EAA+E;IAC/E,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,gDAAgD;AAChD,MAAM,WAAW,mBAAmB;IAClC,uHAAuH;IACvH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gEAAgE;IAChE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,wEAAwE;IACxE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wCAAwC;IACxC,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,2CAA2C;IAC3C,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,8EAA8E;IAC9E,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,kDAAkD;IAClD,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,4CAA4C;IAC5C,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,qDAAqD;IACrD,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,4CAA4C;IAC5C,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,2EAA2E;IAC3E,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,uBAAuB;IACvB,MAAM,CAAC,EAAE,mBAAmB,CAAC;CAC9B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CodeBlockTheme, DisplayAttachment, MessageRole, StarterOption } from '@epam/ai-dial-chat-shared';
|
|
1
|
+
import { CodeBlockTheme, DisplayAttachment, MarkdownRendererClassNames, MessageRole, StarterOption } from '@epam/ai-dial-chat-shared';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { Components } from 'react-markdown';
|
|
4
4
|
import { BubblePosition } from '../types/bubble-position';
|
|
@@ -9,11 +9,11 @@ export interface MessageBubbleColors {
|
|
|
9
9
|
userBackground?: string;
|
|
10
10
|
/** Border color of the user message bubble. */
|
|
11
11
|
userBorder?: string;
|
|
12
|
-
/**
|
|
12
|
+
/** Gradient start color for a collapsed user message fade-out. Defaults to transparent. */
|
|
13
13
|
fadeStart?: string;
|
|
14
14
|
/** Text color applied to all message bubbles. */
|
|
15
15
|
text?: string;
|
|
16
|
-
/**
|
|
16
|
+
/** Divider color above quick-reply buttons. Falls back to `--color-secondary`. */
|
|
17
17
|
startersDivider?: string;
|
|
18
18
|
}
|
|
19
19
|
/** Typography overrides for message bubble components. */
|
|
@@ -21,137 +21,146 @@ export interface MessageBubbleTypography {
|
|
|
21
21
|
/** Tailwind (or custom) class applied to message text. */
|
|
22
22
|
fontClassName?: string;
|
|
23
23
|
}
|
|
24
|
-
/**
|
|
24
|
+
/** Color and typography overrides for message bubble components. */
|
|
25
25
|
export interface MessageBubbleStyles {
|
|
26
26
|
/** Color overrides applied as CSS custom properties. */
|
|
27
27
|
colors?: MessageBubbleColors;
|
|
28
28
|
/** Typography overrides applied via CSS custom properties. */
|
|
29
29
|
typography?: MessageBubbleTypography;
|
|
30
|
-
/** Extra class
|
|
30
|
+
/** Extra class(es) on the row wrapper. */
|
|
31
31
|
className?: string;
|
|
32
|
-
/** Extra class
|
|
32
|
+
/** Extra class(es) on the bubble element. */
|
|
33
33
|
bubbleClassName?: string;
|
|
34
34
|
}
|
|
35
35
|
/** Localised labels for message bubble components. */
|
|
36
36
|
export interface MessageBubbleLabels {
|
|
37
|
-
/**
|
|
37
|
+
/** Expand button label. Defaults to `"Show more"`. */
|
|
38
38
|
showMoreLabel?: string;
|
|
39
|
-
/**
|
|
39
|
+
/** Collapse button label. Defaults to `"Show less"`. */
|
|
40
40
|
showLessLabel?: string;
|
|
41
|
-
/**
|
|
41
|
+
/** aria-label for the expand button. Defaults to `showMoreLabel`. */
|
|
42
42
|
showMoreAriaLabel?: string;
|
|
43
|
-
/**
|
|
43
|
+
/** aria-label for the collapse button. Defaults to `showLessLabel`. */
|
|
44
44
|
showLessAriaLabel?: string;
|
|
45
|
-
/**
|
|
45
|
+
/** aria-label for the user message group. Defaults to `"User message"`. */
|
|
46
46
|
userMessageAriaLabel?: string;
|
|
47
|
-
/**
|
|
47
|
+
/** aria-label for the assistant message group. Defaults to `"Assistant message"`. */
|
|
48
48
|
assistantMessageAriaLabel?: string;
|
|
49
|
-
/**
|
|
49
|
+
/** aria-label for interactive attachment tiles. */
|
|
50
50
|
attachmentClickLabel?: string;
|
|
51
|
-
/**
|
|
51
|
+
/** aria-label for the attachment retry button. */
|
|
52
52
|
attachmentRetryLabel?: string;
|
|
53
|
-
/**
|
|
53
|
+
/** aria-label for the attachment open-in-new-tab button. */
|
|
54
54
|
attachmentOpenInNewTabLabel?: string;
|
|
55
|
-
/**
|
|
56
|
-
* Bold prefix text for the status message banner.
|
|
57
|
-
* Only used when `role === MessageRole.Status`. Defaults to `"Model switched."`.
|
|
58
|
-
*/
|
|
55
|
+
/** Bold prefix for the status banner. Used when `role === MessageRole.Status`. Defaults to `"Model switched."`. */
|
|
59
56
|
statusTitleText?: string;
|
|
60
|
-
/**
|
|
61
|
-
* Full description text for the status message banner, e.g. "The model has been switched from GPT to Imagen."
|
|
62
|
-
* Required when `role === MessageRole.Status`.
|
|
63
|
-
*/
|
|
57
|
+
/** Body text for the status banner. Required when `role === MessageRole.Status`. */
|
|
64
58
|
statusBodyText?: string;
|
|
65
59
|
}
|
|
66
60
|
/** Localised labels for the `AssistantMessageBubble` component. */
|
|
67
61
|
export interface AssistantMessageBubbleLabels extends MessageBubbleLabels {
|
|
68
|
-
/**
|
|
62
|
+
/** aria-label for the quick-reply list. Defaults to `"Quick reply buttons"`. */
|
|
69
63
|
startersAriaLabel?: string;
|
|
70
|
-
/**
|
|
71
|
-
* Label shown with a shimmer animation while `isStreaming` is true and the message text is still empty.
|
|
72
|
-
* Pass a translated string from the consuming app. Defaults to `'Thinking'`.
|
|
73
|
-
*/
|
|
64
|
+
/** Shimmer placeholder shown while streaming and message text is empty. Defaults to `'Thinking'`. */
|
|
74
65
|
thinkingLabel?: string;
|
|
75
|
-
/**
|
|
66
|
+
/** aria-label for the code block copy button. */
|
|
76
67
|
codeBlockCopyLabel?: string;
|
|
77
|
-
/**
|
|
68
|
+
/** aria-label for the code block copy button after copying. */
|
|
78
69
|
codeBlockCopiedLabel?: string;
|
|
79
|
-
/**
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
70
|
+
/** Label for copying a Markdown table as CSV. */
|
|
71
|
+
tableCopyCsvLabel?: string;
|
|
72
|
+
/** Label for copying a Markdown table as text. */
|
|
73
|
+
tableCopyTxtLabel?: string;
|
|
74
|
+
/** Label for copying a Markdown table as Markdown. */
|
|
75
|
+
tableCopyMarkdownLabel?: string;
|
|
76
|
+
/** Status announced after a Markdown table has been copied. */
|
|
77
|
+
tableCopiedLabel?: string;
|
|
78
|
+
/** Label for downloading a Markdown table as CSV. */
|
|
79
|
+
tableDownloadCsvLabel?: string;
|
|
80
|
+
/** Label for opening a Markdown table in the canvas. */
|
|
81
|
+
tableOpenInCanvasLabel?: string;
|
|
82
|
+
/** Filename used when downloading a Markdown table as CSV. */
|
|
83
|
+
tableDownloadFilename?: string;
|
|
84
|
+
/** Accessible label for a Markdown table's scrollable region. */
|
|
85
|
+
tableScrollRegionAriaLabel?: string;
|
|
86
|
+
/** Fallback aria-label for the deployment icon. Defaults to `'AI'`. */
|
|
83
87
|
deploymentIconFallbackLabel?: string;
|
|
84
88
|
}
|
|
85
89
|
/** Shared props for user and assistant message bubble components. */
|
|
86
90
|
interface BaseMessageBubbleProps {
|
|
87
|
-
/** Plain-text (or Markdown) content of the message. */
|
|
88
|
-
text
|
|
91
|
+
/** Plain-text (or Markdown) content of the message. When absent, the bubble renders for `beforeContent` alone. */
|
|
92
|
+
text?: string;
|
|
89
93
|
/** Color and typography overrides applied as CSS custom properties. */
|
|
90
94
|
styles?: MessageBubbleStyles;
|
|
91
|
-
/** Props
|
|
95
|
+
/** Props for the `MessageActions` bar below the bubble. */
|
|
92
96
|
actions?: MessageActionsProps;
|
|
93
|
-
/**
|
|
97
|
+
/** Shows the actions bar permanently instead of on group hover only. */
|
|
94
98
|
hasAlwaysVisibleActions?: boolean;
|
|
95
99
|
/** When `true`, assistant markdown text reveals newly appended content smoothly. */
|
|
96
100
|
isStreaming?: boolean;
|
|
97
|
-
/**
|
|
101
|
+
/** Attachments shown above (user) or below (assistant) the message text. */
|
|
98
102
|
attachments?: DisplayAttachment[];
|
|
99
|
-
/** Localised labels for the
|
|
103
|
+
/** Localised labels for the toggle button and attachment rows. */
|
|
100
104
|
labels?: MessageBubbleLabels;
|
|
101
|
-
/**
|
|
105
|
+
/** Fires when an attachment is clicked. */
|
|
102
106
|
onAttachmentClick?: (attachment: DisplayAttachment) => void;
|
|
103
|
-
/**
|
|
104
|
-
* Called with every currently downloadable attachment when the user
|
|
105
|
-
* activates the group's "download all" action. Passed through to
|
|
106
|
-
* `AttachmentGroup`.
|
|
107
|
-
*/
|
|
107
|
+
/** Fires with all downloadable attachments when "download all" is triggered. */
|
|
108
108
|
onDownloadAll?: (attachments: DisplayAttachment[]) => void;
|
|
109
|
-
/**
|
|
109
|
+
/** Fires when a failed attachment upload is retried. */
|
|
110
110
|
onAttachmentRetry?: (id: string) => void;
|
|
111
|
+
/** ID of the attachment currently open in the canvas panel, if any. Renders that tile's selected visual state. */
|
|
112
|
+
selectedAttachmentId?: string;
|
|
113
|
+
/**
|
|
114
|
+
* Content rendered at the inline-start of the message's first text line,
|
|
115
|
+
* which word-flows after it (e.g. a used-skill chip — inline-level content
|
|
116
|
+
* no taller than a text line). The user bubble renders it inline within
|
|
117
|
+
* the text; the assistant bubble overlays it on the first markdown block's
|
|
118
|
+
* first line, which indents past it. The user bubble renders for the slot
|
|
119
|
+
* alone even when `text` is empty; an assistant message with no text
|
|
120
|
+
* renders the slot on its own line — above the streaming placeholder while
|
|
121
|
+
* the first token has not arrived yet.
|
|
122
|
+
*/
|
|
123
|
+
beforeContent?: ReactNode;
|
|
111
124
|
}
|
|
112
|
-
/** Props
|
|
125
|
+
/** Props for `UserMessageBubble`. */
|
|
113
126
|
export interface UserMessageBubbleProps extends BaseMessageBubbleProps {
|
|
114
|
-
/**
|
|
127
|
+
/** Corner rounding position within a message group. Defaults to `BubblePosition.Bottom`. */
|
|
115
128
|
position?: BubblePosition;
|
|
116
129
|
/** Maximum number of text lines shown while a long user message is collapsed. Defaults to `10`. */
|
|
117
130
|
collapsedLineCount?: number;
|
|
118
131
|
}
|
|
119
|
-
/** Props
|
|
132
|
+
/** Props for `AssistantMessageBubble`. */
|
|
120
133
|
export interface AssistantMessageBubbleProps extends BaseMessageBubbleProps {
|
|
121
|
-
/**
|
|
122
|
-
* react-markdown component overrides merged on top of the built-in map.
|
|
123
|
-
* Pass a custom `p` (or other element) renderer here to inject React nodes
|
|
124
|
-
* — such as citation markers — into specific markdown elements.
|
|
125
|
-
*/
|
|
134
|
+
/** react-markdown component overrides. Use to inject custom renderers (e.g. citation markers) into markdown elements. */
|
|
126
135
|
markdownComponents?: Components;
|
|
136
|
+
/** Per-element markdown typography classes. Defaults to the renderer's full-size scale; pass `COMPACT_MARKDOWN_CLASS_NAMES` for the smaller body scale. */
|
|
137
|
+
markdownClassNames?: MarkdownRendererClassNames;
|
|
127
138
|
/**
|
|
128
|
-
*
|
|
129
|
-
*
|
|
139
|
+
* Rewrites markdown `href`/`src` values before they are rendered. Forwarded
|
|
140
|
+
* to `MDMessageViewer`. Hosts use this to map DIAL file ids to download URLs.
|
|
141
|
+
* Defaults to no extra rewrite.
|
|
130
142
|
*/
|
|
143
|
+
markdownUrlTransform?: (url: string) => string;
|
|
144
|
+
/** Quick-reply buttons rendered below the message text when non-empty. */
|
|
131
145
|
starters?: StarterOption[];
|
|
132
|
-
/**
|
|
146
|
+
/** Fires with the clicked `StarterOption`. */
|
|
133
147
|
onSelectStarter?: (starter: StarterOption) => void;
|
|
134
148
|
/** Content rendered between the message body and the actions bar (e.g. a stages panel). */
|
|
135
149
|
afterContent?: ReactNode;
|
|
136
|
-
/**
|
|
137
|
-
* Resolved URL for the deployment icon shown in the message header.
|
|
138
|
-
* When absent (e.g. legacy messages without a stored `deploymentId`), no icon is rendered.
|
|
139
|
-
*/
|
|
150
|
+
/** Deployment icon URL. When absent, no icon is rendered. */
|
|
140
151
|
deploymentIconUrl?: string;
|
|
141
|
-
/**
|
|
152
|
+
/** Deployment name used as the icon's accessible label. */
|
|
142
153
|
deploymentDisplayName?: string;
|
|
143
|
-
/** Syntax highlight
|
|
154
|
+
/** Syntax highlight theme for code blocks. Defaults to `'dark'`. */
|
|
144
155
|
codeBlockTheme?: CodeBlockTheme;
|
|
156
|
+
/** Opens serialized Markdown table content in the host canvas. */
|
|
157
|
+
tableOnOpenInCanvas?: (markdown: string) => void;
|
|
145
158
|
/** Localised labels for quick replies, the thinking indicator, and code block copy actions. */
|
|
146
159
|
labels?: AssistantMessageBubbleLabels;
|
|
147
160
|
}
|
|
148
|
-
/**
|
|
149
|
-
* Props accepted by the `MessageBubble` role-switching wrapper — the union of
|
|
150
|
-
* `AssistantMessageBubbleProps` (the richer variant) with the user-only
|
|
151
|
-
* `position`/`collapsedLineCount` fields, plus the discriminant `role`.
|
|
152
|
-
*/
|
|
161
|
+
/** Props for `MessageBubble` — `AssistantMessageBubbleProps` plus user-only fields and `role`. */
|
|
153
162
|
export type MessageBubbleProps = AssistantMessageBubbleProps & Pick<UserMessageBubbleProps, 'position' | 'collapsedLineCount'> & {
|
|
154
|
-
/**
|
|
163
|
+
/** Message author/type: user, assistant, or status banner. */
|
|
155
164
|
role: MessageRole;
|
|
156
165
|
};
|
|
157
166
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-bubble.d.ts","sourceRoot":"","sources":["../../src/models/message-bubble.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,mBAAmB,CAAC;AAE7D,mEAAmE;AACnE,MAAM,WAAW,mBAAmB;IAClC,mDAAmD;IACnD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,+CAA+C;IAC/C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,
|
|
1
|
+
{"version":3,"file":"message-bubble.d.ts","sourceRoot":"","sources":["../../src/models/message-bubble.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EACjB,0BAA0B,EAC1B,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,mBAAmB,CAAC;AAE7D,mEAAmE;AACnE,MAAM,WAAW,mBAAmB;IAClC,mDAAmD;IACnD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,+CAA+C;IAC/C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2FAA2F;IAC3F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kFAAkF;IAClF,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,0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** CSS custom-property overrides for `MessageSource`. */
|
|
2
2
|
export interface MessageSourceColors {
|
|
3
3
|
/** Button background color in the default state. */
|
|
4
4
|
background?: string;
|
|
@@ -11,30 +11,30 @@ export interface MessageSourceColors {
|
|
|
11
11
|
/** Button border color on hover and active. */
|
|
12
12
|
borderHover?: string;
|
|
13
13
|
}
|
|
14
|
-
/** Typography overrides for
|
|
14
|
+
/** Typography overrides for `MessageSource`. */
|
|
15
15
|
export interface MessageSourceTypography {
|
|
16
16
|
/** Tailwind (or custom) class applied to the button. */
|
|
17
17
|
fontClassName?: string;
|
|
18
18
|
}
|
|
19
|
-
/**
|
|
19
|
+
/** Color and typography overrides for `MessageSource`. */
|
|
20
20
|
export interface MessageSourceStyles {
|
|
21
21
|
/** Color overrides applied as CSS custom properties. */
|
|
22
22
|
colors?: MessageSourceColors;
|
|
23
23
|
/** Typography overrides applied via CSS custom properties. */
|
|
24
24
|
typography?: MessageSourceTypography;
|
|
25
|
-
/** Extra class
|
|
25
|
+
/** Extra class(es) on the button. */
|
|
26
26
|
className?: string;
|
|
27
27
|
}
|
|
28
|
-
/**
|
|
28
|
+
/** Localised strings for `MessageSource`. */
|
|
29
29
|
export interface MessageSourceLabels {
|
|
30
|
-
/**
|
|
30
|
+
/** Button label text. */
|
|
31
31
|
label: string;
|
|
32
32
|
}
|
|
33
|
-
/** Props
|
|
33
|
+
/** Props for the `MessageSource` component. */
|
|
34
34
|
export interface MessageSourceProps {
|
|
35
35
|
/** User-visible strings. */
|
|
36
36
|
labels: MessageSourceLabels;
|
|
37
|
-
/**
|
|
37
|
+
/** Fires on click. */
|
|
38
38
|
onClick?: () => void;
|
|
39
39
|
/** Color and typography overrides applied as CSS custom properties. */
|
|
40
40
|
styles?: MessageSourceStyles;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-source.d.ts","sourceRoot":"","sources":["../../src/models/message-source.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"message-source.d.ts","sourceRoot":"","sources":["../../src/models/message-source.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,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,gDAAgD;AAChD,MAAM,WAAW,uBAAuB;IACtC,wDAAwD;IACxD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,0DAA0D;AAC1D,MAAM,WAAW,mBAAmB;IAClC,wDAAwD;IACxD,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,8DAA8D;IAC9D,UAAU,CAAC,EAAE,uBAAuB,CAAC;IACrC,qCAAqC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,6CAA6C;AAC7C,MAAM,WAAW,mBAAmB;IAClC,yBAAyB;IACzB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,+CAA+C;AAC/C,MAAM,WAAW,kBAAkB;IACjC,4BAA4B;IAC5B,MAAM,EAAE,mBAAmB,CAAC;IAC5B,sBAAsB;IACtB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,uEAAuE;IACvE,MAAM,CAAC,EAAE,mBAAmB,CAAC;CAC9B"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-conversation-messages",
|
|
3
3
|
"description": "Message bubble components for rendering conversation history with actions and source citations",
|
|
4
|
-
"version": "1.1.0-dev.
|
|
4
|
+
"version": "1.1.0-dev.456",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"react": "^19.0.0",
|
|
21
21
|
"@tabler/icons-react": "^3.0.0",
|
|
22
|
-
"@epam/ai-dial-chat-shared": "1.1.0-dev.45",
|
|
23
|
-
"@epam/ai-dial-conversation-input": "1.1.0-dev.45",
|
|
24
22
|
"react-markdown": "^10.1.0",
|
|
25
|
-
"@epam/ai-dial-
|
|
23
|
+
"@epam/ai-dial-attachment-input": "1.1.0-dev.456",
|
|
24
|
+
"@epam/ai-dial-chat-shared": "1.1.0-dev.456",
|
|
25
|
+
"@epam/ai-dial-ui-kit": "^0.14.0-dev.15"
|
|
26
26
|
},
|
|
27
27
|
"repository": {
|
|
28
28
|
"type": "git",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/** Controls
|
|
1
|
+
/** Controls bubble corner rounding for grouping adjacent messages. */
|
|
2
2
|
export declare enum BubblePosition {
|
|
3
|
-
/** First bubble in a group
|
|
3
|
+
/** First bubble in a group; bottom-start corner is squared. */
|
|
4
4
|
Bottom = "Bottom",
|
|
5
|
-
/** Subsequent bubble in a group
|
|
5
|
+
/** Subsequent bubble in a group; top-start corner is squared. */
|
|
6
6
|
Top = "Top"
|
|
7
7
|
}
|
|
8
8
|
//# sourceMappingURL=bubble-position.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bubble-position.d.ts","sourceRoot":"","sources":["../../src/types/bubble-position.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"bubble-position.d.ts","sourceRoot":"","sources":["../../src/types/bubble-position.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,oBAAY,cAAc;IACxB,+DAA+D;IAC/D,MAAM,WAAW;IACjB,iEAAiE;IACjE,GAAG,QAAQ;CACZ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MessageSource.d.ts","sourceRoot":"","sources":["../../../src/components/MessageSource/MessageSource.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAGtE,yDAAyD;AACzD,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAiChD,CAAC"}
|