@epam/ai-dial-conversation-messages 1.4.0-dev.96 → 1.4.0-rc.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"AssistantMessageBubble.d.ts","sourceRoot":"","sources":["../../../src/components/MessageBubble/AssistantMessageBubble.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,EAAE,EAAW,MAAM,OAAO,CAAC;AAGpC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAc/E,gHAAgH;AAChH,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,2BAA2B,CAqRlE,CAAC"}
1
+ {"version":3,"file":"AssistantMessageBubble.d.ts","sourceRoot":"","sources":["../../../src/components/MessageBubble/AssistantMessageBubble.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,EAAE,EAAW,MAAM,OAAO,CAAC;AAGpC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAc/E,gHAAgH;AAChH,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,2BAA2B,CA4RlE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"UserMessageBubble.d.ts","sourceRoot":"","sources":["../../../src/components/MessageBubble/UserMessageBubble.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,EAAE,EAAkB,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAoB1E,kGAAkG;AAClG,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAkQxD,CAAC"}
1
+ {"version":3,"file":"UserMessageBubble.d.ts","sourceRoot":"","sources":["../../../src/components/MessageBubble/UserMessageBubble.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,EAAE,EAAkB,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAoB1E,kGAAkG;AAClG,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CA8QxD,CAAC"}
package/index.js CHANGED
@@ -1,16 +1,16 @@
1
1
  import { AttachmentType as e, CopyIconButton as t, DeploymentIcon as n, MDMessageViewer as r, MessageRating as i, MessageRole as a, ResponseFormat as o, buildCssVars as s, buildInlineSegmentSource as c, createInlineSegmentComponents as l, createRehypeInlineSegments as u, mergeClasses as d, useCollapsedText as f } from "@epam/ai-dial-chat-shared";
2
2
  import { AttachmentGroup as p } from "@epam/ai-dial-attachment-input";
3
3
  import { Button as m, ButtonVariant as h, DIAL_ICON_SIZE as g, DIAL_KIT_ICON_STROKE as _, ElementSize as v, GhostIconButton as y, InfoMessageNotification as b, LinkButton as x, LiveRegion as S, LiveRegionElement as C, NeutralButton as w, Popup as T, PopupSize as E, Select as ee, Textarea as D, Tooltip as O } from "@epam/ai-dial-ui-kit";
4
- import { memo as k, useCallback as A, useEffect as j, useId as M, useLayoutEffect as N, useMemo as P, useRef as te, useState as F } from "react";
5
- import { IconArrowBackUp as I, IconChevronDown as L, IconChevronUp as ne, IconMarkdown as re, IconPencilMinus as ie, IconRefresh as ae, IconThumbDown as R, IconThumbDownFilled as oe, IconThumbUp as se, IconThumbUpFilled as ce, IconTrashX as le } from "@tabler/icons-react";
6
- import { Fragment as z, jsx as B, jsxs as V } from "react/jsx-runtime";
7
- import { createPortal as ue } from "react-dom";
4
+ import { memo as k, useCallback as A, useEffect as j, useId as M, useLayoutEffect as N, useMemo as P, useRef as F, useState as I } from "react";
5
+ import { IconArrowBackUp as L, IconChevronDown as R, IconChevronUp as te, IconMarkdown as ne, IconPencilMinus as re, IconRefresh as ie, IconThumbDown as ae, IconThumbDownFilled as z, IconThumbUp as oe, IconThumbUpFilled as se, IconTrashX as ce } from "@tabler/icons-react";
6
+ import { Fragment as B, jsx as V, jsxs as H } from "react/jsx-runtime";
7
+ import { createPortal as le } from "react-dom";
8
8
  //#region src/constants/public-class-names.ts
9
- var H = {
9
+ var U = {
10
10
  userBubble: "dial-cm-user-bubble",
11
11
  assistantContent: "dial-cm-assistant-content"
12
- }, de = 4, fe = (e) => {
13
- let t = te(null), [n, r] = F(0);
12
+ }, ue = 4, de = (e) => {
13
+ let t = F(null), [n, r] = I(0);
14
14
  return j(() => {
15
15
  if (!e) return;
16
16
  let n = t.current;
@@ -22,36 +22,36 @@ var H = {
22
22
  return i.observe(n), () => i.disconnect();
23
23
  }, [e]), {
24
24
  slotRef: t,
25
- firstLineIndent: e ? `calc(${n}px + ${de}px)` : void 0
25
+ firstLineIndent: e ? `calc(${n}px + ${ue}px)` : void 0
26
26
  };
27
- }, pe = [
27
+ }, fe = [
28
28
  "href",
29
29
  "src",
30
30
  "alt",
31
31
  "colspan",
32
32
  "rowspan",
33
33
  "start"
34
- ], me = /* @__PURE__ */ new Set([
34
+ ], pe = /* @__PURE__ */ new Set([
35
35
  "pre",
36
36
  "pre-wrap",
37
37
  "pre-line",
38
38
  "break-spaces"
39
- ]), he = (e) => {
39
+ ]), me = (e) => {
40
40
  let t = document.createElement(e.tagName.toLowerCase());
41
- pe.forEach((n) => {
41
+ fe.forEach((n) => {
42
42
  let r = e.getAttribute(n);
43
43
  r !== null && t.setAttribute(n, r);
44
44
  });
45
45
  let { whiteSpace: n } = window.getComputedStyle(e);
46
- return me.has(n) && (t.style.whiteSpace = "pre-wrap"), t;
47
- }, U = (e) => e instanceof SVGElement || window.getComputedStyle(e).display === "none", W = (e, t) => {
46
+ return pe.has(n) && (t.style.whiteSpace = "pre-wrap"), t;
47
+ }, he = (e) => e instanceof SVGElement || window.getComputedStyle(e).display === "none", W = (e, t) => {
48
48
  if (!t.intersectsNode(e)) return null;
49
49
  if (e.nodeType === Node.TEXT_NODE) {
50
50
  let n = e.data, r = e === t.startContainer ? t.startOffset : 0, i = e === t.endContainer ? t.endOffset : n.length;
51
51
  return document.createTextNode(n.slice(r, i));
52
52
  }
53
- if (!(e instanceof Element) || U(e)) return null;
54
- let n = he(e);
53
+ if (!(e instanceof Element) || he(e)) return null;
54
+ let n = me(e);
55
55
  return e.childNodes.forEach((e) => {
56
56
  let r = W(e, t);
57
57
  r && n.appendChild(r);
@@ -59,7 +59,7 @@ var H = {
59
59
  }, G = (e, t, n) => {
60
60
  let r = e, i = t;
61
61
  for (; i && i !== n && n.contains(i);) {
62
- let e = he(i);
62
+ let e = me(i);
63
63
  e.appendChild(r), r = e, i = i.parentElement;
64
64
  }
65
65
  return r;
@@ -79,42 +79,42 @@ var H = {
79
79
  i && r.appendChild(i);
80
80
  }
81
81
  e.clipboardData.setData("text/html", r.innerHTML), e.clipboardData.setData("text/plain", n), e.preventDefault();
82
- }, _e = { activeRating: "_activeRating_ygoee_1" }, ve = 2e3, ye = ({ role: e = a.User, onEdit: n, onEditHover: r, onDelete: o, onRegenerate: c, onCopy: l, onCopyMarkdown: u, onLike: f, onDislike: p, activeRating: m, isAlwaysVisible: h, leadingContent: b, trailingContent: x, isDisabled: w = !1, className: T, labels: E, colors: ee }) => {
83
- let { tooltips: D, ariaLabels: O } = E ?? {}, [k, M] = F(null), [N, P] = F(""), I = te(void 0);
84
- j(() => () => clearTimeout(I.current), []);
85
- let L = A(() => {
86
- clearTimeout(I.current), I.current = setTimeout(() => M(null), ve);
87
- }, []), ne = n != null || o != null || c != null || l != null || u != null || f != null || p != null || b != null || x != null, ue = s({ "--ma-active-rating-text": ee?.activeRatingText }), H = A(() => {
88
- l?.(), M("copy"), P(e === a.User ? O?.copiedMessageStatus ?? "Message copied to clipboard" : O?.copiedStatus ?? "Copied to clipboard"), L();
82
+ }, q = { activeRating: "_activeRating_ygoee_1" }, _e = 2e3, ve = ({ role: e = a.User, onEdit: n, onEditHover: r, onDelete: o, onRegenerate: c, onCopy: l, onCopyMarkdown: u, onLike: f, onDislike: p, activeRating: m, isAlwaysVisible: h, leadingContent: b, trailingContent: x, isDisabled: w = !1, className: T, labels: E, colors: ee }) => {
83
+ let { tooltips: D, ariaLabels: O } = E ?? {}, [k, M] = I(null), [N, P] = I(""), L = F(void 0);
84
+ j(() => () => clearTimeout(L.current), []);
85
+ let R = A(() => {
86
+ clearTimeout(L.current), L.current = setTimeout(() => M(null), _e);
87
+ }, []), te = n != null || o != null || c != null || l != null || u != null || f != null || p != null || b != null || x != null, le = s({ "--ma-active-rating-text": ee?.activeRatingText }), U = A(() => {
88
+ l?.(), M("copy"), P(e === a.User ? O?.copiedMessageStatus ?? "Message copied to clipboard" : O?.copiedStatus ?? "Copied to clipboard"), R();
89
89
  }, [
90
90
  l,
91
91
  e,
92
92
  O?.copiedStatus,
93
93
  O?.copiedMessageStatus,
94
- L
95
- ]), de = A(() => {
96
- u?.(), M("markdown"), P(O?.copiedMarkdownStatus ?? "Copied as Markdown to clipboard"), L();
94
+ R
95
+ ]), ue = A(() => {
96
+ u?.(), M("markdown"), P(O?.copiedMarkdownStatus ?? "Copied as Markdown to clipboard"), R();
97
97
  }, [
98
98
  u,
99
99
  O?.copiedMarkdownStatus,
100
- L
100
+ R
101
101
  ]);
102
- return ne ? /* @__PURE__ */ V("div", {
102
+ return te ? /* @__PURE__ */ H("div", {
103
103
  role: "toolbar",
104
104
  "aria-label": O?.actionsGroup ?? "Message actions",
105
- style: ue,
105
+ style: le,
106
106
  className: d("flex items-center gap-1", !h && "invisible group-hover:visible", T),
107
107
  children: [
108
108
  b,
109
- /* @__PURE__ */ B(S, {
109
+ /* @__PURE__ */ V(S, {
110
110
  visuallyHidden: !0,
111
111
  as: C.Span,
112
112
  children: N
113
113
  }),
114
- e === a.User ? /* @__PURE__ */ V(z, { children: [
115
- l && /* @__PURE__ */ B(t, {
114
+ e === a.User ? /* @__PURE__ */ H(B, { children: [
115
+ l && /* @__PURE__ */ V(t, {
116
116
  iconSize: g.SM,
117
- onClick: H,
117
+ onClick: U,
118
118
  size: v.Small,
119
119
  isCopied: k === "copy",
120
120
  copyLabel: D?.copyMessage ?? "Copy message",
@@ -122,8 +122,8 @@ var H = {
122
122
  ariaLabel: O?.copyMessage ?? "Copy message",
123
123
  isDisabled: w
124
124
  }),
125
- n && /* @__PURE__ */ B(y, {
126
- icon: /* @__PURE__ */ B(ie, {
125
+ n && /* @__PURE__ */ V(y, {
126
+ icon: /* @__PURE__ */ V(re, {
127
127
  size: g.SM,
128
128
  "aria-hidden": !0,
129
129
  stroke: _
@@ -136,8 +136,8 @@ var H = {
136
136
  onFocus: r,
137
137
  disabled: w
138
138
  }),
139
- o && /* @__PURE__ */ B(y, {
140
- icon: /* @__PURE__ */ B(le, {
139
+ o && /* @__PURE__ */ V(y, {
140
+ icon: /* @__PURE__ */ V(ce, {
141
141
  size: g.SM,
142
142
  "aria-hidden": !0,
143
143
  stroke: _
@@ -148,9 +148,9 @@ var H = {
148
148
  onClick: o,
149
149
  disabled: w
150
150
  })
151
- ] }) : /* @__PURE__ */ V(z, { children: [
152
- c && /* @__PURE__ */ B(y, {
153
- icon: /* @__PURE__ */ B(ae, {
151
+ ] }) : /* @__PURE__ */ H(B, { children: [
152
+ c && /* @__PURE__ */ V(y, {
153
+ icon: /* @__PURE__ */ V(ie, {
154
154
  size: g.SM,
155
155
  "aria-hidden": !0,
156
156
  stroke: _
@@ -161,9 +161,9 @@ var H = {
161
161
  onClick: c,
162
162
  disabled: w
163
163
  }),
164
- l && /* @__PURE__ */ B(t, {
164
+ l && /* @__PURE__ */ V(t, {
165
165
  iconSize: g.SM,
166
- onClick: H,
166
+ onClick: U,
167
167
  size: v.Small,
168
168
  isCopied: k === "copy",
169
169
  copyLabel: D?.copy ?? "Copy",
@@ -171,12 +171,12 @@ var H = {
171
171
  ariaLabel: O?.copyResponse ?? "Copy response",
172
172
  isDisabled: w
173
173
  }),
174
- u && /* @__PURE__ */ B(t, {
174
+ u && /* @__PURE__ */ V(t, {
175
175
  iconSize: g.SM,
176
- onClick: de,
176
+ onClick: ue,
177
177
  size: v.Small,
178
178
  isCopied: k === "markdown",
179
- iconCopy: /* @__PURE__ */ B(re, {
179
+ iconCopy: /* @__PURE__ */ V(ne, {
180
180
  size: g.SM,
181
181
  "aria-hidden": !0,
182
182
  stroke: _
@@ -186,12 +186,12 @@ var H = {
186
186
  ariaLabel: O?.copyAsMarkdown ?? "Copy as markdown",
187
187
  isDisabled: w
188
188
  }),
189
- f && /* @__PURE__ */ B(y, {
190
- icon: m === i.Like ? /* @__PURE__ */ B(ce, {
191
- className: _e.activeRating,
189
+ f && /* @__PURE__ */ V(y, {
190
+ icon: m === i.Like ? /* @__PURE__ */ V(se, {
191
+ className: q.activeRating,
192
192
  size: g.SM,
193
193
  "aria-hidden": !0
194
- }) : /* @__PURE__ */ B(se, {
194
+ }) : /* @__PURE__ */ V(oe, {
195
195
  size: g.SM,
196
196
  "aria-hidden": !0,
197
197
  stroke: _
@@ -203,12 +203,12 @@ var H = {
203
203
  onClick: f,
204
204
  disabled: w
205
205
  }),
206
- p && /* @__PURE__ */ B(y, {
207
- icon: m === i.Dislike ? /* @__PURE__ */ B(oe, {
208
- className: _e.activeRating,
206
+ p && /* @__PURE__ */ V(y, {
207
+ icon: m === i.Dislike ? /* @__PURE__ */ V(z, {
208
+ className: q.activeRating,
209
209
  size: g.SM,
210
210
  "aria-hidden": !0
211
- }) : /* @__PURE__ */ B(R, {
211
+ }) : /* @__PURE__ */ V(ae, {
212
212
  size: g.SM,
213
213
  "aria-hidden": !0,
214
214
  stroke: _
@@ -224,58 +224,58 @@ var H = {
224
224
  x
225
225
  ]
226
226
  }) : null;
227
- }, be = (e) => {
228
- let [t, n] = F(() => /* @__PURE__ */ new Date());
227
+ }, ye = (e) => {
228
+ let [t, n] = I(() => /* @__PURE__ */ new Date());
229
229
  return j(() => {
230
230
  let t = setInterval(() => n(/* @__PURE__ */ new Date()), e);
231
231
  return () => clearInterval(t);
232
232
  }, [e]), t;
233
- }, q = /* @__PURE__ */ function(e) {
233
+ }, J = /* @__PURE__ */ function(e) {
234
234
  return e.Today = "today", e.Yesterday = "yesterday", e.Absolute = "absolute", e;
235
- }({}), J = {
235
+ }({}), Y = {
236
236
  hour: "numeric",
237
237
  minute: "2-digit"
238
- }, xe = {
238
+ }, be = {
239
239
  year: "numeric",
240
240
  month: "short",
241
241
  day: "numeric",
242
- ...J
243
- }, Y = 60, X = 3600, Z = 24 * X, Q = [
242
+ ...Y
243
+ }, xe = 60, X = 3600, Z = 24 * X, Se = [
244
244
  ["year", 365 * Z],
245
245
  ["month", 30 * Z],
246
246
  ["week", 7 * Z],
247
247
  ["day", Z],
248
248
  ["hour", X],
249
- ["minute", Y]
250
- ], Se = (e, t) => e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate(), Ce = (e) => {
249
+ ["minute", xe]
250
+ ], Q = (e, t) => e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate(), Ce = (e) => {
251
251
  if (!e) return null;
252
252
  let t = new Date(e);
253
253
  return Number.isNaN(t.getTime()) ? null : t;
254
- }, we = (e, t) => new Intl.DateTimeFormat(t, xe).format(e), Te = (e, t, n) => {
254
+ }, we = (e, t) => new Intl.DateTimeFormat(t, be).format(e), Te = (e, t, n) => {
255
255
  let r = new Date(t.getFullYear(), t.getMonth(), t.getDate() - 1);
256
- return Se(e, t) ? {
257
- kind: q.Today,
258
- text: new Intl.DateTimeFormat(n, J).format(e)
259
- } : Se(e, r) ? {
260
- kind: q.Yesterday,
261
- text: new Intl.DateTimeFormat(n, J).format(e)
256
+ return Q(e, t) ? {
257
+ kind: J.Today,
258
+ text: new Intl.DateTimeFormat(n, Y).format(e)
259
+ } : Q(e, r) ? {
260
+ kind: J.Yesterday,
261
+ text: new Intl.DateTimeFormat(n, Y).format(e)
262
262
  } : {
263
- kind: q.Absolute,
263
+ kind: J.Absolute,
264
264
  text: we(e, n)
265
265
  };
266
266
  }, Ee = (e, t, n) => {
267
267
  let r = new Intl.RelativeTimeFormat(n, { numeric: "auto" }), i = (t.getTime() - e.getTime()) / 1e3;
268
- for (let [e, t] of Q) {
268
+ for (let [e, t] of Se) {
269
269
  let n = Math.floor(i / t);
270
270
  if (n >= 1) return r.format(-n, e);
271
271
  }
272
272
  return r.format(0, "second");
273
273
  }, De = { time: "_time_16pwx_2" }, Oe = 6e4, ke = "opacity-0 transition-opacity group-hover/message:opacity-100 group-focus-within/message:opacity-100 [@media(hover:none)]:opacity-100", Ae = ({ timestamp: e, locale: t, className: n = "dial-small-text" }) => {
274
- let r = be(Oe), i = Ce(e);
275
- return i == null ? null : /* @__PURE__ */ B(O, {
274
+ let r = ye(Oe), i = Ce(e);
275
+ return i == null ? null : /* @__PURE__ */ V(O, {
276
276
  tooltip: we(i, t),
277
277
  asChild: !0,
278
- children: /* @__PURE__ */ B("time", {
278
+ children: /* @__PURE__ */ V("time", {
279
279
  dateTime: e,
280
280
  tabIndex: 0,
281
281
  className: d("px-1 whitespace-nowrap", De.time, n, ke),
@@ -289,63 +289,63 @@ var H = {
289
289
  collapsedText: "_collapsedText_17fln_15",
290
290
  startersDivider: "_startersDivider_17fln_31",
291
291
  text: "_text_17fln_35"
292
- }, je = "[&>.cm-bubble-markdown>div>*:first-child]:indent-[var(--cm-bubble-first-line-indent,0px)]", Me = ({ text: t, contentRef: i, styles: c, actions: l, hasAlwaysVisibleActions: u, timestamp: f, locale: m, isStreaming: h, attachments: g, beforeContent: _, responseFormat: v, afterContent: y, hasThinkingPlaceholder: b = !0, starters: x, onSelectStarter: S, isStarterSelectionDisabled: C = !1, deploymentIconUrl: T, deploymentDisplayName: E, markdownComponents: ee, markdownClassNames: D, markdownUrlTransform: O, onAttachmentClick: k, onDownloadAll: A, isAttachmentDownloadable: j, onAttachmentRetry: M, codeBlockTheme: N, tableOnOpenInCanvas: te, labels: F, selectedAttachmentId: I }) => {
293
- let { colors: L, typography: ne, className: re, bubbleClassName: ie, timestampClassName: ae } = c ?? {}, R = f == null ? void 0 : /* @__PURE__ */ B(Ae, {
292
+ }, je = "[&>.cm-bubble-markdown>div>*:first-child]:indent-[var(--cm-bubble-first-line-indent,0px)]", Me = ({ text: t, contentRef: i, styles: c, actions: l, hasAlwaysVisibleActions: u, timestamp: f, locale: m, isStreaming: h, attachments: g, beforeContent: _, responseFormat: v, afterContent: y, hasThinkingPlaceholder: b = !0, starters: x, onSelectStarter: S, isStarterSelectionDisabled: C = !1, deploymentIconUrl: T, deploymentDisplayName: E, markdownComponents: ee, markdownClassNames: D, markdownUrlTransform: O, onAttachmentClick: k, onDownloadAll: A, isAttachmentDownloadable: j, onAttachmentRetry: M, codeBlockTheme: N, tableOnOpenInCanvas: F, labels: I, selectedAttachmentId: L }) => {
293
+ let { colors: R, typography: te, className: ne, bubbleClassName: re, timestampClassName: ie, attachmentGroupStyles: ae } = c ?? {}, z = f == null ? void 0 : /* @__PURE__ */ V(Ae, {
294
294
  timestamp: f,
295
295
  locale: m,
296
- className: ae
297
- }), { attachmentClickLabel: oe, attachmentDownloadLabel: se, attachmentRetryLabel: ce, attachmentOpenInNewTabLabel: le, startersAriaLabel: ue = "Quick reply buttons", thinkingLabel: de, codeBlockCopyLabel: pe, codeBlockCopiedLabel: me, codeBlockDownloadLabel: he, tableCopyLabel: U, tableCopiedLabel: W, tableDownloadCsvLabel: G, tableOpenInCanvasLabel: K, tableDownloadFilename: _e, tableScrollRegionAriaLabel: ve, mathScrollRegionAriaLabel: be, assistantMessageAriaLabel: q = "Assistant message", deploymentIconFallbackLabel: J = "AI" } = F ?? {}, xe = P(() => ({
298
- copyLabel: U,
299
- copiedLabel: W,
300
- downloadCsvLabel: G,
301
- openInCanvasLabel: K
296
+ className: ie
297
+ }), { attachmentClickLabel: oe, attachmentDownloadLabel: se, attachmentRetryLabel: ce, attachmentOpenInNewTabLabel: le, startersAriaLabel: ue = "Quick reply buttons", thinkingLabel: fe, codeBlockCopyLabel: pe, codeBlockCopiedLabel: me, codeBlockDownloadLabel: he, tableCopyLabel: W, tableCopiedLabel: G, tableDownloadCsvLabel: K, tableOpenInCanvasLabel: q, tableDownloadFilename: _e, tableScrollRegionAriaLabel: ye, mathScrollRegionAriaLabel: J, assistantMessageAriaLabel: Y = "Assistant message", deploymentIconFallbackLabel: be = "AI" } = I ?? {}, xe = P(() => ({
298
+ copyLabel: W,
299
+ copiedLabel: G,
300
+ downloadCsvLabel: K,
301
+ openInCanvasLabel: q
302
302
  }), [
303
- U,
304
303
  W,
305
304
  G,
306
- K
307
- ]), Y = h ? (g ?? []).filter((t) => t.type !== e.Audio) : g ?? [], X = !!t?.trim(), Z = !X && !b, { slotRef: Q, firstLineIndent: Se } = fe(_ != null && X), Ce = s({
308
- "--cm-bubble-text": L?.text,
309
- "--cm-starters-divider": L?.startersDivider,
310
- "--cm-timestamp-text": L?.timestampText,
311
- "--cm-bubble-first-line-indent": Se
312
- }), we = d($.text, ne?.fontClassName), Te = !!(T || E);
313
- return /* @__PURE__ */ V("div", {
305
+ K,
306
+ q
307
+ ]), X = h ? (g ?? []).filter((t) => t.type !== e.Audio) : g ?? [], Z = !!t?.trim(), Se = !Z && !b, { slotRef: Q, firstLineIndent: Ce } = de(_ != null && Z), we = s({
308
+ "--cm-bubble-text": R?.text,
309
+ "--cm-starters-divider": R?.startersDivider,
310
+ "--cm-timestamp-text": R?.timestampText,
311
+ "--cm-bubble-first-line-indent": Ce
312
+ }), Te = d($.text, te?.fontClassName), Ee = !!(T || E);
313
+ return /* @__PURE__ */ H("div", {
314
314
  role: "group",
315
- "aria-label": q,
316
- style: Ce,
315
+ "aria-label": Y,
316
+ style: we,
317
317
  onCopy: ge,
318
- className: d("group/message flex w-full items-start gap-3", re),
319
- children: [Te && /* @__PURE__ */ B(n, {
318
+ className: d("group/message flex w-full items-start gap-3", ne),
319
+ children: [Ee && /* @__PURE__ */ V(n, {
320
320
  src: T,
321
321
  size: 28,
322
- initialsName: E || J,
323
- labels: { tooltip: E ?? J }
324
- }), /* @__PURE__ */ V("div", {
322
+ initialsName: E || be,
323
+ labels: { tooltip: E ?? be }
324
+ }), /* @__PURE__ */ H("div", {
325
325
  className: "flex w-full max-w-full min-w-0 flex-col items-start gap-5",
326
- children: [/* @__PURE__ */ V("div", {
327
- className: d("flex w-full max-w-full min-w-0 flex-col items-start gap-4", ie),
326
+ children: [/* @__PURE__ */ H("div", {
327
+ className: d("flex w-full max-w-full min-w-0 flex-col items-start gap-4", re),
328
328
  children: [
329
- _ != null && !X && /* @__PURE__ */ B("div", {
329
+ _ != null && !Z && /* @__PURE__ */ V("div", {
330
330
  className: "min-w-0",
331
331
  children: _
332
332
  }),
333
- (X || h) && /* @__PURE__ */ V("div", {
333
+ (Z || h) && /* @__PURE__ */ H("div", {
334
334
  "aria-live": "polite",
335
335
  "aria-atomic": "false",
336
- className: d(we, Z ? "absolute" : "relative", "max-w-full min-w-0 text-start", _ != null && X && je, H.assistantContent),
337
- children: [_ != null && X && /* @__PURE__ */ B("div", {
336
+ className: d(Te, Se ? "absolute" : "relative", "max-w-full min-w-0 text-start", _ != null && Z && je, U.assistantContent),
337
+ children: [_ != null && Z && /* @__PURE__ */ V("div", {
338
338
  ref: Q,
339
339
  className: "absolute inset-s-0 top-0",
340
340
  children: _
341
- }), !Z && /* @__PURE__ */ B("div", {
341
+ }), !Se && /* @__PURE__ */ V("div", {
342
342
  ref: i,
343
343
  className: "cm-bubble-markdown max-w-full min-w-0 wrap-anywhere",
344
- children: /* @__PURE__ */ B(r, {
344
+ children: /* @__PURE__ */ V(r, {
345
345
  content: t ?? "",
346
346
  isPlainText: v === o.PlainText,
347
347
  isStreaming: h,
348
- thinkingLabel: de,
348
+ thinkingLabel: fe,
349
349
  components: ee,
350
350
  classNames: D,
351
351
  urlTransform: O,
@@ -355,14 +355,14 @@ var H = {
355
355
  codeBlockTheme: N,
356
356
  tableActionLabels: xe,
357
357
  tableDownloadFilename: _e,
358
- tableOnOpenInCanvas: te,
359
- tableScrollRegionAriaLabel: ve,
360
- mathScrollRegionAriaLabel: be
358
+ tableOnOpenInCanvas: F,
359
+ tableScrollRegionAriaLabel: ye,
360
+ mathScrollRegionAriaLabel: J
361
361
  })
362
362
  })]
363
363
  }),
364
- /* @__PURE__ */ B(p, {
365
- attachments: Y,
364
+ /* @__PURE__ */ V(p, {
365
+ attachments: X,
366
366
  onAttachmentClick: k ? (e) => {
367
367
  let t = g?.find((t) => t.id === e);
368
368
  t && k(t);
@@ -376,24 +376,25 @@ var H = {
376
376
  retryLabel: ce,
377
377
  openInNewTabLabel: le
378
378
  },
379
- selectedAttachmentId: I
379
+ styles: ae,
380
+ selectedAttachmentId: L
380
381
  }),
381
382
  y,
382
- /* @__PURE__ */ B(ye, {
383
+ /* @__PURE__ */ V(ve, {
383
384
  ...l,
384
385
  isAlwaysVisible: u,
385
- trailingContent: R == null ? l?.trailingContent : /* @__PURE__ */ V(z, { children: [l?.trailingContent, R] }),
386
+ trailingContent: z == null ? l?.trailingContent : /* @__PURE__ */ H(B, { children: [l?.trailingContent, z] }),
386
387
  role: a.Assistant
387
388
  })
388
389
  ]
389
- }), x && x.length > 0 && S && /* @__PURE__ */ B("div", {
390
+ }), x && x.length > 0 && S && /* @__PURE__ */ V("div", {
390
391
  role: "list",
391
392
  "aria-label": ue,
392
393
  className: d("flex w-full flex-wrap gap-2 border-t pt-5", $.startersDivider),
393
- children: x.map((e, t) => /* @__PURE__ */ B("div", {
394
+ children: x.map((e, t) => /* @__PURE__ */ V("div", {
394
395
  role: "listitem",
395
396
  className: "min-w-[40px]",
396
- children: /* @__PURE__ */ B(w, {
397
+ children: /* @__PURE__ */ V(w, {
397
398
  label: e.title,
398
399
  className: "min-w-[40px]",
399
400
  disabled: C,
@@ -403,39 +404,39 @@ var H = {
403
404
  })]
404
405
  })]
405
406
  });
406
- }, Ne = ({ labels: { titleText: e = "Model switched.", bodyText: t } }) => /* @__PURE__ */ B(b, {
407
+ }, Ne = ({ labels: { titleText: e = "Model switched.", bodyText: t } }) => /* @__PURE__ */ V(b, {
407
408
  title: e,
408
409
  message: t,
409
410
  textClassName: "flex-row flex-wrap gap-1"
410
411
  }), Pe = /* @__PURE__ */ function(e) {
411
412
  return e.Bottom = "Bottom", e.Top = "Top", e;
412
413
  }({}), Fe = 10, Ie = "[&>div>*:first-child]:mt-0 [&>div>*:last-child]:mb-0", Le = [], Re = ({ text: e, contentRef: t, position: n = Pe.Bottom, styles: i, actions: o, hasAlwaysVisibleActions: m, timestamp: h, locale: _, attachments: y, collapsedLineCount: b = Fe, labels: S, textSegments: C, onAttachmentClick: w, onDownloadAll: T, isAttachmentDownloadable: E, onAttachmentRetry: ee, selectedAttachmentId: D, markdownClassNames: O, markdownUrlTransform: k, codeBlockTheme: A, tableOnOpenInCanvas: j }) => {
413
- let { colors: N, typography: te, className: F, bubbleClassName: I, timestampClassName: re } = i ?? {}, ie = h == null ? void 0 : /* @__PURE__ */ B(Ae, {
414
+ let { colors: N, typography: F, className: I, bubbleClassName: L, timestampClassName: ne, attachmentGroupStyles: re } = i ?? {}, ie = h == null ? void 0 : /* @__PURE__ */ V(Ae, {
414
415
  timestamp: h,
415
416
  locale: _,
416
- className: re
417
- }), { showMoreLabel: ae = "Show more", showLessLabel: R = "Show less", showMoreAriaLabel: oe, showLessAriaLabel: se, attachmentClickLabel: ce, attachmentDownloadLabel: le, attachmentRetryLabel: ue, attachmentOpenInNewTabLabel: de, userMessageAriaLabel: fe = "User message", codeBlockCopyLabel: pe, codeBlockCopiedLabel: me, codeBlockDownloadLabel: he, tableCopyLabel: U, tableCopiedLabel: W, tableDownloadCsvLabel: G, tableOpenInCanvasLabel: K, tableDownloadFilename: _e, tableScrollRegionAriaLabel: ve, mathScrollRegionAriaLabel: be } = S ?? {}, q = P(() => ({
418
- copyLabel: U,
419
- copiedLabel: W,
420
- downloadCsvLabel: G,
421
- openInCanvasLabel: K
417
+ className: ne
418
+ }), { showMoreLabel: ae = "Show more", showLessLabel: z = "Show less", showMoreAriaLabel: oe, showLessAriaLabel: se, attachmentClickLabel: ce, attachmentDownloadLabel: le, attachmentRetryLabel: ue, attachmentOpenInNewTabLabel: de, userMessageAriaLabel: fe = "User message", codeBlockCopyLabel: pe, codeBlockCopiedLabel: me, codeBlockDownloadLabel: he, tableCopyLabel: W, tableCopiedLabel: G, tableDownloadCsvLabel: K, tableOpenInCanvasLabel: q, tableDownloadFilename: _e, tableScrollRegionAriaLabel: ye, mathScrollRegionAriaLabel: J } = S ?? {}, Y = P(() => ({
419
+ copyLabel: W,
420
+ copiedLabel: G,
421
+ downloadCsvLabel: K,
422
+ openInCanvasLabel: q
422
423
  }), [
423
- U,
424
424
  W,
425
425
  G,
426
- K
427
- ]), { textRef: J, isTextCollapsed: xe, isOverflowing: Y, collapsedMaxHeight: X, expandedMaxHeight: Z, isCollapsed: Q, toggleCollapsed: Se } = f({
426
+ K,
427
+ q
428
+ ]), { textRef: be, isTextCollapsed: xe, isOverflowing: X, collapsedMaxHeight: Z, expandedMaxHeight: Se, isCollapsed: Q, toggleCollapsed: Ce } = f({
428
429
  text: e ?? "",
429
430
  collapsedLineCount: b
430
- }), Ce = s({
431
+ }), we = s({
431
432
  "--cm-bubble-user-bg": N?.userBackground,
432
433
  "--cm-bubble-user-border": N?.userBorder,
433
434
  "--cm-bubble-fade-start": N?.fadeStart,
434
435
  "--cm-bubble-text": N?.text,
435
436
  "--cm-timestamp-text": N?.timestampText,
436
- "--cm-bubble-collapsed-height": Y ? `${X}px` : void 0,
437
- "--cm-bubble-expanded-height": Y ? `${Z}px` : void 0
438
- }), we = n === Pe.Top ? "rounded-ee-md rounded-se-2xl" : "rounded-se-md rounded-ee-2xl", Te = d($.text, te?.fontClassName), { markdownSource: Ee, segmentRehypePlugins: De, segmentComponents: Oe } = P(() => {
437
+ "--cm-bubble-collapsed-height": X ? `${Z}px` : void 0,
438
+ "--cm-bubble-expanded-height": X ? `${Se}px` : void 0
439
+ }), Te = n === Pe.Top ? "rounded-ee-md rounded-se-2xl" : "rounded-se-md rounded-ee-2xl", Ee = d($.text, F?.fontClassName), { markdownSource: De, segmentRehypePlugins: Oe, segmentComponents: ke } = P(() => {
439
440
  if (C == null) return {
440
441
  markdownSource: e ?? "",
441
442
  segmentRehypePlugins: Le,
@@ -447,17 +448,17 @@ var H = {
447
448
  segmentRehypePlugins: [u(n)],
448
449
  segmentComponents: l(n)
449
450
  };
450
- }, [e, C]), ke = oe ?? ae, je = se ?? R, Me = Q ? ae : R, Ne = Q ? ke : je, Re = Q ? L : ne, ze = M();
451
- return /* @__PURE__ */ B("div", {
451
+ }, [e, C]), je = oe ?? ae, Me = se ?? z, Ne = Q ? ae : z, Re = Q ? je : Me, ze = Q ? R : te, Be = M();
452
+ return /* @__PURE__ */ V("div", {
452
453
  role: "group",
453
454
  "aria-label": fe,
454
- style: Ce,
455
+ style: we,
455
456
  onCopy: ge,
456
- className: d("group/message flex w-full", F),
457
- children: /* @__PURE__ */ V("div", {
457
+ className: d("group/message flex w-full", I),
458
+ children: /* @__PURE__ */ H("div", {
458
459
  className: "ms-auto flex w-fit max-w-full min-w-0 flex-col items-end gap-4",
459
460
  children: [
460
- /* @__PURE__ */ B(p, {
461
+ /* @__PURE__ */ V(p, {
461
462
  attachments: y ?? [],
462
463
  onAttachmentClick: w ? (e) => {
463
464
  let t = y?.find((t) => t.id === e);
@@ -472,71 +473,74 @@ var H = {
472
473
  retryLabel: ue,
473
474
  openInNewTabLabel: de
474
475
  },
475
- styles: { className: "max-w-[640px]" },
476
+ styles: {
477
+ ...re,
478
+ className: d("max-w-[640px]", re?.className)
479
+ },
476
480
  selectedAttachmentId: D
477
481
  }),
478
- e && /* @__PURE__ */ B("div", {
479
- className: d($.userBubble, "flex w-fit max-w-full min-w-0 items-center justify-end rounded-ss-2xl rounded-es-2xl border px-6 py-4 wrap-anywhere", we, I, H.userBubble),
480
- children: /* @__PURE__ */ V("div", {
482
+ e && /* @__PURE__ */ V("div", {
483
+ className: d($.userBubble, "flex w-fit max-w-full min-w-0 items-center justify-end rounded-ss-2xl rounded-es-2xl border px-6 py-4 wrap-anywhere", Te, L, U.userBubble),
484
+ children: /* @__PURE__ */ H("div", {
481
485
  className: "flex min-w-0 flex-col items-start",
482
- children: [/* @__PURE__ */ B("div", {
483
- id: ze,
486
+ children: [/* @__PURE__ */ V("div", {
487
+ id: Be,
484
488
  ref: t,
485
- className: d("relative -ms-1 -me-1 w-[calc(100%+8px)] overflow-hidden ps-1 pe-1", Y && $.collapsibleText, Y && !Q && $.expandedText, xe && $.collapsedText),
486
- children: /* @__PURE__ */ B("div", {
487
- ref: J,
488
- className: d(Te, "max-w-full min-w-0 text-start", Ie),
489
- children: /* @__PURE__ */ B(r, {
490
- content: Ee,
489
+ className: d("relative -ms-1 -me-1 w-[calc(100%+8px)] overflow-hidden ps-1 pe-1", X && $.collapsibleText, X && !Q && $.expandedText, xe && $.collapsedText),
490
+ children: /* @__PURE__ */ V("div", {
491
+ ref: be,
492
+ className: d(Ee, "max-w-full min-w-0 text-start", Ie),
493
+ children: /* @__PURE__ */ V(r, {
494
+ content: De,
491
495
  isRawHtmlEnabled: !1,
492
- rehypePlugins: De,
493
- components: Oe,
496
+ rehypePlugins: Oe,
497
+ components: ke,
494
498
  classNames: O,
495
499
  urlTransform: k,
496
500
  codeBlockCopyLabel: pe,
497
501
  codeBlockCopiedLabel: me,
498
502
  codeBlockDownloadLabel: he,
499
503
  codeBlockTheme: A,
500
- tableActionLabels: q,
504
+ tableActionLabels: Y,
501
505
  tableDownloadFilename: _e,
502
506
  tableOnOpenInCanvas: j,
503
- tableScrollRegionAriaLabel: ve,
504
- mathScrollRegionAriaLabel: be
507
+ tableScrollRegionAriaLabel: ye,
508
+ mathScrollRegionAriaLabel: J
505
509
  })
506
510
  })
507
- }), Y && /* @__PURE__ */ B(x, {
508
- label: /* @__PURE__ */ B(z, { children: Me }),
509
- iconBefore: /* @__PURE__ */ B(Re, {
511
+ }), X && /* @__PURE__ */ V(x, {
512
+ label: /* @__PURE__ */ V(B, { children: Ne }),
513
+ iconBefore: /* @__PURE__ */ V(ze, {
510
514
  size: g.SM,
511
515
  "aria-hidden": "true"
512
516
  }),
513
- "aria-label": Ne,
517
+ "aria-label": Re,
514
518
  "aria-expanded": !Q,
515
- "aria-controls": ze,
519
+ "aria-controls": Be,
516
520
  className: "mt-3",
517
- onClick: Se,
521
+ onClick: Ce,
518
522
  size: v.Small
519
523
  })]
520
524
  })
521
525
  }),
522
- /* @__PURE__ */ B(ye, {
526
+ /* @__PURE__ */ V(ve, {
523
527
  ...o,
524
528
  isAlwaysVisible: m,
525
- leadingContent: ie == null ? o?.leadingContent : /* @__PURE__ */ V(z, { children: [ie, o?.leadingContent] }),
529
+ leadingContent: ie == null ? o?.leadingContent : /* @__PURE__ */ H(B, { children: [ie, o?.leadingContent] }),
526
530
  role: a.User
527
531
  })
528
532
  ]
529
533
  })
530
534
  });
531
- }, ze = ({ role: e, beforeContent: t, textSegments: n, onAttachmentClick: r, responseFormat: i, markdownComponents: o, markdownUrlTransform: s, ...c }) => e === a.Status ? /* @__PURE__ */ B(Ne, { labels: {
535
+ }, ze = ({ role: e, beforeContent: t, textSegments: n, onAttachmentClick: r, responseFormat: i, markdownComponents: o, markdownUrlTransform: s, ...c }) => e === a.Status ? /* @__PURE__ */ V(Ne, { labels: {
532
536
  titleText: c.labels?.statusTitleText,
533
537
  bodyText: c.labels?.statusBodyText ?? ""
534
- } }) : e === a.User ? /* @__PURE__ */ B(Re, {
538
+ } }) : e === a.User ? /* @__PURE__ */ V(Re, {
535
539
  ...c,
536
540
  textSegments: n,
537
541
  markdownUrlTransform: s,
538
542
  onAttachmentClick: r
539
- }) : /* @__PURE__ */ B(Me, {
543
+ }) : /* @__PURE__ */ V(Me, {
540
544
  ...c,
541
545
  beforeContent: t,
542
546
  responseFormat: i,
@@ -550,7 +554,7 @@ var H = {
550
554
  "--cm-reply-background": c?.background,
551
555
  "--cm-reply-hover-background": c?.hoverBackground,
552
556
  "--cm-reply-text": c?.text
553
- }), [b, x] = F({
557
+ }), [b, x] = I({
554
558
  x: 0,
555
559
  y: 0
556
560
  });
@@ -571,28 +575,28 @@ var H = {
571
575
  i.reply
572
576
  ]), !g) return null;
573
577
  let C = null;
574
- return e ? C = i.selectionAvailable : r > 0 && (C = /* @__PURE__ */ B("span", { children: i.attachmentAdded }, r)), ue(/* @__PURE__ */ V(z, { children: [e && /* @__PURE__ */ B("div", {
578
+ return e ? C = i.selectionAvailable : r > 0 && (C = /* @__PURE__ */ V("span", { children: i.attachmentAdded }, r)), le(/* @__PURE__ */ H(B, { children: [e && /* @__PURE__ */ V("div", {
575
579
  ref: t,
576
580
  className: d("fixed top-0 left-0 z-50 max-w-[calc(100vw-16px)]", u),
577
581
  style: {
578
582
  ...y,
579
583
  transform: `translate(${b.x}px, ${b.y}px)`
580
584
  },
581
- children: /* @__PURE__ */ B(m, {
585
+ children: /* @__PURE__ */ V(m, {
582
586
  variant: h.Neutral,
583
587
  size: v.Small,
584
588
  label: i.reply,
585
589
  onClick: n,
586
590
  textClassName: p,
587
591
  className: d(Be.button, "h-8 min-h-8 min-w-11 px-2 shadow-lg mobile:h-11 mobile:min-h-11", f),
588
- iconAfter: /* @__PURE__ */ B(I, {
592
+ iconAfter: /* @__PURE__ */ V(L, {
589
593
  size: 16,
590
594
  stroke: _,
591
595
  "aria-hidden": "true",
592
596
  className: "rtl:scale-x-[-1]"
593
597
  })
594
598
  })
595
- }), /* @__PURE__ */ B(S, {
599
+ }), /* @__PURE__ */ V(S, {
596
600
  visuallyHidden: !0,
597
601
  children: C
598
602
  })] }), g);
@@ -600,7 +604,7 @@ var H = {
600
604
  let a = Ce(e);
601
605
  if (a == null) return null;
602
606
  let { kind: o, text: c } = Te(a, /* @__PURE__ */ new Date(), t), l = c;
603
- return o === q.Today ? l = (n?.today ?? Ue)(c) : o === q.Yesterday && (l = (n?.yesterday ?? We)(c)), /* @__PURE__ */ B("time", {
607
+ return o === J.Today ? l = (n?.today ?? Ue)(c) : o === J.Yesterday && (l = (n?.yesterday ?? We)(c)), /* @__PURE__ */ V("time", {
604
608
  dateTime: e,
605
609
  className: d("self-center text-center", He.label, r),
606
610
  style: s({ "--cst-text": i?.text }),
@@ -609,7 +613,7 @@ var H = {
609
613
  }, Ke = /* @__PURE__ */ function(e) {
610
614
  return e.UiBug = "UI bug", e.OveractiveRefusal = "Overactive refusal", e.IncompleteResponse = "Incomplete response", e.ShouldHaveTriggeredThinking = "Should have triggered thinking", e.ShouldHaveSearchedTheWeb = "Should have searched the web", e;
611
615
  }({}), qe = k(({ onClose: e, onSubmit: t, isCommentEnabled: n = !0, labels: r }) => {
612
- let { title: i = "Send negative feedback", feedbackTypeLabel: a = "What type of feedback you want to give?", selectPlaceholder: o = "Select", commentPlaceholder: s = "Type an optional comment to your feedback", sendLabel: c = "Send", categoryLabels: l } = r ?? {}, [u, d] = F(""), [f, p] = F(""), m = P(() => Object.values(Ke).map((e) => ({
616
+ let { title: i = "Send negative feedback", feedbackTypeLabel: a = "What type of feedback you want to give?", selectPlaceholder: o = "Select", commentPlaceholder: s = "Type an optional comment to your feedback", sendLabel: c = "Send", categoryLabels: l } = r ?? {}, [u, d] = I(""), [f, p] = I(""), m = P(() => Object.values(Ke).map((e) => ({
613
617
  value: e,
614
618
  label: l?.[e] ?? e
615
619
  })), [l]), g = A(() => {
@@ -628,16 +632,16 @@ var H = {
628
632
  g,
629
633
  c
630
634
  ]);
631
- return /* @__PURE__ */ B(T, {
635
+ return /* @__PURE__ */ V(T, {
632
636
  open: !0,
633
637
  header: i,
634
638
  onClose: e,
635
639
  size: E.Sm,
636
640
  className: "h-[422px]!",
637
641
  mainButtons: _,
638
- children: /* @__PURE__ */ V("div", {
642
+ children: /* @__PURE__ */ H("div", {
639
643
  className: "flex h-full flex-col gap-4 px-6 py-4",
640
- children: [/* @__PURE__ */ B(ee, {
644
+ children: [/* @__PURE__ */ V(ee, {
641
645
  labelProps: {
642
646
  label: a,
643
647
  required: !0
@@ -646,7 +650,7 @@ var H = {
646
650
  value: u,
647
651
  placeholder: o,
648
652
  onChange: (e) => d(e)
649
- }), n && /* @__PURE__ */ B(D, {
653
+ }), n && /* @__PURE__ */ V(D, {
650
654
  value: f,
651
655
  placeholder: s,
652
656
  onChange: (e) => p(e ?? ""),
@@ -657,4 +661,4 @@ var H = {
657
661
  });
658
662
  });
659
663
  //#endregion
660
- export { Me as AssistantMessageBubble, Pe as BubblePosition, H as CONVERSATION_MESSAGES_CLASS, Ge as ConversationStartTimestamp, ye as MessageActions, ze as MessageBubble, Ve as MessageSelectionReply, Ke as NegativeFeedbackCategory, qe as NegativeFeedbackModal, Ne as StatusMessageBubble, Re as UserMessageBubble };
664
+ export { Me as AssistantMessageBubble, Pe as BubblePosition, U as CONVERSATION_MESSAGES_CLASS, Ge as ConversationStartTimestamp, ve as MessageActions, ze as MessageBubble, Ve as MessageSelectionReply, Ke as NegativeFeedbackCategory, qe as NegativeFeedbackModal, Ne as StatusMessageBubble, Re as UserMessageBubble };
@@ -1,3 +1,4 @@
1
+ import { AttachmentGroupStyles } from '@epam/ai-dial-attachment-input';
1
2
  import { CodeBlockTheme, DisplayAttachment, MarkdownRendererClassNames, MessageRole, ResponseFormat, StarterOption, TextSegment } from '@epam/ai-dial-chat-shared';
2
3
  import { ReactNode, Ref } from 'react';
3
4
  import { Components } from 'react-markdown';
@@ -33,6 +34,8 @@ export interface MessageBubbleStyles {
33
34
  className?: string;
34
35
  /** Extra class(es) on the bubble element. */
35
36
  bubbleClassName?: string;
37
+ /** Style overrides forwarded to the message's `AttachmentGroup`. */
38
+ attachmentGroupStyles?: AttachmentGroupStyles;
36
39
  /** Typography class on the send time shown when `timestamp` is set. Defaults to `'dial-small-text'`. */
37
40
  timestampClassName?: string;
38
41
  }
@@ -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,0BAA0B,EAC1B,WAAW,EACX,cAAc,EACd,aAAa,EACb,WAAW,EACZ,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,g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;IACjC,6DAA6D;IAC7D,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,2DAA2D;IAC3D,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,+FAA+F;IAC/F,MAAM,CAAC,EAAE,4BAA4B,CAAC;CACvC;AAED,kGAAkG;AAClG,MAAM,MAAM,kBAAkB,GAAG,2BAA2B,GAC1D,IAAI,CACF,sBAAsB,EACtB,UAAU,GAAG,oBAAoB,GAAG,cAAc,CACnD,GAAG;IACF,8DAA8D;IAC9D,IAAI,EAAE,WAAW,CAAC;CACnB,CAAC"}
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.4.0-dev.96",
4
+ "version": "1.4.0-rc.1",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": [
7
7
  "**/*.css",
@@ -23,13 +23,13 @@
23
23
  "dependencies": {
24
24
  "@tabler/icons-react": "^3.50.0",
25
25
  "react-markdown": "^10.1.0",
26
- "@epam/ai-dial-attachment-input": "1.4.0-dev.96"
26
+ "@epam/ai-dial-attachment-input": "1.4.0-rc.1"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "react": "^19.2.8",
30
30
  "react-dom": "^19.2.8",
31
- "@epam/ai-dial-chat-shared": "1.4.0-dev.96",
32
- "@epam/ai-dial-ui-kit": "^0.16.0"
31
+ "@epam/ai-dial-chat-shared": "1.4.0-rc.1",
32
+ "@epam/ai-dial-ui-kit": "^0.17.0"
33
33
  },
34
34
  "repository": {
35
35
  "type": "git",