@epam/ai-dial-conversation-input 1.4.0-dev.59 → 1.4.0-dev.63

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":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAoBlE,wIAAwI;AACxI,eAAO,MAAM,KAAK,oGAysBjB,CAAC"}
1
+ {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAoBlE,wIAAwI;AACxI,eAAO,MAAM,KAAK,oGAwsBjB,CAAC"}
package/index.js CHANGED
@@ -1316,7 +1316,7 @@ var J = {
1316
1316
  })
1317
1317
  })]
1318
1318
  });
1319
- }, Lt = { modal: "_modal_kl0h0_1" }, Z = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, title: o = "Chat settings", titleClassName: s = "dial-h1-text", responseFormatLabel: l, responseFormatHint: u, responseFormatMarkdownLabel: d, responseFormatPlainTextLabel: f, systemPromptLabel: p, systemPromptTooltip: m, temperatureLabel: h, temperatureLabels: _, temperatureHint: v, saveLabel: y = "Apply changes", saveDisabledTooltip: b, backgroundClassName: x = Lt.modal, colors: S }) => {
1319
+ }, Lt = { modal: "_modal_kl0h0_1" }, Rt = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, title: o = "Chat settings", titleClassName: s = "dial-h1-text", responseFormatLabel: l, responseFormatHint: u, responseFormatMarkdownLabel: d, responseFormatPlainTextLabel: f, systemPromptLabel: p, systemPromptTooltip: m, temperatureLabel: h, temperatureLabels: _, temperatureHint: v, saveLabel: y = "Apply changes", saveDisabledTooltip: b, backgroundClassName: x = Lt.modal, colors: S }) => {
1320
1320
  let { responseFormat: C, systemPrompt: w, temperature: T, canSubmit: E, setResponseFormat: D, setSystemPrompt: O, setTemperature: k, handleSubmit: A } = Nt({
1321
1321
  features: e,
1322
1322
  initialResponseFormat: t,
@@ -1362,10 +1362,10 @@ var J = {
1362
1362
  temperatureHint: v
1363
1363
  })
1364
1364
  });
1365
- }, Rt = {
1365
+ }, Z = {
1366
1366
  toolIcon: "_toolIcon_ma5s5_1",
1367
1367
  chevronIcon: "_chevronIcon_ma5s5_5"
1368
- }, Q = ({ onAttachClick: e, onRecordVoice: t, recordVoiceLabel: n = "Record voice", attachLabel: r, addMenuTitle: i, menuTitle: a, menuCloseLabel: s, style: u, listClassName: m = "w-[240px]", isDisabled: h = !1, chatSettings: g, extraMenuItems: _, toolsMenuItems: x = [], onToolToggle: S, toolsMenuTitle: C = "Tools", toolsBackLabel: T = "Back", menuOverlays: E, getCaretPosition: D, colors: O }) => {
1368
+ }, zt = ({ onAttachClick: e, onRecordVoice: t, recordVoiceLabel: n = "Record voice", attachLabel: r, addMenuTitle: i, menuTitle: a, menuCloseLabel: s, style: u, listClassName: m = "w-[240px]", isDisabled: h = !1, chatSettings: g, extraMenuItems: _, toolsMenuItems: x = [], onToolToggle: S, toolsMenuTitle: C = "Tools", toolsBackLabel: T = "Back", menuOverlays: E, getCaretPosition: D, colors: O }) => {
1369
1369
  let k = d(), j = f(), [M, N] = q(!1), P = K(0), [ee, F] = q(!1), [I, L] = q(!1), [R, z] = q(!1), [B, te] = q(null), ne = U((e) => {
1370
1370
  e && (P.current = 0), F(e), e || (z(!1), te(null));
1371
1371
  }, []), re = K(j);
@@ -1386,7 +1386,7 @@ var J = {
1386
1386
  label: e.label,
1387
1387
  icon: /* @__PURE__ */ V("span", {
1388
1388
  style: ie,
1389
- className: l("flex items-center", Rt.toolIcon),
1389
+ className: l("flex items-center", Z.toolIcon),
1390
1390
  children: e.icon
1391
1391
  }),
1392
1392
  selectable: !0,
@@ -1424,7 +1424,7 @@ var J = {
1424
1424
  size: p,
1425
1425
  stroke: y,
1426
1426
  style: ie,
1427
- className: l("rtl:scale-x-[-1]", Rt.chevronIcon),
1427
+ className: l("rtl:scale-x-[-1]", Z.chevronIcon),
1428
1428
  "aria-hidden": !0
1429
1429
  }) } : {
1430
1430
  children: oe,
@@ -1445,7 +1445,7 @@ var J = {
1445
1445
  size: p,
1446
1446
  stroke: y,
1447
1447
  style: ie,
1448
- className: l("rtl:scale-x-[-1]", Rt.chevronIcon),
1448
+ className: l("rtl:scale-x-[-1]", Z.chevronIcon),
1449
1449
  "aria-hidden": !0
1450
1450
  }) } : {
1451
1451
  subMenuOpen: B === e.key,
@@ -1479,7 +1479,7 @@ var J = {
1479
1479
  size: p,
1480
1480
  stroke: y,
1481
1481
  style: ie,
1482
- className: l("rtl:scale-x-[-1]", Rt.chevronIcon),
1482
+ className: l("rtl:scale-x-[-1]", Z.chevronIcon),
1483
1483
  "aria-hidden": !0
1484
1484
  }) : null,
1485
1485
  onClick: () => L(!0)
@@ -1606,7 +1606,7 @@ var J = {
1606
1606
  saveLabel: g.saveLabel,
1607
1607
  saveDisabledTooltip: g.saveDisabledTooltip
1608
1608
  }),
