@epam/ai-dial-conversation-input 1.2.0-dev.328 → 1.2.0-dev.336

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":"AAkDA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAalE,wIAAwI;AACxI,eAAO,MAAM,KAAK,oGA6tCjB,CAAC"}
1
+ {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAkDA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAalE,wIAAwI;AACxI,eAAO,MAAM,KAAK,oGAquCjB,CAAC"}
package/index.js CHANGED
@@ -2088,44 +2088,47 @@ var Kt = {
2088
2088
  }), { isMenuOpen: zt, query: Bt, activeWordStart: Q, dismiss: Vt, closeOnOutsidePress: Ht, handleCaretMove: Ut, handleValueChange: Wt, listboxId: Gt, overlayRef: Kt, activeOptionId: qt, moveActiveOption: Jt, getActiveOption: Yt } = Fe({
2089
2089
  config: G,
2090
2090
  message: Y
2091
- }), Xt = () => {
2091
+ }), Xt = B(Ut);
2092
+ Xt.current = Ut;
2093
+ let Qt = () => {
2092
2094
  Ut(Z.current?.selectionStart ?? Y.length);
2093
- }, Qt = () => {
2095
+ }, $t = () => {
2094
2096
  requestAnimationFrame(() => {
2095
- Ut(Z.current?.selectionStart ?? Y.length);
2097
+ let e = Z.current;
2098
+ Xt.current(e?.selectionStart ?? e?.value.length ?? 0);
2096
2099
  });
2097
- }, $t = (e) => {
2100
+ }, en = (e) => {
2098
2101
  e.key !== "ArrowLeft" && e.key !== "ArrowRight" && e.key !== "Home" && e.key !== "End" && e.key !== "PageUp" && e.key !== "PageDown" || Ut(e.currentTarget.selectionStart ?? Y.length);
2099
- }, en = G?.emptyQueryHint != null, tn = G != null && Q != null ? Q + G.triggerPrefix.length : null, nn = tn != null && Y.slice(tn).split("\n", 1)[0] !== "", rn = en && zt && Bt === "" && tn != null && !nn, an = G != null && zt ? Q ?? 0 : null, on = B(null), sn = B(null), [cn, ln] = V(null), un = L(() => {
2100
- let e = on.current, t = sn.current;
2102
+ }, tn = G?.emptyQueryHint != null, nn = G != null && Q != null ? Q + G.triggerPrefix.length : null, rn = nn != null && Y.slice(nn).split("\n", 1)[0] !== "", an = tn && zt && Bt === "" && nn != null && !rn, on = G != null && zt ? Q ?? 0 : null, sn = B(null), cn = B(null), [ln, un] = V(null), dn = L(() => {
2103
+ let e = sn.current, t = cn.current;
2101
2104
  if (e == null || t == null) {
2102
- ln(null);
2105
+ un(null);
2103
2106
  return;
2104
2107
  }
2105
2108
  let n = e.getBoundingClientRect(), r = t.getBoundingClientRect();
2106
- ln({
2109
+ un({
2107
2110
  left: n.left - r.left,
2108
2111
  top: n.top - r.top
2109
2112
  });
2110
2113
  }, []);
2111
2114
  De(() => {
2112
- un();
2115
+ dn();
2113
2116
  }, [
2114
- un,
2115
- an,
2117
+ dn,
2118
+ on,
2116
2119
  Y
2117
2120
  ]), R(() => {
2118
- if (an == null) return;
2121
+ if (on == null) return;
2119
2122
  let e = Z.current;
2120
2123
  if (e == null || typeof ResizeObserver > "u") return;
2121
- let t = new ResizeObserver(un);
2124
+ let t = new ResizeObserver(dn);
2122
2125
  return t.observe(e), () => t.disconnect();
2123
2126
  }, [
2124
- an,
2127
+ on,
2125
2128
  Z,
2126
- un
2129
+ dn
2127
2130
  ]);
2128
- let dn = L((e) => {
2131
+ let fn = L((e) => {
2129
2132
  if (G == null || (Vt(), !e?.consumeQuery) || (e.returnFocus !== !1 && Z.current?.focus(), Q == null)) return;
2130
2133
  let t = `${G.triggerPrefix}${Bt}`, n = Q + t.length;
2131
2134
  if (Y.slice(Q, n) !== t) return;
@@ -2141,11 +2144,11 @@ var Kt = {
2141
2144
  q,
2142
2145
  u,
2143
2146
  Z
2144
- ]), fn = B(void 0);
2147
+ ]), pn = B(void 0);
2145
2148
  R(() => {
2146
- ft == null || fn.current === t || (fn.current = t, Z.current?.setSelectionRange(ft, ft), Ut(ft));
2149
+ ft == null || pn.current === t || (pn.current = t, Z.current?.setSelectionRange(ft, ft), Ut(ft));
2147
2150
  }, [Y]);
2148
- let { attachments: pn, buildAttachments: mn, addAttachments: hn, resetAttachments: gn, handleRemove: _n, handleRetry: vn, handleExpand: yn, hasBlockedAttachments: bn } = Ae({
2151
+ let { attachments: mn, buildAttachments: hn, addAttachments: gn, resetAttachments: _n, handleRemove: vn, handleRetry: yn, handleExpand: bn, hasBlockedAttachments: xn } = Ae({
2149
2152
  initialAttachments: we,
2150
2153
  onUploadAttachment: a,
2151
2154
  onAttachmentsChange: p,
@@ -2161,84 +2164,84 @@ var Kt = {
2161
2164
  maximumAttachmentsAmount: Tt,
2162
2165
  baseAttachmentsAmount: Ze.length,
2163
2166
  onAttachmentsLimitExceeded: Et
2164
- }), xn = L((e) => {
2165
- hn(mn([e]));
2166
- }, [hn, mn]), Sn = B(!1), Cn = B(Y);
2167
- Cn.current = Y;
2168
- let [wn, Tn] = V({
2167
+ }), Sn = L((e) => {
2168
+ gn(hn([e]));
2169
+ }, [gn, hn]), Cn = B(!1), wn = B(Y);
2170
+ wn.current = Y;
2171
+ let [Tn, En] = V({
2169
2172
  text: "",
2170
2173
  revision: 0
2171
- }), { state: En, analyserNodeRef: Dn, errorMessage: On, startRecording: kn, stopRecording: An, discardRecording: jn } = $e({
2172
- onAttachAudio: xn,
2174
+ }), { state: Dn, analyserNodeRef: On, errorMessage: kn, startRecording: An, stopRecording: jn, discardRecording: Mn } = $e({
2175
+ onAttachAudio: Sn,
2173
2176
  onTranscribeAudio: Ve,
2174
2177
  onTranscript: L((e) => {
2175
2178
  let t = e.trim();
2176
2179
  if (t) {
2177
- let e = Cn.current, n = `${e}${e && !/\s$/.test(e) ? " " : ""}${t}`;
2178
- Cn.current = n, X(n), Tn((e) => ({
2180
+ let e = wn.current, n = `${e}${e && !/\s$/.test(e) ? " " : ""}${t}`;
2181
+ wn.current = n, X(n), En((e) => ({
2179
2182
  text: t,
2180
2183
  revision: e.revision + 1
2181
2184
  })), q.notifyChange(), u?.(n);
2182
2185
  }
2183
- Sn.current = !0;
2186
+ Cn.current = !0;
2184
2187
  }, [
2185
2188
  X,
2186
2189
  q,
2187
2190
  u
2188
2191
  ]),
2189
2192
  errorLabel: Ye
2190
- }), $ = En === qe.Recording || En === qe.Processing;
2193
+ }), $ = Dn === qe.Recording || Dn === qe.Processing;
2191
2194
  R(() => {
2192
- (En === qe.Error || En === qe.Idle && Sn.current) && (Sn.current = !1, Z.current?.focus());
2193
- }, [En, Z]);
2194
- let Mn = B(null), Nn = B(null), Pn = Dt && Ot, { handlePaste: Fn } = le(hn, Pn ? ve : Infinity), In = L((e) => {
2195
- if (!Pn) {
2195
+ (Dn === qe.Error || Dn === qe.Idle && Cn.current) && (Cn.current = !1, Z.current?.focus());
2196
+ }, [Dn, Z]);
2197
+ let Nn = B(null), Pn = B(null), Fn = Dt && Ot, { handlePaste: In } = le(gn, Fn ? ve : Infinity), Ln = L((e) => {
2198
+ if (!Fn) {
2196
2199
  let t = e.clipboardData.getData("text/plain");
2197
2200
  t.length >= ye && At?.(t.length, ye);
2198
2201
  }
2199
- Fn(e);
2202
+ In(e);
2200
2203
  }, [
2201
- Pn,
2204
+ Fn,
2202
2205
  ye,
2203
2206
  At,
2204
- Fn
2205
- ]), Ln = Y.trim().length > 0 || pn.length > 0, Rn = Ln && !bn && !Ie && !$, [zn, Bn] = V([]);
2207
+ In
2208
+ ]), Rn = Y.trim().length > 0 || mn.length > 0, zn = Rn && !xn && !Ie && !$, [Bn, Vn] = V([]);
2206
2209
  R(() => {
2207
- Bn([]);
2210
+ Vn([]);
2208
2211
  }, [(rt ?? []).map((e) => e.id).join("|")]);
2209
- let Vn = z(() => {
2212
+ let Hn = z(() => {
2210
2213
  let e = rt ?? [];
2211
- return at ? e.filter((e) => e.isSelected || !zn.includes(e.id)) : e;
2214
+ return at ? e.filter((e) => e.isSelected || !Bn.includes(e.id)) : e;
2212
2215
  }, [
2213
2216
  rt,
2214
- zn,
2217
+ Bn,
2215
2218
  at
2216
- ]), Hn = L((e) => {
2217
- Bn((t) => t.includes(e) ? t : [...t, e]), rt?.find((t) => t.id === e)?.isSelected && it?.(e);
2218
- }, [rt, it]), Un = be === void 0 || xe != null, Wn = Le && !s, Gn = async () => {
2219
+ ]), Un = L((e) => {
2220
+ Vn((t) => t.includes(e) ? t : [...t, e]), rt?.find((t) => t.id === e)?.isSelected && it?.(e);
2221
+ }, [rt, it]), Wn = be === void 0 || xe != null, Gn = Le && !s, Kn = async () => {
2219
2222
  if (Ie || $) return;
2220
2223
  if (Y.length >= ye) {
2221
2224
  At?.(Y.length, ye);
2222
2225
  return;
2223
2226
  }
2224
- let e = Y, t = pn;
2227
+ let e = Y, t = mn;
2225
2228
  X(""), q.reset();
2226
2229
  try {
2227
2230
  await i?.(e, t), t.forEach((e) => {
2228
2231
  e.previewUrl && URL.revokeObjectURL(e.previewUrl), e.playUrl && URL.revokeObjectURL(e.playUrl);
2229
- }), gn([]);
2232
+ }), _n([]);
2230
2233
  } catch {
2231
- X(e), gn(t);
2234
+ X(e), _n(t);
2232
2235
  }
2233
- }, Kn = (e) => Xe === et.MetaEnter ? (e.metaKey || e.ctrlKey) && !e.shiftKey : !e.shiftKey && !e.metaKey && !e.ctrlKey, qn = (e) => {
2236
+ }, qn = (e) => Xe === et.MetaEnter ? (e.metaKey || e.ctrlKey) && !e.shiftKey : !e.shiftKey && !e.metaKey && !e.ctrlKey, Jn = (e) => {
2234
2237
  if (!zt || e.nativeEvent.isComposing) return !1;
2235
2238
  if (e.key === "Escape") return e.preventDefault(), e.stopPropagation(), Vt(), !0;
2236
2239
  if (e.key === "ArrowDown" || e.key === "ArrowUp") return e.preventDefault(), Jt(e.key === "ArrowDown" ? Pe.Next : Pe.Previous), !0;
2237
2240
  if (e.key !== "Enter" || e.shiftKey) return !1;
2238
2241
  let t = Yt();
2239
- return t == null ? Kn(e) ? (e.preventDefault(), !0) : !1 : (e.preventDefault(), t.click(), !0);
2240
- }, Jn = (e) => {
2241
- if (!$ && !Rt(e) && !qn(e)) {
2242
+ return t == null ? qn(e) ? (e.preventDefault(), !0) : !1 : (e.preventDefault(), t.click(), !0);
2243
+ }, Yn = (e) => {
2244
+ if (!$ && !Rt(e) && !Jn(e)) {
2242
2245
  if (!e.nativeEvent.isComposing && !W && !s) {
2243
2246
  if (e.key === "ArrowUp" || e.key === "ArrowDown") {
2244
2247
  let t = e.currentTarget.selectionStart ?? 0, n = q.navigate(e.key === "ArrowUp" ? "up" : "down", Y, t);
@@ -2257,24 +2260,24 @@ var Kt = {
2257
2260
  }
2258
2261
  }
2259
2262
  }
2260
- e.key === "Enter" && Kn(e) && (e.preventDefault(), !s && Rn && Un && !W && Gn());
2263
+ e.key === "Enter" && qn(e) && (e.preventDefault(), !s && zn && Wn && !W && Kn());
2261
2264
  }
2262
- }, Yn = (e) => {
2265
+ }, Xn = (e) => {
2263
2266
  let t = Array.from(e.target.files ?? []);
2264
2267
  if (t.length === 0) return;
2265
- let n = mn(t);
2266
- e.target.value = "", hn(n);
2267
- }, Xn = z(() => {
2268
+ let n = hn(t);
2269
+ e.target.value = "", gn(n);
2270
+ }, Zn = z(() => {
2268
2271
  let e = [];
2269
- return an != null && e.push({
2270
- offset: an,
2272
+ return on != null && e.push({
2273
+ offset: on,
2271
2274
  node: /* @__PURE__ */ P("span", {
2272
- ref: on,
2275
+ ref: sn,
2273
2276
  "aria-hidden": !0,
2274
2277
  className: "inline-block h-[1lh] w-0 align-text-top"
2275
2278
  }, "caret-marker")
2276
- }), rn && G != null && tn != null && e.push({
2277
- offset: tn,
2279
+ }), an && G != null && nn != null && e.push({
2280
+ offset: nn,
2278
2281
  node: /* @__PURE__ */ P("span", {
2279
2282
  className: K.commandHint,
2280
2283
  "aria-hidden": !0,
@@ -2283,16 +2286,16 @@ var Kt = {
2283
2286
  }, "command-hint")
2284
2287
  }), e;
2285
2288
  }, [
2289
+ on,
2286
2290
  an,
2287
- rn,
2288
2291
  G,
2289
- tn
2290
- ]), Zn = It || Xn.length > 0, { mirrorRef: Qn, selectionRects: $n, updateSelectionRects: er } = He({
2292
+ nn
2293
+ ]), Qn = It || Zn.length > 0, { mirrorRef: $n, selectionRects: er, updateSelectionRects: tr } = He({
2291
2294
  textareaRef: Z,
2292
2295
  message: Y,
2293
- isMirrorActive: Zn
2294
- }), tr = /* @__PURE__ */ P("textarea", {
2295
- className: l(K.textarea, Zn && K.textareaMentionMode, I?.fontClassName || "dial-body-paragraph-text", "relative z-0 max-h-[272px] w-full resize-none overflow-y-auto border-0 bg-transparent pe-1 ps-1 outline-none [field-sizing:content]", "disabled:cursor-not-allowed"),
2296
+ isMirrorActive: Qn
2297
+ }), nr = /* @__PURE__ */ P("textarea", {
2298
+ className: l(K.textarea, Qn && K.textareaMentionMode, I?.fontClassName || "dial-body-paragraph-text", "relative z-0 max-h-[272px] w-full resize-none overflow-y-auto border-0 bg-transparent pe-1 ps-1 outline-none [field-sizing:content]", "disabled:cursor-not-allowed"),
2296
2299
  ref: Z,
2297
2300
  autoFocus: mt,
2298
2301
  value: Y,
@@ -2301,12 +2304,12 @@ var Kt = {
2301
2304
  let t = e.nativeEvent instanceof InputEvent ? e.nativeEvent : void 0;
2302
2305
  Wt(e.target.value, e.target.selectionStart ?? e.target.value.length, t?.isComposing ?? !1), u?.(e.target.value);
2303
2306
  },
2304
- onSelect: er,
2305
- onFocus: Qt,
2306
- onClick: Xt,
2307
- onKeyDown: Jn,
2308
- onKeyUp: $t,
2309
- onPaste: In,
2307
+ onSelect: tr,
2308
+ onFocus: $t,
2309
+ onClick: Qt,
2310
+ onKeyDown: Yn,
2311
+ onKeyUp: en,
2312
+ onPaste: Ln,
2310
2313
  placeholder: m,
2311
2314
  "aria-label": h,
2312
2315
  "aria-autocomplete": G == null ? void 0 : "list",
@@ -2316,12 +2319,12 @@ var Kt = {
2316
2319
  disabled: W,
2317
2320
  readOnly: $,
2318
2321
  rows: 1
2319
- }), nr = G == null ? tr : /* @__PURE__ */ F(N, { children: [tr, /* @__PURE__ */ P("div", {
2322
+ }), rr = G == null ? nr : /* @__PURE__ */ F(N, { children: [nr, /* @__PURE__ */ P("div", {
2320
2323
  "aria-hidden": !0,
2321
2324
  className: l("pointer-events-none absolute", I?.fontClassName || "dial-body-paragraph-text"),
2322
2325
  style: {
2323
- left: cn?.left ?? 0,
2324
- top: cn?.top ?? 0
2326
+ left: ln?.left ?? 0,
2327
+ top: ln?.top ?? 0
2325
2328
  },
2326
2329
  children: /* @__PURE__ */ P(v, {
2327
2330
  open: zt,
@@ -2340,7 +2343,7 @@ var Kt = {
2340
2343
  children: G.renderMenu({
2341
2344
  query: Bt,
2342
2345
  caretPosition: Q ?? 0,
2343
- close: dn,
2346
+ close: fn,
2344
2347
  listboxId: Gt,
2345
2348
  activeOptionId: qt
2346
2349
  })
@@ -2350,13 +2353,13 @@ var Kt = {
2350
2353
  className: "inline-block h-[1lh] w-0"
2351
2354
  })
2352
2355
  })
2353
- })] }), rr = /* @__PURE__ */ F("div", {
2354
- ref: sn,
2356
+ })] }), ir = /* @__PURE__ */ F("div", {
2357
+ ref: cn,
2355
2358
  className: "relative -me-1 -ms-1 w-[calc(100%+8px)]",
2356
- children: [Zn && /* @__PURE__ */ F("div", {
2357
- ref: Qn,
2359
+ children: [Qn && /* @__PURE__ */ F("div", {
2360
+ ref: $n,
2358
2361
  className: l(K.textarea, I?.fontClassName || "dial-body-paragraph-text", "pointer-events-none absolute inset-0 z-10 max-h-[272px] w-full overflow-hidden whitespace-pre-wrap pe-1 ps-1 [overflow-wrap:anywhere]"),
2359
- children: [ze(Y, Ft, Xn, K.mentionHighlight, K.mentionHighlightUnsupported), $n.map((e, t) => /* @__PURE__ */ P("div", {
2362
+ children: [ze(Y, Ft, Zn, K.mentionHighlight, K.mentionHighlightUnsupported), er.map((e, t) => /* @__PURE__ */ P("div", {
2360
2363
  "aria-hidden": !0,
2361
2364
  className: "pointer-events-none absolute rounded-sm bg-control-accent-alpha-active",
2362
2365
  style: {
@@ -2366,9 +2369,9 @@ var Kt = {
2366
2369
  height: e.height
2367
2370
  }
2368
2371
  }, `selection-${t}`))]
2369
- }), nr]
2370
- }), ir = Te ? void 0 : /* @__PURE__ */ P(pt, {
2371
- onAttachClick: Oe ? void 0 : () => Mn.current?.click(),
2372
+ }), rr]
2373
+ }), ar = Te ? void 0 : /* @__PURE__ */ P(pt, {
2374
+ onAttachClick: Oe ? void 0 : () => Nn.current?.click(),
2372
2375
  attachLabel: y,
2373
2376
  addMenuTitle: C,
2374
2377
  menuTitle: w,
@@ -2377,7 +2380,7 @@ var Kt = {
2377
2380
  isDisabled: W || $,
2378
2381
  chatSettings: nt,
2379
2382
  extraMenuItems: Lt,
2380
- onRecordVoice: Be && Dt && !s && !$ ? () => kn(Je.Attachment) : void 0,
2383
+ onRecordVoice: Be && Dt && !s && !$ ? () => An(Je.Attachment) : void 0,
2381
2384
  recordVoiceLabel: ie,
2382
2385
  toolsMenuItems: at ? rt : void 0,
2383
2386
  onToolToggle: it,
@@ -2385,15 +2388,15 @@ var Kt = {
2385
2388
  toolsBackLabel: st,
2386
2389
  menuOverlays: lt,
2387
2390
  getCaretPosition: () => Z.current?.selectionStart ?? Y.length
2388
- }), ar = ke === tt.Inline && (!Mt || je), or = ir && /* @__PURE__ */ P("div", {
2391
+ }), or = ke === tt.Inline && (!Mt || je), sr = ar && /* @__PURE__ */ P("div", {
2389
2392
  className: l("flex", H.addCluster),
2390
- children: ir
2391
- }), sr = Vn.length > 0 && it != null && /* @__PURE__ */ P("div", {
2393
+ children: ar
2394
+ }), cr = Hn.length > 0 && it != null && /* @__PURE__ */ P("div", {
2392
2395
  className: l("min-w-0 flex-1", H.toolsChips),
2393
2396
  children: /* @__PURE__ */ P(ht, {
2394
- items: Vn,
2397
+ items: Hn,
2395
2398
  onToolToggle: it,
2396
- onToolDismiss: Hn,
2399
+ onToolDismiss: Un,
2397
2400
  canRemove: at,
2398
2401
  removeLabel: ct?.removeLabel,
2399
2402
  stateOnLabel: ct?.stateOnLabel,
@@ -2401,17 +2404,17 @@ var Kt = {
2401
2404
  })
2402
2405
  });
2403
2406
  return /* @__PURE__ */ F("div", {
2404
- ref: Nn,
2407
+ ref: Pn,
2405
2408
  style: J,
2406
2409
  className: l(K.wrapper, W && K.wrapperDisabled, W && "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", de, H.wrapper),
2407
2410
  children: [
2408
- (Ze.length > 0 || pn.length > 0) && /* @__PURE__ */ P(se, {
2409
- attachments: [...Ze, ...pn],
2411
+ (Ze.length > 0 || mn.length > 0) && /* @__PURE__ */ P(se, {
2412
+ attachments: [...Ze, ...mn],
2410
2413
  onRemove: (e) => {
2411
- Ze.some((t) => t.id === e) ? Qe?.(e) : _n(e);
2414
+ Ze.some((t) => t.id === e) ? Qe?.(e) : vn(e);
2412
2415
  },
2413
- onRetry: vn,
2414
- onExpand: yn,
2416
+ onRetry: yn,
2417
+ onExpand: bn,
2415
2418
  labels: {
2416
2419
  removeLabel: E,
2417
2420
  retryLabel: D,
@@ -2421,58 +2424,58 @@ var Kt = {
2421
2424
  },
2422
2425
  styles: {
2423
2426
  ...ce,
2424
- className: l(pn.length > 6 && "-me-4 w-[calc(100%+1rem)]", ce?.className)
2427
+ className: l(mn.length > 6 && "-me-4 w-[calc(100%+1rem)]", ce?.className)
2425
2428
  },
2426
2429
  onAttachmentClick: Ct == null ? void 0 : (e) => {
2427
- let t = [...Ze, ...pn].find((t) => t.id === e);
2430
+ let t = [...Ze, ...mn].find((t) => t.id === e);
2428
2431
  t != null && Ct(t);
2429
2432
  }
2430
2433
  }),
2431
2434
  !Te && /* @__PURE__ */ P("input", {
2432
- ref: Mn,
2435
+ ref: Nn,
2433
2436
  type: "file",
2434
2437
  multiple: !0,
2435
2438
  accept: S,
2436
2439
  className: "sr-only",
2437
2440
  "aria-hidden": !0,
2438
2441
  tabIndex: -1,
2439
- onChange: Yn
2442
+ onChange: Xn
2440
2443
  }),
2441
- On && /* @__PURE__ */ P(b, {
2442
- text: On,
2444
+ kn && /* @__PURE__ */ P(b, {
2445
+ text: kn,
2443
2446
  className: "min-w-0 break-words px-1"
2444
2447
  }),
2445
2448
  $ && /* @__PURE__ */ P(bt, {
2446
2449
  embedded: !0,
2447
- state: En,
2448
- analyserNodeRef: Dn,
2449
- onStop: An,
2450
- onDiscard: jn,
2451
- attachButton: ir,
2450
+ state: Dn,
2451
+ analyserNodeRef: On,
2452
+ onStop: jn,
2453
+ onDiscard: Mn,
2454
+ attachButton: ar,
2452
2455
  stopLabel: ae,
2453
2456
  discardLabel: oe,
2454
2457
  processingLabel: Ge
2455
2458
  }),
2456
- !$ && U && rr,
2457
- !$ && !U && ar && sr && /* @__PURE__ */ P("div", {
2459
+ !$ && U && ir,
2460
+ !$ && !U && or && cr && /* @__PURE__ */ P("div", {
2458
2461
  className: "flex",
2459
- children: sr
2462
+ children: cr
2460
2463
  }),
2461
2464
  !$ && !U && /* @__PURE__ */ F("div", {
2462
- className: l("flex items-center gap-2", ar ? "flex-nowrap" : "flex-wrap", H.actionRow),
2465
+ className: l("flex items-center gap-2", or ? "flex-nowrap" : "flex-wrap", H.actionRow),
2463
2466
  children: [
2464
- ar && or,
2467
+ or && sr,
2465
2468
  /* @__PURE__ */ P("div", {
2466
- className: l("flex min-w-0 items-center self-stretch", ar ? "flex-1" : "w-full", H.textareaWrap),
2467
- children: rr
2469
+ className: l("flex min-w-0 items-center self-stretch", or ? "flex-1" : "w-full", H.textareaWrap),
2470
+ children: ir
2468
2471
  }),
2469
- !ar && or,
2470
- !ar && sr,
2472
+ !or && sr,
2473
+ !or && cr,
2471
2474
  /* @__PURE__ */ P("div", {
2472
2475
  className: l("ms-auto flex flex-shrink-0 items-center gap-2", H.footerActions),
2473
2476
  children: Me ? Me({
2474
- canSend: Rn,
2475
- onSend: Gn
2477
+ canSend: zn,
2478
+ onSend: Kn
2476
2479
  }) : /* @__PURE__ */ F(N, { children: [
2477
2480
  kt,
2478
2481
  /* @__PURE__ */ P(Zt, {
@@ -2490,7 +2493,7 @@ var Kt = {
2490
2493
  onPickerToggle: () => Pt((e) => !e),
2491
2494
  onPickerOpenChange: Pt
2492
2495
  }),
2493
- Wn && /* @__PURE__ */ P(x, {
2496
+ Gn && /* @__PURE__ */ P(x, {
2494
2497
  icon: /* @__PURE__ */ P(he, {
2495
2498
  size: g.LG,
2496
2499
  stroke: _,
@@ -2499,17 +2502,17 @@ var Kt = {
2499
2502
  "aria-label": re,
2500
2503
  tooltipProps: { tooltip: re },
2501
2504
  className: "size-[40px] flex-shrink-0 mobile:min-h-11 mobile:min-w-11",
2502
- onClick: () => kn(Je.Dictation),
2505
+ onClick: () => An(Je.Dictation),
2503
2506
  disabled: W || s
2504
2507
  }),
2505
2508
  s && o ? /* @__PURE__ */ P(St, {
2506
2509
  onStop: o,
2507
2510
  ariaLabel: ne
2508
2511
  }) : !s && /* @__PURE__ */ P(xt, {
2509
- onSend: Gn,
2510
- isDisabled: !Un || !Rn,
2512
+ onSend: Kn,
2513
+ isDisabled: !Wn || !zn,
2511
2514
  ariaLabel: A,
2512
- sendTooltip: Ln ? j : te ?? j
2515
+ sendTooltip: Rn ? j : te ?? j
2513
2516
  })
2514
2517
  ] })
2515
2518
  })
@@ -2520,7 +2523,7 @@ var Kt = {
2520
2523
  role: "status",
2521
2524
  "aria-live": "polite",
2522
2525
  "aria-atomic": "true",
2523
- children: /* @__PURE__ */ P("span", { children: wn.text }, wn.revision)
2526
+ children: /* @__PURE__ */ P("span", { children: Tn.text }, Tn.revision)
2524
2527
  })
2525
2528
  ]
2526
2529
  });
package/models/Input.d.ts CHANGED
@@ -534,22 +534,22 @@ export interface InputProps {
534
534
  */
535
535
  caretPositionOverride?: number;
536
536
  /**
537
- * Host-injected slash-command menu. When provided, typing `triggerPrefix`
538
- * as the first character of an empty textarea — or pasting into an empty
539
- * textarea a value that is exactly the prefix, or the prefix plus a
540
- * whitespace-free, prefix-free query — opens an overlay above the input;
541
- * it stays open while the value keeps matching the prefix followed by a
542
- * query with no whitespace or second prefix character, and closes on
543
- * unmatch, Escape, or an outside click. Escape is the one dismissal that
544
- * latches: the menu stays closed over that same word until the value stops
545
- * matching and the trigger is typed or pasted again. An outside click only
537
+ * Host-injected slash-command menu. When provided, an overlay opens above
538
+ * the input whenever the whitespace-delimited word at the caret becomes
539
+ * `triggerPrefix` alone or followed by a whitespace-free, prefix-free
540
+ * query — anywhere in the textarea, whether it was empty or already held
541
+ * text, and whether the word was typed or pasted. It stays open while that
542
+ * word keeps matching, and closes on unmatch, Escape, or an outside click.
543
+ * Escape is the one dismissal that latches: the menu stays closed over that
544
+ * same word until it stops matching and the trigger is typed or pasted
545
+ * again. An outside click only
546
546
  * closes it for the moment — typing/deleting within the same still-matching
547
547
  * word, or moving the caret back into it (a click, or refocusing the
548
548
  * textarea), reopens it with no need to retype the trigger. A message can
549
549
  * hold more than one command-shaped word at once; the menu always tracks
550
550
  * whichever one the caret is actually in, re-evaluated on every such caret
551
- * move rather than assumed from whichever word was active before. Any other
552
- * pasted value, and any paste into a non-empty textarea, inserts as a
551
+ * move rather than assumed from whichever word was active before. A paste
552
+ * that leaves any other word at the caret (e.g. `/s sdf`) inserts as a
553
553
  * regular paste and opens nothing. Selection typically goes through
554
554
  * `ctx.close({ consumeQuery: true })`, which removes the `/query` text from
555
555
  * the textarea. Absent disables the mechanism.
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.2.0-dev.328",
4
+ "version": "1.2.0-dev.336",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -19,12 +19,12 @@
19
19
  "dependencies": {
20
20
  "react-window": "^2.2.7",
21
21
  "@tabler/icons-react": "^3.44.0",
22
- "@epam/ai-dial-attachment-input": "1.2.0-dev.328"
22
+ "@epam/ai-dial-attachment-input": "1.2.0-dev.336"
23
23
  },
24
24
  "peerDependencies": {
25
- "@epam/ai-dial-chat-shared": "1.2.0-dev.328",
25
+ "@epam/ai-dial-chat-shared": "1.2.0-dev.336",
26
26
  "react": "^19.2.8",
27
- "@epam/ai-dial-ui-kit": "^0.15.0-dev.51"
27
+ "@epam/ai-dial-ui-kit": "^0.15.0"
28
28
  },
29
29
  "repository": {
30
30
  "type": "git",