@epam/ai-dial-conversation-messages 1.1.0-dev.255 → 1.1.0-dev.257

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":"MessageActions.d.ts","sourceRoot":"","sources":["../../../src/components/MessageActions/MessageActions.tsx"],"names":[],"mappings":"AAoBA,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,CAoJlD,CAAC"}
1
+ {"version":3,"file":"MessageActions.d.ts","sourceRoot":"","sources":["../../../src/components/MessageActions/MessageActions.tsx"],"names":[],"mappings":"AAsBA,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,CA4LlD,CAAC"}
package/index.css CHANGED
@@ -1,2 +1,2 @@
1
- ._activeRating_7jito_1{color:var(--ma-active-rating-text,var(--text-accent,#1d4ed8))!important}._userBubble_ovjc1_1{border-color:var(--cm-bubble-user-border,var(--stroke-secondary,#d1dbea));background:var(--cm-bubble-user-bg,var(--bg-layer-sunken,#eef1f7))}._collapsibleText_ovjc1_6{max-height:var(--cm-bubble-collapsed-height);transition:max-height .2s ease-out}._expandedText_ovjc1_11{max-height:var(--cm-bubble-expanded-height)}._collapsedText_ovjc1_15:after{content:"";pointer-events:none;background:linear-gradient(to bottom, var(--cm-bubble-fade-start,var(--shadow-grey-1000,#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_ovjc1_6{transition:none}}._startersDivider_ovjc1_26{border-color:var(--cm-starters-divider,var(--stroke-secondary,#d1dbea))}._text_ovjc1_30{color:var(--cm-bubble-text,var(--text-primary,#161b2d))}
1
+ ._activeRating_ygoee_1{color:var(--ma-active-rating-text,var(--text-accent,#1d4ed8))}._userBubble_ovjc1_1{border-color:var(--cm-bubble-user-border,var(--stroke-secondary,#d1dbea));background:var(--cm-bubble-user-bg,var(--bg-layer-sunken,#eef1f7))}._collapsibleText_ovjc1_6{max-height:var(--cm-bubble-collapsed-height);transition:max-height .2s ease-out}._expandedText_ovjc1_11{max-height:var(--cm-bubble-expanded-height)}._collapsedText_ovjc1_15:after{content:"";pointer-events:none;background:linear-gradient(to bottom, var(--cm-bubble-fade-start,var(--shadow-grey-1000,#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_ovjc1_6{transition:none}}._startersDivider_ovjc1_26{border-color:var(--cm-starters-divider,var(--stroke-secondary,#d1dbea))}._text_ovjc1_30{color:var(--cm-bubble-text,var(--text-primary,#161b2d))}
2
2
  /*$vite$:1*/
package/index.js CHANGED
@@ -1,94 +1,94 @@
1
1
  import { AttachmentErrorReason as e, AttachmentType as t, CopyIconButton as n, DeploymentIcon as r, MDMessageViewer as i, MIME_TYPE_EXT_MAP as a, MessageRating as o, MessageRole as s, RequestStatus as c, ResponseFormat as l, buildCssVars as u, mergeClasses as d, useCollapsedText as f } from "@epam/ai-dial-chat-shared";
2
- import { DIAL_ICON_SIZE as p, DialSlider as m, ElementSize as h, GhostIconButton as g, Highlight as _, InfoMessageNotification as v, LinkButton as y, NeutralButton as b, Popup as x, PopupSize as S, PrimaryButton as C, RadioGroup as w, RadioGroupOrientation as T, Skeleton as E, SkeletonVariant as D, Spinner as O, StaticIconButton as k, Textarea as A, Tooltip as j } from "@epam/ai-dial-ui-kit";
3
- import { IconChevronDown as M, IconChevronUp as N, IconClipboard as P, IconDownload as F, IconExternalLink as I, IconFile as L, IconFileTypeBmp as R, IconFileTypeCss as z, IconFileTypeCsv as B, IconFileTypeDoc as V, IconFileTypeDocx as H, IconFileTypeHtml as U, IconFileTypeJpg as W, IconFileTypeJs as ee, IconFileTypeJsx as te, IconFileTypePdf as ne, IconFileTypePhp as re, IconFileTypePng as ie, IconFileTypePpt as ae, IconFileTypeRs as oe, IconFileTypeSql as se, IconFileTypeSvg as ce, IconFileTypeTs as le, IconFileTypeTsx as ue, IconFileTypeTxt as de, IconFileTypeVue as fe, IconFileTypeXls as pe, IconFileTypeXml as me, IconFileTypeZip as he, IconMarkdown as ge, IconMusic as _e, IconPaperclip as ve, IconPencilMinus as ye, IconPhoto as G, IconRefresh as be, IconReload as xe, IconTerminal2 as Se, IconThumbDown as Ce, IconThumbUp as we, IconTrashX as Te, IconVideo as Ee, IconX as De } from "@tabler/icons-react";
2
+ import { DIAL_ICON_SIZE as p, DialSlider as m, ElementSize as h, GhostIconButton as g, Highlight as _, InfoMessageNotification as v, LinkButton as y, NeutralButton as b, Popup as x, PopupSize as S, PrimaryButton as C, RadioGroup as w, RadioGroupOrientation as T, Skeleton as E, SkeletonVariant as D, Spinner as O, StaticIconButton as k, Textarea as A, ToggleIconButton as j, Tooltip as M } from "@epam/ai-dial-ui-kit";
3
+ import { IconChevronDown as N, IconChevronUp as P, IconClipboard as F, IconDownload as I, IconExternalLink as L, IconFile as R, IconFileTypeBmp as z, IconFileTypeCss as B, IconFileTypeCsv as V, IconFileTypeDoc as H, IconFileTypeDocx as ee, IconFileTypeHtml as te, IconFileTypeJpg as ne, IconFileTypeJs as U, IconFileTypeJsx as W, IconFileTypePdf as re, IconFileTypePhp as ie, IconFileTypePng as ae, IconFileTypePpt as oe, IconFileTypeRs as se, IconFileTypeSql as ce, IconFileTypeSvg as le, IconFileTypeTs as ue, IconFileTypeTsx as de, IconFileTypeTxt as fe, IconFileTypeVue as pe, IconFileTypeXls as me, IconFileTypeXml as he, IconFileTypeZip as ge, IconMarkdown as _e, IconMusic as ve, IconPaperclip as ye, IconPencilMinus as be, IconPhoto as G, IconRefresh as xe, IconReload as Se, IconTerminal2 as Ce, IconThumbDown as we, IconThumbDownFilled as Te, IconThumbUp as Ee, IconThumbUpFilled as De, IconTrashX as Oe, IconVideo as ke, IconX as Ae } from "@tabler/icons-react";
4
4
  import "react-dom";
5
- import { memo as Oe, useCallback as K, useEffect as ke, useId as Ae, useMemo as je, useRef as Me, useState as q } from "react";
5
+ import { memo as je, useCallback as K, useEffect as Me, useId as Ne, useMemo as Pe, useRef as Fe, useState as q } from "react";
6
6
  import { Fragment as J, jsx as Y, jsxs as X } from "react/jsx-runtime";
7
7
  //#region ../attachment-input/dist/index.js
8
- var Ne = (e) => {
8
+ var Ie = (e) => {
9
9
  if (e == null) return "";
10
10
  let t = e.lastIndexOf(".");
11
11
  return t > 0 ? e.slice(0, t) : e;
12
- }, Pe = (e) => {
13
- if (!e) return L;
12
+ }, Le = (e) => {
13
+ if (!e) return R;
14
14
  if (e.startsWith("image/")) switch (e) {
15
15
  case "image/jpeg":
16
- case "image/jpg": return W;
17
- case "image/png": return ie;
18
- case "image/svg+xml": return ce;
19
- case "image/bmp": return R;
16
+ case "image/jpg": return ne;
17
+ case "image/png": return ae;
18
+ case "image/svg+xml": return le;
19
+ case "image/bmp": return z;
20
20
  default: return G;
21
21
  }
22
- if (e.startsWith("video/")) return Ee;
23
- if (e.startsWith("audio/")) return _e;
22
+ if (e.startsWith("video/")) return ke;
23
+ if (e.startsWith("audio/")) return ve;
24
24
  switch (e) {
25
- case "application/pdf": return ne;
25
+ case "application/pdf": return re;
26
26
  case "application/msword":
27
- case "application/vnd.ms-word": return V;
28
- case "application/vnd.openxmlformats-officedocument.wordprocessingml.document": return H;
29
- case "application/vnd.ms-powerpoint": return ae;
30
- case "application/vnd.openxmlformats-officedocument.presentationml.presentation": return ae;
31
- case "application/vnd.ms-excel": return pe;
32
- case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": return pe;
27
+ case "application/vnd.ms-word": return H;
28
+ case "application/vnd.openxmlformats-officedocument.wordprocessingml.document": return ee;
29
+ case "application/vnd.ms-powerpoint": return oe;
30
+ case "application/vnd.openxmlformats-officedocument.presentationml.presentation": return oe;
31
+ case "application/vnd.ms-excel": return me;
32
+ case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": return me;
33
33
  case "application/zip":
34
34
  case "application/x-zip-compressed":
35
35
  case "application/x-rar-compressed":
36
36
  case "application/x-7z-compressed":
37
37
  case "application/gzip":
38
- case "application/x-tar": return he;
39
- case "text/csv": return B;
40
- case "text/plain": return de;
38
+ case "application/x-tar": return ge;
39
+ case "text/csv": return V;
40
+ case "text/plain": return fe;
41
41
  case "text/html":
42
- case "application/xhtml+xml": return U;
42
+ case "application/xhtml+xml": return te;
43
43
  case "text/xml":
44
- case "application/xml": return me;
44
+ case "application/xml": return he;
45
45
  case "application/sql":
46
- case "text/x-sql": return se;
46
+ case "text/x-sql": return ce;
47
47
  case "text/javascript":
48
- case "application/javascript": return ee;
49
- case "text/jsx": return te;
48
+ case "application/javascript": return U;
49
+ case "text/jsx": return W;
50
50
  case "application/typescript":
51
- case "text/typescript": return le;
52
- case "text/tsx": return ue;
53
- case "text/css": return z;
51
+ case "text/typescript": return ue;
52
+ case "text/tsx": return de;
53
+ case "text/css": return B;
54
54
  case "text/x-php":
55
- case "application/x-php": return re;
55
+ case "application/x-php": return ie;
56
56
  case "text/x-rustsrc":
57
- case "application/x-rust": return oe;
58
- case "text/x-vue": return fe;
59
- default: return L;
57
+ case "application/x-rust": return se;
58
+ case "text/x-vue": return pe;
59
+ default: return R;
60
60
  }
61
- }, Fe = (e) => {
61
+ }, Re = (e) => {
62
62
  let { type: n, contentType: r } = e;
63
- return n === t.Prompt ? Se : n === t.Pasted ? P : n === t.Image ? G : Pe(r ?? "");
64
- }, Ie = (e) => {
63
+ return n === t.Prompt ? Ce : n === t.Pasted ? F : n === t.Image ? G : Le(r ?? "");
64
+ }, ze = (e) => {
65
65
  let t = e.toLowerCase().split(";")[0].trim(), n = a[t];
66
66
  if (n) return n;
67
67
  let r = t.split("/")[1];
68
68
  if (r && !r.startsWith("vnd.") && !r.includes("+")) return r;
69
- }, Le = (e, n) => {
69
+ }, Be = (e, n) => {
70
70
  let { type: r, name: i, contentType: a } = e;
71
71
  if (r === t.Prompt) return n.promptLabel ?? "Prompt";
72
72
  if (r === t.Pasted) return n.pastedLabel ?? "Pasted";
73
73
  if (r === t.Image) return n.imageLabel ?? "Image";
74
74
  if (a) {
75
- let e = Ie(a);
75
+ let e = ze(a);
76
76
  if (e) return `.${e}`;
77
77
  }
78
78
  if (i == null) return "";
79
79
  let o = i.lastIndexOf(".");
80
80
  return o > 0 && o < i.length - 1 ? `.${i.slice(o + 1).toLowerCase()}` : i;
81
- }, Re = (e, n = {}) => {
81
+ }, Ve = (e, n = {}) => {
82
82
  let { type: r, status: i, previewUrl: a, url: o } = e, s = i === c.Loading, l = i === c.Error, u = r === t.Image && !!(a ?? o) && !l, d = r === t.Link && !l;
83
83
  return {
84
84
  isLoading: s,
85
85
  isError: l,
86
86
  isImage: u,
87
87
  isLink: d,
88
- BottomIcon: d ? null : Fe(e),
89
- typeLabel: d ? null : Le(e, n)
88
+ BottomIcon: d ? null : Re(e),
89
+ typeLabel: d ? null : Be(e, n)
90
90
  };
91
- }, ze = "flex size-[84px] items-center justify-center rounded-xl border", Z = {
91
+ }, He = "flex size-[84px] items-center justify-center rounded-xl border", Z = {
92
92
  tile: "_tile_11lkg_1",
93
93
  hovered: "_hovered_11lkg_5",
94
94
  selected: "_selected_11lkg_15",
@@ -108,40 +108,40 @@ var Ne = (e) => {
108
108
  onClick: (e) => {
109
109
  e.stopPropagation(), r(i);
110
110
  }
111
- }), Be = ({ ...e }) => /* @__PURE__ */ Y(Q, {
112
- icon: /* @__PURE__ */ Y(xe, {
111
+ }), Ue = ({ ...e }) => /* @__PURE__ */ Y(Q, {
112
+ icon: /* @__PURE__ */ Y(Se, {
113
113
  size: p.SM,
114
114
  "aria-hidden": !0
115
115
  }),
116
116
  className: Z.retryIcon,
117
117
  ...e
118
- }), Ve = ({ ...e }) => /* @__PURE__ */ Y(Q, {
119
- icon: /* @__PURE__ */ Y(F, {
118
+ }), We = ({ ...e }) => /* @__PURE__ */ Y(Q, {
119
+ icon: /* @__PURE__ */ Y(I, {
120
120
  size: p.SM,
121
121
  "aria-hidden": !0
122
122
  }),
123
123
  ...e
124
- }), He = ({ ...e }) => /* @__PURE__ */ Y(Q, {
125
- icon: /* @__PURE__ */ Y(I, {
124
+ }), Ge = ({ ...e }) => /* @__PURE__ */ Y(Q, {
125
+ icon: /* @__PURE__ */ Y(L, {
126
126
  size: p.SM,
127
127
  "aria-hidden": !0
128
128
  }),
129
129
  ...e
130
- }), Ue = ({ ...e }) => /* @__PURE__ */ Y(Q, {
131
- icon: /* @__PURE__ */ Y(De, {
130
+ }), Ke = ({ ...e }) => /* @__PURE__ */ Y(Q, {
131
+ icon: /* @__PURE__ */ Y(Ae, {
132
132
  size: p.SM,
133
133
  "aria-hidden": !0
134
134
  }),
135
135
  ...e
136
- }), We = {
136
+ }), qe = {
137
137
  [e.Network]: "Upload failed · network error",
138
138
  [e.UnsupportedType]: "Upload failed · unsupported file type"
139
- }, Ge = ({ attachment: t, searchQuery: n = "", onClick: r, onRetry: i, labels: a, styles: o, onDownload: s, isPasted: l, isLink: u, cssVars: f, onExpand: p, isExpandable: m, onRemove: h, isSelected: g }) => {
140
- let { clickLabel: v = "Download attachment", retryLabel: y = "Retry upload", sizeLabel: b, uploadingLabel: x = "Uploading", errorReasonLabels: S, genericErrorLabel: C = "Upload failed" } = a ?? {}, { typography: w, className: T } = o ?? {}, { id: E, name: D, status: k, errorReason: A } = t, j = k === c.Loading, M = k === c.Error, N = Ae(), P = M ? A && (S?.[A] ?? We[A]) || C : "", { BottomIcon: F, typeLabel: I } = Re(t), L = !M && !j && s && !u, R = M && !!i && A !== e.UnsupportedType, z = L || R ? "pe-5" : void 0, B = (e) => {
139
+ }, Je = ({ attachment: t, searchQuery: n = "", onClick: r, onRetry: i, labels: a, styles: o, onDownload: s, isPasted: l, isLink: u, cssVars: f, onExpand: p, isExpandable: m, onRemove: h, isSelected: g }) => {
140
+ let { clickLabel: v = "Download attachment", retryLabel: y = "Retry upload", sizeLabel: b, uploadingLabel: x = "Uploading", errorReasonLabels: S, genericErrorLabel: C = "Upload failed" } = a ?? {}, { typography: w, className: T } = o ?? {}, { id: E, name: D, status: k, errorReason: A } = t, j = k === c.Loading, M = k === c.Error, N = Ne(), P = M ? A && (S?.[A] ?? qe[A]) || C : "", { BottomIcon: F, typeLabel: I } = Ve(t), L = !M && !j && s && !u, R = M && !!i && A !== e.UnsupportedType, z = L || R ? "pe-5" : void 0, B = (e) => {
141
141
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), r?.(t.id));
142
- }, V = je(() => l ? D : Ne(D), [l, D]), H = K(() => {
142
+ }, V = Pe(() => l ? D : Ie(D), [l, D]), H = K(() => {
143
143
  window.open(t.referenceUrl, "_blank", "noopener,noreferrer");
144
- }, [t]), U = d(ze, "group/attachment-tile relative flex-col justify-between items-start gap-1 overflow-hidden p-1.5", Z.tile, !M && Z.hovered, g && Z.selected, M && Z.tileError), W = /* @__PURE__ */ Y("div", {
144
+ }, [t]), ee = d(He, "group/attachment-tile relative flex-col justify-between items-start gap-1 overflow-hidden p-1.5", Z.tile, !M && Z.hovered, g && Z.selected, M && Z.tileError), te = /* @__PURE__ */ Y("div", {
145
145
  title: V,
146
146
  className: d(w?.nameClassName ?? "dial-caption-text", "line-clamp-2 min-w-0 break-all", Z.nameText, !M && z),
147
147
  children: n ? /* @__PURE__ */ Y(_, {
@@ -149,7 +149,7 @@ var Ne = (e) => {
149
149
  query: n,
150
150
  maxLines: 2
151
151
  }) : V
152
- }), ee = F && /* @__PURE__ */ X("div", {
152
+ }), ne = F && /* @__PURE__ */ X("div", {
153
153
  className: d("flex w-full items-center gap-1", M && z),
154
154
  children: [/* @__PURE__ */ Y(F, {
155
155
  size: 16,
@@ -159,11 +159,11 @@ var Ne = (e) => {
159
159
  className: d(w?.metaClassName ?? "dial-caption-text", "min-w-0 flex-1 truncate", Z.typeText),
160
160
  children: b ? `${I} · ${b}` : I
161
161
  })]
162
- }), te = () => {
162
+ }), U = () => {
163
163
  m && p ? p(E) : r && r(E);
164
- }, ne = /* @__PURE__ */ X(J, { children: [
165
- W,
166
- ee,
164
+ }, W = /* @__PURE__ */ X(J, { children: [
165
+ te,
166
+ ne,
167
167
  j && /* @__PURE__ */ Y("div", {
168
168
  "aria-label": x,
169
169
  className: d("absolute left-[-1px] top-[-1px] flex size-full items-center justify-center rounded", Z.track),
@@ -172,27 +172,27 @@ var Ne = (e) => {
172
172
  /* @__PURE__ */ X("div", {
173
173
  className: d("absolute right-0 top-0 flex gap-1"),
174
174
  children: [
175
- L && /* @__PURE__ */ Y(Ve, {
175
+ L && /* @__PURE__ */ Y(We, {
176
176
  ariaLabel: v,
177
177
  errorTitle: P,
178
178
  errorDescId: N,
179
179
  onClick: s,
180
180
  id: E
181
181
  }),
182
- R && /* @__PURE__ */ Y(Be, {
182
+ R && /* @__PURE__ */ Y(Ue, {
183
183
  ariaLabel: y,
184
184
  errorTitle: P,
185
185
  errorDescId: N,
186
186
  onClick: i,
187
187
  id: E
188
188
  }),
189
- u && /* @__PURE__ */ Y(He, {
189
+ u && /* @__PURE__ */ Y(Ge, {
190
190
  ariaLabel: y,
191
191
  errorTitle: P,
192
192
  errorDescId: N,
193
193
  onClick: H
194
194
  }),
195
- h && /* @__PURE__ */ Y(Ue, {
195
+ h && /* @__PURE__ */ Y(Ke, {
196
196
  ariaLabel: y,
197
197
  errorTitle: P,
198
198
  errorDescId: N,
@@ -216,20 +216,20 @@ var Ne = (e) => {
216
216
  role: "button",
217
217
  tabIndex: 0,
218
218
  "aria-label": v,
219
- onClick: te,
219
+ onClick: U,
220
220
  onKeyDown: B,
221
221
  style: f,
222
- className: d(U, "cursor-pointer focus-within:outline focus-within:outline-1 focus-within:outline-offset-1"),
223
- children: ne
222
+ className: d(ee, "cursor-pointer focus-within:outline focus-within:outline-1 focus-within:outline-offset-1"),
223
+ children: W
224
224
  })
225
225
  });
226
- }, Ke = /* @__PURE__ */ function(e) {
226
+ }, Ye = /* @__PURE__ */ function(e) {
227
227
  return e.Idle = "idle", e.Loading = "loading", e.Loaded = "loaded", e.Error = "error", e;
228
- }({}), qe = ({ enabled: e, src: t }) => {
229
- let n = Me(null), [r, i] = q("idle");
230
- return ke(() => {
228
+ }({}), Xe = ({ enabled: e, src: t }) => {
229
+ let n = Fe(null), [r, i] = q("idle");
230
+ return Me(() => {
231
231
  i(e && t ? "loading" : "idle");
232
- }, [e, t]), ke(() => {
232
+ }, [e, t]), Me(() => {
233
233
  let r = n.current;
234
234
  if (!r || !e || !t) return;
235
235
  let a = () => i("loaded"), o = () => i("error");
@@ -240,15 +240,15 @@ var Ne = (e) => {
240
240
  imageRef: n,
241
241
  imageLoadStatus: r
242
242
  };
243
- }, Je = ({ attachment: e, onExpand: n, onClick: r, labels: i, onRemove: a, cssVars: o, onDownload: s, styles: c, isSelected: l }) => {
244
- let { clickLabel: u = "Open attachment", expandLabel: f = "Expand pasted text" } = i ?? {}, { className: m } = c ?? {}, { id: h, name: g } = e, _ = e.previewUrl ?? e.url, v = e.type === t.Pasted && n !== void 0, { isLoading: y, isError: b, isImage: x } = je(() => Re(e), [e]), S = r !== void 0 && !v && !y && !b, { imageRef: C, imageLoadStatus: w } = qe({
243
+ }, Ze = ({ attachment: e, onExpand: n, onClick: r, labels: i, onRemove: a, cssVars: o, onDownload: s, styles: c, isSelected: l }) => {
244
+ let { clickLabel: u = "Open attachment", expandLabel: f = "Expand pasted text" } = i ?? {}, { className: m } = c ?? {}, { id: h, name: g } = e, _ = e.previewUrl ?? e.url, v = e.type === t.Pasted && n !== void 0, { isLoading: y, isError: b, isImage: x } = Pe(() => Ve(e), [e]), S = r !== void 0 && !v && !y && !b, { imageRef: C, imageLoadStatus: w } = Xe({
245
245
  enabled: x,
246
246
  src: _
247
247
  }), T = () => {
248
248
  v && n ? n(h) : S && r && r(h);
249
249
  };
250
250
  return /* @__PURE__ */ Y("div", {
251
- className: d(ze, "group/attachment-tile", S && "cursor-pointer", Z.tile, l && Z.selected, m),
251
+ className: d(He, "group/attachment-tile", S && "cursor-pointer", Z.tile, l && Z.selected, m),
252
252
  onClick: T,
253
253
  onKeyDown: (e) => {
254
254
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), T());
@@ -260,21 +260,21 @@ var Ne = (e) => {
260
260
  children: /* @__PURE__ */ X("div", {
261
261
  className: "relative h-full w-full overflow-hidden",
262
262
  children: [
263
- a && /* @__PURE__ */ Y(Ue, {
263
+ a && /* @__PURE__ */ Y(Ke, {
264
264
  onClick: a,
265
265
  id: h,
266
266
  className: Z.imageActionButton
267
267
  }),
268
- s && /* @__PURE__ */ Y(Ve, {
268
+ s && /* @__PURE__ */ Y(We, {
269
269
  onClick: s,
270
270
  id: h,
271
271
  className: Z.imageActionButton
272
272
  }),
273
- w !== Ke.Loaded && /* @__PURE__ */ Y(E, {
273
+ w !== Ye.Loaded && /* @__PURE__ */ Y(E, {
274
274
  variant: D.Rectangular,
275
275
  width: "100%",
276
276
  height: "100%",
277
- active: w === Ke.Loading,
277
+ active: w === Ye.Loading,
278
278
  overlay: /* @__PURE__ */ Y(G, {
279
279
  size: p.LG,
280
280
  className: Z.typeText,
@@ -288,12 +288,12 @@ var Ne = (e) => {
288
288
  alt: g,
289
289
  loading: "lazy",
290
290
  decoding: "async",
291
- className: d("h-full w-full rounded-xl object-cover transition-opacity duration-200", w === Ke.Loaded ? "opacity-100" : "opacity-0")
291
+ className: d("h-full w-full rounded-xl object-cover transition-opacity duration-200", w === Ye.Loaded ? "opacity-100" : "opacity-0")
292
292
  })
293
293
  ]
294
294
  })
295
295
  });
296
- }, Ye = ({ attachment: e, searchQuery: n = "", onRemove: r, onRetry: i, onExpand: a, onClick: o, onDownload: s, labels: c, styles: l, isSelected: d }) => {
296
+ }, Qe = ({ attachment: e, searchQuery: n = "", onRemove: r, onRetry: i, onExpand: a, onClick: o, onDownload: s, labels: c, styles: l, isSelected: d }) => {
297
297
  let { colors: f } = l ?? {}, p = e.type === t.Pasted, m = p && a !== void 0, h = u({
298
298
  "--ai-tile-bg": f?.background,
299
299
  "--ai-tile-border": f?.border,
@@ -310,8 +310,8 @@ var Ne = (e) => {
310
310
  "--ai-tile-hover-icon-bg": f?.hoverIconBackground,
311
311
  "--ai-tile-hover-icon-color": f?.hoverIconColor,
312
312
  "--ai-tile-progress-track": f?.trackBackground
313
- }), { isImage: g, isLink: _ } = je(() => Re(e), [e]);
314
- return g ? /* @__PURE__ */ Y(Je, {
313
+ }), { isImage: g, isLink: _ } = Pe(() => Ve(e), [e]);
314
+ return g ? /* @__PURE__ */ Y(Ze, {
315
315
  attachment: e,
316
316
  labels: c,
317
317
  onClick: o,
@@ -321,7 +321,7 @@ var Ne = (e) => {
321
321
  cssVars: h,
322
322
  onDownload: s,
323
323
  isSelected: d
324
- }) : /* @__PURE__ */ Y(Ge, {
324
+ }) : /* @__PURE__ */ Y(Je, {
325
325
  attachment: e,
326
326
  searchQuery: n,
327
327
  onClick: o,
@@ -337,13 +337,13 @@ var Ne = (e) => {
337
337
  isExpandable: m,
338
338
  isSelected: d
339
339
  });
340
- }, Xe = {
340
+ }, $e = {
341
341
  headerIcon: "_headerIcon_1dmgi_1",
342
342
  headerLabel: "_headerLabel_1dmgi_2"
343
- }, Ze = (e, t) => `${e} ${t}${e === 1 ? "" : "s"}`, Qe = ({ attachments: e, onAttachmentClick: n, onDownloadAll: r, onRetry: i, labels: a, styles: o, selectedAttachmentId: s }) => {
344
- let { ariaLabel: l = "Attachments", clickLabel: f = "Download attachment", retryLabel: m = "Retry upload", downloadAllLabel: _ = "Download all", openInNewTabLabel: v, getHeaderLabel: y = (e) => Ze(e, "attachment"), promptLabel: b, pastedLabel: x, imageLabel: S } = a ?? {}, { typography: C, colors: w, className: T } = o ?? {}, E = u({ "--ai-group-text": w?.text });
343
+ }, et = (e, t) => `${e} ${t}${e === 1 ? "" : "s"}`, tt = ({ attachments: e, onAttachmentClick: n, onDownloadAll: r, onRetry: i, labels: a, styles: o, selectedAttachmentId: s }) => {
344
+ let { ariaLabel: l = "Attachments", clickLabel: f = "Download attachment", retryLabel: m = "Retry upload", downloadAllLabel: _ = "Download all", openInNewTabLabel: v, getHeaderLabel: y = (e) => et(e, "attachment"), promptLabel: b, pastedLabel: x, imageLabel: S } = a ?? {}, { typography: C, colors: w, className: T } = o ?? {}, E = u({ "--ai-group-text": w?.text });
345
345
  if (e.length === 0) return null;
346
- let D = e.some((e) => e.type === t.Image), O = e.some((e) => e.type !== t.Image), k = D && O, A = e.length >= 5, j = k ? ve : D ? G : L, M = y(e.length), N = () => {
346
+ let D = e.some((e) => e.type === t.Image), O = e.some((e) => e.type !== t.Image), k = D && O, A = e.length >= 5, j = k ? ye : D ? G : R, M = y(e.length), N = () => {
347
347
  let t = e.filter((e) => e.status === c.Idle);
348
348
  r ? r(t) : t.forEach((e) => n?.(e.id));
349
349
  }, P = (t) => {
@@ -354,21 +354,21 @@ var Ne = (e) => {
354
354
  role: "group",
355
355
  "aria-label": l,
356
356
  style: E,
357
- className: d("flex flex-col gap-1", A ? "w-full min-w-0 max-w-[492px]" : "max-w-[420px]", Xe.container, T),
357
+ className: d("flex flex-col gap-1", A ? "w-full min-w-0 max-w-[492px]" : "max-w-[420px]", $e.container, T),
358
358
  children: [/* @__PURE__ */ X("div", {
359
359
  className: "flex items-center justify-between",
360
360
  children: [/* @__PURE__ */ X("div", {
361
361
  className: "flex items-center gap-1",
362
362
  children: [/* @__PURE__ */ Y(j, {
363
363
  size: p.SM,
364
- className: d("shrink-0", Xe.headerIcon),
364
+ className: d("shrink-0", $e.headerIcon),
365
365
  "aria-hidden": !0
366
366
  }), /* @__PURE__ */ Y("span", {
367
- className: d(C?.headerLabelClassName ?? "dial-tiny-semi-text", Xe.headerLabel),
367
+ className: d(C?.headerLabelClassName ?? "dial-tiny-semi-text", $e.headerLabel),
368
368
  children: M
369
369
  })]
370
370
  }), e.length >= 2 && (r || n) && /* @__PURE__ */ Y(g, {
371
- icon: /* @__PURE__ */ Y(F, {
371
+ icon: /* @__PURE__ */ Y(I, {
372
372
  size: p.SM,
373
373
  "aria-hidden": !0
374
374
  }),
@@ -382,7 +382,7 @@ var Ne = (e) => {
382
382
  className: d("gap-3", A ? "grid grid-cols-[repeat(5,83px)]" : "flex flex-wrap"),
383
383
  children: e.map((e, t) => /* @__PURE__ */ Y("div", {
384
384
  role: "listitem",
385
- children: /* @__PURE__ */ Y(Ye, {
385
+ children: /* @__PURE__ */ Y(Qe, {
386
386
  attachment: e,
387
387
  onClick: n,
388
388
  onDownload: P,
@@ -400,9 +400,9 @@ var Ne = (e) => {
400
400
  }, `${e.id}-${t}`))
401
401
  })]
402
402
  });
403
- }, $e = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, isOpen: o }) => {
404
- let [s, c] = q(t), [l, u] = q(n), [d, f] = q(r), p = Me(o);
405
- ke(() => {
403
+ }, nt = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, isOpen: o }) => {
404
+ let [s, c] = q(t), [l, u] = q(n), [d, f] = q(r), p = Fe(o);
405
+ Me(() => {
406
406
  o && !p.current && (c(t), u(n), f(r)), p.current = o;
407
407
  }, [
408
408
  o,
@@ -433,12 +433,12 @@ var Ne = (e) => {
433
433
  a
434
434
  ])
435
435
  };
436
- }, et = { label: "_label_14i7c_1" }, tt = ({ features: e, responseFormat: t, systemPrompt: n, temperature: r, onResponseFormatChange: i, onSystemPromptChange: a, onTemperatureChange: o, responseFormatLabel: s = "Response format", responseFormatHint: c = "Applies to new and existing messages", responseFormatMarkdownLabel: f = "Markdown", responseFormatPlainTextLabel: p = "Plain text", systemPromptLabel: h = "System prompt", systemPromptTooltip: g = "Enter a prompt", temperatureLabel: _ = "Temperature", temperatureLabels: v = [
436
+ }, rt = { label: "_label_14i7c_1" }, it = ({ features: e, responseFormat: t, systemPrompt: n, temperature: r, onResponseFormatChange: i, onSystemPromptChange: a, onTemperatureChange: o, responseFormatLabel: s = "Response format", responseFormatHint: c = "Applies to new and existing messages", responseFormatMarkdownLabel: f = "Markdown", responseFormatPlainTextLabel: p = "Plain text", systemPromptLabel: h = "System prompt", systemPromptTooltip: g = "Enter a prompt", temperatureLabel: _ = "Temperature", temperatureLabels: v = [
437
437
  "Precise",
438
438
  "Neutral",
439
439
  "Creative"
440
440
  ], temperatureHint: y, labelClassName: b = "!dial-small-semi-text", colors: x }) => {
441
- let S = u({ "--csf-label-text": x?.labelText }), C = d(b, et.label, "gap-1");
441
+ let S = u({ "--csf-label-text": x?.labelText }), C = d(b, rt.label, "gap-1");
442
442
  return /* @__PURE__ */ X("div", {
443
443
  className: "flex flex-col gap-4 px-6 pb-3",
444
444
  style: S,
@@ -487,9 +487,9 @@ var Ne = (e) => {
487
487
  })
488
488
  ]
489
489
  });
490
- }, nt = { modal: "_modal_kl0h0_1" };
491
- Oe(({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, title: o = "Chat settings", titleClassName: s = "dial-h1-text", responseFormatLabel: c, responseFormatHint: l, responseFormatMarkdownLabel: u, responseFormatPlainTextLabel: d, systemPromptLabel: f, systemPromptTooltip: p, temperatureLabel: m, temperatureLabels: h, temperatureHint: g, saveLabel: _ = "Apply changes", saveDisabledTooltip: v, backgroundClassName: y = nt.modal }) => {
492
- let { responseFormat: b, systemPrompt: w, temperature: T, canSubmit: E, setResponseFormat: D, setSystemPrompt: O, setTemperature: k, handleSubmit: A } = $e({
490
+ }, at = { modal: "_modal_kl0h0_1" };
491
+ je(({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, title: o = "Chat settings", titleClassName: s = "dial-h1-text", responseFormatLabel: c, responseFormatHint: l, responseFormatMarkdownLabel: u, responseFormatPlainTextLabel: d, systemPromptLabel: f, systemPromptTooltip: p, temperatureLabel: m, temperatureLabels: h, temperatureHint: g, saveLabel: _ = "Apply changes", saveDisabledTooltip: v, backgroundClassName: y = at.modal }) => {
492
+ let { responseFormat: b, systemPrompt: w, temperature: T, canSubmit: E, setResponseFormat: D, setSystemPrompt: O, setTemperature: k, handleSubmit: A } = nt({
493
493
  features: e,
494
494
  initialResponseFormat: t,
495
495
  initialSystemPrompt: n,
@@ -506,7 +506,7 @@ Oe(({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemp
506
506
  className: y,
507
507
  footer: /* @__PURE__ */ Y("div", {
508
508
  className: "flex justify-end px-6 py-4",
509
- children: /* @__PURE__ */ Y(j, {
509
+ children: /* @__PURE__ */ Y(M, {
510
510
  tooltip: v,
511
511
  hideTooltip: E || !v,
512
512
  children: /* @__PURE__ */ Y(C, {
@@ -516,7 +516,7 @@ Oe(({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemp
516
516
  })
517
517
  })
518
518
  }),
519
- children: /* @__PURE__ */ Y(tt, {
519
+ children: /* @__PURE__ */ Y(it, {
520
520
  features: e,
521
521
  responseFormat: b,
522
522
  systemPrompt: w,
@@ -536,97 +536,111 @@ Oe(({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemp
536
536
  })
537
537
  });
538
538
  });
539
- var rt = { activeRating: "_activeRating_7jito_1" }, it = 2e3, at = ({ role: e = s.User, onEdit: t, onEditHover: r, onDelete: i, onRegenerate: a, onCopy: c, onCopyMarkdown: l, onLike: f, onDislike: m, activeRating: _, isAlwaysVisible: v, className: y, labels: b, colors: x }) => {
540
- let { tooltips: S, ariaLabels: C } = b ?? {}, [w, T] = q(null), [E, D] = q(""), O = u({ "--ma-active-rating-text": x?.activeRatingText }), k = K(() => {
541
- c?.(), T("copy"), D(C?.copiedStatus ?? "Copied to clipboard"), setTimeout(() => T(null), it);
542
- }, [c, C?.copiedStatus]), A = K(() => {
543
- l?.(), T("markdown"), D(C?.copiedMarkdownStatus ?? "Copied as Markdown to clipboard"), setTimeout(() => T(null), it);
544
- }, [l, C?.copiedMarkdownStatus]);
539
+ var ot = { activeRating: "_activeRating_ygoee_1" }, st = 2e3, ct = ({ role: e = s.User, onEdit: t, onEditHover: r, onDelete: i, onRegenerate: a, onCopy: c, onCopyMarkdown: l, onLike: f, onDislike: m, activeRating: g, isAlwaysVisible: _, className: v, labels: y, colors: b }) => {
540
+ let { tooltips: x, ariaLabels: S } = y ?? {}, [C, w] = q(null), [T, E] = q(""), D = u({ "--ma-active-rating-text": b?.activeRatingText }), O = K(() => {
541
+ c?.(), w("copy"), E(S?.copiedStatus ?? "Copied to clipboard"), setTimeout(() => w(null), st);
542
+ }, [c, S?.copiedStatus]), k = K(() => {
543
+ l?.(), w("markdown"), E(S?.copiedMarkdownStatus ?? "Copied as Markdown to clipboard"), setTimeout(() => w(null), st);
544
+ }, [l, S?.copiedMarkdownStatus]);
545
545
  return /* @__PURE__ */ X("div", {
546
546
  role: "toolbar",
547
- "aria-label": C?.actionsGroup ?? "Message actions",
548
- style: O,
549
- className: d("flex gap-1", !v && "opacity-0 group-hover:opacity-100", y),
547
+ "aria-label": S?.actionsGroup ?? "Message actions",
548
+ style: D,
549
+ className: d("flex gap-1", !_ && "opacity-0 group-hover:opacity-100", v),
550
550
  children: [/* @__PURE__ */ Y("span", {
551
551
  role: "status",
552
552
  "aria-live": "polite",
553
553
  className: "sr-only",
554
- children: E
555
- }), e === s.User ? /* @__PURE__ */ X(J, { children: [t && /* @__PURE__ */ Y(g, {
556
- icon: /* @__PURE__ */ Y(ye, {
554
+ children: T
555
+ }), e === s.User ? /* @__PURE__ */ X(J, { children: [t && /* @__PURE__ */ Y(j, {
556
+ icon: /* @__PURE__ */ Y(be, {
557
557
  size: p.SM,
558
- "aria-hidden": !0
558
+ "aria-hidden": !0,
559
+ stroke: 1.5
559
560
  }),
560
561
  size: h.Small,
561
- "aria-label": C?.editMessage ?? "Edit message",
562
- tooltipProps: { tooltip: S?.edit ?? "Edit" },
562
+ "aria-label": S?.editMessage ?? "Edit message",
563
+ tooltipProps: { tooltip: x?.edit ?? "Edit" },
563
564
  onClick: t,
564
565
  onMouseEnter: r,
565
566
  onFocus: r
566
- }), i && /* @__PURE__ */ Y(g, {
567
- icon: /* @__PURE__ */ Y(Te, {
567
+ }), i && /* @__PURE__ */ Y(j, {
568
+ icon: /* @__PURE__ */ Y(Oe, {
568
569
  size: p.SM,
569
- "aria-hidden": !0
570
+ "aria-hidden": !0,
571
+ stroke: 1.5
570
572
  }),
571
573
  size: h.Small,
572
- "aria-label": C?.deleteMessage ?? "Delete message",
573
- tooltipProps: { tooltip: S?.delete ?? "Delete" },
574
+ "aria-label": S?.deleteMessage ?? "Delete message",
575
+ tooltipProps: { tooltip: x?.delete ?? "Delete" },
574
576
  onClick: i
575
577
  })] }) : /* @__PURE__ */ X(J, { children: [
576
- a && /* @__PURE__ */ Y(g, {
577
- icon: /* @__PURE__ */ Y(be, {
578
+ a && /* @__PURE__ */ Y(j, {
579
+ icon: /* @__PURE__ */ Y(xe, {
578
580
  size: p.SM,
579
- "aria-hidden": !0
581
+ "aria-hidden": !0,
582
+ stroke: 1.5
580
583
  }),
581
584
  size: h.Small,
582
- "aria-label": C?.regenerateResponse ?? "Regenerate response",
583
- tooltipProps: { tooltip: S?.regenerate ?? "Regenerate" },
585
+ "aria-label": S?.regenerateResponse ?? "Regenerate response",
586
+ tooltipProps: { tooltip: x?.regenerate ?? "Regenerate" },
584
587
  onClick: a
585
588
  }),
586
589
  c && /* @__PURE__ */ Y(n, {
587
590
  iconSize: p.SM,
588
- onClick: k,
591
+ onClick: O,
589
592
  size: h.Small,
590
- isCopied: w === "copy",
591
- copyLabel: S?.copy ?? "Copy",
592
- copiedLabel: S?.copied ?? "Copied!",
593
- ariaLabel: C?.copyResponse ?? "Copy response"
593
+ isCopied: C === "copy",
594
+ copyLabel: x?.copy ?? "Copy",
595
+ copiedLabel: x?.copied ?? "Copied!",
596
+ ariaLabel: S?.copyResponse ?? "Copy response"
594
597
  }),
595
598
  l && /* @__PURE__ */ Y(n, {
596
599
  iconSize: p.SM,
597
- onClick: A,
600
+ onClick: k,
598
601
  size: h.Small,
599
- isCopied: w === "markdown",
600
- iconCopy: /* @__PURE__ */ Y(ge, {
602
+ isCopied: C === "markdown",
603
+ iconCopy: /* @__PURE__ */ Y(_e, {
601
604
  size: p.SM,
602
- "aria-hidden": !0
605
+ "aria-hidden": !0,
606
+ stroke: 1.5
603
607
  }),
604
- copyLabel: S?.copyMarkdown ?? "Copy as Markdown",
605
- copiedLabel: S?.copiedMarkdown ?? "Copied!",
606
- ariaLabel: C?.copyAsMarkdown ?? "Copy as markdown"
608
+ copyLabel: x?.copyMarkdown ?? "Copy as Markdown",
609
+ copiedLabel: x?.copiedMarkdown ?? "Copied!",
610
+ ariaLabel: S?.copyAsMarkdown ?? "Copy as markdown"
607
611
  }),
608
- f && /* @__PURE__ */ Y(g, {
609
- icon: /* @__PURE__ */ Y(we, {
612
+ f && /* @__PURE__ */ Y(j, {
613
+ icon: g === o.Like ? /* @__PURE__ */ Y(De, {
614
+ className: ot.activeRating,
610
615
  size: p.SM,
616
+ stroke: 1.5,
611
617
  "aria-hidden": !0
618
+ }) : /* @__PURE__ */ Y(Ee, {
619
+ size: p.SM,
620
+ "aria-hidden": !0,
621
+ stroke: 1.5
612
622
  }),
613
623
  size: h.Small,
614
- "aria-label": C?.likeResponse ?? "Like response",
615
- "aria-pressed": _ === o.Like,
616
- className: _ === o.Like ? rt.activeRating : void 0,
617
- tooltipProps: { tooltip: S?.like ?? "Like" },
624
+ "aria-label": S?.likeResponse ?? "Like response",
625
+ "aria-pressed": g === o.Like,
626
+ tooltipProps: { tooltip: x?.like ?? "Like" },
618
627
  onClick: f
619
628
  }),
620
- m && /* @__PURE__ */ Y(g, {
621
- icon: /* @__PURE__ */ Y(Ce, {
629
+ m && /* @__PURE__ */ Y(j, {
630
+ icon: g === o.Dislike ? /* @__PURE__ */ Y(Te, {
631
+ className: ot.activeRating,
622
632
  size: p.SM,
623
- "aria-hidden": !0
633
+ "aria-hidden": !0,
634
+ stroke: 1.5
635
+ }) : /* @__PURE__ */ Y(we, {
636
+ size: p.SM,
637
+ "aria-hidden": !0,
638
+ stroke: 1.5
624
639
  }),
625
640
  size: h.Small,
626
- "aria-label": C?.dislikeResponse ?? "Dislike response",
627
- "aria-pressed": _ === o.Dislike,
628
- className: _ === o.Dislike ? rt.activeRating : void 0,
629
- tooltipProps: { tooltip: S?.dislike ?? "Dislike" },
641
+ "aria-label": S?.dislikeResponse ?? "Dislike response",
642
+ "aria-pressed": g === o.Dislike,
643
+ tooltipProps: { tooltip: x?.dislike ?? "Dislike" },
630
644
  onClick: m
631
645
  })
632
646
  ] })]
@@ -638,7 +652,7 @@ var rt = { activeRating: "_activeRating_7jito_1" }, it = 2e3, at = ({ role: e =
638
652
  collapsedText: "_collapsedText_ovjc1_15",
639
653
  startersDivider: "_startersDivider_ovjc1_26",
640
654
  text: "_text_ovjc1_30"
641
- }, ot = ({ text: e, styles: n, actions: a, hasAlwaysVisibleActions: o, isStreaming: c, attachments: l, afterContent: f, starters: p, onSelectStarter: m, deploymentIconUrl: h, deploymentDisplayName: g, markdownComponents: _, markdownClassNames: v, onAttachmentClick: y, onDownloadAll: x, onAttachmentRetry: S, codeBlockTheme: C, labels: w, selectedAttachmentId: T }) => {
655
+ }, lt = ({ text: e, styles: n, actions: a, hasAlwaysVisibleActions: o, isStreaming: c, attachments: l, afterContent: f, starters: p, onSelectStarter: m, deploymentIconUrl: h, deploymentDisplayName: g, markdownComponents: _, markdownClassNames: v, onAttachmentClick: y, onDownloadAll: x, onAttachmentRetry: S, codeBlockTheme: C, labels: w, selectedAttachmentId: T }) => {
642
656
  let { colors: E, typography: D, className: O, bubbleClassName: k } = n ?? {}, { attachmentClickLabel: A, attachmentRetryLabel: j, attachmentOpenInNewTabLabel: M, startersAriaLabel: N = "Quick reply buttons", thinkingLabel: P, codeBlockCopyLabel: F, codeBlockCopiedLabel: I, assistantMessageAriaLabel: L = "Assistant message", deploymentIconFallbackLabel: R = "AI" } = w ?? {}, z = c ? (l ?? []).filter((e) => e.type !== t.Audio) : l ?? [], B = u({
643
657
  "--cm-bubble-text": E?.text,
644
658
  "--cm-starters-divider": E?.startersDivider
@@ -673,7 +687,7 @@ var rt = { activeRating: "_activeRating_7jito_1" }, it = 2e3, at = ({ role: e =
673
687
  codeBlockTheme: C
674
688
  })
675
689
  }),
676
- /* @__PURE__ */ Y(Qe, {
690
+ /* @__PURE__ */ Y(tt, {
677
691
  attachments: z,
678
692
  onAttachmentClick: (e) => y?.(l?.find((t) => t.id === e)),
679
693
  onDownloadAll: x,
@@ -686,7 +700,7 @@ var rt = { activeRating: "_activeRating_7jito_1" }, it = 2e3, at = ({ role: e =
686
700
  selectedAttachmentId: T
687
701
  }),
688
702
  f,
689
- /* @__PURE__ */ Y(at, {
703
+ /* @__PURE__ */ Y(ct, {
690
704
  ...a,
691
705
  isAlwaysVisible: o,
692
706
  role: s.Assistant
@@ -708,7 +722,7 @@ var rt = { activeRating: "_activeRating_7jito_1" }, it = 2e3, at = ({ role: e =
708
722
  })]
709
723
  })]
710
724
  });
711
- }, st = ({ labels: { titleText: e = "Model switched.", bodyText: t } }) => /* @__PURE__ */ Y("div", {
725
+ }, ut = ({ labels: { titleText: e = "Model switched.", bodyText: t } }) => /* @__PURE__ */ Y("div", {
712
726
  role: "status",
713
727
  "aria-live": "polite",
714
728
  children: /* @__PURE__ */ Y(v, {
@@ -716,10 +730,10 @@ var rt = { activeRating: "_activeRating_7jito_1" }, it = 2e3, at = ({ role: e =
716
730
  message: t,
717
731
  textClassName: "flex-row flex-wrap gap-1"
718
732
  })
719
- }), ct = /* @__PURE__ */ function(e) {
733
+ }), dt = /* @__PURE__ */ function(e) {
720
734
  return e.Bottom = "Bottom", e.Top = "Top", e;
721
- }({}), lt = 10, ut = ({ text: e, position: t = ct.Bottom, styles: n, actions: r, hasAlwaysVisibleActions: i, attachments: a, collapsedLineCount: o = lt, labels: c, onAttachmentClick: l, onDownloadAll: m, onAttachmentRetry: g, selectedAttachmentId: _ }) => {
722
- let { colors: v, typography: b, className: x, bubbleClassName: S } = n ?? {}, { showMoreLabel: C = "Show more", showLessLabel: w = "Show less", showMoreAriaLabel: T, showLessAriaLabel: E, attachmentClickLabel: D, attachmentRetryLabel: O, attachmentOpenInNewTabLabel: k, userMessageAriaLabel: A = "User message" } = c ?? {}, { textRef: j, isTextCollapsed: P, isOverflowing: F, collapsedMaxHeight: I, expandedMaxHeight: L, isCollapsed: R, toggleCollapsed: z } = f({
735
+ }({}), ft = 10, pt = ({ text: e, position: t = dt.Bottom, styles: n, actions: r, hasAlwaysVisibleActions: i, attachments: a, collapsedLineCount: o = ft, labels: c, onAttachmentClick: l, onDownloadAll: m, onAttachmentRetry: g, selectedAttachmentId: _ }) => {
736
+ let { colors: v, typography: b, className: x, bubbleClassName: S } = n ?? {}, { showMoreLabel: C = "Show more", showLessLabel: w = "Show less", showMoreAriaLabel: T, showLessAriaLabel: E, attachmentClickLabel: D, attachmentRetryLabel: O, attachmentOpenInNewTabLabel: k, userMessageAriaLabel: A = "User message" } = c ?? {}, { textRef: j, isTextCollapsed: M, isOverflowing: F, collapsedMaxHeight: I, expandedMaxHeight: L, isCollapsed: R, toggleCollapsed: z } = f({
723
737
  text: e,
724
738
  collapsedLineCount: o
725
739
  }), B = u({
@@ -729,7 +743,7 @@ var rt = { activeRating: "_activeRating_7jito_1" }, it = 2e3, at = ({ role: e =
729
743
  "--cm-bubble-text": v?.text,
730
744
  "--cm-bubble-collapsed-height": F ? `${I}px` : void 0,
731
745
  "--cm-bubble-expanded-height": F ? `${L}px` : void 0
732
- }), V = t === ct.Top ? "rounded-ee-md rounded-se-2xl" : "rounded-se-md rounded-ee-2xl", H = d($.text, b?.fontClassName), U = T ?? C, W = E ?? w, ee = R ? C : w, te = R ? U : W, ne = R ? M : N, re = Ae();
746
+ }), V = t === dt.Top ? "rounded-ee-md rounded-se-2xl" : "rounded-se-md rounded-ee-2xl", H = d($.text, b?.fontClassName), ee = T ?? C, te = E ?? w, ne = R ? C : w, U = R ? ee : te, W = R ? N : P, re = Ne();
733
747
  return /* @__PURE__ */ Y("div", {
734
748
  role: "group",
735
749
  "aria-label": A,
@@ -738,7 +752,7 @@ var rt = { activeRating: "_activeRating_7jito_1" }, it = 2e3, at = ({ role: e =
738
752
  children: /* @__PURE__ */ X("div", {
739
753
  className: "ms-auto flex w-fit min-w-0 max-w-full flex-col items-end gap-4",
740
754
  children: [
741
- /* @__PURE__ */ Y(Qe, {
755
+ /* @__PURE__ */ Y(tt, {
742
756
  attachments: a ?? [],
743
757
  onAttachmentClick: (e) => l?.(a?.find((t) => t.id === e)),
744
758
  onDownloadAll: m,
@@ -757,19 +771,19 @@ var rt = { activeRating: "_activeRating_7jito_1" }, it = 2e3, at = ({ role: e =
757
771
  className: "flex min-w-0 flex-col items-start",
758
772
  children: [/* @__PURE__ */ Y("div", {
759
773
  id: re,
760
- className: d("relative overflow-hidden", F && $.collapsibleText, F && !R && $.expandedText, P && $.collapsedText),
774
+ className: d("relative overflow-hidden", F && $.collapsibleText, F && !R && $.expandedText, M && $.collapsedText),
761
775
  children: /* @__PURE__ */ Y("p", {
762
776
  ref: j,
763
777
  className: d(H, "whitespace-pre-wrap text-start [overflow-wrap:anywhere]"),
764
778
  children: e
765
779
  })
766
780
  }), F && /* @__PURE__ */ Y(y, {
767
- label: /* @__PURE__ */ Y(J, { children: ee }),
768
- iconBefore: /* @__PURE__ */ Y(ne, {
781
+ label: /* @__PURE__ */ Y(J, { children: ne }),
782
+ iconBefore: /* @__PURE__ */ Y(W, {
769
783
  size: p.SM,
770
784
  "aria-hidden": "true"
771
785
  }),
772
- "aria-label": te,
786
+ "aria-label": U,
773
787
  "aria-expanded": !R,
774
788
  "aria-controls": re,
775
789
  className: "mt-3",
@@ -778,7 +792,7 @@ var rt = { activeRating: "_activeRating_7jito_1" }, it = 2e3, at = ({ role: e =
778
792
  })]
779
793
  })
780
794
  }),
781
- /* @__PURE__ */ Y(at, {
795
+ /* @__PURE__ */ Y(ct, {
782
796
  ...r,
783
797
  isAlwaysVisible: i,
784
798
  role: s.User
@@ -786,16 +800,16 @@ var rt = { activeRating: "_activeRating_7jito_1" }, it = 2e3, at = ({ role: e =
786
800
  ]
787
801
  })
788
802
  });
789
- }, dt = ({ role: e, onAttachmentClick: t, markdownComponents: n, ...r }) => e === s.Status ? /* @__PURE__ */ Y(st, { labels: {
803
+ }, mt = ({ role: e, onAttachmentClick: t, markdownComponents: n, ...r }) => e === s.Status ? /* @__PURE__ */ Y(ut, { labels: {
790
804
  titleText: r.labels?.statusTitleText,
791
805
  bodyText: r.labels?.statusBodyText ?? ""
792
- } }) : e === s.User ? /* @__PURE__ */ Y(ut, {
806
+ } }) : e === s.User ? /* @__PURE__ */ Y(pt, {
793
807
  ...r,
794
808
  onAttachmentClick: t
795
- }) : /* @__PURE__ */ Y(ot, {
809
+ }) : /* @__PURE__ */ Y(lt, {
796
810
  ...r,
797
811
  markdownComponents: n,
798
812
  onAttachmentClick: t
799
813
  });
800
814
  //#endregion
801
- export { ot as AssistantMessageBubble, ct as BubblePosition, at as MessageActions, dt as MessageBubble, st as StatusMessageBubble, ut as UserMessageBubble };
815
+ export { lt as AssistantMessageBubble, dt as BubblePosition, ct as MessageActions, mt as MessageBubble, ut as StatusMessageBubble, pt 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.255",
4
+ "version": "1.1.0-dev.257",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -19,8 +19,8 @@
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.255",
23
- "@epam/ai-dial-conversation-input": "1.1.0-dev.255",
22
+ "@epam/ai-dial-chat-shared": "1.1.0-dev.257",
23
+ "@epam/ai-dial-conversation-input": "1.1.0-dev.257",
24
24
  "react-markdown": "^10.1.0",
25
25
  "@epam/ai-dial-ui-kit": "^0.14.0-dev.4"
26
26
  },