@epam/ai-dial-conversation-stages 1.1.0-dev.240 → 1.1.0-dev.244

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.
Files changed (2) hide show
  1. package/index.js +14 -14
  2. package/package.json +3 -3
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { MarkdownRenderer as e, StageStatus as t, buildCssVars as n, copyToClipboard as r, mergeClasses as i } from "@epam/ai-dial-chat-shared";
2
- import { DIAL_ICON_SIZE as a, DialEllipsisTooltip as o, ElementSize as s, GhostIconButton as c, LinkButton as l, Spinner as u } from "@epam/ai-dial-ui-kit";
2
+ import { DIAL_ICON_SIZE as a, ElementSize as o, EllipsisTooltip as s, GhostIconButton as c, LinkButton as l, Spinner as u } from "@epam/ai-dial-ui-kit";
3
3
  import { IconAlertCircle as d, IconCheck as f, IconChevronDown as p, IconChevronRight as m, IconCopy as h } from "@tabler/icons-react";
4
4
  import { memo as g, useCallback as _, useEffect as v, useRef as y, useState as b } from "react";
5
5
  import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
@@ -71,7 +71,7 @@ var w = /[([][^()[\]]*[)\]]/g, T = /(\d+(?:\.\d+)?)\s*s\b/, E = /:\s*$/, D = (e)
71
71
  size: a.SM,
72
72
  className: P.iconCompleted,
73
73
  "aria-hidden": !0
