@epam/ai-dial-quotations 1.1.2 → 1.2.0-dev.101
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/CitationCard/CitationCard.d.ts.map +1 -1
- package/components/CitationDropdown/CitationDropdown.d.ts.map +1 -1
- package/components/CitationMarker/CitationMarker.d.ts.map +1 -1
- package/constants/public-class-names.d.ts +14 -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 +78 -76
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CitationCard.d.ts","sourceRoot":"","sources":["../../../src/components/CitationCard/CitationCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAe5D,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CitationCard.d.ts","sourceRoot":"","sources":["../../../src/components/CitationCard/CitationCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAe5D,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAG/E,+CAA+C;AAC/C,MAAM,WAAW,kBAAkB;IACjC,4DAA4D;IAC5D,SAAS,EAAE,MAAM,CAAC;IAClB,2DAA2D;IAC3D,gBAAgB,EAAE,MAAM,CAAC;IACzB,uDAAuD;IACvD,YAAY,EAAE,MAAM,CAAC;IACrB,2GAA2G;IAC3G,kBAAkB,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/D,sCAAsC;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,aAAa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EAAE,kBAAkB,CAAC;CAC7B;AAED,yFAAyF;AACzF,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAqJ9C,CAAC"}
|
|
@@ -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;AAG5D,OAAO,EAAE,EAAE,EAAE,SAAS,EAA+B,MAAM,OAAO,CAAC;
|
|
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;AAG5D,OAAO,EAAE,EAAE,EAAE,SAAS,EAA+B,MAAM,OAAO,CAAC;AAGnE,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;AAG1C,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,qHAAqH;IACrH,aAAa,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,OAAO,CAAC;IACpD,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,CA6EtD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CitationMarker.d.ts","sourceRoot":"","sources":["../../../src/components/CitationMarker/CitationMarker.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CitationMarker.d.ts","sourceRoot":"","sources":["../../../src/components/CitationMarker/CitationMarker.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGtC,iDAAiD;AACjD,MAAM,WAAW,oBAAoB;IACnC,8CAA8C;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,gDAAgD;AAChD,MAAM,WAAW,mBAAmB;IAClC,kEAAkE;IAClE,UAAU,EAAE,MAAM,CAAC;IACnB,0DAA0D;IAC1D,eAAe,EAAE,MAAM,CAAC;IACxB,yEAAyE;IACzE,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,mEAAmE;IACnE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,4BAA4B;IAC5B,MAAM,EAAE,oBAAoB,CAAC;IAC7B,8FAA8F;IAC9F,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,sEAAsE;AACtE,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CA6BlD,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const QUOTATIONS_CLASS: {
|
|
2
|
+
/** The citation card's `role="dialog"` root, which carries the themed CSS variables. */
|
|
3
|
+
readonly citationCard: "dial-quotations-citation-card";
|
|
4
|
+
/** The floating panel a `CitationDropdown` reveals, which holds the card. */
|
|
5
|
+
readonly citationDropdown: "dial-quotations-citation-dropdown";
|
|
6
|
+
/**
|
|
7
|
+
* The marker pill that opens a citation, additive to the
|
|
8
|
+
* `dial-kit-base-button` that `@epam/ai-dial-ui-kit` draws. The pill caps its
|
|
9
|
+
* own width and ellipsises a long source name, so a host widening it should
|
|
10
|
+
* override `max-inline-size` here rather than unset the truncation.
|
|
11
|
+
*/
|
|
12
|
+
readonly citationMarker: "dial-quotations-citation-marker";
|
|
13
|
+
};
|
|
14
|
+
//# 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,gBAAgB;IAC3B,wFAAwF;;IAExF,6EAA6E;;IAE7E;;;;;OAKG;;CAEK,CAAC"}
|
package/index.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
._card_1kph1_1{background:var(--cc-card-bg,var(--bg-layer-raised,#fcfcfc))}._quote_1kph1_5{color:var(--cc-quote-text,var(--text-secondary,#57647a))}._title_1kph1_9{color:var(--cc-title-text,var(--text-primary,#161b2d))}._switcher_1kph1_13{color:var(--cc-switcher-text,var(--text-secondary,#57647a))}._sourceName_1kph1_17{color:var(--cc-source-name-text,var(--text-primary,#161b2d))}._content_xzs0h_1>svg{fill:var(--cc-card-bg,var(--bg-layer-raised,#fcfcfc));stroke:#0000}
|
|
2
|
-
/*$vite$:1*/.visible{visibility:visible}.collapse{visibility:collapse}.fixed{position:fixed}.absolute{position:absolute}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-3{margin-bottom:.75rem}.ms-1{margin-inline-start:.25rem}.line-clamp-6{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:6}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table-cell{display:table-cell}.table-row{display:table-row}.hidden{display:none}.min-h-\[3lh\]{min-height:3lh}.w-\[400px\]{width:400px}.min-w-0{min-width:0}.\!max-w-none{max-width:none!important}.shrink-0{flex-shrink:0}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.break-words{overflow-wrap:break-word}.\!rounded-none{border-radius:0!important}.rounded-lg{border-radius:.5rem}.\!border-0{border-width:0!important}.\!bg-transparent{background-color:transparent!important}.\!p-0{padding:0!important}.p-4{padding:1rem}.ps-3{padding-inline-start:.75rem}.align-middle{vertical-align:middle}.\!shadow-none{--tw-shadow:0 0 #0000!important;--tw-shadow-colored:0 0 #0000!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.shadow-lg{--tw-shadow:0 8px 44px 0 var(--shadow-lg,#2764d914);--tw-shadow-colored:0 8px 44px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.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)}.\[overflow-wrap\:anywhere\]{overflow-wrap:anywhere}.\[text-wrap\:pretty\]{text-wrap:pretty}.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))}
|
|
2
|
+
/*$vite$:1*/.visible{visibility:visible}.collapse{visibility:collapse}.fixed{position:fixed}.absolute{position:absolute}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-3{margin-bottom:.75rem}.ms-1{margin-inline-start:.25rem}.line-clamp-6{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:6}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table-cell{display:table-cell}.table-row{display:table-row}.hidden{display:none}.min-h-\[3lh\]{min-height:3lh}.w-\[400px\]{width:400px}.min-w-0{min-width:0}.\!max-w-none{max-width:none!important}.max-w-\[240px\]{max-width:240px}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.break-words{overflow-wrap:break-word}.\!rounded-none{border-radius:0!important}.rounded-lg{border-radius:.5rem}.\!border-0{border-width:0!important}.\!bg-transparent{background-color:transparent!important}.\!p-0{padding:0!important}.p-4{padding:1rem}.ps-3{padding-inline-start:.75rem}.align-middle{vertical-align:middle}.\!shadow-none{--tw-shadow:0 0 #0000!important;--tw-shadow-colored:0 0 #0000!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.shadow-lg{--tw-shadow:0 8px 44px 0 var(--shadow-lg,#2764d914);--tw-shadow-colored:0 8px 44px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.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)}.\[overflow-wrap\:anywhere\]{overflow-wrap:anywhere}.\[text-wrap\:pretty\]{text-wrap:pretty}.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
|
@@ -17,4 +17,5 @@ export type { DocxOfficeHighlightLocation, DocxTableRowOfficeHighlightLocation,
|
|
|
17
17
|
export { injectCitationSentinels, replaceSentinelsInChildren, stripCitTagsWhileStreaming, } from './utils/citation-injection';
|
|
18
18
|
export { isReferenceOnlyAttachment, parsePdfPageReference, getReferenceAttachmentGroups, } from './utils/reference-attachment';
|
|
19
19
|
export type { PdfPageReference } from './utils/reference-attachment';
|
|
20
|
+
export { QUOTATIONS_CLASS } from './constants/public-class-names';
|
|
20
21
|
//# 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":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,YAAY,EACV,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAClF,YAAY,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AAG5F,OAAO,EACL,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,+BAA+B,CAAC;AACvC,YAAY,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGtE,OAA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conChevronRight as h } from "@tabler/icons-react";
|
|
4
4
|
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
5
5
|
import { createContext as y, useCallback as b, useContext as x, useId as S, useMemo as C, useState as w } from "react";
|
|
6
|
+
//#region src/constants/public-class-names.ts
|
|
6
7
|
var T = {
|
|
8
|
+
citationCard: "dial-quotations-citation-card",
|
|
9
|
+
citationDropdown: "dial-quotations-citation-dropdown",
|
|
10
|
+
citationMarker: "dial-quotations-citation-marker"
|
|
11
|
+
}, E = {
|
|
7
12
|
card: "_card_1kph1_1",
|
|
8
13
|
quote: "_quote_1kph1_5",
|
|
9
14
|
title: "_title_1kph1_9",
|
|
10
15
|
switcher: "_switcher_1kph1_13",
|
|
11
16
|
sourceName: "_sourceName_1kph1_17"
|
|
12
|
-
},
|
|
13
|
-
let S = r.annotations.length, C = r.annotations[a] ?? r.primaryAnnotation, w = S > 1,
|
|
17
|
+
}, D = ({ group: r, activeIndex: a, onIndexChange: o, onPreview: d, onOpenInBrowser: p, headerIcon: g, labels: y, typography: b, colors: x }) => {
|
|
18
|
+
let S = r.annotations.length, C = r.annotations[a] ?? r.primaryAnnotation, w = S > 1, D = C.body?.source?.attachment?.type, O = d == null || D === e.HTML || D === e.XHTML, k = b?.sourceNameClassName ?? "dial-tiny-text", A = b?.titleClassName ?? "dial-body-semi-text", j = b?.quoteClassName ?? "dial-small-text", M = b?.quoteStrongClassName ?? "dial-small-semi-text", N = b?.switcherClassName ?? "dial-tiny-text", P = n({
|
|
14
19
|
"--cc-card-bg": x?.cardBackground,
|
|
15
20
|
"--cc-quote-text": x?.quoteText,
|
|
16
21
|
"--cc-title-text": x?.titleText,
|
|
@@ -21,8 +26,8 @@ var T = {
|
|
|
21
26
|
role: "dialog",
|
|
22
27
|
"aria-modal": "true",
|
|
23
28
|
"aria-label": y.ariaLabel,
|
|
24
|
-
style:
|
|
25
|
-
className: i("flex w-[400px] flex-col gap-3 rounded-lg p-4 shadow-lg", T.
|
|
29
|
+
style: P,
|
|
30
|
+
className: i("flex w-[400px] flex-col gap-3 rounded-lg p-4 shadow-lg", E.card, T.citationCard),
|
|
26
31
|
children: [
|
|
27
32
|
/* @__PURE__ */ v("div", {
|
|
28
33
|
className: "flex items-center justify-between gap-2",
|
|
@@ -30,7 +35,7 @@ var T = {
|
|
|
30
35
|
className: "flex min-w-0 items-center gap-1",
|
|
31
36
|
children: [g, /* @__PURE__ */ _(l, {
|
|
32
37
|
text: r.sourceName,
|
|
33
|
-
className: i(
|
|
38
|
+
className: i(k, "min-w-0", E.sourceName)
|
|
34
39
|
})]
|
|
35
40
|
}), w && /* @__PURE__ */ v("div", {
|
|
36
41
|
className: "flex shrink-0 items-center gap-1",
|
|
@@ -46,7 +51,7 @@ var T = {
|
|
|
46
51
|
onClick: () => o((a - 1 + S) % S)
|
|
47
52
|
}),
|
|
48
53
|
/* @__PURE__ */ _("span", {
|
|
49
|
-
className: i(
|
|
54
|
+
className: i(N, E.switcher),
|
|
50
55
|
children: y.formatSwitcherText(a + 1, S)
|
|
51
56
|
}),
|
|
52
57
|
/* @__PURE__ */ _(u, {
|
|
@@ -65,17 +70,17 @@ var T = {
|
|
|
65
70
|
(C.body?.title || C.body?.quote || w) && /* @__PURE__ */ v("div", {
|
|
66
71
|
className: "flex flex-col gap-3",
|
|
67
72
|
children: [C.body?.title && /* @__PURE__ */ _("p", {
|
|
68
|
-
className: i(
|
|
73
|
+
className: i(A, E.title, "break-words"),
|
|
69
74
|
children: C.body.title
|
|
70
75
|
}), (C.body?.quote || w) && /* @__PURE__ */ _("div", {
|
|
71
|
-
className: i(
|
|
76
|
+
className: i(j, E.quote, "line-clamp-6 break-words", w && "min-h-[3lh]"),
|
|
72
77
|
children: C.body?.quote && /* @__PURE__ */ _(t, {
|
|
73
78
|
content: C.body.quote,
|
|
74
79
|
classNames: {
|
|
75
|
-
p: i(
|
|
76
|
-
ul: i(
|
|
77
|
-
ol: i(
|
|
78
|
-
strong:
|
|
80
|
+
p: i(j, E.quote),
|
|
81
|
+
ul: i(j, "ps-3"),
|
|
82
|
+
ol: i(j, "ps-3"),
|
|
83
|
+
strong: M
|
|
79
84
|
}
|
|
80
85
|
})
|
|
81
86
|
})]
|
|
@@ -87,33 +92,30 @@ var T = {
|
|
|
87
92
|
size: c.Small,
|
|
88
93
|
onClick: () => d(C)
|
|
89
94
|
}), /* @__PURE__ */ _(f, {
|
|
90
|
-
label:
|
|
95
|
+
label: O ? y.openInBrowser : y.download,
|
|
91
96
|
size: c.Small,
|
|
92
97
|
onClick: () => p(C)
|
|
93
98
|
})]
|
|
94
99
|
})
|
|
95
100
|
]
|
|
96
101
|
});
|
|
97
|
-
},
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
});
|
|
111
|
-
}, O = y(null), k = O.Provider, A = () => {
|
|
112
|
-
let e = x(O);
|
|
102
|
+
}, O = ({ annotationCount: e, onOpen: t, icon: n, labels: r, labelClassName: a = "dial-caption-text" }) => /* @__PURE__ */ _(d, {
|
|
103
|
+
size: c.Small,
|
|
104
|
+
className: i("max-w-[240px]", T.citationMarker),
|
|
105
|
+
textClassName: "min-w-0 truncate",
|
|
106
|
+
iconBefore: n,
|
|
107
|
+
label: /* @__PURE__ */ _("span", {
|
|
108
|
+
className: a,
|
|
109
|
+
children: e > 1 ? r.labelWithOverflow : r.label
|
|
110
|
+
}),
|
|
111
|
+
"aria-label": r.ariaLabel,
|
|
112
|
+
onClick: t
|
|
113
|
+
}), k = y(null), A = k.Provider, j = () => {
|
|
114
|
+
let e = x(k);
|
|
113
115
|
if (e == null) throw Error("useCitationCardContext must be used within a CitationCardProvider");
|
|
114
116
|
return e;
|
|
115
|
-
},
|
|
116
|
-
let d =
|
|
117
|
+
}, M = { content: "_content_xzs0h_1" }, N = ({ group: e, onPreview: t, isPreviewable: n, onOpenInBrowser: r, icon: a, headerIcon: o, cardLabels: s, markerLabels: c, cardTypography: l, markerLabelClassName: u }) => {
|
|
118
|
+
let d = j(), f = S(), m = d.isOpen(f), h = d.getActiveIndex(e.groupKey), g = e.annotations[h] ?? e.primaryAnnotation, v = n?.(g) ?? !0, y = b((e) => {
|
|
117
119
|
e || d.closePopup(f);
|
|
118
120
|
}, [d, f]), x = C(() => t && v ? (e) => {
|
|
119
121
|
t(e), d.closePopup(f);
|
|
@@ -127,8 +129,8 @@ var T = {
|
|
|
127
129
|
open: m,
|
|
128
130
|
onOpenChange: y,
|
|
129
131
|
triggerClassName: "ms-1 inline-flex align-middle",
|
|
130
|
-
contentClassName: i("!p-0 !bg-transparent !border-0 !shadow-none !max-w-none !rounded-none",
|
|
131
|
-
tooltip: /* @__PURE__ */ _(
|
|
132
|
+
contentClassName: i("!p-0 !bg-transparent !border-0 !shadow-none !max-w-none !rounded-none", M.content, T.citationDropdown),
|
|
133
|
+
tooltip: /* @__PURE__ */ _(D, {
|
|
132
134
|
group: e,
|
|
133
135
|
activeIndex: h,
|
|
134
136
|
onIndexChange: (t) => d.setActiveIndex(e.groupKey, t),
|
|
@@ -138,7 +140,7 @@ var T = {
|
|
|
138
140
|
labels: s,
|
|
139
141
|
typography: l
|
|
140
142
|
}),
|
|
141
|
-
children: /* @__PURE__ */ _(
|
|
143
|
+
children: /* @__PURE__ */ _(O, {
|
|
142
144
|
sourceName: e.sourceName,
|
|
143
145
|
annotationCount: e.annotations.length,
|
|
144
146
|
onOpen: () => d.openPopup(f),
|
|
@@ -147,7 +149,7 @@ var T = {
|
|
|
147
149
|
labelClassName: u
|
|
148
150
|
})
|
|
149
151
|
});
|
|
150
|
-
},
|
|
152
|
+
}, P = (e) => {
|
|
151
153
|
let t = e.trim();
|
|
152
154
|
if (!t.startsWith("|") || !t.endsWith("|") || /[\r\n]/.test(t)) return;
|
|
153
155
|
let n = [], r = "";
|
|
@@ -160,7 +162,7 @@ var T = {
|
|
|
160
162
|
if (e.type !== "docx_text_anchor" && e.type !== "pptx_text_anchor") return;
|
|
161
163
|
let { text: t, occurrence: n, slide: r } = e;
|
|
162
164
|
if (typeof t != "string" || typeof n != "number" || !Number.isSafeInteger(n) || n < 1) return;
|
|
163
|
-
let i =
|
|
165
|
+
let i = P(t);
|
|
164
166
|
if (i != null) {
|
|
165
167
|
if (e.type === "docx_text_anchor") return {
|
|
166
168
|
type: "docx_text_anchor",
|
|
@@ -199,7 +201,7 @@ var T = {
|
|
|
199
201
|
x2: i + o,
|
|
200
202
|
y2: a + s
|
|
201
203
|
};
|
|
202
|
-
},
|
|
204
|
+
}, F = (e) => {
|
|
203
205
|
if (!r(e)) return;
|
|
204
206
|
let t = e, n;
|
|
205
207
|
if (t.type === "pdf_bbox") {
|
|
@@ -225,7 +227,7 @@ var T = {
|
|
|
225
227
|
x2: n.x2,
|
|
226
228
|
y2: n.y2
|
|
227
229
|
};
|
|
228
|
-
},
|
|
230
|
+
}, I = (e) => typeof e != "object" || !e ? String(e) : Array.isArray(e) ? `[${e.map(I).join(",")}]` : `{${Object.entries(e).filter(([, e]) => e !== void 0).sort(([e], [t]) => e < t ? -1 : +(e > t)).map(([e, t]) => `${e}=${I(t)}`).join(",")}}`, re = (e) => {
|
|
229
231
|
let t = 5381;
|
|
230
232
|
for (let n = 0; n < e.length; n += 1) t = t * 33 + e.charCodeAt(n) | 0;
|
|
231
233
|
return (t >>> 0).toString(36);
|
|
@@ -233,10 +235,10 @@ var T = {
|
|
|
233
235
|
let t = e.body?.selector;
|
|
234
236
|
if (t == null) return;
|
|
235
237
|
let n = (Array.isArray(t) ? t : [t]).flatMap((e) => {
|
|
236
|
-
let t =
|
|
238
|
+
let t = F(e);
|
|
237
239
|
return t == null ? [] : [t];
|
|
238
|
-
}), r =
|
|
239
|
-
if (!(n.length === 0 && r.length === 0)) return
|
|
240
|
+
}), r = U(e);
|
|
241
|
+
if (!(n.length === 0 && r.length === 0)) return I([n, r]);
|
|
240
242
|
}, ae = (e) => {
|
|
241
243
|
let t = e.target?.selector, n = t?.type === "html_tag" ? t.id : void 0, r = typeof n == "string" ? n : void 0, i = ie(e);
|
|
242
244
|
if (!(r == null && i == null)) return re(`${r ?? ""}|${i ?? ""}`);
|
|
@@ -245,42 +247,42 @@ var T = {
|
|
|
245
247
|
if (n == null) return [];
|
|
246
248
|
let i = (Array.isArray(n) ? n : [n]).flatMap((e) => {
|
|
247
249
|
if (!r(e)) return [];
|
|
248
|
-
let t =
|
|
250
|
+
let t = F(e);
|
|
249
251
|
return t == null ? [] : [t];
|
|
250
252
|
});
|
|
251
253
|
return i.length === 0 ? [] : [{
|
|
252
|
-
id:
|
|
254
|
+
id: L(e, t),
|
|
253
255
|
bboxes: i,
|
|
254
256
|
style: te
|
|
255
257
|
}];
|
|
256
|
-
}),
|
|
258
|
+
}), L = (e, t) => e.index == null ? ae(e) ?? String(t) : String(e.index), se = (e) => {
|
|
257
259
|
let t = e.body?.selector;
|
|
258
260
|
if (t == null) return;
|
|
259
261
|
let n = Array.isArray(t) ? t : [t];
|
|
260
262
|
for (let e of n) {
|
|
261
263
|
if (!r(e)) continue;
|
|
262
|
-
let t =
|
|
264
|
+
let t = F(e);
|
|
263
265
|
if (t != null) return t.page;
|
|
264
266
|
}
|
|
265
|
-
},
|
|
267
|
+
}, R = (e) => {
|
|
266
268
|
let t = e.custom_content?.annotations;
|
|
267
269
|
if (t?.length) return t.filter((e) => e != null && e.body?.source?.attachment?.url != null).map(a);
|
|
268
270
|
let n = e.custom_fields;
|
|
269
271
|
if (typeof n != "object" || !n) return [];
|
|
270
272
|
let r = n.annotations;
|
|
271
273
|
return !Array.isArray(r) || r.length === 0 ? [] : o(r, e.custom_content?.attachments ?? []).map(a);
|
|
272
|
-
},
|
|
274
|
+
}, z = (e) => {
|
|
273
275
|
if (e.type !== "docx_text_range") return !1;
|
|
274
276
|
let t = e;
|
|
275
277
|
return typeof t.story == "string" && Array.isArray(t.path) && t.path.every((e) => typeof e == "number") && typeof t.start == "number" && typeof t.end == "number" && typeof t.text == "string";
|
|
276
|
-
},
|
|
278
|
+
}, B = (e) => {
|
|
277
279
|
if (e.type !== "pptx_text_range") return !1;
|
|
278
280
|
let t = e;
|
|
279
281
|
return typeof t.slide == "number" && typeof t.shape_id == "string" && typeof t.start == "number" && typeof t.end == "number" && typeof t.text == "string";
|
|
280
|
-
},
|
|
282
|
+
}, V = (e) => typeof e == "object" && !!e && typeof e.row == "number" && typeof e.col == "number", H = (e) => {
|
|
281
283
|
if (e.type !== "excel_rc_range") return !1;
|
|
282
284
|
let t = e;
|
|
283
|
-
return typeof t.sheet == "string" &&
|
|
285
|
+
return typeof t.sheet == "string" && V(t.start) && (t.end === void 0 || t.end === null || V(t.end));
|
|
284
286
|
}, ce = (e) => {
|
|
285
287
|
let { story: t, path: n, start: r, end: i, text: a } = e;
|
|
286
288
|
if (!(!n.every((e) => Number.isInteger(e)) || !Number.isInteger(r) || !Number.isInteger(i) || r < 0 || i < r)) return {
|
|
@@ -316,26 +318,26 @@ var T = {
|
|
|
316
318
|
end: r
|
|
317
319
|
};
|
|
318
320
|
}
|
|
319
|
-
},
|
|
321
|
+
}, U = (e) => {
|
|
320
322
|
let t = e.body?.selector;
|
|
321
323
|
return t == null ? [] : (Array.isArray(t) ? t : [t]).flatMap((e) => {
|
|
322
324
|
if (!r(e)) return [];
|
|
323
|
-
if (
|
|
325
|
+
if (z(e)) {
|
|
324
326
|
let t = ce(e);
|
|
325
327
|
return t ? [t] : [];
|
|
326
328
|
}
|
|
327
|
-
if (
|
|
329
|
+
if (B(e)) {
|
|
328
330
|
let t = le(e);
|
|
329
331
|
return t ? [t] : [];
|
|
330
332
|
}
|
|
331
|
-
if (
|
|
333
|
+
if (H(e)) {
|
|
332
334
|
let t = ue(e);
|
|
333
335
|
return t ? [t] : [];
|
|
334
336
|
}
|
|
335
337
|
let t = ee(e);
|
|
336
338
|
return t ? [t] : [];
|
|
337
339
|
});
|
|
338
|
-
}, de = (e, t) => C(() => t ? [] :
|
|
340
|
+
}, de = (e, t) => C(() => t ? [] : R(e), [t, e]), fe = {
|
|
339
341
|
openOwnerKey: null,
|
|
340
342
|
activeIndexByGroup: {}
|
|
341
343
|
}, pe = () => {
|
|
@@ -370,7 +372,7 @@ var T = {
|
|
|
370
372
|
i,
|
|
371
373
|
e
|
|
372
374
|
]);
|
|
373
|
-
}, me = /⟦C(\d+)⟧/g,
|
|
375
|
+
}, me = /⟦C(\d+)⟧/g, W = (e, t) => {
|
|
374
376
|
let n = t.map((e, t) => ({
|
|
375
377
|
g: e,
|
|
376
378
|
idx: t
|
|
@@ -383,7 +385,7 @@ var T = {
|
|
|
383
385
|
}).sort((e, t) => t.pos - e.pos), r = e;
|
|
384
386
|
for (let { idx: e, pos: t } of n) r = `${r.slice(0, t)}⟦C${e}⟧${r.slice(t)}`;
|
|
385
387
|
return r;
|
|
386
|
-
}, he = /<cit\s+data-id=(?:"[^"]+"|'[^']+')\s*>\s*<\/cit>/g, ge = /^<cit\s+data-id=(?:"[^"]+"|'[^']+')\s*>\s*<\/cit>$/, _e = /<cit\s+data-id=(?:"[^"]+"|'[^']+')\s*>\s*<\/cit>|<\/?cit\b[^>]*>|<\/?cit\b[^>]*$/gi, ve = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"),
|
|
388
|
+
}, he = /<cit\s+data-id=(?:"[^"]+"|'[^']+')\s*>\s*<\/cit>/g, ge = /^<cit\s+data-id=(?:"[^"]+"|'[^']+')\s*>\s*<\/cit>$/, _e = /<cit\s+data-id=(?:"[^"]+"|'[^']+')\s*>\s*<\/cit>|<\/?cit\b[^>]*>|<\/?cit\b[^>]*$/gi, ve = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), G = (e) => e.replace(_e, (e) => ge.test(e) ? e : ve(e)), K = (e) => G(e).replace(he, ""), q = (e, t) => {
|
|
387
389
|
if (typeof e == "string") {
|
|
388
390
|
let n = e.split(me);
|
|
389
391
|
if (n.length === 1) return e;
|
|
@@ -393,7 +395,7 @@ var T = {
|
|
|
393
395
|
}), r;
|
|
394
396
|
}
|
|
395
397
|
return Array.isArray(e) ? e.flatMap((e) => {
|
|
396
|
-
let n =
|
|
398
|
+
let n = q(e, t);
|
|
397
399
|
return Array.isArray(n) ? n : [n];
|
|
398
400
|
}) : e;
|
|
399
401
|
}, ye = (e) => {
|
|
@@ -404,7 +406,7 @@ var T = {
|
|
|
404
406
|
t,
|
|
405
407
|
"</cit>"
|
|
406
408
|
] }), xe = (e, t, n, r = !1, a = !1) => {
|
|
407
|
-
let { onPreview: o, isPreviewable: s, onOpenInBrowser: c, buildLabels: l } = n, u = C(() => r ?
|
|
409
|
+
let { onPreview: o, isPreviewable: s, onOpenInBrowser: c, buildLabels: l } = n, u = C(() => r ? K(e) : G(t.length > 0 ? W(e, t) : e), [
|
|
408
410
|
e,
|
|
409
411
|
t,
|
|
410
412
|
r
|
|
@@ -419,7 +421,7 @@ var T = {
|
|
|
419
421
|
}
|
|
420
422
|
let n = (e) => {
|
|
421
423
|
let { cardLabels: t, markerLabels: n } = l(e);
|
|
422
|
-
return /* @__PURE__ */ _(
|
|
424
|
+
return /* @__PURE__ */ _(N, {
|
|
423
425
|
group: e,
|
|
424
426
|
onPreview: (t) => o(t, e),
|
|
425
427
|
isPreviewable: s,
|
|
@@ -439,12 +441,12 @@ var T = {
|
|
|
439
441
|
p: ({ children: e, ...t }) => /* @__PURE__ */ _("p", {
|
|
440
442
|
...t,
|
|
441
443
|
className: i(a ? "dial-small-paragraph-text" : "dial-body-paragraph-text", "mb-3 [overflow-wrap:anywhere] [text-wrap:pretty] last:mb-0"),
|
|
442
|
-
children:
|
|
444
|
+
children: q(e, r)
|
|
443
445
|
}),
|
|
444
446
|
li: ({ children: e, ...t }) => /* @__PURE__ */ _("li", {
|
|
445
447
|
...t,
|
|
446
448
|
className: "mb-1.5 last:mb-0",
|
|
447
|
-
children:
|
|
449
|
+
children: q(e, r)
|
|
448
450
|
})
|
|
449
451
|
};
|
|
450
452
|
}, [
|
|
@@ -457,7 +459,7 @@ var T = {
|
|
|
457
459
|
d
|
|
458
460
|
])
|
|
459
461
|
};
|
|
460
|
-
},
|
|
462
|
+
}, J = (e) => {
|
|
461
463
|
try {
|
|
462
464
|
return decodeURIComponent(e);
|
|
463
465
|
} catch {
|
|
@@ -466,14 +468,14 @@ var T = {
|
|
|
466
468
|
}, Se = (e) => {
|
|
467
469
|
try {
|
|
468
470
|
let t = new URL(e);
|
|
469
|
-
return t.pathname.split("/").map((e) =>
|
|
471
|
+
return t.pathname.split("/").map((e) => J(e)).filter(Boolean).at(-1) ?? t.hostname;
|
|
470
472
|
} catch {
|
|
471
|
-
return e.split("/").map((e) =>
|
|
473
|
+
return e.split("/").map((e) => J(e)).filter(Boolean).at(-1) ?? e;
|
|
472
474
|
}
|
|
473
|
-
},
|
|
475
|
+
}, Y = (e, t) => e.body?.source?.attachment?.title ?? Se(t), X = (e) => {
|
|
474
476
|
let t = e.target?.selector;
|
|
475
477
|
return t?.type === "html_tag" ? t : void 0;
|
|
476
|
-
}, Ce = (e) =>
|
|
478
|
+
}, Ce = (e) => X(e) != null, Z = (e) => {
|
|
477
479
|
let t = /* @__PURE__ */ new Map();
|
|
478
480
|
for (let n of e) {
|
|
479
481
|
if (Ce(n)) continue;
|
|
@@ -483,16 +485,16 @@ var T = {
|
|
|
483
485
|
r ? r.annotations.push(n) : t.set(e, {
|
|
484
486
|
groupKey: e,
|
|
485
487
|
sourceUrl: e,
|
|
486
|
-
sourceName:
|
|
488
|
+
sourceName: Y(n, e),
|
|
487
489
|
annotations: [n],
|
|
488
490
|
primaryAnnotation: n
|
|
489
491
|
});
|
|
490
492
|
}
|
|
491
493
|
return Array.from(t.values());
|
|
492
|
-
},
|
|
494
|
+
}, Q = (e) => {
|
|
493
495
|
let t = /* @__PURE__ */ new Map();
|
|
494
496
|
for (let n of e) {
|
|
495
|
-
let e =
|
|
497
|
+
let e = X(n)?.id;
|
|
496
498
|
if (e == null) continue;
|
|
497
499
|
let r = n.body?.source?.attachment?.url;
|
|
498
500
|
if (r == null) continue;
|
|
@@ -500,22 +502,22 @@ var T = {
|
|
|
500
502
|
i ? i.annotations.push(n) : t.set(e, {
|
|
501
503
|
groupKey: `cit:${e}`,
|
|
502
504
|
sourceUrl: r,
|
|
503
|
-
sourceName:
|
|
505
|
+
sourceName: Y(n, r),
|
|
504
506
|
annotations: [n],
|
|
505
507
|
primaryAnnotation: n
|
|
506
508
|
});
|
|
507
509
|
}
|
|
508
510
|
return Array.from(t.values());
|
|
509
|
-
}, we = (e) => [...
|
|
511
|
+
}, we = (e) => [...Q(e), ...Z(e)], Te = (e, t) => {
|
|
510
512
|
let n = e.body?.source?.attachment?.url;
|
|
511
513
|
return n == null || !t.includes(e) ? [e] : t.filter((e) => e.body?.source?.attachment?.url === n);
|
|
512
|
-
},
|
|
513
|
-
let t =
|
|
514
|
+
}, Ee = (e) => e.url == null && e.reference_url != null, De = /^(.*\.pdf)(?:#page=(\d+))?$/i, $ = (e) => {
|
|
515
|
+
let t = De.exec(e);
|
|
514
516
|
return t ? {
|
|
515
517
|
baseUrl: t[1],
|
|
516
518
|
page: t[2] == null ? null : Number(t[2])
|
|
517
519
|
} : null;
|
|
518
|
-
},
|
|
520
|
+
}, Oe = (t) => Z((t ?? []).filter(Ee).map((t) => {
|
|
519
521
|
let n = t.reference_url, r = $(n) != null;
|
|
520
522
|
return { body: {
|
|
521
523
|
quote: t.data,
|
|
@@ -530,4 +532,4 @@ var T = {
|
|
|
530
532
|
} };
|
|
531
533
|
}));
|
|
532
534
|
//#endregion
|
|
533
|
-
export {
|
|
535
|
+
export { D as CitationCard, A as CitationCardProvider, N as CitationDropdown, O as CitationMarker, T as QUOTATIONS_CLASS, L as annotationHighlightId, U as annotationToOfficeHighlightLocations, oe as annotationsToPdfHighlights, Te as gatherSameSourceAnnotations, se as getAnnotationPdfPage, Oe as getReferenceAttachmentGroups, we as groupAnnotations, Q as groupAnnotationsByCitId, Z as groupAnnotationsBySource, W as injectCitationSentinels, z as isDocxRangeSelector, H as isExcelRcRangeSelector, B as isPptxRangeSelector, Ee as isReferenceOnlyAttachment, $ as parsePdfPageReference, q as replaceSentinelsInChildren, R as resolveMessageAnnotations, K as stripCitTagsWhileStreaming, de as useAnnotations, pe as useCitationCard, j as useCitationCardContext, xe as useCitationMarkdownComponents };
|
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.
|
|
4
|
+
"version": "1.2.0-dev.101",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"react": "^19.2.8",
|
|
26
|
-
"@epam/ai-dial-chat-shared": "1.
|
|
27
|
-
"@epam/ai-dial-ui-kit": "^0.
|
|
26
|
+
"@epam/ai-dial-chat-shared": "1.2.0-dev.101",
|
|
27
|
+
"@epam/ai-dial-ui-kit": "^0.15.0-dev.12"
|
|
28
28
|
},
|
|
29
29
|
"repository": {
|
|
30
30
|
"type": "git",
|