@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
|
@@ -1,17 +1,45 @@
|
|
|
1
1
|
import { type Editor } from '@tiptap/core';
|
|
2
|
-
|
|
2
|
+
import { type WorkDocumentImageWrapContour, type WorkDocumentImageWrapSide } from './work-document-image-wrap-contour';
|
|
3
|
+
export type WorkDocumentImageLayout = 'inline' | 'square' | 'tight' | 'through' | 'topBottom' | 'none';
|
|
3
4
|
export type WorkDocumentImageAlignment = 'left' | 'center' | 'right';
|
|
5
|
+
export type WorkDocumentImageHorizontalReference = 'column' | 'margin' | 'page';
|
|
6
|
+
export type WorkDocumentImageVerticalReference = 'paragraph' | 'margin' | 'page';
|
|
7
|
+
export interface WorkDocumentImagePosition {
|
|
8
|
+
horizontalOffset: number | null;
|
|
9
|
+
verticalOffset: number | null;
|
|
10
|
+
horizontalReference: WorkDocumentImageHorizontalReference;
|
|
11
|
+
verticalReference: WorkDocumentImageVerticalReference;
|
|
12
|
+
}
|
|
13
|
+
export interface WorkDocumentImageCrop {
|
|
14
|
+
top: number;
|
|
15
|
+
right: number;
|
|
16
|
+
bottom: number;
|
|
17
|
+
left: number;
|
|
18
|
+
}
|
|
19
|
+
export interface WorkDocumentImageLayer {
|
|
20
|
+
relativeHeight: number;
|
|
21
|
+
behindDocument: boolean;
|
|
22
|
+
allowOverlap: boolean;
|
|
23
|
+
layoutInCell: boolean;
|
|
24
|
+
lockAnchor: boolean;
|
|
25
|
+
}
|
|
4
26
|
export interface WorkDocumentImageLayoutOptions {
|
|
5
27
|
layout: WorkDocumentImageLayout;
|
|
6
28
|
alignment: WorkDocumentImageAlignment;
|
|
7
29
|
wrapDistance: number;
|
|
30
|
+
wrapSide: WorkDocumentImageWrapSide;
|
|
8
31
|
}
|
|
9
32
|
export interface WorkDocumentImageProperties extends WorkDocumentImageLayoutOptions {
|
|
10
33
|
width: number | null;
|
|
11
34
|
height: number | null;
|
|
12
35
|
lockAspectRatio: boolean;
|
|
13
36
|
alternativeText: string;
|
|
37
|
+
position?: WorkDocumentImagePosition | null;
|
|
38
|
+
crop?: WorkDocumentImageCrop | null;
|
|
39
|
+
contour?: WorkDocumentImageWrapContour | null;
|
|
40
|
+
layer?: WorkDocumentImageLayer | null;
|
|
14
41
|
}
|
|
42
|
+
export type { WorkDocumentImageWrapContour, WorkDocumentImageWrapPoint, WorkDocumentImageWrapSide, } from './work-document-image-wrap-contour';
|
|
15
43
|
export interface DocumentImageCommandOptions {
|
|
16
44
|
restoreFocus?: boolean;
|
|
17
45
|
}
|
|
@@ -24,6 +52,7 @@ declare module '@tiptap/core' {
|
|
|
24
52
|
};
|
|
25
53
|
}
|
|
26
54
|
}
|
|
55
|
+
export declare const MAX_DOCUMENT_IMAGE_RELATIVE_HEIGHT = 4294967295;
|
|
27
56
|
export declare const DocumentImage: import("@tiptap/core").Node<import("@tiptap/extension-image").ImageOptions, any>;
|
|
28
57
|
export declare function documentImageLayoutOptions(editor: Editor): WorkDocumentImageLayoutOptions;
|
|
29
58
|
export declare function documentImageProperties(editor: Editor): WorkDocumentImageProperties;
|
|
@@ -32,9 +61,25 @@ export declare function setDocumentImageLayoutOptions(editor: Editor, value: Par
|
|
|
32
61
|
export declare function setDocumentImageAlternativeText(editor: Editor, alternativeText: string, options?: DocumentImageCommandOptions): boolean;
|
|
33
62
|
export declare function documentImageAlternativeText(editor: Editor): string;
|
|
34
63
|
export declare function documentImageLayoutFromElement(element: Element): WorkDocumentImageLayoutOptions;
|
|
64
|
+
export declare function documentImagePositionFromElement(element: Element): WorkDocumentImagePosition | null;
|
|
65
|
+
export declare function documentImageCropFromElement(element: Element): WorkDocumentImageCrop | null;
|
|
66
|
+
export declare function documentImageLayerFromElement(element: Element): WorkDocumentImageLayer;
|
|
35
67
|
export declare function normalizeDocumentImageLayoutOptions(value: Partial<Record<keyof WorkDocumentImageLayoutOptions, unknown>>): WorkDocumentImageLayoutOptions;
|
|
36
68
|
export declare function normalizeDocumentImageLayout(value: unknown): WorkDocumentImageLayout;
|
|
37
69
|
export declare function normalizeDocumentImageAlignment(value: unknown): WorkDocumentImageAlignment;
|
|
38
70
|
export declare function normalizeDocumentImageWrapDistance(value: unknown): number;
|
|
39
71
|
export declare function normalizeDocumentImageDimension(value: unknown): number | null;
|
|
40
72
|
export declare function normalizeDocumentImageLockAspectRatio(value: unknown): boolean;
|
|
73
|
+
export declare function normalizeDocumentImagePosition(value: Partial<Record<keyof WorkDocumentImagePosition, unknown>>): WorkDocumentImagePosition | null;
|
|
74
|
+
export declare function normalizeDocumentImageOffset(value: unknown): number | null;
|
|
75
|
+
export declare function normalizeDocumentImageHorizontalReference(value: unknown): WorkDocumentImageHorizontalReference;
|
|
76
|
+
export declare function normalizeDocumentImageVerticalReference(value: unknown): WorkDocumentImageVerticalReference;
|
|
77
|
+
export declare function normalizeDocumentImageCrop(value: Partial<Record<'cropBottom' | 'cropLeft' | 'cropRight' | 'cropTop', unknown>>): WorkDocumentImageCrop | null;
|
|
78
|
+
export declare function normalizeDocumentImageCropEdge(value: unknown): number;
|
|
79
|
+
export declare function normalizeDocumentImageLayer(value: Partial<Record<keyof WorkDocumentImageLayer, unknown>>): WorkDocumentImageLayer;
|
|
80
|
+
export declare function normalizeDocumentImageRelativeHeight(value: unknown): number;
|
|
81
|
+
export declare function documentImageLayerCssZIndex(layer: WorkDocumentImageLayer): number;
|
|
82
|
+
export declare function isContourImageLayout(layout: WorkDocumentImageLayout): layout is 'through' | 'tight';
|
|
83
|
+
export declare function wrapsBesideImage(layout: WorkDocumentImageLayout): boolean;
|
|
84
|
+
export declare function applyDocumentImageCropToElement(element: HTMLElement, crop: WorkDocumentImageCrop | null): void;
|
|
85
|
+
export declare function applyDocumentImageLayerToElement(element: HTMLElement, layer: WorkDocumentImageLayer): void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type WorkDocumentImageWrapSide = 'bothSides' | 'left' | 'right' | 'largest';
|
|
2
|
+
export interface WorkDocumentImageWrapPoint {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
}
|
|
6
|
+
export interface WorkDocumentImageWrapContour {
|
|
7
|
+
edited: boolean;
|
|
8
|
+
points: WorkDocumentImageWrapPoint[];
|
|
9
|
+
}
|
|
10
|
+
export declare function normalizeDocumentImageWrapSide(value: unknown): WorkDocumentImageWrapSide;
|
|
11
|
+
export declare function normalizeDocumentImageWrapContour(value: Partial<Record<'edited' | 'points' | 'wrapPolygon' | 'wrapPolygonEdited', unknown>>): WorkDocumentImageWrapContour | null;
|
|
12
|
+
export declare function defaultDocumentImageWrapContour(): WorkDocumentImageWrapContour;
|
|
13
|
+
export declare function documentImageWrapContourFromElement(element: Element): WorkDocumentImageWrapContour | null;
|
|
14
|
+
export declare function serializeDocumentImageWrapPoints(points: readonly WorkDocumentImageWrapPoint[]): string;
|
|
15
|
+
export declare function applyDocumentImageWrapContourToElement(element: HTMLElement, contour: WorkDocumentImageWrapContour | null): void;
|
|
16
|
+
export declare function documentImageWrapContourCss(contour: WorkDocumentImageWrapContour): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OfficeKernelLayoutBlock, OfficeKernelLayoutResult
|
|
1
|
+
import type { OfficeKernelLayoutBlock, OfficeKernelLayoutResult } from '../../kernel/office-kernel-protocol';
|
|
2
2
|
export interface PositionedOfficeKernelLayoutBlock {
|
|
3
3
|
block: OfficeKernelLayoutBlock;
|
|
4
4
|
from: number;
|
|
@@ -14,4 +14,4 @@ export declare function planIncrementalDocumentLayout(previous: {
|
|
|
14
14
|
blocks: readonly PositionedOfficeKernelLayoutBlock[];
|
|
15
15
|
layout: OfficeKernelLayoutResult;
|
|
16
16
|
} | null, next: readonly PositionedOfficeKernelLayoutBlock[], dirtyFrom: number): IncrementalDocumentLayoutPlan;
|
|
17
|
-
export declare function mergeIncrementalDocumentLayout(previous: OfficeKernelLayoutResult, partial: OfficeKernelLayoutResult
|
|
17
|
+
export declare function mergeIncrementalDocumentLayout(previous: OfficeKernelLayoutResult, partial: OfficeKernelLayoutResult): OfficeKernelLayoutResult;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { getSchema } from '@tiptap/core';
|
|
2
|
+
import type { WorkDocumentContent, WorkDocumentNode } from './work-types';
|
|
3
|
+
export declare function workDocumentSchema(): ReturnType<typeof getSchema>;
|
|
4
|
+
export declare function serializeWorkDocumentNode(root: WorkDocumentNode): string;
|
|
2
5
|
export declare function createWorkDocumentModelFromContent(content: WorkDocumentContent): WorkDocumentContent;
|
|
3
6
|
export declare function materializeWorkDocumentContent(content: WorkDocumentContent): WorkDocumentContent;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type DocumentBorderPresentation, type DocumentParagraphBorder } from './work-document-paragraph-borders';
|
|
2
|
+
import type { WorkDocumentMargins } from './work-types';
|
|
3
|
+
export declare const DOCUMENT_PAGE_BORDER_EDGES: readonly ["top", "left", "bottom", "right"];
|
|
4
|
+
export type WorkDocumentPageBorderEdge = (typeof DOCUMENT_PAGE_BORDER_EDGES)[number];
|
|
5
|
+
export type WorkDocumentPageBorderDisplay = 'allPages' | 'firstPage' | 'notFirstPage';
|
|
6
|
+
export type WorkDocumentPageBorderOffsetFrom = 'page' | 'text';
|
|
7
|
+
export type WorkDocumentPageBorderZOrder = 'front' | 'back';
|
|
8
|
+
export interface WorkDocumentPageBorders {
|
|
9
|
+
display?: WorkDocumentPageBorderDisplay;
|
|
10
|
+
offsetFrom?: WorkDocumentPageBorderOffsetFrom;
|
|
11
|
+
zOrder?: WorkDocumentPageBorderZOrder;
|
|
12
|
+
edges: Partial<Record<WorkDocumentPageBorderEdge, DocumentParagraphBorder>>;
|
|
13
|
+
}
|
|
14
|
+
export interface ResolvedDocumentPageBorders {
|
|
15
|
+
display: WorkDocumentPageBorderDisplay;
|
|
16
|
+
offsetFrom: WorkDocumentPageBorderOffsetFrom;
|
|
17
|
+
zOrder: WorkDocumentPageBorderZOrder;
|
|
18
|
+
edges: Partial<Record<WorkDocumentPageBorderEdge, DocumentBorderPresentation>>;
|
|
19
|
+
insets: Record<WorkDocumentPageBorderEdge, number>;
|
|
20
|
+
}
|
|
21
|
+
export declare function normalizeDocumentPageBorders(source: unknown): WorkDocumentPageBorders | null;
|
|
22
|
+
export declare function parseDocumentPageBorders(source: unknown): WorkDocumentPageBorders | null;
|
|
23
|
+
export declare function serializeDocumentPageBorders(source: unknown): string | undefined;
|
|
24
|
+
export declare function documentPageBordersVisible(source: unknown, sectionPage: number): boolean;
|
|
25
|
+
export declare function resolveDocumentPageBorders(source: unknown, margins: WorkDocumentMargins): ResolvedDocumentPageBorders | null;
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
+
export interface WorkLiveDocumentCapturePage {
|
|
2
|
+
height: number;
|
|
3
|
+
left: number;
|
|
4
|
+
top: number;
|
|
5
|
+
width: number;
|
|
6
|
+
}
|
|
1
7
|
export interface WorkLiveDocumentCaptureSurface {
|
|
2
8
|
element: HTMLElement;
|
|
3
9
|
pageCount: number;
|
|
4
10
|
pageGap: number;
|
|
5
11
|
pageHeight: number;
|
|
6
12
|
pageWidth: number;
|
|
13
|
+
pages?: readonly WorkLiveDocumentCapturePage[];
|
|
7
14
|
}
|
|
8
15
|
export interface WorkLiveDocumentCapture {
|
|
9
16
|
backgroundColor: string;
|
|
@@ -12,4 +19,5 @@ export interface WorkLiveDocumentCapture {
|
|
|
12
19
|
viewport: HTMLDivElement;
|
|
13
20
|
}
|
|
14
21
|
export declare function mountWorkLiveDocumentCapture(surface: WorkLiveDocumentCaptureSurface, firstPageIndex?: number, captureHeight?: number): WorkLiveDocumentCapture;
|
|
22
|
+
export declare function positionWorkLiveDocumentCapture(capture: WorkLiveDocumentCapture, surface: WorkLiveDocumentCaptureSurface, pageIndex: number, captureHeight?: number): WorkLiveDocumentCapturePage;
|
|
15
23
|
export declare function normalizeWorkLiveDocumentSnapshot(snapshot: HTMLElement): void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { OfficeKernelPageMetrics } from '../../kernel/office-kernel-protocol';
|
|
2
|
+
export interface DocumentPageFrame {
|
|
3
|
+
height: number;
|
|
4
|
+
left: number;
|
|
5
|
+
page: OfficeKernelPageMetrics;
|
|
6
|
+
pageIndex: number;
|
|
7
|
+
top: number;
|
|
8
|
+
width: number;
|
|
9
|
+
}
|
|
10
|
+
export interface DocumentPageSurfaceGeometry {
|
|
11
|
+
frames: DocumentPageFrame[];
|
|
12
|
+
height: number;
|
|
13
|
+
width: number;
|
|
14
|
+
}
|
|
15
|
+
export declare function documentPageSurfaceGeometry(pages: readonly OfficeKernelPageMetrics[], fallback: OfficeKernelPageMetrics, requestedPageCount?: number): DocumentPageSurfaceGeometry;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { WorkDocumentMargins, WorkDocumentSectionLayout } from './work-types';
|
|
2
|
+
export declare const DOCUMENT_PAGE_MARGIN_KEYS: readonly ["top", "right", "bottom", "left", "header", "footer", "gutter"];
|
|
3
|
+
export type WorkDocumentPageMarginKey = (typeof DOCUMENT_PAGE_MARGIN_KEYS)[number];
|
|
4
|
+
export type WorkDocumentPageMarginEdge = 'top' | 'right' | 'bottom' | 'left';
|
|
5
|
+
export type WorkDocumentPageMarginVerticalEdge = 'top' | 'bottom';
|
|
6
|
+
export type WorkDocumentPageMarginMode = 'clearChrome' | 'fromPageEdge';
|
|
7
|
+
export type WorkDocumentGutterPosition = 'left' | 'right' | 'top';
|
|
8
|
+
/**
|
|
9
|
+
* Canonical Word page-margin geometry in twentieths of a point.
|
|
10
|
+
*
|
|
11
|
+
* Keeping the native integer unit avoids changing valid OOXML values merely
|
|
12
|
+
* because the browser and the editing UI project the same geometry in pixels
|
|
13
|
+
* and millimetres. Negative top or bottom values retain Word's explicit
|
|
14
|
+
* header/footer-overlap semantics.
|
|
15
|
+
*/
|
|
16
|
+
export interface WorkDocumentPageMargins {
|
|
17
|
+
top: number;
|
|
18
|
+
right: number;
|
|
19
|
+
bottom: number;
|
|
20
|
+
left: number;
|
|
21
|
+
header: number;
|
|
22
|
+
footer: number;
|
|
23
|
+
gutter: number;
|
|
24
|
+
mirrorMargins?: boolean;
|
|
25
|
+
gutterAtTop?: boolean;
|
|
26
|
+
gutterOnRight?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface ResolvedDocumentPageMargins {
|
|
29
|
+
body: WorkDocumentMargins;
|
|
30
|
+
unboundedBody: WorkDocumentMargins;
|
|
31
|
+
headerDistance: number;
|
|
32
|
+
footerDistance: number;
|
|
33
|
+
gutter: number;
|
|
34
|
+
gutterPosition: WorkDocumentGutterPosition;
|
|
35
|
+
mirrorMargins: boolean;
|
|
36
|
+
topMode: WorkDocumentPageMarginMode;
|
|
37
|
+
bottomMode: WorkDocumentPageMarginMode;
|
|
38
|
+
bounded: boolean;
|
|
39
|
+
}
|
|
40
|
+
export declare function normalizeDocumentPageMargins(source: unknown): WorkDocumentPageMargins | null;
|
|
41
|
+
export declare function parseDocumentPageMargins(source: unknown): WorkDocumentPageMargins | null;
|
|
42
|
+
export declare function serializeDocumentPageMargins(source: unknown): string | undefined;
|
|
43
|
+
export declare function documentPageMarginsForLayout(layout: Pick<WorkDocumentSectionLayout, 'margins' | 'pageMargins'>): WorkDocumentPageMargins;
|
|
44
|
+
export declare function documentPageMarginsFromBody(margins: WorkDocumentMargins): WorkDocumentPageMargins;
|
|
45
|
+
export declare function documentPageMarginBody(source: unknown, fallback: WorkDocumentMargins): WorkDocumentMargins;
|
|
46
|
+
export declare function documentPageHorizontalMarginTwips(layout: Pick<WorkDocumentSectionLayout, 'margins' | 'pageMargins'>): number;
|
|
47
|
+
export declare function resolveDocumentPageMargins(layout: Pick<WorkDocumentSectionLayout, 'margins' | 'orientation' | 'pageGeometry' | 'pageMargins' | 'pageSize'>, physicalPage?: number): ResolvedDocumentPageMargins;
|
|
48
|
+
export declare function updateDocumentPageMarginMillimeters(layout: WorkDocumentSectionLayout, key: WorkDocumentPageMarginKey, millimeters: number): WorkDocumentSectionLayout;
|
|
49
|
+
export declare function updateDocumentPageMarginMode(layout: WorkDocumentSectionLayout, edge: WorkDocumentPageMarginVerticalEdge, mode: WorkDocumentPageMarginMode): WorkDocumentSectionLayout;
|
|
50
|
+
export declare function updateDocumentGutterPosition(layout: WorkDocumentSectionLayout, position: WorkDocumentGutterPosition): WorkDocumentSectionLayout;
|
|
51
|
+
export declare function updateDocumentMirrorMargins(layout: WorkDocumentSectionLayout, mirrored: boolean): WorkDocumentSectionLayout;
|
|
52
|
+
export declare function reconcileDocumentPageMarginUpdate(previous: WorkDocumentSectionLayout, next: WorkDocumentSectionLayout): WorkDocumentSectionLayout;
|
|
53
|
+
export declare function documentPageMarginGlobalsChanged(previous: WorkDocumentSectionLayout, next: WorkDocumentSectionLayout): boolean;
|
|
54
|
+
export declare function synchronizeDocumentPageMarginGlobals(layout: WorkDocumentSectionLayout, source: WorkDocumentPageMargins): WorkDocumentSectionLayout;
|
|
55
|
+
export declare function twipsToMillimeters(value: number): number;
|
|
56
|
+
export declare function millimetersToTwips(value: number): number;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { WorkDocumentPaperSize, WorkDocumentSectionLayout } from './work-types';
|
|
2
|
+
export interface WorkDocumentPageGeometry {
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
orientation?: 'portrait' | 'landscape';
|
|
6
|
+
code?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface WorkDocumentPaperSource {
|
|
9
|
+
first?: number;
|
|
10
|
+
other?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface ResolvedDocumentPageSize {
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
nativeWidth: number;
|
|
16
|
+
nativeHeight: number;
|
|
17
|
+
widthPixels: number;
|
|
18
|
+
heightPixels: number;
|
|
19
|
+
widthPoints: number;
|
|
20
|
+
heightPoints: number;
|
|
21
|
+
orientation: 'portrait' | 'landscape';
|
|
22
|
+
preset: WorkDocumentPaperSize;
|
|
23
|
+
bounded: boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare const DOCUMENT_PAPER_SIZE_PRESETS: readonly ["a3", "a4", "a5", "letter", "legal", "tabloid"];
|
|
26
|
+
export declare const MAX_WORD_PAGE_TWIPS = 31680;
|
|
27
|
+
export declare const MAX_WORD_PAPER_CODE = 118;
|
|
28
|
+
export declare const MAX_WORD_PAPER_SOURCE_CODE = 65535;
|
|
29
|
+
export declare function normalizeDocumentPageGeometry(source: unknown): WorkDocumentPageGeometry | null;
|
|
30
|
+
export declare function normalizeDocumentPaperSource(source: unknown): WorkDocumentPaperSource | null;
|
|
31
|
+
export declare function parseDocumentPageGeometry(source: unknown): WorkDocumentPageGeometry | null;
|
|
32
|
+
export declare function parseDocumentPaperSource(source: unknown): WorkDocumentPaperSource | null;
|
|
33
|
+
export declare function serializeDocumentPageGeometry(source: unknown): string | undefined;
|
|
34
|
+
export declare function serializeDocumentPaperSource(source: unknown): string | undefined;
|
|
35
|
+
export declare function normalizeDocumentPaperSize(source: unknown, fallback?: WorkDocumentPaperSize): WorkDocumentPaperSize;
|
|
36
|
+
export declare function documentPageGeometryForLayout(layout: Pick<WorkDocumentSectionLayout, 'orientation' | 'pageGeometry' | 'pageSize'>): WorkDocumentPageGeometry;
|
|
37
|
+
export declare function documentPageGeometryFromPreset(preset: Exclude<WorkDocumentPaperSize, 'custom'>, orientation: 'portrait' | 'landscape'): WorkDocumentPageGeometry;
|
|
38
|
+
export declare function documentPaperSizeForGeometry(source: unknown): WorkDocumentPaperSize;
|
|
39
|
+
export declare function documentPageOrientationForGeometry(source: unknown, fallback?: 'portrait' | 'landscape'): 'portrait' | 'landscape';
|
|
40
|
+
export declare function resolveDocumentPageSize(layout: Pick<WorkDocumentSectionLayout, 'orientation' | 'pageGeometry' | 'pageSize'>): ResolvedDocumentPageSize;
|
|
41
|
+
export declare function applyDocumentPageGeometry(layout: WorkDocumentSectionLayout, source: WorkDocumentPageGeometry): WorkDocumentSectionLayout;
|
|
42
|
+
export declare function updateDocumentPaperSizePreset(layout: WorkDocumentSectionLayout, pageSize: Exclude<WorkDocumentPaperSize, 'custom'>): WorkDocumentSectionLayout;
|
|
43
|
+
export declare function updateDocumentCustomPageMillimeters(layout: WorkDocumentSectionLayout, dimension: 'height' | 'width', millimeters: number): WorkDocumentSectionLayout;
|
|
44
|
+
export declare function updateDocumentPageOrientation(layout: WorkDocumentSectionLayout, orientation: 'portrait' | 'landscape'): WorkDocumentSectionLayout;
|
|
45
|
+
export declare function reconcileDocumentPageSizeUpdate(previous: WorkDocumentSectionLayout, next: WorkDocumentSectionLayout): WorkDocumentSectionLayout;
|
|
46
|
+
export declare function pageMillimetersToTwips(value: number): number;
|
|
47
|
+
export declare function pageTwipsToMillimeters(value: number): number;
|
|
@@ -3,7 +3,6 @@ import type { OfficeKernelPageMetrics, OfficeKernelTextLayoutParagraphResult } f
|
|
|
3
3
|
import type { DocumentPaginationSnapshot } from './work-document-pagination-types';
|
|
4
4
|
import type { WorkDocumentSectionLayout } from './work-types';
|
|
5
5
|
export declare function measureDocumentLayoutBlocks(editor: Editor, previous?: DocumentPaginationSnapshot | null, dirtyFrom?: number, textLayouts?: ReadonlyMap<string, OfficeKernelTextLayoutParagraphResult>, maximumFragmentedTableRowHeight?: number): DocumentPaginationSnapshot;
|
|
6
|
-
export declare function documentPageMetrics(layout: WorkDocumentSectionLayout): OfficeKernelPageMetrics;
|
|
6
|
+
export declare function documentPageMetrics(layout: WorkDocumentSectionLayout, physicalPage?: number): OfficeKernelPageMetrics;
|
|
7
7
|
export declare function documentPageBodyHeight(page: OfficeKernelPageMetrics): number;
|
|
8
8
|
export declare function documentPaginationSurfaceHeight(pageCount: number, page: OfficeKernelPageMetrics): number;
|
|
9
|
-
export declare function documentPageChromeHeights(editor: Editor): Pick<OfficeKernelPageMetrics, 'headerHeight' | 'footerHeight'>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type { OfficeKernelLayoutBlock, OfficeKernelLayoutBreak, OfficeKernelPageMetrics, OfficeKernelTextLayoutParagraph } from '../../kernel/office-kernel-protocol';
|
|
1
|
+
import type { OfficeKernelLayoutBlock, OfficeKernelLayoutBreak, OfficeKernelPageMetrics, OfficeKernelPageStyle, OfficeKernelTextLayoutParagraph } from '../../kernel/office-kernel-protocol';
|
|
2
2
|
import type { WorkDocumentSectionLayout } from './work-types';
|
|
3
3
|
export interface DocumentPaginationVisualBreak extends OfficeKernelLayoutBreak {
|
|
4
4
|
position: number;
|
|
5
|
-
|
|
5
|
+
previousPage: OfficeKernelPageMetrics;
|
|
6
|
+
nextPage: OfficeKernelPageMetrics;
|
|
6
7
|
inlineOffsetLeft: number;
|
|
7
8
|
inlineOffsetRight: number;
|
|
8
9
|
previousPageChrome?: DocumentPaginationVisualPageChrome;
|
|
@@ -21,6 +22,8 @@ export interface DocumentPaginationSection {
|
|
|
21
22
|
index: number;
|
|
22
23
|
position: number;
|
|
23
24
|
layout: WorkDocumentSectionLayout;
|
|
25
|
+
pageStyleId: string;
|
|
26
|
+
page: OfficeKernelPageMetrics;
|
|
24
27
|
}
|
|
25
28
|
export interface DocumentTablePaginationBreak {
|
|
26
29
|
tableId: string;
|
|
@@ -42,6 +45,7 @@ export interface DocumentTableCellFragmentMeasurement {
|
|
|
42
45
|
from: number;
|
|
43
46
|
to: number;
|
|
44
47
|
boundaries: DocumentTableCellBoundary[];
|
|
48
|
+
continuesFromPreviousRow?: boolean;
|
|
45
49
|
tableOffsetLeft?: number;
|
|
46
50
|
outerWidth?: number;
|
|
47
51
|
contentOffsetLeft?: number;
|
|
@@ -79,6 +83,7 @@ export interface MeasuredDocumentLayoutBlock {
|
|
|
79
83
|
}
|
|
80
84
|
export interface DocumentPaginationSnapshot {
|
|
81
85
|
blocks: MeasuredDocumentLayoutBlock[];
|
|
86
|
+
pageStyles: OfficeKernelPageStyle[];
|
|
82
87
|
measuredBlockCount: number;
|
|
83
88
|
reusedBlockCount: number;
|
|
84
89
|
unsupportedLayout: boolean;
|
|
@@ -2,10 +2,10 @@ import { Extension } from '@tiptap/core';
|
|
|
2
2
|
import type { DocumentPaginationVisualBreak } from './work-document-pagination-types';
|
|
3
3
|
export { createDocumentLineFragments, createShapedDocumentLineFragments, findDocumentLineStartOffset, } from './work-document-line-measurement';
|
|
4
4
|
export { reusableDocumentLayoutBlocks } from './work-document-pagination-dom';
|
|
5
|
-
export { documentPageBodyHeight,
|
|
5
|
+
export { documentPageBodyHeight, documentPageMetrics, documentPaginationSurfaceHeight, measureDocumentLayoutBlocks, } from './work-document-pagination-measurement';
|
|
6
6
|
export type { DocumentPaginationSection, DocumentPaginationSnapshot, DocumentPaginationVisualBreak, DocumentPaginationVisualPageChrome, DocumentTableCellBoundary, DocumentTableCellFragmentMeasurement, DocumentTableCellPageBreak, DocumentTablePaginationBreak, DocumentTableRowFragmentPlan, DocumentTextLayoutCollection, MeasuredDocumentLayoutBlock, } from './work-document-pagination-types';
|
|
7
7
|
export { createDocumentTableRowFragmentPlan } from './work-document-table-pagination';
|
|
8
|
-
export { collectDocumentTextLayoutParagraphs, collectDocumentTextLayoutRuns, } from './work-document-text-layout';
|
|
8
|
+
export { collectDocumentTextLayoutParagraphs, collectDocumentTextLayoutRuns, documentTextLayoutBatches, } from './work-document-text-layout';
|
|
9
9
|
declare module '@tiptap/core' {
|
|
10
10
|
interface Commands<ReturnType> {
|
|
11
11
|
documentPagination: {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type DocxThemeColorReference } from './work-docx-theme-reference';
|
|
2
|
+
export declare const DOCUMENT_PARAGRAPH_BORDERS_ATTRIBUTE = "data-office-paragraph-borders";
|
|
3
|
+
export declare const DOCUMENT_PARAGRAPH_BORDER_EDGES: readonly ["top", "left", "bottom", "right", "between", "bar"];
|
|
4
|
+
export type DocumentParagraphBorderEdge = (typeof DOCUMENT_PARAGRAPH_BORDER_EDGES)[number];
|
|
5
|
+
export declare const DOCUMENT_PARAGRAPH_BORDER_STYLES: readonly ["nil", "none", "single", "thick", "double", "dotted", "dashed", "dotDash", "dotDotDash", "triple", "thinThickSmallGap", "thickThinSmallGap", "thinThickThinSmallGap", "thinThickMediumGap", "thickThinMediumGap", "thinThickThinMediumGap", "thinThickLargeGap", "thickThinLargeGap", "thinThickThinLargeGap", "wave", "doubleWave", "dashSmallGap", "dashDotStroked", "threeDEmboss", "threeDEngrave", "outset", "inset", "apples", "archedScallops", "babyPacifier", "babyRattle", "balloons3Colors", "balloonsHotAir", "basicBlackDashes", "basicBlackDots", "basicBlackSquares", "basicThinLines", "basicWhiteDashes", "basicWhiteDots", "basicWhiteSquares", "basicWideInline", "basicWideMidline", "basicWideOutline", "bats", "birds", "birdsFlight", "cabins", "cakeSlice", "candyCorn", "celticKnotwork", "certificateBanner", "chainLink", "champagneBottle", "checkedBarBlack", "checkedBarColor", "checkered", "christmasTree", "circlesLines", "circlesRectangles", "classicalWave", "clocks", "compass", "confetti", "confettiGrays", "confettiOutline", "confettiStreamers", "confettiWhite", "cornerTriangles", "couponCutoutDashes", "couponCutoutDots", "crazyMaze", "creaturesButterfly", "creaturesFish", "creaturesInsects", "creaturesLadyBug", "crossStitch", "cup", "decoArch", "decoArchColor", "decoBlocks", "diamondsGray", "doubleD", "doubleDiamonds", "earth1", "earth2", "eclipsingSquares1", "eclipsingSquares2", "eggsBlack", "fans", "film", "firecrackers", "flowersBlockPrint", "flowersDaisies", "flowersModern1", "flowersModern2", "flowersPansy", "flowersRedRose", "flowersRoses", "flowersTeacup", "flowersTiny", "gems", "gingerbreadMan", "gradient", "handmade1", "handmade2", "heartBalloon", "heartGray", "hearts", "heebieJeebies", "holly", "houseFunky", "hypnotic", "iceCreamCones", "lightBulb", "lightning1", "lightning2", "mapPins", "mapleLeaf", "mapleMuffins", "marquee", "marqueeToothed", "moons", "mosaic", "musicNotes", "northwest", "ovals", "packages", "palmsBlack", "palmsColor", "paperClips", "papyrus", "partyFavor", "partyGlass", "pencils", "people", "peopleWaving", "peopleHats", "poinsettias", "postageStamp", "pumpkin1", "pushPinNote2", "pushPinNote1", "pyramids", "pyramidsAbove", "quadrants", "rings", "safari", "sawtooth", "sawtoothGray", "scaredCat", "seattle", "shadowedSquares", "sharksTeeth", "shorebirdTracks", "skyrocket", "snowflakeFancy", "snowflakes", "sombrero", "southwest", "stars", "starsTop", "stars3d", "starsBlack", "starsShadowed", "sun", "swirligig", "tornPaper", "tornPaperBlack", "trees", "triangleParty", "triangles", "tribal1", "tribal2", "tribal3", "tribal4", "tribal5", "tribal6", "triangle1", "triangle2", "triangleCircle1", "triangleCircle2", "shapes1", "shapes2", "twistedLines1", "twistedLines2", "vine", "waveline", "weavingAngles", "weavingBraid", "weavingRibbon", "weavingStrips", "whiteFlowers", "woodwork", "xIllusions", "zanyTriangles", "zigZag", "zigZagStitch"];
|
|
6
|
+
export type DocumentParagraphBorderStyle = (typeof DOCUMENT_PARAGRAPH_BORDER_STYLES)[number];
|
|
7
|
+
export interface DocumentParagraphBorderColor {
|
|
8
|
+
value: 'auto' | `#${string}`;
|
|
9
|
+
theme?: DocxThemeColorReference;
|
|
10
|
+
}
|
|
11
|
+
export interface DocumentParagraphBorder {
|
|
12
|
+
style: DocumentParagraphBorderStyle;
|
|
13
|
+
color?: DocumentParagraphBorderColor;
|
|
14
|
+
size?: number;
|
|
15
|
+
space?: number;
|
|
16
|
+
shadow?: boolean;
|
|
17
|
+
frame?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export type DocumentParagraphBorders = Partial<Record<DocumentParagraphBorderEdge, DocumentParagraphBorder>>;
|
|
20
|
+
export declare function normalizeDocumentParagraphBorders(source: unknown): DocumentParagraphBorders | null;
|
|
21
|
+
export declare function normalizeDocumentParagraphBorder(source: unknown): DocumentParagraphBorder | null;
|
|
22
|
+
export declare function parseDocumentParagraphBorders(source: unknown): DocumentParagraphBorders | null;
|
|
23
|
+
export declare function serializeDocumentParagraphBorders(source: unknown): string | undefined;
|
|
24
|
+
export declare function parseDocumentParagraphBordersElement(element: HTMLElement): DocumentParagraphBorders | null;
|
|
25
|
+
export declare function documentParagraphBordersDomAttributes(source: unknown): Record<string, string>;
|
|
26
|
+
export declare function isDocumentParagraphArtBorderStyle(style: DocumentParagraphBorderStyle): boolean;
|
|
27
|
+
export interface DocumentBorderPresentation {
|
|
28
|
+
color: `#${string}` | 'transparent';
|
|
29
|
+
style: 'none' | 'solid' | 'dashed' | 'dotted' | 'double' | 'inset' | 'outset';
|
|
30
|
+
width: number;
|
|
31
|
+
}
|
|
32
|
+
export declare function documentBorderPresentation(border: DocumentParagraphBorder): DocumentBorderPresentation;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
|
2
|
+
export interface WorkDocumentParagraphIdentity {
|
|
3
|
+
paragraphId: string;
|
|
4
|
+
textId: string;
|
|
5
|
+
}
|
|
6
|
+
export interface WorkDocumentParagraphIdentitySource {
|
|
7
|
+
paragraphId?: unknown;
|
|
8
|
+
textId?: unknown;
|
|
9
|
+
}
|
|
10
|
+
export interface WorkDocumentParagraphIdentityRegistry {
|
|
11
|
+
paragraphIds: Set<string>;
|
|
12
|
+
}
|
|
13
|
+
interface DocumentParagraphIdentityOptions {
|
|
14
|
+
types: string[];
|
|
15
|
+
}
|
|
16
|
+
export declare const DOCUMENT_PARAGRAPH_ID_ATTRIBUTE = "data-office-paragraph-id";
|
|
17
|
+
export declare const DOCUMENT_PARAGRAPH_TEXT_ID_ATTRIBUTE = "data-office-paragraph-text-id";
|
|
18
|
+
export declare const DocumentParagraphIdentity: Extension<DocumentParagraphIdentityOptions, any>;
|
|
19
|
+
export declare function normalizeDocumentParagraphId(value: unknown): string | null;
|
|
20
|
+
export declare function createDocumentParagraphIdentityRegistry(): WorkDocumentParagraphIdentityRegistry;
|
|
21
|
+
export declare function normalizeDocumentParagraphIdentity(source: WorkDocumentParagraphIdentitySource): WorkDocumentParagraphIdentity | null;
|
|
22
|
+
export declare function documentParagraphIdentityFromElement(element: Element): WorkDocumentParagraphIdentity | null;
|
|
23
|
+
export declare function applyDocumentParagraphIdentityToElement(element: Element, source: WorkDocumentParagraphIdentitySource): WorkDocumentParagraphIdentity | null;
|
|
24
|
+
export declare function uniqueDocumentParagraphIdentity(source: WorkDocumentParagraphIdentitySource, registry: WorkDocumentParagraphIdentityRegistry): WorkDocumentParagraphIdentity;
|
|
25
|
+
export declare function createDocumentParagraphIdentity(): WorkDocumentParagraphIdentity;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type DocxThemeColorReference } from './work-docx-theme-reference';
|
|
2
|
+
export type DocumentParagraphShadingPattern = 'nil' | 'clear' | 'solid' | 'horzStripe' | 'vertStripe' | 'reverseDiagStripe' | 'diagStripe' | 'horzCross' | 'diagCross' | 'thinHorzStripe' | 'thinVertStripe' | 'thinReverseDiagStripe' | 'thinDiagStripe' | 'thinHorzCross' | 'thinDiagCross' | 'pct5' | 'pct10' | 'pct12' | 'pct15' | 'pct20' | 'pct25' | 'pct30' | 'pct35' | 'pct37' | 'pct40' | 'pct45' | 'pct50' | 'pct55' | 'pct60' | 'pct62' | 'pct65' | 'pct70' | 'pct75' | 'pct80' | 'pct85' | 'pct87' | 'pct90' | 'pct95';
|
|
3
|
+
export interface DocumentParagraphShadingColor {
|
|
4
|
+
value: 'auto' | `#${string}`;
|
|
5
|
+
theme?: DocxThemeColorReference;
|
|
6
|
+
}
|
|
7
|
+
export interface DocumentParagraphShading {
|
|
8
|
+
pattern: DocumentParagraphShadingPattern;
|
|
9
|
+
color?: DocumentParagraphShadingColor;
|
|
10
|
+
fill?: DocumentParagraphShadingColor;
|
|
11
|
+
}
|
|
12
|
+
export declare const DOCUMENT_PARAGRAPH_SHADING_PATTERNS: Set<DocumentParagraphShadingPattern>;
|
|
13
|
+
export declare function normalizeDocumentParagraphShading(source: unknown): DocumentParagraphShading | null;
|
|
14
|
+
export declare function parseDocumentParagraphShading(source: unknown): DocumentParagraphShading | null;
|
|
15
|
+
export declare function serializeDocumentParagraphShading(source: unknown): string | undefined;
|
|
16
|
+
export declare function parseDocumentParagraphShadingElement(element: HTMLElement): DocumentParagraphShading | null;
|
|
17
|
+
export declare function documentParagraphShadingDomAttributes(source: unknown): Record<string, string>;
|
|
18
|
+
export declare function normalizeCssColor(source: string | null | undefined): 'transparent' | `#${string}` | null;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Node as ProseMirrorNode } from '@tiptap/pm/model';
|
|
2
|
+
import { type WorkDocumentChange, type WorkDocumentChangeKind } from './work-document-changes';
|
|
3
|
+
import { type WorkDocumentCommentAnchor } from './work-document-comments';
|
|
4
|
+
import type { WorkDocumentComment } from './work-types';
|
|
5
|
+
export type WorkDocumentReviewKind = 'comment' | WorkDocumentChangeKind;
|
|
6
|
+
export type WorkDocumentReviewConflictReason = 'kind-changed' | 'record-removed' | 'removed' | 'text-changed';
|
|
7
|
+
export interface WorkDocumentReviewConflict {
|
|
8
|
+
readonly id: string;
|
|
9
|
+
readonly kind: WorkDocumentReviewKind;
|
|
10
|
+
readonly reason: WorkDocumentReviewConflictReason;
|
|
11
|
+
readonly previousText: string;
|
|
12
|
+
readonly nextKind?: WorkDocumentChangeKind;
|
|
13
|
+
readonly nextText?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface WorkDocumentReviewConflictEvent {
|
|
16
|
+
readonly artifactId?: string;
|
|
17
|
+
readonly conflicts: readonly WorkDocumentReviewConflict[];
|
|
18
|
+
}
|
|
19
|
+
export interface WorkDocumentReviewSnapshot {
|
|
20
|
+
comments: readonly WorkDocumentCommentAnchor[];
|
|
21
|
+
changes: readonly WorkDocumentChange[];
|
|
22
|
+
}
|
|
23
|
+
export interface ReconcileDocumentReviewConflictsOptions {
|
|
24
|
+
active: readonly WorkDocumentReviewConflict[];
|
|
25
|
+
before: WorkDocumentReviewSnapshot;
|
|
26
|
+
after: WorkDocumentReviewSnapshot;
|
|
27
|
+
comments: readonly WorkDocumentComment[];
|
|
28
|
+
}
|
|
29
|
+
export interface ReconciledDocumentReviewConflicts {
|
|
30
|
+
active: WorkDocumentReviewConflict[];
|
|
31
|
+
detected: WorkDocumentReviewConflict[];
|
|
32
|
+
}
|
|
33
|
+
export declare function collectDocumentReviewSnapshot(document: ProseMirrorNode): WorkDocumentReviewSnapshot;
|
|
34
|
+
export declare function reconcileDocumentReviewConflicts({ active, before, after, comments, }: ReconcileDocumentReviewConflictsOptions): ReconciledDocumentReviewConflicts;
|
|
35
|
+
export declare function documentReviewConflictKey(conflict: WorkDocumentReviewConflict): string;
|
|
@@ -22,6 +22,10 @@ export interface DocumentSectionNodeAttributes {
|
|
|
22
22
|
showPageNumbers: boolean;
|
|
23
23
|
pageNumberStart: number | null;
|
|
24
24
|
pageChrome: string;
|
|
25
|
+
pageBorders: string;
|
|
26
|
+
pageMargins: string;
|
|
27
|
+
pageGeometry: string;
|
|
28
|
+
paperSource: string;
|
|
25
29
|
documentGridType: WorkDocumentGridType | '';
|
|
26
30
|
documentGridLinePitch: number | null;
|
|
27
31
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { WorkDocumentContent } from './work-types';
|
|
2
|
+
export declare const WORK_DOCUMENT_SNAPSHOT_SCHEMA: "a3s.office.document.snapshot";
|
|
3
|
+
export declare const WORK_DOCUMENT_SNAPSHOT_VERSION: 1;
|
|
4
|
+
export declare const WORK_DOCUMENT_SNAPSHOT_MEDIA_TYPE: "application/vnd.a3s.office.document-snapshot+json;version=1";
|
|
5
|
+
export interface WorkDocumentSnapshot {
|
|
6
|
+
schema: typeof WORK_DOCUMENT_SNAPSHOT_SCHEMA;
|
|
7
|
+
version: typeof WORK_DOCUMENT_SNAPSHOT_VERSION;
|
|
8
|
+
content: WorkDocumentContent;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Encode the complete controlled document value as deterministic JSON.
|
|
12
|
+
*
|
|
13
|
+
* The snapshot requires a synchronized structured model. Optional properties
|
|
14
|
+
* whose value is `undefined` are omitted because undefined is outside the JSON
|
|
15
|
+
* data model; every JSON-defined field is retained exactly.
|
|
16
|
+
*/
|
|
17
|
+
export declare function encodeWorkDocumentSnapshot(content: WorkDocumentContent): string;
|
|
18
|
+
/** Decode and validate one versioned structured-document snapshot. */
|
|
19
|
+
export declare function decodeWorkDocumentSnapshot(encoded: string): WorkDocumentContent;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { WorkDocumentContent } from './work-types';
|
|
2
|
+
export declare const WORK_DOCUMENT_SOURCE_SCHEMA: "a3s.office.document.source";
|
|
3
|
+
export declare const WORK_DOCUMENT_SOURCE_VERSION: 1;
|
|
4
|
+
export declare const WORK_DOCUMENT_SOURCE_MEDIA_TYPE: "text/markdown; charset=utf-8";
|
|
5
|
+
export interface WorkDocumentSource {
|
|
6
|
+
schema: typeof WORK_DOCUMENT_SOURCE_SCHEMA;
|
|
7
|
+
version: typeof WORK_DOCUMENT_SOURCE_VERSION;
|
|
8
|
+
mediaType: typeof WORK_DOCUMENT_SOURCE_MEDIA_TYPE;
|
|
9
|
+
content: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Project one structured Office document into an agent-readable source value.
|
|
13
|
+
*
|
|
14
|
+
* The source is deliberately a subordinate projection, not a replacement for
|
|
15
|
+
* the lossless document snapshot. Version 1 supports one structured section so
|
|
16
|
+
* it cannot silently flatten distinct section layouts.
|
|
17
|
+
*/
|
|
18
|
+
export declare function projectWorkDocumentSource(content: WorkDocumentContent): WorkDocumentSource;
|
|
19
|
+
/**
|
|
20
|
+
* Apply an agent-readable source revision to the document body while retaining
|
|
21
|
+
* every Office-owned field and the exact section identity/layout attributes.
|
|
22
|
+
*/
|
|
23
|
+
export declare function applyWorkDocumentSource(content: WorkDocumentContent, source: WorkDocumentSource): WorkDocumentContent;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type DocumentTableColumnWidthType = 'pixels' | 'percent';
|
|
2
|
+
export declare const MIN_DOCUMENT_TABLE_COLUMN_PERCENT = 1;
|
|
3
|
+
export declare const MAX_DOCUMENT_TABLE_COLUMN_PERCENT = 100;
|
|
4
|
+
export declare function normalizeDocumentTableColumnPercent(value: unknown): number | null;
|
|
5
|
+
export declare function normalizeDocumentTableColumnPercentages(value: unknown, expectedCount?: number): number[] | null;
|
|
6
|
+
export declare function documentTableColumnPercentagesFromElement(cell: HTMLElement): number[] | null;
|
|
7
|
+
export declare function renderDocumentTableColumnPercentages(value: unknown): Record<string, string>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type DocumentTableVerticalAlign } from './work-document-table-cell-formatting';
|
|
2
2
|
import { type DocumentTableCellMarginOverrides, type DocumentTableProperties } from './work-document-table-geometry';
|
|
3
3
|
import type { DocumentTableRowHeightRule } from './work-document-table-row';
|
|
4
|
+
import { type DocumentTableColumnWidthType } from './work-document-table-column-widths';
|
|
4
5
|
export declare const MIN_DOCUMENT_TABLE_COLUMN_WIDTH = 25;
|
|
5
6
|
export declare const MIN_DOCUMENT_TABLE_ROW_HEIGHT = 12;
|
|
6
7
|
export declare const MAX_DOCUMENT_TABLE_DIMENSION = 4000;
|
|
@@ -13,8 +14,10 @@ export interface DocumentTablePropertyChanges {
|
|
|
13
14
|
repeatHeader?: boolean;
|
|
14
15
|
};
|
|
15
16
|
column?: {
|
|
17
|
+
type?: DocumentTableColumnWidthType;
|
|
16
18
|
width: number;
|
|
17
19
|
renderedColumnWidths?: readonly number[];
|
|
20
|
+
renderedTableWidth?: number;
|
|
18
21
|
};
|
|
19
22
|
cell?: {
|
|
20
23
|
verticalAlign: DocumentTableVerticalAlign;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
|
2
|
+
export interface WorkDocumentTableRowIdentity {
|
|
3
|
+
rowId: string;
|
|
4
|
+
rowTextId: string;
|
|
5
|
+
}
|
|
6
|
+
export interface WorkDocumentTableRowIdentitySource {
|
|
7
|
+
rowId?: unknown;
|
|
8
|
+
rowTextId?: unknown;
|
|
9
|
+
}
|
|
10
|
+
export declare const DOCUMENT_TABLE_ROW_ID_ATTRIBUTE = "data-office-row-id";
|
|
11
|
+
export declare const DOCUMENT_TABLE_ROW_TEXT_ID_ATTRIBUTE = "data-office-row-text-id";
|
|
12
|
+
export declare const DocumentTableRowIdentity: Extension<any, any>;
|
|
13
|
+
export declare function normalizeDocumentTableRowIdentity(source: WorkDocumentTableRowIdentitySource): WorkDocumentTableRowIdentity | null;
|
|
14
|
+
export declare function documentTableRowIdentityFromElement(element: Element): WorkDocumentTableRowIdentity | null;
|
|
15
|
+
export declare function applyDocumentTableRowIdentityToElement(element: Element, source: WorkDocumentTableRowIdentitySource): WorkDocumentTableRowIdentity | null;
|
|
@@ -3,11 +3,13 @@ import { type EditorState } from '@tiptap/pm/state';
|
|
|
3
3
|
import { type DocumentTableRowHeightRule } from './work-document-table-row';
|
|
4
4
|
import { type DocumentTableAlignment, type DocumentTableCellMargins, type DocumentTableLayoutAlgorithm, type DocumentTableLayoutMode, type DocumentTablePreferredWidthType, type DocumentTableProperties } from './work-document-table-geometry';
|
|
5
5
|
import { type DocumentTablePropertyChanges } from './work-document-table-property-changes';
|
|
6
|
+
import { type DocumentTableColumnWidthType } from './work-document-table-column-widths';
|
|
6
7
|
export { normalizeDocumentTableGeometry, normalizeDocumentTableLayoutMode, } from './work-document-table-geometry';
|
|
7
8
|
export type { DocumentTableAlignment, DocumentTableCellMargins, DocumentTableGeometry, DocumentTableLayoutAlgorithm, DocumentTableLayoutMode, DocumentTablePreferredWidth, DocumentTablePreferredWidthType, DocumentTableProperties, } from './work-document-table-geometry';
|
|
8
9
|
export type { DocumentTablePropertyChanges } from './work-document-table-property-changes';
|
|
9
10
|
export interface DocumentTableSizingState {
|
|
10
11
|
columnWidth: number | null;
|
|
12
|
+
columnWidthType: DocumentTableColumnWidthType;
|
|
11
13
|
rowHeight: number | null;
|
|
12
14
|
rowHeightRule: DocumentTableRowHeightRule | null;
|
|
13
15
|
layoutMode: DocumentTableLayoutMode;
|
|
@@ -24,6 +26,7 @@ declare module '@tiptap/core' {
|
|
|
24
26
|
interface Commands<ReturnType> {
|
|
25
27
|
documentTableSizing: {
|
|
26
28
|
setDocumentTableColumnWidth: (width: number, renderedColumnWidths?: readonly number[]) => ReturnType;
|
|
29
|
+
setDocumentTableColumnWidthPercent: (width: number, renderedColumnWidths?: readonly number[], renderedTableWidth?: number) => ReturnType;
|
|
27
30
|
setDocumentTableRowHeight: (height: number | null, rule?: DocumentTableRowHeightRule) => ReturnType;
|
|
28
31
|
setDocumentTableLayoutMode: (mode: DocumentTableLayoutMode, renderedTableWidth?: number) => ReturnType;
|
|
29
32
|
setDocumentTableAlignment: (alignment: DocumentTableAlignment) => ReturnType;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { Editor } from '@tiptap/core';
|
|
2
2
|
import type { Node as ProseMirrorNode } from '@tiptap/pm/model';
|
|
3
|
-
import type { OfficeKernelTextLayoutRun } from '../../kernel/office-kernel-protocol';
|
|
3
|
+
import type { OfficeKernelTextLayoutParagraph, OfficeKernelTextLayoutRun } from '../../kernel/office-kernel-protocol';
|
|
4
4
|
import type { WorkDocumentLayoutFont } from './work-document-fonts';
|
|
5
5
|
import type { DocumentPaginationSnapshot, DocumentTextLayoutCollection } from './work-document-pagination-types';
|
|
6
|
+
export declare const DOCUMENT_TEXT_LAYOUT_BATCH_SIZE = 1024;
|
|
7
|
+
export declare function documentTextLayoutBatches(paragraphs: readonly OfficeKernelTextLayoutParagraph[]): OfficeKernelTextLayoutParagraph[][];
|
|
6
8
|
export declare function collectDocumentTextLayoutParagraphs(editor: Editor, fonts: readonly WorkDocumentLayoutFont[], loadedFontIds: ReadonlySet<string>, previous?: DocumentPaginationSnapshot | null, dirtyFrom?: number): DocumentTextLayoutCollection;
|
|
7
9
|
export declare function isDocumentLineFragmentNode(node: ProseMirrorNode): boolean;
|
|
8
10
|
export declare function documentTextLayoutContent(node: ProseMirrorNode): string | null;
|