@epam/ai-dial-conversation-messages 1.0.0-dev.503 → 1.0.0-dev.509

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":"AssistantMessageBubble.d.ts","sourceRoot":"","sources":["../../../src/components/MessageBubble/AssistantMessageBubble.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAI/E,gHAAgH;AAChH,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,2BAA2B,CAgIlE,CAAC"}
1
+ {"version":3,"file":"AssistantMessageBubble.d.ts","sourceRoot":"","sources":["../../../src/components/MessageBubble/AssistantMessageBubble.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAI/E,gHAAgH;AAChH,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,2BAA2B,CAkIlE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"MessageBubble.d.ts","sourceRoot":"","sources":["../../../src/components/MessageBubble/MessageBubble.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAKtE,wGAAwG;AACxG,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CA4BhD,CAAC"}
1
+ {"version":3,"file":"MessageBubble.d.ts","sourceRoot":"","sources":["../../../src/components/MessageBubble/MessageBubble.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAKtE,wGAAwG;AACxG,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CA8BhD,CAAC"}
@@ -1,11 +1,16 @@
1
1
  import { FC } from 'react';
2
- /** Props for the model-change status message banner. */
3
- export interface StatusMessageBubbleProps {
2
+ /** User-visible strings for {@link StatusMessageBubble}. */
3
+ export interface StatusMessageBubbleLabels {
4
4
  /** Bold prefix text displayed before the description. Defaults to `'Model switched.'`. */
5
5
  titleText?: string;
6
6
  /** Full description text, e.g. "The model has been switched from GPT to Imagen." */
7
7
  bodyText: string;
8
8
  }
9
+ /** Props for the model-change status message banner. */
10
+ export interface StatusMessageBubbleProps {
11
+ /** User-visible strings. */
12
+ labels: StatusMessageBubbleLabels;
13
+ }
9
14
  /**
10
15
  * Full-width info banner rendered in the conversation timeline when the active
11
16
  * deployment changes. Matches Figma node 613:8730 (`section-message`).
@@ -1 +1 @@
1
- {"version":3,"file":"StatusMessageBubble.d.ts","sourceRoot":"","sources":["../../../src/components/MessageBubble/StatusMessageBubble.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAE3B,wDAAwD;AACxD,MAAM,WAAW,wBAAwB;IACvC,0FAA0F;IAC1F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oFAAoF;IACpF,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,wBAAwB,CAa5D,CAAC"}
1
+ {"version":3,"file":"StatusMessageBubble.d.ts","sourceRoot":"","sources":["../../../src/components/MessageBubble/StatusMessageBubble.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAE3B,4DAA4D;AAC5D,MAAM,WAAW,yBAAyB;IACxC,0FAA0F;IAC1F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oFAAoF;IACpF,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wDAAwD;AACxD,MAAM,WAAW,wBAAwB;IACvC,4BAA4B;IAC5B,MAAM,EAAE,yBAAyB,CAAC;CACnC;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,wBAAwB,CAY5D,CAAC"}
package/index.d.ts CHANGED
@@ -6,7 +6,7 @@ export { MessageActions } from './components/MessageActions/MessageActions';
6
6
  export { MessageSource } from './components/MessageSource/MessageSource';
7
7
  export { BubblePosition } from './types/bubble-position';
8
8
  export type { MessageBubbleProps, UserMessageBubbleProps, AssistantMessageBubbleProps, MessageBubbleStyles, MessageBubbleColors, MessageBubbleTypography, MessageBubbleLabels, AssistantMessageBubbleLabels, } from './models/message-bubble';
9
- export type { StatusMessageBubbleProps } from './components/MessageBubble/StatusMessageBubble';
9
+ export type { StatusMessageBubbleLabels, StatusMessageBubbleProps, } from './components/MessageBubble/StatusMessageBubble';
10
10
  export type { MessageActionsProps, MessageActionLabels, MessageActionTooltips, MessageActionAriaLabels, } from './models/message-actions';
11
- export type { MessageSourceProps, MessageSourceStyles, MessageSourceColors, MessageSourceTypography, } from './models/message-source';
11
+ export type { MessageSourceProps, MessageSourceLabels, MessageSourceStyles, MessageSourceColors, MessageSourceTypography, } from './models/message-source';
12
12
  //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,mDAAmD,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,YAAY,EACV,kBAAkB,EAClB,sBAAsB,EACtB,2BAA2B,EAC3B,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,mBAAmB,EACnB,4BAA4B,GAC7B,MAAM,yBAAyB,CAAC;AACjC,YAAY,EAAE,wBAAwB,EAAE,MAAM,gDAAgD,CAAC;AAC/F,YAAY,EACV,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,mDAAmD,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,YAAY,EACV,kBAAkB,EAClB,sBAAsB,EACtB,2BAA2B,EAC3B,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,mBAAmB,EACnB,4BAA4B,GAC7B,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACV,yBAAyB,EACzB,wBAAwB,GACzB,MAAM,gDAAgD,CAAC;AACxD,YAAY,EACV,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,yBAAyB,CAAC"}
package/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { AttachmentErrorReason as e, AttachmentType as t, CodeBlockTheme as n, DeploymentIcon as r, Highlight as i, MDMessageViewer as a, MIME_TYPE_EXT_MAP as o, MessageRating as s, MessageRole as c, RequestStatus as l, ResponseFormat as u, buildCssVars as d, mergeClasses as f, useCollapsedText as p } from "@epam/ai-dial-chat-shared";
2
2
  import { DIAL_ICON_SIZE as m, DialGhostIconButton as h, DialInput as g, DialLinkButton as _, DialNotification as v, DialPopup as y, DialPrimaryButton as b, DialRadioGroup as x, DialRoundedButton as S, DialSkeleton as C, DialSkeletonVariant as w, DialSlider as T, DialSpinner as E, DialTag as D, DialTooltip as O, ElementSize as k, PopupSize as A, RadioGroupOrientation as j } from "@epam/ai-dial-ui-kit";
3
- import { IconCheck as M, IconChevronDown as N, IconChevronUp as P, IconClipboard as F, IconCopy as I, IconDownload as L, IconFile as R, IconFileTypeBmp as z, IconFileTypeCss as B, IconFileTypeCsv as V, IconFileTypeDoc as H, IconFileTypeDocx as U, IconFileTypeHtml as W, IconFileTypeJpg as ee, IconFileTypeJs as te, IconFileTypeJsx as G, IconFileTypePdf as K, IconFileTypePhp as ne, IconFileTypePng as re, IconFileTypePpt as ie, IconFileTypeRs as ae, IconFileTypeSql as oe, IconFileTypeSvg as se, IconFileTypeTs as ce, IconFileTypeTsx as le, IconFileTypeTxt as ue, IconFileTypeVue as de, IconFileTypeXls as fe, IconFileTypeXml as pe, IconFileTypeZip as me, IconMarkdown as he, IconMusic as ge, IconPaperclip as _e, IconPencilMinus as ve, IconPhoto as ye, 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";
3
+ import { IconCheck as M, IconChevronDown as N, IconChevronUp as P, IconClipboard as F, IconCopy as I, IconDownload as L, IconFile as R, IconFileTypeBmp as z, IconFileTypeCss as B, IconFileTypeCsv as V, IconFileTypeDoc as H, IconFileTypeDocx as U, IconFileTypeHtml as W, IconFileTypeJpg as ee, IconFileTypeJs as G, IconFileTypeJsx as te, IconFileTypePdf as K, IconFileTypePhp as ne, IconFileTypePng as re, IconFileTypePpt as ie, IconFileTypeRs as ae, IconFileTypeSql as oe, IconFileTypeSvg as se, IconFileTypeTs as ce, IconFileTypeTsx as le, IconFileTypeTxt as ue, IconFileTypeVue as de, IconFileTypeXls as fe, IconFileTypeXml as pe, IconFileTypeZip as me, IconMarkdown as he, IconMusic as ge, IconPaperclip as _e, IconPencilMinus as ve, IconPhoto as ye, 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 ke, useEffect as Ae, useId as je, useMemo as Me, useRef as Ne, useState as q } from "react";
6
6
  import { Fragment as J, jsx as Y, jsxs as X } from "react/jsx-runtime";
@@ -75,8 +75,8 @@ var Pe = /* @__PURE__ */ function(e) {
75
75
  case "application/sql":
76
76
  case "text/x-sql": return oe;
77
77
  case "text/javascript":
78
- case "application/javascript": return te;
79
- case "text/jsx": return G;
78
+ case "application/javascript": return G;
79
+ case "text/jsx": return te;
80
80
  case "application/typescript":
81
81
  case "text/typescript": return ce;
82
82
  case "text/tsx": return le;
@@ -132,45 +132,45 @@ var Pe = /* @__PURE__ */ function(e) {
132
132
  layout: Ie.Collapsed,
133
133
  visibleCount: 4,
134
134
  hiddenCount: e - 4
135
- }, We = ({ attachment: n, searchQuery: r = "", onRemove: a, onRetry: o, onExpand: s, onClick: c, isSelected: l, shouldAlwaysShowActions: u, labels: p, typeLabels: g, styles: _, showHoverDownloadIcon: v = !1, className: y }) => {
136
- let { removeLabel: b = "Remove attachment", retryLabel: x = "Retry upload", clickLabel: S = "Open attachment", expandLabel: T = "Expand pasted text", loadingLabel: D = "Loading attachment", uploadFailedStatusLabel: O = "Upload failed" } = p ?? {}, { colors: A, typography: j, roundedClassName: M = "rounded-xl" } = _ ?? {}, { id: N, name: P } = n, F = n.previewUrl ?? n.url, I = n.type === t.Pasted, R = I && s !== void 0, z = Me(() => I ? P : Le(P), [I, P]), B = d({
137
- "--ci-card-border": A?.border,
138
- "--ci-card-bg": A?.background,
139
- "--ci-card-name": A?.nameText,
140
- "--ci-card-meta": A?.metaText,
141
- "--ci-card-border-error": A?.borderError,
142
- "--ci-card-bg-selected": A?.backgroundSelected,
143
- "--ci-card-border-selected": A?.borderSelected,
144
- "--ci-card-bg-hover": A?.backgroundHover,
145
- "--ci-loading-overlay-bg": A?.loadingOverlayBackground,
146
- "--ci-card-action-color": A?.actionColor,
147
- "--ci-card-remove-bg-hover": A?.actionBackgroundHover,
148
- "--ci-card-focus-outline": A?.focusOutline,
149
- "--ci-card-remove-bg": A?.removeBackground,
150
- "--ci-card-remove-color": A?.removeColor,
151
- "--ci-card-hover-icon-bg": A?.hoverIconBackground,
152
- "--ci-card-hover-icon-color": A?.hoverIconColor
153
- }), { isLoading: V, isError: H, isImage: U, isAudio: W, areActionsVisible: ee, BottomIcon: te, typeLabel: G, cardColorClass: K, removeBtnClass: ne } = Me(() => He(n, l ?? !1, u ?? !1, g), [
135
+ }, We = ({ attachment: n, searchQuery: r = "", onRemove: a, onRetry: o, onExpand: s, onClick: c, isSelected: l, shouldAlwaysShowActions: u, labels: p, styles: g, showHoverDownloadIcon: _ = !1 }) => {
136
+ let { removeLabel: v = "Remove attachment", retryLabel: y = "Retry upload", clickLabel: b = "Open attachment", expandLabel: x = "Expand pasted text", loadingLabel: S = "Loading attachment", uploadFailedStatusLabel: T = "Upload failed" } = p ?? {}, { colors: D, typography: O, roundedClassName: A = "rounded-xl", className: j } = g ?? {}, { id: M, name: N } = n, P = n.previewUrl ?? n.url, F = n.type === t.Pasted, I = F && s !== void 0, R = Me(() => F ? N : Le(N), [F, N]), z = d({
137
+ "--ci-card-border": D?.border,
138
+ "--ci-card-bg": D?.background,
139
+ "--ci-card-name": D?.nameText,
140
+ "--ci-card-meta": D?.metaText,
141
+ "--ci-card-border-error": D?.borderError,
142
+ "--ci-card-bg-selected": D?.backgroundSelected,
143
+ "--ci-card-border-selected": D?.borderSelected,
144
+ "--ci-card-bg-hover": D?.backgroundHover,
145
+ "--ci-loading-overlay-bg": D?.loadingOverlayBackground,
146
+ "--ci-card-action-color": D?.actionColor,
147
+ "--ci-card-remove-bg-hover": D?.actionBackgroundHover,
148
+ "--ci-card-focus-outline": D?.focusOutline,
149
+ "--ci-card-remove-bg": D?.removeBackground,
150
+ "--ci-card-remove-color": D?.removeColor,
151
+ "--ci-card-hover-icon-bg": D?.hoverIconBackground,
152
+ "--ci-card-hover-icon-color": D?.hoverIconColor
153
+ }), { isLoading: B, isError: V, isImage: H, isAudio: U, areActionsVisible: W, BottomIcon: ee, typeLabel: G, cardColorClass: te, removeBtnClass: K } = Me(() => He(n, l ?? !1, u ?? !1, p), [
154
154
  n,
155
155
  l,
156
156
  u,
157
- g
158
- ]), re = c !== void 0 && !R && !V && !H, ie = R || re, { imageRef: ae, imageLoadStatus: oe } = Fe({
159
- enabled: U,
160
- src: F
161
- }), se = () => {
162
- R && s ? s(N) : re && c && c(N);
163
- }, ce = (e) => {
164
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), se());
157
+ p
158
+ ]), ne = c !== void 0 && !I && !B && !V, re = I || ne, { imageRef: ie, imageLoadStatus: ae } = Fe({
159
+ enabled: H,
160
+ src: P
161
+ }), oe = () => {
162
+ I && s ? s(M) : ne && c && c(M);
163
+ }, se = (e) => {
164
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), oe());
165
165
  };
166
- if (W) return /* @__PURE__ */ X("div", {
167
- style: B,
168
- className: f("group flex w-full min-w-[280px] max-w-[300px] flex-col gap-2 border p-3", M, K, y),
166
+ if (U) return /* @__PURE__ */ X("div", {
167
+ style: z,
168
+ className: f("group flex w-full min-w-[280px] max-w-[300px] flex-col gap-2 border p-3", A, te, j),
169
169
  children: [/* @__PURE__ */ X("div", {
170
170
  className: "flex items-center justify-between gap-2",
171
171
  children: [/* @__PURE__ */ Y("span", {
172
172
  title: n.name,
173
- className: f(j?.fontClassName ?? "dial-tiny-text", "min-w-0 truncate", Z.name),
173
+ className: f(O?.fontClassName ?? "dial-tiny-text", "min-w-0 truncate", Z.name),
174
174
  children: r ? /* @__PURE__ */ Y(i, {
175
175
  text: n.name,
176
176
  query: r,
@@ -182,10 +182,10 @@ var Pe = /* @__PURE__ */ function(e) {
182
182
  "aria-hidden": !0
183
183
  }),
184
184
  size: k.Small,
185
- className: f("h-6 w-6 shrink-0 rounded", ne),
186
- "aria-label": S,
185
+ className: f("h-6 w-6 shrink-0 rounded", K),
186
+ "aria-label": b,
187
187
  onClick: (e) => {
188
- e.stopPropagation(), c(N);
188
+ e.stopPropagation(), c(M);
189
189
  }
190
190
  })]
191
191
  }), n.playUrl && /* @__PURE__ */ Y("audio", {
@@ -196,78 +196,78 @@ var Pe = /* @__PURE__ */ function(e) {
196
196
  preload: "metadata"
197
197
  })]
198
198
  });
199
- let le = f("group relative flex h-[100px] w-[100px] flex-shrink-0 border focus-within:outline focus-within:outline-1 focus-within:outline-offset-1", M, K, !U && "flex-col gap-3 p-3", ie && "cursor-pointer", y), ue = /* @__PURE__ */ X(J, { children: [
200
- U ? /* @__PURE__ */ X("div", {
199
+ let ce = f("group relative flex h-[100px] w-[100px] flex-shrink-0 border focus-within:outline focus-within:outline-1 focus-within:outline-offset-1", A, te, !H && "flex-col gap-3 p-3", re && "cursor-pointer", j), le = /* @__PURE__ */ X(J, { children: [
200
+ H ? /* @__PURE__ */ X("div", {
201
201
  className: "relative h-full w-full overflow-hidden",
202
- children: [oe !== Pe.Loaded && /* @__PURE__ */ Y(C, {
202
+ children: [ae !== Pe.Loaded && /* @__PURE__ */ Y(C, {
203
203
  variant: w.Rectangular,
204
204
  width: "100%",
205
205
  height: "100%",
206
- active: oe === Pe.Loading,
206
+ active: ae === Pe.Loading,
207
207
  overlay: /* @__PURE__ */ Y(ye, {
208
208
  size: m.LG,
209
- className: j?.placeholderIconClassName ?? "text-secondary",
209
+ className: O?.placeholderIconClassName ?? "text-secondary",
210
210
  "aria-hidden": !0
211
211
  }),
212
- className: f("absolute inset-0", M)
212
+ className: f("absolute inset-0", A)
213
213
  }), /* @__PURE__ */ Y("img", {
214
- ref: ae,
215
- src: F,
216
- alt: P,
214
+ ref: ie,
215
+ src: P,
216
+ alt: N,
217
217
  loading: "lazy",
218
218
  decoding: "async",
219
- className: f("h-full w-full object-cover transition-opacity duration-200", oe === Pe.Loaded ? "opacity-100" : "opacity-0", M)
219
+ className: f("h-full w-full object-cover transition-opacity duration-200", ae === Pe.Loaded ? "opacity-100" : "opacity-0", A)
220
220
  })]
221
- }) : H ? /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X("div", {
221
+ }) : V ? /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X("div", {
222
222
  className: "flex flex-row items-center gap-1 overflow-hidden",
223
- children: [/* @__PURE__ */ Y(te, {
223
+ children: [/* @__PURE__ */ Y(ee, {
224
224
  size: m.SM,
225
225
  className: f("shrink-0", Z.meta),
226
226
  "aria-hidden": !0
227
227
  }), /* @__PURE__ */ Y("span", {
228
228
  title: G,
229
- className: f(j?.metaClassName ?? "dial-tiny-text", "min-w-0 truncate", Z.meta),
229
+ className: f(O?.metaClassName ?? "dial-tiny-text", "min-w-0 truncate", Z.meta),
230
230
  children: G
231
231
  })]
232
232
  }), /* @__PURE__ */ Y("div", {
233
233
  className: "min-w-0 flex-1",
234
234
  children: /* @__PURE__ */ Y("div", {
235
- title: z,
236
- className: f(j?.fontClassName ?? "dial-tiny-text", "line-clamp-3 break-words", Z.name),
235
+ title: R,
236
+ className: f(O?.fontClassName ?? "dial-tiny-text", "line-clamp-3 break-words", Z.name),
237
237
  children: r ? /* @__PURE__ */ Y(i, {
238
- text: z,
238
+ text: R,
239
239
  query: r,
240
240
  maxLines: 3
241
- }) : z
241
+ }) : R
242
242
  })
243
243
  })] }) : /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("div", {
244
244
  className: "min-w-0 flex-1",
245
245
  children: /* @__PURE__ */ Y("div", {
246
- title: z,
247
- className: f(j?.fontClassName ?? "dial-tiny-text", "line-clamp-3 break-words", Z.name),
246
+ title: R,
247
+ className: f(O?.fontClassName ?? "dial-tiny-text", "line-clamp-3 break-words", Z.name),
248
248
  children: r ? /* @__PURE__ */ Y(i, {
249
- text: z,
249
+ text: R,
250
250
  query: r,
251
251
  maxLines: 3
252
- }) : z
252
+ }) : R
253
253
  })
254
254
  }), /* @__PURE__ */ X("div", {
255
255
  className: "flex flex-row items-center gap-1 overflow-hidden",
256
- children: [/* @__PURE__ */ Y(te, {
256
+ children: [/* @__PURE__ */ Y(ee, {
257
257
  size: m.SM,
258
258
  className: f("shrink-0", Z.meta),
259
259
  "aria-hidden": !0
260
260
  }), /* @__PURE__ */ Y("span", {
261
261
  title: G,
262
- className: f(j?.metaClassName ?? "dial-tiny-text", "min-w-0 truncate", Z.meta),
262
+ className: f(O?.metaClassName ?? "dial-tiny-text", "min-w-0 truncate", Z.meta),
263
263
  children: G
264
264
  })]
265
265
  })] }),
266
- V && /* @__PURE__ */ Y("span", {
267
- className: f("absolute inset-0 flex items-center justify-center", M, Z.loadingOverlay),
266
+ B && /* @__PURE__ */ Y("span", {
267
+ className: f("absolute inset-0 flex items-center justify-center", A, Z.loadingOverlay),
268
268
  children: /* @__PURE__ */ Y(E, {
269
269
  size: 40,
270
- ariaLabel: D,
270
+ ariaLabel: S,
271
271
  className: "z-50"
272
272
  })
273
273
  }),
@@ -275,21 +275,21 @@ var Pe = /* @__PURE__ */ function(e) {
275
275
  role: "status",
276
276
  "aria-live": "polite",
277
277
  className: "sr-only",
278
- children: H ? O : ""
278
+ children: V ? T : ""
279
279
  }),
280
- !V && /* @__PURE__ */ X("div", {
281
- className: f("absolute end-1 top-1 flex gap-1 transition-opacity", ee ? "opacity-100" : "opacity-0 group-focus-within:opacity-100 group-hover:opacity-100 mobile:opacity-100"),
280
+ !B && /* @__PURE__ */ X("div", {
281
+ className: f("absolute end-1 top-1 flex gap-1 transition-opacity", W ? "opacity-100" : "opacity-0 group-focus-within:opacity-100 group-hover:opacity-100 mobile:opacity-100"),
282
282
  children: [
283
- H && o && n.errorReason !== e.UnsupportedType && /* @__PURE__ */ Y(h, {
283
+ V && o && n.errorReason !== e.UnsupportedType && /* @__PURE__ */ Y(h, {
284
284
  icon: /* @__PURE__ */ Y(xe, {
285
285
  size: m.SM,
286
286
  "aria-hidden": !0
287
287
  }),
288
288
  size: k.Small,
289
- className: f("h-6 w-6 rounded", ne),
290
- "aria-label": x,
289
+ className: f("h-6 w-6 rounded", K),
290
+ "aria-label": y,
291
291
  onClick: (e) => {
292
- e.stopPropagation(), o(N);
292
+ e.stopPropagation(), o(M);
293
293
  }
294
294
  }),
295
295
  a && /* @__PURE__ */ Y(h, {
@@ -298,13 +298,13 @@ var Pe = /* @__PURE__ */ function(e) {
298
298
  "aria-hidden": !0
299
299
  }),
300
300
  size: k.Small,
301
- className: f("h-6 w-6 rounded", ne),
302
- "aria-label": b,
301
+ className: f("h-6 w-6 rounded", K),
302
+ "aria-label": v,
303
303
  onClick: (e) => {
304
- e.stopPropagation(), a?.(N);
304
+ e.stopPropagation(), a?.(M);
305
305
  }
306
306
  }),
307
- v && !a && !H && /* @__PURE__ */ Y(L, {
307
+ _ && !a && !V && /* @__PURE__ */ Y(L, {
308
308
  size: m.SM,
309
309
  "aria-hidden": !0,
310
310
  className: f("h-6 w-6 rounded-lg p-1", Z.hoverDownloadIcon)
@@ -312,19 +312,19 @@ var Pe = /* @__PURE__ */ function(e) {
312
312
  ]
313
313
  })
314
314
  ] });
315
- return ie ? /* @__PURE__ */ Y("div", {
316
- style: B,
317
- className: le,
318
- onClick: se,
319
- onKeyDown: ce,
315
+ return re ? /* @__PURE__ */ Y("div", {
316
+ style: z,
317
+ className: ce,
318
+ onClick: oe,
319
+ onKeyDown: se,
320
320
  tabIndex: 0,
321
321
  role: "button",
322
- "aria-label": re ? S : R ? T : void 0,
323
- children: ue
322
+ "aria-label": ne ? b : I ? x : void 0,
323
+ children: le
324
324
  }) : /* @__PURE__ */ Y("div", {
325
- style: B,
326
- className: le,
327
- children: ue
325
+ style: z,
326
+ className: ce,
327
+ children: le
328
328
  });
329
329
  }, Q = {
330
330
  tile: "_tile_1l1lz_1",
@@ -340,110 +340,110 @@ var Pe = /* @__PURE__ */ function(e) {
340
340
  }, Ge = {
341
341
  [e.Network]: "Upload failed · network error",
342
342
  [e.UnsupportedType]: "Upload failed · unsupported file type"
343
- }, Ke = ({ attachment: t, onClick: r, onRetry: i, labels: a, typeLabels: o, styles: s, theme: c = n.Dark, className: u }) => {
344
- let { clickLabel: p = "Download attachment", retryLabel: g = "Retry upload", sizeLabel: _, uploadingLabel: v = "Uploading", errorReasonLabels: y, genericErrorLabel: b = "Upload failed" } = a ?? {}, { nameClassName: x = "dial-caption-text", metaClassName: S = "dial-caption-text", colors: C } = s ?? {}, w = d({
345
- "--ci-tile-bg": C?.background,
346
- "--ci-tile-border": C?.border,
347
- "--ci-tile-border-hover": C?.borderHover,
348
- "--ci-tile-focus-outline": C?.focusOutline,
349
- "--ci-tile-bg-error": C?.backgroundError,
350
- "--ci-tile-border-error": C?.borderError,
351
- "--ci-tile-error-text": C?.errorText,
352
- "--ci-tile-name-text": C?.nameText,
353
- "--ci-tile-type-text": C?.typeText,
354
- "--ci-tile-hover-icon-bg": C?.hoverIconBackground,
355
- "--ci-tile-hover-icon-color": C?.hoverIconColor,
356
- "--ci-tile-track-bg": C?.trackBackground,
357
- "--ci-tile-fill-bg": C?.fillBackground
358
- }), { id: T, name: E, status: D, errorReason: O } = t, A = D === l.Loading, j = D === l.Error, M = je(), N = j && (O && (y?.[O] ?? Ge[O]) || b), { BottomIcon: P, typeLabel: F } = He(t, !1, !1, o), I = !j && !A && r !== void 0, R = j && !!i && O !== e.UnsupportedType, z = I || R ? "pe-5" : void 0, B = () => {
359
- I && r?.(t);
360
- }, V = (e) => {
361
- (e.key === "Enter" || e.key === " ") && I && (e.preventDefault(), B());
362
- }, H = f("group relative flex size-[84px] flex-col justify-between gap-1 overflow-hidden rounded-xl border p-1.5", Q.tile, !j && c === n.Light && Q.tileLight, j && Q.tileError), U = /* @__PURE__ */ Y("div", {
363
- title: E,
364
- className: f(x, "line-clamp-2 min-w-0 break-words", Q.nameText, !j && z),
365
- children: E
366
- }), W = /* @__PURE__ */ X("div", {
367
- className: f("flex items-center gap-1 overflow-hidden", j && z),
368
- children: [/* @__PURE__ */ Y(P, {
343
+ }, Ke = ({ attachment: t, onClick: r, onRetry: i, labels: a, styles: o, theme: s = n.Dark }) => {
344
+ let { clickLabel: c = "Download attachment", retryLabel: u = "Retry upload", sizeLabel: p, uploadingLabel: g = "Uploading", errorReasonLabels: _, genericErrorLabel: v = "Upload failed" } = a ?? {}, { typography: { nameClassName: y = "dial-caption-text", metaClassName: b = "dial-caption-text" } = {}, colors: x, className: S } = o ?? {}, C = d({
345
+ "--ci-tile-bg": x?.background,
346
+ "--ci-tile-border": x?.border,
347
+ "--ci-tile-border-hover": x?.borderHover,
348
+ "--ci-tile-focus-outline": x?.focusOutline,
349
+ "--ci-tile-bg-error": x?.backgroundError,
350
+ "--ci-tile-border-error": x?.borderError,
351
+ "--ci-tile-error-text": x?.errorText,
352
+ "--ci-tile-name-text": x?.nameText,
353
+ "--ci-tile-type-text": x?.typeText,
354
+ "--ci-tile-hover-icon-bg": x?.hoverIconBackground,
355
+ "--ci-tile-hover-icon-color": x?.hoverIconColor,
356
+ "--ci-tile-track-bg": x?.trackBackground,
357
+ "--ci-tile-fill-bg": x?.fillBackground
358
+ }), { id: w, name: T, status: E, errorReason: D } = t, O = E === l.Loading, A = E === l.Error, j = je(), M = A && (D && (_?.[D] ?? Ge[D]) || v), { BottomIcon: N, typeLabel: P } = He(t, !1, !1, a), F = !A && !O && r !== void 0, I = A && !!i && D !== e.UnsupportedType, R = F || I ? "pe-5" : void 0, z = () => {
359
+ F && r?.(t);
360
+ }, B = (e) => {
361
+ (e.key === "Enter" || e.key === " ") && F && (e.preventDefault(), z());
362
+ }, V = f("group relative flex size-[84px] flex-col justify-between gap-1 overflow-hidden rounded-xl border p-1.5", Q.tile, !A && s === n.Light && Q.tileLight, A && Q.tileError), H = /* @__PURE__ */ Y("div", {
363
+ title: T,
364
+ className: f(y, "line-clamp-2 min-w-0 break-words", Q.nameText, !A && R),
365
+ children: T
366
+ }), U = /* @__PURE__ */ X("div", {
367
+ className: f("flex items-center gap-1 overflow-hidden", A && R),
368
+ children: [/* @__PURE__ */ Y(N, {
369
369
  size: 16,
370
370
  className: Q.typeText,
371
371
  "aria-hidden": !0
372
372
  }), /* @__PURE__ */ Y("span", {
373
- className: f(S, "truncate", Q.typeText),
374
- children: _ ? `${F} · ${_}` : F
373
+ className: f(b, "truncate", Q.typeText),
374
+ children: p ? `${P} · ${p}` : P
375
375
  })]
376
- }), ee = /* @__PURE__ */ X(J, { children: [
377
- j ? /* @__PURE__ */ X(J, { children: [W, U] }) : /* @__PURE__ */ X(J, { children: [U, W] }),
378
- A && /* @__PURE__ */ Y("div", {
376
+ }), W = /* @__PURE__ */ X(J, { children: [
377
+ A ? /* @__PURE__ */ X(J, { children: [U, H] }) : /* @__PURE__ */ X(J, { children: [H, U] }),
378
+ O && /* @__PURE__ */ Y("div", {
379
379
  role: "progressbar",
380
- "aria-label": v,
380
+ "aria-label": g,
381
381
  className: f("absolute inset-x-2 bottom-2 h-[3px] overflow-hidden rounded-full", Q.track),
382
382
  children: /* @__PURE__ */ Y("div", { className: f("h-full w-1/3 rounded-full", Q.indeterminateFill) })
383
383
  }),
384
- I && /* @__PURE__ */ Y(L, {
384
+ F && /* @__PURE__ */ Y(L, {
385
385
  size: m.SM,
386
386
  "aria-hidden": !0,
387
387
  className: f("absolute end-1 top-1 h-6 w-6 rounded-lg p-1 opacity-0 transition-opacity group-hover:opacity-100 mobile:opacity-100", Q.hoverIcon)
388
388
  }),
389
- R && /* @__PURE__ */ Y(h, {
389
+ I && /* @__PURE__ */ Y(h, {
390
390
  icon: /* @__PURE__ */ Y(xe, {
391
391
  size: m.SM,
392
392
  "aria-hidden": !0
393
393
  }),
394
394
  size: k.Small,
395
395
  className: f("absolute end-1 top-1 h-6 w-6 rounded-lg", Q.retryIcon),
396
- "aria-label": g,
397
- "aria-describedby": N ? M : void 0,
396
+ "aria-label": u,
397
+ "aria-describedby": M ? j : void 0,
398
398
  onClick: (e) => {
399
- e.stopPropagation(), i(T);
399
+ e.stopPropagation(), i(w);
400
400
  }
401
401
  }),
402
- j && /* @__PURE__ */ Y("span", {
403
- id: M,
402
+ A && /* @__PURE__ */ Y("span", {
403
+ id: j,
404
404
  role: "status",
405
405
  "aria-live": "polite",
406
406
  className: "sr-only",
407
- children: N
407
+ children: M
408
408
  })
409
409
  ] });
410
410
  return /* @__PURE__ */ Y("div", {
411
- className: f("inline-flex", u),
412
- children: I ? /* @__PURE__ */ Y("div", {
411
+ className: f("inline-flex", S),
412
+ children: F ? /* @__PURE__ */ Y("div", {
413
413
  role: "button",
414
414
  tabIndex: 0,
415
- "aria-label": p,
416
- onClick: B,
417
- onKeyDown: V,
418
- style: w,
419
- className: f(H, "cursor-pointer focus-within:outline focus-within:outline-1 focus-within:outline-offset-1"),
420
- children: ee
415
+ "aria-label": c,
416
+ onClick: z,
417
+ onKeyDown: B,
418
+ style: C,
419
+ className: f(V, "cursor-pointer focus-within:outline focus-within:outline-1 focus-within:outline-offset-1"),
420
+ children: W
421
421
  }) : /* @__PURE__ */ Y("div", {
422
- className: H,
423
- title: N || void 0,
424
- role: j ? "group" : void 0,
425
- "aria-describedby": j ? M : void 0,
426
- tabIndex: j ? 0 : void 0,
427
- style: w,
428
- children: ee
422
+ className: V,
423
+ title: M || void 0,
424
+ role: A ? "group" : void 0,
425
+ "aria-describedby": A ? j : void 0,
426
+ tabIndex: A ? 0 : void 0,
427
+ style: C,
428
+ children: W
429
429
  })
430
430
  });
431
- }, qe = { tile: "_tile_1s4d7_1" }, Je = ({ count: e, onClick: t, ariaLabel: n, children: r, fontClassName: i = "dial-small-semi-text", className: a, colors: o }) => {
432
- let s = d({
433
- "--ci-more-tile-bg": o?.background,
434
- "--ci-more-tile-border": o?.border,
435
- "--ci-more-tile-color": o?.color,
436
- "--ci-more-tile-bg-hover": o?.backgroundHover,
437
- "--ci-more-tile-color-hover": o?.colorHover,
438
- "--ci-more-tile-border-hover": o?.borderHover,
439
- "--ci-more-tile-focus-outline": o?.focusOutline
431
+ }, qe = { tile: "_tile_1s4d7_1" }, Je = ({ count: e, onClick: t, labels: n, children: r, styles: i }) => {
432
+ let { ariaLabel: a } = n ?? {}, { typography: { fontClassName: o = "dial-small-semi-text" } = {}, className: s, colors: c } = i ?? {}, l = d({
433
+ "--ci-more-tile-bg": c?.background,
434
+ "--ci-more-tile-border": c?.border,
435
+ "--ci-more-tile-color": c?.color,
436
+ "--ci-more-tile-bg-hover": c?.backgroundHover,
437
+ "--ci-more-tile-color-hover": c?.colorHover,
438
+ "--ci-more-tile-border-hover": c?.borderHover,
439
+ "--ci-more-tile-focus-outline": c?.focusOutline
440
440
  });
441
441
  return /* @__PURE__ */ Y("button", {
442
442
  type: "button",
443
443
  onClick: t,
444
- "aria-label": n ?? `Show ${e} more attachments`,
445
- style: s,
446
- className: f("flex size-[84px] items-center justify-center rounded-xl border", i, qe.tile, a),
444
+ "aria-label": a ?? `Show ${e} more attachments`,
445
+ style: l,
446
+ className: f("flex size-[84px] items-center justify-center rounded-xl border", o, qe.tile, s),
447
447
  children: r ?? /* @__PURE__ */ Y("bdi", {
448
448
  dir: "ltr",
449
449
  children: `+${e}`
@@ -455,30 +455,30 @@ var Pe = /* @__PURE__ */ function(e) {
455
455
  headerLabel: "_headerLabel_7fktb_7",
456
456
  downloadAllButton: "_downloadAllButton_7fktb_8",
457
457
  imageTile: "_imageTile_7fktb_12"
458
- }, Xe = (e, t) => `${e} ${t}${e === 1 ? "" : "s"}`, Ze = ({ attachments: e, onAttachmentClick: n, onDownloadAll: r, onRetry: i, getSizeLabel: a, labels: o, typeLabels: s, styles: c, theme: u, className: p }) => {
459
- let { ariaLabel: g = "Attachments", clickLabel: _ = "Download attachment", retryLabel: v = "Retry upload", showLessLabel: y = "Show less", downloadAllLabel: b = "Download all", getHeaderLabel: x = (e) => Xe(e, "attachment") } = o ?? {}, { headerLabelClassName: S = "dial-tiny-semi-text", colors: C } = c ?? {}, w = d({
460
- "--ci-group-bg": C?.background,
461
- "--ci-group-border": C?.border,
462
- "--ci-group-text": C?.text
463
- }), [T, E] = q(!1), D = Me(() => Ue(e.length, T), [e.length, T]);
458
+ }, Xe = (e, t) => `${e} ${t}${e === 1 ? "" : "s"}`, Ze = ({ attachments: e, onAttachmentClick: n, onDownloadAll: r, onRetry: i, getSizeLabel: a, labels: o, styles: s, theme: c }) => {
459
+ let { ariaLabel: u = "Attachments", clickLabel: p = "Download attachment", retryLabel: g = "Retry upload", showLessLabel: _ = "Show less", downloadAllLabel: v = "Download all", getHeaderLabel: y = (e) => Xe(e, "attachment"), promptLabel: b, pastedLabel: x, imageLabel: S } = o ?? {}, { typography: { headerLabelClassName: C = "dial-tiny-semi-text" } = {}, colors: w, className: T } = s ?? {}, E = d({
460
+ "--ci-group-bg": w?.background,
461
+ "--ci-group-border": w?.border,
462
+ "--ci-group-text": w?.text
463
+ }), [D, O] = q(!1), k = Me(() => Ue(e.length, D), [e.length, D]);
464
464
  if (e.length === 0) return null;
465
- let O = e.some((e) => e.type === t.Image), k = e.some((e) => e.type !== t.Image), A = O && k, j = e.length >= 5, M = A ? _e : O ? ye : R, N = x(e.length), F = e.slice(0, D.visibleCount);
465
+ let A = e.some((e) => e.type === t.Image), j = e.some((e) => e.type !== t.Image), M = A && j, N = e.length >= 5, F = M ? _e : A ? ye : R, I = y(e.length), z = e.slice(0, k.visibleCount);
466
466
  return /* @__PURE__ */ X("div", {
467
467
  role: "group",
468
- "aria-label": g,
469
- style: w,
470
- className: f("rounded-2xl border p-3", j ? "w-full min-w-0 max-w-[492px]" : "max-w-[420px]", Ye.container, p),
468
+ "aria-label": u,
469
+ style: E,
470
+ className: f("rounded-2xl border p-3", N ? "w-full min-w-0 max-w-[492px]" : "max-w-[420px]", Ye.container, T),
471
471
  children: [/* @__PURE__ */ X("div", {
472
472
  className: "mb-3 flex min-h-6 items-center gap-2",
473
473
  children: [
474
- /* @__PURE__ */ Y(M, {
474
+ /* @__PURE__ */ Y(F, {
475
475
  size: m.SM,
476
476
  className: f("shrink-0", Ye.headerIcon),
477
477
  "aria-hidden": !0
478
478
  }),
479
479
  /* @__PURE__ */ Y("span", {
480
- className: f(S, Ye.headerLabel),
481
- children: N
480
+ className: f(C, Ye.headerLabel),
481
+ children: I
482
482
  }),
483
483
  e.length >= 2 && (r || n) && /* @__PURE__ */ Y(h, {
484
484
  icon: /* @__PURE__ */ Y(L, {
@@ -486,7 +486,7 @@ var Pe = /* @__PURE__ */ function(e) {
486
486
  "aria-hidden": !0
487
487
  }),
488
488
  className: f("ms-auto h-6 w-6 rounded-lg", Ye.downloadAllButton),
489
- "aria-label": b,
489
+ "aria-label": v,
490
490
  onClick: () => {
491
491
  let t = e.filter((e) => e.status === l.Idle);
492
492
  r ? r(t) : t.forEach((e) => n?.(e));
@@ -495,49 +495,55 @@ var Pe = /* @__PURE__ */ function(e) {
495
495
  ]
496
496
  }), /* @__PURE__ */ X("div", {
497
497
  role: "list",
498
- "aria-label": N,
499
- className: f("gap-3", j ? "grid grid-cols-[repeat(5,84px)] overflow-x-auto" : "flex flex-wrap"),
498
+ "aria-label": I,
499
+ className: f("gap-3", N ? "grid grid-cols-[repeat(5,84px)] overflow-x-auto" : "flex flex-wrap"),
500
500
  children: [
501
- F.map((e) => /* @__PURE__ */ Y("div", {
501
+ z.map((e) => /* @__PURE__ */ Y("div", {
502
502
  role: "listitem",
503
503
  children: e.type === t.Image ? /* @__PURE__ */ Y(We, {
504
504
  attachment: e,
505
505
  onClick: n ? () => n(e) : void 0,
506
506
  onRetry: i,
507
507
  labels: {
508
- clickLabel: _,
509
- retryLabel: v
508
+ clickLabel: p,
509
+ retryLabel: g,
510
+ promptLabel: b,
511
+ pastedLabel: x,
512
+ imageLabel: S
513
+ },
514
+ styles: {
515
+ roundedClassName: "rounded-xl",
516
+ className: f("size-[84px]", Ye.imageTile)
510
517
  },
511
- typeLabels: s,
512
- styles: { roundedClassName: "rounded-xl" },
513
- showHoverDownloadIcon: !0,
514
- className: f("size-[84px]", Ye.imageTile)
518
+ showHoverDownloadIcon: !0
515
519
  }) : /* @__PURE__ */ Y(Ke, {
516
520
  attachment: e,
517
521
  onClick: n,
518
522
  onRetry: i,
519
523
  labels: {
520
- clickLabel: _,
521
- retryLabel: v,
522
- sizeLabel: a?.(e)
524
+ clickLabel: p,
525
+ retryLabel: g,
526
+ sizeLabel: a?.(e),
527
+ promptLabel: b,
528
+ pastedLabel: x,
529
+ imageLabel: S
523
530
  },
524
- typeLabels: s,
525
- theme: u
531
+ theme: c
526
532
  })
527
533
  }, e.id)),
528
- D.layout === Ie.Collapsed && /* @__PURE__ */ Y("div", {
534
+ k.layout === Ie.Collapsed && /* @__PURE__ */ Y("div", {
529
535
  role: "listitem",
530
536
  children: /* @__PURE__ */ Y(Je, {
531
- count: D.hiddenCount,
532
- onClick: () => E(!0)
537
+ count: k.hiddenCount,
538
+ onClick: () => O(!0)
533
539
  })
534
540
  }),
535
- j && T && /* @__PURE__ */ Y("div", {
541
+ N && D && /* @__PURE__ */ Y("div", {
536
542
  role: "listitem",
537
543
  children: /* @__PURE__ */ Y(Je, {
538
544
  count: 0,
539
- onClick: () => E(!1),
540
- ariaLabel: y,
545
+ onClick: () => O(!1),
546
+ labels: { ariaLabel: _ },
541
547
  children: /* @__PURE__ */ Y(P, {
542
548
  size: m.MD,
543
549
  "aria-hidden": !0
@@ -551,18 +557,21 @@ var Pe = /* @__PURE__ */ function(e) {
551
557
  tabContainer: "_tabContainer_rzv03_1",
552
558
  tabActive: "_tabActive_rzv03_13"
553
559
  };
554
- Oe(({ tabs: e, activeTabId: t, onTabChange: n, tabClassName: r = "dial-tiny-semi-text" }) => /* @__PURE__ */ Y("div", {
555
- className: "flex flex-nowrap gap-1",
556
- children: e.map((e) => {
557
- let i = t === e.id;
558
- return /* @__PURE__ */ Y(D, {
559
- label: e.label,
560
- selected: i,
561
- onClick: () => n(e.id),
562
- className: f("box-border h-auto shrink-0 justify-center rounded-full p-2 text-center", r, Qe.tabContainer, i && Qe.tabActive)
563
- }, e.id);
564
- })
565
- }));
560
+ Oe(({ tabs: e, activeTabId: t, onTabChange: n, styles: r }) => {
561
+ let { tabClassName: i = "dial-tiny-semi-text" } = r?.typography ?? {};
562
+ return /* @__PURE__ */ Y("div", {
563
+ className: "flex flex-nowrap gap-1",
564
+ children: e.map((e) => {
565
+ let r = t === e.id;
566
+ return /* @__PURE__ */ Y(D, {
567
+ label: e.label,
568
+ selected: r,
569
+ onClick: () => n(e.id),
570
+ className: f("box-border h-auto shrink-0 justify-center rounded-full p-2 text-center", i, Qe.tabContainer, r && Qe.tabActive)
571
+ }, e.id);
572
+ })
573
+ });
574
+ });
566
575
  var $e = (e) => /* @__PURE__ */ Y(b, { ...e }), et = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, isOpen: o }) => {
567
576
  let [s, c] = q(t), [l, u] = q(n), [d, f] = q(r), p = Ne(o);
568
577
  Ae(() => {
@@ -805,7 +814,7 @@ var rt = 2e3, it = ({ role: e = c.User, onEdit: t, onEditHover: n, onDelete: r,
805
814
  src: h,
806
815
  size: 28,
807
816
  initialsName: g || L,
808
- tooltip: g ?? L
817
+ labels: { tooltip: g ?? L }
809
818
  }), /* @__PURE__ */ X("div", {
810
819
  className: "flex w-full min-w-0 max-w-full flex-col items-start gap-5",
811
820
  children: [/* @__PURE__ */ X("div", {
@@ -860,7 +869,7 @@ var rt = 2e3, it = ({ role: e = c.User, onEdit: t, onEditHover: n, onDelete: r,
860
869
  })]
861
870
  })]
862
871
  });
863
- }, ot = ({ titleText: e = "Model switched.", bodyText: t }) => /* @__PURE__ */ Y("div", {
872
+ }, ot = ({ labels: { titleText: e = "Model switched.", bodyText: t } }) => /* @__PURE__ */ Y("div", {
864
873
  role: "status",
865
874
  "aria-live": "polite",
866
875
  children: /* @__PURE__ */ Y(v, {
@@ -881,7 +890,7 @@ var rt = 2e3, it = ({ role: e = c.User, onEdit: t, onEditHover: n, onDelete: r,
881
890
  "--cm-bubble-text": y?.text,
882
891
  "--cm-bubble-collapsed-height": F ? `${I}px` : void 0,
883
892
  "--cm-bubble-expanded-height": F ? `${L}px` : void 0
884
- }), V = t === st.Top ? "rounded-ee-[6px] rounded-se-[16px]" : "rounded-se-[6px] rounded-ee-[16px]", H = f($.text, b?.fontClassName), U = T ?? C, W = E ?? w, ee = R ? C : w, te = R ? U : W, G = R ? N : P, K = je();
893
+ }), V = t === st.Top ? "rounded-ee-[6px] rounded-se-[16px]" : "rounded-se-[6px] rounded-ee-[16px]", H = f($.text, b?.fontClassName), U = T ?? C, W = E ?? w, ee = R ? C : w, G = R ? U : W, te = R ? N : P, K = je();
885
894
  return /* @__PURE__ */ Y("div", {
886
895
  role: "group",
887
896
  "aria-label": A,
@@ -901,7 +910,7 @@ var rt = 2e3, it = ({ role: e = c.User, onEdit: t, onEditHover: n, onDelete: r,
901
910
  },
902
911
  getSizeLabel: g,
903
912
  theme: v,
904
- className: "max-w-[640px]"
913
+ styles: { className: "max-w-[640px]" }
905
914
  }),
906
915
  e && /* @__PURE__ */ Y("div", {
907
916
  className: f($.userBubble, "flex w-fit items-center justify-end rounded-es-2xl rounded-ss-2xl border px-6 py-4", V, S),
@@ -917,11 +926,11 @@ var rt = 2e3, it = ({ role: e = c.User, onEdit: t, onEditHover: n, onDelete: r,
917
926
  })
918
927
  }), F && /* @__PURE__ */ Y(_, {
919
928
  label: /* @__PURE__ */ Y(J, { children: ee }),
920
- iconBefore: /* @__PURE__ */ Y(G, {
929
+ iconBefore: /* @__PURE__ */ Y(te, {
921
930
  size: m.SM,
922
931
  "aria-hidden": "true"
923
932
  }),
924
- "aria-label": te,
933
+ "aria-label": G,
925
934
  "aria-expanded": !R,
926
935
  "aria-controls": K,
927
936
  className: "mt-3",
@@ -938,17 +947,17 @@ var rt = 2e3, it = ({ role: e = c.User, onEdit: t, onEditHover: n, onDelete: r,
938
947
  ]
939
948
  })
940
949
  });
941
- }, ut = ({ role: e, onAttachmentClick: t, markdownComponents: n, ...r }) => e === c.Status ? /* @__PURE__ */ Y(ot, {
950
+ }, ut = ({ role: e, onAttachmentClick: t, markdownComponents: n, ...r }) => e === c.Status ? /* @__PURE__ */ Y(ot, { labels: {
942
951
  titleText: r.labels?.statusTitleText,
943
952
  bodyText: r.labels?.statusBodyText ?? ""
944
- }) : e === c.User ? /* @__PURE__ */ Y(lt, {
953
+ } }) : e === c.User ? /* @__PURE__ */ Y(lt, {
945
954
  ...r,
946
955
  onAttachmentClick: t
947
956
  }) : /* @__PURE__ */ Y(at, {
948
957
  ...r,
949
958
  markdownComponents: n,
950
959
  onAttachmentClick: t
951
- }), dt = { button: "_button_15boc_1" }, ft = ({ label: e, onClick: t, styles: n }) => {
960
+ }), dt = { button: "_button_15boc_1" }, ft = ({ labels: { label: e }, onClick: t, styles: n }) => {
952
961
  let { colors: r, typography: i, className: a } = n ?? {};
953
962
  return /* @__PURE__ */ Y("button", {
954
963
  type: "button",
@@ -25,10 +25,15 @@ export interface MessageSourceStyles {
25
25
  /** Extra class name(s) merged onto the button element. */
26
26
  className?: string;
27
27
  }
28
- /** Props accepted by the `MessageSource` component. */
29
- export interface MessageSourceProps {
28
+ /** User-visible strings for the `MessageSource` component. */
29
+ export interface MessageSourceLabels {
30
30
  /** Text label displayed inside the button. */
31
31
  label: string;
32
+ }
33
+ /** Props accepted by the `MessageSource` component. */
34
+ export interface MessageSourceProps {
35
+ /** User-visible strings. */
36
+ labels: MessageSourceLabels;
32
37
  /** Called when the user clicks the source button. */
33
38
  onClick?: () => void;
34
39
  /** Color and typography overrides applied as CSS custom properties. */
@@ -1 +1 @@
1
- {"version":3,"file":"message-source.d.ts","sourceRoot":"","sources":["../../src/models/message-source.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,MAAM,WAAW,mBAAmB;IAClC,oDAAoD;IACpD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gDAAgD;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wBAAwB;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,8DAA8D;AAC9D,MAAM,WAAW,uBAAuB;IACtC,wDAAwD;IACxD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,0FAA0F;AAC1F,MAAM,WAAW,mBAAmB;IAClC,wDAAwD;IACxD,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,8DAA8D;IAC9D,UAAU,CAAC,EAAE,uBAAuB,CAAC;IACrC,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,uDAAuD;AACvD,MAAM,WAAW,kBAAkB;IACjC,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,uEAAuE;IACvE,MAAM,CAAC,EAAE,mBAAmB,CAAC;CAC9B"}
1
+ {"version":3,"file":"message-source.d.ts","sourceRoot":"","sources":["../../src/models/message-source.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,MAAM,WAAW,mBAAmB;IAClC,oDAAoD;IACpD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gDAAgD;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wBAAwB;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,8DAA8D;AAC9D,MAAM,WAAW,uBAAuB;IACtC,wDAAwD;IACxD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,0FAA0F;AAC1F,MAAM,WAAW,mBAAmB;IAClC,wDAAwD;IACxD,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,8DAA8D;IAC9D,UAAU,CAAC,EAAE,uBAAuB,CAAC;IACrC,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,8DAA8D;AAC9D,MAAM,WAAW,mBAAmB;IAClC,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;CACf;AAED,uDAAuD;AACvD,MAAM,WAAW,kBAAkB;IACjC,4BAA4B;IAC5B,MAAM,EAAE,mBAAmB,CAAC;IAC5B,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,uEAAuE;IACvE,MAAM,CAAC,EAAE,mBAAmB,CAAC;CAC9B"}
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.0.0-dev.503",
4
+ "version": "1.0.0-dev.509",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -20,8 +20,8 @@
20
20
  "react": "^19.0.0",
21
21
  "@tabler/icons-react": "^3.0.0",
22
22
  "@epam/ai-dial-ui-kit": "0.12.0-dev.28",
23
- "@epam/ai-dial-chat-shared": "1.0.0-dev.503",
24
- "@epam/ai-dial-conversation-input": "1.0.0-dev.503",
23
+ "@epam/ai-dial-chat-shared": "1.0.0-dev.509",
24
+ "@epam/ai-dial-conversation-input": "1.0.0-dev.509",
25
25
  "react-markdown": "^10.1.0"
26
26
  },
27
27
  "repository": {