@epam/ai-dial-conversation-stages 1.2.0-dev.288 → 1.2.0-dev.300

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"CollapsedGroup.d.ts","sourceRoot":"","sources":["../../../src/components/CollapsedGroup/CollapsedGroup.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,EAAE,EAA+B,MAAM,OAAO,CAAC;AAGxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAMxE,gJAAgJ;AAChJ,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CA8MlD,CAAC"}
1
+ {"version":3,"file":"CollapsedGroup.d.ts","sourceRoot":"","sources":["../../../src/components/CollapsedGroup/CollapsedGroup.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,EAAE,EAA+B,MAAM,OAAO,CAAC;AAGxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAMxE,gJAAgJ;AAChJ,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAoNlD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"StageItem.d.ts","sourceRoot":"","sources":["../../../src/components/StageItem/StageItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAG1E,OAAO,EAAE,EAAE,EAAE,SAAS,EAAkC,MAAM,OAAO,CAAC;AAKtE,OAAO,KAAK,EACV,iBAAiB,EACjB,eAAe,EAChB,MAAM,2BAA2B,CAAC;AAOnC,mCAAmC;AACnC,MAAM,WAAW,cAAc;IAC7B,gCAAgC;IAChC,KAAK,EAAE,KAAK,CAAC;IACb,kEAAkE;IAClE,MAAM,EAAE,OAAO,CAAC;IAChB,+DAA+D;IAC/D,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,4BAA4B;IA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AAQ,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;CAC1C;AAyCD,8FAA8F;AAC9F,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAoJxC,CAAC"}
@@ -8,6 +8,8 @@ interface Props {
8
8
  blockClassName?: string;
9
9
  /** Accessible label for the copy button. */
10
10
  copyAriaLabel: string;
11
+ /** Status announced after the code has been copied. Defaults to `MarkdownCodeBlock`'s `'Copied!'`. */
12
+ copiedLabel?: string;
11
13
  }
12
14
  /** Adapts stage markdown code blocks to the shared markdown code-block UI. */
13
15
  export declare const StageCodeBlock: FC<Props>;
@@ -1 +1 @@
1
- {"version":3,"file":"StageCodeBlock.d.ts","sourceRoot":"","sources":["../../../src/components/StageMarkdownContent/StageCodeBlock.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGhD,UAAU,KAAK;IACb,6BAA6B;IAC7B,QAAQ,EAAE,SAAS,CAAC;IACpB,iEAAiE;IACjE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yFAAyF;IACzF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,4CAA4C;IAC5C,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,8EAA8E;AAC9E,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,KAAK,CAoBpC,CAAC"}
1
+ {"version":3,"file":"StageCodeBlock.d.ts","sourceRoot":"","sources":["../../../src/components/StageMarkdownContent/StageCodeBlock.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGhD,UAAU,KAAK;IACb,6BAA6B;IAC7B,QAAQ,EAAE,SAAS,CAAC;IACpB,iEAAiE;IACjE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yFAAyF;IACzF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,4CAA4C;IAC5C,aAAa,EAAE,MAAM,CAAC;IACtB,sGAAsG;IACtG,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,8EAA8E;AAC9E,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,KAAK,CAsBpC,CAAC"}
@@ -8,6 +8,12 @@ interface Props {
8
8
  typography?: StageTypography;
9
9
  /** Accessible label for the copy button inside code blocks. Defaults to `'Copy'`. */
10
10
  copyAriaLabel?: string;
11
+ /** Status announced after a code block has been copied. Defaults to `'Copied!'`. */
12
+ copiedLabel?: string;
13
+ /** Accessible label for a table's scrollable region. Defaults to `'Scrollable table'`. */
14
+ tableScrollRegionAriaLabel?: string;
15
+ /** Accessible label for a block formula's scrollable region. Defaults to `'Scrollable formula'`. */
16
+ mathScrollRegionAriaLabel?: string;
11
17
  }
12
18
  /** Renders stage content as formatted markdown, styled via CSS custom properties. */
13
19
  export declare const StageMarkdownContent: FC<Props>;
@@ -1 +1 @@
1
- {"version":3,"file":"StageMarkdownContent.d.ts","sourceRoot":"","sources":["../../../src/components/StageMarkdownContent/StageMarkdownContent.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,EAAwB,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAIjE,gGAAgG;AAChG,UAAU,KAAK;IACb,qCAAqC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,qFAAqF;IACrF,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,qFAAqF;AACrF,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,KAAK,CA8F1C,CAAC"}
1
+ {"version":3,"file":"StageMarkdownContent.d.ts","sourceRoot":"","sources":["../../../src/components/StageMarkdownContent/StageMarkdownContent.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,EAAwB,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAIjE,gGAAgG;AAChG,UAAU,KAAK;IACb,qCAAqC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,qFAAqF;IACrF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oFAAoF;IACpF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0FAA0F;IAC1F,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,oGAAoG;IACpG,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACpC;AAED,qFAAqF;AACrF,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,KAAK,CAwG1C,CAAC"}
package/index.js CHANGED
@@ -1,24 +1,24 @@
1
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
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 ee, IconFileTypePng as te, IconFileTypePpt as L, IconFileTypeRs as ne, IconFileTypeSql as re, IconFileTypeSvg as ie, IconFileTypeTs as ae, IconFileTypeTsx as R, IconFileTypeTxt as oe, IconFileTypeVue as se, IconFileTypeXls as ce, IconFileTypeXml as le, IconFileTypeZip as ue, IconMusic as de, IconPhoto as fe, IconReload as pe, IconTerminal2 as me, IconVideo as he, IconX as ge } from "@tabler/icons-react";
4
- import { memo as _e, useCallback as z, useEffect as B, useId as ve, useMemo as V, useRef as ye, useState as H } from "react";
5
- import { Fragment as U, jsx as W, jsxs as G } from "react/jsx-runtime";
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 ie, IconFileTypeTxt as B, IconFileTypeVue as ae, IconFileTypeXls as V, IconFileTypeXml as oe, IconFileTypeZip as H, IconMusic as se, IconPhoto as U, IconReload as ce, IconTerminal2 as le, IconVideo as ue, IconX as de } from "@tabler/icons-react";
4
+ import { memo as fe, useCallback as W, useEffect as G, useId as pe, useMemo as K, useRef as me, useState as q } from "react";
5
+ import { Fragment as he, jsx as J, jsxs as Y } from "react/jsx-runtime";
6
6
  //#region src/constants/public-class-names.ts
7
- var K = {
7
+ var ge = {
8
8
  panel: "dial-conversation-stages-panel",
9
9
  group: "dial-conversation-stages-group",
10
10
  groupToggle: "dial-conversation-stages-group-toggle"
11
- }, be = () => {
12
- let [e, t] = H(() => /* @__PURE__ */ new Set()), n = z((e, n) => {
11
+ }, _e = () => {
12
+ let [e, t] = q(() => /* @__PURE__ */ new Set()), n = W((e, n) => {
13
13
  t((t) => {
14
14
  if (t.has(e) === n) return t;
15
15
  let r = new Set(t);
16
16
  return n ? r.add(e) : r.delete(e), r;
17
17
  });
18
- }, []), r = z(() => {
18
+ }, []), r = W(() => {
19
19
  t((e) => e.size ? /* @__PURE__ */ new Set() : e);
20
20
  }, []);
21
- return V(() => ({
21
+ return K(() => ({
22
22
  isExpanded: (t) => e.has(t),
23
23
  onToggle: n,
24
24
  reset: r
@@ -27,30 +27,30 @@ var K = {
27
27
  n,
28
28
  r
29
29
  ]);
30
- }, xe = /[([][^()[\]]*[)\]]/g, Se = /(\d+(?:\.\d+)?)\s*s\b/, Ce = (e) => {
30
+ }, ve = /[([][^()[\]]*[)\]]/g, ye = /(\d+(?:\.\d+)?)\s*s\b/, be = (e) => {
31
31
  let t = e.trimEnd();
32
32
  return t.endsWith(":") ? t.slice(0, -1) : t;
33
- }, we = (e) => {
34
- xe.lastIndex = 0;
33
+ }, xe = (e) => {
34
+ ve.lastIndex = 0;
35
35
  let t;
36
- for (; t = xe.exec(e);) {
37
- let e = t[0].slice(1, -1), n = Se.exec(e);
36
+ for (; t = ve.exec(e);) {
37
+ let e = t[0].slice(1, -1), n = ye.exec(e);
38
38
  if (n) return {
39
39
  durationLabel: `${n[1]}s`,
40
40
  groupIndex: t.index,
41
41
  groupLength: t[0].length
42
42
  };
43
43
  }
44
- }, q = (e) => {
45
- let t = e ?? "", n = we(t);
44
+ }, Se = (e) => {
45
+ let t = e ?? "", n = xe(t);
46
46
  return {
47
- name: Ce(n ? t.slice(0, n.groupIndex) + t.slice(n.groupIndex + n.groupLength) : t).trim().replace(/ {2,}/g, " "),
47
+ name: be(n ? t.slice(0, n.groupIndex) + t.slice(n.groupIndex + n.groupLength) : t).trim().replace(/ {2,}/g, " "),
48
48
  durationLabel: n?.durationLabel
49
49
  };
50
- }, Te = (e) => e.length > 0 && !/\s/.test(e) && e.includes("_"), Ee = (e) => [...e].reverse().find((e) => e.status == null), De = (e, t) => {
50
+ }, Ce = (e) => e.length > 0 && !/\s/.test(e) && e.includes("_"), we = (e) => [...e].reverse().find((e) => e.status == null), Te = (e, t) => {
51
51
  let n = e.parent_stage_index;
52
52
  if (!(n == null || !Number.isInteger(n) || n < 0 || n >= e.index)) return t.get(n);
53
- }, Oe = (e) => {
53
+ }, Ee = (e) => {
54
54
  let t = e.map((e) => ({
55
55
  stage: e,
56
56
  children: []
@@ -58,15 +58,15 @@ var K = {
58
58
  for (let e of t) n.has(e.stage.index) || n.set(e.stage.index, e);
59
59
  let r = [];
60
60
  for (let e of t) {
61
- let t = De(e.stage, n);
61
+ let t = Te(e.stage, n);
62
62
  t ? t.children.push(e) : r.push(e);
63
63
  }
64
64
  return r;
65
- }, ke = (e) => `stage:${e}`, Ae = (e) => `group:${e}`, je = "min-w-0 overflow-visible py-0", Me = "min-w-0 justify-start gap-2 rounded-lg px-2 py-1.5 text-start mobile:min-h-11", Ne = (e) => {
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) => {
66
66
  let t = [], n = 0;
67
67
  for (; n < e.length;) {
68
- let r = e[n], i = q(r.stage.name).name, a = n + 1;
69
- for (; a < e.length && q(e[a].stage.name).name === i;) a += 1;
68
+ let r = e[n], i = Se(r.stage.name).name, a = n + 1;
69
+ for (; a < e.length && Se(e[a].stage.name).name === i;) a += 1;
70
70
  let o = e.slice(n, a);
71
71
  o.length > 1 ? t.push({
72
72
  key: r.stage.index,
@@ -78,7 +78,7 @@ var K = {
78
78
  }), n = a;
79
79
  }
80
80
  return t;
81
- }, J = {
81
+ }, X = {
82
82
  panel: "_panel_w65is_2",
83
83
  row: "_row_w65is_6",
84
84
  collapseButton: "_collapseButton_w65is_10",
@@ -98,98 +98,98 @@ var K = {
98
98
  codeInline: "_codeInline_w65is_84",
99
99
  blockquote: "_blockquote_w65is_91",
100
100
  tableCell: "_tableCell_w65is_96"
101
- }, Pe = ({ status: e, isLive: t, runningLabel: n = "Running", failedLabel: r = "Failed" }) => e === o.Failed ? /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(x, {
101
+ }, Me = ({ status: e, isLive: t, runningLabel: n = "Running", failedLabel: r = "Failed" }) => e === o.Failed ? /* @__PURE__ */ Y(he, { children: [/* @__PURE__ */ J(x, {
102
102
  size: f.MD,
103
- className: J.iconError,
103
+ className: X.iconError,
104
104
  "aria-hidden": !0,
105
105
  stroke: p
106
- }), /* @__PURE__ */ W("span", {
106
+ }), /* @__PURE__ */ J("span", {
107
107
  className: "sr-only",
108
108
  children: r
109
- })] }) : e === o.Completed ? /* @__PURE__ */ W(S, {
109
+ })] }) : e === o.Completed ? /* @__PURE__ */ J(S, {
110
110
  size: f.SM,
111
- className: J.iconCompleted,
111
+ className: X.iconCompleted,
112
112
  "aria-hidden": !0,
113
113
  stroke: p
114
- }) : t ? /* @__PURE__ */ W(y, {
114
+ }) : t ? /* @__PURE__ */ J(y, {
115
115
  size: 16,
116
116
  ariaLabel: n
117
- }) : null, Fe = (e) => {
117
+ }) : null, Ne = (e) => {
118
118
  if (e == null) return "";
119
119
  let t = e.lastIndexOf(".");
120
120
  return t > 0 ? e.slice(0, t) : e;
121
- }, Ie = (e) => {
121
+ }, Pe = (e) => {
122
122
  if (!e) return E;
123
123
  let t = u(e);
124
124
  if (t.startsWith("image/")) switch (t) {
125
125
  case "image/jpeg": return N;
126
- case "image/png": return te;
127
- case "image/svg+xml": return ie;
126
+ case "image/png": return R;
127
+ case "image/svg+xml": return ne;
128
128
  case "image/bmp": return D;
129
- default: return fe;
129
+ default: return U;
130
130
  }
131
- if (t.startsWith("video/")) return he;
132
- if (t.startsWith("audio/")) return de;
131
+ if (t.startsWith("video/")) return ue;
132
+ if (t.startsWith("audio/")) return se;
133
133
  switch (t) {
134
134
  case "application/pdf": return I;
135
135
  case "application/msword": return A;
136
136
  case "application/vnd.openxmlformats-officedocument.wordprocessingml.document": return j;
137
- case "application/vnd.ms-powerpoint": return L;
138
- case "application/vnd.openxmlformats-officedocument.presentationml.presentation": return L;
139
- case "application/vnd.ms-excel": return ce;
140
- case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": return ce;
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 V;
140
+ case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": return V;
141
141
  case "application/zip":
142
142
  case "application/vnd.rar":
143
143
  case "application/x-7z-compressed":
144
144
  case "application/gzip":
145
- case "application/x-tar": return ue;
145
+ case "application/x-tar": return H;
146
146
  case "text/csv": return k;
147
- case "text/plain": return oe;
147
+ case "text/plain": return B;
148
148
  case "text/html":
149
149
  case "application/xhtml+xml": return M;
150
- case "application/xml": return le;
151
- case "application/sql": return re;
150
+ case "application/xml": return oe;
151
+ case "application/sql": return te;
152
152
  case "text/javascript": return P;
153
153
  case "text/jsx": return F;
154
- case "text/typescript": return ae;
155
- case "text/tsx": return R;
154
+ case "text/typescript": return re;
155
+ case "text/tsx": return ie;
156
156
  case "text/css": return O;
157
- case "text/x-php": return ee;
158
- case "text/x-rustsrc": return ne;
159
- case "text/x-vue": return se;
157
+ case "text/x-php": return L;
158
+ case "text/x-rustsrc": return ee;
159
+ case "text/x-vue": return ae;
160
160
  default: return E;
161
161
  }
162
- }, Le = (e) => {
162
+ }, Fe = (e) => {
163
163
  let { type: n, contentType: r } = e;
164
- return n === t.Prompt ? me : n === t.Pasted ? C : n === t.Image ? fe : Ie(r ?? "");
165
- }, Re = (e) => {
164
+ return n === t.Prompt ? le : n === t.Pasted ? C : n === t.Image ? U : Pe(r ?? "");
165
+ }, Ie = (e) => {
166
166
  let t = u(e), r = n[t];
167
167
  if (r) return r;
168
168
  let i = t.split("/")[1];
169
169
  if (i && !i.startsWith("vnd.") && !i.includes("+")) return i;
170
- }, ze = (e, n) => {
170
+ }, Le = (e, n) => {
171
171
  let { type: r, name: i, contentType: a } = e;
172
172
  if (r === t.Prompt) return n.promptLabel ?? "Prompt";
173
173
  if (r === t.Pasted) return n.pastedLabel ?? "Pasted";
174
174
  if (r === t.Image) return n.imageLabel ?? "Image";
175
175
  if (a) {
176
- let e = Re(a);
176
+ let e = Ie(a);
177
177
  if (e) return `.${e}`;
178
178
  }
179
179
  if (i == null) return "";
180
180
  let o = i.lastIndexOf(".");
181
181
  return o > 0 && o < i.length - 1 ? `.${i.slice(o + 1).toLowerCase()}` : i;
182
- }, Be = (e, n = {}) => {
182
+ }, Re = (e, n = {}) => {
183
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
184
  return {
185
185
  isLoading: c,
186
186
  isError: l,
187
187
  isImage: u,
188
188
  isLink: d,
189
- BottomIcon: d ? null : Le(e),
190
- typeLabel: d ? null : ze(e, n)
189
+ BottomIcon: d ? null : Fe(e),
190
+ typeLabel: d ? null : Le(e, n)
191
191
  };
192
- }, Ve = "flex size-[84px] items-center justify-center rounded-xl border", Y = {
192
+ }, ze = "flex size-[84px] items-center justify-center rounded-xl border", Z = {
193
193
  tray: "dial-ai-attachment-tray",
194
194
  trayItem: "dial-ai-attachment-tray-item",
195
195
  tile: "dial-ai-attachment-tile",
@@ -197,155 +197,157 @@ var K = {
197
197
  tileName: "dial-ai-attachment-tile-name",
198
198
  tileType: "dial-ai-attachment-tile-type",
199
199
  tileAction: "dial-ai-attachment-tile-action"
200
- }, X = {
201
- tile: "_tile_s2es2_12",
202
- hovered: "_hovered_s2es2_18",
203
- selected: "_selected_s2es2_28",
204
- tileError: "_tileError_s2es2_33",
205
- nameText: "_nameText_s2es2_38",
206
- typeText: "_typeText_s2es2_42",
207
- retryIcon: "_retryIcon_s2es2_46",
208
- track: "_track_s2es2_50",
209
- actionButton: "_actionButton_s2es2_56",
210
- imageActionButton: "_imageActionButton_s2es2_60"
211
- }, Z = ({ ariaLabel: e, errorTitle: t, errorDescId: n, onClick: r, id: i, icon: a, className: o }) => /* @__PURE__ */ W(b, {
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__ */ J(b, {
212
212
  icon: a,
213
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", X.actionButton, o, Y.tileAction),
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
215
  "aria-label": e,
216
216
  "aria-describedby": t ? n : void 0,
217
217
  onClick: (e) => {
218
218
  e.stopPropagation(), r(i);
219
219
  }
220
- }), He = ({ ...e }) => /* @__PURE__ */ W(Z, {
221
- icon: /* @__PURE__ */ W(pe, {
220
+ }), Ve = ({ ...e }) => /* @__PURE__ */ J(Be, {
221
+ icon: /* @__PURE__ */ J(ce, {
222
222
  size: f.SM,
223
223
  "aria-hidden": !0,
224
224
  stroke: p
225
225
  }),
226
- className: X.retryIcon,
226
+ className: Q.retryIcon,
227
227
  ...e
228
- }), Ue = ({ ...e }) => /* @__PURE__ */ W(Z, {
229
- icon: /* @__PURE__ */ W(w, {
228
+ }), He = ({ ...e }) => /* @__PURE__ */ J(Be, {
229
+ icon: /* @__PURE__ */ J(w, {
230
230
  size: f.SM,
231
231
  "aria-hidden": !0,
232
232
  stroke: p
233
233
  }),
234
234
  ...e
235
- }), We = ({ ...e }) => /* @__PURE__ */ W(Z, {
236
- icon: /* @__PURE__ */ W(T, {
235
+ }), Ue = ({ ...e }) => /* @__PURE__ */ J(Be, {
236
+ icon: /* @__PURE__ */ J(T, {
237
237
  size: f.SM,
238
238
  "aria-hidden": !0,
239
239
  stroke: p
240
240
  }),
241
241
  ...e
242
- }), Ge = ({ ...e }) => /* @__PURE__ */ W(Z, {
243
- icon: /* @__PURE__ */ W(ge, {
242
+ }), We = ({ ...e }) => /* @__PURE__ */ J(Be, {
243
+ icon: /* @__PURE__ */ J(de, {
244
244
  size: f.SM,
245
245
  "aria-hidden": !0,
246
246
  stroke: p
247
247
  }),
248
248
  ...e
249
- }), Ke = {
249
+ }), Ge = {
250
250
  [e.Network]: "Upload failed · network error",
251
251
  [e.UnsupportedType]: "Upload failed · unsupported file type",
252
252
  [e.FileTooLarge]: "Upload failed · file too large"
253
- }, qe = ({ attachment: t, searchQuery: n = "", onClick: r, onRetry: i, labels: o, styles: s, onDownload: l, isPasted: u, isLink: d, cssVars: f, onExpand: p, isExpandable: m, onRemove: h, isSelected: _ }) => {
254
- let { clickLabel: v = "Download attachment", retryLabel: b = "Retry upload", removeLabel: x = "Remove attachment", openInNewTabLabel: S = "Open in new tab", sizeLabel: C, uploadingLabel: w = "Uploading", errorReasonLabels: T, genericErrorLabel: E = "Upload failed" } = o ?? {}, { typography: D, className: O } = s ?? {}, { id: k, name: A, status: j, errorReason: M } = t, N = j === a.Loading, P = j === a.Error, F = ve(), I = P ? M && (T?.[M] ?? Ke[M]) || E : "", { BottomIcon: ee, typeLabel: te } = Be(t), L = !P && !N && l && !d, ne = P && !!i && M !== e.UnsupportedType && M !== e.FileTooLarge, re = Number(!!L) + Number(!!ne) + Number(!!d) + Number(!!h), ie = re > 1 ? "pe-11" : re === 1 ? "pe-5" : void 0, ae = (e) => {
255
- e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), r?.(t.id));
256
- }, R = V(() => u ? A : Fe(A), [u, A]), oe = z(() => {
253
+ }, Ke = ({ attachment: t, searchQuery: n = "", onClick: r, onRetry: i, labels: o, styles: s, onDownload: l, isPasted: u, isLink: d, cssVars: f, onExpand: p, isExpandable: m, onRemove: h, isSelected: _ }) => {
254
+ let { clickLabel: v = "Download attachment", expandLabel: b = "Expand pasted text", downloadLabel: x = "Download attachment", retryLabel: S = "Retry upload", removeLabel: C = "Remove attachment", openInNewTabLabel: w = "Open in new tab", sizeLabel: T, uploadingLabel: E = "Uploading", errorReasonLabels: D, genericErrorLabel: O = "Upload failed" } = o ?? {}, { typography: k, className: A } = s ?? {}, { id: j, name: M, status: N, errorReason: P } = t, F = N === a.Loading, I = N === a.Error, L = pe(), R = I ? P && (D?.[P] ?? Ge[P]) || O : "", { BottomIcon: z, typeLabel: ee } = Re(t), te = !I && !F && l && !d, ne = I && !!i && P !== e.UnsupportedType && P !== e.FileTooLarge, re = Number(!!te) + Number(!!ne) + Number(!!d) + Number(!!h), ie = re > 1 ? "pe-11" : re === 1 ? "pe-5" : void 0, B = !!m && p !== void 0, ae = B || r !== void 0, V = () => {
255
+ B ? p(j) : r?.(j);
256
+ }, oe = (e) => {
257
+ e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), V());
258
+ }, H = K(() => u ? M : Ne(M), [u, M]), se = W(() => {
257
259
  window.open(t.referenceUrl, "_blank", "noopener,noreferrer");
258
- }, [t]), se = c(Ve, "group/attachment-tile relative flex-col justify-between items-start gap-1 overflow-hidden p-1.5", X.tile, !P && X.hovered, _ && X.selected, P && X.tileError, Y.tile, _ && Y.tileSelected), ce = /* @__PURE__ */ W("div", {
259
- title: R,
260
- className: c(D?.nameClassName ?? "dial-caption-text", "line-clamp-2 w-full min-w-0 break-words", X.nameText, !P && ie, Y.tileName),
261
- children: n ? /* @__PURE__ */ W(g, {
262
- text: R,
260
+ }, [t]), U = c(ze, "group/attachment-tile relative flex-col justify-between items-start gap-1 overflow-hidden p-1.5", Q.tile, !I && Q.hovered, _ && Q.selected, I && Q.tileError, Z.tile, _ && Z.tileSelected), ce = /* @__PURE__ */ J("div", {
261
+ title: H,
262
+ className: c(k?.nameClassName ?? "dial-caption-text", "line-clamp-2 w-full min-w-0 break-words", Q.nameText, !I && ie, Z.tileName),
263
+ children: n ? /* @__PURE__ */ J(g, {
264
+ text: H,
263
265
  query: n,
264
266
  maxLines: 2
265
- }) : R
266
- }), le = ee && /* @__PURE__ */ G("div", {
267
- className: c("flex w-full items-center gap-1", P && ie, Y.tileType),
268
- children: [/* @__PURE__ */ W(ee, {
267
+ }) : H
268
+ }), le = z && /* @__PURE__ */ Y("div", {
269
+ className: c("flex w-full items-center gap-1", I && ie, Z.tileType),
270
+ children: [/* @__PURE__ */ J(z, {
269
271
  size: 16,
270
- className: X.typeText,
272
+ className: Q.typeText,
271
273
  "aria-hidden": !0
272
- }), /* @__PURE__ */ W("span", {
273
- className: c(D?.metaClassName ?? "dial-caption-text", "min-w-0 flex-1 truncate", X.typeText),
274
- children: C ? `${te} · ${C}` : te
274
+ }), /* @__PURE__ */ J("span", {
275
+ className: c(k?.metaClassName ?? "dial-caption-text", "min-w-0 flex-1 truncate", Q.typeText),
276
+ children: T ? `${ee} · ${T}` : ee
275
277
  })]
276
- }), ue = () => {
277
- m && p ? p(k) : r && r(k);
278
- }, de = /* @__PURE__ */ G(U, { children: [
278
+ }), ue = ae ? {
279
+ role: "button",
280
+ tabIndex: 0,
281
+ "aria-label": B ? b : v,
282
+ onClick: V,
283
+ onKeyDown: oe
284
+ } : {}, de = /* @__PURE__ */ Y(he, { children: [
279
285
  ce,
280
286
  le,
281
- N && /* @__PURE__ */ W("div", {
287
+ F && /* @__PURE__ */ J("div", {
282
288
  role: "progressbar",
283
- "aria-label": w,
284
- className: c("absolute start-[-1px] top-[-1px] flex size-full items-center justify-center rounded", X.track),
285
- children: /* @__PURE__ */ W(y, { size: 32 })
289
+ "aria-label": E,
290
+ className: c("absolute start-[-1px] top-[-1px] flex size-full items-center justify-center rounded", Q.track),
291
+ children: /* @__PURE__ */ J(y, { size: 32 })
286
292
  }),
287
- /* @__PURE__ */ G("div", {
293
+ /* @__PURE__ */ Y("div", {
288
294
  className: "absolute end-1 top-1 flex gap-1",
289
295
  children: [
290
- L && /* @__PURE__ */ W(Ue, {
291
- ariaLabel: v,
292
- errorTitle: I,
293
- errorDescId: F,
296
+ te && /* @__PURE__ */ J(He, {
297
+ ariaLabel: x,
298
+ errorTitle: R,
299
+ errorDescId: L,
294
300
  onClick: l,
295
- id: k
301
+ id: j
296
302
  }),
297
- ne && /* @__PURE__ */ W(He, {
298
- ariaLabel: b,
299
- errorTitle: I,
300
- errorDescId: F,
303
+ ne && /* @__PURE__ */ J(Ve, {
304
+ ariaLabel: S,
305
+ errorTitle: R,
306
+ errorDescId: L,
301
307
  onClick: i,
302
- id: k
308
+ id: j
303
309
  }),
304
- d && /* @__PURE__ */ W(We, {
305
- ariaLabel: S,
306
- errorTitle: I,
307
- errorDescId: F,
308
- onClick: oe
310
+ d && /* @__PURE__ */ J(Ue, {
311
+ ariaLabel: w,
312
+ errorTitle: R,
313
+ errorDescId: L,
314
+ onClick: se
309
315
  }),
310
- h && /* @__PURE__ */ W(Ge, {
311
- ariaLabel: x,
312
- errorTitle: I,
313
- errorDescId: F,
316
+ h && /* @__PURE__ */ J(We, {
317
+ ariaLabel: C,
318
+ errorTitle: R,
319
+ errorDescId: L,
314
320
  onClick: h,
315
- id: k
321
+ id: j
316
322
  })
317
323
  ]
318
324
  }),
319
- P && /* @__PURE__ */ W("span", {
320
- id: F,
325
+ I && /* @__PURE__ */ J("span", {
326
+ id: L,
321
327
  role: "status",
322
328
  "aria-live": "polite",
323
329
  className: "sr-only",
324
- children: I
330
+ children: R
325
331
  })
326
332
  ] });
327
- return /* @__PURE__ */ W("div", {
333
+ return /* @__PURE__ */ J("div", {
328
334
  style: f,
329
- className: c("inline-flex", O),
330
- children: /* @__PURE__ */ W("div", {
331
- role: "button",
332
- tabIndex: 0,
333
- "aria-label": v,
334
- "aria-busy": N,
335
- onClick: ue,
336
- onKeyDown: ae,
335
+ className: c("inline-flex", A),
336
+ children: /* @__PURE__ */ J("div", {
337
+ ...ue,
338
+ "aria-busy": F,
337
339
  style: f,
338
- className: c(se, "cursor-pointer focus-within:outline focus-within:outline-1 focus-within:outline-offset-1"),
340
+ className: c(U, ae && "cursor-pointer", "focus-within:outline focus-within:outline-1 focus-within:outline-offset-1"),
339
341
  children: de
340
342
  })
341
343
  });
342
- }, Je = /* @__PURE__ */ function(e) {
344
+ }, qe = /* @__PURE__ */ function(e) {
343
345
  return e.Idle = "idle", e.Loading = "loading", e.Loaded = "loaded", e.Error = "error", e;
344
- }({}), Ye = ({ enabled: e, src: t }) => {
345
- let n = ye(null), [r, i] = H("idle");
346
- return B(() => {
346
+ }({}), Je = ({ enabled: e, src: t }) => {
347
+ let n = me(null), [r, i] = q("idle");
348
+ return G(() => {
347
349
  i(e && t ? "loading" : "idle");
348
- }, [e, t]), B(() => {
350
+ }, [e, t]), G(() => {
349
351
  let r = n.current;
350
352
  if (!r || !e || !t) return;
351
353
  let a = () => i("loaded"), o = () => i("error");
@@ -356,65 +358,67 @@ var K = {
356
358
  imageRef: n,
357
359
  imageLoadStatus: r
358
360
  };
359
- }, Xe = ({ attachment: e, onExpand: n, onClick: r, labels: i, onRemove: a, cssVars: o, onDownload: s, styles: l, isSelected: u }) => {
360
- 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 } = V(() => Be(e), [e]), D = r !== void 0 && !C && !w && !T, { imageRef: O, imageLoadStatus: k } = Ye({
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 } = K(() => Re(e), [e]), D = r !== void 0 && !C && !w && !T, O = C || D, { imageRef: k, imageLoadStatus: A } = Je({
361
363
  enabled: E,
362
364
  src: S
363
- }), A = () => {
365
+ }), j = () => {
364
366
  C && n ? n(b) : D && r && r(b);
365
- };
366
- return /* @__PURE__ */ W("div", {
367
- className: c(Ve, "group/attachment-tile", D && "cursor-pointer", X.tile, u && X.selected, y, Y.tile, u && Y.tileSelected),
368
- onClick: A,
369
- onKeyDown: (e) => {
370
- e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), A());
371
- },
372
- tabIndex: 0,
367
+ }, M = O ? {
373
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__ */ J("div", {
377
+ className: c(ze, "group/attachment-tile", O && "cursor-pointer", Q.tile, u && Q.selected, y, Z.tile, u && Z.tileSelected),
378
+ ...M,
374
379
  style: o,
375
- "aria-label": D ? d : C ? m : void 0,
376
- children: /* @__PURE__ */ G("div", {
380
+ children: /* @__PURE__ */ Y("div", {
377
381
  className: "relative h-full w-full overflow-hidden",
378
382
  children: [
379
- /* @__PURE__ */ G("div", {
383
+ /* @__PURE__ */ Y("div", {
380
384
  className: "absolute end-1 top-1 z-10 flex gap-1",
381
- children: [a && /* @__PURE__ */ W(Ge, {
385
+ children: [a && /* @__PURE__ */ J(We, {
382
386
  ariaLabel: h,
383
387
  onClick: a,
384
388
  id: b,
385
- className: X.imageActionButton
386
- }), s && /* @__PURE__ */ W(Ue, {
389
+ className: Q.imageActionButton
390
+ }), s && /* @__PURE__ */ J(He, {
387
391
  ariaLabel: g,
388
392
  onClick: s,
389
393
  id: b,
390
- className: X.imageActionButton
394
+ className: Q.imageActionButton
391
395
  })]
392
396
  }),
393
- k !== Je.Loaded && /* @__PURE__ */ W(_, {
397
+ A !== qe.Loaded && /* @__PURE__ */ J(_, {
394
398
  variant: v.Rectangular,
395
399
  width: "100%",
396
400
  height: "100%",
397
- active: k === Je.Loading,
398
- overlay: /* @__PURE__ */ W(fe, {
401
+ active: A === qe.Loading,
402
+ overlay: /* @__PURE__ */ J(U, {
399
403
  size: f.LG,
400
- className: X.typeText,
404
+ className: Q.typeText,
401
405
  "aria-hidden": !0,
402
406
  stroke: p
403
407
  }),
404
408
  className: "absolute inset-0 rounded-xl"
405
409
  }),
406
- /* @__PURE__ */ W("img", {
407
- ref: O,
410
+ /* @__PURE__ */ J("img", {
411
+ ref: k,
408
412
  src: S,
409
413
  alt: x,
410
414
  loading: "lazy",
411
415
  decoding: "async",
412
- className: c("h-full w-full rounded-xl object-cover transition-opacity duration-200", k === Je.Loaded ? "opacity-100" : "opacity-0")
416
+ className: c("h-full w-full rounded-xl object-cover transition-opacity duration-200", A === qe.Loaded ? "opacity-100" : "opacity-0")
413
417
  })
414
418
  ]
415
419
  })
416
420
  });
417
- }, Ze = ({ attachment: e, searchQuery: n = "", onRemove: r, onRetry: i, onExpand: a, onClick: o, onDownload: c, labels: l, styles: u, isSelected: d }) => {
421
+ }, Xe = ({ attachment: e, searchQuery: n = "", onRemove: r, onRetry: i, onExpand: a, onClick: o, onDownload: c, labels: l, styles: u, isSelected: d }) => {
418
422
  let { colors: f } = u ?? {}, p = e.type === t.Pasted, m = p && a !== void 0, h = s({
419
423
  "--ai-tile-bg": f?.background,
420
424
  "--ai-tile-border": f?.border,
@@ -431,8 +435,8 @@ var K = {
431
435
  "--ai-tile-hover-icon-bg": f?.hoverIconBackground,
432
436
  "--ai-tile-hover-icon-color": f?.hoverIconColor,
433
437
  "--ai-tile-progress-track": f?.trackBackground
434
- }), { isImage: g, isLink: _ } = V(() => Be(e), [e]);
435
- return g ? /* @__PURE__ */ W(Xe, {
438
+ }), { isImage: g, isLink: _ } = K(() => Re(e), [e]);
439
+ return g ? /* @__PURE__ */ J(Ye, {
436
440
  attachment: e,
437
441
  labels: l,
438
442
  onClick: o,
@@ -442,7 +446,7 @@ var K = {
442
446
  cssVars: h,
443
447
  onDownload: c,
444
448
  isSelected: d
445
- }) : /* @__PURE__ */ W(qe, {
449
+ }) : /* @__PURE__ */ J(Ke, {
446
450
  attachment: e,
447
451
  searchQuery: n,
448
452
  onClick: o,
@@ -458,7 +462,7 @@ var K = {
458
462
  isExpandable: m,
459
463
  isSelected: d
460
464
  });
461
- }, Qe = (e) => {
465
+ }, Ze = (e) => {
462
466
  let t = l(e);
463
467
  if (!e?.length) return t;
464
468
  let n = /* @__PURE__ */ new Map();
@@ -473,118 +477,125 @@ var K = {
473
477
  contentType: t
474
478
  } : e;
475
479
  });
476
- }, $e = ({ children: e, codeClassName: t, blockClassName: n = "dial-code-text", copyAriaLabel: i }) => /* @__PURE__ */ W(r, {
480
+ }, Qe = ({ children: e, codeClassName: t, blockClassName: n = "dial-code-text", copyAriaLabel: i, copiedLabel: a }) => /* @__PURE__ */ J(r, {
477
481
  language: t?.replace(/^language-/, "") ?? "",
478
482
  value: typeof e == "string" ? e : String(e ?? ""),
479
483
  codeClassName: n,
480
- containerClassName: c(J.codeBlock, n),
484
+ containerClassName: c(X.codeBlock, n),
481
485
  copyLabel: i,
486
+ copiedLabel: a,
482
487
  hideDownload: !0
483
- }), et = _e(({ content: e, typography: t, copyAriaLabel: n = "Copy" }) => {
484
- let r = "mb-1.5 last:mb-0", a = c(t?.headingClassName ?? "dial-small-semi-text", J.stageContent, r);
485
- return /* @__PURE__ */ W(i, {
488
+ }), $e = fe(({ content: e, typography: t, copyAriaLabel: n = "Copy", copiedLabel: r, tableScrollRegionAriaLabel: a, mathScrollRegionAriaLabel: o }) => {
489
+ let s = "mb-1.5 last:mb-0", l = c(t?.headingClassName ?? "dial-small-semi-text", X.stageContent, s);
490
+ return /* @__PURE__ */ J(i, {
486
491
  content: e,
492
+ tableScrollRegionAriaLabel: a,
493
+ mathScrollRegionAriaLabel: o,
487
494
  classNames: {
488
- h1: a,
489
- h2: a,
490
- h3: a,
491
- h4: a,
492
- h5: a,
493
- h6: a,
494
- p: c(t?.contentClassName ?? "dial-tiny-text", J.stageContent, "mb-1.5"),
495
- ul: c(t?.contentClassName ?? "dial-tiny-text", J.stageContent, r),
496
- ol: c(t?.contentClassName ?? "dial-tiny-text", J.stageContent, r),
497
- strong: c(t?.strongClassName ?? t?.contentClassName ?? "dial-tiny-text", J.stageContent),
498
- codeInline: J.codeInline,
499
- blockquote: c(t?.contentClassName ?? "dial-tiny-text", J.blockquote, r),
500
- link: c(t?.contentClassName ?? "dial-tiny-text", J.stageContent),
501
- tableCell: c(t?.contentClassName ?? "dial-tiny-text", J.tableCell)
495
+ h1: l,
496
+ h2: l,
497
+ h3: l,
498
+ h4: l,
499
+ h5: l,
500
+ h6: l,
501
+ p: c(t?.contentClassName ?? "dial-tiny-text", X.stageContent, "mb-1.5"),
502
+ ul: c(t?.contentClassName ?? "dial-tiny-text", X.stageContent, s),
503
+ ol: c(t?.contentClassName ?? "dial-tiny-text", X.stageContent, s),
504
+ strong: c(t?.strongClassName ?? t?.contentClassName ?? "dial-tiny-text", X.stageContent),
505
+ codeInline: X.codeInline,
506
+ blockquote: c(t?.contentClassName ?? "dial-tiny-text", X.blockquote, s),
507
+ link: c(t?.contentClassName ?? "dial-tiny-text", X.stageContent),
508
+ tableCell: c(t?.contentClassName ?? "dial-tiny-text", X.tableCell)
502
509
  },
503
- components: { code: ({ children: e, className: r }) => r?.includes("language-") ? /* @__PURE__ */ W($e, {
504
- codeClassName: r,
510
+ components: { code: ({ children: e, className: i }) => i?.includes("language-") ? /* @__PURE__ */ J(Qe, {
511
+ codeClassName: i,
505
512
  blockClassName: t?.codeBlockClassName,
506
513
  copyAriaLabel: n,
514
+ copiedLabel: r,
507
515
  children: e
508
- }) : /* @__PURE__ */ W("code", {
509
- className: c("px-1 py-0.5", t?.codeClassName ?? "dial-tiny-text rounded-md", J.codeInline),
516
+ }) : /* @__PURE__ */ J("code", {
517
+ className: c("px-1 py-0.5", t?.codeClassName ?? "dial-tiny-text rounded-md", X.codeInline),
510
518
  children: e
511
519
  }) }
512
520
  });
513
- }), tt = ({ attachments: e, clickLabel: t, onAttachmentClick: n }) => {
514
- let r = z((t) => {
521
+ }), et = ({ attachments: e, clickLabel: t, onAttachmentClick: n }) => {
522
+ let r = W((t) => {
515
523
  let r = e.find((e) => e.id === t);
516
524
  r && n?.(r);
517
525
  }, [e, n]);
518
- return /* @__PURE__ */ W("div", {
526
+ return /* @__PURE__ */ J("div", {
519
527
  role: "list",
520
528
  className: "flex flex-wrap gap-3",
521
- children: e.map((e) => /* @__PURE__ */ W("div", {
529
+ children: e.map((e) => /* @__PURE__ */ J("div", {
522
530
  role: "listitem",
523
- children: /* @__PURE__ */ W(Ze, {
531
+ children: /* @__PURE__ */ J(Xe, {
524
532
  attachment: e,
525
533
  onClick: n && r,
526
534
  labels: { clickLabel: t }
527
535
  })
528
536
  }, e.id))
529
537
  });
530
- }, nt = ({ stage: e, isLive: t, typography: n, labels: r, nameOverride: i, onAttachmentClick: a, childList: s, isExpanded: l, onToggle: u }) => {
531
- let [f, p] = H(!1), m = l ?? f, g = z((e) => {
538
+ }, tt = ({ stage: e, isLive: t, typography: n, labels: r, nameOverride: i, onAttachmentClick: a, childList: s, isExpanded: l, onToggle: u }) => {
539
+ let [f, p] = q(!1), m = l ?? f, g = W((e) => {
532
540
  l === void 0 && p(e), u?.(e);
533
- }, [l, u]), { copyAriaLabel: _ = "Copy stage content", runningAriaLabel: v, failedAriaLabel: y, attachmentClickLabel: b = "Preview search result" } = r ?? {}, x = V(() => Qe(e.attachments), [e.attachments]), { name: S, durationLabel: C } = q(e.name), w = i ?? S, T = !i && Te(S), E = e.status === o.Failed, D = !!e.content || !!e.attachments?.length, O = D || s != null, k = /* @__PURE__ */ G(U, { children: [
534
- /* @__PURE__ */ W("span", {
541
+ }, [l, u]), { copyAriaLabel: _ = "Copy stage content", codeBlockCopiedLabel: v, tableScrollRegionAriaLabel: y, mathScrollRegionAriaLabel: b, runningAriaLabel: x, failedAriaLabel: S, attachmentClickLabel: C = "Preview search result" } = r ?? {}, w = K(() => Ze(e.attachments), [e.attachments]), { name: T, durationLabel: E } = Se(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__ */ Y(he, { children: [
542
+ /* @__PURE__ */ J("span", {
535
543
  className: "flex flex-none items-center",
536
- children: /* @__PURE__ */ W(Pe, {
544
+ children: /* @__PURE__ */ J(Me, {
537
545
  status: e.status,
538
546
  isLive: t,
539
- runningLabel: v,
540
- failedLabel: y
547
+ runningLabel: x,
548
+ failedLabel: S
541
549
  })
542
550
  }),
543
- /* @__PURE__ */ W("span", {
544
- className: c("min-w-0 max-w-[22rem] truncate", n?.fontClassName ?? "dial-small-text", J.stageName, E && J.stageNameFailed, T && J.monoName),
545
- children: /* @__PURE__ */ W(h, { text: w || e.status || "" })
551
+ /* @__PURE__ */ J("span", {
552
+ className: c("min-w-0 max-w-[22rem] truncate", n?.fontClassName ?? "dial-small-text", X.stageName, k && X.stageNameFailed, O && X.monoName),
553
+ children: /* @__PURE__ */ J(h, { text: D || e.status || "" })
546
554
  }),
547
- e.tag && /* @__PURE__ */ W("span", {
548
- className: c("flex-none", n?.tagClassName ?? "dial-tiny-lead-text", J.tag),
555
+ e.tag && /* @__PURE__ */ J("span", {
556
+ className: c("flex-none", n?.tagClassName ?? "dial-tiny-lead-text", X.tag),
549
557
  children: e.tag
550
558
  }),
551
- C && /* @__PURE__ */ W("span", {
552
- className: c("flex-none", n?.countFontClassName ?? "dial-tiny-text", J.duration),
553
- children: C
559
+ E && /* @__PURE__ */ J("span", {
560
+ className: c("flex-none", n?.countFontClassName ?? "dial-tiny-text", X.duration),
561
+ children: E
554
562
  })
555
563
  ] });
556
- return O ? /* @__PURE__ */ G(d, {
564
+ return j ? /* @__PURE__ */ Y(d, {
557
565
  expanded: m,
558
566
  onToggle: g,
559
- title: /* @__PURE__ */ W("span", {
567
+ title: /* @__PURE__ */ J("span", {
560
568
  className: "flex min-w-0 items-center gap-2",
561
- children: k
569
+ children: M
562
570
  }),
563
- className: je,
564
- headerClassName: c(Me, J.row, J.stageHeader),
565
- contentClassName: c("-mt-1 flex min-w-0 flex-col gap-3 px-0 py-1", J.stageRegion),
566
- children: [m && D && /* @__PURE__ */ G("div", {
571
+ className: ke,
572
+ headerClassName: c(Ae, X.row, X.stageHeader),
573
+ contentClassName: c("-mt-1 flex min-w-0 flex-col gap-3 px-0 py-1", X.stageRegion),
574
+ children: [m && A && /* @__PURE__ */ Y("div", {
567
575
  className: "flex min-w-0 flex-col gap-3 ps-8",
568
- children: [e.content && /* @__PURE__ */ W("div", {
576
+ children: [e.content && /* @__PURE__ */ J("div", {
569
577
  className: "max-h-[300px] min-w-0 overflow-y-auto",
570
- children: /* @__PURE__ */ W(et, {
578
+ children: /* @__PURE__ */ J($e, {
571
579
  content: e.content,
572
580
  typography: n,
573
- copyAriaLabel: _
581
+ copyAriaLabel: _,
582
+ copiedLabel: v,
583
+ tableScrollRegionAriaLabel: y,
584
+ mathScrollRegionAriaLabel: b
574
585
  })
575
- }), x.length > 0 && /* @__PURE__ */ W(tt, {
576
- attachments: x,
577
- clickLabel: b,
586
+ }), w.length > 0 && /* @__PURE__ */ J(et, {
587
+ attachments: w,
588
+ clickLabel: C,
578
589
  onAttachmentClick: a
579
590
  })]
580
591
  }), m && s]
581
- }) : /* @__PURE__ */ W("div", {
582
- className: c("flex w-full items-center gap-2 px-2 py-1.5", J.row),
583
- children: k
592
+ }) : /* @__PURE__ */ J("div", {
593
+ className: c("flex w-full items-center gap-2 px-2 py-1.5", X.row),
594
+ children: M
584
595
  });
585
- }, rt = (e) => e <= 3 ? "ps-4" : "ps-0", it = (e) => e <= 3 ? "ps-6" : "ps-0", at = ({ node: e, depth: t, nameOverride: n, isStreaming: r, expansion: i, typography: a, labels: o, onAttachmentClick: s }) => {
586
- let c = ke(e.stage.index), l = t + 1;
587
- return /* @__PURE__ */ W(nt, {
596
+ }, 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 }) => {
597
+ let c = De(e.stage.index), l = t + 1;
598
+ return /* @__PURE__ */ J(tt, {
588
599
  stage: e.stage,
589
600
  nameOverride: n,
590
601
  isLive: r && e.stage.status == null,
@@ -593,10 +604,10 @@ var K = {
593
604
  onAttachmentClick: s,
594
605
  isExpanded: i.isExpanded(c),
595
606
  onToggle: (e) => i.onToggle(c, e),
596
- childList: e.children.length > 0 ? /* @__PURE__ */ W(st, {
607
+ childList: e.children.length > 0 ? /* @__PURE__ */ J(ot, {
597
608
  nodes: e.children,
598
609
  depth: l,
599
- className: rt(l),
610
+ className: nt(l),
600
611
  isStreaming: r,
601
612
  expansion: i,
602
613
  typography: a,
@@ -604,45 +615,45 @@ var K = {
604
615
  onAttachmentClick: s
605
616
  }) : void 0
606
617
  });
607
- }, ot = ({ row: e, depth: t, isStreaming: n, expansion: r, typography: i, labels: a, onAttachmentClick: s }) => {
618
+ }, at = ({ row: e, depth: t, isStreaming: n, expansion: r, typography: i, labels: a, onAttachmentClick: s }) => {
608
619
  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;
609
620
  m ? _ = null : g && (_ = o.Failed);
610
- let v = Ae(e.key), y = r.isExpanded(v), b = t + 1;
611
- return /* @__PURE__ */ W(d, {
612
- title: /* @__PURE__ */ G("span", {
621
+ let v = Oe(e.key), y = r.isExpanded(v), b = t + 1;
622
+ return /* @__PURE__ */ J(d, {
623
+ title: /* @__PURE__ */ Y("span", {
613
624
  className: "flex min-w-0 items-center gap-2",
614
625
  children: [
615
- /* @__PURE__ */ W("span", {
626
+ /* @__PURE__ */ J("span", {
616
627
  className: "flex flex-none items-center",
617
- children: /* @__PURE__ */ W(Pe, {
628
+ children: /* @__PURE__ */ J(Me, {
618
629
  status: _,
619
630
  isLive: n && m,
620
631
  runningLabel: l,
621
632
  failedLabel: u
622
633
  })
623
634
  }),
624
- /* @__PURE__ */ W("span", {
625
- className: c("min-w-0 max-w-[22rem] truncate", i?.fontClassName ?? "dial-small-text", J.stageName, g && J.stageNameFailed),
626
- children: /* @__PURE__ */ W(h, { text: e.name })
635
+ /* @__PURE__ */ J("span", {
636
+ className: c("min-w-0 max-w-[22rem] truncate", i?.fontClassName ?? "dial-small-text", X.stageName, g && X.stageNameFailed),
637
+ children: /* @__PURE__ */ J(h, { text: e.name })
627
638
  }),
628
- /* @__PURE__ */ G("span", {
629
- className: c("flex-none", i?.countFontClassName ?? "dial-tiny-text", J.count),
639
+ /* @__PURE__ */ Y("span", {
640
+ className: c("flex-none", i?.countFontClassName ?? "dial-tiny-text", X.count),
630
641
  children: ["×", p.length]
631
642
  })
632
643
  ]
633
644
  }),
634
645
  expanded: y,
635
646
  onToggle: (e) => r.onToggle(v, e),
636
- className: je,
637
- headerClassName: c(Me, J.collapseButton, J.row, J.stageHeader),
638
- contentClassName: c("-mt-2 min-w-0 px-0", it(b), J.stageRegion),
639
- children: /* @__PURE__ */ W("ul", {
647
+ className: ke,
648
+ headerClassName: c(Ae, X.collapseButton, X.row, X.stageHeader),
649
+ contentClassName: c("-mt-2 min-w-0 px-0", rt(b), X.stageRegion),
650
+ children: /* @__PURE__ */ J("ul", {
640
651
  role: "list",
641
652
  className: "flex min-w-0 flex-col gap-0.5",
642
- children: y && p.map((e, t) => /* @__PURE__ */ W("li", {
653
+ children: y && p.map((e, t) => /* @__PURE__ */ J("li", {
643
654
  role: "listitem",
644
655
  className: "min-w-0",
645
- children: /* @__PURE__ */ W(at, {
656
+ children: /* @__PURE__ */ J(it, {
646
657
  node: e,
647
658
  depth: b,
648
659
  nameOverride: f(t + 1),
@@ -655,23 +666,23 @@ var K = {
655
666
  }, e.stage.index))
656
667
  })
657
668
  });
658
- }, st = ({ nodes: e, depth: t, className: n, ...r }) => /* @__PURE__ */ W("ul", {
669
+ }, ot = ({ nodes: e, depth: t, className: n, ...r }) => /* @__PURE__ */ J("ul", {
659
670
  role: "list",
660
671
  className: c("flex min-w-0 flex-col gap-0.5", n),
661
- children: Ne(e).map((e) => /* @__PURE__ */ W("li", {
672
+ children: je(e).map((e) => /* @__PURE__ */ J("li", {
662
673
  role: "listitem",
663
674
  className: "min-w-0",
664
- children: e.node ? /* @__PURE__ */ W(at, {
675
+ children: e.node ? /* @__PURE__ */ J(it, {
665
676
  node: e.node,
666
677
  depth: t,
667
678
  ...r
668
- }) : /* @__PURE__ */ W(ot, {
679
+ }) : /* @__PURE__ */ J(at, {
669
680
  row: e,
670
681
  depth: t,
671
682
  ...r
672
683
  })
673
684
  }, e.key))
674
- }), Q = ({ stages: e, isStreaming: t, className: n, styles: r, labels: i, onAttachmentClick: a, expansion: o }) => {
685
+ }), st = ({ stages: e, isStreaming: t, className: n, styles: r, labels: i, onAttachmentClick: a, expansion: o }) => {
675
686
  let { colors: l, typography: u } = r ?? {}, d = s({
676
687
  "--cs-text": l?.text,
677
688
  "--cs-row-hover": l?.rowHoverColor,
@@ -688,11 +699,11 @@ var K = {
688
699
  "--cs-code-border": l?.codeBorderColor,
689
700
  "--cs-code-text": l?.codeTextColor,
690
701
  "--cs-border": l?.borderColor
691
- }), f = V(() => Oe(e), [e]);
692
- return /* @__PURE__ */ W("div", {
702
+ }), f = K(() => Ee(e), [e]);
703
+ return /* @__PURE__ */ J("div", {
693
704
  style: d,
694
- className: c("w-full min-w-0", J.panel, n, K.panel),
695
- children: /* @__PURE__ */ W(st, {
705
+ className: c("w-full min-w-0", X.panel, n, ge.panel),
706
+ children: /* @__PURE__ */ J(ot, {
696
707
  nodes: f,
697
708
  depth: 0,
698
709
  className: "w-full ps-5",
@@ -704,8 +715,8 @@ var K = {
704
715
  })
705
716
  });
706
717
  }, ct = (e) => {
707
- let t = be();
708
- return /* @__PURE__ */ W(Q, {
718
+ let t = _e();
719
+ return /* @__PURE__ */ J(st, {
709
720
  ...e,
710
721
  expansion: t
711
722
  });
@@ -717,83 +728,86 @@ var K = {
717
728
  failedText: "_failedText_16fae_40",
718
729
  liveName: "_liveName_16fae_44"
719
730
  }, lt = ({ stages: e, isStreaming: t, labels: n, className: r, styles: i, onAttachmentClick: a }) => {
720
- let { executedLabel: l = "Executed", stepsLabel: u = () => "steps", failedCountLabel: m = (e) => `${e} failed`, runningAriaLabel: g = "Running", copyAriaLabel: _, failedAriaLabel: v, attemptLabel: b, attachmentClickLabel: x } = n ?? {}, [C, w] = H(t), T = be(), { reset: E } = T, D = e.length > 1;
721
- B(() => {
722
- D && !C && E();
731
+ 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] = q(t), O = _e(), { reset: k } = O, A = e.length > 1;
732
+ G(() => {
733
+ A && !E && k();
723
734
  }, [
724
- D,
725
- C,
726
- E
735
+ A,
736
+ E,
737
+ k
727
738
  ]);
728
- let O = ye(t);
729
- B(() => {
730
- O.current && !t && w(!1), O.current = t;
739
+ let j = me(t);
740
+ G(() => {
741
+ j.current && !t && D(!1), j.current = t;
731
742
  }, [t]);
732
- let { colors: k, panel: A } = i ?? {}, j = i?.typography ?? { fontClassName: "dial-small-text" }, M = s({
733
- "--cs-cg-label": k?.labelColor,
734
- "--cs-cg-label-hover": k?.labelHoverColor,
735
- "--cs-cg-done": k?.doneColor,
736
- "--cs-cg-failed": k?.failedColor,
737
- "--cs-text": A?.text,
738
- "--cs-row-hover": A?.rowHoverColor,
739
- "--cs-button-bg": A?.collapsedButtonBg,
740
- "--cs-stage-text": A?.stageTextColor,
741
- "--cs-failed-text": A?.failedColor,
742
- "--cs-tag-text": A?.tagTextColor,
743
- "--cs-count-text": A?.countTextColor,
744
- "--cs-duration-text": A?.durationTextColor,
745
- "--cs-icon-secondary": A?.iconSecondaryColor,
746
- "--cs-icon-completed": A?.iconCompletedColor,
747
- "--cs-icon-error": A?.iconErrorColor,
748
- "--cs-code-bg": A?.codeBg,
749
- "--cs-code-border": A?.codeBorderColor,
750
- "--cs-code-text": A?.codeTextColor,
751
- "--cs-border": A?.borderColor
743
+ let { colors: M, panel: N } = i ?? {}, P = i?.typography ?? { fontClassName: "dial-small-text" }, F = s({
744
+ "--cs-cg-label": M?.labelColor,
745
+ "--cs-cg-label-hover": M?.labelHoverColor,
746
+ "--cs-cg-done": M?.doneColor,
747
+ "--cs-cg-failed": M?.failedColor,
748
+ "--cs-text": N?.text,
749
+ "--cs-row-hover": N?.rowHoverColor,
750
+ "--cs-button-bg": N?.collapsedButtonBg,
751
+ "--cs-stage-text": N?.stageTextColor,
752
+ "--cs-failed-text": N?.failedColor,
753
+ "--cs-tag-text": N?.tagTextColor,
754
+ "--cs-count-text": N?.countTextColor,
755
+ "--cs-duration-text": N?.durationTextColor,
756
+ "--cs-icon-secondary": N?.iconSecondaryColor,
757
+ "--cs-icon-completed": N?.iconCompletedColor,
758
+ "--cs-icon-error": N?.iconErrorColor,
759
+ "--cs-code-bg": N?.codeBg,
760
+ "--cs-code-border": N?.codeBorderColor,
761
+ "--cs-code-text": N?.codeTextColor,
762
+ "--cs-border": N?.borderColor
752
763
  });
753
764
  if (e.length === 0) return null;
754
- let N = {
765
+ let I = {
755
766
  copyAriaLabel: _,
767
+ codeBlockCopiedLabel: v,
768
+ tableScrollRegionAriaLabel: b,
769
+ mathScrollRegionAriaLabel: x,
756
770
  runningAriaLabel: g,
757
- failedAriaLabel: v,
758
- attemptLabel: b,
759
- attachmentClickLabel: x
771
+ failedAriaLabel: C,
772
+ attemptLabel: w,
773
+ attachmentClickLabel: T
760
774
  };
761
- if (e.length === 1) return /* @__PURE__ */ W(Q, {
775
+ if (e.length === 1) return /* @__PURE__ */ J(st, {
762
776
  stages: e,
763
777
  isStreaming: t,
764
- expansion: T,
778
+ expansion: O,
765
779
  className: r,
766
780
  styles: {
767
- colors: A,
781
+ colors: N,
768
782
  typography: i?.typography
769
783
  },
770
- labels: N,
784
+ labels: I,
771
785
  onAttachmentClick: a
772
786
  });
773
- let P = e.some((e) => e.status === o.Failed), F;
787
+ let L = e.some((e) => e.status === o.Failed), R;
774
788
  if (t) {
775
- let t = q((Ee(e) ?? e[e.length - 1]).name).name;
776
- F = /* @__PURE__ */ G("span", {
789
+ let t = Se((we(e) ?? e[e.length - 1]).name).name;
790
+ R = /* @__PURE__ */ Y("span", {
777
791
  role: "status",
778
792
  "aria-live": "polite",
779
793
  className: "flex min-w-0 items-center gap-2",
780
- children: [/* @__PURE__ */ W("span", {
794
+ children: [/* @__PURE__ */ J("span", {
781
795
  className: "flex flex-none items-center",
782
- children: /* @__PURE__ */ W(y, {
796
+ children: /* @__PURE__ */ J(y, {
783
797
  size: 14,
784
798
  ariaLabel: g
785
799
  })
786
- }), t && /* @__PURE__ */ W("span", {
787
- className: c("min-w-0 max-w-[22rem] truncate", j.fontClassName, $.liveName),
788
- children: /* @__PURE__ */ W(h, { text: t })
800
+ }), t && /* @__PURE__ */ J("span", {
801
+ className: c("min-w-0 max-w-[22rem] truncate", P.fontClassName, $.liveName),
802
+ children: /* @__PURE__ */ J(h, { text: t })
789
803
  })]
790
804
  });
791
- } else if (P) {
805
+ } else if (L) {
792
806
  let t = e.filter((e) => e.status === o.Failed).length;
793
- F = /* @__PURE__ */ G("span", {
807
+ R = /* @__PURE__ */ Y("span", {
794
808
  className: "inline-flex items-center gap-1",
795
- children: [/* @__PURE__ */ G("span", {
796
- className: c(j.fontClassName, $.executedLabel),
809
+ children: [/* @__PURE__ */ Y("span", {
810
+ className: c(P.fontClassName, $.executedLabel),
797
811
  children: [
798
812
  l,
799
813
  " ",
@@ -801,20 +815,20 @@ var K = {
801
815
  " ",
802
816
  u(e.length)
803
817
  ]
804
- }), /* @__PURE__ */ W("span", {
805
- className: c(j.fontClassName, $.failedText),
818
+ }), /* @__PURE__ */ J("span", {
819
+ className: c(P.fontClassName, $.failedText),
806
820
  children: m(t)
807
821
  })]
808
822
  });
809
- } else F = /* @__PURE__ */ G("span", {
823
+ } else R = /* @__PURE__ */ Y("span", {
810
824
  className: "inline-flex items-center gap-1",
811
- children: [/* @__PURE__ */ W(S, {
825
+ children: [/* @__PURE__ */ J(S, {
812
826
  size: f.SM,
813
827
  className: $.doneIcon,
814
828
  "aria-hidden": !0,
815
829
  stroke: p
816
- }), /* @__PURE__ */ G("span", {
817
- className: c(j.fontClassName, $.executedLabel),
830
+ }), /* @__PURE__ */ Y("span", {
831
+ className: c(P.fontClassName, $.executedLabel),
818
832
  children: [
819
833
  l,
820
834
  " ",
@@ -824,25 +838,25 @@ var K = {
824
838
  ]
825
839
  })]
826
840
  });
827
- return /* @__PURE__ */ W("div", {
828
- style: M,
829
- className: c("flex w-full flex-col gap-1", r, K.group),
830
- children: /* @__PURE__ */ W(d, {
831
- title: F,
832
- expanded: C,
833
- onToggle: w,
841
+ return /* @__PURE__ */ J("div", {
842
+ style: F,
843
+ className: c("flex w-full flex-col gap-1", r, ge.group),
844
+ children: /* @__PURE__ */ J(d, {
845
+ title: R,
846
+ expanded: E,
847
+ onToggle: D,
834
848
  className: "overflow-visible py-0",
835
- headerClassName: c("justify-start gap-1 rounded-none px-0", $.toggleButton, K.groupToggle),
849
+ headerClassName: c("justify-start gap-1 rounded-none px-0", $.toggleButton, ge.groupToggle),
836
850
  contentClassName: c("-mt-2 px-0", $.groupRegion),
837
- children: C && /* @__PURE__ */ W(Q, {
851
+ children: E && /* @__PURE__ */ J(st, {
838
852
  stages: e,
839
853
  isStreaming: t,
840
- expansion: T,
854
+ expansion: O,
841
855
  styles: {
842
- colors: A,
856
+ colors: N,
843
857
  typography: i?.typography
844
858
  },
845
- labels: N,
859
+ labels: I,
846
860
  className: "pt-1",
847
861
  onAttachmentClick: a
848
862
  })
@@ -850,4 +864,4 @@ var K = {
850
864
  });
851
865
  };
852
866
  //#endregion
853
- export { K as CONVERSATION_STAGES_CLASS, lt as CollapsedGroup, ct as StagesPanel };
867
+ export { ge as CONVERSATION_STAGES_CLASS, lt as CollapsedGroup, ct as StagesPanel };
@@ -35,8 +35,14 @@ export interface CollapsedGroupLabels {
35
35
  failedCountLabel?: (failedCount: number) => string;
36
36
  /** Accessible label announced for the running summary's spinner. Defaults to `'Running'`. */
37
37
  runningAriaLabel?: string;
38
- /** Accessible label for the copy button on each stage's content. Defaults to `'Copy'`. */
38
+ /** Accessible label for the copy button on each stage content code block. Defaults to `'Copy stage content'`. */
39
39
  copyAriaLabel?: string;
40
+ /** Status announced after a stage content code block has been copied. Defaults to `'Copied!'`. */
41
+ codeBlockCopiedLabel?: string;
42
+ /** Accessible label for a table's horizontally scrollable region in stage content. Defaults to `'Scrollable table'`. */
43
+ tableScrollRegionAriaLabel?: string;
44
+ /** Accessible label for a block formula's horizontally scrollable region in stage content. Defaults to `'Scrollable formula'`. */
45
+ mathScrollRegionAriaLabel?: string;
40
46
  /** Visually-hidden label announced alongside a failed stage's icon. Defaults to `'Failed'`. */
41
47
  failedAriaLabel?: string;
42
48
  /** Returns the label for a single attempt inside a collapsed `×N` group. Defaults to `(n) => \`Attempt ${n}\``. */
@@ -1 +1 @@
1
- {"version":3,"file":"collapsed-group.d.ts","sourceRoot":"","sources":["../../src/models/collapsed-group.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,2FAA2F;AAC3F,MAAM,WAAW,oBAAoB;IACnC,iDAAiD;IACjD,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AAM,CAAC;IACnD,6FAA6F;IAC7F,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iHAAiH;IACjH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kGAAkG;IAClG,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,wHAAwH;IACxH,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,kIAAkI;IAClI,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,+FAA+F;IAC/F,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mHAAmH;IACnH,YAAY,CAAC,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,MAAM,CAAC;IACjD,sHAAsH;IACtH,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,wDAAwD;AACxD,MAAM,WAAW,mBAAmB;IAClC,yCAAyC;IACzC,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,8FAA8F;IAC9F,WAAW,EAAE,OAAO,CAAC;IACrB,kDAAkD;IAClD,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,gHAAgH;IAChH,iBAAiB,CAAC,EAAE,CAAC,UAAU,EAAE,iBAAiB,KAAK,IAAI,CAAC;CAC7D"}
@@ -60,8 +60,14 @@ export interface StagesPanelStyles {
60
60
  }
61
61
  /** User-visible strings for the `StagesPanel` component. */
62
62
  export interface StagesPanelLabels {
63
- /** Accessible label for the copy button on each stage's content. Defaults to `'Copy'`. */
63
+ /** Accessible label for the copy button on each stage content code block. Defaults to `'Copy stage content'`. */
64
64
  copyAriaLabel?: string;
65
+ /** Status announced after a stage content code block has been copied. Defaults to `'Copied!'`. */
66
+ codeBlockCopiedLabel?: string;
67
+ /** Accessible label for a table's horizontally scrollable region in stage content. Defaults to `'Scrollable table'`. */
68
+ tableScrollRegionAriaLabel?: string;
69
+ /** Accessible label for a block formula's horizontally scrollable region in stage content. Defaults to `'Scrollable formula'`. */
70
+ mathScrollRegionAriaLabel?: string;
65
71
  /** Accessible label announced for a running stage's spinner. Defaults to `'Running'`. */
66
72
  runningAriaLabel?: string;
67
73
  /** Visually-hidden label announced alongside a failed stage's icon. Defaults to `'Failed'`. */
@@ -1 +1 @@
1
- {"version":3,"file":"stages-props.d.ts","sourceRoot":"","sources":["../../src/models/stages-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAE1E,gGAAgG;AAChG,MAAM,WAAW,eAAe;IAC9B,yFAAyF;IACzF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wJAAwJ;IACxJ,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kJAAkJ;IAClJ,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kIAAkI;IAClI,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,0JAA0J;IAC1J,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uFAAuF;IACvF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,6GAA6G;IAC7G,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,gIAAgI;IAChI,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,2EAA2E;AAC3E,MAAM,WAAW,iBAAiB;IAChC,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qEAAqE;IACrE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wEAAwE;IACxE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,qEAAqE;IACrE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wFAAwF;IACxF,cAAc,CAAC,EAAE,MAAM,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B,CAAC;IAC3B,wGAAwG;IACxG,iBAAiB,CAAC,EAAE,CAAC,UAAU,EAAE,iBAAiB,KAAK,IAAI,CAAC;CAC7D"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-conversation-stages",
3
3
  "description": "Panel for displaying agent processing stages during LLM response streaming",
4
- "version": "1.2.0-dev.288",
4
+ "version": "1.2.0-dev.300",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -18,12 +18,12 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@tabler/icons-react": "^3.44.0",
21
- "@epam/ai-dial-attachment-input": "1.2.0-dev.288"
21
+ "@epam/ai-dial-attachment-input": "1.2.0-dev.300"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "react": "^19.2.8",
25
- "@epam/ai-dial-chat-shared": "1.2.0-dev.288",
26
- "@epam/ai-dial-ui-kit": "^0.15.0-dev.36"
25
+ "@epam/ai-dial-chat-shared": "1.2.0-dev.300",
26
+ "@epam/ai-dial-ui-kit": "^0.15.0-dev.39"
27
27
  },
28
28
  "repository": {
29
29
  "type": "git",