@epam/ai-dial-conversation-stages 1.3.0-dev.133 → 1.3.0-dev.137
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/CollapsedGroup/CollapsedGroup.d.ts.map +1 -1
- package/components/StageItem/StageItem.d.ts +3 -1
- package/components/StageItem/StageItem.d.ts.map +1 -1
- package/components/StageList/StageList.d.ts +2 -0
- package/components/StageList/StageList.d.ts.map +1 -1
- package/components/StagesPanel/StagesPanel.d.ts.map +1 -1
- package/index.js +150 -144
- package/models/collapsed-group.d.ts +3 -1
- package/models/collapsed-group.d.ts.map +1 -1
- package/models/stages-props.d.ts +3 -1
- package/models/stages-props.d.ts.map +1 -1
- package/package.json +3 -3
- package/utils/stage-attachments.d.ts +4 -2
- package/utils/stage-attachments.d.ts.map +1 -1
|
@@ -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,
|
|
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,CAuNlD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DisplayAttachment, Stage } from '@epam/ai-dial-chat-shared';
|
|
2
2
|
import { FC, ReactNode } from 'react';
|
|
3
|
-
import { StagesPanelLabels, StageTypography } from '../../models/stages-props';
|
|
3
|
+
import { StagesPanelLabels, StagesPanelProps, StageTypography } from '../../models/stages-props';
|
|
4
4
|
/** Props for {@link StageItem}. */
|
|
5
5
|
export interface StageItemProps {
|
|
6
6
|
/** The stage data to render. */
|
|
@@ -15,6 +15,8 @@ export interface StageItemProps {
|
|
|
15
15
|
nameOverride?: string;
|
|
16
16
|
/** Called when a stage attachment tile is clicked/activated. Receives the mapped display attachment. */
|
|
17
17
|
onAttachmentClick?: (attachment: DisplayAttachment) => void;
|
|
18
|
+
/** Host-owned URL resolvers applied when mapping this stage's attachments. See {@link StagesPanelProps.attachmentDisplayResolvers}. */
|
|
19
|
+
attachmentDisplayResolvers?: StagesPanelProps['attachmentDisplayResolvers'];
|
|
18
20
|
/** Nested list of this stage's child stages, rendered after its own markdown and attachments. Makes the row expandable on its own. */
|
|
19
21
|
childList?: ReactNode;
|
|
20
22
|
/** Controlled expanded state of the disclosure; uncontrolled (initially collapsed) when omitted. The body mounts only while expanded. */
|
|
@@ -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;IAC5B,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,kHAAkH;IAClH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AC;IACrB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;CAC1C;AAyCD,8FAA8F;AAC9F,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAyJxC,CAAC"}
|
|
@@ -13,6 +13,8 @@ interface StageLevelProps {
|
|
|
13
13
|
labels?: StagesPanelLabels;
|
|
14
14
|
/** Called when a stage attachment tile is clicked/activated. See {@link StagesPanelProps.onAttachmentClick}. */
|
|
15
15
|
onAttachmentClick?: StagesPanelProps['onAttachmentClick'];
|
|
16
|
+
/** Host-owned URL resolvers for stage attachment tiles. See {@link StagesPanelProps.attachmentDisplayResolvers}. */
|
|
17
|
+
attachmentDisplayResolvers?: StagesPanelProps['attachmentDisplayResolvers'];
|
|
16
18
|
}
|
|
17
19
|
/** Props for {@link StageList}. */
|
|
18
20
|
export interface StageListProps extends StageLevelProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StageList.d.ts","sourceRoot":"","sources":["../../../src/components/StageList/StageList.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAO3B,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EAChB,MAAM,2BAA2B,CAAC;AAUnC,+DAA+D;AAC/D,UAAU,eAAe;IACvB,iFAAiF;IACjF,WAAW,EAAE,OAAO,CAAC;IACrB,4DAA4D;IAC5D,SAAS,EAAE,cAAc,CAAC;IAC1B,+DAA+D;IAC/D,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,4BAA4B;IAC5B,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,gHAAgH;IAChH,iBAAiB,CAAC,EAAE,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"StageList.d.ts","sourceRoot":"","sources":["../../../src/components/StageList/StageList.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAO3B,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EAChB,MAAM,2BAA2B,CAAC;AAUnC,+DAA+D;AAC/D,UAAU,eAAe;IACvB,iFAAiF;IACjF,WAAW,EAAE,OAAO,CAAC;IACrB,4DAA4D;IAC5D,SAAS,EAAE,cAAc,CAAC;IAC1B,+DAA+D;IAC/D,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,4BAA4B;IAC5B,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,gHAAgH;IAChH,iBAAiB,CAAC,EAAE,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;IAC1D,oHAAoH;IACpH,0BAA0B,CAAC,EAAE,gBAAgB,CAAC,4BAA4B,CAAC,CAAC;CAC7E;AAED,mCAAmC;AACnC,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,mDAAmD;IACnD,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,uEAAuE;IACvE,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA6KD,mGAAmG;AACnG,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAoBxC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StagesPanel.d.ts","sourceRoot":"","sources":["../../../src/components/StagesPanel/StagesPanel.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAW,MAAM,OAAO,CAAC;AAGpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAKlE,yCAAyC;AACzC,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAC5D,8FAA8F;IAC9F,SAAS,EAAE,cAAc,CAAC;CAC3B;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,
|
|
1
|
+
{"version":3,"file":"StagesPanel.d.ts","sourceRoot":"","sources":["../../../src/components/StagesPanel/StagesPanel.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAW,MAAM,OAAO,CAAC;AAGpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAKlE,yCAAyC;AACzC,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAC5D,8FAA8F;IAC9F,SAAS,EAAE,cAAc,CAAC;CAC3B;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAuDpD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAG5C,CAAC"}
|
package/index.js
CHANGED
|
@@ -486,16 +486,16 @@ var ve = {
|
|
|
486
486
|
isExpandable: p,
|
|
487
487
|
isSelected: d
|
|
488
488
|
});
|
|
489
|
-
}, nt = (e) => {
|
|
490
|
-
let
|
|
491
|
-
if (!e?.length) return
|
|
492
|
-
let
|
|
489
|
+
}, nt = (e, t) => {
|
|
490
|
+
let n = l(e, t);
|
|
491
|
+
if (!e?.length) return n;
|
|
492
|
+
let r = /* @__PURE__ */ new Map();
|
|
493
493
|
for (let t of e) {
|
|
494
494
|
let e = t.url ?? t.data ?? t.title;
|
|
495
|
-
|
|
495
|
+
r.has(e) || r.set(e, t.type);
|
|
496
496
|
}
|
|
497
|
-
return
|
|
498
|
-
let t =
|
|
497
|
+
return n.map((e) => {
|
|
498
|
+
let t = r.get(e.id);
|
|
499
499
|
return t ? {
|
|
500
500
|
...e,
|
|
501
501
|
contentType: t
|
|
@@ -562,66 +562,66 @@ var ve = {
|
|
|
562
562
|
})
|
|
563
563
|
}, e.id))
|
|
564
564
|
});
|
|
565
|
-
}, ot = ({ stage: e, isLive: t, typography: n, labels: r, nameOverride: i, onAttachmentClick: a,
|
|
566
|
-
let [
|
|
567
|
-
|
|
568
|
-
}, [
|
|
565
|
+
}, ot = ({ stage: e, isLive: t, typography: n, labels: r, nameOverride: i, onAttachmentClick: a, attachmentDisplayResolvers: s, childList: l, isExpanded: u, onToggle: f }) => {
|
|
566
|
+
let [p, m] = q(!1), h = u ?? p, _ = W((e) => {
|
|
567
|
+
u === void 0 && m(e), f?.(e);
|
|
568
|
+
}, [u, f]), { copyAriaLabel: v = "Copy stage content", codeBlockCopiedLabel: y, tableScrollRegionAriaLabel: b, mathScrollRegionAriaLabel: x, runningAriaLabel: S, failedAriaLabel: C, attachmentClickLabel: w = "Preview search result" } = r ?? {}, T = K(() => nt(e.attachments, s), [e.attachments, s]), { name: E, durationLabel: D } = we(e.name), O = i ?? E, k = !i && Te(E), A = e.status === o.Failed, j = !!e.content || !!e.attachments?.length, M = j || l != null, N = /* @__PURE__ */ Y(_e, { children: [
|
|
569
569
|
/* @__PURE__ */ J("span", {
|
|
570
570
|
className: "flex flex-none items-center",
|
|
571
571
|
children: /* @__PURE__ */ J(Pe, {
|
|
572
572
|
status: e.status,
|
|
573
573
|
isLive: t,
|
|
574
|
-
runningLabel:
|
|
575
|
-
failedLabel:
|
|
574
|
+
runningLabel: S,
|
|
575
|
+
failedLabel: C
|
|
576
576
|
})
|
|
577
577
|
}),
|
|
578
578
|
/* @__PURE__ */ J("span", {
|
|
579
|
-
className: c("max-w-[22rem] min-w-0 truncate", n?.fontClassName ?? "dial-small-text", X.stageName,
|
|
580
|
-
children: /* @__PURE__ */ J(g, { text:
|
|
579
|
+
className: c("max-w-[22rem] min-w-0 truncate", n?.fontClassName ?? "dial-small-text", X.stageName, A && X.stageNameFailed, k && X.monoName),
|
|
580
|
+
children: /* @__PURE__ */ J(g, { text: O || e.status || "" })
|
|
581
581
|
}),
|
|
582
582
|
e.tag && /* @__PURE__ */ J("span", {
|
|
583
583
|
className: c("flex-none", n?.tagClassName ?? "dial-tiny-lead-text", X.tag),
|
|
584
584
|
children: e.tag
|
|
585
585
|
}),
|
|
586
|
-
|
|
586
|
+
D && /* @__PURE__ */ J("span", {
|
|
587
587
|
className: c("flex-none", n?.countFontClassName ?? "dial-tiny-text", X.duration),
|
|
588
|
-
children:
|
|
588
|
+
children: D
|
|
589
589
|
})
|
|
590
590
|
] });
|
|
591
|
-
return
|
|
592
|
-
expanded:
|
|
593
|
-
onToggle:
|
|
591
|
+
return M ? /* @__PURE__ */ Y(d, {
|
|
592
|
+
expanded: h,
|
|
593
|
+
onToggle: _,
|
|
594
594
|
title: /* @__PURE__ */ J("span", {
|
|
595
595
|
className: "flex min-w-0 items-center gap-2",
|
|
596
|
-
children:
|
|
596
|
+
children: N
|
|
597
597
|
}),
|
|
598
598
|
className: je,
|
|
599
599
|
headerClassName: c(Me, X.row, X.stageHeader),
|
|
600
600
|
contentClassName: c("-mt-1 flex min-w-0 flex-col gap-3 px-0 py-1", X.stageRegion),
|
|
601
|
-
children: [
|
|
601
|
+
children: [h && j && /* @__PURE__ */ Y("div", {
|
|
602
602
|
className: "flex min-w-0 flex-col gap-3 ps-8",
|
|
603
603
|
children: [e.content && /* @__PURE__ */ J("div", {
|
|
604
604
|
className: "max-h-[300px] min-w-0 overflow-y-auto",
|
|
605
605
|
children: /* @__PURE__ */ J(it, {
|
|
606
606
|
content: e.content,
|
|
607
607
|
typography: n,
|
|
608
|
-
copyAriaLabel:
|
|
609
|
-
copiedLabel:
|
|
610
|
-
tableScrollRegionAriaLabel:
|
|
611
|
-
mathScrollRegionAriaLabel:
|
|
608
|
+
copyAriaLabel: v,
|
|
609
|
+
copiedLabel: y,
|
|
610
|
+
tableScrollRegionAriaLabel: b,
|
|
611
|
+
mathScrollRegionAriaLabel: x
|
|
612
612
|
})
|
|
613
|
-
}),
|
|
614
|
-
attachments:
|
|
615
|
-
clickLabel:
|
|
613
|
+
}), T.length > 0 && /* @__PURE__ */ J(at, {
|
|
614
|
+
attachments: T,
|
|
615
|
+
clickLabel: w,
|
|
616
616
|
onAttachmentClick: a
|
|
617
617
|
})]
|
|
618
|
-
}),
|
|
618
|
+
}), h && l]
|
|
619
619
|
}) : /* @__PURE__ */ J("div", {
|
|
620
620
|
className: c("flex w-full items-center gap-2 px-2 py-1.5", X.row),
|
|
621
|
-
children:
|
|
621
|
+
children: N
|
|
622
622
|
});
|
|
623
|
-
}, st = (e) => e <= 3 ? "ps-4" : "ps-0", ct = (e) => e <= 3 ? "ps-6" : "ps-0", lt = ({ node: e, depth: t, nameOverride: n, isStreaming: r, expansion: i, typography: a, labels: o, onAttachmentClick: s }) => {
|
|
624
|
-
let
|
|
623
|
+
}, st = (e) => e <= 3 ? "ps-4" : "ps-0", ct = (e) => e <= 3 ? "ps-6" : "ps-0", lt = ({ node: e, depth: t, nameOverride: n, isStreaming: r, expansion: i, typography: a, labels: o, onAttachmentClick: s, attachmentDisplayResolvers: c }) => {
|
|
624
|
+
let l = ke(e.stage.index), u = t + 1;
|
|
625
625
|
return /* @__PURE__ */ J(ot, {
|
|
626
626
|
stage: e.stage,
|
|
627
627
|
nameOverride: n,
|
|
@@ -629,66 +629,69 @@ var ve = {
|
|
|
629
629
|
typography: a,
|
|
630
630
|
labels: o,
|
|
631
631
|
onAttachmentClick: s,
|
|
632
|
-
|
|
633
|
-
|
|
632
|
+
attachmentDisplayResolvers: c,
|
|
633
|
+
isExpanded: i.isExpanded(l),
|
|
634
|
+
onToggle: (e) => i.onToggle(l, e),
|
|
634
635
|
childList: e.children.length > 0 ? /* @__PURE__ */ J(dt, {
|
|
635
636
|
nodes: e.children,
|
|
636
|
-
depth:
|
|
637
|
-
className: st(
|
|
637
|
+
depth: u,
|
|
638
|
+
className: st(u),
|
|
638
639
|
isStreaming: r,
|
|
639
640
|
expansion: i,
|
|
640
641
|
typography: a,
|
|
641
642
|
labels: o,
|
|
642
|
-
onAttachmentClick: s
|
|
643
|
+
onAttachmentClick: s,
|
|
644
|
+
attachmentDisplayResolvers: c
|
|
643
645
|
}) : void 0
|
|
644
646
|
});
|
|
645
|
-
}, ut = ({ row: e, depth: t, isStreaming: n, expansion: r, typography: i, labels: a, onAttachmentClick: s }) => {
|
|
646
|
-
let { runningAriaLabel:
|
|
647
|
-
|
|
648
|
-
let
|
|
647
|
+
}, ut = ({ row: e, depth: t, isStreaming: n, expansion: r, typography: i, labels: a, onAttachmentClick: s, attachmentDisplayResolvers: l }) => {
|
|
648
|
+
let { runningAriaLabel: u, failedAriaLabel: f, attemptLabel: p = (e) => `Attempt ${e}` } = a ?? {}, m = e.attempts ?? [], h = m.some((e) => e.stage.status == null), _ = m.some((e) => e.stage.status === o.Failed), v = o.Completed;
|
|
649
|
+
h ? v = null : _ && (v = o.Failed);
|
|
650
|
+
let y = Ae(e.key), b = r.isExpanded(y), x = t + 1, S = /* @__PURE__ */ Y("span", {
|
|
649
651
|
className: "flex min-w-0 items-center gap-2",
|
|
650
652
|
children: [
|
|
651
653
|
/* @__PURE__ */ J("span", {
|
|
652
654
|
className: "flex flex-none items-center",
|
|
653
655
|
children: /* @__PURE__ */ J(Pe, {
|
|
654
|
-
status:
|
|
655
|
-
isLive: n &&
|
|
656
|
-
runningLabel:
|
|
657
|
-
failedLabel:
|
|
656
|
+
status: v,
|
|
657
|
+
isLive: n && h,
|
|
658
|
+
runningLabel: u,
|
|
659
|
+
failedLabel: f
|
|
658
660
|
})
|
|
659
661
|
}),
|
|
660
662
|
/* @__PURE__ */ J("span", {
|
|
661
|
-
className: c("max-w-[22rem] min-w-0 truncate", i?.fontClassName ?? "dial-small-text", X.stageName,
|
|
663
|
+
className: c("max-w-[22rem] min-w-0 truncate", i?.fontClassName ?? "dial-small-text", X.stageName, _ && X.stageNameFailed),
|
|
662
664
|
children: /* @__PURE__ */ J(g, { text: e.name })
|
|
663
665
|
}),
|
|
664
666
|
/* @__PURE__ */ Y("span", {
|
|
665
667
|
className: c("flex-none", i?.countFontClassName ?? "dial-tiny-text", X.count),
|
|
666
|
-
children: ["×",
|
|
668
|
+
children: ["×", m.length]
|
|
667
669
|
})
|
|
668
670
|
]
|
|
669
671
|
});
|
|
670
672
|
return /* @__PURE__ */ J(d, {
|
|
671
|
-
title:
|
|
672
|
-
expanded:
|
|
673
|
-
onToggle: (e) => r.onToggle(
|
|
673
|
+
title: S,
|
|
674
|
+
expanded: b,
|
|
675
|
+
onToggle: (e) => r.onToggle(y, e),
|
|
674
676
|
className: je,
|
|
675
677
|
headerClassName: c(Me, X.collapseButton, X.row, X.stageHeader),
|
|
676
|
-
contentClassName: c("-mt-2 min-w-0 px-0", ct(
|
|
678
|
+
contentClassName: c("-mt-2 min-w-0 px-0", ct(x), X.stageRegion),
|
|
677
679
|
children: /* @__PURE__ */ J("ul", {
|
|
678
680
|
role: "list",
|
|
679
681
|
className: "flex min-w-0 flex-col gap-0.5",
|
|
680
|
-
children:
|
|
682
|
+
children: b && m.map((e, t) => /* @__PURE__ */ J("li", {
|
|
681
683
|
role: "listitem",
|
|
682
684
|
className: "min-w-0",
|
|
683
685
|
children: /* @__PURE__ */ J(lt, {
|
|
684
686
|
node: e,
|
|
685
|
-
depth:
|
|
686
|
-
nameOverride:
|
|
687
|
+
depth: x,
|
|
688
|
+
nameOverride: p(t + 1),
|
|
687
689
|
isStreaming: n,
|
|
688
690
|
expansion: r,
|
|
689
691
|
typography: i,
|
|
690
692
|
labels: a,
|
|
691
|
-
onAttachmentClick: s
|
|
693
|
+
onAttachmentClick: s,
|
|
694
|
+
attachmentDisplayResolvers: l
|
|
692
695
|
})
|
|
693
696
|
}, e.stage.index))
|
|
694
697
|
})
|
|
@@ -709,36 +712,37 @@ var ve = {
|
|
|
709
712
|
...r
|
|
710
713
|
})
|
|
711
714
|
}, e.key))
|
|
712
|
-
}), ft = ({ stages: e, isStreaming: t, className: n, styles: r, labels: i, onAttachmentClick: a,
|
|
713
|
-
let { colors:
|
|
714
|
-
"--cs-text":
|
|
715
|
-
"--cs-row-hover":
|
|
716
|
-
"--cs-button-bg":
|
|
717
|
-
"--cs-stage-text":
|
|
718
|
-
"--cs-failed-text":
|
|
719
|
-
"--cs-tag-text":
|
|
720
|
-
"--cs-count-text":
|
|
721
|
-
"--cs-duration-text":
|
|
722
|
-
"--cs-icon-secondary":
|
|
723
|
-
"--cs-icon-completed":
|
|
724
|
-
"--cs-icon-error":
|
|
725
|
-
"--cs-code-bg":
|
|
726
|
-
"--cs-code-border":
|
|
727
|
-
"--cs-code-text":
|
|
728
|
-
"--cs-border":
|
|
729
|
-
}),
|
|
715
|
+
}), ft = ({ stages: e, isStreaming: t, className: n, styles: r, labels: i, onAttachmentClick: a, attachmentDisplayResolvers: o, expansion: l }) => {
|
|
716
|
+
let { colors: u, typography: d } = r ?? {}, f = s({
|
|
717
|
+
"--cs-text": u?.text,
|
|
718
|
+
"--cs-row-hover": u?.rowHoverColor,
|
|
719
|
+
"--cs-button-bg": u?.collapsedButtonBg,
|
|
720
|
+
"--cs-stage-text": u?.stageTextColor,
|
|
721
|
+
"--cs-failed-text": u?.failedColor,
|
|
722
|
+
"--cs-tag-text": u?.tagTextColor,
|
|
723
|
+
"--cs-count-text": u?.countTextColor,
|
|
724
|
+
"--cs-duration-text": u?.durationTextColor,
|
|
725
|
+
"--cs-icon-secondary": u?.iconSecondaryColor,
|
|
726
|
+
"--cs-icon-completed": u?.iconCompletedColor,
|
|
727
|
+
"--cs-icon-error": u?.iconErrorColor,
|
|
728
|
+
"--cs-code-bg": u?.codeBg,
|
|
729
|
+
"--cs-code-border": u?.codeBorderColor,
|
|
730
|
+
"--cs-code-text": u?.codeTextColor,
|
|
731
|
+
"--cs-border": u?.borderColor
|
|
732
|
+
}), p = K(() => Oe(e), [e]);
|
|
730
733
|
return /* @__PURE__ */ J("div", {
|
|
731
|
-
style:
|
|
734
|
+
style: f,
|
|
732
735
|
className: c("w-full min-w-0", X.panel, n, ve.panel),
|
|
733
736
|
children: /* @__PURE__ */ J(dt, {
|
|
734
|
-
nodes:
|
|
737
|
+
nodes: p,
|
|
735
738
|
depth: 0,
|
|
736
739
|
className: "w-full ps-5",
|
|
737
740
|
isStreaming: t,
|
|
738
|
-
expansion:
|
|
739
|
-
typography:
|
|
741
|
+
expansion: l,
|
|
742
|
+
typography: d,
|
|
740
743
|
labels: i,
|
|
741
|
-
onAttachmentClick: a
|
|
744
|
+
onAttachmentClick: a,
|
|
745
|
+
attachmentDisplayResolvers: o
|
|
742
746
|
})
|
|
743
747
|
});
|
|
744
748
|
}, pt = (e) => {
|
|
@@ -754,67 +758,68 @@ var ve = {
|
|
|
754
758
|
doneIcon: "_doneIcon_16fae_36",
|
|
755
759
|
failedText: "_failedText_16fae_40",
|
|
756
760
|
liveName: "_liveName_16fae_44"
|
|
757
|
-
}, mt = ({ stages: e, isStreaming: t, labels: n, className: r, styles: i, onAttachmentClick: a }) => {
|
|
758
|
-
let { executedLabel:
|
|
761
|
+
}, mt = ({ stages: e, isStreaming: t, labels: n, className: r, styles: i, onAttachmentClick: a, attachmentDisplayResolvers: l }) => {
|
|
762
|
+
let { executedLabel: u = "Executed", stepsLabel: m = () => "steps", failedCountLabel: h = (e) => `${e} failed`, runningAriaLabel: _ = "Running", copyAriaLabel: v, codeBlockCopiedLabel: y, tableScrollRegionAriaLabel: b, mathScrollRegionAriaLabel: S, failedAriaLabel: C, attemptLabel: T, attachmentClickLabel: E } = n ?? {}, [D, O] = q(t), k = ye(), { reset: A } = k, j = e.length > 1;
|
|
759
763
|
G(() => {
|
|
760
|
-
|
|
764
|
+
j && !D && A();
|
|
761
765
|
}, [
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
766
|
+
j,
|
|
767
|
+
D,
|
|
768
|
+
A
|
|
765
769
|
]);
|
|
766
|
-
let
|
|
770
|
+
let M = ge(t);
|
|
767
771
|
G(() => {
|
|
768
|
-
|
|
772
|
+
M.current && !t && O(!1), M.current = t;
|
|
769
773
|
}, [t]);
|
|
770
|
-
let { colors:
|
|
771
|
-
"--cs-cg-label":
|
|
772
|
-
"--cs-cg-label-hover":
|
|
773
|
-
"--cs-cg-done":
|
|
774
|
-
"--cs-cg-failed":
|
|
775
|
-
"--cs-text":
|
|
776
|
-
"--cs-row-hover":
|
|
777
|
-
"--cs-button-bg":
|
|
778
|
-
"--cs-stage-text":
|
|
779
|
-
"--cs-failed-text":
|
|
780
|
-
"--cs-tag-text":
|
|
781
|
-
"--cs-count-text":
|
|
782
|
-
"--cs-duration-text":
|
|
783
|
-
"--cs-icon-secondary":
|
|
784
|
-
"--cs-icon-completed":
|
|
785
|
-
"--cs-icon-error":
|
|
786
|
-
"--cs-code-bg":
|
|
787
|
-
"--cs-code-border":
|
|
788
|
-
"--cs-code-text":
|
|
789
|
-
"--cs-border":
|
|
774
|
+
let { colors: N, panel: P } = i ?? {}, F = i?.typography ?? { fontClassName: "dial-small-text" }, I = s({
|
|
775
|
+
"--cs-cg-label": N?.labelColor,
|
|
776
|
+
"--cs-cg-label-hover": N?.labelHoverColor,
|
|
777
|
+
"--cs-cg-done": N?.doneColor,
|
|
778
|
+
"--cs-cg-failed": N?.failedColor,
|
|
779
|
+
"--cs-text": P?.text,
|
|
780
|
+
"--cs-row-hover": P?.rowHoverColor,
|
|
781
|
+
"--cs-button-bg": P?.collapsedButtonBg,
|
|
782
|
+
"--cs-stage-text": P?.stageTextColor,
|
|
783
|
+
"--cs-failed-text": P?.failedColor,
|
|
784
|
+
"--cs-tag-text": P?.tagTextColor,
|
|
785
|
+
"--cs-count-text": P?.countTextColor,
|
|
786
|
+
"--cs-duration-text": P?.durationTextColor,
|
|
787
|
+
"--cs-icon-secondary": P?.iconSecondaryColor,
|
|
788
|
+
"--cs-icon-completed": P?.iconCompletedColor,
|
|
789
|
+
"--cs-icon-error": P?.iconErrorColor,
|
|
790
|
+
"--cs-code-bg": P?.codeBg,
|
|
791
|
+
"--cs-code-border": P?.codeBorderColor,
|
|
792
|
+
"--cs-code-text": P?.codeTextColor,
|
|
793
|
+
"--cs-border": P?.borderColor
|
|
790
794
|
});
|
|
791
795
|
if (e.length === 0) return null;
|
|
792
|
-
let
|
|
793
|
-
copyAriaLabel:
|
|
794
|
-
codeBlockCopiedLabel:
|
|
795
|
-
tableScrollRegionAriaLabel:
|
|
796
|
-
mathScrollRegionAriaLabel:
|
|
797
|
-
runningAriaLabel:
|
|
798
|
-
failedAriaLabel:
|
|
799
|
-
attemptLabel:
|
|
800
|
-
attachmentClickLabel:
|
|
796
|
+
let L = {
|
|
797
|
+
copyAriaLabel: v,
|
|
798
|
+
codeBlockCopiedLabel: y,
|
|
799
|
+
tableScrollRegionAriaLabel: b,
|
|
800
|
+
mathScrollRegionAriaLabel: S,
|
|
801
|
+
runningAriaLabel: _,
|
|
802
|
+
failedAriaLabel: C,
|
|
803
|
+
attemptLabel: T,
|
|
804
|
+
attachmentClickLabel: E
|
|
801
805
|
};
|
|
802
806
|
if (e.length === 1) return /* @__PURE__ */ J(ft, {
|
|
803
807
|
stages: e,
|
|
804
808
|
isStreaming: t,
|
|
805
|
-
expansion:
|
|
809
|
+
expansion: k,
|
|
806
810
|
className: r,
|
|
807
811
|
styles: {
|
|
808
|
-
colors:
|
|
812
|
+
colors: P,
|
|
809
813
|
typography: i?.typography
|
|
810
814
|
},
|
|
811
|
-
labels:
|
|
812
|
-
onAttachmentClick: a
|
|
815
|
+
labels: L,
|
|
816
|
+
onAttachmentClick: a,
|
|
817
|
+
attachmentDisplayResolvers: l
|
|
813
818
|
});
|
|
814
|
-
let
|
|
819
|
+
let R = e.some((e) => e.status === o.Failed), z;
|
|
815
820
|
if (t) {
|
|
816
821
|
let t = we((Ee(e) ?? e[e.length - 1]).name).name;
|
|
817
|
-
|
|
822
|
+
z = /* @__PURE__ */ Y("span", {
|
|
818
823
|
role: "status",
|
|
819
824
|
"aria-live": "polite",
|
|
820
825
|
className: "flex min-w-0 items-center gap-2",
|
|
@@ -822,32 +827,32 @@ var ve = {
|
|
|
822
827
|
className: "flex flex-none items-center",
|
|
823
828
|
children: /* @__PURE__ */ J(x, {
|
|
824
829
|
size: 14,
|
|
825
|
-
ariaLabel:
|
|
830
|
+
ariaLabel: _
|
|
826
831
|
})
|
|
827
832
|
}), t && /* @__PURE__ */ J("span", {
|
|
828
|
-
className: c("max-w-[22rem] min-w-0 truncate",
|
|
833
|
+
className: c("max-w-[22rem] min-w-0 truncate", F.fontClassName, $.liveName),
|
|
829
834
|
children: /* @__PURE__ */ J(g, { text: t })
|
|
830
835
|
})]
|
|
831
836
|
});
|
|
832
|
-
} else if (
|
|
837
|
+
} else if (R) {
|
|
833
838
|
let t = e.filter((e) => e.status === o.Failed).length;
|
|
834
|
-
|
|
839
|
+
z = /* @__PURE__ */ Y("span", {
|
|
835
840
|
className: "inline-flex items-center gap-1",
|
|
836
841
|
children: [/* @__PURE__ */ Y("span", {
|
|
837
|
-
className: c(
|
|
842
|
+
className: c(F.fontClassName, $.executedLabel),
|
|
838
843
|
children: [
|
|
839
|
-
|
|
844
|
+
u,
|
|
840
845
|
" ",
|
|
841
846
|
e.length,
|
|
842
847
|
" ",
|
|
843
|
-
|
|
848
|
+
m(e.length)
|
|
844
849
|
]
|
|
845
850
|
}), /* @__PURE__ */ J("span", {
|
|
846
|
-
className: c(
|
|
847
|
-
children:
|
|
851
|
+
className: c(F.fontClassName, $.failedText),
|
|
852
|
+
children: h(t)
|
|
848
853
|
})]
|
|
849
854
|
});
|
|
850
|
-
} else
|
|
855
|
+
} else z = /* @__PURE__ */ Y("span", {
|
|
851
856
|
className: "inline-flex items-center gap-1",
|
|
852
857
|
children: [/* @__PURE__ */ J(w, {
|
|
853
858
|
size: f.SM,
|
|
@@ -855,37 +860,38 @@ var ve = {
|
|
|
855
860
|
"aria-hidden": !0,
|
|
856
861
|
stroke: p
|
|
857
862
|
}), /* @__PURE__ */ Y("span", {
|
|
858
|
-
className: c(
|
|
863
|
+
className: c(F.fontClassName, $.executedLabel),
|
|
859
864
|
children: [
|
|
860
|
-
|
|
865
|
+
u,
|
|
861
866
|
" ",
|
|
862
867
|
e.length,
|
|
863
868
|
" ",
|
|
864
|
-
|
|
869
|
+
m(e.length)
|
|
865
870
|
]
|
|
866
871
|
})]
|
|
867
872
|
});
|
|
868
873
|
return /* @__PURE__ */ J("div", {
|
|
869
|
-
style:
|
|
874
|
+
style: I,
|
|
870
875
|
className: c("flex w-full flex-col gap-1", r, ve.group),
|
|
871
876
|
children: /* @__PURE__ */ J(d, {
|
|
872
|
-
title:
|
|
873
|
-
expanded:
|
|
874
|
-
onToggle:
|
|
877
|
+
title: z,
|
|
878
|
+
expanded: D,
|
|
879
|
+
onToggle: O,
|
|
875
880
|
className: "overflow-visible py-0",
|
|
876
881
|
headerClassName: c("justify-start gap-1 rounded-none px-0", $.toggleButton, ve.groupToggle),
|
|
877
882
|
contentClassName: c("-mt-2 px-0", $.groupRegion),
|
|
878
|
-
children:
|
|
883
|
+
children: D && /* @__PURE__ */ J(ft, {
|
|
879
884
|
stages: e,
|
|
880
885
|
isStreaming: t,
|
|
881
|
-
expansion:
|
|
886
|
+
expansion: k,
|
|
882
887
|
styles: {
|
|
883
|
-
colors:
|
|
888
|
+
colors: P,
|
|
884
889
|
typography: i?.typography
|
|
885
890
|
},
|
|
886
|
-
labels:
|
|
891
|
+
labels: L,
|
|
887
892
|
className: "pt-1",
|
|
888
|
-
onAttachmentClick: a
|
|
893
|
+
onAttachmentClick: a,
|
|
894
|
+
attachmentDisplayResolvers: l
|
|
889
895
|
})
|
|
890
896
|
})
|
|
891
897
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DisplayAttachment, Stage } from '@epam/ai-dial-chat-shared';
|
|
1
|
+
import { AttachmentDisplayResolvers, DisplayAttachment, Stage } from '@epam/ai-dial-chat-shared';
|
|
2
2
|
import { StagesPanelColors } from './stages-props';
|
|
3
3
|
/** Color overrides for the `CollapsedGroup` component applied as CSS custom properties. */
|
|
4
4
|
export interface CollapsedGroupColors {
|
|
@@ -64,5 +64,7 @@ export interface CollapsedGroupProps {
|
|
|
64
64
|
styles?: CollapsedGroupStyles;
|
|
65
65
|
/** Called when a stage attachment tile is clicked/activated. Forwarded unchanged to the inner `StagesPanel`. */
|
|
66
66
|
onAttachmentClick?: (attachment: DisplayAttachment) => void;
|
|
67
|
+
/** Host-owned URL resolvers for stage attachment tiles. Forwarded unchanged to the inner `StagesPanel`. */
|
|
68
|
+
attachmentDisplayResolvers?: AttachmentDisplayResolvers;
|
|
67
69
|
}
|
|
68
70
|
//# sourceMappingURL=collapsed-group.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapsed-group.d.ts","sourceRoot":"","sources":["../../src/models/collapsed-group.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"collapsed-group.d.ts","sourceRoot":"","sources":["../../src/models/collapsed-group.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,0BAA0B,EAC1B,iBAAiB,EACjB,KAAK,EACN,MAAM,2BAA2B,CAAC;AACnC,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,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,CAA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stages-props.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DisplayAttachment, Stage } from '@epam/ai-dial-chat-shared';
|
|
1
|
+
import { AttachmentDisplayResolvers, DisplayAttachment, Stage } from '@epam/ai-dial-chat-shared';
|
|
2
2
|
/** Typography class overrides for stage name and expanded content elements in `StagesPanel`. */
|
|
3
3
|
export interface StageTypography {
|
|
4
4
|
/** CSS utility class applied to the stage/step name. Defaults to `'dial-small-text'`. */
|
|
@@ -91,5 +91,7 @@ export interface StagesPanelProps {
|
|
|
91
91
|
labels?: StagesPanelLabels;
|
|
92
92
|
/** Called when a stage attachment tile is clicked/activated. Receives the mapped display attachment. */
|
|
93
93
|
onAttachmentClick?: (attachment: DisplayAttachment) => void;
|
|
94
|
+
/** Host-owned URL resolvers applied when mapping stage attachments; without them an image tile previews its raw `url`. */
|
|
95
|
+
attachmentDisplayResolvers?: AttachmentDisplayResolvers;
|
|
94
96
|
}
|
|
95
97
|
//# sourceMappingURL=stages-props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stages-props.d.ts","sourceRoot":"","sources":["../../src/models/stages-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"stages-props.d.ts","sourceRoot":"","sources":["../../src/models/stages-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,0BAA0B,EAC1B,iBAAiB,EACjB,KAAK,EACN,MAAM,2BAA2B,CAAC;AAEnC,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;IAC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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,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;IACjD,sHAAsH;IACtH,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;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;IAC3B,wGAAwG;IACxG,iBAAiB,CAAC,EAAE,CAAC,UAAU,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC5D,0HAA0H;IAC1H,0BAA0B,CAAC,EAAE,0BAA0B,CAAC;CACzD"}
|
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.3.0-dev.
|
|
4
|
+
"version": "1.3.0-dev.137",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@tabler/icons-react": "^3.44.0",
|
|
21
|
-
"@epam/ai-dial-attachment-input": "1.3.0-dev.
|
|
21
|
+
"@epam/ai-dial-attachment-input": "1.3.0-dev.137"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"react": "^19.2.8",
|
|
25
|
-
"@epam/ai-dial-chat-shared": "1.3.0-dev.
|
|
25
|
+
"@epam/ai-dial-chat-shared": "1.3.0-dev.137",
|
|
26
26
|
"@epam/ai-dial-ui-kit": "^0.16.0-dev.22"
|
|
27
27
|
},
|
|
28
28
|
"repository": {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DisplayAttachment, MessageAttachment } from '@epam/ai-dial-chat-shared';
|
|
1
|
+
import { AttachmentDisplayResolvers, DisplayAttachment, MessageAttachment } from '@epam/ai-dial-chat-shared';
|
|
2
2
|
/**
|
|
3
3
|
* Maps stage attachments to their display-only model, preferring each
|
|
4
4
|
* attachment's own declared `type` for `contentType` over the type inferred
|
|
@@ -6,6 +6,8 @@ import { DisplayAttachment, MessageAttachment } from '@epam/ai-dial-chat-shared'
|
|
|
6
6
|
* the source document a search result was extracted from, not at the
|
|
7
7
|
* attachment's own content, so the generic message-attachment mapper's
|
|
8
8
|
* reference-url-first inference produces the wrong content type here.
|
|
9
|
+
* Host-owned URL resolution (e.g. turning a `files/...` id into a download
|
|
10
|
+
* URL for an image preview) is applied through `resolvers`.
|
|
9
11
|
*/
|
|
10
|
-
export declare const mapStageAttachmentsToDisplay: (attachments?: MessageAttachment[]) => DisplayAttachment[];
|
|
12
|
+
export declare const mapStageAttachmentsToDisplay: (attachments?: MessageAttachment[], resolvers?: AttachmentDisplayResolvers) => DisplayAttachment[];
|
|
11
13
|
//# sourceMappingURL=stage-attachments.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stage-attachments.d.ts","sourceRoot":"","sources":["../../src/utils/stage-attachments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AAGnC
|
|
1
|
+
{"version":3,"file":"stage-attachments.d.ts","sourceRoot":"","sources":["../../src/utils/stage-attachments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,0BAA0B,EAC1B,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AAGnC;;;;;;;;;GASG;AACH,eAAO,MAAM,4BAA4B,GACvC,cAAc,iBAAiB,EAAE,EACjC,YAAY,0BAA0B,KACrC,iBAAiB,EAqBnB,CAAC"}
|