@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,15 @@
|
|
|
1
|
+
import { type WorkDocumentNote, type WorkDocumentNoteKind } from './work-document-notes';
|
|
2
|
+
import type { WorkDocumentComment, WorkDocumentCommentReply } from './work-types';
|
|
3
|
+
export interface AssignedDocxCommentReply {
|
|
4
|
+
id: number;
|
|
5
|
+
reply: WorkDocumentCommentReply;
|
|
6
|
+
}
|
|
7
|
+
export interface AssignedDocxCommentThread {
|
|
8
|
+
comment: WorkDocumentComment;
|
|
9
|
+
id: number;
|
|
10
|
+
replies: AssignedDocxCommentReply[];
|
|
11
|
+
}
|
|
12
|
+
export declare function importedDocumentNoteId(kind: WorkDocumentNoteKind, target: string): string | null;
|
|
13
|
+
export declare function assignDocxNoteIds(notes: readonly WorkDocumentNote[]): Map<string, number>;
|
|
14
|
+
export declare function assignDocxCommentThreads(comments: readonly WorkDocumentComment[]): AssignedDocxCommentThread[];
|
|
15
|
+
export declare function normalizeDocxCommentId(value: string | null | undefined): number | null;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type DocxIgnorableExtensionPair } from './work-docx-ignorable-extension-preservation';
|
|
2
|
+
type NoteCommentContentKind = 'comment' | 'note';
|
|
3
|
+
export declare function preserveDocxNoteCommentRunContent(generatedDocument: Document, sourceDocument: Document, scopes: readonly DocxIgnorableExtensionPair[], kind: NoteCommentContentKind): void;
|
|
4
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare function preserveDocxNoteCommentRunProperties(generatedDocument: Document, generatedRun: Element, sourceRun: Element, kind: 'comment' | 'note'): void;
|
|
2
|
+
export declare function cloneDocxNoteCommentRunProperties(document: Document, sourceProperties: Element, targetContext: Element, kind: 'comment' | 'note'): Element | null;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ImportedDocxImageLayoutMarkerState, type ImportedDocxImageLayoutMarkers } from './work-docx-image-layout-import';
|
|
2
|
+
import type { OoxmlPackage } from './work-ooxml-package';
|
|
3
|
+
interface MarkedNoteImagePart {
|
|
4
|
+
document: Document;
|
|
5
|
+
path: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ImportedDocxNoteImageMarkers {
|
|
8
|
+
markers: ImportedDocxImageLayoutMarkers;
|
|
9
|
+
parts: MarkedNoteImagePart[];
|
|
10
|
+
}
|
|
11
|
+
export declare function markDocxNoteImageLayouts(archive: OoxmlPackage, state: ImportedDocxImageLayoutMarkerState): Promise<ImportedDocxNoteImageMarkers>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function patchDocxNoteImageRelationships(buffer: ArrayBuffer): Promise<ArrayBuffer>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type JSZip from 'jszip';
|
|
2
|
+
export interface DocxSourceNumberingIdentity {
|
|
3
|
+
numId: number;
|
|
4
|
+
abstractNumId?: number;
|
|
5
|
+
}
|
|
6
|
+
export declare function preserveDocxNumberingExtensions(generated: JSZip, source: JSZip, sourceIdentities: readonly (DocxSourceNumberingIdentity | null)[], generatedPath?: string, sourcePath?: string): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function patchDocxNumberingRestartRules(buffer: ArrayBuffer, rules: ReadonlyArray<ReadonlyMap<number, number>>): Promise<ArrayBuffer>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type WorkDocumentPageBorders } from './work-document-page-borders';
|
|
2
|
+
import { type DocxThemeSource } from './work-docx-theme';
|
|
3
|
+
export interface InspectedDocxPageBorders {
|
|
4
|
+
status: 'absent' | 'valid' | 'invalid';
|
|
5
|
+
pageBorders?: WorkDocumentPageBorders;
|
|
6
|
+
invalidCount: number;
|
|
7
|
+
spoofedCount: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function inspectDocxPageBorders(sectionProperties: Element, themeSource?: DocxThemeSource): InspectedDocxPageBorders;
|
|
10
|
+
export declare function parseDocxPageBorders(sectionProperties: Element, themeSource?: DocxThemeSource): WorkDocumentPageBorders | null | undefined;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type WorkDocumentPageMargins } from './work-document-page-margins';
|
|
2
|
+
export interface InspectedDocxPageMarginSettings {
|
|
3
|
+
mirrorMargins?: boolean;
|
|
4
|
+
gutterAtTop?: boolean;
|
|
5
|
+
invalidCount: number;
|
|
6
|
+
spoofedCount: number;
|
|
7
|
+
incompatible: string[];
|
|
8
|
+
}
|
|
9
|
+
export interface InspectedDocxPageMargins {
|
|
10
|
+
status: 'absent' | 'valid' | 'invalid';
|
|
11
|
+
pageMargins?: WorkDocumentPageMargins;
|
|
12
|
+
gutterOnRight?: boolean;
|
|
13
|
+
invalidCount: number;
|
|
14
|
+
spoofedCount: number;
|
|
15
|
+
}
|
|
16
|
+
export declare function inspectDocxPageMarginSettings(settings: Document | null | undefined): InspectedDocxPageMarginSettings;
|
|
17
|
+
export declare function inspectDocxPageMargins(sectionProperties: Element, settings?: InspectedDocxPageMarginSettings): InspectedDocxPageMargins;
|
|
18
|
+
export declare function parseDocxPageMargins(sectionProperties: Element, settings: InspectedDocxPageMarginSettings, fallback?: WorkDocumentPageMargins): WorkDocumentPageMargins | null | undefined;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type WorkDocumentPageGeometry, type WorkDocumentPaperSource } from './work-document-page-size';
|
|
2
|
+
export interface InspectedDocxPageSize {
|
|
3
|
+
status: 'absent' | 'valid' | 'invalid';
|
|
4
|
+
pageGeometry?: WorkDocumentPageGeometry;
|
|
5
|
+
invalidCount: number;
|
|
6
|
+
spoofedCount: number;
|
|
7
|
+
}
|
|
8
|
+
export interface InspectedDocxPaperSource {
|
|
9
|
+
status: 'absent' | 'valid' | 'invalid';
|
|
10
|
+
paperSource?: WorkDocumentPaperSource;
|
|
11
|
+
invalidCount: number;
|
|
12
|
+
spoofedCount: number;
|
|
13
|
+
}
|
|
14
|
+
export declare function inspectDocxPageSize(sectionProperties: Element): InspectedDocxPageSize;
|
|
15
|
+
export declare function inspectDocxPaperSource(sectionProperties: Element): InspectedDocxPaperSource;
|
|
16
|
+
export declare function parseDocxPageGeometry(sectionProperties: Element, fallback?: WorkDocumentPageGeometry): WorkDocumentPageGeometry | null | undefined;
|
|
17
|
+
export declare function parseDocxPaperSource(sectionProperties: Element, fallback?: WorkDocumentPaperSource): WorkDocumentPaperSource | null | undefined;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IParagraphPropertiesOptions } from 'docx';
|
|
2
|
+
import { type DocumentParagraphBorder, type DocumentParagraphBorders } from './work-document-paragraph-borders';
|
|
3
|
+
type ParagraphBorderOptions = Partial<Pick<IParagraphPropertiesOptions, 'border'>>;
|
|
4
|
+
interface DocxParagraphBorderPatch {
|
|
5
|
+
marker: string;
|
|
6
|
+
borders: DocumentParagraphBorders;
|
|
7
|
+
}
|
|
8
|
+
export declare class DocxParagraphBorderPatchCollector {
|
|
9
|
+
readonly patches: DocxParagraphBorderPatch[];
|
|
10
|
+
private nextMarker;
|
|
11
|
+
private readonly usedColors;
|
|
12
|
+
constructor(sourceHtml: string);
|
|
13
|
+
marker(source: unknown): string | null;
|
|
14
|
+
}
|
|
15
|
+
export declare function documentParagraphBordersDocxOptions(element: HTMLElement, collector?: DocxParagraphBorderPatchCollector): ParagraphBorderOptions;
|
|
16
|
+
export declare function patchDocxParagraphBorders(buffer: ArrayBuffer, patches: readonly DocxParagraphBorderPatch[]): Promise<ArrayBuffer>;
|
|
17
|
+
export declare function setDocxBorderAttributes(document: Document, element: Element, border: DocumentParagraphBorder): void;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type DocumentParagraphBorder, type DocumentParagraphBorders } from './work-document-paragraph-borders';
|
|
2
|
+
import { type DocxParagraphStyleSource } from './work-docx-paragraph-styles';
|
|
3
|
+
import { type DocxTableStyleSource } from './work-docx-table-styles';
|
|
4
|
+
import { type DocxThemeResolver, type DocxThemeSource } from './work-docx-theme';
|
|
5
|
+
export interface ImportedDocxParagraphBorderMarker {
|
|
6
|
+
marker: string;
|
|
7
|
+
borders: DocumentParagraphBorders;
|
|
8
|
+
}
|
|
9
|
+
export interface ImportedDocxParagraphBorderMarkers {
|
|
10
|
+
paragraphs: ImportedDocxParagraphBorderMarker[];
|
|
11
|
+
invalidCount: number;
|
|
12
|
+
spoofedCount: number;
|
|
13
|
+
}
|
|
14
|
+
export interface ResolvedDocxParagraphBorders {
|
|
15
|
+
borders: DocumentParagraphBorders | null;
|
|
16
|
+
invalidCount: number;
|
|
17
|
+
spoofedCount: number;
|
|
18
|
+
}
|
|
19
|
+
export declare function markDocxParagraphBorders(document: Document, styleSource?: DocxParagraphStyleSource, themeSource?: DocxThemeSource, tableStyleSource?: DocxTableStyleSource): ImportedDocxParagraphBorderMarkers;
|
|
20
|
+
export declare function resolveDocxParagraphBordersForParagraph(paragraph: Element, styleSource?: DocxParagraphStyleSource, themeSource?: DocxThemeSource, tableStyleSource?: DocxTableStyleSource): ResolvedDocxParagraphBorders;
|
|
21
|
+
export declare function applyImportedDocxParagraphBorderMarkers(document: Document, markers: ImportedDocxParagraphBorderMarkers): void;
|
|
22
|
+
export declare function hasImportedDocxParagraphBorderMarkers(markers: ImportedDocxParagraphBorderMarkers): boolean;
|
|
23
|
+
export declare function parseDirectDocxParagraphBorders(properties: Element, themeSource?: DocxThemeSource): DocumentParagraphBorders | null | undefined;
|
|
24
|
+
export declare function parseDocxBorderElement(element: Element, theme: DocxThemeResolver): DocumentParagraphBorder | null;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type ParsedDocxParagraphDefaultCollapsed = {
|
|
2
|
+
status: 'absent';
|
|
3
|
+
} | {
|
|
4
|
+
status: 'invalid';
|
|
5
|
+
} | {
|
|
6
|
+
status: 'valid';
|
|
7
|
+
value: boolean;
|
|
8
|
+
};
|
|
9
|
+
interface DocxParagraphDefaultCollapsedPatch {
|
|
10
|
+
marker: string;
|
|
11
|
+
value: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare class DocxParagraphDefaultCollapsedPatchCollector {
|
|
14
|
+
readonly patches: DocxParagraphDefaultCollapsedPatch[];
|
|
15
|
+
register(marker: string, element: HTMLElement): void;
|
|
16
|
+
}
|
|
17
|
+
export declare function parseDocxParagraphDefaultCollapsed(properties: Element): ParsedDocxParagraphDefaultCollapsed;
|
|
18
|
+
export declare function patchDocxParagraphDefaultCollapsed(buffer: ArrayBuffer, patches: readonly DocxParagraphDefaultCollapsedPatch[]): Promise<ArrayBuffer>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type WorkDocumentParagraphIdentity } from './work-document-paragraph-identity';
|
|
2
|
+
export interface ImportedDocxParagraphIdentityMarker extends WorkDocumentParagraphIdentity {
|
|
3
|
+
marker: string;
|
|
4
|
+
}
|
|
5
|
+
export interface ImportedDocxParagraphIdentityMarkers {
|
|
6
|
+
paragraphs: ImportedDocxParagraphIdentityMarker[];
|
|
7
|
+
}
|
|
8
|
+
export declare function markDocxParagraphIdentities(document: Document): ImportedDocxParagraphIdentityMarkers;
|
|
9
|
+
export declare function applyImportedDocxParagraphIdentityMarkers(document: Document, markers: ImportedDocxParagraphIdentityMarkers): void;
|
|
10
|
+
export declare function hasImportedDocxParagraphIdentityMarkers(markers: ImportedDocxParagraphIdentityMarkers): boolean;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type WorkDocumentParagraphIdentity } from './work-document-paragraph-identity';
|
|
2
|
+
interface DocxParagraphIdentityPatch {
|
|
3
|
+
marker: string;
|
|
4
|
+
identity: WorkDocumentParagraphIdentity;
|
|
5
|
+
target: 'paragraph' | 'tableRow';
|
|
6
|
+
}
|
|
7
|
+
export declare class DocxParagraphIdentityPatchCollector {
|
|
8
|
+
private readonly source;
|
|
9
|
+
readonly patches: DocxParagraphIdentityPatch[];
|
|
10
|
+
private readonly registry;
|
|
11
|
+
private nextMarker;
|
|
12
|
+
constructor(source: string);
|
|
13
|
+
marker(element: HTMLElement): string;
|
|
14
|
+
rowMarker(element: HTMLTableRowElement): string;
|
|
15
|
+
private registerPatch;
|
|
16
|
+
}
|
|
17
|
+
export declare function patchDocxParagraphIdentities(buffer: ArrayBuffer, patches: readonly DocxParagraphIdentityPatch[]): Promise<ArrayBuffer>;
|
|
18
|
+
export {};
|
|
@@ -3,8 +3,13 @@ import { type DocxParagraphStyleSource } from './work-docx-paragraph-styles';
|
|
|
3
3
|
import { type DocxTableStyleSource } from './work-docx-table-styles';
|
|
4
4
|
export interface ImportedDocxParagraphPaginationMarker {
|
|
5
5
|
marker: string;
|
|
6
|
-
pagination:
|
|
6
|
+
pagination: ImportedDocxParagraphPagination;
|
|
7
7
|
}
|
|
8
|
+
export type ImportedDocxParagraphPagination = Partial<DocumentParagraphPagination> & {
|
|
9
|
+
contextualSpacing?: boolean;
|
|
10
|
+
defaultCollapsed?: boolean;
|
|
11
|
+
outlineLevel?: number;
|
|
12
|
+
};
|
|
8
13
|
export interface ImportedDocxParagraphPaginationMarkers {
|
|
9
14
|
paragraphs: ImportedDocxParagraphPaginationMarker[];
|
|
10
15
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IParagraphPropertiesOptions } from 'docx';
|
|
2
|
+
import type { DocxThemePatchCollector } from './work-docx-theme-reference';
|
|
3
|
+
type ParagraphShadingOptions = Partial<Pick<IParagraphPropertiesOptions, 'shading'>>;
|
|
4
|
+
export declare function documentParagraphShadingDocxOptions(element: HTMLElement, themePatches?: DocxThemePatchCollector): ParagraphShadingOptions;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type DocumentParagraphShading } from './work-document-paragraph-shading';
|
|
2
|
+
import { type DocxParagraphStyleSource } from './work-docx-paragraph-styles';
|
|
3
|
+
import { type DocxTableStyleSource } from './work-docx-table-styles';
|
|
4
|
+
import { type DocxThemeSource } from './work-docx-theme';
|
|
5
|
+
export interface ImportedDocxParagraphShadingMarker {
|
|
6
|
+
marker: string;
|
|
7
|
+
shading: DocumentParagraphShading;
|
|
8
|
+
}
|
|
9
|
+
export interface ImportedDocxParagraphShadingMarkers {
|
|
10
|
+
paragraphs: ImportedDocxParagraphShadingMarker[];
|
|
11
|
+
invalidCount: number;
|
|
12
|
+
spoofedCount: number;
|
|
13
|
+
}
|
|
14
|
+
export declare function markDocxParagraphShading(document: Document, styleSource?: DocxParagraphStyleSource, themeSource?: DocxThemeSource, tableStyleSource?: DocxTableStyleSource): ImportedDocxParagraphShadingMarkers;
|
|
15
|
+
export declare function applyImportedDocxParagraphShadingMarkers(document: Document, markers: ImportedDocxParagraphShadingMarkers): void;
|
|
16
|
+
export declare function hasImportedDocxParagraphShadingMarkers(markers: ImportedDocxParagraphShadingMarkers): boolean;
|
|
17
|
+
export declare function parseDocxParagraphShadingElement(element: Element, themeSource?: DocxThemeSource): DocumentParagraphShading | null;
|
|
18
|
+
export declare function parseDirectDocxParagraphShading(properties: Element, themeSource?: DocxThemeSource): DocumentParagraphShading | null | undefined;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type DocxParagraphStyleSource } from './work-docx-paragraph-styles';
|
|
2
2
|
import { type DocxThemeSource } from './work-docx-theme';
|
|
3
3
|
import { type DocxTableStyleSource } from './work-docx-table-styles';
|
|
4
|
+
import { type DocxThemeColorReference } from './work-docx-theme-reference';
|
|
4
5
|
export interface ImportedDocxRunFormatting {
|
|
5
6
|
bold?: boolean;
|
|
6
7
|
italic?: boolean;
|
|
@@ -12,6 +13,8 @@ export interface ImportedDocxRunFormatting {
|
|
|
12
13
|
fontSize?: number;
|
|
13
14
|
color?: string;
|
|
14
15
|
backgroundColor?: string;
|
|
16
|
+
themeColor?: DocxThemeColorReference;
|
|
17
|
+
themeFill?: DocxThemeColorReference;
|
|
15
18
|
}
|
|
16
19
|
export interface ImportedDocxRunFormattingMarker {
|
|
17
20
|
startMarker: string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type JSZip from 'jszip';
|
|
2
|
+
/**
|
|
3
|
+
* Merges passive extension markup from source settings into generated settings.
|
|
4
|
+
*
|
|
5
|
+
* WordprocessingML settings and relationship-bound markup remain generated-only.
|
|
6
|
+
* The source contribution is limited to ignorable extension attributes/elements
|
|
7
|
+
* and structurally valid, non-conflicting mc:AlternateContent blocks, plus a
|
|
8
|
+
* strictly validated color-scheme mapping required by preserved theme colors.
|
|
9
|
+
*/
|
|
10
|
+
export declare function preserveDocxSettingsExtensions(generated: JSZip, source: JSZip, generatedPath?: string, sourcePath?: string): Promise<void>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const XMLNS_NAMESPACE = "http://www.w3.org/2000/xmlns/";
|
|
2
|
+
export declare const XML_NAMESPACE = "http://www.w3.org/XML/1998/namespace";
|
|
3
|
+
export declare function declareInheritedNamespaces(importedRoot: Element, sourceRoot: Element): void;
|
|
4
|
+
export declare function collectRetainedNamespaces(root: Element, retained: Set<string>): void;
|
|
5
|
+
/** Clones XML without relying on DOM importNode prefix preservation. */
|
|
6
|
+
export declare function cloneXmlElement(document: Document, source: Element): Element;
|
|
7
|
+
export declare function xmlNamespaceUri(element: Element, prefix: string): string | null;
|
|
8
|
+
export declare function xmlDeclaredPrefix(root: Element, namespace: string): string | null;
|
|
9
|
+
export declare function xmlAttributeNamespace(element: Element, item: Attr): string | null;
|
|
10
|
+
export declare function xmlAttributePrefix(item: Attr): string | null;
|
|
11
|
+
export declare function xmlAttributeLocalName(item: Attr): string;
|
|
12
|
+
export declare function hasXmlAttribute(element: Element, namespace: string, localName: string): boolean;
|
|
13
|
+
export declare function hasUnexpectedXmlAttributes(element: Element, allowedUnqualified: ReadonlySet<string>): boolean;
|
|
14
|
+
export declare function hasNonWhitespaceXmlText(element: Element): boolean;
|
|
15
|
+
export declare function isStructurallyValidAlternateContent(element: Element): boolean;
|
|
16
|
+
export declare function assertXmlRoot(root: Element, localName: string, namespaces: ReadonlySet<string>, message: string): void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ITableCellOptions } from 'docx';
|
|
2
|
+
import { type DocxThemePatchCollector } from './work-docx-theme-reference';
|
|
2
3
|
type TableCellPresentationOptions = Partial<Pick<ITableCellOptions, 'borders' | 'margins' | 'shading' | 'verticalAlign'>>;
|
|
3
|
-
export declare function documentTableCellDocxOptions(cell: HTMLTableCellElement, docx: typeof import('docx')): TableCellPresentationOptions;
|
|
4
|
+
export declare function documentTableCellDocxOptions(cell: HTMLTableCellElement, docx: typeof import('docx'), themePatches?: DocxThemePatchCollector): TableCellPresentationOptions;
|
|
4
5
|
export {};
|
|
@@ -2,11 +2,13 @@ import { type DocumentTableBorderEdge } from './work-document-table-borders';
|
|
|
2
2
|
import { type DocxThemeSource } from './work-docx-theme';
|
|
3
3
|
import { type DocxTableStyleSource } from './work-docx-table-styles';
|
|
4
4
|
import { type DocumentTableCellMarginOverrides } from './work-document-table-geometry';
|
|
5
|
+
import { type DocxThemeColorReference } from './work-docx-theme-reference';
|
|
5
6
|
export type ImportedDocxTableCellVerticalAlign = 'top' | 'middle' | 'bottom';
|
|
6
7
|
export type ImportedDocxTableCellBorderStyle = 'solid' | 'dashed' | 'dotted' | 'double' | 'none';
|
|
7
8
|
export interface ImportedDocxTableCellMarker {
|
|
8
9
|
marker: string;
|
|
9
10
|
backgroundColor?: string;
|
|
11
|
+
themeFill?: DocxThemeColorReference;
|
|
10
12
|
verticalAlign?: ImportedDocxTableCellVerticalAlign;
|
|
11
13
|
borders?: ImportedDocxTableCellBorders;
|
|
12
14
|
margins?: DocumentTableCellMarginOverrides;
|
|
@@ -18,6 +20,7 @@ interface ImportedDocxCellBorder {
|
|
|
18
20
|
color: string;
|
|
19
21
|
style: ImportedDocxTableCellBorderStyle;
|
|
20
22
|
width: number;
|
|
23
|
+
theme?: DocxThemeColorReference;
|
|
21
24
|
}
|
|
22
25
|
type ImportedDocxTableCellBorders = Partial<Record<DocumentTableBorderEdge, ImportedDocxCellBorder>>;
|
|
23
26
|
export declare function markDocxTableCells(document: Document, themeSource?: DocxThemeSource, tableStyleSource?: DocxTableStyleSource): ImportedDocxTableCellMarkers;
|
|
@@ -2,8 +2,10 @@ export interface ImportedDocxTableRowMarker {
|
|
|
2
2
|
marker: string;
|
|
3
3
|
cantSplit?: boolean;
|
|
4
4
|
repeatHeader?: boolean;
|
|
5
|
+
rowId?: string;
|
|
5
6
|
rowHeight?: number;
|
|
6
7
|
rowHeightRule?: 'atLeast' | 'exact';
|
|
8
|
+
rowTextId?: string;
|
|
7
9
|
}
|
|
8
10
|
export interface ImportedDocxTableRowMarkers {
|
|
9
11
|
rows: ImportedDocxTableRowMarker[];
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface DocxThemeColorReference {
|
|
2
|
+
theme: string;
|
|
3
|
+
resolved: string;
|
|
4
|
+
tint?: string;
|
|
5
|
+
shade?: string;
|
|
6
|
+
}
|
|
7
|
+
type DocxThemePatchKind = 'color' | 'fill' | 'border' | 'shadingColor';
|
|
8
|
+
interface DocxThemePatch {
|
|
9
|
+
kind: DocxThemePatchKind;
|
|
10
|
+
marker: string;
|
|
11
|
+
reference: DocxThemeColorReference;
|
|
12
|
+
}
|
|
13
|
+
export declare class DocxThemePatchCollector {
|
|
14
|
+
readonly patches: DocxThemePatch[];
|
|
15
|
+
private nextMarker;
|
|
16
|
+
private readonly usedColors;
|
|
17
|
+
constructor(sourceHtml: string);
|
|
18
|
+
marker(kind: DocxThemePatchKind, reference: DocxThemeColorReference | null, currentColor: string | null): string | null;
|
|
19
|
+
}
|
|
20
|
+
export declare function serializeDocxThemeReference(reference: DocxThemeColorReference | null): string | undefined;
|
|
21
|
+
export declare function parseDocxThemeReference(value: string | null | undefined): DocxThemeColorReference | null;
|
|
22
|
+
export declare function patchDocxThemeReferences(buffer: ArrayBuffer, patches: readonly DocxThemePatch[]): Promise<ArrayBuffer>;
|
|
23
|
+
export {};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
export interface DocxThemeResolver {
|
|
2
2
|
colors: ReadonlyMap<string, string>;
|
|
3
|
+
colorMapping?: ReadonlyMap<string, string>;
|
|
3
4
|
fonts: ReadonlyMap<string, string>;
|
|
4
5
|
}
|
|
5
6
|
export type DocxThemeSource = Document | DocxThemeResolver | null | undefined;
|
|
6
|
-
export declare
|
|
7
|
+
export declare const DOCX_COLOR_SCHEME_MAPPING_ATTRIBUTES: Map<string, string>;
|
|
8
|
+
export declare function createDocxThemeResolver(themeDocument?: Document | null, settingsDocument?: Document | null): DocxThemeResolver;
|
|
7
9
|
export declare function resolveDocxThemeResolver(source: DocxThemeSource): DocxThemeResolver;
|
|
8
10
|
export declare function docxThemeFont(resolver: DocxThemeResolver, key: string | null): string | undefined;
|
|
9
11
|
export declare function docxThemeColor(resolver: DocxThemeResolver, key: string | null, tint?: string | null, shade?: string | null): string | undefined;
|
|
12
|
+
export declare function parseDocxColorSchemeMappingElement(element: Element | undefined): ReadonlyMap<string, string> | null;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const STRICT_WORDPROCESSING_NAMESPACE = "http://purl.oclc.org/ooxml/wordprocessingml/main";
|
|
2
|
+
export declare function parseDocxTwipsMeasure(source: string, options: {
|
|
3
|
+
minimum: number;
|
|
4
|
+
maximum: number;
|
|
5
|
+
signed: boolean;
|
|
6
|
+
strict: boolean;
|
|
7
|
+
}): number | null;
|
|
8
|
+
export declare function parseBoundedDocxInteger(source: string, options: {
|
|
9
|
+
minimum: number;
|
|
10
|
+
maximum: number;
|
|
11
|
+
signed?: boolean;
|
|
12
|
+
}): number | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const WORK_IMPORT_ACCEPT: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
export { WORK_IMPORT_ACCEPT } from './work-file-contract';
|
|
1
2
|
import { type WorkPresentationExportOptions } from './work-presentation-file-io';
|
|
2
3
|
import { type WorkArtifact, type WorkArtifactKind } from './work-types';
|
|
3
|
-
export declare const WORK_IMPORT_ACCEPT: string;
|
|
4
4
|
export type WorkArtifactExportOptions = WorkPresentationExportOptions;
|
|
5
5
|
export declare function importWorkFile(file: File): Promise<WorkArtifact>;
|
|
6
6
|
export declare function exportWorkArtifact(artifact: WorkArtifact, options?: WorkArtifactExportOptions): Promise<void>;
|
|
@@ -10,7 +10,10 @@ declare module '@tiptap/core' {
|
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
export declare const WorkMarkdown: Extension<any, any>;
|
|
13
|
-
export
|
|
13
|
+
export interface WorkMarkdownExtensionOptions {
|
|
14
|
+
collaborative?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare function createWorkMarkdownExtensions(options?: WorkMarkdownExtensionOptions): Extensions;
|
|
14
17
|
export declare function markdownTaskCheckboxLabel(node: {
|
|
15
18
|
attrs: {
|
|
16
19
|
checked?: boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type DocxSourceNumberingIdentity } from './work-docx-numbering-extension-preservation';
|
|
2
|
+
export interface DocxSourcePackagePreservationOptions {
|
|
3
|
+
numberingIdentities?: readonly (DocxSourceNumberingIdentity | null)[];
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Copies safe source-only DOCX parts into a newly generated package.
|
|
7
|
+
*
|
|
8
|
+
* Generated parts remain authoritative. Digital signatures are invalid after
|
|
9
|
+
* an edit, and macro, ActiveX, and custom-ribbon parts are intentionally not
|
|
10
|
+
* propagated into a macro-free DOCX export.
|
|
11
|
+
*/
|
|
12
|
+
export declare function preserveDocxSourcePackage(generatedBuffer: ArrayBuffer, sourceBuffer: ArrayBuffer, options?: DocxSourcePackagePreservationOptions): Promise<ArrayBuffer>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function isSafeOpcPartPath(path: string): boolean;
|
|
2
|
+
export declare function isExcludedDocxPart(path: string): boolean;
|
|
3
|
+
export declare function isRegeneratedDocxNoteCommentPart(path: string): boolean;
|
|
4
|
+
export declare function isRegeneratedDocxNoteCommentContentType(type: string | undefined): boolean;
|
|
5
|
+
export declare function isExcludedRelationshipType(type: string): boolean;
|
|
6
|
+
export declare function isExcludedDocxContentType(type: string | undefined): boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type JSZip from 'jszip';
|
|
2
|
+
export interface PreservedRelationshipReference {
|
|
3
|
+
id: string;
|
|
4
|
+
target: string;
|
|
5
|
+
targetMode?: string;
|
|
6
|
+
type: string;
|
|
7
|
+
}
|
|
8
|
+
export type PreservedRelationshipReferences = Map<string, Map<string, PreservedRelationshipReference>>;
|
|
9
|
+
export declare function preserveDocxRelationships(generated: JSZip, source: JSZip, sourcePaths: readonly string[], finalPartPaths: ReadonlySet<string>, generatedPartPaths: ReadonlySet<string>, generatedByLower: Map<string, string>): Promise<PreservedRelationshipReferences>;
|
|
10
|
+
export declare function isRelationshipsPart(path: string): boolean;
|
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
import type { WorkArtifact, WorkSpreadsheetPaperSize } from './work-types';
|
|
2
|
+
import { type WorkLiveDocumentCapturePage } from './work-document-page-capture';
|
|
2
3
|
type PdfPageSize = WorkSpreadsheetPaperSize;
|
|
3
4
|
export interface WorkPdfExportOptions {
|
|
4
5
|
pageIndexes?: number[];
|
|
5
6
|
}
|
|
7
|
+
export interface WorkLiveDocumentPdfPage extends WorkLiveDocumentCapturePage {
|
|
8
|
+
orientation: 'portrait' | 'landscape';
|
|
9
|
+
pageHeightPoints: number;
|
|
10
|
+
pageSize: PdfPageSize;
|
|
11
|
+
pageWidthPoints: number;
|
|
12
|
+
}
|
|
6
13
|
export interface WorkLiveDocumentPdfSurface {
|
|
7
14
|
element: HTMLElement;
|
|
8
15
|
orientation: 'portrait' | 'landscape';
|
|
9
16
|
pageCount: number;
|
|
10
17
|
pageGap: number;
|
|
11
18
|
pageHeight: number;
|
|
19
|
+
pageHeightPoints: number;
|
|
12
20
|
pageSize: PdfPageSize;
|
|
13
21
|
pageWidth: number;
|
|
22
|
+
pageWidthPoints: number;
|
|
23
|
+
pages: WorkLiveDocumentPdfPage[];
|
|
14
24
|
}
|
|
15
25
|
export declare function exportWorkArtifactPdf(artifact: WorkArtifact, options?: WorkPdfExportOptions): Promise<void>;
|
|
16
26
|
export declare function workLiveDocumentPdfSurfaceForExport(artifactId: string): WorkLiveDocumentPdfSurface | null;
|
|
@@ -2,3 +2,5 @@ import type { WorkArtifact } from './work-types';
|
|
|
2
2
|
export declare function rememberWorkSourceBlob(artifactId: string, source: Blob): void;
|
|
3
3
|
export declare function forgetWorkSourceBlob(artifactId: string): void;
|
|
4
4
|
export declare function readWorkSourceBlob(artifact: WorkArtifact): Promise<Blob>;
|
|
5
|
+
export declare function readVerifiedWorkSourceBytes(artifact: WorkArtifact): Promise<ArrayBuffer>;
|
|
6
|
+
export declare function workSourceFingerprint(bytes: ArrayBuffer): Promise<string>;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import type { Sheet } from '@fortune-sheet/core';
|
|
2
|
+
import type { WorkDocumentPageBorders } from './work-document-page-borders';
|
|
3
|
+
import type { WorkDocumentPageMargins } from './work-document-page-margins';
|
|
4
|
+
import type { WorkDocumentPageGeometry, WorkDocumentPaperSource } from './work-document-page-size';
|
|
2
5
|
import type { WorkSpreadsheetChartLayout } from './work-spreadsheet-chart-layout';
|
|
3
6
|
import type { WorkSpreadsheetChart, WorkSpreadsheetChartAxes, WorkSpreadsheetChartAxis, WorkSpreadsheetChartSeriesStyle, WorkSpreadsheetErrorBars, WorkSpreadsheetImage, WorkSpreadsheetTrendline } from './work-spreadsheet-chart-types';
|
|
4
7
|
export * from './work-spreadsheet-chart-types';
|
|
@@ -41,8 +44,9 @@ export interface WorkDocumentGrid {
|
|
|
41
44
|
type: WorkDocumentGridType;
|
|
42
45
|
linePitch: number;
|
|
43
46
|
}
|
|
47
|
+
export type WorkDocumentPaperSize = 'a3' | 'a4' | 'a5' | 'letter' | 'legal' | 'tabloid' | 'custom';
|
|
44
48
|
export interface WorkDocumentSectionLayout {
|
|
45
|
-
pageSize:
|
|
49
|
+
pageSize: WorkDocumentPaperSize;
|
|
46
50
|
orientation: 'portrait' | 'landscape';
|
|
47
51
|
margins: WorkDocumentMargins;
|
|
48
52
|
columns: WorkDocumentColumns;
|
|
@@ -53,6 +57,10 @@ export interface WorkDocumentSectionLayout {
|
|
|
53
57
|
pageNumberStart?: number;
|
|
54
58
|
pageChrome?: WorkDocumentPageChrome;
|
|
55
59
|
documentGrid?: WorkDocumentGrid;
|
|
60
|
+
pageBorders?: WorkDocumentPageBorders;
|
|
61
|
+
pageMargins?: WorkDocumentPageMargins;
|
|
62
|
+
pageGeometry?: WorkDocumentPageGeometry;
|
|
63
|
+
paperSource?: WorkDocumentPaperSource;
|
|
56
64
|
}
|
|
57
65
|
export type WorkDocumentAttributeValue = string | number | boolean | null | WorkDocumentAttributeValue[] | {
|
|
58
66
|
[key: string]: WorkDocumentAttributeValue;
|
|
@@ -79,7 +87,7 @@ export interface WorkDocumentContent {
|
|
|
79
87
|
type: 'document';
|
|
80
88
|
html: string;
|
|
81
89
|
model?: WorkDocumentModel;
|
|
82
|
-
pageSize:
|
|
90
|
+
pageSize: WorkDocumentPaperSize;
|
|
83
91
|
pageColor?: string;
|
|
84
92
|
orientation?: 'portrait' | 'landscape';
|
|
85
93
|
margins?: WorkDocumentMargins;
|
|
@@ -89,6 +97,10 @@ export interface WorkDocumentContent {
|
|
|
89
97
|
showPageNumbers?: boolean;
|
|
90
98
|
pageNumberStart?: number;
|
|
91
99
|
pageChrome?: WorkDocumentPageChrome;
|
|
100
|
+
pageBorders?: WorkDocumentPageBorders;
|
|
101
|
+
pageMargins?: WorkDocumentPageMargins;
|
|
102
|
+
pageGeometry?: WorkDocumentPageGeometry;
|
|
103
|
+
paperSource?: WorkDocumentPaperSource;
|
|
92
104
|
trackChanges?: boolean;
|
|
93
105
|
comments?: WorkDocumentComment[];
|
|
94
106
|
bibliography?: WorkDocumentBibliography;
|
|
@@ -481,6 +493,7 @@ export interface WorkSourceFile {
|
|
|
481
493
|
contentType: string;
|
|
482
494
|
size: number;
|
|
483
495
|
updatedAt: number;
|
|
496
|
+
fingerprint?: string;
|
|
484
497
|
}
|
|
485
498
|
export interface WorkFolder {
|
|
486
499
|
id: string;
|
|
@@ -4,6 +4,7 @@ export interface OfficeKernelLayoutInput {
|
|
|
4
4
|
documentRevision: number;
|
|
5
5
|
startPageIndex?: number;
|
|
6
6
|
page: OfficeKernelLayoutRequest['page'];
|
|
7
|
+
pageStyles?: OfficeKernelLayoutRequest['pageStyles'];
|
|
7
8
|
blocks: OfficeKernelLayoutRequest['blocks'];
|
|
8
9
|
}
|
|
9
10
|
export interface OfficeKernelPresentationGeometryInput {
|