@epam/ai-dial-conversation-stages 1.2.0-dev.133 → 1.2.0-dev.139

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":"AAiBA,OAAO,EAAE,EAAE,EAA+B,MAAM,OAAO,CAAC;AAExD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAUxE,gJAAgJ;AAChJ,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAqPlD,CAAC"}
1
+ {"version":3,"file":"CollapsedGroup.d.ts","sourceRoot":"","sources":["../../../src/components/CollapsedGroup/CollapsedGroup.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,EAAE,EAA+B,MAAM,OAAO,CAAC;AAExD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAUxE,gJAAgJ;AAChJ,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CA0OlD,CAAC"}
package/index.css CHANGED
@@ -1,2 +1,2 @@
1
1
  ._panel_vd48n_1{color:var(--cs-text,var(--text-primary,#161b2d))}._row_vd48n_5:hover{background:var(--cs-row-hover,var(--bg-layer-sunken,#eef1f7))}._collapseButton_vd48n_9{background:var(--cs-button-bg,transparent)}._stageName_vd48n_13{color:var(--cs-stage-text,var(--text-secondary,#57647a))}._stageNameFailed_vd48n_17{color:var(--cs-failed-text,var(--text-warning,#7f6300))}._monoName_vd48n_21{font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace}._tag_vd48n_25{color:var(--cs-tag-text,var(--text-tertiary,#848e9c))}._count_vd48n_29{color:var(--cs-count-text,var(--text-tertiary,#848e9c));font-variant-numeric:tabular-nums}._duration_vd48n_34{color:var(--cs-duration-text,var(--text-tertiary,#848e9c));font-variant-numeric:tabular-nums}._iconSecondary_vd48n_39{color:var(--cs-icon-secondary,var(--text-secondary,#57647a));opacity:.7}._iconCompleted_vd48n_44{color:var(--cs-icon-completed,var(--text-tertiary,#848e9c))}._iconError_vd48n_48{color:var(--cs-icon-error,var(--text-warning,#7f6300))}._stageContent_vd48n_52{color:var(--cs-stage-text,var(--text-secondary,#57647a))}._codeBlock_vd48n_56{background:var(--cs-code-bg,var(--bg-layer-raised,#fcfcfc));border-color:var(--cs-code-border,var(--stroke-secondary,#d1dbea));color:var(--cs-code-text,var(--text-primary,#161b2d))}._codeInline_vd48n_62{background:var(--cs-code-bg,var(--bg-layer-raised,#fcfcfc));border:1px solid var(--cs-code-border,var(--stroke-secondary,#d1dbea));color:var(--cs-code-text,var(--text-primary,#161b2d))}._blockquote_vd48n_68{border-color:var(--cs-stage-text,var(--text-secondary,#57647a));color:var(--cs-stage-text,var(--text-secondary,#57647a))}._tableCell_vd48n_73{border-color:var(--cs-border,var(--stroke-secondary,#d1dbea));color:var(--cs-stage-text,var(--text-secondary,#57647a))}._toggleButton_1sa5v_1{color:var(--cs-cg-label,var(--text-secondary,#57647a));text-align:start;width:100%;min-width:0;justify-content:flex-start!important}._toggleButton_1sa5v_1:hover{color:var(--cs-cg-label-hover,var(--text-primary,#161b2d))}._executedLabel_1sa5v_13{color:var(--cs-cg-label,var(--text-secondary,#57647a))}._stepsCount_1sa5v_17{color:var(--cs-cg-steps-count,var(--text-tertiary,#848e9c));font-variant-numeric:tabular-nums}._doneIcon_1sa5v_22{color:var(--cs-cg-done,var(--text-success,#007274))}._failedText_1sa5v_26{color:var(--cs-cg-failed,var(--text-warning,#7f6300))}._liveName_1sa5v_30{color:var(--cs-cg-label,var(--text-primary,#161b2d))}
2
- /*$vite$:1*/.sr-only{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.collapse{visibility:collapse}.absolute{position:absolute}.relative{position:relative}.end-2{inset-inline-end:.5rem}.top-2{top:.5rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.max-h-\[300px\]{max-height:300px}.w-full{width:100%}.min-w-0{min-width:0}.max-w-\[22rem\]{max-width:22rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.cursor-pointer{cursor:pointer}.grid-rows-\[0fr\]{grid-template-rows:0fr}.grid-rows-\[1fr\]{grid-template-rows:1fr}.flex-col{flex-direction:column}.items-center{align-items:center}.gap-0{gap:0}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:4px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.p-3{padding:.75rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-1\.5{padding-bottom:.375rem;padding-top:.375rem}.ps-5{padding-inline-start:1.25rem}.ps-6{padding-inline-start:1.5rem}.ps-8{padding-inline-start:2rem}.pt-1{padding-top:.25rem}.text-start{text-align:start}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-\[grid-template-rows\]{transition-duration:.15s;transition-property:grid-template-rows;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.duration-\[250ms\]{transition-duration:.25s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.last\:mb-0:last-child{margin-bottom:0}.rtl\:scale-x-\[-1\]:where([dir=rtl],[dir=rtl] *){--tw-scale-x:-1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}
2
+ /*$vite$:1*/.sr-only{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.collapse{visibility:collapse}.absolute{position:absolute}.relative{position:relative}.end-2{inset-inline-end:.5rem}.top-2{top:.5rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.max-h-\[300px\]{max-height:300px}.w-full{width:100%}.min-w-0{min-width:0}.max-w-\[22rem\]{max-width:22rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.cursor-pointer{cursor:pointer}.grid-rows-\[0fr\]{grid-template-rows:0fr}.grid-rows-\[1fr\]{grid-template-rows:1fr}.flex-col{flex-direction:column}.items-center{align-items:center}.gap-0{gap:0}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded{border-radius:4px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.p-3{padding:.75rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-1\.5{padding-bottom:.375rem;padding-top:.375rem}.ps-5{padding-inline-start:1.25rem}.ps-6{padding-inline-start:1.5rem}.ps-8{padding-inline-start:2rem}.pt-1{padding-top:.25rem}.text-start{text-align:start}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-\[grid-template-rows\]{transition-duration:.15s;transition-property:grid-template-rows;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.duration-\[250ms\]{transition-duration:.25s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.last\:mb-0:last-child{margin-bottom:0}.rtl\:scale-x-\[-1\]:where([dir=rtl],[dir=rtl] *){--tw-scale-x:-1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}
package/index.js CHANGED
@@ -58,7 +58,7 @@ var T = {
58
58
  }).sort((e, t) => e.start - t.start), a = 0, o = i[0].start, s = i[0].end;
59
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
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) => {
61
+ }, z = (e) => [...e].reverse().find((e) => e.status == null), B = (e) => {
62
62
  let t = [], n = 0;
63
63
  for (; n < e.length;) {
64
64
  let r = e[n], i = P(r.name).name, a = n + 1;
@@ -74,7 +74,7 @@ var T = {
74
74
  }), n = a;
75
75
  }
76
76
  return t;
77
- }, H = {
77
+ }, V = {
78
78
  panel: "_panel_vd48n_1",
79
79
  row: "_row_vd48n_5",
80
80
  collapseButton: "_collapseButton_vd48n_9",
@@ -92,9 +92,9 @@ var T = {
92
92
  codeInline: "_codeInline_vd48n_62",
93
93
  blockquote: "_blockquote_vd48n_68",
94
94
  tableCell: "_tableCell_vd48n_73"
95
- }, U = ({ status: e, isLive: n, runningLabel: r = "Running", failedLabel: i = "Failed" }) => e === t.Failed ? /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(f, {
95
+ }, H = ({ status: e, isLive: n, runningLabel: r = "Running", failedLabel: i = "Failed" }) => e === t.Failed ? /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(f, {
96
96
  size: a.MD,
97
- className: H.iconError,
97
+ className: V.iconError,
98
98
  "aria-hidden": !0,
99
99
  stroke: o
100
100
  }), /* @__PURE__ */ C("span", {
@@ -102,13 +102,13 @@ var T = {
102
102
  children: i
103
103
  })] }) : e === t.Completed ? /* @__PURE__ */ C(p, {
104
104
  size: a.SM,
105
- className: H.iconCompleted,
105
+ className: V.iconCompleted,
106
106
  "aria-hidden": !0,
107
107
  stroke: o
108
108
  }) : n ? /* @__PURE__ */ C(d, {
109
109
  size: 16,
110
110
  ariaLabel: r
111
- }) : null, W = ({ children: e, codeClassName: t, blockClassName: n = "dial-code-text", copyAriaLabel: c }) => {
111
+ }) : null, U = ({ children: e, codeClassName: t, blockClassName: n = "dial-code-text", copyAriaLabel: c }) => {
112
112
  let [u, d] = x(!1), f = b(null);
113
113
  y(() => () => {
114
114
  f.current != null && clearTimeout(f.current);
@@ -117,12 +117,12 @@ var T = {
117
117
  r(typeof e == "string" ? e : String(e ?? "")), f.current && clearTimeout(f.current), d(!0), f.current = setTimeout(() => d(!1), 2e3);
118
118
  }, [e]);
119
119
  return /* @__PURE__ */ w("pre", {
120
- className: i("relative max-h-[300px] overflow-auto rounded border p-3", n, H.codeBlock),
120
+ className: i("relative max-h-[300px] overflow-auto rounded border p-3", n, V.codeBlock),
121
121
  children: [/* @__PURE__ */ C(l, {
122
122
  size: s.Small,
123
123
  icon: C(u ? p : g, {
124
124
  size: a.SM,
125
- className: H.iconSecondary,
125
+ className: V.iconSecondary,
126
126
  stroke: o
127
127
  }),
128
128
  "aria-label": c,
@@ -133,8 +133,8 @@ var T = {
133
133
  children: e
134
134
  })]
135
135
  });
136
- }, G = _(({ content: t, typography: n, copyAriaLabel: r = "Copy" }) => {
137
- let a = "mb-1.5 last:mb-0", o = i(n?.headingClassName ?? "dial-small-semi-text", H.stageContent, a);
136
+ }, W = _(({ content: t, typography: n, copyAriaLabel: r = "Copy" }) => {
137
+ let a = "mb-1.5 last:mb-0", o = i(n?.headingClassName ?? "dial-small-semi-text", V.stageContent, a);
138
138
  return /* @__PURE__ */ C(e, {
139
139
  content: t,
140
140
  classNames: {
@@ -144,30 +144,30 @@ var T = {
144
144
  h4: o,
145
145
  h5: o,
146
146
  h6: o,
147
- p: i(n?.contentClassName ?? "dial-tiny-text", H.stageContent, "mb-1.5"),
148
- ul: i(n?.contentClassName ?? "dial-tiny-text", H.stageContent, a),
149
- ol: i(n?.contentClassName ?? "dial-tiny-text", H.stageContent, a),
150
- strong: i(n?.strongClassName ?? n?.contentClassName ?? "dial-tiny-text", H.stageContent),
151
- codeInline: H.codeInline,
152
- blockquote: i(n?.contentClassName ?? "dial-tiny-text", H.blockquote, a),
153
- link: i(n?.contentClassName ?? "dial-tiny-text", H.stageContent),
154
- tableCell: i(n?.contentClassName ?? "dial-tiny-text", H.tableCell)
147
+ p: i(n?.contentClassName ?? "dial-tiny-text", V.stageContent, "mb-1.5"),
148
+ ul: i(n?.contentClassName ?? "dial-tiny-text", V.stageContent, a),
149
+ ol: i(n?.contentClassName ?? "dial-tiny-text", V.stageContent, a),
150
+ strong: i(n?.strongClassName ?? n?.contentClassName ?? "dial-tiny-text", V.stageContent),
151
+ codeInline: V.codeInline,
152
+ blockquote: i(n?.contentClassName ?? "dial-tiny-text", V.blockquote, a),
153
+ link: i(n?.contentClassName ?? "dial-tiny-text", V.stageContent),
154
+ tableCell: i(n?.contentClassName ?? "dial-tiny-text", V.tableCell)
155
155
  },
156
- components: { code: ({ children: e, className: t }) => t?.includes("language-") ? /* @__PURE__ */ C(W, {
156
+ components: { code: ({ children: e, className: t }) => t?.includes("language-") ? /* @__PURE__ */ C(U, {
157
157
  codeClassName: t,
158
158
  blockClassName: n?.codeBlockClassName,
159
159
  copyAriaLabel: r,
160
160
  children: e
161
161
  }) : /* @__PURE__ */ C("code", {
162
- className: i("inline-block px-1.5 py-1", n?.codeClassName ?? "dial-code-text rounded-md", H.codeInline),
162
+ className: i("inline-block px-1.5 py-1", n?.codeClassName ?? "dial-code-text rounded-md", V.codeInline),
163
163
  children: e
164
164
  }) }
165
165
  });
166
- }), K = ({ stage: e, isLive: n, typography: r, labels: s, nameOverride: l }) => {
166
+ }), G = ({ stage: e, isLive: n, typography: r, labels: s, nameOverride: l }) => {
167
167
  let [u, d] = x(!1), { copyAriaLabel: f = "Copy stage content", runningAriaLabel: p, failedAriaLabel: g } = s ?? {}, { name: _, durationLabel: v } = P(e.name), y = l ?? _, b = !l && F(_), T = e.status === t.Failed, E = !!e.content, D = /* @__PURE__ */ w(S, { children: [
168
168
  /* @__PURE__ */ C("span", {
169
169
  className: "flex flex-none items-center",
170
- children: /* @__PURE__ */ C(U, {
170
+ children: /* @__PURE__ */ C(H, {
171
171
  status: e.status,
172
172
  isLive: n,
173
173
  runningLabel: p,
@@ -175,19 +175,19 @@ var T = {
175
175
  })
176
176
  }),
177
177
  /* @__PURE__ */ C("span", {
178
- className: i("min-w-0 max-w-[22rem] truncate", r?.fontClassName ?? "dial-small-text", H.stageName, T && H.stageNameFailed, b && H.monoName),
178
+ className: i("min-w-0 max-w-[22rem] truncate", r?.fontClassName ?? "dial-small-text", V.stageName, T && V.stageNameFailed, b && V.monoName),
179
179
  children: /* @__PURE__ */ C(c, { text: y || e.status || "" })
180
180
  }),
181
181
  e.tag && /* @__PURE__ */ C("span", {
182
- className: i("flex-none", r?.tagClassName ?? "dial-tiny-lead-text", H.tag),
182
+ className: i("flex-none", r?.tagClassName ?? "dial-tiny-lead-text", V.tag),
183
183
  children: e.tag
184
184
  }),
185
185
  v && /* @__PURE__ */ C("span", {
186
- className: i("flex-none", r?.countFontClassName ?? "dial-tiny-text", H.duration),
186
+ className: i("flex-none", r?.countFontClassName ?? "dial-tiny-text", V.duration),
187
187
  children: v
188
188
  }),
189
189
  E && /* @__PURE__ */ C("span", {
190
- className: i("flex-none", H.iconSecondary),
190
+ className: i("flex-none", V.iconSecondary),
191
191
  children: u ? /* @__PURE__ */ C(m, {
192
192
  size: a.SM,
193
193
  "aria-hidden": !0,
@@ -199,7 +199,7 @@ var T = {
199
199
  stroke: o
200
200
  })
201
201
  })
202
- ] }), O = i("flex w-full items-center gap-2 px-2 py-1.5", H.row);
202
+ ] }), O = i("flex w-full items-center gap-2 px-2 py-1.5", V.row);
203
203
  return E ? /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("div", {
204
204
  className: O,
205
205
  children: /* @__PURE__ */ C("button", {
@@ -217,7 +217,7 @@ var T = {
217
217
  className: "mt-2 flex flex-col gap-3 py-1 ps-8",
218
218
  children: e.content && /* @__PURE__ */ C("div", {
219
219
  className: "max-h-[300px] overflow-y-auto",
220
- children: /* @__PURE__ */ C(G, {
220
+ children: /* @__PURE__ */ C(W, {
221
221
  content: e.content,
222
222
  typography: r,
223
223
  copyAriaLabel: f
@@ -229,17 +229,17 @@ var T = {
229
229
  className: O,
230
230
  children: D
231
231
  });
232
- }, q = ({ row: e, isLive: n, typography: r, labels: s }) => {
232
+ }, K = ({ row: e, isLive: n, typography: r, labels: s }) => {
233
233
  let { runningAriaLabel: l, failedAriaLabel: u, attemptLabel: d = (e) => `Attempt ${e}` } = s ?? {}, [f, p] = x(!1), g = e.attempts?.some((e) => e.status == null) ?? !1, _ = e.attempts?.some((e) => e.status === t.Failed), v = g ? null : _ ? t.Failed : t.Completed, y = R((e.attempts || []).map((e) => e.name)), b = y > 0 ? I(y) : void 0;
234
234
  return /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ w("button", {
235
235
  type: "button",
236
236
  onClick: () => p((e) => !e),
237
237
  "aria-expanded": f,
238
- className: i("flex w-full items-center gap-2 rounded-lg px-2 py-1.5 text-start", H.collapseButton, H.row),
238
+ className: i("flex w-full items-center gap-2 rounded-lg px-2 py-1.5 text-start", V.collapseButton, V.row),
239
239
  children: [
240
240
  /* @__PURE__ */ C("span", {
241
241
  className: "flex flex-none items-center",
242
- children: /* @__PURE__ */ C(U, {
242
+ children: /* @__PURE__ */ C(H, {
243
243
  status: v,
244
244
  isLive: n,
245
245
  runningLabel: l,
@@ -247,19 +247,19 @@ var T = {
247
247
  })
248
248
  }),
249
249
  /* @__PURE__ */ C("span", {
250
- className: i("min-w-0 max-w-[22rem] truncate", r?.fontClassName ?? "dial-small-text", H.stageName, _ && H.stageNameFailed),
250
+ className: i("min-w-0 max-w-[22rem] truncate", r?.fontClassName ?? "dial-small-text", V.stageName, _ && V.stageNameFailed),
251
251
  children: /* @__PURE__ */ C(c, { text: e.name })
252
252
  }),
253
253
  /* @__PURE__ */ w("span", {
254
- className: i("flex-none", r?.countFontClassName ?? "dial-tiny-text", H.count),
254
+ className: i("flex-none", r?.countFontClassName ?? "dial-tiny-text", V.count),
255
255
  children: ["×", e.attempts?.length ?? 0]
256
256
  }),
257
257
  b && /* @__PURE__ */ C("span", {
258
- className: i("flex-none", r?.countFontClassName ?? "dial-tiny-text", H.duration),
258
+ className: i("flex-none", r?.countFontClassName ?? "dial-tiny-text", V.duration),
259
259
  children: b
260
260
  }),
261
261
  /* @__PURE__ */ C("span", {
262
- className: i("flex-none", H.iconSecondary),
262
+ className: i("flex-none", V.iconSecondary),
263
263
  children: f ? /* @__PURE__ */ C(m, {
264
264
  size: a.SM,
265
265
  "aria-hidden": !0,
@@ -281,7 +281,7 @@ var T = {
281
281
  className: "mt-1 flex flex-col gap-0.5 ps-6",
282
282
  children: e.attempts?.map((e, t) => /* @__PURE__ */ C("li", {
283
283
  role: "listitem",
284
- children: /* @__PURE__ */ C(K, {
284
+ children: /* @__PURE__ */ C(G, {
285
285
  stage: e,
286
286
  nameOverride: d(t + 1),
287
287
  isLive: n && e.status == null,
@@ -292,7 +292,7 @@ var T = {
292
292
  })
293
293
  })
294
294
  })] });
295
- }, J = ({ stages: e, isStreaming: t, className: r, styles: a, labels: o }) => {
295
+ }, q = ({ stages: e, isStreaming: t, className: r, styles: a, labels: o }) => {
296
296
  let { colors: s, typography: c } = a ?? {}, l = n({
297
297
  "--cs-text": s?.text,
298
298
  "--cs-row-hover": s?.rowHoverColor,
@@ -309,16 +309,16 @@ var T = {
309
309
  "--cs-code-border": s?.codeBorderColor,
310
310
  "--cs-code-text": s?.codeTextColor,
311
311
  "--cs-border": s?.borderColor
312
- }), u = V(e);
312
+ }), u = B(e);
313
313
  return /* @__PURE__ */ C("div", {
314
314
  style: l,
315
- className: i("w-full", H.panel, r, T.panel),
315
+ className: i("w-full", V.panel, r, T.panel),
316
316
  children: /* @__PURE__ */ C("ul", {
317
317
  role: "list",
318
318
  className: "flex w-full flex-col gap-0.5 ps-5",
319
319
  children: u.map((e) => e.stage ? /* @__PURE__ */ C("li", {
320
320
  role: "listitem",
321
- children: /* @__PURE__ */ C(K, {
321
+ children: /* @__PURE__ */ C(G, {
322
322
  stage: e.stage,
323
323
  isLive: t && e.stage.status == null,
324
324
  typography: c,
@@ -326,7 +326,7 @@ var T = {
326
326
  })
327
327
  }, e.key) : /* @__PURE__ */ C("li", {
328
328
  role: "listitem",
329
- children: /* @__PURE__ */ C(q, {
329
+ children: /* @__PURE__ */ C(K, {
330
330
  row: e,
331
331
  isLive: t && (e.attempts?.some((e) => e.status == null) ?? !1),
332
332
  typography: c,
@@ -335,89 +335,82 @@ var T = {
335
335
  }, e.key))
336
336
  })
337
337
  });
338
- }, Y = {
338
+ }, J = {
339
339
  toggleButton: "_toggleButton_1sa5v_1",
340
340
  executedLabel: "_executedLabel_1sa5v_13",
341
341
  stepsCount: "_stepsCount_1sa5v_17",
342
342
  doneIcon: "_doneIcon_1sa5v_22",
343
343
  failedText: "_failedText_1sa5v_26",
344
344
  liveName: "_liveName_1sa5v_30"
345
- }, X = ({ stages: e, isStreaming: r, labels: s, className: l, styles: f }) => {
346
- let { executedLabel: g = "Executed", stepsLabel: _ = () => "steps", failedCountLabel: v = (e) => `${e} failed`, runningStepLabel: S = (e, t) => `Step ${e} of ${t}`, runningAriaLabel: E = "Running", copyAriaLabel: D, failedAriaLabel: O, attemptLabel: k } = s ?? {}, [A, j] = x(r), M = b(r);
345
+ }, Y = ({ stages: e, isStreaming: r, labels: s, className: l, styles: f }) => {
346
+ let { executedLabel: g = "Executed", stepsLabel: _ = () => "steps", failedCountLabel: v = (e) => `${e} failed`, runningAriaLabel: S = "Running", copyAriaLabel: E, failedAriaLabel: D, attemptLabel: O } = s ?? {}, [k, A] = x(r), j = b(r);
347
347
  y(() => {
348
- M.current && !r && j(!1), M.current = r;
348
+ j.current && !r && A(!1), j.current = r;
349
349
  }, [r]);
350
- let { colors: N, panel: F } = f ?? {}, L = f?.typography ?? { fontClassName: "dial-small-text" }, V = n({
351
- "--cs-cg-label": N?.labelColor,
352
- "--cs-cg-label-hover": N?.labelHoverColor,
353
- "--cs-cg-steps-count": N?.stepsCountColor,
354
- "--cs-cg-done": N?.doneColor,
355
- "--cs-cg-failed": N?.failedColor,
356
- "--cs-text": F?.text,
357
- "--cs-row-hover": F?.rowHoverColor,
358
- "--cs-button-bg": F?.collapsedButtonBg,
359
- "--cs-stage-text": F?.stageTextColor,
360
- "--cs-failed-text": F?.failedColor,
361
- "--cs-tag-text": F?.tagTextColor,
362
- "--cs-count-text": F?.countTextColor,
363
- "--cs-duration-text": F?.durationTextColor,
364
- "--cs-icon-secondary": F?.iconSecondaryColor,
365
- "--cs-icon-completed": F?.iconCompletedColor,
366
- "--cs-icon-error": F?.iconErrorColor,
367
- "--cs-code-bg": F?.codeBg,
368
- "--cs-code-border": F?.codeBorderColor,
369
- "--cs-code-text": F?.codeTextColor,
370
- "--cs-border": F?.borderColor
350
+ let { colors: M, panel: N } = f ?? {}, F = f?.typography ?? { fontClassName: "dial-small-text" }, L = n({
351
+ "--cs-cg-label": M?.labelColor,
352
+ "--cs-cg-label-hover": M?.labelHoverColor,
353
+ "--cs-cg-steps-count": M?.stepsCountColor,
354
+ "--cs-cg-done": M?.doneColor,
355
+ "--cs-cg-failed": M?.failedColor,
356
+ "--cs-text": N?.text,
357
+ "--cs-row-hover": N?.rowHoverColor,
358
+ "--cs-button-bg": N?.collapsedButtonBg,
359
+ "--cs-stage-text": N?.stageTextColor,
360
+ "--cs-failed-text": N?.failedColor,
361
+ "--cs-tag-text": N?.tagTextColor,
362
+ "--cs-count-text": N?.countTextColor,
363
+ "--cs-duration-text": N?.durationTextColor,
364
+ "--cs-icon-secondary": N?.iconSecondaryColor,
365
+ "--cs-icon-completed": N?.iconCompletedColor,
366
+ "--cs-icon-error": N?.iconErrorColor,
367
+ "--cs-code-bg": N?.codeBg,
368
+ "--cs-code-border": N?.codeBorderColor,
369
+ "--cs-code-text": N?.codeTextColor,
370
+ "--cs-border": N?.borderColor
371
371
  });
372
372
  if (e.length === 0) return null;
373
- let H = {
374
- copyAriaLabel: D,
375
- runningAriaLabel: E,
376
- failedAriaLabel: O,
377
- attemptLabel: k
373
+ let B = {
374
+ copyAriaLabel: E,
375
+ runningAriaLabel: S,
376
+ failedAriaLabel: D,
377
+ attemptLabel: O
378
378
  };
379
- if (e.length === 1) return /* @__PURE__ */ C(J, {
379
+ if (e.length === 1) return /* @__PURE__ */ C(q, {
380
380
  stages: e,
381
381
  isStreaming: r,
382
382
  className: l,
383
383
  styles: {
384
- colors: F,
384
+ colors: N,
385
385
  typography: f?.typography
386
386
  },
387
- labels: H
387
+ labels: B
388
388
  });
389
- let U = e.some((e) => e.status === t.Failed), W = R(e.map((e) => e.name)), G = W > 0 ? I(W) : void 0, K = r ? z(e) : void 0, q;
389
+ let V = e.some((e) => e.status === t.Failed), H = R(e.map((e) => e.name)), U = H > 0 ? I(H) : void 0, W;
390
390
  if (r) {
391
- let t = K ? B(e, K) : e.length, n = K ? P(K.name).name : "";
392
- q = /* @__PURE__ */ w("span", {
391
+ let t = P((z(e) ?? e[e.length - 1]).name).name;
392
+ W = /* @__PURE__ */ w("span", {
393
393
  role: "status",
394
394
  "aria-live": "polite",
395
395
  className: "flex min-w-0 items-center gap-2",
396
- children: [
397
- /* @__PURE__ */ C("span", {
398
- className: "flex flex-none items-center",
399
- children: /* @__PURE__ */ C(d, {
400
- size: 14,
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 })
396
+ children: [/* @__PURE__ */ C("span", {
397
+ className: "flex flex-none items-center",
398
+ children: /* @__PURE__ */ C(d, {
399
+ size: 14,
400
+ ariaLabel: S
411
401
  })
412
- ]
402
+ }), t && /* @__PURE__ */ C("span", {
403
+ className: i("min-w-0 max-w-[22rem] truncate", F.fontClassName, J.liveName),
404
+ children: /* @__PURE__ */ C(c, { text: t })
405
+ })]
413
406
  });
414
- } else if (U) {
407
+ } else if (V) {
415
408
  let n = e.filter((e) => e.status === t.Failed).length;
416
- q = /* @__PURE__ */ w("span", {
409
+ W = /* @__PURE__ */ w("span", {
417
410
  className: "inline-flex items-center gap-1",
418
411
  children: [
419
412
  /* @__PURE__ */ w("span", {
420
- className: i(L.fontClassName, Y.executedLabel),
413
+ className: i(F.fontClassName, J.executedLabel),
421
414
  children: [
422
415
  g,
423
416
  " ",
@@ -427,26 +420,26 @@ var T = {
427
420
  ]
428
421
  }),
429
422
  /* @__PURE__ */ C("span", {
430
- className: i(L.fontClassName, Y.failedText),
423
+ className: i(F.fontClassName, J.failedText),
431
424
  children: v(n)
432
425
  }),
433
- G && /* @__PURE__ */ C("span", {
434
- className: i(L.fontClassName, Y.stepsCount),
435
- children: G
426
+ U && /* @__PURE__ */ C("span", {
427
+ className: i(F.fontClassName, J.stepsCount),
428
+ children: U
436
429
  })
437
430
  ]
438
431
  });
439
- } else q = /* @__PURE__ */ w("span", {
432
+ } else W = /* @__PURE__ */ w("span", {
440
433
  className: "inline-flex items-center gap-1",
441
434
  children: [
442
435
  /* @__PURE__ */ C(p, {
443
436
  size: a.SM,
444
- className: Y.doneIcon,
437
+ className: J.doneIcon,
445
438
  "aria-hidden": !0,
446
439
  stroke: o
447
440
  }),
448
441
  /* @__PURE__ */ w("span", {
449
- className: i(L.fontClassName, Y.executedLabel),
442
+ className: i(F.fontClassName, J.executedLabel),
450
443
  children: [
451
444
  g,
452
445
  " ",
@@ -455,21 +448,21 @@ var T = {
455
448
  _(e.length)
456
449
  ]
457
450
  }),
458
- G && /* @__PURE__ */ C("span", {
459
- className: i(L.fontClassName, Y.stepsCount),
460
- children: G
451
+ U && /* @__PURE__ */ C("span", {
452
+ className: i(F.fontClassName, J.stepsCount),
453
+ children: U
461
454
  })
462
455
  ]
463
456
  });
464
457
  return /* @__PURE__ */ w("div", {
465
- style: V,
458
+ style: L,
466
459
  className: i("flex w-full flex-col gap-1", l, T.group),
467
460
  children: [/* @__PURE__ */ C(u, {
468
- className: i(Y.toggleButton, T.groupToggle),
461
+ className: i(J.toggleButton, T.groupToggle),
469
462
  textClassName: "min-w-0",
470
- onClick: () => j((e) => !e),
471
- "aria-expanded": A,
472
- iconAfter: A ? /* @__PURE__ */ C(m, {
463
+ onClick: () => A((e) => !e),
464
+ "aria-expanded": k,
465
+ iconAfter: k ? /* @__PURE__ */ C(m, {
473
466
  size: 12,
474
467
  "aria-hidden": !0,
475
468
  stroke: o
@@ -479,19 +472,19 @@ var T = {
479
472
  "aria-hidden": !0,
480
473
  stroke: o
481
474
  }),
482
- label: q
475
+ label: W
483
476
  }), /* @__PURE__ */ C("div", {
484
- className: i("grid transition-[grid-template-rows] duration-300 ease-in-out", A ? "grid-rows-[1fr]" : "grid-rows-[0fr]"),
477
+ className: i("grid transition-[grid-template-rows] duration-300 ease-in-out", k ? "grid-rows-[1fr]" : "grid-rows-[0fr]"),
485
478
  children: /* @__PURE__ */ C("div", {
486
479
  className: "overflow-hidden",
487
- children: /* @__PURE__ */ C(J, {
480
+ children: /* @__PURE__ */ C(q, {
488
481
  stages: e,
489
482
  isStreaming: r,
490
483
  styles: {
491
- colors: F,
484
+ colors: N,
492
485
  typography: f?.typography
493
486
  },
494
- labels: H,
487
+ labels: B,
495
488
  className: "pt-1"
496
489
  })
497
490
  })
@@ -499,4 +492,4 @@ var T = {
499
492
  });
500
493
  };
501
494
  //#endregion
502
- export { T as CONVERSATION_STAGES_CLASS, X as CollapsedGroup, J as StagesPanel };
495
+ export { T as CONVERSATION_STAGES_CLASS, Y as CollapsedGroup, q as StagesPanel };
@@ -35,8 +35,6 @@ export interface CollapsedGroupLabels {
35
35
  stepsLabel?: (count: number) => string;
36
36
  /** Returns the "N failed" text in the failed summary. Defaults to `(n) => \`${n} failed\``. */
37
37
  failedCountLabel?: (failedCount: number) => string;
38
- /** Returns the "Step X of Y" text in the running summary. Defaults to `(current, total) => \`Step ${current} of ${total}\``. */
39
- runningStepLabel?: (current: number, total: number) => string;
40
38
  /** Accessible label announced for the running summary's spinner. Defaults to `'Running'`. */
41
39
  runningAriaLabel?: string;
42
40
  /** Accessible label for the copy button on each stage's content. Defaults to `'Copy'`. */
@@ -1 +1 @@
1
- {"version":3,"file":"collapsed-group.d.ts","sourceRoot":"","sources":["../../src/models/collapsed-group.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,2FAA2F;AAC3F,MAAM,WAAW,oBAAoB;IACnC,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0DAA0D;IAC1D,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mCAAmC;IACnC,eAAe,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AM,CAAC;IAC1B,0FAA0F;IAC1F,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+FAA+F;IAC/F,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mHAAmH;IACnH,YAAY,CAAC,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,MAAM,CAAC;CAClD;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;CAC/B"}
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.133",
4
+ "version": "1.2.0-dev.139",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "peerDependencies": {
23
23
  "react": "^19.2.8",
24
- "@epam/ai-dial-chat-shared": "1.2.0-dev.133",
24
+ "@epam/ai-dial-chat-shared": "1.2.0-dev.139",
25
25
  "@epam/ai-dial-ui-kit": "^0.15.0-dev.18"
26
26
  },
27
27
  "repository": {
@@ -1,6 +1,4 @@
1
1
  import { Stage } from '@epam/ai-dial-chat-shared';
2
2
  /** Returns the last stage with `status: null` (the currently executing stage), or `undefined` if none exists. */
3
3
  export declare const findLiveStage: (stages: Stage[]) => Stage | undefined;
4
- /** 1-based position of `stage` within `stages`, by its stable `index` field. */
5
- export declare const stagePosition: (stages: Stage[], stage: Stage) => number;
6
4
  //# sourceMappingURL=stage-progress.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stage-progress.d.ts","sourceRoot":"","sources":["../../src/utils/stage-progress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAEvD,iHAAiH;AACjH,eAAO,MAAM,aAAa,GAAI,QAAQ,KAAK,EAAE,KAAG,KAAK,GAAG,SACK,CAAC;AAE9D,gFAAgF;AAChF,eAAO,MAAM,aAAa,GAAI,QAAQ,KAAK,EAAE,EAAE,OAAO,KAAK,KAAG,MACR,CAAC"}
1
+ {"version":3,"file":"stage-progress.d.ts","sourceRoot":"","sources":["../../src/utils/stage-progress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAEvD,iHAAiH;AACjH,eAAO,MAAM,aAAa,GAAI,QAAQ,KAAK,EAAE,KAAG,KAAK,GAAG,SACK,CAAC"}