@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.
- package/components/MessageBubble/AssistantMessageBubble.d.ts.map +1 -1
- package/components/MessageBubble/MessageBubble.d.ts.map +1 -1
- package/components/MessageBubble/StatusMessageBubble.d.ts +7 -2
- package/components/MessageBubble/StatusMessageBubble.d.ts.map +1 -1
- package/index.d.ts +2 -2
- package/index.d.ts.map +1 -1
- package/index.js +215 -206
- package/models/message-source.d.ts +7 -2
- package/models/message-source.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -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,
|
|
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,
|
|
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
|
-
/**
|
|
3
|
-
export interface
|
|
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,
|
|
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,
|
|
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
|
|
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
|
|
79
|
-
case "text/jsx": return
|
|
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,
|
|
136
|
-
let { removeLabel:
|
|
137
|
-
"--ci-card-border":
|
|
138
|
-
"--ci-card-bg":
|
|
139
|
-
"--ci-card-name":
|
|
140
|
-
"--ci-card-meta":
|
|
141
|
-
"--ci-card-border-error":
|
|
142
|
-
"--ci-card-bg-selected":
|
|
143
|
-
"--ci-card-border-selected":
|
|
144
|
-
"--ci-card-bg-hover":
|
|
145
|
-
"--ci-loading-overlay-bg":
|
|
146
|
-
"--ci-card-action-color":
|
|
147
|
-
"--ci-card-remove-bg-hover":
|
|
148
|
-
"--ci-card-focus-outline":
|
|
149
|
-
"--ci-card-remove-bg":
|
|
150
|
-
"--ci-card-remove-color":
|
|
151
|
-
"--ci-card-hover-icon-bg":
|
|
152
|
-
"--ci-card-hover-icon-color":
|
|
153
|
-
}), { isLoading:
|
|
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
|
-
|
|
158
|
-
]),
|
|
159
|
-
enabled:
|
|
160
|
-
src:
|
|
161
|
-
}),
|
|
162
|
-
|
|
163
|
-
},
|
|
164
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
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 (
|
|
167
|
-
style:
|
|
168
|
-
className: f("group flex w-full min-w-[280px] max-w-[300px] flex-col gap-2 border p-3",
|
|
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(
|
|
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",
|
|
186
|
-
"aria-label":
|
|
185
|
+
className: f("h-6 w-6 shrink-0 rounded", K),
|
|
186
|
+
"aria-label": b,
|
|
187
187
|
onClick: (e) => {
|
|
188
|
-
e.stopPropagation(), c(
|
|
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
|
|
200
|
-
|
|
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: [
|
|
202
|
+
children: [ae !== Pe.Loaded && /* @__PURE__ */ Y(C, {
|
|
203
203
|
variant: w.Rectangular,
|
|
204
204
|
width: "100%",
|
|
205
205
|
height: "100%",
|
|
206
|
-
active:
|
|
206
|
+
active: ae === Pe.Loading,
|
|
207
207
|
overlay: /* @__PURE__ */ Y(ye, {
|
|
208
208
|
size: m.LG,
|
|
209
|
-
className:
|
|
209
|
+
className: O?.placeholderIconClassName ?? "text-secondary",
|
|
210
210
|
"aria-hidden": !0
|
|
211
211
|
}),
|
|
212
|
-
className: f("absolute inset-0",
|
|
212
|
+
className: f("absolute inset-0", A)
|
|
213
213
|
}), /* @__PURE__ */ Y("img", {
|
|
214
|
-
ref:
|
|
215
|
-
src:
|
|
216
|
-
alt:
|
|
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",
|
|
219
|
+
className: f("h-full w-full object-cover transition-opacity duration-200", ae === Pe.Loaded ? "opacity-100" : "opacity-0", A)
|
|
220
220
|
})]
|
|
221
|
-
}) :
|
|
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(
|
|
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(
|
|
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:
|
|
236
|
-
className: f(
|
|
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:
|
|
238
|
+
text: R,
|
|
239
239
|
query: r,
|
|
240
240
|
maxLines: 3
|
|
241
|
-
}) :
|
|
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:
|
|
247
|
-
className: f(
|
|
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:
|
|
249
|
+
text: R,
|
|
250
250
|
query: r,
|
|
251
251
|
maxLines: 3
|
|
252
|
-
}) :
|
|
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(
|
|
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(
|
|
262
|
+
className: f(O?.metaClassName ?? "dial-tiny-text", "min-w-0 truncate", Z.meta),
|
|
263
263
|
children: G
|
|
264
264
|
})]
|
|
265
265
|
})] }),
|
|
266
|
-
|
|
267
|
-
className: f("absolute inset-0 flex items-center justify-center",
|
|
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:
|
|
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:
|
|
278
|
+
children: V ? T : ""
|
|
279
279
|
}),
|
|
280
|
-
!
|
|
281
|
-
className: f("absolute end-1 top-1 flex gap-1 transition-opacity",
|
|
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
|
-
|
|
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",
|
|
290
|
-
"aria-label":
|
|
289
|
+
className: f("h-6 w-6 rounded", K),
|
|
290
|
+
"aria-label": y,
|
|
291
291
|
onClick: (e) => {
|
|
292
|
-
e.stopPropagation(), o(
|
|
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",
|
|
302
|
-
"aria-label":
|
|
301
|
+
className: f("h-6 w-6 rounded", K),
|
|
302
|
+
"aria-label": v,
|
|
303
303
|
onClick: (e) => {
|
|
304
|
-
e.stopPropagation(), a?.(
|
|
304
|
+
e.stopPropagation(), a?.(M);
|
|
305
305
|
}
|
|
306
306
|
}),
|
|
307
|
-
|
|
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
|
|
316
|
-
style:
|
|
317
|
-
className:
|
|
318
|
-
onClick:
|
|
319
|
-
onKeyDown:
|
|
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":
|
|
323
|
-
children:
|
|
322
|
+
"aria-label": ne ? b : I ? x : void 0,
|
|
323
|
+
children: le
|
|
324
324
|
}) : /* @__PURE__ */ Y("div", {
|
|
325
|
-
style:
|
|
326
|
-
className:
|
|
327
|
-
children:
|
|
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,
|
|
344
|
-
let { clickLabel:
|
|
345
|
-
"--ci-tile-bg":
|
|
346
|
-
"--ci-tile-border":
|
|
347
|
-
"--ci-tile-border-hover":
|
|
348
|
-
"--ci-tile-focus-outline":
|
|
349
|
-
"--ci-tile-bg-error":
|
|
350
|
-
"--ci-tile-border-error":
|
|
351
|
-
"--ci-tile-error-text":
|
|
352
|
-
"--ci-tile-name-text":
|
|
353
|
-
"--ci-tile-type-text":
|
|
354
|
-
"--ci-tile-hover-icon-bg":
|
|
355
|
-
"--ci-tile-hover-icon-color":
|
|
356
|
-
"--ci-tile-track-bg":
|
|
357
|
-
"--ci-tile-fill-bg":
|
|
358
|
-
}), { id:
|
|
359
|
-
|
|
360
|
-
},
|
|
361
|
-
(e.key === "Enter" || e.key === " ") &&
|
|
362
|
-
},
|
|
363
|
-
title:
|
|
364
|
-
className: f(
|
|
365
|
-
children:
|
|
366
|
-
}),
|
|
367
|
-
className: f("flex items-center gap-1 overflow-hidden",
|
|
368
|
-
children: [/* @__PURE__ */ Y(
|
|
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(
|
|
374
|
-
children:
|
|
373
|
+
className: f(b, "truncate", Q.typeText),
|
|
374
|
+
children: p ? `${P} · ${p}` : P
|
|
375
375
|
})]
|
|
376
|
-
}),
|
|
377
|
-
|
|
378
|
-
|
|
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":
|
|
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
|
-
|
|
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
|
-
|
|
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":
|
|
397
|
-
"aria-describedby":
|
|
396
|
+
"aria-label": u,
|
|
397
|
+
"aria-describedby": M ? j : void 0,
|
|
398
398
|
onClick: (e) => {
|
|
399
|
-
e.stopPropagation(), i(
|
|
399
|
+
e.stopPropagation(), i(w);
|
|
400
400
|
}
|
|
401
401
|
}),
|
|
402
|
-
|
|
403
|
-
id:
|
|
402
|
+
A && /* @__PURE__ */ Y("span", {
|
|
403
|
+
id: j,
|
|
404
404
|
role: "status",
|
|
405
405
|
"aria-live": "polite",
|
|
406
406
|
className: "sr-only",
|
|
407
|
-
children:
|
|
407
|
+
children: M
|
|
408
408
|
})
|
|
409
409
|
] });
|
|
410
410
|
return /* @__PURE__ */ Y("div", {
|
|
411
|
-
className: f("inline-flex",
|
|
412
|
-
children:
|
|
411
|
+
className: f("inline-flex", S),
|
|
412
|
+
children: F ? /* @__PURE__ */ Y("div", {
|
|
413
413
|
role: "button",
|
|
414
414
|
tabIndex: 0,
|
|
415
|
-
"aria-label":
|
|
416
|
-
onClick:
|
|
417
|
-
onKeyDown:
|
|
418
|
-
style:
|
|
419
|
-
className: f(
|
|
420
|
-
children:
|
|
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:
|
|
423
|
-
title:
|
|
424
|
-
role:
|
|
425
|
-
"aria-describedby":
|
|
426
|
-
tabIndex:
|
|
427
|
-
style:
|
|
428
|
-
children:
|
|
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,
|
|
432
|
-
let s = d({
|
|
433
|
-
"--ci-more-tile-bg":
|
|
434
|
-
"--ci-more-tile-border":
|
|
435
|
-
"--ci-more-tile-color":
|
|
436
|
-
"--ci-more-tile-bg-hover":
|
|
437
|
-
"--ci-more-tile-color-hover":
|
|
438
|
-
"--ci-more-tile-border-hover":
|
|
439
|
-
"--ci-more-tile-focus-outline":
|
|
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":
|
|
445
|
-
style:
|
|
446
|
-
className: f("flex size-[84px] items-center justify-center rounded-xl border",
|
|
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,
|
|
459
|
-
let { ariaLabel:
|
|
460
|
-
"--ci-group-bg":
|
|
461
|
-
"--ci-group-border":
|
|
462
|
-
"--ci-group-text":
|
|
463
|
-
}), [
|
|
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
|
|
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":
|
|
469
|
-
style:
|
|
470
|
-
className: f("rounded-2xl border p-3",
|
|
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(
|
|
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(
|
|
481
|
-
children:
|
|
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":
|
|
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":
|
|
499
|
-
className: f("gap-3",
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
525
|
-
theme: u
|
|
531
|
+
theme: c
|
|
526
532
|
})
|
|
527
533
|
}, e.id)),
|
|
528
|
-
|
|
534
|
+
k.layout === Ie.Collapsed && /* @__PURE__ */ Y("div", {
|
|
529
535
|
role: "listitem",
|
|
530
536
|
children: /* @__PURE__ */ Y(Je, {
|
|
531
|
-
count:
|
|
532
|
-
onClick: () =>
|
|
537
|
+
count: k.hiddenCount,
|
|
538
|
+
onClick: () => O(!0)
|
|
533
539
|
})
|
|
534
540
|
}),
|
|
535
|
-
|
|
541
|
+
N && D && /* @__PURE__ */ Y("div", {
|
|
536
542
|
role: "listitem",
|
|
537
543
|
children: /* @__PURE__ */ Y(Je, {
|
|
538
544
|
count: 0,
|
|
539
|
-
onClick: () =>
|
|
540
|
-
ariaLabel:
|
|
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,
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
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,
|
|
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(
|
|
929
|
+
iconBefore: /* @__PURE__ */ Y(te, {
|
|
921
930
|
size: m.SM,
|
|
922
931
|
"aria-hidden": "true"
|
|
923
932
|
}),
|
|
924
|
-
"aria-label":
|
|
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
|
-
/**
|
|
29
|
-
export interface
|
|
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,
|
|
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.
|
|
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.
|
|
24
|
-
"@epam/ai-dial-conversation-input": "1.0.0-dev.
|
|
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": {
|