@epam/ai-dial-attachment-canvas 1.1.0-dev.413 → 1.1.0-dev.420
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-DkAcpR4S.js → LazyContentBoundary-9fvYBGuL.js} +5 -2
- package/PdfContent-BexpRNO0.js +239 -0
- package/components/AttachmentCanvas/AttachmentCanvas.d.ts.map +1 -1
- package/components/AttachmentCanvasBody/AttachmentCanvasBody.d.ts.map +1 -1
- package/components/AttachmentCanvasContainer/AttachmentCanvasContainer.d.ts +2 -0
- package/components/AttachmentCanvasContainer/AttachmentCanvasContainer.d.ts.map +1 -1
- package/components/PdfContent/PdfContent.d.ts +7 -0
- package/components/PdfContent/PdfContent.d.ts.map +1 -1
- package/index.js +451 -406
- package/models/attachment-canvas.d.ts +25 -2
- package/models/attachment-canvas.d.ts.map +1 -1
- package/package.json +3 -3
- package/types/attachment-canvas.d.ts +1 -0
- package/types/attachment-canvas.d.ts.map +1 -1
- package/utils/download.d.ts.map +1 -1
- package/PdfContent-BBUc0_SC.js +0 -226
|
@@ -4,7 +4,7 @@ import { Component as s, Suspense as c } from "react";
|
|
|
4
4
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
5
5
|
//#region src/types/attachment-canvas.ts
|
|
6
6
|
var d = /* @__PURE__ */ function(e) {
|
|
7
|
-
return e.PlainText = "plain_text", e.Image = "image", e.Audio = "audio", e.Markdown = "markdown", e.Json = "json", e.Pdf = "pdf", e.Ooxml = "ooxml", e.Code = "code", e.Html = "html", e.Visualizer = "visualizer", e.McpApp = "mcp_app", e.Unsupported = "unsupported", e.Error = "error", e;
|
|
7
|
+
return e.PlainText = "plain_text", e.Image = "image", e.Audio = "audio", e.Markdown = "markdown", e.MarkdownTable = "markdown_table", e.Json = "json", e.Pdf = "pdf", e.Ooxml = "ooxml", e.Code = "code", e.Html = "html", e.Visualizer = "visualizer", e.McpApp = "mcp_app", e.Unsupported = "unsupported", e.Error = "error", e;
|
|
8
8
|
}({}), f = /* @__PURE__ */ function(e) {
|
|
9
9
|
return e.Docx = "docx", e.Xlsx = "xlsx", e.Pptx = "pptx", e.Csv = "csv", e;
|
|
10
10
|
}({}), p = /* @__PURE__ */ function(e) {
|
|
@@ -25,6 +25,7 @@ var d = /* @__PURE__ */ function(e) {
|
|
|
25
25
|
case d.Ooxml:
|
|
26
26
|
case d.Code: return !0;
|
|
27
27
|
case d.Html: return e.url != null;
|
|
28
|
+
case d.MarkdownTable:
|
|
28
29
|
case d.Visualizer:
|
|
29
30
|
case d.McpApp: return !1;
|
|
30
31
|
case d.Unsupported: return e.url != null;
|
|
@@ -66,7 +67,8 @@ var d = /* @__PURE__ */ function(e) {
|
|
|
66
67
|
url: void 0,
|
|
67
68
|
mimeType: e.Plain
|
|
68
69
|
};
|
|
69
|
-
case d.Markdown:
|
|
70
|
+
case d.Markdown:
|
|
71
|
+
case d.MarkdownTable: return {
|
|
70
72
|
url: void 0,
|
|
71
73
|
mimeType: e.Markdown
|
|
72
74
|
};
|
|
@@ -107,6 +109,7 @@ var d = /* @__PURE__ */ function(e) {
|
|
|
107
109
|
if (n.url == null) return;
|
|
108
110
|
r(n.url, c);
|
|
109
111
|
return;
|
|
112
|
+
case d.MarkdownTable:
|
|
110
113
|
case d.Visualizer:
|
|
111
114
|
case d.McpApp: return;
|
|
112
115
|
case d.Unsupported:
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import "./PdfContent.css";
|
|
2
|
+
import { a as e, n as t, r as n } from "./LazyContentBoundary-9fvYBGuL.js";
|
|
3
|
+
import { mergeClasses as r } from "@epam/ai-dial-chat-shared";
|
|
4
|
+
import { DIAL_ICON_SIZE as i, DIAL_KIT_ICON_STROKE as a, Dropdown as o, ElementSize as s, FabButton as c, Input as l } from "@epam/ai-dial-ui-kit";
|
|
5
|
+
import { IconMenu2 as ee, IconX as te } from "@tabler/icons-react";
|
|
6
|
+
import { useCallback as u, useEffect as d, useId as ne, useRef as f, useState as p } from "react";
|
|
7
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
8
|
+
import { DocumentPreview as re, PageThumbnail as ie } from "@epam/ai-dial-react-pdf-highlighter";
|
|
9
|
+
var ae = { viewer: "_viewer_1gfxm_1" }, g = null, _ = (e) => (g ||= new Promise((t, n) => {
|
|
10
|
+
try {
|
|
11
|
+
t(e());
|
|
12
|
+
} catch (e) {
|
|
13
|
+
n(e);
|
|
14
|
+
}
|
|
15
|
+
}).catch((e) => {
|
|
16
|
+
throw g = null, e;
|
|
17
|
+
}), g), v = 15, y = 3, b = 172, oe = 400, se = 150, ce = 60, x = ({ url: g, highlights: x, selectedHighlightId: S, selectedPageNumber: C, loadPdf: le, configurePdfWorker: w, hideHeader: ue = !1, labels: { thumbnailsLabel: de = "Thumbnails", showThumbnailsLabel: fe = "Show thumbnails", hideThumbnailsLabel: pe = "Hide thumbnails", pageNumberLabel: me = "Page number", loadingLabel: he = "Loading…", errorLabel: ge = "Failed to load content", retryLabel: _e = "Retry" } = {} }) => {
|
|
18
|
+
let [T, E] = p(() => w ? "preparing" : "ready"), [ve, ye] = p(0);
|
|
19
|
+
d(() => {
|
|
20
|
+
if (!w) return;
|
|
21
|
+
E("preparing");
|
|
22
|
+
let e = !1;
|
|
23
|
+
return _(w).then(() => {
|
|
24
|
+
e || E("ready");
|
|
25
|
+
}).catch(() => {
|
|
26
|
+
e || E("error");
|
|
27
|
+
}), () => {
|
|
28
|
+
e = !0;
|
|
29
|
+
};
|
|
30
|
+
}, [w, ve]);
|
|
31
|
+
let D = u(() => {
|
|
32
|
+
ye((e) => e + 1);
|
|
33
|
+
}, []), O = ne(), [k, A] = p(0), [j, M] = p(/* @__PURE__ */ new Map()), [N, P] = p(!1), [F, I] = p(() => C ?? (S ? x.find((e) => e.id === S)?.bboxes[0]?.page ?? 1 : 1)), L = f(null), R = f(null), [be, z] = p([]), [B, xe] = p(b), [Se, Ce] = p(oe), [we, Te] = p(0), V = f(!1), H = f(0), U = f(null);
|
|
34
|
+
d(() => {
|
|
35
|
+
if (C != null) {
|
|
36
|
+
I(C);
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
if (!S) return;
|
|
40
|
+
let e = x.find((e) => e.id === S)?.bboxes[0]?.page;
|
|
41
|
+
e != null && I(e);
|
|
42
|
+
}, [
|
|
43
|
+
C,
|
|
44
|
+
S,
|
|
45
|
+
x
|
|
46
|
+
]), d(() => {
|
|
47
|
+
let e = R.current;
|
|
48
|
+
if (!N || !e) return;
|
|
49
|
+
let t = new ResizeObserver((e) => {
|
|
50
|
+
let t = e[0]?.contentRect.height;
|
|
51
|
+
t && Ce(t);
|
|
52
|
+
});
|
|
53
|
+
return t.observe(e), () => t.disconnect();
|
|
54
|
+
}, [N]);
|
|
55
|
+
let Ee = u((e) => {
|
|
56
|
+
if (!e || V.current) return;
|
|
57
|
+
let t = e.getBoundingClientRect().height;
|
|
58
|
+
t > 0 && (V.current = !0, xe(t));
|
|
59
|
+
}, []), De = u((e) => {
|
|
60
|
+
H.current = e.currentTarget.scrollTop, U.current ??= requestAnimationFrame(() => {
|
|
61
|
+
U.current = null, Te(H.current);
|
|
62
|
+
});
|
|
63
|
+
}, []);
|
|
64
|
+
d(() => () => {
|
|
65
|
+
U.current != null && cancelAnimationFrame(U.current);
|
|
66
|
+
}, []), d(() => {
|
|
67
|
+
let e = R.current;
|
|
68
|
+
if (!e || k === 0) return;
|
|
69
|
+
let t = (F - 1) * B - e.clientHeight / 2 + B / 2;
|
|
70
|
+
e.scrollTo({
|
|
71
|
+
top: Math.max(0, t),
|
|
72
|
+
behavior: "smooth"
|
|
73
|
+
});
|
|
74
|
+
}, [
|
|
75
|
+
F,
|
|
76
|
+
k,
|
|
77
|
+
N,
|
|
78
|
+
B
|
|
79
|
+
]);
|
|
80
|
+
let W = Math.max(0, Math.floor(we / B) - y), Oe = Math.ceil(Se / B) + y * 2, G = Math.min(k - 1, W + Oe);
|
|
81
|
+
d(() => {
|
|
82
|
+
if (k === 0) return;
|
|
83
|
+
let e = Math.min(k, v);
|
|
84
|
+
z(Array.from({ length: e }, (e, t) => t + 1));
|
|
85
|
+
}, [k]), d(() => {
|
|
86
|
+
if (!N || k === 0) return;
|
|
87
|
+
let e = setTimeout(() => {
|
|
88
|
+
z((e) => {
|
|
89
|
+
let t = new Set(e), n = !1;
|
|
90
|
+
for (let e = W + 1; e <= G + 1; e++) t.has(e) || (t.add(e), n = !0);
|
|
91
|
+
return n ? Array.from(t).sort((e, t) => e - t) : e;
|
|
92
|
+
});
|
|
93
|
+
}, se);
|
|
94
|
+
return () => clearTimeout(e);
|
|
95
|
+
}, [
|
|
96
|
+
N,
|
|
97
|
+
W,
|
|
98
|
+
G,
|
|
99
|
+
k
|
|
100
|
+
]);
|
|
101
|
+
let ke = u((e) => {
|
|
102
|
+
M((t) => new Map([...t, ...e]));
|
|
103
|
+
}, []), [K, q] = p(!1), Ae = u((e) => {
|
|
104
|
+
L.current = e, q(!0);
|
|
105
|
+
}, []), J = f(null);
|
|
106
|
+
d(() => {
|
|
107
|
+
if (!K) return;
|
|
108
|
+
let e = J.current, t = e?.querySelector(".pdf-container"), n = e?.querySelector(".pdf-highlight-viewer");
|
|
109
|
+
if (!t || !n) return;
|
|
110
|
+
let r = () => {
|
|
111
|
+
let e = n.scrollWidth - n.clientWidth;
|
|
112
|
+
e > 0 && (n.scrollLeft = e / 2);
|
|
113
|
+
};
|
|
114
|
+
r();
|
|
115
|
+
let i = new ResizeObserver(r);
|
|
116
|
+
i.observe(t), i.observe(n);
|
|
117
|
+
let a = L.current?.getZoom(), o = 0, s, c = () => {
|
|
118
|
+
let e = L.current?.getZoom();
|
|
119
|
+
e !== a && (a = e, o = ce), o > 0 && (r(), --o), s = requestAnimationFrame(c);
|
|
120
|
+
};
|
|
121
|
+
return s = requestAnimationFrame(c), () => {
|
|
122
|
+
cancelAnimationFrame(s), i.disconnect();
|
|
123
|
+
};
|
|
124
|
+
}, [K]), d(() => {
|
|
125
|
+
if (!K || S || C != null) return;
|
|
126
|
+
let e = requestAnimationFrame(() => {
|
|
127
|
+
L.current?.navigateToPage(1);
|
|
128
|
+
});
|
|
129
|
+
return () => cancelAnimationFrame(e);
|
|
130
|
+
}, [
|
|
131
|
+
K,
|
|
132
|
+
S,
|
|
133
|
+
C
|
|
134
|
+
]);
|
|
135
|
+
let Y = u((e) => {
|
|
136
|
+
I(e), L.current?.navigateToPage(e);
|
|
137
|
+
}, []), [X, Z] = p(() => String(F));
|
|
138
|
+
d(() => {
|
|
139
|
+
Z(String(F));
|
|
140
|
+
}, [F]);
|
|
141
|
+
let Q = u((e) => {
|
|
142
|
+
let t = Number(e);
|
|
143
|
+
Number.isInteger(t) && t >= 1 && t <= k ? Y(t) : Z(String(F));
|
|
144
|
+
}, [
|
|
145
|
+
k,
|
|
146
|
+
F,
|
|
147
|
+
Y
|
|
148
|
+
]);
|
|
149
|
+
if (!g) return null;
|
|
150
|
+
if (T === "preparing") return /* @__PURE__ */ m(n, { loadingLabel: he });
|
|
151
|
+
if (T === "error") return /* @__PURE__ */ m(t, {
|
|
152
|
+
errorLabel: ge,
|
|
153
|
+
retryLabel: _e,
|
|
154
|
+
onRetry: D
|
|
155
|
+
});
|
|
156
|
+
let $ = [];
|
|
157
|
+
for (let e = W + 1; e <= G + 1 && e <= k; e++) $.push(/* @__PURE__ */ m("div", {
|
|
158
|
+
ref: e === W + 1 ? Ee : void 0,
|
|
159
|
+
children: /* @__PURE__ */ m(ie, {
|
|
160
|
+
pageNum: e,
|
|
161
|
+
onSelectPage: Y,
|
|
162
|
+
isSelected: F === e,
|
|
163
|
+
isLoading: !j.has(e),
|
|
164
|
+
thumbnailUrl: j.get(e) ?? null
|
|
165
|
+
})
|
|
166
|
+
}, e));
|
|
167
|
+
let je = W * B, Me = Math.max(0, k - G - 1) * B;
|
|
168
|
+
return /* @__PURE__ */ h("div", {
|
|
169
|
+
className: "relative flex h-full overflow-hidden",
|
|
170
|
+
children: [k > 0 && /* @__PURE__ */ m("div", {
|
|
171
|
+
className: "absolute start-3 top-3 z-10",
|
|
172
|
+
children: /* @__PURE__ */ m(o, {
|
|
173
|
+
open: N,
|
|
174
|
+
onOpenChange: P,
|
|
175
|
+
placement: "bottom-start",
|
|
176
|
+
matchReferenceWidth: !1,
|
|
177
|
+
renderOverlay: () => /* @__PURE__ */ h("div", {
|
|
178
|
+
className: "flex w-36 flex-col",
|
|
179
|
+
children: [/* @__PURE__ */ m("div", {
|
|
180
|
+
className: "shrink-0 p-1",
|
|
181
|
+
children: /* @__PURE__ */ m(l, {
|
|
182
|
+
size: s.Small,
|
|
183
|
+
"aria-label": me,
|
|
184
|
+
value: X,
|
|
185
|
+
postfix: `/ ${k}`,
|
|
186
|
+
inputMode: "numeric",
|
|
187
|
+
onChange: (e) => Z(e ?? ""),
|
|
188
|
+
onBlur: () => Q(X),
|
|
189
|
+
onKeyDown: (e) => {
|
|
190
|
+
e.key === "Enter" && Q(X);
|
|
191
|
+
}
|
|
192
|
+
})
|
|
193
|
+
}), /* @__PURE__ */ h("div", {
|
|
194
|
+
ref: R,
|
|
195
|
+
id: O,
|
|
196
|
+
role: "region",
|
|
197
|
+
"aria-label": de,
|
|
198
|
+
onScroll: De,
|
|
199
|
+
className: "max-h-[70vh] min-h-0 overflow-y-auto overflow-x-hidden p-1 [scrollbar-gutter:stable]",
|
|
200
|
+
children: [
|
|
201
|
+
/* @__PURE__ */ m("div", { style: { height: je } }),
|
|
202
|
+
$,
|
|
203
|
+
/* @__PURE__ */ m("div", { style: { height: Me } })
|
|
204
|
+
]
|
|
205
|
+
})]
|
|
206
|
+
}),
|
|
207
|
+
children: /* @__PURE__ */ m(c, {
|
|
208
|
+
icon: m(N ? te : ee, {
|
|
209
|
+
size: i.LG,
|
|
210
|
+
stroke: a,
|
|
211
|
+
"aria-hidden": !0
|
|
212
|
+
}),
|
|
213
|
+
"aria-label": N ? pe : fe,
|
|
214
|
+
"aria-expanded": N,
|
|
215
|
+
"aria-controls": N ? O : void 0
|
|
216
|
+
})
|
|
217
|
+
})
|
|
218
|
+
}), /* @__PURE__ */ m("div", {
|
|
219
|
+
ref: J,
|
|
220
|
+
className: r("min-w-0 flex-1 overflow-hidden", ae.viewer),
|
|
221
|
+
children: /* @__PURE__ */ m(re, {
|
|
222
|
+
fileUrl: g,
|
|
223
|
+
loadFileCb: le ?? e,
|
|
224
|
+
highlights: x,
|
|
225
|
+
selectedHighlightId: S,
|
|
226
|
+
selectedPageNumber: C,
|
|
227
|
+
showOccurrences: !1,
|
|
228
|
+
onTotalPagesChange: A,
|
|
229
|
+
thumbnailPageNumbers: be,
|
|
230
|
+
onThumbnailsLoaded: ke,
|
|
231
|
+
onViewerReady: Ae,
|
|
232
|
+
viewerOptions: { enableVirtualScrolling: !0 },
|
|
233
|
+
containerClassName: ue ? "[&>div:first-child]:hidden" : void 0
|
|
234
|
+
})
|
|
235
|
+
})]
|
|
236
|
+
});
|
|
237
|
+
};
|
|
238
|
+
//#endregion
|
|
239
|
+
export { x as PdfContent };
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;AA6W5E,wGAAwG;AACxG,eAAO,MAAM,gBAAgB,6DAA6B,CAAC"}
|
|
@@ -1 +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;
|
|
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;AA+ehF,uNAAuN;AACvN,eAAO,MAAM,oBAAoB,iEAAiC,CAAC"}
|
|
@@ -13,6 +13,8 @@ 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;
|
|
16
18
|
/**
|
|
17
19
|
* Configures `pdfjs-dist`'s worker (`GlobalWorkerOptions.workerSrc`) for the
|
|
18
20
|
* host app. Called once, the first time a PDF attachment is opened, and
|
|
@@ -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;IAChC;;;;;;;;;;OAUG;IACH,kBAAkB,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACjD;AAED,yFAAyF;AACzF,eAAO,MAAM,yBAAyB,EAAE,EAAE,CAAC,8BAA8B,
|
|
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,CA8ItE,CAAC"}
|
|
@@ -25,6 +25,13 @@ export interface PdfContentProps {
|
|
|
25
25
|
highlights: InputHighlightData[];
|
|
26
26
|
/** ID of the highlight that should be scrolled into view on mount. */
|
|
27
27
|
selectedHighlightId?: string;
|
|
28
|
+
/**
|
|
29
|
+
* 1-based page to navigate to on initial load and whenever it changes,
|
|
30
|
+
* independent of highlight geometry — forwarded directly to the underlying
|
|
31
|
+
* `DocumentPreview`'s own `selectedPageNumber` prop. Takes precedence over
|
|
32
|
+
* the highlight-bbox-derived page when both are present.
|
|
33
|
+
*/
|
|
34
|
+
selectedPageNumber?: number;
|
|
28
35
|
/** Custom fetcher for the PDF blob; falls back to a plain `fetch` wrapper. */
|
|
29
36
|
loadPdf?: (url: string) => Promise<Blob>;
|
|
30
37
|
/** File name shown in the canvas header. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PdfContent.d.ts","sourceRoot":"","sources":["../../../src/components/PdfContent/PdfContent.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,EACL,KAAK,EAAE,EAQR,MAAM,OAAO,CAAC;AAcf,OAAO,gDAAgD,CAAC;AACxD,OAAO,yDAAyD,CAAC;AAkFjE,mEAAmE;AACnE,MAAM,WAAW,gBAAgB;IAC/B,iGAAiG;IACjG,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gHAAgH;IAChH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,8GAA8G;IAC9G,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,0HAA0H;IAC1H,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,0GAA0G;IAC1G,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4GAA4G;IAC5G,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6FAA6F;IAC7F,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,4CAA4C;AAC5C,MAAM,WAAW,eAAe;IAC9B,sCAAsC;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,wDAAwD;IACxD,UAAU,EAAE,kBAAkB,EAAE,CAAC;IACjC,sEAAsE;IACtE,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,8EAA8E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