@epam/ai-dial-conversation-messages 1.1.0-dev.61 → 1.1.0-dev.66

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":"UserMessageBubble.d.ts","sourceRoot":"","sources":["../../../src/components/MessageBubble/UserMessageBubble.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,EAAE,EAAS,MAAM,OAAO,CAAC;AAClC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAO1E,kGAAkG;AAClG,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CA0IxD,CAAC"}
1
+ {"version":3,"file":"UserMessageBubble.d.ts","sourceRoot":"","sources":["../../../src/components/MessageBubble/UserMessageBubble.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,EAAE,EAAS,MAAM,OAAO,CAAC;AAClC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAO1E,kGAAkG;AAClG,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CA0IxD,CAAC"}
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { AttachmentErrorReason as e, AttachmentType as t, DeploymentIcon as n, MDMessageViewer as r, MIME_TYPE_EXT_MAP as i, MessageRating as a, MessageRole as o, RequestStatus as s, ResponseFormat as c, buildCssVars as l, mergeClasses as u, useCollapsedText as d } from "@epam/ai-dial-chat-shared";
2
- import { DIAL_ICON_SIZE as f, DialGhostIconButton as p, DialInput as m, DialLinkButton as h, DialPopup as g, DialPrimaryButton as _, DialRadioGroup as v, DialRoundedButton as y, DialSkeleton as b, DialSkeletonVariant as x, DialSlider as S, DialTag as C, DialTooltip as w, ElementSize as T, Highlight as E, InfoMessageNotification as D, PopupSize as O, RadioGroupOrientation as k } from "@epam/ai-dial-ui-kit";
2
+ import { DIAL_ICON_SIZE as f, DialGhostIconButton as p, DialInput as m, DialPopup as h, DialRadioGroup as g, DialSkeleton as _, DialSkeletonVariant as v, DialSlider as y, DialTag as b, DialTooltip as x, ElementSize as S, Highlight as C, InfoMessageNotification as w, LinkButton as T, NeutralButton as E, PopupSize as D, PrimaryButton as O, RadioGroupOrientation as k } from "@epam/ai-dial-ui-kit";
3
3
  import { IconCheck as A, IconChevronDown as j, IconChevronUp as M, IconClipboard as N, IconCopy 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 ee, IconFileTypeHtml as te, IconFileTypeJpg as ne, IconFileTypeJs as re, IconFileTypeJsx as ie, IconFileTypePdf as ae, IconFileTypePhp as oe, IconFileTypePng as se, IconFileTypePpt as ce, IconFileTypeRs as le, IconFileTypeSql as ue, IconFileTypeSvg as de, IconFileTypeTs as fe, IconFileTypeTsx as pe, IconFileTypeTxt as me, IconFileTypeVue as he, IconFileTypeXls as ge, IconFileTypeXml as _e, IconFileTypeZip as ve, IconMarkdown as ye, IconMusic as be, IconPaperclip as xe, IconPencilMinus as Se, IconPhoto as H, IconRefresh as Ce, IconReload as we, IconTerminal2 as Te, IconThumbDown as Ee, IconThumbUp as De, IconTrashX as Oe, IconVideo as ke, IconX as Ae } from "@tabler/icons-react";
4
4
  import "react-dom";
5
5
  import { memo as je, useCallback as U, useEffect as Me, useId as Ne, useMemo as W, useRef as Pe, useState as G } from "react";
@@ -103,19 +103,19 @@ var Fe = "flex size-[84px] items-center justify-center rounded-xl border", Y = /
103
103
  visibleCount: 4,
104
104
  hiddenCount: e - 4
105
105
  }, X = {
106
- tile: "_tile_3x6ks_1",
107
- tileLight: "_tileLight_3x6ks_12",
108
- tileError: "_tileError_3x6ks_16",
109
- nameText: "_nameText_3x6ks_23",
110
- typeText: "_typeText_3x6ks_24",
111
- retryIcon: "_retryIcon_3x6ks_36",
112
- hoverIcon: "_hoverIcon_3x6ks_40",
113
- track: "_track_3x6ks_48",
114
- indeterminateFill: "_indeterminateFill_3x6ks_52",
115
- "attachment-tile-indeterminate": "_attachment-tile-indeterminate_3x6ks_1"
106
+ tile: "_tile_1khux_1",
107
+ tileLight: "_tileLight_1khux_12",
108
+ tileError: "_tileError_1khux_16",
109
+ nameText: "_nameText_1khux_23",
110
+ typeText: "_typeText_1khux_24",
111
+ retryIcon: "_retryIcon_1khux_36",
112
+ hoverIcon: "_hoverIcon_1khux_40",
113
+ track: "_track_1khux_48",
114
+ indeterminateFill: "_indeterminateFill_1khux_52",
115
+ "attachment-tile-indeterminate": "_attachment-tile-indeterminate_1khux_1"
116
116
  }, Z = ({ ariaLabel: e, errorTitle: t, errorDescId: n, onClick: r, id: i, icon: a, className: o }) => /* @__PURE__ */ q(p, {
117
117
  icon: a,
118
- size: T.Small,
118
+ size: S.Small,
119
119
  className: u("absolute end-1 top-1 h-6 w-6 rounded-lg", o ?? X.hoverIcon),
120
120
  "aria-label": e,
121
121
  "aria-describedby": t ? n : void 0,
@@ -168,7 +168,7 @@ var Fe = "flex size-[84px] items-center justify-center rounded-xl border", Y = /
168
168
  /* @__PURE__ */ q("span", {
169
169
  title: e.name,
170
170
  className: u(f?.fontClassName ?? "dial-tiny-text", "min-w-0 truncate", X.nameText),
171
- children: t ? /* @__PURE__ */ q(E, {
171
+ children: t ? /* @__PURE__ */ q(C, {
172
172
  text: e.name,
173
173
  query: t,
174
174
  maxLines: 1
@@ -293,11 +293,11 @@ var Fe = "flex size-[84px] items-center justify-center rounded-xl border", Y = /
293
293
  imageLoadStatus: r
294
294
  };
295
295
  }, Qe = ({ attachment: e, onExpand: n, onClick: r, labels: i, onRemove: a, cssVars: o, onDownload: s, styles: c }) => {
296
- let { clickLabel: l = "Open attachment", expandLabel: d = "Expand pasted text" } = i ?? {}, { typography: p, className: m } = c ?? {}, { id: h, name: g } = e, _ = e.previewUrl ?? e.url, v = e.type === t.Pasted && n !== void 0, { isLoading: y, isError: S, isImage: C } = W(() => Ve(e), [e]), w = r !== void 0 && !v && !y && !S, { imageRef: T, imageLoadStatus: E } = Ze({
296
+ let { clickLabel: l = "Open attachment", expandLabel: d = "Expand pasted text" } = i ?? {}, { typography: p, className: m } = c ?? {}, { id: h, name: g } = e, y = e.previewUrl ?? e.url, b = e.type === t.Pasted && n !== void 0, { isLoading: x, isError: S, isImage: C } = W(() => Ve(e), [e]), w = r !== void 0 && !b && !x && !S, { imageRef: T, imageLoadStatus: E } = Ze({
297
297
  enabled: C,
298
- src: _
298
+ src: y
299
299
  }), D = () => {
300
- v && n ? n(h) : w && r && r(h);
300
+ b && n ? n(h) : w && r && r(h);
301
301
  };
302
302
  return /* @__PURE__ */ q("div", {
303
303
  className: u(Fe, w && "cursor-pointer", X.tile, m),
@@ -308,7 +308,7 @@ var Fe = "flex size-[84px] items-center justify-center rounded-xl border", Y = /
308
308
  tabIndex: 0,
309
309
  role: "button",
310
310
  style: o,
311
- "aria-label": w ? l : v ? d : void 0,
311
+ "aria-label": w ? l : b ? d : void 0,
312
312
  children: /* @__PURE__ */ J("div", {
313
313
  className: "relative h-full w-full overflow-hidden",
314
314
  children: [
@@ -320,8 +320,8 @@ var Fe = "flex size-[84px] items-center justify-center rounded-xl border", Y = /
320
320
  onClick: s,
321
321
  id: h
322
322
  }),
323
- E !== Xe.Loaded && /* @__PURE__ */ q(b, {
324
- variant: x.Rectangular,
323
+ E !== Xe.Loaded && /* @__PURE__ */ q(_, {
324
+ variant: v.Rectangular,
325
325
  width: "100%",
326
326
  height: "100%",
327
327
  active: E === Xe.Loading,
@@ -334,7 +334,7 @@ var Fe = "flex size-[84px] items-center justify-center rounded-xl border", Y = /
334
334
  }),
335
335
  /* @__PURE__ */ q("img", {
336
336
  ref: T,
337
- src: _,
337
+ src: y,
338
338
  alt: g,
339
339
  loading: "lazy",
340
340
  decoding: "async",
@@ -391,7 +391,7 @@ var Fe = "flex size-[84px] items-center justify-center rounded-xl border", Y = /
391
391
  cssVars: m,
392
392
  isExpandable: p
393
393
  });
394
- }, et = { tile: "_tile_nzsrz_1" }, tt = ({ count: e, onClick: t, labels: n, children: r, styles: i }) => {
394
+ }, et = { tile: "_tile_1m13z_1" }, tt = ({ count: e, onClick: t, labels: n, children: r, styles: i }) => {
395
395
  let { ariaLabel: a } = n ?? {}, { typography: { fontClassName: o = "dial-small-semi-text" } = {}, className: s, colors: c } = i ?? {}, d = l({
396
396
  "--ci-more-tile-bg": c?.background,
397
397
  "--ci-more-tile-border": c?.border,
@@ -413,11 +413,11 @@ var Fe = "flex size-[84px] items-center justify-center rounded-xl border", Y = /
413
413
  })
414
414
  });
415
415
  }, Q = {
416
- container: "_container_7fktb_1",
417
- headerIcon: "_headerIcon_7fktb_6",
418
- headerLabel: "_headerLabel_7fktb_7",
419
- downloadAllButton: "_downloadAllButton_7fktb_8",
420
- imageTile: "_imageTile_7fktb_12"
416
+ container: "_container_109up_1",
417
+ headerIcon: "_headerIcon_109up_6",
418
+ headerLabel: "_headerLabel_109up_7",
419
+ downloadAllButton: "_downloadAllButton_109up_8",
420
+ imageTile: "_imageTile_109up_12"
421
421
  }, nt = (e, t) => `${e} ${t}${e === 1 ? "" : "s"}`, rt = ({ attachments: e, onAttachmentClick: n, onDownloadAll: r, onRetry: i, labels: a, styles: o }) => {
422
422
  let { ariaLabel: c = "Attachments", clickLabel: d = "Download attachment", retryLabel: m = "Retry upload", showLessLabel: h = "Show less", downloadAllLabel: g = "Download all", openInNewTabLabel: _, getHeaderLabel: v = (e) => nt(e, "attachment"), promptLabel: y, pastedLabel: b, imageLabel: x } = a ?? {}, { typography: { headerLabelClassName: S = "dial-tiny-semi-text" } = {}, colors: C, className: w } = o ?? {}, T = l({
423
423
  "--ci-group-bg": C?.background,
@@ -503,32 +503,7 @@ var Fe = "flex size-[84px] items-center justify-center rounded-xl border", Y = /
503
503
  ]
504
504
  })]
505
505
  });
506
- }, it = {
507
- tabContainer: "_tabContainer_rzv03_1",
508
- tabActive: "_tabActive_rzv03_13"
509
- };
510
- je(({ tabs: e, activeTabId: t, onTabChange: n, styles: r }) => {
511
- let { tabClassName: i = "dial-tiny-semi-text" } = r?.typography ?? {};
512
- return /* @__PURE__ */ q("div", {
513
- className: "flex flex-nowrap gap-1",
514
- role: "tablist",
515
- children: e.map((e) => {
516
- let r = t === e.id;
517
- return /* @__PURE__ */ q("div", {
518
- role: "tab",
519
- "aria-selected": r,
520
- className: "contents",
521
- children: /* @__PURE__ */ q(C, {
522
- label: e.label,
523
- selected: r,
524
- onClick: () => n(e.id),
525
- className: u("box-border h-auto shrink-0 justify-center rounded-full p-2 text-center", i, it.tabContainer, r && it.tabActive)
526
- })
527
- }, e.id);
528
- })
529
- });
530
- });
531
- var at = (e) => /* @__PURE__ */ q(_, { ...e }), ot = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, isOpen: o }) => {
506
+ }, it = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, isOpen: o }) => {
532
507
  let [s, c] = G(t), [l, u] = G(n), [d, f] = G(r), p = Pe(o);
533
508
  Me(() => {
534
509
  o && !p.current && (c(t), u(n), f(r)), p.current = o;
@@ -561,16 +536,16 @@ var at = (e) => /* @__PURE__ */ q(_, { ...e }), ot = ({ features: e, initialResp
561
536
  a
562
537
  ])
563
538
  };
564
- }, st = "!dial-small-semi-text !text-primary gap-1", ct = ({ features: e, responseFormat: t, systemPrompt: n, temperature: r, onResponseFormatChange: i, onSystemPromptChange: a, onTemperatureChange: o, responseFormatLabel: s = "Response format", responseFormatHint: l = "Applies to new and existing messages", responseFormatMarkdownLabel: u = "Markdown", responseFormatPlainTextLabel: d = "Plain text", systemPromptLabel: f = "System prompt", systemPromptTooltip: p = "Enter a prompt", temperatureLabel: h = "Temperature", temperatureLabels: g = [
539
+ }, at = "!dial-small-semi-text !text-primary gap-1", ot = ({ features: e, responseFormat: t, systemPrompt: n, temperature: r, onResponseFormatChange: i, onSystemPromptChange: a, onTemperatureChange: o, responseFormatLabel: s = "Response format", responseFormatHint: l = "Applies to new and existing messages", responseFormatMarkdownLabel: u = "Markdown", responseFormatPlainTextLabel: d = "Plain text", systemPromptLabel: f = "System prompt", systemPromptTooltip: p = "Enter a prompt", temperatureLabel: h = "Temperature", temperatureLabels: _ = [
565
540
  "Precise",
566
541
  "Neutral",
567
542
  "Creative"
568
- ], temperatureHint: _ }) => /* @__PURE__ */ J("div", {
543
+ ], temperatureHint: v }) => /* @__PURE__ */ J("div", {
569
544
  className: "flex flex-col gap-4 px-6 py-3",
570
545
  children: [
571
- e.responseFormat && /* @__PURE__ */ q(v, {
546
+ e.responseFormat && /* @__PURE__ */ q(g, {
572
547
  fieldTitle: s,
573
- labelClassName: st,
548
+ labelClassName: at,
574
549
  elementId: "response-format",
575
550
  orientation: k.Column,
576
551
  activeRadioButton: t ?? c.Markdown,
@@ -588,28 +563,28 @@ var at = (e) => /* @__PURE__ */ q(_, { ...e }), ot = ({ features: e, initialResp
588
563
  value: n,
589
564
  placeholder: p,
590
565
  labelProps: {
591
- className: st,
566
+ className: at,
592
567
  label: f
593
568
  },
594
569
  onChange: (e) => a(e ?? "")
595
570
  }),
596
- e.temperature && /* @__PURE__ */ q(S, {
571
+ e.temperature && /* @__PURE__ */ q(y, {
597
572
  labelProps: {
598
573
  label: h,
599
- className: st,
600
- caption: _
574
+ className: at,
575
+ caption: v
601
576
  },
602
577
  value: r,
603
578
  min: 0,
604
579
  max: 1,
605
580
  step: .1,
606
- labels: g,
581
+ labels: _,
607
582
  onChange: o
608
583
  })
609
584
  ]
610
585
  });
611
- je(({ 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 }) => {
612
- let { responseFormat: y, systemPrompt: b, temperature: x, canSubmit: S, setResponseFormat: C, setSystemPrompt: T, setTemperature: E, handleSubmit: D } = ot({
586
+ je(({ 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: g, saveLabel: _ = "Apply changes", saveDisabledTooltip: v }) => {
587
+ let { responseFormat: y, systemPrompt: b, temperature: S, canSubmit: C, setResponseFormat: w, setSystemPrompt: T, setTemperature: E, handleSubmit: k } = it({
613
588
  features: e,
614
589
  initialResponseFormat: t,
615
590
  initialSystemPrompt: n,
@@ -617,30 +592,30 @@ je(({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemp
617
592
  onSave: i,
618
593
  onClose: a
619
594
  });
620
- return /* @__PURE__ */ q(g, {
595
+ return /* @__PURE__ */ q(h, {
621
596
  open: !0,
622
597
  header: o,
623
- size: O.Sm,
598
+ size: D.Sm,
624
599
  onClose: a,
625
600
  className: "!bg-layer-2",
626
601
  footer: /* @__PURE__ */ q("div", {
627
602
  className: "flex justify-end px-6 py-4",
628
- children: /* @__PURE__ */ q(w, {
603
+ children: /* @__PURE__ */ q(x, {
629
604
  tooltip: v,
630
- hideTooltip: S || !v,
631
- children: /* @__PURE__ */ q(at, {
605
+ hideTooltip: C || !v,
606
+ children: /* @__PURE__ */ q(O, {
632
607
  label: _,
633
- onClick: D,
634
- disabled: !S
608
+ onClick: k,
609
+ disabled: !C
635
610
  })
636
611
  })
637
612
  }),
638
- children: /* @__PURE__ */ q(ct, {
613
+ children: /* @__PURE__ */ q(ot, {
639
614
  features: e,
640
615
  responseFormat: y,
641
616
  systemPrompt: b,
642
- temperature: x,
643
- onResponseFormatChange: C,
617
+ temperature: S,
618
+ onResponseFormatChange: w,
644
619
  onSystemPromptChange: T,
645
620
  onTemperatureChange: E,
646
621
  responseFormatLabel: s,
@@ -651,17 +626,42 @@ je(({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemp
651
626
  systemPromptTooltip: f,
652
627
  temperatureLabel: p,
653
628
  temperatureLabels: m,
654
- temperatureHint: h
629
+ temperatureHint: g
630
+ })
631
+ });
632
+ });
633
+ var st = {
634
+ tabContainer: "_tabContainer_153ct_1",
635
+ tabActive: "_tabActive_153ct_13"
636
+ };
637
+ je(({ tabs: e, activeTabId: t, onTabChange: n, styles: r }) => {
638
+ let { tabClassName: i = "dial-tiny-semi-text" } = r?.typography ?? {};
639
+ return /* @__PURE__ */ q("div", {
640
+ className: "flex flex-nowrap gap-1",
641
+ role: "tablist",
642
+ children: e.map((e) => {
643
+ let r = t === e.id;
644
+ return /* @__PURE__ */ q("div", {
645
+ role: "tab",
646
+ "aria-selected": r,
647
+ className: "contents",
648
+ children: /* @__PURE__ */ q(b, {
649
+ label: e.label,
650
+ selected: r,
651
+ onClick: () => n(e.id),
652
+ className: u("box-border h-auto shrink-0 justify-center rounded-full p-2 text-center", i, st.tabContainer, r && st.tabActive)
653
+ })
654
+ }, e.id);
655
655
  })
656
656
  });
657
657
  });
658
658
  //#endregion
659
659
  //#region src/components/MessageActions/MessageActions.tsx
660
- var lt = 2e3, ut = ({ role: e = o.User, onEdit: t, onEditHover: n, onDelete: r, onRegenerate: i, onCopy: s, onCopyMarkdown: c, onLike: l, onDislike: d, activeRating: m, isAlwaysVisible: h, className: g, labels: _ }) => {
661
- let { tooltips: v, ariaLabels: y } = _ ?? {}, [b, x] = G(null), [S, C] = G(""), w = U(() => {
662
- s?.(), x("copy"), C(y?.copiedStatus ?? "Copied to clipboard"), setTimeout(() => x(null), lt);
660
+ var ct = 2e3, lt = ({ role: e = o.User, onEdit: t, onEditHover: n, onDelete: r, onRegenerate: i, onCopy: s, onCopyMarkdown: c, onLike: l, onDislike: d, activeRating: m, isAlwaysVisible: h, className: g, labels: _ }) => {
661
+ let { tooltips: v, ariaLabels: y } = _ ?? {}, [b, x] = G(null), [C, w] = G(""), T = U(() => {
662
+ s?.(), x("copy"), w(y?.copiedStatus ?? "Copied to clipboard"), setTimeout(() => x(null), ct);
663
663
  }, [s, y?.copiedStatus]), E = U(() => {
664
- c?.(), x("markdown"), C(y?.copiedMarkdownStatus ?? "Copied as Markdown to clipboard"), setTimeout(() => x(null), lt);
664
+ c?.(), x("markdown"), w(y?.copiedMarkdownStatus ?? "Copied as Markdown to clipboard"), setTimeout(() => x(null), ct);
665
665
  }, [c, y?.copiedMarkdownStatus]);
666
666
  return /* @__PURE__ */ J("div", {
667
667
  role: "toolbar",
@@ -671,13 +671,13 @@ var lt = 2e3, ut = ({ role: e = o.User, onEdit: t, onEditHover: n, onDelete: r,
671
671
  role: "status",
672
672
  "aria-live": "polite",
673
673
  className: "sr-only",
674
- children: S
674
+ children: C
675
675
  }), e === o.User ? /* @__PURE__ */ J(K, { children: [t && /* @__PURE__ */ q(p, {
676
676
  icon: /* @__PURE__ */ q(Se, {
677
677
  size: f.SM,
678
678
  "aria-hidden": !0
679
679
  }),
680
- size: T.Small,
680
+ size: S.Small,
681
681
  "aria-label": y?.editMessage ?? "Edit message",
682
682
  tooltipProps: { tooltip: v?.edit ?? "Edit" },
683
683
  onClick: t,
@@ -688,7 +688,7 @@ var lt = 2e3, ut = ({ role: e = o.User, onEdit: t, onEditHover: n, onDelete: r,
688
688
  size: f.SM,
689
689
  "aria-hidden": !0
690
690
  }),
691
- size: T.Small,
691
+ size: S.Small,
692
692
  "aria-label": y?.deleteMessage ?? "Delete message",
693
693
  tooltipProps: { tooltip: v?.delete ?? "Delete" },
694
694
  onClick: r
@@ -698,7 +698,7 @@ var lt = 2e3, ut = ({ role: e = o.User, onEdit: t, onEditHover: n, onDelete: r,
698
698
  size: f.SM,
699
699
  "aria-hidden": !0
700
700
  }),
701
- size: T.Small,
701
+ size: S.Small,
702
702
  "aria-label": y?.regenerateResponse ?? "Regenerate response",
703
703
  tooltipProps: { tooltip: v?.regenerate ?? "Regenerate" },
704
704
  onClick: i
@@ -708,17 +708,17 @@ var lt = 2e3, ut = ({ role: e = o.User, onEdit: t, onEditHover: n, onDelete: r,
708
708
  size: f.SM,
709
709
  "aria-hidden": !0
710
710
  }),
711
- size: T.Small,
711
+ size: S.Small,
712
712
  "aria-label": y?.copyResponse ?? "Copy response",
713
713
  tooltipProps: { tooltip: b === "copy" ? v?.copied ?? "Copied!" : v?.copy ?? "Copy" },
714
- onClick: w
714
+ onClick: T
715
715
  }),
716
716
  c && /* @__PURE__ */ q(p, {
717
717
  icon: q(b === "markdown" ? A : ye, {
718
718
  size: f.SM,
719
719
  "aria-hidden": !0
720
720
  }),
721
- size: T.Small,
721
+ size: S.Small,
722
722
  "aria-label": y?.copyAsMarkdown ?? "Copy as markdown",
723
723
  tooltipProps: { tooltip: b === "markdown" ? v?.copiedMarkdown ?? "Copied!" : v?.copyMarkdown ?? "Copy as Markdown" },
724
724
  onClick: E
@@ -728,7 +728,7 @@ var lt = 2e3, ut = ({ role: e = o.User, onEdit: t, onEditHover: n, onDelete: r,
728
728
  size: f.SM,
729
729
  "aria-hidden": !0
730
730
  }),
731
- size: T.Small,
731
+ size: S.Small,
732
732
  "aria-label": y?.likeResponse ?? "Like response",
733
733
  "aria-pressed": m === a.Like,
734
734
  className: m === a.Like ? "!text-accent-primary" : void 0,
@@ -740,7 +740,7 @@ var lt = 2e3, ut = ({ role: e = o.User, onEdit: t, onEditHover: n, onDelete: r,
740
740
  size: f.SM,
741
741
  "aria-hidden": !0
742
742
  }),
743
- size: T.Small,
743
+ size: S.Small,
744
744
  "aria-label": y?.dislikeResponse ?? "Dislike response",
745
745
  "aria-pressed": m === a.Dislike,
746
746
  className: m === a.Dislike ? "!text-accent-primary" : void 0,
@@ -756,16 +756,16 @@ var lt = 2e3, ut = ({ role: e = o.User, onEdit: t, onEditHover: n, onDelete: r,
756
756
  collapsedText: "_collapsedText_1tjh8_15",
757
757
  startersDivider: "_startersDivider_1tjh8_26",
758
758
  text: "_text_1tjh8_30"
759
- }, dt = ({ text: e, styles: i, actions: a, hasAlwaysVisibleActions: s, isStreaming: c, attachments: d, afterContent: f, starters: p, onSelectStarter: m, deploymentIconUrl: h, deploymentDisplayName: g, markdownComponents: _, onAttachmentClick: v, onDownloadAll: b, onAttachmentRetry: x, codeBlockTheme: S, labels: C }) => {
760
- let { colors: w, typography: T, className: E, bubbleClassName: D } = i ?? {}, { attachmentClickLabel: O, attachmentRetryLabel: k, attachmentOpenInNewTabLabel: A, startersAriaLabel: j = "Quick reply buttons", thinkingLabel: M, codeBlockCopyLabel: N, codeBlockCopiedLabel: P, assistantMessageAriaLabel: F = "Assistant message", deploymentIconFallbackLabel: I = "AI" } = C ?? {}, L = c ? (d ?? []).filter((e) => e.type !== t.Audio) : d ?? [], R = l({
761
- "--cm-bubble-text": w?.text,
762
- "--cm-starters-divider": w?.startersDivider
763
- }), z = u($.text, T?.fontClassName), B = !!(h || g);
759
+ }, ut = ({ text: e, styles: i, actions: a, hasAlwaysVisibleActions: s, isStreaming: c, attachments: d, afterContent: f, starters: p, onSelectStarter: m, deploymentIconUrl: h, deploymentDisplayName: g, markdownComponents: _, onAttachmentClick: v, onDownloadAll: y, onAttachmentRetry: b, codeBlockTheme: x, labels: S }) => {
760
+ let { colors: C, typography: w, className: T, bubbleClassName: D } = i ?? {}, { attachmentClickLabel: O, attachmentRetryLabel: k, attachmentOpenInNewTabLabel: A, startersAriaLabel: j = "Quick reply buttons", thinkingLabel: M, codeBlockCopyLabel: N, codeBlockCopiedLabel: P, assistantMessageAriaLabel: F = "Assistant message", deploymentIconFallbackLabel: I = "AI" } = S ?? {}, L = c ? (d ?? []).filter((e) => e.type !== t.Audio) : d ?? [], R = l({
761
+ "--cm-bubble-text": C?.text,
762
+ "--cm-starters-divider": C?.startersDivider
763
+ }), z = u($.text, w?.fontClassName), B = !!(h || g);
764
764
  return /* @__PURE__ */ J("div", {
765
765
  role: "group",
766
766
  "aria-label": F,
767
767
  style: R,
768
- className: u("flex w-full items-start gap-3", E),
768
+ className: u("flex w-full items-start gap-3", T),
769
769
  children: [B && /* @__PURE__ */ q(n, {
770
770
  src: h,
771
771
  size: 28,
@@ -787,14 +787,14 @@ var lt = 2e3, ut = ({ role: e = o.User, onEdit: t, onEditHover: n, onDelete: r,
787
787
  components: _,
788
788
  codeBlockCopyLabel: N,
789
789
  codeBlockCopiedLabel: P,
790
- codeBlockTheme: S
790
+ codeBlockTheme: x
791
791
  })
792
792
  }),
793
793
  /* @__PURE__ */ q(rt, {
794
794
  attachments: L,
795
795
  onAttachmentClick: (e) => v?.(d?.find((t) => t.id === e)),
796
- onDownloadAll: b,
797
- onRetry: x,
796
+ onDownloadAll: y,
797
+ onRetry: b,
798
798
  labels: {
799
799
  clickLabel: O,
800
800
  retryLabel: k,
@@ -802,7 +802,7 @@ var lt = 2e3, ut = ({ role: e = o.User, onEdit: t, onEditHover: n, onDelete: r,
802
802
  }
803
803
  }),
804
804
  f,
805
- /* @__PURE__ */ q(ut, {
805
+ /* @__PURE__ */ q(lt, {
806
806
  ...a,
807
807
  isAlwaysVisible: s,
808
808
  role: o.Assistant
@@ -815,7 +815,7 @@ var lt = 2e3, ut = ({ role: e = o.User, onEdit: t, onEditHover: n, onDelete: r,
815
815
  children: p.map((e, t) => /* @__PURE__ */ q("div", {
816
816
  role: "listitem",
817
817
  className: "min-w-[40px]",
818
- children: /* @__PURE__ */ q(y, {
818
+ children: /* @__PURE__ */ q(E, {
819
819
  label: e.title,
820
820
  className: "min-w-[40px]",
821
821
  onClick: () => m(e)
@@ -824,33 +824,33 @@ var lt = 2e3, ut = ({ role: e = o.User, onEdit: t, onEditHover: n, onDelete: r,
824
824
  })]
825
825
  })]
826
826
  });
827
- }, ft = ({ labels: { titleText: e = "Model switched.", bodyText: t } }) => /* @__PURE__ */ q("div", {
827
+ }, dt = ({ labels: { titleText: e = "Model switched.", bodyText: t } }) => /* @__PURE__ */ q("div", {
828
828
  role: "status",
829
829
  "aria-live": "polite",
830
- children: /* @__PURE__ */ q(D, {
830
+ children: /* @__PURE__ */ q(w, {
831
831
  title: e,
832
832
  message: t,
833
833
  textClassName: "flex-row flex-wrap gap-1"
834
834
  })
835
- }), pt = /* @__PURE__ */ function(e) {
835
+ }), ft = /* @__PURE__ */ function(e) {
836
836
  return e.Bottom = "Bottom", e.Top = "Top", e;
837
- }({}), mt = 10, ht = ({ text: e, position: t = pt.Bottom, styles: n, actions: r, hasAlwaysVisibleActions: i, attachments: a, collapsedLineCount: s = mt, labels: c, onAttachmentClick: p, onDownloadAll: m, onAttachmentRetry: g }) => {
838
- let { colors: _, typography: v, className: y, bubbleClassName: b } = n ?? {}, { showMoreLabel: x = "Show more", showLessLabel: S = "Show less", showMoreAriaLabel: C, showLessAriaLabel: w, attachmentClickLabel: E, attachmentRetryLabel: D, attachmentOpenInNewTabLabel: O, userMessageAriaLabel: k = "User message" } = c ?? {}, { textRef: A, isTextCollapsed: N, isOverflowing: P, collapsedMaxHeight: F, expandedMaxHeight: I, isCollapsed: L, toggleCollapsed: R } = d({
837
+ }({}), pt = 10, mt = ({ text: e, position: t = ft.Bottom, styles: n, actions: r, hasAlwaysVisibleActions: i, attachments: a, collapsedLineCount: s = pt, labels: c, onAttachmentClick: p, onDownloadAll: m, onAttachmentRetry: h }) => {
838
+ let { colors: g, typography: _, className: v, bubbleClassName: y } = n ?? {}, { showMoreLabel: b = "Show more", showLessLabel: x = "Show less", showMoreAriaLabel: C, showLessAriaLabel: w, attachmentClickLabel: E, attachmentRetryLabel: D, attachmentOpenInNewTabLabel: O, userMessageAriaLabel: k = "User message" } = c ?? {}, { textRef: A, isTextCollapsed: N, isOverflowing: P, collapsedMaxHeight: F, expandedMaxHeight: I, isCollapsed: L, toggleCollapsed: R } = d({
839
839
  text: e,
840
840
  collapsedLineCount: s
841
841
  }), z = l({
842
- "--cm-bubble-user-bg": _?.userBackground,
843
- "--cm-bubble-user-border": _?.userBorder,
844
- "--cm-bubble-fade-start": _?.fadeStart,
845
- "--cm-bubble-text": _?.text,
842
+ "--cm-bubble-user-bg": g?.userBackground,
843
+ "--cm-bubble-user-border": g?.userBorder,
844
+ "--cm-bubble-fade-start": g?.fadeStart,
845
+ "--cm-bubble-text": g?.text,
846
846
  "--cm-bubble-collapsed-height": P ? `${F}px` : void 0,
847
847
  "--cm-bubble-expanded-height": P ? `${I}px` : void 0
848
- }), B = t === pt.Top ? "rounded-ee-md rounded-se-2xl" : "rounded-se-md rounded-ee-2xl", V = u($.text, v?.fontClassName), ee = C ?? x, te = w ?? S, ne = L ? x : S, re = L ? ee : te, ie = L ? j : M, ae = Ne();
848
+ }), B = t === ft.Top ? "rounded-ee-md rounded-se-2xl" : "rounded-se-md rounded-ee-2xl", V = u($.text, _?.fontClassName), ee = C ?? b, te = w ?? x, ne = L ? b : x, re = L ? ee : te, ie = L ? j : M, ae = Ne();
849
849
  return /* @__PURE__ */ q("div", {
850
850
  role: "group",
851
851
  "aria-label": k,
852
852
  style: z,
853
- className: u("flex w-full", y),
853
+ className: u("flex w-full", v),
854
854
  children: /* @__PURE__ */ J("div", {
855
855
  className: "ms-auto flex w-fit min-w-0 max-w-full flex-col items-end gap-4",
856
856
  children: [
@@ -858,7 +858,7 @@ var lt = 2e3, ut = ({ role: e = o.User, onEdit: t, onEditHover: n, onDelete: r,
858
858
  attachments: a ?? [],
859
859
  onAttachmentClick: (e) => p?.(a?.find((t) => t.id === e)),
860
860
  onDownloadAll: m,
861
- onRetry: g,
861
+ onRetry: h,
862
862
  labels: {
863
863
  clickLabel: E,
864
864
  retryLabel: D,
@@ -867,7 +867,7 @@ var lt = 2e3, ut = ({ role: e = o.User, onEdit: t, onEditHover: n, onDelete: r,
867
867
  styles: { className: "max-w-[640px]" }
868
868
  }),
869
869
  e && /* @__PURE__ */ q("div", {
870
- className: u($.userBubble, "flex w-fit items-center justify-end rounded-es-2xl rounded-ss-2xl border px-6 py-4", B, b),
870
+ className: u($.userBubble, "flex w-fit items-center justify-end rounded-es-2xl rounded-ss-2xl border px-6 py-4", B, y),
871
871
  children: /* @__PURE__ */ J("div", {
872
872
  className: "flex min-w-0 flex-col items-start",
873
873
  children: [/* @__PURE__ */ q("div", {
@@ -878,7 +878,7 @@ var lt = 2e3, ut = ({ role: e = o.User, onEdit: t, onEditHover: n, onDelete: r,
878
878
  className: u(V, "whitespace-pre-wrap text-start [overflow-wrap:anywhere]"),
879
879
  children: e
880
880
  })
881
- }), P && /* @__PURE__ */ q(h, {
881
+ }), P && /* @__PURE__ */ q(T, {
882
882
  label: /* @__PURE__ */ q(K, { children: ne }),
883
883
  iconBefore: /* @__PURE__ */ q(ie, {
884
884
  size: f.SM,
@@ -889,11 +889,11 @@ var lt = 2e3, ut = ({ role: e = o.User, onEdit: t, onEditHover: n, onDelete: r,
889
889
  "aria-controls": ae,
890
890
  className: "mt-3",
891
891
  onClick: R,
892
- size: T.Small
892
+ size: S.Small
893
893
  })]
894
894
  })
895
895
  }),
896
- /* @__PURE__ */ q(ut, {
896
+ /* @__PURE__ */ q(lt, {
897
897
  ...r,
898
898
  isAlwaysVisible: i,
899
899
  role: o.User
@@ -901,16 +901,16 @@ var lt = 2e3, ut = ({ role: e = o.User, onEdit: t, onEditHover: n, onDelete: r,
901
901
  ]
902
902
  })
903
903
  });
904
- }, gt = ({ role: e, onAttachmentClick: t, markdownComponents: n, ...r }) => e === o.Status ? /* @__PURE__ */ q(ft, { labels: {
904
+ }, ht = ({ role: e, onAttachmentClick: t, markdownComponents: n, ...r }) => e === o.Status ? /* @__PURE__ */ q(dt, { labels: {
905
905
  titleText: r.labels?.statusTitleText,
906
906
  bodyText: r.labels?.statusBodyText ?? ""
907
- } }) : e === o.User ? /* @__PURE__ */ q(ht, {
907
+ } }) : e === o.User ? /* @__PURE__ */ q(mt, {
908
908
  ...r,
909
909
  onAttachmentClick: t
910
- }) : /* @__PURE__ */ q(dt, {
910
+ }) : /* @__PURE__ */ q(ut, {
911
911
  ...r,
912
912
  markdownComponents: n,
913
913
  onAttachmentClick: t
914
914
  });
915
915
  //#endregion
916
- export { dt as AssistantMessageBubble, pt as BubblePosition, ut as MessageActions, gt as MessageBubble, ft as StatusMessageBubble, ht as UserMessageBubble };
916
+ export { ut as AssistantMessageBubble, ft as BubblePosition, lt as MessageActions, ht as MessageBubble, dt as StatusMessageBubble, mt 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.61",
4
+ "version": "1.1.0-dev.66",
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.61",
23
- "@epam/ai-dial-conversation-input": "1.1.0-dev.61",
22
+ "@epam/ai-dial-chat-shared": "1.1.0-dev.66",
23
+ "@epam/ai-dial-conversation-input": "1.1.0-dev.66",
24
24
  "react-markdown": "^10.1.0",
25
- "@epam/ai-dial-ui-kit": "^0.13.0-dev.17"
25
+ "@epam/ai-dial-ui-kit": "^0.13.0-dev.23"
26
26
  },
27
27
  "repository": {
28
28
  "type": "git",