@epam/ai-dial-quotations 1.1.0-dev.242 → 1.1.0-dev.244
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CitationDropdown.d.ts","sourceRoot":"","sources":["../../../src/components/CitationDropdown/CitationDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,OAAO,EAAE,EAAE,EAAQ,SAAS,EAAwB,MAAM,OAAO,CAAC;AAElE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC5B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,kCAAkC,CAAC;AAE1C,kDAAkD;AAClD,MAAM,WAAW,qBAAqB;IACpC,kEAAkE;IAClE,KAAK,EAAE,eAAe,CAAC;IACvB;;;OAGG;IACH,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;IAC7C,uEAAuE;IACvE,eAAe,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;IAClD,wDAAwD;IACxD,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,uFAAuF;IACvF,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,+CAA+C;IAC/C,UAAU,EAAE,kBAAkB,CAAC;IAC/B,yDAAyD;IACzD,YAAY,EAAE,oBAAoB,CAAC;IACnC,2DAA2D;IAC3D,cAAc,CAAC,EAAE,sBAAsB,CAAC;IACxC,gGAAgG;IAChG,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,8HAA8H;AAC9H,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,
|
|
1
|
+
{"version":3,"file":"CitationDropdown.d.ts","sourceRoot":"","sources":["../../../src/components/CitationDropdown/CitationDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,OAAO,EAAE,EAAE,EAAQ,SAAS,EAAwB,MAAM,OAAO,CAAC;AAElE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC5B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,kCAAkC,CAAC;AAE1C,kDAAkD;AAClD,MAAM,WAAW,qBAAqB;IACpC,kEAAkE;IAClE,KAAK,EAAE,eAAe,CAAC;IACvB;;;OAGG;IACH,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;IAC7C,uEAAuE;IACvE,eAAe,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;IAClD,wDAAwD;IACxD,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,uFAAuF;IACvF,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,+CAA+C;IAC/C,UAAU,EAAE,kBAAkB,CAAC;IAC/B,yDAAyD;IACzD,YAAY,EAAE,oBAAoB,CAAC;IACnC,2DAA2D;IAC3D,cAAc,CAAC,EAAE,sBAAsB,CAAC;IACxC,gGAAgG;IAChG,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,8HAA8H;AAC9H,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CA0EtD,CAAC;;AAEF,wBAAsC"}
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MIMEType as e, MarkdownRenderer as t, buildCssVars as n, mergeClasses as r } from "@epam/ai-dial-chat-shared";
|
|
2
|
-
import {
|
|
2
|
+
import { DialTooltip as i, ElementSize as a, EllipsisTooltip as o, GhostIconButton as s, NeutralButton as c, PrimaryButton as l } from "@epam/ai-dial-ui-kit";
|
|
3
3
|
import { IconChevronLeft as u, IconChevronRight as d } from "@tabler/icons-react";
|
|
4
4
|
import { createContext as f, memo as p, useCallback as m, useContext as h, useMemo as g, useState as _ } from "react";
|
|
5
5
|
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
@@ -9,8 +9,8 @@ var b = {
|
|
|
9
9
|
title: "_title_1kph1_9",
|
|
10
10
|
switcher: "_switcher_1kph1_13",
|
|
11
11
|
sourceName: "_sourceName_1kph1_17"
|
|
12
|
-
}, x = ({ group:
|
|
13
|
-
let S =
|
|
12
|
+
}, x = ({ group: i, activeIndex: c, onIndexChange: f, onPreview: p, onOpenInBrowser: m, headerIcon: h, labels: g, typography: _, colors: x }) => {
|
|
13
|
+
let S = i.annotations.length, C = i.annotations[c] ?? i.primaryAnnotation, w = S > 1, T = i.annotations.some((e) => e.body?.title), E = i.primaryAnnotation.body?.source?.attachment?.type, D = p == null || E === e.HTML || E === e.XHTML, O = _?.sourceNameClassName ?? "dial-tiny-text", k = _?.titleClassName ?? "dial-body-semi-text", A = _?.quoteClassName ?? "dial-small-text", j = _?.switcherClassName ?? "dial-tiny-text", M = n({
|
|
14
14
|
"--cc-card-bg": x?.cardBackground,
|
|
15
15
|
"--cc-quote-text": x?.quoteText,
|
|
16
16
|
"--cc-title-text": x?.titleText,
|
|
@@ -28,8 +28,8 @@ var b = {
|
|
|
28
28
|
className: "flex items-center justify-between gap-2",
|
|
29
29
|
children: [/* @__PURE__ */ y("div", {
|
|
30
30
|
className: "flex min-w-0 items-center gap-1",
|
|
31
|
-
children: [h, /* @__PURE__ */ v(
|
|
32
|
-
text:
|
|
31
|
+
children: [h, /* @__PURE__ */ v(o, {
|
|
32
|
+
text: i.sourceName,
|
|
33
33
|
className: r(O, "min-w-0", b.sourceName)
|
|
34
34
|
})]
|
|
35
35
|
}), w && /* @__PURE__ */ y("div", {
|
|
@@ -40,7 +40,7 @@ var b = {
|
|
|
40
40
|
size: 14,
|
|
41
41
|
className: "rtl:scale-x-[-1]"
|
|
42
42
|
}),
|
|
43
|
-
size:
|
|
43
|
+
size: a.Small,
|
|
44
44
|
"aria-label": g.previousCitation,
|
|
45
45
|
onClick: () => f((c - 1 + S) % S)
|
|
46
46
|
}),
|
|
@@ -53,7 +53,7 @@ var b = {
|
|
|
53
53
|
size: 14,
|
|
54
54
|
className: "rtl:scale-x-[-1]"
|
|
55
55
|
}),
|
|
56
|
-
size:
|
|
56
|
+
size: a.Small,
|
|
57
57
|
"aria-label": g.nextCitation,
|
|
58
58
|
onClick: () => f((c + 1) % S)
|
|
59
59
|
})
|
|
@@ -77,11 +77,11 @@ var b = {
|
|
|
77
77
|
className: "flex justify-start gap-2",
|
|
78
78
|
children: [p && /* @__PURE__ */ v(l, {
|
|
79
79
|
label: g.preview,
|
|
80
|
-
size:
|
|
80
|
+
size: a.Small,
|
|
81
81
|
onClick: () => p(C)
|
|
82
82
|
}), /* @__PURE__ */ v(l, {
|
|
83
83
|
label: D ? g.openInBrowser : g.download,
|
|
84
|
-
size:
|
|
84
|
+
size: a.Small,
|
|
85
85
|
onClick: () => m(C)
|
|
86
86
|
})]
|
|
87
87
|
})
|
|
@@ -92,7 +92,7 @@ p(x);
|
|
|
92
92
|
//#endregion
|
|
93
93
|
//#region src/components/CitationMarker/CitationMarker.tsx
|
|
94
94
|
var S = ({ annotationCount: e, onOpen: t, icon: n, labels: r, labelClassName: i = "dial-caption-text" }) => {
|
|
95
|
-
let
|
|
95
|
+
let o = /* @__PURE__ */ y("span", {
|
|
96
96
|
className: "flex items-center gap-1",
|
|
97
97
|
children: [n, /* @__PURE__ */ v("span", {
|
|
98
98
|
className: i,
|
|
@@ -100,8 +100,8 @@ var S = ({ annotationCount: e, onOpen: t, icon: n, labels: r, labelClassName: i
|
|
|
100
100
|
})]
|
|
101
101
|
});
|
|
102
102
|
return /* @__PURE__ */ v(c, {
|
|
103
|
-
size:
|
|
104
|
-
label:
|
|
103
|
+
size: a.Small,
|
|
104
|
+
label: o,
|
|
105
105
|
"aria-label": r.ariaLabel,
|
|
106
106
|
onClick: t
|
|
107
107
|
});
|
|
@@ -113,9 +113,9 @@ var C = f(null), w = C.Provider, T = () => {
|
|
|
113
113
|
let e = h(C);
|
|
114
114
|
if (e == null) throw Error("useCitationCardContext must be used within a CitationCardProvider");
|
|
115
115
|
return e;
|
|
116
|
-
}, E = ({ group: e, onPreview: t, onOpenInBrowser: n, icon: r, headerIcon:
|
|
116
|
+
}, E = ({ group: e, onPreview: t, onOpenInBrowser: n, icon: r, headerIcon: a, cardLabels: o, markerLabels: s, cardTypography: c, markerLabelClassName: l }) => {
|
|
117
117
|
let u = T(), d = u.isOpen(e.sourceUrl), f = u.getActiveIndex(e.sourceUrl);
|
|
118
|
-
return /* @__PURE__ */ v(
|
|
118
|
+
return /* @__PURE__ */ v(i, {
|
|
119
119
|
open: d,
|
|
120
120
|
onOpenChange: m((e) => {
|
|
121
121
|
e || u.closePopup();
|
|
@@ -131,7 +131,7 @@ var C = f(null), w = C.Provider, T = () => {
|
|
|
131
131
|
t(e), u.closePopup();
|
|
132
132
|
} : void 0, [t, u]),
|
|
133
133
|
onOpenInBrowser: n,
|
|
134
|
-
headerIcon:
|
|
134
|
+
headerIcon: a,
|
|
135
135
|
labels: o,
|
|
136
136
|
typography: c
|
|
137
137
|
}),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-quotations",
|
|
3
3
|
"description": "Citation and annotation components, hooks, and utilities for AI DIAL conversations",
|
|
4
|
-
"version": "1.1.0-dev.
|
|
4
|
+
"version": "1.1.0-dev.244",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"react": "^19.0.0",
|
|
20
20
|
"@tabler/icons-react": "^3.0.0",
|
|
21
|
-
"@epam/ai-dial-chat-shared": "1.1.0-dev.
|
|
22
|
-
"@epam/ai-dial-ui-kit": "
|
|
21
|
+
"@epam/ai-dial-chat-shared": "1.1.0-dev.244",
|
|
22
|
+
"@epam/ai-dial-ui-kit": "*",
|
|
23
23
|
"@epam/pdf-highlighter-kit": ">=0.0.14"
|
|
24
24
|
},
|
|
25
25
|
"repository": {
|