1609
- !k && g != null && I && /* @__PURE__ */ V(Z, {
1609
+ !k && g != null && I && /* @__PURE__ */ V(Rt, {
1610
1610
  features: g.features,
1611
1611
  initialResponseFormat: g.responseFormat ?? o.Markdown,
1612
1612
  initialSystemPrompt: g.systemPrompt,
@@ -1628,7 +1628,7 @@ var J = {
1628
1628
  colors: g.modalColors
1629
1629
  })
1630
1630
  ] });
1631
- }, zt = ({ fileInputRef: e, textareaRef: t, message: n, style: r, hideAttachFile: i, isInputDisabled: a, isStreaming: o, isAttachmentsEnabled: s, isVoiceRecordingSupported: c, isVoiceActive: l, startRecording: u, isPhone: d, canRemoveTools: f, toolsMenuItems: m, onToolToggle: h, chatSettings: g, menuOverlays: _, onDialFileSystemClick: v, dialFileSystemLabel: b, attachLabel: x, addMenuTitle: S, menuTitle: C, menuCloseLabel: w, recordVoiceLabel: T, toolsMenuTitle: E, toolsBackLabel: D }) => {
1631
+ }, Bt = ({ fileInputRef: e, textareaRef: t, message: n, style: r, hideAttachFile: i, isInputDisabled: a, isStreaming: o, isAttachmentsEnabled: s, isVoiceRecordingSupported: c, isVoiceActive: l, startRecording: u, isPhone: d, canRemoveTools: f, toolsMenuItems: m, onToolToggle: h, chatSettings: g, menuOverlays: _, onDialFileSystemClick: v, dialFileSystemLabel: b, attachLabel: x, addMenuTitle: S, menuTitle: C, menuCloseLabel: w, recordVoiceLabel: T, toolsMenuTitle: E, toolsBackLabel: D }) => {
1632
1632
  let O = G(() => v ? [{
1633
1633
  key: "dial-fs",
1634
1634
  label: b ?? "DIAL file system",
@@ -1639,7 +1639,7 @@ var J = {
1639
1639
  }),
1640
1640
  onClick: v
1641
1641
  }] : [], [v, b]);
1642
- return /* @__PURE__ */ V(Q, {
1642
+ return /* @__PURE__ */ V(zt, {
1643
1643
  onAttachClick: i ? void 0 : () => e.current?.click(),
1644
1644
  attachLabel: x,
1645
1645
  addMenuTitle: S,
@@ -1658,7 +1658,7 @@ var J = {
1658
1658
  menuOverlays: _,
1659
1659
  getCaretPosition: () => t.current?.selectionStart ?? n.length
1660
1660
  });
1661
- }, Bt = ({ textarea: e, textareaRef: t, commandMenu: n, caretAnchor: r, fontClassName: i, isMenuOpen: a, query: o, activeWordStart: s, listboxId: c, activeOptionId: u, overlayRef: d, onOutsidePress: f, onClose: p }) => /* @__PURE__ */ H(ue, { children: [e, n != null && /* @__PURE__ */ V("div", {
1661
+ }, Vt = ({ textarea: e, textareaRef: t, commandMenu: n, caretAnchor: r, fontClassName: i, isMenuOpen: a, query: o, activeWordStart: s, listboxId: c, activeOptionId: u, overlayRef: d, onOutsidePress: f, onClose: p }) => /* @__PURE__ */ H(ue, { children: [e, n != null && /* @__PURE__ */ V("div", {
1662
1662
  "aria-hidden": !0,
1663
1663
  className: l("pointer-events-none absolute", i || "dial-body-paragraph-text"),
1664
1664
  style: {
@@ -1696,7 +1696,7 @@ var J = {
1696
1696
  className: "inline-block h-lh w-0"
1697
1697
  })
1698
1698
  })
1699
- })] }), Vt = ({ areaRef: e, mirrorRef: t, isMirrorActive: n, fontClassName: r, message: i, mentionRanges: a, mirrorInsertions: o, selectionRects: s, children: c }) => /* @__PURE__ */ H("div", {
1699
+ })] }), Ht = ({ areaRef: e, mirrorRef: t, isMirrorActive: n, fontClassName: r, message: i, mentionRanges: a, mirrorInsertions: o, selectionRects: s, children: c }) => /* @__PURE__ */ H("div", {
1700
1700
  ref: e,
1701
1701
  className: "relative -ms-1 -me-1 w-[calc(100%+8px)]",
1702
1702
  children: [n && /* @__PURE__ */ H("div", {
@@ -1713,7 +1713,7 @@ var J = {
1713
1713
  }
1714
1714
  }, `selection-${t}`))]
1715
1715
  }), c]
