@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,26 @@
|
|
|
1
|
+
export interface DocumentPaginationRunRequest {
|
|
2
|
+
invalidateActive?: boolean;
|
|
3
|
+
}
|
|
4
|
+
export interface DocumentPaginationRunCoordinatorOptions {
|
|
5
|
+
cancelFrame: (frame: number) => void;
|
|
6
|
+
onAbort?: (reason: 'invalidation' | 'disposal') => void;
|
|
7
|
+
onCoalescedRequest?: () => void;
|
|
8
|
+
onError: (error: unknown) => void;
|
|
9
|
+
onRunFinish?: (aborted: boolean) => void;
|
|
10
|
+
onRunStart?: () => void;
|
|
11
|
+
requestFrame: (callback: () => void) => number;
|
|
12
|
+
run: (signal: AbortSignal) => Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
export interface DocumentPaginationRunCoordinator {
|
|
15
|
+
dispose: () => void;
|
|
16
|
+
request: (request?: DocumentPaginationRunRequest) => void;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Runs document pagination as a single-flight operation.
|
|
20
|
+
*
|
|
21
|
+
* Layout observations that arrive during a run are merged into one follow-up
|
|
22
|
+
* pass. Only document invalidation aborts active work, so observer and font
|
|
23
|
+
* events cannot continuously starve a large document before it reaches a
|
|
24
|
+
* stable layout.
|
|
25
|
+
*/
|
|
26
|
+
export declare function createDocumentPaginationRunCoordinator({ cancelFrame, onAbort, onCoalescedRequest, onError, onRunFinish, onRunStart, requestFrame, run, }: DocumentPaginationRunCoordinatorOptions): DocumentPaginationRunCoordinator;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { WorkDocumentImageAlignment, WorkDocumentImageLayout, WorkDocumentImageProperties } from '../work-document-image-layout';
|
|
1
|
+
import type { WorkDocumentImageAlignment, WorkDocumentImageHorizontalReference, WorkDocumentImageLayout, WorkDocumentImageProperties, WorkDocumentImageWrapSide, WorkDocumentImageVerticalReference } from '../work-document-image-layout';
|
|
2
2
|
export declare const IMAGE_PIXELS_PER_CENTIMETER: number;
|
|
3
3
|
export interface DocumentPicturePropertiesSource {
|
|
4
4
|
properties: WorkDocumentImageProperties;
|
|
@@ -13,12 +13,31 @@ export interface DocumentPicturePropertiesDraft {
|
|
|
13
13
|
layout: WorkDocumentImageLayout;
|
|
14
14
|
alignment: WorkDocumentImageAlignment;
|
|
15
15
|
wrapDistance: string;
|
|
16
|
+
wrapSide: WorkDocumentImageWrapSide;
|
|
16
17
|
alternativeText: string;
|
|
18
|
+
precisePosition: boolean;
|
|
19
|
+
horizontalOffset: string;
|
|
20
|
+
verticalOffset: string;
|
|
21
|
+
horizontalReference: WorkDocumentImageHorizontalReference;
|
|
22
|
+
verticalReference: WorkDocumentImageVerticalReference;
|
|
23
|
+
cropTop: string;
|
|
24
|
+
cropRight: string;
|
|
25
|
+
cropBottom: string;
|
|
26
|
+
cropLeft: string;
|
|
27
|
+
relativeHeight: string;
|
|
28
|
+
behindDocument: boolean;
|
|
29
|
+
allowOverlap: boolean;
|
|
30
|
+
layoutInCell: boolean;
|
|
31
|
+
lockAnchor: boolean;
|
|
17
32
|
}
|
|
18
33
|
export interface DocumentPicturePropertiesErrors {
|
|
19
34
|
width: string | null;
|
|
20
35
|
height: string | null;
|
|
21
36
|
wrapDistance: string | null;
|
|
37
|
+
horizontalOffset: string | null;
|
|
38
|
+
verticalOffset: string | null;
|
|
39
|
+
crop: string | null;
|
|
40
|
+
relativeHeight: string | null;
|
|
22
41
|
}
|
|
23
42
|
export declare function createDocumentPicturePropertiesDraft(source: DocumentPicturePropertiesSource): DocumentPicturePropertiesDraft;
|
|
24
43
|
export declare function withDocumentPictureDimension(draft: DocumentPicturePropertiesDraft, dimension: 'height' | 'width', value: string): DocumentPicturePropertiesDraft;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { WorkDocumentChange } from '../work-document-changes';
|
|
2
|
+
interface DocumentSelectionRange {
|
|
3
|
+
from: number;
|
|
4
|
+
to: number;
|
|
5
|
+
}
|
|
6
|
+
export declare function selectedDocumentChangeIndex(changes: readonly WorkDocumentChange[], selection: DocumentSelectionRange): number | null;
|
|
7
|
+
export declare function adjacentDocumentChangeIndex(changes: readonly WorkDocumentChange[], selection: DocumentSelectionRange, direction: -1 | 1): number | null;
|
|
8
|
+
export declare function actionableDocumentChangeIndex(changes: readonly WorkDocumentChange[], selection: DocumentSelectionRange): number | null;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { DocumentTextStatistics } from './document-editor-support';
|
|
2
|
+
export declare function DocumentStatisticsDialog({ pageCount, restoreFocusTarget, statistics, onClose, }: {
|
|
3
|
+
pageCount: number;
|
|
4
|
+
restoreFocusTarget: () => HTMLElement | null;
|
|
5
|
+
statistics: DocumentTextStatistics;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
@@ -12,8 +12,9 @@ interface DocumentStatusBarProps {
|
|
|
12
12
|
wordCount: number;
|
|
13
13
|
zoom: number;
|
|
14
14
|
onSpellcheckChange: (enabled: boolean) => void;
|
|
15
|
+
onOpenWordCount: () => void;
|
|
15
16
|
onViewModeChange: (mode: DocumentViewMode) => void;
|
|
16
17
|
onZoomChange: (zoom: number) => void;
|
|
17
18
|
}
|
|
18
|
-
export declare function DocumentStatusBar({ bibliographyCount, citationCount, currentPage, pageCount, saveStatus, sectionCount, sectionIndex, spellcheckEnabled, viewMode, wordCount, zoom, onSpellcheckChange, onViewModeChange, onZoomChange, }: DocumentStatusBarProps): import("react").JSX.Element;
|
|
19
|
+
export declare function DocumentStatusBar({ bibliographyCount, citationCount, currentPage, pageCount, saveStatus, sectionCount, sectionIndex, spellcheckEnabled, viewMode, wordCount, zoom, onSpellcheckChange, onOpenWordCount, onViewModeChange, onZoomChange, }: DocumentStatusBarProps): import("react").JSX.Element;
|
|
19
20
|
export {};
|
|
@@ -2,6 +2,7 @@ import type { DocumentTableCellFormat } from '../work-document-table-cell-format
|
|
|
2
2
|
import type { DocumentTableAlignment, DocumentTableCellMarginSide, DocumentTablePreferredWidthType } from '../work-document-table-geometry';
|
|
3
3
|
import type { DocumentTableRowHeightRule, DocumentTableRowOptions } from '../work-document-table-row';
|
|
4
4
|
import type { DocumentTablePropertyChanges, DocumentTableSizingState } from '../work-document-table-sizing';
|
|
5
|
+
import type { DocumentTableColumnWidthType } from '../work-document-table-column-widths';
|
|
5
6
|
export declare const PIXELS_PER_CENTIMETER: number;
|
|
6
7
|
export type DocumentTablePropertiesTab = 'table' | 'row' | 'column' | 'cell';
|
|
7
8
|
export interface DocumentTablePropertiesDraft {
|
|
@@ -19,6 +20,7 @@ export interface DocumentTablePropertiesDraft {
|
|
|
19
20
|
repeatHeader: boolean;
|
|
20
21
|
};
|
|
21
22
|
column: {
|
|
23
|
+
widthType: DocumentTableColumnWidthType;
|
|
22
24
|
width: string;
|
|
23
25
|
};
|
|
24
26
|
cell: {
|
|
@@ -48,4 +50,5 @@ export declare function createDocumentTablePropertiesDraft(source: DocumentTable
|
|
|
48
50
|
export declare function documentTablePropertiesErrors(draft: DocumentTablePropertiesDraft): DocumentTablePropertiesErrors;
|
|
49
51
|
export declare function hasDocumentTablePropertiesErrors(errors: DocumentTablePropertiesErrors): boolean;
|
|
50
52
|
export declare function draftForTableWidthType(current: DocumentTablePropertiesDraft, widthType: DocumentTablePreferredWidthType, renderedTableWidth: number | undefined): DocumentTablePropertiesDraft;
|
|
51
|
-
export declare function
|
|
53
|
+
export declare function draftForColumnWidthType(current: DocumentTablePropertiesDraft, widthType: DocumentTableColumnWidthType, source: Pick<DocumentTablePropertiesSource, 'renderedColumnWidth' | 'renderedTableWidth' | 'sizing'>): DocumentTablePropertiesDraft;
|
|
54
|
+
export declare function documentTablePropertyChanges(initial: DocumentTablePropertiesDraft, current: DocumentTablePropertiesDraft, source: Pick<DocumentTablePropertiesSource, 'canRepeatHeader' | 'cellFormat' | 'renderedColumnWidths' | 'renderedTableWidth' | 'sizing'>): DocumentTablePropertyChanges | null;
|
|
@@ -1,54 +1,27 @@
|
|
|
1
1
|
import type { Editor } from '@tiptap/core';
|
|
2
2
|
import type { WorkDocumentCaptionKind } from '../work-document-captions';
|
|
3
3
|
import type { WorkDocumentFieldKind } from '../work-document-fields';
|
|
4
|
-
import type { WorkDocumentNoteKind } from '../work-document-notes';
|
|
5
4
|
import type { WorkDocumentLayoutFont } from '../work-document-fonts';
|
|
6
|
-
import {
|
|
5
|
+
import type { WorkDocumentNoteKind } from '../work-document-notes';
|
|
6
|
+
import type { WorkDocumentSectionLayout } from '../work-types';
|
|
7
|
+
import { type DocumentRibbonTabId } from './document-command-catalog';
|
|
7
8
|
import type { DocumentFindReplaceMode } from './document-find-replace-panel';
|
|
9
|
+
import type { DocumentLayoutPanelTab } from './document-layout-panel';
|
|
10
|
+
import { type DocumentPageChromeEditingPart } from './document-page-chrome-ribbon';
|
|
11
|
+
import { type DocumentZoomFit } from './document-zoom';
|
|
8
12
|
import { type WorkOfficeFileAction } from './work-office-chrome';
|
|
9
|
-
declare const documentRibbonTabs: readonly [{
|
|
10
|
-
readonly id: "home";
|
|
11
|
-
readonly label: "开始";
|
|
12
|
-
}, {
|
|
13
|
-
readonly id: "insert";
|
|
14
|
-
readonly label: "插入";
|
|
15
|
-
}, {
|
|
16
|
-
readonly id: "page";
|
|
17
|
-
readonly label: "页面布局";
|
|
18
|
-
readonly compactLabel: "布局";
|
|
19
|
-
}, {
|
|
20
|
-
readonly id: "references";
|
|
21
|
-
readonly label: "引用";
|
|
22
|
-
}, {
|
|
23
|
-
readonly id: "review";
|
|
24
|
-
readonly label: "审阅";
|
|
25
|
-
}, {
|
|
26
|
-
readonly id: "view";
|
|
27
|
-
readonly label: "视图";
|
|
28
|
-
}];
|
|
29
|
-
declare const documentPictureRibbonTab: {
|
|
30
|
-
readonly id: "picture";
|
|
31
|
-
readonly label: "图片";
|
|
32
|
-
};
|
|
33
|
-
declare const documentTableRibbonTabs: readonly [{
|
|
34
|
-
readonly id: "tableDesign";
|
|
35
|
-
readonly label: "表格设计";
|
|
36
|
-
readonly compactLabel: "设计";
|
|
37
|
-
}, {
|
|
38
|
-
readonly id: "tableLayout";
|
|
39
|
-
readonly label: "表格布局";
|
|
40
|
-
readonly compactLabel: "布局";
|
|
41
|
-
}];
|
|
42
|
-
declare const documentPageChromeRibbonTab: {
|
|
43
|
-
readonly id: "pageChrome";
|
|
44
|
-
readonly label: "页眉和页脚";
|
|
45
|
-
readonly compactLabel: "页眉页脚";
|
|
46
|
-
};
|
|
47
|
-
type DocumentRibbonTabId = (typeof documentRibbonTabs)[number]['id'] | typeof documentPictureRibbonTab.id | (typeof documentTableRibbonTabs)[number]['id'] | typeof documentPageChromeRibbonTab.id;
|
|
48
13
|
export type DocumentViewMode = 'page' | 'web';
|
|
49
14
|
interface DocumentToolbarProps {
|
|
50
15
|
editor: Editor;
|
|
16
|
+
defaultRibbonCollapsed?: boolean;
|
|
17
|
+
history?: {
|
|
18
|
+
canRedo: boolean;
|
|
19
|
+
canUndo: boolean;
|
|
20
|
+
redo: () => boolean;
|
|
21
|
+
undo: () => boolean;
|
|
22
|
+
};
|
|
51
23
|
layoutOpen: boolean;
|
|
24
|
+
layout: WorkDocumentSectionLayout;
|
|
52
25
|
layoutFonts?: readonly WorkDocumentLayoutFont[];
|
|
53
26
|
navigationOpen: boolean;
|
|
54
27
|
pageColor: string;
|
|
@@ -65,6 +38,8 @@ interface DocumentToolbarProps {
|
|
|
65
38
|
onClosePageChrome: () => void;
|
|
66
39
|
onTogglePageChromePageNumber: () => void;
|
|
67
40
|
onToggleLayout: () => void;
|
|
41
|
+
onLayoutChange: (layout: WorkDocumentSectionLayout) => void;
|
|
42
|
+
onOpenLayout: (target: DocumentLayoutPanelTab) => void;
|
|
68
43
|
onToggleNavigation: () => void;
|
|
69
44
|
onTogglePageNumbers: () => void;
|
|
70
45
|
onToggleRulers: () => void;
|
|
@@ -72,6 +47,7 @@ interface DocumentToolbarProps {
|
|
|
72
47
|
onToggleSpellcheck: () => void;
|
|
73
48
|
onViewModeChange: (mode: DocumentViewMode) => void;
|
|
74
49
|
onZoomChange: (zoom: number) => void;
|
|
50
|
+
onZoomFit: (fit: DocumentZoomFit) => void;
|
|
75
51
|
onInsertSection: () => void;
|
|
76
52
|
onInsertNote: (kind: WorkDocumentNoteKind) => void;
|
|
77
53
|
onInsertCaption: (kind: WorkDocumentCaptionKind) => void;
|
|
@@ -94,7 +70,8 @@ interface DocumentToolbarProps {
|
|
|
94
70
|
onRibbonTabChange?: (tab: DocumentRibbonTabId) => boolean | undefined | Promise<boolean | undefined>;
|
|
95
71
|
onToggleTrackChanges: () => void;
|
|
96
72
|
onToggleChanges: () => void;
|
|
73
|
+
onOpenWordCount: () => void;
|
|
97
74
|
onOpenFindReplace: (mode: DocumentFindReplaceMode) => void;
|
|
98
75
|
}
|
|
99
|
-
export declare function DocumentToolbar({ editor, layoutOpen, layoutFonts, navigationOpen, pageColor, showPageNumbers, showRulers, spellcheckEnabled, viewMode, zoom, pageChromeEditor, pageChromeEditingPart, pageChromeShowPageNumber, onRequestImage, onPageChromeEditingPartChange, onClosePageChrome, onTogglePageChromePageNumber, onToggleLayout, onToggleNavigation, onTogglePageNumbers, onToggleRulers, onPageColorChange, onToggleSpellcheck, onViewModeChange, onZoomChange, onInsertSection, onInsertNote, onInsertCaption, onInsertCrossReference, citationsOpen, citationSourceCount, onToggleCitations, onInsertField, onRefreshFields, canInsertComment, onInsertComment, commentsOpen, commentCount, onToggleComments, trackChanges, changesOpen, changeCount, findReplaceMode, fileActions, onRibbonTabChange, onToggleTrackChanges, onToggleChanges, onOpenFindReplace, }: DocumentToolbarProps): import("react").JSX.Element;
|
|
76
|
+
export declare function DocumentToolbar({ editor, defaultRibbonCollapsed, history, layoutOpen, layout, layoutFonts, navigationOpen, pageColor, showPageNumbers, showRulers, spellcheckEnabled, viewMode, zoom, pageChromeEditor, pageChromeEditingPart, pageChromeShowPageNumber, onRequestImage, onPageChromeEditingPartChange, onClosePageChrome, onTogglePageChromePageNumber, onToggleLayout, onLayoutChange, onOpenLayout, onToggleNavigation, onTogglePageNumbers, onToggleRulers, onPageColorChange, onToggleSpellcheck, onViewModeChange, onZoomChange, onZoomFit, onInsertSection, onInsertNote, onInsertCaption, onInsertCrossReference, citationsOpen, citationSourceCount, onToggleCitations, onInsertField, onRefreshFields, canInsertComment, onInsertComment, commentsOpen, commentCount, onToggleComments, trackChanges, changesOpen, changeCount, findReplaceMode, fileActions, onRibbonTabChange, onToggleTrackChanges, onToggleChanges, onOpenWordCount, onOpenFindReplace, }: DocumentToolbarProps): import("react").JSX.Element;
|
|
100
77
|
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Editor } from '@tiptap/core';
|
|
2
|
+
export interface DocumentWpsShortcutCallbacks {
|
|
3
|
+
canInsertComment: boolean;
|
|
4
|
+
canRefreshFields: boolean;
|
|
5
|
+
onInsertComment: () => void;
|
|
6
|
+
onOpenWordCount: () => void;
|
|
7
|
+
onRefreshFields: () => void;
|
|
8
|
+
onToggleSpellcheck: () => void;
|
|
9
|
+
onToggleTrackChanges: () => void;
|
|
10
|
+
}
|
|
11
|
+
export type DocumentWpsShortcutEvent = Pick<KeyboardEvent, 'altKey' | 'code' | 'ctrlKey' | 'key' | 'metaKey' | 'shiftKey'>;
|
|
12
|
+
export declare function runDocumentWpsShortcut(editor: Editor, event: DocumentWpsShortcutEvent, callbacks: DocumentWpsShortcutCallbacks): boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const MIN_DOCUMENT_ZOOM = 50;
|
|
2
|
+
export declare const MAX_DOCUMENT_ZOOM = 200;
|
|
3
|
+
export type DocumentZoomFit = 'page' | 'width';
|
|
4
|
+
export interface DocumentZoomFitMetrics {
|
|
5
|
+
pageHeight: number;
|
|
6
|
+
pageWidth: number;
|
|
7
|
+
viewportHeight: number;
|
|
8
|
+
viewportWidth: number;
|
|
9
|
+
viewportPadding: {
|
|
10
|
+
top: number;
|
|
11
|
+
right: number;
|
|
12
|
+
bottom: number;
|
|
13
|
+
left: number;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export declare function clampDocumentZoom(zoom: number): number;
|
|
17
|
+
export declare function documentZoomForFit(fit: DocumentZoomFit, metrics: DocumentZoomFitMetrics): number;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export type MarkdownEditingSurface = 'source' | 'visual';
|
|
2
|
-
export declare function restoreMarkdownEditingSurfaceFocus(getTarget: () => HTMLElement | null): void;
|
|
2
|
+
export declare function restoreMarkdownEditingSurfaceFocus(getTarget: () => HTMLElement | null, focusOrigin?: Element | null): void;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import type { Extensions } from '@tiptap/core';
|
|
2
|
+
import type { WorkOfficeCollaborationSession } from '../../../collaboration/office-collaboration';
|
|
2
3
|
import { markdownTaskCheckboxLabel } from '../work-markdown-extensions';
|
|
3
4
|
import { type WorkGetMarkdownSelectionMenuItems } from '../work-markdown-selection-menu';
|
|
4
5
|
import type { WorkMarkdownContent } from '../work-types';
|
|
5
6
|
import { type WorkOfficeFileAction } from './work-office-chrome';
|
|
6
7
|
export { markdownTaskCheckboxLabel };
|
|
7
8
|
export interface MarkdownEditorProps {
|
|
9
|
+
/** The host must initialize and synchronize this session before mounting. */
|
|
10
|
+
collaboration?: WorkOfficeCollaborationSession;
|
|
11
|
+
autoFocus?: boolean;
|
|
8
12
|
content: WorkMarkdownContent;
|
|
9
13
|
extensions?: Extensions;
|
|
10
14
|
preview: boolean;
|
|
@@ -13,4 +17,4 @@ export interface MarkdownEditorProps {
|
|
|
13
17
|
getSelectionMenuItems?: WorkGetMarkdownSelectionMenuItems;
|
|
14
18
|
onChange: (content: WorkMarkdownContent) => void;
|
|
15
19
|
}
|
|
16
|
-
export declare function MarkdownEditor({ content, extensions: additionalExtensions, preview, saveStatus, fileActions, getSelectionMenuItems, onChange, }: MarkdownEditorProps): import("react").JSX.Element;
|
|
20
|
+
export declare function MarkdownEditor({ autoFocus, collaboration, content, extensions: additionalExtensions, preview, saveStatus, fileActions, getSelectionMenuItems, onChange, }: MarkdownEditorProps): import("react").JSX.Element;
|
|
@@ -2,9 +2,10 @@ import type { Editor } from '@tiptap/core';
|
|
|
2
2
|
import type { MarkdownSourceCommand, MarkdownSourceSelectionState } from './markdown-source-commands';
|
|
3
3
|
import type { MarkdownViewMode } from './markdown-workspace';
|
|
4
4
|
import { type WorkOfficeFileAction } from './work-office-chrome';
|
|
5
|
-
export declare function MarkdownToolbar({ editor, fileActions, sourceEditing, canSourceRedo, canSourceUndo, viewMode, getSourceFocusTarget, getSourceSelection, onSourceCommand, onSourceRedo, onSourceReplace, onSourceUndo, onViewModeChange, }: {
|
|
5
|
+
export declare function MarkdownToolbar({ editor, fileActions, collaborative, sourceEditing, canSourceRedo, canSourceUndo, viewMode, getSourceFocusTarget, getSourceSelection, onSourceCommand, onSourceRedo, onSourceReplace, onSourceUndo, onViewModeChange, }: {
|
|
6
6
|
editor: Editor;
|
|
7
7
|
fileActions?: readonly WorkOfficeFileAction[];
|
|
8
|
+
collaborative: boolean;
|
|
8
9
|
sourceEditing: boolean;
|
|
9
10
|
canSourceRedo: boolean;
|
|
10
11
|
canSourceUndo: boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type WorkOfficeCollaborationSession } from '../../../collaboration/office-collaboration';
|
|
3
|
+
import type { WorkOfficeCollaborationParticipant, WorkOfficeCollaborationPresence } from '../../../collaboration/office-collaboration-presence';
|
|
4
|
+
type OfficeCollaborationLocationNavigator = (participant: WorkOfficeCollaborationParticipant) => boolean;
|
|
5
|
+
export declare function OfficeCollaborationPresenceProvider({ children, presence, }: {
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
presence?: WorkOfficeCollaborationPresence;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
9
|
+
export declare function useOfficeCollaborationPresence(): WorkOfficeCollaborationPresence | undefined;
|
|
10
|
+
export declare function useOfficeCollaborationLocationNavigator(navigator: OfficeCollaborationLocationNavigator): void;
|
|
11
|
+
export declare function useOfficeCollaborationParticipantNavigation(): OfficeCollaborationLocationNavigator | undefined;
|
|
12
|
+
export declare function assertOfficeCollaborationPresencePairing({ expectedKind, presence, session, }: {
|
|
13
|
+
expectedKind: WorkOfficeCollaborationSession['kind'];
|
|
14
|
+
presence?: WorkOfficeCollaborationPresence;
|
|
15
|
+
session?: WorkOfficeCollaborationSession;
|
|
16
|
+
}): void;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Editor } from '@tiptap/core';
|
|
2
|
+
import { type CSSProperties, type RefObject } from 'react';
|
|
3
|
+
import type { WorkOfficeCollaborationParticipant, WorkOfficeCollaborationPresenceLocation, WorkOfficeCollaborationPresenceSnapshot } from '../../../collaboration/office-collaboration-presence';
|
|
4
|
+
export type OfficePresenceColorStyle = CSSProperties & {
|
|
5
|
+
'--work-office-presence-color': string;
|
|
6
|
+
};
|
|
7
|
+
export declare function useOfficePresenceSnapshot(): WorkOfficeCollaborationPresenceSnapshot | undefined;
|
|
8
|
+
export declare function useOfficeRemoteParticipants(): readonly WorkOfficeCollaborationParticipant[];
|
|
9
|
+
export declare function useOfficePublishPresenceLocation(location: WorkOfficeCollaborationPresenceLocation | null): void;
|
|
10
|
+
export declare function OfficePresenceAvatar({ compact, participant, }: {
|
|
11
|
+
compact?: boolean;
|
|
12
|
+
participant: WorkOfficeCollaborationParticipant;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
14
|
+
export declare function officePresenceColorStyle(participant: WorkOfficeCollaborationParticipant): OfficePresenceColorStyle;
|
|
15
|
+
export declare function officePresenceColor(participant: WorkOfficeCollaborationParticipant): string;
|
|
16
|
+
export declare function OfficeTiptapPresenceLayer({ containerRef, editor, kind, markdownSurface, }: {
|
|
17
|
+
containerRef: RefObject<HTMLElement | null>;
|
|
18
|
+
editor: Editor | null;
|
|
19
|
+
kind: 'document' | 'markdown';
|
|
20
|
+
markdownSurface?: 'visual';
|
|
21
|
+
}): import("react").JSX.Element | null;
|
|
22
|
+
export declare function MarkdownSourcePresenceLayer({ markdown, sourceRef, }: {
|
|
23
|
+
markdown: string;
|
|
24
|
+
sourceRef: RefObject<HTMLTextAreaElement | null>;
|
|
25
|
+
}): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
type OfficeEditorFocusOrigin = Element | null;
|
|
3
|
+
/**
|
|
4
|
+
* Captures the focused opener before a lazy editor suspends so the mounted
|
|
5
|
+
* editing surface can claim that focus without overriding later navigation.
|
|
6
|
+
*/
|
|
7
|
+
export declare function OfficeEditorFocusHandoff({ children, }: {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
10
|
+
/** Returns the pre-suspense opener, or captures the local mount origin. */
|
|
11
|
+
export declare function useOfficeEditorFocusOrigin(): OfficeEditorFocusOrigin;
|
|
12
|
+
interface OfficeEditorInitialFocusOptions {
|
|
13
|
+
enabled: boolean;
|
|
14
|
+
getTarget: () => HTMLElement | null;
|
|
15
|
+
isTargetReady?: (target: HTMLElement) => boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Claims first-open focus only after the editing target is ready, then keeps
|
|
19
|
+
* it stable across the brief DOM replacement window used by rich editors.
|
|
20
|
+
*/
|
|
21
|
+
export declare function useOfficeEditorInitialFocus({ enabled, getTarget, isTargetReady, }: OfficeEditorInitialFocusOptions): void;
|
|
22
|
+
/**
|
|
23
|
+
* Returns a cleanup that cancels the bounded first-open focus handoff.
|
|
24
|
+
* Deliberate pointer navigation, Tab navigation, or unrelated focus wins.
|
|
25
|
+
*/
|
|
26
|
+
export declare function stabilizeOfficeEditorInitialFocus(getTarget: () => HTMLElement | null, focusOrigin?: Element | null, isTargetReady?: (target: HTMLElement) => boolean): () => void;
|
|
27
|
+
export {};
|
|
@@ -15,6 +15,11 @@ export interface PdfAnnotationControllerState {
|
|
|
15
15
|
export interface PdfAnnotationController {
|
|
16
16
|
state: PdfAnnotationControllerState;
|
|
17
17
|
deleteSelection: () => void;
|
|
18
|
+
getSelectionLocation: () => {
|
|
19
|
+
annotationId: string;
|
|
20
|
+
pageIndex: number;
|
|
21
|
+
} | null;
|
|
22
|
+
locateAnnotation: (pageIndex: number, annotationId: string) => boolean;
|
|
18
23
|
setAnnotationColor: (color: string) => void;
|
|
19
24
|
setAnnotationOpacity: (opacity: number) => void;
|
|
20
25
|
setAnnotationStrokeWidth: (strokeWidth: number) => void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type PluginRegistry } from '@embedpdf/react-pdf-viewer';
|
|
2
|
+
import type { WorkOfficeCollaborationSession } from '../../../collaboration/office-collaboration';
|
|
3
|
+
import { type WorkOfficePdfCollaborationBinding } from '../../../collaboration/office-pdf-collaboration';
|
|
4
|
+
export interface WorkPdfCollaborationProjection {
|
|
5
|
+
readonly binding: WorkOfficePdfCollaborationBinding;
|
|
6
|
+
readonly ready: Promise<void>;
|
|
7
|
+
subscribeError(listener: (error: unknown) => void): () => void;
|
|
8
|
+
destroy(): void;
|
|
9
|
+
}
|
|
10
|
+
export declare function createWorkPdfCollaborationProjection(registry: PluginRegistry, session: WorkOfficeCollaborationSession): WorkPdfCollaborationProjection;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare const PDF_EVIDENCE_COORDINATE_BASIS: 1000000;
|
|
2
|
+
export interface PdfEvidenceBounds {
|
|
3
|
+
bottom: number;
|
|
4
|
+
left: number;
|
|
5
|
+
right: number;
|
|
6
|
+
top: number;
|
|
7
|
+
}
|
|
8
|
+
export interface PdfEvidenceRegion {
|
|
9
|
+
bounds: PdfEvidenceBounds;
|
|
10
|
+
id: string;
|
|
11
|
+
label?: string;
|
|
12
|
+
sourceRegionIds: readonly string[];
|
|
13
|
+
targetIds: readonly string[];
|
|
14
|
+
}
|
|
15
|
+
export interface PdfEvidencePage {
|
|
16
|
+
canvasHeight: number;
|
|
17
|
+
canvasId: string;
|
|
18
|
+
canvasKind: 'source';
|
|
19
|
+
canvasWidth: number;
|
|
20
|
+
coordinateBasis: typeof PDF_EVIDENCE_COORDINATE_BASIS;
|
|
21
|
+
pageNumber: number;
|
|
22
|
+
regions: readonly PdfEvidenceRegion[];
|
|
23
|
+
renderProfileSha256: string;
|
|
24
|
+
rotationDegrees: 0 | 90 | 180 | 270;
|
|
25
|
+
sourceSha256: string;
|
|
26
|
+
}
|
|
27
|
+
export interface PdfEvidenceRegionLocation {
|
|
28
|
+
pageNumber: number;
|
|
29
|
+
}
|
|
30
|
+
export interface PdfEvidenceOverlay {
|
|
31
|
+
coordinateBasis: typeof PDF_EVIDENCE_COORDINATE_BASIS;
|
|
32
|
+
loadPage: (pageNumber: number, signal: AbortSignal) => Promise<PdfEvidencePage | null>;
|
|
33
|
+
locateRegion?: (regionId: string, signal: AbortSignal) => Promise<PdfEvidenceRegionLocation | null>;
|
|
34
|
+
renderProfileSha256: string;
|
|
35
|
+
sourceSha256: string;
|
|
36
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type DocumentManagerCapability, type PluginRegistry, type ScrollCapability, type ViewportCapability, type ZoomCapability } from '@embedpdf/react-pdf-viewer';
|
|
2
|
+
import { type PdfEvidenceBounds, type PdfEvidenceOverlay, type PdfEvidencePage, type PdfEvidenceRegion } from './pdf-evidence-contract';
|
|
3
|
+
export { PDF_EVIDENCE_COORDINATE_BASIS, type PdfEvidenceBounds, type PdfEvidenceOverlay, type PdfEvidencePage, type PdfEvidenceRegion, type PdfEvidenceRegionLocation, } from './pdf-evidence-contract';
|
|
4
|
+
interface PdfEvidenceOverlayLayerProps {
|
|
5
|
+
currentPage: number;
|
|
6
|
+
evidenceOverlay: PdfEvidenceOverlay;
|
|
7
|
+
onEvidenceRegionSelect?: (region: PdfEvidenceRegion) => void;
|
|
8
|
+
registry: PluginRegistry;
|
|
9
|
+
selectedEvidenceRegionId?: string;
|
|
10
|
+
sourceKey?: string;
|
|
11
|
+
}
|
|
12
|
+
interface EvidenceRuntime {
|
|
13
|
+
documentManager: DocumentManagerCapability;
|
|
14
|
+
scroll: ScrollCapability;
|
|
15
|
+
viewport: ViewportCapability;
|
|
16
|
+
zoom: ZoomCapability | null;
|
|
17
|
+
}
|
|
18
|
+
export declare function PdfEvidenceOverlayLayer({ currentPage, evidenceOverlay, onEvidenceRegionSelect, registry, selectedEvidenceRegionId, sourceKey, }: PdfEvidenceOverlayLayerProps): import("react").JSX.Element | null;
|
|
19
|
+
export declare function validatePdfEvidencePage(page: PdfEvidencePage, overlay: PdfEvidenceOverlay, runtime: EvidenceRuntime, requestedPage: number): void;
|
|
20
|
+
export declare function pdfEvidenceBoundsToPageRect(bounds: PdfEvidenceBounds, width: number, height: number): {
|
|
21
|
+
origin: {
|
|
22
|
+
x: number;
|
|
23
|
+
y: number;
|
|
24
|
+
};
|
|
25
|
+
size: {
|
|
26
|
+
height: number;
|
|
27
|
+
width: number;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export declare function pdfEvidencePointToUnrotatedPage(point: {
|
|
31
|
+
x: number;
|
|
32
|
+
y: number;
|
|
33
|
+
}, pageWidth: number, pageHeight: number, rotation: 0 | 1 | 2 | 3): {
|
|
34
|
+
x: number;
|
|
35
|
+
y: number;
|
|
36
|
+
};
|
|
37
|
+
export declare function pdfEvidenceHorizontalCenterOffset(viewportClientWidth: number, viewportGap: number, contentWidth: number, zoom: number): number;
|
|
@@ -9,12 +9,13 @@ interface PdfPageNavigationControl {
|
|
|
9
9
|
onOpen: () => void;
|
|
10
10
|
toggleRef: RefObject<HTMLButtonElement | null>;
|
|
11
11
|
}
|
|
12
|
-
export declare function PdfToolbar({ annotationState, can, commands, editable, pageNavigation, saveLabel, saveState, searchInputRef, state, }: {
|
|
12
|
+
export declare function PdfToolbar({ annotationState, can, commands, editable, pageNavigation, saveAvailable, saveLabel, saveState, searchInputRef, state, }: {
|
|
13
13
|
annotationState: PdfAnnotationControllerState;
|
|
14
14
|
can: PdfEditorCanCommands;
|
|
15
15
|
commands: PdfEditorCommands;
|
|
16
16
|
editable: boolean;
|
|
17
17
|
pageNavigation?: PdfPageNavigationControl;
|
|
18
|
+
saveAvailable?: boolean;
|
|
18
19
|
saveLabel: string;
|
|
19
20
|
saveState: PdfSaveState;
|
|
20
21
|
searchInputRef: RefObject<HTMLInputElement | null>;
|
|
@@ -44,5 +44,11 @@ export interface PdfViewerController {
|
|
|
44
44
|
zoomIn: () => void;
|
|
45
45
|
zoomOut: () => void;
|
|
46
46
|
}
|
|
47
|
+
export interface PdfViewerHistoryOverride {
|
|
48
|
+
canRedo: boolean;
|
|
49
|
+
canUndo: boolean;
|
|
50
|
+
redo: () => void;
|
|
51
|
+
undo: () => void;
|
|
52
|
+
}
|
|
47
53
|
export declare const initialPdfViewerControllerState: PdfViewerControllerState;
|
|
48
|
-
export declare function usePdfViewerController(registry: PluginRegistry | null): PdfViewerController;
|
|
54
|
+
export declare function usePdfViewerController(registry: PluginRegistry | null, historyOverride?: PdfViewerHistoryOverride): PdfViewerController;
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
import { type UISchema } from '@embedpdf/react-pdf-viewer';
|
|
2
|
+
import type { WorkOfficeCollaborationSession } from '../../../collaboration/office-collaboration';
|
|
3
|
+
import type { WorkPdfCollaborationContent } from '../../../collaboration/office-pdf-collaboration-types';
|
|
4
|
+
import type { PdfEvidenceOverlay, PdfEvidenceRegion } from './pdf-evidence-contract';
|
|
2
5
|
export declare const a3sPdfUiSchema: UISchema;
|
|
3
6
|
export interface PdfViewerProps {
|
|
7
|
+
collaboration?: WorkOfficeCollaborationSession;
|
|
8
|
+
evidenceOverlay?: PdfEvidenceOverlay;
|
|
4
9
|
fileName?: string;
|
|
5
10
|
loadSource: () => Promise<Blob>;
|
|
11
|
+
onCollaborationChange?: (content: WorkPdfCollaborationContent) => void;
|
|
12
|
+
onEvidenceRegionSelect?: (region: PdfEvidenceRegion) => void;
|
|
13
|
+
onPageChange?: (pageNumber: number) => void;
|
|
6
14
|
onSave?: (pdf: Blob) => Promise<boolean>;
|
|
7
15
|
saveLabel?: string;
|
|
16
|
+
selectedEvidenceRegionId?: string;
|
|
8
17
|
sourceKey?: string;
|
|
9
18
|
wasmUrl?: string;
|
|
19
|
+
worker?: boolean;
|
|
10
20
|
}
|
|
11
|
-
export declare function PdfViewer({ fileName, loadSource, onSave, saveLabel, sourceKey, wasmUrl, }: PdfViewerProps): import("react").JSX.Element;
|
|
21
|
+
export declare function PdfViewer({ collaboration, evidenceOverlay, fileName, loadSource, onCollaborationChange, onEvidenceRegionSelect, onPageChange, onSave, saveLabel, selectedEvidenceRegionId, sourceKey, wasmUrl, worker, }: PdfViewerProps): import("react").JSX.Element;
|
|
@@ -7,6 +7,7 @@ export interface PresentationWorkspaceFocusState extends PresentationObjectFocus
|
|
|
7
7
|
selectedSlideId: string;
|
|
8
8
|
viewMode: 'normal' | 'sorter';
|
|
9
9
|
}
|
|
10
|
-
export declare function restorePresentationObjectFocus(container: HTMLElement | null, getState: () => PresentationObjectFocusState): void;
|
|
11
|
-
export declare function restorePresentationWorkspaceFocus(root: HTMLElement | null, getState: () => PresentationWorkspaceFocusState): void;
|
|
10
|
+
export declare function restorePresentationObjectFocus(container: HTMLElement | null, getState: () => PresentationObjectFocusState, focusOrigin?: Element | null): void;
|
|
11
|
+
export declare function restorePresentationWorkspaceFocus(root: HTMLElement | null, getState: () => PresentationWorkspaceFocusState, focusOrigin?: Element | null): void;
|
|
12
|
+
export declare function presentationWorkspaceFocusTarget(root: HTMLElement, state: PresentationWorkspaceFocusState): HTMLElement | undefined;
|
|
12
13
|
export declare function presentationCommandsWithObjectFocus(commands: PresentationEditorCommands, restoreFocus: () => void): PresentationEditorCommands;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import type { WorkOfficeCollaborationSession } from '../../../collaboration/office-collaboration';
|
|
1
2
|
import type { WorkEditorAgentRequest } from '../work-agent-request';
|
|
2
3
|
import type { WorkPresentationContent } from '../work-types';
|
|
3
4
|
import type { WorkOfficeFileAction } from './work-office-chrome';
|
|
4
5
|
export type PresentationDesignMode = 'slide' | 'layout' | 'master';
|
|
5
6
|
export interface PresentationEditorProps {
|
|
7
|
+
autoFocus?: boolean;
|
|
8
|
+
collaboration?: WorkOfficeCollaborationSession;
|
|
6
9
|
content: WorkPresentationContent;
|
|
7
10
|
preview: boolean;
|
|
8
11
|
saveStatus?: string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PresentationEditorProps } from './presentation-editor-types';
|
|
2
2
|
export type { PresentationEditorProps } from './presentation-editor-types';
|
|
3
|
-
export declare function PresentationEditor(props: PresentationEditorProps): import("react").JSX.Element
|
|
3
|
+
export declare function PresentationEditor(props: PresentationEditorProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Selection } from '@fortune-sheet/core';
|
|
2
|
+
import type { WorkSpreadsheetContent, WorkSpreadsheetSheet } from '../work-types';
|
|
3
|
+
export interface SpreadsheetAutoFilterRange {
|
|
4
|
+
row: [number, number];
|
|
5
|
+
column: [number, number];
|
|
6
|
+
}
|
|
7
|
+
export declare function spreadsheetAutoFilterRange(sheet: WorkSpreadsheetSheet, selection: Selection): SpreadsheetAutoFilterRange | null;
|
|
8
|
+
export declare function spreadsheetAutoFilterHeaderColumn(sheet: WorkSpreadsheetSheet | undefined, selection: Selection): number | null;
|
|
9
|
+
export declare function toggleSpreadsheetAutoFilter(content: WorkSpreadsheetContent, sheetId: string, selection: Selection): WorkSpreadsheetContent | null;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { Selection, Sheet } from '@fortune-sheet/core';
|
|
2
|
+
export type SpreadsheetCellClearMode = 'all' | 'formats' | 'contents' | 'comments' | 'hyperlinks';
|
|
3
|
+
export declare function clearSpreadsheetSheetSelection(sheet: Sheet, selection: Pick<Selection, 'row' | 'column'>, mode: SpreadsheetCellClearMode): Sheet;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { WorkSpreadsheetSheet } from '../work-types';
|
|
2
|
+
export type SpreadsheetCellMergeCommand = 'merge-and-center' | 'merge-cells' | 'merge-across' | 'unmerge-cells' | 'unmerge-and-fill';
|
|
3
|
+
export interface SpreadsheetCellMergeRange {
|
|
4
|
+
row: number[];
|
|
5
|
+
column: number[];
|
|
6
|
+
}
|
|
7
|
+
export interface SpreadsheetCellMergeApiCall {
|
|
8
|
+
name: string;
|
|
9
|
+
args: unknown[];
|
|
10
|
+
}
|
|
11
|
+
export declare function canApplySpreadsheetCellMerge(sheet: WorkSpreadsheetSheet | undefined, range: SpreadsheetCellMergeRange, command: SpreadsheetCellMergeCommand): boolean;
|
|
12
|
+
export declare function spreadsheetCellMergeApiCalls(sheet: WorkSpreadsheetSheet | undefined, sheetId: string, range: SpreadsheetCellMergeRange, command: SpreadsheetCellMergeCommand): SpreadsheetCellMergeApiCall[];
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import { type SpreadsheetClipboardPort } from './spreadsheet-context-menu';
|
|
2
1
|
export interface SpreadsheetClipboardShortcutOptions {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
pasteCells(values: readonly (readonly unknown[])[]): boolean;
|
|
6
|
-
readSelectionText(): string | null;
|
|
7
|
-
restoreFocus(): void;
|
|
2
|
+
canExecute(): boolean;
|
|
3
|
+
execute(): boolean;
|
|
8
4
|
}
|
|
9
|
-
export declare function runSpreadsheetClipboardShortcut(event: KeyboardEvent,
|
|
5
|
+
export declare function runSpreadsheetClipboardShortcut(event: KeyboardEvent, canExecute: SpreadsheetClipboardShortcutOptions['canExecute'], execute: SpreadsheetClipboardShortcutOptions['execute']): boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Presence } from '@fortune-sheet/core';
|
|
2
|
+
import type { WorkbookInstance } from '@fortune-sheet/react';
|
|
3
|
+
import type { WorkOfficeCollaborationParticipant } from '../../../collaboration/office-collaboration-presence';
|
|
4
|
+
import type { WorkSpreadsheetContent } from '../work-types';
|
|
5
|
+
export declare function useSpreadsheetCollaborationPresenceProjection({ content, workbook, }: {
|
|
6
|
+
content: WorkSpreadsheetContent;
|
|
7
|
+
workbook: WorkbookInstance | null;
|
|
8
|
+
}): void;
|
|
9
|
+
export declare function spreadsheetPresenceProjection(content: WorkSpreadsheetContent, participants: readonly WorkOfficeCollaborationParticipant[]): Presence[];
|