@epam/ai-dial-conversation-messages 1.1.0-dev.298 → 1.1.0-dev.299
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/index.css +1 -1
- package/index.js +125 -127
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageActions.d.ts","sourceRoot":"","sources":["../../../src/components/MessageActions/MessageActions.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MessageActions.d.ts","sourceRoot":"","sources":["../../../src/components/MessageActions/MessageActions.tsx"],"names":[],"mappings":"AAuBA,OAAO,EAAE,EAAE,EAAyB,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAKxE,kIAAkI;AAClI,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CA8LlD,CAAC"}
|
package/index.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
._activeRating_ygoee_1{color:var(--ma-active-rating-text,var(--text-accent,#1d4ed8))}.
|
|
1
|
+
._activeRating_ygoee_1{color:var(--ma-active-rating-text,var(--text-accent,#1d4ed8))}._userBubble_cq829_1{border-color:var(--cm-bubble-user-border,var(--stroke-secondary,#d1dbea));background:var(--cm-bubble-user-bg,var(--bg-layer-sunken,#eef1f7))}._collapsibleText_cq829_6{max-height:var(--cm-bubble-collapsed-height);transition:max-height .2s ease-out}._expandedText_cq829_11{max-height:var(--cm-bubble-expanded-height)}._collapsedText_cq829_15:after{content:"";pointer-events:none;background:linear-gradient(to bottom, var(--cm-bubble-fade-start,var(--shadow-xs-2,#161b2d08)), var(--cm-bubble-user-bg,var(--bg-layer-sunken,#eef1f7)));height:3rem;position:absolute;bottom:0;left:0;right:0}@media (prefers-reduced-motion:reduce){._collapsibleText_cq829_6{transition:none}}._startersDivider_cq829_26{border-color:var(--cm-starters-divider,var(--stroke-secondary,#d1dbea))}._text_cq829_30{color:var(--cm-bubble-text,var(--text-primary,#161b2d))}
|
|
2
2
|
/*$vite$:1*/
|
package/index.js
CHANGED
|
@@ -1,150 +1,148 @@
|
|
|
1
1
|
import { AttachmentType as e, CopyIconButton as t, DeploymentIcon as n, MDMessageViewer as r, MessageRating as i, MessageRole as a, buildCssVars as o, mergeClasses as s, useCollapsedText as c } from "@epam/ai-dial-chat-shared";
|
|
2
2
|
import { AttachmentGroup as l } from "@epam/ai-dial-attachment-input";
|
|
3
|
-
import { DIAL_ICON_SIZE as u,
|
|
4
|
-
import { IconChevronDown as
|
|
5
|
-
import { useCallback as
|
|
6
|
-
import { Fragment as
|
|
7
|
-
var
|
|
8
|
-
let { tooltips:
|
|
9
|
-
|
|
10
|
-
}, [
|
|
11
|
-
|
|
12
|
-
}, [
|
|
13
|
-
return /* @__PURE__ */
|
|
3
|
+
import { DIAL_ICON_SIZE as u, DIAL_KIT_ICON_STROKE as d, ElementSize as f, InfoMessageNotification as p, LinkButton as m, NeutralButton as h, ToggleIconButton as g } from "@epam/ai-dial-ui-kit";
|
|
4
|
+
import { IconChevronDown as _, IconChevronUp as v, IconMarkdown as y, IconPencilMinus as b, IconRefresh as x, IconThumbDown as S, IconThumbDownFilled as C, IconThumbUp as w, IconThumbUpFilled as T, IconTrashX as E } from "@tabler/icons-react";
|
|
5
|
+
import { useCallback as D, useId as O, useState as k } from "react";
|
|
6
|
+
import { Fragment as A, jsx as j, jsxs as M } from "react/jsx-runtime";
|
|
7
|
+
var N = { activeRating: "_activeRating_ygoee_1" }, P = 2e3, F = ({ role: e = a.User, onEdit: n, onEditHover: r, onDelete: c, onRegenerate: l, onCopy: p, onCopyMarkdown: m, onLike: h, onDislike: _, activeRating: v, isAlwaysVisible: O, className: F, labels: I, colors: L }) => {
|
|
8
|
+
let { tooltips: R, ariaLabels: z } = I ?? {}, [B, V] = k(null), [H, U] = k(""), W = o({ "--ma-active-rating-text": L?.activeRatingText }), G = D(() => {
|
|
9
|
+
p?.(), V("copy"), U(z?.copiedStatus ?? "Copied to clipboard"), setTimeout(() => V(null), P);
|
|
10
|
+
}, [p, z?.copiedStatus]), K = D(() => {
|
|
11
|
+
m?.(), V("markdown"), U(z?.copiedMarkdownStatus ?? "Copied as Markdown to clipboard"), setTimeout(() => V(null), P);
|
|
12
|
+
}, [m, z?.copiedMarkdownStatus]);
|
|
13
|
+
return /* @__PURE__ */ M("div", {
|
|
14
14
|
role: "toolbar",
|
|
15
|
-
"aria-label":
|
|
16
|
-
style:
|
|
17
|
-
className: s("flex gap-1", !
|
|
18
|
-
children: [/* @__PURE__ */
|
|
15
|
+
"aria-label": z?.actionsGroup ?? "Message actions",
|
|
16
|
+
style: W,
|
|
17
|
+
className: s("flex gap-1", !O && "opacity-0 group-hover:opacity-100", F),
|
|
18
|
+
children: [/* @__PURE__ */ j("span", {
|
|
19
19
|
role: "status",
|
|
20
20
|
"aria-live": "polite",
|
|
21
21
|
className: "sr-only",
|
|
22
|
-
children:
|
|
23
|
-
}), e === a.User ? /* @__PURE__ */
|
|
24
|
-
icon: /* @__PURE__ */
|
|
22
|
+
children: H
|
|
23
|
+
}), e === a.User ? /* @__PURE__ */ M(A, { children: [n && /* @__PURE__ */ j(g, {
|
|
24
|
+
icon: /* @__PURE__ */ j(b, {
|
|
25
25
|
size: u.SM,
|
|
26
26
|
"aria-hidden": !0,
|
|
27
|
-
stroke:
|
|
27
|
+
stroke: d
|
|
28
28
|
}),
|
|
29
|
-
size:
|
|
30
|
-
"aria-label":
|
|
31
|
-
tooltipProps: { tooltip:
|
|
29
|
+
size: f.Small,
|
|
30
|
+
"aria-label": z?.editMessage ?? "Edit message",
|
|
31
|
+
tooltipProps: { tooltip: R?.edit ?? "Edit" },
|
|
32
32
|
onClick: n,
|
|
33
33
|
onMouseEnter: r,
|
|
34
34
|
onFocus: r
|
|
35
|
-
}), c && /* @__PURE__ */
|
|
36
|
-
icon: /* @__PURE__ */
|
|
35
|
+
}), c && /* @__PURE__ */ j(g, {
|
|
36
|
+
icon: /* @__PURE__ */ j(E, {
|
|
37
37
|
size: u.SM,
|
|
38
38
|
"aria-hidden": !0,
|
|
39
|
-
stroke:
|
|
39
|
+
stroke: d
|
|
40
40
|
}),
|
|
41
|
-
size:
|
|
42
|
-
"aria-label":
|
|
43
|
-
tooltipProps: { tooltip:
|
|
41
|
+
size: f.Small,
|
|
42
|
+
"aria-label": z?.deleteMessage ?? "Delete message",
|
|
43
|
+
tooltipProps: { tooltip: R?.delete ?? "Delete" },
|
|
44
44
|
onClick: c
|
|
45
|
-
})] }) : /* @__PURE__ */
|
|
46
|
-
l && /* @__PURE__ */
|
|
47
|
-
icon: /* @__PURE__ */
|
|
45
|
+
})] }) : /* @__PURE__ */ M(A, { children: [
|
|
46
|
+
l && /* @__PURE__ */ j(g, {
|
|
47
|
+
icon: /* @__PURE__ */ j(x, {
|
|
48
48
|
size: u.SM,
|
|
49
49
|
"aria-hidden": !0,
|
|
50
|
-
stroke:
|
|
50
|
+
stroke: d
|
|
51
51
|
}),
|
|
52
|
-
size:
|
|
53
|
-
"aria-label":
|
|
54
|
-
tooltipProps: { tooltip:
|
|
52
|
+
size: f.Small,
|
|
53
|
+
"aria-label": z?.regenerateResponse ?? "Regenerate response",
|
|
54
|
+
tooltipProps: { tooltip: R?.regenerate ?? "Regenerate" },
|
|
55
55
|
onClick: l
|
|
56
56
|
}),
|
|
57
|
-
|
|
57
|
+
p && /* @__PURE__ */ j(t, {
|
|
58
58
|
iconSize: u.SM,
|
|
59
|
-
onClick:
|
|
60
|
-
size:
|
|
61
|
-
isCopied:
|
|
62
|
-
copyLabel:
|
|
63
|
-
copiedLabel:
|
|
64
|
-
ariaLabel:
|
|
59
|
+
onClick: G,
|
|
60
|
+
size: f.Small,
|
|
61
|
+
isCopied: B === "copy",
|
|
62
|
+
copyLabel: R?.copy ?? "Copy",
|
|
63
|
+
copiedLabel: R?.copied ?? "Copied!",
|
|
64
|
+
ariaLabel: z?.copyResponse ?? "Copy response"
|
|
65
65
|
}),
|
|
66
|
-
|
|
66
|
+
m && /* @__PURE__ */ j(t, {
|
|
67
67
|
iconSize: u.SM,
|
|
68
|
-
onClick:
|
|
69
|
-
size:
|
|
70
|
-
isCopied:
|
|
71
|
-
iconCopy: /* @__PURE__ */
|
|
68
|
+
onClick: K,
|
|
69
|
+
size: f.Small,
|
|
70
|
+
isCopied: B === "markdown",
|
|
71
|
+
iconCopy: /* @__PURE__ */ j(y, {
|
|
72
72
|
size: u.SM,
|
|
73
73
|
"aria-hidden": !0,
|
|
74
|
-
stroke:
|
|
74
|
+
stroke: d
|
|
75
75
|
}),
|
|
76
|
-
copyLabel:
|
|
77
|
-
copiedLabel:
|
|
78
|
-
ariaLabel:
|
|
76
|
+
copyLabel: R?.copyMarkdown ?? "Copy as Markdown",
|
|
77
|
+
copiedLabel: R?.copiedMarkdown ?? "Copied!",
|
|
78
|
+
ariaLabel: z?.copyAsMarkdown ?? "Copy as markdown"
|
|
79
79
|
}),
|
|
80
|
-
|
|
81
|
-
icon:
|
|
82
|
-
className:
|
|
80
|
+
h && /* @__PURE__ */ j(g, {
|
|
81
|
+
icon: v === i.Like ? /* @__PURE__ */ j(T, {
|
|
82
|
+
className: N.activeRating,
|
|
83
83
|
size: u.SM,
|
|
84
|
-
stroke: 1.5,
|
|
85
84
|
"aria-hidden": !0
|
|
86
|
-
}) : /* @__PURE__ */
|
|
85
|
+
}) : /* @__PURE__ */ j(w, {
|
|
87
86
|
size: u.SM,
|
|
88
87
|
"aria-hidden": !0,
|
|
89
|
-
stroke:
|
|
88
|
+
stroke: d
|
|
90
89
|
}),
|
|
91
|
-
size:
|
|
92
|
-
"aria-label":
|
|
93
|
-
"aria-pressed":
|
|
94
|
-
tooltipProps: { tooltip:
|
|
95
|
-
onClick:
|
|
90
|
+
size: f.Small,
|
|
91
|
+
"aria-label": z?.likeResponse ?? "Like response",
|
|
92
|
+
"aria-pressed": v === i.Like,
|
|
93
|
+
tooltipProps: { tooltip: R?.like ?? "Like" },
|
|
94
|
+
onClick: h
|
|
96
95
|
}),
|
|
97
|
-
|
|
98
|
-
icon:
|
|
99
|
-
className:
|
|
96
|
+
_ && /* @__PURE__ */ j(g, {
|
|
97
|
+
icon: v === i.Dislike ? /* @__PURE__ */ j(C, {
|
|
98
|
+
className: N.activeRating,
|
|
100
99
|
size: u.SM,
|
|
101
|
-
"aria-hidden": !0
|
|
102
|
-
|
|
103
|
-
}) : /* @__PURE__ */ A(x, {
|
|
100
|
+
"aria-hidden": !0
|
|
101
|
+
}) : /* @__PURE__ */ j(S, {
|
|
104
102
|
size: u.SM,
|
|
105
103
|
"aria-hidden": !0,
|
|
106
|
-
stroke:
|
|
104
|
+
stroke: d
|
|
107
105
|
}),
|
|
108
|
-
size:
|
|
109
|
-
"aria-label":
|
|
110
|
-
"aria-pressed":
|
|
111
|
-
tooltipProps: { tooltip:
|
|
112
|
-
onClick:
|
|
106
|
+
size: f.Small,
|
|
107
|
+
"aria-label": z?.dislikeResponse ?? "Dislike response",
|
|
108
|
+
"aria-pressed": v === i.Dislike,
|
|
109
|
+
tooltipProps: { tooltip: R?.dislike ?? "Dislike" },
|
|
110
|
+
onClick: _
|
|
113
111
|
})
|
|
114
112
|
] })]
|
|
115
113
|
});
|
|
116
|
-
},
|
|
117
|
-
userBubble: "
|
|
118
|
-
collapsibleText: "
|
|
119
|
-
expandedText: "
|
|
120
|
-
collapsedText: "
|
|
121
|
-
startersDivider: "
|
|
122
|
-
text: "
|
|
123
|
-
},
|
|
124
|
-
let { colors: D, typography: O, className: k, bubbleClassName:
|
|
114
|
+
}, I = {
|
|
115
|
+
userBubble: "_userBubble_cq829_1",
|
|
116
|
+
collapsibleText: "_collapsibleText_cq829_6",
|
|
117
|
+
expandedText: "_expandedText_cq829_11",
|
|
118
|
+
collapsedText: "_collapsedText_cq829_15",
|
|
119
|
+
startersDivider: "_startersDivider_cq829_26",
|
|
120
|
+
text: "_text_cq829_30"
|
|
121
|
+
}, L = ({ text: t, styles: i, actions: c, hasAlwaysVisibleActions: u, isStreaming: d, attachments: f, afterContent: p, starters: m, onSelectStarter: g, deploymentIconUrl: _, deploymentDisplayName: v, markdownComponents: y, markdownClassNames: b, onAttachmentClick: x, onDownloadAll: S, onAttachmentRetry: C, codeBlockTheme: w, labels: T, selectedAttachmentId: E }) => {
|
|
122
|
+
let { colors: D, typography: O, className: k, bubbleClassName: A } = i ?? {}, { attachmentClickLabel: N, attachmentRetryLabel: P, attachmentOpenInNewTabLabel: L, startersAriaLabel: R = "Quick reply buttons", thinkingLabel: z, codeBlockCopyLabel: B, codeBlockCopiedLabel: V, assistantMessageAriaLabel: H = "Assistant message", deploymentIconFallbackLabel: U = "AI" } = T ?? {}, W = d ? (f ?? []).filter((t) => t.type !== e.Audio) : f ?? [], G = o({
|
|
125
123
|
"--cm-bubble-text": D?.text,
|
|
126
124
|
"--cm-starters-divider": D?.startersDivider
|
|
127
|
-
}), K = s(
|
|
128
|
-
return /* @__PURE__ */
|
|
125
|
+
}), K = s(I.text, O?.fontClassName), q = !!(_ || v);
|
|
126
|
+
return /* @__PURE__ */ M("div", {
|
|
129
127
|
role: "group",
|
|
130
128
|
"aria-label": H,
|
|
131
129
|
style: G,
|
|
132
130
|
className: s("flex w-full items-start gap-3", k),
|
|
133
|
-
children: [q && /* @__PURE__ */
|
|
131
|
+
children: [q && /* @__PURE__ */ j(n, {
|
|
134
132
|
src: _,
|
|
135
133
|
size: 28,
|
|
136
134
|
initialsName: v || U,
|
|
137
135
|
labels: { tooltip: v ?? U }
|
|
138
|
-
}), /* @__PURE__ */
|
|
136
|
+
}), /* @__PURE__ */ M("div", {
|
|
139
137
|
className: "flex w-full min-w-0 max-w-full flex-col items-start gap-5",
|
|
140
|
-
children: [/* @__PURE__ */
|
|
141
|
-
className: s("flex w-full min-w-0 max-w-full flex-col items-start gap-4",
|
|
138
|
+
children: [/* @__PURE__ */ M("div", {
|
|
139
|
+
className: s("flex w-full min-w-0 max-w-full flex-col items-start gap-4", A),
|
|
142
140
|
children: [
|
|
143
|
-
(t || d) && /* @__PURE__ */
|
|
141
|
+
(t || d) && /* @__PURE__ */ j("div", {
|
|
144
142
|
"aria-live": "polite",
|
|
145
143
|
"aria-atomic": "false",
|
|
146
144
|
className: s(K, "min-w-0 max-w-full text-start"),
|
|
147
|
-
children: /* @__PURE__ */
|
|
145
|
+
children: /* @__PURE__ */ j(r, {
|
|
148
146
|
content: t,
|
|
149
147
|
isStreaming: d,
|
|
150
148
|
thinkingLabel: z,
|
|
@@ -155,33 +153,33 @@ var M = { activeRating: "_activeRating_ygoee_1" }, N = 2e3, P = ({ role: e = a.U
|
|
|
155
153
|
codeBlockTheme: w
|
|
156
154
|
})
|
|
157
155
|
}),
|
|
158
|
-
/* @__PURE__ */
|
|
156
|
+
/* @__PURE__ */ j(l, {
|
|
159
157
|
attachments: W,
|
|
160
158
|
onAttachmentClick: (e) => x?.(f?.find((t) => t.id === e)),
|
|
161
159
|
onDownloadAll: S,
|
|
162
160
|
onRetry: C,
|
|
163
161
|
labels: {
|
|
164
162
|
clickLabel: N,
|
|
165
|
-
retryLabel:
|
|
163
|
+
retryLabel: P,
|
|
166
164
|
openInNewTabLabel: L
|
|
167
165
|
},
|
|
168
166
|
selectedAttachmentId: E
|
|
169
167
|
}),
|
|
170
168
|
p,
|
|
171
|
-
/* @__PURE__ */
|
|
169
|
+
/* @__PURE__ */ j(F, {
|
|
172
170
|
...c,
|
|
173
171
|
isAlwaysVisible: u,
|
|
174
172
|
role: a.Assistant
|
|
175
173
|
})
|
|
176
174
|
]
|
|
177
|
-
}),
|
|
175
|
+
}), m && m.length > 0 && g && /* @__PURE__ */ j("div", {
|
|
178
176
|
role: "list",
|
|
179
177
|
"aria-label": R,
|
|
180
|
-
className: s("flex w-full flex-wrap gap-2 border-t pt-5",
|
|
181
|
-
children:
|
|
178
|
+
className: s("flex w-full flex-wrap gap-2 border-t pt-5", I.startersDivider),
|
|
179
|
+
children: m.map((e, t) => /* @__PURE__ */ j("div", {
|
|
182
180
|
role: "listitem",
|
|
183
181
|
className: "min-w-[40px]",
|
|
184
|
-
children: /* @__PURE__ */
|
|
182
|
+
children: /* @__PURE__ */ j(h, {
|
|
185
183
|
label: e.title,
|
|
186
184
|
className: "min-w-[40px]",
|
|
187
185
|
onClick: () => g(e)
|
|
@@ -190,20 +188,20 @@ var M = { activeRating: "_activeRating_ygoee_1" }, N = 2e3, P = ({ role: e = a.U
|
|
|
190
188
|
})]
|
|
191
189
|
})]
|
|
192
190
|
});
|
|
193
|
-
},
|
|
191
|
+
}, R = ({ labels: { titleText: e = "Model switched.", bodyText: t } }) => /* @__PURE__ */ j("div", {
|
|
194
192
|
role: "status",
|
|
195
193
|
"aria-live": "polite",
|
|
196
|
-
children: /* @__PURE__ */
|
|
194
|
+
children: /* @__PURE__ */ j(p, {
|
|
197
195
|
title: e,
|
|
198
196
|
message: t,
|
|
199
197
|
textClassName: "flex-row flex-wrap gap-1"
|
|
200
198
|
})
|
|
201
|
-
}),
|
|
199
|
+
}), z = /* @__PURE__ */ function(e) {
|
|
202
200
|
return e.Bottom = "Bottom", e.Top = "Top", e;
|
|
203
|
-
}({}),
|
|
204
|
-
let { colors: S, typography: C, className: w, bubbleClassName: T } = n ?? {}, { showMoreLabel: E = "Show more", showLessLabel:
|
|
201
|
+
}({}), B = 10, V = ({ text: e, position: t = z.Bottom, styles: n, actions: r, hasAlwaysVisibleActions: i, attachments: d, collapsedLineCount: p = B, labels: h, onAttachmentClick: g, onDownloadAll: y, onAttachmentRetry: b, selectedAttachmentId: x }) => {
|
|
202
|
+
let { colors: S, typography: C, className: w, bubbleClassName: T } = n ?? {}, { showMoreLabel: E = "Show more", showLessLabel: D = "Show less", showMoreAriaLabel: k, showLessAriaLabel: N, attachmentClickLabel: P, attachmentRetryLabel: L, attachmentOpenInNewTabLabel: R, userMessageAriaLabel: V = "User message" } = h ?? {}, { textRef: H, isTextCollapsed: U, isOverflowing: W, collapsedMaxHeight: G, expandedMaxHeight: K, isCollapsed: q, toggleCollapsed: J } = c({
|
|
205
203
|
text: e,
|
|
206
|
-
collapsedLineCount:
|
|
204
|
+
collapsedLineCount: p
|
|
207
205
|
}), Y = o({
|
|
208
206
|
"--cm-bubble-user-bg": S?.userBackground,
|
|
209
207
|
"--cm-bubble-user-border": S?.userBorder,
|
|
@@ -211,43 +209,43 @@ var M = { activeRating: "_activeRating_ygoee_1" }, N = 2e3, P = ({ role: e = a.U
|
|
|
211
209
|
"--cm-bubble-text": S?.text,
|
|
212
210
|
"--cm-bubble-collapsed-height": W ? `${G}px` : void 0,
|
|
213
211
|
"--cm-bubble-expanded-height": W ? `${K}px` : void 0
|
|
214
|
-
}), X = t ===
|
|
215
|
-
return /* @__PURE__ */
|
|
212
|
+
}), X = t === z.Top ? "rounded-ee-md rounded-se-2xl" : "rounded-se-md rounded-ee-2xl", Z = s(I.text, C?.fontClassName), Q = k ?? E, ee = N ?? D, te = q ? E : D, ne = q ? Q : ee, re = q ? _ : v, $ = O();
|
|
213
|
+
return /* @__PURE__ */ j("div", {
|
|
216
214
|
role: "group",
|
|
217
215
|
"aria-label": V,
|
|
218
216
|
style: Y,
|
|
219
217
|
className: s("flex w-full", w),
|
|
220
|
-
children: /* @__PURE__ */
|
|
218
|
+
children: /* @__PURE__ */ M("div", {
|
|
221
219
|
className: "ms-auto flex w-fit min-w-0 max-w-full flex-col items-end gap-4",
|
|
222
220
|
children: [
|
|
223
|
-
/* @__PURE__ */
|
|
224
|
-
attachments:
|
|
225
|
-
onAttachmentClick: (e) =>
|
|
221
|
+
/* @__PURE__ */ j(l, {
|
|
222
|
+
attachments: d ?? [],
|
|
223
|
+
onAttachmentClick: (e) => g?.(d?.find((t) => t.id === e)),
|
|
226
224
|
onDownloadAll: y,
|
|
227
225
|
onRetry: b,
|
|
228
226
|
labels: {
|
|
229
|
-
clickLabel:
|
|
227
|
+
clickLabel: P,
|
|
230
228
|
retryLabel: L,
|
|
231
|
-
openInNewTabLabel:
|
|
229
|
+
openInNewTabLabel: R
|
|
232
230
|
},
|
|
233
231
|
styles: { className: "max-w-[640px]" },
|
|
234
232
|
selectedAttachmentId: x
|
|
235
233
|
}),
|
|
236
|
-
e && /* @__PURE__ */
|
|
237
|
-
className: s(
|
|
238
|
-
children: /* @__PURE__ */
|
|
234
|
+
e && /* @__PURE__ */ j("div", {
|
|
235
|
+
className: s(I.userBubble, "flex w-fit items-center justify-end rounded-es-2xl rounded-ss-2xl border px-6 py-4", X, T),
|
|
236
|
+
children: /* @__PURE__ */ M("div", {
|
|
239
237
|
className: "flex min-w-0 flex-col items-start",
|
|
240
|
-
children: [/* @__PURE__ */
|
|
238
|
+
children: [/* @__PURE__ */ j("div", {
|
|
241
239
|
id: $,
|
|
242
|
-
className: s("relative overflow-hidden", W &&
|
|
243
|
-
children: /* @__PURE__ */
|
|
240
|
+
className: s("relative overflow-hidden", W && I.collapsibleText, W && !q && I.expandedText, U && I.collapsedText),
|
|
241
|
+
children: /* @__PURE__ */ j("p", {
|
|
244
242
|
ref: H,
|
|
245
243
|
className: s(Z, "whitespace-pre-wrap text-start [overflow-wrap:anywhere]"),
|
|
246
244
|
children: e
|
|
247
245
|
})
|
|
248
|
-
}), W && /* @__PURE__ */
|
|
249
|
-
label: /* @__PURE__ */ A
|
|
250
|
-
iconBefore: /* @__PURE__ */
|
|
246
|
+
}), W && /* @__PURE__ */ j(m, {
|
|
247
|
+
label: /* @__PURE__ */ j(A, { children: te }),
|
|
248
|
+
iconBefore: /* @__PURE__ */ j(re, {
|
|
251
249
|
size: u.SM,
|
|
252
250
|
"aria-hidden": "true"
|
|
253
251
|
}),
|
|
@@ -256,11 +254,11 @@ var M = { activeRating: "_activeRating_ygoee_1" }, N = 2e3, P = ({ role: e = a.U
|
|
|
256
254
|
"aria-controls": $,
|
|
257
255
|
className: "mt-3",
|
|
258
256
|
onClick: J,
|
|
259
|
-
size:
|
|
257
|
+
size: f.Small
|
|
260
258
|
})]
|
|
261
259
|
})
|
|
262
260
|
}),
|
|
263
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ j(F, {
|
|
264
262
|
...r,
|
|
265
263
|
isAlwaysVisible: i,
|
|
266
264
|
role: a.User
|
|
@@ -268,16 +266,16 @@ var M = { activeRating: "_activeRating_ygoee_1" }, N = 2e3, P = ({ role: e = a.U
|
|
|
268
266
|
]
|
|
269
267
|
})
|
|
270
268
|
});
|
|
271
|
-
},
|
|
269
|
+
}, H = ({ role: e, onAttachmentClick: t, markdownComponents: n, ...r }) => e === a.Status ? /* @__PURE__ */ j(R, { labels: {
|
|
272
270
|
titleText: r.labels?.statusTitleText,
|
|
273
271
|
bodyText: r.labels?.statusBodyText ?? ""
|
|
274
|
-
} }) : e === a.User ? /* @__PURE__ */
|
|
272
|
+
} }) : e === a.User ? /* @__PURE__ */ j(V, {
|
|
275
273
|
...r,
|
|
276
274
|
onAttachmentClick: t
|
|
277
|
-
}) : /* @__PURE__ */
|
|
275
|
+
}) : /* @__PURE__ */ j(L, {
|
|
278
276
|
...r,
|
|
279
277
|
markdownComponents: n,
|
|
280
278
|
onAttachmentClick: t
|
|
281
279
|
});
|
|
282
280
|
//#endregion
|
|
283
|
-
export {
|
|
281
|
+
export { L as AssistantMessageBubble, z as BubblePosition, F as MessageActions, H as MessageBubble, R as StatusMessageBubble, V as UserMessageBubble };
|
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.299",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"react": "^19.0.0",
|
|
21
21
|
"@tabler/icons-react": "^3.0.0",
|
|
22
22
|
"react-markdown": "^10.1.0",
|
|
23
|
-
"@epam/ai-dial-attachment-input": "1.1.0-dev.
|
|
24
|
-
"@epam/ai-dial-chat-shared": "1.1.0-dev.
|
|
25
|
-
"@epam/ai-dial-ui-kit": "^0.14.0-dev.
|
|
23
|
+
"@epam/ai-dial-attachment-input": "1.1.0-dev.299",
|
|
24
|
+
"@epam/ai-dial-chat-shared": "1.1.0-dev.299",
|
|
25
|
+
"@epam/ai-dial-ui-kit": "^0.14.0-dev.15"
|
|
26
26
|
},
|
|
27
27
|
"repository": {
|
|
28
28
|
"type": "git",
|