@epam/ai-dial-conversation-messages 1.1.0-dev.242 → 1.1.0-dev.244

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 +106 -105
  2. package/package.json +4 -4
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, DialRadioGroup as m, DialSlider as h, DialTooltip as g, ElementSize as _, GhostIconButton as v, Highlight as y, InfoMessageNotification as b, LinkButton as x, NeutralButton as S, Popup as C, PopupSize as w, PrimaryButton as T, RadioGroupOrientation as E, Skeleton as D, SkeletonVariant as O, Spinner as k, StaticIconButton as A, Textarea as j } from "@epam/ai-dial-ui-kit";
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
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";
@@ -89,19 +89,19 @@ var Ne = (e) => {
89
89
  typeLabel: d ? null : Le(e, n)
90
90
  };
91
91
  }, ze = "flex size-[84px] items-center justify-center rounded-xl border", Z = {
92
- tile: "_tile_3jao2_1",
93
- hovered: "_hovered_3jao2_5",
94
- selected: "_selected_3jao2_15",
95
- tileError: "_tileError_3jao2_20",
96
- nameText: "_nameText_3jao2_25",
97
- typeText: "_typeText_3jao2_29",
98
- retryIcon: "_retryIcon_3jao2_33",
99
- track: "_track_3jao2_37",
100
- actionButton: "_actionButton_3jao2_43",
101
- imageActionButton: "_imageActionButton_3jao2_47"
102
- }, Q = ({ ariaLabel: e, errorTitle: t, errorDescId: n, onClick: r, id: i, icon: a, className: o }) => /* @__PURE__ */ Y(A, {
92
+ tile: "_tile_11lkg_1",
93
+ hovered: "_hovered_11lkg_5",
94
+ selected: "_selected_11lkg_15",
95
+ tileError: "_tileError_11lkg_20",
96
+ nameText: "_nameText_11lkg_25",
97
+ typeText: "_typeText_11lkg_29",
98
+ retryIcon: "_retryIcon_11lkg_33",
99
+ track: "_track_11lkg_37",
100
+ actionButton: "_actionButton_11lkg_43",
101
+ imageActionButton: "_imageActionButton_11lkg_47"
102
+ }, Q = ({ ariaLabel: e, errorTitle: t, errorDescId: n, onClick: r, id: i, icon: a, className: o }) => /* @__PURE__ */ Y(k, {
103
103
  icon: a,
104
- size: _.Small,
104
+ size: h.Small,
105
105
  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),
106
106
  "aria-label": e,
107
107
  "aria-describedby": t ? n : void 0,
@@ -137,14 +137,14 @@ var Ne = (e) => {
137
137
  [e.Network]: "Upload failed · network error",
138
138
  [e.UnsupportedType]: "Upload failed · unsupported file type"
139
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: _ = "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: A } = t, j = O === c.Loading, M = O === 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) => {
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) => {
141
141
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), r?.(t.id));
142
142
  }, V = je(() => l ? D : Ne(D), [l, D]), H = K(() => {
143
143
  window.open(t.referenceUrl, "_blank", "noopener,noreferrer");
144
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", {
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
- children: n ? /* @__PURE__ */ Y(y, {
147
+ children: n ? /* @__PURE__ */ Y(_, {
148
148
  text: V,
149
149
  query: n,
150
150
  maxLines: 2
@@ -167,33 +167,33 @@ var Ne = (e) => {
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),
170
- children: /* @__PURE__ */ Y(k, { size: 32 })
170
+ children: /* @__PURE__ */ Y(O, { size: 32 })
171
171
  }),
172
172
  /* @__PURE__ */ X("div", {
173
173
  className: d("absolute right-0 top-0 flex gap-1"),
174
174
  children: [
175
175
  L && /* @__PURE__ */ Y(Ve, {
176
- ariaLabel: _,
176
+ ariaLabel: v,
177
177
  errorTitle: P,
178
178
  errorDescId: N,
179
179
  onClick: s,
180
180
  id: E
181
181
  }),
182
182
  R && /* @__PURE__ */ Y(Be, {
183
- ariaLabel: v,
183
+ ariaLabel: y,
184
184
  errorTitle: P,
185
185
  errorDescId: N,
186
186
  onClick: i,
187
187
  id: E
188
188
  }),
189
189
  u && /* @__PURE__ */ Y(He, {
190
- ariaLabel: v,
190
+ ariaLabel: y,
191
191
  errorTitle: P,
192
192
  errorDescId: N,
193
193
  onClick: H
194
194
  }),
195
195
  h && /* @__PURE__ */ Y(Ue, {
196
- ariaLabel: v,
196
+ ariaLabel: y,
197
197
  errorTitle: P,
198
198
  errorDescId: N,
199
199
  onClick: h,
@@ -215,7 +215,7 @@ var Ne = (e) => {
215
215
  children: /* @__PURE__ */ Y("div", {
216
216
  role: "button",
217
217
  tabIndex: 0,
218
- "aria-label": _,
218
+ "aria-label": v,
219
219
  onClick: te,
220
220
  onKeyDown: B,
221
221
  style: f,
@@ -270,8 +270,8 @@ var Ne = (e) => {
270
270
  id: h,
271
271
  className: Z.imageActionButton
272
272
  }),
273
- w !== Ke.Loaded && /* @__PURE__ */ Y(D, {
274
- variant: O.Rectangular,
273
+ w !== Ke.Loaded && /* @__PURE__ */ Y(E, {
274
+ variant: D.Rectangular,
275
275
  width: "100%",
276
276
  height: "100%",
277
277
  active: w === Ke.Loading,
@@ -341,7 +341,7 @@ var Ne = (e) => {
341
341
  headerIcon: "_headerIcon_1dmgi_1",
342
342
  headerLabel: "_headerLabel_1dmgi_2"
343
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: 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
+ 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 });
345
345
  if (e.length === 0) return null;
346
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 = () => {
347
347
  let t = e.filter((e) => e.status === c.Idle);
@@ -367,13 +367,13 @@ var Ne = (e) => {
367
367
  className: d(C?.headerLabelClassName ?? "dial-tiny-semi-text", Xe.headerLabel),
368
368
  children: M
369
369
  })]
370
- }), e.length >= 2 && (r || n) && /* @__PURE__ */ Y(v, {
370
+ }), e.length >= 2 && (r || n) && /* @__PURE__ */ Y(g, {
371
371
  icon: /* @__PURE__ */ Y(F, {
372
372
  size: p.SM,
373
373
  "aria-hidden": !0
374
374
  }),
375
- size: _.Small,
376
- "aria-label": h,
375
+ size: h.Small,
376
+ "aria-label": _,
377
377
  onClick: N
378
378
  })]
379
379
  }), /* @__PURE__ */ Y("div", {
@@ -393,7 +393,7 @@ var Ne = (e) => {
393
393
  promptLabel: b,
394
394
  pastedLabel: x,
395
395
  imageLabel: S,
396
- openInNewTabLabel: g
396
+ openInNewTabLabel: v
397
397
  },
398
398
  isSelected: e.id === s
399
399
  })
@@ -433,62 +433,63 @@ 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: g = "System prompt", systemPromptTooltip: _ = "Enter a prompt", temperatureLabel: v = "Temperature", temperatureLabels: y = [
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 = [
437
437
  "Precise",
438
438
  "Neutral",
439
439
  "Creative"
440
- ], temperatureHint: b, labelClassName: x = "!dial-small-semi-text", colors: S }) => {
441
- let C = u({ "--csf-label-text": S?.labelText }), w = d(x, et.label, "gap-1");
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");
442
442
  return /* @__PURE__ */ X("div", {
443
443
  className: "flex flex-col gap-4 px-6 pb-3",
444
- style: C,
444
+ style: S,
445
445
  children: [
446
- e.responseFormat && /* @__PURE__ */ Y(m, {
447
- fieldTitle: s,
448
- groupLabelClassName: w,
449
- containerClassName: "!gap-2",
450
- formItemChildrenClassName: "mb-2",
451
- elementId: "response-format",
452
- orientation: E.Column,
453
- activeRadioButton: t ?? l.Markdown,
454
- labelDescription: c,
455
- radioButtons: [{
456
- id: l.Markdown,
457
- name: f
446
+ e.responseFormat && /* @__PURE__ */ Y(w, {
447
+ id: "response-format",
448
+ labelProps: {
449
+ label: s,
450
+ className: C,
451
+ caption: c
452
+ },
453
+ optionsClassName: "mb-2",
454
+ orientation: T.Column,
455
+ value: t ?? l.Markdown,
456
+ items: [{
457
+ value: l.Markdown,
458
+ label: f
458
459
  }, {
459
- id: l.PlainText,
460
- name: p
460
+ value: l.PlainText,
461
+ label: p
461
462
  }],
462
463
  onChange: (e) => i(e)
463
464
  }),
464
- e.systemPrompt && /* @__PURE__ */ Y(j, {
465
+ e.systemPrompt && /* @__PURE__ */ Y(A, {
465
466
  value: n,
466
- placeholder: _,
467
+ placeholder: g,
467
468
  resize: !0,
468
469
  labelProps: {
469
- className: w,
470
- label: g
470
+ className: C,
471
+ label: h
471
472
  },
472
473
  onChange: (e) => a(e ?? "")
473
474
  }),
474
- e.temperature && /* @__PURE__ */ Y(h, {
475
+ e.temperature && /* @__PURE__ */ Y(m, {
475
476
  labelProps: {
476
- label: v,
477
- className: w,
478
- caption: b
477
+ label: _,
478
+ className: C,
479
+ caption: y
479
480
  },
480
481
  value: r,
481
482
  min: 0,
482
483
  max: 1,
483
484
  step: .1,
484
- labels: y,
485
+ labels: v,
485
486
  onChange: o
486
487
  })
487
488
  ]
488
489
  });
489
490
  }, nt = { modal: "_modal_kl0h0_1" };
490
- 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: _, saveLabel: v = "Apply changes", saveDisabledTooltip: y, backgroundClassName: b = nt.modal }) => {
491
- let { responseFormat: x, systemPrompt: S, temperature: E, canSubmit: D, setResponseFormat: O, setSystemPrompt: k, setTemperature: A, handleSubmit: j } = $e({
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({
492
493
  features: e,
493
494
  initialResponseFormat: t,
494
495
  initialSystemPrompt: n,
@@ -496,33 +497,33 @@ Oe(({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemp
496
497
  onSave: i,
497
498
  onClose: a
498
499
  });
499
- return /* @__PURE__ */ Y(C, {
500
+ return /* @__PURE__ */ Y(x, {
500
501
  open: !0,
501
502
  header: o,
502
503
  titleClassName: s,
503
- size: w.Sm,
504
+ size: S.Sm,
504
505
  onClose: a,
505
- className: b,
506
+ className: y,
506
507
  footer: /* @__PURE__ */ Y("div", {
507
508
  className: "flex justify-end px-6 py-4",
508
- children: /* @__PURE__ */ Y(g, {
509
- tooltip: y,
510
- hideTooltip: D || !y,
511
- children: /* @__PURE__ */ Y(T, {
512
- label: v,
513
- onClick: j,
514
- disabled: !D
509
+ children: /* @__PURE__ */ Y(j, {
510
+ tooltip: v,
511
+ hideTooltip: E || !v,
512
+ children: /* @__PURE__ */ Y(C, {
513
+ label: _,
514
+ onClick: A,
515
+ disabled: !E
515
516
  })
516
517
  })
517
518
  }),
518
519
  children: /* @__PURE__ */ Y(tt, {
519
520
  features: e,
520
- responseFormat: x,
521
- systemPrompt: S,
522
- temperature: E,
523
- onResponseFormatChange: O,
524
- onSystemPromptChange: k,
525
- onTemperatureChange: A,
521
+ responseFormat: b,
522
+ systemPrompt: w,
523
+ temperature: T,
524
+ onResponseFormatChange: D,
525
+ onSystemPromptChange: O,
526
+ onTemperatureChange: k,
526
527
  responseFormatLabel: c,
527
528
  responseFormatHint: l,
528
529
  responseFormatMarkdownLabel: u,
@@ -531,11 +532,11 @@ Oe(({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemp
531
532
  systemPromptTooltip: p,
532
533
  temperatureLabel: m,
533
534
  temperatureLabels: h,
534
- temperatureHint: _
535
+ temperatureHint: g
535
536
  })
536
537
  });
537
538
  });
538
- 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 }) => {
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 }) => {
539
540
  let { tooltips: S, ariaLabels: C } = b ?? {}, [w, T] = q(null), [E, D] = q(""), O = u({ "--ma-active-rating-text": x?.activeRatingText }), k = K(() => {
540
541
  c?.(), T("copy"), D(C?.copiedStatus ?? "Copied to clipboard"), setTimeout(() => T(null), it);
541
542
  }, [c, C?.copiedStatus]), A = K(() => {
@@ -545,39 +546,39 @@ var rt = { activeRating: "_activeRating_7jito_1" }, it = 2e3, at = ({ role: e =
545
546
  role: "toolbar",
546
547
  "aria-label": C?.actionsGroup ?? "Message actions",
547
548
  style: O,
548
- className: d("flex gap-1", !g && "opacity-0 group-hover:opacity-100", y),
549
+ className: d("flex gap-1", !v && "opacity-0 group-hover:opacity-100", y),
549
550
  children: [/* @__PURE__ */ Y("span", {
550
551
  role: "status",
551
552
  "aria-live": "polite",
552
553
  className: "sr-only",
553
554
  children: E
554
- }), e === s.User ? /* @__PURE__ */ X(J, { children: [t && /* @__PURE__ */ Y(v, {
555
+ }), e === s.User ? /* @__PURE__ */ X(J, { children: [t && /* @__PURE__ */ Y(g, {
555
556
  icon: /* @__PURE__ */ Y(ye, {
556
557
  size: p.SM,
557
558
  "aria-hidden": !0
558
559
  }),
559
- size: _.Small,
560
+ size: h.Small,
560
561
  "aria-label": C?.editMessage ?? "Edit message",
561
562
  tooltipProps: { tooltip: S?.edit ?? "Edit" },
562
563
  onClick: t,
563
564
  onMouseEnter: r,
564
565
  onFocus: r
565
- }), i && /* @__PURE__ */ Y(v, {
566
+ }), i && /* @__PURE__ */ Y(g, {
566
567
  icon: /* @__PURE__ */ Y(Te, {
567
568
  size: p.SM,
568
569
  "aria-hidden": !0
569
570
  }),
570
- size: _.Small,
571
+ size: h.Small,
571
572
  "aria-label": C?.deleteMessage ?? "Delete message",
572
573
  tooltipProps: { tooltip: S?.delete ?? "Delete" },
573
574
  onClick: i
574
575
  })] }) : /* @__PURE__ */ X(J, { children: [
575
- a && /* @__PURE__ */ Y(v, {
576
+ a && /* @__PURE__ */ Y(g, {
576
577
  icon: /* @__PURE__ */ Y(be, {
577
578
  size: p.SM,
578
579
  "aria-hidden": !0
579
580
  }),
580
- size: _.Small,
581
+ size: h.Small,
581
582
  "aria-label": C?.regenerateResponse ?? "Regenerate response",
582
583
  tooltipProps: { tooltip: S?.regenerate ?? "Regenerate" },
583
584
  onClick: a
@@ -585,7 +586,7 @@ var rt = { activeRating: "_activeRating_7jito_1" }, it = 2e3, at = ({ role: e =
585
586
  c && /* @__PURE__ */ Y(n, {
586
587
  iconSize: p.SM,
587
588
  onClick: k,
588
- size: _.Small,
589
+ size: h.Small,
589
590
  isCopied: w === "copy",
590
591
  copyLabel: S?.copy ?? "Copy",
591
592
  copiedLabel: S?.copied ?? "Copied!",
@@ -594,7 +595,7 @@ var rt = { activeRating: "_activeRating_7jito_1" }, it = 2e3, at = ({ role: e =
594
595
  l && /* @__PURE__ */ Y(n, {
595
596
  iconSize: p.SM,
596
597
  onClick: A,
597
- size: _.Small,
598
+ size: h.Small,
598
599
  isCopied: w === "markdown",
599
600
  iconCopy: /* @__PURE__ */ Y(ge, {
600
601
  size: p.SM,
@@ -604,27 +605,27 @@ var rt = { activeRating: "_activeRating_7jito_1" }, it = 2e3, at = ({ role: e =
604
605
  copiedLabel: S?.copiedMarkdown ?? "Copied!",
605
606
  ariaLabel: C?.copyAsMarkdown ?? "Copy as markdown"
606
607
  }),
607
- f && /* @__PURE__ */ Y(v, {
608
+ f && /* @__PURE__ */ Y(g, {
608
609
  icon: /* @__PURE__ */ Y(we, {
609
610
  size: p.SM,
610
611
  "aria-hidden": !0
611
612
  }),
612
- size: _.Small,
613
+ size: h.Small,
613
614
  "aria-label": C?.likeResponse ?? "Like response",
614
- "aria-pressed": h === o.Like,
615
- className: h === o.Like ? rt.activeRating : void 0,
615
+ "aria-pressed": _ === o.Like,
616
+ className: _ === o.Like ? rt.activeRating : void 0,
616
617
  tooltipProps: { tooltip: S?.like ?? "Like" },
617
618
  onClick: f
618
619
  }),
619
- m && /* @__PURE__ */ Y(v, {
620
+ m && /* @__PURE__ */ Y(g, {
620
621
  icon: /* @__PURE__ */ Y(Ce, {
621
622
  size: p.SM,
622
623
  "aria-hidden": !0
623
624
  }),
624
- size: _.Small,
625
+ size: h.Small,
625
626
  "aria-label": C?.dislikeResponse ?? "Dislike response",
626
- "aria-pressed": h === o.Dislike,
627
- className: h === o.Dislike ? rt.activeRating : void 0,
627
+ "aria-pressed": _ === o.Dislike,
628
+ className: _ === o.Dislike ? rt.activeRating : void 0,
628
629
  tooltipProps: { tooltip: S?.dislike ?? "Dislike" },
629
630
  onClick: m
630
631
  })
@@ -637,7 +638,7 @@ var rt = { activeRating: "_activeRating_7jito_1" }, it = 2e3, at = ({ role: e =
637
638
  collapsedText: "_collapsedText_ovjc1_15",
638
639
  startersDivider: "_startersDivider_ovjc1_26",
639
640
  text: "_text_ovjc1_30"
640
- }, 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: b, onAttachmentRetry: x, codeBlockTheme: C, labels: w, selectedAttachmentId: T }) => {
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 }) => {
641
642
  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({
642
643
  "--cm-bubble-text": E?.text,
643
644
  "--cm-starters-divider": E?.startersDivider
@@ -675,8 +676,8 @@ var rt = { activeRating: "_activeRating_7jito_1" }, it = 2e3, at = ({ role: e =
675
676
  /* @__PURE__ */ Y(Qe, {
676
677
  attachments: z,
677
678
  onAttachmentClick: (e) => y?.(l?.find((t) => t.id === e)),
678
- onDownloadAll: b,
679
- onRetry: x,
679
+ onDownloadAll: x,
680
+ onRetry: S,
680
681
  labels: {
681
682
  clickLabel: A,
682
683
  retryLabel: j,
@@ -698,7 +699,7 @@ var rt = { activeRating: "_activeRating_7jito_1" }, it = 2e3, at = ({ role: e =
698
699
  children: p.map((e, t) => /* @__PURE__ */ Y("div", {
699
700
  role: "listitem",
700
701
  className: "min-w-[40px]",
701
- children: /* @__PURE__ */ Y(S, {
702
+ children: /* @__PURE__ */ Y(b, {
702
703
  label: e.title,
703
704
  className: "min-w-[40px]",
704
705
  onClick: () => m(e)
@@ -710,15 +711,15 @@ var rt = { activeRating: "_activeRating_7jito_1" }, it = 2e3, at = ({ role: e =
710
711
  }, st = ({ labels: { titleText: e = "Model switched.", bodyText: t } }) => /* @__PURE__ */ Y("div", {
711
712
  role: "status",
712
713
  "aria-live": "polite",
713
- children: /* @__PURE__ */ Y(b, {
714
+ children: /* @__PURE__ */ Y(v, {
714
715
  title: e,
715
716
  message: t,
716
717
  textClassName: "flex-row flex-wrap gap-1"
717
718
  })
718
719
  }), ct = /* @__PURE__ */ function(e) {
719
720
  return e.Bottom = "Bottom", e.Top = "Top", e;
720
- }({}), 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 }) => {
721
- let { colors: v, typography: y, className: b, 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({
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({
722
723
  text: e,
723
724
  collapsedLineCount: o
724
725
  }), B = u({
@@ -728,12 +729,12 @@ var rt = { activeRating: "_activeRating_7jito_1" }, it = 2e3, at = ({ role: e =
728
729
  "--cm-bubble-text": v?.text,
729
730
  "--cm-bubble-collapsed-height": F ? `${I}px` : void 0,
730
731
  "--cm-bubble-expanded-height": F ? `${L}px` : void 0
731
- }), 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();
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();
732
733
  return /* @__PURE__ */ Y("div", {
733
734
  role: "group",
734
735
  "aria-label": A,
735
736
  style: B,
736
- className: d("flex w-full", b),
737
+ className: d("flex w-full", x),
737
738
  children: /* @__PURE__ */ X("div", {
738
739
  className: "ms-auto flex w-fit min-w-0 max-w-full flex-col items-end gap-4",
739
740
  children: [
@@ -741,14 +742,14 @@ var rt = { activeRating: "_activeRating_7jito_1" }, it = 2e3, at = ({ role: e =
741
742
  attachments: a ?? [],
742
743
  onAttachmentClick: (e) => l?.(a?.find((t) => t.id === e)),
743
744
  onDownloadAll: m,
744
- onRetry: h,
745
+ onRetry: g,
745
746
  labels: {
746
747
  clickLabel: D,
747
748
  retryLabel: O,
748
749
  openInNewTabLabel: k
749
750
  },
750
751
  styles: { className: "max-w-[640px]" },
751
- selectedAttachmentId: g
752
+ selectedAttachmentId: _
752
753
  }),
753
754
  e && /* @__PURE__ */ Y("div", {
754
755
  className: d($.userBubble, "flex w-fit items-center justify-end rounded-es-2xl rounded-ss-2xl border px-6 py-4", V, S),
@@ -762,7 +763,7 @@ var rt = { activeRating: "_activeRating_7jito_1" }, it = 2e3, at = ({ role: e =
762
763
  className: d(H, "whitespace-pre-wrap text-start [overflow-wrap:anywhere]"),
763
764
  children: e
764
765
  })
765
- }), F && /* @__PURE__ */ Y(x, {
766
+ }), F && /* @__PURE__ */ Y(y, {
766
767
  label: /* @__PURE__ */ Y(J, { children: ee }),
767
768
  iconBefore: /* @__PURE__ */ Y(ne, {
768
769
  size: p.SM,
@@ -773,7 +774,7 @@ var rt = { activeRating: "_activeRating_7jito_1" }, it = 2e3, at = ({ role: e =
773
774
  "aria-controls": re,
774
775
  className: "mt-3",
775
776
  onClick: z,
776
- size: _.Small
777
+ size: h.Small
777
778
  })]
778
779
  })
779
780
  }),
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.242",
4
+ "version": "1.1.0-dev.244",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -19,10 +19,10 @@
19
19
  "peerDependencies": {
20
20
  "react": "^19.0.0",
21
21
  "@tabler/icons-react": "^3.0.0",
22
- "@epam/ai-dial-chat-shared": "1.1.0-dev.242",
23
- "@epam/ai-dial-conversation-input": "1.1.0-dev.242",
22
+ "@epam/ai-dial-chat-shared": "1.1.0-dev.244",
23
+ "@epam/ai-dial-conversation-input": "1.1.0-dev.244",
24
24
  "react-markdown": "^10.1.0",
25
- "@epam/ai-dial-ui-kit": "^0.13.0-dev.26"
25
+ "@epam/ai-dial-ui-kit": "^0.14.0-dev.4"
26
26
  },
27
27
  "repository": {
28
28
  "type": "git",