@a3s-lab/office 0.2.2 → 0.4.0
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/COLLABORATION_ROADMAP.md +426 -0
- package/README.md +649 -10
- package/dist/0~1403.js +1 -1
- package/dist/0~2805.js +1279 -0
- package/dist/{0~use-office-draft.js → 0~345.js} +30 -1
- package/dist/0~3539.js +1 -1
- package/dist/0~3557.js +1 -1
- package/dist/0~3635.js +1 -1
- package/dist/0~4595.js +123 -12
- package/dist/0~4980.js +154 -0
- package/dist/0~5050.js +124 -113
- package/dist/{0~9512.js → 0~6090.js} +540 -3
- package/dist/0~7048.js +92 -66
- package/dist/0~7614.js +2 -1
- package/dist/0~7754.js +5653 -0
- package/dist/0~9445.js +1 -1
- package/dist/0~document-editor.js +4992 -3323
- package/dist/0~markdown-editor.js +250 -44
- package/dist/0~pdf-viewer.js +1016 -24
- package/dist/0~presentation-editor.js +179 -8
- package/dist/0~spreadsheet-editor.js +3371 -578
- package/dist/0~work-docx-export.js +6801 -658
- package/dist/0~work-docx-import.js +1388 -795
- package/dist/0~work-office-diagnostics.js +524 -30
- package/dist/0~work-pptx-export.js +2 -1
- package/dist/0~work-pptx-import.js +1 -2
- package/dist/0~work-presentation-charts.js +1 -1
- package/dist/2591.js +197 -0
- package/dist/3818.js +1090 -0
- package/dist/4104.js +970 -60
- package/dist/432.js +171 -14
- package/dist/4476.js +2008 -0
- package/dist/4560.js +674 -0
- package/dist/4650.js +70 -0
- package/dist/{1134.js → 5184.js} +183 -1
- package/dist/6489.js +18 -18
- package/dist/7060.js +132 -0
- package/dist/8715.js +2 -136
- package/dist/8928.js +16778 -0
- package/dist/9787.js +209 -0
- package/dist/core.d.ts +29 -9
- package/dist/core.js +10 -2
- package/dist/index.js +13 -3
- package/dist/internal/collaboration/office-collaboration-flat-json.d.ts +13 -0
- package/dist/internal/collaboration/office-collaboration-json.d.ts +4 -0
- package/dist/internal/collaboration/office-collaboration-presence.d.ts +86 -0
- package/dist/internal/collaboration/office-collaboration-transport.d.ts +42 -0
- package/dist/internal/collaboration/office-collaboration.d.ts +85 -0
- package/dist/internal/collaboration/office-document-collaboration-bibliography.d.ts +7 -0
- package/dist/internal/collaboration/office-document-collaboration-claims.d.ts +9 -0
- package/dist/internal/collaboration/office-document-collaboration-comments.d.ts +7 -0
- package/dist/internal/collaboration/office-document-collaboration-sidecar-utils.d.ts +27 -0
- package/dist/internal/collaboration/office-document-collaboration-sidecars.d.ts +16 -0
- package/dist/internal/collaboration/office-document-collaboration.d.ts +45 -0
- package/dist/internal/collaboration/office-markdown-collaboration.d.ts +31 -0
- package/dist/internal/collaboration/office-pdf-collaboration-claims.d.ts +4 -0
- package/dist/internal/collaboration/office-pdf-collaboration-conflicts.d.ts +2 -0
- package/dist/internal/collaboration/office-pdf-collaboration-model.d.ts +26 -0
- package/dist/internal/collaboration/office-pdf-collaboration-records.d.ts +21 -0
- package/dist/internal/collaboration/office-pdf-collaboration-types.d.ts +91 -0
- package/dist/internal/collaboration/office-pdf-collaboration-validation.d.ts +4 -0
- package/dist/internal/collaboration/office-pdf-collaboration.d.ts +35 -0
- package/dist/internal/collaboration/office-presentation-collaboration-model.d.ts +25 -0
- package/dist/internal/collaboration/office-presentation-collaboration-records.d.ts +22 -0
- package/dist/internal/collaboration/office-presentation-collaboration-validation.d.ts +4 -0
- package/dist/internal/collaboration/office-presentation-collaboration.d.ts +32 -0
- package/dist/internal/collaboration/office-spreadsheet-collaboration-cells.d.ts +13 -0
- package/dist/internal/collaboration/office-spreadsheet-collaboration-claims.d.ts +4 -0
- package/dist/internal/collaboration/office-spreadsheet-collaboration-conflicts.d.ts +2 -0
- package/dist/internal/collaboration/office-spreadsheet-collaboration-flat-json.d.ts +10 -0
- package/dist/internal/collaboration/office-spreadsheet-collaboration-model.d.ts +31 -0
- package/dist/internal/collaboration/office-spreadsheet-collaboration-records.d.ts +17 -0
- package/dist/internal/collaboration/office-spreadsheet-collaboration-validation.d.ts +4 -0
- package/dist/internal/collaboration/office-spreadsheet-collaboration.d.ts +32 -0
- package/dist/internal/design-system/primitives/navigation/tabs.d.ts +3 -1
- package/dist/internal/features/work/components/work-document-page-border.d.ts +6 -0
- package/dist/internal/features/work/editors/document-command-catalog.d.ts +536 -0
- package/dist/internal/features/work/editors/document-editor-focus.d.ts +1 -1
- package/dist/internal/features/work/editors/document-editor-support.d.ts +7 -3
- package/dist/internal/features/work/editors/document-editor.d.ts +8 -2
- package/dist/internal/features/work/editors/document-external-content.d.ts +14 -0
- package/dist/internal/features/work/editors/document-format-clipboard.d.ts +6 -0
- package/dist/internal/features/work/editors/document-format-tools.d.ts +4 -0
- package/dist/internal/features/work/editors/document-layout-panel.d.ts +4 -1
- package/dist/internal/features/work/editors/document-page-chrome-wps-shortcuts.d.ts +2 -0
- package/dist/internal/features/work/editors/document-page-layout-ribbon.d.ts +14 -0
- package/dist/internal/features/work/editors/document-page-stack.d.ts +10 -1
- package/dist/internal/features/work/editors/document-page-thumbnail.d.ts +2 -0
- package/dist/internal/features/work/editors/document-pagination-run-coordinator.d.ts +26 -0
- package/dist/internal/features/work/editors/document-picture-properties-dialog-model.d.ts +20 -1
- package/dist/internal/features/work/editors/document-review-navigation.d.ts +9 -0
- package/dist/internal/features/work/editors/document-statistics-dialog.d.ts +7 -0
- package/dist/internal/features/work/editors/document-status-bar.d.ts +2 -1
- package/dist/internal/features/work/editors/document-table-properties-dialog-model.d.ts +4 -1
- package/dist/internal/features/work/editors/document-toolbar.d.ts +19 -42
- package/dist/internal/features/work/editors/document-wps-shortcuts.d.ts +12 -0
- package/dist/internal/features/work/editors/document-zoom.d.ts +17 -0
- package/dist/internal/features/work/editors/markdown-editor-focus.d.ts +1 -1
- package/dist/internal/features/work/editors/markdown-editor.d.ts +5 -1
- package/dist/internal/features/work/editors/markdown-toolbar.d.ts +2 -1
- package/dist/internal/features/work/editors/office-collaboration-participants.d.ts +3 -0
- package/dist/internal/features/work/editors/office-collaboration-presence-context.d.ts +17 -0
- package/dist/internal/features/work/editors/office-collaboration-presence-ui.d.ts +25 -0
- package/dist/internal/features/work/editors/office-editor-focus-handoff.d.ts +27 -0
- package/dist/internal/features/work/editors/pdf-annotation-controller.d.ts +5 -0
- package/dist/internal/features/work/editors/pdf-collaboration-presence.d.ts +3 -0
- package/dist/internal/features/work/editors/pdf-collaboration-projection.d.ts +10 -0
- package/dist/internal/features/work/editors/pdf-evidence-contract.d.ts +36 -0
- package/dist/internal/features/work/editors/pdf-evidence-overlay.d.ts +37 -0
- package/dist/internal/features/work/editors/pdf-toolbar.d.ts +2 -1
- package/dist/internal/features/work/editors/pdf-viewer-controller.d.ts +7 -1
- package/dist/internal/features/work/editors/pdf-viewer.d.ts +11 -1
- package/dist/internal/features/work/editors/presentation-collaboration-presence.d.ts +5 -0
- package/dist/internal/features/work/editors/presentation-editor-focus.d.ts +3 -2
- package/dist/internal/features/work/editors/presentation-editor-types.d.ts +3 -0
- package/dist/internal/features/work/editors/presentation-editor.d.ts +1 -1
- package/dist/internal/features/work/editors/spreadsheet-auto-filter.d.ts +9 -0
- package/dist/internal/features/work/editors/spreadsheet-cell-clear.d.ts +3 -0
- package/dist/internal/features/work/editors/spreadsheet-cell-merge.d.ts +12 -0
- package/dist/internal/features/work/editors/spreadsheet-clipboard-shortcuts.d.ts +3 -7
- package/dist/internal/features/work/editors/spreadsheet-collaboration-presence.d.ts +9 -0
- package/dist/internal/features/work/editors/spreadsheet-command-catalog.d.ts +464 -0
- package/dist/internal/features/work/editors/spreadsheet-command-controller.d.ts +45 -9
- package/dist/internal/features/work/editors/spreadsheet-context-menu.d.ts +2 -0
- package/dist/internal/features/work/editors/spreadsheet-editor-ribbon.d.ts +9 -28
- package/dist/internal/features/work/editors/spreadsheet-editor.d.ts +8 -2
- package/dist/internal/features/work/editors/spreadsheet-format-painter.d.ts +27 -0
- package/dist/internal/features/work/editors/spreadsheet-freeze-panes.d.ts +14 -0
- package/dist/internal/features/work/editors/use-document-insert-commands.d.ts +3 -2
- package/dist/internal/features/work/editors/use-document-pagination.d.ts +6 -1
- package/dist/internal/features/work/editors/use-document-review-conflicts.d.ts +28 -0
- package/dist/internal/features/work/editors/use-spreadsheet-auto-filter.d.ts +21 -0
- package/dist/internal/features/work/editors/use-spreadsheet-collaboration.d.ts +27 -0
- package/dist/internal/features/work/editors/use-spreadsheet-format-painter.d.ts +18 -0
- package/dist/internal/features/work/editors/work-office-chrome.d.ts +22 -3
- package/dist/internal/features/work/editors/work-office-ribbon-overflow.d.ts +2 -0
- package/dist/internal/features/work/work-document-bookmark-references.d.ts +37 -0
- package/dist/internal/features/work/work-document-bookmarks.d.ts +29 -0
- package/dist/internal/features/work/work-document-caption-nodes.d.ts +4 -1
- package/dist/internal/features/work/work-document-comments.d.ts +1 -1
- package/dist/internal/features/work/work-document-equations.d.ts +513 -0
- package/dist/internal/features/work/work-document-extensions.d.ts +1 -0
- package/dist/internal/features/work/work-document-field-identity.d.ts +2 -0
- package/dist/internal/features/work/work-document-field-node.d.ts +2 -2
- package/dist/internal/features/work/work-document-fields.d.ts +7 -0
- package/dist/internal/features/work/work-document-image-identity.d.ts +30 -0
- package/dist/internal/features/work/work-document-image-layout.d.ts +46 -1
- package/dist/internal/features/work/work-document-image-wrap-contour.d.ts +16 -0
- package/dist/internal/features/work/work-document-incremental-layout.d.ts +2 -2
- package/dist/internal/features/work/work-document-model-codec.d.ts +4 -1
- package/dist/internal/features/work/work-document-note-integrity.d.ts +2 -0
- package/dist/internal/features/work/work-document-page-borders.d.ts +25 -0
- package/dist/internal/features/work/work-document-page-capture.d.ts +8 -0
- package/dist/internal/features/work/work-document-page-frames.d.ts +15 -0
- package/dist/internal/features/work/work-document-page-margins.d.ts +56 -0
- package/dist/internal/features/work/work-document-page-size.d.ts +47 -0
- package/dist/internal/features/work/work-document-pagination-measurement.d.ts +1 -2
- package/dist/internal/features/work/work-document-pagination-types.d.ts +7 -2
- package/dist/internal/features/work/work-document-pagination.d.ts +2 -2
- package/dist/internal/features/work/work-document-paragraph-borders.d.ts +32 -0
- package/dist/internal/features/work/work-document-paragraph-identity.d.ts +26 -0
- package/dist/internal/features/work/work-document-paragraph-shading.d.ts +18 -0
- package/dist/internal/features/work/work-document-review-conflicts.d.ts +35 -0
- package/dist/internal/features/work/work-document-section.d.ts +4 -0
- package/dist/internal/features/work/work-document-snapshot.d.ts +19 -0
- package/dist/internal/features/work/work-document-source.d.ts +23 -0
- package/dist/internal/features/work/work-document-table-column-widths.d.ts +7 -0
- package/dist/internal/features/work/work-document-table-property-changes.d.ts +3 -0
- package/dist/internal/features/work/work-document-table-row-identity.d.ts +15 -0
- package/dist/internal/features/work/work-document-table-sizing.d.ts +3 -0
- package/dist/internal/features/work/work-document-text-layout.d.ts +3 -1
- package/dist/internal/features/work/work-document-word-line-metrics.d.ts +2 -0
- package/dist/internal/features/work/work-docx-bookmark-diagnostics.d.ts +3 -0
- package/dist/internal/features/work/work-docx-bookmark-import.d.ts +24 -0
- package/dist/internal/features/work/work-docx-bookmarks.d.ts +17 -0
- package/dist/internal/features/work/work-docx-comment-durable-id-preservation.d.ts +2 -0
- package/dist/internal/features/work/work-docx-comment-export.d.ts +3 -0
- package/dist/internal/features/work/work-docx-comment-metadata.d.ts +2 -0
- package/dist/internal/features/work/work-docx-drawing-extension-preservation.d.ts +4 -0
- package/dist/internal/features/work/work-docx-equation-diagnostics.d.ts +3 -0
- package/dist/internal/features/work/work-docx-equation-export.d.ts +14 -0
- package/dist/internal/features/work/work-docx-equation-import.d.ts +30 -0
- package/dist/internal/features/work/work-docx-equation-story.d.ts +9 -0
- package/dist/internal/features/work/work-docx-export-formatting.d.ts +3 -1
- package/dist/internal/features/work/work-docx-export-image.d.ts +5 -1
- package/dist/internal/features/work/work-docx-export.d.ts +1 -1
- package/dist/internal/features/work/work-docx-field-instructions.d.ts +8 -0
- package/dist/internal/features/work/work-docx-font-table-preservation.d.ts +3 -0
- package/dist/internal/features/work/work-docx-ignorable-extension-preservation.d.ts +15 -0
- package/dist/internal/features/work/work-docx-image-crop.d.ts +12 -0
- package/dist/internal/features/work/work-docx-image-identity.d.ts +17 -0
- package/dist/internal/features/work/work-docx-image-layer.d.ts +12 -0
- package/dist/internal/features/work/work-docx-image-layout-import.d.ts +14 -2
- package/dist/internal/features/work/work-docx-image-wrap.d.ts +15 -0
- package/dist/internal/features/work/work-docx-import.d.ts +13 -3
- package/dist/internal/features/work/work-docx-list-export.d.ts +18 -0
- package/dist/internal/features/work/work-docx-list-import.d.ts +14 -0
- package/dist/internal/features/work/work-docx-note-comment-content-control-block-preservation.d.ts +18 -0
- package/dist/internal/features/work/work-docx-note-comment-content-control-model.d.ts +47 -0
- package/dist/internal/features/work/work-docx-note-comment-content-control-preservation.d.ts +4 -0
- package/dist/internal/features/work/work-docx-note-comment-content-control-properties.d.ts +17 -0
- package/dist/internal/features/work/work-docx-note-comment-content-control-table-model.d.ts +17 -0
- package/dist/internal/features/work/work-docx-note-comment-content-control-xml.d.ts +14 -0
- package/dist/internal/features/work/work-docx-note-comment-extension-preservation.d.ts +2 -0
- package/dist/internal/features/work/work-docx-note-comment-hyperlink-content.d.ts +40 -0
- package/dist/internal/features/work/work-docx-note-comment-hyperlink-preservation.d.ts +5 -0
- package/dist/internal/features/work/work-docx-note-comment-hyperlink-relationships.d.ts +35 -0
- package/dist/internal/features/work/work-docx-note-comment-identity.d.ts +15 -0
- package/dist/internal/features/work/work-docx-note-comment-run-preservation.d.ts +4 -0
- package/dist/internal/features/work/work-docx-note-comment-run-properties.d.ts +2 -0
- package/dist/internal/features/work/work-docx-note-image-import.d.ts +12 -0
- package/dist/internal/features/work/work-docx-note-image-relationships.d.ts +1 -0
- package/dist/internal/features/work/work-docx-numbering-extension-preservation.d.ts +6 -0
- package/dist/internal/features/work/work-docx-numbering.d.ts +1 -0
- package/dist/internal/features/work/work-docx-page-borders-diagnostics.d.ts +3 -0
- package/dist/internal/features/work/work-docx-page-borders-import.d.ts +10 -0
- package/dist/internal/features/work/work-docx-page-margins-diagnostics.d.ts +3 -0
- package/dist/internal/features/work/work-docx-page-margins-import.d.ts +18 -0
- package/dist/internal/features/work/work-docx-page-size-diagnostics.d.ts +2 -0
- package/dist/internal/features/work/work-docx-page-size-import.d.ts +17 -0
- package/dist/internal/features/work/work-docx-paragraph-borders-diagnostics.d.ts +3 -0
- package/dist/internal/features/work/work-docx-paragraph-borders-export.d.ts +18 -0
- package/dist/internal/features/work/work-docx-paragraph-borders-import.d.ts +24 -0
- package/dist/internal/features/work/work-docx-paragraph-default-collapsed.d.ts +19 -0
- package/dist/internal/features/work/work-docx-paragraph-extension-preservation.d.ts +2 -0
- package/dist/internal/features/work/work-docx-paragraph-identity-import.d.ts +10 -0
- package/dist/internal/features/work/work-docx-paragraph-identity.d.ts +18 -0
- package/dist/internal/features/work/work-docx-paragraph-pagination-import.d.ts +6 -1
- package/dist/internal/features/work/work-docx-paragraph-shading-diagnostics.d.ts +3 -0
- package/dist/internal/features/work/work-docx-paragraph-shading-export.d.ts +5 -0
- package/dist/internal/features/work/work-docx-paragraph-shading-import.d.ts +18 -0
- package/dist/internal/features/work/work-docx-run-formatting-import.d.ts +3 -0
- package/dist/internal/features/work/work-docx-settings-preservation.d.ts +10 -0
- package/dist/internal/features/work/work-docx-settings-xml.d.ts +16 -0
- package/dist/internal/features/work/work-docx-style-extension-preservation.d.ts +2 -0
- package/dist/internal/features/work/work-docx-table-cell-export.d.ts +2 -1
- package/dist/internal/features/work/work-docx-table-cell-import.d.ts +3 -0
- package/dist/internal/features/work/work-docx-table-extension-preservation.d.ts +2 -0
- package/dist/internal/features/work/work-docx-table-row-import.d.ts +2 -0
- package/dist/internal/features/work/work-docx-table-sizing-import.d.ts +1 -0
- package/dist/internal/features/work/work-docx-theme-reference.d.ts +23 -0
- package/dist/internal/features/work/work-docx-theme.d.ts +4 -1
- package/dist/internal/features/work/work-docx-twips.d.ts +12 -0
- package/dist/internal/features/work/work-file-contract.d.ts +1 -0
- package/dist/internal/features/work/work-file-io.d.ts +1 -1
- package/dist/internal/features/work/work-markdown-extensions.d.ts +4 -1
- package/dist/internal/features/work/work-ooxml-package-preservation.d.ts +12 -0
- package/dist/internal/features/work/work-ooxml-package-security.d.ts +6 -0
- package/dist/internal/features/work/work-ooxml-relationship-preservation.d.ts +10 -0
- package/dist/internal/features/work/work-ooxml-xml.d.ts +2 -0
- package/dist/internal/features/work/work-pdf-export.d.ts +10 -0
- package/dist/internal/features/work/work-repository.d.ts +2 -0
- package/dist/internal/features/work/work-types.d.ts +15 -2
- package/dist/internal/kernel/office-kernel-client-types.d.ts +1 -0
- package/dist/internal/kernel/office-kernel-protocol.d.ts +7 -0
- package/dist/internal/kernel/office-kernel-version.d.ts +1 -1
- package/dist/office-kernel.wasm +0 -0
- package/dist/office-kernel.worker.js +93 -41
- package/dist/react.d.ts +18 -12
- package/dist/react.js +1 -1
- package/dist/styles.css +1367 -16
- package/dist/vue.d.ts +48 -5
- package/dist/vue.js +42 -3
- package/dist/web-component.d.ts +24 -2
- package/dist/web-component.js +101 -2
- package/docs/latest/en/browser-editor-architecture.md +262 -47
- package/package.json +29 -4
- package/dist/0~152.js +0 -94
- package/dist/0~2582.js +0 -485
- package/dist/0~4750.js +0 -939
- package/dist/0~5861.js +0 -596
- package/dist/0~work-document-extensions.js +0 -3045
- package/dist/0~work-document-model-codec.js +0 -42
- package/dist/0~work-docx-bibliography.js +0 -347
- package/dist/0~work-docx-page-color.js +0 -42
- package/dist/2881.js +0 -1455
- package/dist/8728.js +0 -723
|
@@ -0,0 +1,536 @@
|
|
|
1
|
+
export declare const documentRibbonTabs: readonly [{
|
|
2
|
+
readonly id: "home";
|
|
3
|
+
readonly label: "开始";
|
|
4
|
+
}, {
|
|
5
|
+
readonly id: "insert";
|
|
6
|
+
readonly label: "插入";
|
|
7
|
+
}, {
|
|
8
|
+
readonly id: "page";
|
|
9
|
+
readonly label: "页面布局";
|
|
10
|
+
readonly compactLabel: "布局";
|
|
11
|
+
}, {
|
|
12
|
+
readonly id: "references";
|
|
13
|
+
readonly label: "引用";
|
|
14
|
+
}, {
|
|
15
|
+
readonly id: "review";
|
|
16
|
+
readonly label: "审阅";
|
|
17
|
+
}, {
|
|
18
|
+
readonly id: "view";
|
|
19
|
+
readonly label: "视图";
|
|
20
|
+
}];
|
|
21
|
+
export declare const documentPictureRibbonTab: {
|
|
22
|
+
readonly id: "picture";
|
|
23
|
+
readonly label: "图片";
|
|
24
|
+
readonly contextual: true;
|
|
25
|
+
};
|
|
26
|
+
export declare const documentTableRibbonTabs: readonly [{
|
|
27
|
+
readonly id: "tableDesign";
|
|
28
|
+
readonly label: "表格设计";
|
|
29
|
+
readonly compactLabel: "设计";
|
|
30
|
+
readonly contextual: true;
|
|
31
|
+
}, {
|
|
32
|
+
readonly id: "tableLayout";
|
|
33
|
+
readonly label: "表格布局";
|
|
34
|
+
readonly compactLabel: "布局";
|
|
35
|
+
readonly contextual: true;
|
|
36
|
+
}];
|
|
37
|
+
export declare const documentPageChromeRibbonTab: {
|
|
38
|
+
readonly id: "pageChrome";
|
|
39
|
+
readonly label: "页眉和页脚";
|
|
40
|
+
readonly compactLabel: "页眉页脚";
|
|
41
|
+
readonly contextual: true;
|
|
42
|
+
};
|
|
43
|
+
export type DocumentStandardRibbonTabId = (typeof documentRibbonTabs)[number]['id'];
|
|
44
|
+
export type DocumentRibbonTabId = DocumentStandardRibbonTabId | typeof documentPictureRibbonTab.id | (typeof documentTableRibbonTabs)[number]['id'] | typeof documentPageChromeRibbonTab.id;
|
|
45
|
+
export interface DocumentCommandShortcut {
|
|
46
|
+
label: string;
|
|
47
|
+
aria: string;
|
|
48
|
+
editor?: readonly string[];
|
|
49
|
+
}
|
|
50
|
+
export type DocumentCommandLocation = {
|
|
51
|
+
area: 'quickAccess';
|
|
52
|
+
} | {
|
|
53
|
+
area: 'status';
|
|
54
|
+
} | {
|
|
55
|
+
area: 'ribbon';
|
|
56
|
+
tab: DocumentStandardRibbonTabId;
|
|
57
|
+
group: string;
|
|
58
|
+
};
|
|
59
|
+
export interface DocumentCommandDefinition {
|
|
60
|
+
id: string;
|
|
61
|
+
label: string;
|
|
62
|
+
location: DocumentCommandLocation;
|
|
63
|
+
shortcut?: DocumentCommandShortcut;
|
|
64
|
+
}
|
|
65
|
+
export declare const documentCommandCatalog: {
|
|
66
|
+
readonly undo: {
|
|
67
|
+
readonly id: "history.undo";
|
|
68
|
+
readonly label: "撤销";
|
|
69
|
+
readonly location: {
|
|
70
|
+
readonly area: "quickAccess";
|
|
71
|
+
};
|
|
72
|
+
readonly shortcut: {
|
|
73
|
+
readonly label: "Cmd/Ctrl+Z";
|
|
74
|
+
readonly aria: "Control+Z Meta+Z";
|
|
75
|
+
readonly editor: readonly ["Mod-z"];
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
readonly redo: {
|
|
79
|
+
readonly id: "history.redo";
|
|
80
|
+
readonly label: "重做";
|
|
81
|
+
readonly location: {
|
|
82
|
+
readonly area: "quickAccess";
|
|
83
|
+
};
|
|
84
|
+
readonly shortcut: {
|
|
85
|
+
readonly label: "Cmd/Ctrl+Shift+Z 或 Cmd/Ctrl+Y";
|
|
86
|
+
readonly aria: "Control+Shift+Z Meta+Shift+Z Control+Y Meta+Y";
|
|
87
|
+
readonly editor: readonly ["Mod-Shift-z", "Mod-y"];
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
readonly growFont: {
|
|
91
|
+
readonly id: "font.grow";
|
|
92
|
+
readonly label: "增大字号";
|
|
93
|
+
readonly location: {
|
|
94
|
+
readonly area: "ribbon";
|
|
95
|
+
readonly tab: "home";
|
|
96
|
+
readonly group: "font";
|
|
97
|
+
};
|
|
98
|
+
readonly shortcut: {
|
|
99
|
+
readonly label: "Cmd/Ctrl+Shift+. 或 Cmd/Ctrl+]";
|
|
100
|
+
readonly aria: "Control+Shift+. Meta+Shift+. Control+] Meta+]";
|
|
101
|
+
readonly editor: readonly ["Mod-Shift-.", "Mod-]"];
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
readonly shrinkFont: {
|
|
105
|
+
readonly id: "font.shrink";
|
|
106
|
+
readonly label: "减小字号";
|
|
107
|
+
readonly location: {
|
|
108
|
+
readonly area: "ribbon";
|
|
109
|
+
readonly tab: "home";
|
|
110
|
+
readonly group: "font";
|
|
111
|
+
};
|
|
112
|
+
readonly shortcut: {
|
|
113
|
+
readonly label: "Cmd/Ctrl+Shift+, 或 Cmd/Ctrl+[";
|
|
114
|
+
readonly aria: "Control+Shift+, Meta+Shift+, Control+[ Meta+[";
|
|
115
|
+
readonly editor: readonly ["Mod-Shift-,", "Mod-["];
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
readonly copyFormat: {
|
|
119
|
+
readonly id: "clipboard.copyFormat";
|
|
120
|
+
readonly label: "复制格式";
|
|
121
|
+
readonly location: {
|
|
122
|
+
readonly area: "ribbon";
|
|
123
|
+
readonly tab: "home";
|
|
124
|
+
readonly group: "clipboard";
|
|
125
|
+
};
|
|
126
|
+
readonly shortcut: {
|
|
127
|
+
readonly label: "Cmd/Ctrl+Shift+C";
|
|
128
|
+
readonly aria: "Control+Shift+C Meta+Shift+C";
|
|
129
|
+
readonly editor: readonly ["Mod-Shift-c"];
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
readonly pasteFormat: {
|
|
133
|
+
readonly id: "clipboard.pasteFormat";
|
|
134
|
+
readonly label: "粘贴格式";
|
|
135
|
+
readonly location: {
|
|
136
|
+
readonly area: "ribbon";
|
|
137
|
+
readonly tab: "home";
|
|
138
|
+
readonly group: "clipboard";
|
|
139
|
+
};
|
|
140
|
+
readonly shortcut: {
|
|
141
|
+
readonly label: "Cmd/Ctrl+Shift+V";
|
|
142
|
+
readonly aria: "Control+Shift+V Meta+Shift+V";
|
|
143
|
+
readonly editor: readonly ["Mod-Shift-v"];
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
readonly formatPainter: {
|
|
147
|
+
readonly id: "clipboard.formatPainter";
|
|
148
|
+
readonly label: "格式刷";
|
|
149
|
+
readonly location: {
|
|
150
|
+
readonly area: "ribbon";
|
|
151
|
+
readonly tab: "home";
|
|
152
|
+
readonly group: "clipboard";
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
readonly bold: {
|
|
156
|
+
readonly id: "font.bold";
|
|
157
|
+
readonly label: "加粗";
|
|
158
|
+
readonly location: {
|
|
159
|
+
readonly area: "ribbon";
|
|
160
|
+
readonly tab: "home";
|
|
161
|
+
readonly group: "font";
|
|
162
|
+
};
|
|
163
|
+
readonly shortcut: {
|
|
164
|
+
readonly label: "Cmd/Ctrl+B";
|
|
165
|
+
readonly aria: "Control+B Meta+B";
|
|
166
|
+
readonly editor: readonly ["Mod-b"];
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
readonly italic: {
|
|
170
|
+
readonly id: "font.italic";
|
|
171
|
+
readonly label: "斜体";
|
|
172
|
+
readonly location: {
|
|
173
|
+
readonly area: "ribbon";
|
|
174
|
+
readonly tab: "home";
|
|
175
|
+
readonly group: "font";
|
|
176
|
+
};
|
|
177
|
+
readonly shortcut: {
|
|
178
|
+
readonly label: "Cmd/Ctrl+I";
|
|
179
|
+
readonly aria: "Control+I Meta+I";
|
|
180
|
+
readonly editor: readonly ["Mod-i"];
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
readonly underline: {
|
|
184
|
+
readonly id: "font.underline";
|
|
185
|
+
readonly label: "下划线";
|
|
186
|
+
readonly location: {
|
|
187
|
+
readonly area: "ribbon";
|
|
188
|
+
readonly tab: "home";
|
|
189
|
+
readonly group: "font";
|
|
190
|
+
};
|
|
191
|
+
readonly shortcut: {
|
|
192
|
+
readonly label: "Cmd/Ctrl+U";
|
|
193
|
+
readonly aria: "Control+U Meta+U";
|
|
194
|
+
readonly editor: readonly ["Mod-u"];
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
readonly strike: {
|
|
198
|
+
readonly id: "font.strike";
|
|
199
|
+
readonly label: "删除线";
|
|
200
|
+
readonly location: {
|
|
201
|
+
readonly area: "ribbon";
|
|
202
|
+
readonly tab: "home";
|
|
203
|
+
readonly group: "font";
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
readonly subscript: {
|
|
207
|
+
readonly id: "font.subscript";
|
|
208
|
+
readonly label: "下标";
|
|
209
|
+
readonly location: {
|
|
210
|
+
readonly area: "ribbon";
|
|
211
|
+
readonly tab: "home";
|
|
212
|
+
readonly group: "font";
|
|
213
|
+
};
|
|
214
|
+
readonly shortcut: {
|
|
215
|
+
readonly label: "Cmd/Ctrl+=";
|
|
216
|
+
readonly aria: "Control+= Meta+=";
|
|
217
|
+
readonly editor: readonly ["Mod-="];
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
readonly superscript: {
|
|
221
|
+
readonly id: "font.superscript";
|
|
222
|
+
readonly label: "上标";
|
|
223
|
+
readonly location: {
|
|
224
|
+
readonly area: "ribbon";
|
|
225
|
+
readonly tab: "home";
|
|
226
|
+
readonly group: "font";
|
|
227
|
+
};
|
|
228
|
+
readonly shortcut: {
|
|
229
|
+
readonly label: "Cmd/Ctrl+Shift+=";
|
|
230
|
+
readonly aria: "Control+Shift+= Meta+Shift+=";
|
|
231
|
+
readonly editor: readonly ["Mod-Shift-="];
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
readonly highlight: {
|
|
235
|
+
readonly id: "font.highlight";
|
|
236
|
+
readonly label: "突出显示";
|
|
237
|
+
readonly location: {
|
|
238
|
+
readonly area: "ribbon";
|
|
239
|
+
readonly tab: "home";
|
|
240
|
+
readonly group: "font";
|
|
241
|
+
};
|
|
242
|
+
};
|
|
243
|
+
readonly clearFormatting: {
|
|
244
|
+
readonly id: "font.clearFormatting";
|
|
245
|
+
readonly label: "清除格式";
|
|
246
|
+
readonly location: {
|
|
247
|
+
readonly area: "ribbon";
|
|
248
|
+
readonly tab: "home";
|
|
249
|
+
readonly group: "font";
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
readonly alignLeft: {
|
|
253
|
+
readonly id: "paragraph.alignLeft";
|
|
254
|
+
readonly label: "左对齐";
|
|
255
|
+
readonly location: {
|
|
256
|
+
readonly area: "ribbon";
|
|
257
|
+
readonly tab: "home";
|
|
258
|
+
readonly group: "paragraph";
|
|
259
|
+
};
|
|
260
|
+
readonly shortcut: {
|
|
261
|
+
readonly label: "Cmd/Ctrl+L";
|
|
262
|
+
readonly aria: "Control+L Meta+L";
|
|
263
|
+
readonly editor: readonly ["Mod-l"];
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
readonly alignCenter: {
|
|
267
|
+
readonly id: "paragraph.alignCenter";
|
|
268
|
+
readonly label: "居中";
|
|
269
|
+
readonly location: {
|
|
270
|
+
readonly area: "ribbon";
|
|
271
|
+
readonly tab: "home";
|
|
272
|
+
readonly group: "paragraph";
|
|
273
|
+
};
|
|
274
|
+
readonly shortcut: {
|
|
275
|
+
readonly label: "Cmd/Ctrl+E";
|
|
276
|
+
readonly aria: "Control+E Meta+E";
|
|
277
|
+
readonly editor: readonly ["Mod-e"];
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
readonly alignRight: {
|
|
281
|
+
readonly id: "paragraph.alignRight";
|
|
282
|
+
readonly label: "右对齐";
|
|
283
|
+
readonly location: {
|
|
284
|
+
readonly area: "ribbon";
|
|
285
|
+
readonly tab: "home";
|
|
286
|
+
readonly group: "paragraph";
|
|
287
|
+
};
|
|
288
|
+
readonly shortcut: {
|
|
289
|
+
readonly label: "Cmd/Ctrl+R";
|
|
290
|
+
readonly aria: "Control+R Meta+R";
|
|
291
|
+
readonly editor: readonly ["Mod-r"];
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
readonly alignJustify: {
|
|
295
|
+
readonly id: "paragraph.alignJustify";
|
|
296
|
+
readonly label: "两端对齐";
|
|
297
|
+
readonly location: {
|
|
298
|
+
readonly area: "ribbon";
|
|
299
|
+
readonly tab: "home";
|
|
300
|
+
readonly group: "paragraph";
|
|
301
|
+
};
|
|
302
|
+
readonly shortcut: {
|
|
303
|
+
readonly label: "Cmd/Ctrl+J";
|
|
304
|
+
readonly aria: "Control+J Meta+J";
|
|
305
|
+
readonly editor: readonly ["Mod-j"];
|
|
306
|
+
};
|
|
307
|
+
};
|
|
308
|
+
readonly lineSpacingSingle: {
|
|
309
|
+
readonly id: "paragraph.lineSpacingSingle";
|
|
310
|
+
readonly label: "单倍行距";
|
|
311
|
+
readonly location: {
|
|
312
|
+
readonly area: "ribbon";
|
|
313
|
+
readonly tab: "home";
|
|
314
|
+
readonly group: "paragraph";
|
|
315
|
+
};
|
|
316
|
+
readonly shortcut: {
|
|
317
|
+
readonly label: "Cmd/Ctrl+1";
|
|
318
|
+
readonly aria: "Control+1 Meta+1";
|
|
319
|
+
readonly editor: readonly ["Mod-1"];
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
readonly lineSpacingOneAndHalf: {
|
|
323
|
+
readonly id: "paragraph.lineSpacingOneAndHalf";
|
|
324
|
+
readonly label: "1.5 倍行距";
|
|
325
|
+
readonly location: {
|
|
326
|
+
readonly area: "ribbon";
|
|
327
|
+
readonly tab: "home";
|
|
328
|
+
readonly group: "paragraph";
|
|
329
|
+
};
|
|
330
|
+
readonly shortcut: {
|
|
331
|
+
readonly label: "Cmd/Ctrl+5";
|
|
332
|
+
readonly aria: "Control+5 Meta+5";
|
|
333
|
+
readonly editor: readonly ["Mod-5"];
|
|
334
|
+
};
|
|
335
|
+
};
|
|
336
|
+
readonly lineSpacingDouble: {
|
|
337
|
+
readonly id: "paragraph.lineSpacingDouble";
|
|
338
|
+
readonly label: "双倍行距";
|
|
339
|
+
readonly location: {
|
|
340
|
+
readonly area: "ribbon";
|
|
341
|
+
readonly tab: "home";
|
|
342
|
+
readonly group: "paragraph";
|
|
343
|
+
};
|
|
344
|
+
readonly shortcut: {
|
|
345
|
+
readonly label: "Cmd/Ctrl+2";
|
|
346
|
+
readonly aria: "Control+2 Meta+2";
|
|
347
|
+
readonly editor: readonly ["Mod-2"];
|
|
348
|
+
};
|
|
349
|
+
};
|
|
350
|
+
readonly heading1: {
|
|
351
|
+
readonly id: "styles.heading1";
|
|
352
|
+
readonly label: "标题 1";
|
|
353
|
+
readonly location: {
|
|
354
|
+
readonly area: "ribbon";
|
|
355
|
+
readonly tab: "home";
|
|
356
|
+
readonly group: "styles";
|
|
357
|
+
};
|
|
358
|
+
readonly shortcut: {
|
|
359
|
+
readonly label: "Cmd/Ctrl+Alt+1";
|
|
360
|
+
readonly aria: "Control+Alt+1 Meta+Alt+1";
|
|
361
|
+
readonly editor: readonly ["Mod-Alt-1"];
|
|
362
|
+
};
|
|
363
|
+
};
|
|
364
|
+
readonly heading2: {
|
|
365
|
+
readonly id: "styles.heading2";
|
|
366
|
+
readonly label: "标题 2";
|
|
367
|
+
readonly location: {
|
|
368
|
+
readonly area: "ribbon";
|
|
369
|
+
readonly tab: "home";
|
|
370
|
+
readonly group: "styles";
|
|
371
|
+
};
|
|
372
|
+
readonly shortcut: {
|
|
373
|
+
readonly label: "Cmd/Ctrl+Alt+2";
|
|
374
|
+
readonly aria: "Control+Alt+2 Meta+Alt+2";
|
|
375
|
+
readonly editor: readonly ["Mod-Alt-2"];
|
|
376
|
+
};
|
|
377
|
+
};
|
|
378
|
+
readonly heading3: {
|
|
379
|
+
readonly id: "styles.heading3";
|
|
380
|
+
readonly label: "标题 3";
|
|
381
|
+
readonly location: {
|
|
382
|
+
readonly area: "ribbon";
|
|
383
|
+
readonly tab: "home";
|
|
384
|
+
readonly group: "styles";
|
|
385
|
+
};
|
|
386
|
+
readonly shortcut: {
|
|
387
|
+
readonly label: "Cmd/Ctrl+Alt+3";
|
|
388
|
+
readonly aria: "Control+Alt+3 Meta+Alt+3";
|
|
389
|
+
readonly editor: readonly ["Mod-Alt-3"];
|
|
390
|
+
};
|
|
391
|
+
};
|
|
392
|
+
readonly find: {
|
|
393
|
+
readonly id: "editing.find";
|
|
394
|
+
readonly label: "查找";
|
|
395
|
+
readonly location: {
|
|
396
|
+
readonly area: "ribbon";
|
|
397
|
+
readonly tab: "home";
|
|
398
|
+
readonly group: "editing";
|
|
399
|
+
};
|
|
400
|
+
readonly shortcut: {
|
|
401
|
+
readonly label: "Cmd/Ctrl+F";
|
|
402
|
+
readonly aria: "Control+F Meta+F";
|
|
403
|
+
readonly editor: readonly ["Mod-f"];
|
|
404
|
+
};
|
|
405
|
+
};
|
|
406
|
+
readonly replace: {
|
|
407
|
+
readonly id: "editing.replace";
|
|
408
|
+
readonly label: "替换";
|
|
409
|
+
readonly location: {
|
|
410
|
+
readonly area: "ribbon";
|
|
411
|
+
readonly tab: "home";
|
|
412
|
+
readonly group: "editing";
|
|
413
|
+
};
|
|
414
|
+
readonly shortcut: {
|
|
415
|
+
readonly label: "Cmd/Ctrl+H";
|
|
416
|
+
readonly aria: "Control+H Meta+H";
|
|
417
|
+
readonly editor: readonly ["Mod-h"];
|
|
418
|
+
};
|
|
419
|
+
};
|
|
420
|
+
readonly insertPageBreak: {
|
|
421
|
+
readonly id: "insert.pageBreak";
|
|
422
|
+
readonly label: "插入分页符";
|
|
423
|
+
readonly location: {
|
|
424
|
+
readonly area: "ribbon";
|
|
425
|
+
readonly tab: "insert";
|
|
426
|
+
readonly group: "pages";
|
|
427
|
+
};
|
|
428
|
+
readonly shortcut: {
|
|
429
|
+
readonly label: "Cmd/Ctrl+Enter";
|
|
430
|
+
readonly aria: "Control+Enter Meta+Enter";
|
|
431
|
+
readonly editor: readonly ["Mod-Enter"];
|
|
432
|
+
};
|
|
433
|
+
};
|
|
434
|
+
readonly hyperlink: {
|
|
435
|
+
readonly id: "insert.hyperlink";
|
|
436
|
+
readonly label: "添加链接";
|
|
437
|
+
readonly location: {
|
|
438
|
+
readonly area: "ribbon";
|
|
439
|
+
readonly tab: "insert";
|
|
440
|
+
readonly group: "links";
|
|
441
|
+
};
|
|
442
|
+
readonly shortcut: {
|
|
443
|
+
readonly label: "Cmd/Ctrl+K";
|
|
444
|
+
readonly aria: "Control+K Meta+K";
|
|
445
|
+
readonly editor: readonly ["Mod-k"];
|
|
446
|
+
};
|
|
447
|
+
};
|
|
448
|
+
readonly bookmark: {
|
|
449
|
+
readonly id: "insert.bookmark";
|
|
450
|
+
readonly label: "添加书签";
|
|
451
|
+
readonly location: {
|
|
452
|
+
readonly area: "ribbon";
|
|
453
|
+
readonly tab: "insert";
|
|
454
|
+
readonly group: "links";
|
|
455
|
+
};
|
|
456
|
+
};
|
|
457
|
+
readonly spelling: {
|
|
458
|
+
readonly id: "review.spelling";
|
|
459
|
+
readonly label: "拼写检查";
|
|
460
|
+
readonly location: {
|
|
461
|
+
readonly area: "ribbon";
|
|
462
|
+
readonly tab: "review";
|
|
463
|
+
readonly group: "proofing";
|
|
464
|
+
};
|
|
465
|
+
readonly shortcut: {
|
|
466
|
+
readonly label: "F7";
|
|
467
|
+
readonly aria: "F7";
|
|
468
|
+
readonly editor: readonly ["F7"];
|
|
469
|
+
};
|
|
470
|
+
};
|
|
471
|
+
readonly insertComment: {
|
|
472
|
+
readonly id: "review.insertComment";
|
|
473
|
+
readonly label: "添加批注";
|
|
474
|
+
readonly location: {
|
|
475
|
+
readonly area: "ribbon";
|
|
476
|
+
readonly tab: "review";
|
|
477
|
+
readonly group: "comments";
|
|
478
|
+
};
|
|
479
|
+
readonly shortcut: {
|
|
480
|
+
readonly label: "Cmd/Ctrl+Alt+M";
|
|
481
|
+
readonly aria: "Control+Alt+M Meta+Alt+M";
|
|
482
|
+
readonly editor: readonly ["Mod-Alt-m"];
|
|
483
|
+
};
|
|
484
|
+
};
|
|
485
|
+
readonly trackChanges: {
|
|
486
|
+
readonly id: "review.trackChanges";
|
|
487
|
+
readonly label: "修订模式";
|
|
488
|
+
readonly location: {
|
|
489
|
+
readonly area: "ribbon";
|
|
490
|
+
readonly tab: "review";
|
|
491
|
+
readonly group: "tracking";
|
|
492
|
+
};
|
|
493
|
+
readonly shortcut: {
|
|
494
|
+
readonly label: "Cmd/Ctrl+Shift+E";
|
|
495
|
+
readonly aria: "Control+Shift+E Meta+Shift+E";
|
|
496
|
+
readonly editor: readonly ["Mod-Shift-e"];
|
|
497
|
+
};
|
|
498
|
+
};
|
|
499
|
+
readonly refreshFields: {
|
|
500
|
+
readonly id: "references.refreshFields";
|
|
501
|
+
readonly label: "更新域";
|
|
502
|
+
readonly location: {
|
|
503
|
+
readonly area: "ribbon";
|
|
504
|
+
readonly tab: "references";
|
|
505
|
+
readonly group: "update";
|
|
506
|
+
};
|
|
507
|
+
readonly shortcut: {
|
|
508
|
+
readonly label: "F9";
|
|
509
|
+
readonly aria: "F9";
|
|
510
|
+
readonly editor: readonly ["F9"];
|
|
511
|
+
};
|
|
512
|
+
};
|
|
513
|
+
readonly navigationPane: {
|
|
514
|
+
readonly id: "view.navigationPane";
|
|
515
|
+
readonly label: "导航窗格";
|
|
516
|
+
readonly location: {
|
|
517
|
+
readonly area: "ribbon";
|
|
518
|
+
readonly tab: "view";
|
|
519
|
+
readonly group: "show";
|
|
520
|
+
};
|
|
521
|
+
};
|
|
522
|
+
readonly wordCount: {
|
|
523
|
+
readonly id: "status.wordCount";
|
|
524
|
+
readonly label: "字数统计";
|
|
525
|
+
readonly location: {
|
|
526
|
+
readonly area: "status";
|
|
527
|
+
};
|
|
528
|
+
readonly shortcut: {
|
|
529
|
+
readonly label: "Cmd/Ctrl+Shift+G";
|
|
530
|
+
readonly aria: "Control+Shift+G Meta+Shift+G";
|
|
531
|
+
readonly editor: readonly ["Mod-Shift-g"];
|
|
532
|
+
};
|
|
533
|
+
};
|
|
534
|
+
};
|
|
535
|
+
export type DocumentCommandId = keyof typeof documentCommandCatalog;
|
|
536
|
+
export declare function getDocumentCommandDefinition<T extends DocumentCommandId>(id: T): DocumentCommandDefinition;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function restoreDocumentEditorFocus(getTarget: () => HTMLElement | null): void;
|
|
1
|
+
export declare function restoreDocumentEditorFocus(getTarget: () => HTMLElement | null, focusOrigin?: Element | null): void;
|
|
@@ -3,8 +3,6 @@ import type { WorkspaceContextMenuItem } from '../../workspace/components/worksp
|
|
|
3
3
|
import { type WorkAgentProposalRequest, type WorkAgentProposalTarget } from '../work-agent-proposal';
|
|
4
4
|
import type { WorkEditorAgentRequest } from '../work-agent-request';
|
|
5
5
|
import type { WorkDocumentSelectionAction, WorkDocumentSelectionMenuIcon, WorkDocumentSelectionMenuItem } from '../work-document-selection-menu';
|
|
6
|
-
export declare const MIN_DOCUMENT_ZOOM = 50;
|
|
7
|
-
export declare const MAX_DOCUMENT_ZOOM = 200;
|
|
8
6
|
export declare function documentEditorSelectionText(editor: Pick<Editor, 'state'>): string;
|
|
9
7
|
export declare function documentAgentMenuItems(selection: string, onAgentRequest: (request: WorkEditorAgentRequest) => void | Promise<void>, proposalOptions?: {
|
|
10
8
|
target: WorkAgentProposalTarget;
|
|
@@ -30,5 +28,11 @@ export declare function customSelectionMenuItems<Context>(items: readonly Custom
|
|
|
30
28
|
export declare function documentPageCount(editor: Editor): number;
|
|
31
29
|
export declare function documentCurrentPage(editor: Editor): number;
|
|
32
30
|
export declare function documentWordCount(value: string): number;
|
|
33
|
-
export
|
|
31
|
+
export interface DocumentTextStatistics {
|
|
32
|
+
characterCountWithSpaces: number;
|
|
33
|
+
characterCountWithoutSpaces: number;
|
|
34
|
+
paragraphCount: number;
|
|
35
|
+
wordCount: number;
|
|
36
|
+
}
|
|
37
|
+
export declare function documentTextStatistics(editor: Pick<Editor, 'getText' | 'state'>): DocumentTextStatistics;
|
|
34
38
|
export {};
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import type { Extensions } from '@tiptap/core';
|
|
2
|
+
import type { WorkOfficeCollaborationSession } from '../../../collaboration/office-collaboration';
|
|
2
3
|
import type { WorkEditorAgentRequest } from '../work-agent-request';
|
|
3
4
|
import type { WorkDocumentLayoutFont } from '../work-document-fonts';
|
|
5
|
+
import type { WorkDocumentReviewConflictEvent } from '../work-document-review-conflicts';
|
|
6
|
+
import { type WorkGetDocumentSelectionMenuItems } from '../work-document-selection-menu';
|
|
4
7
|
import type { WorkDocumentContent } from '../work-types';
|
|
5
8
|
import { type WorkOfficeFileAction } from './work-office-chrome';
|
|
6
|
-
import { type WorkGetDocumentSelectionMenuItems } from '../work-document-selection-menu';
|
|
7
9
|
export interface DocumentEditorProps {
|
|
8
10
|
artifactId?: string;
|
|
11
|
+
autoFocus?: boolean;
|
|
12
|
+
collaboration?: WorkOfficeCollaborationSession;
|
|
9
13
|
content: WorkDocumentContent;
|
|
10
14
|
extensions?: Extensions;
|
|
11
15
|
preview: boolean;
|
|
16
|
+
defaultRibbonCollapsed?: boolean;
|
|
12
17
|
saveStatus?: string;
|
|
13
18
|
kernelWasmUrl?: string;
|
|
14
19
|
layoutFonts?: readonly WorkDocumentLayoutFont[];
|
|
@@ -16,5 +21,6 @@ export interface DocumentEditorProps {
|
|
|
16
21
|
getSelectionMenuItems?: WorkGetDocumentSelectionMenuItems;
|
|
17
22
|
onChange: (content: WorkDocumentContent) => void;
|
|
18
23
|
onAgentRequest?: (request: WorkEditorAgentRequest) => void | Promise<void>;
|
|
24
|
+
onReviewConflict?: (event: WorkDocumentReviewConflictEvent) => void;
|
|
19
25
|
}
|
|
20
|
-
export declare function DocumentEditor(
|
|
26
|
+
export declare function DocumentEditor(props: DocumentEditorProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type Content, type Editor } from '@tiptap/core';
|
|
2
|
+
import type { Transaction } from '@tiptap/pm/state';
|
|
3
|
+
export type ExternalDocumentContentResult = 'applied' | 'unchanged' | 'unsupported';
|
|
4
|
+
/**
|
|
5
|
+
* Returns whether an editor transaction represents a user-authored document
|
|
6
|
+
* change that the controlled host must persist.
|
|
7
|
+
*/
|
|
8
|
+
export declare function shouldPublishDocumentUpdate(transaction: Transaction): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Applies controlled host content as the smallest ProseMirror transaction.
|
|
11
|
+
* This keeps selections, editor instances, and local history stable while an
|
|
12
|
+
* agent or another realtime producer extends the document.
|
|
13
|
+
*/
|
|
14
|
+
export declare function applyExternalDocumentContent(editor: Editor, content: Content): ExternalDocumentContentResult;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Editor } from '@tiptap/core';
|
|
2
|
+
export declare function copyDocumentFormatting(editor: Editor): boolean;
|
|
3
|
+
export declare function pasteDocumentFormatting(editor: Editor): boolean;
|
|
4
|
+
export declare function hasDocumentFormatClipboard(): boolean;
|
|
5
|
+
export declare function subscribeDocumentFormatClipboard(listener: () => void): () => void;
|
|
6
|
+
export declare function clearDocumentFormatClipboard(): void;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { WorkDocumentSectionLayout } from '../work-types';
|
|
2
|
-
export
|
|
2
|
+
export type DocumentLayoutPanelTab = 'columns' | 'headerFooter' | 'page';
|
|
3
|
+
export declare function DocumentLayoutPanel({ layout, activeTab: controlledActiveTab, sectionIndex, sectionCount, onActiveTabChange, onChange, onInsertSection, onMergeSection, onClose, }: {
|
|
3
4
|
layout: WorkDocumentSectionLayout;
|
|
5
|
+
activeTab?: DocumentLayoutPanelTab;
|
|
4
6
|
sectionIndex: number;
|
|
5
7
|
sectionCount: number;
|
|
8
|
+
onActiveTabChange?: (tab: DocumentLayoutPanelTab) => void;
|
|
6
9
|
onChange: (layout: WorkDocumentSectionLayout) => void;
|
|
7
10
|
onInsertSection: () => void;
|
|
8
11
|
onMergeSection: () => void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Editor } from '@tiptap/core';
|
|
2
|
+
import type { WorkDocumentSectionLayout } from '../work-types';
|
|
3
|
+
import type { DocumentLayoutPanelTab } from './document-layout-panel';
|
|
4
|
+
export declare function DocumentPageLayoutRibbon({ editor, layout, layoutOpen, pageColor, onLayoutChange, onOpenLayout, onToggleLayout, onPageColorChange, onInsertSection, }: {
|
|
5
|
+
editor: Editor;
|
|
6
|
+
layout: WorkDocumentSectionLayout;
|
|
7
|
+
layoutOpen: boolean;
|
|
8
|
+
pageColor: string;
|
|
9
|
+
onLayoutChange: (layout: WorkDocumentSectionLayout) => void;
|
|
10
|
+
onOpenLayout: (target: DocumentLayoutPanelTab) => void;
|
|
11
|
+
onToggleLayout: () => void;
|
|
12
|
+
onPageColorChange: (color: string) => void;
|
|
13
|
+
onInsertSection: () => void;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
@@ -1,8 +1,17 @@
|
|
|
1
|
+
import type { WorkDocumentSectionLayout } from '../work-types';
|
|
2
|
+
import type { OfficeKernelPageMetrics } from '../../../kernel/office-kernel-protocol';
|
|
1
3
|
interface DocumentPageStackProps {
|
|
2
4
|
pageColor: string;
|
|
3
5
|
pageCount: number;
|
|
4
6
|
pageGap: number;
|
|
5
7
|
pageHeight: number;
|
|
8
|
+
pageWidth?: number;
|
|
9
|
+
pages?: readonly {
|
|
10
|
+
layout: WorkDocumentSectionLayout;
|
|
11
|
+
page?: OfficeKernelPageMetrics;
|
|
12
|
+
physicalPage?: number;
|
|
13
|
+
sectionPage: number;
|
|
14
|
+
}[];
|
|
6
15
|
}
|
|
7
|
-
export declare function DocumentPageStack({ pageColor, pageCount, pageGap, pageHeight, }: DocumentPageStackProps): import("react").JSX.Element;
|
|
16
|
+
export declare function DocumentPageStack({ pageColor, pageCount, pageGap, pageHeight, pageWidth, pages, }: DocumentPageStackProps): import("react").JSX.Element;
|
|
8
17
|
export {};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { type WorkLiveDocumentCapturePage } from '../work-document-page-capture';
|
|
1
2
|
export interface WorkDocumentPageThumbnailSource {
|
|
2
3
|
element: HTMLElement;
|
|
3
4
|
pageCount: number;
|
|
4
5
|
pageGap: number;
|
|
5
6
|
pageHeight: number;
|
|
6
7
|
pageWidth: number;
|
|
8
|
+
pages?: readonly WorkLiveDocumentCapturePage[];
|
|
7
9
|
revision: string;
|
|
8
10
|
}
|
|
9
11
|
export interface DocumentPageCanvasRenderOptions {
|