@epam/ai-dial-conversation-stages 1.2.0-dev.15 → 1.2.0-dev.152
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/CollapsedGroup/CollapsedGroup.d.ts.map +1 -1
- package/components/StageMarkdownContent/StageCodeBlock.d.ts +2 -2
- package/components/StageMarkdownContent/StageCodeBlock.d.ts.map +1 -1
- package/components/StagesPanel/StagesPanel.d.ts.map +1 -1
- package/constants/public-class-names.d.ts +9 -0
- package/constants/public-class-names.d.ts.map +1 -0
- package/index.css +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +212 -233
- package/models/collapsed-group.d.ts +0 -2
- package/models/collapsed-group.d.ts.map +1 -1
- package/models/stages-props.d.ts +1 -1
- package/models/stages-props.d.ts.map +1 -1
- package/package.json +3 -3
- package/utils/stage-progress.d.ts +0 -2
- package/utils/stage-progress.d.ts.map +1 -1
|
@@ -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;
|
|
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"}
|
|
@@ -4,12 +4,12 @@ interface Props {
|
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
/** Language class from react-markdown (e.g. `language-json`). */
|
|
6
6
|
codeClassName?: string;
|
|
7
|
-
/** Typography class applied to the
|
|
7
|
+
/** Typography class applied to the fenced code block. Defaults to `'dial-code-text'`. */
|
|
8
8
|
blockClassName?: string;
|
|
9
9
|
/** Accessible label for the copy button. */
|
|
10
10
|
copyAriaLabel: string;
|
|
11
11
|
}
|
|
12
|
-
/**
|
|
12
|
+
/** Adapts stage markdown code blocks to the shared markdown code-block UI. */
|
|
13
13
|
export declare const StageCodeBlock: FC<Props>;
|
|
14
14
|
export {};
|
|
15
15
|
//# sourceMappingURL=StageCodeBlock.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StageCodeBlock.d.ts","sourceRoot":"","sources":["../../../src/components/StageMarkdownContent/StageCodeBlock.tsx"],"names":[],"mappings":"
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StagesPanel.d.ts","sourceRoot":"","sources":["../../../src/components/StagesPanel/StagesPanel.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,EAAE,EAAY,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"StagesPanel.d.ts","sourceRoot":"","sources":["../../../src/components/StagesPanel/StagesPanel.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,EAAE,EAAY,MAAM,OAAO,CAAC;AAGrC,OAAO,KAAK,EAEV,gBAAgB,EAEjB,MAAM,2BAA2B,CAAC;AA6InC,+FAA+F;AAC/F,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAoE5C,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const CONVERSATION_STAGES_CLASS: {
|
|
2
|
+
/** The stages panel root, which carries the themed CSS variables. */
|
|
3
|
+
readonly panel: "dial-conversation-stages-panel";
|
|
4
|
+
/** The root of a `CollapsedGroup`, wrapping its summary line and the panel. */
|
|
5
|
+
readonly group: "dial-conversation-stages-group";
|
|
6
|
+
/** The summary line of a `CollapsedGroup`, which expands and collapses it. */
|
|
7
|
+
readonly groupToggle: "dial-conversation-stages-group-toggle";
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=public-class-names.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-class-names.d.ts","sourceRoot":"","sources":["../../src/constants/public-class-names.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,yBAAyB;IACpC,qEAAqE;;IAErE,+EAA+E;;IAE/E,8EAA8E;;CAEtE,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
|
|
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}.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-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.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.d.ts
CHANGED
|
@@ -2,4 +2,5 @@ export { CollapsedGroup } from './components/CollapsedGroup/CollapsedGroup';
|
|
|
2
2
|
export { StagesPanel } from './components/StagesPanel/StagesPanel';
|
|
3
3
|
export type { CollapsedGroupColors, CollapsedGroupLabels, CollapsedGroupProps, CollapsedGroupStyles, CollapsedGroupTypography, } from './models/collapsed-group';
|
|
4
4
|
export type { StagesPanelColors, StagesPanelLabels, StagesPanelProps, StagesPanelStyles, StageTypography, } from './models/stages-props';
|
|
5
|
+
export { CONVERSATION_STAGES_CLASS } from './constants/public-class-names';
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,YAAY,EACV,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,GAChB,MAAM,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,YAAY,EACV,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,GAChB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC"}
|
package/index.js
CHANGED
|
@@ -1,42 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DIAL_ICON_SIZE as a, DIAL_KIT_ICON_STROKE as o,
|
|
3
|
-
import { IconAlertCircle as
|
|
4
|
-
import { memo as
|
|
5
|
-
import { Fragment as
|
|
6
|
-
//#region src/
|
|
7
|
-
var
|
|
1
|
+
import { MarkdownCodeBlock as e, MarkdownRenderer as t, StageStatus as n, buildCssVars as r, mergeClasses as i } from "@epam/ai-dial-chat-shared";
|
|
2
|
+
import { DIAL_ICON_SIZE as a, DIAL_KIT_ICON_STROKE as o, EllipsisTooltip as s, LinkButton as c, Spinner as l } from "@epam/ai-dial-ui-kit";
|
|
3
|
+
import { IconAlertCircle as u, IconCheck as d, IconChevronDown as f, IconChevronRight as p } from "@tabler/icons-react";
|
|
4
|
+
import { memo as m, useEffect as h, useRef as g, useState as _ } from "react";
|
|
5
|
+
import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
6
|
+
//#region src/constants/public-class-names.ts
|
|
7
|
+
var x = {
|
|
8
|
+
panel: "dial-conversation-stages-panel",
|
|
9
|
+
group: "dial-conversation-stages-group",
|
|
10
|
+
groupToggle: "dial-conversation-stages-group-toggle"
|
|
11
|
+
}, S = /[([][^()[\]]*[)\]]/g, C = /(\d+(?:\.\d+)?)\s*s\b/, w = /\bStart:\s*(\d{1,2}):([0-5]\d):([0-5]\d(?:\.\d+)?)\b/i, T = (e) => {
|
|
8
12
|
let t = e.trimEnd();
|
|
9
13
|
return t.endsWith(":") ? t.slice(0, -1) : t;
|
|
10
|
-
},
|
|
11
|
-
let t =
|
|
14
|
+
}, E = 1440 * 60, D = E / 2, O = (e) => {
|
|
15
|
+
let t = w.exec(e);
|
|
12
16
|
if (!t) return;
|
|
13
17
|
let n = Number(t[1]);
|
|
14
18
|
if (!(n > 23)) return n * 60 * 60 + Number(t[2]) * 60 + Number(t[3]);
|
|
15
|
-
},
|
|
16
|
-
|
|
19
|
+
}, k = (e) => {
|
|
20
|
+
S.lastIndex = 0;
|
|
17
21
|
let t;
|
|
18
|
-
for (; t =
|
|
19
|
-
let e = t[0].slice(1, -1), n =
|
|
22
|
+
for (; t = S.exec(e);) {
|
|
23
|
+
let e = t[0].slice(1, -1), n = C.exec(e);
|
|
20
24
|
if (n) return {
|
|
21
25
|
durationLabel: `${n[1]}s`,
|
|
22
26
|
groupIndex: t.index,
|
|
23
27
|
groupLength: t[0].length,
|
|
24
|
-
startTimeSeconds:
|
|
28
|
+
startTimeSeconds: O(e)
|
|
25
29
|
};
|
|
26
30
|
}
|
|
27
|
-
},
|
|
28
|
-
let t = e ?? "", n =
|
|
31
|
+
}, A = (e) => {
|
|
32
|
+
let t = e ?? "", n = k(t);
|
|
29
33
|
return {
|
|
30
|
-
name:
|
|
34
|
+
name: T(n ? t.slice(0, n.groupIndex) + t.slice(n.groupIndex + n.groupLength) : t).trim().replace(/ {2,}/g, " "),
|
|
31
35
|
durationLabel: n?.durationLabel
|
|
32
36
|
};
|
|
33
|
-
},
|
|
37
|
+
}, j = (e) => e.length > 0 && !/\s/.test(e) && e.includes("_"), M = (e) => e >= 60 ? `${Math.floor(e / 60)}m ${Math.round(e % 60)}s` : `${e.toFixed(1)}s`, N = (e) => {
|
|
34
38
|
if (!e) return;
|
|
35
39
|
let t = /^(\d+(?:\.\d+)?)s$/.exec(e);
|
|
36
40
|
return t ? parseFloat(t[1]) : void 0;
|
|
37
|
-
},
|
|
41
|
+
}, P = (e) => {
|
|
38
42
|
let t = e.flatMap((e) => {
|
|
39
|
-
let t =
|
|
43
|
+
let t = k(e ?? ""), n = N(t?.durationLabel);
|
|
40
44
|
return n == null ? [] : [{
|
|
41
45
|
durationSeconds: n,
|
|
42
46
|
startTimeSeconds: t?.startTimeSeconds
|
|
@@ -47,18 +51,18 @@ var T = /[([][^()[\]]*[)\]]/g, E = /(\d+(?:\.\d+)?)\s*s\b/, D = /\bStart:\s*(\d{
|
|
|
47
51
|
let n = 0, r, i = t.flatMap(({ durationSeconds: e, startTimeSeconds: t }) => {
|
|
48
52
|
if (t == null) return [];
|
|
49
53
|
let i = t + n;
|
|
50
|
-
return r != null && r - i >
|
|
54
|
+
return r != null && r - i > D && (n += E, i += E), r = i, {
|
|
51
55
|
start: i,
|
|
52
56
|
end: i + e
|
|
53
57
|
};
|
|
54
58
|
}).sort((e, t) => e.start - t.start), a = 0, o = i[0].start, s = i[0].end;
|
|
55
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);
|
|
56
60
|
return a + s - o;
|
|
57
|
-
},
|
|
61
|
+
}, F = (e) => [...e].reverse().find((e) => e.status == null), I = (e) => {
|
|
58
62
|
let t = [], n = 0;
|
|
59
63
|
for (; n < e.length;) {
|
|
60
|
-
let r = e[n], i =
|
|
61
|
-
for (; a < e.length &&
|
|
64
|
+
let r = e[n], i = A(r.name).name, a = n + 1;
|
|
65
|
+
for (; a < e.length && A(e[a].name).name === i;) a += 1;
|
|
62
66
|
let o = e.slice(n, a);
|
|
63
67
|
o.length > 1 ? t.push({
|
|
64
68
|
key: r.index,
|
|
@@ -70,7 +74,7 @@ var T = /[([][^()[\]]*[)\]]/g, E = /(\d+(?:\.\d+)?)\s*s\b/, D = /\bStart:\s*(\d{
|
|
|
70
74
|
}), n = a;
|
|
71
75
|
}
|
|
72
76
|
return t;
|
|
73
|
-
},
|
|
77
|
+
}, L = {
|
|
74
78
|
panel: "_panel_vd48n_1",
|
|
75
79
|
row: "_row_vd48n_5",
|
|
76
80
|
collapseButton: "_collapseButton_vd48n_9",
|
|
@@ -88,51 +92,33 @@ var T = /[([][^()[\]]*[)\]]/g, E = /(\d+(?:\.\d+)?)\s*s\b/, D = /\bStart:\s*(\d{
|
|
|
88
92
|
codeInline: "_codeInline_vd48n_62",
|
|
89
93
|
blockquote: "_blockquote_vd48n_68",
|
|
90
94
|
tableCell: "_tableCell_vd48n_73"
|
|
91
|
-
},
|
|
95
|
+
}, R = ({ status: e, isLive: t, runningLabel: r = "Running", failedLabel: i = "Failed" }) => e === n.Failed ? /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(u, {
|
|
92
96
|
size: a.MD,
|
|
93
|
-
className:
|
|
97
|
+
className: L.iconError,
|
|
94
98
|
"aria-hidden": !0,
|
|
95
99
|
stroke: o
|
|
96
|
-
}), /* @__PURE__ */
|
|
100
|
+
}), /* @__PURE__ */ y("span", {
|
|
97
101
|
className: "sr-only",
|
|
98
102
|
children: i
|
|
99
|
-
})] }) : e ===
|
|
103
|
+
})] }) : e === n.Completed ? /* @__PURE__ */ y(d, {
|
|
100
104
|
size: a.SM,
|
|
101
|
-
className:
|
|
105
|
+
className: L.iconCompleted,
|
|
102
106
|
"aria-hidden": !0,
|
|
103
107
|
stroke: o
|
|
104
|
-
}) :
|
|
108
|
+
}) : t ? /* @__PURE__ */ y(l, {
|
|
105
109
|
size: 16,
|
|
106
110
|
ariaLabel: r
|
|
107
|
-
}) : null,
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
size: s.Small,
|
|
119
|
-
icon: C(u ? p : g, {
|
|
120
|
-
size: a.SM,
|
|
121
|
-
className: V.iconSecondary,
|
|
122
|
-
stroke: o
|
|
123
|
-
}),
|
|
124
|
-
"aria-label": c,
|
|
125
|
-
onClick: m,
|
|
126
|
-
className: "absolute end-2 top-2"
|
|
127
|
-
}), /* @__PURE__ */ C("code", {
|
|
128
|
-
className: t,
|
|
129
|
-
children: e
|
|
130
|
-
})]
|
|
131
|
-
});
|
|
132
|
-
}, W = _(({ content: t, typography: n, copyAriaLabel: r = "Copy" }) => {
|
|
133
|
-
let a = "mb-1.5 last:mb-0", o = i(n?.headingClassName ?? "dial-small-semi-text", V.stageContent, a);
|
|
134
|
-
return /* @__PURE__ */ C(e, {
|
|
135
|
-
content: t,
|
|
111
|
+
}) : null, z = ({ children: t, codeClassName: n, blockClassName: r = "dial-code-text", copyAriaLabel: a }) => /* @__PURE__ */ y(e, {
|
|
112
|
+
language: n?.replace(/^language-/, "") ?? "",
|
|
113
|
+
value: typeof t == "string" ? t : String(t ?? ""),
|
|
114
|
+
codeClassName: r,
|
|
115
|
+
containerClassName: i(L.codeBlock, r),
|
|
116
|
+
copyLabel: a,
|
|
117
|
+
hideDownload: !0
|
|
118
|
+
}), B = m(({ content: e, typography: n, copyAriaLabel: r = "Copy" }) => {
|
|
119
|
+
let a = "mb-1.5 last:mb-0", o = i(n?.headingClassName ?? "dial-small-semi-text", L.stageContent, a);
|
|
120
|
+
return /* @__PURE__ */ y(t, {
|
|
121
|
+
content: e,
|
|
136
122
|
classNames: {
|
|
137
123
|
h1: o,
|
|
138
124
|
h2: o,
|
|
@@ -140,127 +126,127 @@ var T = /[([][^()[\]]*[)\]]/g, E = /(\d+(?:\.\d+)?)\s*s\b/, D = /\bStart:\s*(\d{
|
|
|
140
126
|
h4: o,
|
|
141
127
|
h5: o,
|
|
142
128
|
h6: o,
|
|
143
|
-
p: i(n?.contentClassName ?? "dial-tiny-text",
|
|
144
|
-
ul: i(n?.contentClassName ?? "dial-tiny-text",
|
|
145
|
-
ol: i(n?.contentClassName ?? "dial-tiny-text",
|
|
146
|
-
strong: i(n?.strongClassName ?? n?.contentClassName ?? "dial-tiny-text",
|
|
147
|
-
codeInline:
|
|
148
|
-
blockquote: i(n?.contentClassName ?? "dial-tiny-text",
|
|
149
|
-
link: i(n?.contentClassName ?? "dial-tiny-text",
|
|
150
|
-
tableCell: i(n?.contentClassName ?? "dial-tiny-text",
|
|
129
|
+
p: i(n?.contentClassName ?? "dial-tiny-text", L.stageContent, "mb-1.5"),
|
|
130
|
+
ul: i(n?.contentClassName ?? "dial-tiny-text", L.stageContent, a),
|
|
131
|
+
ol: i(n?.contentClassName ?? "dial-tiny-text", L.stageContent, a),
|
|
132
|
+
strong: i(n?.strongClassName ?? n?.contentClassName ?? "dial-tiny-text", L.stageContent),
|
|
133
|
+
codeInline: L.codeInline,
|
|
134
|
+
blockquote: i(n?.contentClassName ?? "dial-tiny-text", L.blockquote, a),
|
|
135
|
+
link: i(n?.contentClassName ?? "dial-tiny-text", L.stageContent),
|
|
136
|
+
tableCell: i(n?.contentClassName ?? "dial-tiny-text", L.tableCell)
|
|
151
137
|
},
|
|
152
|
-
components: { code: ({ children: e, className: t }) => t?.includes("language-") ? /* @__PURE__ */
|
|
138
|
+
components: { code: ({ children: e, className: t }) => t?.includes("language-") ? /* @__PURE__ */ y(z, {
|
|
153
139
|
codeClassName: t,
|
|
154
140
|
blockClassName: n?.codeBlockClassName,
|
|
155
141
|
copyAriaLabel: r,
|
|
156
142
|
children: e
|
|
157
|
-
}) : /* @__PURE__ */
|
|
158
|
-
className: i("inline-block px-1.5 py-1", n?.codeClassName ?? "dial-code-text rounded-md",
|
|
143
|
+
}) : /* @__PURE__ */ y("code", {
|
|
144
|
+
className: i("inline-block px-1.5 py-1", n?.codeClassName ?? "dial-code-text rounded-md", L.codeInline),
|
|
159
145
|
children: e
|
|
160
146
|
}) }
|
|
161
147
|
});
|
|
162
|
-
}),
|
|
163
|
-
let [u, d] =
|
|
164
|
-
/* @__PURE__ */
|
|
148
|
+
}), V = ({ stage: e, isLive: t, typography: r, labels: c, nameOverride: l }) => {
|
|
149
|
+
let [u, d] = _(!1), { copyAriaLabel: m = "Copy stage content", runningAriaLabel: h, failedAriaLabel: g } = c ?? {}, { name: x, durationLabel: S } = A(e.name), C = l ?? x, w = !l && j(x), T = e.status === n.Failed, E = !!e.content, D = /* @__PURE__ */ b(v, { children: [
|
|
150
|
+
/* @__PURE__ */ y("span", {
|
|
165
151
|
className: "flex flex-none items-center",
|
|
166
|
-
children: /* @__PURE__ */
|
|
152
|
+
children: /* @__PURE__ */ y(R, {
|
|
167
153
|
status: e.status,
|
|
168
|
-
isLive:
|
|
169
|
-
runningLabel:
|
|
154
|
+
isLive: t,
|
|
155
|
+
runningLabel: h,
|
|
170
156
|
failedLabel: g
|
|
171
157
|
})
|
|
172
158
|
}),
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
-
className: i("min-w-0 max-w-[22rem] truncate", r?.fontClassName ?? "dial-small-text",
|
|
175
|
-
children: /* @__PURE__ */
|
|
159
|
+
/* @__PURE__ */ y("span", {
|
|
160
|
+
className: i("min-w-0 max-w-[22rem] truncate", r?.fontClassName ?? "dial-small-text", L.stageName, T && L.stageNameFailed, w && L.monoName),
|
|
161
|
+
children: /* @__PURE__ */ y(s, { text: C || e.status || "" })
|
|
176
162
|
}),
|
|
177
|
-
e.tag && /* @__PURE__ */
|
|
178
|
-
className: i("flex-none", r?.tagClassName ?? "dial-tiny-lead-text",
|
|
163
|
+
e.tag && /* @__PURE__ */ y("span", {
|
|
164
|
+
className: i("flex-none", r?.tagClassName ?? "dial-tiny-lead-text", L.tag),
|
|
179
165
|
children: e.tag
|
|
180
166
|
}),
|
|
181
|
-
|
|
182
|
-
className: i("flex-none", r?.countFontClassName ?? "dial-tiny-text",
|
|
183
|
-
children:
|
|
167
|
+
S && /* @__PURE__ */ y("span", {
|
|
168
|
+
className: i("flex-none", r?.countFontClassName ?? "dial-tiny-text", L.duration),
|
|
169
|
+
children: S
|
|
184
170
|
}),
|
|
185
|
-
E && /* @__PURE__ */
|
|
186
|
-
className: i("flex-none",
|
|
187
|
-
children: u ? /* @__PURE__ */
|
|
171
|
+
E && /* @__PURE__ */ y("span", {
|
|
172
|
+
className: i("flex-none", L.iconSecondary),
|
|
173
|
+
children: u ? /* @__PURE__ */ y(f, {
|
|
188
174
|
size: a.SM,
|
|
189
175
|
"aria-hidden": !0,
|
|
190
176
|
stroke: o
|
|
191
|
-
}) : /* @__PURE__ */
|
|
177
|
+
}) : /* @__PURE__ */ y(p, {
|
|
192
178
|
size: a.SM,
|
|
193
179
|
className: "rtl:scale-x-[-1]",
|
|
194
180
|
"aria-hidden": !0,
|
|
195
181
|
stroke: o
|
|
196
182
|
})
|
|
197
183
|
})
|
|
198
|
-
] }), O = i("flex w-full items-center gap-2 px-2 py-1.5",
|
|
199
|
-
return E ? /* @__PURE__ */
|
|
184
|
+
] }), O = i("flex w-full items-center gap-2 px-2 py-1.5", L.row);
|
|
185
|
+
return E ? /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("div", {
|
|
200
186
|
className: O,
|
|
201
|
-
children: /* @__PURE__ */
|
|
187
|
+
children: /* @__PURE__ */ y("button", {
|
|
202
188
|
type: "button",
|
|
203
189
|
onClick: () => d((e) => !e),
|
|
204
190
|
"aria-expanded": u,
|
|
205
191
|
className: "flex min-w-0 flex-1 cursor-pointer items-center gap-2 text-start",
|
|
206
192
|
children: D
|
|
207
193
|
})
|
|
208
|
-
}), /* @__PURE__ */
|
|
194
|
+
}), /* @__PURE__ */ y("div", {
|
|
209
195
|
className: i("grid overflow-hidden transition-[grid-template-rows] duration-[250ms] ease-in-out", u ? "grid-rows-[1fr]" : "grid-rows-[0fr]"),
|
|
210
|
-
children: /* @__PURE__ */
|
|
196
|
+
children: /* @__PURE__ */ y("div", {
|
|
211
197
|
className: "overflow-hidden",
|
|
212
|
-
children: /* @__PURE__ */
|
|
198
|
+
children: /* @__PURE__ */ y("div", {
|
|
213
199
|
className: "mt-2 flex flex-col gap-3 py-1 ps-8",
|
|
214
|
-
children: e.content && /* @__PURE__ */
|
|
200
|
+
children: e.content && /* @__PURE__ */ y("div", {
|
|
215
201
|
className: "max-h-[300px] overflow-y-auto",
|
|
216
|
-
children: /* @__PURE__ */
|
|
202
|
+
children: /* @__PURE__ */ y(B, {
|
|
217
203
|
content: e.content,
|
|
218
204
|
typography: r,
|
|
219
|
-
copyAriaLabel:
|
|
205
|
+
copyAriaLabel: m
|
|
220
206
|
})
|
|
221
207
|
})
|
|
222
208
|
})
|
|
223
209
|
})
|
|
224
|
-
})] }) : /* @__PURE__ */
|
|
210
|
+
})] }) : /* @__PURE__ */ y("div", {
|
|
225
211
|
className: O,
|
|
226
212
|
children: D
|
|
227
213
|
});
|
|
228
|
-
},
|
|
229
|
-
let { runningAriaLabel: l, failedAriaLabel: u, attemptLabel: d = (e) => `Attempt ${e}` } =
|
|
230
|
-
return /* @__PURE__ */
|
|
214
|
+
}, H = ({ row: e, isLive: t, typography: r, labels: c }) => {
|
|
215
|
+
let { runningAriaLabel: l, failedAriaLabel: u, attemptLabel: d = (e) => `Attempt ${e}` } = c ?? {}, [m, h] = _(!1), g = e.attempts?.some((e) => e.status == null) ?? !1, v = e.attempts?.some((e) => e.status === n.Failed), x = g ? null : v ? n.Failed : n.Completed, S = P((e.attempts || []).map((e) => e.name)), C = S > 0 ? M(S) : void 0;
|
|
216
|
+
return /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ b("button", {
|
|
231
217
|
type: "button",
|
|
232
|
-
onClick: () =>
|
|
233
|
-
"aria-expanded":
|
|
234
|
-
className: i("flex w-full items-center gap-2 rounded-lg px-2 py-1.5 text-start",
|
|
218
|
+
onClick: () => h((e) => !e),
|
|
219
|
+
"aria-expanded": m,
|
|
220
|
+
className: i("flex w-full items-center gap-2 rounded-lg px-2 py-1.5 text-start", L.collapseButton, L.row),
|
|
235
221
|
children: [
|
|
236
|
-
/* @__PURE__ */
|
|
222
|
+
/* @__PURE__ */ y("span", {
|
|
237
223
|
className: "flex flex-none items-center",
|
|
238
|
-
children: /* @__PURE__ */
|
|
239
|
-
status:
|
|
240
|
-
isLive:
|
|
224
|
+
children: /* @__PURE__ */ y(R, {
|
|
225
|
+
status: x,
|
|
226
|
+
isLive: t,
|
|
241
227
|
runningLabel: l,
|
|
242
228
|
failedLabel: u
|
|
243
229
|
})
|
|
244
230
|
}),
|
|
245
|
-
/* @__PURE__ */
|
|
246
|
-
className: i("min-w-0 max-w-[22rem] truncate", r?.fontClassName ?? "dial-small-text",
|
|
247
|
-
children: /* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ y("span", {
|
|
232
|
+
className: i("min-w-0 max-w-[22rem] truncate", r?.fontClassName ?? "dial-small-text", L.stageName, v && L.stageNameFailed),
|
|
233
|
+
children: /* @__PURE__ */ y(s, { text: e.name })
|
|
248
234
|
}),
|
|
249
|
-
/* @__PURE__ */
|
|
250
|
-
className: i("flex-none", r?.countFontClassName ?? "dial-tiny-text",
|
|
235
|
+
/* @__PURE__ */ b("span", {
|
|
236
|
+
className: i("flex-none", r?.countFontClassName ?? "dial-tiny-text", L.count),
|
|
251
237
|
children: ["×", e.attempts?.length ?? 0]
|
|
252
238
|
}),
|
|
253
|
-
|
|
254
|
-
className: i("flex-none", r?.countFontClassName ?? "dial-tiny-text",
|
|
255
|
-
children:
|
|
239
|
+
C && /* @__PURE__ */ y("span", {
|
|
240
|
+
className: i("flex-none", r?.countFontClassName ?? "dial-tiny-text", L.duration),
|
|
241
|
+
children: C
|
|
256
242
|
}),
|
|
257
|
-
/* @__PURE__ */
|
|
258
|
-
className: i("flex-none",
|
|
259
|
-
children:
|
|
243
|
+
/* @__PURE__ */ y("span", {
|
|
244
|
+
className: i("flex-none", L.iconSecondary),
|
|
245
|
+
children: m ? /* @__PURE__ */ y(f, {
|
|
260
246
|
size: a.SM,
|
|
261
247
|
"aria-hidden": !0,
|
|
262
248
|
stroke: o
|
|
263
|
-
}) : /* @__PURE__ */
|
|
249
|
+
}) : /* @__PURE__ */ y(p, {
|
|
264
250
|
size: a.SM,
|
|
265
251
|
className: "rtl:scale-x-[-1]",
|
|
266
252
|
"aria-hidden": !0,
|
|
@@ -268,28 +254,28 @@ var T = /[([][^()[\]]*[)\]]/g, E = /(\d+(?:\.\d+)?)\s*s\b/, D = /\bStart:\s*(\d{
|
|
|
268
254
|
})
|
|
269
255
|
})
|
|
270
256
|
]
|
|
271
|
-
}), /* @__PURE__ */
|
|
272
|
-
className: i("grid overflow-hidden transition-[grid-template-rows] duration-[250ms] ease-in-out",
|
|
273
|
-
children: /* @__PURE__ */
|
|
257
|
+
}), /* @__PURE__ */ y("div", {
|
|
258
|
+
className: i("grid overflow-hidden transition-[grid-template-rows] duration-[250ms] ease-in-out", m ? "grid-rows-[1fr]" : "grid-rows-[0fr]"),
|
|
259
|
+
children: /* @__PURE__ */ y("div", {
|
|
274
260
|
className: "overflow-hidden",
|
|
275
|
-
children: /* @__PURE__ */
|
|
261
|
+
children: /* @__PURE__ */ y("ul", {
|
|
276
262
|
role: "list",
|
|
277
263
|
className: "mt-1 flex flex-col gap-0.5 ps-6",
|
|
278
|
-
children: e.attempts?.map((e,
|
|
264
|
+
children: e.attempts?.map((e, n) => /* @__PURE__ */ y("li", {
|
|
279
265
|
role: "listitem",
|
|
280
|
-
children: /* @__PURE__ */
|
|
266
|
+
children: /* @__PURE__ */ y(V, {
|
|
281
267
|
stage: e,
|
|
282
|
-
nameOverride: d(
|
|
283
|
-
isLive:
|
|
268
|
+
nameOverride: d(n + 1),
|
|
269
|
+
isLive: t && e.status == null,
|
|
284
270
|
typography: r,
|
|
285
|
-
labels:
|
|
271
|
+
labels: c
|
|
286
272
|
})
|
|
287
273
|
}, e.index))
|
|
288
274
|
})
|
|
289
275
|
})
|
|
290
276
|
})] });
|
|
291
|
-
},
|
|
292
|
-
let { colors: s, typography: c } = a ?? {}, l =
|
|
277
|
+
}, U = ({ stages: e, isStreaming: t, className: n, styles: a, labels: o }) => {
|
|
278
|
+
let { colors: s, typography: c } = a ?? {}, l = r({
|
|
293
279
|
"--cs-text": s?.text,
|
|
294
280
|
"--cs-row-hover": s?.rowHoverColor,
|
|
295
281
|
"--cs-button-bg": s?.collapsedButtonBg,
|
|
@@ -305,24 +291,24 @@ var T = /[([][^()[\]]*[)\]]/g, E = /(\d+(?:\.\d+)?)\s*s\b/, D = /\bStart:\s*(\d{
|
|
|
305
291
|
"--cs-code-border": s?.codeBorderColor,
|
|
306
292
|
"--cs-code-text": s?.codeTextColor,
|
|
307
293
|
"--cs-border": s?.borderColor
|
|
308
|
-
}), u =
|
|
309
|
-
return /* @__PURE__ */
|
|
294
|
+
}), u = I(e);
|
|
295
|
+
return /* @__PURE__ */ y("div", {
|
|
310
296
|
style: l,
|
|
311
|
-
className: i("w-full",
|
|
312
|
-
children: /* @__PURE__ */
|
|
297
|
+
className: i("w-full", L.panel, n, x.panel),
|
|
298
|
+
children: /* @__PURE__ */ y("ul", {
|
|
313
299
|
role: "list",
|
|
314
300
|
className: "flex w-full flex-col gap-0.5 ps-5",
|
|
315
|
-
children: u.map((e) => e.stage ? /* @__PURE__ */
|
|
301
|
+
children: u.map((e) => e.stage ? /* @__PURE__ */ y("li", {
|
|
316
302
|
role: "listitem",
|
|
317
|
-
children: /* @__PURE__ */
|
|
303
|
+
children: /* @__PURE__ */ y(V, {
|
|
318
304
|
stage: e.stage,
|
|
319
305
|
isLive: t && e.stage.status == null,
|
|
320
306
|
typography: c,
|
|
321
307
|
labels: o
|
|
322
308
|
})
|
|
323
|
-
}, e.key) : /* @__PURE__ */
|
|
309
|
+
}, e.key) : /* @__PURE__ */ y("li", {
|
|
324
310
|
role: "listitem",
|
|
325
|
-
children: /* @__PURE__ */
|
|
311
|
+
children: /* @__PURE__ */ y(H, {
|
|
326
312
|
row: e,
|
|
327
313
|
isLive: t && (e.attempts?.some((e) => e.status == null) ?? !1),
|
|
328
314
|
typography: c,
|
|
@@ -331,163 +317,156 @@ var T = /[([][^()[\]]*[)\]]/g, E = /(\d+(?:\.\d+)?)\s*s\b/, D = /\bStart:\s*(\d{
|
|
|
331
317
|
}, e.key))
|
|
332
318
|
})
|
|
333
319
|
});
|
|
334
|
-
},
|
|
320
|
+
}, W = {
|
|
335
321
|
toggleButton: "_toggleButton_1sa5v_1",
|
|
336
322
|
executedLabel: "_executedLabel_1sa5v_13",
|
|
337
323
|
stepsCount: "_stepsCount_1sa5v_17",
|
|
338
324
|
doneIcon: "_doneIcon_1sa5v_22",
|
|
339
325
|
failedText: "_failedText_1sa5v_26",
|
|
340
326
|
liveName: "_liveName_1sa5v_30"
|
|
341
|
-
},
|
|
342
|
-
let { executedLabel:
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
}, [
|
|
346
|
-
let { colors:
|
|
347
|
-
"--cs-cg-label":
|
|
348
|
-
"--cs-cg-label-hover":
|
|
349
|
-
"--cs-cg-steps-count":
|
|
350
|
-
"--cs-cg-done":
|
|
351
|
-
"--cs-cg-failed":
|
|
352
|
-
"--cs-text":
|
|
353
|
-
"--cs-row-hover":
|
|
354
|
-
"--cs-button-bg":
|
|
355
|
-
"--cs-stage-text":
|
|
356
|
-
"--cs-failed-text":
|
|
357
|
-
"--cs-tag-text":
|
|
358
|
-
"--cs-count-text":
|
|
359
|
-
"--cs-duration-text":
|
|
360
|
-
"--cs-icon-secondary":
|
|
361
|
-
"--cs-icon-completed":
|
|
362
|
-
"--cs-icon-error":
|
|
363
|
-
"--cs-code-bg":
|
|
364
|
-
"--cs-code-border":
|
|
365
|
-
"--cs-code-text":
|
|
366
|
-
"--cs-border":
|
|
327
|
+
}, G = ({ stages: e, isStreaming: t, labels: u, className: m, styles: v }) => {
|
|
328
|
+
let { executedLabel: S = "Executed", stepsLabel: C = () => "steps", failedCountLabel: w = (e) => `${e} failed`, runningAriaLabel: T = "Running", copyAriaLabel: E, failedAriaLabel: D, attemptLabel: O } = u ?? {}, [k, j] = _(t), N = g(t);
|
|
329
|
+
h(() => {
|
|
330
|
+
N.current && !t && j(!1), N.current = t;
|
|
331
|
+
}, [t]);
|
|
332
|
+
let { colors: I, panel: L } = v ?? {}, R = v?.typography ?? { fontClassName: "dial-small-text" }, z = r({
|
|
333
|
+
"--cs-cg-label": I?.labelColor,
|
|
334
|
+
"--cs-cg-label-hover": I?.labelHoverColor,
|
|
335
|
+
"--cs-cg-steps-count": I?.stepsCountColor,
|
|
336
|
+
"--cs-cg-done": I?.doneColor,
|
|
337
|
+
"--cs-cg-failed": I?.failedColor,
|
|
338
|
+
"--cs-text": L?.text,
|
|
339
|
+
"--cs-row-hover": L?.rowHoverColor,
|
|
340
|
+
"--cs-button-bg": L?.collapsedButtonBg,
|
|
341
|
+
"--cs-stage-text": L?.stageTextColor,
|
|
342
|
+
"--cs-failed-text": L?.failedColor,
|
|
343
|
+
"--cs-tag-text": L?.tagTextColor,
|
|
344
|
+
"--cs-count-text": L?.countTextColor,
|
|
345
|
+
"--cs-duration-text": L?.durationTextColor,
|
|
346
|
+
"--cs-icon-secondary": L?.iconSecondaryColor,
|
|
347
|
+
"--cs-icon-completed": L?.iconCompletedColor,
|
|
348
|
+
"--cs-icon-error": L?.iconErrorColor,
|
|
349
|
+
"--cs-code-bg": L?.codeBg,
|
|
350
|
+
"--cs-code-border": L?.codeBorderColor,
|
|
351
|
+
"--cs-code-text": L?.codeTextColor,
|
|
352
|
+
"--cs-border": L?.borderColor
|
|
367
353
|
});
|
|
368
354
|
if (e.length === 0) return null;
|
|
369
|
-
let
|
|
355
|
+
let B = {
|
|
370
356
|
copyAriaLabel: E,
|
|
371
357
|
runningAriaLabel: T,
|
|
372
358
|
failedAriaLabel: D,
|
|
373
359
|
attemptLabel: O
|
|
374
360
|
};
|
|
375
|
-
if (e.length === 1) return /* @__PURE__ */
|
|
361
|
+
if (e.length === 1) return /* @__PURE__ */ y(U, {
|
|
376
362
|
stages: e,
|
|
377
|
-
isStreaming:
|
|
378
|
-
className:
|
|
363
|
+
isStreaming: t,
|
|
364
|
+
className: m,
|
|
379
365
|
styles: {
|
|
380
|
-
colors:
|
|
381
|
-
typography:
|
|
366
|
+
colors: L,
|
|
367
|
+
typography: v?.typography
|
|
382
368
|
},
|
|
383
|
-
labels:
|
|
369
|
+
labels: B
|
|
384
370
|
});
|
|
385
|
-
let
|
|
386
|
-
if (
|
|
387
|
-
let t =
|
|
388
|
-
K = /* @__PURE__ */
|
|
371
|
+
let V = e.some((e) => e.status === n.Failed), H = P(e.map((e) => e.name)), G = H > 0 ? M(H) : void 0, K;
|
|
372
|
+
if (t) {
|
|
373
|
+
let t = A((F(e) ?? e[e.length - 1]).name).name;
|
|
374
|
+
K = /* @__PURE__ */ b("span", {
|
|
389
375
|
role: "status",
|
|
390
376
|
"aria-live": "polite",
|
|
391
377
|
className: "flex min-w-0 items-center gap-2",
|
|
392
|
-
children: [
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
ariaLabel: T
|
|
398
|
-
})
|
|
399
|
-
}),
|
|
400
|
-
/* @__PURE__ */ C("span", {
|
|
401
|
-
className: i("flex-none whitespace-nowrap", I.fontClassName, J.liveName),
|
|
402
|
-
children: S(t, e.length)
|
|
403
|
-
}),
|
|
404
|
-
n && /* @__PURE__ */ C("span", {
|
|
405
|
-
className: i("min-w-0 max-w-[22rem] truncate", I.fontClassName, J.executedLabel),
|
|
406
|
-
children: /* @__PURE__ */ C(c, { text: n })
|
|
378
|
+
children: [/* @__PURE__ */ y("span", {
|
|
379
|
+
className: "flex flex-none items-center",
|
|
380
|
+
children: /* @__PURE__ */ y(l, {
|
|
381
|
+
size: 14,
|
|
382
|
+
ariaLabel: T
|
|
407
383
|
})
|
|
408
|
-
|
|
384
|
+
}), t && /* @__PURE__ */ y("span", {
|
|
385
|
+
className: i("min-w-0 max-w-[22rem] truncate", R.fontClassName, W.liveName),
|
|
386
|
+
children: /* @__PURE__ */ y(s, { text: t })
|
|
387
|
+
})]
|
|
409
388
|
});
|
|
410
|
-
} else if (
|
|
411
|
-
let
|
|
412
|
-
K = /* @__PURE__ */
|
|
389
|
+
} else if (V) {
|
|
390
|
+
let t = e.filter((e) => e.status === n.Failed).length;
|
|
391
|
+
K = /* @__PURE__ */ b("span", {
|
|
413
392
|
className: "inline-flex items-center gap-1",
|
|
414
393
|
children: [
|
|
415
|
-
/* @__PURE__ */
|
|
416
|
-
className: i(
|
|
394
|
+
/* @__PURE__ */ b("span", {
|
|
395
|
+
className: i(R.fontClassName, W.executedLabel),
|
|
417
396
|
children: [
|
|
418
|
-
|
|
397
|
+
S,
|
|
419
398
|
" ",
|
|
420
399
|
e.length,
|
|
421
400
|
" ",
|
|
422
|
-
|
|
401
|
+
C(e.length)
|
|
423
402
|
]
|
|
424
403
|
}),
|
|
425
|
-
/* @__PURE__ */
|
|
426
|
-
className: i(
|
|
427
|
-
children:
|
|
404
|
+
/* @__PURE__ */ y("span", {
|
|
405
|
+
className: i(R.fontClassName, W.failedText),
|
|
406
|
+
children: w(t)
|
|
428
407
|
}),
|
|
429
|
-
|
|
430
|
-
className: i(
|
|
431
|
-
children:
|
|
408
|
+
G && /* @__PURE__ */ y("span", {
|
|
409
|
+
className: i(R.fontClassName, W.stepsCount),
|
|
410
|
+
children: G
|
|
432
411
|
})
|
|
433
412
|
]
|
|
434
413
|
});
|
|
435
|
-
} else K = /* @__PURE__ */
|
|
414
|
+
} else K = /* @__PURE__ */ b("span", {
|
|
436
415
|
className: "inline-flex items-center gap-1",
|
|
437
416
|
children: [
|
|
438
|
-
/* @__PURE__ */
|
|
417
|
+
/* @__PURE__ */ y(d, {
|
|
439
418
|
size: a.SM,
|
|
440
|
-
className:
|
|
419
|
+
className: W.doneIcon,
|
|
441
420
|
"aria-hidden": !0,
|
|
442
421
|
stroke: o
|
|
443
422
|
}),
|
|
444
|
-
/* @__PURE__ */
|
|
445
|
-
className: i(
|
|
423
|
+
/* @__PURE__ */ b("span", {
|
|
424
|
+
className: i(R.fontClassName, W.executedLabel),
|
|
446
425
|
children: [
|
|
447
|
-
|
|
426
|
+
S,
|
|
448
427
|
" ",
|
|
449
428
|
e.length,
|
|
450
429
|
" ",
|
|
451
|
-
|
|
430
|
+
C(e.length)
|
|
452
431
|
]
|
|
453
432
|
}),
|
|
454
|
-
|
|
455
|
-
className: i(
|
|
456
|
-
children:
|
|
433
|
+
G && /* @__PURE__ */ y("span", {
|
|
434
|
+
className: i(R.fontClassName, W.stepsCount),
|
|
435
|
+
children: G
|
|
457
436
|
})
|
|
458
437
|
]
|
|
459
438
|
});
|
|
460
|
-
return /* @__PURE__ */
|
|
461
|
-
style:
|
|
462
|
-
className: i("flex w-full flex-col gap-1",
|
|
463
|
-
children: [/* @__PURE__ */
|
|
464
|
-
className:
|
|
439
|
+
return /* @__PURE__ */ b("div", {
|
|
440
|
+
style: z,
|
|
441
|
+
className: i("flex w-full flex-col gap-1", m, x.group),
|
|
442
|
+
children: [/* @__PURE__ */ y(c, {
|
|
443
|
+
className: i(W.toggleButton, x.groupToggle),
|
|
465
444
|
textClassName: "min-w-0",
|
|
466
|
-
onClick: () =>
|
|
445
|
+
onClick: () => j((e) => !e),
|
|
467
446
|
"aria-expanded": k,
|
|
468
|
-
iconAfter: k ? /* @__PURE__ */
|
|
447
|
+
iconAfter: k ? /* @__PURE__ */ y(f, {
|
|
469
448
|
size: 12,
|
|
470
449
|
"aria-hidden": !0,
|
|
471
450
|
stroke: o
|
|
472
|
-
}) : /* @__PURE__ */
|
|
451
|
+
}) : /* @__PURE__ */ y(p, {
|
|
473
452
|
size: 12,
|
|
474
453
|
className: "rtl:scale-x-[-1]",
|
|
475
454
|
"aria-hidden": !0,
|
|
476
455
|
stroke: o
|
|
477
456
|
}),
|
|
478
457
|
label: K
|
|
479
|
-
}), /* @__PURE__ */
|
|
458
|
+
}), /* @__PURE__ */ y("div", {
|
|
480
459
|
className: i("grid transition-[grid-template-rows] duration-300 ease-in-out", k ? "grid-rows-[1fr]" : "grid-rows-[0fr]"),
|
|
481
|
-
children: /* @__PURE__ */
|
|
460
|
+
children: /* @__PURE__ */ y("div", {
|
|
482
461
|
className: "overflow-hidden",
|
|
483
|
-
children: /* @__PURE__ */
|
|
462
|
+
children: /* @__PURE__ */ y(U, {
|
|
484
463
|
stages: e,
|
|
485
|
-
isStreaming:
|
|
464
|
+
isStreaming: t,
|
|
486
465
|
styles: {
|
|
487
|
-
colors:
|
|
488
|
-
typography:
|
|
466
|
+
colors: L,
|
|
467
|
+
typography: v?.typography
|
|
489
468
|
},
|
|
490
|
-
labels:
|
|
469
|
+
labels: B,
|
|
491
470
|
className: "pt-1"
|
|
492
471
|
})
|
|
493
472
|
})
|
|
@@ -495,4 +474,4 @@ var T = /[([][^()[\]]*[)\]]/g, E = /(\d+(?:\.\d+)?)\s*s\b/, D = /\bStart:\s*(\d{
|
|
|
495
474
|
});
|
|
496
475
|
};
|
|
497
476
|
//#endregion
|
|
498
|
-
export {
|
|
477
|
+
export { x as CONVERSATION_STAGES_CLASS, G as CollapsedGroup, U 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,CAAC,EAAE,MAAM,CAAC;IACzB,8EAA8E;IAC9E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0DAA0D;IAC1D,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,iEAAiE;AACjE,MAAM,WAAW,wBAAwB;IACvC,6FAA6F;IAC7F,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,2FAA2F;AAC3F,MAAM,WAAW,oBAAoB;IACnC,wDAAwD;IACxD,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,8CAA8C;IAC9C,UAAU,CAAC,EAAE,wBAAwB,CAAC;IACtC,4DAA4D;IAC5D,KAAK,CAAC,EAAE,iBAAiB,CAAC;CAC3B;AAED,+DAA+D;AAC/D,MAAM,WAAW,oBAAoB;IACnC,yFAAyF;IACzF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uEAAuE;IACvE,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACvC,+FAA+F;IAC/F,gBAAgB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,MAAM,CAAC;IACnD,
|
|
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,CAAC,EAAE,MAAM,CAAC;IACzB,8EAA8E;IAC9E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0DAA0D;IAC1D,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,iEAAiE;AACjE,MAAM,WAAW,wBAAwB;IACvC,6FAA6F;IAC7F,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,2FAA2F;AAC3F,MAAM,WAAW,oBAAoB;IACnC,wDAAwD;IACxD,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,8CAA8C;IAC9C,UAAU,CAAC,EAAE,wBAAwB,CAAC;IACtC,4DAA4D;IAC5D,KAAK,CAAC,EAAE,iBAAiB,CAAC;CAC3B;AAED,+DAA+D;AAC/D,MAAM,WAAW,oBAAoB;IACnC,yFAAyF;IACzF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uEAAuE;IACvE,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACvC,+FAA+F;IAC/F,gBAAgB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,MAAM,CAAC;IACnD,6FAA6F;IAC7F,gBAAgB,CAAC,EAAE,MAAM,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/models/stages-props.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export interface StageTypography {
|
|
|
11
11
|
headingClassName?: string;
|
|
12
12
|
/** CSS utility class applied to inline code elements. Defaults to `'dial-code-text rounded-md'`. */
|
|
13
13
|
codeClassName?: string;
|
|
14
|
-
/** CSS utility class applied to fenced code blocks
|
|
14
|
+
/** CSS utility class applied to fenced code blocks. Defaults to `'dial-code-text'`. */
|
|
15
15
|
codeBlockClassName?: string;
|
|
16
16
|
/** CSS utility class applied to count badges (e.g. `×N` collapsed group). Defaults to `'dial-tiny-text'`. */
|
|
17
17
|
countFontClassName?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stages-props.d.ts","sourceRoot":"","sources":["../../src/models/stages-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAEvD,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,oGAAoG;IACpG,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,
|
|
1
|
+
{"version":3,"file":"stages-props.d.ts","sourceRoot":"","sources":["../../src/models/stages-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAEvD,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,oGAAoG;IACpG,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,CAAC;IACxB,6EAA6E;IAC7E,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,4FAA4F;IAC5F,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,wEAAwE;IACxE,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,uEAAuE;IACvE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,+FAA+F;IAC/F,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4FAA4F;IAC5F,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mEAAmE;IACnE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2FAA2F;IAC3F,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wFAAwF;AACxF,MAAM,WAAW,iBAAiB;IAChC,wDAAwD;IACxD,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,iEAAiE;IACjE,UAAU,CAAC,EAAE,eAAe,CAAC;CAC9B;AAED,4DAA4D;AAC5D,MAAM,WAAW,iBAAiB;IAChC,0FAA0F;IAC1F,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yFAAyF;IACzF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,+FAA+F;IAC/F,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kGAAkG;IAClG,YAAY,CAAC,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,MAAM,CAAC;CAClD;AAED,qDAAqD;AACrD,MAAM,WAAW,gBAAgB;IAC/B,yCAAyC;IACzC,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,yEAAyE;IACzE,WAAW,EAAE,OAAO,CAAC;IACrB,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,4BAA4B;IAC5B,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B"}
|
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.
|
|
4
|
+
"version": "1.2.0-dev.152",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"react": "^19.2.8",
|
|
24
|
-
"@epam/ai-dial-chat-shared": "1.2.0-dev.
|
|
25
|
-
"@epam/ai-dial-ui-kit": "^0.
|
|
24
|
+
"@epam/ai-dial-chat-shared": "1.2.0-dev.152",
|
|
25
|
+
"@epam/ai-dial-ui-kit": "^0.15.0-dev.19"
|
|
26
26
|
},
|
|
27
27
|
"repository": {
|
|
28
28
|
"type": "git",
|
|
@@ -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
|
|
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"}
|