74
- }), I = ({ children: e, codeClassName: t, blockClassName: n = "dial-code-text", copyAriaLabel: o }) => {
74
+ }), I = ({ children: e, codeClassName: t, blockClassName: n = "dial-code-text", copyAriaLabel: s }) => {
75
75
  let [l, u] = b(!1), d = y(null);
76
76
  v(() => () => {
77
77
  d.current != null && clearTimeout(d.current);
@@ -82,12 +82,12 @@ var w = /[([][^()[\]]*[)\]]/g, T = /(\d+(?:\.\d+)?)\s*s\b/, E = /:\s*$/, D = (e)
82
82
  return /* @__PURE__ */ C("pre", {
83
83
  className: i("relative max-h-[300px] overflow-auto rounded border p-3", n, P.codeBlock),
84
84
  children: [/* @__PURE__ */ S(c, {
85
- size: s.Small,
85
+ size: o.Small,
86
86
  icon: S(l ? f : h, {
87
87
  size: a.SM,
88
88
  className: P.iconSecondary
89
89
  }),
90
- "aria-label": o,
90
+ "aria-label": s,
91
91
  onClick: p,
92
92
  className: "absolute end-2 top-2"
93
93
  }), /* @__PURE__ */ S("code", {
@@ -125,8 +125,8 @@ var w = /[([][^()[\]]*[)\]]/g, T = /(\d+(?:\.\d+)?)\s*s\b/, E = /:\s*$/, D = (e)
125
125
  children: e
126
126
  }) }
127
127
  });
128
- }), R = ({ stage: e, isLive: n, typography: r, labels: s, nameOverride: c }) => {
129
- let [l, u] = b(!1), { copyAriaLabel: d = "Copy stage content", runningAriaLabel: f, failedAriaLabel: h } = s ?? {}, { name: g, durationLabel: _ } = D(e.name), v = c ?? g, y = !c && O(g), w = e.status === t.Failed, T = !!e.content, E = /* @__PURE__ */ C(x, { children: [
128
+ }), R = ({ stage: e, isLive: n, typography: r, labels: o, nameOverride: c }) => {
129
+ let [l, u] = b(!1), { copyAriaLabel: d = "Copy stage content", runningAriaLabel: f, failedAriaLabel: h } = o ?? {}, { name: g, durationLabel: _ } = D(e.name), v = c ?? g, y = !c && O(g), w = e.status === t.Failed, T = !!e.content, E = /* @__PURE__ */ C(x, { children: [
130
130
  /* @__PURE__ */ S("span", {
131
131
  className: "flex flex-none items-center",
132
132
  children: /* @__PURE__ */ S(F, {
@@ -138,7 +138,7 @@ var w = /[([][^()[\]]*[)\]]/g, T = /(\d+(?:\.\d+)?)\s*s\b/, E = /:\s*$/, D = (e)
138
138
  }),
139
139
  /* @__PURE__ */ S("span", {
140
140
  className: i("min-w-0 max-w-[22rem] truncate", r?.fontClassName ?? "dial-small-text", P.stageName, w && P.stageNameFailed, y && P.monoName),
141
- children: /* @__PURE__ */ S(o, { text: v || e.status || "" })
141
+ children: /* @__PURE__ */ S(s, { text: v || e.status || "" })
142
142
  }),
143
143
  e.tag && /* @__PURE__ */ S("span", {
144
144
  className: i("flex-none", r?.tagClassName ?? "dial-tiny-lead-text", P.tag),
@@ -186,8 +186,8 @@ var w = /[([][^()[\]]*[)\]]/g, T = /(\d+(?:\.\d+)?)\s*s\b/, E = /:\s*$/, D = (e)
186
186
  className: k,
187
187
  children: E
188
188
  });
189
- }, z = ({ row: e, isLive: n, typography: r, labels: s }) => {
190
- let { runningAriaLabel: c, failedAriaLabel: l, attemptLabel: u = (e) => `Attempt ${e}` } = s ?? {}, [d, f] = b(!1), h = e.attempts?.some((e) => e.status === t.Failed), g = (e.attempts || []).reduce((e, t) => {
189
+ }, z = ({ row: e, isLive: n, typography: r, labels: o }) => {
190
+ let { runningAriaLabel: c, failedAriaLabel: l, attemptLabel: u = (e) => `Attempt ${e}` } = o ?? {}, [d, f] = b(!1), h = e.attempts?.some((e) => e.status === t.Failed), g = (e.attempts || []).reduce((e, t) => {
191
191
  let { durationLabel: n } = D(t.name);
192
192
  return e + (A(n) ?? 0);
193
193
  }, 0), _ = g > 0 ? k(g) : void 0;
@@ -208,7 +208,7 @@ var w = /[([][^()[\]]*[)\]]/g, T = /(\d+(?:\.\d+)?)\s*s\b/, E = /:\s*$/, D = (e)
208
208
  }),
209
209
  /* @__PURE__ */ S("span", {
210
210
  className: i("min-w-0 max-w-[22rem] truncate", r?.fontClassName ?? "dial-small-text", P.stageName, h && P.stageNameFailed),
211
- children: /* @__PURE__ */ S(o, { text: e.name })
211
+ children: /* @__PURE__ */ S(s, { text: e.name })
212
212
  }),
213
213
  /* @__PURE__ */ C("span", {
214
214
  className: i("flex-none", r?.countFontClassName ?? "dial-tiny-text", P.count),
@@ -244,7 +244,7 @@ var w = /[([][^()[\]]*[)\]]/g, T = /(\d+(?:\.\d+)?)\s*s\b/, E = /:\s*$/, D = (e)
244
244
  nameOverride: u(i + 1),
245
245
  isLive: n && t.index === e.attempts?.[e.attempts.length - 1]?.index,
246
246
  typography: r,
247
- labels: s
247
+ labels: o
248
248
  })
249
249
  }, t.index))
250
250
  })
@@ -300,8 +300,8 @@ var w = /[([][^()[\]]*[)\]]/g, T = /(\d+(?:\.\d+)?)\s*s\b/, E = /:\s*$/, D = (e)
300
300
  doneIcon: "_doneIcon_1sa5v_22",
301
301
  failedText: "_failedText_1sa5v_26",
302
302
  liveName: "_liveName_1sa5v_30"
303
- }, H = ({ stages: e, isStreaming: r, labels: s, className: c, styles: d }) => {
304
- let { executedLabel: h = "Executed", stepsLabel: g = () => "steps", failedCountLabel: _ = (e) => `${e} failed`, runningStepLabel: x = (e, t) => `Step ${e} of ${t}`, runningAriaLabel: w = "Running", copyAriaLabel: T, failedAriaLabel: E, attemptLabel: O } = s ?? {}, [N, P] = b(r), F = y(r);
303
+ }, H = ({ stages: e, isStreaming: r, labels: o, className: c, styles: d }) => {
304
+ let { executedLabel: h = "Executed", stepsLabel: g = () => "steps", failedCountLabel: _ = (e) => `${e} failed`, runningStepLabel: x = (e, t) => `Step ${e} of ${t}`, runningAriaLabel: w = "Running", copyAriaLabel: T, failedAriaLabel: E, attemptLabel: O } = o ?? {}, [N, P] = b(r), F = y(r);
305
305
  v(() => {
306
306
  F.current && !r && P(!1), F.current = r;
307
307
  }, [r]);
@@ -368,7 +368,7 @@ var w = /[([][^()[\]]*[)\]]/g, T = /(\d+(?:\.\d+)?)\s*s\b/, E = /:\s*$/, D = (e)
368
368
  }),
369
369
  n && /* @__PURE__ */ S("span", {
370
370
  className: i("min-w-0 max-w-[22rem] truncate", R.fontClassName, V.executedLabel),
371
- children: /* @__PURE__ */ S(o, { text: n })
371
+ children: /* @__PURE__ */ S(s, { text: n })
372
372
  })
373
373
  ]
374
374
  });
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.1.0-dev.240",
4
+ "version": "1.1.0-dev.244",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -19,8 +19,8 @@
19
19
  "peerDependencies": {
20
20
  "react": "^19.0.0",
21
21
  "@tabler/icons-react": "^3.0.0",
22
- "@epam/ai-dial-chat-shared": "1.1.0-dev.240",
23
- "@epam/ai-dial-ui-kit": "^0.13.0-dev.26"
22
+ "@epam/ai-dial-chat-shared": "1.1.0-dev.244",
23
+ "@epam/ai-dial-ui-kit": "^0.14.0-dev.4"
24
24
  },
25
25
  "repository": {
26
26
  "type": "git",