@a3s-lab/office 0.28.0 → 0.30.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/README.md +126 -3
- package/dist/0~1403.js +1 -1
- package/dist/0~4980.js +1 -1
- package/dist/0~7048.js +1 -1
- package/dist/{0~7043.js → 0~7231.js} +400 -242
- package/dist/{0~5093.js → 0~7360.js} +293 -53
- package/dist/0~7614.js +1 -1
- package/dist/0~document-editor.js +1535 -102
- package/dist/0~presentation-editor.js +1 -1
- package/dist/0~spreadsheet-editor.js +184 -36
- package/dist/0~work-docx-export.js +437 -11
- package/dist/0~work-docx-import.js +32 -7
- package/dist/0~work-office-diagnostics.js +170 -7
- package/dist/0~work-pptx-export.js +1 -1
- package/dist/0~work-pptx-import.js +1 -1
- package/dist/0~work-presentation-charts.js +1 -1
- package/dist/1544.js +14 -2
- package/dist/4104.js +31 -8
- package/dist/4121.js +3448 -0
- package/dist/6282.js +558 -1688
- package/dist/8715.js +1 -1
- package/dist/core.js +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/features/work/editors/document-command-catalog.d.ts +27 -0
- package/dist/internal/features/work/editors/document-font-dialog-model.d.ts +8 -2
- package/dist/internal/features/work/editors/document-font-dialog-run-border-model.d.ts +24 -0
- package/dist/internal/features/work/editors/document-font-dialog-run-border-section.d.ts +10 -0
- package/dist/internal/features/work/editors/document-font-dialog-run-shading-model.d.ts +23 -0
- package/dist/internal/features/work/editors/document-font-dialog-run-shading-section.d.ts +8 -0
- package/dist/internal/features/work/editors/document-page-chrome-ribbon.d.ts +2 -1
- package/dist/internal/features/work/editors/document-proofing-dialog-model.d.ts +22 -0
- package/dist/internal/features/work/editors/document-proofing-dialog.d.ts +7 -0
- package/dist/internal/features/work/editors/document-table-of-contents-dialog.d.ts +10 -0
- package/dist/internal/features/work/editors/document-toolbar.d.ts +3 -1
- package/dist/internal/features/work/editors/spreadsheet-data-validation.d.ts +7 -1
- package/dist/internal/features/work/editors/use-document-insert-commands.d.ts +2 -0
- package/dist/internal/features/work/work-document-character-formatting.d.ts +12 -0
- package/dist/internal/features/work/work-document-format-changes.d.ts +7 -0
- package/dist/internal/features/work/work-document-highlight.d.ts +9 -0
- package/dist/internal/features/work/work-document-outline.d.ts +1 -0
- package/dist/internal/features/work/work-document-paragraph-shading.d.ts +6 -0
- package/dist/internal/features/work/work-document-proofing.d.ts +19 -0
- package/dist/internal/features/work/work-document-run-border.d.ts +11 -0
- package/dist/internal/features/work/work-document-run-shading.d.ts +12 -0
- package/dist/internal/features/work/work-document-table-of-contents-node.d.ts +18 -0
- package/dist/internal/features/work/work-document-table-of-contents.d.ts +51 -0
- package/dist/internal/features/work/work-document-word-line-metrics.d.ts +4 -0
- package/dist/internal/features/work/work-docx-field-instructions.d.ts +1 -1
- package/dist/internal/features/work/work-docx-import.d.ts +3 -1
- package/dist/internal/features/work/work-docx-proofing-diagnostics.d.ts +3 -0
- package/dist/internal/features/work/work-docx-proofing.d.ts +38 -0
- package/dist/internal/features/work/work-docx-run-border-diagnostics.d.ts +3 -0
- package/dist/internal/features/work/work-docx-run-border-export.d.ts +17 -0
- package/dist/internal/features/work/work-docx-run-border.d.ts +20 -0
- package/dist/internal/features/work/work-docx-run-formatting-import.d.ts +9 -0
- package/dist/internal/features/work/work-docx-run-shading-diagnostics.d.ts +3 -0
- package/dist/internal/features/work/work-docx-run-shading-export.d.ts +17 -0
- package/dist/internal/features/work/work-docx-run-shading.d.ts +20 -0
- package/dist/internal/features/work/work-docx-table-of-contents-export.d.ts +11 -0
- package/dist/internal/features/work/work-docx-table-of-contents-import.d.ts +15 -0
- package/dist/internal/features/work/work-spreadsheet-data-validation.d.ts +7 -0
- package/dist/internal/features/work/work-types.d.ts +9 -0
- package/dist/internal/kernel/office-kernel-protocol.d.ts +1 -0
- package/dist/office-kernel.wasm +0 -0
- package/dist/styles.css +339 -1
- package/docs/latest/en/browser-editor-architecture.md +72 -1
- package/package.json +15 -2
- package/dist/5184.js +0 -662
- package/dist/9424.js +0 -16
package/dist/8715.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createOfficeId as createWorkId, directChild, attribute } from "./
|
|
1
|
+
import { createOfficeId as createWorkId, directChild, attribute } from "./4121.js";
|
|
2
2
|
const CELL_REFERENCE = /\$?([A-Z]{1,3})\$?([1-9]\d*)/i;
|
|
3
3
|
const CELL_OR_RANGE = new RegExp(`^${CELL_REFERENCE.source}(?::${CELL_REFERENCE.source})?$`, 'i');
|
|
4
4
|
const COLUMN_RANGE = /^\$?([A-Z]{1,3}):\$?([A-Z]{1,3})$/i;
|
package/dist/core.js
CHANGED
|
@@ -3,7 +3,7 @@ export { AGENT_PROPOSAL_PROTOCOL, OFFICE_NOTIFICATION_EVENT, createAgentProposal
|
|
|
3
3
|
export { DOCUMENT_SNAPSHOT_MEDIA_TYPE, DOCUMENT_SNAPSHOT_SCHEMA, DOCUMENT_SNAPSHOT_VERSION, DOCUMENT_SOURCE_MEDIA_TYPE, DOCUMENT_SOURCE_SCHEMA, DOCUMENT_SOURCE_VERSION, OFFICE_COLLABORATION_DEFAULT_MAX_TRANSPORT_PAYLOAD_BYTES, OFFICE_COLLABORATION_MAX_TRANSPORT_PAYLOAD_BYTES, OFFICE_COLLABORATION_PRESENCE_FIELD, OFFICE_FILE_ACCEPT, applyDocumentSource, artifactExtension, artifactExtension as workArtifactExtension, artifactKindLabel, artifactKindLabel as workArtifactKindLabel, createArtifactBlob, createOfficeCollaborationPresence, createOfficeCollaborationTransportBinding, createPdfCollaborationContent, decodeDocumentSnapshot, defaultPptxRuntimeUrl, downloadArtifact, downloadArtifactPdf, encodeDocumentSnapshot, forgetSourceBlob, importOfficeFile, officeKindForFile, pdfPagesForExport, projectDocumentSource, readSourceBlob, registerSourceBlob } from "./4104.js";
|
|
4
4
|
export { OFFICE_COLLABORATION_NAMESPACE, OFFICE_COLLABORATION_PROTOCOL, OfficeCollaborationError, createOfficeCollaborationSession, readOfficeCollaborationMetadata } from "./9787.js";
|
|
5
5
|
export { assertPdfCollaborationSource, createOfficePdfCollaborationBinding, initializeOfficePdfCollaboration, readOfficePdfCollaboration, readOfficePdfCollaborationSource, replaceOfficePdfCollaboration } from "./3818.js";
|
|
6
|
-
export { createArtifact, createOfficeId, officeTemplates } from "./
|
|
6
|
+
export { createArtifact, createOfficeId, officeTemplates } from "./4121.js";
|
|
7
7
|
export { createOfficeDocumentCollaborationBinding, initializeOfficeDocumentCollaboration, officeDocumentCollaborationFragment, readOfficeDocumentCollaboration } from "./6282.js";
|
|
8
8
|
export { createOfficeMarkdownCollaborationBinding, initializeOfficeMarkdownCollaboration, readOfficeMarkdownCollaboration, replaceOfficeMarkdownCollaboration } from "./2591.js";
|
|
9
9
|
export { createOfficePresentationCollaborationBinding, initializeOfficePresentationCollaboration, readOfficePresentationCollaboration, replaceOfficePresentationCollaboration } from "./4560.js";
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ export { DOCUMENT_SNAPSHOT_MEDIA_TYPE, DOCUMENT_SNAPSHOT_SCHEMA, DOCUMENT_SOURCE
|
|
|
6
6
|
export { DocumentEditor, MarkdownEditor, PDF_EVIDENCE_COORDINATE_BASIS, PdfViewer, PresentationEditor, SpreadsheetEditor, defaultDocumentArabicLayoutFontUrl, defaultDocumentHebrewLayoutFontUrl, defaultDocumentLatinLayoutFontUrl, defaultDocumentLayoutFontUrl, defaultDocumentLayoutFonts, defaultOfficeKernelWasmUrl, defaultPdfiumWasmUrl, preloadOfficeEditor } from "./432.js";
|
|
7
7
|
export { OFFICE_COLLABORATION_NAMESPACE, OFFICE_COLLABORATION_PROTOCOL, OfficeCollaborationError, createOfficeCollaborationSession, readOfficeCollaborationMetadata } from "./9787.js";
|
|
8
8
|
export { assertPdfCollaborationSource, createOfficePdfCollaborationBinding, initializeOfficePdfCollaboration, readOfficePdfCollaboration, readOfficePdfCollaborationSource, replaceOfficePdfCollaboration } from "./3818.js";
|
|
9
|
-
export { createArtifact, createOfficeId, officeTemplates } from "./
|
|
9
|
+
export { createArtifact, createOfficeId, officeTemplates } from "./4121.js";
|
|
10
10
|
export { createOfficeDocumentCollaborationBinding, initializeOfficeDocumentCollaboration, officeDocumentCollaborationFragment, readOfficeDocumentCollaboration } from "./6282.js";
|
|
11
11
|
export { createOfficeMarkdownCollaborationBinding, initializeOfficeMarkdownCollaboration, readOfficeMarkdownCollaboration, replaceOfficeMarkdownCollaboration } from "./2591.js";
|
|
12
12
|
export { createOfficePresentationCollaborationBinding, initializeOfficePresentationCollaboration, readOfficePresentationCollaboration, replaceOfficePresentationCollaboration } from "./4560.js";
|
|
@@ -333,6 +333,15 @@ export declare const documentCommandCatalog: {
|
|
|
333
333
|
readonly editor: readonly ["Mod-Shift-h"];
|
|
334
334
|
};
|
|
335
335
|
};
|
|
336
|
+
readonly runBorder: {
|
|
337
|
+
readonly id: "font.runBorder";
|
|
338
|
+
readonly label: "字符边框";
|
|
339
|
+
readonly location: {
|
|
340
|
+
readonly area: "ribbon";
|
|
341
|
+
readonly tab: "home";
|
|
342
|
+
readonly group: "font";
|
|
343
|
+
};
|
|
344
|
+
};
|
|
336
345
|
readonly clearFormatting: {
|
|
337
346
|
readonly id: "font.clearFormatting";
|
|
338
347
|
readonly label: "清除格式";
|
|
@@ -589,6 +598,24 @@ export declare const documentCommandCatalog: {
|
|
|
589
598
|
readonly editor: readonly ["Mod-Shift-e"];
|
|
590
599
|
};
|
|
591
600
|
};
|
|
601
|
+
readonly tableOfContents: {
|
|
602
|
+
readonly id: "references.tableOfContents";
|
|
603
|
+
readonly label: "插入或自定义目录";
|
|
604
|
+
readonly location: {
|
|
605
|
+
readonly area: "ribbon";
|
|
606
|
+
readonly tab: "references";
|
|
607
|
+
readonly group: "tableOfContents";
|
|
608
|
+
};
|
|
609
|
+
};
|
|
610
|
+
readonly refreshTableOfContents: {
|
|
611
|
+
readonly id: "references.refreshTableOfContents";
|
|
612
|
+
readonly label: "更新目录";
|
|
613
|
+
readonly location: {
|
|
614
|
+
readonly area: "ribbon";
|
|
615
|
+
readonly tab: "references";
|
|
616
|
+
readonly group: "tableOfContents";
|
|
617
|
+
};
|
|
618
|
+
};
|
|
592
619
|
readonly refreshFields: {
|
|
593
620
|
readonly id: "references.refreshFields";
|
|
594
621
|
readonly label: "更新域";
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { Editor } from '@tiptap/core';
|
|
2
2
|
import { type WorkDocumentEmphasisMark } from '../work-document-emphasis';
|
|
3
3
|
import { type DocumentFontDialogScriptFontPatch, type DocumentFontFamilySource } from './document-font-dialog-script-font-model';
|
|
4
|
+
import { type DocumentFontDialogRunBorderDraft, type DocumentFontDialogRunBorderPatch, type DocumentFontDialogRunBorderSource } from './document-font-dialog-run-border-model';
|
|
5
|
+
import { type DocumentFontDialogRunShadingDraft, type DocumentFontDialogRunShadingPatch, type DocumentFontDialogRunShadingSource } from './document-font-dialog-run-shading-model';
|
|
4
6
|
export type { DocumentFontFamilySource } from './document-font-dialog-script-font-model';
|
|
5
7
|
export type DocumentCharacterSpacingMode = 'condensed' | 'expanded' | 'mixed' | 'normal';
|
|
6
8
|
export type DocumentCharacterPositionMode = 'lowered' | 'mixed' | 'normal' | 'raised';
|
|
@@ -47,6 +49,8 @@ export interface DocumentFontDialogSource {
|
|
|
47
49
|
mixed: boolean;
|
|
48
50
|
value: boolean | null;
|
|
49
51
|
};
|
|
52
|
+
runBorder: DocumentFontDialogRunBorderSource;
|
|
53
|
+
runShading: DocumentFontDialogRunShadingSource;
|
|
50
54
|
latinFont: DocumentFontFamilySource;
|
|
51
55
|
eastAsiaFont: DocumentFontFamilySource;
|
|
52
56
|
complexScriptFont: DocumentFontFamilySource;
|
|
@@ -55,7 +59,7 @@ export interface DocumentFontDialogSource {
|
|
|
55
59
|
previewText: string;
|
|
56
60
|
selectedCharacters: number;
|
|
57
61
|
}
|
|
58
|
-
export interface DocumentFontDialogDraft {
|
|
62
|
+
export interface DocumentFontDialogDraft extends DocumentFontDialogRunBorderDraft, DocumentFontDialogRunShadingDraft {
|
|
59
63
|
characterScaleMode: DocumentCharacterScaleMode;
|
|
60
64
|
characterScalePercent: string;
|
|
61
65
|
characterPositionMode: DocumentCharacterPositionMode;
|
|
@@ -74,7 +78,7 @@ export interface DocumentFontDialogDraft {
|
|
|
74
78
|
eastAsiaFont: string;
|
|
75
79
|
complexScriptFont: string;
|
|
76
80
|
}
|
|
77
|
-
export interface DocumentFontDialogPatch extends DocumentFontDialogScriptFontPatch {
|
|
81
|
+
export interface DocumentFontDialogPatch extends DocumentFontDialogScriptFontPatch, DocumentFontDialogRunBorderPatch, DocumentFontDialogRunShadingPatch {
|
|
78
82
|
characterScalePercent?: number;
|
|
79
83
|
characterPositionHalfPoints?: number;
|
|
80
84
|
characterSpacingTwips?: number;
|
|
@@ -98,6 +102,8 @@ export interface DocumentFontDialogTouched {
|
|
|
98
102
|
legacyTextShadow: boolean;
|
|
99
103
|
legacyTextEmboss: boolean;
|
|
100
104
|
legacyTextImprint: boolean;
|
|
105
|
+
runBorder: boolean;
|
|
106
|
+
runShading: boolean;
|
|
101
107
|
kerning: boolean;
|
|
102
108
|
latinFont: boolean;
|
|
103
109
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type DocumentRunBorder, type DocumentRunBorderStyle } from '../work-document-run-border';
|
|
2
|
+
export type DocumentFontDialogRunBorderMode = 'inherit' | 'mixed' | 'none' | 'value';
|
|
3
|
+
export interface DocumentFontDialogRunBorderSource {
|
|
4
|
+
mixed: boolean;
|
|
5
|
+
value: DocumentRunBorder | null;
|
|
6
|
+
}
|
|
7
|
+
export interface DocumentFontDialogRunBorderDraft {
|
|
8
|
+
runBorderMode: DocumentFontDialogRunBorderMode;
|
|
9
|
+
runBorderStyle: DocumentRunBorderStyle;
|
|
10
|
+
runBorderColor: 'auto' | `#${string}`;
|
|
11
|
+
runBorderWidthPoints: string;
|
|
12
|
+
runBorderSpacingPoints: string;
|
|
13
|
+
runBorderShadow: boolean;
|
|
14
|
+
runBorderFrame: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface DocumentFontDialogRunBorderPatch {
|
|
17
|
+
runBorder?: DocumentRunBorder | null;
|
|
18
|
+
}
|
|
19
|
+
export declare function addDocumentFontDialogRunBorderValue(values: Map<string, DocumentRunBorder | null>, source: unknown): void;
|
|
20
|
+
export declare function selectedDocumentFontDialogRunBorderValue(values: ReadonlyMap<string, DocumentRunBorder | null>): DocumentFontDialogRunBorderSource;
|
|
21
|
+
export declare function createDocumentFontDialogRunBorderDraft(source: DocumentFontDialogRunBorderSource): DocumentFontDialogRunBorderDraft;
|
|
22
|
+
export declare function documentFontDialogRunBorderDraftError(draft: DocumentFontDialogRunBorderDraft): string | null;
|
|
23
|
+
export declare function documentFontDialogRunBorderPatch(source: DocumentFontDialogRunBorderSource, draft: DocumentFontDialogRunBorderDraft, touched: boolean): DocumentFontDialogRunBorderPatch;
|
|
24
|
+
export declare function documentFontDialogRunBorderFromDraft(source: DocumentFontDialogRunBorderSource, draft: DocumentFontDialogRunBorderDraft): DocumentRunBorder | null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
import { type DocumentFontDialogRunBorderDraft, type DocumentFontDialogRunBorderSource } from './document-font-dialog-run-border-model';
|
|
3
|
+
export declare function DocumentFontDialogRunBorderSection({ source, draft, touched, onDraftChange, onTouched, }: {
|
|
4
|
+
source: DocumentFontDialogRunBorderSource;
|
|
5
|
+
draft: DocumentFontDialogRunBorderDraft;
|
|
6
|
+
touched: boolean;
|
|
7
|
+
onDraftChange: (patch: Partial<DocumentFontDialogRunBorderDraft>) => void;
|
|
8
|
+
onTouched: () => void;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
10
|
+
export declare function documentFontDialogRunBorderPreviewStyle(source: DocumentFontDialogRunBorderSource, draft: DocumentFontDialogRunBorderDraft): CSSProperties;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
import { type DocumentRunShading, type DocumentRunShadingPattern } from '../work-document-run-shading';
|
|
3
|
+
export type DocumentFontDialogRunShadingMode = 'inherit' | 'mixed' | 'none' | 'value';
|
|
4
|
+
export interface DocumentFontDialogRunShadingSource {
|
|
5
|
+
mixed: boolean;
|
|
6
|
+
value: DocumentRunShading | null;
|
|
7
|
+
}
|
|
8
|
+
export interface DocumentFontDialogRunShadingDraft {
|
|
9
|
+
runShadingMode: DocumentFontDialogRunShadingMode;
|
|
10
|
+
runShadingPattern: Exclude<DocumentRunShadingPattern, 'nil'>;
|
|
11
|
+
runShadingColor: 'auto' | `#${string}`;
|
|
12
|
+
runShadingFill: 'auto' | `#${string}`;
|
|
13
|
+
}
|
|
14
|
+
export interface DocumentFontDialogRunShadingPatch {
|
|
15
|
+
runShading?: DocumentRunShading | null;
|
|
16
|
+
}
|
|
17
|
+
export declare function addDocumentFontDialogRunShadingValue(values: Map<string, DocumentRunShading | null>, source: unknown): void;
|
|
18
|
+
export declare function selectedDocumentFontDialogRunShadingValue(values: ReadonlyMap<string, DocumentRunShading | null>): DocumentFontDialogRunShadingSource;
|
|
19
|
+
export declare function createDocumentFontDialogRunShadingDraft(source: DocumentFontDialogRunShadingSource): DocumentFontDialogRunShadingDraft;
|
|
20
|
+
export declare function documentFontDialogRunShadingDraftError(draft: DocumentFontDialogRunShadingDraft): string | null;
|
|
21
|
+
export declare function documentFontDialogRunShadingPatch(source: DocumentFontDialogRunShadingSource, draft: DocumentFontDialogRunShadingDraft, touched: boolean): DocumentFontDialogRunShadingPatch;
|
|
22
|
+
export declare function documentFontDialogRunShadingFromDraft(source: DocumentFontDialogRunShadingSource, draft: DocumentFontDialogRunShadingDraft): DocumentRunShading | null;
|
|
23
|
+
export declare function documentFontDialogRunShadingPreviewStyle(source: DocumentFontDialogRunShadingSource, draft: DocumentFontDialogRunShadingDraft): CSSProperties;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DocumentFontDialogRunShadingDraft, DocumentFontDialogRunShadingSource } from './document-font-dialog-run-shading-model';
|
|
2
|
+
export declare function DocumentFontDialogRunShadingSection({ source, draft, touched, onDraftChange, onTouched, }: {
|
|
3
|
+
source: DocumentFontDialogRunShadingSource;
|
|
4
|
+
draft: DocumentFontDialogRunShadingDraft;
|
|
5
|
+
touched: boolean;
|
|
6
|
+
onDraftChange: (patch: Partial<DocumentFontDialogRunShadingDraft>) => void;
|
|
7
|
+
onTouched: () => void;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { Editor } from '@tiptap/core';
|
|
2
2
|
export type DocumentPageChromeEditingPart = 'footer' | 'header';
|
|
3
|
-
export declare function DocumentPageChromeRibbon({ editor, editingPart, showPageNumber, onEditingPartChange, onTogglePageNumber, onOpenFontDialog, onClose, }: {
|
|
3
|
+
export declare function DocumentPageChromeRibbon({ editor, editingPart, showPageNumber, onEditingPartChange, onTogglePageNumber, onOpenFontDialog, onOpenProofingDialog, onClose, }: {
|
|
4
4
|
editor: Editor;
|
|
5
5
|
editingPart: DocumentPageChromeEditingPart;
|
|
6
6
|
showPageNumber: boolean;
|
|
7
7
|
onEditingPartChange: (part: DocumentPageChromeEditingPart) => void;
|
|
8
8
|
onTogglePageNumber: () => void;
|
|
9
9
|
onOpenFontDialog?: () => void;
|
|
10
|
+
onOpenProofingDialog?: () => void;
|
|
10
11
|
onClose: () => void;
|
|
11
12
|
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Editor } from '@tiptap/core';
|
|
2
|
+
import { type WorkDocumentProofingLanguageSlot } from '../work-document-proofing';
|
|
3
|
+
export interface DocumentProofingDialogValue<T> {
|
|
4
|
+
mixed: boolean;
|
|
5
|
+
value: T | null;
|
|
6
|
+
}
|
|
7
|
+
export interface DocumentProofingDialogSource {
|
|
8
|
+
latin: DocumentProofingDialogValue<string>;
|
|
9
|
+
eastAsia: DocumentProofingDialogValue<string>;
|
|
10
|
+
bidi: DocumentProofingDialogValue<string>;
|
|
11
|
+
noProof: DocumentProofingDialogValue<boolean>;
|
|
12
|
+
selectedCharacters: number;
|
|
13
|
+
}
|
|
14
|
+
export interface DocumentProofingDialogPatch {
|
|
15
|
+
languages?: Partial<Record<WorkDocumentProofingLanguageSlot, string | null>>;
|
|
16
|
+
noProof?: boolean | null;
|
|
17
|
+
}
|
|
18
|
+
export declare function documentProofingDialogSource(editor: Editor): DocumentProofingDialogSource;
|
|
19
|
+
export declare function applyDocumentProofingDialogPatch(editor: Editor, selection: {
|
|
20
|
+
from: number;
|
|
21
|
+
to: number;
|
|
22
|
+
}, patch: DocumentProofingDialogPatch): boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { DocumentProofingDialogPatch, DocumentProofingDialogSource } from './document-proofing-dialog-model';
|
|
2
|
+
export declare function DocumentProofingDialog({ source, restoreFocusTarget, onApply, onClose, }: {
|
|
3
|
+
source: DocumentProofingDialogSource;
|
|
4
|
+
restoreFocusTarget: () => HTMLElement | null;
|
|
5
|
+
onApply: (patch: DocumentProofingDialogPatch) => boolean;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { WorkDocumentTableOfContentsOptions } from '../work-document-table-of-contents';
|
|
2
|
+
export interface DocumentTableOfContentsDialogProps {
|
|
3
|
+
editing: boolean;
|
|
4
|
+
options: WorkDocumentTableOfContentsOptions;
|
|
5
|
+
restoreFocusTarget: () => HTMLElement | null;
|
|
6
|
+
onCancel: () => void;
|
|
7
|
+
onOptionsChange: (options: WorkDocumentTableOfContentsOptions) => void;
|
|
8
|
+
onSubmit: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function DocumentTableOfContentsDialog({ editing, options, restoreFocusTarget, onCancel, onOptionsChange, onSubmit, }: DocumentTableOfContentsDialogProps): import("react").JSX.Element;
|
|
@@ -57,11 +57,13 @@ interface DocumentToolbarProps {
|
|
|
57
57
|
onInsertNote: (kind: WorkDocumentNoteKind) => void;
|
|
58
58
|
onInsertCaption: (kind: WorkDocumentCaptionKind) => void;
|
|
59
59
|
onInsertCrossReference: () => void;
|
|
60
|
+
onOpenTableOfContents: () => void;
|
|
60
61
|
citationsOpen: boolean;
|
|
61
62
|
citationSourceCount: number;
|
|
62
63
|
onToggleCitations: () => void;
|
|
63
64
|
onInsertField: (kind: WorkDocumentFieldKind) => void;
|
|
64
65
|
onRefreshFields: () => void;
|
|
66
|
+
onRefreshTableOfContents: () => void;
|
|
65
67
|
canInsertComment: boolean;
|
|
66
68
|
onInsertComment: () => void;
|
|
67
69
|
commentsOpen: boolean;
|
|
@@ -79,5 +81,5 @@ interface DocumentToolbarProps {
|
|
|
79
81
|
onOpenWordCount: () => void;
|
|
80
82
|
onOpenFindReplace: (mode: DocumentFindReplaceMode) => void;
|
|
81
83
|
}
|
|
82
|
-
export declare function DocumentToolbar({ editor, defaultRibbonCollapsed, reviewOnly, suggestionOnly, history, layoutOpen, layout, layoutFonts, navigationOpen, pageColor, showPageNumbers, showHiddenText, showRulers, spellcheckEnabled, viewMode, zoom, pageChromeEditor, pageChromeEditingPart, pageChromeShowPageNumber, onRequestImage, onPageChromeEditingPartChange, onClosePageChrome, onTogglePageChromePageNumber, onToggleLayout, onLayoutChange, onOpenLayout, onToggleNavigation, onTogglePageNumbers, onToggleHiddenText, onToggleRulers, onPageColorChange, onToggleSpellcheck, onViewModeChange, onZoomChange, onZoomFit, onInsertSection, onInsertNote, onInsertCaption, onInsertCrossReference, citationsOpen, citationSourceCount, onToggleCitations, onInsertField, onRefreshFields, canInsertComment, onInsertComment, commentsOpen, commentCount, onToggleComments, trackChanges, changesOpen, changeCount, findReplaceMode, fileActions, onRibbonTabChange, onToggleTrackChanges, onToggleChanges, onDecideChange, onOpenWordCount, onOpenFindReplace, }: DocumentToolbarProps): import("react").JSX.Element;
|
|
84
|
+
export declare function DocumentToolbar({ editor, defaultRibbonCollapsed, reviewOnly, suggestionOnly, history, layoutOpen, layout, layoutFonts, navigationOpen, pageColor, showPageNumbers, showHiddenText, showRulers, spellcheckEnabled, viewMode, zoom, pageChromeEditor, pageChromeEditingPart, pageChromeShowPageNumber, onRequestImage, onPageChromeEditingPartChange, onClosePageChrome, onTogglePageChromePageNumber, onToggleLayout, onLayoutChange, onOpenLayout, onToggleNavigation, onTogglePageNumbers, onToggleHiddenText, onToggleRulers, onPageColorChange, onToggleSpellcheck, onViewModeChange, onZoomChange, onZoomFit, onInsertSection, onInsertNote, onInsertCaption, onInsertCrossReference, onOpenTableOfContents, citationsOpen, citationSourceCount, onToggleCitations, onInsertField, onRefreshFields, onRefreshTableOfContents, canInsertComment, onInsertComment, commentsOpen, commentCount, onToggleComments, trackChanges, changesOpen, changeCount, findReplaceMode, fileActions, onRibbonTabChange, onToggleTrackChanges, onToggleChanges, onDecideChange, onOpenWordCount, onOpenFindReplace, }: DocumentToolbarProps): import("react").JSX.Element;
|
|
83
85
|
export {};
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import type { WorkSpreadsheetContent, WorkSpreadsheetDataValidationItem, WorkSpreadsheetSheet } from '../work-types';
|
|
1
|
+
import type { WorkSpreadsheetContent, WorkSpreadsheetDataValidationErrorStyle, WorkSpreadsheetDataValidationItem, WorkSpreadsheetSheet } from '../work-types';
|
|
2
2
|
import { type SpreadsheetCellRange } from './spreadsheet-cell-range';
|
|
3
3
|
export declare const MAX_SPREADSHEET_DATA_VALIDATION_CELLS = 10000;
|
|
4
4
|
export type SpreadsheetDataValidationType = 'date' | 'dropdown' | 'number' | 'number_integer' | 'text_length';
|
|
5
5
|
export type SpreadsheetDataValidationOperator = 'between' | 'equal' | 'greaterOrEqualTo' | 'lessThan' | 'lessThanOrEqualTo' | 'moreThanThe' | 'noEarlierThan' | 'noLaterThan' | 'notBetween' | 'notEqualTo' | 'earlierThan' | 'laterThan';
|
|
6
6
|
export interface SpreadsheetDataValidationDialogValue {
|
|
7
|
+
allowBlank: boolean;
|
|
8
|
+
errorMessage: string;
|
|
9
|
+
errorStyle: WorkSpreadsheetDataValidationErrorStyle;
|
|
10
|
+
errorTitle: string;
|
|
7
11
|
hintShow: boolean;
|
|
12
|
+
hintTitle: string;
|
|
8
13
|
hintValue: string;
|
|
9
14
|
prohibitInput: boolean;
|
|
15
|
+
showDropdownArrow: boolean;
|
|
10
16
|
type: SpreadsheetDataValidationType;
|
|
11
17
|
type2: SpreadsheetDataValidationOperator | '';
|
|
12
18
|
value1: string;
|
|
@@ -11,7 +11,9 @@ export interface DocumentInsertCommands {
|
|
|
11
11
|
insertField: (kind: WorkDocumentFieldKind) => void;
|
|
12
12
|
insertImage: (file: File) => Promise<void>;
|
|
13
13
|
insertNote: (kind: WorkDocumentNoteKind) => boolean;
|
|
14
|
+
openTableOfContents: () => void;
|
|
14
15
|
refreshFields: () => boolean;
|
|
16
|
+
refreshTableOfContents: () => boolean;
|
|
15
17
|
}
|
|
16
18
|
export declare function useDocumentInsertCommands({ contentRef, editor, resolveFieldContext, }: {
|
|
17
19
|
contentRef: MutableRefObject<WorkDocumentContent>;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Extension, type Editor } from '@tiptap/core';
|
|
2
2
|
import { type WorkDocumentEmphasisMark } from './work-document-emphasis';
|
|
3
3
|
import { type WorkDocumentTextCase } from './work-document-text-case';
|
|
4
|
+
import { type DocumentRunBorder } from './work-document-run-border';
|
|
5
|
+
import { type DocumentRunShading } from './work-document-run-shading';
|
|
6
|
+
import { type WorkDocumentProofingLanguages } from './work-document-proofing';
|
|
4
7
|
declare module '@tiptap/core' {
|
|
5
8
|
interface Commands<ReturnType> {
|
|
6
9
|
documentCharacterFormatting: {
|
|
@@ -18,6 +21,15 @@ declare module '@tiptap/core' {
|
|
|
18
21
|
toggleDocumentHiddenText: () => ReturnType;
|
|
19
22
|
setDocumentTextCase: (textCase: WorkDocumentTextCase) => ReturnType;
|
|
20
23
|
toggleDocumentTextCase: (textCase: Exclude<WorkDocumentTextCase, 'none'>) => ReturnType;
|
|
24
|
+
setDocumentRunBorder: (border: DocumentRunBorder) => ReturnType;
|
|
25
|
+
unsetDocumentRunBorder: () => ReturnType;
|
|
26
|
+
toggleDocumentRunBorder: () => ReturnType;
|
|
27
|
+
setDocumentRunShading: (shading: DocumentRunShading) => ReturnType;
|
|
28
|
+
unsetDocumentRunShading: () => ReturnType;
|
|
29
|
+
setDocumentProofingLanguages: (languages: WorkDocumentProofingLanguages) => ReturnType;
|
|
30
|
+
unsetDocumentProofingLanguages: () => ReturnType;
|
|
31
|
+
setDocumentNoProof: (noProof: boolean) => ReturnType;
|
|
32
|
+
unsetDocumentNoProof: () => ReturnType;
|
|
21
33
|
};
|
|
22
34
|
}
|
|
23
35
|
}
|
|
@@ -5,6 +5,8 @@ import { type WorkDocumentTextCase } from './work-document-text-case';
|
|
|
5
5
|
import { type WorkDocumentUnderlineFormatting } from './work-document-underline';
|
|
6
6
|
import { type WorkDocumentStrikeFormatting } from './work-document-strike';
|
|
7
7
|
import { type WorkDocumentScriptFontSlot, type WorkDocumentScriptFonts } from './work-document-script-fonts';
|
|
8
|
+
import { type WorkDocumentHighlight } from './work-document-highlight';
|
|
9
|
+
import { type WorkDocumentProofingLanguages } from './work-document-proofing';
|
|
8
10
|
export declare const DOCUMENT_CHARACTER_FORMAT_MARKS: readonly ["bold", "italic", "underline", "strike", "subscript", "superscript", "textStyle", "highlight"];
|
|
9
11
|
export type DocumentCharacterFormatMarkName = (typeof DOCUMENT_CHARACTER_FORMAT_MARKS)[number];
|
|
10
12
|
export interface DocumentCharacterFormatMark {
|
|
@@ -35,6 +37,10 @@ export declare function importedDocumentCharacterFormatting(formatting: {
|
|
|
35
37
|
legacyTextShadow?: boolean;
|
|
36
38
|
legacyTextEmboss?: boolean;
|
|
37
39
|
legacyTextImprint?: boolean;
|
|
40
|
+
runBorder?: string;
|
|
41
|
+
runShading?: string;
|
|
42
|
+
proofingLanguages?: WorkDocumentProofingLanguages;
|
|
43
|
+
noProof?: boolean;
|
|
38
44
|
wordLineHeightFactor?: number;
|
|
39
45
|
wordSnapToGrid?: boolean;
|
|
40
46
|
fontSize?: number;
|
|
@@ -42,5 +48,6 @@ export declare function importedDocumentCharacterFormatting(formatting: {
|
|
|
42
48
|
backgroundColor?: string;
|
|
43
49
|
themeColor?: string;
|
|
44
50
|
themeFill?: string;
|
|
51
|
+
highlight?: WorkDocumentHighlight;
|
|
45
52
|
textCase?: WorkDocumentTextCase;
|
|
46
53
|
}): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const DOCUMENT_HIGHLIGHT_ATTRIBUTE = "data-office-highlight";
|
|
2
|
+
export type WorkDocumentHighlight = 'black' | 'blue' | 'cyan' | 'darkBlue' | 'darkCyan' | 'darkGray' | 'darkGreen' | 'darkMagenta' | 'darkRed' | 'darkYellow' | 'green' | 'lightGray' | 'magenta' | 'none' | 'red' | 'white' | 'yellow';
|
|
3
|
+
export declare const DOCUMENT_HIGHLIGHT_VALUES: Set<WorkDocumentHighlight>;
|
|
4
|
+
export declare function normalizeDocumentHighlight(source: unknown): WorkDocumentHighlight | null;
|
|
5
|
+
export declare function documentHighlightFromDocxValue(source: unknown): WorkDocumentHighlight | null;
|
|
6
|
+
export declare function documentHighlightCssColor(source: unknown): string | null;
|
|
7
|
+
export declare function documentHighlightForCssColor(source: unknown): WorkDocumentHighlight | null;
|
|
8
|
+
export declare function documentHighlightFromElement(element: HTMLElement): WorkDocumentHighlight | null;
|
|
9
|
+
export declare function documentHighlightDomAttributes(source: unknown): Record<string, string>;
|
|
@@ -10,5 +10,6 @@ export interface WorkDocumentOutlineItem {
|
|
|
10
10
|
hasChildren: boolean;
|
|
11
11
|
}
|
|
12
12
|
export declare function collectWorkDocumentOutline(document: ProseMirrorNode): WorkDocumentOutlineItem[];
|
|
13
|
+
export declare function workDocumentOutlineLevel(node: ProseMirrorNode): number | null;
|
|
13
14
|
export declare function currentWorkDocumentOutlineItem(items: readonly WorkDocumentOutlineItem[], position: number): WorkDocumentOutlineItem | null;
|
|
14
15
|
export declare function visibleWorkDocumentOutlineItems(items: readonly WorkDocumentOutlineItem[], collapsedIds: ReadonlySet<string>, rawQuery: string): WorkDocumentOutlineItem[];
|
|
@@ -16,3 +16,9 @@ export declare function parseDocumentParagraphShading(source: unknown): Document
|
|
|
16
16
|
export declare function serializeDocumentParagraphShading(source: unknown): string | undefined;
|
|
17
17
|
export declare function parseDocumentParagraphShadingElement(element: HTMLElement): DocumentParagraphShading | null;
|
|
18
18
|
export declare function documentParagraphShadingDomAttributes(source: unknown): Record<string, string>;
|
|
19
|
+
export declare function documentParagraphShadingPresentation(shading: DocumentParagraphShading): {
|
|
20
|
+
backgroundColor: string;
|
|
21
|
+
backgroundImage?: string;
|
|
22
|
+
backgroundSize?: string;
|
|
23
|
+
};
|
|
24
|
+
export declare function paragraphShadingBackgroundUsesForeground(shading: DocumentParagraphShading): boolean;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type WorkDocumentScriptFontSlot } from './work-document-script-fonts';
|
|
2
|
+
export declare const DOCUMENT_PROOFING_LANGUAGES_ATTRIBUTE = "data-office-proofing-languages";
|
|
3
|
+
export declare const DOCUMENT_NO_PROOF_ATTRIBUTE = "data-office-no-proof";
|
|
4
|
+
export interface WorkDocumentProofingLanguages {
|
|
5
|
+
latin?: string;
|
|
6
|
+
eastAsia?: string;
|
|
7
|
+
bidi?: string;
|
|
8
|
+
}
|
|
9
|
+
export type WorkDocumentProofingLanguageSlot = keyof WorkDocumentProofingLanguages;
|
|
10
|
+
export declare function normalizeDocumentLanguageTag(source: unknown): string | null;
|
|
11
|
+
export declare function normalizeDocumentProofingLanguages(source: unknown): WorkDocumentProofingLanguages | null;
|
|
12
|
+
export declare function serializeDocumentProofingLanguages(source: unknown): string | undefined;
|
|
13
|
+
export declare function parseDocumentProofingLanguages(source: unknown): WorkDocumentProofingLanguages | null;
|
|
14
|
+
export declare function normalizeDocumentNoProof(source: unknown): boolean | null;
|
|
15
|
+
export declare function documentProofingLanguagesFromElement(element: HTMLElement): WorkDocumentProofingLanguages | null;
|
|
16
|
+
export declare function documentNoProofFromElement(element: HTMLElement): boolean | null;
|
|
17
|
+
export declare function documentProofingLanguageForScript(source: unknown, slot?: WorkDocumentScriptFontSlot | null): string | undefined;
|
|
18
|
+
export declare function documentProofingDomAttributes(languagesSource: unknown, noProofSource?: unknown, slot?: WorkDocumentScriptFontSlot | null): Record<string, string>;
|
|
19
|
+
export declare function patchDocumentProofingLanguages(source: unknown, patch: Partial<Record<WorkDocumentProofingLanguageSlot, string | null>>): WorkDocumentProofingLanguages | null;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type DocumentParagraphBorder, type DocumentParagraphBorderStyle } from './work-document-paragraph-borders';
|
|
2
|
+
export declare const DOCUMENT_RUN_BORDER_ATTRIBUTE = "data-office-run-border";
|
|
3
|
+
export type DocumentRunBorder = DocumentParagraphBorder;
|
|
4
|
+
export type DocumentRunBorderStyle = DocumentParagraphBorderStyle;
|
|
5
|
+
export declare const DOCUMENT_RUN_BORDER_STYLES: readonly DocumentRunBorderStyle[];
|
|
6
|
+
export declare function normalizeDocumentRunBorder(source: unknown): DocumentRunBorder | null;
|
|
7
|
+
export declare function parseDocumentRunBorder(source: unknown): DocumentRunBorder | null;
|
|
8
|
+
export declare function serializeDocumentRunBorder(source: unknown): string | undefined;
|
|
9
|
+
export declare function parseDocumentRunBorderElement(element: HTMLElement): DocumentRunBorder | null;
|
|
10
|
+
export declare function documentRunBorderDomAttributes(source: unknown): Record<string, string>;
|
|
11
|
+
export declare function documentRunBorderIsVisible(source: unknown): boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type DocumentParagraphShading, type DocumentParagraphShadingColor, type DocumentParagraphShadingPattern } from './work-document-paragraph-shading';
|
|
2
|
+
export declare const DOCUMENT_RUN_SHADING_ATTRIBUTE = "data-office-run-shading";
|
|
3
|
+
export type DocumentRunShading = DocumentParagraphShading;
|
|
4
|
+
export type DocumentRunShadingColor = DocumentParagraphShadingColor;
|
|
5
|
+
export type DocumentRunShadingPattern = DocumentParagraphShadingPattern;
|
|
6
|
+
export declare const DOCUMENT_RUN_SHADING_PATTERNS: Set<DocumentParagraphShadingPattern>;
|
|
7
|
+
export declare function normalizeDocumentRunShading(source: unknown): DocumentRunShading | null;
|
|
8
|
+
export declare function parseDocumentRunShading(source: unknown): DocumentRunShading | null;
|
|
9
|
+
export declare function serializeDocumentRunShading(source: unknown): string | undefined;
|
|
10
|
+
export declare function parseDocumentRunShadingElement(element: HTMLElement): DocumentRunShading | null;
|
|
11
|
+
export declare function documentRunShadingDomAttributes(source: unknown): Record<string, string>;
|
|
12
|
+
export declare function documentRunShadingIsVisible(source: unknown): boolean;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Node, type CommandProps } from '@tiptap/core';
|
|
2
|
+
import { type WorkDocumentTableOfContentsBuildOptions, type WorkDocumentTableOfContentsOptions } from './work-document-table-of-contents';
|
|
3
|
+
declare module '@tiptap/core' {
|
|
4
|
+
interface Commands<ReturnType> {
|
|
5
|
+
documentTableOfContents: {
|
|
6
|
+
insertDocumentTableOfContents: (options?: WorkDocumentTableOfContentsOptions, buildOptions?: WorkDocumentTableOfContentsBuildOptions) => ReturnType;
|
|
7
|
+
updateDocumentTableOfContents: (options: WorkDocumentTableOfContentsOptions, buildOptions?: WorkDocumentTableOfContentsBuildOptions) => ReturnType;
|
|
8
|
+
refreshDocumentTablesOfContents: (buildOptions?: WorkDocumentTableOfContentsBuildOptions) => ReturnType;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export declare const DocumentTableOfContents: Node<any, any>;
|
|
13
|
+
export declare function selectedDocumentTableOfContentsOptions(editor: {
|
|
14
|
+
state: CommandProps['state'];
|
|
15
|
+
}): WorkDocumentTableOfContentsOptions | null;
|
|
16
|
+
export declare function documentHasTableOfContents(editor: {
|
|
17
|
+
state: CommandProps['state'];
|
|
18
|
+
}): boolean;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { Node as ProseMirrorNode } from '@tiptap/pm/model';
|
|
2
|
+
import type { WorkDocumentFieldContextResolver } from './work-document-fields';
|
|
3
|
+
export type WorkDocumentTableOfContentsLeader = 'dot' | 'dash' | 'underline' | 'none';
|
|
4
|
+
export interface WorkDocumentTableOfContentsOptions {
|
|
5
|
+
minLevel: number;
|
|
6
|
+
maxLevel: number;
|
|
7
|
+
hyperlinks: boolean;
|
|
8
|
+
showPageNumbers: boolean;
|
|
9
|
+
rightAlignPageNumbers: boolean;
|
|
10
|
+
leader: WorkDocumentTableOfContentsLeader;
|
|
11
|
+
}
|
|
12
|
+
export interface WorkDocumentTableOfContentsEntry {
|
|
13
|
+
targetId: string;
|
|
14
|
+
title: string;
|
|
15
|
+
level: number;
|
|
16
|
+
pageNumber: number;
|
|
17
|
+
}
|
|
18
|
+
export interface WorkDocumentTableOfContentsValue {
|
|
19
|
+
id: string;
|
|
20
|
+
options: WorkDocumentTableOfContentsOptions;
|
|
21
|
+
entries: WorkDocumentTableOfContentsEntry[];
|
|
22
|
+
truncated: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface WorkDocumentTableOfContentsBuildOptions {
|
|
25
|
+
resolveContext?: WorkDocumentFieldContextResolver;
|
|
26
|
+
}
|
|
27
|
+
export type WorkDocumentTableOfContentsInstructionResult = {
|
|
28
|
+
supported: true;
|
|
29
|
+
options: WorkDocumentTableOfContentsOptions;
|
|
30
|
+
} | {
|
|
31
|
+
supported: false;
|
|
32
|
+
reason: 'not-table-of-contents' | 'invalid-instruction' | 'invalid-level-range' | 'unsupported-switch' | 'unsupported-page-range' | 'unsupported-separator';
|
|
33
|
+
};
|
|
34
|
+
export declare const DEFAULT_DOCUMENT_TABLE_OF_CONTENTS_OPTIONS: WorkDocumentTableOfContentsOptions;
|
|
35
|
+
export declare const MAX_DOCUMENT_TABLE_OF_CONTENTS_ENTRIES = 512;
|
|
36
|
+
export declare function normalizeDocumentTableOfContentsOptions(source: Partial<WorkDocumentTableOfContentsOptions> | null | undefined): WorkDocumentTableOfContentsOptions;
|
|
37
|
+
export declare function buildDocumentTableOfContentsEntries(document: ProseMirrorNode, options: WorkDocumentTableOfContentsOptions, buildOptions?: WorkDocumentTableOfContentsBuildOptions): {
|
|
38
|
+
entries: WorkDocumentTableOfContentsEntry[];
|
|
39
|
+
truncated: boolean;
|
|
40
|
+
};
|
|
41
|
+
export declare function documentTableOfContentsHtml(source: Omit<WorkDocumentTableOfContentsValue, 'truncated'> & {
|
|
42
|
+
truncated?: boolean;
|
|
43
|
+
}): string;
|
|
44
|
+
export declare function normalizeDocumentTableOfContentsHtml(source: string): string;
|
|
45
|
+
export declare function documentTableOfContentsValueFromElement(element: HTMLElement, index?: number): WorkDocumentTableOfContentsValue;
|
|
46
|
+
export declare function parseDocumentTableOfContentsInstruction(instruction: string): WorkDocumentTableOfContentsInstructionResult;
|
|
47
|
+
export declare function documentTableOfContentsInstruction(source: WorkDocumentTableOfContentsOptions): string;
|
|
48
|
+
export declare function tableOfContentsLeader(value: unknown): WorkDocumentTableOfContentsLeader | null;
|
|
49
|
+
export declare function normalizeDocumentTableOfContentsValue(source: Omit<WorkDocumentTableOfContentsValue, 'truncated'> & {
|
|
50
|
+
truncated?: boolean;
|
|
51
|
+
}): WorkDocumentTableOfContentsValue;
|
|
@@ -13,6 +13,10 @@ declare module '@tiptap/extension-text-style' {
|
|
|
13
13
|
legacyTextShadow?: boolean | null;
|
|
14
14
|
legacyTextEmboss?: boolean | null;
|
|
15
15
|
legacyTextImprint?: boolean | null;
|
|
16
|
+
runBorder?: string | null;
|
|
17
|
+
runShading?: string | null;
|
|
18
|
+
proofingLanguages?: string | null;
|
|
19
|
+
noProof?: boolean | null;
|
|
16
20
|
kerningThresholdHalfPoints?: number | null;
|
|
17
21
|
scriptFonts?: string | null;
|
|
18
22
|
scriptFontSlot?: WorkDocumentScriptFontSlot | null;
|
|
@@ -12,5 +12,5 @@ export interface DocxFieldOccurrence {
|
|
|
12
12
|
export declare function docxFieldInstructions(root: ParentNode): string[];
|
|
13
13
|
export declare function docxFieldOccurrences(root: ParentNode): DocxFieldOccurrence[];
|
|
14
14
|
export declare function docxFieldOccurrenceIsInlineEditable(field: DocxFieldOccurrence): boolean;
|
|
15
|
-
export declare function hasInvalidDocxFieldStructure(root: ParentNode): boolean;
|
|
15
|
+
export declare function hasInvalidDocxFieldStructure(root: ParentNode, ignore?: (field: DocxFieldOccurrence) => boolean): boolean;
|
|
16
16
|
export declare function docxFieldResultText(field: DocxFieldOccurrence): string;
|
|
@@ -5,6 +5,7 @@ import { type ImportedDocxCitationMarkers } from './work-docx-citation-import';
|
|
|
5
5
|
import { type ImportedDocxCommentMarkers } from './work-docx-comment-import';
|
|
6
6
|
import { type ImportedDocxEquationMarkers } from './work-docx-equation-import';
|
|
7
7
|
import { type ImportedDocxFieldMarkers } from './work-docx-field-import';
|
|
8
|
+
import { type ImportedDocxTableOfContentsMarkers } from './work-docx-table-of-contents-import';
|
|
8
9
|
import { type ImportedDocxImageLayoutMarkers } from './work-docx-image-layout-import';
|
|
9
10
|
import { type ImportedDocxListMarkers } from './work-docx-list-import';
|
|
10
11
|
import { type ImportedDocxParagraphAlignmentMarkers } from './work-docx-paragraph-alignment-import';
|
|
@@ -36,6 +37,7 @@ export interface PreparedDocxImport {
|
|
|
36
37
|
changeMarkers: ImportedDocxChangeMarkers;
|
|
37
38
|
commentMarkers: ImportedDocxCommentMarkers;
|
|
38
39
|
fieldMarkers: ImportedDocxFieldMarkers;
|
|
40
|
+
tableOfContentsMarkers: ImportedDocxTableOfContentsMarkers;
|
|
39
41
|
equationMarkers: ImportedDocxEquationMarkers;
|
|
40
42
|
citationMarkers: ImportedDocxCitationMarkers;
|
|
41
43
|
listMarkers: ImportedDocxListMarkers;
|
|
@@ -58,6 +60,6 @@ export interface PreparedDocxImport {
|
|
|
58
60
|
trackChanges: boolean;
|
|
59
61
|
}
|
|
60
62
|
export declare function prepareDocxImport(buffer: ArrayBuffer, sourcePackage?: OoxmlPackage): Promise<PreparedDocxImport>;
|
|
61
|
-
export declare function applyDocxSectionsToHtml(html: string, sections: PreparedDocxImport['sections'], captionMarkers?: ImportedDocxCaptionMarkers, bookmarkMarkers?: ImportedDocxBookmarkMarkers, changeMarkers?: ImportedDocxChangeMarkers, commentMarkers?: ImportedDocxCommentMarkers, fieldMarkers?: ImportedDocxFieldMarkers, equationMarkers?: ImportedDocxEquationMarkers, citationMarkers?: ImportedDocxCitationMarkers, listMarkers?: ImportedDocxListMarkers, imageLayoutMarkers?: ImportedDocxImageLayoutMarkers, paragraphIdentityMarkers?: ImportedDocxParagraphIdentityMarkers, paragraphFormattingChangeMarkers?: ImportedDocxParagraphFormattingChangeMarkers, paragraphAlignmentMarkers?: ImportedDocxParagraphAlignmentMarkers, runFormattingMarkers?: ImportedDocxRunFormattingMarkers, paragraphDirectionMarkers?: ImportedDocxParagraphDirectionMarkers, paragraphIndentMarkers?: ImportedDocxParagraphIndentMarkers, paragraphSpacingMarkers?: ImportedDocxParagraphSpacingMarkers, paragraphBorderMarkers?: ImportedDocxParagraphBorderMarkers, paragraphShadingMarkers?: ImportedDocxParagraphShadingMarkers, paragraphPaginationMarkers?: ImportedDocxParagraphPaginationMarkers, bibliography?: WorkDocumentContent['bibliography'], tabStopMarkers?: ImportedDocxParagraphTabStopMarkers, tableCellMarkers?: ImportedDocxTableCellMarkers, tableRowMarkers?: ImportedDocxTableRowMarkers, tableSizingMarkers?: ImportedDocxTableSizingMarkers): string;
|
|
63
|
+
export declare function applyDocxSectionsToHtml(html: string, sections: PreparedDocxImport['sections'], captionMarkers?: ImportedDocxCaptionMarkers, bookmarkMarkers?: ImportedDocxBookmarkMarkers, changeMarkers?: ImportedDocxChangeMarkers, commentMarkers?: ImportedDocxCommentMarkers, fieldMarkers?: ImportedDocxFieldMarkers, tableOfContentsMarkers?: ImportedDocxTableOfContentsMarkers, equationMarkers?: ImportedDocxEquationMarkers, citationMarkers?: ImportedDocxCitationMarkers, listMarkers?: ImportedDocxListMarkers, imageLayoutMarkers?: ImportedDocxImageLayoutMarkers, paragraphIdentityMarkers?: ImportedDocxParagraphIdentityMarkers, paragraphFormattingChangeMarkers?: ImportedDocxParagraphFormattingChangeMarkers, paragraphAlignmentMarkers?: ImportedDocxParagraphAlignmentMarkers, runFormattingMarkers?: ImportedDocxRunFormattingMarkers, paragraphDirectionMarkers?: ImportedDocxParagraphDirectionMarkers, paragraphIndentMarkers?: ImportedDocxParagraphIndentMarkers, paragraphSpacingMarkers?: ImportedDocxParagraphSpacingMarkers, paragraphBorderMarkers?: ImportedDocxParagraphBorderMarkers, paragraphShadingMarkers?: ImportedDocxParagraphShadingMarkers, paragraphPaginationMarkers?: ImportedDocxParagraphPaginationMarkers, bibliography?: WorkDocumentContent['bibliography'], tabStopMarkers?: ImportedDocxParagraphTabStopMarkers, tableCellMarkers?: ImportedDocxTableCellMarkers, tableRowMarkers?: ImportedDocxTableRowMarkers, tableSizingMarkers?: ImportedDocxTableSizingMarkers): string;
|
|
62
64
|
export declare function readDocxLayout(buffer: ArrayBuffer): Promise<ImportedDocumentLayout>;
|
|
63
65
|
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type WorkDocumentProofingLanguages } from './work-document-proofing';
|
|
2
|
+
export interface DocxProofingLanguageOptions {
|
|
3
|
+
value?: string;
|
|
4
|
+
eastAsia?: string;
|
|
5
|
+
bidirectional?: string;
|
|
6
|
+
}
|
|
7
|
+
export type DocxProofingLanguagesInspection = {
|
|
8
|
+
status: 'absent';
|
|
9
|
+
spoofedCount: number;
|
|
10
|
+
} | {
|
|
11
|
+
status: 'invalid';
|
|
12
|
+
spoofedCount: number;
|
|
13
|
+
} | {
|
|
14
|
+
status: 'valid';
|
|
15
|
+
value: WorkDocumentProofingLanguages;
|
|
16
|
+
spoofedCount: number;
|
|
17
|
+
};
|
|
18
|
+
export type DocxNoProofInspection = {
|
|
19
|
+
status: 'absent';
|
|
20
|
+
spoofedCount: number;
|
|
21
|
+
} | {
|
|
22
|
+
status: 'invalid';
|
|
23
|
+
spoofedCount: number;
|
|
24
|
+
} | {
|
|
25
|
+
status: 'valid';
|
|
26
|
+
value: boolean;
|
|
27
|
+
spoofedCount: number;
|
|
28
|
+
};
|
|
29
|
+
export interface ResolvedDocxProofing {
|
|
30
|
+
languages: WorkDocumentProofingLanguages | undefined;
|
|
31
|
+
noProof: boolean | undefined;
|
|
32
|
+
invalidCount: number;
|
|
33
|
+
spoofedCount: number;
|
|
34
|
+
}
|
|
35
|
+
export declare function inspectDocxProofingLanguages(properties: Element | null | undefined): DocxProofingLanguagesInspection;
|
|
36
|
+
export declare function inspectDocxNoProof(properties: Element | null | undefined): DocxNoProofInspection;
|
|
37
|
+
export declare function resolveDocxProofing(propertySources: readonly Element[]): ResolvedDocxProofing;
|
|
38
|
+
export declare function documentProofingLanguageDocxOptions(source: unknown): DocxProofingLanguageOptions | undefined;
|