@deep-eye/core 1.2.90 → 1.2.92
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/CHANGELOG.md +37 -0
- package/dist/components/chat/ChatBot.vue.d.ts +2 -0
- package/dist/components/chat/ChatBot.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ArtifactPreview.vue.d.ts +6 -0
- package/dist/components/chat/components/ArtifactPreview.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ChatFilePreview.vue.d.ts +12 -3
- package/dist/components/chat/components/ChatFilePreview.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ChatFilePreviewPanel.vue.d.ts +6 -1
- package/dist/components/chat/components/ChatFilePreviewPanel.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ChatSender.vue.d.ts +10 -1
- package/dist/components/chat/components/ChatSender.vue.d.ts.map +1 -1
- package/dist/components/chat/components/document-viewer/ContentArea.vue.d.ts +523 -0
- package/dist/components/chat/components/document-viewer/ContentArea.vue.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/DocViewerNavList.vue.d.ts +14 -0
- package/dist/components/chat/components/document-viewer/DocViewerNavList.vue.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/DocViewerSidebar.vue.d.ts +26 -0
- package/dist/components/chat/components/document-viewer/DocViewerSidebar.vue.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/DocViewerToolbar.vue.d.ts +69 -0
- package/dist/components/chat/components/document-viewer/DocViewerToolbar.vue.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/DocumentViewer.vue.d.ts +18 -0
- package/dist/components/chat/components/document-viewer/DocumentViewer.vue.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/PageNumberInput.vue.d.ts +12 -0
- package/dist/components/chat/components/document-viewer/PageNumberInput.vue.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/ScreenshotCropOverlay.vue.d.ts +13 -0
- package/dist/components/chat/components/document-viewer/ScreenshotCropOverlay.vue.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/adapter.d.ts +70 -0
- package/dist/components/chat/components/document-viewer/adapter.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/html/HtmlRenderer.vue.d.ts +24 -0
- package/dist/components/chat/components/document-viewer/html/HtmlRenderer.vue.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/markdown/MarkdownRenderer.vue.d.ts +27 -0
- package/dist/components/chat/components/document-viewer/markdown/MarkdownRenderer.vue.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/office/OfficeDocumentViewer.vue.d.ts +16 -0
- package/dist/components/chat/components/document-viewer/office/OfficeDocumentViewer.vue.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/office/domNav.d.ts +16 -0
- package/dist/components/chat/components/document-viewer/office/domNav.d.ts.map +1 -0
- package/dist/components/chat/components/{ChatOfficePreview.vue.d.ts → document-viewer/pdf/PdfAttachmentList.vue.d.ts} +3 -4
- package/dist/components/chat/components/document-viewer/pdf/PdfAttachmentList.vue.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/pdf/PdfOutlineList.vue.d.ts +13 -0
- package/dist/components/chat/components/document-viewer/pdf/PdfOutlineList.vue.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/pdf/PdfPage.vue.d.ts +16 -0
- package/dist/components/chat/components/document-viewer/pdf/PdfPage.vue.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/pdf/PdfPageList.vue.d.ts +18 -0
- package/dist/components/chat/components/document-viewer/pdf/PdfPageList.vue.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/pdf/PdfRenderer.vue.d.ts +57 -0
- package/dist/components/chat/components/document-viewer/pdf/PdfRenderer.vue.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/pdf/PdfThumbnailItem.vue.d.ts +15 -0
- package/dist/components/chat/components/document-viewer/pdf/PdfThumbnailItem.vue.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/pdf/PdfThumbnailList.vue.d.ts +14 -0
- package/dist/components/chat/components/document-viewer/pdf/PdfThumbnailList.vue.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/pdf/pdfIntrospection.d.ts +11 -0
- package/dist/components/chat/components/document-viewer/pdf/pdfIntrospection.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/pdf/pdfWorker.d.ts +5 -0
- package/dist/components/chat/components/document-viewer/pdf/pdfWorker.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/pdf/usePdfDocument.d.ts +13 -0
- package/dist/components/chat/components/document-viewer/pdf/usePdfDocument.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/pdf/useVirtualScroll.d.ts +16 -0
- package/dist/components/chat/components/document-viewer/pdf/useVirtualScroll.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/screenshotCapture.d.ts +35 -0
- package/dist/components/chat/components/document-viewer/screenshotCapture.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/text/TextRenderer.vue.d.ts +25 -0
- package/dist/components/chat/components/document-viewer/text/TextRenderer.vue.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/types.d.ts +12 -0
- package/dist/components/chat/components/document-viewer/types.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/xlsx/XlsxRenderer.vue.d.ts +24 -0
- package/dist/components/chat/components/document-viewer/xlsx/XlsxRenderer.vue.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/xlsx/XlsxTable.vue.d.ts +7 -0
- package/dist/components/chat/components/document-viewer/xlsx/XlsxTable.vue.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/xlsx/columnLabel.d.ts +3 -0
- package/dist/components/chat/components/document-viewer/xlsx/columnLabel.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/xlsx/parseSpreadsheet.d.ts +15 -0
- package/dist/components/chat/components/document-viewer/xlsx/parseSpreadsheet.d.ts.map +1 -0
- package/dist/components/chat/components/index.d.ts +1 -0
- package/dist/components/chat/components/index.d.ts.map +1 -1
- package/dist/components/chat/index.d.ts +1 -1
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/chat/mdoc/ContentNodes.vue.d.ts +1 -0
- package/dist/components/chat/mdoc/ContentNodes.vue.d.ts.map +1 -1
- package/dist/components/chat/mdoc/artifactOpenStrategy.d.ts.map +1 -1
- package/dist/components/chat/mdoc/index.d.ts +1 -1
- package/dist/components/chat/mdoc/index.d.ts.map +1 -1
- package/dist/components/chat/mdoc/referenceMarkup.d.ts +26 -0
- package/dist/components/chat/mdoc/referenceMarkup.d.ts.map +1 -1
- package/dist/components/chat/previewRenderers.d.ts.map +1 -1
- package/dist/components/chat/types.d.ts +6 -2
- package/dist/components/chat/types.d.ts.map +1 -1
- package/dist/html2canvas.esm-BA_v9SIU.cjs +22 -0
- package/dist/html2canvas.esm-d2sM-0Wm.js +4870 -0
- package/dist/{index-BJdNN1GV.cjs → index-BWdg422O.cjs} +4 -4
- package/dist/index-BWnpcJym.cjs +850 -0
- package/dist/index-Bh4xn5LB.cjs +1 -0
- package/dist/index-BuN8GnS7.js +22 -0
- package/dist/{index-BufnUXnQ.js → index-CNZScDK0.js} +4 -3
- package/dist/index-D-krptDG.js +107981 -0
- package/dist/{index-Bj9h-xEr.cjs → index-D2welI3B.cjs} +20 -20
- package/dist/{index-DF8KmkKX.js → index-WX1XCf-8.js} +4 -3
- package/dist/index.cjs +1 -664
- package/dist/index.js +225 -68958
- package/dist/style.css +1 -1
- package/package.json +7 -1
- package/dist/components/chat/components/ChatOfficePreview.vue.d.ts.map +0 -1
- package/dist/index-B4hgICk-.cjs +0 -198
- package/dist/index-CnxZBHPD.js +0 -42825
- package/dist/index-DPhuLMkO.cjs +0 -1
- package/dist/index-Dq4cniDm.cjs +0 -5
- package/dist/index-cW_BnxHR.js +0 -1722
- package/dist/index-iCVvFIlX.js +0 -28
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ChatPreviewKind, ChatResourceFile, ConversationUiAction } from '../../types';
|
|
2
|
+
import type { DocumentScreenshotResult } from './adapter';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
resource: ChatResourceFile;
|
|
5
|
+
kind: Extract<ChatPreviewKind, 'pdf' | 'docx' | 'excel' | 'pptx' | 'html' | 'markdown' | 'text'>;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
close: () => any;
|
|
9
|
+
action: (payload: ConversationUiAction) => any;
|
|
10
|
+
"screenshot-result": (result: DocumentScreenshotResult) => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
+
onClose?: (() => any) | undefined;
|
|
13
|
+
onAction?: ((payload: ConversationUiAction) => any) | undefined;
|
|
14
|
+
"onScreenshot-result"?: ((result: DocumentScreenshotResult) => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
18
|
+
//# sourceMappingURL=DocumentViewer.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocumentViewer.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/chat/components/document-viewer/DocumentViewer.vue"],"names":[],"mappings":"AA+VA,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAY1F,OAAO,KAAK,EAGV,wBAAwB,EAGzB,MAAM,WAAW,CAAA;AAIlB,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,IAAI,EAAE,OAAO,CAAC,eAAe,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,CAAC,CAAA;CACjG,CAAC;AAumBF,QAAA,MAAM,YAAY;;;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
currentPage: number;
|
|
3
|
+
numPages: number | null;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
jump: (page: number) => any;
|
|
7
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
8
|
+
onJump?: ((page: number) => any) | undefined;
|
|
9
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
//# sourceMappingURL=PageNumberInput.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageNumberInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/chat/components/document-viewer/PageNumberInput.vue"],"names":[],"mappings":"AAkGA,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;CACxB,CAAC;AAgGF,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ViewportRect } from './screenshotCapture';
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
3
|
+
cancel: () => any;
|
|
4
|
+
copy: (rect: ViewportRect) => any;
|
|
5
|
+
ask: (rect: ViewportRect) => any;
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
7
|
+
onCancel?: (() => any) | undefined;
|
|
8
|
+
onCopy?: ((rect: ViewportRect) => any) | undefined;
|
|
9
|
+
onAsk?: ((rect: ViewportRect) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
13
|
+
//# sourceMappingURL=ScreenshotCropOverlay.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScreenshotCropOverlay.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/chat/components/document-viewer/ScreenshotCropOverlay.vue"],"names":[],"mappings":"AAsTA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAuSvD,QAAA,MAAM,YAAY;;;;;;;;iFAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shell + render-adapter contract.
|
|
3
|
+
* See 《多格式文档查看器-架构扩展与PDF精细化清单.md》§2.2 — every format renderer
|
|
4
|
+
* mounted inside `ContentArea.vue` implements (a subset of) this interface so the
|
|
5
|
+
* format-agnostic shell (`DocumentViewer.vue`'s `DocViewerToolbar` / `DocViewerSidebar`)
|
|
6
|
+
* never needs to know which renderer is currently active, only its capabilities.
|
|
7
|
+
*/
|
|
8
|
+
/** `paginated`: page-based content (PDF, and future transcoded PPT/Word). `flow`: continuous content (HTML/Markdown/TXT/Excel). */
|
|
9
|
+
export type DocumentViewerMode = 'paginated' | 'flow';
|
|
10
|
+
export interface OutlineNode {
|
|
11
|
+
id: string;
|
|
12
|
+
title: string;
|
|
13
|
+
depth: number;
|
|
14
|
+
/** Target page for paginated formats; omitted/null for flow formats without page concept. */
|
|
15
|
+
page?: number | null;
|
|
16
|
+
children?: OutlineNode[];
|
|
17
|
+
}
|
|
18
|
+
export interface SearchResult {
|
|
19
|
+
page: number;
|
|
20
|
+
snippet: string;
|
|
21
|
+
}
|
|
22
|
+
export interface DocumentLoadResult {
|
|
23
|
+
mode: DocumentViewerMode;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Result of the toolbar's "截图提问" crop tool (see `screenshotCapture.ts`):
|
|
27
|
+
* a selection over *selectable text* (html/markdown/text/xlsx cells, or a PDF
|
|
28
|
+
* text layer) yields plain text meant to be inserted directly into the chat
|
|
29
|
+
* input; anything else (images, canvases, complex layout) falls back to a
|
|
30
|
+
* cropped PNG meant to be attached like a pasted screenshot.
|
|
31
|
+
*/
|
|
32
|
+
export type DocumentScreenshotResult = {
|
|
33
|
+
type: 'text';
|
|
34
|
+
text: string;
|
|
35
|
+
} | {
|
|
36
|
+
type: 'image';
|
|
37
|
+
file: File;
|
|
38
|
+
};
|
|
39
|
+
export interface DocumentAdapter {
|
|
40
|
+
/** Loads the document and reports which UI mode the shell should render. */
|
|
41
|
+
load(source: File | string): Promise<DocumentLoadResult>;
|
|
42
|
+
/** Paginated-mode only. */
|
|
43
|
+
getPageCount?(): number;
|
|
44
|
+
scrollToPage?(pageNumber: number): void;
|
|
45
|
+
getCurrentPage?(): number;
|
|
46
|
+
/** Sidebar data. */
|
|
47
|
+
getThumbnail?(pageNumber: number): Promise<string>;
|
|
48
|
+
getOutline?(): Promise<OutlineNode[]>;
|
|
49
|
+
/** Flow-mode only: scroll the content area to the heading/section identified by `OutlineNode.id`. */
|
|
50
|
+
scrollToOutline?(id: string): void;
|
|
51
|
+
/** Toolbar search action. */
|
|
52
|
+
search?(keyword: string): Promise<SearchResult[]>;
|
|
53
|
+
/** Paginated/image-like content only. */
|
|
54
|
+
setZoom?(scale: number): void;
|
|
55
|
+
download(): void;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* PDF-specific superset: the base `DocumentAdapter` intentionally has no attachment
|
|
59
|
+
* concept (most formats never will), so the "附件" sidebar tab is an additive
|
|
60
|
+
* extension rather than part of the shared contract.
|
|
61
|
+
*/
|
|
62
|
+
export interface PdfDocumentAdapter extends DocumentAdapter {
|
|
63
|
+
getAttachments?(): Promise<{
|
|
64
|
+
id: string;
|
|
65
|
+
filename: string;
|
|
66
|
+
}[]>;
|
|
67
|
+
downloadAttachment?(id: string): void;
|
|
68
|
+
setRotation?(degrees: number): void;
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../../src/components/chat/components/document-viewer/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,mIAAmI;AACnI,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,MAAM,CAAA;AAErD,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,6FAA6F;IAC7F,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAA;CACzB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,kBAAkB,CAAA;CACzB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,wBAAwB,GAChC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,IAAI,CAAA;CAAE,CAAA;AAEjC,MAAM,WAAW,eAAe;IAC9B,4EAA4E;IAC5E,IAAI,CAAC,MAAM,EAAE,IAAI,GAAG,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAA;IAExD,2BAA2B;IAC3B,YAAY,CAAC,IAAI,MAAM,CAAA;IACvB,YAAY,CAAC,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACvC,cAAc,CAAC,IAAI,MAAM,CAAA;IAEzB,oBAAoB;IACpB,YAAY,CAAC,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;IAClD,UAAU,CAAC,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAAA;IACrC,qGAAqG;IACrG,eAAe,CAAC,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAA;IAElC,6BAA6B;IAC7B,MAAM,CAAC,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAAA;IAEjD,yCAAyC;IACzC,OAAO,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IAE7B,QAAQ,IAAI,IAAI,CAAA;CACjB;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAmB,SAAQ,eAAe;IACzD,cAAc,CAAC,IAAI,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC,CAAA;IAC9D,kBAAkB,CAAC,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAA;IACrC,WAAW,CAAC,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CACpC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ChatResourceFile } from '../../../types';
|
|
2
|
+
import type { DocumentLoadResult, OutlineNode } from '../adapter';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
resource: ChatResourceFile;
|
|
5
|
+
};
|
|
6
|
+
declare function load(): Promise<DocumentLoadResult>;
|
|
7
|
+
declare function getOutline(): Promise<OutlineNode[]>;
|
|
8
|
+
declare function scrollToOutline(id: string): void;
|
|
9
|
+
declare function download(): void;
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
11
|
+
load: typeof load;
|
|
12
|
+
getOutline: typeof getOutline;
|
|
13
|
+
scrollToOutline: typeof scrollToOutline;
|
|
14
|
+
download: typeof download;
|
|
15
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
|
+
error: (error: Error) => any;
|
|
17
|
+
loaded: (result: DocumentLoadResult) => any;
|
|
18
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
19
|
+
onError?: ((error: Error) => any) | undefined;
|
|
20
|
+
onLoaded?: ((result: DocumentLoadResult) => any) | undefined;
|
|
21
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
24
|
+
//# sourceMappingURL=HtmlRenderer.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HtmlRenderer.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/components/document-viewer/html/HtmlRenderer.vue"],"names":[],"mappings":"AAyLA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAMjE,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,CAAA;CAC3B,CAAC;AA6EF,iBAAe,IAAI,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAkBjD;AAED,iBAAe,UAAU,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAElD;AAED,iBAAS,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAGzC;AAED,iBAAS,QAAQ,IAAI,IAAI,CAOxB;AAiFD,QAAA,MAAM,YAAY;;;;;;;;;;;kFAIhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ChatResourceFile, ConversationUiAction } from '../../../types';
|
|
2
|
+
import type { DocumentLoadResult, OutlineNode } from '../adapter';
|
|
3
|
+
import '../../../mdoc/referenceTag.css';
|
|
4
|
+
type __VLS_Props = {
|
|
5
|
+
resource: ChatResourceFile;
|
|
6
|
+
};
|
|
7
|
+
declare function load(): Promise<DocumentLoadResult>;
|
|
8
|
+
declare function getOutline(): Promise<OutlineNode[]>;
|
|
9
|
+
declare function scrollToOutline(id: string): void;
|
|
10
|
+
declare function download(): void;
|
|
11
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
12
|
+
load: typeof load;
|
|
13
|
+
getOutline: typeof getOutline;
|
|
14
|
+
scrollToOutline: typeof scrollToOutline;
|
|
15
|
+
download: typeof download;
|
|
16
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
+
error: (error: Error) => any;
|
|
18
|
+
action: (payload: ConversationUiAction) => any;
|
|
19
|
+
loaded: (result: DocumentLoadResult) => any;
|
|
20
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
21
|
+
onError?: ((error: Error) => any) | undefined;
|
|
22
|
+
onAction?: ((payload: ConversationUiAction) => any) | undefined;
|
|
23
|
+
onLoaded?: ((result: DocumentLoadResult) => any) | undefined;
|
|
24
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
declare const _default: typeof __VLS_export;
|
|
26
|
+
export default _default;
|
|
27
|
+
//# sourceMappingURL=MarkdownRenderer.vue.d.ts.map
|
package/dist/components/chat/components/document-viewer/markdown/MarkdownRenderer.vue.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownRenderer.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/components/document-viewer/markdown/MarkdownRenderer.vue"],"names":[],"mappings":"AAyNA,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAC5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAGjE,OAAO,gCAAgC,CAAA;AAKvC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,CAAA;CAC3B,CAAC;AA8EF,iBAAe,IAAI,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAqBjD;AAED,iBAAe,UAAU,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAElD;AAED,iBAAS,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAEzC;AAED,iBAAS,QAAQ,IAAI,IAAI,CAOxB;AAmFD,QAAA,MAAM,YAAY;;;;;;;;;;;;;kFAIhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ChatResourceFile } from '../../../types';
|
|
2
|
+
import type { DocumentScreenshotResult } from '../adapter';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
resource: ChatResourceFile;
|
|
5
|
+
kind: 'docx' | 'pptx';
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
close: () => any;
|
|
9
|
+
"screenshot-result": (result: DocumentScreenshotResult) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
onClose?: (() => any) | undefined;
|
|
12
|
+
"onScreenshot-result"?: ((result: DocumentScreenshotResult) => any) | undefined;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
//# sourceMappingURL=OfficeDocumentViewer.vue.d.ts.map
|
package/dist/components/chat/components/document-viewer/office/OfficeDocumentViewer.vue.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OfficeDocumentViewer.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/components/document-viewer/office/OfficeDocumentViewer.vue"],"names":[],"mappings":"AA8VA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAQtD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AAK1D,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;CACtB,CAAC;AA6cF,QAAA,MAAM,YAAY;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DocViewerNavItem } from '../types';
|
|
2
|
+
export interface DocxHeadingItem extends DocViewerNavItem {
|
|
3
|
+
el: HTMLElement;
|
|
4
|
+
}
|
|
5
|
+
/** Extracts a clickable outline from headings docx.js renders inside the wrapper. */
|
|
6
|
+
export declare function extractDocxOutline(root: HTMLElement): DocxHeadingItem[];
|
|
7
|
+
export interface DomTabItem extends DocViewerNavItem {
|
|
8
|
+
el: HTMLElement;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Best-effort slide detection for @vue-office/pptx: it renders each slide as a
|
|
12
|
+
* repeated block under a single container. There is no public API for this either,
|
|
13
|
+
* so the heuristic below degrades to an empty list when nothing recognizable is found.
|
|
14
|
+
*/
|
|
15
|
+
export declare function extractPptxSlides(root: HTMLElement): DomTabItem[];
|
|
16
|
+
//# sourceMappingURL=domNav.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domNav.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/components/document-viewer/office/domNav.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAEhD,MAAM,WAAW,eAAgB,SAAQ,gBAAgB;IACvD,EAAE,EAAE,WAAW,CAAA;CAChB;AAED,qFAAqF;AACrF,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,WAAW,GAAG,eAAe,EAAE,CAYvE;AAED,MAAM,WAAW,UAAW,SAAQ,gBAAgB;IAClD,EAAE,EAAE,WAAW,CAAA;CAChB;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,GAAG,UAAU,EAAE,CAajE"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PDFDocumentProxy } from 'pdfjs-dist';
|
|
2
2
|
type __VLS_Props = {
|
|
3
|
-
|
|
4
|
-
kind: Extract<ChatPreviewKind, 'pdf' | 'docx' | 'excel' | 'pptx'>;
|
|
3
|
+
pdfDoc: PDFDocumentProxy;
|
|
5
4
|
};
|
|
6
5
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
6
|
declare const _default: typeof __VLS_export;
|
|
8
7
|
export default _default;
|
|
9
|
-
//# sourceMappingURL=
|
|
8
|
+
//# sourceMappingURL=PdfAttachmentList.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PdfAttachmentList.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/components/document-viewer/pdf/PdfAttachmentList.vue"],"names":[],"mappings":"AA8CA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAWlD,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,gBAAgB,CAAA;CACzB,CAAC;AAkEF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { PDFDocumentProxy } from 'pdfjs-dist';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
pdfDoc: PDFDocumentProxy;
|
|
4
|
+
currentPage: number;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
select: (page: number) => any;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
onSelect?: ((page: number) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
13
|
+
//# sourceMappingURL=PdfOutlineList.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PdfOutlineList.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/components/document-viewer/pdf/PdfOutlineList.vue"],"names":[],"mappings":"AAsDA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAWlD,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,gBAAgB,CAAA;IACxB,WAAW,EAAE,MAAM,CAAA;CACpB,CAAC;AA4EF,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type PDFDocumentProxy } from 'pdfjs-dist';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
pdfDoc: PDFDocumentProxy;
|
|
4
|
+
pageNumber: number;
|
|
5
|
+
scale: number;
|
|
6
|
+
rotation: number;
|
|
7
|
+
rendered: boolean;
|
|
8
|
+
fallbackWidth: number;
|
|
9
|
+
fallbackHeight: number;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
12
|
+
el: import("vue").Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
|
|
13
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
//# sourceMappingURL=PdfPage.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PdfPage.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/components/document-viewer/pdf/PdfPage.vue"],"names":[],"mappings":"AAgLA,OAAO,EAAa,KAAK,gBAAgB,EAAsC,MAAM,YAAY,CAAA;AAIjG,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,gBAAgB,CAAA;IACxB,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,OAAO,CAAA;IACjB,aAAa,EAAE,MAAM,CAAA;IACrB,cAAc,EAAE,MAAM,CAAA;CACvB,CAAC;AAyJF,QAAA,MAAM,YAAY;;oPAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { PDFDocumentProxy } from 'pdfjs-dist';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
pdfDoc: PDFDocumentProxy;
|
|
4
|
+
numPages: number;
|
|
5
|
+
scale: number;
|
|
6
|
+
rotation: number;
|
|
7
|
+
};
|
|
8
|
+
declare function scrollToPage(page: number): Promise<void>;
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
10
|
+
scrollToPage: typeof scrollToPage;
|
|
11
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
"update:current-page": (page: number) => any;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
+
"onUpdate:current-page"?: ((page: number) => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
18
|
+
//# sourceMappingURL=PdfPageList.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PdfPageList.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/components/document-viewer/pdf/PdfPageList.vue"],"names":[],"mappings":"AAmHA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAMlD,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,gBAAgB,CAAA;IACxB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAC;AA2DF,iBAAe,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIvD;AAyED,QAAA,MAAM,YAAY;;;;;;kFAIhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { ChatResourceFile } from '../../../types';
|
|
2
|
+
import type { DocumentLoadResult } from '../adapter';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
resource: ChatResourceFile;
|
|
5
|
+
};
|
|
6
|
+
/** Resolves once the document is loaded (or rejects on load failure). */
|
|
7
|
+
declare function load(): Promise<DocumentLoadResult>;
|
|
8
|
+
declare function getPageCount(): number;
|
|
9
|
+
declare function getCurrentPage(): number;
|
|
10
|
+
declare function scrollToPage(page: number): Promise<void>;
|
|
11
|
+
declare function getThumbnail(pageNumber: number): Promise<string>;
|
|
12
|
+
declare function getOutline(): Promise<import("../adapter").OutlineNode[]>;
|
|
13
|
+
declare function getAttachments(): Promise<{
|
|
14
|
+
id: string;
|
|
15
|
+
filename: string;
|
|
16
|
+
}[]>;
|
|
17
|
+
declare function downloadAttachment(id: string): void;
|
|
18
|
+
declare function setZoom(next: number): void;
|
|
19
|
+
declare function zoomIn(): void;
|
|
20
|
+
declare function zoomOut(): void;
|
|
21
|
+
declare function setRotation(degrees: number): void;
|
|
22
|
+
declare function rotateCw(): void;
|
|
23
|
+
declare function rotateCcw(): void;
|
|
24
|
+
declare function download(): void;
|
|
25
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
26
|
+
load: typeof load;
|
|
27
|
+
getPageCount: typeof getPageCount;
|
|
28
|
+
getCurrentPage: typeof getCurrentPage;
|
|
29
|
+
scrollToPage: typeof scrollToPage;
|
|
30
|
+
getThumbnail: typeof getThumbnail;
|
|
31
|
+
getOutline: typeof getOutline;
|
|
32
|
+
getAttachments: typeof getAttachments;
|
|
33
|
+
downloadAttachment: typeof downloadAttachment;
|
|
34
|
+
setZoom: typeof setZoom;
|
|
35
|
+
setRotation: typeof setRotation;
|
|
36
|
+
zoomIn: typeof zoomIn;
|
|
37
|
+
zoomOut: typeof zoomOut;
|
|
38
|
+
rotateCw: typeof rotateCw;
|
|
39
|
+
rotateCcw: typeof rotateCcw;
|
|
40
|
+
download: typeof download;
|
|
41
|
+
pdfDoc: import("vue").Ref<import("pdfjs-dist/types/src/display/api").PDFDocumentProxy | null, import("pdfjs-dist/types/src/display/api").PDFDocumentProxy | null>;
|
|
42
|
+
numPages: import("vue").Ref<number, number>;
|
|
43
|
+
currentPage: import("vue").Ref<number, number>;
|
|
44
|
+
scale: import("vue").Ref<number, number>;
|
|
45
|
+
rotation: import("vue").Ref<number, number>;
|
|
46
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
47
|
+
error: (error: Error) => any;
|
|
48
|
+
"update:current-page": (page: number) => any;
|
|
49
|
+
loaded: (result: DocumentLoadResult) => any;
|
|
50
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
51
|
+
onError?: ((error: Error) => any) | undefined;
|
|
52
|
+
"onUpdate:current-page"?: ((page: number) => any) | undefined;
|
|
53
|
+
onLoaded?: ((result: DocumentLoadResult) => any) | undefined;
|
|
54
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
55
|
+
declare const _default: typeof __VLS_export;
|
|
56
|
+
export default _default;
|
|
57
|
+
//# sourceMappingURL=PdfRenderer.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PdfRenderer.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/components/document-viewer/pdf/PdfRenderer.vue"],"names":[],"mappings":"AAqOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAapD,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,CAAA;CAC3B,CAAC;AAwCF,yEAAyE;AACzE,iBAAe,IAAI,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAgBjD;AAED,iBAAS,YAAY,IAAI,MAAM,CAE9B;AAED,iBAAS,cAAc,IAAI,MAAM,CAEhC;AAED,iBAAe,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGvD;AAED,iBAAe,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAkB/D;AAED,iBAAe,UAAU,gDAGxB;AAED,iBAAe,cAAc;;;KAI5B;AAED,iBAAS,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAG5C;AAED,iBAAS,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAEnC;AAED,iBAAS,MAAM,IAAI,IAAI,CAEtB;AAED,iBAAS,OAAO,IAAI,IAAI,CAEvB;AAED,iBAAS,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE1C;AAED,iBAAS,QAAQ,IAAI,IAAI,CAExB;AAED,iBAAS,SAAS,IAAI,IAAI,CAEzB;AAED,iBAAS,QAAQ,IAAI,IAAI,CAOxB;AA0HD,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kFAIhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { PDFDocumentProxy } from 'pdfjs-dist';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
pdfDoc: PDFDocumentProxy;
|
|
4
|
+
pageNumber: number;
|
|
5
|
+
active: boolean;
|
|
6
|
+
root: HTMLElement | null;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
select: (page: number) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
onSelect?: ((page: number) => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
15
|
+
//# sourceMappingURL=PdfThumbnailItem.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PdfThumbnailItem.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/components/document-viewer/pdf/PdfThumbnailItem.vue"],"names":[],"mappings":"AA+HA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAIlD,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,gBAAgB,CAAA;IACxB,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,OAAO,CAAA;IACf,IAAI,EAAE,WAAW,GAAG,IAAI,CAAA;CACzB,CAAC;AAuHF,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PDFDocumentProxy } from 'pdfjs-dist';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
pdfDoc: PDFDocumentProxy;
|
|
4
|
+
numPages: number;
|
|
5
|
+
currentPage: number;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
select: (page: number) => any;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
onSelect?: ((page: number) => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
//# sourceMappingURL=PdfThumbnailList.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PdfThumbnailList.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/components/document-viewer/pdf/PdfThumbnailList.vue"],"names":[],"mappings":"AA4CA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAKlD,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,gBAAgB,CAAA;IACxB,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;CACpB,CAAC;AA4EF,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PDFDocumentProxy } from 'pdfjs-dist';
|
|
2
|
+
import type { OutlineNode } from '../adapter';
|
|
3
|
+
export declare function getPdfOutline(pdfDoc: PDFDocumentProxy): Promise<OutlineNode[]>;
|
|
4
|
+
export interface PdfAttachmentInfo {
|
|
5
|
+
id: string;
|
|
6
|
+
filename: string;
|
|
7
|
+
content: Uint8Array;
|
|
8
|
+
}
|
|
9
|
+
export declare function getPdfAttachments(pdfDoc: PDFDocumentProxy): Promise<PdfAttachmentInfo[]>;
|
|
10
|
+
export declare function triggerAttachmentDownload(attachment: PdfAttachmentInfo): void;
|
|
11
|
+
//# sourceMappingURL=pdfIntrospection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdfIntrospection.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/components/document-viewer/pdf/pdfIntrospection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AA+B7C,wBAAsB,aAAa,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAiBpF;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,UAAU,CAAA;CACpB;AAED,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAU9F;AAED,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,iBAAiB,GAAG,IAAI,CAQ7E"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Installs the bundled pdf.js worker unless a host app already configured one. */
|
|
2
|
+
export declare function ensurePdfWorker(): void;
|
|
3
|
+
/** Lets a host app point pdf.js at a self-hosted worker file instead. */
|
|
4
|
+
export declare function configurePdfWorker(url: string): void;
|
|
5
|
+
//# sourceMappingURL=pdfWorker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdfWorker.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/components/document-viewer/pdf/pdfWorker.ts"],"names":[],"mappings":"AAOA,mFAAmF;AACnF,wBAAgB,eAAe,IAAI,IAAI,CAMtC;AAED,yEAAyE;AACzE,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAGpD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
import { type PDFDocumentProxy } from 'pdfjs-dist';
|
|
3
|
+
export interface UsePdfDocumentResult {
|
|
4
|
+
pdfDoc: Ref<PDFDocumentProxy | null>;
|
|
5
|
+
numPages: Ref<number>;
|
|
6
|
+
loading: Ref<boolean>;
|
|
7
|
+
error: Ref<Error | null>;
|
|
8
|
+
/** Call from `onBeforeUnmount` to release the current document. */
|
|
9
|
+
destroy: () => void;
|
|
10
|
+
}
|
|
11
|
+
/** Loads a pdf.js document for `source` (a URL) and re-loads whenever it changes. */
|
|
12
|
+
export declare function usePdfDocument(source: Ref<string | undefined>): UsePdfDocumentResult;
|
|
13
|
+
//# sourceMappingURL=usePdfDocument.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePdfDocument.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/components/document-viewer/pdf/usePdfDocument.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AACtD,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAG/D,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,GAAG,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAA;IACpC,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACrB,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACrB,KAAK,EAAE,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,CAAA;IACxB,mEAAmE;IACnE,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB;AAED,qFAAqF;AACrF,wBAAgB,cAAc,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,GAAG,oBAAoB,CA4CpF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ComputedRef } from 'vue';
|
|
2
|
+
export interface UseVirtualScrollResult {
|
|
3
|
+
/** Page numbers that should currently render real content. */
|
|
4
|
+
renderedPages: Set<number>;
|
|
5
|
+
/** Best guess at the page most visible in the viewport, for the page-number input. */
|
|
6
|
+
currentPage: ComputedRef<number | null>;
|
|
7
|
+
observeRoot: (root: HTMLElement | null) => void;
|
|
8
|
+
observePage: (page: number, el: Element) => void;
|
|
9
|
+
unobservePage: (el: Element) => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* IntersectionObserver-backed virtual scroll: pages within `rootMargin` of the
|
|
13
|
+
* viewport render real canvas/text content; everything else stays a placeholder.
|
|
14
|
+
*/
|
|
15
|
+
export declare function useVirtualScroll(rootMargin?: string): UseVirtualScrollResult;
|
|
16
|
+
//# sourceMappingURL=useVirtualScroll.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useVirtualScroll.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/components/document-viewer/pdf/useVirtualScroll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuC,KAAK,WAAW,EAAE,MAAM,KAAK,CAAA;AAE3E,MAAM,WAAW,sBAAsB;IACrC,8DAA8D;IAC9D,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC1B,sFAAsF;IACtF,WAAW,EAAE,WAAW,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IACvC,WAAW,EAAE,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAA;IAC/C,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,KAAK,IAAI,CAAA;IAChD,aAAa,EAAE,CAAC,EAAE,EAAE,OAAO,KAAK,IAAI,CAAA;CACrC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,SAAa,GAAG,sBAAsB,CA2DhF"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helpers behind the toolbar's "截图提问" crop tool. Two outcomes for a
|
|
3
|
+
* dragged rectangle (all coordinates are viewport/client-space, matching
|
|
4
|
+
* `PointerEvent.clientX/clientY` and `Element.getBoundingClientRect()`):
|
|
5
|
+
*
|
|
6
|
+
* 1. The rectangle overlaps real selectable text (html/markdown/text/xlsx
|
|
7
|
+
* cells) — extract it with the Range API and hand back plain text.
|
|
8
|
+
* 2. Otherwise — rasterize the region with `html2canvas` (lazy-loaded, only
|
|
9
|
+
* on this path) and hand back a cropped PNG `File`.
|
|
10
|
+
*/
|
|
11
|
+
export interface ViewportRect {
|
|
12
|
+
left: number;
|
|
13
|
+
top: number;
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Tries the main document first, then any same-origin iframe (the HTML
|
|
19
|
+
* renderer's `sandbox="allow-same-origin"` frame) whose box intersects `rect`.
|
|
20
|
+
*/
|
|
21
|
+
export declare function extractTextInRect(rect: ViewportRect, iframes?: readonly HTMLIFrameElement[]): string;
|
|
22
|
+
/**
|
|
23
|
+
* Rasterizes just the `rect` region of `containerEl` (lazy-loaded
|
|
24
|
+
* `html2canvas`). Returns `null` if the crop ends up empty/degenerate.
|
|
25
|
+
*
|
|
26
|
+
* Passes `x`/`y`/`width`/`height` (in `containerEl`'s own coordinate space)
|
|
27
|
+
* so html2canvas only renders that sub-region instead of the whole
|
|
28
|
+
* container — for a long/virtualized document (e.g. a multi-page PDF or a
|
|
29
|
+
* tall HTML/markdown render) rasterizing the *entire* scrollable content on
|
|
30
|
+
* every "问问 AI" click is the dominant cost and is what makes the crop tool
|
|
31
|
+
* feel laggy; scoping the render to the selected rect keeps it proportional
|
|
32
|
+
* to what the user actually selected.
|
|
33
|
+
*/
|
|
34
|
+
export declare function captureImageInRect(containerEl: HTMLElement, rect: ViewportRect, filename: string): Promise<File | null>;
|
|
35
|
+
//# sourceMappingURL=screenshotCapture.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screenshotCapture.d.ts","sourceRoot":"","sources":["../../../../../src/components/chat/components/document-viewer/screenshotCapture.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf;AA4CD;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,YAAY,EAClB,OAAO,GAAE,SAAS,iBAAiB,EAAO,GACzC,MAAM,CA0BR;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,kBAAkB,CACtC,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,YAAY,EAClB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,CA0BtB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ChatResourceFile, ConversationUiAction } from '../../../types';
|
|
2
|
+
import '../../../mdoc/referenceTag.css';
|
|
3
|
+
import type { DocumentLoadResult, OutlineNode } from '../adapter';
|
|
4
|
+
type __VLS_Props = {
|
|
5
|
+
resource: ChatResourceFile;
|
|
6
|
+
};
|
|
7
|
+
declare function load(): Promise<DocumentLoadResult>;
|
|
8
|
+
declare function getOutline(): Promise<OutlineNode[]>;
|
|
9
|
+
declare function download(): void;
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
11
|
+
load: typeof load;
|
|
12
|
+
getOutline: typeof getOutline;
|
|
13
|
+
download: typeof download;
|
|
14
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
error: (error: Error) => any;
|
|
16
|
+
action: (payload: ConversationUiAction) => any;
|
|
17
|
+
loaded: (result: DocumentLoadResult) => any;
|
|
18
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
19
|
+
onError?: ((error: Error) => any) | undefined;
|
|
20
|
+
onAction?: ((payload: ConversationUiAction) => any) | undefined;
|
|
21
|
+
onLoaded?: ((result: DocumentLoadResult) => any) | undefined;
|
|
22
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
declare const _default: typeof __VLS_export;
|
|
24
|
+
export default _default;
|
|
25
|
+
//# sourceMappingURL=TextRenderer.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextRenderer.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/components/document-viewer/text/TextRenderer.vue"],"names":[],"mappings":"AAsKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAK5E,OAAO,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAKjE,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,CAAA;CAC3B,CAAC;AAmDF,iBAAe,IAAI,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAqBjD;AAED,iBAAe,UAAU,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAIlD;AAED,iBAAS,QAAQ,IAAI,IAAI,CAOxB;AA0ED,QAAA,MAAM,YAAY;;;;;;;;;;;;kFAIhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Component } from 'vue';
|
|
2
|
+
export interface DocViewerSidebarTab {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
icon: Component;
|
|
6
|
+
}
|
|
7
|
+
export interface DocViewerNavItem {
|
|
8
|
+
id: string;
|
|
9
|
+
label: string;
|
|
10
|
+
depth?: number;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/chat/components/document-viewer/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAEpC,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,SAAS,CAAA;CAChB;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;CACf"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ChatResourceFile } from '../../../types';
|
|
2
|
+
import type { DocumentLoadResult, OutlineNode } from '../adapter';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
resource: ChatResourceFile;
|
|
5
|
+
};
|
|
6
|
+
declare function load(): Promise<DocumentLoadResult>;
|
|
7
|
+
declare function getOutline(): Promise<OutlineNode[]>;
|
|
8
|
+
declare function scrollToOutline(id: string): void;
|
|
9
|
+
declare function download(): void;
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
11
|
+
load: typeof load;
|
|
12
|
+
getOutline: typeof getOutline;
|
|
13
|
+
scrollToOutline: typeof scrollToOutline;
|
|
14
|
+
download: typeof download;
|
|
15
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
|
+
error: (error: Error) => any;
|
|
17
|
+
loaded: (result: DocumentLoadResult) => any;
|
|
18
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
19
|
+
onError?: ((error: Error) => any) | undefined;
|
|
20
|
+
onLoaded?: ((result: DocumentLoadResult) => any) | undefined;
|
|
21
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
24
|
+
//# sourceMappingURL=XlsxRenderer.vue.d.ts.map
|