1716
- }), Ht = ({ size: e = 20 }) => /* @__PURE__ */ V(ne, {
1716
+ }), Q = ({ size: e = 20 }) => /* @__PURE__ */ V(ne, {
1717
1717
  variant: re.Circular,
1718
1718
  width: e,
1719
1719
  height: e,
@@ -1733,7 +1733,7 @@ var J = {
1733
1733
  "aria-hidden": "true",
1734
1734
  children: Array.from({ length: 7 }).map((e, t) => /* @__PURE__ */ H("div", {
1735
1735
  className: "flex h-11 items-center gap-3 px-4",
1736
- children: [/* @__PURE__ */ V(Ht, {}), /* @__PURE__ */ V(Ut, {})]
1736
+ children: [/* @__PURE__ */ V(Q, {}), /* @__PURE__ */ V(Ut, {})]
1737
1737
  }, t))
1738
1738
  }), Gt = (e) => e.displayName ?? e.id, Kt = (e, t) => {
1739
1739
  let n = t.trim().toLowerCase();
@@ -1751,7 +1751,7 @@ var J = {
1751
1751
  selectedItemText: "_selectedItemText_1u7db_26",
1752
1752
  checkIcon: "_checkIcon_1u7db_30"
1753
1753
  }, Yt = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, styles: i }) => {
1754
- let [a, o] = q(""), s = G(() => e?.find((e) => e.id === t), [e, t]), u = r?.loading !== void 0, d = !u && !s && !!t, f = G(() => u ? /* @__PURE__ */ V(Ht, { size: v.LG }) : qt(s?.iconUrl, s?.type, s?.displayName ?? s?.id ?? "", v.LG, d ? r?.unavailableTooltip ?? "This deployment is no longer available" : void 0), [
1754
+ let [a, o] = q(""), s = G(() => e?.find((e) => e.id === t), [e, t]), u = r?.loading !== void 0, d = !u && !s && !!t, f = G(() => u ? /* @__PURE__ */ V(Q, { size: v.LG }) : qt(s?.iconUrl, s?.type, s?.displayName ?? s?.id ?? "", v.LG, d ? r?.unavailableTooltip ?? "This deployment is no longer available" : void 0), [
1755
1755
  u,
1756
1756
  s,
1757
1757
  d,
@@ -1759,7 +1759,7 @@ var J = {
1759
1759
  ]), p = s?.displayName ?? s?.id, m = s?.displayVersion, h = p ? `${r?.ariaLabel ?? "Select model"}: ${p}` : r?.ariaLabel ?? "Select model", g = G(() => {
1760
1760
  if (u) return Array.from({ length: 7 }, (e, t) => ({
1761
1761
  key: `__loading-${t}`,
1762
- icon: /* @__PURE__ */ V(Ht, {}),
1762
+ icon: /* @__PURE__ */ V(Q, {}),
1763
1763
  label: /* @__PURE__ */ V(Ut, { loadingLabel: t === 0 ? r?.loading : void 0 }),
1764
1764
  disabled: !0
1765
1765
  }));
@@ -2945,9 +2945,9 @@ var zn = /* @__PURE__ */ Object.assign(Rn, { displayName: "List" }), Bn = {
2945
2945
  })
2946
2946
  });
2947
2947
  }, Kn = ke(({ message: e = "", messageRevision: t, focusRequestId: n, textInsertion: r, onSend: i, onUploadAttachment: a, onStop: o, isStreaming: s = !1, onChange: c, onAttachmentsChange: u, placeholder: p = "Type a message...", ariaLabel: m, attachLabel: h = "Attach file", fileAccept: g, addMenuTitle: _ = "Add", menuTitle: b = "Menu", menuCloseLabel: x = "Close", removeLabel: S, retryLabel: T, uploadingLabel: k, expandLabel: A, clickLabel: j, sendLabel: M, sendTooltip: N, emptyMessageTooltip: P, stopLabel: ee, micLabel: F = "Dictate", recordVoiceLabel: I = "Record voice", stopRecordingLabel: L, discardRecordingLabel: R, colors: z, typography: B, attachmentTray: te, modelMenu: ne, className: re, pendingDropFiles: ie = [], onDropFilesConsumed: ae, pendingAttachments: oe = [], onPendingAttachmentsConsumed: se, pasteTextThreshold: ce = 4e3, maxMessageLength: le = 5e4, deployments: fe, selectedDeploymentId: pe, onDeploymentChange: me, modelSelectorLabels: he, initialAttachments: ge = [], hideAddButton: _e = !1, hideAttachFile: ve = !1, hideActionBar: ye = !1, actionRowLayout: xe = et.Stacked, isInlineActionRowAllowedBelowDesktop: Se = !1, isToolChipRowAllowedOnPhone: Ce = !1, renderFooterActions: we, isInputDisabled: Te = !1, isModelSelectorDisabled: Ee = !1, isSendDisabled: De = !1, isAudioMessageSupported: Oe = !1, isVoiceRecordingSupported: ke = Oe, onTranscribeAudio: Ae, transcribingLabel: je, voiceErrorLabel: Ne, sendOnEnter: Pe = $e.Enter, prefixAttachments: Fe = [], onRemovePrefixAttachment: Ie, chatSettings: Le, toolsMenuItems: ze, onToolToggle: Be, canRemoveTools: Ue = !0, toolsMenuTitle: We, toolsBackLabel: Ke, toolsChipLabels: Je, menuOverlays: Ye, activeMentions: Xe, onBackspaceAtCaret: Ze, caretPositionOverride: Qe, commandMenu: tt, autoFocus: Y = !1, messageHistory: rt, onDialFileSystemClick: at, dialFileSystemLabel: st, validateAttachment: ct, onAttachmentClick: lt, modelPickerOverlay: ut, onModelPickerOpenChange: mt, maximumAttachmentsAmount: ht, onAttachmentsLimitExceeded: gt, isAttachmentsEnabled: _t = !0, isTextAttachmentsAllowed: yt = !0, usageLimitsSlot: bt, onMessageTooLong: xt }, St) => {
2948
- let Ct = d(), wt = f(), [jt, Mt] = q(!1), Nt = (e) => {
2949
- Mt(e), mt?.(e);
2950
- }, Pt = Ve(rt), Ft = Xe ?? [], It = Ft.length > 0, Lt = G(() => At(z), [z]), { message: Z, setMessage: Rt, textareaRef: Q } = He({
2948
+ let Ct = d(), wt = f(), jt = wt && !Ce, [Mt, Nt] = q(!1), Pt = (e) => {
2949
+ Nt(e), mt?.(e);
2950
+ }, Ft = Ve(rt), It = Xe ?? [], Lt = It.length > 0, Rt = G(() => At(z), [z]), { message: Z, setMessage: zt, textareaRef: Q } = He({
2951
2951
  messageProp: e,
2952
2952
  messageRevision: t
2953
2953
  });
@@ -2957,23 +2957,23 @@ var zn = /* @__PURE__ */ Object.assign(Rn, { displayName: "List" }), Bn = {
2957
2957
  }, [Q]), W(() => {
2958
2958
  n !== void 0 && Q.current?.focus();
2959
2959
  }, [n, Q]), Me(St, () => ({ getCaretPosition: () => Q.current?.selectionStart ?? Z.length }), [Z, Q]);
2960
- let { handleUndoKeyDown: Ht, markCaretPlaced: Ut } = Ge({
2960
+ let { handleUndoKeyDown: Ut, markCaretPlaced: Wt } = Ge({
2961
2961
  insertion: r,
2962
2962
  textareaRef: Q
2963
- }), { isMenuOpen: Wt, query: Gt, activeWordStart: Kt, closeOnOutsidePress: qt, handleValueChange: Jt, commandMenuListboxId: Yt, commandMenuOverlayRef: $, activeCommandOptionId: Xt, handleTextareaClick: Zt, handleTextareaFocus: Qt, handleTextareaKeyUp: $t, skipFocusMenuEvaluationRef: en, triggerEnd: tn, hasCommandEmptyQueryHint: nn, markerOffset: rn, handleCloseCommandMenu: an, isSendGesture: on, handleCommandMenuKeyDown: sn } = Tt({
2963
+ }), { isMenuOpen: Gt, query: Kt, activeWordStart: qt, closeOnOutsidePress: Jt, handleValueChange: Yt, commandMenuListboxId: $, commandMenuOverlayRef: Xt, activeCommandOptionId: Zt, handleTextareaClick: Qt, handleTextareaFocus: $t, handleTextareaKeyUp: en, skipFocusMenuEvaluationRef: tn, triggerEnd: nn, hasCommandEmptyQueryHint: rn, markerOffset: an, handleCloseCommandMenu: on, isSendGesture: sn, handleCommandMenuKeyDown: cn } = Tt({
2964
2964
  commandMenu: tt,
2965
2965
  message: Z,
2966
- setMessage: Rt,
2966
+ setMessage: zt,
2967
2967
  textareaRef: Q,
2968
- historyNav: Pt,
2968
+ historyNav: Ft,
2969
2969
  onChange: c,
2970
2970
  caretPositionOverride: Qe,
2971
2971
  messageRevision: t,
2972
- markCaretPlaced: Ut,
2972
+ markCaretPlaced: Wt,
2973
2973
  sendOnEnter: Pe
2974
- }), cn = K(Z);
2975
- cn.current = Z;
2976
- let { attachments: ln, buildAttachments: un, addAttachments: dn, resetAttachments: fn, handleRemove: pn, handleRetry: mn, handleExpand: hn, hasBlockedAttachments: gn } = Re({
2974
+ }), ln = K(Z);
2975
+ ln.current = Z;
2976
+ let { attachments: un, buildAttachments: dn, addAttachments: fn, resetAttachments: pn, handleRemove: mn, handleRetry: hn, handleExpand: gn, hasBlockedAttachments: _n } = Re({
2977
2977
  initialAttachments: ge,
2978
2978
  onUploadAttachment: a,
2979
2979
  onAttachmentsChange: u,
@@ -2984,130 +2984,130 @@ var zn = /* @__PURE__ */ Object.assign(Rn, { displayName: "List" }), Bn = {
2984
2984
  pendingAttachments: oe,
2985
2985
  onPendingAttachmentsConsumed: se,
2986
2986
  onExpandPastedText: U((e) => {
2987
- let t = cn.current, n = t ? `${t}\n${e}` : e;
2988
- cn.current = n, Rt(n), c?.(n);
2989
- }, [Rt, c]),
2987
+ let t = ln.current, n = t ? `${t}\n${e}` : e;
2988
+ ln.current = n, zt(n), c?.(n);
2989
+ }, [zt, c]),
2990
2990
  maximumAttachmentsAmount: ht,
2991
2991
  baseAttachmentsAmount: Fe.length,
2992
2992
  onAttachmentsLimitExceeded: gt
2993
- }), { voiceState: _n, analyserNodeRef: vn, voiceError: yn, startRecording: bn, stopRecording: xn, discardRecording: Sn, isVoiceActive: Cn, latestTranscript: wn } = kt({
2994
- addAttachments: dn,
2995
- buildAttachments: un,
2996
- draftRef: cn,
2997
- setMessage: Rt,
2998
- historyNav: Pt,
2993
+ }), { voiceState: vn, analyserNodeRef: yn, voiceError: bn, startRecording: xn, stopRecording: Sn, discardRecording: Cn, isVoiceActive: wn, latestTranscript: Tn } = kt({
2994
+ addAttachments: fn,
2995
+ buildAttachments: dn,
2996
+ draftRef: ln,
2997
+ setMessage: zt,
2998
+ historyNav: Ft,
2999
2999
  onChange: c,
3000
3000
  onTranscribeAudio: Ae,
3001
3001
  voiceErrorLabel: Ne,
3002
3002
  textareaRef: Q,
3003
- skipFocusMenuEvaluationRef: en
3004
- }), Tn = K(null), En = K(null), Dn = Dt({
3005
- addAttachments: dn,
3003
+ skipFocusMenuEvaluationRef: tn
3004
+ }), En = K(null), Dn = K(null), On = Dt({
3005
+ addAttachments: fn,
3006
3006
  isAttachmentsEnabled: _t,
3007
3007
  isTextAttachmentsAllowed: yt,
3008
3008
  pasteTextThreshold: ce,
3009
3009
  maxMessageLength: le,
3010
3010
  onMessageTooLong: xt,
3011
3011
  commandMenu: tt
3012
- }), On = Z.trim().length > 0 || ln.length > 0, kn = On && !gn && !De && !Cn, { visibleTools: An, handleToolDismiss: jn } = Et({
3012
+ }), kn = Z.trim().length > 0 || un.length > 0, An = kn && !_n && !De && !wn, { visibleTools: jn, handleToolDismiss: Mn } = Et({
3013
3013
  toolsMenuItems: ze,
3014
3014
  canRemoveTools: Ue,
3015
3015
  onToolToggle: Be
3016
- }), [Mn, Nn] = q(!1), Pn = fe === void 0 || pe != null, Fn = Oe && !s, { handleSend: In, handleKeyDown: Ln } = Ot({
3016
+ }), [Nn, Pn] = q(!1), Fn = fe === void 0 || pe != null, In = Oe && !s, { handleSend: Ln, handleKeyDown: Rn } = Ot({
3017
3017
  message: Z,
3018
- setMessage: Rt,
3019
- attachments: ln,
3020
- resetAttachments: fn,
3021
- historyNav: Pt,
3018
+ setMessage: zt,
3019
+ attachments: un,
3020
+ resetAttachments: pn,
3021
+ historyNav: Ft,
3022
3022
  onSend: i,
3023
3023
  onMessageTooLong: xt,
3024
3024
  maxMessageLength: le,
3025
3025
  isSendDisabled: De,
3026
- isVoiceActive: Cn,
3026
+ isVoiceActive: wn,
3027
3027
  isInputDisabled: Te,
3028
3028
  isStreaming: s,
3029
- canSend: kn,
3030
- hasModelSelected: Pn,
3031
- handleUndoKeyDown: Ht,
3032
- handleCommandMenuKeyDown: sn,
3033
- isSendGesture: on,
3029
+ canSend: An,
3030
+ hasModelSelected: Fn,
3031
+ handleUndoKeyDown: Ut,
3032
+ handleCommandMenuKeyDown: cn,
3033
+ isSendGesture: sn,
3034
3034
  onBackspaceAtCaret: Ze
3035
- }), Rn = (e) => {
3035
+ }), zn = (e) => {
3036
3036
  let t = Array.from(e.target.files ?? []);
3037
3037
  if (t.length === 0) return;
3038
- let n = un(t);
3039
- e.target.value = "", dn(n);
3040
- }, { textareaAreaRef: zn, caretAnchor: Bn, mirrorInsertions: Vn, isMirrorActive: Hn, mirrorRef: Un, selectionRects: Wn, updateSelectionRects: Kn, handleTextareaScroll: qn } = vt({
3038
+ let n = dn(t);
3039
+ e.target.value = "", fn(n);
3040
+ }, { textareaAreaRef: Bn, caretAnchor: Vn, mirrorInsertions: Hn, isMirrorActive: Un, mirrorRef: Wn, selectionRects: Kn, updateSelectionRects: qn, handleTextareaScroll: Jn } = vt({
3041
3041
  commandMenu: tt,
3042
3042
  message: Z,
3043
3043
  textareaRef: Q,
3044
- hasActiveMentions: It,
3045
- markerOffset: rn,
3046
- triggerEnd: tn,
3047
- hasCommandEmptyQueryHint: nn
3048
- }), Jn = /* @__PURE__ */ V("textarea", {
3049
- className: l(X.textarea, Hn && X.textareaMentionMode, B?.fontClassName || "dial-body-paragraph-text", "relative z-0 field-sizing-content max-h-[272px] w-full resize-none overflow-y-auto border-0 bg-transparent ps-1 pe-1 outline-hidden", "disabled:cursor-not-allowed"),
3044
+ hasActiveMentions: Lt,
3045
+ markerOffset: an,
3046
+ triggerEnd: nn,
3047
+ hasCommandEmptyQueryHint: rn
3048
+ }), Yn = /* @__PURE__ */ V("textarea", {
3049
+ className: l(X.textarea, Un && X.textareaMentionMode, B?.fontClassName || "dial-body-paragraph-text", "relative z-0 field-sizing-content max-h-[272px] w-full resize-none overflow-y-auto border-0 bg-transparent ps-1 pe-1 outline-hidden", "disabled:cursor-not-allowed"),
3050
3050
  ref: Q,
3051
3051
  autoFocus: Y,
3052
3052
  value: Z,
3053
3053
  onChange: (e) => {
3054
- Rt(e.target.value), Pt.notifyChange();
3054
+ zt(e.target.value), Ft.notifyChange();
3055
3055
  let t = e.nativeEvent instanceof InputEvent ? e.nativeEvent : void 0;
3056
- Jt(e.target.value, e.target.selectionStart ?? e.target.value.length, t?.isComposing ?? !1), c?.(e.target.value);
3056
+ Yt(e.target.value, e.target.selectionStart ?? e.target.value.length, t?.isComposing ?? !1), c?.(e.target.value);
3057
3057
  },
3058
- onSelect: Kn,
3059
- onScroll: qn,
3060
- onFocus: Qt,
3061
- onClick: Zt,
3062
- onKeyDown: Ln,
3063
- onKeyUp: $t,
3064
- onPaste: Dn,
3058
+ onSelect: qn,
3059
+ onScroll: Jn,
3060
+ onFocus: $t,
3061
+ onClick: Qt,
3062
+ onKeyDown: Rn,
3063
+ onKeyUp: en,
3064
+ onPaste: On,
3065
3065
  placeholder: p,
3066
3066
  "aria-label": m,
3067
3067
  "aria-autocomplete": tt == null ? void 0 : "list",
3068
- "aria-controls": Wt ? Yt : void 0,
3069
- "aria-activedescendant": Xt ?? void 0,
3070
- "aria-hidden": It ? !0 : void 0,
3068
+ "aria-controls": Gt ? $ : void 0,
3069
+ "aria-activedescendant": Zt ?? void 0,
3070
+ "aria-hidden": Lt ? !0 : void 0,
3071
3071
  disabled: Te,
3072
- readOnly: Cn,
3072
+ readOnly: wn,
3073
3073
  rows: 1
3074
- }), Yn = /* @__PURE__ */ V(Vt, {
3075
- areaRef: zn,
3076
- mirrorRef: Un,
3077
- isMirrorActive: Hn,
3074
+ }), Xn = /* @__PURE__ */ V(Ht, {
3075
+ areaRef: Bn,
3076
+ mirrorRef: Wn,
3077
+ isMirrorActive: Un,
3078
3078
  fontClassName: B?.fontClassName,
3079
3079
  message: Z,
3080
- mentionRanges: Ft,
3081
- mirrorInsertions: Vn,
3082
- selectionRects: Wn,
3083
- children: /* @__PURE__ */ V(Bt, {
3084
- textarea: Jn,
3080
+ mentionRanges: It,
3081
+ mirrorInsertions: Hn,
3082
+ selectionRects: Kn,
3083
+ children: /* @__PURE__ */ V(Vt, {
3084
+ textarea: Yn,
3085
3085
  textareaRef: Q,
3086
3086
  commandMenu: tt,
3087
- caretAnchor: Bn,
3087
+ caretAnchor: Vn,
3088
3088
  fontClassName: B?.fontClassName,
3089
- isMenuOpen: Wt,
3090
- query: Gt,
3091
- activeWordStart: Kt,
3092
- listboxId: Yt,
3093
- activeOptionId: Xt,
3094
- overlayRef: $,
3095
- onOutsidePress: qt,
3096
- onClose: an
3089
+ isMenuOpen: Gt,
3090
+ query: Kt,
3091
+ activeWordStart: qt,
3092
+ listboxId: $,
3093
+ activeOptionId: Zt,
3094
+ overlayRef: Xt,
3095
+ onOutsidePress: Jt,
3096
+ onClose: on
3097
3097
  })
3098
- }), Xn = _e ? void 0 : /* @__PURE__ */ V(zt, {
3099
- fileInputRef: Tn,
3098
+ }), Zn = _e ? void 0 : /* @__PURE__ */ V(Bt, {
3099
+ fileInputRef: En,
3100
3100
  textareaRef: Q,
3101
3101
  message: Z,
3102
- style: Lt,
3102
+ style: Rt,
3103
3103
  hideAttachFile: ve,
3104
3104
  isInputDisabled: Te,
3105
3105
  isStreaming: s,
3106
3106
  isAttachmentsEnabled: _t,
3107
3107
  isVoiceRecordingSupported: ke,
3108
- isVoiceActive: Cn,
3109
- startRecording: bn,
3110
- isPhone: wt,
3108
+ isVoiceActive: wn,
3109
+ startRecording: xn,
3110
+ isPhone: jt,
3111
3111
  canRemoveTools: Ue,
3112
3112
  toolsMenuItems: ze,
3113
3113
  onToolToggle: Be,
@@ -3122,49 +3122,49 @@ var zn = /* @__PURE__ */ Object.assign(Rn, { displayName: "List" }), Bn = {
3122
3122
  recordVoiceLabel: I,
3123
3123
  toolsMenuTitle: We,
3124
3124
  toolsBackLabel: Ke
3125
- }), Zn = xe === et.Inline && (!Ct || Se), Qn = Xn && /* @__PURE__ */ V("div", {
3125
+ }), Qn = xe === et.Inline && (!Ct || Se), $n = Zn && /* @__PURE__ */ V("div", {
3126
3126
  className: l("flex", J.addCluster),
3127
- children: Xn
3128
- }), $n = ze ?? [], er = $n.length > 0 && Be != null && /* @__PURE__ */ H("div", {
3127
+ children: Zn
3128
+ }), er = ze ?? [], tr = er.length > 0 && Be != null && /* @__PURE__ */ H("div", {
3129
3129
  className: l("max-w-full min-w-0 flex-[1_0_auto]", J.toolsChips),
3130
3130
  children: [/* @__PURE__ */ V(ot, {
3131
- items: $n,
3131
+ items: er,
3132
3132
  title: We,
3133
3133
  summaryLabel: Je?.summaryLabel,
3134
- onClick: () => Nn(!0)
3134
+ onClick: () => Pn(!0)
3135
3135
  }), /* @__PURE__ */ V(nt, {
3136
- isOpen: Mn,
3137
- onClose: () => Nn(!1),
3136
+ isOpen: Nn,
3137
+ onClose: () => Pn(!1),
3138
3138
  closeLabel: x,
3139
- style: Lt,
3139
+ style: Rt,
3140
3140
  title: We,
3141
- items: $n,
3141
+ items: er,
3142
3142
  onToolToggle: Be
3143
3143
  })]
3144
- }), tr = An.length > 0 && Be != null && /* @__PURE__ */ V("div", {
3145
- className: l("min-w-0", Zn ? "flex-1" : "max-w-full flex-[1_0_auto]", J.toolsChips),
3144
+ }), nr = jn.length > 0 && Be != null && /* @__PURE__ */ V("div", {
3145
+ className: l("min-w-0", Qn ? "flex-1" : "max-w-full flex-[1_0_auto]", J.toolsChips),
3146
3146
  children: /* @__PURE__ */ V(it, {
3147
- items: An,
3147
+ items: jn,
3148
3148
  onToolToggle: Be,
3149
- onToolDismiss: jn,
3149
+ onToolDismiss: Mn,
3150
3150
  canRemove: Ue,
3151
3151
  removeLabel: Je?.removeLabel,
3152
3152
  stateOnLabel: Je?.stateOnLabel,
3153
3153
  stateOffLabel: Je?.stateOffLabel
3154
3154
  })
3155
- }), nr = wt && !Ce ? er : tr;
3155
+ }), rr = jt ? tr : nr;
3156
3156
  return /* @__PURE__ */ H("div", {
3157
- ref: En,
3158
- style: Lt,
3157
+ ref: Dn,
3158
+ style: Rt,
3159
3159
  className: l(X.wrapper, Te && X.wrapperDisabled, Te && "cursor-not-allowed", "flex w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border", "p-4 focus-within:outline focus-within:-outline-offset-1 active:outline active:-outline-offset-1", re, J.wrapper),
3160
3160
  children: [
3161
- (Fe.length > 0 || ln.length > 0) && /* @__PURE__ */ V(de, {
3162
- attachments: [...Fe, ...ln],
3161
+ (Fe.length > 0 || un.length > 0) && /* @__PURE__ */ V(de, {
3162
+ attachments: [...Fe, ...un],
3163
3163
  onRemove: (e) => {
3164
- Fe.some((t) => t.id === e) ? Ie?.(e) : pn(e);
3164
+ Fe.some((t) => t.id === e) ? Ie?.(e) : mn(e);
3165
3165
  },
3166
- onRetry: mn,
3167
- onExpand: hn,
3166
+ onRetry: hn,
3167
+ onExpand: gn,
3168
3168
  labels: {
3169
3169
  removeLabel: S,
3170
3170
  retryLabel: T,
@@ -3174,59 +3174,59 @@ var zn = /* @__PURE__ */ Object.assign(Rn, { displayName: "List" }), Bn = {
3174
3174
  },
3175
3175
  styles: {
3176
3176
  ...te,
3177
- className: l(ln.length > 6 && "-me-4", te?.className)
3177
+ className: l(un.length > 6 && "-me-4", te?.className)
3178
3178
  },
3179
3179
  onAttachmentClick: lt == null ? void 0 : (e) => {
3180
- let t = [...Fe, ...ln].find((t) => t.id === e);
3180
+ let t = [...Fe, ...un].find((t) => t.id === e);
3181
3181
  t != null && lt(t);
3182
3182
  }
3183
3183
  }),
3184
3184
  !_e && /* @__PURE__ */ V("input", {
3185
- ref: Tn,
3185
+ ref: En,
3186
3186
  type: "file",
3187
3187
  multiple: !0,
3188
3188
  accept: g,
3189
3189
  className: "sr-only",
3190
3190
  "aria-hidden": !0,
3191
3191
  tabIndex: -1,
3192
- onChange: Rn
3192
+ onChange: zn
3193
3193
  }),
3194
3194
  /* @__PURE__ */ V(E, {
3195
3195
  politeness: O.Assertive,
3196
3196
  className: "min-w-0 px-1 wrap-break-word",
3197
- children: yn && /* @__PURE__ */ V(C, { text: yn })
3197
+ children: bn && /* @__PURE__ */ V(C, { text: bn })
3198
3198
  }),
3199
- Cn && /* @__PURE__ */ V(dt, {
3199
+ wn && /* @__PURE__ */ V(dt, {
3200
3200
  embedded: !0,
3201
- state: _n,
3202
- analyserNodeRef: vn,
3203
- onStop: xn,
3204
- onDiscard: Sn,
3205
- attachButton: Xn,
3201
+ state: vn,
3202
+ analyserNodeRef: yn,
3203
+ onStop: Sn,
3204
+ onDiscard: Cn,
3205
+ attachButton: Zn,
3206
3206
  stopLabel: L,
3207
3207
  discardLabel: R,
3208
3208
  processingLabel: je
3209
3209
  }),
3210
- !Cn && ye && Yn,
3211
- !Cn && !ye && Zn && nr && /* @__PURE__ */ V("div", {
3210
+ !wn && ye && Xn,
3211
+ !wn && !ye && Qn && rr && /* @__PURE__ */ V("div", {
3212
3212
  className: "flex",
3213
- children: nr
3213
+ children: rr
3214
3214
  }),
3215
- !Cn && !ye && /* @__PURE__ */ H("div", {
3216
- className: l("flex items-center gap-2", Zn ? "flex-nowrap" : "flex-wrap", J.actionRow),
3215
+ !wn && !ye && /* @__PURE__ */ H("div", {
3216
+ className: l("flex items-center gap-2", Qn ? "flex-nowrap" : "flex-wrap", J.actionRow),
3217
3217
  children: [
3218
- Zn && Qn,
3218
+ Qn && $n,
3219
3219
  /* @__PURE__ */ V("div", {
3220
- className: l("flex min-w-0 items-center self-stretch", Zn ? "flex-1" : "w-full", J.textareaWrap),
3221
- children: Yn
3220
+ className: l("flex min-w-0 items-center self-stretch", Qn ? "flex-1" : "w-full", J.textareaWrap),
3221
+ children: Xn
3222
3222
  }),
3223
- !Zn && Qn,
3224
- !Zn && nr,
3223
+ !Qn && $n,
3224
+ !Qn && rr,
3225
3225
  /* @__PURE__ */ V("div", {
3226
3226
  className: l("ms-auto flex shrink-0 items-center gap-2", J.footerActions),
3227
3227
  children: we ? we({
3228
- canSend: kn,
3229
- onSend: In
3228
+ canSend: An,
3229
+ onSend: Ln
3230
3230
  }) : /* @__PURE__ */ H(ue, { children: [
3231
3231
  bt,
3232
3232
  /* @__PURE__ */ V(Gn, {
@@ -3240,13 +3240,13 @@ var zn = /* @__PURE__ */ Object.assign(Rn, { displayName: "List" }), Bn = {
3240
3240
  isStreaming: s,
3241
3241
  isMobile: wt,
3242
3242
  isDisabled: Ee,
3243
- style: Lt,
3243
+ style: Rt,
3244
3244
  modelPickerOverlay: ut,
3245
- isPickerOpen: jt,
3246
- onPickerToggle: () => Nt(!jt),
3247
- onPickerOpenChange: Nt
3245
+ isPickerOpen: Mt,
3246
+ onPickerToggle: () => Pt(!Mt),
3247
+ onPickerOpenChange: Pt
3248
3248
  }),
3249
- Fn && /* @__PURE__ */ V(w, {
3249
+ In && /* @__PURE__ */ V(w, {
3250
3250
  icon: /* @__PURE__ */ V(be, {
3251
3251
  size: v.LG,
3252
3252
  stroke: y,
@@ -3255,17 +3255,17 @@ var zn = /* @__PURE__ */ Object.assign(Rn, { displayName: "List" }), Bn = {
3255
3255
  "aria-label": F,
3256
3256
  tooltipProps: { tooltip: F },
3257
3257
  className: "shrink-0",
3258
- onClick: () => bn(qe.Dictation),
3258
+ onClick: () => xn(qe.Dictation),
3259
3259
  disabled: Te || s
3260
3260
  }),
3261
3261
  s && o ? /* @__PURE__ */ V(pt, {
3262
3262
  onStop: o,
3263
3263
  ariaLabel: ee
3264
3264
  }) : !s && /* @__PURE__ */ V(ft, {
3265
- onSend: In,
3266
- isDisabled: !Pn || !kn,
3265
+ onSend: Ln,
3266
+ isDisabled: !Fn || !An,
3267
3267
  ariaLabel: M,
3268
- sendTooltip: On ? N : P ?? N
3268
+ sendTooltip: kn ? N : P ?? N
3269
3269
  })
3270
3270
  ] })
3271
3271
  })
@@ -3275,7 +3275,7 @@ var zn = /* @__PURE__ */ Object.assign(Rn, { displayName: "List" }), Bn = {
3275
3275
  visuallyHidden: !0,
3276
3276
  atomic: !0,
3277
3277
  as: D.Span,
3278
- children: /* @__PURE__ */ V("span", { children: wn.text }, wn.revision)
3278
+ children: /* @__PURE__ */ V("span", { children: Tn.text }, Tn.revision)
3279
3279
  })
3280
3280
  ]
3281
3281
  });
@@ -3403,7 +3403,7 @@ var qn = {
3403
3403
  "aria-hidden": !0,
3404
3404
  tabIndex: -1,
3405
3405
  onChange: Ee
3406
- }), (!F || (c?.length ?? 0) > 0) && /* @__PURE__ */ V(Q, {
3406
+ }), (!F || (c?.length ?? 0) > 0) && /* @__PURE__ */ V(zt, {
3407
3407
  onAttachClick: F ? void 0 : () => ce.current?.click(),
3408
3408
  attachLabel: E,
3409
3409
  addMenuTitle: T,
@@ -3484,4 +3484,4 @@ var qn = {
3484
3484
  }, [e]);
3485
3485
  };
3486
3486
  //#endregion
3487
- export { et as ActionRowLayout, Ie as BottomSheetShell, J as CONVERSATION_INPUT_CLASS, Z as ChatSettingsModal, Jn as ConversationInput, Yn as EditMessageInput, Kn as Input, $e as SendOnEnter, Xn as UsageLimitBannerSeverity, $n as UsageLimitBannerView, er as useComposerSeed, tr as useComposerSeedSource };
3487
+ export { et as ActionRowLayout, Ie as BottomSheetShell, J as CONVERSATION_INPUT_CLASS, Rt as ChatSettingsModal, Jn as ConversationInput, Yn as EditMessageInput, Kn as Input, $e as SendOnEnter, Xn as UsageLimitBannerSeverity, $n as UsageLimitBannerView, er as useComposerSeed, tr as useComposerSeedSource };
@@ -230,7 +230,7 @@ export interface ConversationInputProps {
230
230
  isInlineActionRowAllowedBelowDesktop?: boolean;
231
231
  /**
232
232
  * Lets a phone-width composer show the full row of per-tool chips instead of
233
- * the single "Tools: N" summary chip. For an embed that is narrow but not a
233
+ * the single "Tools: N" summary chip, and leaves the `+` menu without its Tools entry. For an embed that is narrow but not a
234
234
  * phone, such as a chat overlay in a desktop page. Defaults to `false`.
235
235
  */
236
236
  isToolChipRowAllowedOnPhone?: boolean;
package/models/Input.d.ts CHANGED
@@ -433,7 +433,7 @@ export interface InputProps {
433
433
  isInlineActionRowAllowedBelowDesktop?: boolean;
434
434
  /**
435
435
  * Lets a phone-width composer show the full row of per-tool chips instead of
436
- * the single "Tools: N" summary chip. For an embed that is narrow but not a
436
+ * the single "Tools: N" summary chip, and leaves the `+` menu without its Tools entry. For an embed that is narrow but not a
437
437
  * phone, such as a chat overlay in a desktop page. Defaults to `false`.
438
438
  */
439
439
  isToolChipRowAllowedOnPhone?: boolean;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-conversation-input",
3
3
  "description": "Conversation message input with model selection, attachments, voice input, and edit mode",
4
- "version": "1.4.0-dev.59",
4
+ "version": "1.4.0-dev.63",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -19,10 +19,10 @@
19
19
  "dependencies": {
20
20
  "react-window": "^2.5.3",
21
21
  "@tabler/icons-react": "^3.50.0",
22
- "@epam/ai-dial-attachment-input": "1.4.0-dev.59"
22
+ "@epam/ai-dial-attachment-input": "1.4.0-dev.63"
23
23
  },
24
24
  "peerDependencies": {
25
- "@epam/ai-dial-chat-shared": "1.4.0-dev.59",
25
+ "@epam/ai-dial-chat-shared": "1.4.0-dev.63",
26
26
  "react": "^19.2.8",
27
27
  "@epam/ai-dial-ui-kit": "^0.16.0"
28
28
  },