@deep-eye/core 1.3.6 → 1.3.8
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 +44 -0
- package/dist/components/chat/ChatApp.vue.d.ts +31 -11
- package/dist/components/chat/ChatApp.vue.d.ts.map +1 -1
- package/dist/components/chat/ChatBot.vue.d.ts +16 -0
- package/dist/components/chat/ChatBot.vue.d.ts.map +1 -1
- package/dist/components/chat/attachments.d.ts.map +1 -1
- package/dist/components/chat/buildTimelineSegments.d.ts.map +1 -1
- package/dist/components/chat/chatContext.d.ts +5 -1
- package/dist/components/chat/chatContext.d.ts.map +1 -1
- package/dist/components/chat/chatErrors.d.ts +13 -0
- package/dist/components/chat/chatErrors.d.ts.map +1 -1
- package/dist/components/chat/cloudConfig.d.ts +1 -1
- package/dist/components/chat/cloudConfig.d.ts.map +1 -1
- package/dist/components/chat/components/ArtifactPreview.vue.d.ts +1 -0
- package/dist/components/chat/components/ArtifactPreview.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ChatActionbar.vue.d.ts +3 -3
- package/dist/components/chat/components/ChatActionbar.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ChatFileCard.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ChatFilePreview.vue.d.ts +41 -0
- package/dist/components/chat/components/ChatFilePreview.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ChatFilePreviewPanel.vue.d.ts +12 -1
- package/dist/components/chat/components/ChatFilePreviewPanel.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ChatMessage.vue.d.ts +9 -0
- package/dist/components/chat/components/ChatMessage.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ChatProvider.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ChatReasoning.vue.d.ts +4 -1
- package/dist/components/chat/components/ChatReasoning.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ChatSender.vue.d.ts +46 -3
- package/dist/components/chat/components/ChatSender.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ChatSessionHistoryItem.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ChatSkillPanel.vue.d.ts +3 -0
- package/dist/components/chat/components/ChatSkillPanel.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ChatTipMenu.vue.d.ts +22 -12
- package/dist/components/chat/components/ChatTipMenu.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ConversationList.vue.d.ts.map +1 -1
- package/dist/components/chat/components/InputContentParts.vue.d.ts.map +1 -1
- package/dist/components/chat/components/MessageBubble.vue.d.ts +9 -0
- package/dist/components/chat/components/MessageBubble.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ProcessStepGroup.vue.d.ts +11 -2
- package/dist/components/chat/components/ProcessStepGroup.vue.d.ts.map +1 -1
- package/dist/components/chat/components/ReasoningMarkdown.vue.d.ts +8 -0
- package/dist/components/chat/components/ReasoningMarkdown.vue.d.ts.map +1 -0
- package/dist/components/chat/components/SubagentRunDialog.vue.d.ts +20 -0
- package/dist/components/chat/components/SubagentRunDialog.vue.d.ts.map +1 -0
- package/dist/components/chat/components/SubagentRunsPanel.vue.d.ts +9 -0
- package/dist/components/chat/components/SubagentRunsPanel.vue.d.ts.map +1 -0
- package/dist/components/chat/components/TextReferenceChip.vue.d.ts +20 -0
- package/dist/components/chat/components/TextReferenceChip.vue.d.ts.map +1 -0
- package/dist/components/chat/components/ToolCallPart.vue.d.ts.map +1 -1
- package/dist/components/chat/components/WebSearchProcessRow.vue.d.ts +9 -0
- package/dist/components/chat/components/WebSearchProcessRow.vue.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/ContentArea.vue.d.ts +84 -0
- package/dist/components/chat/components/document-viewer/ContentArea.vue.d.ts.map +1 -1
- package/dist/components/chat/components/document-viewer/DocViewerToolbar.vue.d.ts +6 -0
- package/dist/components/chat/components/document-viewer/DocViewerToolbar.vue.d.ts.map +1 -1
- package/dist/components/chat/components/document-viewer/DocumentAskPopup.vue.d.ts +20 -0
- package/dist/components/chat/components/document-viewer/DocumentAskPopup.vue.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/DocumentViewer.vue.d.ts +14 -2
- package/dist/components/chat/components/document-viewer/DocumentViewer.vue.d.ts.map +1 -1
- package/dist/components/chat/components/document-viewer/ScreenshotCropOverlay.vue.d.ts +1 -0
- package/dist/components/chat/components/document-viewer/ScreenshotCropOverlay.vue.d.ts.map +1 -1
- package/dist/components/chat/components/document-viewer/TextSelectionAskOverlay.vue.d.ts +17 -0
- package/dist/components/chat/components/document-viewer/TextSelectionAskOverlay.vue.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/adapter.d.ts +5 -6
- package/dist/components/chat/components/document-viewer/adapter.d.ts.map +1 -1
- package/dist/components/chat/components/document-viewer/displayCapture.d.ts +28 -0
- package/dist/components/chat/components/document-viewer/displayCapture.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/html/HtmlRenderer.vue.d.ts.map +1 -1
- package/dist/components/chat/components/document-viewer/office/DocxPreviewEngine.vue.d.ts +14 -0
- package/dist/components/chat/components/document-viewer/office/DocxPreviewEngine.vue.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/office/OfficeDocumentViewer.vue.d.ts +8 -1
- package/dist/components/chat/components/document-viewer/office/OfficeDocumentViewer.vue.d.ts.map +1 -1
- package/dist/components/chat/components/document-viewer/office/docxChrome.d.ts +54 -0
- package/dist/components/chat/components/document-viewer/office/docxChrome.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/office/domNav.d.ts.map +1 -1
- package/dist/components/chat/components/document-viewer/office/fitDocx.d.ts +8 -0
- package/dist/components/chat/components/document-viewer/office/fitDocx.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/office/officePreviewUrl.d.ts +28 -0
- package/dist/components/chat/components/document-viewer/office/officePreviewUrl.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/screenshotCapture.d.ts +29 -11
- package/dist/components/chat/components/document-viewer/screenshotCapture.d.ts.map +1 -1
- package/dist/components/chat/components/document-viewer/tabCaptureSession.d.ts +17 -0
- package/dist/components/chat/components/document-viewer/tabCaptureSession.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/textSelection.d.ts +23 -0
- package/dist/components/chat/components/document-viewer/textSelection.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/xlsx/parseSpreadsheet.d.ts.map +1 -1
- package/dist/components/chat/components/document-viewer/zip/ZipRenderer.vue.d.ts +26 -0
- package/dist/components/chat/components/document-viewer/zip/ZipRenderer.vue.d.ts.map +1 -0
- package/dist/components/chat/components/document-viewer/zip/parseZipArchive.d.ts +26 -0
- package/dist/components/chat/components/document-viewer/zip/parseZipArchive.d.ts.map +1 -0
- package/dist/components/chat/components/index.d.ts +2 -0
- package/dist/components/chat/components/index.d.ts.map +1 -1
- package/dist/components/chat/composables/useChatSessionSwitch.d.ts.map +1 -1
- package/dist/components/chat/composables/useChatSkillTipMenu.d.ts +4 -2
- package/dist/components/chat/composables/useChatSkillTipMenu.d.ts.map +1 -1
- package/dist/components/chat/composables/useChatTipMenu.d.ts +8 -2
- package/dist/components/chat/composables/useChatTipMenu.d.ts.map +1 -1
- package/dist/components/chat/harness/DisclosureRow.vue.d.ts +1 -0
- package/dist/components/chat/harness/DisclosureRow.vue.d.ts.map +1 -1
- package/dist/components/chat/htmlPreview.d.ts +22 -2
- package/dist/components/chat/htmlPreview.d.ts.map +1 -1
- package/dist/components/chat/hydrateHistory.d.ts +3 -1
- package/dist/components/chat/hydrateHistory.d.ts.map +1 -1
- package/dist/components/chat/index.d.ts +4 -1
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/chat/mdoc/ArtifactBlock.vue.d.ts.map +1 -1
- package/dist/components/chat/mdoc/artifactOpenStrategy.d.ts.map +1 -1
- package/dist/components/chat/mdoc/chatOccurrenceKey.d.ts +4 -0
- package/dist/components/chat/mdoc/chatOccurrenceKey.d.ts.map +1 -0
- package/dist/components/chat/mdoc/latexDelimiters.d.ts +14 -0
- package/dist/components/chat/mdoc/latexDelimiters.d.ts.map +1 -0
- package/dist/components/chat/mdoc/sessionArtifacts.d.ts +1 -1
- package/dist/components/chat/mdoc/sessionArtifacts.d.ts.map +1 -1
- package/dist/components/chat/mdoc/textContent.d.ts +0 -7
- package/dist/components/chat/mdoc/textContent.d.ts.map +1 -1
- package/dist/components/chat/messageChrome.d.ts +13 -3
- package/dist/components/chat/messageChrome.d.ts.map +1 -1
- package/dist/components/chat/previewRenderers.d.ts +2 -0
- package/dist/components/chat/previewRenderers.d.ts.map +1 -1
- package/dist/components/chat/processGroupSummary.d.ts +6 -4
- package/dist/components/chat/processGroupSummary.d.ts.map +1 -1
- package/dist/components/chat/reasoningDisplay.d.ts +6 -0
- package/dist/components/chat/reasoningDisplay.d.ts.map +1 -0
- package/dist/components/chat/responseStream.d.ts +2 -0
- package/dist/components/chat/responseStream.d.ts.map +1 -1
- package/dist/components/chat/sidebarMotion.d.ts +1 -1
- package/dist/components/chat/sidebarMotion.d.ts.map +1 -1
- package/dist/components/chat/subagentAggregate.d.ts +38 -0
- package/dist/components/chat/subagentAggregate.d.ts.map +1 -0
- package/dist/components/chat/subagentDisplay.d.ts +22 -0
- package/dist/components/chat/subagentDisplay.d.ts.map +1 -0
- package/dist/components/chat/textReference.d.ts +20 -0
- package/dist/components/chat/textReference.d.ts.map +1 -0
- package/dist/components/chat/toolLabels.d.ts +2 -0
- package/dist/components/chat/toolLabels.d.ts.map +1 -1
- package/dist/components/chat/types.d.ts +148 -10
- package/dist/components/chat/types.d.ts.map +1 -1
- package/dist/components/chat/useProcessGroupTimer.d.ts +2 -1
- package/dist/components/chat/useProcessGroupTimer.d.ts.map +1 -1
- package/dist/components/chat/utils/tipMenuBuiltin.d.ts +6 -0
- package/dist/components/chat/utils/tipMenuBuiltin.d.ts.map +1 -1
- package/dist/components/skill/components/ChatSkillCard.vue.d.ts.map +1 -1
- package/dist/components/skill/composables/useChatSkills.d.ts +1 -0
- package/dist/components/skill/composables/useChatSkills.d.ts.map +1 -1
- package/dist/components/skill/types.d.ts +21 -2
- package/dist/components/skill/types.d.ts.map +1 -1
- package/dist/components/ui/components/UiMenu.vue.d.ts +5 -1
- package/dist/components/ui/components/UiMenu.vue.d.ts.map +1 -1
- package/dist/components/ui/components/UiMenuColumn.vue.d.ts.map +1 -1
- package/dist/components/ui/components/UiMenuNestedSubmenu.vue.d.ts +2 -0
- package/dist/components/ui/components/UiMenuNestedSubmenu.vue.d.ts.map +1 -1
- package/dist/components/ui/components/UiMenuSubmenuColumn.vue.d.ts +1 -0
- package/dist/components/ui/components/UiMenuSubmenuColumn.vue.d.ts.map +1 -1
- package/dist/components/ui/components/UiMenuSubmenuList.vue.d.ts +2 -0
- package/dist/components/ui/components/UiMenuSubmenuList.vue.d.ts.map +1 -1
- package/dist/{index-BKxbaGuU.js → index-C-PR5B_r.js} +7664 -7648
- package/dist/{index-CT4dZd6h.js → index-CXsyPgZs.js} +83108 -74085
- package/dist/{index-BvdV0Eu0.cjs → index-DaNRGsBs.cjs} +44 -44
- package/dist/index-ti6KNsjh.cjs +1168 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +312 -300
- package/dist/style.css +2 -2
- package/package.json +3 -2
- package/dist/index-Bh4xn5LB.cjs +0 -1
- package/dist/index-BuN8GnS7.js +0 -22
- package/dist/index-CPq9HVwe.cjs +0 -892
- package/dist/index-DHbY1Eq1.cjs +0 -33
- package/dist/index-YIVH2TCo.js +0 -5072
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentViewer.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/chat/components/document-viewer/DocumentViewer.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DocumentViewer.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/chat/components/document-viewer/DocumentViewer.vue"],"names":[],"mappings":"AAmcA,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAkB1F,OAAO,KAAK,EAGV,wBAAwB,EAGzB,MAAM,WAAW,CAAA;AAIlB,KAAK,WAAW,GAAG;IACf,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,IAAI,EAAE,OAAO,CACX,eAAe,EACf,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,KAAK,CACzE,CAAA;IACD;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,sFAAsF;IACtF,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAC;AAmtBJ,QAAA,MAAM,YAAY;;;;;;;;;mBAxtBE,OAAO;eAIX,OAAO;6EAwtBrB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -2,6 +2,7 @@ import type { ViewportRect } from './screenshotCapture';
|
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
/** True while the parent is extracting text or rasterizing the crop. */
|
|
4
4
|
processing?: boolean;
|
|
5
|
+
askLabel?: string;
|
|
5
6
|
};
|
|
6
7
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
8
|
cancel: () => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScreenshotCropOverlay.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/chat/components/document-viewer/ScreenshotCropOverlay.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScreenshotCropOverlay.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/chat/components/document-viewer/ScreenshotCropOverlay.vue"],"names":[],"mappings":"AAqRA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAKvD,KAAK,WAAW,GAAG;IACjB,wEAAwE;IACxE,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAC;AAiQF,QAAA,MAAM,YAAY;;;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** Document surface the selection must live in (engine / capture root). */
|
|
3
|
+
rootEl?: HTMLElement | null;
|
|
4
|
+
/** Hide while the crop tool owns the pointer. */
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
askLabel?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
copy: (text: string) => any;
|
|
10
|
+
ask: (text: string) => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
+
onCopy?: ((text: string) => any) | undefined;
|
|
13
|
+
onAsk?: ((text: string) => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
17
|
+
//# sourceMappingURL=TextSelectionAskOverlay.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextSelectionAskOverlay.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/chat/components/document-viewer/TextSelectionAskOverlay.vue"],"names":[],"mappings":"AAkRA,KAAK,WAAW,GAAG;IACjB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;IAC3B,iDAAiD;IACjD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAC;AAyRF,QAAA,MAAM,YAAY;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* format-agnostic shell (`DocumentViewer.vue`'s `DocViewerToolbar` / `DocViewerSidebar`)
|
|
6
6
|
* never needs to know which renderer is currently active, only its capabilities.
|
|
7
7
|
*/
|
|
8
|
-
/** `paginated`: page-based content (PDF, and future transcoded PPT/Word). `flow`: continuous content (HTML/Markdown/TXT/Excel). */
|
|
8
|
+
/** `paginated`: page-based content (PDF, and future transcoded PPT/Word). `flow`: continuous content (HTML/Markdown/TXT/Excel/ZIP). */
|
|
9
9
|
export type DocumentViewerMode = 'paginated' | 'flow';
|
|
10
10
|
export interface OutlineNode {
|
|
11
11
|
id: string;
|
|
@@ -23,11 +23,10 @@ export interface DocumentLoadResult {
|
|
|
23
23
|
mode: DocumentViewerMode;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
|
-
* Result of
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* cropped PNG meant to be attached like a pasted screenshot.
|
|
26
|
+
* Result of toolbar "截图提问" (always a cropped PNG) or native 划词
|
|
27
|
+
* "问问 AI" (plain text). See `screenshotCapture.ts` and
|
|
28
|
+
* `TextSelectionAskOverlay`. Text becomes a composer reference chip
|
|
29
|
+
* (`setTextReference`); images attach like a pasted screenshot.
|
|
31
30
|
*/
|
|
32
31
|
export type DocumentScreenshotResult = {
|
|
33
32
|
type: 'text';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../../src/components/chat/components/document-viewer/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../../src/components/chat/components/document-viewer/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,uIAAuI;AACvI,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,MAAM,CAAA;AAErD,MAAM,WAAW,WAAW;IAC1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AAQ,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,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pixel-accurate capture of whatever the compositor actually painted.
|
|
3
|
+
*
|
|
4
|
+
* html2canvas / DOM cloning cannot reproduce iframes, CSS filters, canvas,
|
|
5
|
+
* video, or transformed Word pages. Browsers solve this with the Screen
|
|
6
|
+
* Capture API plus Chrome's Element Capture (`RestrictionTarget`) or Region
|
|
7
|
+
* Capture (`CropTarget`): grab the current tab's painted frames, then restrict
|
|
8
|
+
* the stream to the preview element so iframe HTML and overlays are handled
|
|
9
|
+
* by the compositor, not a second renderer.
|
|
10
|
+
*
|
|
11
|
+
* @see https://developer.chrome.com/docs/web-platform/element-capture
|
|
12
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Screen_Capture_API/Element_Region_Capture
|
|
13
|
+
*/
|
|
14
|
+
import type { ViewportRect } from './screenshotCapture';
|
|
15
|
+
export interface TabElementCapture {
|
|
16
|
+
grabCrop(rect: ViewportRect, filename: string): Promise<File | null>;
|
|
17
|
+
stop(): void;
|
|
18
|
+
}
|
|
19
|
+
/** Map a viewport-space crop onto a canvas that already matches `element`. */
|
|
20
|
+
export declare function cropCanvasToElementRect(source: HTMLCanvasElement, element: HTMLElement, rect: ViewportRect): HTMLCanvasElement | null;
|
|
21
|
+
/**
|
|
22
|
+
* Prompt for current-tab capture (Chrome shows only this tab when
|
|
23
|
+
* `preferCurrentTab` is set) and pin the stream to `element`. Returns null
|
|
24
|
+
* when the API is missing, the user cancels, or the track cannot be restricted
|
|
25
|
+
* — callers then fall back to format-specific rasterizers.
|
|
26
|
+
*/
|
|
27
|
+
export declare function startTabElementCapture(element: HTMLElement): Promise<TabElementCapture | null>;
|
|
28
|
+
//# sourceMappingURL=displayCapture.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"displayCapture.d.ts","sourceRoot":"","sources":["../../../../../src/components/chat/components/document-viewer/displayCapture.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAEvD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,CAAA;IACpE,IAAI,IAAI,IAAI,CAAA;CACb;AA8BD,8EAA8E;AAC9E,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,YAAY,GACjB,iBAAiB,GAAG,IAAI,CA2B1B;AA6CD;;;;;GAKG;AACH,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CA0EnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HtmlRenderer.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/components/document-viewer/html/HtmlRenderer.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HtmlRenderer.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/components/document-viewer/html/HtmlRenderer.vue"],"names":[],"mappings":"AAyKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAUjE,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,CAAA;CAC3B,CAAC;AA0DF,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,CAEzC;AAED,iBAAS,QAAQ,IAAI,IAAI,CAOxB;AAiFD,QAAA,MAAM,YAAY;;;;;;;;;;;kFAIhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
src: string | ArrayBuffer | Blob;
|
|
3
|
+
requestOptions?: Parameters<typeof fetch>[1];
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
error: (error: unknown) => any;
|
|
7
|
+
rendered: () => any;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
onError?: ((error: unknown) => any) | undefined;
|
|
10
|
+
onRendered?: (() => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
//# sourceMappingURL=DocxPreviewEngine.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocxPreviewEngine.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/components/document-viewer/office/DocxPreviewEngine.vue"],"names":[],"mappings":"AAiFA,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAAA;IAChC,cAAc,CAAC,EAAE,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;CAC7C,CAAC;AAqFF,QAAA,MAAM,YAAY;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
package/dist/components/chat/components/document-viewer/office/OfficeDocumentViewer.vue.d.ts
CHANGED
|
@@ -3,6 +3,10 @@ import type { DocumentScreenshotResult } from '../adapter';
|
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
resource: ChatResourceFile;
|
|
5
5
|
kind: 'docx' | 'pptx';
|
|
6
|
+
/** See `DocumentViewer` — set `false` to embed as a pure file preview. */
|
|
7
|
+
screenshotAsk?: boolean;
|
|
8
|
+
askLabel?: string;
|
|
9
|
+
hideClose?: boolean;
|
|
6
10
|
};
|
|
7
11
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
12
|
close: () => any;
|
|
@@ -10,7 +14,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
10
14
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
15
|
onClose?: (() => any) | undefined;
|
|
12
16
|
"onScreenshot-result"?: ((result: DocumentScreenshotResult) => any) | undefined;
|
|
13
|
-
}>, {
|
|
17
|
+
}>, {
|
|
18
|
+
screenshotAsk: boolean;
|
|
19
|
+
hideClose: boolean;
|
|
20
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
21
|
declare const _default: typeof __VLS_export;
|
|
15
22
|
export default _default;
|
|
16
23
|
//# sourceMappingURL=OfficeDocumentViewer.vue.d.ts.map
|
package/dist/components/chat/components/document-viewer/office/OfficeDocumentViewer.vue.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OfficeDocumentViewer.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/components/document-viewer/office/OfficeDocumentViewer.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OfficeDocumentViewer.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/components/document-viewer/office/OfficeDocumentViewer.vue"],"names":[],"mappings":"AAseA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AActD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AAS1D,KAAK,WAAW,GAAG;IACf,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;IACrB,0EAA0E;IAC1E,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAC;AAolBJ,QAAA,MAAM,YAAY;;;;;;;mBAvlBE,OAAO;eAEX,OAAO;6EAylBrB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Word HTML from `docx-preview` is almost entirely inline CSS, then dropped
|
|
3
|
+
* into the chat sidebar's light DOM. WPS/Word exports still look wrong because:
|
|
4
|
+
*
|
|
5
|
+
* 1. Table borders omit `w:color`. Word treats that as auto/black; the renderer
|
|
6
|
+
* emits `border: 0.5pt solid null`. CSSOM rejects the invalid shorthand, so
|
|
7
|
+
* the style never lands on the element (repairing `solid null` in the
|
|
8
|
+
* attribute afterwards is a no-op).
|
|
9
|
+
* 2. Most style keys are kebab-case (`background-color`, `font-family`).
|
|
10
|
+
* `Object.assign(el.style, …)` drops those on WebKit, which wipes fills,
|
|
11
|
+
* zebra rows, fonts, and paragraph spacing in one go.
|
|
12
|
+
* 3. CJK faces (黑体/仿宋) are named but not installed on macOS. A Calibri
|
|
13
|
+
* `@font-face` that lists PingFang in `src` also paints 汉字 with the Latin
|
|
14
|
+
* family's first available face.
|
|
15
|
+
* 4. Built-in Heading/Title are often omitted from `styles.xml`.
|
|
16
|
+
* 5. ChatBot dark `color-scheme` and host resets (`* { box-sizing }`,
|
|
17
|
+
* `table { width }`, `p { margin }`) leak into the page.
|
|
18
|
+
* 6. WPS Normal is ~single spacing in XML (`line=259`) but CJK metrics make
|
|
19
|
+
* CSS `line-height: 1.08` look cramped; body paragraphs often omit
|
|
20
|
+
* `w:ind` even when the editor shows a two-character first line.
|
|
21
|
+
*/
|
|
22
|
+
export declare const DOCX_CHROME_STYLE_ATTR = "data-docx-chrome";
|
|
23
|
+
export type DocxHNode = {
|
|
24
|
+
ns?: string;
|
|
25
|
+
tagName: string;
|
|
26
|
+
className?: string;
|
|
27
|
+
style?: Record<string, string | null | undefined> | string;
|
|
28
|
+
children?: Array<DocxHNode | Node | string>;
|
|
29
|
+
} & Record<string, unknown>;
|
|
30
|
+
export declare function docxChromeCss(className?: string): string;
|
|
31
|
+
export declare function toKebabCase(property: string): string;
|
|
32
|
+
export declare function splitFontList(fontFamily: string): string[];
|
|
33
|
+
/** Put named CJK faces before Calibri/Times so 汉字 don't render with a Latin face. */
|
|
34
|
+
export declare function preferCjkFontFamily(fontFamily: string): string;
|
|
35
|
+
export declare function withCjkFontFallbacks(fontFamily: string): string;
|
|
36
|
+
export declare function sanitizeCssValue(property: string, value: string): string;
|
|
37
|
+
export declare function serializeDocxStyle(style: Record<string, string | null | undefined> | string): string;
|
|
38
|
+
/**
|
|
39
|
+
* Replaces docx-preview's default `h`. Writing CSS via the `style` attribute
|
|
40
|
+
* (kebab-case, sanitized) keeps fills / borders / fonts / spacing even when
|
|
41
|
+
* CSSOM would reject `solid null` or ignore hyphenated Object.assign keys.
|
|
42
|
+
*/
|
|
43
|
+
export declare function createDocxHyperscript(): (elem: DocxHNode | Node | string) => Node;
|
|
44
|
+
/** Word treats a missing border color as auto/black; the HTML renderer emits `solid null`. */
|
|
45
|
+
export declare function repairInvalidBorders(root: ParentNode): number;
|
|
46
|
+
/**
|
|
47
|
+
* CSSOM drops invalid `solid null` before it ever becomes an attribute, so
|
|
48
|
+
* WPS tables with `tblBorders` and no `w:color` render with zero lines.
|
|
49
|
+
* Restore a Word-auto hairline on cells that ended up borderless.
|
|
50
|
+
* Skip cells that already declared `border: none` (`w:val="nil"`).
|
|
51
|
+
*/
|
|
52
|
+
export declare function ensureTableCellBorders(root: ParentNode): number;
|
|
53
|
+
export declare function applyDocxChrome(root: HTMLElement, className?: string): void;
|
|
54
|
+
//# sourceMappingURL=docxChrome.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docxChrome.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/components/document-viewer/office/docxChrome.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,eAAO,MAAM,sBAAsB,qBAAqB,CAAA;AAqDxD,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,GAAG,MAAM,CAAA;IAC1D,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,GAAG,MAAM,CAAC,CAAA;CAC5C,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AA0G3B,wBAAgB,aAAa,CAAC,SAAS,SAAS,GAAG,MAAM,CAExD;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGpD;AAED,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CA0B1D;AAYD,qFAAqF;AACrF,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAW9D;AAED,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAO/D;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAUxE;AAED,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,GAAG,MAAM,GACxD,MAAM,CAWR;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,GAAG,MAAM,KAAK,IAAI,CA0BjF;AAED,8FAA8F;AAC9F,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAa7D;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAW/D;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,WAAW,EAAE,SAAS,SAAS,GAAG,IAAI,CAU3E"}
|
|
@@ -1 +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;
|
|
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;AAqBD,qFAAqF;AACrF,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,WAAW,GAAG,eAAe,EAAE,CAkBvE;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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Word pages and PPT slides are laid out at their engine size and then scaled
|
|
3
|
+
* to the sidebar width. Scaling only the first page — or using
|
|
4
|
+
* `transform-origin: top center` inside a narrower wrapper — is what made
|
|
5
|
+
* multi-page documents look like they had "lost" their layout.
|
|
6
|
+
*/
|
|
7
|
+
export declare function fitPagesToWidth(wrapper: HTMLElement, pages: HTMLElement[], zoom: number): number;
|
|
8
|
+
//# sourceMappingURL=fitDocx.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fitDocx.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/components/document-viewer/office/fitDocx.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAyBhG"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ChatResourceFile } from '../../../types';
|
|
2
|
+
/** Enterprise OnlyOffice (kkFileView) preview endpoint. */
|
|
3
|
+
export declare const OFFICE_PREVIEW_ENDPOINT = "https://api.yxuer.com:8443/officeView/onlinePreview";
|
|
4
|
+
/**
|
|
5
|
+
* Percent-encode each path segment so Chinese filenames become `%E8%83%8C...`
|
|
6
|
+
* before Base64 — matching the known-good enterprise preview URL.
|
|
7
|
+
* Already-encoded segments are normalized (decode → encode), not double-encoded.
|
|
8
|
+
*/
|
|
9
|
+
export declare function encodeOfficeFileUrl(fileUrl: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* `fileName` + `.` + `fileExt` from the Android snippet, without doubling
|
|
12
|
+
* the extension when `fileName` already ends with it.
|
|
13
|
+
*/
|
|
14
|
+
export declare function officePreviewFullFilename(fileName: string, fileExt: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Builds the enterprise OnlyOffice preview URL.
|
|
17
|
+
*
|
|
18
|
+
* Known-good production form:
|
|
19
|
+
* `onlinePreview?url=<Base64(percentEncodedFileUrl)>&officePreviewType=pdf`
|
|
20
|
+
*
|
|
21
|
+
* When the file URL has no usable extension, also appends
|
|
22
|
+
* `&fullfilename=name.ext` inside the Base64 payload (kkFileView / Android contract).
|
|
23
|
+
*/
|
|
24
|
+
export declare function buildOfficePreviewUrl(fileUrl: string, fileName: string, fileExt: string, endpoint?: string): string;
|
|
25
|
+
export declare function buildOfficePreviewUrlFromResource(resource: ChatResourceFile, endpoint?: string): string;
|
|
26
|
+
/** Test / debug helper: reverse the `url` query param back to the raw payload. */
|
|
27
|
+
export declare function decodeOfficePreviewPayload(previewUrl: string): string;
|
|
28
|
+
//# sourceMappingURL=officePreviewUrl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"officePreviewUrl.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/components/document-viewer/office/officePreviewUrl.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAEtD,2DAA2D;AAC3D,eAAO,MAAM,uBAAuB,wDAAwD,CAAA;AAiB5F;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAkB3D;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAMnF;AAYD;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,QAAQ,SAA0B,GACjC,MAAM,CAQR;AAED,wBAAgB,iCAAiC,CAC/C,QAAQ,EAAE,gBAAgB,EAC1B,QAAQ,SAA0B,GACjC,MAAM,CAGR;AAED,kFAAkF;AAClF,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAIrE"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Helpers behind the toolbar's "截图提问" crop tool.
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* Helpers behind the toolbar's "截图提问" crop tool. A dragged rectangle
|
|
3
|
+
* (viewport/client-space, matching `PointerEvent.clientX/clientY`) always
|
|
4
|
+
* becomes a PNG. Native 划词 ("问问 AI") is a separate overlay and is the
|
|
5
|
+
* only path that returns plain text.
|
|
5
6
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* directly; everything else falls back to lazy-loaded `html2canvas`.
|
|
7
|
+
* HTML/Word/Excel/Markdown go through Chrome Element/Region Capture of the
|
|
8
|
+
* live tab (compositor pixels, including sandboxed iframes). html2canvas is
|
|
9
|
+
* only a fallback when the user declines screen sharing or the API is missing.
|
|
10
10
|
*/
|
|
11
|
+
import type { TabElementCapture } from './displayCapture';
|
|
11
12
|
import type { DocumentScreenshotResult } from './adapter';
|
|
12
13
|
export interface ViewportRect {
|
|
13
14
|
left: number;
|
|
@@ -16,15 +17,18 @@ export interface ViewportRect {
|
|
|
16
17
|
height: number;
|
|
17
18
|
}
|
|
18
19
|
export interface ResolveCropOptions {
|
|
19
|
-
/** When true,
|
|
20
|
+
/** When true, crop PDF page canvases directly before falling back. */
|
|
20
21
|
pdf?: boolean;
|
|
22
|
+
/** Live tab capture pinned to the preview element (Chrome Element/Region Capture). */
|
|
23
|
+
displayCapture?: TabElementCapture | null;
|
|
21
24
|
}
|
|
22
25
|
/** Warm up html2canvas while the user is drawing their selection. */
|
|
23
26
|
export declare function preloadHtml2Canvas(): void;
|
|
24
27
|
/**
|
|
25
28
|
* Tries the main document first, then any iframe whose box intersects `rect`.
|
|
26
|
-
*
|
|
27
|
-
*
|
|
29
|
+
* HTML previews use `sandbox="allow-scripts"` only, so `contentDocument` is
|
|
30
|
+
* null — opaque frames are not readable here. 划词 uses `readDocumentSelection`
|
|
31
|
+
* instead of this helper.
|
|
28
32
|
*/
|
|
29
33
|
export declare function extractTextInRect(rect: ViewportRect, iframes?: readonly HTMLIFrameElement[]): string;
|
|
30
34
|
/**
|
|
@@ -37,13 +41,27 @@ export declare function extractPdfTextInRect(containerEl: HTMLElement, rect: Vie
|
|
|
37
41
|
* re-rasterizing the whole viewer through html2canvas.
|
|
38
42
|
*/
|
|
39
43
|
export declare function capturePdfCanvasInRect(containerEl: HTMLElement, rect: ViewportRect, filename: string): Promise<File | null>;
|
|
44
|
+
/**
|
|
45
|
+
* `OfficeDocumentViewer` fits Word pages and PPT slides with inline
|
|
46
|
+
* `transform: scale(...)`. html2canvas cannot paint that transform (the clone
|
|
47
|
+
* comes out empty, and against a dark chat canvas that reads as an all-black
|
|
48
|
+
* PNG), so callers flatten it in `onclone` and pass crop coordinates in
|
|
49
|
+
* unscaled layout space.
|
|
50
|
+
*/
|
|
51
|
+
export declare function readCssScale(el: HTMLElement): number;
|
|
40
52
|
/**
|
|
41
53
|
* Rasterizes just the `rect` region of `containerEl` via html2canvas.
|
|
42
54
|
* Returns `null` if the crop ends up empty/degenerate.
|
|
55
|
+
*
|
|
56
|
+
* Word pages and PPT slides are captured from the scaled page wrapper (not
|
|
57
|
+
* the crop overlay) with CSS scale flattened; otherwise html2canvas paints
|
|
58
|
+
* an all-black image.
|
|
43
59
|
*/
|
|
44
60
|
export declare function captureImageInRect(containerEl: HTMLElement, rect: ViewportRect, filename: string): Promise<File | null>;
|
|
45
61
|
/**
|
|
46
|
-
* Full crop resolution:
|
|
62
|
+
* Full crop resolution: PDF canvas (already compositor-backed) → live tab
|
|
63
|
+
* capture of the preview element → iframe snapshot / html2canvas fallback.
|
|
64
|
+
* Always a PNG — text excerpts come from 划词, not this tool.
|
|
47
65
|
*/
|
|
48
66
|
export declare function resolveDocumentCropResult(containerEl: HTMLElement, rect: ViewportRect, filename: string, options?: ResolveCropOptions): Promise<DocumentScreenshotResult | null>;
|
|
49
67
|
//# sourceMappingURL=screenshotCapture.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screenshotCapture.d.ts","sourceRoot":"","sources":["../../../../../src/components/chat/components/document-viewer/screenshotCapture.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAA;AAEzD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC,
|
|
1
|
+
{"version":3,"file":"screenshotCapture.d.ts","sourceRoot":"","sources":["../../../../../src/components/chat/components/document-viewer/screenshotCapture.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEzD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAA;AAEzD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC,sEAAsE;IACtE,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,sFAAsF;IACtF,cAAc,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAA;CAC1C;AAMD,qEAAqE;AACrE,wBAAgB,kBAAkB,IAAI,IAAI,CAEzC;AA+DD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,YAAY,EAClB,OAAO,GAAE,SAAS,iBAAiB,EAAO,GACzC,MAAM,CAqBR;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,YAAY,GAAG,MAAM,CA+BzF;AA8BD;;;GAGG;AACH,wBAAsB,sBAAsB,CAC1C,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,YAAY,EAClB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,CAuDtB;AAYD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,EAAE,EAAE,WAAW,GAAG,MAAM,CAepD;AAgCD;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CACtC,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,YAAY,EAClB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,CAoDtB;AA2LD;;;;GAIG;AACH,wBAAsB,yBAAyB,CAC7C,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,YAAY,EAClB,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,wBAAwB,GAAG,IAAI,CAAC,CAqB1C"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Crop-session wrapper around `startTabElementCapture`. Lives in its own
|
|
3
|
+
* module so viewer tests can mock `displayCapture` and still intercept the
|
|
4
|
+
* live-tab prompt (same-file calls would not see a `vi.spyOn`).
|
|
5
|
+
*
|
|
6
|
+
* `start` must run from the toolbar click (transient user activation). It
|
|
7
|
+
* sets `inflight` before returning so a fast "问问 AI" can `ready()`-wait
|
|
8
|
+
* for compositor pixels instead of racing into html2canvas.
|
|
9
|
+
*/
|
|
10
|
+
import { type TabElementCapture } from './displayCapture';
|
|
11
|
+
export type TabCaptureSession = ReturnType<typeof createTabCaptureSession>;
|
|
12
|
+
export declare function createTabCaptureSession(): {
|
|
13
|
+
start(element: HTMLElement | null | undefined): Promise<void>;
|
|
14
|
+
stop(): void;
|
|
15
|
+
ready(): Promise<TabElementCapture | null>;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=tabCaptureSession.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabCaptureSession.d.ts","sourceRoot":"","sources":["../../../../../src/components/chat/components/document-viewer/tabCaptureSession.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAA0B,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEjF,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAE1E,wBAAgB,uBAAuB;mBAMd,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;YAiB3D,IAAI;aAKG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;EAMnD"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Native text selection inside the document viewer ("划词提问").
|
|
3
|
+
* Complements the crop tool: screenshot-ask always captures a PNG;
|
|
4
|
+
* highlighting real text skips html2canvas and hands the string to the
|
|
5
|
+
* same `screenshot-result` path.
|
|
6
|
+
*/
|
|
7
|
+
import type { ViewportRect } from './screenshotCapture';
|
|
8
|
+
import { type HtmlSelectionRect } from '../../htmlPreview';
|
|
9
|
+
export interface DocumentTextSelection {
|
|
10
|
+
text: string;
|
|
11
|
+
rect: ViewportRect;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Reads the current native selection if it lives inside `root` (or a
|
|
15
|
+
* same-origin iframe nested in `root`). Coordinates are viewport/client-space.
|
|
16
|
+
*/
|
|
17
|
+
export declare function readDocumentSelection(root: HTMLElement): DocumentTextSelection | null;
|
|
18
|
+
export declare function iframeForMessageSource(root: HTMLElement, source: MessageEventSource | null): HTMLIFrameElement | null;
|
|
19
|
+
export declare function selectionFromIframeMessage(iframe: HTMLIFrameElement, text: string, rect: HtmlSelectionRect): DocumentTextSelection;
|
|
20
|
+
export declare function clearDocumentSelection(root: HTMLElement | null | undefined): void;
|
|
21
|
+
/** Position a floating ask/copy popup relative to `origin` (the overlay host). */
|
|
22
|
+
export declare function popupStyleForRect(origin: DOMRect, rect: ViewportRect, popupHeight?: number): Record<string, string>;
|
|
23
|
+
//# sourceMappingURL=textSelection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textSelection.d.ts","sourceRoot":"","sources":["../../../../../src/components/chat/components/document-viewer/textSelection.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAA6B,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAErF,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,YAAY,CAAA;CACnB;AAyDD;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,WAAW,GAAG,qBAAqB,GAAG,IAAI,CAuBrF;AAED,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,WAAW,EACjB,MAAM,EAAE,kBAAkB,GAAG,IAAI,GAChC,iBAAiB,GAAG,IAAI,CAM1B;AAED,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,iBAAiB,EACzB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,iBAAiB,GACtB,qBAAqB,CAWvB;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAejF;AAED,kFAAkF;AAClF,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,YAAY,EAClB,WAAW,SAAK,GACf,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAUxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseSpreadsheet.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/components/document-viewer/xlsx/parseSpreadsheet.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,EAAE,EAAE,CAAA;CACjB;AAkBD;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,EAAE;IAC9C,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"parseSpreadsheet.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/components/document-viewer/xlsx/parseSpreadsheet.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,EAAE,EAAE,CAAA;CACjB;AAkBD;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,EAAE;IAC9C,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAoB9B"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ChatResourceFile, ConversationUiAction } 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
|
+
action: (payload: ConversationUiAction) => any;
|
|
18
|
+
loaded: (result: DocumentLoadResult) => any;
|
|
19
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
20
|
+
onError?: ((error: Error) => any) | undefined;
|
|
21
|
+
onAction?: ((payload: ConversationUiAction) => any) | undefined;
|
|
22
|
+
onLoaded?: ((result: DocumentLoadResult) => any) | undefined;
|
|
23
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
26
|
+
//# sourceMappingURL=ZipRenderer.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ZipRenderer.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/components/document-viewer/zip/ZipRenderer.vue"],"names":[],"mappings":"AAmaA,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAI5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAcjE,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,CAAA;CAC3B,CAAC;AA4EF,iBAAe,IAAI,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAejD;AAED,iBAAe,UAAU,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAQlD;AAED,iBAAS,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAGzC;AAED,iBAAS,QAAQ,IAAI,IAAI,CAOxB;AAgXD,QAAA,MAAM,YAAY;;;;;;;;;;;;;kFAIhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const ZIP_LISTING_LIMIT = 5000;
|
|
2
|
+
export declare const ZIP_PREVIEW_MAX_BYTES: number;
|
|
3
|
+
export interface ZipListingEntry {
|
|
4
|
+
/** File path (`docs/a.md`) or directory path with trailing slash (`docs/`). */
|
|
5
|
+
path: string;
|
|
6
|
+
/** Basename (`a.md` / `docs`). */
|
|
7
|
+
name: string;
|
|
8
|
+
/** Parent directory path (`docs/` or `''` for root). */
|
|
9
|
+
parent: string;
|
|
10
|
+
isDirectory: boolean;
|
|
11
|
+
/** Uncompressed size; 0 for directories. */
|
|
12
|
+
size: number;
|
|
13
|
+
}
|
|
14
|
+
export interface ZipListing {
|
|
15
|
+
entries: ZipListingEntry[];
|
|
16
|
+
truncated: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Lists zip members by scanning the central directory without decompressing
|
|
20
|
+
* file bodies. Directories that only exist as path prefixes are synthesized.
|
|
21
|
+
*/
|
|
22
|
+
export declare function listZipEntries(buffer: ArrayBuffer, limit?: number): ZipListing;
|
|
23
|
+
export declare function extractZipFile(buffer: ArrayBuffer, path: string): Uint8Array;
|
|
24
|
+
export declare function childrenOf(entries: readonly ZipListingEntry[], dir: string): ZipListingEntry[];
|
|
25
|
+
export declare function formatZipSize(bytes: number): string;
|
|
26
|
+
//# sourceMappingURL=parseZipArchive.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseZipArchive.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/components/document-viewer/zip/parseZipArchive.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,iBAAiB,OAAO,CAAA;AACrC,eAAO,MAAM,qBAAqB,QAAmB,CAAA;AAErD,MAAM,WAAW,eAAe;IAC9B,+EAA+E;IAC/E,IAAI,EAAE,MAAM,CAAA;IACZ,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,wDAAwD;IACxD,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,OAAO,CAAA;IACpB,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,eAAe,EAAE,CAAA;IAC1B,SAAS,EAAE,OAAO,CAAA;CACnB;AAsDD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,SAAoB,GAAG,UAAU,CAwCzF;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,CAe5E;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,SAAS,eAAe,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,eAAe,EAAE,CAE9F;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQnD"}
|
|
@@ -35,6 +35,8 @@ export { default as OpenGenerativeUiThemeRenderer } from './OpenGenerativeUiThem
|
|
|
35
35
|
export { default as OpenGenUIToolRenderer } from './OpenGenUIToolRenderer.vue';
|
|
36
36
|
export { default as ProcessResultCard } from './ProcessResultCard.vue';
|
|
37
37
|
export { default as ProcessStepGroup } from './ProcessStepGroup.vue';
|
|
38
|
+
export { default as SubagentRunsPanel } from './SubagentRunsPanel.vue';
|
|
39
|
+
export { default as WebSearchProcessRow } from './WebSearchProcessRow.vue';
|
|
38
40
|
export { default as ThinkingOrb } from './ThinkingOrb.vue';
|
|
39
41
|
export { default as SearchToolRenderer } from './SearchToolRenderer.vue';
|
|
40
42
|
export { default as EmptyState } from './EmptyState.vue';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oBAAoB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AO;iCAmFT,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC;8BAZjC,IAAI;
|
|
1
|
+
{"version":3,"file":"useChatSessionSwitch.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/composables/useChatSessionSwitch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAE7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAErD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAE7C,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,GAAG,CAAC,eAAe,CAAC,CAAA;IAC3B,UAAU,EAAE,GAAG,CAAC,aAAa,GAAG,IAAI,CAAC,CAAA;IACrC,cAAc,EAAE,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IAClC,OAAO,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IAChC,mBAAmB,EAAE,MAAM,IAAI,CAAA;CAChC;AAUD,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,2BAA2B;;;;;gCAcpC,MAAM,KAAG,OAAO;iCAmFT,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC;8BAZjC,IAAI;mCAoHS,MAAM,GAAG,IAAI,SAAS,MAAM,GAAG,IAAI,KAAG,OAAO,CAAC,IAAI,CAAC;gCApL9D,IAAI;EA+MtC"}
|
|
@@ -5,6 +5,8 @@ export interface UseChatSkillTipMenuOptions {
|
|
|
5
5
|
open: Ref<boolean>;
|
|
6
6
|
fetchConfig: Ref<ChatSkillFetchConfig | undefined> | ComputedRef<ChatSkillFetchConfig | undefined>;
|
|
7
7
|
tipMenuItems: Ref<ChatTipMenuItems> | ComputedRef<ChatTipMenuItems>;
|
|
8
|
+
/** false 时隐藏全部 builtin 子菜单搜索框(可被单项 searchable: false 叠加) */
|
|
9
|
+
submenuSearchable?: Ref<boolean> | ComputedRef<boolean>;
|
|
8
10
|
onUpload: () => void;
|
|
9
11
|
onScreenshot: () => void;
|
|
10
12
|
onSelectExpert: (item: ChatTipMenuSubItem) => void;
|
|
@@ -23,8 +25,8 @@ declare const SUBMENU_ITEM_IDS: {
|
|
|
23
25
|
type SubmenuItemId = (typeof SUBMENU_ITEM_IDS)[keyof typeof SUBMENU_ITEM_IDS];
|
|
24
26
|
export declare function useChatSkillTipMenu(options: UseChatSkillTipMenuOptions): {
|
|
25
27
|
builtinMenuItems: ComputedRef<UiMenuItem[]>;
|
|
26
|
-
searchActiveItem: (
|
|
27
|
-
onSubmenuOpen: (itemId: string) => void;
|
|
28
|
+
searchActiveItem: (submenuId: string, keyword: string) => void;
|
|
29
|
+
onSubmenuOpen: (itemId: string, path?: string) => void;
|
|
28
30
|
loadMoreItem: (itemId: string) => void;
|
|
29
31
|
handleSubmenuSelect: (itemId: string, subItem: ChatTipMenuSubItem) => void;
|
|
30
32
|
addSubmenuSelection: (itemId: SubmenuItemId, subItemId: string) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChatSkillTipMenu.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/composables/useChatSkillTipMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,WAAW,EAAE,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AACtE,OAAO,
|
|
1
|
+
{"version":3,"file":"useChatSkillTipMenu.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/composables/useChatSkillTipMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,WAAW,EAAE,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AACtE,OAAO,EAWL,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EAKxB,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EAAE,UAAU,EAAgC,MAAM,gBAAgB,CAAA;AAE9E,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,GAAG,CAAC,OAAO,CA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7 @@ import { type ComputedRef, type MaybeRefOrGetter, type Ref } from 'vue';
|
|
|
2
2
|
import type { UiDropdownMenuItem } from '../../ui/types';
|
|
3
3
|
import { type ChatSkillFetchConfig, type ChatTipMenuItems, type ChatTipMenuSubItem } from '../../skill';
|
|
4
4
|
import type { UiMenuPlacement } from '../../ui/composables';
|
|
5
|
+
import type { ChatTipMenuUiMenuProps, ChatTipMenuBuiltinKind } from '../types';
|
|
5
6
|
export interface UseChatTipMenuOptions {
|
|
6
7
|
fetchConfig?: MaybeRefOrGetter<ChatSkillFetchConfig | undefined>;
|
|
7
8
|
tipMenuItems?: MaybeRefOrGetter<ChatTipMenuItems>;
|
|
@@ -13,6 +14,8 @@ export interface UseChatTipMenuOptions {
|
|
|
13
14
|
open?: Ref<boolean>;
|
|
14
15
|
/** 与宿主共享 trigger 元素(绑定到 button ref) */
|
|
15
16
|
triggerRef?: Ref<HTMLElement | null>;
|
|
17
|
+
/** 透传给内层 `UiMenu`;与 `placement` / `submenuPlacement` 合并,单独字段优先。 */
|
|
18
|
+
menuProps?: MaybeRefOrGetter<ChatTipMenuUiMenuProps | undefined>;
|
|
16
19
|
placement?: MaybeRefOrGetter<UiMenuPlacement>;
|
|
17
20
|
submenuPlacement?: MaybeRefOrGetter<UiMenuPlacement>;
|
|
18
21
|
onUpload?: () => void;
|
|
@@ -25,6 +28,8 @@ export interface UseChatTipMenuOptions {
|
|
|
25
28
|
onMenuItemClick?: (itemId: string) => void;
|
|
26
29
|
/** custom 项子菜单展开时回调(含多级 path,如 `move/folder1`) */
|
|
27
30
|
onCustomSubmenuOpen?: (itemId: string, path?: string) => void;
|
|
31
|
+
/** custom 子菜单搜索(含多级 path,如 `knowledge/type-2`) */
|
|
32
|
+
onCustomSubmenuSearch?: (submenuId: string, keyword: string) => void;
|
|
28
33
|
onOpen?: () => void;
|
|
29
34
|
onClose?: () => void;
|
|
30
35
|
}
|
|
@@ -46,8 +51,9 @@ export declare function useChatTipMenu(options: UseChatTipMenuOptions): {
|
|
|
46
51
|
close: () => void;
|
|
47
52
|
openMenu: () => void;
|
|
48
53
|
triggerAttrs: ComputedRef<ChatTipMenuTriggerAttrs>;
|
|
49
|
-
addSubmenuSelection: (itemId: "skill" | "
|
|
50
|
-
clearSubmenuSelection: (itemId: "skill" | "
|
|
54
|
+
addSubmenuSelection: (itemId: "skill" | "knowledge" | "expert", subItemId: string) => void;
|
|
55
|
+
clearSubmenuSelection: (itemId: "skill" | "knowledge" | "expert", subItemId?: string) => void;
|
|
56
|
+
searchTipMenu: (submenuId: ChatTipMenuBuiltinKind | string, keyword: string) => void;
|
|
51
57
|
};
|
|
52
58
|
export type UseChatTipMenuReturn = ReturnType<typeof useChatTipMenu>;
|
|
53
59
|
//# sourceMappingURL=useChatTipMenu.d.ts.map
|