@epam/ai-dial-conversation-stages 1.2.0-dev.99 → 1.3.0-dev.5
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/CollapsedGroup/CollapsedGroup.d.ts.map +1 -1
- package/components/StageItem/StageItem.d.ts +11 -3
- package/components/StageItem/StageItem.d.ts.map +1 -1
- package/components/StageList/StageList.d.ts +29 -0
- package/components/StageList/StageList.d.ts.map +1 -0
- package/components/StageMarkdownContent/StageCodeBlock.d.ts +4 -2
- package/components/StageMarkdownContent/StageCodeBlock.d.ts.map +1 -1
- package/components/StageMarkdownContent/StageMarkdownContent.d.ts +6 -0
- package/components/StageMarkdownContent/StageMarkdownContent.d.ts.map +1 -1
- package/components/StagesPanel/StagesPanel.d.ts +15 -1
- package/components/StagesPanel/StagesPanel.d.ts.map +1 -1
- package/constants/stage-accordion.d.ts +11 -0
- package/constants/stage-accordion.d.ts.map +1 -0
- package/hooks/useStageExpansion/useStageExpansion.d.ts +9 -0
- package/hooks/useStageExpansion/useStageExpansion.d.ts.map +1 -0
- package/index.css +2 -2
- package/index.js +790 -426
- package/models/collapsed-group.d.ts +12 -6
- package/models/collapsed-group.d.ts.map +1 -1
- package/models/stage-grouping.d.ts +6 -6
- package/models/stage-grouping.d.ts.map +1 -1
- package/models/stage-tree.d.ts +21 -0
- package/models/stage-tree.d.ts.map +1 -0
- package/models/stages-props.d.ts +15 -5
- package/models/stages-props.d.ts.map +1 -1
- package/package.json +5 -4
- package/utils/stage-attachments.d.ts +11 -0
- package/utils/stage-attachments.d.ts.map +1 -0
- package/utils/stage-grouping.d.ts +7 -3
- package/utils/stage-grouping.d.ts.map +1 -1
- package/utils/stage-name.d.ts +0 -6
- package/utils/stage-name.d.ts.map +1 -1
- package/utils/stage-progress.d.ts +0 -2
- package/utils/stage-progress.d.ts.map +1 -1
- package/utils/stage-tree.d.ts +14 -0
- package/utils/stage-tree.d.ts.map +1 -0
package/index.js
CHANGED
|
@@ -1,502 +1,866 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DIAL_ICON_SIZE as
|
|
3
|
-
import { IconAlertCircle as
|
|
4
|
-
import { memo as
|
|
5
|
-
import { Fragment as
|
|
1
|
+
import { AttachmentErrorReason as e, AttachmentType as t, MIME_TYPE_EXT_MAP as n, MarkdownCodeBlock as r, MarkdownRenderer as i, RequestStatus as a, StageStatus as o, buildCssVars as s, mergeClasses as c, messageAttachmentsToDisplayAttachments as l, normalizeMimeType as u } from "@epam/ai-dial-chat-shared";
|
|
2
|
+
import { Accordion as d, DIAL_ICON_SIZE as f, DIAL_KIT_ICON_STROKE as p, ElementSize as m, EllipsisTooltip as h, Highlight as g, Skeleton as _, SkeletonVariant as v, Spinner as y, StaticIconButton as b } from "@epam/ai-dial-ui-kit";
|
|
3
|
+
import { IconAlertCircle as x, IconCheck as S, IconClipboard as C, IconDownload as w, IconExternalLink as T, IconFile as E, IconFileTypeBmp as D, IconFileTypeCss as O, IconFileTypeCsv as k, IconFileTypeDoc as A, IconFileTypeDocx as j, IconFileTypeHtml as M, IconFileTypeJpg as N, IconFileTypeJs as P, IconFileTypeJsx as F, IconFileTypePdf as I, IconFileTypePhp as L, IconFileTypePng as R, IconFileTypePpt as z, IconFileTypeRs as ee, IconFileTypeSql as te, IconFileTypeSvg as ne, IconFileTypeTs as re, IconFileTypeTsx as B, IconFileTypeTxt as ie, IconFileTypeVue as ae, IconFileTypeXls as oe, IconFileTypeXml as se, IconFileTypeZip as ce, IconMusic as le, IconPhoto as V, IconReload as ue, IconTerminal2 as de, IconVideo as fe, IconX as pe } from "@tabler/icons-react";
|
|
4
|
+
import { memo as me, useCallback as H, useEffect as U, useId as he, useMemo as W, useRef as ge, useState as G } from "react";
|
|
5
|
+
import { Fragment as _e, jsx as K, jsxs as q } from "react/jsx-runtime";
|
|
6
6
|
//#region src/constants/public-class-names.ts
|
|
7
|
-
var
|
|
7
|
+
var J = {
|
|
8
8
|
panel: "dial-conversation-stages-panel",
|
|
9
9
|
group: "dial-conversation-stages-group",
|
|
10
10
|
groupToggle: "dial-conversation-stages-group-toggle"
|
|
11
|
-
},
|
|
11
|
+
}, ve = () => {
|
|
12
|
+
let [e, t] = G(() => /* @__PURE__ */ new Set()), n = H((e, n) => {
|
|
13
|
+
t((t) => {
|
|
14
|
+
if (t.has(e) === n) return t;
|
|
15
|
+
let r = new Set(t);
|
|
16
|
+
return n ? r.add(e) : r.delete(e), r;
|
|
17
|
+
});
|
|
18
|
+
}, []), r = H(() => {
|
|
19
|
+
t((e) => e.size ? /* @__PURE__ */ new Set() : e);
|
|
20
|
+
}, []);
|
|
21
|
+
return W(() => ({
|
|
22
|
+
isExpanded: (t) => e.has(t),
|
|
23
|
+
onToggle: n,
|
|
24
|
+
reset: r
|
|
25
|
+
}), [
|
|
26
|
+
e,
|
|
27
|
+
n,
|
|
28
|
+
r
|
|
29
|
+
]);
|
|
30
|
+
}, ye = /[([][^()[\]]*[)\]]/g, be = /(\d+(?:\.\d+)?)\s*s\b/, xe = (e) => {
|
|
12
31
|
let t = e.trimEnd();
|
|
13
32
|
return t.endsWith(":") ? t.slice(0, -1) : t;
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
if (!t) return;
|
|
17
|
-
let n = Number(t[1]);
|
|
18
|
-
if (!(n > 23)) return n * 60 * 60 + Number(t[2]) * 60 + Number(t[3]);
|
|
19
|
-
}, N = (e) => {
|
|
20
|
-
E.lastIndex = 0;
|
|
33
|
+
}, Se = (e) => {
|
|
34
|
+
ye.lastIndex = 0;
|
|
21
35
|
let t;
|
|
22
|
-
for (; t =
|
|
23
|
-
let e = t[0].slice(1, -1), n =
|
|
36
|
+
for (; t = ye.exec(e);) {
|
|
37
|
+
let e = t[0].slice(1, -1), n = be.exec(e);
|
|
24
38
|
if (n) return {
|
|
25
39
|
durationLabel: `${n[1]}s`,
|
|
26
40
|
groupIndex: t.index,
|
|
27
|
-
groupLength: t[0].length
|
|
28
|
-
startTimeSeconds: M(e)
|
|
41
|
+
groupLength: t[0].length
|
|
29
42
|
};
|
|
30
43
|
}
|
|
31
|
-
},
|
|
32
|
-
let t = e ?? "", n =
|
|
44
|
+
}, Y = (e) => {
|
|
45
|
+
let t = e ?? "", n = Se(t);
|
|
33
46
|
return {
|
|
34
|
-
name:
|
|
47
|
+
name: xe(n ? t.slice(0, n.groupIndex) + t.slice(n.groupIndex + n.groupLength) : t).trim().replace(/ {2,}/g, " "),
|
|
35
48
|
durationLabel: n?.durationLabel
|
|
36
49
|
};
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
let i = t + n;
|
|
54
|
-
return r != null && r - i > j && (n += A, i += A), r = i, {
|
|
55
|
-
start: i,
|
|
56
|
-
end: i + e
|
|
57
|
-
};
|
|
58
|
-
}).sort((e, t) => e.start - t.start), a = 0, o = i[0].start, s = i[0].end;
|
|
59
|
-
for (let e of i.slice(1)) e.start <= s ? s = Math.max(s, e.end) : (a += s - o, o = e.start, s = e.end);
|
|
60
|
-
return a + s - o;
|
|
61
|
-
}, z = (e) => [...e].reverse().find((e) => e.status == null), B = (e, t) => e.findIndex((e) => e.index === t.index) + 1, V = (e) => {
|
|
50
|
+
}, Ce = (e) => e.length > 0 && !/\s/.test(e) && e.includes("_"), we = (e) => [...e].reverse().find((e) => e.status == null), Te = (e, t) => {
|
|
51
|
+
let n = e.parent_stage_index;
|
|
52
|
+
if (!(n == null || !Number.isInteger(n) || n < 0 || n >= e.index)) return t.get(n);
|
|
53
|
+
}, Ee = (e) => {
|
|
54
|
+
let t = e.map((e) => ({
|
|
55
|
+
stage: e,
|
|
56
|
+
children: []
|
|
57
|
+
})), n = /* @__PURE__ */ new Map();
|
|
58
|
+
for (let e of t) n.has(e.stage.index) || n.set(e.stage.index, e);
|
|
59
|
+
let r = [];
|
|
60
|
+
for (let e of t) {
|
|
61
|
+
let t = Te(e.stage, n);
|
|
62
|
+
t ? t.children.push(e) : r.push(e);
|
|
63
|
+
}
|
|
64
|
+
return r;
|
|
65
|
+
}, De = (e) => `stage:${e}`, Oe = (e) => `group:${e}`, ke = "min-w-0 overflow-visible py-0", Ae = "min-w-0 justify-start gap-2 rounded-lg px-2 py-1.5 text-start mobile:min-h-11", je = (e) => {
|
|
62
66
|
let t = [], n = 0;
|
|
63
67
|
for (; n < e.length;) {
|
|
64
|
-
let r = e[n], i =
|
|
65
|
-
for (; a < e.length &&
|
|
68
|
+
let r = e[n], i = Y(r.stage.name).name, a = n + 1;
|
|
69
|
+
for (; a < e.length && Y(e[a].stage.name).name === i;) a += 1;
|
|
66
70
|
let o = e.slice(n, a);
|
|
67
71
|
o.length > 1 ? t.push({
|
|
68
|
-
key: r.index,
|
|
72
|
+
key: r.stage.index,
|
|
69
73
|
name: i,
|
|
70
74
|
attempts: o
|
|
71
75
|
}) : t.push({
|
|
72
|
-
key: r.index,
|
|
73
|
-
|
|
76
|
+
key: r.stage.index,
|
|
77
|
+
node: r
|
|
74
78
|
}), n = a;
|
|
75
79
|
}
|
|
76
80
|
return t;
|
|
77
|
-
},
|
|
78
|
-
panel: "
|
|
79
|
-
row: "
|
|
80
|
-
collapseButton: "
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
81
|
+
}, X = {
|
|
82
|
+
panel: "_panel_w65is_2",
|
|
83
|
+
row: "_row_w65is_6",
|
|
84
|
+
collapseButton: "_collapseButton_w65is_10",
|
|
85
|
+
stageHeader: "_stageHeader_w65is_19",
|
|
86
|
+
stageRegion: "_stageRegion_w65is_28",
|
|
87
|
+
stageName: "_stageName_w65is_32",
|
|
88
|
+
stageNameFailed: "_stageNameFailed_w65is_36",
|
|
89
|
+
monoName: "_monoName_w65is_40",
|
|
90
|
+
tag: "_tag_w65is_44",
|
|
91
|
+
count: "_count_w65is_48",
|
|
92
|
+
duration: "_duration_w65is_53",
|
|
93
|
+
iconSecondary: "_iconSecondary_w65is_58",
|
|
94
|
+
iconCompleted: "_iconCompleted_w65is_63",
|
|
95
|
+
iconError: "_iconError_w65is_67",
|
|
96
|
+
stageContent: "_stageContent_w65is_71",
|
|
97
|
+
codeBlock: "_codeBlock_w65is_75",
|
|
98
|
+
codeInline: "_codeInline_w65is_84",
|
|
99
|
+
blockquote: "_blockquote_w65is_91",
|
|
100
|
+
tableCell: "_tableCell_w65is_96"
|
|
101
|
+
}, Me = ({ status: e, isLive: t, runningLabel: n = "Running", failedLabel: r = "Failed" }) => e === o.Failed ? /* @__PURE__ */ q(_e, { children: [/* @__PURE__ */ K(x, {
|
|
102
|
+
size: f.MD,
|
|
103
|
+
className: X.iconError,
|
|
98
104
|
"aria-hidden": !0,
|
|
99
|
-
stroke:
|
|
100
|
-
}), /* @__PURE__ */
|
|
105
|
+
stroke: p
|
|
106
|
+
}), /* @__PURE__ */ K("span", {
|
|
101
107
|
className: "sr-only",
|
|
102
|
-
children:
|
|
103
|
-
})] }) : e ===
|
|
104
|
-
size:
|
|
105
|
-
className:
|
|
108
|
+
children: r
|
|
109
|
+
})] }) : e === o.Completed ? /* @__PURE__ */ K(S, {
|
|
110
|
+
size: f.SM,
|
|
111
|
+
className: X.iconCompleted,
|
|
106
112
|
"aria-hidden": !0,
|
|
107
|
-
stroke:
|
|
108
|
-
}) :
|
|
113
|
+
stroke: p
|
|
114
|
+
}) : t ? /* @__PURE__ */ K(y, {
|
|
109
115
|
size: 16,
|
|
110
|
-
ariaLabel:
|
|
111
|
-
}) : null,
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
116
|
+
ariaLabel: n
|
|
117
|
+
}) : null, Ne = (e) => {
|
|
118
|
+
if (e == null) return "";
|
|
119
|
+
let t = e.lastIndexOf(".");
|
|
120
|
+
return t > 0 ? e.slice(0, t) : e;
|
|
121
|
+
}, Pe = (e) => {
|
|
122
|
+
if (!e) return E;
|
|
123
|
+
let t = u(e);
|
|
124
|
+
if (t.startsWith("image/")) switch (t) {
|
|
125
|
+
case "image/jpeg": return N;
|
|
126
|
+
case "image/png": return R;
|
|
127
|
+
case "image/svg+xml": return ne;
|
|
128
|
+
case "image/bmp": return D;
|
|
129
|
+
default: return V;
|
|
130
|
+
}
|
|
131
|
+
if (t.startsWith("video/")) return fe;
|
|
132
|
+
if (t.startsWith("audio/")) return le;
|
|
133
|
+
switch (t) {
|
|
134
|
+
case "application/pdf": return I;
|
|
135
|
+
case "application/msword": return A;
|
|
136
|
+
case "application/vnd.openxmlformats-officedocument.wordprocessingml.document": return j;
|
|
137
|
+
case "application/vnd.ms-powerpoint": return z;
|
|
138
|
+
case "application/vnd.openxmlformats-officedocument.presentationml.presentation": return z;
|
|
139
|
+
case "application/vnd.ms-excel": return oe;
|
|
140
|
+
case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": return oe;
|
|
141
|
+
case "application/zip":
|
|
142
|
+
case "application/vnd.rar":
|
|
143
|
+
case "application/x-7z-compressed":
|
|
144
|
+
case "application/gzip":
|
|
145
|
+
case "application/x-tar": return ce;
|
|
146
|
+
case "text/csv": return k;
|
|
147
|
+
case "text/plain": return ie;
|
|
148
|
+
case "text/html":
|
|
149
|
+
case "application/xhtml+xml": return M;
|
|
150
|
+
case "application/xml": return se;
|
|
151
|
+
case "application/sql": return te;
|
|
152
|
+
case "text/javascript": return P;
|
|
153
|
+
case "text/jsx": return F;
|
|
154
|
+
case "text/typescript": return re;
|
|
155
|
+
case "text/tsx": return B;
|
|
156
|
+
case "text/css": return O;
|
|
157
|
+
case "text/x-php": return L;
|
|
158
|
+
case "text/x-rustsrc": return ee;
|
|
159
|
+
case "text/x-vue": return ae;
|
|
160
|
+
default: return E;
|
|
161
|
+
}
|
|
162
|
+
}, Fe = (e) => {
|
|
163
|
+
let { type: n, contentType: r } = e;
|
|
164
|
+
return n === t.Prompt ? de : n === t.Pasted ? C : n === t.Image ? V : Pe(r ?? "");
|
|
165
|
+
}, Ie = (e) => {
|
|
166
|
+
let t = u(e), r = n[t];
|
|
167
|
+
if (r) return r;
|
|
168
|
+
let i = t.split("/")[1];
|
|
169
|
+
if (i && !i.startsWith("vnd.") && !i.includes("+")) return i;
|
|
170
|
+
}, Le = (e, n) => {
|
|
171
|
+
let { type: r, name: i, contentType: a } = e;
|
|
172
|
+
if (r === t.Prompt) return n.promptLabel ?? "Prompt";
|
|
173
|
+
if (r === t.Pasted) return n.pastedLabel ?? "Pasted";
|
|
174
|
+
if (r === t.Image) return n.imageLabel ?? "Image";
|
|
175
|
+
if (a) {
|
|
176
|
+
let e = Ie(a);
|
|
177
|
+
if (e) return `.${e}`;
|
|
178
|
+
}
|
|
179
|
+
if (i == null) return "";
|
|
180
|
+
let o = i.lastIndexOf(".");
|
|
181
|
+
return o > 0 && o < i.length - 1 ? `.${i.slice(o + 1).toLowerCase()}` : i;
|
|
182
|
+
}, Re = (e, n = {}) => {
|
|
183
|
+
let { type: r, status: i, previewUrl: o, url: s } = e, c = i === a.Loading, l = i === a.Error, u = r === t.Image && !!(o ?? s) && !l, d = r === t.Link && !l;
|
|
184
|
+
return {
|
|
185
|
+
isLoading: c,
|
|
186
|
+
isError: l,
|
|
187
|
+
isImage: u,
|
|
188
|
+
isLink: d,
|
|
189
|
+
BottomIcon: d ? null : Fe(e),
|
|
190
|
+
typeLabel: d ? null : Le(e, n)
|
|
191
|
+
};
|
|
192
|
+
}, ze = "flex size-[84px] items-center justify-center rounded-xl border", Z = {
|
|
193
|
+
tray: "dial-ai-attachment-tray",
|
|
194
|
+
trayItem: "dial-ai-attachment-tray-item",
|
|
195
|
+
tile: "dial-ai-attachment-tile",
|
|
196
|
+
tileSelected: "dial-ai-attachment-tile-selected",
|
|
197
|
+
tileName: "dial-ai-attachment-tile-name",
|
|
198
|
+
tileType: "dial-ai-attachment-tile-type",
|
|
199
|
+
tileAction: "dial-ai-attachment-tile-action"
|
|
200
|
+
}, Q = {
|
|
201
|
+
tile: "_tile_1tdbq_12",
|
|
202
|
+
hovered: "_hovered_1tdbq_18",
|
|
203
|
+
selected: "_selected_1tdbq_28",
|
|
204
|
+
tileError: "_tileError_1tdbq_33",
|
|
205
|
+
nameText: "_nameText_1tdbq_38",
|
|
206
|
+
typeText: "_typeText_1tdbq_42",
|
|
207
|
+
retryIcon: "_retryIcon_1tdbq_46",
|
|
208
|
+
track: "_track_1tdbq_50",
|
|
209
|
+
actionButton: "_actionButton_1tdbq_56",
|
|
210
|
+
imageActionButton: "_imageActionButton_1tdbq_60"
|
|
211
|
+
}, Be = ({ ariaLabel: e, errorTitle: t, errorDescId: n, onClick: r, id: i, icon: a, className: o }) => /* @__PURE__ */ K(b, {
|
|
212
|
+
icon: a,
|
|
213
|
+
size: m.Small,
|
|
214
|
+
className: c("opacity-0 focus-visible:opacity-100 group-focus-within/attachment-tile:opacity-100 group-hover/attachment-tile:opacity-100", Q.actionButton, o, Z.tileAction),
|
|
215
|
+
"aria-label": e,
|
|
216
|
+
"aria-describedby": t ? n : void 0,
|
|
217
|
+
onClick: (e) => {
|
|
218
|
+
e.stopPropagation(), r(i);
|
|
219
|
+
}
|
|
220
|
+
}), Ve = ({ ...e }) => /* @__PURE__ */ K(Be, {
|
|
221
|
+
icon: /* @__PURE__ */ K(ue, {
|
|
222
|
+
size: f.SM,
|
|
223
|
+
"aria-hidden": !0,
|
|
224
|
+
stroke: p
|
|
225
|
+
}),
|
|
226
|
+
className: Q.retryIcon,
|
|
227
|
+
...e
|
|
228
|
+
}), He = ({ ...e }) => /* @__PURE__ */ K(Be, {
|
|
229
|
+
icon: /* @__PURE__ */ K(w, {
|
|
230
|
+
size: f.SM,
|
|
231
|
+
"aria-hidden": !0,
|
|
232
|
+
stroke: p
|
|
233
|
+
}),
|
|
234
|
+
...e
|
|
235
|
+
}), Ue = ({ ...e }) => /* @__PURE__ */ K(Be, {
|
|
236
|
+
icon: /* @__PURE__ */ K(T, {
|
|
237
|
+
size: f.SM,
|
|
238
|
+
"aria-hidden": !0,
|
|
239
|
+
stroke: p
|
|
240
|
+
}),
|
|
241
|
+
...e
|
|
242
|
+
}), We = ({ ...e }) => /* @__PURE__ */ K(Be, {
|
|
243
|
+
icon: /* @__PURE__ */ K(pe, {
|
|
244
|
+
size: f.SM,
|
|
245
|
+
"aria-hidden": !0,
|
|
246
|
+
stroke: p
|
|
247
|
+
}),
|
|
248
|
+
...e
|
|
249
|
+
}), Ge = {
|
|
250
|
+
[e.Network]: "Upload failed · network error",
|
|
251
|
+
[e.UnsupportedType]: "Upload failed · unsupported file type",
|
|
252
|
+
[e.FileTooLarge]: "Upload failed · file too large"
|
|
253
|
+
}, Ke = ({ attachment: t, searchQuery: n = "", onClick: r, onRetry: i, labels: o, styles: s, onDownload: l, isLink: u, cssVars: d, onExpand: f, isExpandable: p, onRemove: m, isSelected: h }) => {
|
|
254
|
+
let { clickLabel: _ = "Download attachment", expandLabel: v = "Expand pasted text", downloadLabel: b = "Download attachment", retryLabel: x = "Retry upload", removeLabel: S = "Remove attachment", openInNewTabLabel: C = "Open in new tab", sizeLabel: w, uploadingLabel: T = "Uploading", errorReasonLabels: E, genericErrorLabel: D = "Upload failed" } = o ?? {}, { typography: O, className: k } = s ?? {}, { id: A, name: j, status: M, errorReason: N } = t, P = M === a.Loading, F = M === a.Error, I = he(), L = F ? N && (E?.[N] ?? Ge[N]) || D : "", { BottomIcon: R, typeLabel: z } = Re(t), ee = !F && !P && l && !u, te = F && !!i && N !== e.UnsupportedType && N !== e.FileTooLarge, ne = Number(!!ee) + Number(!!te) + Number(!!u) + Number(!!m), re = ne > 1 ? "pe-11" : ne === 1 ? "pe-5" : void 0, B = !!p && f !== void 0, ie = B || r !== void 0, ae = () => {
|
|
255
|
+
B ? f(A) : r?.(A);
|
|
256
|
+
}, oe = (e) => {
|
|
257
|
+
e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), ae());
|
|
258
|
+
}, se = W(() => Ne(j), [j]), ce = H(() => {
|
|
259
|
+
window.open(t.referenceUrl, "_blank", "noopener,noreferrer");
|
|
260
|
+
}, [t]), le = c(ze, "group/attachment-tile relative flex-col justify-between items-start gap-1 overflow-hidden p-1.5", Q.tile, !F && Q.hovered, h && Q.selected, F && Q.tileError, Z.tile, h && Z.tileSelected), V = /* @__PURE__ */ K("div", {
|
|
261
|
+
title: se,
|
|
262
|
+
className: c(O?.nameClassName ?? "dial-caption-text", "line-clamp-2 w-full min-w-0 break-words", Q.nameText, !F && re, Z.tileName),
|
|
263
|
+
children: n ? /* @__PURE__ */ K(g, {
|
|
264
|
+
text: se,
|
|
265
|
+
query: n,
|
|
266
|
+
maxLines: 2
|
|
267
|
+
}) : se
|
|
268
|
+
}), ue = R && /* @__PURE__ */ q("div", {
|
|
269
|
+
className: c("flex w-full items-center gap-1", F && re, Z.tileType),
|
|
270
|
+
children: [/* @__PURE__ */ K(R, {
|
|
271
|
+
size: 16,
|
|
272
|
+
className: Q.typeText,
|
|
273
|
+
"aria-hidden": !0
|
|
274
|
+
}), /* @__PURE__ */ K("span", {
|
|
275
|
+
className: c(O?.metaClassName ?? "dial-caption-text", "min-w-0 flex-1 truncate", Q.typeText),
|
|
276
|
+
children: w ? `${z} · ${w}` : z
|
|
134
277
|
})]
|
|
278
|
+
}), de = ie ? {
|
|
279
|
+
role: "button",
|
|
280
|
+
tabIndex: 0,
|
|
281
|
+
"aria-label": B ? v : _,
|
|
282
|
+
onClick: ae,
|
|
283
|
+
onKeyDown: oe
|
|
284
|
+
} : {}, fe = /* @__PURE__ */ q(_e, { children: [
|
|
285
|
+
V,
|
|
286
|
+
ue,
|
|
287
|
+
P && /* @__PURE__ */ K("div", {
|
|
288
|
+
role: "progressbar",
|
|
289
|
+
"aria-label": T,
|
|
290
|
+
className: c("absolute start-[-1px] top-[-1px] flex size-full items-center justify-center rounded", Q.track),
|
|
291
|
+
children: /* @__PURE__ */ K(y, { size: 32 })
|
|
292
|
+
}),
|
|
293
|
+
/* @__PURE__ */ q("div", {
|
|
294
|
+
className: "absolute end-1 top-1 flex gap-1",
|
|
295
|
+
children: [
|
|
296
|
+
ee && /* @__PURE__ */ K(He, {
|
|
297
|
+
ariaLabel: b,
|
|
298
|
+
errorTitle: L,
|
|
299
|
+
errorDescId: I,
|
|
300
|
+
onClick: l,
|
|
301
|
+
id: A
|
|
302
|
+
}),
|
|
303
|
+
te && /* @__PURE__ */ K(Ve, {
|
|
304
|
+
ariaLabel: x,
|
|
305
|
+
errorTitle: L,
|
|
306
|
+
errorDescId: I,
|
|
307
|
+
onClick: i,
|
|
308
|
+
id: A
|
|
309
|
+
}),
|
|
310
|
+
u && /* @__PURE__ */ K(Ue, {
|
|
311
|
+
ariaLabel: C,
|
|
312
|
+
errorTitle: L,
|
|
313
|
+
errorDescId: I,
|
|
314
|
+
onClick: ce
|
|
315
|
+
}),
|
|
316
|
+
m && /* @__PURE__ */ K(We, {
|
|
317
|
+
ariaLabel: S,
|
|
318
|
+
errorTitle: L,
|
|
319
|
+
errorDescId: I,
|
|
320
|
+
onClick: m,
|
|
321
|
+
id: A
|
|
322
|
+
})
|
|
323
|
+
]
|
|
324
|
+
}),
|
|
325
|
+
F && /* @__PURE__ */ K("span", {
|
|
326
|
+
id: I,
|
|
327
|
+
role: "status",
|
|
328
|
+
"aria-live": "polite",
|
|
329
|
+
className: "sr-only",
|
|
330
|
+
children: L
|
|
331
|
+
})
|
|
332
|
+
] });
|
|
333
|
+
return /* @__PURE__ */ K("div", {
|
|
334
|
+
style: d,
|
|
335
|
+
className: c("inline-flex", k),
|
|
336
|
+
children: /* @__PURE__ */ K("div", {
|
|
337
|
+
...de,
|
|
338
|
+
"aria-busy": P,
|
|
339
|
+
style: d,
|
|
340
|
+
className: c(le, ie && "cursor-pointer", "focus-within:outline focus-within:outline-1 focus-within:outline-offset-1"),
|
|
341
|
+
children: fe
|
|
342
|
+
})
|
|
343
|
+
});
|
|
344
|
+
}, qe = /* @__PURE__ */ function(e) {
|
|
345
|
+
return e.Idle = "idle", e.Loading = "loading", e.Loaded = "loaded", e.Error = "error", e;
|
|
346
|
+
}({}), Je = ({ enabled: e, src: t }) => {
|
|
347
|
+
let n = ge(null), [r, i] = G("idle");
|
|
348
|
+
return U(() => {
|
|
349
|
+
i(e && t ? "loading" : "idle");
|
|
350
|
+
}, [e, t]), U(() => {
|
|
351
|
+
let r = n.current;
|
|
352
|
+
if (!r || !e || !t) return;
|
|
353
|
+
let a = () => i("loaded"), o = () => i("error");
|
|
354
|
+
return r.addEventListener("load", a), r.addEventListener("error", o), r.complete && i(r.naturalWidth > 0 ? "loaded" : "error"), () => {
|
|
355
|
+
r.removeEventListener("load", a), r.removeEventListener("error", o);
|
|
356
|
+
};
|
|
357
|
+
}, [e, t]), {
|
|
358
|
+
imageRef: n,
|
|
359
|
+
imageLoadStatus: r
|
|
360
|
+
};
|
|
361
|
+
}, Ye = ({ attachment: e, onExpand: n, onClick: r, labels: i, onRemove: a, cssVars: o, onDownload: s, styles: l, isSelected: u }) => {
|
|
362
|
+
let { clickLabel: d = "Open attachment", expandLabel: m = "Expand pasted text", removeLabel: h = "Remove attachment", downloadLabel: g = "Download attachment" } = i ?? {}, { className: y } = l ?? {}, { id: b, name: x } = e, S = e.previewUrl ?? e.url, C = e.type === t.Pasted && n !== void 0, { isLoading: w, isError: T, isImage: E } = W(() => Re(e), [e]), D = r !== void 0 && !C && !w && !T, O = C || D, { imageRef: k, imageLoadStatus: A } = Je({
|
|
363
|
+
enabled: E,
|
|
364
|
+
src: S
|
|
365
|
+
}), j = () => {
|
|
366
|
+
C && n ? n(b) : D && r && r(b);
|
|
367
|
+
}, M = O ? {
|
|
368
|
+
role: "button",
|
|
369
|
+
tabIndex: 0,
|
|
370
|
+
"aria-label": C ? m : d,
|
|
371
|
+
onClick: j,
|
|
372
|
+
onKeyDown: (e) => {
|
|
373
|
+
e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), j());
|
|
374
|
+
}
|
|
375
|
+
} : {};
|
|
376
|
+
return /* @__PURE__ */ K("div", {
|
|
377
|
+
className: c(ze, "group/attachment-tile", O && "cursor-pointer", Q.tile, u && Q.selected, y, Z.tile, u && Z.tileSelected),
|
|
378
|
+
...M,
|
|
379
|
+
style: o,
|
|
380
|
+
children: /* @__PURE__ */ q("div", {
|
|
381
|
+
className: "relative h-full w-full overflow-hidden",
|
|
382
|
+
children: [
|
|
383
|
+
/* @__PURE__ */ q("div", {
|
|
384
|
+
className: "absolute end-1 top-1 z-10 flex gap-1",
|
|
385
|
+
children: [a && /* @__PURE__ */ K(We, {
|
|
386
|
+
ariaLabel: h,
|
|
387
|
+
onClick: a,
|
|
388
|
+
id: b,
|
|
389
|
+
className: Q.imageActionButton
|
|
390
|
+
}), s && /* @__PURE__ */ K(He, {
|
|
391
|
+
ariaLabel: g,
|
|
392
|
+
onClick: s,
|
|
393
|
+
id: b,
|
|
394
|
+
className: Q.imageActionButton
|
|
395
|
+
})]
|
|
396
|
+
}),
|
|
397
|
+
A !== qe.Loaded && /* @__PURE__ */ K(_, {
|
|
398
|
+
variant: v.Rectangular,
|
|
399
|
+
width: "100%",
|
|
400
|
+
height: "100%",
|
|
401
|
+
active: A === qe.Loading,
|
|
402
|
+
overlay: /* @__PURE__ */ K(V, {
|
|
403
|
+
size: f.LG,
|
|
404
|
+
className: Q.typeText,
|
|
405
|
+
"aria-hidden": !0,
|
|
406
|
+
stroke: p
|
|
407
|
+
}),
|
|
408
|
+
className: "absolute inset-0 rounded-xl"
|
|
409
|
+
}),
|
|
410
|
+
/* @__PURE__ */ K("img", {
|
|
411
|
+
ref: k,
|
|
412
|
+
src: S,
|
|
413
|
+
alt: x,
|
|
414
|
+
loading: "lazy",
|
|
415
|
+
decoding: "async",
|
|
416
|
+
className: c("h-full w-full rounded-xl object-cover transition-opacity duration-200", A === qe.Loaded ? "opacity-100" : "opacity-0")
|
|
417
|
+
})
|
|
418
|
+
]
|
|
419
|
+
})
|
|
420
|
+
});
|
|
421
|
+
}, Xe = ({ attachment: e, searchQuery: n = "", onRemove: r, onRetry: i, onExpand: a, onClick: o, onDownload: c, labels: l, styles: u, isSelected: d }) => {
|
|
422
|
+
let { colors: f } = u ?? {}, p = e.type === t.Pasted && a !== void 0, m = s({
|
|
423
|
+
"--ai-tile-bg": f?.background,
|
|
424
|
+
"--ai-tile-border": f?.border,
|
|
425
|
+
"--ai-tile-bg-hover": f?.backgroundHover,
|
|
426
|
+
"--ai-tile-border-hover": f?.borderHover,
|
|
427
|
+
"--ai-tile-bg-selected": f?.backgroundSelected,
|
|
428
|
+
"--ai-tile-border-selected": f?.borderSelected,
|
|
429
|
+
"--ai-tile-focus-outline": f?.focusOutline,
|
|
430
|
+
"--ai-tile-bg-error": f?.backgroundError,
|
|
431
|
+
"--ai-tile-border-error": f?.borderError,
|
|
432
|
+
"--ai-tile-error-text": f?.errorText,
|
|
433
|
+
"--ai-tile-name-text": f?.nameText,
|
|
434
|
+
"--ai-tile-type-text": f?.typeText,
|
|
435
|
+
"--ai-tile-hover-icon-bg": f?.hoverIconBackground,
|
|
436
|
+
"--ai-tile-hover-icon-color": f?.hoverIconColor,
|
|
437
|
+
"--ai-tile-progress-track": f?.trackBackground
|
|
438
|
+
}), { isImage: h, isLink: g } = W(() => Re(e), [e]);
|
|
439
|
+
return h ? /* @__PURE__ */ K(Ye, {
|
|
440
|
+
attachment: e,
|
|
441
|
+
labels: l,
|
|
442
|
+
onClick: o,
|
|
443
|
+
onExpand: a,
|
|
444
|
+
styles: u,
|
|
445
|
+
onRemove: r,
|
|
446
|
+
cssVars: m,
|
|
447
|
+
onDownload: c,
|
|
448
|
+
isSelected: d
|
|
449
|
+
}) : /* @__PURE__ */ K(Ke, {
|
|
450
|
+
attachment: e,
|
|
451
|
+
searchQuery: n,
|
|
452
|
+
onClick: o,
|
|
453
|
+
onRetry: i,
|
|
454
|
+
onRemove: r,
|
|
455
|
+
onDownload: c,
|
|
456
|
+
isLink: g,
|
|
457
|
+
styles: u,
|
|
458
|
+
labels: l,
|
|
459
|
+
onExpand: a,
|
|
460
|
+
cssVars: m,
|
|
461
|
+
isExpandable: p,
|
|
462
|
+
isSelected: d
|
|
135
463
|
});
|
|
136
|
-
},
|
|
137
|
-
let
|
|
138
|
-
|
|
139
|
-
|
|
464
|
+
}, Ze = (e) => {
|
|
465
|
+
let t = l(e);
|
|
466
|
+
if (!e?.length) return t;
|
|
467
|
+
let n = /* @__PURE__ */ new Map();
|
|
468
|
+
for (let t of e) {
|
|
469
|
+
let e = t.url ?? t.data ?? t.title;
|
|
470
|
+
n.has(e) || n.set(e, t.type);
|
|
471
|
+
}
|
|
472
|
+
return t.map((e) => {
|
|
473
|
+
let t = n.get(e.id);
|
|
474
|
+
return t ? {
|
|
475
|
+
...e,
|
|
476
|
+
contentType: t
|
|
477
|
+
} : e;
|
|
478
|
+
});
|
|
479
|
+
}, Qe = ({ children: e, codeClassName: t, blockClassName: n = "dial-code-text", copyAriaLabel: i, copiedLabel: a }) => /* @__PURE__ */ K(r, {
|
|
480
|
+
language: t?.replace(/^language-/, "") ?? "",
|
|
481
|
+
value: typeof e == "string" ? e : String(e ?? ""),
|
|
482
|
+
codeClassName: n,
|
|
483
|
+
containerClassName: c(X.codeBlock, n),
|
|
484
|
+
copyLabel: i,
|
|
485
|
+
copiedLabel: a,
|
|
486
|
+
hideDownload: !0
|
|
487
|
+
}), $e = me(({ content: e, typography: t, copyAriaLabel: n = "Copy", copiedLabel: r, tableScrollRegionAriaLabel: a, mathScrollRegionAriaLabel: o }) => {
|
|
488
|
+
let s = "mb-1.5 last:mb-0", l = c(t?.headingClassName ?? "dial-small-semi-text", X.stageContent, s);
|
|
489
|
+
return /* @__PURE__ */ K(i, {
|
|
490
|
+
content: e,
|
|
491
|
+
tableScrollRegionAriaLabel: a,
|
|
492
|
+
mathScrollRegionAriaLabel: o,
|
|
140
493
|
classNames: {
|
|
141
|
-
h1:
|
|
142
|
-
h2:
|
|
143
|
-
h3:
|
|
144
|
-
h4:
|
|
145
|
-
h5:
|
|
146
|
-
h6:
|
|
147
|
-
p:
|
|
148
|
-
ul:
|
|
149
|
-
ol:
|
|
150
|
-
strong:
|
|
151
|
-
codeInline:
|
|
152
|
-
blockquote:
|
|
153
|
-
link:
|
|
154
|
-
tableCell:
|
|
494
|
+
h1: l,
|
|
495
|
+
h2: l,
|
|
496
|
+
h3: l,
|
|
497
|
+
h4: l,
|
|
498
|
+
h5: l,
|
|
499
|
+
h6: l,
|
|
500
|
+
p: c(t?.contentClassName ?? "dial-tiny-text", X.stageContent, "mb-1.5"),
|
|
501
|
+
ul: c(t?.contentClassName ?? "dial-tiny-text", X.stageContent, s),
|
|
502
|
+
ol: c(t?.contentClassName ?? "dial-tiny-text", X.stageContent, s),
|
|
503
|
+
strong: c(t?.strongClassName ?? t?.contentClassName ?? "dial-tiny-text", X.stageContent),
|
|
504
|
+
codeInline: X.codeInline,
|
|
505
|
+
blockquote: c(t?.contentClassName ?? "dial-tiny-text", X.blockquote, s),
|
|
506
|
+
link: c(t?.contentClassName ?? "dial-tiny-text", X.stageContent),
|
|
507
|
+
tableCell: c(t?.contentClassName ?? "dial-tiny-text", X.tableCell)
|
|
155
508
|
},
|
|
156
|
-
components: { code: ({ children: e, className:
|
|
157
|
-
codeClassName:
|
|
158
|
-
blockClassName:
|
|
159
|
-
copyAriaLabel:
|
|
509
|
+
components: { code: ({ children: e, className: i }) => i?.includes("language-") ? /* @__PURE__ */ K(Qe, {
|
|
510
|
+
codeClassName: i,
|
|
511
|
+
blockClassName: t?.codeBlockClassName,
|
|
512
|
+
copyAriaLabel: n,
|
|
513
|
+
copiedLabel: r,
|
|
160
514
|
children: e
|
|
161
|
-
}) : /* @__PURE__ */
|
|
162
|
-
className:
|
|
515
|
+
}) : /* @__PURE__ */ K("code", {
|
|
516
|
+
className: c("px-1 py-0.5", t?.codeClassName ?? "dial-tiny-text rounded-md", X.codeInline),
|
|
163
517
|
children: e
|
|
164
518
|
}) }
|
|
165
519
|
});
|
|
166
|
-
}),
|
|
167
|
-
let
|
|
168
|
-
|
|
520
|
+
}), et = ({ attachments: e, clickLabel: t, onAttachmentClick: n }) => {
|
|
521
|
+
let r = H((t) => {
|
|
522
|
+
let r = e.find((e) => e.id === t);
|
|
523
|
+
r && n?.(r);
|
|
524
|
+
}, [e, n]);
|
|
525
|
+
return /* @__PURE__ */ K("div", {
|
|
526
|
+
role: "list",
|
|
527
|
+
className: "flex flex-wrap gap-3",
|
|
528
|
+
children: e.map((e) => /* @__PURE__ */ K("div", {
|
|
529
|
+
role: "listitem",
|
|
530
|
+
children: /* @__PURE__ */ K(Xe, {
|
|
531
|
+
attachment: e,
|
|
532
|
+
onClick: n && r,
|
|
533
|
+
labels: { clickLabel: t }
|
|
534
|
+
})
|
|
535
|
+
}, e.id))
|
|
536
|
+
});
|
|
537
|
+
}, tt = ({ stage: e, isLive: t, typography: n, labels: r, nameOverride: i, onAttachmentClick: a, childList: s, isExpanded: l, onToggle: u }) => {
|
|
538
|
+
let [f, p] = G(!1), m = l ?? f, g = H((e) => {
|
|
539
|
+
l === void 0 && p(e), u?.(e);
|
|
540
|
+
}, [l, u]), { copyAriaLabel: _ = "Copy stage content", codeBlockCopiedLabel: v, tableScrollRegionAriaLabel: y, mathScrollRegionAriaLabel: b, runningAriaLabel: x, failedAriaLabel: S, attachmentClickLabel: C = "Preview search result" } = r ?? {}, w = W(() => Ze(e.attachments), [e.attachments]), { name: T, durationLabel: E } = Y(e.name), D = i ?? T, O = !i && Ce(T), k = e.status === o.Failed, A = !!e.content || !!e.attachments?.length, j = A || s != null, M = /* @__PURE__ */ q(_e, { children: [
|
|
541
|
+
/* @__PURE__ */ K("span", {
|
|
169
542
|
className: "flex flex-none items-center",
|
|
170
|
-
children: /* @__PURE__ */
|
|
543
|
+
children: /* @__PURE__ */ K(Me, {
|
|
171
544
|
status: e.status,
|
|
172
|
-
isLive:
|
|
173
|
-
runningLabel:
|
|
174
|
-
failedLabel:
|
|
545
|
+
isLive: t,
|
|
546
|
+
runningLabel: x,
|
|
547
|
+
failedLabel: S
|
|
175
548
|
})
|
|
176
549
|
}),
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
className:
|
|
179
|
-
children: /* @__PURE__ */
|
|
550
|
+
/* @__PURE__ */ K("span", {
|
|
551
|
+
className: c("min-w-0 max-w-[22rem] truncate", n?.fontClassName ?? "dial-small-text", X.stageName, k && X.stageNameFailed, O && X.monoName),
|
|
552
|
+
children: /* @__PURE__ */ K(h, { text: D || e.status || "" })
|
|
180
553
|
}),
|
|
181
|
-
e.tag && /* @__PURE__ */
|
|
182
|
-
className:
|
|
554
|
+
e.tag && /* @__PURE__ */ K("span", {
|
|
555
|
+
className: c("flex-none", n?.tagClassName ?? "dial-tiny-lead-text", X.tag),
|
|
183
556
|
children: e.tag
|
|
184
557
|
}),
|
|
185
|
-
|
|
186
|
-
className:
|
|
187
|
-
children:
|
|
188
|
-
}),
|
|
189
|
-
E && /* @__PURE__ */ C("span", {
|
|
190
|
-
className: i("flex-none", H.iconSecondary),
|
|
191
|
-
children: u ? /* @__PURE__ */ C(m, {
|
|
192
|
-
size: a.SM,
|
|
193
|
-
"aria-hidden": !0,
|
|
194
|
-
stroke: o
|
|
195
|
-
}) : /* @__PURE__ */ C(h, {
|
|
196
|
-
size: a.SM,
|
|
197
|
-
className: "rtl:scale-x-[-1]",
|
|
198
|
-
"aria-hidden": !0,
|
|
199
|
-
stroke: o
|
|
200
|
-
})
|
|
558
|
+
E && /* @__PURE__ */ K("span", {
|
|
559
|
+
className: c("flex-none", n?.countFontClassName ?? "dial-tiny-text", X.duration),
|
|
560
|
+
children: E
|
|
201
561
|
})
|
|
202
|
-
] })
|
|
203
|
-
return
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
})
|
|
562
|
+
] });
|
|
563
|
+
return j ? /* @__PURE__ */ q(d, {
|
|
564
|
+
expanded: m,
|
|
565
|
+
onToggle: g,
|
|
566
|
+
title: /* @__PURE__ */ K("span", {
|
|
567
|
+
className: "flex min-w-0 items-center gap-2",
|
|
568
|
+
children: M
|
|
569
|
+
}),
|
|
570
|
+
className: ke,
|
|
571
|
+
headerClassName: c(Ae, X.row, X.stageHeader),
|
|
572
|
+
contentClassName: c("-mt-1 flex min-w-0 flex-col gap-3 px-0 py-1", X.stageRegion),
|
|
573
|
+
children: [m && A && /* @__PURE__ */ q("div", {
|
|
574
|
+
className: "flex min-w-0 flex-col gap-3 ps-8",
|
|
575
|
+
children: [e.content && /* @__PURE__ */ K("div", {
|
|
576
|
+
className: "max-h-[300px] min-w-0 overflow-y-auto",
|
|
577
|
+
children: /* @__PURE__ */ K($e, {
|
|
578
|
+
content: e.content,
|
|
579
|
+
typography: n,
|
|
580
|
+
copyAriaLabel: _,
|
|
581
|
+
copiedLabel: v,
|
|
582
|
+
tableScrollRegionAriaLabel: y,
|
|
583
|
+
mathScrollRegionAriaLabel: b
|
|
225
584
|
})
|
|
226
|
-
})
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
585
|
+
}), w.length > 0 && /* @__PURE__ */ K(et, {
|
|
586
|
+
attachments: w,
|
|
587
|
+
clickLabel: C,
|
|
588
|
+
onAttachmentClick: a
|
|
589
|
+
})]
|
|
590
|
+
}), m && s]
|
|
591
|
+
}) : /* @__PURE__ */ K("div", {
|
|
592
|
+
className: c("flex w-full items-center gap-2 px-2 py-1.5", X.row),
|
|
593
|
+
children: M
|
|
231
594
|
});
|
|
232
|
-
},
|
|
233
|
-
let
|
|
234
|
-
return /* @__PURE__ */
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
className: "rtl:scale-x-[-1]",
|
|
270
|
-
"aria-hidden": !0,
|
|
271
|
-
stroke: o
|
|
272
|
-
})
|
|
273
|
-
})
|
|
274
|
-
]
|
|
275
|
-
}), /* @__PURE__ */ C("div", {
|
|
276
|
-
className: i("grid overflow-hidden transition-[grid-template-rows] duration-[250ms] ease-in-out", f ? "grid-rows-[1fr]" : "grid-rows-[0fr]"),
|
|
277
|
-
children: /* @__PURE__ */ C("div", {
|
|
278
|
-
className: "overflow-hidden",
|
|
279
|
-
children: /* @__PURE__ */ C("ul", {
|
|
280
|
-
role: "list",
|
|
281
|
-
className: "mt-1 flex flex-col gap-0.5 ps-6",
|
|
282
|
-
children: e.attempts?.map((e, t) => /* @__PURE__ */ C("li", {
|
|
283
|
-
role: "listitem",
|
|
284
|
-
children: /* @__PURE__ */ C(K, {
|
|
285
|
-
stage: e,
|
|
286
|
-
nameOverride: d(t + 1),
|
|
287
|
-
isLive: n && e.status == null,
|
|
288
|
-
typography: r,
|
|
289
|
-
labels: s
|
|
595
|
+
}, nt = (e) => e <= 3 ? "ps-4" : "ps-0", rt = (e) => e <= 3 ? "ps-6" : "ps-0", it = ({ node: e, depth: t, nameOverride: n, isStreaming: r, expansion: i, typography: a, labels: o, onAttachmentClick: s }) => {
|
|
596
|
+
let c = De(e.stage.index), l = t + 1;
|
|
597
|
+
return /* @__PURE__ */ K(tt, {
|
|
598
|
+
stage: e.stage,
|
|
599
|
+
nameOverride: n,
|
|
600
|
+
isLive: r && e.stage.status == null,
|
|
601
|
+
typography: a,
|
|
602
|
+
labels: o,
|
|
603
|
+
onAttachmentClick: s,
|
|
604
|
+
isExpanded: i.isExpanded(c),
|
|
605
|
+
onToggle: (e) => i.onToggle(c, e),
|
|
606
|
+
childList: e.children.length > 0 ? /* @__PURE__ */ K(ot, {
|
|
607
|
+
nodes: e.children,
|
|
608
|
+
depth: l,
|
|
609
|
+
className: nt(l),
|
|
610
|
+
isStreaming: r,
|
|
611
|
+
expansion: i,
|
|
612
|
+
typography: a,
|
|
613
|
+
labels: o,
|
|
614
|
+
onAttachmentClick: s
|
|
615
|
+
}) : void 0
|
|
616
|
+
});
|
|
617
|
+
}, at = ({ row: e, depth: t, isStreaming: n, expansion: r, typography: i, labels: a, onAttachmentClick: s }) => {
|
|
618
|
+
let { runningAriaLabel: l, failedAriaLabel: u, attemptLabel: f = (e) => `Attempt ${e}` } = a ?? {}, p = e.attempts ?? [], m = p.some((e) => e.stage.status == null), g = p.some((e) => e.stage.status === o.Failed), _ = o.Completed;
|
|
619
|
+
m ? _ = null : g && (_ = o.Failed);
|
|
620
|
+
let v = Oe(e.key), y = r.isExpanded(v), b = t + 1;
|
|
621
|
+
return /* @__PURE__ */ K(d, {
|
|
622
|
+
title: /* @__PURE__ */ q("span", {
|
|
623
|
+
className: "flex min-w-0 items-center gap-2",
|
|
624
|
+
children: [
|
|
625
|
+
/* @__PURE__ */ K("span", {
|
|
626
|
+
className: "flex flex-none items-center",
|
|
627
|
+
children: /* @__PURE__ */ K(Me, {
|
|
628
|
+
status: _,
|
|
629
|
+
isLive: n && m,
|
|
630
|
+
runningLabel: l,
|
|
631
|
+
failedLabel: u
|
|
290
632
|
})
|
|
291
|
-
},
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
},
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
"--cs-button-bg": s?.collapsedButtonBg,
|
|
300
|
-
"--cs-stage-text": s?.stageTextColor,
|
|
301
|
-
"--cs-failed-text": s?.failedColor,
|
|
302
|
-
"--cs-tag-text": s?.tagTextColor,
|
|
303
|
-
"--cs-count-text": s?.countTextColor,
|
|
304
|
-
"--cs-duration-text": s?.durationTextColor,
|
|
305
|
-
"--cs-icon-secondary": s?.iconSecondaryColor,
|
|
306
|
-
"--cs-icon-completed": s?.iconCompletedColor,
|
|
307
|
-
"--cs-icon-error": s?.iconErrorColor,
|
|
308
|
-
"--cs-code-bg": s?.codeBg,
|
|
309
|
-
"--cs-code-border": s?.codeBorderColor,
|
|
310
|
-
"--cs-code-text": s?.codeTextColor,
|
|
311
|
-
"--cs-border": s?.borderColor
|
|
312
|
-
}), u = V(e);
|
|
313
|
-
return /* @__PURE__ */ C("div", {
|
|
314
|
-
style: l,
|
|
315
|
-
className: i("w-full", H.panel, r, T.panel),
|
|
316
|
-
children: /* @__PURE__ */ C("ul", {
|
|
317
|
-
role: "list",
|
|
318
|
-
className: "flex w-full flex-col gap-0.5 ps-5",
|
|
319
|
-
children: u.map((e) => e.stage ? /* @__PURE__ */ C("li", {
|
|
320
|
-
role: "listitem",
|
|
321
|
-
children: /* @__PURE__ */ C(K, {
|
|
322
|
-
stage: e.stage,
|
|
323
|
-
isLive: t && e.stage.status == null,
|
|
324
|
-
typography: c,
|
|
325
|
-
labels: o
|
|
633
|
+
}),
|
|
634
|
+
/* @__PURE__ */ K("span", {
|
|
635
|
+
className: c("min-w-0 max-w-[22rem] truncate", i?.fontClassName ?? "dial-small-text", X.stageName, g && X.stageNameFailed),
|
|
636
|
+
children: /* @__PURE__ */ K(h, { text: e.name })
|
|
637
|
+
}),
|
|
638
|
+
/* @__PURE__ */ q("span", {
|
|
639
|
+
className: c("flex-none", i?.countFontClassName ?? "dial-tiny-text", X.count),
|
|
640
|
+
children: ["×", p.length]
|
|
326
641
|
})
|
|
327
|
-
|
|
642
|
+
]
|
|
643
|
+
}),
|
|
644
|
+
expanded: y,
|
|
645
|
+
onToggle: (e) => r.onToggle(v, e),
|
|
646
|
+
className: ke,
|
|
647
|
+
headerClassName: c(Ae, X.collapseButton, X.row, X.stageHeader),
|
|
648
|
+
contentClassName: c("-mt-2 min-w-0 px-0", rt(b), X.stageRegion),
|
|
649
|
+
children: /* @__PURE__ */ K("ul", {
|
|
650
|
+
role: "list",
|
|
651
|
+
className: "flex min-w-0 flex-col gap-0.5",
|
|
652
|
+
children: y && p.map((e, t) => /* @__PURE__ */ K("li", {
|
|
328
653
|
role: "listitem",
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
654
|
+
className: "min-w-0",
|
|
655
|
+
children: /* @__PURE__ */ K(it, {
|
|
656
|
+
node: e,
|
|
657
|
+
depth: b,
|
|
658
|
+
nameOverride: f(t + 1),
|
|
659
|
+
isStreaming: n,
|
|
660
|
+
expansion: r,
|
|
661
|
+
typography: i,
|
|
662
|
+
labels: a,
|
|
663
|
+
onAttachmentClick: s
|
|
334
664
|
})
|
|
335
|
-
}, e.
|
|
665
|
+
}, e.stage.index))
|
|
336
666
|
})
|
|
337
667
|
});
|
|
338
|
-
},
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
"--cs-text":
|
|
357
|
-
"--cs-row-hover":
|
|
358
|
-
"--cs-button-bg":
|
|
359
|
-
"--cs-stage-text":
|
|
360
|
-
"--cs-failed-text":
|
|
361
|
-
"--cs-tag-text":
|
|
362
|
-
"--cs-count-text":
|
|
363
|
-
"--cs-duration-text":
|
|
364
|
-
"--cs-icon-secondary":
|
|
365
|
-
"--cs-icon-completed":
|
|
366
|
-
"--cs-icon-error":
|
|
367
|
-
"--cs-code-bg":
|
|
368
|
-
"--cs-code-border":
|
|
369
|
-
"--cs-code-text":
|
|
370
|
-
"--cs-border":
|
|
668
|
+
}, ot = ({ nodes: e, depth: t, className: n, ...r }) => /* @__PURE__ */ K("ul", {
|
|
669
|
+
role: "list",
|
|
670
|
+
className: c("flex min-w-0 flex-col gap-0.5", n),
|
|
671
|
+
children: je(e).map((e) => /* @__PURE__ */ K("li", {
|
|
672
|
+
role: "listitem",
|
|
673
|
+
className: "min-w-0",
|
|
674
|
+
children: e.node ? /* @__PURE__ */ K(it, {
|
|
675
|
+
node: e.node,
|
|
676
|
+
depth: t,
|
|
677
|
+
...r
|
|
678
|
+
}) : /* @__PURE__ */ K(at, {
|
|
679
|
+
row: e,
|
|
680
|
+
depth: t,
|
|
681
|
+
...r
|
|
682
|
+
})
|
|
683
|
+
}, e.key))
|
|
684
|
+
}), st = ({ stages: e, isStreaming: t, className: n, styles: r, labels: i, onAttachmentClick: a, expansion: o }) => {
|
|
685
|
+
let { colors: l, typography: u } = r ?? {}, d = s({
|
|
686
|
+
"--cs-text": l?.text,
|
|
687
|
+
"--cs-row-hover": l?.rowHoverColor,
|
|
688
|
+
"--cs-button-bg": l?.collapsedButtonBg,
|
|
689
|
+
"--cs-stage-text": l?.stageTextColor,
|
|
690
|
+
"--cs-failed-text": l?.failedColor,
|
|
691
|
+
"--cs-tag-text": l?.tagTextColor,
|
|
692
|
+
"--cs-count-text": l?.countTextColor,
|
|
693
|
+
"--cs-duration-text": l?.durationTextColor,
|
|
694
|
+
"--cs-icon-secondary": l?.iconSecondaryColor,
|
|
695
|
+
"--cs-icon-completed": l?.iconCompletedColor,
|
|
696
|
+
"--cs-icon-error": l?.iconErrorColor,
|
|
697
|
+
"--cs-code-bg": l?.codeBg,
|
|
698
|
+
"--cs-code-border": l?.codeBorderColor,
|
|
699
|
+
"--cs-code-text": l?.codeTextColor,
|
|
700
|
+
"--cs-border": l?.borderColor
|
|
701
|
+
}), f = W(() => Ee(e), [e]);
|
|
702
|
+
return /* @__PURE__ */ K("div", {
|
|
703
|
+
style: d,
|
|
704
|
+
className: c("w-full min-w-0", X.panel, n, J.panel),
|
|
705
|
+
children: /* @__PURE__ */ K(ot, {
|
|
706
|
+
nodes: f,
|
|
707
|
+
depth: 0,
|
|
708
|
+
className: "w-full ps-5",
|
|
709
|
+
isStreaming: t,
|
|
710
|
+
expansion: o,
|
|
711
|
+
typography: u,
|
|
712
|
+
labels: i,
|
|
713
|
+
onAttachmentClick: a
|
|
714
|
+
})
|
|
715
|
+
});
|
|
716
|
+
}, ct = (e) => {
|
|
717
|
+
let t = ve();
|
|
718
|
+
return /* @__PURE__ */ K(st, {
|
|
719
|
+
...e,
|
|
720
|
+
expansion: t
|
|
721
|
+
});
|
|
722
|
+
}, $ = {
|
|
723
|
+
toggleButton: "_toggleButton_16fae_7",
|
|
724
|
+
groupRegion: "_groupRegion_16fae_28",
|
|
725
|
+
executedLabel: "_executedLabel_16fae_32",
|
|
726
|
+
doneIcon: "_doneIcon_16fae_36",
|
|
727
|
+
failedText: "_failedText_16fae_40",
|
|
728
|
+
liveName: "_liveName_16fae_44"
|
|
729
|
+
}, lt = ({ stages: e, isStreaming: t, labels: n, className: r, styles: i, onAttachmentClick: a }) => {
|
|
730
|
+
let { executedLabel: l = "Executed", stepsLabel: u = () => "steps", failedCountLabel: m = (e) => `${e} failed`, runningAriaLabel: g = "Running", copyAriaLabel: _, codeBlockCopiedLabel: v, tableScrollRegionAriaLabel: b, mathScrollRegionAriaLabel: x, failedAriaLabel: C, attemptLabel: w, attachmentClickLabel: T } = n ?? {}, [E, D] = G(t), O = ve(), { reset: k } = O, A = e.length > 1;
|
|
731
|
+
U(() => {
|
|
732
|
+
A && !E && k();
|
|
733
|
+
}, [
|
|
734
|
+
A,
|
|
735
|
+
E,
|
|
736
|
+
k
|
|
737
|
+
]);
|
|
738
|
+
let j = ge(t);
|
|
739
|
+
U(() => {
|
|
740
|
+
j.current && !t && D(!1), j.current = t;
|
|
741
|
+
}, [t]);
|
|
742
|
+
let { colors: M, panel: N } = i ?? {}, P = i?.typography ?? { fontClassName: "dial-small-text" }, F = s({
|
|
743
|
+
"--cs-cg-label": M?.labelColor,
|
|
744
|
+
"--cs-cg-label-hover": M?.labelHoverColor,
|
|
745
|
+
"--cs-cg-done": M?.doneColor,
|
|
746
|
+
"--cs-cg-failed": M?.failedColor,
|
|
747
|
+
"--cs-text": N?.text,
|
|
748
|
+
"--cs-row-hover": N?.rowHoverColor,
|
|
749
|
+
"--cs-button-bg": N?.collapsedButtonBg,
|
|
750
|
+
"--cs-stage-text": N?.stageTextColor,
|
|
751
|
+
"--cs-failed-text": N?.failedColor,
|
|
752
|
+
"--cs-tag-text": N?.tagTextColor,
|
|
753
|
+
"--cs-count-text": N?.countTextColor,
|
|
754
|
+
"--cs-duration-text": N?.durationTextColor,
|
|
755
|
+
"--cs-icon-secondary": N?.iconSecondaryColor,
|
|
756
|
+
"--cs-icon-completed": N?.iconCompletedColor,
|
|
757
|
+
"--cs-icon-error": N?.iconErrorColor,
|
|
758
|
+
"--cs-code-bg": N?.codeBg,
|
|
759
|
+
"--cs-code-border": N?.codeBorderColor,
|
|
760
|
+
"--cs-code-text": N?.codeTextColor,
|
|
761
|
+
"--cs-border": N?.borderColor
|
|
371
762
|
});
|
|
372
763
|
if (e.length === 0) return null;
|
|
373
|
-
let
|
|
374
|
-
copyAriaLabel:
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
764
|
+
let I = {
|
|
765
|
+
copyAriaLabel: _,
|
|
766
|
+
codeBlockCopiedLabel: v,
|
|
767
|
+
tableScrollRegionAriaLabel: b,
|
|
768
|
+
mathScrollRegionAriaLabel: x,
|
|
769
|
+
runningAriaLabel: g,
|
|
770
|
+
failedAriaLabel: C,
|
|
771
|
+
attemptLabel: w,
|
|
772
|
+
attachmentClickLabel: T
|
|
378
773
|
};
|
|
379
|
-
if (e.length === 1) return /* @__PURE__ */
|
|
774
|
+
if (e.length === 1) return /* @__PURE__ */ K(st, {
|
|
380
775
|
stages: e,
|
|
381
|
-
isStreaming:
|
|
382
|
-
|
|
776
|
+
isStreaming: t,
|
|
777
|
+
expansion: O,
|
|
778
|
+
className: r,
|
|
383
779
|
styles: {
|
|
384
|
-
colors:
|
|
385
|
-
typography:
|
|
780
|
+
colors: N,
|
|
781
|
+
typography: i?.typography
|
|
386
782
|
},
|
|
387
|
-
labels:
|
|
783
|
+
labels: I,
|
|
784
|
+
onAttachmentClick: a
|
|
388
785
|
});
|
|
389
|
-
let
|
|
390
|
-
if (
|
|
391
|
-
let t =
|
|
392
|
-
|
|
786
|
+
let L = e.some((e) => e.status === o.Failed), R;
|
|
787
|
+
if (t) {
|
|
788
|
+
let t = Y((we(e) ?? e[e.length - 1]).name).name;
|
|
789
|
+
R = /* @__PURE__ */ q("span", {
|
|
393
790
|
role: "status",
|
|
394
791
|
"aria-live": "polite",
|
|
395
792
|
className: "flex min-w-0 items-center gap-2",
|
|
396
|
-
children: [
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
ariaLabel: E
|
|
402
|
-
})
|
|
403
|
-
}),
|
|
404
|
-
/* @__PURE__ */ C("span", {
|
|
405
|
-
className: i("flex-none whitespace-nowrap", L.fontClassName, Y.liveName),
|
|
406
|
-
children: S(t, e.length)
|
|
407
|
-
}),
|
|
408
|
-
n && /* @__PURE__ */ C("span", {
|
|
409
|
-
className: i("min-w-0 max-w-[22rem] truncate", L.fontClassName, Y.executedLabel),
|
|
410
|
-
children: /* @__PURE__ */ C(c, { text: n })
|
|
793
|
+
children: [/* @__PURE__ */ K("span", {
|
|
794
|
+
className: "flex flex-none items-center",
|
|
795
|
+
children: /* @__PURE__ */ K(y, {
|
|
796
|
+
size: 14,
|
|
797
|
+
ariaLabel: g
|
|
411
798
|
})
|
|
412
|
-
|
|
799
|
+
}), t && /* @__PURE__ */ K("span", {
|
|
800
|
+
className: c("min-w-0 max-w-[22rem] truncate", P.fontClassName, $.liveName),
|
|
801
|
+
children: /* @__PURE__ */ K(h, { text: t })
|
|
802
|
+
})]
|
|
413
803
|
});
|
|
414
|
-
} else if (
|
|
415
|
-
let
|
|
416
|
-
|
|
804
|
+
} else if (L) {
|
|
805
|
+
let t = e.filter((e) => e.status === o.Failed).length;
|
|
806
|
+
R = /* @__PURE__ */ q("span", {
|
|
417
807
|
className: "inline-flex items-center gap-1",
|
|
418
|
-
children: [
|
|
419
|
-
|
|
420
|
-
className: i(L.fontClassName, Y.executedLabel),
|
|
421
|
-
children: [
|
|
422
|
-
g,
|
|
423
|
-
" ",
|
|
424
|
-
e.length,
|
|
425
|
-
" ",
|
|
426
|
-
_(e.length)
|
|
427
|
-
]
|
|
428
|
-
}),
|
|
429
|
-
/* @__PURE__ */ C("span", {
|
|
430
|
-
className: i(L.fontClassName, Y.failedText),
|
|
431
|
-
children: v(n)
|
|
432
|
-
}),
|
|
433
|
-
G && /* @__PURE__ */ C("span", {
|
|
434
|
-
className: i(L.fontClassName, Y.stepsCount),
|
|
435
|
-
children: G
|
|
436
|
-
})
|
|
437
|
-
]
|
|
438
|
-
});
|
|
439
|
-
} else q = /* @__PURE__ */ w("span", {
|
|
440
|
-
className: "inline-flex items-center gap-1",
|
|
441
|
-
children: [
|
|
442
|
-
/* @__PURE__ */ C(p, {
|
|
443
|
-
size: a.SM,
|
|
444
|
-
className: Y.doneIcon,
|
|
445
|
-
"aria-hidden": !0,
|
|
446
|
-
stroke: o
|
|
447
|
-
}),
|
|
448
|
-
/* @__PURE__ */ w("span", {
|
|
449
|
-
className: i(L.fontClassName, Y.executedLabel),
|
|
808
|
+
children: [/* @__PURE__ */ q("span", {
|
|
809
|
+
className: c(P.fontClassName, $.executedLabel),
|
|
450
810
|
children: [
|
|
451
|
-
|
|
811
|
+
l,
|
|
452
812
|
" ",
|
|
453
813
|
e.length,
|
|
454
814
|
" ",
|
|
455
|
-
|
|
815
|
+
u(e.length)
|
|
456
816
|
]
|
|
457
|
-
}),
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
817
|
+
}), /* @__PURE__ */ K("span", {
|
|
818
|
+
className: c(P.fontClassName, $.failedText),
|
|
819
|
+
children: m(t)
|
|
820
|
+
})]
|
|
821
|
+
});
|
|
822
|
+
} else R = /* @__PURE__ */ q("span", {
|
|
823
|
+
className: "inline-flex items-center gap-1",
|
|
824
|
+
children: [/* @__PURE__ */ K(S, {
|
|
825
|
+
size: f.SM,
|
|
826
|
+
className: $.doneIcon,
|
|
827
|
+
"aria-hidden": !0,
|
|
828
|
+
stroke: p
|
|
829
|
+
}), /* @__PURE__ */ q("span", {
|
|
830
|
+
className: c(P.fontClassName, $.executedLabel),
|
|
831
|
+
children: [
|
|
832
|
+
l,
|
|
833
|
+
" ",
|
|
834
|
+
e.length,
|
|
835
|
+
" ",
|
|
836
|
+
u(e.length)
|
|
837
|
+
]
|
|
838
|
+
})]
|
|
463
839
|
});
|
|
464
|
-
return /* @__PURE__ */
|
|
465
|
-
style:
|
|
466
|
-
className:
|
|
467
|
-
children:
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
"
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
children: /* @__PURE__ */ C("div", {
|
|
486
|
-
className: "overflow-hidden",
|
|
487
|
-
children: /* @__PURE__ */ C(J, {
|
|
488
|
-
stages: e,
|
|
489
|
-
isStreaming: r,
|
|
490
|
-
styles: {
|
|
491
|
-
colors: F,
|
|
492
|
-
typography: f?.typography
|
|
493
|
-
},
|
|
494
|
-
labels: H,
|
|
495
|
-
className: "pt-1"
|
|
496
|
-
})
|
|
840
|
+
return /* @__PURE__ */ K("div", {
|
|
841
|
+
style: F,
|
|
842
|
+
className: c("flex w-full flex-col gap-1", r, J.group),
|
|
843
|
+
children: /* @__PURE__ */ K(d, {
|
|
844
|
+
title: R,
|
|
845
|
+
expanded: E,
|
|
846
|
+
onToggle: D,
|
|
847
|
+
className: "overflow-visible py-0",
|
|
848
|
+
headerClassName: c("justify-start gap-1 rounded-none px-0", $.toggleButton, J.groupToggle),
|
|
849
|
+
contentClassName: c("-mt-2 px-0", $.groupRegion),
|
|
850
|
+
children: E && /* @__PURE__ */ K(st, {
|
|
851
|
+
stages: e,
|
|
852
|
+
isStreaming: t,
|
|
853
|
+
expansion: O,
|
|
854
|
+
styles: {
|
|
855
|
+
colors: N,
|
|
856
|
+
typography: i?.typography
|
|
857
|
+
},
|
|
858
|
+
labels: I,
|
|
859
|
+
className: "pt-1",
|
|
860
|
+
onAttachmentClick: a
|
|
497
861
|
})
|
|
498
|
-
})
|
|
862
|
+
})
|
|
499
863
|
});
|
|
500
864
|
};
|
|
501
865
|
//#endregion
|
|
502
|
-
export {
|
|
866
|
+
export { J as CONVERSATION_STAGES_CLASS, lt as CollapsedGroup, ct as StagesPanel };
|