@epam/ai-dial-attachment-canvas 1.1.0-dev.99 → 1.2.0-dev.1
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/LazyContentBoundary-CL7J_W9c.js +166 -0
- package/PdfContent-DhfjgYL-.js +260 -0
- package/PdfContent.css +1 -0
- package/attachment-canvas-Bp6WeQws.js +12 -0
- package/bounded-raw-part-cache-BfbSxRIL-DD07NKh9.js +37832 -0
- package/chart-ex-B0DgG3Dt.js +1009 -0
- package/comment-occurrence-CqejEuts-7SeKCBXk.js +6 -0
- package/comment-ui-runtime-DEtgcmj7-B1G7PH4z.js +170 -0
- package/comment-ui-runtime-TLHustXJ-DWCXG2mL.js +2 -0
- package/comment-ui-runtime-lXwVOgjW-Be4RALsI.js +112 -0
- package/comments-CAn2A_Xh-CdgNAj0h.js +282 -0
- package/components/AttachmentCanvas/AttachmentCanvas.d.ts.map +1 -1
- package/components/AttachmentCanvasBody/AttachmentCanvasBody.d.ts +4 -0
- package/components/AttachmentCanvasBody/AttachmentCanvasBody.d.ts.map +1 -0
- package/components/AttachmentCanvasContainer/AttachmentCanvasContainer.d.ts +14 -0
- package/components/AttachmentCanvasContainer/AttachmentCanvasContainer.d.ts.map +1 -1
- package/components/CodeContent/CodeContent.d.ts +11 -0
- package/components/CodeContent/CodeContent.d.ts.map +1 -1
- package/components/HtmlContent/HtmlContent.d.ts +1 -3
- package/components/HtmlContent/HtmlContent.d.ts.map +1 -1
- package/components/LazyContentBoundary/LazyContentBoundary.d.ts +73 -0
- package/components/LazyContentBoundary/LazyContentBoundary.d.ts.map +1 -0
- package/components/McpAppCanvasRenderer/McpAppCanvasRenderer.d.ts +12 -0
- package/components/McpAppCanvasRenderer/McpAppCanvasRenderer.d.ts.map +1 -0
- package/components/OoxmlContent/OoxmlContent.d.ts +22 -0
- package/components/OoxmlContent/OoxmlContent.d.ts.map +1 -0
- package/components/PdfContent/PdfContent.d.ts +50 -1
- package/components/PdfContent/PdfContent.d.ts.map +1 -1
- package/components/VisualizerCanvasRenderer/VisualizerCanvasRenderer.d.ts +12 -0
- package/components/VisualizerCanvasRenderer/VisualizerCanvasRenderer.d.ts.map +1 -1
- package/constants/file.d.ts +6 -0
- package/constants/file.d.ts.map +1 -1
- package/context/AttachmentCanvasContext.d.ts +1 -1
- package/context/AttachmentCanvasContext.d.ts.map +1 -1
- package/delimited-text-worker-host-DcHj_JZt-DWJmaPag.js +25 -0
- package/docx-B9qBTEkj.js +29822 -0
- package/hooks/useMcpAppBridge/useMcpAppBridge.d.ts +23 -0
- package/hooks/useMcpAppBridge/useMcpAppBridge.d.ts.map +1 -0
- package/hooks/useOpenAttachmentCanvas/useOpenAttachmentCanvas.d.ts +64 -0
- package/hooks/useOpenAttachmentCanvas/useOpenAttachmentCanvas.d.ts.map +1 -0
- package/index.css +1 -2
- package/index.d.ts +11 -5
- package/index.d.ts.map +1 -1
- package/index.js +1072 -34844
- package/line-distribute-IsUGfHXm-DeITjLzJ.js +1234 -0
- package/line-metrics-CBbw80Ko-DoOuwYxZ.js +60 -0
- package/models/attachment-canvas.d.ts +272 -10
- package/models/attachment-canvas.d.ts.map +1 -1
- package/ooxml-highlight-surfaces-DhK1KJcR.js +294 -0
- package/package.json +19 -13
- package/pptx-dkJw0-Vx.js +9179 -0
- package/read-only-comment-decoration-BTnWEeo5-BNhbteYc.js +94 -0
- package/read-only-comment-margin-plStyGfE-mggNAMB_.js +189 -0
- package/render-worker-host-BEfLZvSL-COy91Rd8.js +7 -0
- package/render-worker-host-Ba6Fchqr-DZeKpMWD.js +7 -0
- package/render-worker-host-C3xwtHnv-BBGHFdo9.js +7 -0
- package/renderer-module-contract-Cu-GKuPd-Bt0YZuzB.js +10063 -0
- package/types/attachment-canvas.d.ts +19 -0
- package/types/attachment-canvas.d.ts.map +1 -1
- package/utils/content.d.ts +7 -0
- package/utils/content.d.ts.map +1 -1
- package/utils/download.d.ts.map +1 -1
- package/utils/ooxml-highlight-geometry.d.ts +157 -0
- package/utils/ooxml-highlight-geometry.d.ts.map +1 -0
- package/utils/ooxml-highlight-surfaces.d.ts +42 -0
- package/utils/ooxml-highlight-surfaces.d.ts.map +1 -0
- package/utils/visualizer.d.ts +8 -0
- package/utils/visualizer.d.ts.map +1 -0
- package/utils/vite-external-matcher.d.ts +18 -0
- package/utils/vite-external-matcher.d.ts.map +1 -0
- package/visible-index-DPoQYSDt-9lRc-2Ik.js +162 -0
- package/xlsx-BAXMTJTG.js +8585 -0
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { D as e } from "./line-distribute-IsUGfHXm-DeITjLzJ.js";
|
|
2
|
+
import { r as t, s as n } from "./comments-CAn2A_Xh-CdgNAj0h.js";
|
|
3
|
+
import { a as r, i, n as a, o, s, t as c } from "./read-only-comment-margin-plStyGfE-mggNAMB_.js";
|
|
4
|
+
import { i as l, n as u, r as d, t as f } from "./read-only-comment-decoration-BTnWEeo5-BNhbteYc.js";
|
|
5
|
+
//#region ../../node_modules/@silurus/ooxml/dist/comment-ui-runtime-DEtgcmj7.js
|
|
6
|
+
function p(e, r) {
|
|
7
|
+
let i = /* @__PURE__ */ new Set();
|
|
8
|
+
for (let e of r) e.source && i.add(n(e.source));
|
|
9
|
+
if (i.size === 0) return [];
|
|
10
|
+
let a = [];
|
|
11
|
+
for (let o of e) {
|
|
12
|
+
if (!(i.has(n(o.source)) || i.has(n(o.reference.source)) || o.geometryFallback !== void 0 && i.has(n(o.geometryFallback.source)))) continue;
|
|
13
|
+
let e = t(o, r);
|
|
14
|
+
e.length > 0 && a.push({
|
|
15
|
+
anchor: o,
|
|
16
|
+
runs: e
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
return a;
|
|
20
|
+
}
|
|
21
|
+
function m(e, t) {
|
|
22
|
+
let n = new Map(e.map((e) => [e.id, e])), r = e.filter((e) => e.parentId === void 0), i = /* @__PURE__ */ new Map();
|
|
23
|
+
for (let t of e) {
|
|
24
|
+
if (t.parentId === void 0) continue;
|
|
25
|
+
let e = t, r = new Set([e.id]);
|
|
26
|
+
for (; e.parentId !== void 0;) {
|
|
27
|
+
let i = n.get(e.parentId);
|
|
28
|
+
if (!i || r.has(i.id)) {
|
|
29
|
+
e = t;
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
r.add(i.id), e = i;
|
|
33
|
+
}
|
|
34
|
+
if (e.parentId !== void 0 || e === t) continue;
|
|
35
|
+
let a = i.get(e.id) ?? [];
|
|
36
|
+
i.has(e.id) || i.set(e.id, a), a.push(t);
|
|
37
|
+
}
|
|
38
|
+
return r.filter((e) => t || e.resolved !== !0).map((e) => ({
|
|
39
|
+
root: e,
|
|
40
|
+
replies: Object.freeze(i.get(e.id) ?? [])
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
function h(e, t, n) {
|
|
44
|
+
return {
|
|
45
|
+
messageKey: n === 0 ? `${t}:root` : `${t}:reply:${e.id || n - 1}`,
|
|
46
|
+
sourceId: e.id,
|
|
47
|
+
author: e.author,
|
|
48
|
+
date: e.date,
|
|
49
|
+
text: e.paragraphs?.join("\n") ?? e.text,
|
|
50
|
+
status: e.resolved ? "resolved" : "active"
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function g(t, n, r, i, a, o) {
|
|
54
|
+
let s = t.ownerDocument.createElement("div");
|
|
55
|
+
return s.style.cssText = `--ooxml-comment-author-accent:${o};left:${e(n.x, r)};top:${e(n.y, i)};width:${e(n.w, r)};height:${e(n.h, i)};`, s.dataset.ooxmlCommentHighlight = "", s.dataset.active = String(a), n.transform && (s.style.transform = n.transform), t.appendChild(s), s;
|
|
56
|
+
}
|
|
57
|
+
function _(e) {
|
|
58
|
+
let t = e.highlightBounds;
|
|
59
|
+
return {
|
|
60
|
+
...e,
|
|
61
|
+
x: t?.x ?? e.x,
|
|
62
|
+
y: t?.y ?? e.y,
|
|
63
|
+
w: t?.width ?? e.w,
|
|
64
|
+
h: t?.height ?? e.h
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
function v(e) {
|
|
68
|
+
let t = [];
|
|
69
|
+
for (let n of e) {
|
|
70
|
+
let e = t.at(-1);
|
|
71
|
+
if (e && e.y === n.y && e.h === n.h && e.transform === n.transform) {
|
|
72
|
+
let r = Math.min(e.x, n.x), i = Math.max(e.x + e.w, n.x + n.w);
|
|
73
|
+
t[t.length - 1] = {
|
|
74
|
+
...e,
|
|
75
|
+
x: r,
|
|
76
|
+
w: i - r
|
|
77
|
+
};
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
t.push({ ...n });
|
|
81
|
+
}
|
|
82
|
+
return t;
|
|
83
|
+
}
|
|
84
|
+
function y(e, t, n, s, c, u, d, f, y, b, x, S = !1, C, w) {
|
|
85
|
+
r(e.ownerDocument), t && (t.dataset.ooxmlCommentZoom = String(y)), e.innerHTML = "";
|
|
86
|
+
let T = m(s.comments, S), E = new Map(T.map((e) => [e.root.id, o(e.root.author)])), D = new Set(T.map((e) => e.root.id)), O = /* @__PURE__ */ new Map();
|
|
87
|
+
for (let e of s.anchors) D.has(e.commentId) && !O.has(e.commentId) && O.set(e.commentId, e);
|
|
88
|
+
let k = p(s.anchors, n), A = new Set(k.map(({ anchor: e }) => e)), j = /* @__PURE__ */ new Map(), M = /* @__PURE__ */ new Map(), N = e.parentElement;
|
|
89
|
+
for (let { anchor: t, runs: n } of k) {
|
|
90
|
+
if (!D.has(t.commentId)) continue;
|
|
91
|
+
let r = d === t.commentId;
|
|
92
|
+
for (let i of v(n.map(_))) {
|
|
93
|
+
let n = g(e, i, c, u, r, E.get(t.commentId) ?? o(void 0)), a = i.transform && N ? l(n, N) : Object.freeze({
|
|
94
|
+
x: i.x,
|
|
95
|
+
y: i.y,
|
|
96
|
+
width: i.w,
|
|
97
|
+
height: i.h
|
|
98
|
+
}), s = j.get(t.commentId) ?? [];
|
|
99
|
+
j.has(t.commentId) || j.set(t.commentId, s);
|
|
100
|
+
let d = a ?? Object.freeze({
|
|
101
|
+
x: i.x,
|
|
102
|
+
y: i.y,
|
|
103
|
+
width: i.w,
|
|
104
|
+
height: i.h
|
|
105
|
+
});
|
|
106
|
+
s.push(d), M.has(t.commentId) || M.set(t.commentId, Object.freeze({
|
|
107
|
+
rect: d,
|
|
108
|
+
...i.direction ? { direction: i.direction } : {}
|
|
109
|
+
}));
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
let P = T.flatMap((e) => {
|
|
113
|
+
let t = O.get(e.root.id);
|
|
114
|
+
return !t || !A.has(t) ? [] : [{
|
|
115
|
+
occurrenceKey: e.root.id,
|
|
116
|
+
root: h(e.root, e.root.id, 0),
|
|
117
|
+
replies: e.replies.map((t, n) => h(t, e.root.id, n + 1))
|
|
118
|
+
}];
|
|
119
|
+
}), F = t ? a(t, P, {
|
|
120
|
+
activeId: d,
|
|
121
|
+
zoom: y,
|
|
122
|
+
logicalWidth: b,
|
|
123
|
+
onSetActive: f,
|
|
124
|
+
onGeometryChange: C,
|
|
125
|
+
onScrollGeometryChange: w,
|
|
126
|
+
preferredTopById: new Map(P.map((e) => {
|
|
127
|
+
let t = j.get(e.occurrenceKey)?.[0];
|
|
128
|
+
return [e.occurrenceKey, t?.y ?? 0];
|
|
129
|
+
}))
|
|
130
|
+
}) : /* @__PURE__ */ new Map();
|
|
131
|
+
if (x) for (let [t, n] of P.entries()) {
|
|
132
|
+
let r = M.get(n.occurrenceKey);
|
|
133
|
+
if (!r) continue;
|
|
134
|
+
let a = i(e.ownerDocument, {
|
|
135
|
+
occurrenceKey: n.occurrenceKey,
|
|
136
|
+
visibleIndex: t,
|
|
137
|
+
author: n.root.author,
|
|
138
|
+
active: d === n.occurrenceKey,
|
|
139
|
+
zoom: y,
|
|
140
|
+
onSetActive: f
|
|
141
|
+
}), o = 24 * y / 2, s = 4 * y, l = e.ownerDocument.defaultView?.getComputedStyle?.(e).direction, p = (r.direction ?? l) === "rtl" ? r.rect.x - s - o : r.rect.x + r.rect.width + s + o, m = Math.max(o, Math.min(p, c - o)), h = Math.max(o, Math.min(r.rect.y + r.rect.height / 2, u - o));
|
|
142
|
+
a.style.left = `${m / c * 100}%`, a.style.top = `${h / u * 100}%`;
|
|
143
|
+
let g = F.get(n.occurrenceKey);
|
|
144
|
+
g?.id && a.setAttribute("aria-controls", g.id), e.appendChild(a);
|
|
145
|
+
}
|
|
146
|
+
if (!C && !w) return Object.freeze({
|
|
147
|
+
threads: Object.freeze(P.map((e) => Object.freeze({
|
|
148
|
+
occurrenceKey: e.occurrenceKey,
|
|
149
|
+
active: d === e.occurrenceKey,
|
|
150
|
+
anchorRects: Object.freeze(j.get(e.occurrenceKey) ?? [])
|
|
151
|
+
}))),
|
|
152
|
+
scrollTop: t?.scrollTop ?? 0
|
|
153
|
+
});
|
|
154
|
+
let I = t && N ? l(t, N) : void 0, L = Object.freeze(P.map((e) => {
|
|
155
|
+
let t = F.get(e.occurrenceKey), n = t && N ? l(t, N) : void 0;
|
|
156
|
+
return Object.freeze({
|
|
157
|
+
occurrenceKey: e.occurrenceKey,
|
|
158
|
+
active: d === e.occurrenceKey,
|
|
159
|
+
anchorRects: Object.freeze(j.get(e.occurrenceKey) ?? []),
|
|
160
|
+
...n ? { cardRect: n } : {}
|
|
161
|
+
});
|
|
162
|
+
}));
|
|
163
|
+
return Object.freeze({
|
|
164
|
+
threads: L,
|
|
165
|
+
...I ? { cardClipBounds: I } : {},
|
|
166
|
+
scrollTop: t?.scrollTop ?? 0
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
//#endregion
|
|
170
|
+
export { y as buildDocxCommentMargin, u as buildReadOnlyCommentDecoration, f as disposeReadOnlyCommentDecoration, s as disposeReadOnlyCommentMargin, c as previewReadOnlyCommentMargin, d as projectReadOnlyCommentMarginScroll };
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import "./renderer-module-contract-Cu-GKuPd-Bt0YZuzB.js";
|
|
2
|
+
import { D as e } from "./line-distribute-IsUGfHXm-DeITjLzJ.js";
|
|
3
|
+
import { a as t, i as n, n as r, s as i, t as a } from "./read-only-comment-margin-plStyGfE-mggNAMB_.js";
|
|
4
|
+
import { i as o, n as s, r as c, t as l } from "./read-only-comment-decoration-BTnWEeo5-BNhbteYc.js";
|
|
5
|
+
import { t as u } from "./comment-occurrence-CqejEuts-7SeKCBXk.js";
|
|
6
|
+
//#region ../../node_modules/@silurus/ooxml/dist/comment-ui-runtime-lXwVOgjW.js
|
|
7
|
+
function d(e, t, n) {
|
|
8
|
+
return {
|
|
9
|
+
messageKey: `${t}:reply:${e.id ?? n}`,
|
|
10
|
+
sourceId: e.id,
|
|
11
|
+
author: e.author,
|
|
12
|
+
date: e.date,
|
|
13
|
+
text: e.text,
|
|
14
|
+
status: e.status
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
function f(i, a, s, c, l, f, p, m, h, g, _, v, y = !1, b, x) {
|
|
18
|
+
t(i.ownerDocument), a && (a.dataset.ooxmlCommentZoom = String(g)), i.replaceChildren();
|
|
19
|
+
let S = s.map((e, t) => ({
|
|
20
|
+
comment: e,
|
|
21
|
+
index: t,
|
|
22
|
+
id: u(e, t, l)
|
|
23
|
+
})).filter(({ comment: e }) => y || e.status !== "resolved" && e.status !== "closed"), C = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map(), T = new Map(c.map((e) => [e.elementId, e])), E = i.parentElement;
|
|
24
|
+
for (let [t, r] of S.entries()) {
|
|
25
|
+
let { comment: a, id: o } = r, s = (a.anchors ?? []).flatMap((e) => {
|
|
26
|
+
if (e.type !== "drawingElement" && e.type !== "textRange" || !e.elementId) return [];
|
|
27
|
+
let t = T.get(e.elementId);
|
|
28
|
+
return t ? [t] : [];
|
|
29
|
+
});
|
|
30
|
+
if (m === o) for (let t of s) {
|
|
31
|
+
let n = i.ownerDocument.createElement("div");
|
|
32
|
+
n.dataset.ooxmlCommentTarget = o, n.style.cssText = `left:${e(t.bounds.x, f)};top:${e(t.bounds.y, p)};width:${e(t.bounds.width, f)};height:${e(t.bounds.height, p)};border-width:${2 * g}px;transform:rotate(${t.bounds.rotation}deg);`, i.appendChild(n);
|
|
33
|
+
}
|
|
34
|
+
let c = s[0]?.bounds, l = Number.isFinite(a.x) && Number.isFinite(a.y);
|
|
35
|
+
if (!l && !c) continue;
|
|
36
|
+
let u = Math.max(0, Math.min(c ? c.x + (l ? a.x : c.width) : a.x, f)), d = Math.max(0, Math.min(c ? c.y + (l ? a.y : 0) : a.y, p));
|
|
37
|
+
if (C.set(o, Object.freeze({
|
|
38
|
+
x: u / 9525 * g - 24 * g / 2,
|
|
39
|
+
y: d / 9525 * g - 24 * g / 2,
|
|
40
|
+
width: 24 * g,
|
|
41
|
+
height: 24 * g
|
|
42
|
+
})), m === o && s.length === 0 && !v) {
|
|
43
|
+
let t = i.ownerDocument.createElement("div");
|
|
44
|
+
t.dataset.ooxmlCommentTarget = o, t.style.cssText = `left:${e(u, f)};top:${e(d, p)};width:${24 * g}px;height:${24 * g}px;border-width:${2 * g}px;border-radius:50%;transform:translate(-50%,-50%);`, i.appendChild(t);
|
|
45
|
+
}
|
|
46
|
+
if (v) {
|
|
47
|
+
let r = n(i.ownerDocument, {
|
|
48
|
+
occurrenceKey: o,
|
|
49
|
+
visibleIndex: t,
|
|
50
|
+
author: a.author,
|
|
51
|
+
active: m === o,
|
|
52
|
+
zoom: g,
|
|
53
|
+
onSetActive: h
|
|
54
|
+
});
|
|
55
|
+
r.style.left = e(u, f), r.style.top = e(d, p), i.appendChild(r), w.set(o, r);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
let D = S.map(({ comment: e, id: t }) => ({
|
|
59
|
+
occurrenceKey: t,
|
|
60
|
+
root: {
|
|
61
|
+
messageKey: `${t}:root`,
|
|
62
|
+
sourceId: e.id,
|
|
63
|
+
author: e.author,
|
|
64
|
+
date: e.date,
|
|
65
|
+
text: e.text,
|
|
66
|
+
status: e.status
|
|
67
|
+
},
|
|
68
|
+
replies: e.replies?.map((e, n) => d(e, t, n)) ?? []
|
|
69
|
+
})), O = a ? r(a, D, {
|
|
70
|
+
activeId: m,
|
|
71
|
+
zoom: g,
|
|
72
|
+
logicalWidth: _,
|
|
73
|
+
onSetActive: h,
|
|
74
|
+
onGeometryChange: b,
|
|
75
|
+
onScrollGeometryChange: x,
|
|
76
|
+
preferredTopById: new Map(D.map((e) => {
|
|
77
|
+
let t = C.get(e.occurrenceKey);
|
|
78
|
+
return [e.occurrenceKey, t?.y ?? 0];
|
|
79
|
+
}))
|
|
80
|
+
}) : /* @__PURE__ */ new Map();
|
|
81
|
+
for (let e of S) {
|
|
82
|
+
let t = O.get(e.id), n = w.get(e.id);
|
|
83
|
+
t?.id && n && n.setAttribute("aria-controls", t.id);
|
|
84
|
+
}
|
|
85
|
+
if (!b && !x) return Object.freeze({
|
|
86
|
+
threads: Object.freeze(D.map((e) => {
|
|
87
|
+
let t = C.get(e.occurrenceKey);
|
|
88
|
+
return Object.freeze({
|
|
89
|
+
occurrenceKey: e.occurrenceKey,
|
|
90
|
+
active: m === e.occurrenceKey,
|
|
91
|
+
anchorRects: Object.freeze(t ? [t] : [])
|
|
92
|
+
});
|
|
93
|
+
})),
|
|
94
|
+
scrollTop: a?.scrollTop ?? 0
|
|
95
|
+
});
|
|
96
|
+
let k = a && E ? o(a, E) : void 0, A = Object.freeze(D.map((e) => {
|
|
97
|
+
let t = O.get(e.occurrenceKey), n = t && E ? o(t, E) : void 0, r = C.get(e.occurrenceKey);
|
|
98
|
+
return Object.freeze({
|
|
99
|
+
occurrenceKey: e.occurrenceKey,
|
|
100
|
+
active: m === e.occurrenceKey,
|
|
101
|
+
anchorRects: Object.freeze(r ? [r] : []),
|
|
102
|
+
...n ? { cardRect: n } : {}
|
|
103
|
+
});
|
|
104
|
+
}));
|
|
105
|
+
return Object.freeze({
|
|
106
|
+
threads: A,
|
|
107
|
+
...k ? { cardClipBounds: k } : {},
|
|
108
|
+
scrollTop: a?.scrollTop ?? 0
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
//#endregion
|
|
112
|
+
export { f as buildPptxCommentMargin, s as buildReadOnlyCommentDecoration, l as disposeReadOnlyCommentDecoration, i as disposeReadOnlyCommentMargin, a as previewReadOnlyCommentMargin, c as projectReadOnlyCommentMarginScroll };
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
//#region ../../node_modules/@silurus/ooxml/dist/source-key-Ktb1GRE5.js
|
|
2
|
+
function e(t, n = "$") {
|
|
3
|
+
if (t === null || typeof t == "boolean" || typeof t == "number" || typeof t == "string") return JSON.stringify(t);
|
|
4
|
+
if (Array.isArray(t)) return `[${t.map((t, r) => e(t, `${n}[${r}]`)).join(",")}]`;
|
|
5
|
+
if (typeof t == "object") {
|
|
6
|
+
let r = t;
|
|
7
|
+
return `{${Object.keys(r).sort().map((t) => `${JSON.stringify(t)}:${e(r[t], `${n}.${t}`)}`).join(",")}}`;
|
|
8
|
+
}
|
|
9
|
+
throw TypeError(`Cannot fingerprint ${typeof t} at ${n}`);
|
|
10
|
+
}
|
|
11
|
+
function t(t, n) {
|
|
12
|
+
let r = e(n);
|
|
13
|
+
return `${t}:${encodeURIComponent(r)}`;
|
|
14
|
+
}
|
|
15
|
+
function n(e) {
|
|
16
|
+
return `${e.story}:${encodeURIComponent(e.storyInstance)}:${e.path.join(".")}`;
|
|
17
|
+
}
|
|
18
|
+
function r(e, t, r) {
|
|
19
|
+
if (t.length === 0 || r.length === 0) throw RangeError("Body occurrence identity requires a flow domain and fragment start");
|
|
20
|
+
return [
|
|
21
|
+
"body-occurrence",
|
|
22
|
+
encodeURIComponent(n(e)),
|
|
23
|
+
encodeURIComponent(t),
|
|
24
|
+
encodeURIComponent(r)
|
|
25
|
+
].join("/");
|
|
26
|
+
}
|
|
27
|
+
function i(e, t) {
|
|
28
|
+
return `image:${n(e)}:${encodeURIComponent(t)}`;
|
|
29
|
+
}
|
|
30
|
+
function a(e, t) {
|
|
31
|
+
return `math:${n(e)}:${encodeURIComponent(t)}`;
|
|
32
|
+
}
|
|
33
|
+
function o(e) {
|
|
34
|
+
return t("chart-resource", e);
|
|
35
|
+
}
|
|
36
|
+
function s(e, t) {
|
|
37
|
+
return `anchor:${n(e)}:${encodeURIComponent(t)}`;
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region ../../node_modules/@silurus/ooxml/dist/comments-CAn2A_Xh.js
|
|
41
|
+
function c(e) {
|
|
42
|
+
if (e === void 0) return;
|
|
43
|
+
let t = e.replace(/^[\t\n\r ]+|[\t\n\r ]+$/g, "");
|
|
44
|
+
if (/^[+-]?\d+$/.test(t)) try {
|
|
45
|
+
return BigInt(t).toString();
|
|
46
|
+
} catch {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function l(e) {
|
|
51
|
+
return Object.freeze({
|
|
52
|
+
...e,
|
|
53
|
+
path: Object.freeze([...e.path])
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
function u(e) {
|
|
57
|
+
return Object.freeze({
|
|
58
|
+
source: l(e.source),
|
|
59
|
+
runIndex: e.boundary,
|
|
60
|
+
affinity: e.boundary < e.runCount ? "following" : "preceding"
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
function d(e, t) {
|
|
64
|
+
let n = e.runs, r = 0;
|
|
65
|
+
for (let e = 0; e < Math.min(t, n.length); e += 1) n[e]?.type !== "unavailableDrawing" && (r += 1);
|
|
66
|
+
return r;
|
|
67
|
+
}
|
|
68
|
+
function f(e, t, n, r, i = t.boundary) {
|
|
69
|
+
return Object.freeze({
|
|
70
|
+
commentId: e,
|
|
71
|
+
source: l(t.source),
|
|
72
|
+
startRunIndex: t.boundary,
|
|
73
|
+
endRunIndex: i,
|
|
74
|
+
reference: u(n),
|
|
75
|
+
...r === void 0 ? {} : { geometryFallback: Object.freeze({
|
|
76
|
+
source: l(r.source),
|
|
77
|
+
sourceRunIndex: r.boundary
|
|
78
|
+
}) }
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
function p(e, t) {
|
|
82
|
+
let r = e.flatMap(({ paragraph: e, source: r }, i) => {
|
|
83
|
+
let a = d(e, e.runs.length);
|
|
84
|
+
return [...t.get(n(r)) ?? []].sort((e, t) => e - t).map((e) => ({
|
|
85
|
+
paragraphIndex: i,
|
|
86
|
+
source: r,
|
|
87
|
+
boundary: e,
|
|
88
|
+
runCount: a
|
|
89
|
+
}));
|
|
90
|
+
});
|
|
91
|
+
return {
|
|
92
|
+
locations: r,
|
|
93
|
+
paragraphIndices: new Set(r.map(({ paragraphIndex: e }) => e))
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
function m(e, t) {
|
|
97
|
+
return e.paragraphIndex - t.paragraphIndex || e.boundary - t.boundary;
|
|
98
|
+
}
|
|
99
|
+
function h(e, t) {
|
|
100
|
+
let n = 0, r = e.length;
|
|
101
|
+
for (; n < r;) {
|
|
102
|
+
let i = n + Math.floor((r - n) / 2);
|
|
103
|
+
m(e[i], t) < 0 ? n = i + 1 : r = i;
|
|
104
|
+
}
|
|
105
|
+
return n;
|
|
106
|
+
}
|
|
107
|
+
function g(e, t) {
|
|
108
|
+
if (t.paragraphIndices.has(e.paragraphIndex)) return;
|
|
109
|
+
let n = h(t.locations, e), r = t.locations[n], i = n > 0 ? t.locations[n - 1] : void 0;
|
|
110
|
+
return u(e).affinity === "following" ? r ?? i : i ?? r;
|
|
111
|
+
}
|
|
112
|
+
function _(e, t, n) {
|
|
113
|
+
let r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set();
|
|
114
|
+
for (let e of t) {
|
|
115
|
+
let t = c(e);
|
|
116
|
+
t === void 0 || i.has(t) || (r.has(t) ? (r.delete(t), i.add(t)) : r.set(t, e));
|
|
117
|
+
}
|
|
118
|
+
let a = /* @__PURE__ */ new Map();
|
|
119
|
+
for (let [t, { paragraph: n, source: r }] of e.entries()) for (let e of n.commentMarks ?? []) {
|
|
120
|
+
let i = c(e.id);
|
|
121
|
+
if (i === void 0) continue;
|
|
122
|
+
let o = a.get(i) ?? {
|
|
123
|
+
starts: [],
|
|
124
|
+
ends: [],
|
|
125
|
+
references: []
|
|
126
|
+
};
|
|
127
|
+
a.set(i, o);
|
|
128
|
+
let s = {
|
|
129
|
+
paragraphIndex: t,
|
|
130
|
+
source: r,
|
|
131
|
+
boundary: d(n, e.runIndex),
|
|
132
|
+
runCount: d(n, n.runs.length)
|
|
133
|
+
};
|
|
134
|
+
e.kind === "rangeStart" ? o.starts.push(s) : e.kind === "rangeEnd" ? o.ends.push(s) : e.kind === "reference" && o.references.push(s);
|
|
135
|
+
}
|
|
136
|
+
let o = [], s = p(e, n);
|
|
137
|
+
for (let [t, n] of a) {
|
|
138
|
+
let i = r.get(t);
|
|
139
|
+
if (i === void 0 || n.references.length !== 1) continue;
|
|
140
|
+
let a = n.references[0];
|
|
141
|
+
if (n.starts.length > 1 || n.ends.length > 1) continue;
|
|
142
|
+
let c = n.starts.length === 1 ? n.starts[0] : void 0, l = n.ends.length === 1 ? n.ends[0] : void 0;
|
|
143
|
+
if (c && l && (c.paragraphIndex < l.paragraphIndex || c.paragraphIndex === l.paragraphIndex && c.boundary <= l.boundary)) {
|
|
144
|
+
let t = g(c.paragraphIndex === l.paragraphIndex && c.boundary === l.boundary ? c : a, s);
|
|
145
|
+
for (let n = c.paragraphIndex; n <= l.paragraphIndex; n += 1) {
|
|
146
|
+
let r = e[n], s = n === c.paragraphIndex ? c.boundary : 0, u = n === l.paragraphIndex ? l.boundary : d(r.paragraph, r.paragraph.runs.length);
|
|
147
|
+
o.push(f(i, {
|
|
148
|
+
paragraphIndex: n,
|
|
149
|
+
source: r.source,
|
|
150
|
+
boundary: s,
|
|
151
|
+
runCount: d(r.paragraph, r.paragraph.runs.length)
|
|
152
|
+
}, a, t, Math.max(s, u)));
|
|
153
|
+
}
|
|
154
|
+
continue;
|
|
155
|
+
}
|
|
156
|
+
let u = c && n.ends.length === 0 ? c : l && n.starts.length === 0 ? l : void 0;
|
|
157
|
+
if (c && l) continue;
|
|
158
|
+
let p = u ?? a, m = g(p, s);
|
|
159
|
+
o.push(f(i, p, a, m));
|
|
160
|
+
}
|
|
161
|
+
return o;
|
|
162
|
+
}
|
|
163
|
+
function v(e, t, n = /* @__PURE__ */ new Map()) {
|
|
164
|
+
let r = new Set(e.map(({ id: e }) => e)), i = /* @__PURE__ */ new Map();
|
|
165
|
+
for (let e of t.blocks.sources) {
|
|
166
|
+
let n = t.blocks.resolve(e);
|
|
167
|
+
if (n.type !== "paragraph") continue;
|
|
168
|
+
let r = `${e.story}\u0000${e.storyInstance}`, a = i.get(r) ?? [];
|
|
169
|
+
i.has(r) || i.set(r, a), a.push({
|
|
170
|
+
paragraph: n,
|
|
171
|
+
source: e
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
return [...i.values()].flatMap((e) => _(e, r, n));
|
|
175
|
+
}
|
|
176
|
+
function y(e, t, r = /* @__PURE__ */ new Map(), i = {}) {
|
|
177
|
+
if ((e?.length ?? 0) === 0) return [];
|
|
178
|
+
let a = v(e ?? [], t, r), o = i.completedSourceKeys;
|
|
179
|
+
return o === void 0 ? a : a.filter((e) => {
|
|
180
|
+
let t = r.get(n(e.source)) ?? /* @__PURE__ */ new Set(), i = e.startRunIndex < e.endRunIndex ? [...t].some((t) => t >= e.startRunIndex && t < e.endRunIndex) : t.has(e.reference.affinity === "following" ? e.startRunIndex : e.startRunIndex - 1), a = r.get(n(e.reference.source))?.has(e.reference.affinity === "following" ? e.reference.runIndex : e.reference.runIndex - 1) === !0;
|
|
181
|
+
return i || a || o.has(n(e.source)) || o.has(n(e.reference.source));
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
function b(e, t) {
|
|
185
|
+
return e !== void 0 && e.story === t.story && e.storyInstance === t.storyInstance && e.path.length === t.path.length && e.path.every((e, n) => e === t.path[n]);
|
|
186
|
+
}
|
|
187
|
+
function x(e, t) {
|
|
188
|
+
let n = t.filter((t) => t.sourceRunIndex !== void 0 && b(t.source, e.source)), r = n.filter((t) => t.sourceRunIndex >= e.startRunIndex && t.sourceRunIndex < e.endRunIndex);
|
|
189
|
+
if (r.length > 0) return r;
|
|
190
|
+
if (e.startRunIndex === e.endRunIndex && n.length > 0) {
|
|
191
|
+
let t = n.reduce((t, n) => {
|
|
192
|
+
let r = n.sourceRunIndex;
|
|
193
|
+
return r < e.startRunIndex ? t : t === void 0 || r < t ? r : t;
|
|
194
|
+
}, void 0), r = n.reduce((t, n) => {
|
|
195
|
+
let r = n.sourceRunIndex;
|
|
196
|
+
return r >= e.startRunIndex ? t : t === void 0 || r > t ? r : t;
|
|
197
|
+
}, void 0), i = t ?? r;
|
|
198
|
+
if (i !== void 0) return n.filter((e) => e.sourceRunIndex === i);
|
|
199
|
+
}
|
|
200
|
+
let i = t.filter((t) => t.sourceRunIndex !== void 0 && b(t.source, e.reference.source)), a = i.reduce((t, n) => {
|
|
201
|
+
let r = n.sourceRunIndex;
|
|
202
|
+
return r < e.reference.runIndex ? t : t === void 0 || r < t ? r : t;
|
|
203
|
+
}, void 0), o = i.reduce((t, n) => {
|
|
204
|
+
let r = n.sourceRunIndex;
|
|
205
|
+
return r >= e.reference.runIndex ? t : t === void 0 || r > t ? r : t;
|
|
206
|
+
}, void 0), s = e.reference.affinity === "following" ? a ?? o : o ?? a;
|
|
207
|
+
if (s !== void 0) return i.filter((e) => e.sourceRunIndex === s);
|
|
208
|
+
let c = e.geometryFallback;
|
|
209
|
+
return c === void 0 ? [] : t.filter((e) => e.sourceRunIndex === c.sourceRunIndex && b(e.source, c.source));
|
|
210
|
+
}
|
|
211
|
+
function S(e, t) {
|
|
212
|
+
return t.some((t) => t.sourceRunIndex !== void 0 && b(t.source, e.source) && t.sourceRunIndex >= e.startRunIndex && t.sourceRunIndex < e.endRunIndex) ? "range" : t.some((t) => b(t.source, e.source) || b(t.source, e.reference.source)) ? "point" : "fallback";
|
|
213
|
+
}
|
|
214
|
+
function C(e) {
|
|
215
|
+
let t = e.map((e) => {
|
|
216
|
+
let t = e.highlightBounds;
|
|
217
|
+
return {
|
|
218
|
+
x: t?.x ?? e.x,
|
|
219
|
+
y: t?.y ?? e.y,
|
|
220
|
+
width: t?.width ?? e.w,
|
|
221
|
+
height: t?.height ?? e.h,
|
|
222
|
+
...e.transform ? { transform: e.transform } : {}
|
|
223
|
+
};
|
|
224
|
+
}).filter(({ width: e, height: t }) => e > 0 && t > 0).sort((e, t) => e.y - t.y || e.x - t.x), n = [];
|
|
225
|
+
for (let e of t) {
|
|
226
|
+
let t = n.at(-1);
|
|
227
|
+
if (t && t.y === e.y && t.height === e.height && t.transform === e.transform) {
|
|
228
|
+
let r = Math.min(t.x, e.x), i = Math.max(t.x + t.width, e.x + e.width);
|
|
229
|
+
n[n.length - 1] = Object.freeze({
|
|
230
|
+
...t,
|
|
231
|
+
x: r,
|
|
232
|
+
width: i - r
|
|
233
|
+
});
|
|
234
|
+
} else n.push(Object.freeze({ ...e }));
|
|
235
|
+
}
|
|
236
|
+
return Object.freeze(n);
|
|
237
|
+
}
|
|
238
|
+
function w(e, t, r, i = {}) {
|
|
239
|
+
let a = new Map(e.map((e) => [e.id, e])), o = e.filter((e) => e.parentId === void 0), s = new Map(o.map((e) => [e.id, e])), c = /* @__PURE__ */ new Map(), l = new Map(o.map((e) => [e.id, e.id]));
|
|
240
|
+
for (let t of e) {
|
|
241
|
+
if (t.parentId === void 0) continue;
|
|
242
|
+
let e = new Set([t.id]), n = t;
|
|
243
|
+
for (; n.parentId !== void 0;) {
|
|
244
|
+
let r = a.get(n.parentId);
|
|
245
|
+
if (!r || e.has(r.id)) {
|
|
246
|
+
n = t;
|
|
247
|
+
break;
|
|
248
|
+
}
|
|
249
|
+
e.add(r.id), n = r;
|
|
250
|
+
}
|
|
251
|
+
if (!s.has(n.id) || n === t) continue;
|
|
252
|
+
l.set(t.id, n.id);
|
|
253
|
+
let r = c.get(n.id) ?? [];
|
|
254
|
+
c.has(n.id) || c.set(n.id, r), r.push(t);
|
|
255
|
+
}
|
|
256
|
+
let u = /* @__PURE__ */ new Set();
|
|
257
|
+
for (let e of r) e.source && u.add(n(e.source));
|
|
258
|
+
let d = /* @__PURE__ */ new Map();
|
|
259
|
+
for (let e of t) {
|
|
260
|
+
let t = l.get(e.commentId);
|
|
261
|
+
if (t === void 0 || !(u.has(n(e.source)) || u.has(n(e.reference.source)) || e.geometryFallback !== void 0 && u.has(n(e.geometryFallback.source)))) continue;
|
|
262
|
+
let i = x(e, r);
|
|
263
|
+
if (i.length === 0) continue;
|
|
264
|
+
let a = d.get(t) ?? [];
|
|
265
|
+
d.has(t) || d.set(t, a), a.push(Object.freeze({
|
|
266
|
+
anchor: e,
|
|
267
|
+
kind: S(e, i),
|
|
268
|
+
rects: C(i)
|
|
269
|
+
}));
|
|
270
|
+
}
|
|
271
|
+
return Object.freeze(o.flatMap((e) => {
|
|
272
|
+
if (i.includeResolved === !1 && e.resolved === !0) return [];
|
|
273
|
+
let t = d.get(e.id);
|
|
274
|
+
return t?.length ? [Object.freeze({
|
|
275
|
+
root: e,
|
|
276
|
+
replies: Object.freeze([...c.get(e.id) ?? []]),
|
|
277
|
+
anchors: Object.freeze([...t])
|
|
278
|
+
})] : [];
|
|
279
|
+
}));
|
|
280
|
+
}
|
|
281
|
+
//#endregion
|
|
282
|
+
export { a, o as c, t as d, c as i, r as l, y as n, i as o, x as r, n as s, w as t, s as u };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentCanvas.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentCanvas/AttachmentCanvas.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AttachmentCanvas.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentCanvas/AttachmentCanvas.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAkX5E,wGAAwG;AACxG,eAAO,MAAM,gBAAgB,6DAA6B,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AttachmentCanvasBodyProps } from '../../models/attachment-canvas';
|
|
2
|
+
/** Content-only renderer for attachment previews (text, image, audio, PDF, markdown, JSON, code, HTML, visualizer). Shared by the sidebar `AttachmentCanvas` and any host that mounts the preview inline elsewhere. */
|
|
3
|
+
export declare const AttachmentCanvasBody: import('react').NamedExoticComponent<AttachmentCanvasBodyProps>;
|
|
4
|
+
//# sourceMappingURL=AttachmentCanvasBody.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttachmentCanvasBody.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentCanvasBody/AttachmentCanvasBody.tsx"],"names":[],"mappings":"AAkBA,OAAO,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAyfhF,uNAAuN;AACvN,eAAO,MAAM,oBAAoB,iEAAiC,CAAC"}
|
|
@@ -13,6 +13,20 @@ export interface AttachmentCanvasContainerProps {
|
|
|
13
13
|
maxWidth?: number;
|
|
14
14
|
/** Syntax highlight color theme forwarded to MarkdownRenderer code blocks. */
|
|
15
15
|
codeBlockTheme?: CodeBlockTheme;
|
|
16
|
+
/** Filename used when downloading a `MarkdownTable`'s content as CSV. Defaults to `'table.csv'`. */
|
|
17
|
+
tableDownloadFilename?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Configures `pdfjs-dist`'s worker (`GlobalWorkerOptions.workerSrc`) for the
|
|
20
|
+
* host app. Called once, the first time a PDF attachment is opened, and
|
|
21
|
+
* awaited before the viewer mounts. Concurrent PDF opens share one
|
|
22
|
+
* in-flight call; a successful call is memoized so later opens never
|
|
23
|
+
* repeat it. A rejected call is not cached — the next PDF open (or a
|
|
24
|
+
* subsequent retry) invokes it again. When omitted,
|
|
25
|
+
* `@epam/pdf-highlighter-kit`'s own CDN-hosted worker fallback is used
|
|
26
|
+
* instead, so PDF rendering still works, just without the host's own
|
|
27
|
+
* bundled worker asset.
|
|
28
|
+
*/
|
|
29
|
+
configurePdfWorker?: () => void | Promise<void>;
|
|
16
30
|
}
|
|
17
31
|
/** Context-connected container that renders `AttachmentCanvas` with download support. */
|
|
18
32
|
export declare const AttachmentCanvasContainer: FC<AttachmentCanvasContainerProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentCanvasContainer.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentCanvasContainer/AttachmentCanvasContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAqB,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EACV,sBAAsB,EAKvB,MAAM,gCAAgC,CAAC;AAKxC,yDAAyD;AACzD,MAAM,WAAW,8BAA8B;IAC7C,8DAA8D;IAC9D,MAAM,CAAC,EAAE,sBAAsB,CAAC;IAChC,mGAAmG;IACnG,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sFAAsF;IACtF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uGAAuG;IACvG,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,cAAc,CAAC,EAAE,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"AttachmentCanvasContainer.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentCanvasContainer/AttachmentCanvasContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAqB,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EACV,sBAAsB,EAKvB,MAAM,gCAAgC,CAAC;AAKxC,yDAAyD;AACzD,MAAM,WAAW,8BAA8B;IAC7C,8DAA8D;IAC9D,MAAM,CAAC,EAAE,sBAAsB,CAAC;IAChC,mGAAmG;IACnG,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sFAAsF;IACtF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uGAAuG;IACvG,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,oGAAoG;IACpG,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;;;;;;;;;OAUG;IACH,kBAAkB,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACjD;AAED,yFAAyF;AACzF,eAAO,MAAM,yBAAyB,EAAE,EAAE,CAAC,8BAA8B,CAkJtE,CAAC"}
|
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
import { CodeBlockTheme } from '@epam/ai-dial-chat-shared';
|
|
2
2
|
import { FC } from 'react';
|
|
3
3
|
import { CodeCanvasContent } from '../../models/attachment-canvas';
|
|
4
|
+
/** User-visible strings for {@link CodeContent}'s syntax-highlighter loading/error states. */
|
|
5
|
+
export interface CodeContentLabels {
|
|
6
|
+
/** Accessible status text announced while the highlighter engine loads. Defaults to `'Loading…'`. */
|
|
7
|
+
loadingLabel?: string;
|
|
8
|
+
/** Message shown when the highlighter engine fails to load. Defaults to `'Failed to load content'`. */
|
|
9
|
+
errorLabel?: string;
|
|
10
|
+
/** Label and accessible name for the retry control. Defaults to `'Retry'`. */
|
|
11
|
+
retryLabel?: string;
|
|
12
|
+
}
|
|
4
13
|
/** Props for {@link CodeContent}. */
|
|
5
14
|
export interface CodeContentProps {
|
|
6
15
|
/** The code/text content to render. */
|
|
7
16
|
content: CodeCanvasContent;
|
|
8
17
|
/** Syntax-highlight color theme. Defaults to `CodeBlockTheme.Light`. */
|
|
9
18
|
codeBlockTheme?: CodeBlockTheme;
|
|
19
|
+
/** User-visible strings for the syntax-highlighter loading/error states. All fields have English defaults. */
|
|
20
|
+
labels?: CodeContentLabels;
|
|
10
21
|
}
|
|
11
22
|
/** Renders syntax-highlighted source code or plain text for a `CodeCanvasContent` payload. */
|
|
12
23
|
export declare const CodeContent: FC<CodeContentProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeContent.d.ts","sourceRoot":"","sources":["../../../src/components/CodeContent/CodeContent.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,
|
|
1
|
+
{"version":3,"file":"CodeContent.d.ts","sourceRoot":"","sources":["../../../src/components/CodeContent/CodeContent.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EAGf,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAA8C,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAyBxE,8FAA8F;AAC9F,MAAM,WAAW,iBAAiB;IAChC,qGAAqG;IACrG,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uGAAuG;IACvG,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8EAA8E;IAC9E,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,qCAAqC;AACrC,MAAM,WAAW,gBAAgB;IAC/B,uCAAuC;IACvC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,wEAAwE;IACxE,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,8GAA8G;IAC9G,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B;AAED,8FAA8F;AAC9F,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CA2D5C,CAAC"}
|
|
@@ -13,10 +13,8 @@ export interface HtmlContentProps {
|
|
|
13
13
|
title?: string;
|
|
14
14
|
/** Syntax-highlight color theme forwarded to the source-view `CodeContent`. When omitted, `CodeContent` falls back to `CodeBlockTheme.Light`. */
|
|
15
15
|
codeBlockTheme?: CodeBlockTheme;
|
|
16
|
-
/** Typography class applied to the "Open in new tab"
|
|
16
|
+
/** Typography class applied to the "Open in new tab" link in the blocked-state panel. Defaults to `'dial-body-semi-text'`. */
|
|
17
17
|
openInNewTabButtonTypographyClassName?: string;
|
|
18
|
-
/** Color class applied to the "Open in new tab" button in the blocked-state panel. Defaults to `'text-accent'`. */
|
|
19
|
-
openInNewTabButtonColorClassName?: string;
|
|
20
18
|
}
|
|
21
19
|
/** Renders HTML content inside a sandboxed iframe, or as highlighted source when `isSourceView` is true. */
|
|
22
20
|
export declare const HtmlContent: FC<HtmlContentProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HtmlContent.d.ts","sourceRoot":"","sources":["../../../src/components/HtmlContent/HtmlContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAGhE,OAAO,EACL,KAAK,EAAE,EAOR,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EACV,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"HtmlContent.d.ts","sourceRoot":"","sources":["../../../src/components/HtmlContent/HtmlContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAGhE,OAAO,EACL,KAAK,EAAE,EAOR,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EACV,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,gCAAgC,CAAC;AAKxC,qCAAqC;AACrC,MAAM,WAAW,gBAAgB;IAC/B,kCAAkC;IAClC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,0CAA0C;IAC1C,MAAM,EAAE,IAAI,CACV,sBAAsB,EACtB,uBAAuB,GAAG,uBAAuB,CAClD,CAAC;IACF,wFAAwF;IACxF,YAAY,EAAE,OAAO,CAAC;IACtB,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iJAAiJ;IACjJ,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,8HAA8H;IAC9H,qCAAqC,CAAC,EAAE,MAAM,CAAC;CAChD;AAED,4GAA4G;AAC5G,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CA6G5C,CAAC"}
|