@epam/ai-dial-source-panel 1.2.0-dev.3 → 1.2.0-dev.300

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"ConversationSourcesPanel.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationSourcesPanel/ConversationSourcesPanel.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,+CAA+C,CAAC;;AAiLnG,wBAA8C"}
1
+ {"version":3,"file":"ConversationSourcesPanel.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationSourcesPanel/ConversationSourcesPanel.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,+CAA+C,CAAC;;AAyLnG,wBAA8C"}
@@ -11,6 +11,16 @@ interface SourcesSectionProps {
11
11
  copyLabel: string;
12
12
  /** Status message announced to assistive tech after a source URL is copied. Defaults to `'Link copied to clipboard'`. */
13
13
  copiedLabel?: string;
14
+ /** Accessible label for the copy button on a code block inside a source quote. Forwarded to `MarkdownRenderer`. */
15
+ codeBlockCopyLabel?: string;
16
+ /** Status announced after a code block inside a source quote has been copied. Forwarded to `MarkdownRenderer`. */
17
+ codeBlockCopiedLabel?: string;
18
+ /** Accessible label for the download button on a code block inside a source quote. Forwarded to `MarkdownRenderer`. */
19
+ codeBlockDownloadLabel?: string;
20
+ /** Accessible label for a table's scrollable region inside a source quote. Forwarded to `MarkdownRenderer`. */
21
+ tableScrollRegionAriaLabel?: string;
22
+ /** Accessible label for a block formula's scrollable region inside a source quote. Forwarded to `MarkdownRenderer`. */
23
+ mathScrollRegionAriaLabel?: string;
14
24
  /** Current search query — used to highlight matches in source titles and quotes. */
15
25
  searchQuery?: string;
16
26
  /** Typography (font utility class) overrides for section headings and source text. */
@@ -1 +1 @@
1
- {"version":3,"file":"SourcesSection.d.ts","sourceRoot":"","sources":["../../../src/components/SourcesSection/SourcesSection.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAoC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,KAAK,EACV,8BAA8B,EAC9B,kCAAkC,EACnC,MAAM,+CAA+C,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAGrE,gDAAgD;AAChD,UAAU,mBAAmB;IAC3B,4CAA4C;IAC5C,KAAK,EAAE,SAAS,CAAC;IACjB,kCAAkC;IAClC,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,0DAA0D;IAC1D,SAAS,EAAE,MAAM,CAAC;IAClB,yHAAyH;IACzH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oFAAoF;IACpF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sFAAsF;IACtF,UAAU,CAAC,EAAE,kCAAkC,CAAC;IAChD,wDAAwD;IACxD,MAAM,CAAC,EAAE,8BAA8B,CAAC;IACxC,gFAAgF;IAChF,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;CACnD;;AA6GD,wBAAoC"}
1
+ {"version":3,"file":"SourcesSection.d.ts","sourceRoot":"","sources":["../../../src/components/SourcesSection/SourcesSection.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAoC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,KAAK,EACV,8BAA8B,EAC9B,kCAAkC,EACnC,MAAM,+CAA+C,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAGrE,gDAAgD;AAChD,UAAU,mBAAmB;IAC3B,4CAA4C;IAC5C,KAAK,EAAE,SAAS,CAAC;IACjB,kCAAkC;IAClC,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,0DAA0D;IAC1D,SAAS,EAAE,MAAM,CAAC;IAClB,yHAAyH;IACzH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mHAAmH;IACnH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,kHAAkH;IAClH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,uHAAuH;IACvH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,+GAA+G;IAC/G,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,uHAAuH;IACvH,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,oFAAoF;IACpF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sFAAsF;IACtF,UAAU,CAAC,EAAE,kCAAkC,CAAC;IAChD,wDAAwD;IACxD,MAAM,CAAC,EAAE,8BAA8B,CAAC;IACxC,gFAAgF;IAChF,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;CACnD;;AA0HD,wBAAoC"}
@@ -0,0 +1,11 @@
1
+ export declare const SOURCE_PANEL_CLASS: {
2
+ /**
3
+ * The panel wrapper — the element `@epam/ai-dial-sidebar` gives the panel's
4
+ * width and slide transition, which is the outer box a host sizes or
5
+ * positions. It is **not** the `aside` inside it: that one carries
6
+ * `dial-sb-aside`, so a host targeting the region itself descends from this
7
+ * class.
8
+ */
9
+ readonly panel: "dial-source-panel-panel";
10
+ };
11
+ //# 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,kBAAkB;IAC7B;;;;;;OAMG;;CAEK,CAAC"}
package/index.css CHANGED
@@ -1,2 +1,2 @@
1
1
  ._link_12icw_1{color:var(--sp-source-link,var(--text-info,#1d4ed8))}._quote_12icw_5{color:var(--sp-source-quote,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}.visible{visibility:visible}.mb-3{margin-bottom:.75rem}.mb-6{margin-bottom:1.5rem}.line-clamp-5{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:5}.block{display:block}.flex{display:flex}.table{display:table}.grid{display:grid}.h-full{height:100%}.w-full{width:100%}.min-w-0{min-width:0}.flex-1{flex:1 1 0%}.resize{resize:both}.grid-cols-\[repeat\(auto-fill\2c minmax\(84px\2c 1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(84px,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.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}.p-0{padding:0}.p-4{padding:1rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.pt-0{padding-top:0}.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{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.\[\&\>div\>\*\+\*\]\:mt-1>div>*+*{margin-top:.25rem}
package/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export { default as ConversationSourcesPanel } from './components/ConversationSourcesPanel/ConversationSourcesPanel';
2
2
  export type { ConversationSourcesPanelColors, ConversationSourcesPanelLabels, ConversationSourcesPanelProps, ConversationSourcesPanelStyles, ConversationSourcesPanelTypography, } from './models/conversation-sources-panel-props';
3
3
  export type { QuotationSource } from './models/quotation-source';
4
+ export { SOURCE_PANEL_CLASS } from './constants/public-class-names';
4
5
  //# 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,OAAO,IAAI,wBAAwB,EAAE,MAAM,gEAAgE,CAAC;AACrH,YAAY,EACV,8BAA8B,EAC9B,8BAA8B,EAC9B,6BAA6B,EAC7B,8BAA8B,EAC9B,kCAAkC,GACnC,MAAM,2CAA2C,CAAC;AACnD,YAAY,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,gEAAgE,CAAC;AACrH,YAAY,EACV,8BAA8B,EAC9B,8BAA8B,EAC9B,6BAA6B,EAC7B,8BAA8B,EAC9B,kCAAkC,GACnC,MAAM,2CAA2C,CAAC;AACnD,YAAY,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC"}
package/index.js CHANGED
@@ -1,21 +1,22 @@
1
1
  import { BASE_LG_ICON_PROPS as e, MarkdownRenderer as t, buildCssVars as n, mergeClasses as r } from "@epam/ai-dial-chat-shared";
2
2
  import { PanelNoResults as i, SidebarOrientation as a, SidebarPanel as o } from "@epam/ai-dial-sidebar";
3
- import { DIAL_ICON_SIZE as s, DIAL_KIT_ICON_STROKE as c, ElementSize as l, GhostIconButton as u, Highlight as d, LinkButton as f, NoDataContent as p, Search as m } from "@epam/ai-dial-ui-kit";
4
- import { IconCopy as h, IconDownload as g } from "@tabler/icons-react";
5
- import { memo as _, useLayoutEffect as v, useMemo as y, useState as b } from "react";
6
- import { AttachmentCard as x } from "@epam/ai-dial-attachment-input";
7
- import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
8
- var T = _(({ attachments: e, title: t, searchQuery: n, titleClassName: i = "dial-body-semi-text", onAttachmentClick: a, attachmentClickLabel: o }) => e.length === 0 ? null : /* @__PURE__ */ w("section", {
3
+ import { DIAL_ICON_SIZE as s, DIAL_KIT_ICON_STROKE as c, ElementSize as l, GhostIconButton as u, Highlight as d, LinkButton as f, NoDataContent as p, Search as m, mergeClasses as h } from "@epam/ai-dial-ui-kit";
4
+ import { IconCopy as g, IconDownload as _ } from "@tabler/icons-react";
5
+ import { memo as v, useLayoutEffect as y, useMemo as b, useState as x } from "react";
6
+ import { AttachmentCard as S } from "@epam/ai-dial-attachment-input";
7
+ import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
8
+ //#region src/constants/public-class-names.ts
9
+ var E = { panel: "dial-source-panel-panel" }, D = v(({ attachments: e, title: t, searchQuery: n, titleClassName: i = "dial-body-semi-text", onAttachmentClick: a, attachmentClickLabel: o }) => e.length === 0 ? null : /* @__PURE__ */ T("section", {
9
10
  className: "mb-6",
10
- children: [/* @__PURE__ */ C("h2", {
11
+ children: [/* @__PURE__ */ w("h2", {
11
12
  className: r(i, "mb-3"),
12
13
  children: t
13
- }), /* @__PURE__ */ C("div", {
14
+ }), /* @__PURE__ */ w("div", {
14
15
  role: "list",
15
16
  className: "grid grid-cols-[repeat(auto-fill,minmax(84px,1fr))] gap-3",
16
- children: e.map((e, t) => /* @__PURE__ */ C("div", {
17
+ children: e.map((e, t) => /* @__PURE__ */ w("div", {
17
18
  role: "listitem",
18
- children: /* @__PURE__ */ C(x, {
19
+ children: /* @__PURE__ */ w(S, {
19
20
  attachment: e,
20
21
  searchQuery: n,
21
22
  onClick: a ? () => a(e) : void 0,
@@ -23,155 +24,166 @@ var T = _(({ attachments: e, title: t, searchQuery: n, titleClassName: i = "dial
23
24
  })
24
25
  }, `${e.id}-${t}`))
25
26
  })]
26
- })), E = {
27
+ })), O = {
27
28
  link: "_link_12icw_1",
28
29
  quote: "_quote_12icw_5"
29
- }, D = _(({ title: e, sources: i, copyLabel: a, copiedLabel: o = "Link copied to clipboard", searchQuery: p = "", typography: m, colors: g, onSourceClick: _ }) => {
30
- let [v, x] = b(""), S = m?.sectionTitleClassName ?? "dial-body-semi-text", T = m?.sourceLinkClassName ?? "dial-small-text", D = m?.sourceQuoteClassName ?? "dial-tiny-text", O = y(() => n({
31
- "--sp-source-link": g?.sourceLink,
32
- "--sp-source-quote": g?.sourceQuote
33
- }), [g]);
30
+ }, k = v(({ title: e, sources: i, copyLabel: a, copiedLabel: o = "Link copied to clipboard", codeBlockCopyLabel: p, codeBlockCopiedLabel: m, codeBlockDownloadLabel: h, tableScrollRegionAriaLabel: _, mathScrollRegionAriaLabel: v, searchQuery: y = "", typography: S, colors: C, onSourceClick: E }) => {
31
+ let [D, k] = x(""), A = S?.sectionTitleClassName ?? "dial-body-semi-text", j = S?.sourceLinkClassName ?? "dial-small-text", M = S?.sourceQuoteClassName ?? "dial-tiny-text", N = b(() => n({
32
+ "--sp-source-link": C?.sourceLink,
33
+ "--sp-source-quote": C?.sourceQuote
34
+ }), [C]);
34
35
  if (i.length === 0) return null;
35
- let k = async (e) => {
36
- await navigator.clipboard.writeText(e), x(o);
36
+ let P = async (e) => {
37
+ await navigator.clipboard.writeText(e), k(o);
37
38
  };
38
- return /* @__PURE__ */ w("section", {
39
+ return /* @__PURE__ */ T("section", {
39
40
  className: "mb-6",
40
- style: O,
41
+ style: N,
41
42
  children: [
42
- /* @__PURE__ */ C("h2", {
43
- className: r(S, "mb-3"),
43
+ /* @__PURE__ */ w("h2", {
44
+ className: r(A, "mb-3"),
44
45
  children: e
45
46
  }),
46
- /* @__PURE__ */ C("ul", {
47
+ /* @__PURE__ */ w("ul", {
47
48
  className: "flex flex-col gap-3",
48
- children: i.map((e) => /* @__PURE__ */ w("li", {
49
+ children: i.map((e) => /* @__PURE__ */ T("li", {
49
50
  className: "flex flex-col gap-1",
50
- children: [/* @__PURE__ */ w("div", {
51
+ children: [/* @__PURE__ */ T("div", {
51
52
  className: "flex min-w-0 items-center justify-between gap-2",
52
- children: [/* @__PURE__ */ C(f, {
53
+ children: [/* @__PURE__ */ w(f, {
53
54
  href: e.url,
54
55
  target: "_blank",
55
56
  size: l.Small,
56
- className: r(E.link, "min-w-0 flex-1 justify-start"),
57
- textClassName: r(T, "min-w-0 truncate"),
58
- label: p ? /* @__PURE__ */ C(d, {
57
+ className: r(O.link, "min-w-0 flex-1 justify-start"),
58
+ textClassName: r(j, "min-w-0 truncate"),
59
+ label: /* @__PURE__ */ w(d, {
59
60
  text: e.title,
60
- query: p,
61
+ query: y,
61
62
  maxLines: 1
62
- }) : e.title,
63
+ }),
63
64
  "aria-label": e.title,
64
- onClick: _ ? (t) => {
65
- t.preventDefault(), _(e);
65
+ onClick: E ? (t) => {
66
+ t.preventDefault(), E(e);
66
67
  } : void 0
67
- }), /* @__PURE__ */ C(u, {
68
+ }), /* @__PURE__ */ w(u, {
68
69
  size: l.Small,
69
- icon: /* @__PURE__ */ C(h, {
70
+ icon: /* @__PURE__ */ w(g, {
70
71
  size: s.SM,
71
72
  stroke: c,
72
73
  "aria-hidden": !0
73
74
  }),
74
75
  "aria-label": a,
75
- onClick: () => void k(e.url)
76
+ onClick: () => void P(e.url)
76
77
  })]
77
- }), e.quote && /* @__PURE__ */ C("div", {
78
- className: r(D, E.quote, "line-clamp-5 [&>div>*+*]:mt-1"),
79
- children: /* @__PURE__ */ C(t, { content: e.quote })
78
+ }), e.quote && /* @__PURE__ */ w("div", {
79
+ className: r(M, O.quote, "line-clamp-5 [&>div>*+*]:mt-1"),
80
+ children: /* @__PURE__ */ w(t, {
81
+ content: e.quote,
82
+ codeBlockCopyLabel: p,
83
+ codeBlockCopiedLabel: m,
84
+ codeBlockDownloadLabel: h,
85
+ tableScrollRegionAriaLabel: _,
86
+ mathScrollRegionAriaLabel: v
87
+ })
80
88
  })]
81
89
  }, e.url))
82
90
  }),
83
- /* @__PURE__ */ C("span", {
91
+ /* @__PURE__ */ w("span", {
84
92
  role: "status",
85
93
  "aria-live": "polite",
86
94
  className: "sr-only",
87
- children: v
95
+ children: D
88
96
  })
89
97
  ]
90
98
  });
91
- }), O = (e, t) => e.toLowerCase().includes(t.toLowerCase()), k = _(({ isOpen: t, onClose: n, uploaded: r, generated: s, sources: c, onAttachmentClick: l, onSourceClick: d, onDownloadAll: f, isMobile: h, defaultWidth: _, minWidth: x, maxWidth: E, onResizeStop: k, labels: A, styles: j, title: M, additionalSections: N }) => {
92
- let [P, F] = b(""), I = (e) => {
93
- F(e ?? "");
99
+ }), A = (e, t) => e.toLowerCase().includes(t.toLowerCase()), j = v(({ isOpen: t, onClose: n, uploaded: r, generated: s, sources: c, onAttachmentClick: l, onSourceClick: d, onDownloadAll: f, isMobile: g, defaultWidth: v, minWidth: S, maxWidth: O, onResizeStop: j, labels: M, styles: N, title: P, additionalSections: F }) => {
100
+ let [I, L] = x(""), R = (e) => {
101
+ L(e ?? "");
94
102
  };
95
- v(() => {
96
- t || F("");
103
+ y(() => {
104
+ t || L("");
97
105
  }, [t]);
98
- let L = y(() => P ? r.filter((e) => O(e.name, P)) : r, [r, P]), R = y(() => P ? s.filter((e) => O(e.name, P)) : s, [s, P]), z = y(() => P ? c.filter((e) => O(e.title, P) || O(e.url, P) || e.quote != null && O(e.quote, P)) : c, [c, P]), B = r.length > 0 || s.length > 0 || c.length > 0, V = !B && !N, H = P !== "" && L.length === 0 && R.length === 0 && z.length === 0, U;
99
- return U = V ? /* @__PURE__ */ C("div", {
106
+ let z = b(() => I ? r.filter((e) => A(e.name, I)) : r, [r, I]), B = b(() => I ? s.filter((e) => A(e.name, I)) : s, [s, I]), V = b(() => I ? c.filter((e) => A(e.title, I) || A(e.url, I) || e.quote != null && A(e.quote, I)) : c, [c, I]), H = r.length > 0 || s.length > 0 || c.length > 0, U = !H && !F, W = I !== "" && z.length === 0 && B.length === 0 && V.length === 0, G;
107
+ return G = U ? /* @__PURE__ */ w("div", {
100
108
  className: "flex h-full items-center justify-center",
101
- children: /* @__PURE__ */ C(p, { title: A.noDataLabel })
102
- }) : /* @__PURE__ */ w(S, { children: [N, H ? /* @__PURE__ */ C(i, { label: A.noResultsLabel }) : /* @__PURE__ */ w(S, { children: [
103
- /* @__PURE__ */ C(T, {
104
- attachments: L,
105
- title: A.uploadedSectionTitle,
106
- searchQuery: P,
107
- titleClassName: j?.typography?.sectionTitleClassName,
109
+ children: /* @__PURE__ */ w(p, { title: M.noDataLabel })
110
+ }) : /* @__PURE__ */ T(C, { children: [F, W ? /* @__PURE__ */ w(i, { label: M.noResultsLabel }) : /* @__PURE__ */ T(C, { children: [
111
+ /* @__PURE__ */ w(D, {
112
+ attachments: z,
113
+ title: M.uploadedSectionTitle,
114
+ searchQuery: I,
115
+ titleClassName: N?.typography?.sectionTitleClassName,
108
116
  onAttachmentClick: l,
109
- attachmentClickLabel: A.attachmentClickLabel
117
+ attachmentClickLabel: M.attachmentClickLabel
110
118
  }),
111
- /* @__PURE__ */ C(T, {
112
- attachments: R,
113
- title: A.generatedSectionTitle,
114
- searchQuery: P,
115
- titleClassName: j?.typography?.sectionTitleClassName,
119
+ /* @__PURE__ */ w(D, {
120
+ attachments: B,
121
+ title: M.generatedSectionTitle,
122
+ searchQuery: I,
123
+ titleClassName: N?.typography?.sectionTitleClassName,
116
124
  onAttachmentClick: l,
117
- attachmentClickLabel: A.attachmentClickLabel
125
+ attachmentClickLabel: M.attachmentClickLabel
118
126
  }),
119
- /* @__PURE__ */ C(D, {
120
- sources: z,
121
- title: A.sourcesSectionTitle,
122
- searchQuery: P,
123
- typography: j?.typography,
124
- colors: j?.colors,
125
- copyLabel: A.copySourceLabel,
126
- copiedLabel: A.sourceCopiedLabel,
127
+ /* @__PURE__ */ w(k, {
128
+ sources: V,
129
+ title: M.sourcesSectionTitle,
130
+ searchQuery: I,
131
+ typography: N?.typography,
132
+ colors: N?.colors,
133
+ copyLabel: M.copySourceLabel,
134
+ copiedLabel: M.sourceCopiedLabel,
135
+ codeBlockCopyLabel: M.codeBlockCopyLabel,
136
+ codeBlockCopiedLabel: M.codeBlockCopiedLabel,
137
+ codeBlockDownloadLabel: M.codeBlockDownloadLabel,
138
+ tableScrollRegionAriaLabel: M.tableScrollRegionAriaLabel,
139
+ mathScrollRegionAriaLabel: M.mathScrollRegionAriaLabel,
127
140
  onSourceClick: d
128
141
  })
129
- ] })] }), /* @__PURE__ */ w(o, {
142
+ ] })] }), /* @__PURE__ */ T(o, {
130
143
  isOpen: t,
131
144
  orientation: a.Right,
132
145
  styles: {
133
- className: h && t ? "w-full" : void 0,
146
+ className: h(g && t && "w-full", E.panel),
134
147
  bodyClassName: "flex flex-col overflow-hidden p-0"
135
148
  },
136
- labels: A,
137
- title: M,
149
+ labels: M,
150
+ title: P,
138
151
  onClose: n,
139
- resizable: !h,
140
- defaultWidth: _,
141
- minWidth: x,
142
- maxWidth: E,
143
- onResizeStop: k,
144
- rightActions: B && /* @__PURE__ */ C(u, {
145
- icon: /* @__PURE__ */ C(g, { ...e }),
146
- "aria-label": A.downloadAllLabel,
147
- tooltipProps: { tooltip: A.downloadAllLabel },
148
- onClick: f,
149
- disabled: !f
152
+ resizable: !g,
153
+ defaultWidth: v,
154
+ minWidth: S,
155
+ maxWidth: O,
156
+ onResizeStop: j,
157
+ rightActions: H && f && /* @__PURE__ */ w(u, {
158
+ icon: /* @__PURE__ */ w(_, { ...e }),
159
+ "aria-label": M.downloadAllLabel,
160
+ tooltipProps: { tooltip: M.downloadAllLabel },
161
+ onClick: f
150
162
  }),
151
163
  children: [
152
- B && /* @__PURE__ */ C("div", {
164
+ H && /* @__PURE__ */ w("div", {
153
165
  role: "search",
154
166
  className: "px-3 py-2",
155
- children: /* @__PURE__ */ C(m, {
156
- value: P,
157
- onChange: I,
158
- placeholder: A.searchPlaceholder,
159
- clearLabel: A.searchClearLabel,
160
- "aria-label": A.searchPlaceholder
167
+ children: /* @__PURE__ */ w(m, {
168
+ value: I,
169
+ onChange: R,
170
+ placeholder: M.searchPlaceholder,
171
+ clearLabel: M.searchClearLabel,
172
+ "aria-label": M.searchPlaceholder
161
173
  })
162
174
  }),
163
- /* @__PURE__ */ C("span", {
175
+ /* @__PURE__ */ w("span", {
164
176
  role: "status",
165
177
  "aria-live": "polite",
166
178
  className: "sr-only",
167
- children: H ? A.noResultsLabel : ""
179
+ children: W ? M.noResultsLabel : ""
168
180
  }),
169
- /* @__PURE__ */ C("div", {
181
+ /* @__PURE__ */ w("div", {
170
182
  className: "flex-1 overflow-y-auto p-4 pt-0",
171
- children: U
183
+ children: G
172
184
  })
173
185
  ]
174
186
  });
175
187
  });
176
188
  //#endregion
177
- export { k as ConversationSourcesPanel };
189
+ export { j as ConversationSourcesPanel, E as SOURCE_PANEL_CLASS };
@@ -31,6 +31,16 @@ export interface ConversationSourcesPanelLabels {
31
31
  sourceCopiedLabel?: string;
32
32
  /** Label passed to each attachment card's action button. */
33
33
  attachmentClickLabel: string;
34
+ /** Accessible label for the copy button on a fenced code block inside a source quote. Defaults to `'Copy code'`. */
35
+ codeBlockCopyLabel?: string;
36
+ /** Status announced after a fenced code block inside a source quote has been copied. Defaults to `'Copied!'`. */
37
+ codeBlockCopiedLabel?: string;
38
+ /** Accessible label for the download button on a fenced code block inside a source quote. Defaults to `'Download code'`. */
39
+ codeBlockDownloadLabel?: string;
40
+ /** Accessible label for a table's horizontally scrollable region inside a source quote. Defaults to `'Scrollable table'`. */
41
+ tableScrollRegionAriaLabel?: string;
42
+ /** Accessible label for a block formula's horizontally scrollable region inside a source quote. Defaults to `'Scrollable formula'`. */
43
+ mathScrollRegionAriaLabel?: string;
34
44
  }
35
45
  /** CSS custom-property overrides for the sources section. */
36
46
  export interface ConversationSourcesPanelColors {
@@ -71,7 +81,7 @@ export interface ConversationSourcesPanelProps {
71
81
  onAttachmentClick?: (attachment: DisplayAttachment) => void;
72
82
  /** Called when the user clicks a source link. When omitted, the link navigates normally. */
73
83
  onSourceClick?: (source: QuotationSource) => void;
74
- /** Called when the user activates the download-all button; omit to disable the button. */
84
+ /** Called when the user activates the download-all button; omit to hide the button. */
75
85
  onDownloadAll?: () => void;
76
86
  /** Whether the viewport is in mobile breakpoint (disables resizing). */
77
87
  isMobile: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"conversation-sources-panel-props.d.ts","sourceRoot":"","sources":["../../src/models/conversation-sources-panel-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,oFAAoF;AACpF,MAAM,WAAW,8BAA8B;IAC7C,qDAAqD;IACrD,SAAS,EAAE,MAAM,CAAC;IAClB,kCAAkC;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,4FAA4F;IAC5F,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sDAAsD;IACtD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,0DAA0D;IAC1D,gBAAgB,EAAE,MAAM,CAAC;IACzB,oFAAoF;IACpF,WAAW,EAAE,MAAM,CAAC;IACpB,sDAAsD;IACtD,cAAc,EAAE,MAAM,CAAC;IACvB,yDAAyD;IACzD,gBAAgB,EAAE,MAAM,CAAC;IACzB,mDAAmD;IACnD,oBAAoB,EAAE,MAAM,CAAC;IAC7B,oDAAoD;IACpD,qBAAqB,EAAE,MAAM,CAAC;IAC9B,4CAA4C;IAC5C,mBAAmB,EAAE,MAAM,CAAC;IAC5B,0DAA0D;IAC1D,eAAe,EAAE,MAAM,CAAC;IACxB,yHAAyH;IACzH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,4DAA4D;IAC5D,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED,6DAA6D;AAC7D,MAAM,WAAW,8BAA8B;IAC7C,yBAAyB;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+BAA+B;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,oEAAoE;AACpE,MAAM,WAAW,kCAAkC;IACjD,+FAA+F;IAC/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,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,SAAS,CAAC;CAChC"}
1
+ {"version":3,"file":"conversation-sources-panel-props.d.ts","sourceRoot":"","sources":["../../src/models/conversation-sources-panel-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,oFAAoF;AACpF,MAAM,WAAW,8BAA8B;IAC7C,qDAAqD;IACrD,SAAS,EAAE,MAAM,CAAC;IAClB,kCAAkC;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,4FAA4F;IAC5F,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sDAAsD;IACtD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,0DAA0D;IAC1D,gBAAgB,EAAE,MAAM,CAAC;IACzB,oFAAoF;IACpF,WAAW,EAAE,MAAM,CAAC;IACpB,sDAAsD;IACtD,cAAc,EAAE,MAAM,CAAC;IACvB,yDAAyD;IACzD,gBAAgB,EAAE,MAAM,CAAC;IACzB,mDAAmD;IACnD,oBAAoB,EAAE,MAAM,CAAC;IAC7B,oDAAoD;IACpD,qBAAqB,EAAE,MAAM,CAAC;IAC9B,4CAA4C;IAC5C,mBAAmB,EAAE,MAAM,CAAC;IAC5B,0DAA0D;IAC1D,eAAe,EAAE,MAAM,CAAC;IACxB,yHAAyH;IACzH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,4DAA4D;IAC5D,oBAAoB,EAAE,MAAM,CAAC;IAC7B,oHAAoH;IACpH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iHAAiH;IACjH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,4HAA4H;IAC5H,sBAAsB,CAAC,EAAE,MAAM,CAAC;IACh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E,MAAM,CAAC;IACtB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uEAAuE;IACvE,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,gEAAgE;IAChE,MAAM,EAAE,8BAA8B,CAAC;IACvC,wEAAwE;IACxE,MAAM,CAAC,EAAE,8BAA8B,CAAC;IACxC;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,SAAS,CAAC;CAChC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-source-panel",
3
3
  "description": "Panel for displaying conversation sources — uploaded files and generated citations",
4
- "version": "1.2.0-dev.3",
4
+ "version": "1.2.0-dev.300",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -18,13 +18,13 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@tabler/icons-react": "^3.44.0",
21
- "@epam/ai-dial-attachment-input": "1.2.0-dev.3",
22
- "@epam/ai-dial-sidebar": "1.2.0-dev.3"
21
+ "@epam/ai-dial-attachment-input": "1.2.0-dev.300",
22
+ "@epam/ai-dial-sidebar": "1.2.0-dev.300"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "react": "^19.2.8",
26
- "@epam/ai-dial-chat-shared": "1.2.0-dev.3",
27
- "@epam/ai-dial-ui-kit": "^0.14.2"
26
+ "@epam/ai-dial-chat-shared": "1.2.0-dev.300",
27
+ "@epam/ai-dial-ui-kit": "^0.15.0-dev.39"
28
28
  },
29
29
  "repository": {
30
30
  "type": "git",