@epam/ai-dial-conversation-messages 1.0.0-dev.486 → 1.0.0-dev.489
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/StatusMessageBubble.d.ts +1 -4
- package/components/MessageBubble/StatusMessageBubble.d.ts.map +1 -1
- package/index.js +181 -160
- package/models/message-bubble.d.ts +2 -2
- package/models/message-bubble.d.ts.map +1 -1
- package/package.json +3 -3
- package/types/bubble-position.d.ts +2 -2
- package/types/bubble-position.d.ts.map +1 -1
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
/** Props for the model-change status message banner. */
|
|
3
3
|
export interface StatusMessageBubbleProps {
|
|
4
|
-
/**
|
|
5
|
-
* Bold prefix text displayed before the description.
|
|
6
|
-
* @default "Model switched."
|
|
7
|
-
*/
|
|
4
|
+
/** Bold prefix text displayed before the description. Defaults to `'Model switched.'`. */
|
|
8
5
|
titleText?: string;
|
|
9
6
|
/** Full description text, e.g. "The model has been switched from GPT to Imagen." */
|
|
10
7
|
bodyText: string;
|
|
@@ -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
|
|
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"}
|
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
|
|
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 ee, IconFileTypeJpg as te, IconFileTypeJs as ne, IconFileTypeJsx as W, IconFileTypePdf as G, IconFileTypePhp as re, IconFileTypePng as ie, IconFileTypePpt as ae, IconFileTypeRs as oe, IconFileTypeSql as se, IconFileTypeSvg as ce, IconFileTypeTs as le, IconFileTypeTsx as ue, IconFileTypeTxt as de, IconFileTypeVue as fe, IconFileTypeXls as pe, IconFileTypeXml as me, IconFileTypeZip as he, IconMarkdown as ge, IconMusic as _e, IconPaperclip as ve, IconPencilMinus as ye, IconPhoto as be, IconRefresh as xe, IconReload as Se, IconTerminal2 as Ce, IconThumbDown as we, IconThumbUp as Te, IconTrashX as Ee, IconVideo as De, IconX as Oe } from "@tabler/icons-react";
|
|
4
4
|
import "react-dom";
|
|
5
5
|
import { memo as ke, useCallback as Ae, useEffect as je, useId as Me, useMemo as Ne, useRef as Pe, useState as K } from "react";
|
|
6
6
|
import { Fragment as q, jsx as J, jsxs as Y } from "react/jsx-runtime";
|
|
@@ -43,7 +43,7 @@ var Fe = /* @__PURE__ */ function(e) {
|
|
|
43
43
|
if (!e) return R;
|
|
44
44
|
if (e.startsWith("image/")) switch (e) {
|
|
45
45
|
case "image/jpeg":
|
|
46
|
-
case "image/jpg": return
|
|
46
|
+
case "image/jpg": return te;
|
|
47
47
|
case "image/png": return ie;
|
|
48
48
|
case "image/svg+xml": return ce;
|
|
49
49
|
case "image/bmp": return z;
|
|
@@ -54,8 +54,8 @@ var Fe = /* @__PURE__ */ function(e) {
|
|
|
54
54
|
switch (e) {
|
|
55
55
|
case "application/pdf": return G;
|
|
56
56
|
case "application/msword":
|
|
57
|
-
case "application/vnd.ms-word": return
|
|
58
|
-
case "application/vnd.openxmlformats-officedocument.wordprocessingml.document": return
|
|
57
|
+
case "application/vnd.ms-word": return H;
|
|
58
|
+
case "application/vnd.openxmlformats-officedocument.wordprocessingml.document": return U;
|
|
59
59
|
case "application/vnd.ms-powerpoint": return ae;
|
|
60
60
|
case "application/vnd.openxmlformats-officedocument.presentationml.presentation": return ae;
|
|
61
61
|
case "application/vnd.ms-excel": return pe;
|
|
@@ -66,21 +66,21 @@ var Fe = /* @__PURE__ */ function(e) {
|
|
|
66
66
|
case "application/x-7z-compressed":
|
|
67
67
|
case "application/gzip":
|
|
68
68
|
case "application/x-tar": return he;
|
|
69
|
-
case "text/csv": return
|
|
69
|
+
case "text/csv": return V;
|
|
70
70
|
case "text/plain": return de;
|
|
71
71
|
case "text/html":
|
|
72
|
-
case "application/xhtml+xml": return
|
|
72
|
+
case "application/xhtml+xml": return ee;
|
|
73
73
|
case "text/xml":
|
|
74
74
|
case "application/xml": return me;
|
|
75
75
|
case "application/sql":
|
|
76
76
|
case "text/x-sql": return se;
|
|
77
77
|
case "text/javascript":
|
|
78
|
-
case "application/javascript": return
|
|
78
|
+
case "application/javascript": return ne;
|
|
79
79
|
case "text/jsx": return W;
|
|
80
80
|
case "application/typescript":
|
|
81
81
|
case "text/typescript": return le;
|
|
82
82
|
case "text/tsx": return ue;
|
|
83
|
-
case "text/css": return
|
|
83
|
+
case "text/css": return B;
|
|
84
84
|
case "text/x-php":
|
|
85
85
|
case "application/x-php": return re;
|
|
86
86
|
case "text/x-rustsrc":
|
|
@@ -96,29 +96,29 @@ var Fe = /* @__PURE__ */ function(e) {
|
|
|
96
96
|
if (n) return n;
|
|
97
97
|
let r = t.split("/")[1];
|
|
98
98
|
if (r && !r.startsWith("vnd.") && !r.includes("+")) return r;
|
|
99
|
-
}, He = (e) => {
|
|
100
|
-
let { type:
|
|
101
|
-
if (
|
|
102
|
-
if (
|
|
103
|
-
if (
|
|
104
|
-
if (
|
|
105
|
-
let e = Ve(
|
|
99
|
+
}, He = (e, n) => {
|
|
100
|
+
let { type: r, name: i, contentType: a } = e;
|
|
101
|
+
if (r === t.Prompt) return n.promptLabel ?? "Prompt";
|
|
102
|
+
if (r === t.Pasted) return n.pastedLabel ?? "Pasted";
|
|
103
|
+
if (r === t.Image) return n.imageLabel ?? "Image";
|
|
104
|
+
if (a) {
|
|
105
|
+
let e = Ve(a);
|
|
106
106
|
if (e) return `.${e}`;
|
|
107
107
|
}
|
|
108
|
-
let
|
|
109
|
-
return
|
|
110
|
-
}, Ue = (e, n, r) => {
|
|
111
|
-
let { type:
|
|
108
|
+
let o = i.lastIndexOf(".");
|
|
109
|
+
return o > 0 && o < i.length - 1 ? `.${i.slice(o + 1).toLowerCase()}` : i;
|
|
110
|
+
}, Ue = (e, n, r, i = {}) => {
|
|
111
|
+
let { type: a, status: o, previewUrl: s, url: c } = e, u = o === l.Loading, d = o === l.Error, p = a === t.Image && !!(s ?? c) && !d, m = a === t.Audio && !d, h = f(X.card, d && X.cardError, n && X.cardSelected, !d && !n && a === t.Prompt && X.cardPrompt, !d && !n && a === t.Pasted && X.cardPasted);
|
|
112
112
|
return {
|
|
113
|
-
isLoading:
|
|
114
|
-
isError:
|
|
115
|
-
isImage:
|
|
116
|
-
isAudio:
|
|
117
|
-
areActionsVisible:
|
|
113
|
+
isLoading: u,
|
|
114
|
+
isError: d,
|
|
115
|
+
isImage: p,
|
|
116
|
+
isAudio: m,
|
|
117
|
+
areActionsVisible: d || r,
|
|
118
118
|
BottomIcon: Be(e),
|
|
119
|
-
typeLabel: He(e),
|
|
120
|
-
cardColorClass:
|
|
121
|
-
removeBtnClass:
|
|
119
|
+
typeLabel: He(e, i),
|
|
120
|
+
cardColorClass: h,
|
|
121
|
+
removeBtnClass: p ? X.removeBtnImage : X.actionBtn
|
|
122
122
|
};
|
|
123
123
|
}, We = (e, t) => e <= 0 ? {
|
|
124
124
|
layout: Le.None,
|
|
@@ -132,32 +132,33 @@ var Fe = /* @__PURE__ */ function(e) {
|
|
|
132
132
|
layout: Le.Collapsed,
|
|
133
133
|
visibleCount: 4,
|
|
134
134
|
hiddenCount: e - 4
|
|
135
|
-
}, Ge = ({ 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
|
-
}), { isLoading:
|
|
135
|
+
}, Ge = ({ 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 = Ne(() => I ? P : Re(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
|
+
}), { isLoading: V, isError: H, isImage: U, isAudio: ee, areActionsVisible: te, BottomIcon: ne, typeLabel: W, cardColorClass: G, removeBtnClass: re } = Ne(() => Ue(n, l ?? !1, u ?? !1, g), [
|
|
142
142
|
n,
|
|
143
143
|
l,
|
|
144
|
-
u
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
144
|
+
u,
|
|
145
|
+
g
|
|
146
|
+
]), ie = c !== void 0 && !R && !V && !H, ae = R || ie, { imageRef: oe, imageLoadStatus: se } = Ie({
|
|
147
|
+
enabled: U,
|
|
148
|
+
src: F
|
|
149
|
+
}), ce = () => {
|
|
150
|
+
R && s ? s(N) : ie && c && c(N);
|
|
151
|
+
}, le = (e) => {
|
|
152
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), ce());
|
|
152
153
|
};
|
|
153
154
|
if (ee) return /* @__PURE__ */ Y("div", {
|
|
154
|
-
style:
|
|
155
|
-
className: f("group flex w-full min-w-[280px] max-w-[300px] flex-col gap-2 border p-3",
|
|
155
|
+
style: B,
|
|
156
|
+
className: f("group flex w-full min-w-[280px] max-w-[300px] flex-col gap-2 border p-3", M, G, y),
|
|
156
157
|
children: [/* @__PURE__ */ Y("div", {
|
|
157
158
|
className: "flex items-center justify-between gap-2",
|
|
158
159
|
children: [/* @__PURE__ */ J("span", {
|
|
159
160
|
title: n.name,
|
|
160
|
-
className: f(
|
|
161
|
+
className: f(j?.fontClassName ?? "dial-tiny-text", "min-w-0 truncate", X.name),
|
|
161
162
|
children: r ? /* @__PURE__ */ J(i, {
|
|
162
163
|
text: n.name,
|
|
163
164
|
query: r,
|
|
@@ -169,73 +170,74 @@ var Fe = /* @__PURE__ */ function(e) {
|
|
|
169
170
|
"aria-hidden": !0
|
|
170
171
|
}),
|
|
171
172
|
size: k.Small,
|
|
172
|
-
className: f("h-6 w-6 shrink-0 rounded",
|
|
173
|
-
"aria-label":
|
|
173
|
+
className: f("h-6 w-6 shrink-0 rounded", re),
|
|
174
|
+
"aria-label": S,
|
|
174
175
|
onClick: (e) => {
|
|
175
|
-
e.stopPropagation(), c(
|
|
176
|
+
e.stopPropagation(), c(N);
|
|
176
177
|
}
|
|
177
178
|
})]
|
|
178
179
|
}), n.playUrl && /* @__PURE__ */ J("audio", {
|
|
179
180
|
controls: !0,
|
|
180
181
|
src: n.playUrl,
|
|
182
|
+
"aria-label": n.name,
|
|
181
183
|
className: "w-full",
|
|
182
184
|
preload: "metadata"
|
|
183
185
|
})]
|
|
184
186
|
});
|
|
185
|
-
let
|
|
186
|
-
|
|
187
|
+
let ue = 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, G, !U && "flex-col gap-3 p-3", ae && "cursor-pointer", y), de = /* @__PURE__ */ Y(q, { children: [
|
|
188
|
+
U ? /* @__PURE__ */ Y("div", {
|
|
187
189
|
className: "relative h-full w-full overflow-hidden",
|
|
188
|
-
children: [
|
|
190
|
+
children: [se !== Fe.Loaded && /* @__PURE__ */ J(C, {
|
|
189
191
|
variant: w.Rectangular,
|
|
190
192
|
width: "100%",
|
|
191
193
|
height: "100%",
|
|
192
|
-
active:
|
|
194
|
+
active: se === Fe.Loading,
|
|
193
195
|
overlay: /* @__PURE__ */ J(be, {
|
|
194
196
|
size: m.LG,
|
|
195
|
-
className:
|
|
197
|
+
className: j?.placeholderIconClassName ?? "text-secondary",
|
|
196
198
|
"aria-hidden": !0
|
|
197
199
|
}),
|
|
198
|
-
className: f("absolute inset-0",
|
|
200
|
+
className: f("absolute inset-0", M)
|
|
199
201
|
}), /* @__PURE__ */ J("img", {
|
|
200
|
-
ref:
|
|
201
|
-
src:
|
|
202
|
-
alt:
|
|
202
|
+
ref: oe,
|
|
203
|
+
src: F,
|
|
204
|
+
alt: P,
|
|
203
205
|
loading: "lazy",
|
|
204
206
|
decoding: "async",
|
|
205
|
-
className: f("h-full w-full object-cover transition-opacity duration-200",
|
|
207
|
+
className: f("h-full w-full object-cover transition-opacity duration-200", se === Fe.Loaded ? "opacity-100" : "opacity-0", M)
|
|
206
208
|
})]
|
|
207
|
-
}) :
|
|
209
|
+
}) : H ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ Y("div", {
|
|
208
210
|
className: "flex flex-row items-center gap-1 overflow-hidden",
|
|
209
211
|
children: [/* @__PURE__ */ J(ne, {
|
|
210
212
|
size: m.SM,
|
|
211
213
|
className: f("shrink-0", X.meta),
|
|
212
214
|
"aria-hidden": !0
|
|
213
215
|
}), /* @__PURE__ */ J("span", {
|
|
214
|
-
title:
|
|
215
|
-
className: f(
|
|
216
|
-
children:
|
|
216
|
+
title: W,
|
|
217
|
+
className: f(j?.metaClassName ?? "dial-tiny-text", "min-w-0 truncate", X.meta),
|
|
218
|
+
children: W
|
|
217
219
|
})]
|
|
218
220
|
}), /* @__PURE__ */ J("div", {
|
|
219
221
|
className: "min-w-0 flex-1",
|
|
220
222
|
children: /* @__PURE__ */ J("div", {
|
|
221
|
-
title:
|
|
222
|
-
className: f(
|
|
223
|
+
title: z,
|
|
224
|
+
className: f(j?.fontClassName ?? "dial-tiny-text", "line-clamp-3 break-words", X.name),
|
|
223
225
|
children: r ? /* @__PURE__ */ J(i, {
|
|
224
|
-
text:
|
|
226
|
+
text: z,
|
|
225
227
|
query: r,
|
|
226
228
|
maxLines: 3
|
|
227
|
-
}) :
|
|
229
|
+
}) : z
|
|
228
230
|
})
|
|
229
231
|
})] }) : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J("div", {
|
|
230
232
|
className: "min-w-0 flex-1",
|
|
231
233
|
children: /* @__PURE__ */ J("div", {
|
|
232
|
-
title:
|
|
233
|
-
className: f(
|
|
234
|
+
title: z,
|
|
235
|
+
className: f(j?.fontClassName ?? "dial-tiny-text", "line-clamp-3 break-words", X.name),
|
|
234
236
|
children: r ? /* @__PURE__ */ J(i, {
|
|
235
|
-
text:
|
|
237
|
+
text: z,
|
|
236
238
|
query: r,
|
|
237
239
|
maxLines: 3
|
|
238
|
-
}) :
|
|
240
|
+
}) : z
|
|
239
241
|
})
|
|
240
242
|
}), /* @__PURE__ */ Y("div", {
|
|
241
243
|
className: "flex flex-row items-center gap-1 overflow-hidden",
|
|
@@ -244,32 +246,38 @@ var Fe = /* @__PURE__ */ function(e) {
|
|
|
244
246
|
className: f("shrink-0", X.meta),
|
|
245
247
|
"aria-hidden": !0
|
|
246
248
|
}), /* @__PURE__ */ J("span", {
|
|
247
|
-
title:
|
|
248
|
-
className: f(
|
|
249
|
-
children:
|
|
249
|
+
title: W,
|
|
250
|
+
className: f(j?.metaClassName ?? "dial-tiny-text", "min-w-0 truncate", X.meta),
|
|
251
|
+
children: W
|
|
250
252
|
})]
|
|
251
253
|
})] }),
|
|
252
|
-
|
|
253
|
-
className: f("absolute inset-0 flex items-center justify-center",
|
|
254
|
+
V && /* @__PURE__ */ J("span", {
|
|
255
|
+
className: f("absolute inset-0 flex items-center justify-center", M, X.loadingOverlay),
|
|
254
256
|
children: /* @__PURE__ */ J(E, {
|
|
255
257
|
size: 40,
|
|
256
|
-
ariaLabel:
|
|
258
|
+
ariaLabel: D,
|
|
257
259
|
className: "z-50"
|
|
258
260
|
})
|
|
259
261
|
}),
|
|
260
|
-
|
|
262
|
+
/* @__PURE__ */ J("span", {
|
|
263
|
+
role: "status",
|
|
264
|
+
"aria-live": "polite",
|
|
265
|
+
className: "sr-only",
|
|
266
|
+
children: H ? O : ""
|
|
267
|
+
}),
|
|
268
|
+
!V && /* @__PURE__ */ Y("div", {
|
|
261
269
|
className: f("absolute end-1 top-1 flex gap-1 transition-opacity", te ? "opacity-100" : "opacity-0 group-focus-within:opacity-100 group-hover:opacity-100 mobile:opacity-100"),
|
|
262
270
|
children: [
|
|
263
|
-
|
|
271
|
+
H && o && n.errorReason !== e.UnsupportedType && /* @__PURE__ */ J(h, {
|
|
264
272
|
icon: /* @__PURE__ */ J(Se, {
|
|
265
273
|
size: m.SM,
|
|
266
274
|
"aria-hidden": !0
|
|
267
275
|
}),
|
|
268
276
|
size: k.Small,
|
|
269
|
-
className: f("h-6 w-6 rounded",
|
|
270
|
-
"aria-label":
|
|
277
|
+
className: f("h-6 w-6 rounded", re),
|
|
278
|
+
"aria-label": x,
|
|
271
279
|
onClick: (e) => {
|
|
272
|
-
e.stopPropagation(), o(
|
|
280
|
+
e.stopPropagation(), o(N);
|
|
273
281
|
}
|
|
274
282
|
}),
|
|
275
283
|
a && /* @__PURE__ */ J(h, {
|
|
@@ -278,13 +286,13 @@ var Fe = /* @__PURE__ */ function(e) {
|
|
|
278
286
|
"aria-hidden": !0
|
|
279
287
|
}),
|
|
280
288
|
size: k.Small,
|
|
281
|
-
className: f("h-6 w-6 rounded",
|
|
282
|
-
"aria-label":
|
|
289
|
+
className: f("h-6 w-6 rounded", re),
|
|
290
|
+
"aria-label": b,
|
|
283
291
|
onClick: (e) => {
|
|
284
|
-
e.stopPropagation(), a?.(
|
|
292
|
+
e.stopPropagation(), a?.(N);
|
|
285
293
|
}
|
|
286
294
|
}),
|
|
287
|
-
|
|
295
|
+
v && !a && !H && /* @__PURE__ */ J(L, {
|
|
288
296
|
size: m.SM,
|
|
289
297
|
"aria-hidden": !0,
|
|
290
298
|
className: f("h-6 w-6 rounded-lg p-1", X.hoverDownloadIcon)
|
|
@@ -292,19 +300,19 @@ var Fe = /* @__PURE__ */ function(e) {
|
|
|
292
300
|
]
|
|
293
301
|
})
|
|
294
302
|
] });
|
|
295
|
-
return
|
|
296
|
-
style:
|
|
297
|
-
className:
|
|
298
|
-
onClick:
|
|
299
|
-
onKeyDown:
|
|
303
|
+
return ae ? /* @__PURE__ */ J("div", {
|
|
304
|
+
style: B,
|
|
305
|
+
className: ue,
|
|
306
|
+
onClick: ce,
|
|
307
|
+
onKeyDown: le,
|
|
300
308
|
tabIndex: 0,
|
|
301
309
|
role: "button",
|
|
302
|
-
"aria-label":
|
|
303
|
-
children:
|
|
310
|
+
"aria-label": ie ? S : R ? T : void 0,
|
|
311
|
+
children: de
|
|
304
312
|
}) : /* @__PURE__ */ J("div", {
|
|
305
|
-
style:
|
|
306
|
-
className:
|
|
307
|
-
children:
|
|
313
|
+
style: B,
|
|
314
|
+
className: ue,
|
|
315
|
+
children: de
|
|
308
316
|
});
|
|
309
317
|
}, Z = {
|
|
310
318
|
tile: "_tile_488nu_1",
|
|
@@ -320,65 +328,76 @@ var Fe = /* @__PURE__ */ function(e) {
|
|
|
320
328
|
}, Ke = {
|
|
321
329
|
[e.Network]: "Upload failed · network error",
|
|
322
330
|
[e.UnsupportedType]: "Upload failed · unsupported file type"
|
|
323
|
-
}, qe = ({ attachment: t, onClick: r, onRetry: i, labels: a,
|
|
324
|
-
let { clickLabel:
|
|
325
|
-
|
|
326
|
-
},
|
|
327
|
-
(e.key === "Enter" || e.key === " ") &&
|
|
328
|
-
},
|
|
329
|
-
title:
|
|
330
|
-
className: f(
|
|
331
|
-
children:
|
|
332
|
-
}),
|
|
333
|
-
className: f("flex items-center gap-1 overflow-hidden",
|
|
334
|
-
children: [/* @__PURE__ */ J(
|
|
331
|
+
}, qe = ({ attachment: t, onClick: r, onRetry: i, labels: a, typeLabels: o, styles: s, theme: c = n.Dark, className: u }) => {
|
|
332
|
+
let { clickLabel: d = "Download attachment", retryLabel: p = "Retry upload", sizeLabel: g, uploadingLabel: _ = "Uploading", errorReasonLabels: v, genericErrorLabel: y = "Upload failed" } = a ?? {}, { nameClassName: b = "dial-caption-text", metaClassName: x = "dial-caption-text" } = s ?? {}, { id: S, name: C, status: w, errorReason: T } = t, E = w === l.Loading, D = w === l.Error, O = Me(), A = D && (T && (v?.[T] ?? Ke[T]) || y), { BottomIcon: j, typeLabel: M } = Ue(t, !1, !1, o), N = !D && !E && r !== void 0, P = D && !!i && T !== e.UnsupportedType, F = N || P ? "pe-5" : void 0, I = () => {
|
|
333
|
+
N && r?.(t);
|
|
334
|
+
}, R = (e) => {
|
|
335
|
+
(e.key === "Enter" || e.key === " ") && N && (e.preventDefault(), I());
|
|
336
|
+
}, z = f("group relative flex size-[84px] flex-col justify-between gap-1 overflow-hidden rounded-xl border p-1.5", Z.tile, !D && c === n.Light && Z.tileLight, D && Z.tileError), B = /* @__PURE__ */ J("div", {
|
|
337
|
+
title: C,
|
|
338
|
+
className: f(b, "line-clamp-2 min-w-0 break-words", Z.nameText, !D && F),
|
|
339
|
+
children: C
|
|
340
|
+
}), V = /* @__PURE__ */ Y("div", {
|
|
341
|
+
className: f("flex items-center gap-1 overflow-hidden", D && F),
|
|
342
|
+
children: [/* @__PURE__ */ J(j, {
|
|
335
343
|
size: 16,
|
|
336
344
|
className: Z.typeText,
|
|
337
345
|
"aria-hidden": !0
|
|
338
346
|
}), /* @__PURE__ */ J("span", {
|
|
339
|
-
className: f(
|
|
340
|
-
children:
|
|
347
|
+
className: f(x, "truncate", Z.typeText),
|
|
348
|
+
children: g ? `${M} · ${g}` : M
|
|
341
349
|
})]
|
|
342
|
-
}),
|
|
343
|
-
|
|
344
|
-
|
|
350
|
+
}), H = /* @__PURE__ */ Y(q, { children: [
|
|
351
|
+
D ? /* @__PURE__ */ Y(q, { children: [V, B] }) : /* @__PURE__ */ Y(q, { children: [B, V] }),
|
|
352
|
+
E && /* @__PURE__ */ J("div", {
|
|
345
353
|
role: "progressbar",
|
|
346
|
-
"aria-label":
|
|
354
|
+
"aria-label": _,
|
|
347
355
|
className: f("absolute inset-x-2 bottom-2 h-[3px] overflow-hidden rounded-full", Z.track),
|
|
348
356
|
children: /* @__PURE__ */ J("div", { className: f("h-full w-1/3 rounded-full", Z.indeterminateFill) })
|
|
349
357
|
}),
|
|
350
|
-
|
|
358
|
+
N && /* @__PURE__ */ J(L, {
|
|
351
359
|
size: m.SM,
|
|
352
360
|
"aria-hidden": !0,
|
|
353
361
|
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", Z.hoverIcon)
|
|
354
362
|
}),
|
|
355
|
-
|
|
363
|
+
P && /* @__PURE__ */ J(h, {
|
|
356
364
|
icon: /* @__PURE__ */ J(Se, {
|
|
357
365
|
size: m.SM,
|
|
358
366
|
"aria-hidden": !0
|
|
359
367
|
}),
|
|
360
368
|
size: k.Small,
|
|
361
369
|
className: f("absolute end-1 top-1 h-6 w-6 rounded-lg", Z.retryIcon),
|
|
362
|
-
"aria-label":
|
|
370
|
+
"aria-label": p,
|
|
371
|
+
"aria-describedby": A ? O : void 0,
|
|
363
372
|
onClick: (e) => {
|
|
364
|
-
e.stopPropagation(), i(
|
|
373
|
+
e.stopPropagation(), i(S);
|
|
365
374
|
}
|
|
375
|
+
}),
|
|
376
|
+
D && /* @__PURE__ */ J("span", {
|
|
377
|
+
id: O,
|
|
378
|
+
role: "status",
|
|
379
|
+
"aria-live": "polite",
|
|
380
|
+
className: "sr-only",
|
|
381
|
+
children: A
|
|
366
382
|
})
|
|
367
383
|
] });
|
|
368
384
|
return /* @__PURE__ */ J("div", {
|
|
369
|
-
className: f("inline-flex",
|
|
370
|
-
children:
|
|
385
|
+
className: f("inline-flex", u),
|
|
386
|
+
children: N ? /* @__PURE__ */ J("div", {
|
|
371
387
|
role: "button",
|
|
372
388
|
tabIndex: 0,
|
|
373
|
-
"aria-label":
|
|
374
|
-
onClick:
|
|
375
|
-
onKeyDown:
|
|
376
|
-
className: f(
|
|
377
|
-
children:
|
|
389
|
+
"aria-label": d,
|
|
390
|
+
onClick: I,
|
|
391
|
+
onKeyDown: R,
|
|
392
|
+
className: f(z, "cursor-pointer focus-within:outline focus-within:outline-1 focus-within:outline-offset-1"),
|
|
393
|
+
children: H
|
|
378
394
|
}) : /* @__PURE__ */ J("div", {
|
|
379
|
-
className:
|
|
380
|
-
title:
|
|
381
|
-
|
|
395
|
+
className: z,
|
|
396
|
+
title: A || void 0,
|
|
397
|
+
role: D ? "group" : void 0,
|
|
398
|
+
"aria-describedby": D ? O : void 0,
|
|
399
|
+
tabIndex: D ? 0 : void 0,
|
|
400
|
+
children: H
|
|
382
401
|
})
|
|
383
402
|
});
|
|
384
403
|
}, Je = { tile: "_tile_1s4d7_1" }, Ye = ({ count: e, onClick: t, ariaLabel: n, children: r, fontClassName: i = "dial-small-semi-text", className: a }) => /* @__PURE__ */ J("button", {
|
|
@@ -396,25 +415,25 @@ var Fe = /* @__PURE__ */ function(e) {
|
|
|
396
415
|
headerLabel: "_headerLabel_7fktb_7",
|
|
397
416
|
downloadAllButton: "_downloadAllButton_7fktb_8",
|
|
398
417
|
imageTile: "_imageTile_7fktb_12"
|
|
399
|
-
}, Xe = (e, t) => `${e} ${t}${e === 1 ? "" : "s"}`, Ze = ({ attachments: e, onAttachmentClick: n, onDownloadAll: r, onRetry: i, getSizeLabel: a, labels: o,
|
|
400
|
-
let { ariaLabel:
|
|
418
|
+
}, 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: d }) => {
|
|
419
|
+
let { ariaLabel: p = "Attachments", clickLabel: g = "Download attachment", retryLabel: _ = "Retry upload", showLessLabel: v = "Show less", downloadAllLabel: y = "Download all", getHeaderLabel: b = (e) => Xe(e, "attachment") } = o ?? {}, { headerLabelClassName: x = "dial-tiny-semi-text" } = c ?? {}, [S, C] = K(!1), w = Ne(() => We(e.length, S), [e.length, S]);
|
|
401
420
|
if (e.length === 0) return null;
|
|
402
|
-
let
|
|
421
|
+
let T = e.some((e) => e.type === t.Image), E = e.some((e) => e.type !== t.Image), D = T && E, O = e.length >= 5, k = D ? ve : T ? be : R, A = b(e.length), j = e.slice(0, w.visibleCount);
|
|
403
422
|
return /* @__PURE__ */ Y("div", {
|
|
404
423
|
role: "group",
|
|
405
|
-
"aria-label":
|
|
406
|
-
className: f("rounded-2xl border p-3",
|
|
424
|
+
"aria-label": p,
|
|
425
|
+
className: f("rounded-2xl border p-3", O ? "w-full min-w-0 max-w-[492px]" : "max-w-[420px]", Q.container, d),
|
|
407
426
|
children: [/* @__PURE__ */ Y("div", {
|
|
408
427
|
className: "mb-3 flex min-h-6 items-center gap-2",
|
|
409
428
|
children: [
|
|
410
|
-
/* @__PURE__ */ J(
|
|
429
|
+
/* @__PURE__ */ J(k, {
|
|
411
430
|
size: m.SM,
|
|
412
431
|
className: f("shrink-0", Q.headerIcon),
|
|
413
432
|
"aria-hidden": !0
|
|
414
433
|
}),
|
|
415
434
|
/* @__PURE__ */ J("span", {
|
|
416
|
-
className: f(
|
|
417
|
-
children:
|
|
435
|
+
className: f(x, Q.headerLabel),
|
|
436
|
+
children: A
|
|
418
437
|
}),
|
|
419
438
|
e.length >= 2 && (r || n) && /* @__PURE__ */ J(h, {
|
|
420
439
|
icon: /* @__PURE__ */ J(L, {
|
|
@@ -422,7 +441,7 @@ var Fe = /* @__PURE__ */ function(e) {
|
|
|
422
441
|
"aria-hidden": !0
|
|
423
442
|
}),
|
|
424
443
|
className: f("ms-auto h-6 w-6 rounded-lg", Q.downloadAllButton),
|
|
425
|
-
"aria-label":
|
|
444
|
+
"aria-label": y,
|
|
426
445
|
onClick: () => {
|
|
427
446
|
let t = e.filter((e) => e.status === l.Idle);
|
|
428
447
|
r ? r(t) : t.forEach((e) => n?.(e));
|
|
@@ -431,19 +450,20 @@ var Fe = /* @__PURE__ */ function(e) {
|
|
|
431
450
|
]
|
|
432
451
|
}), /* @__PURE__ */ Y("div", {
|
|
433
452
|
role: "list",
|
|
434
|
-
"aria-label":
|
|
435
|
-
className: f("gap-3",
|
|
453
|
+
"aria-label": A,
|
|
454
|
+
className: f("gap-3", O ? "grid grid-cols-[repeat(5,84px)] overflow-x-auto" : "flex flex-wrap"),
|
|
436
455
|
children: [
|
|
437
|
-
|
|
456
|
+
j.map((e) => /* @__PURE__ */ J("div", {
|
|
438
457
|
role: "listitem",
|
|
439
458
|
children: e.type === t.Image ? /* @__PURE__ */ J(Ge, {
|
|
440
459
|
attachment: e,
|
|
441
460
|
onClick: n ? () => n(e) : void 0,
|
|
442
461
|
onRetry: i,
|
|
443
462
|
labels: {
|
|
444
|
-
clickLabel:
|
|
445
|
-
retryLabel:
|
|
463
|
+
clickLabel: g,
|
|
464
|
+
retryLabel: _
|
|
446
465
|
},
|
|
466
|
+
typeLabels: s,
|
|
447
467
|
styles: { roundedClassName: "rounded-xl" },
|
|
448
468
|
showHoverDownloadIcon: !0,
|
|
449
469
|
className: f("size-[84px]", Q.imageTile)
|
|
@@ -452,26 +472,27 @@ var Fe = /* @__PURE__ */ function(e) {
|
|
|
452
472
|
onClick: n,
|
|
453
473
|
onRetry: i,
|
|
454
474
|
labels: {
|
|
455
|
-
clickLabel:
|
|
456
|
-
retryLabel:
|
|
475
|
+
clickLabel: g,
|
|
476
|
+
retryLabel: _,
|
|
457
477
|
sizeLabel: a?.(e)
|
|
458
478
|
},
|
|
459
|
-
|
|
479
|
+
typeLabels: s,
|
|
480
|
+
theme: u
|
|
460
481
|
})
|
|
461
482
|
}, e.id)),
|
|
462
|
-
|
|
483
|
+
w.layout === Le.Collapsed && /* @__PURE__ */ J("div", {
|
|
463
484
|
role: "listitem",
|
|
464
485
|
children: /* @__PURE__ */ J(Ye, {
|
|
465
|
-
count:
|
|
466
|
-
onClick: () =>
|
|
486
|
+
count: w.hiddenCount,
|
|
487
|
+
onClick: () => C(!0)
|
|
467
488
|
})
|
|
468
489
|
}),
|
|
469
|
-
|
|
490
|
+
O && S && /* @__PURE__ */ J("div", {
|
|
470
491
|
role: "listitem",
|
|
471
492
|
children: /* @__PURE__ */ J(Ye, {
|
|
472
493
|
count: 0,
|
|
473
|
-
onClick: () =>
|
|
474
|
-
ariaLabel:
|
|
494
|
+
onClick: () => C(!1),
|
|
495
|
+
ariaLabel: v,
|
|
475
496
|
children: /* @__PURE__ */ J(P, {
|
|
476
497
|
size: m.MD,
|
|
477
498
|
"aria-hidden": !0
|
|
@@ -729,13 +750,13 @@ var rt = 2e3, it = ({ role: e = c.User, onEdit: t, onEditHover: n, onDelete: r,
|
|
|
729
750
|
let { colors: E, typography: D, className: O, bubbleClassName: k } = n ?? {}, { attachmentClickLabel: A, attachmentRetryLabel: j, startersAriaLabel: M = "Quick reply buttons", thinkingLabel: N, codeBlockCopyLabel: P, codeBlockCopiedLabel: F, assistantMessageAriaLabel: I = "Assistant message", deploymentIconFallbackLabel: L = "AI" } = T ?? {}, R = s ? (l ?? []).filter((e) => e.type !== t.Audio) : l ?? [], z = d({
|
|
730
751
|
"--cm-bubble-text": E?.text,
|
|
731
752
|
"--cm-starters-divider": E?.startersDivider
|
|
732
|
-
}),
|
|
753
|
+
}), B = f($.text, D?.fontClassName), V = !!(h || g);
|
|
733
754
|
return /* @__PURE__ */ Y("div", {
|
|
734
755
|
role: "group",
|
|
735
756
|
"aria-label": I,
|
|
736
757
|
style: z,
|
|
737
758
|
className: f("flex w-full items-start gap-3", O),
|
|
738
|
-
children: [
|
|
759
|
+
children: [V && /* @__PURE__ */ J(r, {
|
|
739
760
|
src: h,
|
|
740
761
|
size: 28,
|
|
741
762
|
initialsName: g || L,
|
|
@@ -748,7 +769,7 @@ var rt = 2e3, it = ({ role: e = c.User, onEdit: t, onEditHover: n, onDelete: r,
|
|
|
748
769
|
(e || s) && /* @__PURE__ */ J("div", {
|
|
749
770
|
"aria-live": "polite",
|
|
750
771
|
"aria-atomic": "false",
|
|
751
|
-
className: f(
|
|
772
|
+
className: f(B, "min-w-0 max-w-full text-start"),
|
|
752
773
|
children: /* @__PURE__ */ J(a, {
|
|
753
774
|
content: e,
|
|
754
775
|
isStreaming: s,
|
|
@@ -808,18 +829,18 @@ var rt = 2e3, it = ({ role: e = c.User, onEdit: t, onEditHover: n, onDelete: r,
|
|
|
808
829
|
let { colors: y, typography: b, className: x, bubbleClassName: S } = n ?? {}, { showMoreLabel: C = "Show more", showLessLabel: w = "Show less", showMoreAriaLabel: T, showLessAriaLabel: E, attachmentClickLabel: D, attachmentRetryLabel: O, userMessageAriaLabel: A = "User message" } = s ?? {}, { textRef: j, isTextCollapsed: M, isOverflowing: F, collapsedMaxHeight: I, expandedMaxHeight: L, isCollapsed: R, toggleCollapsed: z } = p({
|
|
809
830
|
text: e,
|
|
810
831
|
collapsedLineCount: o
|
|
811
|
-
}),
|
|
832
|
+
}), B = d({
|
|
812
833
|
"--cm-bubble-user-bg": y?.userBackground,
|
|
813
834
|
"--cm-bubble-user-border": y?.userBorder,
|
|
814
835
|
"--cm-bubble-fade-start": y?.fadeStart,
|
|
815
836
|
"--cm-bubble-text": y?.text,
|
|
816
837
|
"--cm-bubble-collapsed-height": F ? `${I}px` : void 0,
|
|
817
838
|
"--cm-bubble-expanded-height": F ? `${L}px` : void 0
|
|
818
|
-
}),
|
|
839
|
+
}), V = t === st.Top ? "rounded-ee-[6px] rounded-se-[16px]" : "rounded-se-[6px] rounded-ee-[16px]", H = f($.text, b?.fontClassName), U = T ?? C, ee = E ?? w, te = R ? C : w, ne = R ? U : ee, W = R ? N : P, G = Me();
|
|
819
840
|
return /* @__PURE__ */ J("div", {
|
|
820
841
|
role: "group",
|
|
821
842
|
"aria-label": A,
|
|
822
|
-
style:
|
|
843
|
+
style: B,
|
|
823
844
|
className: f("flex w-full", x),
|
|
824
845
|
children: /* @__PURE__ */ Y("div", {
|
|
825
846
|
className: "ms-auto flex w-fit min-w-0 max-w-full flex-col items-end gap-4",
|
|
@@ -838,7 +859,7 @@ var rt = 2e3, it = ({ role: e = c.User, onEdit: t, onEditHover: n, onDelete: r,
|
|
|
838
859
|
className: "max-w-[640px]"
|
|
839
860
|
}),
|
|
840
861
|
e && /* @__PURE__ */ J("div", {
|
|
841
|
-
className: f($.userBubble, "flex w-fit items-center justify-end rounded-es-2xl rounded-ss-2xl border px-6 py-4",
|
|
862
|
+
className: f($.userBubble, "flex w-fit items-center justify-end rounded-es-2xl rounded-ss-2xl border px-6 py-4", V, S),
|
|
842
863
|
children: /* @__PURE__ */ Y("div", {
|
|
843
864
|
className: "flex min-w-0 flex-col items-start",
|
|
844
865
|
children: [/* @__PURE__ */ J("div", {
|
|
@@ -846,16 +867,16 @@ var rt = 2e3, it = ({ role: e = c.User, onEdit: t, onEditHover: n, onDelete: r,
|
|
|
846
867
|
className: f("relative overflow-hidden", F && $.collapsibleText, F && !R && $.expandedText, M && $.collapsedText),
|
|
847
868
|
children: /* @__PURE__ */ J("p", {
|
|
848
869
|
ref: j,
|
|
849
|
-
className: f(
|
|
870
|
+
className: f(H, "whitespace-pre-wrap text-start [overflow-wrap:anywhere]"),
|
|
850
871
|
children: e
|
|
851
872
|
})
|
|
852
873
|
}), F && /* @__PURE__ */ J(_, {
|
|
853
|
-
label: /* @__PURE__ */ J(q, { children:
|
|
874
|
+
label: /* @__PURE__ */ J(q, { children: te }),
|
|
854
875
|
iconBefore: /* @__PURE__ */ J(W, {
|
|
855
876
|
size: m.SM,
|
|
856
877
|
"aria-hidden": "true"
|
|
857
878
|
}),
|
|
858
|
-
"aria-label":
|
|
879
|
+
"aria-label": ne,
|
|
859
880
|
"aria-expanded": !R,
|
|
860
881
|
"aria-controls": G,
|
|
861
882
|
className: "mt-3",
|
|
@@ -111,7 +111,7 @@ interface BaseMessageBubbleProps {
|
|
|
111
111
|
/**
|
|
112
112
|
* Surface color theme for non-previewable attachment tiles, matching the
|
|
113
113
|
* markdown code block's own light/dark surface (never plain white).
|
|
114
|
-
* Forwarded to `AttachmentGroup
|
|
114
|
+
* Forwarded to `AttachmentGroup`, which defaults to `'dark'` when omitted.
|
|
115
115
|
*/
|
|
116
116
|
attachmentTheme?: CodeBlockTheme;
|
|
117
117
|
}
|
|
@@ -146,7 +146,7 @@ export interface AssistantMessageBubbleProps extends BaseMessageBubbleProps {
|
|
|
146
146
|
deploymentIconUrl?: string;
|
|
147
147
|
/** Human-readable deployment name shown as the icon's accessible label. */
|
|
148
148
|
deploymentDisplayName?: string;
|
|
149
|
-
/** Syntax highlight color theme for code blocks. Forwarded to `MDMessageViewer
|
|
149
|
+
/** Syntax highlight color theme for code blocks. Forwarded to `MDMessageViewer`, which defaults to `'dark'` when omitted. */
|
|
150
150
|
codeBlockTheme?: CodeBlockTheme;
|
|
151
151
|
/** Localised labels for quick replies, the thinking indicator, and code block copy actions. */
|
|
152
152
|
labels?: AssistantMessageBubbleLabels;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-bubble.d.ts","sourceRoot":"","sources":["../../src/models/message-bubble.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EACjB,WAAW,EACX,aAAa,EACd,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7D,mEAAmE;AACnE,MAAM,WAAW,mBAAmB;IAClC,mDAAmD;IACnD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,+CAA+C;IAC/C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4GAA4G;IAC5G,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0HAA0H;IAC1H,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,0DAA0D;AAC1D,MAAM,WAAW,uBAAuB;IACtC,0DAA0D;IAC1D,a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EAAE,UAAU,GAAG,oBAAoB,CAAC,GAAG;IAChE,0FAA0F;IAC1F,IAAI,EAAE,WAAW,CAAC;CACnB,CAAC"}
|
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.489",
|
|
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.489",
|
|
24
|
+
"@epam/ai-dial-conversation-input": "1.0.0-dev.489",
|
|
25
25
|
"react-markdown": "^10.1.0"
|
|
26
26
|
},
|
|
27
27
|
"repository": {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** Controls which corners of the message bubble are rounded, allowing adjacent bubbles to visually group together. */
|
|
2
2
|
export declare enum BubblePosition {
|
|
3
|
-
/** First bubble in a group — rounds the
|
|
3
|
+
/** First bubble in a group — rounds the bottom-right corner. */
|
|
4
4
|
Bottom = "Bottom",
|
|
5
|
-
/** Subsequent bubble in a group — rounds the
|
|
5
|
+
/** Subsequent bubble in a group — rounds the top-right corner. */
|
|
6
6
|
Top = "Top"
|
|
7
7
|
}
|
|
8
8
|
//# sourceMappingURL=bubble-position.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bubble-position.d.ts","sourceRoot":"","sources":["../../src/types/bubble-position.ts"],"names":[],"mappings":"AAAA,sHAAsH;AACtH,oBAAY,cAAc;IACxB,
|
|
1
|
+
{"version":3,"file":"bubble-position.d.ts","sourceRoot":"","sources":["../../src/types/bubble-position.ts"],"names":[],"mappings":"AAAA,sHAAsH;AACtH,oBAAY,cAAc;IACxB,gEAAgE;IAChE,MAAM,WAAW;IACjB,kEAAkE;IAClE,GAAG,QAAQ;CACZ"}
|