@epam/ai-dial-conversation-messages 1.1.0-dev.126 → 1.1.0-dev.128

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.
Files changed (2) hide show
  1. package/index.js +87 -87
  2. package/package.json +3 -3
package/index.js CHANGED
@@ -1,5 +1,5 @@
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, DialPopup as m, DialRadioGroup as h, DialSkeleton as g, DialSkeletonVariant as _, DialSlider as v, DialTooltip as y, ElementSize as b, GhostIconButton as x, Highlight as S, InfoMessageNotification as C, Input as w, LinkButton as T, NeutralButton as E, PopupSize as D, PrimaryButton as O, RadioGroupOrientation as k, Spinner as A, StaticIconButton as j } from "@epam/ai-dial-ui-kit";
2
+ import { DIAL_ICON_SIZE as p, DialRadioGroup as m, DialSlider as h, DialTooltip as g, ElementSize as _, GhostIconButton as v, Highlight as y, InfoMessageNotification as b, Input as x, LinkButton as S, NeutralButton as C, Popup as w, PopupSize as T, PrimaryButton as E, RadioGroupOrientation as D, Skeleton as O, SkeletonVariant as k, Spinner as A, StaticIconButton as j } from "@epam/ai-dial-ui-kit";
3
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";
4
4
  import "react-dom";
5
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";
@@ -100,7 +100,7 @@ var Ne = (e) => {
100
100
  imageActionButton: "_imageActionButton_3jao2_47"
101
101
  }, Q = ({ ariaLabel: e, errorTitle: t, errorDescId: n, onClick: r, id: i, icon: a, className: o }) => /* @__PURE__ */ Y(j, {
102
102
  icon: a,
103
- size: b.Small,
103
+ size: _.Small,
104
104
  className: d("absolute end-1 top-1 opacity-0 focus-visible:opacity-100 group-focus-within/attachment-tile:opacity-100 group-hover/attachment-tile:opacity-100", Z.actionButton, o),
105
105
  "aria-label": e,
106
106
  "aria-describedby": t ? n : void 0,
@@ -136,14 +136,14 @@ var Ne = (e) => {
136
136
  [e.Network]: "Upload failed · network error",
137
137
  [e.UnsupportedType]: "Upload failed · unsupported file type"
138
138
  }, 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 }) => {
139
- let { clickLabel: _ = "Download attachment", retryLabel: v = "Retry upload", sizeLabel: y, uploadingLabel: b = "Uploading", errorReasonLabels: x, genericErrorLabel: C = "Upload failed" } = a ?? {}, { typography: w, className: T } = o ?? {}, { id: E, name: D, status: O, errorReason: k } = t, j = O === c.Loading, M = O === c.Error, N = Ae(), P = M ? k && (x?.[k] ?? We[k]) || C : "", { BottomIcon: F, typeLabel: I } = Re(t), L = !M && !j && s && !u, R = M && !!i && k !== e.UnsupportedType, z = L || R ? "pe-5" : void 0, B = (e) => {
139
+ let { clickLabel: _ = "Download attachment", retryLabel: v = "Retry upload", sizeLabel: b, uploadingLabel: x = "Uploading", errorReasonLabels: S, genericErrorLabel: C = "Upload failed" } = a ?? {}, { typography: w, className: T } = o ?? {}, { id: E, name: D, status: O, errorReason: k } = t, j = O === c.Loading, M = O === c.Error, N = Ae(), P = M ? k && (S?.[k] ?? We[k]) || C : "", { BottomIcon: F, typeLabel: I } = Re(t), L = !M && !j && s && !u, R = M && !!i && k !== e.UnsupportedType, z = L || R ? "pe-5" : void 0, B = (e) => {
140
140
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), r?.(t.id));
141
141
  }, V = je(() => l ? D : Ne(D), [l, D]), H = K(() => {
142
142
  window.open(t.referenceUrl, "_blank", "noopener,noreferrer");
143
143
  }, [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
144
  title: V,
145
145
  className: d(w?.nameClassName ?? "dial-caption-text", "line-clamp-2 min-w-0 break-all", Z.nameText, !M && z),
146
- children: n ? /* @__PURE__ */ Y(S, {
146
+ children: n ? /* @__PURE__ */ Y(y, {
147
147
  text: V,
148
148
  query: n,
149
149
  maxLines: 2
@@ -156,7 +156,7 @@ var Ne = (e) => {
156
156
  "aria-hidden": !0
157
157
  }), /* @__PURE__ */ Y("span", {
158
158
  className: d(w?.metaClassName ?? "dial-caption-text", "min-w-0 flex-1 truncate", Z.typeText),
159
- children: y ? `${I} · ${y}` : I
159
+ children: b ? `${I} · ${b}` : I
160
160
  })]
161
161
  }), te = () => {
162
162
  m && p ? p(E) : r && r(E);
@@ -164,7 +164,7 @@ var Ne = (e) => {
164
164
  W,
165
165
  ee,
166
166
  j && /* @__PURE__ */ Y("div", {
167
- "aria-label": b,
167
+ "aria-label": x,
168
168
  className: d("absolute left-[-1px] top-[-1px] flex size-full items-center justify-center rounded", Z.track),
169
169
  children: /* @__PURE__ */ Y(A, { size: 32 })
170
170
  }),
@@ -240,22 +240,22 @@ var Ne = (e) => {
240
240
  imageLoadStatus: r
241
241
  };
242
242
  }, Je = ({ attachment: e, onExpand: n, onClick: r, labels: i, onRemove: a, cssVars: o, onDownload: s, styles: c, isSelected: l }) => {
243
- let { clickLabel: u = "Open attachment", expandLabel: f = "Expand pasted text" } = i ?? {}, { className: m } = c ?? {}, { id: h, name: v } = e, y = e.previewUrl ?? e.url, b = e.type === t.Pasted && n !== void 0, { isLoading: x, isError: S, isImage: C } = je(() => Re(e), [e]), w = r !== void 0 && !b && !x && !S, { imageRef: T, imageLoadStatus: E } = qe({
244
- enabled: C,
245
- src: y
246
- }), D = () => {
247
- b && n ? n(h) : w && r && r(h);
243
+ 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({
244
+ enabled: x,
245
+ src: _
246
+ }), T = () => {
247
+ v && n ? n(h) : S && r && r(h);
248
248
  };
249
249
  return /* @__PURE__ */ Y("div", {
250
- className: d(ze, "group/attachment-tile", w && "cursor-pointer", Z.tile, l && Z.selected, m),
251
- onClick: D,
250
+ className: d(ze, "group/attachment-tile", S && "cursor-pointer", Z.tile, l && Z.selected, m),
251
+ onClick: T,
252
252
  onKeyDown: (e) => {
253
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), D());
253
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), T());
254
254
  },
255
255
  tabIndex: 0,
256
256
  role: "button",
257
257
  style: o,
258
- "aria-label": w ? u : b ? f : void 0,
258
+ "aria-label": S ? u : v ? f : void 0,
259
259
  children: /* @__PURE__ */ X("div", {
260
260
  className: "relative h-full w-full overflow-hidden",
261
261
  children: [
@@ -269,11 +269,11 @@ var Ne = (e) => {
269
269
  id: h,
270
270
  className: Z.imageActionButton
271
271
  }),
272
- E !== Ke.Loaded && /* @__PURE__ */ Y(g, {
273
- variant: _.Rectangular,
272
+ w !== Ke.Loaded && /* @__PURE__ */ Y(O, {
273
+ variant: k.Rectangular,
274
274
  width: "100%",
275
275
  height: "100%",
276
- active: E === Ke.Loading,
276
+ active: w === Ke.Loading,
277
277
  overlay: /* @__PURE__ */ Y(G, {
278
278
  size: p.LG,
279
279
  className: Z.typeText,
@@ -282,12 +282,12 @@ var Ne = (e) => {
282
282
  className: "absolute inset-0 rounded-xl"
283
283
  }),
284
284
  /* @__PURE__ */ Y("img", {
285
- ref: T,
286
- src: y,
287
- alt: v,
285
+ ref: C,
286
+ src: _,
287
+ alt: g,
288
288
  loading: "lazy",
289
289
  decoding: "async",
290
- className: d("h-full w-full rounded-xl object-cover transition-opacity duration-200", E === Ke.Loaded ? "opacity-100" : "opacity-0")
290
+ className: d("h-full w-full rounded-xl object-cover transition-opacity duration-200", w === Ke.Loaded ? "opacity-100" : "opacity-0")
291
291
  })
292
292
  ]
293
293
  })
@@ -340,9 +340,9 @@ var Ne = (e) => {
340
340
  headerIcon: "_headerIcon_1dmgi_1",
341
341
  headerLabel: "_headerLabel_1dmgi_2"
342
342
  }, Ze = (e, t) => `${e} ${t}${e === 1 ? "" : "s"}`, Qe = ({ attachments: e, onAttachmentClick: n, onDownloadAll: r, onRetry: i, labels: a, styles: o, selectedAttachmentId: s }) => {
343
- let { ariaLabel: l = "Attachments", clickLabel: f = "Download attachment", retryLabel: m = "Retry upload", downloadAllLabel: h = "Download all", openInNewTabLabel: g, getHeaderLabel: _ = (e) => Ze(e, "attachment"), promptLabel: v, pastedLabel: y, imageLabel: S } = a ?? {}, { typography: C, colors: w, className: T } = o ?? {}, E = u({ "--ai-group-text": w?.text });
343
+ let { ariaLabel: l = "Attachments", clickLabel: f = "Download attachment", retryLabel: m = "Retry upload", downloadAllLabel: h = "Download all", openInNewTabLabel: g, 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 });
344
344
  if (e.length === 0) return null;
345
- 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 = _(e.length), N = () => {
345
+ 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
346
  let t = e.filter((e) => e.status === c.Idle);
347
347
  r ? r(t) : t.forEach((e) => n?.(e.id));
348
348
  }, P = (t) => {
@@ -366,12 +366,12 @@ var Ne = (e) => {
366
366
  className: d(C?.headerLabelClassName ?? "dial-tiny-semi-text", Xe.headerLabel),
367
367
  children: M
368
368
  })]
369
- }), e.length >= 2 && (r || n) && /* @__PURE__ */ Y(x, {
369
+ }), e.length >= 2 && (r || n) && /* @__PURE__ */ Y(v, {
370
370
  icon: /* @__PURE__ */ Y(F, {
371
371
  size: p.SM,
372
372
  "aria-hidden": !0
373
373
  }),
374
- size: b.Small,
374
+ size: _.Small,
375
375
  "aria-label": h,
376
376
  onClick: N
377
377
  })]
@@ -389,8 +389,8 @@ var Ne = (e) => {
389
389
  labels: {
390
390
  clickLabel: f,
391
391
  retryLabel: m,
392
- promptLabel: v,
393
- pastedLabel: y,
392
+ promptLabel: b,
393
+ pastedLabel: x,
394
394
  imageLabel: S,
395
395
  openInNewTabLabel: g
396
396
  },
@@ -432,21 +432,21 @@ var Ne = (e) => {
432
432
  a
433
433
  ])
434
434
  };
435
- }, 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: m = "System prompt", systemPromptTooltip: g = "Enter a prompt", temperatureLabel: _ = "Temperature", temperatureLabels: y = [
435
+ }, 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: g = "System prompt", systemPromptTooltip: _ = "Enter a prompt", temperatureLabel: v = "Temperature", temperatureLabels: y = [
436
436
  "Precise",
437
437
  "Neutral",
438
438
  "Creative"
439
- ], temperatureHint: b, labelClassName: x = "!dial-small-semi-text", colors: S }) => {
440
- let C = u({ "--csf-label-text": S?.labelText }), T = d(x, et.label, "gap-1");
439
+ ], temperatureHint: b, labelClassName: S = "!dial-small-semi-text", colors: C }) => {
440
+ let w = u({ "--csf-label-text": C?.labelText }), T = d(S, et.label, "gap-1");
441
441
  return /* @__PURE__ */ X("div", {
442
442
  className: "flex flex-col gap-4 px-6 py-3",
443
- style: C,
443
+ style: w,
444
444
  children: [
445
- e.responseFormat && /* @__PURE__ */ Y(h, {
445
+ e.responseFormat && /* @__PURE__ */ Y(m, {
446
446
  fieldTitle: s,
447
447
  labelClassName: T,
448
448
  elementId: "response-format",
449
- orientation: k.Column,
449
+ orientation: D.Column,
450
450
  activeRadioButton: t ?? l.Markdown,
451
451
  labelDescription: c,
452
452
  radioButtons: [{
@@ -458,18 +458,18 @@ var Ne = (e) => {
458
458
  }],
459
459
  onChange: (e) => i(e)
460
460
  }),
461
- e.systemPrompt && /* @__PURE__ */ Y(w, {
461
+ e.systemPrompt && /* @__PURE__ */ Y(x, {
462
462
  value: n,
463
- placeholder: g,
463
+ placeholder: _,
464
464
  labelProps: {
465
465
  className: T,
466
- label: m
466
+ label: g
467
467
  },
468
468
  onChange: (e) => a(e ?? "")
469
469
  }),
470
- e.temperature && /* @__PURE__ */ Y(v, {
470
+ e.temperature && /* @__PURE__ */ Y(h, {
471
471
  labelProps: {
472
- label: _,
472
+ label: v,
473
473
  className: T,
474
474
  caption: b
475
475
  },
@@ -483,8 +483,8 @@ var Ne = (e) => {
483
483
  ]
484
484
  });
485
485
  }, nt = { modal: "_modal_od073_1" };
486
- Oe(({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, title: o = "Chat settings", responseFormatLabel: s, responseFormatHint: c, responseFormatMarkdownLabel: l, responseFormatPlainTextLabel: u, systemPromptLabel: d, systemPromptTooltip: f, temperatureLabel: p, temperatureLabels: h, temperatureHint: g, saveLabel: _ = "Apply changes", saveDisabledTooltip: v, backgroundClassName: b = nt.modal }) => {
487
- let { responseFormat: x, systemPrompt: S, temperature: C, canSubmit: w, setResponseFormat: T, setSystemPrompt: E, setTemperature: k, handleSubmit: A } = $e({
486
+ Oe(({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, title: o = "Chat settings", responseFormatLabel: s, responseFormatHint: c, responseFormatMarkdownLabel: l, responseFormatPlainTextLabel: u, systemPromptLabel: d, systemPromptTooltip: f, temperatureLabel: p, temperatureLabels: m, temperatureHint: h, saveLabel: _ = "Apply changes", saveDisabledTooltip: v, backgroundClassName: y = nt.modal }) => {
487
+ let { responseFormat: b, systemPrompt: x, temperature: S, canSubmit: C, setResponseFormat: D, setSystemPrompt: O, setTemperature: k, handleSubmit: A } = $e({
488
488
  features: e,
489
489
  initialResponseFormat: t,
490
490
  initialSystemPrompt: n,
@@ -492,31 +492,31 @@ Oe(({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemp
492
492
  onSave: i,
493
493
  onClose: a
494
494
  });
495
- return /* @__PURE__ */ Y(m, {
495
+ return /* @__PURE__ */ Y(w, {
496
496
  open: !0,
497
497
  header: o,
498
- size: D.Sm,
498
+ size: T.Sm,
499
499
  onClose: a,
500
- className: b,
500
+ className: y,
501
501
  footer: /* @__PURE__ */ Y("div", {
502
502
  className: "flex justify-end px-6 py-4",
503
- children: /* @__PURE__ */ Y(y, {
503
+ children: /* @__PURE__ */ Y(g, {
504
504
  tooltip: v,
505
- hideTooltip: w || !v,
506
- children: /* @__PURE__ */ Y(O, {
505
+ hideTooltip: C || !v,
506
+ children: /* @__PURE__ */ Y(E, {
507
507
  label: _,
508
508
  onClick: A,
509
- disabled: !w
509
+ disabled: !C
510
510
  })
511
511
  })
512
512
  }),
513
513
  children: /* @__PURE__ */ Y(tt, {
514
514
  features: e,
515
- responseFormat: x,
516
- systemPrompt: S,
517
- temperature: C,
518
- onResponseFormatChange: T,
519
- onSystemPromptChange: E,
515
+ responseFormat: b,
516
+ systemPrompt: x,
517
+ temperature: S,
518
+ onResponseFormatChange: D,
519
+ onSystemPromptChange: O,
520
520
  onTemperatureChange: k,
521
521
  responseFormatLabel: s,
522
522
  responseFormatHint: c,
@@ -525,13 +525,13 @@ Oe(({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemp
525
525
  systemPromptLabel: d,
526
526
  systemPromptTooltip: f,
527
527
  temperatureLabel: p,
528
- temperatureLabels: h,
529
- temperatureHint: g
528
+ temperatureLabels: m,
529
+ temperatureHint: h
530
530
  })
531
531
  });
532
532
  });
533
- 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: h, isAlwaysVisible: g, className: _, labels: v, colors: y }) => {
534
- let { tooltips: S, ariaLabels: C } = v ?? {}, [w, T] = q(null), [E, D] = q(""), O = u({ "--ma-active-rating-text": y?.activeRatingText }), k = K(() => {
533
+ 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: h, isAlwaysVisible: g, className: y, labels: b, colors: x }) => {
534
+ let { tooltips: S, ariaLabels: C } = b ?? {}, [w, T] = q(null), [E, D] = q(""), O = u({ "--ma-active-rating-text": x?.activeRatingText }), k = K(() => {
535
535
  c?.(), T("copy"), D(C?.copiedStatus ?? "Copied to clipboard"), setTimeout(() => T(null), it);
536
536
  }, [c, C?.copiedStatus]), A = K(() => {
537
537
  l?.(), T("markdown"), D(C?.copiedMarkdownStatus ?? "Copied as Markdown to clipboard"), setTimeout(() => T(null), it);
@@ -540,39 +540,39 @@ var rt = { activeRating: "_activeRating_7jito_1" }, it = 2e3, at = ({ role: e =
540
540
  role: "toolbar",
541
541
  "aria-label": C?.actionsGroup ?? "Message actions",
542
542
  style: O,
543
- className: d("flex gap-1", !g && "opacity-0 group-hover:opacity-100", _),
543
+ className: d("flex gap-1", !g && "opacity-0 group-hover:opacity-100", y),
544
544
  children: [/* @__PURE__ */ Y("span", {
545
545
  role: "status",
546
546
  "aria-live": "polite",
547
547
  className: "sr-only",
548
548
  children: E
549
- }), e === s.User ? /* @__PURE__ */ X(J, { children: [t && /* @__PURE__ */ Y(x, {
549
+ }), e === s.User ? /* @__PURE__ */ X(J, { children: [t && /* @__PURE__ */ Y(v, {
550
550
  icon: /* @__PURE__ */ Y(ye, {
551
551
  size: p.SM,
552
552
  "aria-hidden": !0
553
553
  }),
554
- size: b.Small,
554
+ size: _.Small,
555
555
  "aria-label": C?.editMessage ?? "Edit message",
556
556
  tooltipProps: { tooltip: S?.edit ?? "Edit" },
557
557
  onClick: t,
558
558
  onMouseEnter: r,
559
559
  onFocus: r
560
- }), i && /* @__PURE__ */ Y(x, {
560
+ }), i && /* @__PURE__ */ Y(v, {
561
561
  icon: /* @__PURE__ */ Y(Te, {
562
562
  size: p.SM,
563
563
  "aria-hidden": !0
564
564
  }),
565
- size: b.Small,
565
+ size: _.Small,
566
566
  "aria-label": C?.deleteMessage ?? "Delete message",
567
567
  tooltipProps: { tooltip: S?.delete ?? "Delete" },
568
568
  onClick: i
569
569
  })] }) : /* @__PURE__ */ X(J, { children: [
570
- a && /* @__PURE__ */ Y(x, {
570
+ a && /* @__PURE__ */ Y(v, {
571
571
  icon: /* @__PURE__ */ Y(be, {
572
572
  size: p.SM,
573
573
  "aria-hidden": !0
574
574
  }),
575
- size: b.Small,
575
+ size: _.Small,
576
576
  "aria-label": C?.regenerateResponse ?? "Regenerate response",
577
577
  tooltipProps: { tooltip: S?.regenerate ?? "Regenerate" },
578
578
  onClick: a
@@ -580,7 +580,7 @@ var rt = { activeRating: "_activeRating_7jito_1" }, it = 2e3, at = ({ role: e =
580
580
  c && /* @__PURE__ */ Y(n, {
581
581
  iconSize: p.SM,
582
582
  onClick: k,
583
- size: b.Small,
583
+ size: _.Small,
584
584
  isCopied: w === "copy",
585
585
  copyLabel: S?.copy ?? "Copy",
586
586
  copiedLabel: S?.copied ?? "Copied!",
@@ -589,7 +589,7 @@ var rt = { activeRating: "_activeRating_7jito_1" }, it = 2e3, at = ({ role: e =
589
589
  l && /* @__PURE__ */ Y(n, {
590
590
  iconSize: p.SM,
591
591
  onClick: A,
592
- size: b.Small,
592
+ size: _.Small,
593
593
  isCopied: w === "markdown",
594
594
  iconCopy: /* @__PURE__ */ Y(ge, {
595
595
  size: p.SM,
@@ -599,24 +599,24 @@ var rt = { activeRating: "_activeRating_7jito_1" }, it = 2e3, at = ({ role: e =
599
599
  copiedLabel: S?.copiedMarkdown ?? "Copied!",
600
600
  ariaLabel: C?.copyAsMarkdown ?? "Copy as markdown"
601
601
  }),
602
- f && /* @__PURE__ */ Y(x, {
602
+ f && /* @__PURE__ */ Y(v, {
603
603
  icon: /* @__PURE__ */ Y(we, {
604
604
  size: p.SM,
605
605
  "aria-hidden": !0
606
606
  }),
607
- size: b.Small,
607
+ size: _.Small,
608
608
  "aria-label": C?.likeResponse ?? "Like response",
609
609
  "aria-pressed": h === o.Like,
610
610
  className: h === o.Like ? rt.activeRating : void 0,
611
611
  tooltipProps: { tooltip: S?.like ?? "Like" },
612
612
  onClick: f
613
613
  }),
614
- m && /* @__PURE__ */ Y(x, {
614
+ m && /* @__PURE__ */ Y(v, {
615
615
  icon: /* @__PURE__ */ Y(Ce, {
616
616
  size: p.SM,
617
617
  "aria-hidden": !0
618
618
  }),
619
- size: b.Small,
619
+ size: _.Small,
620
620
  "aria-label": C?.dislikeResponse ?? "Dislike response",
621
621
  "aria-pressed": h === o.Dislike,
622
622
  className: h === o.Dislike ? rt.activeRating : void 0,
@@ -632,11 +632,11 @@ var rt = { activeRating: "_activeRating_7jito_1" }, it = 2e3, at = ({ role: e =
632
632
  collapsedText: "_collapsedText_ovjc1_15",
633
633
  startersDivider: "_startersDivider_ovjc1_26",
634
634
  text: "_text_ovjc1_30"
635
- }, ot = ({ text: e, styles: n, actions: a, hasAlwaysVisibleActions: o, isStreaming: c, attachments: l, afterContent: f, starters: p, onSelectStarter: m, deploymentIconUrl: h, deploymentDisplayName: g, markdownComponents: _, onAttachmentClick: v, onDownloadAll: y, onAttachmentRetry: b, codeBlockTheme: x, labels: S, selectedAttachmentId: C }) => {
636
- let { colors: w, typography: T, className: D, bubbleClassName: O } = n ?? {}, { attachmentClickLabel: k, attachmentRetryLabel: A, attachmentOpenInNewTabLabel: j, startersAriaLabel: M = "Quick reply buttons", thinkingLabel: N, codeBlockCopyLabel: P, codeBlockCopiedLabel: F, assistantMessageAriaLabel: I = "Assistant message", deploymentIconFallbackLabel: L = "AI" } = S ?? {}, R = c ? (l ?? []).filter((e) => e.type !== t.Audio) : l ?? [], z = u({
637
- "--cm-bubble-text": w?.text,
638
- "--cm-starters-divider": w?.startersDivider
639
- }), B = d($.text, T?.fontClassName), V = !!(h || g);
635
+ }, ot = ({ text: e, styles: n, actions: a, hasAlwaysVisibleActions: o, isStreaming: c, attachments: l, afterContent: f, starters: p, onSelectStarter: m, deploymentIconUrl: h, deploymentDisplayName: g, markdownComponents: _, onAttachmentClick: v, onDownloadAll: y, onAttachmentRetry: b, codeBlockTheme: x, labels: S, selectedAttachmentId: w }) => {
636
+ let { colors: T, typography: E, className: D, bubbleClassName: O } = n ?? {}, { attachmentClickLabel: k, attachmentRetryLabel: A, attachmentOpenInNewTabLabel: j, startersAriaLabel: M = "Quick reply buttons", thinkingLabel: N, codeBlockCopyLabel: P, codeBlockCopiedLabel: F, assistantMessageAriaLabel: I = "Assistant message", deploymentIconFallbackLabel: L = "AI" } = S ?? {}, R = c ? (l ?? []).filter((e) => e.type !== t.Audio) : l ?? [], z = u({
637
+ "--cm-bubble-text": T?.text,
638
+ "--cm-starters-divider": T?.startersDivider
639
+ }), B = d($.text, E?.fontClassName), V = !!(h || g);
640
640
  return /* @__PURE__ */ X("div", {
641
641
  role: "group",
642
642
  "aria-label": I,
@@ -676,7 +676,7 @@ var rt = { activeRating: "_activeRating_7jito_1" }, it = 2e3, at = ({ role: e =
676
676
  retryLabel: A,
677
677
  openInNewTabLabel: j
678
678
  },
679
- selectedAttachmentId: C
679
+ selectedAttachmentId: w
680
680
  }),
681
681
  f,
682
682
  /* @__PURE__ */ Y(at, {
@@ -692,7 +692,7 @@ var rt = { activeRating: "_activeRating_7jito_1" }, it = 2e3, at = ({ role: e =
692
692
  children: p.map((e, t) => /* @__PURE__ */ Y("div", {
693
693
  role: "listitem",
694
694
  className: "min-w-[40px]",
695
- children: /* @__PURE__ */ Y(E, {
695
+ children: /* @__PURE__ */ Y(C, {
696
696
  label: e.title,
697
697
  className: "min-w-[40px]",
698
698
  onClick: () => m(e)
@@ -704,7 +704,7 @@ var rt = { activeRating: "_activeRating_7jito_1" }, it = 2e3, at = ({ role: e =
704
704
  }, st = ({ labels: { titleText: e = "Model switched.", bodyText: t } }) => /* @__PURE__ */ Y("div", {
705
705
  role: "status",
706
706
  "aria-live": "polite",
707
- children: /* @__PURE__ */ Y(C, {
707
+ children: /* @__PURE__ */ Y(b, {
708
708
  title: e,
709
709
  message: t,
710
710
  textClassName: "flex-row flex-wrap gap-1"
@@ -712,22 +712,22 @@ var rt = { activeRating: "_activeRating_7jito_1" }, it = 2e3, at = ({ role: e =
712
712
  }), ct = /* @__PURE__ */ function(e) {
713
713
  return e.Bottom = "Bottom", e.Top = "Top", e;
714
714
  }({}), 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: h, selectedAttachmentId: g }) => {
715
- let { colors: _, typography: v, className: y, bubbleClassName: x } = n ?? {}, { showMoreLabel: S = "Show more", showLessLabel: C = "Show less", showMoreAriaLabel: w, 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({
715
+ let { colors: v, typography: y, className: b, bubbleClassName: x } = 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({
716
716
  text: e,
717
717
  collapsedLineCount: o
718
718
  }), B = u({
719
- "--cm-bubble-user-bg": _?.userBackground,
720
- "--cm-bubble-user-border": _?.userBorder,
721
- "--cm-bubble-fade-start": _?.fadeStart,
722
- "--cm-bubble-text": _?.text,
719
+ "--cm-bubble-user-bg": v?.userBackground,
720
+ "--cm-bubble-user-border": v?.userBorder,
721
+ "--cm-bubble-fade-start": v?.fadeStart,
722
+ "--cm-bubble-text": v?.text,
723
723
  "--cm-bubble-collapsed-height": F ? `${I}px` : void 0,
724
724
  "--cm-bubble-expanded-height": F ? `${L}px` : void 0
725
- }), V = t === ct.Top ? "rounded-ee-md rounded-se-2xl" : "rounded-se-md rounded-ee-2xl", H = d($.text, v?.fontClassName), U = w ?? S, W = E ?? C, ee = R ? S : C, te = R ? U : W, ne = R ? M : N, re = Ae();
725
+ }), V = t === ct.Top ? "rounded-ee-md rounded-se-2xl" : "rounded-se-md rounded-ee-2xl", H = d($.text, y?.fontClassName), U = T ?? C, W = E ?? w, ee = R ? C : w, te = R ? U : W, ne = R ? M : N, re = Ae();
726
726
  return /* @__PURE__ */ Y("div", {
727
727
  role: "group",
728
728
  "aria-label": A,
729
729
  style: B,
730
- className: d("flex w-full", y),
730
+ className: d("flex w-full", b),
731
731
  children: /* @__PURE__ */ X("div", {
732
732
  className: "ms-auto flex w-fit min-w-0 max-w-full flex-col items-end gap-4",
733
733
  children: [
@@ -756,7 +756,7 @@ var rt = { activeRating: "_activeRating_7jito_1" }, it = 2e3, at = ({ role: e =
756
756
  className: d(H, "whitespace-pre-wrap text-start [overflow-wrap:anywhere]"),
757
757
  children: e
758
758
  })
759
- }), F && /* @__PURE__ */ Y(T, {
759
+ }), F && /* @__PURE__ */ Y(S, {
760
760
  label: /* @__PURE__ */ Y(J, { children: ee }),
761
761
  iconBefore: /* @__PURE__ */ Y(ne, {
762
762
  size: p.SM,
@@ -767,7 +767,7 @@ var rt = { activeRating: "_activeRating_7jito_1" }, it = 2e3, at = ({ role: e =
767
767
  "aria-controls": re,
768
768
  className: "mt-3",
769
769
  onClick: z,
770
- size: b.Small
770
+ size: _.Small
771
771
  })]
772
772
  })
773
773
  }),
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.126",
4
+ "version": "1.1.0-dev.128",
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.126",
23
- "@epam/ai-dial-conversation-input": "1.1.0-dev.126",
22
+ "@epam/ai-dial-chat-shared": "1.1.0-dev.128",
23
+ "@epam/ai-dial-conversation-input": "1.1.0-dev.128",
24
24
  "react-markdown": "^10.1.0",
25
25
  "@epam/ai-dial-ui-kit": "^0.13.0-dev.26"
26
26
  },